// @bun
var Lb4=Object.create;var{getPrototypeOf:Bb4,defineProperty:nG0,getOwnPropertyNames:Ob4}=Object;var Eb4=Object.prototype.hasOwnProperty;function Mb4($){return this[$]}var Rb4,qb4,U6=($,Y,X)=>{var G=$!=null&&typeof $==="object";if(G){var J=Y?Rb4??=new WeakMap:qb4??=new WeakMap,Q=J.get($);if(Q)return Q}X=$!=null?Lb4(Bb4($)):{};let W=Y||!$||!$.__esModule?nG0(X,"default",{value:$,enumerable:!0}):X;for(let Z of Ob4($))if(!Eb4.call(W,Z))nG0(W,Z,{get:Mb4.bind($,Z),enumerable:!0});if(G)J.set($,W);return W};var o=($,Y)=>()=>(Y||$((Y={exports:{}}).exports,Y),Y.exports);var Ib4=($)=>$;function Pb4($,Y){this[$]=Ib4.bind(null,Y)}var W8=($,Y)=>{for(var X in Y)nG0($,X,{get:Y[X],enumerable:!0,configurable:!0,set:Pb4.bind(Y,X)})};var V0=($,Y)=>()=>($&&(Y=$($=0)),Y);var L0=import.meta.require;class Er0{constructor(){this.previous=new Map,this.current=new Map}#$;init($){if(this.#$=$.windowMs,this.interval)clearInterval(this.interval);if(this.interval=setInterval(()=>{this.clearExpired()},this.#$),this.interval.unref)this.interval.unref()}get($){return this.current.get($)??this.previous.get($)}increment($){let Y=this.getClient($),X=Date.now();if(Y.resetTime.getTime()<=X)this.resetClient(Y,X);return Y.totalHits++,Y}decrement($){let Y=this.getClient($);if(Y.totalHits>0)Y.totalHits--}resetKey($){this.current.delete($),this.previous.delete($)}resetAll(){this.current.clear(),this.previous.clear()}shutdown(){clearInterval(this.interval),this.resetAll()}resetClient($,Y=Date.now()){return $.totalHits=0,$.resetTime.setTime(Y+this.#$),$}getClient($){let Y=this.current.get($);if(Y)return Y;let X,G=this.previous.get($);if(G)X=G,this.previous.delete($);else X={totalHits:0,resetTime:new Date},this.resetClient(X);return this.current.set($,X),X}clearExpired(){this.previous=this.current,this.current=new Map}}function cb4($,Y){if(!db4($))throw Error("The store is not correctly implemented!");if(typeof $.init==="function")$.init(Y)}function Mr0($){if("binding"in $&&$.binding!==void 0)return ib4($);return lb4($)}function lb4($){let{windowMs:Y=60000,limit:X=5,message:G="Too many requests, please try again later.",statusCode:J=429,standardHeaders:Q="draft-6",requestPropertyName:W="rateLimit",requestStorePropertyName:Z="rateLimitStore",skipFailedRequests:K=!1,skipSuccessfulRequests:H=!1,keyGenerator:z,skip:V=()=>!1,requestWasSuccessful:A=(L)=>L.res.status<400,handler:F=async(L,B,O)=>{L.status(O.statusCode);let E=typeof O.message==="function"?await O.message(L):O.message;if(typeof E==="string")return L.text(E);return L.json(E)},store:N=new Er0}=$,D={windowMs:Y,limit:X,message:G,statusCode:J,standardHeaders:Q,requestPropertyName:W,requestStorePropertyName:Z,skipFailedRequests:K,skipSuccessfulRequests:H,keyGenerator:z,skip:V,requestWasSuccessful:A,handler:F,store:N};return cb4(N,D),async(L,B)=>{if(await V(L)){await B();return}let E=await z(L),{totalHits:M,resetTime:R}=await N.increment(E),w=await(typeof X==="function"?X(L):X),I={limit:w,used:M,remaining:Math.max(w-M,0),resetTime:R};if(L.set(W,I),L.set(Z,{getKey:N.get?.bind(N),resetKey:N.resetKey.bind(N)}),Q&&!L.finalized)if(Q==="draft-7")ub4(L,I,Y);else mb4(L,I,Y);let P=!1,_=async()=>{if(!P)await N.decrement(E),P=!0},C=async()=>{if(K||H){let k=await A(L);if(K&&!k||H&&k)await _()}};if(M>w){if(Q)pb4(L,I,Y);return await C(),F(L,B,D)}try{await B(),await C()}catch(k){if(K)await _();throw k}}}function ib4($){let{message:Y="Too many requests, please try again later.",statusCode:X=429,binding:G,keyGenerator:J,skip:Q=()=>!1,handler:W=async(Z,K,H)=>{Z.status(H.statusCode);let z=typeof H.message==="function"?await H.message(Z):H.message;if(typeof z==="string")return Z.text(z);return Z.json(z)}}=$;return async(Z,K)=>{let H=G;if(typeof H==="function")H=H(Z);let z={message:Y,statusCode:X,binding:H,keyGenerator:J,skip:Q,handler:W};if(await Q(Z)){await K();return}let A=await J(Z),{success:F}=await H.limit({key:A});if(!F)return W(Z,K,z);await K()}}var GJ0=($,Y)=>{let X;if($){let G=Math.ceil(($.getTime()-Date.now())/1000);X=Math.max(0,G)}else if(Y)X=Math.ceil(Y/1000);return X},mb4=($,Y,X)=>{if($.finalized)return;let G=Math.ceil(X/1000),J=GJ0(Y.resetTime);if($.header("RateLimit-Policy",`${Y.limit};w=${G}`),$.header("RateLimit-Limit",Y.limit.toString()),$.header("RateLimit-Remaining",Y.remaining.toString()),J)$.header("RateLimit-Reset",J.toString())},ub4=($,Y,X)=>{if($.finalized)return;let G=Math.ceil(X/1000),J=GJ0(Y.resetTime,X);$.header("RateLimit-Policy",`${Y.limit};w=${G}`),$.header("RateLimit",`limit=${Y.limit}, remaining=${Y.remaining}, reset=${J}`)},pb4=($,Y,X)=>{if($.finalized)return;let G=GJ0(Y.resetTime,X);$.header("Retry-After",G?.toString())},db4=($)=>!!$?.increment,Of9;var Rr0=V0(()=>{Of9={increment:`
      local totalHits = redis.call("INCR", KEYS[1])
      local timeToExpire = redis.call("PTTL", KEYS[1])
      if timeToExpire <= 0 or ARGV[1] == "1"
      then
        redis.call("PEXPIRE", KEYS[1], tonumber(ARGV[2]))
        timeToExpire = tonumber(ARGV[2])
      end

      return { totalHits, timeToExpire }
		`.replaceAll(/^\s+/gm,"").trim(),get:`
      local totalHits = redis.call("GET", KEYS[1])
      local timeToExpire = redis.call("PTTL", KEYS[1])

      return { totalHits, timeToExpire }
		`.replaceAll(/^\s+/gm,"").trim()}});import{tracingChannel as Uh4,channel as Hh4}from"diagnostics_channel";var YX,ZS,zh4,KJ0=()=>YX.hasSubscribers||ZS.hasSubscribers,yr0,xr0,Vh4=($,Y,X,G)=>{typeof xr0.emitWarning=="function"?xr0.emitWarning($,Y,X,G):console.error(`[${X}] ${Y}: ${$}`)},Ah4=($)=>!yr0.has($),Am9,mV=($)=>!!$&&$===Math.floor($)&&$>0&&isFinite($),br0=($)=>mV($)?$<=Math.pow(2,8)?Uint8Array:$<=Math.pow(2,16)?Uint16Array:$<=Math.pow(2,32)?Uint32Array:$<=Number.MAX_SAFE_INTEGER?Ec:null:null,Ec,Fh4=class ${heap;length;static#$=!1;static create(Y){let X=br0(Y);if(!X)return[];$.#$=!0;let G=new $(Y,X);return $.#$=!1,G}constructor(Y,X){if(!$.#$)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new X(Y),this.length=0}push(Y){this.heap[this.length++]=Y}pop(){return this.heap[--this.length]}},$Z;var RN=V0(()=>{YX=Hh4("lru-cache:metrics"),ZS=Uh4("lru-cache"),zh4=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,yr0=new Set,xr0=typeof process=="object"&&process?process:{},Am9=Symbol("type"),Ec=class extends Array{constructor($){super($),this.fill(0)}},$Z=class ${#$;#Y;#X;#J;#G;#Q;#U;#K;get perf(){return this.#K}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#W;#H;#A;#V;#Z;#L;#O;#N;#B;#R;#D;#F;#P;#M;#I;#z;#v;#w;#g;static unsafeExposeInternals(Y){return{starts:Y.#P,ttls:Y.#M,autopurgeTimers:Y.#I,sizes:Y.#F,keyMap:Y.#A,keyList:Y.#V,valList:Y.#Z,next:Y.#L,prev:Y.#O,get head(){return Y.#N},get tail(){return Y.#B},free:Y.#R,isBackgroundFetch:(X)=>Y.#T(X),backgroundFetch:(X,G,J,Q)=>Y.#l(X,G,J,Q),moveToTail:(X)=>Y.#d(X),indexes:(X)=>Y.#x(X),rindexes:(X)=>Y.#S(X),isStale:(X)=>Y.#j(X)}}get max(){return this.#$}get maxSize(){return this.#Y}get calculatedSize(){return this.#H}get size(){return this.#W}get fetchMethod(){return this.#Q}get memoMethod(){return this.#U}get dispose(){return this.#X}get onInsert(){return this.#J}get disposeAfter(){return this.#G}constructor(Y){let{max:X=0,ttl:G,ttlResolution:J=1,ttlAutopurge:Q,updateAgeOnGet:W,updateAgeOnHas:Z,allowStale:K,dispose:H,onInsert:z,disposeAfter:V,noDisposeOnSet:A,noUpdateTTL:F,maxSize:N=0,maxEntrySize:D=0,sizeCalculation:L,fetchMethod:B,memoMethod:O,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:M,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:q,ignoreFetchAbort:w,perf:I}=Y;if(I!==void 0&&typeof I?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#K=I??zh4,X!==0&&!mV(X))throw TypeError("max option must be a nonnegative integer");let P=X?br0(X):Array;if(!P)throw Error("invalid max value: "+X);if(this.#$=X,this.#Y=N,this.maxEntrySize=D||this.#Y,this.sizeCalculation=L,this.sizeCalculation){if(!this.#Y&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(O!==void 0&&typeof O!="function")throw TypeError("memoMethod must be a function if defined");if(this.#U=O,B!==void 0&&typeof B!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#Q=B,this.#v=!!B,this.#A=new Map,this.#V=Array.from({length:X}).fill(void 0),this.#Z=Array.from({length:X}).fill(void 0),this.#L=new P(X),this.#O=new P(X),this.#N=0,this.#B=0,this.#R=Fh4.create(X),this.#W=0,this.#H=0,typeof H=="function"&&(this.#X=H),typeof z=="function"&&(this.#J=z),typeof V=="function"?(this.#G=V,this.#D=[]):(this.#G=void 0,this.#D=void 0),this.#z=!!this.#X,this.#g=!!this.#J,this.#w=!!this.#G,this.noDisposeOnSet=!!A,this.noUpdateTTL=!!F,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!q,this.ignoreFetchAbort=!!w,this.maxEntrySize!==0){if(this.#Y!==0&&!mV(this.#Y))throw TypeError("maxSize must be a positive integer if specified");if(!mV(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#k()}if(this.allowStale=!!K,this.noDeleteOnStaleGet=!!M,this.updateAgeOnGet=!!W,this.updateAgeOnHas=!!Z,this.ttlResolution=mV(J)||J===0?J:1,this.ttlAutopurge=!!Q,this.ttl=G||0,this.ttl){if(!mV(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#E()}if(this.#$===0&&this.ttl===0&&this.#Y===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#$&&!this.#Y){let _="LRU_CACHE_UNBOUNDED";Ah4(_)&&(yr0.add(_),Vh4("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",_,$))}}getRemainingTTL(Y){return this.#A.has(Y)?1/0:0}#E(){let Y=new Ec(this.#$),X=new Ec(this.#$);this.#M=Y,this.#P=X;let G=this.ttlAutopurge?Array.from({length:this.#$}):void 0;this.#I=G,this.#f=(Z,K,H=this.#K.now())=>{X[Z]=K!==0?H:0,Y[Z]=K,J(Z,K)},this.#_=(Z)=>{X[Z]=Y[Z]!==0?this.#K.now():0,J(Z,Y[Z])};let J=this.ttlAutopurge?(Z,K)=>{if(G?.[Z]&&(clearTimeout(G[Z]),G[Z]=void 0),K&&K!==0&&G){let H=setTimeout(()=>{this.#j(Z)&&this.#m(this.#V[Z],"expire")},K+1);H.unref&&H.unref(),G[Z]=H}}:()=>{};this.#h=(Z,K)=>{if(Y[K]){let H=Y[K],z=X[K];if(!H||!z)return;Z.ttl=H,Z.start=z,Z.now=Q||W();let V=Z.now-z;Z.remainingTTL=H-V}};let Q=0,W=()=>{let Z=this.#K.now();if(this.ttlResolution>0){Q=Z;let K=setTimeout(()=>Q=0,this.ttlResolution);K.unref&&K.unref()}return Z};this.getRemainingTTL=(Z)=>{let K=this.#A.get(Z);if(K===void 0)return 0;let H=Y[K],z=X[K];if(!H||!z)return 1/0;let V=(Q||W())-z;return H-V},this.#j=(Z)=>{let K=X[Z],H=Y[Z];return!!H&&!!K&&(Q||W())-K>H}}#_=()=>{};#h=()=>{};#f=()=>{};#j=()=>!1;#k(){let Y=new Ec(this.#$);this.#H=0,this.#F=Y,this.#b=(X)=>{this.#H-=Y[X],Y[X]=0},this.#C=(X,G,J,Q)=>{if(this.#T(G))return 0;if(!mV(J))if(Q){if(typeof Q!="function")throw TypeError("sizeCalculation must be a function");if(J=Q(G,X),!mV(J))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return J},this.#q=(X,G,J)=>{if(Y[X]=G,this.#Y){let Q=this.#Y-Y[X];for(;this.#H>Q;)this.#c(!0)}this.#H+=Y[X],J&&(J.entrySize=G,J.totalCalculatedSize=this.#H)}}#b=(Y)=>{};#q=(Y,X,G)=>{};#C=(Y,X,G,J)=>{if(G||J)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#x({allowStale:Y=this.allowStale}={}){if(this.#W)for(let X=this.#B;this.#u(X)&&((Y||!this.#j(X))&&(yield X),X!==this.#N);)X=this.#O[X]}*#S({allowStale:Y=this.allowStale}={}){if(this.#W)for(let X=this.#N;this.#u(X)&&((Y||!this.#j(X))&&(yield X),X!==this.#B);)X=this.#L[X]}#u(Y){return Y!==void 0&&this.#A.get(this.#V[Y])===Y}*entries(){for(let Y of this.#x())this.#Z[Y]!==void 0&&this.#V[Y]!==void 0&&!this.#T(this.#Z[Y])&&(yield[this.#V[Y],this.#Z[Y]])}*rentries(){for(let Y of this.#S())this.#Z[Y]!==void 0&&this.#V[Y]!==void 0&&!this.#T(this.#Z[Y])&&(yield[this.#V[Y],this.#Z[Y]])}*keys(){for(let Y of this.#x()){let X=this.#V[Y];X!==void 0&&!this.#T(this.#Z[Y])&&(yield X)}}*rkeys(){for(let Y of this.#S()){let X=this.#V[Y];X!==void 0&&!this.#T(this.#Z[Y])&&(yield X)}}*values(){for(let Y of this.#x())this.#Z[Y]!==void 0&&!this.#T(this.#Z[Y])&&(yield this.#Z[Y])}*rvalues(){for(let Y of this.#S())this.#Z[Y]!==void 0&&!this.#T(this.#Z[Y])&&(yield this.#Z[Y])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(Y,X={}){for(let G of this.#x()){let J=this.#Z[G],Q=this.#T(J)?J.__staleWhileFetching:J;if(Q!==void 0&&Y(Q,this.#V[G],this))return this.#p(this.#V[G],X)}}forEach(Y,X=this){for(let G of this.#x()){let J=this.#Z[G],Q=this.#T(J)?J.__staleWhileFetching:J;Q!==void 0&&Y.call(X,Q,this.#V[G],this)}}rforEach(Y,X=this){for(let G of this.#S()){let J=this.#Z[G],Q=this.#T(J)?J.__staleWhileFetching:J;Q!==void 0&&Y.call(X,Q,this.#V[G],this)}}purgeStale(){let Y=!1;for(let X of this.#S({allowStale:!0}))this.#j(X)&&(this.#m(this.#V[X],"expire"),Y=!0);return Y}info(Y){let X=this.#A.get(Y);if(X===void 0)return;let G=this.#Z[X],J=this.#T(G)?G.__staleWhileFetching:G;if(J===void 0)return;let Q={value:J};if(this.#M&&this.#P){let W=this.#M[X],Z=this.#P[X];if(W&&Z){let K=W-(this.#K.now()-Z);Q.ttl=K,Q.start=Date.now()}}return this.#F&&(Q.size=this.#F[X]),Q}dump(){let Y=[];for(let X of this.#x({allowStale:!0})){let G=this.#V[X],J=this.#Z[X],Q=this.#T(J)?J.__staleWhileFetching:J;if(Q===void 0||G===void 0)continue;let W={value:Q};if(this.#M&&this.#P){W.ttl=this.#M[X];let Z=this.#K.now()-this.#P[X];W.start=Math.floor(Date.now()-Z)}this.#F&&(W.size=this.#F[X]),Y.unshift([G,W])}return Y}load(Y){this.clear();for(let[X,G]of Y){if(G.start){let J=Date.now()-G.start;G.start=this.#K.now()-J}this.#y(X,G.value,G)}}set(Y,X,G={}){let{status:J=YX.hasSubscribers?{}:void 0}=G;G.status=J,J&&(J.op="set",J.key=Y,X!==void 0&&(J.value=X));let Q=this.#y(Y,X,G);return J&&YX.hasSubscribers&&YX.publish(J),Q}#y(Y,X,G={}){let{ttl:J=this.ttl,start:Q,noDisposeOnSet:W=this.noDisposeOnSet,sizeCalculation:Z=this.sizeCalculation,status:K}=G;if(X===void 0)return K&&(K.set="deleted"),this.delete(Y),this;let{noUpdateTTL:H=this.noUpdateTTL}=G;K&&!this.#T(X)&&(K.value=X);let z=this.#C(Y,X,G.size||0,Z,K);if(this.maxEntrySize&&z>this.maxEntrySize)return this.#m(Y,"set"),K&&(K.set="miss",K.maxEntrySizeExceeded=!0),this;let V=this.#W===0?void 0:this.#A.get(Y);if(V===void 0)V=this.#W===0?this.#B:this.#R.length!==0?this.#R.pop():this.#W===this.#$?this.#c(!1):this.#W,this.#V[V]=Y,this.#Z[V]=X,this.#A.set(Y,V),this.#L[this.#B]=V,this.#O[V]=this.#B,this.#B=V,this.#W++,this.#q(V,z,K),K&&(K.set="add"),H=!1,this.#g&&this.#J?.(X,Y,"add");else{this.#d(V);let A=this.#Z[V];if(X!==A){if(this.#v&&this.#T(A)){A.__abortController.abort(Error("replaced"));let{__staleWhileFetching:F}=A;F!==void 0&&!W&&(this.#z&&this.#X?.(F,Y,"set"),this.#w&&this.#D?.push([F,Y,"set"]))}else W||(this.#z&&this.#X?.(A,Y,"set"),this.#w&&this.#D?.push([A,Y,"set"]));if(this.#b(V),this.#q(V,z,K),this.#Z[V]=X,K){K.set="replace";let F=A&&this.#T(A)?A.__staleWhileFetching:A;F!==void 0&&(K.oldValue=F)}}else K&&(K.set="update");this.#g&&this.onInsert?.(X,Y,X===A?"update":"replace")}if(J!==0&&!this.#M&&this.#E(),this.#M&&(H||this.#f(V,J,Q),K&&this.#h(K,V)),!W&&this.#w&&this.#D){let A=this.#D,F;for(;F=A?.shift();)this.#G?.(...F)}return this}pop(){try{for(;this.#W;){let Y=this.#Z[this.#N];if(this.#c(!0),this.#T(Y)){if(Y.__staleWhileFetching)return Y.__staleWhileFetching}else if(Y!==void 0)return Y}}finally{if(this.#w&&this.#D){let Y=this.#D,X;for(;X=Y?.shift();)this.#G?.(...X)}}}#c(Y){let X=this.#N,G=this.#V[X],J=this.#Z[X];return this.#v&&this.#T(J)?J.__abortController.abort(Error("evicted")):(this.#z||this.#w)&&(this.#z&&this.#X?.(J,G,"evict"),this.#w&&this.#D?.push([J,G,"evict"])),this.#b(X),this.#I?.[X]&&(clearTimeout(this.#I[X]),this.#I[X]=void 0),Y&&(this.#V[X]=void 0,this.#Z[X]=void 0,this.#R.push(X)),this.#W===1?(this.#N=this.#B=0,this.#R.length=0):this.#N=this.#L[X],this.#A.delete(G),this.#W--,X}has(Y,X={}){let{status:G=YX.hasSubscribers?{}:void 0}=X;X.status=G,G&&(G.op="has",G.key=Y);let J=this.#a(Y,X);return YX.hasSubscribers&&YX.publish(G),J}#a(Y,X={}){let{updateAgeOnHas:G=this.updateAgeOnHas,status:J}=X,Q=this.#A.get(Y);if(Q!==void 0){let W=this.#Z[Q];if(this.#T(W)&&W.__staleWhileFetching===void 0)return!1;if(this.#j(Q))J&&(J.has="stale",this.#h(J,Q));else return G&&this.#_(Q),J&&(J.has="hit",this.#h(J,Q)),!0}else J&&(J.has="miss");return!1}peek(Y,X={}){let{status:G=KJ0()?{}:void 0}=X;G&&(G.op="peek",G.key=Y),X.status=G;let J=this.#s(Y,X);return YX.hasSubscribers&&YX.publish(G),J}#s(Y,X){let{status:G,allowStale:J=this.allowStale}=X,Q=this.#A.get(Y);if(Q===void 0||!J&&this.#j(Q)){G&&(G.peek=Q===void 0?"miss":"stale");return}let W=this.#Z[Q],Z=this.#T(W)?W.__staleWhileFetching:W;return G&&(Z!==void 0?(G.peek="hit",G.value=Z):G.peek="miss"),Z}#l(Y,X,G,J){let Q=X===void 0?void 0:this.#Z[X];if(this.#T(Q))return Q;let W=new AbortController,{signal:Z}=G;Z?.addEventListener("abort",()=>W.abort(Z.reason),{signal:W.signal});let K={signal:W.signal,options:G,context:J},H=(D,L=!1)=>{let{aborted:B}=W.signal,O=G.ignoreFetchAbort&&D!==void 0,E=G.ignoreFetchAbort||!!(G.allowStaleOnFetchAbort&&D!==void 0);if(G.status&&(B&&!L?(G.status.fetchAborted=!0,G.status.fetchError=W.signal.reason,O&&(G.status.fetchAbortIgnored=!0)):G.status.fetchResolved=!0),B&&!O&&!L)return V(W.signal.reason,E);let M=F,R=this.#Z[X];return(R===F||R===void 0&&O&&L)&&(D===void 0?M.__staleWhileFetching!==void 0?this.#Z[X]=M.__staleWhileFetching:this.#m(Y,"fetch"):(G.status&&(G.status.fetchUpdated=!0),this.#y(Y,D,K.options))),D},z=(D)=>(G.status&&(G.status.fetchRejected=!0,G.status.fetchError=D),V(D,!1)),V=(D,L)=>{let{aborted:B}=W.signal,O=B&&G.allowStaleOnFetchAbort,E=O||G.allowStaleOnFetchRejection,M=E||G.noDeleteOnFetchRejection,R=F;if(this.#Z[X]===F&&(!M||!L&&R.__staleWhileFetching===void 0?this.#m(Y,"fetch"):O||(this.#Z[X]=R.__staleWhileFetching)),E)return G.status&&R.__staleWhileFetching!==void 0&&(G.status.returnedStale=!0),R.__staleWhileFetching;if(R.__returned===R)throw D},A=(D,L)=>{let B=this.#Q?.(Y,Q,K);B&&B instanceof Promise&&B.then((O)=>D(O===void 0?void 0:O),L),W.signal.addEventListener("abort",()=>{(!G.ignoreFetchAbort||G.allowStaleOnFetchAbort)&&(D(void 0),G.allowStaleOnFetchAbort&&(D=(O)=>H(O,!0)))})};G.status&&(G.status.fetchDispatched=!0);let F=new Promise(A).then(H,z),N=Object.assign(F,{__abortController:W,__staleWhileFetching:Q,__returned:void 0});return X===void 0?(this.#y(Y,N,{...K.options,status:void 0}),X=this.#A.get(Y)):this.#Z[X]=N,N}#T(Y){if(!this.#v)return!1;let X=Y;return!!X&&X instanceof Promise&&X.hasOwnProperty("__staleWhileFetching")&&X.__abortController instanceof AbortController}fetch(Y,X={}){let G=ZS.hasSubscribers,{status:J=KJ0()?{}:void 0}=X;X.status=J,J&&X.context&&(J.context=X.context);let Q=this.#i(Y,X);return J&&G&&(J.trace=!0,ZS.tracePromise(()=>Q,J).catch(()=>{})),Q}async#i(Y,X={}){let{allowStale:G=this.allowStale,updateAgeOnGet:J=this.updateAgeOnGet,noDeleteOnStaleGet:Q=this.noDeleteOnStaleGet,ttl:W=this.ttl,noDisposeOnSet:Z=this.noDisposeOnSet,size:K=0,sizeCalculation:H=this.sizeCalculation,noUpdateTTL:z=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:A=this.allowStaleOnFetchRejection,ignoreFetchAbort:F=this.ignoreFetchAbort,allowStaleOnFetchAbort:N=this.allowStaleOnFetchAbort,context:D,forceRefresh:L=!1,status:B,signal:O}=X;if(B&&(B.op="fetch",B.key=Y,L&&(B.forceRefresh=!0)),!this.#v)return B&&(B.fetch="get"),this.#p(Y,{allowStale:G,updateAgeOnGet:J,noDeleteOnStaleGet:Q,status:B});let E={allowStale:G,updateAgeOnGet:J,noDeleteOnStaleGet:Q,ttl:W,noDisposeOnSet:Z,size:K,sizeCalculation:H,noUpdateTTL:z,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:N,ignoreFetchAbort:F,status:B,signal:O},M=this.#A.get(Y);if(M===void 0){B&&(B.fetch="miss");let R=this.#l(Y,M,E,D);return R.__returned=R}else{let R=this.#Z[M];if(this.#T(R)){let P=G&&R.__staleWhileFetching!==void 0;return B&&(B.fetch="inflight",P&&(B.returnedStale=!0)),P?R.__staleWhileFetching:R.__returned=R}let q=this.#j(M);if(!L&&!q)return B&&(B.fetch="hit"),this.#d(M),J&&this.#_(M),B&&this.#h(B,M),R;let w=this.#l(Y,M,E,D),I=w.__staleWhileFetching!==void 0&&G;return B&&(B.fetch=q?"stale":"refresh",I&&q&&(B.returnedStale=!0)),I?w.__staleWhileFetching:w.__returned=w}}forceFetch(Y,X={}){let G=ZS.hasSubscribers,{status:J=KJ0()?{}:void 0}=X;X.status=J,J&&X.context&&(J.context=X.context);let Q=this.#o(Y,X);return J&&G&&(J.trace=!0,ZS.tracePromise(()=>Q,J).catch(()=>{})),Q}async#o(Y,X={}){let G=await this.#i(Y,X);if(G===void 0)throw Error("fetch() returned undefined");return G}memo(Y,X={}){let{status:G=YX.hasSubscribers?{}:void 0}=X;X.status=G,G&&(G.op="memo",G.key=Y,X.context&&(G.context=X.context));let J=this.#t(Y,X);return G&&(G.value=J),YX.hasSubscribers&&YX.publish(G),J}#t(Y,X={}){let G=this.#U;if(!G)throw Error("no memoMethod provided to constructor");let{context:J,status:Q,forceRefresh:W,...Z}=X;Q&&W&&(Q.forceRefresh=!0);let K=this.#p(Y,Z),H=W||K===void 0;if(Q&&(Q.memo=H?"miss":"hit",H||(Q.value=K)),!H)return K;let z=G(Y,K,{options:Z,context:J});return Q&&(Q.value=z),this.#y(Y,z,Z),z}get(Y,X={}){let{status:G=YX.hasSubscribers?{}:void 0}=X;X.status=G,G&&(G.op="get",G.key=Y);let J=this.#p(Y,X);return G&&(J!==void 0&&(G.value=J),YX.hasSubscribers&&YX.publish(G)),J}#p(Y,X={}){let{allowStale:G=this.allowStale,updateAgeOnGet:J=this.updateAgeOnGet,noDeleteOnStaleGet:Q=this.noDeleteOnStaleGet,status:W}=X,Z=this.#A.get(Y);if(Z===void 0){W&&(W.get="miss");return}let K=this.#Z[Z],H=this.#T(K);return W&&this.#h(W,Z),this.#j(Z)?H?(W&&(W.get="stale-fetching"),G&&K.__staleWhileFetching!==void 0?(W&&(W.returnedStale=!0),K.__staleWhileFetching):void 0):(Q||this.#m(Y,"expire"),W&&(W.get="stale"),G?(W&&(W.returnedStale=!0),K):void 0):(W&&(W.get=H?"fetching":"hit"),this.#d(Z),J&&this.#_(Z),H?K.__staleWhileFetching:K)}#n(Y,X){this.#O[X]=Y,this.#L[Y]=X}#d(Y){Y!==this.#B&&(Y===this.#N?this.#N=this.#L[Y]:this.#n(this.#O[Y],this.#L[Y]),this.#n(this.#B,Y),this.#B=Y)}delete(Y){return this.#m(Y,"delete")}#m(Y,X){YX.hasSubscribers&&YX.publish({op:"delete",delete:X,key:Y});let G=!1;if(this.#W!==0){let J=this.#A.get(Y);if(J!==void 0)if(this.#I?.[J]&&(clearTimeout(this.#I?.[J]),this.#I[J]=void 0),G=!0,this.#W===1)this.#r(X);else{this.#b(J);let Q=this.#Z[J];if(this.#T(Q)?Q.__abortController.abort(Error("deleted")):(this.#z||this.#w)&&(this.#z&&this.#X?.(Q,Y,X),this.#w&&this.#D?.push([Q,Y,X])),this.#A.delete(Y),this.#V[J]=void 0,this.#Z[J]=void 0,J===this.#B)this.#B=this.#O[J];else if(J===this.#N)this.#N=this.#L[J];else{let W=this.#O[J];this.#L[W]=this.#L[J];let Z=this.#L[J];this.#O[Z]=this.#O[J]}this.#W--,this.#R.push(J)}}if(this.#w&&this.#D?.length){let J=this.#D,Q;for(;Q=J?.shift();)this.#G?.(...Q)}return G}clear(){return this.#r("delete")}#r(Y){for(let X of this.#S({allowStale:!0})){let G=this.#Z[X];if(this.#T(G))G.__abortController.abort(Error("deleted"));else{let J=this.#V[X];this.#z&&this.#X?.(G,J,Y),this.#w&&this.#D?.push([G,J,Y])}}if(this.#A.clear(),this.#Z.fill(void 0),this.#V.fill(void 0),this.#M&&this.#P){this.#M.fill(0),this.#P.fill(0);for(let X of this.#I??[])X!==void 0&&clearTimeout(X);this.#I?.fill(void 0)}if(this.#F&&this.#F.fill(0),this.#N=0,this.#B=0,this.#R.length=0,this.#H=0,this.#W=0,this.#w&&this.#D){let X=this.#D,G;for(;G=X?.shift();)this.#G?.(...G)}}}});var qa0=o((Qu9,Ra0)=>{var Ma0=()=>process.platform==="linux",jJ0=null,mh4=()=>{if(!jJ0)jJ0=Ma0()&&process.report?process.report.getReport():{};return jJ0};Ra0.exports={isLinux:Ma0,getReport:mh4}});var wa0=o((Wu9,Pa0)=>{var Ia0=L0("fs"),uh4=($)=>Ia0.readFileSync($,"utf-8"),ph4=($)=>new Promise((Y,X)=>{Ia0.readFile($,"utf-8",(G,J)=>{if(G)X(G);else Y(J)})});Pa0.exports={LDD_PATH:"/usr/bin/ldd",readFileSync:uh4,readFile:ph4}});var TJ0=o((Zu9,pa0)=>{var ja0=L0("child_process"),{isLinux:OR,getReport:Ta0}=qa0(),{LDD_PATH:xc,readFile:Ca0,readFileSync:Sa0}=wa0(),S3,k3,pV="",ka0=()=>{if(!pV)return new Promise(($)=>{ja0.exec("getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",(Y,X)=>{pV=Y?" ":X,$(pV)})});return pV},va0=()=>{if(!pV)try{pV=ja0.execSync("getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",{encoding:"utf8"})}catch($){pV=" "}return pV},TH="glibc",xa0=/GLIBC\s(\d+\.\d+)/,jN="musl",dh4=TH.toUpperCase(),ch4=jN.toLowerCase(),lh4=($)=>$.includes("libc.musl-")||$.includes("ld-musl-"),ya0=()=>{let $=Ta0();if($.header&&$.header.glibcVersionRuntime)return TH;if(Array.isArray($.sharedObjects)){if($.sharedObjects.some(lh4))return jN}return null},ba0=($)=>{let[Y,X]=$.split(/[\r\n]+/);if(Y&&Y.includes(TH))return TH;if(X&&X.includes(jN))return jN;return null},ha0=($)=>{if($.includes(ch4))return jN;if($.includes(dh4))return TH;return null},ih4=async()=>{if(S3!==void 0)return S3;S3=null;try{let $=await Ca0(xc);S3=ha0($)}catch($){}return S3},nh4=()=>{if(S3!==void 0)return S3;S3=null;try{let $=Sa0(xc);S3=ha0($)}catch($){}return S3},fa0=async()=>{let $=null;if(OR()){if($=await ih4(),!$)$=ya0();if(!$){let Y=await ka0();$=ba0(Y)}}return $},ga0=()=>{let $=null;if(OR()){if($=nh4(),!$)$=ya0();if(!$){let Y=va0();$=ba0(Y)}}return $},rh4=async()=>OR()&&await fa0()!==TH,ah4=()=>OR()&&ga0()!==TH,sh4=async()=>{if(k3!==void 0)return k3;k3=null;try{let Y=(await Ca0(xc)).match(xa0);if(Y)k3=Y[1]}catch($){}return k3},oh4=()=>{if(k3!==void 0)return k3;k3=null;try{let Y=Sa0(xc).match(xa0);if(Y)k3=Y[1]}catch($){}return k3},ma0=()=>{let $=Ta0();if($.header&&$.header.glibcVersionRuntime)return $.header.glibcVersionRuntime;return null},_a0=($)=>$.trim().split(/\s+/)[1],ua0=($)=>{let[Y,X,G]=$.split(/[\r\n]+/);if(Y&&Y.includes(TH))return _a0(Y);if(X&&G&&X.includes(jN))return _a0(G);return null},th4=async()=>{let $=null;if(OR()){if($=await sh4(),!$)$=ma0();if(!$){let Y=await ka0();$=ua0(Y)}}return $},eh4=()=>{let $=null;if(OR()){if($=oh4(),!$)$=ma0();if(!$){let Y=va0();$=ua0(Y)}}return $};pa0.exports={GLIBC:TH,MUSL:jN,family:fa0,familySync:ga0,isNonGlibcLinux:rh4,isNonGlibcLinuxSync:ah4,version:th4,versionSync:eh4}});var Xs0=o((Ku9,Ys0)=>{var $f4=L0("fs"),M2=L0("path"),Yf4=L0("url"),la0=L0("os"),ia0=typeof __webpack_require__==="function"?__non_webpack_require__:L0,Xf4=process.config&&process.config.variables||{},Gf4=!!process.env.PREBUILDS_ONLY,xJ0=process.versions,SJ0=xJ0.modules;if(xJ0.deno||process.isBun)SJ0="unsupported";var CJ0=Wf4()?"electron":Qf4()?"node-webkit":"node",yc=process.env.npm_config_arch||la0.arch(),bc=process.env.npm_config_platform||la0.platform(),na0=process.env.LIBC||(Zf4(bc)?"musl":"glibc"),kJ0=process.env.ARM_VERSION||(yc==="arm64"?"8":Xf4.arm_version)||"",ra0=(xJ0.uv||"").split(".")[0];Ys0.exports=v3;function v3($){return ia0(v3.resolve($))}v3.resolve=v3.path=function($){$=M2.resolve($||".");var Y="",X;try{Y=ia0(M2.join($,"package.json")).name;var G=Y.toUpperCase().replace(/-/g,"_");if(process.env[G+"_PREBUILD"])$=process.env[G+"_PREBUILD"]}catch(D){X=D}if(!Gf4){var J=da0(M2.join($,"build/Release"),ca0);if(J)return J;var Q=da0(M2.join($,"build/Debug"),ca0);if(Q)return Q}var W=F($);if(W)return W;var Z=F(M2.dirname(process.execPath));if(Z)return Z;var K=(Y[0]=="@"?"":"@"+Y+"/")+Y+"-"+bc+"-"+yc,H;try{var z=M2.dirname(L0("module").createRequire(Yf4.pathToFileURL(M2.join($,"package.json"))).resolve(K));return N(z)}catch(D){H=D}var V=["platform="+bc,"arch="+yc,"runtime="+CJ0,"abi="+SJ0,"uv="+ra0,kJ0?"armv="+kJ0:"","libc="+na0,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"",typeof __webpack_require__==="function"?"webpack=true":""].filter(Boolean).join(" ");let A="No native build was found for "+V+`
    attempted loading from: `+$+" and package: "+K+`
`;if(X)A+="Error finding package.json: "+X.message+`
`;if(H)A+="Error resolving package: "+H.message+`
`;throw Error(A);function F(D){var L=vJ0(M2.join(D,"prebuilds")).map(aa0),B=L.filter(sa0(bc,yc)).sort(oa0)[0];if(!B)return;return N(M2.join(D,"prebuilds",B.name))}function N(D){var L=vJ0(D).map(ta0),B=L.filter(ea0(CJ0,SJ0)),O=B.sort($s0(CJ0))[0];if(O)return M2.join(D,O.file)}};function vJ0($){try{return $f4.readdirSync($)}catch(Y){return[]}}function da0($,Y){var X=vJ0($).filter(Y);return X[0]&&M2.join($,X[0])}function ca0($){return/\.node$/.test($)}function aa0($){var Y=$.split("-");if(Y.length!==2)return;var X=Y[0],G=Y[1].split("+");if(!X)return;if(!G.length)return;if(!G.every(Boolean))return;return{name:$,platform:X,architectures:G}}function sa0($,Y){return function(X){if(X==null)return!1;if(X.platform!==$)return!1;return X.architectures.includes(Y)}}function oa0($,Y){return $.architectures.length-Y.architectures.length}function ta0($){var Y=$.split("."),X=Y.pop(),G={file:$,specificity:0};if(X!=="node")return;for(var J=0;J<Y.length;J++){var Q=Y[J];if(Q==="node"||Q==="electron"||Q==="node-webkit")G.runtime=Q;else if(Q==="napi")G.napi=!0;else if(Q.slice(0,3)==="abi")G.abi=Q.slice(3);else if(Q.slice(0,2)==="uv")G.uv=Q.slice(2);else if(Q.slice(0,4)==="armv")G.armv=Q.slice(4);else if(Q==="glibc"||Q==="musl")G.libc=Q;else continue;G.specificity++}return G}function ea0($,Y){return function(X){if(X==null)return!1;if(X.runtime!==$&&!Jf4(X))return!1;if(X.abi!==Y&&!X.napi)return!1;if(X.uv&&X.uv!==ra0)return!1;if(X.armv&&X.armv!==kJ0)return!1;if(X.libc&&X.libc!==na0)return!1;return!0}}function Jf4($){return $.runtime==="node"&&$.napi}function $s0($){return function(Y,X){if(Y.runtime!==X.runtime)return Y.runtime===$?-1:1;else if(Y.abi!==X.abi)return Y.abi?-1:1;else if(Y.specificity!==X.specificity)return Y.specificity>X.specificity?-1:1;else return 0}}function Qf4(){return!!(process.versions&&process.versions.nw)}function Wf4(){if(process.versions&&process.versions.electron)return!0;if(process.env.ELECTRON_RUN_AS_NODE)return!0;return typeof window<"u"&&window.process&&window.process.type==="renderer"}function Zf4($){if($!=="linux")return!1;let{familySync:Y,MUSL:X}=TJ0();return Y()===X}v3.parseTags=ta0;v3.matchTags=ea0;v3.compareTags=$s0;v3.parseTuple=aa0;v3.matchTuple=sa0;v3.compareTuples=oa0});var Gs0=o((Hu9,bJ0)=>{var yJ0=typeof __webpack_require__==="function"?__non_webpack_require__:L0;if(typeof yJ0.addon==="function")bJ0.exports=yJ0.addon.bind(yJ0);else bJ0.exports=Xs0()});var Qs0=o((Vu9,Js0)=>{var __dirname="D:\\tbc_project\\tbc_backend_2.0.0\\node_modules\\msgpackr-extract";Js0.exports=Gs0()(__dirname)});function NS($){return Date.UTC($.y,$.m-1,$.d,$.h,$.i,$.s)}function KQ0($,Y){return $.y===Y.y&&$.m===Y.m&&$.d===Y.d&&$.h===Y.h&&$.i===Y.i&&$.s===Y.s}function wf4($,Y){let X=new Date(Date.parse($));if(isNaN(X))throw Error("Invalid ISO8601 passed to timezone parser.");let G=$.substring(9);return G.includes("Z")||G.includes("+")||G.includes("-")?HQ0(X.getUTCFullYear(),X.getUTCMonth()+1,X.getUTCDate(),X.getUTCHours(),X.getUTCMinutes(),X.getUTCSeconds(),"Etc/UTC"):HQ0(X.getFullYear(),X.getMonth()+1,X.getDate(),X.getHours(),X.getMinutes(),X.getSeconds(),Y)}function vs0($,Y,X){return bs0(wf4($,Y),X)}function bs0($,Y){let X=new Date(NS($)),G=LS(X,$.tz),J=NS($),Q=NS(G),W=J-Q,Z=new Date(X.getTime()+W),K=LS(Z,$.tz);if(KQ0(K,$)){let V=new Date(Z.getTime()-3600000),A=LS(V,$.tz);return KQ0(A,$)?V:Z}let H=new Date(Z.getTime()+NS($)-NS(K)),z=LS(H,$.tz);if(KQ0(z,$))return H;if(Y)throw Error("Invalid date passed to fromTZ()");return Z.getTime()>H.getTime()?Z:H}function LS($,Y){let X,G;try{X=new Intl.DateTimeFormat("en-US",{timeZone:Y,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}),G=X.formatToParts($)}catch(Q){let W=Q instanceof Error?Q.message:String(Q);throw RangeError(`toTZ: Invalid timezone '${Y}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${W}`)}let J={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let Q of G)(Q.type==="year"||Q.type==="month"||Q.type==="day"||Q.type==="hour"||Q.type==="minute"||Q.type==="second")&&(J[Q.type]=parseInt(Q.value,10));if(isNaN(J.year)||isNaN(J.month)||isNaN(J.day)||isNaN(J.hour)||isNaN(J.minute)||isNaN(J.second))throw Error(`toTZ: Failed to parse all date components from timezone '${Y}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(J)}`);return J.hour===24&&(J.hour=0),{y:J.year,m:J.month,d:J.day,h:J.hour,i:J.minute,s:J.second,tz:Y}}function HQ0($,Y,X,G,J,Q,W){return{y:$,m:Y,d:X,h:G,i:J,s:Q,tz:W}}function _f4($){if($===void 0&&($={}),delete $.name,$.legacyMode!==void 0&&$.domAndDow===void 0?$.domAndDow=!$.legacyMode:$.domAndDow===void 0&&($.domAndDow=!1),$.legacyMode=!$.domAndDow,$.paused=$.paused===void 0?!1:$.paused,$.maxRuns=$.maxRuns===void 0?1/0:$.maxRuns,$.catch=$.catch===void 0?!1:$.catch,$.interval=$.interval===void 0?0:parseInt($.interval.toString(),10),$.utcOffset=$.utcOffset===void 0?void 0:parseInt($.utcOffset.toString(),10),$.dayOffset=$.dayOffset===void 0?0:parseInt($.dayOffset.toString(),10),$.unref=$.unref===void 0?!1:$.unref,$.mode=$.mode===void 0?"auto":$.mode,$.alternativeWeekdays=$.alternativeWeekdays===void 0?!1:$.alternativeWeekdays,$.sloppyRanges=$.sloppyRanges===void 0?!1:$.sloppyRanges,!["auto","5-part","6-part","7-part","5-or-6-parts","6-or-7-parts"].includes($.mode))throw Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");if($.startAt&&($.startAt=new XX($.startAt,$.timezone)),$.stopAt&&($.stopAt=new XX($.stopAt,$.timezone)),$.interval!==null){if(isNaN($.interval))throw Error("CronOptions: Supplied value for interval is not a number");if($.interval<0)throw Error("CronOptions: Supplied value for interval can not be negative")}if($.utcOffset!==void 0){if(isNaN($.utcOffset))throw Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if($.utcOffset<-870||$.utcOffset>870)throw Error("CronOptions: utcOffset out of bounds.");if($.utcOffset!==void 0&&$.timezone)throw Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if($.unref!==!0&&$.unref!==!1)throw Error("CronOptions: Unref should be either true, false or undefined(false).");if($.dayOffset!==void 0&&$.dayOffset!==0&&isNaN($.dayOffset))throw Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");return $}function BS($){return Object.prototype.toString.call($)==="[object Function]"||typeof $=="function"||$ instanceof Function}function jf4($){return BS($)}function Tf4($){typeof Deno<"u"&&typeof Deno.unrefTimer<"u"?Deno.unrefTimer($):$&&typeof $.unref<"u"&&$.unref()}var hs0,xs0=class{pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor($,Y,X){this.pattern=$,this.timezone=Y,this.mode=X?.mode??"auto",this.alternativeWeekdays=X?.alternativeWeekdays??!1,this.sloppyRanges=X?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!(typeof this.pattern=="string"||this.pattern instanceof String))throw TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let $=this.pattern.match(/\S+/g)||[""],Y=$.length;if($.length<5||$.length>7)throw TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five, six, or seven space separated parts are required.");if(this.mode!=="auto"){let G;switch(this.mode){case"5-part":G=5;break;case"6-part":G=6;break;case"7-part":G=7;break;case"5-or-6-parts":G=[5,6];break;case"6-or-7-parts":G=[6,7];break;default:G=0}if(!(Array.isArray(G)?G.includes(Y):Y===G)){let J=Array.isArray(G)?G.join(" or "):G.toString();throw TypeError(`CronPattern: mode '${this.mode}' requires exactly ${J} parts, but pattern '${this.pattern}' has ${Y} parts.`)}}if($.length===5&&$.unshift("0"),$.length===6&&$.push("*"),$[3].toUpperCase()==="LW"?(this.lastWeekday=!0,$[3]=""):$[3].toUpperCase().indexOf("L")>=0&&($[3]=$[3].replace(/L/gi,""),this.lastDayOfMonth=!0),$[3]=="*"&&(this.starDOM=!0),$[6]=="*"&&(this.starYear=!0),$[4].length>=3&&($[4]=this.replaceAlphaMonths($[4])),$[5].length>=3&&($[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz($[5]):this.replaceAlphaDays($[5])),$[5].startsWith("+")&&(this.useAndLogic=!0,$[5]=$[5].substring(1),$[5]===""))throw TypeError("CronPattern: Day-of-week field cannot be empty after '+' modifier.");switch($[5]=="*"&&(this.starDOW=!0),this.pattern.indexOf("?")>=0&&($[0]=$[0].replace(/\?/g,"*"),$[1]=$[1].replace(/\?/g,"*"),$[2]=$[2].replace(/\?/g,"*"),$[3]=$[3].replace(/\?/g,"*"),$[4]=$[4].replace(/\?/g,"*"),$[5]=$[5].replace(/\?/g,"*"),$[6]&&($[6]=$[6].replace(/\?/g,"*"))),this.mode){case"5-part":$[0]="0",$[6]="*";break;case"6-part":$[6]="*";break;case"5-or-6-parts":$[6]="*";break;case"6-or-7-parts":break;case"7-part":case"auto":break}this.throwAtIllegalCharacters($),this.partToArray("second",$[0],0,1),this.partToArray("minute",$[1],0,1),this.partToArray("hour",$[2],0,1),this.partToArray("day",$[3],-1,1),this.partToArray("month",$[4],-1,1);let X=this.alternativeWeekdays?-1:0;this.partToArray("dayOfWeek",$[5],X,63),this.partToArray("year",$[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray($,Y,X,G){let J=this[$],Q=$==="day"&&this.lastDayOfMonth,W=$==="day"&&this.lastWeekday;if(Y===""&&!Q&&!W)throw TypeError("CronPattern: configuration entry "+$+" ("+Y+") is empty, check for trailing spaces.");if(Y==="*")return J.fill(G);let Z=Y.split(",");if(Z.length>1)for(let K=0;K<Z.length;K++)this.partToArray($,Z[K],X,G);else Y.indexOf("-")!==-1&&Y.indexOf("/")!==-1?this.handleRangeWithStepping(Y,$,X,G):Y.indexOf("-")!==-1?this.handleRange(Y,$,X,G):Y.indexOf("/")!==-1?this.handleStepping(Y,$,X,G):Y!==""&&this.handleNumber(Y,$,X,G)}throwAtIllegalCharacters($){for(let Y=0;Y<$.length;Y++)if((Y===3?/[^/*0-9,\-WwLl]+/:Y===5?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test($[Y]))throw TypeError("CronPattern: configuration entry "+Y+" ("+$[Y]+") contains illegal characters.")}handleNumber($,Y,X,G){let J=this.extractNth($,Y),Q=$.toUpperCase().includes("W");if(Y!=="day"&&Q)throw TypeError("CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.");Q&&(Y="nearestWeekdays");let W=parseInt(J[0],10)+X;if(isNaN(W))throw TypeError("CronPattern: "+Y+" is not a number: '"+$+"'");this.setPart(Y,W,J[1]||G)}setPart($,Y,X){if(!Object.prototype.hasOwnProperty.call(this,$))throw TypeError("CronPattern: Invalid part specified: "+$);if($==="dayOfWeek"){if(Y===7&&(Y=0),Y<0||Y>6)throw RangeError("CronPattern: Invalid value for dayOfWeek: "+Y);this.setNthWeekdayOfMonth(Y,X);return}if($==="second"||$==="minute"){if(Y<0||Y>=60)throw RangeError("CronPattern: Invalid value for "+$+": "+Y)}else if($==="hour"){if(Y<0||Y>=24)throw RangeError("CronPattern: Invalid value for "+$+": "+Y)}else if($==="day"||$==="nearestWeekdays"){if(Y<0||Y>=31)throw RangeError("CronPattern: Invalid value for "+$+": "+Y)}else if($==="month"){if(Y<0||Y>=12)throw RangeError("CronPattern: Invalid value for "+$+": "+Y)}else if($==="year"&&(Y<1||Y>=1e4))throw RangeError("CronPattern: Invalid value for "+$+": "+Y+" (supported range: 1-9999)");this[$][Y]=X}validateNotNaN($,Y){if(isNaN($))throw TypeError(Y)}validateRange($,Y,X,G,J){if($>Y)throw TypeError("CronPattern: From value is larger than to value: '"+J+"'");if(X!==void 0){if(X===0)throw TypeError("CronPattern: Syntax error, illegal stepping: 0");if(X>this[G].length)throw TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[G].length+")")}}handleRangeWithStepping($,Y,X,G){if($.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in ranges with stepping.");let J=this.extractNth($,Y),Q=J[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(Q===null)throw TypeError("CronPattern: Syntax error, illegal range with stepping: '"+$+"'");let[,W,Z,K]=Q,H=parseInt(W,10)+X,z=parseInt(Z,10)+X,V=parseInt(K,10);this.validateNotNaN(H,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(z,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateNotNaN(V,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(H,z,V,Y,$);for(let A=H;A<=z;A+=V)this.setPart(Y,A,J[1]||G)}extractNth($,Y){let X=$,G;if(X.includes("#")){if(Y!=="dayOfWeek")throw Error("CronPattern: nth (#) only allowed in day-of-week field");G=X.split("#")[1],X=X.split("#")[0]}else if(X.toUpperCase().endsWith("L")){if(Y!=="dayOfWeek")throw Error("CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)");G="L",X=X.slice(0,-1)}return[X,G]}handleRange($,Y,X,G){if($.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in a range.");let J=this.extractNth($,Y),Q=J[0].split("-");if(Q.length!==2)throw TypeError("CronPattern: Syntax error, illegal range: '"+$+"'");let W=parseInt(Q[0],10)+X,Z=parseInt(Q[1],10)+X;this.validateNotNaN(W,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(Z,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateRange(W,Z,void 0,Y,$);for(let K=W;K<=Z;K++)this.setPart(Y,K,J[1]||G)}handleStepping($,Y,X,G){if($.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in parts with stepping.");let J=this.extractNth($,Y),Q=J[0].split("/");if(Q.length!==2)throw TypeError("CronPattern: Syntax error, illegal stepping: '"+$+"'");if(this.sloppyRanges)Q[0]===""&&(Q[0]="*");else{if(Q[0]==="")throw TypeError("CronPattern: Syntax error, stepping with missing prefix ('"+$+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.");if(Q[0]!=="*")throw TypeError("CronPattern: Syntax error, stepping with numeric prefix ('"+$+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.")}let W=0;Q[0]!=="*"&&(W=parseInt(Q[0],10)+X);let Z=parseInt(Q[1],10);this.validateNotNaN(Z,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(0,this[Y].length-1,Z,Y,$);for(let K=W;K<this[Y].length;K+=Z)this.setPart(Y,K,J[1]||G)}replaceAlphaDays($){return $.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaDaysQuartz($){return $.replace(/sun/gi,"1").replace(/mon/gi,"2").replace(/tue/gi,"3").replace(/wed/gi,"4").replace(/thu/gi,"5").replace(/fri/gi,"6").replace(/sat/gi,"7")}replaceAlphaMonths($){return $.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames($){let Y=$.trim().toLowerCase();if(Y==="@yearly"||Y==="@annually")return"0 0 1 1 *";if(Y==="@monthly")return"0 0 1 * *";if(Y==="@weekly")return"0 0 * * 0";if(Y==="@daily"||Y==="@midnight")return"0 0 * * *";if(Y==="@hourly")return"0 * * * *";if(Y==="@reboot")throw TypeError("CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.");return $}setNthWeekdayOfMonth($,Y){if(typeof Y!="number"&&Y.toUpperCase()==="L")this.dayOfWeek[$]=this.dayOfWeek[$]|32;else if(Y===63)this.dayOfWeek[$]=63;else if(Y<6&&Y>0)this.dayOfWeek[$]=this.dayOfWeek[$]|hs0[Y-1];else throw TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${Y}, Type: ${typeof Y}`)}},UQ0,r5,XX=class ${tz;ms;second;minute;hour;day;month;year;constructor(Y,X){if(this.tz=X,Y&&Y instanceof Date)if(!isNaN(Y))this.fromDate(Y);else throw TypeError("CronDate: Invalid date passed to CronDate constructor");else if(Y==null)this.fromDate(new Date);else if(Y&&typeof Y=="string")this.fromString(Y);else if(Y instanceof $)this.fromCronDate(Y);else throw TypeError("CronDate: Invalid type ("+typeof Y+") passed to CronDate constructor")}getLastDayOfMonth(Y,X){return X!==1?UQ0[X]:new Date(Date.UTC(Y,X+1,0)).getUTCDate()}getLastWeekday(Y,X){let G=this.getLastDayOfMonth(Y,X),J=new Date(Date.UTC(Y,X,G)).getUTCDay();return J===0?G-2:J===6?G-1:G}getNearestWeekday(Y,X,G){let J=this.getLastDayOfMonth(Y,X);if(G>J)return-1;let Q=new Date(Date.UTC(Y,X,G)).getUTCDay();return Q===0?G===J?G-2:G+1:Q===6?G===1?G+2:G-1:G}isNthWeekdayOfMonth(Y,X,G,J){let Q=new Date(Date.UTC(Y,X,G)).getUTCDay(),W=0;for(let Z=1;Z<=G;Z++)new Date(Date.UTC(Y,X,Z)).getUTCDay()===Q&&W++;if(J&63&&hs0[W-1]&J)return!0;if(J&32){let Z=this.getLastDayOfMonth(Y,X);for(let K=G+1;K<=Z;K++)if(new Date(Date.UTC(Y,X,K)).getUTCDay()===Q)return!1;return!0}return!1}fromDate(Y){if(this.tz!==void 0)if(typeof this.tz=="number")this.ms=Y.getUTCMilliseconds(),this.second=Y.getUTCSeconds(),this.minute=Y.getUTCMinutes()+this.tz,this.hour=Y.getUTCHours(),this.day=Y.getUTCDate(),this.month=Y.getUTCMonth(),this.year=Y.getUTCFullYear(),this.apply();else try{let X=LS(Y,this.tz);this.ms=Y.getMilliseconds(),this.second=X.s,this.minute=X.i,this.hour=X.h,this.day=X.d,this.month=X.m-1,this.year=X.y}catch(X){let G=X instanceof Error?X.message:String(X);throw TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${G}`)}else this.ms=Y.getMilliseconds(),this.second=Y.getSeconds(),this.minute=Y.getMinutes(),this.hour=Y.getHours(),this.day=Y.getDate(),this.month=Y.getMonth(),this.year=Y.getFullYear()}fromCronDate(Y){this.tz=Y.tz,this.year=Y.year,this.month=Y.month,this.day=Y.day,this.hour=Y.hour,this.minute=Y.minute,this.second=Y.second,this.ms=Y.ms}apply(){if(this.month>11||this.month<0||this.day>UQ0[this.month]||this.day<1||this.hour>59||this.minute>59||this.second>59||this.hour<0||this.minute<0||this.second<0){let Y=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=Y.getUTCMilliseconds(),this.second=Y.getUTCSeconds(),this.minute=Y.getUTCMinutes(),this.hour=Y.getUTCHours(),this.day=Y.getUTCDate(),this.month=Y.getUTCMonth(),this.year=Y.getUTCFullYear(),!0}else return!1}fromString(Y){if(typeof this.tz=="number"){let X=vs0(Y);this.ms=X.getUTCMilliseconds(),this.second=X.getUTCSeconds(),this.minute=X.getUTCMinutes(),this.hour=X.getUTCHours(),this.day=X.getUTCDate(),this.month=X.getUTCMonth(),this.year=X.getUTCFullYear(),this.apply()}else return this.fromDate(vs0(Y,this.tz))}findNext(Y,X,G,J){return this._findMatch(Y,X,G,J,1)}_findMatch(Y,X,G,J,Q){let W=this[X],Z;G.lastDayOfMonth&&(Z=this.getLastDayOfMonth(this.year,this.month));let K=!G.starDOW&&X=="day"?new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay():void 0,H=this[X]+J,z=Q===1?(V)=>V<G[X].length:(V)=>V>=0;for(let V=H;z(V);V+=Q){let A=G[X][V];if(X==="day"&&!A){for(let F=0;F<G.nearestWeekdays.length;F++)if(G.nearestWeekdays[F]){let N=this.getNearestWeekday(this.year,this.month,F-J);if(N===-1)continue;if(N===V-J){A=1;break}}}if(X==="day"&&G.lastWeekday){let F=this.getLastWeekday(this.year,this.month);V-J===F&&(A=1)}if(X==="day"&&G.lastDayOfMonth&&V-J==Z&&(A=1),X==="day"&&!G.starDOW){let F=G.dayOfWeek[(K+(V-J-1))%7];if(F&&F&63)F=this.isNthWeekdayOfMonth(this.year,this.month,V-J,F)?1:0;else if(F)throw Error(`CronDate: Invalid value for dayOfWeek encountered. ${F}`);G.useAndLogic?A=A&&F:!Y.domAndDow&&!G.starDOM?A=A||F:A=A&&F}if(A)return this[X]=V-J,W!==this[X]?2:1}return 3}recurse(Y,X,G){if(G===0&&!Y.starYear){if(this.year>=0&&this.year<Y.year.length&&Y.year[this.year]===0){let Q=-1;for(let W=this.year+1;W<Y.year.length&&W<1e4;W++)if(Y.year[W]===1){Q=W;break}if(Q===-1)return null;this.year=Q,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let J=this.findNext(X,r5[G][0],Y,r5[G][2]);if(J>1){let Q=G+1;for(;Q<r5.length;)this[r5[Q][0]]=-r5[Q][2],Q++;if(J===3){if(this[r5[G][1]]++,this[r5[G][0]]=-r5[G][2],this.apply(),G===0&&!Y.starYear){for(;this.year>=0&&this.year<Y.year.length&&Y.year[this.year]===0&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=Y.year.length)return null}return this.recurse(Y,X,0)}else if(this.apply())return this.recurse(Y,X,G-1)}return G+=1,G>=r5.length?this:(Y.starYear?this.year>=3000:this.year>=1e4)?null:this.recurse(Y,X,G)}increment(Y,X,G){return this.second+=X.interval!==void 0&&X.interval>1&&G?X.interval:1,this.ms=0,this.apply(),this.recurse(Y,X,0)}decrement(Y,X){return this.second-=X.interval!==void 0&&X.interval>1?X.interval:1,this.ms=0,this.apply(),this.recurseBackward(Y,X,0,0)}recurseBackward(Y,X,G,J=0){if(J>1e4)return null;if(G===0&&!Y.starYear){if(this.year>=0&&this.year<Y.year.length&&Y.year[this.year]===0){let W=-1;for(let Z=this.year-1;Z>=0;Z--)if(Y.year[Z]===1){W=Z;break}if(W===-1)return null;this.year=W,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let Q=this.findPrevious(X,r5[G][0],Y,r5[G][2]);if(Q>1){let W=G+1;for(;W<r5.length;){let Z=r5[W][0],K=r5[W][2],H=this.getMaxPatternValue(Z,Y,K);this[Z]=H,W++}if(Q===3){if(this[r5[G][1]]--,G===0){let z=this.getLastDayOfMonth(this.year,this.month);this.day>z&&(this.day=z)}if(G===1)if(this.day<=0)this.day=1;else{let z=this.year,V=this.month;for(;V<0;)V+=12,z--;for(;V>11;)V-=12,z++;let A=V!==1?UQ0[V]:new Date(Date.UTC(z,V+1,0)).getUTCDate();this.day>A&&(this.day=A)}this.apply();let Z=r5[G][0],K=r5[G][2],H=this.getMaxPatternValue(Z,Y,K);if(Z==="day"){let z=this.getLastDayOfMonth(this.year,this.month);this[Z]=Math.min(H,z)}else this[Z]=H;if(this.apply(),G===0){let z=r5[1][2],V=this.getMaxPatternValue("day",Y,z),A=this.getLastDayOfMonth(this.year,this.month),F=Math.min(V,A);F!==this.day&&(this.day=F,this.hour=this.getMaxPatternValue("hour",Y,r5[2][2]),this.minute=this.getMaxPatternValue("minute",Y,r5[3][2]),this.second=this.getMaxPatternValue("second",Y,r5[4][2]))}if(G===0&&!Y.starYear){for(;this.year>=0&&this.year<Y.year.length&&Y.year[this.year]===0;)this.year--;if(this.year<0)return null}return this.recurseBackward(Y,X,0,J+1)}else if(this.apply())return this.recurseBackward(Y,X,G-1,J+1)}return G+=1,G>=r5.length?this:this.year<0?null:this.recurseBackward(Y,X,G,J+1)}getMaxPatternValue(Y,X,G){if(Y==="day"&&X.lastDayOfMonth)return this.getLastDayOfMonth(this.year,this.month);if(Y==="day"&&!X.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let J=X[Y].length-1;J>=0;J--)if(X[Y][J])return J-G;return X[Y].length-1-G}findPrevious(Y,X,G,J){return this._findMatch(Y,X,G,J,-1)}getDate(Y){return Y||this.tz===void 0?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):typeof this.tz=="number"?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):bs0(HQ0(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(Y,X){if(!Y.starYear&&(this.year<0||this.year>=Y.year.length||Y.year[this.year]===0))return!1;for(let G=0;G<r5.length;G++){let J=r5[G][0],Q=r5[G][2],W=this[J];if(W+Q<0||W+Q>=Y[J].length)return!1;let Z=Y[J][W+Q];if(J==="day"){if(!Z){for(let K=0;K<Y.nearestWeekdays.length;K++)if(Y.nearestWeekdays[K]){let H=this.getNearestWeekday(this.year,this.month,K-Q);if(H!==-1&&H===W){Z=1;break}}}if(Y.lastWeekday){let K=this.getLastWeekday(this.year,this.month);W===K&&(Z=1)}if(Y.lastDayOfMonth){let K=this.getLastDayOfMonth(this.year,this.month);W===K&&(Z=1)}if(!Y.starDOW){let K=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),H=Y.dayOfWeek[(K+(W-1))%7];H&&H&63&&(H=this.isNthWeekdayOfMonth(this.year,this.month,W,H)?1:0),Y.useAndLogic?Z=Z&&H:!X.domAndDow&&!Y.starDOM?Z=Z||H:Z=Z&&H}}if(!Z)return!1}return!0}},ys0=30000,lc,OS=class{name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset($){if(this.options.dayOffset!==void 0&&this.options.dayOffset!==0){let Y=this.options.dayOffset*24*60*60*1000;return new Date($.getTime()+Y)}return $}constructor($,Y,X){let G,J;if(BS(Y))J=Y;else if(typeof Y=="object")G=Y;else if(Y!==void 0)throw Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(BS(X))J=X;else if(typeof X=="object")G=X;else if(X!==void 0)throw Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=G?.name,this.options=_f4(G),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:G?G.maxRuns:void 0,paused:G?G.paused:!1,pattern:new xs0("* * * * *",void 0,{mode:"auto"})},$&&($ instanceof Date||typeof $=="string"&&$.indexOf(":")>0)?this._states.once=new XX($,this.getTz()):this._states.pattern=new xs0($,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(lc.find((Q)=>Q.name===this.name))throw Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");lc.push(this)}return J!==void 0&&jf4(J)&&(this.fn=J,this.schedule()),this}nextRun($){let Y=this._next($);return Y?this.applyDayOffset(Y.getDate(!1)):null}nextRuns($,Y){this._states.maxRuns!==void 0&&$>this._states.maxRuns&&($=this._states.maxRuns);let X=Y||this._states.currentRun||void 0;return this._enumerateRuns($,X,"next")}previousRuns($,Y){return this._enumerateRuns($,Y||void 0,"previous")}_enumerateRuns($,Y,X){let G=[],J=Y?new XX(Y,this.getTz()):null,Q=X==="next"?this._next:this._previous;for(;$--;){let W=Q.call(this,J);if(!W)break;let Z=W.getDate(!1);G.push(this.applyDayOffset(Z)),J=W}return G}match($){if(this._states.once){let X=new XX($,this.getTz());X.ms=0;let G=new XX(this._states.once,this.getTz());return G.ms=0,X.getTime()===G.getTime()}let Y=new XX($,this.getTz());return Y.ms=0,Y.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let $=this.nextRun(this._states.currentRun),Y=!this._states.paused,X=this.fn!==void 0,G=!this._states.kill;return Y&&X&&G&&$!==null}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext($){let Y=this._next($);return Y?$ instanceof XX||$ instanceof Date?Y.getTime()-$.getTime():Y.getTime()-new XX($).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let $=lc.indexOf(this);$>=0&&lc.splice($,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule($){if($&&this.fn)throw Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");$&&(this.fn=$);let Y=this.msToNext(),X=this.nextRun(this._states.currentRun);return Y==null||isNaN(Y)||X===null?this:(Y>ys0&&(Y=ys0),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(X),Y),this._states.currentTimeout&&this.options.unref&&Tf4(this._states.currentTimeout),this)}async _trigger($){this._states.blocking=!0,this._states.currentRun=new XX(void 0,this.getTz());try{if(this.options.catch)try{this.fn!==void 0&&await this.fn(this,this.options.context)}catch(Y){if(BS(this.options.catch))try{this.options.catch(Y,this)}catch{}}else this.fn!==void 0&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new XX($,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger($){let Y=new Date,X=!this._states.paused&&Y.getTime()>=$.getTime(),G=this._states.blocking&&this.options.protect;X&&!G?(this._states.maxRuns!==void 0&&this._states.maxRuns--,this._trigger()):X&&G&&BS(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next($){let Y=!!($||this._states.currentRun),X=!1;!$&&this.options.startAt&&this.options.interval&&([$,Y]=this._calculatePreviousRun($,Y),X=!$),$=new XX($,this.getTz()),this.options.startAt&&$&&$.getTime()<this.options.startAt.getTime()&&($=this.options.startAt);let G=this._states.once||new XX($,this.getTz());return!X&&G!==this._states.once&&(G=G.increment(this._states.pattern,this.options,Y)),this._states.once&&this._states.once.getTime()<=$.getTime()||G===null||this._states.maxRuns!==void 0&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&G.getTime()>=this.options.stopAt.getTime()?null:G}_previous($){let Y=new XX($,this.getTz());this.options.stopAt&&Y.getTime()>this.options.stopAt.getTime()&&(Y=this.options.stopAt);let X=new XX(Y,this.getTz());return this._states.once?this._states.once.getTime()<Y.getTime()?this._states.once:null:(X=X.decrement(this._states.pattern,this.options),X===null||this.options.startAt&&X.getTime()<this.options.startAt.getTime()?null:X)}_calculatePreviousRun($,Y){let X=new XX(void 0,this.getTz()),G=$;if(this.options.startAt.getTime()<=X.getTime()){G=this.options.startAt;let J=G.getTime()+this.options.interval*1000;for(;J<=X.getTime();)G=new XX(G,this.getTz()).increment(this._states.pattern,this.options,!0),J=G.getTime()+this.options.interval*1000;Y=!0}return G===null&&(G=void 0),[G,Y]}};var zQ0=V0(()=>{hs0=[1,2,4,8,16],UQ0=[31,28,31,30,31,30,31,31,30,31,30,31],r5=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]];lc=[]});var hN=o((kr9,uW0)=>{var mW0=(()=>{var{defineProperty:$,getOwnPropertyDescriptor:Y,getOwnPropertyNames:X,getOwnPropertySymbols:G}=Object,J=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,W=(O,E,M)=>(E in O)?$(O,E,{enumerable:!0,configurable:!0,writable:!0,value:M}):O[E]=M,Z=(O,E)=>{for(var M in E||(E={}))if(J.call(E,M))W(O,M,E[M]);if(G){for(var M of G(E))if(Q.call(E,M))W(O,M,E[M])}return O},K=(O,E)=>{for(var M in E)$(O,M,{get:E[M],enumerable:!0})},H=(O,E,M,R)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let q of X(E))if(!J.call(O,q)&&q!==M)$(O,q,{get:()=>E[q],enumerable:!(R=Y(E,q))||R.enumerable})}return O},z=(O)=>H($({},"__esModule",{value:!0}),O),V=(O,E,M)=>W(O,typeof E!=="symbol"?E+"":E,M),A={};K(A,{DEFAULT_OPTIONS:()=>D,DEFAULT_UUID_LENGTH:()=>N,default:()=>B});var F="5.3.2",N=6,D={dictionary:"alphanum",shuffle:!0,debug:!1,length:N,counter:0},L=class{constructor(E={}){V(this,"counter"),V(this,"debug"),V(this,"dict"),V(this,"version"),V(this,"dictIndex",0),V(this,"dictRange",[]),V(this,"lowerBound",0),V(this,"upperBound",0),V(this,"dictLength",0),V(this,"uuidLength"),V(this,"_digit_first_ascii",48),V(this,"_digit_last_ascii",58),V(this,"_alpha_lower_first_ascii",97),V(this,"_alpha_lower_last_ascii",123),V(this,"_hex_last_ascii",103),V(this,"_alpha_upper_first_ascii",65),V(this,"_alpha_upper_last_ascii",91),V(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),V(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),V(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),V(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),V(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),V(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),V(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),V(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),V(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),V(this,"log",(...P)=>{let _=[...P];if(_[0]="[short-unique-id] ".concat(P[0]),this.debug===!0){if(typeof console<"u"&&console!==null){console.log(..._);return}}}),V(this,"_normalizeDictionary",(P,_)=>{let C;if(P&&Array.isArray(P)&&P.length>1)C=P;else{C=[],this.dictIndex=0;let k="_".concat(P,"_dict_ranges"),S=this._dict_ranges[k],T=0;for(let[,x]of Object.entries(S)){let[y,d]=x;T+=Math.abs(d-y)}C=Array(T);let v=0;for(let[,x]of Object.entries(S)){this.dictRange=x,this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1];let y=this.lowerBound<=this.upperBound,d=this.lowerBound,u=this.upperBound;if(y)for(let b=d;b<u;b++)C[v++]=String.fromCharCode(b),this.dictIndex=b;else for(let b=d;b>u;b--)C[v++]=String.fromCharCode(b),this.dictIndex=b}C.length=v}if(_){let k=C.length;for(let S=k-1;S>0;S--){let T=Math.floor(Math.random()*(S+1));[C[S],C[T]]=[C[T],C[S]]}}return C}),V(this,"setDictionary",(P,_)=>{this.dict=this._normalizeDictionary(P,_),this.dictLength=this.dict.length,this.setCounter(0)}),V(this,"seq",()=>{return this.sequentialUUID()}),V(this,"sequentialUUID",()=>{let P=this.dictLength,_=this.dict,C=this.counter,k=[];do{let T=C%P;C=Math.trunc(C/P),k.push(_[T])}while(C!==0);let S=k.join("");return this.counter+=1,S}),V(this,"rnd",(P=this.uuidLength||N)=>{return this.randomUUID(P)}),V(this,"randomUUID",(P=this.uuidLength||N)=>{if(P===null||typeof P>"u"||P<1)throw Error("Invalid UUID Length Provided");let _=Array(P),C=this.dictLength,k=this.dict;for(let S=0;S<P;S++){let T=Math.floor(Math.random()*C);_[S]=k[T]}return _.join("")}),V(this,"fmt",(P,_)=>{return this.formattedUUID(P,_)}),V(this,"formattedUUID",(P,_)=>{let C={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return P.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(S)=>{let T=S.slice(0,2),v=Number.parseInt(S.slice(2),10);if(T==="$s")return C[T]().padStart(v,"0");if(T==="$t"&&_)return C[T](v,_);return C[T](v)})}),V(this,"availableUUIDs",(P=this.uuidLength)=>{return Number.parseFloat(([...new Set(this.dict)].length**P).toFixed(0))}),V(this,"_collisionCache",new Map),V(this,"approxMaxBeforeCollision",(P=this.availableUUIDs(this.uuidLength))=>{let _=P,C=this._collisionCache.get(_);if(C!==void 0)return C;let k=Number.parseFloat(Math.sqrt(Math.PI/2*P).toFixed(20));return this._collisionCache.set(_,k),k}),V(this,"collisionProbability",(P=this.availableUUIDs(this.uuidLength),_=this.uuidLength)=>{return Number.parseFloat((this.approxMaxBeforeCollision(P)/this.availableUUIDs(_)).toFixed(20))}),V(this,"uniqueness",(P=this.availableUUIDs(this.uuidLength))=>{let _=Number.parseFloat((1-this.approxMaxBeforeCollision(P)/P).toFixed(20));return _>1?1:_<0?0:_}),V(this,"getVersion",()=>{return this.version}),V(this,"stamp",(P,_)=>{let C=Math.floor(+(_||new Date)/1000).toString(16);if(typeof P==="number"&&P===0)return C;if(typeof P!=="number"||P<10)throw Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join(`
`));let k=P-9,S=Math.round(Math.random()*(k>15?15:k)),T=this.randomUUID(k);return"".concat(T.substring(0,S)).concat(C).concat(T.substring(S)).concat(S.toString(16))}),V(this,"parseStamp",(P,_)=>{if(_&&!/t0|t[1-9]\d{1,}/.test(_))throw Error("Cannot extract date from a formated UUID with no timestamp in the format");let C=_?_.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(S)=>{let T={$r:(y)=>[...Array(y)].map(()=>"r").join(""),$s:(y)=>[...Array(y)].map(()=>"s").join(""),$t:(y)=>[...Array(y)].map(()=>"t").join("")},v=S.slice(0,2),x=Number.parseInt(S.slice(2),10);return T[v](x)}).replace(/^(.*?)(t{8,})(.*)$/g,(S,T,v)=>{return P.substring(T.length,T.length+v.length)}):P;if(C.length===8)return new Date(Number.parseInt(C,16)*1000);if(C.length<10)throw Error("Stamp length invalid");let k=Number.parseInt(C.substring(C.length-1),16);return new Date(Number.parseInt(C.substring(k,k+8),16)*1000)}),V(this,"setCounter",(P)=>{this.counter=P}),V(this,"validate",(P,_)=>{let C=_?this._normalizeDictionary(_):this.dict;return P.split("").every((k)=>C.includes(k))});let M=Z(Z({},D),E);this.counter=0,this.debug=!1,this.dict=[],this.version=F;let{dictionary:R,shuffle:q,length:w,counter:I}=M;this.uuidLength=w,this.setDictionary(R,q),this.setCounter(I),this.debug=M.debug,this.log(this.dict),this.log("Generator instantiated with Dictionary Size ".concat(this.dictLength," and counter set to ").concat(this.counter)),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this)}};V(L,"default",L);var B=L;return z(A)})();typeof uW0<"u"&&(uW0.exports=mW0.default),typeof window<"u"&&(mW0=mW0.default)});var fJ=o((d45,k61)=>{class IZ0 extends Error{constructor($){super(`Format functions must be synchronous taking a two arguments: (info, opts)
Found: ${$.toString().split(`
`)[0]}
`);Error.captureStackTrace(this,IZ0)}}k61.exports=($)=>{if($.length>2)throw new IZ0($);function Y(G={}){this.options=G}Y.prototype.transform=$;function X(G){return new Y(G)}return X.Format=Y,X}});var b61=o((c45,y61)=>{var x61={};y61.exports=x61;var v61={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(v61).forEach(function($){var Y=v61[$],X=x61[$]=[];X.open="\x1B["+Y[0]+"m",X.close="\x1B["+Y[1]+"m"})});var f61=o((l45,h61)=>{h61.exports=function($,Y){Y=Y||process.argv||[];var X=Y.indexOf("--"),G=/^-{1,2}/.test($)?"":"--",J=Y.indexOf(G+$);return J!==-1&&(X===-1?!0:J<X)}});var m61=o((i45,g61)=>{var Ku4=L0("os"),C2=f61(),EG=process.env,gR=void 0;if(C2("no-color")||C2("no-colors")||C2("color=false"))gR=!1;else if(C2("color")||C2("colors")||C2("color=true")||C2("color=always"))gR=!0;if("FORCE_COLOR"in EG)gR=EG.FORCE_COLOR.length===0||parseInt(EG.FORCE_COLOR,10)!==0;function Uu4($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function Hu4($){if(gR===!1)return 0;if(C2("color=16m")||C2("color=full")||C2("color=truecolor"))return 3;if(C2("color=256"))return 2;if($&&!$.isTTY&&gR!==!0)return 0;var Y=gR?1:0;if(process.platform==="win32"){var X=Ku4.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(X[0])>=10&&Number(X[2])>=10586)return Number(X[2])>=14931?3:2;return 1}if("CI"in EG){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(J){return J in EG})||EG.CI_NAME==="codeship")return 1;return Y}if("TEAMCITY_VERSION"in EG)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(EG.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in EG){var G=parseInt((EG.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(EG.TERM_PROGRAM){case"iTerm.app":return G>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(EG.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(EG.TERM))return 1;if("COLORTERM"in EG)return 1;if(EG.TERM==="dumb")return Y;return Y}function PZ0($){var Y=Hu4($);return Uu4(Y)}g61.exports={supportsColor:PZ0,stdout:PZ0(process.stdout),stderr:PZ0(process.stderr)}});var p61=o((n45,u61)=>{u61.exports=function(Y,X){var G="";Y=Y||"Run the trap, drop the bass",Y=Y.split("");var J={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return Y.forEach(function(Q){Q=Q.toLowerCase();var W=J[Q]||[" "],Z=Math.floor(Math.random()*W.length);if(typeof J[Q]<"u")G+=J[Q][Z];else G+=Q}),G}});var c61=o((r45,d61)=>{d61.exports=function(Y,X){Y=Y||"   he is here   ";var G={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},J=[].concat(G.up,G.down,G.mid);function Q(K){var H=Math.floor(Math.random()*K);return H}function W(K){var H=!1;return J.filter(function(z){H=z===K}),H}function Z(K,H){var z="",V,A;H=H||{},H.up=typeof H.up<"u"?H.up:!0,H.mid=typeof H.mid<"u"?H.mid:!0,H.down=typeof H.down<"u"?H.down:!0,H.size=typeof H.size<"u"?H.size:"maxi",K=K.split("");for(A in K){if(W(A))continue;switch(z=z+K[A],V={up:0,down:0,mid:0},H.size){case"mini":V.up=Q(8),V.mid=Q(2),V.down=Q(8);break;case"maxi":V.up=Q(16)+3,V.mid=Q(4)+1,V.down=Q(64)+3;break;default:V.up=Q(8)+1,V.mid=Q(6)/2,V.down=Q(8)+1;break}var F=["up","mid","down"];for(var N in F){var D=F[N];for(var L=0;L<=V[D];L++)if(H[D])z=z+G[D][Q(G[D].length)]}}return z}return Z(Y,X)}});var i61=o((a45,l61)=>{l61.exports=function($){return function(Y,X,G){if(Y===" ")return Y;switch(X%3){case 0:return $.red(Y);case 1:return $.white(Y);case 2:return $.blue(Y)}}}});var r61=o((s45,n61)=>{n61.exports=function($){return function(Y,X,G){return X%2===0?Y:$.inverse(Y)}}});var s61=o((o45,a61)=>{a61.exports=function($){var Y=["red","yellow","green","blue","magenta"];return function(X,G,J){if(X===" ")return X;else return $[Y[G++%Y.length]](X)}}});var t61=o((t45,o61)=>{o61.exports=function($){var Y=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(X,G,J){return X===" "?X:$[Y[Math.round(Math.random()*(Y.length-2))]](X)}}});var G81=o(($65,X81)=>{var Z8={};X81.exports=Z8;Z8.themes={};var zu4=L0("util"),eN=Z8.styles=b61(),e61=Object.defineProperties,Vu4=new RegExp(/[\r\n]+/g);Z8.supportsColor=m61().supportsColor;if(typeof Z8.enabled>"u")Z8.enabled=Z8.supportsColor()!==!1;Z8.enable=function(){Z8.enabled=!0};Z8.disable=function(){Z8.enabled=!1};Z8.stripColors=Z8.strip=function($){return(""+$).replace(/\x1B\[\d+m/g,"")};var e45=Z8.stylize=function(Y,X){if(!Z8.enabled)return Y+"";var G=eN[X];if(!G&&X in Z8)return Z8[X](Y);return G.open+Y+G.close},Au4=/[|\\{}()[\]^$+*?.]/g,Fu4=function($){if(typeof $!=="string")throw TypeError("Expected a string");return $.replace(Au4,"\\$&")};function $81($){var Y=function X(){return Nu4.apply(X,arguments)};return Y._styles=$,Y.__proto__=Du4,Y}var Y81=function(){var $={};return eN.grey=eN.gray,Object.keys(eN).forEach(function(Y){eN[Y].closeRe=new RegExp(Fu4(eN[Y].close),"g"),$[Y]={get:function(){return $81(this._styles.concat(Y))}}}),$}(),Du4=e61(function(){},Y81);function Nu4(){var $=Array.prototype.slice.call(arguments),Y=$.map(function(W){if(W!=null&&W.constructor===String)return W;else return zu4.inspect(W)}).join(" ");if(!Z8.enabled||!Y)return Y;var X=Y.indexOf(`
`)!=-1,G=this._styles,J=G.length;while(J--){var Q=eN[G[J]];if(Y=Q.open+Y.replace(Q.closeRe,Q.open)+Q.close,X)Y=Y.replace(Vu4,function(W){return Q.close+W+Q.open})}return Y}Z8.setTheme=function($){if(typeof $==="string"){console.log("colors.setTheme now only accepts an object, not a string.  If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file.  The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var Y in $)(function(X){Z8[X]=function(G){if(typeof $[X]==="object"){var J=G;for(var Q in $[X])J=Z8[$[X][Q]](J);return J}return Z8[$[X]](G)}})(Y)};function Lu4(){var $={};return Object.keys(Y81).forEach(function(Y){$[Y]={get:function(){return $81([Y])}}}),$}var Bu4=function(Y,X){var G=X.split("");return G=G.map(Y),G.join("")};Z8.trap=p61();Z8.zalgo=c61();Z8.maps={};Z8.maps.america=i61()(Z8);Z8.maps.zebra=r61()(Z8);Z8.maps.rainbow=s61()(Z8);Z8.maps.random=t61()(Z8);for(wZ0 in Z8.maps)(function($){Z8[$]=function(Y){return Bu4(Z8.maps[$],Y)}})(wZ0);var wZ0;e61(Z8,Lu4())});var _Z0=o((Y65,J81)=>{var Ou4=G81();J81.exports=Ou4});var Q81=o((Eu4)=>{Eu4.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};Eu4.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var W81=o((qu4)=>{qu4.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};qu4.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var Z81=o((wu4)=>{wu4.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};wu4.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var K81=o((tl)=>{Object.defineProperty(tl,"cli",{value:Q81()});Object.defineProperty(tl,"npm",{value:W81()});Object.defineProperty(tl,"syslog",{value:Z81()})});var F$=o((Qk)=>{Object.defineProperty(Qk,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Qk,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Qk,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Qk,"configs",{value:K81()})});var $i=o((Z65,el)=>{var CZ0=_Z0(),{LEVEL:jZ0,MESSAGE:TZ0}=F$();CZ0.enabled=!0;var U81=/\s+/;class S2{constructor($={}){if($.colors)this.addColors($.colors);this.options=$}static addColors($){let Y=Object.keys($).reduce((X,G)=>{return X[G]=U81.test($[G])?$[G].split(U81):$[G],X},{});return S2.allColors=Object.assign({},S2.allColors||{},Y),S2.allColors}addColors($){return S2.addColors($)}colorize($,Y,X){if(typeof X>"u")X=Y;if(!Array.isArray(S2.allColors[$]))return CZ0[S2.allColors[$]](X);for(let G=0,J=S2.allColors[$].length;G<J;G++)X=CZ0[S2.allColors[$][G]](X);return X}transform($,Y){if(Y.all&&typeof $[TZ0]==="string")$[TZ0]=this.colorize($[jZ0],$.level,$[TZ0]);if(Y.level||Y.all||!Y.message)$.level=this.colorize($[jZ0],$.level);if(Y.all||Y.message)$.message=this.colorize($[jZ0],$.level,$.message);return $}}el.exports=($)=>new S2($);el.exports.Colorizer=el.exports.Format=S2});var z81=o((K65,H81)=>{var{Colorizer:Tu4}=$i();H81.exports=($)=>{return Tu4.addColors($.colors||$),$}});var A81=o((U65,V81)=>{var Cu4=fJ();V81.exports=Cu4(($)=>{return $.message=`	${$.message}`,$})});var N81=o((H65,D81)=>{var Su4=fJ(),{LEVEL:F81,MESSAGE:SZ0}=F$();D81.exports=Su4(($,{stack:Y,cause:X})=>{if($ instanceof Error){let J=Object.assign({},$,{level:$.level,[F81]:$[F81]||$.level,message:$.message,[SZ0]:$[SZ0]||$.message});if(Y)J.stack=$.stack;if(X)J.cause=$.cause;return J}if(!($.message instanceof Error))return $;let G=$.message;if(Object.assign($,G),$.message=G.message,$[SZ0]=G.message,Y)$.stack=G.stack;if(X)$.cause=G.cause;return $})});var vZ0=o((z65,Yi)=>{var{configs:ku4,LEVEL:L81,MESSAGE:kZ0}=F$();class mR{constructor($={levels:ku4.npm.levels}){this.paddings=mR.paddingForLevels($.levels,$.filler),this.options=$}static getLongestLevel($){let Y=Object.keys($).map((X)=>X.length);return Math.max(...Y)}static paddingForLevel($,Y,X){let G=X+1-$.length,J=Math.floor(G/Y.length);return`${Y}${Y.repeat(J)}`.slice(0,G)}static paddingForLevels($,Y=" "){let X=mR.getLongestLevel($);return Object.keys($).reduce((G,J)=>{return G[J]=mR.paddingForLevel(J,Y,X),G},{})}transform($,Y){if($.message=`${this.paddings[$[L81]]}${$.message}`,$[kZ0])$[kZ0]=`${this.paddings[$[L81]]}${$[kZ0]}`;return $}}Yi.exports=($)=>new mR($);Yi.exports.Padder=Yi.exports.Format=mR});var B81=o((V65,yZ0)=>{var{Colorizer:vu4}=$i(),{Padder:xu4}=vZ0(),{configs:yu4,MESSAGE:bu4}=F$();class xZ0{constructor($={}){if(!$.levels)$.levels=yu4.cli.levels;this.colorizer=new vu4($),this.padder=new xu4($),this.options=$}transform($,Y){return this.colorizer.transform(this.padder.transform($,Y),Y),$[bu4]=`${$.level}:${$.message}`,$}}yZ0.exports=($)=>new xZ0($);yZ0.exports.Format=xZ0});var E81=o((A65,bZ0)=>{var hu4=fJ();function O81($){if(!$.every(fu4))return;return(Y)=>{let X=Y;for(let G=0;G<$.length;G++)if(X=$[G].transform(X,$[G].options),!X)return!1;return X}}function fu4($){if(typeof $.transform!=="function")throw Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
`));return!0}bZ0.exports=(...$)=>{let Y=hu4(O81($)),X=Y();return X.Format=Y.Format,X};bZ0.exports.cascade=O81});var Zk=o((F65,q81)=>{var{hasOwnProperty:Wk}=Object.prototype,YL=gZ0();YL.configure=gZ0;YL.stringify=YL;YL.default=YL;F65.stringify=YL;F65.configure=gZ0;q81.exports=YL;var gu4=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function XA($){if($.length<5000&&!gu4.test($))return`"${$}"`;return JSON.stringify($)}function hZ0($,Y){if($.length>200||Y)return $.sort(Y);for(let X=1;X<$.length;X++){let G=$[X],J=X;while(J!==0&&$[J-1]>G)$[J]=$[J-1],J--;$[J]=G}return $}var mu4=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function fZ0($){return mu4.call($)!==void 0&&$.length!==0}function M81($,Y,X){if($.length<X)X=$.length;let G=Y===","?"":" ",J=`"0":${G}${$[0]}`;for(let Q=1;Q<X;Q++)J+=`${Y}"${Q}":${G}${$[Q]}`;return J}function uu4($){if(Wk.call($,"circularValue")){let Y=$.circularValue;if(typeof Y==="string")return`"${Y}"`;if(Y==null)return Y;if(Y===Error||Y===TypeError)return{toString(){throw TypeError("Converting circular structure to JSON")}};throw TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function pu4($){let Y;if(Wk.call($,"deterministic")){if(Y=$.deterministic,typeof Y!=="boolean"&&typeof Y!=="function")throw TypeError('The "deterministic" argument must be of type boolean or comparator function')}return Y===void 0?!0:Y}function du4($,Y){let X;if(Wk.call($,Y)){if(X=$[Y],typeof X!=="boolean")throw TypeError(`The "${Y}" argument must be of type boolean`)}return X===void 0?!0:X}function R81($,Y){let X;if(Wk.call($,Y)){if(X=$[Y],typeof X!=="number")throw TypeError(`The "${Y}" argument must be of type number`);if(!Number.isInteger(X))throw TypeError(`The "${Y}" argument must be an integer`);if(X<1)throw RangeError(`The "${Y}" argument must be >= 1`)}return X===void 0?1/0:X}function $L($){if($===1)return"1 item";return`${$} items`}function cu4($){let Y=new Set;for(let X of $)if(typeof X==="string"||typeof X==="number")Y.add(String(X));return Y}function lu4($){if(Wk.call($,"strict")){let Y=$.strict;if(typeof Y!=="boolean")throw TypeError('The "strict" argument must be of type boolean');if(Y)return(X)=>{let G=`Object can not safely be stringified. Received type ${typeof X}`;if(typeof X!=="function")G+=` (${X.toString()})`;throw Error(G)}}}function gZ0($){$={...$};let Y=lu4($);if(Y){if($.bigint===void 0)$.bigint=!1;if(!("circularValue"in $))$.circularValue=Error}let X=uu4($),G=du4($,"bigint"),J=pu4($),Q=typeof J==="function"?J:void 0,W=R81($,"maximumDepth"),Z=R81($,"maximumBreadth");function K(F,N,D,L,B,O){let E=N[F];if(typeof E==="object"&&E!==null&&typeof E.toJSON==="function")E=E.toJSON(F);switch(E=L.call(N,F,E),typeof E){case"string":return XA(E);case"object":{if(E===null)return"null";if(D.indexOf(E)!==-1)return X;let M="",R=",",q=O;if(Array.isArray(E)){if(E.length===0)return"[]";if(W<D.length+1)return'"[Array]"';if(D.push(E),B!=="")O+=B,M+=`
${O}`,R=`,
${O}`;let k=Math.min(E.length,Z),S=0;for(;S<k-1;S++){let v=K(String(S),E,D,L,B,O);M+=v!==void 0?v:"null",M+=R}let T=K(String(S),E,D,L,B,O);if(M+=T!==void 0?T:"null",E.length-1>Z){let v=E.length-Z-1;M+=`${R}"... ${$L(v)} not stringified"`}if(B!=="")M+=`
${q}`;return D.pop(),`[${M}]`}let w=Object.keys(E),I=w.length;if(I===0)return"{}";if(W<D.length+1)return'"[Object]"';let P="",_="";if(B!=="")O+=B,R=`,
${O}`,P=" ";let C=Math.min(I,Z);if(J&&!fZ0(E))w=hZ0(w,Q);D.push(E);for(let k=0;k<C;k++){let S=w[k],T=K(S,E,D,L,B,O);if(T!==void 0)M+=`${_}${XA(S)}:${P}${T}`,_=R}if(I>Z){let k=I-Z;M+=`${_}"...":${P}"${$L(k)} not stringified"`,_=R}if(B!==""&&_.length>1)M=`
${O}${M}
${q}`;return D.pop(),`{${M}}`}case"number":return isFinite(E)?String(E):Y?Y(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(G)return String(E);default:return Y?Y(E):void 0}}function H(F,N,D,L,B,O){if(typeof N==="object"&&N!==null&&typeof N.toJSON==="function")N=N.toJSON(F);switch(typeof N){case"string":return XA(N);case"object":{if(N===null)return"null";if(D.indexOf(N)!==-1)return X;let E=O,M="",R=",";if(Array.isArray(N)){if(N.length===0)return"[]";if(W<D.length+1)return'"[Array]"';if(D.push(N),B!=="")O+=B,M+=`
${O}`,R=`,
${O}`;let I=Math.min(N.length,Z),P=0;for(;P<I-1;P++){let C=H(String(P),N[P],D,L,B,O);M+=C!==void 0?C:"null",M+=R}let _=H(String(P),N[P],D,L,B,O);if(M+=_!==void 0?_:"null",N.length-1>Z){let C=N.length-Z-1;M+=`${R}"... ${$L(C)} not stringified"`}if(B!=="")M+=`
${E}`;return D.pop(),`[${M}]`}D.push(N);let q="";if(B!=="")O+=B,R=`,
${O}`,q=" ";let w="";for(let I of L){let P=H(I,N[I],D,L,B,O);if(P!==void 0)M+=`${w}${XA(I)}:${q}${P}`,w=R}if(B!==""&&w.length>1)M=`
${O}${M}
${E}`;return D.pop(),`{${M}}`}case"number":return isFinite(N)?String(N):Y?Y(N):"null";case"boolean":return N===!0?"true":"false";case"undefined":return;case"bigint":if(G)return String(N);default:return Y?Y(N):void 0}}function z(F,N,D,L,B){switch(typeof N){case"string":return XA(N);case"object":{if(N===null)return"null";if(typeof N.toJSON==="function"){if(N=N.toJSON(F),typeof N!=="object")return z(F,N,D,L,B);if(N===null)return"null"}if(D.indexOf(N)!==-1)return X;let O=B;if(Array.isArray(N)){if(N.length===0)return"[]";if(W<D.length+1)return'"[Array]"';D.push(N),B+=L;let P=`
${B}`,_=`,
${B}`,C=Math.min(N.length,Z),k=0;for(;k<C-1;k++){let T=z(String(k),N[k],D,L,B);P+=T!==void 0?T:"null",P+=_}let S=z(String(k),N[k],D,L,B);if(P+=S!==void 0?S:"null",N.length-1>Z){let T=N.length-Z-1;P+=`${_}"... ${$L(T)} not stringified"`}return P+=`
${O}`,D.pop(),`[${P}]`}let E=Object.keys(N),M=E.length;if(M===0)return"{}";if(W<D.length+1)return'"[Object]"';B+=L;let R=`,
${B}`,q="",w="",I=Math.min(M,Z);if(fZ0(N))q+=M81(N,R,Z),E=E.slice(N.length),I-=N.length,w=R;if(J)E=hZ0(E,Q);D.push(N);for(let P=0;P<I;P++){let _=E[P],C=z(_,N[_],D,L,B);if(C!==void 0)q+=`${w}${XA(_)}: ${C}`,w=R}if(M>Z){let P=M-Z;q+=`${w}"...": "${$L(P)} not stringified"`,w=R}if(w!=="")q=`
${B}${q}
${O}`;return D.pop(),`{${q}}`}case"number":return isFinite(N)?String(N):Y?Y(N):"null";case"boolean":return N===!0?"true":"false";case"undefined":return;case"bigint":if(G)return String(N);default:return Y?Y(N):void 0}}function V(F,N,D){switch(typeof N){case"string":return XA(N);case"object":{if(N===null)return"null";if(typeof N.toJSON==="function"){if(N=N.toJSON(F),typeof N!=="object")return V(F,N,D);if(N===null)return"null"}if(D.indexOf(N)!==-1)return X;let L="",B=N.length!==void 0;if(B&&Array.isArray(N)){if(N.length===0)return"[]";if(W<D.length+1)return'"[Array]"';D.push(N);let q=Math.min(N.length,Z),w=0;for(;w<q-1;w++){let P=V(String(w),N[w],D);L+=P!==void 0?P:"null",L+=","}let I=V(String(w),N[w],D);if(L+=I!==void 0?I:"null",N.length-1>Z){let P=N.length-Z-1;L+=`,"... ${$L(P)} not stringified"`}return D.pop(),`[${L}]`}let O=Object.keys(N),E=O.length;if(E===0)return"{}";if(W<D.length+1)return'"[Object]"';let M="",R=Math.min(E,Z);if(B&&fZ0(N))L+=M81(N,",",Z),O=O.slice(N.length),R-=N.length,M=",";if(J)O=hZ0(O,Q);D.push(N);for(let q=0;q<R;q++){let w=O[q],I=V(w,N[w],D);if(I!==void 0)L+=`${M}${XA(w)}:${I}`,M=","}if(E>Z){let q=E-Z;L+=`${M}"...":"${$L(q)} not stringified"`}return D.pop(),`{${L}}`}case"number":return isFinite(N)?String(N):Y?Y(N):"null";case"boolean":return N===!0?"true":"false";case"undefined":return;case"bigint":if(G)return String(N);default:return Y?Y(N):void 0}}function A(F,N,D){if(arguments.length>1){let L="";if(typeof D==="number")L=" ".repeat(Math.min(D,10));else if(typeof D==="string")L=D.slice(0,10);if(N!=null){if(typeof N==="function")return K("",{"":F},[],N,L,"");if(Array.isArray(N))return H("",F,[],cu4(N),L,"")}if(L.length!==0)return z("",F,[],L,"")}return V("",F,[])}return A}});var mZ0=o((D65,I81)=>{var ru4=fJ(),{MESSAGE:au4}=F$(),su4=Zk();function ou4($,Y){if(typeof Y==="bigint")return Y.toString();return Y}I81.exports=ru4(($,Y)=>{let X=su4.configure(Y);return $[au4]=X($,Y.replacer||ou4,Y.space),$})});var w81=o((N65,P81)=>{var tu4=fJ();P81.exports=tu4(($,Y)=>{if(Y.message)return $.message=`[${Y.label}] ${$.message}`,$;return $.label=Y.label,$})});var j81=o((L65,_81)=>{var eu4=fJ(),{MESSAGE:$p4}=F$(),Yp4=Zk();_81.exports=eu4(($)=>{let Y={};if($.message)Y["@message"]=$.message,delete $.message;if($.timestamp)Y["@timestamp"]=$.timestamp,delete $.timestamp;return Y["@fields"]=$,$[$p4]=Yp4(Y),$})});var C81=o((B65,T81)=>{var Xp4=fJ();function Gp4($,Y,X){let G=Y.reduce((Q,W)=>{return Q[W]=$[W],delete $[W],Q},{}),J=Object.keys($).reduce((Q,W)=>{return Q[W]=$[W],delete $[W],Q},{});return Object.assign($,G,{[X]:J}),$}function Jp4($,Y,X){return $[X]=Y.reduce((G,J)=>{return G[J]=$[J],delete $[J],G},{}),$}T81.exports=Xp4(($,Y={})=>{let X="metadata";if(Y.key)X=Y.key;let G=[];if(!Y.fillExcept&&!Y.fillWith)G.push("level"),G.push("message");if(Y.fillExcept)G=Y.fillExcept;if(G.length>0)return Gp4($,G,X);if(Y.fillWith)return Jp4($,Y.fillWith,X);return $})});var Gi=o((O65,S81)=>{var uR=1000,pR=uR*60,dR=pR*60,XL=dR*24,Qp4=XL*7,Wp4=XL*365.25;S81.exports=function($,Y){Y=Y||{};var X=typeof $;if(X==="string"&&$.length>0)return Zp4($);else if(X==="number"&&isFinite($))return Y.long?Up4($):Kp4($);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify($))};function Zp4($){if($=String($),$.length>100)return;var Y=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec($);if(!Y)return;var X=parseFloat(Y[1]),G=(Y[2]||"ms").toLowerCase();switch(G){case"years":case"year":case"yrs":case"yr":case"y":return X*Wp4;case"weeks":case"week":case"w":return X*Qp4;case"days":case"day":case"d":return X*XL;case"hours":case"hour":case"hrs":case"hr":case"h":return X*dR;case"minutes":case"minute":case"mins":case"min":case"m":return X*pR;case"seconds":case"second":case"secs":case"sec":case"s":return X*uR;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return X;default:return}}function Kp4($){var Y=Math.abs($);if(Y>=XL)return Math.round($/XL)+"d";if(Y>=dR)return Math.round($/dR)+"h";if(Y>=pR)return Math.round($/pR)+"m";if(Y>=uR)return Math.round($/uR)+"s";return $+"ms"}function Up4($){var Y=Math.abs($);if(Y>=XL)return Xi($,Y,XL,"day");if(Y>=dR)return Xi($,Y,dR,"hour");if(Y>=pR)return Xi($,Y,pR,"minute");if(Y>=uR)return Xi($,Y,uR,"second");return $+" ms"}function Xi($,Y,X,G){var J=Y>=X*1.5;return Math.round($/X)+" "+G+(J?"s":"")}});var v81=o((Kk,k81)=>{var Hp4=fJ(),zp4=Gi();k81.exports=Hp4(($)=>{let Y=+new Date;return Kk.diff=Y-(Kk.prevTime||Y),Kk.prevTime=Y,$.ms=`+${zp4(Kk.diff)}`,$})});var b81=o((E65,y81)=>{var Vp4=L0("util").inspect,Ap4=fJ(),{LEVEL:Fp4,MESSAGE:x81,SPLAT:Dp4}=F$();y81.exports=Ap4(($,Y={})=>{let X=Object.assign({},$);return delete X[Fp4],delete X[x81],delete X[Dp4],$[x81]=Vp4(X,!1,Y.depth||null,Y.colorize),$})});var h81=o((M65,Ji)=>{var{MESSAGE:Np4}=F$();class uZ0{constructor($){this.template=$}transform($){return $[Np4]=this.template($),$}}Ji.exports=($)=>new uZ0($);Ji.exports.Printf=Ji.exports.Format=uZ0});var m81=o((R65,g81)=>{var Lp4=fJ(),{MESSAGE:f81}=F$(),Bp4=Zk();g81.exports=Lp4(($)=>{let Y=Bp4(Object.assign({},$,{level:void 0,message:void 0,splat:void 0})),X=$.padding&&$.padding[$.level]||"";if(Y!=="{}")$[f81]=`${$.level}:${X} ${$.message} ${Y}`;else $[f81]=`${$.level}:${X} ${$.message}`;return $})});var c81=o((q65,d81)=>{var Op4=L0("util"),{SPLAT:u81}=F$(),Ep4=/%[scdjifoO%]/g,Mp4=/%%/g;class p81{constructor($){this.options=$}_splat($,Y){let X=$.message,G=$[u81]||$.splat||[],J=X.match(Mp4),Q=J&&J.length||0,Z=Y.length-Q-G.length,K=Z<0?G.splice(Z,-1*Z):[],H=K.length;if(H)for(let z=0;z<H;z++)Object.assign($,K[z]);return $.message=Op4.format(X,...G),$}transform($){let Y=$.message,X=$[u81]||$.splat;if(!X||!X.length)return $;let G=Y&&Y.match&&Y.match(Ep4);if(!G&&(X||X.length)){let J=X.length>1?X.splice(0):X,Q=J.length;if(Q)for(let W=0;W<Q;W++)Object.assign($,J[W]);return $}if(G)return this._splat($,G);return $}}d81.exports=($)=>new p81($)});var i81=o((Qi,l81)=>{(function($,Y){typeof Qi==="object"&&typeof l81<"u"?Y(Qi):typeof define==="function"&&define.amd?define(["exports"],Y):Y($.fecha={})})(Qi,function($){var Y=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,X="\\d\\d?",G="\\d\\d",J="\\d{3}",Q="\\d{4}",W="[^\\s]+",Z=/\[([^]*?)\]/gm;function K(x,y){var d=[];for(var u=0,b=x.length;u<b;u++)d.push(x[u].substr(0,y));return d}var H=function(x){return function(y,d){var u=d[x].map(function(g){return g.toLowerCase()}),b=u.indexOf(y.toLowerCase());if(b>-1)return b;return null}};function z(x){var y=[];for(var d=1;d<arguments.length;d++)y[d-1]=arguments[d];for(var u=0,b=y;u<b.length;u++){var g=b[u];for(var p in g)x[p]=g[p]}return x}var V=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],A=["January","February","March","April","May","June","July","August","September","October","November","December"],F=K(A,3),N=K(V,3),D={dayNamesShort:N,dayNames:V,monthNamesShort:F,monthNames:A,amPm:["am","pm"],DoFn:function(x){return x+["th","st","nd","rd"][x%10>3?0:(x-x%10!==10?1:0)*x%10]}},L=z({},D),B=function(x){return L=z(L,x)},O=function(x){return x.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},E=function(x,y){if(y===void 0)y=2;x=String(x);while(x.length<y)x="0"+x;return x},M={D:function(x){return String(x.getDate())},DD:function(x){return E(x.getDate())},Do:function(x,y){return y.DoFn(x.getDate())},d:function(x){return String(x.getDay())},dd:function(x){return E(x.getDay())},ddd:function(x,y){return y.dayNamesShort[x.getDay()]},dddd:function(x,y){return y.dayNames[x.getDay()]},M:function(x){return String(x.getMonth()+1)},MM:function(x){return E(x.getMonth()+1)},MMM:function(x,y){return y.monthNamesShort[x.getMonth()]},MMMM:function(x,y){return y.monthNames[x.getMonth()]},YY:function(x){return E(String(x.getFullYear()),4).substr(2)},YYYY:function(x){return E(x.getFullYear(),4)},h:function(x){return String(x.getHours()%12||12)},hh:function(x){return E(x.getHours()%12||12)},H:function(x){return String(x.getHours())},HH:function(x){return E(x.getHours())},m:function(x){return String(x.getMinutes())},mm:function(x){return E(x.getMinutes())},s:function(x){return String(x.getSeconds())},ss:function(x){return E(x.getSeconds())},S:function(x){return String(Math.round(x.getMilliseconds()/100))},SS:function(x){return E(Math.round(x.getMilliseconds()/10),2)},SSS:function(x){return E(x.getMilliseconds(),3)},a:function(x,y){return x.getHours()<12?y.amPm[0]:y.amPm[1]},A:function(x,y){return x.getHours()<12?y.amPm[0].toUpperCase():y.amPm[1].toUpperCase()},ZZ:function(x){var y=x.getTimezoneOffset();return(y>0?"-":"+")+E(Math.floor(Math.abs(y)/60)*100+Math.abs(y)%60,4)},Z:function(x){var y=x.getTimezoneOffset();return(y>0?"-":"+")+E(Math.floor(Math.abs(y)/60),2)+":"+E(Math.abs(y)%60,2)}},R=function(x){return+x-1},q=[null,X],w=[null,W],I=["isPm",W,function(x,y){var d=x.toLowerCase();if(d===y.amPm[0])return 0;else if(d===y.amPm[1])return 1;return null}],P=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(x){var y=(x+"").match(/([+-]|\d\d)/gi);if(y){var d=+y[1]*60+parseInt(y[2],10);return y[0]==="+"?d:-d}return 0}],_={D:["day",X],DD:["day",G],Do:["day",X+W,function(x){return parseInt(x,10)}],M:["month",X,R],MM:["month",G,R],YY:["year",G,function(x){var y=new Date,d=+(""+y.getFullYear()).substr(0,2);return+(""+(+x>68?d-1:d)+x)}],h:["hour",X,void 0,"isPm"],hh:["hour",G,void 0,"isPm"],H:["hour",X],HH:["hour",G],m:["minute",X],mm:["minute",G],s:["second",X],ss:["second",G],YYYY:["year",Q],S:["millisecond","\\d",function(x){return+x*100}],SS:["millisecond",G,function(x){return+x*10}],SSS:["millisecond",J],d:q,dd:q,ddd:w,dddd:w,MMM:["month",W,H("monthNamesShort")],MMMM:["month",W,H("monthNames")],a:I,A:I,ZZ:P,Z:P},C={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},k=function(x){return z(C,x)},S=function(x,y,d){if(y===void 0)y=C.default;if(d===void 0)d={};if(typeof x==="number")x=new Date(x);if(Object.prototype.toString.call(x)!=="[object Date]"||isNaN(x.getTime()))throw Error("Invalid Date pass to format");y=C[y]||y;var u=[];y=y.replace(Z,function(g,p){return u.push(p),"@@@"});var b=z(z({},L),d);return y=y.replace(Y,function(g){return M[g](x,b)}),y.replace(/@@@/g,function(){return u.shift()})};function T(x,y,d){if(d===void 0)d={};if(typeof y!=="string")throw Error("Invalid format in fecha parse");if(y=C[y]||y,x.length>1000)return null;var u=new Date,b={year:u.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},g=[],p=[],h=y.replace(Z,function(A0,D0){return p.push(O(D0)),"@@@"}),n={},t={};h=O(h).replace(Y,function(A0){var D0=_[A0],O0=D0[0],R0=D0[1],I0=D0[3];if(n[O0])throw Error("Invalid format. "+O0+" specified twice in format");if(n[O0]=!0,I0)t[I0]=!0;return g.push(D0),"("+R0+")"}),Object.keys(t).forEach(function(A0){if(!n[A0])throw Error("Invalid format. "+A0+" is required in specified format")}),h=h.replace(/@@@/g,function(){return p.shift()});var s=x.match(new RegExp(h,"i"));if(!s)return null;var Z0=z(z({},L),d);for(var X0=1;X0<s.length;X0++){var a=g[X0-1],Q0=a[0],e=a[2],m=e?e(s[X0],Z0):+s[X0];if(m==null)return null;b[Q0]=m}if(b.isPm===1&&b.hour!=null&&+b.hour!==12)b.hour=+b.hour+12;else if(b.isPm===0&&+b.hour===12)b.hour=0;var $0;if(b.timezoneOffset==null){$0=new Date(b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond);var Y0=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]];for(var X0=0,K0=Y0.length;X0<K0;X0++)if(n[Y0[X0][0]]&&b[Y0[X0][0]]!==$0[Y0[X0][1]]())return null}else if($0=new Date(Date.UTC(b.year,b.month,b.day,b.hour,b.minute-b.timezoneOffset,b.second,b.millisecond)),b.month>11||b.month<0||b.day>31||b.day<1||b.hour>23||b.hour<0||b.minute>59||b.minute<0||b.second>59||b.second<0)return null;return $0}var v={format:S,parse:T,defaultI18n:D,setGlobalDateI18n:B,setGlobalDateMasks:k};$.assign=z,$.default=v,$.format=S,$.parse=T,$.defaultI18n=D,$.setGlobalDateI18n=B,$.setGlobalDateMasks=k,Object.defineProperty($,"__esModule",{value:!0})})});var r81=o((I65,n81)=>{var Rp4=i81(),qp4=fJ();n81.exports=qp4(($,Y={})=>{if(Y.format)$.timestamp=typeof Y.format==="function"?Y.format():Rp4.format(new Date,Y.format);if(!$.timestamp)$.timestamp=new Date().toISOString();if(Y.alias)$[Y.alias]=$.timestamp;return $})});var s81=o((P65,a81)=>{var pZ0=_Z0(),Ip4=fJ(),{MESSAGE:dZ0}=F$();a81.exports=Ip4(($,Y)=>{if(Y.level!==!1)$.level=pZ0.strip($.level);if(Y.message!==!1)$.message=pZ0.strip(String($.message));if(Y.raw!==!1&&$[dZ0])$[dZ0]=pZ0.strip(String($[dZ0]));return $})});var cZ0=o((wp4)=>{var Pp4=wp4.format=fJ();wp4.levels=z81();function JX($,Y){Object.defineProperty(Pp4,$,{get(){return Y()},configurable:!0})}JX("align",function(){return A81()});JX("errors",function(){return N81()});JX("cli",function(){return B81()});JX("combine",function(){return E81()});JX("colorize",function(){return $i()});JX("json",function(){return mZ0()});JX("label",function(){return w81()});JX("logstash",function(){return j81()});JX("metadata",function(){return C81()});JX("ms",function(){return v81()});JX("padLevels",function(){return vZ0()});JX("prettyPrint",function(){return b81()});JX("printf",function(){return h81()});JX("simple",function(){return m81()});JX("splat",function(){return c81()});JX("timestamp",function(){return r81()});JX("uncolorize",function(){return s81()})});var iZ0=o((jp4)=>{var{format:o81}=L0("util");jp4.warn={deprecated($){return()=>{throw Error(o81("{ %s } was removed in winston@3.0.0.",$))}},useFormat($){return()=>{throw Error([o81("{ %s } was removed in winston@3.0.0.",$),"Use a custom winston.format = winston.format(function) instead."].join(`
`))}},forFunctions($,Y,X){X.forEach((G)=>{$[G]=jp4.warn[Y](G)})},forProperties($,Y,X){X.forEach((G)=>{let J=jp4.warn[Y](G);Object.defineProperty($,G,{get:J,set:J})})}}});var t81=o((T65,Tp4)=>{Tp4.exports={name:"winston",description:"A logger for just about everything.",version:"3.19.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",jest:"^29.7.0",rimraf:"5.0.10",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"jest","test:unit":"jest -c test/jest.config.unit.js","test:integration":"jest -c test/jest.config.integration.js","test:typescript":"npx --package typescript tsc --project test",build:"babel lib -d dist",prebuild:"rimraf dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var $91=o((C65,e81)=>{e81.exports=L0("util").deprecate});var rZ0=o((S65,X91)=>{function Cp4($,Y){var X=this,G=this._readableState&&this._readableState.destroyed,J=this._writableState&&this._writableState.destroyed;if(G||J){if(Y)Y($);else if($){if(!this._writableState)process.nextTick(nZ0,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(nZ0,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(Q){if(!Y&&Q)if(!X._writableState)process.nextTick(Y91,X,Q);else if(!X._writableState.errorEmitted)X._writableState.errorEmitted=!0,process.nextTick(Y91,X,Q);else process.nextTick(Wi,X);else if(Y)process.nextTick(Wi,X),Y(Q);else process.nextTick(Wi,X)}),this}function Y91($,Y){nZ0($,Y),Wi($)}function Wi($){if($._writableState&&!$._writableState.emitClose)return;if($._readableState&&!$._readableState.emitClose)return;$.emit("close")}function Sp4(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function nZ0($,Y){$.emit("error",Y)}function kp4($,Y){var{_readableState:X,_writableState:G}=$;if(X&&X.autoDestroy||G&&G.autoDestroy)$.destroy(Y);else $.emit("error",Y)}X91.exports={destroy:Cp4,undestroy:Sp4,errorOrDestroy:kp4}});var GA=o((bp4,Q91)=>{var J91={};function UZ($,Y,X){if(!X)X=Error;function G(Q,W,Z){if(typeof Y==="string")return Y;else return Y(Q,W,Z)}class J extends X{constructor(Q,W,Z){super(G(Q,W,Z))}}J.prototype.name=X.name,J.prototype.code=$,J91[$]=J}function G91($,Y){if(Array.isArray($)){let X=$.length;if($=$.map((G)=>String(G)),X>2)return`one of ${Y} ${$.slice(0,X-1).join(", ")}, or `+$[X-1];else if(X===2)return`one of ${Y} ${$[0]} or ${$[1]}`;else return`of ${Y} ${$[0]}`}else return`of ${Y} ${String($)}`}function vp4($,Y,X){return $.substr(!X||X<0?0:+X,Y.length)===Y}function xp4($,Y,X){if(X===void 0||X>$.length)X=$.length;return $.substring(X-Y.length,X)===Y}function yp4($,Y,X){if(typeof X!=="number")X=0;if(X+Y.length>$.length)return!1;else return $.indexOf(Y,X)!==-1}UZ("ERR_INVALID_OPT_VALUE",function($,Y){return'The value "'+Y+'" is invalid for option "'+$+'"'},TypeError);UZ("ERR_INVALID_ARG_TYPE",function($,Y,X){let G;if(typeof Y==="string"&&vp4(Y,"not "))G="must not be",Y=Y.replace(/^not /,"");else G="must be";let J;if(xp4($," argument"))J=`The ${$} ${G} ${G91(Y,"type")}`;else{let Q=yp4($,".")?"property":"argument";J=`The "${$}" ${Q} ${G} ${G91(Y,"type")}`}return J+=`. Received type ${typeof X}`,J},TypeError);UZ("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");UZ("ERR_METHOD_NOT_IMPLEMENTED",function($){return"The "+$+" method is not implemented"});UZ("ERR_STREAM_PREMATURE_CLOSE","Premature close");UZ("ERR_STREAM_DESTROYED",function($){return"Cannot call "+$+" after a stream was destroyed"});UZ("ERR_MULTIPLE_CALLBACK","Callback called multiple times");UZ("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");UZ("ERR_STREAM_WRITE_AFTER_END","write after end");UZ("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);UZ("ERR_UNKNOWN_ENCODING",function($){return"Unknown encoding: "+$},TypeError);UZ("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");bp4.codes=J91});var aZ0=o((k65,W91)=>{var fp4=GA().codes.ERR_INVALID_OPT_VALUE;function gp4($,Y,X){return $.highWaterMark!=null?$.highWaterMark:Y?$[X]:null}function mp4($,Y,X,G){var J=gp4(Y,G,X);if(J!=null){if(!(isFinite(J)&&Math.floor(J)===J)||J<0){var Q=G?X:"highWaterMark";throw new fp4(Q,J)}return Math.floor(J)}return $.objectMode?16:16384}W91.exports={getHighWaterMark:mp4}});var Z91=o((v65,sZ0)=>{if(typeof Object.create==="function")sZ0.exports=function(Y,X){if(X)Y.super_=X,Y.prototype=Object.create(X.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}})};else sZ0.exports=function(Y,X){if(X){Y.super_=X;var G=function(){};G.prototype=X.prototype,Y.prototype=new G,Y.prototype.constructor=Y}}});var GL=o((x65,oZ0)=>{try{if(Zi=L0("util"),typeof Zi.inherits!=="function")throw"";oZ0.exports=Zi.inherits}catch($){oZ0.exports=Z91()}var Zi});var A91=o((y65,V91)=>{function K91($,Y){var X=Object.keys($);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols($);Y&&(G=G.filter(function(J){return Object.getOwnPropertyDescriptor($,J).enumerable})),X.push.apply(X,G)}return X}function U91($){for(var Y=1;Y<arguments.length;Y++){var X=arguments[Y]!=null?arguments[Y]:{};Y%2?K91(Object(X),!0).forEach(function(G){up4($,G,X[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(X)):K91(Object(X)).forEach(function(G){Object.defineProperty($,G,Object.getOwnPropertyDescriptor(X,G))})}return $}function up4($,Y,X){if(Y=z91(Y),Y in $)Object.defineProperty($,Y,{value:X,enumerable:!0,configurable:!0,writable:!0});else $[Y]=X;return $}function pp4($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}function H91($,Y){for(var X=0;X<Y.length;X++){var G=Y[X];if(G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G)G.writable=!0;Object.defineProperty($,z91(G.key),G)}}function dp4($,Y,X){if(Y)H91($.prototype,Y);if(X)H91($,X);return Object.defineProperty($,"prototype",{writable:!1}),$}function z91($){var Y=cp4($,"string");return typeof Y==="symbol"?Y:String(Y)}function cp4($,Y){if(typeof $!=="object"||$===null)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var G=X.call($,Y||"default");if(typeof G!=="object")return G;throw TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)($)}var lp4=L0("buffer"),Ki=lp4.Buffer,ip4=L0("util"),tZ0=ip4.inspect,np4=tZ0&&tZ0.custom||"inspect";function rp4($,Y,X){Ki.prototype.copy.call($,Y,X)}V91.exports=function(){function $(){pp4(this,$),this.head=null,this.tail=null,this.length=0}return dp4($,[{key:"push",value:function(X){var G={data:X,next:null};if(this.length>0)this.tail.next=G;else this.head=G;this.tail=G,++this.length}},{key:"unshift",value:function(X){var G={data:X,next:this.head};if(this.length===0)this.tail=G;this.head=G,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var X=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,X}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(X){if(this.length===0)return"";var G=this.head,J=""+G.data;while(G=G.next)J+=X+G.data;return J}},{key:"concat",value:function(X){if(this.length===0)return Ki.alloc(0);var G=Ki.allocUnsafe(X>>>0),J=this.head,Q=0;while(J)rp4(J.data,G,Q),Q+=J.data.length,J=J.next;return G}},{key:"consume",value:function(X,G){var J;if(X<this.head.data.length)J=this.head.data.slice(0,X),this.head.data=this.head.data.slice(X);else if(X===this.head.data.length)J=this.shift();else J=G?this._getString(X):this._getBuffer(X);return J}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(X){var G=this.head,J=1,Q=G.data;X-=Q.length;while(G=G.next){var W=G.data,Z=X>W.length?W.length:X;if(Z===W.length)Q+=W;else Q+=W.slice(0,X);if(X-=Z,X===0){if(Z===W.length)if(++J,G.next)this.head=G.next;else this.head=this.tail=null;else this.head=G,G.data=W.slice(Z);break}++J}return this.length-=J,Q}},{key:"_getBuffer",value:function(X){var G=Ki.allocUnsafe(X),J=this.head,Q=1;J.data.copy(G),X-=J.data.length;while(J=J.next){var W=J.data,Z=X>W.length?W.length:X;if(W.copy(G,G.length-X,0,Z),X-=Z,X===0){if(Z===W.length)if(++Q,J.next)this.head=J.next;else this.head=this.tail=null;else this.head=J,J.data=W.slice(Z);break}++Q}return this.length-=Q,G}},{key:np4,value:function(X,G){return tZ0(this,U91(U91({},G),{},{depth:0,customInspect:!1}))}}]),$}()});var N91=o((eZ0,D91)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Ui=L0("buffer"),f3=Ui.Buffer;function F91($,Y){for(var X in $)Y[X]=$[X]}if(f3.from&&f3.alloc&&f3.allocUnsafe&&f3.allocUnsafeSlow)D91.exports=Ui;else F91(Ui,eZ0),eZ0.Buffer=JL;function JL($,Y,X){return f3($,Y,X)}JL.prototype=Object.create(f3.prototype);F91(f3,JL);JL.from=function($,Y,X){if(typeof $==="number")throw TypeError("Argument must not be a number");return f3($,Y,X)};JL.alloc=function($,Y,X){if(typeof $!=="number")throw TypeError("Argument must be a number");var G=f3($);if(Y!==void 0)if(typeof X==="string")G.fill(Y,X);else G.fill(Y);else G.fill(0);return G};JL.allocUnsafe=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return f3($)};JL.allocUnsafeSlow=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return Ui.SlowBuffer($)}});var X20=o((Kd4)=>{var Y20=N91().Buffer,L91=Y20.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function ap4($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function sp4($){var Y=ap4($);if(typeof Y!=="string"&&(Y20.isEncoding===L91||!L91($)))throw Error("Unknown encoding: "+$);return Y||$}Kd4.StringDecoder=Uk;function Uk($){this.encoding=sp4($);var Y;switch(this.encoding){case"utf16le":this.text=Xd4,this.end=Gd4,Y=4;break;case"utf8":this.fillLast=ep4,Y=4;break;case"base64":this.text=Jd4,this.end=Qd4,Y=3;break;default:this.write=Wd4,this.end=Zd4;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Y20.allocUnsafe(Y)}Uk.prototype.write=function($){if($.length===0)return"";var Y,X;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";X=this.lastNeed,this.lastNeed=0}else X=0;if(X<$.length)return Y?Y+this.text($,X):this.text($,X);return Y||""};Uk.prototype.end=Yd4;Uk.prototype.text=$d4;Uk.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function $20($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function op4($,Y,X){var G=Y.length-1;if(G<X)return 0;var J=$20(Y[G]);if(J>=0){if(J>0)$.lastNeed=J-1;return J}if(--G<X||J===-2)return 0;if(J=$20(Y[G]),J>=0){if(J>0)$.lastNeed=J-2;return J}if(--G<X||J===-2)return 0;if(J=$20(Y[G]),J>=0){if(J>0)if(J===2)J=0;else $.lastNeed=J-3;return J}return 0}function tp4($,Y,X){if((Y[0]&192)!==128)return $.lastNeed=0,"\uFFFD";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"\uFFFD";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"\uFFFD"}}}function ep4($){var Y=this.lastTotal-this.lastNeed,X=tp4(this,$,Y);if(X!==void 0)return X;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function $d4($,Y){var X=op4(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=X;var G=$.length-(X-this.lastNeed);return $.copy(this.lastChar,0,G),$.toString("utf8",Y,G)}function Yd4($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"\uFFFD";return Y}function Xd4($,Y){if(($.length-Y)%2===0){var X=$.toString("utf16le",Y);if(X){var G=X.charCodeAt(X.length-1);if(G>=55296&&G<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],X.slice(0,-1)}return X}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function Gd4($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var X=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,X)}return Y}function Jd4($,Y){var X=($.length-Y)%3;if(X===0)return $.toString("base64",Y);if(this.lastNeed=3-X,this.lastTotal=3,X===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-X)}function Qd4($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function Wd4($){return $.toString(this.encoding)}function Zd4($){return $&&$.length?this.write($):""}});var Hi=o((h65,E91)=>{var B91=GA().codes.ERR_STREAM_PREMATURE_CLOSE;function Hd4($){var Y=!1;return function(){if(Y)return;Y=!0;for(var X=arguments.length,G=Array(X),J=0;J<X;J++)G[J]=arguments[J];$.apply(this,G)}}function zd4(){}function Vd4($){return $.setHeader&&typeof $.abort==="function"}function O91($,Y,X){if(typeof Y==="function")return O91($,null,Y);if(!Y)Y={};X=Hd4(X||zd4);var G=Y.readable||Y.readable!==!1&&$.readable,J=Y.writable||Y.writable!==!1&&$.writable,Q=function(){if(!$.writable)Z()},W=$._writableState&&$._writableState.finished,Z=function(){if(J=!1,W=!0,!G)X.call($)},K=$._readableState&&$._readableState.endEmitted,H=function(){if(G=!1,K=!0,!J)X.call($)},z=function(N){X.call($,N)},V=function(){var N;if(G&&!K){if(!$._readableState||!$._readableState.ended)N=new B91;return X.call($,N)}if(J&&!W){if(!$._writableState||!$._writableState.ended)N=new B91;return X.call($,N)}},A=function(){$.req.on("finish",Z)};if(Vd4($))if($.on("complete",Z),$.on("abort",V),$.req)A();else $.on("request",A);else if(J&&!$._writableState)$.on("end",Q),$.on("close",Q);if($.on("end",H),$.on("finish",Z),Y.error!==!1)$.on("error",z);return $.on("close",V),function(){if($.removeListener("complete",Z),$.removeListener("abort",V),$.removeListener("request",A),$.req)$.req.removeListener("finish",Z);$.removeListener("end",Q),$.removeListener("close",Q),$.removeListener("finish",Z),$.removeListener("end",H),$.removeListener("error",z),$.removeListener("close",V)}}E91.exports=O91});var R91=o((f65,M91)=>{var zi;function JA($,Y,X){if(Y=Ad4(Y),Y in $)Object.defineProperty($,Y,{value:X,enumerable:!0,configurable:!0,writable:!0});else $[Y]=X;return $}function Ad4($){var Y=Fd4($,"string");return typeof Y==="symbol"?Y:String(Y)}function Fd4($,Y){if(typeof $!=="object"||$===null)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var G=X.call($,Y||"default");if(typeof G!=="object")return G;throw TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)($)}var Dd4=Hi(),QA=Symbol("lastResolve"),QL=Symbol("lastReject"),Hk=Symbol("error"),Vi=Symbol("ended"),WL=Symbol("lastPromise"),G20=Symbol("handlePromise"),ZL=Symbol("stream");function WA($,Y){return{value:$,done:Y}}function Nd4($){var Y=$[QA];if(Y!==null){var X=$[ZL].read();if(X!==null)$[WL]=null,$[QA]=null,$[QL]=null,Y(WA(X,!1))}}function Ld4($){process.nextTick(Nd4,$)}function Bd4($,Y){return function(X,G){$.then(function(){if(Y[Vi]){X(WA(void 0,!0));return}Y[G20](X,G)},G)}}var Od4=Object.getPrototypeOf(function(){}),Ed4=Object.setPrototypeOf((zi={get stream(){return this[ZL]},next:function(){var Y=this,X=this[Hk];if(X!==null)return Promise.reject(X);if(this[Vi])return Promise.resolve(WA(void 0,!0));if(this[ZL].destroyed)return new Promise(function(W,Z){process.nextTick(function(){if(Y[Hk])Z(Y[Hk]);else W(WA(void 0,!0))})});var G=this[WL],J;if(G)J=new Promise(Bd4(G,this));else{var Q=this[ZL].read();if(Q!==null)return Promise.resolve(WA(Q,!1));J=new Promise(this[G20])}return this[WL]=J,J}},JA(zi,Symbol.asyncIterator,function(){return this}),JA(zi,"return",function(){var Y=this;return new Promise(function(X,G){Y[ZL].destroy(null,function(J){if(J){G(J);return}X(WA(void 0,!0))})})}),zi),Od4),Md4=function(Y){var X,G=Object.create(Ed4,(X={},JA(X,ZL,{value:Y,writable:!0}),JA(X,QA,{value:null,writable:!0}),JA(X,QL,{value:null,writable:!0}),JA(X,Hk,{value:null,writable:!0}),JA(X,Vi,{value:Y._readableState.endEmitted,writable:!0}),JA(X,G20,{value:function(Q,W){var Z=G[ZL].read();if(Z)G[WL]=null,G[QA]=null,G[QL]=null,Q(WA(Z,!1));else G[QA]=Q,G[QL]=W},writable:!0}),X));return G[WL]=null,Dd4(Y,function(J){if(J&&J.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Q=G[QL];if(Q!==null)G[WL]=null,G[QA]=null,G[QL]=null,Q(J);G[Hk]=J;return}var W=G[QA];if(W!==null)G[WL]=null,G[QA]=null,G[QL]=null,W(WA(void 0,!0));G[Vi]=!0}),Y.on("readable",Ld4.bind(null,G)),G};M91.exports=Md4});var w91=o((g65,P91)=>{function q91($,Y,X,G,J,Q,W){try{var Z=$[Q](W),K=Z.value}catch(H){X(H);return}if(Z.done)Y(K);else Promise.resolve(K).then(G,J)}function Rd4($){return function(){var Y=this,X=arguments;return new Promise(function(G,J){var Q=$.apply(Y,X);function W(K){q91(Q,G,J,W,Z,"next",K)}function Z(K){q91(Q,G,J,W,Z,"throw",K)}W(void 0)})}}function I91($,Y){var X=Object.keys($);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols($);Y&&(G=G.filter(function(J){return Object.getOwnPropertyDescriptor($,J).enumerable})),X.push.apply(X,G)}return X}function qd4($){for(var Y=1;Y<arguments.length;Y++){var X=arguments[Y]!=null?arguments[Y]:{};Y%2?I91(Object(X),!0).forEach(function(G){Id4($,G,X[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(X)):I91(Object(X)).forEach(function(G){Object.defineProperty($,G,Object.getOwnPropertyDescriptor(X,G))})}return $}function Id4($,Y,X){if(Y=Pd4(Y),Y in $)Object.defineProperty($,Y,{value:X,enumerable:!0,configurable:!0,writable:!0});else $[Y]=X;return $}function Pd4($){var Y=wd4($,"string");return typeof Y==="symbol"?Y:String(Y)}function wd4($,Y){if(typeof $!=="object"||$===null)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var G=X.call($,Y||"default");if(typeof G!=="object")return G;throw TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)($)}var _d4=GA().codes.ERR_INVALID_ARG_TYPE;function jd4($,Y,X){var G;if(Y&&typeof Y.next==="function")G=Y;else if(Y&&Y[Symbol.asyncIterator])G=Y[Symbol.asyncIterator]();else if(Y&&Y[Symbol.iterator])G=Y[Symbol.iterator]();else throw new _d4("iterable",["Iterable"],Y);var J=new $(qd4({objectMode:!0},X)),Q=!1;J._read=function(){if(!Q)Q=!0,W()};function W(){return Z.apply(this,arguments)}function Z(){return Z=Rd4(function*(){try{var K=yield G.next(),H=K.value,z=K.done;if(z)J.push(null);else if(J.push(yield H))W();else Q=!1}catch(V){J.destroy(V)}}),Z.apply(this,arguments)}return J}P91.exports=jd4});var A20=o((u65,b91)=>{b91.exports=d8;var cR;d8.ReadableState=C91;var m65=L0("events").EventEmitter,T91=function(Y,X){return Y.listeners(X).length},Vk=L0("stream"),Ai=L0("buffer").Buffer,Td4=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Cd4($){return Ai.from($)}function Sd4($){return Ai.isBuffer($)||$ instanceof Td4}var J20=L0("util"),e6;if(J20&&J20.debuglog)e6=J20.debuglog("stream");else e6=function(){};var kd4=A91(),z20=rZ0(),vd4=aZ0(),xd4=vd4.getHighWaterMark,Fi=GA().codes,yd4=Fi.ERR_INVALID_ARG_TYPE,bd4=Fi.ERR_STREAM_PUSH_AFTER_EOF,hd4=Fi.ERR_METHOD_NOT_IMPLEMENTED,fd4=Fi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,lR,Q20,W20;GL()(d8,Vk);var zk=z20.errorOrDestroy,Z20=["error","close","destroy","pause","resume"];function gd4($,Y,X){if(typeof $.prependListener==="function")return $.prependListener(Y,X);if(!$._events||!$._events[Y])$.on(Y,X);else if(Array.isArray($._events[Y]))$._events[Y].unshift(X);else $._events[Y]=[X,$._events[Y]]}function C91($,Y,X){if(cR=cR||KL(),$=$||{},typeof X!=="boolean")X=Y instanceof cR;if(this.objectMode=!!$.objectMode,X)this.objectMode=this.objectMode||!!$.readableObjectMode;if(this.highWaterMark=xd4(this,$,"readableHighWaterMark",X),this.buffer=new kd4,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!lR)lR=X20().StringDecoder;this.decoder=new lR($.encoding),this.encoding=$.encoding}}function d8($){if(cR=cR||KL(),!(this instanceof d8))return new d8($);var Y=this instanceof cR;if(this._readableState=new C91($,this,Y),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}Vk.call(this)}Object.defineProperty(d8.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(Y){if(!this._readableState)return;this._readableState.destroyed=Y}});d8.prototype.destroy=z20.destroy;d8.prototype._undestroy=z20.undestroy;d8.prototype._destroy=function($,Y){Y($)};d8.prototype.push=function($,Y){var X=this._readableState,G;if(!X.objectMode){if(typeof $==="string"){if(Y=Y||X.defaultEncoding,Y!==X.encoding)$=Ai.from($,Y),Y="";G=!0}}else G=!0;return S91(this,$,Y,!1,G)};d8.prototype.unshift=function($){return S91(this,$,null,!0,!1)};function S91($,Y,X,G,J){e6("readableAddChunk",Y);var Q=$._readableState;if(Y===null)Q.reading=!1,pd4($,Q);else{var W;if(!J)W=md4(Q,Y);if(W)zk($,W);else if(Q.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!Q.objectMode&&Object.getPrototypeOf(Y)!==Ai.prototype)Y=Cd4(Y);if(G)if(Q.endEmitted)zk($,new fd4);else K20($,Q,Y,!0);else if(Q.ended)zk($,new bd4);else if(Q.destroyed)return!1;else if(Q.reading=!1,Q.decoder&&!X)if(Y=Q.decoder.write(Y),Q.objectMode||Y.length!==0)K20($,Q,Y,!1);else H20($,Q);else K20($,Q,Y,!1)}else if(!G)Q.reading=!1,H20($,Q)}return!Q.ended&&(Q.length<Q.highWaterMark||Q.length===0)}function K20($,Y,X,G){if(Y.flowing&&Y.length===0&&!Y.sync)Y.awaitDrain=0,$.emit("data",X);else{if(Y.length+=Y.objectMode?1:X.length,G)Y.buffer.unshift(X);else Y.buffer.push(X);if(Y.needReadable)Di($)}H20($,Y)}function md4($,Y){var X;if(!Sd4(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)X=new yd4("chunk",["string","Buffer","Uint8Array"],Y);return X}d8.prototype.isPaused=function(){return this._readableState.flowing===!1};d8.prototype.setEncoding=function($){if(!lR)lR=X20().StringDecoder;var Y=new lR($);this._readableState.decoder=Y,this._readableState.encoding=this._readableState.decoder.encoding;var X=this._readableState.buffer.head,G="";while(X!==null)G+=Y.write(X.data),X=X.next;if(this._readableState.buffer.clear(),G!=="")this._readableState.buffer.push(G);return this._readableState.length=G.length,this};var _91=1073741824;function ud4($){if($>=_91)$=_91;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function j91($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=ud4($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}d8.prototype.read=function($){e6("read",$),$=parseInt($,10);var Y=this._readableState,X=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended)){if(e6("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)U20(this);else Di(this);return null}if($=j91($,Y),$===0&&Y.ended){if(Y.length===0)U20(this);return null}var G=Y.needReadable;if(e6("need readable",G),Y.length===0||Y.length-$<Y.highWaterMark)G=!0,e6("length less than watermark",G);if(Y.ended||Y.reading)G=!1,e6("reading or ended",G);else if(G){if(e6("do read"),Y.reading=!0,Y.sync=!0,Y.length===0)Y.needReadable=!0;if(this._read(Y.highWaterMark),Y.sync=!1,!Y.reading)$=j91(X,Y)}var J;if($>0)J=x91($,Y);else J=null;if(J===null)Y.needReadable=Y.length<=Y.highWaterMark,$=0;else Y.length-=$,Y.awaitDrain=0;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(X!==$&&Y.ended)U20(this)}if(J!==null)this.emit("data",J);return J};function pd4($,Y){if(e6("onEofChunk"),Y.ended)return;if(Y.decoder){var X=Y.decoder.end();if(X&&X.length)Y.buffer.push(X),Y.length+=Y.objectMode?1:X.length}if(Y.ended=!0,Y.sync)Di($);else if(Y.needReadable=!1,!Y.emittedReadable)Y.emittedReadable=!0,k91($)}function Di($){var Y=$._readableState;if(e6("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,!Y.emittedReadable)e6("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(k91,$)}function k91($){var Y=$._readableState;if(e6("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended))$.emit("readable"),Y.emittedReadable=!1;Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,V20($)}function H20($,Y){if(!Y.readingMore)Y.readingMore=!0,process.nextTick(dd4,$,Y)}function dd4($,Y){while(!Y.reading&&!Y.ended&&(Y.length<Y.highWaterMark||Y.flowing&&Y.length===0)){var X=Y.length;if(e6("maybeReadMore read 0"),$.read(0),X===Y.length)break}Y.readingMore=!1}d8.prototype._read=function($){zk(this,new hd4("_read()"))};d8.prototype.pipe=function($,Y){var X=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=$;break;case 1:G.pipes=[G.pipes,$];break;default:G.pipes.push($);break}G.pipesCount+=1,e6("pipe count=%d opts=%j",G.pipesCount,Y);var J=(!Y||Y.end!==!1)&&$!==process.stdout&&$!==process.stderr,Q=J?Z:D;if(G.endEmitted)process.nextTick(Q);else X.once("end",Q);$.on("unpipe",W);function W(L,B){if(e6("onunpipe"),L===X){if(B&&B.hasUnpiped===!1)B.hasUnpiped=!0,z()}}function Z(){e6("onend"),$.end()}var K=cd4(X);$.on("drain",K);var H=!1;function z(){if(e6("cleanup"),$.removeListener("close",F),$.removeListener("finish",N),$.removeListener("drain",K),$.removeListener("error",A),$.removeListener("unpipe",W),X.removeListener("end",Z),X.removeListener("end",D),X.removeListener("data",V),H=!0,G.awaitDrain&&(!$._writableState||$._writableState.needDrain))K()}X.on("data",V);function V(L){e6("ondata");var B=$.write(L);if(e6("dest.write",B),B===!1){if((G.pipesCount===1&&G.pipes===$||G.pipesCount>1&&y91(G.pipes,$)!==-1)&&!H)e6("false write response, pause",G.awaitDrain),G.awaitDrain++;X.pause()}}function A(L){if(e6("onerror",L),D(),$.removeListener("error",A),T91($,"error")===0)zk($,L)}gd4($,"error",A);function F(){$.removeListener("finish",N),D()}$.once("close",F);function N(){e6("onfinish"),$.removeListener("close",F),D()}$.once("finish",N);function D(){e6("unpipe"),X.unpipe($)}if($.emit("pipe",X),!G.flowing)e6("pipe resume"),X.resume();return $};function cd4($){return function(){var X=$._readableState;if(e6("pipeOnDrain",X.awaitDrain),X.awaitDrain)X.awaitDrain--;if(X.awaitDrain===0&&T91($,"data"))X.flowing=!0,V20($)}}d8.prototype.unpipe=function($){var Y=this._readableState,X={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,X);return this}if(!$){var{pipes:G,pipesCount:J}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var Q=0;Q<J;Q++)G[Q].emit("unpipe",this,{hasUnpiped:!1});return this}var W=y91(Y.pipes,$);if(W===-1)return this;if(Y.pipes.splice(W,1),Y.pipesCount-=1,Y.pipesCount===1)Y.pipes=Y.pipes[0];return $.emit("unpipe",this,X),this};d8.prototype.on=function($,Y){var X=Vk.prototype.on.call(this,$,Y),G=this._readableState;if($==="data"){if(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1)this.resume()}else if($==="readable"){if(!G.endEmitted&&!G.readableListening){if(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,e6("on readable",G.length,G.reading),G.length)Di(this);else if(!G.reading)process.nextTick(ld4,this)}}return X};d8.prototype.addListener=d8.prototype.on;d8.prototype.removeListener=function($,Y){var X=Vk.prototype.removeListener.call(this,$,Y);if($==="readable")process.nextTick(v91,this);return X};d8.prototype.removeAllListeners=function($){var Y=Vk.prototype.removeAllListeners.apply(this,arguments);if($==="readable"||$===void 0)process.nextTick(v91,this);return Y};function v91($){var Y=$._readableState;if(Y.readableListening=$.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused)Y.flowing=!0;else if($.listenerCount("data")>0)$.resume()}function ld4($){e6("readable nexttick read 0"),$.read(0)}d8.prototype.resume=function(){var $=this._readableState;if(!$.flowing)e6("resume"),$.flowing=!$.readableListening,id4(this,$);return $.paused=!1,this};function id4($,Y){if(!Y.resumeScheduled)Y.resumeScheduled=!0,process.nextTick(nd4,$,Y)}function nd4($,Y){if(e6("resume",Y.reading),!Y.reading)$.read(0);if(Y.resumeScheduled=!1,$.emit("resume"),V20($),Y.flowing&&!Y.reading)$.read(0)}d8.prototype.pause=function(){if(e6("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)e6("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function V20($){var Y=$._readableState;e6("flow",Y.flowing);while(Y.flowing&&$.read()!==null);}d8.prototype.wrap=function($){var Y=this,X=this._readableState,G=!1;$.on("end",function(){if(e6("wrapped end"),X.decoder&&!X.ended){var W=X.decoder.end();if(W&&W.length)Y.push(W)}Y.push(null)}),$.on("data",function(W){if(e6("wrapped data"),X.decoder)W=X.decoder.write(W);if(X.objectMode&&(W===null||W===void 0))return;else if(!X.objectMode&&(!W||!W.length))return;var Z=Y.push(W);if(!Z)G=!0,$.pause()});for(var J in $)if(this[J]===void 0&&typeof $[J]==="function")this[J]=function(Z){return function(){return $[Z].apply($,arguments)}}(J);for(var Q=0;Q<Z20.length;Q++)$.on(Z20[Q],this.emit.bind(this,Z20[Q]));return this._read=function(W){if(e6("wrapped _read",W),G)G=!1,$.resume()},this};if(typeof Symbol==="function")d8.prototype[Symbol.asyncIterator]=function(){if(Q20===void 0)Q20=R91();return Q20(this)};Object.defineProperty(d8.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(d8.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(d8.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Y){if(this._readableState)this._readableState.flowing=Y}});d8._fromList=x91;Object.defineProperty(d8.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function x91($,Y){if(Y.length===0)return null;var X;if(Y.objectMode)X=Y.buffer.shift();else if(!$||$>=Y.length){if(Y.decoder)X=Y.buffer.join("");else if(Y.buffer.length===1)X=Y.buffer.first();else X=Y.buffer.concat(Y.length);Y.buffer.clear()}else X=Y.buffer.consume($,Y.decoder);return X}function U20($){var Y=$._readableState;if(e6("endReadable",Y.endEmitted),!Y.endEmitted)Y.ended=!0,process.nextTick(rd4,Y,$)}function rd4($,Y){if(e6("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0){if($.endEmitted=!0,Y.readable=!1,Y.emit("end"),$.autoDestroy){var X=Y._writableState;if(!X||X.autoDestroy&&X.finished)Y.destroy()}}}if(typeof Symbol==="function")d8.from=function($,Y){if(W20===void 0)W20=w91();return W20(d8,$,Y)};function y91($,Y){for(var X=0,G=$.length;X<G;X++)if($[X]===Y)return X;return-1}});var KL=o((p65,f91)=>{var ad4=Object.keys||function($){var Y=[];for(var X in $)Y.push(X);return Y};f91.exports=g3;var h91=A20(),F20=Li();GL()(g3,h91);{Ni=ad4(F20.prototype);for(Ak=0;Ak<Ni.length;Ak++)if(Fk=Ni[Ak],!g3.prototype[Fk])g3.prototype[Fk]=F20.prototype[Fk]}var Ni,Fk,Ak;function g3($){if(!(this instanceof g3))return new g3($);if(h91.call(this,$),F20.call(this,$),this.allowHalfOpen=!0,$){if($.readable===!1)this.readable=!1;if($.writable===!1)this.writable=!1;if($.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",sd4)}}Object.defineProperty(g3.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(g3.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(g3.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function sd4(){if(this._writableState.ended)return;process.nextTick(od4,this)}function od4($){$.end()}Object.defineProperty(g3.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(Y){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=Y,this._writableState.destroyed=Y}})});var Li=o((d65,c91)=>{c91.exports=n7;function m91($){var Y=this;this.next=null,this.entry=null,this.finish=function(){Ic4(Y,$)}}var iR;n7.WritableState=Nk;var td4={deprecate:$91()},u91=L0("stream"),Oi=L0("buffer").Buffer,ed4=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function $c4($){return Oi.from($)}function Yc4($){return Oi.isBuffer($)||$ instanceof ed4}var N20=rZ0(),Xc4=aZ0(),Gc4=Xc4.getHighWaterMark,ZA=GA().codes,Jc4=ZA.ERR_INVALID_ARG_TYPE,Qc4=ZA.ERR_METHOD_NOT_IMPLEMENTED,Wc4=ZA.ERR_MULTIPLE_CALLBACK,Zc4=ZA.ERR_STREAM_CANNOT_PIPE,Kc4=ZA.ERR_STREAM_DESTROYED,Uc4=ZA.ERR_STREAM_NULL_VALUES,Hc4=ZA.ERR_STREAM_WRITE_AFTER_END,zc4=ZA.ERR_UNKNOWN_ENCODING,nR=N20.errorOrDestroy;GL()(n7,u91);function Vc4(){}function Nk($,Y,X){if(iR=iR||KL(),$=$||{},typeof X!=="boolean")X=Y instanceof iR;if(this.objectMode=!!$.objectMode,X)this.objectMode=this.objectMode||!!$.writableObjectMode;this.highWaterMark=Gc4(this,$,"writableHighWaterMark",X),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var G=$.decodeStrings===!1;this.decodeStrings=!G,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(J){Oc4(Y,J)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new m91(this)}Nk.prototype.getBuffer=function(){var Y=this.bufferedRequest,X=[];while(Y)X.push(Y),Y=Y.next;return X};(function(){try{Object.defineProperty(Nk.prototype,"buffer",{get:td4.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var Bi;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")Bi=Function.prototype[Symbol.hasInstance],Object.defineProperty(n7,Symbol.hasInstance,{value:function(Y){if(Bi.call(this,Y))return!0;if(this!==n7)return!1;return Y&&Y._writableState instanceof Nk}});else Bi=function(Y){return Y instanceof this};function n7($){iR=iR||KL();var Y=this instanceof iR;if(!Y&&!Bi.call(n7,this))return new n7($);if(this._writableState=new Nk($,this,Y),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}u91.call(this)}n7.prototype.pipe=function(){nR(this,new Zc4)};function Ac4($,Y){var X=new Hc4;nR($,X),process.nextTick(Y,X)}function Fc4($,Y,X,G){var J;if(X===null)J=new Uc4;else if(typeof X!=="string"&&!Y.objectMode)J=new Jc4("chunk",["string","Buffer"],X);if(J)return nR($,J),process.nextTick(G,J),!1;return!0}n7.prototype.write=function($,Y,X){var G=this._writableState,J=!1,Q=!G.objectMode&&Yc4($);if(Q&&!Oi.isBuffer($))$=$c4($);if(typeof Y==="function")X=Y,Y=null;if(Q)Y="buffer";else if(!Y)Y=G.defaultEncoding;if(typeof X!=="function")X=Vc4;if(G.ending)Ac4(this,X);else if(Q||Fc4(this,G,$,X))G.pendingcb++,J=Nc4(this,G,Q,$,Y,X);return J};n7.prototype.cork=function(){this._writableState.corked++};n7.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)p91(this,$)}};n7.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw new zc4(Y);return this._writableState.defaultEncoding=Y,this};Object.defineProperty(n7.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Dc4($,Y,X){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=Oi.from(Y,X);return Y}Object.defineProperty(n7.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Nc4($,Y,X,G,J,Q){if(!X){var W=Dc4(Y,G,J);if(G!==W)X=!0,J="buffer",G=W}var Z=Y.objectMode?1:G.length;Y.length+=Z;var K=Y.length<Y.highWaterMark;if(!K)Y.needDrain=!0;if(Y.writing||Y.corked){var H=Y.lastBufferedRequest;if(Y.lastBufferedRequest={chunk:G,encoding:J,isBuf:X,callback:Q,next:null},H)H.next=Y.lastBufferedRequest;else Y.bufferedRequest=Y.lastBufferedRequest;Y.bufferedRequestCount+=1}else D20($,Y,!1,Z,G,J,Q);return K}function D20($,Y,X,G,J,Q,W){if(Y.writelen=G,Y.writecb=W,Y.writing=!0,Y.sync=!0,Y.destroyed)Y.onwrite(new Kc4("write"));else if(X)$._writev(J,Y.onwrite);else $._write(J,Q,Y.onwrite);Y.sync=!1}function Lc4($,Y,X,G,J){if(--Y.pendingcb,X)process.nextTick(J,G),process.nextTick(Dk,$,Y),$._writableState.errorEmitted=!0,nR($,G);else J(G),$._writableState.errorEmitted=!0,nR($,G),Dk($,Y)}function Bc4($){$.writing=!1,$.writecb=null,$.length-=$.writelen,$.writelen=0}function Oc4($,Y){var X=$._writableState,G=X.sync,J=X.writecb;if(typeof J!=="function")throw new Wc4;if(Bc4(X),Y)Lc4($,X,G,Y,J);else{var Q=d91(X)||$.destroyed;if(!Q&&!X.corked&&!X.bufferProcessing&&X.bufferedRequest)p91($,X);if(G)process.nextTick(g91,$,X,Q,J);else g91($,X,Q,J)}}function g91($,Y,X,G){if(!X)Ec4($,Y);Y.pendingcb--,G(),Dk($,Y)}function Ec4($,Y){if(Y.length===0&&Y.needDrain)Y.needDrain=!1,$.emit("drain")}function p91($,Y){Y.bufferProcessing=!0;var X=Y.bufferedRequest;if($._writev&&X&&X.next){var G=Y.bufferedRequestCount,J=Array(G),Q=Y.corkedRequestsFree;Q.entry=X;var W=0,Z=!0;while(X){if(J[W]=X,!X.isBuf)Z=!1;X=X.next,W+=1}if(J.allBuffers=Z,D20($,Y,!0,Y.length,J,"",Q.finish),Y.pendingcb++,Y.lastBufferedRequest=null,Q.next)Y.corkedRequestsFree=Q.next,Q.next=null;else Y.corkedRequestsFree=new m91(Y);Y.bufferedRequestCount=0}else{while(X){var{chunk:K,encoding:H,callback:z}=X,V=Y.objectMode?1:K.length;if(D20($,Y,!1,V,K,H,z),X=X.next,Y.bufferedRequestCount--,Y.writing)break}if(X===null)Y.lastBufferedRequest=null}Y.bufferedRequest=X,Y.bufferProcessing=!1}n7.prototype._write=function($,Y,X){X(new Qc4("_write()"))};n7.prototype._writev=null;n7.prototype.end=function($,Y,X){var G=this._writableState;if(typeof $==="function")X=$,$=null,Y=null;else if(typeof Y==="function")X=Y,Y=null;if($!==null&&$!==void 0)this.write($,Y);if(G.corked)G.corked=1,this.uncork();if(!G.ending)qc4(this,G,X);return this};Object.defineProperty(n7.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function d91($){return $.ending&&$.length===0&&$.bufferedRequest===null&&!$.finished&&!$.writing}function Mc4($,Y){$._final(function(X){if(Y.pendingcb--,X)nR($,X);Y.prefinished=!0,$.emit("prefinish"),Dk($,Y)})}function Rc4($,Y){if(!Y.prefinished&&!Y.finalCalled)if(typeof $._final==="function"&&!Y.destroyed)Y.pendingcb++,Y.finalCalled=!0,process.nextTick(Mc4,$,Y);else Y.prefinished=!0,$.emit("prefinish")}function Dk($,Y){var X=d91(Y);if(X){if(Rc4($,Y),Y.pendingcb===0){if(Y.finished=!0,$.emit("finish"),Y.autoDestroy){var G=$._readableState;if(!G||G.autoDestroy&&G.endEmitted)$.destroy()}}}return X}function qc4($,Y,X){if(Y.ending=!0,Dk($,Y),X)if(Y.finished)process.nextTick(X);else $.once("finish",X);Y.ended=!0,$.writable=!1}function Ic4($,Y,X){var G=$.entry;$.entry=null;while(G){var J=G.callback;Y.pendingcb--,J(X),G=G.next}Y.corkedRequestsFree.next=$}Object.defineProperty(n7.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(Y){if(!this._writableState)return;this._writableState.destroyed=Y}});n7.prototype.destroy=N20.destroy;n7.prototype._undestroy=N20.undestroy;n7.prototype._destroy=function($,Y){Y($)}});var L20=o((c65,n91)=>{var Pc4=L0("util"),l91=Li(),{LEVEL:i91}=F$(),Lk=n91.exports=function(Y={}){if(l91.call(this,{objectMode:!0,highWaterMark:Y.highWaterMark}),this.format=Y.format,this.level=Y.level,this.handleExceptions=Y.handleExceptions,this.handleRejections=Y.handleRejections,this.silent=Y.silent,Y.log)this.log=Y.log;if(Y.logv)this.logv=Y.logv;if(Y.close)this.close=Y.close;this.once("pipe",(X)=>{this.levels=X.levels,this.parent=X}),this.once("unpipe",(X)=>{if(X===this.parent){if(this.parent=null,this.close)this.close()}})};Pc4.inherits(Lk,l91);Lk.prototype._write=function(Y,X,G){if(this.silent||Y.exception===!0&&!this.handleExceptions)return G(null);let J=this.level||this.parent&&this.parent.level;if(!J||this.levels[J]>=this.levels[Y[i91]]){if(Y&&!this.format)return this.log(Y,G);let Q,W;try{W=this.format.transform(Object.assign({},Y),this.format.options)}catch(Z){Q=Z}if(Q||!W){if(G(),Q)throw Q;return}return this.log(W,G)}return this._writableState.sync=!1,G(null)};Lk.prototype._writev=function(Y,X){if(this.logv){let G=Y.filter(this._accept,this);if(!G.length)return X(null);return this.logv(G,X)}for(let G=0;G<Y.length;G++){if(!this._accept(Y[G]))continue;if(Y[G].chunk&&!this.format){this.log(Y[G].chunk,Y[G].callback);continue}let J,Q;try{Q=this.format.transform(Object.assign({},Y[G].chunk),this.format.options)}catch(W){J=W}if(J||!Q){if(Y[G].callback(),J)throw X(null),J}else this.log(Q,Y[G].callback)}return X(null)};Lk.prototype._accept=function(Y){let X=Y.chunk;if(this.silent)return!1;let G=this.level||this.parent&&this.parent.level;if(X.exception===!0||!G||this.levels[G]>=this.levels[X[i91]]){if(this.handleExceptions||X.exception!==!0)return!0}return!1};Lk.prototype._nop=function(){return}});var O20=o((l65,a91)=>{var wc4=L0("util"),{LEVEL:B20}=F$(),r91=L20(),Bk=a91.exports=function(Y={}){if(r91.call(this,Y),!Y.transport||typeof Y.transport.log!=="function")throw Error("Invalid transport, must be an object with a log method.");this.transport=Y.transport,this.level=this.level||Y.transport.level,this.handleExceptions=this.handleExceptions||Y.transport.handleExceptions,this._deprecated();function X(G){this.emit("error",G,this.transport)}if(!this.transport.__winstonError)this.transport.__winstonError=X.bind(this),this.transport.on("error",this.transport.__winstonError)};wc4.inherits(Bk,r91);Bk.prototype._write=function(Y,X,G){if(this.silent||Y.exception===!0&&!this.handleExceptions)return G(null);if(!this.level||this.levels[this.level]>=this.levels[Y[B20]])this.transport.log(Y[B20],Y.message,Y,this._nop);G(null)};Bk.prototype._writev=function(Y,X){for(let G=0;G<Y.length;G++)if(this._accept(Y[G]))this.transport.log(Y[G].chunk[B20],Y[G].chunk.message,Y[G].chunk,this._nop),Y[G].callback();return X(null)};Bk.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
`))};Bk.prototype.close=function(){if(this.transport.close)this.transport.close();if(this.transport.__winstonError)this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null}});var UL=o((i65,E20)=>{E20.exports=L20();E20.exports.LegacyTransportStream=O20()});var t91=o((n65,o91)=>{var _c4=L0("os"),{LEVEL:s91,MESSAGE:rR}=F$(),jc4=UL();o91.exports=class extends jc4{constructor(Y={}){super(Y);this.name=Y.name||"console",this.stderrLevels=this._stringArrayToSet(Y.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(Y.consoleWarnLevels),this.eol=typeof Y.eol==="string"?Y.eol:_c4.EOL,this.forceConsole=Y.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(Y,X){if(setImmediate(()=>this.emit("logged",Y)),this.stderrLevels[Y[s91]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${Y[rR]}${this.eol}`);else this._consoleError(Y[rR]);if(X)X();return}else if(this.consoleWarnLevels[Y[s91]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${Y[rR]}${this.eol}`);else this._consoleWarn(Y[rR]);if(X)X();return}if(console._stdout&&!this.forceConsole)console._stdout.write(`${Y[rR]}${this.eol}`);else this._consoleLog(Y[rR]);if(X)X()}_stringArrayToSet(Y,X){if(!Y)return{};if(X=X||"Cannot make set from type other than Array of string elements",!Array.isArray(Y))throw Error(X);return Y.reduce((G,J)=>{if(typeof J!=="string")throw Error(X);return G[J]=!0,G},{})}}});var Ei=o((M20,e91)=>{Object.defineProperty(M20,"__esModule",{value:!0});M20.default=Tc4;function Tc4($){return $&&typeof $.length==="number"&&$.length>=0&&$.length%1===0}e91.exports=M20.default});var Y51=o((R20,$51)=>{Object.defineProperty(R20,"__esModule",{value:!0});R20.default=function($){return function(...Y){var X=Y.pop();return $.call(this,Y,X)}};$51.exports=R20.default});var Q51=o((J51)=>{Object.defineProperty(J51,"__esModule",{value:!0});J51.fallback=X51;J51.wrap=G51;var kc4=J51.hasQueueMicrotask=typeof queueMicrotask==="function"&&queueMicrotask,vc4=J51.hasSetImmediate=typeof setImmediate==="function"&&setImmediate,xc4=J51.hasNextTick=typeof process==="object"&&typeof process.nextTick==="function";function X51($){setTimeout($,0)}function G51($){return(Y,...X)=>$(()=>Y(...X))}var Ok;if(kc4)Ok=queueMicrotask;else if(vc4)Ok=setImmediate;else if(xc4)Ok=process.nextTick;else Ok=X51;J51.default=G51(Ok)});var H51=o((q20,U51)=>{Object.defineProperty(q20,"__esModule",{value:!0});q20.default=dc4;var fc4=Y51(),gc4=K51(fc4),mc4=Q51(),uc4=K51(mc4),pc4=HL();function K51($){return $&&$.__esModule?$:{default:$}}function dc4($){if((0,pc4.isAsync)($))return function(...Y){let X=Y.pop(),G=$.apply(this,Y);return W51(G,X)};return(0,gc4.default)(function(Y,X){var G;try{G=$.apply(this,Y)}catch(J){return X(J)}if(G&&typeof G.then==="function")return W51(G,X);else X(null,G)})}function W51($,Y){return $.then((X)=>{Z51(Y,null,X)},(X)=>{Z51(Y,X&&(X instanceof Error||X.message)?X:Error(X))})}function Z51($,Y,X){try{$(Y,X)}catch(G){(0,uc4.default)((J)=>{throw J},G)}}U51.exports=q20.default});var HL=o((V51)=>{Object.defineProperty(V51,"__esModule",{value:!0});V51.isAsyncIterable=V51.isAsyncGenerator=V51.isAsync=void 0;var lc4=H51(),ic4=nc4(lc4);function nc4($){return $&&$.__esModule?$:{default:$}}function z51($){return $[Symbol.toStringTag]==="AsyncFunction"}function rc4($){return $[Symbol.toStringTag]==="AsyncGenerator"}function ac4($){return typeof $[Symbol.asyncIterator]==="function"}function sc4($){if(typeof $!=="function")throw Error("expected a function");return z51($)?(0,ic4.default)($):$}V51.default=sc4;V51.isAsync=z51;V51.isAsyncGenerator=rc4;V51.isAsyncIterable=ac4});var aR=o((I20,F51)=>{Object.defineProperty(I20,"__esModule",{value:!0});I20.default=$l4;function $l4($,Y){if(!Y)Y=$.length;if(!Y)throw Error("arity is undefined");function X(...G){if(typeof G[Y-1]==="function")return $.apply(this,G);return new Promise((J,Q)=>{G[Y-1]=(W,...Z)=>{if(W)return Q(W);J(Z.length>1?Z:Z[0])},$.apply(this,G)})}return X}F51.exports=I20.default});var N51=o((w20,D51)=>{Object.defineProperty(w20,"__esModule",{value:!0});var Xl4=Ei(),Gl4=P20(Xl4),Jl4=HL(),Ql4=P20(Jl4),Wl4=aR(),Zl4=P20(Wl4);function P20($){return $&&$.__esModule?$:{default:$}}w20.default=(0,Zl4.default)(($,Y,X)=>{var G=(0,Gl4.default)(Y)?[]:{};$(Y,(J,Q,W)=>{(0,Ql4.default)(J)((Z,...K)=>{if(K.length<2)[K]=K;G[Q]=K,W(Z)})},(J)=>X(J,G))},3);D51.exports=w20.default});var j20=o((_20,L51)=>{Object.defineProperty(_20,"__esModule",{value:!0});_20.default=Ul4;function Ul4($){function Y(...X){if($===null)return;var G=$;$=null,G.apply(this,X)}return Object.assign(Y,$),Y}L51.exports=_20.default});var O51=o((T20,B51)=>{Object.defineProperty(T20,"__esModule",{value:!0});T20.default=function($){return $[Symbol.iterator]&&$[Symbol.iterator]()};B51.exports=T20.default});var R51=o((C20,M51)=>{Object.defineProperty(C20,"__esModule",{value:!0});C20.default=Ol4;var Vl4=Ei(),Al4=E51(Vl4),Fl4=O51(),Dl4=E51(Fl4);function E51($){return $&&$.__esModule?$:{default:$}}function Nl4($){var Y=-1,X=$.length;return function(){return++Y<X?{value:$[Y],key:Y}:null}}function Ll4($){var Y=-1;return function(){var G=$.next();if(G.done)return null;return Y++,{value:G.value,key:Y}}}function Bl4($){var Y=$?Object.keys($):[],X=-1,G=Y.length;return function J(){var Q=Y[++X];if(Q==="__proto__")return J();return X<G?{value:$[Q],key:Q}:null}}function Ol4($){if((0,Al4.default)($))return Nl4($);var Y=(0,Dl4.default)($);return Y?Ll4(Y):Bl4($)}M51.exports=C20.default});var k20=o((S20,q51)=>{Object.defineProperty(S20,"__esModule",{value:!0});S20.default=Ml4;function Ml4($){return function(...Y){if($===null)throw Error("Callback was already called.");var X=$;$=null,X.apply(this,Y)}}q51.exports=S20.default});var Mi=o((v20,I51)=>{Object.defineProperty(v20,"__esModule",{value:!0});var ql4={};v20.default=ql4;I51.exports=v20.default});var w51=o((x20,P51)=>{Object.defineProperty(x20,"__esModule",{value:!0});x20.default=jl4;var Pl4=Mi(),wl4=_l4(Pl4);function _l4($){return $&&$.__esModule?$:{default:$}}function jl4($,Y,X,G){let J=!1,Q=!1,W=!1,Z=0,K=0;function H(){if(Z>=Y||W||J)return;W=!0,$.next().then(({value:A,done:F})=>{if(Q||J)return;if(W=!1,F){if(J=!0,Z<=0)G(null);return}Z++,X(A,K,z),K++,H()}).catch(V)}function z(A,F){if(Z-=1,Q)return;if(A)return V(A);if(A===!1){J=!0,Q=!0;return}if(F===wl4.default||J&&Z<=0)return J=!0,G(null);H()}function V(A){if(Q)return;W=!1,J=!0,G(A)}H()}P51.exports=x20.default});var C51=o((y20,T51)=>{Object.defineProperty(y20,"__esModule",{value:!0});var Cl4=j20(),Sl4=Ek(Cl4),kl4=R51(),vl4=Ek(kl4),xl4=k20(),yl4=Ek(xl4),_51=HL(),bl4=w51(),j51=Ek(bl4),hl4=Mi(),fl4=Ek(hl4);function Ek($){return $&&$.__esModule?$:{default:$}}y20.default=($)=>{return(Y,X,G)=>{if(G=(0,Sl4.default)(G),$<=0)throw RangeError("concurrency limit cannot be less than 1");if(!Y)return G(null);if((0,_51.isAsyncGenerator)(Y))return(0,j51.default)(Y,$,X,G);if((0,_51.isAsyncIterable)(Y))return(0,j51.default)(Y[Symbol.asyncIterator](),$,X,G);var J=(0,vl4.default)(Y),Q=!1,W=!1,Z=0,K=!1;function H(V,A){if(W)return;if(Z-=1,V)Q=!0,G(V);else if(V===!1)Q=!0,W=!0;else if(A===fl4.default||Q&&Z<=0)return Q=!0,G(null);else if(!K)z()}function z(){K=!0;while(Z<$&&!Q){var V=J();if(V===null){if(Q=!0,Z<=0)G(null);return}Z+=1,X(V.value,V.key,(0,yl4.default)(H))}K=!1}z()}};T51.exports=y20.default});var f20=o((h20,S51)=>{Object.defineProperty(h20,"__esModule",{value:!0});var ml4=C51(),ul4=b20(ml4),pl4=HL(),dl4=b20(pl4),cl4=aR(),ll4=b20(cl4);function b20($){return $&&$.__esModule?$:{default:$}}function il4($,Y,X,G){return(0,ul4.default)(Y)($,(0,dl4.default)(X),G)}h20.default=(0,ll4.default)(il4,4);S51.exports=h20.default});var x51=o((g20,v51)=>{Object.defineProperty(g20,"__esModule",{value:!0});var rl4=f20(),al4=k51(rl4),sl4=aR(),ol4=k51(sl4);function k51($){return $&&$.__esModule?$:{default:$}}function tl4($,Y,X){return(0,al4.default)($,1,Y,X)}g20.default=(0,ol4.default)(tl4,3);v51.exports=g20.default});var h51=o((m20,b51)=>{Object.defineProperty(m20,"__esModule",{value:!0});m20.default=Ji4;var $i4=N51(),Yi4=y51($i4),Xi4=x51(),Gi4=y51(Xi4);function y51($){return $&&$.__esModule?$:{default:$}}function Ji4($,Y){return(0,Yi4.default)(Gi4.default,$,Y)}b51.exports=m20.default});var u20=o((e65,g51)=>{g51.exports=gH;var Ri=GA().codes,Wi4=Ri.ERR_METHOD_NOT_IMPLEMENTED,Zi4=Ri.ERR_MULTIPLE_CALLBACK,Ki4=Ri.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ui4=Ri.ERR_TRANSFORM_WITH_LENGTH_0,qi=KL();GL()(gH,qi);function Hi4($,Y){var X=this._transformState;X.transforming=!1;var G=X.writecb;if(G===null)return this.emit("error",new Zi4);if(X.writechunk=null,X.writecb=null,Y!=null)this.push(Y);G($);var J=this._readableState;if(J.reading=!1,J.needReadable||J.length<J.highWaterMark)this._read(J.highWaterMark)}function gH($){if(!(this instanceof gH))return new gH($);if(qi.call(this,$),this._transformState={afterTransform:Hi4.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,$){if(typeof $.transform==="function")this._transform=$.transform;if(typeof $.flush==="function")this._flush=$.flush}this.on("prefinish",zi4)}function zi4(){var $=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(Y,X){f51($,Y,X)});else f51(this,null,null)}gH.prototype.push=function($,Y){return this._transformState.needTransform=!1,qi.prototype.push.call(this,$,Y)};gH.prototype._transform=function($,Y,X){X(new Wi4("_transform()"))};gH.prototype._write=function($,Y,X){var G=this._transformState;if(G.writecb=X,G.writechunk=$,G.writeencoding=Y,!G.transforming){var J=this._readableState;if(G.needTransform||J.needReadable||J.length<J.highWaterMark)this._read(J.highWaterMark)}};gH.prototype._read=function($){var Y=this._transformState;if(Y.writechunk!==null&&!Y.transforming)Y.transforming=!0,this._transform(Y.writechunk,Y.writeencoding,Y.afterTransform);else Y.needTransform=!0};gH.prototype._destroy=function($,Y){qi.prototype._destroy.call(this,$,function(X){Y(X)})};function f51($,Y,X){if(Y)return $.emit("error",Y);if(X!=null)$.push(X);if($._writableState.length)throw new Ui4;if($._transformState.transforming)throw new Ki4;return $.push(null)}});var p51=o(($85,u51)=>{u51.exports=Mk;var m51=u20();GL()(Mk,m51);function Mk($){if(!(this instanceof Mk))return new Mk($);m51.call(this,$)}Mk.prototype._transform=function($,Y,X){X(null,$)}});var n51=o((Y85,i51)=>{var p20;function Vi4($){var Y=!1;return function(){if(Y)return;Y=!0,$.apply(void 0,arguments)}}var l51=GA().codes,Ai4=l51.ERR_MISSING_ARGS,Fi4=l51.ERR_STREAM_DESTROYED;function d51($){if($)throw $}function Di4($){return $.setHeader&&typeof $.abort==="function"}function Ni4($,Y,X,G){G=Vi4(G);var J=!1;if($.on("close",function(){J=!0}),p20===void 0)p20=Hi();p20($,{readable:Y,writable:X},function(W){if(W)return G(W);J=!0,G()});var Q=!1;return function(W){if(J)return;if(Q)return;if(Q=!0,Di4($))return $.abort();if(typeof $.destroy==="function")return $.destroy();G(W||new Fi4("pipe"))}}function c51($){$()}function Li4($,Y){return $.pipe(Y)}function Bi4($){if(!$.length)return d51;if(typeof $[$.length-1]!=="function")return d51;return $.pop()}function Oi4(){for(var $=arguments.length,Y=Array($),X=0;X<$;X++)Y[X]=arguments[X];var G=Bi4(Y);if(Array.isArray(Y[0]))Y=Y[0];if(Y.length<2)throw new Ai4("streams");var J,Q=Y.map(function(W,Z){var K=Z<Y.length-1,H=Z>0;return Ni4(W,K,H,function(z){if(!J)J=z;if(z)Q.forEach(c51);if(K)return;Q.forEach(c51),G(J)})});return Y.reduce(Li4)}i51.exports=Oi4});var zL=o((HZ,qk)=>{var Rk=L0("stream");if(process.env.READABLE_STREAM==="disable"&&Rk)qk.exports=Rk.Readable,Object.assign(qk.exports,Rk),qk.exports.Stream=Rk;else HZ=qk.exports=A20(),HZ.Stream=Rk||HZ,HZ.Readable=HZ,HZ.Writable=Li(),HZ.Duplex=KL(),HZ.Transform=u20(),HZ.PassThrough=p51(),HZ.finished=Hi(),HZ.pipeline=n51()});var s51=o((X85,a51)=>{var sR=[],Ik=[],d20=function(){};function l20($){if(~sR.indexOf($))return!1;return sR.push($),!0}function i20($){d20=$}function Ei4($){var Y=[];for(var X=0;X<sR.length;X++){if(sR[X].async){Y.push(sR[X]);continue}if(sR[X]($))return!0}if(!Y.length)return!1;return new Promise(function(J){Promise.all(Y.map(function(W){return W($)})).then(function(W){J(W.some(Boolean))})})}function n20($){if(~Ik.indexOf($))return!1;return Ik.push($),!0}function c20(){d20.apply(d20,arguments)}function r51($){for(var Y=0;Y<Ik.length;Y++)$=Ik[Y].apply(Ik[Y],arguments);return $}function r20($,Y){var X=Object.prototype.hasOwnProperty;for(var G in Y)if(X.call(Y,G))$[G]=Y[G];return $}function Mi4($){return $.enabled=!1,$.modify=n20,$.set=i20,$.use=l20,r20(function(){return!1},$)}function Ri4($){function Y(){var X=Array.prototype.slice.call(arguments,0);return c20.call(c20,$,r51(X,$)),!0}return $.enabled=!0,$.modify=n20,$.set=i20,$.use=l20,r20(Y,$)}a51.exports=function(Y){return Y.introduce=r20,Y.enabled=Ei4,Y.process=r51,Y.modify=n20,Y.write=c20,Y.nope=Mi4,Y.yep=Ri4,Y.set=i20,Y.use=l20,Y}});var Pk=o((G85,o51)=>{var qi4=s51(),Ii4=qi4(function $(Y,X){if(X=X||{},X.namespace=Y,X.prod=!0,X.dev=!1,!(X.force||$.force))return $.nope(X);return $.yep(X)});o51.exports=Ii4});var e51=o((J85,t51)=>{var a20=L0("fs"),{StringDecoder:Pi4}=L0("string_decoder"),{Stream:wi4}=zL();function _i4(){}t51.exports=($,Y)=>{let X=Buffer.alloc(65536),G=new Pi4("utf8"),J=new wi4,Q="",W=0,Z=0;if($.start===-1)delete $.start;if(J.readable=!0,J.destroy=()=>{J.destroyed=!0,J.emit("end"),J.emit("close")},a20.open($.file,"a+","0644",(K,H)=>{if(K){if(!Y)J.emit("error",K);else Y(K);J.destroy();return}(function z(){if(J.destroyed){a20.close(H,_i4);return}return a20.read(H,X,0,X.length,W,(V,A)=>{if(V){if(!Y)J.emit("error",V);else Y(V);J.destroy();return}if(!A){if(Q){if($.start==null||Z>$.start)if(!Y)J.emit("line",Q);else Y(null,Q);Z++,Q=""}return setTimeout(z,1000)}let F=G.write(X.slice(0,A));if(!Y)J.emit("data",F);F=(Q+F).split(/\n+/);let N=F.length-1,D=0;for(;D<N;D++){if($.start==null||Z>$.start)if(!Y)J.emit("line",F[D]);else Y(null,F[D]);Z++}return Q=F[N],W+=A,z()})})()}),!Y)return J;return J.destroy}});var G71=o((Q85,X71)=>{var gJ=L0("fs"),_Y=L0("path"),$71=h51(),ji4=L0("zlib"),{MESSAGE:Ti4}=F$(),{Stream:Ci4,PassThrough:Y71}=zL(),Si4=UL(),k2=Pk()("winston:file"),ki4=L0("os"),vi4=e51();X71.exports=class extends Si4{constructor(Y={}){super(Y);this.name=Y.name||"file";function X(G,...J){J.slice(1).forEach((Q)=>{if(Y[Q])throw Error(`Cannot set ${Q} and ${G} together`)})}if(this._stream=new Y71,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),Y.filename||Y.dirname)X("filename or dirname","stream"),this._basename=this.filename=Y.filename?_Y.basename(Y.filename):"winston.log",this.dirname=Y.dirname||_Y.dirname(Y.filename),this.options=Y.options||{flags:"a"};else if(Y.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),X("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(Y.stream)),this.dirname=_Y.dirname(this._dest.path);else throw Error("Cannot log to file without filename or stream.");if(this.maxsize=Y.maxsize||null,this.rotationFormat=Y.rotationFormat||!1,this.zippedArchive=Y.zippedArchive||!1,this.maxFiles=Y.maxFiles||null,this.eol=typeof Y.eol==="string"?Y.eol:ki4.EOL,this.tailable=Y.tailable||!1,this.lazy=Y.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname)this._createLogDirIfNotExist(this.dirname);if(!this.lazy)this.open()}finishIfEnding(){if(this._ending)if(this._opening)this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())});else this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}_final(Y){if(this._opening){this.once("open",()=>this._final(Y));return}if(this._stream.end(),!this._dest)return Y();if(this._dest.writableFinished)return Y();this._dest.once("finish",Y),this._dest.once("error",Y)}log(Y,X=()=>{}){if(this.silent)return X(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(Y,X)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(Y,X)});return}if(this.lazy){if(!this._fileExist){if(!this._opening)this.open();this.once("open",()=>{this._fileExist=!0,this.log(Y,X);return});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{if(!this._opening)this.open();this.once("open",()=>{this.log(Y,X);return});return});return}}let G=`${Y[Ti4]}${this.eol}`,J=Buffer.byteLength(G);function Q(){if(this._size+=J,this._pendingSize-=J,k2("logged %s %s",this._size,G),this.emit("logged",Y),this._rotate)return;if(this._opening)return;if(!this._needsNewFile())return;if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}if(this._pendingSize+=J,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize))this.rotatedWhileOpening=!0;let W=this._stream.write(G,Q.bind(this));if(!W)this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,X()});else X();return k2("written",W,this._drain),this.finishIfEnding(),W}query(Y,X){if(typeof Y==="function")X=Y,Y={};Y=V(Y);let G=_Y.join(this.dirname,this.filename),J="",Q=[],W=0,Z=gJ.createReadStream(G,{encoding:"utf8"});Z.on("error",(A)=>{if(Z.readable)Z.destroy();if(!X)return;return A.code!=="ENOENT"?X(A):X(null,Q)}),Z.on("data",(A)=>{A=(J+A).split(/\n+/);let F=A.length-1,N=0;for(;N<F;N++){if(!Y.start||W>=Y.start)K(A[N]);W++}J=A[F]}),Z.on("close",()=>{if(J)K(J,!0);if(Y.order==="desc")Q=Q.reverse();if(X)X(null,Q)});function K(A,F){try{let N=JSON.parse(A);if(z(N))H(N)}catch(N){if(!F)Z.emit("error",N)}}function H(A){if(Y.rows&&Q.length>=Y.rows&&Y.order!=="desc"){if(Z.readable)Z.destroy();return}if(Y.fields)A=Y.fields.reduce((F,N)=>{return F[N]=A[N],F},{});if(Y.order==="desc"){if(Q.length>=Y.rows)Q.shift()}Q.push(A)}function z(A){if(!A)return;if(typeof A!=="object")return;let F=new Date(A.timestamp);if(Y.from&&F<Y.from||Y.until&&F>Y.until||Y.level&&Y.level!==A.level)return;return!0}function V(A){if(A=A||{},A.rows=A.rows||A.limit||10,A.start=A.start||0,A.until=A.until||new Date,typeof A.until!=="object")A.until=new Date(A.until);if(A.from=A.from||A.until-86400000,typeof A.from!=="object")A.from=new Date(A.from);return A.order=A.order||"desc",A}}stream(Y={}){let X=_Y.join(this.dirname,this.filename),G=new Ci4,J={file:X,start:Y.start};return G.destroy=vi4(J,(Q,W)=>{if(Q)return G.emit("error",Q);try{G.emit("data",W),W=JSON.parse(W),G.emit("log",W)}catch(Z){G.emit("error",Z)}}),G}open(){if(!this.filename)return;if(this._opening)return;this._opening=!0,this.stat((Y,X)=>{if(Y)return this.emit("error",Y);k2("stat done: %s { size: %s }",this.filename,X),this._size=X,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{if(!this._stream.emit("rotate"))this._rotate=!1})})}stat(Y){let X=this._getFile(),G=_Y.join(this.dirname,X);gJ.stat(G,(J,Q)=>{if(J&&J.code==="ENOENT")return k2("ENOENT\xA0ok",G),this.filename=X,Y(null,0);if(J)return k2(`err ${J.code} ${G}`),Y(J);if(!Q||this._needsNewFile(Q.size))return this._incFile(()=>this.stat(Y));this.filename=X,Y(null,Q.size)})}close(Y){if(!this._stream)return;this._stream.end(()=>{if(Y)Y();this.emit("flush"),this.emit("closed")})}_needsNewFile(Y){return Y=Y||this._size,this.maxsize&&Y>=this.maxsize}_onError(Y){this.emit("error",Y)}_setupStream(Y){return Y.on("error",this._onError),Y}_cleanupStream(Y){return Y.removeListener("error",this._onError),Y.destroy(),Y}_rotateFile(){this._incFile(()=>this.open())}_endStream(Y=()=>{}){if(this._dest)this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),Y()});else Y()}_createStream(Y){let X=_Y.join(this.dirname,this.filename);k2("create stream start",X,this.options);let G=gJ.createWriteStream(X,this.options).on("error",(J)=>k2(J)).on("close",()=>k2("close",G.path,G.bytesWritten)).on("open",()=>{if(k2("file open ok",X),this.emit("open",X),Y.pipe(G),this.rotatedWhileOpening)this._stream=new Y71,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(G),Y.end()});return k2("create stream ok",X),G}_incFile(Y){k2("_incFile",this.filename);let X=_Y.extname(this._basename),G=_Y.basename(this._basename,X),J=[];if(this.zippedArchive)J.push(function(Q){let W=this._created>0&&!this.tailable?this._created:"";this._compressFile(_Y.join(this.dirname,`${G}${W}${X}`),_Y.join(this.dirname,`${G}${W}${X}.gz`),Q)}.bind(this));J.push(function(Q){if(!this.tailable)this._created+=1,this._checkMaxFilesIncrementing(X,G,Q);else this._checkMaxFilesTailable(X,G,Q)}.bind(this)),$71(J,Y)}_getFile(){let Y=_Y.extname(this._basename),X=_Y.basename(this._basename,Y),G=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${X}${G}${Y}`:`${X}${Y}`}_checkMaxFilesIncrementing(Y,X,G){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(G);let J=this._created-this.maxFiles,Q=J!==0?J:"",W=this.zippedArchive?".gz":"",Z=`${X}${Q}${Y}${W}`,K=_Y.join(this.dirname,Z);gJ.unlink(K,G)}_checkMaxFilesTailable(Y,X,G){let J=[];if(!this.maxFiles)return;let Q=this.zippedArchive?".gz":"";for(let W=this.maxFiles-1;W>1;W--)J.push(function(Z,K){let H=`${X}${Z-1}${Y}${Q}`,z=_Y.join(this.dirname,H);gJ.exists(z,(V)=>{if(!V)return K(null);H=`${X}${Z}${Y}${Q}`,gJ.rename(z,_Y.join(this.dirname,H),K)})}.bind(this,W));$71(J,()=>{gJ.rename(_Y.join(this.dirname,`${X}${Y}${Q}`),_Y.join(this.dirname,`${X}1${Y}${Q}`),G)})}_compressFile(Y,X,G){gJ.access(Y,gJ.F_OK,(J)=>{if(J)return G();var Q=ji4.createGzip(),W=gJ.createReadStream(Y),Z=gJ.createWriteStream(X);Z.on("finish",()=>{gJ.unlink(Y,G)}),W.pipe(Q).pipe(Z)})}_createLogDirIfNotExist(Y){if(!gJ.existsSync(Y))gJ.mkdirSync(Y,{recursive:!0})}}});var Q71=o((W85,J71)=>{var xi4=L0("http"),yi4=L0("https"),{Stream:bi4}=zL(),hi4=UL(),{configure:fi4}=Zk();J71.exports=class extends hi4{constructor(Y={}){super(Y);if(this.options=Y,this.name=Y.name||"http",this.ssl=!!Y.ssl,this.host=Y.host||"localhost",this.port=Y.port,this.auth=Y.auth,this.path=Y.path||"",this.maximumDepth=Y.maximumDepth,this.agent=Y.agent,this.headers=Y.headers||{},this.headers["content-type"]="application/json",this.batch=Y.batch||!1,this.batchInterval=Y.batchInterval||5000,this.batchCount=Y.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},!this.port)this.port=this.ssl?443:80}log(Y,X){if(this._request(Y,null,null,(G,J)=>{if(J&&J.statusCode!==200)G=Error(`Invalid HTTP Status Code: ${J.statusCode}`);if(G)this.emit("warn",G);else this.emit("logged",Y)}),X)setImmediate(X)}query(Y,X){if(typeof Y==="function")X=Y,Y={};Y={method:"query",params:this.normalizeQuery(Y)};let G=Y.params.auth||null;delete Y.params.auth;let J=Y.params.path||null;delete Y.params.path,this._request(Y,G,J,(Q,W,Z)=>{if(W&&W.statusCode!==200)Q=Error(`Invalid HTTP Status Code: ${W.statusCode}`);if(Q)return X(Q);if(typeof Z==="string")try{Z=JSON.parse(Z)}catch(K){return X(K)}X(null,Z)})}stream(Y={}){let X=new bi4;Y={method:"stream",params:Y};let G=Y.params.path||null;delete Y.params.path;let J=Y.params.auth||null;delete Y.params.auth;let Q="",W=this._request(Y,J,G);return X.destroy=()=>W.destroy(),W.on("data",(Z)=>{Z=(Q+Z).split(/\n+/);let K=Z.length-1,H=0;for(;H<K;H++)try{X.emit("log",JSON.parse(Z[H]))}catch(z){X.emit("error",z)}Q=Z[K]}),W.on("error",(Z)=>X.emit("error",Z)),X}_request(Y,X,G,J){if(Y=Y||{},X=X||this.auth,G=G||this.path||"",this.batch)this._doBatch(Y,J,X,G);else this._doRequest(Y,J,X,G)}_doBatch(Y,X,G,J){if(this.batchOptions.push(Y),this.batchOptions.length===1){let Q=this;this.batchCallback=X,this.batchTimeoutID=setTimeout(function(){Q.batchTimeoutID=-1,Q._doBatchRequest(Q.batchCallback,G,J)},this.batchInterval)}if(this.batchOptions.length===this.batchCount)this._doBatchRequest(this.batchCallback,G,J)}_doBatchRequest(Y,X,G){if(this.batchTimeoutID>0)clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1;let J=this.batchOptions.slice();this.batchOptions=[],this._doRequest(J,Y,X,G)}_doRequest(Y,X,G,J){let Q=Object.assign({},this.headers);if(G&&G.bearer)Q.Authorization=`Bearer ${G.bearer}`;let W=(this.ssl?yi4:xi4).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${J.replace(/^\//,"")}`,headers:Q,auth:G&&G.username&&G.password?`${G.username}:${G.password}`:"",agent:this.agent});W.on("error",X),W.on("response",(K)=>K.on("end",()=>X(null,K)).resume());let Z=fi4({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});W.end(Buffer.from(Z(Y,this.options.replacer),"utf8"))}}});var s20=o((Z85,W71)=>{var m3=($)=>$!==null&&typeof $==="object"&&typeof $.pipe==="function";m3.writable=($)=>m3($)&&$.writable!==!1&&typeof $._write==="function"&&typeof $._writableState==="object";m3.readable=($)=>m3($)&&$.readable!==!1&&typeof $._read==="function"&&typeof $._readableState==="object";m3.duplex=($)=>m3.writable($)&&m3.readable($);m3.transform=($)=>m3.duplex($)&&typeof $._transform==="function";W71.exports=m3});var K71=o((K85,Z71)=>{var gi4=s20(),{MESSAGE:mi4}=F$(),ui4=L0("os"),pi4=UL();Z71.exports=class extends pi4{constructor(Y={}){super(Y);if(!Y.stream||!gi4(Y.stream))throw Error("options.stream is required.");this._stream=Y.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=Y.stream._writableState.objectMode,this.eol=typeof Y.eol==="string"?Y.eol:ui4.EOL}log(Y,X){if(setImmediate(()=>this.emit("logged",Y)),this.isObjectMode){if(this._stream.write(Y),X)X();return}if(this._stream.write(`${Y[mi4]}${this.eol}`),X)X();return}}});var U71=o((wk)=>{Object.defineProperty(wk,"Console",{configurable:!0,enumerable:!0,get(){return t91()}});Object.defineProperty(wk,"File",{configurable:!0,enumerable:!0,get(){return G71()}});Object.defineProperty(wk,"Http",{configurable:!0,enumerable:!0,get(){return Q71()}});Object.defineProperty(wk,"Stream",{configurable:!0,enumerable:!0,get(){return K71()}})});var Pi=o((di4)=>{var Ii=cZ0(),{configs:o20}=F$();di4.cli=Ii.levels(o20.cli);di4.npm=Ii.levels(o20.npm);di4.syslog=Ii.levels(o20.syslog);di4.addColors=Ii.levels});var z71=o((t20,H71)=>{Object.defineProperty(t20,"__esModule",{value:!0});var ri4=Ei(),ai4=VL(ri4),si4=Mi(),oi4=VL(si4),ti4=f20(),ei4=VL(ti4),$n4=j20(),Yn4=VL($n4),Xn4=k20(),Gn4=VL(Xn4),Jn4=HL(),Qn4=VL(Jn4),Wn4=aR(),Zn4=VL(Wn4);function VL($){return $&&$.__esModule?$:{default:$}}function Kn4($,Y,X){X=(0,Yn4.default)(X);var G=0,J=0,{length:Q}=$,W=!1;if(Q===0)X(null);function Z(K,H){if(K===!1)W=!0;if(W===!0)return;if(K)X(K);else if(++J===Q||H===oi4.default)X(null)}for(;G<Q;G++)Y($[G],G,(0,Gn4.default)(Z))}function Un4($,Y,X){return(0,ei4.default)($,1/0,Y,X)}function Hn4($,Y,X){var G=(0,ai4.default)($)?Kn4:Un4;return G($,(0,Qn4.default)(Y),X)}t20.default=(0,Zn4.default)(Hn4,3);H71.exports=t20.default});var A71=o((e20,V71)=>{Object.defineProperty(e20,"__esModule",{value:!0});e20.default=Vn4;function Vn4($){return(Y,X,G)=>$(Y,G)}V71.exports=e20.default});var _i=o(($K0,F71)=>{Object.defineProperty($K0,"__esModule",{value:!0});var Fn4=z71(),Dn4=wi(Fn4),Nn4=A71(),Ln4=wi(Nn4),Bn4=HL(),On4=wi(Bn4),En4=aR(),Mn4=wi(En4);function wi($){return $&&$.__esModule?$:{default:$}}function Rn4($,Y,X){return(0,Dn4.default)($,(0,Ln4.default)((0,On4.default)(Y)),X)}$K0.default=(0,Mn4.default)(Rn4,3);F71.exports=$K0.default});var N71=o((z85,D71)=>{var In4=Object.prototype.toString;D71.exports=function(Y){if(typeof Y.displayName==="string"&&Y.constructor.name)return Y.displayName;else if(typeof Y.name==="string"&&Y.name)return Y.name;if(typeof Y==="object"&&Y.constructor&&typeof Y.constructor.name==="string")return Y.constructor.name;var X=Y.toString(),G=In4.call(Y).slice(8,-1);if(G==="Function")X=X.substring(X.indexOf("(")+1,X.indexOf(")"));else X=G;return X||"anonymous"}});var YK0=o((V85,L71)=>{var Pn4=N71();L71.exports=function(Y){var X=0,G;function J(){if(X)return G;return X=1,G=Y.apply(this,arguments),Y=null,G}return J.displayName=Pn4(Y),J}});var XK0=o((jn4)=>{jn4.get=function($){var Y=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var X={},G=Error.prepareStackTrace;Error.prepareStackTrace=function(Q,W){return W},Error.captureStackTrace(X,$||jn4.get);var J=X.stack;return Error.prepareStackTrace=G,Error.stackTraceLimit=Y,J};jn4.parse=function($){if(!$.stack)return[];var Y=this,X=$.stack.split(`
`).slice(1);return X.map(function(G){if(G.match(/^\s*[-]{4,}$/))return Y._createParsedCallSite({fileName:G,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var J=G.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(!J)return;var Q=null,W=null,Z=null,K=null,H=null,z=J[5]==="native";if(J[1]){Z=J[1];var V=Z.lastIndexOf(".");if(Z[V-1]==".")V--;if(V>0){Q=Z.substr(0,V),W=Z.substr(V+1);var A=Q.indexOf(".Module");if(A>0)Z=Z.substr(A+1),Q=Q.substr(0,A)}K=null}if(W)K=Q,H=W;if(W==="<anonymous>")H=null,Z=null;var F={fileName:J[2]||null,lineNumber:parseInt(J[3],10)||null,functionName:Z,typeName:K,methodName:H,columnNumber:parseInt(J[4],10)||null,native:z};return Y._createParsedCallSite(F)}).filter(function(G){return!!G})};function _k($){for(var Y in $)this[Y]=$[Y]}var wn4=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],_n4=["topLevel","eval","native","constructor"];wn4.forEach(function($){_k.prototype[$]=null,_k.prototype["get"+$[0].toUpperCase()+$.substr(1)]=function(){return this[$]}});_n4.forEach(function($){_k.prototype[$]=!1,_k.prototype["is"+$[0].toUpperCase()+$.substr(1)]=function(){return this[$]}});jn4._createParsedCallSite=function($){return new _k($)}});var E71=o((F85,O71)=>{var{Writable:Sn4}=zL();O71.exports=class extends Sn4{constructor(Y){super({objectMode:!0});if(!Y)throw Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=Y}_write(Y,X,G){if(Y.exception)return this.transport.log(Y,G);return G(),!0}}});var JK0=o((D85,q71)=>{var M71=L0("os"),kn4=_i(),GK0=Pk()("winston:exception"),vn4=YK0(),R71=XK0(),xn4=E71();q71.exports=class{constructor(Y){if(!Y)throw Error("Logger is required to handle exceptions");this.logger=Y,this.handlers=new Map}handle(...Y){if(Y.forEach((X)=>{if(Array.isArray(X))return X.forEach((G)=>this._addHandler(G));this._addHandler(X)}),!this.catcher)this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher)}unhandle(){if(this.catcher)process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((Y)=>this.logger.unpipe(Y))}getAllInfo(Y){let X=null;if(Y)X=typeof Y==="string"?Y:Y.message;return{error:Y,level:"error",message:[`uncaughtException: ${X||"(no error message)"}`,Y&&Y.stack||"  No stack trace"].join(`
`),stack:Y&&Y.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(Y)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:M71.loadavg(),uptime:M71.uptime()}}getTrace(Y){return(Y?R71.parse(Y):R71.get()).map((G)=>{return{column:G.getColumnNumber(),file:G.getFileName(),function:G.getFunctionName(),line:G.getLineNumber(),method:G.getMethodName(),native:G.isNative()}})}_addHandler(Y){if(!this.handlers.has(Y)){Y.handleExceptions=!0;let X=new xn4(Y);this.handlers.set(Y,X),this.logger.pipe(X)}}_uncaughtException(Y){let X=this.getAllInfo(Y),G=this._getExceptionHandlers(),J=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(Y):this.logger.exitOnError,Q;if(!G.length&&J)console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),J=!1;function W(){if(GK0("doExit",J),GK0("process._exiting",process._exiting),J&&!process._exiting){if(Q)clearTimeout(Q);process.exit(1)}}if(!G||G.length===0)return process.nextTick(W);if(kn4(G,(Z,K)=>{let H=vn4(K),z=Z.transport||Z;function V(A){return()=>{GK0(A),H()}}z._ending=!0,z.once("finish",V("finished")),z.once("error",V("error"))},()=>J&&W()),this.logger.log(X),J)Q=setTimeout(W,3000)}_getExceptionHandlers(){return this.logger.transports.filter((Y)=>{return(Y.transport||Y).handleExceptions})}}});var P71=o((N85,I71)=>{var{Writable:yn4}=zL();I71.exports=class extends yn4{constructor(Y){super({objectMode:!0});if(!Y)throw Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=Y}_write(Y,X,G){if(Y.rejection)return this.transport.log(Y,G);return G(),!0}}});var WK0=o((L85,j71)=>{var w71=L0("os"),bn4=_i(),QK0=Pk()("winston:rejection"),hn4=YK0(),_71=XK0(),fn4=P71();j71.exports=class{constructor(Y){if(!Y)throw Error("Logger is required to handle rejections");this.logger=Y,this.handlers=new Map}handle(...Y){if(Y.forEach((X)=>{if(Array.isArray(X))return X.forEach((G)=>this._addHandler(G));this._addHandler(X)}),!this.catcher)this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher)}unhandle(){if(this.catcher)process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((Y)=>this.logger.unpipe(Y))}getAllInfo(Y){let X=null;if(Y)X=typeof Y==="string"?Y:Y.message;return{error:Y,level:"error",message:[`unhandledRejection: ${X||"(no error message)"}`,Y&&Y.stack||"  No stack trace"].join(`
`),stack:Y&&Y.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(Y)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:w71.loadavg(),uptime:w71.uptime()}}getTrace(Y){return(Y?_71.parse(Y):_71.get()).map((G)=>{return{column:G.getColumnNumber(),file:G.getFileName(),function:G.getFunctionName(),line:G.getLineNumber(),method:G.getMethodName(),native:G.isNative()}})}_addHandler(Y){if(!this.handlers.has(Y)){Y.handleRejections=!0;let X=new fn4(Y);this.handlers.set(Y,X),this.logger.pipe(X)}}_unhandledRejection(Y){let X=this.getAllInfo(Y),G=this._getRejectionHandlers(),J=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(Y):this.logger.exitOnError,Q;if(!G.length&&J)console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),J=!1;function W(){if(QK0("doExit",J),QK0("process._exiting",process._exiting),J&&!process._exiting){if(Q)clearTimeout(Q);process.exit(1)}}if(!G||G.length===0)return process.nextTick(W);if(bn4(G,(Z,K)=>{let H=hn4(K),z=Z.transport||Z;function V(A){return()=>{QK0(A),H()}}z._ending=!0,z.once("finish",V("finished")),z.once("error",V("error"))},()=>J&&W()),this.logger.log(X),J)Q=setTimeout(W,3000)}_getRejectionHandlers(){return this.logger.transports.filter((Y)=>{return(Y.transport||Y).handleRejections})}}});var S71=o((B85,C71)=>{class T71{constructor($){let Y=ji();if(typeof $!=="object"||Array.isArray($)||!($ instanceof Y))throw Error("Logger is required for profiling");else this.logger=$,this.start=Date.now()}done(...$){if(typeof $[$.length-1]==="function")console.warn("Callback function no longer supported as of winston@3.0.0"),$.pop();let Y=typeof $[$.length-1]==="object"?$.pop():{};return Y.level=Y.level||"info",Y.durationMs=Date.now()-this.start,this.logger.write(Y)}}C71.exports=T71});var ji=o((O85,y71)=>{var{Stream:gn4,Transform:mn4}=zL(),k71=_i(),{LEVEL:u3,SPLAT:v71}=F$(),x71=s20(),un4=JK0(),pn4=WK0(),dn4=O20(),cn4=S71(),{warn:ln4}=iZ0(),in4=Pi(),nn4=/%[scdjifoO%]/g;class ZK0 extends mn4{constructor($){super({objectMode:!0});this.configure($)}child($){let Y=this;return Object.create(Y,{write:{value:function(X){let G=Object.assign({},$,X);if(X instanceof Error)G.stack=X.stack,G.message=X.message,G.cause=X.cause;Y.write(G)}}})}configure({silent:$,format:Y,defaultMeta:X,levels:G,level:J="info",exitOnError:Q=!0,transports:W,colors:Z,emitErrs:K,formatters:H,padLevels:z,rewriters:V,stripColors:A,exceptionHandlers:F,rejectionHandlers:N}={}){if(this.transports.length)this.clear();if(this.silent=$,this.format=Y||this.format||mZ0()(),this.defaultMeta=X||null,this.levels=G||this.levels||in4.npm.levels,this.level=J,this.exceptions)this.exceptions.unhandle();if(this.rejections)this.rejections.unhandle();if(this.exceptions=new un4(this),this.rejections=new pn4(this),this.profilers={},this.exitOnError=Q,W)W=Array.isArray(W)?W:[W],W.forEach((D)=>this.add(D));if(Z||K||H||z||V||A)throw Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
`));if(F)this.exceptions.handle(F);if(N)this.rejections.handle(N)}getHighestLogLevel(){let $=jk(this.levels,this.level);if(!this.transports||this.transports.length===0)return $;return this.transports.reduce((Y,X)=>{let G=jk(this.levels,X.level);return G!==null&&G>Y?G:Y},$)}isLevelEnabled($){let Y=jk(this.levels,$);if(Y===null)return!1;let X=jk(this.levels,this.level);if(X===null)return!1;if(!this.transports||this.transports.length===0)return X>=Y;return this.transports.findIndex((J)=>{let Q=jk(this.levels,J.level);if(Q===null)Q=X;return Q>=Y})!==-1}log($,Y,...X){if(arguments.length===1)return $[u3]=$.level,this._addDefaultMeta($),this.write($),this;if(arguments.length===2){if(Y&&typeof Y==="object")return Y[u3]=Y.level=$,this._addDefaultMeta(Y),this.write(Y),this;return Y={[u3]:$,level:$,message:Y},this._addDefaultMeta(Y),this.write(Y),this}let[G]=X;if(typeof G==="object"&&G!==null){if(!(Y&&Y.match&&Y.match(nn4))){let Q=Object.assign({},this.defaultMeta,G,{[u3]:$,[v71]:X,level:$,message:Y});if(G.message)Q.message=`${Q.message} ${G.message}`;if(G.stack)Q.stack=G.stack;if(G.cause)Q.cause=G.cause;return this.write(Q),this}}return this.write(Object.assign({},this.defaultMeta,{[u3]:$,[v71]:X,level:$,message:Y})),this}_transform($,Y,X){if(this.silent)return X();if(!$[u3])$[u3]=$.level;if(!this.levels[$[u3]]&&this.levels[$[u3]]!==0)console.error("[winston] Unknown logger level: %s",$[u3]);if(!this._readableState.pipes)console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",$);try{this.push(this.format.transform($,this.format.options))}finally{this._writableState.sync=!1,X()}}_final($){let Y=this.transports.slice();k71(Y,(X,G)=>{if(!X||X.finished)return setImmediate(G);X.once("finish",G),X.end()},$)}add($){let Y=!x71($)||$.log.length>2?new dn4({transport:$}):$;if(!Y._writableState||!Y._writableState.objectMode)throw Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");if(this._onEvent("error",Y),this._onEvent("warn",Y),this.pipe(Y),$.handleExceptions)this.exceptions.handle();if($.handleRejections)this.rejections.handle();return this}remove($){if(!$)return this;let Y=$;if(!x71($)||$.log.length>2)Y=this.transports.filter((X)=>X.transport===$)[0];if(Y)this.unpipe(Y);return this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){ln4.deprecated("setLevels")}query($,Y){if(typeof $==="function")Y=$,$={};$=$||{};let X={},G=Object.assign({},$.query||{});function J(W,Z){if($.query&&typeof W.formatQuery==="function")$.query=W.formatQuery(G);W.query($,(K,H)=>{if(K)return Z(K);if(typeof W.formatResults==="function")H=W.formatResults(H,$.format);Z(null,H)})}function Q(W,Z){J(W,(K,H)=>{if(Z){if(H=K||H,H)X[W.name]=H;Z()}Z=null})}k71(this.transports.filter((W)=>!!W.query),Q,()=>Y(null,X))}stream($={}){let Y=new gn4,X=[];return Y._streams=X,Y.destroy=()=>{let G=X.length;while(G--)X[G].destroy()},this.transports.filter((G)=>!!G.stream).forEach((G)=>{let J=G.stream($);if(!J)return;X.push(J),J.on("log",(Q)=>{Q.transport=Q.transport||[],Q.transport.push(G.name),Y.emit("log",Q)}),J.on("error",(Q)=>{Q.transport=Q.transport||[],Q.transport.push(G.name),Y.emit("error",Q)})}),Y}startTimer(){return new cn4(this)}profile($,...Y){let X=Date.now();if(this.profilers[$]){let G=this.profilers[$];if(delete this.profilers[$],typeof Y[Y.length-2]==="function")console.warn("Callback function no longer supported as of winston@3.0.0"),Y.pop();let J=typeof Y[Y.length-1]==="object"?Y.pop():{};return J.level=J.level||"info",J.durationMs=X-G,J.message=J.message||$,this.write(J)}return this.profilers[$]=X,this}handleExceptions(...$){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...$)}unhandleExceptions(...$){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...$)}cli(){throw Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
`))}_onEvent($,Y){function X(G){if($==="error"&&!this.transports.includes(Y))this.add(Y);this.emit($,G,Y)}if(!Y["__winston"+$])Y["__winston"+$]=X.bind(this),Y.on($,Y["__winston"+$])}_addDefaultMeta($){if(this.defaultMeta)Object.assign($,this.defaultMeta)}}function jk($,Y){let X=$[Y];if(!X&&X!==0)return null;return X}Object.defineProperty(ZK0.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:$}=this._readableState;return!Array.isArray($)?[$].filter(Boolean):$}});y71.exports=ZK0});var KK0=o((E85,b71)=>{var{LEVEL:rn4}=F$(),an4=Pi(),sn4=ji(),on4=Pk()("winston:create-logger");function tn4($){return"is"+$.charAt(0).toUpperCase()+$.slice(1)+"Enabled"}b71.exports=function($={}){$.levels=$.levels||an4.npm.levels;class Y extends sn4{constructor(G){super(G)}}let X=new Y($);return Object.keys($.levels).forEach(function(G){if(on4('Define prototype method for "%s"',G),G==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}Y.prototype[G]=function(...J){let Q=this||X;if(J.length===1){let[W]=J,Z=W&&W.message&&W||{message:W};return Z.level=Z[rn4]=G,Q._addDefaultMeta(Z),Q.write(Z),this||X}if(J.length===0)return Q.log(G,""),Q;return Q.log(G,...J)},Y.prototype[tn4(G)]=function(){return(this||X).isLevelEnabled(G)}}),X}});var f71=o((M85,h71)=>{var en4=KK0();h71.exports=class{constructor(Y={}){this.loggers=new Map,this.options=Y}add(Y,X){if(!this.loggers.has(Y)){X=Object.assign({},X||this.options);let G=X.transports||this.options.transports;if(G)X.transports=Array.isArray(G)?G.slice():[G];else X.transports=[];let J=en4(X);J.on("close",()=>this._delete(Y)),this.loggers.set(Y,J)}return this.loggers.get(Y)}get(Y,X){return this.add(Y,X)}has(Y){return!!this.loggers.has(Y)}close(Y){if(Y)return this._removeLogger(Y);this.loggers.forEach((X,G)=>this._removeLogger(G))}_removeLogger(Y){if(!this.loggers.has(Y))return;this.loggers.get(Y).close(),this._delete(Y)}_delete(Y){this.loggers.delete(Y)}}});var UK0=o((zZ)=>{var g71=cZ0(),{warn:Tk}=iZ0();zZ.version=t81().version;zZ.transports=U71();zZ.config=Pi();zZ.addColors=g71.levels;zZ.format=g71.format;zZ.createLogger=KK0();zZ.Logger=ji();zZ.ExceptionHandler=JK0();zZ.RejectionHandler=WK0();zZ.Container=f71();zZ.Transport=UL();zZ.loggers=new zZ.Container;var p3=zZ.createLogger();Object.keys(zZ.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(($)=>zZ[$]=(...Y)=>p3[$](...Y));Object.defineProperty(zZ,"level",{get(){return p3.level},set($){p3.level=$}});Object.defineProperty(zZ,"exceptions",{get(){return p3.exceptions}});Object.defineProperty(zZ,"rejections",{get(){return p3.rejections}});["exitOnError"].forEach(($)=>{Object.defineProperty(zZ,$,{get(){return p3[$]},set(Y){p3[$]=Y}})});Object.defineProperty(zZ,"default",{get(){return{exceptionHandlers:p3.exceptionHandlers,rejectionHandlers:p3.rejectionHandlers,transports:p3.transports}}});Tk.deprecated(zZ,"setLevels");Tk.forFunctions(zZ,"useFormat",["cli"]);Tk.forProperties(zZ,"useFormat",["padLevels","stripColors"]);Tk.forFunctions(zZ,"deprecated",["addRewriter","addFilter","clone","extend"]);Tk.forProperties(zZ,"deprecated",["emitErrs","levelLength"])});var r71=o((AL,n71)=>{var HK0=L0("crypto");AL=n71.exports=Ck;function Ck($,Y){return Y=l71($,Y),Ur4($,Y)}AL.sha1=function($){return Ck($)};AL.keys=function($){return Ck($,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})};AL.MD5=function($){return Ck($,{algorithm:"md5",encoding:"hex"})};AL.keysMD5=function($){return Ck($,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var oR=HK0.getHashes?HK0.getHashes().slice():["sha1","md5"];oR.push("passthrough");var d71=["buffer","hex","binary","base64"];function l71($,Y){Y=Y||{};var X={};if(X.algorithm=Y.algorithm||"sha1",X.encoding=Y.encoding||"hex",X.excludeValues=Y.excludeValues?!0:!1,X.algorithm=X.algorithm.toLowerCase(),X.encoding=X.encoding.toLowerCase(),X.ignoreUnknown=Y.ignoreUnknown!==!0?!1:!0,X.respectType=Y.respectType===!1?!1:!0,X.respectFunctionNames=Y.respectFunctionNames===!1?!1:!0,X.respectFunctionProperties=Y.respectFunctionProperties===!1?!1:!0,X.unorderedArrays=Y.unorderedArrays!==!0?!1:!0,X.unorderedSets=Y.unorderedSets===!1?!1:!0,X.unorderedObjects=Y.unorderedObjects===!1?!1:!0,X.replacer=Y.replacer||void 0,X.excludeKeys=Y.excludeKeys||void 0,typeof $>"u")throw Error("Object argument required.");for(var G=0;G<oR.length;++G)if(oR[G].toLowerCase()===X.algorithm.toLowerCase())X.algorithm=oR[G];if(oR.indexOf(X.algorithm)===-1)throw Error('Algorithm "'+X.algorithm+'"  not supported. supported values: '+oR.join(", "));if(d71.indexOf(X.encoding)===-1&&X.algorithm!=="passthrough")throw Error('Encoding "'+X.encoding+'"  not supported. supported values: '+d71.join(", "));return X}function c71($){if(typeof $!=="function")return!1;var Y=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return Y.exec(Function.prototype.toString.call($))!=null}function Ur4($,Y){var X;if(Y.algorithm!=="passthrough")X=HK0.createHash(Y.algorithm);else X=new i71;if(typeof X.write>"u")X.write=X.update,X.end=X.update;var G=zK0(Y,X);if(G.dispatch($),!X.update)X.end("");if(X.digest)return X.digest(Y.encoding==="buffer"?void 0:Y.encoding);var J=X.read();if(Y.encoding==="buffer")return J;return J.toString(Y.encoding)}AL.writeToStream=function($,Y,X){if(typeof X>"u")X=Y,Y={};return Y=l71($,Y),zK0(Y,X).dispatch($)};function zK0($,Y,X){X=X||[];var G=function(J){if(Y.update)return Y.update(J,"utf8");else return Y.write(J,"utf8")};return{dispatch:function(J){if($.replacer)J=$.replacer(J);var Q=typeof J;if(J===null)Q="null";return this["_"+Q](J)},_object:function(J){var Q=/\[object (.*)\]/i,W=Object.prototype.toString.call(J),Z=Q.exec(W);if(!Z)Z="unknown:["+W+"]";else Z=Z[1];Z=Z.toLowerCase();var K=null;if((K=X.indexOf(J))>=0)return this.dispatch("[CIRCULAR:"+K+"]");else X.push(J);if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(J))return G("buffer:"),G(J);if(Z!=="object"&&Z!=="function"&&Z!=="asyncfunction")if(this["_"+Z])this["_"+Z](J);else if($.ignoreUnknown)return G("["+Z+"]");else throw Error('Unknown object type "'+Z+'"');else{var H=Object.keys(J);if($.unorderedObjects)H=H.sort();if($.respectType!==!1&&!c71(J))H.splice(0,0,"prototype","__proto__","constructor");if($.excludeKeys)H=H.filter(function(V){return!$.excludeKeys(V)});G("object:"+H.length+":");var z=this;return H.forEach(function(V){if(z.dispatch(V),G(":"),!$.excludeValues)z.dispatch(J[V]);G(",")})}},_array:function(J,Q){Q=typeof Q<"u"?Q:$.unorderedArrays!==!1;var W=this;if(G("array:"+J.length+":"),!Q||J.length<=1)return J.forEach(function(H){return W.dispatch(H)});var Z=[],K=J.map(function(H){var z=new i71,V=X.slice(),A=zK0($,z,V);return A.dispatch(H),Z=Z.concat(V.slice(X.length)),z.read().toString()});return X=X.concat(Z),K.sort(),this._array(K,!1)},_date:function(J){return G("date:"+J.toJSON())},_symbol:function(J){return G("symbol:"+J.toString())},_error:function(J){return G("error:"+J.toString())},_boolean:function(J){return G("bool:"+J.toString())},_string:function(J){G("string:"+J.length+":"),G(J.toString())},_function:function(J){if(G("fn:"),c71(J))this.dispatch("[native]");else this.dispatch(J.toString());if($.respectFunctionNames!==!1)this.dispatch("function-name:"+String(J.name));if($.respectFunctionProperties)this._object(J)},_number:function(J){return G("number:"+J.toString())},_xml:function(J){return G("xml:"+J.toString())},_null:function(){return G("Null")},_undefined:function(){return G("Undefined")},_regexp:function(J){return G("regex:"+J.toString())},_uint8array:function(J){return G("uint8array:"),this.dispatch(Array.prototype.slice.call(J))},_uint8clampedarray:function(J){return G("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(J))},_int8array:function(J){return G("int8array:"),this.dispatch(Array.prototype.slice.call(J))},_uint16array:function(J){return G("uint16array:"),this.dispatch(Array.prototype.slice.call(J))},_int16array:function(J){return G("int16array:"),this.dispatch(Array.prototype.slice.call(J))},_uint32array:function(J){return G("uint32array:"),this.dispatch(Array.prototype.slice.call(J))},_int32array:function(J){return G("int32array:"),this.dispatch(Array.prototype.slice.call(J))},_float32array:function(J){return G("float32array:"),this.dispatch(Array.prototype.slice.call(J))},_float64array:function(J){return G("float64array:"),this.dispatch(Array.prototype.slice.call(J))},_arraybuffer:function(J){return G("arraybuffer:"),this.dispatch(new Uint8Array(J))},_url:function(J){return G("url:"+J.toString(),"utf8")},_map:function(J){G("map:");var Q=Array.from(J);return this._array(Q,$.unorderedSets!==!1)},_set:function(J){G("set:");var Q=Array.from(J);return this._array(Q,$.unorderedSets!==!1)},_file:function(J){return G("file:"),this.dispatch([J.name,J.size,J.type,J.lastModfied])},_blob:function(){if($.ignoreUnknown)return G("[blob]");throw Error(`Hashing Blob objects is currently not supported
(see https://github.com/puleos/object-hash/issues/26)
Use "options.replacer" or "options.ignoreUnknown"
`)},_domwindow:function(){return G("domwindow")},_bigint:function(J){return G("bigint:"+J.toString())},_process:function(){return G("process")},_timer:function(){return G("timer")},_pipe:function(){return G("pipe")},_tcp:function(){return G("tcp")},_udp:function(){return G("udp")},_tty:function(){return G("tty")},_statwatcher:function(){return G("statwatcher")},_securecontext:function(){return G("securecontext")},_connection:function(){return G("connection")},_zlib:function(){return G("zlib")},_context:function(){return G("context")},_nodescript:function(){return G("nodescript")},_httpparser:function(){return G("httpparser")},_dataview:function(){return G("dataview")},_signal:function(){return G("signal")},_fsevent:function(){return G("fsevent")},_tlswrap:function(){return G("tlswrap")}}}function i71(){return{buf:"",write:function($){this.buf+=$},end:function($){this.buf+=$},read:function(){return this.buf}}}});var a71=o((VK0,tR)=>{//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function($,Y){typeof VK0==="object"&&typeof tR<"u"?tR.exports=Y():typeof define==="function"&&define.amd?define(Y):$.moment=Y()})(VK0,function(){var $;function Y(){return $.apply(null,arguments)}function X(f){$=f}function G(f){return f instanceof Array||Object.prototype.toString.call(f)==="[object Array]"}function J(f){return f!=null&&Object.prototype.toString.call(f)==="[object Object]"}function Q(f,i){return Object.prototype.hasOwnProperty.call(f,i)}function W(f){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(f).length===0;else{var i;for(i in f)if(Q(f,i))return!1;return!0}}function Z(f){return f===void 0}function K(f){return typeof f==="number"||Object.prototype.toString.call(f)==="[object Number]"}function H(f){return f instanceof Date||Object.prototype.toString.call(f)==="[object Date]"}function z(f,i){var W0=[],H0,F0=f.length;for(H0=0;H0<F0;++H0)W0.push(i(f[H0],H0));return W0}function V(f,i){for(var W0 in i)if(Q(i,W0))f[W0]=i[W0];if(Q(i,"toString"))f.toString=i.toString;if(Q(i,"valueOf"))f.valueOf=i.valueOf;return f}function A(f,i,W0,H0){return Tn0(f,i,W0,H0,!0).utc()}function F(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function N(f){if(f._pf==null)f._pf=F();return f._pf}var D;if(Array.prototype.some)D=Array.prototype.some;else D=function(f){var i=Object(this),W0=i.length>>>0,H0;for(H0=0;H0<W0;H0++)if(H0 in i&&f.call(this,i[H0],H0,i))return!0;return!1};function L(f){var i=null,W0=!1,H0=f._d&&!isNaN(f._d.getTime());if(H0){if(i=N(f),W0=D.call(i.parsedDateParts,function(F0){return F0!=null}),H0=i.overflow<0&&!i.empty&&!i.invalidEra&&!i.invalidMonth&&!i.invalidWeekday&&!i.weekdayMismatch&&!i.nullInput&&!i.invalidFormat&&!i.userInvalidated&&(!i.meridiem||i.meridiem&&W0),f._strict)H0=H0&&i.charsLeftOver===0&&i.unusedTokens.length===0&&i.bigHour===void 0}if(Object.isFrozen==null||!Object.isFrozen(f))f._isValid=H0;else return H0;return f._isValid}function B(f){var i=A(NaN);if(f!=null)V(N(i),f);else N(i).userInvalidated=!0;return i}var O=Y.momentProperties=[],E=!1;function M(f,i){var W0,H0,F0,T0=O.length;if(!Z(i._isAMomentObject))f._isAMomentObject=i._isAMomentObject;if(!Z(i._i))f._i=i._i;if(!Z(i._f))f._f=i._f;if(!Z(i._l))f._l=i._l;if(!Z(i._strict))f._strict=i._strict;if(!Z(i._tzm))f._tzm=i._tzm;if(!Z(i._isUTC))f._isUTC=i._isUTC;if(!Z(i._offset))f._offset=i._offset;if(!Z(i._pf))f._pf=N(i);if(!Z(i._locale))f._locale=i._locale;if(T0>0){for(W0=0;W0<T0;W0++)if(H0=O[W0],F0=i[H0],!Z(F0))f[H0]=F0}return f}function R(f){if(M(this,f),this._d=new Date(f._d!=null?f._d.getTime():NaN),!this.isValid())this._d=new Date(NaN);if(E===!1)E=!0,Y.updateOffset(this),E=!1}function q(f){return f instanceof R||f!=null&&f._isAMomentObject!=null}function w(f){if(Y.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn)console.warn("Deprecation warning: "+f)}function I(f,i){var W0=!0;return V(function(){if(Y.deprecationHandler!=null)Y.deprecationHandler(null,f);if(W0){var H0=[],F0,T0,s0,H4=arguments.length;for(T0=0;T0<H4;T0++){if(F0="",typeof arguments[T0]==="object"){F0+=`
[`+T0+"] ";for(s0 in arguments[0])if(Q(arguments[0],s0))F0+=s0+": "+arguments[0][s0]+", ";F0=F0.slice(0,-2)}else F0=arguments[T0];H0.push(F0)}w(f+`
Arguments: `+Array.prototype.slice.call(H0).join("")+`
`+Error().stack),W0=!1}return i.apply(this,arguments)},i)}var P={};function _(f,i){if(Y.deprecationHandler!=null)Y.deprecationHandler(f,i);if(!P[f])w(i),P[f]=!0}Y.suppressDeprecationWarnings=!1,Y.deprecationHandler=null;function C(f){return typeof Function<"u"&&f instanceof Function||Object.prototype.toString.call(f)==="[object Function]"}function k(f){var i,W0;for(W0 in f)if(Q(f,W0))if(i=f[W0],C(i))this[W0]=i;else this["_"+W0]=i;this._config=f,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function S(f,i){var W0=V({},f),H0;for(H0 in i)if(Q(i,H0))if(J(f[H0])&&J(i[H0]))W0[H0]={},V(W0[H0],f[H0]),V(W0[H0],i[H0]);else if(i[H0]!=null)W0[H0]=i[H0];else delete W0[H0];for(H0 in f)if(Q(f,H0)&&!Q(i,H0)&&J(f[H0]))W0[H0]=V({},W0[H0]);return W0}function T(f){if(f!=null)this.set(f)}var v;if(Object.keys)v=Object.keys;else v=function(f){var i,W0=[];for(i in f)if(Q(f,i))W0.push(i);return W0};var x={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function y(f,i,W0){var H0=this._calendar[f]||this._calendar.sameElse;return C(H0)?H0.call(i,W0):H0}function d(f,i,W0){var H0=""+Math.abs(f),F0=i-H0.length,T0=f>=0;return(T0?W0?"+":"":"-")+Math.pow(10,Math.max(0,F0)).toString().substr(1)+H0}var u=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,b=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,g={},p={};function h(f,i,W0,H0){var F0=H0;if(typeof H0==="string")F0=function(){return this[H0]()};if(f)p[f]=F0;if(i)p[i[0]]=function(){return d(F0.apply(this,arguments),i[1],i[2])};if(W0)p[W0]=function(){return this.localeData().ordinal(F0.apply(this,arguments),f)}}function n(f){if(f.match(/\[[\s\S]/))return f.replace(/^\[|\]$/g,"");return f.replace(/\\/g,"")}function t(f){var i=f.match(u),W0,H0;for(W0=0,H0=i.length;W0<H0;W0++)if(p[i[W0]])i[W0]=p[i[W0]];else i[W0]=n(i[W0]);return function(F0){var T0="",s0;for(s0=0;s0<H0;s0++)T0+=C(i[s0])?i[s0].call(F0,f):i[s0];return T0}}function s(f,i){if(!f.isValid())return f.localeData().invalidDate();return i=Z0(i,f.localeData()),g[i]=g[i]||t(i),g[i](f)}function Z0(f,i){var W0=5;function H0(F0){return i.longDateFormat(F0)||F0}b.lastIndex=0;while(W0>=0&&b.test(f))f=f.replace(b,H0),b.lastIndex=0,W0-=1;return f}var X0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function a(f){var i=this._longDateFormat[f],W0=this._longDateFormat[f.toUpperCase()];if(i||!W0)return i;return this._longDateFormat[f]=W0.match(u).map(function(H0){if(H0==="MMMM"||H0==="MM"||H0==="DD"||H0==="dddd")return H0.slice(1);return H0}).join(""),this._longDateFormat[f]}var Q0="Invalid date";function e(){return this._invalidDate}var m="%d",$0=/\d{1,2}/;function Y0(f){return this._ordinal.replace("%d",f)}var K0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function A0(f,i,W0,H0){var F0=this._relativeTime[W0];return C(F0)?F0(f,i,W0,H0):F0.replace(/%d/i,f)}function D0(f,i){var W0=this._relativeTime[f>0?"future":"past"];return C(W0)?W0(i):W0.replace(/%s/i,i)}var O0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function R0(f){return typeof f==="string"?O0[f]||O0[f.toLowerCase()]:void 0}function I0(f){var i={},W0,H0;for(H0 in f)if(Q(f,H0)){if(W0=R0(H0),W0)i[W0]=f[H0]}return i}var g0={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function p0(f){var i=[],W0;for(W0 in f)if(Q(f,W0))i.push({unit:W0,priority:g0[W0]});return i.sort(function(H0,F0){return H0.priority-F0.priority}),i}var U4=/\d/,P1=/\d\d/,d1=/\d{3}/,C0=/\d{4}/,n0=/[+-]?\d{6}/,J0=/\d\d?/,B0=/\d\d\d\d?/,Y1=/\d\d\d\d\d\d?/,c1=/\d{1,3}/,C4=/\d{1,4}/,c4=/[+-]?\d{1,6}/,r4=/\d+/,T6=/[+-]?\d+/,p6=/Z|[+-]\d\d:?\d\d/gi,n6=/Z|[+-]\d\d(?::?\d\d)?/gi,K1=/[+-]?\d+(\.\d{1,3})?/,Q4=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,C6=/^[1-9]\d?/,t4=/^([1-9]\d|\d)/,a1;a1={};function A1(f,i,W0){a1[f]=C(i)?i:function(H0,F0){return H0&&W0?W0:i}}function T1(f,i){if(!Q(a1,f))return new RegExp(R4(f));return a1[f](i._strict,i._locale)}function R4(f){return w4(f.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(i,W0,H0,F0,T0){return W0||H0||F0||T0}))}function w4(f){return f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function A6(f){if(f<0)return Math.ceil(f)||0;else return Math.floor(f)}function K4(f){var i=+f,W0=0;if(i!==0&&isFinite(i))W0=A6(i);return W0}var b4={};function N0(f,i){var W0,H0=i,F0;if(typeof f==="string")f=[f];if(K(i))H0=function(T0,s0){s0[i]=K4(T0)};F0=f.length;for(W0=0;W0<F0;W0++)b4[f[W0]]=H0}function f0(f,i){N0(f,function(W0,H0,F0,T0){F0._w=F0._w||{},i(W0,F0._w,F0,T0)})}function a0(f,i,W0){if(i!=null&&Q(b4,f))b4[f](i,W0._a,W0,f)}function c0(f){return f%4===0&&f%100!==0||f%400===0}var F1=0,E1=1,l4=2,Q1=3,C1=4,f4=5,O6=6,J9=7,o$=8;h("Y",0,0,function(){var f=this.year();return f<=9999?d(f,4):"+"+f}),h(0,["YY",2],0,function(){return this.year()%100}),h(0,["YYYY",4],0,"year"),h(0,["YYYYY",5],0,"year"),h(0,["YYYYYY",6,!0],0,"year"),A1("Y",T6),A1("YY",J0,P1),A1("YYYY",C4,C0),A1("YYYYY",c4,n0),A1("YYYYYY",c4,n0),N0(["YYYYY","YYYYYY"],F1),N0("YYYY",function(f,i){i[F1]=f.length===2?Y.parseTwoDigitYear(f):K4(f)}),N0("YY",function(f,i){i[F1]=Y.parseTwoDigitYear(f)}),N0("Y",function(f,i){i[F1]=parseInt(f,10)});function Y4(f){return c0(f)?366:365}Y.parseTwoDigitYear=function(f){return K4(f)+(K4(f)>68?1900:2000)};var i4=q6("FullYear",!0);function C9(){return c0(this.year())}function q6(f,i){return function(W0){if(W0!=null)return y8(this,f,W0),Y.updateOffset(this,i),this;else return q4(this,f)}}function q4(f,i){if(!f.isValid())return NaN;var{_d:W0,_isUTC:H0}=f;switch(i){case"Milliseconds":return H0?W0.getUTCMilliseconds():W0.getMilliseconds();case"Seconds":return H0?W0.getUTCSeconds():W0.getSeconds();case"Minutes":return H0?W0.getUTCMinutes():W0.getMinutes();case"Hours":return H0?W0.getUTCHours():W0.getHours();case"Date":return H0?W0.getUTCDate():W0.getDate();case"Day":return H0?W0.getUTCDay():W0.getDay();case"Month":return H0?W0.getUTCMonth():W0.getMonth();case"FullYear":return H0?W0.getUTCFullYear():W0.getFullYear();default:return NaN}}function y8(f,i,W0){var H0,F0,T0,s0,H4;if(!f.isValid()||isNaN(W0))return;switch(H0=f._d,F0=f._isUTC,i){case"Milliseconds":return void(F0?H0.setUTCMilliseconds(W0):H0.setMilliseconds(W0));case"Seconds":return void(F0?H0.setUTCSeconds(W0):H0.setSeconds(W0));case"Minutes":return void(F0?H0.setUTCMinutes(W0):H0.setMinutes(W0));case"Hours":return void(F0?H0.setUTCHours(W0):H0.setHours(W0));case"Date":return void(F0?H0.setUTCDate(W0):H0.setDate(W0));case"FullYear":break;default:return}T0=W0,s0=f.month(),H4=f.date(),H4=H4===29&&s0===1&&!c0(T0)?28:H4,F0?H0.setUTCFullYear(T0,s0,H4):H0.setFullYear(T0,s0,H4)}function B5(f){if(f=R0(f),C(this[f]))return this[f]();return this}function G7(f,i){if(typeof f==="object"){f=I0(f);var W0=p0(f),H0,F0=W0.length;for(H0=0;H0<F0;H0++)this[W0[H0].unit](f[W0[H0].unit])}else if(f=R0(f),C(this[f]))return this[f](i);return this}function p7(f,i){return(f%i+i)%i}var t6;if(Array.prototype.indexOf)t6=Array.prototype.indexOf;else t6=function(f){var i;for(i=0;i<this.length;++i)if(this[i]===f)return i;return-1};function bX(f,i){if(isNaN(f)||isNaN(i))return NaN;var W0=p7(i,12);return f+=(i-W0)/12,W0===1?c0(f)?29:28:31-W0%7%2}h("M",["MM",2],"Mo",function(){return this.month()+1}),h("MMM",0,0,function(f){return this.localeData().monthsShort(this,f)}),h("MMMM",0,0,function(f){return this.localeData().months(this,f)}),A1("M",J0,C6),A1("MM",J0,P1),A1("MMM",function(f,i){return i.monthsShortRegex(f)}),A1("MMMM",function(f,i){return i.monthsRegex(f)}),N0(["M","MM"],function(f,i){i[E1]=K4(f)-1}),N0(["MMM","MMMM"],function(f,i,W0,H0){var F0=W0._locale.monthsParse(f,H0,W0._strict);if(F0!=null)i[E1]=F0;else N(W0).invalidMonth=f});var WR="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),D2="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),N2=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,O9=Q4,eW=Q4;function _3(f,i){if(!f)return G(this._months)?this._months:this._months.standalone;return G(this._months)?this._months[f.month()]:this._months[(this._months.isFormat||N2).test(i)?"format":"standalone"][f.month()]}function vV(f,i){if(!f)return G(this._monthsShort)?this._monthsShort:this._monthsShort.standalone;return G(this._monthsShort)?this._monthsShort[f.month()]:this._monthsShort[N2.test(i)?"format":"standalone"][f.month()]}function MY(f,i,W0){var H0,F0,T0,s0=f.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(H0=0;H0<12;++H0)T0=A([2000,H0]),this._shortMonthsParse[H0]=this.monthsShort(T0,"").toLocaleLowerCase(),this._longMonthsParse[H0]=this.months(T0,"").toLocaleLowerCase()}if(W0)if(i==="MMM")return F0=t6.call(this._shortMonthsParse,s0),F0!==-1?F0:null;else return F0=t6.call(this._longMonthsParse,s0),F0!==-1?F0:null;else if(i==="MMM"){if(F0=t6.call(this._shortMonthsParse,s0),F0!==-1)return F0;return F0=t6.call(this._longMonthsParse,s0),F0!==-1?F0:null}else{if(F0=t6.call(this._longMonthsParse,s0),F0!==-1)return F0;return F0=t6.call(this._shortMonthsParse,s0),F0!==-1?F0:null}}function td(f,i,W0){var H0,F0,T0;if(this._monthsParseExact)return MY.call(this,f,i,W0);if(!this._monthsParse)this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(H0=0;H0<12;H0++){if(F0=A([2000,H0]),W0&&!this._longMonthsParse[H0])this._longMonthsParse[H0]=new RegExp("^"+this.months(F0,"").replace(".","")+"$","i"),this._shortMonthsParse[H0]=new RegExp("^"+this.monthsShort(F0,"").replace(".","")+"$","i");if(!W0&&!this._monthsParse[H0])T0="^"+this.months(F0,"")+"|^"+this.monthsShort(F0,""),this._monthsParse[H0]=new RegExp(T0.replace(".",""),"i");if(W0&&i==="MMMM"&&this._longMonthsParse[H0].test(f))return H0;else if(W0&&i==="MMM"&&this._shortMonthsParse[H0].test(f))return H0;else if(!W0&&this._monthsParse[H0].test(f))return H0}}function nC(f,i){if(!f.isValid())return f;if(typeof i==="string"){if(/^\d+$/.test(i))i=K4(i);else if(i=f.localeData().monthsParse(i),!K(i))return f}var W0=i,H0=f.date();return H0=H0<29?H0:Math.min(H0,bX(f.year(),W0)),f._isUTC?f._d.setUTCMonth(W0,H0):f._d.setMonth(W0,H0),f}function lQ(f){if(f!=null)return nC(this,f),Y.updateOffset(this,!0),this;else return q4(this,"Month")}function jG0(){return bX(this.year(),this.month())}function p4(f){if(this._monthsParseExact){if(!Q(this,"_monthsRegex"))xV.call(this);if(f)return this._monthsShortStrictRegex;else return this._monthsShortRegex}else{if(!Q(this,"_monthsShortRegex"))this._monthsShortRegex=O9;return this._monthsShortStrictRegex&&f?this._monthsShortStrictRegex:this._monthsShortRegex}}function k$(f){if(this._monthsParseExact){if(!Q(this,"_monthsRegex"))xV.call(this);if(f)return this._monthsStrictRegex;else return this._monthsRegex}else{if(!Q(this,"_monthsRegex"))this._monthsRegex=eW;return this._monthsStrictRegex&&f?this._monthsStrictRegex:this._monthsRegex}}function xV(){function f(F6,T8){return T8.length-F6.length}var i=[],W0=[],H0=[],F0,T0,s0,H4;for(F0=0;F0<12;F0++)T0=A([2000,F0]),s0=w4(this.monthsShort(T0,"")),H4=w4(this.months(T0,"")),i.push(s0),W0.push(H4),H0.push(H4),H0.push(s0);i.sort(f),W0.sort(f),H0.sort(f),this._monthsRegex=new RegExp("^("+H0.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+W0.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function BN(f,i,W0,H0,F0,T0,s0){var H4;if(f<100&&f>=0){if(H4=new Date(f+400,i,W0,H0,F0,T0,s0),isFinite(H4.getFullYear()))H4.setFullYear(f)}else H4=new Date(f,i,W0,H0,F0,T0,s0);return H4}function L2(f){var i,W0;if(f<100&&f>=0){if(W0=Array.prototype.slice.call(arguments),W0[0]=f+400,i=new Date(Date.UTC.apply(null,W0)),isFinite(i.getUTCFullYear()))i.setUTCFullYear(f)}else i=new Date(Date.UTC.apply(null,arguments));return i}function j3(f,i,W0){var H0=7+i-W0,F0=(7+L2(f,0,H0).getUTCDay()-i)%7;return-F0+H0-1}function yV(f,i,W0,H0,F0){var T0=(7+W0-H0)%7,s0=j3(f,H0,F0),H4=1+7*(i-1)+T0+s0,F6,T8;if(H4<=0)F6=f-1,T8=Y4(F6)+H4;else if(H4>Y4(f))F6=f+1,T8=H4-Y4(f);else F6=f,T8=H4;return{year:F6,dayOfYear:T8}}function B2(f,i,W0){var H0=j3(f.year(),i,W0),F0=Math.floor((f.dayOfYear()-H0-1)/7)+1,T0,s0;if(F0<1)s0=f.year()-1,T0=F0+Q5(s0,i,W0);else if(F0>Q5(f.year(),i,W0))T0=F0-Q5(f.year(),i,W0),s0=f.year()+1;else s0=f.year(),T0=F0;return{week:T0,year:s0}}function Q5(f,i,W0){var H0=j3(f,i,W0),F0=j3(f+1,i,W0);return(Y4(f)-H0+F0)/7}h("w",["ww",2],"wo","week"),h("W",["WW",2],"Wo","isoWeek"),A1("w",J0,C6),A1("ww",J0,P1),A1("W",J0,C6),A1("WW",J0,P1),f0(["w","ww","W","WW"],function(f,i,W0,H0){i[H0.substr(0,1)]=K4(f)});function bV(f){return B2(f,this._week.dow,this._week.doy).week}var rC={dow:0,doy:6};function ed(){return this._week.dow}function TG0(){return this._week.doy}function t$(f){var i=this.localeData().week(this);return f==null?i:this.add((f-i)*7,"d")}function aC(f){var i=B2(this,1,4).week;return f==null?i:this.add((f-i)*7,"d")}h("d",0,"do","day"),h("dd",0,0,function(f){return this.localeData().weekdaysMin(this,f)}),h("ddd",0,0,function(f){return this.localeData().weekdaysShort(this,f)}),h("dddd",0,0,function(f){return this.localeData().weekdays(this,f)}),h("e",0,0,"weekday"),h("E",0,0,"isoWeekday"),A1("d",J0),A1("e",J0),A1("E",J0),A1("dd",function(f,i){return i.weekdaysMinRegex(f)}),A1("ddd",function(f,i){return i.weekdaysShortRegex(f)}),A1("dddd",function(f,i){return i.weekdaysRegex(f)}),f0(["dd","ddd","dddd"],function(f,i,W0,H0){var F0=W0._locale.weekdaysParse(f,H0,W0._strict);if(F0!=null)i.d=F0;else N(W0).invalidWeekday=f}),f0(["d","e","E"],function(f,i,W0,H0){i[H0]=K4(f)});function En0(f,i){if(typeof f!=="string")return f;if(!isNaN(f))return parseInt(f,10);if(f=i.weekdaysParse(f),typeof f==="number")return f;return null}function sC(f,i){if(typeof f==="string")return i.weekdaysParse(f)%7||7;return isNaN(f)?null:f}function CG0(f,i){return f.slice(i,7).concat(f.slice(0,i))}var Vv4="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mn0="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Av4="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Fv4=Q4,Dv4=Q4,Nv4=Q4;function Lv4(f,i){var W0=G(this._weekdays)?this._weekdays:this._weekdays[f&&f!==!0&&this._weekdays.isFormat.test(i)?"format":"standalone"];return f===!0?CG0(W0,this._week.dow):f?W0[f.day()]:W0}function Bv4(f){return f===!0?CG0(this._weekdaysShort,this._week.dow):f?this._weekdaysShort[f.day()]:this._weekdaysShort}function Ov4(f){return f===!0?CG0(this._weekdaysMin,this._week.dow):f?this._weekdaysMin[f.day()]:this._weekdaysMin}function Ev4(f,i,W0){var H0,F0,T0,s0=f.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[];for(H0=0;H0<7;++H0)T0=A([2000,1]).day(H0),this._minWeekdaysParse[H0]=this.weekdaysMin(T0,"").toLocaleLowerCase(),this._shortWeekdaysParse[H0]=this.weekdaysShort(T0,"").toLocaleLowerCase(),this._weekdaysParse[H0]=this.weekdays(T0,"").toLocaleLowerCase()}if(W0)if(i==="dddd")return F0=t6.call(this._weekdaysParse,s0),F0!==-1?F0:null;else if(i==="ddd")return F0=t6.call(this._shortWeekdaysParse,s0),F0!==-1?F0:null;else return F0=t6.call(this._minWeekdaysParse,s0),F0!==-1?F0:null;else if(i==="dddd"){if(F0=t6.call(this._weekdaysParse,s0),F0!==-1)return F0;if(F0=t6.call(this._shortWeekdaysParse,s0),F0!==-1)return F0;return F0=t6.call(this._minWeekdaysParse,s0),F0!==-1?F0:null}else if(i==="ddd"){if(F0=t6.call(this._shortWeekdaysParse,s0),F0!==-1)return F0;if(F0=t6.call(this._weekdaysParse,s0),F0!==-1)return F0;return F0=t6.call(this._minWeekdaysParse,s0),F0!==-1?F0:null}else{if(F0=t6.call(this._minWeekdaysParse,s0),F0!==-1)return F0;if(F0=t6.call(this._weekdaysParse,s0),F0!==-1)return F0;return F0=t6.call(this._shortWeekdaysParse,s0),F0!==-1?F0:null}}function Mv4(f,i,W0){var H0,F0,T0;if(this._weekdaysParseExact)return Ev4.call(this,f,i,W0);if(!this._weekdaysParse)this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[];for(H0=0;H0<7;H0++){if(F0=A([2000,1]).day(H0),W0&&!this._fullWeekdaysParse[H0])this._fullWeekdaysParse[H0]=new RegExp("^"+this.weekdays(F0,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[H0]=new RegExp("^"+this.weekdaysShort(F0,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[H0]=new RegExp("^"+this.weekdaysMin(F0,"").replace(".","\\.?")+"$","i");if(!this._weekdaysParse[H0])T0="^"+this.weekdays(F0,"")+"|^"+this.weekdaysShort(F0,"")+"|^"+this.weekdaysMin(F0,""),this._weekdaysParse[H0]=new RegExp(T0.replace(".",""),"i");if(W0&&i==="dddd"&&this._fullWeekdaysParse[H0].test(f))return H0;else if(W0&&i==="ddd"&&this._shortWeekdaysParse[H0].test(f))return H0;else if(W0&&i==="dd"&&this._minWeekdaysParse[H0].test(f))return H0;else if(!W0&&this._weekdaysParse[H0].test(f))return H0}}function Rv4(f){if(!this.isValid())return f!=null?this:NaN;var i=q4(this,"Day");if(f!=null)return f=En0(f,this.localeData()),this.add(f-i,"d");else return i}function qv4(f){if(!this.isValid())return f!=null?this:NaN;var i=(this.day()+7-this.localeData()._week.dow)%7;return f==null?i:this.add(f-i,"d")}function Iv4(f){if(!this.isValid())return f!=null?this:NaN;if(f!=null){var i=sC(f,this.localeData());return this.day(this.day()%7?i:i-7)}else return this.day()||7}function Pv4(f){if(this._weekdaysParseExact){if(!Q(this,"_weekdaysRegex"))SG0.call(this);if(f)return this._weekdaysStrictRegex;else return this._weekdaysRegex}else{if(!Q(this,"_weekdaysRegex"))this._weekdaysRegex=Fv4;return this._weekdaysStrictRegex&&f?this._weekdaysStrictRegex:this._weekdaysRegex}}function wv4(f){if(this._weekdaysParseExact){if(!Q(this,"_weekdaysRegex"))SG0.call(this);if(f)return this._weekdaysShortStrictRegex;else return this._weekdaysShortRegex}else{if(!Q(this,"_weekdaysShortRegex"))this._weekdaysShortRegex=Dv4;return this._weekdaysShortStrictRegex&&f?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}function _v4(f){if(this._weekdaysParseExact){if(!Q(this,"_weekdaysRegex"))SG0.call(this);if(f)return this._weekdaysMinStrictRegex;else return this._weekdaysMinRegex}else{if(!Q(this,"_weekdaysMinRegex"))this._weekdaysMinRegex=Nv4;return this._weekdaysMinStrictRegex&&f?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function SG0(){function f(LG,IH){return IH.length-LG.length}var i=[],W0=[],H0=[],F0=[],T0,s0,H4,F6,T8;for(T0=0;T0<7;T0++)s0=A([2000,1]).day(T0),H4=w4(this.weekdaysMin(s0,"")),F6=w4(this.weekdaysShort(s0,"")),T8=w4(this.weekdays(s0,"")),i.push(H4),W0.push(F6),H0.push(T8),F0.push(H4),F0.push(F6),F0.push(T8);i.sort(f),W0.sort(f),H0.sort(f),F0.sort(f),this._weekdaysRegex=new RegExp("^("+F0.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+H0.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+W0.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function kG0(){return this.hours()%12||12}function jv4(){return this.hours()||24}h("H",["HH",2],0,"hour"),h("h",["hh",2],0,kG0),h("k",["kk",2],0,jv4),h("hmm",0,0,function(){return""+kG0.apply(this)+d(this.minutes(),2)}),h("hmmss",0,0,function(){return""+kG0.apply(this)+d(this.minutes(),2)+d(this.seconds(),2)}),h("Hmm",0,0,function(){return""+this.hours()+d(this.minutes(),2)}),h("Hmmss",0,0,function(){return""+this.hours()+d(this.minutes(),2)+d(this.seconds(),2)});function Rn0(f,i){h(f,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),i)})}Rn0("a",!0),Rn0("A",!1);function qn0(f,i){return i._meridiemParse}A1("a",qn0),A1("A",qn0),A1("H",J0,t4),A1("h",J0,C6),A1("k",J0,C6),A1("HH",J0,P1),A1("hh",J0,P1),A1("kk",J0,P1),A1("hmm",B0),A1("hmmss",Y1),A1("Hmm",B0),A1("Hmmss",Y1),N0(["H","HH"],Q1),N0(["k","kk"],function(f,i,W0){var H0=K4(f);i[Q1]=H0===24?0:H0}),N0(["a","A"],function(f,i,W0){W0._isPm=W0._locale.isPM(f),W0._meridiem=f}),N0(["h","hh"],function(f,i,W0){i[Q1]=K4(f),N(W0).bigHour=!0}),N0("hmm",function(f,i,W0){var H0=f.length-2;i[Q1]=K4(f.substr(0,H0)),i[C1]=K4(f.substr(H0)),N(W0).bigHour=!0}),N0("hmmss",function(f,i,W0){var H0=f.length-4,F0=f.length-2;i[Q1]=K4(f.substr(0,H0)),i[C1]=K4(f.substr(H0,2)),i[f4]=K4(f.substr(F0)),N(W0).bigHour=!0}),N0("Hmm",function(f,i,W0){var H0=f.length-2;i[Q1]=K4(f.substr(0,H0)),i[C1]=K4(f.substr(H0))}),N0("Hmmss",function(f,i,W0){var H0=f.length-4,F0=f.length-2;i[Q1]=K4(f.substr(0,H0)),i[C1]=K4(f.substr(H0,2)),i[f4]=K4(f.substr(F0))});function Tv4(f){return(f+"").toLowerCase().charAt(0)==="p"}var Cv4=/[ap]\.?m?\.?/i,Sv4=q6("Hours",!0);function kv4(f,i,W0){if(f>11)return W0?"pm":"PM";else return W0?"am":"AM"}var In0={calendar:x,longDateFormat:X0,invalidDate:Q0,ordinal:m,dayOfMonthOrdinalParse:$0,relativeTime:K0,months:WR,monthsShort:D2,week:rC,weekdays:Vv4,weekdaysMin:Av4,weekdaysShort:Mn0,meridiemParse:Cv4},J7={},oC={},tC;function vv4(f,i){var W0,H0=Math.min(f.length,i.length);for(W0=0;W0<H0;W0+=1)if(f[W0]!==i[W0])return W0;return H0}function Pn0(f){return f?f.toLowerCase().replace("_","-"):f}function xv4(f){var i=0,W0,H0,F0,T0;while(i<f.length){T0=Pn0(f[i]).split("-"),W0=T0.length,H0=Pn0(f[i+1]),H0=H0?H0.split("-"):null;while(W0>0){if(F0=$c(T0.slice(0,W0).join("-")),F0)return F0;if(H0&&H0.length>=W0&&vv4(T0,H0)>=W0-1)break;W0--}i++}return tC}function yv4(f){return!!(f&&f.match("^[^/\\\\]*$"))}function $c(f){var i=null,W0;if(J7[f]===void 0&&typeof tR<"u"&&tR&&tR.exports&&yv4(f))try{i=tC._abbr,W0=L0,W0("./locale/"+f),hV(i)}catch(H0){J7[f]=null}return J7[f]}function hV(f,i){var W0;if(f){if(Z(i))W0=EH(f);else W0=vG0(f,i);if(W0)tC=W0;else if(typeof console<"u"&&console.warn)console.warn("Locale "+f+" not found. Did you forget to load it?")}return tC._abbr}function vG0(f,i){if(i!==null){var W0,H0=In0;if(i.abbr=f,J7[f]!=null)_("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),H0=J7[f]._config;else if(i.parentLocale!=null)if(J7[i.parentLocale]!=null)H0=J7[i.parentLocale]._config;else if(W0=$c(i.parentLocale),W0!=null)H0=W0._config;else{if(!oC[i.parentLocale])oC[i.parentLocale]=[];return oC[i.parentLocale].push({name:f,config:i}),null}if(J7[f]=new T(S(H0,i)),oC[f])oC[f].forEach(function(F0){vG0(F0.name,F0.config)});return hV(f),J7[f]}else return delete J7[f],null}function bv4(f,i){if(i!=null){var W0,H0,F0=In0;if(J7[f]!=null&&J7[f].parentLocale!=null)J7[f].set(S(J7[f]._config,i));else{if(H0=$c(f),H0!=null)F0=H0._config;if(i=S(F0,i),H0==null)i.abbr=f;W0=new T(i),W0.parentLocale=J7[f],J7[f]=W0}hV(f)}else if(J7[f]!=null){if(J7[f].parentLocale!=null){if(J7[f]=J7[f].parentLocale,f===hV())hV(f)}else if(J7[f]!=null)delete J7[f]}return J7[f]}function EH(f){var i;if(f&&f._locale&&f._locale._abbr)f=f._locale._abbr;if(!f)return tC;if(!G(f)){if(i=$c(f),i)return i;f=[f]}return xv4(f)}function hv4(){return v(J7)}function xG0(f){var i,W0=f._a;if(W0&&N(f).overflow===-2){if(i=W0[E1]<0||W0[E1]>11?E1:W0[l4]<1||W0[l4]>bX(W0[F1],W0[E1])?l4:W0[Q1]<0||W0[Q1]>24||W0[Q1]===24&&(W0[C1]!==0||W0[f4]!==0||W0[O6]!==0)?Q1:W0[C1]<0||W0[C1]>59?C1:W0[f4]<0||W0[f4]>59?f4:W0[O6]<0||W0[O6]>999?O6:-1,N(f)._overflowDayOfYear&&(i<F1||i>l4))i=l4;if(N(f)._overflowWeeks&&i===-1)i=J9;if(N(f)._overflowWeekday&&i===-1)i=o$;N(f).overflow=i}return f}var fv4=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gv4=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mv4=/Z|[+-]\d\d(?::?\d\d)?/,Yc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],yG0=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],uv4=/^\/?Date\((-?\d+)/i,pv4=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,dv4={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function wn0(f){var i,W0,H0=f._i,F0=fv4.exec(H0)||gv4.exec(H0),T0,s0,H4,F6,T8=Yc.length,LG=yG0.length;if(F0){N(f).iso=!0;for(i=0,W0=T8;i<W0;i++)if(Yc[i][1].exec(F0[1])){s0=Yc[i][0],T0=Yc[i][2]!==!1;break}if(s0==null){f._isValid=!1;return}if(F0[3]){for(i=0,W0=LG;i<W0;i++)if(yG0[i][1].exec(F0[3])){H4=(F0[2]||" ")+yG0[i][0];break}if(H4==null){f._isValid=!1;return}}if(!T0&&H4!=null){f._isValid=!1;return}if(F0[4])if(mv4.exec(F0[4]))F6="Z";else{f._isValid=!1;return}f._f=s0+(H4||"")+(F6||""),hG0(f)}else f._isValid=!1}function cv4(f,i,W0,H0,F0,T0){var s0=[lv4(f),D2.indexOf(i),parseInt(W0,10),parseInt(H0,10),parseInt(F0,10)];if(T0)s0.push(parseInt(T0,10));return s0}function lv4(f){var i=parseInt(f,10);if(i<=49)return 2000+i;else if(i<=999)return 1900+i;return i}function iv4(f){return f.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function nv4(f,i,W0){if(f){var H0=Mn0.indexOf(f),F0=new Date(i[0],i[1],i[2]).getDay();if(H0!==F0)return N(W0).weekdayMismatch=!0,W0._isValid=!1,!1}return!0}function rv4(f,i,W0){if(f)return dv4[f];else if(i)return 0;else{var H0=parseInt(W0,10),F0=H0%100,T0=(H0-F0)/100;return T0*60+F0}}function _n0(f){var i=pv4.exec(iv4(f._i)),W0;if(i){if(W0=cv4(i[4],i[3],i[2],i[5],i[6],i[7]),!nv4(i[1],W0,f))return;f._a=W0,f._tzm=rv4(i[8],i[9],i[10]),f._d=L2.apply(null,f._a),f._d.setUTCMinutes(f._d.getUTCMinutes()-f._tzm),N(f).rfc2822=!0}else f._isValid=!1}function av4(f){var i=uv4.exec(f._i);if(i!==null){f._d=new Date(+i[1]);return}if(wn0(f),f._isValid===!1)delete f._isValid;else return;if(_n0(f),f._isValid===!1)delete f._isValid;else return;if(f._strict)f._isValid=!1;else Y.createFromInputFallback(f)}Y.createFromInputFallback=I("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(f){f._d=new Date(f._i+(f._useUTC?" UTC":""))});function ZR(f,i,W0){if(f!=null)return f;if(i!=null)return i;return W0}function sv4(f){var i=new Date(Y.now());if(f._useUTC)return[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()];return[i.getFullYear(),i.getMonth(),i.getDate()]}function bG0(f){var i,W0,H0=[],F0,T0,s0;if(f._d)return;if(F0=sv4(f),f._w&&f._a[l4]==null&&f._a[E1]==null)ov4(f);if(f._dayOfYear!=null){if(s0=ZR(f._a[F1],F0[F1]),f._dayOfYear>Y4(s0)||f._dayOfYear===0)N(f)._overflowDayOfYear=!0;W0=L2(s0,0,f._dayOfYear),f._a[E1]=W0.getUTCMonth(),f._a[l4]=W0.getUTCDate()}for(i=0;i<3&&f._a[i]==null;++i)f._a[i]=H0[i]=F0[i];for(;i<7;i++)f._a[i]=H0[i]=f._a[i]==null?i===2?1:0:f._a[i];if(f._a[Q1]===24&&f._a[C1]===0&&f._a[f4]===0&&f._a[O6]===0)f._nextDay=!0,f._a[Q1]=0;if(f._d=(f._useUTC?L2:BN).apply(null,H0),T0=f._useUTC?f._d.getUTCDay():f._d.getDay(),f._tzm!=null)f._d.setUTCMinutes(f._d.getUTCMinutes()-f._tzm);if(f._nextDay)f._a[Q1]=24;if(f._w&&typeof f._w.d<"u"&&f._w.d!==T0)N(f).weekdayMismatch=!0}function ov4(f){var i,W0,H0,F0,T0,s0,H4,F6,T8;if(i=f._w,i.GG!=null||i.W!=null||i.E!=null){if(T0=1,s0=4,W0=ZR(i.GG,f._a[F1],B2(n5(),1,4).year),H0=ZR(i.W,1),F0=ZR(i.E,1),F0<1||F0>7)F6=!0}else if(T0=f._locale._week.dow,s0=f._locale._week.doy,T8=B2(n5(),T0,s0),W0=ZR(i.gg,f._a[F1],T8.year),H0=ZR(i.w,T8.week),i.d!=null){if(F0=i.d,F0<0||F0>6)F6=!0}else if(i.e!=null){if(F0=i.e+T0,i.e<0||i.e>6)F6=!0}else F0=T0;if(H0<1||H0>Q5(W0,T0,s0))N(f)._overflowWeeks=!0;else if(F6!=null)N(f)._overflowWeekday=!0;else H4=yV(W0,H0,F0,T0,s0),f._a[F1]=H4.year,f._dayOfYear=H4.dayOfYear}Y.ISO_8601=function(){},Y.RFC_2822=function(){};function hG0(f){if(f._f===Y.ISO_8601){wn0(f);return}if(f._f===Y.RFC_2822){_n0(f);return}f._a=[],N(f).empty=!0;var i=""+f._i,W0,H0,F0,T0,s0,H4=i.length,F6=0,T8,LG;F0=Z0(f._f,f._locale).match(u)||[],LG=F0.length;for(W0=0;W0<LG;W0++){if(T0=F0[W0],H0=(i.match(T1(T0,f))||[])[0],H0){if(s0=i.substr(0,i.indexOf(H0)),s0.length>0)N(f).unusedInput.push(s0);i=i.slice(i.indexOf(H0)+H0.length),F6+=H0.length}if(p[T0]){if(H0)N(f).empty=!1;else N(f).unusedTokens.push(T0);a0(T0,H0,f)}else if(f._strict&&!H0)N(f).unusedTokens.push(T0)}if(N(f).charsLeftOver=H4-F6,i.length>0)N(f).unusedInput.push(i);if(f._a[Q1]<=12&&N(f).bigHour===!0&&f._a[Q1]>0)N(f).bigHour=void 0;if(N(f).parsedDateParts=f._a.slice(0),N(f).meridiem=f._meridiem,f._a[Q1]=tv4(f._locale,f._a[Q1],f._meridiem),T8=N(f).era,T8!==null)f._a[F1]=f._locale.erasConvertYear(T8,f._a[F1]);bG0(f),xG0(f)}function tv4(f,i,W0){var H0;if(W0==null)return i;if(f.meridiemHour!=null)return f.meridiemHour(i,W0);else if(f.isPM!=null){if(H0=f.isPM(W0),H0&&i<12)i+=12;if(!H0&&i===12)i=0;return i}else return i}function ev4(f){var i,W0,H0,F0,T0,s0,H4=!1,F6=f._f.length;if(F6===0){N(f).invalidFormat=!0,f._d=new Date(NaN);return}for(F0=0;F0<F6;F0++){if(T0=0,s0=!1,i=M({},f),f._useUTC!=null)i._useUTC=f._useUTC;if(i._f=f._f[F0],hG0(i),L(i))s0=!0;if(T0+=N(i).charsLeftOver,T0+=N(i).unusedTokens.length*10,N(i).score=T0,!H4){if(H0==null||T0<H0||s0){if(H0=T0,W0=i,s0)H4=!0}}else if(T0<H0)H0=T0,W0=i}V(f,W0||i)}function $x4(f){if(f._d)return;var i=I0(f._i),W0=i.day===void 0?i.date:i.day;f._a=z([i.year,i.month,W0,i.hour,i.minute,i.second,i.millisecond],function(H0){return H0&&parseInt(H0,10)}),bG0(f)}function Yx4(f){var i=new R(xG0(jn0(f)));if(i._nextDay)i.add(1,"d"),i._nextDay=void 0;return i}function jn0(f){var{_i:i,_f:W0}=f;if(f._locale=f._locale||EH(f._l),i===null||W0===void 0&&i==="")return B({nullInput:!0});if(typeof i==="string")f._i=i=f._locale.preparse(i);if(q(i))return new R(xG0(i));else if(H(i))f._d=i;else if(G(W0))ev4(f);else if(W0)hG0(f);else Xx4(f);if(!L(f))f._d=null;return f}function Xx4(f){var i=f._i;if(Z(i))f._d=new Date(Y.now());else if(H(i))f._d=new Date(i.valueOf());else if(typeof i==="string")av4(f);else if(G(i))f._a=z(i.slice(0),function(W0){return parseInt(W0,10)}),bG0(f);else if(J(i))$x4(f);else if(K(i))f._d=new Date(i);else Y.createFromInputFallback(f)}function Tn0(f,i,W0,H0,F0){var T0={};if(i===!0||i===!1)H0=i,i=void 0;if(W0===!0||W0===!1)H0=W0,W0=void 0;if(J(f)&&W(f)||G(f)&&f.length===0)f=void 0;return T0._isAMomentObject=!0,T0._useUTC=T0._isUTC=F0,T0._l=W0,T0._i=f,T0._f=i,T0._strict=H0,Yx4(T0)}function n5(f,i,W0,H0){return Tn0(f,i,W0,H0,!1)}var Gx4=I("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var f=n5.apply(null,arguments);if(this.isValid()&&f.isValid())return f<this?this:f;else return B()}),Jx4=I("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var f=n5.apply(null,arguments);if(this.isValid()&&f.isValid())return f>this?this:f;else return B()});function Cn0(f,i){var W0,H0;if(i.length===1&&G(i[0]))i=i[0];if(!i.length)return n5();W0=i[0];for(H0=1;H0<i.length;++H0)if(!i[H0].isValid()||i[H0][f](W0))W0=i[H0];return W0}function Qx4(){var f=[].slice.call(arguments,0);return Cn0("isBefore",f)}function Wx4(){var f=[].slice.call(arguments,0);return Cn0("isAfter",f)}var Zx4=function(){return Date.now?Date.now():+new Date},eC=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Kx4(f){var i,W0=!1,H0,F0=eC.length;for(i in f)if(Q(f,i)&&!(t6.call(eC,i)!==-1&&(f[i]==null||!isNaN(f[i]))))return!1;for(H0=0;H0<F0;++H0)if(f[eC[H0]]){if(W0)return!1;if(parseFloat(f[eC[H0]])!==K4(f[eC[H0]]))W0=!0}return!0}function Ux4(){return this._isValid}function Hx4(){return O2(NaN)}function Xc(f){var i=I0(f),W0=i.year||0,H0=i.quarter||0,F0=i.month||0,T0=i.week||i.isoWeek||0,s0=i.day||0,H4=i.hour||0,F6=i.minute||0,T8=i.second||0,LG=i.millisecond||0;this._isValid=Kx4(i),this._milliseconds=+LG+T8*1000+F6*60000+H4*1000*60*60,this._days=+s0+T0*7,this._months=+F0+H0*3+W0*12,this._data={},this._locale=EH(),this._bubble()}function Gc(f){return f instanceof Xc}function fG0(f){if(f<0)return Math.round(-1*f)*-1;else return Math.round(f)}function zx4(f,i,W0){var H0=Math.min(f.length,i.length),F0=Math.abs(f.length-i.length),T0=0,s0;for(s0=0;s0<H0;s0++)if(W0&&f[s0]!==i[s0]||!W0&&K4(f[s0])!==K4(i[s0]))T0++;return T0+F0}function Sn0(f,i){h(f,0,0,function(){var W0=this.utcOffset(),H0="+";if(W0<0)W0=-W0,H0="-";return H0+d(~~(W0/60),2)+i+d(~~W0%60,2)})}Sn0("Z",":"),Sn0("ZZ",""),A1("Z",n6),A1("ZZ",n6),N0(["Z","ZZ"],function(f,i,W0){W0._useUTC=!0,W0._tzm=gG0(n6,f)});var Vx4=/([\+\-]|\d\d)/gi;function gG0(f,i){var W0=(i||"").match(f),H0,F0,T0;if(W0===null)return null;return H0=W0[W0.length-1]||[],F0=(H0+"").match(Vx4)||["-",0,0],T0=+(F0[1]*60)+K4(F0[2]),T0===0?0:F0[0]==="+"?T0:-T0}function mG0(f,i){var W0,H0;if(i._isUTC)return W0=i.clone(),H0=(q(f)||H(f)?f.valueOf():n5(f).valueOf())-W0.valueOf(),W0._d.setTime(W0._d.valueOf()+H0),Y.updateOffset(W0,!1),W0;else return n5(f).local()}function uG0(f){return-Math.round(f._d.getTimezoneOffset())}Y.updateOffset=function(){};function Ax4(f,i,W0){var H0=this._offset||0,F0;if(!this.isValid())return f!=null?this:NaN;if(f!=null){if(typeof f==="string"){if(f=gG0(n6,f),f===null)return this}else if(Math.abs(f)<16&&!W0)f=f*60;if(!this._isUTC&&i)F0=uG0(this);if(this._offset=f,this._isUTC=!0,F0!=null)this.add(F0,"m");if(H0!==f){if(!i||this._changeInProgress)yn0(this,O2(f-H0,"m"),1,!1);else if(!this._changeInProgress)this._changeInProgress=!0,Y.updateOffset(this,!0),this._changeInProgress=null}return this}else return this._isUTC?H0:uG0(this)}function Fx4(f,i){if(f!=null){if(typeof f!=="string")f=-f;return this.utcOffset(f,i),this}else return-this.utcOffset()}function Dx4(f){return this.utcOffset(0,f)}function Nx4(f){if(this._isUTC){if(this.utcOffset(0,f),this._isUTC=!1,f)this.subtract(uG0(this),"m")}return this}function Lx4(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==="string"){var f=gG0(p6,this._i);if(f!=null)this.utcOffset(f);else this.utcOffset(0,!0)}return this}function Bx4(f){if(!this.isValid())return!1;return f=f?n5(f).utcOffset():0,(this.utcOffset()-f)%60===0}function Ox4(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ex4(){if(!Z(this._isDSTShifted))return this._isDSTShifted;var f={},i;if(M(f,this),f=jn0(f),f._a)i=f._isUTC?A(f._a):n5(f._a),this._isDSTShifted=this.isValid()&&zx4(f._a,i.toArray())>0;else this._isDSTShifted=!1;return this._isDSTShifted}function Mx4(){return this.isValid()?!this._isUTC:!1}function Rx4(){return this.isValid()?this._isUTC:!1}function kn0(){return this.isValid()?this._isUTC&&this._offset===0:!1}var qx4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ix4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function O2(f,i){var W0=f,H0=null,F0,T0,s0;if(Gc(f))W0={ms:f._milliseconds,d:f._days,M:f._months};else if(K(f)||!isNaN(+f))if(W0={},i)W0[i]=+f;else W0.milliseconds=+f;else if(H0=qx4.exec(f))F0=H0[1]==="-"?-1:1,W0={y:0,d:K4(H0[l4])*F0,h:K4(H0[Q1])*F0,m:K4(H0[C1])*F0,s:K4(H0[f4])*F0,ms:K4(fG0(H0[O6]*1000))*F0};else if(H0=Ix4.exec(f))F0=H0[1]==="-"?-1:1,W0={y:ON(H0[2],F0),M:ON(H0[3],F0),w:ON(H0[4],F0),d:ON(H0[5],F0),h:ON(H0[6],F0),m:ON(H0[7],F0),s:ON(H0[8],F0)};else if(W0==null)W0={};else if(typeof W0==="object"&&(("from"in W0)||("to"in W0)))s0=Px4(n5(W0.from),n5(W0.to)),W0={},W0.ms=s0.milliseconds,W0.M=s0.months;if(T0=new Xc(W0),Gc(f)&&Q(f,"_locale"))T0._locale=f._locale;if(Gc(f)&&Q(f,"_isValid"))T0._isValid=f._isValid;return T0}O2.fn=Xc.prototype,O2.invalid=Hx4;function ON(f,i){var W0=f&&parseFloat(f.replace(",","."));return(isNaN(W0)?0:W0)*i}function vn0(f,i){var W0={};if(W0.months=i.month()-f.month()+(i.year()-f.year())*12,f.clone().add(W0.months,"M").isAfter(i))--W0.months;return W0.milliseconds=+i-+f.clone().add(W0.months,"M"),W0}function Px4(f,i){var W0;if(!(f.isValid()&&i.isValid()))return{milliseconds:0,months:0};if(i=mG0(i,f),f.isBefore(i))W0=vn0(f,i);else W0=vn0(i,f),W0.milliseconds=-W0.milliseconds,W0.months=-W0.months;return W0}function xn0(f,i){return function(W0,H0){var F0,T0;if(H0!==null&&!isNaN(+H0))_(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),T0=W0,W0=H0,H0=T0;return F0=O2(W0,H0),yn0(this,F0,f),this}}function yn0(f,i,W0,H0){var F0=i._milliseconds,T0=fG0(i._days),s0=fG0(i._months);if(!f.isValid())return;if(H0=H0==null?!0:H0,s0)nC(f,q4(f,"Month")+s0*W0);if(T0)y8(f,"Date",q4(f,"Date")+T0*W0);if(F0)f._d.setTime(f._d.valueOf()+F0*W0);if(H0)Y.updateOffset(f,T0||s0)}var wx4=xn0(1,"add"),_x4=xn0(-1,"subtract");function bn0(f){return typeof f==="string"||f instanceof String}function jx4(f){return q(f)||H(f)||bn0(f)||K(f)||Cx4(f)||Tx4(f)||f===null||f===void 0}function Tx4(f){var i=J(f)&&!W(f),W0=!1,H0=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],F0,T0,s0=H0.length;for(F0=0;F0<s0;F0+=1)T0=H0[F0],W0=W0||Q(f,T0);return i&&W0}function Cx4(f){var i=G(f),W0=!1;if(i)W0=f.filter(function(H0){return!K(H0)&&bn0(f)}).length===0;return i&&W0}function Sx4(f){var i=J(f)&&!W(f),W0=!1,H0=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],F0,T0;for(F0=0;F0<H0.length;F0+=1)T0=H0[F0],W0=W0||Q(f,T0);return i&&W0}function kx4(f,i){var W0=f.diff(i,"days",!0);return W0<-6?"sameElse":W0<-1?"lastWeek":W0<0?"lastDay":W0<1?"sameDay":W0<2?"nextDay":W0<7?"nextWeek":"sameElse"}function vx4(f,i){if(arguments.length===1){if(!arguments[0])f=void 0,i=void 0;else if(jx4(arguments[0]))f=arguments[0],i=void 0;else if(Sx4(arguments[0]))i=arguments[0],f=void 0}var W0=f||n5(),H0=mG0(W0,this).startOf("day"),F0=Y.calendarFormat(this,H0)||"sameElse",T0=i&&(C(i[F0])?i[F0].call(this,W0):i[F0]);return this.format(T0||this.localeData().calendar(F0,this,n5(W0)))}function xx4(){return new R(this)}function yx4(f,i){var W0=q(f)?f:n5(f);if(!(this.isValid()&&W0.isValid()))return!1;if(i=R0(i)||"millisecond",i==="millisecond")return this.valueOf()>W0.valueOf();else return W0.valueOf()<this.clone().startOf(i).valueOf()}function bx4(f,i){var W0=q(f)?f:n5(f);if(!(this.isValid()&&W0.isValid()))return!1;if(i=R0(i)||"millisecond",i==="millisecond")return this.valueOf()<W0.valueOf();else return this.clone().endOf(i).valueOf()<W0.valueOf()}function hx4(f,i,W0,H0){var F0=q(f)?f:n5(f),T0=q(i)?i:n5(i);if(!(this.isValid()&&F0.isValid()&&T0.isValid()))return!1;return H0=H0||"()",(H0[0]==="("?this.isAfter(F0,W0):!this.isBefore(F0,W0))&&(H0[1]===")"?this.isBefore(T0,W0):!this.isAfter(T0,W0))}function fx4(f,i){var W0=q(f)?f:n5(f),H0;if(!(this.isValid()&&W0.isValid()))return!1;if(i=R0(i)||"millisecond",i==="millisecond")return this.valueOf()===W0.valueOf();else return H0=W0.valueOf(),this.clone().startOf(i).valueOf()<=H0&&H0<=this.clone().endOf(i).valueOf()}function gx4(f,i){return this.isSame(f,i)||this.isAfter(f,i)}function mx4(f,i){return this.isSame(f,i)||this.isBefore(f,i)}function ux4(f,i,W0){var H0,F0,T0;if(!this.isValid())return NaN;if(H0=mG0(f,this),!H0.isValid())return NaN;switch(F0=(H0.utcOffset()-this.utcOffset())*60000,i=R0(i),i){case"year":T0=Jc(this,H0)/12;break;case"month":T0=Jc(this,H0);break;case"quarter":T0=Jc(this,H0)/3;break;case"second":T0=(this-H0)/1000;break;case"minute":T0=(this-H0)/60000;break;case"hour":T0=(this-H0)/3600000;break;case"day":T0=(this-H0-F0)/86400000;break;case"week":T0=(this-H0-F0)/604800000;break;default:T0=this-H0}return W0?T0:A6(T0)}function Jc(f,i){if(f.date()<i.date())return-Jc(i,f);var W0=(i.year()-f.year())*12+(i.month()-f.month()),H0=f.clone().add(W0,"months"),F0,T0;if(i-H0<0)F0=f.clone().add(W0-1,"months"),T0=(i-H0)/(H0-F0);else F0=f.clone().add(W0+1,"months"),T0=(i-H0)/(F0-H0);return-(W0+T0)||0}Y.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",Y.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function px4(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function dx4(f){if(!this.isValid())return null;var i=f!==!0,W0=i?this.clone().utc():this;if(W0.year()<0||W0.year()>9999)return s(W0,i?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(C(Date.prototype.toISOString))if(i)return this.toDate().toISOString();else return new Date(this.valueOf()+this.utcOffset()*60*1000).toISOString().replace("Z",s(W0,"Z"));return s(W0,i?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function cx4(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var f="moment",i="",W0,H0,F0,T0;if(!this.isLocal())f=this.utcOffset()===0?"moment.utc":"moment.parseZone",i="Z";return W0="["+f+'("]',H0=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",F0="-MM-DD[T]HH:mm:ss.SSS",T0=i+'[")]',this.format(W0+H0+F0+T0)}function lx4(f){if(!f)f=this.isUtc()?Y.defaultFormatUtc:Y.defaultFormat;var i=s(this,f);return this.localeData().postformat(i)}function ix4(f,i){if(this.isValid()&&(q(f)&&f.isValid()||n5(f).isValid()))return O2({to:this,from:f}).locale(this.locale()).humanize(!i);else return this.localeData().invalidDate()}function nx4(f){return this.from(n5(),f)}function rx4(f,i){if(this.isValid()&&(q(f)&&f.isValid()||n5(f).isValid()))return O2({from:this,to:f}).locale(this.locale()).humanize(!i);else return this.localeData().invalidDate()}function ax4(f){return this.to(n5(),f)}function hn0(f){var i;if(f===void 0)return this._locale._abbr;else{if(i=EH(f),i!=null)this._locale=i;return this}}var fn0=I("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(f){if(f===void 0)return this.localeData();else return this.locale(f)});function gn0(){return this._locale}var Qc=1000,KR=60*Qc,Wc=60*KR,mn0=3506328*Wc;function UR(f,i){return(f%i+i)%i}function un0(f,i,W0){if(f<100&&f>=0)return new Date(f+400,i,W0)-mn0;else return new Date(f,i,W0).valueOf()}function pn0(f,i,W0){if(f<100&&f>=0)return Date.UTC(f+400,i,W0)-mn0;else return Date.UTC(f,i,W0)}function sx4(f){var i,W0;if(f=R0(f),f===void 0||f==="millisecond"||!this.isValid())return this;switch(W0=this._isUTC?pn0:un0,f){case"year":i=W0(this.year(),0,1);break;case"quarter":i=W0(this.year(),this.month()-this.month()%3,1);break;case"month":i=W0(this.year(),this.month(),1);break;case"week":i=W0(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":i=W0(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":i=W0(this.year(),this.month(),this.date());break;case"hour":i=this._d.valueOf(),i-=UR(i+(this._isUTC?0:this.utcOffset()*KR),Wc);break;case"minute":i=this._d.valueOf(),i-=UR(i,KR);break;case"second":i=this._d.valueOf(),i-=UR(i,Qc);break}return this._d.setTime(i),Y.updateOffset(this,!0),this}function ox4(f){var i,W0;if(f=R0(f),f===void 0||f==="millisecond"||!this.isValid())return this;switch(W0=this._isUTC?pn0:un0,f){case"year":i=W0(this.year()+1,0,1)-1;break;case"quarter":i=W0(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":i=W0(this.year(),this.month()+1,1)-1;break;case"week":i=W0(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":i=W0(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":i=W0(this.year(),this.month(),this.date()+1)-1;break;case"hour":i=this._d.valueOf(),i+=Wc-UR(i+(this._isUTC?0:this.utcOffset()*KR),Wc)-1;break;case"minute":i=this._d.valueOf(),i+=KR-UR(i,KR)-1;break;case"second":i=this._d.valueOf(),i+=Qc-UR(i,Qc)-1;break}return this._d.setTime(i),Y.updateOffset(this,!0),this}function tx4(){return this._d.valueOf()-(this._offset||0)*60000}function ex4(){return Math.floor(this.valueOf()/1000)}function $y4(){return new Date(this.valueOf())}function Yy4(){var f=this;return[f.year(),f.month(),f.date(),f.hour(),f.minute(),f.second(),f.millisecond()]}function Xy4(){var f=this;return{years:f.year(),months:f.month(),date:f.date(),hours:f.hours(),minutes:f.minutes(),seconds:f.seconds(),milliseconds:f.milliseconds()}}function Gy4(){return this.isValid()?this.toISOString():null}function Jy4(){return L(this)}function Qy4(){return V({},N(this))}function Wy4(){return N(this).overflow}function Zy4(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}h("N",0,0,"eraAbbr"),h("NN",0,0,"eraAbbr"),h("NNN",0,0,"eraAbbr"),h("NNNN",0,0,"eraName"),h("NNNNN",0,0,"eraNarrow"),h("y",["y",1],"yo","eraYear"),h("y",["yy",2],0,"eraYear"),h("y",["yyy",3],0,"eraYear"),h("y",["yyyy",4],0,"eraYear"),A1("N",pG0),A1("NN",pG0),A1("NNN",pG0),A1("NNNN",By4),A1("NNNNN",Oy4),N0(["N","NN","NNN","NNNN","NNNNN"],function(f,i,W0,H0){var F0=W0._locale.erasParse(f,H0,W0._strict);if(F0)N(W0).era=F0;else N(W0).invalidEra=f}),A1("y",r4),A1("yy",r4),A1("yyy",r4),A1("yyyy",r4),A1("yo",Ey4),N0(["y","yy","yyy","yyyy"],F1),N0(["yo"],function(f,i,W0,H0){var F0;if(W0._locale._eraYearOrdinalRegex)F0=f.match(W0._locale._eraYearOrdinalRegex);if(W0._locale.eraYearOrdinalParse)i[F1]=W0._locale.eraYearOrdinalParse(f,F0);else i[F1]=parseInt(f,10)});function Ky4(f,i){var W0,H0,F0,T0=this._eras||EH("en")._eras;for(W0=0,H0=T0.length;W0<H0;++W0){switch(typeof T0[W0].since){case"string":F0=Y(T0[W0].since).startOf("day"),T0[W0].since=F0.valueOf();break}switch(typeof T0[W0].until){case"undefined":T0[W0].until=1/0;break;case"string":F0=Y(T0[W0].until).startOf("day").valueOf(),T0[W0].until=F0.valueOf();break}}return T0}function Uy4(f,i,W0){var H0,F0,T0=this.eras(),s0,H4,F6;f=f.toUpperCase();for(H0=0,F0=T0.length;H0<F0;++H0)if(s0=T0[H0].name.toUpperCase(),H4=T0[H0].abbr.toUpperCase(),F6=T0[H0].narrow.toUpperCase(),W0)switch(i){case"N":case"NN":case"NNN":if(H4===f)return T0[H0];break;case"NNNN":if(s0===f)return T0[H0];break;case"NNNNN":if(F6===f)return T0[H0];break}else if([s0,H4,F6].indexOf(f)>=0)return T0[H0]}function Hy4(f,i){var W0=f.since<=f.until?1:-1;if(i===void 0)return Y(f.since).year();else return Y(f.since).year()+(i-f.offset)*W0}function zy4(){var f,i,W0,H0=this.localeData().eras();for(f=0,i=H0.length;f<i;++f){if(W0=this.clone().startOf("day").valueOf(),H0[f].since<=W0&&W0<=H0[f].until)return H0[f].name;if(H0[f].until<=W0&&W0<=H0[f].since)return H0[f].name}return""}function Vy4(){var f,i,W0,H0=this.localeData().eras();for(f=0,i=H0.length;f<i;++f){if(W0=this.clone().startOf("day").valueOf(),H0[f].since<=W0&&W0<=H0[f].until)return H0[f].narrow;if(H0[f].until<=W0&&W0<=H0[f].since)return H0[f].narrow}return""}function Ay4(){var f,i,W0,H0=this.localeData().eras();for(f=0,i=H0.length;f<i;++f){if(W0=this.clone().startOf("day").valueOf(),H0[f].since<=W0&&W0<=H0[f].until)return H0[f].abbr;if(H0[f].until<=W0&&W0<=H0[f].since)return H0[f].abbr}return""}function Fy4(){var f,i,W0,H0,F0=this.localeData().eras();for(f=0,i=F0.length;f<i;++f)if(W0=F0[f].since<=F0[f].until?1:-1,H0=this.clone().startOf("day").valueOf(),F0[f].since<=H0&&H0<=F0[f].until||F0[f].until<=H0&&H0<=F0[f].since)return(this.year()-Y(F0[f].since).year())*W0+F0[f].offset;return this.year()}function Dy4(f){if(!Q(this,"_erasNameRegex"))dG0.call(this);return f?this._erasNameRegex:this._erasRegex}function Ny4(f){if(!Q(this,"_erasAbbrRegex"))dG0.call(this);return f?this._erasAbbrRegex:this._erasRegex}function Ly4(f){if(!Q(this,"_erasNarrowRegex"))dG0.call(this);return f?this._erasNarrowRegex:this._erasRegex}function pG0(f,i){return i.erasAbbrRegex(f)}function By4(f,i){return i.erasNameRegex(f)}function Oy4(f,i){return i.erasNarrowRegex(f)}function Ey4(f,i){return i._eraYearOrdinalRegex||r4}function dG0(){var f=[],i=[],W0=[],H0=[],F0,T0,s0,H4,F6,T8=this.eras();for(F0=0,T0=T8.length;F0<T0;++F0)s0=w4(T8[F0].name),H4=w4(T8[F0].abbr),F6=w4(T8[F0].narrow),i.push(s0),f.push(H4),W0.push(F6),H0.push(s0),H0.push(H4),H0.push(F6);this._erasRegex=new RegExp("^("+H0.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+f.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+W0.join("|")+")","i")}h(0,["gg",2],0,function(){return this.weekYear()%100}),h(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Zc(f,i){h(0,[f,f.length],0,i)}Zc("gggg","weekYear"),Zc("ggggg","weekYear"),Zc("GGGG","isoWeekYear"),Zc("GGGGG","isoWeekYear"),A1("G",T6),A1("g",T6),A1("GG",J0,P1),A1("gg",J0,P1),A1("GGGG",C4,C0),A1("gggg",C4,C0),A1("GGGGG",c4,n0),A1("ggggg",c4,n0),f0(["gggg","ggggg","GGGG","GGGGG"],function(f,i,W0,H0){i[H0.substr(0,2)]=K4(f)}),f0(["gg","GG"],function(f,i,W0,H0){i[H0]=Y.parseTwoDigitYear(f)});function My4(f){return dn0.call(this,f,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Ry4(f){return dn0.call(this,f,this.isoWeek(),this.isoWeekday(),1,4)}function qy4(){return Q5(this.year(),1,4)}function Iy4(){return Q5(this.isoWeekYear(),1,4)}function Py4(){var f=this.localeData()._week;return Q5(this.year(),f.dow,f.doy)}function wy4(){var f=this.localeData()._week;return Q5(this.weekYear(),f.dow,f.doy)}function dn0(f,i,W0,H0,F0){var T0;if(f==null)return B2(this,H0,F0).year;else{if(T0=Q5(f,H0,F0),i>T0)i=T0;return _y4.call(this,f,i,W0,H0,F0)}}function _y4(f,i,W0,H0,F0){var T0=yV(f,i,W0,H0,F0),s0=L2(T0.year,0,T0.dayOfYear);return this.year(s0.getUTCFullYear()),this.month(s0.getUTCMonth()),this.date(s0.getUTCDate()),this}h("Q",0,"Qo","quarter"),A1("Q",U4),N0("Q",function(f,i){i[E1]=(K4(f)-1)*3});function jy4(f){return f==null?Math.ceil((this.month()+1)/3):this.month((f-1)*3+this.month()%3)}h("D",["DD",2],"Do","date"),A1("D",J0,C6),A1("DD",J0,P1),A1("Do",function(f,i){return f?i._dayOfMonthOrdinalParse||i._ordinalParse:i._dayOfMonthOrdinalParseLenient}),N0(["D","DD"],l4),N0("Do",function(f,i){i[l4]=K4(f.match(J0)[0])});var cn0=q6("Date",!0);h("DDD",["DDDD",3],"DDDo","dayOfYear"),A1("DDD",c1),A1("DDDD",d1),N0(["DDD","DDDD"],function(f,i,W0){W0._dayOfYear=K4(f)});function Ty4(f){var i=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/86400000)+1;return f==null?i:this.add(f-i,"d")}h("m",["mm",2],0,"minute"),A1("m",J0,t4),A1("mm",J0,P1),N0(["m","mm"],C1);var Cy4=q6("Minutes",!1);h("s",["ss",2],0,"second"),A1("s",J0,t4),A1("ss",J0,P1),N0(["s","ss"],f4);var Sy4=q6("Seconds",!1);h("S",0,0,function(){return~~(this.millisecond()/100)}),h(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),h(0,["SSS",3],0,"millisecond"),h(0,["SSSS",4],0,function(){return this.millisecond()*10}),h(0,["SSSSS",5],0,function(){return this.millisecond()*100}),h(0,["SSSSSS",6],0,function(){return this.millisecond()*1000}),h(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),h(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),h(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),A1("S",c1,U4),A1("SS",c1,P1),A1("SSS",c1,d1);var fV,ln0;for(fV="SSSS";fV.length<=9;fV+="S")A1(fV,r4);function ky4(f,i){i[O6]=K4(("0."+f)*1000)}for(fV="S";fV.length<=9;fV+="S")N0(fV,ky4);ln0=q6("Milliseconds",!1),h("z",0,0,"zoneAbbr"),h("zz",0,0,"zoneName");function vy4(){return this._isUTC?"UTC":""}function xy4(){return this._isUTC?"Coordinated Universal Time":""}var w1=R.prototype;if(w1.add=wx4,w1.calendar=vx4,w1.clone=xx4,w1.diff=ux4,w1.endOf=ox4,w1.format=lx4,w1.from=ix4,w1.fromNow=nx4,w1.to=rx4,w1.toNow=ax4,w1.get=B5,w1.invalidAt=Wy4,w1.isAfter=yx4,w1.isBefore=bx4,w1.isBetween=hx4,w1.isSame=fx4,w1.isSameOrAfter=gx4,w1.isSameOrBefore=mx4,w1.isValid=Jy4,w1.lang=fn0,w1.locale=hn0,w1.localeData=gn0,w1.max=Jx4,w1.min=Gx4,w1.parsingFlags=Qy4,w1.set=G7,w1.startOf=sx4,w1.subtract=_x4,w1.toArray=Yy4,w1.toObject=Xy4,w1.toDate=$y4,w1.toISOString=dx4,w1.inspect=cx4,typeof Symbol<"u"&&Symbol.for!=null)w1[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"};w1.toJSON=Gy4,w1.toString=px4,w1.unix=ex4,w1.valueOf=tx4,w1.creationData=Zy4,w1.eraName=zy4,w1.eraNarrow=Vy4,w1.eraAbbr=Ay4,w1.eraYear=Fy4,w1.year=i4,w1.isLeapYear=C9,w1.weekYear=My4,w1.isoWeekYear=Ry4,w1.quarter=w1.quarters=jy4,w1.month=lQ,w1.daysInMonth=jG0,w1.week=w1.weeks=t$,w1.isoWeek=w1.isoWeeks=aC,w1.weeksInYear=Py4,w1.weeksInWeekYear=wy4,w1.isoWeeksInYear=qy4,w1.isoWeeksInISOWeekYear=Iy4,w1.date=cn0,w1.day=w1.days=Rv4,w1.weekday=qv4,w1.isoWeekday=Iv4,w1.dayOfYear=Ty4,w1.hour=w1.hours=Sv4,w1.minute=w1.minutes=Cy4,w1.second=w1.seconds=Sy4,w1.millisecond=w1.milliseconds=ln0,w1.utcOffset=Ax4,w1.utc=Dx4,w1.local=Nx4,w1.parseZone=Lx4,w1.hasAlignedHourOffset=Bx4,w1.isDST=Ox4,w1.isLocal=Mx4,w1.isUtcOffset=Rx4,w1.isUtc=kn0,w1.isUTC=kn0,w1.zoneAbbr=vy4,w1.zoneName=xy4,w1.dates=I("dates accessor is deprecated. Use date instead.",cn0),w1.months=I("months accessor is deprecated. Use month instead",lQ),w1.years=I("years accessor is deprecated. Use year instead",i4),w1.zone=I("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Fx4),w1.isDSTShifted=I("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ex4);function yy4(f){return n5(f*1000)}function by4(){return n5.apply(null,arguments).parseZone()}function in0(f){return f}var r8=T.prototype;r8.calendar=y,r8.longDateFormat=a,r8.invalidDate=e,r8.ordinal=Y0,r8.preparse=in0,r8.postformat=in0,r8.relativeTime=A0,r8.pastFuture=D0,r8.set=k,r8.eras=Ky4,r8.erasParse=Uy4,r8.erasConvertYear=Hy4,r8.erasAbbrRegex=Ny4,r8.erasNameRegex=Dy4,r8.erasNarrowRegex=Ly4,r8.months=_3,r8.monthsShort=vV,r8.monthsParse=td,r8.monthsRegex=k$,r8.monthsShortRegex=p4,r8.week=bV,r8.firstDayOfYear=TG0,r8.firstDayOfWeek=ed,r8.weekdays=Lv4,r8.weekdaysMin=Ov4,r8.weekdaysShort=Bv4,r8.weekdaysParse=Mv4,r8.weekdaysRegex=Pv4,r8.weekdaysShortRegex=wv4,r8.weekdaysMinRegex=_v4,r8.isPM=Tv4,r8.meridiem=kv4;function Kc(f,i,W0,H0){var F0=EH(),T0=A().set(H0,i);return F0[W0](T0,f)}function nn0(f,i,W0){if(K(f))i=f,f=void 0;if(f=f||"",i!=null)return Kc(f,i,W0,"month");var H0,F0=[];for(H0=0;H0<12;H0++)F0[H0]=Kc(f,H0,W0,"month");return F0}function cG0(f,i,W0,H0){if(typeof f==="boolean"){if(K(i))W0=i,i=void 0;i=i||""}else{if(i=f,W0=i,f=!1,K(i))W0=i,i=void 0;i=i||""}var F0=EH(),T0=f?F0._week.dow:0,s0,H4=[];if(W0!=null)return Kc(i,(W0+T0)%7,H0,"day");for(s0=0;s0<7;s0++)H4[s0]=Kc(i,(s0+T0)%7,H0,"day");return H4}function hy4(f,i){return nn0(f,i,"months")}function fy4(f,i){return nn0(f,i,"monthsShort")}function gy4(f,i,W0){return cG0(f,i,W0,"weekdays")}function my4(f,i,W0){return cG0(f,i,W0,"weekdaysShort")}function uy4(f,i,W0){return cG0(f,i,W0,"weekdaysMin")}hV("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(f){var i=f%10,W0=K4(f%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return f+W0}}),Y.lang=I("moment.lang is deprecated. Use moment.locale instead.",hV),Y.langData=I("moment.langData is deprecated. Use moment.localeData instead.",EH);var MH=Math.abs;function py4(){var f=this._data;return this._milliseconds=MH(this._milliseconds),this._days=MH(this._days),this._months=MH(this._months),f.milliseconds=MH(f.milliseconds),f.seconds=MH(f.seconds),f.minutes=MH(f.minutes),f.hours=MH(f.hours),f.months=MH(f.months),f.years=MH(f.years),this}function rn0(f,i,W0,H0){var F0=O2(i,W0);return f._milliseconds+=H0*F0._milliseconds,f._days+=H0*F0._days,f._months+=H0*F0._months,f._bubble()}function dy4(f,i){return rn0(this,f,i,1)}function cy4(f,i){return rn0(this,f,i,-1)}function an0(f){if(f<0)return Math.floor(f);else return Math.ceil(f)}function ly4(){var f=this._milliseconds,i=this._days,W0=this._months,H0=this._data,F0,T0,s0,H4,F6;if(!(f>=0&&i>=0&&W0>=0||f<=0&&i<=0&&W0<=0))f+=an0(lG0(W0)+i)*86400000,i=0,W0=0;return H0.milliseconds=f%1000,F0=A6(f/1000),H0.seconds=F0%60,T0=A6(F0/60),H0.minutes=T0%60,s0=A6(T0/60),H0.hours=s0%24,i+=A6(s0/24),F6=A6(sn0(i)),W0+=F6,i-=an0(lG0(F6)),H4=A6(W0/12),W0%=12,H0.days=i,H0.months=W0,H0.years=H4,this}function sn0(f){return f*4800/146097}function lG0(f){return f*146097/4800}function iy4(f){if(!this.isValid())return NaN;var i,W0,H0=this._milliseconds;if(f=R0(f),f==="month"||f==="quarter"||f==="year")switch(i=this._days+H0/86400000,W0=this._months+sn0(i),f){case"month":return W0;case"quarter":return W0/3;case"year":return W0/12}else switch(i=this._days+Math.round(lG0(this._months)),f){case"week":return i/7+H0/604800000;case"day":return i+H0/86400000;case"hour":return i*24+H0/3600000;case"minute":return i*1440+H0/60000;case"second":return i*86400+H0/1000;case"millisecond":return Math.floor(i*86400000)+H0;default:throw Error("Unknown unit "+f)}}function RH(f){return function(){return this.as(f)}}var on0=RH("ms"),ny4=RH("s"),ry4=RH("m"),ay4=RH("h"),sy4=RH("d"),oy4=RH("w"),ty4=RH("M"),ey4=RH("Q"),$b4=RH("y"),Yb4=on0;function Xb4(){return O2(this)}function Gb4(f){return f=R0(f),this.isValid()?this[f+"s"]():NaN}function EN(f){return function(){return this.isValid()?this._data[f]:NaN}}var Jb4=EN("milliseconds"),Qb4=EN("seconds"),Wb4=EN("minutes"),Zb4=EN("hours"),Kb4=EN("days"),Ub4=EN("months"),Hb4=EN("years");function zb4(){return A6(this.days()/7)}var qH=Math.round,HR={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Vb4(f,i,W0,H0,F0){return F0.relativeTime(i||1,!!W0,f,H0)}function Ab4(f,i,W0,H0){var F0=O2(f).abs(),T0=qH(F0.as("s")),s0=qH(F0.as("m")),H4=qH(F0.as("h")),F6=qH(F0.as("d")),T8=qH(F0.as("M")),LG=qH(F0.as("w")),IH=qH(F0.as("y")),gV=T0<=W0.ss&&["s",T0]||T0<W0.s&&["ss",T0]||s0<=1&&["m"]||s0<W0.m&&["mm",s0]||H4<=1&&["h"]||H4<W0.h&&["hh",H4]||F6<=1&&["d"]||F6<W0.d&&["dd",F6];if(W0.w!=null)gV=gV||LG<=1&&["w"]||LG<W0.w&&["ww",LG];return gV=gV||T8<=1&&["M"]||T8<W0.M&&["MM",T8]||IH<=1&&["y"]||["yy",IH],gV[2]=i,gV[3]=+f>0,gV[4]=H0,Vb4.apply(null,gV)}function Fb4(f){if(f===void 0)return qH;if(typeof f==="function")return qH=f,!0;return!1}function Db4(f,i){if(HR[f]===void 0)return!1;if(i===void 0)return HR[f];if(HR[f]=i,f==="s")HR.ss=i-1;return!0}function Nb4(f,i){if(!this.isValid())return this.localeData().invalidDate();var W0=!1,H0=HR,F0,T0;if(typeof f==="object")i=f,f=!1;if(typeof f==="boolean")W0=f;if(typeof i==="object"){if(H0=Object.assign({},HR,i),i.s!=null&&i.ss==null)H0.ss=i.s-1}if(F0=this.localeData(),T0=Ab4(this,!W0,H0,F0),W0)T0=F0.pastFuture(+this,T0);return F0.postformat(T0)}var iG0=Math.abs;function zR(f){return(f>0)-(f<0)||+f}function Uc(){if(!this.isValid())return this.localeData().invalidDate();var f=iG0(this._milliseconds)/1000,i=iG0(this._days),W0=iG0(this._months),H0,F0,T0,s0,H4=this.asSeconds(),F6,T8,LG,IH;if(!H4)return"P0D";return H0=A6(f/60),F0=A6(H0/60),f%=60,H0%=60,T0=A6(W0/12),W0%=12,s0=f?f.toFixed(3).replace(/\.?0+$/,""):"",F6=H4<0?"-":"",T8=zR(this._months)!==zR(H4)?"-":"",LG=zR(this._days)!==zR(H4)?"-":"",IH=zR(this._milliseconds)!==zR(H4)?"-":"",F6+"P"+(T0?T8+T0+"Y":"")+(W0?T8+W0+"M":"")+(i?LG+i+"D":"")+(F0||H0||f?"T":"")+(F0?IH+F0+"H":"")+(H0?IH+H0+"M":"")+(f?IH+s0+"S":"")}var b8=Xc.prototype;b8.isValid=Ux4,b8.abs=py4,b8.add=dy4,b8.subtract=cy4,b8.as=iy4,b8.asMilliseconds=on0,b8.asSeconds=ny4,b8.asMinutes=ry4,b8.asHours=ay4,b8.asDays=sy4,b8.asWeeks=oy4,b8.asMonths=ty4,b8.asQuarters=ey4,b8.asYears=$b4,b8.valueOf=Yb4,b8._bubble=ly4,b8.clone=Xb4,b8.get=Gb4,b8.milliseconds=Jb4,b8.seconds=Qb4,b8.minutes=Wb4,b8.hours=Zb4,b8.days=Kb4,b8.weeks=zb4,b8.months=Ub4,b8.years=Hb4,b8.humanize=Nb4,b8.toISOString=Uc,b8.toString=Uc,b8.toJSON=Uc,b8.locale=hn0,b8.localeData=gn0,b8.toIsoString=I("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Uc),b8.lang=fn0,h("X",0,0,"unix"),h("x",0,0,"valueOf"),A1("x",T6),A1("X",K1),N0("X",function(f,i,W0){W0._d=new Date(parseFloat(f)*1000)}),N0("x",function(f,i,W0){W0._d=new Date(K4(f))});//! moment.js
return Y.version="2.30.1",X(n5),Y.fn=w1,Y.min=Qx4,Y.max=Wx4,Y.now=Zx4,Y.utc=A,Y.unix=yy4,Y.months=hy4,Y.isDate=H,Y.locale=hV,Y.invalid=B,Y.duration=O2,Y.isMoment=q,Y.weekdays=gy4,Y.parseZone=by4,Y.localeData=EH,Y.isDuration=Gc,Y.monthsShort=fy4,Y.weekdaysMin=uy4,Y.defineLocale=vG0,Y.updateLocale=bv4,Y.locales=hv4,Y.weekdaysShort=my4,Y.normalizeUnits=R0,Y.relativeTimeRounding=Fb4,Y.relativeTimeThreshold=Db4,Y.calendarFormat=kx4,Y.prototype=w1,Y.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},Y})});var Y$1=o((I85,$$1)=>{/*!
 * FileStreamRotator
 * Copyright(c) 2012-2017 Holiday Extras.
 * Copyright(c) 2017 Roger C.
 * MIT Licensed
 */var v$=L0("fs"),KA=L0("path"),FL=a71(),o71=L0("crypto"),Hr4=L0("events"),d3={};$$1.exports=d3;var t71=["daily","test","m","h","custom"],e71="YYYYMMDDHHmm",zr4=function($,Y){if(typeof Y=="number"){switch($){case"m":if(Y<0||Y>60)return!1;break;case"h":if(Y<0||Y>24)return!1;break}return{type:$,digit:Y}}},Vr4=function($){switch($){case"custom":case"daily":return{type:$,digit:void 0};case"test":return{type:$,digit:0}}return!1};d3.getFrequency=function($){var Y=$.toLowerCase().match(/^(\d+)([mh])$/);if(Y)return zr4(Y[2],parseInt(Y[1]));var X=Vr4($);if(X)return X;return!1};d3.parseFileSize=function($){if($&&typeof $=="string"){var Y=$.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(Y)switch(Y[2]){case"k":return Y[1]*1024;case"m":return Y[1]*1024*1024;case"g":return Y[1]*1024*1024*1024}}return null};d3.getDate=function($,Y,X){Y=Y||e71;let G=X?FL.utc():FL().local();if($&&t71.indexOf($.type)!==-1)switch($.type){case"m":var J=Math.floor(G.minutes()/$.digit)*$.digit;return G.minutes(J).format(Y);case"h":var Q=Math.floor(G.hour()/$.digit)*$.digit;return G.hour(Q).format(Y);case"daily":case"custom":case"test":return G.format(Y)}return G.format(Y)};d3.setAuditLog=function($,Y,X){var G=null;if($){var J=$.toString().substr(-1),Q=$.toString().match(/^(\d+)/);if(Number(Q[1])>0){var W=KA.dirname(X.replace(/%DATE%.+/,"_filename"));try{if(Y){var Z=KA.resolve(Y);G=JSON.parse(v$.readFileSync(Z,{encoding:"utf-8"}))}else{var Z=KA.resolve(W+"/.audit.json");G=JSON.parse(v$.readFileSync(Z,{encoding:"utf-8"}))}}catch(K){if(K.code!=="ENOENT")return null;G={keep:{days:!1,amount:Number(Q[1])},auditLog:Y||W+"/.audit.json",files:[]}}G.keep={days:J==="d",amount:Number(Q[1])}}}return G};d3.writeAuditLog=function($,Y){try{FK0($.auditLog),v$.writeFileSync($.auditLog,JSON.stringify($,null,4))}catch(X){if(Y)console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",$.auditLog,"Error:",X)}};function s71($,Y){if($.hash===o71.createHash($.hashType).update($.name+"LOG_FILE"+$.date).digest("hex"))try{if(v$.existsSync($.name))v$.unlinkSync($.name)}catch(X){if(Y)console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",$.name)}}function Ar4($,Y,X){let G=Y||"current.log",J=KA.dirname($),Q=KA.basename($),W=J+"/"+G;try{if(v$.lstatSync(W).isSymbolicLink())v$.unlinkSync(W),v$.symlinkSync(Q,W)}catch(Z){if(Z&&Z.code=="ENOENT")try{v$.symlinkSync(Q,W)}catch(K){if(X)console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",W," -> ",Q)}}}function Fr4($,Y,X){if(!$)return null;try{let G=v$.lstatSync($);return v$.watch($,function(J,Q){if(J=="rename")try{let W=v$.lstatSync($)}catch(W){X(W,$)}})}catch(G){if(Y)console.log(new Date,"[FileStreamRotator] Could not add watcher for "+$)}}d3.addLogToAudit=function($,Y,X,G){if(Y&&Y.files){var J=Y.files.findIndex(function(H){return H.name===$});if(J!==-1)return Y;var Q=Date.now();if(Y.files.push({date:Q,name:$,hash:o71.createHash(Y.hashType).update($+"LOG_FILE"+Q).digest("hex")}),Y.keep.days){var W=FL().subtract(Y.keep.amount,"days").valueOf(),Z=Y.files.filter(function(H){if(H.date>W)return!0;return H.hashType=Y.hashType,s71(H,G),X.emit("logRemoved",H),!1});Y.files=Z}else{var K=Y.files.splice(-Y.keep.amount);if(Y.files.length>0)Y.files.filter(function(H){return H.hashType=Y.hashType,s71(H,G),X.emit("logRemoved",H),!1});Y.files=K}d3.writeAuditLog(Y,G)}return Y};d3.getStream=function($){var Y=null,X=null,G=this;if(!$.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;if($.frequency)Y=G.getFrequency($.frequency);let J=G.setAuditLog($.max_logs,$.audit_file,$.filename);if(J!=null)J.hashType=$.audit_hash_type!==void 0?$.audit_hash_type:"md5";G.verbose=$.verbose!==void 0?$.verbose:!0;var Q=null,W=0,Z=0;if($.size)Q=d3.parseFileSize($.size);var K=$.date_format||e71;if(Y&&Y.type=="daily"){if(!$.date_format)K="YYYY-MM-DD";if(FL().format(K)!=FL().endOf("day").format(K)||FL().format(K)==FL().add(1,"day").format(K)){if(G.verbose)console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day");Y.type="custom"}}if(Y)X=$.frequency?G.getDate(Y,K,$.utc):"";$.create_symlink=$.create_symlink||!1,$.extension=$.extension||"";var H=$.filename,z=null,V=H+(X?"."+X:"");if(H.match(/%DATE%/))V=H.replace(/%DATE%/g,X?X:G.getDate(null,K,$.utc));if(Q){var A=null,F=V,N=null;if(J&&J.files&&J.files instanceof Array&&J.files.length>0){var D=J.files[J.files.length-1].name;if(D.match(F)){var L=D.match(F+"\\.(\\d+)");if(L)F=D,W=L[1]}}if(W==0&&F==V)F+=$.extension;while(N=v$.existsSync(F))A=F,W++,F=V+"."+W+$.extension;if(A){var B=v$.statSync(A);if(B.size<Q)F=A,W--,Z=B.size}V=F}else V+=$.extension;if(G.verbose)console.log(new Date,"[FileStreamRotator] Logging to: ",V);FK0(V);var O=$.file_options||{flags:"a"},E=v$.createWriteStream(V,O);if(X&&Y&&t71.indexOf(Y.type)>-1||Q>0){if(G.verbose)console.log(new Date,"[FileStreamRotator] Rotating file: ",Y?Y.type:"",Q?"size: "+Q:"");var M=new Hr4;M.auditLog=J,M.end=function(){E.end.apply(E,arguments)},AK0(E,M),M.on("close",function(){if(R)R.close()}),M.on("new",function(q){if(M.auditLog=G.addLogToAudit(q,M.auditLog,M,G.verbose),$.create_symlink)Ar4(q,$.symlink_name,G.verbose);if($.watch_log)M.emit("addWatcher",q)});var R;return M.on("addWatcher",function(q){if(R)R.close();if(!$.watch_log)return;R=Fr4(q,G.verbose,function(w,I){M.emit("createLog",I)})}),M.on("createLog",function(q){try{let w=v$.lstatSync(q)}catch(w){if(E&&E.end=="function")E.end();E=v$.createWriteStream(q,O),M.emit("new",q),AK0(E,M)}}),M.write=function(q,w){var I=Y?this.getDate(Y,K,$.utc):X;if(I!=X||Q&&Z>Q){var P=H+(X&&Y?"."+I:"");if(H.match(/%DATE%/)&&X)P=H.replace(/%DATE%/g,I);if(Q&&Z>Q)W++,P+="."+W+$.extension;else W=0,P+=$.extension;if(Z=0,G.verbose)console.log(new Date,L0("util").format("[FileStreamRotator] Changing logs from %s to %s",V,P));if(X=I,z=V,V=P,$.end_stream===!0)E.end();else E.destroy();FK0(V),E=v$.createWriteStream(P,O),M.emit("new",P),M.emit("rotate",z,P),AK0(E,M)}E.write(q,w),Z+=Buffer.byteLength(q,w)}.bind(this),process.nextTick(function(){M.emit("new",V)}),M.emit("new",V),M}else{if(G.verbose)console.log(new Date,"[FileStreamRotator] File won't be rotated: ",$.frequency,$.size);return process.nextTick(function(){E.emit("new",V)}),E}};var FK0=function($){var Y=KA.dirname($);Y.split(KA.sep).reduce(function(X,G){if(X+=G+KA.sep,!v$.existsSync(X))try{v$.mkdirSync(X)}catch(J){if(J.code!=="EEXIST")throw J}return X},"")},AK0=function(Y,X){Y.on("close",function(){X.emit("close")}),Y.on("finish",function(){X.emit("finish")}),Y.on("error",function(G){X.emit("error",G)}),Y.on("open",function(G){X.emit("open",G)})}});var W$1=o((P85,Q$1)=>{var mH=L0("fs"),Dr4=L0("os"),eR=L0("path"),Nr4=L0("util"),X$1=L0("zlib"),Lr4=r71(),Br4=F$().MESSAGE,G$1=L0("stream").PassThrough,J$1=UL(),Or4={json:!1,colorize:!1,eol:Dr4.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>{return new Date().toISOString()}},$q=function($){$=$||{},J$1.call(this,$);function Y(Q){Array.prototype.slice.call(arguments,1).forEach((W)=>{if($[W])throw Error("Cannot set "+W+" and "+Q+" together")})}function X(Q){if(Q&&typeof Q==="string"){if(Q.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return Q}else if(Q&&Number.isInteger(Q)){let W=Math.round(Q/1024);return W===0?"1k":W+"k"}return null}function G(Q){return!/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(Q)}function J(Q){return!/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(Q)}if(this.options=Object.assign({},Or4,$),$.stream)Y("stream","filename","maxsize"),this.logStream=new G$1,this.logStream.pipe($.stream);else{if(this.filename=$.filename?eR.basename($.filename):"winston.log",this.dirname=$.dirname||eR.dirname($.filename),!G(this.filename)||!J(this.dirname))throw Error("Your path or filename contain an invalid character.");if(this.logStream=Y$1().getStream({filename:eR.join(this.dirname,this.filename),frequency:$.frequency?$.frequency:"custom",date_format:$.datePattern?$.datePattern:"YYYY-MM-DD",verbose:!1,size:X($.maxSize),max_logs:$.maxFiles,end_stream:!0,audit_file:$.auditFile?$.auditFile:eR.join(this.dirname,"."+Lr4($)+"-audit.json"),file_options:$.options?$.options:{flags:"a"},utc:$.utc?$.utc:!1,extension:$.extension?$.extension:"",create_symlink:$.createSymlink?$.createSymlink:!1,symlink_name:$.symlinkName?$.symlinkName:"current.log",watch_log:$.watchLog?$.watchLog:!1,audit_hash_type:$.auditHashType?$.auditHashType:"sha256"}),this.logStream.on("new",(Q)=>{this.emit("new",Q)}),this.logStream.on("rotate",(Q,W)=>{this.emit("rotate",Q,W)}),this.logStream.on("logRemoved",(Q)=>{if($.zippedArchive){let W=Q.name+".gz";try{mH.unlinkSync(W)}catch(Z){if(Z.code!=="ENOENT"){Z.message=`Error occurred while removing ${W}: ${Z.message}`,this.emit("error",Z);return}}this.emit("logRemoved",W);return}this.emit("logRemoved",Q.name)}),$.zippedArchive)this.logStream.on("rotate",(Q)=>{try{if(!mH.existsSync(Q))return}catch(H){H.message=`Error occurred while checking existence of ${Q}: ${H.message}`,this.emit("error",H);return}try{if(mH.existsSync(`${Q}.gz`))return}catch(H){H.message=`Error occurred while checking existence of ${Q}.gz: ${H.message}`,this.emit("error",H);return}let W=X$1.createGzip(),Z=mH.createReadStream(Q);Z.on("error",(H)=>{H.message=`Error occurred while reading ${Q}: ${H.message}`,this.emit("error",H)});let K=mH.createWriteStream(Q+".gz");K.on("error",(H)=>{H.message=`Error occurred while writing ${Q}.gz: ${H.message}`,this.emit("error",H)}),Z.pipe(W).pipe(K).on("finish",()=>{try{mH.unlinkSync(Q)}catch(H){if(H.code!=="ENOENT"){H.message=`Error occurred while removing ${Q}: ${H.message}`,this.emit("error",H);return}}this.emit("archive",Q+".gz")})});if($.watchLog)this.logStream.on("addWatcher",(Q)=>{this.emit("addWatcher",Q)})}};Q$1.exports=$q;Nr4.inherits($q,J$1);$q.prototype.name="dailyRotateFile";var Er4=function(){};$q.prototype.log=function($,Y){Y=Y||Er4,this.logStream.write($[Br4]+this.options.eol),this.emit("logged",$),Y(null,!0)};$q.prototype.close=function(){if(this.logStream)this.logStream.end(()=>{this.emit("finish")})};$q.prototype.query=function($,Y){if(typeof $==="function")Y=$,$={};if(!this.options.json)throw Error("query() may not be used without the json option being set to true");if(!this.filename)throw Error("query() may not be used when initializing with a stream");let X=[];if($=$||{},$.rows=$.rows||$.limit||10,$.start=$.start||0,$.until=$.until||new Date,typeof $.until!=="object")$.until=new Date($.until);if($.from=$.from||$.until-86400000,typeof $.from!=="object")$.from=new Date($.from);$.order=$.order||"desc";let G=(()=>{let Q=new RegExp(this.filename.replace("%DATE%",".*"),"i");return mH.readdirSync(this.dirname).filter((W)=>eR.basename(W).match(Q))})();if(G.length===0&&Y)Y(null,X);let J=(Q)=>{if(!Q)return;let W=eR.join(this.dirname,Q),Z="",K;if(Q.endsWith(".gz")){K=new G$1;let z=mH.createReadStream(W);z.on("error",(V)=>{V.message=`Error occurred while reading ${W}: ${V.message}`,K.emit("error",V)}),z.pipe(X$1.createGunzip()).pipe(K)}else K=mH.createReadStream(W,{encoding:"utf8"});K.on("error",(z)=>{if(K.readable)K.destroy();if(!Y)return;return z.code==="ENOENT"?Y(null,X):Y(z)}),K.on("data",(z)=>{z=(Z+z).split(/\n+/);let V=z.length-1;for(let A=0;A<V;A++)H(z[A]);Z=z[V]}),K.on("end",()=>{if(Z)H(Z,!0);if(G.length)J(G.shift());else if(Y){if(X.sort((A,F)=>{let N=new Date(A.timestamp).getTime(),D=new Date(F.timestamp).getTime();return N>D?1:N<D?-1:0}),$.order==="desc")X=X.reverse();let z=$.start||0,V=$.limit||X.length;if(X=X.slice(z,z+V),$.fields)X=X.map((A)=>{let F={};return $.fields.forEach((N)=>{F[N]=A[N]}),F});Y(null,X)}});function H(z,V){try{let A=JSON.parse(z);if(!A||typeof A!=="object")return;let F=new Date(A.timestamp);if($.from&&F<$.from||$.until&&F>$.until||$.level&&$.level!==A.level)return;X.push(A)}catch(A){if(!V)K.emit("error",A)}}};J(G.shift())}});var U$1=o((w85,K$1)=>{var Mr4=UK0(),Z$1=W$1();Mr4.transports.DailyRotateFile=Z$1;K$1.exports=Z$1});var R8=o((vi,P$1)=>{(function($,Y){if(typeof vi==="object")P$1.exports=vi=Y();else if(typeof define==="function"&&define.amd)define([],Y);else $.CryptoJS=Y()})(vi,function(){var $=$||function(Y,X){var G;if(typeof window<"u"&&window.crypto)G=window.crypto;if(typeof self<"u"&&self.crypto)G=self.crypto;if(typeof globalThis<"u"&&globalThis.crypto)G=globalThis.crypto;if(!G&&typeof window<"u"&&window.msCrypto)G=window.msCrypto;if(!G&&typeof global<"u"&&global.crypto)G=global.crypto;if(!G)try{G=L0("crypto")}catch(B){}var J=function(){if(G){if(typeof G.getRandomValues==="function")try{return G.getRandomValues(new Uint32Array(1))[0]}catch(B){}if(typeof G.randomBytes==="function")try{return G.randomBytes(4).readInt32LE()}catch(B){}}throw Error("Native crypto module could not be used to get secure random number.")},Q=Object.create||function(){function B(){}return function(O){var E;return B.prototype=O,E=new B,B.prototype=null,E}}(),W={},Z=W.lib={},K=Z.Base=function(){return{extend:function(B){var O=Q(this);if(B)O.mixIn(B);if(!O.hasOwnProperty("init")||this.init===O.init)O.init=function(){O.$super.init.apply(this,arguments)};return O.init.prototype=O,O.$super=this,O},create:function(){var B=this.extend();return B.init.apply(B,arguments),B},init:function(){},mixIn:function(B){for(var O in B)if(B.hasOwnProperty(O))this[O]=B[O];if(B.hasOwnProperty("toString"))this.toString=B.toString},clone:function(){return this.init.prototype.extend(this)}}}(),H=Z.WordArray=K.extend({init:function(B,O){if(B=this.words=B||[],O!=X)this.sigBytes=O;else this.sigBytes=B.length*4},toString:function(B){return(B||V).stringify(this)},concat:function(B){var O=this.words,E=B.words,M=this.sigBytes,R=B.sigBytes;if(this.clamp(),M%4)for(var q=0;q<R;q++){var w=E[q>>>2]>>>24-q%4*8&255;O[M+q>>>2]|=w<<24-(M+q)%4*8}else for(var I=0;I<R;I+=4)O[M+I>>>2]=E[I>>>2];return this.sigBytes+=R,this},clamp:function(){var B=this.words,O=this.sigBytes;B[O>>>2]&=4294967295<<32-O%4*8,B.length=Y.ceil(O/4)},clone:function(){var B=K.clone.call(this);return B.words=this.words.slice(0),B},random:function(B){var O=[];for(var E=0;E<B;E+=4)O.push(J());return new H.init(O,B)}}),z=W.enc={},V=z.Hex={stringify:function(B){var{words:O,sigBytes:E}=B,M=[];for(var R=0;R<E;R++){var q=O[R>>>2]>>>24-R%4*8&255;M.push((q>>>4).toString(16)),M.push((q&15).toString(16))}return M.join("")},parse:function(B){var O=B.length,E=[];for(var M=0;M<O;M+=2)E[M>>>3]|=parseInt(B.substr(M,2),16)<<24-M%8*4;return new H.init(E,O/2)}},A=z.Latin1={stringify:function(B){var{words:O,sigBytes:E}=B,M=[];for(var R=0;R<E;R++){var q=O[R>>>2]>>>24-R%4*8&255;M.push(String.fromCharCode(q))}return M.join("")},parse:function(B){var O=B.length,E=[];for(var M=0;M<O;M++)E[M>>>2]|=(B.charCodeAt(M)&255)<<24-M%4*8;return new H.init(E,O)}},F=z.Utf8={stringify:function(B){try{return decodeURIComponent(escape(A.stringify(B)))}catch(O){throw Error("Malformed UTF-8 data")}},parse:function(B){return A.parse(unescape(encodeURIComponent(B)))}},N=Z.BufferedBlockAlgorithm=K.extend({reset:function(){this._data=new H.init,this._nDataBytes=0},_append:function(B){if(typeof B=="string")B=F.parse(B);this._data.concat(B),this._nDataBytes+=B.sigBytes},_process:function(B){var O,E=this._data,M=E.words,R=E.sigBytes,q=this.blockSize,w=q*4,I=R/w;if(B)I=Y.ceil(I);else I=Y.max((I|0)-this._minBufferSize,0);var P=I*q,_=Y.min(P*4,R);if(P){for(var C=0;C<P;C+=q)this._doProcessBlock(M,C);O=M.splice(0,P),E.sigBytes-=_}return new H.init(O,_)},clone:function(){var B=K.clone.call(this);return B._data=this._data.clone(),B},_minBufferSize:0}),D=Z.Hasher=N.extend({cfg:K.extend(),init:function(B){this.cfg=this.cfg.extend(B),this.reset()},reset:function(){N.reset.call(this),this._doReset()},update:function(B){return this._append(B),this._process(),this},finalize:function(B){if(B)this._append(B);var O=this._doFinalize();return O},blockSize:16,_createHelper:function(B){return function(O,E){return new B.init(E).finalize(O)}},_createHmacHelper:function(B){return function(O,E){return new L.HMAC.init(B,E).finalize(O)}}}),L=W.algo={};return W}(Math);return $})});var kk=o((xi,w$1)=>{(function($,Y){if(typeof xi==="object")w$1.exports=xi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(xi,function($){return function(Y){var X=$,G=X.lib,J=G.Base,Q=G.WordArray,W=X.x64={},Z=W.Word=J.extend({init:function(H,z){this.high=H,this.low=z}}),K=W.WordArray=J.extend({init:function(H,z){if(H=this.words=H||[],z!=Y)this.sigBytes=z;else this.sigBytes=H.length*8},toX32:function(){var H=this.words,z=H.length,V=[];for(var A=0;A<z;A++){var F=H[A];V.push(F.high),V.push(F.low)}return Q.create(V,this.sigBytes)},clone:function(){var H=J.clone.call(this),z=H.words=this.words.slice(0),V=z.length;for(var A=0;A<V;A++)z[A]=z[A].clone();return H}})}(),$})});var j$1=o((yi,_$1)=>{(function($,Y){if(typeof yi==="object")_$1.exports=yi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(yi,function($){return function(){if(typeof ArrayBuffer!="function")return;var Y=$,X=Y.lib,G=X.WordArray,J=G.init,Q=G.init=function(W){if(W instanceof ArrayBuffer)W=new Uint8Array(W);if(W instanceof Int8Array||typeof Uint8ClampedArray<"u"&&W instanceof Uint8ClampedArray||W instanceof Int16Array||W instanceof Uint16Array||W instanceof Int32Array||W instanceof Uint32Array||W instanceof Float32Array||W instanceof Float64Array)W=new Uint8Array(W.buffer,W.byteOffset,W.byteLength);if(W instanceof Uint8Array){var Z=W.byteLength,K=[];for(var H=0;H<Z;H++)K[H>>>2]|=W[H]<<24-H%4*8;J.call(this,K,Z)}else J.apply(this,arguments)};Q.prototype=G}(),$.lib.WordArray})});var C$1=o((bi,T$1)=>{(function($,Y){if(typeof bi==="object")T$1.exports=bi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(bi,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=Y.enc,Q=J.Utf16=J.Utf16BE={stringify:function(Z){var{words:K,sigBytes:H}=Z,z=[];for(var V=0;V<H;V+=2){var A=K[V>>>2]>>>16-V%4*8&65535;z.push(String.fromCharCode(A))}return z.join("")},parse:function(Z){var K=Z.length,H=[];for(var z=0;z<K;z++)H[z>>>1]|=Z.charCodeAt(z)<<16-z%2*16;return G.create(H,K*2)}};J.Utf16LE={stringify:function(Z){var{words:K,sigBytes:H}=Z,z=[];for(var V=0;V<H;V+=2){var A=W(K[V>>>2]>>>16-V%4*8&65535);z.push(String.fromCharCode(A))}return z.join("")},parse:function(Z){var K=Z.length,H=[];for(var z=0;z<K;z++)H[z>>>1]|=W(Z.charCodeAt(z)<<16-z%2*16);return G.create(H,K*2)}};function W(Z){return Z<<8&4278255360|Z>>>8&16711935}}(),$.enc.Utf16})});var zA=o((hi,S$1)=>{(function($,Y){if(typeof hi==="object")S$1.exports=hi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(hi,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=Y.enc,Q=J.Base64={stringify:function(Z){var{words:K,sigBytes:H}=Z,z=this._map;Z.clamp();var V=[];for(var A=0;A<H;A+=3){var F=K[A>>>2]>>>24-A%4*8&255,N=K[A+1>>>2]>>>24-(A+1)%4*8&255,D=K[A+2>>>2]>>>24-(A+2)%4*8&255,L=F<<16|N<<8|D;for(var B=0;B<4&&A+B*0.75<H;B++)V.push(z.charAt(L>>>6*(3-B)&63))}var O=z.charAt(64);if(O)while(V.length%4)V.push(O);return V.join("")},parse:function(Z){var K=Z.length,H=this._map,z=this._reverseMap;if(!z){z=this._reverseMap=[];for(var V=0;V<H.length;V++)z[H.charCodeAt(V)]=V}var A=H.charAt(64);if(A){var F=Z.indexOf(A);if(F!==-1)K=F}return W(Z,K,z)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function W(Z,K,H){var z=[],V=0;for(var A=0;A<K;A++)if(A%4){var F=H[Z.charCodeAt(A-1)]<<A%4*2,N=H[Z.charCodeAt(A)]>>>6-A%4*2,D=F|N;z[V>>>2]|=D<<24-V%4*8,V++}return G.create(z,V)}}(),$.enc.Base64})});var v$1=o((fi,k$1)=>{(function($,Y){if(typeof fi==="object")k$1.exports=fi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(fi,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=Y.enc,Q=J.Base64url={stringify:function(Z,K){if(K===void 0)K=!0;var{words:H,sigBytes:z}=Z,V=K?this._safe_map:this._map;Z.clamp();var A=[];for(var F=0;F<z;F+=3){var N=H[F>>>2]>>>24-F%4*8&255,D=H[F+1>>>2]>>>24-(F+1)%4*8&255,L=H[F+2>>>2]>>>24-(F+2)%4*8&255,B=N<<16|D<<8|L;for(var O=0;O<4&&F+O*0.75<z;O++)A.push(V.charAt(B>>>6*(3-O)&63))}var E=V.charAt(64);if(E)while(A.length%4)A.push(E);return A.join("")},parse:function(Z,K){if(K===void 0)K=!0;var H=Z.length,z=K?this._safe_map:this._map,V=this._reverseMap;if(!V){V=this._reverseMap=[];for(var A=0;A<z.length;A++)V[z.charCodeAt(A)]=A}var F=z.charAt(64);if(F){var N=Z.indexOf(F);if(N!==-1)H=N}return W(Z,H,V)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function W(Z,K,H){var z=[],V=0;for(var A=0;A<K;A++)if(A%4){var F=H[Z.charCodeAt(A-1)]<<A%4*2,N=H[Z.charCodeAt(A)]>>>6-A%4*2,D=F|N;z[V>>>2]|=D<<24-V%4*8,V++}return G.create(z,V)}}(),$.enc.Base64url})});var VA=o((gi,x$1)=>{(function($,Y){if(typeof gi==="object")x$1.exports=gi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(gi,function($){return function(Y){var X=$,G=X.lib,J=G.WordArray,Q=G.Hasher,W=X.algo,Z=[];(function(){for(var F=0;F<64;F++)Z[F]=Y.abs(Y.sin(F+1))*4294967296|0})();var K=W.MD5=Q.extend({_doReset:function(){this._hash=new J.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(F,N){for(var D=0;D<16;D++){var L=N+D,B=F[L];F[L]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}var O=this._hash.words,E=F[N+0],M=F[N+1],R=F[N+2],q=F[N+3],w=F[N+4],I=F[N+5],P=F[N+6],_=F[N+7],C=F[N+8],k=F[N+9],S=F[N+10],T=F[N+11],v=F[N+12],x=F[N+13],y=F[N+14],d=F[N+15],u=O[0],b=O[1],g=O[2],p=O[3];u=H(u,b,g,p,E,7,Z[0]),p=H(p,u,b,g,M,12,Z[1]),g=H(g,p,u,b,R,17,Z[2]),b=H(b,g,p,u,q,22,Z[3]),u=H(u,b,g,p,w,7,Z[4]),p=H(p,u,b,g,I,12,Z[5]),g=H(g,p,u,b,P,17,Z[6]),b=H(b,g,p,u,_,22,Z[7]),u=H(u,b,g,p,C,7,Z[8]),p=H(p,u,b,g,k,12,Z[9]),g=H(g,p,u,b,S,17,Z[10]),b=H(b,g,p,u,T,22,Z[11]),u=H(u,b,g,p,v,7,Z[12]),p=H(p,u,b,g,x,12,Z[13]),g=H(g,p,u,b,y,17,Z[14]),b=H(b,g,p,u,d,22,Z[15]),u=z(u,b,g,p,M,5,Z[16]),p=z(p,u,b,g,P,9,Z[17]),g=z(g,p,u,b,T,14,Z[18]),b=z(b,g,p,u,E,20,Z[19]),u=z(u,b,g,p,I,5,Z[20]),p=z(p,u,b,g,S,9,Z[21]),g=z(g,p,u,b,d,14,Z[22]),b=z(b,g,p,u,w,20,Z[23]),u=z(u,b,g,p,k,5,Z[24]),p=z(p,u,b,g,y,9,Z[25]),g=z(g,p,u,b,q,14,Z[26]),b=z(b,g,p,u,C,20,Z[27]),u=z(u,b,g,p,x,5,Z[28]),p=z(p,u,b,g,R,9,Z[29]),g=z(g,p,u,b,_,14,Z[30]),b=z(b,g,p,u,v,20,Z[31]),u=V(u,b,g,p,I,4,Z[32]),p=V(p,u,b,g,C,11,Z[33]),g=V(g,p,u,b,T,16,Z[34]),b=V(b,g,p,u,y,23,Z[35]),u=V(u,b,g,p,M,4,Z[36]),p=V(p,u,b,g,w,11,Z[37]),g=V(g,p,u,b,_,16,Z[38]),b=V(b,g,p,u,S,23,Z[39]),u=V(u,b,g,p,x,4,Z[40]),p=V(p,u,b,g,E,11,Z[41]),g=V(g,p,u,b,q,16,Z[42]),b=V(b,g,p,u,P,23,Z[43]),u=V(u,b,g,p,k,4,Z[44]),p=V(p,u,b,g,v,11,Z[45]),g=V(g,p,u,b,d,16,Z[46]),b=V(b,g,p,u,R,23,Z[47]),u=A(u,b,g,p,E,6,Z[48]),p=A(p,u,b,g,_,10,Z[49]),g=A(g,p,u,b,y,15,Z[50]),b=A(b,g,p,u,I,21,Z[51]),u=A(u,b,g,p,v,6,Z[52]),p=A(p,u,b,g,q,10,Z[53]),g=A(g,p,u,b,S,15,Z[54]),b=A(b,g,p,u,M,21,Z[55]),u=A(u,b,g,p,C,6,Z[56]),p=A(p,u,b,g,d,10,Z[57]),g=A(g,p,u,b,P,15,Z[58]),b=A(b,g,p,u,x,21,Z[59]),u=A(u,b,g,p,w,6,Z[60]),p=A(p,u,b,g,T,10,Z[61]),g=A(g,p,u,b,R,15,Z[62]),b=A(b,g,p,u,k,21,Z[63]),O[0]=O[0]+u|0,O[1]=O[1]+b|0,O[2]=O[2]+g|0,O[3]=O[3]+p|0},_doFinalize:function(){var F=this._data,N=F.words,D=this._nDataBytes*8,L=F.sigBytes*8;N[L>>>5]|=128<<24-L%32;var B=Y.floor(D/4294967296),O=D;N[(L+64>>>9<<4)+15]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,N[(L+64>>>9<<4)+14]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,F.sigBytes=(N.length+1)*4,this._process();var E=this._hash,M=E.words;for(var R=0;R<4;R++){var q=M[R];M[R]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360}return E},clone:function(){var F=Q.clone.call(this);return F._hash=this._hash.clone(),F}});function H(F,N,D,L,B,O,E){var M=F+(N&D|~N&L)+B+E;return(M<<O|M>>>32-O)+N}function z(F,N,D,L,B,O,E){var M=F+(N&L|D&~L)+B+E;return(M<<O|M>>>32-O)+N}function V(F,N,D,L,B,O,E){var M=F+(N^D^L)+B+E;return(M<<O|M>>>32-O)+N}function A(F,N,D,L,B,O,E){var M=F+(D^(N|~L))+B+E;return(M<<O|M>>>32-O)+N}X.MD5=Q._createHelper(K),X.HmacMD5=Q._createHmacHelper(K)}(Math),$.MD5})});var LK0=o((mi,y$1)=>{(function($,Y){if(typeof mi==="object")y$1.exports=mi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(mi,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=X.Hasher,Q=Y.algo,W=[],Z=Q.SHA1=J.extend({_doReset:function(){this._hash=new G.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(K,H){var z=this._hash.words,V=z[0],A=z[1],F=z[2],N=z[3],D=z[4];for(var L=0;L<80;L++){if(L<16)W[L]=K[H+L]|0;else{var B=W[L-3]^W[L-8]^W[L-14]^W[L-16];W[L]=B<<1|B>>>31}var O=(V<<5|V>>>27)+D+W[L];if(L<20)O+=(A&F|~A&N)+1518500249;else if(L<40)O+=(A^F^N)+1859775393;else if(L<60)O+=(A&F|A&N|F&N)-1894007588;else O+=(A^F^N)-899497514;D=N,N=F,F=A<<30|A>>>2,A=V,V=O}z[0]=z[0]+V|0,z[1]=z[1]+A|0,z[2]=z[2]+F|0,z[3]=z[3]+N|0,z[4]=z[4]+D|0},_doFinalize:function(){var K=this._data,H=K.words,z=this._nDataBytes*8,V=K.sigBytes*8;return H[V>>>5]|=128<<24-V%32,H[(V+64>>>9<<4)+14]=Math.floor(z/4294967296),H[(V+64>>>9<<4)+15]=z,K.sigBytes=H.length*4,this._process(),this._hash},clone:function(){var K=J.clone.call(this);return K._hash=this._hash.clone(),K}});Y.SHA1=J._createHelper(Z),Y.HmacSHA1=J._createHmacHelper(Z)}(),$.SHA1})});var pi=o((ui,b$1)=>{(function($,Y){if(typeof ui==="object")b$1.exports=ui=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(ui,function($){return function(Y){var X=$,G=X.lib,J=G.WordArray,Q=G.Hasher,W=X.algo,Z=[],K=[];(function(){function V(D){var L=Y.sqrt(D);for(var B=2;B<=L;B++)if(!(D%B))return!1;return!0}function A(D){return(D-(D|0))*4294967296|0}var F=2,N=0;while(N<64){if(V(F)){if(N<8)Z[N]=A(Y.pow(F,0.5));K[N]=A(Y.pow(F,0.3333333333333333)),N++}F++}})();var H=[],z=W.SHA256=Q.extend({_doReset:function(){this._hash=new J.init(Z.slice(0))},_doProcessBlock:function(V,A){var F=this._hash.words,N=F[0],D=F[1],L=F[2],B=F[3],O=F[4],E=F[5],M=F[6],R=F[7];for(var q=0;q<64;q++){if(q<16)H[q]=V[A+q]|0;else{var w=H[q-15],I=(w<<25|w>>>7)^(w<<14|w>>>18)^w>>>3,P=H[q-2],_=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;H[q]=I+H[q-7]+_+H[q-16]}var C=O&E^~O&M,k=N&D^N&L^D&L,S=(N<<30|N>>>2)^(N<<19|N>>>13)^(N<<10|N>>>22),T=(O<<26|O>>>6)^(O<<21|O>>>11)^(O<<7|O>>>25),v=R+T+C+K[q]+H[q],x=S+k;R=M,M=E,E=O,O=B+v|0,B=L,L=D,D=N,N=v+x|0}F[0]=F[0]+N|0,F[1]=F[1]+D|0,F[2]=F[2]+L|0,F[3]=F[3]+B|0,F[4]=F[4]+O|0,F[5]=F[5]+E|0,F[6]=F[6]+M|0,F[7]=F[7]+R|0},_doFinalize:function(){var V=this._data,A=V.words,F=this._nDataBytes*8,N=V.sigBytes*8;return A[N>>>5]|=128<<24-N%32,A[(N+64>>>9<<4)+14]=Y.floor(F/4294967296),A[(N+64>>>9<<4)+15]=F,V.sigBytes=A.length*4,this._process(),this._hash},clone:function(){var V=Q.clone.call(this);return V._hash=this._hash.clone(),V}});X.SHA256=Q._createHelper(z),X.HmacSHA256=Q._createHmacHelper(z)}(Math),$.SHA256})});var f$1=o((di,h$1)=>{(function($,Y,X){if(typeof di==="object")h$1.exports=di=Y(R8(),pi());else if(typeof define==="function"&&define.amd)define(["./core","./sha256"],Y);else Y($.CryptoJS)})(di,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=Y.algo,Q=J.SHA256,W=J.SHA224=Q.extend({_doReset:function(){this._hash=new G.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var Z=Q._doFinalize.call(this);return Z.sigBytes-=4,Z}});Y.SHA224=Q._createHelper(W),Y.HmacSHA224=Q._createHmacHelper(W)}(),$.SHA224})});var BK0=o((ci,g$1)=>{(function($,Y,X){if(typeof ci==="object")g$1.exports=ci=Y(R8(),kk());else if(typeof define==="function"&&define.amd)define(["./core","./x64-core"],Y);else Y($.CryptoJS)})(ci,function($){return function(){var Y=$,X=Y.lib,G=X.Hasher,J=Y.x64,Q=J.Word,W=J.WordArray,Z=Y.algo;function K(){return Q.create.apply(Q,arguments)}var H=[K(1116352408,3609767458),K(1899447441,602891725),K(3049323471,3964484399),K(3921009573,2173295548),K(961987163,4081628472),K(1508970993,3053834265),K(2453635748,2937671579),K(2870763221,3664609560),K(3624381080,2734883394),K(310598401,1164996542),K(607225278,1323610764),K(1426881987,3590304994),K(1925078388,4068182383),K(2162078206,991336113),K(2614888103,633803317),K(3248222580,3479774868),K(3835390401,2666613458),K(4022224774,944711139),K(264347078,2341262773),K(604807628,2007800933),K(770255983,1495990901),K(1249150122,1856431235),K(1555081692,3175218132),K(1996064986,2198950837),K(2554220882,3999719339),K(2821834349,766784016),K(2952996808,2566594879),K(3210313671,3203337956),K(3336571891,1034457026),K(3584528711,2466948901),K(113926993,3758326383),K(338241895,168717936),K(666307205,1188179964),K(773529912,1546045734),K(1294757372,1522805485),K(1396182291,2643833823),K(1695183700,2343527390),K(1986661051,1014477480),K(2177026350,1206759142),K(2456956037,344077627),K(2730485921,1290863460),K(2820302411,3158454273),K(3259730800,3505952657),K(3345764771,106217008),K(3516065817,3606008344),K(3600352804,1432725776),K(4094571909,1467031594),K(275423344,851169720),K(430227734,3100823752),K(506948616,1363258195),K(659060556,3750685593),K(883997877,3785050280),K(958139571,3318307427),K(1322822218,3812723403),K(1537002063,2003034995),K(1747873779,3602036899),K(1955562222,1575990012),K(2024104815,1125592928),K(2227730452,2716904306),K(2361852424,442776044),K(2428436474,593698344),K(2756734187,3733110249),K(3204031479,2999351573),K(3329325298,3815920427),K(3391569614,3928383900),K(3515267271,566280711),K(3940187606,3454069534),K(4118630271,4000239992),K(116418474,1914138554),K(174292421,2731055270),K(289380356,3203993006),K(460393269,320620315),K(685471733,587496836),K(852142971,1086792851),K(1017036298,365543100),K(1126000580,2618297676),K(1288033470,3409855158),K(1501505948,4234509866),K(1607167915,987167468),K(1816402316,1246189591)],z=[];(function(){for(var A=0;A<80;A++)z[A]=K()})();var V=Z.SHA512=G.extend({_doReset:function(){this._hash=new W.init([new Q.init(1779033703,4089235720),new Q.init(3144134277,2227873595),new Q.init(1013904242,4271175723),new Q.init(2773480762,1595750129),new Q.init(1359893119,2917565137),new Q.init(2600822924,725511199),new Q.init(528734635,4215389547),new Q.init(1541459225,327033209)])},_doProcessBlock:function(A,F){var N=this._hash.words,D=N[0],L=N[1],B=N[2],O=N[3],E=N[4],M=N[5],R=N[6],q=N[7],w=D.high,I=D.low,P=L.high,_=L.low,C=B.high,k=B.low,S=O.high,T=O.low,v=E.high,x=E.low,y=M.high,d=M.low,u=R.high,b=R.low,g=q.high,p=q.low,h=w,n=I,t=P,s=_,Z0=C,X0=k,a=S,Q0=T,e=v,m=x,$0=y,Y0=d,K0=u,A0=b,D0=g,O0=p;for(var R0=0;R0<80;R0++){var I0,g0,p0=z[R0];if(R0<16)g0=p0.high=A[F+R0*2]|0,I0=p0.low=A[F+R0*2+1]|0;else{var U4=z[R0-15],P1=U4.high,d1=U4.low,C0=(P1>>>1|d1<<31)^(P1>>>8|d1<<24)^P1>>>7,n0=(d1>>>1|P1<<31)^(d1>>>8|P1<<24)^(d1>>>7|P1<<25),J0=z[R0-2],B0=J0.high,Y1=J0.low,c1=(B0>>>19|Y1<<13)^(B0<<3|Y1>>>29)^B0>>>6,C4=(Y1>>>19|B0<<13)^(Y1<<3|B0>>>29)^(Y1>>>6|B0<<26),c4=z[R0-7],r4=c4.high,T6=c4.low,p6=z[R0-16],n6=p6.high,K1=p6.low;I0=n0+T6,g0=C0+r4+(I0>>>0<n0>>>0?1:0),I0=I0+C4,g0=g0+c1+(I0>>>0<C4>>>0?1:0),I0=I0+K1,g0=g0+n6+(I0>>>0<K1>>>0?1:0),p0.high=g0,p0.low=I0}var Q4=e&$0^~e&K0,C6=m&Y0^~m&A0,t4=h&t^h&Z0^t&Z0,a1=n&s^n&X0^s&X0,A1=(h>>>28|n<<4)^(h<<30|n>>>2)^(h<<25|n>>>7),T1=(n>>>28|h<<4)^(n<<30|h>>>2)^(n<<25|h>>>7),R4=(e>>>14|m<<18)^(e>>>18|m<<14)^(e<<23|m>>>9),w4=(m>>>14|e<<18)^(m>>>18|e<<14)^(m<<23|e>>>9),A6=H[R0],K4=A6.high,b4=A6.low,N0=O0+w4,f0=D0+R4+(N0>>>0<O0>>>0?1:0),N0=N0+C6,f0=f0+Q4+(N0>>>0<C6>>>0?1:0),N0=N0+b4,f0=f0+K4+(N0>>>0<b4>>>0?1:0),N0=N0+I0,f0=f0+g0+(N0>>>0<I0>>>0?1:0),a0=T1+a1,c0=A1+t4+(a0>>>0<T1>>>0?1:0);D0=K0,O0=A0,K0=$0,A0=Y0,$0=e,Y0=m,m=Q0+N0|0,e=a+f0+(m>>>0<Q0>>>0?1:0)|0,a=Z0,Q0=X0,Z0=t,X0=s,t=h,s=n,n=N0+a0|0,h=f0+c0+(n>>>0<N0>>>0?1:0)|0}I=D.low=I+n,D.high=w+h+(I>>>0<n>>>0?1:0),_=L.low=_+s,L.high=P+t+(_>>>0<s>>>0?1:0),k=B.low=k+X0,B.high=C+Z0+(k>>>0<X0>>>0?1:0),T=O.low=T+Q0,O.high=S+a+(T>>>0<Q0>>>0?1:0),x=E.low=x+m,E.high=v+e+(x>>>0<m>>>0?1:0),d=M.low=d+Y0,M.high=y+$0+(d>>>0<Y0>>>0?1:0),b=R.low=b+A0,R.high=u+K0+(b>>>0<A0>>>0?1:0),p=q.low=p+O0,q.high=g+D0+(p>>>0<O0>>>0?1:0)},_doFinalize:function(){var A=this._data,F=A.words,N=this._nDataBytes*8,D=A.sigBytes*8;F[D>>>5]|=128<<24-D%32,F[(D+128>>>10<<5)+30]=Math.floor(N/4294967296),F[(D+128>>>10<<5)+31]=N,A.sigBytes=F.length*4,this._process();var L=this._hash.toX32();return L},clone:function(){var A=G.clone.call(this);return A._hash=this._hash.clone(),A},blockSize:32});Y.SHA512=G._createHelper(V),Y.HmacSHA512=G._createHmacHelper(V)}(),$.SHA512})});var u$1=o((li,m$1)=>{(function($,Y,X){if(typeof li==="object")m$1.exports=li=Y(R8(),kk(),BK0());else if(typeof define==="function"&&define.amd)define(["./core","./x64-core","./sha512"],Y);else Y($.CryptoJS)})(li,function($){return function(){var Y=$,X=Y.x64,G=X.Word,J=X.WordArray,Q=Y.algo,W=Q.SHA512,Z=Q.SHA384=W.extend({_doReset:function(){this._hash=new J.init([new G.init(3418070365,3238371032),new G.init(1654270250,914150663),new G.init(2438529370,812702999),new G.init(355462360,4144912697),new G.init(1731405415,4290775857),new G.init(2394180231,1750603025),new G.init(3675008525,1694076839),new G.init(1203062813,3204075428)])},_doFinalize:function(){var K=W._doFinalize.call(this);return K.sigBytes-=16,K}});Y.SHA384=W._createHelper(Z),Y.HmacSHA384=W._createHmacHelper(Z)}(),$.SHA384})});var d$1=o((ii,p$1)=>{(function($,Y,X){if(typeof ii==="object")p$1.exports=ii=Y(R8(),kk());else if(typeof define==="function"&&define.amd)define(["./core","./x64-core"],Y);else Y($.CryptoJS)})(ii,function($){return function(Y){var X=$,G=X.lib,J=G.WordArray,Q=G.Hasher,W=X.x64,Z=W.Word,K=X.algo,H=[],z=[],V=[];(function(){var N=1,D=0;for(var L=0;L<24;L++){H[N+5*D]=(L+1)*(L+2)/2%64;var B=D%5,O=(2*N+3*D)%5;N=B,D=O}for(var N=0;N<5;N++)for(var D=0;D<5;D++)z[N+5*D]=D+(2*N+3*D)%5*5;var E=1;for(var M=0;M<24;M++){var R=0,q=0;for(var w=0;w<7;w++){if(E&1){var I=(1<<w)-1;if(I<32)q^=1<<I;else R^=1<<I-32}if(E&128)E=E<<1^113;else E<<=1}V[M]=Z.create(R,q)}})();var A=[];(function(){for(var N=0;N<25;N++)A[N]=Z.create()})();var F=K.SHA3=Q.extend({cfg:Q.cfg.extend({outputLength:512}),_doReset:function(){var N=this._state=[];for(var D=0;D<25;D++)N[D]=new Z.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(N,D){var L=this._state,B=this.blockSize/2;for(var O=0;O<B;O++){var E=N[D+2*O],M=N[D+2*O+1];E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,M=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360;var R=L[O];R.high^=M,R.low^=E}for(var q=0;q<24;q++){for(var w=0;w<5;w++){var I=0,P=0;for(var _=0;_<5;_++){var R=L[w+5*_];I^=R.high,P^=R.low}var C=A[w];C.high=I,C.low=P}for(var w=0;w<5;w++){var k=A[(w+4)%5],S=A[(w+1)%5],T=S.high,v=S.low,I=k.high^(T<<1|v>>>31),P=k.low^(v<<1|T>>>31);for(var _=0;_<5;_++){var R=L[w+5*_];R.high^=I,R.low^=P}}for(var x=1;x<25;x++){var I,P,R=L[x],y=R.high,d=R.low,u=H[x];if(u<32)I=y<<u|d>>>32-u,P=d<<u|y>>>32-u;else I=d<<u-32|y>>>64-u,P=y<<u-32|d>>>64-u;var b=A[z[x]];b.high=I,b.low=P}var g=A[0],p=L[0];g.high=p.high,g.low=p.low;for(var w=0;w<5;w++)for(var _=0;_<5;_++){var x=w+5*_,R=L[x],h=A[x],n=A[(w+1)%5+5*_],t=A[(w+2)%5+5*_];R.high=h.high^~n.high&t.high,R.low=h.low^~n.low&t.low}var R=L[0],s=V[q];R.high^=s.high,R.low^=s.low}},_doFinalize:function(){var N=this._data,D=N.words,L=this._nDataBytes*8,B=N.sigBytes*8,O=this.blockSize*32;D[B>>>5]|=1<<24-B%32,D[(Y.ceil((B+1)/O)*O>>>5)-1]|=128,N.sigBytes=D.length*4,this._process();var E=this._state,M=this.cfg.outputLength/8,R=M/8,q=[];for(var w=0;w<R;w++){var I=E[w],P=I.high,_=I.low;P=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,q.push(_),q.push(P)}return new J.init(q,M)},clone:function(){var N=Q.clone.call(this),D=N._state=this._state.slice(0);for(var L=0;L<25;L++)D[L]=D[L].clone();return N}});X.SHA3=Q._createHelper(F),X.HmacSHA3=Q._createHmacHelper(F)}(Math),$.SHA3})});var l$1=o((ni,c$1)=>{(function($,Y){if(typeof ni==="object")c$1.exports=ni=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(ni,function($){return function(Y){var X=$,G=X.lib,J=G.WordArray,Q=G.Hasher,W=X.algo,Z=J.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),K=J.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),H=J.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),z=J.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),V=J.create([0,1518500249,1859775393,2400959708,2840853838]),A=J.create([1352829926,1548603684,1836072691,2053994217,0]),F=W.RIPEMD160=Q.extend({_doReset:function(){this._hash=J.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(M,R){for(var q=0;q<16;q++){var w=R+q,I=M[w];M[w]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}var P=this._hash.words,_=V.words,C=A.words,k=Z.words,S=K.words,T=H.words,v=z.words,x,y,d,u,b,g,p,h,n,t;g=x=P[0],p=y=P[1],h=d=P[2],n=u=P[3],t=b=P[4];var s;for(var q=0;q<80;q+=1){if(s=x+M[R+k[q]]|0,q<16)s+=N(y,d,u)+_[0];else if(q<32)s+=D(y,d,u)+_[1];else if(q<48)s+=L(y,d,u)+_[2];else if(q<64)s+=B(y,d,u)+_[3];else s+=O(y,d,u)+_[4];if(s=s|0,s=E(s,T[q]),s=s+b|0,x=b,b=u,u=E(d,10),d=y,y=s,s=g+M[R+S[q]]|0,q<16)s+=O(p,h,n)+C[0];else if(q<32)s+=B(p,h,n)+C[1];else if(q<48)s+=L(p,h,n)+C[2];else if(q<64)s+=D(p,h,n)+C[3];else s+=N(p,h,n)+C[4];s=s|0,s=E(s,v[q]),s=s+t|0,g=t,t=n,n=E(h,10),h=p,p=s}s=P[1]+d+n|0,P[1]=P[2]+u+t|0,P[2]=P[3]+b+g|0,P[3]=P[4]+x+p|0,P[4]=P[0]+y+h|0,P[0]=s},_doFinalize:function(){var M=this._data,R=M.words,q=this._nDataBytes*8,w=M.sigBytes*8;R[w>>>5]|=128<<24-w%32,R[(w+64>>>9<<4)+14]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360,M.sigBytes=(R.length+1)*4,this._process();var I=this._hash,P=I.words;for(var _=0;_<5;_++){var C=P[_];P[_]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return I},clone:function(){var M=Q.clone.call(this);return M._hash=this._hash.clone(),M}});function N(M,R,q){return M^R^q}function D(M,R,q){return M&R|~M&q}function L(M,R,q){return(M|~R)^q}function B(M,R,q){return M&q|R&~q}function O(M,R,q){return M^(R|~q)}function E(M,R){return M<<R|M>>>32-R}X.RIPEMD160=Q._createHelper(F),X.HmacRIPEMD160=Q._createHmacHelper(F)}(Math),$.RIPEMD160})});var ai=o((ri,i$1)=>{(function($,Y){if(typeof ri==="object")i$1.exports=ri=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(ri,function($){(function(){var Y=$,X=Y.lib,G=X.Base,J=Y.enc,Q=J.Utf8,W=Y.algo,Z=W.HMAC=G.extend({init:function(K,H){if(K=this._hasher=new K.init,typeof H=="string")H=Q.parse(H);var z=K.blockSize,V=z*4;if(H.sigBytes>V)H=K.finalize(H);H.clamp();var A=this._oKey=H.clone(),F=this._iKey=H.clone(),N=A.words,D=F.words;for(var L=0;L<z;L++)N[L]^=1549556828,D[L]^=909522486;A.sigBytes=F.sigBytes=V,this.reset()},reset:function(){var K=this._hasher;K.reset(),K.update(this._iKey)},update:function(K){return this._hasher.update(K),this},finalize:function(K){var H=this._hasher,z=H.finalize(K);H.reset();var V=H.finalize(this._oKey.clone().concat(z));return V}})})()})});var r$1=o((si,n$1)=>{(function($,Y,X){if(typeof si==="object")n$1.exports=si=Y(R8(),pi(),ai());else if(typeof define==="function"&&define.amd)define(["./core","./sha256","./hmac"],Y);else Y($.CryptoJS)})(si,function($){return function(){var Y=$,X=Y.lib,G=X.Base,J=X.WordArray,Q=Y.algo,W=Q.SHA256,Z=Q.HMAC,K=Q.PBKDF2=G.extend({cfg:G.extend({keySize:4,hasher:W,iterations:250000}),init:function(H){this.cfg=this.cfg.extend(H)},compute:function(H,z){var V=this.cfg,A=Z.create(V.hasher,H),F=J.create(),N=J.create([1]),D=F.words,L=N.words,B=V.keySize,O=V.iterations;while(D.length<B){var E=A.update(z).finalize(N);A.reset();var M=E.words,R=M.length,q=E;for(var w=1;w<O;w++){q=A.finalize(q),A.reset();var I=q.words;for(var P=0;P<R;P++)M[P]^=I[P]}F.concat(E),L[0]++}return F.sigBytes=B*4,F}});Y.PBKDF2=function(H,z,V){return K.create(V).compute(H,z)}}(),$.PBKDF2})});var uH=o((oi,a$1)=>{(function($,Y,X){if(typeof oi==="object")a$1.exports=oi=Y(R8(),LK0(),ai());else if(typeof define==="function"&&define.amd)define(["./core","./sha1","./hmac"],Y);else Y($.CryptoJS)})(oi,function($){return function(){var Y=$,X=Y.lib,G=X.Base,J=X.WordArray,Q=Y.algo,W=Q.MD5,Z=Q.EvpKDF=G.extend({cfg:G.extend({keySize:4,hasher:W,iterations:1}),init:function(K){this.cfg=this.cfg.extend(K)},compute:function(K,H){var z,V=this.cfg,A=V.hasher.create(),F=J.create(),N=F.words,D=V.keySize,L=V.iterations;while(N.length<D){if(z)A.update(z);z=A.update(K).finalize(H),A.reset();for(var B=1;B<L;B++)z=A.finalize(z),A.reset();F.concat(z)}return F.sigBytes=D*4,F}});Y.EvpKDF=function(K,H,z){return Z.create(z).compute(K,H)}}(),$.EvpKDF})});var XY=o((ti,s$1)=>{(function($,Y,X){if(typeof ti==="object")s$1.exports=ti=Y(R8(),uH());else if(typeof define==="function"&&define.amd)define(["./core","./evpkdf"],Y);else Y($.CryptoJS)})(ti,function($){$.lib.Cipher||function(Y){var X=$,G=X.lib,J=G.Base,Q=G.WordArray,W=G.BufferedBlockAlgorithm,Z=X.enc,K=Z.Utf8,H=Z.Base64,z=X.algo,V=z.EvpKDF,A=G.Cipher=W.extend({cfg:J.extend(),createEncryptor:function(C,k){return this.create(this._ENC_XFORM_MODE,C,k)},createDecryptor:function(C,k){return this.create(this._DEC_XFORM_MODE,C,k)},init:function(C,k,S){this.cfg=this.cfg.extend(S),this._xformMode=C,this._key=k,this.reset()},reset:function(){W.reset.call(this),this._doReset()},process:function(C){return this._append(C),this._process()},finalize:function(C){if(C)this._append(C);var k=this._doFinalize();return k},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function C(k){if(typeof k=="string")return _;else return w}return function(k){return{encrypt:function(S,T,v){return C(T).encrypt(k,S,T,v)},decrypt:function(S,T,v){return C(T).decrypt(k,S,T,v)}}}}()}),F=G.StreamCipher=A.extend({_doFinalize:function(){var C=this._process(!0);return C},blockSize:1}),N=X.mode={},D=G.BlockCipherMode=J.extend({createEncryptor:function(C,k){return this.Encryptor.create(C,k)},createDecryptor:function(C,k){return this.Decryptor.create(C,k)},init:function(C,k){this._cipher=C,this._iv=k}}),L=N.CBC=function(){var C=D.extend();C.Encryptor=C.extend({processBlock:function(S,T){var v=this._cipher,x=v.blockSize;k.call(this,S,T,x),v.encryptBlock(S,T),this._prevBlock=S.slice(T,T+x)}}),C.Decryptor=C.extend({processBlock:function(S,T){var v=this._cipher,x=v.blockSize,y=S.slice(T,T+x);v.decryptBlock(S,T),k.call(this,S,T,x),this._prevBlock=y}});function k(S,T,v){var x,y=this._iv;if(y)x=y,this._iv=Y;else x=this._prevBlock;for(var d=0;d<v;d++)S[T+d]^=x[d]}return C}(),B=X.pad={},O=B.Pkcs7={pad:function(C,k){var S=k*4,T=S-C.sigBytes%S,v=T<<24|T<<16|T<<8|T,x=[];for(var y=0;y<T;y+=4)x.push(v);var d=Q.create(x,T);C.concat(d)},unpad:function(C){var k=C.words[C.sigBytes-1>>>2]&255;C.sigBytes-=k}},E=G.BlockCipher=A.extend({cfg:A.cfg.extend({mode:L,padding:O}),reset:function(){var C;A.reset.call(this);var k=this.cfg,S=k.iv,T=k.mode;if(this._xformMode==this._ENC_XFORM_MODE)C=T.createEncryptor;else C=T.createDecryptor,this._minBufferSize=1;if(this._mode&&this._mode.__creator==C)this._mode.init(this,S&&S.words);else this._mode=C.call(T,this,S&&S.words),this._mode.__creator=C},_doProcessBlock:function(C,k){this._mode.processBlock(C,k)},_doFinalize:function(){var C,k=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE)k.pad(this._data,this.blockSize),C=this._process(!0);else C=this._process(!0),k.unpad(C);return C},blockSize:4}),M=G.CipherParams=J.extend({init:function(C){this.mixIn(C)},toString:function(C){return(C||this.formatter).stringify(this)}}),R=X.format={},q=R.OpenSSL={stringify:function(C){var k,S=C.ciphertext,T=C.salt;if(T)k=Q.create([1398893684,1701076831]).concat(T).concat(S);else k=S;return k.toString(H)},parse:function(C){var k,S=H.parse(C),T=S.words;if(T[0]==1398893684&&T[1]==1701076831)k=Q.create(T.slice(2,4)),T.splice(0,4),S.sigBytes-=16;return M.create({ciphertext:S,salt:k})}},w=G.SerializableCipher=J.extend({cfg:J.extend({format:q}),encrypt:function(C,k,S,T){T=this.cfg.extend(T);var v=C.createEncryptor(S,T),x=v.finalize(k),y=v.cfg;return M.create({ciphertext:x,key:S,iv:y.iv,algorithm:C,mode:y.mode,padding:y.padding,blockSize:C.blockSize,formatter:T.format})},decrypt:function(C,k,S,T){T=this.cfg.extend(T),k=this._parse(k,T.format);var v=C.createDecryptor(S,T).finalize(k.ciphertext);return v},_parse:function(C,k){if(typeof C=="string")return k.parse(C,this);else return C}}),I=X.kdf={},P=I.OpenSSL={execute:function(C,k,S,T,v){if(!T)T=Q.random(8);if(!v)var x=V.create({keySize:k+S}).compute(C,T);else var x=V.create({keySize:k+S,hasher:v}).compute(C,T);var y=Q.create(x.words.slice(k),S*4);return x.sigBytes=k*4,M.create({key:x,iv:y,salt:T})}},_=G.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:P}),encrypt:function(C,k,S,T){T=this.cfg.extend(T);var v=T.kdf.execute(S,C.keySize,C.ivSize,T.salt,T.hasher);T.iv=v.iv;var x=w.encrypt.call(this,C,k,v.key,T);return x.mixIn(v),x},decrypt:function(C,k,S,T){T=this.cfg.extend(T),k=this._parse(k,T.format);var v=T.kdf.execute(S,C.keySize,C.ivSize,k.salt,T.hasher);T.iv=v.iv;var x=w.decrypt.call(this,C,k,v.key,T);return x}})}()})});var t$1=o((ei,o$1)=>{(function($,Y,X){if(typeof ei==="object")o$1.exports=ei=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(ei,function($){return $.mode.CFB=function(){var Y=$.lib.BlockCipherMode.extend();Y.Encryptor=Y.extend({processBlock:function(G,J){var Q=this._cipher,W=Q.blockSize;X.call(this,G,J,W,Q),this._prevBlock=G.slice(J,J+W)}}),Y.Decryptor=Y.extend({processBlock:function(G,J){var Q=this._cipher,W=Q.blockSize,Z=G.slice(J,J+W);X.call(this,G,J,W,Q),this._prevBlock=Z}});function X(G,J,Q,W){var Z,K=this._iv;if(K)Z=K.slice(0),this._iv=void 0;else Z=this._prevBlock;W.encryptBlock(Z,0);for(var H=0;H<Q;H++)G[J+H]^=Z[H]}return Y}(),$.mode.CFB})});var $Y1=o(($n,e$1)=>{(function($,Y,X){if(typeof $n==="object")e$1.exports=$n=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})($n,function($){return $.mode.CTR=function(){var Y=$.lib.BlockCipherMode.extend(),X=Y.Encryptor=Y.extend({processBlock:function(G,J){var Q=this._cipher,W=Q.blockSize,Z=this._iv,K=this._counter;if(Z)K=this._counter=Z.slice(0),this._iv=void 0;var H=K.slice(0);Q.encryptBlock(H,0),K[W-1]=K[W-1]+1|0;for(var z=0;z<W;z++)G[J+z]^=H[z]}});return Y.Decryptor=X,Y}(),$.mode.CTR})});var XY1=o((Yn,YY1)=>{(function($,Y,X){if(typeof Yn==="object")YY1.exports=Yn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Yn,function($){return $.mode.CTRGladman=function(){var Y=$.lib.BlockCipherMode.extend();function X(Q){if((Q>>24&255)===255){var W=Q>>16&255,Z=Q>>8&255,K=Q&255;if(W===255)if(W=0,Z===255)if(Z=0,K===255)K=0;else++K;else++Z;else++W;Q=0,Q+=W<<16,Q+=Z<<8,Q+=K}else Q+=16777216;return Q}function G(Q){if((Q[0]=X(Q[0]))===0)Q[1]=X(Q[1]);return Q}var J=Y.Encryptor=Y.extend({processBlock:function(Q,W){var Z=this._cipher,K=Z.blockSize,H=this._iv,z=this._counter;if(H)z=this._counter=H.slice(0),this._iv=void 0;G(z);var V=z.slice(0);Z.encryptBlock(V,0);for(var A=0;A<K;A++)Q[W+A]^=V[A]}});return Y.Decryptor=J,Y}(),$.mode.CTRGladman})});var JY1=o((Xn,GY1)=>{(function($,Y,X){if(typeof Xn==="object")GY1.exports=Xn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Xn,function($){return $.mode.OFB=function(){var Y=$.lib.BlockCipherMode.extend(),X=Y.Encryptor=Y.extend({processBlock:function(G,J){var Q=this._cipher,W=Q.blockSize,Z=this._iv,K=this._keystream;if(Z)K=this._keystream=Z.slice(0),this._iv=void 0;Q.encryptBlock(K,0);for(var H=0;H<W;H++)G[J+H]^=K[H]}});return Y.Decryptor=X,Y}(),$.mode.OFB})});var WY1=o((Gn,QY1)=>{(function($,Y,X){if(typeof Gn==="object")QY1.exports=Gn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Gn,function($){return $.mode.ECB=function(){var Y=$.lib.BlockCipherMode.extend();return Y.Encryptor=Y.extend({processBlock:function(X,G){this._cipher.encryptBlock(X,G)}}),Y.Decryptor=Y.extend({processBlock:function(X,G){this._cipher.decryptBlock(X,G)}}),Y}(),$.mode.ECB})});var KY1=o((Jn,ZY1)=>{(function($,Y,X){if(typeof Jn==="object")ZY1.exports=Jn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Jn,function($){return $.pad.AnsiX923={pad:function(Y,X){var G=Y.sigBytes,J=X*4,Q=J-G%J,W=G+Q-1;Y.clamp(),Y.words[W>>>2]|=Q<<24-W%4*8,Y.sigBytes+=Q},unpad:function(Y){var X=Y.words[Y.sigBytes-1>>>2]&255;Y.sigBytes-=X}},$.pad.Ansix923})});var HY1=o((Qn,UY1)=>{(function($,Y,X){if(typeof Qn==="object")UY1.exports=Qn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Qn,function($){return $.pad.Iso10126={pad:function(Y,X){var G=X*4,J=G-Y.sigBytes%G;Y.concat($.lib.WordArray.random(J-1)).concat($.lib.WordArray.create([J<<24],1))},unpad:function(Y){var X=Y.words[Y.sigBytes-1>>>2]&255;Y.sigBytes-=X}},$.pad.Iso10126})});var VY1=o((Wn,zY1)=>{(function($,Y,X){if(typeof Wn==="object")zY1.exports=Wn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Wn,function($){return $.pad.Iso97971={pad:function(Y,X){Y.concat($.lib.WordArray.create([2147483648],1)),$.pad.ZeroPadding.pad(Y,X)},unpad:function(Y){$.pad.ZeroPadding.unpad(Y),Y.sigBytes--}},$.pad.Iso97971})});var FY1=o((Zn,AY1)=>{(function($,Y,X){if(typeof Zn==="object")AY1.exports=Zn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Zn,function($){return $.pad.ZeroPadding={pad:function(Y,X){var G=X*4;Y.clamp(),Y.sigBytes+=G-(Y.sigBytes%G||G)},unpad:function(Y){var X=Y.words,G=Y.sigBytes-1;for(var G=Y.sigBytes-1;G>=0;G--)if(X[G>>>2]>>>24-G%4*8&255){Y.sigBytes=G+1;break}}},$.pad.ZeroPadding})});var NY1=o((Kn,DY1)=>{(function($,Y,X){if(typeof Kn==="object")DY1.exports=Kn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Kn,function($){return $.pad.NoPadding={pad:function(){},unpad:function(){}},$.pad.NoPadding})});var BY1=o((Un,LY1)=>{(function($,Y,X){if(typeof Un==="object")LY1.exports=Un=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Un,function($){return function(Y){var X=$,G=X.lib,J=G.CipherParams,Q=X.enc,W=Q.Hex,Z=X.format,K=Z.Hex={stringify:function(H){return H.ciphertext.toString(W)},parse:function(H){var z=W.parse(H);return J.create({ciphertext:z})}}}(),$.format.Hex})});var EY1=o((Hn,OY1)=>{(function($,Y,X){if(typeof Hn==="object")OY1.exports=Hn=Y(R8(),zA(),VA(),uH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(Hn,function($){return function(){var Y=$,X=Y.lib,G=X.BlockCipher,J=Y.algo,Q=[],W=[],Z=[],K=[],H=[],z=[],V=[],A=[],F=[],N=[];(function(){var B=[];for(var O=0;O<256;O++)if(O<128)B[O]=O<<1;else B[O]=O<<1^283;var E=0,M=0;for(var O=0;O<256;O++){var R=M^M<<1^M<<2^M<<3^M<<4;R=R>>>8^R&255^99,Q[E]=R,W[R]=E;var q=B[E],w=B[q],I=B[w],P=B[R]*257^R*16843008;Z[E]=P<<24|P>>>8,K[E]=P<<16|P>>>16,H[E]=P<<8|P>>>24,z[E]=P;var P=I*16843009^w*65537^q*257^E*16843008;if(V[R]=P<<24|P>>>8,A[R]=P<<16|P>>>16,F[R]=P<<8|P>>>24,N[R]=P,!E)E=M=1;else E=q^B[B[B[I^q]]],M^=B[B[M]]}})();var D=[0,1,2,4,8,16,32,64,128,27,54],L=J.AES=G.extend({_doReset:function(){var B;if(this._nRounds&&this._keyPriorReset===this._key)return;var O=this._keyPriorReset=this._key,E=O.words,M=O.sigBytes/4,R=this._nRounds=M+6,q=(R+1)*4,w=this._keySchedule=[];for(var I=0;I<q;I++)if(I<M)w[I]=E[I];else{if(B=w[I-1],!(I%M))B=B<<8|B>>>24,B=Q[B>>>24]<<24|Q[B>>>16&255]<<16|Q[B>>>8&255]<<8|Q[B&255],B^=D[I/M|0]<<24;else if(M>6&&I%M==4)B=Q[B>>>24]<<24|Q[B>>>16&255]<<16|Q[B>>>8&255]<<8|Q[B&255];w[I]=w[I-M]^B}var P=this._invKeySchedule=[];for(var _=0;_<q;_++){var I=q-_;if(_%4)var B=w[I];else var B=w[I-4];if(_<4||I<=4)P[_]=B;else P[_]=V[Q[B>>>24]]^A[Q[B>>>16&255]]^F[Q[B>>>8&255]]^N[Q[B&255]]}},encryptBlock:function(B,O){this._doCryptBlock(B,O,this._keySchedule,Z,K,H,z,Q)},decryptBlock:function(B,O){var E=B[O+1];B[O+1]=B[O+3],B[O+3]=E,this._doCryptBlock(B,O,this._invKeySchedule,V,A,F,N,W);var E=B[O+1];B[O+1]=B[O+3],B[O+3]=E},_doCryptBlock:function(B,O,E,M,R,q,w,I){var P=this._nRounds,_=B[O]^E[0],C=B[O+1]^E[1],k=B[O+2]^E[2],S=B[O+3]^E[3],T=4;for(var v=1;v<P;v++){var x=M[_>>>24]^R[C>>>16&255]^q[k>>>8&255]^w[S&255]^E[T++],y=M[C>>>24]^R[k>>>16&255]^q[S>>>8&255]^w[_&255]^E[T++],d=M[k>>>24]^R[S>>>16&255]^q[_>>>8&255]^w[C&255]^E[T++],u=M[S>>>24]^R[_>>>16&255]^q[C>>>8&255]^w[k&255]^E[T++];_=x,C=y,k=d,S=u}var x=(I[_>>>24]<<24|I[C>>>16&255]<<16|I[k>>>8&255]<<8|I[S&255])^E[T++],y=(I[C>>>24]<<24|I[k>>>16&255]<<16|I[S>>>8&255]<<8|I[_&255])^E[T++],d=(I[k>>>24]<<24|I[S>>>16&255]<<16|I[_>>>8&255]<<8|I[C&255])^E[T++],u=(I[S>>>24]<<24|I[_>>>16&255]<<16|I[C>>>8&255]<<8|I[k&255])^E[T++];B[O]=x,B[O+1]=y,B[O+2]=d,B[O+3]=u},keySize:8});Y.AES=G._createHelper(L)}(),$.AES})});var RY1=o((zn,MY1)=>{(function($,Y,X){if(typeof zn==="object")MY1.exports=zn=Y(R8(),zA(),VA(),uH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(zn,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=X.BlockCipher,Q=Y.algo,W=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],Z=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],K=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],H=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],z=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],V=Q.DES=J.extend({_doReset:function(){var D=this._key,L=D.words,B=[];for(var O=0;O<56;O++){var E=W[O]-1;B[O]=L[E>>>5]>>>31-E%32&1}var M=this._subKeys=[];for(var R=0;R<16;R++){var q=M[R]=[],w=K[R];for(var O=0;O<24;O++)q[O/6|0]|=B[(Z[O]-1+w)%28]<<31-O%6,q[4+(O/6|0)]|=B[28+(Z[O+24]-1+w)%28]<<31-O%6;q[0]=q[0]<<1|q[0]>>>31;for(var O=1;O<7;O++)q[O]=q[O]>>>(O-1)*4+3;q[7]=q[7]<<5|q[7]>>>27}var I=this._invSubKeys=[];for(var O=0;O<16;O++)I[O]=M[15-O]},encryptBlock:function(D,L){this._doCryptBlock(D,L,this._subKeys)},decryptBlock:function(D,L){this._doCryptBlock(D,L,this._invSubKeys)},_doCryptBlock:function(D,L,B){this._lBlock=D[L],this._rBlock=D[L+1],A.call(this,4,252645135),A.call(this,16,65535),F.call(this,2,858993459),F.call(this,8,16711935),A.call(this,1,1431655765);for(var O=0;O<16;O++){var E=B[O],M=this._lBlock,R=this._rBlock,q=0;for(var w=0;w<8;w++)q|=H[w][((R^E[w])&z[w])>>>0];this._lBlock=R,this._rBlock=M^q}var I=this._lBlock;this._lBlock=this._rBlock,this._rBlock=I,A.call(this,1,1431655765),F.call(this,8,16711935),F.call(this,2,858993459),A.call(this,16,65535),A.call(this,4,252645135),D[L]=this._lBlock,D[L+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function A(D,L){var B=(this._lBlock>>>D^this._rBlock)&L;this._rBlock^=B,this._lBlock^=B<<D}function F(D,L){var B=(this._rBlock>>>D^this._lBlock)&L;this._lBlock^=B,this._rBlock^=B<<D}Y.DES=J._createHelper(V);var N=Q.TripleDES=J.extend({_doReset:function(){var D=this._key,L=D.words;if(L.length!==2&&L.length!==4&&L.length<6)throw Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var B=L.slice(0,2),O=L.length<4?L.slice(0,2):L.slice(2,4),E=L.length<6?L.slice(0,2):L.slice(4,6);this._des1=V.createEncryptor(G.create(B)),this._des2=V.createEncryptor(G.create(O)),this._des3=V.createEncryptor(G.create(E))},encryptBlock:function(D,L){this._des1.encryptBlock(D,L),this._des2.decryptBlock(D,L),this._des3.encryptBlock(D,L)},decryptBlock:function(D,L){this._des3.decryptBlock(D,L),this._des2.encryptBlock(D,L),this._des1.decryptBlock(D,L)},keySize:6,ivSize:2,blockSize:2});Y.TripleDES=J._createHelper(N)}(),$.TripleDES})});var IY1=o((Vn,qY1)=>{(function($,Y,X){if(typeof Vn==="object")qY1.exports=Vn=Y(R8(),zA(),VA(),uH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(Vn,function($){return function(){var Y=$,X=Y.lib,G=X.StreamCipher,J=Y.algo,Q=J.RC4=G.extend({_doReset:function(){var K=this._key,H=K.words,z=K.sigBytes,V=this._S=[];for(var A=0;A<256;A++)V[A]=A;for(var A=0,F=0;A<256;A++){var N=A%z,D=H[N>>>2]>>>24-N%4*8&255;F=(F+V[A]+D)%256;var L=V[A];V[A]=V[F],V[F]=L}this._i=this._j=0},_doProcessBlock:function(K,H){K[H]^=W.call(this)},keySize:8,ivSize:0});function W(){var K=this._S,H=this._i,z=this._j,V=0;for(var A=0;A<4;A++){H=(H+1)%256,z=(z+K[H])%256;var F=K[H];K[H]=K[z],K[z]=F,V|=K[(K[H]+K[z])%256]<<24-A*8}return this._i=H,this._j=z,V}Y.RC4=G._createHelper(Q);var Z=J.RC4Drop=Q.extend({cfg:Q.cfg.extend({drop:192}),_doReset:function(){Q._doReset.call(this);for(var K=this.cfg.drop;K>0;K--)W.call(this)}});Y.RC4Drop=G._createHelper(Z)}(),$.RC4})});var wY1=o((An,PY1)=>{(function($,Y,X){if(typeof An==="object")PY1.exports=An=Y(R8(),zA(),VA(),uH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(An,function($){return function(){var Y=$,X=Y.lib,G=X.StreamCipher,J=Y.algo,Q=[],W=[],Z=[],K=J.Rabbit=G.extend({_doReset:function(){var z=this._key.words,V=this.cfg.iv;for(var A=0;A<4;A++)z[A]=(z[A]<<8|z[A]>>>24)&16711935|(z[A]<<24|z[A]>>>8)&4278255360;var F=this._X=[z[0],z[3]<<16|z[2]>>>16,z[1],z[0]<<16|z[3]>>>16,z[2],z[1]<<16|z[0]>>>16,z[3],z[2]<<16|z[1]>>>16],N=this._C=[z[2]<<16|z[2]>>>16,z[0]&4294901760|z[1]&65535,z[3]<<16|z[3]>>>16,z[1]&4294901760|z[2]&65535,z[0]<<16|z[0]>>>16,z[2]&4294901760|z[3]&65535,z[1]<<16|z[1]>>>16,z[3]&4294901760|z[0]&65535];this._b=0;for(var A=0;A<4;A++)H.call(this);for(var A=0;A<8;A++)N[A]^=F[A+4&7];if(V){var D=V.words,L=D[0],B=D[1],O=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,E=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,M=O>>>16|E&4294901760,R=E<<16|O&65535;N[0]^=O,N[1]^=M,N[2]^=E,N[3]^=R,N[4]^=O,N[5]^=M,N[6]^=E,N[7]^=R;for(var A=0;A<4;A++)H.call(this)}},_doProcessBlock:function(z,V){var A=this._X;H.call(this),Q[0]=A[0]^A[5]>>>16^A[3]<<16,Q[1]=A[2]^A[7]>>>16^A[5]<<16,Q[2]=A[4]^A[1]>>>16^A[7]<<16,Q[3]=A[6]^A[3]>>>16^A[1]<<16;for(var F=0;F<4;F++)Q[F]=(Q[F]<<8|Q[F]>>>24)&16711935|(Q[F]<<24|Q[F]>>>8)&4278255360,z[V+F]^=Q[F]},blockSize:4,ivSize:2});function H(){var z=this._X,V=this._C;for(var A=0;A<8;A++)W[A]=V[A];V[0]=V[0]+1295307597+this._b|0,V[1]=V[1]+3545052371+(V[0]>>>0<W[0]>>>0?1:0)|0,V[2]=V[2]+886263092+(V[1]>>>0<W[1]>>>0?1:0)|0,V[3]=V[3]+1295307597+(V[2]>>>0<W[2]>>>0?1:0)|0,V[4]=V[4]+3545052371+(V[3]>>>0<W[3]>>>0?1:0)|0,V[5]=V[5]+886263092+(V[4]>>>0<W[4]>>>0?1:0)|0,V[6]=V[6]+1295307597+(V[5]>>>0<W[5]>>>0?1:0)|0,V[7]=V[7]+3545052371+(V[6]>>>0<W[6]>>>0?1:0)|0,this._b=V[7]>>>0<W[7]>>>0?1:0;for(var A=0;A<8;A++){var F=z[A]+V[A],N=F&65535,D=F>>>16,L=((N*N>>>17)+N*D>>>15)+D*D,B=((F&4294901760)*F|0)+((F&65535)*F|0);Z[A]=L^B}z[0]=Z[0]+(Z[7]<<16|Z[7]>>>16)+(Z[6]<<16|Z[6]>>>16)|0,z[1]=Z[1]+(Z[0]<<8|Z[0]>>>24)+Z[7]|0,z[2]=Z[2]+(Z[1]<<16|Z[1]>>>16)+(Z[0]<<16|Z[0]>>>16)|0,z[3]=Z[3]+(Z[2]<<8|Z[2]>>>24)+Z[1]|0,z[4]=Z[4]+(Z[3]<<16|Z[3]>>>16)+(Z[2]<<16|Z[2]>>>16)|0,z[5]=Z[5]+(Z[4]<<8|Z[4]>>>24)+Z[3]|0,z[6]=Z[6]+(Z[5]<<16|Z[5]>>>16)+(Z[4]<<16|Z[4]>>>16)|0,z[7]=Z[7]+(Z[6]<<8|Z[6]>>>24)+Z[5]|0}Y.Rabbit=G._createHelper(K)}(),$.Rabbit})});var jY1=o((Fn,_Y1)=>{(function($,Y,X){if(typeof Fn==="object")_Y1.exports=Fn=Y(R8(),zA(),VA(),uH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(Fn,function($){return function(){var Y=$,X=Y.lib,G=X.StreamCipher,J=Y.algo,Q=[],W=[],Z=[],K=J.RabbitLegacy=G.extend({_doReset:function(){var z=this._key.words,V=this.cfg.iv,A=this._X=[z[0],z[3]<<16|z[2]>>>16,z[1],z[0]<<16|z[3]>>>16,z[2],z[1]<<16|z[0]>>>16,z[3],z[2]<<16|z[1]>>>16],F=this._C=[z[2]<<16|z[2]>>>16,z[0]&4294901760|z[1]&65535,z[3]<<16|z[3]>>>16,z[1]&4294901760|z[2]&65535,z[0]<<16|z[0]>>>16,z[2]&4294901760|z[3]&65535,z[1]<<16|z[1]>>>16,z[3]&4294901760|z[0]&65535];this._b=0;for(var N=0;N<4;N++)H.call(this);for(var N=0;N<8;N++)F[N]^=A[N+4&7];if(V){var D=V.words,L=D[0],B=D[1],O=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,E=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,M=O>>>16|E&4294901760,R=E<<16|O&65535;F[0]^=O,F[1]^=M,F[2]^=E,F[3]^=R,F[4]^=O,F[5]^=M,F[6]^=E,F[7]^=R;for(var N=0;N<4;N++)H.call(this)}},_doProcessBlock:function(z,V){var A=this._X;H.call(this),Q[0]=A[0]^A[5]>>>16^A[3]<<16,Q[1]=A[2]^A[7]>>>16^A[5]<<16,Q[2]=A[4]^A[1]>>>16^A[7]<<16,Q[3]=A[6]^A[3]>>>16^A[1]<<16;for(var F=0;F<4;F++)Q[F]=(Q[F]<<8|Q[F]>>>24)&16711935|(Q[F]<<24|Q[F]>>>8)&4278255360,z[V+F]^=Q[F]},blockSize:4,ivSize:2});function H(){var z=this._X,V=this._C;for(var A=0;A<8;A++)W[A]=V[A];V[0]=V[0]+1295307597+this._b|0,V[1]=V[1]+3545052371+(V[0]>>>0<W[0]>>>0?1:0)|0,V[2]=V[2]+886263092+(V[1]>>>0<W[1]>>>0?1:0)|0,V[3]=V[3]+1295307597+(V[2]>>>0<W[2]>>>0?1:0)|0,V[4]=V[4]+3545052371+(V[3]>>>0<W[3]>>>0?1:0)|0,V[5]=V[5]+886263092+(V[4]>>>0<W[4]>>>0?1:0)|0,V[6]=V[6]+1295307597+(V[5]>>>0<W[5]>>>0?1:0)|0,V[7]=V[7]+3545052371+(V[6]>>>0<W[6]>>>0?1:0)|0,this._b=V[7]>>>0<W[7]>>>0?1:0;for(var A=0;A<8;A++){var F=z[A]+V[A],N=F&65535,D=F>>>16,L=((N*N>>>17)+N*D>>>15)+D*D,B=((F&4294901760)*F|0)+((F&65535)*F|0);Z[A]=L^B}z[0]=Z[0]+(Z[7]<<16|Z[7]>>>16)+(Z[6]<<16|Z[6]>>>16)|0,z[1]=Z[1]+(Z[0]<<8|Z[0]>>>24)+Z[7]|0,z[2]=Z[2]+(Z[1]<<16|Z[1]>>>16)+(Z[0]<<16|Z[0]>>>16)|0,z[3]=Z[3]+(Z[2]<<8|Z[2]>>>24)+Z[1]|0,z[4]=Z[4]+(Z[3]<<16|Z[3]>>>16)+(Z[2]<<16|Z[2]>>>16)|0,z[5]=Z[5]+(Z[4]<<8|Z[4]>>>24)+Z[3]|0,z[6]=Z[6]+(Z[5]<<16|Z[5]>>>16)+(Z[4]<<16|Z[4]>>>16)|0,z[7]=Z[7]+(Z[6]<<8|Z[6]>>>24)+Z[5]|0}Y.RabbitLegacy=G._createHelper(K)}(),$.RabbitLegacy})});var CY1=o((Dn,TY1)=>{(function($,Y,X){if(typeof Dn==="object")TY1.exports=Dn=Y(R8(),zA(),VA(),uH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(Dn,function($){return function(){var Y=$,X=Y.lib,G=X.BlockCipher,J=Y.algo;let Q=16,W=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Z=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,2909710000,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409000,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var K={pbox:[],sbox:[]};function H(N,D){let L=D>>24&255,B=D>>16&255,O=D>>8&255,E=D&255,M=N.sbox[0][L]+N.sbox[1][B];return M=M^N.sbox[2][O],M=M+N.sbox[3][E],M}function z(N,D,L){let B=D,O=L,E;for(let M=0;M<Q;++M)B=B^N.pbox[M],O=H(N,B)^O,E=B,B=O,O=E;return E=B,B=O,O=E,O=O^N.pbox[Q],B=B^N.pbox[Q+1],{left:B,right:O}}function V(N,D,L){let B=D,O=L,E;for(let M=Q+1;M>1;--M)B=B^N.pbox[M],O=H(N,B)^O,E=B,B=O,O=E;return E=B,B=O,O=E,O=O^N.pbox[1],B=B^N.pbox[0],{left:B,right:O}}function A(N,D,L){for(let R=0;R<4;R++){N.sbox[R]=[];for(let q=0;q<256;q++)N.sbox[R][q]=Z[R][q]}let B=0;for(let R=0;R<Q+2;R++)if(N.pbox[R]=W[R]^D[B],B++,B>=L)B=0;let O=0,E=0,M=0;for(let R=0;R<Q+2;R+=2)M=z(N,O,E),O=M.left,E=M.right,N.pbox[R]=O,N.pbox[R+1]=E;for(let R=0;R<4;R++)for(let q=0;q<256;q+=2)M=z(N,O,E),O=M.left,E=M.right,N.sbox[R][q]=O,N.sbox[R][q+1]=E;return!0}var F=J.Blowfish=G.extend({_doReset:function(){if(this._keyPriorReset===this._key)return;var N=this._keyPriorReset=this._key,D=N.words,L=N.sigBytes/4;A(K,D,L)},encryptBlock:function(N,D){var L=z(K,N[D],N[D+1]);N[D]=L.left,N[D+1]=L.right},decryptBlock:function(N,D){var L=V(K,N[D],N[D+1]);N[D]=L.left,N[D+1]=L.right},blockSize:2,keySize:4,ivSize:2});Y.Blowfish=G._createHelper(F)}(),$.Blowfish})});var kY1=o((Nn,SY1)=>{(function($,Y,X){if(typeof Nn==="object")SY1.exports=Nn=Y(R8(),kk(),j$1(),C$1(),zA(),v$1(),VA(),LK0(),pi(),f$1(),BK0(),u$1(),d$1(),l$1(),ai(),r$1(),uH(),XY(),t$1(),$Y1(),XY1(),JY1(),WY1(),KY1(),HY1(),VY1(),FY1(),NY1(),BY1(),EY1(),RY1(),IY1(),wY1(),jY1(),CY1());else if(typeof define==="function"&&define.amd)define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],Y);else $.CryptoJS=Y($.CryptoJS)})(Nn,function($){return $})});var ek=o((VJ1)=>{Object.defineProperty(VJ1,"__esModule",{value:!0});VJ1.raw=VJ1.format=VJ1.escape=VJ1.arrayToList=VJ1.bufferToString=VJ1.objectToValues=VJ1.escapeId=VJ1.dateToString=void 0;var H30=L0("buffer"),IA={backtick:/`/g,dot:/\./g,timezone:/([+\-\s])(\d\d):?(\d\d)?/,escapeChars:/[\0\b\t\n\r\x1a"'\\]/g},Kt4={"\x00":"\\0","\b":"\\b","\t":"\\t","\n":"\\n","\r":"\\r","\x1A":"\\Z",'"':"\\\"","'":"\\'","\\":"\\\\"},I5={singleQuote:39,backtick:96,backslash:92,dash:45,slash:47,asterisk:42,questionMark:63,newline:10,space:32,tab:9,carriageReturn:13},KJ1=($)=>typeof $==="object"&&$!==null&&!Array.isArray($),WJ1=($)=>$>=65&&$<=90||$>=97&&$<=122||$>=48&&$<=57||$===95,Ut4=($)=>$===I5.space||$===I5.tab||$===I5.newline||$===I5.carriageReturn,Ht4=($,Y,X)=>{if(Y>=X)return!0;for(let G=Y;G<X;G++){let J=$.charCodeAt(G);if(J!==I5.space&&J!==I5.tab&&J!==I5.newline&&J!==I5.carriageReturn)return!1}return!0},zt4=($)=>$|32,K30=($,Y,X,G)=>{for(let J=0;J<X.length;J++)if(zt4($.charCodeAt(Y+J))!==X.charCodeAt(J))return!1;return(Y===0||!WJ1($.charCodeAt(Y-1)))&&(Y+X.length>=G||!WJ1($.charCodeAt(Y+X.length)))},UJ1=($,Y)=>{let X=$.charCodeAt(Y),G=$.charCodeAt(Y+1);if(X===I5.singleQuote){for(let J=Y+1;J<$.length;J++)if($.charCodeAt(J)===I5.backslash)J++;else if($.charCodeAt(J)===I5.singleQuote)return J+1;return $.length}if(X===I5.backtick){let J=$.length;for(let Q=Y+1;Q<J;Q++){if($.charCodeAt(Q)!==I5.backtick)continue;if($.charCodeAt(Q+1)===I5.backtick){Q++;continue}return Q+1}return J}if(X===I5.dash&&G===I5.dash){let J=$.indexOf(`
`,Y+2);return J===-1?$.length:J+1}if(X===I5.slash&&G===I5.asterisk){let J=$.indexOf("*/",Y+2);return J===-1?$.length:J+2}return-1},U30=($,Y)=>{let X=$.length;for(let G=Y;G<X;G++){let J=$.charCodeAt(G);if(J===I5.questionMark)return G;if(J===I5.singleQuote||J===I5.backtick||J===I5.dash||J===I5.slash){let Q=UJ1($,G);if(Q!==-1)G=Q-1}}return-1},ZJ1=($,Y=0)=>{let X=$.length;for(let G=Y;G<X;G++){let J=$.charCodeAt(G),Q=J|32;if(J===I5.singleQuote||J===I5.backtick||J===I5.dash||J===I5.slash){let W=UJ1($,G);if(W!==-1){G=W-1;continue}}if(Q===115&&K30($,G,"set",X))return G+3;if(Q===107&&K30($,G,"key",X)){let W=G+3;while(W<X&&Ut4($.charCodeAt(W)))W++;if(K30($,W,"update",X))return W+6}}return-1},HJ1=($)=>Object.prototype.toString.call($)==="[object Date]",zJ1=($)=>typeof $==="object"&&$!==null&&("toSqlString"in $)&&typeof $.toSqlString==="function",Oq=($)=>{IA.escapeChars.lastIndex=0;let Y=0,X="",G;for(G=IA.escapeChars.exec($);G!==null;G=IA.escapeChars.exec($))X+=$.slice(Y,G.index),X+=Kt4[G[0]],Y=IA.escapeChars.lastIndex;if(Y===0)return`'${$}'`;if(Y<$.length)return`'${X}${$.slice(Y)}'`;return`'${X}'`},ok=($)=>$<10?"0"+$:""+$,Vt4=($)=>$<10?"00"+$:$<100?"0"+$:""+$,At4=($)=>$<10?"000"+$:$<100?"00"+$:$<1000?"0"+$:""+$,Ft4=($)=>{if($==="Z")return 0;let Y=$.match(IA.timezone);if(Y)return(Y[1]==="-"?-1:1)*(Number.parseInt(Y[2],10)+(Y[3]?Number.parseInt(Y[3],10):0)/60)*60;return!1},Dt4=($,Y)=>{if(Number.isNaN($.getTime()))return"NULL";let X,G,J,Q,W,Z,K;if(Y==="local")X=$.getFullYear(),G=$.getMonth()+1,J=$.getDate(),Q=$.getHours(),W=$.getMinutes(),Z=$.getSeconds(),K=$.getMilliseconds();else{let H=Ft4(Y),z=$.getTime();if(H!==!1&&H!==0)z+=H*60000;let V=new Date(z);X=V.getUTCFullYear(),G=V.getUTCMonth()+1,J=V.getUTCDate(),Q=V.getUTCHours(),W=V.getUTCMinutes(),Z=V.getUTCSeconds(),K=V.getUTCMilliseconds()}return Oq(At4(X)+"-"+ok(G)+"-"+ok(J)+" "+ok(Q)+":"+ok(W)+":"+ok(Z)+"."+Vt4(K))};VJ1.dateToString=Dt4;var Nt4=($,Y)=>{if(Array.isArray($)){let J=$.length,Q=Array(J);for(let W=0;W<J;W++)Q[W]=VJ1.escapeId($[W],Y);return Q.join(", ")}let X=String($),G=X.indexOf("->")!==-1;if(Y||G){if(X.indexOf("`")===-1)return`\`${X}\``;return`\`${X.replace(IA.backtick,"``")}\``}if(X.indexOf("`")===-1&&X.indexOf(".")===-1)return`\`${X}\``;return`\`${X.replace(IA.backtick,"``").replace(IA.dot,"`.`")}\``};VJ1.escapeId=Nt4;var Lt4=($,Y)=>{let X=Object.keys($),G=X.length;if(G===0)return"";let J="";for(let Q=0;Q<G;Q++){let W=X[Q],Z=$[W];if(typeof Z==="function")continue;if(J.length>0)J+=", ";J+=VJ1.escapeId(W),J+=" = ",J+=VJ1.escape(Z,!0,Y)}return J};VJ1.objectToValues=Lt4;var Bt4=($)=>`X${Oq($.toString("hex"))}`;VJ1.bufferToString=Bt4;var Ot4=($,Y)=>{let X=$.length,G=Array(X);for(let J=0;J<X;J++){let Q=$[J];if(Array.isArray(Q))G[J]=`(${VJ1.arrayToList(Q,Y)})`;else G[J]=VJ1.escape(Q,!0,Y)}return G.join(", ")};VJ1.arrayToList=Ot4;var Et4=($,Y,X)=>{if($===void 0||$===null)return"NULL";switch(typeof $){case"boolean":return $?"true":"false";case"number":case"bigint":return $+"";case"object":{if(HJ1($))return VJ1.dateToString($,X||"local");if(Array.isArray($))return VJ1.arrayToList($,X);if(H30.Buffer.isBuffer($))return VJ1.bufferToString($);if($ instanceof Uint8Array)return VJ1.bufferToString(H30.Buffer.from($));if(zJ1($))return String($.toSqlString());if(!(Y===void 0||Y===null))return Oq(String($));if(KJ1($))return VJ1.objectToValues($,X);return Oq(String($))}case"string":return Oq($);default:return Oq(String($))}};VJ1.escape=Et4;var Mt4=($,Y,X,G)=>{if(Y===void 0||Y===null)return $;let J=Array.isArray(Y)?Y:[Y],Q=J.length,W=-2,Z="",K=0,H=0,z=U30($,0);while(H<Q&&z!==-1){let V=z+1,A;while($.charCodeAt(V)===63)V++;let F=V-z,N=J[H];if(F>2){z=U30($,V);continue}if(F===2)A=VJ1.escapeId(N);else if(typeof N==="number")A=`${N}`;else if(typeof N==="object"&&N!==null&&!X){if(W===-2)W=ZJ1($);if(W!==-1&&W<=z&&Ht4($,W,z)&&!zJ1(N)&&!Array.isArray(N)&&!H30.Buffer.isBuffer(N)&&!(N instanceof Uint8Array)&&!HJ1(N)&&KJ1(N))A=VJ1.objectToValues(N,G),W=ZJ1($,V);else A=VJ1.escape(N,!0,G)}else A=VJ1.escape(N,X,G);Z+=$.slice(K,z),Z+=A,K=V,H++,z=U30($,V)}if(K===0)return $;if(K<$.length)return Z+$.slice(K);return Z};VJ1.format=Mt4;var Rt4=($)=>{if(typeof $!=="string")throw TypeError("argument sql must be a string");return{toSqlString:()=>$}};VJ1.raw=Rt4});var h2=o((It4)=>{It4.LONG_PASSWORD=1;It4.FOUND_ROWS=2;It4.LONG_FLAG=4;It4.CONNECT_WITH_DB=8;It4.NO_SCHEMA=16;It4.COMPRESS=32;It4.ODBC=64;It4.LOCAL_FILES=128;It4.IGNORE_SPACE=256;It4.PROTOCOL_41=512;It4.INTERACTIVE=1024;It4.SSL=2048;It4.IGNORE_SIGPIPE=4096;It4.TRANSACTIONS=8192;It4.RESERVED=16384;It4.SECURE_CONNECTION=32768;It4.MULTI_STATEMENTS=65536;It4.MULTI_RESULTS=131072;It4.PS_MULTI_RESULTS=262144;It4.PLUGIN_AUTH=524288;It4.CONNECT_ATTRS=1048576;It4.PLUGIN_AUTH_LENENC_CLIENT_DATA=2097152;It4.CAN_HANDLE_EXPIRED_PASSWORDS=4194304;It4.SESSION_TRACK=8388608;It4.CLIENT_QUERY_ATTRIBUTES=134217728;It4.SSL_VERIFY_SERVER_CERT=1073741824;It4.REMEMBER_OPTIONS=2147483648;It4.MULTI_FACTOR_AUTHENTICATION=268435456});var PA=o((et4)=>{et4.BIG5_CHINESE_CI=1;et4.LATIN2_CZECH_CS=2;et4.DEC8_SWEDISH_CI=3;et4.CP850_GENERAL_CI=4;et4.LATIN1_GERMAN1_CI=5;et4.HP8_ENGLISH_CI=6;et4.KOI8R_GENERAL_CI=7;et4.LATIN1_SWEDISH_CI=8;et4.LATIN2_GENERAL_CI=9;et4.SWE7_SWEDISH_CI=10;et4.ASCII_GENERAL_CI=11;et4.UJIS_JAPANESE_CI=12;et4.SJIS_JAPANESE_CI=13;et4.CP1251_BULGARIAN_CI=14;et4.LATIN1_DANISH_CI=15;et4.HEBREW_GENERAL_CI=16;et4.TIS620_THAI_CI=18;et4.EUCKR_KOREAN_CI=19;et4.LATIN7_ESTONIAN_CS=20;et4.LATIN2_HUNGARIAN_CI=21;et4.KOI8U_GENERAL_CI=22;et4.CP1251_UKRAINIAN_CI=23;et4.GB2312_CHINESE_CI=24;et4.GREEK_GENERAL_CI=25;et4.CP1250_GENERAL_CI=26;et4.LATIN2_CROATIAN_CI=27;et4.GBK_CHINESE_CI=28;et4.CP1257_LITHUANIAN_CI=29;et4.LATIN5_TURKISH_CI=30;et4.LATIN1_GERMAN2_CI=31;et4.ARMSCII8_GENERAL_CI=32;et4.UTF8_GENERAL_CI=33;et4.CP1250_CZECH_CS=34;et4.UCS2_GENERAL_CI=35;et4.CP866_GENERAL_CI=36;et4.KEYBCS2_GENERAL_CI=37;et4.MACCE_GENERAL_CI=38;et4.MACROMAN_GENERAL_CI=39;et4.CP852_GENERAL_CI=40;et4.LATIN7_GENERAL_CI=41;et4.LATIN7_GENERAL_CS=42;et4.MACCE_BIN=43;et4.CP1250_CROATIAN_CI=44;et4.UTF8MB4_GENERAL_CI=45;et4.UTF8MB4_BIN=46;et4.LATIN1_BIN=47;et4.LATIN1_GENERAL_CI=48;et4.LATIN1_GENERAL_CS=49;et4.CP1251_BIN=50;et4.CP1251_GENERAL_CI=51;et4.CP1251_GENERAL_CS=52;et4.MACROMAN_BIN=53;et4.UTF16_GENERAL_CI=54;et4.UTF16_BIN=55;et4.UTF16LE_GENERAL_CI=56;et4.CP1256_GENERAL_CI=57;et4.CP1257_BIN=58;et4.CP1257_GENERAL_CI=59;et4.UTF32_GENERAL_CI=60;et4.UTF32_BIN=61;et4.UTF16LE_BIN=62;et4.BINARY=63;et4.ARMSCII8_BIN=64;et4.ASCII_BIN=65;et4.CP1250_BIN=66;et4.CP1256_BIN=67;et4.CP866_BIN=68;et4.DEC8_BIN=69;et4.GREEK_BIN=70;et4.HEBREW_BIN=71;et4.HP8_BIN=72;et4.KEYBCS2_BIN=73;et4.KOI8R_BIN=74;et4.KOI8U_BIN=75;et4.UTF8_TOLOWER_CI=76;et4.LATIN2_BIN=77;et4.LATIN5_BIN=78;et4.LATIN7_BIN=79;et4.CP850_BIN=80;et4.CP852_BIN=81;et4.SWE7_BIN=82;et4.UTF8_BIN=83;et4.BIG5_BIN=84;et4.EUCKR_BIN=85;et4.GB2312_BIN=86;et4.GBK_BIN=87;et4.SJIS_BIN=88;et4.TIS620_BIN=89;et4.UCS2_BIN=90;et4.UJIS_BIN=91;et4.GEOSTD8_GENERAL_CI=92;et4.GEOSTD8_BIN=93;et4.LATIN1_SPANISH_CI=94;et4.CP932_JAPANESE_CI=95;et4.CP932_BIN=96;et4.EUCJPMS_JAPANESE_CI=97;et4.EUCJPMS_BIN=98;et4.CP1250_POLISH_CI=99;et4.UTF16_UNICODE_CI=101;et4.UTF16_ICELANDIC_CI=102;et4.UTF16_LATVIAN_CI=103;et4.UTF16_ROMANIAN_CI=104;et4.UTF16_SLOVENIAN_CI=105;et4.UTF16_POLISH_CI=106;et4.UTF16_ESTONIAN_CI=107;et4.UTF16_SPANISH_CI=108;et4.UTF16_SWEDISH_CI=109;et4.UTF16_TURKISH_CI=110;et4.UTF16_CZECH_CI=111;et4.UTF16_DANISH_CI=112;et4.UTF16_LITHUANIAN_CI=113;et4.UTF16_SLOVAK_CI=114;et4.UTF16_SPANISH2_CI=115;et4.UTF16_ROMAN_CI=116;et4.UTF16_PERSIAN_CI=117;et4.UTF16_ESPERANTO_CI=118;et4.UTF16_HUNGARIAN_CI=119;et4.UTF16_SINHALA_CI=120;et4.UTF16_GERMAN2_CI=121;et4.UTF16_CROATIAN_CI=122;et4.UTF16_UNICODE_520_CI=123;et4.UTF16_VIETNAMESE_CI=124;et4.UCS2_UNICODE_CI=128;et4.UCS2_ICELANDIC_CI=129;et4.UCS2_LATVIAN_CI=130;et4.UCS2_ROMANIAN_CI=131;et4.UCS2_SLOVENIAN_CI=132;et4.UCS2_POLISH_CI=133;et4.UCS2_ESTONIAN_CI=134;et4.UCS2_SPANISH_CI=135;et4.UCS2_SWEDISH_CI=136;et4.UCS2_TURKISH_CI=137;et4.UCS2_CZECH_CI=138;et4.UCS2_DANISH_CI=139;et4.UCS2_LITHUANIAN_CI=140;et4.UCS2_SLOVAK_CI=141;et4.UCS2_SPANISH2_CI=142;et4.UCS2_ROMAN_CI=143;et4.UCS2_PERSIAN_CI=144;et4.UCS2_ESPERANTO_CI=145;et4.UCS2_HUNGARIAN_CI=146;et4.UCS2_SINHALA_CI=147;et4.UCS2_GERMAN2_CI=148;et4.UCS2_CROATIAN_CI=149;et4.UCS2_UNICODE_520_CI=150;et4.UCS2_VIETNAMESE_CI=151;et4.UCS2_GENERAL_MYSQL500_CI=159;et4.UTF32_UNICODE_CI=160;et4.UTF32_ICELANDIC_CI=161;et4.UTF32_LATVIAN_CI=162;et4.UTF32_ROMANIAN_CI=163;et4.UTF32_SLOVENIAN_CI=164;et4.UTF32_POLISH_CI=165;et4.UTF32_ESTONIAN_CI=166;et4.UTF32_SPANISH_CI=167;et4.UTF32_SWEDISH_CI=168;et4.UTF32_TURKISH_CI=169;et4.UTF32_CZECH_CI=170;et4.UTF32_DANISH_CI=171;et4.UTF32_LITHUANIAN_CI=172;et4.UTF32_SLOVAK_CI=173;et4.UTF32_SPANISH2_CI=174;et4.UTF32_ROMAN_CI=175;et4.UTF32_PERSIAN_CI=176;et4.UTF32_ESPERANTO_CI=177;et4.UTF32_HUNGARIAN_CI=178;et4.UTF32_SINHALA_CI=179;et4.UTF32_GERMAN2_CI=180;et4.UTF32_CROATIAN_CI=181;et4.UTF32_UNICODE_520_CI=182;et4.UTF32_VIETNAMESE_CI=183;et4.UTF8_UNICODE_CI=192;et4.UTF8_ICELANDIC_CI=193;et4.UTF8_LATVIAN_CI=194;et4.UTF8_ROMANIAN_CI=195;et4.UTF8_SLOVENIAN_CI=196;et4.UTF8_POLISH_CI=197;et4.UTF8_ESTONIAN_CI=198;et4.UTF8_SPANISH_CI=199;et4.UTF8_SWEDISH_CI=200;et4.UTF8_TURKISH_CI=201;et4.UTF8_CZECH_CI=202;et4.UTF8_DANISH_CI=203;et4.UTF8_LITHUANIAN_CI=204;et4.UTF8_SLOVAK_CI=205;et4.UTF8_SPANISH2_CI=206;et4.UTF8_ROMAN_CI=207;et4.UTF8_PERSIAN_CI=208;et4.UTF8_ESPERANTO_CI=209;et4.UTF8_HUNGARIAN_CI=210;et4.UTF8_SINHALA_CI=211;et4.UTF8_GERMAN2_CI=212;et4.UTF8_CROATIAN_CI=213;et4.UTF8_UNICODE_520_CI=214;et4.UTF8_VIETNAMESE_CI=215;et4.UTF8_GENERAL_MYSQL500_CI=223;et4.UTF8MB4_UNICODE_CI=224;et4.UTF8MB4_ICELANDIC_CI=225;et4.UTF8MB4_LATVIAN_CI=226;et4.UTF8MB4_ROMANIAN_CI=227;et4.UTF8MB4_SLOVENIAN_CI=228;et4.UTF8MB4_POLISH_CI=229;et4.UTF8MB4_ESTONIAN_CI=230;et4.UTF8MB4_SPANISH_CI=231;et4.UTF8MB4_SWEDISH_CI=232;et4.UTF8MB4_TURKISH_CI=233;et4.UTF8MB4_CZECH_CI=234;et4.UTF8MB4_DANISH_CI=235;et4.UTF8MB4_LITHUANIAN_CI=236;et4.UTF8MB4_SLOVAK_CI=237;et4.UTF8MB4_SPANISH2_CI=238;et4.UTF8MB4_ROMAN_CI=239;et4.UTF8MB4_PERSIAN_CI=240;et4.UTF8MB4_ESPERANTO_CI=241;et4.UTF8MB4_HUNGARIAN_CI=242;et4.UTF8MB4_SINHALA_CI=243;et4.UTF8MB4_GERMAN2_CI=244;et4.UTF8MB4_CROATIAN_CI=245;et4.UTF8MB4_UNICODE_520_CI=246;et4.UTF8MB4_VIETNAMESE_CI=247;et4.GB18030_CHINESE_CI=248;et4.GB18030_BIN=249;et4.GB18030_UNICODE_520_CI=250;et4.UTF8_GENERAL50_CI=253;et4.UTF8MB4_0900_AI_CI=255;et4.UTF8MB4_DE_PB_0900_AI_CI=256;et4.UTF8MB4_IS_0900_AI_CI=257;et4.UTF8MB4_LV_0900_AI_CI=258;et4.UTF8MB4_RO_0900_AI_CI=259;et4.UTF8MB4_SL_0900_AI_CI=260;et4.UTF8MB4_PL_0900_AI_CI=261;et4.UTF8MB4_ET_0900_AI_CI=262;et4.UTF8MB4_ES_0900_AI_CI=263;et4.UTF8MB4_SV_0900_AI_CI=264;et4.UTF8MB4_TR_0900_AI_CI=265;et4.UTF8MB4_CS_0900_AI_CI=266;et4.UTF8MB4_DA_0900_AI_CI=267;et4.UTF8MB4_LT_0900_AI_CI=268;et4.UTF8MB4_SK_0900_AI_CI=269;et4.UTF8MB4_ES_TRAD_0900_AI_CI=270;et4.UTF8MB4_LA_0900_AI_CI=271;et4.UTF8MB4_EO_0900_AI_CI=273;et4.UTF8MB4_HU_0900_AI_CI=274;et4.UTF8MB4_HR_0900_AI_CI=275;et4.UTF8MB4_VI_0900_AI_CI=277;et4.UTF8MB4_0900_AS_CS=278;et4.UTF8MB4_DE_PB_0900_AS_CS=279;et4.UTF8MB4_IS_0900_AS_CS=280;et4.UTF8MB4_LV_0900_AS_CS=281;et4.UTF8MB4_RO_0900_AS_CS=282;et4.UTF8MB4_SL_0900_AS_CS=283;et4.UTF8MB4_PL_0900_AS_CS=284;et4.UTF8MB4_ET_0900_AS_CS=285;et4.UTF8MB4_ES_0900_AS_CS=286;et4.UTF8MB4_SV_0900_AS_CS=287;et4.UTF8MB4_TR_0900_AS_CS=288;et4.UTF8MB4_CS_0900_AS_CS=289;et4.UTF8MB4_DA_0900_AS_CS=290;et4.UTF8MB4_LT_0900_AS_CS=291;et4.UTF8MB4_SK_0900_AS_CS=292;et4.UTF8MB4_ES_TRAD_0900_AS_CS=293;et4.UTF8MB4_LA_0900_AS_CS=294;et4.UTF8MB4_EO_0900_AS_CS=296;et4.UTF8MB4_HU_0900_AS_CS=297;et4.UTF8MB4_HR_0900_AS_CS=298;et4.UTF8MB4_VI_0900_AS_CS=300;et4.UTF8MB4_JA_0900_AS_CS=303;et4.UTF8MB4_JA_0900_AS_CS_KS=304;et4.UTF8MB4_0900_AS_CI=305;et4.UTF8MB4_RU_0900_AI_CI=306;et4.UTF8MB4_RU_0900_AS_CS=307;et4.UTF8MB4_ZH_0900_AS_CS=308;et4.UTF8MB4_0900_BIN=309;et4.BIG5=et4.BIG5_CHINESE_CI;et4.DEC8=et4.DEC8_SWEDISH_CI;et4.CP850=et4.CP850_GENERAL_CI;et4.HP8=et4.HP8_ENGLISH_CI;et4.KOI8R=et4.KOI8R_GENERAL_CI;et4.LATIN1=et4.LATIN1_SWEDISH_CI;et4.LATIN2=et4.LATIN2_GENERAL_CI;et4.SWE7=et4.SWE7_SWEDISH_CI;et4.ASCII=et4.ASCII_GENERAL_CI;et4.UJIS=et4.UJIS_JAPANESE_CI;et4.SJIS=et4.SJIS_JAPANESE_CI;et4.HEBREW=et4.HEBREW_GENERAL_CI;et4.TIS620=et4.TIS620_THAI_CI;et4.EUCKR=et4.EUCKR_KOREAN_CI;et4.KOI8U=et4.KOI8U_GENERAL_CI;et4.GB2312=et4.GB2312_CHINESE_CI;et4.GREEK=et4.GREEK_GENERAL_CI;et4.CP1250=et4.CP1250_GENERAL_CI;et4.GBK=et4.GBK_CHINESE_CI;et4.LATIN5=et4.LATIN5_TURKISH_CI;et4.ARMSCII8=et4.ARMSCII8_GENERAL_CI;et4.UTF8=et4.UTF8_GENERAL_CI;et4.UCS2=et4.UCS2_GENERAL_CI;et4.CP866=et4.CP866_GENERAL_CI;et4.KEYBCS2=et4.KEYBCS2_GENERAL_CI;et4.MACCE=et4.MACCE_GENERAL_CI;et4.MACROMAN=et4.MACROMAN_GENERAL_CI;et4.CP852=et4.CP852_GENERAL_CI;et4.LATIN7=et4.LATIN7_GENERAL_CI;et4.UTF8MB4=et4.UTF8MB4_GENERAL_CI;et4.CP1251=et4.CP1251_GENERAL_CI;et4.UTF16=et4.UTF16_GENERAL_CI;et4.UTF16LE=et4.UTF16LE_GENERAL_CI;et4.CP1256=et4.CP1256_GENERAL_CI;et4.CP1257=et4.CP1257_GENERAL_CI;et4.UTF32=et4.UTF32_GENERAL_CI;et4.CP932=et4.CP932_JAPANESE_CI;et4.EUCJPMS=et4.EUCJPMS_JAPANESE_CI;et4.GB18030=et4.GB18030_CHINESE_CI;et4.GEOSTD8=et4.GEOSTD8_GENERAL_CI});var YQ1=o((Sz5,G86)=>{G86.exports={name:"mysql2",version:"3.22.3",description:"fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",main:"index.js",typings:"typings/mysql/index",type:"commonjs",scripts:{lint:"eslint . && prettier --check .","lint:fix":"eslint . --fix && prettier --write .",test:"poku","test:bun":"bun poku","test:deno":"deno run -A npm:poku","test:docker:up":"docker compose -f test/docker-compose.yml up --abort-on-container-exit --remove-orphans","test:docker:down":"docker compose -f test/docker-compose.yml down","test:docker:node":"npm run test:docker:up -- node && npm run test:docker:down","test:docker:bun":"npm run test:docker:up -- bun && npm run test:docker:down","test:docker:deno":"npm run test:docker:up -- deno && npm run test:docker:down","test:docker:coverage":"npm run test:docker:up -- coverage && npm run test:docker:down","test:coverage":"c8 npm test","test:build":"rollup -c",typecheck:'cd "test/tsc-build" && tsc -p "tsconfig.json" && cd .. && tsc -p "tsconfig.json" --noEmit',benchmark:"node ./benchmarks/benchmark.js","wait-port":"wait-on"},repository:{type:"git",url:"git+https://github.com/sidorares/node-mysql2.git"},homepage:"https://sidorares.github.io/node-mysql2/docs",keywords:["mysql","client","server"],files:["lib","typings/mysql","index.js","index.d.ts","promise.js","promise.d.ts"],exports:{".":"./index.js","./package.json":"./package.json","./promise":"./promise.js","./promise.js":"./promise.js"},engines:{node:">= 8.0"},author:"Andrey Sidorov <andrey.sidorov@gmail.com>",license:"MIT",dependencies:{"aws-ssl-profiles":"^1.1.2",denque:"^2.1.0","generate-function":"^2.3.1","iconv-lite":"^0.7.2",long:"^5.3.2","lru.min":"^1.1.4","named-placeholders":"^1.1.6","sql-escaper":"^1.3.3"},peerDependencies:{"@types/node":">= 8"},devDependencies:{"@eslint/eslintrc":"^3.3.3","@eslint/js":"^9.39.2","@eslint/markdown":"^8.0.1","@ianvs/prettier-plugin-sort-imports":"^4.7.1","@pokujs/multi-suite":"^1.0.0","@rollup/plugin-commonjs":"^29.0.2","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^16.0.3","@types/node":"^25.3.0","@typescript-eslint/eslint-plugin":"^8.56.0","@typescript-eslint/parser":"^8.56.0","assert-diff":"^3.0.4",benchmark:"^2.1.4",c8:"^11.0.0","error-stack-parser":"^2.1.4","eslint-config-prettier":"^10.1.8","eslint-plugin-async-await":"^0.0.0","eslint-plugin-prettier":"^5.5.5",globals:"^17.3.0",poku:"^4.1.0",portfinder:"^1.0.38",prettier:"^3.8.1",rollup:"^4.59.0",tsx:"^4.21.0",typescript:"^5.9.3"}}});var JQ1=o((XQ1)=>{Object.defineProperty(XQ1,"__esModule",{value:!0});XQ1.defaults=void 0;XQ1.defaults=[`-----BEGIN CERTIFICATE-----
MIIEEjCCAvqgAwIBAgIJAM2ZN/+nPi27MA0GCSqGSIb3DQEBCwUAMIGVMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzEmMCQGA1UEAwwdQW1hem9uIFJEUyBhZi1zb3V0aC0xIFJvb3QgQ0Ew
HhcNMTkxMDI4MTgwNTU4WhcNMjQxMDI2MTgwNTU4WjCBlTELMAkGA1UEBhMCVVMx
EDAOBgNVBAcMB1NlYXR0bGUxEzARBgNVBAgMCldhc2hpbmd0b24xIjAgBgNVBAoM
GUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMx
JjAkBgNVBAMMHUFtYXpvbiBSRFMgYWYtc291dGgtMSBSb290IENBMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwR2351uPMZaJk2gMGT+1sk8HE9MQh2rc
/sCnbxGn2p1c7Oi9aBbd/GiFijeJb2BXvHU+TOq3d3Jjqepq8tapXVt4ojbTJNyC
J5E7r7KjTktKdLxtBE1MK25aY+IRJjtdU6vG3KiPKUT1naO3xs3yt0F76WVuFivd
9OHv2a+KHvPkRUWIxpmAHuMY9SIIMmEZtVE7YZGx5ah0iO4JzItHcbVR0y0PBH55
arpFBddpIVHCacp1FUPxSEWkOpI7q0AaU4xfX0fe1BV5HZYRKpBOIp1TtZWvJD+X
jGUtL1BEsT5vN5g9MkqdtYrC+3SNpAk4VtpvJrdjraI/hhvfeXNnAwIDAQABo2Mw
YTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUEEi/
WWMcBJsoGXg+EZwkQ0MscZQwHwYDVR0jBBgwFoAUEEi/WWMcBJsoGXg+EZwkQ0Ms
cZQwDQYJKoZIhvcNAQELBQADggEBAGDZ5js5Pc/gC58LJrwMPXFhJDBS8QuDm23C
FFUdlqucskwOS3907ErK1ZkmVJCIqFLArHqskFXMAkRZ2PNR7RjWLqBs+0znG5yH
hRKb4DXzhUFQ18UBRcvT6V6zN97HTRsEEaNhM/7k8YLe7P8vfNZ28VIoJIGGgv9D
wQBBvkxQ71oOmAG0AwaGD0ORGUfbYry9Dz4a4IcUsZyRWRMADixgrFv6VuETp26s
/+z+iqNaGWlELBKh3iQCT6Y/1UnkPLO42bxrCSyOvshdkYN58Q2gMTE1SVTqyo8G
Lw8lLAz9bnvUSgHzB3jRrSx6ggF/WRMRYlR++y6LXP4SAsSAaC0=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEEjCCAvqgAwIBAgIJAJYM4LxvTZA6MA0GCSqGSIb3DQEBCwUAMIGVMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzEmMCQGA1UEAwwdQW1hem9uIFJEUyBldS1zb3V0aC0xIFJvb3QgQ0Ew
HhcNMTkxMDMwMjAyMDM2WhcNMjQxMDI4MjAyMDM2WjCBlTELMAkGA1UEBhMCVVMx
EDAOBgNVBAcMB1NlYXR0bGUxEzARBgNVBAgMCldhc2hpbmd0b24xIjAgBgNVBAoM
GUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMx
JjAkBgNVBAMMHUFtYXpvbiBSRFMgZXUtc291dGgtMSBSb290IENBMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqM921jXCXeqpRNCS9CBPOe5N7gMaEt+D
s5uR3riZbqzRlHGiF1jZihkXfHAIQewDwy+Yz+Oec1aEZCQMhUHxZJPusuX0cJfj
b+UluFqHIijL2TfXJ3D0PVLLoNTQJZ8+GAPECyojAaNuoHbdVqxhOcznMsXIXVFq
yVLKDGvyKkJjai/iSPDrQMXufg3kWt0ISjNLvsG5IFXgP4gttsM8i0yvRd4QcHoo
DjvH7V3cS+CQqW5SnDrGnHToB0RLskE1ET+oNOfeN9PWOxQprMOX/zmJhnJQlTqD
QP7jcf7SddxrKFjuziFiouskJJyNDsMjt1Lf60+oHZhed2ogTeifGwIDAQABo2Mw
YTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUFBAF
cgJe/BBuZiGeZ8STfpkgRYQwHwYDVR0jBBgwFoAUFBAFcgJe/BBuZiGeZ8STfpkg
RYQwDQYJKoZIhvcNAQELBQADggEBAKAYUtlvDuX2UpZW9i1QgsjFuy/ErbW0dLHU
e/IcFtju2z6RLZ+uF+5A8Kme7IKG1hgt8s+w9TRVQS/7ukQzoK3TaN6XKXRosjtc
o9Rm4gYWM8bmglzY1TPNaiI4HC7546hSwJhubjN0bXCuj/0sHD6w2DkiGuwKNAef
yTu5vZhPkeNyXLykxkzz7bNp2/PtMBnzIp+WpS7uUDmWyScGPohKMq5PqvL59z+L
ZI3CYeMZrJ5VpXUg3fNNIz/83N3G0sk7wr0ohs/kHTP7xPOYB0zD7Ku4HA0Q9Swf
WX0qr6UQgTPMjfYDLffI7aEId0gxKw1eGYc6Cq5JAZ3ipi/cBFc=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEEjCCAvqgAwIBAgIJANew34ehz5l8MA0GCSqGSIb3DQEBCwUAMIGVMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzEmMCQGA1UEAwwdQW1hem9uIFJEUyBtZS1zb3V0aC0xIFJvb3QgQ0Ew
HhcNMTkwNTEwMjE0ODI3WhcNMjQwNTA4MjE0ODI3WjCBlTELMAkGA1UEBhMCVVMx
EDAOBgNVBAcMB1NlYXR0bGUxEzARBgNVBAgMCldhc2hpbmd0b24xIjAgBgNVBAoM
GUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMx
JjAkBgNVBAMMHUFtYXpvbiBSRFMgbWUtc291dGgtMSBSb290IENBMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp7BYV88MukcY+rq0r79+C8UzkT30fEfT
aPXbx1d6M7uheGN4FMaoYmL+JE1NZPaMRIPTHhFtLSdPccInvenRDIatcXX+jgOk
UA6lnHQ98pwN0pfDUyz/Vph4jBR9LcVkBbe0zdoKKp+HGbMPRU0N2yNrog9gM5O8
gkU/3O2csJ/OFQNnj4c2NQloGMUpEmedwJMOyQQfcUyt9CvZDfIPNnheUS29jGSw
ERpJe/AENu8Pxyc72jaXQuD+FEi2Ck6lBkSlWYQFhTottAeGvVFNCzKszCntrtqd
rdYUwurYsLTXDHv9nW2hfDUQa0mhXf9gNDOBIVAZugR9NqNRNyYLHQIDAQABo2Mw
YTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU54cf
DjgwBx4ycBH8+/r8WXdaiqYwHwYDVR0jBBgwFoAU54cfDjgwBx4ycBH8+/r8WXda
iqYwDQYJKoZIhvcNAQELBQADggEBAIIMTSPx/dR7jlcxggr+O6OyY49Rlap2laKA
eC/XI4ySP3vQkIFlP822U9Kh8a9s46eR0uiwV4AGLabcu0iKYfXjPkIprVCqeXV7
ny9oDtrbflyj7NcGdZLvuzSwgl9SYTJp7PVCZtZutsPYlbJrBPHwFABvAkMvRtDB
hitIg4AESDGPoCl94sYHpfDfjpUDMSrAMDUyO6DyBdZH5ryRMAs3lGtsmkkNUrso
aTW6R05681Z0mvkRdb+cdXtKOSuDZPoe2wJJIaz3IlNQNSrB5TImMYgmt6iAsFhv
3vfTSTKrZDNTJn4ybG6pq1zWExoXsktZPylJly6R3RBwV6nwqBM=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBjCCAu6gAwIBAgIJAMc0ZzaSUK51MA0GCSqGSIb3DQEBCwUAMIGPMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzEgMB4GA1UEAwwXQW1hem9uIFJEUyBSb290IDIwMTkgQ0EwHhcNMTkw
ODIyMTcwODUwWhcNMjQwODIyMTcwODUwWjCBjzELMAkGA1UEBhMCVVMxEDAOBgNV
BAcMB1NlYXR0bGUxEzARBgNVBAgMCldhc2hpbmd0b24xIjAgBgNVBAoMGUFtYXpv
biBXZWIgU2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxIDAeBgNV
BAMMF0FtYXpvbiBSRFMgUm9vdCAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEArXnF/E6/Qh+ku3hQTSKPMhQQlCpoWvnIthzX6MK3p5a0eXKZ
oWIjYcNNG6UwJjp4fUXl6glp53Jobn+tWNX88dNH2n8DVbppSwScVE2LpuL+94vY
0EYE/XxN7svKea8YvlrqkUBKyxLxTjh+U/KrGOaHxz9v0l6ZNlDbuaZw3qIWdD/I
6aNbGeRUVtpM6P+bWIoxVl/caQylQS6CEYUk+CpVyJSkopwJlzXT07tMoDL5WgX9
O08KVgDNz9qP/IGtAcRduRcNioH3E9v981QO1zt/Gpb2f8NqAjUUCUZzOnij6mx9
McZ+9cWX88CRzR0vQODWuZscgI08NvM69Fn2SQIDAQABo2MwYTAOBgNVHQ8BAf8E
BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUc19g2LzLA5j0Kxc0LjZa
pmD/vB8wHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJKoZIhvcN
AQELBQADggEBAHAG7WTmyjzPRIM85rVj+fWHsLIvqpw6DObIjMWokpliCeMINZFV
ynfgBKsf1ExwbvJNzYFXW6dihnguDG9VMPpi2up/ctQTN8tm9nDKOy08uNZoofMc
NUZxKCEkVKZv+IL4oHoeayt8egtv3ujJM6V14AstMQ6SwvwvA93EP/Ug2e4WAXHu
cbI1NAbUgVDqp+DRdfvZkgYKryjTWd/0+1fS8X1bBZVWzl7eirNVnHbSH2ZDpNuY
0SBd8dj5F6ld3t58ydZbrTHze7JJOd8ijySAp4/kiu9UfZWuTPABzDa/DSdz9Dk/
zPW4CXXvhLmE02TA9/HeCw3KEHIwicNuEfw=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEEDCCAvigAwIBAgIJAKFMXyltvuRdMA0GCSqGSIb3DQEBCwUAMIGUMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzElMCMGA1UEAwwcQW1hem9uIFJEUyBCZXRhIFJvb3QgMjAxOSBDQTAe
Fw0xOTA4MTkxNzM4MjZaFw0yNDA4MTkxNzM4MjZaMIGUMQswCQYDVQQGEwJVUzEQ
MA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEiMCAGA1UECgwZ
QW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEl
MCMGA1UEAwwcQW1hem9uIFJEUyBCZXRhIFJvb3QgMjAxOSBDQTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMkZdnIH9ndatGAcFo+DppGJ1HUt4x+zeO+0
ZZ29m0sfGetVulmTlv2d5b66e+QXZFWpcPQMouSxxYTW08TbrQiZngKr40JNXftA
atvzBqIImD4II0ZX5UEVj2h98qe/ypW5xaDN7fEa5e8FkYB1TEemPaWIbNXqchcL
tV7IJPr3Cd7Z5gZJlmujIVDPpMuSiNaal9/6nT9oqN+JSM1fx5SzrU5ssg1Vp1vv
5Xab64uOg7wCJRB9R2GC9XD04odX6VcxUAGrZo6LR64ZSifupo3l+R5sVOc5i8NH
skdboTzU9H7+oSdqoAyhIU717PcqeDum23DYlPE2nGBWckE+eT8CAwEAAaNjMGEw
DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFK2hDBWl
sbHzt/EHd0QYOooqcFPhMB8GA1UdIwQYMBaAFK2hDBWlsbHzt/EHd0QYOooqcFPh
MA0GCSqGSIb3DQEBCwUAA4IBAQAO/718k8EnOqJDx6wweUscGTGL/QdKXUzTVRAx
JUsjNUv49mH2HQVEW7oxszfH6cPCaupNAddMhQc4C/af6GHX8HnqfPDk27/yBQI+
yBBvIanGgxv9c9wBbmcIaCEWJcsLp3HzXSYHmjiqkViXwCpYfkoV3Ns2m8bp+KCO
y9XmcCKRaXkt237qmoxoh2sGmBHk2UlQtOsMC0aUQ4d7teAJG0q6pbyZEiPyKZY1
XR/UVxMJL0Q4iVpcRS1kaNCMfqS2smbLJeNdsan8pkw1dvPhcaVTb7CvjhJtjztF
YfDzAI5794qMlWxwilKMmUvDlPPOTen8NNHkLwWvyFCH7Doh
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEFjCCAv6gAwIBAgIJAMzYZJ+R9NBVMA0GCSqGSIb3DQEBCwUAMIGXMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzEoMCYGA1UEAwwfQW1hem9uIFJEUyBQcmV2aWV3IFJvb3QgMjAxOSBD
QTAeFw0xOTA4MjEyMjI5NDlaFw0yNDA4MjEyMjI5NDlaMIGXMQswCQYDVQQGEwJV
UzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEiMCAGA1UE
CgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJE
UzEoMCYGA1UEAwwfQW1hem9uIFJEUyBQcmV2aWV3IFJvb3QgMjAxOSBDQTCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM7kkS6vjgKKQTPynC2NjdN5aPPV
O71G0JJS/2ARVBVJd93JLiGovVJilfWYfwZCs4gTRSSjrUD4D4HyqCd6A+eEEtJq
M0DEC7i0dC+9WNTsPszuB206Jy2IUmxZMIKJAA1NHSbIMjB+b6/JhbSUi7nKdbR/
brj83bF+RoSA+ogrgX7mQbxhmFcoZN9OGaJgYKsKWUt5Wqv627KkGodUK8mDepgD
S3ZfoRQRx3iceETpcmHJvaIge6+vyDX3d9Z22jmvQ4AKv3py2CmU2UwuhOltFDwB
0ddtb39vgwrJxaGfiMRHpEP1DfNLWHAnA69/pgZPwIggidS+iBPUhgucMp8CAwEA
AaNjMGEwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FGnTGpQuQ2H/DZlXMQijZEhjs7TdMB8GA1UdIwQYMBaAFGnTGpQuQ2H/DZlXMQij
ZEhjs7TdMA0GCSqGSIb3DQEBCwUAA4IBAQC3xz1vQvcXAfpcZlngiRWeqU8zQAMQ
LZPCFNv7PVk4pmqX+ZiIRo4f9Zy7TrOVcboCnqmP/b/mNq0gVF4O+88jwXJZD+f8
/RnABMZcnGU+vK0YmxsAtYU6TIb1uhRFmbF8K80HHbj9vSjBGIQdPCbvmR2zY6VJ
BYM+w9U9hp6H4DVMLKXPc1bFlKA5OBTgUtgkDibWJKFOEPW3UOYwp9uq6pFoN0AO
xMTldqWFsOF3bJIlvOY0c/1EFZXu3Ns6/oCP//Ap9vumldYMUZWmbK+gK33FPOXV
8BQ6jNC29icv7lLDpRPwjibJBXX+peDR5UK4FdYcswWEB1Tix5X8dYu6
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgZUxCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSYwJAYDVQQDDB1BbWF6b24gUkRTIGFmLXNvdXRoLTEgUm9vdCBDQTAeFw0xOTEw
MjgxODA2NTNaFw0yNDEwMjgxODA2NTNaMIGQMQswCQYDVQQGEwJVUzETMBEGA1UE
CAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9u
IFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEhMB8GA1UE
AwwYQW1hem9uIFJEUyBhZi1zb3V0aC0xIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAvtV1OqmFa8zCVQSKOvPUJERLVFtd4rZmDpImc5rIoeBk7w/P
9lcKUJjO8R/w1a2lJXx3oQ81tiY0Piw6TpT62YWVRMWrOw8+Vxq1dNaDSFp9I8d0
UHillSSbOk6FOrPDp+R6AwbGFqUDebbN5LFFoDKbhNmH1BVS0a6YNKpGigLRqhka
cClPslWtPqtjbaP3Jbxl26zWzLo7OtZl98dR225pq8aApNBwmtgA7Gh60HK/cX0t
32W94n8D+GKSg6R4MKredVFqRTi9hCCNUu0sxYPoELuM+mHiqB5NPjtm92EzCWs+
+vgWhMc6GxG+82QSWx1Vj8sgLqtE/vLrWddf5QIDAQABo2YwZDAOBgNVHQ8BAf8E
BAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUuLB4gYVJrSKJj/Gz
pqc6yeA+RcAwHwYDVR0jBBgwFoAUEEi/WWMcBJsoGXg+EZwkQ0MscZQwDQYJKoZI
hvcNAQELBQADggEBABauYOZxUhe9/RhzGJ8MsWCz8eKcyDVd4FCnY6Qh+9wcmYNT
LtnD88LACtJKb/b81qYzcB0Em6+zVJ3Z9jznfr6buItE6es9wAoja22Xgv44BTHL
rimbgMwpTt3uEMXDffaS0Ww6YWb3pSE0XYI2ISMWz+xRERRf+QqktSaL39zuiaW5
tfZMre+YhohRa/F0ZQl3RCd6yFcLx4UoSPqQsUl97WhYzwAxZZfwvLJXOc4ATt3u
VlCUylNDkaZztDJc/yN5XQoK9W5nOt2cLu513MGYKbuarQr8f+gYU8S+qOyuSRSP
NRITzwCRVnsJE+2JmcRInn/NcanB7uOGqTvJ9+c=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgZUxCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSYwJAYDVQQDDB1BbWF6b24gUkRTIGV1LXNvdXRoLTEgUm9vdCBDQTAeFw0xOTEw
MzAyMDIxMzBaFw0yNDEwMzAyMDIxMzBaMIGQMQswCQYDVQQGEwJVUzETMBEGA1UE
CAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9u
IFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEhMB8GA1UE
AwwYQW1hem9uIFJEUyBldS1zb3V0aC0xIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAtEyjYcajx6xImJn8Vz1zjdmL4ANPgQXwF7+tF7xccmNAZETb
bzb3I9i5fZlmrRaVznX+9biXVaGxYzIUIR3huQ3Q283KsDYnVuGa3mk690vhvJbB
QIPgKa5mVwJppnuJm78KqaSpi0vxyCPe3h8h6LLFawVyWrYNZ4okli1/U582eef8
RzJp/Ear3KgHOLIiCdPDF0rjOdCG1MOlDLixVnPn9IYOciqO+VivXBg+jtfc5J+L
AaPm0/Yx4uELt1tkbWkm4BvTU/gBOODnYziITZM0l6Fgwvbwgq5duAtKW+h031lC
37rEvrclqcp4wrsUYcLAWX79ZyKIlRxcAdvEhQIDAQABo2YwZDAOBgNVHQ8BAf8E
BAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQU7zPyc0azQxnBCe7D
b9KAadH1QSEwHwYDVR0jBBgwFoAUFBAFcgJe/BBuZiGeZ8STfpkgRYQwDQYJKoZI
hvcNAQELBQADggEBAFGaNiYxg7yC/xauXPlaqLCtwbm2dKyK9nIFbF/7be8mk7Q3
MOA0of1vGHPLVQLr6bJJpD9MAbUcm4cPAwWaxwcNpxOjYOFDaq10PCK4eRAxZWwF
NJRIRmGsl8NEsMNTMCy8X+Kyw5EzH4vWFl5Uf2bGKOeFg0zt43jWQVOX6C+aL3Cd
pRS5MhmYpxMG8irrNOxf4NVFE2zpJOCm3bn0STLhkDcV/ww4zMzObTJhiIb5wSWn
EXKKWhUXuRt7A2y1KJtXpTbSRHQxE++69Go1tWhXtRiULCJtf7wF2Ksm0RR/AdXT
1uR1vKyH5KBJPX3ppYkQDukoHTFR0CpB+G84NLo=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgZUxCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSYwJAYDVQQDDB1BbWF6b24gUkRTIG1lLXNvdXRoLTEgUm9vdCBDQTAeFw0xOTA1
MTAyMTU4NDNaFw0yNTA2MDExMjAwMDBaMIGQMQswCQYDVQQGEwJVUzETMBEGA1UE
CAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9u
IFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEhMB8GA1UE
AwwYQW1hem9uIFJEUyBtZS1zb3V0aC0xIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAudOYPZH+ihJAo6hNYMB5izPVBe3TYhnZm8+X3IoaaYiKtsp1
JJhkTT0CEejYIQ58Fh4QrMUyWvU8qsdK3diNyQRoYLbctsBPgxBR1u07eUJDv38/
C1JlqgHmMnMi4y68Iy7ymv50QgAMuaBqgEBRI1R6Lfbyrb2YvH5txjJyTVMwuCfd
YPAtZVouRz0JxmnfsHyxjE+So56uOKTDuw++Ho4HhZ7Qveej7XB8b+PIPuroknd3
FQB5RVbXRvt5ZcVD4F2fbEdBniF7FAF4dEiofVCQGQ2nynT7dZdEIPfPdH3n7ZmE
lAOmwHQ6G83OsiHRBLnbp+QZRgOsjkHJxT20bQIDAQABo2YwZDAOBgNVHQ8BAf8E
BAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUOEVDM7VomRH4HVdA
QvIMNq2tXOcwHwYDVR0jBBgwFoAU54cfDjgwBx4ycBH8+/r8WXdaiqYwDQYJKoZI
hvcNAQELBQADggEBAHhvMssj+Th8IpNePU6RH0BiL6o9c437R3Q4IEJeFdYL+nZz
PW/rELDPvLRUNMfKM+KzduLZ+l29HahxefejYPXtvXBlq/E/9czFDD4fWXg+zVou
uDXhyrV4kNmP4S0eqsAP/jQHPOZAMFA4yVwO9hlqmePhyDnszCh9c1PfJSBh49+b
4w7i/L3VBOMt8j3EKYvqz0gVfpeqhJwL4Hey8UbVfJRFJMJzfNHpePqtDRAY7yjV
PYquRaV2ab/E+/7VFkWMM4tazYz/qsYA2jSH+4xDHvYk8LnsbcrF9iuidQmEc5sb
FgcWaSKG4DJjcI5k7AJLWcXyTDt21Ci43LE+I9Q=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgICVIYwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MDQxNzEz
MDRaFw0yNDA4MjIxNzA4NTBaMIGVMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEmMCQGA1UEAwwdQW1h
em9uIFJEUyBhcC1zb3V0aC0xIDIwMTkgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDUYOz1hGL42yUCrcsMSOoU8AeD/3KgZ4q7gP+vAz1WnY9K/kim
eWN/2Qqzlo3+mxSFQFyD4MyV3+CnCPnBl9Sh1G/F6kThNiJ7dEWSWBQGAB6HMDbC
BaAsmUc1UIz8sLTL3fO+S9wYhA63Wun0Fbm/Rn2yk/4WnJAaMZcEtYf6e0KNa0LM
p/kN/70/8cD3iz3dDR8zOZFpHoCtf0ek80QqTich0A9n3JLxR6g6tpwoYviVg89e
qCjQ4axxOkWWeusLeTJCcY6CkVyFvDAKvcUl1ytM5AiaUkXblE7zDFXRM4qMMRdt
lPm8d3pFxh0fRYk8bIKnpmtOpz3RIctDrZZxAgMBAAGjZjBkMA4GA1UdDwEB/wQE
AwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBT99wKJftD3jb4sHoHG
i3uGlH6W6TAfBgNVHSMEGDAWgBRzX2DYvMsDmPQrFzQuNlqmYP+8HzANBgkqhkiG
9w0BAQsFAAOCAQEAZ17hhr3dII3hUfuHQ1hPWGrpJOX/G9dLzkprEIcCidkmRYl+
hu1Pe3caRMh/17+qsoEErmnVq5jNY9X1GZL04IZH8YbHc7iRHw3HcWAdhN8633+K
jYEB2LbJ3vluCGnCejq9djDb6alOugdLMJzxOkHDhMZ6/gYbECOot+ph1tQuZXzD
tZ7prRsrcuPBChHlPjmGy8M9z8u+kF196iNSUGC4lM8vLkHM7ycc1/ZOwRq9aaTe
iOghbQQyAEe03MWCyDGtSmDfr0qEk+CHN+6hPiaL8qKt4s+V9P7DeK4iW08ny8Ox
AVS7u0OK/5+jKMAMrKwpYrBydOjTUTHScocyNw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICQ2QwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MDUxODQ2
MjlaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyBzYS1lYXN0LTEgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAMMvR+ReRnOzqJzoaPipNTt1Z2VA968jlN1+SYKUrYM3No+Vpz0H
M6Tn0oYB66ByVsXiGc28ulsqX1HbHsxqDPwvQTKvO7SrmDokoAkjJgLocOLUAeld
5AwvUjxGRP6yY90NV7X786MpnYb2Il9DIIaV9HjCmPt+rjy2CZjS0UjPjCKNfB8J
bFjgW6GGscjeyGb/zFwcom5p4j0rLydbNaOr9wOyQrtt3ZQWLYGY9Zees/b8pmcc
Jt+7jstZ2UMV32OO/kIsJ4rMUn2r/uxccPwAc1IDeRSSxOrnFKhW3Cu69iB3bHp7
JbawY12g7zshE4I14sHjv3QoXASoXjx4xgMCAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFI1Fc/Ql2jx+oJPgBVYq
ccgP0pQ8MB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQB4VVVabVp70myuYuZ3vltQIWqSUMhkaTzehMgGcHjMf9iLoZ/I
93KiFUSGnek5cRePyS9wcpp0fcBT3FvkjpUdCjVtdttJgZFhBxgTd8y26ImdDDMR
4+BUuhI5msvjL08f+Vkkpu1GQcGmyFVPFOy/UY8iefu+QyUuiBUnUuEDd49Hw0Fn
/kIPII6Vj82a2mWV/Q8e+rgN8dIRksRjKI03DEoP8lhPlsOkhdwU6Uz9Vu6NOB2Q
Ls1kbcxAc7cFSyRVJEhh12Sz9d0q/CQSTFsVJKOjSNQBQfVnLz1GwO/IieUEAr4C
jkTntH0r1LX5b/GwN4R887LvjAEdTbg1his7
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgIDAIkHMA0GCSqGSIb3DQEBCwUAMIGPMQswCQYDVQQGEwJV
UzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEiMCAGA1UE
CgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJE
UzEgMB4GA1UEAwwXQW1hem9uIFJEUyBSb290IDIwMTkgQ0EwHhcNMTkwOTA2MTc0
MDIxWhcNMjQwODIyMTcwODUwWjCBlDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldh
c2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxIjAgBgNVBAoMGUFtYXpvbiBXZWIg
U2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxJTAjBgNVBAMMHEFt
YXpvbiBSRFMgdXMtd2VzdC0xIDIwMTkgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDD2yzbbAl77OofTghDMEf624OvU0eS9O+lsdO0QlbfUfWa1Kd6
0WkgjkLZGfSRxEHMCnrv4UPBSK/Qwn6FTjkDLgemhqBtAnplN4VsoDL+BkRX4Wwq
/dSQJE2b+0hm9w9UMVGFDEq1TMotGGTD2B71eh9HEKzKhGzqiNeGsiX4VV+LJzdH
uM23eGisNqmd4iJV0zcAZ+Gbh2zK6fqTOCvXtm7Idccv8vZZnyk1FiWl3NR4WAgK
AkvWTIoFU3Mt7dIXKKClVmvssG8WHCkd3Xcb4FHy/G756UZcq67gMMTX/9fOFM/v
l5C0+CHl33Yig1vIDZd+fXV1KZD84dEJfEvHAgMBAAGjZjBkMA4GA1UdDwEB/wQE
AwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBR+ap20kO/6A7pPxo3+
T3CfqZpQWjAfBgNVHSMEGDAWgBRzX2DYvMsDmPQrFzQuNlqmYP+8HzANBgkqhkiG
9w0BAQsFAAOCAQEAHCJky2tPjPttlDM/RIqExupBkNrnSYnOK4kr9xJ3sl8UF2DA
PAnYsjXp3rfcjN/k/FVOhxwzi3cXJF/2Tjj39Bm/OEfYTOJDNYtBwB0VVH4ffa/6
tZl87jaIkrxJcreeeHqYMnIxeN0b/kliyA+a5L2Yb0VPjt9INq34QDc1v74FNZ17
4z8nr1nzg4xsOWu0Dbjo966lm4nOYIGBRGOKEkHZRZ4mEiMgr3YLkv8gSmeitx57
Z6dVemNtUic/LVo5Iqw4n3TBS0iF2C1Q1xT/s3h+0SXZlfOWttzSluDvoMv5PvCd
pFjNn+aXLAALoihL1MJSsxydtsLjOBro5eK0Vw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDDCCAvSgAwIBAgICOFAwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTAxNzQ2
MjFaFw0yNDA4MjIxNzA4NTBaMIGZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEqMCgGA1UEAwwhQW1h
em9uIFJEUyBhcC1ub3J0aGVhc3QtMiAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAzU72e6XbaJbi4HjJoRNjKxzUEuChKQIt7k3CWzNnmjc5
8I1MjCpa2W1iw1BYVysXSNSsLOtUsfvBZxi/1uyMn5ZCaf9aeoA9UsSkFSZBjOCN
DpKPCmfV1zcEOvJz26+1m8WDg+8Oa60QV0ou2AU1tYcw98fOQjcAES0JXXB80P2s
3UfkNcnDz+l4k7j4SllhFPhH6BQ4lD2NiFAP4HwoG6FeJUn45EPjzrydxjq6v5Fc
cQ8rGuHADVXotDbEhaYhNjIrsPL+puhjWfhJjheEw8c4whRZNp6gJ/b6WEes/ZhZ
h32DwsDsZw0BfRDUMgUn8TdecNexHUw8vQWeC181hwIDAQABo2YwZDAOBgNVHQ8B
Af8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUwW9bWgkWkr0U
lrOsq2kvIdrECDgwHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJ
KoZIhvcNAQELBQADggEBAEugF0Gj7HVhX0ehPZoGRYRt3PBuI2YjfrrJRTZ9X5wc
9T8oHmw07mHmNy1qqWvooNJg09bDGfB0k5goC2emDiIiGfc/kvMLI7u+eQOoMKj6
mkfCncyRN3ty08Po45vTLBFZGUvtQmjM6yKewc4sXiASSBmQUpsMbiHRCL72M5qV
obcJOjGcIdDTmV1BHdWT+XcjynsGjUqOvQWWhhLPrn4jWe6Xuxll75qlrpn3IrIx
CRBv/5r7qbcQJPOgwQsyK4kv9Ly8g7YT1/vYBlR3cRsYQjccw5ceWUj2DrMVWhJ4
prf+E3Aa4vYmLLOUUvKnDQ1k3RGNu56V0tonsQbfsaM=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECjCCAvKgAwIBAgICEzUwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTAyMDUy
MjVaFw0yNDA4MjIxNzA4NTBaMIGXMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEoMCYGA1UEAwwfQW1h
em9uIFJEUyBjYS1jZW50cmFsLTEgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAOxHqdcPSA2uBjsCP4DLSlqSoPuQ/X1kkJLusVRKiQE2zayB
viuCBt4VB9Qsh2rW3iYGM+usDjltGnI1iUWA5KHcvHszSMkWAOYWLiMNKTlg6LCp
XnE89tvj5dIH6U8WlDvXLdjB/h30gW9JEX7S8supsBSci2GxEzb5mRdKaDuuF/0O
qvz4YE04pua3iZ9QwmMFuTAOYzD1M72aOpj+7Ac+YLMM61qOtU+AU6MndnQkKoQi
qmUN2A9IFaqHFzRlSdXwKCKUA4otzmz+/N3vFwjb5F4DSsbsrMfjeHMo6o/nb6Nh
YDb0VJxxPee6TxSuN7CQJ2FxMlFUezcoXqwqXD0CAwEAAaNmMGQwDgYDVR0PAQH/
BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFDGGpon9WfIpsggE
CxHq8hZ7E2ESMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqG
SIb3DQEBCwUAA4IBAQAvpeQYEGZvoTVLgV9rd2+StPYykMsmFjWQcyn3dBTZRXC2
lKq7QhQczMAOhEaaN29ZprjQzsA2X/UauKzLR2Uyqc2qOeO9/YOl0H3qauo8C/W9
r8xqPbOCDLEXlOQ19fidXyyEPHEq5WFp8j+fTh+s8WOx2M7IuC0ANEetIZURYhSp
xl9XOPRCJxOhj7JdelhpweX0BJDNHeUFi0ClnFOws8oKQ7sQEv66d5ddxqqZ3NVv
RbCvCtEutQMOUMIuaygDlMn1anSM8N7Wndx8G6+Uy67AnhjGx7jw/0YPPxopEj6x
JXP8j0sJbcT9K/9/fPVLNT25RvQ/93T2+IQL4Ca2
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICYpgwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTExNzMx
NDhaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyBldS13ZXN0LTEgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAMk3YdSZ64iAYp6MyyKtYJtNzv7zFSnnNf6vv0FB4VnfITTMmOyZ
LXqKAT2ahZ00hXi34ewqJElgU6eUZT/QlzdIu359TEZyLVPwURflL6SWgdG01Q5X
O++7fSGcBRyIeuQWs9FJNIIqK8daF6qw0Rl5TXfu7P9dBc3zkgDXZm2DHmxGDD69
7liQUiXzoE1q2Z9cA8+jirDioJxN9av8hQt12pskLQumhlArsMIhjhHRgF03HOh5
tvi+RCfihVOxELyIRTRpTNiIwAqfZxxTWFTgfn+gijTmd0/1DseAe82aYic8JbuS
EMbrDduAWsqrnJ4GPzxHKLXX0JasCUcWyMECAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFPLtsq1NrwJXO13C9eHt
sLY11AGwMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQAnWBKj5xV1A1mYd0kIgDdkjCwQkiKF5bjIbGkT3YEFFbXoJlSP
0lZZ/hDaOHI8wbLT44SzOvPEEmWF9EE7SJzkvSdQrUAWR9FwDLaU427ALI3ngNHy
lGJ2hse1fvSRNbmg8Sc9GBv8oqNIBPVuw+AJzHTacZ1OkyLZrz1c1QvwvwN2a+Jd
vH0V0YIhv66llKcYDMUQJAQi4+8nbRxXWv6Gq3pvrFoorzsnkr42V3JpbhnYiK+9
nRKd4uWl62KRZjGkfMbmsqZpj2fdSWMY1UGyN1k+kDmCSWYdrTRDP0xjtIocwg+A
J116n4hV/5mbA0BaPiS2krtv17YAeHABZcvz
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECjCCAvKgAwIBAgICV2YwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTExOTM2
MjBaFw0yNDA4MjIxNzA4NTBaMIGXMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEoMCYGA1UEAwwfQW1h
em9uIFJEUyBldS1jZW50cmFsLTEgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAMEx54X2pHVv86APA0RWqxxRNmdkhAyp2R1cFWumKQRofoFv
n+SPXdkpIINpMuEIGJANozdiEz7SPsrAf8WHyD93j/ZxrdQftRcIGH41xasetKGl
I67uans8d+pgJgBKGb/Z+B5m+UsIuEVekpvgpwKtmmaLFC/NCGuSsJoFsRqoa6Gh
m34W6yJoY87UatddCqLY4IIXaBFsgK9Q/wYzYLbnWM6ZZvhJ52VMtdhcdzeTHNW0
5LGuXJOF7Ahb4JkEhoo6TS2c0NxB4l4MBfBPgti+O7WjR3FfZHpt18A6Zkq6A2u6
D/oTSL6c9/3sAaFTFgMyL3wHb2YlW0BPiljZIqECAwEAAaNmMGQwDgYDVR0PAQH/
BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFOcAToAc6skWffJa
TnreaswAfrbcMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqG
SIb3DQEBCwUAA4IBAQA1d0Whc1QtspK496mFWfFEQNegLh0a9GWYlJm+Htcj5Nxt
DAIGXb+8xrtOZFHmYP7VLCT5Zd2C+XytqseK/+s07iAr0/EPF+O2qcyQWMN5KhgE
cXw2SwuP9FPV3i+YAm11PBVeenrmzuk9NrdHQ7TxU4v7VGhcsd2C++0EisrmquWH
mgIfmVDGxphwoES52cY6t3fbnXmTkvENvR+h3rj+fUiSz0aSo+XZUGHPgvuEKM/W
CBD9Smc9CBoBgvy7BgHRgRUmwtABZHFUIEjHI5rIr7ZvYn+6A0O6sogRfvVYtWFc
qpyrW1YX8mD0VlJ8fGKM3G+aCOsiiPKDV/Uafrm+
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgICGAcwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTIxODE5
NDRaFw0yNDA4MjIxNzA4NTBaMIGVMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEmMCQGA1UEAwwdQW1h
em9uIFJEUyBldS1ub3J0aC0xIDIwMTkgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQCiIYnhe4UNBbdBb/nQxl5giM0XoVHWNrYV5nB0YukA98+TPn9v
Aoj1RGYmtryjhrf01Kuv8SWO+Eom95L3zquoTFcE2gmxCfk7bp6qJJ3eHOJB+QUO
XsNRh76fwDzEF1yTeZWH49oeL2xO13EAx4PbZuZpZBttBM5zAxgZkqu4uWQczFEs
JXfla7z2fvWmGcTagX10O5C18XaFroV0ubvSyIi75ue9ykg/nlFAeB7O0Wxae88e
uhiBEFAuLYdqWnsg3459NfV8Yi1GnaitTym6VI3tHKIFiUvkSiy0DAlAGV2iiyJE
q+DsVEO4/hSINJEtII4TMtysOsYPpINqeEzRAgMBAAGjZjBkMA4GA1UdDwEB/wQE
AwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBRR0UpnbQyjnHChgmOc
hnlc0PogzTAfBgNVHSMEGDAWgBRzX2DYvMsDmPQrFzQuNlqmYP+8HzANBgkqhkiG
9w0BAQsFAAOCAQEAKJD4xVzSf4zSGTBJrmamo86jl1NHQxXUApAZuBZEc8tqC6TI
T5CeoSr9CMuVC8grYyBjXblC4OsM5NMvmsrXl/u5C9dEwtBFjo8mm53rOOIm1fxl
I1oYB/9mtO9ANWjkykuLzWeBlqDT/i7ckaKwalhLODsRDO73vRhYNjsIUGloNsKe
pxw3dzHwAZx4upSdEVG4RGCZ1D0LJ4Gw40OfD69hfkDfRVVxKGrbEzqxXRvovmDc
tKLdYZO/6REoca36v4BlgIs1CbUXJGLSXUwtg7YXGLSVBJ/U0+22iGJmBSNcoyUN
cjPFD9JQEhDDIYYKSGzIYpvslvGc4T5ISXFiuQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICZIEwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTIyMTMy
MzJaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyBldS13ZXN0LTIgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBALGiwqjiF7xIjT0Sx7zB3764K2T2a1DHnAxEOr+/EIftWKxWzT3u
PFwS2eEZcnKqSdRQ+vRzonLBeNLO4z8aLjQnNbkizZMBuXGm4BqRm1Kgq3nlLDQn
7YqdijOq54SpShvR/8zsO4sgMDMmHIYAJJOJqBdaus2smRt0NobIKc0liy7759KB
6kmQ47Gg+kfIwxrQA5zlvPLeQImxSoPi9LdbRoKvu7Iot7SOa+jGhVBh3VdqndJX
7tm/saj4NE375csmMETFLAOXjat7zViMRwVorX4V6AzEg1vkzxXpA9N7qywWIT5Y
fYaq5M8i6vvLg0CzrH9fHORtnkdjdu1y+0MCAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFFOhOx1yt3Z7mvGB9jBv
2ymdZwiOMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQBehqY36UGDvPVU9+vtaYGr38dBbp+LzkjZzHwKT1XJSSUc2wqM
hnCIQKilonrTIvP1vmkQi8qHPvDRtBZKqvz/AErW/ZwQdZzqYNFd+BmOXaeZWV0Q
oHtDzXmcwtP8aUQpxN0e1xkWb1E80qoy+0uuRqb/50b/R4Q5qqSfJhkn6z8nwB10
7RjLtJPrK8igxdpr3tGUzfAOyiPrIDncY7UJaL84GFp7WWAkH0WG3H8Y8DRcRXOU
mqDxDLUP3rNuow3jnGxiUY+gGX5OqaZg4f4P6QzOSmeQYs6nLpH0PiN00+oS1BbD
bpWdZEttILPI+vAYkU4QuBKKDjJL6HbSd+cn
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgIDAIVCMA0GCSqGSIb3DQEBCwUAMIGPMQswCQYDVQQGEwJV
UzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEiMCAGA1UE
CgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJE
UzEgMB4GA1UEAwwXQW1hem9uIFJEUyBSb290IDIwMTkgQ0EwHhcNMTkwOTEzMTcw
NjQxWhcNMjQwODIyMTcwODUwWjCBlDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldh
c2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxIjAgBgNVBAoMGUFtYXpvbiBXZWIg
U2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxJTAjBgNVBAMMHEFt
YXpvbiBSRFMgdXMtZWFzdC0yIDIwMTkgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDE+T2xYjUbxOp+pv+gRA3FO24+1zCWgXTDF1DHrh1lsPg5k7ht
2KPYzNc+Vg4E+jgPiW0BQnA6jStX5EqVh8BU60zELlxMNvpg4KumniMCZ3krtMUC
au1NF9rM7HBh+O+DYMBLK5eSIVt6lZosOb7bCi3V6wMLA8YqWSWqabkxwN4w0vXI
8lu5uXXFRemHnlNf+yA/4YtN4uaAyd0ami9+klwdkZfkrDOaiy59haOeBGL8EB/c
dbJJlguHH5CpCscs3RKtOOjEonXnKXldxarFdkMzi+aIIjQ8GyUOSAXHtQHb3gZ4
nS6Ey0CMlwkB8vUObZU9fnjKJcL5QCQqOfwvAgMBAAGjZjBkMA4GA1UdDwEB/wQE
AwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBQUPuRHohPxx4VjykmH
6usGrLL1ETAfBgNVHSMEGDAWgBRzX2DYvMsDmPQrFzQuNlqmYP+8HzANBgkqhkiG
9w0BAQsFAAOCAQEAUdR9Vb3y33Yj6X6KGtuthZ08SwjImVQPtknzpajNE5jOJAh8
quvQnU9nlnMO85fVDU1Dz3lLHGJ/YG1pt1Cqq2QQ200JcWCvBRgdvH6MjHoDQpqZ
HvQ3vLgOGqCLNQKFuet9BdpsHzsctKvCVaeBqbGpeCtt3Hh/26tgx0rorPLw90A2
V8QSkZJjlcKkLa58N5CMM8Xz8KLWg3MZeT4DmlUXVCukqK2RGuP2L+aME8dOxqNv
OnOz1zrL5mR2iJoDpk8+VE/eBDmJX40IJk6jBjWoxAO/RXq+vBozuF5YHN1ujE92
tO8HItgTp37XT8bJBAiAnt5mxw+NLSqtxk2QdQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDDCCAvSgAwIBAgICY4kwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTMyMDEx
NDJaFw0yNDA4MjIxNzA4NTBaMIGZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEqMCgGA1UEAwwhQW1h
em9uIFJEUyBhcC1zb3V0aGVhc3QtMSAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAr5u9OuLL/OF/fBNUX2kINJLzFl4DnmrhnLuSeSnBPgbb
qddjf5EFFJBfv7IYiIWEFPDbDG5hoBwgMup5bZDbas+ZTJTotnnxVJTQ6wlhTmns
eHECcg2pqGIKGrxZfbQhlj08/4nNAPvyYCTS0bEcmQ1emuDPyvJBYDDLDU6AbCB5
6Z7YKFQPTiCBblvvNzchjLWF9IpkqiTsPHiEt21sAdABxj9ityStV3ja/W9BfgxH
wzABSTAQT6FbDwmQMo7dcFOPRX+hewQSic2Rn1XYjmNYzgEHisdUsH7eeXREAcTw
61TRvaLH8AiOWBnTEJXPAe6wYfrcSd1pD0MXpoB62wIDAQABo2YwZDAOBgNVHQ8B
Af8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUytwMiomQOgX5
Ichd+2lDWRUhkikwHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJ
KoZIhvcNAQELBQADggEBACf6lRDpfCD7BFRqiWM45hqIzffIaysmVfr+Jr+fBTjP
uYe/ba1omSrNGG23bOcT9LJ8hkQJ9d+FxUwYyICQNWOy6ejicm4z0C3VhphbTPqj
yjpt9nG56IAcV8BcRJh4o/2IfLNzC/dVuYJV8wj7XzwlvjysenwdrJCoLadkTr1h
eIdG6Le07sB9IxrGJL9e04afk37h7c8ESGSE4E+oS4JQEi3ATq8ne1B9DQ9SasXi
IRmhNAaISDzOPdyLXi9N9V9Lwe/DHcja7hgLGYx3UqfjhLhOKwp8HtoZORixAmOI
HfILgNmwyugAbuZoCazSKKBhQ0wgO0WZ66ZKTMG8Oho=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICUYkwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTYxODIx
MTVaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyB1cy13ZXN0LTIgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBANCEZBZyu6yJQFZBJmSUZfSZd3Ui2gitczMKC4FLr0QzkbxY+cLa
uVONIOrPt4Rwi+3h/UdnUg917xao3S53XDf1TDMFEYp4U8EFPXqCn/GXBIWlU86P
PvBN+gzw3nS+aco7WXb+woTouvFVkk8FGU7J532llW8o/9ydQyDIMtdIkKTuMfho
OiNHSaNc+QXQ32TgvM9A/6q7ksUoNXGCP8hDOkSZ/YOLiI5TcdLh/aWj00ziL5bj
pvytiMZkilnc9dLY9QhRNr0vGqL0xjmWdoEXz9/OwjmCihHqJq+20MJPsvFm7D6a
2NKybR9U+ddrjb8/iyLOjURUZnj5O+2+OPcCAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFEBxMBdv81xuzqcK5TVu
pHj+Aor8MB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQBZkfiVqGoJjBI37aTlLOSjLcjI75L5wBrwO39q+B4cwcmpj58P
3sivv+jhYfAGEbQnGRzjuFoyPzWnZ1DesRExX+wrmHsLLQbF2kVjLZhEJMHF9eB7
GZlTPdTzHErcnuXkwA/OqyXMpj9aghcQFuhCNguEfnROY9sAoK2PTfnTz9NJHL+Q
UpDLEJEUfc0GZMVWYhahc0x38ZnSY2SKacIPECQrTI0KpqZv/P+ijCEcMD9xmYEb
jL4en+XKS1uJpw5fIU5Sj0MxhdGstH6S84iAE5J3GM3XHklGSFwwqPYvuTXvANH6
uboynxRgSae59jIlAK6Jrr6GWMwQRbgcaAlW
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDDCCAvSgAwIBAgICEkYwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTYxOTUz
NDdaFw0yNDA4MjIxNzA4NTBaMIGZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEqMCgGA1UEAwwhQW1h
em9uIFJEUyBhcC1zb3V0aGVhc3QtMiAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAufodI2Flker8q7PXZG0P0vmFSlhQDw907A6eJuF/WeMo
GHnll3b4S6nC3oRS3nGeRMHbyU2KKXDwXNb3Mheu+ox+n5eb/BJ17eoj9HbQR1cd
gEkIciiAltf8gpMMQH4anP7TD+HNFlZnP7ii3geEJB2GGXSxgSWvUzH4etL67Zmn
TpGDWQMB0T8lK2ziLCMF4XAC/8xDELN/buHCNuhDpxpPebhct0T+f6Arzsiswt2j
7OeNeLLZwIZvVwAKF7zUFjC6m7/VmTQC8nidVY559D6l0UhhU0Co/txgq3HVsMOH
PbxmQUwJEKAzQXoIi+4uZzHFZrvov/nDTNJUhC6DqwIDAQABo2YwZDAOBgNVHQ8B
Af8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUwaZpaCme+EiV
M5gcjeHZSTgOn4owHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJ
KoZIhvcNAQELBQADggEBAAR6a2meCZuXO2TF9bGqKGtZmaah4pH2ETcEVUjkvXVz
sl+ZKbYjrun+VkcMGGKLUjS812e7eDF726ptoku9/PZZIxlJB0isC/0OyixI8N4M
NsEyvp52XN9QundTjkl362bomPnHAApeU0mRbMDRR2JdT70u6yAzGLGsUwMkoNnw
1VR4XKhXHYGWo7KMvFrZ1KcjWhubxLHxZWXRulPVtGmyWg/MvE6KF+2XMLhojhUL
+9jB3Fpn53s6KMx5tVq1x8PukHmowcZuAF8k+W4gk8Y68wIwynrdZrKRyRv6CVtR
FZ8DeJgoNZT3y/GT254VqMxxfuy2Ccb/RInd16tEvVk=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDDCCAvSgAwIBAgICOYIwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTcyMDA1
MjlaFw0yNDA4MjIxNzA4NTBaMIGZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEqMCgGA1UEAwwhQW1h
em9uIFJEUyBhcC1ub3J0aGVhc3QtMyAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEA4dMak8W+XW8y/2F6nRiytFiA4XLwePadqWebGtlIgyCS
kbug8Jv5w7nlMkuxOxoUeD4WhI6A9EkAn3r0REM/2f0aYnd2KPxeqS2MrtdxxHw1
xoOxk2x0piNSlOz6yog1idsKR5Wurf94fvM9FdTrMYPPrDabbGqiBMsZZmoHLvA3
Z+57HEV2tU0Ei3vWeGIqnNjIekS+E06KhASxrkNU5vi611UsnYZlSi0VtJsH4UGV
LhnHl53aZL0YFO5mn/fzuNG/51qgk/6EFMMhaWInXX49Dia9FnnuWXwVwi6uX1Wn
7kjoHi5VtmC8ZlGEHroxX2DxEr6bhJTEpcLMnoQMqwIDAQABo2YwZDAOBgNVHQ8B
Af8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUsUI5Cb3SWB8+
gv1YLN/ABPMdxSAwHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJ
KoZIhvcNAQELBQADggEBAJAF3E9PM1uzVL8YNdzb6fwJrxxqI2shvaMVmC1mXS+w
G0zh4v2hBZOf91l1EO0rwFD7+fxoI6hzQfMxIczh875T6vUXePKVOCOKI5wCrDad
zQbVqbFbdhsBjF4aUilOdtw2qjjs9JwPuB0VXN4/jY7m21oKEOcnpe36+7OiSPjN
xngYewCXKrSRqoj3mw+0w/+exYj3Wsush7uFssX18av78G+ehKPIVDXptOCP/N7W
8iKVNeQ2QGTnu2fzWsGUSvMGyM7yqT+h1ILaT//yQS8er511aHMLc142bD4D9VSy
DgactwPDTShK/PXqhvNey9v/sKXm4XatZvwcc8KYlW4=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDDCCAvSgAwIBAgICcEUwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTgxNjU2
MjBaFw0yNDA4MjIxNzA4NTBaMIGZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEqMCgGA1UEAwwhQW1h
em9uIFJEUyBhcC1ub3J0aGVhc3QtMSAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAndtkldmHtk4TVQAyqhAvtEHSMb6pLhyKrIFved1WO3S7
+I+bWwv9b2W/ljJxLq9kdT43bhvzonNtI4a1LAohS6bqyirmk8sFfsWT3akb+4Sx
1sjc8Ovc9eqIWJCrUiSvv7+cS7ZTA9AgM1PxvHcsqrcUXiK3Jd/Dax9jdZE1e15s
BEhb2OEPE+tClFZ+soj8h8Pl2Clo5OAppEzYI4LmFKtp1X/BOf62k4jviXuCSst3
UnRJzE/CXtjmN6oZySVWSe0rQYuyqRl6//9nK40cfGKyxVnimB8XrrcxUN743Vud
QQVU0Esm8OVTX013mXWQXJHP2c0aKkog8LOga0vobQIDAQABo2YwZDAOBgNVHQ8B
Af8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQULmoOS1mFSjj+
snUPx4DgS3SkLFYwHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJ
KoZIhvcNAQELBQADggEBAAkVL2P1M2/G9GM3DANVAqYOwmX0Xk58YBHQu6iiQg4j
b4Ky/qsZIsgT7YBsZA4AOcPKQFgGTWhe9pvhmXqoN3RYltN8Vn7TbUm/ZVDoMsrM
gwv0+TKxW1/u7s8cXYfHPiTzVSJuOogHx99kBW6b2f99GbP7O1Sv3sLq4j6lVvBX
Fiacf5LAWC925nvlTzLlBgIc3O9xDtFeAGtZcEtxZJ4fnGXiqEnN4539+nqzIyYq
nvlgCzyvcfRAxwltrJHuuRu6Maw5AGcd2Y0saMhqOVq9KYKFKuD/927BTrbd2JVf
2sGWyuPZPCk3gq+5pCjbD0c6DkhcMGI6WwxvM5V/zSM=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICJDQwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTgxNzAz
MTVaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyBldS13ZXN0LTMgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAL9bL7KE0n02DLVtlZ2PL+g/BuHpMYFq2JnE2RgompGurDIZdjmh
1pxfL3nT+QIVMubuAOy8InRfkRxfpxyjKYdfLJTPJG+jDVL+wDcPpACFVqoV7Prg
pVYEV0lc5aoYw4bSeYFhdzgim6F8iyjoPnObjll9mo4XsHzSoqJLCd0QC+VG9Fw2
q+GDRZrLRmVM2oNGDRbGpGIFg77aRxRapFZa8SnUgs2AqzuzKiprVH5i0S0M6dWr
i+kk5epmTtkiDHceX+dP/0R1NcnkCPoQ9TglyXyPdUdTPPRfKCq12dftqll+u4mV
ARdN6WFjovxax8EAP2OAUTi1afY+1JFMj+sCAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFLfhrbrO5exkCVgxW0x3
Y2mAi8lNMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQAigQ5VBNGyw+OZFXwxeJEAUYaXVoP/qrhTOJ6mCE2DXUVEoJeV
SxScy/TlFA9tJXqmit8JH8VQ/xDL4ubBfeMFAIAo4WzNWDVoeVMqphVEcDWBHsI1
AETWzfsapRS9yQekOMmxg63d/nV8xewIl8aNVTHdHYXMqhhik47VrmaVEok1UQb3
O971RadLXIEbVd9tjY5bMEHm89JsZDnDEw1hQXBb67Elu64OOxoKaHBgUH8AZn/2
zFsL1ynNUjOhCSAA15pgd1vjwc0YsBbAEBPcHBWYBEyME6NLNarjOzBl4FMtATSF
wWCKRGkvqN8oxYhwR2jf2rR5Mu4DWkK5Q8Ep
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICJVUwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTkxODE2
NTNaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyB1cy1lYXN0LTEgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAM3i/k2u6cqbMdcISGRvh+m+L0yaSIoOXjtpNEoIftAipTUYoMhL
InXGlQBVA4shkekxp1N7HXe1Y/iMaPEyb3n+16pf3vdjKl7kaSkIhjdUz3oVUEYt
i8Z/XeJJ9H2aEGuiZh3kHixQcZczn8cg3dA9aeeyLSEnTkl/npzLf//669Ammyhs
XcAo58yvT0D4E0D/EEHf2N7HRX7j/TlyWvw/39SW0usiCrHPKDLxByLojxLdHzso
QIp/S04m+eWn6rmD+uUiRteN1hI5ncQiA3wo4G37mHnUEKo6TtTUh+sd/ku6a8HK
glMBcgqudDI90s1OpuIAWmuWpY//8xEG2YECAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFPqhoWZcrVY9mU7tuemR
RBnQIj1jMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQB6zOLZ+YINEs72heHIWlPZ8c6WY8MDU+Be5w1M+BK2kpcVhCUK
PJO4nMXpgamEX8DIiaO7emsunwJzMSvavSPRnxXXTKIc0i/g1EbiDjnYX9d85DkC
E1LaAUCmCZBVi9fIe0H2r9whIh4uLWZA41oMnJx/MOmo3XyMfQoWcqaSFlMqfZM4
0rNoB/tdHLNuV4eIdaw2mlHxdWDtF4oH+HFm+2cVBUVC1jXKrFv/euRVtsTT+A6i
h2XBHKxQ1Y4HgAn0jACP2QSPEmuoQEIa57bEKEcZsBR8SDY6ZdTd2HLRIApcCOSF
MRM8CKLeF658I0XgF8D5EsYoKPsA+74Z+jDH
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEETCCAvmgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgZQxCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSUwIwYDVQQDDBxBbWF6b24gUkRTIEJldGEgUm9vdCAyMDE5IENBMB4XDTE5MDgy
MDE3MTAwN1oXDTI0MDgxOTE3MzgyNlowgZkxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
DApXYXNoaW5ndG9uMRAwDgYDVQQHDAdTZWF0dGxlMSIwIAYDVQQKDBlBbWF6b24g
V2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMSowKAYDVQQD
DCFBbWF6b24gUkRTIEJldGEgdXMtZWFzdC0xIDIwMTkgQ0EwggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQDTNCOlotQcLP8TP82U2+nk0bExVuuMVOgFeVMx
vbUHZQeIj9ikjk+jm6eTDnnkhoZcmJiJgRy+5Jt69QcRbb3y3SAU7VoHgtraVbxF
QDh7JEHI9tqEEVOA5OvRrDRcyeEYBoTDgh76ROco2lR+/9uCvGtHVrMCtG7BP7ZB
sSVNAr1IIRZZqKLv2skKT/7mzZR2ivcw9UeBBTUf8xsfiYVBvMGoEsXEycjYdf6w
WV+7XS7teNOc9UgsFNN+9AhIBc1jvee5E//72/4F8pAttAg/+mmPUyIKtekNJ4gj
OAR2VAzGx1ybzWPwIgOudZFHXFduxvq4f1hIRPH0KbQ/gkRrAgMBAAGjZjBkMA4G
A1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBTkvpCD
6C43rar9TtJoXr7q8dkrrjAfBgNVHSMEGDAWgBStoQwVpbGx87fxB3dEGDqKKnBT
4TANBgkqhkiG9w0BAQsFAAOCAQEAJd9fOSkwB3uVdsS+puj6gCER8jqmhd3g/J5V
Zjk9cKS8H0e8pq/tMxeJ8kpurPAzUk5RkCspGt2l0BSwmf3ahr8aJRviMX6AuW3/
g8aKplTvq/WMNGKLXONa3Sq8591J+ce8gtOX/1rDKmFI4wQ/gUzOSYiT991m7QKS
Fr6HMgFuz7RNJbb3Fy5cnurh8eYWA7mMv7laiLwTNsaro5qsqErD5uXuot6o9beT
a+GiKinEur35tNxAr47ax4IRubuIzyfCrezjfKc5raVV2NURJDyKP0m0CCaffAxE
qn2dNfYc3v1D8ypg3XjHlOzRo32RB04o8ALHMD9LSwsYDLpMag==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEFzCCAv+gAwIBAgICFSUwDQYJKoZIhvcNAQELBQAwgZcxCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSgwJgYDVQQDDB9BbWF6b24gUkRTIFByZXZpZXcgUm9vdCAyMDE5IENBMB4XDTE5
MDgyMTIyMzk0N1oXDTI0MDgyMTIyMjk0OVowgZwxCzAJBgNVBAYTAlVTMRMwEQYD
VQQIDApXYXNoaW5ndG9uMRAwDgYDVQQHDAdTZWF0dGxlMSIwIAYDVQQKDBlBbWF6
b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMS0wKwYD
VQQDDCRBbWF6b24gUkRTIFByZXZpZXcgdXMtZWFzdC0yIDIwMTkgQ0EwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQD0dB/U7qRnSf05wOi7m10Pa2uPMTJv
r6U/3Y17a5prq5Zr4++CnSUYarG51YuIf355dKs+7Lpzs782PIwCmLpzAHKWzix6
pOaTQ+WZ0+vUMTxyqgqWbsBgSCyP7pVBiyqnmLC/L4az9XnscrbAX4pNaoJxsuQe
mzBo6yofjQaAzCX69DuqxFkVTRQnVy7LCFkVaZtjNAftnAHJjVgQw7lIhdGZp9q9
IafRt2gteihYfpn+EAQ/t/E4MnhrYs4CPLfS7BaYXBycEKC5Muj1l4GijNNQ0Efo
xG8LSZz7SNgUvfVwiNTaqfLP3AtEAWiqxyMyh3VO+1HpCjT7uNBFtmF3AgMBAAGj
ZjBkMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQW
BBQtinkdrj+0B2+qdXngV2tgHnPIujAfBgNVHSMEGDAWgBRp0xqULkNh/w2ZVzEI
o2RIY7O03TANBgkqhkiG9w0BAQsFAAOCAQEAtJdqbCxDeMc8VN1/RzCabw9BIL/z
73Auh8eFTww/sup26yn8NWUkfbckeDYr1BrXa+rPyLfHpg06kwR8rBKyrs5mHwJx
bvOzXD/5WTdgreB+2Fb7mXNvWhenYuji1MF+q1R2DXV3I05zWHteKX6Dajmx+Uuq
Yq78oaCBSV48hMxWlp8fm40ANCL1+gzQ122xweMFN09FmNYFhwuW+Ao+Vv90ZfQG
PYwTvN4n/gegw2TYcifGZC2PNX74q3DH03DXe5fvNgRW5plgz/7f+9mS+YHd5qa9
tYTPUvoRbi169ou6jicsMKUKPORHWhiTpSCWR1FMMIbsAcsyrvtIsuaGCQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/jCCAuagAwIBAgIQdOCSuA9psBpQd8EI368/0DANBgkqhkiG9w0BAQsFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIHNhLWVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTE5MTgwNjI2WhgPMjA2MTA1MTkxOTA2MjZaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgc2EtZWFzdC0xIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN6ftL6w8v3dB2yW
LjCxSP1D7ZsOTeLZOSCz1Zv0Gkd0XLhil5MdHOHBvwH/DrXqFU2oGzCRuAy+aZis
DardJU6ChyIQIciXCO37f0K23edhtpXuruTLLwUwzeEPdcnLPCX+sWEn9Y5FPnVm
pCd6J8edH2IfSGoa9LdErkpuESXdidLym/w0tWG/O2By4TabkNSmpdrCL00cqI+c
prA8Bx1jX8/9sY0gpAovtuFaRN+Ivg3PAnWuhqiSYyQ5nC2qDparOWuDiOhpY56E
EgmTvjwqMMjNtExfYx6Rv2Ndu50TriiNKEZBzEtkekwXInTupmYTvc7U83P/959V
UiQ+WSMCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU4uYHdH0+
bUeh81Eq2l5/RJbW+vswDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IB
AQBhxcExJ+w74bvDknrPZDRgTeMLYgbVJjx2ExH7/Ac5FZZWcpUpFwWMIJJxtewI
AnhryzM3tQYYd4CG9O+Iu0+h/VVfW7e4O3joWVkxNMb820kQSEwvZfA78aItGwOY
WSaFNVRyloVicZRNJSyb1UL9EiJ9ldhxm4LTT0ax+4ontI7zTx6n6h8Sr6r/UOvX
d9T5aUUENWeo6M9jGupHNn3BobtL7BZm2oS8wX8IVYj4tl0q5T89zDi2x0MxbsIV
5ZjwqBQ5JWKv7ASGPb+z286RjPA9R2knF4lJVZrYuNV90rHvI/ECyt/JrDqeljGL
BLl1W/UsvZo6ldLIpoMbbrb5
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBDCCAuygAwIBAgIQUfVbqapkLYpUqcLajpTJWzANBgkqhkiG9w0BAQsFADCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIG1lLWNlbnRyYWwtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNV
BAcMB1NlYXR0bGUwIBcNMjIwNTA2MjMyMDA5WhgPMjA2MjA1MDcwMDIwMDlaMIGa
MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j
LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt
YXpvbiBSRFMgbWUtY2VudHJhbC0xIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJIeovu3
ewI9FVitXMQzvkh34aQ6WyI4NO3YepfJaePiv3cnyFGYHN2S1cR3UQcLWgypP5va
j6bfroqwGbCbZZcb+6cyOB4ceKO9Ws1UkcaGHnNDcy5gXR7aCW2OGTUfinUuhd2d
5bOGgV7JsPbpw0bwJ156+MwfOK40OLCWVbzy8B1kITs4RUPNa/ZJnvIbiMu9rdj4
8y7GSFJLnKCjlOFUkNI5LcaYvI1+ybuNgphT3nuu5ZirvTswGakGUT/Q0J3dxP0J
pDfg5Sj/2G4gXiaM0LppVOoU5yEwVewhQ250l0eQAqSrwPqAkdTg9ng360zqCFPE
JPPcgI1tdGUgneECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU
/2AJVxWdZxc8eJgdpbwpW7b0f7IwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
CwUAA4IBAQBYm63jTu2qYKJ94gKnqc+oUgqmb1mTXmgmp/lXDbxonjszJDOXFbri
3CCO7xB2sg9bd5YWY8sGKHaWmENj3FZpCmoefbUx++8D7Mny95Cz8R32rNcwsPTl
ebpd9A/Oaw5ug6M0x/cNr0qzF8Wk9Dx+nFEimp8RYQdKvLDfNFZHjPa1itnTiD8M
TorAqj+VwnUGHOYBsT/0NY12tnwXdD+ATWfpEHdOXV+kTMqFFwDyhfgRVNpTc+os
ygr8SwhnSCpJPB/EYl2S7r+tgAbJOkuwUvGT4pTqrzDQEhwE7swgepnHC87zhf6l
qN6mVpSnQKQLm6Ob5TeCEFgcyElsF5bH
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAOxu0I1QuMAhIeszB3fJIlkwCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyB1cy13ZXN0LTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTI0MjIwNjU5WhgPMjEyMTA1MjQyMzA2NTlaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgdXMtd2VzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEz4bylRcGqqDWdP7gQIIoTHdBK6FNtKH1
4SkEIXRXkYDmRvL9Bci1MuGrwuvrka5TDj4b7e+csY0llEzHpKfq6nJPFljoYYP9
uqHFkv77nOpJJ633KOr8IxmeHW5RXgrZo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBQQikVz8wmjd9eDFRXzBIU8OseiGzAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIwf06Mcrpw1O0EBLBBrp84m37NYtOkE/0Z0O+C7D41wnXi
EQdn6PXUVgdD23Gj82SrAjEAklhKs+liO1PtN15yeZR1Io98nFve+lLptaLakZcH
+hfFuUtCqMbaI8CdvJlKnPqT
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCTCCA/GgAwIBAgIRALyWMTyCebLZOGcZZQmkmfcwDQYJKoZIhvcNAQEMBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMyBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTI0MjAyODAzWhgPMjEyMTA1MjQyMTI4MDNa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTMgUm9vdCBDQSBSU0E0MDk2IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
wGFiyDyCrGqgdn4fXG12cxKAAfVvhMea1mw5h9CVRoavkPqhzQpAitSOuMB9DeiP
wQyqcsiGl/cTEau4L+AUBG8b9v26RlY48exUYBXj8CieYntOT9iNw5WtdYJa3kF/
JxgI+HDMzE9cmHDs5DOO3S0uwZVyra/xE1ymfSlpOeUIOTpHRJv97CBUEpaZMUW5
Sr6GruuOwFVpO5FX3A/jQlcS+UN4GjSRgDUJuqg6RRQldEZGCVCCmodbByvI2fGm
reGpsPJD54KkmAX08nOR8e5hkGoHxq0m2DLD4SrOFmt65vG47qnuwplWJjtk9B3Z
9wDoopwZLBOtlkPIkUllWm1P8EuHC1IKOA+wSP6XdT7cy8S77wgyHzR0ynxv7q/l
vlZtH30wnNqFI0y9FeogD0TGMCHcnGqfBSicJXPy9T4fU6f0r1HwqKwPp2GArwe7
dnqLTj2D7M9MyVtFjEs6gfGWXmu1y5uDrf+CszurE8Cycoma+OfjjuVQgWOCy7Nd
jJswPxAroTzVfpgoxXza4ShUY10woZu0/J+HmNmqK7lh4NS75q1tz75in8uTZDkV
be7GK+SEusTrRgcf3tlgPjSTWG3veNzFDF2Vn1GLJXmuZfhdlVQDBNXW4MNREExS
dG57kJjICpT+r8X+si+5j51gRzkSnMYs7VHulpxfcwECAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQU4JWOpDBmUBuWKvGPZelw87ezhL8wDgYDVR0P
AQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQBRNLMql7itvXSEFQRAnyOjivHz
l5IlWVQjAbOUr6ogZcwvK6YpxNAFW5zQr8F+fdkiypLz1kk5irx9TIpff0BWC9hQ
/odMPO8Gxn8+COlSvc+dLsF2Dax3Hvz0zLeKMo+cYisJOzpdR/eKd0/AmFdkvQoM
AOK9n0yYvVJU2IrSgeJBiiCarpKSeAktEVQ4rvyacQGr+QAPkkjRwm+5LHZKK43W
nNnggRli9N/27qYtc5bgr3AaQEhEXMI4RxPRXCLsod0ehMGWyRRK728a+6PMMJAJ
WHOU0x7LCEMPP/bvpLj3BdvSGqNor4ZtyXEbwREry1uzsgODeRRns5acPwTM6ff+
CmxO2NZ0OktIUSYRmf6H/ZFlZrIhV8uWaIwEJDz71qvj7buhQ+RFDZ9CNL64C0X6
mf0zJGEpddjANHaaVky+F4gYMtEy2K2Lcm4JGTdyIzUoIe+atzCnRp0QeIcuWtF+
s8AjDYCVFNypcMmqbRmNpITSnOoCHSRuVkY3gutVoYyMLbp8Jm9SJnCIlEWTA6Rm
wADOMGZJVn5/XRTRuetVOB3KlQDjs9OO01XN5NzGSZO2KT9ngAUfh9Eqhf1iRWSP
nZlRbQ2NRCuY/oJ5N59mLGxnNJSE7giEKEBRhTQ/XEPIUYAUPD5fca0arKRJwbol
l9Se1Hsq0ZU5f+OZKQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAK7vlRrGVEePJpW1VHMXdlIwDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBhZi1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MTkxOTI4NDNaGA8yMTIxMDUxOTIwMjg0M1owgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBhZi1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMZiHOQC6x4o
eC7vVOMCGiN5EuLqPYHdceFPm4h5k/ZejXTf7kryk6aoKZKsDIYihkaZwXVS7Y/y
7Ig1F1ABi2jD+CYprj7WxXbhpysmN+CKG7YC3uE4jSvfvUnpzionkQbjJsRJcrPO
cZJM4FVaVp3mlHHtvnM+K3T+ni4a38nAd8xrv1na4+B8ZzZwWZXarfg8lJoGskSn
ou+3rbGQ0r+XlUP03zWujHoNlVK85qUIQvDfTB7n3O4s1XNGvkfv3GNBhYRWJYlB
4p8T+PFN8wG+UOByp1gV7BD64RnpuZ8V3dRAlO6YVAmINyG5UGrPzkIbLtErUNHO
4iSp4UqYvztDqJWWHR/rA84ef+I9RVwwZ8FQbjKq96OTnPrsr63A5mXTC9dXKtbw
XNJPQY//FEdyM3K8sqM0IdCzxCA1MXZ8+QapWVjwyTjUwFvL69HYky9H8eAER59K
5I7u/CWWeCy2R1SYUBINc3xxLr0CGGukcWPEZW2aPo5ibW5kepU1P/pzdMTaTfao
F42jSFXbc7gplLcSqUgWwzBnn35HLTbiZOFBPKf6vRRu8aRX9atgHw/EjCebi2xP
xIYr5Ub8u0QVHIqcnF1/hVzO/Xz0chj3E6VF/yTXnsakm+W1aM2QkZbFGpga+LMy
mFCtdPrELjea2CfxgibaJX1Q4rdEpc8DAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFDSaycEyuspo/NOuzlzblui8KotFMA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEAbosemjeTRsL9o4v0KadBUNS3V7gdAH+X4vH2
Ee1Jc91VOGLdd/s1L9UX6bhe37b9WjUD69ur657wDW0RzxMYgQdZ27SUl0tEgGGp
cCmVs1ky3zEN+Hwnhkz+OTmIg1ufq0W2hJgJiluAx2r1ib1GB+YI3Mo3rXSaBYUk
bgQuujYPctf0PA153RkeICE5GI3OaJ7u6j0caYEixBS3PDHt2MJWexITvXGwHWwc
CcrC05RIrTUNOJaetQw8smVKYOfRImEzLLPZ5kf/H3Cbj8BNAFNsa10wgvlPuGOW
XLXqzNXzrG4V3sjQU5YtisDMagwYaN3a6bBf1wFwFIHQoAPIgt8q5zaQ9WI+SBns
Il6rd4zfvjq/BPmt0uI7rVg/cgbaEg/JDL2neuM9CJAzmKxYxLQuHSX2i3Fy4Y1B
cnxnRQETCRZNPGd00ADyxPKVoYBC45/t+yVusArFt+2SVLEGiFBr23eG2CEZu+HS
nDEgIfQ4V3YOTUNa86wvbAss1gbbnT/v1XCnNGClEWCWNCSRjwV2ZmQ/IVTmNHPo
7axTTBBJbKJbKzFndCnuxnDXyytdYRgFU7Ly3sa27WS2KFyFEDebLFRHQEfoYqCu
IupSqBSbXsR3U10OTjc9z6EPo1nuV6bdz+gEDthmxKa1NI+Qb1kvyliXQHL2lfhr
5zT5+Bs=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/zCCA+egAwIBAgIRAOLV6zZcL4IV2xmEneN1GwswDQYJKoZIhvcNAQEMBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyB1cy13ZXN0LTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE5MDg1OFoYDzIxMjEwNTE5MjAwODU4WjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIHVzLXdlc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC7koAKGXXlLixN
fVjhuqvz0WxDeTQfhthPK60ekRpftkfE5QtnYGzeovaUAiS58MYVzqnnTACDwcJs
IGTFE6Wd7sB6r8eI/3CwI1pyJfxepubiQNVAQG0zJETOVkoYKe/5KnteKtnEER3X
tCBRdV/rfbxEDG9ZAsYfMl6zzhEWKF88G6xhs2+VZpDqwJNNALvQuzmTx8BNbl5W
RUWGq9CQ9GK9GPF570YPCuURW7kl35skofudE9bhURNz51pNoNtk2Z3aEeRx3ouT
ifFJlzh+xGJRHqBG7nt5NhX8xbg+vw4xHCeq1aAe6aVFJ3Uf9E2HzLB4SfIT9bRp
P7c9c0ySGt+3n+KLSHFf/iQ3E4nft75JdPjeSt0dnyChi1sEKDi0tnWGiXaIg+J+
r1ZtcHiyYpCB7l29QYMAdD0TjfDwwPayLmq//c20cPmnSzw271VwqjUT0jYdrNAm
gV+JfW9t4ixtE3xF2jaUh/NzL3bAmN5v8+9k/aqPXlU1BgE3uPwMCjrfn7V0I7I1
WLpHyd9jF3U/Ysci6H6i8YKgaPiOfySimQiDu1idmPld659qerutUSemQWmPD3bE
dcjZolmzS9U0Ujq/jDF1YayN3G3xvry1qWkTci0qMRMu2dZu30Herugh9vsdTYkf
00EqngPbqtIVLDrDjEQLqPcb8QvWFQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBQBqg8Za/L0YMHURGExHfvPyfLbOTAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQEMBQADggIBACAGPMa1QL7P/FIO7jEtMelJ0hQlQepKnGtbKz4r
Xq1bUX1jnLvnAieR9KZmeQVuKi3g3CDU6b0mDgygS+FL1KDDcGRCSPh238Ou8KcG
HIxtt3CMwMHMa9gmdcMlR5fJF9vhR0C56KM2zvyelUY51B/HJqHwGvWuexryXUKa
wq1/iK2/d9mNeOcjDvEIj0RCMI8dFQCJv3PRCTC36XS36Tzr6F47TcTw1c3mgKcs
xpcwt7ezrXMUunzHS4qWAA5OGdzhYlcv+P5GW7iAA7TDNrBF+3W4a/6s9v2nQAnX
UvXd9ul0ob71377UhZbJ6SOMY56+I9cJOOfF5QvaL83Sz29Ij1EKYw/s8TYdVqAq
+dCyQZBkMSnDFLVe3J1KH2SUSfm3O98jdPORQrUlORQVYCHPls19l2F6lCmU7ICK
hRt8EVSpXm4sAIA7zcnR2nU00UH8YmMQLnx5ok9YGhuh3Ehk6QlTQLJux6LYLskd
9YHOLGW/t6knVtV78DgPqDeEx/Wu/5A8R0q7HunpWxr8LCPBK6hksZnOoUhhb8IP
vl46Ve5Tv/FlkyYr1RTVjETmg7lb16a8J0At14iLtpZWmwmuv4agss/1iBVMXfFk
+ZGtx5vytWU5XJmsfKA51KLsMQnhrLxb3X3zC+JRCyJoyc8++F3YEcRi2pkRYE3q
Hing
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRANxgyBbnxgTEOpDul2ZnC0UwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMyBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNjEwMTgxOTA3WhgPMjA2MTA2MTAxOTE5MDda
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtc291dGhlYXN0LTMgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
xnwSDAChrMkfk5TA4Dk8hKzStDlSlONzmd3fTG0Wqr5+x3EmFT6Ksiu/WIwEl9J2
K98UI7vYyuZfCxUKb1iMPeBdVGqk0zb92GpURd+Iz/+K1ps9ZLeGBkzR8mBmAi1S
OfpwKiTBzIv6E8twhEn4IUpHsdcuX/2Y78uESpJyM8O5CpkG0JaV9FNEbDkJeBUQ
Ao2qqNcH4R0Qcr5pyeqA9Zto1RswgL06BQMI9dTpfwSP5VvkvcNUaLl7Zv5WzLQE
JzORWePvdPzzvWEkY/3FPjxBypuYwssKaERW0fkPDmPtykktP9W/oJolKUFI6pXp
y+Y6p6/AVdnQD2zZjW5FhQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBT+jEKs96LC+/X4BZkUYUkzPfXdqTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAIGQqgqcQ6XSGkmNebzR6DhadTbfDmbYeN5N0Vuzv+Tdmufb
tMGjdjnYMg4B+IVnTKQb+Ox3pL9gbX6KglGK8HupobmIRtwKVth+gYYz3m0SL/Nk
haWPYzOm0x3tJm8jSdufJcEob4/ATce9JwseLl76pSWdl5A4lLjnhPPKudUDfH+1
BLNUi3lxpp6GkC8aWUPtupnhZuXddolTLOuA3GwTZySI44NfaFRm+o83N1jp+EwD
6e94M4cTRzjUv6J3MZmSbdtQP/Tk1uz2K4bQZGP0PZC3bVpqiesdE/xr+wbu8uHr
cM1JXH0AmXf1yIkTgyWzmvt0k1/vgcw5ixAqvvE=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEATCCAumgAwIBAgIRAMhw98EQU18mIji+unM2YH8wDQYJKoZIhvcNAQELBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBhcC1zb3V0aC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMjA2MDYyMTQyMjJaGA8yMDYyMDYwNjIyNDIyMlowgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBhcC1zb3V0aC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIeeRoLfTm+7
vqm7ZlFSx+1/CGYHyYrOOryM4/Z3dqYVHFMgWTR7V3ziO8RZ6yUanrRcWVX3PZbF
AfX0KFE8OgLsXEZIX8odSrq86+/Th5eZOchB2fDBsUB7GuN2rvFBbM8lTI9ivVOU
lbuTnYyb55nOXN7TpmH2bK+z5c1y9RVC5iQsNAl6IJNvSN8VCqXh31eK5MlKB4DT
+Y3OivCrSGsjM+UR59uZmwuFB1h+icE+U0p9Ct3Mjq3MzSX5tQb6ElTNGlfmyGpW
Kh7GQ5XU1KaKNZXoJ37H53woNSlq56bpVrKI4uv7ATpdpFubOnSLtpsKlpLdR3sy
Ws245200pC8CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUp0ki
6+eWvsnBjQhMxwMW5pwn7DgwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUA
A4IBAQB2V8lv0aqbYQpj/bmVv/83QfE4vOxKCJAHv7DQ35cJsTyBdF+8pBczzi3t
3VNL5IUgW6WkyuUOWnE0eqAFOUVj0yTS1jSAtfl3vOOzGJZmWBbqm9BKEdu1D8O6
sB8bnomwiab2tNDHPmUslpdDqdabbkWwNWzLJ97oGFZ7KNODMEPXWKWNxg33iHfS
/nlmnrTVI3XgaNK9qLZiUrxu9Yz5gxi/1K+sG9/Dajd32ZxjRwDipOLiZbiXQrsd
qzIMY4GcWf3g1gHL5mCTfk7dG22h/rhPyGV0svaDnsb+hOt6sv1McMN6Y3Ou0mtM
/UaAXojREmJmTSCNvs2aBny3/2sy
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAMnRxsKLYscJV8Qv5pWbL7swCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyBzYS1lYXN0LTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTE5MTgxNjAxWhgPMjEyMTA1MTkxOTE2MDFaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgc2EtZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEjFOCZgTNVKxLKhUxffiDEvTLFhrmIqdO
dKqVdgDoELEzIHWDdC+19aDPitbCYtBVHl65ITu/9pn6mMUl5hhUNtfZuc6A+Iw1
sBe0v0qI3y9Q9HdQYrGgeHDh8M5P7E2ho0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBS5L7/8M0TzoBZk39Ps7BkfTB4yJTAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIwI43O0NtWKTgnVv9z0LO5UMZYgSve7GvGTwqktZYCMObE
rUI4QerXM9D6JwLy09mqAjEAypfkdLyVWtaElVDUyHFkihAS1I1oUxaaDrynLNQK
Ou/Ay+ns+J+GyvyDUjBpVVW1
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/jCCA+agAwIBAgIQR71Z8lTO5Sj+as2jB7IWXzANBgkqhkiG9w0BAQwFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIHVzLXdlc3QtMiBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTI0MjIwMzIwWhgPMjEyMTA1MjQyMzAzMjBaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgdXMtd2VzdC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAM977bHIs1WJijrS
XQMfUOhmlJjr2v0K0UjPl52sE1TJ76H8umo1yR4T7Whkd9IwBHNGKXCJtJmMr9zp
fB38eLTu+5ydUAXdFuZpRMKBWwPVe37AdJRKqn5beS8HQjd3JXAgGKUNNuE92iqF
qi2fIqFMpnJXWo0FIW6s2Dl2zkORd7tH0DygcRi7lgVxCsw1BJQhFJon3y+IV8/F
bnbUXSNSDUnDW2EhvWSD8L+t4eiXYsozhDAzhBvojpxhPH9OB7vqFYw5qxFx+G0t
lSLX5iWi1jzzc3XyGnB6WInZDVbvnvJ4BGZ+dTRpOCvsoMIn9bz4EQTvu243c7aU
HbS/kvnCASNt+zk7C6lbmaq0AGNztwNj85Opn2enFciWZVnnJ/4OeefUWQxD0EPp
SjEd9Cn2IHzkBZrHCg+lWZJQBKbUVS0lLIMSsLQQ6WvR38jY7D2nxM1A93xWxwpt
ZtQnYRCVXH6zt2OwDAFePInWwxUjR5t/wu3XxPgpSfrmTi3WYtr1wFypAJ811e/P
yBtswWUQ6BNJQvy+KnOEeGfOwmtdDFYR+GOCfvCihzrKJrxOtHIieehR5Iw3cbXG
sm4pDzfMUVvDDz6C2M6PRlJhhClbatHCjik9hxFYEsAlqtVVK9pxaz9i8hOqSFQq
kJSQsgWw+oM/B2CyjcSqkSQEu8RLAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8w
HQYDVR0OBBYEFPmrdxpRRgu3IcaB5BTqlprcKdTsMA4GA1UdDwEB/wQEAwIBhjAN
BgkqhkiG9w0BAQwFAAOCAgEAVdlxWjPvVKky3kn8ZizeM4D+EsLw9dWLau2UD/ls
zwDCFoT6euagVeCknrn+YEl7g20CRYT9iaonGoMUPuMR/cdtPL1W/Rf40PSrGf9q
QuxavWiHLEXOQTCtCaVZMokkvjuuLNDXyZnstgECuiZECTwhexUF4oiuhyGk9o01
QMaiz4HX4lgk0ozALUvEzaNd9gWEwD2qe+rq9cQMTVq3IArUkvTIftZUaVUMzr0O
ed1+zAsNa9nJhURJ/6anJPJjbQgb5qA1asFcp9UaMT1ku36U3gnR1T/BdgG2jX3X
Um0UcaGNVPrH1ukInWW743pxWQb7/2sumEEMVh+jWbB18SAyLI4WIh4lkurdifzS
IuTFp8TEx+MouISFhz/vJDWZ84tqoLVjkEcP6oDypq9lFoEzHDJv3V1CYcIgOusT
k1jm9P7BXdTG7TYzUaTb9USb6bkqkD9EwJAOSs7DI94aE6rsSws2yAHavjAMfuMZ
sDAZvkqS2Qg2Z2+CI6wUZn7mzkJXbZoqRjDvChDXEB1mIhzVXhiNW/CR5WKVDvlj
9v1sdGByh2pbxcLQtVaq/5coM4ANgphoNz3pOYUPWHS+JUrIivBZ+JobjXcxr3SN
9iDzcu5/FVVNbq7+KN/nvPMngT+gduEN5m+EBjm8GukJymFG0m6BENRA0QSDqZ7k
zDY=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRAK5EYG3iHserxMqgg+0EFjgwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMyBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTI0MjAyMzE2WhgPMjA2MTA1MjQyMTIzMTZa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTMgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
s1L6TtB84LGraLHVC+rGPhLBW2P0oN/91Rq3AnYwqDOuTom7agANwEjvLq7dSRG/
sIfZsSV/ABTgArZ5sCmLjHFZAo8Kd45yA9byx20RcYtAG8IZl+q1Cri+s0XefzyO
U6mlfXZkVe6lzjlfXBkrlE/+5ifVbJK4dqOS1t9cWIpgKqv5fbE6Qbq4LVT+5/WM
Vd2BOljuBMGMzdZubqFKFq4mzTuIYfnBm7SmHlZfTdfBYPP1ScNuhpjuzw4n3NCR
EdU6dQv04Q6th4r7eiOCwbWI9LkmVbvBe3ylhH63lApC7MiiPYLlB13xBubVHVhV
q1NHoNTi+zA3MN9HWicRxQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBSuxoqm0/wjNiZLvqv+JlQwsDvTPDAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAFfTK/j5kv90uIbM8VaFdVbr/6weKTwehafT0pAk1bfLVX+7
uf8oHgYiyKTTl0DFQicXejghXTeyzwoEkWSR8c6XkhD5vYG3oESqmt/RGvvoxz11
rHHy7yHYu7RIUc3VQG60c4qxXv/1mWySGwVwJrnuyNT9KZXPevu3jVaWOVHEILaK
HvzQ2YEcWBPmde/zEseO2QeeGF8FL45Q1d66wqIP4nNUd2pCjeTS5SpB0MMx7yi9
ki1OH1pv8tOuIdimtZ7wkdB8+JSZoaJ81b8sRrydRwJyvB88rftuI3YB4WwGuONT
ZezUPsmaoK69B0RChB0ofDpAaviF9V3xOWvVZfo=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGDzCCA/egAwIBAgIRAI0sMNG2XhaBMRN3zD7ZyoEwDQYJKoZIhvcNAQEMBQAw
gZ8xCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE4MDYGA1UEAwwv
QW1hem9uIFJEUyBQcmV2aWV3IHVzLWVhc3QtMiBSb290IENBIFJTQTQwOTYgRzEx
EDAOBgNVBAcMB1NlYXR0bGUwIBcNMjEwNTE4MjA1NzUwWhgPMjEyMTA1MTgyMTU3
NTBaMIGfMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNl
cywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExODA2BgNV
BAMML0FtYXpvbiBSRFMgUHJldmlldyB1cy1lYXN0LTIgUm9vdCBDQSBSU0E0MDk2
IEcxMRAwDgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
CgKCAgEAh/otSiCu4Uw3hu7OJm0PKgLsLRqBmUS6jihcrkxfN2SHmp2zuRflkweU
BhMkebzL+xnNvC8okzbgPWtUxSmDnIRhE8J7bvSKFlqs/tmEdiI/LMqe/YIKcdsI
20UYmvyLIjtDaJIh598SHHlF9P8DB5jD8snJfhxWY+9AZRN+YVTltgQAAgayxkWp
M1BbvxpOnz4CC00rE0eqkguXIUSuobb1vKqdKIenlYBNxm2AmtgvQfpsBIQ0SB+8
8Zip8Ef5rtjSw5J3s2Rq0aYvZPfCVIsKYepIboVwXtD7E9J31UkB5onLBQlaHaA6
XlH4srsMmrew5d2XejQGy/lGZ1nVWNsKO0x/Az2QzY5Kjd6AlXZ8kq6H68hscA5i
OMbNlXzeEQsZH0YkId3+UsEns35AAjZv4qfFoLOu8vDotWhgVNT5DfdbIWZW3ZL8
qbmra3JnCHuaTwXMnc25QeKgVq7/rG00YB69tCIDwcf1P+tFJWxvaGtV0g2NthtB
a+Xo09eC0L53gfZZ3hZw1pa3SIF5dIZ6RFRUQ+lFOux3Q/I3u+rYstYw7Zxc4Zeo
Y8JiedpQXEAnbw2ECHix/L6mVWgiWCiDzBnNLLdbmXjJRnafNSndSfFtHCnY1SiP
aCrNpzwZIJejoV1zDlWAMO+gyS28EqzuIq3WJK/TFE7acHkdKIcCAwEAAaNCMEAw
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUrmV1YASnuudfmqAZP4sKGTvScaEw
DgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQBGpEKeQoPvE85tN/25
qHFkys9oHDl93DZ62EnOqAUKLd6v0JpCyEiop4nlrJe+4KrBYVBPyKOJDcIqE2Sp
3cvgJXLhY4i46VM3Qxe8yuYF1ElqBpg3jJVj/sCQnYz9dwoAMWIJFaDWOvmU2E7M
MRaKx+sPXFkIjiDA6Bv0m+VHef7aedSYIY7IDltEQHuXoqNacGrYo3I50R+fZs88
/mB3e/V7967e99D6565yf9Lcjw4oQf2Hy7kl/6P9AuMz0LODnGITwh2TKk/Zo3RU
Vgq25RDrT4xJK6nFHyjUF6+4cOBxVpimmFw/VP1zaXT8DN5r4HyJ9p4YuSK8ha5N
2pJc/exvU8Nv2+vS/efcDZWyuEdZ7eh1IJWQZlOZKIAONfRDRTpeQHJ3zzv3QVYy
t78pYp/eWBHyVIfEE8p2lFKD4279WYe+Uvdb8c4Jm4TJwqkSJV8ifID7Ub80Lsir
lPAU3OCVTBeVRFPXT2zpC4PB4W6KBSuj6OOcEu2y/HgWcoi7Cnjvp0vFTUhDFdus
Wz3ucmJjfVsrkEO6avDKu4SwdbVHsk30TVAwPd6srIdi9U6MOeOQSOSE4EsrrS7l
SVmu2QIDUVFpm8QAHYplkyWIyGkupyl3ashH9mokQhixIU/Pzir0byePxHLHrwLu
1axqeKpI0F5SBUPsaVNYY2uNFg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgIQCREfzzVyDTMcNME+gWnTCTANBgkqhkiG9w0BAQsFADCB
nDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTUwMwYDVQQDDCxB
bWF6b24gUkRTIGFwLXNvdXRoZWFzdC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4G
A1UEBwwHU2VhdHRsZTAgFw0yMTA1MjQyMDQyMzNaGA8yMDYxMDUyNDIxNDIzM1ow
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMiBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDL
1MT6br3L/4Pq87DPXtcjlXN3cnbNk2YqRAZHJayStTz8VtsFcGPJOpk14geRVeVk
e9uKFHRbcyr/RM4owrJTj5X4qcEuATYZbo6ou/rW2kYzuWFZpFp7lqm0vasV4Z9F
fChlhwkNks0UbM3G+psCSMNSoF19ERunj7w2c4E62LwujkeYLvKGNepjnaH10TJL
2krpERd+ZQ4jIpObtRcMH++bTrvklc+ei8W9lqrVOJL+89v2piN3Ecdd389uphst
qQdb1BBVXbhUrtuGHgVf7zKqN1SkCoktoWxVuOprVWhSvr7akaWeq0UmlvbEsujU
vADqxGMcJFyCzxx3CkJjAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
BBYEFFk8UJmlhoxFT3PP12PvhvazHjT4MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG
9w0BAQsFAAOCAQEAfFtr2lGoWVXmWAsIo2NYre7kzL8Xb9Tx7desKxCCz5HOOvIr
8JMB1YK6A7IOvQsLJQ/f1UnKRh3X3mJZjKIywfrMSh0FiDf+rjcEzXxw2dGtUem4
A+WMvIA3jwxnJ90OQj5rQ8bg3iPtE6eojzo9vWQGw/Vu48Dtw1DJo9210Lq/6hze
hPhNkFh8fMXNT7Q1Wz/TJqJElyAQGNOXhyGpHKeb0jHMMhsy5UNoW5hLeMS5ffao
TBFWEJ1gVfxIU9QRxSh+62m46JIg+dwDlWv8Aww14KgepspRbMqDuaM2cinoejv6
t3dyOyHHrsOyv3ffZUKtQhQbQr+sUcL89lARsg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIRAIJLTMpzGNxqHZ4t+c1MlCIwDQYJKoZIhvcNAQELBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBhcC1lYXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNTIxMzAzM1oYDzIwNjEwNTI1MjIzMDMzWjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGFwLWVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDtdHut0ZhJ9Nn2
MpVafFcwHdoEzx06okmmhjJsNy4l9QYVeh0UUoek0SufRNMRF4d5ibzpgZol0Y92
/qKWNe0jNxhEj6sXyHsHPeYtNBPuDMzThfbvsLK8z7pBP7vVyGPGuppqW/6m4ZBB
lcc9fsf7xpZ689iSgoyjiT6J5wlVgmCx8hFYc/uvcRtfd8jAHvheug7QJ3zZmIye
V4htOW+fRVWnBjf40Q+7uTv790UAqs0Zboj4Yil+hER0ibG62y1g71XcCyvcVpto
2/XW7Y9NCgMNqQ7fGN3wR1gjtSYPd7DO32LTzYhutyvfbpAZjsAHnoObmoljcgXI
QjfBcCFpAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJI3aWLg
CS5xqU5WYVaeT5s8lpO0MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOC
AQEAUwATpJOcGVOs3hZAgJwznWOoTzOVJKfrqBum7lvkVH1vBwxBl9CahaKj3ZOt
YYp2qJzhDUWludL164DL4ZjS6eRedLRviyy5cRy0581l1MxPWTThs27z+lCC14RL
PJZNVYYdl7Jy9Q5NsQ0RBINUKYlRY6OqGDySWyuMPgno2GPbE8aynMdKP+f6G/uE
YHOf08gFDqTsbyfa70ztgVEJaRooVf5JJq4UQtpDvVswW2reT96qi6tXPKHN5qp3
3wI0I1Mp4ePmiBKku2dwYzPfrJK/pQlvu0Gu5lKOQ65QdotwLAAoaFqrf9za1yYs
INUkHLWIxDds+4OHNYcerGp5Dw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCTCCA/GgAwIBAgIRAIO6ldra1KZvNWJ0TA1ihXEwDQYJKoZIhvcNAQEMBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTIxMjE0NTA1WhgPMjEyMTA1MjEyMjQ1MDVa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtc291dGhlYXN0LTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
sDN52Si9pFSyZ1ruh3xAN0nVqEs960o2IK5CPu/ZfshFmzAwnx/MM8EHt/jMeZtj
SM58LADAsNDL01ELpFZATjgZQ6xNAyXRXE7RiTRUvNkK7O3o2qAGbLnJq/UqF7Sw
LRnB8V6hYOv+2EjVnohtGCn9SUFGZtYDjWXsLd4ML4Zpxv0a5LK7oEC7AHzbUR7R
jsjkrXqSv7GE7bvhSOhMkmgxgj1F3J0b0jdQdtyyj109aO0ATUmIvf+Bzadg5AI2
A9UA+TUcGeebhpHu8AP1Hf56XIlzPpaQv3ZJ4vzoLaVNUC7XKzAl1dlvCl7Klg/C
84qmbD/tjZ6GHtzpLKgg7kQEV7mRoXq8X4wDX2AFPPQl2fv+Kbe+JODqm5ZjGegm
uskABBi8IFv1hYx9jEulZPxC6uD/09W2+niFm3pirnlWS83BwVDTUBzF+CooUIMT
jhWkIIZGDDgMJTzouBHfoSJtS1KpUZi99m2WyVs21MNKHeWAbs+zmI6TO5iiMC+T
uB8spaOiHFO1573Fmeer4sy3YA6qVoqVl6jjTQqOdy3frAMbCkwH22/crV8YA+08
hLeHXrMK+6XUvU+EtHAM3VzcrLbuYJUI2XJbzTj5g0Eb8I8JWsHvWHR5K7Z7gceR
78AzxQmoGEfV6KABNWKsgoCQnfb1BidDJIe3BsI0A6UCAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQUABp0MlB14MSHgAcuNSOhs3MOlUcwDgYDVR0P
AQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQCv4CIOBSQi/QR9NxdRgVAG/pAh
tFJhV7OWb/wqwsNKFDtg6tTxwaahdCfWpGWId15OUe7G9LoPiKiwM9C92n0ZeHRz
4ewbrQVo7Eu1JI1wf0rnZJISL72hVYKmlvaWaacHhWxvsbKLrB7vt6Cknxa+S993
Kf8i2Psw8j5886gaxhiUtzMTBwoDWak8ZaK7m3Y6C6hXQk08+3pnIornVSFJ9dlS
PAqt5UPwWmrEfF+0uIDORlT+cvrAwgSp7nUF1q8iasledycZ/BxFgQqzNwnkBDwQ
Z/aM52ArGsTzfMhkZRz9HIEhz1/0mJw8gZtDVQroD8778h8zsx2SrIz7eWQ6uWsD
QEeSWXpcheiUtEfzkDImjr2DLbwbA23c9LoexUD10nwohhoiQQg77LmvBVxeu7WU
E63JqaYUlOLOzEmNJp85zekIgR8UTkO7Gc+5BD7P4noYscI7pPOL5rP7YLg15ZFi
ega+G53NTckRXz4metsd8XFWloDjZJJq4FfD60VuxgXzoMNT9wpFTNSH42PR2s9L
I1vcl3w8yNccs9se2utM2nLsItZ3J0m/+QSRiw9hbrTYTcM9sXki0DtH2kyIOwYf
lOrGJDiYOIrXSQK36H0gQ+8omlrUTvUj4msvkXuQjlfgx6sgp2duOAfnGxE7uHnc
UhnJzzoe6M+LfGHkVQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICuDCCAj2gAwIBAgIQSAG6j2WHtWUUuLGJTPb1nTAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLW5vcnRoZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMDE2MzgyNloYDzIxMjEwNTIwMTczODI2WjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLW5vcnRoZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE2eqwU4FOzW8RV1W381Bd
olhDOrqoMqzWli21oDUt7y8OnXM/lmAuOS6sr8Nt61BLVbONdbr+jgCYw75KabrK
ZGg3siqvMOgabIKkKuXO14wtrGyGDt7dnKXg5ERGYOZlo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBS1Acp2WYxOcblv5ikZ3ZIbRCCW+zAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaQAwZgIxAJL84J08PBprxmsAKPTotBuVI3MyW1r8
xQ0i8lgCQUf8GcmYjQ0jI4oZyv+TuYJAcwIxAP9Xpzq0Docxb+4N1qVhpiOfWt1O
FnemFiy9m1l+wv6p3riQMPV7mBVpklmijkIv3Q==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRALZLcqCVIJ25maDPE3sbPCIwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTIxMjEzOTM5WhgPMjA2MTA1MjEyMjM5Mzla
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtc291dGhlYXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
ypKc+6FfGx6Gl6fQ78WYS29QoKgQiur58oxR3zltWeg5fqh9Z85K5S3UbRSTqWWu
Xcfnkz0/FS07qHX+nWAGU27JiQb4YYqhjZNOAq8q0+ptFHJ6V7lyOqXBq5xOzO8f
+0DlbJSsy7GEtJp7d7QCM3M5KVY9dENVZUKeJwa8PC5StvwPx4jcLeZRJC2rAVDG
SW7NAInbATvr9ssSh03JqjXb+HDyywiqoQ7EVLtmtXWimX+0b3/2vhqcH5jgcKC9
IGFydrjPbv4kwMrKnm6XlPZ9L0/3FMzanXPGd64LQVy51SI4d5Xymn0Mw2kMX8s6
Nf05OsWcDzJ1n6/Q1qHSxQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBRmaIc8eNwGP7i6P7AJrNQuK6OpFzAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAIBeHfGwz3S2zwIUIpqEEI5/sMySDeS+3nJR+woWAHeO0C8i
BJdDh+kzzkP0JkWpr/4NWz84/IdYo1lqASd1Kopz9aT1+iROXaWr43CtbzjXb7/X
Zv7eZZFC8/lS5SROq42pPWl4ekbR0w8XGQElmHYcWS41LBfKeHCUwv83ATF0XQ6I
4t+9YSqZHzj4vvedrvcRInzmwWJaal9s7Z6GuwTGmnMsN3LkhZ+/GD6oW3pU/Pyh
EtWqffjsLhfcdCs3gG8x9BbkcJPH5aPAVkPn4wc8wuXg6xxb9YGsQuY930GWTYRf
schbgjsuqznW4HHakq4WNhs1UdTSTKkRdZz7FUQ=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDzCCAvegAwIBAgIRAM2zAbhyckaqRim63b+Tib8wDQYJKoZIhvcNAQELBQAw
gZ8xCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE4MDYGA1UEAwwv
QW1hem9uIFJEUyBQcmV2aWV3IHVzLWVhc3QtMiBSb290IENBIFJTQTIwNDggRzEx
EDAOBgNVBAcMB1NlYXR0bGUwIBcNMjEwNTE4MjA0OTQ1WhgPMjA2MTA1MTgyMTQ5
NDVaMIGfMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNl
cywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExODA2BgNV
BAMML0FtYXpvbiBSRFMgUHJldmlldyB1cy1lYXN0LTIgUm9vdCBDQSBSU0EyMDQ4
IEcxMRAwDgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
CgKCAQEA1ybjQMH1MkbvfKsWJaCTXeCSN1SG5UYid+Twe+TjuSqaXWonyp4WRR5z
tlkqq+L2MWUeQQAX3S17ivo/t84mpZ3Rla0cx39SJtP3BiA2BwfUKRjhPwOjmk7j
3zrcJjV5k1vSeLNOfFFSlwyDiVyLAE61lO6onBx+cRjelu0egMGq6WyFVidTdCmT
Q9Zw3W6LTrnPvPmEyjHy2yCHzH3E50KSd/5k4MliV4QTujnxYexI2eR8F8YQC4m3
DYjXt/MicbqA366SOoJA50JbgpuVv62+LSBu56FpzY12wubmDZsdn4lsfYKiWxUy
uc83a2fRXsJZ1d3whxrl20VFtLFHFQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBRC0ytKmDYbfz0Bz0Psd4lRQV3aNTAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQELBQADggEBAGv8qZu4uaeoF6zsbumauz6ea6tdcWt+hGFuwGrb
tRbI85ucAmVSX06x59DJClsb4MPhL1XmqO3RxVMIVVfRwRHWOsZQPnXm8OYQ2sny
rYuFln1COOz1U/KflZjgJmxbn8x4lYiTPZRLarG0V/OsCmnLkQLPtEl/spMu8Un7
r3K8SkbWN80gg17Q8EV5mnFwycUx9xsTAaFItuG0en9bGsMgMmy+ZsDmTRbL+lcX
Fq8r4LT4QjrFz0shrzCwuuM4GmcYtBSxlacl+HxYEtAs5k10tmzRf6OYlY33tGf6
1tkYvKryxDPF/EDgGp/LiBwx6ixYMBfISoYASt4V/ylAlHA=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtTCCAjqgAwIBAgIRAK9BSZU6nIe6jqfODmuVctYwCgYIKoZIzj0EAwMwgZkx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEyMDAGA1UEAwwpQW1h
em9uIFJEUyBjYS1jZW50cmFsLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTIxMjIxMzA5WhgPMjEyMTA1MjEyMzEzMDlaMIGZMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMjAwBgNVBAMMKUFtYXpv
biBSRFMgY2EtY2VudHJhbC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEUkEERcgxneT5H+P+fERcbGmf
bVx+M7rNWtgWUr6w+OBENebQA9ozTkeSg4c4M+qdYSObFqjxITdYxT1z/nHz1gyx
OKAhLjWu+nkbRefqy3RwXaWT680uUaAP6ccnkZOMo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MB0GA1UdDgQWBBSN6fxlg0s5Wny08uRBYZcQ3TUoyzAOBgNVHQ8BAf8EBAMC
AYYwCgYIKoZIzj0EAwMDaQAwZgIxAORaz+MBVoFBTmZ93j2G2vYTwA6T5hWzBWrx
CrI54pKn5g6At56DBrkjrwZF5T1enAIxAJe/LZ9xpDkAdxDgGJFN8gZYLRWc0NRy
Rb4hihy5vj9L+w9uKc9VfEBIFuhT7Z3ljg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQB/57HSuaqUkLaasdjxUdPjANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGFwLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE3NDAzNFoYDzIwNjEwNTE5MTg0MDM0WjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGFwLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtbkaoVsUS76o
TgLFmcnaB8cswBk1M3Bf4IVRcwWT3a1HeJSnaJUqWHCJ+u3ip/zGVOYl0gN1MgBb
MuQRIJiB95zGVcIa6HZtx00VezDTr3jgGWRHmRjNVCCHGmxOZWvJjsIE1xavT/1j
QYV/ph4EZEIZ/qPq7e3rHohJaHDe23Z7QM9kbyqp2hANG2JtU/iUhCxqgqUHNozV
Zd0l5K6KnltZQoBhhekKgyiHqdTrH8fWajYl5seD71bs0Axowb+Oh0rwmrws3Db2
Dh+oc2PwREnjHeca9/1C6J2vhY+V0LGaJmnnIuOANrslx2+bgMlyhf9j0Bv8AwSi
dSWsobOhNQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQb7vJT
VciLN72yJGhaRKLn6Krn2TAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAAxEj8N9GslReAQnNOBpGl8SLgCMTejQ6AW/bapQvzxrZrfVOZOYwp/5oV0f
9S1jcGysDM+DrmfUJNzWxq2Y586R94WtpH4UpJDGqZp+FuOVJL313te4609kopzO
lDdmd+8z61+0Au93wB1rMiEfnIMkOEyt7D2eTFJfJRKNmnPrd8RjimRDlFgcLWJA
3E8wca67Lz/G0eAeLhRHIXv429y8RRXDtKNNz0wA2RwURWIxyPjn1fHjA9SPDkeW
E1Bq7gZj+tBnrqz+ra3yjZ2blss6Ds3/uRY6NYqseFTZWmQWT7FolZEnT9vMUitW
I0VynUbShVpGf6946e0vgaaKw20=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/jCCAuagAwIBAgIQGyUVTaVjYJvWhroVEiHPpDANBgkqhkiG9w0BAQsFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIHVzLXdlc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTE5MTkwNDA2WhgPMjA2MTA1MTkyMDA0MDZaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgdXMtd2VzdC0xIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANhyXpJ0t4nigRDZ
EwNtFOem1rM1k8k5XmziHKDvDk831p7QsX9ZOxl/BT59Pu/P+6W6SvasIyKls1sW
FJIjFF+6xRQcpoE5L5evMgN/JXahpKGeQJPOX9UEXVW5B8yi+/dyUitFT7YK5LZA
MqWBN/LtHVPa8UmE88RCDLiKkqiv229tmwZtWT7nlMTTCqiAHMFcryZHx0pf9VPh
x/iPV8p2gBJnuPwcz7z1kRKNmJ8/cWaY+9w4q7AYlAMaq/rzEqDaN2XXevdpsYAK
TMMj2kji4x1oZO50+VPNfBl5ZgJc92qz1ocF95SAwMfOUsP8AIRZkf0CILJYlgzk
/6u6qZECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm5jfcS9o
+LwL517HpB6hG+PmpBswDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IB
AQAcQ6lsqxi63MtpGk9XK8mCxGRLCad51+MF6gcNz6i6PAqhPOoKCoFqdj4cEQTF
F8dCfa3pvfJhxV6RIh+t5FCk/y6bWT8Ls/fYKVo6FhHj57bcemWsw/Z0XnROdVfK
Yqbc7zvjCPmwPHEqYBhjU34NcY4UF9yPmlLOL8uO1JKXa3CAR0htIoW4Pbmo6sA4
6P0co/clW+3zzsQ92yUCjYmRNeSbdXbPfz3K/RtFfZ8jMtriRGuO7KNxp8MqrUho
HK8O0mlSUxGXBZMNicfo7qY8FD21GIPH9w5fp5oiAl7lqFzt3E3sCLD3IiVJmxbf
fUwpGd1XZBBSdIxysRLM6j48
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrTCCAjOgAwIBAgIQU+PAILXGkpoTcpF200VD/jAKBggqhkjOPQQDAzCBljEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMS8wLQYDVQQDDCZBbWF6
b24gUkRTIGFwLWVhc3QtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTAgFw0yMTA1MjUyMTQ1MTFaGA8yMTIxMDUyNTIyNDUxMVowgZYxCzAJBgNV
BAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYD
VQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1hem9uIFJE
UyBhcC1lYXN0LTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1NlYXR0bGUw
djAQBgcqhkjOPQIBBgUrgQQAIgNiAAT3tFKE8Kw1sGQAvNLlLhd8OcGhlc7MiW/s
NXm3pOiCT4vZpawKvHBzD76Kcv+ZZzHRxQEmG1/muDzZGlKR32h8AAj+NNO2Wy3d
CKTtYMiVF6Z2zjtuSkZQdjuQbe4eQ7qjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFAiSQOp16Vv0Ohpvqcbd2j5RmhYNMA4GA1UdDwEB/wQEAwIBhjAKBggq
hkjOPQQDAwNoADBlAjBVsi+5Ape0kOhMt/WFkANkslD4qXA5uqhrfAtH29Xzz2NV
tR7akiA771OaIGB/6xsCMQCZt2egCtbX7J0WkuZ2KivTh66jecJr5DHvAP4X2xtS
F/5pS+AUhcKTEGjI9jDH3ew=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICuDCCAj2gAwIBAgIQT5mGlavQzFHsB7hV6Mmy6TAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNDIwNTAxNVoYDzIxMjEwNTI0MjE1MDE1WjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEcm4BBBjYK7clwm0HJRWS
flt3iYwoJbIXiXn9c1y3E+Vb7bmuyKhS4eO8mwO4GefUcXObRfoHY2TZLhMJLVBQ
7MN2xDc0RtZNj07BbGD3VAIFRTDX0mH9UNYd0JQM3t/Oo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBRrd5ITedfAwrGo4FA9UaDaGFK3rjAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaQAwZgIxAPBNqmVv1IIA3EZyQ6XuVf4gj79/DMO8
bkicNS1EcBpUqbSuU4Zwt2BYc8c/t7KVOQIxAOHoWkoKZPiKyCxfMtJpCZySUG+n
sXgB/LOyWE5BJcXUfm+T1ckeNoWeUUMOLmnJjg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRAJcDeinvdNrDQBeJ8+t38WQwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtNCBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjIwNTI1MTY0OTE2WhgPMjA2MjA1MjUxNzQ5MTZa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtc291dGhlYXN0LTQgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
k8DBNkr9tMoIM0NHoFiO7cQfSX0cOMhEuk/CHt0fFx95IBytx7GHCnNzpM27O5z6
x6iRhfNnx+B6CrGyCzOjxvPizneY+h+9zfvNz9jj7L1I2uYMuiNyOKR6FkHR46CT
1CiArfVLLPaTqgD/rQjS0GL2sLHS/0dmYipzynnZcs613XT0rAWdYDYgxDq7r/Yi
Xge5AkWQFkMUq3nOYDLCyGGfQqWKkwv6lZUHLCDKf+Y0Uvsrj8YGCI1O8mF0qPCQ
lmlfaDvbuBu1AV+aabmkvyFj3b8KRIlNLEtQ4N8KGYR2Jdb82S4YUGIOAt4wuuFt
1B7AUDLk3V/u+HTWiwfoLQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBSNpcjz6ArWBtAA+Gz6kyyZxrrgdDAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAGJEd7UgOzHYIcQRSF7nSYyjLROyalaIV9AX4WXW/Cqlul1c
MblP5etDZm7A/thliZIWAuyqv2bNicmS3xKvNy6/QYi1YgxZyy/qwJ3NdFl067W0
t8nGo29B+EVK94IPjzFHWShuoktIgp+dmpijB7wkTIk8SmIoe9yuY4+hzgqk+bo4
ms2SOXSN1DoQ75Xv+YmztbnZM8MuWhL1T7hA4AMorzTQLJ9Pof8SpSdMHeDsHp0R
01jogNFkwy25nw7cL62nufSuH2fPYGWXyNDg+y42wKsKWYXLRgUQuDVEJ2OmTFMB
T0Vf7VuNijfIA9hkN2d3K53m/9z5WjGPSdOjGhg=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/jCCAuagAwIBAgIQRiwspKyrO0xoxDgSkqLZczANBgkqhkiG9w0BAQsFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIHVzLXdlc3QtMiBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTI0MjE1OTAwWhgPMjA2MTA1MjQyMjU5MDBaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgdXMtd2VzdC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL53Jk3GsKiu+4bx
jDfsevWbwPCNJ3H08Zp7GWhvI3Tgi39opfHYv2ku2BKFjK8N2L6RvNPSR8yplv5j
Y0tK0U+XVNl8o0ibhqRDhbTuh6KL8CFINWYzAajuxFS+CF0U6c1Q3tXLBdALxA7l
FlXJ71QrP06W31kRe7kvgrvO7qWU3/OzUf9qYw4LSiR1/VkvvRCTqcVNw09clw/M
Jbw6FSgweN65M9j7zPbjGAXSHkXyxH1Erin2fa+B9PE4ZDgX9cp2C1DHewYJQL/g
SepwwcudVNRN1ibKH7kpMrgPnaNIVNx5sXVsTjk6q2ZqYw3SVHegltJpLy/cZReP
mlivF2kCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUmTcQd6o1
CuS65MjBrMwQ9JJjmBwwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IB
AQAKSDSIzl956wVddPThf2VAzI8syw9ngSwsEHZvxVGHBvu5gg618rDyguVCYX9L
4Kw/xJrk6S3qxOS2ZDyBcOpsrBskgahDFIunzoRP3a18ARQVq55LVgfwSDQiunch
Bd05cnFGLoiLkR5rrkgYaP2ftn3gRBRaf0y0S3JXZ2XB3sMZxGxavYq9mfiEcwB0
LMTMQ1NYzahIeG6Jm3LqRqR8HkzP/Ztq4dT2AtSLvFebbNMiWqeqT7OcYp94HTYT
zqrtaVdUg9bwyAUCDgy0GV9RHDIdNAOInU/4LEETovrtuBU7Z1q4tcHXvN6Hd1H8
gMb0mCG5I393qW5hFsA/diFb
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRAPQAvihfjBg/JDbj6U64K98wDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMiBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTIwMTYyODQxWhgPMjA2MTA1MjAxNzI4NDFa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTIgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
vJ9lgyksCxkBlY40qOzI1TCj/Q0FVGuPL/Z1Mw2YN0l+41BDv0FHApjTUkIKOeIP
nwDwpXTa3NjYbk3cOZ/fpH2rYJ++Fte6PNDGPgKppVCUh6x3jiVZ1L7wOgnTdK1Q
Trw8440IDS5eLykRHvz8OmwvYDl0iIrt832V0QyOlHTGt6ZJ/aTQKl12Fy3QBLv7
stClPzvHTrgWqVU6uidSYoDtzHbU7Vda7YH0wD9IUoMBf7Tu0rqcE4uH47s2XYkc
SdLEoOg/Ngs7Y9B1y1GCyj3Ux7hnyvCoRTw014QyNB7dTatFMDvYlrRDGG14KeiU
UL7Vo/+EejWI31eXNLw84wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBQkgTWFsNg6wA3HbbihDQ4vpt1E2zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAGz1Asiw7hn5WYUj8RpOCzpE0h/oBZcnxP8wulzZ5Xd0YxWO
0jYUcUk3tTQy1QvoY+Q5aCjg6vFv+oFBAxkib/SmZzp4xLisZIGlzpJQuAgRkwWA
6BVMgRS+AaOMQ6wKPgz1x4v6T0cIELZEPq3piGxvvqkcLZKdCaeC3wCS6sxuafzZ
4qA3zMwWuLOzRftgX2hQto7d/2YkRXga7jSvQl3id/EI+xrYoH6zIWgjdU1AUaNq
NGT7DIo47vVMfnd9HFZNhREsd4GJE83I+JhTqIxiKPNxrKgESzyADmNPt0gXDnHo
tbV1pMZz5HpJtjnP/qVZhEK5oB0tqlKPv9yx074=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICuTCCAj6gAwIBAgIRAKp1Rn3aL/g/6oiHVIXtCq8wCgYIKoZIzj0EAwMwgZsx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE0MDIGA1UEAwwrQW1h
em9uIFJEUyBhcC1ub3J0aGVhc3QtMyBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MjQyMDMyMTdaGA8yMTIxMDUyNDIxMzIxN1owgZsx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE0MDIGA1UEAwwrQW1h
em9uIFJEUyBhcC1ub3J0aGVhc3QtMyBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGTYWPILeBJXfcL3Dz4z
EWMUq78xB1HpjBwHoTURYfcMd5r96BTVG6yaUBWnAVCMeeD6yTG9a1eVGNhG14Hk
ZAEjgLiNB7RRbEG5JZ/XV7W/vODh09WCst2y9SLKsdgeAaNCMEAwDwYDVR0TAQH/
BAUwAwEB/zAdBgNVHQ4EFgQUoE0qZHmDCDB+Bnm8GUa/evpfPwgwDgYDVR0PAQH/
BAQDAgGGMAoGCCqGSM49BAMDA2kAMGYCMQCnil5MMwhY3qoXv0xvcKZGxGPaBV15
0CCssCKn0oVtdJQfJQ3Jrf3RSaEyijXIJsoCMQC35iJi4cWoNX3N/qfgnHohW52O
B5dg0DYMqy5cNZ40+UcAanRMyqNQ6P7fy3umGco=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtzCCAj2gAwIBAgIQPXnDTPegvJrI98qz8WxrMjAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIEJldGEgdXMtZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxODIxNDAxMloYDzIxMjEwNTE4MjI0MDEyWjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIEJldGEgdXMtZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEI0sR7gwutK5AB46hM761
gcLTGBIYlURSEoM1jcBwy56CL+3CJKZwLLyJ7qoOKfWbu5GsVLUTWS8MV6Nw33cx
2KQD2svb694wi+Px2f4n9+XHkEFQw8BbiodDD7RZA70fo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBTQSioOvnVLEMXwNSDg+zgln/vAkjAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIxAMwu1hqm5Bc98uE/E0B5iMYbBQ4kpMxO
tP8FTfz5UR37HUn26nXE0puj6S/Ffj4oJgIwXI7s2c26tFQeqzq6u3lrNJHp5jC9
Uxlo/hEJOLoDj5jnpxo8dMAtCNoQPaHdfL0P
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjWgAwIBAgIQGKVv+5VuzEZEBzJ+bVfx2zAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGFwLXNvdXRoLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTE5MTc1MDU5WhgPMjEyMTA1MTkxODUwNTlaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgYXAtc291dGgtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABMqdLJ0tZF/DGFZTKZDrGRJZID8ivC2I
JRCYTWweZKCKSCAzoiuGGHzJhr5RlLHQf/QgmFcgXsdmO2n3CggzhA4tOD9Ip7Lk
P05eHd2UPInyPCHRgmGjGb0Z+RdQ6zkitKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUC1yhRgVqU5bR8cGzOUCIxRpl4EYwDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2cAMGQCMG0c/zLGECRPzGKJvYCkpFTCUvdP4J74YP0v/dPvKojL
t/BrR1Tg4xlfhaib7hPc7wIwFvgqHes20CubQnZmswbTKLUrgSUW4/lcKFpouFd2
t2/ewfi/0VhkeUW+IiHhOMdU
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCTCCA/GgAwIBAgIRAOXxJuyXVkbfhZCkS/dOpfEwDQYJKoZIhvcNAQEMBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTI1MjE1OTEwWhgPMjEyMTA1MjUyMjU5MTBa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
xiP4RDYm4tIS12hGgn1csfO8onQDmK5SZDswUpl0HIKXOUVVWkHNlINkVxbdqpqH
FhbyZmNN6F/EWopotMDKe1B+NLrjNQf4zefv2vyKvPHJXhxoKmfyuTd5Wk8k1F7I
lNwLQzznB+ElhrLIDJl9Ro8t31YBBNFRGAGEnxyACFGcdkjlsa52UwfYrwreEg2l
gW5AzqHgjFfj9QRLydeU/n4bHm0F1adMsV7P3rVwilcUlqsENDwXnWyPEyv3sw6F
wNemLEs1129mB77fwvySb+lLNGsnzr8w4wdioZ74co+T9z2ca+eUiP+EQccVw1Is
D4Fh57IjPa6Wuc4mwiUYKkKY63+38aCfEWb0Qoi+zW+mE9nek6MOQ914cN12u5LX
dBoYopphRO5YmubSN4xcBy405nIdSdbrAVWwxXnVVyjqjknmNeqQsPZaxAhdoKhV
AqxNr8AUAdOAO6Sz3MslmcLlDXFihrEEOeUbpg/m1mSUUHGbu966ajTG1FuEHHwS
7WB52yxoJo/tHvt9nAWnh3uH5BHmS8zn6s6CGweWKbX5yICnZ1QFR1e4pogxX39v
XD6YcNOO+Vn+HY4nXmjgSYVC7l+eeP8eduMg1xJujzjrbmrXU+d+cBObgdTOAlpa
JFHaGwYw1osAwPCo9cZ2f04yitBfj9aPFia8ASKldakCAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQUqKS+ltlior0SyZKYAkJ/efv55towDgYDVR0P
AQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQAdElvp8bW4B+Cv+1WSN87dg6TN
wGyIjJ14/QYURgyrZiYpUmZpj+/pJmprSWXu4KNyqHftmaidu7cdjL5nCAvAfnY5
/6eDDbX4j8Gt9fb/6H9y0O0dn3mUPSEKG0crR+JRFAtPhn/2FNvst2P82yguWLv0
pHjHVUVcq+HqDMtUIJsTPYjSh9Iy77Q6TOZKln9dyDOWJpCSkiUWQtMAKbCSlvzd
zTs/ahqpT+zLfGR1SR+T3snZHgQnbnemmz/XtlKl52NxccARwfcEEKaCRQyGq/pR
0PVZasyJS9JY4JfQs4YOdeOt4UMZ8BmW1+BQWGSkkb0QIRl8CszoKofucAlqdPcO
IT/ZaMVhI580LFGWiQIizWFskX6lqbCyHqJB3LDl8gJISB5vNTHOHpvpMOMs5PYt
cRl5Mrksx5MKMqG7y5R734nMlZxQIHjL5FOoOxTBp9KeWIL/Ib89T2QDaLw1SQ+w
ihqWBJ4ZdrIMWYpP3WqM+MXWk7WAem+xsFJdR+MDgOOuobVQTy5dGBlPks/6gpjm
rO9TjfQ36ppJ3b7LdKUPeRfnYmlR5RU4oyYJ//uLbClI443RZAgxaCXX/nyc12lr
eVLUMNF2abLX4/VF63m2/Z9ACgMRfqGshPssn1NN33OonrotQoj4S3N9ZrjvzKt8
iHcaqd60QKpfiH2A3A==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICuDCCAj2gAwIBAgIQPaVGRuu86nh/ylZVCLB0MzAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLW5vcnRoZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNTIyMDMxNloYDzIxMjEwNTI1MjMwMzE2WjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLW5vcnRoZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEexNURoB9KE93MEtEAlJG
obz4LS/pD2hc8Gczix1WhVvpJ8bN5zCDXaKdnDMCebetyRQsmQ2LYlfmCwpZwSDu
0zowB11Pt3I5Avu2EEcuKTlKIDMBeZ1WWuOd3Tf7MEAMo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBSaYbZPBvFLikSAjpa8mRJvyArMxzAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaQAwZgIxAOEJkuh3Zjb7Ih/zuNRd1RBqmIYcnyw0
nwUZczKXry+9XebYj3VQxSRNadrarPWVqgIxAMg1dyGoDAYjY/L/9YElyMnvHltO
PwpJShmqHvCLc/mXMgjjYb/akK7yGthvW6j/uQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQChu3v5W1Doil3v6pgRIcVzANBgkqhkiG9w0BAQwFADCB
nDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTUwMwYDVQQDDCxB
bWF6b24gUkRTIEJldGEgdXMtZWFzdC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4G
A1UEBwwHU2VhdHRsZTAgFw0yMTA1MTgyMTM0MTVaGA8yMTIxMDUxODIyMzQxNVow
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBCZXRhIHVzLWVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC1
FUGQ5tf3OwpDR6hGBxhUcrkwKZhaXP+1St1lSOQvjG8wXT3RkKzRGMvb7Ee0kzqI
mzKKe4ASIhtV3UUWdlNmP0EA3XKnif6N79MismTeGkDj75Yzp5A6tSvqByCgxIjK
JqpJrch3Dszoyn8+XhwDxMZtkUa5nQVdJgPzJ6ltsQ8E4SWLyLtTu0S63jJDkqYY
S7cQblk7y7fel+Vn+LS5dGTdRRhMvSzEnb6mkVBaVzRyVX90FNUED06e8q+gU8Ob
htvQlf9/kRzHwRAdls2YBhH40ZeyhpUC7vdtPwlmIyvW5CZ/QiG0yglixnL6xahL
pbmTuTSA/Oqz4UGQZv2WzHe1lD2gRHhtFX2poQZeNQX8wO9IcUhrH5XurW/G9Xwl
Sat9CMPERQn4KC3HSkat4ir2xaEUrjfg6c4XsGyh2Pk/LZ0gLKum0dyWYpWP4JmM
RQNjrInXPbMhzQObozCyFT7jYegS/3cppdyy+K1K7434wzQGLU1gYXDKFnXwkX8R
bRKgx2pHNbH5lUddjnNt75+e8m83ygSq/ZNBUz2Ur6W2s0pl6aBjwaDES4VfWYlI
jokcmrGvJNDfQWygb1k00eF2bzNeNCHwgWsuo3HSxVgc/WGsbcGrTlDKfz+g3ich
bXUeUidPhRiv5UQIVCLIHpHuin3bj9lQO/0t6p+tAQIDAQABo0IwQDAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBSFmMBgm5IsRv3hLrvDPIhcPweXYTAOBgNVHQ8B
Af8EBAMCAYYwDQYJKoZIhvcNAQEMBQADggIBAAa2EuozymOsQDJlEi7TqnyA2OhT
GXPfYqCyMJVkfrqNgcnsNpCAiNEiZbb+8sIPXnT8Ay8hrwJYEObJ5b7MHXpLuyft
z0Pu1oFLKnQxKjNxrIsCvaB4CRRdYjm1q7EqGhMGv76se9stOxkOqO9it31w/LoU
ENDk7GLsSqsV1OzYLhaH8t+MaNP6rZTSNuPrHwbV3CtBFl2TAZ7iKgKOhdFz1Hh9
Pez0lG+oKi4mHZ7ajov6PD0W7njn5KqzCAkJR6OYmlNVPjir+c/vUtEs0j+owsMl
g7KE5g4ZpTRShyh5BjCFRK2tv0tkqafzNtxrKC5XNpEkqqVTCnLcKG+OplIEadtr
C7UWf4HyhCiR+xIyxFyR05p3uY/QQU/5uza7GlK0J+U1sBUytx7BZ+Fo8KQfPPqV
CqDCaYUksoJcnJE/KeoksyqNQys7sDGJhkd0NeUGDrFLKHSLhIwAMbEWnqGxvhli
E7sP2E5rI/I9Y9zTbLIiI8pfeZlFF8DBdoP/Hzg8pqsiE/yiXSFTKByDwKzGwNqz
F0VoFdIZcIbLdDbzlQitgGpJtvEL7HseB0WH7B2PMMD8KPJlYvPveO3/6OLzCsav
+CAkvk47NQViKMsUTKOA0JDCW+u981YRozxa3K081snhSiSe83zIPBz1ikldXxO9
6YYLNPRrj3mi9T/f
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAMkvdFnVDb0mWWFiXqnKH68wCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyB1cy13ZXN0LTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTE5MTkxMzI0WhgPMjEyMTA1MTkyMDEzMjRaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgdXMtd2VzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEy86DB+9th/0A5VcWqMSWDxIUblWTt/R0
ao6Z2l3vf2YDF2wt1A2NIOGpfQ5+WAOJO/IQmnV9LhYo+kacB8sOnXdQa6biZZkR
IyouUfikVQAKWEJnh1Cuo5YMM4E2sUt5o0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBQ8u3OnecANmG8OoT7KLWDuFzZwBTAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIwQ817qkb7mWJFnieRAN+m9W3E0FLVKaV3zC5aYJUk2fcZ
TaUx3oLp3jPLGvY5+wgeAjEA6wAicAki4ZiDfxvAIuYiIe1OS/7H5RA++R8BH6qG
iRzUBM/FItFpnkus7u/eTkvo
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrzCCAjWgAwIBAgIQS/+Ryfgb/IOVEa1pWoe8oTAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGFwLXNvdXRoLTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjIwNjA2MjE1NDQyWhgPMjEyMjA2MDYyMjU0NDJaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgYXAtc291dGgtMiBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDsX6fhdUWBQpYTdseBD/P3s96Dtw2Iw
OrXKNToCnmX5nMkUGdRn9qKNiz1pw3EPzaPxShbYwQ7LYP09ENK/JN4QQjxMihxC
jLFxS85nhBQQQGRCWikDAe38mD8fSvREQKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUIh1xZiseQYFjPYKJmGbruAgRH+AwDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2gAMGUCMFudS4zLy+UUGrtgNLtRMcu/DZ9BUzV4NdHxo0bkG44O
thnjl4+wTKI6VbyAbj2rkgIxAOHps8NMITU5DpyiMnKTxV8ubb/WGHrLl0BjB8Lw
ETVJk5DNuZvsIIcm7ykk6iL4Tw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGBDCCA+ygAwIBAgIQDcEmNIAVrDpUw5cH5ynutDANBgkqhkiG9w0BAQwFADCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIG1lLWNlbnRyYWwtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNV
BAcMB1NlYXR0bGUwIBcNMjIwNTA3MDA0MDIzWhgPMjEyMjA1MDcwMTQwMjNaMIGa
MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j
LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt
YXpvbiBSRFMgbWUtY2VudHJhbC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKvADk8t
Fl9bFlU5sajLPPDSOUpPAkKs6iPlz+27o1GJC88THcOvf3x0nVAcu9WYe9Qaas+4
j4a0vv51agqyODRD/SNi2HnqW7DbtLPAm6KBHe4twl28ItB/JD5g7u1oPAHFoXMS
cH1CZEAs5RtlZGzJhcBXLFsHNv/7+SCLyZ7+2XFh9OrtgU4wMzkHoRNndhfwV5bu
17bPTwuH+VxH37zXf1mQ/KjhuJos0C9dL0FpjYBAuyZTAWhZKs8dpSe4DI544z4w
gkwUB4bC2nA1TBzsywEAHyNuZ/xRjNpWvx0ToWAA2iFJqC3VO3iKcnBplMvaUuMt
jwzVSNBnKcoabXCZL2XDLt4YTZR8FSwz05IvsmwcPB7uNTBXq3T9sjejW8QQK3vT
tzyfLq4jKmQE7PoS6cqYm+hEPm2hDaC/WP9bp3FdEJxZlPH26fq1b7BWYWhQ9pBA
Nv9zTnzdR1xohTyOJBUFQ81ybEzabqXqVXUIANqIOaNcTB09/sLJ7+zuMhp3mwBu
LtjfJv8PLuT1r63bU3seROhKA98b5KfzjvbvPSg3vws78JQyoYGbqNyDfyjVjg3U
v//AdVuPie6PNtdrW3upZY4Qti5IjP9e3kimaJ+KAtTgMRG56W0WxD3SP7+YGGbG
KhntDOkKsN39hLpn9UOafTIqFu7kIaueEy/NAgMBAAGjQjBAMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFHAems86dTwdZbLe8AaPy3kfIUVoMA4GA1UdDwEB/wQE
AwIBhjANBgkqhkiG9w0BAQwFAAOCAgEAOBHpp0ICx81kmeoBcZTrMdJs2gnhcd85
FoSCjXx9H5XE5rmN/lQcxxOgj8hr3uPuLdLHu+i6THAyzjrl2NA1FWiqpfeECGmy
0jm7iZsYORgGQYp/VKnDrwnKNSqlZvOuRr0kfUexwFlr34Y4VmupvEOK/RdGsd3S
+3hiemcHse9ST/sJLHx962AWMkN86UHPscJEe4+eT3f2Wyzg6La8ARwdWZSNS+WH
ZfybrncMmuiXuUdHv9XspPsqhKgtHhcYeXOGUtrwQPLe3+VJZ0LVxhlTWr9951GZ
GfmWwTV/9VsyKVaCFIXeQ6L+gjcKyEzYF8wpMtQlSc7FFqwgC4bKxvMBSaRy88Nr
lV2+tJD/fr8zGUeBK44Emon0HKDBWGX+/Hq1ZIv0Da0S+j6LbA4fusWxtGfuGha+
luhHgVInCpALIOamiBEdGhILkoTtx7JrYppt3/Raqg9gUNCOOYlCvGhqX7DXeEfL
DGabooiY2FNWot6h04JE9nqGj5QqT8D6t/TL1nzxhRPzbcSDIHUd/b5R+a0bAA+7
YTU6JqzEVCWKEIEynYmqikgLMGB/OzWsgyEL6822QW6hJAQ78XpbNeCzrICF4+GC
7KShLnwuWoWpAb26268lvOEvCTFM47VC6jNQl97md+2SA9Ma81C9wflid2M83Wle
cuLMVcQZceE=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQAhAteLRCvizAElaWORFU2zANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIG1lLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMDE3MDkxNloYDzIwNjEwNTIwMTgwOTE2WjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIG1lLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+qg7JAcOVKjh
N83SACnBFZPyB63EusfDr/0V9ZdL8lKcmZX9sv/CqoBo3N0EvBqHQqUUX6JvFb7F
XrMUZ740kr28gSRALfXTFgNODjXeDsCtEkKRTkac/UM8xXHn+hR7UFRPHS3e0GzI
iLiwQWDkr0Op74W8aM0CfaVKvh2bp4BI1jJbdDnQ9OKXpOxNHGUf0ZGb7TkNPkgI
b2CBAc8J5o3H9lfw4uiyvl6Fz5JoP+A+zPELAioYBXDrbE7wJeqQDJrETWqR9VEK
BXURCkVnHeaJy123MpAX2ozf4pqk0V0LOEOZRS29I+USF5DcWr7QIXR/w2I8ws1Q
7ys+qbE+kQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQFJ16n
1EcCMOIhoZs/F9sR+Jy++zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAOc5nXbT3XTDEZsxX2iD15YrQvmL5m13B3ImZWpx/pqmObsgx3/dg75rF2nQ
qS+Vl+f/HLh516pj2BPP/yWCq12TRYigGav8UH0qdT3CAClYy2o+zAzUJHm84oiB
ud+6pFVGkbqpsY+QMpJUbZWu52KViBpJMYsUEy+9cnPSFRVuRAHjYynSiLk2ZEjb
Wkdc4x0nOZR5tP0FgrX0Ve2KcjFwVQJVZLgOUqmFYQ/G0TIIGTNh9tcmR7yp+xJR
A2tbPV2Z6m9Yxx4E8lLEPNuoeouJ/GR4CkMEmF8cLwM310t174o3lKKUXJ4Vs2HO
Wj2uN6R9oI+jGLMSswTzCNV1vgc=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICuDCCAj6gAwIBAgIRAOocLeZWjYkG/EbHmscuy8gwCgYIKoZIzj0EAwMwgZsx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE0MDIGA1UEAwwrQW1h
em9uIFJEUyBhcC1zb3V0aGVhc3QtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MjEyMTUwMDFaGA8yMTIxMDUyMTIyNTAwMVowgZsx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE0MDIGA1UEAwwrQW1h
em9uIFJEUyBhcC1zb3V0aGVhc3QtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABCEr3jq1KtRncnZfK5cq
btY0nW6ZG3FMbh7XwBIR6Ca0f8llGZ4vJEC1pXgiM/4Dh045B9ZIzNrR54rYOIfa
2NcYZ7mk06DjIQML64hbAxbQzOAuNzLPx268MrlL2uW2XaNCMEAwDwYDVR0TAQH/
BAUwAwEB/zAdBgNVHQ4EFgQUln75pChychwN4RfHl+tOinMrfVowDgYDVR0PAQH/
BAQDAgGGMAoGCCqGSM49BAMDA2gAMGUCMGiyPINRU1mwZ4Crw01vpuPvxZxb2IOr
yX3RNlOIu4We1H+5dQk5tIvH8KGYFbWEpAIxAO9NZ6/j9osMhLgZ0yj0WVjb+uZx
YlZR9fyFisY/jNfX7QhSk+nrc3SFLRUNtpXrng==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBTCCAu2gAwIBAgIRAKiaRZatN8eiz9p0s0lu0rQwDQYJKoZIhvcNAQELBQAw
gZoxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEzMDEGA1UEAwwq
QW1hem9uIFJEUyBjYS1jZW50cmFsLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYD
VQQHDAdTZWF0dGxlMCAXDTIxMDUyMTIyMDIzNVoYDzIwNjEwNTIxMjMwMjM1WjCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGNhLWNlbnRyYWwtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNV
BAcMB1NlYXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCygVMf
qB865IR9qYRBRFHn4eAqGJOCFx+UbraQZmjr/mnRqSkY+nhbM7Pn/DWOrRnxoh+w
q5F9ZxdZ5D5T1v6kljVwxyfFgHItyyyIL0YS7e2h7cRRscCM+75kMedAP7icb4YN
LfWBqfKHbHIOqvvQK8T6+Emu/QlG2B5LvuErrop9K0KinhITekpVIO4HCN61cuOe
CADBKF/5uUJHwS9pWw3uUbpGUwsLBuhJzCY/OpJlDqC8Y9aToi2Ivl5u3/Q/sKjr
6AZb9lx4q3J2z7tJDrm5MHYwV74elGSXoeoG8nODUqjgklIWAPrt6lQ3WJpO2kug
8RhCdSbWkcXHfX95AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FOIxhqTPkKVqKBZvMWtKewKWDvDBMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0B
AQsFAAOCAQEAqoItII89lOl4TKvg0I1EinxafZLXIheLcdGCxpjRxlZ9QMQUN3yb
y/8uFKBL0otbQgJEoGhxm4h0tp54g28M6TN1U0332dwkjYxUNwvzrMaV5Na55I2Z
1hq4GB3NMXW+PvdtsgVOZbEN+zOyOZ5MvJHEQVkT3YRnf6avsdntltcRzHJ16pJc
Y8rR7yWwPXh1lPaPkxddrCtwayyGxNbNmRybjR48uHRhwu7v2WuAMdChL8H8bp89
TQLMrMHgSbZfee9hKhO4Zebelf1/cslRSrhkG0ESq6G5MUINj6lMg2g6F0F7Xz2v
ncD/vuRN5P+vT8th/oZ0Q2Gc68Pun0cn/g==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIRAJYlnmkGRj4ju/2jBQsnXJYwDQYJKoZIhvcNAQELBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyB1cy1lYXN0LTIgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMTIzMDQ0NFoYDzIwNjEwNTIyMDAwNDQ0WjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIHVzLWVhc3QtMiBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC74V3eigv+pCj5
nqDBqplY0Jp16pTeNB06IKbzb4MOTvNde6QjsZxrE1xUmprT8LxQqN9tI3aDYEYk
b9v4F99WtQVgCv3Y34tYKX9NwWQgwS1vQwnIR8zOFBYqsAsHEkeJuSqAB12AYUSd
Zv2RVFjiFmYJho2X30IrSLQfS/IE3KV7fCyMMm154+/K1Z2IJlcissydEAwgsUHw
edrE6CxJVkkJ3EvIgG4ugK/suxd8eEMztaQYJwSdN8TdfT59LFuSPl7zmF3fIBdJ
//WexcQmGabaJ7Xnx+6o2HTfkP8Zzzzaq8fvjAcvA7gyFH5EP26G2ZqMG+0y4pTx
SPVTrQEXAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFIWWuNEF
sUMOC82XlfJeqazzrkPDMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOC
AQEAgClmxcJaQTGpEZmjElL8G2Zc8lGc+ylGjiNlSIw8X25/bcLRptbDA90nuP+q
zXAMhEf0ccbdpwxG/P5a8JipmHgqQLHfpkvaXx+0CuP++3k+chAJ3Gk5XtY587jX
+MJfrPgjFt7vmMaKmynndf+NaIJAYczjhJj6xjPWmGrjM3MlTa9XesmelMwP3jep
bApIWAvCYVjGndbK9byyMq1nyj0TUzB8oJZQooaR3MMjHTmADuVBylWzkRMxbKPl
4Nlsk4Ef1JvIWBCzsMt+X17nuKfEatRfp3c9tbpGlAE/DSP0W2/Lnayxr4RpE9ds
ICF35uSis/7ZlsftODUe8wtpkQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/zCCA+egAwIBAgIRAPvvd+MCcp8E36lHziv0xhMwDQYJKoZIhvcNAQEMBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyB1cy1lYXN0LTIgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMTIzMTEwNloYDzIxMjEwNTIyMDAxMTA2WjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIHVzLWVhc3QtMiBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDbvwekKIKGcV/s
lDU96a71ZdN2pTYkev1X2e2/ICb765fw/i1jP9MwCzs8/xHBEQBJSxdfO4hPeNx3
ENi0zbM+TrMKliS1kFVe1trTTEaHYjF8BMK9yTY0VgSpWiGxGwg4tshezIA5lpu8
sF6XMRxosCEVCxD/44CFqGZTzZaREIvvFPDTXKJ6yOYnuEkhH3OcoOajHN2GEMMQ
ShuyRFDQvYkqOC/Q5icqFbKg7eGwfl4PmimdV7gOVsxSlw2s/0EeeIILXtHx22z3
8QBhX25Lrq2rMuaGcD3IOMBeBo2d//YuEtd9J+LGXL9AeOXHAwpvInywJKAtXTMq
Wsy3LjhuANFrzMlzjR2YdjkGVzeQVx3dKUzJ2//Qf7IXPSPaEGmcgbxuatxjnvfT
H85oeKr3udKnXm0Kh7CLXeqJB5ITsvxI+Qq2iXtYCc+goHNR01QJwtGDSzuIMj3K
f+YMrqBXZgYBwU2J/kCNTH31nfw96WTbOfNGwLwmVRDgguzFa+QzmQsJW4FTDMwc
7cIjwdElQQVA+Gqa67uWmyDKAnoTkudmgAP+OTBkhnmc6NJuZDcy6f/iWUdl0X0u
/tsfgXXR6ZovnHonM13ANiN7VmEVqFlEMa0VVmc09m+2FYjjlk8F9sC7Rc4wt214
7u5YvCiCsFZwx44baP5viyRZgkJVpQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBQgCZCsc34nVTRbWsniXBPjnUTQ2DAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQEMBQADggIBAAQas3x1G6OpsIvQeMS9BbiHG3+kU9P/ba6Rrg+E
lUz8TmL04Bcd+I+R0IyMBww4NznT+K60cFdk+1iSmT8Q55bpqRekyhcdWda1Qu0r
JiTi7zz+3w2v66akofOnGevDpo/ilXGvCUJiLOBnHIF0izUqzvfczaMZGJT6xzKq
PcEVRyAN1IHHf5KnGzUlVFv9SGy47xJ9I1vTk24JU0LWkSLzMMoxiUudVmHSqJtN
u0h+n/x3Q6XguZi1/C1KOntH56ewRh8n5AF7c+9LJJSRM9wunb0Dzl7BEy21Xe9q
03xRYjf5wn8eDELB8FZPa1PrNKXIOLYM9egdctbKEcpSsse060+tkyBrl507+SJT
04lvJ4tcKjZFqxn+bUkDQvXYj0D3WK+iJ7a8kZJPRvz8BDHfIqancY8Tgw+69SUn
WqIb+HNZqFuRs16WFSzlMksqzXv6wcDSyI7aZOmCGGEcYW9NHk8EuOnOQ+1UMT9C
Qb1GJcipjRzry3M4KN/t5vN3hIetB+/PhmgTO4gKhBETTEyPC3HC1QbdVfRndB6e
U/NF2U/t8U2GvD26TTFLK4pScW7gyw4FQyXWs8g8FS8f+R2yWajhtS9++VDJQKom
fAUISoCH+PlPRJpu/nHd1Zrddeiiis53rBaLbXu2J1Q3VqjWOmtj0HjxJJxWnYmz
Pqj2
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAI/U4z6+GF8/znpHM8Dq8G0wDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBhcC1zb3V0aC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMjA2MDYyMTQ4MThaGA8yMTIyMDYwNjIyNDgxOFowgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBhcC1zb3V0aC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK5WqMvyq888
3uuOtEj1FcP6iZhqO5kJurdJF59Otp2WCg+zv6I+QwaAspEWHQsKD405XfFsTGKV
SKTCwoMxwBniuChSmyhlagQGKSnRY9+znOWq0v7hgmJRwp6FqclTbubmr+K6lzPy
hs86mEp68O5TcOTYWUlPZDqfKwfNTbtCl5YDRr8Gxb5buHmkp6gUSgDkRsXiZ5VV
b3GBmXRqbnwo5ZRNAzQeM6ylXCn4jKs310lQGUrFbrJqlyxUdfxzqdlaIRn2X+HY
xRSYbHox3LVNPpJxYSBRvpQVFSy9xbX8d1v6OM8+xluB31cbLBtm08KqPFuqx+cO
I2H5F0CYqYzhyOSKJsiOEJT6/uH4ewryskZzncx9ae62SC+bB5n3aJLmOSTkKLFY
YS5IsmDT2m3iMgzsJNUKVoCx2zihAzgBanFFBsG+Xmoq0aKseZUI6vd2qpd5tUST
/wS1sNk0Ph7teWB2ACgbFE6etnJ6stwjHFZOj/iTYhlnR2zDRU8akunFdGb6CB4/
hMxGJxaqXSJeGtHm7FpadlUTf+2ESbYcVW+ui/F8sdBJseQdKZf3VdZZMgM0bcaX
NE47cauDTy72WdU9YJX/YXKYMLDE0iFHTnGpfVGsuWGPYhlwZ3dFIO07mWnCRM6X
u5JXRB1oy5n5HRluMsmpSN/R92MeBxKFAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFNtH0F0xfijSLHEyIkRGD9gW6NazMA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEACo+5jFeY3ygxoDDzL3xpfe5M0U1WxdKk+az4
/OfjZvkoma7WfChi3IIMtwtKLYC2/seKWA4KjlB3rlTsCVNPnK6D+gAnybcfTKk/
IRSPk92zagwQkSUWtAk80HpVfWJzpkSU16ejiajhedzOBRtg6BwsbSqLCDXb8hXr
eXWC1S9ZceGc+LcKRHewGWPu31JDhHE9bNcl9BFSAS0lYVZqxIRWxivZ+45j5uQv
wPrC8ggqsdU3K8quV6dblUQzzA8gKbXJpCzXZihkPrYpQHTH0szvXvgebh+CNUAG
rUxm8+yTS0NFI3U+RLbcLFVzSvjMOnEwCX0SPj5XZRYYXs5ajtQCoZhTUkkwpDV8
RxXk8qGKiXwUxDO8GRvmvM82IOiXz5w2jy/h7b7soyIgdYiUydMq4Ja4ogB/xPZa
gf4y0o+bremO15HFf1MkaU2UxPK5FFVUds05pKvpSIaQWbF5lw4LHHj4ZtVup7zF
CLjPWs4Hs/oUkxLMqQDw0FBwlqa4uot8ItT8uq5BFpz196ZZ+4WXw5PVzfSxZibI
C/nwcj0AS6qharXOs8yPnPFLPSZ7BbmWzFDgo3tpglRqo3LbSPsiZR+sLeivqydr
0w4RK1btRda5Ws88uZMmW7+2aufposMKcbAdrApDEAVzHijbB/nolS5nsnFPHZoA
KDPtFEk=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtzCCAj2gAwIBAgIQVZ5Y/KqjR4XLou8MCD5pOjAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC00IFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIyMDUyNTE2NTgzM1oYDzIxMjIwNTI1MTc1ODMzWjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC00IFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEbo473OmpD5vkckdJajXg
brhmNFyoSa0WCY1njuZC2zMFp3zP6rX4I1r3imrYnJd9pFH/aSiV/r6L5ACE5RPx
4qdg5SQ7JJUaZc3DWsTOiOed7BCZSzM+KTYK/2QzDMApo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBTmogc06+1knsej1ltKUOdWFvwgsjAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIxAIs7TlLMbGTWNXpGiKf9DxaM07d/iDHe
F/Vv/wyWSTGdobxBL6iArQNVXz0Gr4dvPAIwd0rsoa6R0x5mtvhdRPtM37FYrbHJ
pbV+OMusQqcSLseunLBoCHenvJW0QOCQ8EDY
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICvTCCAkOgAwIBAgIQCIY7E/bFvFN2lK9Kckb0dTAKBggqhkjOPQQDAzCBnjEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTcwNQYDVQQDDC5BbWF6
b24gUkRTIFByZXZpZXcgdXMtZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYD
VQQHDAdTZWF0dGxlMCAXDTIxMDUxODIxMDUxMFoYDzIxMjEwNTE4MjIwNTEwWjCB
njELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTcwNQYDVQQDDC5B
bWF6b24gUkRTIFByZXZpZXcgdXMtZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEMI0hzf1JCEOI
Eue4+DmcNnSs2i2UaJxHMrNGGfU7b42a7vwP53F7045ffHPBGP4jb9q02/bStZzd
VHqfcgqkSRI7beBKjD2mfz82hF/wJSITTgCLs+NRpS6zKMFOFHUNo0IwQDAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBS8uF/6hk5mPLH4qaWv9NVZaMmyTjAOBgNV
HQ8BAf8EBAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIxAO7Pu9wzLyM0X7Q08uLIL+vL
qaxe3UFuzFTWjM16MLJHbzLf1i9IDFKz+Q4hXCSiJwIwClMBsqT49BPUxVsJnjGr
EbyEk6aOOVfY1p2yQL649zh3M4h8okLnwf+bYIb1YpeU
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQY+JhwFEQTe36qyRlUlF8ozANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGFmLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE5MjQxNloYDzIwNjEwNTE5MjAyNDE2WjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGFmLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnIye77j6ev40
8wRPyN2OdKFSUfI9jB20Or2RLO+RDoL43+USXdrze0Wv4HMRLqaen9BcmCfaKMp0
E4SFo47bXK/O17r6G8eyq1sqnHE+v288mWtYH9lAlSamNFRF6YwA7zncmE/iKL8J
0vePHMHP/B6svw8LULZCk+nZk3tgxQn2+r0B4FOz+RmpkoVddfqqUPMbKUxhM2wf
fO7F6bJaUXDNMBPhCn/3ayKCjYr49ErmnpYV2ZVs1i34S+LFq39J7kyv6zAgbHv9
+/MtRMoRB1CjpqW0jIOZkHBdYcd1o9p1zFn591Do1wPkmMsWdjIYj+6e7UXcHvOB
2+ScIRAcnwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQGtq2W
YSyMMxpdQ3IZvcGE+nyZqTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAEgoP3ixJsKSD5FN8dQ01RNHERl/IFbA7TRXfwC+L1yFocKnQh4Mp/msPRSV
+OeHIvemPW/wtZDJzLTOFJ6eTolGekHK1GRTQ6ZqsWiU2fmiOP8ks4oSpI+tQ9Lw
VrfZqTiEcS5wEIqyfUAZZfKDo7W1xp+dQWzfczSBuZJZwI5iaha7+ILM0r8Ckden
TVTapc5pLSoO15v0ziRuQ2bT3V3nwu/U0MRK44z+VWOJdSiKxdnOYDs8hFNnKhfe
klbTZF7kW7WbiNYB43OaAQBJ6BALZsIskEaqfeZT8FD71uN928TcEQyBDXdZpRN+
iGQZDGhht0r0URGMDSs9waJtTfA=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/jCCA+agAwIBAgIQXY/dmS+72lZPranO2JM9jjANBgkqhkiG9w0BAQwFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIGFwLWVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTI1MjEzNDUxWhgPMjEyMTA1MjUyMjM0NTFaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgYXAtZWFzdC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMyW9kBJjD/hx8e8
b5E1sF42bp8TXsz1htSYE3Tl3T1Aq379DfEhB+xa/ASDZxt7/vwa81BkNo4M6HYq
okYIXeE7cu5SnSgjWXqcERhgPevtAwgmhdE3yREe8oz2DyOi2qKKZqah+1gpPaIQ
fK0uAqoeQlyHosye3KZZKkDHBatjBsQ5kf8lhuf7wVulEZVRHY2bP2X7N98PfbpL
QdH7mWXzDtJJ0LiwFwds47BrkgK1pkHx2p1mTo+HMkfX0P6Fq1atkVC2RHHtbB/X
iYyH7paaHBzviFrhr679zNqwXIOKlbf74w3mS11P76rFn9rS1BAH2Qm6eY5S/Fxe
HEKXm4kjPN63Zy0p3yE5EjPt54yPkvumOnT+RqDGJ2HCI9k8Ehcbve0ogfdRKNqQ
VHWYTy8V33ndQRHZlx/CuU1yN61TH4WSoMly1+q1ihTX9sApmlQ14B2pJi/9DnKW
cwECrPy1jAowC2UJ45RtC8UC05CbP9yrIy/7Noj8gQDiDOepm+6w1g6aNlWoiuQS
kyI6nzz1983GcnOHya73ga7otXo0Qfg9jPghlYiMomrgshlSLDHZG0Ib/3hb8cnR
1OcN9FpzNmVK2Ll1SmTMLrIhuCkyNYX9O/bOknbcf706XeESxGduSkHEjIw/k1+2
Atteoq5dT6cwjnJ9hyhiueVlVkiDAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8w
HQYDVR0OBBYEFLUI+DD7RJs+0nRnjcwIVWzzYSsFMA4GA1UdDwEB/wQEAwIBhjAN
BgkqhkiG9w0BAQwFAAOCAgEAb1mcCHv4qMQetLGTBH9IxsB2YUUhr5dda0D2BcHr
UtDbfd0VQs4tux6h/6iKwHPx0Ew8fuuYj99WknG0ffgJfNc5/fMspxR/pc1jpdyU
5zMQ+B9wi0lOZPO9uH7/pr+d2odcNEy8zAwqdv/ihsTwLmGP54is9fVbsgzNW1cm
HKAVL2t/Ope+3QnRiRilKCN1lzhav4HHdLlN401TcWRWKbEuxF/FgxSO2Hmx86pj
e726lweCTMmnq/cTsPOVY0WMjs0or3eHDVlyLgVeV5ldyN+ptg3Oit60T05SRa58
AJPTaVKIcGQ/gKkKZConpu7GDofT67P/ox0YNY57LRbhsx9r5UY4ROgz7WMQ1yoS
Y+19xizm+mBm2PyjMUbfwZUyCxsdKMwVdOq5/UmTmdms+TR8+m1uBHPOTQ2vKR0s
Pd/THSzPuu+d3dbzRyDSLQbHFFneG760CUlD/ZmzFlQjJ89/HmAmz8IyENq+Sjhx
Jgzy+FjVZb8aRUoYLlnffpUpej1n87Ynlr1GrvC4GsRpNpOHlwuf6WD4W0qUTsC/
C9JO+fBzUj/aWlJzNcLEW6pte1SB+EdkR2sZvWH+F88TxemeDrV0jKJw5R89CDf8
ZQNfkxJYjhns+YeV0moYjqQdc7tq4i04uggEQEtVzEhRLU5PE83nlh/K2NZZm8Kj
dIA=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIRAPVSMfFitmM5PhmbaOFoGfUwDQYJKoZIhvcNAQELBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyB1cy1lYXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNTIyMzQ1N1oYDzIwNjEwNTI1MjMzNDU3WjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIHVzLWVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDu9H7TBeGoDzMr
dxN6H8COntJX4IR6dbyhnj5qMD4xl/IWvp50lt0VpmMd+z2PNZzx8RazeGC5IniV
5nrLg0AKWRQ2A/lGGXbUrGXCSe09brMQCxWBSIYe1WZZ1iU1IJ/6Bp4D2YEHpXrW
bPkOq5x3YPcsoitgm1Xh8ygz6vb7PsvJvPbvRMnkDg5IqEThapPjmKb8ZJWyEFEE
QRrkCIRueB1EqQtJw0fvP4PKDlCJAKBEs/y049FoOqYpT3pRy0WKqPhWve+hScMd
6obq8kxTFy1IHACjHc51nrGII5Bt76/MpTWhnJIJrCnq1/Uc3Qs8IVeb+sLaFC8K
DI69Sw6bAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFE7PCopt
lyOgtXX0Y1lObBUxuKaCMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOC
AQEAFj+bX8gLmMNefr5jRJfHjrL3iuZCjf7YEZgn89pS4z8408mjj9z6Q5D1H7yS
jNETVV8QaJip1qyhh5gRzRaArgGAYvi2/r0zPsy+Tgf7v1KGL5Lh8NT8iCEGGXwF
g3Ir+Nl3e+9XUp0eyyzBIjHtjLBm6yy8rGk9p6OtFDQnKF5OxwbAgip42CD75r/q
p421maEDDvvRFR4D+99JZxgAYDBGqRRceUoe16qDzbMvlz0A9paCZFclxeftAxv6
QlR5rItMz/XdzpBJUpYhdzM0gCzAzdQuVO5tjJxmXhkSMcDP+8Q+Uv6FA9k2VpUV
E/O5jgpqUJJ2Hc/5rs9VkAPXeA==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrzCCAjWgAwIBAgIQW0yuFCle3uj4vWiGU0SaGzAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGFmLXNvdXRoLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTE5MTkzNTE2WhgPMjEyMTA1MTkyMDM1MTZaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgYWYtc291dGgtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDPiKNZSaXs3Un/J/v+LTsFDANHpi7en
oL2qh0u0DoqNzEBTbBjvO23bLN3k599zh6CY3HKW0r2k1yaIdbWqt4upMCRCcUFi
I4iedAmubgzh56wJdoMZztjXZRwDthTkJKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUWbYkcrvVSnAWPR5PJhIzppcAnZIwDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2gAMGUCMCESGqpat93CjrSEjE7z+Hbvz0psZTHwqaxuiH64GKUm
mYynIiwpKHyBrzjKBmeDoQIxANGrjIo6/b8Jl6sdIZQI18V0pAyLfLiZjlHVOnhM
MOTVgr82ZuPoEHTX78MxeMnYlw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRAIbsx8XOl0sgTNiCN4O+18QwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTI1MjE1NDU4WhgPMjA2MTA1MjUyMjU0NTha
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
tROxwXWCgn5R9gI/2Ivjzaxc0g95ysBjoJsnhPdJEHQb7w3y2kWrVWU3Y9fOitgb
CEsnEC3PrhRnzNVW0fPsK6kbvOeCmjvY30rdbxbc8h+bjXfGmIOgAkmoULEr6Hc7
G1Q/+tvv4lEwIs7bEaf+abSZxRJbZ0MBxhbHn7UHHDiMZYvzK+SV1MGCxx7JVhrm
xWu3GC1zZCsGDhB9YqY9eR6PmjbqA5wy8vqbC57dZZa1QVtWIQn3JaRXn+faIzHx
nLMN5CEWihsdmHBXhnRboXprE/OS4MFv1UrQF/XM/h5RBeCywpHePpC+Oe1T3LNC
iP8KzRFrjC1MX/WXJnmOVQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBS33XbXAUMs1znyZo4B0+B3D68WFTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBADuadd2EmlpueY2VlrIIPC30QkoA1EOSoCmZgN6124apkoY1
HiV4r+QNPljN4WP8gmcARnNkS7ZeR4fvWi8xPh5AxQCpiaBMw4gcbTMCuKDV68Pw
P2dZCTMspvR3CDfM35oXCufdtFnxyU6PAyINUqF/wyTHguO3owRFPz64+sk3r2pT
WHmJjG9E7V+KOh0s6REgD17Gqn6C5ijLchSrPUHB0wOIkeLJZndHxN/76h7+zhMt
fFeNxPWHY2MfpcaLjz4UREzZPSB2U9k+y3pW1omCIcl6MQU9itGx/LpQE+H3ZeX2
M2bdYd5L+ow+bdbGtsVKOuN+R9Dm17YpswF+vyQ=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAKlQ+3JX9yHXyjP/Ja6kZhkwDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBhcC1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MTkxNzQ1MjBaGA8yMTIxMDUxOTE4NDUyMFowgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBhcC1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKtahBrpUjQ6
H2mni05BAKU6Z5USPZeSKmBBJN3YgD17rJ93ikJxSgzJ+CupGy5rvYQ0xznJyiV0
91QeQN4P+G2MjGQR0RGeUuZcfcZitJro7iAg3UBvw8WIGkcDUg+MGVpRv/B7ry88
7E4OxKb8CPNoa+a9j6ABjOaaxaI22Bb7j3OJ+JyMICs6CU2bgkJaj3VUV9FCNUOc
h9PxD4jzT9yyGYm/sK9BAT1WOTPG8XQUkpcFqy/IerZDfiQkf1koiSd4s5VhBkUn
aQHOdri/stldT7a+HJFVyz2AXDGPDj+UBMOuLq0K6GAT6ThpkXCb2RIf4mdTy7ox
N5BaJ+ih+Ro3ZwPkok60egnt/RN98jgbm+WstgjJWuLqSNInnMUgkuqjyBWwePqX
Kib+wdpyx/LOzhKPEFpeMIvHQ3A0sjlulIjnh+j+itezD+dp0UNxMERlW4Bn/IlS
sYQVNfYutWkRPRLErXOZXtlxxkI98JWQtLjvGzQr+jywxTiw644FSLWdhKa6DtfU
2JWBHqQPJicMElfZpmfaHZjtXuCZNdZQXWg7onZYohe281ZrdFPOqC4rUq7gYamL
T+ZB+2P+YCPOLJ60bj/XSvcB7mesAdg8P0DNddPhHUFWx2dFqOs1HxIVB4FZVA9U
Ppbv4a484yxjTgG7zFZNqXHKTqze6rBBAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFCEAqjighncv/UnWzBjqu1Ka2Yb4MA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEAYyvumblckIXlohzi3QiShkZhqFzZultbFIu9
GhA5CDar1IFMhJ9vJpO9nUK/camKs1VQRs8ZsBbXa0GFUM2p8y2cgUfLwFULAiC/
sWETyW5lcX/xc4Pyf6dONhqFJt/ovVBxNZtcmMEWv/1D6Tf0nLeEb0P2i/pnSRR4
Oq99LVFjossXtyvtaq06OSiUUZ1zLPvV6AQINg8dWeBOWRcQYhYcEcC2wQ06KShZ
0ahuu7ar5Gym3vuLK6nH+eQrkUievVomN/LpASrYhK32joQ5ypIJej3sICIgJUEP
UoeswJ+Z16f3ECoL1OSnq4A0riiLj1ZGmVHNhM6m/gotKaHNMxsK9zsbqmuU6IT/
P6cR0S+vdigQG8ZNFf5vEyVNXhl8KcaJn6lMD/gMB2rY0qpaeTg4gPfU5wcg8S4Y
C9V//tw3hv0f2n+8kGNmqZrylOQDQWSSo8j8M2SRSXiwOHDoTASd1fyBEIqBAwzn
LvXVg8wQd1WlmM3b0Vrsbzltyh6y4SuKSkmgufYYvC07NknQO5vqvZcNoYbLNea3
76NkFaMHUekSbwVejZgG5HGwbaYBgNdJEdpbWlA3X4yGRVxknQSUyt4dZRnw/HrX
k8x6/wvtw7wht0/DOqz1li7baSsMazqxx+jDdSr1h9xML416Q4loFCLgqQhil8Jq
Em4Hy3A=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGBTCCA+2gAwIBAgIRAJfKe4Zh4aWNt3bv6ZjQwogwDQYJKoZIhvcNAQEMBQAw
gZoxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEzMDEGA1UEAwwq
QW1hem9uIFJEUyBjYS1jZW50cmFsLTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYD
VQQHDAdTZWF0dGxlMCAXDTIxMDUyMTIyMDg1M1oYDzIxMjEwNTIxMjMwODUzWjCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGNhLWNlbnRyYWwtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNV
BAcMB1NlYXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpgUH6
Crzd8cOw9prAh2rkQqAOx2vtuI7xX4tmBG4I/um28eBjyVmgwQ1fpq0Zg2nCKS54
Nn0pCmT7f3h6Bvopxn0J45AzXEtajFqXf92NQ3iPth95GVfAJSD7gk2LWMhpmID9
JGQyoGuDPg+hYyr292X6d0madzEktVVGO4mKTF989qEg+tY8+oN0U2fRTrqa2tZp
iYsmg350ynNopvntsJAfpCO/srwpsqHHLNFZ9jvhTU8uW90wgaKO9i31j/mHggCE
+CAOaJCM3g+L8DPl/2QKsb6UkBgaaIwKyRgKSj1IlgrK+OdCBCOgM9jjId4Tqo2j
ZIrrPBGl6fbn1+etZX+2/tf6tegz+yV0HHQRAcKCpaH8AXF44bny9andslBoNjGx
H6R/3ib4FhPrnBMElzZ5i4+eM/cuPC2huZMBXb/jKgRC/QN1Wm3/nah5FWq+yn+N
tiAF10Ga0BYzVhHDEwZzN7gn38bcY5yi/CjDUNpY0OzEe2+dpaBKPlXTaFfn9Nba
CBmXPRF0lLGGtPeTAgjcju+NEcVa82Ht1pqxyu2sDtbu3J5bxp4RKtj+ShwN8nut
Tkf5Ea9rSmHEY13fzgibZlQhXaiFSKA2ASUwgJP19Putm0XKlBCNSGCoECemewxL
+7Y8FszS4Uu4eaIwvXVqUEE2yf+4ex0hqQ1acQIDAQABo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBSeUnXIRxNbYsZLtKomIz4Y1nOZEzAOBgNVHQ8BAf8E
BAMCAYYwDQYJKoZIhvcNAQEMBQADggIBAIpRvxVS0dzoosBh/qw65ghPUGSbP2D4
dm6oYCv5g/zJr4fR7NzEbHOXX5aOQnHbQL4M/7veuOCLNPOW1uXwywMg6gY+dbKe
YtPVA1as8G9sUyadeXyGh2uXGsziMFXyaESwiAXZyiYyKChS3+g26/7jwECFo5vC
XGhWpIO7Hp35Yglp8AnwnEAo/PnuXgyt2nvyTSrxlEYa0jus6GZEZd77pa82U1JH
qFhIgmKPWWdvELA3+ra1nKnvpWM/xX0pnMznMej5B3RT3Y+k61+kWghJE81Ix78T
+tG4jSotgbaL53BhtQWBD1yzbbilqsGE1/DXPXzHVf9yD73fwh2tGWSaVInKYinr
a4tcrB3KDN/PFq0/w5/21lpZjVFyu/eiPj6DmWDuHW73XnRwZpHo/2OFkei5R7cT
rn/YdDD6c1dYtSw5YNnS6hdCQ3sOiB/xbPRN9VWJa6se79uZ9NLz6RMOr73DNnb2
bhIR9Gf7XAA5lYKqQk+A+stoKbIT0F65RnkxrXi/6vSiXfCh/bV6B41cf7MY/6YW
ehserSdjhQamv35rTFdM+foJwUKz1QN9n9KZhPxeRmwqPitAV79PloksOnX25ElN
SlyxdndIoA1wia1HRd26EFm2pqfZ2vtD2EjU3wD42CXX4H8fKVDna30nNFSYF0yn
jGKc3k6UNxpg
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/jCCA+agAwIBAgIQaRHaEqqacXN20e8zZJtmDDANBgkqhkiG9w0BAQwFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIHVzLWVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTI1MjIzODM1WhgPMjEyMTA1MjUyMzM4MzVaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgdXMtZWFzdC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAInfBCaHuvj6Rb5c
L5Wmn1jv2PHtEGMHm+7Z8dYosdwouG8VG2A+BCYCZfij9lIGszrTXkY4O7vnXgru
JUNdxh0Q3M83p4X+bg+gODUs3jf+Z3Oeq7nTOk/2UYvQLcxP4FEXILxDInbQFcIx
yen1ESHggGrjEodgn6nbKQNRfIhjhW+TKYaewfsVWH7EF2pfj+cjbJ6njjgZ0/M9
VZifJFBgat6XUTOf3jwHwkCBh7T6rDpgy19A61laImJCQhdTnHKvzTpxcxiLRh69
ZObypR7W04OAUmFS88V7IotlPmCL8xf7kwxG+gQfvx31+A9IDMsiTqJ1Cc4fYEKg
bL+Vo+2Ii4W2esCTGVYmHm73drznfeKwL+kmIC/Bq+DrZ+veTqKFYwSkpHRyJCEe
U4Zym6POqQ/4LBSKwDUhWLJIlq99bjKX+hNTJykB+Lbcx0ScOP4IAZQoxmDxGWxN
S+lQj+Cx2pwU3S/7+OxlRndZAX/FKgk7xSMkg88HykUZaZ/ozIiqJqSnGpgXCtED
oQ4OJw5ozAr+/wudOawaMwUWQl5asD8fuy/hl5S1nv9XxIc842QJOtJFxhyeMIXt
LVECVw/dPekhMjS3Zo3wwRgYbnKG7YXXT5WMxJEnHu8+cYpMiRClzq2BEP6/MtI2
AZQQUFu2yFjRGL2OZA6IYjxnXYiRAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8w
HQYDVR0OBBYEFADCcQCPX2HmkqQcmuHfiQ2jjqnrMA4GA1UdDwEB/wQEAwIBhjAN
BgkqhkiG9w0BAQwFAAOCAgEASXkGQ2eUmudIKPeOIF7RBryCoPmMOsqP0+1qxF8l
pGkwmrgNDGpmd9s0ArfIVBTc1jmpgB3oiRW9c6n2OmwBKL4UPuQ8O3KwSP0iD2sZ
KMXoMEyphCEzW1I2GRvYDugL3Z9MWrnHkoaoH2l8YyTYvszTvdgxBPpM2x4pSkp+
76d4/eRpJ5mVuQ93nC+YG0wXCxSq63hX4kyZgPxgCdAA+qgFfKIGyNqUIqWgeyTP
n5OgKaboYk2141Rf2hGMD3/hsGm0rrJh7g3C0ZirPws3eeJfulvAOIy2IZzqHUSY
jkFzraz6LEH3IlArT3jUPvWKqvh2lJWnnp56aqxBR7qHH5voD49UpJWY1K0BjGnS
OHcurpp0Yt/BIs4VZeWdCZwI7JaSeDcPMaMDBvND3Ia5Fga0thgYQTG6dE+N5fgF
z+hRaujXO2nb0LmddVyvE8prYlWRMuYFv+Co8hcMdJ0lEZlfVNu0jbm9/GmwAZ+l
9umeYO9yz/uC7edC8XJBglMAKUmVK9wNtOckUWAcCfnPWYLbYa/PqtXBYcxrso5j
iaS/A7iEW51uteHBGrViCy1afGG+hiUWwFlesli+Rq4dNstX3h6h2baWABaAxEVJ
y1RnTQSz6mROT1VmZSgSVO37rgIyY0Hf0872ogcTS+FfvXgBxCxsNWEbiQ/XXva4
0Ws=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtDCCAjqgAwIBAgIRAMyaTlVLN0ndGp4ffwKAfoMwCgYIKoZIzj0EAwMwgZkx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEyMDAGA1UEAwwpQW1h
em9uIFJEUyBtZS1jZW50cmFsLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjIwNTA3MDA0NDM3WhgPMjEyMjA1MDcwMTQ0MzdaMIGZMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMjAwBgNVBAMMKUFtYXpv
biBSRFMgbWUtY2VudHJhbC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE19nCV1nsI6CohSor13+B25cr
zg+IHdi9Y3L7ziQnHWI6yjBazvnKD+oC71aRRlR8b5YXsYGUQxWzPLHN7EGPcSGv
bzA9SLG1KQYCJaQ0m9Eg/iGrwKWOgylbhVw0bCxoo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MB0GA1UdDgQWBBS4KsknsJXM9+QPEkBdZxUPaLr11zAOBgNVHQ8BAf8EBAMC
AYYwCgYIKoZIzj0EAwMDaAAwZQIxAJaRgrYIEfXQMZQQDxMTYS0azpyWSseQooXo
L3nYq4OHGBgYyQ9gVjvRYWU85PXbfgIwdi82DtANQFkCu+j+BU0JBY/uRKPEeYzo
JG92igKIcXPqCoxIJ7lJbbzmuf73gQu5
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAJwCobx0Os8F7ihbJngxrR8wDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBtZS1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MjAxNzE1MzNaGA8yMTIxMDUyMDE4MTUzM1owgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBtZS1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANukKwlm+ZaI
Y5MkWGbEVLApEyLmlrHLEg8PfiiEa9ts7jssQcin3bzEPdTqGr5jo91ONoZ3ccWq
xJgg1W3bLu5CAO2CqIOXTXHRyCO/u0Ch1FGgWB8xETPSi3UHt/Vn1ltdO6DYdbDU
mYgwzYrvLBdRCwxsb9o+BuYQHVFzUYonqk/y9ujz3gotzFq7r55UwDTA1ita3vb4
eDKjIb4b1M4Wr81M23WHonpje+9qkkrAkdQcHrkgvSCV046xsq/6NctzwCUUNsgF
7Q1a8ut5qJEYpz5ta8vI1rqFqAMBqCbFjRYlmAoTTpFPOmzAVxV+YoqTrW5A16su
/2SXlMYfJ/n/ad/QfBNPPAAQMpyOr2RCL/YiL/PFZPs7NxYjnZHNWxMLSPgFyI+/
t2klnn5jR76KJK2qimmaXedB90EtFsMRUU1e4NxH9gDuyrihKPJ3aVnZ35mSipvR
/1KB8t8gtFXp/VQaz2sg8+uxPMKB81O37fL4zz6Mg5K8+aq3ejBiyHucpFGnsnVB
3kQWeD36ONkybngmgWoyPceuSWm1hQ0Z7VRAQX+KlxxSaHmSaIk1XxZu9h9riQHx
fMuev6KXjRn/CjCoUTn+7eFrt0dT5GryQEIZP+nA0oq0LKxogigHNZlwAT4flrqb
JUfZJrqgoce5HjZSXl10APbtPjJi0fW9AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFEfV+LztI29OVDRm0tqClP3NrmEWMA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEAvSNe+0wuk53KhWlRlRf2x/97H2Q76X3anzF0
5fOSVm022ldALzXMzqOfdnoKIhAu2oVKiHHKs7mMas+T6TL+Mkphx0CYEVxFE3PG
061q3CqJU+wMm9W9xsB79oB2XG47r1fIEywZZ3GaRsatAbjcNOT8uBaATPQAfJFN
zjFe4XyN+rA4cFrYNvfHTeu5ftrYmvks7JlRaJgEGWsz+qXux7uvaEEVPqEumd2H
uYeaRNOZ2V23R009X5lbgBFx9tq5VDTnKhQiTQ2SeT0rc1W3Dz5ik6SbQQNP3nSR
0Ywy7r/sZ3fcDyfFiqnrVY4Ympfvb4YW2PZ6OsQJbzH6xjdnTG2HtzEU30ngxdp1
WUEF4zt6rjJCp7QBUqXgdlHvJqYu6949qtWjEPiFN9uSsRV2i1YDjJqN52dLjAPn
AipJKo8x1PHTwUzuITqnB9BdP+5TlTl8biJfkEf/+08eWDTLlDHr2VrZLOLompTh
bS5OrhDmqA2Q+O+EWrTIhMflwwlCpR9QYM/Xwvlbad9H0FUHbJsCVNaru3wGOgWo
tt3dNSK9Lqnv/Ej9K9v6CRr36in4ylJKivhJ5B9E7ABHg7EpBJ1xi7O5eNDkNoJG
+pFyphJq3AkBR2U4ni2tUaTAtSW2tks7IaiDV+UMtqZyGabT5ISQfWLLtLHSWn2F
Tspdjbg=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRAJZFh4s9aZGzKaTMLrSb4acwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBCZXRhIHVzLWVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTE4MjEyODQxWhgPMjA2MTA1MTgyMjI4NDFa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgQmV0YSB1cy1lYXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
17i2yoU6diep+WrqxIn2CrDEO2NdJVwWTSckx4WMZlLpkQDoymSmkNHjq9ADIApD
A31Cx+843apL7wub8QkFZD0Tk7/ThdHWJOzcAM3ov98QBPQfOC1W5zYIIRP2F+vQ
TRETHQnLcW3rLv0NMk5oQvIKpJoC9ett6aeVrzu+4cU4DZVWYlJUoC/ljWzCluau
8blfW0Vwin6OB7s0HCG5/wijQWJBU5SrP/KAIPeQi1GqG5efbqAXDr/ple0Ipwyo
Xjjl73LenGUgqpANlC9EAT4i7FkJcllLPeK3NcOHjuUG0AccLv1lGsHAxZLgjk/x
z9ZcnVV9UFWZiyJTKxeKPwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBRWyMuZUo4gxCR3Luf9/bd2AqZ7CjAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAIqN2DlIKlvDFPO0QUZQVFbsi/tLdYM98/vvzBpttlTGVMyD
gJuQeHVz+MnhGIwoCGOlGU3OOUoIlLAut0+WG74qYczn43oA2gbMd7HoD7oL/IGg
njorBwJVcuuLv2G//SqM3nxGcLRtkRnQ+lvqPxMz9+0fKFUn6QcIDuF0QSfthLs2
WSiGEPKO9c9RSXdRQ4pXA7c3hXng8P4A2ZmdciPne5Nu4I4qLDGZYRrRLRkNTrOi
TyS6r2HNGUfgF7eOSeKt3NWL+mNChcYj71/Vycf5edeczpUgfnWy9WbPrK1svKyl
aAs2xg+X6O8qB+Mnj2dNBzm+lZIS3sIlm+nO9sg=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAPAlEk8VJPmEzVRRaWvTh2AwCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyB1cy1lYXN0LTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTI1MjI0MTU1WhgPMjEyMTA1MjUyMzQxNTVaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgdXMtZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEx5xjrup8II4HOJw15NTnS3H5yMrQGlbj
EDA5MMGnE9DmHp5dACIxmPXPMe/99nO7wNdl7G71OYPCgEvWm0FhdvVUeTb3LVnV
BnaXt32Ek7/oxGk1T+Df03C+W0vmuJ+wo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBTGXmqBWN/1tkSea4pNw0oHrjk2UDAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIxAIqqZWCSrIkZ7zsv/FygtAusW6yvlL935YAWYPVXU30m
jkMFLM+/RJ9GMvnO8jHfCgIwB+whlkcItzE9CRQ6CsMo/d5cEHDUu/QW6jSIh9BR
OGh9pTYPVkUbBiKPA7lVVhre
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/zCCA+egAwIBAgIRAJGY9kZITwfSRaAS/bSBOw8wDQYJKoZIhvcNAQEMBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBzYS1lYXN0LTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE4MTEyMFoYDzIxMjEwNTE5MTkxMTIwWjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIHNhLWVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDe2vlDp6Eo4WQi
Wi32YJOgdXHhxTFrLjB9SRy22DYoMaWfginJIwJcSR8yse8ZDQuoNhERB9LRggAE
eng23mhrfvtL1yQkMlZfBu4vG1nOb22XiPFzk7X2wqz/WigdYNBCqa1kK3jrLqPx
YUy7jk2oZle4GLVRTNGuMfcid6S2hs3UCdXfkJuM2z2wc3WUlvHoVNk37v2/jzR/
hSCHZv5YHAtzL/kLb/e64QkqxKll5QmKhyI6d7vt6Lr1C0zb+DmwxUoJhseAS0hI
dRk5DklMb4Aqpj6KN0ss0HAYqYERGRIQM7KKA4+hxDMUkJmt8KqWKZkAlCZgflzl
m8NZ31o2cvBzf6g+VFHx+6iVrSkohVQydkCxx7NJ743iPKsh8BytSM4qU7xx4OnD
H2yNXcypu+D5bZnVZr4Pywq0w0WqbTM2bpYthG9IC4JeVUvZ2mDc01lqOlbMeyfT
og5BRPLDXdZK8lapo7se2teh64cIfXtCmM2lDSwm1wnH2iSK+AWZVIM3iE45WSGc
vZ+drHfVgjJJ5u1YrMCWNL5C2utFbyF9Obw9ZAwm61MSbPQL9JwznhNlCh7F2ANW
ZHWQPNcOAJqzE4uVcJB1ZeVl28ORYY1668lx+s9yYeMXk3QQdj4xmdnvoBFggqRB
ZR6Z0D7ZohADXe024RzEo1TukrQgKQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBT7Vs4Y5uG/9aXnYGNMEs6ycPUT3jAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQEMBQADggIBACN4Htp2PvGcQA0/sAS+qUVWWJoAXSsu8Pgc6Gar
7tKVlNJ/4W/a6pUV2Xo/Tz3msg4yiE8sMESp2k+USosD5n9Alai5s5qpWDQjrqrh
76AGyF2nzve4kIN19GArYhm4Mz/EKEG1QHYvBDGgXi3kNvL/a2Zbybp+3LevG+q7
xtx4Sz9yIyMzuT/6Y7ijtiMZ9XbuxGf5wab8UtwT3Xq1UradJy0KCkzRJAz/Wy/X
HbTkEvKSaYKExH6sLo0jqdIjV/d2Io31gt4e0Ly1ER2wPyFa+pc/swu7HCzrN+iz
A2ZM4+KX9nBvFyfkHLix4rALg+WTYJa/dIsObXkdZ3z8qPf5A9PXlULiaa1mcP4+
rokw74IyLEYooQ8iSOjxumXhnkTS69MAdGzXYE5gnHokABtGD+BB5qLhtLt4fqAp
8AyHpQWMyV42M9SJLzQ+iOz7kAgJOBOaVtJI3FV/iAg/eqWVm3yLuUTWDxSHrKuL
N19+pSjF6TNvUSFXwEa2LJkfDqIOCE32iOuy85QY//3NsgrSQF6UkSPa95eJrSGI
3hTRYYh3Up2GhBGl1KUy7/o0k3KRZTk4s38fylY8bZ3TakUOH5iIGoHyFVVcp361
Pyy25SzFSmNalWoQd9wZVc/Cps2ldxhcttM+WLkFNzprd0VJa8qTz8vYtHP0ouDN
nWS0
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCTCCA/GgAwIBAgIRAOY7gfcBZgR2tqfBzMbFQCUwDQYJKoZIhvcNAQEMBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtNCBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjIwNTI1MTY1NDU5WhgPMjEyMjA1MjUxNzU0NTla
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtc291dGhlYXN0LTQgUm9vdCBDQSBSU0E0MDk2IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
lfxER43FuLRdL08bddF0YhbCP+XXKj1A/TFMXmd2My8XDei8rPXFYyyjMig9+xZw
uAsIxLwz8uiA26CKA8bCZKg5VG2kTeOJAfvBJaLv1CZefs3Z4Uf1Sjvm6MF2yqEj
GoORfyfL9HiZFTDuF/hcjWoKYCfMuG6M/wO8IbdICrX3n+BiYQJu/pFO660Mg3h/
8YBBWYDbHoCiH/vkqqJugQ5BM3OI5nsElW51P1icEEqti4AZ7JmtSv9t7fIFBVyR
oaEyOgpp0sm193F/cDJQdssvjoOnaubsSYm1ep3awZAUyGN/X8MBrPY95d0hLhfH
Ehc5Icyg+hsosBljlAyksmt4hFQ9iBnWIz/ZTfGMck+6p3HVL9RDgvluez+rWv59
8q7omUGsiPApy5PDdwI/Wt/KtC34/2sjslIJfvgifdAtkRPkhff1WEwER00ADrN9
eGGInaCpJfb1Rq8cV2n00jxg7DcEd65VR3dmIRb0bL+jWK62ni/WdEyomAOMfmGj
aWf78S/4rasHllWJ+QwnaUYY3u6N8Cgio0/ep4i34FxMXqMV3V0/qXdfhyabi/LM
wCxNo1Dwt+s6OtPJbwO92JL+829QAxydfmaMTeHBsgMPkG7RwAekeuatKGHNsc2Z
x2Q4C2wVvOGAhcHwxfM8JfZs3nDSZJndtVVnFlUY0UECAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQUpnG7mWazy6k97/tb5iduRB3RXgQwDgYDVR0P
AQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQCDLqq1Wwa9Tkuv7vxBnIeVvvFF
ecTn+P+wJxl9Qa2ortzqTHZsBDyJO62d04AgBwiDXkJ9a+bthgG0H1J7Xee8xqv1
xyX2yKj24ygHjspLotKP4eDMdDi5TYq+gdkbPmm9Q69B1+W6e049JVGXvWG8/7kU
igxeuCYwtCCdUPRLf6D8y+1XMGgVv3/DSOHWvTg3MJ1wJ3n3+eve3rjGdRYWZeJu
k21HLSZYzVrCtUsh2YAeLnUbSxVuT2Xr4JehYe9zW5HEQ8Je/OUfnCy9vzoN/ITw
osAH+EBJQey7RxEDqMwCaRefH0yeHFcnOll0OXg/urnQmwbEYzQ1uutJaBPsjU0J
Qf06sMxI7GiB5nPE+CnI2sM6A9AW9kvwexGXpNJiLxF8dvPQthpOKGcYu6BFvRmt
6ctfXd9b7JJoVqMWuf5cCY6ihpk1e9JTlAqu4Eb/7JNyGiGCR40iSLvV28un9wiE
plrdYxwcNYq851BEu3r3AyYWw/UW1AKJ5tM+/Gtok+AphMC9ywT66o/Kfu44mOWm
L3nSLSWEcgfUVgrikpnyGbUnGtgCmHiMlUtNVexcE7OtCIZoVAlCGKNu7tyuJf10
Qlk8oIIzfSIlcbHpOYoN79FkLoDNc2er4Gd+7w1oPQmdAB0jBJnA6t0OUBPKdDdE
Ufff2jrbfbzECn1ELg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQIuO1A8LOnmc7zZ/vMm3TrDANBgkqhkiG9w0BAQwFADCB
nDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTUwMwYDVQQDDCxB
bWF6b24gUkRTIGFwLXNvdXRoZWFzdC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4G
A1UEBwwHU2VhdHRsZTAgFw0yMTA1MjQyMDQ2MThaGA8yMTIxMDUyNDIxNDYxOFow
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMiBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDq
qRHKbG8ZK6/GkGm2cenznEF06yHwI1gD5sdsHjTgekDZ2Dl9RwtDmUH2zFuIQwGj
SeC7E2iKwrJRA5wYzL9/Vk8NOILEKQOP8OIKUHbc7q8rEtjs401KcU6pFBBEdO9G
CTiRhogq+8mhC13AM/UriZJbKhwgM2UaDOzAneGMhQAGjH8z83NsNcPxpYVE7tqM
sch5yLtIJLkJRusrmQQTeHUev16YNqyUa+LuFclFL0FzFCimkcxUhXlbfEKXbssS
yPzjiv8wokGyo7+gA0SueceMO2UjfGfute3HlXZDcNvBbkSY+ver41jPydyRD6Qq
oEkh0tyIbPoa3oU74kwipJtz6KBEA3u3iq61OUR0ENhR2NeP7CSKrC24SnQJZ/92
qxusrbyV/0w+U4m62ug/o4hWNK1lUcc2AqiBOvCSJ7qpdteTFxcEIzDwYfERDx6a
d9+3IPvzMb0ZCxBIIUFMxLTF7yAxI9s6KZBBXSZ6tDcCCYIgEysEPRWMRAcG+ye/
fZVn9Vnzsj4/2wchC2eQrYpb1QvG4eMXA4M5tFHKi+/8cOPiUzJRgwS222J8YuDj
yEBval874OzXk8H8Mj0JXJ/jH66WuxcBbh5K7Rp5oJn7yju9yqX6qubY8gVeMZ1i
u4oXCopefDqa35JplQNUXbWwSebi0qJ4EK0V8F9Q+QIDAQABo0IwQDAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBT4ysqCxaPe7y+g1KUIAenqu8PAgzAOBgNVHQ8B
Af8EBAMCAYYwDQYJKoZIhvcNAQEMBQADggIBALU8WN35KAjPZEX65tobtCDQFkIO
uJjv0alD7qLB0i9eY80C+kD87HKqdMDJv50a5fZdqOta8BrHutgFtDm+xo5F/1M3
u5/Vva5lV4xy5DqPajcF4Mw52czYBmeiLRTnyPJsU93EQIC2Bp4Egvb6LI4cMOgm
4pY2hL8DojOC5PXt4B1/7c1DNcJX3CMzHDm4SMwiv2MAxSuC/cbHXcWMk+qXdrVx
+ayLUSh8acaAOy3KLs1MVExJ6j9iFIGsDVsO4vr4ZNsYQiyHjp+L8ops6YVBO5AT
k/pI+axHIVsO5qiD4cFWvkGqmZ0gsVtgGUchZaacboyFsVmo6QPrl28l6LwxkIEv
GGJYvIBW8sfqtGRspjfX5TlNy5IgW/VOwGBdHHsvg/xpRo31PR3HOFw7uPBi7cAr
FiZRLJut7af98EB2UvovZnOh7uIEGPeecQWeOTQfJeWet2FqTzFYd0NUMgqPuJx1
vLKferP+ajAZLJvVnW1J7Vccx/pm0rMiUJEf0LRb/6XFxx7T2RGjJTi0EzXODTYI
gnLfBBjnolQqw+emf4pJ4pAtly0Gq1KoxTG2QN+wTd4lsCMjnelklFDjejwnl7Uy
vtxzRBAu/hi/AqDkDFf94m6j+edIrjbi9/JDFtQ9EDlyeqPgw0qwi2fwtJyMD45V
fejbXelUSJSzDIdY
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCTCCA/GgAwIBAgIRAN7Y9G9i4I+ZaslPobE7VL4wDQYJKoZIhvcNAQEMBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMiBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTIwMTYzMzIzWhgPMjEyMTA1MjAxNzMzMjNa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTIgUm9vdCBDQSBSU0E0MDk2IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
4BEPCiIfiK66Q/qa8k+eqf1Q3qsa6Xuu/fPkpuStXVBShhtXd3eqrM0iT4Xxs420
Va0vSB3oZ7l86P9zYfa60n6PzRxdYFckYX330aI7L/oFIdaodB/C9szvROI0oLG+
6RwmIF2zcprH0cTby8MiM7G3v9ykpq27g4WhDC1if2j8giOQL3oHpUaByekZNIHF
dIllsI3RkXmR3xmmxoOxJM1B9MZi7e1CvuVtTGOnSGpNCQiqofehTGwxCN2wFSK8
xysaWlw48G0VzZs7cbxoXMH9QbMpb4tpk0d+T8JfAPu6uWO9UwCLWWydf0CkmA/+
D50/xd1t33X9P4FEaPSg5lYbHXzSLWn7oLbrN2UqMLaQrkoEBg/VGvzmfN0mbflw
+T87bJ/VEOVNlG+gepyCTf89qIQVWOjuYMox4sK0PjzZGsYEuYiq1+OUT3vk/e5K
ag1fCcq2Isy4/iwB2xcXrsQ6ljwdk1fc+EmOnjGKrhuOHJY3S+RFv4ToQBsVyYhC
XGaC3EkqIX0xaCpDimxYhFjWhpDXAjG/zJ+hRLDAMCMhl/LPGRk/D1kzSbPmdjpl
lEMK5695PeBvEBTQdBQdOiYgOU3vWU6tzwwHfiM2/wgvess/q0FDAHfJhppbgbb9
3vgsIUcsvoC5o29JvMsUxsDRvsAfEmMSDGkJoA/X6GECAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQUgEWm1mZCbGD6ytbwk2UU1aLaOUUwDgYDVR0P
AQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQBb4+ABTGBGwxK1U/q4g8JDqTQM
1Wh8Oz8yAk4XtPJMAmCctxbd81cRnSnePWw/hxViLVtkZ/GsemvXfqAQyOn1coN7
QeYSw+ZOlu0j2jEJVynmgsR7nIRqE7QkCyZAU+d2FTJUfmee+IiBiGyFGgxz9n7A
JhBZ/eahBbiuoOik/APW2JWLh0xp0W0GznfJ8lAlaQTyDa8iDXmVtbJg9P9qzkvl
FgPXQttzEOyooF8Pb2LCZO4kUz+1sbU7tHdr2YE+SXxt6D3SBv+Yf0FlvyWLiqVk
GDEOlPPTDSjAWgKnqST8UJ0RDcZK/v1ixs7ayqQJU0GUQm1I7LGTErWXHMnCuHKe
UKYuiSZwmTcJ06NgdhcCnGZgPq13ryMDqxPeltQc3n5eO7f1cL9ERYLDLOzm6A9P
oQ3MfcVOsbHgGHZWaPSeNrQRN9xefqBXH0ZPasgcH9WJdsLlEjVUXoultaHOKx3b
UCCb+d3EfqF6pRT488ippOL6bk7zNubwhRa/+y4wjZtwe3kAX78ACJVcjPobH9jZ
ErySads5zdQeaoee5wRKdp3TOfvuCe4bwLRdhOLCHWzEcXzY3g/6+ppLvNom8o+h
Bh5X26G6KSfr9tqhQ3O9IcbARjnuPbvtJnoPY0gz3EHHGPhy0RNW8i2gl3nUp0ah
PtjwbKW0hYAhIttT0Q==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtzCCAj2gAwIBAgIQQRBQTs6Y3H1DDbpHGta3lzAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC0zIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDYxMTAwMTI0M1oYDzIxMjEwNjExMDExMjQzWjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC0zIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs0942Xj4m/gKA+WA6F5h
AHYuek9eGpzTRoLJddM4rEV1T3eSueytMVKOSlS3Ub9IhyQrH2D8EHsLYk9ktnGR
pATk0kCYTqFbB7onNo070lmMJmGT/Q7NgwC8cySChFxbo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBQ20iKBKiNkcbIZRu0y1uoF1yJTEzAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIwYv0wTSrpQTaPaarfLN8Xcqrqu3hzl07n
FrESIoRw6Cx77ZscFi2/MV6AFyjCV/TlAjEAhpwJ3tpzPXpThRML8DMJYZ3YgMh3
CMuLqhPpla3cL0PhybrD27hJWl29C4el6aMO
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrDCCAjOgAwIBAgIQGcztRyV40pyMKbNeSN+vXTAKBggqhkjOPQQDAzCBljEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMS8wLQYDVQQDDCZBbWF6
b24gUkRTIHVzLWVhc3QtMiBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTAgFw0yMTA1MjEyMzE1NTZaGA8yMTIxMDUyMjAwMTU1NlowgZYxCzAJBgNV
BAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYD
VQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1hem9uIFJE
UyB1cy1lYXN0LTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1NlYXR0bGUw
djAQBgcqhkjOPQIBBgUrgQQAIgNiAAQfDcv+GGRESD9wT+I5YIPRsD3L+/jsiIis
Tr7t9RSbFl+gYpO7ZbDXvNbV5UGOC5lMJo/SnqFRTC6vL06NF7qOHfig3XO8QnQz
6T5uhhrhnX2RSY3/10d2kTyHq3ZZg3+jQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFLDyD3PRyNXpvKHPYYxjHXWOgfPnMA4GA1UdDwEB/wQEAwIBhjAKBggq
hkjOPQQDAwNnADBkAjB20HQp6YL7CqYD82KaLGzgw305aUKw2aMrdkBR29J183jY
6Ocj9+Wcif9xnRMS+7oCMAvrt03rbh4SU9BohpRUcQ2Pjkh7RoY0jDR4Xq4qzjNr
5UFr3BXpFvACxXF51BksGQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjWgAwIBAgIQeKbS5zvtqDvRtwr5H48cAjAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIG1lLXNvdXRoLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTIwMTcxOTU1WhgPMjEyMTA1MjAxODE5NTVaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgbWUtc291dGgtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABEKjgUaAPmUlRMEQdBC7BScAGosJ1zRV
LDd38qTBjzgmwBfQJ5ZfGIvyEK5unB09MB4e/3qqK5I/L6Qn5Px/n5g4dq0c7MQZ
u7G9GBYm90U3WRJBf7lQrPStXaRnS4A/O6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUNKcAbGEIn03/vkwd8g6jNyiRdD4wDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2cAMGQCMHIeTrjenCSYuGC6txuBt/0ZwnM/ciO9kHGWVCoK8QLs
jGghb5/YSFGZbmQ6qpGlSAIwVOQgdFfTpEfe5i+Vs9frLJ4QKAfc27cTNYzRIM0I
E+AJgK4C4+DiyyMzOpiCfmvq
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQSFkEUzu9FYgC5dW+5lnTgjANBgkqhkiG9w0BAQwFADCB
nDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTUwMwYDVQQDDCxB
bWF6b24gUkRTIGFwLXNvdXRoZWFzdC0zIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4G
A1UEBwwHU2VhdHRsZTAgFw0yMTA2MTEwMDA4MzZaGA8yMTIxMDYxMTAxMDgzNlow
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMyBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDx
my5Qmd8zdwaI/KOKV9Xar9oNbhJP5ED0JCiigkuvCkg5qM36klszE8JhsUj40xpp
vQw9wkYW4y+C8twBpzKGBvakqMnoaVUV7lOCKx0RofrnNwkZCboTBB4X/GCZ3fIl
YTybS7Ehi1UuiaZspIT5A2jidoA8HiBPk+mTg1UUkoWS9h+MEAPa8L4DY6fGf4pO
J1Gk2cdePuNzzIrpm2yPto+I8MRROwZ3ha7ooyymOXKtz2c7jEHHJ314boCXAv9G
cdo27WiebewZkHHH7Zx9iTIVuuk2abyVSzvLVeGv7Nuy4lmSqa5clWYqWsGXxvZ2
0fZC5Gd+BDUMW1eSpW7QDTk3top6x/coNoWuLSfXiC5ZrJkIKimSp9iguULgpK7G
abMMN4PR+O+vhcB8E879hcwmS2yd3IwcPTl3QXxufqeSV58/h2ibkqb/W4Bvggf6
5JMHQPlPHOqMCVFIHP1IffIo+Of7clb30g9FD2j3F4qgV3OLwEDNg/zuO1DiAvH1
L+OnmGHkfbtYz+AVApkAZrxMWwoYrwpauyBusvSzwRE24vLTd2i80ZDH422QBLXG
rN7Zas8rwIiBKacJLYtBYETw8mfsNt8gb72aIQX6cZOsphqp6hUtKaiMTVgGazl7
tBXqbB+sIv3S9X6bM4cZJKkMJOXbnyCCLZFYv8TurwIDAQABo0IwQDAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBTOVtaS1b/lz6yJDvNk65vEastbQTAOBgNVHQ8B
Af8EBAMCAYYwDQYJKoZIhvcNAQEMBQADggIBABEONg+TmMZM/PrYGNAfB4S41zp1
3CVjslZswh/pC4kgXSf8cPJiUOzMwUevuFQj7tCqxQtJEygJM2IFg4ViInIah2kh
xlRakEGGw2dEVlxZAmmLWxlL1s1lN1565t5kgVwM0GVfwYM2xEvUaby6KDVJIkD3
aM6sFDBshvVA70qOggM6kU6mwTbivOROzfoIQDnVaT+LQjHqY/T+ok6IN0YXXCWl
Favai8RDjzLDFwXSRvgIK+1c49vlFFY4W9Efp7Z9tPSZU1TvWUcKdAtV8P2fPHAS
vAZ+g9JuNfeawhEibjXkwg6Z/yFUueQCQOs9TRXYogzp5CMMkfdNJF8byKYqHscs
UosIcETnHwqwban99u35sWcoDZPr6aBIrz7LGKTJrL8Nis8qHqnqQBXu/fsQEN8u
zJ2LBi8sievnzd0qI0kaWmg8GzZmYH1JCt1GXSqOFkI8FMy2bahP7TUQR1LBUKQ3
hrOSqldkhN+cSAOnvbQcFzLr+iEYEk34+NhcMIFVE+51KJ1n6+zISOinr6mI3ckX
6p2tmiCD4Shk2Xx/VTY/KGvQWKFcQApWezBSvDNlGe0yV71LtLf3dr1pr4ofo7cE
rYucCJ40bfxEU/fmzYdBF32xP7AOD9U0FbOR3Mcthc6Z6w20WFC+zru8FGY08gPf
WT1QcNdw7ntUJP/w
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrzCCAjWgAwIBAgIQARky6+5PNFRkFVOp3Ob1CTAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LXNvdXRoLTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjIwNTIzMTg0MTI4WhgPMjEyMjA1MjMxOTQxMjdaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgZXUtc291dGgtMiBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABNVGL5oF7cfIBxKyWd2PVK/S5yQfaJY3
QFHWvEdt6951n9JhiiPrHzfVHsxZp1CBjILRMzjgRbYWmc8qRoLkgGE7htGdwudJ
Fa/WuKzO574Prv4iZXUnVGTboC7JdvKbh6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUgDeIIEKynwUbNXApdIPnmRWieZwwDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2gAMGUCMEOOJfucrST+FxuqJkMZyCM3gWGZaB+/w6+XUAJC6hFM
uSTY0F44/bERkA4XhH+YGAIxAIpJQBakCA1/mXjsTnQ+0El9ty+LODp8ibkn031c
8DKDS7pR9UK7ZYdR6zFg3ZCjQw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjOgAwIBAgIQJvkWUcYLbnxtuwnyjMmntDAKBggqhkjOPQQDAzCBljEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMS8wLQYDVQQDDCZBbWF6
b24gUkRTIGV1LXdlc3QtMyBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTAgFw0yMTA1MjUyMjI2MTJaGA8yMTIxMDUyNTIzMjYxMlowgZYxCzAJBgNV
BAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYD
VQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1hem9uIFJE
UyBldS13ZXN0LTMgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1NlYXR0bGUw
djAQBgcqhkjOPQIBBgUrgQQAIgNiAARENn8uHCyjn1dFax4OeXxvbV861qsXFD9G
DshumTmFzWWHN/69WN/AOsxy9XN5S7Cgad4gQgeYYYgZ5taw+tFo/jQvCLY//uR5
uihcLuLJ78opvRPvD9kbWZ6oXfBtFkWjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFKiK3LpoF+gDnqPldGSwChBPCYciMA4GA1UdDwEB/wQEAwIBhjAKBggq
hkjOPQQDAwNpADBmAjEA+7qfvRlnvF1Aosyp9HzxxCbN7VKu+QXXPhLEBWa5oeWW
UOcifunf/IVLC4/FGCsLAjEAte1AYp+iJyOHDB8UYkhBE/1sxnFaTiEPbvQBU0wZ
SuwWVLhu2wWDuSW+K7tTuL8p
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIRAKeDpqX5WFCGNo94M4v69sUwDQYJKoZIhvcNAQELBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBldS13ZXN0LTMgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNTIyMTgzM1oYDzIwNjEwNTI1MjMxODMzWjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LXdlc3QtMyBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCcKOTEMTfzvs4H
WtJR8gI7GXN6xesulWtZPv21oT+fLGwJ+9Bv8ADCGDDrDxfeH/HxJmzG9hgVAzVn
4g97Bn7q07tGZM5pVi96/aNp11velZT7spOJKfJDZTlGns6DPdHmx48whpdO+dOb
6+eR0VwCIv+Vl1fWXgoACXYCoKjhxJs+R+fwY//0JJ1YG8yjZ+ghLCJmvlkOJmE1
TCPUyIENaEONd6T+FHGLVYRRxC2cPO65Jc4yQjsXvvQypoGgx7FwD5voNJnFMdyY
754JGPOOe/SZdepN7Tz7UEq8kn7NQSbhmCsgA/Hkjkchz96qN/YJ+H/okiQUTNB0
eG9ogiVFAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFjayw9Y
MjbxfF14XAhMM2VPl0PfMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOC
AQEAAtmx6d9+9CWlMoU0JCirtp4dSS41bBfb9Oor6GQ8WIr2LdfZLL6uES/ubJPE
1Sh5Vu/Zon5/MbqLMVrfniv3UpQIof37jKXsjZJFE1JVD/qQfRzG8AlBkYgHNEiS
VtD4lFxERmaCkY1tjKB4Dbd5hfhdrDy29618ZjbSP7NwAfnwb96jobCmMKgxVGiH
UqsLSiEBZ33b2hI7PJ6iTJnYBWGuiDnsWzKRmheA4nxwbmcQSfjbrNwa93w3caL2
v/4u54Kcasvcu3yFsUwJygt8z43jsGAemNZsS7GWESxVVlW93MJRn6M+MMakkl9L
tWaXdHZ+KUV7LhfYLb0ajvb40w==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBDCCAuygAwIBAgIQJ5oxPEjefCsaESSwrxk68DANBgkqhkiG9w0BAQsFADCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGV1LWNlbnRyYWwtMiBSb290IENBIFJTQTIwNDggRzExEDAOBgNV
BAcMB1NlYXR0bGUwIBcNMjIwNjA2MjExNzA1WhgPMjA2MjA2MDYyMjE3MDVaMIGa
MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j
LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt
YXpvbiBSRFMgZXUtY2VudHJhbC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALTQt5eX
g+VP3BjO9VBkWJhE0GfLrU/QIk32I6WvrnejayTrlup9H1z4QWlXF7GNJrqScRMY
KhJHlcP05aPsx1lYco6pdFOf42ybXyWHHJdShj4A5glU81GTT+VrXGzHSarLmtua
eozkQgPpDsSlPt0RefyTyel7r3Cq+5K/4vyjCTcIqbfgaGwTU36ffjM1LaPCuE4O
nINMeD6YuImt2hU/mFl20FZ+IZQUIFZZU7pxGLqTRz/PWcH8tDDxnkYg7tNuXOeN
JbTpXrw7St50/E9ZQ0llGS+MxJD8jGRAa/oL4G/cwnV8P2OEPVVkgN9xDDQeieo0
3xkzolkDkmeKOnUCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU
bwu8635iQGQMRanekesORM8Hkm4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
CwUAA4IBAQAgN6LE9mUgjsj6xGCX1afYE69fnmCjjb0rC6eEe1mb/QZNcyw4XBIW
6+zTXo4mjZ4ffoxb//R0/+vdTE7IvaLgfAZgFsLKJCtYDDstXZj8ujQnGR9Pig3R
W+LpNacvOOSJSawNQq0Xrlcu55AU4buyD5VjcICnfF1dqBMnGTnh27m/scd/ZMx/
kapHZ/fMoK2mAgSX/NvUKF3UkhT85vSSM2BTtET33DzCPDQTZQYxFBa4rFRmFi4c
BLlmIReiCGyh3eJhuUUuYAbK6wLaRyPsyEcIOLMQmZe1+gAFm1+1/q5Ke9ugBmjf
PbTWjsi/lfZ5CdVAhc5lmZj/l5aKqwaS
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAKKPTYKln9L4NTx9dpZGUjowCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyBldS13ZXN0LTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTIxMjI1NTIxWhgPMjEyMTA1MjEyMzU1MjFaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgZXUtd2VzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE/owTReDvaRqdmbtTzXbyRmEpKCETNj6O
hZMKH0F8oU9Tmn8RU7kQQj6xUKEyjLPrFBN7c+26TvrVO1KmJAvbc8bVliiJZMbc
C0yV5PtJTalvlMZA1NnciZuhxaxrzlK1o0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBT4i5HaoHtrs7Mi8auLhMbKM1XevDAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIxAK9A+8/lFdX4XJKgfP+ZLy5ySXC2E0Spoy12Gv2GdUEZ
p1G7c1KbWVlyb1d6subzkQIwKyH0Naf/3usWfftkmq8SzagicKz5cGcEUaULq4tO
GzA/AMpr63IDBAqkZbMDTCmH
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrzCCAjWgAwIBAgIQTgIvwTDuNWQo0Oe1sOPQEzAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LW5vcnRoLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTI0MjEwNjM4WhgPMjEyMTA1MjQyMjA2MzhaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgZXUtbm9ydGgtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJuzXLU8q6WwSKXBvx8BbdIi3mPhb7Xo
rNJBfuMW1XRj5BcKH1ZoGaDGw+BIIwyBJg8qNmCK8kqIb4cH8/Hbo3Y+xBJyoXq/
cuk8aPrxiNoRsKWwiDHCsVxaK9L7GhHHAqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUYgcsdU4fm5xtuqLNppkfTHM2QMYwDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2gAMGUCMQDz/Rm89+QJOWJecYAmYcBWCcETASyoK1kbr4vw7Hsg
7Ew3LpLeq4IRmTyuiTMl0gMCMAa0QSjfAnxBKGhAnYxcNJSntUyyMpaXzur43ec0
3D8npJghwC4DuICtKEkQiI5cSg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAORIGqQXLTcbbYT2upIsSnQwDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBldS1zb3V0aC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMjA1MjMxODM0MjJaGA8yMTIyMDUyMzE5MzQyMlowgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBldS1zb3V0aC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAPKukwsW2s/h
1k+Hf65pOP0knVBnOnMQyT1mopp2XHGdXznj9xS49S30jYoUnWccyXgD983A1bzu
w4fuJRHg4MFdz/NWTgXvy+zy0Roe83OPIJjUmXnnzwUHQcBa9vl6XUO65iQ3pbSi
fQfNDFXD8cvuXbkezeADoy+iFAlzhXTzV9MD44GTuo9Z3qAXNGHQCrgRSCL7uRYt
t1nfwboCbsVRnElopn2cTigyVXE62HzBUmAw1GTbAZeFAqCn5giBWYAfHwTUldRL
6eEa6atfsS2oPNus4ZENa1iQxXq7ft+pMdNt0qKXTCZiiCZjmLkY0V9kWwHTRRF8
r+75oSL//3di43QnuSCgjwMRIeWNtMud5jf3eQzSBci+9njb6DrrSUbx7blP0srg
94/C/fYOp/0/EHH34w99Th14VVuGWgDgKahT9/COychLOubXUT6vD1As47S9KxTv
yYleVKwJnF9cVjepODN72fNlEf74BwzgSIhUmhksmZSeJBabrjSUj3pdyo/iRZN/
CiYz9YPQ29eXHPQjBZVIUqWbOVfdwsx0/Xu5T1e7yyXByQ3/oDulahtcoKPAFQ3J
ee6NJK655MdS7pM9hJnU2Rzu3qZ/GkM6YK7xTlMXVouPUZov/VbiaCKbqYDs8Dg+
UKdeNXAT6+BMleGQzly1X7vjhgeA8ugVAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFJdaPwpCf78UolFTEn6GO85/QwUIMA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEAWkxHIT3mers5YnZRSVjmpxCLivGj1jMB9VYC
iKqTAeIvD0940L0YaZgivQll5pue8UUcQ6M2uCdVVAsNJdmQ5XHIYiGOknYPtxzO
aO+bnZp7VIZw/vJ49hvH6RreA2bbxYMZO/ossYdcWsWbOKHFrRmAw0AhtK/my51g
obV7eQg+WmlE5Iqc75ycUsoZdc3NimkjBi7LQoNP1HMvlLHlF71UZhQDdq+/WdV7
0zmg+epkki1LjgMmuPyb+xWuYkFKT1/faX+Xs62hIm5BY+aI4if4RuQ+J//0pOSs
UajrjTo+jLGB8A96jAe8HaFQenbwMjlaHRDAF0wvbkYrMr5a6EbneAB37V05QD0Y
Rh4L4RrSs9DX2hbSmS6iLDuPEjanHKzglF5ePEvnItbRvGGkynqDVlwF+Bqfnw8l
0i8Hr1f1/LP1c075UjkvsHlUnGgPbLqA0rDdcxF8Fdlv1BunUjX0pVlz10Ha5M6P
AdyWUOneOfaA5G7jjv7i9qg3r99JNs1/Lmyg/tV++gnWTAsSPFSSEte81kmPhlK3
2UtAO47nOdTtk+q4VIRAwY1MaOR7wTFZPfer1mWs4RhKNu/odp8urEY87iIzbMWT
QYO/4I6BGj9rEWNGncvR5XTowwIthMCj2KWKM3Z/JxvjVFylSf+s+FFfO1bNIm6h
u3UBpZI=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtDCCAjmgAwIBAgIQenQbcP/Zbj9JxvZ+jXbRnTAKBggqhkjOPQQDAzCBmTEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTIwMAYDVQQDDClBbWF6
b24gUkRTIGV1LWNlbnRyYWwtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwH
U2VhdHRsZTAgFw0yMTA1MjEyMjMzMjRaGA8yMTIxMDUyMTIzMzMyNFowgZkxCzAJ
BgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMw
EQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEyMDAGA1UEAwwpQW1hem9u
IFJEUyBldS1jZW50cmFsLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATlBHiEM9LoEb1Hdnd5j2VpCDOU
5nGuFoBD8ROUCkFLFh5mHrHfPXwBc63heW9WrP3qnDEm+UZEUvW7ROvtWCTPZdLz
Z4XaqgAlSqeE2VfUyZOZzBSgUUJk7OlznXfkCMOjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFDT/ThjQZl42Nv/4Z/7JYaPNMly2MA4GA1UdDwEB/wQEAwIB
hjAKBggqhkjOPQQDAwNpADBmAjEAnZWmSgpEbmq+oiCa13l5aGmxSlfp9h12Orvw
Dq/W5cENJz891QD0ufOsic5oGq1JAjEAp5kSJj0MxJBTHQze1Aa9gG4sjHBxXn98
4MP1VGsQuhfndNHQb4V0Au7OWnOeiobq
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIRAMgnyikWz46xY6yRgiYwZ3swDQYJKoZIhvcNAQELBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBldS13ZXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMDE2NDkxMloYDzIwNjEwNTIwMTc0OTEyWjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LXdlc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCi8JYOc9cYSgZH
gYPxLk6Xcc7HqzamvsnjYU98Dcb98y6iDqS46Ra2Ne02MITtU5MDL+qjxb8WGDZV
RUA9ZS69tkTO3gldW8QdiSh3J6hVNJQW81F0M7ZWgV0gB3n76WCmfT4IWos0AXHM
5v7M/M4tqVmCPViQnZb2kdVlM3/Xc9GInfSMCgNfwHPTXl+PXX+xCdNBePaP/A5C
5S0oK3HiXaKGQAy3K7VnaQaYdiv32XUatlM4K2WS4AMKt+2cw3hTCjlmqKRHvYFQ
veWCXAuc+U5PQDJ9SuxB1buFJZhT4VP3JagOuZbh5NWpIbOTxlAJOb5pGEDuJTKi
1gQQQVEFAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNXm+N87
OFxK9Af/bjSxDCiulGUzMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOC
AQEAkqIbkgZ45spvrgRQ6n9VKzDLvNg+WciLtmVrqyohwwJbj4pYvWwnKQCkVc7c
hUOSBmlSBa5REAPbH5o8bdt00FPRrD6BdXLXhaECKgjsHe1WW08nsequRKD8xVmc
8bEX6sw/utBeBV3mB+3Zv7ejYAbDFM4vnRsWtO+XqgReOgrl+cwdA6SNQT9oW3e5
rSQ+VaXgJtl9NhkiIysq9BeYigxqS/A13pHQp0COMwS8nz+kBPHhJTsajHCDc8F4
HfLi6cgs9G0gaRhT8FCH66OdGSqn196sE7Y3bPFFFs/3U+vxvmQgoZC6jegQXAg5
Prxd+VNXtNI/azitTysQPumH7A==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBTCCAu2gAwIBAgIRAO8bekN7rUReuNPG8pSTKtEwDQYJKoZIhvcNAQELBQAw
gZoxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEzMDEGA1UEAwwq
QW1hem9uIFJEUyBldS1jZW50cmFsLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYD
VQQHDAdTZWF0dGxlMCAXDTIxMDUyMTIyMjM0N1oYDzIwNjEwNTIxMjMyMzQ3WjCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGV1LWNlbnRyYWwtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNV
BAcMB1NlYXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCTTYds
Tray+Q9VA5j5jTh5TunHKFQzn68ZbOzdqaoi/Rq4ohfC0xdLrxCpfqn2TGDHN6Zi
2qGK1tWJZEd1H0trhzd9d1CtGK+3cjabUmz/TjSW/qBar7e9MA67/iJ74Gc+Ww43
A0xPNIWcL4aLrHaLm7sHgAO2UCKsrBUpxErOAACERScVYwPAfu79xeFcX7DmcX+e
lIqY16pQAvK2RIzrekSYfLFxwFq2hnlgKHaVgZ3keKP+nmXcXmRSHQYUUr72oYNZ
HcNYl2+gxCc9ccPEHM7xncVEKmb5cWEWvVoaysgQ+osi5f5aQdzgC2X2g2daKbyA
XL/z5FM9GHpS5BJjAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FBDAiJ7Py9/A9etNa/ebOnx5l5MGMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0B
AQsFAAOCAQEALMh/+81fFPdJV/RrJUeoUvFCGMp8iaANu97NpeJyKitNOv7RoeVP
WjivS0KcCqZaDBs+p6IZ0sLI5ZH098LDzzytcfZg0PsGqUAb8a0MiU/LfgDCI9Ee
jsOiwaFB8k0tfUJK32NPcIoQYApTMT2e26lPzYORSkfuntme2PTHUnuC7ikiQrZk
P+SZjWgRuMcp09JfRXyAYWIuix4Gy0eZ4rpRuaTK6mjAb1/LYoNK/iZ/gTeIqrNt
l70OWRsWW8jEmSyNTIubGK/gGGyfuZGSyqoRX6OKHESkP6SSulbIZHyJ5VZkgtXo
2XvyRyJ7w5pFyoofrL3Wv0UF8yt/GDszmg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/zCCA+egAwIBAgIRAMDk/F+rrhdn42SfE+ghPC8wDQYJKoZIhvcNAQEMBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBldS13ZXN0LTIgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMTIyNTEyMloYDzIxMjEwNTIxMjM1MTIyWjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LXdlc3QtMiBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2twMALVg9vRVu
VNqsr6N8thmp3Dy8jEGTsm3GCQ+C5P2YcGlD/T/5icfWW84uF7Sx3ezcGlvsqFMf
Ukj9sQyqtz7qfFFugyy7pa/eH9f48kWFHLbQYm9GEgbYBIrWMp1cy3vyxuMCwQN4
DCncqU+yNpy0CprQJEha3PzY+3yJOjDQtc3zr99lyECCFJTDUucxHzyQvX89eL74
uh8la0lKH3v9wPpnEoftbrwmm5jHNFdzj7uXUHUJ41N7af7z7QUfghIRhlBDiKtx
5lYZemPCXajTc3ryDKUZC/b+B6ViXZmAeMdmQoPE0jwyEp/uaUcdp+FlUQwCfsBk
ayPFEApTWgPiku2isjdeTVmEgL8bJTDUZ6FYFR7ZHcYAsDzcwHgIu3GGEMVRS3Uf
ILmioiyly9vcK4Sa01ondARmsi/I0s7pWpKflaekyv5boJKD/xqwz9lGejmJHelf
8Od2TyqJScMpB7Q8c2ROxBwqwB72jMCEvYigB+Wnbb8RipliqNflIGx938FRCzKL
UQUBmNAznR/yRRL0wHf9UAE/8v9a09uZABeiznzOFAl/frHpgdAbC00LkFlnwwgX
g8YfEFlkp4fLx5B7LtoO6uVNFVimLxtwirpyKoj3G4M/kvSTux8bTw0heBCmWmKR
57MS6k7ODzbv+Kpeht2hqVZCNFMxoQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBRuMnDhJjoj7DcKALj+HbxEqj3r6jAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQEMBQADggIBALSnXfx72C3ldhBP5kY4Mo2DDaGQ8FGpTOOiD95d
0rf7I9LrsBGVqu/Nir+kqqP80PB70+Jy9fHFFigXwcPBX3MpKGxK8Cel7kVf8t1B
4YD6A6bqlzP+OUL0uGWfZpdpDxwMDI2Flt4NEldHgXWPjvN1VblEKs0+kPnKowyg
jhRMgBbD/y+8yg0fIcjXUDTAw/+INcp21gWaMukKQr/8HswqC1yoqW9in2ijQkpK
2RB9vcQ0/gXR0oJUbZQx0jn0OH8Agt7yfMAnJAdnHO4M3gjvlJLzIC5/4aGrRXZl
JoZKfJ2fZRnrFMi0nhAYDeInoS+Rwx+QzaBk6fX5VPyCj8foZ0nmqvuYoydzD8W5
mMlycgxFqS+DUmO+liWllQC4/MnVBlHGB1Cu3wTj5kgOvNs/k+FW3GXGzD3+rpv0
QTLuwSbMr+MbEThxrSZRSXTCQzKfehyC+WZejgLb+8ylLJUA10e62o7H9PvCrwj+
ZDVmN7qj6amzvndCP98sZfX7CFZPLfcBd4wVIjHsFjSNEwWHOiFyLPPG7cdolGKA
lOFvonvo4A1uRc13/zFeP0Xi5n5OZ2go8aOOeGYdI2vB2sgH9R2IASH/jHmr0gvY
0dfBCcfXNgrS0toq0LX/y+5KkKOxh52vEYsJLdhqrveuZhQnsFEm/mFwjRXkyO7c
2jpC
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGADCCA+igAwIBAgIQYe0HgSuFFP9ivYM2vONTrTANBgkqhkiG9w0BAQwFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGV1LXNvdXRoLTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE4MzMyMVoYDzIxMjEwNTE5MTkzMzIxWjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGV1LXNvdXRoLTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAuO7QPKfPMTo2
POQWvzDLwi5f++X98hGjORI1zkN9kotCYH5pAzSBwBPoMNaIfedgmsIxGHj2fq5G
4oXagNhNuGP79Zl6uKW5H7S74W7aWM8C0s8zuxMOI4GZy5h2IfQk3m/3AzZEX5w8
UtNPkzo2feDVOkerHT+j+vjXgAxZ4wHnuMDcRT+K4r9EXlAH6X9b/RO0JlfEwmNz
xlqqGxocq9qRC66N6W0HF2fNEAKP84n8H80xcZBOBthQORRi8HSmKcPdmrvwCuPz
M+L+j18q6RAVaA0ABbD0jMWcTf0UvjUfBStn5mvu/wGlLjmmRkZsppUTRukfwqXK
yltUsTq0tOIgCIpne5zA4v+MebbR5JBnsvd4gdh5BI01QH470yB7BkUefZ9bobOm
OseAAVXcYFJKe4DAA6uLDrqOfFSxV+CzVvEp3IhLRaik4G5MwI/h2c/jEYDqkg2J
HMflxc2gcSMdk7E5ByLz5f6QrFfSDFk02ZJTs4ssbbUEYohht9znPMQEaWVqATWE
3n0VspqZyoBNkH/agE5GiGZ/k/QyeqzMNj+c9kr43Upu8DpLrz8v2uAp5xNj3YVg
ihaeD6GW8+PQoEjZ3mrCmH7uGLmHxh7Am59LfEyNrDn+8Rq95WvkmbyHSVxZnBmo
h/6O3Jk+0/QhIXZ2hryMflPcYWeRGH0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB
/zAdBgNVHQ4EFgQU2eFK7+R3x/me8roIBNxBrplkM6EwDgYDVR0PAQH/BAQDAgGG
MA0GCSqGSIb3DQEBDAUAA4ICAQB5gWFe5s7ObQFj1fTO9L6gYgtFhnwdmxU0q8Ke
HWCrdFmyXdC39qdAFOwM5/7fa9zKmiMrZvy9HNvCXEp4Z7z9mHhBmuqPZQx0qPgU
uLdP8wGRuWryzp3g2oqkX9t31Z0JnkbIdp7kfRT6ME4I4VQsaY5Y3mh+hIHOUvcy
p+98i3UuEIcwJnVAV9wTTzrWusZl9iaQ1nSYbmkX9bBssJ2GmtW+T+VS/1hJ/Q4f
AlE3dOQkLFoPPb3YRWBHr2n1LPIqMVwDNAuWavRA2dSfaLl+kzbn/dua7HTQU5D4
b2Fu2vLhGirwRJe+V7zdef+tI7sngXqjgObyOeG5O2BY3s+um6D4fS0Th3QchMO7
0+GwcIgSgcjIjlrt6/xJwJLE8cRkUUieYKq1C4McpZWTF30WnzOPUzRzLHkcNzNA
0A7sKMK6QoYWo5Rmo8zewUxUqzc9oQSrYADP7PEwGncLtFe+dlRFx+PA1a+lcIgo
1ZGfXigYtQ3VKkcknyYlJ+hN4eCMBHtD81xDy9iP2MLE41JhLnoB2rVEtewO5diF
7o95Mwl84VMkLhhHPeGKSKzEbBtYYBifHNct+Bst8dru8UumTltgfX6urH3DN+/8
JF+5h3U8oR2LL5y76cyeb+GWDXXy9zoQe2QvTyTy88LwZq1JzujYi2k8QiLLhFIf
FEv9Bg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICsDCCAjagAwIBAgIRAMgApnfGYPpK/fD0dbN2U4YwCgYIKoZIzj0EAwMwgZcx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwnQW1h
em9uIFJEUyBldS1zb3V0aC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMCAXDTIxMDUxOTE4MzgxMVoYDzIxMjEwNTE5MTkzODExWjCBlzELMAkG
A1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4xEzAR
BgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6b24g
UkRTIGV1LXNvdXRoLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1NlYXR0
bGUwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQfEWl6d4qSuIoECdZPp+39LaKsfsX7
THs3/RrtT0+h/jl3bjZ7Qc68k16x+HGcHbaayHfqD0LPdzH/kKtNSfQKqemdxDQh
Z4pwkixJu8T1VpXZ5zzCvBXCl75UqgEFS92jQjBAMA8GA1UdEwEB/wQFMAMBAf8w
HQYDVR0OBBYEFFPrSNtWS5JU+Tvi6ABV231XbjbEMA4GA1UdDwEB/wQEAwIBhjAK
BggqhkjOPQQDAwNoADBlAjEA+a7hF1IrNkBd2N/l7IQYAQw8chnRZDzh4wiGsZsC
6A83maaKFWUKIb3qZYXFSi02AjAbp3wxH3myAmF8WekDHhKcC2zDvyOiKLkg9Y6v
ZVmyMR043dscQbcsVoacOYv198c=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtDCCAjqgAwIBAgIRAPhVkIsQ51JFhD2kjFK5uAkwCgYIKoZIzj0EAwMwgZkx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEyMDAGA1UEAwwpQW1h
em9uIFJEUyBldS1jZW50cmFsLTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjIwNjA2MjEyOTE3WhgPMjEyMjA2MDYyMjI5MTdaMIGZMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMjAwBgNVBAMMKUFtYXpv
biBSRFMgZXUtY2VudHJhbC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEA5xnIEBtG5b2nmbj49UEwQza
yX0844fXjccYzZ8xCDUe9dS2XOUi0aZlGblgSe/3lwjg8fMcKXLObGGQfgIx1+5h
AIBjORis/dlyN5q/yH4U5sjS8tcR0GDGVHrsRUZCo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MB0GA1UdDgQWBBRK+lSGutXf4DkTjR3WNfv4+KeNFTAOBgNVHQ8BAf8EBAMC
AYYwCgYIKoZIzj0EAwMDaAAwZQIxAJ4NxQ1Gerqr70ZrnUqc62Vl8NNqTzInamCG
Kce3FTsMWbS9qkgrjZkO9QqOcGIw/gIwSLrwUT+PKr9+H9eHyGvpq9/3AIYSnFkb
Cf3dyWPiLKoAtLFwjzB/CkJlsAS1c8dS
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/jCCA+agAwIBAgIQGZH12Q7x41qIh9vDu9ikTjANBgkqhkiG9w0BAQwFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIGV1LXdlc3QtMyBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTI1MjIyMjMzWhgPMjEyMTA1MjUyMzIyMzNaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgZXUtd2VzdC0zIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMqE47sHXWzdpuqj
JHb+6jM9tDbQLDFnYjDWpq4VpLPZhb7xPNh9gnYYTPKG4avG421EblAHqzy9D2pN
1z90yKbIfUb/Sy2MhQbmZomsObhONEra06fJ0Dydyjswf1iYRp2kwpx5AgkVoNo7
3dlws73zFjD7ImKvUx2C7B75bhnw2pJWkFnGcswl8fZt9B5Yt95sFOKEz2MSJE91
kZlHtya19OUxZ/cSGci4MlOySzqzbGwUqGxEIDlY8I39VMwXaYQ8uXUN4G780VcL
u46FeyRGxZGz2n3hMc805WAA1V5uir87vuirTvoSVREET97HVRGVVNJJ/FM6GXr1
VKtptybbo81nefYJg9KBysxAa2Ao2x2ry/2ZxwhS6VZ6v1+90bpZA1BIYFEDXXn/
dW07HSCFnYSlgPtSc+Muh15mdr94LspYeDqNIierK9i4tB6ep7llJAnq0BU91fM2
JPeqyoTtc3m06QhLf68ccSxO4l8Hmq9kLSHO7UXgtdjfRVaffngopTNk8qK7bIb7
LrgkqhiQw/PRCZjUdyXL153/fUcsj9nFNe25gM4vcFYwH6c5trd2tUl31NTi1MfG
Mgp3d2dqxQBIYANkEjtBDMy3SqQLIo9EymqmVP8xx2A/gCBgaxvMAsI6FSWRoC7+
hqJ8XH4mFnXSHKtYMe6WPY+/XZgtAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8w
HQYDVR0OBBYEFIkXqTnllT/VJnI2NqipA4XV8rh1MA4GA1UdDwEB/wQEAwIBhjAN
BgkqhkiG9w0BAQwFAAOCAgEAKjSle8eenGeHgT8pltWCw/HzWyQruVKhfYIBfKJd
MhV4EnH5BK7LxBIvpXGsFUrb0ThzSw0fn0zoA9jBs3i/Sj6KyeZ9qUF6b8ycDXd+
wHonmJiQ7nk7UuMefaYAfs06vosgl1rI7eBHC0itexIQmKh0aX+821l4GEgEoSMf
loMFTLXv2w36fPHHCsZ67ODldgcZbKNnpCTX0YrCwEYO3Pz/L398btiRcWGrewrK
jdxAAyietra8DRno1Zl87685tfqc6HsL9v8rVw58clAo9XAQvT+fmSOFw/PogRZ7
OMHUat3gu/uQ1M5S64nkLLFsKu7jzudBuoNmcJysPlzIbqJ7vYc82OUGe9ucF3wi
3tbKQ983hdJiTExVRBLX/fYjPsGbG3JtPTv89eg2tjWHlPhCDMMxyRKl6isu2RTq
6VT489Z2zQrC33MYF8ZqO1NKjtyMAMIZwxVu4cGLkVsqFmEV2ScDHa5RadDyD3Ok
m+mqybhvEVm5tPgY6p0ILPMN3yvJsMSPSvuBXhO/X5ppNnpw9gnxpwbjQKNhkFaG
M5pkADZ14uRguOLM4VthSwUSEAr5VQYCFZhEwK+UOyJAGiB/nJz6IxL5XBNUXmRM
Hl8Xvz4riq48LMQbjcVQj0XvH941yPh+P8xOi00SGaQRaWp55Vyr4YKGbV0mEDz1
r1o=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/zCCA+egAwIBAgIRAKwYju1QWxUZpn6D1gOtwgQwDQYJKoZIhvcNAQEMBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBldS13ZXN0LTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMDE2NTM1NFoYDzIxMjEwNTIwMTc1MzU0WjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LXdlc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCKdBP1U4lqWWkc
Cb25/BKRTsvNVnISiKocva8GAzJyKfcGRa85gmgu41U+Hz6+39K+XkRfM0YS4BvQ
F1XxWT0bNyypuvwCvmYShSTjN1TY0ltncDddahTajE/4MdSOZb/c98u0yt03cH+G
hVwRyT50h0v/UEol50VfwcVAEZEgcQQYhf1IFUFlIvKpmDOqLuFakOnc7c9akK+i
ivST+JO1tgowbnNkn2iLlSSgUWgb1gjaOsNfysagv1RXdlyPw3EyfwkFifAQvF2P
Q0ayYZfYS640cccv7efM1MSVyFHR9PrrDsF/zr2S2sGPbeHr7R/HwLl+S5J/l9N9
y0rk6IHAWV4dEkOvgpnuJKURwA48iu1Hhi9e4moNS6eqoK2KmY3VFpuiyWcA73nH
GSmyaH+YuMrF7Fnuu7GEHZL/o6+F5cL3mj2SJJhL7sz0ryf5Cs5R4yN9BIEj/f49
wh84pM6nexoI0Q4wiSFCxWiBpjSmOK6h7z6+2utaB5p20XDZHhxAlmlx4vMuWtjh
XckgRFxc+ZpVMU3cAHUpVEoO49e/+qKEpPzp8Xg4cToKw2+AfTk3cmyyXQfGwXMQ
ZUHNZ3w9ILMWihGCM2aGUsLcGDRennvNmnmin/SENsOQ8Ku0/a3teEzwV9cmmdYz
5iYs1YtgPvKFobY6+T2RXXh+A5kprwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBSyUrsQVnKmA8z6/2Ech0rCvqpNmTAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQEMBQADggIBAFlj3IFmgiFz5lvTzFTRizhVofhTJsGr14Yfkuc7
UrXPuXOwJomd4uot2d/VIeGJpfnuS84qGdmQyGewGTJ9inatHsGZgHl9NHNWRwKZ
lTKTbBiq7aqgtUSFa06v202wpzU+1kadxJJePrbABxiXVfOmIW/a1a4hPNcT3syH
FIEg1+CGsp71UNjBuwg3JTKWna0sLSKcxLOSOvX1fzxK5djzVpEsvQMB4PSAzXca
vENgg2ErTwgTA+4s6rRtiBF9pAusN1QVuBahYP3ftrY6f3ycS4K65GnqscyfvKt5
YgjtEKO3ZeeX8NpubMbzC+0Z6tVKfPFk/9TXuJtwvVeqow0YMrLLyRiYvK7EzJ97
rrkxoKnHYQSZ+rH2tZ5SE392/rfk1PJL0cdHnkpDkUDO+8cKsFjjYKAQSNC52sKX
74AVh6wMwxYwVZZJf2/2XxkjMWWhKNejsZhUkTISSmiLs+qPe3L67IM7GyKm9/m6
R3r8x6NGjhTsKH64iYJg7AeKeax4b2e4hBb6GXFftyOs7unpEOIVkJJgM6gh3mwn
R7v4gwFbLKADKt1vHuerSZMiTuNTGhSfCeDM53XI/mjZl2HeuCKP1mCDLlaO+gZR
Q/G+E0sBKgEX4xTkAc3kgkuQGfExdGtnN2U2ehF80lBHB8+2y2E+xWWXih/ZyIcW
wOx+
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGBDCCA+ygAwIBAgIQM4C8g5iFRucSWdC8EdqHeDANBgkqhkiG9w0BAQwFADCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGV1LWNlbnRyYWwtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNV
BAcMB1NlYXR0bGUwIBcNMjEwNTIxMjIyODI2WhgPMjEyMTA1MjEyMzI4MjZaMIGa
MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j
LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt
YXpvbiBSRFMgZXUtY2VudHJhbC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANeTsD/u
6saPiY4Sg0GlJlMXMBltnrcGAEkwq34OKQ0bCXqcoNJ2rcAMmuFC5x9Ho1Y3YzB7
NO2GpIh6bZaO76GzSv4cnimcv9n/sQSYXsGbPD+bAtnN/RvNW1avt4C0q0/ghgF1
VFS8JihIrgPYIArAmDtGNEdl5PUrdi9y6QGggbRfidMDdxlRdZBe1C18ZdgERSEv
UgSTPRlVczONG5qcQkUGCH83MMqL5MKQiby/Br5ZyPq6rxQMwRnQ7tROuElzyYzL
7d6kke+PNzG1mYy4cbYdjebwANCtZ2qYRSUHAQsOgybRcSoarv2xqcjO9cEsDiRU
l97ToadGYa4VVERuTaNZxQwrld4mvzpyKuirqZltOqg0eoy8VUsaRPL3dc5aChR0
dSrBgRYmSAClcR2/2ZCWpXemikwgt031Dsc0A/+TmVurrsqszwbr0e5xqMow9LzO
MI/JtLd0VFtoOkL/7GG2tN8a+7gnLFxpv+AQ0DH5n4k/BY/IyS+H1erqSJhOTQ11
vDOFTM5YplB9hWV9fp5PRs54ILlHTlZLpWGs3I2BrJwzRtg/rOlvsosqcge9ryai
AKm2j+JBg5wJ19R8oxRy8cfrNTftZePpISaLTyV2B16w/GsSjqixjTQe9LRN2DHk
cC+HPqYyzW2a3pUVyTGHhW6a7YsPBs9yzt6hAgMBAAGjQjBAMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFIqA8QkOs2cSirOpCuKuOh9VDfJfMA4GA1UdDwEB/wQE
AwIBhjANBgkqhkiG9w0BAQwFAAOCAgEAOUI90mEIsa+vNJku0iUwdBMnHiO4gm7E
5JloP7JG0xUr7d0hypDorMM3zVDAL+aZRHsq8n934Cywj7qEp1304UF6538ByGdz
tkfacJsUSYfdlNJE9KbA4T+U+7SNhj9jvePpVjdQbhgzxITE9f8CxY/eM40yluJJ
PhbaWvOiRagzo74wttlcDerzLT6Y/JrVpWhnB7IY8HvzK+BwAdaCsBUPC3HF+kth
CIqLq7J3YArTToejWZAp5OOI6DLPM1MEudyoejL02w0jq0CChmZ5i55ElEMnapRX
7GQTARHmjgAOqa95FjbHEZzRPqZ72AtZAWKFcYFNk+grXSeWiDgPFOsq6mDg8DDB
0kfbYwKLFFCC9YFmYzR2YrWw2NxAScccUc2chOWAoSNHiqBbHR8ofrlJSWrtmKqd
YRCXzn8wqXnTS3NNHNccqJ6dN+iMr9NGnytw8zwwSchiev53Fpc1mGrJ7BKTWH0t
ZrA6m32wzpMymtKozlOPYoE5mtZEzrzHEXfa44Rns7XIHxVQSXVWyBHLtIsZOrvW
U5F41rQaFEpEeUQ7sQvqUoISfTUVRNDn6GK6YaccEhCji14APLFIvhRQUDyYMIiM
4vll0F/xgVRHTgDVQ8b8sxdhSYlqB4Wc2Ym41YRz+X2yPqk3typEZBpc4P5Tt1/N
89cEIGdbjsA=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQYjbPSg4+RNRD3zNxO1fuKDANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGV1LW5vcnRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNDIwNTkyMVoYDzIwNjEwNTI0MjE1OTIxWjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGV1LW5vcnRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA179eQHxcV0YL
XMkqEmhSBazHhnRVd8yICbMq82PitE3BZcnv1Z5Zs/oOgNmMkOKae4tCXO/41JCX
wAgbs/eWWi+nnCfpQ/FqbLPg0h3dqzAgeszQyNl9IzTzX4Nd7JFRBVJXPIIKzlRf
+GmFsAhi3rYgDgO27pz3ciahVSN+CuACIRYnA0K0s9lhYdddmrW/SYeWyoB7jPa2
LmWpAs7bDOgS4LlP2H3eFepBPgNufRytSQUVA8f58lsE5w25vNiUSnrdlvDrIU5n
Qwzc7NIZCx4qJpRbSKWrUtbyJriWfAkGU7i0IoainHLn0eHp9bWkwb9D+C/tMk1X
ERZw2PDGkwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSFmR7s
dAblusFN+xhf1ae0KUqhWTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAHsXOpjPMyH9lDhPM61zYdja1ebcMVgfUvsDvt+w0xKMKPhBzYDMs/cFOi1N
Q8LV79VNNfI2NuvFmGygcvTIR+4h0pqqZ+wjWl3Kk5jVxCrbHg3RBX02QLumKd/i
kwGcEtTUvTssn3SM8bgM0/1BDXgImZPC567ciLvWDo0s/Fe9dJJC3E0G7d/4s09n
OMdextcxFuWBZrBm/KK3QF0ByA8MG3//VXaGO9OIeeOJCpWn1G1PjT1UklYhkg61
EbsTiZVA2DLd1BGzfU4o4M5mo68l0msse/ndR1nEY6IywwpgIFue7+rEleDh6b9d
PYkG1rHVw2I0XDG4o17aOn5E94I=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQC6W4HFghUkkgyQw14a6JljANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGV1LXNvdXRoLTIgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIyMDUyMzE4MTYzMloYDzIwNjIwNTIzMTkxNjMyWjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGV1LXNvdXRoLTIgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiM/t4FV2R9Nx
UQG203UY83jInTa/6TMq0SPyg617FqYZxvz2kkx09x3dmxepUg9ttGMlPgjsRZM5
LCFEi1FWk+hxHzt7vAdhHES5tdjwds3aIkgNEillmRDVrUsbrDwufLaa+MMDO2E1
wQ/JYFXw16WBCCi2g1EtyQ2Xp+tZDX5IWOTnvhZpW8vVDptZ2AcJ5rMhfOYO3OsK
5EF0GGA5ldzuezP+BkrBYGJ4wVKGxeaq9+5AT8iVZrypjwRkD7Y5CurywK3+aBwm
s9Q5Nd8t45JCOUzYp92rFKsCriD86n/JnEvgDfdP6Hvtm0/DkwXK40Wz2q0Zrd0k
mjP054NRPwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRR7yqd
SfKcX2Q8GzhcVucReIpewTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAEszBRDwXcZyNm07VcFwI1Im94oKwKccuKYeJEsizTBsVon8VpEiMwDs+yGu
3p8kBhvkLwWybkD/vv6McH7T5b9jDX2DoOudqYnnaYeypsPH/00Vh3LvKagqzQza
orWLx+0tLo8xW4BtU+Wrn3JId8LvAhxyYXTn9bm+EwPcStp8xGLwu53OPD1RXYuy
uu+3ps/2piP7GVfou7H6PRaqbFHNfiGg6Y+WA0HGHiJzn8uLmrRJ5YRdIOOG9/xi
qTmAZloUNM7VNuurcMM2hWF494tQpsQ6ysg2qPjbBqzlGoOt3GfBTOZmqmwmqtam
K7juWM/mdMQAJ3SMlE5wI8nVdx4=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAL9SdzVPcpq7GOpvdGoM80IwCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyBldS13ZXN0LTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTIwMTY1ODA3WhgPMjEyMTA1MjAxNzU4MDdaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgZXUtd2VzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEJWDgXebvwjR+Ce+hxKOLbnsfN5W5dOlP
Zn8kwWnD+SLkU81Eac/BDJsXGrMk6jFD1vg16PEkoSevsuYWlC8xR6FmT6F6pmeh
fsMGOyJpfK4fyoEPhKeQoT23lFIc5Orjo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBSVNAN1CHAz0eZ77qz2adeqjm31TzAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIxAMlQeHbcjor49jqmcJ9gRLWdEWpXG8thIf6zfYQ/OEAg
d7GDh4fR/OUk0VfjsBUN/gIwZB0bGdXvK38s6AAE/9IT051cz/wMe9GIrX1MnL1T
1F5OqnXJdiwfZRRTHsRQ/L00
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGBDCCA+ygAwIBAgIQalr16vDfX4Rsr+gfQ4iVFDANBgkqhkiG9w0BAQwFADCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGV1LWNlbnRyYWwtMiBSb290IENBIFJTQTQwOTYgRzExEDAOBgNV
BAcMB1NlYXR0bGUwIBcNMjIwNjA2MjEyNTIzWhgPMjEyMjA2MDYyMjI1MjNaMIGa
MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j
LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt
YXpvbiBSRFMgZXUtY2VudHJhbC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANbHbFg7
2VhZor1YNtez0VlNFaobS3PwOMcEn45BE3y7HONnElIIWXGQa0811M8V2FnyqnE8
Z5aO1EuvijvWf/3D8DPZkdmAkIfh5hlZYY6Aatr65kEOckwIAm7ZZzrwFogYuaFC
z/q0CW+8gxNK+98H/zeFx+IxiVoPPPX6UlrLvn+R6XYNERyHMLNgoZbbS5gGHk43
KhENVv3AWCCcCc85O4rVd+DGb2vMVt6IzXdTQt6Kih28+RGph+WDwYmf+3txTYr8
xMcCBt1+whyCPlMbC+Yn/ivtCO4LRf0MPZDRQrqTTrFf0h/V0BGEUmMGwuKgmzf5
Kl9ILdWv6S956ioZin2WgAxhcn7+z//sN++zkqLreSf90Vgv+A7xPRqIpTdJ/nWG
JaAOUofBfsDsk4X4SUFE7xJa1FZAiu2lqB/E+y7jnWOvFRalzxVJ2Y+D/ZfUfrnK
4pfKtyD1C6ni1celrZrAwLrJ3PoXPSg4aJKh8+CHex477SRsGj8KP19FG8r0P5AG
8lS1V+enFCNvT5KqEBpDZ/Y5SQAhAYFUX+zH4/n4ql0l/emS+x23kSRrF+yMkB9q
lhC/fMk6Pi3tICBjrDQ8XAxv56hfud9w6+/ljYB2uQ1iUYtlE3JdIiuE+3ws26O8
i7PLMD9zQmo+sVi12pLHfBHQ6RRHtdVRXbXRAgMBAAGjQjBAMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFBFot08ipEL9ZUXCG4lagmF53C0/MA4GA1UdDwEB/wQE
AwIBhjANBgkqhkiG9w0BAQwFAAOCAgEAi2mcZi6cpaeqJ10xzMY0F3L2eOKYnlEQ
h6QyhmNKCUF05q5u+cok5KtznzqMwy7TFOZtbVHl8uUX+xvgq/MQCxqFAnuStBXm
gr2dg1h509ZwvTdk7TDxGdftvPCfnPNJBFbMSq4CZtNcOFBg9Rj8c3Yj+Qvwd56V
zWs65BUkDNJrXmxdvhJZjUkMa9vi/oFN+M84xXeZTaC5YDYNZZeW9706QqDbAVES
5ulvKLavB8waLI/lhRBK5/k0YykCMl0A8Togt8D1QsQ0eWWbIM8/HYJMPVFhJ8Wj
vT1p/YVeDA3Bo1iKDOttgC5vILf5Rw1ZEeDxjf/r8A7VS13D3OLjBmc31zxRTs3n
XvHKP9MieQHn9GE44tEYPjK3/yC6BDFzCBlvccYHmqGb+jvDEXEBXKzimdC9mcDl
f4BBQWGJBH5jkbU9p6iti19L/zHhz7qU6UJWbxY40w92L9jS9Utljh4A0LCTjlnR
NQUgjnGC6K+jkw8hj0LTC5Ip87oqoT9w7Av5EJ3VJ4hcnmNMXJJ1DkWYdnytcGpO
DMVITQzzDZRwhbitCVPHagTN2wdi9TEuYE33J0VmFeTc6FSI50wP2aOAZ0Q1/8Aj
bxeM5jS25eaHc2CQAuhrc/7GLnxOcPwdWQb2XWT8eHudhMnoRikVv/KSK3mf6om4
1YfpdH2jp30=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/jCCAuagAwIBAgIQTDc+UgTRtYO7ZGTQ8UWKDDANBgkqhkiG9w0BAQsFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIGV1LXdlc3QtMiBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTIxMjI0NjI0WhgPMjA2MTA1MjEyMzQ2MjRaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgZXUtd2VzdC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM1oGtthQ1YiVIC2
i4u4swMAGxAjc/BZp0yq0eP5ZQFaxnxs7zFAPabEWsrjeDzrRhdVO0h7zskrertP
gblGhfD20JfjvCHdP1RUhy/nzG+T+hn6Takan/GIgs8grlBMRHMgBYHW7tklhjaH
3F7LujhceAHhhgp6IOrpb6YTaTTaJbF3GTmkqxSJ3l1LtEoWz8Al/nL/Ftzxrtez
Vs6ebpvd7sw37sxmXBWX2OlvUrPCTmladw9OrllGXtCFw4YyLe3zozBlZ3cHzQ0q
lINhpRcajTMfZrsiGCkQtoJT+AqVJPS2sHjqsEH8yiySW9Jbq4zyMbM1yqQ2vnnx
MJgoYMcCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUaQG88UnV
JPTI+Pcti1P+q3H7pGYwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IB
AQBAkgr75V0sEJimC6QRiTVWEuj2Khy7unjSfudbM6zumhXEU2/sUaVLiYy6cA/x
3v0laDle6T07x9g64j5YastE/4jbzrGgIINFlY0JnaYmR3KZEjgi1s1fkRRf3llL
PJm9u4Q1mbwAMQK/ZjLuuRcL3uRIHJek18nRqT5h43GB26qXyvJqeYYpYfIjL9+/
YiZAbSRRZG+Li23cmPWrbA1CJY121SB+WybCbysbOXzhD3Sl2KSZRwSw4p2HrFtV
1Prk0dOBtZxCG9luf87ultuDZpfS0w6oNBAMXocgswk24ylcADkkFxBWW+7BETn1
EpK+t1Lm37mU4sxtuha00XAi
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQcY44/8NUvBwr6LlHfRy7KjANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGV1LXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE4MjcxOFoYDzIwNjEwNTE5MTkyNzE4WjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGV1LXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0UaBeC+Usalu
EtXnV7+PnH+gi7/71tI/jkKVGKuhD2JDVvqLVoqbMHRh3+wGMvqKCjbHPcC2XMWv
566fpAj4UZ9CLB5fVzss+QVNTl+FH2XhEzigopp+872ajsNzcZxrMkifxGb4i0U+
t0Zi+UrbL5tsfP2JonKR1crOrbS6/DlzHBjIiJazGOQcMsJjNuTOItLbMohLpraA
/nApa3kOvI7Ufool1/34MG0+wL3UUA4YkZ6oBJVxjZvvs6tI7Lzz/SnhK2widGdc
snbLqBpHNIZQSorVoiwcFaRBGYX/uzYkiw44Yfa4cK2V/B5zgu1Fbr0gbI2am4eh
yVYyg4jPawIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS9gM1m
IIjyh9O5H/7Vj0R/akI7UzAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAF0Sm9HC2AUyedBVnwgkVXMibnYChOzz7T+0Y+fOLXYAEXex2s8oqGeZdGYX
JHkjBn7JXu7LM+TpTbPbFFDoc1sgMguD/ls+8XsqAl1CssW+amryIL+jfcfbgQ+P
ICwEUD9hGdjBgJ5WcuS+qqxHsEIlFNci3HxcxfBa9VsWs5TjI7Vsl4meL5lf7ZyL
wDV7dHRuU+cImqG1MIvPRIlvPnT7EghrCYi2VCPhP2pM/UvShuwVnkz4MJ29ebIk
WR9kpblFxFdE92D5UUvMCjC2kmtgzNiErvTcwIvOO9YCbBHzRB1fFiWrXUHhJWq9
IkaxR5icb/IpAV0A1lYZEWMVsfQ=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAMa0TPL+QgbWfUPpYXQkf8wwDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBldS1ub3J0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MjQyMTAzMjBaGA8yMTIxMDUyNDIyMDMyMFowgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBldS1ub3J0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANhS9LJVJyWp
6Rudy9t47y6kzvgnFYDrvJVtgEK0vFn5ifdlHE7xqMz4LZqWBFTnS+3oidwVRqo7
tqsuuElsouStO8m315/YUzKZEPmkw8h5ufWt/lg3NTCoUZNkB4p4skr7TspyMUwE
VdlKQuWTCOLtofwmWT+BnFF3To6xTh3XPlT3ssancw27Gob8kJegD7E0TSMVsecP
B8je65+3b8CGwcD3QB3kCTGLy87tXuS2+07pncHvjMRMBdDQQQqhXWsRSeUNg0IP
xdHTWcuwMldYPWK5zus9M4dCNBDlmZjKdcZZVUOKeBBAm7Uo7CbJCk8r/Fvfr6mw
nXXDtuWhqn/WhJiI/y0QU27M+Hy5CQMxBwFsfAjJkByBpdXmyYxUgTmMpLf43p7H
oWfH1xN0cT0OQEVmAQjMakauow4AQLNkilV+X6uAAu3STQVFRSrpvMen9Xx3EPC3
G9flHueTa71bU65Xe8ZmEmFhGeFYHY0GrNPAFhq9RThPRY0IPyCZe0Th8uGejkek
jQjm0FHPOqs5jc8CD8eJs4jSEFt9lasFLVDcAhx0FkacLKQjGHvKAnnbRwhN/dF3
xt4oL8Z4JGPCLau056gKnYaEyviN7PgO+IFIVOVIdKEBu2ASGE8/+QJB5bcHefNj
04hEkDW0UYJbSfPpVbGAR0gFI/QpycKnAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFFMXvvjoaGGUcul8GA3FT05DLbZcMA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEAQLwFhd2JKn4K/6salLyIA4mP58qbA/9BTB/r
D9l0bEwDlVPSdY7R3gZCe6v7SWLfA9RjE5tdWDrQMi5IU6W2OVrVsZS/yGJfwnwe
a/9iUAYprA5QYKDg37h12XhVsDKlYCekHdC+qa5WwB1SL3YUprDLPWeaIQdg+Uh2
+LxvpZGoxoEbca0fc7flwq9ke/3sXt/3V4wJDyY6AL2YNdjFzC+FtYjHHx8rYxHs
aesP7yunuN17KcfOZBBnSFRrx96k+Xm95VReTEEpwiBqAECqEpMbd+R0mFAayMb1
cE77GaK5yeC2f67NLYGpkpIoPbO9p9rzoXLE5GpSizMjimnz6QCbXPFAFBDfSzim
u6azp40kEUO6kWd7rBhqRwLc43D3TtNWQYxMve5mTRG4Od+eMKwYZmQz89BQCeqm
aZiJP9y9uwJw4p/A5V3lYHTDQqzmbOyhGUk6OdpdE8HXs/1ep1xTT20QDYOx3Ekt
r4mmNYfH/8v9nHNRlYJOqFhmoh1i85IUl5IHhg6OT5ZTTwsGTSxvgQQXrmmHVrgZ
rZIqyBKllCgVeB9sMEsntn4bGLig7CS/N1y2mYdW/745yCLZv2gj0NXhPqgEIdVV
f9DhFD4ohE1C63XP0kOQee+LYg/MY5vH8swpCSWxQgX5icv5jVDz8YTdCKgUc5u8
rM2p0kk=
-----END CERTIFICATE-----
`]});var ZQ1=o((QQ1)=>{Object.defineProperty(QQ1,"__esModule",{value:!0});QQ1.proxies=void 0;QQ1.proxies=[`-----BEGIN CERTIFICATE-----
MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF
ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6
b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL
MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv
b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj
ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM
9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw
IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6
VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L
93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm
jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA
A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI
U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs
N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv
o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU
5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy
rqXRfboQnoZsG4q5WTP468SQvvG5
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwF
ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6
b24gUm9vdCBDQSAyMB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTEL
MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv
b3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK2Wny2cSkxK
gXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4kHbZ
W0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg
1dKmSYXpN+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K
8nu+NQWpEjTj82R0Yiw9AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r
2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvdfLC6HM783k81ds8P+HgfajZRRidhW+me
z/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAExkv8LV/SasrlX6avvDXbR
8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSSbtqDT6Zj
mUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz
7Mt0Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6
+XUyo05f7O0oYtlNc/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI
0u1ufm8/0i2BWSlmy5A5lREedCf+3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSwDPBMMPQFWAJI/TPlUq9LhONm
UjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oAA7CXDpO8Wqj2
LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY
+gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kS
k5Nrp+gvU5LEYFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl
7uxMMne0nxrpS10gxdr9HIcWxkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygm
btmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQgj9sAq+uEjonljYE1x2igGOpm/Hl
urR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbWaQbLU8uz/mtBzUF+
fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoVYh63
n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE
76KlXIx3KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H
9jVlpNMKVv/1F2Rs76giJUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT
4PsJYGw=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5
MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g
Um9vdCBDQSAzMB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG
A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg
Q0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZBf8ANm+gBG1bG8lKl
ui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjrZt6j
QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSr
ttvXBp43rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkr
BqWTrBqYaGFy+uGh0PsceGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteM
YyRIHN8wfdVoOw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5
MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g
Um9vdCBDQSA0MB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG
A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg
Q0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN/sGKe0uoe0ZLY7Bi
9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri83Bk
M6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB
/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WB
MAoGCCqGSM49BAMDA2gAMGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlw
CkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1AE47xDqUEpHJWEadIRNyp4iciuRMStuW
1KyLa2tJElMzrdfkviT8tQp21KW8EA==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx
EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs
ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD
VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy
ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy
dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p
OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2
8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K
Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe
hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk
6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw
DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q
AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI
bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB
ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z
qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn
0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN
sSi6
-----END CERTIFICATE-----
`]});var zQ1=o((HQ1,Kr)=>{Object.defineProperty(HQ1,"__esModule",{value:!0});var J86=JQ1(),KQ1=ZQ1(),Q86={ca:KQ1.proxies},UQ1={ca:[...J86.defaults,...KQ1.proxies]};Kr.exports=UQ1;Kr.exports.proxyBundle=Q86;Kr.exports.default=UQ1});var VQ1=o((Z86)=>{var W86=zQ1();Z86["Amazon RDS"]={ca:W86.ca}});var Eq=o((yz5,DQ1)=>{var{URL:U86}=L0("url"),AQ1=h2(),FQ1=PA(),{version:H86}=YQ1(),F30=null,z86={authPlugins:1,authSwitchHandler:1,bigNumberStrings:1,charset:1,charsetNumber:1,compress:1,connectAttributes:1,connectTimeout:1,database:1,dateStrings:1,debug:1,decimalNumbers:1,enableKeepAlive:1,flags:1,host:1,insecureAuth:1,infileStreamFactory:1,isServer:1,keepAliveInitialDelay:1,localAddress:1,maxPreparedStatements:1,multipleStatements:1,namedPlaceholders:1,nestTables:1,password:1,password1:1,password2:1,password3:1,passwordSha1:1,pool:1,port:1,queryFormat:1,rowsAsArray:1,socketPath:1,ssl:1,stream:1,stringifyObjects:1,supportBigNumbers:1,timezone:1,trace:1,typeCast:1,uri:1,user:1,disableEval:1,enableCleartextPlugin:1,connectionLimit:1,maxIdle:1,idleTimeout:1,Promise:1,queueLimit:1,resetOnRelease:1,waitForConnections:1,jsonStrings:1,gracefulEnd:1};class wA{constructor($){if(typeof $==="string")$=wA.parseUrl($);else if($&&$.uri){let X=wA.parseUrl($.uri);for(let G in X){if(!Object.prototype.hasOwnProperty.call(X,G))continue;if($[G])continue;$[G]=X[G]}}for(let X in $){if(!Object.prototype.hasOwnProperty.call($,X))continue;if(z86[X]!==1)console.error(`Ignoring invalid configuration option passed to Connection: ${X}. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection`)}if(this.isServer=$.isServer,this.stream=$.stream,this.host=$.host||"localhost",this.port=(typeof $.port==="string"?parseInt($.port,10):$.port)||3306,this.localAddress=$.localAddress,this.socketPath=$.socketPath,this.user=$.user||void 0,this.password=$.password||$.password1||void 0,this.password2=$.password2||void 0,this.password3=$.password3||void 0,this.passwordSha1=$.passwordSha1||void 0,this.database=$.database,this.connectTimeout=isNaN($.connectTimeout)?1e4:$.connectTimeout,this.insecureAuth=$.insecureAuth||!1,this.infileStreamFactory=$.infileStreamFactory||void 0,this.supportBigNumbers=$.supportBigNumbers||!1,this.bigNumberStrings=$.bigNumberStrings||!1,this.decimalNumbers=$.decimalNumbers||!1,this.dateStrings=$.dateStrings||!1,this.debug=$.debug,this.trace=$.trace!==!1,this.stringifyObjects=$.stringifyObjects||!1,this.enableKeepAlive=$.enableKeepAlive!==!1,this.keepAliveInitialDelay=$.keepAliveInitialDelay,$.timezone&&!/^(?:local|Z|[ +-]\d\d:\d\d)$/.test($.timezone))console.error(`Ignoring invalid timezone passed to Connection: ${$.timezone}. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection`),this.timezone="Z";else this.timezone=$.timezone||"local";if(this.queryFormat=$.queryFormat,this.pool=$.pool||void 0,this.ssl=typeof $.ssl==="string"?wA.getSSLProfile($.ssl):$.ssl||!1,this.multipleStatements=$.multipleStatements||!1,this.rowsAsArray=$.rowsAsArray||!1,this.namedPlaceholders=$.namedPlaceholders||!1,this.nestTables=$.nestTables===void 0?void 0:$.nestTables,this.typeCast=$.typeCast===void 0?!0:$.typeCast,this.disableEval=Boolean($.disableEval),this.enableCleartextPlugin=Boolean($.enableCleartextPlugin),this.timezone[0]===" ")this.timezone=`+${this.timezone.slice(1)}`;if(this.ssl){if(typeof this.ssl!=="object")throw TypeError(`SSL profile must be an object, instead it's a ${typeof this.ssl}`);this.ssl.rejectUnauthorized=this.ssl.rejectUnauthorized!==!1}this.maxPacketSize=0,this.charsetNumber=$.charset?wA.getCharsetNumber($.charset):$.charsetNumber||FQ1.UTF8MB4_UNICODE_CI,this.compress=$.compress||!1,this.authPlugins=$.authPlugins,this.authSwitchHandler=$.authSwitchHandler,this.clientFlags=wA.mergeFlags(wA.getDefaultFlags($),$.flags||"");let Y={_client_name:"Node-MySQL-2",_client_version:H86};this.connectAttributes={...Y,...$.connectAttributes||{}},this.maxPreparedStatements=$.maxPreparedStatements||16000,this.jsonStrings=$.jsonStrings||!1,this.gracefulEnd=$.gracefulEnd||!1}static mergeFlags($,Y){let X=0,G;if(!Array.isArray(Y))Y=String(Y||"").toUpperCase().split(/\s*,+\s*/);for(G in $){if(Y.indexOf(`-${$[G]}`)>=0)continue;X|=AQ1[$[G]]||0}for(G in Y){if(Y[G][0]==="-")continue;if($.indexOf(Y[G])>=0)continue;X|=AQ1[Y[G]]||0}return X}static getDefaultFlags($){let Y=["LONG_PASSWORD","FOUND_ROWS","LONG_FLAG","CONNECT_WITH_DB","ODBC","LOCAL_FILES","IGNORE_SPACE","PROTOCOL_41","IGNORE_SIGPIPE","TRANSACTIONS","RESERVED","SECURE_CONNECTION","MULTI_RESULTS","TRANSACTIONS","SESSION_TRACK","CONNECT_ATTRS","CLIENT_QUERY_ATTRIBUTES"];if($&&$.multipleStatements)Y.push("MULTI_STATEMENTS");return Y.push("PLUGIN_AUTH"),Y.push("PLUGIN_AUTH_LENENC_CLIENT_DATA"),Y}static getCharsetNumber($){let Y=FQ1[$.toUpperCase()];if(Y===void 0)throw TypeError(`Unknown charset '${$}'`);return Y}static getSSLProfile($){if(!F30)F30=VQ1();let Y=F30[$];if(Y===void 0)throw TypeError(`Unknown SSL profile '${$}'`);return Y}static parseUrl($){let Y=new U86($),X={host:decodeURIComponent(Y.hostname),port:parseInt(Y.port,10),database:decodeURIComponent(Y.pathname.slice(1)),user:decodeURIComponent(Y.username),password:decodeURIComponent(Y.password)};for(let[G,J]of Y.searchParams){if(G in X)continue;try{X[G]=JSON.parse(J)}catch{X[G]=J}}return X}}DQ1.exports=wA});var $v=o((NQ1)=>{Object.defineProperty(NQ1,"__esModule",{value:!0});NQ1.createLRU=void 0;var V86=($)=>{let{max:Y}=$;if(!(Number.isInteger(Y)&&Y>0))throw TypeError("`max` must be a positive integer");let X=0,G=0,J=0,Q=[],{onEviction:W}=$,Z=new Map,K=Array(Y).fill(void 0),H=Array(Y).fill(void 0),z=Array(Y).fill(0),V=Array(Y).fill(0),A=(L)=>{z[J]=L,V[L]=J,z[L]=0,J=L},F=(L)=>{if(L===J)return;let B=z[L],O=V[L];if(L===G)G=B;else z[O]=B;V[B]=O,A(L)},N=(L)=>{let B=J,O=Math.min(X,L),E=X-O,M=Array(O),R=Array(O);for(let q=0;q<E;q++){let w=K[G];W===null||W===void 0||W(w,H[G]),Z.delete(w),G=z[G]}for(let q=O-1;q>=0;q--)M[q]=K[B],R[q]=H[B],Z.set(K[B],q),B=V[B];G=0,J=O-1,X=O,K.length=L,H.length=L,z.length=L,V.length=L;for(let q=0;q<O;q++)K[q]=M[q],H[q]=R[q],z[q]=q+1,V[q]=q-1;Q=[];for(let q=O;q<L;q++)Q.push(q)},D=(L)=>{K.length=L,H.length=L,z.length=L,V.length=L,K.fill(void 0,Y),H.fill(void 0,Y),z.fill(0,Y),V.fill(0,Y)};return{set(L,B){if(L===void 0)return;let O=Z.get(L);if(O===void 0){if(X===Y){O=G;let E=K[O];W===null||W===void 0||W(E,H[O]),Z.delete(E),G=z[O],V[G]=0}else O=Q.length>0?Q.pop():X,X++;if(Z.set(L,O),K[O]=L,H[O]=B,X===1)G=J=O;else A(O)}else W===null||W===void 0||W(L,H[O]),H[O]=B,F(O)},get(L){let B=Z.get(L);if(B===void 0)return;if(B!==J)F(B);return H[B]},peek:(L)=>{let B=Z.get(L);return B!==void 0?H[B]:void 0},has:(L)=>Z.has(L),*keys(){let L=J;for(let B=0;B<X;B++)yield K[L],L=V[L]},*values(){let L=J;for(let B=0;B<X;B++)yield H[L],L=V[L]},*entries(){let L=J;for(let B=0;B<X;B++)yield[K[L],H[L]],L=V[L]},forEach:(L)=>{let B=J;for(let O=0;O<X;O++){let E=K[B],M=H[B];L(M,E),B=V[B]}},delete(L){let B=Z.get(L);if(B===void 0)return!1;W===null||W===void 0||W(L,H[B]),Z.delete(L),Q.push(B),K[B]=void 0,H[B]=void 0;let O=V[B],E=z[B];if(B===G)G=E;else z[O]=E;if(B===J)J=O;else V[E]=O;return X--,!0},evict:(L)=>{let B=Math.min(L,X);while(B>0){let O=G,E=K[O];W===null||W===void 0||W(E,H[O]),Z.delete(E),K[O]=void 0,H[O]=void 0,G=z[O],V[G]=0,X--,Q.push(O),B--}if(X===0)G=J=0},clear(){if(W){let L=G;for(let B=0;B<X;B++)W(K[L],H[L]),L=z[L]}Z.clear(),K.fill(void 0),H.fill(void 0),Q=[],X=0,G=J=0},resize:(L)=>{if(!(Number.isInteger(L)&&L>0))throw TypeError("`max` must be a positive integer");if(L===Y)return;if(L<Y)N(L);else D(L);Y=L},get max(){return Y},get size(){return X},get available(){return Y-X}}};NQ1.createLRU=V86});var Yv=o((hz5,OQ1)=>{var{createLRU:A86}=$v(),Ur=A86({max:15000});function BQ1($,Y,X,G){let J=[$,typeof X.nestTables,X.nestTables,Boolean(X.rowsAsArray),Boolean(X.supportBigNumbers||G.supportBigNumbers),Boolean(X.bigNumberStrings||G.bigNumberStrings),typeof X.typeCast==="boolean"?X.typeCast:typeof X.typeCast,X.timezone||G.timezone,Boolean(X.decimalNumbers),X.dateStrings];for(let Q=0;Q<Y.length;++Q){let W=Y[Q];J.push([W.name,W.columnType,W.length,W.schema,W.table,W.flags,W.characterSet])}return JSON.stringify(J,null,0)}function F86($,Y,X,G,J){let Q=BQ1($,Y,X,G),W=Ur.get(Q);if(W)return W;return W=J(Y,X,G),Ur.set(Q,W),W}function D86($){Ur.resize($)}function N86(){Ur.clear()}OQ1.exports={getParser:F86,setMaxCache:D86,clearCache:N86,_keyFromFields:BQ1}});var D30=o((fz5,EQ1)=>{function P7($,X){var X=X||{};if(this._capacity=X.capacity,this._head=0,this._tail=0,Array.isArray($))this._fromArray($);else this._capacityMask=3,this._list=[,,,,]}P7.prototype.peekAt=function(Y){var X=Y;if(X!==(X|0))return;var G=this.size();if(X>=G||X<-G)return;if(X<0)X+=G;return X=this._head+X&this._capacityMask,this._list[X]};P7.prototype.get=function(Y){return this.peekAt(Y)};P7.prototype.peek=function(){if(this._head===this._tail)return;return this._list[this._head]};P7.prototype.peekFront=function(){return this.peek()};P7.prototype.peekBack=function(){return this.peekAt(-1)};Object.defineProperty(P7.prototype,"length",{get:function(){return this.size()}});P7.prototype.size=function(){if(this._head===this._tail)return 0;if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)};P7.prototype.unshift=function(Y){if(arguments.length===0)return this.size();var X=this._list.length;if(this._head=this._head-1+X&this._capacityMask,this._list[this._head]=Y,this._tail===this._head)this._growArray();if(this._capacity&&this.size()>this._capacity)this.pop();if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)};P7.prototype.shift=function(){var Y=this._head;if(Y===this._tail)return;var X=this._list[Y];if(this._list[Y]=void 0,this._head=Y+1&this._capacityMask,Y<2&&this._tail>1e4&&this._tail<=this._list.length>>>2)this._shrinkArray();return X};P7.prototype.push=function(Y){if(arguments.length===0)return this.size();var X=this._tail;if(this._list[X]=Y,this._tail=X+1&this._capacityMask,this._tail===this._head)this._growArray();if(this._capacity&&this.size()>this._capacity)this.shift();if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)};P7.prototype.pop=function(){var Y=this._tail;if(Y===this._head)return;var X=this._list.length;this._tail=Y-1+X&this._capacityMask;var G=this._list[this._tail];if(this._list[this._tail]=void 0,this._head<2&&Y>1e4&&Y<=X>>>2)this._shrinkArray();return G};P7.prototype.removeOne=function(Y){var X=Y;if(X!==(X|0))return;if(this._head===this._tail)return;var G=this.size(),J=this._list.length;if(X>=G||X<-G)return;if(X<0)X+=G;X=this._head+X&this._capacityMask;var Q=this._list[X],W;if(Y<G/2){for(W=Y;W>0;W--)this._list[X]=this._list[X=X-1+J&this._capacityMask];this._list[X]=void 0,this._head=this._head+1+J&this._capacityMask}else{for(W=G-1-Y;W>0;W--)this._list[X]=this._list[X=X+1+J&this._capacityMask];this._list[X]=void 0,this._tail=this._tail-1+J&this._capacityMask}return Q};P7.prototype.remove=function(Y,X){var G=Y,J,Q=X;if(G!==(G|0))return;if(this._head===this._tail)return;var W=this.size(),Z=this._list.length;if(G>=W||G<-W||X<1)return;if(G<0)G+=W;if(X===1||!X)return J=[,],J[0]=this.removeOne(G),J;if(G===0&&G+X>=W)return J=this.toArray(),this.clear(),J;if(G+X>W)X=W-G;var K;J=Array(X);for(K=0;K<X;K++)J[K]=this._list[this._head+G+K&this._capacityMask];if(G=this._head+G&this._capacityMask,Y+X===W){this._tail=this._tail-X+Z&this._capacityMask;for(K=X;K>0;K--)this._list[G=G+1+Z&this._capacityMask]=void 0;return J}if(Y===0){this._head=this._head+X+Z&this._capacityMask;for(K=X-1;K>0;K--)this._list[G=G+1+Z&this._capacityMask]=void 0;return J}if(G<W/2){this._head=this._head+Y+X+Z&this._capacityMask;for(K=Y;K>0;K--)this.unshift(this._list[G=G-1+Z&this._capacityMask]);G=this._head-1+Z&this._capacityMask;while(Q>0)this._list[G=G-1+Z&this._capacityMask]=void 0,Q--;if(Y<0)this._tail=G}else{this._tail=G,G=G+X+Z&this._capacityMask;for(K=W-(X+Y);K>0;K--)this.push(this._list[G++]);G=this._tail;while(Q>0)this._list[G=G+1+Z&this._capacityMask]=void 0,Q--}if(this._head<2&&this._tail>1e4&&this._tail<=Z>>>2)this._shrinkArray();return J};P7.prototype.splice=function(Y,X){var G=Y;if(G!==(G|0))return;var J=this.size();if(G<0)G+=J;if(G>J)return;if(arguments.length>2){var Q,W,Z,K=arguments.length,H=this._list.length,z=2;if(!J||G<J/2){W=Array(G);for(Q=0;Q<G;Q++)W[Q]=this._list[this._head+Q&this._capacityMask];if(X===0){if(Z=[],G>0)this._head=this._head+G+H&this._capacityMask}else Z=this.remove(G,X),this._head=this._head+G+H&this._capacityMask;while(K>z)this.unshift(arguments[--K]);for(Q=G;Q>0;Q--)this.unshift(W[Q-1])}else{W=Array(J-(G+X));var V=W.length;for(Q=0;Q<V;Q++)W[Q]=this._list[this._head+G+X+Q&this._capacityMask];if(X===0){if(Z=[],G!=J)this._tail=this._head+G+H&this._capacityMask}else Z=this.remove(G,X),this._tail=this._tail-V+H&this._capacityMask;while(z<K)this.push(arguments[z++]);for(Q=0;Q<V;Q++)this.push(W[Q])}return Z}else return this.remove(G,X)};P7.prototype.clear=function(){this._list=Array(this._list.length),this._head=0,this._tail=0};P7.prototype.isEmpty=function(){return this._head===this._tail};P7.prototype.toArray=function(){return this._copyArray(!1)};P7.prototype._fromArray=function(Y){var X=Y.length,G=this._nextPowerOf2(X);this._list=Array(G),this._capacityMask=G-1,this._tail=X;for(var J=0;J<X;J++)this._list[J]=Y[J]};P7.prototype._copyArray=function(Y,X){var G=this._list,J=G.length,Q=this.length;if(X=X|Q,X==Q&&this._head<this._tail)return this._list.slice(this._head,this._tail);var W=Array(X),Z=0,K;if(Y||this._head>this._tail){for(K=this._head;K<J;K++)W[Z++]=G[K];for(K=0;K<this._tail;K++)W[Z++]=G[K]}else for(K=this._head;K<this._tail;K++)W[Z++]=G[K];return W};P7.prototype._growArray=function(){if(this._head!=0){var Y=this._copyArray(!0,this._list.length<<1);this._tail=this._list.length,this._head=0,this._list=Y}else this._tail=this._list.length,this._list.length<<=1;this._capacityMask=this._capacityMask<<1|1};P7.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1};P7.prototype._nextPowerOf2=function(Y){var X=Math.log(Y)/Math.log(2),G=1<<X+1;return Math.max(G,4)};EQ1.exports=P7});var Hr=o((j)=>{j.EE_CANTCREATEFILE=1;j.EE_READ=2;j.EE_WRITE=3;j.EE_BADCLOSE=4;j.EE_OUTOFMEMORY=5;j.EE_DELETE=6;j.EE_LINK=7;j.EE_EOFERR=9;j.EE_CANTLOCK=10;j.EE_CANTUNLOCK=11;j.EE_DIR=12;j.EE_STAT=13;j.EE_CANT_CHSIZE=14;j.EE_CANT_OPEN_STREAM=15;j.EE_GETWD=16;j.EE_SETWD=17;j.EE_LINK_WARNING=18;j.EE_OPEN_WARNING=19;j.EE_DISK_FULL=20;j.EE_CANT_MKDIR=21;j.EE_UNKNOWN_CHARSET=22;j.EE_OUT_OF_FILERESOURCES=23;j.EE_CANT_READLINK=24;j.EE_CANT_SYMLINK=25;j.EE_REALPATH=26;j.EE_SYNC=27;j.EE_UNKNOWN_COLLATION=28;j.EE_FILENOTFOUND=29;j.EE_FILE_NOT_CLOSED=30;j.EE_CHANGE_OWNERSHIP=31;j.EE_CHANGE_PERMISSIONS=32;j.EE_CANT_SEEK=33;j.EE_CAPACITY_EXCEEDED=34;j.EE_DISK_FULL_WITH_RETRY_MSG=35;j.EE_FAILED_TO_CREATE_TIMER=36;j.EE_FAILED_TO_DELETE_TIMER=37;j.EE_FAILED_TO_CREATE_TIMER_QUEUE=38;j.EE_FAILED_TO_START_TIMER_NOTIFY_THREAD=39;j.EE_FAILED_TO_CREATE_TIMER_NOTIFY_THREAD_INTERRUPT_EVENT=40;j.EE_EXITING_TIMER_NOTIFY_THREAD=41;j.EE_WIN_LIBRARY_LOAD_FAILED=42;j.EE_WIN_RUN_TIME_ERROR_CHECK=43;j.EE_FAILED_TO_DETERMINE_LARGE_PAGE_SIZE=44;j.EE_FAILED_TO_KILL_ALL_THREADS=45;j.EE_FAILED_TO_CREATE_IO_COMPLETION_PORT=46;j.EE_FAILED_TO_OPEN_DEFAULTS_FILE=47;j.EE_FAILED_TO_HANDLE_DEFAULTS_FILE=48;j.EE_WRONG_DIRECTIVE_IN_CONFIG_FILE=49;j.EE_SKIPPING_DIRECTIVE_DUE_TO_MAX_INCLUDE_RECURSION=50;j.EE_INCORRECT_GRP_DEFINITION_IN_CONFIG_FILE=51;j.EE_OPTION_WITHOUT_GRP_IN_CONFIG_FILE=52;j.EE_CONFIG_FILE_PERMISSION_ERROR=53;j.EE_IGNORE_WORLD_WRITABLE_CONFIG_FILE=54;j.EE_USING_DISABLED_OPTION=55;j.EE_USING_DISABLED_SHORT_OPTION=56;j.EE_USING_PASSWORD_ON_CLI_IS_INSECURE=57;j.EE_UNKNOWN_SUFFIX_FOR_VARIABLE=58;j.EE_SSL_ERROR_FROM_FILE=59;j.EE_SSL_ERROR=60;j.EE_NET_SEND_ERROR_IN_BOOTSTRAP=61;j.EE_PACKETS_OUT_OF_ORDER=62;j.EE_UNKNOWN_PROTOCOL_OPTION=63;j.EE_FAILED_TO_LOCATE_SERVER_PUBLIC_KEY=64;j.EE_PUBLIC_KEY_NOT_IN_PEM_FORMAT=65;j.EE_DEBUG_INFO=66;j.EE_UNKNOWN_VARIABLE=67;j.EE_UNKNOWN_OPTION=68;j.EE_UNKNOWN_SHORT_OPTION=69;j.EE_OPTION_WITHOUT_ARGUMENT=70;j.EE_OPTION_REQUIRES_ARGUMENT=71;j.EE_SHORT_OPTION_REQUIRES_ARGUMENT=72;j.EE_OPTION_IGNORED_DUE_TO_INVALID_VALUE=73;j.EE_OPTION_WITH_EMPTY_VALUE=74;j.EE_FAILED_TO_ASSIGN_MAX_VALUE_TO_OPTION=75;j.EE_INCORRECT_BOOLEAN_VALUE_FOR_OPTION=76;j.EE_FAILED_TO_SET_OPTION_VALUE=77;j.EE_INCORRECT_INT_VALUE_FOR_OPTION=78;j.EE_INCORRECT_UINT_VALUE_FOR_OPTION=79;j.EE_ADJUSTED_SIGNED_VALUE_FOR_OPTION=80;j.EE_ADJUSTED_UNSIGNED_VALUE_FOR_OPTION=81;j.EE_ADJUSTED_ULONGLONG_VALUE_FOR_OPTION=82;j.EE_ADJUSTED_DOUBLE_VALUE_FOR_OPTION=83;j.EE_INVALID_DECIMAL_VALUE_FOR_OPTION=84;j.EE_COLLATION_PARSER_ERROR=85;j.EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR=86;j.EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR=87;j.EE_SHIFT_CHAR_OUT_OF_RANGE=88;j.EE_RESET_CHAR_OUT_OF_RANGE=89;j.EE_UNKNOWN_LDML_TAG=90;j.EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR=91;j.EE_FAILED_PROCESSING_DIRECTIVE=92;j.EE_PTHREAD_KILL_FAILED=93;j.HA_ERR_KEY_NOT_FOUND=120;j.HA_ERR_FOUND_DUPP_KEY=121;j.HA_ERR_INTERNAL_ERROR=122;j.HA_ERR_RECORD_CHANGED=123;j.HA_ERR_WRONG_INDEX=124;j.HA_ERR_ROLLED_BACK=125;j.HA_ERR_CRASHED=126;j.HA_ERR_WRONG_IN_RECORD=127;j.HA_ERR_OUT_OF_MEM=128;j.HA_ERR_NOT_A_TABLE=130;j.HA_ERR_WRONG_COMMAND=131;j.HA_ERR_OLD_FILE=132;j.HA_ERR_NO_ACTIVE_RECORD=133;j.HA_ERR_RECORD_DELETED=134;j.HA_ERR_RECORD_FILE_FULL=135;j.HA_ERR_INDEX_FILE_FULL=136;j.HA_ERR_END_OF_FILE=137;j.HA_ERR_UNSUPPORTED=138;j.HA_ERR_TOO_BIG_ROW=139;j.HA_WRONG_CREATE_OPTION=140;j.HA_ERR_FOUND_DUPP_UNIQUE=141;j.HA_ERR_UNKNOWN_CHARSET=142;j.HA_ERR_WRONG_MRG_TABLE_DEF=143;j.HA_ERR_CRASHED_ON_REPAIR=144;j.HA_ERR_CRASHED_ON_USAGE=145;j.HA_ERR_LOCK_WAIT_TIMEOUT=146;j.HA_ERR_LOCK_TABLE_FULL=147;j.HA_ERR_READ_ONLY_TRANSACTION=148;j.HA_ERR_LOCK_DEADLOCK=149;j.HA_ERR_CANNOT_ADD_FOREIGN=150;j.HA_ERR_NO_REFERENCED_ROW=151;j.HA_ERR_ROW_IS_REFERENCED=152;j.HA_ERR_NO_SAVEPOINT=153;j.HA_ERR_NON_UNIQUE_BLOCK_SIZE=154;j.HA_ERR_NO_SUCH_TABLE=155;j.HA_ERR_TABLE_EXIST=156;j.HA_ERR_NO_CONNECTION=157;j.HA_ERR_NULL_IN_SPATIAL=158;j.HA_ERR_TABLE_DEF_CHANGED=159;j.HA_ERR_NO_PARTITION_FOUND=160;j.HA_ERR_RBR_LOGGING_FAILED=161;j.HA_ERR_DROP_INDEX_FK=162;j.HA_ERR_FOREIGN_DUPLICATE_KEY=163;j.HA_ERR_TABLE_NEEDS_UPGRADE=164;j.HA_ERR_TABLE_READONLY=165;j.HA_ERR_AUTOINC_READ_FAILED=166;j.HA_ERR_AUTOINC_ERANGE=167;j.HA_ERR_GENERIC=168;j.HA_ERR_RECORD_IS_THE_SAME=169;j.HA_ERR_LOGGING_IMPOSSIBLE=170;j.HA_ERR_CORRUPT_EVENT=171;j.HA_ERR_NEW_FILE=172;j.HA_ERR_ROWS_EVENT_APPLY=173;j.HA_ERR_INITIALIZATION=174;j.HA_ERR_FILE_TOO_SHORT=175;j.HA_ERR_WRONG_CRC=176;j.HA_ERR_TOO_MANY_CONCURRENT_TRXS=177;j.HA_ERR_NOT_IN_LOCK_PARTITIONS=178;j.HA_ERR_INDEX_COL_TOO_LONG=179;j.HA_ERR_INDEX_CORRUPT=180;j.HA_ERR_UNDO_REC_TOO_BIG=181;j.HA_FTS_INVALID_DOCID=182;j.HA_ERR_TABLE_IN_FK_CHECK=183;j.HA_ERR_TABLESPACE_EXISTS=184;j.HA_ERR_TOO_MANY_FIELDS=185;j.HA_ERR_ROW_IN_WRONG_PARTITION=186;j.HA_ERR_INNODB_READ_ONLY=187;j.HA_ERR_FTS_EXCEED_RESULT_CACHE_LIMIT=188;j.HA_ERR_TEMP_FILE_WRITE_FAILURE=189;j.HA_ERR_INNODB_FORCED_RECOVERY=190;j.HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE=191;j.HA_ERR_FK_DEPTH_EXCEEDED=192;j.HA_MISSING_CREATE_OPTION=193;j.HA_ERR_SE_OUT_OF_MEMORY=194;j.HA_ERR_TABLE_CORRUPT=195;j.HA_ERR_QUERY_INTERRUPTED=196;j.HA_ERR_TABLESPACE_MISSING=197;j.HA_ERR_TABLESPACE_IS_NOT_EMPTY=198;j.HA_ERR_WRONG_FILE_NAME=199;j.HA_ERR_NOT_ALLOWED_COMMAND=200;j.HA_ERR_COMPUTE_FAILED=201;j.HA_ERR_ROW_FORMAT_CHANGED=202;j.HA_ERR_NO_WAIT_LOCK=203;j.HA_ERR_DISK_FULL_NOWAIT=204;j.HA_ERR_NO_SESSION_TEMP=205;j.HA_ERR_WRONG_TABLE_NAME=206;j.HA_ERR_TOO_LONG_PATH=207;j.HA_ERR_SAMPLING_INIT_FAILED=208;j.HA_ERR_FTS_TOO_MANY_NESTED_EXP=209;j.ER_HASHCHK=1000;j.ER_NISAMCHK=1001;j.ER_NO=1002;j.ER_YES=1003;j.ER_CANT_CREATE_FILE=1004;j.ER_CANT_CREATE_TABLE=1005;j.ER_CANT_CREATE_DB=1006;j.ER_DB_CREATE_EXISTS=1007;j.ER_DB_DROP_EXISTS=1008;j.ER_DB_DROP_DELETE=1009;j.ER_DB_DROP_RMDIR=1010;j.ER_CANT_DELETE_FILE=1011;j.ER_CANT_FIND_SYSTEM_REC=1012;j.ER_CANT_GET_STAT=1013;j.ER_CANT_GET_WD=1014;j.ER_CANT_LOCK=1015;j.ER_CANT_OPEN_FILE=1016;j.ER_FILE_NOT_FOUND=1017;j.ER_CANT_READ_DIR=1018;j.ER_CANT_SET_WD=1019;j.ER_CHECKREAD=1020;j.ER_DISK_FULL=1021;j.ER_DUP_KEY=1022;j.ER_ERROR_ON_CLOSE=1023;j.ER_ERROR_ON_READ=1024;j.ER_ERROR_ON_RENAME=1025;j.ER_ERROR_ON_WRITE=1026;j.ER_FILE_USED=1027;j.ER_FILSORT_ABORT=1028;j.ER_FORM_NOT_FOUND=1029;j.ER_GET_ERRNO=1030;j.ER_ILLEGAL_HA=1031;j.ER_KEY_NOT_FOUND=1032;j.ER_NOT_FORM_FILE=1033;j.ER_NOT_KEYFILE=1034;j.ER_OLD_KEYFILE=1035;j.ER_OPEN_AS_READONLY=1036;j.ER_OUTOFMEMORY=1037;j.ER_OUT_OF_SORTMEMORY=1038;j.ER_UNEXPECTED_EOF=1039;j.ER_CON_COUNT_ERROR=1040;j.ER_OUT_OF_RESOURCES=1041;j.ER_BAD_HOST_ERROR=1042;j.ER_HANDSHAKE_ERROR=1043;j.ER_DBACCESS_DENIED_ERROR=1044;j.ER_ACCESS_DENIED_ERROR=1045;j.ER_NO_DB_ERROR=1046;j.ER_UNKNOWN_COM_ERROR=1047;j.ER_BAD_NULL_ERROR=1048;j.ER_BAD_DB_ERROR=1049;j.ER_TABLE_EXISTS_ERROR=1050;j.ER_BAD_TABLE_ERROR=1051;j.ER_NON_UNIQ_ERROR=1052;j.ER_SERVER_SHUTDOWN=1053;j.ER_BAD_FIELD_ERROR=1054;j.ER_WRONG_FIELD_WITH_GROUP=1055;j.ER_WRONG_GROUP_FIELD=1056;j.ER_WRONG_SUM_SELECT=1057;j.ER_WRONG_VALUE_COUNT=1058;j.ER_TOO_LONG_IDENT=1059;j.ER_DUP_FIELDNAME=1060;j.ER_DUP_KEYNAME=1061;j.ER_DUP_ENTRY=1062;j.ER_WRONG_FIELD_SPEC=1063;j.ER_PARSE_ERROR=1064;j.ER_EMPTY_QUERY=1065;j.ER_NONUNIQ_TABLE=1066;j.ER_INVALID_DEFAULT=1067;j.ER_MULTIPLE_PRI_KEY=1068;j.ER_TOO_MANY_KEYS=1069;j.ER_TOO_MANY_KEY_PARTS=1070;j.ER_TOO_LONG_KEY=1071;j.ER_KEY_COLUMN_DOES_NOT_EXITS=1072;j.ER_BLOB_USED_AS_KEY=1073;j.ER_TOO_BIG_FIELDLENGTH=1074;j.ER_WRONG_AUTO_KEY=1075;j.ER_READY=1076;j.ER_NORMAL_SHUTDOWN=1077;j.ER_GOT_SIGNAL=1078;j.ER_SHUTDOWN_COMPLETE=1079;j.ER_FORCING_CLOSE=1080;j.ER_IPSOCK_ERROR=1081;j.ER_NO_SUCH_INDEX=1082;j.ER_WRONG_FIELD_TERMINATORS=1083;j.ER_BLOBS_AND_NO_TERMINATED=1084;j.ER_TEXTFILE_NOT_READABLE=1085;j.ER_FILE_EXISTS_ERROR=1086;j.ER_LOAD_INFO=1087;j.ER_ALTER_INFO=1088;j.ER_WRONG_SUB_KEY=1089;j.ER_CANT_REMOVE_ALL_FIELDS=1090;j.ER_CANT_DROP_FIELD_OR_KEY=1091;j.ER_INSERT_INFO=1092;j.ER_UPDATE_TABLE_USED=1093;j.ER_NO_SUCH_THREAD=1094;j.ER_KILL_DENIED_ERROR=1095;j.ER_NO_TABLES_USED=1096;j.ER_TOO_BIG_SET=1097;j.ER_NO_UNIQUE_LOGFILE=1098;j.ER_TABLE_NOT_LOCKED_FOR_WRITE=1099;j.ER_TABLE_NOT_LOCKED=1100;j.ER_BLOB_CANT_HAVE_DEFAULT=1101;j.ER_WRONG_DB_NAME=1102;j.ER_WRONG_TABLE_NAME=1103;j.ER_TOO_BIG_SELECT=1104;j.ER_UNKNOWN_ERROR=1105;j.ER_UNKNOWN_PROCEDURE=1106;j.ER_WRONG_PARAMCOUNT_TO_PROCEDURE=1107;j.ER_WRONG_PARAMETERS_TO_PROCEDURE=1108;j.ER_UNKNOWN_TABLE=1109;j.ER_FIELD_SPECIFIED_TWICE=1110;j.ER_INVALID_GROUP_FUNC_USE=1111;j.ER_UNSUPPORTED_EXTENSION=1112;j.ER_TABLE_MUST_HAVE_COLUMNS=1113;j.ER_RECORD_FILE_FULL=1114;j.ER_UNKNOWN_CHARACTER_SET=1115;j.ER_TOO_MANY_TABLES=1116;j.ER_TOO_MANY_FIELDS=1117;j.ER_TOO_BIG_ROWSIZE=1118;j.ER_STACK_OVERRUN=1119;j.ER_WRONG_OUTER_JOIN=1120;j.ER_NULL_COLUMN_IN_INDEX=1121;j.ER_CANT_FIND_UDF=1122;j.ER_CANT_INITIALIZE_UDF=1123;j.ER_UDF_NO_PATHS=1124;j.ER_UDF_EXISTS=1125;j.ER_CANT_OPEN_LIBRARY=1126;j.ER_CANT_FIND_DL_ENTRY=1127;j.ER_FUNCTION_NOT_DEFINED=1128;j.ER_HOST_IS_BLOCKED=1129;j.ER_HOST_NOT_PRIVILEGED=1130;j.ER_PASSWORD_ANONYMOUS_USER=1131;j.ER_PASSWORD_NOT_ALLOWED=1132;j.ER_PASSWORD_NO_MATCH=1133;j.ER_UPDATE_INFO=1134;j.ER_CANT_CREATE_THREAD=1135;j.ER_WRONG_VALUE_COUNT_ON_ROW=1136;j.ER_CANT_REOPEN_TABLE=1137;j.ER_INVALID_USE_OF_NULL=1138;j.ER_REGEXP_ERROR=1139;j.ER_MIX_OF_GROUP_FUNC_AND_FIELDS=1140;j.ER_NONEXISTING_GRANT=1141;j.ER_TABLEACCESS_DENIED_ERROR=1142;j.ER_COLUMNACCESS_DENIED_ERROR=1143;j.ER_ILLEGAL_GRANT_FOR_TABLE=1144;j.ER_GRANT_WRONG_HOST_OR_USER=1145;j.ER_NO_SUCH_TABLE=1146;j.ER_NONEXISTING_TABLE_GRANT=1147;j.ER_NOT_ALLOWED_COMMAND=1148;j.ER_SYNTAX_ERROR=1149;j.ER_UNUSED1=1150;j.ER_UNUSED2=1151;j.ER_ABORTING_CONNECTION=1152;j.ER_NET_PACKET_TOO_LARGE=1153;j.ER_NET_READ_ERROR_FROM_PIPE=1154;j.ER_NET_FCNTL_ERROR=1155;j.ER_NET_PACKETS_OUT_OF_ORDER=1156;j.ER_NET_UNCOMPRESS_ERROR=1157;j.ER_NET_READ_ERROR=1158;j.ER_NET_READ_INTERRUPTED=1159;j.ER_NET_ERROR_ON_WRITE=1160;j.ER_NET_WRITE_INTERRUPTED=1161;j.ER_TOO_LONG_STRING=1162;j.ER_TABLE_CANT_HANDLE_BLOB=1163;j.ER_TABLE_CANT_HANDLE_AUTO_INCREMENT=1164;j.ER_UNUSED3=1165;j.ER_WRONG_COLUMN_NAME=1166;j.ER_WRONG_KEY_COLUMN=1167;j.ER_WRONG_MRG_TABLE=1168;j.ER_DUP_UNIQUE=1169;j.ER_BLOB_KEY_WITHOUT_LENGTH=1170;j.ER_PRIMARY_CANT_HAVE_NULL=1171;j.ER_TOO_MANY_ROWS=1172;j.ER_REQUIRES_PRIMARY_KEY=1173;j.ER_NO_RAID_COMPILED=1174;j.ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE=1175;j.ER_KEY_DOES_NOT_EXITS=1176;j.ER_CHECK_NO_SUCH_TABLE=1177;j.ER_CHECK_NOT_IMPLEMENTED=1178;j.ER_CANT_DO_THIS_DURING_AN_TRANSACTION=1179;j.ER_ERROR_DURING_COMMIT=1180;j.ER_ERROR_DURING_ROLLBACK=1181;j.ER_ERROR_DURING_FLUSH_LOGS=1182;j.ER_ERROR_DURING_CHECKPOINT=1183;j.ER_NEW_ABORTING_CONNECTION=1184;j.ER_DUMP_NOT_IMPLEMENTED=1185;j.ER_FLUSH_MASTER_BINLOG_CLOSED=1186;j.ER_INDEX_REBUILD=1187;j.ER_SOURCE=1188;j.ER_SOURCE_NET_READ=1189;j.ER_SOURCE_NET_WRITE=1190;j.ER_FT_MATCHING_KEY_NOT_FOUND=1191;j.ER_LOCK_OR_ACTIVE_TRANSACTION=1192;j.ER_UNKNOWN_SYSTEM_VARIABLE=1193;j.ER_CRASHED_ON_USAGE=1194;j.ER_CRASHED_ON_REPAIR=1195;j.ER_WARNING_NOT_COMPLETE_ROLLBACK=1196;j.ER_TRANS_CACHE_FULL=1197;j.ER_SLAVE_MUST_STOP=1198;j.ER_REPLICA_NOT_RUNNING=1199;j.ER_BAD_REPLICA=1200;j.ER_CONNECTION_METADATA=1201;j.ER_REPLICA_THREAD=1202;j.ER_TOO_MANY_USER_CONNECTIONS=1203;j.ER_SET_CONSTANTS_ONLY=1204;j.ER_LOCK_WAIT_TIMEOUT=1205;j.ER_LOCK_TABLE_FULL=1206;j.ER_READ_ONLY_TRANSACTION=1207;j.ER_DROP_DB_WITH_READ_LOCK=1208;j.ER_CREATE_DB_WITH_READ_LOCK=1209;j.ER_WRONG_ARGUMENTS=1210;j.ER_NO_PERMISSION_TO_CREATE_USER=1211;j.ER_UNION_TABLES_IN_DIFFERENT_DIR=1212;j.ER_LOCK_DEADLOCK=1213;j.ER_TABLE_CANT_HANDLE_FT=1214;j.ER_CANNOT_ADD_FOREIGN=1215;j.ER_NO_REFERENCED_ROW=1216;j.ER_ROW_IS_REFERENCED=1217;j.ER_CONNECT_TO_SOURCE=1218;j.ER_QUERY_ON_MASTER=1219;j.ER_ERROR_WHEN_EXECUTING_COMMAND=1220;j.ER_WRONG_USAGE=1221;j.ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT=1222;j.ER_CANT_UPDATE_WITH_READLOCK=1223;j.ER_MIXING_NOT_ALLOWED=1224;j.ER_DUP_ARGUMENT=1225;j.ER_USER_LIMIT_REACHED=1226;j.ER_SPECIFIC_ACCESS_DENIED_ERROR=1227;j.ER_LOCAL_VARIABLE=1228;j.ER_GLOBAL_VARIABLE=1229;j.ER_NO_DEFAULT=1230;j.ER_WRONG_VALUE_FOR_VAR=1231;j.ER_WRONG_TYPE_FOR_VAR=1232;j.ER_VAR_CANT_BE_READ=1233;j.ER_CANT_USE_OPTION_HERE=1234;j.ER_NOT_SUPPORTED_YET=1235;j.ER_SOURCE_FATAL_ERROR_READING_BINLOG=1236;j.ER_REPLICA_IGNORED_TABLE=1237;j.ER_INCORRECT_GLOBAL_LOCAL_VAR=1238;j.ER_WRONG_FK_DEF=1239;j.ER_KEY_REF_DO_NOT_MATCH_TABLE_REF=1240;j.ER_OPERAND_COLUMNS=1241;j.ER_SUBQUERY_NO_1_ROW=1242;j.ER_UNKNOWN_STMT_HANDLER=1243;j.ER_CORRUPT_HELP_DB=1244;j.ER_CYCLIC_REFERENCE=1245;j.ER_AUTO_CONVERT=1246;j.ER_ILLEGAL_REFERENCE=1247;j.ER_DERIVED_MUST_HAVE_ALIAS=1248;j.ER_SELECT_REDUCED=1249;j.ER_TABLENAME_NOT_ALLOWED_HERE=1250;j.ER_NOT_SUPPORTED_AUTH_MODE=1251;j.ER_SPATIAL_CANT_HAVE_NULL=1252;j.ER_COLLATION_CHARSET_MISMATCH=1253;j.ER_SLAVE_WAS_RUNNING=1254;j.ER_SLAVE_WAS_NOT_RUNNING=1255;j.ER_TOO_BIG_FOR_UNCOMPRESS=1256;j.ER_ZLIB_Z_MEM_ERROR=1257;j.ER_ZLIB_Z_BUF_ERROR=1258;j.ER_ZLIB_Z_DATA_ERROR=1259;j.ER_CUT_VALUE_GROUP_CONCAT=1260;j.ER_WARN_TOO_FEW_RECORDS=1261;j.ER_WARN_TOO_MANY_RECORDS=1262;j.ER_WARN_NULL_TO_NOTNULL=1263;j.ER_WARN_DATA_OUT_OF_RANGE=1264;j.WARN_DATA_TRUNCATED=1265;j.ER_WARN_USING_OTHER_HANDLER=1266;j.ER_CANT_AGGREGATE_2COLLATIONS=1267;j.ER_DROP_USER=1268;j.ER_REVOKE_GRANTS=1269;j.ER_CANT_AGGREGATE_3COLLATIONS=1270;j.ER_CANT_AGGREGATE_NCOLLATIONS=1271;j.ER_VARIABLE_IS_NOT_STRUCT=1272;j.ER_UNKNOWN_COLLATION=1273;j.ER_REPLICA_IGNORED_SSL_PARAMS=1274;j.ER_SERVER_IS_IN_SECURE_AUTH_MODE=1275;j.ER_WARN_FIELD_RESOLVED=1276;j.ER_BAD_REPLICA_UNTIL_COND=1277;j.ER_MISSING_SKIP_REPLICA=1278;j.ER_UNTIL_COND_IGNORED=1279;j.ER_WRONG_NAME_FOR_INDEX=1280;j.ER_WRONG_NAME_FOR_CATALOG=1281;j.ER_WARN_QC_RESIZE=1282;j.ER_BAD_FT_COLUMN=1283;j.ER_UNKNOWN_KEY_CACHE=1284;j.ER_WARN_HOSTNAME_WONT_WORK=1285;j.ER_UNKNOWN_STORAGE_ENGINE=1286;j.ER_WARN_DEPRECATED_SYNTAX=1287;j.ER_NON_UPDATABLE_TABLE=1288;j.ER_FEATURE_DISABLED=1289;j.ER_OPTION_PREVENTS_STATEMENT=1290;j.ER_DUPLICATED_VALUE_IN_TYPE=1291;j.ER_TRUNCATED_WRONG_VALUE=1292;j.ER_TOO_MUCH_AUTO_TIMESTAMP_COLS=1293;j.ER_INVALID_ON_UPDATE=1294;j.ER_UNSUPPORTED_PS=1295;j.ER_GET_ERRMSG=1296;j.ER_GET_TEMPORARY_ERRMSG=1297;j.ER_UNKNOWN_TIME_ZONE=1298;j.ER_WARN_INVALID_TIMESTAMP=1299;j.ER_INVALID_CHARACTER_STRING=1300;j.ER_WARN_ALLOWED_PACKET_OVERFLOWED=1301;j.ER_CONFLICTING_DECLARATIONS=1302;j.ER_SP_NO_RECURSIVE_CREATE=1303;j.ER_SP_ALREADY_EXISTS=1304;j.ER_SP_DOES_NOT_EXIST=1305;j.ER_SP_DROP_FAILED=1306;j.ER_SP_STORE_FAILED=1307;j.ER_SP_LILABEL_MISMATCH=1308;j.ER_SP_LABEL_REDEFINE=1309;j.ER_SP_LABEL_MISMATCH=1310;j.ER_SP_UNINIT_VAR=1311;j.ER_SP_BADSELECT=1312;j.ER_SP_BADRETURN=1313;j.ER_SP_BADSTATEMENT=1314;j.ER_UPDATE_LOG_DEPRECATED_IGNORED=1315;j.ER_UPDATE_LOG_DEPRECATED_TRANSLATED=1316;j.ER_QUERY_INTERRUPTED=1317;j.ER_SP_WRONG_NO_OF_ARGS=1318;j.ER_SP_COND_MISMATCH=1319;j.ER_SP_NORETURN=1320;j.ER_SP_NORETURNEND=1321;j.ER_SP_BAD_CURSOR_QUERY=1322;j.ER_SP_BAD_CURSOR_SELECT=1323;j.ER_SP_CURSOR_MISMATCH=1324;j.ER_SP_CURSOR_ALREADY_OPEN=1325;j.ER_SP_CURSOR_NOT_OPEN=1326;j.ER_SP_UNDECLARED_VAR=1327;j.ER_SP_WRONG_NO_OF_FETCH_ARGS=1328;j.ER_SP_FETCH_NO_DATA=1329;j.ER_SP_DUP_PARAM=1330;j.ER_SP_DUP_VAR=1331;j.ER_SP_DUP_COND=1332;j.ER_SP_DUP_CURS=1333;j.ER_SP_CANT_ALTER=1334;j.ER_SP_SUBSELECT_NYI=1335;j.ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG=1336;j.ER_SP_VARCOND_AFTER_CURSHNDLR=1337;j.ER_SP_CURSOR_AFTER_HANDLER=1338;j.ER_SP_CASE_NOT_FOUND=1339;j.ER_FPARSER_TOO_BIG_FILE=1340;j.ER_FPARSER_BAD_HEADER=1341;j.ER_FPARSER_EOF_IN_COMMENT=1342;j.ER_FPARSER_ERROR_IN_PARAMETER=1343;j.ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER=1344;j.ER_VIEW_NO_EXPLAIN=1345;j.ER_FRM_UNKNOWN_TYPE=1346;j.ER_WRONG_OBJECT=1347;j.ER_NONUPDATEABLE_COLUMN=1348;j.ER_VIEW_SELECT_DERIVED=1349;j.ER_VIEW_SELECT_CLAUSE=1350;j.ER_VIEW_SELECT_VARIABLE=1351;j.ER_VIEW_SELECT_TMPTABLE=1352;j.ER_VIEW_WRONG_LIST=1353;j.ER_WARN_VIEW_MERGE=1354;j.ER_WARN_VIEW_WITHOUT_KEY=1355;j.ER_VIEW_INVALID=1356;j.ER_SP_NO_DROP_SP=1357;j.ER_SP_GOTO_IN_HNDLR=1358;j.ER_TRG_ALREADY_EXISTS=1359;j.ER_TRG_DOES_NOT_EXIST=1360;j.ER_TRG_ON_VIEW_OR_TEMP_TABLE=1361;j.ER_TRG_CANT_CHANGE_ROW=1362;j.ER_TRG_NO_SUCH_ROW_IN_TRG=1363;j.ER_NO_DEFAULT_FOR_FIELD=1364;j.ER_DIVISION_BY_ZERO=1365;j.ER_TRUNCATED_WRONG_VALUE_FOR_FIELD=1366;j.ER_ILLEGAL_VALUE_FOR_TYPE=1367;j.ER_VIEW_NONUPD_CHECK=1368;j.ER_VIEW_CHECK_FAILED=1369;j.ER_PROCACCESS_DENIED_ERROR=1370;j.ER_RELAY_LOG_FAIL=1371;j.ER_PASSWD_LENGTH=1372;j.ER_UNKNOWN_TARGET_BINLOG=1373;j.ER_IO_ERR_LOG_INDEX_READ=1374;j.ER_BINLOG_PURGE_PROHIBITED=1375;j.ER_FSEEK_FAIL=1376;j.ER_BINLOG_PURGE_FATAL_ERR=1377;j.ER_LOG_IN_USE=1378;j.ER_LOG_PURGE_UNKNOWN_ERR=1379;j.ER_RELAY_LOG_INIT=1380;j.ER_NO_BINARY_LOGGING=1381;j.ER_RESERVED_SYNTAX=1382;j.ER_WSAS_FAILED=1383;j.ER_DIFF_GROUPS_PROC=1384;j.ER_NO_GROUP_FOR_PROC=1385;j.ER_ORDER_WITH_PROC=1386;j.ER_LOGGING_PROHIBIT_CHANGING_OF=1387;j.ER_NO_FILE_MAPPING=1388;j.ER_WRONG_MAGIC=1389;j.ER_PS_MANY_PARAM=1390;j.ER_KEY_PART_0=1391;j.ER_VIEW_CHECKSUM=1392;j.ER_VIEW_MULTIUPDATE=1393;j.ER_VIEW_NO_INSERT_FIELD_LIST=1394;j.ER_VIEW_DELETE_MERGE_VIEW=1395;j.ER_CANNOT_USER=1396;j.ER_XAER_NOTA=1397;j.ER_XAER_INVAL=1398;j.ER_XAER_RMFAIL=1399;j.ER_XAER_OUTSIDE=1400;j.ER_XAER_RMERR=1401;j.ER_XA_RBROLLBACK=1402;j.ER_NONEXISTING_PROC_GRANT=1403;j.ER_PROC_AUTO_GRANT_FAIL=1404;j.ER_PROC_AUTO_REVOKE_FAIL=1405;j.ER_DATA_TOO_LONG=1406;j.ER_SP_BAD_SQLSTATE=1407;j.ER_STARTUP=1408;j.ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR=1409;j.ER_CANT_CREATE_USER_WITH_GRANT=1410;j.ER_WRONG_VALUE_FOR_TYPE=1411;j.ER_TABLE_DEF_CHANGED=1412;j.ER_SP_DUP_HANDLER=1413;j.ER_SP_NOT_VAR_ARG=1414;j.ER_SP_NO_RETSET=1415;j.ER_CANT_CREATE_GEOMETRY_OBJECT=1416;j.ER_FAILED_ROUTINE_BREAK_BINLOG=1417;j.ER_BINLOG_UNSAFE_ROUTINE=1418;j.ER_BINLOG_CREATE_ROUTINE_NEED_SUPER=1419;j.ER_EXEC_STMT_WITH_OPEN_CURSOR=1420;j.ER_STMT_HAS_NO_OPEN_CURSOR=1421;j.ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG=1422;j.ER_NO_DEFAULT_FOR_VIEW_FIELD=1423;j.ER_SP_NO_RECURSION=1424;j.ER_TOO_BIG_SCALE=1425;j.ER_TOO_BIG_PRECISION=1426;j.ER_M_BIGGER_THAN_D=1427;j.ER_WRONG_LOCK_OF_SYSTEM_TABLE=1428;j.ER_CONNECT_TO_FOREIGN_DATA_SOURCE=1429;j.ER_QUERY_ON_FOREIGN_DATA_SOURCE=1430;j.ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST=1431;j.ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE=1432;j.ER_FOREIGN_DATA_STRING_INVALID=1433;j.ER_CANT_CREATE_FEDERATED_TABLE=1434;j.ER_TRG_IN_WRONG_SCHEMA=1435;j.ER_STACK_OVERRUN_NEED_MORE=1436;j.ER_TOO_LONG_BODY=1437;j.ER_WARN_CANT_DROP_DEFAULT_KEYCACHE=1438;j.ER_TOO_BIG_DISPLAYWIDTH=1439;j.ER_XAER_DUPID=1440;j.ER_DATETIME_FUNCTION_OVERFLOW=1441;j.ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG=1442;j.ER_VIEW_PREVENT_UPDATE=1443;j.ER_PS_NO_RECURSION=1444;j.ER_SP_CANT_SET_AUTOCOMMIT=1445;j.ER_MALFORMED_DEFINER=1446;j.ER_VIEW_FRM_NO_USER=1447;j.ER_VIEW_OTHER_USER=1448;j.ER_NO_SUCH_USER=1449;j.ER_FORBID_SCHEMA_CHANGE=1450;j.ER_ROW_IS_REFERENCED_2=1451;j.ER_NO_REFERENCED_ROW_2=1452;j.ER_SP_BAD_VAR_SHADOW=1453;j.ER_TRG_NO_DEFINER=1454;j.ER_OLD_FILE_FORMAT=1455;j.ER_SP_RECURSION_LIMIT=1456;j.ER_SP_PROC_TABLE_CORRUPT=1457;j.ER_SP_WRONG_NAME=1458;j.ER_TABLE_NEEDS_UPGRADE=1459;j.ER_SP_NO_AGGREGATE=1460;j.ER_MAX_PREPARED_STMT_COUNT_REACHED=1461;j.ER_VIEW_RECURSIVE=1462;j.ER_NON_GROUPING_FIELD_USED=1463;j.ER_TABLE_CANT_HANDLE_SPKEYS=1464;j.ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA=1465;j.ER_REMOVED_SPACES=1466;j.ER_AUTOINC_READ_FAILED=1467;j.ER_USERNAME=1468;j.ER_HOSTNAME=1469;j.ER_WRONG_STRING_LENGTH=1470;j.ER_NON_INSERTABLE_TABLE=1471;j.ER_ADMIN_WRONG_MRG_TABLE=1472;j.ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT=1473;j.ER_NAME_BECOMES_EMPTY=1474;j.ER_AMBIGUOUS_FIELD_TERM=1475;j.ER_FOREIGN_SERVER_EXISTS=1476;j.ER_FOREIGN_SERVER_DOESNT_EXIST=1477;j.ER_ILLEGAL_HA_CREATE_OPTION=1478;j.ER_PARTITION_REQUIRES_VALUES_ERROR=1479;j.ER_PARTITION_WRONG_VALUES_ERROR=1480;j.ER_PARTITION_MAXVALUE_ERROR=1481;j.ER_PARTITION_SUBPARTITION_ERROR=1482;j.ER_PARTITION_SUBPART_MIX_ERROR=1483;j.ER_PARTITION_WRONG_NO_PART_ERROR=1484;j.ER_PARTITION_WRONG_NO_SUBPART_ERROR=1485;j.ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR=1486;j.ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR=1487;j.ER_FIELD_NOT_FOUND_PART_ERROR=1488;j.ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR=1489;j.ER_INCONSISTENT_PARTITION_INFO_ERROR=1490;j.ER_PARTITION_FUNC_NOT_ALLOWED_ERROR=1491;j.ER_PARTITIONS_MUST_BE_DEFINED_ERROR=1492;j.ER_RANGE_NOT_INCREASING_ERROR=1493;j.ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR=1494;j.ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR=1495;j.ER_PARTITION_ENTRY_ERROR=1496;j.ER_MIX_HANDLER_ERROR=1497;j.ER_PARTITION_NOT_DEFINED_ERROR=1498;j.ER_TOO_MANY_PARTITIONS_ERROR=1499;j.ER_SUBPARTITION_ERROR=1500;j.ER_CANT_CREATE_HANDLER_FILE=1501;j.ER_BLOB_FIELD_IN_PART_FUNC_ERROR=1502;j.ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF=1503;j.ER_NO_PARTS_ERROR=1504;j.ER_PARTITION_MGMT_ON_NONPARTITIONED=1505;j.ER_FOREIGN_KEY_ON_PARTITIONED=1506;j.ER_DROP_PARTITION_NON_EXISTENT=1507;j.ER_DROP_LAST_PARTITION=1508;j.ER_COALESCE_ONLY_ON_HASH_PARTITION=1509;j.ER_REORG_HASH_ONLY_ON_SAME_NO=1510;j.ER_REORG_NO_PARAM_ERROR=1511;j.ER_ONLY_ON_RANGE_LIST_PARTITION=1512;j.ER_ADD_PARTITION_SUBPART_ERROR=1513;j.ER_ADD_PARTITION_NO_NEW_PARTITION=1514;j.ER_COALESCE_PARTITION_NO_PARTITION=1515;j.ER_REORG_PARTITION_NOT_EXIST=1516;j.ER_SAME_NAME_PARTITION=1517;j.ER_NO_BINLOG_ERROR=1518;j.ER_CONSECUTIVE_REORG_PARTITIONS=1519;j.ER_REORG_OUTSIDE_RANGE=1520;j.ER_PARTITION_FUNCTION_FAILURE=1521;j.ER_PART_STATE_ERROR=1522;j.ER_LIMITED_PART_RANGE=1523;j.ER_PLUGIN_IS_NOT_LOADED=1524;j.ER_WRONG_VALUE=1525;j.ER_NO_PARTITION_FOR_GIVEN_VALUE=1526;j.ER_FILEGROUP_OPTION_ONLY_ONCE=1527;j.ER_CREATE_FILEGROUP_FAILED=1528;j.ER_DROP_FILEGROUP_FAILED=1529;j.ER_TABLESPACE_AUTO_EXTEND_ERROR=1530;j.ER_WRONG_SIZE_NUMBER=1531;j.ER_SIZE_OVERFLOW_ERROR=1532;j.ER_ALTER_FILEGROUP_FAILED=1533;j.ER_BINLOG_ROW_LOGGING_FAILED=1534;j.ER_BINLOG_ROW_WRONG_TABLE_DEF=1535;j.ER_BINLOG_ROW_RBR_TO_SBR=1536;j.ER_EVENT_ALREADY_EXISTS=1537;j.ER_EVENT_STORE_FAILED=1538;j.ER_EVENT_DOES_NOT_EXIST=1539;j.ER_EVENT_CANT_ALTER=1540;j.ER_EVENT_DROP_FAILED=1541;j.ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG=1542;j.ER_EVENT_ENDS_BEFORE_STARTS=1543;j.ER_EVENT_EXEC_TIME_IN_THE_PAST=1544;j.ER_EVENT_OPEN_TABLE_FAILED=1545;j.ER_EVENT_NEITHER_M_EXPR_NOR_M_AT=1546;j.ER_COL_COUNT_DOESNT_MATCH_CORRUPTED=1547;j.ER_CANNOT_LOAD_FROM_TABLE=1548;j.ER_EVENT_CANNOT_DELETE=1549;j.ER_EVENT_COMPILE_ERROR=1550;j.ER_EVENT_SAME_NAME=1551;j.ER_EVENT_DATA_TOO_LONG=1552;j.ER_DROP_INDEX_FK=1553;j.ER_WARN_DEPRECATED_SYNTAX_WITH_VER=1554;j.ER_CANT_WRITE_LOCK_LOG_TABLE=1555;j.ER_CANT_LOCK_LOG_TABLE=1556;j.ER_FOREIGN_DUPLICATE_KEY=1557;j.ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE=1558;j.ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR=1559;j.ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT=1560;j.ER_NDB_CANT_SWITCH_BINLOG_FORMAT=1561;j.ER_PARTITION_NO_TEMPORARY=1562;j.ER_PARTITION_CONST_DOMAIN_ERROR=1563;j.ER_PARTITION_FUNCTION_IS_NOT_ALLOWED=1564;j.ER_DDL_LOG_ERROR=1565;j.ER_NULL_IN_VALUES_LESS_THAN=1566;j.ER_WRONG_PARTITION_NAME=1567;j.ER_CANT_CHANGE_TX_CHARACTERISTICS=1568;j.ER_DUP_ENTRY_AUTOINCREMENT_CASE=1569;j.ER_EVENT_MODIFY_QUEUE_ERROR=1570;j.ER_EVENT_SET_VAR_ERROR=1571;j.ER_PARTITION_MERGE_ERROR=1572;j.ER_CANT_ACTIVATE_LOG=1573;j.ER_RBR_NOT_AVAILABLE=1574;j.ER_BASE64_DECODE_ERROR=1575;j.ER_EVENT_RECURSION_FORBIDDEN=1576;j.ER_EVENTS_DB_ERROR=1577;j.ER_ONLY_INTEGERS_ALLOWED=1578;j.ER_UNSUPORTED_LOG_ENGINE=1579;j.ER_BAD_LOG_STATEMENT=1580;j.ER_CANT_RENAME_LOG_TABLE=1581;j.ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT=1582;j.ER_WRONG_PARAMETERS_TO_NATIVE_FCT=1583;j.ER_WRONG_PARAMETERS_TO_STORED_FCT=1584;j.ER_NATIVE_FCT_NAME_COLLISION=1585;j.ER_DUP_ENTRY_WITH_KEY_NAME=1586;j.ER_BINLOG_PURGE_EMFILE=1587;j.ER_EVENT_CANNOT_CREATE_IN_THE_PAST=1588;j.ER_EVENT_CANNOT_ALTER_IN_THE_PAST=1589;j.ER_SLAVE_INCIDENT=1590;j.ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT=1591;j.ER_BINLOG_UNSAFE_STATEMENT=1592;j.ER_BINLOG_FATAL_ERROR=1593;j.ER_SLAVE_RELAY_LOG_READ_FAILURE=1594;j.ER_SLAVE_RELAY_LOG_WRITE_FAILURE=1595;j.ER_SLAVE_CREATE_EVENT_FAILURE=1596;j.ER_SLAVE_MASTER_COM_FAILURE=1597;j.ER_BINLOG_LOGGING_IMPOSSIBLE=1598;j.ER_VIEW_NO_CREATION_CTX=1599;j.ER_VIEW_INVALID_CREATION_CTX=1600;j.ER_SR_INVALID_CREATION_CTX=1601;j.ER_TRG_CORRUPTED_FILE=1602;j.ER_TRG_NO_CREATION_CTX=1603;j.ER_TRG_INVALID_CREATION_CTX=1604;j.ER_EVENT_INVALID_CREATION_CTX=1605;j.ER_TRG_CANT_OPEN_TABLE=1606;j.ER_CANT_CREATE_SROUTINE=1607;j.ER_NEVER_USED=1608;j.ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT=1609;j.ER_REPLICA_CORRUPT_EVENT=1610;j.ER_LOAD_DATA_INVALID_COLUMN=1611;j.ER_LOG_PURGE_NO_FILE=1612;j.ER_XA_RBTIMEOUT=1613;j.ER_XA_RBDEADLOCK=1614;j.ER_NEED_REPREPARE=1615;j.ER_DELAYED_NOT_SUPPORTED=1616;j.WARN_NO_CONNECTION_METADATA=1617;j.WARN_OPTION_IGNORED=1618;j.ER_PLUGIN_DELETE_BUILTIN=1619;j.WARN_PLUGIN_BUSY=1620;j.ER_VARIABLE_IS_READONLY=1621;j.ER_WARN_ENGINE_TRANSACTION_ROLLBACK=1622;j.ER_SLAVE_HEARTBEAT_FAILURE=1623;j.ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE=1624;j.ER_NDB_REPLICATION_SCHEMA_ERROR=1625;j.ER_CONFLICT_FN_PARSE_ERROR=1626;j.ER_EXCEPTIONS_WRITE_ERROR=1627;j.ER_TOO_LONG_TABLE_COMMENT=1628;j.ER_TOO_LONG_FIELD_COMMENT=1629;j.ER_FUNC_INEXISTENT_NAME_COLLISION=1630;j.ER_DATABASE_NAME=1631;j.ER_TABLE_NAME=1632;j.ER_PARTITION_NAME=1633;j.ER_SUBPARTITION_NAME=1634;j.ER_TEMPORARY_NAME=1635;j.ER_RENAMED_NAME=1636;j.ER_TOO_MANY_CONCURRENT_TRXS=1637;j.WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED=1638;j.ER_DEBUG_SYNC_TIMEOUT=1639;j.ER_DEBUG_SYNC_HIT_LIMIT=1640;j.ER_DUP_SIGNAL_SET=1641;j.ER_SIGNAL_WARN=1642;j.ER_SIGNAL_NOT_FOUND=1643;j.ER_SIGNAL_EXCEPTION=1644;j.ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER=1645;j.ER_SIGNAL_BAD_CONDITION_TYPE=1646;j.WARN_COND_ITEM_TRUNCATED=1647;j.ER_COND_ITEM_TOO_LONG=1648;j.ER_UNKNOWN_LOCALE=1649;j.ER_REPLICA_IGNORE_SERVER_IDS=1650;j.ER_QUERY_CACHE_DISABLED=1651;j.ER_SAME_NAME_PARTITION_FIELD=1652;j.ER_PARTITION_COLUMN_LIST_ERROR=1653;j.ER_WRONG_TYPE_COLUMN_VALUE_ERROR=1654;j.ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR=1655;j.ER_MAXVALUE_IN_VALUES_IN=1656;j.ER_TOO_MANY_VALUES_ERROR=1657;j.ER_ROW_SINGLE_PARTITION_FIELD_ERROR=1658;j.ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD=1659;j.ER_PARTITION_FIELDS_TOO_LONG=1660;j.ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE=1661;j.ER_BINLOG_ROW_MODE_AND_STMT_ENGINE=1662;j.ER_BINLOG_UNSAFE_AND_STMT_ENGINE=1663;j.ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE=1664;j.ER_BINLOG_STMT_MODE_AND_ROW_ENGINE=1665;j.ER_BINLOG_ROW_INJECTION_AND_STMT_MODE=1666;j.ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE=1667;j.ER_BINLOG_UNSAFE_LIMIT=1668;j.ER_UNUSED4=1669;j.ER_BINLOG_UNSAFE_SYSTEM_TABLE=1670;j.ER_BINLOG_UNSAFE_AUTOINC_COLUMNS=1671;j.ER_BINLOG_UNSAFE_UDF=1672;j.ER_BINLOG_UNSAFE_SYSTEM_VARIABLE=1673;j.ER_BINLOG_UNSAFE_SYSTEM_FUNCTION=1674;j.ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS=1675;j.ER_MESSAGE_AND_STATEMENT=1676;j.ER_SLAVE_CONVERSION_FAILED=1677;j.ER_REPLICA_CANT_CREATE_CONVERSION=1678;j.ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT=1679;j.ER_PATH_LENGTH=1680;j.ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT=1681;j.ER_WRONG_NATIVE_TABLE_STRUCTURE=1682;j.ER_WRONG_PERFSCHEMA_USAGE=1683;j.ER_WARN_I_S_SKIPPED_TABLE=1684;j.ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT=1685;j.ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT=1686;j.ER_SPATIAL_MUST_HAVE_GEOM_COL=1687;j.ER_TOO_LONG_INDEX_COMMENT=1688;j.ER_LOCK_ABORTED=1689;j.ER_DATA_OUT_OF_RANGE=1690;j.ER_WRONG_SPVAR_TYPE_IN_LIMIT=1691;j.ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE=1692;j.ER_BINLOG_UNSAFE_MIXED_STATEMENT=1693;j.ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN=1694;j.ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN=1695;j.ER_FAILED_READ_FROM_PAR_FILE=1696;j.ER_VALUES_IS_NOT_INT_TYPE_ERROR=1697;j.ER_ACCESS_DENIED_NO_PASSWORD_ERROR=1698;j.ER_SET_PASSWORD_AUTH_PLUGIN=1699;j.ER_GRANT_PLUGIN_USER_EXISTS=1700;j.ER_TRUNCATE_ILLEGAL_FK=1701;j.ER_PLUGIN_IS_PERMANENT=1702;j.ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN=1703;j.ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX=1704;j.ER_STMT_CACHE_FULL=1705;j.ER_MULTI_UPDATE_KEY_CONFLICT=1706;j.ER_TABLE_NEEDS_REBUILD=1707;j.WARN_OPTION_BELOW_LIMIT=1708;j.ER_INDEX_COLUMN_TOO_LONG=1709;j.ER_ERROR_IN_TRIGGER_BODY=1710;j.ER_ERROR_IN_UNKNOWN_TRIGGER_BODY=1711;j.ER_INDEX_CORRUPT=1712;j.ER_UNDO_RECORD_TOO_BIG=1713;j.ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT=1714;j.ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE=1715;j.ER_BINLOG_UNSAFE_REPLACE_SELECT=1716;j.ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT=1717;j.ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT=1718;j.ER_BINLOG_UNSAFE_UPDATE_IGNORE=1719;j.ER_PLUGIN_NO_UNINSTALL=1720;j.ER_PLUGIN_NO_INSTALL=1721;j.ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT=1722;j.ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC=1723;j.ER_BINLOG_UNSAFE_INSERT_TWO_KEYS=1724;j.ER_TABLE_IN_FK_CHECK=1725;j.ER_UNSUPPORTED_ENGINE=1726;j.ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST=1727;j.ER_CANNOT_LOAD_FROM_TABLE_V2=1728;j.ER_SOURCE_DELAY_VALUE_OUT_OF_RANGE=1729;j.ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT=1730;j.ER_PARTITION_EXCHANGE_DIFFERENT_OPTION=1731;j.ER_PARTITION_EXCHANGE_PART_TABLE=1732;j.ER_PARTITION_EXCHANGE_TEMP_TABLE=1733;j.ER_PARTITION_INSTEAD_OF_SUBPARTITION=1734;j.ER_UNKNOWN_PARTITION=1735;j.ER_TABLES_DIFFERENT_METADATA=1736;j.ER_ROW_DOES_NOT_MATCH_PARTITION=1737;j.ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX=1738;j.ER_WARN_INDEX_NOT_APPLICABLE=1739;j.ER_PARTITION_EXCHANGE_FOREIGN_KEY=1740;j.ER_NO_SUCH_KEY_VALUE=1741;j.ER_RPL_INFO_DATA_TOO_LONG=1742;j.ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE=1743;j.ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE=1744;j.ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX=1745;j.ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT=1746;j.ER_PARTITION_CLAUSE_ON_NONPARTITIONED=1747;j.ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET=1748;j.ER_NO_SUCH_PARTITION=1749;j.ER_CHANGE_RPL_INFO_REPOSITORY_FAILURE=1750;j.ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE=1751;j.ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE=1752;j.ER_MTA_FEATURE_IS_NOT_SUPPORTED=1753;j.ER_MTA_UPDATED_DBS_GREATER_MAX=1754;j.ER_MTA_CANT_PARALLEL=1755;j.ER_MTA_INCONSISTENT_DATA=1756;j.ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING=1757;j.ER_DA_INVALID_CONDITION_NUMBER=1758;j.ER_INSECURE_PLAIN_TEXT=1759;j.ER_INSECURE_CHANGE_SOURCE=1760;j.ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO=1761;j.ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO=1762;j.ER_SQLTHREAD_WITH_SECURE_REPLICA=1763;j.ER_TABLE_HAS_NO_FT=1764;j.ER_VARIABLE_NOT_SETTABLE_IN_SF_OR_TRIGGER=1765;j.ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION=1766;j.ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST=1767;j.ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION=1768;j.ER_SET_STATEMENT_CANNOT_INVOKE_FUNCTION=1769;j.ER_GTID_NEXT_CANT_BE_AUTOMATIC_IF_GTID_NEXT_LIST_IS_NON_NULL=1770;j.ER_SKIPPING_LOGGED_TRANSACTION=1771;j.ER_MALFORMED_GTID_SET_SPECIFICATION=1772;j.ER_MALFORMED_GTID_SET_ENCODING=1773;j.ER_MALFORMED_GTID_SPECIFICATION=1774;j.ER_GNO_EXHAUSTED=1775;j.ER_BAD_REPLICA_AUTO_POSITION=1776;j.ER_AUTO_POSITION_REQUIRES_GTID_MODE_NOT_OFF=1777;j.ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET=1778;j.ER_GTID_MODE_ON_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON=1779;j.ER_GTID_MODE_REQUIRES_BINLOG=1780;j.ER_CANT_SET_GTID_NEXT_TO_GTID_WHEN_GTID_MODE_IS_OFF=1781;j.ER_CANT_SET_GTID_NEXT_TO_ANONYMOUS_WHEN_GTID_MODE_IS_ON=1782;j.ER_CANT_SET_GTID_NEXT_LIST_TO_NON_NULL_WHEN_GTID_MODE_IS_OFF=1783;j.ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF=1784;j.ER_GTID_UNSAFE_NON_TRANSACTIONAL_TABLE=1785;j.ER_GTID_UNSAFE_CREATE_SELECT=1786;j.ER_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRANSACTION=1787;j.ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME=1788;j.ER_SOURCE_HAS_PURGED_REQUIRED_GTIDS=1789;j.ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID=1790;j.ER_UNKNOWN_EXPLAIN_FORMAT=1791;j.ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION=1792;j.ER_TOO_LONG_TABLE_PARTITION_COMMENT=1793;j.ER_REPLICA_CONFIGURATION=1794;j.ER_INNODB_FT_LIMIT=1795;j.ER_INNODB_NO_FT_TEMP_TABLE=1796;j.ER_INNODB_FT_WRONG_DOCID_COLUMN=1797;j.ER_INNODB_FT_WRONG_DOCID_INDEX=1798;j.ER_INNODB_ONLINE_LOG_TOO_BIG=1799;j.ER_UNKNOWN_ALTER_ALGORITHM=1800;j.ER_UNKNOWN_ALTER_LOCK=1801;j.ER_MTA_CHANGE_SOURCE_CANT_RUN_WITH_GAPS=1802;j.ER_MTA_RECOVERY_FAILURE=1803;j.ER_MTA_RESET_WORKERS=1804;j.ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2=1805;j.ER_REPLICA_SILENT_RETRY_TRANSACTION=1806;j.ER_DISCARD_FK_CHECKS_RUNNING=1807;j.ER_TABLE_SCHEMA_MISMATCH=1808;j.ER_TABLE_IN_SYSTEM_TABLESPACE=1809;j.ER_IO_READ_ERROR=1810;j.ER_IO_WRITE_ERROR=1811;j.ER_TABLESPACE_MISSING=1812;j.ER_TABLESPACE_EXISTS=1813;j.ER_TABLESPACE_DISCARDED=1814;j.ER_INTERNAL_ERROR=1815;j.ER_INNODB_IMPORT_ERROR=1816;j.ER_INNODB_INDEX_CORRUPT=1817;j.ER_INVALID_YEAR_COLUMN_LENGTH=1818;j.ER_NOT_VALID_PASSWORD=1819;j.ER_MUST_CHANGE_PASSWORD=1820;j.ER_FK_NO_INDEX_CHILD=1821;j.ER_FK_NO_INDEX_PARENT=1822;j.ER_FK_FAIL_ADD_SYSTEM=1823;j.ER_FK_CANNOT_OPEN_PARENT=1824;j.ER_FK_INCORRECT_OPTION=1825;j.ER_FK_DUP_NAME=1826;j.ER_PASSWORD_FORMAT=1827;j.ER_FK_COLUMN_CANNOT_DROP=1828;j.ER_FK_COLUMN_CANNOT_DROP_CHILD=1829;j.ER_FK_COLUMN_NOT_NULL=1830;j.ER_DUP_INDEX=1831;j.ER_FK_COLUMN_CANNOT_CHANGE=1832;j.ER_FK_COLUMN_CANNOT_CHANGE_CHILD=1833;j.ER_UNUSED5=1834;j.ER_MALFORMED_PACKET=1835;j.ER_READ_ONLY_MODE=1836;j.ER_GTID_NEXT_TYPE_UNDEFINED_GTID=1837;j.ER_VARIABLE_NOT_SETTABLE_IN_SP=1838;j.ER_CANT_SET_GTID_PURGED_WHEN_GTID_MODE_IS_OFF=1839;j.ER_CANT_SET_GTID_PURGED_WHEN_GTID_EXECUTED_IS_NOT_EMPTY=1840;j.ER_CANT_SET_GTID_PURGED_WHEN_OWNED_GTIDS_IS_NOT_EMPTY=1841;j.ER_GTID_PURGED_WAS_CHANGED=1842;j.ER_GTID_EXECUTED_WAS_CHANGED=1843;j.ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES=1844;j.ER_ALTER_OPERATION_NOT_SUPPORTED=1845;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON=1846;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COPY=1847;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_PARTITION=1848;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME=1849;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE=1850;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_CHECK=1851;j.ER_UNUSED6=1852;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOPK=1853;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_AUTOINC=1854;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS=1855;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_CHANGE_FTS=1856;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS=1857;j.ER_SQL_REPLICA_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE=1858;j.ER_DUP_UNKNOWN_IN_INDEX=1859;j.ER_IDENT_CAUSES_TOO_LONG_PATH=1860;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL=1861;j.ER_MUST_CHANGE_PASSWORD_LOGIN=1862;j.ER_ROW_IN_WRONG_PARTITION=1863;j.ER_MTA_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX=1864;j.ER_INNODB_NO_FT_USES_PARSER=1865;j.ER_BINLOG_LOGICAL_CORRUPTION=1866;j.ER_WARN_PURGE_LOG_IN_USE=1867;j.ER_WARN_PURGE_LOG_IS_ACTIVE=1868;j.ER_AUTO_INCREMENT_CONFLICT=1869;j.WARN_ON_BLOCKHOLE_IN_RBR=1870;j.ER_REPLICA_CM_INIT_REPOSITORY=1871;j.ER_REPLICA_AM_INIT_REPOSITORY=1872;j.ER_ACCESS_DENIED_CHANGE_USER_ERROR=1873;j.ER_INNODB_READ_ONLY=1874;j.ER_STOP_REPLICA_SQL_THREAD_TIMEOUT=1875;j.ER_STOP_REPLICA_IO_THREAD_TIMEOUT=1876;j.ER_TABLE_CORRUPT=1877;j.ER_TEMP_FILE_WRITE_FAILURE=1878;j.ER_INNODB_FT_AUX_NOT_HEX_ID=1879;j.ER_OLD_TEMPORALS_UPGRADED=1880;j.ER_INNODB_FORCED_RECOVERY=1881;j.ER_AES_INVALID_IV=1882;j.ER_PLUGIN_CANNOT_BE_UNINSTALLED=1883;j.ER_GTID_UNSAFE_BINLOG_SPLITTABLE_STATEMENT_AND_ASSIGNED_GTID=1884;j.ER_REPLICA_HAS_MORE_GTIDS_THAN_SOURCE=1885;j.ER_MISSING_KEY=1886;j.WARN_NAMED_PIPE_ACCESS_EVERYONE=1887;j.ER_FILE_CORRUPT=3000;j.ER_ERROR_ON_SOURCE=3001;j.ER_INCONSISTENT_ERROR=3002;j.ER_STORAGE_ENGINE_NOT_LOADED=3003;j.ER_GET_STACKED_DA_WITHOUT_ACTIVE_HANDLER=3004;j.ER_WARN_LEGACY_SYNTAX_CONVERTED=3005;j.ER_BINLOG_UNSAFE_FULLTEXT_PLUGIN=3006;j.ER_CANNOT_DISCARD_TEMPORARY_TABLE=3007;j.ER_FK_DEPTH_EXCEEDED=3008;j.ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE_V2=3009;j.ER_WARN_TRIGGER_DOESNT_HAVE_CREATED=3010;j.ER_REFERENCED_TRG_DOES_NOT_EXIST=3011;j.ER_EXPLAIN_NOT_SUPPORTED=3012;j.ER_INVALID_FIELD_SIZE=3013;j.ER_MISSING_HA_CREATE_OPTION=3014;j.ER_ENGINE_OUT_OF_MEMORY=3015;j.ER_PASSWORD_EXPIRE_ANONYMOUS_USER=3016;j.ER_REPLICA_SQL_THREAD_MUST_STOP=3017;j.ER_NO_FT_MATERIALIZED_SUBQUERY=3018;j.ER_INNODB_UNDO_LOG_FULL=3019;j.ER_INVALID_ARGUMENT_FOR_LOGARITHM=3020;j.ER_REPLICA_CHANNEL_IO_THREAD_MUST_STOP=3021;j.ER_WARN_OPEN_TEMP_TABLES_MUST_BE_ZERO=3022;j.ER_WARN_ONLY_SOURCE_LOG_FILE_NO_POS=3023;j.ER_QUERY_TIMEOUT=3024;j.ER_NON_RO_SELECT_DISABLE_TIMER=3025;j.ER_DUP_LIST_ENTRY=3026;j.ER_SQL_MODE_NO_EFFECT=3027;j.ER_AGGREGATE_ORDER_FOR_UNION=3028;j.ER_AGGREGATE_ORDER_NON_AGG_QUERY=3029;j.ER_REPLICA_WORKER_STOPPED_PREVIOUS_THD_ERROR=3030;j.ER_DONT_SUPPORT_REPLICA_PRESERVE_COMMIT_ORDER=3031;j.ER_SERVER_OFFLINE_MODE=3032;j.ER_GIS_DIFFERENT_SRIDS=3033;j.ER_GIS_UNSUPPORTED_ARGUMENT=3034;j.ER_GIS_UNKNOWN_ERROR=3035;j.ER_GIS_UNKNOWN_EXCEPTION=3036;j.ER_GIS_INVALID_DATA=3037;j.ER_BOOST_GEOMETRY_EMPTY_INPUT_EXCEPTION=3038;j.ER_BOOST_GEOMETRY_CENTROID_EXCEPTION=3039;j.ER_BOOST_GEOMETRY_OVERLAY_INVALID_INPUT_EXCEPTION=3040;j.ER_BOOST_GEOMETRY_TURN_INFO_EXCEPTION=3041;j.ER_BOOST_GEOMETRY_SELF_INTERSECTION_POINT_EXCEPTION=3042;j.ER_BOOST_GEOMETRY_UNKNOWN_EXCEPTION=3043;j.ER_STD_BAD_ALLOC_ERROR=3044;j.ER_STD_DOMAIN_ERROR=3045;j.ER_STD_LENGTH_ERROR=3046;j.ER_STD_INVALID_ARGUMENT=3047;j.ER_STD_OUT_OF_RANGE_ERROR=3048;j.ER_STD_OVERFLOW_ERROR=3049;j.ER_STD_RANGE_ERROR=3050;j.ER_STD_UNDERFLOW_ERROR=3051;j.ER_STD_LOGIC_ERROR=3052;j.ER_STD_RUNTIME_ERROR=3053;j.ER_STD_UNKNOWN_EXCEPTION=3054;j.ER_GIS_DATA_WRONG_ENDIANESS=3055;j.ER_CHANGE_SOURCE_PASSWORD_LENGTH=3056;j.ER_USER_LOCK_WRONG_NAME=3057;j.ER_USER_LOCK_DEADLOCK=3058;j.ER_REPLACE_INACCESSIBLE_ROWS=3059;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_GIS=3060;j.ER_ILLEGAL_USER_VAR=3061;j.ER_GTID_MODE_OFF=3062;j.ER_UNSUPPORTED_BY_REPLICATION_THREAD=3063;j.ER_INCORRECT_TYPE=3064;j.ER_FIELD_IN_ORDER_NOT_SELECT=3065;j.ER_AGGREGATE_IN_ORDER_NOT_SELECT=3066;j.ER_INVALID_RPL_WILD_TABLE_FILTER_PATTERN=3067;j.ER_NET_OK_PACKET_TOO_LARGE=3068;j.ER_INVALID_JSON_DATA=3069;j.ER_INVALID_GEOJSON_MISSING_MEMBER=3070;j.ER_INVALID_GEOJSON_WRONG_TYPE=3071;j.ER_INVALID_GEOJSON_UNSPECIFIED=3072;j.ER_DIMENSION_UNSUPPORTED=3073;j.ER_REPLICA_CHANNEL_DOES_NOT_EXIST=3074;j.ER_SLAVE_MULTIPLE_CHANNELS_HOST_PORT=3075;j.ER_REPLICA_CHANNEL_NAME_INVALID_OR_TOO_LONG=3076;j.ER_REPLICA_NEW_CHANNEL_WRONG_REPOSITORY=3077;j.ER_SLAVE_CHANNEL_DELETE=3078;j.ER_REPLICA_MULTIPLE_CHANNELS_CMD=3079;j.ER_REPLICA_MAX_CHANNELS_EXCEEDED=3080;j.ER_REPLICA_CHANNEL_MUST_STOP=3081;j.ER_REPLICA_CHANNEL_NOT_RUNNING=3082;j.ER_REPLICA_CHANNEL_WAS_RUNNING=3083;j.ER_REPLICA_CHANNEL_WAS_NOT_RUNNING=3084;j.ER_REPLICA_CHANNEL_SQL_THREAD_MUST_STOP=3085;j.ER_REPLICA_CHANNEL_SQL_SKIP_COUNTER=3086;j.ER_WRONG_FIELD_WITH_GROUP_V2=3087;j.ER_MIX_OF_GROUP_FUNC_AND_FIELDS_V2=3088;j.ER_WARN_DEPRECATED_SYSVAR_UPDATE=3089;j.ER_WARN_DEPRECATED_SQLMODE=3090;j.ER_CANNOT_LOG_PARTIAL_DROP_DATABASE_WITH_GTID=3091;j.ER_GROUP_REPLICATION_CONFIGURATION=3092;j.ER_GROUP_REPLICATION_RUNNING=3093;j.ER_GROUP_REPLICATION_APPLIER_INIT_ERROR=3094;j.ER_GROUP_REPLICATION_STOP_APPLIER_THREAD_TIMEOUT=3095;j.ER_GROUP_REPLICATION_COMMUNICATION_LAYER_SESSION_ERROR=3096;j.ER_GROUP_REPLICATION_COMMUNICATION_LAYER_JOIN_ERROR=3097;j.ER_BEFORE_DML_VALIDATION_ERROR=3098;j.ER_PREVENTS_VARIABLE_WITHOUT_RBR=3099;j.ER_RUN_HOOK_ERROR=3100;j.ER_TRANSACTION_ROLLBACK_DURING_COMMIT=3101;j.ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED=3102;j.ER_UNSUPPORTED_ALTER_INPLACE_ON_VIRTUAL_COLUMN=3103;j.ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN=3104;j.ER_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN=3105;j.ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN=3106;j.ER_GENERATED_COLUMN_NON_PRIOR=3107;j.ER_DEPENDENT_BY_GENERATED_COLUMN=3108;j.ER_GENERATED_COLUMN_REF_AUTO_INC=3109;j.ER_FEATURE_NOT_AVAILABLE=3110;j.ER_CANT_SET_GTID_MODE=3111;j.ER_CANT_USE_AUTO_POSITION_WITH_GTID_MODE_OFF=3112;j.ER_CANT_REPLICATE_ANONYMOUS_WITH_AUTO_POSITION=3113;j.ER_CANT_REPLICATE_ANONYMOUS_WITH_GTID_MODE_ON=3114;j.ER_CANT_REPLICATE_GTID_WITH_GTID_MODE_OFF=3115;j.ER_CANT_ENFORCE_GTID_CONSISTENCY_WITH_ONGOING_GTID_VIOLATING_TX=3116;j.ER_ENFORCE_GTID_CONSISTENCY_WARN_WITH_ONGOING_GTID_VIOLATING_TX=3117;j.ER_ACCOUNT_HAS_BEEN_LOCKED=3118;j.ER_WRONG_TABLESPACE_NAME=3119;j.ER_TABLESPACE_IS_NOT_EMPTY=3120;j.ER_WRONG_FILE_NAME=3121;j.ER_BOOST_GEOMETRY_INCONSISTENT_TURNS_EXCEPTION=3122;j.ER_WARN_OPTIMIZER_HINT_SYNTAX_ERROR=3123;j.ER_WARN_BAD_MAX_EXECUTION_TIME=3124;j.ER_WARN_UNSUPPORTED_MAX_EXECUTION_TIME=3125;j.ER_WARN_CONFLICTING_HINT=3126;j.ER_WARN_UNKNOWN_QB_NAME=3127;j.ER_UNRESOLVED_HINT_NAME=3128;j.ER_WARN_ON_MODIFYING_GTID_EXECUTED_TABLE=3129;j.ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED=3130;j.ER_LOCKING_SERVICE_WRONG_NAME=3131;j.ER_LOCKING_SERVICE_DEADLOCK=3132;j.ER_LOCKING_SERVICE_TIMEOUT=3133;j.ER_GIS_MAX_POINTS_IN_GEOMETRY_OVERFLOWED=3134;j.ER_SQL_MODE_MERGED=3135;j.ER_VTOKEN_PLUGIN_TOKEN_MISMATCH=3136;j.ER_VTOKEN_PLUGIN_TOKEN_NOT_FOUND=3137;j.ER_CANT_SET_VARIABLE_WHEN_OWNING_GTID=3138;j.ER_REPLICA_CHANNEL_OPERATION_NOT_ALLOWED=3139;j.ER_INVALID_JSON_TEXT=3140;j.ER_INVALID_JSON_TEXT_IN_PARAM=3141;j.ER_INVALID_JSON_BINARY_DATA=3142;j.ER_INVALID_JSON_PATH=3143;j.ER_INVALID_JSON_CHARSET=3144;j.ER_INVALID_JSON_CHARSET_IN_FUNCTION=3145;j.ER_INVALID_TYPE_FOR_JSON=3146;j.ER_INVALID_CAST_TO_JSON=3147;j.ER_INVALID_JSON_PATH_CHARSET=3148;j.ER_INVALID_JSON_PATH_WILDCARD=3149;j.ER_JSON_VALUE_TOO_BIG=3150;j.ER_JSON_KEY_TOO_BIG=3151;j.ER_JSON_USED_AS_KEY=3152;j.ER_JSON_VACUOUS_PATH=3153;j.ER_JSON_BAD_ONE_OR_ALL_ARG=3154;j.ER_NUMERIC_JSON_VALUE_OUT_OF_RANGE=3155;j.ER_INVALID_JSON_VALUE_FOR_CAST=3156;j.ER_JSON_DOCUMENT_TOO_DEEP=3157;j.ER_JSON_DOCUMENT_NULL_KEY=3158;j.ER_SECURE_TRANSPORT_REQUIRED=3159;j.ER_NO_SECURE_TRANSPORTS_CONFIGURED=3160;j.ER_DISABLED_STORAGE_ENGINE=3161;j.ER_USER_DOES_NOT_EXIST=3162;j.ER_USER_ALREADY_EXISTS=3163;j.ER_AUDIT_API_ABORT=3164;j.ER_INVALID_JSON_PATH_ARRAY_CELL=3165;j.ER_BUFPOOL_RESIZE_INPROGRESS=3166;j.ER_FEATURE_DISABLED_SEE_DOC=3167;j.ER_SERVER_ISNT_AVAILABLE=3168;j.ER_SESSION_WAS_KILLED=3169;j.ER_CAPACITY_EXCEEDED=3170;j.ER_CAPACITY_EXCEEDED_IN_RANGE_OPTIMIZER=3171;j.ER_TABLE_NEEDS_UPG_PART=3172;j.ER_CANT_WAIT_FOR_EXECUTED_GTID_SET_WHILE_OWNING_A_GTID=3173;j.ER_CANNOT_ADD_FOREIGN_BASE_COL_VIRTUAL=3174;j.ER_CANNOT_CREATE_VIRTUAL_INDEX_CONSTRAINT=3175;j.ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE=3176;j.ER_LOCK_REFUSED_BY_ENGINE=3177;j.ER_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN=3178;j.ER_MASTER_KEY_ROTATION_NOT_SUPPORTED_BY_SE=3179;j.ER_MASTER_KEY_ROTATION_ERROR_BY_SE=3180;j.ER_MASTER_KEY_ROTATION_BINLOG_FAILED=3181;j.ER_MASTER_KEY_ROTATION_SE_UNAVAILABLE=3182;j.ER_TABLESPACE_CANNOT_ENCRYPT=3183;j.ER_INVALID_ENCRYPTION_OPTION=3184;j.ER_CANNOT_FIND_KEY_IN_KEYRING=3185;j.ER_CAPACITY_EXCEEDED_IN_PARSER=3186;j.ER_UNSUPPORTED_ALTER_ENCRYPTION_INPLACE=3187;j.ER_KEYRING_UDF_KEYRING_SERVICE_ERROR=3188;j.ER_USER_COLUMN_OLD_LENGTH=3189;j.ER_CANT_RESET_SOURCE=3190;j.ER_GROUP_REPLICATION_MAX_GROUP_SIZE=3191;j.ER_CANNOT_ADD_FOREIGN_BASE_COL_STORED=3192;j.ER_TABLE_REFERENCED=3193;j.ER_PARTITION_ENGINE_DEPRECATED_FOR_TABLE=3194;j.ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID_ZERO=3195;j.ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID=3196;j.ER_XA_RETRY=3197;j.ER_KEYRING_AWS_UDF_AWS_KMS_ERROR=3198;j.ER_BINLOG_UNSAFE_XA=3199;j.ER_UDF_ERROR=3200;j.ER_KEYRING_MIGRATION_FAILURE=3201;j.ER_KEYRING_ACCESS_DENIED_ERROR=3202;j.ER_KEYRING_MIGRATION_STATUS=3203;j.ER_PLUGIN_FAILED_TO_OPEN_TABLES=3204;j.ER_PLUGIN_FAILED_TO_OPEN_TABLE=3205;j.ER_AUDIT_LOG_NO_KEYRING_PLUGIN_INSTALLED=3206;j.ER_AUDIT_LOG_ENCRYPTION_PASSWORD_HAS_NOT_BEEN_SET=3207;j.ER_AUDIT_LOG_COULD_NOT_CREATE_AES_KEY=3208;j.ER_AUDIT_LOG_ENCRYPTION_PASSWORD_CANNOT_BE_FETCHED=3209;j.ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED=3210;j.ER_AUDIT_LOG_UDF_INSUFFICIENT_PRIVILEGE=3211;j.ER_AUDIT_LOG_SUPER_PRIVILEGE_REQUIRED=3212;j.ER_COULD_NOT_REINITIALIZE_AUDIT_LOG_FILTERS=3213;j.ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_TYPE=3214;j.ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_COUNT=3215;j.ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED=3216;j.ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_TYPE=3217;j.ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_VALUE=3218;j.ER_AUDIT_LOG_JSON_FILTER_PARSING_ERROR=3219;j.ER_AUDIT_LOG_JSON_FILTER_NAME_CANNOT_BE_EMPTY=3220;j.ER_AUDIT_LOG_JSON_USER_NAME_CANNOT_BE_EMPTY=3221;j.ER_AUDIT_LOG_JSON_FILTER_DOES_NOT_EXISTS=3222;j.ER_AUDIT_LOG_USER_FIRST_CHARACTER_MUST_BE_ALPHANUMERIC=3223;j.ER_AUDIT_LOG_USER_NAME_INVALID_CHARACTER=3224;j.ER_AUDIT_LOG_HOST_NAME_INVALID_CHARACTER=3225;j.WARN_DEPRECATED_MAXDB_SQL_MODE_FOR_TIMESTAMP=3226;j.ER_XA_REPLICATION_FILTERS=3227;j.ER_CANT_OPEN_ERROR_LOG=3228;j.ER_GROUPING_ON_TIMESTAMP_IN_DST=3229;j.ER_CANT_START_SERVER_NAMED_PIPE=3230;j.ER_WRITE_SET_EXCEEDS_LIMIT=3231;j.ER_DEPRECATED_TLS_VERSION_SESSION_57=3232;j.ER_WARN_DEPRECATED_TLS_VERSION_57=3233;j.ER_WARN_WRONG_NATIVE_TABLE_STRUCTURE=3234;j.ER_AES_INVALID_KDF_NAME=3235;j.ER_AES_INVALID_KDF_ITERATIONS=3236;j.WARN_AES_KEY_SIZE=3237;j.ER_AES_INVALID_KDF_OPTION_SIZE=3238;j.ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE=3500;j.ER_ACL_OPERATION_FAILED=3501;j.ER_UNSUPPORTED_INDEX_ALGORITHM=3502;j.ER_NO_SUCH_DB=3503;j.ER_TOO_BIG_ENUM=3504;j.ER_TOO_LONG_SET_ENUM_VALUE=3505;j.ER_INVALID_DD_OBJECT=3506;j.ER_UPDATING_DD_TABLE=3507;j.ER_INVALID_DD_OBJECT_ID=3508;j.ER_INVALID_DD_OBJECT_NAME=3509;j.ER_TABLESPACE_MISSING_WITH_NAME=3510;j.ER_TOO_LONG_ROUTINE_COMMENT=3511;j.ER_SP_LOAD_FAILED=3512;j.ER_INVALID_BITWISE_OPERANDS_SIZE=3513;j.ER_INVALID_BITWISE_AGGREGATE_OPERANDS_SIZE=3514;j.ER_WARN_UNSUPPORTED_HINT=3515;j.ER_UNEXPECTED_GEOMETRY_TYPE=3516;j.ER_SRS_PARSE_ERROR=3517;j.ER_SRS_PROJ_PARAMETER_MISSING=3518;j.ER_WARN_SRS_NOT_FOUND=3519;j.ER_SRS_NOT_CARTESIAN=3520;j.ER_SRS_NOT_CARTESIAN_UNDEFINED=3521;j.ER_PK_INDEX_CANT_BE_INVISIBLE=3522;j.ER_UNKNOWN_AUTHID=3523;j.ER_FAILED_ROLE_GRANT=3524;j.ER_OPEN_ROLE_TABLES=3525;j.ER_FAILED_DEFAULT_ROLES=3526;j.ER_COMPONENTS_NO_SCHEME=3527;j.ER_COMPONENTS_NO_SCHEME_SERVICE=3528;j.ER_COMPONENTS_CANT_LOAD=3529;j.ER_ROLE_NOT_GRANTED=3530;j.ER_FAILED_REVOKE_ROLE=3531;j.ER_RENAME_ROLE=3532;j.ER_COMPONENTS_CANT_ACQUIRE_SERVICE_IMPLEMENTATION=3533;j.ER_COMPONENTS_CANT_SATISFY_DEPENDENCY=3534;j.ER_COMPONENTS_LOAD_CANT_REGISTER_SERVICE_IMPLEMENTATION=3535;j.ER_COMPONENTS_LOAD_CANT_INITIALIZE=3536;j.ER_COMPONENTS_UNLOAD_NOT_LOADED=3537;j.ER_COMPONENTS_UNLOAD_CANT_DEINITIALIZE=3538;j.ER_COMPONENTS_CANT_RELEASE_SERVICE=3539;j.ER_COMPONENTS_UNLOAD_CANT_UNREGISTER_SERVICE=3540;j.ER_COMPONENTS_CANT_UNLOAD=3541;j.ER_WARN_UNLOAD_THE_NOT_PERSISTED=3542;j.ER_COMPONENT_TABLE_INCORRECT=3543;j.ER_COMPONENT_MANIPULATE_ROW_FAILED=3544;j.ER_COMPONENTS_UNLOAD_DUPLICATE_IN_GROUP=3545;j.ER_CANT_SET_GTID_PURGED_DUE_SETS_CONSTRAINTS=3546;j.ER_CANNOT_LOCK_USER_MANAGEMENT_CACHES=3547;j.ER_SRS_NOT_FOUND=3548;j.ER_VARIABLE_NOT_PERSISTED=3549;j.ER_IS_QUERY_INVALID_CLAUSE=3550;j.ER_UNABLE_TO_STORE_STATISTICS=3551;j.ER_NO_SYSTEM_SCHEMA_ACCESS=3552;j.ER_NO_SYSTEM_TABLESPACE_ACCESS=3553;j.ER_NO_SYSTEM_TABLE_ACCESS=3554;j.ER_NO_SYSTEM_TABLE_ACCESS_FOR_DICTIONARY_TABLE=3555;j.ER_NO_SYSTEM_TABLE_ACCESS_FOR_SYSTEM_TABLE=3556;j.ER_NO_SYSTEM_TABLE_ACCESS_FOR_TABLE=3557;j.ER_INVALID_OPTION_KEY=3558;j.ER_INVALID_OPTION_VALUE=3559;j.ER_INVALID_OPTION_KEY_VALUE_PAIR=3560;j.ER_INVALID_OPTION_START_CHARACTER=3561;j.ER_INVALID_OPTION_END_CHARACTER=3562;j.ER_INVALID_OPTION_CHARACTERS=3563;j.ER_DUPLICATE_OPTION_KEY=3564;j.ER_WARN_SRS_NOT_FOUND_AXIS_ORDER=3565;j.ER_NO_ACCESS_TO_NATIVE_FCT=3566;j.ER_RESET_SOURCE_TO_VALUE_OUT_OF_RANGE=3567;j.ER_UNRESOLVED_TABLE_LOCK=3568;j.ER_DUPLICATE_TABLE_LOCK=3569;j.ER_BINLOG_UNSAFE_SKIP_LOCKED=3570;j.ER_BINLOG_UNSAFE_NOWAIT=3571;j.ER_LOCK_NOWAIT=3572;j.ER_CTE_RECURSIVE_REQUIRES_UNION=3573;j.ER_CTE_RECURSIVE_REQUIRES_NONRECURSIVE_FIRST=3574;j.ER_CTE_RECURSIVE_FORBIDS_AGGREGATION=3575;j.ER_CTE_RECURSIVE_FORBIDDEN_JOIN_ORDER=3576;j.ER_CTE_RECURSIVE_REQUIRES_SINGLE_REFERENCE=3577;j.ER_SWITCH_TMP_ENGINE=3578;j.ER_WINDOW_NO_SUCH_WINDOW=3579;j.ER_WINDOW_CIRCULARITY_IN_WINDOW_GRAPH=3580;j.ER_WINDOW_NO_CHILD_PARTITIONING=3581;j.ER_WINDOW_NO_INHERIT_FRAME=3582;j.ER_WINDOW_NO_REDEFINE_ORDER_BY=3583;j.ER_WINDOW_FRAME_START_ILLEGAL=3584;j.ER_WINDOW_FRAME_END_ILLEGAL=3585;j.ER_WINDOW_FRAME_ILLEGAL=3586;j.ER_WINDOW_RANGE_FRAME_ORDER_TYPE=3587;j.ER_WINDOW_RANGE_FRAME_TEMPORAL_TYPE=3588;j.ER_WINDOW_RANGE_FRAME_NUMERIC_TYPE=3589;j.ER_WINDOW_RANGE_BOUND_NOT_CONSTANT=3590;j.ER_WINDOW_DUPLICATE_NAME=3591;j.ER_WINDOW_ILLEGAL_ORDER_BY=3592;j.ER_WINDOW_INVALID_WINDOW_FUNC_USE=3593;j.ER_WINDOW_INVALID_WINDOW_FUNC_ALIAS_USE=3594;j.ER_WINDOW_NESTED_WINDOW_FUNC_USE_IN_WINDOW_SPEC=3595;j.ER_WINDOW_ROWS_INTERVAL_USE=3596;j.ER_WINDOW_NO_GROUP_ORDER=3597;j.ER_WINDOW_EXPLAIN_JSON=3598;j.ER_WINDOW_FUNCTION_IGNORES_FRAME=3599;j.ER_WL9236_NOW=3600;j.ER_INVALID_NO_OF_ARGS=3601;j.ER_FIELD_IN_GROUPING_NOT_GROUP_BY=3602;j.ER_TOO_LONG_TABLESPACE_COMMENT=3603;j.ER_ENGINE_CANT_DROP_TABLE=3604;j.ER_ENGINE_CANT_DROP_MISSING_TABLE=3605;j.ER_TABLESPACE_DUP_FILENAME=3606;j.ER_DB_DROP_RMDIR2=3607;j.ER_IMP_NO_FILES_MATCHED=3608;j.ER_IMP_SCHEMA_DOES_NOT_EXIST=3609;j.ER_IMP_TABLE_ALREADY_EXISTS=3610;j.ER_IMP_INCOMPATIBLE_MYSQLD_VERSION=3611;j.ER_IMP_INCOMPATIBLE_DD_VERSION=3612;j.ER_IMP_INCOMPATIBLE_SDI_VERSION=3613;j.ER_WARN_INVALID_HINT=3614;j.ER_VAR_DOES_NOT_EXIST=3615;j.ER_LONGITUDE_OUT_OF_RANGE=3616;j.ER_LATITUDE_OUT_OF_RANGE=3617;j.ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS=3618;j.ER_ILLEGAL_PRIVILEGE_LEVEL=3619;j.ER_NO_SYSTEM_VIEW_ACCESS=3620;j.ER_COMPONENT_FILTER_FLABBERGASTED=3621;j.ER_PART_EXPR_TOO_LONG=3622;j.ER_UDF_DROP_DYNAMICALLY_REGISTERED=3623;j.ER_UNABLE_TO_STORE_COLUMN_STATISTICS=3624;j.ER_UNABLE_TO_UPDATE_COLUMN_STATISTICS=3625;j.ER_UNABLE_TO_DROP_COLUMN_STATISTICS=3626;j.ER_UNABLE_TO_BUILD_HISTOGRAM=3627;j.ER_MANDATORY_ROLE=3628;j.ER_MISSING_TABLESPACE_FILE=3629;j.ER_PERSIST_ONLY_ACCESS_DENIED_ERROR=3630;j.ER_CMD_NEED_SUPER=3631;j.ER_PATH_IN_DATADIR=3632;j.ER_CLONE_DDL_IN_PROGRESS=3633;j.ER_CLONE_TOO_MANY_CONCURRENT_CLONES=3634;j.ER_APPLIER_LOG_EVENT_VALIDATION_ERROR=3635;j.ER_CTE_MAX_RECURSION_DEPTH=3636;j.ER_NOT_HINT_UPDATABLE_VARIABLE=3637;j.ER_CREDENTIALS_CONTRADICT_TO_HISTORY=3638;j.ER_WARNING_PASSWORD_HISTORY_CLAUSES_VOID=3639;j.ER_CLIENT_DOES_NOT_SUPPORT=3640;j.ER_I_S_SKIPPED_TABLESPACE=3641;j.ER_TABLESPACE_ENGINE_MISMATCH=3642;j.ER_WRONG_SRID_FOR_COLUMN=3643;j.ER_CANNOT_ALTER_SRID_DUE_TO_INDEX=3644;j.ER_WARN_BINLOG_PARTIAL_UPDATES_DISABLED=3645;j.ER_WARN_BINLOG_V1_ROW_EVENTS_DISABLED=3646;j.ER_WARN_BINLOG_PARTIAL_UPDATES_SUGGESTS_PARTIAL_IMAGES=3647;j.ER_COULD_NOT_APPLY_JSON_DIFF=3648;j.ER_CORRUPTED_JSON_DIFF=3649;j.ER_RESOURCE_GROUP_EXISTS=3650;j.ER_RESOURCE_GROUP_NOT_EXISTS=3651;j.ER_INVALID_VCPU_ID=3652;j.ER_INVALID_VCPU_RANGE=3653;j.ER_INVALID_THREAD_PRIORITY=3654;j.ER_DISALLOWED_OPERATION=3655;j.ER_RESOURCE_GROUP_BUSY=3656;j.ER_RESOURCE_GROUP_DISABLED=3657;j.ER_FEATURE_UNSUPPORTED=3658;j.ER_ATTRIBUTE_IGNORED=3659;j.ER_INVALID_THREAD_ID=3660;j.ER_RESOURCE_GROUP_BIND_FAILED=3661;j.ER_INVALID_USE_OF_FORCE_OPTION=3662;j.ER_GROUP_REPLICATION_COMMAND_FAILURE=3663;j.ER_SDI_OPERATION_FAILED=3664;j.ER_MISSING_JSON_TABLE_VALUE=3665;j.ER_WRONG_JSON_TABLE_VALUE=3666;j.ER_TF_MUST_HAVE_ALIAS=3667;j.ER_TF_FORBIDDEN_JOIN_TYPE=3668;j.ER_JT_VALUE_OUT_OF_RANGE=3669;j.ER_JT_MAX_NESTED_PATH=3670;j.ER_PASSWORD_EXPIRATION_NOT_SUPPORTED_BY_AUTH_METHOD=3671;j.ER_INVALID_GEOJSON_CRS_NOT_TOP_LEVEL=3672;j.ER_BAD_NULL_ERROR_NOT_IGNORED=3673;j.WARN_USELESS_SPATIAL_INDEX=3674;j.ER_DISK_FULL_NOWAIT=3675;j.ER_PARSE_ERROR_IN_DIGEST_FN=3676;j.ER_UNDISCLOSED_PARSE_ERROR_IN_DIGEST_FN=3677;j.ER_SCHEMA_DIR_EXISTS=3678;j.ER_SCHEMA_DIR_MISSING=3679;j.ER_SCHEMA_DIR_CREATE_FAILED=3680;j.ER_SCHEMA_DIR_UNKNOWN=3681;j.ER_ONLY_IMPLEMENTED_FOR_SRID_0_AND_4326=3682;j.ER_BINLOG_EXPIRE_LOG_DAYS_AND_SECS_USED_TOGETHER=3683;j.ER_REGEXP_BUFFER_OVERFLOW=3684;j.ER_REGEXP_ILLEGAL_ARGUMENT=3685;j.ER_REGEXP_INDEX_OUTOFBOUNDS_ERROR=3686;j.ER_REGEXP_INTERNAL_ERROR=3687;j.ER_REGEXP_RULE_SYNTAX=3688;j.ER_REGEXP_BAD_ESCAPE_SEQUENCE=3689;j.ER_REGEXP_UNIMPLEMENTED=3690;j.ER_REGEXP_MISMATCHED_PAREN=3691;j.ER_REGEXP_BAD_INTERVAL=3692;j.ER_REGEXP_MAX_LT_MIN=3693;j.ER_REGEXP_INVALID_BACK_REF=3694;j.ER_REGEXP_LOOK_BEHIND_LIMIT=3695;j.ER_REGEXP_MISSING_CLOSE_BRACKET=3696;j.ER_REGEXP_INVALID_RANGE=3697;j.ER_REGEXP_STACK_OVERFLOW=3698;j.ER_REGEXP_TIME_OUT=3699;j.ER_REGEXP_PATTERN_TOO_BIG=3700;j.ER_CANT_SET_ERROR_LOG_SERVICE=3701;j.ER_EMPTY_PIPELINE_FOR_ERROR_LOG_SERVICE=3702;j.ER_COMPONENT_FILTER_DIAGNOSTICS=3703;j.ER_NOT_IMPLEMENTED_FOR_CARTESIAN_SRS=3704;j.ER_NOT_IMPLEMENTED_FOR_PROJECTED_SRS=3705;j.ER_NONPOSITIVE_RADIUS=3706;j.ER_RESTART_SERVER_FAILED=3707;j.ER_SRS_MISSING_MANDATORY_ATTRIBUTE=3708;j.ER_SRS_MULTIPLE_ATTRIBUTE_DEFINITIONS=3709;j.ER_SRS_NAME_CANT_BE_EMPTY_OR_WHITESPACE=3710;j.ER_SRS_ORGANIZATION_CANT_BE_EMPTY_OR_WHITESPACE=3711;j.ER_SRS_ID_ALREADY_EXISTS=3712;j.ER_WARN_SRS_ID_ALREADY_EXISTS=3713;j.ER_CANT_MODIFY_SRID_0=3714;j.ER_WARN_RESERVED_SRID_RANGE=3715;j.ER_CANT_MODIFY_SRS_USED_BY_COLUMN=3716;j.ER_SRS_INVALID_CHARACTER_IN_ATTRIBUTE=3717;j.ER_SRS_ATTRIBUTE_STRING_TOO_LONG=3718;j.ER_DEPRECATED_UTF8_ALIAS=3719;j.ER_DEPRECATED_NATIONAL=3720;j.ER_INVALID_DEFAULT_UTF8MB4_COLLATION=3721;j.ER_UNABLE_TO_COLLECT_LOG_STATUS=3722;j.ER_RESERVED_TABLESPACE_NAME=3723;j.ER_UNABLE_TO_SET_OPTION=3724;j.ER_REPLICA_POSSIBLY_DIVERGED_AFTER_DDL=3725;j.ER_SRS_NOT_GEOGRAPHIC=3726;j.ER_POLYGON_TOO_LARGE=3727;j.ER_SPATIAL_UNIQUE_INDEX=3728;j.ER_INDEX_TYPE_NOT_SUPPORTED_FOR_SPATIAL_INDEX=3729;j.ER_FK_CANNOT_DROP_PARENT=3730;j.ER_GEOMETRY_PARAM_LONGITUDE_OUT_OF_RANGE=3731;j.ER_GEOMETRY_PARAM_LATITUDE_OUT_OF_RANGE=3732;j.ER_FK_CANNOT_USE_VIRTUAL_COLUMN=3733;j.ER_FK_NO_COLUMN_PARENT=3734;j.ER_CANT_SET_ERROR_SUPPRESSION_LIST=3735;j.ER_SRS_GEOGCS_INVALID_AXES=3736;j.ER_SRS_INVALID_SEMI_MAJOR_AXIS=3737;j.ER_SRS_INVALID_INVERSE_FLATTENING=3738;j.ER_SRS_INVALID_ANGULAR_UNIT=3739;j.ER_SRS_INVALID_PRIME_MERIDIAN=3740;j.ER_TRANSFORM_SOURCE_SRS_NOT_SUPPORTED=3741;j.ER_TRANSFORM_TARGET_SRS_NOT_SUPPORTED=3742;j.ER_TRANSFORM_SOURCE_SRS_MISSING_TOWGS84=3743;j.ER_TRANSFORM_TARGET_SRS_MISSING_TOWGS84=3744;j.ER_TEMP_TABLE_PREVENTS_SWITCH_SESSION_BINLOG_FORMAT=3745;j.ER_TEMP_TABLE_PREVENTS_SWITCH_GLOBAL_BINLOG_FORMAT=3746;j.ER_RUNNING_APPLIER_PREVENTS_SWITCH_GLOBAL_BINLOG_FORMAT=3747;j.ER_CLIENT_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRX_IN_SBR=3748;j.ER_XA_CANT_CREATE_MDL_BACKUP=3749;j.ER_TABLE_WITHOUT_PK=3750;j.ER_WARN_DATA_TRUNCATED_FUNCTIONAL_INDEX=3751;j.ER_WARN_DATA_OUT_OF_RANGE_FUNCTIONAL_INDEX=3752;j.ER_FUNCTIONAL_INDEX_ON_JSON_OR_GEOMETRY_FUNCTION=3753;j.ER_FUNCTIONAL_INDEX_REF_AUTO_INCREMENT=3754;j.ER_CANNOT_DROP_COLUMN_FUNCTIONAL_INDEX=3755;j.ER_FUNCTIONAL_INDEX_PRIMARY_KEY=3756;j.ER_FUNCTIONAL_INDEX_ON_LOB=3757;j.ER_FUNCTIONAL_INDEX_FUNCTION_IS_NOT_ALLOWED=3758;j.ER_FULLTEXT_FUNCTIONAL_INDEX=3759;j.ER_SPATIAL_FUNCTIONAL_INDEX=3760;j.ER_WRONG_KEY_COLUMN_FUNCTIONAL_INDEX=3761;j.ER_FUNCTIONAL_INDEX_ON_FIELD=3762;j.ER_GENERATED_COLUMN_NAMED_FUNCTION_IS_NOT_ALLOWED=3763;j.ER_GENERATED_COLUMN_ROW_VALUE=3764;j.ER_GENERATED_COLUMN_VARIABLES=3765;j.ER_DEPENDENT_BY_DEFAULT_GENERATED_VALUE=3766;j.ER_DEFAULT_VAL_GENERATED_NON_PRIOR=3767;j.ER_DEFAULT_VAL_GENERATED_REF_AUTO_INC=3768;j.ER_DEFAULT_VAL_GENERATED_FUNCTION_IS_NOT_ALLOWED=3769;j.ER_DEFAULT_VAL_GENERATED_NAMED_FUNCTION_IS_NOT_ALLOWED=3770;j.ER_DEFAULT_VAL_GENERATED_ROW_VALUE=3771;j.ER_DEFAULT_VAL_GENERATED_VARIABLES=3772;j.ER_DEFAULT_AS_VAL_GENERATED=3773;j.ER_UNSUPPORTED_ACTION_ON_DEFAULT_VAL_GENERATED=3774;j.ER_GTID_UNSAFE_ALTER_ADD_COL_WITH_DEFAULT_EXPRESSION=3775;j.ER_FK_CANNOT_CHANGE_ENGINE=3776;j.ER_WARN_DEPRECATED_USER_SET_EXPR=3777;j.ER_WARN_DEPRECATED_UTF8MB3_COLLATION=3778;j.ER_WARN_DEPRECATED_NESTED_COMMENT_SYNTAX=3779;j.ER_FK_INCOMPATIBLE_COLUMNS=3780;j.ER_GR_HOLD_WAIT_TIMEOUT=3781;j.ER_GR_HOLD_KILLED=3782;j.ER_GR_HOLD_MEMBER_STATUS_ERROR=3783;j.ER_RPL_ENCRYPTION_FAILED_TO_FETCH_KEY=3784;j.ER_RPL_ENCRYPTION_KEY_NOT_FOUND=3785;j.ER_RPL_ENCRYPTION_KEYRING_INVALID_KEY=3786;j.ER_RPL_ENCRYPTION_HEADER_ERROR=3787;j.ER_RPL_ENCRYPTION_FAILED_TO_ROTATE_LOGS=3788;j.ER_RPL_ENCRYPTION_KEY_EXISTS_UNEXPECTED=3789;j.ER_RPL_ENCRYPTION_FAILED_TO_GENERATE_KEY=3790;j.ER_RPL_ENCRYPTION_FAILED_TO_STORE_KEY=3791;j.ER_RPL_ENCRYPTION_FAILED_TO_REMOVE_KEY=3792;j.ER_RPL_ENCRYPTION_UNABLE_TO_CHANGE_OPTION=3793;j.ER_RPL_ENCRYPTION_MASTER_KEY_RECOVERY_FAILED=3794;j.ER_SLOW_LOG_MODE_IGNORED_WHEN_NOT_LOGGING_TO_FILE=3795;j.ER_GRP_TRX_CONSISTENCY_NOT_ALLOWED=3796;j.ER_GRP_TRX_CONSISTENCY_BEFORE=3797;j.ER_GRP_TRX_CONSISTENCY_AFTER_ON_TRX_BEGIN=3798;j.ER_GRP_TRX_CONSISTENCY_BEGIN_NOT_ALLOWED=3799;j.ER_FUNCTIONAL_INDEX_ROW_VALUE_IS_NOT_ALLOWED=3800;j.ER_RPL_ENCRYPTION_FAILED_TO_ENCRYPT=3801;j.ER_PAGE_TRACKING_NOT_STARTED=3802;j.ER_PAGE_TRACKING_RANGE_NOT_TRACKED=3803;j.ER_PAGE_TRACKING_CANNOT_PURGE=3804;j.ER_RPL_ENCRYPTION_CANNOT_ROTATE_BINLOG_MASTER_KEY=3805;j.ER_BINLOG_MASTER_KEY_RECOVERY_OUT_OF_COMBINATION=3806;j.ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_OPERATE_KEY=3807;j.ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_ROTATE_LOGS=3808;j.ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_REENCRYPT_LOG=3809;j.ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_UNUSED_KEYS=3810;j.ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_AUX_KEY=3811;j.ER_NON_BOOLEAN_EXPR_FOR_CHECK_CONSTRAINT=3812;j.ER_COLUMN_CHECK_CONSTRAINT_REFERENCES_OTHER_COLUMN=3813;j.ER_CHECK_CONSTRAINT_NAMED_FUNCTION_IS_NOT_ALLOWED=3814;j.ER_CHECK_CONSTRAINT_FUNCTION_IS_NOT_ALLOWED=3815;j.ER_CHECK_CONSTRAINT_VARIABLES=3816;j.ER_CHECK_CONSTRAINT_ROW_VALUE=3817;j.ER_CHECK_CONSTRAINT_REFERS_AUTO_INCREMENT_COLUMN=3818;j.ER_CHECK_CONSTRAINT_VIOLATED=3819;j.ER_CHECK_CONSTRAINT_REFERS_UNKNOWN_COLUMN=3820;j.ER_CHECK_CONSTRAINT_NOT_FOUND=3821;j.ER_CHECK_CONSTRAINT_DUP_NAME=3822;j.ER_CHECK_CONSTRAINT_CLAUSE_USING_FK_REFER_ACTION_COLUMN=3823;j.WARN_UNENCRYPTED_TABLE_IN_ENCRYPTED_DB=3824;j.ER_INVALID_ENCRYPTION_REQUEST=3825;j.ER_CANNOT_SET_TABLE_ENCRYPTION=3826;j.ER_CANNOT_SET_DATABASE_ENCRYPTION=3827;j.ER_CANNOT_SET_TABLESPACE_ENCRYPTION=3828;j.ER_TABLESPACE_CANNOT_BE_ENCRYPTED=3829;j.ER_TABLESPACE_CANNOT_BE_DECRYPTED=3830;j.ER_TABLESPACE_TYPE_UNKNOWN=3831;j.ER_TARGET_TABLESPACE_UNENCRYPTED=3832;j.ER_CANNOT_USE_ENCRYPTION_CLAUSE=3833;j.ER_INVALID_MULTIPLE_CLAUSES=3834;j.ER_UNSUPPORTED_USE_OF_GRANT_AS=3835;j.ER_UKNOWN_AUTH_ID_OR_ACCESS_DENIED_FOR_GRANT_AS=3836;j.ER_DEPENDENT_BY_FUNCTIONAL_INDEX=3837;j.ER_PLUGIN_NOT_EARLY=3838;j.ER_INNODB_REDO_LOG_ARCHIVE_START_SUBDIR_PATH=3839;j.ER_INNODB_REDO_LOG_ARCHIVE_START_TIMEOUT=3840;j.ER_INNODB_REDO_LOG_ARCHIVE_DIRS_INVALID=3841;j.ER_INNODB_REDO_LOG_ARCHIVE_LABEL_NOT_FOUND=3842;j.ER_INNODB_REDO_LOG_ARCHIVE_DIR_EMPTY=3843;j.ER_INNODB_REDO_LOG_ARCHIVE_NO_SUCH_DIR=3844;j.ER_INNODB_REDO_LOG_ARCHIVE_DIR_CLASH=3845;j.ER_INNODB_REDO_LOG_ARCHIVE_DIR_PERMISSIONS=3846;j.ER_INNODB_REDO_LOG_ARCHIVE_FILE_CREATE=3847;j.ER_INNODB_REDO_LOG_ARCHIVE_ACTIVE=3848;j.ER_INNODB_REDO_LOG_ARCHIVE_INACTIVE=3849;j.ER_INNODB_REDO_LOG_ARCHIVE_FAILED=3850;j.ER_INNODB_REDO_LOG_ARCHIVE_SESSION=3851;j.ER_STD_REGEX_ERROR=3852;j.ER_INVALID_JSON_TYPE=3853;j.ER_CANNOT_CONVERT_STRING=3854;j.ER_DEPENDENT_BY_PARTITION_FUNC=3855;j.ER_WARN_DEPRECATED_FLOAT_AUTO_INCREMENT=3856;j.ER_RPL_CANT_STOP_REPLICA_WHILE_LOCKED_BACKUP=3857;j.ER_WARN_DEPRECATED_FLOAT_DIGITS=3858;j.ER_WARN_DEPRECATED_FLOAT_UNSIGNED=3859;j.ER_WARN_DEPRECATED_INTEGER_DISPLAY_WIDTH=3860;j.ER_WARN_DEPRECATED_ZEROFILL=3861;j.ER_CLONE_DONOR=3862;j.ER_CLONE_PROTOCOL=3863;j.ER_CLONE_DONOR_VERSION=3864;j.ER_CLONE_OS=3865;j.ER_CLONE_PLATFORM=3866;j.ER_CLONE_CHARSET=3867;j.ER_CLONE_CONFIG=3868;j.ER_CLONE_SYS_CONFIG=3869;j.ER_CLONE_PLUGIN_MATCH=3870;j.ER_CLONE_LOOPBACK=3871;j.ER_CLONE_ENCRYPTION=3872;j.ER_CLONE_DISK_SPACE=3873;j.ER_CLONE_IN_PROGRESS=3874;j.ER_CLONE_DISALLOWED=3875;j.ER_CANNOT_GRANT_ROLES_TO_ANONYMOUS_USER=3876;j.ER_SECONDARY_ENGINE_PLUGIN=3877;j.ER_SECOND_PASSWORD_CANNOT_BE_EMPTY=3878;j.ER_DB_ACCESS_DENIED=3879;j.ER_DA_AUTH_ID_WITH_SYSTEM_USER_PRIV_IN_MANDATORY_ROLES=3880;j.ER_DA_RPL_GTID_TABLE_CANNOT_OPEN=3881;j.ER_GEOMETRY_IN_UNKNOWN_LENGTH_UNIT=3882;j.ER_DA_PLUGIN_INSTALL_ERROR=3883;j.ER_NO_SESSION_TEMP=3884;j.ER_DA_UNKNOWN_ERROR_NUMBER=3885;j.ER_COLUMN_CHANGE_SIZE=3886;j.ER_REGEXP_INVALID_CAPTURE_GROUP_NAME=3887;j.ER_DA_SSL_LIBRARY_ERROR=3888;j.ER_SECONDARY_ENGINE=3889;j.ER_SECONDARY_ENGINE_DDL=3890;j.ER_INCORRECT_CURRENT_PASSWORD=3891;j.ER_MISSING_CURRENT_PASSWORD=3892;j.ER_CURRENT_PASSWORD_NOT_REQUIRED=3893;j.ER_PASSWORD_CANNOT_BE_RETAINED_ON_PLUGIN_CHANGE=3894;j.ER_CURRENT_PASSWORD_CANNOT_BE_RETAINED=3895;j.ER_PARTIAL_REVOKES_EXIST=3896;j.ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE=3897;j.ER_XA_REPLICATION_FILTERS=3898;j.ER_UNSUPPORTED_SQL_MODE=3899;j.ER_REGEXP_INVALID_FLAG=3900;j.ER_PARTIAL_REVOKE_AND_DB_GRANT_BOTH_EXISTS=3901;j.ER_UNIT_NOT_FOUND=3902;j.ER_INVALID_JSON_VALUE_FOR_FUNC_INDEX=3903;j.ER_JSON_VALUE_OUT_OF_RANGE_FOR_FUNC_INDEX=3904;j.ER_EXCEEDED_MV_KEYS_NUM=3905;j.ER_EXCEEDED_MV_KEYS_SPACE=3906;j.ER_FUNCTIONAL_INDEX_DATA_IS_TOO_LONG=3907;j.ER_WRONG_MVI_VALUE=3908;j.ER_WARN_FUNC_INDEX_NOT_APPLICABLE=3909;j.ER_GRP_RPL_UDF_ERROR=3910;j.ER_UPDATE_GTID_PURGED_WITH_GR=3911;j.ER_GROUPING_ON_TIMESTAMP_IN_DST=3912;j.ER_TABLE_NAME_CAUSES_TOO_LONG_PATH=3913;j.ER_AUDIT_LOG_INSUFFICIENT_PRIVILEGE=3914;j.ER_AUDIT_LOG_PASSWORD_HAS_BEEN_COPIED=3915;j.ER_DA_GRP_RPL_STARTED_AUTO_REJOIN=3916;j.ER_SYSVAR_CHANGE_DURING_QUERY=3917;j.ER_GLOBSTAT_CHANGE_DURING_QUERY=3918;j.ER_GRP_RPL_MESSAGE_SERVICE_INIT_FAILURE=3919;j.ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_CLIENT=3920;j.ER_CHANGE_SOURCE_WRONG_COMPRESSION_LEVEL_CLIENT=3921;j.ER_WRONG_COMPRESSION_ALGORITHM_CLIENT=3922;j.ER_WRONG_COMPRESSION_LEVEL_CLIENT=3923;j.ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_LIST_CLIENT=3924;j.ER_CLIENT_PRIVILEGE_CHECKS_USER_CANNOT_BE_ANONYMOUS=3925;j.ER_CLIENT_PRIVILEGE_CHECKS_USER_DOES_NOT_EXIST=3926;j.ER_CLIENT_PRIVILEGE_CHECKS_USER_CORRUPT=3927;j.ER_CLIENT_PRIVILEGE_CHECKS_USER_NEEDS_RPL_APPLIER_PRIV=3928;j.ER_WARN_DA_PRIVILEGE_NOT_REGISTERED=3929;j.ER_CLIENT_KEYRING_UDF_KEY_INVALID=3930;j.ER_CLIENT_KEYRING_UDF_KEY_TYPE_INVALID=3931;j.ER_CLIENT_KEYRING_UDF_KEY_TOO_LONG=3932;j.ER_CLIENT_KEYRING_UDF_KEY_TYPE_TOO_LONG=3933;j.ER_JSON_SCHEMA_VALIDATION_ERROR_WITH_DETAILED_REPORT=3934;j.ER_DA_UDF_INVALID_CHARSET_SPECIFIED=3935;j.ER_DA_UDF_INVALID_CHARSET=3936;j.ER_DA_UDF_INVALID_COLLATION=3937;j.ER_DA_UDF_INVALID_EXTENSION_ARGUMENT_TYPE=3938;j.ER_MULTIPLE_CONSTRAINTS_WITH_SAME_NAME=3939;j.ER_CONSTRAINT_NOT_FOUND=3940;j.ER_ALTER_CONSTRAINT_ENFORCEMENT_NOT_SUPPORTED=3941;j.ER_TABLE_VALUE_CONSTRUCTOR_MUST_HAVE_COLUMNS=3942;j.ER_TABLE_VALUE_CONSTRUCTOR_CANNOT_HAVE_DEFAULT=3943;j.ER_CLIENT_QUERY_FAILURE_INVALID_NON_ROW_FORMAT=3944;j.ER_REQUIRE_ROW_FORMAT_INVALID_VALUE=3945;j.ER_FAILED_TO_DETERMINE_IF_ROLE_IS_MANDATORY=3946;j.ER_FAILED_TO_FETCH_MANDATORY_ROLE_LIST=3947;j.ER_CLIENT_LOCAL_FILES_DISABLED=3948;j.ER_IMP_INCOMPATIBLE_CFG_VERSION=3949;j.ER_DA_OOM=3950;j.ER_DA_UDF_INVALID_ARGUMENT_TO_SET_CHARSET=3951;j.ER_DA_UDF_INVALID_RETURN_TYPE_TO_SET_CHARSET=3952;j.ER_MULTIPLE_INTO_CLAUSES=3953;j.ER_MISPLACED_INTO=3954;j.ER_USER_ACCESS_DENIED_FOR_USER_ACCOUNT_BLOCKED_BY_PASSWORD_LOCK=3955;j.ER_WARN_DEPRECATED_YEAR_UNSIGNED=3956;j.ER_CLONE_NETWORK_PACKET=3957;j.ER_SDI_OPERATION_FAILED_MISSING_RECORD=3958;j.ER_DEPENDENT_BY_CHECK_CONSTRAINT=3959;j.ER_GRP_OPERATION_NOT_ALLOWED_GR_MUST_STOP=3960;j.ER_WARN_DEPRECATED_JSON_TABLE_ON_ERROR_ON_EMPTY=3961;j.ER_WARN_DEPRECATED_INNER_INTO=3962;j.ER_WARN_DEPRECATED_VALUES_FUNCTION_ALWAYS_NULL=3963;j.ER_WARN_DEPRECATED_SQL_CALC_FOUND_ROWS=3964;j.ER_WARN_DEPRECATED_FOUND_ROWS=3965;j.ER_MISSING_JSON_VALUE=3966;j.ER_MULTIPLE_JSON_VALUES=3967;j.ER_HOSTNAME_TOO_LONG=3968;j.ER_WARN_CLIENT_DEPRECATED_PARTITION_PREFIX_KEY=3969;j.ER_GROUP_REPLICATION_USER_EMPTY_MSG=3970;j.ER_GROUP_REPLICATION_USER_MANDATORY_MSG=3971;j.ER_GROUP_REPLICATION_PASSWORD_LENGTH=3972;j.ER_SUBQUERY_TRANSFORM_REJECTED=3973;j.ER_DA_GRP_RPL_RECOVERY_ENDPOINT_FORMAT=3974;j.ER_DA_GRP_RPL_RECOVERY_ENDPOINT_INVALID=3975;j.ER_WRONG_VALUE_FOR_VAR_PLUS_ACTIONABLE_PART=3976;j.ER_STATEMENT_NOT_ALLOWED_AFTER_START_TRANSACTION=3977;j.ER_FOREIGN_KEY_WITH_ATOMIC_CREATE_SELECT=3978;j.ER_NOT_ALLOWED_WITH_START_TRANSACTION=3979;j.ER_INVALID_JSON_ATTRIBUTE=3980;j.ER_ENGINE_ATTRIBUTE_NOT_SUPPORTED=3981;j.ER_INVALID_USER_ATTRIBUTE_JSON=3982;j.ER_INNODB_REDO_DISABLED=3983;j.ER_INNODB_REDO_ARCHIVING_ENABLED=3984;j.ER_MDL_OUT_OF_RESOURCES=3985;j.ER_IMPLICIT_COMPARISON_FOR_JSON=3986;j.ER_FUNCTION_DOES_NOT_SUPPORT_CHARACTER_SET=3987;j.ER_IMPOSSIBLE_STRING_CONVERSION=3988;j.ER_SCHEMA_READ_ONLY=3989;j.ER_RPL_ASYNC_RECONNECT_GTID_MODE_OFF=3990;j.ER_RPL_ASYNC_RECONNECT_AUTO_POSITION_OFF=3991;j.ER_DISABLE_GTID_MODE_REQUIRES_ASYNC_RECONNECT_OFF=3992;j.ER_DISABLE_AUTO_POSITION_REQUIRES_ASYNC_RECONNECT_OFF=3993;j.ER_INVALID_PARAMETER_USE=3994;j.ER_CHARACTER_SET_MISMATCH=3995;j.ER_WARN_VAR_VALUE_CHANGE_NOT_SUPPORTED=3996;j.ER_INVALID_TIME_ZONE_INTERVAL=3997;j.ER_INVALID_CAST=3998;j.ER_HYPERGRAPH_NOT_SUPPORTED_YET=3999;j.ER_WARN_HYPERGRAPH_EXPERIMENTAL=4000;j.ER_DA_NO_ERROR_LOG_PARSER_CONFIGURED=4001;j.ER_DA_ERROR_LOG_TABLE_DISABLED=4002;j.ER_DA_ERROR_LOG_MULTIPLE_FILTERS=4003;j.ER_DA_CANT_OPEN_ERROR_LOG=4004;j.ER_USER_REFERENCED_AS_DEFINER=4005;j.ER_CANNOT_USER_REFERENCED_AS_DEFINER=4006;j.ER_REGEX_NUMBER_TOO_BIG=4007;j.ER_SPVAR_NONINTEGER_TYPE=4008;j.WARN_UNSUPPORTED_ACL_TABLES_READ=4009;j.ER_BINLOG_UNSAFE_ACL_TABLE_READ_IN_DML_DDL=4010;j.ER_STOP_REPLICA_MONITOR_IO_THREAD_TIMEOUT=4011;j.ER_STARTING_REPLICA_MONITOR_IO_THREAD=4012;j.ER_CANT_USE_ANONYMOUS_TO_GTID_WITH_GTID_MODE_NOT_ON=4013;j.ER_CANT_COMBINE_ANONYMOUS_TO_GTID_AND_AUTOPOSITION=4014;j.ER_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_REQUIRES_GTID_MODE_ON=4015;j.ER_SQL_REPLICA_SKIP_COUNTER_USED_WITH_GTID_MODE_ON=4016;j.ER_USING_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_AS_LOCAL_OR_UUID=4017;j.ER_CANT_SET_ANONYMOUS_TO_GTID_AND_WAIT_UNTIL_SQL_THD_AFTER_GTIDS=4018;j.ER_CANT_SET_SQL_AFTER_OR_BEFORE_GTIDS_WITH_ANONYMOUS_TO_GTID=4019;j.ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME=4020;j.ER_CANT_USE_SAME_UUID_AS_GROUP_NAME=4021;j.ER_GRP_RPL_RECOVERY_CHANNEL_STILL_RUNNING=4022;j.ER_INNODB_INVALID_AUTOEXTEND_SIZE_VALUE=4023;j.ER_INNODB_INCOMPATIBLE_WITH_TABLESPACE=4024;j.ER_INNODB_AUTOEXTEND_SIZE_OUT_OF_RANGE=4025;j.ER_CANNOT_USE_AUTOEXTEND_SIZE_CLAUSE=4026;j.ER_ROLE_GRANTED_TO_ITSELF=4027;j.ER_TABLE_MUST_HAVE_A_VISIBLE_COLUMN=4028;j.ER_INNODB_COMPRESSION_FAILURE=4029;j.ER_WARN_ASYNC_CONN_FAILOVER_NETWORK_NAMESPACE=4030;j.ER_CLIENT_INTERACTION_TIMEOUT=4031;j.ER_INVALID_CAST_TO_GEOMETRY=4032;j.ER_INVALID_CAST_POLYGON_RING_DIRECTION=4033;j.ER_GIS_DIFFERENT_SRIDS_AGGREGATION=4034;j.ER_RELOAD_KEYRING_FAILURE=4035;j.ER_SDI_GET_KEYS_INVALID_TABLESPACE=4036;j.ER_CHANGE_RPL_SRC_WRONG_COMPRESSION_ALGORITHM_SIZE=4037;j.ER_WARN_DEPRECATED_TLS_VERSION_FOR_CHANNEL_CLI=4038;j.ER_CANT_USE_SAME_UUID_AS_VIEW_CHANGE_UUID=4039;j.ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_VIEW_CHANGE_UUID=4040;j.ER_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE=4041;j.ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS=4042;j.ER_WARN_ADUIT_LOG_MAX_SIZE_CLOSE_TO_ROTATE_ON_SIZE=4043;j.ER_KERBEROS_CREATE_USER=4044;j.ER_INSTALL_PLUGIN_CONFLICT_CLIENT=4045;j.ER_DA_ERROR_LOG_COMPONENT_FLUSH_FAILED=4046;j.ER_WARN_SQL_AFTER_MTS_GAPS_GAP_NOT_CALCULATED=4047;j.ER_INVALID_ASSIGNMENT_TARGET=4048;j.ER_OPERATION_NOT_ALLOWED_ON_GR_SECONDARY=4049;j.ER_GRP_RPL_FAILOVER_CHANNEL_STATUS_PROPAGATION=4050;j.ER_WARN_AUDIT_LOG_FORMAT_UNIX_TIMESTAMP_ONLY_WHEN_JSON=4051;j.ER_INVALID_MFA_PLUGIN_SPECIFIED=4052;j.ER_IDENTIFIED_BY_UNSUPPORTED=4053;j.ER_INVALID_PLUGIN_FOR_REGISTRATION=4054;j.ER_PLUGIN_REQUIRES_REGISTRATION=4055;j.ER_MFA_METHOD_EXISTS=4056;j.ER_MFA_METHOD_NOT_EXISTS=4057;j.ER_AUTHENTICATION_POLICY_MISMATCH=4058;j.ER_PLUGIN_REGISTRATION_DONE=4059;j.ER_INVALID_USER_FOR_REGISTRATION=4060;j.ER_USER_REGISTRATION_FAILED=4061;j.ER_MFA_METHODS_INVALID_ORDER=4062;j.ER_MFA_METHODS_IDENTICAL=4063;j.ER_INVALID_MFA_OPERATIONS_FOR_PASSWORDLESS_USER=4064;j.ER_CHANGE_REPLICATION_SOURCE_NO_OPTIONS_FOR_GTID_ONLY=4065;j.ER_CHANGE_REP_SOURCE_CANT_DISABLE_REQ_ROW_FORMAT_WITH_GTID_ONLY=4066;j.ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POSITION_WITH_GTID_ONLY=4067;j.ER_CHANGE_REP_SOURCE_CANT_DISABLE_GTID_ONLY_WITHOUT_POSITIONS=4068;j.ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POS_WITHOUT_POSITIONS=4069;j.ER_CHANGE_REP_SOURCE_GR_CHANNEL_WITH_GTID_MODE_NOT_ON=4070;j.ER_CANT_USE_GTID_ONLY_WITH_GTID_MODE_NOT_ON=4071;j.ER_WARN_C_DISABLE_GTID_ONLY_WITH_SOURCE_AUTO_POS_INVALID_POS=4072;j.ER_DA_SSL_FIPS_MODE_ERROR=4073;j.ER_VALUE_OUT_OF_RANGE=4074;j.ER_FULLTEXT_WITH_ROLLUP=4075;j.ER_REGEXP_MISSING_RESOURCE=4076;j.ER_WARN_REGEXP_USING_DEFAULT=4077;j.ER_REGEXP_MISSING_FILE=4078;j.ER_WARN_DEPRECATED_COLLATION=4079;j.ER_CONCURRENT_PROCEDURE_USAGE=4080;j.ER_DA_GLOBAL_CONN_LIMIT=4081;j.ER_DA_CONN_LIMIT=4082;j.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE_INSTANT=4083;j.ER_WARN_SF_UDF_NAME_COLLISION=4084;j.ER_CANNOT_PURGE_BINLOG_WITH_BACKUP_LOCK=4085;j.ER_TOO_MANY_WINDOWS=4086;j.ER_MYSQLBACKUP_CLIENT_MSG=4087;j.ER_COMMENT_CONTAINS_INVALID_STRING=4088;j.ER_DEFINITION_CONTAINS_INVALID_STRING=4089;j.ER_CANT_EXECUTE_COMMAND_WITH_ASSIGNED_GTID_NEXT=4090;j.ER_XA_TEMP_TABLE=4091;j.ER_INNODB_MAX_ROW_VERSION=4092;j.ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_SIZE=4093;j.ER_OPERATION_NOT_ALLOWED_WHILE_PRIMARY_CHANGE_IS_RUNNING=4094;j.ER_WARN_DEPRECATED_DATETIME_DELIMITER=4095;j.ER_WARN_DEPRECATED_SUPERFLUOUS_DELIMITER=4096;j.ER_CANNOT_PERSIST_SENSITIVE_VARIABLES=4097;j.ER_WARN_CANNOT_SECURELY_PERSIST_SENSITIVE_VARIABLES=4098;j.ER_WARN_TRG_ALREADY_EXISTS=4099;j.ER_IF_NOT_EXISTS_UNSUPPORTED_TRG_EXISTS_ON_DIFFERENT_TABLE=4100;j.ER_IF_NOT_EXISTS_UNSUPPORTED_UDF_NATIVE_FCT_NAME_COLLISION=4101;j.ER_SET_PASSWORD_AUTH_PLUGIN_ERROR=4102;j.ER_REDUCED_DBLWR_FILE_CORRUPTED=4103;j.ER_REDUCED_DBLWR_PAGE_FOUND=4104;j.ER_SRS_INVALID_LATITUDE_OF_ORIGIN=4105;j.ER_SRS_INVALID_LONGITUDE_OF_ORIGIN=4106;j.ER_SRS_UNUSED_PROJ_PARAMETER_PRESENT=4107;j.ER_GIPK_COLUMN_EXISTS=4108;j.ER_GIPK_FAILED_AUTOINC_COLUMN_EXISTS=4109;j.ER_GIPK_COLUMN_ALTER_NOT_ALLOWED=4110;j.ER_DROP_PK_COLUMN_TO_DROP_GIPK=4111;j.ER_CREATE_SELECT_WITH_GIPK_DISALLOWED_IN_SBR=4112;j.ER_DA_EXPIRE_LOGS_DAYS_IGNORED=4113;j.ER_CTE_RECURSIVE_NOT_UNION=4114;j.ER_COMMAND_BACKEND_FAILED_TO_FETCH_SECURITY_CTX=4115;j.ER_COMMAND_SERVICE_BACKEND_FAILED=4116;j.ER_CLIENT_FILE_PRIVILEGE_FOR_REPLICATION_CHECKS=4117;j.ER_GROUP_REPLICATION_FORCE_MEMBERS_COMMAND_FAILURE=4118;j.ER_WARN_DEPRECATED_IDENT=4119;j.ER_INTERSECT_ALL_MAX_DUPLICATES_EXCEEDED=4120;j.ER_TP_QUERY_THRS_PER_GRP_EXCEEDS_TXN_THR_LIMIT=4121;j.ER_BAD_TIMESTAMP_FORMAT=4122;j.ER_SHAPE_PRIDICTION_UDF=4123;j.ER_SRS_INVALID_HEIGHT=4124;j.ER_SRS_INVALID_SCALING=4125;j.ER_SRS_INVALID_ZONE_WIDTH=4126;j.ER_SRS_INVALID_LATITUDE_POLAR_STERE_VAR_A=4127;j.ER_WARN_DEPRECATED_CLIENT_NO_SCHEMA_OPTION=4128;j.ER_TABLE_NOT_EMPTY=4129;j.ER_TABLE_NO_PRIMARY_KEY=4130;j.ER_TABLE_IN_SHARED_TABLESPACE=4131;j.ER_INDEX_OTHER_THAN_PK=4132;j.ER_LOAD_BULK_DATA_UNSORTED=4133;j.ER_BULK_EXECUTOR_ERROR=4134;j.ER_BULK_READER_LIBCURL_INIT_FAILED=4135;j.ER_BULK_READER_LIBCURL_ERROR=4136;j.ER_BULK_READER_SERVER_ERROR=4137;j.ER_BULK_READER_COMMUNICATION_ERROR=4138;j.ER_BULK_LOAD_DATA_FAILED=4139;j.ER_BULK_LOADER_COLUMN_TOO_BIG_FOR_LEFTOVER_BUFFER=4140;j.ER_BULK_LOADER_COMPONENT_ERROR=4141;j.ER_BULK_LOADER_FILE_CONTAINS_LESS_LINES_THAN_IGNORE_CLAUSE=4142;j.ER_BULK_PARSER_MISSING_ENCLOSED_BY=4143;j.ER_BULK_PARSER_ROW_BUFFER_MAX_TOTAL_COLS_EXCEEDED=4144;j.ER_BULK_PARSER_COPY_BUFFER_SIZE_EXCEEDED=4145;j.ER_BULK_PARSER_UNEXPECTED_END_OF_INPUT=4146;j.ER_BULK_PARSER_UNEXPECTED_ROW_TERMINATOR=4147;j.ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_ENDING_ENCLOSED_BY=4148;j.ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_NULL_ESCAPE=4149;j.ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_COLUMN_TERMINATOR=4150;j.ER_BULK_PARSER_INCOMPLETE_ESCAPE_SEQUENCE=4151;j.ER_LOAD_BULK_DATA_FAILED=4152;j.ER_LOAD_BULK_DATA_WRONG_VALUE_FOR_FIELD=4153;j.ER_LOAD_BULK_DATA_WARN_NULL_TO_NOTNULL=4154;j.ER_REQUIRE_TABLE_PRIMARY_KEY_CHECK_GENERATE_WITH_GR=4155;j.ER_CANT_CHANGE_SYS_VAR_IN_READ_ONLY_MODE=4156;j.ER_INNODB_INSTANT_ADD_DROP_NOT_SUPPORTED_MAX_SIZE=4157;j.ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_FIELDS=4158;j.ER_CANT_SET_PERSISTED=4159;j.ER_INSTALL_COMPONENT_SET_NULL_VALUE=4160;j.ER_INSTALL_COMPONENT_SET_UNUSED_VALUE=4161;j.ER_WARN_DEPRECATED_USER_DEFINED_COLLATIONS=4162;j[1]="EE_CANTCREATEFILE";j[2]="EE_READ";j[3]="EE_WRITE";j[4]="EE_BADCLOSE";j[5]="EE_OUTOFMEMORY";j[6]="EE_DELETE";j[7]="EE_LINK";j[9]="EE_EOFERR";j[10]="EE_CANTLOCK";j[11]="EE_CANTUNLOCK";j[12]="EE_DIR";j[13]="EE_STAT";j[14]="EE_CANT_CHSIZE";j[15]="EE_CANT_OPEN_STREAM";j[16]="EE_GETWD";j[17]="EE_SETWD";j[18]="EE_LINK_WARNING";j[19]="EE_OPEN_WARNING";j[20]="EE_DISK_FULL";j[21]="EE_CANT_MKDIR";j[22]="EE_UNKNOWN_CHARSET";j[23]="EE_OUT_OF_FILERESOURCES";j[24]="EE_CANT_READLINK";j[25]="EE_CANT_SYMLINK";j[26]="EE_REALPATH";j[27]="EE_SYNC";j[28]="EE_UNKNOWN_COLLATION";j[29]="EE_FILENOTFOUND";j[30]="EE_FILE_NOT_CLOSED";j[31]="EE_CHANGE_OWNERSHIP";j[32]="EE_CHANGE_PERMISSIONS";j[33]="EE_CANT_SEEK";j[34]="EE_CAPACITY_EXCEEDED";j[35]="EE_DISK_FULL_WITH_RETRY_MSG";j[36]="EE_FAILED_TO_CREATE_TIMER";j[37]="EE_FAILED_TO_DELETE_TIMER";j[38]="EE_FAILED_TO_CREATE_TIMER_QUEUE";j[39]="EE_FAILED_TO_START_TIMER_NOTIFY_THREAD";j[40]="EE_FAILED_TO_CREATE_TIMER_NOTIFY_THREAD_INTERRUPT_EVENT";j[41]="EE_EXITING_TIMER_NOTIFY_THREAD";j[42]="EE_WIN_LIBRARY_LOAD_FAILED";j[43]="EE_WIN_RUN_TIME_ERROR_CHECK";j[44]="EE_FAILED_TO_DETERMINE_LARGE_PAGE_SIZE";j[45]="EE_FAILED_TO_KILL_ALL_THREADS";j[46]="EE_FAILED_TO_CREATE_IO_COMPLETION_PORT";j[47]="EE_FAILED_TO_OPEN_DEFAULTS_FILE";j[48]="EE_FAILED_TO_HANDLE_DEFAULTS_FILE";j[49]="EE_WRONG_DIRECTIVE_IN_CONFIG_FILE";j[50]="EE_SKIPPING_DIRECTIVE_DUE_TO_MAX_INCLUDE_RECURSION";j[51]="EE_INCORRECT_GRP_DEFINITION_IN_CONFIG_FILE";j[52]="EE_OPTION_WITHOUT_GRP_IN_CONFIG_FILE";j[53]="EE_CONFIG_FILE_PERMISSION_ERROR";j[54]="EE_IGNORE_WORLD_WRITABLE_CONFIG_FILE";j[55]="EE_USING_DISABLED_OPTION";j[56]="EE_USING_DISABLED_SHORT_OPTION";j[57]="EE_USING_PASSWORD_ON_CLI_IS_INSECURE";j[58]="EE_UNKNOWN_SUFFIX_FOR_VARIABLE";j[59]="EE_SSL_ERROR_FROM_FILE";j[60]="EE_SSL_ERROR";j[61]="EE_NET_SEND_ERROR_IN_BOOTSTRAP";j[62]="EE_PACKETS_OUT_OF_ORDER";j[63]="EE_UNKNOWN_PROTOCOL_OPTION";j[64]="EE_FAILED_TO_LOCATE_SERVER_PUBLIC_KEY";j[65]="EE_PUBLIC_KEY_NOT_IN_PEM_FORMAT";j[66]="EE_DEBUG_INFO";j[67]="EE_UNKNOWN_VARIABLE";j[68]="EE_UNKNOWN_OPTION";j[69]="EE_UNKNOWN_SHORT_OPTION";j[70]="EE_OPTION_WITHOUT_ARGUMENT";j[71]="EE_OPTION_REQUIRES_ARGUMENT";j[72]="EE_SHORT_OPTION_REQUIRES_ARGUMENT";j[73]="EE_OPTION_IGNORED_DUE_TO_INVALID_VALUE";j[74]="EE_OPTION_WITH_EMPTY_VALUE";j[75]="EE_FAILED_TO_ASSIGN_MAX_VALUE_TO_OPTION";j[76]="EE_INCORRECT_BOOLEAN_VALUE_FOR_OPTION";j[77]="EE_FAILED_TO_SET_OPTION_VALUE";j[78]="EE_INCORRECT_INT_VALUE_FOR_OPTION";j[79]="EE_INCORRECT_UINT_VALUE_FOR_OPTION";j[80]="EE_ADJUSTED_SIGNED_VALUE_FOR_OPTION";j[81]="EE_ADJUSTED_UNSIGNED_VALUE_FOR_OPTION";j[82]="EE_ADJUSTED_ULONGLONG_VALUE_FOR_OPTION";j[83]="EE_ADJUSTED_DOUBLE_VALUE_FOR_OPTION";j[84]="EE_INVALID_DECIMAL_VALUE_FOR_OPTION";j[85]="EE_COLLATION_PARSER_ERROR";j[86]="EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR";j[87]="EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR";j[88]="EE_SHIFT_CHAR_OUT_OF_RANGE";j[89]="EE_RESET_CHAR_OUT_OF_RANGE";j[90]="EE_UNKNOWN_LDML_TAG";j[91]="EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR";j[92]="EE_FAILED_PROCESSING_DIRECTIVE";j[93]="EE_PTHREAD_KILL_FAILED";j[120]="HA_ERR_KEY_NOT_FOUND";j[121]="HA_ERR_FOUND_DUPP_KEY";j[122]="HA_ERR_INTERNAL_ERROR";j[123]="HA_ERR_RECORD_CHANGED";j[124]="HA_ERR_WRONG_INDEX";j[125]="HA_ERR_ROLLED_BACK";j[126]="HA_ERR_CRASHED";j[127]="HA_ERR_WRONG_IN_RECORD";j[128]="HA_ERR_OUT_OF_MEM";j[130]="HA_ERR_NOT_A_TABLE";j[131]="HA_ERR_WRONG_COMMAND";j[132]="HA_ERR_OLD_FILE";j[133]="HA_ERR_NO_ACTIVE_RECORD";j[134]="HA_ERR_RECORD_DELETED";j[135]="HA_ERR_RECORD_FILE_FULL";j[136]="HA_ERR_INDEX_FILE_FULL";j[137]="HA_ERR_END_OF_FILE";j[138]="HA_ERR_UNSUPPORTED";j[139]="HA_ERR_TOO_BIG_ROW";j[140]="HA_WRONG_CREATE_OPTION";j[141]="HA_ERR_FOUND_DUPP_UNIQUE";j[142]="HA_ERR_UNKNOWN_CHARSET";j[143]="HA_ERR_WRONG_MRG_TABLE_DEF";j[144]="HA_ERR_CRASHED_ON_REPAIR";j[145]="HA_ERR_CRASHED_ON_USAGE";j[146]="HA_ERR_LOCK_WAIT_TIMEOUT";j[147]="HA_ERR_LOCK_TABLE_FULL";j[148]="HA_ERR_READ_ONLY_TRANSACTION";j[149]="HA_ERR_LOCK_DEADLOCK";j[150]="HA_ERR_CANNOT_ADD_FOREIGN";j[151]="HA_ERR_NO_REFERENCED_ROW";j[152]="HA_ERR_ROW_IS_REFERENCED";j[153]="HA_ERR_NO_SAVEPOINT";j[154]="HA_ERR_NON_UNIQUE_BLOCK_SIZE";j[155]="HA_ERR_NO_SUCH_TABLE";j[156]="HA_ERR_TABLE_EXIST";j[157]="HA_ERR_NO_CONNECTION";j[158]="HA_ERR_NULL_IN_SPATIAL";j[159]="HA_ERR_TABLE_DEF_CHANGED";j[160]="HA_ERR_NO_PARTITION_FOUND";j[161]="HA_ERR_RBR_LOGGING_FAILED";j[162]="HA_ERR_DROP_INDEX_FK";j[163]="HA_ERR_FOREIGN_DUPLICATE_KEY";j[164]="HA_ERR_TABLE_NEEDS_UPGRADE";j[165]="HA_ERR_TABLE_READONLY";j[166]="HA_ERR_AUTOINC_READ_FAILED";j[167]="HA_ERR_AUTOINC_ERANGE";j[168]="HA_ERR_GENERIC";j[169]="HA_ERR_RECORD_IS_THE_SAME";j[170]="HA_ERR_LOGGING_IMPOSSIBLE";j[171]="HA_ERR_CORRUPT_EVENT";j[172]="HA_ERR_NEW_FILE";j[173]="HA_ERR_ROWS_EVENT_APPLY";j[174]="HA_ERR_INITIALIZATION";j[175]="HA_ERR_FILE_TOO_SHORT";j[176]="HA_ERR_WRONG_CRC";j[177]="HA_ERR_TOO_MANY_CONCURRENT_TRXS";j[178]="HA_ERR_NOT_IN_LOCK_PARTITIONS";j[179]="HA_ERR_INDEX_COL_TOO_LONG";j[180]="HA_ERR_INDEX_CORRUPT";j[181]="HA_ERR_UNDO_REC_TOO_BIG";j[182]="HA_FTS_INVALID_DOCID";j[183]="HA_ERR_TABLE_IN_FK_CHECK";j[184]="HA_ERR_TABLESPACE_EXISTS";j[185]="HA_ERR_TOO_MANY_FIELDS";j[186]="HA_ERR_ROW_IN_WRONG_PARTITION";j[187]="HA_ERR_INNODB_READ_ONLY";j[188]="HA_ERR_FTS_EXCEED_RESULT_CACHE_LIMIT";j[189]="HA_ERR_TEMP_FILE_WRITE_FAILURE";j[190]="HA_ERR_INNODB_FORCED_RECOVERY";j[191]="HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE";j[192]="HA_ERR_FK_DEPTH_EXCEEDED";j[193]="HA_MISSING_CREATE_OPTION";j[194]="HA_ERR_SE_OUT_OF_MEMORY";j[195]="HA_ERR_TABLE_CORRUPT";j[196]="HA_ERR_QUERY_INTERRUPTED";j[197]="HA_ERR_TABLESPACE_MISSING";j[198]="HA_ERR_TABLESPACE_IS_NOT_EMPTY";j[199]="HA_ERR_WRONG_FILE_NAME";j[200]="HA_ERR_NOT_ALLOWED_COMMAND";j[201]="HA_ERR_COMPUTE_FAILED";j[202]="HA_ERR_ROW_FORMAT_CHANGED";j[203]="HA_ERR_NO_WAIT_LOCK";j[204]="HA_ERR_DISK_FULL_NOWAIT";j[205]="HA_ERR_NO_SESSION_TEMP";j[206]="HA_ERR_WRONG_TABLE_NAME";j[207]="HA_ERR_TOO_LONG_PATH";j[208]="HA_ERR_SAMPLING_INIT_FAILED";j[209]="HA_ERR_FTS_TOO_MANY_NESTED_EXP";j[1000]="ER_HASHCHK";j[1001]="ER_NISAMCHK";j[1002]="ER_NO";j[1003]="ER_YES";j[1004]="ER_CANT_CREATE_FILE";j[1005]="ER_CANT_CREATE_TABLE";j[1006]="ER_CANT_CREATE_DB";j[1007]="ER_DB_CREATE_EXISTS";j[1008]="ER_DB_DROP_EXISTS";j[1009]="ER_DB_DROP_DELETE";j[1010]="ER_DB_DROP_RMDIR";j[1011]="ER_CANT_DELETE_FILE";j[1012]="ER_CANT_FIND_SYSTEM_REC";j[1013]="ER_CANT_GET_STAT";j[1014]="ER_CANT_GET_WD";j[1015]="ER_CANT_LOCK";j[1016]="ER_CANT_OPEN_FILE";j[1017]="ER_FILE_NOT_FOUND";j[1018]="ER_CANT_READ_DIR";j[1019]="ER_CANT_SET_WD";j[1020]="ER_CHECKREAD";j[1021]="ER_DISK_FULL";j[1022]="ER_DUP_KEY";j[1023]="ER_ERROR_ON_CLOSE";j[1024]="ER_ERROR_ON_READ";j[1025]="ER_ERROR_ON_RENAME";j[1026]="ER_ERROR_ON_WRITE";j[1027]="ER_FILE_USED";j[1028]="ER_FILSORT_ABORT";j[1029]="ER_FORM_NOT_FOUND";j[1030]="ER_GET_ERRNO";j[1031]="ER_ILLEGAL_HA";j[1032]="ER_KEY_NOT_FOUND";j[1033]="ER_NOT_FORM_FILE";j[1034]="ER_NOT_KEYFILE";j[1035]="ER_OLD_KEYFILE";j[1036]="ER_OPEN_AS_READONLY";j[1037]="ER_OUTOFMEMORY";j[1038]="ER_OUT_OF_SORTMEMORY";j[1039]="ER_UNEXPECTED_EOF";j[1040]="ER_CON_COUNT_ERROR";j[1041]="ER_OUT_OF_RESOURCES";j[1042]="ER_BAD_HOST_ERROR";j[1043]="ER_HANDSHAKE_ERROR";j[1044]="ER_DBACCESS_DENIED_ERROR";j[1045]="ER_ACCESS_DENIED_ERROR";j[1046]="ER_NO_DB_ERROR";j[1047]="ER_UNKNOWN_COM_ERROR";j[1048]="ER_BAD_NULL_ERROR";j[1049]="ER_BAD_DB_ERROR";j[1050]="ER_TABLE_EXISTS_ERROR";j[1051]="ER_BAD_TABLE_ERROR";j[1052]="ER_NON_UNIQ_ERROR";j[1053]="ER_SERVER_SHUTDOWN";j[1054]="ER_BAD_FIELD_ERROR";j[1055]="ER_WRONG_FIELD_WITH_GROUP";j[1056]="ER_WRONG_GROUP_FIELD";j[1057]="ER_WRONG_SUM_SELECT";j[1058]="ER_WRONG_VALUE_COUNT";j[1059]="ER_TOO_LONG_IDENT";j[1060]="ER_DUP_FIELDNAME";j[1061]="ER_DUP_KEYNAME";j[1062]="ER_DUP_ENTRY";j[1063]="ER_WRONG_FIELD_SPEC";j[1064]="ER_PARSE_ERROR";j[1065]="ER_EMPTY_QUERY";j[1066]="ER_NONUNIQ_TABLE";j[1067]="ER_INVALID_DEFAULT";j[1068]="ER_MULTIPLE_PRI_KEY";j[1069]="ER_TOO_MANY_KEYS";j[1070]="ER_TOO_MANY_KEY_PARTS";j[1071]="ER_TOO_LONG_KEY";j[1072]="ER_KEY_COLUMN_DOES_NOT_EXITS";j[1073]="ER_BLOB_USED_AS_KEY";j[1074]="ER_TOO_BIG_FIELDLENGTH";j[1075]="ER_WRONG_AUTO_KEY";j[1076]="ER_READY";j[1077]="ER_NORMAL_SHUTDOWN";j[1078]="ER_GOT_SIGNAL";j[1079]="ER_SHUTDOWN_COMPLETE";j[1080]="ER_FORCING_CLOSE";j[1081]="ER_IPSOCK_ERROR";j[1082]="ER_NO_SUCH_INDEX";j[1083]="ER_WRONG_FIELD_TERMINATORS";j[1084]="ER_BLOBS_AND_NO_TERMINATED";j[1085]="ER_TEXTFILE_NOT_READABLE";j[1086]="ER_FILE_EXISTS_ERROR";j[1087]="ER_LOAD_INFO";j[1088]="ER_ALTER_INFO";j[1089]="ER_WRONG_SUB_KEY";j[1090]="ER_CANT_REMOVE_ALL_FIELDS";j[1091]="ER_CANT_DROP_FIELD_OR_KEY";j[1092]="ER_INSERT_INFO";j[1093]="ER_UPDATE_TABLE_USED";j[1094]="ER_NO_SUCH_THREAD";j[1095]="ER_KILL_DENIED_ERROR";j[1096]="ER_NO_TABLES_USED";j[1097]="ER_TOO_BIG_SET";j[1098]="ER_NO_UNIQUE_LOGFILE";j[1099]="ER_TABLE_NOT_LOCKED_FOR_WRITE";j[1100]="ER_TABLE_NOT_LOCKED";j[1101]="ER_BLOB_CANT_HAVE_DEFAULT";j[1102]="ER_WRONG_DB_NAME";j[1103]="ER_WRONG_TABLE_NAME";j[1104]="ER_TOO_BIG_SELECT";j[1105]="ER_UNKNOWN_ERROR";j[1106]="ER_UNKNOWN_PROCEDURE";j[1107]="ER_WRONG_PARAMCOUNT_TO_PROCEDURE";j[1108]="ER_WRONG_PARAMETERS_TO_PROCEDURE";j[1109]="ER_UNKNOWN_TABLE";j[1110]="ER_FIELD_SPECIFIED_TWICE";j[1111]="ER_INVALID_GROUP_FUNC_USE";j[1112]="ER_UNSUPPORTED_EXTENSION";j[1113]="ER_TABLE_MUST_HAVE_COLUMNS";j[1114]="ER_RECORD_FILE_FULL";j[1115]="ER_UNKNOWN_CHARACTER_SET";j[1116]="ER_TOO_MANY_TABLES";j[1117]="ER_TOO_MANY_FIELDS";j[1118]="ER_TOO_BIG_ROWSIZE";j[1119]="ER_STACK_OVERRUN";j[1120]="ER_WRONG_OUTER_JOIN";j[1121]="ER_NULL_COLUMN_IN_INDEX";j[1122]="ER_CANT_FIND_UDF";j[1123]="ER_CANT_INITIALIZE_UDF";j[1124]="ER_UDF_NO_PATHS";j[1125]="ER_UDF_EXISTS";j[1126]="ER_CANT_OPEN_LIBRARY";j[1127]="ER_CANT_FIND_DL_ENTRY";j[1128]="ER_FUNCTION_NOT_DEFINED";j[1129]="ER_HOST_IS_BLOCKED";j[1130]="ER_HOST_NOT_PRIVILEGED";j[1131]="ER_PASSWORD_ANONYMOUS_USER";j[1132]="ER_PASSWORD_NOT_ALLOWED";j[1133]="ER_PASSWORD_NO_MATCH";j[1134]="ER_UPDATE_INFO";j[1135]="ER_CANT_CREATE_THREAD";j[1136]="ER_WRONG_VALUE_COUNT_ON_ROW";j[1137]="ER_CANT_REOPEN_TABLE";j[1138]="ER_INVALID_USE_OF_NULL";j[1139]="ER_REGEXP_ERROR";j[1140]="ER_MIX_OF_GROUP_FUNC_AND_FIELDS";j[1141]="ER_NONEXISTING_GRANT";j[1142]="ER_TABLEACCESS_DENIED_ERROR";j[1143]="ER_COLUMNACCESS_DENIED_ERROR";j[1144]="ER_ILLEGAL_GRANT_FOR_TABLE";j[1145]="ER_GRANT_WRONG_HOST_OR_USER";j[1146]="ER_NO_SUCH_TABLE";j[1147]="ER_NONEXISTING_TABLE_GRANT";j[1148]="ER_NOT_ALLOWED_COMMAND";j[1149]="ER_SYNTAX_ERROR";j[1150]="ER_UNUSED1";j[1151]="ER_UNUSED2";j[1152]="ER_ABORTING_CONNECTION";j[1153]="ER_NET_PACKET_TOO_LARGE";j[1154]="ER_NET_READ_ERROR_FROM_PIPE";j[1155]="ER_NET_FCNTL_ERROR";j[1156]="ER_NET_PACKETS_OUT_OF_ORDER";j[1157]="ER_NET_UNCOMPRESS_ERROR";j[1158]="ER_NET_READ_ERROR";j[1159]="ER_NET_READ_INTERRUPTED";j[1160]="ER_NET_ERROR_ON_WRITE";j[1161]="ER_NET_WRITE_INTERRUPTED";j[1162]="ER_TOO_LONG_STRING";j[1163]="ER_TABLE_CANT_HANDLE_BLOB";j[1164]="ER_TABLE_CANT_HANDLE_AUTO_INCREMENT";j[1165]="ER_UNUSED3";j[1166]="ER_WRONG_COLUMN_NAME";j[1167]="ER_WRONG_KEY_COLUMN";j[1168]="ER_WRONG_MRG_TABLE";j[1169]="ER_DUP_UNIQUE";j[1170]="ER_BLOB_KEY_WITHOUT_LENGTH";j[1171]="ER_PRIMARY_CANT_HAVE_NULL";j[1172]="ER_TOO_MANY_ROWS";j[1173]="ER_REQUIRES_PRIMARY_KEY";j[1174]="ER_NO_RAID_COMPILED";j[1175]="ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE";j[1176]="ER_KEY_DOES_NOT_EXITS";j[1177]="ER_CHECK_NO_SUCH_TABLE";j[1178]="ER_CHECK_NOT_IMPLEMENTED";j[1179]="ER_CANT_DO_THIS_DURING_AN_TRANSACTION";j[1180]="ER_ERROR_DURING_COMMIT";j[1181]="ER_ERROR_DURING_ROLLBACK";j[1182]="ER_ERROR_DURING_FLUSH_LOGS";j[1183]="ER_ERROR_DURING_CHECKPOINT";j[1184]="ER_NEW_ABORTING_CONNECTION";j[1185]="ER_DUMP_NOT_IMPLEMENTED";j[1186]="ER_FLUSH_MASTER_BINLOG_CLOSED";j[1187]="ER_INDEX_REBUILD";j[1188]="ER_SOURCE";j[1189]="ER_SOURCE_NET_READ";j[1190]="ER_SOURCE_NET_WRITE";j[1191]="ER_FT_MATCHING_KEY_NOT_FOUND";j[1192]="ER_LOCK_OR_ACTIVE_TRANSACTION";j[1193]="ER_UNKNOWN_SYSTEM_VARIABLE";j[1194]="ER_CRASHED_ON_USAGE";j[1195]="ER_CRASHED_ON_REPAIR";j[1196]="ER_WARNING_NOT_COMPLETE_ROLLBACK";j[1197]="ER_TRANS_CACHE_FULL";j[1198]="ER_SLAVE_MUST_STOP";j[1199]="ER_REPLICA_NOT_RUNNING";j[1200]="ER_BAD_REPLICA";j[1201]="ER_CONNECTION_METADATA";j[1202]="ER_REPLICA_THREAD";j[1203]="ER_TOO_MANY_USER_CONNECTIONS";j[1204]="ER_SET_CONSTANTS_ONLY";j[1205]="ER_LOCK_WAIT_TIMEOUT";j[1206]="ER_LOCK_TABLE_FULL";j[1207]="ER_READ_ONLY_TRANSACTION";j[1208]="ER_DROP_DB_WITH_READ_LOCK";j[1209]="ER_CREATE_DB_WITH_READ_LOCK";j[1210]="ER_WRONG_ARGUMENTS";j[1211]="ER_NO_PERMISSION_TO_CREATE_USER";j[1212]="ER_UNION_TABLES_IN_DIFFERENT_DIR";j[1213]="ER_LOCK_DEADLOCK";j[1214]="ER_TABLE_CANT_HANDLE_FT";j[1215]="ER_CANNOT_ADD_FOREIGN";j[1216]="ER_NO_REFERENCED_ROW";j[1217]="ER_ROW_IS_REFERENCED";j[1218]="ER_CONNECT_TO_SOURCE";j[1219]="ER_QUERY_ON_MASTER";j[1220]="ER_ERROR_WHEN_EXECUTING_COMMAND";j[1221]="ER_WRONG_USAGE";j[1222]="ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT";j[1223]="ER_CANT_UPDATE_WITH_READLOCK";j[1224]="ER_MIXING_NOT_ALLOWED";j[1225]="ER_DUP_ARGUMENT";j[1226]="ER_USER_LIMIT_REACHED";j[1227]="ER_SPECIFIC_ACCESS_DENIED_ERROR";j[1228]="ER_LOCAL_VARIABLE";j[1229]="ER_GLOBAL_VARIABLE";j[1230]="ER_NO_DEFAULT";j[1231]="ER_WRONG_VALUE_FOR_VAR";j[1232]="ER_WRONG_TYPE_FOR_VAR";j[1233]="ER_VAR_CANT_BE_READ";j[1234]="ER_CANT_USE_OPTION_HERE";j[1235]="ER_NOT_SUPPORTED_YET";j[1236]="ER_SOURCE_FATAL_ERROR_READING_BINLOG";j[1237]="ER_REPLICA_IGNORED_TABLE";j[1238]="ER_INCORRECT_GLOBAL_LOCAL_VAR";j[1239]="ER_WRONG_FK_DEF";j[1240]="ER_KEY_REF_DO_NOT_MATCH_TABLE_REF";j[1241]="ER_OPERAND_COLUMNS";j[1242]="ER_SUBQUERY_NO_1_ROW";j[1243]="ER_UNKNOWN_STMT_HANDLER";j[1244]="ER_CORRUPT_HELP_DB";j[1245]="ER_CYCLIC_REFERENCE";j[1246]="ER_AUTO_CONVERT";j[1247]="ER_ILLEGAL_REFERENCE";j[1248]="ER_DERIVED_MUST_HAVE_ALIAS";j[1249]="ER_SELECT_REDUCED";j[1250]="ER_TABLENAME_NOT_ALLOWED_HERE";j[1251]="ER_NOT_SUPPORTED_AUTH_MODE";j[1252]="ER_SPATIAL_CANT_HAVE_NULL";j[1253]="ER_COLLATION_CHARSET_MISMATCH";j[1254]="ER_SLAVE_WAS_RUNNING";j[1255]="ER_SLAVE_WAS_NOT_RUNNING";j[1256]="ER_TOO_BIG_FOR_UNCOMPRESS";j[1257]="ER_ZLIB_Z_MEM_ERROR";j[1258]="ER_ZLIB_Z_BUF_ERROR";j[1259]="ER_ZLIB_Z_DATA_ERROR";j[1260]="ER_CUT_VALUE_GROUP_CONCAT";j[1261]="ER_WARN_TOO_FEW_RECORDS";j[1262]="ER_WARN_TOO_MANY_RECORDS";j[1263]="ER_WARN_NULL_TO_NOTNULL";j[1264]="ER_WARN_DATA_OUT_OF_RANGE";j[1265]="WARN_DATA_TRUNCATED";j[1266]="ER_WARN_USING_OTHER_HANDLER";j[1267]="ER_CANT_AGGREGATE_2COLLATIONS";j[1268]="ER_DROP_USER";j[1269]="ER_REVOKE_GRANTS";j[1270]="ER_CANT_AGGREGATE_3COLLATIONS";j[1271]="ER_CANT_AGGREGATE_NCOLLATIONS";j[1272]="ER_VARIABLE_IS_NOT_STRUCT";j[1273]="ER_UNKNOWN_COLLATION";j[1274]="ER_REPLICA_IGNORED_SSL_PARAMS";j[1275]="ER_SERVER_IS_IN_SECURE_AUTH_MODE";j[1276]="ER_WARN_FIELD_RESOLVED";j[1277]="ER_BAD_REPLICA_UNTIL_COND";j[1278]="ER_MISSING_SKIP_REPLICA";j[1279]="ER_UNTIL_COND_IGNORED";j[1280]="ER_WRONG_NAME_FOR_INDEX";j[1281]="ER_WRONG_NAME_FOR_CATALOG";j[1282]="ER_WARN_QC_RESIZE";j[1283]="ER_BAD_FT_COLUMN";j[1284]="ER_UNKNOWN_KEY_CACHE";j[1285]="ER_WARN_HOSTNAME_WONT_WORK";j[1286]="ER_UNKNOWN_STORAGE_ENGINE";j[1287]="ER_WARN_DEPRECATED_SYNTAX";j[1288]="ER_NON_UPDATABLE_TABLE";j[1289]="ER_FEATURE_DISABLED";j[1290]="ER_OPTION_PREVENTS_STATEMENT";j[1291]="ER_DUPLICATED_VALUE_IN_TYPE";j[1292]="ER_TRUNCATED_WRONG_VALUE";j[1293]="ER_TOO_MUCH_AUTO_TIMESTAMP_COLS";j[1294]="ER_INVALID_ON_UPDATE";j[1295]="ER_UNSUPPORTED_PS";j[1296]="ER_GET_ERRMSG";j[1297]="ER_GET_TEMPORARY_ERRMSG";j[1298]="ER_UNKNOWN_TIME_ZONE";j[1299]="ER_WARN_INVALID_TIMESTAMP";j[1300]="ER_INVALID_CHARACTER_STRING";j[1301]="ER_WARN_ALLOWED_PACKET_OVERFLOWED";j[1302]="ER_CONFLICTING_DECLARATIONS";j[1303]="ER_SP_NO_RECURSIVE_CREATE";j[1304]="ER_SP_ALREADY_EXISTS";j[1305]="ER_SP_DOES_NOT_EXIST";j[1306]="ER_SP_DROP_FAILED";j[1307]="ER_SP_STORE_FAILED";j[1308]="ER_SP_LILABEL_MISMATCH";j[1309]="ER_SP_LABEL_REDEFINE";j[1310]="ER_SP_LABEL_MISMATCH";j[1311]="ER_SP_UNINIT_VAR";j[1312]="ER_SP_BADSELECT";j[1313]="ER_SP_BADRETURN";j[1314]="ER_SP_BADSTATEMENT";j[1315]="ER_UPDATE_LOG_DEPRECATED_IGNORED";j[1316]="ER_UPDATE_LOG_DEPRECATED_TRANSLATED";j[1317]="ER_QUERY_INTERRUPTED";j[1318]="ER_SP_WRONG_NO_OF_ARGS";j[1319]="ER_SP_COND_MISMATCH";j[1320]="ER_SP_NORETURN";j[1321]="ER_SP_NORETURNEND";j[1322]="ER_SP_BAD_CURSOR_QUERY";j[1323]="ER_SP_BAD_CURSOR_SELECT";j[1324]="ER_SP_CURSOR_MISMATCH";j[1325]="ER_SP_CURSOR_ALREADY_OPEN";j[1326]="ER_SP_CURSOR_NOT_OPEN";j[1327]="ER_SP_UNDECLARED_VAR";j[1328]="ER_SP_WRONG_NO_OF_FETCH_ARGS";j[1329]="ER_SP_FETCH_NO_DATA";j[1330]="ER_SP_DUP_PARAM";j[1331]="ER_SP_DUP_VAR";j[1332]="ER_SP_DUP_COND";j[1333]="ER_SP_DUP_CURS";j[1334]="ER_SP_CANT_ALTER";j[1335]="ER_SP_SUBSELECT_NYI";j[1336]="ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG";j[1337]="ER_SP_VARCOND_AFTER_CURSHNDLR";j[1338]="ER_SP_CURSOR_AFTER_HANDLER";j[1339]="ER_SP_CASE_NOT_FOUND";j[1340]="ER_FPARSER_TOO_BIG_FILE";j[1341]="ER_FPARSER_BAD_HEADER";j[1342]="ER_FPARSER_EOF_IN_COMMENT";j[1343]="ER_FPARSER_ERROR_IN_PARAMETER";j[1344]="ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER";j[1345]="ER_VIEW_NO_EXPLAIN";j[1346]="ER_FRM_UNKNOWN_TYPE";j[1347]="ER_WRONG_OBJECT";j[1348]="ER_NONUPDATEABLE_COLUMN";j[1349]="ER_VIEW_SELECT_DERIVED";j[1350]="ER_VIEW_SELECT_CLAUSE";j[1351]="ER_VIEW_SELECT_VARIABLE";j[1352]="ER_VIEW_SELECT_TMPTABLE";j[1353]="ER_VIEW_WRONG_LIST";j[1354]="ER_WARN_VIEW_MERGE";j[1355]="ER_WARN_VIEW_WITHOUT_KEY";j[1356]="ER_VIEW_INVALID";j[1357]="ER_SP_NO_DROP_SP";j[1358]="ER_SP_GOTO_IN_HNDLR";j[1359]="ER_TRG_ALREADY_EXISTS";j[1360]="ER_TRG_DOES_NOT_EXIST";j[1361]="ER_TRG_ON_VIEW_OR_TEMP_TABLE";j[1362]="ER_TRG_CANT_CHANGE_ROW";j[1363]="ER_TRG_NO_SUCH_ROW_IN_TRG";j[1364]="ER_NO_DEFAULT_FOR_FIELD";j[1365]="ER_DIVISION_BY_ZERO";j[1366]="ER_TRUNCATED_WRONG_VALUE_FOR_FIELD";j[1367]="ER_ILLEGAL_VALUE_FOR_TYPE";j[1368]="ER_VIEW_NONUPD_CHECK";j[1369]="ER_VIEW_CHECK_FAILED";j[1370]="ER_PROCACCESS_DENIED_ERROR";j[1371]="ER_RELAY_LOG_FAIL";j[1372]="ER_PASSWD_LENGTH";j[1373]="ER_UNKNOWN_TARGET_BINLOG";j[1374]="ER_IO_ERR_LOG_INDEX_READ";j[1375]="ER_BINLOG_PURGE_PROHIBITED";j[1376]="ER_FSEEK_FAIL";j[1377]="ER_BINLOG_PURGE_FATAL_ERR";j[1378]="ER_LOG_IN_USE";j[1379]="ER_LOG_PURGE_UNKNOWN_ERR";j[1380]="ER_RELAY_LOG_INIT";j[1381]="ER_NO_BINARY_LOGGING";j[1382]="ER_RESERVED_SYNTAX";j[1383]="ER_WSAS_FAILED";j[1384]="ER_DIFF_GROUPS_PROC";j[1385]="ER_NO_GROUP_FOR_PROC";j[1386]="ER_ORDER_WITH_PROC";j[1387]="ER_LOGGING_PROHIBIT_CHANGING_OF";j[1388]="ER_NO_FILE_MAPPING";j[1389]="ER_WRONG_MAGIC";j[1390]="ER_PS_MANY_PARAM";j[1391]="ER_KEY_PART_0";j[1392]="ER_VIEW_CHECKSUM";j[1393]="ER_VIEW_MULTIUPDATE";j[1394]="ER_VIEW_NO_INSERT_FIELD_LIST";j[1395]="ER_VIEW_DELETE_MERGE_VIEW";j[1396]="ER_CANNOT_USER";j[1397]="ER_XAER_NOTA";j[1398]="ER_XAER_INVAL";j[1399]="ER_XAER_RMFAIL";j[1400]="ER_XAER_OUTSIDE";j[1401]="ER_XAER_RMERR";j[1402]="ER_XA_RBROLLBACK";j[1403]="ER_NONEXISTING_PROC_GRANT";j[1404]="ER_PROC_AUTO_GRANT_FAIL";j[1405]="ER_PROC_AUTO_REVOKE_FAIL";j[1406]="ER_DATA_TOO_LONG";j[1407]="ER_SP_BAD_SQLSTATE";j[1408]="ER_STARTUP";j[1409]="ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR";j[1410]="ER_CANT_CREATE_USER_WITH_GRANT";j[1411]="ER_WRONG_VALUE_FOR_TYPE";j[1412]="ER_TABLE_DEF_CHANGED";j[1413]="ER_SP_DUP_HANDLER";j[1414]="ER_SP_NOT_VAR_ARG";j[1415]="ER_SP_NO_RETSET";j[1416]="ER_CANT_CREATE_GEOMETRY_OBJECT";j[1417]="ER_FAILED_ROUTINE_BREAK_BINLOG";j[1418]="ER_BINLOG_UNSAFE_ROUTINE";j[1419]="ER_BINLOG_CREATE_ROUTINE_NEED_SUPER";j[1420]="ER_EXEC_STMT_WITH_OPEN_CURSOR";j[1421]="ER_STMT_HAS_NO_OPEN_CURSOR";j[1422]="ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG";j[1423]="ER_NO_DEFAULT_FOR_VIEW_FIELD";j[1424]="ER_SP_NO_RECURSION";j[1425]="ER_TOO_BIG_SCALE";j[1426]="ER_TOO_BIG_PRECISION";j[1427]="ER_M_BIGGER_THAN_D";j[1428]="ER_WRONG_LOCK_OF_SYSTEM_TABLE";j[1429]="ER_CONNECT_TO_FOREIGN_DATA_SOURCE";j[1430]="ER_QUERY_ON_FOREIGN_DATA_SOURCE";j[1431]="ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST";j[1432]="ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE";j[1433]="ER_FOREIGN_DATA_STRING_INVALID";j[1434]="ER_CANT_CREATE_FEDERATED_TABLE";j[1435]="ER_TRG_IN_WRONG_SCHEMA";j[1436]="ER_STACK_OVERRUN_NEED_MORE";j[1437]="ER_TOO_LONG_BODY";j[1438]="ER_WARN_CANT_DROP_DEFAULT_KEYCACHE";j[1439]="ER_TOO_BIG_DISPLAYWIDTH";j[1440]="ER_XAER_DUPID";j[1441]="ER_DATETIME_FUNCTION_OVERFLOW";j[1442]="ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG";j[1443]="ER_VIEW_PREVENT_UPDATE";j[1444]="ER_PS_NO_RECURSION";j[1445]="ER_SP_CANT_SET_AUTOCOMMIT";j[1446]="ER_MALFORMED_DEFINER";j[1447]="ER_VIEW_FRM_NO_USER";j[1448]="ER_VIEW_OTHER_USER";j[1449]="ER_NO_SUCH_USER";j[1450]="ER_FORBID_SCHEMA_CHANGE";j[1451]="ER_ROW_IS_REFERENCED_2";j[1452]="ER_NO_REFERENCED_ROW_2";j[1453]="ER_SP_BAD_VAR_SHADOW";j[1454]="ER_TRG_NO_DEFINER";j[1455]="ER_OLD_FILE_FORMAT";j[1456]="ER_SP_RECURSION_LIMIT";j[1457]="ER_SP_PROC_TABLE_CORRUPT";j[1458]="ER_SP_WRONG_NAME";j[1459]="ER_TABLE_NEEDS_UPGRADE";j[1460]="ER_SP_NO_AGGREGATE";j[1461]="ER_MAX_PREPARED_STMT_COUNT_REACHED";j[1462]="ER_VIEW_RECURSIVE";j[1463]="ER_NON_GROUPING_FIELD_USED";j[1464]="ER_TABLE_CANT_HANDLE_SPKEYS";j[1465]="ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA";j[1466]="ER_REMOVED_SPACES";j[1467]="ER_AUTOINC_READ_FAILED";j[1468]="ER_USERNAME";j[1469]="ER_HOSTNAME";j[1470]="ER_WRONG_STRING_LENGTH";j[1471]="ER_NON_INSERTABLE_TABLE";j[1472]="ER_ADMIN_WRONG_MRG_TABLE";j[1473]="ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT";j[1474]="ER_NAME_BECOMES_EMPTY";j[1475]="ER_AMBIGUOUS_FIELD_TERM";j[1476]="ER_FOREIGN_SERVER_EXISTS";j[1477]="ER_FOREIGN_SERVER_DOESNT_EXIST";j[1478]="ER_ILLEGAL_HA_CREATE_OPTION";j[1479]="ER_PARTITION_REQUIRES_VALUES_ERROR";j[1480]="ER_PARTITION_WRONG_VALUES_ERROR";j[1481]="ER_PARTITION_MAXVALUE_ERROR";j[1482]="ER_PARTITION_SUBPARTITION_ERROR";j[1483]="ER_PARTITION_SUBPART_MIX_ERROR";j[1484]="ER_PARTITION_WRONG_NO_PART_ERROR";j[1485]="ER_PARTITION_WRONG_NO_SUBPART_ERROR";j[1486]="ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR";j[1487]="ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR";j[1488]="ER_FIELD_NOT_FOUND_PART_ERROR";j[1489]="ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR";j[1490]="ER_INCONSISTENT_PARTITION_INFO_ERROR";j[1491]="ER_PARTITION_FUNC_NOT_ALLOWED_ERROR";j[1492]="ER_PARTITIONS_MUST_BE_DEFINED_ERROR";j[1493]="ER_RANGE_NOT_INCREASING_ERROR";j[1494]="ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR";j[1495]="ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR";j[1496]="ER_PARTITION_ENTRY_ERROR";j[1497]="ER_MIX_HANDLER_ERROR";j[1498]="ER_PARTITION_NOT_DEFINED_ERROR";j[1499]="ER_TOO_MANY_PARTITIONS_ERROR";j[1500]="ER_SUBPARTITION_ERROR";j[1501]="ER_CANT_CREATE_HANDLER_FILE";j[1502]="ER_BLOB_FIELD_IN_PART_FUNC_ERROR";j[1503]="ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF";j[1504]="ER_NO_PARTS_ERROR";j[1505]="ER_PARTITION_MGMT_ON_NONPARTITIONED";j[1506]="ER_FOREIGN_KEY_ON_PARTITIONED";j[1507]="ER_DROP_PARTITION_NON_EXISTENT";j[1508]="ER_DROP_LAST_PARTITION";j[1509]="ER_COALESCE_ONLY_ON_HASH_PARTITION";j[1510]="ER_REORG_HASH_ONLY_ON_SAME_NO";j[1511]="ER_REORG_NO_PARAM_ERROR";j[1512]="ER_ONLY_ON_RANGE_LIST_PARTITION";j[1513]="ER_ADD_PARTITION_SUBPART_ERROR";j[1514]="ER_ADD_PARTITION_NO_NEW_PARTITION";j[1515]="ER_COALESCE_PARTITION_NO_PARTITION";j[1516]="ER_REORG_PARTITION_NOT_EXIST";j[1517]="ER_SAME_NAME_PARTITION";j[1518]="ER_NO_BINLOG_ERROR";j[1519]="ER_CONSECUTIVE_REORG_PARTITIONS";j[1520]="ER_REORG_OUTSIDE_RANGE";j[1521]="ER_PARTITION_FUNCTION_FAILURE";j[1522]="ER_PART_STATE_ERROR";j[1523]="ER_LIMITED_PART_RANGE";j[1524]="ER_PLUGIN_IS_NOT_LOADED";j[1525]="ER_WRONG_VALUE";j[1526]="ER_NO_PARTITION_FOR_GIVEN_VALUE";j[1527]="ER_FILEGROUP_OPTION_ONLY_ONCE";j[1528]="ER_CREATE_FILEGROUP_FAILED";j[1529]="ER_DROP_FILEGROUP_FAILED";j[1530]="ER_TABLESPACE_AUTO_EXTEND_ERROR";j[1531]="ER_WRONG_SIZE_NUMBER";j[1532]="ER_SIZE_OVERFLOW_ERROR";j[1533]="ER_ALTER_FILEGROUP_FAILED";j[1534]="ER_BINLOG_ROW_LOGGING_FAILED";j[1535]="ER_BINLOG_ROW_WRONG_TABLE_DEF";j[1536]="ER_BINLOG_ROW_RBR_TO_SBR";j[1537]="ER_EVENT_ALREADY_EXISTS";j[1538]="ER_EVENT_STORE_FAILED";j[1539]="ER_EVENT_DOES_NOT_EXIST";j[1540]="ER_EVENT_CANT_ALTER";j[1541]="ER_EVENT_DROP_FAILED";j[1542]="ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG";j[1543]="ER_EVENT_ENDS_BEFORE_STARTS";j[1544]="ER_EVENT_EXEC_TIME_IN_THE_PAST";j[1545]="ER_EVENT_OPEN_TABLE_FAILED";j[1546]="ER_EVENT_NEITHER_M_EXPR_NOR_M_AT";j[1547]="ER_COL_COUNT_DOESNT_MATCH_CORRUPTED";j[1548]="ER_CANNOT_LOAD_FROM_TABLE";j[1549]="ER_EVENT_CANNOT_DELETE";j[1550]="ER_EVENT_COMPILE_ERROR";j[1551]="ER_EVENT_SAME_NAME";j[1552]="ER_EVENT_DATA_TOO_LONG";j[1553]="ER_DROP_INDEX_FK";j[1554]="ER_WARN_DEPRECATED_SYNTAX_WITH_VER";j[1555]="ER_CANT_WRITE_LOCK_LOG_TABLE";j[1556]="ER_CANT_LOCK_LOG_TABLE";j[1557]="ER_FOREIGN_DUPLICATE_KEY";j[1558]="ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE";j[1559]="ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR";j[1560]="ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT";j[1561]="ER_NDB_CANT_SWITCH_BINLOG_FORMAT";j[1562]="ER_PARTITION_NO_TEMPORARY";j[1563]="ER_PARTITION_CONST_DOMAIN_ERROR";j[1564]="ER_PARTITION_FUNCTION_IS_NOT_ALLOWED";j[1565]="ER_DDL_LOG_ERROR";j[1566]="ER_NULL_IN_VALUES_LESS_THAN";j[1567]="ER_WRONG_PARTITION_NAME";j[1568]="ER_CANT_CHANGE_TX_CHARACTERISTICS";j[1569]="ER_DUP_ENTRY_AUTOINCREMENT_CASE";j[1570]="ER_EVENT_MODIFY_QUEUE_ERROR";j[1571]="ER_EVENT_SET_VAR_ERROR";j[1572]="ER_PARTITION_MERGE_ERROR";j[1573]="ER_CANT_ACTIVATE_LOG";j[1574]="ER_RBR_NOT_AVAILABLE";j[1575]="ER_BASE64_DECODE_ERROR";j[1576]="ER_EVENT_RECURSION_FORBIDDEN";j[1577]="ER_EVENTS_DB_ERROR";j[1578]="ER_ONLY_INTEGERS_ALLOWED";j[1579]="ER_UNSUPORTED_LOG_ENGINE";j[1580]="ER_BAD_LOG_STATEMENT";j[1581]="ER_CANT_RENAME_LOG_TABLE";j[1582]="ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT";j[1583]="ER_WRONG_PARAMETERS_TO_NATIVE_FCT";j[1584]="ER_WRONG_PARAMETERS_TO_STORED_FCT";j[1585]="ER_NATIVE_FCT_NAME_COLLISION";j[1586]="ER_DUP_ENTRY_WITH_KEY_NAME";j[1587]="ER_BINLOG_PURGE_EMFILE";j[1588]="ER_EVENT_CANNOT_CREATE_IN_THE_PAST";j[1589]="ER_EVENT_CANNOT_ALTER_IN_THE_PAST";j[1590]="ER_SLAVE_INCIDENT";j[1591]="ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT";j[1592]="ER_BINLOG_UNSAFE_STATEMENT";j[1593]="ER_BINLOG_FATAL_ERROR";j[1594]="ER_SLAVE_RELAY_LOG_READ_FAILURE";j[1595]="ER_SLAVE_RELAY_LOG_WRITE_FAILURE";j[1596]="ER_SLAVE_CREATE_EVENT_FAILURE";j[1597]="ER_SLAVE_MASTER_COM_FAILURE";j[1598]="ER_BINLOG_LOGGING_IMPOSSIBLE";j[1599]="ER_VIEW_NO_CREATION_CTX";j[1600]="ER_VIEW_INVALID_CREATION_CTX";j[1601]="ER_SR_INVALID_CREATION_CTX";j[1602]="ER_TRG_CORRUPTED_FILE";j[1603]="ER_TRG_NO_CREATION_CTX";j[1604]="ER_TRG_INVALID_CREATION_CTX";j[1605]="ER_EVENT_INVALID_CREATION_CTX";j[1606]="ER_TRG_CANT_OPEN_TABLE";j[1607]="ER_CANT_CREATE_SROUTINE";j[1608]="ER_NEVER_USED";j[1609]="ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT";j[1610]="ER_REPLICA_CORRUPT_EVENT";j[1611]="ER_LOAD_DATA_INVALID_COLUMN";j[1612]="ER_LOG_PURGE_NO_FILE";j[1613]="ER_XA_RBTIMEOUT";j[1614]="ER_XA_RBDEADLOCK";j[1615]="ER_NEED_REPREPARE";j[1616]="ER_DELAYED_NOT_SUPPORTED";j[1617]="WARN_NO_CONNECTION_METADATA";j[1618]="WARN_OPTION_IGNORED";j[1619]="ER_PLUGIN_DELETE_BUILTIN";j[1620]="WARN_PLUGIN_BUSY";j[1621]="ER_VARIABLE_IS_READONLY";j[1622]="ER_WARN_ENGINE_TRANSACTION_ROLLBACK";j[1623]="ER_SLAVE_HEARTBEAT_FAILURE";j[1624]="ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE";j[1625]="ER_NDB_REPLICATION_SCHEMA_ERROR";j[1626]="ER_CONFLICT_FN_PARSE_ERROR";j[1627]="ER_EXCEPTIONS_WRITE_ERROR";j[1628]="ER_TOO_LONG_TABLE_COMMENT";j[1629]="ER_TOO_LONG_FIELD_COMMENT";j[1630]="ER_FUNC_INEXISTENT_NAME_COLLISION";j[1631]="ER_DATABASE_NAME";j[1632]="ER_TABLE_NAME";j[1633]="ER_PARTITION_NAME";j[1634]="ER_SUBPARTITION_NAME";j[1635]="ER_TEMPORARY_NAME";j[1636]="ER_RENAMED_NAME";j[1637]="ER_TOO_MANY_CONCURRENT_TRXS";j[1638]="WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED";j[1639]="ER_DEBUG_SYNC_TIMEOUT";j[1640]="ER_DEBUG_SYNC_HIT_LIMIT";j[1641]="ER_DUP_SIGNAL_SET";j[1642]="ER_SIGNAL_WARN";j[1643]="ER_SIGNAL_NOT_FOUND";j[1644]="ER_SIGNAL_EXCEPTION";j[1645]="ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER";j[1646]="ER_SIGNAL_BAD_CONDITION_TYPE";j[1647]="WARN_COND_ITEM_TRUNCATED";j[1648]="ER_COND_ITEM_TOO_LONG";j[1649]="ER_UNKNOWN_LOCALE";j[1650]="ER_REPLICA_IGNORE_SERVER_IDS";j[1651]="ER_QUERY_CACHE_DISABLED";j[1652]="ER_SAME_NAME_PARTITION_FIELD";j[1653]="ER_PARTITION_COLUMN_LIST_ERROR";j[1654]="ER_WRONG_TYPE_COLUMN_VALUE_ERROR";j[1655]="ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR";j[1656]="ER_MAXVALUE_IN_VALUES_IN";j[1657]="ER_TOO_MANY_VALUES_ERROR";j[1658]="ER_ROW_SINGLE_PARTITION_FIELD_ERROR";j[1659]="ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD";j[1660]="ER_PARTITION_FIELDS_TOO_LONG";j[1661]="ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE";j[1662]="ER_BINLOG_ROW_MODE_AND_STMT_ENGINE";j[1663]="ER_BINLOG_UNSAFE_AND_STMT_ENGINE";j[1664]="ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE";j[1665]="ER_BINLOG_STMT_MODE_AND_ROW_ENGINE";j[1666]="ER_BINLOG_ROW_INJECTION_AND_STMT_MODE";j[1667]="ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE";j[1668]="ER_BINLOG_UNSAFE_LIMIT";j[1669]="ER_UNUSED4";j[1670]="ER_BINLOG_UNSAFE_SYSTEM_TABLE";j[1671]="ER_BINLOG_UNSAFE_AUTOINC_COLUMNS";j[1672]="ER_BINLOG_UNSAFE_UDF";j[1673]="ER_BINLOG_UNSAFE_SYSTEM_VARIABLE";j[1674]="ER_BINLOG_UNSAFE_SYSTEM_FUNCTION";j[1675]="ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS";j[1676]="ER_MESSAGE_AND_STATEMENT";j[1677]="ER_SLAVE_CONVERSION_FAILED";j[1678]="ER_REPLICA_CANT_CREATE_CONVERSION";j[1679]="ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT";j[1680]="ER_PATH_LENGTH";j[1681]="ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT";j[1682]="ER_WRONG_NATIVE_TABLE_STRUCTURE";j[1683]="ER_WRONG_PERFSCHEMA_USAGE";j[1684]="ER_WARN_I_S_SKIPPED_TABLE";j[1685]="ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT";j[1686]="ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT";j[1687]="ER_SPATIAL_MUST_HAVE_GEOM_COL";j[1688]="ER_TOO_LONG_INDEX_COMMENT";j[1689]="ER_LOCK_ABORTED";j[1690]="ER_DATA_OUT_OF_RANGE";j[1691]="ER_WRONG_SPVAR_TYPE_IN_LIMIT";j[1692]="ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE";j[1693]="ER_BINLOG_UNSAFE_MIXED_STATEMENT";j[1694]="ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN";j[1695]="ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN";j[1696]="ER_FAILED_READ_FROM_PAR_FILE";j[1697]="ER_VALUES_IS_NOT_INT_TYPE_ERROR";j[1698]="ER_ACCESS_DENIED_NO_PASSWORD_ERROR";j[1699]="ER_SET_PASSWORD_AUTH_PLUGIN";j[1700]="ER_GRANT_PLUGIN_USER_EXISTS";j[1701]="ER_TRUNCATE_ILLEGAL_FK";j[1702]="ER_PLUGIN_IS_PERMANENT";j[1703]="ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN";j[1704]="ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX";j[1705]="ER_STMT_CACHE_FULL";j[1706]="ER_MULTI_UPDATE_KEY_CONFLICT";j[1707]="ER_TABLE_NEEDS_REBUILD";j[1708]="WARN_OPTION_BELOW_LIMIT";j[1709]="ER_INDEX_COLUMN_TOO_LONG";j[1710]="ER_ERROR_IN_TRIGGER_BODY";j[1711]="ER_ERROR_IN_UNKNOWN_TRIGGER_BODY";j[1712]="ER_INDEX_CORRUPT";j[1713]="ER_UNDO_RECORD_TOO_BIG";j[1714]="ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT";j[1715]="ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE";j[1716]="ER_BINLOG_UNSAFE_REPLACE_SELECT";j[1717]="ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT";j[1718]="ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT";j[1719]="ER_BINLOG_UNSAFE_UPDATE_IGNORE";j[1720]="ER_PLUGIN_NO_UNINSTALL";j[1721]="ER_PLUGIN_NO_INSTALL";j[1722]="ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT";j[1723]="ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC";j[1724]="ER_BINLOG_UNSAFE_INSERT_TWO_KEYS";j[1725]="ER_TABLE_IN_FK_CHECK";j[1726]="ER_UNSUPPORTED_ENGINE";j[1727]="ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST";j[1728]="ER_CANNOT_LOAD_FROM_TABLE_V2";j[1729]="ER_SOURCE_DELAY_VALUE_OUT_OF_RANGE";j[1730]="ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT";j[1731]="ER_PARTITION_EXCHANGE_DIFFERENT_OPTION";j[1732]="ER_PARTITION_EXCHANGE_PART_TABLE";j[1733]="ER_PARTITION_EXCHANGE_TEMP_TABLE";j[1734]="ER_PARTITION_INSTEAD_OF_SUBPARTITION";j[1735]="ER_UNKNOWN_PARTITION";j[1736]="ER_TABLES_DIFFERENT_METADATA";j[1737]="ER_ROW_DOES_NOT_MATCH_PARTITION";j[1738]="ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX";j[1739]="ER_WARN_INDEX_NOT_APPLICABLE";j[1740]="ER_PARTITION_EXCHANGE_FOREIGN_KEY";j[1741]="ER_NO_SUCH_KEY_VALUE";j[1742]="ER_RPL_INFO_DATA_TOO_LONG";j[1743]="ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE";j[1744]="ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE";j[1745]="ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX";j[1746]="ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT";j[1747]="ER_PARTITION_CLAUSE_ON_NONPARTITIONED";j[1748]="ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET";j[1749]="ER_NO_SUCH_PARTITION";j[1750]="ER_CHANGE_RPL_INFO_REPOSITORY_FAILURE";j[1751]="ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE";j[1752]="ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE";j[1753]="ER_MTA_FEATURE_IS_NOT_SUPPORTED";j[1754]="ER_MTA_UPDATED_DBS_GREATER_MAX";j[1755]="ER_MTA_CANT_PARALLEL";j[1756]="ER_MTA_INCONSISTENT_DATA";j[1757]="ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING";j[1758]="ER_DA_INVALID_CONDITION_NUMBER";j[1759]="ER_INSECURE_PLAIN_TEXT";j[1760]="ER_INSECURE_CHANGE_SOURCE";j[1761]="ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO";j[1762]="ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO";j[1763]="ER_SQLTHREAD_WITH_SECURE_REPLICA";j[1764]="ER_TABLE_HAS_NO_FT";j[1765]="ER_VARIABLE_NOT_SETTABLE_IN_SF_OR_TRIGGER";j[1766]="ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION";j[1767]="ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST";j[1768]="ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION";j[1769]="ER_SET_STATEMENT_CANNOT_INVOKE_FUNCTION";j[1770]="ER_GTID_NEXT_CANT_BE_AUTOMATIC_IF_GTID_NEXT_LIST_IS_NON_NULL";j[1771]="ER_SKIPPING_LOGGED_TRANSACTION";j[1772]="ER_MALFORMED_GTID_SET_SPECIFICATION";j[1773]="ER_MALFORMED_GTID_SET_ENCODING";j[1774]="ER_MALFORMED_GTID_SPECIFICATION";j[1775]="ER_GNO_EXHAUSTED";j[1776]="ER_BAD_REPLICA_AUTO_POSITION";j[1777]="ER_AUTO_POSITION_REQUIRES_GTID_MODE_NOT_OFF";j[1778]="ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET";j[1779]="ER_GTID_MODE_ON_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON";j[1780]="ER_GTID_MODE_REQUIRES_BINLOG";j[1781]="ER_CANT_SET_GTID_NEXT_TO_GTID_WHEN_GTID_MODE_IS_OFF";j[1782]="ER_CANT_SET_GTID_NEXT_TO_ANONYMOUS_WHEN_GTID_MODE_IS_ON";j[1783]="ER_CANT_SET_GTID_NEXT_LIST_TO_NON_NULL_WHEN_GTID_MODE_IS_OFF";j[1784]="ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF";j[1785]="ER_GTID_UNSAFE_NON_TRANSACTIONAL_TABLE";j[1786]="ER_GTID_UNSAFE_CREATE_SELECT";j[1787]="ER_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRANSACTION";j[1788]="ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME";j[1789]="ER_SOURCE_HAS_PURGED_REQUIRED_GTIDS";j[1790]="ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID";j[1791]="ER_UNKNOWN_EXPLAIN_FORMAT";j[1792]="ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION";j[1793]="ER_TOO_LONG_TABLE_PARTITION_COMMENT";j[1794]="ER_REPLICA_CONFIGURATION";j[1795]="ER_INNODB_FT_LIMIT";j[1796]="ER_INNODB_NO_FT_TEMP_TABLE";j[1797]="ER_INNODB_FT_WRONG_DOCID_COLUMN";j[1798]="ER_INNODB_FT_WRONG_DOCID_INDEX";j[1799]="ER_INNODB_ONLINE_LOG_TOO_BIG";j[1800]="ER_UNKNOWN_ALTER_ALGORITHM";j[1801]="ER_UNKNOWN_ALTER_LOCK";j[1802]="ER_MTA_CHANGE_SOURCE_CANT_RUN_WITH_GAPS";j[1803]="ER_MTA_RECOVERY_FAILURE";j[1804]="ER_MTA_RESET_WORKERS";j[1805]="ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2";j[1806]="ER_REPLICA_SILENT_RETRY_TRANSACTION";j[1807]="ER_DISCARD_FK_CHECKS_RUNNING";j[1808]="ER_TABLE_SCHEMA_MISMATCH";j[1809]="ER_TABLE_IN_SYSTEM_TABLESPACE";j[1810]="ER_IO_READ_ERROR";j[1811]="ER_IO_WRITE_ERROR";j[1812]="ER_TABLESPACE_MISSING";j[1813]="ER_TABLESPACE_EXISTS";j[1814]="ER_TABLESPACE_DISCARDED";j[1815]="ER_INTERNAL_ERROR";j[1816]="ER_INNODB_IMPORT_ERROR";j[1817]="ER_INNODB_INDEX_CORRUPT";j[1818]="ER_INVALID_YEAR_COLUMN_LENGTH";j[1819]="ER_NOT_VALID_PASSWORD";j[1820]="ER_MUST_CHANGE_PASSWORD";j[1821]="ER_FK_NO_INDEX_CHILD";j[1822]="ER_FK_NO_INDEX_PARENT";j[1823]="ER_FK_FAIL_ADD_SYSTEM";j[1824]="ER_FK_CANNOT_OPEN_PARENT";j[1825]="ER_FK_INCORRECT_OPTION";j[1826]="ER_FK_DUP_NAME";j[1827]="ER_PASSWORD_FORMAT";j[1828]="ER_FK_COLUMN_CANNOT_DROP";j[1829]="ER_FK_COLUMN_CANNOT_DROP_CHILD";j[1830]="ER_FK_COLUMN_NOT_NULL";j[1831]="ER_DUP_INDEX";j[1832]="ER_FK_COLUMN_CANNOT_CHANGE";j[1833]="ER_FK_COLUMN_CANNOT_CHANGE_CHILD";j[1834]="ER_UNUSED5";j[1835]="ER_MALFORMED_PACKET";j[1836]="ER_READ_ONLY_MODE";j[1837]="ER_GTID_NEXT_TYPE_UNDEFINED_GTID";j[1838]="ER_VARIABLE_NOT_SETTABLE_IN_SP";j[1839]="ER_CANT_SET_GTID_PURGED_WHEN_GTID_MODE_IS_OFF";j[1840]="ER_CANT_SET_GTID_PURGED_WHEN_GTID_EXECUTED_IS_NOT_EMPTY";j[1841]="ER_CANT_SET_GTID_PURGED_WHEN_OWNED_GTIDS_IS_NOT_EMPTY";j[1842]="ER_GTID_PURGED_WAS_CHANGED";j[1843]="ER_GTID_EXECUTED_WAS_CHANGED";j[1844]="ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES";j[1845]="ER_ALTER_OPERATION_NOT_SUPPORTED";j[1846]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON";j[1847]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COPY";j[1848]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_PARTITION";j[1849]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME";j[1850]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE";j[1851]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_CHECK";j[1852]="ER_UNUSED6";j[1853]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOPK";j[1854]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_AUTOINC";j[1855]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS";j[1856]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_CHANGE_FTS";j[1857]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS";j[1858]="ER_SQL_REPLICA_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE";j[1859]="ER_DUP_UNKNOWN_IN_INDEX";j[1860]="ER_IDENT_CAUSES_TOO_LONG_PATH";j[1861]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL";j[1862]="ER_MUST_CHANGE_PASSWORD_LOGIN";j[1863]="ER_ROW_IN_WRONG_PARTITION";j[1864]="ER_MTA_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX";j[1865]="ER_INNODB_NO_FT_USES_PARSER";j[1866]="ER_BINLOG_LOGICAL_CORRUPTION";j[1867]="ER_WARN_PURGE_LOG_IN_USE";j[1868]="ER_WARN_PURGE_LOG_IS_ACTIVE";j[1869]="ER_AUTO_INCREMENT_CONFLICT";j[1870]="WARN_ON_BLOCKHOLE_IN_RBR";j[1871]="ER_REPLICA_CM_INIT_REPOSITORY";j[1872]="ER_REPLICA_AM_INIT_REPOSITORY";j[1873]="ER_ACCESS_DENIED_CHANGE_USER_ERROR";j[1874]="ER_INNODB_READ_ONLY";j[1875]="ER_STOP_REPLICA_SQL_THREAD_TIMEOUT";j[1876]="ER_STOP_REPLICA_IO_THREAD_TIMEOUT";j[1877]="ER_TABLE_CORRUPT";j[1878]="ER_TEMP_FILE_WRITE_FAILURE";j[1879]="ER_INNODB_FT_AUX_NOT_HEX_ID";j[1880]="ER_OLD_TEMPORALS_UPGRADED";j[1881]="ER_INNODB_FORCED_RECOVERY";j[1882]="ER_AES_INVALID_IV";j[1883]="ER_PLUGIN_CANNOT_BE_UNINSTALLED";j[1884]="ER_GTID_UNSAFE_BINLOG_SPLITTABLE_STATEMENT_AND_ASSIGNED_GTID";j[1885]="ER_REPLICA_HAS_MORE_GTIDS_THAN_SOURCE";j[1886]="ER_MISSING_KEY";j[1887]="WARN_NAMED_PIPE_ACCESS_EVERYONE";j[3000]="ER_FILE_CORRUPT";j[3001]="ER_ERROR_ON_SOURCE";j[3002]="ER_INCONSISTENT_ERROR";j[3003]="ER_STORAGE_ENGINE_NOT_LOADED";j[3004]="ER_GET_STACKED_DA_WITHOUT_ACTIVE_HANDLER";j[3005]="ER_WARN_LEGACY_SYNTAX_CONVERTED";j[3006]="ER_BINLOG_UNSAFE_FULLTEXT_PLUGIN";j[3007]="ER_CANNOT_DISCARD_TEMPORARY_TABLE";j[3008]="ER_FK_DEPTH_EXCEEDED";j[3009]="ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE_V2";j[3010]="ER_WARN_TRIGGER_DOESNT_HAVE_CREATED";j[3011]="ER_REFERENCED_TRG_DOES_NOT_EXIST";j[3012]="ER_EXPLAIN_NOT_SUPPORTED";j[3013]="ER_INVALID_FIELD_SIZE";j[3014]="ER_MISSING_HA_CREATE_OPTION";j[3015]="ER_ENGINE_OUT_OF_MEMORY";j[3016]="ER_PASSWORD_EXPIRE_ANONYMOUS_USER";j[3017]="ER_REPLICA_SQL_THREAD_MUST_STOP";j[3018]="ER_NO_FT_MATERIALIZED_SUBQUERY";j[3019]="ER_INNODB_UNDO_LOG_FULL";j[3020]="ER_INVALID_ARGUMENT_FOR_LOGARITHM";j[3021]="ER_REPLICA_CHANNEL_IO_THREAD_MUST_STOP";j[3022]="ER_WARN_OPEN_TEMP_TABLES_MUST_BE_ZERO";j[3023]="ER_WARN_ONLY_SOURCE_LOG_FILE_NO_POS";j[3024]="ER_QUERY_TIMEOUT";j[3025]="ER_NON_RO_SELECT_DISABLE_TIMER";j[3026]="ER_DUP_LIST_ENTRY";j[3027]="ER_SQL_MODE_NO_EFFECT";j[3028]="ER_AGGREGATE_ORDER_FOR_UNION";j[3029]="ER_AGGREGATE_ORDER_NON_AGG_QUERY";j[3030]="ER_REPLICA_WORKER_STOPPED_PREVIOUS_THD_ERROR";j[3031]="ER_DONT_SUPPORT_REPLICA_PRESERVE_COMMIT_ORDER";j[3032]="ER_SERVER_OFFLINE_MODE";j[3033]="ER_GIS_DIFFERENT_SRIDS";j[3034]="ER_GIS_UNSUPPORTED_ARGUMENT";j[3035]="ER_GIS_UNKNOWN_ERROR";j[3036]="ER_GIS_UNKNOWN_EXCEPTION";j[3037]="ER_GIS_INVALID_DATA";j[3038]="ER_BOOST_GEOMETRY_EMPTY_INPUT_EXCEPTION";j[3039]="ER_BOOST_GEOMETRY_CENTROID_EXCEPTION";j[3040]="ER_BOOST_GEOMETRY_OVERLAY_INVALID_INPUT_EXCEPTION";j[3041]="ER_BOOST_GEOMETRY_TURN_INFO_EXCEPTION";j[3042]="ER_BOOST_GEOMETRY_SELF_INTERSECTION_POINT_EXCEPTION";j[3043]="ER_BOOST_GEOMETRY_UNKNOWN_EXCEPTION";j[3044]="ER_STD_BAD_ALLOC_ERROR";j[3045]="ER_STD_DOMAIN_ERROR";j[3046]="ER_STD_LENGTH_ERROR";j[3047]="ER_STD_INVALID_ARGUMENT";j[3048]="ER_STD_OUT_OF_RANGE_ERROR";j[3049]="ER_STD_OVERFLOW_ERROR";j[3050]="ER_STD_RANGE_ERROR";j[3051]="ER_STD_UNDERFLOW_ERROR";j[3052]="ER_STD_LOGIC_ERROR";j[3053]="ER_STD_RUNTIME_ERROR";j[3054]="ER_STD_UNKNOWN_EXCEPTION";j[3055]="ER_GIS_DATA_WRONG_ENDIANESS";j[3056]="ER_CHANGE_SOURCE_PASSWORD_LENGTH";j[3057]="ER_USER_LOCK_WRONG_NAME";j[3058]="ER_USER_LOCK_DEADLOCK";j[3059]="ER_REPLACE_INACCESSIBLE_ROWS";j[3060]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_GIS";j[3061]="ER_ILLEGAL_USER_VAR";j[3062]="ER_GTID_MODE_OFF";j[3063]="ER_UNSUPPORTED_BY_REPLICATION_THREAD";j[3064]="ER_INCORRECT_TYPE";j[3065]="ER_FIELD_IN_ORDER_NOT_SELECT";j[3066]="ER_AGGREGATE_IN_ORDER_NOT_SELECT";j[3067]="ER_INVALID_RPL_WILD_TABLE_FILTER_PATTERN";j[3068]="ER_NET_OK_PACKET_TOO_LARGE";j[3069]="ER_INVALID_JSON_DATA";j[3070]="ER_INVALID_GEOJSON_MISSING_MEMBER";j[3071]="ER_INVALID_GEOJSON_WRONG_TYPE";j[3072]="ER_INVALID_GEOJSON_UNSPECIFIED";j[3073]="ER_DIMENSION_UNSUPPORTED";j[3074]="ER_REPLICA_CHANNEL_DOES_NOT_EXIST";j[3075]="ER_SLAVE_MULTIPLE_CHANNELS_HOST_PORT";j[3076]="ER_REPLICA_CHANNEL_NAME_INVALID_OR_TOO_LONG";j[3077]="ER_REPLICA_NEW_CHANNEL_WRONG_REPOSITORY";j[3078]="ER_SLAVE_CHANNEL_DELETE";j[3079]="ER_REPLICA_MULTIPLE_CHANNELS_CMD";j[3080]="ER_REPLICA_MAX_CHANNELS_EXCEEDED";j[3081]="ER_REPLICA_CHANNEL_MUST_STOP";j[3082]="ER_REPLICA_CHANNEL_NOT_RUNNING";j[3083]="ER_REPLICA_CHANNEL_WAS_RUNNING";j[3084]="ER_REPLICA_CHANNEL_WAS_NOT_RUNNING";j[3085]="ER_REPLICA_CHANNEL_SQL_THREAD_MUST_STOP";j[3086]="ER_REPLICA_CHANNEL_SQL_SKIP_COUNTER";j[3087]="ER_WRONG_FIELD_WITH_GROUP_V2";j[3088]="ER_MIX_OF_GROUP_FUNC_AND_FIELDS_V2";j[3089]="ER_WARN_DEPRECATED_SYSVAR_UPDATE";j[3090]="ER_WARN_DEPRECATED_SQLMODE";j[3091]="ER_CANNOT_LOG_PARTIAL_DROP_DATABASE_WITH_GTID";j[3092]="ER_GROUP_REPLICATION_CONFIGURATION";j[3093]="ER_GROUP_REPLICATION_RUNNING";j[3094]="ER_GROUP_REPLICATION_APPLIER_INIT_ERROR";j[3095]="ER_GROUP_REPLICATION_STOP_APPLIER_THREAD_TIMEOUT";j[3096]="ER_GROUP_REPLICATION_COMMUNICATION_LAYER_SESSION_ERROR";j[3097]="ER_GROUP_REPLICATION_COMMUNICATION_LAYER_JOIN_ERROR";j[3098]="ER_BEFORE_DML_VALIDATION_ERROR";j[3099]="ER_PREVENTS_VARIABLE_WITHOUT_RBR";j[3100]="ER_RUN_HOOK_ERROR";j[3101]="ER_TRANSACTION_ROLLBACK_DURING_COMMIT";j[3102]="ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED";j[3103]="ER_UNSUPPORTED_ALTER_INPLACE_ON_VIRTUAL_COLUMN";j[3104]="ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN";j[3105]="ER_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN";j[3106]="ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN";j[3107]="ER_GENERATED_COLUMN_NON_PRIOR";j[3108]="ER_DEPENDENT_BY_GENERATED_COLUMN";j[3109]="ER_GENERATED_COLUMN_REF_AUTO_INC";j[3110]="ER_FEATURE_NOT_AVAILABLE";j[3111]="ER_CANT_SET_GTID_MODE";j[3112]="ER_CANT_USE_AUTO_POSITION_WITH_GTID_MODE_OFF";j[3113]="ER_CANT_REPLICATE_ANONYMOUS_WITH_AUTO_POSITION";j[3114]="ER_CANT_REPLICATE_ANONYMOUS_WITH_GTID_MODE_ON";j[3115]="ER_CANT_REPLICATE_GTID_WITH_GTID_MODE_OFF";j[3116]="ER_CANT_ENFORCE_GTID_CONSISTENCY_WITH_ONGOING_GTID_VIOLATING_TX";j[3117]="ER_ENFORCE_GTID_CONSISTENCY_WARN_WITH_ONGOING_GTID_VIOLATING_TX";j[3118]="ER_ACCOUNT_HAS_BEEN_LOCKED";j[3119]="ER_WRONG_TABLESPACE_NAME";j[3120]="ER_TABLESPACE_IS_NOT_EMPTY";j[3121]="ER_WRONG_FILE_NAME";j[3122]="ER_BOOST_GEOMETRY_INCONSISTENT_TURNS_EXCEPTION";j[3123]="ER_WARN_OPTIMIZER_HINT_SYNTAX_ERROR";j[3124]="ER_WARN_BAD_MAX_EXECUTION_TIME";j[3125]="ER_WARN_UNSUPPORTED_MAX_EXECUTION_TIME";j[3126]="ER_WARN_CONFLICTING_HINT";j[3127]="ER_WARN_UNKNOWN_QB_NAME";j[3128]="ER_UNRESOLVED_HINT_NAME";j[3129]="ER_WARN_ON_MODIFYING_GTID_EXECUTED_TABLE";j[3130]="ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED";j[3131]="ER_LOCKING_SERVICE_WRONG_NAME";j[3132]="ER_LOCKING_SERVICE_DEADLOCK";j[3133]="ER_LOCKING_SERVICE_TIMEOUT";j[3134]="ER_GIS_MAX_POINTS_IN_GEOMETRY_OVERFLOWED";j[3135]="ER_SQL_MODE_MERGED";j[3136]="ER_VTOKEN_PLUGIN_TOKEN_MISMATCH";j[3137]="ER_VTOKEN_PLUGIN_TOKEN_NOT_FOUND";j[3138]="ER_CANT_SET_VARIABLE_WHEN_OWNING_GTID";j[3139]="ER_REPLICA_CHANNEL_OPERATION_NOT_ALLOWED";j[3140]="ER_INVALID_JSON_TEXT";j[3141]="ER_INVALID_JSON_TEXT_IN_PARAM";j[3142]="ER_INVALID_JSON_BINARY_DATA";j[3143]="ER_INVALID_JSON_PATH";j[3144]="ER_INVALID_JSON_CHARSET";j[3145]="ER_INVALID_JSON_CHARSET_IN_FUNCTION";j[3146]="ER_INVALID_TYPE_FOR_JSON";j[3147]="ER_INVALID_CAST_TO_JSON";j[3148]="ER_INVALID_JSON_PATH_CHARSET";j[3149]="ER_INVALID_JSON_PATH_WILDCARD";j[3150]="ER_JSON_VALUE_TOO_BIG";j[3151]="ER_JSON_KEY_TOO_BIG";j[3152]="ER_JSON_USED_AS_KEY";j[3153]="ER_JSON_VACUOUS_PATH";j[3154]="ER_JSON_BAD_ONE_OR_ALL_ARG";j[3155]="ER_NUMERIC_JSON_VALUE_OUT_OF_RANGE";j[3156]="ER_INVALID_JSON_VALUE_FOR_CAST";j[3157]="ER_JSON_DOCUMENT_TOO_DEEP";j[3158]="ER_JSON_DOCUMENT_NULL_KEY";j[3159]="ER_SECURE_TRANSPORT_REQUIRED";j[3160]="ER_NO_SECURE_TRANSPORTS_CONFIGURED";j[3161]="ER_DISABLED_STORAGE_ENGINE";j[3162]="ER_USER_DOES_NOT_EXIST";j[3163]="ER_USER_ALREADY_EXISTS";j[3164]="ER_AUDIT_API_ABORT";j[3165]="ER_INVALID_JSON_PATH_ARRAY_CELL";j[3166]="ER_BUFPOOL_RESIZE_INPROGRESS";j[3167]="ER_FEATURE_DISABLED_SEE_DOC";j[3168]="ER_SERVER_ISNT_AVAILABLE";j[3169]="ER_SESSION_WAS_KILLED";j[3170]="ER_CAPACITY_EXCEEDED";j[3171]="ER_CAPACITY_EXCEEDED_IN_RANGE_OPTIMIZER";j[3172]="ER_TABLE_NEEDS_UPG_PART";j[3173]="ER_CANT_WAIT_FOR_EXECUTED_GTID_SET_WHILE_OWNING_A_GTID";j[3174]="ER_CANNOT_ADD_FOREIGN_BASE_COL_VIRTUAL";j[3175]="ER_CANNOT_CREATE_VIRTUAL_INDEX_CONSTRAINT";j[3176]="ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE";j[3177]="ER_LOCK_REFUSED_BY_ENGINE";j[3178]="ER_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN";j[3179]="ER_MASTER_KEY_ROTATION_NOT_SUPPORTED_BY_SE";j[3180]="ER_MASTER_KEY_ROTATION_ERROR_BY_SE";j[3181]="ER_MASTER_KEY_ROTATION_BINLOG_FAILED";j[3182]="ER_MASTER_KEY_ROTATION_SE_UNAVAILABLE";j[3183]="ER_TABLESPACE_CANNOT_ENCRYPT";j[3184]="ER_INVALID_ENCRYPTION_OPTION";j[3185]="ER_CANNOT_FIND_KEY_IN_KEYRING";j[3186]="ER_CAPACITY_EXCEEDED_IN_PARSER";j[3187]="ER_UNSUPPORTED_ALTER_ENCRYPTION_INPLACE";j[3188]="ER_KEYRING_UDF_KEYRING_SERVICE_ERROR";j[3189]="ER_USER_COLUMN_OLD_LENGTH";j[3190]="ER_CANT_RESET_SOURCE";j[3191]="ER_GROUP_REPLICATION_MAX_GROUP_SIZE";j[3192]="ER_CANNOT_ADD_FOREIGN_BASE_COL_STORED";j[3193]="ER_TABLE_REFERENCED";j[3194]="ER_PARTITION_ENGINE_DEPRECATED_FOR_TABLE";j[3195]="ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID_ZERO";j[3196]="ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID";j[3197]="ER_XA_RETRY";j[3198]="ER_KEYRING_AWS_UDF_AWS_KMS_ERROR";j[3199]="ER_BINLOG_UNSAFE_XA";j[3200]="ER_UDF_ERROR";j[3201]="ER_KEYRING_MIGRATION_FAILURE";j[3202]="ER_KEYRING_ACCESS_DENIED_ERROR";j[3203]="ER_KEYRING_MIGRATION_STATUS";j[3204]="ER_PLUGIN_FAILED_TO_OPEN_TABLES";j[3205]="ER_PLUGIN_FAILED_TO_OPEN_TABLE";j[3206]="ER_AUDIT_LOG_NO_KEYRING_PLUGIN_INSTALLED";j[3207]="ER_AUDIT_LOG_ENCRYPTION_PASSWORD_HAS_NOT_BEEN_SET";j[3208]="ER_AUDIT_LOG_COULD_NOT_CREATE_AES_KEY";j[3209]="ER_AUDIT_LOG_ENCRYPTION_PASSWORD_CANNOT_BE_FETCHED";j[3210]="ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED";j[3211]="ER_AUDIT_LOG_UDF_INSUFFICIENT_PRIVILEGE";j[3212]="ER_AUDIT_LOG_SUPER_PRIVILEGE_REQUIRED";j[3213]="ER_COULD_NOT_REINITIALIZE_AUDIT_LOG_FILTERS";j[3214]="ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_TYPE";j[3215]="ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_COUNT";j[3216]="ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED";j[3217]="ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_TYPE";j[3218]="ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_VALUE";j[3219]="ER_AUDIT_LOG_JSON_FILTER_PARSING_ERROR";j[3220]="ER_AUDIT_LOG_JSON_FILTER_NAME_CANNOT_BE_EMPTY";j[3221]="ER_AUDIT_LOG_JSON_USER_NAME_CANNOT_BE_EMPTY";j[3222]="ER_AUDIT_LOG_JSON_FILTER_DOES_NOT_EXISTS";j[3223]="ER_AUDIT_LOG_USER_FIRST_CHARACTER_MUST_BE_ALPHANUMERIC";j[3224]="ER_AUDIT_LOG_USER_NAME_INVALID_CHARACTER";j[3225]="ER_AUDIT_LOG_HOST_NAME_INVALID_CHARACTER";j[3226]="WARN_DEPRECATED_MAXDB_SQL_MODE_FOR_TIMESTAMP";j[3227]="ER_XA_REPLICATION_FILTERS";j[3228]="ER_CANT_OPEN_ERROR_LOG";j[3229]="ER_GROUPING_ON_TIMESTAMP_IN_DST";j[3230]="ER_CANT_START_SERVER_NAMED_PIPE";j[3231]="ER_WRITE_SET_EXCEEDS_LIMIT";j[3232]="ER_DEPRECATED_TLS_VERSION_SESSION_57";j[3233]="ER_WARN_DEPRECATED_TLS_VERSION_57";j[3234]="ER_WARN_WRONG_NATIVE_TABLE_STRUCTURE";j[3235]="ER_AES_INVALID_KDF_NAME";j[3236]="ER_AES_INVALID_KDF_ITERATIONS";j[3237]="WARN_AES_KEY_SIZE";j[3238]="ER_AES_INVALID_KDF_OPTION_SIZE";j[3500]="ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE";j[3501]="ER_ACL_OPERATION_FAILED";j[3502]="ER_UNSUPPORTED_INDEX_ALGORITHM";j[3503]="ER_NO_SUCH_DB";j[3504]="ER_TOO_BIG_ENUM";j[3505]="ER_TOO_LONG_SET_ENUM_VALUE";j[3506]="ER_INVALID_DD_OBJECT";j[3507]="ER_UPDATING_DD_TABLE";j[3508]="ER_INVALID_DD_OBJECT_ID";j[3509]="ER_INVALID_DD_OBJECT_NAME";j[3510]="ER_TABLESPACE_MISSING_WITH_NAME";j[3511]="ER_TOO_LONG_ROUTINE_COMMENT";j[3512]="ER_SP_LOAD_FAILED";j[3513]="ER_INVALID_BITWISE_OPERANDS_SIZE";j[3514]="ER_INVALID_BITWISE_AGGREGATE_OPERANDS_SIZE";j[3515]="ER_WARN_UNSUPPORTED_HINT";j[3516]="ER_UNEXPECTED_GEOMETRY_TYPE";j[3517]="ER_SRS_PARSE_ERROR";j[3518]="ER_SRS_PROJ_PARAMETER_MISSING";j[3519]="ER_WARN_SRS_NOT_FOUND";j[3520]="ER_SRS_NOT_CARTESIAN";j[3521]="ER_SRS_NOT_CARTESIAN_UNDEFINED";j[3522]="ER_PK_INDEX_CANT_BE_INVISIBLE";j[3523]="ER_UNKNOWN_AUTHID";j[3524]="ER_FAILED_ROLE_GRANT";j[3525]="ER_OPEN_ROLE_TABLES";j[3526]="ER_FAILED_DEFAULT_ROLES";j[3527]="ER_COMPONENTS_NO_SCHEME";j[3528]="ER_COMPONENTS_NO_SCHEME_SERVICE";j[3529]="ER_COMPONENTS_CANT_LOAD";j[3530]="ER_ROLE_NOT_GRANTED";j[3531]="ER_FAILED_REVOKE_ROLE";j[3532]="ER_RENAME_ROLE";j[3533]="ER_COMPONENTS_CANT_ACQUIRE_SERVICE_IMPLEMENTATION";j[3534]="ER_COMPONENTS_CANT_SATISFY_DEPENDENCY";j[3535]="ER_COMPONENTS_LOAD_CANT_REGISTER_SERVICE_IMPLEMENTATION";j[3536]="ER_COMPONENTS_LOAD_CANT_INITIALIZE";j[3537]="ER_COMPONENTS_UNLOAD_NOT_LOADED";j[3538]="ER_COMPONENTS_UNLOAD_CANT_DEINITIALIZE";j[3539]="ER_COMPONENTS_CANT_RELEASE_SERVICE";j[3540]="ER_COMPONENTS_UNLOAD_CANT_UNREGISTER_SERVICE";j[3541]="ER_COMPONENTS_CANT_UNLOAD";j[3542]="ER_WARN_UNLOAD_THE_NOT_PERSISTED";j[3543]="ER_COMPONENT_TABLE_INCORRECT";j[3544]="ER_COMPONENT_MANIPULATE_ROW_FAILED";j[3545]="ER_COMPONENTS_UNLOAD_DUPLICATE_IN_GROUP";j[3546]="ER_CANT_SET_GTID_PURGED_DUE_SETS_CONSTRAINTS";j[3547]="ER_CANNOT_LOCK_USER_MANAGEMENT_CACHES";j[3548]="ER_SRS_NOT_FOUND";j[3549]="ER_VARIABLE_NOT_PERSISTED";j[3550]="ER_IS_QUERY_INVALID_CLAUSE";j[3551]="ER_UNABLE_TO_STORE_STATISTICS";j[3552]="ER_NO_SYSTEM_SCHEMA_ACCESS";j[3553]="ER_NO_SYSTEM_TABLESPACE_ACCESS";j[3554]="ER_NO_SYSTEM_TABLE_ACCESS";j[3555]="ER_NO_SYSTEM_TABLE_ACCESS_FOR_DICTIONARY_TABLE";j[3556]="ER_NO_SYSTEM_TABLE_ACCESS_FOR_SYSTEM_TABLE";j[3557]="ER_NO_SYSTEM_TABLE_ACCESS_FOR_TABLE";j[3558]="ER_INVALID_OPTION_KEY";j[3559]="ER_INVALID_OPTION_VALUE";j[3560]="ER_INVALID_OPTION_KEY_VALUE_PAIR";j[3561]="ER_INVALID_OPTION_START_CHARACTER";j[3562]="ER_INVALID_OPTION_END_CHARACTER";j[3563]="ER_INVALID_OPTION_CHARACTERS";j[3564]="ER_DUPLICATE_OPTION_KEY";j[3565]="ER_WARN_SRS_NOT_FOUND_AXIS_ORDER";j[3566]="ER_NO_ACCESS_TO_NATIVE_FCT";j[3567]="ER_RESET_SOURCE_TO_VALUE_OUT_OF_RANGE";j[3568]="ER_UNRESOLVED_TABLE_LOCK";j[3569]="ER_DUPLICATE_TABLE_LOCK";j[3570]="ER_BINLOG_UNSAFE_SKIP_LOCKED";j[3571]="ER_BINLOG_UNSAFE_NOWAIT";j[3572]="ER_LOCK_NOWAIT";j[3573]="ER_CTE_RECURSIVE_REQUIRES_UNION";j[3574]="ER_CTE_RECURSIVE_REQUIRES_NONRECURSIVE_FIRST";j[3575]="ER_CTE_RECURSIVE_FORBIDS_AGGREGATION";j[3576]="ER_CTE_RECURSIVE_FORBIDDEN_JOIN_ORDER";j[3577]="ER_CTE_RECURSIVE_REQUIRES_SINGLE_REFERENCE";j[3578]="ER_SWITCH_TMP_ENGINE";j[3579]="ER_WINDOW_NO_SUCH_WINDOW";j[3580]="ER_WINDOW_CIRCULARITY_IN_WINDOW_GRAPH";j[3581]="ER_WINDOW_NO_CHILD_PARTITIONING";j[3582]="ER_WINDOW_NO_INHERIT_FRAME";j[3583]="ER_WINDOW_NO_REDEFINE_ORDER_BY";j[3584]="ER_WINDOW_FRAME_START_ILLEGAL";j[3585]="ER_WINDOW_FRAME_END_ILLEGAL";j[3586]="ER_WINDOW_FRAME_ILLEGAL";j[3587]="ER_WINDOW_RANGE_FRAME_ORDER_TYPE";j[3588]="ER_WINDOW_RANGE_FRAME_TEMPORAL_TYPE";j[3589]="ER_WINDOW_RANGE_FRAME_NUMERIC_TYPE";j[3590]="ER_WINDOW_RANGE_BOUND_NOT_CONSTANT";j[3591]="ER_WINDOW_DUPLICATE_NAME";j[3592]="ER_WINDOW_ILLEGAL_ORDER_BY";j[3593]="ER_WINDOW_INVALID_WINDOW_FUNC_USE";j[3594]="ER_WINDOW_INVALID_WINDOW_FUNC_ALIAS_USE";j[3595]="ER_WINDOW_NESTED_WINDOW_FUNC_USE_IN_WINDOW_SPEC";j[3596]="ER_WINDOW_ROWS_INTERVAL_USE";j[3597]="ER_WINDOW_NO_GROUP_ORDER";j[3598]="ER_WINDOW_EXPLAIN_JSON";j[3599]="ER_WINDOW_FUNCTION_IGNORES_FRAME";j[3600]="ER_WL9236_NOW";j[3601]="ER_INVALID_NO_OF_ARGS";j[3602]="ER_FIELD_IN_GROUPING_NOT_GROUP_BY";j[3603]="ER_TOO_LONG_TABLESPACE_COMMENT";j[3604]="ER_ENGINE_CANT_DROP_TABLE";j[3605]="ER_ENGINE_CANT_DROP_MISSING_TABLE";j[3606]="ER_TABLESPACE_DUP_FILENAME";j[3607]="ER_DB_DROP_RMDIR2";j[3608]="ER_IMP_NO_FILES_MATCHED";j[3609]="ER_IMP_SCHEMA_DOES_NOT_EXIST";j[3610]="ER_IMP_TABLE_ALREADY_EXISTS";j[3611]="ER_IMP_INCOMPATIBLE_MYSQLD_VERSION";j[3612]="ER_IMP_INCOMPATIBLE_DD_VERSION";j[3613]="ER_IMP_INCOMPATIBLE_SDI_VERSION";j[3614]="ER_WARN_INVALID_HINT";j[3615]="ER_VAR_DOES_NOT_EXIST";j[3616]="ER_LONGITUDE_OUT_OF_RANGE";j[3617]="ER_LATITUDE_OUT_OF_RANGE";j[3618]="ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS";j[3619]="ER_ILLEGAL_PRIVILEGE_LEVEL";j[3620]="ER_NO_SYSTEM_VIEW_ACCESS";j[3621]="ER_COMPONENT_FILTER_FLABBERGASTED";j[3622]="ER_PART_EXPR_TOO_LONG";j[3623]="ER_UDF_DROP_DYNAMICALLY_REGISTERED";j[3624]="ER_UNABLE_TO_STORE_COLUMN_STATISTICS";j[3625]="ER_UNABLE_TO_UPDATE_COLUMN_STATISTICS";j[3626]="ER_UNABLE_TO_DROP_COLUMN_STATISTICS";j[3627]="ER_UNABLE_TO_BUILD_HISTOGRAM";j[3628]="ER_MANDATORY_ROLE";j[3629]="ER_MISSING_TABLESPACE_FILE";j[3630]="ER_PERSIST_ONLY_ACCESS_DENIED_ERROR";j[3631]="ER_CMD_NEED_SUPER";j[3632]="ER_PATH_IN_DATADIR";j[3633]="ER_CLONE_DDL_IN_PROGRESS";j[3634]="ER_CLONE_TOO_MANY_CONCURRENT_CLONES";j[3635]="ER_APPLIER_LOG_EVENT_VALIDATION_ERROR";j[3636]="ER_CTE_MAX_RECURSION_DEPTH";j[3637]="ER_NOT_HINT_UPDATABLE_VARIABLE";j[3638]="ER_CREDENTIALS_CONTRADICT_TO_HISTORY";j[3639]="ER_WARNING_PASSWORD_HISTORY_CLAUSES_VOID";j[3640]="ER_CLIENT_DOES_NOT_SUPPORT";j[3641]="ER_I_S_SKIPPED_TABLESPACE";j[3642]="ER_TABLESPACE_ENGINE_MISMATCH";j[3643]="ER_WRONG_SRID_FOR_COLUMN";j[3644]="ER_CANNOT_ALTER_SRID_DUE_TO_INDEX";j[3645]="ER_WARN_BINLOG_PARTIAL_UPDATES_DISABLED";j[3646]="ER_WARN_BINLOG_V1_ROW_EVENTS_DISABLED";j[3647]="ER_WARN_BINLOG_PARTIAL_UPDATES_SUGGESTS_PARTIAL_IMAGES";j[3648]="ER_COULD_NOT_APPLY_JSON_DIFF";j[3649]="ER_CORRUPTED_JSON_DIFF";j[3650]="ER_RESOURCE_GROUP_EXISTS";j[3651]="ER_RESOURCE_GROUP_NOT_EXISTS";j[3652]="ER_INVALID_VCPU_ID";j[3653]="ER_INVALID_VCPU_RANGE";j[3654]="ER_INVALID_THREAD_PRIORITY";j[3655]="ER_DISALLOWED_OPERATION";j[3656]="ER_RESOURCE_GROUP_BUSY";j[3657]="ER_RESOURCE_GROUP_DISABLED";j[3658]="ER_FEATURE_UNSUPPORTED";j[3659]="ER_ATTRIBUTE_IGNORED";j[3660]="ER_INVALID_THREAD_ID";j[3661]="ER_RESOURCE_GROUP_BIND_FAILED";j[3662]="ER_INVALID_USE_OF_FORCE_OPTION";j[3663]="ER_GROUP_REPLICATION_COMMAND_FAILURE";j[3664]="ER_SDI_OPERATION_FAILED";j[3665]="ER_MISSING_JSON_TABLE_VALUE";j[3666]="ER_WRONG_JSON_TABLE_VALUE";j[3667]="ER_TF_MUST_HAVE_ALIAS";j[3668]="ER_TF_FORBIDDEN_JOIN_TYPE";j[3669]="ER_JT_VALUE_OUT_OF_RANGE";j[3670]="ER_JT_MAX_NESTED_PATH";j[3671]="ER_PASSWORD_EXPIRATION_NOT_SUPPORTED_BY_AUTH_METHOD";j[3672]="ER_INVALID_GEOJSON_CRS_NOT_TOP_LEVEL";j[3673]="ER_BAD_NULL_ERROR_NOT_IGNORED";j[3674]="WARN_USELESS_SPATIAL_INDEX";j[3675]="ER_DISK_FULL_NOWAIT";j[3676]="ER_PARSE_ERROR_IN_DIGEST_FN";j[3677]="ER_UNDISCLOSED_PARSE_ERROR_IN_DIGEST_FN";j[3678]="ER_SCHEMA_DIR_EXISTS";j[3679]="ER_SCHEMA_DIR_MISSING";j[3680]="ER_SCHEMA_DIR_CREATE_FAILED";j[3681]="ER_SCHEMA_DIR_UNKNOWN";j[3682]="ER_ONLY_IMPLEMENTED_FOR_SRID_0_AND_4326";j[3683]="ER_BINLOG_EXPIRE_LOG_DAYS_AND_SECS_USED_TOGETHER";j[3684]="ER_REGEXP_BUFFER_OVERFLOW";j[3685]="ER_REGEXP_ILLEGAL_ARGUMENT";j[3686]="ER_REGEXP_INDEX_OUTOFBOUNDS_ERROR";j[3687]="ER_REGEXP_INTERNAL_ERROR";j[3688]="ER_REGEXP_RULE_SYNTAX";j[3689]="ER_REGEXP_BAD_ESCAPE_SEQUENCE";j[3690]="ER_REGEXP_UNIMPLEMENTED";j[3691]="ER_REGEXP_MISMATCHED_PAREN";j[3692]="ER_REGEXP_BAD_INTERVAL";j[3693]="ER_REGEXP_MAX_LT_MIN";j[3694]="ER_REGEXP_INVALID_BACK_REF";j[3695]="ER_REGEXP_LOOK_BEHIND_LIMIT";j[3696]="ER_REGEXP_MISSING_CLOSE_BRACKET";j[3697]="ER_REGEXP_INVALID_RANGE";j[3698]="ER_REGEXP_STACK_OVERFLOW";j[3699]="ER_REGEXP_TIME_OUT";j[3700]="ER_REGEXP_PATTERN_TOO_BIG";j[3701]="ER_CANT_SET_ERROR_LOG_SERVICE";j[3702]="ER_EMPTY_PIPELINE_FOR_ERROR_LOG_SERVICE";j[3703]="ER_COMPONENT_FILTER_DIAGNOSTICS";j[3704]="ER_NOT_IMPLEMENTED_FOR_CARTESIAN_SRS";j[3705]="ER_NOT_IMPLEMENTED_FOR_PROJECTED_SRS";j[3706]="ER_NONPOSITIVE_RADIUS";j[3707]="ER_RESTART_SERVER_FAILED";j[3708]="ER_SRS_MISSING_MANDATORY_ATTRIBUTE";j[3709]="ER_SRS_MULTIPLE_ATTRIBUTE_DEFINITIONS";j[3710]="ER_SRS_NAME_CANT_BE_EMPTY_OR_WHITESPACE";j[3711]="ER_SRS_ORGANIZATION_CANT_BE_EMPTY_OR_WHITESPACE";j[3712]="ER_SRS_ID_ALREADY_EXISTS";j[3713]="ER_WARN_SRS_ID_ALREADY_EXISTS";j[3714]="ER_CANT_MODIFY_SRID_0";j[3715]="ER_WARN_RESERVED_SRID_RANGE";j[3716]="ER_CANT_MODIFY_SRS_USED_BY_COLUMN";j[3717]="ER_SRS_INVALID_CHARACTER_IN_ATTRIBUTE";j[3718]="ER_SRS_ATTRIBUTE_STRING_TOO_LONG";j[3719]="ER_DEPRECATED_UTF8_ALIAS";j[3720]="ER_DEPRECATED_NATIONAL";j[3721]="ER_INVALID_DEFAULT_UTF8MB4_COLLATION";j[3722]="ER_UNABLE_TO_COLLECT_LOG_STATUS";j[3723]="ER_RESERVED_TABLESPACE_NAME";j[3724]="ER_UNABLE_TO_SET_OPTION";j[3725]="ER_REPLICA_POSSIBLY_DIVERGED_AFTER_DDL";j[3726]="ER_SRS_NOT_GEOGRAPHIC";j[3727]="ER_POLYGON_TOO_LARGE";j[3728]="ER_SPATIAL_UNIQUE_INDEX";j[3729]="ER_INDEX_TYPE_NOT_SUPPORTED_FOR_SPATIAL_INDEX";j[3730]="ER_FK_CANNOT_DROP_PARENT";j[3731]="ER_GEOMETRY_PARAM_LONGITUDE_OUT_OF_RANGE";j[3732]="ER_GEOMETRY_PARAM_LATITUDE_OUT_OF_RANGE";j[3733]="ER_FK_CANNOT_USE_VIRTUAL_COLUMN";j[3734]="ER_FK_NO_COLUMN_PARENT";j[3735]="ER_CANT_SET_ERROR_SUPPRESSION_LIST";j[3736]="ER_SRS_GEOGCS_INVALID_AXES";j[3737]="ER_SRS_INVALID_SEMI_MAJOR_AXIS";j[3738]="ER_SRS_INVALID_INVERSE_FLATTENING";j[3739]="ER_SRS_INVALID_ANGULAR_UNIT";j[3740]="ER_SRS_INVALID_PRIME_MERIDIAN";j[3741]="ER_TRANSFORM_SOURCE_SRS_NOT_SUPPORTED";j[3742]="ER_TRANSFORM_TARGET_SRS_NOT_SUPPORTED";j[3743]="ER_TRANSFORM_SOURCE_SRS_MISSING_TOWGS84";j[3744]="ER_TRANSFORM_TARGET_SRS_MISSING_TOWGS84";j[3745]="ER_TEMP_TABLE_PREVENTS_SWITCH_SESSION_BINLOG_FORMAT";j[3746]="ER_TEMP_TABLE_PREVENTS_SWITCH_GLOBAL_BINLOG_FORMAT";j[3747]="ER_RUNNING_APPLIER_PREVENTS_SWITCH_GLOBAL_BINLOG_FORMAT";j[3748]="ER_CLIENT_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRX_IN_SBR";j[3749]="ER_XA_CANT_CREATE_MDL_BACKUP";j[3750]="ER_TABLE_WITHOUT_PK";j[3751]="ER_WARN_DATA_TRUNCATED_FUNCTIONAL_INDEX";j[3752]="ER_WARN_DATA_OUT_OF_RANGE_FUNCTIONAL_INDEX";j[3753]="ER_FUNCTIONAL_INDEX_ON_JSON_OR_GEOMETRY_FUNCTION";j[3754]="ER_FUNCTIONAL_INDEX_REF_AUTO_INCREMENT";j[3755]="ER_CANNOT_DROP_COLUMN_FUNCTIONAL_INDEX";j[3756]="ER_FUNCTIONAL_INDEX_PRIMARY_KEY";j[3757]="ER_FUNCTIONAL_INDEX_ON_LOB";j[3758]="ER_FUNCTIONAL_INDEX_FUNCTION_IS_NOT_ALLOWED";j[3759]="ER_FULLTEXT_FUNCTIONAL_INDEX";j[3760]="ER_SPATIAL_FUNCTIONAL_INDEX";j[3761]="ER_WRONG_KEY_COLUMN_FUNCTIONAL_INDEX";j[3762]="ER_FUNCTIONAL_INDEX_ON_FIELD";j[3763]="ER_GENERATED_COLUMN_NAMED_FUNCTION_IS_NOT_ALLOWED";j[3764]="ER_GENERATED_COLUMN_ROW_VALUE";j[3765]="ER_GENERATED_COLUMN_VARIABLES";j[3766]="ER_DEPENDENT_BY_DEFAULT_GENERATED_VALUE";j[3767]="ER_DEFAULT_VAL_GENERATED_NON_PRIOR";j[3768]="ER_DEFAULT_VAL_GENERATED_REF_AUTO_INC";j[3769]="ER_DEFAULT_VAL_GENERATED_FUNCTION_IS_NOT_ALLOWED";j[3770]="ER_DEFAULT_VAL_GENERATED_NAMED_FUNCTION_IS_NOT_ALLOWED";j[3771]="ER_DEFAULT_VAL_GENERATED_ROW_VALUE";j[3772]="ER_DEFAULT_VAL_GENERATED_VARIABLES";j[3773]="ER_DEFAULT_AS_VAL_GENERATED";j[3774]="ER_UNSUPPORTED_ACTION_ON_DEFAULT_VAL_GENERATED";j[3775]="ER_GTID_UNSAFE_ALTER_ADD_COL_WITH_DEFAULT_EXPRESSION";j[3776]="ER_FK_CANNOT_CHANGE_ENGINE";j[3777]="ER_WARN_DEPRECATED_USER_SET_EXPR";j[3778]="ER_WARN_DEPRECATED_UTF8MB3_COLLATION";j[3779]="ER_WARN_DEPRECATED_NESTED_COMMENT_SYNTAX";j[3780]="ER_FK_INCOMPATIBLE_COLUMNS";j[3781]="ER_GR_HOLD_WAIT_TIMEOUT";j[3782]="ER_GR_HOLD_KILLED";j[3783]="ER_GR_HOLD_MEMBER_STATUS_ERROR";j[3784]="ER_RPL_ENCRYPTION_FAILED_TO_FETCH_KEY";j[3785]="ER_RPL_ENCRYPTION_KEY_NOT_FOUND";j[3786]="ER_RPL_ENCRYPTION_KEYRING_INVALID_KEY";j[3787]="ER_RPL_ENCRYPTION_HEADER_ERROR";j[3788]="ER_RPL_ENCRYPTION_FAILED_TO_ROTATE_LOGS";j[3789]="ER_RPL_ENCRYPTION_KEY_EXISTS_UNEXPECTED";j[3790]="ER_RPL_ENCRYPTION_FAILED_TO_GENERATE_KEY";j[3791]="ER_RPL_ENCRYPTION_FAILED_TO_STORE_KEY";j[3792]="ER_RPL_ENCRYPTION_FAILED_TO_REMOVE_KEY";j[3793]="ER_RPL_ENCRYPTION_UNABLE_TO_CHANGE_OPTION";j[3794]="ER_RPL_ENCRYPTION_MASTER_KEY_RECOVERY_FAILED";j[3795]="ER_SLOW_LOG_MODE_IGNORED_WHEN_NOT_LOGGING_TO_FILE";j[3796]="ER_GRP_TRX_CONSISTENCY_NOT_ALLOWED";j[3797]="ER_GRP_TRX_CONSISTENCY_BEFORE";j[3798]="ER_GRP_TRX_CONSISTENCY_AFTER_ON_TRX_BEGIN";j[3799]="ER_GRP_TRX_CONSISTENCY_BEGIN_NOT_ALLOWED";j[3800]="ER_FUNCTIONAL_INDEX_ROW_VALUE_IS_NOT_ALLOWED";j[3801]="ER_RPL_ENCRYPTION_FAILED_TO_ENCRYPT";j[3802]="ER_PAGE_TRACKING_NOT_STARTED";j[3803]="ER_PAGE_TRACKING_RANGE_NOT_TRACKED";j[3804]="ER_PAGE_TRACKING_CANNOT_PURGE";j[3805]="ER_RPL_ENCRYPTION_CANNOT_ROTATE_BINLOG_MASTER_KEY";j[3806]="ER_BINLOG_MASTER_KEY_RECOVERY_OUT_OF_COMBINATION";j[3807]="ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_OPERATE_KEY";j[3808]="ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_ROTATE_LOGS";j[3809]="ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_REENCRYPT_LOG";j[3810]="ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_UNUSED_KEYS";j[3811]="ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_AUX_KEY";j[3812]="ER_NON_BOOLEAN_EXPR_FOR_CHECK_CONSTRAINT";j[3813]="ER_COLUMN_CHECK_CONSTRAINT_REFERENCES_OTHER_COLUMN";j[3814]="ER_CHECK_CONSTRAINT_NAMED_FUNCTION_IS_NOT_ALLOWED";j[3815]="ER_CHECK_CONSTRAINT_FUNCTION_IS_NOT_ALLOWED";j[3816]="ER_CHECK_CONSTRAINT_VARIABLES";j[3817]="ER_CHECK_CONSTRAINT_ROW_VALUE";j[3818]="ER_CHECK_CONSTRAINT_REFERS_AUTO_INCREMENT_COLUMN";j[3819]="ER_CHECK_CONSTRAINT_VIOLATED";j[3820]="ER_CHECK_CONSTRAINT_REFERS_UNKNOWN_COLUMN";j[3821]="ER_CHECK_CONSTRAINT_NOT_FOUND";j[3822]="ER_CHECK_CONSTRAINT_DUP_NAME";j[3823]="ER_CHECK_CONSTRAINT_CLAUSE_USING_FK_REFER_ACTION_COLUMN";j[3824]="WARN_UNENCRYPTED_TABLE_IN_ENCRYPTED_DB";j[3825]="ER_INVALID_ENCRYPTION_REQUEST";j[3826]="ER_CANNOT_SET_TABLE_ENCRYPTION";j[3827]="ER_CANNOT_SET_DATABASE_ENCRYPTION";j[3828]="ER_CANNOT_SET_TABLESPACE_ENCRYPTION";j[3829]="ER_TABLESPACE_CANNOT_BE_ENCRYPTED";j[3830]="ER_TABLESPACE_CANNOT_BE_DECRYPTED";j[3831]="ER_TABLESPACE_TYPE_UNKNOWN";j[3832]="ER_TARGET_TABLESPACE_UNENCRYPTED";j[3833]="ER_CANNOT_USE_ENCRYPTION_CLAUSE";j[3834]="ER_INVALID_MULTIPLE_CLAUSES";j[3835]="ER_UNSUPPORTED_USE_OF_GRANT_AS";j[3836]="ER_UKNOWN_AUTH_ID_OR_ACCESS_DENIED_FOR_GRANT_AS";j[3837]="ER_DEPENDENT_BY_FUNCTIONAL_INDEX";j[3838]="ER_PLUGIN_NOT_EARLY";j[3839]="ER_INNODB_REDO_LOG_ARCHIVE_START_SUBDIR_PATH";j[3840]="ER_INNODB_REDO_LOG_ARCHIVE_START_TIMEOUT";j[3841]="ER_INNODB_REDO_LOG_ARCHIVE_DIRS_INVALID";j[3842]="ER_INNODB_REDO_LOG_ARCHIVE_LABEL_NOT_FOUND";j[3843]="ER_INNODB_REDO_LOG_ARCHIVE_DIR_EMPTY";j[3844]="ER_INNODB_REDO_LOG_ARCHIVE_NO_SUCH_DIR";j[3845]="ER_INNODB_REDO_LOG_ARCHIVE_DIR_CLASH";j[3846]="ER_INNODB_REDO_LOG_ARCHIVE_DIR_PERMISSIONS";j[3847]="ER_INNODB_REDO_LOG_ARCHIVE_FILE_CREATE";j[3848]="ER_INNODB_REDO_LOG_ARCHIVE_ACTIVE";j[3849]="ER_INNODB_REDO_LOG_ARCHIVE_INACTIVE";j[3850]="ER_INNODB_REDO_LOG_ARCHIVE_FAILED";j[3851]="ER_INNODB_REDO_LOG_ARCHIVE_SESSION";j[3852]="ER_STD_REGEX_ERROR";j[3853]="ER_INVALID_JSON_TYPE";j[3854]="ER_CANNOT_CONVERT_STRING";j[3855]="ER_DEPENDENT_BY_PARTITION_FUNC";j[3856]="ER_WARN_DEPRECATED_FLOAT_AUTO_INCREMENT";j[3857]="ER_RPL_CANT_STOP_REPLICA_WHILE_LOCKED_BACKUP";j[3858]="ER_WARN_DEPRECATED_FLOAT_DIGITS";j[3859]="ER_WARN_DEPRECATED_FLOAT_UNSIGNED";j[3860]="ER_WARN_DEPRECATED_INTEGER_DISPLAY_WIDTH";j[3861]="ER_WARN_DEPRECATED_ZEROFILL";j[3862]="ER_CLONE_DONOR";j[3863]="ER_CLONE_PROTOCOL";j[3864]="ER_CLONE_DONOR_VERSION";j[3865]="ER_CLONE_OS";j[3866]="ER_CLONE_PLATFORM";j[3867]="ER_CLONE_CHARSET";j[3868]="ER_CLONE_CONFIG";j[3869]="ER_CLONE_SYS_CONFIG";j[3870]="ER_CLONE_PLUGIN_MATCH";j[3871]="ER_CLONE_LOOPBACK";j[3872]="ER_CLONE_ENCRYPTION";j[3873]="ER_CLONE_DISK_SPACE";j[3874]="ER_CLONE_IN_PROGRESS";j[3875]="ER_CLONE_DISALLOWED";j[3876]="ER_CANNOT_GRANT_ROLES_TO_ANONYMOUS_USER";j[3877]="ER_SECONDARY_ENGINE_PLUGIN";j[3878]="ER_SECOND_PASSWORD_CANNOT_BE_EMPTY";j[3879]="ER_DB_ACCESS_DENIED";j[3880]="ER_DA_AUTH_ID_WITH_SYSTEM_USER_PRIV_IN_MANDATORY_ROLES";j[3881]="ER_DA_RPL_GTID_TABLE_CANNOT_OPEN";j[3882]="ER_GEOMETRY_IN_UNKNOWN_LENGTH_UNIT";j[3883]="ER_DA_PLUGIN_INSTALL_ERROR";j[3884]="ER_NO_SESSION_TEMP";j[3885]="ER_DA_UNKNOWN_ERROR_NUMBER";j[3886]="ER_COLUMN_CHANGE_SIZE";j[3887]="ER_REGEXP_INVALID_CAPTURE_GROUP_NAME";j[3888]="ER_DA_SSL_LIBRARY_ERROR";j[3889]="ER_SECONDARY_ENGINE";j[3890]="ER_SECONDARY_ENGINE_DDL";j[3891]="ER_INCORRECT_CURRENT_PASSWORD";j[3892]="ER_MISSING_CURRENT_PASSWORD";j[3893]="ER_CURRENT_PASSWORD_NOT_REQUIRED";j[3894]="ER_PASSWORD_CANNOT_BE_RETAINED_ON_PLUGIN_CHANGE";j[3895]="ER_CURRENT_PASSWORD_CANNOT_BE_RETAINED";j[3896]="ER_PARTIAL_REVOKES_EXIST";j[3897]="ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE";j[3898]="ER_XA_REPLICATION_FILTERS";j[3899]="ER_UNSUPPORTED_SQL_MODE";j[3900]="ER_REGEXP_INVALID_FLAG";j[3901]="ER_PARTIAL_REVOKE_AND_DB_GRANT_BOTH_EXISTS";j[3902]="ER_UNIT_NOT_FOUND";j[3903]="ER_INVALID_JSON_VALUE_FOR_FUNC_INDEX";j[3904]="ER_JSON_VALUE_OUT_OF_RANGE_FOR_FUNC_INDEX";j[3905]="ER_EXCEEDED_MV_KEYS_NUM";j[3906]="ER_EXCEEDED_MV_KEYS_SPACE";j[3907]="ER_FUNCTIONAL_INDEX_DATA_IS_TOO_LONG";j[3908]="ER_WRONG_MVI_VALUE";j[3909]="ER_WARN_FUNC_INDEX_NOT_APPLICABLE";j[3910]="ER_GRP_RPL_UDF_ERROR";j[3911]="ER_UPDATE_GTID_PURGED_WITH_GR";j[3912]="ER_GROUPING_ON_TIMESTAMP_IN_DST";j[3913]="ER_TABLE_NAME_CAUSES_TOO_LONG_PATH";j[3914]="ER_AUDIT_LOG_INSUFFICIENT_PRIVILEGE";j[3915]="ER_AUDIT_LOG_PASSWORD_HAS_BEEN_COPIED";j[3916]="ER_DA_GRP_RPL_STARTED_AUTO_REJOIN";j[3917]="ER_SYSVAR_CHANGE_DURING_QUERY";j[3918]="ER_GLOBSTAT_CHANGE_DURING_QUERY";j[3919]="ER_GRP_RPL_MESSAGE_SERVICE_INIT_FAILURE";j[3920]="ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_CLIENT";j[3921]="ER_CHANGE_SOURCE_WRONG_COMPRESSION_LEVEL_CLIENT";j[3922]="ER_WRONG_COMPRESSION_ALGORITHM_CLIENT";j[3923]="ER_WRONG_COMPRESSION_LEVEL_CLIENT";j[3924]="ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_LIST_CLIENT";j[3925]="ER_CLIENT_PRIVILEGE_CHECKS_USER_CANNOT_BE_ANONYMOUS";j[3926]="ER_CLIENT_PRIVILEGE_CHECKS_USER_DOES_NOT_EXIST";j[3927]="ER_CLIENT_PRIVILEGE_CHECKS_USER_CORRUPT";j[3928]="ER_CLIENT_PRIVILEGE_CHECKS_USER_NEEDS_RPL_APPLIER_PRIV";j[3929]="ER_WARN_DA_PRIVILEGE_NOT_REGISTERED";j[3930]="ER_CLIENT_KEYRING_UDF_KEY_INVALID";j[3931]="ER_CLIENT_KEYRING_UDF_KEY_TYPE_INVALID";j[3932]="ER_CLIENT_KEYRING_UDF_KEY_TOO_LONG";j[3933]="ER_CLIENT_KEYRING_UDF_KEY_TYPE_TOO_LONG";j[3934]="ER_JSON_SCHEMA_VALIDATION_ERROR_WITH_DETAILED_REPORT";j[3935]="ER_DA_UDF_INVALID_CHARSET_SPECIFIED";j[3936]="ER_DA_UDF_INVALID_CHARSET";j[3937]="ER_DA_UDF_INVALID_COLLATION";j[3938]="ER_DA_UDF_INVALID_EXTENSION_ARGUMENT_TYPE";j[3939]="ER_MULTIPLE_CONSTRAINTS_WITH_SAME_NAME";j[3940]="ER_CONSTRAINT_NOT_FOUND";j[3941]="ER_ALTER_CONSTRAINT_ENFORCEMENT_NOT_SUPPORTED";j[3942]="ER_TABLE_VALUE_CONSTRUCTOR_MUST_HAVE_COLUMNS";j[3943]="ER_TABLE_VALUE_CONSTRUCTOR_CANNOT_HAVE_DEFAULT";j[3944]="ER_CLIENT_QUERY_FAILURE_INVALID_NON_ROW_FORMAT";j[3945]="ER_REQUIRE_ROW_FORMAT_INVALID_VALUE";j[3946]="ER_FAILED_TO_DETERMINE_IF_ROLE_IS_MANDATORY";j[3947]="ER_FAILED_TO_FETCH_MANDATORY_ROLE_LIST";j[3948]="ER_CLIENT_LOCAL_FILES_DISABLED";j[3949]="ER_IMP_INCOMPATIBLE_CFG_VERSION";j[3950]="ER_DA_OOM";j[3951]="ER_DA_UDF_INVALID_ARGUMENT_TO_SET_CHARSET";j[3952]="ER_DA_UDF_INVALID_RETURN_TYPE_TO_SET_CHARSET";j[3953]="ER_MULTIPLE_INTO_CLAUSES";j[3954]="ER_MISPLACED_INTO";j[3955]="ER_USER_ACCESS_DENIED_FOR_USER_ACCOUNT_BLOCKED_BY_PASSWORD_LOCK";j[3956]="ER_WARN_DEPRECATED_YEAR_UNSIGNED";j[3957]="ER_CLONE_NETWORK_PACKET";j[3958]="ER_SDI_OPERATION_FAILED_MISSING_RECORD";j[3959]="ER_DEPENDENT_BY_CHECK_CONSTRAINT";j[3960]="ER_GRP_OPERATION_NOT_ALLOWED_GR_MUST_STOP";j[3961]="ER_WARN_DEPRECATED_JSON_TABLE_ON_ERROR_ON_EMPTY";j[3962]="ER_WARN_DEPRECATED_INNER_INTO";j[3963]="ER_WARN_DEPRECATED_VALUES_FUNCTION_ALWAYS_NULL";j[3964]="ER_WARN_DEPRECATED_SQL_CALC_FOUND_ROWS";j[3965]="ER_WARN_DEPRECATED_FOUND_ROWS";j[3966]="ER_MISSING_JSON_VALUE";j[3967]="ER_MULTIPLE_JSON_VALUES";j[3968]="ER_HOSTNAME_TOO_LONG";j[3969]="ER_WARN_CLIENT_DEPRECATED_PARTITION_PREFIX_KEY";j[3970]="ER_GROUP_REPLICATION_USER_EMPTY_MSG";j[3971]="ER_GROUP_REPLICATION_USER_MANDATORY_MSG";j[3972]="ER_GROUP_REPLICATION_PASSWORD_LENGTH";j[3973]="ER_SUBQUERY_TRANSFORM_REJECTED";j[3974]="ER_DA_GRP_RPL_RECOVERY_ENDPOINT_FORMAT";j[3975]="ER_DA_GRP_RPL_RECOVERY_ENDPOINT_INVALID";j[3976]="ER_WRONG_VALUE_FOR_VAR_PLUS_ACTIONABLE_PART";j[3977]="ER_STATEMENT_NOT_ALLOWED_AFTER_START_TRANSACTION";j[3978]="ER_FOREIGN_KEY_WITH_ATOMIC_CREATE_SELECT";j[3979]="ER_NOT_ALLOWED_WITH_START_TRANSACTION";j[3980]="ER_INVALID_JSON_ATTRIBUTE";j[3981]="ER_ENGINE_ATTRIBUTE_NOT_SUPPORTED";j[3982]="ER_INVALID_USER_ATTRIBUTE_JSON";j[3983]="ER_INNODB_REDO_DISABLED";j[3984]="ER_INNODB_REDO_ARCHIVING_ENABLED";j[3985]="ER_MDL_OUT_OF_RESOURCES";j[3986]="ER_IMPLICIT_COMPARISON_FOR_JSON";j[3987]="ER_FUNCTION_DOES_NOT_SUPPORT_CHARACTER_SET";j[3988]="ER_IMPOSSIBLE_STRING_CONVERSION";j[3989]="ER_SCHEMA_READ_ONLY";j[3990]="ER_RPL_ASYNC_RECONNECT_GTID_MODE_OFF";j[3991]="ER_RPL_ASYNC_RECONNECT_AUTO_POSITION_OFF";j[3992]="ER_DISABLE_GTID_MODE_REQUIRES_ASYNC_RECONNECT_OFF";j[3993]="ER_DISABLE_AUTO_POSITION_REQUIRES_ASYNC_RECONNECT_OFF";j[3994]="ER_INVALID_PARAMETER_USE";j[3995]="ER_CHARACTER_SET_MISMATCH";j[3996]="ER_WARN_VAR_VALUE_CHANGE_NOT_SUPPORTED";j[3997]="ER_INVALID_TIME_ZONE_INTERVAL";j[3998]="ER_INVALID_CAST";j[3999]="ER_HYPERGRAPH_NOT_SUPPORTED_YET";j[4000]="ER_WARN_HYPERGRAPH_EXPERIMENTAL";j[4001]="ER_DA_NO_ERROR_LOG_PARSER_CONFIGURED";j[4002]="ER_DA_ERROR_LOG_TABLE_DISABLED";j[4003]="ER_DA_ERROR_LOG_MULTIPLE_FILTERS";j[4004]="ER_DA_CANT_OPEN_ERROR_LOG";j[4005]="ER_USER_REFERENCED_AS_DEFINER";j[4006]="ER_CANNOT_USER_REFERENCED_AS_DEFINER";j[4007]="ER_REGEX_NUMBER_TOO_BIG";j[4008]="ER_SPVAR_NONINTEGER_TYPE";j[4009]="WARN_UNSUPPORTED_ACL_TABLES_READ";j[4010]="ER_BINLOG_UNSAFE_ACL_TABLE_READ_IN_DML_DDL";j[4011]="ER_STOP_REPLICA_MONITOR_IO_THREAD_TIMEOUT";j[4012]="ER_STARTING_REPLICA_MONITOR_IO_THREAD";j[4013]="ER_CANT_USE_ANONYMOUS_TO_GTID_WITH_GTID_MODE_NOT_ON";j[4014]="ER_CANT_COMBINE_ANONYMOUS_TO_GTID_AND_AUTOPOSITION";j[4015]="ER_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_REQUIRES_GTID_MODE_ON";j[4016]="ER_SQL_REPLICA_SKIP_COUNTER_USED_WITH_GTID_MODE_ON";j[4017]="ER_USING_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_AS_LOCAL_OR_UUID";j[4018]="ER_CANT_SET_ANONYMOUS_TO_GTID_AND_WAIT_UNTIL_SQL_THD_AFTER_GTIDS";j[4019]="ER_CANT_SET_SQL_AFTER_OR_BEFORE_GTIDS_WITH_ANONYMOUS_TO_GTID";j[4020]="ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME";j[4021]="ER_CANT_USE_SAME_UUID_AS_GROUP_NAME";j[4022]="ER_GRP_RPL_RECOVERY_CHANNEL_STILL_RUNNING";j[4023]="ER_INNODB_INVALID_AUTOEXTEND_SIZE_VALUE";j[4024]="ER_INNODB_INCOMPATIBLE_WITH_TABLESPACE";j[4025]="ER_INNODB_AUTOEXTEND_SIZE_OUT_OF_RANGE";j[4026]="ER_CANNOT_USE_AUTOEXTEND_SIZE_CLAUSE";j[4027]="ER_ROLE_GRANTED_TO_ITSELF";j[4028]="ER_TABLE_MUST_HAVE_A_VISIBLE_COLUMN";j[4029]="ER_INNODB_COMPRESSION_FAILURE";j[4030]="ER_WARN_ASYNC_CONN_FAILOVER_NETWORK_NAMESPACE";j[4031]="ER_CLIENT_INTERACTION_TIMEOUT";j[4032]="ER_INVALID_CAST_TO_GEOMETRY";j[4033]="ER_INVALID_CAST_POLYGON_RING_DIRECTION";j[4034]="ER_GIS_DIFFERENT_SRIDS_AGGREGATION";j[4035]="ER_RELOAD_KEYRING_FAILURE";j[4036]="ER_SDI_GET_KEYS_INVALID_TABLESPACE";j[4037]="ER_CHANGE_RPL_SRC_WRONG_COMPRESSION_ALGORITHM_SIZE";j[4038]="ER_WARN_DEPRECATED_TLS_VERSION_FOR_CHANNEL_CLI";j[4039]="ER_CANT_USE_SAME_UUID_AS_VIEW_CHANGE_UUID";j[4040]="ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_VIEW_CHANGE_UUID";j[4041]="ER_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE";j[4042]="ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS";j[4043]="ER_WARN_ADUIT_LOG_MAX_SIZE_CLOSE_TO_ROTATE_ON_SIZE";j[4044]="ER_KERBEROS_CREATE_USER";j[4045]="ER_INSTALL_PLUGIN_CONFLICT_CLIENT";j[4046]="ER_DA_ERROR_LOG_COMPONENT_FLUSH_FAILED";j[4047]="ER_WARN_SQL_AFTER_MTS_GAPS_GAP_NOT_CALCULATED";j[4048]="ER_INVALID_ASSIGNMENT_TARGET";j[4049]="ER_OPERATION_NOT_ALLOWED_ON_GR_SECONDARY";j[4050]="ER_GRP_RPL_FAILOVER_CHANNEL_STATUS_PROPAGATION";j[4051]="ER_WARN_AUDIT_LOG_FORMAT_UNIX_TIMESTAMP_ONLY_WHEN_JSON";j[4052]="ER_INVALID_MFA_PLUGIN_SPECIFIED";j[4053]="ER_IDENTIFIED_BY_UNSUPPORTED";j[4054]="ER_INVALID_PLUGIN_FOR_REGISTRATION";j[4055]="ER_PLUGIN_REQUIRES_REGISTRATION";j[4056]="ER_MFA_METHOD_EXISTS";j[4057]="ER_MFA_METHOD_NOT_EXISTS";j[4058]="ER_AUTHENTICATION_POLICY_MISMATCH";j[4059]="ER_PLUGIN_REGISTRATION_DONE";j[4060]="ER_INVALID_USER_FOR_REGISTRATION";j[4061]="ER_USER_REGISTRATION_FAILED";j[4062]="ER_MFA_METHODS_INVALID_ORDER";j[4063]="ER_MFA_METHODS_IDENTICAL";j[4064]="ER_INVALID_MFA_OPERATIONS_FOR_PASSWORDLESS_USER";j[4065]="ER_CHANGE_REPLICATION_SOURCE_NO_OPTIONS_FOR_GTID_ONLY";j[4066]="ER_CHANGE_REP_SOURCE_CANT_DISABLE_REQ_ROW_FORMAT_WITH_GTID_ONLY";j[4067]="ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POSITION_WITH_GTID_ONLY";j[4068]="ER_CHANGE_REP_SOURCE_CANT_DISABLE_GTID_ONLY_WITHOUT_POSITIONS";j[4069]="ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POS_WITHOUT_POSITIONS";j[4070]="ER_CHANGE_REP_SOURCE_GR_CHANNEL_WITH_GTID_MODE_NOT_ON";j[4071]="ER_CANT_USE_GTID_ONLY_WITH_GTID_MODE_NOT_ON";j[4072]="ER_WARN_C_DISABLE_GTID_ONLY_WITH_SOURCE_AUTO_POS_INVALID_POS";j[4073]="ER_DA_SSL_FIPS_MODE_ERROR";j[4074]="ER_VALUE_OUT_OF_RANGE";j[4075]="ER_FULLTEXT_WITH_ROLLUP";j[4076]="ER_REGEXP_MISSING_RESOURCE";j[4077]="ER_WARN_REGEXP_USING_DEFAULT";j[4078]="ER_REGEXP_MISSING_FILE";j[4079]="ER_WARN_DEPRECATED_COLLATION";j[4080]="ER_CONCURRENT_PROCEDURE_USAGE";j[4081]="ER_DA_GLOBAL_CONN_LIMIT";j[4082]="ER_DA_CONN_LIMIT";j[4083]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE_INSTANT";j[4084]="ER_WARN_SF_UDF_NAME_COLLISION";j[4085]="ER_CANNOT_PURGE_BINLOG_WITH_BACKUP_LOCK";j[4086]="ER_TOO_MANY_WINDOWS";j[4087]="ER_MYSQLBACKUP_CLIENT_MSG";j[4088]="ER_COMMENT_CONTAINS_INVALID_STRING";j[4089]="ER_DEFINITION_CONTAINS_INVALID_STRING";j[4090]="ER_CANT_EXECUTE_COMMAND_WITH_ASSIGNED_GTID_NEXT";j[4091]="ER_XA_TEMP_TABLE";j[4092]="ER_INNODB_MAX_ROW_VERSION";j[4093]="ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_SIZE";j[4094]="ER_OPERATION_NOT_ALLOWED_WHILE_PRIMARY_CHANGE_IS_RUNNING";j[4095]="ER_WARN_DEPRECATED_DATETIME_DELIMITER";j[4096]="ER_WARN_DEPRECATED_SUPERFLUOUS_DELIMITER";j[4097]="ER_CANNOT_PERSIST_SENSITIVE_VARIABLES";j[4098]="ER_WARN_CANNOT_SECURELY_PERSIST_SENSITIVE_VARIABLES";j[4099]="ER_WARN_TRG_ALREADY_EXISTS";j[4100]="ER_IF_NOT_EXISTS_UNSUPPORTED_TRG_EXISTS_ON_DIFFERENT_TABLE";j[4101]="ER_IF_NOT_EXISTS_UNSUPPORTED_UDF_NATIVE_FCT_NAME_COLLISION";j[4102]="ER_SET_PASSWORD_AUTH_PLUGIN_ERROR";j[4103]="ER_REDUCED_DBLWR_FILE_CORRUPTED";j[4104]="ER_REDUCED_DBLWR_PAGE_FOUND";j[4105]="ER_SRS_INVALID_LATITUDE_OF_ORIGIN";j[4106]="ER_SRS_INVALID_LONGITUDE_OF_ORIGIN";j[4107]="ER_SRS_UNUSED_PROJ_PARAMETER_PRESENT";j[4108]="ER_GIPK_COLUMN_EXISTS";j[4109]="ER_GIPK_FAILED_AUTOINC_COLUMN_EXISTS";j[4110]="ER_GIPK_COLUMN_ALTER_NOT_ALLOWED";j[4111]="ER_DROP_PK_COLUMN_TO_DROP_GIPK";j[4112]="ER_CREATE_SELECT_WITH_GIPK_DISALLOWED_IN_SBR";j[4113]="ER_DA_EXPIRE_LOGS_DAYS_IGNORED";j[4114]="ER_CTE_RECURSIVE_NOT_UNION";j[4115]="ER_COMMAND_BACKEND_FAILED_TO_FETCH_SECURITY_CTX";j[4116]="ER_COMMAND_SERVICE_BACKEND_FAILED";j[4117]="ER_CLIENT_FILE_PRIVILEGE_FOR_REPLICATION_CHECKS";j[4118]="ER_GROUP_REPLICATION_FORCE_MEMBERS_COMMAND_FAILURE";j[4119]="ER_WARN_DEPRECATED_IDENT";j[4120]="ER_INTERSECT_ALL_MAX_DUPLICATES_EXCEEDED";j[4121]="ER_TP_QUERY_THRS_PER_GRP_EXCEEDS_TXN_THR_LIMIT";j[4122]="ER_BAD_TIMESTAMP_FORMAT";j[4123]="ER_SHAPE_PRIDICTION_UDF";j[4124]="ER_SRS_INVALID_HEIGHT";j[4125]="ER_SRS_INVALID_SCALING";j[4126]="ER_SRS_INVALID_ZONE_WIDTH";j[4127]="ER_SRS_INVALID_LATITUDE_POLAR_STERE_VAR_A";j[4128]="ER_WARN_DEPRECATED_CLIENT_NO_SCHEMA_OPTION";j[4129]="ER_TABLE_NOT_EMPTY";j[4130]="ER_TABLE_NO_PRIMARY_KEY";j[4131]="ER_TABLE_IN_SHARED_TABLESPACE";j[4132]="ER_INDEX_OTHER_THAN_PK";j[4133]="ER_LOAD_BULK_DATA_UNSORTED";j[4134]="ER_BULK_EXECUTOR_ERROR";j[4135]="ER_BULK_READER_LIBCURL_INIT_FAILED";j[4136]="ER_BULK_READER_LIBCURL_ERROR";j[4137]="ER_BULK_READER_SERVER_ERROR";j[4138]="ER_BULK_READER_COMMUNICATION_ERROR";j[4139]="ER_BULK_LOAD_DATA_FAILED";j[4140]="ER_BULK_LOADER_COLUMN_TOO_BIG_FOR_LEFTOVER_BUFFER";j[4141]="ER_BULK_LOADER_COMPONENT_ERROR";j[4142]="ER_BULK_LOADER_FILE_CONTAINS_LESS_LINES_THAN_IGNORE_CLAUSE";j[4143]="ER_BULK_PARSER_MISSING_ENCLOSED_BY";j[4144]="ER_BULK_PARSER_ROW_BUFFER_MAX_TOTAL_COLS_EXCEEDED";j[4145]="ER_BULK_PARSER_COPY_BUFFER_SIZE_EXCEEDED";j[4146]="ER_BULK_PARSER_UNEXPECTED_END_OF_INPUT";j[4147]="ER_BULK_PARSER_UNEXPECTED_ROW_TERMINATOR";j[4148]="ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_ENDING_ENCLOSED_BY";j[4149]="ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_NULL_ESCAPE";j[4150]="ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_COLUMN_TERMINATOR";j[4151]="ER_BULK_PARSER_INCOMPLETE_ESCAPE_SEQUENCE";j[4152]="ER_LOAD_BULK_DATA_FAILED";j[4153]="ER_LOAD_BULK_DATA_WRONG_VALUE_FOR_FIELD";j[4154]="ER_LOAD_BULK_DATA_WARN_NULL_TO_NOTNULL";j[4155]="ER_REQUIRE_TABLE_PRIMARY_KEY_CHECK_GENERATE_WITH_GR";j[4156]="ER_CANT_CHANGE_SYS_VAR_IN_READ_ONLY_MODE";j[4157]="ER_INNODB_INSTANT_ADD_DROP_NOT_SUPPORTED_MAX_SIZE";j[4158]="ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_FIELDS";j[4159]="ER_CANT_SET_PERSISTED";j[4160]="ER_INSTALL_COMPONENT_SET_NULL_VALUE";j[4161]="ER_INSTALL_COMPONENT_SET_UNUSED_VALUE";j[4162]="ER_WARN_DEPRECATED_USER_DEFINED_COLLATIONS"});var qQ1=o((Xv,N30)=>{(function($,Y){function X(G){return G.default||G}if(typeof define==="function"&&define.amd)define([],function(){var G={};return Y(G),X(G)});else if(typeof Xv==="object"){if(Y(Xv),typeof N30==="object")N30.exports=X(Xv)}else(function(){var G={};Y(G),$.Long=X(G)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Xv,function($){Object.defineProperty($,"__esModule",{value:!0}),$.default=void 0;var Y=null;try{Y=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function X(S,T,v){this.low=S|0,this.high=T|0,this.unsigned=!!v}X.prototype.__isLong__,Object.defineProperty(X.prototype,"__isLong__",{value:!0});function G(S){return(S&&S.__isLong__)===!0}function J(S){var T=Math.clz32(S&-S);return S?31-T:T}X.isLong=G;var Q={},W={};function Z(S,T){var v,x,y;if(T){if(S>>>=0,y=0<=S&&S<256){if(x=W[S],x)return x}if(v=H(S,0,!0),y)W[S]=v;return v}else{if(S|=0,y=-128<=S&&S<128){if(x=Q[S],x)return x}if(v=H(S,S<0?-1:0,!1),y)Q[S]=v;return v}}X.fromInt=Z;function K(S,T){if(isNaN(S))return T?M:E;if(T){if(S<0)return M;if(S>=L)return P}else{if(S<=-B)return _;if(S+1>=B)return I}if(S<0)return K(-S,T).neg();return H(S%D|0,S/D|0,T)}X.fromNumber=K;function H(S,T,v){return new X(S,T,v)}X.fromBits=H;var z=Math.pow;function V(S,T,v){if(S.length===0)throw Error("empty string");if(typeof T==="number")v=T,T=!1;else T=!!T;if(S==="NaN"||S==="Infinity"||S==="+Infinity"||S==="-Infinity")return T?M:E;if(v=v||10,v<2||36<v)throw RangeError("radix");var x;if((x=S.indexOf("-"))>0)throw Error("interior hyphen");else if(x===0)return V(S.substring(1),T,v).neg();var y=K(z(v,8)),d=E;for(var u=0;u<S.length;u+=8){var b=Math.min(8,S.length-u),g=parseInt(S.substring(u,u+b),v);if(b<8){var p=K(z(v,b));d=d.mul(p).add(K(g))}else d=d.mul(y),d=d.add(K(g))}return d.unsigned=T,d}X.fromString=V;function A(S,T){if(typeof S==="number")return K(S,T);if(typeof S==="string")return V(S,T);return H(S.low,S.high,typeof T==="boolean"?T:S.unsigned)}X.fromValue=A;var F=65536,N=16777216,D=F*F,L=D*D,B=L/2,O=Z(N),E=Z(0);X.ZERO=E;var M=Z(0,!0);X.UZERO=M;var R=Z(1);X.ONE=R;var q=Z(1,!0);X.UONE=q;var w=Z(-1);X.NEG_ONE=w;var I=H(-1,2147483647,!1);X.MAX_VALUE=I;var P=H(-1,-1,!0);X.MAX_UNSIGNED_VALUE=P;var _=H(0,-2147483648,!1);X.MIN_VALUE=_;var C=X.prototype;if(C.toInt=function(){return this.unsigned?this.low>>>0:this.low},C.toNumber=function(){if(this.unsigned)return(this.high>>>0)*D+(this.low>>>0);return this.high*D+(this.low>>>0)},C.toString=function(T){if(T=T||10,T<2||36<T)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(_)){var v=K(T),x=this.div(v),y=x.mul(v).sub(this);return x.toString(T)+y.toInt().toString(T)}else return"-"+this.neg().toString(T);var d=K(z(T,6),this.unsigned),u=this,b="";while(!0){var g=u.div(d),p=u.sub(g.mul(d)).toInt()>>>0,h=p.toString(T);if(u=g,u.isZero())return h+b;else{while(h.length<6)h="0"+h;b=""+h+b}}},C.getHighBits=function(){return this.high},C.getHighBitsUnsigned=function(){return this.high>>>0},C.getLowBits=function(){return this.low},C.getLowBitsUnsigned=function(){return this.low>>>0},C.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();var T=this.high!=0?this.high:this.low;for(var v=31;v>0;v--)if((T&1<<v)!=0)break;return this.high!=0?v+33:v+1},C.isSafeInteger=function(){var T=this.high>>21;if(!T)return!0;if(this.unsigned)return!1;return T===-1&&!(this.low===0&&this.high===-2097152)},C.isZero=function(){return this.high===0&&this.low===0},C.eqz=C.isZero,C.isNegative=function(){return!this.unsigned&&this.high<0},C.isPositive=function(){return this.unsigned||this.high>=0},C.isOdd=function(){return(this.low&1)===1},C.isEven=function(){return(this.low&1)===0},C.equals=function(T){if(!G(T))T=A(T);if(this.unsigned!==T.unsigned&&this.high>>>31===1&&T.high>>>31===1)return!1;return this.high===T.high&&this.low===T.low},C.eq=C.equals,C.notEquals=function(T){return!this.eq(T)},C.neq=C.notEquals,C.ne=C.notEquals,C.lessThan=function(T){return this.comp(T)<0},C.lt=C.lessThan,C.lessThanOrEqual=function(T){return this.comp(T)<=0},C.lte=C.lessThanOrEqual,C.le=C.lessThanOrEqual,C.greaterThan=function(T){return this.comp(T)>0},C.gt=C.greaterThan,C.greaterThanOrEqual=function(T){return this.comp(T)>=0},C.gte=C.greaterThanOrEqual,C.ge=C.greaterThanOrEqual,C.compare=function(T){if(!G(T))T=A(T);if(this.eq(T))return 0;var v=this.isNegative(),x=T.isNegative();if(v&&!x)return-1;if(!v&&x)return 1;if(!this.unsigned)return this.sub(T).isNegative()?-1:1;return T.high>>>0>this.high>>>0||T.high===this.high&&T.low>>>0>this.low>>>0?-1:1},C.comp=C.compare,C.negate=function(){if(!this.unsigned&&this.eq(_))return _;return this.not().add(R)},C.neg=C.negate,C.add=function(T){if(!G(T))T=A(T);var v=this.high>>>16,x=this.high&65535,y=this.low>>>16,d=this.low&65535,u=T.high>>>16,b=T.high&65535,g=T.low>>>16,p=T.low&65535,h=0,n=0,t=0,s=0;return s+=d+p,t+=s>>>16,s&=65535,t+=y+g,n+=t>>>16,t&=65535,n+=x+b,h+=n>>>16,n&=65535,h+=v+u,h&=65535,H(t<<16|s,h<<16|n,this.unsigned)},C.subtract=function(T){if(!G(T))T=A(T);return this.add(T.neg())},C.sub=C.subtract,C.multiply=function(T){if(this.isZero())return this;if(!G(T))T=A(T);if(Y){var v=Y.mul(this.low,this.high,T.low,T.high);return H(v,Y.get_high(),this.unsigned)}if(T.isZero())return this.unsigned?M:E;if(this.eq(_))return T.isOdd()?_:E;if(T.eq(_))return this.isOdd()?_:E;if(this.isNegative())if(T.isNegative())return this.neg().mul(T.neg());else return this.neg().mul(T).neg();else if(T.isNegative())return this.mul(T.neg()).neg();if(this.lt(O)&&T.lt(O))return K(this.toNumber()*T.toNumber(),this.unsigned);var x=this.high>>>16,y=this.high&65535,d=this.low>>>16,u=this.low&65535,b=T.high>>>16,g=T.high&65535,p=T.low>>>16,h=T.low&65535,n=0,t=0,s=0,Z0=0;return Z0+=u*h,s+=Z0>>>16,Z0&=65535,s+=d*h,t+=s>>>16,s&=65535,s+=u*p,t+=s>>>16,s&=65535,t+=y*h,n+=t>>>16,t&=65535,t+=d*p,n+=t>>>16,t&=65535,t+=u*g,n+=t>>>16,t&=65535,n+=x*h+y*p+d*g+u*b,n&=65535,H(s<<16|Z0,n<<16|t,this.unsigned)},C.mul=C.multiply,C.divide=function(T){if(!G(T))T=A(T);if(T.isZero())throw Error("division by zero");if(Y){if(!this.unsigned&&this.high===-2147483648&&T.low===-1&&T.high===-1)return this;var v=(this.unsigned?Y.div_u:Y.div_s)(this.low,this.high,T.low,T.high);return H(v,Y.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?M:E;var x,y,d;if(!this.unsigned){if(this.eq(_))if(T.eq(R)||T.eq(w))return _;else if(T.eq(_))return R;else{var u=this.shr(1);if(x=u.div(T).shl(1),x.eq(E))return T.isNegative()?R:w;else return y=this.sub(T.mul(x)),d=x.add(y.div(T)),d}else if(T.eq(_))return this.unsigned?M:E;if(this.isNegative()){if(T.isNegative())return this.neg().div(T.neg());return this.neg().div(T).neg()}else if(T.isNegative())return this.div(T.neg()).neg();d=E}else{if(!T.unsigned)T=T.toUnsigned();if(T.gt(this))return M;if(T.gt(this.shru(1)))return q;d=M}y=this;while(y.gte(T)){x=Math.max(1,Math.floor(y.toNumber()/T.toNumber()));var b=Math.ceil(Math.log(x)/Math.LN2),g=b<=48?1:z(2,b-48),p=K(x),h=p.mul(T);while(h.isNegative()||h.gt(y))x-=g,p=K(x,this.unsigned),h=p.mul(T);if(p.isZero())p=R;d=d.add(p),y=y.sub(h)}return d},C.div=C.divide,C.modulo=function(T){if(!G(T))T=A(T);if(Y){var v=(this.unsigned?Y.rem_u:Y.rem_s)(this.low,this.high,T.low,T.high);return H(v,Y.get_high(),this.unsigned)}return this.sub(this.div(T).mul(T))},C.mod=C.modulo,C.rem=C.modulo,C.not=function(){return H(~this.low,~this.high,this.unsigned)},C.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},C.clz=C.countLeadingZeros,C.countTrailingZeros=function(){return this.low?J(this.low):J(this.high)+32},C.ctz=C.countTrailingZeros,C.and=function(T){if(!G(T))T=A(T);return H(this.low&T.low,this.high&T.high,this.unsigned)},C.or=function(T){if(!G(T))T=A(T);return H(this.low|T.low,this.high|T.high,this.unsigned)},C.xor=function(T){if(!G(T))T=A(T);return H(this.low^T.low,this.high^T.high,this.unsigned)},C.shiftLeft=function(T){if(G(T))T=T.toInt();if((T&=63)===0)return this;else if(T<32)return H(this.low<<T,this.high<<T|this.low>>>32-T,this.unsigned);else return H(0,this.low<<T-32,this.unsigned)},C.shl=C.shiftLeft,C.shiftRight=function(T){if(G(T))T=T.toInt();if((T&=63)===0)return this;else if(T<32)return H(this.low>>>T|this.high<<32-T,this.high>>T,this.unsigned);else return H(this.high>>T-32,this.high>=0?0:-1,this.unsigned)},C.shr=C.shiftRight,C.shiftRightUnsigned=function(T){if(G(T))T=T.toInt();if((T&=63)===0)return this;if(T<32)return H(this.low>>>T|this.high<<32-T,this.high>>>T,this.unsigned);if(T===32)return H(this.high,0,this.unsigned);return H(this.high>>>T-32,0,this.unsigned)},C.shru=C.shiftRightUnsigned,C.shr_u=C.shiftRightUnsigned,C.rotateLeft=function(T){var v;if(G(T))T=T.toInt();if((T&=63)===0)return this;if(T===32)return H(this.high,this.low,this.unsigned);if(T<32)return v=32-T,H(this.low<<T|this.high>>>v,this.high<<T|this.low>>>v,this.unsigned);return T-=32,v=32-T,H(this.high<<T|this.low>>>v,this.low<<T|this.high>>>v,this.unsigned)},C.rotl=C.rotateLeft,C.rotateRight=function(T){var v;if(G(T))T=T.toInt();if((T&=63)===0)return this;if(T===32)return H(this.high,this.low,this.unsigned);if(T<32)return v=32-T,H(this.high<<v|this.low>>>T,this.low<<v|this.high>>>T,this.unsigned);return T-=32,v=32-T,H(this.low<<v|this.high>>>T,this.high<<v|this.low>>>T,this.unsigned)},C.rotr=C.rotateRight,C.toSigned=function(){if(!this.unsigned)return this;return H(this.low,this.high,!1)},C.toUnsigned=function(){if(this.unsigned)return this;return H(this.low,this.high,!0)},C.toBytes=function(T){return T?this.toBytesLE():this.toBytesBE()},C.toBytesLE=function(){var T=this.high,v=this.low;return[v&255,v>>>8&255,v>>>16&255,v>>>24,T&255,T>>>8&255,T>>>16&255,T>>>24]},C.toBytesBE=function(){var T=this.high,v=this.low;return[T>>>24,T>>>16&255,T>>>8&255,T&255,v>>>24,v>>>16&255,v>>>8&255,v&255]},X.fromBytes=function(T,v,x){return x?X.fromBytesLE(T,v):X.fromBytesBE(T,v)},X.fromBytesLE=function(T,v){return new X(T[0]|T[1]<<8|T[2]<<16|T[3]<<24,T[4]|T[5]<<8|T[6]<<16|T[7]<<24,v)},X.fromBytesBE=function(T,v){return new X(T[4]<<24|T[5]<<16|T[6]<<8|T[7],T[0]<<24|T[1]<<16|T[2]<<8|T[3],v)},typeof BigInt==="function")X.fromBigInt=function(T,v){var x=Number(BigInt.asIntN(32,T)),y=Number(BigInt.asIntN(32,T>>BigInt(32)));return H(x,y,v)},X.fromValue=function(T,v){if(typeof T==="bigint")return X.fromBigInt(T,v);return A(T,v)},C.toBigInt=function(){var T=BigInt(this.low>>>0),v=BigInt(this.unsigned?this.high>>>0:this.high);return v<<BigInt(32)|T};var k=$.default=X})});var qG=o((mz5,IQ1)=>{var zr=L0("buffer"),Mq=zr.Buffer,NZ={},LZ;for(LZ in zr){if(!zr.hasOwnProperty(LZ))continue;if(LZ==="SlowBuffer"||LZ==="Buffer")continue;NZ[LZ]=zr[LZ]}var Rq=NZ.Buffer={};for(LZ in Mq){if(!Mq.hasOwnProperty(LZ))continue;if(LZ==="allocUnsafe"||LZ==="allocUnsafeSlow")continue;Rq[LZ]=Mq[LZ]}NZ.Buffer.prototype=Mq.prototype;if(!Rq.from||Rq.from===Uint8Array.from)Rq.from=function($,Y,X){if(typeof $==="number")throw TypeError('The "value" argument must not be of type number. Received type '+typeof $);if($&&typeof $.length>"u")throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);return Mq($,Y,X)};if(!Rq.alloc)Rq.alloc=function($,Y,X){if(typeof $!=="number")throw TypeError('The "size" argument must be of type number. Received type '+typeof $);if($<0||$>=2147483648)throw RangeError('The value "'+$+'" is invalid for option "size"');var G=Mq($);if(!Y||Y.length===0)G.fill(0);else if(typeof X==="string")G.fill(Y,X);else G.fill(Y);return G};if(!NZ.kStringMaxLength)try{NZ.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch($){}if(!NZ.constants){if(NZ.constants={MAX_LENGTH:NZ.kMaxLength},NZ.kStringMaxLength)NZ.constants.MAX_STRING_LENGTH=NZ.kStringMaxLength}IQ1.exports=NZ});var wQ1=o((mC6)=>{var PQ1="\uFEFF";mC6.PrependBOM=L30;function L30($,Y){this.encoder=$,this.addBOM=!0}L30.prototype.write=function($){if(this.addBOM)$=PQ1+$,this.addBOM=!1;return this.encoder.write($)};L30.prototype.end=function(){return this.encoder.end()};mC6.StripBOM=B30;function B30($,Y){this.decoder=$,this.pass=!1,this.options=Y||{}}B30.prototype.write=function($){var Y=this.decoder.write($);if(this.pass||!Y)return Y;if(Y[0]===PQ1){if(Y=Y.slice(1),typeof this.options.stripBOM==="function")this.options.stripBOM()}return this.pass=!0,Y};B30.prototype.end=function(){return this.decoder.end()}});var O30=o((pz5,_Q1)=>{var dC6=typeof Object.hasOwn>"u"?Function.call.bind(Object.prototype.hasOwnProperty):Object.hasOwn;function cC6($,Y){for(var X in Y)if(dC6(Y,X))$[X]=Y[X]}_Q1.exports=cC6});var TQ1=o((dz5,jQ1)=>{var aH=qG().Buffer;jQ1.exports={utf8:{type:"_internal",bomAware:!0},cesu8:{type:"_internal",bomAware:!0},unicode11utf8:"utf8",ucs2:{type:"_internal",bomAware:!0},utf16le:"ucs2",binary:{type:"_internal"},base64:{type:"_internal"},hex:{type:"_internal"},_internal:E30};function E30($,Y){if(this.enc=$.encodingName,this.bomAware=$.bomAware,this.enc==="base64")this.encoder=q30;else if(this.enc==="utf8")this.encoder=w30;else if(this.enc==="cesu8"){if(this.enc="utf8",this.encoder=I30,aH.from("eda0bdedb2a9","hex").toString()!=="\uD83D\uDCA9")this.decoder=P30,this.defaultCharUnicode=Y.defaultCharUnicode}}E30.prototype.encoder=R30;E30.prototype.decoder=M30;var lC6=L0("string_decoder").StringDecoder;function M30($,Y){this.decoder=new lC6(Y.enc)}M30.prototype.write=function($){if(!aH.isBuffer($))$=aH.from($);return this.decoder.write($)};M30.prototype.end=function(){return this.decoder.end()};function R30($,Y){this.enc=Y.enc}R30.prototype.write=function($){return aH.from($,this.enc)};R30.prototype.end=function(){};function q30($,Y){this.prevStr=""}q30.prototype.write=function($){$=this.prevStr+$;var Y=$.length-$.length%4;return this.prevStr=$.slice(Y),$=$.slice(0,Y),aH.from($,"base64")};q30.prototype.end=function(){return aH.from(this.prevStr,"base64")};function I30($,Y){}I30.prototype.write=function($){var Y=aH.alloc($.length*3),X=0;for(var G=0;G<$.length;G++){var J=$.charCodeAt(G);if(J<128)Y[X++]=J;else if(J<2048)Y[X++]=192+(J>>>6),Y[X++]=128+(J&63);else Y[X++]=224+(J>>>12),Y[X++]=128+(J>>>6&63),Y[X++]=128+(J&63)}return Y.slice(0,X)};I30.prototype.end=function(){};function P30($,Y){this.acc=0,this.contBytes=0,this.accBytes=0,this.defaultCharUnicode=Y.defaultCharUnicode}P30.prototype.write=function($){var Y=this.acc,X=this.contBytes,G=this.accBytes,J="";for(var Q=0;Q<$.length;Q++){var W=$[Q];if((W&192)!==128){if(X>0)J+=this.defaultCharUnicode,X=0;if(W<128)J+=String.fromCharCode(W);else if(W<224)Y=W&31,X=1,G=1;else if(W<240)Y=W&15,X=2,G=1;else J+=this.defaultCharUnicode}else if(X>0){if(Y=Y<<6|W&63,X--,G++,X===0)if(G===2&&Y<128&&Y>0)J+=this.defaultCharUnicode;else if(G===3&&Y<2048)J+=this.defaultCharUnicode;else J+=String.fromCharCode(Y)}else J+=this.defaultCharUnicode}return this.acc=Y,this.contBytes=X,this.accBytes=G,J};P30.prototype.end=function(){var $=0;if(this.contBytes>0)$+=this.defaultCharUnicode;return $};function w30($,Y){this.highSurrogate=""}w30.prototype.write=function($){if(this.highSurrogate)$=this.highSurrogate+$,this.highSurrogate="";if($.length>0){var Y=$.charCodeAt($.length-1);if(Y>=55296&&Y<56320)this.highSurrogate=$[$.length-1],$=$.slice(0,$.length-1)}return aH.from($,this.enc)};w30.prototype.end=function(){if(this.highSurrogate){var $=this.highSurrogate;return this.highSurrogate="",aH.from($,this.enc)}}});var kQ1=o((iC6)=>{var Vr=qG().Buffer;iC6._utf32=_30;function _30($,Y){this.iconv=Y,this.bomAware=!0,this.isLE=$.isLE}iC6.utf32le={type:"_utf32",isLE:!0};iC6.utf32be={type:"_utf32",isLE:!1};iC6.ucs4le="utf32le";iC6.ucs4be="utf32be";_30.prototype.encoder=j30;_30.prototype.decoder=T30;function j30($,Y){this.isLE=Y.isLE,this.highSurrogate=0}j30.prototype.write=function($){var Y=Vr.from($,"ucs2"),X=Vr.alloc(Y.length*2),G=this.isLE?X.writeUInt32LE:X.writeUInt32BE,J=0;for(var Q=0;Q<Y.length;Q+=2){var W=Y.readUInt16LE(Q),Z=W>=55296&&W<56320,K=W>=56320&&W<57344;if(this.highSurrogate)if(Z||!K)G.call(X,this.highSurrogate,J),J+=4;else{var H=(this.highSurrogate-55296<<10|W-56320)+65536;G.call(X,H,J),J+=4,this.highSurrogate=0;continue}if(Z)this.highSurrogate=W;else G.call(X,W,J),J+=4,this.highSurrogate=0}if(J<X.length)X=X.slice(0,J);return X};j30.prototype.end=function(){if(!this.highSurrogate)return;var $=Vr.alloc(4);if(this.isLE)$.writeUInt32LE(this.highSurrogate,0);else $.writeUInt32BE(this.highSurrogate,0);return this.highSurrogate=0,$};function T30($,Y){this.isLE=Y.isLE,this.badChar=Y.iconv.defaultCharUnicode.charCodeAt(0),this.overflow=[]}T30.prototype.write=function($){if($.length===0)return"";var Y=0,X=0,G=Vr.alloc($.length+4),J=0,Q=this.isLE,W=this.overflow,Z=this.badChar;if(W.length>0){for(;Y<$.length&&W.length<4;Y++)W.push($[Y]);if(W.length===4){if(Q)X=W[Y]|W[Y+1]<<8|W[Y+2]<<16|W[Y+3]<<24;else X=W[Y+3]|W[Y+2]<<8|W[Y+1]<<16|W[Y]<<24;W.length=0,J=CQ1(G,J,X,Z)}}for(;Y<$.length-3;Y+=4){if(Q)X=$[Y]|$[Y+1]<<8|$[Y+2]<<16|$[Y+3]<<24;else X=$[Y+3]|$[Y+2]<<8|$[Y+1]<<16|$[Y]<<24;J=CQ1(G,J,X,Z)}for(;Y<$.length;Y++)W.push($[Y]);return G.slice(0,J).toString("ucs2")};function CQ1($,Y,X,G){if(X<0||X>1114111)X=G;if(X>=65536){X-=65536;var J=55296|X>>10;$[Y++]=J&255,$[Y++]=J>>8;var X=56320|X&1023}return $[Y++]=X&255,$[Y++]=X>>8,Y}T30.prototype.end=function(){this.overflow.length=0};iC6.utf32=C30;iC6.ucs4="utf32";function C30($,Y){this.iconv=Y}C30.prototype.encoder=S30;C30.prototype.decoder=k30;function S30($,Y){if($=$||{},$.addBOM===void 0)$.addBOM=!0;this.encoder=Y.iconv.getEncoder($.defaultEncoding||"utf-32le",$)}S30.prototype.write=function($){return this.encoder.write($)};S30.prototype.end=function(){return this.encoder.end()};function k30($,Y){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=$||{},this.iconv=Y.iconv}k30.prototype.write=function($){if(!this.decoder){if(this.initialBufs.push($),this.initialBufsLen+=$.length,this.initialBufsLen<32)return"";var Y=SQ1(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(Y,this.options);var X="";for(var G=0;G<this.initialBufs.length;G++)X+=this.decoder.write(this.initialBufs[G]);return this.initialBufs.length=this.initialBufsLen=0,X}return this.decoder.write($)};k30.prototype.end=function(){if(!this.decoder){var $=SQ1(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder($,this.options);var Y="";for(var X=0;X<this.initialBufs.length;X++)Y+=this.decoder.write(this.initialBufs[X]);var G=this.decoder.end();if(G)Y+=G;return this.initialBufs.length=this.initialBufsLen=0,Y}return this.decoder.end()};function SQ1($,Y){var X=[],G=0,J=0,Q=0,W=0,Z=0;$:for(var K=0;K<$.length;K++){var H=$[K];for(var z=0;z<H.length;z++)if(X.push(H[z]),X.length===4){if(G===0){if(X[0]===255&&X[1]===254&&X[2]===0&&X[3]===0)return"utf-32le";if(X[0]===0&&X[1]===0&&X[2]===254&&X[3]===255)return"utf-32be"}if(X[0]!==0||X[1]>16)Q++;if(X[3]!==0||X[2]>16)J++;if(X[0]===0&&X[1]===0&&(X[2]!==0||X[3]!==0))Z++;if((X[0]!==0||X[1]!==0)&&X[2]===0&&X[3]===0)W++;if(X.length=0,G++,G>=100)break $}}if(Z-Q>W-J)return"utf-32be";if(Z-Q<W-J)return"utf-32le";return Y||"utf-32le"}});var yQ1=o(($S6)=>{var vQ1=qG().Buffer;$S6.utf16be=Ar;function Ar(){}Ar.prototype.encoder=v30;Ar.prototype.decoder=x30;Ar.prototype.bomAware=!0;function v30(){}v30.prototype.write=function($){var Y=vQ1.from($,"ucs2");for(var X=0;X<Y.length;X+=2){var G=Y[X];Y[X]=Y[X+1],Y[X+1]=G}return Y};v30.prototype.end=function(){};function x30(){this.overflowByte=-1}x30.prototype.write=function($){if($.length==0)return"";var Y=vQ1.alloc($.length+1),X=0,G=0;if(this.overflowByte!==-1)Y[0]=$[0],Y[1]=this.overflowByte,X=1,G=2;for(;X<$.length-1;X+=2,G+=2)Y[G]=$[X+1],Y[G+1]=$[X];return this.overflowByte=X==$.length-1?$[$.length-1]:-1,Y.slice(0,G).toString("ucs2")};x30.prototype.end=function(){this.overflowByte=-1};$S6.utf16=y30;function y30($,Y){this.iconv=Y}y30.prototype.encoder=b30;y30.prototype.decoder=h30;function b30($,Y){if($=$||{},$.addBOM===void 0)$.addBOM=!0;this.encoder=Y.iconv.getEncoder("utf-16le",$)}b30.prototype.write=function($){return this.encoder.write($)};b30.prototype.end=function(){return this.encoder.end()};function h30($,Y){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=$||{},this.iconv=Y.iconv}h30.prototype.write=function($){if(!this.decoder){if(this.initialBufs.push($),this.initialBufsLen+=$.length,this.initialBufsLen<16)return"";var Y=xQ1(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(Y,this.options);var X="";for(var G=0;G<this.initialBufs.length;G++)X+=this.decoder.write(this.initialBufs[G]);return this.initialBufs.length=this.initialBufsLen=0,X}return this.decoder.write($)};h30.prototype.end=function(){if(!this.decoder){var $=xQ1(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder($,this.options);var Y="";for(var X=0;X<this.initialBufs.length;X++)Y+=this.decoder.write(this.initialBufs[X]);var G=this.decoder.end();if(G)Y+=G;return this.initialBufs.length=this.initialBufsLen=0,Y}return this.decoder.end()};function xQ1($,Y){var X=[],G=0,J=0,Q=0;$:for(var W=0;W<$.length;W++){var Z=$[W];for(var K=0;K<Z.length;K++)if(X.push(Z[K]),X.length===2){if(G===0){if(X[0]===255&&X[1]===254)return"utf-16le";if(X[0]===254&&X[1]===255)return"utf-16be"}if(X[0]===0&&X[1]!==0)Q++;if(X[0]!==0&&X[1]===0)J++;if(X.length=0,G++,G>=100)break $}}if(Q>J)return"utf-16be";if(Q<J)return"utf-16le";return Y||"utf-16le"}});var hQ1=o((WS6)=>{var r3=qG().Buffer;WS6.utf7=Fr;WS6.unicode11utf7="utf7";function Fr($,Y){this.iconv=Y}Fr.prototype.encoder=g30;Fr.prototype.decoder=m30;Fr.prototype.bomAware=!0;var GS6=/[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;function g30($,Y){this.iconv=Y.iconv}g30.prototype.write=function($){return r3.from($.replace(GS6,function(Y){return"+"+(Y==="+"?"":this.iconv.encode(Y,"utf16-be").toString("base64").replace(/=+$/,""))+"-"}.bind(this)))};g30.prototype.end=function(){};function m30($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=""}var JS6=/[A-Za-z0-9\/+]/,u30=[];for(qq=0;qq<256;qq++)u30[qq]=JS6.test(String.fromCharCode(qq));var qq,QS6=43,wL=45,f30=38;m30.prototype.write=function($){var Y="",X=0,G=this.inBase64,J=this.base64Accum;for(var Q=0;Q<$.length;Q++)if(!G){if($[Q]==QS6)Y+=this.iconv.decode($.slice(X,Q),"ascii"),X=Q+1,G=!0}else if(!u30[$[Q]]){if(Q==X&&$[Q]==wL)Y+="+";else{var W=J+this.iconv.decode($.slice(X,Q),"ascii");Y+=this.iconv.decode(r3.from(W,"base64"),"utf16-be")}if($[Q]!=wL)Q--;X=Q+1,G=!1,J=""}if(!G)Y+=this.iconv.decode($.slice(X),"ascii");else{var W=J+this.iconv.decode($.slice(X),"ascii"),Z=W.length-W.length%8;J=W.slice(Z),W=W.slice(0,Z),Y+=this.iconv.decode(r3.from(W,"base64"),"utf16-be")}return this.inBase64=G,this.base64Accum=J,Y};m30.prototype.end=function(){var $="";if(this.inBase64&&this.base64Accum.length>0)$=this.iconv.decode(r3.from(this.base64Accum,"base64"),"utf16-be");return this.inBase64=!1,this.base64Accum="",$};WS6.utf7imap=Dr;function Dr($,Y){this.iconv=Y}Dr.prototype.encoder=p30;Dr.prototype.decoder=d30;Dr.prototype.bomAware=!0;function p30($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=r3.alloc(6),this.base64AccumIdx=0}p30.prototype.write=function($){var Y=this.inBase64,X=this.base64Accum,G=this.base64AccumIdx,J=r3.alloc($.length*5+10),Q=0;for(var W=0;W<$.length;W++){var Z=$.charCodeAt(W);if(Z>=32&&Z<=126){if(Y){if(G>0)Q+=J.write(X.slice(0,G).toString("base64").replace(/\//g,",").replace(/=+$/,""),Q),G=0;J[Q++]=wL,Y=!1}if(!Y){if(J[Q++]=Z,Z===f30)J[Q++]=wL}}else{if(!Y)J[Q++]=f30,Y=!0;if(Y){if(X[G++]=Z>>8,X[G++]=Z&255,G==X.length)Q+=J.write(X.toString("base64").replace(/\//g,","),Q),G=0}}}return this.inBase64=Y,this.base64AccumIdx=G,J.slice(0,Q)};p30.prototype.end=function(){var $=r3.alloc(10),Y=0;if(this.inBase64){if(this.base64AccumIdx>0)Y+=$.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),Y),this.base64AccumIdx=0;$[Y++]=wL,this.inBase64=!1}return $.slice(0,Y)};function d30($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=""}var bQ1=u30.slice();bQ1[44]=!0;d30.prototype.write=function($){var Y="",X=0,G=this.inBase64,J=this.base64Accum;for(var Q=0;Q<$.length;Q++)if(!G){if($[Q]==f30)Y+=this.iconv.decode($.slice(X,Q),"ascii"),X=Q+1,G=!0}else if(!bQ1[$[Q]]){if(Q==X&&$[Q]==wL)Y+="&";else{var W=J+this.iconv.decode($.slice(X,Q),"ascii").replace(/,/g,"/");Y+=this.iconv.decode(r3.from(W,"base64"),"utf16-be")}if($[Q]!=wL)Q--;X=Q+1,G=!1,J=""}if(!G)Y+=this.iconv.decode($.slice(X),"ascii");else{var W=J+this.iconv.decode($.slice(X),"ascii").replace(/,/g,"/"),Z=W.length-W.length%8;J=W.slice(Z),W=W.slice(0,Z),Y+=this.iconv.decode(r3.from(W,"base64"),"utf16-be")}return this.inBase64=G,this.base64Accum=J,Y};d30.prototype.end=function(){var $="";if(this.inBase64&&this.base64Accum.length>0)$=this.iconv.decode(r3.from(this.base64Accum,"base64"),"utf16-be");return this.inBase64=!1,this.base64Accum="",$}});var fQ1=o((HS6)=>{var Nr=qG().Buffer;HS6._sbcs=c30;function c30($,Y){if(!$)throw Error("SBCS codec is called without the data.");if(!$.chars||$.chars.length!==128&&$.chars.length!==256)throw Error("Encoding '"+$.type+"' has incorrect 'chars' (must be of len 128 or 256)");if($.chars.length===128){var X="";for(var G=0;G<128;G++)X+=String.fromCharCode(G);$.chars=X+$.chars}this.decodeBuf=Nr.from($.chars,"ucs2");var J=Nr.alloc(65536,Y.defaultCharSingleByte.charCodeAt(0));for(var G=0;G<$.chars.length;G++)J[$.chars.charCodeAt(G)]=G;this.encodeBuf=J}c30.prototype.encoder=l30;c30.prototype.decoder=i30;function l30($,Y){this.encodeBuf=Y.encodeBuf}l30.prototype.write=function($){var Y=Nr.alloc($.length);for(var X=0;X<$.length;X++)Y[X]=this.encodeBuf[$.charCodeAt(X)];return Y};l30.prototype.end=function(){};function i30($,Y){this.decodeBuf=Y.decodeBuf}i30.prototype.write=function($){var Y=this.decodeBuf,X=Nr.alloc($.length*2),G=0,J=0;for(var Q=0;Q<$.length;Q++)G=$[Q]*2,J=Q*2,X[J]=Y[G],X[J+1]=Y[G+1];return X.toString("ucs2")};i30.prototype.end=function(){}});var mQ1=o((rz5,gQ1)=>{gQ1.exports={10029:"maccenteuro",maccenteuro:{type:"_sbcs",chars:"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7"},808:"cp808",ibm808:"cp808",cp808:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\u20AC\u25A0\xA0"},mik:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2514\u2534\u252C\u251C\u2500\u253C\u2563\u2551\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xA7\u2557\u255D\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},cp720:{type:"_sbcs",chars:"\x80\x81\xE9\xE2\x84\xE0\x86\xE7\xEA\xEB\xE8\xEF\xEE\x8D\x8E\x8F\x90\u0651\u0652\xF4\xA4\u0640\xFB\xF9\u0621\u0622\u0623\u0624\xA3\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0636\u0637\u0638\u0639\u063A\u0641\xB5\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u2261\u064B\u064C\u064D\u064E\u064F\u0650\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ascii8bit:"ascii",usascii:"ascii",ansix34:"ascii",ansix341968:"ascii",ansix341986:"ascii",csascii:"ascii",cp367:"ascii",ibm367:"ascii",isoir6:"ascii",iso646us:"ascii",iso646irv:"ascii",us:"ascii",latin1:"iso88591",latin2:"iso88592",latin3:"iso88593",latin4:"iso88594",latin5:"iso88599",latin6:"iso885910",latin7:"iso885913",latin8:"iso885914",latin9:"iso885915",latin10:"iso885916",csisolatin1:"iso88591",csisolatin2:"iso88592",csisolatin3:"iso88593",csisolatin4:"iso88594",csisolatincyrillic:"iso88595",csisolatinarabic:"iso88596",csisolatingreek:"iso88597",csisolatinhebrew:"iso88598",csisolatin5:"iso88599",csisolatin6:"iso885910",l1:"iso88591",l2:"iso88592",l3:"iso88593",l4:"iso88594",l5:"iso88599",l6:"iso885910",l7:"iso885913",l8:"iso885914",l9:"iso885915",l10:"iso885916",isoir14:"iso646jp",isoir57:"iso646cn",isoir100:"iso88591",isoir101:"iso88592",isoir109:"iso88593",isoir110:"iso88594",isoir144:"iso88595",isoir127:"iso88596",isoir126:"iso88597",isoir138:"iso88598",isoir148:"iso88599",isoir157:"iso885910",isoir166:"tis620",isoir179:"iso885913",isoir199:"iso885914",isoir203:"iso885915",isoir226:"iso885916",cp819:"iso88591",ibm819:"iso88591",cyrillic:"iso88595",arabic:"iso88596",arabic8:"iso88596",ecma114:"iso88596",asmo708:"iso88596",greek:"iso88597",greek8:"iso88597",ecma118:"iso88597",elot928:"iso88597",hebrew:"iso88598",hebrew8:"iso88598",turkish:"iso88599",turkish8:"iso88599",thai:"iso885911",thai8:"iso885911",celtic:"iso885914",celtic8:"iso885914",isoceltic:"iso885914",tis6200:"tis620",tis62025291:"tis620",tis62025330:"tis620",1e4:"macroman",10006:"macgreek",10007:"maccyrillic",10079:"maciceland",10081:"macturkish",cspc8codepage437:"cp437",cspc775baltic:"cp775",cspc850multilingual:"cp850",cspcp852:"cp852",cspc862latinhebrew:"cp862",cpgr:"cp869",msee:"cp1250",mscyrl:"cp1251",msansi:"cp1252",msgreek:"cp1253",msturk:"cp1254",mshebr:"cp1255",msarab:"cp1256",winbaltrim:"cp1257",cp20866:"koi8r",20866:"koi8r",ibm878:"koi8r",cskoi8r:"koi8r",cp21866:"koi8u",21866:"koi8u",ibm1168:"koi8u",strk10482002:"rk1048",tcvn5712:"tcvn",tcvn57121:"tcvn",gb198880:"iso646cn",cn:"iso646cn",csiso14jisc6220ro:"iso646jp",jisc62201969ro:"iso646jp",jp:"iso646jp",cshproman8:"hproman8",r8:"hproman8",roman8:"hproman8",xroman8:"hproman8",ibm1051:"hproman8",mac:"macintosh",csmacintosh:"macintosh"}});var pQ1=o((az5,uQ1)=>{uQ1.exports={"437":"cp437","737":"cp737","775":"cp775","850":"cp850","852":"cp852","855":"cp855","856":"cp856","857":"cp857","858":"cp858","860":"cp860","861":"cp861","862":"cp862","863":"cp863","864":"cp864","865":"cp865","866":"cp866","869":"cp869","874":"windows874","922":"cp922","1046":"cp1046","1124":"cp1124","1125":"cp1125","1129":"cp1129","1133":"cp1133","1161":"cp1161","1162":"cp1162","1163":"cp1163","1250":"windows1250","1251":"windows1251","1252":"windows1252","1253":"windows1253","1254":"windows1254","1255":"windows1255","1256":"windows1256","1257":"windows1257","1258":"windows1258","28591":"iso88591","28592":"iso88592","28593":"iso88593","28594":"iso88594","28595":"iso88595","28596":"iso88596","28597":"iso88597","28598":"iso88598","28599":"iso88599","28600":"iso885910","28601":"iso885911","28603":"iso885913","28604":"iso885914","28605":"iso885915","28606":"iso885916",windows874:{type:"_sbcs",chars:"\u20AC\uFFFD\uFFFD\uFFFD\uFFFD\u2026\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},win874:"windows874",cp874:"windows874",windows1250:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\u0160\u2039\u015A\u0164\u017D\u0179\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0161\u203A\u015B\u0165\u017E\u017A\xA0\u02C7\u02D8\u0141\xA4\u0104\xA6\xA7\xA8\xA9\u015E\xAB\xAC\xAD\xAE\u017B\xB0\xB1\u02DB\u0142\xB4\xB5\xB6\xB7\xB8\u0105\u015F\xBB\u013D\u02DD\u013E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},win1250:"windows1250",cp1250:"windows1250",windows1251:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u040C\u040B\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u045C\u045B\u045F\xA0\u040E\u045E\u0408\xA4\u0490\xA6\xA7\u0401\xA9\u0404\xAB\xAC\xAD\xAE\u0407\xB0\xB1\u0406\u0456\u0491\xB5\xB6\xB7\u0451\u2116\u0454\xBB\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},win1251:"windows1251",cp1251:"windows1251",windows1252:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\u017D\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\u017E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},win1252:"windows1252",cp1252:"windows1252",windows1253:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0385\u0386\xA3\xA4\xA5\xA6\xA7\xA8\xA9\uFFFD\xAB\xAC\xAD\xAE\u2015\xB0\xB1\xB2\xB3\u0384\xB5\xB6\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},win1253:"windows1253",cp1253:"windows1253",windows1254:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},win1254:"windows1254",cp1254:"windows1254",windows1255:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\xA1\xA2\xA3\u20AA\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\xBF\u05B0\u05B1\u05B2\u05B3\u05B4\u05B5\u05B6\u05B7\u05B8\u05B9\u05BA\u05BB\u05BC\u05BD\u05BE\u05BF\u05C0\u05C1\u05C2\u05C3\u05F0\u05F1\u05F2\u05F3\u05F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},win1255:"windows1255",cp1255:"windows1255",windows1256:{type:"_sbcs",chars:"\u20AC\u067E\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06AF\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u06A9\u2122\u0691\u203A\u0153\u200C\u200D\u06BA\xA0\u060C\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\u06BE\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\u061B\xBB\xBC\xBD\xBE\u061F\u06C1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\xD7\u0637\u0638\u0639\u063A\u0640\u0641\u0642\u0643\xE0\u0644\xE2\u0645\u0646\u0647\u0648\xE7\xE8\xE9\xEA\xEB\u0649\u064A\xEE\xEF\u064B\u064C\u064D\u064E\xF4\u064F\u0650\xF7\u0651\xF9\u0652\xFB\xFC\u200E\u200F\u06D2"},win1256:"windows1256",cp1256:"windows1256",windows1257:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\xA8\u02C7\xB8\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\xAF\u02DB\uFFFD\xA0\uFFFD\xA2\xA3\xA4\uFFFD\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u02D9"},win1257:"windows1257",cp1257:"windows1257",windows1258:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},win1258:"windows1258",cp1258:"windows1258",iso88591:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28591:"iso88591",iso88592:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u02D8\u0141\xA4\u013D\u015A\xA7\xA8\u0160\u015E\u0164\u0179\xAD\u017D\u017B\xB0\u0105\u02DB\u0142\xB4\u013E\u015B\u02C7\xB8\u0161\u015F\u0165\u017A\u02DD\u017E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},cp28592:"iso88592",iso88593:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0126\u02D8\xA3\xA4\uFFFD\u0124\xA7\xA8\u0130\u015E\u011E\u0134\xAD\uFFFD\u017B\xB0\u0127\xB2\xB3\xB4\xB5\u0125\xB7\xB8\u0131\u015F\u011F\u0135\xBD\uFFFD\u017C\xC0\xC1\xC2\uFFFD\xC4\u010A\u0108\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\uFFFD\xD1\xD2\xD3\xD4\u0120\xD6\xD7\u011C\xD9\xDA\xDB\xDC\u016C\u015C\xDF\xE0\xE1\xE2\uFFFD\xE4\u010B\u0109\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\uFFFD\xF1\xF2\xF3\xF4\u0121\xF6\xF7\u011D\xF9\xFA\xFB\xFC\u016D\u015D\u02D9"},cp28593:"iso88593",iso88594:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0138\u0156\xA4\u0128\u013B\xA7\xA8\u0160\u0112\u0122\u0166\xAD\u017D\xAF\xB0\u0105\u02DB\u0157\xB4\u0129\u013C\u02C7\xB8\u0161\u0113\u0123\u0167\u014A\u017E\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\u012A\u0110\u0145\u014C\u0136\xD4\xD5\xD6\xD7\xD8\u0172\xDA\xDB\xDC\u0168\u016A\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\u012B\u0111\u0146\u014D\u0137\xF4\xF5\xF6\xF7\xF8\u0173\xFA\xFB\xFC\u0169\u016B\u02D9"},cp28594:"iso88594",iso88595:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0403\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},cp28595:"iso88595",iso88596:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\uFFFD\uFFFD\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u060C\xAD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u061B\uFFFD\uFFFD\uFFFD\u061F\uFFFD\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},cp28596:"iso88596",iso88597:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u2018\u2019\xA3\u20AC\u20AF\xA6\xA7\xA8\xA9\u037A\xAB\xAC\xAD\uFFFD\u2015\xB0\xB1\xB2\xB3\u0384\u0385\u0386\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},cp28597:"iso88597",iso88598:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2017\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},cp28598:"iso88598",iso88599:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},cp28599:"iso88599",iso885910:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0112\u0122\u012A\u0128\u0136\xA7\u013B\u0110\u0160\u0166\u017D\xAD\u016A\u014A\xB0\u0105\u0113\u0123\u012B\u0129\u0137\xB7\u013C\u0111\u0161\u0167\u017E\u2015\u016B\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\xCF\xD0\u0145\u014C\xD3\xD4\xD5\xD6\u0168\xD8\u0172\xDA\xDB\xDC\xDD\xDE\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\xEF\xF0\u0146\u014D\xF3\xF4\xF5\xF6\u0169\xF8\u0173\xFA\xFB\xFC\xFD\xFE\u0138"},cp28600:"iso885910",iso885911:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},cp28601:"iso885911",iso885913:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u201D\xA2\xA3\xA4\u201E\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\u201C\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u2019"},cp28603:"iso885913",iso885914:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u1E02\u1E03\xA3\u010A\u010B\u1E0A\xA7\u1E80\xA9\u1E82\u1E0B\u1EF2\xAD\xAE\u0178\u1E1E\u1E1F\u0120\u0121\u1E40\u1E41\xB6\u1E56\u1E81\u1E57\u1E83\u1E60\u1EF3\u1E84\u1E85\u1E61\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0174\xD1\xD2\xD3\xD4\xD5\xD6\u1E6A\xD8\xD9\xDA\xDB\xDC\xDD\u0176\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0175\xF1\xF2\xF3\xF4\xF5\xF6\u1E6B\xF8\xF9\xFA\xFB\xFC\xFD\u0177\xFF"},cp28604:"iso885914",iso885915:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\u0160\xA7\u0161\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u017D\xB5\xB6\xB7\u017E\xB9\xBA\xBB\u0152\u0153\u0178\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28605:"iso885915",iso885916:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0105\u0141\u20AC\u201E\u0160\xA7\u0161\xA9\u0218\xAB\u0179\xAD\u017A\u017B\xB0\xB1\u010C\u0142\u017D\u201D\xB6\xB7\u017E\u010D\u0219\xBB\u0152\u0153\u0178\u017C\xC0\xC1\xC2\u0102\xC4\u0106\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0110\u0143\xD2\xD3\xD4\u0150\xD6\u015A\u0170\xD9\xDA\xDB\xDC\u0118\u021A\xDF\xE0\xE1\xE2\u0103\xE4\u0107\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0111\u0144\xF2\xF3\xF4\u0151\xF6\u015B\u0171\xF9\xFA\xFB\xFC\u0119\u021B\xFF"},cp28606:"iso885916",cp437:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm437:"cp437",csibm437:"cp437",cp737:{type:"_sbcs",chars:"\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u03C5\u03C6\u03C7\u03C8\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03C9\u03AC\u03AD\u03AE\u03CA\u03AF\u03CC\u03CD\u03CB\u03CE\u0386\u0388\u0389\u038A\u038C\u038E\u038F\xB1\u2265\u2264\u03AA\u03AB\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm737:"cp737",csibm737:"cp737",cp775:{type:"_sbcs",chars:"\u0106\xFC\xE9\u0101\xE4\u0123\xE5\u0107\u0142\u0113\u0156\u0157\u012B\u0179\xC4\xC5\xC9\xE6\xC6\u014D\xF6\u0122\xA2\u015A\u015B\xD6\xDC\xF8\xA3\xD8\xD7\xA4\u0100\u012A\xF3\u017B\u017C\u017A\u201D\xA6\xA9\xAE\xAC\xBD\xBC\u0141\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0104\u010C\u0118\u0116\u2563\u2551\u2557\u255D\u012E\u0160\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0172\u016A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u017D\u0105\u010D\u0119\u0117\u012F\u0161\u0173\u016B\u017E\u2518\u250C\u2588\u2584\u258C\u2590\u2580\xD3\xDF\u014C\u0143\xF5\xD5\xB5\u0144\u0136\u0137\u013B\u013C\u0146\u0112\u0145\u2019\xAD\xB1\u201C\xBE\xB6\xA7\xF7\u201E\xB0\u2219\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm775:"cp775",csibm775:"cp775",cp850:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u0131\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm850:"cp850",csibm850:"cp850",cp852:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\u016F\u0107\xE7\u0142\xEB\u0150\u0151\xEE\u0179\xC4\u0106\xC9\u0139\u013A\xF4\xF6\u013D\u013E\u015A\u015B\xD6\xDC\u0164\u0165\u0141\xD7\u010D\xE1\xED\xF3\xFA\u0104\u0105\u017D\u017E\u0118\u0119\xAC\u017A\u010C\u015F\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\u011A\u015E\u2563\u2551\u2557\u255D\u017B\u017C\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0102\u0103\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u0111\u0110\u010E\xCB\u010F\u0147\xCD\xCE\u011B\u2518\u250C\u2588\u2584\u0162\u016E\u2580\xD3\xDF\xD4\u0143\u0144\u0148\u0160\u0161\u0154\xDA\u0155\u0170\xFD\xDD\u0163\xB4\xAD\u02DD\u02DB\u02C7\u02D8\xA7\xF7\xB8\xB0\xA8\u02D9\u0171\u0158\u0159\u25A0\xA0"},ibm852:"cp852",csibm852:"cp852",cp855:{type:"_sbcs",chars:"\u0452\u0402\u0453\u0403\u0451\u0401\u0454\u0404\u0455\u0405\u0456\u0406\u0457\u0407\u0458\u0408\u0459\u0409\u045A\u040A\u045B\u040B\u045C\u040C\u045E\u040E\u045F\u040F\u044E\u042E\u044A\u042A\u0430\u0410\u0431\u0411\u0446\u0426\u0434\u0414\u0435\u0415\u0444\u0424\u0433\u0413\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0445\u0425\u0438\u0418\u2563\u2551\u2557\u255D\u0439\u0419\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u043A\u041A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u043B\u041B\u043C\u041C\u043D\u041D\u043E\u041E\u043F\u2518\u250C\u2588\u2584\u041F\u044F\u2580\u042F\u0440\u0420\u0441\u0421\u0442\u0422\u0443\u0423\u0436\u0416\u0432\u0412\u044C\u042C\u2116\xAD\u044B\u042B\u0437\u0417\u0448\u0428\u044D\u042D\u0449\u0429\u0447\u0427\xA7\u25A0\xA0"},ibm855:"cp855",csibm855:"cp855",cp856:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\xA3\uFFFD\xD7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAE\xAC\xBD\xBC\uFFFD\xAB\xBB\u2591\u2592\u2593\u2502\u2524\uFFFD\uFFFD\uFFFD\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\uFFFD\uFFFD\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2518\u250C\u2588\u2584\xA6\uFFFD\u2580\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xB5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm856:"cp856",csibm856:"cp856",cp857:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\u0131\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\u0130\xD6\xDC\xF8\xA3\xD8\u015E\u015F\xE1\xED\xF3\xFA\xF1\xD1\u011E\u011F\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xBA\xAA\xCA\xCB\xC8\uFFFD\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\uFFFD\xD7\xDA\xDB\xD9\xEC\xFF\xAF\xB4\xAD\xB1\uFFFD\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm857:"cp857",csibm857:"cp857",cp858:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u20AC\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm858:"cp858",csibm858:"cp858",cp860:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE3\xE0\xC1\xE7\xEA\xCA\xE8\xCD\xD4\xEC\xC3\xC2\xC9\xC0\xC8\xF4\xF5\xF2\xDA\xF9\xCC\xD5\xDC\xA2\xA3\xD9\u20A7\xD3\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xD2\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm860:"cp860",csibm860:"cp860",cp861:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xD0\xF0\xDE\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xFE\xFB\xDD\xFD\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xC1\xCD\xD3\xDA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm861:"cp861",csibm861:"cp861",cp862:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm862:"cp862",csibm862:"cp862",cp863:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xC2\xE0\xB6\xE7\xEA\xEB\xE8\xEF\xEE\u2017\xC0\xA7\xC9\xC8\xCA\xF4\xCB\xCF\xFB\xF9\xA4\xD4\xDC\xA2\xA3\xD9\xDB\u0192\xA6\xB4\xF3\xFA\xA8\xB8\xB3\xAF\xCE\u2310\xAC\xBD\xBC\xBE\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm863:"cp863",csibm863:"cp863",cp864:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$\u066A&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xB0\xB7\u2219\u221A\u2592\u2500\u2502\u253C\u2524\u252C\u251C\u2534\u2510\u250C\u2514\u2518\u03B2\u221E\u03C6\xB1\xBD\xBC\u2248\xAB\xBB\uFEF7\uFEF8\uFFFD\uFFFD\uFEFB\uFEFC\uFFFD\xA0\xAD\uFE82\xA3\xA4\uFE84\uFFFD\uFFFD\uFE8E\uFE8F\uFE95\uFE99\u060C\uFE9D\uFEA1\uFEA5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFED1\u061B\uFEB1\uFEB5\uFEB9\u061F\xA2\uFE80\uFE81\uFE83\uFE85\uFECA\uFE8B\uFE8D\uFE91\uFE93\uFE97\uFE9B\uFE9F\uFEA3\uFEA7\uFEA9\uFEAB\uFEAD\uFEAF\uFEB3\uFEB7\uFEBB\uFEBF\uFEC1\uFEC5\uFECB\uFECF\xA6\xAC\xF7\xD7\uFEC9\u0640\uFED3\uFED7\uFEDB\uFEDF\uFEE3\uFEE7\uFEEB\uFEED\uFEEF\uFEF3\uFEBD\uFECC\uFECE\uFECD\uFEE1\uFE7D\u0651\uFEE5\uFEE9\uFEEC\uFEF0\uFEF2\uFED0\uFED5\uFEF5\uFEF6\uFEDD\uFED9\uFEF1\u25A0\uFFFD`},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xA4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0386\uFFFD\xB7\xAC\xA6\u2018\u2019\u0388\u2015\u0389\u038A\u03AA\u038C\uFFFD\uFFFD\u038E\u03AB\xA9\u038F\xB2\xB3\u03AC\xA3\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03CD\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xBD\u0398\u0399\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u039A\u039B\u039C\u039D\u2563\u2551\u2557\u255D\u039E\u039F\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u03A0\u03A1\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u2518\u250C\u2588\u2584\u03B4\u03B5\u2580\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u0384\xAD\xB1\u03C5\u03C6\u03C7\xA7\u03C8\u0385\xB0\xA8\u03C9\u03CB\u03B0\u03CE\u25A0\xA0"},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\u203E\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0160\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\u017D\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0161\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\u017E\xFF"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"\uFE88\xD7\xF7\uF8F6\uF8F5\uF8F4\uF8F7\uFE71\x88\u25A0\u2502\u2500\u2510\u250C\u2514\u2518\uFE79\uFE7B\uFE7D\uFE7F\uFE77\uFE8A\uFEF0\uFEF3\uFEF2\uFECE\uFECF\uFED0\uFEF6\uFEF8\uFEFA\uFEFC\xA0\uF8FA\uF8F9\uF8F8\xA4\uF8FB\uFE8B\uFE91\uFE97\uFE9B\uFE9F\uFEA3\u060C\xAD\uFEA7\uFEB3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFEB7\u061B\uFEBB\uFEBF\uFECA\u061F\uFECB\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\uFEC7\u0639\u063A\uFECC\uFE82\uFE84\uFE8E\uFED3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFED7\uFEDB\uFEDF\uF8FC\uFEF5\uFEF7\uFEF9\uFEFB\uFEE3\uFEE7\uFEEC\uFEE9\uFFFD"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0491\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0490\u0491\u0404\u0454\u0406\u0456\u0407\u0457\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E81\u0E82\u0E84\u0E87\u0E88\u0EAA\u0E8A\u0E8D\u0E94\u0E95\u0E96\u0E97\u0E99\u0E9A\u0E9B\u0E9C\u0E9D\u0E9E\u0E9F\u0EA1\u0EA2\u0EA3\u0EA5\u0EA7\u0EAB\u0EAD\u0EAE\uFFFD\uFFFD\uFFFD\u0EAF\u0EB0\u0EB2\u0EB3\u0EB4\u0EB5\u0EB6\u0EB7\u0EB8\u0EB9\u0EBC\u0EB1\u0EBB\u0EBD\uFFFD\uFFFD\uFFFD\u0EC0\u0EC1\u0EC2\u0EC3\u0EC4\u0EC8\u0EC9\u0ECA\u0ECB\u0ECC\u0ECD\u0EC6\uFFFD\u0EDC\u0EDD\u20AD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0ED0\u0ED1\u0ED2\u0ED3\u0ED4\u0ED5\u0ED6\u0ED7\u0ED8\u0ED9\uFFFD\uFFFD\xA2\xAC\xA6\uFFFD"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E48\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\u0E49\u0E4A\u0E4B\u20AC\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\xA2\xAC\xA6\xA0"},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"\u20AC\x81\x82\x83\x84\u2026\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},ibm1163:"cp1163",csibm1163:"cp1163",maccroatian:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u2126\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uFFFD\xA9\u2044\xA4\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7"},maccyrillic:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\xA2\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u2202\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4"},macgreek:{type:"_sbcs",chars:"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\xAD\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\u0387\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\uFFFD"},maciceland:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macroman:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macromania:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u015E\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\u0103\u015F\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\u0162\u0163\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macthai:{type:"_sbcs",chars:"\xAB\xBB\u2026\uF88C\uF88F\uF892\uF895\uF898\uF88B\uF88E\uF891\uF894\uF897\u201C\u201D\uF899\uFFFD\u2022\uF884\uF889\uF885\uF886\uF887\uF888\uF88A\uF88D\uF890\uF893\uF896\u2018\u2019\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFEFF\u200B\u2013\u2014\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u2122\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\xAE\xA9\uFFFD\uFFFD\uFFFD\uFFFD"},macturkish:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\uFFFD\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macukraine:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4"},koi8r:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u2553\u2554\u2555\u2556\u2557\u2558\u2559\u255A\u255B\u255C\u255D\u255E\u255F\u2560\u2561\u0401\u2562\u2563\u2564\u2565\u2566\u2567\u2568\u2569\u256A\u256B\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8u:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u255D\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8ru:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u045E\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u040E\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8t:{type:"_sbcs",chars:"\u049B\u0493\u201A\u0492\u201E\u2026\u2020\u2021\uFFFD\u2030\u04B3\u2039\u04B2\u04B7\u04B6\uFFFD\u049A\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04EF\u04EE\u0451\xA4\u04E3\xA6\xA7\uFFFD\uFFFD\uFFFD\xAB\xAC\xAD\xAE\uFFFD\xB0\xB1\xB2\u0401\uFFFD\u04E2\xB6\xB7\uFFFD\u2116\uFFFD\xBB\uFFFD\uFFFD\uFFFD\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},armscii8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\u0587\u0589)(\xBB\xAB\u2014.\u055D,-\u058A\u2026\u055C\u055B\u055E\u0531\u0561\u0532\u0562\u0533\u0563\u0534\u0564\u0535\u0565\u0536\u0566\u0537\u0567\u0538\u0568\u0539\u0569\u053A\u056A\u053B\u056B\u053C\u056C\u053D\u056D\u053E\u056E\u053F\u056F\u0540\u0570\u0541\u0571\u0542\u0572\u0543\u0573\u0544\u0574\u0545\u0575\u0546\u0576\u0547\u0577\u0548\u0578\u0549\u0579\u054A\u057A\u054B\u057B\u054C\u057C\u054D\u057D\u054E\u057E\u054F\u057F\u0550\u0580\u0551\u0581\u0552\u0582\u0553\u0583\u0554\u0584\u0555\u0585\u0556\u0586\u055A\uFFFD"},rk1048:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u049A\u04BA\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u049B\u04BB\u045F\xA0\u04B0\u04B1\u04D8\xA4\u04E8\xA6\xA7\u0401\xA9\u0492\xAB\xAC\xAD\xAE\u04AE\xB0\xB1\u0406\u0456\u04E9\xB5\xB6\xB7\u0451\u2116\u0493\xBB\u04D9\u04A2\u04A3\u04AF\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},tcvn:{type:"_sbcs",chars:`\x00\xDA\u1EE4\x03\u1EEA\u1EEC\u1EEE\x07\b	
\v\f\r\x0E\x0F\x10\u1EE8\u1EF0\u1EF2\u1EF6\u1EF8\xDD\u1EF4\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xC0\u1EA2\xC3\xC1\u1EA0\u1EB6\u1EAC\xC8\u1EBA\u1EBC\xC9\u1EB8\u1EC6\xCC\u1EC8\u0128\xCD\u1ECA\xD2\u1ECE\xD5\xD3\u1ECC\u1ED8\u1EDC\u1EDE\u1EE0\u1EDA\u1EE2\xD9\u1EE6\u0168\xA0\u0102\xC2\xCA\xD4\u01A0\u01AF\u0110\u0103\xE2\xEA\xF4\u01A1\u01B0\u0111\u1EB0\u0300\u0309\u0303\u0301\u0323\xE0\u1EA3\xE3\xE1\u1EA1\u1EB2\u1EB1\u1EB3\u1EB5\u1EAF\u1EB4\u1EAE\u1EA6\u1EA8\u1EAA\u1EA4\u1EC0\u1EB7\u1EA7\u1EA9\u1EAB\u1EA5\u1EAD\xE8\u1EC2\u1EBB\u1EBD\xE9\u1EB9\u1EC1\u1EC3\u1EC5\u1EBF\u1EC7\xEC\u1EC9\u1EC4\u1EBE\u1ED2\u0129\xED\u1ECB\xF2\u1ED4\u1ECF\xF5\xF3\u1ECD\u1ED3\u1ED5\u1ED7\u1ED1\u1ED9\u1EDD\u1EDF\u1EE1\u1EDB\u1EE3\xF9\u1ED6\u1EE7\u0169\xFA\u1EE5\u1EEB\u1EED\u1EEF\u1EE9\u1EF1\u1EF3\u1EF7\u1EF9\xFD\u1EF5\u1ED0`},georgianacademy:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10EF\u10F0\u10F1\u10F2\u10F3\u10F4\u10F5\u10F6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},georgianps:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10F1\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10F2\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10F3\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10F4\u10EF\u10F0\u10F5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},pt154:{type:"_sbcs",chars:"\u0496\u0492\u04EE\u0493\u201E\u2026\u04B6\u04AE\u04B2\u04AF\u04A0\u04E2\u04A2\u049A\u04BA\u04B8\u0497\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u04B3\u04B7\u04A1\u04E3\u04A3\u049B\u04BB\u04B9\xA0\u040E\u045E\u0408\u04E8\u0498\u04B0\xA7\u0401\xA9\u04D8\xAB\xAC\u04EF\xAE\u049C\xB0\u04B1\u0406\u0456\u0499\u04E9\xB6\xB7\u0451\u2116\u04D9\xBB\u0458\u04AA\u04AB\u049D\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},viscii:{type:"_sbcs",chars:`\x00\x01\u1EB2\x03\x04\u1EB4\u1EAA\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\u1EF6\x15\x16\x17\x18\u1EF8\x1A\x1B\x1C\x1D\u1EF4\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\u1EA0\u1EAE\u1EB0\u1EB6\u1EA4\u1EA6\u1EA8\u1EAC\u1EBC\u1EB8\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EE2\u1EDA\u1EDC\u1EDE\u1ECA\u1ECE\u1ECC\u1EC8\u1EE6\u0168\u1EE4\u1EF2\xD5\u1EAF\u1EB1\u1EB7\u1EA5\u1EA7\u1EA9\u1EAD\u1EBD\u1EB9\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1ED1\u1ED3\u1ED5\u1ED7\u1EE0\u01A0\u1ED9\u1EDD\u1EDF\u1ECB\u1EF0\u1EE8\u1EEA\u1EEC\u01A1\u1EDB\u01AF\xC0\xC1\xC2\xC3\u1EA2\u0102\u1EB3\u1EB5\xC8\xC9\xCA\u1EBA\xCC\xCD\u0128\u1EF3\u0110\u1EE9\xD2\xD3\xD4\u1EA1\u1EF7\u1EEB\u1EED\xD9\xDA\u1EF9\u1EF5\xDD\u1EE1\u01B0\xE0\xE1\xE2\xE3\u1EA3\u0103\u1EEF\u1EAB\xE8\xE9\xEA\u1EBB\xEC\xED\u0129\u1EC9\u0111\u1EF1\xF2\xF3\xF4\xF5\u1ECF\u1ECD\u1EE5\xF9\xFA\u0169\u1EE7\xFD\u1EE3\u1EEE`},iso646cn:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#\xA5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},iso646jp:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xA5]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xC0\xC2\xC8\xCA\xCB\xCE\xCF\xB4\u02CB\u02C6\xA8\u02DC\xD9\xDB\u20A4\xAF\xDD\xFD\xB0\xC7\xE7\xD1\xF1\xA1\xBF\xA4\xA3\xA5\xA7\u0192\xA2\xE2\xEA\xF4\xFB\xE1\xE9\xF3\xFA\xE0\xE8\xF2\xF9\xE4\xEB\xF6\xFC\xC5\xEE\xD8\xC6\xE5\xED\xF8\xE6\xC4\xEC\xD6\xDC\xC9\xEF\xDF\xD4\xC1\xC3\xE3\xD0\xF0\xCD\xCC\xD3\xD2\xD5\xF5\u0160\u0161\xDA\u0178\xFF\xDE\xFE\xB7\xB5\xB6\xBE\u2014\xBC\xBD\xAA\xBA\xAB\u25A0\xBB\xB1\uFFFD"},macintosh:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},ascii:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},tis620:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"}}});var cQ1=o((VS6)=>{var n30=qG().Buffer;VS6._dbcs=sH;var KX=-1,dQ1=-2,BZ=-10,IG=-1000,Iq=Array(256),Jv=-1;for(Gv=0;Gv<256;Gv++)Iq[Gv]=KX;var Gv;function sH($,Y){if(this.encodingName=$.encodingName,!$)throw Error("DBCS codec is called without the data.");if(!$.table)throw Error("Encoding '"+this.encodingName+"' has no data.");var X=$.table();this.decodeTables=[],this.decodeTables[0]=Iq.slice(0),this.decodeTableSeq=[];for(var G=0;G<X.length;G++)this._addDecodeChunk(X[G]);if(typeof $.gb18030==="function"){this.gb18030=$.gb18030();var J=this.decodeTables.length;this.decodeTables.push(Iq.slice(0));var Q=this.decodeTables.length;this.decodeTables.push(Iq.slice(0));var W=this.decodeTables[0];for(var G=129;G<=254;G++){var Z=this.decodeTables[IG-W[G]];for(var K=48;K<=57;K++){if(Z[K]===KX)Z[K]=IG-J;else if(Z[K]>IG)throw Error("gb18030 decode tables conflict at byte 2");var H=this.decodeTables[IG-Z[K]];for(var z=129;z<=254;z++){if(H[z]===KX)H[z]=IG-Q;else if(H[z]===IG-Q)continue;else if(H[z]>IG)throw Error("gb18030 decode tables conflict at byte 3");var V=this.decodeTables[IG-H[z]];for(var A=48;A<=57;A++)if(V[A]===KX)V[A]=dQ1}}}}this.defaultCharUnicode=Y.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var F={};if($.encodeSkipVals)for(var G=0;G<$.encodeSkipVals.length;G++){var N=$.encodeSkipVals[G];if(typeof N==="number")F[N]=!0;else for(var K=N.from;K<=N.to;K++)F[K]=!0}if(this._fillEncodeTable(0,0,F),$.encodeAdd){for(var D in $.encodeAdd)if(Object.prototype.hasOwnProperty.call($.encodeAdd,D))this._setEncodeChar(D.charCodeAt(0),$.encodeAdd[D])}if(this.defCharSB=this.encodeTable[0][Y.defaultCharSingleByte.charCodeAt(0)],this.defCharSB===KX)this.defCharSB=this.encodeTable[0]["?"];if(this.defCharSB===KX)this.defCharSB=63}sH.prototype.encoder=Lr;sH.prototype.decoder=r30;sH.prototype._getDecodeTrieNode=function($){var Y=[];for(;$>0;$>>>=8)Y.push($&255);if(Y.length==0)Y.push(0);var X=this.decodeTables[0];for(var G=Y.length-1;G>0;G--){var J=X[Y[G]];if(J==KX)X[Y[G]]=IG-this.decodeTables.length,this.decodeTables.push(X=Iq.slice(0));else if(J<=IG)X=this.decodeTables[IG-J];else throw Error("Overwrite byte in "+this.encodingName+", addr: "+$.toString(16))}return X};sH.prototype._addDecodeChunk=function($){var Y=parseInt($[0],16),X=this._getDecodeTrieNode(Y);Y=Y&255;for(var G=1;G<$.length;G++){var J=$[G];if(typeof J==="string")for(var Q=0;Q<J.length;){var W=J.charCodeAt(Q++);if(W>=55296&&W<56320){var Z=J.charCodeAt(Q++);if(Z>=56320&&Z<57344)X[Y++]=65536+(W-55296)*1024+(Z-56320);else throw Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+$[0])}else if(W>4080&&W<=4095){var K=4095-W+2,H=[];for(var z=0;z<K;z++)H.push(J.charCodeAt(Q++));X[Y++]=BZ-this.decodeTableSeq.length,this.decodeTableSeq.push(H)}else X[Y++]=W}else if(typeof J==="number"){var V=X[Y-1]+1;for(var Q=0;Q<J;Q++)X[Y++]=V++}else throw Error("Incorrect type '"+typeof J+"' given in "+this.encodingName+" at chunk "+$[0])}if(Y>255)throw Error("Incorrect chunk in "+this.encodingName+" at addr "+$[0]+": too long"+Y)};sH.prototype._getEncodeBucket=function($){var Y=$>>8;if(this.encodeTable[Y]===void 0)this.encodeTable[Y]=Iq.slice(0);return this.encodeTable[Y]};sH.prototype._setEncodeChar=function($,Y){var X=this._getEncodeBucket($),G=$&255;if(X[G]<=BZ)this.encodeTableSeq[BZ-X[G]][Jv]=Y;else if(X[G]==KX)X[G]=Y};sH.prototype._setEncodeSequence=function($,Y){var X=$[0],G=this._getEncodeBucket(X),J=X&255,Q;if(G[J]<=BZ)Q=this.encodeTableSeq[BZ-G[J]];else{if(Q={},G[J]!==KX)Q[Jv]=G[J];G[J]=BZ-this.encodeTableSeq.length,this.encodeTableSeq.push(Q)}for(var W=1;W<$.length-1;W++){var Z=Q[X];if(typeof Z==="object")Q=Z;else if(Q=Q[X]={},Z!==void 0)Q[Jv]=Z}X=$[$.length-1],Q[X]=Y};sH.prototype._fillEncodeTable=function($,Y,X){var G=this.decodeTables[$],J=!1,Q={};for(var W=0;W<256;W++){var Z=G[W],K=Y+W;if(X[K])continue;if(Z>=0)this._setEncodeChar(Z,K),J=!0;else if(Z<=IG){var H=IG-Z;if(!Q[H]){var z=K<<8>>>0;if(this._fillEncodeTable(H,z,X))J=!0;else Q[H]=!0}}else if(Z<=BZ)this._setEncodeSequence(this.decodeTableSeq[BZ-Z],K),J=!0}return J};function Lr($,Y){this.leadSurrogate=-1,this.seqObj=void 0,this.encodeTable=Y.encodeTable,this.encodeTableSeq=Y.encodeTableSeq,this.defaultCharSingleByte=Y.defCharSB,this.gb18030=Y.gb18030}Lr.prototype.write=function($){var Y=n30.alloc($.length*(this.gb18030?4:3)),X=this.leadSurrogate,G=this.seqObj,J=-1,Q=0,W=0;while(!0){if(J===-1){if(Q==$.length)break;var Z=$.charCodeAt(Q++)}else{var Z=J;J=-1}if(Z>=55296&&Z<57344)if(Z<56320)if(X===-1){X=Z;continue}else X=Z,Z=KX;else if(X!==-1)Z=65536+(X-55296)*1024+(Z-56320),X=-1;else Z=KX;else if(X!==-1)J=Z,Z=KX,X=-1;var K=KX;if(G!==void 0&&Z!=KX){var H=G[Z];if(typeof H==="object"){G=H;continue}else if(typeof H==="number")K=H;else if(H==null){if(H=G[Jv],H!==void 0)K=H,J=Z}G=void 0}else if(Z>=0){var z=this.encodeTable[Z>>8];if(z!==void 0)K=z[Z&255];if(K<=BZ){G=this.encodeTableSeq[BZ-K];continue}if(K==KX&&this.gb18030){var V=a30(this.gb18030.uChars,Z);if(V!=-1){var K=this.gb18030.gbChars[V]+(Z-this.gb18030.uChars[V]);Y[W++]=129+Math.floor(K/12600),K=K%12600,Y[W++]=48+Math.floor(K/1260),K=K%1260,Y[W++]=129+Math.floor(K/10),K=K%10,Y[W++]=48+K;continue}}}if(K===KX)K=this.defaultCharSingleByte;if(K<256)Y[W++]=K;else if(K<65536)Y[W++]=K>>8,Y[W++]=K&255;else if(K<16777216)Y[W++]=K>>16,Y[W++]=K>>8&255,Y[W++]=K&255;else Y[W++]=K>>>24,Y[W++]=K>>>16&255,Y[W++]=K>>>8&255,Y[W++]=K&255}return this.seqObj=G,this.leadSurrogate=X,Y.slice(0,W)};Lr.prototype.end=function(){if(this.leadSurrogate===-1&&this.seqObj===void 0)return;var $=n30.alloc(10),Y=0;if(this.seqObj){var X=this.seqObj[Jv];if(X!==void 0)if(X<256)$[Y++]=X;else $[Y++]=X>>8,$[Y++]=X&255;this.seqObj=void 0}if(this.leadSurrogate!==-1)$[Y++]=this.defaultCharSingleByte,this.leadSurrogate=-1;return $.slice(0,Y)};Lr.prototype.findIdx=a30;function r30($,Y){this.nodeIdx=0,this.prevBytes=[],this.decodeTables=Y.decodeTables,this.decodeTableSeq=Y.decodeTableSeq,this.defaultCharUnicode=Y.defaultCharUnicode,this.gb18030=Y.gb18030}r30.prototype.write=function($){var Y=n30.alloc($.length*2),X=this.nodeIdx,G=this.prevBytes,J=this.prevBytes.length,Q=-this.prevBytes.length,W;for(var Z=0,K=0;Z<$.length;Z++){var H=Z>=0?$[Z]:G[Z+J],W=this.decodeTables[X][H];if(W>=0);else if(W===KX)W=this.defaultCharUnicode.charCodeAt(0),Z=Q;else if(W===dQ1){if(Z>=3)var z=($[Z-3]-129)*12600+($[Z-2]-48)*1260+($[Z-1]-129)*10+(H-48);else var z=(G[Z-3+J]-129)*12600+((Z-2>=0?$[Z-2]:G[Z-2+J])-48)*1260+((Z-1>=0?$[Z-1]:G[Z-1+J])-129)*10+(H-48);var V=a30(this.gb18030.gbChars,z);W=this.gb18030.uChars[V]+z-this.gb18030.gbChars[V]}else if(W<=IG){X=IG-W;continue}else if(W<=BZ){var A=this.decodeTableSeq[BZ-W];for(var F=0;F<A.length-1;F++)W=A[F],Y[K++]=W&255,Y[K++]=W>>8;W=A[A.length-1]}else throw Error("iconv-lite internal error: invalid decoding table value "+W+" at "+X+"/"+H);if(W>=65536){W-=65536;var N=55296|W>>10;Y[K++]=N&255,Y[K++]=N>>8,W=56320|W&1023}Y[K++]=W&255,Y[K++]=W>>8,X=0,Q=Z+1}return this.nodeIdx=X,this.prevBytes=Q>=0?Array.prototype.slice.call($,Q):G.slice(Q+J).concat(Array.prototype.slice.call($)),Y.slice(0,K).toString("ucs2")};r30.prototype.end=function(){var $="";while(this.prevBytes.length>0){$+=this.defaultCharUnicode;var Y=this.prevBytes.slice(1);if(this.prevBytes=[],this.nodeIdx=0,Y.length>0)$+=this.write(Y)}return this.prevBytes=[],this.nodeIdx=0,$};function a30($,Y){if($[0]>Y)return-1;var X=0,G=$.length;while(X<G-1){var J=X+(G-X+1>>1);if($[J]<=Y)X=J;else G=J}return X}});var lQ1=o((oz5,FS6)=>{FS6.exports=[["0","\x00",128],["a1","\uFF61",62],["8140","\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008",9,"\uFF0B\uFF0D\xB1\xD7"],["8180","\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"],["81b8","\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"],["81c8","\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"],["81da","\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"],["81f0","\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"],["81fc","\u25EF"],["824f","\uFF10",9],["8260","\uFF21",25],["8281","\uFF41",25],["829f","\u3041",82],["8340","\u30A1",62],["8380","\u30E0",22],["839f","\u0391",16,"\u03A3",6],["83bf","\u03B1",16,"\u03C3",6],["8440","\u0410",5,"\u0401\u0416",25],["8470","\u0430",5,"\u0451\u0436",7],["8480","\u043E",17],["849f","\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"],["8740","\u2460",19,"\u2160",9],["875f","\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"],["877e","\u337B"],["8780","\u301D\u301F\u2116\u33CD\u2121\u32A4",4,"\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"],["889f","\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"],["8940","\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186"],["8980","\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"],["8a40","\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B"],["8a80","\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"],["8b40","\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551"],["8b80","\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"],["8c40","\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8"],["8c80","\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"],["8d40","\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D"],["8d80","\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"],["8e40","\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62"],["8e80","\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"],["8f40","\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3"],["8f80","\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"],["9040","\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8"],["9080","\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"],["9140","\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB"],["9180","\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"],["9240","\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4"],["9280","\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"],["9340","\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC"],["9380","\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"],["9440","\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885"],["9480","\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"],["9540","\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577"],["9580","\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"],["9640","\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6"],["9680","\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"],["9740","\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32"],["9780","\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"],["9840","\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"],["989f","\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"],["9940","\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED"],["9980","\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"],["9a40","\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638"],["9a80","\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"],["9b40","\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80"],["9b80","\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"],["9c40","\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060"],["9c80","\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"],["9d40","\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B"],["9d80","\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"],["9e40","\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E"],["9e80","\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"],["9f40","\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF"],["9f80","\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"],["e040","\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD"],["e080","\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"],["e140","\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF"],["e180","\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"],["e240","\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0"],["e280","\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"],["e340","\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37"],["e380","\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"],["e440","\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264"],["e480","\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"],["e540","\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC"],["e580","\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"],["e640","\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7"],["e680","\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"],["e740","\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C"],["e780","\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"],["e840","\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599"],["e880","\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"],["e940","\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43"],["e980","\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"],["ea40","\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF"],["ea80","\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0\u582F\u69C7\u9059\u7464\u51DC\u7199"],["ed40","\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F"],["ed80","\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"],["ee40","\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559"],["ee80","\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"],["eeef","\u2170",9,"\uFFE2\uFFE4\uFF07\uFF02"],["f040","\uE000",62],["f080","\uE03F",124],["f140","\uE0BC",62],["f180","\uE0FB",124],["f240","\uE178",62],["f280","\uE1B7",124],["f340","\uE234",62],["f380","\uE273",124],["f440","\uE2F0",62],["f480","\uE32F",124],["f540","\uE3AC",62],["f580","\uE3EB",124],["f640","\uE468",62],["f680","\uE4A7",124],["f740","\uE524",62],["f780","\uE563",124],["f840","\uE5E0",62],["f880","\uE61F",124],["f940","\uE69C"],["fa40","\u2170",9,"\u2160",9,"\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u2235\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A"],["fa80","\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F"],["fb40","\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19"],["fb80","\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9"],["fc40","\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"]]});var iQ1=o((tz5,DS6)=>{DS6.exports=[["0","\x00",127],["8ea1","\uFF61",62],["a1a1","\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008",9,"\uFF0B\uFF0D\xB1\xD7\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7"],["a2a1","\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"],["a2ba","\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"],["a2ca","\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"],["a2dc","\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"],["a2f2","\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"],["a2fe","\u25EF"],["a3b0","\uFF10",9],["a3c1","\uFF21",25],["a3e1","\uFF41",25],["a4a1","\u3041",82],["a5a1","\u30A1",85],["a6a1","\u0391",16,"\u03A3",6],["a6c1","\u03B1",16,"\u03C3",6],["a7a1","\u0410",5,"\u0401\u0416",25],["a7d1","\u0430",5,"\u0451\u0436",25],["a8a1","\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"],["ada1","\u2460",19,"\u2160",9],["adc0","\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"],["addf","\u337B\u301D\u301F\u2116\u33CD\u2121\u32A4",4,"\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"],["b0a1","\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"],["b1a1","\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC"],["b2a1","\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"],["b3a1","\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431"],["b4a1","\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"],["b5a1","\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC"],["b6a1","\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"],["b7a1","\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372"],["b8a1","\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"],["b9a1","\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC"],["baa1","\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"],["bba1","\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642"],["bca1","\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"],["bda1","\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F"],["bea1","\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"],["bfa1","\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE"],["c0a1","\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"],["c1a1","\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E"],["c2a1","\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"],["c3a1","\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5"],["c4a1","\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"],["c5a1","\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230"],["c6a1","\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"],["c7a1","\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6"],["c8a1","\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"],["c9a1","\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D"],["caa1","\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"],["cba1","\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80"],["cca1","\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"],["cda1","\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483"],["cea1","\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"],["cfa1","\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"],["d0a1","\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"],["d1a1","\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8"],["d2a1","\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"],["d3a1","\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709"],["d4a1","\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"],["d5a1","\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53"],["d6a1","\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"],["d7a1","\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A"],["d8a1","\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"],["d9a1","\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC"],["daa1","\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"],["dba1","\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD"],["dca1","\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"],["dda1","\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE"],["dea1","\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"],["dfa1","\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC"],["e0a1","\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"],["e1a1","\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670"],["e2a1","\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"],["e3a1","\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50"],["e4a1","\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"],["e5a1","\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A"],["e6a1","\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"],["e7a1","\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9"],["e8a1","\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"],["e9a1","\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759"],["eaa1","\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"],["eba1","\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B"],["eca1","\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"],["eda1","\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8"],["eea1","\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"],["efa1","\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E"],["f0a1","\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"],["f1a1","\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7"],["f2a1","\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"],["f3a1","\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0"],["f4a1","\u582F\u69C7\u9059\u7464\u51DC\u7199"],["f9a1","\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7"],["faa1","\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"],["fba1","\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA"],["fca1","\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"],["fcf1","\u2170",9,"\uFFE2\uFFE4\uFF07\uFF02"],["8fa2af","\u02D8\u02C7\xB8\u02D9\u02DD\xAF\u02DB\u02DA\uFF5E\u0384\u0385"],["8fa2c2","\xA1\xA6\xBF"],["8fa2eb","\xBA\xAA\xA9\xAE\u2122\xA4\u2116"],["8fa6e1","\u0386\u0388\u0389\u038A\u03AA"],["8fa6e7","\u038C"],["8fa6e9","\u038E\u03AB"],["8fa6ec","\u038F"],["8fa6f1","\u03AC\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03C2\u03CD\u03CB\u03B0\u03CE"],["8fa7c2","\u0402",10,"\u040E\u040F"],["8fa7f2","\u0452",10,"\u045E\u045F"],["8fa9a1","\xC6\u0110"],["8fa9a4","\u0126"],["8fa9a6","\u0132"],["8fa9a8","\u0141\u013F"],["8fa9ab","\u014A\xD8\u0152"],["8fa9af","\u0166\xDE"],["8fa9c1","\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0142\u0140\u0149\u014B\xF8\u0153\xDF\u0167\xFE"],["8faaa1","\xC1\xC0\xC4\xC2\u0102\u01CD\u0100\u0104\xC5\xC3\u0106\u0108\u010C\xC7\u010A\u010E\xC9\xC8\xCB\xCA\u011A\u0116\u0112\u0118"],["8faaba","\u011C\u011E\u0122\u0120\u0124\xCD\xCC\xCF\xCE\u01CF\u0130\u012A\u012E\u0128\u0134\u0136\u0139\u013D\u013B\u0143\u0147\u0145\xD1\xD3\xD2\xD6\xD4\u01D1\u0150\u014C\xD5\u0154\u0158\u0156\u015A\u015C\u0160\u015E\u0164\u0162\xDA\xD9\xDC\xDB\u016C\u01D3\u0170\u016A\u0172\u016E\u0168\u01D7\u01DB\u01D9\u01D5\u0174\xDD\u0178\u0176\u0179\u017D\u017B"],["8faba1","\xE1\xE0\xE4\xE2\u0103\u01CE\u0101\u0105\xE5\xE3\u0107\u0109\u010D\xE7\u010B\u010F\xE9\xE8\xEB\xEA\u011B\u0117\u0113\u0119\u01F5\u011D\u011F"],["8fabbd","\u0121\u0125\xED\xEC\xEF\xEE\u01D0"],["8fabc5","\u012B\u012F\u0129\u0135\u0137\u013A\u013E\u013C\u0144\u0148\u0146\xF1\xF3\xF2\xF6\xF4\u01D2\u0151\u014D\xF5\u0155\u0159\u0157\u015B\u015D\u0161\u015F\u0165\u0163\xFA\xF9\xFC\xFB\u016D\u01D4\u0171\u016B\u0173\u016F\u0169\u01D8\u01DC\u01DA\u01D6\u0175\xFD\xFF\u0177\u017A\u017E\u017C"],["8fb0a1","\u4E02\u4E04\u4E05\u4E0C\u4E12\u4E1F\u4E23\u4E24\u4E28\u4E2B\u4E2E\u4E2F\u4E30\u4E35\u4E40\u4E41\u4E44\u4E47\u4E51\u4E5A\u4E5C\u4E63\u4E68\u4E69\u4E74\u4E75\u4E79\u4E7F\u4E8D\u4E96\u4E97\u4E9D\u4EAF\u4EB9\u4EC3\u4ED0\u4EDA\u4EDB\u4EE0\u4EE1\u4EE2\u4EE8\u4EEF\u4EF1\u4EF3\u4EF5\u4EFD\u4EFE\u4EFF\u4F00\u4F02\u4F03\u4F08\u4F0B\u4F0C\u4F12\u4F15\u4F16\u4F17\u4F19\u4F2E\u4F31\u4F60\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E\u4F40\u4F42\u4F48\u4F49\u4F4B\u4F4C\u4F52\u4F54\u4F56\u4F58\u4F5F\u4F63\u4F6A\u4F6C\u4F6E\u4F71\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F7E\u4F81\u4F82\u4F84"],["8fb1a1","\u4F85\u4F89\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F94\u4F97\u4F99\u4F9A\u4F9E\u4F9F\u4FB2\u4FB7\u4FB9\u4FBB\u4FBC\u4FBD\u4FBE\u4FC0\u4FC1\u4FC5\u4FC6\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FCF\u4FD2\u4FDC\u4FE0\u4FE2\u4FF0\u4FF2\u4FFC\u4FFD\u4FFF\u5000\u5001\u5004\u5007\u500A\u500C\u500E\u5010\u5013\u5017\u5018\u501B\u501C\u501D\u501E\u5022\u5027\u502E\u5030\u5032\u5033\u5035\u5040\u5041\u5042\u5045\u5046\u504A\u504C\u504E\u5051\u5052\u5053\u5057\u5059\u505F\u5060\u5062\u5063\u5066\u5067\u506A\u506D\u5070\u5071\u503B\u5081\u5083\u5084\u5086\u508A\u508E\u508F\u5090"],["8fb2a1","\u5092\u5093\u5094\u5096\u509B\u509C\u509E",4,"\u50AA\u50AF\u50B0\u50B9\u50BA\u50BD\u50C0\u50C3\u50C4\u50C7\u50CC\u50CE\u50D0\u50D3\u50D4\u50D8\u50DC\u50DD\u50DF\u50E2\u50E4\u50E6\u50E8\u50E9\u50EF\u50F1\u50F6\u50FA\u50FE\u5103\u5106\u5107\u5108\u510B\u510C\u510D\u510E\u50F2\u5110\u5117\u5119\u511B\u511C\u511D\u511E\u5123\u5127\u5128\u512C\u512D\u512F\u5131\u5133\u5134\u5135\u5138\u5139\u5142\u514A\u514F\u5153\u5155\u5157\u5158\u515F\u5164\u5166\u517E\u5183\u5184\u518B\u518E\u5198\u519D\u51A1\u51A3\u51AD\u51B8\u51BA\u51BC\u51BE\u51BF\u51C2"],["8fb3a1","\u51C8\u51CF\u51D1\u51D2\u51D3\u51D5\u51D8\u51DE\u51E2\u51E5\u51EE\u51F2\u51F3\u51F4\u51F7\u5201\u5202\u5205\u5212\u5213\u5215\u5216\u5218\u5222\u5228\u5231\u5232\u5235\u523C\u5245\u5249\u5255\u5257\u5258\u525A\u525C\u525F\u5260\u5261\u5266\u526E\u5277\u5278\u5279\u5280\u5282\u5285\u528A\u528C\u5293\u5295\u5296\u5297\u5298\u529A\u529C\u52A4\u52A5\u52A6\u52A7\u52AF\u52B0\u52B6\u52B7\u52B8\u52BA\u52BB\u52BD\u52C0\u52C4\u52C6\u52C8\u52CC\u52CF\u52D1\u52D4\u52D6\u52DB\u52DC\u52E1\u52E5\u52E8\u52E9\u52EA\u52EC\u52F0\u52F1\u52F4\u52F6\u52F7\u5300\u5303\u530A\u530B"],["8fb4a1","\u530C\u5311\u5313\u5318\u531B\u531C\u531E\u531F\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u5330\u5332\u5335\u533C\u533D\u533E\u5342\u534C\u534B\u5359\u535B\u5361\u5363\u5365\u536C\u536D\u5372\u5379\u537E\u5383\u5387\u5388\u538E\u5393\u5394\u5399\u539D\u53A1\u53A4\u53AA\u53AB\u53AF\u53B2\u53B4\u53B5\u53B7\u53B8\u53BA\u53BD\u53C0\u53C5\u53CF\u53D2\u53D3\u53D5\u53DA\u53DD\u53DE\u53E0\u53E6\u53E7\u53F5\u5402\u5413\u541A\u5421\u5427\u5428\u542A\u542F\u5431\u5434\u5435\u5443\u5444\u5447\u544D\u544F\u545E\u5462\u5464\u5466\u5467\u5469\u546B\u546D\u546E\u5474\u547F"],["8fb5a1","\u5481\u5483\u5485\u5488\u5489\u548D\u5491\u5495\u5496\u549C\u549F\u54A1\u54A6\u54A7\u54A9\u54AA\u54AD\u54AE\u54B1\u54B7\u54B9\u54BA\u54BB\u54BF\u54C6\u54CA\u54CD\u54CE\u54E0\u54EA\u54EC\u54EF\u54F6\u54FC\u54FE\u54FF\u5500\u5501\u5505\u5508\u5509\u550C\u550D\u550E\u5515\u552A\u552B\u5532\u5535\u5536\u553B\u553C\u553D\u5541\u5547\u5549\u554A\u554D\u5550\u5551\u5558\u555A\u555B\u555E\u5560\u5561\u5564\u5566\u557F\u5581\u5582\u5586\u5588\u558E\u558F\u5591\u5592\u5593\u5594\u5597\u55A3\u55A4\u55AD\u55B2\u55BF\u55C1\u55C3\u55C6\u55C9\u55CB\u55CC\u55CE\u55D1\u55D2"],["8fb6a1","\u55D3\u55D7\u55D8\u55DB\u55DE\u55E2\u55E9\u55F6\u55FF\u5605\u5608\u560A\u560D",5,"\u5619\u562C\u5630\u5633\u5635\u5637\u5639\u563B\u563C\u563D\u563F\u5640\u5641\u5643\u5644\u5646\u5649\u564B\u564D\u564F\u5654\u565E\u5660\u5661\u5662\u5663\u5666\u5669\u566D\u566F\u5671\u5672\u5675\u5684\u5685\u5688\u568B\u568C\u5695\u5699\u569A\u569D\u569E\u569F\u56A6\u56A7\u56A8\u56A9\u56AB\u56AC\u56AD\u56B1\u56B3\u56B7\u56BE\u56C5\u56C9\u56CA\u56CB\u56CF\u56D0\u56CC\u56CD\u56D9\u56DC\u56DD\u56DF\u56E1\u56E4",4,"\u56F1\u56EB\u56ED"],["8fb7a1","\u56F6\u56F7\u5701\u5702\u5707\u570A\u570C\u5711\u5715\u571A\u571B\u571D\u5720\u5722\u5723\u5724\u5725\u5729\u572A\u572C\u572E\u572F\u5733\u5734\u573D\u573E\u573F\u5745\u5746\u574C\u574D\u5752\u5762\u5765\u5767\u5768\u576B\u576D",4,"\u5773\u5774\u5775\u5777\u5779\u577A\u577B\u577C\u577E\u5781\u5783\u578C\u5794\u5797\u5799\u579A\u579C\u579D\u579E\u579F\u57A1\u5795\u57A7\u57A8\u57A9\u57AC\u57B8\u57BD\u57C7\u57C8\u57CC\u57CF\u57D5\u57DD\u57DE\u57E4\u57E6\u57E7\u57E9\u57ED\u57F0\u57F5\u57F6\u57F8\u57FD\u57FE\u57FF\u5803\u5804\u5808\u5809\u57E1"],["8fb8a1","\u580C\u580D\u581B\u581E\u581F\u5820\u5826\u5827\u582D\u5832\u5839\u583F\u5849\u584C\u584D\u584F\u5850\u5855\u585F\u5861\u5864\u5867\u5868\u5878\u587C\u587F\u5880\u5881\u5887\u5888\u5889\u588A\u588C\u588D\u588F\u5890\u5894\u5896\u589D\u58A0\u58A1\u58A2\u58A6\u58A9\u58B1\u58B2\u58C4\u58BC\u58C2\u58C8\u58CD\u58CE\u58D0\u58D2\u58D4\u58D6\u58DA\u58DD\u58E1\u58E2\u58E9\u58F3\u5905\u5906\u590B\u590C\u5912\u5913\u5914\u8641\u591D\u5921\u5923\u5924\u5928\u592F\u5930\u5933\u5935\u5936\u593F\u5943\u5946\u5952\u5953\u5959\u595B\u595D\u595E\u595F\u5961\u5963\u596B\u596D"],["8fb9a1","\u596F\u5972\u5975\u5976\u5979\u597B\u597C\u598B\u598C\u598E\u5992\u5995\u5997\u599F\u59A4\u59A7\u59AD\u59AE\u59AF\u59B0\u59B3\u59B7\u59BA\u59BC\u59C1\u59C3\u59C4\u59C8\u59CA\u59CD\u59D2\u59DD\u59DE\u59DF\u59E3\u59E4\u59E7\u59EE\u59EF\u59F1\u59F2\u59F4\u59F7\u5A00\u5A04\u5A0C\u5A0D\u5A0E\u5A12\u5A13\u5A1E\u5A23\u5A24\u5A27\u5A28\u5A2A\u5A2D\u5A30\u5A44\u5A45\u5A47\u5A48\u5A4C\u5A50\u5A55\u5A5E\u5A63\u5A65\u5A67\u5A6D\u5A77\u5A7A\u5A7B\u5A7E\u5A8B\u5A90\u5A93\u5A96\u5A99\u5A9C\u5A9E\u5A9F\u5AA0\u5AA2\u5AA7\u5AAC\u5AB1\u5AB2\u5AB3\u5AB5\u5AB8\u5ABA\u5ABB\u5ABF"],["8fbaa1","\u5AC4\u5AC6\u5AC8\u5ACF\u5ADA\u5ADC\u5AE0\u5AE5\u5AEA\u5AEE\u5AF5\u5AF6\u5AFD\u5B00\u5B01\u5B08\u5B17\u5B34\u5B19\u5B1B\u5B1D\u5B21\u5B25\u5B2D\u5B38\u5B41\u5B4B\u5B4C\u5B52\u5B56\u5B5E\u5B68\u5B6E\u5B6F\u5B7C\u5B7D\u5B7E\u5B7F\u5B81\u5B84\u5B86\u5B8A\u5B8E\u5B90\u5B91\u5B93\u5B94\u5B96\u5BA8\u5BA9\u5BAC\u5BAD\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBC\u5BC0\u5BC1\u5BCD\u5BCF\u5BD6",4,"\u5BE0\u5BEF\u5BF1\u5BF4\u5BFD\u5C0C\u5C17\u5C1E\u5C1F\u5C23\u5C26\u5C29\u5C2B\u5C2C\u5C2E\u5C30\u5C32\u5C35\u5C36\u5C59\u5C5A\u5C5C\u5C62\u5C63\u5C67\u5C68\u5C69"],["8fbba1","\u5C6D\u5C70\u5C74\u5C75\u5C7A\u5C7B\u5C7C\u5C7D\u5C87\u5C88\u5C8A\u5C8F\u5C92\u5C9D\u5C9F\u5CA0\u5CA2\u5CA3\u5CA6\u5CAA\u5CB2\u5CB4\u5CB5\u5CBA\u5CC9\u5CCB\u5CD2\u5CDD\u5CD7\u5CEE\u5CF1\u5CF2\u5CF4\u5D01\u5D06\u5D0D\u5D12\u5D2B\u5D23\u5D24\u5D26\u5D27\u5D31\u5D34\u5D39\u5D3D\u5D3F\u5D42\u5D43\u5D46\u5D48\u5D55\u5D51\u5D59\u5D4A\u5D5F\u5D60\u5D61\u5D62\u5D64\u5D6A\u5D6D\u5D70\u5D79\u5D7A\u5D7E\u5D7F\u5D81\u5D83\u5D88\u5D8A\u5D92\u5D93\u5D94\u5D95\u5D99\u5D9B\u5D9F\u5DA0\u5DA7\u5DAB\u5DB0\u5DB4\u5DB8\u5DB9\u5DC3\u5DC7\u5DCB\u5DD0\u5DCE\u5DD8\u5DD9\u5DE0\u5DE4"],["8fbca1","\u5DE9\u5DF8\u5DF9\u5E00\u5E07\u5E0D\u5E12\u5E14\u5E15\u5E18\u5E1F\u5E20\u5E2E\u5E28\u5E32\u5E35\u5E3E\u5E4B\u5E50\u5E49\u5E51\u5E56\u5E58\u5E5B\u5E5C\u5E5E\u5E68\u5E6A",4,"\u5E70\u5E80\u5E8B\u5E8E\u5EA2\u5EA4\u5EA5\u5EA8\u5EAA\u5EAC\u5EB1\u5EB3\u5EBD\u5EBE\u5EBF\u5EC6\u5ECC\u5ECB\u5ECE\u5ED1\u5ED2\u5ED4\u5ED5\u5EDC\u5EDE\u5EE5\u5EEB\u5F02\u5F06\u5F07\u5F08\u5F0E\u5F19\u5F1C\u5F1D\u5F21\u5F22\u5F23\u5F24\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F34\u5F36\u5F3B\u5F3D\u5F3F\u5F40\u5F44\u5F45\u5F47\u5F4D\u5F50\u5F54\u5F58\u5F5B\u5F60\u5F63\u5F64\u5F67"],["8fbda1","\u5F6F\u5F72\u5F74\u5F75\u5F78\u5F7A\u5F7D\u5F7E\u5F89\u5F8D\u5F8F\u5F96\u5F9C\u5F9D\u5FA2\u5FA7\u5FAB\u5FA4\u5FAC\u5FAF\u5FB0\u5FB1\u5FB8\u5FC4\u5FC7\u5FC8\u5FC9\u5FCB\u5FD0",4,"\u5FDE\u5FE1\u5FE2\u5FE8\u5FE9\u5FEA\u5FEC\u5FED\u5FEE\u5FEF\u5FF2\u5FF3\u5FF6\u5FFA\u5FFC\u6007\u600A\u600D\u6013\u6014\u6017\u6018\u601A\u601F\u6024\u602D\u6033\u6035\u6040\u6047\u6048\u6049\u604C\u6051\u6054\u6056\u6057\u605D\u6061\u6067\u6071\u607E\u607F\u6082\u6086\u6088\u608A\u608E\u6091\u6093\u6095\u6098\u609D\u609E\u60A2\u60A4\u60A5\u60A8\u60B0\u60B1\u60B7"],["8fbea1","\u60BB\u60BE\u60C2\u60C4\u60C8\u60C9\u60CA\u60CB\u60CE\u60CF\u60D4\u60D5\u60D9\u60DB\u60DD\u60DE\u60E2\u60E5\u60F2\u60F5\u60F8\u60FC\u60FD\u6102\u6107\u610A\u610C\u6110",4,"\u6116\u6117\u6119\u611C\u611E\u6122\u612A\u612B\u6130\u6131\u6135\u6136\u6137\u6139\u6141\u6145\u6146\u6149\u615E\u6160\u616C\u6172\u6178\u617B\u617C\u617F\u6180\u6181\u6183\u6184\u618B\u618D\u6192\u6193\u6197\u6198\u619C\u619D\u619F\u61A0\u61A5\u61A8\u61AA\u61AD\u61B8\u61B9\u61BC\u61C0\u61C1\u61C2\u61CE\u61CF\u61D5\u61DC\u61DD\u61DE\u61DF\u61E1\u61E2\u61E7\u61E9\u61E5"],["8fbfa1","\u61EC\u61ED\u61EF\u6201\u6203\u6204\u6207\u6213\u6215\u621C\u6220\u6222\u6223\u6227\u6229\u622B\u6239\u623D\u6242\u6243\u6244\u6246\u624C\u6250\u6251\u6252\u6254\u6256\u625A\u625C\u6264\u626D\u626F\u6273\u627A\u627D\u628D\u628E\u628F\u6290\u62A6\u62A8\u62B3\u62B6\u62B7\u62BA\u62BE\u62BF\u62C4\u62CE\u62D5\u62D6\u62DA\u62EA\u62F2\u62F4\u62FC\u62FD\u6303\u6304\u630A\u630B\u630D\u6310\u6313\u6316\u6318\u6329\u632A\u632D\u6335\u6336\u6339\u633C\u6341\u6342\u6343\u6344\u6346\u634A\u634B\u634E\u6352\u6353\u6354\u6358\u635B\u6365\u6366\u636C\u636D\u6371\u6374\u6375"],["8fc0a1","\u6378\u637C\u637D\u637F\u6382\u6384\u6387\u638A\u6390\u6394\u6395\u6399\u639A\u639E\u63A4\u63A6\u63AD\u63AE\u63AF\u63BD\u63C1\u63C5\u63C8\u63CE\u63D1\u63D3\u63D4\u63D5\u63DC\u63E0\u63E5\u63EA\u63EC\u63F2\u63F3\u63F5\u63F8\u63F9\u6409\u640A\u6410\u6412\u6414\u6418\u641E\u6420\u6422\u6424\u6425\u6429\u642A\u642F\u6430\u6435\u643D\u643F\u644B\u644F\u6451\u6452\u6453\u6454\u645A\u645B\u645C\u645D\u645F\u6460\u6461\u6463\u646D\u6473\u6474\u647B\u647D\u6485\u6487\u648F\u6490\u6491\u6498\u6499\u649B\u649D\u649F\u64A1\u64A3\u64A6\u64A8\u64AC\u64B3\u64BD\u64BE\u64BF"],["8fc1a1","\u64C4\u64C9\u64CA\u64CB\u64CC\u64CE\u64D0\u64D1\u64D5\u64D7\u64E4\u64E5\u64E9\u64EA\u64ED\u64F0\u64F5\u64F7\u64FB\u64FF\u6501\u6504\u6508\u6509\u650A\u650F\u6513\u6514\u6516\u6519\u651B\u651E\u651F\u6522\u6526\u6529\u652E\u6531\u653A\u653C\u653D\u6543\u6547\u6549\u6550\u6552\u6554\u655F\u6560\u6567\u656B\u657A\u657D\u6581\u6585\u658A\u6592\u6595\u6598\u659D\u65A0\u65A3\u65A6\u65AE\u65B2\u65B3\u65B4\u65BF\u65C2\u65C8\u65C9\u65CE\u65D0\u65D4\u65D6\u65D8\u65DF\u65F0\u65F2\u65F4\u65F5\u65F9\u65FE\u65FF\u6600\u6604\u6608\u6609\u660D\u6611\u6612\u6615\u6616\u661D"],["8fc2a1","\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6631\u6633\u6639\u6637\u6640\u6645\u6646\u664A\u664C\u6651\u664E\u6657\u6658\u6659\u665B\u665C\u6660\u6661\u66FB\u666A\u666B\u666C\u667E\u6673\u6675\u667F\u6677\u6678\u6679\u667B\u6680\u667C\u668B\u668C\u668D\u6690\u6692\u6699\u669A\u669B\u669C\u669F\u66A0\u66A4\u66AD\u66B1\u66B2\u66B5\u66BB\u66BF\u66C0\u66C2\u66C3\u66C8\u66CC\u66CE\u66CF\u66D4\u66DB\u66DF\u66E8\u66EB\u66EC\u66EE\u66FA\u6705\u6707\u670E\u6713\u6719\u671C\u6720\u6722\u6733\u673E\u6745\u6747\u6748\u674C\u6754\u6755\u675D"],["8fc3a1","\u6766\u676C\u676E\u6774\u6776\u677B\u6781\u6784\u678E\u678F\u6791\u6793\u6796\u6798\u6799\u679B\u67B0\u67B1\u67B2\u67B5\u67BB\u67BC\u67BD\u67F9\u67C0\u67C2\u67C3\u67C5\u67C8\u67C9\u67D2\u67D7\u67D9\u67DC\u67E1\u67E6\u67F0\u67F2\u67F6\u67F7\u6852\u6814\u6819\u681D\u681F\u6828\u6827\u682C\u682D\u682F\u6830\u6831\u6833\u683B\u683F\u6844\u6845\u684A\u684C\u6855\u6857\u6858\u685B\u686B\u686E",4,"\u6875\u6879\u687A\u687B\u687C\u6882\u6884\u6886\u6888\u6896\u6898\u689A\u689C\u68A1\u68A3\u68A5\u68A9\u68AA\u68AE\u68B2\u68BB\u68C5\u68C8\u68CC\u68CF"],["8fc4a1","\u68D0\u68D1\u68D3\u68D6\u68D9\u68DC\u68DD\u68E5\u68E8\u68EA\u68EB\u68EC\u68ED\u68F0\u68F1\u68F5\u68F6\u68FB\u68FC\u68FD\u6906\u6909\u690A\u6910\u6911\u6913\u6916\u6917\u6931\u6933\u6935\u6938\u693B\u6942\u6945\u6949\u694E\u6957\u695B\u6963\u6964\u6965\u6966\u6968\u6969\u696C\u6970\u6971\u6972\u697A\u697B\u697F\u6980\u698D\u6992\u6996\u6998\u69A1\u69A5\u69A6\u69A8\u69AB\u69AD\u69AF\u69B7\u69B8\u69BA\u69BC\u69C5\u69C8\u69D1\u69D6\u69D7\u69E2\u69E5\u69EE\u69EF\u69F1\u69F3\u69F5\u69FE\u6A00\u6A01\u6A03\u6A0F\u6A11\u6A15\u6A1A\u6A1D\u6A20\u6A24\u6A28\u6A30\u6A32"],["8fc5a1","\u6A34\u6A37\u6A3B\u6A3E\u6A3F\u6A45\u6A46\u6A49\u6A4A\u6A4E\u6A50\u6A51\u6A52\u6A55\u6A56\u6A5B\u6A64\u6A67\u6A6A\u6A71\u6A73\u6A7E\u6A81\u6A83\u6A86\u6A87\u6A89\u6A8B\u6A91\u6A9B\u6A9D\u6A9E\u6A9F\u6AA5\u6AAB\u6AAF\u6AB0\u6AB1\u6AB4\u6ABD\u6ABE\u6ABF\u6AC6\u6AC9\u6AC8\u6ACC\u6AD0\u6AD4\u6AD5\u6AD6\u6ADC\u6ADD\u6AE4\u6AE7\u6AEC\u6AF0\u6AF1\u6AF2\u6AFC\u6AFD\u6B02\u6B03\u6B06\u6B07\u6B09\u6B0F\u6B10\u6B11\u6B17\u6B1B\u6B1E\u6B24\u6B28\u6B2B\u6B2C\u6B2F\u6B35\u6B36\u6B3B\u6B3F\u6B46\u6B4A\u6B4D\u6B52\u6B56\u6B58\u6B5D\u6B60\u6B67\u6B6B\u6B6E\u6B70\u6B75\u6B7D"],["8fc6a1","\u6B7E\u6B82\u6B85\u6B97\u6B9B\u6B9F\u6BA0\u6BA2\u6BA3\u6BA8\u6BA9\u6BAC\u6BAD\u6BAE\u6BB0\u6BB8\u6BB9\u6BBD\u6BBE\u6BC3\u6BC4\u6BC9\u6BCC\u6BD6\u6BDA\u6BE1\u6BE3\u6BE6\u6BE7\u6BEE\u6BF1\u6BF7\u6BF9\u6BFF\u6C02\u6C04\u6C05\u6C09\u6C0D\u6C0E\u6C10\u6C12\u6C19\u6C1F\u6C26\u6C27\u6C28\u6C2C\u6C2E\u6C33\u6C35\u6C36\u6C3A\u6C3B\u6C3F\u6C4A\u6C4B\u6C4D\u6C4F\u6C52\u6C54\u6C59\u6C5B\u6C5C\u6C6B\u6C6D\u6C6F\u6C74\u6C76\u6C78\u6C79\u6C7B\u6C85\u6C86\u6C87\u6C89\u6C94\u6C95\u6C97\u6C98\u6C9C\u6C9F\u6CB0\u6CB2\u6CB4\u6CC2\u6CC6\u6CCD\u6CCF\u6CD0\u6CD1\u6CD2\u6CD4\u6CD6"],["8fc7a1","\u6CDA\u6CDC\u6CE0\u6CE7\u6CE9\u6CEB\u6CEC\u6CEE\u6CF2\u6CF4\u6D04\u6D07\u6D0A\u6D0E\u6D0F\u6D11\u6D13\u6D1A\u6D26\u6D27\u6D28\u6C67\u6D2E\u6D2F\u6D31\u6D39\u6D3C\u6D3F\u6D57\u6D5E\u6D5F\u6D61\u6D65\u6D67\u6D6F\u6D70\u6D7C\u6D82\u6D87\u6D91\u6D92\u6D94\u6D96\u6D97\u6D98\u6DAA\u6DAC\u6DB4\u6DB7\u6DB9\u6DBD\u6DBF\u6DC4\u6DC8\u6DCA\u6DCE\u6DCF\u6DD6\u6DDB\u6DDD\u6DDF\u6DE0\u6DE2\u6DE5\u6DE9\u6DEF\u6DF0\u6DF4\u6DF6\u6DFC\u6E00\u6E04\u6E1E\u6E22\u6E27\u6E32\u6E36\u6E39\u6E3B\u6E3C\u6E44\u6E45\u6E48\u6E49\u6E4B\u6E4F\u6E51\u6E52\u6E53\u6E54\u6E57\u6E5C\u6E5D\u6E5E"],["8fc8a1","\u6E62\u6E63\u6E68\u6E73\u6E7B\u6E7D\u6E8D\u6E93\u6E99\u6EA0\u6EA7\u6EAD\u6EAE\u6EB1\u6EB3\u6EBB\u6EBF\u6EC0\u6EC1\u6EC3\u6EC7\u6EC8\u6ECA\u6ECD\u6ECE\u6ECF\u6EEB\u6EED\u6EEE\u6EF9\u6EFB\u6EFD\u6F04\u6F08\u6F0A\u6F0C\u6F0D\u6F16\u6F18\u6F1A\u6F1B\u6F26\u6F29\u6F2A\u6F2F\u6F30\u6F33\u6F36\u6F3B\u6F3C\u6F2D\u6F4F\u6F51\u6F52\u6F53\u6F57\u6F59\u6F5A\u6F5D\u6F5E\u6F61\u6F62\u6F68\u6F6C\u6F7D\u6F7E\u6F83\u6F87\u6F88\u6F8B\u6F8C\u6F8D\u6F90\u6F92\u6F93\u6F94\u6F96\u6F9A\u6F9F\u6FA0\u6FA5\u6FA6\u6FA7\u6FA8\u6FAE\u6FAF\u6FB0\u6FB5\u6FB6\u6FBC\u6FC5\u6FC7\u6FC8\u6FCA"],["8fc9a1","\u6FDA\u6FDE\u6FE8\u6FE9\u6FF0\u6FF5\u6FF9\u6FFC\u6FFD\u7000\u7005\u7006\u7007\u700D\u7017\u7020\u7023\u702F\u7034\u7037\u7039\u703C\u7043\u7044\u7048\u7049\u704A\u704B\u7054\u7055\u705D\u705E\u704E\u7064\u7065\u706C\u706E\u7075\u7076\u707E\u7081\u7085\u7086\u7094",4,"\u709B\u70A4\u70AB\u70B0\u70B1\u70B4\u70B7\u70CA\u70D1\u70D3\u70D4\u70D5\u70D6\u70D8\u70DC\u70E4\u70FA\u7103",4,"\u710B\u710C\u710F\u711E\u7120\u712B\u712D\u712F\u7130\u7131\u7138\u7141\u7145\u7146\u7147\u714A\u714B\u7150\u7152\u7157\u715A\u715C\u715E\u7160"],["8fcaa1","\u7168\u7179\u7180\u7185\u7187\u718C\u7192\u719A\u719B\u71A0\u71A2\u71AF\u71B0\u71B2\u71B3\u71BA\u71BF\u71C0\u71C1\u71C4\u71CB\u71CC\u71D3\u71D6\u71D9\u71DA\u71DC\u71F8\u71FE\u7200\u7207\u7208\u7209\u7213\u7217\u721A\u721D\u721F\u7224\u722B\u722F\u7234\u7238\u7239\u7241\u7242\u7243\u7245\u724E\u724F\u7250\u7253\u7255\u7256\u725A\u725C\u725E\u7260\u7263\u7268\u726B\u726E\u726F\u7271\u7277\u7278\u727B\u727C\u727F\u7284\u7289\u728D\u728E\u7293\u729B\u72A8\u72AD\u72AE\u72B1\u72B4\u72BE\u72C1\u72C7\u72C9\u72CC\u72D5\u72D6\u72D8\u72DF\u72E5\u72F3\u72F4\u72FA\u72FB"],["8fcba1","\u72FE\u7302\u7304\u7305\u7307\u730B\u730D\u7312\u7313\u7318\u7319\u731E\u7322\u7324\u7327\u7328\u732C\u7331\u7332\u7335\u733A\u733B\u733D\u7343\u734D\u7350\u7352\u7356\u7358\u735D\u735E\u735F\u7360\u7366\u7367\u7369\u736B\u736C\u736E\u736F\u7371\u7377\u7379\u737C\u7380\u7381\u7383\u7385\u7386\u738E\u7390\u7393\u7395\u7397\u7398\u739C\u739E\u739F\u73A0\u73A2\u73A5\u73A6\u73AA\u73AB\u73AD\u73B5\u73B7\u73B9\u73BC\u73BD\u73BF\u73C5\u73C6\u73C9\u73CB\u73CC\u73CF\u73D2\u73D3\u73D6\u73D9\u73DD\u73E1\u73E3\u73E6\u73E7\u73E9\u73F4\u73F5\u73F7\u73F9\u73FA\u73FB\u73FD"],["8fcca1","\u73FF\u7400\u7401\u7404\u7407\u740A\u7411\u741A\u741B\u7424\u7426\u7428",9,"\u7439\u7440\u7443\u7444\u7446\u7447\u744B\u744D\u7451\u7452\u7457\u745D\u7462\u7466\u7467\u7468\u746B\u746D\u746E\u7471\u7472\u7480\u7481\u7485\u7486\u7487\u7489\u748F\u7490\u7491\u7492\u7498\u7499\u749A\u749C\u749F\u74A0\u74A1\u74A3\u74A6\u74A8\u74A9\u74AA\u74AB\u74AE\u74AF\u74B1\u74B2\u74B5\u74B9\u74BB\u74BF\u74C8\u74C9\u74CC\u74D0\u74D3\u74D8\u74DA\u74DB\u74DE\u74DF\u74E4\u74E8\u74EA\u74EB\u74EF\u74F4\u74FA\u74FB\u74FC\u74FF\u7506"],["8fcda1","\u7512\u7516\u7517\u7520\u7521\u7524\u7527\u7529\u752A\u752F\u7536\u7539\u753D\u753E\u753F\u7540\u7543\u7547\u7548\u754E\u7550\u7552\u7557\u755E\u755F\u7561\u756F\u7571\u7579",5,"\u7581\u7585\u7590\u7592\u7593\u7595\u7599\u759C\u75A2\u75A4\u75B4\u75BA\u75BF\u75C0\u75C1\u75C4\u75C6\u75CC\u75CE\u75CF\u75D7\u75DC\u75DF\u75E0\u75E1\u75E4\u75E7\u75EC\u75EE\u75EF\u75F1\u75F9\u7600\u7602\u7603\u7604\u7607\u7608\u760A\u760C\u760F\u7612\u7613\u7615\u7616\u7619\u761B\u761C\u761D\u761E\u7623\u7625\u7626\u7629\u762D\u7632\u7633\u7635\u7638\u7639"],["8fcea1","\u763A\u763C\u764A\u7640\u7641\u7643\u7644\u7645\u7649\u764B\u7655\u7659\u765F\u7664\u7665\u766D\u766E\u766F\u7671\u7674\u7681\u7685\u768C\u768D\u7695\u769B\u769C\u769D\u769F\u76A0\u76A2",6,"\u76AA\u76AD\u76BD\u76C1\u76C5\u76C9\u76CB\u76CC\u76CE\u76D4\u76D9\u76E0\u76E6\u76E8\u76EC\u76F0\u76F1\u76F6\u76F9\u76FC\u7700\u7706\u770A\u770E\u7712\u7714\u7715\u7717\u7719\u771A\u771C\u7722\u7728\u772D\u772E\u772F\u7734\u7735\u7736\u7739\u773D\u773E\u7742\u7745\u7746\u774A\u774D\u774E\u774F\u7752\u7756\u7757\u775C\u775E\u775F\u7760\u7762"],["8fcfa1","\u7764\u7767\u776A\u776C\u7770\u7772\u7773\u7774\u777A\u777D\u7780\u7784\u778C\u778D\u7794\u7795\u7796\u779A\u779F\u77A2\u77A7\u77AA\u77AE\u77AF\u77B1\u77B5\u77BE\u77C3\u77C9\u77D1\u77D2\u77D5\u77D9\u77DE\u77DF\u77E0\u77E4\u77E6\u77EA\u77EC\u77F0\u77F1\u77F4\u77F8\u77FB\u7805\u7806\u7809\u780D\u780E\u7811\u781D\u7821\u7822\u7823\u782D\u782E\u7830\u7835\u7837\u7843\u7844\u7847\u7848\u784C\u784E\u7852\u785C\u785E\u7860\u7861\u7863\u7864\u7868\u786A\u786E\u787A\u787E\u788A\u788F\u7894\u7898\u78A1\u789D\u789E\u789F\u78A4\u78A8\u78AC\u78AD\u78B0\u78B1\u78B2\u78B3"],["8fd0a1","\u78BB\u78BD\u78BF\u78C7\u78C8\u78C9\u78CC\u78CE\u78D2\u78D3\u78D5\u78D6\u78E4\u78DB\u78DF\u78E0\u78E1\u78E6\u78EA\u78F2\u78F3\u7900\u78F6\u78F7\u78FA\u78FB\u78FF\u7906\u790C\u7910\u791A\u791C\u791E\u791F\u7920\u7925\u7927\u7929\u792D\u7931\u7934\u7935\u793B\u793D\u793F\u7944\u7945\u7946\u794A\u794B\u794F\u7951\u7954\u7958\u795B\u795C\u7967\u7969\u796B\u7972\u7979\u797B\u797C\u797E\u798B\u798C\u7991\u7993\u7994\u7995\u7996\u7998\u799B\u799C\u79A1\u79A8\u79A9\u79AB\u79AF\u79B1\u79B4\u79B8\u79BB\u79C2\u79C4\u79C7\u79C8\u79CA\u79CF\u79D4\u79D6\u79DA\u79DD\u79DE"],["8fd1a1","\u79E0\u79E2\u79E5\u79EA\u79EB\u79ED\u79F1\u79F8\u79FC\u7A02\u7A03\u7A07\u7A09\u7A0A\u7A0C\u7A11\u7A15\u7A1B\u7A1E\u7A21\u7A27\u7A2B\u7A2D\u7A2F\u7A30\u7A34\u7A35\u7A38\u7A39\u7A3A\u7A44\u7A45\u7A47\u7A48\u7A4C\u7A55\u7A56\u7A59\u7A5C\u7A5D\u7A5F\u7A60\u7A65\u7A67\u7A6A\u7A6D\u7A75\u7A78\u7A7E\u7A80\u7A82\u7A85\u7A86\u7A8A\u7A8B\u7A90\u7A91\u7A94\u7A9E\u7AA0\u7AA3\u7AAC\u7AB3\u7AB5\u7AB9\u7ABB\u7ABC\u7AC6\u7AC9\u7ACC\u7ACE\u7AD1\u7ADB\u7AE8\u7AE9\u7AEB\u7AEC\u7AF1\u7AF4\u7AFB\u7AFD\u7AFE\u7B07\u7B14\u7B1F\u7B23\u7B27\u7B29\u7B2A\u7B2B\u7B2D\u7B2E\u7B2F\u7B30"],["8fd2a1","\u7B31\u7B34\u7B3D\u7B3F\u7B40\u7B41\u7B47\u7B4E\u7B55\u7B60\u7B64\u7B66\u7B69\u7B6A\u7B6D\u7B6F\u7B72\u7B73\u7B77\u7B84\u7B89\u7B8E\u7B90\u7B91\u7B96\u7B9B\u7B9E\u7BA0\u7BA5\u7BAC\u7BAF\u7BB0\u7BB2\u7BB5\u7BB6\u7BBA\u7BBB\u7BBC\u7BBD\u7BC2\u7BC5\u7BC8\u7BCA\u7BD4\u7BD6\u7BD7\u7BD9\u7BDA\u7BDB\u7BE8\u7BEA\u7BF2\u7BF4\u7BF5\u7BF8\u7BF9\u7BFA\u7BFC\u7BFE\u7C01\u7C02\u7C03\u7C04\u7C06\u7C09\u7C0B\u7C0C\u7C0E\u7C0F\u7C19\u7C1B\u7C20\u7C25\u7C26\u7C28\u7C2C\u7C31\u7C33\u7C34\u7C36\u7C39\u7C3A\u7C46\u7C4A\u7C55\u7C51\u7C52\u7C53\u7C59",5],["8fd3a1","\u7C61\u7C63\u7C67\u7C69\u7C6D\u7C6E\u7C70\u7C72\u7C79\u7C7C\u7C7D\u7C86\u7C87\u7C8F\u7C94\u7C9E\u7CA0\u7CA6\u7CB0\u7CB6\u7CB7\u7CBA\u7CBB\u7CBC\u7CBF\u7CC4\u7CC7\u7CC8\u7CC9\u7CCD\u7CCF\u7CD3\u7CD4\u7CD5\u7CD7\u7CD9\u7CDA\u7CDD\u7CE6\u7CE9\u7CEB\u7CF5\u7D03\u7D07\u7D08\u7D09\u7D0F\u7D11\u7D12\u7D13\u7D16\u7D1D\u7D1E\u7D23\u7D26\u7D2A\u7D2D\u7D31\u7D3C\u7D3D\u7D3E\u7D40\u7D41\u7D47\u7D48\u7D4D\u7D51\u7D53\u7D57\u7D59\u7D5A\u7D5C\u7D5D\u7D65\u7D67\u7D6A\u7D70\u7D78\u7D7A\u7D7B\u7D7F\u7D81\u7D82\u7D83\u7D85\u7D86\u7D88\u7D8B\u7D8C\u7D8D\u7D91\u7D96\u7D97\u7D9D"],["8fd4a1","\u7D9E\u7DA6\u7DA7\u7DAA\u7DB3\u7DB6\u7DB7\u7DB9\u7DC2",4,"\u7DCC\u7DCD\u7DCE\u7DD7\u7DD9\u7E00\u7DE2\u7DE5\u7DE6\u7DEA\u7DEB\u7DED\u7DF1\u7DF5\u7DF6\u7DF9\u7DFA\u7E08\u7E10\u7E11\u7E15\u7E17\u7E1C\u7E1D\u7E20\u7E27\u7E28\u7E2C\u7E2D\u7E2F\u7E33\u7E36\u7E3F\u7E44\u7E45\u7E47\u7E4E\u7E50\u7E52\u7E58\u7E5F\u7E61\u7E62\u7E65\u7E6B\u7E6E\u7E6F\u7E73\u7E78\u7E7E\u7E81\u7E86\u7E87\u7E8A\u7E8D\u7E91\u7E95\u7E98\u7E9A\u7E9D\u7E9E\u7F3C\u7F3B\u7F3D\u7F3E\u7F3F\u7F43\u7F44\u7F47\u7F4F\u7F52\u7F53\u7F5B\u7F5C\u7F5D\u7F61\u7F63\u7F64\u7F65\u7F66\u7F6D"],["8fd5a1","\u7F71\u7F7D\u7F7E\u7F7F\u7F80\u7F8B\u7F8D\u7F8F\u7F90\u7F91\u7F96\u7F97\u7F9C\u7FA1\u7FA2\u7FA6\u7FAA\u7FAD\u7FB4\u7FBC\u7FBF\u7FC0\u7FC3\u7FC8\u7FCE\u7FCF\u7FDB\u7FDF\u7FE3\u7FE5\u7FE8\u7FEC\u7FEE\u7FEF\u7FF2\u7FFA\u7FFD\u7FFE\u7FFF\u8007\u8008\u800A\u800D\u800E\u800F\u8011\u8013\u8014\u8016\u801D\u801E\u801F\u8020\u8024\u8026\u802C\u802E\u8030\u8034\u8035\u8037\u8039\u803A\u803C\u803E\u8040\u8044\u8060\u8064\u8066\u806D\u8071\u8075\u8081\u8088\u808E\u809C\u809E\u80A6\u80A7\u80AB\u80B8\u80B9\u80C8\u80CD\u80CF\u80D2\u80D4\u80D5\u80D7\u80D8\u80E0\u80ED\u80EE"],["8fd6a1","\u80F0\u80F2\u80F3\u80F6\u80F9\u80FA\u80FE\u8103\u810B\u8116\u8117\u8118\u811C\u811E\u8120\u8124\u8127\u812C\u8130\u8135\u813A\u813C\u8145\u8147\u814A\u814C\u8152\u8157\u8160\u8161\u8167\u8168\u8169\u816D\u816F\u8177\u8181\u8190\u8184\u8185\u8186\u818B\u818E\u8196\u8198\u819B\u819E\u81A2\u81AE\u81B2\u81B4\u81BB\u81CB\u81C3\u81C5\u81CA\u81CE\u81CF\u81D5\u81D7\u81DB\u81DD\u81DE\u81E1\u81E4\u81EB\u81EC\u81F0\u81F1\u81F2\u81F5\u81F6\u81F8\u81F9\u81FD\u81FF\u8200\u8203\u820F\u8213\u8214\u8219\u821A\u821D\u8221\u8222\u8228\u8232\u8234\u823A\u8243\u8244\u8245\u8246"],["8fd7a1","\u824B\u824E\u824F\u8251\u8256\u825C\u8260\u8263\u8267\u826D\u8274\u827B\u827D\u827F\u8280\u8281\u8283\u8284\u8287\u8289\u828A\u828E\u8291\u8294\u8296\u8298\u829A\u829B\u82A0\u82A1\u82A3\u82A4\u82A7\u82A8\u82A9\u82AA\u82AE\u82B0\u82B2\u82B4\u82B7\u82BA\u82BC\u82BE\u82BF\u82C6\u82D0\u82D5\u82DA\u82E0\u82E2\u82E4\u82E8\u82EA\u82ED\u82EF\u82F6\u82F7\u82FD\u82FE\u8300\u8301\u8307\u8308\u830A\u830B\u8354\u831B\u831D\u831E\u831F\u8321\u8322\u832C\u832D\u832E\u8330\u8333\u8337\u833A\u833C\u833D\u8342\u8343\u8344\u8347\u834D\u834E\u8351\u8355\u8356\u8357\u8370\u8378"],["8fd8a1","\u837D\u837F\u8380\u8382\u8384\u8386\u838D\u8392\u8394\u8395\u8398\u8399\u839B\u839C\u839D\u83A6\u83A7\u83A9\u83AC\u83BE\u83BF\u83C0\u83C7\u83C9\u83CF\u83D0\u83D1\u83D4\u83DD\u8353\u83E8\u83EA\u83F6\u83F8\u83F9\u83FC\u8401\u8406\u840A\u840F\u8411\u8415\u8419\u83AD\u842F\u8439\u8445\u8447\u8448\u844A\u844D\u844F\u8451\u8452\u8456\u8458\u8459\u845A\u845C\u8460\u8464\u8465\u8467\u846A\u8470\u8473\u8474\u8476\u8478\u847C\u847D\u8481\u8485\u8492\u8493\u8495\u849E\u84A6\u84A8\u84A9\u84AA\u84AF\u84B1\u84B4\u84BA\u84BD\u84BE\u84C0\u84C2\u84C7\u84C8\u84CC\u84CF\u84D3"],["8fd9a1","\u84DC\u84E7\u84EA\u84EF\u84F0\u84F1\u84F2\u84F7\u8532\u84FA\u84FB\u84FD\u8502\u8503\u8507\u850C\u850E\u8510\u851C\u851E\u8522\u8523\u8524\u8525\u8527\u852A\u852B\u852F\u8533\u8534\u8536\u853F\u8546\u854F",4,"\u8556\u8559\u855C",6,"\u8564\u856B\u856F\u8579\u857A\u857B\u857D\u857F\u8581\u8585\u8586\u8589\u858B\u858C\u858F\u8593\u8598\u859D\u859F\u85A0\u85A2\u85A5\u85A7\u85B4\u85B6\u85B7\u85B8\u85BC\u85BD\u85BE\u85BF\u85C2\u85C7\u85CA\u85CB\u85CE\u85AD\u85D8\u85DA\u85DF\u85E0\u85E6\u85E8\u85ED\u85F3\u85F6\u85FC"],["8fdaa1","\u85FF\u8600\u8604\u8605\u860D\u860E\u8610\u8611\u8612\u8618\u8619\u861B\u861E\u8621\u8627\u8629\u8636\u8638\u863A\u863C\u863D\u8640\u8642\u8646\u8652\u8653\u8656\u8657\u8658\u8659\u865D\u8660",4,"\u8669\u866C\u866F\u8675\u8676\u8677\u867A\u868D\u8691\u8696\u8698\u869A\u869C\u86A1\u86A6\u86A7\u86A8\u86AD\u86B1\u86B3\u86B4\u86B5\u86B7\u86B8\u86B9\u86BF\u86C0\u86C1\u86C3\u86C5\u86D1\u86D2\u86D5\u86D7\u86DA\u86DC\u86E0\u86E3\u86E5\u86E7\u8688\u86FA\u86FC\u86FD\u8704\u8705\u8707\u870B\u870E\u870F\u8710\u8713\u8714\u8719\u871E\u871F\u8721\u8723"],["8fdba1","\u8728\u872E\u872F\u8731\u8732\u8739\u873A\u873C\u873D\u873E\u8740\u8743\u8745\u874D\u8758\u875D\u8761\u8764\u8765\u876F\u8771\u8772\u877B\u8783",6,"\u878B\u878C\u8790\u8793\u8795\u8797\u8798\u8799\u879E\u87A0\u87A3\u87A7\u87AC\u87AD\u87AE\u87B1\u87B5\u87BE\u87BF\u87C1\u87C8\u87C9\u87CA\u87CE\u87D5\u87D6\u87D9\u87DA\u87DC\u87DF\u87E2\u87E3\u87E4\u87EA\u87EB\u87ED\u87F1\u87F3\u87F8\u87FA\u87FF\u8801\u8803\u8806\u8809\u880A\u880B\u8810\u8819\u8812\u8813\u8814\u8818\u881A\u881B\u881C\u881E\u881F\u8828\u882D\u882E\u8830\u8832\u8835"],["8fdca1","\u883A\u883C\u8841\u8843\u8845\u8848\u8849\u884A\u884B\u884E\u8851\u8855\u8856\u8858\u885A\u885C\u885F\u8860\u8864\u8869\u8871\u8879\u887B\u8880\u8898\u889A\u889B\u889C\u889F\u88A0\u88A8\u88AA\u88BA\u88BD\u88BE\u88C0\u88CA",4,"\u88D1\u88D2\u88D3\u88DB\u88DE\u88E7\u88EF\u88F0\u88F1\u88F5\u88F7\u8901\u8906\u890D\u890E\u890F\u8915\u8916\u8918\u8919\u891A\u891C\u8920\u8926\u8927\u8928\u8930\u8931\u8932\u8935\u8939\u893A\u893E\u8940\u8942\u8945\u8946\u8949\u894F\u8952\u8957\u895A\u895B\u895C\u8961\u8962\u8963\u896B\u896E\u8970\u8973\u8975\u897A"],["8fdda1","\u897B\u897C\u897D\u8989\u898D\u8990\u8994\u8995\u899B\u899C\u899F\u89A0\u89A5\u89B0\u89B4\u89B5\u89B6\u89B7\u89BC\u89D4",4,"\u89E5\u89E9\u89EB\u89ED\u89F1\u89F3\u89F6\u89F9\u89FD\u89FF\u8A04\u8A05\u8A07\u8A0F\u8A11\u8A12\u8A14\u8A15\u8A1E\u8A20\u8A22\u8A24\u8A26\u8A2B\u8A2C\u8A2F\u8A35\u8A37\u8A3D\u8A3E\u8A40\u8A43\u8A45\u8A47\u8A49\u8A4D\u8A4E\u8A53\u8A56\u8A57\u8A58\u8A5C\u8A5D\u8A61\u8A65\u8A67\u8A75\u8A76\u8A77\u8A79\u8A7A\u8A7B\u8A7E\u8A7F\u8A80\u8A83\u8A86\u8A8B\u8A8F\u8A90\u8A92\u8A96\u8A97\u8A99\u8A9F\u8AA7\u8AA9\u8AAE\u8AAF\u8AB3"],["8fdea1","\u8AB6\u8AB7\u8ABB\u8ABE\u8AC3\u8AC6\u8AC8\u8AC9\u8ACA\u8AD1\u8AD3\u8AD4\u8AD5\u8AD7\u8ADD\u8ADF\u8AEC\u8AF0\u8AF4\u8AF5\u8AF6\u8AFC\u8AFF\u8B05\u8B06\u8B0B\u8B11\u8B1C\u8B1E\u8B1F\u8B0A\u8B2D\u8B30\u8B37\u8B3C\u8B42",4,"\u8B48\u8B52\u8B53\u8B54\u8B59\u8B4D\u8B5E\u8B63\u8B6D\u8B76\u8B78\u8B79\u8B7C\u8B7E\u8B81\u8B84\u8B85\u8B8B\u8B8D\u8B8F\u8B94\u8B95\u8B9C\u8B9E\u8B9F\u8C38\u8C39\u8C3D\u8C3E\u8C45\u8C47\u8C49\u8C4B\u8C4F\u8C51\u8C53\u8C54\u8C57\u8C58\u8C5B\u8C5D\u8C59\u8C63\u8C64\u8C66\u8C68\u8C69\u8C6D\u8C73\u8C75\u8C76\u8C7B\u8C7E\u8C86"],["8fdfa1","\u8C87\u8C8B\u8C90\u8C92\u8C93\u8C99\u8C9B\u8C9C\u8CA4\u8CB9\u8CBA\u8CC5\u8CC6\u8CC9\u8CCB\u8CCF\u8CD6\u8CD5\u8CD9\u8CDD\u8CE1\u8CE8\u8CEC\u8CEF\u8CF0\u8CF2\u8CF5\u8CF7\u8CF8\u8CFE\u8CFF\u8D01\u8D03\u8D09\u8D12\u8D17\u8D1B\u8D65\u8D69\u8D6C\u8D6E\u8D7F\u8D82\u8D84\u8D88\u8D8D\u8D90\u8D91\u8D95\u8D9E\u8D9F\u8DA0\u8DA6\u8DAB\u8DAC\u8DAF\u8DB2\u8DB5\u8DB7\u8DB9\u8DBB\u8DC0\u8DC5\u8DC6\u8DC7\u8DC8\u8DCA\u8DCE\u8DD1\u8DD4\u8DD5\u8DD7\u8DD9\u8DE4\u8DE5\u8DE7\u8DEC\u8DF0\u8DBC\u8DF1\u8DF2\u8DF4\u8DFD\u8E01\u8E04\u8E05\u8E06\u8E0B\u8E11\u8E14\u8E16\u8E20\u8E21\u8E22"],["8fe0a1","\u8E23\u8E26\u8E27\u8E31\u8E33\u8E36\u8E37\u8E38\u8E39\u8E3D\u8E40\u8E41\u8E4B\u8E4D\u8E4E\u8E4F\u8E54\u8E5B\u8E5C\u8E5D\u8E5E\u8E61\u8E62\u8E69\u8E6C\u8E6D\u8E6F\u8E70\u8E71\u8E79\u8E7A\u8E7B\u8E82\u8E83\u8E89\u8E90\u8E92\u8E95\u8E9A\u8E9B\u8E9D\u8E9E\u8EA2\u8EA7\u8EA9\u8EAD\u8EAE\u8EB3\u8EB5\u8EBA\u8EBB\u8EC0\u8EC1\u8EC3\u8EC4\u8EC7\u8ECF\u8ED1\u8ED4\u8EDC\u8EE8\u8EEE\u8EF0\u8EF1\u8EF7\u8EF9\u8EFA\u8EED\u8F00\u8F02\u8F07\u8F08\u8F0F\u8F10\u8F16\u8F17\u8F18\u8F1E\u8F20\u8F21\u8F23\u8F25\u8F27\u8F28\u8F2C\u8F2D\u8F2E\u8F34\u8F35\u8F36\u8F37\u8F3A\u8F40\u8F41"],["8fe1a1","\u8F43\u8F47\u8F4F\u8F51",4,"\u8F58\u8F5D\u8F5E\u8F65\u8F9D\u8FA0\u8FA1\u8FA4\u8FA5\u8FA6\u8FB5\u8FB6\u8FB8\u8FBE\u8FC0\u8FC1\u8FC6\u8FCA\u8FCB\u8FCD\u8FD0\u8FD2\u8FD3\u8FD5\u8FE0\u8FE3\u8FE4\u8FE8\u8FEE\u8FF1\u8FF5\u8FF6\u8FFB\u8FFE\u9002\u9004\u9008\u900C\u9018\u901B\u9028\u9029\u902F\u902A\u902C\u902D\u9033\u9034\u9037\u903F\u9043\u9044\u904C\u905B\u905D\u9062\u9066\u9067\u906C\u9070\u9074\u9079\u9085\u9088\u908B\u908C\u908E\u9090\u9095\u9097\u9098\u9099\u909B\u90A0\u90A1\u90A2\u90A5\u90B0\u90B2\u90B3\u90B4\u90B6\u90BD\u90CC\u90BE\u90C3"],["8fe2a1","\u90C4\u90C5\u90C7\u90C8\u90D5\u90D7\u90D8\u90D9\u90DC\u90DD\u90DF\u90E5\u90D2\u90F6\u90EB\u90EF\u90F0\u90F4\u90FE\u90FF\u9100\u9104\u9105\u9106\u9108\u910D\u9110\u9114\u9116\u9117\u9118\u911A\u911C\u911E\u9120\u9125\u9122\u9123\u9127\u9129\u912E\u912F\u9131\u9134\u9136\u9137\u9139\u913A\u913C\u913D\u9143\u9147\u9148\u914F\u9153\u9157\u9159\u915A\u915B\u9161\u9164\u9167\u916D\u9174\u9179\u917A\u917B\u9181\u9183\u9185\u9186\u918A\u918E\u9191\u9193\u9194\u9195\u9198\u919E\u91A1\u91A6\u91A8\u91AC\u91AD\u91AE\u91B0\u91B1\u91B2\u91B3\u91B6\u91BB\u91BC\u91BD\u91BF"],["8fe3a1","\u91C2\u91C3\u91C5\u91D3\u91D4\u91D7\u91D9\u91DA\u91DE\u91E4\u91E5\u91E9\u91EA\u91EC",5,"\u91F7\u91F9\u91FB\u91FD\u9200\u9201\u9204\u9205\u9206\u9207\u9209\u920A\u920C\u9210\u9212\u9213\u9216\u9218\u921C\u921D\u9223\u9224\u9225\u9226\u9228\u922E\u922F\u9230\u9233\u9235\u9236\u9238\u9239\u923A\u923C\u923E\u9240\u9242\u9243\u9246\u9247\u924A\u924D\u924E\u924F\u9251\u9258\u9259\u925C\u925D\u9260\u9261\u9265\u9267\u9268\u9269\u926E\u926F\u9270\u9275",4,"\u927B\u927C\u927D\u927F\u9288\u9289\u928A\u928D\u928E\u9292\u9297"],["8fe4a1","\u9299\u929F\u92A0\u92A4\u92A5\u92A7\u92A8\u92AB\u92AF\u92B2\u92B6\u92B8\u92BA\u92BB\u92BC\u92BD\u92BF",4,"\u92C5\u92C6\u92C7\u92C8\u92CB\u92CC\u92CD\u92CE\u92D0\u92D3\u92D5\u92D7\u92D8\u92D9\u92DC\u92DD\u92DF\u92E0\u92E1\u92E3\u92E5\u92E7\u92E8\u92EC\u92EE\u92F0\u92F9\u92FB\u92FF\u9300\u9302\u9308\u930D\u9311\u9314\u9315\u931C\u931D\u931E\u931F\u9321\u9324\u9325\u9327\u9329\u932A\u9333\u9334\u9336\u9337\u9347\u9348\u9349\u9350\u9351\u9352\u9355\u9357\u9358\u935A\u935E\u9364\u9365\u9367\u9369\u936A\u936D\u936F\u9370\u9371\u9373\u9374\u9376"],["8fe5a1","\u937A\u937D\u937F\u9380\u9381\u9382\u9388\u938A\u938B\u938D\u938F\u9392\u9395\u9398\u939B\u939E\u93A1\u93A3\u93A4\u93A6\u93A8\u93AB\u93B4\u93B5\u93B6\u93BA\u93A9\u93C1\u93C4\u93C5\u93C6\u93C7\u93C9",4,"\u93D3\u93D9\u93DC\u93DE\u93DF\u93E2\u93E6\u93E7\u93F9\u93F7\u93F8\u93FA\u93FB\u93FD\u9401\u9402\u9404\u9408\u9409\u940D\u940E\u940F\u9415\u9416\u9417\u941F\u942E\u942F\u9431\u9432\u9433\u9434\u943B\u943F\u943D\u9443\u9445\u9448\u944A\u944C\u9455\u9459\u945C\u945F\u9461\u9463\u9468\u946B\u946D\u946E\u946F\u9471\u9472\u9484\u9483\u9578\u9579"],["8fe6a1","\u957E\u9584\u9588\u958C\u958D\u958E\u959D\u959E\u959F\u95A1\u95A6\u95A9\u95AB\u95AC\u95B4\u95B6\u95BA\u95BD\u95BF\u95C6\u95C8\u95C9\u95CB\u95D0\u95D1\u95D2\u95D3\u95D9\u95DA\u95DD\u95DE\u95DF\u95E0\u95E4\u95E6\u961D\u961E\u9622\u9624\u9625\u9626\u962C\u9631\u9633\u9637\u9638\u9639\u963A\u963C\u963D\u9641\u9652\u9654\u9656\u9657\u9658\u9661\u966E\u9674\u967B\u967C\u967E\u967F\u9681\u9682\u9683\u9684\u9689\u9691\u9696\u969A\u969D\u969F\u96A4\u96A5\u96A6\u96A9\u96AE\u96AF\u96B3\u96BA\u96CA\u96D2\u5DB2\u96D8\u96DA\u96DD\u96DE\u96DF\u96E9\u96EF\u96F1\u96FA\u9702"],["8fe7a1","\u9703\u9705\u9709\u971A\u971B\u971D\u9721\u9722\u9723\u9728\u9731\u9733\u9741\u9743\u974A\u974E\u974F\u9755\u9757\u9758\u975A\u975B\u9763\u9767\u976A\u976E\u9773\u9776\u9777\u9778\u977B\u977D\u977F\u9780\u9789\u9795\u9796\u9797\u9799\u979A\u979E\u979F\u97A2\u97AC\u97AE\u97B1\u97B2\u97B5\u97B6\u97B8\u97B9\u97BA\u97BC\u97BE\u97BF\u97C1\u97C4\u97C5\u97C7\u97C9\u97CA\u97CC\u97CD\u97CE\u97D0\u97D1\u97D4\u97D7\u97D8\u97D9\u97DD\u97DE\u97E0\u97DB\u97E1\u97E4\u97EF\u97F1\u97F4\u97F7\u97F8\u97FA\u9807\u980A\u9819\u980D\u980E\u9814\u9816\u981C\u981E\u9820\u9823\u9826"],["8fe8a1","\u982B\u982E\u982F\u9830\u9832\u9833\u9835\u9825\u983E\u9844\u9847\u984A\u9851\u9852\u9853\u9856\u9857\u9859\u985A\u9862\u9863\u9865\u9866\u986A\u986C\u98AB\u98AD\u98AE\u98B0\u98B4\u98B7\u98B8\u98BA\u98BB\u98BF\u98C2\u98C5\u98C8\u98CC\u98E1\u98E3\u98E5\u98E6\u98E7\u98EA\u98F3\u98F6\u9902\u9907\u9908\u9911\u9915\u9916\u9917\u991A\u991B\u991C\u991F\u9922\u9926\u9927\u992B\u9931",4,"\u9939\u993A\u993B\u993C\u9940\u9941\u9946\u9947\u9948\u994D\u994E\u9954\u9958\u9959\u995B\u995C\u995E\u995F\u9960\u999B\u999D\u999F\u99A6\u99B0\u99B1\u99B2\u99B5"],["8fe9a1","\u99B9\u99BA\u99BD\u99BF\u99C3\u99C9\u99D3\u99D4\u99D9\u99DA\u99DC\u99DE\u99E7\u99EA\u99EB\u99EC\u99F0\u99F4\u99F5\u99F9\u99FD\u99FE\u9A02\u9A03\u9A04\u9A0B\u9A0C\u9A10\u9A11\u9A16\u9A1E\u9A20\u9A22\u9A23\u9A24\u9A27\u9A2D\u9A2E\u9A33\u9A35\u9A36\u9A38\u9A47\u9A41\u9A44\u9A4A\u9A4B\u9A4C\u9A4E\u9A51\u9A54\u9A56\u9A5D\u9AAA\u9AAC\u9AAE\u9AAF\u9AB2\u9AB4\u9AB5\u9AB6\u9AB9\u9ABB\u9ABE\u9ABF\u9AC1\u9AC3\u9AC6\u9AC8\u9ACE\u9AD0\u9AD2\u9AD5\u9AD6\u9AD7\u9ADB\u9ADC\u9AE0\u9AE4\u9AE5\u9AE7\u9AE9\u9AEC\u9AF2\u9AF3\u9AF5\u9AF9\u9AFA\u9AFD\u9AFF",4],["8feaa1","\u9B04\u9B05\u9B08\u9B09\u9B0B\u9B0C\u9B0D\u9B0E\u9B10\u9B12\u9B16\u9B19\u9B1B\u9B1C\u9B20\u9B26\u9B2B\u9B2D\u9B33\u9B34\u9B35\u9B37\u9B39\u9B3A\u9B3D\u9B48\u9B4B\u9B4C\u9B55\u9B56\u9B57\u9B5B\u9B5E\u9B61\u9B63\u9B65\u9B66\u9B68\u9B6A",4,"\u9B73\u9B75\u9B77\u9B78\u9B79\u9B7F\u9B80\u9B84\u9B85\u9B86\u9B87\u9B89\u9B8A\u9B8B\u9B8D\u9B8F\u9B90\u9B94\u9B9A\u9B9D\u9B9E\u9BA6\u9BA7\u9BA9\u9BAC\u9BB0\u9BB1\u9BB2\u9BB7\u9BB8\u9BBB\u9BBC\u9BBE\u9BBF\u9BC1\u9BC7\u9BC8\u9BCE\u9BD0\u9BD7\u9BD8\u9BDD\u9BDF\u9BE5\u9BE7\u9BEA\u9BEB\u9BEF\u9BF3\u9BF7\u9BF8"],["8feba1","\u9BF9\u9BFA\u9BFD\u9BFF\u9C00\u9C02\u9C0B\u9C0F\u9C11\u9C16\u9C18\u9C19\u9C1A\u9C1C\u9C1E\u9C22\u9C23\u9C26",4,"\u9C31\u9C35\u9C36\u9C37\u9C3D\u9C41\u9C43\u9C44\u9C45\u9C49\u9C4A\u9C4E\u9C4F\u9C50\u9C53\u9C54\u9C56\u9C58\u9C5B\u9C5D\u9C5E\u9C5F\u9C63\u9C69\u9C6A\u9C5C\u9C6B\u9C68\u9C6E\u9C70\u9C72\u9C75\u9C77\u9C7B\u9CE6\u9CF2\u9CF7\u9CF9\u9D0B\u9D02\u9D11\u9D17\u9D18\u9D1C\u9D1D\u9D1E\u9D2F\u9D30\u9D32\u9D33\u9D34\u9D3A\u9D3C\u9D45\u9D3D\u9D42\u9D43\u9D47\u9D4A\u9D53\u9D54\u9D5F\u9D63\u9D62\u9D65\u9D69\u9D6A\u9D6B\u9D70\u9D76\u9D77\u9D7B"],["8feca1","\u9D7C\u9D7E\u9D83\u9D84\u9D86\u9D8A\u9D8D\u9D8E\u9D92\u9D93\u9D95\u9D96\u9D97\u9D98\u9DA1\u9DAA\u9DAC\u9DAE\u9DB1\u9DB5\u9DB9\u9DBC\u9DBF\u9DC3\u9DC7\u9DC9\u9DCA\u9DD4\u9DD5\u9DD6\u9DD7\u9DDA\u9DDE\u9DDF\u9DE0\u9DE5\u9DE7\u9DE9\u9DEB\u9DEE\u9DF0\u9DF3\u9DF4\u9DFE\u9E0A\u9E02\u9E07\u9E0E\u9E10\u9E11\u9E12\u9E15\u9E16\u9E19\u9E1C\u9E1D\u9E7A\u9E7B\u9E7C\u9E80\u9E82\u9E83\u9E84\u9E85\u9E87\u9E8E\u9E8F\u9E96\u9E98\u9E9B\u9E9E\u9EA4\u9EA8\u9EAC\u9EAE\u9EAF\u9EB0\u9EB3\u9EB4\u9EB5\u9EC6\u9EC8\u9ECB\u9ED5\u9EDF\u9EE4\u9EE7\u9EEC\u9EED\u9EEE\u9EF0\u9EF1\u9EF2\u9EF5"],["8feda1","\u9EF8\u9EFF\u9F02\u9F03\u9F09\u9F0F\u9F10\u9F11\u9F12\u9F14\u9F16\u9F17\u9F19\u9F1A\u9F1B\u9F1F\u9F22\u9F26\u9F2A\u9F2B\u9F2F\u9F31\u9F32\u9F34\u9F37\u9F39\u9F3A\u9F3C\u9F3D\u9F3F\u9F41\u9F43",4,"\u9F53\u9F55\u9F56\u9F57\u9F58\u9F5A\u9F5D\u9F5E\u9F68\u9F69\u9F6D",4,"\u9F73\u9F75\u9F7A\u9F7D\u9F8F\u9F90\u9F91\u9F92\u9F94\u9F96\u9F97\u9F9E\u9FA1\u9FA2\u9FA3\u9FA5"]]});var Br=o((ez5,NS6)=>{NS6.exports=[["0","\x00",127,"\u20AC"],["8140","\u4E02\u4E04\u4E05\u4E06\u4E0F\u4E12\u4E17\u4E1F\u4E20\u4E21\u4E23\u4E26\u4E29\u4E2E\u4E2F\u4E31\u4E33\u4E35\u4E37\u4E3C\u4E40\u4E41\u4E42\u4E44\u4E46\u4E4A\u4E51\u4E55\u4E57\u4E5A\u4E5B\u4E62\u4E63\u4E64\u4E65\u4E67\u4E68\u4E6A",5,"\u4E72\u4E74",9,"\u4E7F",6,"\u4E87\u4E8A"],["8180","\u4E90\u4E96\u4E97\u4E99\u4E9C\u4E9D\u4E9E\u4EA3\u4EAA\u4EAF\u4EB0\u4EB1\u4EB4\u4EB6\u4EB7\u4EB8\u4EB9\u4EBC\u4EBD\u4EBE\u4EC8\u4ECC\u4ECF\u4ED0\u4ED2\u4EDA\u4EDB\u4EDC\u4EE0\u4EE2\u4EE6\u4EE7\u4EE9\u4EED\u4EEE\u4EEF\u4EF1\u4EF4\u4EF8\u4EF9\u4EFA\u4EFC\u4EFE\u4F00\u4F02",6,"\u4F0B\u4F0C\u4F12",4,"\u4F1C\u4F1D\u4F21\u4F23\u4F28\u4F29\u4F2C\u4F2D\u4F2E\u4F31\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E",4,"\u4F44\u4F45\u4F47",5,"\u4F52\u4F54\u4F56\u4F61\u4F62\u4F66\u4F68\u4F6A\u4F6B\u4F6D\u4F6E\u4F71\u4F72\u4F75\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F80\u4F81\u4F82\u4F85\u4F86\u4F87\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F95\u4F96\u4F98\u4F99\u4F9A\u4F9C\u4F9E\u4F9F\u4FA1\u4FA2"],["8240","\u4FA4\u4FAB\u4FAD\u4FB0",4,"\u4FB6",8,"\u4FC0\u4FC1\u4FC2\u4FC6\u4FC7\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FD2",4,"\u4FD9\u4FDB\u4FE0\u4FE2\u4FE4\u4FE5\u4FE7\u4FEB\u4FEC\u4FF0\u4FF2\u4FF4\u4FF5\u4FF6\u4FF7\u4FF9\u4FFB\u4FFC\u4FFD\u4FFF",11],["8280","\u500B\u500E\u5010\u5011\u5013\u5015\u5016\u5017\u501B\u501D\u501E\u5020\u5022\u5023\u5024\u5027\u502B\u502F",10,"\u503B\u503D\u503F\u5040\u5041\u5042\u5044\u5045\u5046\u5049\u504A\u504B\u504D\u5050",4,"\u5056\u5057\u5058\u5059\u505B\u505D",7,"\u5066",5,"\u506D",8,"\u5078\u5079\u507A\u507C\u507D\u5081\u5082\u5083\u5084\u5086\u5087\u5089\u508A\u508B\u508C\u508E",20,"\u50A4\u50A6\u50AA\u50AB\u50AD",4,"\u50B3",6,"\u50BC"],["8340","\u50BD",17,"\u50D0",5,"\u50D7\u50D8\u50D9\u50DB",10,"\u50E8\u50E9\u50EA\u50EB\u50EF\u50F0\u50F1\u50F2\u50F4\u50F6",4,"\u50FC",9,"\u5108"],["8380","\u5109\u510A\u510C",5,"\u5113",13,"\u5122",28,"\u5142\u5147\u514A\u514C\u514E\u514F\u5150\u5152\u5153\u5157\u5158\u5159\u515B\u515D",4,"\u5163\u5164\u5166\u5167\u5169\u516A\u516F\u5172\u517A\u517E\u517F\u5183\u5184\u5186\u5187\u518A\u518B\u518E\u518F\u5190\u5191\u5193\u5194\u5198\u519A\u519D\u519E\u519F\u51A1\u51A3\u51A6",4,"\u51AD\u51AE\u51B4\u51B8\u51B9\u51BA\u51BE\u51BF\u51C1\u51C2\u51C3\u51C5\u51C8\u51CA\u51CD\u51CE\u51D0\u51D2",5],["8440","\u51D8\u51D9\u51DA\u51DC\u51DE\u51DF\u51E2\u51E3\u51E5",5,"\u51EC\u51EE\u51F1\u51F2\u51F4\u51F7\u51FE\u5204\u5205\u5209\u520B\u520C\u520F\u5210\u5213\u5214\u5215\u521C\u521E\u521F\u5221\u5222\u5223\u5225\u5226\u5227\u522A\u522C\u522F\u5231\u5232\u5234\u5235\u523C\u523E\u5244",5,"\u524B\u524E\u524F\u5252\u5253\u5255\u5257\u5258"],["8480","\u5259\u525A\u525B\u525D\u525F\u5260\u5262\u5263\u5264\u5266\u5268\u526B\u526C\u526D\u526E\u5270\u5271\u5273",9,"\u527E\u5280\u5283",4,"\u5289",6,"\u5291\u5292\u5294",6,"\u529C\u52A4\u52A5\u52A6\u52A7\u52AE\u52AF\u52B0\u52B4",9,"\u52C0\u52C1\u52C2\u52C4\u52C5\u52C6\u52C8\u52CA\u52CC\u52CD\u52CE\u52CF\u52D1\u52D3\u52D4\u52D5\u52D7\u52D9",5,"\u52E0\u52E1\u52E2\u52E3\u52E5",10,"\u52F1",7,"\u52FB\u52FC\u52FD\u5301\u5302\u5303\u5304\u5307\u5309\u530A\u530B\u530C\u530E"],["8540","\u5311\u5312\u5313\u5314\u5318\u531B\u531C\u531E\u531F\u5322\u5324\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u532F",9,"\u533C\u533D\u5340\u5342\u5344\u5346\u534B\u534C\u534D\u5350\u5354\u5358\u5359\u535B\u535D\u5365\u5368\u536A\u536C\u536D\u5372\u5376\u5379\u537B\u537C\u537D\u537E\u5380\u5381\u5383\u5387\u5388\u538A\u538E\u538F"],["8580","\u5390",4,"\u5396\u5397\u5399\u539B\u539C\u539E\u53A0\u53A1\u53A4\u53A7\u53AA\u53AB\u53AC\u53AD\u53AF",6,"\u53B7\u53B8\u53B9\u53BA\u53BC\u53BD\u53BE\u53C0\u53C3",4,"\u53CE\u53CF\u53D0\u53D2\u53D3\u53D5\u53DA\u53DC\u53DD\u53DE\u53E1\u53E2\u53E7\u53F4\u53FA\u53FE\u53FF\u5400\u5402\u5405\u5407\u540B\u5414\u5418\u5419\u541A\u541C\u5422\u5424\u5425\u542A\u5430\u5433\u5436\u5437\u543A\u543D\u543F\u5441\u5442\u5444\u5445\u5447\u5449\u544C\u544D\u544E\u544F\u5451\u545A\u545D",4,"\u5463\u5465\u5467\u5469",7,"\u5474\u5479\u547A\u547E\u547F\u5481\u5483\u5485\u5487\u5488\u5489\u548A\u548D\u5491\u5493\u5497\u5498\u549C\u549E\u549F\u54A0\u54A1"],["8640","\u54A2\u54A5\u54AE\u54B0\u54B2\u54B5\u54B6\u54B7\u54B9\u54BA\u54BC\u54BE\u54C3\u54C5\u54CA\u54CB\u54D6\u54D8\u54DB\u54E0",4,"\u54EB\u54EC\u54EF\u54F0\u54F1\u54F4",5,"\u54FB\u54FE\u5500\u5502\u5503\u5504\u5505\u5508\u550A",4,"\u5512\u5513\u5515",5,"\u551C\u551D\u551E\u551F\u5521\u5525\u5526"],["8680","\u5528\u5529\u552B\u552D\u5532\u5534\u5535\u5536\u5538\u5539\u553A\u553B\u553D\u5540\u5542\u5545\u5547\u5548\u554B",4,"\u5551\u5552\u5553\u5554\u5557",4,"\u555D\u555E\u555F\u5560\u5562\u5563\u5568\u5569\u556B\u556F",5,"\u5579\u557A\u557D\u557F\u5585\u5586\u558C\u558D\u558E\u5590\u5592\u5593\u5595\u5596\u5597\u559A\u559B\u559E\u55A0",6,"\u55A8",8,"\u55B2\u55B4\u55B6\u55B8\u55BA\u55BC\u55BF",4,"\u55C6\u55C7\u55C8\u55CA\u55CB\u55CE\u55CF\u55D0\u55D5\u55D7",4,"\u55DE\u55E0\u55E2\u55E7\u55E9\u55ED\u55EE\u55F0\u55F1\u55F4\u55F6\u55F8",4,"\u55FF\u5602\u5603\u5604\u5605"],["8740","\u5606\u5607\u560A\u560B\u560D\u5610",7,"\u5619\u561A\u561C\u561D\u5620\u5621\u5622\u5625\u5626\u5628\u5629\u562A\u562B\u562E\u562F\u5630\u5633\u5635\u5637\u5638\u563A\u563C\u563D\u563E\u5640",11,"\u564F",4,"\u5655\u5656\u565A\u565B\u565D",4],["8780","\u5663\u5665\u5666\u5667\u566D\u566E\u566F\u5670\u5672\u5673\u5674\u5675\u5677\u5678\u5679\u567A\u567D",7,"\u5687",6,"\u5690\u5691\u5692\u5694",14,"\u56A4",10,"\u56B0",6,"\u56B8\u56B9\u56BA\u56BB\u56BD",12,"\u56CB",8,"\u56D5\u56D6\u56D8\u56D9\u56DC\u56E3\u56E5",5,"\u56EC\u56EE\u56EF\u56F2\u56F3\u56F6\u56F7\u56F8\u56FB\u56FC\u5700\u5701\u5702\u5705\u5707\u570B",6],["8840","\u5712",9,"\u571D\u571E\u5720\u5721\u5722\u5724\u5725\u5726\u5727\u572B\u5731\u5732\u5734",4,"\u573C\u573D\u573F\u5741\u5743\u5744\u5745\u5746\u5748\u5749\u574B\u5752",4,"\u5758\u5759\u5762\u5763\u5765\u5767\u576C\u576E\u5770\u5771\u5772\u5774\u5775\u5778\u5779\u577A\u577D\u577E\u577F\u5780"],["8880","\u5781\u5787\u5788\u5789\u578A\u578D",4,"\u5794",6,"\u579C\u579D\u579E\u579F\u57A5\u57A8\u57AA\u57AC\u57AF\u57B0\u57B1\u57B3\u57B5\u57B6\u57B7\u57B9",8,"\u57C4",6,"\u57CC\u57CD\u57D0\u57D1\u57D3\u57D6\u57D7\u57DB\u57DC\u57DE\u57E1\u57E2\u57E3\u57E5",7,"\u57EE\u57F0\u57F1\u57F2\u57F3\u57F5\u57F6\u57F7\u57FB\u57FC\u57FE\u57FF\u5801\u5803\u5804\u5805\u5808\u5809\u580A\u580C\u580E\u580F\u5810\u5812\u5813\u5814\u5816\u5817\u5818\u581A\u581B\u581C\u581D\u581F\u5822\u5823\u5825",4,"\u582B",4,"\u5831\u5832\u5833\u5834\u5836",7],["8940","\u583E",5,"\u5845",6,"\u584E\u584F\u5850\u5852\u5853\u5855\u5856\u5857\u5859",4,"\u585F",5,"\u5866",4,"\u586D",16,"\u587F\u5882\u5884\u5886\u5887\u5888\u588A\u588B\u588C"],["8980","\u588D",4,"\u5894",4,"\u589B\u589C\u589D\u58A0",7,"\u58AA",17,"\u58BD\u58BE\u58BF\u58C0\u58C2\u58C3\u58C4\u58C6",10,"\u58D2\u58D3\u58D4\u58D6",13,"\u58E5",5,"\u58ED\u58EF\u58F1\u58F2\u58F4\u58F5\u58F7\u58F8\u58FA",7,"\u5903\u5905\u5906\u5908",4,"\u590E\u5910\u5911\u5912\u5913\u5917\u5918\u591B\u591D\u591E\u5920\u5921\u5922\u5923\u5926\u5928\u592C\u5930\u5932\u5933\u5935\u5936\u593B"],["8a40","\u593D\u593E\u593F\u5940\u5943\u5945\u5946\u594A\u594C\u594D\u5950\u5952\u5953\u5959\u595B",4,"\u5961\u5963\u5964\u5966",12,"\u5975\u5977\u597A\u597B\u597C\u597E\u597F\u5980\u5985\u5989\u598B\u598C\u598E\u598F\u5990\u5991\u5994\u5995\u5998\u599A\u599B\u599C\u599D\u599F\u59A0\u59A1\u59A2\u59A6"],["8a80","\u59A7\u59AC\u59AD\u59B0\u59B1\u59B3",5,"\u59BA\u59BC\u59BD\u59BF",6,"\u59C7\u59C8\u59C9\u59CC\u59CD\u59CE\u59CF\u59D5\u59D6\u59D9\u59DB\u59DE",4,"\u59E4\u59E6\u59E7\u59E9\u59EA\u59EB\u59ED",11,"\u59FA\u59FC\u59FD\u59FE\u5A00\u5A02\u5A0A\u5A0B\u5A0D\u5A0E\u5A0F\u5A10\u5A12\u5A14\u5A15\u5A16\u5A17\u5A19\u5A1A\u5A1B\u5A1D\u5A1E\u5A21\u5A22\u5A24\u5A26\u5A27\u5A28\u5A2A",6,"\u5A33\u5A35\u5A37",4,"\u5A3D\u5A3E\u5A3F\u5A41",4,"\u5A47\u5A48\u5A4B",9,"\u5A56\u5A57\u5A58\u5A59\u5A5B",5],["8b40","\u5A61\u5A63\u5A64\u5A65\u5A66\u5A68\u5A69\u5A6B",8,"\u5A78\u5A79\u5A7B\u5A7C\u5A7D\u5A7E\u5A80",17,"\u5A93",6,"\u5A9C",13,"\u5AAB\u5AAC"],["8b80","\u5AAD",4,"\u5AB4\u5AB6\u5AB7\u5AB9",4,"\u5ABF\u5AC0\u5AC3",5,"\u5ACA\u5ACB\u5ACD",4,"\u5AD3\u5AD5\u5AD7\u5AD9\u5ADA\u5ADB\u5ADD\u5ADE\u5ADF\u5AE2\u5AE4\u5AE5\u5AE7\u5AE8\u5AEA\u5AEC",4,"\u5AF2",22,"\u5B0A",11,"\u5B18",25,"\u5B33\u5B35\u5B36\u5B38",7,"\u5B41",6],["8c40","\u5B48",7,"\u5B52\u5B56\u5B5E\u5B60\u5B61\u5B67\u5B68\u5B6B\u5B6D\u5B6E\u5B6F\u5B72\u5B74\u5B76\u5B77\u5B78\u5B79\u5B7B\u5B7C\u5B7E\u5B7F\u5B82\u5B86\u5B8A\u5B8D\u5B8E\u5B90\u5B91\u5B92\u5B94\u5B96\u5B9F\u5BA7\u5BA8\u5BA9\u5BAC\u5BAD\u5BAE\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBB\u5BBC\u5BC0\u5BC1\u5BC3\u5BC8\u5BC9\u5BCA\u5BCB\u5BCD\u5BCE\u5BCF"],["8c80","\u5BD1\u5BD4",8,"\u5BE0\u5BE2\u5BE3\u5BE6\u5BE7\u5BE9",4,"\u5BEF\u5BF1",6,"\u5BFD\u5BFE\u5C00\u5C02\u5C03\u5C05\u5C07\u5C08\u5C0B\u5C0C\u5C0D\u5C0E\u5C10\u5C12\u5C13\u5C17\u5C19\u5C1B\u5C1E\u5C1F\u5C20\u5C21\u5C23\u5C26\u5C28\u5C29\u5C2A\u5C2B\u5C2D\u5C2E\u5C2F\u5C30\u5C32\u5C33\u5C35\u5C36\u5C37\u5C43\u5C44\u5C46\u5C47\u5C4C\u5C4D\u5C52\u5C53\u5C54\u5C56\u5C57\u5C58\u5C5A\u5C5B\u5C5C\u5C5D\u5C5F\u5C62\u5C64\u5C67",6,"\u5C70\u5C72",6,"\u5C7B\u5C7C\u5C7D\u5C7E\u5C80\u5C83",4,"\u5C89\u5C8A\u5C8B\u5C8E\u5C8F\u5C92\u5C93\u5C95\u5C9D",4,"\u5CA4",4],["8d40","\u5CAA\u5CAE\u5CAF\u5CB0\u5CB2\u5CB4\u5CB6\u5CB9\u5CBA\u5CBB\u5CBC\u5CBE\u5CC0\u5CC2\u5CC3\u5CC5",5,"\u5CCC",5,"\u5CD3",5,"\u5CDA",6,"\u5CE2\u5CE3\u5CE7\u5CE9\u5CEB\u5CEC\u5CEE\u5CEF\u5CF1",9,"\u5CFC",4],["8d80","\u5D01\u5D04\u5D05\u5D08",5,"\u5D0F",4,"\u5D15\u5D17\u5D18\u5D19\u5D1A\u5D1C\u5D1D\u5D1F",4,"\u5D25\u5D28\u5D2A\u5D2B\u5D2C\u5D2F",4,"\u5D35",7,"\u5D3F",7,"\u5D48\u5D49\u5D4D",10,"\u5D59\u5D5A\u5D5C\u5D5E",10,"\u5D6A\u5D6D\u5D6E\u5D70\u5D71\u5D72\u5D73\u5D75",12,"\u5D83",21,"\u5D9A\u5D9B\u5D9C\u5D9E\u5D9F\u5DA0"],["8e40","\u5DA1",21,"\u5DB8",12,"\u5DC6",6,"\u5DCE",12,"\u5DDC\u5DDF\u5DE0\u5DE3\u5DE4\u5DEA\u5DEC\u5DED"],["8e80","\u5DF0\u5DF5\u5DF6\u5DF8",4,"\u5DFF\u5E00\u5E04\u5E07\u5E09\u5E0A\u5E0B\u5E0D\u5E0E\u5E12\u5E13\u5E17\u5E1E",7,"\u5E28",4,"\u5E2F\u5E30\u5E32",4,"\u5E39\u5E3A\u5E3E\u5E3F\u5E40\u5E41\u5E43\u5E46",5,"\u5E4D",6,"\u5E56",4,"\u5E5C\u5E5D\u5E5F\u5E60\u5E63",14,"\u5E75\u5E77\u5E79\u5E7E\u5E81\u5E82\u5E83\u5E85\u5E88\u5E89\u5E8C\u5E8D\u5E8E\u5E92\u5E98\u5E9B\u5E9D\u5EA1\u5EA2\u5EA3\u5EA4\u5EA8",4,"\u5EAE",4,"\u5EB4\u5EBA\u5EBB\u5EBC\u5EBD\u5EBF",6],["8f40","\u5EC6\u5EC7\u5EC8\u5ECB",5,"\u5ED4\u5ED5\u5ED7\u5ED8\u5ED9\u5EDA\u5EDC",11,"\u5EE9\u5EEB",8,"\u5EF5\u5EF8\u5EF9\u5EFB\u5EFC\u5EFD\u5F05\u5F06\u5F07\u5F09\u5F0C\u5F0D\u5F0E\u5F10\u5F12\u5F14\u5F16\u5F19\u5F1A\u5F1C\u5F1D\u5F1E\u5F21\u5F22\u5F23\u5F24"],["8f80","\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F32",6,"\u5F3B\u5F3D\u5F3E\u5F3F\u5F41",14,"\u5F51\u5F54\u5F59\u5F5A\u5F5B\u5F5C\u5F5E\u5F5F\u5F60\u5F63\u5F65\u5F67\u5F68\u5F6B\u5F6E\u5F6F\u5F72\u5F74\u5F75\u5F76\u5F78\u5F7A\u5F7D\u5F7E\u5F7F\u5F83\u5F86\u5F8D\u5F8E\u5F8F\u5F91\u5F93\u5F94\u5F96\u5F9A\u5F9B\u5F9D\u5F9E\u5F9F\u5FA0\u5FA2",5,"\u5FA9\u5FAB\u5FAC\u5FAF",5,"\u5FB6\u5FB8\u5FB9\u5FBA\u5FBB\u5FBE",4,"\u5FC7\u5FC8\u5FCA\u5FCB\u5FCE\u5FD3\u5FD4\u5FD5\u5FDA\u5FDB\u5FDC\u5FDE\u5FDF\u5FE2\u5FE3\u5FE5\u5FE6\u5FE8\u5FE9\u5FEC\u5FEF\u5FF0\u5FF2\u5FF3\u5FF4\u5FF6\u5FF7\u5FF9\u5FFA\u5FFC\u6007"],["9040","\u6008\u6009\u600B\u600C\u6010\u6011\u6013\u6017\u6018\u601A\u601E\u601F\u6022\u6023\u6024\u602C\u602D\u602E\u6030",4,"\u6036",4,"\u603D\u603E\u6040\u6044",6,"\u604C\u604E\u604F\u6051\u6053\u6054\u6056\u6057\u6058\u605B\u605C\u605E\u605F\u6060\u6061\u6065\u6066\u606E\u6071\u6072\u6074\u6075\u6077\u607E\u6080"],["9080","\u6081\u6082\u6085\u6086\u6087\u6088\u608A\u608B\u608E\u608F\u6090\u6091\u6093\u6095\u6097\u6098\u6099\u609C\u609E\u60A1\u60A2\u60A4\u60A5\u60A7\u60A9\u60AA\u60AE\u60B0\u60B3\u60B5\u60B6\u60B7\u60B9\u60BA\u60BD",7,"\u60C7\u60C8\u60C9\u60CC",4,"\u60D2\u60D3\u60D4\u60D6\u60D7\u60D9\u60DB\u60DE\u60E1",4,"\u60EA\u60F1\u60F2\u60F5\u60F7\u60F8\u60FB",4,"\u6102\u6103\u6104\u6105\u6107\u610A\u610B\u610C\u6110",4,"\u6116\u6117\u6118\u6119\u611B\u611C\u611D\u611E\u6121\u6122\u6125\u6128\u6129\u612A\u612C",18,"\u6140",6],["9140","\u6147\u6149\u614B\u614D\u614F\u6150\u6152\u6153\u6154\u6156",6,"\u615E\u615F\u6160\u6161\u6163\u6164\u6165\u6166\u6169",6,"\u6171\u6172\u6173\u6174\u6176\u6178",18,"\u618C\u618D\u618F",4,"\u6195"],["9180","\u6196",6,"\u619E",8,"\u61AA\u61AB\u61AD",9,"\u61B8",5,"\u61BF\u61C0\u61C1\u61C3",4,"\u61C9\u61CC",4,"\u61D3\u61D5",16,"\u61E7",13,"\u61F6",8,"\u6200",5,"\u6207\u6209\u6213\u6214\u6219\u621C\u621D\u621E\u6220\u6223\u6226\u6227\u6228\u6229\u622B\u622D\u622F\u6230\u6231\u6232\u6235\u6236\u6238",4,"\u6242\u6244\u6245\u6246\u624A"],["9240","\u624F\u6250\u6255\u6256\u6257\u6259\u625A\u625C",6,"\u6264\u6265\u6268\u6271\u6272\u6274\u6275\u6277\u6278\u627A\u627B\u627D\u6281\u6282\u6283\u6285\u6286\u6287\u6288\u628B",5,"\u6294\u6299\u629C\u629D\u629E\u62A3\u62A6\u62A7\u62A9\u62AA\u62AD\u62AE\u62AF\u62B0\u62B2\u62B3\u62B4\u62B6\u62B7\u62B8\u62BA\u62BE\u62C0\u62C1"],["9280","\u62C3\u62CB\u62CF\u62D1\u62D5\u62DD\u62DE\u62E0\u62E1\u62E4\u62EA\u62EB\u62F0\u62F2\u62F5\u62F8\u62F9\u62FA\u62FB\u6300\u6303\u6304\u6305\u6306\u630A\u630B\u630C\u630D\u630F\u6310\u6312\u6313\u6314\u6315\u6317\u6318\u6319\u631C\u6326\u6327\u6329\u632C\u632D\u632E\u6330\u6331\u6333",5,"\u633B\u633C\u633E\u633F\u6340\u6341\u6344\u6347\u6348\u634A\u6351\u6352\u6353\u6354\u6356",7,"\u6360\u6364\u6365\u6366\u6368\u636A\u636B\u636C\u636F\u6370\u6372\u6373\u6374\u6375\u6378\u6379\u637C\u637D\u637E\u637F\u6381\u6383\u6384\u6385\u6386\u638B\u638D\u6391\u6393\u6394\u6395\u6397\u6399",6,"\u63A1\u63A4\u63A6\u63AB\u63AF\u63B1\u63B2\u63B5\u63B6\u63B9\u63BB\u63BD\u63BF\u63C0"],["9340","\u63C1\u63C2\u63C3\u63C5\u63C7\u63C8\u63CA\u63CB\u63CC\u63D1\u63D3\u63D4\u63D5\u63D7",6,"\u63DF\u63E2\u63E4",4,"\u63EB\u63EC\u63EE\u63EF\u63F0\u63F1\u63F3\u63F5\u63F7\u63F9\u63FA\u63FB\u63FC\u63FE\u6403\u6404\u6406",4,"\u640D\u640E\u6411\u6412\u6415",5,"\u641D\u641F\u6422\u6423\u6424"],["9380","\u6425\u6427\u6428\u6429\u642B\u642E",5,"\u6435",4,"\u643B\u643C\u643E\u6440\u6442\u6443\u6449\u644B",6,"\u6453\u6455\u6456\u6457\u6459",4,"\u645F",7,"\u6468\u646A\u646B\u646C\u646E",9,"\u647B",6,"\u6483\u6486\u6488",8,"\u6493\u6494\u6497\u6498\u649A\u649B\u649C\u649D\u649F",4,"\u64A5\u64A6\u64A7\u64A8\u64AA\u64AB\u64AF\u64B1\u64B2\u64B3\u64B4\u64B6\u64B9\u64BB\u64BD\u64BE\u64BF\u64C1\u64C3\u64C4\u64C6",6,"\u64CF\u64D1\u64D3\u64D4\u64D5\u64D6\u64D9\u64DA"],["9440","\u64DB\u64DC\u64DD\u64DF\u64E0\u64E1\u64E3\u64E5\u64E7",24,"\u6501",7,"\u650A",7,"\u6513",4,"\u6519",8],["9480","\u6522\u6523\u6524\u6526",4,"\u652C\u652D\u6530\u6531\u6532\u6533\u6537\u653A\u653C\u653D\u6540",4,"\u6546\u6547\u654A\u654B\u654D\u654E\u6550\u6552\u6553\u6554\u6557\u6558\u655A\u655C\u655F\u6560\u6561\u6564\u6565\u6567\u6568\u6569\u656A\u656D\u656E\u656F\u6571\u6573\u6575\u6576\u6578",14,"\u6588\u6589\u658A\u658D\u658E\u658F\u6592\u6594\u6595\u6596\u6598\u659A\u659D\u659E\u65A0\u65A2\u65A3\u65A6\u65A8\u65AA\u65AC\u65AE\u65B1",7,"\u65BA\u65BB\u65BE\u65BF\u65C0\u65C2\u65C7\u65C8\u65C9\u65CA\u65CD\u65D0\u65D1\u65D3\u65D4\u65D5\u65D8",7,"\u65E1\u65E3\u65E4\u65EA\u65EB"],["9540","\u65F2\u65F3\u65F4\u65F5\u65F8\u65F9\u65FB",4,"\u6601\u6604\u6605\u6607\u6608\u6609\u660B\u660D\u6610\u6611\u6612\u6616\u6617\u6618\u661A\u661B\u661C\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6632\u6633\u6637",4,"\u663D\u663F\u6640\u6642\u6644",6,"\u664D\u664E\u6650\u6651\u6658"],["9580","\u6659\u665B\u665C\u665D\u665E\u6660\u6662\u6663\u6665\u6667\u6669",4,"\u6671\u6672\u6673\u6675\u6678\u6679\u667B\u667C\u667D\u667F\u6680\u6681\u6683\u6685\u6686\u6688\u6689\u668A\u668B\u668D\u668E\u668F\u6690\u6692\u6693\u6694\u6695\u6698",4,"\u669E",8,"\u66A9",4,"\u66AF",4,"\u66B5\u66B6\u66B7\u66B8\u66BA\u66BB\u66BC\u66BD\u66BF",25,"\u66DA\u66DE",7,"\u66E7\u66E8\u66EA",5,"\u66F1\u66F5\u66F6\u66F8\u66FA\u66FB\u66FD\u6701\u6702\u6703"],["9640","\u6704\u6705\u6706\u6707\u670C\u670E\u670F\u6711\u6712\u6713\u6716\u6718\u6719\u671A\u671C\u671E\u6720",5,"\u6727\u6729\u672E\u6730\u6732\u6733\u6736\u6737\u6738\u6739\u673B\u673C\u673E\u673F\u6741\u6744\u6745\u6747\u674A\u674B\u674D\u6752\u6754\u6755\u6757",4,"\u675D\u6762\u6763\u6764\u6766\u6767\u676B\u676C\u676E\u6771\u6774\u6776"],["9680","\u6778\u6779\u677A\u677B\u677D\u6780\u6782\u6783\u6785\u6786\u6788\u678A\u678C\u678D\u678E\u678F\u6791\u6792\u6793\u6794\u6796\u6799\u679B\u679F\u67A0\u67A1\u67A4\u67A6\u67A9\u67AC\u67AE\u67B1\u67B2\u67B4\u67B9",7,"\u67C2\u67C5",9,"\u67D5\u67D6\u67D7\u67DB\u67DF\u67E1\u67E3\u67E4\u67E6\u67E7\u67E8\u67EA\u67EB\u67ED\u67EE\u67F2\u67F5",7,"\u67FE\u6801\u6802\u6803\u6804\u6806\u680D\u6810\u6812\u6814\u6815\u6818",4,"\u681E\u681F\u6820\u6822",6,"\u682B",6,"\u6834\u6835\u6836\u683A\u683B\u683F\u6847\u684B\u684D\u684F\u6852\u6856",5],["9740","\u685C\u685D\u685E\u685F\u686A\u686C",7,"\u6875\u6878",8,"\u6882\u6884\u6887",7,"\u6890\u6891\u6892\u6894\u6895\u6896\u6898",9,"\u68A3\u68A4\u68A5\u68A9\u68AA\u68AB\u68AC\u68AE\u68B1\u68B2\u68B4\u68B6\u68B7\u68B8"],["9780","\u68B9",6,"\u68C1\u68C3",5,"\u68CA\u68CC\u68CE\u68CF\u68D0\u68D1\u68D3\u68D4\u68D6\u68D7\u68D9\u68DB",4,"\u68E1\u68E2\u68E4",9,"\u68EF\u68F2\u68F3\u68F4\u68F6\u68F7\u68F8\u68FB\u68FD\u68FE\u68FF\u6900\u6902\u6903\u6904\u6906",4,"\u690C\u690F\u6911\u6913",11,"\u6921\u6922\u6923\u6925",7,"\u692E\u692F\u6931\u6932\u6933\u6935\u6936\u6937\u6938\u693A\u693B\u693C\u693E\u6940\u6941\u6943",16,"\u6955\u6956\u6958\u6959\u695B\u695C\u695F"],["9840","\u6961\u6962\u6964\u6965\u6967\u6968\u6969\u696A\u696C\u696D\u696F\u6970\u6972",4,"\u697A\u697B\u697D\u697E\u697F\u6981\u6983\u6985\u698A\u698B\u698C\u698E",5,"\u6996\u6997\u6999\u699A\u699D",9,"\u69A9\u69AA\u69AC\u69AE\u69AF\u69B0\u69B2\u69B3\u69B5\u69B6\u69B8\u69B9\u69BA\u69BC\u69BD"],["9880","\u69BE\u69BF\u69C0\u69C2",7,"\u69CB\u69CD\u69CF\u69D1\u69D2\u69D3\u69D5",5,"\u69DC\u69DD\u69DE\u69E1",11,"\u69EE\u69EF\u69F0\u69F1\u69F3",9,"\u69FE\u6A00",9,"\u6A0B",11,"\u6A19",5,"\u6A20\u6A22",5,"\u6A29\u6A2B\u6A2C\u6A2D\u6A2E\u6A30\u6A32\u6A33\u6A34\u6A36",6,"\u6A3F",4,"\u6A45\u6A46\u6A48",7,"\u6A51",6,"\u6A5A"],["9940","\u6A5C",4,"\u6A62\u6A63\u6A64\u6A66",10,"\u6A72",6,"\u6A7A\u6A7B\u6A7D\u6A7E\u6A7F\u6A81\u6A82\u6A83\u6A85",8,"\u6A8F\u6A92",4,"\u6A98",7,"\u6AA1",5],["9980","\u6AA7\u6AA8\u6AAA\u6AAD",114,"\u6B25\u6B26\u6B28",6],["9a40","\u6B2F\u6B30\u6B31\u6B33\u6B34\u6B35\u6B36\u6B38\u6B3B\u6B3C\u6B3D\u6B3F\u6B40\u6B41\u6B42\u6B44\u6B45\u6B48\u6B4A\u6B4B\u6B4D",11,"\u6B5A",7,"\u6B68\u6B69\u6B6B",13,"\u6B7A\u6B7D\u6B7E\u6B7F\u6B80\u6B85\u6B88"],["9a80","\u6B8C\u6B8E\u6B8F\u6B90\u6B91\u6B94\u6B95\u6B97\u6B98\u6B99\u6B9C",4,"\u6BA2",7,"\u6BAB",7,"\u6BB6\u6BB8",6,"\u6BC0\u6BC3\u6BC4\u6BC6",4,"\u6BCC\u6BCE\u6BD0\u6BD1\u6BD8\u6BDA\u6BDC",4,"\u6BE2",7,"\u6BEC\u6BED\u6BEE\u6BF0\u6BF1\u6BF2\u6BF4\u6BF6\u6BF7\u6BF8\u6BFA\u6BFB\u6BFC\u6BFE",6,"\u6C08",4,"\u6C0E\u6C12\u6C17\u6C1C\u6C1D\u6C1E\u6C20\u6C23\u6C25\u6C2B\u6C2C\u6C2D\u6C31\u6C33\u6C36\u6C37\u6C39\u6C3A\u6C3B\u6C3C\u6C3E\u6C3F\u6C43\u6C44\u6C45\u6C48\u6C4B",4,"\u6C51\u6C52\u6C53\u6C56\u6C58"],["9b40","\u6C59\u6C5A\u6C62\u6C63\u6C65\u6C66\u6C67\u6C6B",4,"\u6C71\u6C73\u6C75\u6C77\u6C78\u6C7A\u6C7B\u6C7C\u6C7F\u6C80\u6C84\u6C87\u6C8A\u6C8B\u6C8D\u6C8E\u6C91\u6C92\u6C95\u6C96\u6C97\u6C98\u6C9A\u6C9C\u6C9D\u6C9E\u6CA0\u6CA2\u6CA8\u6CAC\u6CAF\u6CB0\u6CB4\u6CB5\u6CB6\u6CB7\u6CBA\u6CC0\u6CC1\u6CC2\u6CC3\u6CC6\u6CC7\u6CC8\u6CCB\u6CCD\u6CCE\u6CCF\u6CD1\u6CD2\u6CD8"],["9b80","\u6CD9\u6CDA\u6CDC\u6CDD\u6CDF\u6CE4\u6CE6\u6CE7\u6CE9\u6CEC\u6CED\u6CF2\u6CF4\u6CF9\u6CFF\u6D00\u6D02\u6D03\u6D05\u6D06\u6D08\u6D09\u6D0A\u6D0D\u6D0F\u6D10\u6D11\u6D13\u6D14\u6D15\u6D16\u6D18\u6D1C\u6D1D\u6D1F",5,"\u6D26\u6D28\u6D29\u6D2C\u6D2D\u6D2F\u6D30\u6D34\u6D36\u6D37\u6D38\u6D3A\u6D3F\u6D40\u6D42\u6D44\u6D49\u6D4C\u6D50\u6D55\u6D56\u6D57\u6D58\u6D5B\u6D5D\u6D5F\u6D61\u6D62\u6D64\u6D65\u6D67\u6D68\u6D6B\u6D6C\u6D6D\u6D70\u6D71\u6D72\u6D73\u6D75\u6D76\u6D79\u6D7A\u6D7B\u6D7D",4,"\u6D83\u6D84\u6D86\u6D87\u6D8A\u6D8B\u6D8D\u6D8F\u6D90\u6D92\u6D96",4,"\u6D9C\u6DA2\u6DA5\u6DAC\u6DAD\u6DB0\u6DB1\u6DB3\u6DB4\u6DB6\u6DB7\u6DB9",5,"\u6DC1\u6DC2\u6DC3\u6DC8\u6DC9\u6DCA"],["9c40","\u6DCD\u6DCE\u6DCF\u6DD0\u6DD2\u6DD3\u6DD4\u6DD5\u6DD7\u6DDA\u6DDB\u6DDC\u6DDF\u6DE2\u6DE3\u6DE5\u6DE7\u6DE8\u6DE9\u6DEA\u6DED\u6DEF\u6DF0\u6DF2\u6DF4\u6DF5\u6DF6\u6DF8\u6DFA\u6DFD",7,"\u6E06\u6E07\u6E08\u6E09\u6E0B\u6E0F\u6E12\u6E13\u6E15\u6E18\u6E19\u6E1B\u6E1C\u6E1E\u6E1F\u6E22\u6E26\u6E27\u6E28\u6E2A\u6E2C\u6E2E\u6E30\u6E31\u6E33\u6E35"],["9c80","\u6E36\u6E37\u6E39\u6E3B",7,"\u6E45",7,"\u6E4F\u6E50\u6E51\u6E52\u6E55\u6E57\u6E59\u6E5A\u6E5C\u6E5D\u6E5E\u6E60",10,"\u6E6C\u6E6D\u6E6F",14,"\u6E80\u6E81\u6E82\u6E84\u6E87\u6E88\u6E8A",4,"\u6E91",6,"\u6E99\u6E9A\u6E9B\u6E9D\u6E9E\u6EA0\u6EA1\u6EA3\u6EA4\u6EA6\u6EA8\u6EA9\u6EAB\u6EAC\u6EAD\u6EAE\u6EB0\u6EB3\u6EB5\u6EB8\u6EB9\u6EBC\u6EBE\u6EBF\u6EC0\u6EC3\u6EC4\u6EC5\u6EC6\u6EC8\u6EC9\u6ECA\u6ECC\u6ECD\u6ECE\u6ED0\u6ED2\u6ED6\u6ED8\u6ED9\u6EDB\u6EDC\u6EDD\u6EE3\u6EE7\u6EEA",5],["9d40","\u6EF0\u6EF1\u6EF2\u6EF3\u6EF5\u6EF6\u6EF7\u6EF8\u6EFA",7,"\u6F03\u6F04\u6F05\u6F07\u6F08\u6F0A",4,"\u6F10\u6F11\u6F12\u6F16",9,"\u6F21\u6F22\u6F23\u6F25\u6F26\u6F27\u6F28\u6F2C\u6F2E\u6F30\u6F32\u6F34\u6F35\u6F37",6,"\u6F3F\u6F40\u6F41\u6F42"],["9d80","\u6F43\u6F44\u6F45\u6F48\u6F49\u6F4A\u6F4C\u6F4E",9,"\u6F59\u6F5A\u6F5B\u6F5D\u6F5F\u6F60\u6F61\u6F63\u6F64\u6F65\u6F67",5,"\u6F6F\u6F70\u6F71\u6F73\u6F75\u6F76\u6F77\u6F79\u6F7B\u6F7D",6,"\u6F85\u6F86\u6F87\u6F8A\u6F8B\u6F8F",12,"\u6F9D\u6F9E\u6F9F\u6FA0\u6FA2",4,"\u6FA8",10,"\u6FB4\u6FB5\u6FB7\u6FB8\u6FBA",5,"\u6FC1\u6FC3",5,"\u6FCA",6,"\u6FD3",10,"\u6FDF\u6FE2\u6FE3\u6FE4\u6FE5"],["9e40","\u6FE6",7,"\u6FF0",32,"\u7012",7,"\u701C",6,"\u7024",6],["9e80","\u702B",9,"\u7036\u7037\u7038\u703A",17,"\u704D\u704E\u7050",13,"\u705F",11,"\u706E\u7071\u7072\u7073\u7074\u7077\u7079\u707A\u707B\u707D\u7081\u7082\u7083\u7084\u7086\u7087\u7088\u708B\u708C\u708D\u708F\u7090\u7091\u7093\u7097\u7098\u709A\u709B\u709E",12,"\u70B0\u70B2\u70B4\u70B5\u70B6\u70BA\u70BE\u70BF\u70C4\u70C5\u70C6\u70C7\u70C9\u70CB",12,"\u70DA"],["9f40","\u70DC\u70DD\u70DE\u70E0\u70E1\u70E2\u70E3\u70E5\u70EA\u70EE\u70F0",6,"\u70F8\u70FA\u70FB\u70FC\u70FE",10,"\u710B",4,"\u7111\u7112\u7114\u7117\u711B",10,"\u7127",7,"\u7132\u7133\u7134"],["9f80","\u7135\u7137",13,"\u7146\u7147\u7148\u7149\u714B\u714D\u714F",12,"\u715D\u715F",4,"\u7165\u7169",4,"\u716F\u7170\u7171\u7174\u7175\u7176\u7177\u7179\u717B\u717C\u717E",5,"\u7185",4,"\u718B\u718C\u718D\u718E\u7190\u7191\u7192\u7193\u7195\u7196\u7197\u719A",4,"\u71A1",6,"\u71A9\u71AA\u71AB\u71AD",5,"\u71B4\u71B6\u71B7\u71B8\u71BA",8,"\u71C4",9,"\u71CF",4],["a040","\u71D6",9,"\u71E1\u71E2\u71E3\u71E4\u71E6\u71E8",5,"\u71EF",9,"\u71FA",11,"\u7207",19],["a080","\u721B\u721C\u721E",9,"\u7229\u722B\u722D\u722E\u722F\u7232\u7233\u7234\u723A\u723C\u723E\u7240",6,"\u7249\u724A\u724B\u724E\u724F\u7250\u7251\u7253\u7254\u7255\u7257\u7258\u725A\u725C\u725E\u7260\u7263\u7264\u7265\u7268\u726A\u726B\u726C\u726D\u7270\u7271\u7273\u7274\u7276\u7277\u7278\u727B\u727C\u727D\u7282\u7283\u7285",4,"\u728C\u728E\u7290\u7291\u7293",11,"\u72A0",11,"\u72AE\u72B1\u72B2\u72B3\u72B5\u72BA",6,"\u72C5\u72C6\u72C7\u72C9\u72CA\u72CB\u72CC\u72CF\u72D1\u72D3\u72D4\u72D5\u72D6\u72D8\u72DA\u72DB"],["a1a1","\u3000\u3001\u3002\xB7\u02C9\u02C7\xA8\u3003\u3005\u2014\uFF5E\u2016\u2026\u2018\u2019\u201C\u201D\u3014\u3015\u3008",7,"\u3016\u3017\u3010\u3011\xB1\xD7\xF7\u2236\u2227\u2228\u2211\u220F\u222A\u2229\u2208\u2237\u221A\u22A5\u2225\u2220\u2312\u2299\u222B\u222E\u2261\u224C\u2248\u223D\u221D\u2260\u226E\u226F\u2264\u2265\u221E\u2235\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFF04\xA4\uFFE0\uFFE1\u2030\xA7\u2116\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u203B\u2192\u2190\u2191\u2193\u3013"],["a2a1","\u2170",9],["a2b1","\u2488",19,"\u2474",19,"\u2460",9],["a2e5","\u3220",9],["a2f1","\u2160",11],["a3a1","\uFF01\uFF02\uFF03\uFFE5\uFF05",88,"\uFFE3"],["a4a1","\u3041",82],["a5a1","\u30A1",85],["a6a1","\u0391",16,"\u03A3",6],["a6c1","\u03B1",16,"\u03C3",6],["a6e0","\uFE35\uFE36\uFE39\uFE3A\uFE3F\uFE40\uFE3D\uFE3E\uFE41\uFE42\uFE43\uFE44"],["a6ee","\uFE3B\uFE3C\uFE37\uFE38\uFE31"],["a6f4","\uFE33\uFE34"],["a7a1","\u0410",5,"\u0401\u0416",25],["a7d1","\u0430",5,"\u0451\u0436",25],["a840","\u02CA\u02CB\u02D9\u2013\u2015\u2025\u2035\u2105\u2109\u2196\u2197\u2198\u2199\u2215\u221F\u2223\u2252\u2266\u2267\u22BF\u2550",35,"\u2581",6],["a880","\u2588",7,"\u2593\u2594\u2595\u25BC\u25BD\u25E2\u25E3\u25E4\u25E5\u2609\u2295\u3012\u301D\u301E"],["a8a1","\u0101\xE1\u01CE\xE0\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA\u01DC\xFC\xEA\u0251"],["a8bd","\u0144\u0148"],["a8c0","\u0261"],["a8c5","\u3105",36],["a940","\u3021",8,"\u32A3\u338E\u338F\u339C\u339D\u339E\u33A1\u33C4\u33CE\u33D1\u33D2\u33D5\uFE30\uFFE2\uFFE4"],["a959","\u2121\u3231"],["a95c","\u2010"],["a960","\u30FC\u309B\u309C\u30FD\u30FE\u3006\u309D\u309E\uFE49",9,"\uFE54\uFE55\uFE56\uFE57\uFE59",8],["a980","\uFE62",4,"\uFE68\uFE69\uFE6A\uFE6B"],["a996","\u3007"],["a9a4","\u2500",75],["aa40","\u72DC\u72DD\u72DF\u72E2",5,"\u72EA\u72EB\u72F5\u72F6\u72F9\u72FD\u72FE\u72FF\u7300\u7302\u7304",5,"\u730B\u730C\u730D\u730F\u7310\u7311\u7312\u7314\u7318\u7319\u731A\u731F\u7320\u7323\u7324\u7326\u7327\u7328\u732D\u732F\u7330\u7332\u7333\u7335\u7336\u733A\u733B\u733C\u733D\u7340",8],["aa80","\u7349\u734A\u734B\u734C\u734E\u734F\u7351\u7353\u7354\u7355\u7356\u7358",7,"\u7361",10,"\u736E\u7370\u7371"],["ab40","\u7372",11,"\u737F",4,"\u7385\u7386\u7388\u738A\u738C\u738D\u738F\u7390\u7392\u7393\u7394\u7395\u7397\u7398\u7399\u739A\u739C\u739D\u739E\u73A0\u73A1\u73A3",5,"\u73AA\u73AC\u73AD\u73B1\u73B4\u73B5\u73B6\u73B8\u73B9\u73BC\u73BD\u73BE\u73BF\u73C1\u73C3",4],["ab80","\u73CB\u73CC\u73CE\u73D2",6,"\u73DA\u73DB\u73DC\u73DD\u73DF\u73E1\u73E2\u73E3\u73E4\u73E6\u73E8\u73EA\u73EB\u73EC\u73EE\u73EF\u73F0\u73F1\u73F3",4],["ac40","\u73F8",10,"\u7404\u7407\u7408\u740B\u740C\u740D\u740E\u7411",8,"\u741C",5,"\u7423\u7424\u7427\u7429\u742B\u742D\u742F\u7431\u7432\u7437",4,"\u743D\u743E\u743F\u7440\u7442",11],["ac80","\u744E",6,"\u7456\u7458\u745D\u7460",12,"\u746E\u746F\u7471",4,"\u7478\u7479\u747A"],["ad40","\u747B\u747C\u747D\u747F\u7482\u7484\u7485\u7486\u7488\u7489\u748A\u748C\u748D\u748F\u7491",10,"\u749D\u749F",7,"\u74AA",15,"\u74BB",12],["ad80","\u74C8",9,"\u74D3",8,"\u74DD\u74DF\u74E1\u74E5\u74E7",6,"\u74F0\u74F1\u74F2"],["ae40","\u74F3\u74F5\u74F8",6,"\u7500\u7501\u7502\u7503\u7505",7,"\u750E\u7510\u7512\u7514\u7515\u7516\u7517\u751B\u751D\u751E\u7520",4,"\u7526\u7527\u752A\u752E\u7534\u7536\u7539\u753C\u753D\u753F\u7541\u7542\u7543\u7544\u7546\u7547\u7549\u754A\u754D\u7550\u7551\u7552\u7553\u7555\u7556\u7557\u7558"],["ae80","\u755D",7,"\u7567\u7568\u7569\u756B",6,"\u7573\u7575\u7576\u7577\u757A",4,"\u7580\u7581\u7582\u7584\u7585\u7587"],["af40","\u7588\u7589\u758A\u758C\u758D\u758E\u7590\u7593\u7595\u7598\u759B\u759C\u759E\u75A2\u75A6",4,"\u75AD\u75B6\u75B7\u75BA\u75BB\u75BF\u75C0\u75C1\u75C6\u75CB\u75CC\u75CE\u75CF\u75D0\u75D1\u75D3\u75D7\u75D9\u75DA\u75DC\u75DD\u75DF\u75E0\u75E1\u75E5\u75E9\u75EC\u75ED\u75EE\u75EF\u75F2\u75F3\u75F5\u75F6\u75F7\u75F8\u75FA\u75FB\u75FD\u75FE\u7602\u7604\u7606\u7607"],["af80","\u7608\u7609\u760B\u760D\u760E\u760F\u7611\u7612\u7613\u7614\u7616\u761A\u761C\u761D\u761E\u7621\u7623\u7627\u7628\u762C\u762E\u762F\u7631\u7632\u7636\u7637\u7639\u763A\u763B\u763D\u7641\u7642\u7644"],["b040","\u7645",6,"\u764E",5,"\u7655\u7657",4,"\u765D\u765F\u7660\u7661\u7662\u7664",6,"\u766C\u766D\u766E\u7670",7,"\u7679\u767A\u767C\u767F\u7680\u7681\u7683\u7685\u7689\u768A\u768C\u768D\u768F\u7690\u7692\u7694\u7695\u7697\u7698\u769A\u769B"],["b080","\u769C",7,"\u76A5",8,"\u76AF\u76B0\u76B3\u76B5",9,"\u76C0\u76C1\u76C3\u554A\u963F\u57C3\u6328\u54CE\u5509\u54C0\u7691\u764C\u853C\u77EE\u827E\u788D\u7231\u9698\u978D\u6C28\u5B89\u4FFA\u6309\u6697\u5CB8\u80FA\u6848\u80AE\u6602\u76CE\u51F9\u6556\u71AC\u7FF1\u8884\u50B2\u5965\u61CA\u6FB3\u82AD\u634C\u6252\u53ED\u5427\u7B06\u516B\u75A4\u5DF4\u62D4\u8DCB\u9776\u628A\u8019\u575D\u9738\u7F62\u7238\u767D\u67CF\u767E\u6446\u4F70\u8D25\u62DC\u7A17\u6591\u73ED\u642C\u6273\u822C\u9881\u677F\u7248\u626E\u62CC\u4F34\u74E3\u534A\u529E\u7ECA\u90A6\u5E2E\u6886\u699C\u8180\u7ED1\u68D2\u78C5\u868C\u9551\u508D\u8C24\u82DE\u80DE\u5305\u8912\u5265"],["b140","\u76C4\u76C7\u76C9\u76CB\u76CC\u76D3\u76D5\u76D9\u76DA\u76DC\u76DD\u76DE\u76E0",4,"\u76E6",7,"\u76F0\u76F3\u76F5\u76F6\u76F7\u76FA\u76FB\u76FD\u76FF\u7700\u7702\u7703\u7705\u7706\u770A\u770C\u770E",10,"\u771B\u771C\u771D\u771E\u7721\u7723\u7724\u7725\u7727\u772A\u772B"],["b180","\u772C\u772E\u7730",4,"\u7739\u773B\u773D\u773E\u773F\u7742\u7744\u7745\u7746\u7748",7,"\u7752",7,"\u775C\u8584\u96F9\u4FDD\u5821\u9971\u5B9D\u62B1\u62A5\u66B4\u8C79\u9C8D\u7206\u676F\u7891\u60B2\u5351\u5317\u8F88\u80CC\u8D1D\u94A1\u500D\u72C8\u5907\u60EB\u7119\u88AB\u5954\u82EF\u672C\u7B28\u5D29\u7EF7\u752D\u6CF5\u8E66\u8FF8\u903C\u9F3B\u6BD4\u9119\u7B14\u5F7C\u78A7\u84D6\u853D\u6BD5\u6BD9\u6BD6\u5E01\u5E87\u75F9\u95ED\u655D\u5F0A\u5FC5\u8F9F\u58C1\u81C2\u907F\u965B\u97AD\u8FB9\u7F16\u8D2C\u6241\u4FBF\u53D8\u535E\u8FA8\u8FA9\u8FAB\u904D\u6807\u5F6A\u8198\u8868\u9CD6\u618B\u522B\u762A\u5F6C\u658C\u6FD2\u6EE8\u5BBE\u6448\u5175\u51B0\u67C4\u4E19\u79C9\u997C\u70B3"],["b240","\u775D\u775E\u775F\u7760\u7764\u7767\u7769\u776A\u776D",11,"\u777A\u777B\u777C\u7781\u7782\u7783\u7786",5,"\u778F\u7790\u7793",11,"\u77A1\u77A3\u77A4\u77A6\u77A8\u77AB\u77AD\u77AE\u77AF\u77B1\u77B2\u77B4\u77B6",4],["b280","\u77BC\u77BE\u77C0",12,"\u77CE",8,"\u77D8\u77D9\u77DA\u77DD",4,"\u77E4\u75C5\u5E76\u73BB\u83E0\u64AD\u62E8\u94B5\u6CE2\u535A\u52C3\u640F\u94C2\u7B94\u4F2F\u5E1B\u8236\u8116\u818A\u6E24\u6CCA\u9A73\u6355\u535C\u54FA\u8865\u57E0\u4E0D\u5E03\u6B65\u7C3F\u90E8\u6016\u64E6\u731C\u88C1\u6750\u624D\u8D22\u776C\u8E29\u91C7\u5F69\u83DC\u8521\u9910\u53C2\u8695\u6B8B\u60ED\u60E8\u707F\u82CD\u8231\u4ED3\u6CA7\u85CF\u64CD\u7CD9\u69FD\u66F9\u8349\u5395\u7B56\u4FA7\u518C\u6D4B\u5C42\u8E6D\u63D2\u53C9\u832C\u8336\u67E5\u78B4\u643D\u5BDF\u5C94\u5DEE\u8BE7\u62C6\u67F4\u8C7A\u6400\u63BA\u8749\u998B\u8C17\u7F20\u94F2\u4EA7\u9610\u98A4\u660C\u7316"],["b340","\u77E6\u77E8\u77EA\u77EF\u77F0\u77F1\u77F2\u77F4\u77F5\u77F7\u77F9\u77FA\u77FB\u77FC\u7803",5,"\u780A\u780B\u780E\u780F\u7810\u7813\u7815\u7819\u781B\u781E\u7820\u7821\u7822\u7824\u7828\u782A\u782B\u782E\u782F\u7831\u7832\u7833\u7835\u7836\u783D\u783F\u7841\u7842\u7843\u7844\u7846\u7848\u7849\u784A\u784B\u784D\u784F\u7851\u7853\u7854\u7858\u7859\u785A"],["b380","\u785B\u785C\u785E",11,"\u786F",7,"\u7878\u7879\u787A\u787B\u787D",6,"\u573A\u5C1D\u5E38\u957F\u507F\u80A0\u5382\u655E\u7545\u5531\u5021\u8D85\u6284\u949E\u671D\u5632\u6F6E\u5DE2\u5435\u7092\u8F66\u626F\u64A4\u63A3\u5F7B\u6F88\u90F4\u81E3\u8FB0\u5C18\u6668\u5FF1\u6C89\u9648\u8D81\u886C\u6491\u79F0\u57CE\u6A59\u6210\u5448\u4E58\u7A0B\u60E9\u6F84\u8BDA\u627F\u901E\u9A8B\u79E4\u5403\u75F4\u6301\u5319\u6C60\u8FDF\u5F1B\u9A70\u803B\u9F7F\u4F88\u5C3A\u8D64\u7FC5\u65A5\u70BD\u5145\u51B2\u866B\u5D07\u5BA0\u62BD\u916C\u7574\u8E0C\u7A20\u6101\u7B79\u4EC7\u7EF8\u7785\u4E11\u81ED\u521D\u51FA\u6A71\u53A8\u8E87\u9504\u96CF\u6EC1\u9664\u695A"],["b440","\u7884\u7885\u7886\u7888\u788A\u788B\u788F\u7890\u7892\u7894\u7895\u7896\u7899\u789D\u789E\u78A0\u78A2\u78A4\u78A6\u78A8",7,"\u78B5\u78B6\u78B7\u78B8\u78BA\u78BB\u78BC\u78BD\u78BF\u78C0\u78C2\u78C3\u78C4\u78C6\u78C7\u78C8\u78CC\u78CD\u78CE\u78CF\u78D1\u78D2\u78D3\u78D6\u78D7\u78D8\u78DA",9],["b480","\u78E4\u78E5\u78E6\u78E7\u78E9\u78EA\u78EB\u78ED",4,"\u78F3\u78F5\u78F6\u78F8\u78F9\u78FB",5,"\u7902\u7903\u7904\u7906",6,"\u7840\u50A8\u77D7\u6410\u89E6\u5904\u63E3\u5DDD\u7A7F\u693D\u4F20\u8239\u5598\u4E32\u75AE\u7A97\u5E62\u5E8A\u95EF\u521B\u5439\u708A\u6376\u9524\u5782\u6625\u693F\u9187\u5507\u6DF3\u7EAF\u8822\u6233\u7EF0\u75B5\u8328\u78C1\u96CC\u8F9E\u6148\u74F7\u8BCD\u6B64\u523A\u8D50\u6B21\u806A\u8471\u56F1\u5306\u4ECE\u4E1B\u51D1\u7C97\u918B\u7C07\u4FC3\u8E7F\u7BE1\u7A9C\u6467\u5D14\u50AC\u8106\u7601\u7CB9\u6DEC\u7FE0\u6751\u5B58\u5BF8\u78CB\u64AE\u6413\u63AA\u632B\u9519\u642D\u8FBE\u7B54\u7629\u6253\u5927\u5446\u6B79\u50A3\u6234\u5E26\u6B86\u4EE3\u8D37\u888B\u5F85\u902E"],["b540","\u790D",5,"\u7914",9,"\u791F",4,"\u7925",14,"\u7935",4,"\u793D\u793F\u7942\u7943\u7944\u7945\u7947\u794A",8,"\u7954\u7955\u7958\u7959\u7961\u7963"],["b580","\u7964\u7966\u7969\u796A\u796B\u796C\u796E\u7970",6,"\u7979\u797B",4,"\u7982\u7983\u7986\u7987\u7988\u7989\u798B\u798C\u798D\u798E\u7990\u7991\u7992\u6020\u803D\u62C5\u4E39\u5355\u90F8\u63B8\u80C6\u65E6\u6C2E\u4F46\u60EE\u6DE1\u8BDE\u5F39\u86CB\u5F53\u6321\u515A\u8361\u6863\u5200\u6363\u8E48\u5012\u5C9B\u7977\u5BFC\u5230\u7A3B\u60BC\u9053\u76D7\u5FB7\u5F97\u7684\u8E6C\u706F\u767B\u7B49\u77AA\u51F3\u9093\u5824\u4F4E\u6EF4\u8FEA\u654C\u7B1B\u72C4\u6DA4\u7FDF\u5AE1\u62B5\u5E95\u5730\u8482\u7B2C\u5E1D\u5F1F\u9012\u7F14\u98A0\u6382\u6EC7\u7898\u70B9\u5178\u975B\u57AB\u7535\u4F43\u7538\u5E97\u60E6\u5960\u6DC0\u6BBF\u7889\u53FC\u96D5\u51CB\u5201\u6389\u540A\u9493\u8C03\u8DCC\u7239\u789F\u8776\u8FED\u8C0D\u53E0"],["b640","\u7993",6,"\u799B",11,"\u79A8",10,"\u79B4",4,"\u79BC\u79BF\u79C2\u79C4\u79C5\u79C7\u79C8\u79CA\u79CC\u79CE\u79CF\u79D0\u79D3\u79D4\u79D6\u79D7\u79D9",5,"\u79E0\u79E1\u79E2\u79E5\u79E8\u79EA"],["b680","\u79EC\u79EE\u79F1",6,"\u79F9\u79FA\u79FC\u79FE\u79FF\u7A01\u7A04\u7A05\u7A07\u7A08\u7A09\u7A0A\u7A0C\u7A0F",4,"\u7A15\u7A16\u7A18\u7A19\u7A1B\u7A1C\u4E01\u76EF\u53EE\u9489\u9876\u9F0E\u952D\u5B9A\u8BA2\u4E22\u4E1C\u51AC\u8463\u61C2\u52A8\u680B\u4F97\u606B\u51BB\u6D1E\u515C\u6296\u6597\u9661\u8C46\u9017\u75D8\u90FD\u7763\u6BD2\u728A\u72EC\u8BFB\u5835\u7779\u8D4C\u675C\u9540\u809A\u5EA6\u6E21\u5992\u7AEF\u77ED\u953B\u6BB5\u65AD\u7F0E\u5806\u5151\u961F\u5BF9\u58A9\u5428\u8E72\u6566\u987F\u56E4\u949D\u76FE\u9041\u6387\u54C6\u591A\u593A\u579B\u8EB2\u6735\u8DFA\u8235\u5241\u60F0\u5815\u86FE\u5CE8\u9E45\u4FC4\u989D\u8BB9\u5A25\u6076\u5384\u627C\u904F\u9102\u997F\u6069\u800C\u513F\u8033\u5C14\u9975\u6D31\u4E8C"],["b740","\u7A1D\u7A1F\u7A21\u7A22\u7A24",14,"\u7A34\u7A35\u7A36\u7A38\u7A3A\u7A3E\u7A40",5,"\u7A47",9,"\u7A52",4,"\u7A58",16],["b780","\u7A69",6,"\u7A71\u7A72\u7A73\u7A75\u7A7B\u7A7C\u7A7D\u7A7E\u7A82\u7A85\u7A87\u7A89\u7A8A\u7A8B\u7A8C\u7A8E\u7A8F\u7A90\u7A93\u7A94\u7A99\u7A9A\u7A9B\u7A9E\u7AA1\u7AA2\u8D30\u53D1\u7F5A\u7B4F\u4F10\u4E4F\u9600\u6CD5\u73D0\u85E9\u5E06\u756A\u7FFB\u6A0A\u77FE\u9492\u7E41\u51E1\u70E6\u53CD\u8FD4\u8303\u8D29\u72AF\u996D\u6CDB\u574A\u82B3\u65B9\u80AA\u623F\u9632\u59A8\u4EFF\u8BBF\u7EBA\u653E\u83F2\u975E\u5561\u98DE\u80A5\u532A\u8BFD\u5420\u80BA\u5E9F\u6CB8\u8D39\u82AC\u915A\u5429\u6C1B\u5206\u7EB7\u575F\u711A\u6C7E\u7C89\u594B\u4EFD\u5FFF\u6124\u7CAA\u4E30\u5C01\u67AB\u8702\u5CF0\u950B\u98CE\u75AF\u70FD\u9022\u51AF\u7F1D\u8BBD\u5949\u51E4\u4F5B\u5426\u592B\u6577\u80A4\u5B75\u6276\u62C2\u8F90\u5E45\u6C1F\u7B26\u4F0F\u4FD8\u670D"],["b840","\u7AA3\u7AA4\u7AA7\u7AA9\u7AAA\u7AAB\u7AAE",4,"\u7AB4",10,"\u7AC0",10,"\u7ACC",9,"\u7AD7\u7AD8\u7ADA\u7ADB\u7ADC\u7ADD\u7AE1\u7AE2\u7AE4\u7AE7",5,"\u7AEE\u7AF0\u7AF1\u7AF2\u7AF3"],["b880","\u7AF4",4,"\u7AFB\u7AFC\u7AFE\u7B00\u7B01\u7B02\u7B05\u7B07\u7B09\u7B0C\u7B0D\u7B0E\u7B10\u7B12\u7B13\u7B16\u7B17\u7B18\u7B1A\u7B1C\u7B1D\u7B1F\u7B21\u7B22\u7B23\u7B27\u7B29\u7B2D\u6D6E\u6DAA\u798F\u88B1\u5F17\u752B\u629A\u8F85\u4FEF\u91DC\u65A7\u812F\u8151\u5E9C\u8150\u8D74\u526F\u8986\u8D4B\u590D\u5085\u4ED8\u961C\u7236\u8179\u8D1F\u5BCC\u8BA3\u9644\u5987\u7F1A\u5490\u5676\u560E\u8BE5\u6539\u6982\u9499\u76D6\u6E89\u5E72\u7518\u6746\u67D1\u7AFF\u809D\u8D76\u611F\u79C6\u6562\u8D63\u5188\u521A\u94A2\u7F38\u809B\u7EB2\u5C97\u6E2F\u6760\u7BD9\u768B\u9AD8\u818F\u7F94\u7CD5\u641E\u9550\u7A3F\u544A\u54E5\u6B4C\u6401\u6208\u9E3D\u80F3\u7599\u5272\u9769\u845B\u683C\u86E4\u9601\u9694\u94EC\u4E2A\u5404\u7ED9\u6839\u8DDF\u8015\u66F4\u5E9A\u7FB9"],["b940","\u7B2F\u7B30\u7B32\u7B34\u7B35\u7B36\u7B37\u7B39\u7B3B\u7B3D\u7B3F",5,"\u7B46\u7B48\u7B4A\u7B4D\u7B4E\u7B53\u7B55\u7B57\u7B59\u7B5C\u7B5E\u7B5F\u7B61\u7B63",10,"\u7B6F\u7B70\u7B73\u7B74\u7B76\u7B78\u7B7A\u7B7C\u7B7D\u7B7F\u7B81\u7B82\u7B83\u7B84\u7B86",6,"\u7B8E\u7B8F"],["b980","\u7B91\u7B92\u7B93\u7B96\u7B98\u7B99\u7B9A\u7B9B\u7B9E\u7B9F\u7BA0\u7BA3\u7BA4\u7BA5\u7BAE\u7BAF\u7BB0\u7BB2\u7BB3\u7BB5\u7BB6\u7BB7\u7BB9",7,"\u7BC2\u7BC3\u7BC4\u57C2\u803F\u6897\u5DE5\u653B\u529F\u606D\u9F9A\u4F9B\u8EAC\u516C\u5BAB\u5F13\u5DE9\u6C5E\u62F1\u8D21\u5171\u94A9\u52FE\u6C9F\u82DF\u72D7\u57A2\u6784\u8D2D\u591F\u8F9C\u83C7\u5495\u7B8D\u4F30\u6CBD\u5B64\u59D1\u9F13\u53E4\u86CA\u9AA8\u8C37\u80A1\u6545\u987E\u56FA\u96C7\u522E\u74DC\u5250\u5BE1\u6302\u8902\u4E56\u62D0\u602A\u68FA\u5173\u5B98\u51A0\u89C2\u7BA1\u9986\u7F50\u60EF\u704C\u8D2F\u5149\u5E7F\u901B\u7470\u89C4\u572D\u7845\u5F52\u9F9F\u95FA\u8F68\u9B3C\u8BE1\u7678\u6842\u67DC\u8DEA\u8D35\u523D\u8F8A\u6EDA\u68CD\u9505\u90ED\u56FD\u679C\u88F9\u8FC7\u54C8"],["ba40","\u7BC5\u7BC8\u7BC9\u7BCA\u7BCB\u7BCD\u7BCE\u7BCF\u7BD0\u7BD2\u7BD4",4,"\u7BDB\u7BDC\u7BDE\u7BDF\u7BE0\u7BE2\u7BE3\u7BE4\u7BE7\u7BE8\u7BE9\u7BEB\u7BEC\u7BED\u7BEF\u7BF0\u7BF2",4,"\u7BF8\u7BF9\u7BFA\u7BFB\u7BFD\u7BFF",7,"\u7C08\u7C09\u7C0A\u7C0D\u7C0E\u7C10",5,"\u7C17\u7C18\u7C19"],["ba80","\u7C1A",4,"\u7C20",5,"\u7C28\u7C29\u7C2B",12,"\u7C39",5,"\u7C42\u9AB8\u5B69\u6D77\u6C26\u4EA5\u5BB3\u9A87\u9163\u61A8\u90AF\u97E9\u542B\u6DB5\u5BD2\u51FD\u558A\u7F55\u7FF0\u64BC\u634D\u65F1\u61BE\u608D\u710A\u6C57\u6C49\u592F\u676D\u822A\u58D5\u568E\u8C6A\u6BEB\u90DD\u597D\u8017\u53F7\u6D69\u5475\u559D\u8377\u83CF\u6838\u79BE\u548C\u4F55\u5408\u76D2\u8C89\u9602\u6CB3\u6DB8\u8D6B\u8910\u9E64\u8D3A\u563F\u9ED1\u75D5\u5F88\u72E0\u6068\u54FC\u4EA8\u6A2A\u8861\u6052\u8F70\u54C4\u70D8\u8679\u9E3F\u6D2A\u5B8F\u5F18\u7EA2\u5589\u4FAF\u7334\u543C\u539A\u5019\u540E\u547C\u4E4E\u5FFD\u745A\u58F6\u846B\u80E1\u8774\u72D0\u7CCA\u6E56"],["bb40","\u7C43",9,"\u7C4E",36,"\u7C75",5,"\u7C7E",9],["bb80","\u7C88\u7C8A",6,"\u7C93\u7C94\u7C96\u7C99\u7C9A\u7C9B\u7CA0\u7CA1\u7CA3\u7CA6\u7CA7\u7CA8\u7CA9\u7CAB\u7CAC\u7CAD\u7CAF\u7CB0\u7CB4",4,"\u7CBA\u7CBB\u5F27\u864E\u552C\u62A4\u4E92\u6CAA\u6237\u82B1\u54D7\u534E\u733E\u6ED1\u753B\u5212\u5316\u8BDD\u69D0\u5F8A\u6000\u6DEE\u574F\u6B22\u73AF\u6853\u8FD8\u7F13\u6362\u60A3\u5524\u75EA\u8C62\u7115\u6DA3\u5BA6\u5E7B\u8352\u614C\u9EC4\u78FA\u8757\u7C27\u7687\u51F0\u60F6\u714C\u6643\u5E4C\u604D\u8C0E\u7070\u6325\u8F89\u5FBD\u6062\u86D4\u56DE\u6BC1\u6094\u6167\u5349\u60E0\u6666\u8D3F\u79FD\u4F1A\u70E9\u6C47\u8BB3\u8BF2\u7ED8\u8364\u660F\u5A5A\u9B42\u6D51\u6DF7\u8C41\u6D3B\u4F19\u706B\u83B7\u6216\u60D1\u970D\u8D27\u7978\u51FB\u573E\u57FA\u673A\u7578\u7A3D\u79EF\u7B95"],["bc40","\u7CBF\u7CC0\u7CC2\u7CC3\u7CC4\u7CC6\u7CC9\u7CCB\u7CCE",6,"\u7CD8\u7CDA\u7CDB\u7CDD\u7CDE\u7CE1",6,"\u7CE9",5,"\u7CF0",7,"\u7CF9\u7CFA\u7CFC",13,"\u7D0B",5],["bc80","\u7D11",14,"\u7D21\u7D23\u7D24\u7D25\u7D26\u7D28\u7D29\u7D2A\u7D2C\u7D2D\u7D2E\u7D30",6,"\u808C\u9965\u8FF9\u6FC0\u8BA5\u9E21\u59EC\u7EE9\u7F09\u5409\u6781\u68D8\u8F91\u7C4D\u96C6\u53CA\u6025\u75BE\u6C72\u5373\u5AC9\u7EA7\u6324\u51E0\u810A\u5DF1\u84DF\u6280\u5180\u5B63\u4F0E\u796D\u5242\u60B8\u6D4E\u5BC4\u5BC2\u8BA1\u8BB0\u65E2\u5FCC\u9645\u5993\u7EE7\u7EAA\u5609\u67B7\u5939\u4F73\u5BB6\u52A0\u835A\u988A\u8D3E\u7532\u94BE\u5047\u7A3C\u4EF7\u67B6\u9A7E\u5AC1\u6B7C\u76D1\u575A\u5C16\u7B3A\u95F4\u714E\u517C\u80A9\u8270\u5978\u7F04\u8327\u68C0\u67EC\u78B1\u7877\u62E3\u6361\u7B80\u4FED\u526A\u51CF\u8350\u69DB\u9274\u8DF5\u8D31\u89C1\u952E\u7BAD\u4EF6"],["bd40","\u7D37",54,"\u7D6F",7],["bd80","\u7D78",32,"\u5065\u8230\u5251\u996F\u6E10\u6E85\u6DA7\u5EFA\u50F5\u59DC\u5C06\u6D46\u6C5F\u7586\u848B\u6868\u5956\u8BB2\u5320\u9171\u964D\u8549\u6912\u7901\u7126\u80F6\u4EA4\u90CA\u6D47\u9A84\u5A07\u56BC\u6405\u94F0\u77EB\u4FA5\u811A\u72E1\u89D2\u997A\u7F34\u7EDE\u527F\u6559\u9175\u8F7F\u8F83\u53EB\u7A96\u63ED\u63A5\u7686\u79F8\u8857\u9636\u622A\u52AB\u8282\u6854\u6770\u6377\u776B\u7AED\u6D01\u7ED3\u89E3\u59D0\u6212\u85C9\u82A5\u754C\u501F\u4ECB\u75A5\u8BEB\u5C4A\u5DFE\u7B4B\u65A4\u91D1\u4ECA\u6D25\u895F\u7D27\u9526\u4EC5\u8C28\u8FDB\u9773\u664B\u7981\u8FD1\u70EC\u6D78"],["be40","\u7D99",12,"\u7DA7",6,"\u7DAF",42],["be80","\u7DDA",32,"\u5C3D\u52B2\u8346\u5162\u830E\u775B\u6676\u9CB8\u4EAC\u60CA\u7CBE\u7CB3\u7ECF\u4E95\u8B66\u666F\u9888\u9759\u5883\u656C\u955C\u5F84\u75C9\u9756\u7ADF\u7ADE\u51C0\u70AF\u7A98\u63EA\u7A76\u7EA0\u7396\u97ED\u4E45\u7078\u4E5D\u9152\u53A9\u6551\u65E7\u81FC\u8205\u548E\u5C31\u759A\u97A0\u62D8\u72D9\u75BD\u5C45\u9A79\u83CA\u5C40\u5480\u77E9\u4E3E\u6CAE\u805A\u62D2\u636E\u5DE8\u5177\u8DDD\u8E1E\u952F\u4FF1\u53E5\u60E7\u70AC\u5267\u6350\u9E43\u5A1F\u5026\u7737\u5377\u7EE2\u6485\u652B\u6289\u6398\u5014\u7235\u89C9\u51B3\u8BC0\u7EDD\u5747\u83CC\u94A7\u519B\u541B\u5CFB"],["bf40","\u7DFB",62],["bf80","\u7E3A\u7E3C",4,"\u7E42",4,"\u7E48",21,"\u4FCA\u7AE3\u6D5A\u90E1\u9A8F\u5580\u5496\u5361\u54AF\u5F00\u63E9\u6977\u51EF\u6168\u520A\u582A\u52D8\u574E\u780D\u770B\u5EB7\u6177\u7CE0\u625B\u6297\u4EA2\u7095\u8003\u62F7\u70E4\u9760\u5777\u82DB\u67EF\u68F5\u78D5\u9897\u79D1\u58F3\u54B3\u53EF\u6E34\u514B\u523B\u5BA2\u8BFE\u80AF\u5543\u57A6\u6073\u5751\u542D\u7A7A\u6050\u5B54\u63A7\u62A0\u53E3\u6263\u5BC7\u67AF\u54ED\u7A9F\u82E6\u9177\u5E93\u88E4\u5938\u57AE\u630E\u8DE8\u80EF\u5757\u7B77\u4FA9\u5FEB\u5BBD\u6B3E\u5321\u7B50\u72C2\u6846\u77FF\u7736\u65F7\u51B5\u4E8F\u76D4\u5CBF\u7AA5\u8475\u594E\u9B41\u5080"],["c040","\u7E5E",35,"\u7E83",23,"\u7E9C\u7E9D\u7E9E"],["c080","\u7EAE\u7EB4\u7EBB\u7EBC\u7ED6\u7EE4\u7EEC\u7EF9\u7F0A\u7F10\u7F1E\u7F37\u7F39\u7F3B",6,"\u7F43\u7F46",9,"\u7F52\u7F53\u9988\u6127\u6E83\u5764\u6606\u6346\u56F0\u62EC\u6269\u5ED3\u9614\u5783\u62C9\u5587\u8721\u814A\u8FA3\u5566\u83B1\u6765\u8D56\u84DD\u5A6A\u680F\u62E6\u7BEE\u9611\u5170\u6F9C\u8C30\u63FD\u89C8\u61D2\u7F06\u70C2\u6EE5\u7405\u6994\u72FC\u5ECA\u90CE\u6717\u6D6A\u635E\u52B3\u7262\u8001\u4F6C\u59E5\u916A\u70D9\u6D9D\u52D2\u4E50\u96F7\u956D\u857E\u78CA\u7D2F\u5121\u5792\u64C2\u808B\u7C7B\u6CEA\u68F1\u695E\u51B7\u5398\u68A8\u7281\u9ECE\u7BF1\u72F8\u79BB\u6F13\u7406\u674E\u91CC\u9CA4\u793C\u8389\u8354\u540F\u6817\u4E3D\u5389\u52B1\u783E\u5386\u5229\u5088\u4F8B\u4FD0"],["c140","\u7F56\u7F59\u7F5B\u7F5C\u7F5D\u7F5E\u7F60\u7F63",4,"\u7F6B\u7F6C\u7F6D\u7F6F\u7F70\u7F73\u7F75\u7F76\u7F77\u7F78\u7F7A\u7F7B\u7F7C\u7F7D\u7F7F\u7F80\u7F82",7,"\u7F8B\u7F8D\u7F8F",4,"\u7F95",4,"\u7F9B\u7F9C\u7FA0\u7FA2\u7FA3\u7FA5\u7FA6\u7FA8",6,"\u7FB1"],["c180","\u7FB3",4,"\u7FBA\u7FBB\u7FBE\u7FC0\u7FC2\u7FC3\u7FC4\u7FC6\u7FC7\u7FC8\u7FC9\u7FCB\u7FCD\u7FCF",4,"\u7FD6\u7FD7\u7FD9",5,"\u7FE2\u7FE3\u75E2\u7ACB\u7C92\u6CA5\u96B6\u529B\u7483\u54E9\u4FE9\u8054\u83B2\u8FDE\u9570\u5EC9\u601C\u6D9F\u5E18\u655B\u8138\u94FE\u604B\u70BC\u7EC3\u7CAE\u51C9\u6881\u7CB1\u826F\u4E24\u8F86\u91CF\u667E\u4EAE\u8C05\u64A9\u804A\u50DA\u7597\u71CE\u5BE5\u8FBD\u6F66\u4E86\u6482\u9563\u5ED6\u6599\u5217\u88C2\u70C8\u52A3\u730E\u7433\u6797\u78F7\u9716\u4E34\u90BB\u9CDE\u6DCB\u51DB\u8D41\u541D\u62CE\u73B2\u83F1\u96F6\u9F84\u94C3\u4F36\u7F9A\u51CC\u7075\u9675\u5CAD\u9886\u53E6\u4EE4\u6E9C\u7409\u69B4\u786B\u998F\u7559\u5218\u7624\u6D41\u67F3\u516D\u9F99\u804B\u5499\u7B3C\u7ABF"],["c240","\u7FE4\u7FE7\u7FE8\u7FEA\u7FEB\u7FEC\u7FED\u7FEF\u7FF2\u7FF4",6,"\u7FFD\u7FFE\u7FFF\u8002\u8007\u8008\u8009\u800A\u800E\u800F\u8011\u8013\u801A\u801B\u801D\u801E\u801F\u8021\u8023\u8024\u802B",5,"\u8032\u8034\u8039\u803A\u803C\u803E\u8040\u8041\u8044\u8045\u8047\u8048\u8049\u804E\u804F\u8050\u8051\u8053\u8055\u8056\u8057"],["c280","\u8059\u805B",13,"\u806B",5,"\u8072",11,"\u9686\u5784\u62E2\u9647\u697C\u5A04\u6402\u7BD3\u6F0F\u964B\u82A6\u5362\u9885\u5E90\u7089\u63B3\u5364\u864F\u9C81\u9E93\u788C\u9732\u8DEF\u8D42\u9E7F\u6F5E\u7984\u5F55\u9646\u622E\u9A74\u5415\u94DD\u4FA3\u65C5\u5C65\u5C61\u7F15\u8651\u6C2F\u5F8B\u7387\u6EE4\u7EFF\u5CE6\u631B\u5B6A\u6EE6\u5375\u4E71\u63A0\u7565\u62A1\u8F6E\u4F26\u4ED1\u6CA6\u7EB6\u8BBA\u841D\u87BA\u7F57\u903B\u9523\u7BA9\u9AA1\u88F8\u843D\u6D1B\u9A86\u7EDC\u5988\u9EBB\u739B\u7801\u8682\u9A6C\u9A82\u561B\u5417\u57CB\u4E70\u9EA6\u5356\u8FC8\u8109\u7792\u9992\u86EE\u6EE1\u8513\u66FC\u6162\u6F2B"],["c340","\u807E\u8081\u8082\u8085\u8088\u808A\u808D",5,"\u8094\u8095\u8097\u8099\u809E\u80A3\u80A6\u80A7\u80A8\u80AC\u80B0\u80B3\u80B5\u80B6\u80B8\u80B9\u80BB\u80C5\u80C7",4,"\u80CF",6,"\u80D8\u80DF\u80E0\u80E2\u80E3\u80E6\u80EE\u80F5\u80F7\u80F9\u80FB\u80FE\u80FF\u8100\u8101\u8103\u8104\u8105\u8107\u8108\u810B"],["c380","\u810C\u8115\u8117\u8119\u811B\u811C\u811D\u811F",12,"\u812D\u812E\u8130\u8133\u8134\u8135\u8137\u8139",4,"\u813F\u8C29\u8292\u832B\u76F2\u6C13\u5FD9\u83BD\u732B\u8305\u951A\u6BDB\u77DB\u94C6\u536F\u8302\u5192\u5E3D\u8C8C\u8D38\u4E48\u73AB\u679A\u6885\u9176\u9709\u7164\u6CA1\u7709\u5A92\u9541\u6BCF\u7F8E\u6627\u5BD0\u59B9\u5A9A\u95E8\u95F7\u4EEC\u840C\u8499\u6AAC\u76DF\u9530\u731B\u68A6\u5B5F\u772F\u919A\u9761\u7CDC\u8FF7\u8C1C\u5F25\u7C73\u79D8\u89C5\u6CCC\u871C\u5BC6\u5E42\u68C9\u7720\u7EF5\u5195\u514D\u52C9\u5A29\u7F05\u9762\u82D7\u63CF\u7784\u85D0\u79D2\u6E3A\u5E99\u5999\u8511\u706D\u6C11\u62BF\u76BF\u654F\u60AF\u95FD\u660E\u879F\u9E23\u94ED\u540D\u547D\u8C2C\u6478"],["c440","\u8140",5,"\u8147\u8149\u814D\u814E\u814F\u8152\u8156\u8157\u8158\u815B",4,"\u8161\u8162\u8163\u8164\u8166\u8168\u816A\u816B\u816C\u816F\u8172\u8173\u8175\u8176\u8177\u8178\u8181\u8183",4,"\u8189\u818B\u818C\u818D\u818E\u8190\u8192",5,"\u8199\u819A\u819E",4,"\u81A4\u81A5"],["c480","\u81A7\u81A9\u81AB",7,"\u81B4",5,"\u81BC\u81BD\u81BE\u81BF\u81C4\u81C5\u81C7\u81C8\u81C9\u81CB\u81CD",6,"\u6479\u8611\u6A21\u819C\u78E8\u6469\u9B54\u62B9\u672B\u83AB\u58A8\u9ED8\u6CAB\u6F20\u5BDE\u964C\u8C0B\u725F\u67D0\u62C7\u7261\u4EA9\u59C6\u6BCD\u5893\u66AE\u5E55\u52DF\u6155\u6728\u76EE\u7766\u7267\u7A46\u62FF\u54EA\u5450\u94A0\u90A3\u5A1C\u7EB3\u6C16\u4E43\u5976\u8010\u5948\u5357\u7537\u96BE\u56CA\u6320\u8111\u607C\u95F9\u6DD6\u5462\u9981\u5185\u5AE9\u80FD\u59AE\u9713\u502A\u6CE5\u5C3C\u62DF\u4F60\u533F\u817B\u9006\u6EBA\u852B\u62C8\u5E74\u78BE\u64B5\u637B\u5FF5\u5A18\u917F\u9E1F\u5C3F\u634F\u8042\u5B7D\u556E\u954A\u954D\u6D85\u60A8\u67E0\u72DE\u51DD\u5B81"],["c540","\u81D4",14,"\u81E4\u81E5\u81E6\u81E8\u81E9\u81EB\u81EE",4,"\u81F5",5,"\u81FD\u81FF\u8203\u8207",4,"\u820E\u820F\u8211\u8213\u8215",5,"\u821D\u8220\u8224\u8225\u8226\u8227\u8229\u822E\u8232\u823A\u823C\u823D\u823F"],["c580","\u8240\u8241\u8242\u8243\u8245\u8246\u8248\u824A\u824C\u824D\u824E\u8250",7,"\u8259\u825B\u825C\u825D\u825E\u8260",7,"\u8269\u62E7\u6CDE\u725B\u626D\u94AE\u7EBD\u8113\u6D53\u519C\u5F04\u5974\u52AA\u6012\u5973\u6696\u8650\u759F\u632A\u61E6\u7CEF\u8BFA\u54E6\u6B27\u9E25\u6BB4\u85D5\u5455\u5076\u6CA4\u556A\u8DB4\u722C\u5E15\u6015\u7436\u62CD\u6392\u724C\u5F98\u6E43\u6D3E\u6500\u6F58\u76D8\u78D0\u76FC\u7554\u5224\u53DB\u4E53\u5E9E\u65C1\u802A\u80D6\u629B\u5486\u5228\u70AE\u888D\u8DD1\u6CE1\u5478\u80DA\u57F9\u88F4\u8D54\u966A\u914D\u4F69\u6C9B\u55B7\u76C6\u7830\u62A8\u70F9\u6F8E\u5F6D\u84EC\u68DA\u787C\u7BF7\u81A8\u670B\u9E4F\u6367\u78B0\u576F\u7812\u9739\u6279\u62AB\u5288\u7435\u6BD7"],["c640","\u826A\u826B\u826C\u826D\u8271\u8275\u8276\u8277\u8278\u827B\u827C\u8280\u8281\u8283\u8285\u8286\u8287\u8289\u828C\u8290\u8293\u8294\u8295\u8296\u829A\u829B\u829E\u82A0\u82A2\u82A3\u82A7\u82B2\u82B5\u82B6\u82BA\u82BB\u82BC\u82BF\u82C0\u82C2\u82C3\u82C5\u82C6\u82C9\u82D0\u82D6\u82D9\u82DA\u82DD\u82E2\u82E7\u82E8\u82E9\u82EA\u82EC\u82ED\u82EE\u82F0\u82F2\u82F3\u82F5\u82F6\u82F8"],["c680","\u82FA\u82FC",4,"\u830A\u830B\u830D\u8310\u8312\u8313\u8316\u8318\u8319\u831D",9,"\u8329\u832A\u832E\u8330\u8332\u8337\u833B\u833D\u5564\u813E\u75B2\u76AE\u5339\u75DE\u50FB\u5C41\u8B6C\u7BC7\u504F\u7247\u9A97\u98D8\u6F02\u74E2\u7968\u6487\u77A5\u62FC\u9891\u8D2B\u54C1\u8058\u4E52\u576A\u82F9\u840D\u5E73\u51ED\u74F6\u8BC4\u5C4F\u5761\u6CFC\u9887\u5A46\u7834\u9B44\u8FEB\u7C95\u5256\u6251\u94FA\u4EC6\u8386\u8461\u83E9\u84B2\u57D4\u6734\u5703\u666E\u6D66\u8C31\u66DD\u7011\u671F\u6B3A\u6816\u621A\u59BB\u4E03\u51C4\u6F06\u67D2\u6C8F\u5176\u68CB\u5947\u6B67\u7566\u5D0E\u8110\u9F50\u65D7\u7948\u7941\u9A91\u8D77\u5C82\u4E5E\u4F01\u542F\u5951\u780C\u5668\u6C14\u8FC4\u5F03\u6C7D\u6CE3\u8BAB\u6390"],["c740","\u833E\u833F\u8341\u8342\u8344\u8345\u8348\u834A",4,"\u8353\u8355",4,"\u835D\u8362\u8370",6,"\u8379\u837A\u837E",6,"\u8387\u8388\u838A\u838B\u838C\u838D\u838F\u8390\u8391\u8394\u8395\u8396\u8397\u8399\u839A\u839D\u839F\u83A1",6,"\u83AC\u83AD\u83AE"],["c780","\u83AF\u83B5\u83BB\u83BE\u83BF\u83C2\u83C3\u83C4\u83C6\u83C8\u83C9\u83CB\u83CD\u83CE\u83D0\u83D1\u83D2\u83D3\u83D5\u83D7\u83D9\u83DA\u83DB\u83DE\u83E2\u83E3\u83E4\u83E6\u83E7\u83E8\u83EB\u83EC\u83ED\u6070\u6D3D\u7275\u6266\u948E\u94C5\u5343\u8FC1\u7B7E\u4EDF\u8C26\u4E7E\u9ED4\u94B1\u94B3\u524D\u6F5C\u9063\u6D45\u8C34\u5811\u5D4C\u6B20\u6B49\u67AA\u545B\u8154\u7F8C\u5899\u8537\u5F3A\u62A2\u6A47\u9539\u6572\u6084\u6865\u77A7\u4E54\u4FA8\u5DE7\u9798\u64AC\u7FD8\u5CED\u4FCF\u7A8D\u5207\u8304\u4E14\u602F\u7A83\u94A6\u4FB5\u4EB2\u79E6\u7434\u52E4\u82B9\u64D2\u79BD\u5BDD\u6C81\u9752\u8F7B\u6C22\u503E\u537F\u6E05\u64CE\u6674\u6C30\u60C5\u9877\u8BF7\u5E86\u743C\u7A77\u79CB\u4E18\u90B1\u7403\u6C42\u56DA\u914B\u6CC5\u8D8B\u533A\u86C6\u66F2\u8EAF\u5C48\u9A71\u6E20"],["c840","\u83EE\u83EF\u83F3",4,"\u83FA\u83FB\u83FC\u83FE\u83FF\u8400\u8402\u8405\u8407\u8408\u8409\u840A\u8410\u8412",5,"\u8419\u841A\u841B\u841E",5,"\u8429",7,"\u8432",5,"\u8439\u843A\u843B\u843E",7,"\u8447\u8448\u8449"],["c880","\u844A",6,"\u8452",4,"\u8458\u845D\u845E\u845F\u8460\u8462\u8464",4,"\u846A\u846E\u846F\u8470\u8472\u8474\u8477\u8479\u847B\u847C\u53D6\u5A36\u9F8B\u8DA3\u53BB\u5708\u98A7\u6743\u919B\u6CC9\u5168\u75CA\u62F3\u72AC\u5238\u529D\u7F3A\u7094\u7638\u5374\u9E4A\u69B7\u786E\u96C0\u88D9\u7FA4\u7136\u71C3\u5189\u67D3\u74E4\u58E4\u6518\u56B7\u8BA9\u9976\u6270\u7ED5\u60F9\u70ED\u58EC\u4EC1\u4EBA\u5FCD\u97E7\u4EFB\u8BA4\u5203\u598A\u7EAB\u6254\u4ECD\u65E5\u620E\u8338\u84C9\u8363\u878D\u7194\u6EB6\u5BB9\u7ED2\u5197\u63C9\u67D4\u8089\u8339\u8815\u5112\u5B7A\u5982\u8FB1\u4E73\u6C5D\u5165\u8925\u8F6F\u962E\u854A\u745E\u9510\u95F0\u6DA6\u82E5\u5F31\u6492\u6D12\u8428\u816E\u9CC3\u585E\u8D5B\u4E09\u53C1"],["c940","\u847D",4,"\u8483\u8484\u8485\u8486\u848A\u848D\u848F",7,"\u8498\u849A\u849B\u849D\u849E\u849F\u84A0\u84A2",12,"\u84B0\u84B1\u84B3\u84B5\u84B6\u84B7\u84BB\u84BC\u84BE\u84C0\u84C2\u84C3\u84C5\u84C6\u84C7\u84C8\u84CB\u84CC\u84CE\u84CF\u84D2\u84D4\u84D5\u84D7"],["c980","\u84D8",4,"\u84DE\u84E1\u84E2\u84E4\u84E7",4,"\u84ED\u84EE\u84EF\u84F1",10,"\u84FD\u84FE\u8500\u8501\u8502\u4F1E\u6563\u6851\u55D3\u4E27\u6414\u9A9A\u626B\u5AC2\u745F\u8272\u6DA9\u68EE\u50E7\u838E\u7802\u6740\u5239\u6C99\u7EB1\u50BB\u5565\u715E\u7B5B\u6652\u73CA\u82EB\u6749\u5C71\u5220\u717D\u886B\u95EA\u9655\u64C5\u8D61\u81B3\u5584\u6C55\u6247\u7F2E\u5892\u4F24\u5546\u8D4F\u664C\u4E0A\u5C1A\u88F3\u68A2\u634E\u7A0D\u70E7\u828D\u52FA\u97F6\u5C11\u54E8\u90B5\u7ECD\u5962\u8D4A\u86C7\u820C\u820D\u8D66\u6444\u5C04\u6151\u6D89\u793E\u8BBE\u7837\u7533\u547B\u4F38\u8EAB\u6DF1\u5A20\u7EC5\u795E\u6C88\u5BA1\u5A76\u751A\u80BE\u614E\u6E17\u58F0\u751F\u7525\u7272\u5347\u7EF3"],["ca40","\u8503",8,"\u850D\u850E\u850F\u8510\u8512\u8514\u8515\u8516\u8518\u8519\u851B\u851C\u851D\u851E\u8520\u8522",8,"\u852D",9,"\u853E",4,"\u8544\u8545\u8546\u8547\u854B",10],["ca80","\u8557\u8558\u855A\u855B\u855C\u855D\u855F",4,"\u8565\u8566\u8567\u8569",8,"\u8573\u8575\u8576\u8577\u8578\u857C\u857D\u857F\u8580\u8581\u7701\u76DB\u5269\u80DC\u5723\u5E08\u5931\u72EE\u65BD\u6E7F\u8BD7\u5C38\u8671\u5341\u77F3\u62FE\u65F6\u4EC0\u98DF\u8680\u5B9E\u8BC6\u53F2\u77E2\u4F7F\u5C4E\u9A76\u59CB\u5F0F\u793A\u58EB\u4E16\u67FF\u4E8B\u62ED\u8A93\u901D\u52BF\u662F\u55DC\u566C\u9002\u4ED5\u4F8D\u91CA\u9970\u6C0F\u5E02\u6043\u5BA4\u89C6\u8BD5\u6536\u624B\u9996\u5B88\u5BFF\u6388\u552E\u53D7\u7626\u517D\u852C\u67A2\u68B3\u6B8A\u6292\u8F93\u53D4\u8212\u6DD1\u758F\u4E66\u8D4E\u5B70\u719F\u85AF\u6691\u66D9\u7F72\u8700\u9ECD\u9F20\u5C5E\u672F\u8FF0\u6811\u675F\u620D\u7AD6\u5885\u5EB6\u6570\u6F31"],["cb40","\u8582\u8583\u8586\u8588",6,"\u8590",10,"\u859D",6,"\u85A5\u85A6\u85A7\u85A9\u85AB\u85AC\u85AD\u85B1",5,"\u85B8\u85BA",6,"\u85C2",6,"\u85CA",4,"\u85D1\u85D2"],["cb80","\u85D4\u85D6",5,"\u85DD",6,"\u85E5\u85E6\u85E7\u85E8\u85EA",14,"\u6055\u5237\u800D\u6454\u8870\u7529\u5E05\u6813\u62F4\u971C\u53CC\u723D\u8C01\u6C34\u7761\u7A0E\u542E\u77AC\u987A\u821C\u8BF4\u7855\u6714\u70C1\u65AF\u6495\u5636\u601D\u79C1\u53F8\u4E1D\u6B7B\u8086\u5BFA\u55E3\u56DB\u4F3A\u4F3C\u9972\u5DF3\u677E\u8038\u6002\u9882\u9001\u5B8B\u8BBC\u8BF5\u641C\u8258\u64DE\u55FD\u82CF\u9165\u4FD7\u7D20\u901F\u7C9F\u50F3\u5851\u6EAF\u5BBF\u8BC9\u8083\u9178\u849C\u7B97\u867D\u968B\u968F\u7EE5\u9AD3\u788E\u5C81\u7A57\u9042\u96A7\u795F\u5B59\u635F\u7B0B\u84D1\u68AD\u5506\u7F29\u7410\u7D22\u9501\u6240\u584C\u4ED6\u5B83\u5979\u5854"],["cc40","\u85F9\u85FA\u85FC\u85FD\u85FE\u8600",4,"\u8606",10,"\u8612\u8613\u8614\u8615\u8617",15,"\u8628\u862A",13,"\u8639\u863A\u863B\u863D\u863E\u863F\u8640"],["cc80","\u8641",11,"\u8652\u8653\u8655",4,"\u865B\u865C\u865D\u865F\u8660\u8661\u8663",7,"\u736D\u631E\u8E4B\u8E0F\u80CE\u82D4\u62AC\u53F0\u6CF0\u915E\u592A\u6001\u6C70\u574D\u644A\u8D2A\u762B\u6EE9\u575B\u6A80\u75F0\u6F6D\u8C2D\u8C08\u5766\u6BEF\u8892\u78B3\u63A2\u53F9\u70AD\u6C64\u5858\u642A\u5802\u68E0\u819B\u5510\u7CD6\u5018\u8EBA\u6DCC\u8D9F\u70EB\u638F\u6D9B\u6ED4\u7EE6\u8404\u6843\u9003\u6DD8\u9676\u8BA8\u5957\u7279\u85E4\u817E\u75BC\u8A8A\u68AF\u5254\u8E22\u9511\u63D0\u9898\u8E44\u557C\u4F53\u66FF\u568F\u60D5\u6D95\u5243\u5C49\u5929\u6DFB\u586B\u7530\u751C\u606C\u8214\u8146\u6311\u6761\u8FE2\u773A\u8DF3\u8D34\u94C1\u5E16\u5385\u542C\u70C3"],["cd40","\u866D\u866F\u8670\u8672",6,"\u8683",6,"\u868E",4,"\u8694\u8696",5,"\u869E",4,"\u86A5\u86A6\u86AB\u86AD\u86AE\u86B2\u86B3\u86B7\u86B8\u86B9\u86BB",4,"\u86C1\u86C2\u86C3\u86C5\u86C8\u86CC\u86CD\u86D2\u86D3\u86D5\u86D6\u86D7\u86DA\u86DC"],["cd80","\u86DD\u86E0\u86E1\u86E2\u86E3\u86E5\u86E6\u86E7\u86E8\u86EA\u86EB\u86EC\u86EF\u86F5\u86F6\u86F7\u86FA\u86FB\u86FC\u86FD\u86FF\u8701\u8704\u8705\u8706\u870B\u870C\u870E\u870F\u8710\u8711\u8714\u8716\u6C40\u5EF7\u505C\u4EAD\u5EAD\u633A\u8247\u901A\u6850\u916E\u77B3\u540C\u94DC\u5F64\u7AE5\u6876\u6345\u7B52\u7EDF\u75DB\u5077\u6295\u5934\u900F\u51F8\u79C3\u7A81\u56FE\u5F92\u9014\u6D82\u5C60\u571F\u5410\u5154\u6E4D\u56E2\u63A8\u9893\u817F\u8715\u892A\u9000\u541E\u5C6F\u81C0\u62D6\u6258\u8131\u9E35\u9640\u9A6E\u9A7C\u692D\u59A5\u62D3\u553E\u6316\u54C7\u86D9\u6D3C\u5A03\u74E6\u889C\u6B6A\u5916\u8C4C\u5F2F\u6E7E\u73A9\u987D\u4E38\u70F7\u5B8C\u7897\u633D\u665A\u7696\u60CB\u5B9B\u5A49\u4E07\u8155\u6C6A\u738B\u4EA1\u6789\u7F51\u5F80\u65FA\u671B\u5FD8\u5984\u5A01"],["ce40","\u8719\u871B\u871D\u871F\u8720\u8724\u8726\u8727\u8728\u872A\u872B\u872C\u872D\u872F\u8730\u8732\u8733\u8735\u8736\u8738\u8739\u873A\u873C\u873D\u8740",6,"\u874A\u874B\u874D\u874F\u8750\u8751\u8752\u8754\u8755\u8756\u8758\u875A",5,"\u8761\u8762\u8766",7,"\u876F\u8771\u8772\u8773\u8775"],["ce80","\u8777\u8778\u8779\u877A\u877F\u8780\u8781\u8784\u8786\u8787\u8789\u878A\u878C\u878E",4,"\u8794\u8795\u8796\u8798",6,"\u87A0",4,"\u5DCD\u5FAE\u5371\u97E6\u8FDD\u6845\u56F4\u552F\u60DF\u4E3A\u6F4D\u7EF4\u82C7\u840E\u59D4\u4F1F\u4F2A\u5C3E\u7EAC\u672A\u851A\u5473\u754F\u80C3\u5582\u9B4F\u4F4D\u6E2D\u8C13\u5C09\u6170\u536B\u761F\u6E29\u868A\u6587\u95FB\u7EB9\u543B\u7A33\u7D0A\u95EE\u55E1\u7FC1\u74EE\u631D\u8717\u6DA1\u7A9D\u6211\u65A1\u5367\u63E1\u6C83\u5DEB\u545C\u94A8\u4E4C\u6C61\u8BEC\u5C4B\u65E0\u829C\u68A7\u543E\u5434\u6BCB\u6B66\u4E94\u6342\u5348\u821E\u4F0D\u4FAE\u575E\u620A\u96FE\u6664\u7269\u52FF\u52A1\u609F\u8BEF\u6614\u7199\u6790\u897F\u7852\u77FD\u6670\u563B\u5438\u9521\u727A"],["cf40","\u87A5\u87A6\u87A7\u87A9\u87AA\u87AE\u87B0\u87B1\u87B2\u87B4\u87B6\u87B7\u87B8\u87B9\u87BB\u87BC\u87BE\u87BF\u87C1",4,"\u87C7\u87C8\u87C9\u87CC",4,"\u87D4",6,"\u87DC\u87DD\u87DE\u87DF\u87E1\u87E2\u87E3\u87E4\u87E6\u87E7\u87E8\u87E9\u87EB\u87EC\u87ED\u87EF",9],["cf80","\u87FA\u87FB\u87FC\u87FD\u87FF\u8800\u8801\u8802\u8804",5,"\u880B",7,"\u8814\u8817\u8818\u8819\u881A\u881C",4,"\u8823\u7A00\u606F\u5E0C\u6089\u819D\u5915\u60DC\u7184\u70EF\u6EAA\u6C50\u7280\u6A84\u88AD\u5E2D\u4E60\u5AB3\u559C\u94E3\u6D17\u7CFB\u9699\u620F\u7EC6\u778E\u867E\u5323\u971E\u8F96\u6687\u5CE1\u4FA0\u72ED\u4E0B\u53A6\u590F\u5413\u6380\u9528\u5148\u4ED9\u9C9C\u7EA4\u54B8\u8D24\u8854\u8237\u95F2\u6D8E\u5F26\u5ACC\u663E\u9669\u73B0\u732E\u53BF\u817A\u9985\u7FA1\u5BAA\u9677\u9650\u7EBF\u76F8\u53A2\u9576\u9999\u7BB1\u8944\u6E58\u4E61\u7FD4\u7965\u8BE6\u60F3\u54CD\u4EAB\u9879\u5DF7\u6A61\u50CF\u5411\u8C61\u8427\u785D\u9704\u524A\u54EE\u56A3\u9500\u6D88\u5BB5\u6DC6\u6653"],["d040","\u8824",13,"\u8833",5,"\u883A\u883B\u883D\u883E\u883F\u8841\u8842\u8843\u8846",5,"\u884E",5,"\u8855\u8856\u8858\u885A",6,"\u8866\u8867\u886A\u886D\u886F\u8871\u8873\u8874\u8875\u8876\u8878\u8879\u887A"],["d080","\u887B\u887C\u8880\u8883\u8886\u8887\u8889\u888A\u888C\u888E\u888F\u8890\u8891\u8893\u8894\u8895\u8897",4,"\u889D",4,"\u88A3\u88A5",5,"\u5C0F\u5B5D\u6821\u8096\u5578\u7B11\u6548\u6954\u4E9B\u6B47\u874E\u978B\u534F\u631F\u643A\u90AA\u659C\u80C1\u8C10\u5199\u68B0\u5378\u87F9\u61C8\u6CC4\u6CFB\u8C22\u5C51\u85AA\u82AF\u950C\u6B23\u8F9B\u65B0\u5FFB\u5FC3\u4FE1\u8845\u661F\u8165\u7329\u60FA\u5174\u5211\u578B\u5F62\u90A2\u884C\u9192\u5E78\u674F\u6027\u59D3\u5144\u51F6\u80F8\u5308\u6C79\u96C4\u718A\u4F11\u4FEE\u7F9E\u673D\u55C5\u9508\u79C0\u8896\u7EE3\u589F\u620C\u9700\u865A\u5618\u987B\u5F90\u8BB8\u84C4\u9157\u53D9\u65ED\u5E8F\u755C\u6064\u7D6E\u5A7F\u7EEA\u7EED\u8F69\u55A7\u5BA3\u60AC\u65CB\u7384"],["d140","\u88AC\u88AE\u88AF\u88B0\u88B2",4,"\u88B8\u88B9\u88BA\u88BB\u88BD\u88BE\u88BF\u88C0\u88C3\u88C4\u88C7\u88C8\u88CA\u88CB\u88CC\u88CD\u88CF\u88D0\u88D1\u88D3\u88D6\u88D7\u88DA",4,"\u88E0\u88E1\u88E6\u88E7\u88E9",6,"\u88F2\u88F5\u88F6\u88F7\u88FA\u88FB\u88FD\u88FF\u8900\u8901\u8903",5],["d180","\u8909\u890B",4,"\u8911\u8914",4,"\u891C",4,"\u8922\u8923\u8924\u8926\u8927\u8928\u8929\u892C\u892D\u892E\u892F\u8931\u8932\u8933\u8935\u8937\u9009\u7663\u7729\u7EDA\u9774\u859B\u5B66\u7A74\u96EA\u8840\u52CB\u718F\u5FAA\u65EC\u8BE2\u5BFB\u9A6F\u5DE1\u6B89\u6C5B\u8BAD\u8BAF\u900A\u8FC5\u538B\u62BC\u9E26\u9E2D\u5440\u4E2B\u82BD\u7259\u869C\u5D16\u8859\u6DAF\u96C5\u54D1\u4E9A\u8BB6\u7109\u54BD\u9609\u70DF\u6DF9\u76D0\u4E25\u7814\u8712\u5CA9\u5EF6\u8A00\u989C\u960E\u708E\u6CBF\u5944\u63A9\u773C\u884D\u6F14\u8273\u5830\u71D5\u538C\u781A\u96C1\u5501\u5F66\u7130\u5BB4\u8C1A\u9A8C\u6B83\u592E\u9E2F\u79E7\u6768\u626C\u4F6F\u75A1\u7F8A\u6D0B\u9633\u6C27\u4EF0\u75D2\u517B\u6837\u6F3E\u9080\u8170\u5996\u7476"],["d240","\u8938",8,"\u8942\u8943\u8945",24,"\u8960",5,"\u8967",19,"\u897C"],["d280","\u897D\u897E\u8980\u8982\u8984\u8985\u8987",26,"\u6447\u5C27\u9065\u7A91\u8C23\u59DA\u54AC\u8200\u836F\u8981\u8000\u6930\u564E\u8036\u7237\u91CE\u51B6\u4E5F\u9875\u6396\u4E1A\u53F6\u66F3\u814B\u591C\u6DB2\u4E00\u58F9\u533B\u63D6\u94F1\u4F9D\u4F0A\u8863\u9890\u5937\u9057\u79FB\u4EEA\u80F0\u7591\u6C82\u5B9C\u59E8\u5F5D\u6905\u8681\u501A\u5DF2\u4E59\u77E3\u4EE5\u827A\u6291\u6613\u9091\u5C79\u4EBF\u5F79\u81C6\u9038\u8084\u75AB\u4EA6\u88D4\u610F\u6BC5\u5FC6\u4E49\u76CA\u6EA2\u8BE3\u8BAE\u8C0A\u8BD1\u5F02\u7FFC\u7FCC\u7ECE\u8335\u836B\u56E0\u6BB7\u97F3\u9634\u59FB\u541F\u94F6\u6DEB\u5BC5\u996E\u5C39\u5F15\u9690"],["d340","\u89A2",30,"\u89C3\u89CD\u89D3\u89D4\u89D5\u89D7\u89D8\u89D9\u89DB\u89DD\u89DF\u89E0\u89E1\u89E2\u89E4\u89E7\u89E8\u89E9\u89EA\u89EC\u89ED\u89EE\u89F0\u89F1\u89F2\u89F4",6],["d380","\u89FB",4,"\u8A01",5,"\u8A08",21,"\u5370\u82F1\u6A31\u5A74\u9E70\u5E94\u7F28\u83B9\u8424\u8425\u8367\u8747\u8FCE\u8D62\u76C8\u5F71\u9896\u786C\u6620\u54DF\u62E5\u4F63\u81C3\u75C8\u5EB8\u96CD\u8E0A\u86F9\u548F\u6CF3\u6D8C\u6C38\u607F\u52C7\u7528\u5E7D\u4F18\u60A0\u5FE7\u5C24\u7531\u90AE\u94C0\u72B9\u6CB9\u6E38\u9149\u6709\u53CB\u53F3\u4F51\u91C9\u8BF1\u53C8\u5E7C\u8FC2\u6DE4\u4E8E\u76C2\u6986\u865E\u611A\u8206\u4F59\u4FDE\u903E\u9C7C\u6109\u6E1D\u6E14\u9685\u4E88\u5A31\u96E8\u4E0E\u5C7F\u79B9\u5B87\u8BED\u7FBD\u7389\u57DF\u828B\u90C1\u5401\u9047\u55BB\u5CEA\u5FA1\u6108\u6B32\u72F1\u80B2\u8A89"],["d440","\u8A1E",31,"\u8A3F",8,"\u8A49",21],["d480","\u8A5F",25,"\u8A7A",6,"\u6D74\u5BD3\u88D5\u9884\u8C6B\u9A6D\u9E33\u6E0A\u51A4\u5143\u57A3\u8881\u539F\u63F4\u8F95\u56ED\u5458\u5706\u733F\u6E90\u7F18\u8FDC\u82D1\u613F\u6028\u9662\u66F0\u7EA6\u8D8A\u8DC3\u94A5\u5CB3\u7CA4\u6708\u60A6\u9605\u8018\u4E91\u90E7\u5300\u9668\u5141\u8FD0\u8574\u915D\u6655\u97F5\u5B55\u531D\u7838\u6742\u683D\u54C9\u707E\u5BB0\u8F7D\u518D\u5728\u54B1\u6512\u6682\u8D5E\u8D43\u810F\u846C\u906D\u7CDF\u51FF\u85FB\u67A3\u65E9\u6FA1\u86A4\u8E81\u566A\u9020\u7682\u7076\u71E5\u8D23\u62E9\u5219\u6CFD\u8D3C\u600E\u589E\u618E\u66FE\u8D60\u624E\u55B3\u6E23\u672D\u8F67"],["d540","\u8A81",7,"\u8A8B",7,"\u8A94",46],["d580","\u8AC3",32,"\u94E1\u95F8\u7728\u6805\u69A8\u548B\u4E4D\u70B8\u8BC8\u6458\u658B\u5B85\u7A84\u503A\u5BE8\u77BB\u6BE1\u8A79\u7C98\u6CBE\u76CF\u65A9\u8F97\u5D2D\u5C55\u8638\u6808\u5360\u6218\u7AD9\u6E5B\u7EFD\u6A1F\u7AE0\u5F70\u6F33\u5F20\u638C\u6DA8\u6756\u4E08\u5E10\u8D26\u4ED7\u80C0\u7634\u969C\u62DB\u662D\u627E\u6CBC\u8D75\u7167\u7F69\u5146\u8087\u53EC\u906E\u6298\u54F2\u86F0\u8F99\u8005\u9517\u8517\u8FD9\u6D59\u73CD\u659F\u771F\u7504\u7827\u81FB\u8D1E\u9488\u4FA6\u6795\u75B9\u8BCA\u9707\u632F\u9547\u9635\u84B8\u6323\u7741\u5F81\u72F0\u4E89\u6014\u6574\u62EF\u6B63\u653F"],["d640","\u8AE4",34,"\u8B08",27],["d680","\u8B24\u8B25\u8B27",30,"\u5E27\u75C7\u90D1\u8BC1\u829D\u679D\u652F\u5431\u8718\u77E5\u80A2\u8102\u6C41\u4E4B\u7EC7\u804C\u76F4\u690D\u6B96\u6267\u503C\u4F84\u5740\u6307\u6B62\u8DBE\u53EA\u65E8\u7EB8\u5FD7\u631A\u63B7\u81F3\u81F4\u7F6E\u5E1C\u5CD9\u5236\u667A\u79E9\u7A1A\u8D28\u7099\u75D4\u6EDE\u6CBB\u7A92\u4E2D\u76C5\u5FE0\u949F\u8877\u7EC8\u79CD\u80BF\u91CD\u4EF2\u4F17\u821F\u5468\u5DDE\u6D32\u8BCC\u7CA5\u8F74\u8098\u5E1A\u5492\u76B1\u5B99\u663C\u9AA4\u73E0\u682A\u86DB\u6731\u732A\u8BF8\u8BDB\u9010\u7AF9\u70DB\u716E\u62C4\u77A9\u5631\u4E3B\u8457\u67F1\u52A9\u86C0\u8D2E\u94F8\u7B51"],["d740","\u8B46",31,"\u8B67",4,"\u8B6D",25],["d780","\u8B87",24,"\u8BAC\u8BB1\u8BBB\u8BC7\u8BD0\u8BEA\u8C09\u8C1E\u4F4F\u6CE8\u795D\u9A7B\u6293\u722A\u62FD\u4E13\u7816\u8F6C\u64B0\u8D5A\u7BC6\u6869\u5E84\u88C5\u5986\u649E\u58EE\u72B6\u690E\u9525\u8FFD\u8D58\u5760\u7F00\u8C06\u51C6\u6349\u62D9\u5353\u684C\u7422\u8301\u914C\u5544\u7740\u707C\u6D4A\u5179\u54A8\u8D44\u59FF\u6ECB\u6DC4\u5B5C\u7D2B\u4ED4\u7C7D\u6ED3\u5B50\u81EA\u6E0D\u5B57\u9B03\u68D5\u8E2A\u5B97\u7EFC\u603B\u7EB5\u90B9\u8D70\u594F\u63CD\u79DF\u8DB3\u5352\u65CF\u7956\u8BC5\u963B\u7EC4\u94BB\u7E82\u5634\u9189\u6700\u7F6A\u5C0A\u9075\u6628\u5DE6\u4F50\u67DE\u505A\u4F5C\u5750\u5EA7"],["d840","\u8C38",8,"\u8C42\u8C43\u8C44\u8C45\u8C48\u8C4A\u8C4B\u8C4D",7,"\u8C56\u8C57\u8C58\u8C59\u8C5B",5,"\u8C63",6,"\u8C6C",6,"\u8C74\u8C75\u8C76\u8C77\u8C7B",6,"\u8C83\u8C84\u8C86\u8C87"],["d880","\u8C88\u8C8B\u8C8D",6,"\u8C95\u8C96\u8C97\u8C99",20,"\u4E8D\u4E0C\u5140\u4E10\u5EFF\u5345\u4E15\u4E98\u4E1E\u9B32\u5B6C\u5669\u4E28\u79BA\u4E3F\u5315\u4E47\u592D\u723B\u536E\u6C10\u56DF\u80E4\u9997\u6BD3\u777E\u9F17\u4E36\u4E9F\u9F10\u4E5C\u4E69\u4E93\u8288\u5B5B\u556C\u560F\u4EC4\u538D\u539D\u53A3\u53A5\u53AE\u9765\u8D5D\u531A\u53F5\u5326\u532E\u533E\u8D5C\u5366\u5363\u5202\u5208\u520E\u522D\u5233\u523F\u5240\u524C\u525E\u5261\u525C\u84AF\u527D\u5282\u5281\u5290\u5293\u5182\u7F54\u4EBB\u4EC3\u4EC9\u4EC2\u4EE8\u4EE1\u4EEB\u4EDE\u4F1B\u4EF3\u4F22\u4F64\u4EF5\u4F25\u4F27\u4F09\u4F2B\u4F5E\u4F67\u6538\u4F5A\u4F5D"],["d940","\u8CAE",62],["d980","\u8CED",32,"\u4F5F\u4F57\u4F32\u4F3D\u4F76\u4F74\u4F91\u4F89\u4F83\u4F8F\u4F7E\u4F7B\u4FAA\u4F7C\u4FAC\u4F94\u4FE6\u4FE8\u4FEA\u4FC5\u4FDA\u4FE3\u4FDC\u4FD1\u4FDF\u4FF8\u5029\u504C\u4FF3\u502C\u500F\u502E\u502D\u4FFE\u501C\u500C\u5025\u5028\u507E\u5043\u5055\u5048\u504E\u506C\u507B\u50A5\u50A7\u50A9\u50BA\u50D6\u5106\u50ED\u50EC\u50E6\u50EE\u5107\u510B\u4EDD\u6C3D\u4F58\u4F65\u4FCE\u9FA0\u6C46\u7C74\u516E\u5DFD\u9EC9\u9998\u5181\u5914\u52F9\u530D\u8A07\u5310\u51EB\u5919\u5155\u4EA0\u5156\u4EB3\u886E\u88A4\u4EB5\u8114\u88D2\u7980\u5B34\u8803\u7FB8\u51AB\u51B1\u51BD\u51BC"],["da40","\u8D0E",14,"\u8D20\u8D51\u8D52\u8D57\u8D5F\u8D65\u8D68\u8D69\u8D6A\u8D6C\u8D6E\u8D6F\u8D71\u8D72\u8D78",8,"\u8D82\u8D83\u8D86\u8D87\u8D88\u8D89\u8D8C",4,"\u8D92\u8D93\u8D95",9,"\u8DA0\u8DA1"],["da80","\u8DA2\u8DA4",12,"\u8DB2\u8DB6\u8DB7\u8DB9\u8DBB\u8DBD\u8DC0\u8DC1\u8DC2\u8DC5\u8DC7\u8DC8\u8DC9\u8DCA\u8DCD\u8DD0\u8DD2\u8DD3\u8DD4\u51C7\u5196\u51A2\u51A5\u8BA0\u8BA6\u8BA7\u8BAA\u8BB4\u8BB5\u8BB7\u8BC2\u8BC3\u8BCB\u8BCF\u8BCE\u8BD2\u8BD3\u8BD4\u8BD6\u8BD8\u8BD9\u8BDC\u8BDF\u8BE0\u8BE4\u8BE8\u8BE9\u8BEE\u8BF0\u8BF3\u8BF6\u8BF9\u8BFC\u8BFF\u8C00\u8C02\u8C04\u8C07\u8C0C\u8C0F\u8C11\u8C12\u8C14\u8C15\u8C16\u8C19\u8C1B\u8C18\u8C1D\u8C1F\u8C20\u8C21\u8C25\u8C27\u8C2A\u8C2B\u8C2E\u8C2F\u8C32\u8C33\u8C35\u8C36\u5369\u537A\u961D\u9622\u9621\u9631\u962A\u963D\u963C\u9642\u9649\u9654\u965F\u9667\u966C\u9672\u9674\u9688\u968D\u9697\u96B0\u9097\u909B\u909D\u9099\u90AC\u90A1\u90B4\u90B3\u90B6\u90BA"],["db40","\u8DD5\u8DD8\u8DD9\u8DDC\u8DE0\u8DE1\u8DE2\u8DE5\u8DE6\u8DE7\u8DE9\u8DED\u8DEE\u8DF0\u8DF1\u8DF2\u8DF4\u8DF6\u8DFC\u8DFE",6,"\u8E06\u8E07\u8E08\u8E0B\u8E0D\u8E0E\u8E10\u8E11\u8E12\u8E13\u8E15",7,"\u8E20\u8E21\u8E24",4,"\u8E2B\u8E2D\u8E30\u8E32\u8E33\u8E34\u8E36\u8E37\u8E38\u8E3B\u8E3C\u8E3E"],["db80","\u8E3F\u8E43\u8E45\u8E46\u8E4C",4,"\u8E53",5,"\u8E5A",11,"\u8E67\u8E68\u8E6A\u8E6B\u8E6E\u8E71\u90B8\u90B0\u90CF\u90C5\u90BE\u90D0\u90C4\u90C7\u90D3\u90E6\u90E2\u90DC\u90D7\u90DB\u90EB\u90EF\u90FE\u9104\u9122\u911E\u9123\u9131\u912F\u9139\u9143\u9146\u520D\u5942\u52A2\u52AC\u52AD\u52BE\u54FF\u52D0\u52D6\u52F0\u53DF\u71EE\u77CD\u5EF4\u51F5\u51FC\u9B2F\u53B6\u5F01\u755A\u5DEF\u574C\u57A9\u57A1\u587E\u58BC\u58C5\u58D1\u5729\u572C\u572A\u5733\u5739\u572E\u572F\u575C\u573B\u5742\u5769\u5785\u576B\u5786\u577C\u577B\u5768\u576D\u5776\u5773\u57AD\u57A4\u578C\u57B2\u57CF\u57A7\u57B4\u5793\u57A0\u57D5\u57D8\u57DA\u57D9\u57D2\u57B8\u57F4\u57EF\u57F8\u57E4\u57DD"],["dc40","\u8E73\u8E75\u8E77",4,"\u8E7D\u8E7E\u8E80\u8E82\u8E83\u8E84\u8E86\u8E88",6,"\u8E91\u8E92\u8E93\u8E95",6,"\u8E9D\u8E9F",11,"\u8EAD\u8EAE\u8EB0\u8EB1\u8EB3",6,"\u8EBB",7],["dc80","\u8EC3",10,"\u8ECF",21,"\u580B\u580D\u57FD\u57ED\u5800\u581E\u5819\u5844\u5820\u5865\u586C\u5881\u5889\u589A\u5880\u99A8\u9F19\u61FF\u8279\u827D\u827F\u828F\u828A\u82A8\u8284\u828E\u8291\u8297\u8299\u82AB\u82B8\u82BE\u82B0\u82C8\u82CA\u82E3\u8298\u82B7\u82AE\u82CB\u82CC\u82C1\u82A9\u82B4\u82A1\u82AA\u829F\u82C4\u82CE\u82A4\u82E1\u8309\u82F7\u82E4\u830F\u8307\u82DC\u82F4\u82D2\u82D8\u830C\u82FB\u82D3\u8311\u831A\u8306\u8314\u8315\u82E0\u82D5\u831C\u8351\u835B\u835C\u8308\u8392\u833C\u8334\u8331\u839B\u835E\u832F\u834F\u8347\u8343\u835F\u8340\u8317\u8360\u832D\u833A\u8333\u8366\u8365"],["dd40","\u8EE5",62],["dd80","\u8F24",32,"\u8368\u831B\u8369\u836C\u836A\u836D\u836E\u83B0\u8378\u83B3\u83B4\u83A0\u83AA\u8393\u839C\u8385\u837C\u83B6\u83A9\u837D\u83B8\u837B\u8398\u839E\u83A8\u83BA\u83BC\u83C1\u8401\u83E5\u83D8\u5807\u8418\u840B\u83DD\u83FD\u83D6\u841C\u8438\u8411\u8406\u83D4\u83DF\u840F\u8403\u83F8\u83F9\u83EA\u83C5\u83C0\u8426\u83F0\u83E1\u845C\u8451\u845A\u8459\u8473\u8487\u8488\u847A\u8489\u8478\u843C\u8446\u8469\u8476\u848C\u848E\u8431\u846D\u84C1\u84CD\u84D0\u84E6\u84BD\u84D3\u84CA\u84BF\u84BA\u84E0\u84A1\u84B9\u84B4\u8497\u84E5\u84E3\u850C\u750D\u8538\u84F0\u8539\u851F\u853A"],["de40","\u8F45",32,"\u8F6A\u8F80\u8F8C\u8F92\u8F9D\u8FA0\u8FA1\u8FA2\u8FA4\u8FA5\u8FA6\u8FA7\u8FAA\u8FAC\u8FAD\u8FAE\u8FAF\u8FB2\u8FB3\u8FB4\u8FB5\u8FB7\u8FB8\u8FBA\u8FBB\u8FBC\u8FBF\u8FC0\u8FC3\u8FC6"],["de80","\u8FC9",4,"\u8FCF\u8FD2\u8FD6\u8FD7\u8FDA\u8FE0\u8FE1\u8FE3\u8FE7\u8FEC\u8FEF\u8FF1\u8FF2\u8FF4\u8FF5\u8FF6\u8FFA\u8FFB\u8FFC\u8FFE\u8FFF\u9007\u9008\u900C\u900E\u9013\u9015\u9018\u8556\u853B\u84FF\u84FC\u8559\u8548\u8568\u8564\u855E\u857A\u77A2\u8543\u8572\u857B\u85A4\u85A8\u8587\u858F\u8579\u85AE\u859C\u8585\u85B9\u85B7\u85B0\u85D3\u85C1\u85DC\u85FF\u8627\u8605\u8629\u8616\u863C\u5EFE\u5F08\u593C\u5941\u8037\u5955\u595A\u5958\u530F\u5C22\u5C25\u5C2C\u5C34\u624C\u626A\u629F\u62BB\u62CA\u62DA\u62D7\u62EE\u6322\u62F6\u6339\u634B\u6343\u63AD\u63F6\u6371\u637A\u638E\u63B4\u636D\u63AC\u638A\u6369\u63AE\u63BC\u63F2\u63F8\u63E0\u63FF\u63C4\u63DE\u63CE\u6452\u63C6\u63BE\u6445\u6441\u640B\u641B\u6420\u640C\u6426\u6421\u645E\u6484\u646D\u6496"],["df40","\u9019\u901C\u9023\u9024\u9025\u9027",5,"\u9030",4,"\u9037\u9039\u903A\u903D\u903F\u9040\u9043\u9045\u9046\u9048",4,"\u904E\u9054\u9055\u9056\u9059\u905A\u905C",5,"\u9064\u9066\u9067\u9069\u906A\u906B\u906C\u906F",4,"\u9076",6,"\u907E\u9081"],["df80","\u9084\u9085\u9086\u9087\u9089\u908A\u908C",4,"\u9092\u9094\u9096\u9098\u909A\u909C\u909E\u909F\u90A0\u90A4\u90A5\u90A7\u90A8\u90A9\u90AB\u90AD\u90B2\u90B7\u90BC\u90BD\u90BF\u90C0\u647A\u64B7\u64B8\u6499\u64BA\u64C0\u64D0\u64D7\u64E4\u64E2\u6509\u6525\u652E\u5F0B\u5FD2\u7519\u5F11\u535F\u53F1\u53FD\u53E9\u53E8\u53FB\u5412\u5416\u5406\u544B\u5452\u5453\u5454\u5456\u5443\u5421\u5457\u5459\u5423\u5432\u5482\u5494\u5477\u5471\u5464\u549A\u549B\u5484\u5476\u5466\u549D\u54D0\u54AD\u54C2\u54B4\u54D2\u54A7\u54A6\u54D3\u54D4\u5472\u54A3\u54D5\u54BB\u54BF\u54CC\u54D9\u54DA\u54DC\u54A9\u54AA\u54A4\u54DD\u54CF\u54DE\u551B\u54E7\u5520\u54FD\u5514\u54F3\u5522\u5523\u550F\u5511\u5527\u552A\u5567\u558F\u55B5\u5549\u556D\u5541\u5555\u553F\u5550\u553C"],["e040","\u90C2\u90C3\u90C6\u90C8\u90C9\u90CB\u90CC\u90CD\u90D2\u90D4\u90D5\u90D6\u90D8\u90D9\u90DA\u90DE\u90DF\u90E0\u90E3\u90E4\u90E5\u90E9\u90EA\u90EC\u90EE\u90F0\u90F1\u90F2\u90F3\u90F5\u90F6\u90F7\u90F9\u90FA\u90FB\u90FC\u90FF\u9100\u9101\u9103\u9105",19,"\u911A\u911B\u911C"],["e080","\u911D\u911F\u9120\u9121\u9124",10,"\u9130\u9132",6,"\u913A",8,"\u9144\u5537\u5556\u5575\u5576\u5577\u5533\u5530\u555C\u558B\u55D2\u5583\u55B1\u55B9\u5588\u5581\u559F\u557E\u55D6\u5591\u557B\u55DF\u55BD\u55BE\u5594\u5599\u55EA\u55F7\u55C9\u561F\u55D1\u55EB\u55EC\u55D4\u55E6\u55DD\u55C4\u55EF\u55E5\u55F2\u55F3\u55CC\u55CD\u55E8\u55F5\u55E4\u8F94\u561E\u5608\u560C\u5601\u5624\u5623\u55FE\u5600\u5627\u562D\u5658\u5639\u5657\u562C\u564D\u5662\u5659\u565C\u564C\u5654\u5686\u5664\u5671\u566B\u567B\u567C\u5685\u5693\u56AF\u56D4\u56D7\u56DD\u56E1\u56F5\u56EB\u56F9\u56FF\u5704\u570A\u5709\u571C\u5E0F\u5E19\u5E14\u5E11\u5E31\u5E3B\u5E3C"],["e140","\u9145\u9147\u9148\u9151\u9153\u9154\u9155\u9156\u9158\u9159\u915B\u915C\u915F\u9160\u9166\u9167\u9168\u916B\u916D\u9173\u917A\u917B\u917C\u9180",4,"\u9186\u9188\u918A\u918E\u918F\u9193",6,"\u919C",5,"\u91A4",5,"\u91AB\u91AC\u91B0\u91B1\u91B2\u91B3\u91B6\u91B7\u91B8\u91B9\u91BB"],["e180","\u91BC",10,"\u91C8\u91CB\u91D0\u91D2",9,"\u91DD",8,"\u5E37\u5E44\u5E54\u5E5B\u5E5E\u5E61\u5C8C\u5C7A\u5C8D\u5C90\u5C96\u5C88\u5C98\u5C99\u5C91\u5C9A\u5C9C\u5CB5\u5CA2\u5CBD\u5CAC\u5CAB\u5CB1\u5CA3\u5CC1\u5CB7\u5CC4\u5CD2\u5CE4\u5CCB\u5CE5\u5D02\u5D03\u5D27\u5D26\u5D2E\u5D24\u5D1E\u5D06\u5D1B\u5D58\u5D3E\u5D34\u5D3D\u5D6C\u5D5B\u5D6F\u5D5D\u5D6B\u5D4B\u5D4A\u5D69\u5D74\u5D82\u5D99\u5D9D\u8C73\u5DB7\u5DC5\u5F73\u5F77\u5F82\u5F87\u5F89\u5F8C\u5F95\u5F99\u5F9C\u5FA8\u5FAD\u5FB5\u5FBC\u8862\u5F61\u72AD\u72B0\u72B4\u72B7\u72B8\u72C3\u72C1\u72CE\u72CD\u72D2\u72E8\u72EF\u72E9\u72F2\u72F4\u72F7\u7301\u72F3\u7303\u72FA"],["e240","\u91E6",62],["e280","\u9225",32,"\u72FB\u7317\u7313\u7321\u730A\u731E\u731D\u7315\u7322\u7339\u7325\u732C\u7338\u7331\u7350\u734D\u7357\u7360\u736C\u736F\u737E\u821B\u5925\u98E7\u5924\u5902\u9963\u9967",5,"\u9974\u9977\u997D\u9980\u9984\u9987\u998A\u998D\u9990\u9991\u9993\u9994\u9995\u5E80\u5E91\u5E8B\u5E96\u5EA5\u5EA0\u5EB9\u5EB5\u5EBE\u5EB3\u8D53\u5ED2\u5ED1\u5EDB\u5EE8\u5EEA\u81BA\u5FC4\u5FC9\u5FD6\u5FCF\u6003\u5FEE\u6004\u5FE1\u5FE4\u5FFE\u6005\u6006\u5FEA\u5FED\u5FF8\u6019\u6035\u6026\u601B\u600F\u600D\u6029\u602B\u600A\u603F\u6021\u6078\u6079\u607B\u607A\u6042"],["e340","\u9246",45,"\u9275",16],["e380","\u9286",7,"\u928F",24,"\u606A\u607D\u6096\u609A\u60AD\u609D\u6083\u6092\u608C\u609B\u60EC\u60BB\u60B1\u60DD\u60D8\u60C6\u60DA\u60B4\u6120\u6126\u6115\u6123\u60F4\u6100\u610E\u612B\u614A\u6175\u61AC\u6194\u61A7\u61B7\u61D4\u61F5\u5FDD\u96B3\u95E9\u95EB\u95F1\u95F3\u95F5\u95F6\u95FC\u95FE\u9603\u9604\u9606\u9608\u960A\u960B\u960C\u960D\u960F\u9612\u9615\u9616\u9617\u9619\u961A\u4E2C\u723F\u6215\u6C35\u6C54\u6C5C\u6C4A\u6CA3\u6C85\u6C90\u6C94\u6C8C\u6C68\u6C69\u6C74\u6C76\u6C86\u6CA9\u6CD0\u6CD4\u6CAD\u6CF7\u6CF8\u6CF1\u6CD7\u6CB2\u6CE0\u6CD6\u6CFA\u6CEB\u6CEE\u6CB1\u6CD3\u6CEF\u6CFE"],["e440","\u92A8",5,"\u92AF",24,"\u92C9",31],["e480","\u92E9",32,"\u6D39\u6D27\u6D0C\u6D43\u6D48\u6D07\u6D04\u6D19\u6D0E\u6D2B\u6D4D\u6D2E\u6D35\u6D1A\u6D4F\u6D52\u6D54\u6D33\u6D91\u6D6F\u6D9E\u6DA0\u6D5E\u6D93\u6D94\u6D5C\u6D60\u6D7C\u6D63\u6E1A\u6DC7\u6DC5\u6DDE\u6E0E\u6DBF\u6DE0\u6E11\u6DE6\u6DDD\u6DD9\u6E16\u6DAB\u6E0C\u6DAE\u6E2B\u6E6E\u6E4E\u6E6B\u6EB2\u6E5F\u6E86\u6E53\u6E54\u6E32\u6E25\u6E44\u6EDF\u6EB1\u6E98\u6EE0\u6F2D\u6EE2\u6EA5\u6EA7\u6EBD\u6EBB\u6EB7\u6ED7\u6EB4\u6ECF\u6E8F\u6EC2\u6E9F\u6F62\u6F46\u6F47\u6F24\u6F15\u6EF9\u6F2F\u6F36\u6F4B\u6F74\u6F2A\u6F09\u6F29\u6F89\u6F8D\u6F8C\u6F78\u6F72\u6F7C\u6F7A\u6FD1"],["e540","\u930A",51,"\u933F",10],["e580","\u934A",31,"\u936B\u6FC9\u6FA7\u6FB9\u6FB6\u6FC2\u6FE1\u6FEE\u6FDE\u6FE0\u6FEF\u701A\u7023\u701B\u7039\u7035\u704F\u705E\u5B80\u5B84\u5B95\u5B93\u5BA5\u5BB8\u752F\u9A9E\u6434\u5BE4\u5BEE\u8930\u5BF0\u8E47\u8B07\u8FB6\u8FD3\u8FD5\u8FE5\u8FEE\u8FE4\u8FE9\u8FE6\u8FF3\u8FE8\u9005\u9004\u900B\u9026\u9011\u900D\u9016\u9021\u9035\u9036\u902D\u902F\u9044\u9051\u9052\u9050\u9068\u9058\u9062\u905B\u66B9\u9074\u907D\u9082\u9088\u9083\u908B\u5F50\u5F57\u5F56\u5F58\u5C3B\u54AB\u5C50\u5C59\u5B71\u5C63\u5C66\u7FBC\u5F2A\u5F29\u5F2D\u8274\u5F3C\u9B3B\u5C6E\u5981\u5983\u598D\u59A9\u59AA\u59A3"],["e640","\u936C",34,"\u9390",27],["e680","\u93AC",29,"\u93CB\u93CC\u93CD\u5997\u59CA\u59AB\u599E\u59A4\u59D2\u59B2\u59AF\u59D7\u59BE\u5A05\u5A06\u59DD\u5A08\u59E3\u59D8\u59F9\u5A0C\u5A09\u5A32\u5A34\u5A11\u5A23\u5A13\u5A40\u5A67\u5A4A\u5A55\u5A3C\u5A62\u5A75\u80EC\u5AAA\u5A9B\u5A77\u5A7A\u5ABE\u5AEB\u5AB2\u5AD2\u5AD4\u5AB8\u5AE0\u5AE3\u5AF1\u5AD6\u5AE6\u5AD8\u5ADC\u5B09\u5B17\u5B16\u5B32\u5B37\u5B40\u5C15\u5C1C\u5B5A\u5B65\u5B73\u5B51\u5B53\u5B62\u9A75\u9A77\u9A78\u9A7A\u9A7F\u9A7D\u9A80\u9A81\u9A85\u9A88\u9A8A\u9A90\u9A92\u9A93\u9A96\u9A98\u9A9B\u9A9C\u9A9D\u9A9F\u9AA0\u9AA2\u9AA3\u9AA5\u9AA7\u7E9F\u7EA1\u7EA3\u7EA5\u7EA8\u7EA9"],["e740","\u93CE",7,"\u93D7",54],["e780","\u940E",32,"\u7EAD\u7EB0\u7EBE\u7EC0\u7EC1\u7EC2\u7EC9\u7ECB\u7ECC\u7ED0\u7ED4\u7ED7\u7EDB\u7EE0\u7EE1\u7EE8\u7EEB\u7EEE\u7EEF\u7EF1\u7EF2\u7F0D\u7EF6\u7EFA\u7EFB\u7EFE\u7F01\u7F02\u7F03\u7F07\u7F08\u7F0B\u7F0C\u7F0F\u7F11\u7F12\u7F17\u7F19\u7F1C\u7F1B\u7F1F\u7F21",6,"\u7F2A\u7F2B\u7F2C\u7F2D\u7F2F",4,"\u7F35\u5E7A\u757F\u5DDB\u753E\u9095\u738E\u7391\u73AE\u73A2\u739F\u73CF\u73C2\u73D1\u73B7\u73B3\u73C0\u73C9\u73C8\u73E5\u73D9\u987C\u740A\u73E9\u73E7\u73DE\u73BA\u73F2\u740F\u742A\u745B\u7426\u7425\u7428\u7430\u742E\u742C"],["e840","\u942F",14,"\u943F",43,"\u946C\u946D\u946E\u946F"],["e880","\u9470",20,"\u9491\u9496\u9498\u94C7\u94CF\u94D3\u94D4\u94DA\u94E6\u94FB\u951C\u9520\u741B\u741A\u7441\u745C\u7457\u7455\u7459\u7477\u746D\u747E\u749C\u748E\u7480\u7481\u7487\u748B\u749E\u74A8\u74A9\u7490\u74A7\u74D2\u74BA\u97EA\u97EB\u97EC\u674C\u6753\u675E\u6748\u6769\u67A5\u6787\u676A\u6773\u6798\u67A7\u6775\u67A8\u679E\u67AD\u678B\u6777\u677C\u67F0\u6809\u67D8\u680A\u67E9\u67B0\u680C\u67D9\u67B5\u67DA\u67B3\u67DD\u6800\u67C3\u67B8\u67E2\u680E\u67C1\u67FD\u6832\u6833\u6860\u6861\u684E\u6862\u6844\u6864\u6883\u681D\u6855\u6866\u6841\u6867\u6840\u683E\u684A\u6849\u6829\u68B5\u688F\u6874\u6877\u6893\u686B\u68C2\u696E\u68FC\u691F\u6920\u68F9"],["e940","\u9527\u9533\u953D\u9543\u9548\u954B\u9555\u955A\u9560\u956E\u9574\u9575\u9577",7,"\u9580",42],["e980","\u95AB",32,"\u6924\u68F0\u690B\u6901\u6957\u68E3\u6910\u6971\u6939\u6960\u6942\u695D\u6984\u696B\u6980\u6998\u6978\u6934\u69CC\u6987\u6988\u69CE\u6989\u6966\u6963\u6979\u699B\u69A7\u69BB\u69AB\u69AD\u69D4\u69B1\u69C1\u69CA\u69DF\u6995\u69E0\u698D\u69FF\u6A2F\u69ED\u6A17\u6A18\u6A65\u69F2\u6A44\u6A3E\u6AA0\u6A50\u6A5B\u6A35\u6A8E\u6A79\u6A3D\u6A28\u6A58\u6A7C\u6A91\u6A90\u6AA9\u6A97\u6AAB\u7337\u7352\u6B81\u6B82\u6B87\u6B84\u6B92\u6B93\u6B8D\u6B9A\u6B9B\u6BA1\u6BAA\u8F6B\u8F6D\u8F71\u8F72\u8F73\u8F75\u8F76\u8F78\u8F77\u8F79\u8F7A\u8F7C\u8F7E\u8F81\u8F82\u8F84\u8F87\u8F8B"],["ea40","\u95CC",27,"\u95EC\u95FF\u9607\u9613\u9618\u961B\u961E\u9620\u9623",6,"\u962B\u962C\u962D\u962F\u9630\u9637\u9638\u9639\u963A\u963E\u9641\u9643\u964A\u964E\u964F\u9651\u9652\u9653\u9656\u9657"],["ea80","\u9658\u9659\u965A\u965C\u965D\u965E\u9660\u9663\u9665\u9666\u966B\u966D",4,"\u9673\u9678",12,"\u9687\u9689\u968A\u8F8D\u8F8E\u8F8F\u8F98\u8F9A\u8ECE\u620B\u6217\u621B\u621F\u6222\u6221\u6225\u6224\u622C\u81E7\u74EF\u74F4\u74FF\u750F\u7511\u7513\u6534\u65EE\u65EF\u65F0\u660A\u6619\u6772\u6603\u6615\u6600\u7085\u66F7\u661D\u6634\u6631\u6636\u6635\u8006\u665F\u6654\u6641\u664F\u6656\u6661\u6657\u6677\u6684\u668C\u66A7\u669D\u66BE\u66DB\u66DC\u66E6\u66E9\u8D32\u8D33\u8D36\u8D3B\u8D3D\u8D40\u8D45\u8D46\u8D48\u8D49\u8D47\u8D4D\u8D55\u8D59\u89C7\u89CA\u89CB\u89CC\u89CE\u89CF\u89D0\u89D1\u726E\u729F\u725D\u7266\u726F\u727E\u727F\u7284\u728B\u728D\u728F\u7292\u6308\u6332\u63B0"],["eb40","\u968C\u968E\u9691\u9692\u9693\u9695\u9696\u969A\u969B\u969D",9,"\u96A8",7,"\u96B1\u96B2\u96B4\u96B5\u96B7\u96B8\u96BA\u96BB\u96BF\u96C2\u96C3\u96C8\u96CA\u96CB\u96D0\u96D1\u96D3\u96D4\u96D6",9,"\u96E1",6,"\u96EB"],["eb80","\u96EC\u96ED\u96EE\u96F0\u96F1\u96F2\u96F4\u96F5\u96F8\u96FA\u96FB\u96FC\u96FD\u96FF\u9702\u9703\u9705\u970A\u970B\u970C\u9710\u9711\u9712\u9714\u9715\u9717",4,"\u971D\u971F\u9720\u643F\u64D8\u8004\u6BEA\u6BF3\u6BFD\u6BF5\u6BF9\u6C05\u6C07\u6C06\u6C0D\u6C15\u6C18\u6C19\u6C1A\u6C21\u6C29\u6C24\u6C2A\u6C32\u6535\u6555\u656B\u724D\u7252\u7256\u7230\u8662\u5216\u809F\u809C\u8093\u80BC\u670A\u80BD\u80B1\u80AB\u80AD\u80B4\u80B7\u80E7\u80E8\u80E9\u80EA\u80DB\u80C2\u80C4\u80D9\u80CD\u80D7\u6710\u80DD\u80EB\u80F1\u80F4\u80ED\u810D\u810E\u80F2\u80FC\u6715\u8112\u8C5A\u8136\u811E\u812C\u8118\u8132\u8148\u814C\u8153\u8174\u8159\u815A\u8171\u8160\u8169\u817C\u817D\u816D\u8167\u584D\u5AB5\u8188\u8182\u8191\u6ED5\u81A3\u81AA\u81CC\u6726\u81CA\u81BB"],["ec40","\u9721",8,"\u972B\u972C\u972E\u972F\u9731\u9733",4,"\u973A\u973B\u973C\u973D\u973F",18,"\u9754\u9755\u9757\u9758\u975A\u975C\u975D\u975F\u9763\u9764\u9766\u9767\u9768\u976A",7],["ec80","\u9772\u9775\u9777",4,"\u977D",7,"\u9786",4,"\u978C\u978E\u978F\u9790\u9793\u9795\u9796\u9797\u9799",4,"\u81C1\u81A6\u6B24\u6B37\u6B39\u6B43\u6B46\u6B59\u98D1\u98D2\u98D3\u98D5\u98D9\u98DA\u6BB3\u5F40\u6BC2\u89F3\u6590\u9F51\u6593\u65BC\u65C6\u65C4\u65C3\u65CC\u65CE\u65D2\u65D6\u7080\u709C\u7096\u709D\u70BB\u70C0\u70B7\u70AB\u70B1\u70E8\u70CA\u7110\u7113\u7116\u712F\u7131\u7173\u715C\u7168\u7145\u7172\u714A\u7178\u717A\u7198\u71B3\u71B5\u71A8\u71A0\u71E0\u71D4\u71E7\u71F9\u721D\u7228\u706C\u7118\u7166\u71B9\u623E\u623D\u6243\u6248\u6249\u793B\u7940\u7946\u7949\u795B\u795C\u7953\u795A\u7962\u7957\u7960\u796F\u7967\u797A\u7985\u798A\u799A\u79A7\u79B3\u5FD1\u5FD0"],["ed40","\u979E\u979F\u97A1\u97A2\u97A4",6,"\u97AC\u97AE\u97B0\u97B1\u97B3\u97B5",46],["ed80","\u97E4\u97E5\u97E8\u97EE",4,"\u97F4\u97F7",23,"\u603C\u605D\u605A\u6067\u6041\u6059\u6063\u60AB\u6106\u610D\u615D\u61A9\u619D\u61CB\u61D1\u6206\u8080\u807F\u6C93\u6CF6\u6DFC\u77F6\u77F8\u7800\u7809\u7817\u7818\u7811\u65AB\u782D\u781C\u781D\u7839\u783A\u783B\u781F\u783C\u7825\u782C\u7823\u7829\u784E\u786D\u7856\u7857\u7826\u7850\u7847\u784C\u786A\u789B\u7893\u789A\u7887\u789C\u78A1\u78A3\u78B2\u78B9\u78A5\u78D4\u78D9\u78C9\u78EC\u78F2\u7905\u78F4\u7913\u7924\u791E\u7934\u9F9B\u9EF9\u9EFB\u9EFC\u76F1\u7704\u770D\u76F9\u7707\u7708\u771A\u7722\u7719\u772D\u7726\u7735\u7738\u7750\u7751\u7747\u7743\u775A\u7768"],["ee40","\u980F",62],["ee80","\u984E",32,"\u7762\u7765\u777F\u778D\u777D\u7780\u778C\u7791\u779F\u77A0\u77B0\u77B5\u77BD\u753A\u7540\u754E\u754B\u7548\u755B\u7572\u7579\u7583\u7F58\u7F61\u7F5F\u8A48\u7F68\u7F74\u7F71\u7F79\u7F81\u7F7E\u76CD\u76E5\u8832\u9485\u9486\u9487\u948B\u948A\u948C\u948D\u948F\u9490\u9494\u9497\u9495\u949A\u949B\u949C\u94A3\u94A4\u94AB\u94AA\u94AD\u94AC\u94AF\u94B0\u94B2\u94B4\u94B6",4,"\u94BC\u94BD\u94BF\u94C4\u94C8",6,"\u94D0\u94D1\u94D2\u94D5\u94D6\u94D7\u94D9\u94D8\u94DB\u94DE\u94DF\u94E0\u94E2\u94E4\u94E5\u94E7\u94E8\u94EA"],["ef40","\u986F",5,"\u988B\u988E\u9892\u9895\u9899\u98A3\u98A8",37,"\u98CF\u98D0\u98D4\u98D6\u98D7\u98DB\u98DC\u98DD\u98E0",4],["ef80","\u98E5\u98E6\u98E9",30,"\u94E9\u94EB\u94EE\u94EF\u94F3\u94F4\u94F5\u94F7\u94F9\u94FC\u94FD\u94FF\u9503\u9502\u9506\u9507\u9509\u950A\u950D\u950E\u950F\u9512",4,"\u9518\u951B\u951D\u951E\u951F\u9522\u952A\u952B\u9529\u952C\u9531\u9532\u9534\u9536\u9537\u9538\u953C\u953E\u953F\u9542\u9535\u9544\u9545\u9546\u9549\u954C\u954E\u954F\u9552\u9553\u9554\u9556\u9557\u9558\u9559\u955B\u955E\u955F\u955D\u9561\u9562\u9564",8,"\u956F\u9571\u9572\u9573\u953A\u77E7\u77EC\u96C9\u79D5\u79ED\u79E3\u79EB\u7A06\u5D47\u7A03\u7A02\u7A1E\u7A14"],["f040","\u9908",4,"\u990E\u990F\u9911",28,"\u992F",26],["f080","\u994A",9,"\u9956",12,"\u9964\u9966\u9973\u9978\u9979\u997B\u997E\u9982\u9983\u9989\u7A39\u7A37\u7A51\u9ECF\u99A5\u7A70\u7688\u768E\u7693\u7699\u76A4\u74DE\u74E0\u752C\u9E20\u9E22\u9E28",4,"\u9E32\u9E31\u9E36\u9E38\u9E37\u9E39\u9E3A\u9E3E\u9E41\u9E42\u9E44\u9E46\u9E47\u9E48\u9E49\u9E4B\u9E4C\u9E4E\u9E51\u9E55\u9E57\u9E5A\u9E5B\u9E5C\u9E5E\u9E63\u9E66",6,"\u9E71\u9E6D\u9E73\u7592\u7594\u7596\u75A0\u759D\u75AC\u75A3\u75B3\u75B4\u75B8\u75C4\u75B1\u75B0\u75C3\u75C2\u75D6\u75CD\u75E3\u75E8\u75E6\u75E4\u75EB\u75E7\u7603\u75F1\u75FC\u75FF\u7610\u7600\u7605\u760C\u7617\u760A\u7625\u7618\u7615\u7619"],["f140","\u998C\u998E\u999A",10,"\u99A6\u99A7\u99A9",47],["f180","\u99D9",32,"\u761B\u763C\u7622\u7620\u7640\u762D\u7630\u763F\u7635\u7643\u763E\u7633\u764D\u765E\u7654\u765C\u7656\u766B\u766F\u7FCA\u7AE6\u7A78\u7A79\u7A80\u7A86\u7A88\u7A95\u7AA6\u7AA0\u7AAC\u7AA8\u7AAD\u7AB3\u8864\u8869\u8872\u887D\u887F\u8882\u88A2\u88C6\u88B7\u88BC\u88C9\u88E2\u88CE\u88E3\u88E5\u88F1\u891A\u88FC\u88E8\u88FE\u88F0\u8921\u8919\u8913\u891B\u890A\u8934\u892B\u8936\u8941\u8966\u897B\u758B\u80E5\u76B2\u76B4\u77DC\u8012\u8014\u8016\u801C\u8020\u8022\u8025\u8026\u8027\u8029\u8028\u8031\u800B\u8035\u8043\u8046\u804D\u8052\u8069\u8071\u8983\u9878\u9880\u9883"],["f240","\u99FA",62],["f280","\u9A39",32,"\u9889\u988C\u988D\u988F\u9894\u989A\u989B\u989E\u989F\u98A1\u98A2\u98A5\u98A6\u864D\u8654\u866C\u866E\u867F\u867A\u867C\u867B\u86A8\u868D\u868B\u86AC\u869D\u86A7\u86A3\u86AA\u8693\u86A9\u86B6\u86C4\u86B5\u86CE\u86B0\u86BA\u86B1\u86AF\u86C9\u86CF\u86B4\u86E9\u86F1\u86F2\u86ED\u86F3\u86D0\u8713\u86DE\u86F4\u86DF\u86D8\u86D1\u8703\u8707\u86F8\u8708\u870A\u870D\u8709\u8723\u873B\u871E\u8725\u872E\u871A\u873E\u8748\u8734\u8731\u8729\u8737\u873F\u8782\u8722\u877D\u877E\u877B\u8760\u8770\u874C\u876E\u878B\u8753\u8763\u877C\u8764\u8759\u8765\u8793\u87AF\u87A8\u87D2"],["f340","\u9A5A",17,"\u9A72\u9A83\u9A89\u9A8D\u9A8E\u9A94\u9A95\u9A99\u9AA6\u9AA9",6,"\u9AB2\u9AB3\u9AB4\u9AB5\u9AB9\u9ABB\u9ABD\u9ABE\u9ABF\u9AC3\u9AC4\u9AC6",4,"\u9ACD\u9ACE\u9ACF\u9AD0\u9AD2\u9AD4\u9AD5\u9AD6\u9AD7\u9AD9\u9ADA\u9ADB\u9ADC"],["f380","\u9ADD\u9ADE\u9AE0\u9AE2\u9AE3\u9AE4\u9AE5\u9AE7\u9AE8\u9AE9\u9AEA\u9AEC\u9AEE\u9AF0",8,"\u9AFA\u9AFC",6,"\u9B04\u9B05\u9B06\u87C6\u8788\u8785\u87AD\u8797\u8783\u87AB\u87E5\u87AC\u87B5\u87B3\u87CB\u87D3\u87BD\u87D1\u87C0\u87CA\u87DB\u87EA\u87E0\u87EE\u8816\u8813\u87FE\u880A\u881B\u8821\u8839\u883C\u7F36\u7F42\u7F44\u7F45\u8210\u7AFA\u7AFD\u7B08\u7B03\u7B04\u7B15\u7B0A\u7B2B\u7B0F\u7B47\u7B38\u7B2A\u7B19\u7B2E\u7B31\u7B20\u7B25\u7B24\u7B33\u7B3E\u7B1E\u7B58\u7B5A\u7B45\u7B75\u7B4C\u7B5D\u7B60\u7B6E\u7B7B\u7B62\u7B72\u7B71\u7B90\u7BA6\u7BA7\u7BB8\u7BAC\u7B9D\u7BA8\u7B85\u7BAA\u7B9C\u7BA2\u7BAB\u7BB4\u7BD1\u7BC1\u7BCC\u7BDD\u7BDA\u7BE5\u7BE6\u7BEA\u7C0C\u7BFE\u7BFC\u7C0F\u7C16\u7C0B"],["f440","\u9B07\u9B09",5,"\u9B10\u9B11\u9B12\u9B14",10,"\u9B20\u9B21\u9B22\u9B24",10,"\u9B30\u9B31\u9B33",7,"\u9B3D\u9B3E\u9B3F\u9B40\u9B46\u9B4A\u9B4B\u9B4C\u9B4E\u9B50\u9B52\u9B53\u9B55",5],["f480","\u9B5B",32,"\u7C1F\u7C2A\u7C26\u7C38\u7C41\u7C40\u81FE\u8201\u8202\u8204\u81EC\u8844\u8221\u8222\u8223\u822D\u822F\u8228\u822B\u8238\u823B\u8233\u8234\u823E\u8244\u8249\u824B\u824F\u825A\u825F\u8268\u887E\u8885\u8888\u88D8\u88DF\u895E\u7F9D\u7F9F\u7FA7\u7FAF\u7FB0\u7FB2\u7C7C\u6549\u7C91\u7C9D\u7C9C\u7C9E\u7CA2\u7CB2\u7CBC\u7CBD\u7CC1\u7CC7\u7CCC\u7CCD\u7CC8\u7CC5\u7CD7\u7CE8\u826E\u66A8\u7FBF\u7FCE\u7FD5\u7FE5\u7FE1\u7FE6\u7FE9\u7FEE\u7FF3\u7CF8\u7D77\u7DA6\u7DAE\u7E47\u7E9B\u9EB8\u9EB4\u8D73\u8D84\u8D94\u8D91\u8DB1\u8D67\u8D6D\u8C47\u8C49\u914A\u9150\u914E\u914F\u9164"],["f540","\u9B7C",62],["f580","\u9BBB",32,"\u9162\u9161\u9170\u9169\u916F\u917D\u917E\u9172\u9174\u9179\u918C\u9185\u9190\u918D\u9191\u91A2\u91A3\u91AA\u91AD\u91AE\u91AF\u91B5\u91B4\u91BA\u8C55\u9E7E\u8DB8\u8DEB\u8E05\u8E59\u8E69\u8DB5\u8DBF\u8DBC\u8DBA\u8DC4\u8DD6\u8DD7\u8DDA\u8DDE\u8DCE\u8DCF\u8DDB\u8DC6\u8DEC\u8DF7\u8DF8\u8DE3\u8DF9\u8DFB\u8DE4\u8E09\u8DFD\u8E14\u8E1D\u8E1F\u8E2C\u8E2E\u8E23\u8E2F\u8E3A\u8E40\u8E39\u8E35\u8E3D\u8E31\u8E49\u8E41\u8E42\u8E51\u8E52\u8E4A\u8E70\u8E76\u8E7C\u8E6F\u8E74\u8E85\u8E8F\u8E94\u8E90\u8E9C\u8E9E\u8C78\u8C82\u8C8A\u8C85\u8C98\u8C94\u659B\u89D6\u89DE\u89DA\u89DC"],["f640","\u9BDC",62],["f680","\u9C1B",32,"\u89E5\u89EB\u89EF\u8A3E\u8B26\u9753\u96E9\u96F3\u96EF\u9706\u9701\u9708\u970F\u970E\u972A\u972D\u9730\u973E\u9F80\u9F83\u9F85",5,"\u9F8C\u9EFE\u9F0B\u9F0D\u96B9\u96BC\u96BD\u96CE\u96D2\u77BF\u96E0\u928E\u92AE\u92C8\u933E\u936A\u93CA\u938F\u943E\u946B\u9C7F\u9C82\u9C85\u9C86\u9C87\u9C88\u7A23\u9C8B\u9C8E\u9C90\u9C91\u9C92\u9C94\u9C95\u9C9A\u9C9B\u9C9E",5,"\u9CA5",4,"\u9CAB\u9CAD\u9CAE\u9CB0",7,"\u9CBA\u9CBB\u9CBC\u9CBD\u9CC4\u9CC5\u9CC6\u9CC7\u9CCA\u9CCB"],["f740","\u9C3C",62],["f780","\u9C7B\u9C7D\u9C7E\u9C80\u9C83\u9C84\u9C89\u9C8A\u9C8C\u9C8F\u9C93\u9C96\u9C97\u9C98\u9C99\u9C9D\u9CAA\u9CAC\u9CAF\u9CB9\u9CBE",4,"\u9CC8\u9CC9\u9CD1\u9CD2\u9CDA\u9CDB\u9CE0\u9CE1\u9CCC",4,"\u9CD3\u9CD4\u9CD5\u9CD7\u9CD8\u9CD9\u9CDC\u9CDD\u9CDF\u9CE2\u977C\u9785\u9791\u9792\u9794\u97AF\u97AB\u97A3\u97B2\u97B4\u9AB1\u9AB0\u9AB7\u9E58\u9AB6\u9ABA\u9ABC\u9AC1\u9AC0\u9AC5\u9AC2\u9ACB\u9ACC\u9AD1\u9B45\u9B43\u9B47\u9B49\u9B48\u9B4D\u9B51\u98E8\u990D\u992E\u9955\u9954\u9ADF\u9AE1\u9AE6\u9AEF\u9AEB\u9AFB\u9AED\u9AF9\u9B08\u9B0F\u9B13\u9B1F\u9B23\u9EBD\u9EBE\u7E3B\u9E82\u9E87\u9E88\u9E8B\u9E92\u93D6\u9E9D\u9E9F\u9EDB\u9EDC\u9EDD\u9EE0\u9EDF\u9EE2\u9EE9\u9EE7\u9EE5\u9EEA\u9EEF\u9F22\u9F2C\u9F2F\u9F39\u9F37\u9F3D\u9F3E\u9F44"],["f840","\u9CE3",62],["f880","\u9D22",32],["f940","\u9D43",62],["f980","\u9D82",32],["fa40","\u9DA3",62],["fa80","\u9DE2",32],["fb40","\u9E03",27,"\u9E24\u9E27\u9E2E\u9E30\u9E34\u9E3B\u9E3C\u9E40\u9E4D\u9E50\u9E52\u9E53\u9E54\u9E56\u9E59\u9E5D\u9E5F\u9E60\u9E61\u9E62\u9E65\u9E6E\u9E6F\u9E72\u9E74",9,"\u9E80"],["fb80","\u9E81\u9E83\u9E84\u9E85\u9E86\u9E89\u9E8A\u9E8C",5,"\u9E94",8,"\u9E9E\u9EA0",5,"\u9EA7\u9EA8\u9EA9\u9EAA"],["fc40","\u9EAB",8,"\u9EB5\u9EB6\u9EB7\u9EB9\u9EBA\u9EBC\u9EBF",4,"\u9EC5\u9EC6\u9EC7\u9EC8\u9ECA\u9ECB\u9ECC\u9ED0\u9ED2\u9ED3\u9ED5\u9ED6\u9ED7\u9ED9\u9EDA\u9EDE\u9EE1\u9EE3\u9EE4\u9EE6\u9EE8\u9EEB\u9EEC\u9EED\u9EEE\u9EF0",8,"\u9EFA\u9EFD\u9EFF",6],["fc80","\u9F06",4,"\u9F0C\u9F0F\u9F11\u9F12\u9F14\u9F15\u9F16\u9F18\u9F1A",5,"\u9F21\u9F23",8,"\u9F2D\u9F2E\u9F30\u9F31"],["fd40","\u9F32",4,"\u9F38\u9F3A\u9F3C\u9F3F",4,"\u9F45",10,"\u9F52",38],["fd80","\u9F79",5,"\u9F81\u9F82\u9F8D",11,"\u9F9C\u9F9D\u9F9E\u9FA1",4,"\uF92C\uF979\uF995\uF9E7\uF9F1"],["fe40","\uFA0C\uFA0D\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA18\uFA1F\uFA20\uFA21\uFA23\uFA24\uFA27\uFA28\uFA29"]]});var s30=o(($V5,LS6)=>{LS6.exports=[["a140","\uE4C6",62],["a180","\uE505",32],["a240","\uE526",62],["a280","\uE565",32],["a2ab","\uE766",5],["a2e3","\u20AC\uE76D"],["a2ef","\uE76E\uE76F"],["a2fd","\uE770\uE771"],["a340","\uE586",62],["a380","\uE5C5",31,"\u3000"],["a440","\uE5E6",62],["a480","\uE625",32],["a4f4","\uE772",10],["a540","\uE646",62],["a580","\uE685",32],["a5f7","\uE77D",7],["a640","\uE6A6",62],["a680","\uE6E5",32],["a6b9","\uE785",7],["a6d9","\uE78D",6],["a6ec","\uE794\uE795"],["a6f3","\uE796"],["a6f6","\uE797",8],["a740","\uE706",62],["a780","\uE745",32],["a7c2","\uE7A0",14],["a7f2","\uE7AF",12],["a896","\uE7BC",10],["a8bc","\u1E3F"],["a8bf","\u01F9"],["a8c1","\uE7C9\uE7CA\uE7CB\uE7CC"],["a8ea","\uE7CD",20],["a958","\uE7E2"],["a95b","\uE7E3"],["a95d","\uE7E4\uE7E5\uE7E6"],["a989","\u303E\u2FF0",11],["a997","\uE7F4",12],["a9f0","\uE801",14],["aaa1","\uE000",93],["aba1","\uE05E",93],["aca1","\uE0BC",93],["ada1","\uE11A",93],["aea1","\uE178",93],["afa1","\uE1D6",93],["d7fa","\uE810",4],["f8a1","\uE234",93],["f9a1","\uE292",93],["faa1","\uE2F0",93],["fba1","\uE34E",93],["fca1","\uE3AC",93],["fda1","\uE40A",93],["fe50","\u2E81\uE816\uE817\uE818\u2E84\u3473\u3447\u2E88\u2E8B\uE81E\u359E\u361A\u360E\u2E8C\u2E97\u396E\u3918\uE826\u39CF\u39DF\u3A73\u39D0\uE82B\uE82C\u3B4E\u3C6E\u3CE0\u2EA7\uE831\uE832\u2EAA\u4056\u415F\u2EAE\u4337\u2EB3\u2EB6\u2EB7\uE83B\u43B1\u43AC\u2EBB\u43DD\u44D6\u4661\u464C\uE843"],["fe80","\u4723\u4729\u477C\u478D\u2ECA\u4947\u497A\u497D\u4982\u4983\u4985\u4986\u499F\u499B\u49B7\u49B6\uE854\uE855\u4CA3\u4C9F\u4CA0\u4CA1\u4C77\u4CA2\u4D13",6,"\u4DAE\uE864\uE468",93],["8135f437","\uE7C7"]]});var nQ1=o((YV5,BS6)=>{BS6.exports={uChars:[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],gbChars:[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}});var rQ1=o((XV5,OS6)=>{OS6.exports=[["0","\x00",127],["8141","\uAC02\uAC03\uAC05\uAC06\uAC0B",4,"\uAC18\uAC1E\uAC1F\uAC21\uAC22\uAC23\uAC25",6,"\uAC2E\uAC32\uAC33\uAC34"],["8161","\uAC35\uAC36\uAC37\uAC3A\uAC3B\uAC3D\uAC3E\uAC3F\uAC41",9,"\uAC4C\uAC4E",5,"\uAC55"],["8181","\uAC56\uAC57\uAC59\uAC5A\uAC5B\uAC5D",18,"\uAC72\uAC73\uAC75\uAC76\uAC79\uAC7B",4,"\uAC82\uAC87\uAC88\uAC8D\uAC8E\uAC8F\uAC91\uAC92\uAC93\uAC95",6,"\uAC9E\uACA2",5,"\uACAB\uACAD\uACAE\uACB1",6,"\uACBA\uACBE\uACBF\uACC0\uACC2\uACC3\uACC5\uACC6\uACC7\uACC9\uACCA\uACCB\uACCD",7,"\uACD6\uACD8",7,"\uACE2\uACE3\uACE5\uACE6\uACE9\uACEB\uACED\uACEE\uACF2\uACF4\uACF7",4,"\uACFE\uACFF\uAD01\uAD02\uAD03\uAD05\uAD07",4,"\uAD0E\uAD10\uAD12\uAD13"],["8241","\uAD14\uAD15\uAD16\uAD17\uAD19\uAD1A\uAD1B\uAD1D\uAD1E\uAD1F\uAD21",7,"\uAD2A\uAD2B\uAD2E",5],["8261","\uAD36\uAD37\uAD39\uAD3A\uAD3B\uAD3D",6,"\uAD46\uAD48\uAD4A",5,"\uAD51\uAD52\uAD53\uAD55\uAD56\uAD57"],["8281","\uAD59",7,"\uAD62\uAD64",7,"\uAD6E\uAD6F\uAD71\uAD72\uAD77\uAD78\uAD79\uAD7A\uAD7E\uAD80\uAD83",4,"\uAD8A\uAD8B\uAD8D\uAD8E\uAD8F\uAD91",10,"\uAD9E",5,"\uADA5",17,"\uADB8",7,"\uADC2\uADC3\uADC5\uADC6\uADC7\uADC9",6,"\uADD2\uADD4",7,"\uADDD\uADDE\uADDF\uADE1\uADE2\uADE3\uADE5",18],["8341","\uADFA\uADFB\uADFD\uADFE\uAE02",5,"\uAE0A\uAE0C\uAE0E",5,"\uAE15",7],["8361","\uAE1D",18,"\uAE32\uAE33\uAE35\uAE36\uAE39\uAE3B\uAE3C"],["8381","\uAE3D\uAE3E\uAE3F\uAE42\uAE44\uAE47\uAE48\uAE49\uAE4B\uAE4F\uAE51\uAE52\uAE53\uAE55\uAE57",4,"\uAE5E\uAE62\uAE63\uAE64\uAE66\uAE67\uAE6A\uAE6B\uAE6D\uAE6E\uAE6F\uAE71",6,"\uAE7A\uAE7E",5,"\uAE86",5,"\uAE8D",46,"\uAEBF\uAEC1\uAEC2\uAEC3\uAEC5",6,"\uAECE\uAED2",5,"\uAEDA\uAEDB\uAEDD",8],["8441","\uAEE6\uAEE7\uAEE9\uAEEA\uAEEC\uAEEE",5,"\uAEF5\uAEF6\uAEF7\uAEF9\uAEFA\uAEFB\uAEFD",8],["8461","\uAF06\uAF09\uAF0A\uAF0B\uAF0C\uAF0E\uAF0F\uAF11",18],["8481","\uAF24",7,"\uAF2E\uAF2F\uAF31\uAF33\uAF35",6,"\uAF3E\uAF40\uAF44\uAF45\uAF46\uAF47\uAF4A",5,"\uAF51",10,"\uAF5E",5,"\uAF66",18,"\uAF7A",5,"\uAF81\uAF82\uAF83\uAF85\uAF86\uAF87\uAF89",6,"\uAF92\uAF93\uAF94\uAF96",5,"\uAF9D",26,"\uAFBA\uAFBB\uAFBD\uAFBE"],["8541","\uAFBF\uAFC1",5,"\uAFCA\uAFCC\uAFCF",4,"\uAFD5",6,"\uAFDD",4],["8561","\uAFE2",5,"\uAFEA",5,"\uAFF2\uAFF3\uAFF5\uAFF6\uAFF7\uAFF9",6,"\uB002\uB003"],["8581","\uB005",6,"\uB00D\uB00E\uB00F\uB011\uB012\uB013\uB015",6,"\uB01E",9,"\uB029",26,"\uB046\uB047\uB049\uB04B\uB04D\uB04F\uB050\uB051\uB052\uB056\uB058\uB05A\uB05B\uB05C\uB05E",29,"\uB07E\uB07F\uB081\uB082\uB083\uB085",6,"\uB08E\uB090\uB092",5,"\uB09B\uB09D\uB09E\uB0A3\uB0A4"],["8641","\uB0A5\uB0A6\uB0A7\uB0AA\uB0B0\uB0B2\uB0B6\uB0B7\uB0B9\uB0BA\uB0BB\uB0BD",6,"\uB0C6\uB0CA",5,"\uB0D2"],["8661","\uB0D3\uB0D5\uB0D6\uB0D7\uB0D9",6,"\uB0E1\uB0E2\uB0E3\uB0E4\uB0E6",10],["8681","\uB0F1",22,"\uB10A\uB10D\uB10E\uB10F\uB111\uB114\uB115\uB116\uB117\uB11A\uB11E",4,"\uB126\uB127\uB129\uB12A\uB12B\uB12D",6,"\uB136\uB13A",5,"\uB142\uB143\uB145\uB146\uB147\uB149",6,"\uB152\uB153\uB156\uB157\uB159\uB15A\uB15B\uB15D\uB15E\uB15F\uB161",22,"\uB17A\uB17B\uB17D\uB17E\uB17F\uB181\uB183",4,"\uB18A\uB18C\uB18E\uB18F\uB190\uB191\uB195\uB196\uB197\uB199\uB19A\uB19B\uB19D"],["8741","\uB19E",9,"\uB1A9",15],["8761","\uB1B9",18,"\uB1CD\uB1CE\uB1CF\uB1D1\uB1D2\uB1D3\uB1D5"],["8781","\uB1D6",5,"\uB1DE\uB1E0",7,"\uB1EA\uB1EB\uB1ED\uB1EE\uB1EF\uB1F1",7,"\uB1FA\uB1FC\uB1FE",5,"\uB206\uB207\uB209\uB20A\uB20D",6,"\uB216\uB218\uB21A",5,"\uB221",18,"\uB235",6,"\uB23D",26,"\uB259\uB25A\uB25B\uB25D\uB25E\uB25F\uB261",6,"\uB26A",4],["8841","\uB26F",4,"\uB276",5,"\uB27D",6,"\uB286\uB287\uB288\uB28A",4],["8861","\uB28F\uB292\uB293\uB295\uB296\uB297\uB29B",4,"\uB2A2\uB2A4\uB2A7\uB2A8\uB2A9\uB2AB\uB2AD\uB2AE\uB2AF\uB2B1\uB2B2\uB2B3\uB2B5\uB2B6\uB2B7"],["8881","\uB2B8",15,"\uB2CA\uB2CB\uB2CD\uB2CE\uB2CF\uB2D1\uB2D3",4,"\uB2DA\uB2DC\uB2DE\uB2DF\uB2E0\uB2E1\uB2E3\uB2E7\uB2E9\uB2EA\uB2F0\uB2F1\uB2F2\uB2F6\uB2FC\uB2FD\uB2FE\uB302\uB303\uB305\uB306\uB307\uB309",6,"\uB312\uB316",5,"\uB31D",54,"\uB357\uB359\uB35A\uB35D\uB360\uB361\uB362\uB363"],["8941","\uB366\uB368\uB36A\uB36C\uB36D\uB36F\uB372\uB373\uB375\uB376\uB377\uB379",6,"\uB382\uB386",5,"\uB38D"],["8961","\uB38E\uB38F\uB391\uB392\uB393\uB395",10,"\uB3A2",5,"\uB3A9\uB3AA\uB3AB\uB3AD"],["8981","\uB3AE",21,"\uB3C6\uB3C7\uB3C9\uB3CA\uB3CD\uB3CF\uB3D1\uB3D2\uB3D3\uB3D6\uB3D8\uB3DA\uB3DC\uB3DE\uB3DF\uB3E1\uB3E2\uB3E3\uB3E5\uB3E6\uB3E7\uB3E9",18,"\uB3FD",18,"\uB411",6,"\uB419\uB41A\uB41B\uB41D\uB41E\uB41F\uB421",6,"\uB42A\uB42C",7,"\uB435",15],["8a41","\uB445",10,"\uB452\uB453\uB455\uB456\uB457\uB459",6,"\uB462\uB464\uB466"],["8a61","\uB467",4,"\uB46D",18,"\uB481\uB482"],["8a81","\uB483",4,"\uB489",19,"\uB49E",5,"\uB4A5\uB4A6\uB4A7\uB4A9\uB4AA\uB4AB\uB4AD",7,"\uB4B6\uB4B8\uB4BA",5,"\uB4C1\uB4C2\uB4C3\uB4C5\uB4C6\uB4C7\uB4C9",6,"\uB4D1\uB4D2\uB4D3\uB4D4\uB4D6",5,"\uB4DE\uB4DF\uB4E1\uB4E2\uB4E5\uB4E7",4,"\uB4EE\uB4F0\uB4F2",5,"\uB4F9",26,"\uB516\uB517\uB519\uB51A\uB51D"],["8b41","\uB51E",5,"\uB526\uB52B",4,"\uB532\uB533\uB535\uB536\uB537\uB539",6,"\uB542\uB546"],["8b61","\uB547\uB548\uB549\uB54A\uB54E\uB54F\uB551\uB552\uB553\uB555",6,"\uB55E\uB562",8],["8b81","\uB56B",52,"\uB5A2\uB5A3\uB5A5\uB5A6\uB5A7\uB5A9\uB5AC\uB5AD\uB5AE\uB5AF\uB5B2\uB5B6",4,"\uB5BE\uB5BF\uB5C1\uB5C2\uB5C3\uB5C5",6,"\uB5CE\uB5D2",5,"\uB5D9",18,"\uB5ED",18],["8c41","\uB600",15,"\uB612\uB613\uB615\uB616\uB617\uB619",4],["8c61","\uB61E",6,"\uB626",5,"\uB62D",6,"\uB635",5],["8c81","\uB63B",12,"\uB649",26,"\uB665\uB666\uB667\uB669",50,"\uB69E\uB69F\uB6A1\uB6A2\uB6A3\uB6A5",5,"\uB6AD\uB6AE\uB6AF\uB6B0\uB6B2",16],["8d41","\uB6C3",16,"\uB6D5",8],["8d61","\uB6DE",17,"\uB6F1\uB6F2\uB6F3\uB6F5\uB6F6\uB6F7\uB6F9\uB6FA"],["8d81","\uB6FB",4,"\uB702\uB703\uB704\uB706",33,"\uB72A\uB72B\uB72D\uB72E\uB731",6,"\uB73A\uB73C",7,"\uB745\uB746\uB747\uB749\uB74A\uB74B\uB74D",6,"\uB756",9,"\uB761\uB762\uB763\uB765\uB766\uB767\uB769",6,"\uB772\uB774\uB776",5,"\uB77E\uB77F\uB781\uB782\uB783\uB785",6,"\uB78E\uB793\uB794\uB795\uB79A\uB79B\uB79D\uB79E"],["8e41","\uB79F\uB7A1",6,"\uB7AA\uB7AE",5,"\uB7B6\uB7B7\uB7B9",8],["8e61","\uB7C2",4,"\uB7C8\uB7CA",19],["8e81","\uB7DE",13,"\uB7EE\uB7EF\uB7F1\uB7F2\uB7F3\uB7F5",6,"\uB7FE\uB802",4,"\uB80A\uB80B\uB80D\uB80E\uB80F\uB811",6,"\uB81A\uB81C\uB81E",5,"\uB826\uB827\uB829\uB82A\uB82B\uB82D",6,"\uB836\uB83A",5,"\uB841\uB842\uB843\uB845",11,"\uB852\uB854",7,"\uB85E\uB85F\uB861\uB862\uB863\uB865",6,"\uB86E\uB870\uB872",5,"\uB879\uB87A\uB87B\uB87D",7],["8f41","\uB885",7,"\uB88E",17],["8f61","\uB8A0",7,"\uB8A9",6,"\uB8B1\uB8B2\uB8B3\uB8B5\uB8B6\uB8B7\uB8B9",4],["8f81","\uB8BE\uB8BF\uB8C2\uB8C4\uB8C6",5,"\uB8CD\uB8CE\uB8CF\uB8D1\uB8D2\uB8D3\uB8D5",7,"\uB8DE\uB8E0\uB8E2",5,"\uB8EA\uB8EB\uB8ED\uB8EE\uB8EF\uB8F1",6,"\uB8FA\uB8FC\uB8FE",5,"\uB905",18,"\uB919",6,"\uB921",26,"\uB93E\uB93F\uB941\uB942\uB943\uB945",6,"\uB94D\uB94E\uB950\uB952",5],["9041","\uB95A\uB95B\uB95D\uB95E\uB95F\uB961",6,"\uB96A\uB96C\uB96E",5,"\uB976\uB977\uB979\uB97A\uB97B\uB97D"],["9061","\uB97E",5,"\uB986\uB988\uB98B\uB98C\uB98F",15],["9081","\uB99F",12,"\uB9AE\uB9AF\uB9B1\uB9B2\uB9B3\uB9B5",6,"\uB9BE\uB9C0\uB9C2",5,"\uB9CA\uB9CB\uB9CD\uB9D3",4,"\uB9DA\uB9DC\uB9DF\uB9E0\uB9E2\uB9E6\uB9E7\uB9E9\uB9EA\uB9EB\uB9ED",6,"\uB9F6\uB9FB",4,"\uBA02",5,"\uBA09",11,"\uBA16",33,"\uBA3A\uBA3B\uBA3D\uBA3E\uBA3F\uBA41\uBA43\uBA44\uBA45\uBA46"],["9141","\uBA47\uBA4A\uBA4C\uBA4F\uBA50\uBA51\uBA52\uBA56\uBA57\uBA59\uBA5A\uBA5B\uBA5D",6,"\uBA66\uBA6A",5],["9161","\uBA72\uBA73\uBA75\uBA76\uBA77\uBA79",9,"\uBA86\uBA88\uBA89\uBA8A\uBA8B\uBA8D",5],["9181","\uBA93",20,"\uBAAA\uBAAD\uBAAE\uBAAF\uBAB1\uBAB3",4,"\uBABA\uBABC\uBABE",5,"\uBAC5\uBAC6\uBAC7\uBAC9",14,"\uBADA",33,"\uBAFD\uBAFE\uBAFF\uBB01\uBB02\uBB03\uBB05",7,"\uBB0E\uBB10\uBB12",5,"\uBB19\uBB1A\uBB1B\uBB1D\uBB1E\uBB1F\uBB21",6],["9241","\uBB28\uBB2A\uBB2C",7,"\uBB37\uBB39\uBB3A\uBB3F",4,"\uBB46\uBB48\uBB4A\uBB4B\uBB4C\uBB4E\uBB51\uBB52"],["9261","\uBB53\uBB55\uBB56\uBB57\uBB59",7,"\uBB62\uBB64",7,"\uBB6D",4],["9281","\uBB72",21,"\uBB89\uBB8A\uBB8B\uBB8D\uBB8E\uBB8F\uBB91",18,"\uBBA5\uBBA6\uBBA7\uBBA9\uBBAA\uBBAB\uBBAD",6,"\uBBB5\uBBB6\uBBB8",7,"\uBBC1\uBBC2\uBBC3\uBBC5\uBBC6\uBBC7\uBBC9",6,"\uBBD1\uBBD2\uBBD4",35,"\uBBFA\uBBFB\uBBFD\uBBFE\uBC01"],["9341","\uBC03",4,"\uBC0A\uBC0E\uBC10\uBC12\uBC13\uBC19\uBC1A\uBC20\uBC21\uBC22\uBC23\uBC26\uBC28\uBC2A\uBC2B\uBC2C\uBC2E\uBC2F\uBC32\uBC33\uBC35"],["9361","\uBC36\uBC37\uBC39",6,"\uBC42\uBC46\uBC47\uBC48\uBC4A\uBC4B\uBC4E\uBC4F\uBC51",8],["9381","\uBC5A\uBC5B\uBC5C\uBC5E",37,"\uBC86\uBC87\uBC89\uBC8A\uBC8D\uBC8F",4,"\uBC96\uBC98\uBC9B",4,"\uBCA2\uBCA3\uBCA5\uBCA6\uBCA9",6,"\uBCB2\uBCB6",5,"\uBCBE\uBCBF\uBCC1\uBCC2\uBCC3\uBCC5",7,"\uBCCE\uBCD2\uBCD3\uBCD4\uBCD6\uBCD7\uBCD9\uBCDA\uBCDB\uBCDD",22,"\uBCF7\uBCF9\uBCFA\uBCFB\uBCFD"],["9441","\uBCFE",5,"\uBD06\uBD08\uBD0A",5,"\uBD11\uBD12\uBD13\uBD15",8],["9461","\uBD1E",5,"\uBD25",6,"\uBD2D",12],["9481","\uBD3A",5,"\uBD41",6,"\uBD4A\uBD4B\uBD4D\uBD4E\uBD4F\uBD51",6,"\uBD5A",9,"\uBD65\uBD66\uBD67\uBD69",22,"\uBD82\uBD83\uBD85\uBD86\uBD8B",4,"\uBD92\uBD94\uBD96\uBD97\uBD98\uBD9B\uBD9D",6,"\uBDA5",10,"\uBDB1",6,"\uBDB9",24],["9541","\uBDD2\uBDD3\uBDD6\uBDD7\uBDD9\uBDDA\uBDDB\uBDDD",11,"\uBDEA",5,"\uBDF1"],["9561","\uBDF2\uBDF3\uBDF5\uBDF6\uBDF7\uBDF9",6,"\uBE01\uBE02\uBE04\uBE06",5,"\uBE0E\uBE0F\uBE11\uBE12\uBE13"],["9581","\uBE15",6,"\uBE1E\uBE20",35,"\uBE46\uBE47\uBE49\uBE4A\uBE4B\uBE4D\uBE4F",4,"\uBE56\uBE58\uBE5C\uBE5D\uBE5E\uBE5F\uBE62\uBE63\uBE65\uBE66\uBE67\uBE69\uBE6B",4,"\uBE72\uBE76",4,"\uBE7E\uBE7F\uBE81\uBE82\uBE83\uBE85",6,"\uBE8E\uBE92",5,"\uBE9A",13,"\uBEA9",14],["9641","\uBEB8",23,"\uBED2\uBED3"],["9661","\uBED5\uBED6\uBED9",6,"\uBEE1\uBEE2\uBEE6",5,"\uBEED",8],["9681","\uBEF6",10,"\uBF02",5,"\uBF0A",13,"\uBF1A\uBF1E",33,"\uBF42\uBF43\uBF45\uBF46\uBF47\uBF49",6,"\uBF52\uBF53\uBF54\uBF56",44],["9741","\uBF83",16,"\uBF95",8],["9761","\uBF9E",17,"\uBFB1",7],["9781","\uBFB9",11,"\uBFC6",5,"\uBFCE\uBFCF\uBFD1\uBFD2\uBFD3\uBFD5",6,"\uBFDD\uBFDE\uBFE0\uBFE2",89,"\uC03D\uC03E\uC03F"],["9841","\uC040",16,"\uC052",5,"\uC059\uC05A\uC05B"],["9861","\uC05D\uC05E\uC05F\uC061",6,"\uC06A",15],["9881","\uC07A",21,"\uC092\uC093\uC095\uC096\uC097\uC099",6,"\uC0A2\uC0A4\uC0A6",5,"\uC0AE\uC0B1\uC0B2\uC0B7",4,"\uC0BE\uC0C2\uC0C3\uC0C4\uC0C6\uC0C7\uC0CA\uC0CB\uC0CD\uC0CE\uC0CF\uC0D1",6,"\uC0DA\uC0DE",5,"\uC0E6\uC0E7\uC0E9\uC0EA\uC0EB\uC0ED",6,"\uC0F6\uC0F8\uC0FA",5,"\uC101\uC102\uC103\uC105\uC106\uC107\uC109",6,"\uC111\uC112\uC113\uC114\uC116",5,"\uC121\uC122\uC125\uC128\uC129\uC12A\uC12B\uC12E"],["9941","\uC132\uC133\uC134\uC135\uC137\uC13A\uC13B\uC13D\uC13E\uC13F\uC141",6,"\uC14A\uC14E",5,"\uC156\uC157"],["9961","\uC159\uC15A\uC15B\uC15D",6,"\uC166\uC16A",5,"\uC171\uC172\uC173\uC175\uC176\uC177\uC179\uC17A\uC17B"],["9981","\uC17C",8,"\uC186",5,"\uC18F\uC191\uC192\uC193\uC195\uC197",4,"\uC19E\uC1A0\uC1A2\uC1A3\uC1A4\uC1A6\uC1A7\uC1AA\uC1AB\uC1AD\uC1AE\uC1AF\uC1B1",11,"\uC1BE",5,"\uC1C5\uC1C6\uC1C7\uC1C9\uC1CA\uC1CB\uC1CD",6,"\uC1D5\uC1D6\uC1D9",6,"\uC1E1\uC1E2\uC1E3\uC1E5\uC1E6\uC1E7\uC1E9",6,"\uC1F2\uC1F4",7,"\uC1FE\uC1FF\uC201\uC202\uC203\uC205",6,"\uC20E\uC210\uC212",5,"\uC21A\uC21B\uC21D\uC21E\uC221\uC222\uC223"],["9a41","\uC224\uC225\uC226\uC227\uC22A\uC22C\uC22E\uC230\uC233\uC235",16],["9a61","\uC246\uC247\uC249",6,"\uC252\uC253\uC255\uC256\uC257\uC259",6,"\uC261\uC262\uC263\uC264\uC266"],["9a81","\uC267",4,"\uC26E\uC26F\uC271\uC272\uC273\uC275",6,"\uC27E\uC280\uC282",5,"\uC28A",5,"\uC291",6,"\uC299\uC29A\uC29C\uC29E",5,"\uC2A6\uC2A7\uC2A9\uC2AA\uC2AB\uC2AE",5,"\uC2B6\uC2B8\uC2BA",33,"\uC2DE\uC2DF\uC2E1\uC2E2\uC2E5",5,"\uC2EE\uC2F0\uC2F2\uC2F3\uC2F4\uC2F5\uC2F7\uC2FA\uC2FD\uC2FE\uC2FF\uC301",6,"\uC30A\uC30B\uC30E\uC30F"],["9b41","\uC310\uC311\uC312\uC316\uC317\uC319\uC31A\uC31B\uC31D",6,"\uC326\uC327\uC32A",8],["9b61","\uC333",17,"\uC346",7],["9b81","\uC34E",25,"\uC36A\uC36B\uC36D\uC36E\uC36F\uC371\uC373",4,"\uC37A\uC37B\uC37E",5,"\uC385\uC386\uC387\uC389\uC38A\uC38B\uC38D",50,"\uC3C1",22,"\uC3DA"],["9c41","\uC3DB\uC3DD\uC3DE\uC3E1\uC3E3",4,"\uC3EA\uC3EB\uC3EC\uC3EE",5,"\uC3F6\uC3F7\uC3F9",5],["9c61","\uC3FF",8,"\uC409",6,"\uC411",9],["9c81","\uC41B",8,"\uC425",6,"\uC42D\uC42E\uC42F\uC431\uC432\uC433\uC435",6,"\uC43E",9,"\uC449",26,"\uC466\uC467\uC469\uC46A\uC46B\uC46D",6,"\uC476\uC477\uC478\uC47A",5,"\uC481",18,"\uC495",6,"\uC49D",12],["9d41","\uC4AA",13,"\uC4B9\uC4BA\uC4BB\uC4BD",8],["9d61","\uC4C6",25],["9d81","\uC4E0",8,"\uC4EA",5,"\uC4F2\uC4F3\uC4F5\uC4F6\uC4F7\uC4F9\uC4FB\uC4FC\uC4FD\uC4FE\uC502",9,"\uC50D\uC50E\uC50F\uC511\uC512\uC513\uC515",6,"\uC51D",10,"\uC52A\uC52B\uC52D\uC52E\uC52F\uC531",6,"\uC53A\uC53C\uC53E",5,"\uC546\uC547\uC54B\uC54F\uC550\uC551\uC552\uC556\uC55A\uC55B\uC55C\uC55F\uC562\uC563\uC565\uC566\uC567\uC569",6,"\uC572\uC576",5,"\uC57E\uC57F\uC581\uC582\uC583\uC585\uC586\uC588\uC589\uC58A\uC58B\uC58E\uC590\uC592\uC593\uC594"],["9e41","\uC596\uC599\uC59A\uC59B\uC59D\uC59E\uC59F\uC5A1",7,"\uC5AA",9,"\uC5B6"],["9e61","\uC5B7\uC5BA\uC5BF",4,"\uC5CB\uC5CD\uC5CF\uC5D2\uC5D3\uC5D5\uC5D6\uC5D7\uC5D9",6,"\uC5E2\uC5E4\uC5E6\uC5E7"],["9e81","\uC5E8\uC5E9\uC5EA\uC5EB\uC5EF\uC5F1\uC5F2\uC5F3\uC5F5\uC5F8\uC5F9\uC5FA\uC5FB\uC602\uC603\uC604\uC609\uC60A\uC60B\uC60D\uC60E\uC60F\uC611",6,"\uC61A\uC61D",6,"\uC626\uC627\uC629\uC62A\uC62B\uC62F\uC631\uC632\uC636\uC638\uC63A\uC63C\uC63D\uC63E\uC63F\uC642\uC643\uC645\uC646\uC647\uC649",6,"\uC652\uC656",5,"\uC65E\uC65F\uC661",10,"\uC66D\uC66E\uC670\uC672",5,"\uC67A\uC67B\uC67D\uC67E\uC67F\uC681",6,"\uC68A\uC68C\uC68E",5,"\uC696\uC697\uC699\uC69A\uC69B\uC69D",6,"\uC6A6"],["9f41","\uC6A8\uC6AA",5,"\uC6B2\uC6B3\uC6B5\uC6B6\uC6B7\uC6BB",4,"\uC6C2\uC6C4\uC6C6",5,"\uC6CE"],["9f61","\uC6CF\uC6D1\uC6D2\uC6D3\uC6D5",6,"\uC6DE\uC6DF\uC6E2",5,"\uC6EA\uC6EB\uC6ED\uC6EE\uC6EF\uC6F1\uC6F2"],["9f81","\uC6F3",4,"\uC6FA\uC6FB\uC6FC\uC6FE",5,"\uC706\uC707\uC709\uC70A\uC70B\uC70D",6,"\uC716\uC718\uC71A",5,"\uC722\uC723\uC725\uC726\uC727\uC729",6,"\uC732\uC734\uC736\uC738\uC739\uC73A\uC73B\uC73E\uC73F\uC741\uC742\uC743\uC745",4,"\uC74B\uC74E\uC750\uC759\uC75A\uC75B\uC75D\uC75E\uC75F\uC761",6,"\uC769\uC76A\uC76C",7,"\uC776\uC777\uC779\uC77A\uC77B\uC77F\uC780\uC781\uC782\uC786\uC78B\uC78C\uC78D\uC78F\uC792\uC793\uC795\uC799\uC79B",4,"\uC7A2\uC7A7",4,"\uC7AE\uC7AF\uC7B1\uC7B2\uC7B3\uC7B5\uC7B6\uC7B7"],["a041","\uC7B8\uC7B9\uC7BA\uC7BB\uC7BE\uC7C2",5,"\uC7CA\uC7CB\uC7CD\uC7CF\uC7D1",6,"\uC7D9\uC7DA\uC7DB\uC7DC"],["a061","\uC7DE",5,"\uC7E5\uC7E6\uC7E7\uC7E9\uC7EA\uC7EB\uC7ED",13],["a081","\uC7FB",4,"\uC802\uC803\uC805\uC806\uC807\uC809\uC80B",4,"\uC812\uC814\uC817",4,"\uC81E\uC81F\uC821\uC822\uC823\uC825",6,"\uC82E\uC830\uC832",5,"\uC839\uC83A\uC83B\uC83D\uC83E\uC83F\uC841",6,"\uC84A\uC84B\uC84E",5,"\uC855",26,"\uC872\uC873\uC875\uC876\uC877\uC879\uC87B",4,"\uC882\uC884\uC888\uC889\uC88A\uC88E",5,"\uC895",7,"\uC89E\uC8A0\uC8A2\uC8A3\uC8A4"],["a141","\uC8A5\uC8A6\uC8A7\uC8A9",18,"\uC8BE\uC8BF\uC8C0\uC8C1"],["a161","\uC8C2\uC8C3\uC8C5\uC8C6\uC8C7\uC8C9\uC8CA\uC8CB\uC8CD",6,"\uC8D6\uC8D8\uC8DA",5,"\uC8E2\uC8E3\uC8E5"],["a181","\uC8E6",14,"\uC8F6",5,"\uC8FE\uC8FF\uC901\uC902\uC903\uC907",4,"\uC90E\u3000\u3001\u3002\xB7\u2025\u2026\xA8\u3003\xAD\u2015\u2225\uFF3C\u223C\u2018\u2019\u201C\u201D\u3014\u3015\u3008",9,"\xB1\xD7\xF7\u2260\u2264\u2265\u221E\u2234\xB0\u2032\u2033\u2103\u212B\uFFE0\uFFE1\uFFE5\u2642\u2640\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\xA7\u203B\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u2192\u2190\u2191\u2193\u2194\u3013\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229\u2227\u2228\uFFE2"],["a241","\uC910\uC912",5,"\uC919",18],["a261","\uC92D",6,"\uC935",18],["a281","\uC948",7,"\uC952\uC953\uC955\uC956\uC957\uC959",6,"\uC962\uC964",7,"\uC96D\uC96E\uC96F\u21D2\u21D4\u2200\u2203\xB4\uFF5E\u02C7\u02D8\u02DD\u02DA\u02D9\xB8\u02DB\xA1\xBF\u02D0\u222E\u2211\u220F\xA4\u2109\u2030\u25C1\u25C0\u25B7\u25B6\u2664\u2660\u2661\u2665\u2667\u2663\u2299\u25C8\u25A3\u25D0\u25D1\u2592\u25A4\u25A5\u25A8\u25A7\u25A6\u25A9\u2668\u260F\u260E\u261C\u261E\xB6\u2020\u2021\u2195\u2197\u2199\u2196\u2198\u266D\u2669\u266A\u266C\u327F\u321C\u2116\u33C7\u2122\u33C2\u33D8\u2121\u20AC\xAE"],["a341","\uC971\uC972\uC973\uC975",6,"\uC97D",10,"\uC98A\uC98B\uC98D\uC98E\uC98F"],["a361","\uC991",6,"\uC99A\uC99C\uC99E",16],["a381","\uC9AF",16,"\uC9C2\uC9C3\uC9C5\uC9C6\uC9C9\uC9CB",4,"\uC9D2\uC9D4\uC9D7\uC9D8\uC9DB\uFF01",58,"\uFFE6\uFF3D",32,"\uFFE3"],["a441","\uC9DE\uC9DF\uC9E1\uC9E3\uC9E5\uC9E6\uC9E8\uC9E9\uC9EA\uC9EB\uC9EE\uC9F2",5,"\uC9FA\uC9FB\uC9FD\uC9FE\uC9FF\uCA01\uCA02\uCA03\uCA04"],["a461","\uCA05\uCA06\uCA07\uCA0A\uCA0E",5,"\uCA15\uCA16\uCA17\uCA19",12],["a481","\uCA26\uCA27\uCA28\uCA2A",28,"\u3131",93],["a541","\uCA47",4,"\uCA4E\uCA4F\uCA51\uCA52\uCA53\uCA55",6,"\uCA5E\uCA62",5,"\uCA69\uCA6A"],["a561","\uCA6B",17,"\uCA7E",5,"\uCA85\uCA86"],["a581","\uCA87",16,"\uCA99",14,"\u2170",9],["a5b0","\u2160",9],["a5c1","\u0391",16,"\u03A3",6],["a5e1","\u03B1",16,"\u03C3",6],["a641","\uCAA8",19,"\uCABE\uCABF\uCAC1\uCAC2\uCAC3\uCAC5"],["a661","\uCAC6",5,"\uCACE\uCAD0\uCAD2\uCAD4\uCAD5\uCAD6\uCAD7\uCADA",5,"\uCAE1",6],["a681","\uCAE8\uCAE9\uCAEA\uCAEB\uCAED",6,"\uCAF5",18,"\uCB09\uCB0A\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542\u2512\u2511\u251A\u2519\u2516\u2515\u250E\u250D\u251E\u251F\u2521\u2522\u2526\u2527\u2529\u252A\u252D\u252E\u2531\u2532\u2535\u2536\u2539\u253A\u253D\u253E\u2540\u2541\u2543",7],["a741","\uCB0B",4,"\uCB11\uCB12\uCB13\uCB15\uCB16\uCB17\uCB19",6,"\uCB22",7],["a761","\uCB2A",22,"\uCB42\uCB43\uCB44"],["a781","\uCB45\uCB46\uCB47\uCB4A\uCB4B\uCB4D\uCB4E\uCB4F\uCB51",6,"\uCB5A\uCB5B\uCB5C\uCB5E",5,"\uCB65",7,"\u3395\u3396\u3397\u2113\u3398\u33C4\u33A3\u33A4\u33A5\u33A6\u3399",9,"\u33CA\u338D\u338E\u338F\u33CF\u3388\u3389\u33C8\u33A7\u33A8\u33B0",9,"\u3380",4,"\u33BA",5,"\u3390",4,"\u2126\u33C0\u33C1\u338A\u338B\u338C\u33D6\u33C5\u33AD\u33AE\u33AF\u33DB\u33A9\u33AA\u33AB\u33AC\u33DD\u33D0\u33D3\u33C3\u33C9\u33DC\u33C6"],["a841","\uCB6D",10,"\uCB7A",14],["a861","\uCB89",18,"\uCB9D",6],["a881","\uCBA4",19,"\uCBB9",11,"\xC6\xD0\xAA\u0126"],["a8a6","\u0132"],["a8a8","\u013F\u0141\xD8\u0152\xBA\xDE\u0166\u014A"],["a8b1","\u3260",27,"\u24D0",25,"\u2460",14,"\xBD\u2153\u2154\xBC\xBE\u215B\u215C\u215D\u215E"],["a941","\uCBC5",14,"\uCBD5",10],["a961","\uCBE0\uCBE1\uCBE2\uCBE3\uCBE5\uCBE6\uCBE8\uCBEA",18],["a981","\uCBFD",14,"\uCC0E\uCC0F\uCC11\uCC12\uCC13\uCC15",6,"\uCC1E\uCC1F\uCC20\uCC23\uCC24\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0140\u0142\xF8\u0153\xDF\xFE\u0167\u014B\u0149\u3200",27,"\u249C",25,"\u2474",14,"\xB9\xB2\xB3\u2074\u207F\u2081\u2082\u2083\u2084"],["aa41","\uCC25\uCC26\uCC2A\uCC2B\uCC2D\uCC2F\uCC31",6,"\uCC3A\uCC3F",4,"\uCC46\uCC47\uCC49\uCC4A\uCC4B\uCC4D\uCC4E"],["aa61","\uCC4F",4,"\uCC56\uCC5A",5,"\uCC61\uCC62\uCC63\uCC65\uCC67\uCC69",6,"\uCC71\uCC72"],["aa81","\uCC73\uCC74\uCC76",29,"\u3041",82],["ab41","\uCC94\uCC95\uCC96\uCC97\uCC9A\uCC9B\uCC9D\uCC9E\uCC9F\uCCA1",6,"\uCCAA\uCCAE",5,"\uCCB6\uCCB7\uCCB9"],["ab61","\uCCBA\uCCBB\uCCBD",6,"\uCCC6\uCCC8\uCCCA",5,"\uCCD1\uCCD2\uCCD3\uCCD5",5],["ab81","\uCCDB",8,"\uCCE5",6,"\uCCED\uCCEE\uCCEF\uCCF1",12,"\u30A1",85],["ac41","\uCCFE\uCCFF\uCD00\uCD02",5,"\uCD0A\uCD0B\uCD0D\uCD0E\uCD0F\uCD11",6,"\uCD1A\uCD1C\uCD1E\uCD1F\uCD20"],["ac61","\uCD21\uCD22\uCD23\uCD25\uCD26\uCD27\uCD29\uCD2A\uCD2B\uCD2D",11,"\uCD3A",4],["ac81","\uCD3F",28,"\uCD5D\uCD5E\uCD5F\u0410",5,"\u0401\u0416",25],["acd1","\u0430",5,"\u0451\u0436",25],["ad41","\uCD61\uCD62\uCD63\uCD65",6,"\uCD6E\uCD70\uCD72",5,"\uCD79",7],["ad61","\uCD81",6,"\uCD89",10,"\uCD96\uCD97\uCD99\uCD9A\uCD9B\uCD9D\uCD9E\uCD9F"],["ad81","\uCDA0\uCDA1\uCDA2\uCDA3\uCDA6\uCDA8\uCDAA",5,"\uCDB1",18,"\uCDC5"],["ae41","\uCDC6",5,"\uCDCD\uCDCE\uCDCF\uCDD1",16],["ae61","\uCDE2",5,"\uCDE9\uCDEA\uCDEB\uCDED\uCDEE\uCDEF\uCDF1",6,"\uCDFA\uCDFC\uCDFE",4],["ae81","\uCE03\uCE05\uCE06\uCE07\uCE09\uCE0A\uCE0B\uCE0D",6,"\uCE15\uCE16\uCE17\uCE18\uCE1A",5,"\uCE22\uCE23\uCE25\uCE26\uCE27\uCE29\uCE2A\uCE2B"],["af41","\uCE2C\uCE2D\uCE2E\uCE2F\uCE32\uCE34\uCE36",19],["af61","\uCE4A",13,"\uCE5A\uCE5B\uCE5D\uCE5E\uCE62",5,"\uCE6A\uCE6C"],["af81","\uCE6E",5,"\uCE76\uCE77\uCE79\uCE7A\uCE7B\uCE7D",6,"\uCE86\uCE88\uCE8A",5,"\uCE92\uCE93\uCE95\uCE96\uCE97\uCE99"],["b041","\uCE9A",5,"\uCEA2\uCEA6",5,"\uCEAE",12],["b061","\uCEBB",5,"\uCEC2",19],["b081","\uCED6",13,"\uCEE6\uCEE7\uCEE9\uCEEA\uCEED",6,"\uCEF6\uCEFA",5,"\uAC00\uAC01\uAC04\uAC07\uAC08\uAC09\uAC0A\uAC10",7,"\uAC19",4,"\uAC20\uAC24\uAC2C\uAC2D\uAC2F\uAC30\uAC31\uAC38\uAC39\uAC3C\uAC40\uAC4B\uAC4D\uAC54\uAC58\uAC5C\uAC70\uAC71\uAC74\uAC77\uAC78\uAC7A\uAC80\uAC81\uAC83\uAC84\uAC85\uAC86\uAC89\uAC8A\uAC8B\uAC8C\uAC90\uAC94\uAC9C\uAC9D\uAC9F\uACA0\uACA1\uACA8\uACA9\uACAA\uACAC\uACAF\uACB0\uACB8\uACB9\uACBB\uACBC\uACBD\uACC1\uACC4\uACC8\uACCC\uACD5\uACD7\uACE0\uACE1\uACE4\uACE7\uACE8\uACEA\uACEC\uACEF\uACF0\uACF1\uACF3\uACF5\uACF6\uACFC\uACFD\uAD00\uAD04\uAD06"],["b141","\uCF02\uCF03\uCF05\uCF06\uCF07\uCF09",6,"\uCF12\uCF14\uCF16",5,"\uCF1D\uCF1E\uCF1F\uCF21\uCF22\uCF23"],["b161","\uCF25",6,"\uCF2E\uCF32",5,"\uCF39",11],["b181","\uCF45",14,"\uCF56\uCF57\uCF59\uCF5A\uCF5B\uCF5D",6,"\uCF66\uCF68\uCF6A\uCF6B\uCF6C\uAD0C\uAD0D\uAD0F\uAD11\uAD18\uAD1C\uAD20\uAD29\uAD2C\uAD2D\uAD34\uAD35\uAD38\uAD3C\uAD44\uAD45\uAD47\uAD49\uAD50\uAD54\uAD58\uAD61\uAD63\uAD6C\uAD6D\uAD70\uAD73\uAD74\uAD75\uAD76\uAD7B\uAD7C\uAD7D\uAD7F\uAD81\uAD82\uAD88\uAD89\uAD8C\uAD90\uAD9C\uAD9D\uADA4\uADB7\uADC0\uADC1\uADC4\uADC8\uADD0\uADD1\uADD3\uADDC\uADE0\uADE4\uADF8\uADF9\uADFC\uADFF\uAE00\uAE01\uAE08\uAE09\uAE0B\uAE0D\uAE14\uAE30\uAE31\uAE34\uAE37\uAE38\uAE3A\uAE40\uAE41\uAE43\uAE45\uAE46\uAE4A\uAE4C\uAE4D\uAE4E\uAE50\uAE54\uAE56\uAE5C\uAE5D\uAE5F\uAE60\uAE61\uAE65\uAE68\uAE69\uAE6C\uAE70\uAE78"],["b241","\uCF6D\uCF6E\uCF6F\uCF72\uCF73\uCF75\uCF76\uCF77\uCF79",6,"\uCF81\uCF82\uCF83\uCF84\uCF86",5,"\uCF8D"],["b261","\uCF8E",18,"\uCFA2",5,"\uCFA9"],["b281","\uCFAA",5,"\uCFB1",18,"\uCFC5",6,"\uAE79\uAE7B\uAE7C\uAE7D\uAE84\uAE85\uAE8C\uAEBC\uAEBD\uAEBE\uAEC0\uAEC4\uAECC\uAECD\uAECF\uAED0\uAED1\uAED8\uAED9\uAEDC\uAEE8\uAEEB\uAEED\uAEF4\uAEF8\uAEFC\uAF07\uAF08\uAF0D\uAF10\uAF2C\uAF2D\uAF30\uAF32\uAF34\uAF3C\uAF3D\uAF3F\uAF41\uAF42\uAF43\uAF48\uAF49\uAF50\uAF5C\uAF5D\uAF64\uAF65\uAF79\uAF80\uAF84\uAF88\uAF90\uAF91\uAF95\uAF9C\uAFB8\uAFB9\uAFBC\uAFC0\uAFC7\uAFC8\uAFC9\uAFCB\uAFCD\uAFCE\uAFD4\uAFDC\uAFE8\uAFE9\uAFF0\uAFF1\uAFF4\uAFF8\uB000\uB001\uB004\uB00C\uB010\uB014\uB01C\uB01D\uB028\uB044\uB045\uB048\uB04A\uB04C\uB04E\uB053\uB054\uB055\uB057\uB059"],["b341","\uCFCC",19,"\uCFE2\uCFE3\uCFE5\uCFE6\uCFE7\uCFE9"],["b361","\uCFEA",5,"\uCFF2\uCFF4\uCFF6",5,"\uCFFD\uCFFE\uCFFF\uD001\uD002\uD003\uD005",5],["b381","\uD00B",5,"\uD012",5,"\uD019",19,"\uB05D\uB07C\uB07D\uB080\uB084\uB08C\uB08D\uB08F\uB091\uB098\uB099\uB09A\uB09C\uB09F\uB0A0\uB0A1\uB0A2\uB0A8\uB0A9\uB0AB",4,"\uB0B1\uB0B3\uB0B4\uB0B5\uB0B8\uB0BC\uB0C4\uB0C5\uB0C7\uB0C8\uB0C9\uB0D0\uB0D1\uB0D4\uB0D8\uB0E0\uB0E5\uB108\uB109\uB10B\uB10C\uB110\uB112\uB113\uB118\uB119\uB11B\uB11C\uB11D\uB123\uB124\uB125\uB128\uB12C\uB134\uB135\uB137\uB138\uB139\uB140\uB141\uB144\uB148\uB150\uB151\uB154\uB155\uB158\uB15C\uB160\uB178\uB179\uB17C\uB180\uB182\uB188\uB189\uB18B\uB18D\uB192\uB193\uB194\uB198\uB19C\uB1A8\uB1CC\uB1D0\uB1D4\uB1DC\uB1DD"],["b441","\uD02E",5,"\uD036\uD037\uD039\uD03A\uD03B\uD03D",6,"\uD046\uD048\uD04A",5],["b461","\uD051\uD052\uD053\uD055\uD056\uD057\uD059",6,"\uD061",10,"\uD06E\uD06F"],["b481","\uD071\uD072\uD073\uD075",6,"\uD07E\uD07F\uD080\uD082",18,"\uB1DF\uB1E8\uB1E9\uB1EC\uB1F0\uB1F9\uB1FB\uB1FD\uB204\uB205\uB208\uB20B\uB20C\uB214\uB215\uB217\uB219\uB220\uB234\uB23C\uB258\uB25C\uB260\uB268\uB269\uB274\uB275\uB27C\uB284\uB285\uB289\uB290\uB291\uB294\uB298\uB299\uB29A\uB2A0\uB2A1\uB2A3\uB2A5\uB2A6\uB2AA\uB2AC\uB2B0\uB2B4\uB2C8\uB2C9\uB2CC\uB2D0\uB2D2\uB2D8\uB2D9\uB2DB\uB2DD\uB2E2\uB2E4\uB2E5\uB2E6\uB2E8\uB2EB",4,"\uB2F3\uB2F4\uB2F5\uB2F7",4,"\uB2FF\uB300\uB301\uB304\uB308\uB310\uB311\uB313\uB314\uB315\uB31C\uB354\uB355\uB356\uB358\uB35B\uB35C\uB35E\uB35F\uB364\uB365"],["b541","\uD095",14,"\uD0A6\uD0A7\uD0A9\uD0AA\uD0AB\uD0AD",5],["b561","\uD0B3\uD0B6\uD0B8\uD0BA",5,"\uD0C2\uD0C3\uD0C5\uD0C6\uD0C7\uD0CA",5,"\uD0D2\uD0D6",4],["b581","\uD0DB\uD0DE\uD0DF\uD0E1\uD0E2\uD0E3\uD0E5",6,"\uD0EE\uD0F2",5,"\uD0F9",11,"\uB367\uB369\uB36B\uB36E\uB370\uB371\uB374\uB378\uB380\uB381\uB383\uB384\uB385\uB38C\uB390\uB394\uB3A0\uB3A1\uB3A8\uB3AC\uB3C4\uB3C5\uB3C8\uB3CB\uB3CC\uB3CE\uB3D0\uB3D4\uB3D5\uB3D7\uB3D9\uB3DB\uB3DD\uB3E0\uB3E4\uB3E8\uB3FC\uB410\uB418\uB41C\uB420\uB428\uB429\uB42B\uB434\uB450\uB451\uB454\uB458\uB460\uB461\uB463\uB465\uB46C\uB480\uB488\uB49D\uB4A4\uB4A8\uB4AC\uB4B5\uB4B7\uB4B9\uB4C0\uB4C4\uB4C8\uB4D0\uB4D5\uB4DC\uB4DD\uB4E0\uB4E3\uB4E4\uB4E6\uB4EC\uB4ED\uB4EF\uB4F1\uB4F8\uB514\uB515\uB518\uB51B\uB51C\uB524\uB525\uB527\uB528\uB529\uB52A\uB530\uB531\uB534\uB538"],["b641","\uD105",7,"\uD10E",17],["b661","\uD120",15,"\uD132\uD133\uD135\uD136\uD137\uD139\uD13B\uD13C\uD13D\uD13E"],["b681","\uD13F\uD142\uD146",5,"\uD14E\uD14F\uD151\uD152\uD153\uD155",6,"\uD15E\uD160\uD162",5,"\uD169\uD16A\uD16B\uD16D\uB540\uB541\uB543\uB544\uB545\uB54B\uB54C\uB54D\uB550\uB554\uB55C\uB55D\uB55F\uB560\uB561\uB5A0\uB5A1\uB5A4\uB5A8\uB5AA\uB5AB\uB5B0\uB5B1\uB5B3\uB5B4\uB5B5\uB5BB\uB5BC\uB5BD\uB5C0\uB5C4\uB5CC\uB5CD\uB5CF\uB5D0\uB5D1\uB5D8\uB5EC\uB610\uB611\uB614\uB618\uB625\uB62C\uB634\uB648\uB664\uB668\uB69C\uB69D\uB6A0\uB6A4\uB6AB\uB6AC\uB6B1\uB6D4\uB6F0\uB6F4\uB6F8\uB700\uB701\uB705\uB728\uB729\uB72C\uB72F\uB730\uB738\uB739\uB73B\uB744\uB748\uB74C\uB754\uB755\uB760\uB764\uB768\uB770\uB771\uB773\uB775\uB77C\uB77D\uB780\uB784\uB78C\uB78D\uB78F\uB790\uB791\uB792\uB796\uB797"],["b741","\uD16E",13,"\uD17D",6,"\uD185\uD186\uD187\uD189\uD18A"],["b761","\uD18B",20,"\uD1A2\uD1A3\uD1A5\uD1A6\uD1A7"],["b781","\uD1A9",6,"\uD1B2\uD1B4\uD1B6\uD1B7\uD1B8\uD1B9\uD1BB\uD1BD\uD1BE\uD1BF\uD1C1",14,"\uB798\uB799\uB79C\uB7A0\uB7A8\uB7A9\uB7AB\uB7AC\uB7AD\uB7B4\uB7B5\uB7B8\uB7C7\uB7C9\uB7EC\uB7ED\uB7F0\uB7F4\uB7FC\uB7FD\uB7FF\uB800\uB801\uB807\uB808\uB809\uB80C\uB810\uB818\uB819\uB81B\uB81D\uB824\uB825\uB828\uB82C\uB834\uB835\uB837\uB838\uB839\uB840\uB844\uB851\uB853\uB85C\uB85D\uB860\uB864\uB86C\uB86D\uB86F\uB871\uB878\uB87C\uB88D\uB8A8\uB8B0\uB8B4\uB8B8\uB8C0\uB8C1\uB8C3\uB8C5\uB8CC\uB8D0\uB8D4\uB8DD\uB8DF\uB8E1\uB8E8\uB8E9\uB8EC\uB8F0\uB8F8\uB8F9\uB8FB\uB8FD\uB904\uB918\uB920\uB93C\uB93D\uB940\uB944\uB94C\uB94F\uB951\uB958\uB959\uB95C\uB960\uB968\uB969"],["b841","\uD1D0",7,"\uD1D9",17],["b861","\uD1EB",8,"\uD1F5\uD1F6\uD1F7\uD1F9",13],["b881","\uD208\uD20A",5,"\uD211",24,"\uB96B\uB96D\uB974\uB975\uB978\uB97C\uB984\uB985\uB987\uB989\uB98A\uB98D\uB98E\uB9AC\uB9AD\uB9B0\uB9B4\uB9BC\uB9BD\uB9BF\uB9C1\uB9C8\uB9C9\uB9CC\uB9CE",4,"\uB9D8\uB9D9\uB9DB\uB9DD\uB9DE\uB9E1\uB9E3\uB9E4\uB9E5\uB9E8\uB9EC\uB9F4\uB9F5\uB9F7\uB9F8\uB9F9\uB9FA\uBA00\uBA01\uBA08\uBA15\uBA38\uBA39\uBA3C\uBA40\uBA42\uBA48\uBA49\uBA4B\uBA4D\uBA4E\uBA53\uBA54\uBA55\uBA58\uBA5C\uBA64\uBA65\uBA67\uBA68\uBA69\uBA70\uBA71\uBA74\uBA78\uBA83\uBA84\uBA85\uBA87\uBA8C\uBAA8\uBAA9\uBAAB\uBAAC\uBAB0\uBAB2\uBAB8\uBAB9\uBABB\uBABD\uBAC4\uBAC8\uBAD8\uBAD9\uBAFC"],["b941","\uD22A\uD22B\uD22E\uD22F\uD231\uD232\uD233\uD235",6,"\uD23E\uD240\uD242",5,"\uD249\uD24A\uD24B\uD24C"],["b961","\uD24D",14,"\uD25D",6,"\uD265\uD266\uD267\uD268"],["b981","\uD269",22,"\uD282\uD283\uD285\uD286\uD287\uD289\uD28A\uD28B\uD28C\uBB00\uBB04\uBB0D\uBB0F\uBB11\uBB18\uBB1C\uBB20\uBB29\uBB2B\uBB34\uBB35\uBB36\uBB38\uBB3B\uBB3C\uBB3D\uBB3E\uBB44\uBB45\uBB47\uBB49\uBB4D\uBB4F\uBB50\uBB54\uBB58\uBB61\uBB63\uBB6C\uBB88\uBB8C\uBB90\uBBA4\uBBA8\uBBAC\uBBB4\uBBB7\uBBC0\uBBC4\uBBC8\uBBD0\uBBD3\uBBF8\uBBF9\uBBFC\uBBFF\uBC00\uBC02\uBC08\uBC09\uBC0B\uBC0C\uBC0D\uBC0F\uBC11\uBC14",4,"\uBC1B",4,"\uBC24\uBC25\uBC27\uBC29\uBC2D\uBC30\uBC31\uBC34\uBC38\uBC40\uBC41\uBC43\uBC44\uBC45\uBC49\uBC4C\uBC4D\uBC50\uBC5D\uBC84\uBC85\uBC88\uBC8B\uBC8C\uBC8E\uBC94\uBC95\uBC97"],["ba41","\uD28D\uD28E\uD28F\uD292\uD293\uD294\uD296",5,"\uD29D\uD29E\uD29F\uD2A1\uD2A2\uD2A3\uD2A5",6,"\uD2AD"],["ba61","\uD2AE\uD2AF\uD2B0\uD2B2",5,"\uD2BA\uD2BB\uD2BD\uD2BE\uD2C1\uD2C3",4,"\uD2CA\uD2CC",5],["ba81","\uD2D2\uD2D3\uD2D5\uD2D6\uD2D7\uD2D9\uD2DA\uD2DB\uD2DD",6,"\uD2E6",9,"\uD2F2\uD2F3\uD2F5\uD2F6\uD2F7\uD2F9\uD2FA\uBC99\uBC9A\uBCA0\uBCA1\uBCA4\uBCA7\uBCA8\uBCB0\uBCB1\uBCB3\uBCB4\uBCB5\uBCBC\uBCBD\uBCC0\uBCC4\uBCCD\uBCCF\uBCD0\uBCD1\uBCD5\uBCD8\uBCDC\uBCF4\uBCF5\uBCF6\uBCF8\uBCFC\uBD04\uBD05\uBD07\uBD09\uBD10\uBD14\uBD24\uBD2C\uBD40\uBD48\uBD49\uBD4C\uBD50\uBD58\uBD59\uBD64\uBD68\uBD80\uBD81\uBD84\uBD87\uBD88\uBD89\uBD8A\uBD90\uBD91\uBD93\uBD95\uBD99\uBD9A\uBD9C\uBDA4\uBDB0\uBDB8\uBDD4\uBDD5\uBDD8\uBDDC\uBDE9\uBDF0\uBDF4\uBDF8\uBE00\uBE03\uBE05\uBE0C\uBE0D\uBE10\uBE14\uBE1C\uBE1D\uBE1F\uBE44\uBE45\uBE48\uBE4C\uBE4E\uBE54\uBE55\uBE57\uBE59\uBE5A\uBE5B\uBE60\uBE61\uBE64"],["bb41","\uD2FB",4,"\uD302\uD304\uD306",5,"\uD30F\uD311\uD312\uD313\uD315\uD317",4,"\uD31E\uD322\uD323"],["bb61","\uD324\uD326\uD327\uD32A\uD32B\uD32D\uD32E\uD32F\uD331",6,"\uD33A\uD33E",5,"\uD346\uD347\uD348\uD349"],["bb81","\uD34A",31,"\uBE68\uBE6A\uBE70\uBE71\uBE73\uBE74\uBE75\uBE7B\uBE7C\uBE7D\uBE80\uBE84\uBE8C\uBE8D\uBE8F\uBE90\uBE91\uBE98\uBE99\uBEA8\uBED0\uBED1\uBED4\uBED7\uBED8\uBEE0\uBEE3\uBEE4\uBEE5\uBEEC\uBF01\uBF08\uBF09\uBF18\uBF19\uBF1B\uBF1C\uBF1D\uBF40\uBF41\uBF44\uBF48\uBF50\uBF51\uBF55\uBF94\uBFB0\uBFC5\uBFCC\uBFCD\uBFD0\uBFD4\uBFDC\uBFDF\uBFE1\uC03C\uC051\uC058\uC05C\uC060\uC068\uC069\uC090\uC091\uC094\uC098\uC0A0\uC0A1\uC0A3\uC0A5\uC0AC\uC0AD\uC0AF\uC0B0\uC0B3\uC0B4\uC0B5\uC0B6\uC0BC\uC0BD\uC0BF\uC0C0\uC0C1\uC0C5\uC0C8\uC0C9\uC0CC\uC0D0\uC0D8\uC0D9\uC0DB\uC0DC\uC0DD\uC0E4"],["bc41","\uD36A",17,"\uD37E\uD37F\uD381\uD382\uD383\uD385\uD386\uD387"],["bc61","\uD388\uD389\uD38A\uD38B\uD38E\uD392",5,"\uD39A\uD39B\uD39D\uD39E\uD39F\uD3A1",6,"\uD3AA\uD3AC\uD3AE"],["bc81","\uD3AF",4,"\uD3B5\uD3B6\uD3B7\uD3B9\uD3BA\uD3BB\uD3BD",6,"\uD3C6\uD3C7\uD3CA",5,"\uD3D1",5,"\uC0E5\uC0E8\uC0EC\uC0F4\uC0F5\uC0F7\uC0F9\uC100\uC104\uC108\uC110\uC115\uC11C",4,"\uC123\uC124\uC126\uC127\uC12C\uC12D\uC12F\uC130\uC131\uC136\uC138\uC139\uC13C\uC140\uC148\uC149\uC14B\uC14C\uC14D\uC154\uC155\uC158\uC15C\uC164\uC165\uC167\uC168\uC169\uC170\uC174\uC178\uC185\uC18C\uC18D\uC18E\uC190\uC194\uC196\uC19C\uC19D\uC19F\uC1A1\uC1A5\uC1A8\uC1A9\uC1AC\uC1B0\uC1BD\uC1C4\uC1C8\uC1CC\uC1D4\uC1D7\uC1D8\uC1E0\uC1E4\uC1E8\uC1F0\uC1F1\uC1F3\uC1FC\uC1FD\uC200\uC204\uC20C\uC20D\uC20F\uC211\uC218\uC219\uC21C\uC21F\uC220\uC228\uC229\uC22B\uC22D"],["bd41","\uD3D7\uD3D9",7,"\uD3E2\uD3E4",7,"\uD3EE\uD3EF\uD3F1\uD3F2\uD3F3\uD3F5\uD3F6\uD3F7"],["bd61","\uD3F8\uD3F9\uD3FA\uD3FB\uD3FE\uD400\uD402",5,"\uD409",13],["bd81","\uD417",5,"\uD41E",25,"\uC22F\uC231\uC232\uC234\uC248\uC250\uC251\uC254\uC258\uC260\uC265\uC26C\uC26D\uC270\uC274\uC27C\uC27D\uC27F\uC281\uC288\uC289\uC290\uC298\uC29B\uC29D\uC2A4\uC2A5\uC2A8\uC2AC\uC2AD\uC2B4\uC2B5\uC2B7\uC2B9\uC2DC\uC2DD\uC2E0\uC2E3\uC2E4\uC2EB\uC2EC\uC2ED\uC2EF\uC2F1\uC2F6\uC2F8\uC2F9\uC2FB\uC2FC\uC300\uC308\uC309\uC30C\uC30D\uC313\uC314\uC315\uC318\uC31C\uC324\uC325\uC328\uC329\uC345\uC368\uC369\uC36C\uC370\uC372\uC378\uC379\uC37C\uC37D\uC384\uC388\uC38C\uC3C0\uC3D8\uC3D9\uC3DC\uC3DF\uC3E0\uC3E2\uC3E8\uC3E9\uC3ED\uC3F4\uC3F5\uC3F8\uC408\uC410\uC424\uC42C\uC430"],["be41","\uD438",7,"\uD441\uD442\uD443\uD445",14],["be61","\uD454",7,"\uD45D\uD45E\uD45F\uD461\uD462\uD463\uD465",7,"\uD46E\uD470\uD471\uD472"],["be81","\uD473",4,"\uD47A\uD47B\uD47D\uD47E\uD481\uD483",4,"\uD48A\uD48C\uD48E",5,"\uD495",8,"\uC434\uC43C\uC43D\uC448\uC464\uC465\uC468\uC46C\uC474\uC475\uC479\uC480\uC494\uC49C\uC4B8\uC4BC\uC4E9\uC4F0\uC4F1\uC4F4\uC4F8\uC4FA\uC4FF\uC500\uC501\uC50C\uC510\uC514\uC51C\uC528\uC529\uC52C\uC530\uC538\uC539\uC53B\uC53D\uC544\uC545\uC548\uC549\uC54A\uC54C\uC54D\uC54E\uC553\uC554\uC555\uC557\uC558\uC559\uC55D\uC55E\uC560\uC561\uC564\uC568\uC570\uC571\uC573\uC574\uC575\uC57C\uC57D\uC580\uC584\uC587\uC58C\uC58D\uC58F\uC591\uC595\uC597\uC598\uC59C\uC5A0\uC5A9\uC5B4\uC5B5\uC5B8\uC5B9\uC5BB\uC5BC\uC5BD\uC5BE\uC5C4",6,"\uC5CC\uC5CE"],["bf41","\uD49E",10,"\uD4AA",14],["bf61","\uD4B9",18,"\uD4CD\uD4CE\uD4CF\uD4D1\uD4D2\uD4D3\uD4D5"],["bf81","\uD4D6",5,"\uD4DD\uD4DE\uD4E0",7,"\uD4E9\uD4EA\uD4EB\uD4ED\uD4EE\uD4EF\uD4F1",6,"\uD4F9\uD4FA\uD4FC\uC5D0\uC5D1\uC5D4\uC5D8\uC5E0\uC5E1\uC5E3\uC5E5\uC5EC\uC5ED\uC5EE\uC5F0\uC5F4\uC5F6\uC5F7\uC5FC",5,"\uC605\uC606\uC607\uC608\uC60C\uC610\uC618\uC619\uC61B\uC61C\uC624\uC625\uC628\uC62C\uC62D\uC62E\uC630\uC633\uC634\uC635\uC637\uC639\uC63B\uC640\uC641\uC644\uC648\uC650\uC651\uC653\uC654\uC655\uC65C\uC65D\uC660\uC66C\uC66F\uC671\uC678\uC679\uC67C\uC680\uC688\uC689\uC68B\uC68D\uC694\uC695\uC698\uC69C\uC6A4\uC6A5\uC6A7\uC6A9\uC6B0\uC6B1\uC6B4\uC6B8\uC6B9\uC6BA\uC6C0\uC6C1\uC6C3\uC6C5\uC6CC\uC6CD\uC6D0\uC6D4\uC6DC\uC6DD\uC6E0\uC6E1\uC6E8"],["c041","\uD4FE",5,"\uD505\uD506\uD507\uD509\uD50A\uD50B\uD50D",6,"\uD516\uD518",5],["c061","\uD51E",25],["c081","\uD538\uD539\uD53A\uD53B\uD53E\uD53F\uD541\uD542\uD543\uD545",6,"\uD54E\uD550\uD552",5,"\uD55A\uD55B\uD55D\uD55E\uD55F\uD561\uD562\uD563\uC6E9\uC6EC\uC6F0\uC6F8\uC6F9\uC6FD\uC704\uC705\uC708\uC70C\uC714\uC715\uC717\uC719\uC720\uC721\uC724\uC728\uC730\uC731\uC733\uC735\uC737\uC73C\uC73D\uC740\uC744\uC74A\uC74C\uC74D\uC74F\uC751",7,"\uC75C\uC760\uC768\uC76B\uC774\uC775\uC778\uC77C\uC77D\uC77E\uC783\uC784\uC785\uC787\uC788\uC789\uC78A\uC78E\uC790\uC791\uC794\uC796\uC797\uC798\uC79A\uC7A0\uC7A1\uC7A3\uC7A4\uC7A5\uC7A6\uC7AC\uC7AD\uC7B0\uC7B4\uC7BC\uC7BD\uC7BF\uC7C0\uC7C1\uC7C8\uC7C9\uC7CC\uC7CE\uC7D0\uC7D8\uC7DD\uC7E4\uC7E8\uC7EC\uC800\uC801\uC804\uC808\uC80A"],["c141","\uD564\uD566\uD567\uD56A\uD56C\uD56E",5,"\uD576\uD577\uD579\uD57A\uD57B\uD57D",6,"\uD586\uD58A\uD58B"],["c161","\uD58C\uD58D\uD58E\uD58F\uD591",19,"\uD5A6\uD5A7"],["c181","\uD5A8",31,"\uC810\uC811\uC813\uC815\uC816\uC81C\uC81D\uC820\uC824\uC82C\uC82D\uC82F\uC831\uC838\uC83C\uC840\uC848\uC849\uC84C\uC84D\uC854\uC870\uC871\uC874\uC878\uC87A\uC880\uC881\uC883\uC885\uC886\uC887\uC88B\uC88C\uC88D\uC894\uC89D\uC89F\uC8A1\uC8A8\uC8BC\uC8BD\uC8C4\uC8C8\uC8CC\uC8D4\uC8D5\uC8D7\uC8D9\uC8E0\uC8E1\uC8E4\uC8F5\uC8FC\uC8FD\uC900\uC904\uC905\uC906\uC90C\uC90D\uC90F\uC911\uC918\uC92C\uC934\uC950\uC951\uC954\uC958\uC960\uC961\uC963\uC96C\uC970\uC974\uC97C\uC988\uC989\uC98C\uC990\uC998\uC999\uC99B\uC99D\uC9C0\uC9C1\uC9C4\uC9C7\uC9C8\uC9CA\uC9D0\uC9D1\uC9D3"],["c241","\uD5CA\uD5CB\uD5CD\uD5CE\uD5CF\uD5D1\uD5D3",4,"\uD5DA\uD5DC\uD5DE",5,"\uD5E6\uD5E7\uD5E9\uD5EA\uD5EB\uD5ED\uD5EE"],["c261","\uD5EF",4,"\uD5F6\uD5F8\uD5FA",5,"\uD602\uD603\uD605\uD606\uD607\uD609",6,"\uD612"],["c281","\uD616",5,"\uD61D\uD61E\uD61F\uD621\uD622\uD623\uD625",7,"\uD62E",9,"\uD63A\uD63B\uC9D5\uC9D6\uC9D9\uC9DA\uC9DC\uC9DD\uC9E0\uC9E2\uC9E4\uC9E7\uC9EC\uC9ED\uC9EF\uC9F0\uC9F1\uC9F8\uC9F9\uC9FC\uCA00\uCA08\uCA09\uCA0B\uCA0C\uCA0D\uCA14\uCA18\uCA29\uCA4C\uCA4D\uCA50\uCA54\uCA5C\uCA5D\uCA5F\uCA60\uCA61\uCA68\uCA7D\uCA84\uCA98\uCABC\uCABD\uCAC0\uCAC4\uCACC\uCACD\uCACF\uCAD1\uCAD3\uCAD8\uCAD9\uCAE0\uCAEC\uCAF4\uCB08\uCB10\uCB14\uCB18\uCB20\uCB21\uCB41\uCB48\uCB49\uCB4C\uCB50\uCB58\uCB59\uCB5D\uCB64\uCB78\uCB79\uCB9C\uCBB8\uCBD4\uCBE4\uCBE7\uCBE9\uCC0C\uCC0D\uCC10\uCC14\uCC1C\uCC1D\uCC21\uCC22\uCC27\uCC28\uCC29\uCC2C\uCC2E\uCC30\uCC38\uCC39\uCC3B"],["c341","\uD63D\uD63E\uD63F\uD641\uD642\uD643\uD644\uD646\uD647\uD64A\uD64C\uD64E\uD64F\uD650\uD652\uD653\uD656\uD657\uD659\uD65A\uD65B\uD65D",4],["c361","\uD662",4,"\uD668\uD66A",5,"\uD672\uD673\uD675",11],["c381","\uD681\uD682\uD684\uD686",5,"\uD68E\uD68F\uD691\uD692\uD693\uD695",7,"\uD69E\uD6A0\uD6A2",5,"\uD6A9\uD6AA\uCC3C\uCC3D\uCC3E\uCC44\uCC45\uCC48\uCC4C\uCC54\uCC55\uCC57\uCC58\uCC59\uCC60\uCC64\uCC66\uCC68\uCC70\uCC75\uCC98\uCC99\uCC9C\uCCA0\uCCA8\uCCA9\uCCAB\uCCAC\uCCAD\uCCB4\uCCB5\uCCB8\uCCBC\uCCC4\uCCC5\uCCC7\uCCC9\uCCD0\uCCD4\uCCE4\uCCEC\uCCF0\uCD01\uCD08\uCD09\uCD0C\uCD10\uCD18\uCD19\uCD1B\uCD1D\uCD24\uCD28\uCD2C\uCD39\uCD5C\uCD60\uCD64\uCD6C\uCD6D\uCD6F\uCD71\uCD78\uCD88\uCD94\uCD95\uCD98\uCD9C\uCDA4\uCDA5\uCDA7\uCDA9\uCDB0\uCDC4\uCDCC\uCDD0\uCDE8\uCDEC\uCDF0\uCDF8\uCDF9\uCDFB\uCDFD\uCE04\uCE08\uCE0C\uCE14\uCE19\uCE20\uCE21\uCE24\uCE28\uCE30\uCE31\uCE33\uCE35"],["c441","\uD6AB\uD6AD\uD6AE\uD6AF\uD6B1",7,"\uD6BA\uD6BC",7,"\uD6C6\uD6C7\uD6C9\uD6CA\uD6CB"],["c461","\uD6CD\uD6CE\uD6CF\uD6D0\uD6D2\uD6D3\uD6D5\uD6D6\uD6D8\uD6DA",5,"\uD6E1\uD6E2\uD6E3\uD6E5\uD6E6\uD6E7\uD6E9",4],["c481","\uD6EE\uD6EF\uD6F1\uD6F2\uD6F3\uD6F4\uD6F6",5,"\uD6FE\uD6FF\uD701\uD702\uD703\uD705",11,"\uD712\uD713\uD714\uCE58\uCE59\uCE5C\uCE5F\uCE60\uCE61\uCE68\uCE69\uCE6B\uCE6D\uCE74\uCE75\uCE78\uCE7C\uCE84\uCE85\uCE87\uCE89\uCE90\uCE91\uCE94\uCE98\uCEA0\uCEA1\uCEA3\uCEA4\uCEA5\uCEAC\uCEAD\uCEC1\uCEE4\uCEE5\uCEE8\uCEEB\uCEEC\uCEF4\uCEF5\uCEF7\uCEF8\uCEF9\uCF00\uCF01\uCF04\uCF08\uCF10\uCF11\uCF13\uCF15\uCF1C\uCF20\uCF24\uCF2C\uCF2D\uCF2F\uCF30\uCF31\uCF38\uCF54\uCF55\uCF58\uCF5C\uCF64\uCF65\uCF67\uCF69\uCF70\uCF71\uCF74\uCF78\uCF80\uCF85\uCF8C\uCFA1\uCFA8\uCFB0\uCFC4\uCFE0\uCFE1\uCFE4\uCFE8\uCFF0\uCFF1\uCFF3\uCFF5\uCFFC\uD000\uD004\uD011\uD018\uD02D\uD034\uD035\uD038\uD03C"],["c541","\uD715\uD716\uD717\uD71A\uD71B\uD71D\uD71E\uD71F\uD721",6,"\uD72A\uD72C\uD72E",5,"\uD736\uD737\uD739"],["c561","\uD73A\uD73B\uD73D",6,"\uD745\uD746\uD748\uD74A",5,"\uD752\uD753\uD755\uD75A",4],["c581","\uD75F\uD762\uD764\uD766\uD767\uD768\uD76A\uD76B\uD76D\uD76E\uD76F\uD771\uD772\uD773\uD775",6,"\uD77E\uD77F\uD780\uD782",5,"\uD78A\uD78B\uD044\uD045\uD047\uD049\uD050\uD054\uD058\uD060\uD06C\uD06D\uD070\uD074\uD07C\uD07D\uD081\uD0A4\uD0A5\uD0A8\uD0AC\uD0B4\uD0B5\uD0B7\uD0B9\uD0C0\uD0C1\uD0C4\uD0C8\uD0C9\uD0D0\uD0D1\uD0D3\uD0D4\uD0D5\uD0DC\uD0DD\uD0E0\uD0E4\uD0EC\uD0ED\uD0EF\uD0F0\uD0F1\uD0F8\uD10D\uD130\uD131\uD134\uD138\uD13A\uD140\uD141\uD143\uD144\uD145\uD14C\uD14D\uD150\uD154\uD15C\uD15D\uD15F\uD161\uD168\uD16C\uD17C\uD184\uD188\uD1A0\uD1A1\uD1A4\uD1A8\uD1B0\uD1B1\uD1B3\uD1B5\uD1BA\uD1BC\uD1C0\uD1D8\uD1F4\uD1F8\uD207\uD209\uD210\uD22C\uD22D\uD230\uD234\uD23C\uD23D\uD23F\uD241\uD248\uD25C"],["c641","\uD78D\uD78E\uD78F\uD791",6,"\uD79A\uD79C\uD79E",5],["c6a1","\uD264\uD280\uD281\uD284\uD288\uD290\uD291\uD295\uD29C\uD2A0\uD2A4\uD2AC\uD2B1\uD2B8\uD2B9\uD2BC\uD2BF\uD2C0\uD2C2\uD2C8\uD2C9\uD2CB\uD2D4\uD2D8\uD2DC\uD2E4\uD2E5\uD2F0\uD2F1\uD2F4\uD2F8\uD300\uD301\uD303\uD305\uD30C\uD30D\uD30E\uD310\uD314\uD316\uD31C\uD31D\uD31F\uD320\uD321\uD325\uD328\uD329\uD32C\uD330\uD338\uD339\uD33B\uD33C\uD33D\uD344\uD345\uD37C\uD37D\uD380\uD384\uD38C\uD38D\uD38F\uD390\uD391\uD398\uD399\uD39C\uD3A0\uD3A8\uD3A9\uD3AB\uD3AD\uD3B4\uD3B8\uD3BC\uD3C4\uD3C5\uD3C8\uD3C9\uD3D0\uD3D8\uD3E1\uD3E3\uD3EC\uD3ED\uD3F0\uD3F4\uD3FC\uD3FD\uD3FF\uD401"],["c7a1","\uD408\uD41D\uD440\uD444\uD45C\uD460\uD464\uD46D\uD46F\uD478\uD479\uD47C\uD47F\uD480\uD482\uD488\uD489\uD48B\uD48D\uD494\uD4A9\uD4CC\uD4D0\uD4D4\uD4DC\uD4DF\uD4E8\uD4EC\uD4F0\uD4F8\uD4FB\uD4FD\uD504\uD508\uD50C\uD514\uD515\uD517\uD53C\uD53D\uD540\uD544\uD54C\uD54D\uD54F\uD551\uD558\uD559\uD55C\uD560\uD565\uD568\uD569\uD56B\uD56D\uD574\uD575\uD578\uD57C\uD584\uD585\uD587\uD588\uD589\uD590\uD5A5\uD5C8\uD5C9\uD5CC\uD5D0\uD5D2\uD5D8\uD5D9\uD5DB\uD5DD\uD5E4\uD5E5\uD5E8\uD5EC\uD5F4\uD5F5\uD5F7\uD5F9\uD600\uD601\uD604\uD608\uD610\uD611\uD613\uD614\uD615\uD61C\uD620"],["c8a1","\uD624\uD62D\uD638\uD639\uD63C\uD640\uD645\uD648\uD649\uD64B\uD64D\uD651\uD654\uD655\uD658\uD65C\uD667\uD669\uD670\uD671\uD674\uD683\uD685\uD68C\uD68D\uD690\uD694\uD69D\uD69F\uD6A1\uD6A8\uD6AC\uD6B0\uD6B9\uD6BB\uD6C4\uD6C5\uD6C8\uD6CC\uD6D1\uD6D4\uD6D7\uD6D9\uD6E0\uD6E4\uD6E8\uD6F0\uD6F5\uD6FC\uD6FD\uD700\uD704\uD711\uD718\uD719\uD71C\uD720\uD728\uD729\uD72B\uD72D\uD734\uD735\uD738\uD73C\uD744\uD747\uD749\uD750\uD751\uD754\uD756\uD757\uD758\uD759\uD760\uD761\uD763\uD765\uD769\uD76C\uD770\uD774\uD77C\uD77D\uD781\uD788\uD789\uD78C\uD790\uD798\uD799\uD79B\uD79D"],["caa1","\u4F3D\u4F73\u5047\u50F9\u52A0\u53EF\u5475\u54E5\u5609\u5AC1\u5BB6\u6687\u67B6\u67B7\u67EF\u6B4C\u73C2\u75C2\u7A3C\u82DB\u8304\u8857\u8888\u8A36\u8CC8\u8DCF\u8EFB\u8FE6\u99D5\u523B\u5374\u5404\u606A\u6164\u6BBC\u73CF\u811A\u89BA\u89D2\u95A3\u4F83\u520A\u58BE\u5978\u59E6\u5E72\u5E79\u61C7\u63C0\u6746\u67EC\u687F\u6F97\u764E\u770B\u78F5\u7A08\u7AFF\u7C21\u809D\u826E\u8271\u8AEB\u9593\u4E6B\u559D\u66F7\u6E34\u78A3\u7AED\u845B\u8910\u874E\u97A8\u52D8\u574E\u582A\u5D4C\u611F\u61BE\u6221\u6562\u67D1\u6A44\u6E1B\u7518\u75B3\u76E3\u77B0\u7D3A\u90AF\u9451\u9452\u9F95"],["cba1","\u5323\u5CAC\u7532\u80DB\u9240\u9598\u525B\u5808\u59DC\u5CA1\u5D17\u5EB7\u5F3A\u5F4A\u6177\u6C5F\u757A\u7586\u7CE0\u7D73\u7DB1\u7F8C\u8154\u8221\u8591\u8941\u8B1B\u92FC\u964D\u9C47\u4ECB\u4EF7\u500B\u51F1\u584F\u6137\u613E\u6168\u6539\u69EA\u6F11\u75A5\u7686\u76D6\u7B87\u82A5\u84CB\uF900\u93A7\u958B\u5580\u5BA2\u5751\uF901\u7CB3\u7FB9\u91B5\u5028\u53BB\u5C45\u5DE8\u62D2\u636E\u64DA\u64E7\u6E20\u70AC\u795B\u8DDD\u8E1E\uF902\u907D\u9245\u92F8\u4E7E\u4EF6\u5065\u5DFE\u5EFA\u6106\u6957\u8171\u8654\u8E47\u9375\u9A2B\u4E5E\u5091\u6770\u6840\u5109\u528D\u5292\u6AA2"],["cca1","\u77BC\u9210\u9ED4\u52AB\u602F\u8FF2\u5048\u61A9\u63ED\u64CA\u683C\u6A84\u6FC0\u8188\u89A1\u9694\u5805\u727D\u72AC\u7504\u7D79\u7E6D\u80A9\u898B\u8B74\u9063\u9D51\u6289\u6C7A\u6F54\u7D50\u7F3A\u8A23\u517C\u614A\u7B9D\u8B19\u9257\u938C\u4EAC\u4FD3\u501E\u50BE\u5106\u52C1\u52CD\u537F\u5770\u5883\u5E9A\u5F91\u6176\u61AC\u64CE\u656C\u666F\u66BB\u66F4\u6897\u6D87\u7085\u70F1\u749F\u74A5\u74CA\u75D9\u786C\u78EC\u7ADF\u7AF6\u7D45\u7D93\u8015\u803F\u811B\u8396\u8B66\u8F15\u9015\u93E1\u9803\u9838\u9A5A\u9BE8\u4FC2\u5553\u583A\u5951\u5B63\u5C46\u60B8\u6212\u6842\u68B0"],["cda1","\u68E8\u6EAA\u754C\u7678\u78CE\u7A3D\u7CFB\u7E6B\u7E7C\u8A08\u8AA1\u8C3F\u968E\u9DC4\u53E4\u53E9\u544A\u5471\u56FA\u59D1\u5B64\u5C3B\u5EAB\u62F7\u6537\u6545\u6572\u66A0\u67AF\u69C1\u6CBD\u75FC\u7690\u777E\u7A3F\u7F94\u8003\u80A1\u818F\u82E6\u82FD\u83F0\u85C1\u8831\u88B4\u8AA5\uF903\u8F9C\u932E\u96C7\u9867\u9AD8\u9F13\u54ED\u659B\u66F2\u688F\u7A40\u8C37\u9D60\u56F0\u5764\u5D11\u6606\u68B1\u68CD\u6EFE\u7428\u889E\u9BE4\u6C68\uF904\u9AA8\u4F9B\u516C\u5171\u529F\u5B54\u5DE5\u6050\u606D\u62F1\u63A7\u653B\u73D9\u7A7A\u86A3\u8CA2\u978F\u4E32\u5BE1\u6208\u679C\u74DC"],["cea1","\u79D1\u83D3\u8A87\u8AB2\u8DE8\u904E\u934B\u9846\u5ED3\u69E8\u85FF\u90ED\uF905\u51A0\u5B98\u5BEC\u6163\u68FA\u6B3E\u704C\u742F\u74D8\u7BA1\u7F50\u83C5\u89C0\u8CAB\u95DC\u9928\u522E\u605D\u62EC\u9002\u4F8A\u5149\u5321\u58D9\u5EE3\u66E0\u6D38\u709A\u72C2\u73D6\u7B50\u80F1\u945B\u5366\u639B\u7F6B\u4E56\u5080\u584A\u58DE\u602A\u6127\u62D0\u69D0\u9B41\u5B8F\u7D18\u80B1\u8F5F\u4EA4\u50D1\u54AC\u55AC\u5B0C\u5DA0\u5DE7\u652A\u654E\u6821\u6A4B\u72E1\u768E\u77EF\u7D5E\u7FF9\u81A0\u854E\u86DF\u8F03\u8F4E\u90CA\u9903\u9A55\u9BAB\u4E18\u4E45\u4E5D\u4EC7\u4FF1\u5177\u52FE"],["cfa1","\u5340\u53E3\u53E5\u548E\u5614\u5775\u57A2\u5BC7\u5D87\u5ED0\u61FC\u62D8\u6551\u67B8\u67E9\u69CB\u6B50\u6BC6\u6BEC\u6C42\u6E9D\u7078\u72D7\u7396\u7403\u77BF\u77E9\u7A76\u7D7F\u8009\u81FC\u8205\u820A\u82DF\u8862\u8B33\u8CFC\u8EC0\u9011\u90B1\u9264\u92B6\u99D2\u9A45\u9CE9\u9DD7\u9F9C\u570B\u5C40\u83CA\u97A0\u97AB\u9EB4\u541B\u7A98\u7FA4\u88D9\u8ECD\u90E1\u5800\u5C48\u6398\u7A9F\u5BAE\u5F13\u7A79\u7AAE\u828E\u8EAC\u5026\u5238\u52F8\u5377\u5708\u62F3\u6372\u6B0A\u6DC3\u7737\u53A5\u7357\u8568\u8E76\u95D5\u673A\u6AC3\u6F70\u8A6D\u8ECC\u994B\uF906\u6677\u6B78\u8CB4"],["d0a1","\u9B3C\uF907\u53EB\u572D\u594E\u63C6\u69FB\u73EA\u7845\u7ABA\u7AC5\u7CFE\u8475\u898F\u8D73\u9035\u95A8\u52FB\u5747\u7547\u7B60\u83CC\u921E\uF908\u6A58\u514B\u524B\u5287\u621F\u68D8\u6975\u9699\u50C5\u52A4\u52E4\u61C3\u65A4\u6839\u69FF\u747E\u7B4B\u82B9\u83EB\u89B2\u8B39\u8FD1\u9949\uF909\u4ECA\u5997\u64D2\u6611\u6A8E\u7434\u7981\u79BD\u82A9\u887E\u887F\u895F\uF90A\u9326\u4F0B\u53CA\u6025\u6271\u6C72\u7D1A\u7D66\u4E98\u5162\u77DC\u80AF\u4F01\u4F0E\u5176\u5180\u55DC\u5668\u573B\u57FA\u57FC\u5914\u5947\u5993\u5BC4\u5C90\u5D0E\u5DF1\u5E7E\u5FCC\u6280\u65D7\u65E3"],["d1a1","\u671E\u671F\u675E\u68CB\u68C4\u6A5F\u6B3A\u6C23\u6C7D\u6C82\u6DC7\u7398\u7426\u742A\u7482\u74A3\u7578\u757F\u7881\u78EF\u7941\u7947\u7948\u797A\u7B95\u7D00\u7DBA\u7F88\u8006\u802D\u808C\u8A18\u8B4F\u8C48\u8D77\u9321\u9324\u98E2\u9951\u9A0E\u9A0F\u9A65\u9E92\u7DCA\u4F76\u5409\u62EE\u6854\u91D1\u55AB\u513A\uF90B\uF90C\u5A1C\u61E6\uF90D\u62CF\u62FF\uF90E",5,"\u90A3\uF914",4,"\u8AFE\uF919\uF91A\uF91B\uF91C\u6696\uF91D\u7156\uF91E\uF91F\u96E3\uF920\u634F\u637A\u5357\uF921\u678F\u6960\u6E73\uF922\u7537\uF923\uF924\uF925"],["d2a1","\u7D0D\uF926\uF927\u8872\u56CA\u5A18\uF928",4,"\u4E43\uF92D\u5167\u5948\u67F0\u8010\uF92E\u5973\u5E74\u649A\u79CA\u5FF5\u606C\u62C8\u637B\u5BE7\u5BD7\u52AA\uF92F\u5974\u5F29\u6012\uF930\uF931\uF932\u7459\uF933",5,"\u99D1\uF939",10,"\u6FC3\uF944\uF945\u81BF\u8FB2\u60F1\uF946\uF947\u8166\uF948\uF949\u5C3F\uF94A",7,"\u5AE9\u8A25\u677B\u7D10\uF952",5,"\u80FD\uF958\uF959\u5C3C\u6CE5\u533F\u6EBA\u591A\u8336"],["d3a1","\u4E39\u4EB6\u4F46\u55AE\u5718\u58C7\u5F56\u65B7\u65E6\u6A80\u6BB5\u6E4D\u77ED\u7AEF\u7C1E\u7DDE\u86CB\u8892\u9132\u935B\u64BB\u6FBE\u737A\u75B8\u9054\u5556\u574D\u61BA\u64D4\u66C7\u6DE1\u6E5B\u6F6D\u6FB9\u75F0\u8043\u81BD\u8541\u8983\u8AC7\u8B5A\u931F\u6C93\u7553\u7B54\u8E0F\u905D\u5510\u5802\u5858\u5E62\u6207\u649E\u68E0\u7576\u7CD6\u87B3\u9EE8\u4EE3\u5788\u576E\u5927\u5C0D\u5CB1\u5E36\u5F85\u6234\u64E1\u73B3\u81FA\u888B\u8CB8\u968A\u9EDB\u5B85\u5FB7\u60B3\u5012\u5200\u5230\u5716\u5835\u5857\u5C0E\u5C60\u5CF6\u5D8B\u5EA6\u5F92\u60BC\u6311\u6389\u6417\u6843"],["d4a1","\u68F9\u6AC2\u6DD8\u6E21\u6ED4\u6FE4\u71FE\u76DC\u7779\u79B1\u7A3B\u8404\u89A9\u8CED\u8DF3\u8E48\u9003\u9014\u9053\u90FD\u934D\u9676\u97DC\u6BD2\u7006\u7258\u72A2\u7368\u7763\u79BF\u7BE4\u7E9B\u8B80\u58A9\u60C7\u6566\u65FD\u66BE\u6C8C\u711E\u71C9\u8C5A\u9813\u4E6D\u7A81\u4EDD\u51AC\u51CD\u52D5\u540C\u61A7\u6771\u6850\u68DF\u6D1E\u6F7C\u75BC\u77B3\u7AE5\u80F4\u8463\u9285\u515C\u6597\u675C\u6793\u75D8\u7AC7\u8373\uF95A\u8C46\u9017\u982D\u5C6F\u81C0\u829A\u9041\u906F\u920D\u5F97\u5D9D\u6A59\u71C8\u767B\u7B49\u85E4\u8B04\u9127\u9A30\u5587\u61F6\uF95B\u7669\u7F85"],["d5a1","\u863F\u87BA\u88F8\u908F\uF95C\u6D1B\u70D9\u73DE\u7D61\u843D\uF95D\u916A\u99F1\uF95E\u4E82\u5375\u6B04\u6B12\u703E\u721B\u862D\u9E1E\u524C\u8FA3\u5D50\u64E5\u652C\u6B16\u6FEB\u7C43\u7E9C\u85CD\u8964\u89BD\u62C9\u81D8\u881F\u5ECA\u6717\u6D6A\u72FC\u7405\u746F\u8782\u90DE\u4F86\u5D0D\u5FA0\u840A\u51B7\u63A0\u7565\u4EAE\u5006\u5169\u51C9\u6881\u6A11\u7CAE\u7CB1\u7CE7\u826F\u8AD2\u8F1B\u91CF\u4FB6\u5137\u52F5\u5442\u5EEC\u616E\u623E\u65C5\u6ADA\u6FFE\u792A\u85DC\u8823\u95AD\u9A62\u9A6A\u9E97\u9ECE\u529B\u66C6\u6B77\u701D\u792B\u8F62\u9742\u6190\u6200\u6523\u6F23"],["d6a1","\u7149\u7489\u7DF4\u806F\u84EE\u8F26\u9023\u934A\u51BD\u5217\u52A3\u6D0C\u70C8\u88C2\u5EC9\u6582\u6BAE\u6FC2\u7C3E\u7375\u4EE4\u4F36\u56F9\uF95F\u5CBA\u5DBA\u601C\u73B2\u7B2D\u7F9A\u7FCE\u8046\u901E\u9234\u96F6\u9748\u9818\u9F61\u4F8B\u6FA7\u79AE\u91B4\u96B7\u52DE\uF960\u6488\u64C4\u6AD3\u6F5E\u7018\u7210\u76E7\u8001\u8606\u865C\u8DEF\u8F05\u9732\u9B6F\u9DFA\u9E75\u788C\u797F\u7DA0\u83C9\u9304\u9E7F\u9E93\u8AD6\u58DF\u5F04\u6727\u7027\u74CF\u7C60\u807E\u5121\u7028\u7262\u78CA\u8CC2\u8CDA\u8CF4\u96F7\u4E86\u50DA\u5BEE\u5ED6\u6599\u71CE\u7642\u77AD\u804A\u84FC"],["d7a1","\u907C\u9B27\u9F8D\u58D8\u5A41\u5C62\u6A13\u6DDA\u6F0F\u763B\u7D2F\u7E37\u851E\u8938\u93E4\u964B\u5289\u65D2\u67F3\u69B4\u6D41\u6E9C\u700F\u7409\u7460\u7559\u7624\u786B\u8B2C\u985E\u516D\u622E\u9678\u4F96\u502B\u5D19\u6DEA\u7DB8\u8F2A\u5F8B\u6144\u6817\uF961\u9686\u52D2\u808B\u51DC\u51CC\u695E\u7A1C\u7DBE\u83F1\u9675\u4FDA\u5229\u5398\u540F\u550E\u5C65\u60A7\u674E\u68A8\u6D6C\u7281\u72F8\u7406\u7483\uF962\u75E2\u7C6C\u7F79\u7FB8\u8389\u88CF\u88E1\u91CC\u91D0\u96E2\u9BC9\u541D\u6F7E\u71D0\u7498\u85FA\u8EAA\u96A3\u9C57\u9E9F\u6797\u6DCB\u7433\u81E8\u9716\u782C"],["d8a1","\u7ACB\u7B20\u7C92\u6469\u746A\u75F2\u78BC\u78E8\u99AC\u9B54\u9EBB\u5BDE\u5E55\u6F20\u819C\u83AB\u9088\u4E07\u534D\u5A29\u5DD2\u5F4E\u6162\u633D\u6669\u66FC\u6EFF\u6F2B\u7063\u779E\u842C\u8513\u883B\u8F13\u9945\u9C3B\u551C\u62B9\u672B\u6CAB\u8309\u896A\u977A\u4EA1\u5984\u5FD8\u5FD9\u671B\u7DB2\u7F54\u8292\u832B\u83BD\u8F1E\u9099\u57CB\u59B9\u5A92\u5BD0\u6627\u679A\u6885\u6BCF\u7164\u7F75\u8CB7\u8CE3\u9081\u9B45\u8108\u8C8A\u964C\u9A40\u9EA5\u5B5F\u6C13\u731B\u76F2\u76DF\u840C\u51AA\u8993\u514D\u5195\u52C9\u68C9\u6C94\u7704\u7720\u7DBF\u7DEC\u9762\u9EB5\u6EC5"],["d9a1","\u8511\u51A5\u540D\u547D\u660E\u669D\u6927\u6E9F\u76BF\u7791\u8317\u84C2\u879F\u9169\u9298\u9CF4\u8882\u4FAE\u5192\u52DF\u59C6\u5E3D\u6155\u6478\u6479\u66AE\u67D0\u6A21\u6BCD\u6BDB\u725F\u7261\u7441\u7738\u77DB\u8017\u82BC\u8305\u8B00\u8B28\u8C8C\u6728\u6C90\u7267\u76EE\u7766\u7A46\u9DA9\u6B7F\u6C92\u5922\u6726\u8499\u536F\u5893\u5999\u5EDF\u63CF\u6634\u6773\u6E3A\u732B\u7AD7\u82D7\u9328\u52D9\u5DEB\u61AE\u61CB\u620A\u62C7\u64AB\u65E0\u6959\u6B66\u6BCB\u7121\u73F7\u755D\u7E46\u821E\u8302\u856A\u8AA3\u8CBF\u9727\u9D61\u58A8\u9ED8\u5011\u520E\u543B\u554F\u6587"],["daa1","\u6C76\u7D0A\u7D0B\u805E\u868A\u9580\u96EF\u52FF\u6C95\u7269\u5473\u5A9A\u5C3E\u5D4B\u5F4C\u5FAE\u672A\u68B6\u6963\u6E3C\u6E44\u7709\u7C73\u7F8E\u8587\u8B0E\u8FF7\u9761\u9EF4\u5CB7\u60B6\u610D\u61AB\u654F\u65FB\u65FC\u6C11\u6CEF\u739F\u73C9\u7DE1\u9594\u5BC6\u871C\u8B10\u525D\u535A\u62CD\u640F\u64B2\u6734\u6A38\u6CCA\u73C0\u749E\u7B94\u7C95\u7E1B\u818A\u8236\u8584\u8FEB\u96F9\u99C1\u4F34\u534A\u53CD\u53DB\u62CC\u642C\u6500\u6591\u69C3\u6CEE\u6F58\u73ED\u7554\u7622\u76E4\u76FC\u78D0\u78FB\u792C\u7D46\u822C\u87E0\u8FD4\u9812\u98EF\u52C3\u62D4\u64A5\u6E24\u6F51"],["dba1","\u767C\u8DCB\u91B1\u9262\u9AEE\u9B43\u5023\u508D\u574A\u59A8\u5C28\u5E47\u5F77\u623F\u653E\u65B9\u65C1\u6609\u678B\u699C\u6EC2\u78C5\u7D21\u80AA\u8180\u822B\u82B3\u84A1\u868C\u8A2A\u8B17\u90A6\u9632\u9F90\u500D\u4FF3\uF963\u57F9\u5F98\u62DC\u6392\u676F\u6E43\u7119\u76C3\u80CC\u80DA\u88F4\u88F5\u8919\u8CE0\u8F29\u914D\u966A\u4F2F\u4F70\u5E1B\u67CF\u6822\u767D\u767E\u9B44\u5E61\u6A0A\u7169\u71D4\u756A\uF964\u7E41\u8543\u85E9\u98DC\u4F10\u7B4F\u7F70\u95A5\u51E1\u5E06\u68B5\u6C3E\u6C4E\u6CDB\u72AF\u7BC4\u8303\u6CD5\u743A\u50FB\u5288\u58C1\u64D8\u6A97\u74A7\u7656"],["dca1","\u78A7\u8617\u95E2\u9739\uF965\u535E\u5F01\u8B8A\u8FA8\u8FAF\u908A\u5225\u77A5\u9C49\u9F08\u4E19\u5002\u5175\u5C5B\u5E77\u661E\u663A\u67C4\u68C5\u70B3\u7501\u75C5\u79C9\u7ADD\u8F27\u9920\u9A08\u4FDD\u5821\u5831\u5BF6\u666E\u6B65\u6D11\u6E7A\u6F7D\u73E4\u752B\u83E9\u88DC\u8913\u8B5C\u8F14\u4F0F\u50D5\u5310\u535C\u5B93\u5FA9\u670D\u798F\u8179\u832F\u8514\u8907\u8986\u8F39\u8F3B\u99A5\u9C12\u672C\u4E76\u4FF8\u5949\u5C01\u5CEF\u5CF0\u6367\u68D2\u70FD\u71A2\u742B\u7E2B\u84EC\u8702\u9022\u92D2\u9CF3\u4E0D\u4ED8\u4FEF\u5085\u5256\u526F\u5426\u5490\u57E0\u592B\u5A66"],["dda1","\u5B5A\u5B75\u5BCC\u5E9C\uF966\u6276\u6577\u65A7\u6D6E\u6EA5\u7236\u7B26\u7C3F\u7F36\u8150\u8151\u819A\u8240\u8299\u83A9\u8A03\u8CA0\u8CE6\u8CFB\u8D74\u8DBA\u90E8\u91DC\u961C\u9644\u99D9\u9CE7\u5317\u5206\u5429\u5674\u58B3\u5954\u596E\u5FFF\u61A4\u626E\u6610\u6C7E\u711A\u76C6\u7C89\u7CDE\u7D1B\u82AC\u8CC1\u96F0\uF967\u4F5B\u5F17\u5F7F\u62C2\u5D29\u670B\u68DA\u787C\u7E43\u9D6C\u4E15\u5099\u5315\u532A\u5351\u5983\u5A62\u5E87\u60B2\u618A\u6249\u6279\u6590\u6787\u69A7\u6BD4\u6BD6\u6BD7\u6BD8\u6CB8\uF968\u7435\u75FA\u7812\u7891\u79D5\u79D8\u7C83\u7DCB\u7FE1\u80A5"],["dea1","\u813E\u81C2\u83F2\u871A\u88E8\u8AB9\u8B6C\u8CBB\u9119\u975E\u98DB\u9F3B\u56AC\u5B2A\u5F6C\u658C\u6AB3\u6BAF\u6D5C\u6FF1\u7015\u725D\u73AD\u8CA7\u8CD3\u983B\u6191\u6C37\u8058\u9A01\u4E4D\u4E8B\u4E9B\u4ED5\u4F3A\u4F3C\u4F7F\u4FDF\u50FF\u53F2\u53F8\u5506\u55E3\u56DB\u58EB\u5962\u5A11\u5BEB\u5BFA\u5C04\u5DF3\u5E2B\u5F99\u601D\u6368\u659C\u65AF\u67F6\u67FB\u68AD\u6B7B\u6C99\u6CD7\u6E23\u7009\u7345\u7802\u793E\u7940\u7960\u79C1\u7BE9\u7D17\u7D72\u8086\u820D\u838E\u84D1\u86C7\u88DF\u8A50\u8A5E\u8B1D\u8CDC\u8D66\u8FAD\u90AA\u98FC\u99DF\u9E9D\u524A\uF969\u6714\uF96A"],["dfa1","\u5098\u522A\u5C71\u6563\u6C55\u73CA\u7523\u759D\u7B97\u849C\u9178\u9730\u4E77\u6492\u6BBA\u715E\u85A9\u4E09\uF96B\u6749\u68EE\u6E17\u829F\u8518\u886B\u63F7\u6F81\u9212\u98AF\u4E0A\u50B7\u50CF\u511F\u5546\u55AA\u5617\u5B40\u5C19\u5CE0\u5E38\u5E8A\u5EA0\u5EC2\u60F3\u6851\u6A61\u6E58\u723D\u7240\u72C0\u76F8\u7965\u7BB1\u7FD4\u88F3\u89F4\u8A73\u8C61\u8CDE\u971C\u585E\u74BD\u8CFD\u55C7\uF96C\u7A61\u7D22\u8272\u7272\u751F\u7525\uF96D\u7B19\u5885\u58FB\u5DBC\u5E8F\u5EB6\u5F90\u6055\u6292\u637F\u654D\u6691\u66D9\u66F8\u6816\u68F2\u7280\u745E\u7B6E\u7D6E\u7DD6\u7F72"],["e0a1","\u80E5\u8212\u85AF\u897F\u8A93\u901D\u92E4\u9ECD\u9F20\u5915\u596D\u5E2D\u60DC\u6614\u6673\u6790\u6C50\u6DC5\u6F5F\u77F3\u78A9\u84C6\u91CB\u932B\u4ED9\u50CA\u5148\u5584\u5B0B\u5BA3\u6247\u657E\u65CB\u6E32\u717D\u7401\u7444\u7487\u74BF\u766C\u79AA\u7DDA\u7E55\u7FA8\u817A\u81B3\u8239\u861A\u87EC\u8A75\u8DE3\u9078\u9291\u9425\u994D\u9BAE\u5368\u5C51\u6954\u6CC4\u6D29\u6E2B\u820C\u859B\u893B\u8A2D\u8AAA\u96EA\u9F67\u5261\u66B9\u6BB2\u7E96\u87FE\u8D0D\u9583\u965D\u651D\u6D89\u71EE\uF96E\u57CE\u59D3\u5BAC\u6027\u60FA\u6210\u661F\u665F\u7329\u73F9\u76DB\u7701\u7B6C"],["e1a1","\u8056\u8072\u8165\u8AA0\u9192\u4E16\u52E2\u6B72\u6D17\u7A05\u7B39\u7D30\uF96F\u8CB0\u53EC\u562F\u5851\u5BB5\u5C0F\u5C11\u5DE2\u6240\u6383\u6414\u662D\u68B3\u6CBC\u6D88\u6EAF\u701F\u70A4\u71D2\u7526\u758F\u758E\u7619\u7B11\u7BE0\u7C2B\u7D20\u7D39\u852C\u856D\u8607\u8A34\u900D\u9061\u90B5\u92B7\u97F6\u9A37\u4FD7\u5C6C\u675F\u6D91\u7C9F\u7E8C\u8B16\u8D16\u901F\u5B6B\u5DFD\u640D\u84C0\u905C\u98E1\u7387\u5B8B\u609A\u677E\u6DDE\u8A1F\u8AA6\u9001\u980C\u5237\uF970\u7051\u788E\u9396\u8870\u91D7\u4FEE\u53D7\u55FD\u56DA\u5782\u58FD\u5AC2\u5B88\u5CAB\u5CC0\u5E25\u6101"],["e2a1","\u620D\u624B\u6388\u641C\u6536\u6578\u6A39\u6B8A\u6C34\u6D19\u6F31\u71E7\u72E9\u7378\u7407\u74B2\u7626\u7761\u79C0\u7A57\u7AEA\u7CB9\u7D8F\u7DAC\u7E61\u7F9E\u8129\u8331\u8490\u84DA\u85EA\u8896\u8AB0\u8B90\u8F38\u9042\u9083\u916C\u9296\u92B9\u968B\u96A7\u96A8\u96D6\u9700\u9808\u9996\u9AD3\u9B1A\u53D4\u587E\u5919\u5B70\u5BBF\u6DD1\u6F5A\u719F\u7421\u74B9\u8085\u83FD\u5DE1\u5F87\u5FAA\u6042\u65EC\u6812\u696F\u6A53\u6B89\u6D35\u6DF3\u73E3\u76FE\u77AC\u7B4D\u7D14\u8123\u821C\u8340\u84F4\u8563\u8A62\u8AC4\u9187\u931E\u9806\u99B4\u620C\u8853\u8FF0\u9265\u5D07\u5D27"],["e3a1","\u5D69\u745F\u819D\u8768\u6FD5\u62FE\u7FD2\u8936\u8972\u4E1E\u4E58\u50E7\u52DD\u5347\u627F\u6607\u7E69\u8805\u965E\u4F8D\u5319\u5636\u59CB\u5AA4\u5C38\u5C4E\u5C4D\u5E02\u5F11\u6043\u65BD\u662F\u6642\u67BE\u67F4\u731C\u77E2\u793A\u7FC5\u8494\u84CD\u8996\u8A66\u8A69\u8AE1\u8C55\u8C7A\u57F4\u5BD4\u5F0F\u606F\u62ED\u690D\u6B96\u6E5C\u7184\u7BD2\u8755\u8B58\u8EFE\u98DF\u98FE\u4F38\u4F81\u4FE1\u547B\u5A20\u5BB8\u613C\u65B0\u6668\u71FC\u7533\u795E\u7D33\u814E\u81E3\u8398\u85AA\u85CE\u8703\u8A0A\u8EAB\u8F9B\uF971\u8FC5\u5931\u5BA4\u5BE6\u6089\u5BE9\u5C0B\u5FC3\u6C81"],["e4a1","\uF972\u6DF1\u700B\u751A\u82AF\u8AF6\u4EC0\u5341\uF973\u96D9\u6C0F\u4E9E\u4FC4\u5152\u555E\u5A25\u5CE8\u6211\u7259\u82BD\u83AA\u86FE\u8859\u8A1D\u963F\u96C5\u9913\u9D09\u9D5D\u580A\u5CB3\u5DBD\u5E44\u60E1\u6115\u63E1\u6A02\u6E25\u9102\u9354\u984E\u9C10\u9F77\u5B89\u5CB8\u6309\u664F\u6848\u773C\u96C1\u978D\u9854\u9B9F\u65A1\u8B01\u8ECB\u95BC\u5535\u5CA9\u5DD6\u5EB5\u6697\u764C\u83F4\u95C7\u58D3\u62BC\u72CE\u9D28\u4EF0\u592E\u600F\u663B\u6B83\u79E7\u9D26\u5393\u54C0\u57C3\u5D16\u611B\u66D6\u6DAF\u788D\u827E\u9698\u9744\u5384\u627C\u6396\u6DB2\u7E0A\u814B\u984D"],["e5a1","\u6AFB\u7F4C\u9DAF\u9E1A\u4E5F\u503B\u51B6\u591C\u60F9\u63F6\u6930\u723A\u8036\uF974\u91CE\u5F31\uF975\uF976\u7D04\u82E5\u846F\u84BB\u85E5\u8E8D\uF977\u4F6F\uF978\uF979\u58E4\u5B43\u6059\u63DA\u6518\u656D\u6698\uF97A\u694A\u6A23\u6D0B\u7001\u716C\u75D2\u760D\u79B3\u7A70\uF97B\u7F8A\uF97C\u8944\uF97D\u8B93\u91C0\u967D\uF97E\u990A\u5704\u5FA1\u65BC\u6F01\u7600\u79A6\u8A9E\u99AD\u9B5A\u9F6C\u5104\u61B6\u6291\u6A8D\u81C6\u5043\u5830\u5F66\u7109\u8A00\u8AFA\u5B7C\u8616\u4FFA\u513C\u56B4\u5944\u63A9\u6DF9\u5DAA\u696D\u5186\u4E88\u4F59\uF97F\uF980\uF981\u5982\uF982"],["e6a1","\uF983\u6B5F\u6C5D\uF984\u74B5\u7916\uF985\u8207\u8245\u8339\u8F3F\u8F5D\uF986\u9918\uF987\uF988\uF989\u4EA6\uF98A\u57DF\u5F79\u6613\uF98B\uF98C\u75AB\u7E79\u8B6F\uF98D\u9006\u9A5B\u56A5\u5827\u59F8\u5A1F\u5BB4\uF98E\u5EF6\uF98F\uF990\u6350\u633B\uF991\u693D\u6C87\u6CBF\u6D8E\u6D93\u6DF5\u6F14\uF992\u70DF\u7136\u7159\uF993\u71C3\u71D5\uF994\u784F\u786F\uF995\u7B75\u7DE3\uF996\u7E2F\uF997\u884D\u8EDF\uF998\uF999\uF99A\u925B\uF99B\u9CF6\uF99C\uF99D\uF99E\u6085\u6D85\uF99F\u71B1\uF9A0\uF9A1\u95B1\u53AD\uF9A2\uF9A3\uF9A4\u67D3\uF9A5\u708E\u7130\u7430\u8276\u82D2"],["e7a1","\uF9A6\u95BB\u9AE5\u9E7D\u66C4\uF9A7\u71C1\u8449\uF9A8\uF9A9\u584B\uF9AA\uF9AB\u5DB8\u5F71\uF9AC\u6620\u668E\u6979\u69AE\u6C38\u6CF3\u6E36\u6F41\u6FDA\u701B\u702F\u7150\u71DF\u7370\uF9AD\u745B\uF9AE\u74D4\u76C8\u7A4E\u7E93\uF9AF\uF9B0\u82F1\u8A60\u8FCE\uF9B1\u9348\uF9B2\u9719\uF9B3\uF9B4\u4E42\u502A\uF9B5\u5208\u53E1\u66F3\u6C6D\u6FCA\u730A\u777F\u7A62\u82AE\u85DD\u8602\uF9B6\u88D4\u8A63\u8B7D\u8C6B\uF9B7\u92B3\uF9B8\u9713\u9810\u4E94\u4F0D\u4FC9\u50B2\u5348\u543E\u5433\u55DA\u5862\u58BA\u5967\u5A1B\u5BE4\u609F\uF9B9\u61CA\u6556\u65FF\u6664\u68A7\u6C5A\u6FB3"],["e8a1","\u70CF\u71AC\u7352\u7B7D\u8708\u8AA4\u9C32\u9F07\u5C4B\u6C83\u7344\u7389\u923A\u6EAB\u7465\u761F\u7A69\u7E15\u860A\u5140\u58C5\u64C1\u74EE\u7515\u7670\u7FC1\u9095\u96CD\u9954\u6E26\u74E6\u7AA9\u7AAA\u81E5\u86D9\u8778\u8A1B\u5A49\u5B8C\u5B9B\u68A1\u6900\u6D63\u73A9\u7413\u742C\u7897\u7DE9\u7FEB\u8118\u8155\u839E\u8C4C\u962E\u9811\u66F0\u5F80\u65FA\u6789\u6C6A\u738B\u502D\u5A03\u6B6A\u77EE\u5916\u5D6C\u5DCD\u7325\u754F\uF9BA\uF9BB\u50E5\u51F9\u582F\u592D\u5996\u59DA\u5BE5\uF9BC\uF9BD\u5DA2\u62D7\u6416\u6493\u64FE\uF9BE\u66DC\uF9BF\u6A48\uF9C0\u71FF\u7464\uF9C1"],["e9a1","\u7A88\u7AAF\u7E47\u7E5E\u8000\u8170\uF9C2\u87EF\u8981\u8B20\u9059\uF9C3\u9080\u9952\u617E\u6B32\u6D74\u7E1F\u8925\u8FB1\u4FD1\u50AD\u5197\u52C7\u57C7\u5889\u5BB9\u5EB8\u6142\u6995\u6D8C\u6E67\u6EB6\u7194\u7462\u7528\u752C\u8073\u8338\u84C9\u8E0A\u9394\u93DE\uF9C4\u4E8E\u4F51\u5076\u512A\u53C8\u53CB\u53F3\u5B87\u5BD3\u5C24\u611A\u6182\u65F4\u725B\u7397\u7440\u76C2\u7950\u7991\u79B9\u7D06\u7FBD\u828B\u85D5\u865E\u8FC2\u9047\u90F5\u91EA\u9685\u96E8\u96E9\u52D6\u5F67\u65ED\u6631\u682F\u715C\u7A36\u90C1\u980A\u4E91\uF9C5\u6A52\u6B9E\u6F90\u7189\u8018\u82B8\u8553"],["eaa1","\u904B\u9695\u96F2\u97FB\u851A\u9B31\u4E90\u718A\u96C4\u5143\u539F\u54E1\u5713\u5712\u57A3\u5A9B\u5AC4\u5BC3\u6028\u613F\u63F4\u6C85\u6D39\u6E72\u6E90\u7230\u733F\u7457\u82D1\u8881\u8F45\u9060\uF9C6\u9662\u9858\u9D1B\u6708\u8D8A\u925E\u4F4D\u5049\u50DE\u5371\u570D\u59D4\u5A01\u5C09\u6170\u6690\u6E2D\u7232\u744B\u7DEF\u80C3\u840E\u8466\u853F\u875F\u885B\u8918\u8B02\u9055\u97CB\u9B4F\u4E73\u4F91\u5112\u516A\uF9C7\u552F\u55A9\u5B7A\u5BA5\u5E7C\u5E7D\u5EBE\u60A0\u60DF\u6108\u6109\u63C4\u6538\u6709\uF9C8\u67D4\u67DA\uF9C9\u6961\u6962\u6CB9\u6D27\uF9CA\u6E38\uF9CB"],["eba1","\u6FE1\u7336\u7337\uF9CC\u745C\u7531\uF9CD\u7652\uF9CE\uF9CF\u7DAD\u81FE\u8438\u88D5\u8A98\u8ADB\u8AED\u8E30\u8E42\u904A\u903E\u907A\u9149\u91C9\u936E\uF9D0\uF9D1\u5809\uF9D2\u6BD3\u8089\u80B2\uF9D3\uF9D4\u5141\u596B\u5C39\uF9D5\uF9D6\u6F64\u73A7\u80E4\u8D07\uF9D7\u9217\u958F\uF9D8\uF9D9\uF9DA\uF9DB\u807F\u620E\u701C\u7D68\u878D\uF9DC\u57A0\u6069\u6147\u6BB7\u8ABE\u9280\u96B1\u4E59\u541F\u6DEB\u852D\u9670\u97F3\u98EE\u63D6\u6CE3\u9091\u51DD\u61C9\u81BA\u9DF9\u4F9D\u501A\u5100\u5B9C\u610F\u61FF\u64EC\u6905\u6BC5\u7591\u77E3\u7FA9\u8264\u858F\u87FB\u8863\u8ABC"],["eca1","\u8B70\u91AB\u4E8C\u4EE5\u4F0A\uF9DD\uF9DE\u5937\u59E8\uF9DF\u5DF2\u5F1B\u5F5B\u6021\uF9E0\uF9E1\uF9E2\uF9E3\u723E\u73E5\uF9E4\u7570\u75CD\uF9E5\u79FB\uF9E6\u800C\u8033\u8084\u82E1\u8351\uF9E7\uF9E8\u8CBD\u8CB3\u9087\uF9E9\uF9EA\u98F4\u990C\uF9EB\uF9EC\u7037\u76CA\u7FCA\u7FCC\u7FFC\u8B1A\u4EBA\u4EC1\u5203\u5370\uF9ED\u54BD\u56E0\u59FB\u5BC5\u5F15\u5FCD\u6E6E\uF9EE\uF9EF\u7D6A\u8335\uF9F0\u8693\u8A8D\uF9F1\u976D\u9777\uF9F2\uF9F3\u4E00\u4F5A\u4F7E\u58F9\u65E5\u6EA2\u9038\u93B0\u99B9\u4EFB\u58EC\u598A\u59D9\u6041\uF9F4\uF9F5\u7A14\uF9F6\u834F\u8CC3\u5165\u5344"],["eda1","\uF9F7\uF9F8\uF9F9\u4ECD\u5269\u5B55\u82BF\u4ED4\u523A\u54A8\u59C9\u59FF\u5B50\u5B57\u5B5C\u6063\u6148\u6ECB\u7099\u716E\u7386\u74F7\u75B5\u78C1\u7D2B\u8005\u81EA\u8328\u8517\u85C9\u8AEE\u8CC7\u96CC\u4F5C\u52FA\u56BC\u65AB\u6628\u707C\u70B8\u7235\u7DBD\u828D\u914C\u96C0\u9D72\u5B71\u68E7\u6B98\u6F7A\u76DE\u5C91\u66AB\u6F5B\u7BB4\u7C2A\u8836\u96DC\u4E08\u4ED7\u5320\u5834\u58BB\u58EF\u596C\u5C07\u5E33\u5E84\u5F35\u638C\u66B2\u6756\u6A1F\u6AA3\u6B0C\u6F3F\u7246\uF9FA\u7350\u748B\u7AE0\u7CA7\u8178\u81DF\u81E7\u838A\u846C\u8523\u8594\u85CF\u88DD\u8D13\u91AC\u9577"],["eea1","\u969C\u518D\u54C9\u5728\u5BB0\u624D\u6750\u683D\u6893\u6E3D\u6ED3\u707D\u7E21\u88C1\u8CA1\u8F09\u9F4B\u9F4E\u722D\u7B8F\u8ACD\u931A\u4F47\u4F4E\u5132\u5480\u59D0\u5E95\u62B5\u6775\u696E\u6A17\u6CAE\u6E1A\u72D9\u732A\u75BD\u7BB8\u7D35\u82E7\u83F9\u8457\u85F7\u8A5B\u8CAF\u8E87\u9019\u90B8\u96CE\u9F5F\u52E3\u540A\u5AE1\u5BC2\u6458\u6575\u6EF4\u72C4\uF9FB\u7684\u7A4D\u7B1B\u7C4D\u7E3E\u7FDF\u837B\u8B2B\u8CCA\u8D64\u8DE1\u8E5F\u8FEA\u8FF9\u9069\u93D1\u4F43\u4F7A\u50B3\u5168\u5178\u524D\u526A\u5861\u587C\u5960\u5C08\u5C55\u5EDB\u609B\u6230\u6813\u6BBF\u6C08\u6FB1"],["efa1","\u714E\u7420\u7530\u7538\u7551\u7672\u7B4C\u7B8B\u7BAD\u7BC6\u7E8F\u8A6E\u8F3E\u8F49\u923F\u9293\u9322\u942B\u96FB\u985A\u986B\u991E\u5207\u622A\u6298\u6D59\u7664\u7ACA\u7BC0\u7D76\u5360\u5CBE\u5E97\u6F38\u70B9\u7C98\u9711\u9B8E\u9EDE\u63A5\u647A\u8776\u4E01\u4E95\u4EAD\u505C\u5075\u5448\u59C3\u5B9A\u5E40\u5EAD\u5EF7\u5F81\u60C5\u633A\u653F\u6574\u65CC\u6676\u6678\u67FE\u6968\u6A89\u6B63\u6C40\u6DC0\u6DE8\u6E1F\u6E5E\u701E\u70A1\u738E\u73FD\u753A\u775B\u7887\u798E\u7A0B\u7A7D\u7CBE\u7D8E\u8247\u8A02\u8AEA\u8C9E\u912D\u914A\u91D8\u9266\u92CC\u9320\u9706\u9756"],["f0a1","\u975C\u9802\u9F0E\u5236\u5291\u557C\u5824\u5E1D\u5F1F\u608C\u63D0\u68AF\u6FDF\u796D\u7B2C\u81CD\u85BA\u88FD\u8AF8\u8E44\u918D\u9664\u969B\u973D\u984C\u9F4A\u4FCE\u5146\u51CB\u52A9\u5632\u5F14\u5F6B\u63AA\u64CD\u65E9\u6641\u66FA\u66F9\u671D\u689D\u68D7\u69FD\u6F15\u6F6E\u7167\u71E5\u722A\u74AA\u773A\u7956\u795A\u79DF\u7A20\u7A95\u7C97\u7CDF\u7D44\u7E70\u8087\u85FB\u86A4\u8A54\u8ABF\u8D99\u8E81\u9020\u906D\u91E3\u963B\u96D5\u9CE5\u65CF\u7C07\u8DB3\u93C3\u5B58\u5C0A\u5352\u62D9\u731D\u5027\u5B97\u5F9E\u60B0\u616B\u68D5\u6DD9\u742E\u7A2E\u7D42\u7D9C\u7E31\u816B"],["f1a1","\u8E2A\u8E35\u937E\u9418\u4F50\u5750\u5DE6\u5EA7\u632B\u7F6A\u4E3B\u4F4F\u4F8F\u505A\u59DD\u80C4\u546A\u5468\u55FE\u594F\u5B99\u5DDE\u5EDA\u665D\u6731\u67F1\u682A\u6CE8\u6D32\u6E4A\u6F8D\u70B7\u73E0\u7587\u7C4C\u7D02\u7D2C\u7DA2\u821F\u86DB\u8A3B\u8A85\u8D70\u8E8A\u8F33\u9031\u914E\u9152\u9444\u99D0\u7AF9\u7CA5\u4FCA\u5101\u51C6\u57C8\u5BEF\u5CFB\u6659\u6A3D\u6D5A\u6E96\u6FEC\u710C\u756F\u7AE3\u8822\u9021\u9075\u96CB\u99FF\u8301\u4E2D\u4EF2\u8846\u91CD\u537D\u6ADB\u696B\u6C41\u847A\u589E\u618E\u66FE\u62EF\u70DD\u7511\u75C7\u7E52\u84B8\u8B49\u8D08\u4E4B\u53EA"],["f2a1","\u54AB\u5730\u5740\u5FD7\u6301\u6307\u646F\u652F\u65E8\u667A\u679D\u67B3\u6B62\u6C60\u6C9A\u6F2C\u77E5\u7825\u7949\u7957\u7D19\u80A2\u8102\u81F3\u829D\u82B7\u8718\u8A8C\uF9FC\u8D04\u8DBE\u9072\u76F4\u7A19\u7A37\u7E54\u8077\u5507\u55D4\u5875\u632F\u6422\u6649\u664B\u686D\u699B\u6B84\u6D25\u6EB1\u73CD\u7468\u74A1\u755B\u75B9\u76E1\u771E\u778B\u79E6\u7E09\u7E1D\u81FB\u852F\u8897\u8A3A\u8CD1\u8EEB\u8FB0\u9032\u93AD\u9663\u9673\u9707\u4F84\u53F1\u59EA\u5AC9\u5E19\u684E\u74C6\u75BE\u79E9\u7A92\u81A3\u86ED\u8CEA\u8DCC\u8FED\u659F\u6715\uF9FD\u57F7\u6F57\u7DDD\u8F2F"],["f3a1","\u93F6\u96C6\u5FB5\u61F2\u6F84\u4E14\u4F98\u501F\u53C9\u55DF\u5D6F\u5DEE\u6B21\u6B64\u78CB\u7B9A\uF9FE\u8E49\u8ECA\u906E\u6349\u643E\u7740\u7A84\u932F\u947F\u9F6A\u64B0\u6FAF\u71E6\u74A8\u74DA\u7AC4\u7C12\u7E82\u7CB2\u7E98\u8B9A\u8D0A\u947D\u9910\u994C\u5239\u5BDF\u64E6\u672D\u7D2E\u50ED\u53C3\u5879\u6158\u6159\u61FA\u65AC\u7AD9\u8B92\u8B96\u5009\u5021\u5275\u5531\u5A3C\u5EE0\u5F70\u6134\u655E\u660C\u6636\u66A2\u69CD\u6EC4\u6F32\u7316\u7621\u7A93\u8139\u8259\u83D6\u84BC\u50B5\u57F0\u5BC0\u5BE8\u5F69\u63A1\u7826\u7DB5\u83DC\u8521\u91C7\u91F5\u518A\u67F5\u7B56"],["f4a1","\u8CAC\u51C4\u59BB\u60BD\u8655\u501C\uF9FF\u5254\u5C3A\u617D\u621A\u62D3\u64F2\u65A5\u6ECC\u7620\u810A\u8E60\u965F\u96BB\u4EDF\u5343\u5598\u5929\u5DDD\u64C5\u6CC9\u6DFA\u7394\u7A7F\u821B\u85A6\u8CE4\u8E10\u9077\u91E7\u95E1\u9621\u97C6\u51F8\u54F2\u5586\u5FB9\u64A4\u6F88\u7DB4\u8F1F\u8F4D\u9435\u50C9\u5C16\u6CBE\u6DFB\u751B\u77BB\u7C3D\u7C64\u8A79\u8AC2\u581E\u59BE\u5E16\u6377\u7252\u758A\u776B\u8ADC\u8CBC\u8F12\u5EF3\u6674\u6DF8\u807D\u83C1\u8ACB\u9751\u9BD6\uFA00\u5243\u66FF\u6D95\u6EEF\u7DE0\u8AE6\u902E\u905E\u9AD4\u521D\u527F\u54E8\u6194\u6284\u62DB\u68A2"],["f5a1","\u6912\u695A\u6A35\u7092\u7126\u785D\u7901\u790E\u79D2\u7A0D\u8096\u8278\u82D5\u8349\u8549\u8C82\u8D85\u9162\u918B\u91AE\u4FC3\u56D1\u71ED\u77D7\u8700\u89F8\u5BF8\u5FD6\u6751\u90A8\u53E2\u585A\u5BF5\u60A4\u6181\u6460\u7E3D\u8070\u8525\u9283\u64AE\u50AC\u5D14\u6700\u589C\u62BD\u63A8\u690E\u6978\u6A1E\u6E6B\u76BA\u79CB\u82BB\u8429\u8ACF\u8DA8\u8FFD\u9112\u914B\u919C\u9310\u9318\u939A\u96DB\u9A36\u9C0D\u4E11\u755C\u795D\u7AFA\u7B51\u7BC9\u7E2E\u84C4\u8E59\u8E74\u8EF8\u9010\u6625\u693F\u7443\u51FA\u672E\u9EDC\u5145\u5FE0\u6C96\u87F2\u885D\u8877\u60B4\u81B5\u8403"],["f6a1","\u8D05\u53D6\u5439\u5634\u5A36\u5C31\u708A\u7FE0\u805A\u8106\u81ED\u8DA3\u9189\u9A5F\u9DF2\u5074\u4EC4\u53A0\u60FB\u6E2C\u5C64\u4F88\u5024\u55E4\u5CD9\u5E5F\u6065\u6894\u6CBB\u6DC4\u71BE\u75D4\u75F4\u7661\u7A1A\u7A49\u7DC7\u7DFB\u7F6E\u81F4\u86A9\u8F1C\u96C9\u99B3\u9F52\u5247\u52C5\u98ED\u89AA\u4E03\u67D2\u6F06\u4FB5\u5BE2\u6795\u6C88\u6D78\u741B\u7827\u91DD\u937C\u87C4\u79E4\u7A31\u5FEB\u4ED6\u54A4\u553E\u58AE\u59A5\u60F0\u6253\u62D6\u6736\u6955\u8235\u9640\u99B1\u99DD\u502C\u5353\u5544\u577C\uFA01\u6258\uFA02\u64E2\u666B\u67DD\u6FC1\u6FEF\u7422\u7438\u8A17"],["f7a1","\u9438\u5451\u5606\u5766\u5F48\u619A\u6B4E\u7058\u70AD\u7DBB\u8A95\u596A\u812B\u63A2\u7708\u803D\u8CAA\u5854\u642D\u69BB\u5B95\u5E11\u6E6F\uFA03\u8569\u514C\u53F0\u592A\u6020\u614B\u6B86\u6C70\u6CF0\u7B1E\u80CE\u82D4\u8DC6\u90B0\u98B1\uFA04\u64C7\u6FA4\u6491\u6504\u514E\u5410\u571F\u8A0E\u615F\u6876\uFA05\u75DB\u7B52\u7D71\u901A\u5806\u69CC\u817F\u892A\u9000\u9839\u5078\u5957\u59AC\u6295\u900F\u9B2A\u615D\u7279\u95D6\u5761\u5A46\u5DF4\u628A\u64AD\u64FA\u6777\u6CE2\u6D3E\u722C\u7436\u7834\u7F77\u82AD\u8DDB\u9817\u5224\u5742\u677F\u7248\u74E3\u8CA9\u8FA6\u9211"],["f8a1","\u962A\u516B\u53ED\u634C\u4F69\u5504\u6096\u6557\u6C9B\u6D7F\u724C\u72FD\u7A17\u8987\u8C9D\u5F6D\u6F8E\u70F9\u81A8\u610E\u4FBF\u504F\u6241\u7247\u7BC7\u7DE8\u7FE9\u904D\u97AD\u9A19\u8CB6\u576A\u5E73\u67B0\u840D\u8A55\u5420\u5B16\u5E63\u5EE2\u5F0A\u6583\u80BA\u853D\u9589\u965B\u4F48\u5305\u530D\u530F\u5486\u54FA\u5703\u5E03\u6016\u629B\u62B1\u6355\uFA06\u6CE1\u6D66\u75B1\u7832\u80DE\u812F\u82DE\u8461\u84B2\u888D\u8912\u900B\u92EA\u98FD\u9B91\u5E45\u66B4\u66DD\u7011\u7206\uFA07\u4FF5\u527D\u5F6A\u6153\u6753\u6A19\u6F02\u74E2\u7968\u8868\u8C79\u98C7\u98C4\u9A43"],["f9a1","\u54C1\u7A1F\u6953\u8AF7\u8C4A\u98A8\u99AE\u5F7C\u62AB\u75B2\u76AE\u88AB\u907F\u9642\u5339\u5F3C\u5FC5\u6CCC\u73CC\u7562\u758B\u7B46\u82FE\u999D\u4E4F\u903C\u4E0B\u4F55\u53A6\u590F\u5EC8\u6630\u6CB3\u7455\u8377\u8766\u8CC0\u9050\u971E\u9C15\u58D1\u5B78\u8650\u8B14\u9DB4\u5BD2\u6068\u608D\u65F1\u6C57\u6F22\u6FA3\u701A\u7F55\u7FF0\u9591\u9592\u9650\u97D3\u5272\u8F44\u51FD\u542B\u54B8\u5563\u558A\u6ABB\u6DB5\u7DD8\u8266\u929C\u9677\u9E79\u5408\u54C8\u76D2\u86E4\u95A4\u95D4\u965C\u4EA2\u4F09\u59EE\u5AE6\u5DF7\u6052\u6297\u676D\u6841\u6C86\u6E2F\u7F38\u809B\u822A"],["faa1","\uFA08\uFA09\u9805\u4EA5\u5055\u54B3\u5793\u595A\u5B69\u5BB3\u61C8\u6977\u6D77\u7023\u87F9\u89E3\u8A72\u8AE7\u9082\u99ED\u9AB8\u52BE\u6838\u5016\u5E78\u674F\u8347\u884C\u4EAB\u5411\u56AE\u73E6\u9115\u97FF\u9909\u9957\u9999\u5653\u589F\u865B\u8A31\u61B2\u6AF6\u737B\u8ED2\u6B47\u96AA\u9A57\u5955\u7200\u8D6B\u9769\u4FD4\u5CF4\u5F26\u61F8\u665B\u6CEB\u70AB\u7384\u73B9\u73FE\u7729\u774D\u7D43\u7D62\u7E23\u8237\u8852\uFA0A\u8CE2\u9249\u986F\u5B51\u7A74\u8840\u9801\u5ACC\u4FE0\u5354\u593E\u5CFD\u633E\u6D79\u72F9\u8105\u8107\u83A2\u92CF\u9830\u4EA8\u5144\u5211\u578B"],["fba1","\u5F62\u6CC2\u6ECE\u7005\u7050\u70AF\u7192\u73E9\u7469\u834A\u87A2\u8861\u9008\u90A2\u93A3\u99A8\u516E\u5F57\u60E0\u6167\u66B3\u8559\u8E4A\u91AF\u978B\u4E4E\u4E92\u547C\u58D5\u58FA\u597D\u5CB5\u5F27\u6236\u6248\u660A\u6667\u6BEB\u6D69\u6DCF\u6E56\u6EF8\u6F94\u6FE0\u6FE9\u705D\u72D0\u7425\u745A\u74E0\u7693\u795C\u7CCA\u7E1E\u80E1\u82A6\u846B\u84BF\u864E\u865F\u8774\u8B77\u8C6A\u93AC\u9800\u9865\u60D1\u6216\u9177\u5A5A\u660F\u6DF7\u6E3E\u743F\u9B42\u5FFD\u60DA\u7B0F\u54C4\u5F18\u6C5E\u6CD3\u6D2A\u70D8\u7D05\u8679\u8A0C\u9D3B\u5316\u548C\u5B05\u6A3A\u706B\u7575"],["fca1","\u798D\u79BE\u82B1\u83EF\u8A71\u8B41\u8CA8\u9774\uFA0B\u64F4\u652B\u78BA\u78BB\u7A6B\u4E38\u559A\u5950\u5BA6\u5E7B\u60A3\u63DB\u6B61\u6665\u6853\u6E19\u7165\u74B0\u7D08\u9084\u9A69\u9C25\u6D3B\u6ED1\u733E\u8C41\u95CA\u51F0\u5E4C\u5FA8\u604D\u60F6\u6130\u614C\u6643\u6644\u69A5\u6CC1\u6E5F\u6EC9\u6F62\u714C\u749C\u7687\u7BC1\u7C27\u8352\u8757\u9051\u968D\u9EC3\u532F\u56DE\u5EFB\u5F8A\u6062\u6094\u61F7\u6666\u6703\u6A9C\u6DEE\u6FAE\u7070\u736A\u7E6A\u81BE\u8334\u86D4\u8AA8\u8CC4\u5283\u7372\u5B96\u6A6B\u9404\u54EE\u5686\u5B5D\u6548\u6585\u66C9\u689F\u6D8D\u6DC6"],["fda1","\u723B\u80B4\u9175\u9A4D\u4FAF\u5019\u539A\u540E\u543C\u5589\u55C5\u5E3F\u5F8C\u673D\u7166\u73DD\u9005\u52DB\u52F3\u5864\u58CE\u7104\u718F\u71FB\u85B0\u8A13\u6688\u85A8\u55A7\u6684\u714A\u8431\u5349\u5599\u6BC1\u5F59\u5FBD\u63EE\u6689\u7147\u8AF1\u8F1D\u9EBE\u4F11\u643A\u70CB\u7566\u8667\u6064\u8B4E\u9DF8\u5147\u51F6\u5308\u6D36\u80F8\u9ED1\u6615\u6B23\u7098\u75D5\u5403\u5C79\u7D07\u8A16\u6B20\u6B3D\u6B46\u5438\u6070\u6D3D\u7FD5\u8208\u50D6\u51DE\u559C\u566B\u56CD\u59EC\u5B09\u5E0C\u6199\u6198\u6231\u665E\u66E6\u7199\u71B9\u71BA\u72A7\u79A7\u7A00\u7FB2\u8A70"]]});var o30=o((GV5,ES6)=>{ES6.exports=[["0","\x00",127],["a140","\u3000\uFF0C\u3001\u3002\uFF0E\u2027\uFF1B\uFF1A\uFF1F\uFF01\uFE30\u2026\u2025\uFE50\uFE51\uFE52\xB7\uFE54\uFE55\uFE56\uFE57\uFF5C\u2013\uFE31\u2014\uFE33\u2574\uFE34\uFE4F\uFF08\uFF09\uFE35\uFE36\uFF5B\uFF5D\uFE37\uFE38\u3014\u3015\uFE39\uFE3A\u3010\u3011\uFE3B\uFE3C\u300A\u300B\uFE3D\uFE3E\u3008\u3009\uFE3F\uFE40\u300C\u300D\uFE41\uFE42\u300E\u300F\uFE43\uFE44\uFE59\uFE5A"],["a1a1","\uFE5B\uFE5C\uFE5D\uFE5E\u2018\u2019\u201C\u201D\u301D\u301E\u2035\u2032\uFF03\uFF06\uFF0A\u203B\xA7\u3003\u25CB\u25CF\u25B3\u25B2\u25CE\u2606\u2605\u25C7\u25C6\u25A1\u25A0\u25BD\u25BC\u32A3\u2105\xAF\uFFE3\uFF3F\u02CD\uFE49\uFE4A\uFE4D\uFE4E\uFE4B\uFE4C\uFE5F\uFE60\uFE61\uFF0B\uFF0D\xD7\xF7\xB1\u221A\uFF1C\uFF1E\uFF1D\u2266\u2267\u2260\u221E\u2252\u2261\uFE62",4,"\uFF5E\u2229\u222A\u22A5\u2220\u221F\u22BF\u33D2\u33D1\u222B\u222E\u2235\u2234\u2640\u2642\u2295\u2299\u2191\u2193\u2190\u2192\u2196\u2197\u2199\u2198\u2225\u2223\uFF0F"],["a240","\uFF3C\u2215\uFE68\uFF04\uFFE5\u3012\uFFE0\uFFE1\uFF05\uFF20\u2103\u2109\uFE69\uFE6A\uFE6B\u33D5\u339C\u339D\u339E\u33CE\u33A1\u338E\u338F\u33C4\xB0\u5159\u515B\u515E\u515D\u5161\u5163\u55E7\u74E9\u7CCE\u2581",7,"\u258F\u258E\u258D\u258C\u258B\u258A\u2589\u253C\u2534\u252C\u2524\u251C\u2594\u2500\u2502\u2595\u250C\u2510\u2514\u2518\u256D"],["a2a1","\u256E\u2570\u256F\u2550\u255E\u256A\u2561\u25E2\u25E3\u25E5\u25E4\u2571\u2572\u2573\uFF10",9,"\u2160",9,"\u3021",8,"\u5341\u5344\u5345\uFF21",25,"\uFF41",21],["a340","\uFF57\uFF58\uFF59\uFF5A\u0391",16,"\u03A3",6,"\u03B1",16,"\u03C3",6,"\u3105",10],["a3a1","\u3110",25,"\u02D9\u02C9\u02CA\u02C7\u02CB"],["a3e1","\u20AC"],["a440","\u4E00\u4E59\u4E01\u4E03\u4E43\u4E5D\u4E86\u4E8C\u4EBA\u513F\u5165\u516B\u51E0\u5200\u5201\u529B\u5315\u5341\u535C\u53C8\u4E09\u4E0B\u4E08\u4E0A\u4E2B\u4E38\u51E1\u4E45\u4E48\u4E5F\u4E5E\u4E8E\u4EA1\u5140\u5203\u52FA\u5343\u53C9\u53E3\u571F\u58EB\u5915\u5927\u5973\u5B50\u5B51\u5B53\u5BF8\u5C0F\u5C22\u5C38\u5C71\u5DDD\u5DE5\u5DF1\u5DF2\u5DF3\u5DFE\u5E72\u5EFE\u5F0B\u5F13\u624D"],["a4a1","\u4E11\u4E10\u4E0D\u4E2D\u4E30\u4E39\u4E4B\u5C39\u4E88\u4E91\u4E95\u4E92\u4E94\u4EA2\u4EC1\u4EC0\u4EC3\u4EC6\u4EC7\u4ECD\u4ECA\u4ECB\u4EC4\u5143\u5141\u5167\u516D\u516E\u516C\u5197\u51F6\u5206\u5207\u5208\u52FB\u52FE\u52FF\u5316\u5339\u5348\u5347\u5345\u535E\u5384\u53CB\u53CA\u53CD\u58EC\u5929\u592B\u592A\u592D\u5B54\u5C11\u5C24\u5C3A\u5C6F\u5DF4\u5E7B\u5EFF\u5F14\u5F15\u5FC3\u6208\u6236\u624B\u624E\u652F\u6587\u6597\u65A4\u65B9\u65E5\u66F0\u6708\u6728\u6B20\u6B62\u6B79\u6BCB\u6BD4\u6BDB\u6C0F\u6C34\u706B\u722A\u7236\u723B\u7247\u7259\u725B\u72AC\u738B\u4E19"],["a540","\u4E16\u4E15\u4E14\u4E18\u4E3B\u4E4D\u4E4F\u4E4E\u4EE5\u4ED8\u4ED4\u4ED5\u4ED6\u4ED7\u4EE3\u4EE4\u4ED9\u4EDE\u5145\u5144\u5189\u518A\u51AC\u51F9\u51FA\u51F8\u520A\u52A0\u529F\u5305\u5306\u5317\u531D\u4EDF\u534A\u5349\u5361\u5360\u536F\u536E\u53BB\u53EF\u53E4\u53F3\u53EC\u53EE\u53E9\u53E8\u53FC\u53F8\u53F5\u53EB\u53E6\u53EA\u53F2\u53F1\u53F0\u53E5\u53ED\u53FB\u56DB\u56DA\u5916"],["a5a1","\u592E\u5931\u5974\u5976\u5B55\u5B83\u5C3C\u5DE8\u5DE7\u5DE6\u5E02\u5E03\u5E73\u5E7C\u5F01\u5F18\u5F17\u5FC5\u620A\u6253\u6254\u6252\u6251\u65A5\u65E6\u672E\u672C\u672A\u672B\u672D\u6B63\u6BCD\u6C11\u6C10\u6C38\u6C41\u6C40\u6C3E\u72AF\u7384\u7389\u74DC\u74E6\u7518\u751F\u7528\u7529\u7530\u7531\u7532\u7533\u758B\u767D\u76AE\u76BF\u76EE\u77DB\u77E2\u77F3\u793A\u79BE\u7A74\u7ACB\u4E1E\u4E1F\u4E52\u4E53\u4E69\u4E99\u4EA4\u4EA6\u4EA5\u4EFF\u4F09\u4F19\u4F0A\u4F15\u4F0D\u4F10\u4F11\u4F0F\u4EF2\u4EF6\u4EFB\u4EF0\u4EF3\u4EFD\u4F01\u4F0B\u5149\u5147\u5146\u5148\u5168"],["a640","\u5171\u518D\u51B0\u5217\u5211\u5212\u520E\u5216\u52A3\u5308\u5321\u5320\u5370\u5371\u5409\u540F\u540C\u540A\u5410\u5401\u540B\u5404\u5411\u540D\u5408\u5403\u540E\u5406\u5412\u56E0\u56DE\u56DD\u5733\u5730\u5728\u572D\u572C\u572F\u5729\u5919\u591A\u5937\u5938\u5984\u5978\u5983\u597D\u5979\u5982\u5981\u5B57\u5B58\u5B87\u5B88\u5B85\u5B89\u5BFA\u5C16\u5C79\u5DDE\u5E06\u5E76\u5E74"],["a6a1","\u5F0F\u5F1B\u5FD9\u5FD6\u620E\u620C\u620D\u6210\u6263\u625B\u6258\u6536\u65E9\u65E8\u65EC\u65ED\u66F2\u66F3\u6709\u673D\u6734\u6731\u6735\u6B21\u6B64\u6B7B\u6C16\u6C5D\u6C57\u6C59\u6C5F\u6C60\u6C50\u6C55\u6C61\u6C5B\u6C4D\u6C4E\u7070\u725F\u725D\u767E\u7AF9\u7C73\u7CF8\u7F36\u7F8A\u7FBD\u8001\u8003\u800C\u8012\u8033\u807F\u8089\u808B\u808C\u81E3\u81EA\u81F3\u81FC\u820C\u821B\u821F\u826E\u8272\u827E\u866B\u8840\u884C\u8863\u897F\u9621\u4E32\u4EA8\u4F4D\u4F4F\u4F47\u4F57\u4F5E\u4F34\u4F5B\u4F55\u4F30\u4F50\u4F51\u4F3D\u4F3A\u4F38\u4F43\u4F54\u4F3C\u4F46\u4F63"],["a740","\u4F5C\u4F60\u4F2F\u4F4E\u4F36\u4F59\u4F5D\u4F48\u4F5A\u514C\u514B\u514D\u5175\u51B6\u51B7\u5225\u5224\u5229\u522A\u5228\u52AB\u52A9\u52AA\u52AC\u5323\u5373\u5375\u541D\u542D\u541E\u543E\u5426\u544E\u5427\u5446\u5443\u5433\u5448\u5442\u541B\u5429\u544A\u5439\u543B\u5438\u542E\u5435\u5436\u5420\u543C\u5440\u5431\u542B\u541F\u542C\u56EA\u56F0\u56E4\u56EB\u574A\u5751\u5740\u574D"],["a7a1","\u5747\u574E\u573E\u5750\u574F\u573B\u58EF\u593E\u599D\u5992\u59A8\u599E\u59A3\u5999\u5996\u598D\u59A4\u5993\u598A\u59A5\u5B5D\u5B5C\u5B5A\u5B5B\u5B8C\u5B8B\u5B8F\u5C2C\u5C40\u5C41\u5C3F\u5C3E\u5C90\u5C91\u5C94\u5C8C\u5DEB\u5E0C\u5E8F\u5E87\u5E8A\u5EF7\u5F04\u5F1F\u5F64\u5F62\u5F77\u5F79\u5FD8\u5FCC\u5FD7\u5FCD\u5FF1\u5FEB\u5FF8\u5FEA\u6212\u6211\u6284\u6297\u6296\u6280\u6276\u6289\u626D\u628A\u627C\u627E\u6279\u6273\u6292\u626F\u6298\u626E\u6295\u6293\u6291\u6286\u6539\u653B\u6538\u65F1\u66F4\u675F\u674E\u674F\u6750\u6751\u675C\u6756\u675E\u6749\u6746\u6760"],["a840","\u6753\u6757\u6B65\u6BCF\u6C42\u6C5E\u6C99\u6C81\u6C88\u6C89\u6C85\u6C9B\u6C6A\u6C7A\u6C90\u6C70\u6C8C\u6C68\u6C96\u6C92\u6C7D\u6C83\u6C72\u6C7E\u6C74\u6C86\u6C76\u6C8D\u6C94\u6C98\u6C82\u7076\u707C\u707D\u7078\u7262\u7261\u7260\u72C4\u72C2\u7396\u752C\u752B\u7537\u7538\u7682\u76EF\u77E3\u79C1\u79C0\u79BF\u7A76\u7CFB\u7F55\u8096\u8093\u809D\u8098\u809B\u809A\u80B2\u826F\u8292"],["a8a1","\u828B\u828D\u898B\u89D2\u8A00\u8C37\u8C46\u8C55\u8C9D\u8D64\u8D70\u8DB3\u8EAB\u8ECA\u8F9B\u8FB0\u8FC2\u8FC6\u8FC5\u8FC4\u5DE1\u9091\u90A2\u90AA\u90A6\u90A3\u9149\u91C6\u91CC\u9632\u962E\u9631\u962A\u962C\u4E26\u4E56\u4E73\u4E8B\u4E9B\u4E9E\u4EAB\u4EAC\u4F6F\u4F9D\u4F8D\u4F73\u4F7F\u4F6C\u4F9B\u4F8B\u4F86\u4F83\u4F70\u4F75\u4F88\u4F69\u4F7B\u4F96\u4F7E\u4F8F\u4F91\u4F7A\u5154\u5152\u5155\u5169\u5177\u5176\u5178\u51BD\u51FD\u523B\u5238\u5237\u523A\u5230\u522E\u5236\u5241\u52BE\u52BB\u5352\u5354\u5353\u5351\u5366\u5377\u5378\u5379\u53D6\u53D4\u53D7\u5473\u5475"],["a940","\u5496\u5478\u5495\u5480\u547B\u5477\u5484\u5492\u5486\u547C\u5490\u5471\u5476\u548C\u549A\u5462\u5468\u548B\u547D\u548E\u56FA\u5783\u5777\u576A\u5769\u5761\u5766\u5764\u577C\u591C\u5949\u5947\u5948\u5944\u5954\u59BE\u59BB\u59D4\u59B9\u59AE\u59D1\u59C6\u59D0\u59CD\u59CB\u59D3\u59CA\u59AF\u59B3\u59D2\u59C5\u5B5F\u5B64\u5B63\u5B97\u5B9A\u5B98\u5B9C\u5B99\u5B9B\u5C1A\u5C48\u5C45"],["a9a1","\u5C46\u5CB7\u5CA1\u5CB8\u5CA9\u5CAB\u5CB1\u5CB3\u5E18\u5E1A\u5E16\u5E15\u5E1B\u5E11\u5E78\u5E9A\u5E97\u5E9C\u5E95\u5E96\u5EF6\u5F26\u5F27\u5F29\u5F80\u5F81\u5F7F\u5F7C\u5FDD\u5FE0\u5FFD\u5FF5\u5FFF\u600F\u6014\u602F\u6035\u6016\u602A\u6015\u6021\u6027\u6029\u602B\u601B\u6216\u6215\u623F\u623E\u6240\u627F\u62C9\u62CC\u62C4\u62BF\u62C2\u62B9\u62D2\u62DB\u62AB\u62D3\u62D4\u62CB\u62C8\u62A8\u62BD\u62BC\u62D0\u62D9\u62C7\u62CD\u62B5\u62DA\u62B1\u62D8\u62D6\u62D7\u62C6\u62AC\u62CE\u653E\u65A7\u65BC\u65FA\u6614\u6613\u660C\u6606\u6602\u660E\u6600\u660F\u6615\u660A"],["aa40","\u6607\u670D\u670B\u676D\u678B\u6795\u6771\u679C\u6773\u6777\u6787\u679D\u6797\u676F\u6770\u677F\u6789\u677E\u6790\u6775\u679A\u6793\u677C\u676A\u6772\u6B23\u6B66\u6B67\u6B7F\u6C13\u6C1B\u6CE3\u6CE8\u6CF3\u6CB1\u6CCC\u6CE5\u6CB3\u6CBD\u6CBE\u6CBC\u6CE2\u6CAB\u6CD5\u6CD3\u6CB8\u6CC4\u6CB9\u6CC1\u6CAE\u6CD7\u6CC5\u6CF1\u6CBF\u6CBB\u6CE1\u6CDB\u6CCA\u6CAC\u6CEF\u6CDC\u6CD6\u6CE0"],["aaa1","\u7095\u708E\u7092\u708A\u7099\u722C\u722D\u7238\u7248\u7267\u7269\u72C0\u72CE\u72D9\u72D7\u72D0\u73A9\u73A8\u739F\u73AB\u73A5\u753D\u759D\u7599\u759A\u7684\u76C2\u76F2\u76F4\u77E5\u77FD\u793E\u7940\u7941\u79C9\u79C8\u7A7A\u7A79\u7AFA\u7CFE\u7F54\u7F8C\u7F8B\u8005\u80BA\u80A5\u80A2\u80B1\u80A1\u80AB\u80A9\u80B4\u80AA\u80AF\u81E5\u81FE\u820D\u82B3\u829D\u8299\u82AD\u82BD\u829F\u82B9\u82B1\u82AC\u82A5\u82AF\u82B8\u82A3\u82B0\u82BE\u82B7\u864E\u8671\u521D\u8868\u8ECB\u8FCE\u8FD4\u8FD1\u90B5\u90B8\u90B1\u90B6\u91C7\u91D1\u9577\u9580\u961C\u9640\u963F\u963B\u9644"],["ab40","\u9642\u96B9\u96E8\u9752\u975E\u4E9F\u4EAD\u4EAE\u4FE1\u4FB5\u4FAF\u4FBF\u4FE0\u4FD1\u4FCF\u4FDD\u4FC3\u4FB6\u4FD8\u4FDF\u4FCA\u4FD7\u4FAE\u4FD0\u4FC4\u4FC2\u4FDA\u4FCE\u4FDE\u4FB7\u5157\u5192\u5191\u51A0\u524E\u5243\u524A\u524D\u524C\u524B\u5247\u52C7\u52C9\u52C3\u52C1\u530D\u5357\u537B\u539A\u53DB\u54AC\u54C0\u54A8\u54CE\u54C9\u54B8\u54A6\u54B3\u54C7\u54C2\u54BD\u54AA\u54C1"],["aba1","\u54C4\u54C8\u54AF\u54AB\u54B1\u54BB\u54A9\u54A7\u54BF\u56FF\u5782\u578B\u57A0\u57A3\u57A2\u57CE\u57AE\u5793\u5955\u5951\u594F\u594E\u5950\u59DC\u59D8\u59FF\u59E3\u59E8\u5A03\u59E5\u59EA\u59DA\u59E6\u5A01\u59FB\u5B69\u5BA3\u5BA6\u5BA4\u5BA2\u5BA5\u5C01\u5C4E\u5C4F\u5C4D\u5C4B\u5CD9\u5CD2\u5DF7\u5E1D\u5E25\u5E1F\u5E7D\u5EA0\u5EA6\u5EFA\u5F08\u5F2D\u5F65\u5F88\u5F85\u5F8A\u5F8B\u5F87\u5F8C\u5F89\u6012\u601D\u6020\u6025\u600E\u6028\u604D\u6070\u6068\u6062\u6046\u6043\u606C\u606B\u606A\u6064\u6241\u62DC\u6316\u6309\u62FC\u62ED\u6301\u62EE\u62FD\u6307\u62F1\u62F7"],["ac40","\u62EF\u62EC\u62FE\u62F4\u6311\u6302\u653F\u6545\u65AB\u65BD\u65E2\u6625\u662D\u6620\u6627\u662F\u661F\u6628\u6631\u6624\u66F7\u67FF\u67D3\u67F1\u67D4\u67D0\u67EC\u67B6\u67AF\u67F5\u67E9\u67EF\u67C4\u67D1\u67B4\u67DA\u67E5\u67B8\u67CF\u67DE\u67F3\u67B0\u67D9\u67E2\u67DD\u67D2\u6B6A\u6B83\u6B86\u6BB5\u6BD2\u6BD7\u6C1F\u6CC9\u6D0B\u6D32\u6D2A\u6D41\u6D25\u6D0C\u6D31\u6D1E\u6D17"],["aca1","\u6D3B\u6D3D\u6D3E\u6D36\u6D1B\u6CF5\u6D39\u6D27\u6D38\u6D29\u6D2E\u6D35\u6D0E\u6D2B\u70AB\u70BA\u70B3\u70AC\u70AF\u70AD\u70B8\u70AE\u70A4\u7230\u7272\u726F\u7274\u72E9\u72E0\u72E1\u73B7\u73CA\u73BB\u73B2\u73CD\u73C0\u73B3\u751A\u752D\u754F\u754C\u754E\u754B\u75AB\u75A4\u75A5\u75A2\u75A3\u7678\u7686\u7687\u7688\u76C8\u76C6\u76C3\u76C5\u7701\u76F9\u76F8\u7709\u770B\u76FE\u76FC\u7707\u77DC\u7802\u7814\u780C\u780D\u7946\u7949\u7948\u7947\u79B9\u79BA\u79D1\u79D2\u79CB\u7A7F\u7A81\u7AFF\u7AFD\u7C7D\u7D02\u7D05\u7D00\u7D09\u7D07\u7D04\u7D06\u7F38\u7F8E\u7FBF\u8004"],["ad40","\u8010\u800D\u8011\u8036\u80D6\u80E5\u80DA\u80C3\u80C4\u80CC\u80E1\u80DB\u80CE\u80DE\u80E4\u80DD\u81F4\u8222\u82E7\u8303\u8305\u82E3\u82DB\u82E6\u8304\u82E5\u8302\u8309\u82D2\u82D7\u82F1\u8301\u82DC\u82D4\u82D1\u82DE\u82D3\u82DF\u82EF\u8306\u8650\u8679\u867B\u867A\u884D\u886B\u8981\u89D4\u8A08\u8A02\u8A03\u8C9E\u8CA0\u8D74\u8D73\u8DB4\u8ECD\u8ECC\u8FF0\u8FE6\u8FE2\u8FEA\u8FE5"],["ada1","\u8FED\u8FEB\u8FE4\u8FE8\u90CA\u90CE\u90C1\u90C3\u914B\u914A\u91CD\u9582\u9650\u964B\u964C\u964D\u9762\u9769\u97CB\u97ED\u97F3\u9801\u98A8\u98DB\u98DF\u9996\u9999\u4E58\u4EB3\u500C\u500D\u5023\u4FEF\u5026\u5025\u4FF8\u5029\u5016\u5006\u503C\u501F\u501A\u5012\u5011\u4FFA\u5000\u5014\u5028\u4FF1\u5021\u500B\u5019\u5018\u4FF3\u4FEE\u502D\u502A\u4FFE\u502B\u5009\u517C\u51A4\u51A5\u51A2\u51CD\u51CC\u51C6\u51CB\u5256\u525C\u5254\u525B\u525D\u532A\u537F\u539F\u539D\u53DF\u54E8\u5510\u5501\u5537\u54FC\u54E5\u54F2\u5506\u54FA\u5514\u54E9\u54ED\u54E1\u5509\u54EE\u54EA"],["ae40","\u54E6\u5527\u5507\u54FD\u550F\u5703\u5704\u57C2\u57D4\u57CB\u57C3\u5809\u590F\u5957\u5958\u595A\u5A11\u5A18\u5A1C\u5A1F\u5A1B\u5A13\u59EC\u5A20\u5A23\u5A29\u5A25\u5A0C\u5A09\u5B6B\u5C58\u5BB0\u5BB3\u5BB6\u5BB4\u5BAE\u5BB5\u5BB9\u5BB8\u5C04\u5C51\u5C55\u5C50\u5CED\u5CFD\u5CFB\u5CEA\u5CE8\u5CF0\u5CF6\u5D01\u5CF4\u5DEE\u5E2D\u5E2B\u5EAB\u5EAD\u5EA7\u5F31\u5F92\u5F91\u5F90\u6059"],["aea1","\u6063\u6065\u6050\u6055\u606D\u6069\u606F\u6084\u609F\u609A\u608D\u6094\u608C\u6085\u6096\u6247\u62F3\u6308\u62FF\u634E\u633E\u632F\u6355\u6342\u6346\u634F\u6349\u633A\u6350\u633D\u632A\u632B\u6328\u634D\u634C\u6548\u6549\u6599\u65C1\u65C5\u6642\u6649\u664F\u6643\u6652\u664C\u6645\u6641\u66F8\u6714\u6715\u6717\u6821\u6838\u6848\u6846\u6853\u6839\u6842\u6854\u6829\u68B3\u6817\u684C\u6851\u683D\u67F4\u6850\u6840\u683C\u6843\u682A\u6845\u6813\u6818\u6841\u6B8A\u6B89\u6BB7\u6C23\u6C27\u6C28\u6C26\u6C24\u6CF0\u6D6A\u6D95\u6D88\u6D87\u6D66\u6D78\u6D77\u6D59\u6D93"],["af40","\u6D6C\u6D89\u6D6E\u6D5A\u6D74\u6D69\u6D8C\u6D8A\u6D79\u6D85\u6D65\u6D94\u70CA\u70D8\u70E4\u70D9\u70C8\u70CF\u7239\u7279\u72FC\u72F9\u72FD\u72F8\u72F7\u7386\u73ED\u7409\u73EE\u73E0\u73EA\u73DE\u7554\u755D\u755C\u755A\u7559\u75BE\u75C5\u75C7\u75B2\u75B3\u75BD\u75BC\u75B9\u75C2\u75B8\u768B\u76B0\u76CA\u76CD\u76CE\u7729\u771F\u7720\u7728\u77E9\u7830\u7827\u7838\u781D\u7834\u7837"],["afa1","\u7825\u782D\u7820\u781F\u7832\u7955\u7950\u7960\u795F\u7956\u795E\u795D\u7957\u795A\u79E4\u79E3\u79E7\u79DF\u79E6\u79E9\u79D8\u7A84\u7A88\u7AD9\u7B06\u7B11\u7C89\u7D21\u7D17\u7D0B\u7D0A\u7D20\u7D22\u7D14\u7D10\u7D15\u7D1A\u7D1C\u7D0D\u7D19\u7D1B\u7F3A\u7F5F\u7F94\u7FC5\u7FC1\u8006\u8018\u8015\u8019\u8017\u803D\u803F\u80F1\u8102\u80F0\u8105\u80ED\u80F4\u8106\u80F8\u80F3\u8108\u80FD\u810A\u80FC\u80EF\u81ED\u81EC\u8200\u8210\u822A\u822B\u8228\u822C\u82BB\u832B\u8352\u8354\u834A\u8338\u8350\u8349\u8335\u8334\u834F\u8332\u8339\u8336\u8317\u8340\u8331\u8328\u8343"],["b040","\u8654\u868A\u86AA\u8693\u86A4\u86A9\u868C\u86A3\u869C\u8870\u8877\u8881\u8882\u887D\u8879\u8A18\u8A10\u8A0E\u8A0C\u8A15\u8A0A\u8A17\u8A13\u8A16\u8A0F\u8A11\u8C48\u8C7A\u8C79\u8CA1\u8CA2\u8D77\u8EAC\u8ED2\u8ED4\u8ECF\u8FB1\u9001\u9006\u8FF7\u9000\u8FFA\u8FF4\u9003\u8FFD\u9005\u8FF8\u9095\u90E1\u90DD\u90E2\u9152\u914D\u914C\u91D8\u91DD\u91D7\u91DC\u91D9\u9583\u9662\u9663\u9661"],["b0a1","\u965B\u965D\u9664\u9658\u965E\u96BB\u98E2\u99AC\u9AA8\u9AD8\u9B25\u9B32\u9B3C\u4E7E\u507A\u507D\u505C\u5047\u5043\u504C\u505A\u5049\u5065\u5076\u504E\u5055\u5075\u5074\u5077\u504F\u500F\u506F\u506D\u515C\u5195\u51F0\u526A\u526F\u52D2\u52D9\u52D8\u52D5\u5310\u530F\u5319\u533F\u5340\u533E\u53C3\u66FC\u5546\u556A\u5566\u5544\u555E\u5561\u5543\u554A\u5531\u5556\u554F\u5555\u552F\u5564\u5538\u552E\u555C\u552C\u5563\u5533\u5541\u5557\u5708\u570B\u5709\u57DF\u5805\u580A\u5806\u57E0\u57E4\u57FA\u5802\u5835\u57F7\u57F9\u5920\u5962\u5A36\u5A41\u5A49\u5A66\u5A6A\u5A40"],["b140","\u5A3C\u5A62\u5A5A\u5A46\u5A4A\u5B70\u5BC7\u5BC5\u5BC4\u5BC2\u5BBF\u5BC6\u5C09\u5C08\u5C07\u5C60\u5C5C\u5C5D\u5D07\u5D06\u5D0E\u5D1B\u5D16\u5D22\u5D11\u5D29\u5D14\u5D19\u5D24\u5D27\u5D17\u5DE2\u5E38\u5E36\u5E33\u5E37\u5EB7\u5EB8\u5EB6\u5EB5\u5EBE\u5F35\u5F37\u5F57\u5F6C\u5F69\u5F6B\u5F97\u5F99\u5F9E\u5F98\u5FA1\u5FA0\u5F9C\u607F\u60A3\u6089\u60A0\u60A8\u60CB\u60B4\u60E6\u60BD"],["b1a1","\u60C5\u60BB\u60B5\u60DC\u60BC\u60D8\u60D5\u60C6\u60DF\u60B8\u60DA\u60C7\u621A\u621B\u6248\u63A0\u63A7\u6372\u6396\u63A2\u63A5\u6377\u6367\u6398\u63AA\u6371\u63A9\u6389\u6383\u639B\u636B\u63A8\u6384\u6388\u6399\u63A1\u63AC\u6392\u638F\u6380\u637B\u6369\u6368\u637A\u655D\u6556\u6551\u6559\u6557\u555F\u654F\u6558\u6555\u6554\u659C\u659B\u65AC\u65CF\u65CB\u65CC\u65CE\u665D\u665A\u6664\u6668\u6666\u665E\u66F9\u52D7\u671B\u6881\u68AF\u68A2\u6893\u68B5\u687F\u6876\u68B1\u68A7\u6897\u68B0\u6883\u68C4\u68AD\u6886\u6885\u6894\u689D\u68A8\u689F\u68A1\u6882\u6B32\u6BBA"],["b240","\u6BEB\u6BEC\u6C2B\u6D8E\u6DBC\u6DF3\u6DD9\u6DB2\u6DE1\u6DCC\u6DE4\u6DFB\u6DFA\u6E05\u6DC7\u6DCB\u6DAF\u6DD1\u6DAE\u6DDE\u6DF9\u6DB8\u6DF7\u6DF5\u6DC5\u6DD2\u6E1A\u6DB5\u6DDA\u6DEB\u6DD8\u6DEA\u6DF1\u6DEE\u6DE8\u6DC6\u6DC4\u6DAA\u6DEC\u6DBF\u6DE6\u70F9\u7109\u710A\u70FD\u70EF\u723D\u727D\u7281\u731C\u731B\u7316\u7313\u7319\u7387\u7405\u740A\u7403\u7406\u73FE\u740D\u74E0\u74F6"],["b2a1","\u74F7\u751C\u7522\u7565\u7566\u7562\u7570\u758F\u75D4\u75D5\u75B5\u75CA\u75CD\u768E\u76D4\u76D2\u76DB\u7737\u773E\u773C\u7736\u7738\u773A\u786B\u7843\u784E\u7965\u7968\u796D\u79FB\u7A92\u7A95\u7B20\u7B28\u7B1B\u7B2C\u7B26\u7B19\u7B1E\u7B2E\u7C92\u7C97\u7C95\u7D46\u7D43\u7D71\u7D2E\u7D39\u7D3C\u7D40\u7D30\u7D33\u7D44\u7D2F\u7D42\u7D32\u7D31\u7F3D\u7F9E\u7F9A\u7FCC\u7FCE\u7FD2\u801C\u804A\u8046\u812F\u8116\u8123\u812B\u8129\u8130\u8124\u8202\u8235\u8237\u8236\u8239\u838E\u839E\u8398\u8378\u83A2\u8396\u83BD\u83AB\u8392\u838A\u8393\u8389\u83A0\u8377\u837B\u837C"],["b340","\u8386\u83A7\u8655\u5F6A\u86C7\u86C0\u86B6\u86C4\u86B5\u86C6\u86CB\u86B1\u86AF\u86C9\u8853\u889E\u8888\u88AB\u8892\u8896\u888D\u888B\u8993\u898F\u8A2A\u8A1D\u8A23\u8A25\u8A31\u8A2D\u8A1F\u8A1B\u8A22\u8C49\u8C5A\u8CA9\u8CAC\u8CAB\u8CA8\u8CAA\u8CA7\u8D67\u8D66\u8DBE\u8DBA\u8EDB\u8EDF\u9019\u900D\u901A\u9017\u9023\u901F\u901D\u9010\u9015\u901E\u9020\u900F\u9022\u9016\u901B\u9014"],["b3a1","\u90E8\u90ED\u90FD\u9157\u91CE\u91F5\u91E6\u91E3\u91E7\u91ED\u91E9\u9589\u966A\u9675\u9673\u9678\u9670\u9674\u9676\u9677\u966C\u96C0\u96EA\u96E9\u7AE0\u7ADF\u9802\u9803\u9B5A\u9CE5\u9E75\u9E7F\u9EA5\u9EBB\u50A2\u508D\u5085\u5099\u5091\u5080\u5096\u5098\u509A\u6700\u51F1\u5272\u5274\u5275\u5269\u52DE\u52DD\u52DB\u535A\u53A5\u557B\u5580\u55A7\u557C\u558A\u559D\u5598\u5582\u559C\u55AA\u5594\u5587\u558B\u5583\u55B3\u55AE\u559F\u553E\u55B2\u559A\u55BB\u55AC\u55B1\u557E\u5589\u55AB\u5599\u570D\u582F\u582A\u5834\u5824\u5830\u5831\u5821\u581D\u5820\u58F9\u58FA\u5960"],["b440","\u5A77\u5A9A\u5A7F\u5A92\u5A9B\u5AA7\u5B73\u5B71\u5BD2\u5BCC\u5BD3\u5BD0\u5C0A\u5C0B\u5C31\u5D4C\u5D50\u5D34\u5D47\u5DFD\u5E45\u5E3D\u5E40\u5E43\u5E7E\u5ECA\u5EC1\u5EC2\u5EC4\u5F3C\u5F6D\u5FA9\u5FAA\u5FA8\u60D1\u60E1\u60B2\u60B6\u60E0\u611C\u6123\u60FA\u6115\u60F0\u60FB\u60F4\u6168\u60F1\u610E\u60F6\u6109\u6100\u6112\u621F\u6249\u63A3\u638C\u63CF\u63C0\u63E9\u63C9\u63C6\u63CD"],["b4a1","\u63D2\u63E3\u63D0\u63E1\u63D6\u63ED\u63EE\u6376\u63F4\u63EA\u63DB\u6452\u63DA\u63F9\u655E\u6566\u6562\u6563\u6591\u6590\u65AF\u666E\u6670\u6674\u6676\u666F\u6691\u667A\u667E\u6677\u66FE\u66FF\u671F\u671D\u68FA\u68D5\u68E0\u68D8\u68D7\u6905\u68DF\u68F5\u68EE\u68E7\u68F9\u68D2\u68F2\u68E3\u68CB\u68CD\u690D\u6912\u690E\u68C9\u68DA\u696E\u68FB\u6B3E\u6B3A\u6B3D\u6B98\u6B96\u6BBC\u6BEF\u6C2E\u6C2F\u6C2C\u6E2F\u6E38\u6E54\u6E21\u6E32\u6E67\u6E4A\u6E20\u6E25\u6E23\u6E1B\u6E5B\u6E58\u6E24\u6E56\u6E6E\u6E2D\u6E26\u6E6F\u6E34\u6E4D\u6E3A\u6E2C\u6E43\u6E1D\u6E3E\u6ECB"],["b540","\u6E89\u6E19\u6E4E\u6E63\u6E44\u6E72\u6E69\u6E5F\u7119\u711A\u7126\u7130\u7121\u7136\u716E\u711C\u724C\u7284\u7280\u7336\u7325\u7334\u7329\u743A\u742A\u7433\u7422\u7425\u7435\u7436\u7434\u742F\u741B\u7426\u7428\u7525\u7526\u756B\u756A\u75E2\u75DB\u75E3\u75D9\u75D8\u75DE\u75E0\u767B\u767C\u7696\u7693\u76B4\u76DC\u774F\u77ED\u785D\u786C\u786F\u7A0D\u7A08\u7A0B\u7A05\u7A00\u7A98"],["b5a1","\u7A97\u7A96\u7AE5\u7AE3\u7B49\u7B56\u7B46\u7B50\u7B52\u7B54\u7B4D\u7B4B\u7B4F\u7B51\u7C9F\u7CA5\u7D5E\u7D50\u7D68\u7D55\u7D2B\u7D6E\u7D72\u7D61\u7D66\u7D62\u7D70\u7D73\u5584\u7FD4\u7FD5\u800B\u8052\u8085\u8155\u8154\u814B\u8151\u814E\u8139\u8146\u813E\u814C\u8153\u8174\u8212\u821C\u83E9\u8403\u83F8\u840D\u83E0\u83C5\u840B\u83C1\u83EF\u83F1\u83F4\u8457\u840A\u83F0\u840C\u83CC\u83FD\u83F2\u83CA\u8438\u840E\u8404\u83DC\u8407\u83D4\u83DF\u865B\u86DF\u86D9\u86ED\u86D4\u86DB\u86E4\u86D0\u86DE\u8857\u88C1\u88C2\u88B1\u8983\u8996\u8A3B\u8A60\u8A55\u8A5E\u8A3C\u8A41"],["b640","\u8A54\u8A5B\u8A50\u8A46\u8A34\u8A3A\u8A36\u8A56\u8C61\u8C82\u8CAF\u8CBC\u8CB3\u8CBD\u8CC1\u8CBB\u8CC0\u8CB4\u8CB7\u8CB6\u8CBF\u8CB8\u8D8A\u8D85\u8D81\u8DCE\u8DDD\u8DCB\u8DDA\u8DD1\u8DCC\u8DDB\u8DC6\u8EFB\u8EF8\u8EFC\u8F9C\u902E\u9035\u9031\u9038\u9032\u9036\u9102\u90F5\u9109\u90FE\u9163\u9165\u91CF\u9214\u9215\u9223\u9209\u921E\u920D\u9210\u9207\u9211\u9594\u958F\u958B\u9591"],["b6a1","\u9593\u9592\u958E\u968A\u968E\u968B\u967D\u9685\u9686\u968D\u9672\u9684\u96C1\u96C5\u96C4\u96C6\u96C7\u96EF\u96F2\u97CC\u9805\u9806\u9808\u98E7\u98EA\u98EF\u98E9\u98F2\u98ED\u99AE\u99AD\u9EC3\u9ECD\u9ED1\u4E82\u50AD\u50B5\u50B2\u50B3\u50C5\u50BE\u50AC\u50B7\u50BB\u50AF\u50C7\u527F\u5277\u527D\u52DF\u52E6\u52E4\u52E2\u52E3\u532F\u55DF\u55E8\u55D3\u55E6\u55CE\u55DC\u55C7\u55D1\u55E3\u55E4\u55EF\u55DA\u55E1\u55C5\u55C6\u55E5\u55C9\u5712\u5713\u585E\u5851\u5858\u5857\u585A\u5854\u586B\u584C\u586D\u584A\u5862\u5852\u584B\u5967\u5AC1\u5AC9\u5ACC\u5ABE\u5ABD\u5ABC"],["b740","\u5AB3\u5AC2\u5AB2\u5D69\u5D6F\u5E4C\u5E79\u5EC9\u5EC8\u5F12\u5F59\u5FAC\u5FAE\u611A\u610F\u6148\u611F\u60F3\u611B\u60F9\u6101\u6108\u614E\u614C\u6144\u614D\u613E\u6134\u6127\u610D\u6106\u6137\u6221\u6222\u6413\u643E\u641E\u642A\u642D\u643D\u642C\u640F\u641C\u6414\u640D\u6436\u6416\u6417\u6406\u656C\u659F\u65B0\u6697\u6689\u6687\u6688\u6696\u6684\u6698\u668D\u6703\u6994\u696D"],["b7a1","\u695A\u6977\u6960\u6954\u6975\u6930\u6982\u694A\u6968\u696B\u695E\u6953\u6979\u6986\u695D\u6963\u695B\u6B47\u6B72\u6BC0\u6BBF\u6BD3\u6BFD\u6EA2\u6EAF\u6ED3\u6EB6\u6EC2\u6E90\u6E9D\u6EC7\u6EC5\u6EA5\u6E98\u6EBC\u6EBA\u6EAB\u6ED1\u6E96\u6E9C\u6EC4\u6ED4\u6EAA\u6EA7\u6EB4\u714E\u7159\u7169\u7164\u7149\u7167\u715C\u716C\u7166\u714C\u7165\u715E\u7146\u7168\u7156\u723A\u7252\u7337\u7345\u733F\u733E\u746F\u745A\u7455\u745F\u745E\u7441\u743F\u7459\u745B\u745C\u7576\u7578\u7600\u75F0\u7601\u75F2\u75F1\u75FA\u75FF\u75F4\u75F3\u76DE\u76DF\u775B\u776B\u7766\u775E\u7763"],["b840","\u7779\u776A\u776C\u775C\u7765\u7768\u7762\u77EE\u788E\u78B0\u7897\u7898\u788C\u7889\u787C\u7891\u7893\u787F\u797A\u797F\u7981\u842C\u79BD\u7A1C\u7A1A\u7A20\u7A14\u7A1F\u7A1E\u7A9F\u7AA0\u7B77\u7BC0\u7B60\u7B6E\u7B67\u7CB1\u7CB3\u7CB5\u7D93\u7D79\u7D91\u7D81\u7D8F\u7D5B\u7F6E\u7F69\u7F6A\u7F72\u7FA9\u7FA8\u7FA4\u8056\u8058\u8086\u8084\u8171\u8170\u8178\u8165\u816E\u8173\u816B"],["b8a1","\u8179\u817A\u8166\u8205\u8247\u8482\u8477\u843D\u8431\u8475\u8466\u846B\u8449\u846C\u845B\u843C\u8435\u8461\u8463\u8469\u846D\u8446\u865E\u865C\u865F\u86F9\u8713\u8708\u8707\u8700\u86FE\u86FB\u8702\u8703\u8706\u870A\u8859\u88DF\u88D4\u88D9\u88DC\u88D8\u88DD\u88E1\u88CA\u88D5\u88D2\u899C\u89E3\u8A6B\u8A72\u8A73\u8A66\u8A69\u8A70\u8A87\u8A7C\u8A63\u8AA0\u8A71\u8A85\u8A6D\u8A62\u8A6E\u8A6C\u8A79\u8A7B\u8A3E\u8A68\u8C62\u8C8A\u8C89\u8CCA\u8CC7\u8CC8\u8CC4\u8CB2\u8CC3\u8CC2\u8CC5\u8DE1\u8DDF\u8DE8\u8DEF\u8DF3\u8DFA\u8DEA\u8DE4\u8DE6\u8EB2\u8F03\u8F09\u8EFE\u8F0A"],["b940","\u8F9F\u8FB2\u904B\u904A\u9053\u9042\u9054\u903C\u9055\u9050\u9047\u904F\u904E\u904D\u9051\u903E\u9041\u9112\u9117\u916C\u916A\u9169\u91C9\u9237\u9257\u9238\u923D\u9240\u923E\u925B\u924B\u9264\u9251\u9234\u9249\u924D\u9245\u9239\u923F\u925A\u9598\u9698\u9694\u9695\u96CD\u96CB\u96C9\u96CA\u96F7\u96FB\u96F9\u96F6\u9756\u9774\u9776\u9810\u9811\u9813\u980A\u9812\u980C\u98FC\u98F4"],["b9a1","\u98FD\u98FE\u99B3\u99B1\u99B4\u9AE1\u9CE9\u9E82\u9F0E\u9F13\u9F20\u50E7\u50EE\u50E5\u50D6\u50ED\u50DA\u50D5\u50CF\u50D1\u50F1\u50CE\u50E9\u5162\u51F3\u5283\u5282\u5331\u53AD\u55FE\u5600\u561B\u5617\u55FD\u5614\u5606\u5609\u560D\u560E\u55F7\u5616\u561F\u5608\u5610\u55F6\u5718\u5716\u5875\u587E\u5883\u5893\u588A\u5879\u5885\u587D\u58FD\u5925\u5922\u5924\u596A\u5969\u5AE1\u5AE6\u5AE9\u5AD7\u5AD6\u5AD8\u5AE3\u5B75\u5BDE\u5BE7\u5BE1\u5BE5\u5BE6\u5BE8\u5BE2\u5BE4\u5BDF\u5C0D\u5C62\u5D84\u5D87\u5E5B\u5E63\u5E55\u5E57\u5E54\u5ED3\u5ED6\u5F0A\u5F46\u5F70\u5FB9\u6147"],["ba40","\u613F\u614B\u6177\u6162\u6163\u615F\u615A\u6158\u6175\u622A\u6487\u6458\u6454\u64A4\u6478\u645F\u647A\u6451\u6467\u6434\u646D\u647B\u6572\u65A1\u65D7\u65D6\u66A2\u66A8\u669D\u699C\u69A8\u6995\u69C1\u69AE\u69D3\u69CB\u699B\u69B7\u69BB\u69AB\u69B4\u69D0\u69CD\u69AD\u69CC\u69A6\u69C3\u69A3\u6B49\u6B4C\u6C33\u6F33\u6F14\u6EFE\u6F13\u6EF4\u6F29\u6F3E\u6F20\u6F2C\u6F0F\u6F02\u6F22"],["baa1","\u6EFF\u6EEF\u6F06\u6F31\u6F38\u6F32\u6F23\u6F15\u6F2B\u6F2F\u6F88\u6F2A\u6EEC\u6F01\u6EF2\u6ECC\u6EF7\u7194\u7199\u717D\u718A\u7184\u7192\u723E\u7292\u7296\u7344\u7350\u7464\u7463\u746A\u7470\u746D\u7504\u7591\u7627\u760D\u760B\u7609\u7613\u76E1\u76E3\u7784\u777D\u777F\u7761\u78C1\u789F\u78A7\u78B3\u78A9\u78A3\u798E\u798F\u798D\u7A2E\u7A31\u7AAA\u7AA9\u7AED\u7AEF\u7BA1\u7B95\u7B8B\u7B75\u7B97\u7B9D\u7B94\u7B8F\u7BB8\u7B87\u7B84\u7CB9\u7CBD\u7CBE\u7DBB\u7DB0\u7D9C\u7DBD\u7DBE\u7DA0\u7DCA\u7DB4\u7DB2\u7DB1\u7DBA\u7DA2\u7DBF\u7DB5\u7DB8\u7DAD\u7DD2\u7DC7\u7DAC"],["bb40","\u7F70\u7FE0\u7FE1\u7FDF\u805E\u805A\u8087\u8150\u8180\u818F\u8188\u818A\u817F\u8182\u81E7\u81FA\u8207\u8214\u821E\u824B\u84C9\u84BF\u84C6\u84C4\u8499\u849E\u84B2\u849C\u84CB\u84B8\u84C0\u84D3\u8490\u84BC\u84D1\u84CA\u873F\u871C\u873B\u8722\u8725\u8734\u8718\u8755\u8737\u8729\u88F3\u8902\u88F4\u88F9\u88F8\u88FD\u88E8\u891A\u88EF\u8AA6\u8A8C\u8A9E\u8AA3\u8A8D\u8AA1\u8A93\u8AA4"],["bba1","\u8AAA\u8AA5\u8AA8\u8A98\u8A91\u8A9A\u8AA7\u8C6A\u8C8D\u8C8C\u8CD3\u8CD1\u8CD2\u8D6B\u8D99\u8D95\u8DFC\u8F14\u8F12\u8F15\u8F13\u8FA3\u9060\u9058\u905C\u9063\u9059\u905E\u9062\u905D\u905B\u9119\u9118\u911E\u9175\u9178\u9177\u9174\u9278\u9280\u9285\u9298\u9296\u927B\u9293\u929C\u92A8\u927C\u9291\u95A1\u95A8\u95A9\u95A3\u95A5\u95A4\u9699\u969C\u969B\u96CC\u96D2\u9700\u977C\u9785\u97F6\u9817\u9818\u98AF\u98B1\u9903\u9905\u990C\u9909\u99C1\u9AAF\u9AB0\u9AE6\u9B41\u9B42\u9CF4\u9CF6\u9CF3\u9EBC\u9F3B\u9F4A\u5104\u5100\u50FB\u50F5\u50F9\u5102\u5108\u5109\u5105\u51DC"],["bc40","\u5287\u5288\u5289\u528D\u528A\u52F0\u53B2\u562E\u563B\u5639\u5632\u563F\u5634\u5629\u5653\u564E\u5657\u5674\u5636\u562F\u5630\u5880\u589F\u589E\u58B3\u589C\u58AE\u58A9\u58A6\u596D\u5B09\u5AFB\u5B0B\u5AF5\u5B0C\u5B08\u5BEE\u5BEC\u5BE9\u5BEB\u5C64\u5C65\u5D9D\u5D94\u5E62\u5E5F\u5E61\u5EE2\u5EDA\u5EDF\u5EDD\u5EE3\u5EE0\u5F48\u5F71\u5FB7\u5FB5\u6176\u6167\u616E\u615D\u6155\u6182"],["bca1","\u617C\u6170\u616B\u617E\u61A7\u6190\u61AB\u618E\u61AC\u619A\u61A4\u6194\u61AE\u622E\u6469\u646F\u6479\u649E\u64B2\u6488\u6490\u64B0\u64A5\u6493\u6495\u64A9\u6492\u64AE\u64AD\u64AB\u649A\u64AC\u6499\u64A2\u64B3\u6575\u6577\u6578\u66AE\u66AB\u66B4\u66B1\u6A23\u6A1F\u69E8\u6A01\u6A1E\u6A19\u69FD\u6A21\u6A13\u6A0A\u69F3\u6A02\u6A05\u69ED\u6A11\u6B50\u6B4E\u6BA4\u6BC5\u6BC6\u6F3F\u6F7C\u6F84\u6F51\u6F66\u6F54\u6F86\u6F6D\u6F5B\u6F78\u6F6E\u6F8E\u6F7A\u6F70\u6F64\u6F97\u6F58\u6ED5\u6F6F\u6F60\u6F5F\u719F\u71AC\u71B1\u71A8\u7256\u729B\u734E\u7357\u7469\u748B\u7483"],["bd40","\u747E\u7480\u757F\u7620\u7629\u761F\u7624\u7626\u7621\u7622\u769A\u76BA\u76E4\u778E\u7787\u778C\u7791\u778B\u78CB\u78C5\u78BA\u78CA\u78BE\u78D5\u78BC\u78D0\u7A3F\u7A3C\u7A40\u7A3D\u7A37\u7A3B\u7AAF\u7AAE\u7BAD\u7BB1\u7BC4\u7BB4\u7BC6\u7BC7\u7BC1\u7BA0\u7BCC\u7CCA\u7DE0\u7DF4\u7DEF\u7DFB\u7DD8\u7DEC\u7DDD\u7DE8\u7DE3\u7DDA\u7DDE\u7DE9\u7D9E\u7DD9\u7DF2\u7DF9\u7F75\u7F77\u7FAF"],["bda1","\u7FE9\u8026\u819B\u819C\u819D\u81A0\u819A\u8198\u8517\u853D\u851A\u84EE\u852C\u852D\u8513\u8511\u8523\u8521\u8514\u84EC\u8525\u84FF\u8506\u8782\u8774\u8776\u8760\u8766\u8778\u8768\u8759\u8757\u874C\u8753\u885B\u885D\u8910\u8907\u8912\u8913\u8915\u890A\u8ABC\u8AD2\u8AC7\u8AC4\u8A95\u8ACB\u8AF8\u8AB2\u8AC9\u8AC2\u8ABF\u8AB0\u8AD6\u8ACD\u8AB6\u8AB9\u8ADB\u8C4C\u8C4E\u8C6C\u8CE0\u8CDE\u8CE6\u8CE4\u8CEC\u8CED\u8CE2\u8CE3\u8CDC\u8CEA\u8CE1\u8D6D\u8D9F\u8DA3\u8E2B\u8E10\u8E1D\u8E22\u8E0F\u8E29\u8E1F\u8E21\u8E1E\u8EBA\u8F1D\u8F1B\u8F1F\u8F29\u8F26\u8F2A\u8F1C\u8F1E"],["be40","\u8F25\u9069\u906E\u9068\u906D\u9077\u9130\u912D\u9127\u9131\u9187\u9189\u918B\u9183\u92C5\u92BB\u92B7\u92EA\u92AC\u92E4\u92C1\u92B3\u92BC\u92D2\u92C7\u92F0\u92B2\u95AD\u95B1\u9704\u9706\u9707\u9709\u9760\u978D\u978B\u978F\u9821\u982B\u981C\u98B3\u990A\u9913\u9912\u9918\u99DD\u99D0\u99DF\u99DB\u99D1\u99D5\u99D2\u99D9\u9AB7\u9AEE\u9AEF\u9B27\u9B45\u9B44\u9B77\u9B6F\u9D06\u9D09"],["bea1","\u9D03\u9EA9\u9EBE\u9ECE\u58A8\u9F52\u5112\u5118\u5114\u5110\u5115\u5180\u51AA\u51DD\u5291\u5293\u52F3\u5659\u566B\u5679\u5669\u5664\u5678\u566A\u5668\u5665\u5671\u566F\u566C\u5662\u5676\u58C1\u58BE\u58C7\u58C5\u596E\u5B1D\u5B34\u5B78\u5BF0\u5C0E\u5F4A\u61B2\u6191\u61A9\u618A\u61CD\u61B6\u61BE\u61CA\u61C8\u6230\u64C5\u64C1\u64CB\u64BB\u64BC\u64DA\u64C4\u64C7\u64C2\u64CD\u64BF\u64D2\u64D4\u64BE\u6574\u66C6\u66C9\u66B9\u66C4\u66C7\u66B8\u6A3D\u6A38\u6A3A\u6A59\u6A6B\u6A58\u6A39\u6A44\u6A62\u6A61\u6A4B\u6A47\u6A35\u6A5F\u6A48\u6B59\u6B77\u6C05\u6FC2\u6FB1\u6FA1"],["bf40","\u6FC3\u6FA4\u6FC1\u6FA7\u6FB3\u6FC0\u6FB9\u6FB6\u6FA6\u6FA0\u6FB4\u71BE\u71C9\u71D0\u71D2\u71C8\u71D5\u71B9\u71CE\u71D9\u71DC\u71C3\u71C4\u7368\u749C\u74A3\u7498\u749F\u749E\u74E2\u750C\u750D\u7634\u7638\u763A\u76E7\u76E5\u77A0\u779E\u779F\u77A5\u78E8\u78DA\u78EC\u78E7\u79A6\u7A4D\u7A4E\u7A46\u7A4C\u7A4B\u7ABA\u7BD9\u7C11\u7BC9\u7BE4\u7BDB\u7BE1\u7BE9\u7BE6\u7CD5\u7CD6\u7E0A"],["bfa1","\u7E11\u7E08\u7E1B\u7E23\u7E1E\u7E1D\u7E09\u7E10\u7F79\u7FB2\u7FF0\u7FF1\u7FEE\u8028\u81B3\u81A9\u81A8\u81FB\u8208\u8258\u8259\u854A\u8559\u8548\u8568\u8569\u8543\u8549\u856D\u856A\u855E\u8783\u879F\u879E\u87A2\u878D\u8861\u892A\u8932\u8925\u892B\u8921\u89AA\u89A6\u8AE6\u8AFA\u8AEB\u8AF1\u8B00\u8ADC\u8AE7\u8AEE\u8AFE\u8B01\u8B02\u8AF7\u8AED\u8AF3\u8AF6\u8AFC\u8C6B\u8C6D\u8C93\u8CF4\u8E44\u8E31\u8E34\u8E42\u8E39\u8E35\u8F3B\u8F2F\u8F38\u8F33\u8FA8\u8FA6\u9075\u9074\u9078\u9072\u907C\u907A\u9134\u9192\u9320\u9336\u92F8\u9333\u932F\u9322\u92FC\u932B\u9304\u931A"],["c040","\u9310\u9326\u9321\u9315\u932E\u9319\u95BB\u96A7\u96A8\u96AA\u96D5\u970E\u9711\u9716\u970D\u9713\u970F\u975B\u975C\u9766\u9798\u9830\u9838\u983B\u9837\u982D\u9839\u9824\u9910\u9928\u991E\u991B\u9921\u991A\u99ED\u99E2\u99F1\u9AB8\u9ABC\u9AFB\u9AED\u9B28\u9B91\u9D15\u9D23\u9D26\u9D28\u9D12\u9D1B\u9ED8\u9ED4\u9F8D\u9F9C\u512A\u511F\u5121\u5132\u52F5\u568E\u5680\u5690\u5685\u5687"],["c0a1","\u568F\u58D5\u58D3\u58D1\u58CE\u5B30\u5B2A\u5B24\u5B7A\u5C37\u5C68\u5DBC\u5DBA\u5DBD\u5DB8\u5E6B\u5F4C\u5FBD\u61C9\u61C2\u61C7\u61E6\u61CB\u6232\u6234\u64CE\u64CA\u64D8\u64E0\u64F0\u64E6\u64EC\u64F1\u64E2\u64ED\u6582\u6583\u66D9\u66D6\u6A80\u6A94\u6A84\u6AA2\u6A9C\u6ADB\u6AA3\u6A7E\u6A97\u6A90\u6AA0\u6B5C\u6BAE\u6BDA\u6C08\u6FD8\u6FF1\u6FDF\u6FE0\u6FDB\u6FE4\u6FEB\u6FEF\u6F80\u6FEC\u6FE1\u6FE9\u6FD5\u6FEE\u6FF0\u71E7\u71DF\u71EE\u71E6\u71E5\u71ED\u71EC\u71F4\u71E0\u7235\u7246\u7370\u7372\u74A9\u74B0\u74A6\u74A8\u7646\u7642\u764C\u76EA\u77B3\u77AA\u77B0\u77AC"],["c140","\u77A7\u77AD\u77EF\u78F7\u78FA\u78F4\u78EF\u7901\u79A7\u79AA\u7A57\u7ABF\u7C07\u7C0D\u7BFE\u7BF7\u7C0C\u7BE0\u7CE0\u7CDC\u7CDE\u7CE2\u7CDF\u7CD9\u7CDD\u7E2E\u7E3E\u7E46\u7E37\u7E32\u7E43\u7E2B\u7E3D\u7E31\u7E45\u7E41\u7E34\u7E39\u7E48\u7E35\u7E3F\u7E2F\u7F44\u7FF3\u7FFC\u8071\u8072\u8070\u806F\u8073\u81C6\u81C3\u81BA\u81C2\u81C0\u81BF\u81BD\u81C9\u81BE\u81E8\u8209\u8271\u85AA"],["c1a1","\u8584\u857E\u859C\u8591\u8594\u85AF\u859B\u8587\u85A8\u858A\u8667\u87C0\u87D1\u87B3\u87D2\u87C6\u87AB\u87BB\u87BA\u87C8\u87CB\u893B\u8936\u8944\u8938\u893D\u89AC\u8B0E\u8B17\u8B19\u8B1B\u8B0A\u8B20\u8B1D\u8B04\u8B10\u8C41\u8C3F\u8C73\u8CFA\u8CFD\u8CFC\u8CF8\u8CFB\u8DA8\u8E49\u8E4B\u8E48\u8E4A\u8F44\u8F3E\u8F42\u8F45\u8F3F\u907F\u907D\u9084\u9081\u9082\u9080\u9139\u91A3\u919E\u919C\u934D\u9382\u9328\u9375\u934A\u9365\u934B\u9318\u937E\u936C\u935B\u9370\u935A\u9354\u95CA\u95CB\u95CC\u95C8\u95C6\u96B1\u96B8\u96D6\u971C\u971E\u97A0\u97D3\u9846\u98B6\u9935\u9A01"],["c240","\u99FF\u9BAE\u9BAB\u9BAA\u9BAD\u9D3B\u9D3F\u9E8B\u9ECF\u9EDE\u9EDC\u9EDD\u9EDB\u9F3E\u9F4B\u53E2\u5695\u56AE\u58D9\u58D8\u5B38\u5F5D\u61E3\u6233\u64F4\u64F2\u64FE\u6506\u64FA\u64FB\u64F7\u65B7\u66DC\u6726\u6AB3\u6AAC\u6AC3\u6ABB\u6AB8\u6AC2\u6AAE\u6AAF\u6B5F\u6B78\u6BAF\u7009\u700B\u6FFE\u7006\u6FFA\u7011\u700F\u71FB\u71FC\u71FE\u71F8\u7377\u7375\u74A7\u74BF\u7515\u7656\u7658"],["c2a1","\u7652\u77BD\u77BF\u77BB\u77BC\u790E\u79AE\u7A61\u7A62\u7A60\u7AC4\u7AC5\u7C2B\u7C27\u7C2A\u7C1E\u7C23\u7C21\u7CE7\u7E54\u7E55\u7E5E\u7E5A\u7E61\u7E52\u7E59\u7F48\u7FF9\u7FFB\u8077\u8076\u81CD\u81CF\u820A\u85CF\u85A9\u85CD\u85D0\u85C9\u85B0\u85BA\u85B9\u85A6\u87EF\u87EC\u87F2\u87E0\u8986\u89B2\u89F4\u8B28\u8B39\u8B2C\u8B2B\u8C50\u8D05\u8E59\u8E63\u8E66\u8E64\u8E5F\u8E55\u8EC0\u8F49\u8F4D\u9087\u9083\u9088\u91AB\u91AC\u91D0\u9394\u938A\u9396\u93A2\u93B3\u93AE\u93AC\u93B0\u9398\u939A\u9397\u95D4\u95D6\u95D0\u95D5\u96E2\u96DC\u96D9\u96DB\u96DE\u9724\u97A3\u97A6"],["c340","\u97AD\u97F9\u984D\u984F\u984C\u984E\u9853\u98BA\u993E\u993F\u993D\u992E\u99A5\u9A0E\u9AC1\u9B03\u9B06\u9B4F\u9B4E\u9B4D\u9BCA\u9BC9\u9BFD\u9BC8\u9BC0\u9D51\u9D5D\u9D60\u9EE0\u9F15\u9F2C\u5133\u56A5\u58DE\u58DF\u58E2\u5BF5\u9F90\u5EEC\u61F2\u61F7\u61F6\u61F5\u6500\u650F\u66E0\u66DD\u6AE5\u6ADD\u6ADA\u6AD3\u701B\u701F\u7028\u701A\u701D\u7015\u7018\u7206\u720D\u7258\u72A2\u7378"],["c3a1","\u737A\u74BD\u74CA\u74E3\u7587\u7586\u765F\u7661\u77C7\u7919\u79B1\u7A6B\u7A69\u7C3E\u7C3F\u7C38\u7C3D\u7C37\u7C40\u7E6B\u7E6D\u7E79\u7E69\u7E6A\u7F85\u7E73\u7FB6\u7FB9\u7FB8\u81D8\u85E9\u85DD\u85EA\u85D5\u85E4\u85E5\u85F7\u87FB\u8805\u880D\u87F9\u87FE\u8960\u895F\u8956\u895E\u8B41\u8B5C\u8B58\u8B49\u8B5A\u8B4E\u8B4F\u8B46\u8B59\u8D08\u8D0A\u8E7C\u8E72\u8E87\u8E76\u8E6C\u8E7A\u8E74\u8F54\u8F4E\u8FAD\u908A\u908B\u91B1\u91AE\u93E1\u93D1\u93DF\u93C3\u93C8\u93DC\u93DD\u93D6\u93E2\u93CD\u93D8\u93E4\u93D7\u93E8\u95DC\u96B4\u96E3\u972A\u9727\u9761\u97DC\u97FB\u985E"],["c440","\u9858\u985B\u98BC\u9945\u9949\u9A16\u9A19\u9B0D\u9BE8\u9BE7\u9BD6\u9BDB\u9D89\u9D61\u9D72\u9D6A\u9D6C\u9E92\u9E97\u9E93\u9EB4\u52F8\u56A8\u56B7\u56B6\u56B4\u56BC\u58E4\u5B40\u5B43\u5B7D\u5BF6\u5DC9\u61F8\u61FA\u6518\u6514\u6519\u66E6\u6727\u6AEC\u703E\u7030\u7032\u7210\u737B\u74CF\u7662\u7665\u7926\u792A\u792C\u792B\u7AC7\u7AF6\u7C4C\u7C43\u7C4D\u7CEF\u7CF0\u8FAE\u7E7D\u7E7C"],["c4a1","\u7E82\u7F4C\u8000\u81DA\u8266\u85FB\u85F9\u8611\u85FA\u8606\u860B\u8607\u860A\u8814\u8815\u8964\u89BA\u89F8\u8B70\u8B6C\u8B66\u8B6F\u8B5F\u8B6B\u8D0F\u8D0D\u8E89\u8E81\u8E85\u8E82\u91B4\u91CB\u9418\u9403\u93FD\u95E1\u9730\u98C4\u9952\u9951\u99A8\u9A2B\u9A30\u9A37\u9A35\u9C13\u9C0D\u9E79\u9EB5\u9EE8\u9F2F\u9F5F\u9F63\u9F61\u5137\u5138\u56C1\u56C0\u56C2\u5914\u5C6C\u5DCD\u61FC\u61FE\u651D\u651C\u6595\u66E9\u6AFB\u6B04\u6AFA\u6BB2\u704C\u721B\u72A7\u74D6\u74D4\u7669\u77D3\u7C50\u7E8F\u7E8C\u7FBC\u8617\u862D\u861A\u8823\u8822\u8821\u881F\u896A\u896C\u89BD\u8B74"],["c540","\u8B77\u8B7D\u8D13\u8E8A\u8E8D\u8E8B\u8F5F\u8FAF\u91BA\u942E\u9433\u9435\u943A\u9438\u9432\u942B\u95E2\u9738\u9739\u9732\u97FF\u9867\u9865\u9957\u9A45\u9A43\u9A40\u9A3E\u9ACF\u9B54\u9B51\u9C2D\u9C25\u9DAF\u9DB4\u9DC2\u9DB8\u9E9D\u9EEF\u9F19\u9F5C\u9F66\u9F67\u513C\u513B\u56C8\u56CA\u56C9\u5B7F\u5DD4\u5DD2\u5F4E\u61FF\u6524\u6B0A\u6B61\u7051\u7058\u7380\u74E4\u758A\u766E\u766C"],["c5a1","\u79B3\u7C60\u7C5F\u807E\u807D\u81DF\u8972\u896F\u89FC\u8B80\u8D16\u8D17\u8E91\u8E93\u8F61\u9148\u9444\u9451\u9452\u973D\u973E\u97C3\u97C1\u986B\u9955\u9A55\u9A4D\u9AD2\u9B1A\u9C49\u9C31\u9C3E\u9C3B\u9DD3\u9DD7\u9F34\u9F6C\u9F6A\u9F94\u56CC\u5DD6\u6200\u6523\u652B\u652A\u66EC\u6B10\u74DA\u7ACA\u7C64\u7C63\u7C65\u7E93\u7E96\u7E94\u81E2\u8638\u863F\u8831\u8B8A\u9090\u908F\u9463\u9460\u9464\u9768\u986F\u995C\u9A5A\u9A5B\u9A57\u9AD3\u9AD4\u9AD1\u9C54\u9C57\u9C56\u9DE5\u9E9F\u9EF4\u56D1\u58E9\u652C\u705E\u7671\u7672\u77D7\u7F50\u7F88\u8836\u8839\u8862\u8B93\u8B92"],["c640","\u8B96\u8277\u8D1B\u91C0\u946A\u9742\u9748\u9744\u97C6\u9870\u9A5F\u9B22\u9B58\u9C5F\u9DF9\u9DFA\u9E7C\u9E7D\u9F07\u9F77\u9F72\u5EF3\u6B16\u7063\u7C6C\u7C6E\u883B\u89C0\u8EA1\u91C1\u9472\u9470\u9871\u995E\u9AD6\u9B23\u9ECC\u7064\u77DA\u8B9A\u9477\u97C9\u9A62\u9A65\u7E9C\u8B9C\u8EAA\u91C5\u947D\u947E\u947C\u9C77\u9C78\u9EF7\u8C54\u947F\u9E1A\u7228\u9A6A\u9B31\u9E1B\u9E1E\u7C72"],["c940","\u4E42\u4E5C\u51F5\u531A\u5382\u4E07\u4E0C\u4E47\u4E8D\u56D7\uFA0C\u5C6E\u5F73\u4E0F\u5187\u4E0E\u4E2E\u4E93\u4EC2\u4EC9\u4EC8\u5198\u52FC\u536C\u53B9\u5720\u5903\u592C\u5C10\u5DFF\u65E1\u6BB3\u6BCC\u6C14\u723F\u4E31\u4E3C\u4EE8\u4EDC\u4EE9\u4EE1\u4EDD\u4EDA\u520C\u531C\u534C\u5722\u5723\u5917\u592F\u5B81\u5B84\u5C12\u5C3B\u5C74\u5C73\u5E04\u5E80\u5E82\u5FC9\u6209\u6250\u6C15"],["c9a1","\u6C36\u6C43\u6C3F\u6C3B\u72AE\u72B0\u738A\u79B8\u808A\u961E\u4F0E\u4F18\u4F2C\u4EF5\u4F14\u4EF1\u4F00\u4EF7\u4F08\u4F1D\u4F02\u4F05\u4F22\u4F13\u4F04\u4EF4\u4F12\u51B1\u5213\u5209\u5210\u52A6\u5322\u531F\u534D\u538A\u5407\u56E1\u56DF\u572E\u572A\u5734\u593C\u5980\u597C\u5985\u597B\u597E\u5977\u597F\u5B56\u5C15\u5C25\u5C7C\u5C7A\u5C7B\u5C7E\u5DDF\u5E75\u5E84\u5F02\u5F1A\u5F74\u5FD5\u5FD4\u5FCF\u625C\u625E\u6264\u6261\u6266\u6262\u6259\u6260\u625A\u6265\u65EF\u65EE\u673E\u6739\u6738\u673B\u673A\u673F\u673C\u6733\u6C18\u6C46\u6C52\u6C5C\u6C4F\u6C4A\u6C54\u6C4B"],["ca40","\u6C4C\u7071\u725E\u72B4\u72B5\u738E\u752A\u767F\u7A75\u7F51\u8278\u827C\u8280\u827D\u827F\u864D\u897E\u9099\u9097\u9098\u909B\u9094\u9622\u9624\u9620\u9623\u4F56\u4F3B\u4F62\u4F49\u4F53\u4F64\u4F3E\u4F67\u4F52\u4F5F\u4F41\u4F58\u4F2D\u4F33\u4F3F\u4F61\u518F\u51B9\u521C\u521E\u5221\u52AD\u52AE\u5309\u5363\u5372\u538E\u538F\u5430\u5437\u542A\u5454\u5445\u5419\u541C\u5425\u5418"],["caa1","\u543D\u544F\u5441\u5428\u5424\u5447\u56EE\u56E7\u56E5\u5741\u5745\u574C\u5749\u574B\u5752\u5906\u5940\u59A6\u5998\u59A0\u5997\u598E\u59A2\u5990\u598F\u59A7\u59A1\u5B8E\u5B92\u5C28\u5C2A\u5C8D\u5C8F\u5C88\u5C8B\u5C89\u5C92\u5C8A\u5C86\u5C93\u5C95\u5DE0\u5E0A\u5E0E\u5E8B\u5E89\u5E8C\u5E88\u5E8D\u5F05\u5F1D\u5F78\u5F76\u5FD2\u5FD1\u5FD0\u5FED\u5FE8\u5FEE\u5FF3\u5FE1\u5FE4\u5FE3\u5FFA\u5FEF\u5FF7\u5FFB\u6000\u5FF4\u623A\u6283\u628C\u628E\u628F\u6294\u6287\u6271\u627B\u627A\u6270\u6281\u6288\u6277\u627D\u6272\u6274\u6537\u65F0\u65F4\u65F3\u65F2\u65F5\u6745\u6747"],["cb40","\u6759\u6755\u674C\u6748\u675D\u674D\u675A\u674B\u6BD0\u6C19\u6C1A\u6C78\u6C67\u6C6B\u6C84\u6C8B\u6C8F\u6C71\u6C6F\u6C69\u6C9A\u6C6D\u6C87\u6C95\u6C9C\u6C66\u6C73\u6C65\u6C7B\u6C8E\u7074\u707A\u7263\u72BF\u72BD\u72C3\u72C6\u72C1\u72BA\u72C5\u7395\u7397\u7393\u7394\u7392\u753A\u7539\u7594\u7595\u7681\u793D\u8034\u8095\u8099\u8090\u8092\u809C\u8290\u828F\u8285\u828E\u8291\u8293"],["cba1","\u828A\u8283\u8284\u8C78\u8FC9\u8FBF\u909F\u90A1\u90A5\u909E\u90A7\u90A0\u9630\u9628\u962F\u962D\u4E33\u4F98\u4F7C\u4F85\u4F7D\u4F80\u4F87\u4F76\u4F74\u4F89\u4F84\u4F77\u4F4C\u4F97\u4F6A\u4F9A\u4F79\u4F81\u4F78\u4F90\u4F9C\u4F94\u4F9E\u4F92\u4F82\u4F95\u4F6B\u4F6E\u519E\u51BC\u51BE\u5235\u5232\u5233\u5246\u5231\u52BC\u530A\u530B\u533C\u5392\u5394\u5487\u547F\u5481\u5491\u5482\u5488\u546B\u547A\u547E\u5465\u546C\u5474\u5466\u548D\u546F\u5461\u5460\u5498\u5463\u5467\u5464\u56F7\u56F9\u576F\u5772\u576D\u576B\u5771\u5770\u5776\u5780\u5775\u577B\u5773\u5774\u5762"],["cc40","\u5768\u577D\u590C\u5945\u59B5\u59BA\u59CF\u59CE\u59B2\u59CC\u59C1\u59B6\u59BC\u59C3\u59D6\u59B1\u59BD\u59C0\u59C8\u59B4\u59C7\u5B62\u5B65\u5B93\u5B95\u5C44\u5C47\u5CAE\u5CA4\u5CA0\u5CB5\u5CAF\u5CA8\u5CAC\u5C9F\u5CA3\u5CAD\u5CA2\u5CAA\u5CA7\u5C9D\u5CA5\u5CB6\u5CB0\u5CA6\u5E17\u5E14\u5E19\u5F28\u5F22\u5F23\u5F24\u5F54\u5F82\u5F7E\u5F7D\u5FDE\u5FE5\u602D\u6026\u6019\u6032\u600B"],["cca1","\u6034\u600A\u6017\u6033\u601A\u601E\u602C\u6022\u600D\u6010\u602E\u6013\u6011\u600C\u6009\u601C\u6214\u623D\u62AD\u62B4\u62D1\u62BE\u62AA\u62B6\u62CA\u62AE\u62B3\u62AF\u62BB\u62A9\u62B0\u62B8\u653D\u65A8\u65BB\u6609\u65FC\u6604\u6612\u6608\u65FB\u6603\u660B\u660D\u6605\u65FD\u6611\u6610\u66F6\u670A\u6785\u676C\u678E\u6792\u6776\u677B\u6798\u6786\u6784\u6774\u678D\u678C\u677A\u679F\u6791\u6799\u6783\u677D\u6781\u6778\u6779\u6794\u6B25\u6B80\u6B7E\u6BDE\u6C1D\u6C93\u6CEC\u6CEB\u6CEE\u6CD9\u6CB6\u6CD4\u6CAD\u6CE7\u6CB7\u6CD0\u6CC2\u6CBA\u6CC3\u6CC6\u6CED\u6CF2"],["cd40","\u6CD2\u6CDD\u6CB4\u6C8A\u6C9D\u6C80\u6CDE\u6CC0\u6D30\u6CCD\u6CC7\u6CB0\u6CF9\u6CCF\u6CE9\u6CD1\u7094\u7098\u7085\u7093\u7086\u7084\u7091\u7096\u7082\u709A\u7083\u726A\u72D6\u72CB\u72D8\u72C9\u72DC\u72D2\u72D4\u72DA\u72CC\u72D1\u73A4\u73A1\u73AD\u73A6\u73A2\u73A0\u73AC\u739D\u74DD\u74E8\u753F\u7540\u753E\u758C\u7598\u76AF\u76F3\u76F1\u76F0\u76F5\u77F8\u77FC\u77F9\u77FB\u77FA"],["cda1","\u77F7\u7942\u793F\u79C5\u7A78\u7A7B\u7AFB\u7C75\u7CFD\u8035\u808F\u80AE\u80A3\u80B8\u80B5\u80AD\u8220\u82A0\u82C0\u82AB\u829A\u8298\u829B\u82B5\u82A7\u82AE\u82BC\u829E\u82BA\u82B4\u82A8\u82A1\u82A9\u82C2\u82A4\u82C3\u82B6\u82A2\u8670\u866F\u866D\u866E\u8C56\u8FD2\u8FCB\u8FD3\u8FCD\u8FD6\u8FD5\u8FD7\u90B2\u90B4\u90AF\u90B3\u90B0\u9639\u963D\u963C\u963A\u9643\u4FCD\u4FC5\u4FD3\u4FB2\u4FC9\u4FCB\u4FC1\u4FD4\u4FDC\u4FD9\u4FBB\u4FB3\u4FDB\u4FC7\u4FD6\u4FBA\u4FC0\u4FB9\u4FEC\u5244\u5249\u52C0\u52C2\u533D\u537C\u5397\u5396\u5399\u5398\u54BA\u54A1\u54AD\u54A5\u54CF"],["ce40","\u54C3\u830D\u54B7\u54AE\u54D6\u54B6\u54C5\u54C6\u54A0\u5470\u54BC\u54A2\u54BE\u5472\u54DE\u54B0\u57B5\u579E\u579F\u57A4\u578C\u5797\u579D\u579B\u5794\u5798\u578F\u5799\u57A5\u579A\u5795\u58F4\u590D\u5953\u59E1\u59DE\u59EE\u5A00\u59F1\u59DD\u59FA\u59FD\u59FC\u59F6\u59E4\u59F2\u59F7\u59DB\u59E9\u59F3\u59F5\u59E0\u59FE\u59F4\u59ED\u5BA8\u5C4C\u5CD0\u5CD8\u5CCC\u5CD7\u5CCB\u5CDB"],["cea1","\u5CDE\u5CDA\u5CC9\u5CC7\u5CCA\u5CD6\u5CD3\u5CD4\u5CCF\u5CC8\u5CC6\u5CCE\u5CDF\u5CF8\u5DF9\u5E21\u5E22\u5E23\u5E20\u5E24\u5EB0\u5EA4\u5EA2\u5E9B\u5EA3\u5EA5\u5F07\u5F2E\u5F56\u5F86\u6037\u6039\u6054\u6072\u605E\u6045\u6053\u6047\u6049\u605B\u604C\u6040\u6042\u605F\u6024\u6044\u6058\u6066\u606E\u6242\u6243\u62CF\u630D\u630B\u62F5\u630E\u6303\u62EB\u62F9\u630F\u630C\u62F8\u62F6\u6300\u6313\u6314\u62FA\u6315\u62FB\u62F0\u6541\u6543\u65AA\u65BF\u6636\u6621\u6632\u6635\u661C\u6626\u6622\u6633\u662B\u663A\u661D\u6634\u6639\u662E\u670F\u6710\u67C1\u67F2\u67C8\u67BA"],["cf40","\u67DC\u67BB\u67F8\u67D8\u67C0\u67B7\u67C5\u67EB\u67E4\u67DF\u67B5\u67CD\u67B3\u67F7\u67F6\u67EE\u67E3\u67C2\u67B9\u67CE\u67E7\u67F0\u67B2\u67FC\u67C6\u67ED\u67CC\u67AE\u67E6\u67DB\u67FA\u67C9\u67CA\u67C3\u67EA\u67CB\u6B28\u6B82\u6B84\u6BB6\u6BD6\u6BD8\u6BE0\u6C20\u6C21\u6D28\u6D34\u6D2D\u6D1F\u6D3C\u6D3F\u6D12\u6D0A\u6CDA\u6D33\u6D04\u6D19\u6D3A\u6D1A\u6D11\u6D00\u6D1D\u6D42"],["cfa1","\u6D01\u6D18\u6D37\u6D03\u6D0F\u6D40\u6D07\u6D20\u6D2C\u6D08\u6D22\u6D09\u6D10\u70B7\u709F\u70BE\u70B1\u70B0\u70A1\u70B4\u70B5\u70A9\u7241\u7249\u724A\u726C\u7270\u7273\u726E\u72CA\u72E4\u72E8\u72EB\u72DF\u72EA\u72E6\u72E3\u7385\u73CC\u73C2\u73C8\u73C5\u73B9\u73B6\u73B5\u73B4\u73EB\u73BF\u73C7\u73BE\u73C3\u73C6\u73B8\u73CB\u74EC\u74EE\u752E\u7547\u7548\u75A7\u75AA\u7679\u76C4\u7708\u7703\u7704\u7705\u770A\u76F7\u76FB\u76FA\u77E7\u77E8\u7806\u7811\u7812\u7805\u7810\u780F\u780E\u7809\u7803\u7813\u794A\u794C\u794B\u7945\u7944\u79D5\u79CD\u79CF\u79D6\u79CE\u7A80"],["d040","\u7A7E\u7AD1\u7B00\u7B01\u7C7A\u7C78\u7C79\u7C7F\u7C80\u7C81\u7D03\u7D08\u7D01\u7F58\u7F91\u7F8D\u7FBE\u8007\u800E\u800F\u8014\u8037\u80D8\u80C7\u80E0\u80D1\u80C8\u80C2\u80D0\u80C5\u80E3\u80D9\u80DC\u80CA\u80D5\u80C9\u80CF\u80D7\u80E6\u80CD\u81FF\u8221\u8294\u82D9\u82FE\u82F9\u8307\u82E8\u8300\u82D5\u833A\u82EB\u82D6\u82F4\u82EC\u82E1\u82F2\u82F5\u830C\u82FB\u82F6\u82F0\u82EA"],["d0a1","\u82E4\u82E0\u82FA\u82F3\u82ED\u8677\u8674\u867C\u8673\u8841\u884E\u8867\u886A\u8869\u89D3\u8A04\u8A07\u8D72\u8FE3\u8FE1\u8FEE\u8FE0\u90F1\u90BD\u90BF\u90D5\u90C5\u90BE\u90C7\u90CB\u90C8\u91D4\u91D3\u9654\u964F\u9651\u9653\u964A\u964E\u501E\u5005\u5007\u5013\u5022\u5030\u501B\u4FF5\u4FF4\u5033\u5037\u502C\u4FF6\u4FF7\u5017\u501C\u5020\u5027\u5035\u502F\u5031\u500E\u515A\u5194\u5193\u51CA\u51C4\u51C5\u51C8\u51CE\u5261\u525A\u5252\u525E\u525F\u5255\u5262\u52CD\u530E\u539E\u5526\u54E2\u5517\u5512\u54E7\u54F3\u54E4\u551A\u54FF\u5504\u5508\u54EB\u5511\u5505\u54F1"],["d140","\u550A\u54FB\u54F7\u54F8\u54E0\u550E\u5503\u550B\u5701\u5702\u57CC\u5832\u57D5\u57D2\u57BA\u57C6\u57BD\u57BC\u57B8\u57B6\u57BF\u57C7\u57D0\u57B9\u57C1\u590E\u594A\u5A19\u5A16\u5A2D\u5A2E\u5A15\u5A0F\u5A17\u5A0A\u5A1E\u5A33\u5B6C\u5BA7\u5BAD\u5BAC\u5C03\u5C56\u5C54\u5CEC\u5CFF\u5CEE\u5CF1\u5CF7\u5D00\u5CF9\u5E29\u5E28\u5EA8\u5EAE\u5EAA\u5EAC\u5F33\u5F30\u5F67\u605D\u605A\u6067"],["d1a1","\u6041\u60A2\u6088\u6080\u6092\u6081\u609D\u6083\u6095\u609B\u6097\u6087\u609C\u608E\u6219\u6246\u62F2\u6310\u6356\u632C\u6344\u6345\u6336\u6343\u63E4\u6339\u634B\u634A\u633C\u6329\u6341\u6334\u6358\u6354\u6359\u632D\u6347\u6333\u635A\u6351\u6338\u6357\u6340\u6348\u654A\u6546\u65C6\u65C3\u65C4\u65C2\u664A\u665F\u6647\u6651\u6712\u6713\u681F\u681A\u6849\u6832\u6833\u683B\u684B\u684F\u6816\u6831\u681C\u6835\u682B\u682D\u682F\u684E\u6844\u6834\u681D\u6812\u6814\u6826\u6828\u682E\u684D\u683A\u6825\u6820\u6B2C\u6B2F\u6B2D\u6B31\u6B34\u6B6D\u8082\u6B88\u6BE6\u6BE4"],["d240","\u6BE8\u6BE3\u6BE2\u6BE7\u6C25\u6D7A\u6D63\u6D64\u6D76\u6D0D\u6D61\u6D92\u6D58\u6D62\u6D6D\u6D6F\u6D91\u6D8D\u6DEF\u6D7F\u6D86\u6D5E\u6D67\u6D60\u6D97\u6D70\u6D7C\u6D5F\u6D82\u6D98\u6D2F\u6D68\u6D8B\u6D7E\u6D80\u6D84\u6D16\u6D83\u6D7B\u6D7D\u6D75\u6D90\u70DC\u70D3\u70D1\u70DD\u70CB\u7F39\u70E2\u70D7\u70D2\u70DE\u70E0\u70D4\u70CD\u70C5\u70C6\u70C7\u70DA\u70CE\u70E1\u7242\u7278"],["d2a1","\u7277\u7276\u7300\u72FA\u72F4\u72FE\u72F6\u72F3\u72FB\u7301\u73D3\u73D9\u73E5\u73D6\u73BC\u73E7\u73E3\u73E9\u73DC\u73D2\u73DB\u73D4\u73DD\u73DA\u73D7\u73D8\u73E8\u74DE\u74DF\u74F4\u74F5\u7521\u755B\u755F\u75B0\u75C1\u75BB\u75C4\u75C0\u75BF\u75B6\u75BA\u768A\u76C9\u771D\u771B\u7710\u7713\u7712\u7723\u7711\u7715\u7719\u771A\u7722\u7727\u7823\u782C\u7822\u7835\u782F\u7828\u782E\u782B\u7821\u7829\u7833\u782A\u7831\u7954\u795B\u794F\u795C\u7953\u7952\u7951\u79EB\u79EC\u79E0\u79EE\u79ED\u79EA\u79DC\u79DE\u79DD\u7A86\u7A89\u7A85\u7A8B\u7A8C\u7A8A\u7A87\u7AD8\u7B10"],["d340","\u7B04\u7B13\u7B05\u7B0F\u7B08\u7B0A\u7B0E\u7B09\u7B12\u7C84\u7C91\u7C8A\u7C8C\u7C88\u7C8D\u7C85\u7D1E\u7D1D\u7D11\u7D0E\u7D18\u7D16\u7D13\u7D1F\u7D12\u7D0F\u7D0C\u7F5C\u7F61\u7F5E\u7F60\u7F5D\u7F5B\u7F96\u7F92\u7FC3\u7FC2\u7FC0\u8016\u803E\u8039\u80FA\u80F2\u80F9\u80F5\u8101\u80FB\u8100\u8201\u822F\u8225\u8333\u832D\u8344\u8319\u8351\u8325\u8356\u833F\u8341\u8326\u831C\u8322"],["d3a1","\u8342\u834E\u831B\u832A\u8308\u833C\u834D\u8316\u8324\u8320\u8337\u832F\u8329\u8347\u8345\u834C\u8353\u831E\u832C\u834B\u8327\u8348\u8653\u8652\u86A2\u86A8\u8696\u868D\u8691\u869E\u8687\u8697\u8686\u868B\u869A\u8685\u86A5\u8699\u86A1\u86A7\u8695\u8698\u868E\u869D\u8690\u8694\u8843\u8844\u886D\u8875\u8876\u8872\u8880\u8871\u887F\u886F\u8883\u887E\u8874\u887C\u8A12\u8C47\u8C57\u8C7B\u8CA4\u8CA3\u8D76\u8D78\u8DB5\u8DB7\u8DB6\u8ED1\u8ED3\u8FFE\u8FF5\u9002\u8FFF\u8FFB\u9004\u8FFC\u8FF6\u90D6\u90E0\u90D9\u90DA\u90E3\u90DF\u90E5\u90D8\u90DB\u90D7\u90DC\u90E4\u9150"],["d440","\u914E\u914F\u91D5\u91E2\u91DA\u965C\u965F\u96BC\u98E3\u9ADF\u9B2F\u4E7F\u5070\u506A\u5061\u505E\u5060\u5053\u504B\u505D\u5072\u5048\u504D\u5041\u505B\u504A\u5062\u5015\u5045\u505F\u5069\u506B\u5063\u5064\u5046\u5040\u506E\u5073\u5057\u5051\u51D0\u526B\u526D\u526C\u526E\u52D6\u52D3\u532D\u539C\u5575\u5576\u553C\u554D\u5550\u5534\u552A\u5551\u5562\u5536\u5535\u5530\u5552\u5545"],["d4a1","\u550C\u5532\u5565\u554E\u5539\u5548\u552D\u553B\u5540\u554B\u570A\u5707\u57FB\u5814\u57E2\u57F6\u57DC\u57F4\u5800\u57ED\u57FD\u5808\u57F8\u580B\u57F3\u57CF\u5807\u57EE\u57E3\u57F2\u57E5\u57EC\u57E1\u580E\u57FC\u5810\u57E7\u5801\u580C\u57F1\u57E9\u57F0\u580D\u5804\u595C\u5A60\u5A58\u5A55\u5A67\u5A5E\u5A38\u5A35\u5A6D\u5A50\u5A5F\u5A65\u5A6C\u5A53\u5A64\u5A57\u5A43\u5A5D\u5A52\u5A44\u5A5B\u5A48\u5A8E\u5A3E\u5A4D\u5A39\u5A4C\u5A70\u5A69\u5A47\u5A51\u5A56\u5A42\u5A5C\u5B72\u5B6E\u5BC1\u5BC0\u5C59\u5D1E\u5D0B\u5D1D\u5D1A\u5D20\u5D0C\u5D28\u5D0D\u5D26\u5D25\u5D0F"],["d540","\u5D30\u5D12\u5D23\u5D1F\u5D2E\u5E3E\u5E34\u5EB1\u5EB4\u5EB9\u5EB2\u5EB3\u5F36\u5F38\u5F9B\u5F96\u5F9F\u608A\u6090\u6086\u60BE\u60B0\u60BA\u60D3\u60D4\u60CF\u60E4\u60D9\u60DD\u60C8\u60B1\u60DB\u60B7\u60CA\u60BF\u60C3\u60CD\u60C0\u6332\u6365\u638A\u6382\u637D\u63BD\u639E\u63AD\u639D\u6397\u63AB\u638E\u636F\u6387\u6390\u636E\u63AF\u6375\u639C\u636D\u63AE\u637C\u63A4\u633B\u639F"],["d5a1","\u6378\u6385\u6381\u6391\u638D\u6370\u6553\u65CD\u6665\u6661\u665B\u6659\u665C\u6662\u6718\u6879\u6887\u6890\u689C\u686D\u686E\u68AE\u68AB\u6956\u686F\u68A3\u68AC\u68A9\u6875\u6874\u68B2\u688F\u6877\u6892\u687C\u686B\u6872\u68AA\u6880\u6871\u687E\u689B\u6896\u688B\u68A0\u6889\u68A4\u6878\u687B\u6891\u688C\u688A\u687D\u6B36\u6B33\u6B37\u6B38\u6B91\u6B8F\u6B8D\u6B8E\u6B8C\u6C2A\u6DC0\u6DAB\u6DB4\u6DB3\u6E74\u6DAC\u6DE9\u6DE2\u6DB7\u6DF6\u6DD4\u6E00\u6DC8\u6DE0\u6DDF\u6DD6\u6DBE\u6DE5\u6DDC\u6DDD\u6DDB\u6DF4\u6DCA\u6DBD\u6DED\u6DF0\u6DBA\u6DD5\u6DC2\u6DCF\u6DC9"],["d640","\u6DD0\u6DF2\u6DD3\u6DFD\u6DD7\u6DCD\u6DE3\u6DBB\u70FA\u710D\u70F7\u7117\u70F4\u710C\u70F0\u7104\u70F3\u7110\u70FC\u70FF\u7106\u7113\u7100\u70F8\u70F6\u710B\u7102\u710E\u727E\u727B\u727C\u727F\u731D\u7317\u7307\u7311\u7318\u730A\u7308\u72FF\u730F\u731E\u7388\u73F6\u73F8\u73F5\u7404\u7401\u73FD\u7407\u7400\u73FA\u73FC\u73FF\u740C\u740B\u73F4\u7408\u7564\u7563\u75CE\u75D2\u75CF"],["d6a1","\u75CB\u75CC\u75D1\u75D0\u768F\u7689\u76D3\u7739\u772F\u772D\u7731\u7732\u7734\u7733\u773D\u7725\u773B\u7735\u7848\u7852\u7849\u784D\u784A\u784C\u7826\u7845\u7850\u7964\u7967\u7969\u796A\u7963\u796B\u7961\u79BB\u79FA\u79F8\u79F6\u79F7\u7A8F\u7A94\u7A90\u7B35\u7B47\u7B34\u7B25\u7B30\u7B22\u7B24\u7B33\u7B18\u7B2A\u7B1D\u7B31\u7B2B\u7B2D\u7B2F\u7B32\u7B38\u7B1A\u7B23\u7C94\u7C98\u7C96\u7CA3\u7D35\u7D3D\u7D38\u7D36\u7D3A\u7D45\u7D2C\u7D29\u7D41\u7D47\u7D3E\u7D3F\u7D4A\u7D3B\u7D28\u7F63\u7F95\u7F9C\u7F9D\u7F9B\u7FCA\u7FCB\u7FCD\u7FD0\u7FD1\u7FC7\u7FCF\u7FC9\u801F"],["d740","\u801E\u801B\u8047\u8043\u8048\u8118\u8125\u8119\u811B\u812D\u811F\u812C\u811E\u8121\u8115\u8127\u811D\u8122\u8211\u8238\u8233\u823A\u8234\u8232\u8274\u8390\u83A3\u83A8\u838D\u837A\u8373\u83A4\u8374\u838F\u8381\u8395\u8399\u8375\u8394\u83A9\u837D\u8383\u838C\u839D\u839B\u83AA\u838B\u837E\u83A5\u83AF\u8388\u8397\u83B0\u837F\u83A6\u8387\u83AE\u8376\u839A\u8659\u8656\u86BF\u86B7"],["d7a1","\u86C2\u86C1\u86C5\u86BA\u86B0\u86C8\u86B9\u86B3\u86B8\u86CC\u86B4\u86BB\u86BC\u86C3\u86BD\u86BE\u8852\u8889\u8895\u88A8\u88A2\u88AA\u889A\u8891\u88A1\u889F\u8898\u88A7\u8899\u889B\u8897\u88A4\u88AC\u888C\u8893\u888E\u8982\u89D6\u89D9\u89D5\u8A30\u8A27\u8A2C\u8A1E\u8C39\u8C3B\u8C5C\u8C5D\u8C7D\u8CA5\u8D7D\u8D7B\u8D79\u8DBC\u8DC2\u8DB9\u8DBF\u8DC1\u8ED8\u8EDE\u8EDD\u8EDC\u8ED7\u8EE0\u8EE1\u9024\u900B\u9011\u901C\u900C\u9021\u90EF\u90EA\u90F0\u90F4\u90F2\u90F3\u90D4\u90EB\u90EC\u90E9\u9156\u9158\u915A\u9153\u9155\u91EC\u91F4\u91F1\u91F3\u91F8\u91E4\u91F9\u91EA"],["d840","\u91EB\u91F7\u91E8\u91EE\u957A\u9586\u9588\u967C\u966D\u966B\u9671\u966F\u96BF\u976A\u9804\u98E5\u9997\u509B\u5095\u5094\u509E\u508B\u50A3\u5083\u508C\u508E\u509D\u5068\u509C\u5092\u5082\u5087\u515F\u51D4\u5312\u5311\u53A4\u53A7\u5591\u55A8\u55A5\u55AD\u5577\u5645\u55A2\u5593\u5588\u558F\u55B5\u5581\u55A3\u5592\u55A4\u557D\u558C\u55A6\u557F\u5595\u55A1\u558E\u570C\u5829\u5837"],["d8a1","\u5819\u581E\u5827\u5823\u5828\u57F5\u5848\u5825\u581C\u581B\u5833\u583F\u5836\u582E\u5839\u5838\u582D\u582C\u583B\u5961\u5AAF\u5A94\u5A9F\u5A7A\u5AA2\u5A9E\u5A78\u5AA6\u5A7C\u5AA5\u5AAC\u5A95\u5AAE\u5A37\u5A84\u5A8A\u5A97\u5A83\u5A8B\u5AA9\u5A7B\u5A7D\u5A8C\u5A9C\u5A8F\u5A93\u5A9D\u5BEA\u5BCD\u5BCB\u5BD4\u5BD1\u5BCA\u5BCE\u5C0C\u5C30\u5D37\u5D43\u5D6B\u5D41\u5D4B\u5D3F\u5D35\u5D51\u5D4E\u5D55\u5D33\u5D3A\u5D52\u5D3D\u5D31\u5D59\u5D42\u5D39\u5D49\u5D38\u5D3C\u5D32\u5D36\u5D40\u5D45\u5E44\u5E41\u5F58\u5FA6\u5FA5\u5FAB\u60C9\u60B9\u60CC\u60E2\u60CE\u60C4\u6114"],["d940","\u60F2\u610A\u6116\u6105\u60F5\u6113\u60F8\u60FC\u60FE\u60C1\u6103\u6118\u611D\u6110\u60FF\u6104\u610B\u624A\u6394\u63B1\u63B0\u63CE\u63E5\u63E8\u63EF\u63C3\u649D\u63F3\u63CA\u63E0\u63F6\u63D5\u63F2\u63F5\u6461\u63DF\u63BE\u63DD\u63DC\u63C4\u63D8\u63D3\u63C2\u63C7\u63CC\u63CB\u63C8\u63F0\u63D7\u63D9\u6532\u6567\u656A\u6564\u655C\u6568\u6565\u658C\u659D\u659E\u65AE\u65D0\u65D2"],["d9a1","\u667C\u666C\u667B\u6680\u6671\u6679\u666A\u6672\u6701\u690C\u68D3\u6904\u68DC\u692A\u68EC\u68EA\u68F1\u690F\u68D6\u68F7\u68EB\u68E4\u68F6\u6913\u6910\u68F3\u68E1\u6907\u68CC\u6908\u6970\u68B4\u6911\u68EF\u68C6\u6914\u68F8\u68D0\u68FD\u68FC\u68E8\u690B\u690A\u6917\u68CE\u68C8\u68DD\u68DE\u68E6\u68F4\u68D1\u6906\u68D4\u68E9\u6915\u6925\u68C7\u6B39\u6B3B\u6B3F\u6B3C\u6B94\u6B97\u6B99\u6B95\u6BBD\u6BF0\u6BF2\u6BF3\u6C30\u6DFC\u6E46\u6E47\u6E1F\u6E49\u6E88\u6E3C\u6E3D\u6E45\u6E62\u6E2B\u6E3F\u6E41\u6E5D\u6E73\u6E1C\u6E33\u6E4B\u6E40\u6E51\u6E3B\u6E03\u6E2E\u6E5E"],["da40","\u6E68\u6E5C\u6E61\u6E31\u6E28\u6E60\u6E71\u6E6B\u6E39\u6E22\u6E30\u6E53\u6E65\u6E27\u6E78\u6E64\u6E77\u6E55\u6E79\u6E52\u6E66\u6E35\u6E36\u6E5A\u7120\u711E\u712F\u70FB\u712E\u7131\u7123\u7125\u7122\u7132\u711F\u7128\u713A\u711B\u724B\u725A\u7288\u7289\u7286\u7285\u728B\u7312\u730B\u7330\u7322\u7331\u7333\u7327\u7332\u732D\u7326\u7323\u7335\u730C\u742E\u742C\u7430\u742B\u7416"],["daa1","\u741A\u7421\u742D\u7431\u7424\u7423\u741D\u7429\u7420\u7432\u74FB\u752F\u756F\u756C\u75E7\u75DA\u75E1\u75E6\u75DD\u75DF\u75E4\u75D7\u7695\u7692\u76DA\u7746\u7747\u7744\u774D\u7745\u774A\u774E\u774B\u774C\u77DE\u77EC\u7860\u7864\u7865\u785C\u786D\u7871\u786A\u786E\u7870\u7869\u7868\u785E\u7862\u7974\u7973\u7972\u7970\u7A02\u7A0A\u7A03\u7A0C\u7A04\u7A99\u7AE6\u7AE4\u7B4A\u7B3B\u7B44\u7B48\u7B4C\u7B4E\u7B40\u7B58\u7B45\u7CA2\u7C9E\u7CA8\u7CA1\u7D58\u7D6F\u7D63\u7D53\u7D56\u7D67\u7D6A\u7D4F\u7D6D\u7D5C\u7D6B\u7D52\u7D54\u7D69\u7D51\u7D5F\u7D4E\u7F3E\u7F3F\u7F65"],["db40","\u7F66\u7FA2\u7FA0\u7FA1\u7FD7\u8051\u804F\u8050\u80FE\u80D4\u8143\u814A\u8152\u814F\u8147\u813D\u814D\u813A\u81E6\u81EE\u81F7\u81F8\u81F9\u8204\u823C\u823D\u823F\u8275\u833B\u83CF\u83F9\u8423\u83C0\u83E8\u8412\u83E7\u83E4\u83FC\u83F6\u8410\u83C6\u83C8\u83EB\u83E3\u83BF\u8401\u83DD\u83E5\u83D8\u83FF\u83E1\u83CB\u83CE\u83D6\u83F5\u83C9\u8409\u840F\u83DE\u8411\u8406\u83C2\u83F3"],["dba1","\u83D5\u83FA\u83C7\u83D1\u83EA\u8413\u83C3\u83EC\u83EE\u83C4\u83FB\u83D7\u83E2\u841B\u83DB\u83FE\u86D8\u86E2\u86E6\u86D3\u86E3\u86DA\u86EA\u86DD\u86EB\u86DC\u86EC\u86E9\u86D7\u86E8\u86D1\u8848\u8856\u8855\u88BA\u88D7\u88B9\u88B8\u88C0\u88BE\u88B6\u88BC\u88B7\u88BD\u88B2\u8901\u88C9\u8995\u8998\u8997\u89DD\u89DA\u89DB\u8A4E\u8A4D\u8A39\u8A59\u8A40\u8A57\u8A58\u8A44\u8A45\u8A52\u8A48\u8A51\u8A4A\u8A4C\u8A4F\u8C5F\u8C81\u8C80\u8CBA\u8CBE\u8CB0\u8CB9\u8CB5\u8D84\u8D80\u8D89\u8DD8\u8DD3\u8DCD\u8DC7\u8DD6\u8DDC\u8DCF\u8DD5\u8DD9\u8DC8\u8DD7\u8DC5\u8EEF\u8EF7\u8EFA"],["dc40","\u8EF9\u8EE6\u8EEE\u8EE5\u8EF5\u8EE7\u8EE8\u8EF6\u8EEB\u8EF1\u8EEC\u8EF4\u8EE9\u902D\u9034\u902F\u9106\u912C\u9104\u90FF\u90FC\u9108\u90F9\u90FB\u9101\u9100\u9107\u9105\u9103\u9161\u9164\u915F\u9162\u9160\u9201\u920A\u9225\u9203\u921A\u9226\u920F\u920C\u9200\u9212\u91FF\u91FD\u9206\u9204\u9227\u9202\u921C\u9224\u9219\u9217\u9205\u9216\u957B\u958D\u958C\u9590\u9687\u967E\u9688"],["dca1","\u9689\u9683\u9680\u96C2\u96C8\u96C3\u96F1\u96F0\u976C\u9770\u976E\u9807\u98A9\u98EB\u9CE6\u9EF9\u4E83\u4E84\u4EB6\u50BD\u50BF\u50C6\u50AE\u50C4\u50CA\u50B4\u50C8\u50C2\u50B0\u50C1\u50BA\u50B1\u50CB\u50C9\u50B6\u50B8\u51D7\u527A\u5278\u527B\u527C\u55C3\u55DB\u55CC\u55D0\u55CB\u55CA\u55DD\u55C0\u55D4\u55C4\u55E9\u55BF\u55D2\u558D\u55CF\u55D5\u55E2\u55D6\u55C8\u55F2\u55CD\u55D9\u55C2\u5714\u5853\u5868\u5864\u584F\u584D\u5849\u586F\u5855\u584E\u585D\u5859\u5865\u585B\u583D\u5863\u5871\u58FC\u5AC7\u5AC4\u5ACB\u5ABA\u5AB8\u5AB1\u5AB5\u5AB0\u5ABF\u5AC8\u5ABB\u5AC6"],["dd40","\u5AB7\u5AC0\u5ACA\u5AB4\u5AB6\u5ACD\u5AB9\u5A90\u5BD6\u5BD8\u5BD9\u5C1F\u5C33\u5D71\u5D63\u5D4A\u5D65\u5D72\u5D6C\u5D5E\u5D68\u5D67\u5D62\u5DF0\u5E4F\u5E4E\u5E4A\u5E4D\u5E4B\u5EC5\u5ECC\u5EC6\u5ECB\u5EC7\u5F40\u5FAF\u5FAD\u60F7\u6149\u614A\u612B\u6145\u6136\u6132\u612E\u6146\u612F\u614F\u6129\u6140\u6220\u9168\u6223\u6225\u6224\u63C5\u63F1\u63EB\u6410\u6412\u6409\u6420\u6424"],["dda1","\u6433\u6443\u641F\u6415\u6418\u6439\u6437\u6422\u6423\u640C\u6426\u6430\u6428\u6441\u6435\u642F\u640A\u641A\u6440\u6425\u6427\u640B\u63E7\u641B\u642E\u6421\u640E\u656F\u6592\u65D3\u6686\u668C\u6695\u6690\u668B\u668A\u6699\u6694\u6678\u6720\u6966\u695F\u6938\u694E\u6962\u6971\u693F\u6945\u696A\u6939\u6942\u6957\u6959\u697A\u6948\u6949\u6935\u696C\u6933\u693D\u6965\u68F0\u6978\u6934\u6969\u6940\u696F\u6944\u6976\u6958\u6941\u6974\u694C\u693B\u694B\u6937\u695C\u694F\u6951\u6932\u6952\u692F\u697B\u693C\u6B46\u6B45\u6B43\u6B42\u6B48\u6B41\u6B9B\uFA0D\u6BFB\u6BFC"],["de40","\u6BF9\u6BF7\u6BF8\u6E9B\u6ED6\u6EC8\u6E8F\u6EC0\u6E9F\u6E93\u6E94\u6EA0\u6EB1\u6EB9\u6EC6\u6ED2\u6EBD\u6EC1\u6E9E\u6EC9\u6EB7\u6EB0\u6ECD\u6EA6\u6ECF\u6EB2\u6EBE\u6EC3\u6EDC\u6ED8\u6E99\u6E92\u6E8E\u6E8D\u6EA4\u6EA1\u6EBF\u6EB3\u6ED0\u6ECA\u6E97\u6EAE\u6EA3\u7147\u7154\u7152\u7163\u7160\u7141\u715D\u7162\u7172\u7178\u716A\u7161\u7142\u7158\u7143\u714B\u7170\u715F\u7150\u7153"],["dea1","\u7144\u714D\u715A\u724F\u728D\u728C\u7291\u7290\u728E\u733C\u7342\u733B\u733A\u7340\u734A\u7349\u7444\u744A\u744B\u7452\u7451\u7457\u7440\u744F\u7450\u744E\u7442\u7446\u744D\u7454\u74E1\u74FF\u74FE\u74FD\u751D\u7579\u7577\u6983\u75EF\u760F\u7603\u75F7\u75FE\u75FC\u75F9\u75F8\u7610\u75FB\u75F6\u75ED\u75F5\u75FD\u7699\u76B5\u76DD\u7755\u775F\u7760\u7752\u7756\u775A\u7769\u7767\u7754\u7759\u776D\u77E0\u7887\u789A\u7894\u788F\u7884\u7895\u7885\u7886\u78A1\u7883\u7879\u7899\u7880\u7896\u787B\u797C\u7982\u797D\u7979\u7A11\u7A18\u7A19\u7A12\u7A17\u7A15\u7A22\u7A13"],["df40","\u7A1B\u7A10\u7AA3\u7AA2\u7A9E\u7AEB\u7B66\u7B64\u7B6D\u7B74\u7B69\u7B72\u7B65\u7B73\u7B71\u7B70\u7B61\u7B78\u7B76\u7B63\u7CB2\u7CB4\u7CAF\u7D88\u7D86\u7D80\u7D8D\u7D7F\u7D85\u7D7A\u7D8E\u7D7B\u7D83\u7D7C\u7D8C\u7D94\u7D84\u7D7D\u7D92\u7F6D\u7F6B\u7F67\u7F68\u7F6C\u7FA6\u7FA5\u7FA7\u7FDB\u7FDC\u8021\u8164\u8160\u8177\u815C\u8169\u815B\u8162\u8172\u6721\u815E\u8176\u8167\u816F"],["dfa1","\u8144\u8161\u821D\u8249\u8244\u8240\u8242\u8245\u84F1\u843F\u8456\u8476\u8479\u848F\u848D\u8465\u8451\u8440\u8486\u8467\u8430\u844D\u847D\u845A\u8459\u8474\u8473\u845D\u8507\u845E\u8437\u843A\u8434\u847A\u8443\u8478\u8432\u8445\u8429\u83D9\u844B\u842F\u8442\u842D\u845F\u8470\u8439\u844E\u844C\u8452\u846F\u84C5\u848E\u843B\u8447\u8436\u8433\u8468\u847E\u8444\u842B\u8460\u8454\u846E\u8450\u870B\u8704\u86F7\u870C\u86FA\u86D6\u86F5\u874D\u86F8\u870E\u8709\u8701\u86F6\u870D\u8705\u88D6\u88CB\u88CD\u88CE\u88DE\u88DB\u88DA\u88CC\u88D0\u8985\u899B\u89DF\u89E5\u89E4"],["e040","\u89E1\u89E0\u89E2\u89DC\u89E6\u8A76\u8A86\u8A7F\u8A61\u8A3F\u8A77\u8A82\u8A84\u8A75\u8A83\u8A81\u8A74\u8A7A\u8C3C\u8C4B\u8C4A\u8C65\u8C64\u8C66\u8C86\u8C84\u8C85\u8CCC\u8D68\u8D69\u8D91\u8D8C\u8D8E\u8D8F\u8D8D\u8D93\u8D94\u8D90\u8D92\u8DF0\u8DE0\u8DEC\u8DF1\u8DEE\u8DD0\u8DE9\u8DE3\u8DE2\u8DE7\u8DF2\u8DEB\u8DF4\u8F06\u8EFF\u8F01\u8F00\u8F05\u8F07\u8F08\u8F02\u8F0B\u9052\u903F"],["e0a1","\u9044\u9049\u903D\u9110\u910D\u910F\u9111\u9116\u9114\u910B\u910E\u916E\u916F\u9248\u9252\u9230\u923A\u9266\u9233\u9265\u925E\u9283\u922E\u924A\u9246\u926D\u926C\u924F\u9260\u9267\u926F\u9236\u9261\u9270\u9231\u9254\u9263\u9250\u9272\u924E\u9253\u924C\u9256\u9232\u959F\u959C\u959E\u959B\u9692\u9693\u9691\u9697\u96CE\u96FA\u96FD\u96F8\u96F5\u9773\u9777\u9778\u9772\u980F\u980D\u980E\u98AC\u98F6\u98F9\u99AF\u99B2\u99B0\u99B5\u9AAD\u9AAB\u9B5B\u9CEA\u9CED\u9CE7\u9E80\u9EFD\u50E6\u50D4\u50D7\u50E8\u50F3\u50DB\u50EA\u50DD\u50E4\u50D3\u50EC\u50F0\u50EF\u50E3\u50E0"],["e140","\u51D8\u5280\u5281\u52E9\u52EB\u5330\u53AC\u5627\u5615\u560C\u5612\u55FC\u560F\u561C\u5601\u5613\u5602\u55FA\u561D\u5604\u55FF\u55F9\u5889\u587C\u5890\u5898\u5886\u5881\u587F\u5874\u588B\u587A\u5887\u5891\u588E\u5876\u5882\u5888\u587B\u5894\u588F\u58FE\u596B\u5ADC\u5AEE\u5AE5\u5AD5\u5AEA\u5ADA\u5AED\u5AEB\u5AF3\u5AE2\u5AE0\u5ADB\u5AEC\u5ADE\u5ADD\u5AD9\u5AE8\u5ADF\u5B77\u5BE0"],["e1a1","\u5BE3\u5C63\u5D82\u5D80\u5D7D\u5D86\u5D7A\u5D81\u5D77\u5D8A\u5D89\u5D88\u5D7E\u5D7C\u5D8D\u5D79\u5D7F\u5E58\u5E59\u5E53\u5ED8\u5ED1\u5ED7\u5ECE\u5EDC\u5ED5\u5ED9\u5ED2\u5ED4\u5F44\u5F43\u5F6F\u5FB6\u612C\u6128\u6141\u615E\u6171\u6173\u6152\u6153\u6172\u616C\u6180\u6174\u6154\u617A\u615B\u6165\u613B\u616A\u6161\u6156\u6229\u6227\u622B\u642B\u644D\u645B\u645D\u6474\u6476\u6472\u6473\u647D\u6475\u6466\u64A6\u644E\u6482\u645E\u645C\u644B\u6453\u6460\u6450\u647F\u643F\u646C\u646B\u6459\u6465\u6477\u6573\u65A0\u66A1\u66A0\u669F\u6705\u6704\u6722\u69B1\u69B6\u69C9"],["e240","\u69A0\u69CE\u6996\u69B0\u69AC\u69BC\u6991\u6999\u698E\u69A7\u698D\u69A9\u69BE\u69AF\u69BF\u69C4\u69BD\u69A4\u69D4\u69B9\u69CA\u699A\u69CF\u69B3\u6993\u69AA\u69A1\u699E\u69D9\u6997\u6990\u69C2\u69B5\u69A5\u69C6\u6B4A\u6B4D\u6B4B\u6B9E\u6B9F\u6BA0\u6BC3\u6BC4\u6BFE\u6ECE\u6EF5\u6EF1\u6F03\u6F25\u6EF8\u6F37\u6EFB\u6F2E\u6F09\u6F4E\u6F19\u6F1A\u6F27\u6F18\u6F3B\u6F12\u6EED\u6F0A"],["e2a1","\u6F36\u6F73\u6EF9\u6EEE\u6F2D\u6F40\u6F30\u6F3C\u6F35\u6EEB\u6F07\u6F0E\u6F43\u6F05\u6EFD\u6EF6\u6F39\u6F1C\u6EFC\u6F3A\u6F1F\u6F0D\u6F1E\u6F08\u6F21\u7187\u7190\u7189\u7180\u7185\u7182\u718F\u717B\u7186\u7181\u7197\u7244\u7253\u7297\u7295\u7293\u7343\u734D\u7351\u734C\u7462\u7473\u7471\u7475\u7472\u7467\u746E\u7500\u7502\u7503\u757D\u7590\u7616\u7608\u760C\u7615\u7611\u760A\u7614\u76B8\u7781\u777C\u7785\u7782\u776E\u7780\u776F\u777E\u7783\u78B2\u78AA\u78B4\u78AD\u78A8\u787E\u78AB\u789E\u78A5\u78A0\u78AC\u78A2\u78A4\u7998\u798A\u798B\u7996\u7995\u7994\u7993"],["e340","\u7997\u7988\u7992\u7990\u7A2B\u7A4A\u7A30\u7A2F\u7A28\u7A26\u7AA8\u7AAB\u7AAC\u7AEE\u7B88\u7B9C\u7B8A\u7B91\u7B90\u7B96\u7B8D\u7B8C\u7B9B\u7B8E\u7B85\u7B98\u5284\u7B99\u7BA4\u7B82\u7CBB\u7CBF\u7CBC\u7CBA\u7DA7\u7DB7\u7DC2\u7DA3\u7DAA\u7DC1\u7DC0\u7DC5\u7D9D\u7DCE\u7DC4\u7DC6\u7DCB\u7DCC\u7DAF\u7DB9\u7D96\u7DBC\u7D9F\u7DA6\u7DAE\u7DA9\u7DA1\u7DC9\u7F73\u7FE2\u7FE3\u7FE5\u7FDE"],["e3a1","\u8024\u805D\u805C\u8189\u8186\u8183\u8187\u818D\u818C\u818B\u8215\u8497\u84A4\u84A1\u849F\u84BA\u84CE\u84C2\u84AC\u84AE\u84AB\u84B9\u84B4\u84C1\u84CD\u84AA\u849A\u84B1\u84D0\u849D\u84A7\u84BB\u84A2\u8494\u84C7\u84CC\u849B\u84A9\u84AF\u84A8\u84D6\u8498\u84B6\u84CF\u84A0\u84D7\u84D4\u84D2\u84DB\u84B0\u8491\u8661\u8733\u8723\u8728\u876B\u8740\u872E\u871E\u8721\u8719\u871B\u8743\u872C\u8741\u873E\u8746\u8720\u8732\u872A\u872D\u873C\u8712\u873A\u8731\u8735\u8742\u8726\u8727\u8738\u8724\u871A\u8730\u8711\u88F7\u88E7\u88F1\u88F2\u88FA\u88FE\u88EE\u88FC\u88F6\u88FB"],["e440","\u88F0\u88EC\u88EB\u899D\u89A1\u899F\u899E\u89E9\u89EB\u89E8\u8AAB\u8A99\u8A8B\u8A92\u8A8F\u8A96\u8C3D\u8C68\u8C69\u8CD5\u8CCF\u8CD7\u8D96\u8E09\u8E02\u8DFF\u8E0D\u8DFD\u8E0A\u8E03\u8E07\u8E06\u8E05\u8DFE\u8E00\u8E04\u8F10\u8F11\u8F0E\u8F0D\u9123\u911C\u9120\u9122\u911F\u911D\u911A\u9124\u9121\u911B\u917A\u9172\u9179\u9173\u92A5\u92A4\u9276\u929B\u927A\u92A0\u9294\u92AA\u928D"],["e4a1","\u92A6\u929A\u92AB\u9279\u9297\u927F\u92A3\u92EE\u928E\u9282\u9295\u92A2\u927D\u9288\u92A1\u928A\u9286\u928C\u9299\u92A7\u927E\u9287\u92A9\u929D\u928B\u922D\u969E\u96A1\u96FF\u9758\u977D\u977A\u977E\u9783\u9780\u9782\u977B\u9784\u9781\u977F\u97CE\u97CD\u9816\u98AD\u98AE\u9902\u9900\u9907\u999D\u999C\u99C3\u99B9\u99BB\u99BA\u99C2\u99BD\u99C7\u9AB1\u9AE3\u9AE7\u9B3E\u9B3F\u9B60\u9B61\u9B5F\u9CF1\u9CF2\u9CF5\u9EA7\u50FF\u5103\u5130\u50F8\u5106\u5107\u50F6\u50FE\u510B\u510C\u50FD\u510A\u528B\u528C\u52F1\u52EF\u5648\u5642\u564C\u5635\u5641\u564A\u5649\u5646\u5658"],["e540","\u565A\u5640\u5633\u563D\u562C\u563E\u5638\u562A\u563A\u571A\u58AB\u589D\u58B1\u58A0\u58A3\u58AF\u58AC\u58A5\u58A1\u58FF\u5AFF\u5AF4\u5AFD\u5AF7\u5AF6\u5B03\u5AF8\u5B02\u5AF9\u5B01\u5B07\u5B05\u5B0F\u5C67\u5D99\u5D97\u5D9F\u5D92\u5DA2\u5D93\u5D95\u5DA0\u5D9C\u5DA1\u5D9A\u5D9E\u5E69\u5E5D\u5E60\u5E5C\u7DF3\u5EDB\u5EDE\u5EE1\u5F49\u5FB2\u618B\u6183\u6179\u61B1\u61B0\u61A2\u6189"],["e5a1","\u619B\u6193\u61AF\u61AD\u619F\u6192\u61AA\u61A1\u618D\u6166\u61B3\u622D\u646E\u6470\u6496\u64A0\u6485\u6497\u649C\u648F\u648B\u648A\u648C\u64A3\u649F\u6468\u64B1\u6498\u6576\u657A\u6579\u657B\u65B2\u65B3\u66B5\u66B0\u66A9\u66B2\u66B7\u66AA\u66AF\u6A00\u6A06\u6A17\u69E5\u69F8\u6A15\u69F1\u69E4\u6A20\u69FF\u69EC\u69E2\u6A1B\u6A1D\u69FE\u6A27\u69F2\u69EE\u6A14\u69F7\u69E7\u6A40\u6A08\u69E6\u69FB\u6A0D\u69FC\u69EB\u6A09\u6A04\u6A18\u6A25\u6A0F\u69F6\u6A26\u6A07\u69F4\u6A16\u6B51\u6BA5\u6BA3\u6BA2\u6BA6\u6C01\u6C00\u6BFF\u6C02\u6F41\u6F26\u6F7E\u6F87\u6FC6\u6F92"],["e640","\u6F8D\u6F89\u6F8C\u6F62\u6F4F\u6F85\u6F5A\u6F96\u6F76\u6F6C\u6F82\u6F55\u6F72\u6F52\u6F50\u6F57\u6F94\u6F93\u6F5D\u6F00\u6F61\u6F6B\u6F7D\u6F67\u6F90\u6F53\u6F8B\u6F69\u6F7F\u6F95\u6F63\u6F77\u6F6A\u6F7B\u71B2\u71AF\u719B\u71B0\u71A0\u719A\u71A9\u71B5\u719D\u71A5\u719E\u71A4\u71A1\u71AA\u719C\u71A7\u71B3\u7298\u729A\u7358\u7352\u735E\u735F\u7360\u735D\u735B\u7361\u735A\u7359"],["e6a1","\u7362\u7487\u7489\u748A\u7486\u7481\u747D\u7485\u7488\u747C\u7479\u7508\u7507\u757E\u7625\u761E\u7619\u761D\u761C\u7623\u761A\u7628\u761B\u769C\u769D\u769E\u769B\u778D\u778F\u7789\u7788\u78CD\u78BB\u78CF\u78CC\u78D1\u78CE\u78D4\u78C8\u78C3\u78C4\u78C9\u799A\u79A1\u79A0\u799C\u79A2\u799B\u6B76\u7A39\u7AB2\u7AB4\u7AB3\u7BB7\u7BCB\u7BBE\u7BAC\u7BCE\u7BAF\u7BB9\u7BCA\u7BB5\u7CC5\u7CC8\u7CCC\u7CCB\u7DF7\u7DDB\u7DEA\u7DE7\u7DD7\u7DE1\u7E03\u7DFA\u7DE6\u7DF6\u7DF1\u7DF0\u7DEE\u7DDF\u7F76\u7FAC\u7FB0\u7FAD\u7FED\u7FEB\u7FEA\u7FEC\u7FE6\u7FE8\u8064\u8067\u81A3\u819F"],["e740","\u819E\u8195\u81A2\u8199\u8197\u8216\u824F\u8253\u8252\u8250\u824E\u8251\u8524\u853B\u850F\u8500\u8529\u850E\u8509\u850D\u851F\u850A\u8527\u851C\u84FB\u852B\u84FA\u8508\u850C\u84F4\u852A\u84F2\u8515\u84F7\u84EB\u84F3\u84FC\u8512\u84EA\u84E9\u8516\u84FE\u8528\u851D\u852E\u8502\u84FD\u851E\u84F6\u8531\u8526\u84E7\u84E8\u84F0\u84EF\u84F9\u8518\u8520\u8530\u850B\u8519\u852F\u8662"],["e7a1","\u8756\u8763\u8764\u8777\u87E1\u8773\u8758\u8754\u875B\u8752\u8761\u875A\u8751\u875E\u876D\u876A\u8750\u874E\u875F\u875D\u876F\u876C\u877A\u876E\u875C\u8765\u874F\u877B\u8775\u8762\u8767\u8769\u885A\u8905\u890C\u8914\u890B\u8917\u8918\u8919\u8906\u8916\u8911\u890E\u8909\u89A2\u89A4\u89A3\u89ED\u89F0\u89EC\u8ACF\u8AC6\u8AB8\u8AD3\u8AD1\u8AD4\u8AD5\u8ABB\u8AD7\u8ABE\u8AC0\u8AC5\u8AD8\u8AC3\u8ABA\u8ABD\u8AD9\u8C3E\u8C4D\u8C8F\u8CE5\u8CDF\u8CD9\u8CE8\u8CDA\u8CDD\u8CE7\u8DA0\u8D9C\u8DA1\u8D9B\u8E20\u8E23\u8E25\u8E24\u8E2E\u8E15\u8E1B\u8E16\u8E11\u8E19\u8E26\u8E27"],["e840","\u8E14\u8E12\u8E18\u8E13\u8E1C\u8E17\u8E1A\u8F2C\u8F24\u8F18\u8F1A\u8F20\u8F23\u8F16\u8F17\u9073\u9070\u906F\u9067\u906B\u912F\u912B\u9129\u912A\u9132\u9126\u912E\u9185\u9186\u918A\u9181\u9182\u9184\u9180\u92D0\u92C3\u92C4\u92C0\u92D9\u92B6\u92CF\u92F1\u92DF\u92D8\u92E9\u92D7\u92DD\u92CC\u92EF\u92C2\u92E8\u92CA\u92C8\u92CE\u92E6\u92CD\u92D5\u92C9\u92E0\u92DE\u92E7\u92D1\u92D3"],["e8a1","\u92B5\u92E1\u92C6\u92B4\u957C\u95AC\u95AB\u95AE\u95B0\u96A4\u96A2\u96D3\u9705\u9708\u9702\u975A\u978A\u978E\u9788\u97D0\u97CF\u981E\u981D\u9826\u9829\u9828\u9820\u981B\u9827\u98B2\u9908\u98FA\u9911\u9914\u9916\u9917\u9915\u99DC\u99CD\u99CF\u99D3\u99D4\u99CE\u99C9\u99D6\u99D8\u99CB\u99D7\u99CC\u9AB3\u9AEC\u9AEB\u9AF3\u9AF2\u9AF1\u9B46\u9B43\u9B67\u9B74\u9B71\u9B66\u9B76\u9B75\u9B70\u9B68\u9B64\u9B6C\u9CFC\u9CFA\u9CFD\u9CFF\u9CF7\u9D07\u9D00\u9CF9\u9CFB\u9D08\u9D05\u9D04\u9E83\u9ED3\u9F0F\u9F10\u511C\u5113\u5117\u511A\u5111\u51DE\u5334\u53E1\u5670\u5660\u566E"],["e940","\u5673\u5666\u5663\u566D\u5672\u565E\u5677\u571C\u571B\u58C8\u58BD\u58C9\u58BF\u58BA\u58C2\u58BC\u58C6\u5B17\u5B19\u5B1B\u5B21\u5B14\u5B13\u5B10\u5B16\u5B28\u5B1A\u5B20\u5B1E\u5BEF\u5DAC\u5DB1\u5DA9\u5DA7\u5DB5\u5DB0\u5DAE\u5DAA\u5DA8\u5DB2\u5DAD\u5DAF\u5DB4\u5E67\u5E68\u5E66\u5E6F\u5EE9\u5EE7\u5EE6\u5EE8\u5EE5\u5F4B\u5FBC\u619D\u61A8\u6196\u61C5\u61B4\u61C6\u61C1\u61CC\u61BA"],["e9a1","\u61BF\u61B8\u618C\u64D7\u64D6\u64D0\u64CF\u64C9\u64BD\u6489\u64C3\u64DB\u64F3\u64D9\u6533\u657F\u657C\u65A2\u66C8\u66BE\u66C0\u66CA\u66CB\u66CF\u66BD\u66BB\u66BA\u66CC\u6723\u6A34\u6A66\u6A49\u6A67\u6A32\u6A68\u6A3E\u6A5D\u6A6D\u6A76\u6A5B\u6A51\u6A28\u6A5A\u6A3B\u6A3F\u6A41\u6A6A\u6A64\u6A50\u6A4F\u6A54\u6A6F\u6A69\u6A60\u6A3C\u6A5E\u6A56\u6A55\u6A4D\u6A4E\u6A46\u6B55\u6B54\u6B56\u6BA7\u6BAA\u6BAB\u6BC8\u6BC7\u6C04\u6C03\u6C06\u6FAD\u6FCB\u6FA3\u6FC7\u6FBC\u6FCE\u6FC8\u6F5E\u6FC4\u6FBD\u6F9E\u6FCA\u6FA8\u7004\u6FA5\u6FAE\u6FBA\u6FAC\u6FAA\u6FCF\u6FBF\u6FB8"],["ea40","\u6FA2\u6FC9\u6FAB\u6FCD\u6FAF\u6FB2\u6FB0\u71C5\u71C2\u71BF\u71B8\u71D6\u71C0\u71C1\u71CB\u71D4\u71CA\u71C7\u71CF\u71BD\u71D8\u71BC\u71C6\u71DA\u71DB\u729D\u729E\u7369\u7366\u7367\u736C\u7365\u736B\u736A\u747F\u749A\u74A0\u7494\u7492\u7495\u74A1\u750B\u7580\u762F\u762D\u7631\u763D\u7633\u763C\u7635\u7632\u7630\u76BB\u76E6\u779A\u779D\u77A1\u779C\u779B\u77A2\u77A3\u7795\u7799"],["eaa1","\u7797\u78DD\u78E9\u78E5\u78EA\u78DE\u78E3\u78DB\u78E1\u78E2\u78ED\u78DF\u78E0\u79A4\u7A44\u7A48\u7A47\u7AB6\u7AB8\u7AB5\u7AB1\u7AB7\u7BDE\u7BE3\u7BE7\u7BDD\u7BD5\u7BE5\u7BDA\u7BE8\u7BF9\u7BD4\u7BEA\u7BE2\u7BDC\u7BEB\u7BD8\u7BDF\u7CD2\u7CD4\u7CD7\u7CD0\u7CD1\u7E12\u7E21\u7E17\u7E0C\u7E1F\u7E20\u7E13\u7E0E\u7E1C\u7E15\u7E1A\u7E22\u7E0B\u7E0F\u7E16\u7E0D\u7E14\u7E25\u7E24\u7F43\u7F7B\u7F7C\u7F7A\u7FB1\u7FEF\u802A\u8029\u806C\u81B1\u81A6\u81AE\u81B9\u81B5\u81AB\u81B0\u81AC\u81B4\u81B2\u81B7\u81A7\u81F2\u8255\u8256\u8257\u8556\u8545\u856B\u854D\u8553\u8561\u8558"],["eb40","\u8540\u8546\u8564\u8541\u8562\u8544\u8551\u8547\u8563\u853E\u855B\u8571\u854E\u856E\u8575\u8555\u8567\u8560\u858C\u8566\u855D\u8554\u8565\u856C\u8663\u8665\u8664\u879B\u878F\u8797\u8793\u8792\u8788\u8781\u8796\u8798\u8779\u8787\u87A3\u8785\u8790\u8791\u879D\u8784\u8794\u879C\u879A\u8789\u891E\u8926\u8930\u892D\u892E\u8927\u8931\u8922\u8929\u8923\u892F\u892C\u891F\u89F1\u8AE0"],["eba1","\u8AE2\u8AF2\u8AF4\u8AF5\u8ADD\u8B14\u8AE4\u8ADF\u8AF0\u8AC8\u8ADE\u8AE1\u8AE8\u8AFF\u8AEF\u8AFB\u8C91\u8C92\u8C90\u8CF5\u8CEE\u8CF1\u8CF0\u8CF3\u8D6C\u8D6E\u8DA5\u8DA7\u8E33\u8E3E\u8E38\u8E40\u8E45\u8E36\u8E3C\u8E3D\u8E41\u8E30\u8E3F\u8EBD\u8F36\u8F2E\u8F35\u8F32\u8F39\u8F37\u8F34\u9076\u9079\u907B\u9086\u90FA\u9133\u9135\u9136\u9193\u9190\u9191\u918D\u918F\u9327\u931E\u9308\u931F\u9306\u930F\u937A\u9338\u933C\u931B\u9323\u9312\u9301\u9346\u932D\u930E\u930D\u92CB\u931D\u92FA\u9325\u9313\u92F9\u92F7\u9334\u9302\u9324\u92FF\u9329\u9339\u9335\u932A\u9314\u930C"],["ec40","\u930B\u92FE\u9309\u9300\u92FB\u9316\u95BC\u95CD\u95BE\u95B9\u95BA\u95B6\u95BF\u95B5\u95BD\u96A9\u96D4\u970B\u9712\u9710\u9799\u9797\u9794\u97F0\u97F8\u9835\u982F\u9832\u9924\u991F\u9927\u9929\u999E\u99EE\u99EC\u99E5\u99E4\u99F0\u99E3\u99EA\u99E9\u99E7\u9AB9\u9ABF\u9AB4\u9ABB\u9AF6\u9AFA\u9AF9\u9AF7\u9B33\u9B80\u9B85\u9B87\u9B7C\u9B7E\u9B7B\u9B82\u9B93\u9B92\u9B90\u9B7A\u9B95"],["eca1","\u9B7D\u9B88\u9D25\u9D17\u9D20\u9D1E\u9D14\u9D29\u9D1D\u9D18\u9D22\u9D10\u9D19\u9D1F\u9E88\u9E86\u9E87\u9EAE\u9EAD\u9ED5\u9ED6\u9EFA\u9F12\u9F3D\u5126\u5125\u5122\u5124\u5120\u5129\u52F4\u5693\u568C\u568D\u5686\u5684\u5683\u567E\u5682\u567F\u5681\u58D6\u58D4\u58CF\u58D2\u5B2D\u5B25\u5B32\u5B23\u5B2C\u5B27\u5B26\u5B2F\u5B2E\u5B7B\u5BF1\u5BF2\u5DB7\u5E6C\u5E6A\u5FBE\u5FBB\u61C3\u61B5\u61BC\u61E7\u61E0\u61E5\u61E4\u61E8\u61DE\u64EF\u64E9\u64E3\u64EB\u64E4\u64E8\u6581\u6580\u65B6\u65DA\u66D2\u6A8D\u6A96\u6A81\u6AA5\u6A89\u6A9F\u6A9B\u6AA1\u6A9E\u6A87\u6A93\u6A8E"],["ed40","\u6A95\u6A83\u6AA8\u6AA4\u6A91\u6A7F\u6AA6\u6A9A\u6A85\u6A8C\u6A92\u6B5B\u6BAD\u6C09\u6FCC\u6FA9\u6FF4\u6FD4\u6FE3\u6FDC\u6FED\u6FE7\u6FE6\u6FDE\u6FF2\u6FDD\u6FE2\u6FE8\u71E1\u71F1\u71E8\u71F2\u71E4\u71F0\u71E2\u7373\u736E\u736F\u7497\u74B2\u74AB\u7490\u74AA\u74AD\u74B1\u74A5\u74AF\u7510\u7511\u7512\u750F\u7584\u7643\u7648\u7649\u7647\u76A4\u76E9\u77B5\u77AB\u77B2\u77B7\u77B6"],["eda1","\u77B4\u77B1\u77A8\u77F0\u78F3\u78FD\u7902\u78FB\u78FC\u78F2\u7905\u78F9\u78FE\u7904\u79AB\u79A8\u7A5C\u7A5B\u7A56\u7A58\u7A54\u7A5A\u7ABE\u7AC0\u7AC1\u7C05\u7C0F\u7BF2\u7C00\u7BFF\u7BFB\u7C0E\u7BF4\u7C0B\u7BF3\u7C02\u7C09\u7C03\u7C01\u7BF8\u7BFD\u7C06\u7BF0\u7BF1\u7C10\u7C0A\u7CE8\u7E2D\u7E3C\u7E42\u7E33\u9848\u7E38\u7E2A\u7E49\u7E40\u7E47\u7E29\u7E4C\u7E30\u7E3B\u7E36\u7E44\u7E3A\u7F45\u7F7F\u7F7E\u7F7D\u7FF4\u7FF2\u802C\u81BB\u81C4\u81CC\u81CA\u81C5\u81C7\u81BC\u81E9\u825B\u825A\u825C\u8583\u8580\u858F\u85A7\u8595\u85A0\u858B\u85A3\u857B\u85A4\u859A\u859E"],["ee40","\u8577\u857C\u8589\u85A1\u857A\u8578\u8557\u858E\u8596\u8586\u858D\u8599\u859D\u8581\u85A2\u8582\u8588\u8585\u8579\u8576\u8598\u8590\u859F\u8668\u87BE\u87AA\u87AD\u87C5\u87B0\u87AC\u87B9\u87B5\u87BC\u87AE\u87C9\u87C3\u87C2\u87CC\u87B7\u87AF\u87C4\u87CA\u87B4\u87B6\u87BF\u87B8\u87BD\u87DE\u87B2\u8935\u8933\u893C\u893E\u8941\u8952\u8937\u8942\u89AD\u89AF\u89AE\u89F2\u89F3\u8B1E"],["eea1","\u8B18\u8B16\u8B11\u8B05\u8B0B\u8B22\u8B0F\u8B12\u8B15\u8B07\u8B0D\u8B08\u8B06\u8B1C\u8B13\u8B1A\u8C4F\u8C70\u8C72\u8C71\u8C6F\u8C95\u8C94\u8CF9\u8D6F\u8E4E\u8E4D\u8E53\u8E50\u8E4C\u8E47\u8F43\u8F40\u9085\u907E\u9138\u919A\u91A2\u919B\u9199\u919F\u91A1\u919D\u91A0\u93A1\u9383\u93AF\u9364\u9356\u9347\u937C\u9358\u935C\u9376\u9349\u9350\u9351\u9360\u936D\u938F\u934C\u936A\u9379\u9357\u9355\u9352\u934F\u9371\u9377\u937B\u9361\u935E\u9363\u9367\u9380\u934E\u9359\u95C7\u95C0\u95C9\u95C3\u95C5\u95B7\u96AE\u96B0\u96AC\u9720\u971F\u9718\u971D\u9719\u979A\u97A1\u979C"],["ef40","\u979E\u979D\u97D5\u97D4\u97F1\u9841\u9844\u984A\u9849\u9845\u9843\u9925\u992B\u992C\u992A\u9933\u9932\u992F\u992D\u9931\u9930\u9998\u99A3\u99A1\u9A02\u99FA\u99F4\u99F7\u99F9\u99F8\u99F6\u99FB\u99FD\u99FE\u99FC\u9A03\u9ABE\u9AFE\u9AFD\u9B01\u9AFC\u9B48\u9B9A\u9BA8\u9B9E\u9B9B\u9BA6\u9BA1\u9BA5\u9BA4\u9B86\u9BA2\u9BA0\u9BAF\u9D33\u9D41\u9D67\u9D36\u9D2E\u9D2F\u9D31\u9D38\u9D30"],["efa1","\u9D45\u9D42\u9D43\u9D3E\u9D37\u9D40\u9D3D\u7FF5\u9D2D\u9E8A\u9E89\u9E8D\u9EB0\u9EC8\u9EDA\u9EFB\u9EFF\u9F24\u9F23\u9F22\u9F54\u9FA0\u5131\u512D\u512E\u5698\u569C\u5697\u569A\u569D\u5699\u5970\u5B3C\u5C69\u5C6A\u5DC0\u5E6D\u5E6E\u61D8\u61DF\u61ED\u61EE\u61F1\u61EA\u61F0\u61EB\u61D6\u61E9\u64FF\u6504\u64FD\u64F8\u6501\u6503\u64FC\u6594\u65DB\u66DA\u66DB\u66D8\u6AC5\u6AB9\u6ABD\u6AE1\u6AC6\u6ABA\u6AB6\u6AB7\u6AC7\u6AB4\u6AAD\u6B5E\u6BC9\u6C0B\u7007\u700C\u700D\u7001\u7005\u7014\u700E\u6FFF\u7000\u6FFB\u7026\u6FFC\u6FF7\u700A\u7201\u71FF\u71F9\u7203\u71FD\u7376"],["f040","\u74B8\u74C0\u74B5\u74C1\u74BE\u74B6\u74BB\u74C2\u7514\u7513\u765C\u7664\u7659\u7650\u7653\u7657\u765A\u76A6\u76BD\u76EC\u77C2\u77BA\u78FF\u790C\u7913\u7914\u7909\u7910\u7912\u7911\u79AD\u79AC\u7A5F\u7C1C\u7C29\u7C19\u7C20\u7C1F\u7C2D\u7C1D\u7C26\u7C28\u7C22\u7C25\u7C30\u7E5C\u7E50\u7E56\u7E63\u7E58\u7E62\u7E5F\u7E51\u7E60\u7E57\u7E53\u7FB5\u7FB3\u7FF7\u7FF8\u8075\u81D1\u81D2"],["f0a1","\u81D0\u825F\u825E\u85B4\u85C6\u85C0\u85C3\u85C2\u85B3\u85B5\u85BD\u85C7\u85C4\u85BF\u85CB\u85CE\u85C8\u85C5\u85B1\u85B6\u85D2\u8624\u85B8\u85B7\u85BE\u8669\u87E7\u87E6\u87E2\u87DB\u87EB\u87EA\u87E5\u87DF\u87F3\u87E4\u87D4\u87DC\u87D3\u87ED\u87D8\u87E3\u87A4\u87D7\u87D9\u8801\u87F4\u87E8\u87DD\u8953\u894B\u894F\u894C\u8946\u8950\u8951\u8949\u8B2A\u8B27\u8B23\u8B33\u8B30\u8B35\u8B47\u8B2F\u8B3C\u8B3E\u8B31\u8B25\u8B37\u8B26\u8B36\u8B2E\u8B24\u8B3B\u8B3D\u8B3A\u8C42\u8C75\u8C99\u8C98\u8C97\u8CFE\u8D04\u8D02\u8D00\u8E5C\u8E62\u8E60\u8E57\u8E56\u8E5E\u8E65\u8E67"],["f140","\u8E5B\u8E5A\u8E61\u8E5D\u8E69\u8E54\u8F46\u8F47\u8F48\u8F4B\u9128\u913A\u913B\u913E\u91A8\u91A5\u91A7\u91AF\u91AA\u93B5\u938C\u9392\u93B7\u939B\u939D\u9389\u93A7\u938E\u93AA\u939E\u93A6\u9395\u9388\u9399\u939F\u938D\u93B1\u9391\u93B2\u93A4\u93A8\u93B4\u93A3\u93A5\u95D2\u95D3\u95D1\u96B3\u96D7\u96DA\u5DC2\u96DF\u96D8\u96DD\u9723\u9722\u9725\u97AC\u97AE\u97A8\u97AB\u97A4\u97AA"],["f1a1","\u97A2\u97A5\u97D7\u97D9\u97D6\u97D8\u97FA\u9850\u9851\u9852\u98B8\u9941\u993C\u993A\u9A0F\u9A0B\u9A09\u9A0D\u9A04\u9A11\u9A0A\u9A05\u9A07\u9A06\u9AC0\u9ADC\u9B08\u9B04\u9B05\u9B29\u9B35\u9B4A\u9B4C\u9B4B\u9BC7\u9BC6\u9BC3\u9BBF\u9BC1\u9BB5\u9BB8\u9BD3\u9BB6\u9BC4\u9BB9\u9BBD\u9D5C\u9D53\u9D4F\u9D4A\u9D5B\u9D4B\u9D59\u9D56\u9D4C\u9D57\u9D52\u9D54\u9D5F\u9D58\u9D5A\u9E8E\u9E8C\u9EDF\u9F01\u9F00\u9F16\u9F25\u9F2B\u9F2A\u9F29\u9F28\u9F4C\u9F55\u5134\u5135\u5296\u52F7\u53B4\u56AB\u56AD\u56A6\u56A7\u56AA\u56AC\u58DA\u58DD\u58DB\u5912\u5B3D\u5B3E\u5B3F\u5DC3\u5E70"],["f240","\u5FBF\u61FB\u6507\u6510\u650D\u6509\u650C\u650E\u6584\u65DE\u65DD\u66DE\u6AE7\u6AE0\u6ACC\u6AD1\u6AD9\u6ACB\u6ADF\u6ADC\u6AD0\u6AEB\u6ACF\u6ACD\u6ADE\u6B60\u6BB0\u6C0C\u7019\u7027\u7020\u7016\u702B\u7021\u7022\u7023\u7029\u7017\u7024\u701C\u702A\u720C\u720A\u7207\u7202\u7205\u72A5\u72A6\u72A4\u72A3\u72A1\u74CB\u74C5\u74B7\u74C3\u7516\u7660\u77C9\u77CA\u77C4\u77F1\u791D\u791B"],["f2a1","\u7921\u791C\u7917\u791E\u79B0\u7A67\u7A68\u7C33\u7C3C\u7C39\u7C2C\u7C3B\u7CEC\u7CEA\u7E76\u7E75\u7E78\u7E70\u7E77\u7E6F\u7E7A\u7E72\u7E74\u7E68\u7F4B\u7F4A\u7F83\u7F86\u7FB7\u7FFD\u7FFE\u8078\u81D7\u81D5\u8264\u8261\u8263\u85EB\u85F1\u85ED\u85D9\u85E1\u85E8\u85DA\u85D7\u85EC\u85F2\u85F8\u85D8\u85DF\u85E3\u85DC\u85D1\u85F0\u85E6\u85EF\u85DE\u85E2\u8800\u87FA\u8803\u87F6\u87F7\u8809\u880C\u880B\u8806\u87FC\u8808\u87FF\u880A\u8802\u8962\u895A\u895B\u8957\u8961\u895C\u8958\u895D\u8959\u8988\u89B7\u89B6\u89F6\u8B50\u8B48\u8B4A\u8B40\u8B53\u8B56\u8B54\u8B4B\u8B55"],["f340","\u8B51\u8B42\u8B52\u8B57\u8C43\u8C77\u8C76\u8C9A\u8D06\u8D07\u8D09\u8DAC\u8DAA\u8DAD\u8DAB\u8E6D\u8E78\u8E73\u8E6A\u8E6F\u8E7B\u8EC2\u8F52\u8F51\u8F4F\u8F50\u8F53\u8FB4\u9140\u913F\u91B0\u91AD\u93DE\u93C7\u93CF\u93C2\u93DA\u93D0\u93F9\u93EC\u93CC\u93D9\u93A9\u93E6\u93CA\u93D4\u93EE\u93E3\u93D5\u93C4\u93CE\u93C0\u93D2\u93E7\u957D\u95DA\u95DB\u96E1\u9729\u972B\u972C\u9728\u9726"],["f3a1","\u97B3\u97B7\u97B6\u97DD\u97DE\u97DF\u985C\u9859\u985D\u9857\u98BF\u98BD\u98BB\u98BE\u9948\u9947\u9943\u99A6\u99A7\u9A1A\u9A15\u9A25\u9A1D\u9A24\u9A1B\u9A22\u9A20\u9A27\u9A23\u9A1E\u9A1C\u9A14\u9AC2\u9B0B\u9B0A\u9B0E\u9B0C\u9B37\u9BEA\u9BEB\u9BE0\u9BDE\u9BE4\u9BE6\u9BE2\u9BF0\u9BD4\u9BD7\u9BEC\u9BDC\u9BD9\u9BE5\u9BD5\u9BE1\u9BDA\u9D77\u9D81\u9D8A\u9D84\u9D88\u9D71\u9D80\u9D78\u9D86\u9D8B\u9D8C\u9D7D\u9D6B\u9D74\u9D75\u9D70\u9D69\u9D85\u9D73\u9D7B\u9D82\u9D6F\u9D79\u9D7F\u9D87\u9D68\u9E94\u9E91\u9EC0\u9EFC\u9F2D\u9F40\u9F41\u9F4D\u9F56\u9F57\u9F58\u5337\u56B2"],["f440","\u56B5\u56B3\u58E3\u5B45\u5DC6\u5DC7\u5EEE\u5EEF\u5FC0\u5FC1\u61F9\u6517\u6516\u6515\u6513\u65DF\u66E8\u66E3\u66E4\u6AF3\u6AF0\u6AEA\u6AE8\u6AF9\u6AF1\u6AEE\u6AEF\u703C\u7035\u702F\u7037\u7034\u7031\u7042\u7038\u703F\u703A\u7039\u7040\u703B\u7033\u7041\u7213\u7214\u72A8\u737D\u737C\u74BA\u76AB\u76AA\u76BE\u76ED\u77CC\u77CE\u77CF\u77CD\u77F2\u7925\u7923\u7927\u7928\u7924\u7929"],["f4a1","\u79B2\u7A6E\u7A6C\u7A6D\u7AF7\u7C49\u7C48\u7C4A\u7C47\u7C45\u7CEE\u7E7B\u7E7E\u7E81\u7E80\u7FBA\u7FFF\u8079\u81DB\u81D9\u820B\u8268\u8269\u8622\u85FF\u8601\u85FE\u861B\u8600\u85F6\u8604\u8609\u8605\u860C\u85FD\u8819\u8810\u8811\u8817\u8813\u8816\u8963\u8966\u89B9\u89F7\u8B60\u8B6A\u8B5D\u8B68\u8B63\u8B65\u8B67\u8B6D\u8DAE\u8E86\u8E88\u8E84\u8F59\u8F56\u8F57\u8F55\u8F58\u8F5A\u908D\u9143\u9141\u91B7\u91B5\u91B2\u91B3\u940B\u9413\u93FB\u9420\u940F\u9414\u93FE\u9415\u9410\u9428\u9419\u940D\u93F5\u9400\u93F7\u9407\u940E\u9416\u9412\u93FA\u9409\u93F8\u940A\u93FF"],["f540","\u93FC\u940C\u93F6\u9411\u9406\u95DE\u95E0\u95DF\u972E\u972F\u97B9\u97BB\u97FD\u97FE\u9860\u9862\u9863\u985F\u98C1\u98C2\u9950\u994E\u9959\u994C\u994B\u9953\u9A32\u9A34\u9A31\u9A2C\u9A2A\u9A36\u9A29\u9A2E\u9A38\u9A2D\u9AC7\u9ACA\u9AC6\u9B10\u9B12\u9B11\u9C0B\u9C08\u9BF7\u9C05\u9C12\u9BF8\u9C40\u9C07\u9C0E\u9C06\u9C17\u9C14\u9C09\u9D9F\u9D99\u9DA4\u9D9D\u9D92\u9D98\u9D90\u9D9B"],["f5a1","\u9DA0\u9D94\u9D9C\u9DAA\u9D97\u9DA1\u9D9A\u9DA2\u9DA8\u9D9E\u9DA3\u9DBF\u9DA9\u9D96\u9DA6\u9DA7\u9E99\u9E9B\u9E9A\u9EE5\u9EE4\u9EE7\u9EE6\u9F30\u9F2E\u9F5B\u9F60\u9F5E\u9F5D\u9F59\u9F91\u513A\u5139\u5298\u5297\u56C3\u56BD\u56BE\u5B48\u5B47\u5DCB\u5DCF\u5EF1\u61FD\u651B\u6B02\u6AFC\u6B03\u6AF8\u6B00\u7043\u7044\u704A\u7048\u7049\u7045\u7046\u721D\u721A\u7219\u737E\u7517\u766A\u77D0\u792D\u7931\u792F\u7C54\u7C53\u7CF2\u7E8A\u7E87\u7E88\u7E8B\u7E86\u7E8D\u7F4D\u7FBB\u8030\u81DD\u8618\u862A\u8626\u861F\u8623\u861C\u8619\u8627\u862E\u8621\u8620\u8629\u861E\u8625"],["f640","\u8829\u881D\u881B\u8820\u8824\u881C\u882B\u884A\u896D\u8969\u896E\u896B\u89FA\u8B79\u8B78\u8B45\u8B7A\u8B7B\u8D10\u8D14\u8DAF\u8E8E\u8E8C\u8F5E\u8F5B\u8F5D\u9146\u9144\u9145\u91B9\u943F\u943B\u9436\u9429\u943D\u943C\u9430\u9439\u942A\u9437\u942C\u9440\u9431\u95E5\u95E4\u95E3\u9735\u973A\u97BF\u97E1\u9864\u98C9\u98C6\u98C0\u9958\u9956\u9A39\u9A3D\u9A46\u9A44\u9A42\u9A41\u9A3A"],["f6a1","\u9A3F\u9ACD\u9B15\u9B17\u9B18\u9B16\u9B3A\u9B52\u9C2B\u9C1D\u9C1C\u9C2C\u9C23\u9C28\u9C29\u9C24\u9C21\u9DB7\u9DB6\u9DBC\u9DC1\u9DC7\u9DCA\u9DCF\u9DBE\u9DC5\u9DC3\u9DBB\u9DB5\u9DCE\u9DB9\u9DBA\u9DAC\u9DC8\u9DB1\u9DAD\u9DCC\u9DB3\u9DCD\u9DB2\u9E7A\u9E9C\u9EEB\u9EEE\u9EED\u9F1B\u9F18\u9F1A\u9F31\u9F4E\u9F65\u9F64\u9F92\u4EB9\u56C6\u56C5\u56CB\u5971\u5B4B\u5B4C\u5DD5\u5DD1\u5EF2\u6521\u6520\u6526\u6522\u6B0B\u6B08\u6B09\u6C0D\u7055\u7056\u7057\u7052\u721E\u721F\u72A9\u737F\u74D8\u74D5\u74D9\u74D7\u766D\u76AD\u7935\u79B4\u7A70\u7A71\u7C57\u7C5C\u7C59\u7C5B\u7C5A"],["f740","\u7CF4\u7CF1\u7E91\u7F4F\u7F87\u81DE\u826B\u8634\u8635\u8633\u862C\u8632\u8636\u882C\u8828\u8826\u882A\u8825\u8971\u89BF\u89BE\u89FB\u8B7E\u8B84\u8B82\u8B86\u8B85\u8B7F\u8D15\u8E95\u8E94\u8E9A\u8E92\u8E90\u8E96\u8E97\u8F60\u8F62\u9147\u944C\u9450\u944A\u944B\u944F\u9447\u9445\u9448\u9449\u9446\u973F\u97E3\u986A\u9869\u98CB\u9954\u995B\u9A4E\u9A53\u9A54\u9A4C\u9A4F\u9A48\u9A4A"],["f7a1","\u9A49\u9A52\u9A50\u9AD0\u9B19\u9B2B\u9B3B\u9B56\u9B55\u9C46\u9C48\u9C3F\u9C44\u9C39\u9C33\u9C41\u9C3C\u9C37\u9C34\u9C32\u9C3D\u9C36\u9DDB\u9DD2\u9DDE\u9DDA\u9DCB\u9DD0\u9DDC\u9DD1\u9DDF\u9DE9\u9DD9\u9DD8\u9DD6\u9DF5\u9DD5\u9DDD\u9EB6\u9EF0\u9F35\u9F33\u9F32\u9F42\u9F6B\u9F95\u9FA2\u513D\u5299\u58E8\u58E7\u5972\u5B4D\u5DD8\u882F\u5F4F\u6201\u6203\u6204\u6529\u6525\u6596\u66EB\u6B11\u6B12\u6B0F\u6BCA\u705B\u705A\u7222\u7382\u7381\u7383\u7670\u77D4\u7C67\u7C66\u7E95\u826C\u863A\u8640\u8639\u863C\u8631\u863B\u863E\u8830\u8832\u882E\u8833\u8976\u8974\u8973\u89FE"],["f840","\u8B8C\u8B8E\u8B8B\u8B88\u8C45\u8D19\u8E98\u8F64\u8F63\u91BC\u9462\u9455\u945D\u9457\u945E\u97C4\u97C5\u9800\u9A56\u9A59\u9B1E\u9B1F\u9B20\u9C52\u9C58\u9C50\u9C4A\u9C4D\u9C4B\u9C55\u9C59\u9C4C\u9C4E\u9DFB\u9DF7\u9DEF\u9DE3\u9DEB\u9DF8\u9DE4\u9DF6\u9DE1\u9DEE\u9DE6\u9DF2\u9DF0\u9DE2\u9DEC\u9DF4\u9DF3\u9DE8\u9DED\u9EC2\u9ED0\u9EF2\u9EF3\u9F06\u9F1C\u9F38\u9F37\u9F36\u9F43\u9F4F"],["f8a1","\u9F71\u9F70\u9F6E\u9F6F\u56D3\u56CD\u5B4E\u5C6D\u652D\u66ED\u66EE\u6B13\u705F\u7061\u705D\u7060\u7223\u74DB\u74E5\u77D5\u7938\u79B7\u79B6\u7C6A\u7E97\u7F89\u826D\u8643\u8838\u8837\u8835\u884B\u8B94\u8B95\u8E9E\u8E9F\u8EA0\u8E9D\u91BE\u91BD\u91C2\u946B\u9468\u9469\u96E5\u9746\u9743\u9747\u97C7\u97E5\u9A5E\u9AD5\u9B59\u9C63\u9C67\u9C66\u9C62\u9C5E\u9C60\u9E02\u9DFE\u9E07\u9E03\u9E06\u9E05\u9E00\u9E01\u9E09\u9DFF\u9DFD\u9E04\u9EA0\u9F1E\u9F46\u9F74\u9F75\u9F76\u56D4\u652E\u65B8\u6B18\u6B19\u6B17\u6B1A\u7062\u7226\u72AA\u77D8\u77D9\u7939\u7C69\u7C6B\u7CF6\u7E9A"],["f940","\u7E98\u7E9B\u7E99\u81E0\u81E1\u8646\u8647\u8648\u8979\u897A\u897C\u897B\u89FF\u8B98\u8B99\u8EA5\u8EA4\u8EA3\u946E\u946D\u946F\u9471\u9473\u9749\u9872\u995F\u9C68\u9C6E\u9C6D\u9E0B\u9E0D\u9E10\u9E0F\u9E12\u9E11\u9EA1\u9EF5\u9F09\u9F47\u9F78\u9F7B\u9F7A\u9F79\u571E\u7066\u7C6F\u883C\u8DB2\u8EA6\u91C3\u9474\u9478\u9476\u9475\u9A60\u9C74\u9C73\u9C71\u9C75\u9E14\u9E13\u9EF6\u9F0A"],["f9a1","\u9FA4\u7068\u7065\u7CF7\u866A\u883E\u883D\u883F\u8B9E\u8C9C\u8EA9\u8EC9\u974B\u9873\u9874\u98CC\u9961\u99AB\u9A64\u9A66\u9A67\u9B24\u9E15\u9E17\u9F48\u6207\u6B1E\u7227\u864C\u8EA8\u9482\u9480\u9481\u9A69\u9A68\u9B2E\u9E19\u7229\u864B\u8B9F\u9483\u9C79\u9EB7\u7675\u9A6B\u9C7A\u9E1D\u7069\u706A\u9EA4\u9F7E\u9F49\u9F98\u7881\u92B9\u88CF\u58BB\u6052\u7CA7\u5AFA\u2554\u2566\u2557\u2560\u256C\u2563\u255A\u2569\u255D\u2552\u2564\u2555\u255E\u256A\u2561\u2558\u2567\u255B\u2553\u2565\u2556\u255F\u256B\u2562\u2559\u2568\u255C\u2551\u2550\u256D\u256E\u2570\u256F\u2593"]]});var aQ1=o((JV5,MS6)=>{MS6.exports=[["8740","\u43F0\u4C32\u4603\u45A6\u4578\uD85C\uDE67\u4D77\u45B3\uD85F\uDCB1\u4CE2\uD85F\uDCC5\u3B95\u4736\u4744\u4C47\u4C40\uD850\uDEBF\uD84D\uDE17\uD85C\uDF52\uD85B\uDE8B\uD85C\uDCD2\u4C57\uD868\uDF51\u474F\u45DA\u4C85\uD85F\uDC6C\u4D07\u4AA4\u46A1\uD85A\uDF23\u7225\uD856\uDE54\uD846\uDE63\uD84F\uDE06\uD84F\uDF61\u664D\u56FB"],["8767","\u7D95\u591D\uD862\uDFB9\u3DF4\u9734\uD85E\uDFEF\u5BDB\uD847\uDD5E\u5AA4\u3625\uD867\uDEB0\u5AD1\u5BB7\u5CFC\u676E\u8593\uD866\uDD45\u7461\u749D\u3875\uD847\uDD53\uD84D\uDE9E\uD858\uDC21\u3EEC"],["87a1","\uD856\uDCDE\u3AF5\u7AFC\u9F97\uD850\uDD61\uD862\uDD0D\uD84C\uDDEA\uD842\uDE8A\uD84C\uDE5E\u430A\u8484\u9F96\u942F\u4930\u8613\u5896\u974A\u9218\u79D0\u7A32\u6660\u6A29\u889D\u744C\u7BC5\u6782\u7A2C\u524F\u9046\u34E6\u73C4\uD857\uDDB9\u74C6\u9FC7\u57B3\u492F\u544C\u4131\uD84D\uDE8E\u5818\u7A72\uD85E\uDF65\u8B8F\u46AE\uD85B\uDE88\u4181\uD857\uDD99\u7BAE\uD849\uDCBC\u9FC8\uD849\uDCC1\uD849\uDCC9\uD849\uDCCC\u9FC9\u8504\uD84D\uDDBB\u40B4\u9FCA\u44E1\uD86B\uDDFF\u62C1\u706E\u9FCB"],["8840","\u31C0",4,"\uD840\uDD0C\u31C5\uD840\uDCD1\uD840\uDCCD\u31C6\u31C7\uD840\uDCCB\uD847\uDFE8\u31C8\uD840\uDCCA\u31C9\u31CA\u31CB\u31CC\uD840\uDD0E\u31CD\u31CE\u0100\xC1\u01CD\xC0\u0112\xC9\u011A\xC8\u014C\xD3\u01D1\xD2\u0FFF\xCA\u0304\u1EBE\u0FFF\xCA\u030C\u1EC0\xCA\u0101\xE1\u01CE\xE0\u0251\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA"],["88a1","\u01DC\xFC\u0FFF\xEA\u0304\u1EBF\u0FFF\xEA\u030C\u1EC1\xEA\u0261\u23DA\u23DB"],["8940","\uD868\uDFA9\uD844\uDD45"],["8943","\u650A"],["8946","\u4E3D\u6EDD\u9D4E\u91DF"],["894c","\uD85D\uDF35\u6491\u4F1A\u4F28\u4FA8\u5156\u5174\u519C\u51E4\u52A1\u52A8\u533B\u534E\u53D1\u53D8\u56E2\u58F0\u5904\u5907\u5932\u5934\u5B66\u5B9E\u5B9F\u5C9A\u5E86\u603B\u6589\u67FE\u6804\u6865\u6D4E\u70BC\u7535\u7EA4\u7EAC\u7EBA\u7EC7\u7ECF\u7EDF\u7F06\u7F37\u827A\u82CF\u836F\u89C6\u8BBE\u8BE2\u8F66\u8F67\u8F6E"],["89a1","\u7411\u7CFC\u7DCD\u6946\u7AC9\u5227"],["89ab","\u918C\u78B8\u915E\u80BC"],["89b0","\u8D0B\u80F6\uD842\uDDE7"],["89b5","\u809F\u9EC7\u4CCD\u9DC9\u9E0C\u4C3E\uD867\uDDF6\uD85C\uDC0E\u9E0A\uD868\uDD33\u35C1"],["89c1","\u6E9A\u823E\u7519"],["89c5","\u4911\u9A6C\u9A8F\u9F99\u7987\uD861\uDC6C\uD847\uDDCA\uD841\uDDD0\uD84A\uDEE6\u4E24\u4E81\u4E80\u4E87\u4EBF\u4EEB\u4F37\u344C\u4FBD\u3E48\u5003\u5088\u347D\u3493\u34A5\u5186\u5905\u51DB\u51FC\u5205\u4E89\u5279\u5290\u5327\u35C7\u53A9\u3551\u53B0\u3553\u53C2\u5423\u356D\u3572\u3681\u5493\u54A3\u54B4\u54B9\u54D0\u54EF\u5518\u5523\u5528\u3598\u553F\u35A5\u35BF\u55D7\u35C5"],["8a40","\uD85F\uDD84\u5525"],["8a43","\uD843\uDC42\uD843\uDD15\uD854\uDD2B\u5590\uD84B\uDCC6\u39EC\uD840\uDF41\u8E46\uD853\uDDB8\uD865\uDCE5\u4053\uD860\uDCBE\u777A\uD84B\uDC38\u3A34\u47D5\uD860\uDD5D\uD85A\uDDF2\uD853\uDDEA\u64DD\uD843\uDD7C\uD843\uDFB4\uD843\uDCD5\uD844\uDCF4\u648D\u8E7E\uD843\uDE96\uD843\uDC0B\uD843\uDF64\uD84B\uDCA9\uD860\uDE56\uD851\uDCD3"],["8a64","\uD843\uDD46\uD866\uDE4D\uD860\uDCE9\u47F4\uD853\uDEA7\uD84B\uDCC2\u9AB2\u3A67\uD865\uDDF4\u3FED\u3506\uD854\uDEC7\uD865\uDFD4\uD85E\uDCC8\uD84B\uDD44\u9D6E\u9815"],["8a76","\u43D9\uD858\uDCA5\u64B4\u54E3\uD84B\uDD4C\uD84A\uDFCA\uD844\uDC77\u39FB\uD844\uDC6F"],["8aa1","\uD859\uDEDA\uD859\uDF16\uD85E\uDDA0\u64EA\uD854\uDC52\uD843\uDC43\u8E68\uD848\uDDA1\uD862\uDF4C\uD841\uDF31"],["8aac","\u480B\uD840\uDDA9\u3FFA\u5873\uD84B\uDD8D"],["8ab2","\uD851\uDDC8\uD841\uDCFC\uD858\uDC97\uD843\uDF4C\uD843\uDD96\u5579\u40BB\u43BA"],["8abb","\u4AB4\uD84A\uDE66\uD844\uDC9D\u81AA\u98F5\uD843\uDD9C\u6379\u39FE\uD849\uDF75\u8DC0\u56A1\u647C\u3E43"],["8ac9","\uD869\uDE01\uD843\uDE09\uD84A\uDECF\uD84B\uDCC9"],["8ace","\uD844\uDCC8\uD84E\uDDC2\u3992\u3A06\uD860\uDE9B\u3578\uD857\uDE49\uD848\uDCC7\u5652\uD843\uDF31\uD84B\uDCB2\uD865\uDF20\u34BC\u6C3D\uD853\uDE3B"],["8adf","\uD85D\uDD74\uD84B\uDE8B\uD848\uDE08\uD869\uDE5B\uD863\uDCCD\uD843\uDE7A\uD843\uDC34\uD85A\uDC1C\u7F93\uD844\uDCCF\uD84A\uDC03\uD84A\uDD39\u35FB\uD854\uDDE3\uD843\uDE8C\uD843\uDF8D\uD843\uDEAA\u3F93\uD843\uDF30\uD843\uDD47\uD844\uDD4F\uD843\uDE4C"],["8af6","\uD843\uDEAB\uD842\uDFA9\uD843\uDD48\uD844\uDCC0\uD844\uDD3D\u3FF9\uD849\uDE96\u6432\uD843\uDFAD"],["8b40","\uD84C\uDFF4\uD85D\uDE39\uD84A\uDFCE\uD843\uDD7E\uD843\uDD7F\uD84B\uDC51\uD84B\uDC55\u3A18\uD843\uDE98\uD844\uDCC7\uD843\uDF2E\uD869\uDE32\uD85A\uDF50\uD863\uDCD2\uD863\uDD99\uD863\uDCCA\u95AA\u54CC\u82C4\u55B9"],["8b55","\uD867\uDEC3\u9C26\u9AB6\uD85D\uDF5E\uD84B\uDDEE\u7140\u816D\u80EC\u5C1C\uD859\uDD72\u8134\u3797\u535F\uD860\uDCBD\u91B6\uD843\uDEFA\uD843\uDE0F\uD843\uDE77\uD843\uDEFB\u35DD\uD853\uDDEB\u3609\uD843\uDCD6\u56AF\uD849\uDFB5\uD844\uDCC9\uD843\uDE10\uD843\uDE78\uD844\uDC78\uD844\uDD48\uD860\uDE07\uD845\uDC55\uD843\uDE79\uD853\uDE50\uD84B\uDDA4\u5A54\uD844\uDC1D\uD844\uDC1E\uD844\uDCF5\uD844\uDCF6\u579C\uD843\uDE11"],["8ba1","\uD85D\uDE94\uD860\uDECD\uD843\uDFB5\uD843\uDE7B\uD854\uDD7E\u3703\uD843\uDFB6\uD844\uDD80\uD854\uDED8\uD868\uDEBD\uD852\uDDDA\uD846\uDC3A\uD850\uDD77\uD860\uDE7C\u5899\u5268\u361A\uD855\uDF3D\u7BB2\u5B68\u4800\u4B2C\u9F27\u49E7\u9C1F\u9B8D\uD856\uDF74\uD84C\uDD3D\u55FB\u35F2\u5689\u4E28\u5902\uD846\uDFC1\uD87E\uDC78\u9751\uD840\uDC86\u4E5B\u4EBB\u353E\u5C23\u5F51\u5FC4\u38FA\u624C\u6535\u6B7A\u6C35\u6C3A\u706C\u722B\u4E2C\u72AD\uD852\uDCE9\u7F52\u793B\u7CF9\u7F53\uD858\uDE6A\u34C1"],["8bde","\uD858\uDF4B\u8002\u8080\uD859\uDE12\uD85A\uDD51\u535D\u8864\u89C1\uD85E\uDCB2\u8BA0\u8D1D\u9485\u9578\u957F\u95E8\uD863\uDE0F\u97E6\u9875\u98CE\u98DE\u9963\uD866\uDC10\u9C7C\u9E1F\u9EC4\u6B6F\uF907\u4E37\uD840\uDC87\u961D\u6237\u94A2"],["8c40","\u503B\u6DFE\uD867\uDC73\u9FA6\u3DC9\u888F\uD850\uDD4E\u7077\u5CF5\u4B20\uD854\uDDCD\u3559\uD857\uDD30\u6122\uD862\uDE32\u8FA7\u91F6\u7191\u6719\u73BA\uD84C\uDE81\uD868\uDD07\u3C8B\uD846\uDD80\u4B10\u78E4\u7402\u51AE\uD861\uDF0F\u4009\u6A63\uD868\uDEBA\u4223\u860F\uD842\uDE6F\u7A2A\uD866\uDD47\uD862\uDEEA\u9755\u704D\u5324\uD848\uDC7E\u93F4\u76D9\uD862\uDDE3\u9FA7\u77DD\u4EA3\u4FF0\u50BC\u4E2F\u4F17\u9FA8\u5434\u7D8B\u5892\u58D0\uD847\uDDB6\u5E92\u5E99\u5FC2\uD849\uDF12\u658B"],["8ca1","\uD84C\uDFF9\u6919\u6A43\uD84F\uDC63\u6CFF"],["8ca7","\u7200\uD851\uDD05\u738C\u3EDB\uD852\uDE13\u5B15\u74B9\u8B83\uD857\uDCA4\uD855\uDE95\u7A93\u7BEC\u7CC3\u7E6C\u82F8\u8597\u9FA9\u8890\u9FAA\u8EB9\u9FAB\u8FCF\u855F\u99E0\u9221\u9FAC\uD863\uDDB9\uD845\uDC3F\u4071\u42A2\u5A1A"],["8cc9","\u9868\u676B\u4276\u573D"],["8cce","\u85D6\uD852\uDD7B\u82BF\uD85C\uDD0D\u4C81\uD85B\uDD74\u5D7B\uD85A\uDF15\uD85B\uDFBE\u9FAD\u9FAE\u5B96\u9FAF\u66E7\u7E5B\u6E57\u79CA\u3D88\u44C3\uD84C\uDE56\uD849\uDF96\u439A\u4536"],["8ce6","\u5CD5\uD84E\uDF1A\u8AF9\u5C78\u3D12\uD84D\uDD51\u5D78\u9FB2\u7157\u4558\uD850\uDCEC\uD847\uDE23\u4C77\u3978\u344A\uD840\uDDA4\uD85B\uDC41\u8ACC\u4FB4\uD840\uDE39\u59BF\u816C\u9856\uD866\uDCFA\u5F3B"],["8d40","\uD842\uDF9F"],["8d42","\uD848\uDDC1\uD862\uDD6D\u4102\u46BB\uD864\uDC79\u3F07\u9FB3\uD868\uDDB5\u40F8\u37D6\u46F7\uD85B\uDC46\u417C\uD861\uDEB2\uD85C\uDFFF\u456D\u38D4\uD855\uDC9A\u4561\u451B\u4D89\u4C7B\u4D76\u45EA\u3FC8\uD852\uDF0F\u3661\u44DE\u44BD\u41ED\u5D3E\u5D48\u5D56\u3DFC\u380F\u5DA4\u5DB9\u3820\u3838\u5E42\u5EBD\u5F25\u5F83\u3908\u3914\u393F\u394D\u60D7\u613D\u5CE5\u3989\u61B7\u61B9\u61CF\u39B8\u622C\u6290\u62E5\u6318\u39F8\u56B1"],["8da1","\u3A03\u63E2\u63FB\u6407\u645A\u3A4B\u64C0\u5D15\u5621\u9F9F\u3A97\u6586\u3ABD\u65FF\u6653\u3AF2\u6692\u3B22\u6716\u3B42\u67A4\u6800\u3B58\u684A\u6884\u3B72\u3B71\u3B7B\u6909\u6943\u725C\u6964\u699F\u6985\u3BBC\u69D6\u3BDD\u6A65\u6A74\u6A71\u6A82\u3BEC\u6A99\u3BF2\u6AAB\u6AB5\u6AD4\u6AF6\u6B81\u6BC1\u6BEA\u6C75\u6CAA\u3CCB\u6D02\u6D06\u6D26\u6D81\u3CEF\u6DA4\u6DB1\u6E15\u6E18\u6E29\u6E86\uD862\uDDC0\u6EBB\u6EE2\u6EDA\u9F7F\u6EE8\u6EE9\u6F24\u6F34\u3D46\uD84F\uDF41\u6F81\u6FBE\u3D6A\u3D75\u71B7\u5C99\u3D8A\u702C\u3D91\u7050\u7054\u706F\u707F\u7089\uD840\uDF25\u43C1\u35F1\uD843\uDED8"],["8e40","\uD84F\uDED7\u57BE\uD85B\uDED3\u713E\uD855\uDFE0\u364E\u69A2\uD862\uDFE9\u5B74\u7A49\uD856\uDCE1\uD865\uDCD9\u7A65\u7A7D\uD856\uDDAC\u7ABB\u7AB0\u7AC2\u7AC3\u71D1\uD859\uDC8D\u41CA\u7ADA\u7ADD\u7AEA\u41EF\u54B2\uD857\uDC01\u7B0B\u7B55\u7B29\uD854\uDF0E\uD857\uDCFE\u7BA2\u7B6F\u839C\uD856\uDFB4\uD85B\uDC7F\u7BD0\u8421\u7B92\u7BB8\uD857\uDD20\u3DAD\uD857\uDC65\u8492\u7BFA\u7C06\u7C35\uD857\uDCC1\u7C44\u7C83\uD852\uDC82\u7CA6\u667D\uD851\uDD78\u7CC9\u7CC7\u7CE6\u7C74\u7CF3\u7CF5\u7CCE"],["8ea1","\u7E67\u451D\uD85B\uDE44\u7D5D\uD85B\uDED6\u748D\u7D89\u7DAB\u7135\u7DB3\u7DD2\uD850\uDC57\uD858\uDC29\u7DE4\u3D13\u7DF5\uD845\uDFF9\u7DE5\uD860\uDF6D\u7E1D\uD858\uDD21\uD858\uDD5A\u7E6E\u7E92\u432B\u946C\u7E27\u7F40\u7F41\u7F47\u7936\uD858\uDED0\u99E1\u7F97\uD858\uDF51\u7FA3\uD845\uDE61\uD840\uDC68\u455C\uD84D\uDF66\u4503\uD860\uDF3A\u7FFA\uD859\uDC89\u8005\u8008\u801D\u8028\u802F\uD868\uDC87\uD85B\uDCC3\u803B\u803C\u8061\uD849\uDF14\u4989\uD859\uDE26\uD84F\uDDE3\uD859\uDEE8\u6725\u80A7\uD862\uDE48\u8107\u811A\u58B0\uD849\uDEF6\u6C7F\uD859\uDC98\uD853\uDFB8\u64E7\uD845\uDC8A\u8218\uD846\uDC5E\u6A53\uD852\uDE65\uD852\uDE95\u447A\u8229\uD842\uDF0D\uD85A\uDE52\uD84F\uDD7E\u4FF9\uD845\uDCFD\u84E2\u8362\uD85A\uDF0A\uD852\uDDA7\uD84D\uDD30\uD845\uDF73\uD84F\uDDF8\u82AA\u691B\uD87E\uDD94\u41DB"],["8f40","\u854B\u82D0\u831A\uD843\uDE16\uD845\uDFB4\u36C1\uD84C\uDD7D\uD84D\uDD5A\u827B\u82E2\u8318\uD84F\uDE8B\uD85B\uDDA3\uD85A\uDF05\uD85A\uDF97\uD84D\uDDCE\u3DBF\u831D\u55EC\u8385\u450B\uD85B\uDDA5\u83AC\u83C1\u83D3\u347E\uD85B\uDED4\u6A57\u855A\u3496\uD85B\uDE42\uD84B\uDEEF\u8458\uD856\uDFE4\u8471\u3DD3\u44E4\u6AA7\u844A\uD84F\uDCB5\u7958\u84A8\uD85A\uDF96\uD85B\uDE77\uD85B\uDE43\u84DE\u840F\u8391\u44A0\u8493\u84E4\uD857\uDC91\u4240\uD857\uDCC0\u4543\u8534\u5AF2\uD85B\uDE99\u4527\u8573\u4516\u67BF\u8616"],["8fa1","\uD861\uDE25\uD861\uDE3B\u85C1\uD85C\uDC88\u8602\uD845\uDD82\uD85C\uDCCD\uD87E\uDDB2\u456A\u8628\u3648\uD846\uDCA2\u53F7\uD85C\uDF9A\u867E\u8771\uD868\uDCF8\u87EE\uD84B\uDC27\u87B1\u87DA\u880F\u5661\u866C\u6856\u460F\u8845\u8846\uD85D\uDDE0\uD84F\uDDB9\uD85D\uDDE4\u885E\u889C\u465B\u88B4\u88B5\u63C1\u88C5\u7777\uD85D\uDF0F\u8987\u898A\u89A6\u89A9\u89A7\u89BC\uD862\uDE25\u89E7\uD85E\uDD24\uD85E\uDEBD\u8A9C\u7793\u91FE\u8A90\uD85E\uDE59\u7AE9\uD85E\uDF3A\uD84F\uDF8F\u4713\uD85E\uDF38\u717C\u8B0C\u8B1F\uD855\uDC30\uD855\uDD65\u8B3F\u8B4C\u8B4D\u8AA9\uD852\uDE7A\u8B90\u8B9B\u8AAF\uD845\uDEDF\u4615\u884F\u8C9B\uD85F\uDD54\uD85F\uDD8F\uD87E\uDDD4\u3725\uD85F\uDD53\u8CD6\uD85F\uDD98\uD85F\uDDBD\u8D12\u8D03\uD846\uDD10\u8CDB\u705C\u8D11\uD853\uDCC9\u3ED0\u8D77"],["9040","\u8DA9\uD860\uDC02\uD844\uDC14\uD852\uDD8A\u3B7C\uD860\uDDBC\uD85C\uDD0C\u7AE7\u8EAD\u8EB6\u8EC3\u92D4\u8F19\u8F2D\uD860\uDF65\uD861\uDC12\u8FA5\u9303\uD868\uDE9F\uD842\uDE50\u8FB3\u492A\uD862\uDDDE\uD861\uDD3D\uD84F\uDDBB\u5EF8\uD84C\uDE62\u8FF9\uD868\uDC14\uD861\uDEBC\uD861\uDD01\uD848\uDF25\u3980\uD85B\uDED7\u9037\uD861\uDD3C\uD85E\uDEBE\u9061\uD861\uDD6C\uD861\uDE0B\u90A8\uD861\uDF13\u90C4\uD861\uDEE6\u90AE\u90FD\u9167\u3AF0\u91A9\u91C4\u7CAC\uD862\uDD33\uD847\uDE89\u920E\u6C9F\u9241\u9262\uD855\uDDB9\u92B9\uD862\uDEC6\uD84F\uDC9B\uD862\uDF0C\uD855\uDDDB"],["90a1","\uD843\uDD31\u932C\u936B\uD862\uDEE1\uD862\uDFEB\u708F\u5AC3\uD862\uDEE2\uD862\uDEE5\u4965\u9244\uD862\uDFEC\uD863\uDC39\uD862\uDFFF\u9373\u945B\u8EBC\u9585\u95A6\u9426\u95A0\u6FF6\u42B9\uD849\uDE7A\uD861\uDED8\uD844\uDE7C\uD84F\uDE2E\u49DF\u6C1C\u967B\u9696\u416C\u96A3\uD85B\uDED5\u61DA\u96B6\u78F5\uD862\uDEE0\u96BD\u53CC\u49A1\uD85B\uDCB8\uD840\uDE74\uD859\uDC10\uD864\uDCAF\uD864\uDCE5\uD852\uDED1\uD846\uDD15\uD84C\uDF0A\u9731\u8642\u9736\u4A0F\u453D\u4585\uD852\uDEE9\u7075\u5B41\u971B\u975C\uD864\uDDD5\u9757\u5B4A\uD864\uDDEB\u975F\u9425\u50D0\uD84C\uDCB7\uD84C\uDCBC\u9789\u979F\u97B1\u97BE\u97C0\u97D2\u97E0\uD855\uDC6C\u97EE\u741C\uD865\uDC33\u97FF\u97F5\uD865\uDC1D\uD85E\uDD7A\u4AD1\u9834\u9833\u984B\u9866\u3B0E\uD85C\uDD75\u3D51\uD841\uDE30\uD850\uDD5C"],["9140","\uD855\uDF06\u98CA\u98B7\u98C8\u98C7\u4AFF\uD85B\uDD27\uD845\uDED3\u55B0\u98E1\u98E6\u98EC\u9378\u9939\uD852\uDE29\u4B72\uD866\uDC57\uD866\uDD05\u99F5\u9A0C\u9A3B\u9A10\u9A58\uD855\uDF25\u36C4\uD864\uDCB1\uD866\uDFD5\u9AE0\u9AE2\uD866\uDF05\u9AF4\u4C0E\u9B14\u9B2D\uD861\uDE00\u5034\u9B34\uD85A\uDDA8\u38C3\uD84C\uDC7D\u9B50\u9B40\uD867\uDD3E\u5A45\uD846\uDC63\u9B8E\uD850\uDE4B\u9C02\u9BFF\u9C0C\uD867\uDE68\u9DD4\uD867\uDFB7\uD868\uDD92\uD868\uDDAB\uD868\uDCE1\uD868\uDD23\uD868\uDDDF\u9D7E\u9D83\uD868\uDD34\u9E0E\u6888"],["91a1","\u9DC4\uD848\uDD5B\uD868\uDD93\uD868\uDE20\uD846\uDD3B\uD868\uDE33\u9D39\uD868\uDCB9\uD868\uDEB4\u9E90\u9E95\u9E9E\u9EA2\u4D34\u9EAA\u9EAF\uD850\uDF64\u9EC1\u3B60\u39E5\u3D1D\u4F32\u37BE\uD863\uDC2B\u9F02\u9F08\u4B96\u9424\uD85B\uDDA2\u9F17\u9F16\u9F39\u569F\u568A\u9F45\u99B8\uD864\uDC8B\u97F2\u847F\u9F62\u9F69\u7ADC\u9F8E\u7216\u4BBE\uD852\uDD75\uD852\uDDBB\u7177\uD852\uDDF8\uD850\uDF48\uD852\uDE51\u739E\uD862\uDFDA\uD846\uDCFA\u799F\uD862\uDD7E\uD863\uDE36\u9369\u93F3\uD862\uDE44\u92EC\u9381\u93CB\uD862\uDD6C\uD851\uDCB9\u7217\u3EEB\u7772\u7A43\u70D0\uD851\uDC73\uD850\uDFF8\u717E\uD845\uDFEF\u70A3\uD846\uDCBE\uD84D\uDD99\u3EC7\uD846\uDC85\uD855\uDC2F\uD845\uDFF8\u3722\uD845\uDEFB\uD846\uDC39\u36E1\uD845\uDF74\uD846\uDCD1\uD857\uDF4B\u3723\uD845\uDEC0\u575B\uD852\uDE25\uD844\uDFFE\uD844\uDEA8"],["9240","\uD844\uDFC6\uD845\uDCB6\u8503\uD84D\uDEA6\u8503\u8455\uD852\uDD94\uD85C\uDD65\uD84F\uDE31\uD855\uDD5C\uD84F\uDEFB\uD85C\uDC52\u44F4\uD84D\uDEEE\uD866\uDD9D\uD85B\uDF26\u67F9\u3733\u3C15\u3DE7\u586C\uD846\uDD22\u6810\u4057\uD84D\uDF3F\uD850\uDCE1\uD850\uDC8B\uD850\uDD0F\uD85B\uDC21\u54CB\u569E\uD859\uDEB1\u5692\uD843\uDFDF\uD842\uDFA8\uD843\uDE0D\u93C6\uD862\uDF13\u939C\u4EF8\u512B\u3819\uD851\uDC36\u4EBC\uD841\uDC65\uD840\uDF7F\u4F4B\u4F8A\uD855\uDE51\u5A68\uD840\uDDAB\uD840\uDFCB\u3999\uD840\uDF0A\uD841\uDC14\u3435\u4F29\uD840\uDEC0\uD863\uDEB3\uD840\uDE75\u8ADA\uD840\uDE0C\u4E98"],["92a1","\u50CD\u510D\u4FA2\u4F03\uD852\uDE0E\uD84F\uDE8A\u4F42\u502E\u506C\u5081\u4FCC\u4FE5\u5058\u50FC\u5159\u515B\u515D\u515E\u6E76\uD84D\uDD95\uD84F\uDE39\uD84F\uDEBF\u6D72\uD846\uDC84\uD84F\uDE89\u51A8\u51C3\uD841\uDDE0\u44DD\uD841\uDCA3\uD841\uDC92\uD841\uDC91\u8D7A\uD862\uDE9C\uD841\uDF0E\u5259\u52A4\uD842\uDC73\u52E1\u936E\u467A\u718C\uD850\uDF8C\uD843\uDC20\uD852\uDDAC\uD844\uDCE4\u69D1\uD843\uDE1D\u7479\u3EDE\u7499\u7414\u7456\u7398\u4B8E\uD852\uDEBC\uD850\uDC8D\u53D0\u3584\u720F\uD850\uDCC9\u55B4\uD840\uDF45\u54CD\uD842\uDFC6\u571D\u925D\u96F4\u9366\u57DD\u578D\u577F\u363E\u58CB\u5A99\uD862\uDE46\uD845\uDEFA\uD845\uDF6F\uD845\uDF10\u5A2C\u59B8\u928F\u5A7E\u5ACF\u5A12\uD856\uDD46\uD846\uDDF3\uD846\uDC61\uD850\uDE95\u36F5\u6D05\u7443\u5A21\uD857\uDE83"],["9340","\u5A81\uD862\uDFD7\uD841\uDC13\u93E0\u748C\uD844\uDF03\u7105\u4972\u9408\uD862\uDDFB\u93BD\u37A0\u5C1E\u5C9E\u5E5E\u5E48\uD846\uDD96\uD846\uDD7C\uD84E\uDEEE\u5ECD\u5B4F\uD846\uDD03\uD846\uDD04\u3701\uD846\uDCA0\u36DD\uD845\uDEFE\u36D3\u812A\uD862\uDE47\uD847\uDDBA\uD84D\uDC72\uD862\uDDA8\u5F0C\u5F0E\uD846\uDD27\uD845\uDFAB\u5A6B\uD845\uDF3B\u5B44\u8614\uD85D\uDDFD\u8860\u607E\uD84A\uDC60\uD849\uDE2B\u5FDB\u3EB8\uD849\uDDAF\uD849\uDDBE\uD864\uDC88\uD85B\uDF73\u61C0\uD840\uDC3E\uD840\uDC46\uD849\uDE1B\u6199\u6198\u6075\uD84B\uDC9B\uD84B\uDD07\uD851\uDED4\uD864\uDD4D"],["93a1","\u6471\uD851\uDE65\uD84A\uDF6A\u3A29\uD84A\uDF22\uD84D\uDC50\uD866\uDCEA\uD84B\uDE78\u6337\uD869\uDC5B\u64B6\u6331\u63D1\uD852\uDDE3\uD84B\uDD67\u62A4\uD84B\uDCA1\u643B\u656B\u6972\u3BF4\uD84C\uDC8E\uD84C\uDEAD\uD852\uDD89\uD84C\uDEAB\u550D\uD84C\uDEE0\uD846\uDCD9\uD865\uDC3F\u66CE\uD84C\uDE89\uD84C\uDDB3\u3AE0\u4190\uD855\uDD84\uD862\uDF22\uD855\uDD8F\uD845\uDEFC\uD855\uDD5B\uD855\uDC25\u78EE\uD84C\uDD03\uD846\uDC2A\uD84C\uDE34\u3464\uD84C\uDE0F\uD84C\uDD82\uD850\uDEC9\u668E\uD85B\uDD24\u666B\u4B93\u6630\uD85E\uDC70\uD847\uDDEB\u6663\uD84C\uDED2\uD84C\uDEE1\u661E\uD856\uDC72\u38D1\uD84E\uDC3A\uD84D\uDFBC\u3B99\uD84D\uDFA2\uD84C\uDFFE\u74D0\u3B96\u678F\uD851\uDE2A\u68B6\u681E\u3BC4\u6ABE\u3863\uD84D\uDFD5\uD851\uDC87\u6A33\u6A52\u6AC9\u6B05\uD846\uDD12\u6511\u6898\u6A4C\u3BD7\u6A7A\u6B57\uD84F\uDFC0\uD84F\uDC9A\u93A0\u92F2\uD862\uDFEA\uD862\uDECB"],["9440","\u9289\uD860\uDC1E\uD862\uDDDC\u9467\u6DA5\u6F0B\uD852\uDDEC\u6D67\uD84F\uDF7F\u3D8F\u6E04\uD850\uDC3C\u5A3D\u6E0A\u5847\u6D24\u7842\u713B\uD850\uDF1A\uD850\uDE76\u70F1\u7250\u7287\u7294\uD851\uDF8F\uD851\uDF25\u5179\uD852\uDEA4\uD841\uDDEB\u747A\uD84F\uDEF8\uD84D\uDE5F\uD852\uDE4A\uD852\uDD17\uD857\uDFE1\u3F06\u3EB1\uD852\uDEDF\uD863\uDC23\uD84F\uDF35\u60A7\u3EF3\u74CC\u743C\u9387\u7437\u449F\uD85B\uDDEA\u4551\u7583\u3F63\uD853\uDCD9\uD853\uDD06\u3F58\u7555\u7673\uD869\uDDC6\u3B19\u7468\uD862\uDECC\uD852\uDDAB\uD852\uDD8E\u3AFB"],["94a1","\u3DCD\uD852\uDE4E\u3EFF\uD852\uDDC5\uD852\uDCF3\u91FA\u5732\u9342\uD862\uDEE3\uD846\uDC64\u50DF\uD854\uDE21\uD854\uDDE7\u7778\uD84C\uDE32\u770E\u770F\u777B\uD851\uDE97\uD84D\uDF81\u3A5E\uD852\uDCF0\u7438\u749B\u3EBF\uD852\uDEBA\uD852\uDEC7\u40C8\uD852\uDE96\uD858\uDDAE\u9307\uD855\uDD81\u781E\u788D\u7888\u78D2\u73D0\u7959\uD85D\uDF41\uD855\uDEE3\u410E\u799B\u8496\u79A5\u6A2D\uD84F\uDEFA\u7A3A\u79F4\u416E\uD845\uDEE6\u4132\u9235\u79F1\uD843\uDD4C\uD852\uDD8C\uD840\uDE99\uD84F\uDDBA\uD845\uDF6E\u3597\u556B\u3570\u36AA\uD840\uDDD4\uD843\uDC0D\u7AE2\u5A59\uD849\uDEF5\uD856\uDEAF\uD856\uDE9C\u5A0D\uD840\uDE5B\u78F0\u5A2A\uD856\uDFC6\u7AFE\u41F9\u7C5D\u7C6D\u4211\uD856\uDFB3\uD857\uDEBC\uD857\uDEA6\u7CCD\uD852\uDDF9\uD845\uDFB0\u7C8E\u7C7C\u7CAE\u6AB2\u7DDC\u7E07\u7DD3\u7F4E\uD858\uDE61"],["9540","\uD858\uDD5C\uD85E\uDF48\u7D97\uD857\uDE82\u426A\uD85A\uDF75\uD842\uDD16\u67D6\uD840\uDC4E\uD84D\uDDCF\u57C4\uD859\uDC12\uD858\uDFF8\uD852\uDD62\u7FDD\u7B27\uD842\uDC2C\uD856\uDEE9\uD857\uDD43\u7B0C\uD857\uDE0E\u99E6\u8645\u9A63\u6A1C\uD84D\uDC3F\u39E2\uD852\uDDF7\uD859\uDDAD\u9A1F\uD859\uDDA0\u8480\uD85C\uDD27\uD85B\uDCD1\u44EA\u8137\u4402\u80C6\u8109\u8142\uD859\uDFB4\u98C3\uD85A\uDE42\u8262\u8265\uD85A\uDE51\u8453\uD85B\uDDA7\u8610\uD85C\uDE1B\u5A86\u417F\uD846\uDC40\u5B2B\uD846\uDCA1\u5AE4\uD846\uDCD8\u86A0\uD87E\uDDBC\uD84F\uDD8F\u882D\uD85D\uDC22\u5A02"],["95a1","\u886E\u4F45\u8887\u88BF\u88E6\u8965\u894D\uD855\uDE83\u8954\uD85D\uDF85\uD85D\uDF84\uD862\uDFF5\uD862\uDFD9\uD862\uDF9C\uD862\uDDF9\u3EAD\u84A3\u46F5\u46CF\u37F2\u8A3D\u8A1C\uD865\uDC48\u5F4D\u922B\uD850\uDE84\u65D4\u7129\u70C4\uD846\uDC45\u9D6D\u8C9F\u8CE9\uD85F\uDDDC\u599A\u77C3\u59F0\u436E\u36D4\u8E2A\u8EA7\uD853\uDC09\u8F30\u8F4A\u42F4\u6C58\u6FBB\uD848\uDF21\u489B\u6F79\u6E8B\uD845\uDFDA\u9BE9\u36B5\uD852\uDD2F\u90BB\u9097\u5571\u4906\u91BB\u9404\uD862\uDE4B\u4062\uD862\uDEFC\u9427\uD863\uDC1D\uD863\uDC3B\u84E5\u8A2B\u9599\u95A7\u9597\u9596\uD863\uDD34\u7445\u3EC2\uD852\uDCFF\uD852\uDE42\uD850\uDFEA\u3EE7\uD84C\uDE25\u968F\uD863\uDEE7\uD863\uDE66\uD863\uDE65\u3ECC\uD852\uDDED\uD852\uDE78\uD84F\uDFEE\u7412\u746B\u3EFC\u9741\uD864\uDCB0"],["9640","\u6847\u4A1D\uD864\uDC93\uD855\uDFDF\u975D\u9368\uD862\uDD89\uD863\uDC26\uD862\uDF2F\uD858\uDFBE\u92BA\u5B11\u8B69\u493C\u73F9\uD850\uDE1B\u979B\u9771\u9938\uD843\uDF26\u5DC1\uD862\uDFC5\uD852\uDEB2\u981F\uD865\uDCDA\u92F6\uD865\uDDD7\u91E5\u44C0\uD862\uDF50\uD852\uDE67\uD862\uDF64\u98DC\uD862\uDE45\u3F00\u922A\u4925\u8414\u993B\u994D\uD85E\uDF06\u3DFD\u999B\u4B6F\u99AA\u9A5C\uD862\uDF65\uD856\uDCC8\u6A8F\u9A21\u5AFE\u9A2F\uD866\uDCF1\u4B90\uD866\uDD48\u99BC\u4BBD\u4B97\u937D\u5872\uD844\uDF02\u5822\uD852\uDDB8"],["96a1","\uD845\uDCE8\u7844\uD849\uDF1F\uD84F\uDDB8\u68C5\u3D7D\u9458\u3927\u6150\uD849\uDF81\uD84A\uDD6B\u6107\u9C4F\u9C53\u9C7B\u9C35\u9C10\u9B7F\u9BCF\uD867\uDE2D\u9B9F\uD868\uDDF5\uD868\uDCFE\u9D21\u4CAE\uD850\uDD04\u9E18\u4CB0\u9D0C\uD868\uDDB4\uD868\uDCED\uD868\uDCF3\uD866\uDD2F\u9DA5\u84BD\uD85B\uDE12\uD85B\uDFDF\uD85A\uDF82\u85FC\u4533\uD85B\uDDA4\uD85B\uDE84\uD85B\uDDF0\u8420\u85EE\uD85B\uDE00\uD84D\uDFD7\uD858\uDC64\u79E2\uD84D\uDD9C\uD84D\uDE40\u492D\uD852\uDDDE\u3D62\u93DB\u92BE\u9348\uD840\uDEBF\u78B9\u9277\u944D\u4FE4\u3440\u9064\uD855\uDD5D\u783D\u7854\u78B6\u784B\uD845\uDF57\uD84C\uDDC9\uD852\uDD41\u369A\u4F72\u6FDA\u6FD9\u701E\u701E\u5414\uD850\uDDB5\u57BB\u58F3\u578A\u9D16\u57D7\u7134\u34AF\uD850\uDDAC\u71EB\uD85B\uDC40\uD853\uDF97\u5B28\uD845\uDFB5\uD862\uDE49"],["9740","\u610C\u5ACE\u5A0B\u42BC\uD851\uDC88\u372C\u4B7B\uD862\uDDFC\u93BB\u93B8\uD846\uDCD6\uD843\uDF1D\u8472\uD85B\uDCC0\uD845\uDC13\uD850\uDEFA\uD84B\uDC26\uD850\uDFC1\u5994\uD84F\uDDB7\uD859\uDF41\u7DA8\uD858\uDD5B\uD858\uDCA4\uD852\uDDB9\uD852\uDD8B\uD862\uDDFA\u92E5\u73E2\u3EE9\u74B4\uD862\uDF63\uD846\uDC9F\u3EE1\uD852\uDEB3\u6AD8\u73F3\u73FB\u3ED6\uD852\uDE3E\uD852\uDE94\uD845\uDFD9\uD852\uDE66\uD840\uDFA7\uD845\uDC24\uD852\uDDE5\u7448\uD852\uDD16\u70A5\uD852\uDD76\u9284\u73E6\u935F\uD841\uDCFE\u9331\uD862\uDECE\uD862\uDE16\u9386\uD862\uDFE7\uD855\uDDD5\u4935\uD862\uDE82\u716B"],["97a1","\uD852\uDD43\uD843\uDCFF\u56A4\uD841\uDE1A\uD842\uDFEB\uD843\uDCB8\u5502\u79C4\uD845\uDFFA\u7DFE\uD845\uDEC2\uD852\uDE50\uD846\uDC52\u452E\u9401\u370A\uD862\uDEC0\uD852\uDDAD\u59B0\uD846\uDCBF\uD846\uDC83\uD85D\uDC84\u5AA1\u36E2\uD84F\uDD5B\u36B0\u925F\u5A79\uD862\uDE81\uD846\uDC62\u9374\u3CCD\uD842\uDEB4\u4A96\u398A\u50F4\u3D69\u3D4C\uD844\uDF9C\u7175\u42FB\uD860\uDE18\u6E0F\uD864\uDCE4\u44EB\u6D57\uD85F\uDE4F\u7067\u6CAF\u3CD6\uD84F\uDFED\uD84F\uDE2D\u6E02\u6F0C\u3D6F\uD840\uDFF5\u7551\u36BC\u34C8\u4680\u3EDA\u4871\u59C4\u926E\u493E\u8F41\uD863\uDC1C\uD85A\uDFC0\u5812\u57C8\u36D6\uD845\uDC52\u70FE\uD850\uDF62\uD852\uDE71\uD84B\uDFE3\uD844\uDEB0\uD848\uDFBD\u68B9\u6967\uD844\uDF98\uD84D\uDCE5\uD85E\uDFF4\uD84D\uDEDF\uD862\uDE83\uD84D\uDFD6\uD84C\uDFFA\uD853\uDC9F\u6A1A\uD84D\uDEAD\uD85B\uDCB7\u843E\u44DF\u44CE"],["9840","\uD85B\uDD26\uD85B\uDD51\uD85B\uDC82\uD85B\uDFDE\u6F17\uD85C\uDD09\u833D\uD845\uDF3A\u83ED\uD85B\uDC80\uD85C\uDC53\uD845\uDFDB\u5989\u5A82\uD845\uDFB3\u5A61\u5A71\uD846\uDD05\uD850\uDDFC\u372D\u59EF\uD845\uDF3C\u36C7\u718E\u9390\u669A\uD850\uDEA5\u5A6E\u5A2B\uD850\uDE93\u6A2B\uD84F\uDEF9\uD85D\uDF36\uD851\uDC5B\uD850\uDECA\u711D\uD850\uDE59\uD862\uDDE1\u4FB0\uD85B\uDD28\u5CC2\uD851\uDCCE\uD85F\uDE4D\uD850\uDFBD\u6A0C\uD850\uDE56\uD844\uDF04\u70A6\u7133\uD850\uDFE9\u3DA5\u6CDF\uD87E\uDC25\uD852\uDE4F\u7E65\u59EB\u5D2F\u3DF3\u5F5C\uD852\uDE5D\uD845\uDFDF\u7DA4\u8426"],["98a1","\u5485\uD84E\uDEFA\uD84C\uDF00\uD840\uDE14\u577E\uD842\uDCD5\uD841\uDE19\u3FE5\uD847\uDF9E\uD868\uDEB6\u7003\uD864\uDD5B\u5D70\u738F\u7CD3\uD862\uDE59\uD865\uDC20\u4FC8\u7FE7\u72CD\u7310\uD85E\uDEF4\u7338\u7339\uD855\uDEF6\u7341\u7348\u3EA9\uD85E\uDF18\u906C\u71F5\uD852\uDCF2\u73E1\u81F6\u3ECA\u770C\u3ED1\u6CA2\u56FD\u7419\u741E\u741F\u3EE2\u3EF0\u3EF4\u3EFA\u74D3\u3F0E\u3F53\u7542\u756D\u7572\u758D\u3F7C\u75C8\u75DC\u3FC0\u764D\u3FD7\u7674\u3FDC\u767A\uD853\uDF5C\u7188\u5623\u8980\u5869\u401D\u7743\u4039\u6761\u4045\u35DB\u7798\u406A\u406F\u5C5E\u77BE\u77CB\u58F2\u7818\u70B9\u781C\u40A8\u7839\u7847\u7851\u7866\u8448\uD855\uDD35\u7933\u6803\u7932\u4103"],["9940","\u4109\u7991\u7999\u8FBB\u7A06\u8FBC\u4167\u7A91\u41B2\u7ABC\u8279\u41C4\u7ACF\u7ADB\u41CF\u4E21\u7B62\u7B6C\u7B7B\u7C12\u7C1B\u4260\u427A\u7C7B\u7C9C\u428C\u7CB8\u4294\u7CED\u8F93\u70C0\uD843\uDCCF\u7DCF\u7DD4\u7DD0\u7DFD\u7FAE\u7FB4\u729F\u4397\u8020\u8025\u7B39\u802E\u8031\u8054\u3DCC\u57B4\u70A0\u80B7\u80E9\u43ED\u810C\u732A\u810E\u8112\u7560\u8114\u4401\u3B39\u8156\u8159\u815A"],["99a1","\u4413\u583A\u817C\u8184\u4425\u8193\u442D\u81A5\u57EF\u81C1\u81E4\u8254\u448F\u82A6\u8276\u82CA\u82D8\u82FF\u44B0\u8357\u9669\u698A\u8405\u70F5\u8464\u60E3\u8488\u4504\u84BE\u84E1\u84F8\u8510\u8538\u8552\u453B\u856F\u8570\u85E0\u4577\u8672\u8692\u86B2\u86EF\u9645\u878B\u4606\u4617\u88AE\u88FF\u8924\u8947\u8991\uD85E\uDD67\u8A29\u8A38\u8A94\u8AB4\u8C51\u8CD4\u8CF2\u8D1C\u4798\u585F\u8DC3\u47ED\u4EEE\u8E3A\u55D8\u5754\u8E71\u55F5\u8EB0\u4837\u8ECE\u8EE2\u8EE4\u8EED\u8EF2\u8FB7\u8FC1\u8FCA\u8FCC\u9033\u99C4\u48AD\u98E0\u9213\u491E\u9228\u9258\u926B\u92B1\u92AE\u92BF"],["9a40","\u92E3\u92EB\u92F3\u92F4\u92FD\u9343\u9384\u93AD\u4945\u4951\u9EBF\u9417\u5301\u941D\u942D\u943E\u496A\u9454\u9479\u952D\u95A2\u49A7\u95F4\u9633\u49E5\u67A0\u4A24\u9740\u4A35\u97B2\u97C2\u5654\u4AE4\u60E8\u98B9\u4B19\u98F1\u5844\u990E\u9919\u51B4\u991C\u9937\u9942\u995D\u9962\u4B70\u99C5\u4B9D\u9A3C\u9B0F\u7A83\u9B69\u9B81\u9BDD\u9BF1\u9BF4\u4C6D\u9C20\u376F\uD846\uDFC2\u9D49\u9C3A"],["9aa1","\u9EFE\u5650\u9D93\u9DBD\u9DC0\u9DFC\u94F6\u8FB6\u9E7B\u9EAC\u9EB1\u9EBD\u9EC6\u94DC\u9EE2\u9EF1\u9EF8\u7AC8\u9F44\uD840\uDC94\uD840\uDEB7\uD840\uDFA0\u691A\u94C3\u59AC\uD841\uDCD7\u5840\u94C1\u37B9\uD841\uDDD5\uD841\uDE15\uD841\uDE76\uD845\uDEBA\u5757\u7173\uD842\uDEC2\uD842\uDECD\uD842\uDFBF\u546A\uD87E\uDC3B\uD842\uDFCB\u549E\uD842\uDFFB\uD843\uDC3B\uD843\uDC53\uD843\uDC65\uD843\uDC7C\u60E7\uD843\uDC8D\u567A\uD843\uDCB5\uD843\uDCDD\uD843\uDCED\uD843\uDD6F\uD843\uDDB2\uD843\uDDC8\u6955\u9C2F\u87A5\uD843\uDE04\uD843\uDE0E\uD843\uDED7\uD843\uDF90\uD843\uDF2D\uD843\uDE73\u5C20\uD843\uDFBC\u5E0B\uD844\uDC5C\uD844\uDC4F\uD844\uDC76\u671E\uD844\uDC7B\uD844\uDC88\uD844\uDC96\u3647\uD844\uDCBF\uD844\uDCD3\uD844\uDD2F\uD844\uDD3B\u5364\u84AD\uD844\uDEE3\uD844\uDF75\uD844\uDF36\u8B81\uD845\uDD77\uD845\uDE19\uD845\uDFC3\uD845\uDFC7\u4E78\u70BB\uD846\uDC2D\uD846\uDD6A"],["9b40","\uD846\uDE2D\uD846\uDE45\uD847\uDC2A\uD847\uDC70\uD847\uDCAC\uD847\uDEC8\u62C3\uD847\uDED5\uD847\uDF15\u7198\u6855\uD848\uDC45\u69E9\u36C8\uD848\uDE7C\uD848\uDFD7\uD848\uDFFA\uD849\uDF2A\uD84A\uDC71\uD84A\uDD4F\u82FD\uD84A\uDD67\uD84A\uDD93\uD84A\uDED5\u89A5\uD84A\uDEE8\u8FA0\uD84A\uDF0E\u97B8\uD84A\uDF3F\u9847\u9ABD\uD84B\uDC4C"],["9b62","\uD84B\uDC88\uD84B\uDCB7\uD856\uDFE8\uD84B\uDD08\uD84B\uDD12\uD84B\uDDB7\uD84B\uDD95\uD84B\uDE42\uD84B\uDF74\uD84B\uDFCC\uD84C\uDC33\uD84C\uDC66\uD84C\uDF1F\uD84C\uDFDE\u5FB1\u6648\u66BF\uD85E\uDE79\uD84D\uDD67\uD84D\uDDF3\u7201\uD852\uDDBA\u77D7\uD84D\uDE1A\uD84D\uDF16\u7E87\uD840\uDF46\u58B5\u670E"],["9ba1","\u6918\uD84E\uDEA7\uD85D\uDE57\uD857\uDFE2\uD84F\uDE11\uD84F\uDEB9\uD85D\uDDFE\uD848\uDC9A\u48D0\u4AB8\uD850\uDD19\uD862\uDE9A\uD850\uDEEE\uD850\uDF0D\uD850\uDC3B\uD850\uDF34\uD850\uDF96\uD852\uDE45\uD841\uDDCA\u51D2\uD841\uDE11\u599F\uD847\uDEA8\u3BBE\uD84F\uDCFF\uD851\uDC04\uD851\uDCD6\u5788\uD851\uDE74\u399B\uD851\uDF2F\uD861\uDDE8\uD866\uDDC9\u3762\uD848\uDDC3\u8B5E\uD862\uDF4E\u99D6\uD852\uDC12\uD852\uDCFB\uD852\uDE15\u7209\uD852\uDEC0\uD843\uDC78\u5965\uD853\uDEA5\uD853\uDF86\uD841\uDF79\u8EDA\uD854\uDC2C\u528F\u573F\u7171\uD854\uDE99\uD855\uDC19\uD84F\uDF4A\uD852\uDEA7\u55BC\uD855\uDC46\uD855\uDC6E\uD85A\uDF52\u91D4\u3473\uD855\uDD3F\uD85D\uDE32\uD855\uDD5E\u4718\uD855\uDD62\uD855\uDD66\uD855\uDFC7\uD852\uDD3F\uD856\uDC5D\u5066\u34FB\uD84C\uDFCC\u60DE\uD856\uDD03\u477C\uD862\uDD48\uD856\uDEAE\uD856\uDF89\uD857\uDC06\uD847\uDD90\u57A1\u7151\u6FB6\uD858\uDD02\uD85F\uDC12\u9056\uD858\uDDB2\uD853\uDF9A\u8B62\uD859\uDC02\uD859\uDC4A"],["9c40","\u5D5B\uD85A\uDFF7\u8F36\uD859\uDC84\uD846\uDD1C\u8AEA\uD852\uDDF6\uD859\uDC88\uD84F\uDFEF\uD859\uDD12\u4BC0\uD859\uDDBF\uD859\uDEB5\uD849\uDF1B\u9465\uD855\uDFE1\u6195\u5A27\uD87E\uDCCD\u4FBB\u56B9\uD851\uDD21\uD859\uDEFC\u4E6A\uD852\uDD34\u9656\u6D8F\uD85B\uDCBD\u3618\u8977\uD859\uDF99\uD85A\uDC6E\uD859\uDC11\uD85A\uDC5E\u71DF\uD85A\uDCC7\u7B42\uD864\uDCC0\uD842\uDE11\uD85A\uDD26\u9104\uD85A\uDD39\u7A45\u9DF0\uD85A\uDDFA\u9A26\uD85A\uDE2D\u365F\uD859\uDC69\uD840\uDC21\u7983\uD85A\uDE34\uD85A\uDF5B\u5D2C\uD84D\uDD19\u83CF\uD85A\uDF9D\u46D0\uD85B\uDCA4\u753B\u8865\uD85B\uDDAE\u58B6"],["9ca1","\u371C\uD849\uDD8D\uD85C\uDC4B\uD85C\uDDCD\u3C54\uD85C\uDE80\uD85C\uDE85\u9281\uD848\uDD7A\uD85C\uDE8B\u9330\uD85C\uDEE6\uD852\uDDD0\u6C39\u949F\uD85D\uDC50\uD843\uDEF8\u8827\u88F5\uD84A\uDD26\uD861\uDC73\uD845\uDFB1\u6EB8\uD852\uDE2A\uD846\uDC20\u39A4\u36B9\u5C10\u79E3\u453F\u66B6\uD867\uDCAD\uD866\uDCA4\u8943\uD85D\uDFCC\uD85E\uDC58\u56D6\u40DF\uD845\uDE0A\u39A1\uD84D\uDF2F\uD860\uDCE8\uD844\uDFC5\u71AD\u8366\uD85E\uDDDD\uD864\uDDA8\u5A67\u4CB7\uD85C\uDCAF\uD862\uDDAB\uD85E\uDDFD\uD85E\uDE0A\uD85E\uDF0B\uD85F\uDD66\uD850\uDD7A\u7B43\u797E\uD860\uDC09\u6FB5\uD868\uDEDF\u6A03\uD860\uDF18\u53A2\uD85B\uDE07\u93BF\u6836\u975D\uD860\uDD6F\uD860\uDC23\uD85A\uDDB5\uD844\uDFED\uD84C\uDE2F\uD860\uDC48\u5D85\uD863\uDC30\uD860\uDC83\u5715\u9823\uD862\uDD49\u5DAB\uD852\uDD88\u65BE\u69D5\u53D2\uD852\uDEA5\uD84F\uDF81\u3C11\u6736\uD860\uDC90\uD860\uDCF4\uD860\uDD2E\uD847\uDFA1\uD860\uDD4F"],["9d40","\uD860\uDD89\uD860\uDDAF\uD860\uDE1A\uD860\uDF06\uD860\uDF2F\uD860\uDF8A\u35CA\uD861\uDC68\uD861\uDEAA\u48FA\u63E6\uD862\uDD56\u7808\u9255\uD862\uDDB8\u43F2\uD862\uDDE7\u43DF\uD862\uDDE8\uD862\uDF46\uD862\uDFD4\u59F8\uD863\uDC09\u8F0B\uD863\uDFC5\uD864\uDCEC\u7B51\uD864\uDD10\uD864\uDD3C\u3DF7\uD864\uDD5E\uD852\uDECA\u8FD0\u728F\u568B\uD865\uDCE7\uD865\uDDE9\uD865\uDDB0\uD865\uDDB8\uD865\uDF32\uD866\uDCD1\uD866\uDD49\uD866\uDD6A\uD866\uDDC3\uD866\uDE28\uD866\uDF0E\uD867\uDD5A\uD867\uDD9B\u7E9F\uD867\uDEF8\uD867\uDF23\u4CA4\u9547\uD868\uDE93\u71A2\uD868\uDEFF\u4D91\u9012\uD869\uDDCB\u4D9C\uD843\uDC9C\u8FBE\u55C1"],["9da1","\u8FBA\uD849\uDCB0\u8FB9\uD852\uDE93\u4509\u7E7F\u6F56\u6AB1\u4EEA\u34E4\uD862\uDF2C\uD85E\uDC9D\u373A\u8E80\uD845\uDFF5\uD860\uDC24\uD862\uDF6C\uD862\uDF99\uD85E\uDE3E\uD859\uDEAF\u3DEB\uD85D\uDE55\uD84F\uDCB7\uD855\uDE35\uD856\uDD56\u4E9A\uD857\uDE81\uD858\uDE58\u56BF\uD843\uDE6D\u8E0E\u5B6D\uD84F\uDE88\uD853\uDC9E\u63DE\u62D0\uD845\uDFF6\uD846\uDC7B\u6530\u562D\uD857\uDC4A\u541A\uD854\uDF11\u3DC6\uD867\uDD98\u4C7D\u5622\u561E\u7F49\uD857\uDED8\u5975\uD84F\uDD40\u8770\u4E1C\uD843\uDFEA\uD843\uDD49\uD84D\uDEBA\u8117\u9D5E\u8D18\u763B\u9C45\u764E\u77B9\u9345\u5432\u8148\u82F7\u5625\u8132\u8418\u80BD\u55EA\u7962\u5643\u5416\uD843\uDE9D\u35CE\u5605\u55F1\u66F1\uD860\uDEE2\u362D\u7534\u55F0\u55BA\u5497\u5572\uD843\uDC41\uD843\uDC96\u5ED0\uD854\uDD48\uD843\uDE76\uD84B\uDC62"],["9e40","\uD843\uDEA2\u9EAB\u7D5A\u55DE\uD844\uDC75\u629D\u976D\u5494\u8CCD\u71F6\u9176\u63FC\u63B9\u63FE\u5569\uD84A\uDF43\u9C72\uD84B\uDEB3\u519A\u34DF\uD843\uDDA7\u51A7\u544D\u551E\u5513\u7666\u8E2D\uD85A\uDC8A\u75B1\u80B6\u8804\u8786\u88C7\u81B6\u841C\uD844\uDCC1\u44EC\u7304\uD851\uDF06\u5B90\u830B\uD85A\uDC93\u567B\uD849\uDEF4\uD85F\uDD2F\uD850\uDDA3\uD85F\uDD73\uD85B\uDED0\uD85C\uDEB6\u9170\uD844\uDDD9\u9208\uD84F\uDCFC\uD869\uDEA9\uD843\uDEAC\uD843\uDEF9\u7266\uD847\uDCA2\u474E\uD853\uDFC2\uD85F\uDFF9\uD843\uDFEB\u40FA"],["9ea1","\u9C5D\u651F\uD84B\uDDA0\u48F3\uD851\uDFE0\uD867\uDD7C\uD843\uDFEC\uD843\uDE0A\u6062\uD85D\uDDA3\uD843\uDFED"],["9ead","\uD858\uDC48\uD844\uDD87\u71A3\u7E8E\u9D50\u4E1A\u4E04\u3577\u5B0D\u6CB2\u5367\u36AC\u39DC\u537D\u36A5\uD851\uDE18\u589A\uD852\uDF6E\u822D\u544B\u57AA\uD856\uDE95\uD842\uDD79"],["9ec5","\u3A52\uD849\uDC65\u7374\uD867\uDEAC\u4D09\u9BED\uD84F\uDCFE\uD867\uDF30\u4C5B\uD853\uDFA9\uD865\uDD9E\uD867\uDFDE\u845C\uD84F\uDDB6\uD85C\uDEB2\uD859\uDFB3\uD84D\uDF20\u632E\u7D25\uD84F\uDEF7\uD84F\uDE2C\u3A2A\u9008\u52CC\u3E74\u367A\u45E9\uD841\uDC8E\u7640\u5AF0\uD843\uDEB6\u787A\uD85F\uDF2E\u58A7\u40BF\u567C\u9B8B\u5D74\u7654\uD869\uDC34\u9E85\u4CE1\u75F9\u37FB\u6119\uD84C\uDCDA\uD850\uDFF2"],["9ef5","\u565D\uD844\uDEA9\u57A7\uD852\uDD63\uD867\uDE06\u5234\uD85C\uDCAE\u35AD\u6C4A\u9D7C"],["9f40","\u7C56\u9B39\u57DE\uD845\uDF6C\u5C53\u64D3\uD865\uDCD0\uD858\uDF35\uD85C\uDD64\u86AD\uD843\uDD28\uD85B\uDD22\uD852\uDEE2\uD843\uDD71"],["9f4f","\u51FE\uD847\uDF0F\u5D8E\u9703\uD847\uDDD1\u9E81\u904C\u7B1F\u9B02\u5CD1\u7BA3\u6268\u6335\u9AFF\u7BCF\u9B2A\u7C7E\u9B2E\u7C42\u7C86\u9C15\u7BFC\u9B09\u9F17\u9C1B\uD852\uDD3E\u9F5A\u5573\u5BC3\u4FFD\u9E98\u4FF2\u5260\u3E06\u52D1\u5767\u5056\u59B7\u5E12\u97C8\u9DAB\u8F5C\u5469\u97B4\u9940\u97BA\u532C\u6130"],["9fa1","\u692C\u53DA\u9C0A\u9D02\u4C3B\u9641\u6980\u50A6\u7546\uD845\uDF6D\u99DA\u5273"],["9fae","\u9159\u9681\u915C"],["9fb2","\u9151\uD863\uDE97\u637F\uD85B\uDD23\u6ACA\u5611\u918E\u757A\u6285\uD840\uDFFC\u734F\u7C70\uD857\uDC21\uD84F\uDCFD"],["9fc1","\uD852\uDD19\u76D6\u9B9D\u4E2A\uD843\uDCD4\u83BE\u8842"],["9fc9","\u5C4A\u69C0\u50ED\u577A\u521F\u5DF5\u4ECE\u6C31\uD840\uDDF2\u4F39\u549C\u54DA\u529A\u8D82\u35FE\u5F0C\u35F3"],["9fdb","\u6B52\u917C\u9FA5\u9B97\u982E\u98B4\u9ABA\u9EA8\u9E84\u717A\u7B14"],["9fe7","\u6BFA\u8818\u7F78"],["9feb","\u5620\uD869\uDE4A\u8E77\u9F53"],["9ff0","\u8DD4\u8E4F\u9E1C\u8E01\u6282\uD860\uDF7D\u8E28\u8E75\u7AD3\uD852\uDE77\u7A3E\u78D8\u6CEA\u8A67\u7607"],["a040","\uD862\uDE5A\u9F26\u6CCE\u87D6\u75C3\uD868\uDEB2\u7853\uD87E\uDC40\u8D0C\u72E2\u7371\u8B2D\u7302\u74F1\u8CEB\uD852\uDEBB\u862F\u5FBA\u88A0\u44B7"],["a055","\uD846\uDC3B\uD85B\uDE05"],["a058","\u8A7E\uD849\uDD1B"],["a05b","\u60FD\u7667\u9AD7\u9D44\u936E\u9B8F\u87F5"],["a063","\u880F\u8CF7\u732C\u9721\u9BB0\u35D6\u72B2\u4C07\u7C51\u994A\uD858\uDD59\u6159\u4C04\u9E96\u617D"],["a073","\u575F\u616F\u62A6\u6239\u62CE\u3A5C\u61E2\u53AA\uD84C\uDFF5\u6364\u6802\u35D2"],["a0a1","\u5D57\uD862\uDFC2\u8FDA\uD863\uDE39"],["a0a6","\u50D9\uD847\uDD46\u7906\u5332\u9638\uD843\uDF3B\u4065"],["a0ae","\u77FE"],["a0b0","\u7CC2\uD857\uDF1A\u7CDA\u7A2D\u8066\u8063\u7D4D\u7505\u74F2\u8994\u821A\u670C\u8062\uD85D\uDC86\u805B\u74F0\u8103\u7724\u8989\uD859\uDFCC\u7553\uD85B\uDED1\u87A9\u87CE\u81C8\u878C\u8A49\u8CAD\u8B43\u772B\u74F8\u84DA\u3635\u69B2\u8DA6"],["a0d4","\u89A9\u7468\u6DB9\u87C1\uD850\uDC11\u74E7\u3DDB\u7176\u60A4\u619C\u3CD1\u7162\u6077"],["a0e2","\u7F71\uD862\uDF2D\u7250\u60E9\u4B7E\u5220\u3C18\uD84F\uDCC7\uD857\uDED7\uD85D\uDE56\uD855\uDD31\uD846\uDD44\uD844\uDEFE\uD866\uDD03\uD85B\uDDDC\uD85C\uDCAD\u5CC1\uD858\uDDAD\uD862\uDE0F\uD84D\uDE77\uD840\uDCEE\uD85A\uDC46\uD853\uDF0E\u4562\u5B1F\uD858\uDF4C\u9F50\u9EA6\uD858\uDE6B"],["a3c0","\u2400",31,"\u2421"],["c6a1","\u2460",9,"\u2474",9,"\u2170",9,"\u4E36\u4E3F\u4E85\u4EA0\u5182\u5196\u51AB\u52F9\u5338\u5369\u53B6\u590A\u5B80\u5DDB\u2F33\u5E7F\u5EF4\u5F50\u5F61\u6534\u65E0\u7592\u7676\u8FB5\u96B6\xA8\u02C6\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\uFF3B\uFF3D\u273D\u3041",23],["c740","\u3059",58,"\u30A1\u30A2\u30A3\u30A4"],["c7a1","\u30A5",81,"\u0410",5,"\u0401\u0416",4],["c840","\u041B",26,"\u0451\u0436",25,"\u21E7\u21B8\u21B9\u31CF\uD840\uDCCC\u4E5A\uD840\uDC8A\u5202\u4491"],["c8a1","\u9FB0\u5188\u9FB1\uD85D\uDE07"],["c8cd","\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u309B\u309C\u2E80\u2E84\u2E86\u2E87\u2E88\u2E8A\u2E8C\u2E8D\u2E95\u2E9C\u2E9D\u2EA5\u2EA7\u2EAA\u2EAC\u2EAE\u2EB6\u2EBC\u2EBE\u2EC6\u2ECA\u2ECC\u2ECD\u2ECF\u2ED6\u2ED7\u2EDE\u2EE3"],["c8f5","\u0283\u0250\u025B\u0254\u0275\u0153\xF8\u014B\u028A\u026A"],["f9fe","\uFFED"],["fa40","\uD841\uDD47\u92DB\uD841\uDDDF\uD84F\uDFC5\u854C\u42B5\u73EF\u51B5\u3649\uD852\uDD42\uD862\uDDE4\u9344\uD846\uDDDB\u82EE\uD84F\uDCC8\u783C\u6744\u62DF\uD852\uDD33\uD862\uDDAA\uD840\uDEA0\uD85A\uDFB3\uD844\uDF05\u4FAB\uD849\uDCED\u5008\uD85B\uDD29\uD85E\uDE84\uD84D\uDE00\uD852\uDEB1\uD849\uDD13\u5029\uD840\uDF7E\u5FA4\uD840\uDF80\uD840\uDF47\u6EDB\uD841\uDC1F\u507D\u5101\u347A\u510E\u986C\u3743\u8416\uD852\uDDA4\uD841\uDC87\u5160\uD84C\uDFB4\u516A\uD842\uDFFF\uD848\uDCFC\uD840\uDEE5\uD849\uDD30\uD841\uDD8E\uD84C\uDE33\uD846\uDD83\u5B82\u877D\uD841\uDDB3\uD84F\uDC99\u51B2\u51B8"],["faa1","\u9D34\u51C9\u51CF\u51D1\u3CDC\u51D3\uD852\uDEA6\u51B3\u51E2\u5342\u51ED\u83CD\u693E\uD84D\uDF2D\u5F7B\u520B\u5226\u523C\u52B5\u5257\u5294\u52B9\u52C5\u7C15\u8542\u52E0\u860D\uD85A\uDF13\u5305\uD862\uDEDE\u5549\u6ED9\uD84F\uDF80\uD842\uDD54\uD84F\uDFEC\u5333\u5344\uD842\uDFE2\u6CCB\uD845\uDF26\u681B\u73D5\u604A\u3EAA\u38CC\uD845\uDEE8\u71DD\u44A2\u536D\u5374\uD861\uDEAB\u537E\u537F\uD845\uDD96\uD845\uDE13\u77E6\u5393\uD862\uDE9B\u53A0\u53AB\u53AE\u73A7\uD855\uDF72\u3F59\u739C\u53C1\u53C5\u6C49\u4E49\u57FE\u53D9\u3AAB\uD842\uDF8F\u53E0\uD84F\uDFEB\uD84B\uDDA3\u53F6\uD843\uDC77\u5413\u7079\u552B\u6657\u6D5B\u546D\uD85A\uDF53\uD843\uDD74\u555D\u548F\u54A4\u47A6\uD845\uDF0D\uD843\uDEDD\u3DB4\uD843\uDD4D"],["fb40","\uD862\uDDBC\uD849\uDE98\u5547\u4CED\u542F\u7417\u5586\u55A9\u5605\uD846\uDCD7\uD850\uDC3A\u4552\uD851\uDC35\u66B3\uD844\uDCB4\u5637\u66CD\uD84C\uDE8A\u66A4\u66AD\u564D\u564F\u78F1\u56F1\u9787\u53FE\u5700\u56EF\u56ED\uD862\uDF66\u3623\uD844\uDE4F\u5746\uD850\uDDA5\u6C6E\u708B\u5742\u36B1\uD85B\uDC7E\u57E6\uD845\uDC16\u5803\uD845\uDC54\uD850\uDF63\u5826\uD852\uDFF5\u585C\u58AA\u3561\u58E0\u58DC\uD844\uDE3C\u58FB\u5BFF\u5743\uD868\uDD50\uD850\uDE78\u93D3\u35A1\u591F\u68A6\u36C3\u6E59"],["fba1","\uD845\uDE3E\u5A24\u5553\uD845\uDE92\u8505\u59C9\uD843\uDD4E\uD85B\uDC81\uD85B\uDD2A\uD845\uDFDC\u59D9\uD845\uDFFB\uD845\uDFB2\uD85B\uDDA6\u6D71\uD846\uDC28\uD845\uDED5\u59F9\uD85B\uDE45\u5AAB\u5A63\u36E6\uD852\uDDA9\u5A77\u3708\u5A96\u7465\u5AD3\uD85B\uDFA1\uD849\uDD54\u3D85\uD846\uDD11\u3732\uD845\uDEB8\u5E83\u52D0\u5B76\u6588\u5B7C\uD85E\uDE0E\u4004\u485D\uD840\uDE04\u5BD5\u6160\uD846\uDE34\uD856\uDDCC\uD841\uDDA5\u5BF3\u5B9D\u4D10\u5C05\uD846\uDF44\u5C13\u73CE\u5C14\uD847\uDCA5\uD85A\uDF28\u5C49\u48DD\u5C85\u5CE9\u5CEF\u5D8B\uD847\uDDF9\uD847\uDE37\u5D10\u5D18\u5D46\uD847\uDEA4\u5CBA\u5DD7\u82FC\u382D\uD852\uDD01\uD848\uDC49\uD848\uDD73\u8287\u3836\u3BC2\u5E2E\u6A8A\u5E75\u5E7A\uD851\uDCBC\uD843\uDCD3\u53A6\u4EB7\u5ED0\u53A8\uD845\uDF71\u5E09\u5EF4\uD861\uDC82"],["fc40","\u5EF9\u5EFB\u38A0\u5EFC\u683E\u941B\u5F0D\uD840\uDDC1\uD87E\uDC94\u3ADE\u48AE\uD844\uDF3A\u5F3A\uD85A\uDC88\uD848\uDFD0\u5F58\uD849\uDC71\u5F63\u97BD\uD85B\uDE6E\u5F72\u9340\uD862\uDE36\u5FA7\u5DB6\u3D5F\uD854\uDE50\uD847\uDF6A\uD85C\uDCF8\uD849\uDE68\u91D6\uD840\uDE9E\uD862\uDE29\u6031\u6685\uD846\uDC77\u3963\u3DC7\u3639\u5790\uD849\uDFB4\u7971\u3E40\u609E\u60A4\u60B3\uD852\uDD82\uD852\uDD8F\uD85E\uDE53\u74A4\u50E1\u5AA0\u6164\u8424\u6142\uD87E\uDCA6\uD85B\uDED2\u6181\u51F4\uD841\uDE56\u6187\u5BAA\uD84F\uDFB7"],["fca1","\uD84A\uDC5F\u61D3\uD862\uDF9D\uD866\uDD5D\u61D0\u3932\uD84A\uDD80\uD84A\uDCC1\u6023\u615C\u651E\u638B\uD840\uDD18\u62C5\uD845\uDF70\u62D5\uD84B\uDE0D\u636C\uD852\uDDDF\u3A17\u6438\u63F8\uD844\uDF8E\uD845\uDFFC\u6490\u6F8A\uD84B\uDE36\u9814\uD850\uDC8C\uD855\uDF1D\u64E1\u64E5\u947B\u3A66\u643A\u3A57\u654D\u6F16\uD852\uDE28\uD852\uDE23\u6585\u656D\u655F\uD84C\uDC7E\u65B5\uD852\uDD40\u4B37\u65D1\u40D8\uD846\uDC29\u65E0\u65E3\u5FDF\uD84D\uDC00\u6618\uD84C\uDDF7\uD84C\uDDF8\u6644\uD84C\uDDA4\uD84C\uDDA5\u664B\uD843\uDE75\u6667\uD854\uDDE6\u6673\u6674\uD847\uDE3D\uD84C\uDE31\uD861\uDDF4\uD84C\uDDC8\uD854\uDF13\u77C5\uD84A\uDCF7\u99A4\u6702\uD850\uDF9C\uD852\uDE21\u3B2B\u69FA\uD84D\uDFC2\u675E\u6767\u6762\uD850\uDDCD\uD864\uDCED\u67D7\u44E9\u6822\u6E50\u923C\u6801\uD84C\uDFE6\uD85B\uDDA0\u685D"],["fd40","\uD84D\uDC6F\u69E1\u6A0B\uD862\uDEDF\u6973\u68C3\uD84D\uDDCD\u6901\u6900\u3D32\u3A01\uD84D\uDE3C\u3B80\u67AC\u6961\uD862\uDE4A\u42FC\u6936\u6998\u3BA1\uD840\uDFC9\u8363\u5090\u69F9\uD84D\uDE59\uD848\uDD2A\u6A45\uD84D\uDF03\u6A9D\u3BF3\u67B1\u6AC8\uD864\uDD9C\u3C0D\u6B1D\uD842\uDD23\u60DE\u6B35\u6B74\uD849\uDFCD\u6EB5\uD84E\uDEDB\uD840\uDFB5\uD846\uDD58\u3740\u5421\uD84E\uDF5A\u6BE1\uD84F\uDEFC\u6BDC\u6C37\uD849\uDC8B\uD852\uDCF1\uD85A\uDF51\u6C5A\u8226\u6C79\uD84F\uDDBC\u44C5\uD84F\uDDBD\uD850\uDDA4\uD852\uDD0C\uD852\uDD00"],["fda1","\uD84F\uDCC9\u36E5\u3CEB\uD843\uDD32\u9B83\uD84C\uDDF9\uD849\uDC91\u7F8F\u6837\uD85B\uDD25\uD85B\uDDA1\uD85B\uDDEB\u6D96\u6D5C\u6E7C\u6F04\uD852\uDD7F\uD850\uDC85\uD85B\uDE72\u8533\uD85B\uDF74\u51C7\u6C9C\u6E1D\u842E\uD862\uDF21\u6E2F\uD84F\uDE2F\u7453\uD84F\uDF82\u79CC\u6E4F\u5A91\uD84C\uDC4B\u6FF8\u370D\u6F9D\uD84F\uDE30\u6EFA\uD845\uDC97\uD850\uDC3D\u4555\u93F0\u6F44\u6F5C\u3D4E\u6F74\uD864\uDD70\u3D3B\u6F9F\uD850\uDD44\u6FD3\uD850\uDC91\uD850\uDD55\uD850\uDC39\uD84F\uDFF0\uD84F\uDFB4\uD850\uDD3F\u51DF\uD850\uDD56\uD850\uDD57\uD850\uDD40\uD858\uDDDD\u704B\u707E\u70A7\u7081\u70CC\u70D5\u70D6\u70DF\u4104\u3DE8\u71B4\u7196\uD850\uDE77\u712B\u7145\u5A88\u714A\u716E\u5C9C\uD850\uDF65\u714F\u9362\uD850\uDEC1\u712C\uD851\uDC5A\uD852\uDE27\uD852\uDE22\u71BA\uD862\uDFE8\u70BD\u720E"],["fe40","\u9442\u7215\u5911\u9443\u7224\u9341\uD855\uDE05\u722E\u7240\uD852\uDD74\u68BD\u7255\u7257\u3E55\uD84C\uDC44\u680D\u6F3D\u7282\u732A\u732B\uD852\uDC23\uD862\uDC2B\u48ED\uD862\uDC04\u7328\u732E\u73CF\u73AA\uD843\uDC3A\uD85A\uDE2E\u73C9\u7449\uD850\uDDE2\uD845\uDEE7\uD852\uDE24\u6623\u36C5\uD852\uDDB7\uD852\uDD8D\uD852\uDDFB\u73F7\u7415\u6903\uD852\uDE26\u7439\uD841\uDDC3\u3ED7\u745C\uD84A\uDCAD\u7460\uD863\uDEB2\u7447\u73E4\u7476\u83B9\u746C\u3730\u7474\u93F1\u6A2C\u7482\u4953\uD852\uDE8C"],["fea1","\uD850\uDD5F\uD852\uDE79\uD862\uDF8F\u5B46\uD863\uDC03\uD846\uDC9E\u74C8\uD846\uDD88\u750E\u74E9\u751E\uD863\uDED9\uD846\uDE4B\u5BD7\uD863\uDEAC\u9385\u754D\u754A\u7567\u756E\uD853\uDF82\u3F04\uD853\uDD13\u758E\u745D\u759E\u75B4\u7602\u762C\u7651\u764F\u766F\u7676\uD858\uDFF5\u7690\u81EF\u37F8\uD85A\uDD11\uD85A\uDD0E\u76A1\u76A5\u76B7\u76CC\uD85B\uDF9F\u8462\uD854\uDC9D\uD854\uDD7D\uD847\uDE1C\u771E\u7726\u7740\u64AF\uD854\uDE20\u7758\uD84C\uDEAC\u77AF\uD862\uDD64\uD862\uDD68\uD845\uDEC1\u77F4\u7809\uD844\uDF76\uD852\uDE12\u68CA\u78AF\u78C7\u78D3\u96A5\u792E\uD855\uDDE0\u78D7\u7934\u78B1\uD85D\uDE0C\u8FB8\u8884\uD862\uDF2B\uD858\uDC83\uD849\uDE1C\u7986\u8900\u6902\u7980\uD856\uDC57\u799D\uD85E\uDF39\u793C\u79A9\u6E2A\uD85C\uDD26\u3EA8\u79C6\uD864\uDD0D\u79D4"]]});var oQ1=o((QV5,sQ1)=>{sQ1.exports={shiftjis:{type:"_dbcs",table:function(){return lQ1()},encodeAdd:{"\xA5":92,"\u203E":126},encodeSkipVals:[{from:60736,to:63808}]},csshiftjis:"shiftjis",mskanji:"shiftjis",sjis:"shiftjis",windows31j:"shiftjis",ms31j:"shiftjis",xsjis:"shiftjis",windows932:"shiftjis",ms932:"shiftjis",932:"shiftjis",cp932:"shiftjis",eucjp:{type:"_dbcs",table:function(){return iQ1()},encodeAdd:{"\xA5":92,"\u203E":126}},gb2312:"cp936",gb231280:"cp936",gb23121980:"cp936",csgb2312:"cp936",csiso58gb231280:"cp936",euccn:"cp936",windows936:"cp936",ms936:"cp936",936:"cp936",cp936:{type:"_dbcs",table:function(){return Br()}},gbk:{type:"_dbcs",table:function(){return Br().concat(s30())}},xgbk:"gbk",isoir58:"gbk",gb18030:{type:"_dbcs",table:function(){return Br().concat(s30())},gb18030:function(){return nQ1()},encodeSkipVals:[128],encodeAdd:{"\u20AC":41699}},chinese:"gb18030",windows949:"cp949",ms949:"cp949",949:"cp949",cp949:{type:"_dbcs",table:function(){return rQ1()}},cseuckr:"cp949",csksc56011987:"cp949",euckr:"cp949",isoir149:"cp949",korean:"cp949",ksc56011987:"cp949",ksc56011989:"cp949",ksc5601:"cp949",windows950:"cp950",ms950:"cp950",950:"cp950",cp950:{type:"_dbcs",table:function(){return o30()}},big5:"big5hkscs",big5hkscs:{type:"_dbcs",table:function(){return o30().concat(aQ1())},encodeSkipVals:[36457,36463,36478,36523,36532,36557,36560,36695,36713,36718,36811,36862,36973,36986,37060,37084,37105,37311,37551,37552,37553,37554,37585,37959,38090,38361,38652,39285,39798,39800,39803,39878,39902,39916,39926,40002,40019,40034,40040,40043,40055,40124,40125,40144,40279,40282,40388,40431,40443,40617,40687,40701,40800,40907,41079,41180,41183,36812,37576,38468,38637,41636,41637,41639,41638,41676,41678]},cnbig5:"big5hkscs",csbig5:"big5hkscs",xxbig5:"big5hkscs"}});var $W1=o((eQ1,Wv)=>{var RS6=O30(),tQ1=[TQ1(),kQ1(),yQ1(),hQ1(),fQ1(),mQ1(),pQ1(),cQ1(),oQ1()];for(Qv=0;Qv<tQ1.length;Qv++)Wv=tQ1[Qv],RS6(eQ1,Wv);var Wv,Qv});var GW1=o((WV5,XW1)=>{var YW1=qG().Buffer;XW1.exports=function($){var Y=$.Transform;function X(J,Q){this.conv=J,Q=Q||{},Q.decodeStrings=!1,Y.call(this,Q)}X.prototype=Object.create(Y.prototype,{constructor:{value:X}}),X.prototype._transform=function(J,Q,W){if(typeof J!=="string")return W(Error("Iconv encoding stream needs strings as its input."));try{var Z=this.conv.write(J);if(Z&&Z.length)this.push(Z);W()}catch(K){W(K)}},X.prototype._flush=function(J){try{var Q=this.conv.end();if(Q&&Q.length)this.push(Q);J()}catch(W){J(W)}},X.prototype.collect=function(J){var Q=[];return this.on("error",J),this.on("data",function(W){Q.push(W)}),this.on("end",function(){J(null,YW1.concat(Q))}),this};function G(J,Q){this.conv=J,Q=Q||{},Q.encoding=this.encoding="utf8",Y.call(this,Q)}return G.prototype=Object.create(Y.prototype,{constructor:{value:G}}),G.prototype._transform=function(J,Q,W){if(!YW1.isBuffer(J)&&!(J instanceof Uint8Array))return W(Error("Iconv decoding stream needs buffers as its input."));try{var Z=this.conv.write(J);if(Z&&Z.length)this.push(Z,this.encoding);W()}catch(K){W(K)}},G.prototype._flush=function(J){try{var Q=this.conv.end();if(Q&&Q.length)this.push(Q,this.encoding);J()}catch(W){J(W)}},G.prototype.collect=function(J){var Q="";return this.on("error",J),this.on("data",function(W){Q+=W}),this.on("end",function(){J(null,Q)}),this},{IconvLiteEncoderStream:X,IconvLiteDecoderStream:G}}});var e30=o((jS6,E6)=>{var JW1=qG().Buffer,QW1=wQ1(),_S6=O30();jS6.encodings=null;jS6.defaultCharUnicode="\uFFFD";jS6.defaultCharSingleByte="?";jS6.encode=function(Y,X,G){Y=""+(Y||"");var J=jS6.getEncoder(X,G),Q=J.write(Y),W=J.end();return W&&W.length>0?JW1.concat([Q,W]):Q};jS6.decode=function(Y,X,G){if(typeof Y==="string"){if(!jS6.skipDecodeWarning)console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),jS6.skipDecodeWarning=!0;Y=JW1.from(""+(Y||""),"binary")}var J=jS6.getDecoder(X,G),Q=J.write(Y),W=J.end();return W?Q+W:Q};jS6.encodingExists=function(Y){try{return jS6.getCodec(Y),!0}catch(X){return!1}};jS6.toEncoding=jS6.encode;jS6.fromEncoding=jS6.decode;jS6._codecDataCache={__proto__:null};jS6.getCodec=function(Y){if(!jS6.encodings){var X=$W1();jS6.encodings={__proto__:null},_S6(jS6.encodings,X)}var G=jS6._canonicalizeEncoding(Y),J={};while(!0){var Q=jS6._codecDataCache[G];if(Q)return Q;var W=jS6.encodings[G];switch(typeof W){case"string":G=W;break;case"object":for(var Z in W)J[Z]=W[Z];if(!J.encodingName)J.encodingName=G;G=W.type;break;case"function":if(!J.encodingName)J.encodingName=G;return Q=new W(J,jS6),jS6._codecDataCache[J.encodingName]=Q,Q;default:throw Error("Encoding not recognized: '"+Y+"' (searched as: '"+G+"')")}}};jS6._canonicalizeEncoding=function($){return(""+$).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")};jS6.getEncoder=function(Y,X){var G=jS6.getCodec(Y),J=new G.encoder(X,G);if(G.bomAware&&X&&X.addBOM)J=new QW1.PrependBOM(J,X);return J};jS6.getDecoder=function(Y,X){var G=jS6.getCodec(Y),J=new G.decoder(X,G);if(G.bomAware&&!(X&&X.stripBOM===!1))J=new QW1.StripBOM(J,X);return J};jS6.enableStreamingAPI=function(Y){if(jS6.supportsStreams)return;var X=GW1()(Y);jS6.IconvLiteEncoderStream=X.IconvLiteEncoderStream,jS6.IconvLiteDecoderStream=X.IconvLiteDecoderStream,jS6.encodeStream=function(J,Q){return new jS6.IconvLiteEncoderStream(jS6.getEncoder(J,Q),Q)},jS6.decodeStream=function(J,Q){return new jS6.IconvLiteDecoderStream(jS6.getDecoder(J,Q),Q)},jS6.supportsStreams=!0};var Or;try{Or=L0("stream")}catch($){}if(Or&&Or.Transform)jS6.enableStreamingAPI(Or);else jS6.encodeStream=jS6.decodeStream=function(){throw Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")}});var Kv=o((fS6)=>{var $U0=e30(),{createLRU:hS6}=$v(),Mr=hS6({max:500});fS6.decode=function($,Y,X,G,J){if(Buffer.isEncoding(Y))return $.toString(Y,X,G);let Q;if(!J){if(Q=Mr.get(Y),!Q)Q=$U0.getDecoder(Y),Mr.set(Y,Q)}else{let K={encoding:Y,options:J},H=JSON.stringify(K);if(Q=Mr.get(H),!Q)Q=$U0.getDecoder(K.encoding,K.options),Mr.set(H,Q)}let W=Q.write($.slice(X,G)),Z=Q.end();return Z?W+Z:W};fS6.encode=function($,Y,X){if(Buffer.isEncoding(Y))return Buffer.from($,Y);let G=$U0.getEncoder(Y,X||{}),J=G.write($),Q=G.end();return Q&&Q.length>0?Buffer.concat([J,Q]):J}});var eQ=o((KV5,W9)=>{W9.exports={0:"DECIMAL",1:"TINY",2:"SHORT",3:"LONG",4:"FLOAT",5:"DOUBLE",6:"NULL",7:"TIMESTAMP",8:"LONGLONG",9:"INT24",10:"DATE",11:"TIME",12:"DATETIME",13:"YEAR",14:"NEWDATE",15:"VARCHAR",16:"BIT",245:"JSON",246:"NEWDECIMAL",247:"ENUM",248:"SET",249:"TINY_BLOB",250:"MEDIUM_BLOB",251:"LONG_BLOB",252:"BLOB",253:"VAR_STRING",254:"STRING",255:"GEOMETRY"};W9.exports.DECIMAL=0;W9.exports.TINY=1;W9.exports.SHORT=2;W9.exports.LONG=3;W9.exports.FLOAT=4;W9.exports.DOUBLE=5;W9.exports.NULL=6;W9.exports.TIMESTAMP=7;W9.exports.LONGLONG=8;W9.exports.INT24=9;W9.exports.DATE=10;W9.exports.TIME=11;W9.exports.DATETIME=12;W9.exports.YEAR=13;W9.exports.NEWDATE=14;W9.exports.VARCHAR=15;W9.exports.BIT=16;W9.exports.VECTOR=242;W9.exports.JSON=245;W9.exports.NEWDECIMAL=246;W9.exports.ENUM=247;W9.exports.SET=248;W9.exports.TINY_BLOB=249;W9.exports.MEDIUM_BLOB=250;W9.exports.LONG_BLOB=251;W9.exports.BLOB=252;W9.exports.VAR_STRING=253;W9.exports.STRING=254;W9.exports.GEOMETRY=255});var a5=o((UV5,VW1)=>{var uS6=Hr(),pS6=L0("buffer").Buffer,_L=qQ1(),jL=Kv(),dS6=eQ(),zW1=new Date(NaN);function $W($,Y){let X=Y.toString();if(X.length>=$)return X;return("000000000000"+X).slice(-$)}var YU0=45,XU0=43,cS6=46,lS6=101,iS6=69;class Rr{constructor($,Y,X,G){this.sequenceId=$,this.numPackets=1,this.buffer=Y,this.start=X,this.offset=X+4,this.end=G}reset(){this.offset=this.start+4}length(){return this.end-this.start}slice(){return this.buffer.slice(this.start,this.end)}dump(){console.log([this.buffer.asciiSlice(this.start,this.end)],this.buffer.slice(this.start,this.end),this.length(),this.sequenceId)}haveMoreData(){return this.end>this.offset}skip($){this.offset+=$}readInt8(){return this.buffer[this.offset++]}readInt16(){return this.offset+=2,this.buffer.readUInt16LE(this.offset-2)}readInt24(){return this.readInt16()+(this.readInt8()<<16)}readInt32(){return this.offset+=4,this.buffer.readUInt32LE(this.offset-4)}readSInt8(){return this.buffer.readInt8(this.offset++)}readSInt16(){return this.offset+=2,this.buffer.readInt16LE(this.offset-2)}readSInt32(){return this.offset+=4,this.buffer.readInt32LE(this.offset-4)}readInt64JSNumber(){let $=this.readInt32(),Y=this.readInt32();return new _L($,Y,!0).toNumber()}readSInt64JSNumber(){let $=this.readInt32(),Y=this.readInt32();if(!(Y&2147483648))return $+4294967296*Y;return new _L($,Y,!1).toNumber()}readInt64String(){let $=this.readInt32(),Y=this.readInt32();return new _L($,Y,!0).toString()}readSInt64String(){let $=this.readInt32(),Y=this.readInt32();return new _L($,Y,!1).toString()}readInt64(){let $=this.readInt32(),Y=this.readInt32(),X=new _L($,Y,!0),G=X.toNumber();return Number.isSafeInteger(G)?G:X.toString()}readSInt64(){let $=this.readInt32(),Y=this.readInt32(),X=new _L($,Y,!1),G=X.toNumber();return Number.isSafeInteger(G)?G:X.toString()}isEOF(){return this.buffer[this.offset]===254&&this.length()<13}eofStatusFlags(){return this.buffer.readInt16LE(this.offset+3)}eofWarningCount(){return this.buffer.readInt16LE(this.offset+1)}readLengthCodedNumber($,Y){let X=this.buffer[this.offset++];if(X<251)return X;return this.readLengthCodedNumberExt(X,$,Y)}readLengthCodedNumberSigned($){return this.readLengthCodedNumber($,!0)}readLengthCodedNumberExt($,Y,X){let G,J,Q;if($===251)return null;if($===252)return this.readInt8()+(this.readInt8()<<8);if($===253)return this.readInt8()+(this.readInt8()<<8)+(this.readInt8()<<16);if($===254){if(G=this.readInt32(),J=this.readInt32(),J===0)return G;if(J<2097152)return J*4294967296+G;Q=new _L(G,J,!X);let W=Q.toNumber(),Z=Q.toString();if(Y||!Number.isSafeInteger(W))return Z;return W}throw console.trace(),Error(`Should not reach here: ${$}`)}readFloat(){let $=this.buffer.readFloatLE(this.offset);return this.offset+=4,$}readDouble(){let $=this.buffer.readDoubleLE(this.offset);return this.offset+=8,$}readBuffer($){if(typeof $>"u")$=this.end-this.offset;return this.offset+=$,this.buffer.slice(this.offset-$,this.offset)}readDateTime($){if(!$||$==="Z"||$==="local"){let X=this.readInt8();if(X===251)return null;let G=0,J=0,Q=0,W=0,Z=0,K=0,H=0;if(X>3)G=this.readInt16(),J=this.readInt8(),Q=this.readInt8();if(X>6)W=this.readInt8(),Z=this.readInt8(),K=this.readInt8();if(X>10)H=this.readInt32()/1000;if(G+J+Q+W+Z+K+H===0)return zW1;if($==="Z")return new Date(Date.UTC(G,J-1,Q,W,Z,K,H));return new Date(G,J-1,Q,W,Z,K,H)}let Y=this.readDateTimeString(6,"T",null);if(!Y)return zW1;if(Y.length===10)Y+="T00:00:00";return new Date(Y+$)}readDateTimeString($,Y,X){let G=this.readInt8(),J=0,Q=0,W=0,Z=0,K=0,H=0,z=0,V;if(G>3)J=this.readInt16(),Q=this.readInt8(),W=this.readInt8(),V=[$W(4,J),$W(2,Q),$W(2,W)].join("-");if(G>6)Z=this.readInt8(),K=this.readInt8(),H=this.readInt8(),V+=`${Y||" "}${[$W(2,Z),$W(2,K),$W(2,H)].join(":")}`;else if(X===dS6.DATETIME)V+=" 00:00:00";if(G>10){if(z=this.readInt32(),V+=".",$){if(z=$W(6,z),z.length>$)z=z.substring(0,$)}V+=z}return V}readTimeString($){let Y=this.readInt8();if(Y===0)return"00:00:00";let X=this.readInt8()?-1:1,G=0,J=0,Q=0,W=0,Z=0;if(Y>6)G=this.readInt32(),J=this.readInt8(),Q=this.readInt8(),W=this.readInt8();if(Y>10)Z=this.readInt32();if($)return J+=G*24,Q+=J*60,W+=Q*60,Z+=W*1000,Z*=X,Z;return(X===-1?"-":"")+[$W(2,G*24+J),$W(2,Q),$W(2,W)].join(":")+(Z?`.${Z}`.replace(/0+$/,""):"")}readLengthCodedString($){let Y=this.readLengthCodedNumber();if(Y===null)return null;return this.offset+=Y,jL.decode(this.buffer,$,this.offset-Y,this.offset)}readLengthCodedBuffer(){let $=this.readLengthCodedNumber();if($===null)return null;return this.readBuffer($)}readNullTerminatedString($){let Y=this.offset,X=this.offset;while(X<this.end&&this.buffer[X]!==0)X=X+1;return this.offset=X+1,jL.decode(this.buffer,$,Y,X)}readString($,Y){if(typeof $==="string"&&typeof Y>"u")Y=$,$=void 0;if(typeof $>"u")$=this.end-this.offset;return this.offset+=$,jL.decode(this.buffer,Y,this.offset-$,this.offset)}parseInt($,Y){if($===null)return null;if($>=14&&!Y){let H=this.buffer.toString("ascii",this.offset,this.offset+$);return this.offset+=$,Number(H)}let X=0,G=this.offset,J=this.offset+$,Q=1;if($===0)return 0;if(this.buffer[this.offset]===YU0)this.offset++,Q=-1;let W,Z=J-this.offset;if(Y){if(Z>=15){if(W=this.readString(J-this.offset,"binary"),X=parseInt(W,10),Number.isSafeInteger(Q*X))return Q*X;return Q===-1?`-${W}`:W}if(Z>16)return W=this.readString(J-this.offset),Q===-1?`-${W}`:W}if(this.buffer[this.offset]===XU0)this.offset++;while(this.offset<J)X*=10,X+=this.buffer[this.offset]-48,this.offset++;let K=X*Q;if(!Y)return K;if(Number.isSafeInteger(K))return K;return this.buffer.toString("ascii",G,J)}parseIntNoBigCheck($){if($===null)return null;let Y=0,X=this.offset+$,G=1;if($===0)return 0;if(this.buffer[this.offset]===YU0)this.offset++,G=-1;if(this.buffer[this.offset]===XU0)this.offset++;while(this.offset<X)Y*=10,Y+=this.buffer[this.offset]-48,this.offset++;return Y*G}parseGeometryValue(){let $=this.readLengthCodedBuffer(),Y=4;if($===null||!$.length)return null;let X=$.length;function G(){let J,Q,W,Z,K,H,z,V,A=null;if(Y+5>X)return null;let F=$.readUInt8(Y);Y+=1;let N=F?$.readUInt32LE(Y):$.readUInt32BE(Y);switch(Y+=4,N){case 1:if(Y+16>X)return null;J=F?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,Q=F?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,A={x:J,y:Q};break;case 2:if(Y+4>X)return null;if(K=F?$.readUInt32LE(Y):$.readUInt32BE(Y),Y+=4,K>(X-Y)/16)return null;A=[];for(W=K;W>0;W--){if(Y+16>X)break;J=F?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,Q=F?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,A.push({x:J,y:Q})}break;case 3:if(Y+4>X)return null;if(H=F?$.readUInt32LE(Y):$.readUInt32BE(Y),Y+=4,H>(X-Y)/4)return null;A=[];for(W=H;W>0;W--){if(Y+4>X)break;K=F?$.readUInt32LE(Y):$.readUInt32BE(Y),Y+=4,V=[];for(Z=K;Z>0;Z--){if(Y+16>X)break;J=F?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,Q=F?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,V.push({x:J,y:Q})}A.push(V)}break;case 4:case 5:case 6:case 7:if(Y+4>X)return null;if(z=F?$.readUInt32LE(Y):$.readUInt32BE(Y),Y+=4,z>(X-Y)/9)return null;A=[];for(W=z;W>0;W--)A.push(G());break}return A}return G()}parseVector(){let $=this.readLengthCodedNumber(),Y=this.offset+$,X=[];while(this.offset<Y&&this.offset<this.end)X.push(this.readFloat());return X}parseDate($){let Y=this.readLengthCodedNumber();if(Y===null)return null;if(Y!==10)return new Date(NaN);let X=this.parseInt(4);this.offset++;let G=this.parseInt(2);this.offset++;let J=this.parseInt(2);if(!$||$==="local")return new Date(X,G-1,J);if($==="Z")return new Date(Date.UTC(X,G-1,J));return new Date(`${$W(4,X)}-${$W(2,G)}-${$W(2,J)}T00:00:00${$}`)}parseDateTime($){let Y=this.readLengthCodedString("binary");if(Y===null)return null;if(!$||$==="local")return new Date(Y);return new Date(`${Y}${$}`)}parseFloat($){if($===null)return null;if($===0)return 0;if($>17){let W=this.buffer.toString("utf8",this.offset,this.offset+$);return this.offset+=$,Number.parseFloat(W)}let Y=0,X=this.offset+$,G=1,J=!1,Q=0;if(this.buffer[this.offset]===YU0)this.offset++,G=-1;if(this.buffer[this.offset]===XU0)this.offset++;while(this.offset<X)if(Q=this.buffer[this.offset],Q===cS6)J=!0,this.offset++;else if(Q===lS6||Q===iS6){let W=X-$,Z=this.buffer.toString("utf8",W,X);return this.offset=X,Number.parseFloat(Z)}else if(Y*=10,Y+=this.buffer[this.offset]-48,this.offset++,J)G=G*10;return Y/G}parseLengthCodedIntNoBigCheck(){return this.parseIntNoBigCheck(this.readLengthCodedNumber())}parseLengthCodedInt($){return this.parseInt(this.readLengthCodedNumber(),$)}parseLengthCodedIntString(){return this.readLengthCodedString("binary")}parseLengthCodedFloat(){return this.parseFloat(this.readLengthCodedNumber())}peekByte(){return this.buffer[this.offset]}isAlt(){return this.peekByte()===254}isError(){return this.peekByte()===255}asError($){this.reset(),this.readInt8();let Y=this.readInt16(),X="";if(this.buffer[this.offset]===35)this.skip(1),X=this.readBuffer(5).toString();let G=this.readString(void 0,$),J=Error(G);return J.code=uS6[Y],J.errno=Y,J.sqlState=X,J.sqlMessage=G,J}writeInt32($){this.buffer.writeUInt32LE($,this.offset),this.offset+=4}writeInt24($){this.writeInt8($&255),this.writeInt16($>>8)}writeInt16($){this.buffer.writeUInt16LE($,this.offset),this.offset+=2}writeInt8($){this.buffer.writeUInt8($,this.offset),this.offset++}writeDouble($){this.buffer.writeDoubleLE($,this.offset),this.offset+=8}writeBuffer($){$.copy(this.buffer,this.offset),this.offset+=$.length}writeNull(){this.buffer[this.offset]=251,this.offset++}writeNullTerminatedString($,Y){let X=jL.encode($,Y);this.buffer.length&&X.copy(this.buffer,this.offset),this.offset+=X.length,this.writeInt8(0)}writeString($,Y){if($===null){this.writeInt8(251);return}if($.length===0)return;let X=jL.encode($,Y);this.buffer.length&&X.copy(this.buffer,this.offset),this.offset+=X.length}writeLengthCodedString($,Y){let X=jL.encode($,Y);this.writeLengthCodedNumber(X.length),this.buffer.length&&X.copy(this.buffer,this.offset),this.offset+=X.length}writeLengthCodedBuffer($){this.writeLengthCodedNumber($.length),$.copy(this.buffer,this.offset),this.offset+=$.length}writeLengthCodedNumber($){if($<251)return this.writeInt8($);if($<65535)return this.writeInt8(252),this.writeInt16($);if($<16777215)return this.writeInt8(253),this.writeInt24($);if($===null)return this.writeInt8(251);return this.writeInt8(254),this.buffer.writeUInt32LE($>>>0,this.offset),this.offset+=4,this.buffer.writeUInt32LE(Math.floor($/4294967296),this.offset),this.offset+=4,this.offset}writeDate($,Y){if(this.buffer.writeUInt8(11,this.offset),!Y||Y==="local")this.buffer.writeUInt16LE($.getFullYear(),this.offset+1),this.buffer.writeUInt8($.getMonth()+1,this.offset+3),this.buffer.writeUInt8($.getDate(),this.offset+4),this.buffer.writeUInt8($.getHours(),this.offset+5),this.buffer.writeUInt8($.getMinutes(),this.offset+6),this.buffer.writeUInt8($.getSeconds(),this.offset+7),this.buffer.writeUInt32LE($.getMilliseconds()*1000,this.offset+8);else{if(Y!=="Z"){let X=(Y[0]==="-"?-1:1)*(parseInt(Y.substring(1,3),10)*60+parseInt(Y.substring(4),10));if(X!==0)$=new Date($.getTime()+60000*X)}this.buffer.writeUInt16LE($.getUTCFullYear(),this.offset+1),this.buffer.writeUInt8($.getUTCMonth()+1,this.offset+3),this.buffer.writeUInt8($.getUTCDate(),this.offset+4),this.buffer.writeUInt8($.getUTCHours(),this.offset+5),this.buffer.writeUInt8($.getUTCMinutes(),this.offset+6),this.buffer.writeUInt8($.getUTCSeconds(),this.offset+7),this.buffer.writeUInt32LE($.getUTCMilliseconds()*1000,this.offset+8)}this.offset+=12}writeHeader($){let Y=this.offset;this.offset=0,this.writeInt24(this.buffer.length-4),this.writeInt8($),this.offset=Y}clone(){return new Rr(this.sequenceId,this.buffer,this.start,this.end)}type(){if(this.isEOF())return"EOF";if(this.isError())return"Error";if(this.buffer[this.offset]===0)return"maybeOK";return""}static lengthCodedNumberLength($){if($<251)return 1;if($<65535)return 3;if($<16777215)return 5;return 9}static lengthCodedStringLength($,Y){let G=jL.encode($,Y).length;return Rr.lengthCodedNumberLength(G)+G}static MockBuffer(){let $=function(){},Y=Buffer.alloc(0);for(let X in pS6.prototype)if(typeof Y[X]==="function")Y[X]=$;return Y}}VW1.exports=Rr});var GU0=o((HV5,AW1)=>{var qr=a5();function nS6($,Y){let X=$[Y],G=$[Y+1],J=$[Y+2];if(G+J===0)return X;return X+(G<<8)+(J<<16)}class a3{constructor($,Y){if(typeof Y>"u")Y=4;this.buffer=[],this.bufferLength=0,this.packetHeaderLength=Y,this.headerLen=0,this.length=0,this.largePacketParts=[],this.firstPacketSequenceId=0,this.onPacket=$,this.execute=a3.prototype.executeStart,this._flushLargePacket=Y===7?this._flushLargePacket7:this._flushLargePacket4}_flushLargePacket4(){let $=this.largePacketParts.length;this.largePacketParts.unshift(Buffer.from([0,0,0,0]));let Y=Buffer.concat(this.largePacketParts),X=new qr(this.firstPacketSequenceId,Y,0,Y.length);this.largePacketParts.length=0,X.numPackets=$,this.onPacket(X)}_flushLargePacket7(){let $=this.largePacketParts.length;this.largePacketParts.unshift(Buffer.from([0,0,0,0,0,0,0]));let Y=Buffer.concat(this.largePacketParts);this.largePacketParts.length=0;let X=new qr(this.firstPacketSequenceId,Y,0,Y.length);X.numPackets=$,this.onPacket(X)}executeStart($){let Y=0,X=$.length;while(X-Y>=3)if(this.length=nS6($,Y),X-Y>=this.length+this.packetHeaderLength){let G=$[Y+3];if(this.length<16777215&&this.largePacketParts.length===0)this.onPacket(new qr(G,$,Y,Y+this.packetHeaderLength+this.length));else{if(this.largePacketParts.length===0)this.firstPacketSequenceId=G;if(this.largePacketParts.push($.slice(Y+this.packetHeaderLength,Y+this.packetHeaderLength+this.length)),this.length<16777215)this._flushLargePacket()}Y+=this.packetHeaderLength+this.length}else{this.buffer=[$.slice(Y+3,X)],this.bufferLength=X-Y-3,this.execute=a3.prototype.executePayload;return}if(X-Y>0)if(this.headerLen=X-Y,this.length=$[Y],this.headerLen===2)this.length=$[Y]+($[Y+1]<<8),this.execute=a3.prototype.executeHeader3;else this.execute=a3.prototype.executeHeader2}executePayload($){let Y=0,X=$.length,G=this.length-this.bufferLength+this.packetHeaderLength-3;if(X-Y>=G){let J=Buffer.allocUnsafe(this.length+this.packetHeaderLength),Q=3;for(let Z=0;Z<this.buffer.length;++Z)this.buffer[Z].copy(J,Q),Q+=this.buffer[Z].length;$.copy(J,Q,Y,Y+G);let W=J[3];if(this.length<16777215&&this.largePacketParts.length===0)this.onPacket(new qr(W,J,0,this.length+this.packetHeaderLength));else{if(this.largePacketParts.length===0)this.firstPacketSequenceId=W;if(this.largePacketParts.push(J.slice(this.packetHeaderLength,this.packetHeaderLength+this.length)),this.length<16777215)this._flushLargePacket()}if(this.buffer=[],this.bufferLength=0,this.execute=a3.prototype.executeStart,Y+=G,X-Y>0)return this.execute($.slice(Y,X))}else this.buffer.push($),this.bufferLength+=$.length;return null}executeHeader2($){if(this.length+=$[0]<<8,$.length>1)return this.length+=$[1]<<16,this.execute=a3.prototype.executePayload,this.executePayload($.slice(2));return this.execute=a3.prototype.executeHeader3,null}executeHeader3($){return this.length+=$[0]<<16,this.execute=a3.prototype.executePayload,this.executePayload($.slice(1))}}AW1.exports=a3});var DW1=o((zV5,FW1)=>{var rS6=a5();class JU0{constructor($){this.pluginName=$.pluginName,this.pluginData=$.pluginData}toPacket($){let Y=6+this.pluginName.length+this.pluginData.length,X=Buffer.allocUnsafe(Y),G=new rS6(0,X,0,Y);return G.offset=4,G.writeInt8(2),G.writeNullTerminatedString(this.pluginName,$),G.writeBuffer(this.pluginData),G}static fromPacket($,Y){$.readInt8();let X=$.readNullTerminatedString(Y),G=$.readBuffer();return new JU0({pluginName:X,pluginData:G})}}FW1.exports=JU0});var LW1=o((VV5,NW1)=>{var aS6=a5();class QU0{constructor($){this.pluginName=$.pluginName,this.pluginData=$.pluginData}toPacket(){let $=6+this.pluginName.length+this.pluginData.length,Y=Buffer.allocUnsafe($),X=new aS6(0,Y,0,$);return X.offset=4,X.writeInt8(254),X.writeNullTerminatedString(this.pluginName,"cesu8"),X.writeBuffer(this.pluginData),X}static fromPacket($){$.readInt8();let Y=$.readNullTerminatedString("cesu8"),X=$.readBuffer();return new QU0({pluginName:Y,pluginData:X})}}NW1.exports=QU0});var OW1=o((AV5,BW1)=>{var sS6=a5();class WU0{constructor($){this.data=$}toPacket(){let $=5+this.data.length,Y=Buffer.allocUnsafe($),X=new sS6(0,Y,0,$);return X.offset=4,X.writeInt8(1),X.writeBuffer(this.data),X}static fromPacket($){$.readInt8();let Y=$.readBuffer();return new WU0(Y)}static verifyMarker($){return $.peekByte()===1}}BW1.exports=WU0});var MW1=o((FV5,EW1)=>{var oS6=a5();class ZU0{constructor($){if(!Buffer.isBuffer($))$=Buffer.from($);this.data=$}toPacket(){let $=4+this.data.length,Y=Buffer.allocUnsafe($),X=new oS6(0,Y,0,$);return X.offset=4,X.writeBuffer(this.data),X}static fromPacket($){let Y=$.readBuffer();return new ZU0(Y)}}EW1.exports=ZU0});var qW1=o((DV5,RW1)=>{var KU0=eQ(),UX=a5(),mX=Array(256);class UU0{constructor($){this.columns=$||[]}static toPacket($,Y){let G=0;$.forEach((K)=>{if(K===null||typeof K>"u"){++G;return}G+=UX.lengthCodedStringLength(K.toString(10),Y)}),G=G+2;let J=Buffer.allocUnsafe(G+4),Q=new UX(0,J,0,G+4);Q.offset=4,Q.writeInt8(0);let W=0,Z=1;if($.forEach((K)=>{if(K.type===KU0.NULL)W+=Z;if(Z*=2,Z===256)Q.writeInt8(W),W=0,Z=1}),Z!==1)Q.writeInt8(W);return $.forEach((K)=>{if(K===null){Q.writeNull();return}if(typeof K>"u"){Q.writeInt8(0);return}Q.writeLengthCodedString(K.toString(10),Y)}),Q}static fromPacket($,Y){let X=Array($.length);Y.readInt8();let G=Math.floor(($.length+7+2)/8);Y.skip(G);for(let J=0;J<X.length;++J)X[J]=mX[$[J].columnType].apply(Y);return new UU0(X)}}mX[KU0.DECIMAL]=UX.prototype.readLengthCodedString;mX[1]=UX.prototype.readInt8;mX[2]=UX.prototype.readInt16;mX[3]=UX.prototype.readInt32;mX[4]=UX.prototype.readFloat;mX[5]=UX.prototype.readDouble;mX[6]=UX.prototype.assertInvalid;mX[7]=UX.prototype.readTimestamp;mX[8]=UX.prototype.readInt64;mX[9]=UX.prototype.readInt32;mX[10]=UX.prototype.readTimestamp;mX[11]=UX.prototype.readTime;mX[12]=UX.prototype.readDateTime;mX[13]=UX.prototype.readInt16;mX[KU0.VAR_STRING]=UX.prototype.readLengthCodedString;RW1.exports=UU0});var OZ=o((NV5,IW1)=>{IW1.exports={SLEEP:0,QUIT:1,INIT_DB:2,QUERY:3,FIELD_LIST:4,CREATE_DB:5,DROP_DB:6,REFRESH:7,SHUTDOWN:8,STATISTICS:9,PROCESS_INFO:10,CONNECT:11,PROCESS_KILL:12,DEBUG:13,PING:14,TIME:15,DELAYED_INSERT:16,CHANGE_USER:17,BINLOG_DUMP:18,TABLE_DUMP:19,CONNECT_OUT:20,REGISTER_SLAVE:21,STMT_PREPARE:22,STMT_EXECUTE:23,STMT_SEND_LONG_DATA:24,STMT_CLOSE:25,STMT_RESET:26,SET_OPTION:27,STMT_FETCH:28,DAEMON:29,BINLOG_DUMP_GTID:30,RESET_CONNECTION:31,UNKNOWN:255}});var _W1=o((LV5,wW1)=>{var tS6=a5(),eS6=OZ();class PW1{constructor($){this.binlogPos=$.binlogPos||0,this.serverId=$.serverId||0,this.flags=$.flags||0,this.filename=$.filename||""}toPacket(){let $=15+Buffer.byteLength(this.filename,"utf8"),Y=Buffer.allocUnsafe($),X=new tS6(0,Y,0,$);return X.offset=4,X.writeInt8(eS6.BINLOG_DUMP),X.writeInt32(this.binlogPos),X.writeInt16(this.flags),X.writeInt32(this.serverId),X.writeString(this.filename),X}}wW1.exports=PW1});var CL=o((Gk6)=>{var $k6=L0("crypto");function TL($,Y,X){let G=$k6.createHash("sha1");if(G.update($),Y)G.update(Y);if(X)G.update(X);return G.digest()}function HU0($,Y){let X=Buffer.allocUnsafe($.length);for(let G=0;G<$.length;G++)X[G]=$[G]^Y[G];return X}Gk6.xor=HU0;function Yk6($,Y,X){if(!$)return Buffer.alloc(0);let G=TL($);return Gk6.calculateTokenFromPasswordSha(G,Y,X)}Gk6.calculateTokenFromPasswordSha=function($,Y,X){let G=Y.slice(0,8),J=X.slice(0,12),Q=TL($),W=TL(G,J,Q);return HU0(W,$)};Gk6.calculateToken=Yk6;Gk6.verifyToken=function($,Y,X,G){let J=HU0(X,TL($,Y,G));return TL(J).compare(G)===0};Gk6.doubleSha1=function($){return TL(TL($))};function Xk6($,Y){let X=Buffer.allocUnsafe($.length),G=Y.length;for(let J=0;J<$.length;J++)X[J]=$[J]^Y[J%G];return X}Gk6.xorRotating=Xk6});var EZ=o((OV5,jW1)=>{jW1.exports=["utf8","big5","latin2","dec8","cp850","latin1","hp8","koi8r","latin1","latin2","swe7","ascii","eucjp","sjis","cp1251","latin1","hebrew","utf8","tis620","euckr","latin7","latin2","koi8u","cp1251","gb2312","greek","cp1250","latin2","gbk","cp1257","latin5","latin1","armscii8","cesu8","cp1250","ucs2","cp866","keybcs2","macintosh","macroman","cp852","latin7","latin7","macintosh","cp1250","utf8","utf8","latin1","latin1","latin1","cp1251","cp1251","cp1251","macroman","utf16","utf16","utf16-le","cp1256","cp1257","cp1257","utf32","utf32","utf16-le","binary","armscii8","ascii","cp1250","cp1256","cp866","dec8","greek","hebrew","hp8","keybcs2","koi8r","koi8u","cesu8","latin2","latin5","latin7","cp850","cp852","swe7","cesu8","big5","euckr","gb2312","gbk","sjis","tis620","ucs2","eucjp","geostd8","geostd8","latin1","cp932","cp932","eucjpms","eucjpms","cp1250","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf8","utf8","utf8","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","utf8","utf8","utf8","utf8","utf8","utf8","utf8","ucs2","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","cesu8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","gb18030","gb18030","gb18030","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8"]});var kW1=o((EV5,SW1)=>{var Hk6=OZ(),zk6=h2(),Ir=a5(),TW1=CL(),Vk6=EZ();class CW1{constructor($){this.flags=$.flags,this.user=$.user||"",this.database=$.database||"",this.password=$.password||"",this.passwordSha1=$.passwordSha1,this.authPluginData1=$.authPluginData1,this.authPluginData2=$.authPluginData2,this.connectAttributes=$.connectAttrinutes||{};let Y;if(this.passwordSha1)Y=TW1.calculateTokenFromPasswordSha(this.passwordSha1,this.authPluginData1,this.authPluginData2);else Y=TW1.calculateToken(this.password,this.authPluginData1,this.authPluginData2);this.authToken=Y,this.charsetNumber=$.charsetNumber}serializeToBuffer($){let Y=(J)=>this.flags&zk6[J],X=new Ir(0,$,0,$.length);X.offset=4;let G=Vk6[this.charsetNumber];if(X.writeInt8(Hk6.CHANGE_USER),X.writeNullTerminatedString(this.user,G),Y("SECURE_CONNECTION"))X.writeInt8(this.authToken.length),X.writeBuffer(this.authToken);else X.writeBuffer(this.authToken),X.writeInt8(0);if(X.writeNullTerminatedString(this.database,G),X.writeInt16(this.charsetNumber),Y("PLUGIN_AUTH"))X.writeNullTerminatedString("mysql_native_password","latin1");if(Y("CONNECT_ATTRS")){let J=this.connectAttributes,Q=Object.keys(J),W=0;for(let Z=0;Z<Q.length;++Z)W+=Ir.lengthCodedStringLength(Q[Z],G),W+=Ir.lengthCodedStringLength(J[Q[Z]],G);X.writeLengthCodedNumber(W);for(let Z=0;Z<Q.length;++Z)X.writeLengthCodedString(Q[Z],G),X.writeLengthCodedString(J[Q[Z]],G)}return X}toPacket(){if(typeof this.user!=="string")throw Error('"user" connection config property must be a string');if(typeof this.database!=="string")throw Error('"database" connection config property must be a string');let $=this.serializeToBuffer(Ir.MockBuffer());return this.serializeToBuffer(Buffer.allocUnsafe($.offset))}}SW1.exports=CW1});var yW1=o((MV5,xW1)=>{var Ak6=a5(),Fk6=OZ();class vW1{constructor($){this.id=$}toPacket(){let $=new Ak6(0,Buffer.allocUnsafe(9),0,9);return $.offset=4,$.writeInt8(Fk6.STMT_CLOSE),$.writeInt32(this.id),$}}xW1.exports=vW1});var Pr=o((Dk6)=>{Dk6.NOT_NULL=1;Dk6.PRI_KEY=2;Dk6.UNIQUE_KEY=4;Dk6.MULTIPLE_KEY=8;Dk6.BLOB=16;Dk6.UNSIGNED=32;Dk6.ZEROFILL=64;Dk6.BINARY=128;Dk6.ENUM=256;Dk6.AUTO_INCREMENT=512;Dk6.TIMESTAMP=1024;Dk6.SET=2048;Dk6.NO_DEFAULT_VALUE=4096;Dk6.ON_UPDATE_NOW=8192;Dk6.NUM=32768});var mW1=o((qV5,gW1)=>{var bW1=a5(),fW1=Kv(),zU0=EZ(),hW1=["catalog","schema","table","orgTable","name","orgName"];class VU0{constructor($,Y){this._buf=$.buffer,this._clientEncoding=Y,this._catalogLength=$.readLengthCodedNumber(),this._catalogStart=$.offset,$.offset+=this._catalogLength,this._schemaLength=$.readLengthCodedNumber(),this._schemaStart=$.offset,$.offset+=this._schemaLength,this._tableLength=$.readLengthCodedNumber(),this._tableStart=$.offset,$.offset+=this._tableLength,this._orgTableLength=$.readLengthCodedNumber(),this._orgTableStart=$.offset,$.offset+=this._orgTableLength;let X=$.readLengthCodedNumber(),G=$.offset;$.offset+=X,this._orgNameLength=$.readLengthCodedNumber(),this._orgNameStart=$.offset,$.offset+=this._orgNameLength,$.skip(1),this.characterSet=$.readInt16(),this.encoding=zU0[this.characterSet],this.name=fW1.decode(this._buf,this.encoding==="binary"?this._clientEncoding:this.encoding,G,G+X),this.columnLength=$.readInt32(),this.columnType=$.readInt8(),this.type=this.columnType,this.flags=$.readInt16(),this.decimals=$.readInt8()}inspect(){return{catalog:this.catalog,schema:this.schema,name:this.name,orgName:this.orgName,table:this.table,orgTable:this.orgTable,characterSet:this.characterSet,encoding:this.encoding,columnLength:this.columnLength,type:this.columnType,flags:this.flags,decimals:this.decimals}}[Symbol.for("nodejs.util.inspect.custom")]($,Y,X){let G=eQ(),J=[];for(let z in G)J[G[z]]=z;let Q=Pr(),W=[],Z=this.flags;for(let z in Q)if(Z&Q[z])if(z==="PRI_KEY")W.push("PRIMARY KEY");else if(z==="NOT_NULL")W.push("NOT NULL");else if(z==="BINARY");else if(z==="MULTIPLE_KEY");else if(z==="NO_DEFAULT_VALUE");else if(z==="BLOB");else if(z==="UNSIGNED");else if(z==="TIMESTAMP");else if(z==="ON_UPDATE_NOW")W.push("ON UPDATE CURRENT_TIMESTAMP");else W.push(z);if($>1)return X({...this.inspect(),typeName:J[this.columnType],flags:W});let K=this.flags&Q.UNSIGNED,H=J[this.columnType];if(H==="BLOB")if(this.columnLength===4294967295)H="LONGTEXT";else if(this.columnLength===67108860)H="MEDIUMTEXT";else if(this.columnLength===262140)H="TEXT";else if(this.columnLength===1020)H="TINYTEXT";else H=`BLOB(${this.columnLength})`;else if(H==="VAR_STRING")H=`VARCHAR(${Math.ceil(this.columnLength/4)})`;else if(H==="TINY")if(this.columnLength===3&&K||this.columnLength===4&&!K)H="TINYINT";else H=`TINYINT(${this.columnLength})`;else if(H==="LONGLONG")if(this.columnLength===20)H="BIGINT";else H=`BIGINT(${this.columnLength})`;else if(H==="SHORT")if(K&&this.columnLength===5)H="SMALLINT";else if(!K&&this.columnLength===6)H="SMALLINT";else H=`SMALLINT(${this.columnLength})`;else if(H==="LONG")if(K&&this.columnLength===10)H="INT";else if(!K&&this.columnLength===11)H="INT";else H=`INT(${this.columnLength})`;else if(H==="INT24")if(K&&this.columnLength===8)H="MEDIUMINT";else if(!K&&this.columnLength===9)H="MEDIUMINT";else H=`MEDIUMINT(${this.columnLength})`;else if(H==="DOUBLE")if(this.columnLength===22&&this.decimals===31)H="DOUBLE";else H=`DOUBLE(${this.columnLength},${this.decimals})`;else if(H==="FLOAT")if(this.columnLength===12&&this.decimals===31)H="FLOAT";else H=`FLOAT(${this.columnLength},${this.decimals})`;else if(H==="NEWDECIMAL")if(this.columnLength===11&&this.decimals===0)H="DECIMAL";else if(this.decimals===0)if(K)H=`DECIMAL(${this.columnLength})`;else H=`DECIMAL(${this.columnLength-1})`;else H=`DECIMAL(${this.columnLength-2},${this.decimals})`;else H=`${J[this.columnType]}(${this.columnLength})`;if(K)H+=" UNSIGNED";return`\`${this.name}\` ${[H,...W].join(" ")}`}static toPacket($,Y){let X=17;hW1.forEach((W)=>{X+=bW1.lengthCodedStringLength($[W],zU0[$.characterSet])});let G=Buffer.allocUnsafe(X),J=new bW1(Y,G,0,X);function Q(W){J.writeLengthCodedString($[W],zU0[$.characterSet])}return J.offset=4,hW1.forEach(Q),J.writeInt8(12),J.writeInt16($.characterSet),J.writeInt32($.columnLength),J.writeInt8($.columnType),J.writeInt16($.flags),J.writeInt8($.decimals),J.writeInt16(0),J}get db(){return this.schema}}var Uv=function($){Object.defineProperty(VU0.prototype,$,{get:function(){let Y=this[`_${$}Start`],X=Y+this[`_${$}Length`],G=fW1.decode(this._buf,this.encoding==="binary"?this._clientEncoding:this.encoding,Y,X);return Object.defineProperty(this,$,{value:G,writable:!1,configurable:!1,enumerable:!1}),G}})};Uv("catalog");Uv("schema");Uv("table");Uv("orgTable");Uv("orgName");gW1.exports=VU0});var pW1=o((IV5,uW1)=>{uW1.exports={NO_CURSOR:0,READ_ONLY:1,FOR_UPDATE:2,SCROLLABLE:3,PARAMETER_COUNT_AVAILABLE:8}});var AU0=o((PV5,cW1)=>{var Pq=eQ(),SL=a5();function dW1($){return Array.isArray($)||$.constructor===Object||typeof $.toJSON==="function"&&!Buffer.isBuffer($)}function Sk6($,Y,X){let G=Pq.VAR_STRING,J,Q=function(W){return SL.prototype.writeLengthCodedString.call(this,W,Y)};if($!==null)switch(typeof $){case"undefined":throw TypeError("Bind parameters must not contain undefined");case"number":G=Pq.DOUBLE,J=8,Q=SL.prototype.writeDouble;break;case"boolean":$=$|0,G=Pq.TINY,J=1,Q=SL.prototype.writeInt8;break;case"object":if(Object.prototype.toString.call($)==="[object Date]")G=Pq.DATETIME,J=12,Q=function(W){return SL.prototype.writeDate.call(this,W,X)};else if(dW1($))$=JSON.stringify($),G=Pq.JSON;else if(Buffer.isBuffer($))J=SL.lengthCodedNumberLength($.length)+$.length,Q=SL.prototype.writeLengthCodedBuffer;break;default:$=$.toString()}else $="",G=Pq.NULL;if(!J)J=SL.lengthCodedStringLength($,Y);return{value:$,type:G,length:J,writer:Q}}cW1.exports={toParameter:Sk6,isJSON:dW1}});var sW1=o((wV5,aW1)=>{var lW1=pW1(),kk6=OZ(),vk6=h2(),x$=eQ(),iW1=a5(),xk6=EZ(),{toParameter:nW1}=AU0();class rW1{constructor($,Y,X,G,J,Q){this.id=$,this.parameters=Y,this.encoding=xk6[X],this.timezone=G,this.attributes=J,this.clientFlags=Q||0}static fromPacket($,Y){let X=$.readInt32(),G=$.readInt8(),J=$.readInt32(),Q=$.offset;while(Q<$.end-1){if(($.buffer[Q+1]===x$.VAR_STRING||$.buffer[Q+1]===x$.NULL||$.buffer[Q+1]===x$.DOUBLE||$.buffer[Q+1]===x$.TINY||$.buffer[Q+1]===x$.DATETIME||$.buffer[Q+1]===x$.JSON)&&$.buffer[Q]===1&&$.buffer[Q+2]===0)break;else $.readInt8();Q++}let W=[];for(let K=$.offset+1;K<$.end-1;K++)if(($.buffer[K]===x$.VAR_STRING||$.buffer[K]===x$.NULL||$.buffer[K]===x$.DOUBLE||$.buffer[K]===x$.TINY||$.buffer[K]===x$.DATETIME||$.buffer[K]===x$.JSON)&&$.buffer[K+1]===0)W.push($.buffer[K]),$.skip(2);$.skip(1);let Z=[];for(let K=0;K<W.length;K++){if(W[K]===x$.VAR_STRING)Z.push($.readLengthCodedString(Y));else if(W[K]===x$.DOUBLE)Z.push($.readDouble());else if(W[K]===x$.TINY)Z.push($.readInt8());else if(W[K]===x$.DATETIME)Z.push($.readDateTime());else if(W[K]===x$.JSON)Z.push(JSON.parse($.readLengthCodedString(Y)));if(W[K]===x$.NULL)Z.push(null)}return{stmtId:X,flags:G,iterationCount:J,values:Z}}_serializeToBuffer($){let Y=this.clientFlags&vk6.CLIENT_QUERY_ATTRIBUTES,X=Y&&this.attributes?Object.keys(this.attributes):[],G=this.parameters?this.parameters.length:0,J=X.length,Q=G+J,W=new iW1(0,$,0,$.length);W.offset=4,W.writeInt8(kk6.STMT_EXECUTE),W.writeInt32(this.id);let Z=lW1.NO_CURSOR;if(Y)Z|=lW1.PARAMETER_COUNT_AVAILABLE;if(W.writeInt8(Z),W.writeInt32(1),Y)W.writeLengthCodedNumber(Q);if(Q>0){let K=G>0?this.parameters.map((F)=>nW1(F,this.encoding,this.timezone)):[],H=X.map((F)=>nW1(this.attributes[F],this.encoding,this.timezone)),z=K.concat(H),V=0,A=1;if(z.forEach((F)=>{if(F.type===x$.NULL)V+=A;if(A*=2,A===256)W.writeInt8(V),V=0,A=1}),A!==1)W.writeInt8(V);W.writeInt8(1);for(let F=0;F<z.length;F++)if(W.writeInt8(z[F].type),W.writeInt8(0),Y){let N=F<G?"":X[F-G];W.writeLengthCodedString(N,this.encoding)}z.forEach((F)=>{if(F.type!==x$.NULL)F.writer.call(W,F.value)})}return W}toPacket(){let $=this._serializeToBuffer(iW1.MockBuffer());return this._serializeToBuffer(Buffer.allocUnsafe($.offset))}}aW1.exports=rW1});var tW1=o((_V5,oW1)=>{var yk6=a5(),FU0=h2();class DU0{constructor($){this.protocolVersion=$.protocolVersion,this.serverVersion=$.serverVersion,this.capabilityFlags=$.capabilityFlags,this.connectionId=$.connectionId,this.authPluginData1=$.authPluginData1,this.authPluginData2=$.authPluginData2,this.characterSet=$.characterSet,this.statusFlags=$.statusFlags,this.authPluginName=$.authPluginName}setScrambleData($){L0("crypto").randomBytes(20,(Y,X)=>{if(Y){$(Y);return}this.authPluginData1=X.slice(0,8),this.authPluginData2=X.slice(8,20),$()})}toPacket($){let Y=68+Buffer.byteLength(this.serverVersion,"utf8"),X=Buffer.alloc(Y+4,0),G=new yk6($,X,0,Y+4);G.offset=4,G.writeInt8(this.protocolVersion),G.writeString(this.serverVersion,"cesu8"),G.writeInt8(0),G.writeInt32(this.connectionId),G.writeBuffer(this.authPluginData1),G.writeInt8(0);let J=Buffer.allocUnsafe(4);return J.writeUInt32LE(this.capabilityFlags,0),G.writeBuffer(J.slice(0,2)),G.writeInt8(this.characterSet),G.writeInt16(this.statusFlags),G.writeBuffer(J.slice(2,4)),G.writeInt8(21),G.skip(10),G.writeBuffer(this.authPluginData2),G.writeInt8(0),G.writeString("mysql_native_password","latin1"),G.writeInt8(0),G}static fromPacket($){let Y={};Y.protocolVersion=$.readInt8(),Y.serverVersion=$.readNullTerminatedString("cesu8"),Y.connectionId=$.readInt32(),Y.authPluginData1=$.readBuffer(8),$.skip(1);let X=Buffer.allocUnsafe(4);if(X[0]=$.readInt8(),X[1]=$.readInt8(),$.haveMoreData()){if(Y.characterSet=$.readInt8(),Y.statusFlags=$.readInt16(),X[2]=$.readInt8(),X[3]=$.readInt8(),Y.capabilityFlags=X.readUInt32LE(0),Y.capabilityFlags&FU0.PLUGIN_AUTH)Y.authPluginDataLength=$.readInt8();else Y.authPluginDataLength=0,$.skip(1);$.skip(10)}else Y.capabilityFlags=X.readUInt16LE(0);if(Y.capabilityFlags&FU0.SECURE_CONNECTION){let J=Y.authPluginDataLength;if(J===0)Y.authPluginDataLength=20,Y.authPluginData2=$.readBuffer(12),$.skip(1);else{let Q=Math.max(13,J-8);Y.authPluginData2=$.readBuffer(Q)}}if(Y.capabilityFlags&FU0.PLUGIN_AUTH)Y.authPluginName=$.readNullTerminatedString("ascii");return new DU0(Y)}}oW1.exports=DU0});var JZ1=o((jV5,GZ1)=>{var eW1=h2(),$Z1=EZ(),wr=a5(),YZ1=CL();class XZ1{constructor($){if(this.user=$.user||"",this.database=$.database||"",this.password=$.password||"",this.passwordSha1=$.passwordSha1,this.authPluginData1=$.authPluginData1,this.authPluginData2=$.authPluginData2,this.compress=$.compress,this.clientFlags=$.flags,$.authToken!==void 0&&$.authPluginName!==void 0){if(!Buffer.isBuffer($.authToken))throw TypeError("HandshakeResponse authToken must be a Buffer when provided");if(typeof $.authPluginName!=="string")throw TypeError("HandshakeResponse authPluginName must be a string when provided");this.authToken=$.authToken,this.authPluginName=$.authPluginName}else{let Y;if(this.passwordSha1)Y=YZ1.calculateTokenFromPasswordSha(this.passwordSha1,this.authPluginData1,this.authPluginData2);else Y=YZ1.calculateToken(this.password,this.authPluginData1,this.authPluginData2);this.authToken=Y,this.authPluginName="mysql_native_password"}this.charsetNumber=$.charsetNumber,this.encoding=$Z1[$.charsetNumber],this.connectAttributes=$.connectAttributes}serializeResponse($){let Y=(Q)=>this.clientFlags&eW1[Q],X=new wr(0,$,0,$.length);X.offset=4,X.writeInt32(this.clientFlags),X.writeInt32(0),X.writeInt8(this.charsetNumber),X.skip(23);let G=this.encoding;X.writeNullTerminatedString(this.user,G);let J;if(Y("PLUGIN_AUTH_LENENC_CLIENT_DATA"))X.writeLengthCodedNumber(this.authToken.length),X.writeBuffer(this.authToken);else if(Y("SECURE_CONNECTION"))X.writeInt8(this.authToken.length),X.writeBuffer(this.authToken);else X.writeBuffer(this.authToken),X.writeInt8(0);if(Y("CONNECT_WITH_DB"))X.writeNullTerminatedString(this.database,G);if(Y("PLUGIN_AUTH"))X.writeNullTerminatedString(this.authPluginName||"mysql_native_password","latin1");if(Y("CONNECT_ATTRS")){let Q=this.connectAttributes||{},W=Object.keys(Q),Z=0;for(J=0;J<W.length;++J)Z+=wr.lengthCodedStringLength(W[J],G),Z+=wr.lengthCodedStringLength(Q[W[J]],G);X.writeLengthCodedNumber(Z);for(J=0;J<W.length;++J)X.writeLengthCodedString(W[J],G),X.writeLengthCodedString(Q[W[J]],G)}return X}toPacket(){if(typeof this.user!=="string")throw Error('"user" connection config property must be a string');if(typeof this.database!=="string")throw Error('"database" connection config property must be a string');let $=this.serializeResponse(wr.MockBuffer());return this.serializeResponse(Buffer.alloc($.offset))}static fromPacket($,Y=4294967295){let X={};X.clientFlags=$.readInt32();function G(W){return X.clientFlags&Y&eW1[W]}X.maxPacketSize=$.readInt32(),X.charsetNumber=$.readInt8();let J=$Z1[X.charsetNumber];X.encoding=J,$.skip(23),X.user=$.readNullTerminatedString(J);let Q;if(G("PLUGIN_AUTH_LENENC_CLIENT_DATA"))Q=$.readLengthCodedNumber(J),X.authToken=$.readBuffer(Q);else if(G("SECURE_CONNECTION"))Q=$.readInt8(),X.authToken=$.readBuffer(Q);else X.authToken=$.readNullTerminatedString(J);if(G("CONNECT_WITH_DB"))X.database=$.readNullTerminatedString(J);if(G("PLUGIN_AUTH"))X.authPluginName=$.readNullTerminatedString(J);if(G("CONNECT_ATTRS")){let W=$.readLengthCodedNumber(J),Z=$.offset+W,K={};while($.offset<Z)K[$.readLengthCodedString(J)]=$.readLengthCodedString(J);X.connectAttributes=K}return X}}GZ1.exports=XZ1});var ZZ1=o((TV5,WZ1)=>{var bk6=a5(),hk6=OZ(),fk6=Kv(),gk6=EZ();class QZ1{constructor($,Y){this.query=$,this.charsetNumber=Y,this.encoding=gk6[Y]}toPacket(){let $=fk6.encode(this.query,this.encoding),Y=5+$.length,X=Buffer.allocUnsafe(Y),G=new bk6(0,X,0,Y);return G.offset=4,G.writeInt8(hk6.STMT_PREPARE),G.writeBuffer($),G}}WZ1.exports=QZ1});var HZ1=o((CV5,UZ1)=>{class KZ1{constructor($){$.skip(1),this.id=$.readInt32(),this.fieldCount=$.readInt16(),this.parameterCount=$.readInt16(),$.skip(1),this.warningCount=$.readInt16()}}UZ1.exports=KZ1});var LZ1=o((SV5,NZ1)=>{var NU0=a5(),zZ1=OZ(),VZ1=Kv(),mk6=EZ(),AZ1=h2(),FZ1=eQ(),{toParameter:uk6}=AU0();class DZ1{constructor($,Y,X,G){this.query=$,this.charsetNumber=Y,this.encoding=mk6[Y],this.attributes=X,this.clientFlags=G||0}serializeToBuffer($){let Y=this.clientFlags&AZ1.CLIENT_QUERY_ATTRIBUTES,X=VZ1.encode(this.query,this.encoding),G=new NU0(0,$,0,$.length);if(G.offset=4,G.writeInt8(zZ1.QUERY),Y){let J=this.attributes,Q=J?Object.keys(J):[],W=Q.length;if(G.writeLengthCodedNumber(W),G.writeLengthCodedNumber(1),W>0){let Z=Q.map((z)=>uk6(J[z],this.encoding,"local")),K=0,H=1;if(Z.forEach((z)=>{if(z.type===FZ1.NULL)K+=H;if(H*=2,H===256)G.writeInt8(K),K=0,H=1}),H!==1)G.writeInt8(K);G.writeInt8(1);for(let z=0;z<W;z++)G.writeInt8(Z[z].type),G.writeInt8(0),G.writeLengthCodedString(Q[z],this.encoding);Z.forEach((z)=>{if(z.type!==FZ1.NULL)z.writer.call(G,z.value)})}}return G.writeBuffer(X),G}toPacket(){if(!(this.clientFlags&AZ1.CLIENT_QUERY_ATTRIBUTES)){let X=VZ1.encode(this.query,this.encoding),G=5+X.length,J=Buffer.allocUnsafe(G),Q=new NU0(0,J,0,G);return Q.offset=4,Q.writeInt8(zZ1.QUERY),Q.writeBuffer(X),Q}let Y=this.serializeToBuffer(NU0.MockBuffer());return this.serializeToBuffer(Buffer.allocUnsafe(Y.offset))}}NZ1.exports=DZ1});var EZ1=o((kV5,OZ1)=>{var pk6=a5(),dk6=OZ();class BZ1{constructor($){this.serverId=$.serverId||0,this.slaveHostname=$.slaveHostname||"",this.slaveUser=$.slaveUser||"",this.slavePassword=$.slavePassword||"",this.slavePort=$.slavePort||0,this.replicationRank=$.replicationRank||0,this.masterId=$.masterId||0}toPacket(){let $=15+Buffer.byteLength(this.slaveHostname,"utf8")+Buffer.byteLength(this.slaveUser,"utf8")+Buffer.byteLength(this.slavePassword,"utf8")+3+4,Y=Buffer.allocUnsafe($),X=new pk6(0,Y,0,$);return X.offset=4,X.writeInt8(dk6.REGISTER_SLAVE),X.writeInt32(this.serverId),X.writeInt8(Buffer.byteLength(this.slaveHostname,"utf8")),X.writeString(this.slaveHostname),X.writeInt8(Buffer.byteLength(this.slaveUser,"utf8")),X.writeString(this.slaveUser),X.writeInt8(Buffer.byteLength(this.slavePassword,"utf8")),X.writeString(this.slavePassword),X.writeInt16(this.slavePort),X.writeInt32(this.replicationRank),X.writeInt32(this.masterId),X}}OZ1.exports=BZ1});var qZ1=o((vV5,RZ1)=>{var ck6=a5(),lk6=OZ();class MZ1{constructor(){}toPacket(){let $=new ck6(0,Buffer.alloc(5),0,5);return $.offset=4,$.writeInt8(lk6.RESET_CONNECTION),$}}RZ1.exports=MZ1});var LU0=o((ik6)=>{ik6.SERVER_STATUS_IN_TRANS=1;ik6.SERVER_STATUS_AUTOCOMMIT=2;ik6.SERVER_MORE_RESULTS_EXISTS=8;ik6.SERVER_QUERY_NO_GOOD_INDEX_USED=16;ik6.SERVER_QUERY_NO_INDEX_USED=32;ik6.SERVER_STATUS_CURSOR_EXISTS=64;ik6.SERVER_STATUS_LAST_ROW_SENT=128;ik6.SERVER_STATUS_DB_DROPPED=256;ik6.SERVER_STATUS_NO_BACKSLASH_ESCAPES=512;ik6.SERVER_STATUS_METADATA_CHANGED=1024;ik6.SERVER_QUERY_WAS_SLOW=2048;ik6.SERVER_PS_OUT_PARAMS=4096;ik6.SERVER_STATUS_IN_TRANS_READONLY=8192;ik6.SERVER_SESSION_STATE_CHANGED=16384});var PZ1=o((yV5,IZ1)=>{IZ1.exports={big5:1,latin2:2,dec8:3,cp850:4,latin1:5,hp8:6,koi8r:7,swe7:10,ascii:11,eucjp:12,sjis:13,cp1251:14,hebrew:16,tis620:18,euckr:19,latin7:20,koi8u:22,gb2312:24,greek:25,cp1250:26,gbk:28,cp1257:29,latin5:30,armscii8:32,cesu8:33,ucs2:35,cp866:36,keybcs2:37,macintosh:38,macroman:39,cp852:40,utf8:45,utf8mb4:45,utf16:54,utf16le:56,cp1256:57,utf32:60,binary:63,geostd8:92,cp932:95,eucjpms:97,gb18030:248,utf8mb3:192}});var jZ1=o((Zv6)=>{Zv6.SYSTEM_VARIABLES=0;Zv6.SCHEMA=1;Zv6.STATE_CHANGE=2;Zv6.STATE_GTIDS=3;Zv6.TRANSACTION_CHARACTERISTICS=4;Zv6.TRANSACTION_STATE=5;Zv6.FIRST_KEY=Zv6.SYSTEM_VARIABLES;Zv6.LAST_KEY=Zv6.TRANSACTION_STATE});var SZ1=o((hV5,CZ1)=>{var BU0=a5(),Fv6=h2(),Dv6=LU0(),Nv6=PZ1(),_r=jZ1();class TZ1{constructor($,Y){let X=Y.config.bigNumberStrings,G=Y.serverEncoding,J=Y._handshakePacket.capabilityFlags,Q=function(K){return J&Fv6[K]};if($.buffer[$.offset]!==0){if(this.fieldCount=$.readLengthCodedNumber(),this.fieldCount===null)this.infileName=$.readString(void 0,G);return}if(this.fieldCount=$.readInt8(),this.affectedRows=$.readLengthCodedNumber(X),this.insertId=$.readLengthCodedNumberSigned(X),this.info="",Q("PROTOCOL_41"))this.serverStatus=$.readInt16(),this.warningStatus=$.readInt16();else if(Q("TRANSACTIONS"))this.serverStatus=$.readInt16();let W=null;if(Q("SESSION_TRACK")&&$.offset<$.end){if(this.info=$.readLengthCodedString(G),this.serverStatus&Dv6.SERVER_SESSION_STATE_CHANGED){let K=$.offset<$.end?$.readLengthCodedNumber():0,H=$.offset+K,z,V,A;if(K>0)W={systemVariables:{},schema:null,gtids:[],trackStateChange:null};while($.offset<H){if(z=$.readInt8(),K=$.readLengthCodedNumber(),A=$.offset+K,z===_r.SYSTEM_VARIABLES){V=$.readLengthCodedString(G);let F=$.readLengthCodedString(G);if(W.systemVariables[V]=F,V==="character_set_client"){let N=Nv6[F];if(typeof N<"u")Y.config.charsetNumber=N}}else if(z===_r.SCHEMA)V=$.readLengthCodedString(G),W.schema=V;else if(z===_r.STATE_CHANGE)W.trackStateChange=$.readLengthCodedString(G);else if(z===_r.STATE_GTIDS){let F=$.readLengthCodedString(G),N=$.readLengthCodedString(G);W.gtids=N.split(",")}$.offset=A}}}else this.info=$.readString(void 0,G);if(W)this.stateChanges=W;let Z=this.info.match(/\schanged:\s*(\d+)/i);if(Z!==null)this.changedRows=parseInt(Z[1],10);else this.changedRows=0}static toPacket($,Y){let X=4+BU0.lengthCodedNumberLength($);if(typeof Y<"u")X+=BU0.lengthCodedNumberLength(Y);let G=Buffer.allocUnsafe(X),J=new BU0(0,G,0,X);if(J.offset=4,J.writeLengthCodedNumber($),typeof Y<"u")J.writeLengthCodedNumber(Y);return J}}CZ1.exports=TZ1});var xZ1=o((fV5,vZ1)=>{var Lv6=h2(),Bv6=a5();class kZ1{constructor($,Y){this.clientFlags=$|Lv6.SSL,this.charset=Y}toPacket(){let Y=Buffer.allocUnsafe(36),X=new Bv6(0,Y,0,36);return Y.fill(0),X.offset=4,X.writeInt32(this.clientFlags),X.writeInt32(0),X.writeInt8(this.charset),X}}vZ1.exports=kZ1});var hZ1=o((gV5,bZ1)=>{var yZ1=a5();class OU0{constructor($){this.columns=$||[]}static fromPacket($){let Y=[];while($.haveMoreData())Y.push($.readLengthCodedString());return new OU0(Y)}static toPacket($,Y){let G=0;$.forEach((W)=>{if(W===null||typeof W>"u"){++G;return}G+=yZ1.lengthCodedStringLength(W.toString(10),Y)});let J=Buffer.allocUnsafe(G+4),Q=new yZ1(0,J,0,G+4);return Q.offset=4,$.forEach((W)=>{if(W===null){Q.writeNull();return}if(typeof W>"u"){Q.writeInt8(0);return}Q.writeLengthCodedString(W.toString(10),Y)}),Q}}bZ1.exports=OU0});var YW=o((uv6,mZ1)=>{var Ov6=L0("process"),Ev6=DW1(),Mv6=LW1(),Rv6=OW1(),qv6=MW1(),Iv6=qW1(),Pv6=_W1(),wv6=kW1(),_v6=yW1(),jv6=mW1(),Tv6=sW1(),Cv6=tW1(),Sv6=JZ1(),kv6=ZZ1(),vv6=HZ1(),xv6=LZ1(),yv6=EZ1(),bv6=qZ1(),hv6=SZ1(),fv6=xZ1(),gv6=hZ1(),mv6={AuthNextFactor:Ev6,AuthSwitchRequest:Mv6,AuthSwitchRequestMoreData:Rv6,AuthSwitchResponse:qv6,BinaryRow:Iv6,BinlogDump:Pv6,ChangeUser:wv6,CloseStatement:_v6,ColumnDefinition:jv6,Execute:Tv6,Handshake:Cv6,HandshakeResponse:Sv6,PrepareStatement:kv6,PreparedStatementHeader:vv6,Query:xv6,RegisterSlave:yv6,ResetConnection:bv6,ResultSetHeader:hv6,SSLRequest:fv6,TextRow:gv6};Object.entries(mv6).forEach(([$,Y])=>{if(uv6[$]=Y,Ov6.env.NODE_DEBUG){if(Y.prototype.toPacket){let X=Y.prototype.toPacket;Y.prototype.toPacket=function(){let G=X.call(this);return G._name=$,G}}}});var wq=a5();uv6.Packet=wq;class fZ1{static toPacket($,Y){$=$||{};let X=$.affectedRows||0,G=$.insertId||0,J=$.serverStatus||0,Q=$.warningCount||0,W=$.message||"",Z=9+wq.lengthCodedNumberLength(X);Z+=wq.lengthCodedNumberLength(G);let K=Buffer.allocUnsafe(Z),H=new wq(0,K,0,Z);return H.offset=4,H.writeInt8(0),H.writeLengthCodedNumber(X),H.writeLengthCodedNumber(G),H.writeInt16(J),H.writeInt16(Q),H.writeString(W,Y),H._name="OK",H}}uv6.OK=fZ1;class gZ1{static toPacket($,Y){if(typeof $>"u")$=0;if(typeof Y>"u")Y=0;let X=new wq(0,Buffer.allocUnsafe(9),0,9);return X.offset=4,X.writeInt8(254),X.writeInt16($),X.writeInt16(Y),X._name="EOF",X}}uv6.EOF=gZ1;class EU0{static toPacket($,Y){let X=13+Buffer.byteLength($.message,"utf8"),G=new wq(0,Buffer.allocUnsafe(X),0,X);return G.offset=4,G.writeInt8(255),G.writeInt16($.code),G.writeString("#_____",Y),G.writeString($.message,Y),G._name="Error",G}static fromPacket($){$.readInt8();let Y=$.readInt16();$.readString(1,"ascii"),$.readString(5,"ascii");let X=$.readNullTerminatedString("utf8"),G=new EU0;return G.message=X,G.code=Y,G}}uv6.Error=EU0});var XW=o((mV5,pZ1)=>{var iv6=L0("events").EventEmitter,nv6=L0("timers");class uZ1 extends iv6{constructor(){super();this.next=null}stateName(){let $=this.next;for(let Y in this)if(this[Y]===$&&Y!=="next")return Y;return"unknown name"}execute($,Y){if(!this.next)this.next=this.start,Y._resetSequenceId();if($&&$.isError()){let X=$.asError(Y.clientEncoding);if(X.sql=this.sql||this.query,this.queryTimeout)nv6.clearTimeout(this.queryTimeout),this.queryTimeout=null;if(this.onResult)this.onResult(X),this.emit("end");else this.emit("error",X),this.emit("end");return!0}if(this.next=this.next($,Y),this.next)return!1;return this.emit("end"),!0}}pZ1.exports=uZ1});var MU0=o((uV5,dZ1)=>{var rv6=L0("crypto"),{xorRotating:av6}=CL(),sv6=L0("tls"),ov6=Buffer.from([1]);function tv6($,Y,X){let G=av6(Buffer.from(`${$}\x00`,"utf8"),Y);return rv6.publicEncrypt({key:X,oaepHash:"sha1"},G)}dZ1.exports=($={})=>({connection:Y})=>{let X=0,G=null,J=Y.config.password,Q=(W)=>{let Z=tv6(J,G,W);return X=-1,Z};return(W)=>{switch(X){case 0:if(Y.stream instanceof sv6.TLSSocket&&Y.stream.encrypted===!0)return Buffer.from(`${J}\x00`,"utf8");if(G=W.slice(0,20),$.serverPublicKey)return Q($.serverPublicKey);return X=1,ov6;case 1:if($.onServerPublicKey)$.onServerPublicKey(W);return Q(W);case-1:throw Error("Unexpected data in AuthMoreData packet received by sha256_password plugin in STATE_FINAL state.")}throw Error(`Unexpected data in AuthMoreData packet received by sha256_password plugin in state ${X}`)}}});var jr=o((pV5,IU0)=>{var qU0=L0("crypto"),{xor:ev6,xorRotating:$x6}=CL(),Yx6=Buffer.from([2]),Xx6=Buffer.from([3]),Gx6=Buffer.from([4]);function RU0($){let Y=qU0.createHash("sha256");return Y.update($),Y.digest()}function cZ1($,Y){if(!$)return Buffer.alloc(0);let X=RU0(Buffer.from($)),G=RU0(X),J=RU0(Buffer.concat([G,Y]));return ev6(X,J)}function Jx6($,Y,X){let G=$x6(Buffer.from(`${$}\x00`,"utf8"),Y);return qU0.publicEncrypt({key:X,oaepHash:"sha1",padding:qU0.constants.RSA_PKCS1_OAEP_PADDING},G)}var Qx6=($={})=>({connection:Y})=>{let X=0,G=null,J=Y.config.password,Q=(W)=>{let Z=Jx6(J,G,W);return X=-1,Z};return(W)=>{switch(X){case 0:return G=W.slice(0,20),X=1,cZ1(J,G);case 1:if(Xx6.equals(W))return X=-1,null;if(Gx6.equals(W)){if(typeof $.overrideIsSecure>"u"?Y.config.ssl||Y.config.socketPath:$.overrideIsSecure)return X=-1,Buffer.from(`${J}\x00`,"utf8");if($.serverPublicKey)return Q($.serverPublicKey);return X=2,Yx6}throw Error("Invalid AuthMoreData packet received by caching_sha2_password plugin in STATE_TOKEN_SENT state.");case 2:if($.onServerPublicKey)$.onServerPublicKey(W);return Q(W);case-1:throw Error("Unexpected data in AuthMoreData packet received by caching_sha2_password plugin in STATE_FINAL state.")}throw Error(`Unexpected data in AuthMoreData packet received by caching_sha2_password plugin in state ${X}`)}};IU0.exports=Qx6;IU0.exports.calculateToken=cZ1});var PU0=o((dV5,iZ1)=>{var lZ1=CL();iZ1.exports=($)=>({connection:Y,command:X})=>{let G=X.password||$.password||Y.config.password,J=X.passwordSha1||$.passwordSha1||Y.config.passwordSha1;return(Q)=>{let W=Q.slice(0,8),Z=Q.slice(8,20),K;if(J)K=lZ1.calculateTokenFromPasswordSha(J,W,Z);else K=lZ1.calculateToken(G,W,Z);return K}}});var wU0=o((cV5,nZ1)=>{function Wx6($){return Buffer.from(`${$}\x00`)}var Zx6=($)=>function({connection:X,command:G}){let J=G.password||$.password||X.config.password;return function(){return Wx6(J)}};nZ1.exports=Zx6});var _U0=o((lV5,oZ1)=>{var _q=YW(),Kx6=MU0(),Ux6=jr(),Hx6=PU0(),zx6=wU0(),rZ1=Object.assign(Object.create(null),{sha256_password:Kx6({}),caching_sha2_password:Ux6({}),mysql_native_password:Hx6({}),mysql_clear_password:zx6({})});function aZ1($,Y){let X=Y.config.authPlugins;if(X&&Object.prototype.hasOwnProperty.call(X,$))return X[$];return rZ1[$]}function sZ1(){console.warn("WARNING! authSwitchHandler api is deprecated, please use new authPlugins api")}function Tr($,Y){$.code="AUTH_SWITCH_PLUGIN_ERROR",$.fatal=!0,Y.emit("error",$)}function Vx6($,Y,X){let{pluginName:G,pluginData:J}=_q.AuthSwitchRequest.fromPacket($);if(Y.config.authSwitchHandler&&G!=="mysql_native_password"){let W=Y.config.authSwitchHandler;sZ1(),W({pluginName:G,pluginData:J},(Z,K)=>{if(Z)return Tr(Z,X);Y.writePacket(new _q.AuthSwitchResponse(K).toPacket())});return}if(G==="mysql_clear_password"){if(!(Y.config.authPlugins&&Object.prototype.hasOwnProperty.call(Y.config.authPlugins,"mysql_clear_password"))&&!Y.config.enableCleartextPlugin){let Z=Error("Server requested authentication using mysql_clear_password, which sends the password in plaintext over the network and is disabled by default. To enable it, set the `enableCleartextPlugin` option to `true` in your connection configuration, or provide a custom `mysql_clear_password` auth plugin via the `authPlugins` option. Only use this over a secure connection (TLS/SSL).");throw Z.code="MYSQL_CLEAR_PASSWORD_NOT_ENABLED",Z.fatal=!0,Z}}let Q=aZ1(G,Y);if(!Q)throw Error(`Server requests authentication using unknown plugin ${G}. See TODO: add plugins doco here on how to configure or author authentication plugins.`);Y._authPlugin=Q({connection:Y,command:X}),Promise.resolve(Y._authPlugin(J)).then((W)=>{if(W)Y.writePacket(new _q.AuthSwitchResponse(W).toPacket())}).catch((W)=>{Tr(W,X)})}function Ax6($,Y,X){let{data:G}=_q.AuthSwitchRequestMoreData.fromPacket($);if(Y.config.authSwitchHandler){let J=Y.config.authSwitchHandler;sZ1(),J({pluginData:G},(Q,W)=>{if(Q)return Tr(Q,X);Y.writePacket(new _q.AuthSwitchResponse(W).toPacket())});return}if(!Y._authPlugin)throw Error("AuthPluginMoreData received but no auth plugin instance found");Promise.resolve(Y._authPlugin(G)).then((J)=>{if(J)Y.writePacket(new _q.AuthSwitchResponse(J).toPacket())}).catch((J)=>{Tr(J,X)})}oZ1.exports={authSwitchRequest:Vx6,authSwitchRequestMoreData:Ax6,getAuthPlugin:aZ1,standardAuthPlugins:rZ1}});var X21=o((iV5,Y21)=>{var eZ1=L0("zlib"),tZ1=GU0();class Cr{constructor(){this._queue=[],this._running=!1}push($){if(this._queue.push($),!this._running)this._running=!0,process.nextTick(()=>this._next())}_next(){let $=this._queue.shift();if(!$){this._running=!1;return}$({done:()=>process.nextTick(()=>this._next())})}}function Fx6($){let Y=this,X=$.readInt24(),G=$.readBuffer();if(X!==0)Y.inflateQueue.push((J)=>{eZ1.inflate(G,(Q,W)=>{if(Q){Y._handleNetworkError(Q);return}Y._bumpCompressedSequenceId($.numPackets),Y._inflatedPacketsParser.execute(W),J.done()})});else Y.inflateQueue.push((J)=>{Y._bumpCompressedSequenceId($.numPackets),Y._inflatedPacketsParser.execute(G),J.done()})}function $21($){let X;if($.length>16777210){for(X=0;X<$.length;X+=16777210)$21.call(this,$.slice(X,X+16777210));return}let G=this,J=$.length,Q=Buffer.allocUnsafe(7);(function(W){G.deflateQueue.push((Z)=>{eZ1.deflate($,(K,H)=>{if(K){G._handleFatalError(K);return}let z=H.length;if(z<J)Q.writeUInt8(z&255,0),Q.writeUInt16LE(z>>8,1),Q.writeUInt8(W,3),Q.writeUInt8(J&255,4),Q.writeUInt16LE(J>>8,5),G.writeUncompressed(Q),G.writeUncompressed(H);else z=J,J=0,Q.writeUInt8(z&255,0),Q.writeUInt16LE(z>>8,1),Q.writeUInt8(W,3),Q.writeUInt8(J&255,4),Q.writeUInt16LE(J>>8,5),G.writeUncompressed(Q),G.writeUncompressed($);Z.done()})})})(G.compressedSequenceId),G._bumpCompressedSequenceId(1)}function Dx6($){$._lastWrittenPacketId=0,$._lastReceivedPacketId=0,$._handleCompressedPacket=Fx6,$._inflatedPacketsParser=new tZ1((Y)=>{$.handlePacket(Y)},4),$._inflatedPacketsParser._lastPacket=0,$.packetParser=new tZ1((Y)=>{$._handleCompressedPacket(Y)},7),$.writeUncompressed=$.write,$.write=$21,$.inflateQueue=new Cr,$.deflateQueue=new Cr}Y21.exports={enableCompression:Dx6,Queue:Cr}});var TU0=o((nV5,Q21)=>{var Nx6=XW(),jU0=YW(),jq=h2(),Lx6=EZ(),G21=CL(),{getAuthPlugin:Bx6}=_U0(),{calculateToken:Ox6}=jr();function J21($){let Y=[];for(let X in jq)if($&jq[X])Y.push(X.replace(/_/g," ").toLowerCase());return Y}class Hv extends Nx6{constructor($){super();this.handshake=null,this.clientFlags=$,this.authenticationFactor=0}start(){return Hv.prototype.handshakeInit}sendSSLRequest($){let Y=new jU0.SSLRequest(this.clientFlags,$.config.charsetNumber);$.writePacket(Y.toPacket())}sendCredentials($){if($.config.debug)console.log("Sending handshake packet: flags:%d=(%s)",this.clientFlags,J21(this.clientFlags).join(", "));this.user=$.config.user,this.password=$.config.password,this.password1=$.config.password,this.password2=$.config.password2,this.password3=$.config.password3,this.passwordSha1=$.config.passwordSha1,this.database=$.config.database,this.authPluginName=this.handshake.authPluginName;let Y=this.handshake.authPluginName,X=$.config.ssl||$.config.socketPath,G=this.handshake.authPluginData1&&this.handshake.authPluginData2?Buffer.concat([this.handshake.authPluginData1,this.handshake.authPluginData2]).slice(0,20):Buffer.alloc(20),J=$.config.authPlugins&&Object.prototype.hasOwnProperty.call($.config.authPlugins,Y),Q=typeof $.config.authSwitchHandler==="function",Z=!J&&!Q&&this.canUseAuthMethodDirectly(Y,X)&&(Y!=="mysql_clear_password"||$.config.enableCleartextPlugin)?Y:"mysql_native_password",K=this.calculateAuthToken(Z,this.password,G);if($.config.debug)console.log("Server auth method: %s, Using auth method: %s",Y,Z);let H=new jU0.HandshakeResponse({flags:this.clientFlags,user:this.user,database:this.database,password:this.password,passwordSha1:this.passwordSha1,charsetNumber:$.config.charsetNumber,authPluginData1:this.handshake.authPluginData1,authPluginData2:this.handshake.authPluginData2,compress:$.config.compress,connectAttributes:$.config.connectAttributes,authToken:K,authPluginName:Z});if($.writePacket(H.toPacket()),Z!=="mysql_native_password")this.initializeAuthPlugin(Z,G,$)}calculateNativePasswordAuthToken($){let Y=$.slice(0,8),X=$.slice(8,20),G;if(this.passwordSha1)G=G21.calculateTokenFromPasswordSha(this.passwordSha1,Y,X);else G=G21.calculateToken(this.password,Y,X);return G}calculateSha256Token($,Y){return Ox6($,Y)}calculateAuthToken($,Y,X){switch($){case"mysql_native_password":return this.calculateNativePasswordAuthToken(X);case"caching_sha2_password":return this.calculateSha256Token(Y,X);case"sha256_password":case"mysql_clear_password":return Y?Buffer.from(`${Y}\x00`,"utf8"):Buffer.alloc(0);default:return this.calculateNativePasswordAuthToken(X)}}canUseAuthMethodDirectly($,Y){switch($){case"mysql_native_password":case"caching_sha2_password":return!0;case"sha256_password":case"mysql_clear_password":return Y;default:return!1}}initializeAuthPlugin($,Y,X){let G=Bx6($,X);if(!G)return;let J=G({connection:X,command:this});X._authPlugin=J;try{Promise.resolve(J(Y)).catch((Q)=>{if(X.config.debug)console.log("Auth plugin initialization:",Q.message)})}catch(Q){if(X.config.debug)console.log("Auth plugin initialization error:",Q.message)}}handshakeInit($,Y){if(this.on("error",(J)=>{Y._fatalError=J,Y._protocolError=J}),this.handshake=jU0.Handshake.fromPacket($),Y.config.debug)console.log("Server hello packet: capability flags:%d=(%s)",this.handshake.capabilityFlags,J21(this.handshake.capabilityFlags).join(", "));Y.serverCapabilityFlags=this.handshake.capabilityFlags,Y.serverEncoding=Lx6[this.handshake.characterSet],Y.connectionId=this.handshake.connectionId;let X=this.handshake.capabilityFlags&jq.SSL,G=this.handshake.capabilityFlags&jq.MULTI_FACTOR_AUTHENTICATION;if(this.clientFlags=this.clientFlags|G,Y.config.compress=Y.config.compress&&this.handshake.capabilityFlags&jq.COMPRESS,this.clientFlags=this.clientFlags|Y.config.compress,Y.config.ssl){if(!X){let J=Error("Server does not support secure connection");return J.code="HANDSHAKE_NO_SSL_SUPPORT",J.fatal=!0,this.emit("error",J),!1}this.clientFlags|=jq.SSL,this.sendSSLRequest(Y),Y.startTLS((J)=>{if(J){J.code="HANDSHAKE_SSL_ERROR",J.fatal=!0,this.emit("error",J);return}this.sendCredentials(Y)})}else this.sendCredentials(Y);if(G)this.authenticationFactor=1;return Hv.prototype.handshakeResult}handshakeResult($,Y){let X=$.peekByte();if(X===254||X===1||X===2){let G=_U0();try{if(X===1)G.authSwitchRequestMoreData($,Y,this);else{if(this.authenticationFactor!==0)Y.config.password=this[`password${this.authenticationFactor}`],this.authenticationFactor+=1;G.authSwitchRequest($,Y,this)}return Hv.prototype.handshakeResult}catch(J){if(!J.code)J.code="AUTH_SWITCH_PLUGIN_ERROR";if(J.fatal=!0,this.onResult)this.onResult(J);else this.emit("error",J);return null}}if(X!==0){let G=Error("Unexpected packet during handshake phase");if(G.code="HANDSHAKE_UNKNOWN_ERROR",G.fatal=!0,this.onResult)this.onResult(G);else this.emit("error",G);return null}if(!Y.authorized){if(Y.authorized=!0,Y.config.compress){let G=X21().enableCompression;G(Y)}}if(this.onResult)this.onResult(null);return null}}Q21.exports=Hv});var Z21=o((rV5,W21)=>{var kL=OZ(),Sr=Hr(),Ex6=XW(),CU0=YW();class zv extends Ex6{constructor($){super();this.args=$}start($,Y){let X=new CU0.Handshake(this.args);return this.serverHello=X,X.setScrambleData((G)=>{if(G){Y.emit("error",Error("Error generating random bytes"));return}Y.writePacket(X.toPacket(0))}),zv.prototype.readClientReply}readClientReply($,Y){let X=CU0.HandshakeResponse.fromPacket($,this.args.capabilityFlags);if(Y.clientHelloReply=X,this.args.authCallback)this.args.authCallback({user:X.user,database:X.database,address:Y.stream.remoteAddress,authPluginData1:this.serverHello.authPluginData1,authPluginData2:this.serverHello.authPluginData2,authToken:X.authToken},(G,J)=>{if(!J)Y.writeOk();else Y.writeError({message:J.message||"",code:J.code||1045}),Y.close()});else Y.writeOk();return zv.prototype.dispatchCommands}_isStatement($,Y){return $.split(" ")[0].toUpperCase()===Y}dispatchCommands($,Y){let X=!0,G=Y.clientHelloReply.encoding,J=$.readInt8();switch(J){case kL.STMT_PREPARE:if(Y.listeners("stmt_prepare").length){let Q=$.readString(void 0,G);Y.emit("stmt_prepare",Q)}else Y.writeError({code:Sr.HA_ERR_INTERNAL_ERROR,message:"No query handler for prepared statements."});break;case kL.STMT_EXECUTE:if(Y.listeners("stmt_execute").length){let{stmtId:Q,flags:W,iterationCount:Z,values:K}=CU0.Execute.fromPacket($,G);Y.emit("stmt_execute",Q,W,Z,K)}else Y.writeError({code:Sr.HA_ERR_INTERNAL_ERROR,message:"No query handler for execute statements."});break;case kL.QUIT:if(Y.listeners("quit").length)Y.emit("quit");else Y.stream.end();break;case kL.INIT_DB:if(Y.listeners("init_db").length){let Q=$.readString(void 0,G);Y.emit("init_db",Q)}else Y.writeOk();break;case kL.QUERY:if(Y.listeners("query").length){let Q=$.readString(void 0,G);if(this._isStatement(Q,"PREPARE")||this._isStatement(Q,"SET"))Y.emit("stmt_prepare",Q);else if(this._isStatement(Q,"EXECUTE"))Y.emit("stmt_execute",null,null,null,null,Q);else Y.emit("query",Q)}else Y.writeError({code:Sr.HA_ERR_INTERNAL_ERROR,message:"No query handler"});break;case kL.FIELD_LIST:if(Y.listeners("field_list").length){let Q=$.readNullTerminatedString(G),W=$.readString(void 0,G);Y.emit("field_list",Q,W)}else Y.writeError({code:Sr.ER_WARN_DEPRECATED_SYNTAX,message:"As of MySQL 5.7.11, COM_FIELD_LIST is deprecated and will be removed in a future version of MySQL."});break;case kL.PING:if(Y.listeners("ping").length)Y.emit("ping");else Y.writeOk();break;default:X=!1}if(Y.listeners("packet").length)Y.emit("packet",$.clone(),X,J);else if(!X)console.log("Unknown command:",J);return zv.prototype.dispatchCommands}}W21.exports=zv});var Vv=o((Ix6)=>{function U21($){return JSON.stringify({[$]:1}).slice(1,-3)}Ix6.srcEscape=U21;var SU0,K21=!1;try{SU0=(()=>{throw new Error("Cannot require module "+"cardinal");})().highlight}catch{SU0=($)=>{if(!K21)console.log("For nicer debug output consider install cardinal@^2.0.0"),K21=!0;return $}}function Mx6($,Y){console.log(`

${$}:
`),console.log(`${SU0(Y)}
`)}Ix6.printDebugWithCode=Mx6;function Rx6($,Y,X){if(Array.isArray(Y))return Y.some((G)=>$===X[G]);return!!Y}Ix6.typeMatch=Rx6;var H21=new Set(["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__"]);Ix6.privateObjectProps=H21;var qx6=($,Y=!0)=>{if(H21.has($))throw Error(`The field name (${$}) can't be the same as an object's private property.`);return Y?U21($):$};Ix6.fieldEscape=qx6});var V21=o((sV5,z21)=>{function Cx6($){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test($)}z21.exports=Cx6});var kU0=o((oV5,M21)=>{var A21=L0("util"),L21=V21(),F21=/[\{\[]/,D21=/[\}\]]/,N21=["do","if","in","for","let","new","try","var","case","else","enum","eval","null","this","true","void","with","await","break","catch","class","const","false","super","throw","while","yield","delete","export","import","public","return","static","switch","typeof","default","extends","finally","package","private","continue","debugger","function","arguments","interface","protected","implements","instanceof","NaN","undefined"],B21={};for(Av=0;Av<N21.length;Av++)B21[N21[Av]]=!0;var Av,Sx6=function($){return L21($)&&!B21.hasOwnProperty($)},O21={s:function($){return""+$},d:function($){return""+Number($)},o:function($){return JSON.stringify($)}},E21=function(){var $=[],Y=0,X={},G=function(W){var Z="";while(Z.length<Y*2)Z+="  ";$.push(Z+W)},J=function(W){if(D21.test(W.trim()[0])&&F21.test(W[W.length-1])){Y--,G(W),Y++;return}if(F21.test(W[W.length-1])){G(W),Y++;return}if(D21.test(W.trim()[0])){Y--,G(W);return}G(W)},Q=function(W){if(!W)return Q;if(arguments.length===1&&W.indexOf(`
`)>-1){var Z=W.trim().split(`
`);for(var K=0;K<Z.length;K++)J(Z[K].trim())}else J(A21.format.apply(A21,arguments));return Q};if(Q.scope={},Q.formats=O21,Q.sym=function(W){if(!W||!Sx6(W))W="tmp";if(!X[W])X[W]=0;return W+(X[W]++||"")},Q.property=function(W,Z){if(arguments.length===1)Z=W,W="";if(Z=Z+"",L21(Z))return W?W+"."+Z:Z;return W?W+"["+JSON.stringify(Z)+"]":JSON.stringify(Z)},Q.toString=function(){return $.join(`
`)},Q.toFunction=function(W){if(!W)W={};var Z="return ("+Q.toString()+")";Object.keys(Q.scope).forEach(function(z){if(!W[z])W[z]=Q.scope[z]});var K=Object.keys(W).map(function(z){return z}),H=K.map(function(z){return W[z]});return Function.apply(null,K.concat(Z)).apply(null,H)},arguments.length)Q.apply(null,arguments);return Q};E21.formats=O21;M21.exports=E21});var I21=o((tV5,q21)=>{var w7=eQ(),kx6=PA(),oH=Vv(),vx6=kU0(),xx6=Yv(),R21=[];for(let $ in w7)R21[w7[$]]=$;function yx6($,Y,X,G,J){let Q=Boolean(J.supportBigNumbers||G.supportBigNumbers),W=Boolean(J.bigNumberStrings||G.bigNumberStrings),Z=J.timezone||G.timezone,K=J.dateStrings||G.dateStrings;switch($){case w7.TINY:case w7.SHORT:case w7.LONG:case w7.INT24:case w7.YEAR:return"packet.parseLengthCodedIntNoBigCheck()";case w7.LONGLONG:if(Q&&W)return"packet.parseLengthCodedIntString()";return`packet.parseLengthCodedInt(${Q})`;case w7.FLOAT:case w7.DOUBLE:return"packet.parseLengthCodedFloat()";case w7.NULL:return"packet.readLengthCodedNumber()";case w7.DECIMAL:case w7.NEWDECIMAL:if(G.decimalNumbers)return"packet.parseLengthCodedFloat()";return'packet.readLengthCodedString("ascii")';case w7.DATE:if(oH.typeMatch($,K,w7))return'packet.readLengthCodedString("ascii")';return`packet.parseDate(${oH.srcEscape(Z)})`;case w7.DATETIME:case w7.TIMESTAMP:if(oH.typeMatch($,K,w7))return'packet.readLengthCodedString("ascii")';return`packet.parseDateTime(${oH.srcEscape(Z)})`;case w7.TIME:return'packet.readLengthCodedString("ascii")';case w7.GEOMETRY:return"packet.parseGeometryValue()";case w7.VECTOR:return"packet.parseVector()";case w7.JSON:return G.jsonStrings?'packet.readLengthCodedString("utf8")':'JSON.parse(packet.readLengthCodedString("utf8"))';default:if(Y===kx6.BINARY)return"packet.readLengthCodedBuffer()";return`packet.readLengthCodedString(${X})`}}function bx6($,Y,X){if(typeof X.typeCast==="function"&&typeof Y.typeCast!=="function")Y.typeCast=X.typeCast;function G(z,V){return{type:R21[z.columnType],length:z.columnLength,db:z.schema,table:z.table,name:z.name,string:function(A=z.encoding){if(z.columnType===w7.JSON&&A===z.encoding)console.warn(`typeCast: JSON column "${z.name}" is interpreted as BINARY by default, recommended to manually set utf8 encoding: \`field.string("utf8")\``);return V.packet.readLengthCodedString(A)},buffer:function(){return V.packet.readLengthCodedBuffer()},geometry:function(){return V.packet.parseGeometryValue()}}}let J=vx6();if(J("(function () {")("return class TextRow {"),J("constructor(fields) {"),typeof Y.typeCast==="function")J("const _this = this;"),J("for(let i=0; i<fields.length; ++i) {"),J("this[`wrap${i}`] = wrap(fields[i], _this);"),J("}");if(J("}"),J("next(packet, fields, options) {"),J("this.packet = packet;"),Y.rowsAsArray)J(`const result = new Array(${$.length});`);else J("const result = {};");let Q={},W=[];if(Y.nestTables===!0){for(let z=0;z<$.length;z++)Q[$[z].table]=1;W=Object.keys(Q);for(let z=0;z<W.length;z++)J(`result[${oH.fieldEscape(W[z])}] = {};`)}let Z="",K="",H="";for(let z=0;z<$.length;z++){if(K=oH.fieldEscape($[z].name),typeof Y.nestTables==="string")Z=`result[${oH.fieldEscape($[z].table+Y.nestTables+$[z].name)}]`;else if(Y.nestTables===!0)H=oH.fieldEscape($[z].table),J(`if (!result[${H}]) result[${H}] = {};`),Z=`result[${H}][${K}]`;else if(Y.rowsAsArray)Z=`result[${z.toString(10)}]`;else Z=`result[${K}]`;if(Y.typeCast===!1)J(`${Z} = packet.readLengthCodedBuffer();`);else{let V=`fields[${z}].encoding`,A=yx6($[z].columnType,$[z].characterSet,V,X,Y);if(typeof Y.typeCast==="function")J(`${Z} = options.typeCast(this.wrap${z}, function() { return ${A} });`);else J(`${Z} = ${A};`)}}if(J("return result;"),J("}"),J("};")("})()"),X.debug)oH.printDebugWithCode("Compiled text protocol row parser",J.toString());if(typeof Y.typeCast==="function")return J.toFunction({wrap:G});return J.toFunction()}function hx6($,Y,X){return xx6.getParser("text",$,Y,X,bx6)}q21.exports=hx6});var _21=o((eV5,w21)=>{var _7=eQ(),fx6=PA(),vL=Vv(),P21=[];for(let $ in _7)P21[_7[$]]=$;function gx6({packet:$,type:Y,charset:X,encoding:G,config:J,options:Q}){let W=Boolean(Q.supportBigNumbers||J.supportBigNumbers),Z=Boolean(Q.bigNumberStrings||J.bigNumberStrings),K=Q.timezone||J.timezone,H=Q.dateStrings||J.dateStrings;switch(Y){case _7.TINY:case _7.SHORT:case _7.LONG:case _7.INT24:case _7.YEAR:return $.parseLengthCodedIntNoBigCheck();case _7.LONGLONG:if(W&&Z)return $.parseLengthCodedIntString();return $.parseLengthCodedInt(W);case _7.FLOAT:case _7.DOUBLE:return $.parseLengthCodedFloat();case _7.NULL:case _7.DECIMAL:case _7.NEWDECIMAL:if(J.decimalNumbers)return $.parseLengthCodedFloat();return $.readLengthCodedString("ascii");case _7.DATE:if(vL.typeMatch(Y,H,_7))return $.readLengthCodedString("ascii");return $.parseDate(K);case _7.DATETIME:case _7.TIMESTAMP:if(vL.typeMatch(Y,H,_7))return $.readLengthCodedString("ascii");return $.parseDateTime(K);case _7.TIME:return $.readLengthCodedString("ascii");case _7.GEOMETRY:return $.parseGeometryValue();case _7.VECTOR:return $.parseVector();case _7.JSON:return J.jsonStrings?$.readLengthCodedString("utf8"):JSON.parse($.readLengthCodedString("utf8"));default:if(X===fx6.BINARY)return $.readLengthCodedBuffer();return $.readLengthCodedString(G)}}function mx6($,Y){return{type:P21[$.columnType],length:$.columnLength,db:$.schema,table:$.table,name:$.name,string:function(X=$.encoding){if($.columnType===_7.JSON&&X===$.encoding)console.warn(`typeCast: JSON column "${$.name}" is interpreted as BINARY by default, recommended to manually set utf8 encoding: \`field.string("utf8")\``);return Y.readLengthCodedString(X)},buffer:function(){return Y.readLengthCodedBuffer()},geometry:function(){return Y.parseGeometryValue()}}}function ux6($,Y,X){return{next(G,J,Q){let W=Q.rowsAsArray?[]:{};for(let Z=0;Z<J.length;Z++){let K=J[Z],H=Q.typeCast?Q.typeCast:X.typeCast,z=()=>gx6({packet:G,type:K.columnType,encoding:K.encoding,charset:K.characterSet,config:X,options:Q}),V;if(Q.typeCast===!1)V=G.readLengthCodedBuffer();else if(typeof H==="function")V=H(mx6(K,G),z);else V=z();if(Q.rowsAsArray)W.push(V);else if(typeof Q.nestTables==="string")W[`${vL.fieldEscape(K.table,!1)}${Q.nestTables}${vL.fieldEscape(K.name,!1)}`]=V;else if(Q.nestTables){let A=vL.fieldEscape(K.table,!1);if(!W[A])W[A]={};W[A][vL.fieldEscape(K.name,!1)]=V}else W[vL.fieldEscape(K.name,!1)]=V}return W}}}w21.exports=ux6});var yU0=o(($A5,C21)=>{var j21=L0("process"),vU0=L0("timers"),px6=L0("stream").Readable,dx6=XW(),Tq=YW(),cx6=I21(),lx6=_21(),T21=LU0(),xU0=new Tq.Packet(0,Buffer.allocUnsafe(4),0,4);class tH extends dx6{constructor($,Y){super();this.sql=$.sql,this.values=$.values,this._queryOptions=$,this.namedPlaceholders=$.namedPlaceholders||!1,this.onResult=Y,this.timeout=$.timeout,this.queryTimeout=null,this._fieldCount=0,this._rowParser=null,this._fields=[],this._rows=[],this._receivedFieldsCount=0,this._resultIndex=0,this._localStream=null,this._unpipeStream=function(){},this._streamFactory=$.infileStreamFactory,this._connection=null}then(){throw console.log("You have tried to call .then(), .catch(), or invoked await on the result of query that is not a promise, which is a programming error. Try calling con.promise().query(), or require('mysql2/promise') instead of 'mysql2' for a promise-compatible version of the query interface. To learn how to use async/await or Promises check out documentation at https://sidorares.github.io/node-mysql2/docs#using-promise-wrapper, or the mysql2 documentation at https://sidorares.github.io/node-mysql2/docs/documentation/promise-wrapper"),Error("You have tried to call .then(), .catch(), or invoked await on the result of query that is not a promise, which is a programming error. Try calling con.promise().query(), or require('mysql2/promise') instead of 'mysql2' for a promise-compatible version of the query interface. To learn how to use async/await or Promises check out documentation at https://sidorares.github.io/node-mysql2/docs#using-promise-wrapper, or the mysql2 documentation at https://sidorares.github.io/node-mysql2/docs/documentation/promise-wrapper")}start($,Y){if(Y.config.debug)console.log("        Sending query command: %s",this.sql);this._connection=Y,this.options=Object.assign({},Y.config,this._queryOptions),this._setTimeout();let X=Y.config.clientFlags&(Y.serverCapabilityFlags||0),G=new Tq.Query(this.sql,Y.config.charsetNumber,this._queryOptions.attributes,X);return Y.writePacket(G.toPacket(1)),tH.prototype.resultsetHeader}done(){if(this._unpipeStream(),this.timeout&&!this.queryTimeout)return null;if(this.queryTimeout)vU0.clearTimeout(this.queryTimeout),this.queryTimeout=null;if(this.onResult){let $,Y;if(this._resultIndex===0)$=this._rows[0],Y=this._fields[0];else $=this._rows,Y=this._fields;if(Y)j21.nextTick(()=>{this.onResult(null,$,Y)});else j21.nextTick(()=>{this.onResult(null,$)})}return null}doneInsert($){if(this._localStreamError){if(this.onResult)this.onResult(this._localStreamError,$);else this.emit("error",this._localStreamError);return null}if(this._rows.push($),this._fields.push(void 0),this.emit("fields",void 0),this.emit("result",$),$.serverStatus&T21.SERVER_MORE_RESULTS_EXISTS)return this._resultIndex++,this.resultsetHeader;return this.done()}resultsetHeader($,Y){let X=new Tq.ResultSetHeader($,Y);if(this._fieldCount=X.fieldCount,Y.config.debug)console.log(`        Resultset header received, expecting ${X.fieldCount} column definition packets`);if(this._fieldCount===0)return this.doneInsert(X);if(this._fieldCount===null)return this._streamLocalInfile(Y,X.infileName);return this._receivedFieldsCount=0,this._rows.push([]),this._fields.push([]),this.readField}_streamLocalInfile($,Y){if(this._streamFactory)this._localStream=this._streamFactory(Y);else return this._localStreamError=Error(`As a result of LOCAL INFILE command server wants to read ${Y} file, but as of v2.0 you must provide streamFactory option returning ReadStream.`),$.writePacket(xU0),this.infileOk;let X=()=>{this._unpipeStream()},G=()=>{this._localStream.resume()},J=()=>{this._localStream.pause()},Q=function(K){let H=Buffer.allocUnsafe(K.length+4);K.copy(H,4),$.writePacket(new Tq.Packet(0,H,0,H.length))},W=()=>{$.removeListener("error",X),$.writePacket(xU0)},Z=(K)=>{this._localStreamError=K,$.removeListener("error",X),$.writePacket(xU0)};return this._unpipeStream=()=>{$.stream.removeListener("pause",J),$.stream.removeListener("drain",G),this._localStream.removeListener("data",Q),this._localStream.removeListener("end",W),this._localStream.removeListener("error",Z)},$.stream.on("pause",J),$.stream.on("drain",G),this._localStream.on("data",Q),this._localStream.on("end",W),this._localStream.on("error",Z),$.once("error",X),this.infileOk}readField($,Y){if(this._receivedFieldsCount++,this._fields[this._resultIndex].length!==this._fieldCount){let X=new Tq.ColumnDefinition($,Y.clientEncoding);if(this._fields[this._resultIndex].push(X),Y.config.debug)console.log("        Column definition:"),console.log(`          name: ${X.name}`),console.log(`          type: ${X.columnType}`),console.log(`         flags: ${X.flags}`)}if(this._receivedFieldsCount===this._fieldCount){let X=this._fields[this._resultIndex];if(this.emit("fields",X),this.options.disableEval)this._rowParser=lx6(X,this.options,Y.config);else this._rowParser=new(cx6(X,this.options,Y.config))(X);return tH.prototype.fieldsEOF}return tH.prototype.readField}fieldsEOF($,Y){if(!$.isEOF())return Y.protocolError("Expected EOF packet");return this.row}row($,Y){if($.isEOF()){if($.eofStatusFlags()&T21.SERVER_MORE_RESULTS_EXISTS)return this._resultIndex++,tH.prototype.resultsetHeader;return this.done()}let X;try{X=this._rowParser.next($,this._fields[this._resultIndex],this.options)}catch(G){return this._localStreamError=G,this.doneInsert(null)}if(this.onResult)this._rows[this._resultIndex].push(X);else this.emit("result",X,this._resultIndex);return tH.prototype.row}infileOk($,Y){let X=new Tq.ResultSetHeader($,Y);return this.doneInsert(X)}stream($){$=$||Object.create(null),$.objectMode=!0;let Y=new px6({...$,emitClose:!0,autoDestroy:!0,read:()=>{this._connection&&this._connection.resume()}});Y.once("close",()=>{if(!Y.readableEnded)Y.emit("end")});let X=(W,Z)=>{if(Y.destroyed)return;if(!Y.push(W))this._connection&&this._connection.pause();Y.emit("result",W,Z)},G=(W)=>{if(Y.destroyed)return;Y.emit("fields",W)},J=()=>{if(Y.destroyed)return;Y.push(null)},Q=(W)=>{Y.destroy(W)};return Y._destroy=(W,Z)=>{this._connection&&this._connection.resume(),this.removeListener("result",X),this.removeListener("fields",G),this.removeListener("end",J),this.removeListener("error",Q),Z(W)},this.on("result",X),this.on("fields",G),this.on("end",J),this.on("error",Q),Y}_setTimeout(){if(this.timeout){let $=this._handleTimeoutError.bind(this);this.queryTimeout=vU0.setTimeout($,this.timeout)}}_handleTimeoutError(){if(this.queryTimeout)vU0.clearTimeout(this.queryTimeout),this.queryTimeout=null;let $=Error("Query inactivity timeout");if($.errorno="PROTOCOL_SEQUENCE_TIMEOUT",$.code="PROTOCOL_SEQUENCE_TIMEOUT",$.syscall="query",this.onResult)this.onResult($);else this.emit("error",$)}}tH.prototype.catch=tH.prototype.then;C21.exports=tH});var bU0=o((YA5,k21)=>{var ix6=XW(),nx6=YW();class S21 extends ix6{constructor($){super();this.id=$}start($,Y){return Y.writePacket(new nx6.CloseStatement(this.id).toPacket(1)),null}}k21.exports=S21});var b21=o((XA5,y21)=>{var v21=Pr(),rx6=PA(),k9=eQ(),Cq=Vv(),ax6=kU0(),sx6=Yv(),x21=[];for(let $ in k9)x21[k9[$]]=$;function ox6($,Y,X,G){let J=Boolean(X.supportBigNumbers||Y.supportBigNumbers),Q=Boolean(X.bigNumberStrings||Y.bigNumberStrings),W=X.timezone||Y.timezone,Z=X.dateStrings||Y.dateStrings,K=$.flags&v21.UNSIGNED;switch($.columnType){case k9.TINY:return K?"packet.readInt8();":"packet.readSInt8();";case k9.SHORT:return K?"packet.readInt16();":"packet.readSInt16();";case k9.LONG:case k9.INT24:return K?"packet.readInt32();":"packet.readSInt32();";case k9.YEAR:return"packet.readInt16()";case k9.FLOAT:return"packet.readFloat();";case k9.DOUBLE:return"packet.readDouble();";case k9.NULL:return"null;";case k9.DATE:case k9.DATETIME:case k9.TIMESTAMP:case k9.NEWDATE:if(Cq.typeMatch($.columnType,Z,k9))return`packet.readDateTimeString(${parseInt($.decimals,10)}, null, ${$.columnType});`;return`packet.readDateTime(${Cq.srcEscape(W)});`;case k9.TIME:return"packet.readTimeString()";case k9.DECIMAL:case k9.NEWDECIMAL:if(Y.decimalNumbers)return"packet.parseLengthCodedFloat();";return'packet.readLengthCodedString("ascii");';case k9.GEOMETRY:return"packet.parseGeometryValue();";case k9.VECTOR:return"packet.parseVector()";case k9.JSON:return Y.jsonStrings?'packet.readLengthCodedString("utf8")':'JSON.parse(packet.readLengthCodedString("utf8"));';case k9.LONGLONG:if(!J)return K?"packet.readInt64JSNumber();":"packet.readSInt64JSNumber();";if(Q)return K?"packet.readInt64String();":"packet.readSInt64String();";return K?"packet.readInt64();":"packet.readSInt64();";default:if($.characterSet===rx6.BINARY)return"packet.readLengthCodedBuffer();";return`packet.readLengthCodedString(fields[${G}].encoding)`}}function tx6($,Y,X){let G=ax6(),J=Math.floor(($.length+7+2)/8);function Q(V,A){return{type:x21[V.columnType],length:V.columnLength,db:V.schema,table:V.table,name:V.name,string:function(F=V.encoding){if(V.columnType===k9.JSON&&F===V.encoding)console.warn(`typeCast: JSON column "${V.name}" is interpreted as BINARY by default, recommended to manually set utf8 encoding: \`field.string("utf8")\``);if([k9.DATETIME,k9.NEWDATE,k9.TIMESTAMP,k9.DATE].includes(V.columnType))return A.readDateTimeString(parseInt(V.decimals,10)," ",V.columnType);if(V.columnType===k9.TINY){let N=V.flags&v21.UNSIGNED;return String(N?A.readInt8():A.readSInt8())}if(V.columnType===k9.TIME)return A.readTimeString();return A.readLengthCodedString(F)},buffer:function(){return A.readLengthCodedBuffer()},geometry:function(){return A.parseGeometryValue()}}}if(G("(function(){"),G("return class BinaryRow {"),G("constructor() {"),G("}"),G("next(packet, fields, options) {"),Y.rowsAsArray)G(`const result = new Array(${$.length});`);else G("const result = {};");if(typeof X.typeCast==="function"&&typeof Y.typeCast!=="function")Y.typeCast=X.typeCast;G("packet.readInt8();");for(let V=0;V<J;++V)G(`const nullBitmaskByte${V} = packet.readInt8();`);let W="",Z=4,K=0,H="",z="";for(let V=0;V<$.length;V++){if(H=Cq.fieldEscape($[V].name),typeof Y.nestTables==="string")W=`result[${Cq.fieldEscape($[V].table+Y.nestTables+$[V].name)}]`;else if(Y.nestTables===!0)z=Cq.fieldEscape($[V].table),G(`if (!result[${z}]) result[${z}] = {};`),W=`result[${z}][${H}]`;else if(Y.rowsAsArray)W=`result[${V.toString(10)}]`;else W=`result[${H}]`;if(G(`if (nullBitmaskByte${K} & ${Z}) `),G(`${W} = null;`),G("else {"),Y.typeCast===!1)G(`${W} = packet.readLengthCodedBuffer();`);else{let A=`fieldWrapper${V}`;G(`const ${A} = wrap(fields[${V}], packet);`);let F=ox6($[V],X,Y,V);if(typeof Y.typeCast==="function")G(`${W} = options.typeCast(${A}, function() { return ${F} });`);else G(`${W} = ${F};`)}if(G("}"),Z*=2,Z===256)Z=1,K++}if(G("return result;"),G("}"),G("};")("})()"),X.debug)Cq.printDebugWithCode("Compiled binary protocol row parser",G.toString());return G.toFunction({wrap:Q})}function ex6($,Y,X){return sx6.getParser("binary",$,Y,X,tx6)}y21.exports=ex6});var m21=o((GA5,g21)=>{var h21=Pr(),$y6=PA(),v9=eQ(),Fv=Vv(),f21=[];for(let $ in v9)f21[v9[$]]=$;function Yy6($,Y,X){function G(J,Q,W,Z,K){let H=Boolean(W.supportBigNumbers||Q.supportBigNumbers),z=Boolean(W.bigNumberStrings||Q.bigNumberStrings),V=W.timezone||Q.timezone,A=W.dateStrings||Q.dateStrings,F=J.flags&h21.UNSIGNED;switch(J.columnType){case v9.TINY:return F?K.readInt8():K.readSInt8();case v9.SHORT:return F?K.readInt16():K.readSInt16();case v9.LONG:case v9.INT24:return F?K.readInt32():K.readSInt32();case v9.YEAR:return K.readInt16();case v9.FLOAT:return K.readFloat();case v9.DOUBLE:return K.readDouble();case v9.NULL:return null;case v9.DATE:case v9.DATETIME:case v9.TIMESTAMP:case v9.NEWDATE:return Fv.typeMatch(J.columnType,A,v9)?K.readDateTimeString(parseInt(J.decimals,10),null,J.columnType):K.readDateTime(V);case v9.TIME:return K.readTimeString();case v9.DECIMAL:case v9.NEWDECIMAL:return Q.decimalNumbers?K.parseLengthCodedFloat():K.readLengthCodedString("ascii");case v9.GEOMETRY:return K.parseGeometryValue();case v9.VECTOR:return K.parseVector();case v9.JSON:return Q.jsonStrings?K.readLengthCodedString("utf8"):JSON.parse(K.readLengthCodedString("utf8"));case v9.LONGLONG:if(!H)return F?K.readInt64JSNumber():K.readSInt64JSNumber();return z?F?K.readInt64String():K.readSInt64String():F?K.readInt64():K.readSInt64();default:return J.characterSet===$y6.BINARY?K.readLengthCodedBuffer():K.readLengthCodedString($[Z].encoding)}}return class{constructor(){}next(Q,W,Z){Q.readInt8();let K=Math.floor((W.length+7+2)/8),H=Array(K);for(let F=0;F<K;F++)H[F]=Q.readInt8();let z=Z.rowsAsArray?Array(W.length):{},V=4,A=0;for(let F=0;F<W.length;F++){let N=W[F],D=Z.typeCast!==void 0?Z.typeCast:X.typeCast,L;if(H[A]&V)L=null;else if(Z.typeCast===!1)L=Q.readLengthCodedBuffer();else{let B=()=>G(N,X,Z,F,Q);L=typeof D==="function"?D({type:f21[N.columnType],length:N.columnLength,db:N.schema,table:N.table,name:N.name,string:function(O=N.encoding){if(N.columnType===v9.JSON&&O===N.encoding)console.warn(`typeCast: JSON column "${N.name}" is interpreted as BINARY by default, recommended to manually set utf8 encoding: \`field.string("utf8")\``);if([v9.DATETIME,v9.NEWDATE,v9.TIMESTAMP,v9.DATE].includes(N.columnType))return Q.readDateTimeString(parseInt(N.decimals,10)," ",N.columnType);if(N.columnType===v9.TINY){let E=N.flags&h21.UNSIGNED;return String(E?Q.readInt8():Q.readSInt8())}if(N.columnType===v9.TIME)return Q.readTimeString();return Q.readLengthCodedString(O)},buffer:function(){return Q.readLengthCodedBuffer()},geometry:function(){return Q.parseGeometryValue()}},B):B()}if(Z.rowsAsArray)z[F]=L;else if(typeof Z.nestTables==="string"){let B=Fv.fieldEscape(N.table+Z.nestTables+N.name,!1);z[B]=L}else if(Z.nestTables===!0){let B=Fv.fieldEscape(N.table,!1);if(!z[B])z[B]={};let O=Fv.fieldEscape(N.name,!1);z[B][O]=L}else{let B=Fv.fieldEscape(N.name,!1);z[B]=L}if(V*=2,V===256)V=1,A++}return z}}}g21.exports=Yy6});var hU0=o((JA5,p21)=>{var Xy6=XW(),eH=yU0(),u21=YW(),Gy6=b21(),Jy6=m21();class PG extends Xy6{constructor($,Y){super();this.statement=$.statement,this.sql=$.sql,this.values=$.values,this.onResult=Y,this.parameters=$.values,this.insertId=0,this.timeout=$.timeout,this.queryTimeout=null,this._rows=[],this._fields=[],this._result=[],this._fieldCount=0,this._rowParser=null,this._executeOptions=$,this._resultIndex=0,this._localStream=null,this._unpipeStream=function(){},this._streamFactory=$.infileStreamFactory,this._connection=null}buildParserFromFields($,Y){if(this.options.disableEval)return Jy6($,this.options,Y.config);return Gy6($,this.options,Y.config)}start($,Y){this._connection=Y,this.options=Object.assign({},Y.config,this._executeOptions),this._setTimeout();let X=Y.config.clientFlags&(Y.serverCapabilityFlags||0),G=new u21.Execute(this.statement.id,this.parameters,Y.config.charsetNumber,Y.config.timezone,this._executeOptions.attributes,X);try{Y.writePacket(G.toPacket(1))}catch(J){this.onResult(J)}return PG.prototype.resultsetHeader}readField($,Y){let X,G=new u21.ColumnDefinition($,Y.clientEncoding);if(this._receivedFieldsCount++,this._fields[this._resultIndex].push(G),this._receivedFieldsCount===this._fieldCount)return X=this._fields[this._resultIndex],this.emit("fields",X,this._resultIndex),PG.prototype.fieldsEOF;return PG.prototype.readField}fieldsEOF($,Y){if(!$.isEOF())return Y.protocolError("Expected EOF packet");return this._rowParser=new(this.buildParserFromFields(this._fields[this._resultIndex],Y)),PG.prototype.row}}PG.prototype.done=eH.prototype.done;PG.prototype.doneInsert=eH.prototype.doneInsert;PG.prototype.resultsetHeader=eH.prototype.resultsetHeader;PG.prototype._findOrCreateReadStream=eH.prototype._findOrCreateReadStream;PG.prototype._streamLocalInfile=eH.prototype._streamLocalInfile;PG.prototype._setTimeout=eH.prototype._setTimeout;PG.prototype._handleTimeoutError=eH.prototype._handleTimeoutError;PG.prototype.row=eH.prototype.row;PG.prototype.stream=eH.prototype.stream;p21.exports=PG});var l21=o((QA5,c21)=>{var kr=YW(),Qy6=XW(),Wy6=bU0(),Zy6=hU0();class d21{constructor($,Y,X,G,J){this.query=$,this.id=Y,this.columns=X,this.parameters=G,this.rowParser=null,this._connection=J}close(){return this._connection.addCommand(new Wy6(this.id))}execute($,Y){if(typeof $==="function")Y=$,$=[];return this._connection.addCommand(new Zy6({statement:this,values:$},Y))}}class s3 extends Qy6{constructor($,Y){super();this.query=$.sql,this.onResult=Y,this.id=0,this.fieldCount=0,this.parameterCount=0,this.fields=[],this.parameterDefinitions=[],this.options=$}start($,Y){let X=Y.constructor;this.key=X.statementKey(this.options);let G=Y._statements.get(this.key);if(G){if(this.onResult)this.onResult(null,G);return null}let J=new kr.PrepareStatement(this.query,Y.config.charsetNumber,this.options.values);return Y.writePacket(J.toPacket(1)),s3.prototype.prepareHeader}prepareHeader($,Y){let X=new kr.PreparedStatementHeader($);if(this.id=X.id,this.fieldCount=X.fieldCount,this.parameterCount=X.parameterCount,this.parameterCount>0)return s3.prototype.readParameter;if(this.fieldCount>0)return s3.prototype.readField;return this.prepareDone(Y)}readParameter($,Y){if($.isEOF()){if(this.fieldCount>0)return s3.prototype.readField;return this.prepareDone(Y)}let X=new kr.ColumnDefinition($,Y.clientEncoding);if(this.parameterDefinitions.push(X),this.parameterDefinitions.length===this.parameterCount)return s3.prototype.parametersEOF;return this.readParameter}readField($,Y){if($.isEOF())return this.prepareDone(Y);let X=new kr.ColumnDefinition($,Y.clientEncoding);if(this.fields.push(X),this.fields.length===this.fieldCount)return s3.prototype.fieldsEOF;return s3.prototype.readField}parametersEOF($,Y){if(!$.isEOF())return Y.protocolError("Expected EOF packet after parameters");if(this.fieldCount>0)return s3.prototype.readField;return this.prepareDone(Y)}fieldsEOF($,Y){if(!$.isEOF())return Y.protocolError("Expected EOF packet after fields");return this.prepareDone(Y)}prepareDone($){let Y=new d21(this.query,this.id,this.fields,this.parameterDefinitions,$);if($._statements.set(this.key,Y),this.onResult)this.onResult(null,Y);return null}}c21.exports=s3});var n21=o((WA5,i21)=>{var Ky6=XW(),Uy6=OZ(),Hy6=a5();class fU0 extends Ky6{constructor($){super();this.onResult=$}start($,Y){let X=new Hy6(0,Buffer.from([1,0,0,0,Uy6.PING]),0,5);return Y.writePacket(X),fU0.prototype.pingResponse}pingResponse(){if(this.onResult)process.nextTick(this.onResult.bind(this));return null}}i21.exports=fU0});var a21=o((ZA5,r21)=>{var zy6=XW(),Vy6=YW();class gU0 extends zy6{constructor($,Y){super();this.onResult=Y,this.opts=$}start($,Y){let X=new Vy6.RegisterSlave(this.opts);return Y.writePacket(X.toPacket(1)),gU0.prototype.registerResponse}registerResponse(){if(this.onResult)process.nextTick(this.onResult.bind(this));return null}}r21.exports=gU0});var o21=o((KA5,s21)=>{var GW={FLAGS2:0,SQL_MODE:1,CATALOG:2,AUTO_INCREMENT:3,CHARSET:4,TIME_ZONE:5,CATALOG_NZ:6,LC_TIME_NAMES:7,CHARSET_DATABASE:8,TABLE_MAP_FOR_UPDATE:9,MASTER_DATA_WRITTEN:10,INVOKERS:11,UPDATED_DB_NAMES:12,MICROSECONDS:3};s21.exports=function(Y){let X={},G=0,J,Q,W;while(G<Y.length)switch(J=Y[G++],J){case GW.FLAGS2:X.flags=Y.readUInt32LE(G),G+=4;break;case GW.SQL_MODE:X.sqlMode=Y.readUInt32LE(G),G+=8;break;case GW.CATALOG:Q=Y[G++],X.catalog=Y.toString("utf8",G,G+Q),G+=Q+1;break;case GW.CHARSET:X.clientCharset=Y.readUInt16LE(G),X.connectionCollation=Y.readUInt16LE(G+2),X.serverCharset=Y.readUInt16LE(G+4),G+=6;break;case GW.TIME_ZONE:Q=Y[G++],X.timeZone=Y.toString("utf8",G,G+Q),G+=Q;break;case GW.CATALOG_NZ:Q=Y[G++],X.catalogNz=Y.toString("utf8",G,G+Q),G+=Q;break;case GW.LC_TIME_NAMES:X.lcTimeNames=Y.readUInt16LE(G),G+=2;break;case GW.CHARSET_DATABASE:X.schemaCharset=Y.readUInt16LE(G),G+=2;break;case GW.TABLE_MAP_FOR_UPDATE:X.mapForUpdate1=Y.readUInt32LE(G),X.mapForUpdate2=Y.readUInt32LE(G+4),G+=8;break;case GW.MASTER_DATA_WRITTEN:X.masterDataWritten=Y.readUInt32LE(G),G+=4;break;case GW.INVOKERS:Q=Y[G++],X.invokerUsername=Y.toString("utf8",G,G+Q),G+=Q,Q=Y[G++],X.invokerHostname=Y.toString("utf8",G,G+Q),G+=Q;break;case GW.UPDATED_DB_NAMES:Q=Y[G++],X.updatedDBs=[];for(;Q;--Q){W=G;while(Y[G++]&&G<Y.length);X.updatedDBs.push(Y.toString("utf8",W,G-1))}break;case GW.MICROSECONDS:X.microseconds=Y.readInt16LE(G)+(Y[G+2]<<16),G+=3}return X}});var JK1=o((UA5,GK1)=>{var Ay6=XW(),Fy6=YW(),Dv=[];class t21{constructor($){this.timestamp=$.readInt32(),this.eventType=$.readInt8(),this.serverId=$.readInt32(),this.eventSize=$.readInt32(),this.logPos=$.readInt32(),this.flags=$.readInt16()}}class vr extends Ay6{constructor($){super();this.opts=$}start($,Y){let X=new Fy6.BinlogDump(this.opts);return Y.writePacket(X.toPacket(1)),vr.prototype.binlogData}binlogData($){if($.isEOF())return this.emit("eof"),null;$.readInt8();let Y=new t21($),X=Dv[Y.eventType],G;if(X)G=new X($);else G={name:"UNKNOWN"};return G.header=Y,this.emit("event",G),vr.prototype.binlogData}}class e21{constructor($){this.pposition=$.readInt32(),$.readInt32(),this.nextBinlog=$.readString(),this.name="RotateEvent"}}class $K1{constructor($){this.binlogVersion=$.readInt16(),this.serverVersion=$.readString(50).replace(/\u0000.*/,""),this.createTimestamp=$.readInt32(),this.eventHeaderLength=$.readInt8(),this.eventsLength=$.readBuffer(),this.name="FormatDescriptionEvent"}}class YK1{constructor($){let Y=o21();this.slaveProxyId=$.readInt32(),this.executionTime=$.readInt32();let X=$.readInt8();this.errorCode=$.readInt16();let G=$.readInt16(),J=$.readBuffer(G);this.schema=$.readString(X),$.readInt8(),this.statusVars=Y(J),this.query=$.readString(),this.name="QueryEvent"}}class XK1{constructor($){this.binlogVersion=$.readInt16(),this.xid=$.readInt64(),this.name="XidEvent"}}Dv[2]=YK1;Dv[4]=e21;Dv[15]=$K1;Dv[16]=XK1;GK1.exports=vr});var ZK1=o((HA5,WK1)=>{var Dy6=XW(),Ny6=YW(),Ly6=h2(),QK1=TU0(),By6=EZ();class Nv extends Dy6{constructor($,Y){super();this.onResult=Y,this.user=$.user,this.password=$.password,this.password1=$.password,this.password2=$.password2,this.password3=$.password3,this.database=$.database,this.passwordSha1=$.passwordSha1,this.charsetNumber=$.charsetNumber,this.currentConfig=$.currentConfig,this.authenticationFactor=0}start($,Y){let X=new Ny6.ChangeUser({flags:Y.config.clientFlags,user:this.user,database:this.database,charsetNumber:this.charsetNumber,password:this.password,passwordSha1:this.passwordSha1,authPluginData1:Y._handshakePacket.authPluginData1,authPluginData2:Y._handshakePacket.authPluginData2});if(this.currentConfig.user=this.user,this.currentConfig.password=this.password,this.currentConfig.database=this.database,this.currentConfig.charsetNumber=this.charsetNumber,Y.clientEncoding=By6[this.charsetNumber],Y._statements.clear(),Y.writePacket(X.toPacket()),Y.serverCapabilityFlags&Ly6.MULTI_FACTOR_AUTHENTICATION)this.authenticationFactor=1;return Nv.prototype.handshakeResult}}Nv.prototype.handshakeResult=QK1.prototype.handshakeResult;Nv.prototype.calculateNativePasswordAuthToken=QK1.prototype.calculateNativePasswordAuthToken;WK1.exports=Nv});var UK1=o((zA5,KK1)=>{var Oy6=XW(),Ey6=YW();class mU0 extends Oy6{constructor($){super();this.onResult=$}start($,Y){let X=new Ey6.ResetConnection;return Y.writePacket(X.toPacket()),mU0.prototype.resetConnectionResponse}resetConnectionResponse($,Y){if(Y._statements)Y._statements.clear();if(this.onResult)process.nextTick(this.onResult.bind(this,null));return null}}KK1.exports=mU0});var VK1=o((VA5,zK1)=>{var My6=XW(),Ry6=OZ(),qy6=a5();class HK1 extends My6{constructor($){super();this.onResult=$}start($,Y){Y._closing=!0;let X=new qy6(0,Buffer.from([1,0,0,0,Ry6.QUIT]),0,5);if(this.onResult)this.onResult();return Y.writePacket(X),null}}zK1.exports=HK1});var FK1=o((AA5,AK1)=>{var Iy6=TU0(),Py6=Z21(),wy6=yU0(),_y6=l21(),jy6=bU0(),Ty6=hU0(),Cy6=n21(),Sy6=a21(),ky6=JK1(),vy6=ZK1(),xy6=UK1(),yy6=VK1();AK1.exports={ClientHandshake:Iy6,ServerHandshake:Py6,Query:wy6,Prepare:_y6,CloseStatement:jy6,Execute:Ty6,Ping:Cy6,RegisterSlave:Sy6,BinlogDump:ky6,ChangeUser:vy6,ResetConnection:xy6,Quit:yy6}});var pU0=o((FA5,NK1)=>{var DK1=L0("process"),Sq=(()=>{try{return"getBuiltinModule"in DK1?DK1.getBuiltinModule("node:diagnostics_channel"):L0("diagnostics_channel")}catch{return}})(),Lv=typeof Sq?.tracingChannel==="function",by6=Lv?Sq.tracingChannel("mysql2:query"):void 0,hy6=Lv?Sq.tracingChannel("mysql2:execute"):void 0,fy6=Lv?Sq.tracingChannel("mysql2:connect"):void 0,gy6=Lv?Sq.tracingChannel("mysql2:pool:connect"):void 0;function my6($){if($.socketPath)return{serverAddress:$.socketPath,serverPort:void 0};return{serverAddress:$.host||"localhost",serverPort:$.port||3306}}function uU0($){if($===void 0||$===null)return!1;return $.hasSubscribers??$.start?.hasSubscribers??!1}function uy6($,Y,X,G,J,...Q){if(uU0($))return $.traceCallback(Y,X,G(),J,...Q);return Y.apply(J,Q)}function py6($,Y,X){if(uU0($))return $.tracePromise(Y,X());return Y()}NK1.exports={dc:Sq,hasTracingChannel:Lv,shouldTrace:uU0,queryChannel:by6,executeChannel:hy6,connectChannel:fy6,poolConnectChannel:gy6,getServerContext:my6,traceCallback:uy6,tracePromise:py6}});var BK1=o((DA5,cU0)=>{var LK1=/(?:\?)|(?::(\d+|(?:[a-zA-Z][a-zA-Z0-9_]*)))/g;function dU0($){let Y=LK1.exec($),X=0,G=0,J,Q=[],W=!1,Z=!1,K,H=[],z=0,V=0,A;if(Y){do{for(A=X,J=Y.index;A<J;++A){let F=$.charCodeAt(A);if(F===92)Z=!Z;else{if(Z){Z=!1;continue}if(W&&F===K){if($.charCodeAt(A+1)===K){++A;continue}W=!1}else if(!W&&(F===34||F===39))W=!0,K=F}}if(!W)Q.push($.substring(G,J)),H.push(Y[0].length===1?z++:Y[1]),G=J+Y[0].length,V=G;X=J+Y[0].length}while(Y=LK1.exec($));if(H.length){if(X<$.length)Q.push($.substring(V));return[Q,H]}}return[$]}function dy6($){if(!$)$={};if(!$.placeholder)$.placeholder="?";let Y=100,X;if(typeof $.cache==="number")Y=$.cache;if(typeof $.cache==="object")X=$.cache;if($.cache!==!1&&!X)X=$v().createLRU({max:Y});function G(Z,K){let H=[];if(Z.length===1)return[Z[0],[]];if(typeof K>"u")throw Error("Named query contains placeholders, but parameters object is undefined");let z=Z[1];for(let V=0;V<z.length;++V)H.push(K[z[V]]);return[Z[0],H]}function J(Z){if(Z.slice(-1)===":")return Z.slice(0,-1);return Z}function Q(Z){if(Z.length===1)return Z;let K=J(Z[0][0]);for(let z=1;z<Z[0].length;++z){if(Z[0][z-1].slice(-1)===":")K+=$.placeholder;K+=$.placeholder,K+=J(Z[0][z])}let H=Z[0][Z[0].length-1];if(Z[0].length===Z[1].length){if(H.slice(-1)===":")K+=$.placeholder;K+=$.placeholder}return[K,Z[1]]}function W(Z,K){let H;if(X&&(H=X.get(Z)))return G(H,K);if(H=Q(dU0(Z)),X)X.set(Z,H);return G(H,K)}return W.parse=dU0,W}function cy6($,Y){let X=dU0($),G=[];if(X.length===1)return[X[0],G];let J={},Q=0,W="",Z,K=[];for(let H=0;H<X[0].length;++H){if(Z=J[X[1][H]],!Z)Z=++Q,J[X[1][H]]=Z;if(X[1][H])K[Z-1]=X[1][H],W+=`${X[0][H]}$${Z}`;else W+=X[0][H]}return[W,K.map((H)=>Y[H])]}cU0.exports=dy6;cU0.exports.toNumbered=cy6});var hr=o((NA5,IK1)=>{var lU0=L0("net"),xr=L0("tls"),kq=L0("timers"),OK1=L0("events").EventEmitter,ly6=L0("stream").Readable,EK1=D30(),yr=ek(),{createLRU:iy6}=$v(),ny6=GU0(),_A=YW(),cJ=FK1(),ry6=Eq(),MK1=EZ(),{traceCallback:RK1,tracePromise:iU0,getServerContext:Bv,shouldTrace:nU0,queryChannel:rU0,executeChannel:aU0,connectChannel:qK1}=pU0(),ay6=0,sU0=null;class br extends OK1{constructor($){super();if(this.config=$.config,!$.config.stream)if($.config.socketPath)this.stream=lU0.connect($.config.socketPath);else{if(this.stream=lU0.connect($.config.port,$.config.host),this.config.enableKeepAlive)this.stream.on("connect",()=>{this.stream.setKeepAlive(!0,this.config.keepAliveInitialDelay)});this.stream.setNoDelay(!0)}else if(typeof $.config.stream==="function")this.stream=$.config.stream($);else this.stream=$.config.stream;this._internalId=ay6++,this._commands=new EK1,this._command=null,this._paused=!1,this._paused_packets=new EK1,this._statements=iy6({max:this.config.maxPreparedStatements,onEviction:function(X,G){G.close()}}),this.serverCapabilityFlags=0,this.authorized=!1,this.sequenceId=0,this.compressedSequenceId=0,this.threadId=null,this._handshakePacket=null,this._fatalError=null,this._protocolError=null,this._outOfOrderPackets=[],this.clientEncoding=MK1[this.config.charsetNumber],this.stream.on("error",this._handleNetworkError.bind(this)),this.packetParser=new ny6((X)=>{this.handlePacket(X)}),this.stream.on("data",(X)=>{if(this.connectTimeout)kq.clearTimeout(this.connectTimeout),this.connectTimeout=null;this.packetParser.execute(X)}),this.stream.on("end",()=>{this.emit("end")}),this.stream.on("close",()=>{if(this._closing)return;if(!this._protocolError)this._protocolError=Error("Connection lost: The server closed the connection."),this._protocolError.fatal=!0,this._protocolError.code="PROTOCOL_CONNECTION_LOST";this._notifyError(this._protocolError)});let Y;if(!this.config.isServer){if(Y=new cJ.ClientHandshake(this.config.clientFlags),Y.on("end",()=>{if(!Y.handshake||this._fatalError||this._protocolError)return;this._handshakePacket=Y.handshake,this.threadId=Y.handshake.connectionId,this.emit("connect",Y.handshake)}),Y.on("error",(X)=>{this._closing=!0,this._notifyError(X)}),this.addCommand(Y),nU0(qK1)){let X=this.config;iU0(qK1,()=>new Promise((G,J)=>{let Q,W;Q=(Z)=>{this.removeListener("error",W),G(Z)},W=(Z)=>{this.removeListener("connect",Q),J(Z)},this.once("connect",Q),this.once("error",W)}),()=>{let G=Bv(X);return{database:X.database||"",serverAddress:G.serverAddress,serverPort:G.serverPort,user:X.user||""}}).catch(()=>{})}}if(this.serverEncoding="utf8",this.config.connectTimeout){let X=this._handleTimeoutError.bind(this);this.connectTimeout=kq.setTimeout(X,this.config.connectTimeout)}}_addCommandClosedState($){let Y=Error("Can't add new command when connection is in closed state");if(Y.fatal=!0,$.onResult)$.onResult(Y);else this.emit("error",Y)}_handleFatalError($){$.fatal=!0,this.stream.removeAllListeners("data"),this.addCommand=this._addCommandClosedState,this.write=()=>{this.emit("error",Error("Can't write in closed state"))},this._notifyError($),this._fatalError=$}_handleNetworkError($){if(this.connectTimeout)kq.clearTimeout(this.connectTimeout),this.connectTimeout=null;if($.code==="ECONNRESET"&&this._closing)return;this._handleFatalError($)}_handleTimeoutError(){if(this.connectTimeout)kq.clearTimeout(this.connectTimeout),this.connectTimeout=null;this.stream.destroy&&this.stream.destroy();let $=Error("connect ETIMEDOUT");$.errorno="ETIMEDOUT",$.code="ETIMEDOUT",$.syscall="connect",this._handleNetworkError($)}_notifyError($){if(this.connectTimeout)kq.clearTimeout(this.connectTimeout),this.connectTimeout=null;if(this._fatalError)return;let Y,X=!this._command;if(this._command&&this._command.onResult)this._command.onResult($),this._command=null;else if(!(this._command&&this._command.constructor===cJ.ClientHandshake&&this._commands.length>0))X=!0;while(Y=this._commands.shift())if(Y.onResult)Y.onResult($);else X=!0;if(X||this._pool)this.emit("error",$);if($.fatal)this.close()}write($){if(!this.stream.write($,(X)=>{if(X)this._handleNetworkError(X)}))this.stream.emit("pause")}_resetSequenceId(){this.sequenceId=0,this.compressedSequenceId=0}_bumpCompressedSequenceId($){this.compressedSequenceId+=$,this.compressedSequenceId%=256}_bumpSequenceId($){this.sequenceId+=$,this.sequenceId%=256}writePacket($){let X=$.length(),G,J,Q;if(X<16777215){if($.writeHeader(this.sequenceId),this.config.debug)console.log(`${this._internalId} ${this.connectionId} <== ${this._command._commandName}#${this._command.stateName()}(${[this.sequenceId,$._name,$.length()].join(",")})`),console.log(`${this._internalId} ${this.connectionId} <== ${$.buffer.toString("hex")}`);this._bumpSequenceId(1),this.write($.buffer)}else{if(this.config.debug)console.log(`${this._internalId} ${this.connectionId} <== Writing large packet, raw content not written:`),console.log(`${this._internalId} ${this.connectionId} <== ${this._command._commandName}#${this._command.stateName()}(${[this.sequenceId,$._name,$.length()].join(",")})`);for(J=4;J<4+X;J+=16777215){if(G=$.buffer.slice(J,J+16777215),G.length===16777215)Q=Buffer.from([255,255,255,this.sequenceId]);else Q=Buffer.from([G.length&255,G.length>>8&255,G.length>>16&255,this.sequenceId]);this._bumpSequenceId(1),this.write(Q),this.write(G)}}}startTLS($){if(this.config.debug)console.log("Upgrading connection to TLS");let Y=xr.createSecureContext({ca:this.config.ssl.ca,cert:this.config.ssl.cert,ciphers:this.config.ssl.ciphers,key:this.config.ssl.key,passphrase:this.config.ssl.passphrase,minVersion:this.config.ssl.minVersion,maxVersion:this.config.ssl.maxVersion}),X=this.config.ssl.rejectUnauthorized,G=this.config.ssl.verifyIdentity,J=lU0.isIP(this.config.host)?void 0:this.config.host,Q=!1;this.stream.removeAllListeners("data");let W=xr.connect({rejectUnauthorized:X,requestCert:X,checkServerIdentity:G?xr.checkServerIdentity:function(){return},secureContext:Y,isServer:!1,socket:this.stream,servername:J},()=>{if(Q=!0,X){if(typeof J==="string"&&G){let Z=W.getPeerCertificate(!0),K=xr.checkServerIdentity(J,Z);if(K){$(K);return}}}$()});W.on("error",(Z)=>{if(Q)this._handleNetworkError(Z);else $(Z)}),W.on("data",(Z)=>{this.packetParser.execute(Z)}),this.stream=W}protocolError($,Y){if(this._closing)return;let X=Error($);X.fatal=!0,X.code=Y||"PROTOCOL_ERROR",this.emit("error",X)}get state(){if(this._fatalError||this._protocolError)return"error";if(this._closing||this.stream&&this.stream.destroyed)return"disconnected";if(this.authorized)return"authenticated";if(this._handshakePacket)return"connected";if(this.stream&&!this.stream.destroyed)return"protocol_handshake";return"disconnected"}get fatalError(){return this._fatalError}handlePacket($){if(this._paused){this._paused_packets.push($);return}if(this.config.debug){if($){console.log(` raw: ${$.buffer.slice($.offset,$.offset+$.length()).toString("hex")}`),console.trace();let Y=this._command?this._command._commandName:"(no command)",X=this._command?this._command.stateName():"(no command)";console.log(`${this._internalId} ${this.connectionId} ==> ${Y}#${X}(${[$.sequenceId,$.type(),$.length()].join(",")})`)}}if(!this._command){if($.peekByte()===255){let X=_A.Error.fromPacket($);this.protocolError(X.message,X.code)}else this.protocolError("Unexpected packet while no commands in the queue","PROTOCOL_UNEXPECTED_PACKET");this.close();return}if($){if(this.sequenceId!==$.sequenceId){let Y=Error(`Warning: got packets out of order. Expected ${this.sequenceId} but received ${$.sequenceId}`);Y.expected=this.sequenceId,Y.received=$.sequenceId,this.emit("warn",Y),console.error(Y.message)}this._bumpSequenceId($.numPackets)}try{if(this._fatalError)return;if(this._command.execute($,this)){if(this._command=this._commands.shift(),this._command)this.sequenceId=0,this.compressedSequenceId=0,this.handlePacket()}}catch(Y){this._handleFatalError(Y),this.stream.destroy()}}addCommand($){if(this.config.debug){let Y=$.constructor.name;console.log(`Add command: ${Y}`),$._commandName=Y}if(!this._command)this._command=$,this.handlePacket();else this._commands.push($);return $}format($,Y){if(typeof this.config.queryFormat==="function")return this.config.queryFormat.call(this,$,Y,this.config.timezone);let X={sql:$,values:Y};return this._resolveNamedPlaceholders(X),yr.format(X.sql,X.values,this.config.stringifyObjects,this.config.timezone)}escape($){return yr.escape($,!1,this.config.timezone)}escapeId($){return yr.escapeId($,!1)}raw($){return yr.raw($)}_resolveNamedPlaceholders($){let Y;if(this.config.namedPlaceholders||$.namedPlaceholders){if(Array.isArray($.values))return;if(sU0===null)sU0=BK1()();Y=sU0($.sql,$.values),$.sql=Y[0],$.values=Y[1]}}query($,Y,X){let G;if($.constructor===cJ.Query)G=$;else G=br.createQuery($,Y,X,this.config);this._resolveNamedPlaceholders(G);let J=this.format(G.sql,G.values!==void 0?G.values:[]);if(G.sql=J,G.onResult)RK1(rU0,(Q)=>{G.onResult=Q,this.addCommand(G)},0,()=>{let Q=Bv(this.config);return{query:G.sql,values:G.values,database:this.config.database||"",serverAddress:Q.serverAddress,serverPort:Q.serverPort}},null,G.onResult);else if(nU0(rU0))iU0(rU0,()=>new Promise((Q,W)=>{G.once("error",W),G.once("end",()=>Q()),this.addCommand(G)}),()=>{let Q=Bv(this.config);return{query:G.sql,values:G.values,database:this.config.database||"",serverAddress:Q.serverAddress,serverPort:Q.serverPort}}).catch(()=>{});else this.addCommand(G);return G}pause(){this._paused=!0,this.stream.pause()}resume(){let $;this._paused=!1;while($=this._paused_packets.shift())if(this.handlePacket($),this._paused)return;this.stream.resume()}prepare($,Y){if(typeof $==="string")$={sql:$};return this.addCommand(new cJ.Prepare($,Y))}unprepare($){let Y={};if(typeof $==="object")Y=$;else Y.sql=$;let X=br.statementKey(Y),G=this._statements.get(X);if(G)this._statements.delete(X),G.close();return G}execute($,Y,X){let G={infileStreamFactory:this.config.infileStreamFactory};if(typeof $==="object")if(G={...G,...$,sql:$.sql,values:$.values},typeof Y==="function")X=Y;else G.values=G.values||Y;else if(typeof Y==="function")X=Y,G.sql=$,G.values=void 0;else G.sql=$,G.values=Y;if(this._resolveNamedPlaceholders(G),G.values){if(!Array.isArray(G.values))throw TypeError("Bind parameters must be array if namedPlaceholders parameter is not enabled");G.values.forEach((W)=>{if(!Array.isArray(G.values))throw TypeError("Bind parameters must be array if namedPlaceholders parameter is not enabled");if(W===void 0)throw TypeError("Bind parameters must not contain undefined. To pass SQL NULL specify JS null");if(typeof W==="function")throw TypeError("Bind parameters must not contain function(s). To pass the body of a function as a string call .toString() first")})}let J=new cJ.Execute(G,X),Q=(W)=>{let Z=new cJ.Prepare(G,(K,H)=>{if(K){J.start=function(){return null},W(K),J.emit("end");return}J.statement=H});this.addCommand(Z),this.addCommand(J)};if(J.onResult){let W=J.onResult;RK1(aU0,(Z)=>{J.onResult=Z,Q(Z)},0,()=>{let Z=Bv(this.config);return{query:G.sql,values:G.values,database:this.config.database||"",serverAddress:Z.serverAddress,serverPort:Z.serverPort}},null,W)}else if(nU0(aU0))iU0(aU0,()=>new Promise((W,Z)=>{Q((K)=>{J.emit("error",K)}),J.once("error",Z),J.once("end",()=>W())}),()=>{let W=Bv(this.config);return{query:G.sql,values:G.values,database:this.config.database||"",serverAddress:W.serverAddress,serverPort:W.serverPort}}).catch(()=>{});else Q((W)=>{J.emit("error",W)});return J}changeUser($,Y){if(!Y&&typeof $==="function")Y=$,$={};let X=$.charset?ry6.getCharsetNumber($.charset):this.config.charsetNumber;return this.addCommand(new cJ.ChangeUser({user:$.user||this.config.user,password:$.password||$.password1||this.config.password||this.config.password1,password2:$.password2||this.config.password2,password3:$.password3||this.config.password3,passwordSha1:$.passwordSha1||this.config.passwordSha1,database:$.database||this.config.database,timeout:$.timeout,charsetNumber:X,currentConfig:this.config},(G)=>{if(G)G.fatal=!0;if(Y)Y(G)}))}beginTransaction($){return this.query("START TRANSACTION",$)}commit($){return this.query("COMMIT",$)}rollback($){return this.query("ROLLBACK",$)}ping($){return this.addCommand(new cJ.Ping($))}reset($){return this.addCommand(new cJ.ResetConnection($))}_registerSlave($,Y){return this.addCommand(new cJ.RegisterSlave($,Y))}_binlogDump($,Y){return this.addCommand(new cJ.BinlogDump($,Y))}destroy(){this.close()}close(){if(this.connectTimeout)kq.clearTimeout(this.connectTimeout),this.connectTimeout=null;this._closing=!0,this.stream.end(),this.addCommand=this._addCommandClosedState}createBinlogStream($){let Y=1,X=new ly6({objectMode:!0});return X._read=function(){return{data:Y++}},this._registerSlave($,()=>{let G=this._binlogDump($);G.on("event",(J)=>{X.push(J)}),G.on("eof",()=>{if(X.push(null),$.flags&&$.flags&1)this.close()})}),X}connect($){if(!$)return;if(this._fatalError||this._protocolError)return $(this._fatalError||this._protocolError);if(this._handshakePacket)return $(null,this);let Y,X;Y=(G)=>{this.removeListener("connect",X),$(G)},X=(G)=>{this.removeListener("error",Y),$(null,G)},this.once("error",Y),this.once("connect",X)}writeColumns($){this.writePacket(_A.ResultSetHeader.toPacket($.length)),$.forEach((Y)=>{this.writePacket(_A.ColumnDefinition.toPacket(Y,this.serverConfig.encoding))}),this.writeEof()}writeTextRow($){this.writePacket(_A.TextRow.toPacket($,this.serverConfig.encoding))}writeBinaryRow($){this.writePacket(_A.BinaryRow.toPacket($,this.serverConfig.encoding))}writeTextResult($,Y,X=!1){this.writeColumns(Y),$.forEach((G)=>{let J=Array(Y.length);if(Y.forEach((Q)=>{J.push(G[Q.name])}),X)this.writeBinaryRow(J);else this.writeTextRow(J)}),this.writeEof()}writeEof($,Y){this.writePacket(_A.EOF.toPacket($,Y))}writeOk($){if(!$)$={affectedRows:0};this.writePacket(_A.OK.toPacket($,this.serverConfig.encoding))}writeError($){let Y=this.serverConfig?this.serverConfig.encoding:"cesu8";this.writePacket(_A.Error.toPacket($,Y))}serverHandshake($){return this.serverConfig=$,this.serverConfig.encoding=MK1[this.serverConfig.characterSet],this.addCommand(new cJ.ServerHandshake($))}[Symbol.dispose](){if(!this._closing)this.end()}end($){if(this.config.isServer){this._closing=!0;let X=new OK1;return setImmediate(()=>{this.stream.end(),X.emit("end")}),X}let Y=this.addCommand(new cJ.Quit($));return this.addCommand=this._addCommandClosedState,Y}static createQuery($,Y,X,G){let J={rowsAsArray:G.rowsAsArray,infileStreamFactory:G.infileStreamFactory};if(typeof $==="object"){if(J={...J,...$,sql:$.sql,values:$.values},typeof Y==="function")X=Y;else if(Y!==void 0)J.values=Y}else if(typeof Y==="function")X=Y,J.sql=$,J.values=void 0;else J.sql=$,J.values=Y;return new cJ.Query(J,X)}static statementKey($){return`${typeof $.nestTables}/${$.nestTables}/${$.rowsAsArray}${$.sql}`}}IK1.exports=br});var xL=o((LA5,PK1)=>{function sy6($){let Y={};return Error.captureStackTrace(Y,$),Y}function oy6($,Y){let X=Y&&Y.stack;if(typeof X!=="string"||!X)return;let G=X.split(`
`);G[0]=`${$.name}: ${$.message}`,$.stack=G.join(`
`)}PK1.exports={captureStackHolder:sy6,applyCapturedStack:oy6}});var vq=o((BA5,wK1)=>{var{applyCapturedStack:ty6}=xL();function ey6($,Y,X){return function(G,J,Q){if(G)ty6(G,X),Y(G);else $([J,Q])}}wK1.exports=ey6});var jK1=o((OA5,_K1)=>{var{captureStackHolder:$b6}=xL(),Yb6=vq();class oU0{constructor($,Y){this.statement=$,this.Promise=Y}execute($){let Y=this.statement,X=$b6(oU0.prototype.execute);return new this.Promise((G,J)=>{let Q=Yb6(G,J,X);if($)Y.execute($,Q);else Y.execute(Q)})}close(){return new this.Promise(($)=>{this.statement.close(),$()})}}_K1.exports=oU0});var fr=o((EA5,TK1)=>{function Xb6($,Y,X){let G={};Y.on("newListener",(J)=>{if(X.indexOf(J)>=0&&!Y.listenerCount(J))$.on(J,G[J]=function(){let Q=[].slice.call(arguments);Q.unshift(J),Y.emit.apply(Y,Q)})}).on("removeListener",(J)=>{if(X.indexOf(J)>=0&&!Y.listenerCount(J))$.removeListener(J,G[J]),delete G[J]})}TK1.exports=Xb6});var gr=o((MA5,SK1)=>{var Gb6=L0("events").EventEmitter,Jb6=jK1(),{captureStackHolder:o3,applyCapturedStack:Ov}=xL(),Ev=vq(),Qb6=fr(),CK1=hr();class lJ extends Gb6{constructor($,Y){super();this.connection=$,this.Promise=Y||Promise,Qb6($,this,["error","drain","connect","end","enqueue"])}release(){this.connection.release()}query($,Y){let X=this.connection,G=o3(lJ.prototype.query);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=Ev(J,Q,G);if(Y!==void 0)X.query($,Y,W);else X.query($,W)})}execute($,Y){let X=this.connection,G=o3(lJ.prototype.execute);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=Ev(J,Q,G);if(Y!==void 0)X.execute($,Y,W);else X.execute($,W)})}end(){return new this.Promise(($)=>{this.connection.end($)})}async[Symbol.asyncDispose](){if(!this.connection._closing)await this.end()}beginTransaction(){let $=this.connection,Y=o3(lJ.prototype.beginTransaction);return new this.Promise((X,G)=>{let J=Ev(X,G,Y);$.beginTransaction(J)})}commit(){let $=this.connection,Y=o3(lJ.prototype.commit);return new this.Promise((X,G)=>{let J=Ev(X,G,Y);$.commit(J)})}rollback(){let $=this.connection,Y=o3(lJ.prototype.rollback);return new this.Promise((X,G)=>{let J=Ev(X,G,Y);$.rollback(J)})}ping(){let $=this.connection,Y=o3(lJ.prototype.ping);return new this.Promise((X,G)=>{$.ping((J)=>{if(J)Ov(J,Y),G(J);else X(!0)})})}reset(){let $=this.connection,Y=o3(lJ.prototype.reset);return new this.Promise((X,G)=>{$.reset((J)=>{if(J)Ov(J,Y),G(J);else X()})})}connect(){let $=this.connection,Y=o3(lJ.prototype.connect);return new this.Promise((X,G)=>{$.connect((J,Q)=>{if(J)Ov(J,Y),G(J);else X(Q)})})}prepare($){let Y=this.connection,X=this.Promise,G=o3(lJ.prototype.prepare);return new this.Promise((J,Q)=>{Y.prepare($,(W,Z)=>{if(W)Ov(W,G),Q(W);else{let K=new Jb6(Z,X);J(K)}})})}changeUser($){let Y=this.connection,X=o3(lJ.prototype.changeUser);return new this.Promise((G,J)=>{Y.changeUser($,(Q)=>{if(Q)Ov(Q,X),J(Q);else G()})})}get config(){return this.connection.config}get threadId(){return this.connection.threadId}}(function($){for(let Y=0;$&&Y<$.length;Y++){let X=$[Y];if(typeof CK1.prototype[X]==="function"&&lJ.prototype[X]===void 0)lJ.prototype[X]=function(J){return function(){return CK1.prototype[J].apply(this.connection,arguments)}}(X)}})(["close","createBinlogStream","destroy","escape","escapeId","format","pause","pipe","resume","unprepare"]);SK1.exports=lJ});var xq=o((RA5,vK1)=>{var Wb6=hr();class kK1 extends Wb6{promise($){return new(gr())(this,$)}}vK1.exports=kK1});var tU0=o((qA5,xK1)=>{var Zb6=xq(),Kb6=Eq();function Ub6($){return new Zb6({config:new Kb6($)})}xK1.exports=Ub6});var Mv=o((IA5,bK1)=>{var Hb6=gr();class yK1 extends Hb6{constructor($,Y){super($,Y)}destroy(){return this.connection.destroy()}async[Symbol.asyncDispose](){this.release()}}bK1.exports=yK1});var $H0=o((PA5,hK1)=>{var eU0=xq();class mr extends eU0{constructor($,Y){super(Y);this._pool=$,this._released=!1,this.lastActiveTime=Date.now(),this.once("end",()=>{this._removeFromPool()}),this.once("error",()=>{this._removeFromPool()})}release(){if(this._released)return;if(!this._pool||this._pool._closed)return;this._released=!0,this.lastActiveTime=Date.now(),this._pool.releaseConnection(this)}[Symbol.dispose](){this.release()}end($){if(this.config.gracefulEnd){this._removeFromPool(),super.end($);return}let Y=Error("Calling conn.end() to release a pooled connection is deprecated. In next version calling conn.end() will be restored to default conn.end() behavior. Use conn.release() instead.");if(this.emit("warn",Y),console.warn(Y.message),this.release(),typeof $==="function")$()}destroy(){this._removeFromPool(),super.destroy()}_removeFromPool(){if(!this._pool||this._pool._closed)return;let $=this._pool;this._pool=null,$._removeConnection(this)}promise($){return new(Mv())(this,$)}}mr.statementKey=eU0.statementKey;hK1.exports=mr;mr.prototype._realEnd=eU0.prototype.end});var QH0=o((wA5,mK1)=>{var yq=L0("process"),YH0=ek(),zb6=L0("events").EventEmitter,Vb6=$H0(),XH0=D30(),Ab6=hr(),GH0=Hr(),{traceCallback:Fb6,getServerContext:Db6,poolConnectChannel:Nb6}=pU0();function fK1($){if(!$||!$.errno)return!1;return $.errno===GH0.ER_OPTION_PREVENTS_STATEMENT||$.errno===GH0.ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION||$.errno===GH0.ER_READ_ONLY_MODE}function JH0($,Y){let X=$.length;for(let G=0;G<X;G++)if($.get(G)===Y){$.removeOne(G);break}}class gK1 extends zb6{constructor($){super();if(this.config=$.config,this.config.connectionConfig.pool=this,this._allConnections=new XH0,this._freeConnections=new XH0,this._connectionQueue=new XH0,this._closed=!1,this.config.maxIdle<this.config.connectionLimit)this._removeIdleTimeoutConnections()}getConnection($){let Y=(G)=>{if(this._closed)return yq.nextTick(()=>G(Error("Pool is closed.")));let J;if(this._freeConnections.length>0)return J=this._freeConnections.pop(),this.emit("acquire",J),yq.nextTick(()=>{J._released=!1,G(null,J)});if(this.config.connectionLimit===0||this._allConnections.length<this.config.connectionLimit)return J=new Vb6(this,{config:this.config.connectionConfig}),this._allConnections.push(J),J.connect((Q)=>{if(this._closed)return G(Error("Pool is closed."));if(Q)return G(Q);return this.emit("connection",J),this.emit("acquire",J),G(null,J)});if(!this.config.waitForConnections)return yq.nextTick(()=>G(Error("No connections available.")));if(this.config.queueLimit&&this._connectionQueue.length>=this.config.queueLimit)return G(Error("Queue limit reached."));return this.emit("enqueue"),this._connectionQueue.push(G)},X=this.config.connectionConfig;Fb6(Nb6,Y,0,()=>{let G=Db6(X);return{database:X.database||"",serverAddress:G.serverAddress,serverPort:G.serverPort}},null,$)}releaseConnection($){let Y;if(!$._pool){if(this._connectionQueue.length)Y=this._connectionQueue.shift(),yq.nextTick(this.getConnection.bind(this,Y));return}if(this.config.resetOnRelease&&$.reset)$.reset((X)=>{if(X){if($._pool=null,JH0(this._allConnections,$),$.destroy(),this._connectionQueue.length)Y=this._connectionQueue.shift(),yq.nextTick(this.getConnection.bind(this,Y));return}this._handleSuccessfulRelease($)});else this._handleSuccessfulRelease($)}_handleSuccessfulRelease($){let Y;if(this._connectionQueue.length)Y=this._connectionQueue.shift(),yq.nextTick(()=>{$._released=!1,Y(null,$)});else this._freeConnections.push($),this.emit("release",$)}[Symbol.dispose](){if(!this._closed)this.end()}end($){if(this._closed=!0,clearTimeout(this._removeIdleTimeoutConnectionsTimer),typeof $!=="function")$=function(Q){if(Q)throw Q};let Y=!1,X=0,G,J=function(Q){if(Y)return;if(Q||++X>=this._allConnections.length){Y=!0,$(Q);return}}.bind(this);if(this._allConnections.length===0){J();return}for(let Q=0;Q<this._allConnections.length;Q++)G=this._allConnections.get(Q),G._realEnd(J)}query($,Y,X){let G=Ab6.createQuery($,Y,X,this.config.connectionConfig);if(typeof G.namedPlaceholders>"u")G.namedPlaceholders=this.config.connectionConfig.namedPlaceholders;return this.getConnection((J,Q)=>{if(J){if(typeof G.onResult==="function")G.onResult(J);else G.emit("error",J);return}try{let W=null,Z=G.onResult;if(Z)G.onResult=function(K,H,z){W=K||null,Z(K,H,z)};else G.once("error",(K)=>{W=K});Q.query(G).once("end",()=>{if(fK1(W))Q.destroy();else Q.release()})}catch(W){throw Q.release(),W}}),G}execute($,Y,X){if(typeof Y==="function")X=Y,Y=[];this.getConnection((G,J)=>{if(G)return X(G);try{J.execute($,Y,(Q,W,Z)=>{if(fK1(Q))J.destroy();X(Q,W,Z)}).once("end",()=>{J.release()})}catch(Q){return J.release(),X(Q)}})}_removeConnection($){JH0(this._allConnections,$),JH0(this._freeConnections,$),this.releaseConnection($)}_removeIdleTimeoutConnections(){if(this._removeIdleTimeoutConnectionsTimer)clearTimeout(this._removeIdleTimeoutConnectionsTimer);this._removeIdleTimeoutConnectionsTimer=setTimeout(()=>{try{while(this._freeConnections.length>this.config.maxIdle||this._freeConnections.length>0&&Date.now()-this._freeConnections.get(0).lastActiveTime>this.config.idleTimeout)if(this.config.connectionConfig.gracefulEnd)this._freeConnections.get(0).end();else this._freeConnections.get(0).destroy()}finally{this._removeIdleTimeoutConnections()}},1000)}format($,Y){return YH0.format($,Y,this.config.connectionConfig.stringifyObjects,this.config.connectionConfig.timezone)}escape($){return YH0.escape($,this.config.connectionConfig.stringifyObjects,this.config.connectionConfig.timezone)}escapeId($){return YH0.escapeId($,!1)}}mK1.exports=gK1});var ZH0=o((_A5,cK1)=>{var Lb6=L0("events").EventEmitter,{captureStackHolder:WH0,applyCapturedStack:Bb6}=xL(),uK1=vq(),pK1=Mv(),Ob6=fr(),dK1=QH0();class yL extends Lb6{constructor($,Y){super();this.pool=$,this.Promise=Y||Promise,Ob6($,this,["acquire","connection","enqueue","release"])}getConnection(){let $=this.pool;return new this.Promise((Y,X)=>{$.getConnection((G,J)=>{if(G)X(G);else Y(new pK1(J,this.Promise))})})}releaseConnection($){if($ instanceof pK1)$.release()}query($,Y){let X=this.pool,G=WH0(yL.prototype.query);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=uK1(J,Q,G);if(Y!==void 0)X.query($,Y,W);else X.query($,W)})}execute($,Y){let X=this.pool,G=WH0(yL.prototype.execute);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=uK1(J,Q,G);if(Y)X.execute($,Y,W);else X.execute($,W)})}end(){let $=this.pool,Y=WH0(yL.prototype.end);return new this.Promise((X,G)=>{$.end((J)=>{if(J)Bb6(J,Y),G(J);else X()})})}async[Symbol.asyncDispose](){if(!this.pool._closed)await this.end()}}(function($){for(let Y=0;$&&Y<$.length;Y++){let X=$[Y];if(typeof dK1.prototype[X]==="function"&&yL.prototype[X]===void 0)yL.prototype[X]=function(J){return function(){return dK1.prototype[J].apply(this.pool,arguments)}}(X)}})(["escape","escapeId","format"]);cK1.exports=yL});var ur=o((jA5,iK1)=>{var Eb6=QH0();class lK1 extends Eb6{promise($){return new(ZH0())(this,$)}}iK1.exports=lK1});var KH0=o((TA5,aK1)=>{var nK1=Eq();class rK1{constructor($){if(typeof $==="string")$=nK1.parseUrl($);this.connectionConfig=new nK1($),this.waitForConnections=$.waitForConnections===void 0?!0:Boolean($.waitForConnections),this.connectionLimit=isNaN($.connectionLimit)?10:Number($.connectionLimit),this.maxIdle=isNaN($.maxIdle)?this.connectionLimit:Number($.maxIdle),this.idleTimeout=isNaN($.idleTimeout)?60000:Number($.idleTimeout),this.queueLimit=isNaN($.queueLimit)?0:Number($.queueLimit),this.resetOnRelease=$.resetOnRelease===void 0?!1:Boolean($.resetOnRelease)}}aK1.exports=rK1});var pr=o((CA5,$31)=>{var Rv=L0("process"),Mb6=ur(),Rb6=KH0(),qb6=xq(),Ib6=L0("events").EventEmitter,oK1={RR(){let $=0;return(Y)=>Y[$++%Y.length]},RANDOM(){return($)=>$[Math.floor(Math.random()*$.length)]},ORDER(){return($)=>$[0]}},sK1=function(){let $;if(typeof Rv.hrtime==="function")$=Rv.hrtime(),$=$[0]*1000+$[1]*0.000001;else $=Rv.uptime()*1000;return Math.floor($)},Pb6=function($){if($ instanceof RegExp)return $;let Y=$.replace(/([.+?^=!:${}()|[\]/\\])/g,"\\$1").replace(/\*/g,".*");return new RegExp(`^${Y}$`)};class tK1{constructor($,Y,X){this._cluster=$,this._pattern=Y,this._selector=oK1[X]()}getConnection($){let Y=this._getClusterNode();if(Y===null){let X=Error("Pool does Not exist.");if(X.code="POOL_NOEXIST",this._cluster._findNodeIds(this._pattern,!0).length!==0)X=Error("Pool does Not have online node."),X.code="POOL_NONEONLINE";return $(X)}return this._cluster._getConnection(Y,(X,G)=>{if(X){if(this._cluster._canRetry&&this._cluster._findNodeIds(this._pattern).length!==0)return this._cluster.emit("warn",X),this.getConnection($);return $(X)}return $(null,G)})}query($,Y,X){let G=qb6.createQuery($,Y,X,{});return this.getConnection((J,Q)=>{if(J){if(typeof G.onResult==="function")G.onResult(J);else G.emit("error",J);return}try{Q.query(G).once("end",()=>{Q.release()})}catch(W){throw Q.release(),W}}),G}execute($,Y,X){if(typeof Y==="function")X=Y,Y=[];this.getConnection((G,J)=>{if(G)return X(G);try{J.execute($,Y,X).once("end",()=>{J.release()})}catch(Q){throw J.release(),Q}})}_getClusterNode(){let $=this._cluster._findNodeIds(this._pattern);if($.length===0)return null;let Y=$.length===1?$[0]:this._selector($);return this._cluster._getNode(Y)}}class eK1 extends Ib6{constructor($){super();$=$||{},this._canRetry=typeof $.canRetry>"u"?!0:$.canRetry,this._removeNodeErrorCount=$.removeNodeErrorCount||5,this._restoreNodeTimeout=$.restoreNodeTimeout||0,this._defaultSelector=$.defaultSelector||"RR",this._closed=!1,this._lastId=0,this._nodes={},this._serviceableNodeIds=[],this._namespaces={},this._findCaches={}}of($,Y){if($=$||"*",Y=Y||this._defaultSelector,Y=Y.toUpperCase(),!oK1[Y]==="undefined")Y=this._defaultSelector;let X=$+Y;if(typeof this._namespaces[X]>"u")this._namespaces[X]=new tK1(this,$,Y);return this._namespaces[X]}add($,Y){if(typeof $==="object")Y=$,$=`CLUSTER::${++this._lastId}`;if(typeof this._nodes[$]>"u")this._nodes[$]={id:$,errorCount:0,pool:new Mb6({config:new Rb6(Y)}),_offlineUntil:0},this._serviceableNodeIds.push($),this._clearFindCaches()}remove($){let Y=this._findNodeIds($,!0);for(let X=0;X<Y.length;X++){let G=this._getNode(Y[X]);if(G)this._removeNode(G)}}getConnection($,Y,X){let G;if(typeof $==="function")X=$,G=this.of();else{if(typeof Y==="function")X=Y,Y=this._defaultSelector;G=this.of($,Y)}G.getConnection(X)}[Symbol.dispose](){if(!this._closed)this.end()}end($){let Y=$!==void 0?$:(Q)=>{if(Q)throw Q};if(this._closed){Rv.nextTick(Y);return}this._closed=!0;let X=!1,G=0,J=(Q)=>{if(!X&&(Q||--G<=0))return X=!0,Y(Q)};for(let Q in this._nodes)G++,this._nodes[Q].pool.end(J);if(G===0)Rv.nextTick(J)}_findNodeIds($,Y){let X=0,G=this._findCaches[$];if(G===void 0){let J=Pb6($);G=this._serviceableNodeIds.filter((Q)=>Q.match(J))}if(this._findCaches[$]=G,Y)return G;return G.filter((J)=>{let Q=this._getNode(J);if(!Q._offlineUntil)return!0;if(!X)X=sK1();return Q._offlineUntil<=X})}_getNode($){return this._nodes[$]||null}_increaseErrorCount($){let Y=++$.errorCount;if(this._removeNodeErrorCount>Y)return;if(this._restoreNodeTimeout>0){$._offlineUntil=sK1()+this._restoreNodeTimeout,this.emit("offline",$.id);return}this._removeNode($),this.emit("remove",$.id)}_decreaseErrorCount($){let Y=$.errorCount;if(Y>this._removeNodeErrorCount)Y=this._removeNodeErrorCount;if(Y<1)Y=1;if($.errorCount=Y-1,$._offlineUntil)$._offlineUntil=0,this.emit("online",$.id)}_getConnection($,Y){$.pool.getConnection((X,G)=>{if(X)return this._increaseErrorCount($),Y(X);return this._decreaseErrorCount($),G._clusterId=$.id,Y(null,G)})}_removeNode($){let Y=this._serviceableNodeIds.indexOf($.id);if(Y!==-1)this._serviceableNodeIds.splice(Y,1),delete this._nodes[$.id],this._clearFindCaches(),$.pool.end()}_clearFindCaches(){this._findCaches={}}}$31.exports=eK1});var UH0=o((SA5,Y31)=>{var wb6=ur(),_b6=KH0();function jb6($){return new wb6({config:new _b6($)})}Y31.exports=jb6});var HH0=o((kA5,X31)=>{var Tb6=pr();function Cb6($){return new Tb6($)}X31.exports=Cb6});var Q31=o((vA5,J31)=>{var Sb6=L0("net"),kb6=L0("events").EventEmitter,vb6=xq(),xb6=Eq();class G31 extends kb6{constructor(){super();this.connections=[],this._server=Sb6.createServer(this._handleConnection.bind(this))}_handleConnection($){let Y=new xb6({stream:$,isServer:!0}),X=new vb6({config:Y});this.emit("connection",X)}listen($){return this._port=$,this._server.listen.apply(this._server,arguments),this}close($){this._server.close($)}}J31.exports=G31});var Z31=o((xA5,W31)=>{W31.exports={caching_sha2_password:jr(),mysql_clear_password:wU0(),mysql_native_password:PU0(),sha256_password:MU0()}});var z31=o((yA5,H31)=>{var{captureStackHolder:K31}=xL(),yb6=Mv(),U31=vq();class dr{constructor($,Y){this.poolNamespace=$,this.Promise=Y||Promise}getConnection(){let $=this.poolNamespace;return new this.Promise((Y,X)=>{$.getConnection((G,J)=>{if(G)X(G);else Y(new yb6(J,this.Promise))})})}query($,Y){let X=this.poolNamespace,G=K31(dr.prototype.query);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=U31(J,Q,G);X.query($,Y,W)})}execute($,Y){let X=this.poolNamespace,G=K31(dr.prototype.execute);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=U31(J,Q,G);X.execute($,Y,W)})}}H31.exports=dr});var qv=o((cb6)=>{var lr=ek(),bb6=L0("events").EventEmitter,F31=Yv(),V31=pr(),hb6=tU0(),fb6=UH0(),gb6=HH0(),zH0=gr(),D31=ZH0(),{captureStackHolder:cr,applyCapturedStack:N31}=xL(),A31=vq(),VH0=Mv(),mb6=fr(),ub6=z31();function L31($){let Y=hb6($),X=cr(L31),G=$.Promise||Promise;if(!G)throw Error("no Promise implementation available.Use promise-enabled node version or pass userland Promise implementation as parameter, for example: { Promise: require('bluebird') }");return new G((J,Q)=>{Y.once("connect",()=>{J(new zH0(Y,G))}),Y.once("error",(W)=>{N31(W,X),Q(W)})})}function pb6($){let Y=fb6($),X=$.Promise||Promise;if(!X)throw Error("no Promise implementation available.Use promise-enabled node version or pass userland Promise implementation as parameter, for example: { Promise: require('bluebird') }");return new D31(Y,X)}class bL extends bb6{constructor($,Y){super();this.poolCluster=$,this.Promise=Y||Promise,mb6($,this,["warn","remove","online","offline"])}getConnection($,Y){let X=this.poolCluster;return new this.Promise((G,J)=>{X.getConnection($,Y,(Q,W)=>{if(Q)J(Q);else G(new VH0(W,this.Promise))})})}query($,Y){let X=this.poolCluster,G=cr(bL.prototype.query);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=A31(J,Q,G);X.query($,Y,W)})}execute($,Y){let X=this.poolCluster,G=cr(bL.prototype.execute);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=A31(J,Q,G);X.execute($,Y,W)})}of($,Y){return new ub6(this.poolCluster.of($,Y),this.Promise)}end(){let $=this.poolCluster,Y=cr(bL.prototype.end);return new this.Promise((X,G)=>{$.end((J)=>{if(J)N31(J,Y),G(J);else X()})})}async[Symbol.asyncDispose](){if(!this.poolCluster._closed)await this.end()}}(function($){for(let Y=0;$&&Y<$.length;Y++){let X=$[Y];if(typeof V31.prototype[X]==="function"&&bL.prototype[X]===void 0)bL.prototype[X]=function(J){return function(){return V31.prototype[J].apply(this.poolCluster,arguments)}}(X)}})(["add","remove"]);function db6($){let Y=gb6($),X=$&&$.Promise||Promise;if(!X)throw Error("no Promise implementation available.Use promise-enabled node version or pass userland Promise implementation as parameter, for example: { Promise: require('bluebird') }");return new bL(Y,X)}cb6.createConnection=L31;cb6.createPool=pb6;cb6.createPoolCluster=db6;cb6.escape=lr.escape;cb6.escapeId=lr.escapeId;cb6.format=lr.format;cb6.raw=lr.raw;cb6.Connection=zH0;cb6.PoolConnection=VH0;cb6.PromisePool=D31;cb6.PromiseConnection=zH0;cb6.PromisePoolConnection=VH0;cb6.__defineGetter__("Types",()=>eQ());cb6.__defineGetter__("Charsets",()=>PA());cb6.__defineGetter__("CharsetToEncoding",()=>EZ());cb6.setMaxParserCache=function($){F31.setMaxCache($)};cb6.clearParserCache=function(){F31.clearCache()}});var AH0=o((Hh6)=>{var ir=ek(),Qh6=Eq(),O31=Yv(),E31=xq();Hh6.createConnection=tU0();Hh6.connect=Hh6.createConnection;Hh6.Connection=E31;Hh6.ConnectionConfig=Qh6;var Wh6=ur(),Zh6=pr(),Kh6=UH0(),Uh6=HH0();Hh6.createPool=Kh6;Hh6.createPoolCluster=Uh6;Hh6.createQuery=E31.createQuery;Hh6.Pool=Wh6;Hh6.PoolCluster=Zh6;Hh6.createServer=function($){let X=new(Q31());if($)X.on("connection",$);return X};Hh6.PoolConnection=$H0();Hh6.authPlugins=Z31();Hh6.escape=ir.escape;Hh6.escapeId=ir.escapeId;Hh6.format=ir.format;Hh6.raw=ir.raw;Hh6.__defineGetter__("createConnectionPromise",()=>qv().createConnection);Hh6.__defineGetter__("createPoolPromise",()=>qv().createPool);Hh6.__defineGetter__("createPoolClusterPromise",()=>qv().createPoolCluster);Hh6.__defineGetter__("Types",()=>eQ());Hh6.__defineGetter__("Charsets",()=>PA());Hh6.__defineGetter__("CharsetToEncoding",()=>EZ());Hh6.setMaxParserCache=function($){O31.setMaxCache($)};Hh6.clearParserCache=function(){O31.clearCache()}});var jH0=o((ph6)=>{ph6.parse=function($,Y){return new _H0($,Y).parse()};class _H0{constructor($,Y){this.source=$,this.transform=Y||uh6,this.position=0,this.entries=[],this.recorded=[],this.dimension=0}isEof(){return this.position>=this.source.length}nextCharacter(){var $=this.source[this.position++];if($==="\\")return{value:this.source[this.position++],escaped:!0};return{value:$,escaped:!1}}record($){this.recorded.push($)}newEntry($){var Y;if(this.recorded.length>0||$){if(Y=this.recorded.join(""),Y==="NULL"&&!$)Y=null;if(Y!==null)Y=this.transform(Y);this.entries.push(Y),this.recorded=[]}}consumeDimensions(){if(this.source[0]==="[")while(!this.isEof()){var $=this.nextCharacter();if($.value==="=")break}}parse($){var Y,X,G;this.consumeDimensions();while(!this.isEof())if(Y=this.nextCharacter(),Y.value==="{"&&!G){if(this.dimension++,this.dimension>1)X=new _H0(this.source.substr(this.position-1),this.transform),this.entries.push(X.parse(!0)),this.position+=X.position-2}else if(Y.value==="}"&&!G){if(this.dimension--,!this.dimension){if(this.newEntry(),$)return this.entries}}else if(Y.value==='"'&&!Y.escaped){if(G)this.newEntry(!0);G=!G}else if(Y.value===","&&!G)this.newEntry();else this.record(Y.value);if(this.dimension!==0)throw Error("array dimension not balanced");return this.entries}}function uh6($){return $}});var TH0=o((qB5,aU1)=>{var ch6=jH0();aU1.exports={create:function($,Y){return{parse:function(){return ch6.parse($,Y)}}}}});var tU1=o((IB5,oU1)=>{var lh6=/(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/,ih6=/^(\d{1,})-(\d{2})-(\d{2})( BC)?$/,nh6=/([Z+-])(\d{2})?:?(\d{2})?:?(\d{2})?/,rh6=/^-?infinity$/;oU1.exports=function(Y){if(rh6.test(Y))return Number(Y.replace("i","I"));var X=lh6.exec(Y);if(!X)return ah6(Y)||null;var G=!!X[8],J=parseInt(X[1],10);if(G)J=sU1(J);var Q=parseInt(X[2],10)-1,W=X[3],Z=parseInt(X[4],10),K=parseInt(X[5],10),H=parseInt(X[6],10),z=X[7];z=z?1000*parseFloat(z):0;var V,A=sh6(Y);if(A!=null){if(V=new Date(Date.UTC(J,Q,W,Z,K,H,z)),CH0(J))V.setUTCFullYear(J);if(A!==0)V.setTime(V.getTime()-A)}else if(V=new Date(J,Q,W,Z,K,H,z),CH0(J))V.setFullYear(J);return V};function ah6($){var Y=ih6.exec($);if(!Y)return;var X=parseInt(Y[1],10),G=!!Y[4];if(G)X=sU1(X);var J=parseInt(Y[2],10)-1,Q=Y[3],W=new Date(X,J,Q);if(CH0(X))W.setFullYear(X);return W}function sh6($){if($.endsWith("+00"))return 0;var Y=nh6.exec($.split(" ")[1]);if(!Y)return;var X=Y[1];if(X==="Z")return 0;var G=X==="-"?-1:1,J=parseInt(Y[2],10)*3600+parseInt(Y[3]||0,10)*60+parseInt(Y[4]||0,10);return J*G*1000}function sU1($){return-($-1)}function CH0($){return $>=0&&$<100}});var $H1=o((PB5,eU1)=>{eU1.exports=th6;var oh6=Object.prototype.hasOwnProperty;function th6($){for(var Y=1;Y<arguments.length;Y++){var X=arguments[Y];for(var G in X)if(oh6.call(X,G))$[G]=X[G]}return $}});var GH1=o((wB5,XH1)=>{var eh6=$H1();XH1.exports=hq;function hq($){if(!(this instanceof hq))return new hq($);eh6(this,zf6($))}var $f6=["seconds","minutes","hours","days","months","years"];hq.prototype.toPostgres=function(){var $=$f6.filter(this.hasOwnProperty,this);if(this.milliseconds&&$.indexOf("seconds")<0)$.push("seconds");if($.length===0)return"0";return $.map(function(Y){var X=this[Y]||0;if(Y==="seconds"&&this.milliseconds)X=(X+this.milliseconds/1000).toFixed(6).replace(/\.?0+$/,"");return X+" "+Y},this).join(" ")};var Yf6={years:"Y",months:"M",days:"D",hours:"H",minutes:"M",seconds:"S"},Xf6=["years","months","days"],Gf6=["hours","minutes","seconds"];hq.prototype.toISOString=hq.prototype.toISO=function(){var $=Xf6.map(X,this).join(""),Y=Gf6.map(X,this).join("");return"P"+$+"T"+Y;function X(G){var J=this[G]||0;if(G==="seconds"&&this.milliseconds)J=(J+this.milliseconds/1000).toFixed(6).replace(/0+$/,"");return J+Yf6[G]}};var SH0="([+-]?\\d+)",Jf6=SH0+"\\s+years?",Qf6=SH0+"\\s+mons?",Wf6=SH0+"\\s+days?",Zf6="([+-])?([\\d]*):(\\d\\d):(\\d\\d)\\.?(\\d{1,6})?",Kf6=new RegExp([Jf6,Qf6,Wf6,Zf6].map(function($){return"("+$+")?"}).join("\\s*")),YH1={years:2,months:4,days:6,hours:9,minutes:10,seconds:11,milliseconds:12},Uf6=["hours","minutes","seconds","milliseconds"];function Hf6($){var Y=$+"000000".slice($.length);return parseInt(Y,10)/1000}function zf6($){if(!$)return{};var Y=Kf6.exec($),X=Y[8]==="-";return Object.keys(YH1).reduce(function(G,J){var Q=YH1[J],W=Y[Q];if(!W)return G;if(W=J==="milliseconds"?Hf6(W):parseInt(W,10),!W)return G;if(X&&~Uf6.indexOf(J))W*=-1;return G[J]=W,G},{})}});var WH1=o((_B5,QH1)=>{var JH1=Buffer.from||Buffer;QH1.exports=function(Y){if(/^\\x/.test(Y))return JH1(Y.substr(2),"hex");var X="",G=0;while(G<Y.length)if(Y[G]!=="\\")X+=Y[G],++G;else if(/[0-7]{3}/.test(Y.substr(G+1,3)))X+=String.fromCharCode(parseInt(Y.substr(G+1,3),8)),G+=4;else{var J=1;while(G+J<Y.length&&Y[G+J]==="\\")J++;for(var Q=0;Q<Math.floor(J/2);++Q)X+="\\";G+=Math.floor(J/2)*2}return JH1(X,"binary")}});var AH1=o((jB5,VH1)=>{var Xx=jH0(),Gx=TH0(),Xa=tU1(),KH1=GH1(),UH1=WH1();function Ga($){return function(X){if(X===null)return X;return $(X)}}function HH1($){if($===null)return $;return $==="TRUE"||$==="t"||$==="true"||$==="y"||$==="yes"||$==="on"||$==="1"}function Vf6($){if(!$)return null;return Xx.parse($,HH1)}function Af6($){return parseInt($,10)}function kH0($){if(!$)return null;return Xx.parse($,Ga(Af6))}function Ff6($){if(!$)return null;return Xx.parse($,Ga(function(Y){return zH1(Y).trim()}))}var Df6=function($){if(!$)return null;var Y=Gx.create($,function(X){if(X!==null)X=bH0(X);return X});return Y.parse()},vH0=function($){if(!$)return null;var Y=Gx.create($,function(X){if(X!==null)X=parseFloat(X);return X});return Y.parse()},RZ=function($){if(!$)return null;var Y=Gx.create($);return Y.parse()},xH0=function($){if(!$)return null;var Y=Gx.create($,function(X){if(X!==null)X=Xa(X);return X});return Y.parse()},Nf6=function($){if(!$)return null;var Y=Gx.create($,function(X){if(X!==null)X=KH1(X);return X});return Y.parse()},Lf6=function($){if(!$)return null;return Xx.parse($,Ga(UH1))},yH0=function($){return parseInt($,10)},zH1=function($){var Y=String($);if(/^\d+$/.test(Y))return Y;return $},ZH1=function($){if(!$)return null;return Xx.parse($,Ga(JSON.parse))},bH0=function($){if($[0]!=="(")return null;return $=$.substring(1,$.length-1).split(","),{x:parseFloat($[0]),y:parseFloat($[1])}},Bf6=function($){if($[0]!=="<"&&$[1]!=="(")return null;var Y="(",X="",G=!1;for(var J=2;J<$.length-1;J++){if(!G)Y+=$[J];if($[J]===")"){G=!0;continue}else if(!G)continue;if($[J]===",")continue;X+=$[J]}var Q=bH0(Y);return Q.radius=parseFloat(X),Q},Of6=function($){$(20,zH1),$(21,yH0),$(23,yH0),$(26,yH0),$(700,parseFloat),$(701,parseFloat),$(16,HH1),$(1082,Xa),$(1114,Xa),$(1184,Xa),$(600,bH0),$(651,RZ),$(718,Bf6),$(1000,Vf6),$(1001,Lf6),$(1005,kH0),$(1007,kH0),$(1028,kH0),$(1016,Ff6),$(1017,Df6),$(1021,vH0),$(1022,vH0),$(1231,vH0),$(1014,RZ),$(1015,RZ),$(1008,RZ),$(1009,RZ),$(1040,RZ),$(1041,RZ),$(1115,xH0),$(1182,xH0),$(1185,xH0),$(1186,KH1),$(1187,Nf6),$(17,UH1),$(114,JSON.parse.bind(JSON)),$(3802,JSON.parse.bind(JSON)),$(199,ZH1),$(3807,ZH1),$(3907,RZ),$(2951,RZ),$(791,RZ),$(1183,RZ),$(1270,RZ)};VH1.exports={init:Of6}});var DH1=o((TB5,FH1)=>{var iJ=1e6;function Ef6($){var Y=$.readInt32BE(0),X=$.readUInt32BE(4),G="";if(Y<0)Y=~Y+(X===0),X=~X+1>>>0,G="-";var J="",Q,W,Z,K,H,z;{if(Q=Y%iJ,Y=Y/iJ>>>0,W=4294967296*Q+X,X=W/iJ>>>0,Z=""+(W-iJ*X),X===0&&Y===0)return G+Z+J;K="",H=6-Z.length;for(z=0;z<H;z++)K+="0";J=K+Z+J}{if(Q=Y%iJ,Y=Y/iJ>>>0,W=4294967296*Q+X,X=W/iJ>>>0,Z=""+(W-iJ*X),X===0&&Y===0)return G+Z+J;K="",H=6-Z.length;for(z=0;z<H;z++)K+="0";J=K+Z+J}{if(Q=Y%iJ,Y=Y/iJ>>>0,W=4294967296*Q+X,X=W/iJ>>>0,Z=""+(W-iJ*X),X===0&&Y===0)return G+Z+J;K="",H=6-Z.length;for(z=0;z<H;z++)K+="0";J=K+Z+J}return Q=Y%iJ,W=4294967296*Q+X,Z=""+W%iJ,G+Z+J}FH1.exports=Ef6});var EH1=o((CB5,OH1)=>{var Mf6=DH1(),j7=function($,Y,X,G,J){X=X||0,G=G||!1,J=J||function(F,N,D){return F*Math.pow(2,D)+N};var Q=X>>3,W=function(F){if(G)return~F&255;return F},Z=255,K=8-X%8;if(Y<K)Z=255<<8-Y&255,K=Y;if(X)Z=Z>>X%8;var H=0;if(X%8+Y>=8)H=J(0,W($[Q])&Z,K);var z=Y+X>>3;for(var V=Q+1;V<z;V++)H=J(H,W($[V]),8);var A=(Y+X)%8;if(A>0)H=J(H,W($[z])>>8-A,A);return H},BH1=function($,Y,X){var G=Math.pow(2,X-1)-1,J=j7($,1),Q=j7($,X,1);if(Q===0)return 0;var W=1,Z=function(H,z,V){if(H===0)H=1;for(var A=1;A<=V;A++)if(W/=2,(z&1<<V-A)>0)H+=W;return H},K=j7($,Y,X+1,!1,Z);if(Q==Math.pow(2,X+1)-1){if(K===0)return J===0?1/0:-1/0;return NaN}return(J===0?1:-1)*Math.pow(2,Q-G)*K},Rf6=function($){if(j7($,1)==1)return-1*(j7($,15,1,!0)+1);return j7($,15,1)},NH1=function($){if(j7($,1)==1)return-1*(j7($,31,1,!0)+1);return j7($,31,1)},qf6=function($){return BH1($,23,8)},If6=function($){return BH1($,52,11)},Pf6=function($){var Y=j7($,16,32);if(Y==49152)return NaN;var X=Math.pow(1e4,j7($,16,16)),G=0,J=[],Q=j7($,16);for(var W=0;W<Q;W++)G+=j7($,16,64+16*W)*X,X/=1e4;var Z=Math.pow(10,j7($,16,48));return(Y===0?1:-1)*Math.round(G*Z)/Z},LH1=function($,Y){var X=j7(Y,1),G=j7(Y,63,1),J=new Date((X===0?1:-1)*G/1000+946684800000);if(!$)J.setTime(J.getTime()+J.getTimezoneOffset()*60000);return J.usec=G%1000,J.getMicroSeconds=function(){return this.usec},J.setMicroSeconds=function(Q){this.usec=Q},J.getUTCMicroSeconds=function(){return this.usec},J},Jx=function($){var Y=j7($,32),X=j7($,32,32),G=j7($,32,64),J=96,Q=[];for(var W=0;W<Y;W++)Q[W]=j7($,32,J),J+=32,J+=32;var Z=function(H){var z=j7($,32,J);if(J+=32,z==4294967295)return null;var V;if(H==23||H==20)return V=j7($,z*8,J),J+=z*8,V;else if(H==25)return V=$.toString(this.encoding,J>>3,(J+=z<<3)>>3),V;else console.log("ERROR: ElementType not implemented: "+H)},K=function(H,z){var V=[],A;if(H.length>1){var F=H.shift();for(A=0;A<F;A++)V[A]=K(H,z);H.unshift(F)}else for(A=0;A<H[0];A++)V[A]=Z(z);return V};return K(Q,G)},wf6=function($){return $.toString("utf8")},_f6=function($){if($===null)return null;return j7($,8)>0},jf6=function($){$(20,Mf6),$(21,Rf6),$(23,NH1),$(26,NH1),$(1700,Pf6),$(700,qf6),$(701,If6),$(16,_f6),$(1114,LH1.bind(null,!1)),$(1184,LH1.bind(null,!0)),$(1000,Jx),$(1007,Jx),$(1016,Jx),$(1008,Jx),$(1009,Jx),$(25,wf6)};OH1.exports={init:jf6}});var RH1=o((SB5,MH1)=>{MH1.exports={BOOL:16,BYTEA:17,CHAR:18,INT8:20,INT2:21,INT4:23,REGPROC:24,TEXT:25,OID:26,TID:27,XID:28,CID:29,JSON:114,XML:142,PG_NODE_TREE:194,SMGR:210,PATH:602,POLYGON:604,CIDR:650,FLOAT4:700,FLOAT8:701,ABSTIME:702,RELTIME:703,TINTERVAL:704,CIRCLE:718,MACADDR8:774,MONEY:790,MACADDR:829,INET:869,ACLITEM:1033,BPCHAR:1042,VARCHAR:1043,DATE:1082,TIME:1083,TIMESTAMP:1114,TIMESTAMPTZ:1184,INTERVAL:1186,TIMETZ:1266,BIT:1560,VARBIT:1562,NUMERIC:1700,REFCURSOR:1790,REGPROCEDURE:2202,REGOPER:2203,REGOPERATOR:2204,REGCLASS:2205,REGTYPE:2206,UUID:2950,TXID_SNAPSHOT:2970,PG_LSN:3220,PG_NDISTINCT:3361,PG_DEPENDENCIES:3402,TSVECTOR:3614,TSQUERY:3615,GTSVECTOR:3642,REGCONFIG:3734,REGDICTIONARY:3769,JSONB:3802,REGNAMESPACE:4089,REGROLE:4096}});var Wx=o((yf6)=>{var Tf6=AH1(),Cf6=EH1(),Sf6=TH0(),kf6=RH1();yf6.getTypeParser=vf6;yf6.setTypeParser=xf6;yf6.arrayParser=Sf6;yf6.builtins=kf6;var Qx={text:{},binary:{}};function qH1($){return String($)}function vf6($,Y){if(Y=Y||"text",!Qx[Y])return qH1;return Qx[Y][$]||qH1}function xf6($,Y,X){if(typeof Y=="function")X=Y,Y="text";Qx[Y][$]=X}Tf6.init(function($,Y){Qx.text[$]=Y});Cf6.init(function($,Y){Qx.binary[$]=Y})});var Zx=o((vB5,hH0)=>{var IH1;try{IH1=process.platform==="win32"?process.env.USERNAME:process.env.USER}catch{}hH0.exports={host:"localhost",user:IH1,database:void 0,password:null,connectionString:void 0,port:5432,rows:0,binary:!1,max:10,idleTimeoutMillis:30000,client_encoding:"",ssl:!1,application_name:void 0,fallback_application_name:void 0,options:void 0,parseInputDatesAsUTC:!1,statement_timeout:!1,lock_timeout:!1,idle_in_transaction_session_timeout:!1,query_timeout:!1,connect_timeout:0,keepalives:1,keepalives_idle:0};var fq=Wx(),mf6=fq.getTypeParser(20,"text"),uf6=fq.getTypeParser(1016,"text");hH0.exports.__defineSetter__("parseInt8",function($){fq.setTypeParser(20,"text",$?fq.getTypeParser(23,"text"):mf6),fq.setTypeParser(1016,"text",$?fq.getTypeParser(1007,"text"):uf6)})});var gq=o((xB5,_H1)=>{var pf6=Zx(),PH1=L0("util"),{isDate:df6}=PH1.types||PH1;function cf6($){return'"'+$.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"'}function wH1($){let Y="{";for(let X=0;X<$.length;X++){if(X>0)Y=Y+",";if($[X]===null||typeof $[X]>"u")Y=Y+"NULL";else if(Array.isArray($[X]))Y=Y+wH1($[X]);else if(ArrayBuffer.isView($[X])){let G=$[X];if(!(G instanceof Buffer)){let J=Buffer.from(G.buffer,G.byteOffset,G.byteLength);if(J.length===G.byteLength)G=J;else G=J.slice(G.byteOffset,G.byteOffset+G.byteLength)}Y+="\\\\x"+G.toString("hex")}else Y+=cf6(Ja($[X]))}return Y=Y+"}",Y}var Ja=function($,Y){if($==null)return null;if(typeof $==="object"){if($ instanceof Buffer)return $;if(ArrayBuffer.isView($)){let X=Buffer.from($.buffer,$.byteOffset,$.byteLength);if(X.length===$.byteLength)return X;return X.slice($.byteOffset,$.byteOffset+$.byteLength)}if(df6($))if(pf6.parseInputDatesAsUTC)return nf6($);else return if6($);if(Array.isArray($))return wH1($);return lf6($,Y)}return $.toString()};function lf6($,Y){if($&&typeof $.toPostgres==="function"){if(Y=Y||[],Y.indexOf($)!==-1)throw Error('circular reference detected while preparing "'+$+'" for query');return Y.push($),Ja($.toPostgres(Ja),Y)}return JSON.stringify($)}function if6($){let Y=-$.getTimezoneOffset(),X=$.getFullYear(),G=X<1;if(G)X=Math.abs(X)+1;let J=String(X).padStart(4,"0")+"-"+String($.getMonth()+1).padStart(2,"0")+"-"+String($.getDate()).padStart(2,"0")+"T"+String($.getHours()).padStart(2,"0")+":"+String($.getMinutes()).padStart(2,"0")+":"+String($.getSeconds()).padStart(2,"0")+"."+String($.getMilliseconds()).padStart(3,"0");if(Y<0)J+="-",Y*=-1;else J+="+";if(J+=String(Math.floor(Y/60)).padStart(2,"0")+":"+String(Y%60).padStart(2,"0"),G)J+=" BC";return J}function nf6($){let Y=$.getUTCFullYear(),X=Y<1;if(X)Y=Math.abs(Y)+1;let G=String(Y).padStart(4,"0")+"-"+String($.getUTCMonth()+1).padStart(2,"0")+"-"+String($.getUTCDate()).padStart(2,"0")+"T"+String($.getUTCHours()).padStart(2,"0")+":"+String($.getUTCMinutes()).padStart(2,"0")+":"+String($.getUTCSeconds()).padStart(2,"0")+"."+String($.getUTCMilliseconds()).padStart(3,"0");if(G+="+00:00",X)G+=" BC";return G}function rf6($,Y,X){if($=typeof $==="string"?{text:$}:$,Y)if(typeof Y==="function")$.callback=Y;else $.values=Y;if(X)$.callback=X;return $}var af6=function($){return'"'+$.replace(/"/g,'""')+'"'},sf6=function($){let Y=!1,X="'";if($==null)return"''";if(typeof $!=="string")return"''";for(let G=0;G<$.length;G++){let J=$[G];if(J==="'")X+=J+J;else if(J==="\\")X+=J+J,Y=!0;else X+=J}if(X+="'",Y===!0)X=" E"+X;return X};_H1.exports={prepareValue:function(Y){return Ja(Y)},normalizeQueryConfig:rf6,escapeIdentifier:af6,escapeLiteral:sf6}});var TH1=o((yB5,jH1)=>{var mq=L0("crypto");function fH0($){return mq.createHash("md5").update($,"utf-8").digest("hex")}function of6($,Y,X){let G=fH0(Y+$);return"md5"+fH0(Buffer.concat([Buffer.from(G),X]))}function tf6($){return mq.createHash("sha256").update($).digest()}function ef6($,Y){return $=$.replace(/(\D)-/,"$1"),mq.createHash($).update(Y).digest()}function $g6($,Y){return mq.createHmac("sha256",$).update(Y).digest()}async function Yg6($,Y,X){return mq.pbkdf2Sync($,Y,X,32,"sha256")}jH1.exports={postgresMd5PasswordHash:of6,randomBytes:mq.randomBytes,deriveKey:Yg6,sha256:tf6,hashByName:ef6,hmacSha256:$g6,md5:fH0}});var vH1=o((bB5,kH1)=>{var CH1=L0("crypto");kH1.exports={postgresMd5PasswordHash:Gg6,randomBytes:Xg6,deriveKey:Zg6,sha256:Jg6,hashByName:Qg6,hmacSha256:Wg6,md5:gH0};var SH1=CH1.webcrypto||globalThis.crypto,mL=SH1.subtle,mH0=new TextEncoder;function Xg6($){return SH1.getRandomValues(Buffer.alloc($))}async function gH0($){try{return CH1.createHash("md5").update($,"utf-8").digest("hex")}catch(Y){let X=typeof $==="string"?mH0.encode($):$,G=await mL.digest("MD5",X);return Array.from(new Uint8Array(G)).map((J)=>J.toString(16).padStart(2,"0")).join("")}}async function Gg6($,Y,X){let G=await gH0(Y+$);return"md5"+await gH0(Buffer.concat([Buffer.from(G),X]))}async function Jg6($){return await mL.digest("SHA-256",$)}async function Qg6($,Y){return await mL.digest($,Y)}async function Wg6($,Y){let X=await mL.importKey("raw",$,{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return await mL.sign("HMAC",X,mH0.encode(Y))}async function Zg6($,Y,X){let G=await mL.importKey("raw",mH0.encode($),"PBKDF2",!1,["deriveBits"]),J={name:"PBKDF2",hash:"SHA-256",salt:Y,iterations:X};return await mL.deriveBits(J,G,256,["deriveBits"])}});var pH0=o((hB5,uH0)=>{var Kg6=parseInt(process.versions&&process.versions.node&&process.versions.node.split(".")[0])<15;if(Kg6)uH0.exports=TH1();else uH0.exports=vH1()});var bH1=o((fB5,yH1)=>{function uL($,Y){return Error("SASL channel binding: "+$+" when parsing public certificate "+Y.toString("base64"))}function dH0($,Y){let X=$[Y++];if(X<128)return{length:X,index:Y};let G=X&127;if(G>4)throw uL("bad length",$);X=0;for(let J=0;J<G;J++)X=X<<8|$[Y++];return{length:X,index:Y}}function xH1($,Y){if($[Y++]!==6)throw uL("non-OID data",$);let{length:X,index:G}=dH0($,Y);Y=G;let J=Y+X,Q=$[Y++],W=(Q/40>>0)+"."+Q%40;while(Y<J){let Z=0;while(Y<J){let K=$[Y++];if(Z=Z<<7|K&127,K<128)break}W+="."+Z}return{oid:W,index:Y}}function Kx($,Y){if($[Y++]!==48)throw uL("non-sequence data",$);return dH0($,Y)}function Ug6($,Y){if(Y===void 0)Y=0;Y=Kx($,Y).index;let{length:X,index:G}=Kx($,Y);Y=G+X,Y=Kx($,Y).index;let{oid:J,index:Q}=xH1($,Y);switch(J){case"1.2.840.113549.1.1.4":return"MD5";case"1.2.840.113549.1.1.5":return"SHA-1";case"1.2.840.113549.1.1.11":return"SHA-256";case"1.2.840.113549.1.1.12":return"SHA-384";case"1.2.840.113549.1.1.13":return"SHA-512";case"1.2.840.113549.1.1.14":return"SHA-224";case"1.2.840.113549.1.1.15":return"SHA512-224";case"1.2.840.113549.1.1.16":return"SHA512-256";case"1.2.840.10045.4.1":return"SHA-1";case"1.2.840.10045.4.3.1":return"SHA-224";case"1.2.840.10045.4.3.2":return"SHA-256";case"1.2.840.10045.4.3.3":return"SHA-384";case"1.2.840.10045.4.3.4":return"SHA-512";case"1.2.840.113549.1.1.10":{if(Y=Q,Y=Kx($,Y).index,$[Y++]!==160)throw uL("non-tag data",$);Y=dH0($,Y).index,Y=Kx($,Y).index;let{oid:W}=xH1($,Y);switch(W){case"1.2.840.113549.2.5":return"MD5";case"1.3.14.3.2.26":return"SHA-1";case"2.16.840.1.101.3.4.2.1":return"SHA-256";case"2.16.840.1.101.3.4.2.2":return"SHA-384";case"2.16.840.1.101.3.4.2.3":return"SHA-512"}throw uL("unknown hash OID "+W,$)}case"1.3.101.110":case"1.3.101.112":return"SHA-512";case"1.3.101.111":case"1.3.101.113":throw uL("Ed448 certificate channel binding is not currently supported by Postgres")}throw uL("unknown OID "+J,$)}yH1.exports={signatureAlgorithmHashFromCertificate:Ug6}});var mH1=o((gB5,gH1)=>{var TA=pH0(),{signatureAlgorithmHashFromCertificate:Hg6}=bH1();function zg6($,Y){let X=["SCRAM-SHA-256"];if(Y)X.unshift("SCRAM-SHA-256-PLUS");let G=X.find((W)=>$.includes(W));if(!G)throw Error("SASL: Only mechanism(s) "+X.join(" and ")+" are supported");if(G==="SCRAM-SHA-256-PLUS"&&typeof Y.getPeerCertificate!=="function")throw Error("SASL: Mechanism SCRAM-SHA-256-PLUS requires a certificate");let J=TA.randomBytes(18).toString("base64");return{mechanism:G,clientNonce:J,response:(G==="SCRAM-SHA-256-PLUS"?"p=tls-server-end-point":Y?"y":"n")+",,n=*,r="+J,message:"SASLInitialResponse"}}async function Vg6($,Y,X,G){if($.message!=="SASLInitialResponse")throw Error("SASL: Last message was not SASLInitialResponse");if(typeof Y!=="string")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string");if(Y==="")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string");if(typeof X!=="string")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string");let J=Dg6(X);if(!J.nonce.startsWith($.clientNonce))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce");else if(J.nonce.length===$.clientNonce.length)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short");let Q="n=*,r="+$.clientNonce,W="r="+J.nonce+",s="+J.salt+",i="+J.iteration,Z=G?"eSws":"biws";if($.mechanism==="SCRAM-SHA-256-PLUS"){let O=G.getPeerCertificate().raw,E=Hg6(O);if(E==="MD5"||E==="SHA-1")E="SHA-256";let M=await TA.hashByName(E,O);Z=Buffer.concat([Buffer.from("p=tls-server-end-point,,"),Buffer.from(M)]).toString("base64")}let K="c="+Z+",r="+J.nonce,H=Q+","+W+","+K,z=Buffer.from(J.salt,"base64"),V=await TA.deriveKey(Y,z,J.iteration),A=await TA.hmacSha256(V,"Client Key"),F=await TA.sha256(A),N=await TA.hmacSha256(F,H),D=Lg6(Buffer.from(A),Buffer.from(N)).toString("base64"),L=await TA.hmacSha256(V,"Server Key"),B=await TA.hmacSha256(L,H);$.message="SASLResponse",$.serverSignature=Buffer.from(B).toString("base64"),$.response=K+",p="+D}function Ag6($,Y){if($.message!=="SASLResponse")throw Error("SASL: Last message was not SASLResponse");if(typeof Y!=="string")throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string");let{serverSignature:X}=Ng6(Y);if(X!==$.serverSignature)throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match")}function Fg6($){if(typeof $!=="string")throw TypeError("SASL: text must be a string");return $.split("").map((Y,X)=>$.charCodeAt(X)).every((Y)=>Y>=33&&Y<=43||Y>=45&&Y<=126)}function hH1($){return/^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test($)}function fH1($){if(typeof $!=="string")throw TypeError("SASL: attribute pairs text must be a string");return new Map($.split(",").map((Y)=>{if(!/^.=/.test(Y))throw Error("SASL: Invalid attribute pair entry");let X=Y[0],G=Y.substring(2);return[X,G]}))}function Dg6($){let Y=fH1($),X=Y.get("r");if(!X)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing");else if(!Fg6(X))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters");let G=Y.get("s");if(!G)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing");else if(!hH1(G))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64");let J=Y.get("i");if(!J)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing");else if(!/^[1-9][0-9]*$/.test(J))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count");let Q=parseInt(J,10);return{nonce:X,salt:G,iteration:Q}}function Ng6($){let X=fH1($).get("v");if(!X)throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing");else if(!hH1(X))throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64");return{serverSignature:X}}function Lg6($,Y){if(!Buffer.isBuffer($))throw TypeError("first argument must be a Buffer");if(!Buffer.isBuffer(Y))throw TypeError("second argument must be a Buffer");if($.length!==Y.length)throw Error("Buffer lengths must match");if($.length===0)throw Error("Buffers cannot be empty");return Buffer.from($.map((X,G)=>$[G]^Y[G]))}gH1.exports={startSession:zg6,continueSession:Vg6,finalizeSession:Ag6}});var Wa=o((mB5,uH1)=>{var Bg6=Wx();function Qa($){this._types=$||Bg6,this.text={},this.binary={}}Qa.prototype.getOverrides=function($){switch($){case"text":return this.text;case"binary":return this.binary;default:return{}}};Qa.prototype.setTypeParser=function($,Y,X){if(typeof Y==="function")X=Y,Y="text";this.getOverrides(Y)[$]=X};Qa.prototype.getTypeParser=function($,Y){return Y=Y||"text",this.getOverrides(Y)[$]||this._types.getTypeParser($,Y)};uH1.exports=Qa});var cH1=o((uB5,dH1)=>{function uq($,Y={}){if($.charAt(0)==="/"){let K=$.split(" ");return{host:K[0],database:K[1]}}let X={},G,J=!1;if(/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test($))$=encodeURI($).replace(/%25(\d\d)/g,"%$1");try{try{G=new URL($,"postgres://base")}catch(K){G=new URL($.replace("@/","@___DUMMY___/"),"postgres://base"),J=!0}}catch(K){throw K.input&&(K.input="*****REDACTED*****"),K}for(let K of G.searchParams.entries())X[K[0]]=K[1];if(X.user=X.user||decodeURIComponent(G.username),X.password=X.password||decodeURIComponent(G.password),G.protocol=="socket:")return X.host=decodeURI(G.pathname),X.database=G.searchParams.get("db"),X.client_encoding=G.searchParams.get("encoding"),X;let Q=J?"":G.hostname;if(!X.host)X.host=decodeURIComponent(Q);else if(Q&&/^%2f/i.test(Q))G.pathname=Q+G.pathname;if(!X.port)X.port=G.port;let W=G.pathname.slice(1)||null;if(X.database=W?decodeURI(W):null,X.ssl==="true"||X.ssl==="1")X.ssl=!0;if(X.ssl==="0")X.ssl=!1;if(X.sslcert||X.sslkey||X.sslrootcert||X.sslmode)X.ssl={};let Z=X.sslcert||X.sslkey||X.sslrootcert?L0("fs"):null;if(X.sslcert)X.ssl.cert=Z.readFileSync(X.sslcert).toString();if(X.sslkey)X.ssl.key=Z.readFileSync(X.sslkey).toString();if(X.sslrootcert)X.ssl.ca=Z.readFileSync(X.sslrootcert).toString();if(Y.useLibpqCompat&&X.uselibpqcompat)throw Error("Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.");if(X.uselibpqcompat==="true"||Y.useLibpqCompat)switch(X.sslmode){case"disable":{X.ssl=!1;break}case"prefer":{X.ssl.rejectUnauthorized=!1;break}case"require":{if(X.sslrootcert)X.ssl.checkServerIdentity=function(){};else X.ssl.rejectUnauthorized=!1;break}case"verify-ca":{if(!X.ssl.ca)throw Error("SECURITY WARNING: Using sslmode=verify-ca requires specifying a CA with sslrootcert. If a public CA is used, verify-ca allows connections to a server that somebody else may have registered with the CA, making you vulnerable to Man-in-the-Middle attacks. Either specify a custom CA certificate with sslrootcert parameter or use sslmode=verify-full for proper security.");X.ssl.checkServerIdentity=function(){};break}case"verify-full":break}else switch(X.sslmode){case"disable":{X.ssl=!1;break}case"prefer":case"require":case"verify-ca":case"verify-full":{if(X.sslmode!=="verify-full")cH0(X.sslmode);break}case"no-verify":{X.ssl.rejectUnauthorized=!1;break}}return X}function Og6($){return Object.entries($).reduce((X,[G,J])=>{if(J!==void 0&&J!==null)X[G]=J;return X},{})}function pH1($){return Object.entries($).reduce((X,[G,J])=>{if(G==="ssl"){let Q=J;if(typeof Q==="boolean")X[G]=Q;if(typeof Q==="object")X[G]=Og6(Q)}else if(J!==void 0&&J!==null)if(G==="port"){if(J!==""){let Q=parseInt(J,10);if(isNaN(Q))throw Error(`Invalid ${G}: ${J}`);X[G]=Q}}else X[G]=J;return X},{})}function Eg6($){return pH1(uq($))}function cH0($){if(!cH0.warned&&typeof process<"u"&&process.emitWarning)cH0.warned=!0,process.emitWarning(`SECURITY WARNING: The SSL modes 'prefer', 'require', and 'verify-ca' are treated as aliases for 'verify-full'.
In the next major version (pg-connection-string v3.0.0 and pg v9.0.0), these modes will adopt standard libpq semantics, which have weaker security guarantees.

To prepare for this change:
- If you want the current behavior, explicitly use 'sslmode=verify-full'
- If you want libpq compatibility now, use 'uselibpqcompat=true&sslmode=${$}'

See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode definitions.`)}dH1.exports=uq;uq.parse=uq;uq.toClientConfig=pH1;uq.parseIntoClientConfig=Eg6});var lH0=o((pB5,rH1)=>{var Mg6=L0("dns"),iH1=Zx(),lH1=cH1().parse,_G=function($,Y,X){if(Y[$])return Y[$];if(X===void 0)X=process.env["PG"+$.toUpperCase()];else if(X===!1);else X=process.env[X];return X||iH1[$]},Rg6=function(){switch(process.env.PGSSLMODE){case"disable":return!1;case"prefer":case"require":case"verify-ca":case"verify-full":return!0;case"no-verify":return{rejectUnauthorized:!1}}return iH1.ssl},pq=function($){return"'"+(""+$).replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"},qZ=function($,Y,X){let G=Y[X];if(G!==void 0&&G!==null)$.push(X+"="+pq(G))};class nH1{constructor($){if($=typeof $==="string"?lH1($):$||{},$.connectionString)$=Object.assign({},$,lH1($.connectionString));if(this.user=_G("user",$),this.database=_G("database",$),this.database===void 0)this.database=this.user;if(this.port=parseInt(_G("port",$),10),this.host=_G("host",$),Object.defineProperty(this,"password",{configurable:!0,enumerable:!1,writable:!0,value:_G("password",$)}),this.binary=_G("binary",$),this.options=_G("options",$),this.ssl=typeof $.ssl>"u"?Rg6():$.ssl,typeof this.ssl==="string"){if(this.ssl==="true")this.ssl=!0}if(this.ssl==="no-verify")this.ssl={rejectUnauthorized:!1};if(this.ssl&&this.ssl.key)Object.defineProperty(this.ssl,"key",{enumerable:!1});if(this.client_encoding=_G("client_encoding",$),this.replication=_G("replication",$),this.isDomainSocket=!(this.host||"").indexOf("/"),this.application_name=_G("application_name",$,"PGAPPNAME"),this.fallback_application_name=_G("fallback_application_name",$,!1),this.statement_timeout=_G("statement_timeout",$,!1),this.lock_timeout=_G("lock_timeout",$,!1),this.idle_in_transaction_session_timeout=_G("idle_in_transaction_session_timeout",$,!1),this.query_timeout=_G("query_timeout",$,!1),$.connectionTimeoutMillis===void 0)this.connect_timeout=process.env.PGCONNECT_TIMEOUT||0;else this.connect_timeout=Math.floor($.connectionTimeoutMillis/1000);if($.keepAlive===!1)this.keepalives=0;else if($.keepAlive===!0)this.keepalives=1;if(typeof $.keepAliveInitialDelayMillis==="number")this.keepalives_idle=Math.floor($.keepAliveInitialDelayMillis/1000)}getLibpqConnectionString($){let Y=[];qZ(Y,this,"user"),qZ(Y,this,"password"),qZ(Y,this,"port"),qZ(Y,this,"application_name"),qZ(Y,this,"fallback_application_name"),qZ(Y,this,"connect_timeout"),qZ(Y,this,"options");let X=typeof this.ssl==="object"?this.ssl:this.ssl?{sslmode:this.ssl}:{};if(qZ(Y,X,"sslmode"),qZ(Y,X,"sslca"),qZ(Y,X,"sslkey"),qZ(Y,X,"sslcert"),qZ(Y,X,"sslrootcert"),this.database)Y.push("dbname="+pq(this.database));if(this.replication)Y.push("replication="+pq(this.replication));if(this.host)Y.push("host="+pq(this.host));if(this.isDomainSocket)return $(null,Y.join(" "));if(this.client_encoding)Y.push("client_encoding="+pq(this.client_encoding));Mg6.lookup(this.host,function(G,J){if(G)return $(G,null);return Y.push("hostaddr="+pq(J)),$(null,Y.join(" "))})}}rH1.exports=nH1});var iH0=o((dB5,oH1)=>{var qg6=Wx(),aH1=/^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/;class sH1{constructor($,Y){if(this.command=null,this.rowCount=null,this.oid=null,this.rows=[],this.fields=[],this._parsers=void 0,this._types=Y,this.RowCtor=null,this.rowAsArray=$==="array",this.rowAsArray)this.parseRow=this._parseRowAsArray;this._prebuiltEmptyResultObject=null}addCommandComplete($){let Y;if($.text)Y=aH1.exec($.text);else Y=aH1.exec($.command);if(Y){if(this.command=Y[1],Y[3])this.oid=parseInt(Y[2],10),this.rowCount=parseInt(Y[3],10);else if(Y[2])this.rowCount=parseInt(Y[2],10)}}_parseRowAsArray($){let Y=Array($.length);for(let X=0,G=$.length;X<G;X++){let J=$[X];if(J!==null)Y[X]=this._parsers[X](J);else Y[X]=null}return Y}parseRow($){let Y={...this._prebuiltEmptyResultObject};for(let X=0,G=$.length;X<G;X++){let J=$[X],Q=this.fields[X].name;if(J!==null){let W=this.fields[X].format==="binary"?Buffer.from(J):J;Y[Q]=this._parsers[X](W)}else Y[Q]=null}return Y}addRow($){this.rows.push($)}addFields($){if(this.fields=$,this.fields.length)this._parsers=Array($.length);let Y={};for(let X=0;X<$.length;X++){let G=$[X];if(Y[G.name]=null,this._types)this._parsers[X]=this._types.getTypeParser(G.dataTypeID,G.format||"text");else this._parsers[X]=qg6.getTypeParser(G.dataTypeID,G.format||"text")}this._prebuiltEmptyResultObject={...Y}}}oH1.exports=sH1});var Xz1=o((cB5,Yz1)=>{var{EventEmitter:Ig6}=L0("events"),tH1=iH0(),eH1=gq();class $z1 extends Ig6{constructor($,Y,X){super();if($=eH1.normalizeQueryConfig($,Y,X),this.text=$.text,this.values=$.values,this.rows=$.rows,this.types=$.types,this.name=$.name,this.queryMode=$.queryMode,this.binary=$.binary,this.portal=$.portal||"",this.callback=$.callback,this._rowMode=$.rowMode,process.domain&&$.callback)this.callback=process.domain.bind($.callback);this._result=new tH1(this._rowMode,this.types),this._results=this._result,this._canceledDueToError=!1}requiresPreparation(){if(this.queryMode==="extended")return!0;if(this.name)return!0;if(this.rows)return!0;if(!this.text)return!1;if(!this.values)return!1;return this.values.length>0}_checkForMultirow(){if(this._result.command){if(!Array.isArray(this._results))this._results=[this._result];this._result=new tH1(this._rowMode,this._result._types),this._results.push(this._result)}}handleRowDescription($){this._checkForMultirow(),this._result.addFields($.fields),this._accumulateRows=this.callback||!this.listeners("row").length}handleDataRow($){let Y;if(this._canceledDueToError)return;try{Y=this._result.parseRow($.fields)}catch(X){this._canceledDueToError=X;return}if(this.emit("row",Y,this._result),this._accumulateRows)this._result.addRow(Y)}handleCommandComplete($,Y){if(this._checkForMultirow(),this._result.addCommandComplete($),this.rows)Y.sync()}handleEmptyQuery($){if(this.rows)$.sync()}handleError($,Y){if(this._canceledDueToError)$=this._canceledDueToError,this._canceledDueToError=!1;if(this.callback)return this.callback($);this.emit("error",$)}handleReadyForQuery($){if(this._canceledDueToError)return this.handleError(this._canceledDueToError,$);if(this.callback)try{this.callback(null,this._results)}catch(Y){process.nextTick(()=>{throw Y})}this.emit("end",this._results)}submit($){if(typeof this.text!=="string"&&typeof this.name!=="string")return Error("A query must have either text or a name. Supplying neither is unsupported.");let Y=$.parsedStatements[this.name];if(this.text&&Y&&this.text!==Y)return Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`);if(this.values&&!Array.isArray(this.values))return Error("Query values must be an array");if(this.requiresPreparation()){$.stream.cork&&$.stream.cork();try{this.prepare($)}finally{$.stream.uncork&&$.stream.uncork()}}else $.query(this.text);return null}hasBeenParsed($){return this.name&&$.parsedStatements[this.name]}handlePortalSuspended($){this._getRows($,this.rows)}_getRows($,Y){if($.execute({portal:this.portal,rows:Y}),!Y)$.sync();else $.flush()}prepare($){if(!this.hasBeenParsed($))$.parse({text:this.text,name:this.name,types:this.types});try{$.bind({portal:this.portal,statement:this.name,values:this.values,binary:this.binary,valueMapper:eH1.prepareValue})}catch(Y){this.handleError(Y,$);return}$.describe({type:"P",name:this.portal||""}),this._getRows($,this.rows)}handleCopyInResponse($){$.sendCopyFail("No source stream defined")}handleCopyData($,Y){}}Yz1.exports=$z1});var nH0=o((Lz1)=>{Object.defineProperty(Lz1,"__esModule",{value:!0});Lz1.NoticeMessage=Lz1.DataRowMessage=Lz1.CommandCompleteMessage=Lz1.ReadyForQueryMessage=Lz1.NotificationResponseMessage=Lz1.BackendKeyDataMessage=Lz1.AuthenticationMD5Password=Lz1.ParameterStatusMessage=Lz1.ParameterDescriptionMessage=Lz1.RowDescriptionMessage=Lz1.Field=Lz1.CopyResponse=Lz1.CopyDataMessage=Lz1.DatabaseError=Lz1.copyDone=Lz1.emptyQuery=Lz1.replicationStart=Lz1.portalSuspended=Lz1.noData=Lz1.closeComplete=Lz1.bindComplete=Lz1.parseComplete=void 0;Lz1.parseComplete={name:"parseComplete",length:5};Lz1.bindComplete={name:"bindComplete",length:5};Lz1.closeComplete={name:"closeComplete",length:5};Lz1.noData={name:"noData",length:5};Lz1.portalSuspended={name:"portalSuspended",length:5};Lz1.replicationStart={name:"replicationStart",length:4};Lz1.emptyQuery={name:"emptyQuery",length:4};Lz1.copyDone={name:"copyDone",length:4};class Gz1 extends Error{constructor($,Y,X){super($);this.length=Y,this.name=X}}Lz1.DatabaseError=Gz1;class Jz1{constructor($,Y){this.length=$,this.chunk=Y,this.name="copyData"}}Lz1.CopyDataMessage=Jz1;class Qz1{constructor($,Y,X,G){this.length=$,this.name=Y,this.binary=X,this.columnTypes=Array(G)}}Lz1.CopyResponse=Qz1;class Wz1{constructor($,Y,X,G,J,Q,W){this.name=$,this.tableID=Y,this.columnID=X,this.dataTypeID=G,this.dataTypeSize=J,this.dataTypeModifier=Q,this.format=W}}Lz1.Field=Wz1;class Zz1{constructor($,Y){this.length=$,this.fieldCount=Y,this.name="rowDescription",this.fields=Array(this.fieldCount)}}Lz1.RowDescriptionMessage=Zz1;class Kz1{constructor($,Y){this.length=$,this.parameterCount=Y,this.name="parameterDescription",this.dataTypeIDs=Array(this.parameterCount)}}Lz1.ParameterDescriptionMessage=Kz1;class Uz1{constructor($,Y,X){this.length=$,this.parameterName=Y,this.parameterValue=X,this.name="parameterStatus"}}Lz1.ParameterStatusMessage=Uz1;class Hz1{constructor($,Y){this.length=$,this.salt=Y,this.name="authenticationMD5Password"}}Lz1.AuthenticationMD5Password=Hz1;class zz1{constructor($,Y,X){this.length=$,this.processID=Y,this.secretKey=X,this.name="backendKeyData"}}Lz1.BackendKeyDataMessage=zz1;class Vz1{constructor($,Y,X,G){this.length=$,this.processId=Y,this.channel=X,this.payload=G,this.name="notification"}}Lz1.NotificationResponseMessage=Vz1;class Az1{constructor($,Y){this.length=$,this.status=Y,this.name="readyForQuery"}}Lz1.ReadyForQueryMessage=Az1;class Fz1{constructor($,Y){this.length=$,this.text=Y,this.name="commandComplete"}}Lz1.CommandCompleteMessage=Fz1;class Dz1{constructor($,Y){this.length=$,this.fields=Y,this.name="dataRow",this.fieldCount=Y.length}}Lz1.DataRowMessage=Dz1;class Nz1{constructor($,Y){this.length=$,this.message=Y,this.name="notice"}}Lz1.NoticeMessage=Nz1});var Rz1=o((Ez1)=>{Object.defineProperty(Ez1,"__esModule",{value:!0});Ez1.Writer=void 0;class Oz1{constructor($=256){this.size=$,this.offset=5,this.headerPosition=0,this.buffer=Buffer.allocUnsafe($)}ensure($){if(this.buffer.length-this.offset<$){let X=this.buffer,G=X.length+(X.length>>1)+$;this.buffer=Buffer.allocUnsafe(G),X.copy(this.buffer)}}addInt32($){return this.ensure(4),this.buffer[this.offset++]=$>>>24&255,this.buffer[this.offset++]=$>>>16&255,this.buffer[this.offset++]=$>>>8&255,this.buffer[this.offset++]=$>>>0&255,this}addInt16($){return this.ensure(2),this.buffer[this.offset++]=$>>>8&255,this.buffer[this.offset++]=$>>>0&255,this}addCString($){if(!$)this.ensure(1);else{let Y=Buffer.byteLength($);this.ensure(Y+1),this.buffer.write($,this.offset,"utf-8"),this.offset+=Y}return this.buffer[this.offset++]=0,this}addString($=""){let Y=Buffer.byteLength($);return this.ensure(Y),this.buffer.write($,this.offset),this.offset+=Y,this}add($){return this.ensure($.length),$.copy(this.buffer,this.offset),this.offset+=$.length,this}join($){if($){this.buffer[this.headerPosition]=$;let Y=this.offset-(this.headerPosition+1);this.buffer.writeInt32BE(Y,this.headerPosition+1)}return this.buffer.slice($?0:5,this.offset)}flush($){let Y=this.join($);return this.offset=5,this.headerPosition=0,this.buffer=Buffer.allocUnsafe(this.size),Y}}Ez1.Writer=Oz1});var wz1=o((Iz1)=>{Object.defineProperty(Iz1,"__esModule",{value:!0});Iz1.serialize=void 0;var rH0=Rz1(),H7=new rH0.Writer,ig6=($)=>{H7.addInt16(3).addInt16(0);for(let G of Object.keys($))H7.addCString(G).addCString($[G]);H7.addCString("client_encoding").addCString("UTF8");let Y=H7.addCString("").flush(),X=Y.length+4;return new rH0.Writer().addInt32(X).add(Y).flush()},ng6=()=>{let $=Buffer.allocUnsafe(8);return $.writeInt32BE(8,0),$.writeInt32BE(80877103,4),$},rg6=($)=>{return H7.addCString($).flush(112)},ag6=function($,Y){return H7.addCString($).addInt32(Buffer.byteLength(Y)).addString(Y),H7.flush(112)},sg6=function($){return H7.addString($).flush(112)},og6=($)=>{return H7.addCString($).flush(81)},qz1=[],tg6=($)=>{let Y=$.name||"";if(Y.length>63)console.error("Warning! Postgres only supports 63 characters for query names."),console.error("You supplied %s (%s)",Y,Y.length),console.error("This can cause conflicts and silent errors executing queries");let X=$.types||qz1,G=X.length,J=H7.addCString(Y).addCString($.text).addInt16(G);for(let Q=0;Q<G;Q++)J.addInt32(X[Q]);return H7.flush(80)},dq=new rH0.Writer,eg6=function($,Y){for(let X=0;X<$.length;X++){let G=Y?Y($[X],X):$[X];if(G==null)H7.addInt16(0),dq.addInt32(-1);else if(G instanceof Buffer)H7.addInt16(1),dq.addInt32(G.length),dq.add(G);else H7.addInt16(0),dq.addInt32(Buffer.byteLength(G)),dq.addString(G)}},$m6=($={})=>{let Y=$.portal||"",X=$.statement||"",G=$.binary||!1,J=$.values||qz1,Q=J.length;return H7.addCString(Y).addCString(X),H7.addInt16(Q),eg6(J,$.valueMapper),H7.addInt16(Q),H7.add(dq.flush()),H7.addInt16(1),H7.addInt16(G?1:0),H7.flush(66)},Ym6=Buffer.from([69,0,0,0,9,0,0,0,0,0]),Xm6=($)=>{if(!$||!$.portal&&!$.rows)return Ym6;let Y=$.portal||"",X=$.rows||0,G=Buffer.byteLength(Y),J=4+G+1+4,Q=Buffer.allocUnsafe(1+J);return Q[0]=69,Q.writeInt32BE(J,1),Q.write(Y,5,"utf-8"),Q[G+5]=0,Q.writeUInt32BE(X,Q.length-4),Q},Gm6=($,Y)=>{let X=Buffer.allocUnsafe(16);return X.writeInt32BE(16,0),X.writeInt16BE(1234,4),X.writeInt16BE(5678,6),X.writeInt32BE($,8),X.writeInt32BE(Y,12),X},aH0=($,Y)=>{let G=4+Buffer.byteLength(Y)+1,J=Buffer.allocUnsafe(1+G);return J[0]=$,J.writeInt32BE(G,1),J.write(Y,5,"utf-8"),J[G]=0,J},Jm6=H7.addCString("P").flush(68),Qm6=H7.addCString("S").flush(68),Wm6=($)=>{return $.name?aH0(68,`${$.type}${$.name||""}`):$.type==="P"?Jm6:Qm6},Zm6=($)=>{let Y=`${$.type}${$.name||""}`;return aH0(67,Y)},Km6=($)=>{return H7.add($).flush(100)},Um6=($)=>{return aH0(102,$)},Za=($)=>Buffer.from([$,0,0,0,4]),Hm6=Za(72),zm6=Za(83),Vm6=Za(88),Am6=Za(99),Fm6={startup:ig6,password:rg6,requestSsl:ng6,sendSASLInitialResponseMessage:ag6,sendSCRAMClientFinalMessage:sg6,query:og6,parse:tg6,bind:$m6,execute:Xm6,describe:Wm6,close:Zm6,flush:()=>Hm6,sync:()=>zm6,end:()=>Vm6,copyData:Km6,copyDone:()=>Am6,copyFail:Um6,cancel:Gm6};Iz1.serialize=Fm6});var Cz1=o((jz1)=>{Object.defineProperty(jz1,"__esModule",{value:!0});jz1.BufferReader=void 0;class _z1{constructor($=0){this.offset=$,this.buffer=Buffer.allocUnsafe(0),this.encoding="utf-8"}setBuffer($,Y){this.offset=$,this.buffer=Y}int16(){let $=this.buffer.readInt16BE(this.offset);return this.offset+=2,$}byte(){let $=this.buffer[this.offset];return this.offset++,$}int32(){let $=this.buffer.readInt32BE(this.offset);return this.offset+=4,$}uint32(){let $=this.buffer.readUInt32BE(this.offset);return this.offset+=4,$}string($){let Y=this.buffer.toString(this.encoding,this.offset,this.offset+$);return this.offset+=$,Y}cstring(){let $=this.offset,Y=$;while(this.buffer[Y++]!==0);return this.offset=Y,this.buffer.toString(this.encoding,$,Y-1)}bytes($){let Y=this.buffer.slice(this.offset,this.offset+$);return this.offset+=$,Y}}jz1.BufferReader=_z1});var hz1=o((yz1)=>{Object.defineProperty(yz1,"__esModule",{value:!0});yz1.Parser=void 0;var T7=nH0(),Dm6=Cz1(),oH0=1,Nm6=4,Sz1=oH0+Nm6,JW=-1,sH0=Buffer.allocUnsafe(0);class vz1{constructor($){if(this.buffer=sH0,this.bufferLength=0,this.bufferOffset=0,this.reader=new Dm6.BufferReader,($===null||$===void 0?void 0:$.mode)==="binary")throw Error("Binary mode not supported yet");this.mode=($===null||$===void 0?void 0:$.mode)||"text"}parse($,Y){this.mergeBuffer($);let X=this.bufferOffset+this.bufferLength,G=this.bufferOffset;while(G+Sz1<=X){let J=this.buffer[G],Q=this.buffer.readUInt32BE(G+oH0),W=oH0+Q;if(W+G<=X){let Z=this.handlePacket(G+Sz1,J,Q,this.buffer);Y(Z),G+=W}else break}if(G===X)this.buffer=sH0,this.bufferLength=0,this.bufferOffset=0;else this.bufferLength=X-G,this.bufferOffset=G}mergeBuffer($){if(this.bufferLength>0){let Y=this.bufferLength+$.byteLength;if(Y+this.bufferOffset>this.buffer.byteLength){let G;if(Y<=this.buffer.byteLength&&this.bufferOffset>=this.bufferLength)G=this.buffer;else{let J=this.buffer.byteLength*2;while(Y>=J)J*=2;G=Buffer.allocUnsafe(J)}this.buffer.copy(G,0,this.bufferOffset,this.bufferOffset+this.bufferLength),this.buffer=G,this.bufferOffset=0}$.copy(this.buffer,this.bufferOffset+this.bufferLength),this.bufferLength=Y}else this.buffer=$,this.bufferOffset=0,this.bufferLength=$.byteLength}handlePacket($,Y,X,G){let{reader:J}=this;J.setBuffer($,G);let Q;switch(Y){case 50:Q=T7.bindComplete;break;case 49:Q=T7.parseComplete;break;case 51:Q=T7.closeComplete;break;case 110:Q=T7.noData;break;case 115:Q=T7.portalSuspended;break;case 99:Q=T7.copyDone;break;case 87:Q=T7.replicationStart;break;case 73:Q=T7.emptyQuery;break;case 68:Q=wm6(J);break;case 67:Q=Bm6(J);break;case 90:Q=Lm6(J);break;case 65:Q=Rm6(J);break;case 82:Q=Tm6(J,X);break;case 83:Q=_m6(J);break;case 75:Q=jm6(J);break;case 69:Q=kz1(J,"error");break;case 78:Q=kz1(J,"notice");break;case 84:Q=qm6(J);break;case 116:Q=Pm6(J);break;case 71:Q=Em6(J);break;case 72:Q=Mm6(J);break;case 100:Q=Om6(J,X);break;default:return new T7.DatabaseError("received invalid response: "+Y.toString(16),X,"error")}return J.setBuffer(0,sH0),Q.length=X,Q}}yz1.Parser=vz1;var Lm6=($)=>{let Y=$.string(1);return new T7.ReadyForQueryMessage(JW,Y)},Bm6=($)=>{let Y=$.cstring();return new T7.CommandCompleteMessage(JW,Y)},Om6=($,Y)=>{let X=$.bytes(Y-4);return new T7.CopyDataMessage(JW,X)},Em6=($)=>xz1($,"copyInResponse"),Mm6=($)=>xz1($,"copyOutResponse"),xz1=($,Y)=>{let X=$.byte()!==0,G=$.int16(),J=new T7.CopyResponse(JW,Y,X,G);for(let Q=0;Q<G;Q++)J.columnTypes[Q]=$.int16();return J},Rm6=($)=>{let Y=$.int32(),X=$.cstring(),G=$.cstring();return new T7.NotificationResponseMessage(JW,Y,X,G)},qm6=($)=>{let Y=$.int16(),X=new T7.RowDescriptionMessage(JW,Y);for(let G=0;G<Y;G++)X.fields[G]=Im6($);return X},Im6=($)=>{let Y=$.cstring(),X=$.uint32(),G=$.int16(),J=$.uint32(),Q=$.int16(),W=$.int32(),Z=$.int16()===0?"text":"binary";return new T7.Field(Y,X,G,J,Q,W,Z)},Pm6=($)=>{let Y=$.int16(),X=new T7.ParameterDescriptionMessage(JW,Y);for(let G=0;G<Y;G++)X.dataTypeIDs[G]=$.int32();return X},wm6=($)=>{let Y=$.int16(),X=Array(Y);for(let G=0;G<Y;G++){let J=$.int32();X[G]=J===-1?null:$.string(J)}return new T7.DataRowMessage(JW,X)},_m6=($)=>{let Y=$.cstring(),X=$.cstring();return new T7.ParameterStatusMessage(JW,Y,X)},jm6=($)=>{let Y=$.int32(),X=$.int32();return new T7.BackendKeyDataMessage(JW,Y,X)},Tm6=($,Y)=>{let X=$.int32(),G={name:"authenticationOk",length:Y};switch(X){case 0:break;case 3:if(G.length===8)G.name="authenticationCleartextPassword";break;case 5:if(G.length===12){G.name="authenticationMD5Password";let J=$.bytes(4);return new T7.AuthenticationMD5Password(JW,J)}break;case 10:{G.name="authenticationSASL",G.mechanisms=[];let J;do if(J=$.cstring(),J)G.mechanisms.push(J);while(J)}break;case 11:G.name="authenticationSASLContinue",G.data=$.string(Y-8);break;case 12:G.name="authenticationSASLFinal",G.data=$.string(Y-8);break;default:throw Error("Unknown authenticationOk message type "+X)}return G},kz1=($,Y)=>{let X={},G=$.string(1);while(G!=="\x00")X[G]=$.cstring(),G=$.string(1);let J=X.M,Q=Y==="notice"?new T7.NoticeMessage(JW,J):new T7.DatabaseError(J,JW,Y);return Q.severity=X.S,Q.code=X.C,Q.detail=X.D,Q.hint=X.H,Q.position=X.P,Q.internalPosition=X.p,Q.internalQuery=X.q,Q.where=X.W,Q.schema=X.s,Q.table=X.t,Q.column=X.c,Q.dataType=X.d,Q.constraint=X.n,Q.file=X.F,Q.line=X.L,Q.routine=X.R,Q}});var tH0=o((Ka)=>{Object.defineProperty(Ka,"__esModule",{value:!0});Ka.DatabaseError=Ka.serialize=Ka.parse=void 0;var Cm6=nH0();Object.defineProperty(Ka,"DatabaseError",{enumerable:!0,get:function(){return Cm6.DatabaseError}});var Sm6=wz1();Object.defineProperty(Ka,"serialize",{enumerable:!0,get:function(){return Sm6.serialize}});var km6=hz1();function vm6($,Y){let X=new km6.Parser;return $.on("data",(G)=>X.parse(G,Y)),new Promise((G)=>$.on("end",()=>G()))}Ka.parse=vm6});var gz1=o((fz1)=>{Object.defineProperty(fz1,"__esModule",{value:!0});fz1.default={}});var uz1=o((eB5,mz1)=>{var{getStream:hm6,getSecureStream:fm6}=pm6();mz1.exports={getStream:hm6,getSecureStream:fm6};function gm6(){function $(X){return new(L0("net")).Socket}function Y(X){return L0("tls").connect(X)}return{getStream:$,getSecureStream:Y}}function mm6(){function $(X){let{CloudflareSocket:G}=gz1();return new G(X)}function Y(X){return X.socket.startTls(X),X.socket}return{getStream:$,getSecureStream:Y}}function um6(){if(typeof navigator==="object"&&navigator!==null&&typeof navigator.userAgent==="string")return navigator.userAgent==="Cloudflare-Workers";if(typeof Response==="function"){let $=new Response(null,{cf:{thing:!0}});if(typeof $.cf==="object"&&$.cf!==null&&$.cf.thing)return!0}return!1}function pm6(){if(um6())return mm6();return gm6()}});var eH0=o(($O5,dz1)=>{var dm6=L0("events").EventEmitter,{parse:cm6,serialize:CY}=tH0(),{getStream:lm6,getSecureStream:im6}=uz1(),nm6=CY.flush(),rm6=CY.sync(),am6=CY.end();class pz1 extends dm6{constructor($){super();if($=$||{},this.stream=$.stream||lm6($.ssl),typeof this.stream==="function")this.stream=this.stream($);this._keepAlive=$.keepAlive,this._keepAliveInitialDelayMillis=$.keepAliveInitialDelayMillis,this.parsedStatements={},this.ssl=$.ssl||!1,this._ending=!1,this._emitMessage=!1;let Y=this;this.on("newListener",function(X){if(X==="message")Y._emitMessage=!0})}connect($,Y){let X=this;this._connecting=!0,this.stream.setNoDelay(!0),this.stream.connect($,Y),this.stream.once("connect",function(){if(X._keepAlive)X.stream.setKeepAlive(!0,X._keepAliveInitialDelayMillis);X.emit("connect")});let G=function(J){if(X._ending&&(J.code==="ECONNRESET"||J.code==="EPIPE"))return;X.emit("error",J)};if(this.stream.on("error",G),this.stream.on("close",function(){X.emit("end")}),!this.ssl)return this.attachListeners(this.stream);this.stream.once("data",function(J){switch(J.toString("utf8")){case"S":break;case"N":return X.stream.end(),X.emit("error",Error("The server does not support SSL connections"));default:return X.stream.end(),X.emit("error",Error("There was an error establishing an SSL connection"))}let W={socket:X.stream};if(X.ssl!==!0){if(Object.assign(W,X.ssl),"key"in X.ssl)W.key=X.ssl.key}let Z=L0("net");if(Z.isIP&&Z.isIP(Y)===0)W.servername=Y;try{X.stream=im6(W)}catch(K){return X.emit("error",K)}X.attachListeners(X.stream),X.stream.on("error",G),X.emit("sslconnect")})}attachListeners($){cm6($,(Y)=>{let X=Y.name==="error"?"errorMessage":Y.name;if(this._emitMessage)this.emit("message",Y);this.emit(X,Y)})}requestSsl(){this.stream.write(CY.requestSsl())}startup($){this.stream.write(CY.startup($))}cancel($,Y){this._send(CY.cancel($,Y))}password($){this._send(CY.password($))}sendSASLInitialResponseMessage($,Y){this._send(CY.sendSASLInitialResponseMessage($,Y))}sendSCRAMClientFinalMessage($){this._send(CY.sendSCRAMClientFinalMessage($))}_send($){if(!this.stream.writable)return!1;return this.stream.write($)}query($){this._send(CY.query($))}parse($){this._send(CY.parse($))}bind($){this._send(CY.bind($))}execute($){this._send(CY.execute($))}flush(){if(this.stream.writable)this.stream.write(nm6)}sync(){this._ending=!0,this._send(rm6)}ref(){this.stream.ref()}unref(){this.stream.unref()}end(){if(this._ending=!0,!this._connecting||!this.stream.writable){this.stream.end();return}return this.stream.write(am6,()=>{this.stream.end()})}close($){this._send(CY.close($))}describe($){this._send(CY.describe($))}sendCopyFromChunk($){this._send(CY.copyData($))}endCopyFrom(){this._send(CY.copyDone())}sendCopyFail($){this._send(CY.copyFail($))}}dz1.exports=pz1});var nz1=o((YO5,iz1)=>{var{Transform:sm6}=L0("stream"),{StringDecoder:om6}=L0("string_decoder"),CA=Symbol("last"),Ua=Symbol("decoder");function tm6($,Y,X){let G;if(this.overflow){if(G=this[Ua].write($).split(this.matcher),G.length===1)return X();G.shift(),this.overflow=!1}else this[CA]+=this[Ua].write($),G=this[CA].split(this.matcher);this[CA]=G.pop();for(let J=0;J<G.length;J++)try{lz1(this,this.mapper(G[J]))}catch(Q){return X(Q)}if(this.overflow=this[CA].length>this.maxLength,this.overflow&&!this.skipOverflow){X(Error("maximum buffer reached"));return}X()}function em6($){if(this[CA]+=this[Ua].end(),this[CA])try{lz1(this,this.mapper(this[CA]))}catch(Y){return $(Y)}$()}function lz1($,Y){if(Y!==void 0)$.push(Y)}function cz1($){return $}function $u6($,Y,X){switch($=$||/\r?\n/,Y=Y||cz1,X=X||{},arguments.length){case 1:if(typeof $==="function")Y=$,$=/\r?\n/;else if(typeof $==="object"&&!($ instanceof RegExp)&&!$[Symbol.split])X=$,$=/\r?\n/;break;case 2:if(typeof $==="function")X=Y,Y=$,$=/\r?\n/;else if(typeof Y==="object")X=Y,Y=cz1}X=Object.assign({},X),X.autoDestroy=!0,X.transform=tm6,X.flush=em6,X.readableObjectMode=!0;let G=new sm6(X);return G[CA]="",G[Ua]=new om6("utf8"),G.matcher=$,G.mapper=Y,G.maxLength=X.maxLength,G.skipOverflow=X.skipOverflow||!1,G.overflow=!1,G._destroy=function(J,Q){this._writableState.errorEmitted=!1,Q(J)},G}iz1.exports=$u6});var sz1=o((Au6,Yz)=>{var rz1=L0("path"),Yu6=L0("stream").Stream,Xu6=nz1(),az1=L0("util"),Gu6=5432,Ha=process.platform==="win32",Ux=process.stderr,Ju6=56,Qu6=7,Wu6=61440,Zu6=32768;function Ku6($){return($&Wu6)==Zu6}var cq=["host","port","database","user","password"],$z0=cq.length,Uu6=cq[$z0-1];function Yz0(){var $=Ux instanceof Yu6&&Ux.writable===!0;if($){var Y=Array.prototype.slice.call(arguments).concat(`
`);Ux.write(az1.format.apply(az1,Y))}}Object.defineProperty(Au6,"isWin",{get:function(){return Ha},set:function($){Ha=$}});Au6.warnTo=function($){var Y=Ux;return Ux=$,Y};Au6.getFileName=function($){var Y=$||process.env,X=Y.PGPASSFILE||(Ha?rz1.join(Y.APPDATA||"./","postgresql","pgpass.conf"):rz1.join(Y.HOME||"./",".pgpass"));return X};Au6.usePgPass=function($,Y){if(Object.prototype.hasOwnProperty.call(process.env,"PGPASSWORD"))return!1;if(Ha)return!0;if(Y=Y||"<unkn>",!Ku6($.mode))return Yz0('WARNING: password file "%s" is not a plain file',Y),!1;if($.mode&(Ju6|Qu6))return Yz0('WARNING: password file "%s" has group or world access; permissions should be u=rw (0600) or less',Y),!1;return!0};var Hu6=Au6.match=function($,Y){return cq.slice(0,-1).reduce(function(X,G,J){if(J==1){if(Number($[G]||Gu6)===Number(Y[G]))return X&&!0}return X&&(Y[G]==="*"||Y[G]===$[G])},!0)};Au6.getPassword=function($,Y,X){var G,J=Y.pipe(Xu6());function Q(K){var H=zu6(K);if(H&&Vu6(H)&&Hu6($,H))G=H[Uu6],J.end()}var W=function(){Y.destroy(),X(G)},Z=function(K){Y.destroy(),Yz0("WARNING: error on reading file: %s",K),X(void 0)};Y.on("error",Z),J.on("data",Q).on("end",W).on("error",Z)};var zu6=Au6.parseLine=function($){if($.length<11||$.match(/^\s+#/))return null;var Y="",X="",G=0,J=0,Q=0,W={},Z=!1,K=function(z,V,A){var F=$.substring(V,A);if(!Object.hasOwnProperty.call(process.env,"PGPASS_NO_DEESCAPE"))F=F.replace(/\\([:\\])/g,"$1");W[cq[z]]=F};for(var H=0;H<$.length-1;H+=1){if(Y=$.charAt(H+1),X=$.charAt(H),Z=G==$z0-1,Z){K(G,J);break}if(H>=0&&Y==":"&&X!=="\\")K(G,J,H+1),J=H+2,G+=1}return W=Object.keys(W).length===$z0?W:null,W},Vu6=Au6.isValidEntry=function($){var Y={0:function(W){return W.length>0},1:function(W){if(W==="*")return!0;return W=Number(W),isFinite(W)&&W>0&&W<9007199254740992&&Math.floor(W)===W},2:function(W){return W.length>0},3:function(W){return W.length>0},4:function(W){return W.length>0}};for(var X=0;X<cq.length;X+=1){var G=Y[X],J=$[cq[X]]||"",Q=G(J);if(!Q)return!1}return!0}});var tz1=o((WO5,Xz0)=>{var QO5=L0("path"),oz1=L0("fs"),za=sz1();Xz0.exports=function($,Y){var X=za.getFileName();oz1.stat(X,function(G,J){if(G||!za.usePgPass(J,X))return Y(void 0);var Q=oz1.createReadStream(X);za.getPassword($,Q,Y)})};Xz0.exports.warnTo=za.warnTo});var GV1=o((ZO5,XV1)=>{var Bu6=L0("events").EventEmitter,ez1=gq(),Hx=L0("util"),Gz0=mH1(),Ou6=Wa(),Eu6=lH0(),YV1=Xz1(),Mu6=Zx(),Ru6=eH0(),qu6=pH0(),$V1=Hx.deprecate(()=>{},"Client.activeQuery is deprecated and will be removed in pg@9.0"),Iu6=Hx.deprecate(()=>{},"Client.queryQueue is deprecated and will be removed in pg@9.0."),Pu6=Hx.deprecate(()=>{},"pgpass support is deprecated and will be removed in pg@9.0. You can provide an async function as the password property to the Client/Pool constructor that returns a password instead. Within this function you can call the pgpass module in your own code."),wu6=Hx.deprecate(()=>{},"Passing a custom Promise implementation to the Client/Pool constructor is deprecated and will be removed in pg@9.0."),_u6=Hx.deprecate(()=>{},"Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead.");class Jz0 extends Bu6{constructor($){super();this.connectionParameters=new Eu6($),this.user=this.connectionParameters.user,this.database=this.connectionParameters.database,this.port=this.connectionParameters.port,this.host=this.connectionParameters.host,Object.defineProperty(this,"password",{configurable:!0,enumerable:!1,writable:!0,value:this.connectionParameters.password}),this.replication=this.connectionParameters.replication;let Y=$||{};if(Y.Promise)wu6();if(this._Promise=Y.Promise||global.Promise,this._types=new Ou6(Y.types),this._ending=!1,this._ended=!1,this._connecting=!1,this._connected=!1,this._connectionError=!1,this._queryable=!0,this._activeQuery=null,this.enableChannelBinding=Boolean(Y.enableChannelBinding),this.connection=Y.connection||new Ru6({stream:Y.stream,ssl:this.connectionParameters.ssl,keepAlive:Y.keepAlive||!1,keepAliveInitialDelayMillis:Y.keepAliveInitialDelayMillis||0,encoding:this.connectionParameters.client_encoding||"utf8"}),this._queryQueue=[],this.binary=Y.binary||Mu6.binary,this.processID=null,this.secretKey=null,this.ssl=this.connectionParameters.ssl||!1,this.ssl&&this.ssl.key)Object.defineProperty(this.ssl,"key",{enumerable:!1});this._connectionTimeoutMillis=Y.connectionTimeoutMillis||0}get activeQuery(){return $V1(),this._activeQuery}set activeQuery($){$V1(),this._activeQuery=$}_getActiveQuery(){return this._activeQuery}_errorAllQueries($){let Y=(G)=>{process.nextTick(()=>{G.handleError($,this.connection)})},X=this._getActiveQuery();if(X)Y(X),this._activeQuery=null;this._queryQueue.forEach(Y),this._queryQueue.length=0}_connect($){let Y=this,X=this.connection;if(this._connectionCallback=$,this._connecting||this._connected){let G=Error("Client has already been connected. You cannot reuse a client.");process.nextTick(()=>{$(G)});return}if(this._connecting=!0,this._connectionTimeoutMillis>0){if(this.connectionTimeoutHandle=setTimeout(()=>{X._ending=!0,X.stream.destroy(Error("timeout expired"))},this._connectionTimeoutMillis),this.connectionTimeoutHandle.unref)this.connectionTimeoutHandle.unref()}if(this.host&&this.host.indexOf("/")===0)X.connect(this.host+"/.s.PGSQL."+this.port);else X.connect(this.port,this.host);X.on("connect",function(){if(Y.ssl)X.requestSsl();else X.startup(Y.getStartupConf())}),X.on("sslconnect",function(){X.startup(Y.getStartupConf())}),this._attachListeners(X),X.once("end",()=>{let G=this._ending?Error("Connection terminated"):Error("Connection terminated unexpectedly");if(clearTimeout(this.connectionTimeoutHandle),this._errorAllQueries(G),this._ended=!0,!this._ending){if(this._connecting&&!this._connectionError)if(this._connectionCallback)this._connectionCallback(G);else this._handleErrorEvent(G);else if(!this._connectionError)this._handleErrorEvent(G)}process.nextTick(()=>{this.emit("end")})})}connect($){if($){this._connect($);return}return new this._Promise((Y,X)=>{this._connect((G)=>{if(G)X(G);else Y(this)})})}_attachListeners($){$.on("authenticationCleartextPassword",this._handleAuthCleartextPassword.bind(this)),$.on("authenticationMD5Password",this._handleAuthMD5Password.bind(this)),$.on("authenticationSASL",this._handleAuthSASL.bind(this)),$.on("authenticationSASLContinue",this._handleAuthSASLContinue.bind(this)),$.on("authenticationSASLFinal",this._handleAuthSASLFinal.bind(this)),$.on("backendKeyData",this._handleBackendKeyData.bind(this)),$.on("error",this._handleErrorEvent.bind(this)),$.on("errorMessage",this._handleErrorMessage.bind(this)),$.on("readyForQuery",this._handleReadyForQuery.bind(this)),$.on("notice",this._handleNotice.bind(this)),$.on("rowDescription",this._handleRowDescription.bind(this)),$.on("dataRow",this._handleDataRow.bind(this)),$.on("portalSuspended",this._handlePortalSuspended.bind(this)),$.on("emptyQuery",this._handleEmptyQuery.bind(this)),$.on("commandComplete",this._handleCommandComplete.bind(this)),$.on("parseComplete",this._handleParseComplete.bind(this)),$.on("copyInResponse",this._handleCopyInResponse.bind(this)),$.on("copyData",this._handleCopyData.bind(this)),$.on("notification",this._handleNotification.bind(this))}_getPassword($){let Y=this.connection;if(typeof this.password==="function")this._Promise.resolve().then(()=>this.password(this.connectionParameters)).then((X)=>{if(X!==void 0){if(typeof X!=="string"){Y.emit("error",TypeError("Password must be a string"));return}this.connectionParameters.password=this.password=X}else this.connectionParameters.password=this.password=null;$()}).catch((X)=>{Y.emit("error",X)});else if(this.password!==null)$();else try{tz1()(this.connectionParameters,(G)=>{if(G!==void 0)Pu6(),this.connectionParameters.password=this.password=G;$()})}catch(X){this.emit("error",X)}}_handleAuthCleartextPassword($){this._getPassword(()=>{this.connection.password(this.password)})}_handleAuthMD5Password($){this._getPassword(async()=>{try{let Y=await qu6.postgresMd5PasswordHash(this.user,this.password,$.salt);this.connection.password(Y)}catch(Y){this.emit("error",Y)}})}_handleAuthSASL($){this._getPassword(()=>{try{this.saslSession=Gz0.startSession($.mechanisms,this.enableChannelBinding&&this.connection.stream),this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism,this.saslSession.response)}catch(Y){this.connection.emit("error",Y)}})}async _handleAuthSASLContinue($){try{await Gz0.continueSession(this.saslSession,this.password,$.data,this.enableChannelBinding&&this.connection.stream),this.connection.sendSCRAMClientFinalMessage(this.saslSession.response)}catch(Y){this.connection.emit("error",Y)}}_handleAuthSASLFinal($){try{Gz0.finalizeSession(this.saslSession,$.data),this.saslSession=null}catch(Y){this.connection.emit("error",Y)}}_handleBackendKeyData($){this.processID=$.processID,this.secretKey=$.secretKey}_handleReadyForQuery($){if(this._connecting){if(this._connecting=!1,this._connected=!0,clearTimeout(this.connectionTimeoutHandle),this._connectionCallback)this._connectionCallback(null,this),this._connectionCallback=null;this.emit("connect")}let Y=this._getActiveQuery();if(this._activeQuery=null,this.readyForQuery=!0,Y)Y.handleReadyForQuery(this.connection);this._pulseQueryQueue()}_handleErrorWhileConnecting($){if(this._connectionError)return;if(this._connectionError=!0,clearTimeout(this.connectionTimeoutHandle),this._connectionCallback)return this._connectionCallback($);this.emit("error",$)}_handleErrorEvent($){if(this._connecting)return this._handleErrorWhileConnecting($);this._queryable=!1,this._errorAllQueries($),this.emit("error",$)}_handleErrorMessage($){if(this._connecting)return this._handleErrorWhileConnecting($);let Y=this._getActiveQuery();if(!Y){this._handleErrorEvent($);return}this._activeQuery=null,Y.handleError($,this.connection)}_handleRowDescription($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected rowDescription message from backend.");this._handleErrorEvent(X);return}Y.handleRowDescription($)}_handleDataRow($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected dataRow message from backend.");this._handleErrorEvent(X);return}Y.handleDataRow($)}_handlePortalSuspended($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected portalSuspended message from backend.");this._handleErrorEvent(X);return}Y.handlePortalSuspended(this.connection)}_handleEmptyQuery($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected emptyQuery message from backend.");this._handleErrorEvent(X);return}Y.handleEmptyQuery(this.connection)}_handleCommandComplete($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected commandComplete message from backend.");this._handleErrorEvent(X);return}Y.handleCommandComplete($,this.connection)}_handleParseComplete(){let $=this._getActiveQuery();if($==null){let Y=Error("Received unexpected parseComplete message from backend.");this._handleErrorEvent(Y);return}if($.name)this.connection.parsedStatements[$.name]=$.text}_handleCopyInResponse($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected copyInResponse message from backend.");this._handleErrorEvent(X);return}Y.handleCopyInResponse(this.connection)}_handleCopyData($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected copyData message from backend.");this._handleErrorEvent(X);return}Y.handleCopyData($,this.connection)}_handleNotification($){this.emit("notification",$)}_handleNotice($){this.emit("notice",$)}getStartupConf(){let $=this.connectionParameters,Y={user:$.user,database:$.database},X=$.application_name||$.fallback_application_name;if(X)Y.application_name=X;if($.replication)Y.replication=""+$.replication;if($.statement_timeout)Y.statement_timeout=String(parseInt($.statement_timeout,10));if($.lock_timeout)Y.lock_timeout=String(parseInt($.lock_timeout,10));if($.idle_in_transaction_session_timeout)Y.idle_in_transaction_session_timeout=String(parseInt($.idle_in_transaction_session_timeout,10));if($.options)Y.options=$.options;return Y}cancel($,Y){if($.activeQuery===Y){let X=this.connection;if(this.host&&this.host.indexOf("/")===0)X.connect(this.host+"/.s.PGSQL."+this.port);else X.connect(this.port,this.host);X.on("connect",function(){X.cancel($.processID,$.secretKey)})}else if($._queryQueue.indexOf(Y)!==-1)$._queryQueue.splice($._queryQueue.indexOf(Y),1)}setTypeParser($,Y,X){return this._types.setTypeParser($,Y,X)}getTypeParser($,Y){return this._types.getTypeParser($,Y)}escapeIdentifier($){return ez1.escapeIdentifier($)}escapeLiteral($){return ez1.escapeLiteral($)}_pulseQueryQueue(){if(this.readyForQuery===!0){this._activeQuery=this._queryQueue.shift();let $=this._getActiveQuery();if($){this.readyForQuery=!1,this.hasExecuted=!0;let Y=$.submit(this.connection);if(Y)process.nextTick(()=>{$.handleError(Y,this.connection),this.readyForQuery=!0,this._pulseQueryQueue()})}else if(this.hasExecuted)this._activeQuery=null,this.emit("drain")}}query($,Y,X){let G,J,Q,W,Z;if($===null||$===void 0)throw TypeError("Client was passed a null or undefined query");else if(typeof $.submit==="function"){if(Q=$.query_timeout||this.connectionParameters.query_timeout,J=G=$,!G.callback){if(typeof Y==="function")G.callback=Y;else if(X)G.callback=X}}else if(Q=$.query_timeout||this.connectionParameters.query_timeout,G=new YV1($,Y,X),!G.callback)J=new this._Promise((K,H)=>{G.callback=(z,V)=>z?H(z):K(V)}).catch((K)=>{throw Error.captureStackTrace(K),K});if(Q)Z=G.callback||(()=>{}),W=setTimeout(()=>{let K=Error("Query read timeout");process.nextTick(()=>{G.handleError(K,this.connection)}),Z(K),G.callback=()=>{};let H=this._queryQueue.indexOf(G);if(H>-1)this._queryQueue.splice(H,1);this._pulseQueryQueue()},Q),G.callback=(K,H)=>{clearTimeout(W),Z(K,H)};if(this.binary&&!G.binary)G.binary=!0;if(G._result&&!G._result._types)G._result._types=this._types;if(!this._queryable)return process.nextTick(()=>{G.handleError(Error("Client has encountered a connection error and is not queryable"),this.connection)}),J;if(this._ending)return process.nextTick(()=>{G.handleError(Error("Client was closed and is not queryable"),this.connection)}),J;if(this._queryQueue.length>0)_u6();return this._queryQueue.push(G),this._pulseQueryQueue(),J}ref(){this.connection.ref()}unref(){this.connection.unref()}end($){if(this._ending=!0,!this.connection._connecting||this._ended)if($)$();else return this._Promise.resolve();if(this._getActiveQuery()||!this._queryable)this.connection.stream.destroy();else this.connection.end();if($)this.connection.once("end",$);else return new this._Promise((Y)=>{this.connection.once("end",Y)})}get queryQueue(){return Iu6(),this._queryQueue}}Jz0.Query=YV1;XV1.exports=Jz0});var KV1=o((KO5,ZV1)=>{var ju6=L0("events").EventEmitter,Qz0=function(){},JV1=($,Y)=>{let X=$.findIndex(Y);return X===-1?void 0:$.splice(X,1)[0]};class QV1{constructor($,Y,X){this.client=$,this.idleListener=Y,this.timeoutId=X}}class zx{constructor($){this.callback=$}}function Tu6(){throw Error("Release called on client which has already been released to the pool.")}function Va($,Y){if(Y)return{callback:Y,result:void 0};let X,G,J=function(W,Z){W?X(W):G(Z)},Q=new $(function(W,Z){G=W,X=Z}).catch((W)=>{throw Error.captureStackTrace(W),W});return{callback:J,result:Q}}function Cu6($,Y){return function X(G){G.client=Y,Y.removeListener("error",X),Y.on("error",()=>{$.log("additional client error after disconnection due to error",G)}),$._remove(Y),$.emit("error",G,Y)}}class WV1 extends ju6{constructor($,Y){super();if(this.options=Object.assign({},$),$!=null&&"password"in $)Object.defineProperty(this.options,"password",{configurable:!0,enumerable:!1,writable:!0,value:$.password});if($!=null&&$.ssl&&$.ssl.key)Object.defineProperty(this.options.ssl,"key",{enumerable:!1});if(this.options.max=this.options.max||this.options.poolSize||10,this.options.min=this.options.min||0,this.options.maxUses=this.options.maxUses||1/0,this.options.allowExitOnIdle=this.options.allowExitOnIdle||!1,this.options.maxLifetimeSeconds=this.options.maxLifetimeSeconds||0,this.log=this.options.log||function(){},this.Client=this.options.Client||Y||Wz0().Client,this.Promise=this.options.Promise||global.Promise,typeof this.options.idleTimeoutMillis>"u")this.options.idleTimeoutMillis=1e4;this._clients=[],this._idle=[],this._expired=new WeakSet,this._pendingQueue=[],this._endCallback=void 0,this.ending=!1,this.ended=!1}_promiseTry($){let Y=this.Promise;if(typeof Y.try==="function")return Y.try($);return new Y((X)=>X($()))}_isFull(){return this._clients.length>=this.options.max}_isAboveMin(){return this._clients.length>this.options.min}_pulseQueue(){if(this.log("pulse queue"),this.ended){this.log("pulse queue ended");return}if(this.ending){if(this.log("pulse queue on ending"),this._idle.length)this._idle.slice().map((Y)=>{this._remove(Y.client)});if(!this._clients.length)this.ended=!0,this._endCallback();return}if(!this._pendingQueue.length){this.log("no queued requests");return}if(!this._idle.length&&this._isFull())return;let $=this._pendingQueue.shift();if(this._idle.length){let Y=this._idle.pop();clearTimeout(Y.timeoutId);let X=Y.client;X.ref&&X.ref();let G=Y.idleListener;return this._acquireClient(X,$,G,!1)}if(!this._isFull())return this.newClient($);throw Error("unexpected condition")}_remove($,Y){let X=JV1(this._idle,(J)=>J.client===$);if(X!==void 0)clearTimeout(X.timeoutId);this._clients=this._clients.filter((J)=>J!==$);let G=this;$.end(()=>{if(G.emit("remove",$),typeof Y==="function")Y()})}connect($){if(this.ending){let G=Error("Cannot use a pool after calling end on the pool");return $?$(G):this.Promise.reject(G)}let Y=Va(this.Promise,$),X=Y.result;if(this._isFull()||this._idle.length){if(this._idle.length)process.nextTick(()=>this._pulseQueue());if(!this.options.connectionTimeoutMillis)return this._pendingQueue.push(new zx(Y.callback)),X;let G=(W,Z,K)=>{clearTimeout(Q),Y.callback(W,Z,K)},J=new zx(G),Q=setTimeout(()=>{JV1(this._pendingQueue,(W)=>W.callback===G),J.timedOut=!0,Y.callback(Error("timeout exceeded when trying to connect"))},this.options.connectionTimeoutMillis);if(Q.unref)Q.unref();return this._pendingQueue.push(J),X}return this.newClient(new zx(Y.callback)),X}newClient($){let Y=new this.Client(this.options);this._clients.push(Y);let X=Cu6(this,Y);this.log("checking client timeout");let G,J=!1;if(this.options.connectionTimeoutMillis)G=setTimeout(()=>{if(Y.connection)this.log("ending client due to timeout"),J=!0,Y.connection.stream.destroy();else if(!Y.isConnected())this.log("ending client due to timeout"),J=!0,Y.end()},this.options.connectionTimeoutMillis);this.log("connecting new client"),Y.connect((Q)=>{if(G)clearTimeout(G);if(Y.on("error",X),Q){if(this.log("client failed to connect",Q),this._clients=this._clients.filter((W)=>W!==Y),J)Q=Error("Connection terminated due to connection timeout",{cause:Q});if(this._pulseQueue(),!$.timedOut)$.callback(Q,void 0,Qz0)}else{if(this.log("new client connected"),this.options.onConnect){this._promiseTry(()=>this.options.onConnect(Y)).then(()=>{this._afterConnect(Y,$,X)},(W)=>{this._clients=this._clients.filter((Z)=>Z!==Y),Y.end(()=>{if(this._pulseQueue(),!$.timedOut)$.callback(W,void 0,Qz0)})});return}return this._afterConnect(Y,$,X)}})}_afterConnect($,Y,X){if(this.options.maxLifetimeSeconds!==0){let G=setTimeout(()=>{if(this.log("ending client due to expired lifetime"),this._expired.add($),this._idle.findIndex((Q)=>Q.client===$)!==-1)this._acquireClient($,new zx((Q,W,Z)=>Z()),X,!1)},this.options.maxLifetimeSeconds*1000);G.unref(),$.once("end",()=>clearTimeout(G))}return this._acquireClient($,Y,X,!0)}_acquireClient($,Y,X,G){if(G)this.emit("connect",$);if(this.emit("acquire",$),$.release=this._releaseOnce($,X),$.removeListener("error",X),!Y.timedOut)if(G&&this.options.verify)this.options.verify($,(J)=>{if(J)return $.release(J),Y.callback(J,void 0,Qz0);Y.callback(void 0,$,$.release)});else Y.callback(void 0,$,$.release);else if(G&&this.options.verify)this.options.verify($,$.release);else $.release()}_releaseOnce($,Y){let X=!1;return(G)=>{if(X)Tu6();X=!0,this._release($,Y,G)}}_release($,Y,X){if($.on("error",Y),$._poolUseCount=($._poolUseCount||0)+1,this.emit("release",X,$),X||this.ending||!$._queryable||$._ending||$._poolUseCount>=this.options.maxUses){if($._poolUseCount>=this.options.maxUses)this.log("remove expended client");return this._remove($,this._pulseQueue.bind(this))}if(this._expired.has($))return this.log("remove expired client"),this._expired.delete($),this._remove($,this._pulseQueue.bind(this));let J;if(this.options.idleTimeoutMillis&&this._isAboveMin()){if(J=setTimeout(()=>{if(this._isAboveMin())this.log("remove idle client"),this._remove($,this._pulseQueue.bind(this))},this.options.idleTimeoutMillis),this.options.allowExitOnIdle)J.unref()}if(this.options.allowExitOnIdle)$.unref();this._idle.push(new QV1($,Y,J)),this._pulseQueue()}query($,Y,X){if(typeof $==="function"){let J=Va(this.Promise,$);return setImmediate(function(){return J.callback(Error("Passing a function as the first parameter to pool.query is not supported"))}),J.result}if(typeof Y==="function")X=Y,Y=void 0;let G=Va(this.Promise,X);return X=G.callback,this.connect((J,Q)=>{if(J)return X(J);let W=!1,Z=(K)=>{if(W)return;W=!0,Q.release(K),X(K)};Q.once("error",Z),this.log("dispatching query");try{Q.query($,Y,(K,H)=>{if(this.log("query dispatched"),Q.removeListener("error",Z),W)return;if(W=!0,Q.release(K),K)return X(K);return X(void 0,H)})}catch(K){return Q.release(K),X(K)}}),G.result}end($){if(this.log("ending"),this.ending){let X=Error("Called end on pool more than once");return $?$(X):this.Promise.reject(X)}this.ending=!0;let Y=Va(this.Promise,$);return this._endCallback=Y.callback,this._pulseQueue(),Y.result}get waitingCount(){return this._pendingQueue.length}get idleCount(){return this._idle.length}get expiredCount(){return this._clients.reduce(($,Y)=>$+(this._expired.has(Y)?1:0),0)}get totalCount(){return this._clients.length}}ZV1.exports=WV1});var zV1=o((UO5,HV1)=>{var UV1=L0("events").EventEmitter,Su6=L0("util"),Zz0=gq(),lq=HV1.exports=function($,Y,X){UV1.call(this),$=Zz0.normalizeQueryConfig($,Y,X),this.text=$.text,this.values=$.values,this.name=$.name,this.queryMode=$.queryMode,this.callback=$.callback,this.state="new",this._arrayMode=$.rowMode==="array",this._emitRowEvents=!1,this.on("newListener",function(G){if(G==="row")this._emitRowEvents=!0}.bind(this))};Su6.inherits(lq,UV1);var ku6={sqlState:"code",statementPosition:"position",messagePrimary:"message",context:"where",schemaName:"schema",tableName:"table",columnName:"column",dataTypeName:"dataType",constraintName:"constraint",sourceFile:"file",sourceLine:"line",sourceFunction:"routine"};lq.prototype.handleError=function($){let Y=this.native.pq.resultErrorFields();if(Y)for(let X in Y){let G=ku6[X]||X;$[G]=Y[X]}if(this.callback)this.callback($);else this.emit("error",$);this.state="error"};lq.prototype.then=function($,Y){return this._getPromise().then($,Y)};lq.prototype.catch=function($){return this._getPromise().catch($)};lq.prototype._getPromise=function(){if(this._promise)return this._promise;return this._promise=new Promise(function($,Y){this._once("end",$),this._once("error",Y)}.bind(this)),this._promise};lq.prototype.submit=function($){this.state="running";let Y=this;this.native=$.native,$.native.arrayMode=this._arrayMode;let X=function(G,J,Q){if($.native.arrayMode=!1,setImmediate(function(){Y.emit("_done")}),G)return Y.handleError(G);if(Y._emitRowEvents)if(Q.length>1)J.forEach((W,Z)=>{W.forEach((K)=>{Y.emit("row",K,Q[Z])})});else J.forEach(function(W){Y.emit("row",W,Q)});if(Y.state="end",Y.emit("end",Q),Y.callback)Y.callback(null,Q)};if(process.domain)X=process.domain.bind(X);if(this.name){if(this.name.length>63)console.error("Warning! Postgres only supports 63 characters for query names."),console.error("You supplied %s (%s)",this.name,this.name.length),console.error("This can cause conflicts and silent errors executing queries");let G=(this.values||[]).map(Zz0.prepareValue);if($.namedQueries[this.name]){if(this.text&&$.namedQueries[this.name]!==this.text){let J=Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`);return X(J)}return $.native.execute(this.name,G,X)}return $.native.prepare(this.name,this.text,G.length,function(J){if(J)return X(J);return $.namedQueries[Y.name]=Y.text,Y.native.execute(Y.name,G,X)})}else if(this.values){if(!Array.isArray(this.values)){let J=Error("Query values must be an array");return X(J)}let G=this.values.map(Zz0.prepareValue);$.native.query(this.text,G,X)}else if(this.queryMode==="extended")$.native.query(this.text,[],X);else $.native.query(this.text,X)}});var Kz0=o((HO5,DV1)=>{var vu6=L0("util"),VV1;try{VV1=(()=>{throw new Error("Cannot require module "+"pg-native");})()}catch($){throw $}var xu6=Wa(),AV1=L0("events").EventEmitter,yu6=L0("util"),bu6=lH0(),FV1=zV1(),hu6=vu6.deprecate(()=>{},"Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead."),jG=DV1.exports=function($){AV1.call(this),$=$||{},this._Promise=$.Promise||global.Promise,this._types=new xu6($.types),this.native=new VV1({types:this._types}),this._queryQueue=[],this._ending=!1,this._connecting=!1,this._connected=!1,this._queryable=!0;let Y=this.connectionParameters=new bu6($);if($.nativeConnectionString)Y.nativeConnectionString=$.nativeConnectionString;this.user=Y.user,Object.defineProperty(this,"password",{configurable:!0,enumerable:!1,writable:!0,value:Y.password}),this.database=Y.database,this.host=Y.host,this.port=Y.port,this.namedQueries={}};jG.Query=FV1;yu6.inherits(jG,AV1);jG.prototype._errorAllQueries=function($){let Y=(X)=>{process.nextTick(()=>{X.native=this.native,X.handleError($)})};if(this._hasActiveQuery())Y(this._activeQuery),this._activeQuery=null;this._queryQueue.forEach(Y),this._queryQueue.length=0};jG.prototype._connect=function($){let Y=this;if(this._connecting){process.nextTick(()=>$(Error("Client has already been connected. You cannot reuse a client.")));return}this._connecting=!0,this.connectionParameters.getLibpqConnectionString(function(X,G){if(Y.connectionParameters.nativeConnectionString)G=Y.connectionParameters.nativeConnectionString;if(X)return $(X);Y.native.connect(G,function(J){if(J)return Y.native.end(),$(J);Y._connected=!0,Y.native.on("error",function(Q){Y._queryable=!1,Y._errorAllQueries(Q),Y.emit("error",Q)}),Y.native.on("notification",function(Q){Y.emit("notification",{channel:Q.relname,payload:Q.extra})}),Y.emit("connect"),Y._pulseQueryQueue(!0),$(null,this)})})};jG.prototype.connect=function($){if($){this._connect($);return}return new this._Promise((Y,X)=>{this._connect((G)=>{if(G)X(G);else Y(this)})})};jG.prototype.query=function($,Y,X){let G,J,Q,W,Z;if($===null||$===void 0)throw TypeError("Client was passed a null or undefined query");else if(typeof $.submit==="function"){if(Q=$.query_timeout||this.connectionParameters.query_timeout,J=G=$,typeof Y==="function")$.callback=Y}else if(Q=$.query_timeout||this.connectionParameters.query_timeout,G=new FV1($,Y,X),!G.callback){let K,H;J=new this._Promise((z,V)=>{K=z,H=V}).catch((z)=>{throw Error.captureStackTrace(z),z}),G.callback=(z,V)=>z?H(z):K(V)}if(Q)Z=G.callback||(()=>{}),W=setTimeout(()=>{let K=Error("Query read timeout");process.nextTick(()=>{G.handleError(K,this.connection)}),Z(K),G.callback=()=>{};let H=this._queryQueue.indexOf(G);if(H>-1)this._queryQueue.splice(H,1);this._pulseQueryQueue()},Q),G.callback=(K,H)=>{clearTimeout(W),Z(K,H)};if(!this._queryable)return G.native=this.native,process.nextTick(()=>{G.handleError(Error("Client has encountered a connection error and is not queryable"))}),J;if(this._ending)return G.native=this.native,process.nextTick(()=>{G.handleError(Error("Client was closed and is not queryable"))}),J;if(this._queryQueue.length>0)hu6();return this._queryQueue.push(G),this._pulseQueryQueue(),J};jG.prototype.end=function($){let Y=this;if(this._ending=!0,!this._connected)this.once("connect",this.end.bind(this,$));let X;if(!$)X=new this._Promise(function(G,J){$=(Q)=>Q?J(Q):G()});return this.native.end(function(){Y._connected=!1,Y._errorAllQueries(Error("Connection terminated")),process.nextTick(()=>{if(Y.emit("end"),$)$()})}),X};jG.prototype._hasActiveQuery=function(){return this._activeQuery&&this._activeQuery.state!=="error"&&this._activeQuery.state!=="end"};jG.prototype._pulseQueryQueue=function($){if(!this._connected)return;if(this._hasActiveQuery())return;let Y=this._queryQueue.shift();if(!Y){if(!$)this.emit("drain");return}this._activeQuery=Y,Y.submit(this);let X=this;Y.once("_done",function(){X._pulseQueryQueue()})};jG.prototype.cancel=function($){if(this._activeQuery===$)this.native.cancel(function(){});else if(this._queryQueue.indexOf($)!==-1)this._queryQueue.splice(this._queryQueue.indexOf($),1)};jG.prototype.ref=function(){};jG.prototype.unref=function(){};jG.prototype.setTypeParser=function($,Y,X){return this._types.setTypeParser($,Y,X)};jG.prototype.getTypeParser=function($,Y){return this._types.getTypeParser($,Y)};jG.prototype.isConnected=function(){return this._connected}});var Wz0=o((zO5,Aa)=>{var fu6=GV1(),gu6=Zx(),mu6=eH0(),uu6=iH0(),pu6=gq(),du6=KV1(),cu6=Wa(),{DatabaseError:lu6}=tH0(),{escapeIdentifier:iu6,escapeLiteral:nu6}=gq(),ru6=($)=>{return class extends du6{constructor(X){super(X,$)}}},NV1=function($){this.defaults=gu6,this.Client=$,this.Query=this.Client.Query,this.Pool=ru6(this.Client),this._pools=[],this.Connection=mu6,this.types=Wx(),this.DatabaseError=lu6,this.TypeOverrides=cu6,this.escapeIdentifier=iu6,this.escapeLiteral=nu6,this.Result=uu6,this.utils=pu6},LV1=fu6,BV1=!1;try{BV1=!!process.env.NODE_PG_FORCE_NATIVE}catch{}if(BV1)LV1=Kz0();Aa.exports=new NV1(LV1);Object.defineProperty(Aa.exports,"native",{configurable:!0,enumerable:!1,get(){let $=null;try{$=new NV1(Kz0())}catch(Y){if(Y.code!=="MODULE_NOT_FOUND")throw Y}return Object.defineProperty(Aa.exports,"native",{value:$}),$}})});var OV1={};W8(OV1,{types:()=>ou6,escapeLiteral:()=>Yp6,escapeIdentifier:()=>$p6,defaults:()=>Jp6,default:()=>pL,TypeOverrides:()=>Gp6,Result:()=>Xp6,Query:()=>tu6,Pool:()=>Uz0,DatabaseError:()=>eu6,Connection:()=>su6,Client:()=>au6});var QW,au6,Uz0,su6,ou6,tu6,eu6,$p6,Yp6,Xp6,Gp6,Jp6,pL;var Vx=V0(()=>{QW=U6(Wz0(),1),au6=QW.default.Client,Uz0=QW.default.Pool,su6=QW.default.Connection,ou6=QW.default.types,tu6=QW.default.Query,eu6=QW.default.DatabaseError,$p6=QW.default.escapeIdentifier,Yp6=QW.default.escapeLiteral,Xp6=QW.default.Result,Gp6=QW.default.TypeOverrides,Jp6=QW.default.defaults,pL=QW.default});var pV1=o((UR5,uV1)=>{uV1.exports={VERSION_MAJOR:6,VERSION_MINOR:10,VERSION_PATCH:0,VERSION_SUFFIX:""}});var SY=o((HR5,cV1)=>{var vA=pV1(),dV1=vA.VERSION_MAJOR+"."+vA.VERSION_MINOR+"."+vA.VERSION_PATCH+vA.VERSION_SUFFIX;cV1.exports={VERSION_MAJOR:vA.VERSION_MAJOR,VERSION_MINOR:vA.VERSION_MINOR,VERSION_PATCH:vA.VERSION_PATCH,VERSION_SUFFIX:vA.VERSION_SUFFIX,VERSION_STRING:dV1,DEFAULT_DRIVER_NAME:"node-oracledb : "+dV1,DEFAULT_ERROR_URL:"https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html",DEFAULT_MAX_SIZE_FOR_OUT_BINDS:200,CSFRM_IMPLICIT:1,CSFRM_NCHAR:2,CQN_OPCODE_ALL_OPS:0,CQN_OPCODE_ALL_ROWS:1,CQN_OPCODE_ALTER:16,CQN_OPCODE_DELETE:8,CQN_OPCODE_DROP:32,CQN_OPCODE_INSERT:2,CQN_OPCODE_UPDATE:4,DEFAULT:0,STMT_TYPE_UNKNOWN:0,STMT_TYPE_SELECT:1,STMT_TYPE_UPDATE:2,STMT_TYPE_DELETE:3,STMT_TYPE_INSERT:4,STMT_TYPE_CREATE:5,STMT_TYPE_DROP:6,STMT_TYPE_ALTER:7,STMT_TYPE_BEGIN:8,STMT_TYPE_DECLARE:9,STMT_TYPE_CALL:10,STMT_TYPE_EXPLAIN_PLAN:15,STMT_TYPE_MERGE:16,STMT_TYPE_ROLLBACK:17,STMT_TYPE_COMMIT:21,SHUTDOWN_MODE_DEFAULT:0,SHUTDOWN_MODE_TRANSACTIONAL:1,SHUTDOWN_MODE_TRANSACTIONAL_LOCAL:2,SHUTDOWN_MODE_IMMEDIATE:3,SHUTDOWN_MODE_ABORT:4,SHUTDOWN_MODE_FINAL:5,STARTUP_MODE_DEFAULT:0,STARTUP_MODE_FORCE:1,STARTUP_MODE_RESTRICT:2,SUBSCR_EVENT_TYPE_SHUTDOWN:2,SUBSCR_EVENT_TYPE_SHUTDOWN_ANY:3,SUBSCR_EVENT_TYPE_STARTUP:1,SUBSCR_EVENT_TYPE_DEREG:5,SUBSCR_EVENT_TYPE_OBJ_CHANGE:6,SUBSCR_EVENT_TYPE_QUERY_CHANGE:7,SUBSCR_EVENT_TYPE_AQ:100,SUBSCR_GROUPING_CLASS_TIME:1,SUBSCR_GROUPING_TYPE_SUMMARY:1,SUBSCR_GROUPING_TYPE_LAST:2,SUBSCR_NAMESPACE_AQ:1,SUBSCR_NAMESPACE_DBCHANGE:2,SUBSCR_QOS_BEST_EFFORT:16,SUBSCR_QOS_DEREG_NFY:2,SUBSCR_QOS_QUERY:8,SUBSCR_QOS_RELIABLE:1,SUBSCR_QOS_ROWIDS:4,SYSASM:32768,SYSBACKUP:131072,SYSDBA:2,SYSDG:262144,SYSKM:524288,SYSOPER:4,SYSPRELIM:8,SYSRAC:1048576,BIND_IN:3001,BIND_INOUT:3002,BIND_OUT:3003,OUT_FORMAT_ARRAY:4001,OUT_FORMAT_OBJECT:4002,SODA_COLL_MAP_MODE:5001,POOL_STATUS_OPEN:6000,POOL_STATUS_DRAINING:6001,POOL_STATUS_CLOSED:6002,POOL_STATUS_RECONFIGURING:6003,PURITY_DEFAULT:0,PURITY_NEW:1,PURITY_SELF:2,AQ_DEQ_NO_WAIT:0,AQ_DEQ_WAIT_FOREVER:4294967295,AQ_DEQ_MODE_BROWSE:1,AQ_DEQ_MODE_LOCKED:2,AQ_DEQ_MODE_REMOVE:3,AQ_DEQ_MODE_REMOVE_NO_DATA:4,AQ_DEQ_NAV_FIRST_MSG:1,AQ_DEQ_NAV_NEXT_TRANSACTION:2,AQ_DEQ_NAV_NEXT_MSG:3,AQ_MSG_DELIV_MODE_PERSISTENT:1,AQ_MSG_DELIV_MODE_BUFFERED:2,AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED:3,AQ_MSG_STATE_READY:0,AQ_MSG_STATE_WAITING:1,AQ_MSG_STATE_PROCESSED:2,AQ_MSG_STATE_EXPIRED:3,AQ_VISIBILITY_IMMEDIATE:1,AQ_VISIBILITY_ON_COMMIT:2,TPC_BEGIN_JOIN:2,TPC_BEGIN_NEW:1,TPC_BEGIN_PROMOTE:8,TPC_BEGIN_RESUME:4,TPC_END_NORMAL:0,TPC_END_SUSPEND:1048576,VECTOR_FORMAT_FLOAT32:2,VECTOR_FORMAT_FLOAT64:3,VECTOR_FORMAT_INT8:4,VECTOR_FORMAT_BINARY:5}});var kY=o((zR5,sV1)=>{var Gz=SY(),K9=E4(),Lp6=L0("util"),lV1=new Map,iV1=new Map,lL=new Map,Bp6=Math.pow(2,32)-1;class s8{constructor($,Y,X,G){this.num=$,this.name=Y,this.columnTypeName=X,this._bufferSizeFactor=G.bufferSizeFactor||0,this._oraTypeNum=G.oraTypeNum||0,this._csfrm=G.csfrm||0,lV1.set($,this);let J=this._csfrm*256+this._oraTypeNum;iV1.set(J,this),lL.set(X,this)}[Symbol.toPrimitive]($){switch($){case"number":return this.num;default:return this.toString()}}[Lp6.inspect.custom](){return this.toString()}toString(){return`[DbType ${this.name}]`}}function Op6($){let Y=lL.get($);if(!Y)K9.throwErr(K9.ERR_UNKNOWN_COLUMN_TYPE_NAME,$);return Y}function Ep6($){let Y=lV1.get($);if(!Y)K9.throwErr(K9.ERR_INVALID_TYPE_NUM,$);return Y}function Mp6($,Y){let X=(Y||0)*256+$,G=iV1.get(X);if(!G)K9.throwErr(K9.ERR_INVALID_ORACLE_TYPE_NUM,$,Y);return G}var Iz0=new s8(2020,"DB_TYPE_BFILE","BFILE",{oraTypeNum:114,bufferSizeFactor:4000}),qa=new s8(2008,"DB_TYPE_BINARY_DOUBLE","BINARY_DOUBLE",{oraTypeNum:101,bufferSizeFactor:8}),Ia=new s8(2007,"DB_TYPE_BINARY_FLOAT","BINARY_FLOAT",{oraTypeNum:100,bufferSizeFactor:4}),Bx=new s8(2009,"DB_TYPE_BINARY_INTEGER","BINARY_INTEGER",{oraTypeNum:3,bufferSizeFactor:22}),Pa=new s8(2019,"DB_TYPE_BLOB","BLOB",{oraTypeNum:113,bufferSizeFactor:112}),wa=new s8(2022,"DB_TYPE_BOOLEAN","BOOLEAN",{oraTypeNum:252,bufferSizeFactor:4}),rq=new s8(2003,"DB_TYPE_CHAR","CHAR",{oraTypeNum:96,csfrm:Gz.CSFRM_IMPLICIT,bufferSizeFactor:4}),aq=new s8(2017,"DB_TYPE_CLOB","CLOB",{oraTypeNum:112,csfrm:Gz.CSFRM_IMPLICIT,bufferSizeFactor:112}),Pz0=new s8(2021,"DB_TYPE_CURSOR","CURSOR",{oraTypeNum:102,bufferSizeFactor:4}),_a=new s8(2011,"DB_TYPE_DATE","DATE",{oraTypeNum:12,bufferSizeFactor:7}),wz0=new s8(2015,"DB_TYPE_INTERVAL_DS","INTERVAL DAY TO SECOND",{oraTypeNum:183,bufferSizeFactor:11}),_z0=new s8(2016,"DB_TYPE_INTERVAL_YM","INTERVAL YEAR TO MONTH",{oraTypeNum:182,bufferSizeFactor:5}),ja=new s8(2027,"DB_TYPE_JSON","JSON",{oraTypeNum:119}),PZ=new s8(2024,"DB_TYPE_LONG","LONG",{oraTypeNum:8,csfrm:Gz.CSFRM_IMPLICIT,bufferSizeFactor:2147483647}),xA=new s8(2031,"DB_TYPE_LONG_NVARCHAR","LONG",{oraTypeNum:8,csfrm:Gz.CSFRM_NCHAR,bufferSizeFactor:2147483647}),yA=new s8(2025,"DB_TYPE_LONG_RAW","LONG RAW",{oraTypeNum:24,bufferSizeFactor:2147483647}),bA=new s8(2004,"DB_TYPE_NCHAR","NCHAR",{oraTypeNum:96,csfrm:Gz.CSFRM_NCHAR,bufferSizeFactor:4}),Ta=new s8(2018,"DB_TYPE_NCLOB","NCLOB",{oraTypeNum:112,csfrm:Gz.CSFRM_NCHAR,bufferSizeFactor:112}),Ca=new s8(2010,"DB_TYPE_NUMBER","NUMBER",{oraTypeNum:2,bufferSizeFactor:22}),Xz=new s8(2002,"DB_TYPE_NVARCHAR","NVARCHAR2",{oraTypeNum:1,csfrm:Gz.CSFRM_NCHAR,bufferSizeFactor:4}),jz0=new s8(2023,"DB_TYPE_OBJECT","OBJECT",{oraTypeNum:109}),sq=new s8(2006,"DB_TYPE_RAW","RAW",{oraTypeNum:23,bufferSizeFactor:1}),oq=new s8(2005,"DB_TYPE_ROWID","ROWID",{oraTypeNum:11,bufferSizeFactor:18}),Sa=new s8(2012,"DB_TYPE_TIMESTAMP","TIMESTAMP",{oraTypeNum:180,bufferSizeFactor:11}),e3=new s8(2014,"DB_TYPE_TIMESTAMP_LTZ","TIMESTAMP WITH LOCAL TIME ZONE",{oraTypeNum:231,bufferSizeFactor:11}),hA=new s8(2013,"DB_TYPE_TIMESTAMP_TZ","TIMESTAMP WITH TIME ZONE",{oraTypeNum:181,bufferSizeFactor:13}),ka=new s8(2030,"DB_TYPE_UROWID","UROWID",{oraTypeNum:208}),Z9=new s8(2001,"DB_TYPE_VARCHAR","VARCHAR2",{oraTypeNum:1,csfrm:Gz.CSFRM_IMPLICIT,bufferSizeFactor:4}),Tz0=new s8(2032,"DB_TYPE_XMLTYPE","XMLTYPE",{oraTypeNum:109,csfrm:Gz.CSFRM_IMPLICIT,bufferSizeFactor:2147483647}),va=new s8(2033,"DB_TYPE_VECTOR","VECTOR",{oraTypeNum:127}),Rp6=new Map([[qa,new Map([[Z9,Z9]])],[Ia,new Map([[Z9,Z9]])],[Pa,new Map([[sq,yA],[yA,yA]])],[rq,new Map([[Z9,Z9]])],[aq,new Map([[Z9,PZ],[PZ,PZ]])],[_a,new Map([[Z9,Z9],[e3,e3]])],[ja,new Map([[Z9,Z9]])],[PZ,new Map([[Z9,PZ]])],[yA,new Map([[sq,yA]])],[bA,new Map([[rq,bA],[Z9,Xz],[Xz,Xz]])],[Ta,new Map([[Z9,xA],[Xz,xA],[PZ,xA],[xA,xA]])],[Ca,new Map([[Z9,Z9]])],[Xz,new Map([[rq,bA],[bA,bA],[Z9,Xz]])],[sq,new Map([[Z9,Z9]])],[oq,new Map([[Z9,oq]])],[Sa,new Map([[Z9,Z9],[e3,e3]])],[e3,new Map([[Z9,Z9],[hA,hA]])],[hA,new Map([[Z9,Z9],[e3,e3]])],[ka,new Map([[Z9,oq]])],[va,new Map([[Z9,PZ],[PZ,PZ],[aq,aq]])]]),qp6=new Map([[Iz0,Iz0],[qa,qa],[Ia,Ia],[Bx,Bx],[Pa,Pa],[wa,wa],[rq,rq],[aq,aq],[Pz0,Pz0],[_a,_a],[wz0,wz0],[_z0,_z0],[ja,ja],[PZ,PZ],[xA,xA],[yA,yA],[bA,bA],[Ta,Ta],[Ca,Ca],[Xz,Xz],[jz0,jz0],[sq,sq],[oq,oq],[Sa,Sa],[e3,hA],[hA,hA],[ka,ka],[Z9,Z9],[Tz0,Tz0],[va,va]]);lL.set("PL/SQL BOOLEAN",wa);lL.set("PL/SQL BINARY INTEGER",Bx);lL.set("PL/SQL PLS INTEGER",Bx);lL.set("TIMESTAMP WITH LOCAL TZ",e3);lL.set("TIMESTAMP WITH TZ",hA);class nV1 extends Uint8Array{toJSON(){return Buffer.from(this.buffer).toString("hex")}}class xa{constructor($){if(this._indices=new Uint32Array(0),this._values=new Float64Array(0),this._numDimensions=0,!$)return;if(typeof $==="object"&&"numDimensions"in $&&"indices"in $&&"values"in $)this._fromObject($);else if(typeof $==="string")this._fromString($);else if(this._validDenseArray($))this._fromDense($);else K9.throwErr(K9.ERR_VECTOR_SPARSE_INVALID_INPUT)}_validDenseArray($){return $ instanceof Float32Array||$ instanceof Float64Array||$ instanceof Int8Array||Object.getPrototypeOf($)===Uint8Array.prototype||Array.isArray($)}static _validateLengths($,Y){if($.length!==Y.length){if(!(Y instanceof Uint8Array))K9.throwErr(K9.ERR_VECTOR_SPARSE_INDICES_VALUES_NOT_EQUAL)}}_updateProperties($,Y,X){if(!this._validDenseArray(X))K9.throwErr(K9.ERR_VECTOR_SPARSE_VALUES_IS_NOT_ARRAY);if(!(Y instanceof Uint32Array)&&!Array.isArray(Y))K9.throwErr(K9.ERR_VECTOR_SPARSE_INDICES_IS_NOT_ARRAY);if(xa._validateLengths(Y,X),!(typeof $==="number"&&Number.isInteger($)&&$>0))K9.throwErr(K9.ERR_VECTOR_SPARSE_DIMS_IS_NOT_INTEGER);this._numDimensions=$,this._indices=Y,this._values=X,this._convertToTypedArrays()}_fromObject($){this._updateProperties($.numDimensions,$.indices,$.values)}_convertToTypedArrays(){if(!(this._indices instanceof Uint32Array)){let $=new Uint32Array(this._indices.map((Y,X)=>{if(typeof Y!=="number"||!Number.isInteger(Y))K9.throwErr(K9.ERR_VECTOR_SPARSE_INDICES_ELEM_IS_NOT_VALID,X);if(Y<0||Y>Bp6||Y>this.numDimensions-1)K9.throwErr(K9.ERR_VECTOR_SPARSE_INDICES_ELEM_IS_NOT_VALID,X);return Y}));this._indices=$}this._values=Array.isArray(this._values)?new Float64Array(this._values):this._values}_fromDense($){this._indices=[],this._values=[];for(let Y=0;Y<$.length;Y++)if($[Y]!==0)this._indices.push(Y),this._values.push($[Y]);this._numDimensions=$.length,this._convertToTypedArrays()}_fromString($){let Y;try{Y=JSON.parse($)}catch(Q){K9.throwErr(K9.ERR_VECTOR_SPARSE_INVALID_JSON)}if(!Array.isArray(Y)||Y.length!==3)K9.throwErr(K9.ERR_VECTOR_SPARSE_INVALID_STRING);let[X,G,J]=Y;this._updateProperties(X,G,J)}static create($){xa._validateLengths($.indices,$.values);let Y=Object.create(this.prototype);return Y._numDimensions=$.numDimensions,Y._indices=$.indices,Y._values=$.values,Y}get indices(){return this._indices}get values(){return this._values}get numDimensions(){return this._numDimensions}toJSON(){return{numDimensions:this._numDimensions,indices:this._indices,values:this._values}}_createEmptyArray($,Y){if(Array.isArray($))return new Float64Array(Y);else return new $.constructor(Y)}dense(){if(this._numDimensions===0)return null;let $=this._createEmptyArray(this._values,this._numDimensions);return this._indices.forEach((Y,X)=>{$[Y]=this._values[X]}),$}}class rV1{constructor($){if($)K9.assertParamPropInt($,1,"years"),K9.assertParamPropInt($,1,"months");this.months=$?.months||0,this.years=$?.years||0}}class aV1{constructor($){if($)K9.assertParamPropInt($,1,"days"),K9.assertParamPropInt($,1,"hours"),K9.assertParamPropInt($,1,"minutes"),K9.assertParamPropInt($,1,"seconds"),K9.assertParamPropInt($,1,"fseconds");this.fseconds=$?.fseconds||0,this.seconds=$?.seconds||0,this.minutes=$?.minutes||0,this.hours=$?.hours||0,this.days=$?.days||0}}sV1.exports={DbType:s8,DB_TYPE_BFILE:Iz0,DB_TYPE_BINARY_DOUBLE:qa,DB_TYPE_BINARY_FLOAT:Ia,DB_TYPE_BINARY_INTEGER:Bx,DB_TYPE_BLOB:Pa,DB_TYPE_BOOLEAN:wa,DB_TYPE_CHAR:rq,DB_TYPE_CLOB:aq,DB_TYPE_CURSOR:Pz0,DB_TYPE_DATE:_a,DB_TYPE_INTERVAL_DS:wz0,DB_TYPE_INTERVAL_YM:_z0,DB_TYPE_JSON:ja,DB_TYPE_LONG:PZ,DB_TYPE_LONG_NVARCHAR:xA,DB_TYPE_LONG_RAW:yA,DB_TYPE_NCHAR:bA,DB_TYPE_NCLOB:Ta,DB_TYPE_NUMBER:Ca,DB_TYPE_NVARCHAR:Xz,DB_TYPE_OBJECT:jz0,DB_TYPE_RAW:sq,DB_TYPE_ROWID:oq,DB_TYPE_TIMESTAMP:Sa,DB_TYPE_TIMESTAMP_LTZ:e3,DB_TYPE_TIMESTAMP_TZ:hA,DB_TYPE_UROWID:ka,DB_TYPE_VARCHAR:Z9,DB_TYPE_VECTOR:va,DB_TYPE_CONVERSION_MAP:Rp6,DB_TYPE_FETCH_TYPE_MAP:qp6,DB_TYPE_XMLTYPE:Tz0,getTypeByColumnTypeName:Op6,getTypeByNum:Ep6,getTypeByOraTypeNum:Mp6,JsonId:nV1,SparseVector:xa,IntervalYM:rV1,IntervalDS:aV1}});var Ex=o((VR5,oV1)=>{var Ox=SY();oV1.exports={TNS_VECTOR_MAGIC_BYTE:219,TNS_VECTOR_VERSION_BASE:0,TNS_VECTOR_VERSION_WITH_BINARY:1,TNS_VECTOR_VERSION_WITH_SPARSE:2,TNS_VECTOR_FLAG_NORMSRC:16,TNS_VECTOR_FLAG_NORM:2,TNS_VECTOR_FLAG_SPARSE:32,TNS_JSON_MAGIC_BYTE_1:255,TNS_JSON_MAGIC_BYTE_2:74,TNS_JSON_MAGIC_BYTE_3:90,TNS_JSON_VERSION_MAX_FNAME_255:1,TNS_JSON_VERSION_MAX_FNAME_65535:3,TNS_JSON_FLAG_HASH_ID_UINT8:256,TNS_JSON_FLAG_HASH_ID_UINT16:512,TNS_JSON_FLAG_NUM_FNAMES_UINT16:1024,TNS_JSON_FLAG_FNAMES_SEG_UINT32:2048,TNS_JSON_FLAG_TINY_NODES_STAT:8192,TNS_JSON_FLAG_TREE_SEG_UINT32:4096,TNS_JSON_FLAG_REL_OFFSET_MODE:1,TNS_JSON_FLAG_INLINE_LEAF:2,TNS_JSON_FLAG_LEN_IN_PCODE:4,TNS_JSON_FLAG_NUM_FNAMES_UINT32:8,TNS_JSON_FLAG_IS_SCALAR:16,TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16:256,TNS_JSON_TYPE_NULL:48,TNS_JSON_TYPE_TRUE:49,TNS_JSON_TYPE_FALSE:50,TNS_JSON_TYPE_STRING_LENGTH_UINT8:51,TNS_JSON_TYPE_NUMBER_LENGTH_UINT8:52,TNS_JSON_TYPE_BINARY_DOUBLE:54,TNS_JSON_TYPE_STRING_LENGTH_UINT16:55,TNS_JSON_TYPE_STRING_LENGTH_UINT32:56,TNS_JSON_TYPE_TIMESTAMP:57,TNS_JSON_TYPE_BINARY_LENGTH_UINT16:58,TNS_JSON_TYPE_BINARY_LENGTH_UINT32:59,TNS_JSON_TYPE_DATE:60,TNS_JSON_TYPE_INTERVAL_YM:61,TNS_JSON_TYPE_INTERVAL_DS:62,TNS_JSON_TYPE_TIMESTAMP_TZ:124,TNS_JSON_TYPE_TIMESTAMP7:125,TNS_JSON_TYPE_BINARY_FLOAT:127,TNS_JSON_TYPE_OBJECT:132,TNS_JSON_TYPE_ARRAY:192,TNS_JSON_TYPE_EXTENDED:123,TNS_JSON_TYPE_VECTOR:1,TNS_JSON_TYPE_ID:126,TZ_HOUR_OFFSET:20,TZ_MINUTE_OFFSET:60,TNS_MAX_SHORT_LENGTH:252,TNS_DURATION_MID:2147483648,TNS_DURATION_OFFSET:60,TNS_CHUNK_SIZE:32767,TNS_HAS_REGION_ID:128,NUMBER_MAX_DIGITS:40,BUFFER_CHUNK_SIZE:65536,CSFRM_IMPLICIT:Ox.CSFRM_IMPLICIT,VECTOR_FORMAT_FLOAT32:Ox.VECTOR_FORMAT_FLOAT32,VECTOR_FORMAT_FLOAT64:Ox.VECTOR_FORMAT_FLOAT64,VECTOR_FORMAT_INT8:Ox.VECTOR_FORMAT_INT8,VECTOR_FORMAT_BINARY:Ox.VECTOR_FORMAT_BINARY,TNS_NULL_LENGTH_INDICATOR:255,TNS_LONG_LENGTH_INDICATOR:254}});var tq=o((AR5,eV1)=>{var{Buffer:$U}=L0("buffer"),b5=Ex(),nJ=E4(),ya=kY(),Ip6=GY();class Cz0{constructor($){if(typeof $==="number")this.buf=$U.alloc($),this.size=0,this.maxSize=$;else if($)this.buf=$,this.size=this.maxSize=$.length;this.pos=0}_grow($){nJ.throwErr(nJ.ERR_BUFFER_LENGTH_INSUFFICIENT,this.numBytesLeft(),$)}_readBytesWithLength($){return this.readBytes($)}_readInteger($,Y,X){let G=!1,J=this.readUInt8();if(J===0)return 0;else if(J&128){if(!Y)nJ.throwErr(nJ.ERR_UNEXPECTED_NEGATIVE_INTEGER,this.pos,this.packetNum);G=!0,J=J&127}if(J>$)nJ.throwErr(nJ.ERR_INTEGER_TOO_LARGE,J,$,this.pos,this.packetNum);if(X)this.skipBytes(J);else{let W=this.readBytes(J).readUIntBE(0,J);return G?-W:W}}numBytesLeft(){return this.size-this.pos}parseBinaryDouble($){if($=$U.from($),$[0]&128)$[0]&=127;else $[0]^=255,$[1]^=255,$[2]^=255,$[3]^=255,$[4]^=255,$[5]^=255,$[6]^=255,$[7]^=255;return $.readDoubleBE()}parseBinaryFloat($){if($=$U.from($),$[0]&128)$[0]&=127;else $[0]^=255,$[1]^=255,$[2]^=255,$[3]^=255;return $.readFloatBE()}parseOracleDate($,Y=!0){let X=0;if($.length>=11)X=Math.floor($.readUInt32BE(7)/1e6);let G=($[0]-100)*100+$[1]-100;return Ip6.makeDate(Y,G,$[2],$[3],$[4]-1,$[5]-1,$[6]-1,X,0)}parseOracleIntervalYM($){let Y=$.readUInt32BE()-b5.TNS_DURATION_MID,X=$[4]-b5.TNS_DURATION_OFFSET;return new ya.IntervalYM({years:Y,months:X})}parseOracleIntervalDS($){let Y=$.readUInt32BE()-b5.TNS_DURATION_MID,X=$.readUInt32BE(7)-b5.TNS_DURATION_MID,G=$[4]-b5.TNS_DURATION_OFFSET,J=$[5]-b5.TNS_DURATION_OFFSET,Q=$[6]-b5.TNS_DURATION_OFFSET;return new ya.IntervalDS({days:Y,hours:G,minutes:J,seconds:Q,fseconds:X})}parseOracleNumber($){let Y=$[0],X=Boolean(Y&128);if(!X)Y=Y^255;Y-=193;let G=Y*2+2;if($.length===1){if(X)return"0";return"-1e126"}let J=$.length;if(!X&&$[$.length-1]===102)J-=1;let Q,W=[];for(let K=1;K<J;K++){if(X)Q=$[K]-1;else Q=101-$[K];let H=Math.floor(Q/10);if(H===0&&K===1)G-=1;else if(H===10)W.push("1"),W.push("0"),G+=1;else if(H!==0||K>1)W.push(H.toString());if(H=Q%10,H!==0||K<J-1)W.push(H.toString())}let Z=[];if(!X)Z.push("-");if(G<=0){if(Z.push("."),G<0)Z.push("0".repeat(-G))}for(let K=0;K<W.length;K++){if(K>0&&K===G)Z.push(".");Z.push(W[K])}if(G>W.length)for(let K=W.length;K<G;K++)Z.push("0");return Z.join("")}readBinaryDouble(){let $=this.readBytesWithLength();if(!$)return null;return this.parseBinaryDouble($)}readBinaryFloat(){let $=this.readBytesWithLength();if(!$)return null;return this.parseBinaryFloat($)}readBinaryInteger(){let $=this.readBytesWithLength();if(!$)return 0;if($.length>4)nJ.throwErr(nJ.ERR_INTEGER_TOO_LARGE,$.length,4,this.pos,this.packetNum);return $.readIntBE(0,$.length)}readBool(){let $=this.readBytesWithLength();if(!$)return null;return $[$.length-1]===1}readBytes($){let Y=this.numBytesLeft();if($>Y)nJ.throwErr(nJ.ERR_UNEXPECTED_END_OF_DATA,$,Y);let X=this.buf.subarray(this.pos,this.pos+$);return this.pos+=$,X}readBytesAndLength(){if(this.readUB4()>0)return this.readBytesWithLength()}readBytesWithLength(){let $=this.readUInt8();if($===0||$===b5.TNS_NULL_LENGTH_INDICATOR)return null;return this._readBytesWithLength($)}readDbObject(){let $={},Y=this.readUB4();if(Y>0)$.toid=$U.from(this.readBytesWithLength());if(Y=this.readUB4(),Y>0)$.oid=$U.from(this.readBytesWithLength());if(Y=this.readUB4(),Y>0)$.snapshot=$U.from(this.readBytesWithLength());if(this.skipUB2(),Y=this.readUB4(),this.skipUB2(),Y>0)$.packedData=$U.from(this.readBytesWithLength());return $}readInt8(){return this.readBytes(1).readInt8()}readOracleDate($){let Y=this.readBytesWithLength();if(!Y)return null;return this.parseOracleDate(Y,$)}readOracleIntervalYM(){let $=this.readBytesWithLength();if(!$)return null;return this.parseOracleIntervalYM($)}readOracleIntervalDS(){let $=this.readBytesWithLength();if(!$)return null;return this.parseOracleIntervalDS($)}readOracleNumber(){let $=this.readBytesWithLength();if(!$)return null;return this.parseOracleNumber($)}readSB2(){return this._readInteger(2,!0,!1)}readSB4(){return this._readInteger(4,!0,!1)}readSB8(){return this._readInteger(8,!0,!1)}readStr($){let Y=this.readBytesWithLength();if(!Y)return null;if($===b5.CSFRM_IMPLICIT)return Y.toString();return $U.from(Y).swap16().toString("utf16le")}readStrAndLength(){let $=this.readBytesAndLength();return $?$.toString():null}readUB2(){return this._readInteger(2,!1,!1)}readUB4(){return this._readInteger(4,!1,!1)}readUB8(){return this._readInteger(8,!1,!1)}readUInt8(){return this.readBytes(1)[0]}readUInt16BE(){return this.readBytes(2).readUInt16BE()}readUInt16LE(){return this.readBytes(2).readUInt16LE()}readUInt32BE(){return this.readBytes(4).readUInt32BE()}reserveBytes($){if($>this.numBytesLeft())this._grow(this.pos+$);let Y=this.pos;return this.pos+=$,Y}skipBytes($){if($>this.numBytesLeft())nJ.throwErr(nJ.ERR_UNEXPECTED_END_OF_DATA);this.pos+=$}skipSB4(){return this._readInteger(4,!0,!0)}skipUB1(){this.skipBytes(1)}skipUB2(){return this._readInteger(2,!1,!0)}skipUB4(){return this._readInteger(4,!1,!0)}skipUB8(){return this._readInteger(8,!1,!0)}writeBinaryDouble($,Y){if(!Y)Y=this.reserveBytes(8);if(this.buf.writeDoubleBE($,Y),(this.buf[Y]&128)===0)this.buf[Y]|=128;else this.buf[Y]^=255,this.buf[Y+1]^=255,this.buf[Y+2]^=255,this.buf[Y+3]^=255,this.buf[Y+4]^=255,this.buf[Y+5]^=255,this.buf[Y+6]^=255,this.buf[Y+7]^=255}writeBinaryFloat($,Y){if(!Y)Y=this.reserveBytes(4);if(this.buf.writeFloatBE($,Y),(this.buf[Y]&128)===0)this.buf[Y]|=128;else this.buf[Y]^=255,this.buf[Y+1]^=255,this.buf[Y+2]^=255,this.buf[Y+3]^=255}writeBytes($){let Y=0,X=$.length;while(X>0){let G=this.numBytesLeft();if(G===0)this._grow(this.pos+X);let J=Math.min(G,X);$.copy(this.buf,this.pos,Y,Y+J),this.pos+=J,Y+=J,X-=J}}_writeRawBytesAndLength($,Y){if(Y<=b5.TNS_MAX_SHORT_LENGTH){if(this.writeUInt8(Y),Y>0)this.writeBytes($)}else{let X=0;this.writeUInt8(b5.TNS_LONG_LENGTH_INDICATOR);while(Y>0){let G=Math.min(Y,b5.BUFFER_CHUNK_SIZE);this.writeUB4(G),this.writeBytes($.subarray(X,X+G)),Y-=G,X+=G}this.writeUB4(0)}}writeBytesWithLength($){let Y=$.length;this._writeRawBytesAndLength($,Y)}writeDbObject($){if(this.writeUB4($.toid.length),this.writeBytesWithLength($.toid),$.oid)this.writeUB4($.oid.length),this.writeBytesWithLength($.oid);else this.writeUB4(0);this.writeUB4(0),this.writeUB4(0);let Y=$._getPackedData();this.writeUB4(Y.length),this.writeUB4($.flags),this.writeBytesWithLength(Y)}writeOracleDate($,Y,X=!0){let G,J=Y._bufferSizeFactor;if(J>7){if(G=$.getUTCMilliseconds()*1000*1000,G===0&&J<=11)J=7}if(X)this.writeUInt8(J);let Q=this.reserveBytes(J);if(Y===ya.DB_TYPE_DATE||Y==ya.DB_TYPE_TIMESTAMP){let W=$.getFullYear();this.buf[Q]=Math.trunc(W/100)+100,this.buf[Q+1]=W%100+100,this.buf[Q+2]=$.getMonth()+1,this.buf[Q+3]=$.getDate(),this.buf[Q+4]=$.getHours()+1,this.buf[Q+5]=$.getMinutes()+1,this.buf[Q+6]=$.getSeconds()+1}else{let W=$.getUTCFullYear();this.buf[Q]=Math.trunc(W/100)+100,this.buf[Q+1]=W%100+100,this.buf[Q+2]=$.getUTCMonth()+1,this.buf[Q+3]=$.getUTCDate(),this.buf[Q+4]=$.getUTCHours()+1,this.buf[Q+5]=$.getUTCMinutes()+1,this.buf[Q+6]=$.getUTCSeconds()+1}if(J>7){if(this.buf.writeInt32BE(G,Q+7),J>11)this.buf[Q+11]=b5.TZ_HOUR_OFFSET,this.buf[Q+12]=b5.TZ_MINUTE_OFFSET}}writeOracleIntervalYM($,Y=!0){if(Y)this.writeUInt8(5);this.writeUInt32BE($.years+b5.TNS_DURATION_MID),this.writeUInt8($.months+b5.TNS_DURATION_OFFSET)}writeOracleIntervalDS($,Y=!0){if(Y)this.writeUInt8(11);this.writeUInt32BE($.days+b5.TNS_DURATION_MID),this.writeUInt8($.hours+b5.TNS_DURATION_OFFSET),this.writeUInt8($.minutes+b5.TNS_DURATION_OFFSET),this.writeUInt8($.seconds+b5.TNS_DURATION_OFFSET),this.writeUInt32BE($.fseconds+b5.TNS_DURATION_MID)}writeOracleNumber($){let Y=!1;if($[0]==="-")Y=!0,$=$.substring(1);let X=0,G=$.indexOf("e");if(G>0)X=Number($.substring(G+1)),$=$.substring(0,G);let J=$.indexOf(".");if(J>0)X-=$.length-J-1,$=$.substring(0,J)+$.substring(J+1);if($[0]==="0")$=$.replace(/^0+/,"");if($.length>0&&$[$.length-1]==="0"){let H=$.replace(/0+$/,"");X+=$.length-H.length,$=H}if($.length>b5.NUMBER_MAX_DIGITS||X>=126||X<=-131)nJ.throwErr(nJ.ERR_ORACLE_NUMBER_NO_REPR);if(X>0&&X%2===1||X<0&&X%2===-1)X--,$+="0";if($.length%2===1)$="0"+$;let Q=Y&&$.length<b5.NUMBER_MAX_DIGITS,W=$.length/2,Z=(X+$.length)/2+192;if(Y)Z=Z^255;else if($.length===0&&X===0)Z=128;let K=this.reserveBytes(W+2+Q);this.buf[K++]=W+1+Q,this.buf[K++]=Z;for(let H=0;H<$.length;H+=2){let z=Number($.substring(H,H+2));if(Y)this.buf[K++]=101-z;else this.buf[K++]=z+1}if(Q)this.buf[K]=102}writeStr($){this.writeBytes($U.from($))}writeInt32BE($){let Y=this.reserveBytes(4);this.buf.writeInt32BE($,Y)}writeSB4($){let Y=0;if($<0)$=-$,Y=128;if($===0)this.writeUInt8(0);else if($<=255)this.writeUInt8(1|Y),this.writeUInt8($);else if($<=65535)this.writeUInt8(2|Y),this.writeUInt16BE($);else this.writeUInt8(4|Y),this.writeUInt32BE($)}writeUB4($){if($===0)this.writeUInt8(0);else if($<=255)this.writeUInt8(1),this.writeUInt8($);else if($<=65535)this.writeUInt8(2),this.writeUInt16BE($);else this.writeUInt8(4),this.writeUInt32BE($)}writeUB2($){if($===0)this.writeUInt8(0);else if($<=255)this.writeUInt8(1),this.writeUInt8($);else this.writeUInt8(2),this.writeUInt16BE($)}writeUB8($){if($===0)this.writeUInt8(0);else if($<=255)this.writeUInt8(1),this.writeUInt8($);else if($<=65535)this.writeUInt8(2),this.writeUInt16BE($);else if($<=4294967295)this.writeUInt8(4),this.writeUInt32BE($);else this.writeUInt8(8),this.writeUInt64BE($)}writeUInt8($){let Y=this.reserveBytes(1);this.buf[Y]=$}writeSB1($){let Y=this.reserveBytes(1);this.buf[Y]=$}writeUInt16BE($){let Y=this.reserveBytes(2);this.buf.writeUInt16BE($,Y)}writeUInt32BE($){let Y=this.reserveBytes(4);this.buf.writeUInt32BE($,Y)}writeUInt64BE($){let Y=this.reserveBytes(8);this.buf.writeUInt32BE(0,Y),this.buf.writeUInt32BE($,Y+4)}writeUInt16LE($){let Y=this.reserveBytes(2);this.buf.writeUInt16LE($,Y)}}class tV1 extends Cz0{constructor($){if($)super($);else{super(b5.BUFFER_CHUNK_SIZE);this.size=this.maxSize}}_grow($){let Y=$%b5.BUFFER_CHUNK_SIZE;if(Y>0)$+=b5.BUFFER_CHUNK_SIZE-Y;let X=$U.allocUnsafe($);this.buf.copy(X),this.buf=X,this.maxSize=this.size=$}}eV1.exports={BaseBuffer:Cz0,GrowableBuffer:tV1}});var ba=o((FR5,XA1)=>{var{BaseBuffer:Pp6,GrowableBuffer:wp6}=tq(),{Buffer:_p6}=L0("buffer"),C7=Ex(),eq=E4(),Sz0=kY();class $A1 extends Pp6{decode(){let $=this.readUInt8();if($!=C7.TNS_VECTOR_MAGIC_BYTE)eq.throwErr(eq.ERR_UNEXPECTED_DATA,_p6.from([$]).toString("hex"));let Y=this.readUInt8();if(Y>C7.TNS_VECTOR_VERSION_WITH_SPARSE)eq.throwErr(eq.ERR_VECTOR_VERSION_NOT_SUPPORTED,Y);let X=this.readUInt16BE(),G=this.readUInt8(),J=this.readUInt32BE(),Q,W,Z;if(G===C7.VECTOR_FORMAT_BINARY||X&C7.TNS_VECTOR_FLAG_NORM)this.skipBytes(8);let K;if(X&C7.TNS_VECTOR_FLAG_SPARSE){K=!0,Z={},Z.numDimensions=J,J=this.readUInt16BE(),Z.indices=new Uint32Array(J);for(let z=0;z<J;z++)Z.indices[z]=this.readUInt32BE()}if(G===C7.VECTOR_FORMAT_FLOAT32)Q=4,W=new Float32Array(J);else if(G===C7.VECTOR_FORMAT_FLOAT64)Q=8,W=new Float64Array(J);else if(G===C7.VECTOR_FORMAT_INT8)Q=1,W=new Int8Array(J);else if(G===C7.VECTOR_FORMAT_BINARY)Q=1,J=J/8,W=new Uint8Array(J);else eq.throwErr(eq.ERR_VECTOR_FORMAT_NOT_SUPPORTED,G);if(K)Z.values=W;let H;for(let z=0;z<J;z++){let V=this.readBytes(Q);if(G===C7.VECTOR_FORMAT_FLOAT32)H=this.parseBinaryFloat(V);else if(G===C7.VECTOR_FORMAT_FLOAT64)H=this.parseBinaryDouble(V);else H=V[0];W[z]=H}return K?Sz0.SparseVector.create(Z):W}}class YA1 extends wp6{_updateVectorHeader($,Y){let X=C7.TNS_VECTOR_FLAG_NORMSRC|C7.TNS_VECTOR_FLAG_NORM,G=$.length,J=C7.TNS_VECTOR_VERSION_BASE,Q=C7.VECTOR_FORMAT_FLOAT32,W=this.writeBinaryFloat.bind(this);if(Array.isArray($)||$ instanceof Float64Array)Q=C7.VECTOR_FORMAT_FLOAT64,W=this.writeBinaryDouble.bind(this);else if($ instanceof Int8Array)Q=C7.VECTOR_FORMAT_INT8,W=this.writeSB1.bind(this);else if($.constructor.name==="Uint8Array")Q=C7.VECTOR_FORMAT_BINARY,G=G*8,J=C7.TNS_VECTOR_VERSION_WITH_BINARY,X=C7.TNS_VECTOR_FLAG_NORMSRC,W=this.writeUInt8.bind(this);if(Y&&Y instanceof Sz0.SparseVector)J=C7.TNS_VECTOR_VERSION_WITH_SPARSE,G=Y.numDimensions,X|=C7.TNS_VECTOR_FLAG_SPARSE;return this.writeUInt8(C7.TNS_VECTOR_MAGIC_BYTE),this.writeUInt8(J),this.writeUInt16BE(X),this.writeUInt8(Q),this.writeUInt32BE(G),this.reserveBytes(8),W}encode($){let Y;if($ instanceof Sz0.SparseVector){Y=this._updateVectorHeader($.values,$);let X=$.indices.length;this.writeUInt16BE(X),$.indices.forEach((G)=>{this.writeUInt32BE(G)}),$=$.values}else Y=this._updateVectorHeader($);return $.forEach((X)=>{Y(X)}),this.buf.subarray(0,this.pos)}}XA1.exports={VectorDecoder:$A1,VectorEncoder:YA1}});var wZ=o((DR5,QA1)=>{var jp6=SY(),ha=E4(),b6=kY(),Tp6=GY(),GA1=ba();class JA1{constructor(){this.autoCommit=!1,this.connectionClass="",this.dbObjectAsPojo=!1,this.edition="",this.errorOnConcurrentExecute=!1,this.events=!1,this.externalAuth=!1,this.fetchArraySize=100,this.fetchAsBuffer=[],this.fetchAsString=[],this.lobPrefetchSize=16384,this.maxRows=0,this.outFormat=jp6.OUT_FORMAT_ARRAY,this.poolIncrement=1,this.poolMax=4,this.poolMaxPerShard=0,this.poolMin=0,this.poolPingInterval=60,this.poolPingTimeout=5000,this.poolTimeout=60,this.prefetchRows=2,this.queueTimeout=60000,this.queueMax=500,this.stmtCacheSize=30,this.configProviderCacheTimeout=86400,this.thin=!0,this.thinDriverInitialized=!1,this.createFetchTypeMap(this.fetchAsString,this.fetchAsBuffer),this.fetchTypeHandler=void 0,this.dbObjectTypeHandler=void 0,this._JsonId=b6.JsonId,this._SparseVector=b6.SparseVector,this._IntervalYM=b6.IntervalYM,this._IntervalDS=b6.IntervalDS}_getDateComponents($,Y){if($)return[Y.getFullYear(),Y.getMonth()+1,Y.getDate(),Y.getHours(),Y.getMinutes(),Y.getSeconds(),Y.getMilliseconds()*1000*1000];else return[Y.getUTCFullYear(),Y.getUTCMonth()+1,Y.getUTCDate(),Y.getUTCHours(),Y.getUTCMinutes(),Y.getUTCSeconds(),Y.getUTCMilliseconds()*1000*1000]}_makeDate($,Y,X,G,J,Q,W,Z,K){return Tp6.makeDate($,Y,X,G,J,Q,W,Z,K)}_decodeVector($){return new GA1.VectorDecoder($).decode()}_encodeVector($){return new GA1.VectorEncoder().encode($)}addToOptions($){for(let Y=1;Y<arguments.length;Y++){let X=arguments[Y];if($[X]===void 0)$[X]=this[X]}}createFetchTypeMap($,Y){let X=new Map(b6.DB_TYPE_FETCH_TYPE_MAP);for(let G of $)switch(G){case b6.DB_TYPE_NUMBER:X.set(b6.DB_TYPE_BINARY_DOUBLE,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_BINARY_FLOAT,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_BINARY_INTEGER,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_NUMBER,b6.DB_TYPE_VARCHAR);break;case b6.DB_TYPE_TIMESTAMP:X.set(b6.DB_TYPE_DATE,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_TIMESTAMP,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_TIMESTAMP_TZ,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_TIMESTAMP_LTZ,b6.DB_TYPE_VARCHAR);break;case b6.DB_TYPE_CLOB:case b6.DB_TYPE_NCLOB:X.set(b6.DB_TYPE_CLOB,b6.DB_TYPE_LONG),X.set(b6.DB_TYPE_NCLOB,b6.DB_TYPE_LONG_NVARCHAR);break;case b6.DB_TYPE_VECTOR:X.set(b6.DB_TYPE_VECTOR,b6.DB_TYPE_LONG);break;case b6.DB_TYPE_RAW:X.set(b6.DB_TYPE_RAW,b6.DB_TYPE_VARCHAR);break;case b6.DB_TYPE_JSON:X.set(b6.DB_TYPE_JSON,b6.DB_TYPE_VARCHAR);break;default:ha.throwErr(ha.ERR_INVALID_TYPE_FOR_CONVERSION)}for(let G of Y)switch(G){case b6.DB_TYPE_BLOB:X.set(b6.DB_TYPE_BLOB,b6.DB_TYPE_LONG_RAW);break;default:ha.throwErr(ha.ERR_INVALID_TYPE_FOR_CONVERSION)}this.fetchTypeMap=X}}QA1.exports=new JA1});var E4=o((NR5,WA1)=>{var Cp6=L0("util"),Sp6=[1,1400,1438,2290,2291,2292,21525,40479],N6=new Map;N6.set("DPI-1010",3);N6.set("DPI-1024",[132,"at index ([0-9]+) does"]);N6.set("DPI-1044",115);N6.set("DPI-1055",105);N6.set("DPI-1063",95);N6.set("DPI-1067",[123,"call timeout of ([0-9]+) ms"]);N6.set("DPI-1080",500);N6.set("OCI-22303",[129,'type "([^"]*"."[^"]*)"']);N6.set("OCI-22164",133);N6.set("OCI-22165",[131,/index \[([0-9]+)\] must be in the range of \[([0-9]+)\] to \[([0-9]+)\]/]);N6.set("ORA-00022",500);N6.set("ORA-00028",500);N6.set("ORA-00031",500);N6.set("ORA-00045",500);N6.set("ORA-00378",500);N6.set("ORA-00600",500);N6.set("ORA-00602",500);N6.set("ORA-00603",500);N6.set("ORA-00609",500);N6.set("ORA-01012",500);N6.set("ORA-01041",500);N6.set("ORA-01043",500);N6.set("ORA-01089",500);N6.set("ORA-01092",500);N6.set("ORA-02396",500);N6.set("ORA-03113",500);N6.set("ORA-03114",500);N6.set("ORA-03122",500);N6.set("ORA-03135",500);N6.set("ORA-12153",500);N6.set("ORA-12537",500);N6.set("ORA-12547",500);N6.set("ORA-12570",500);N6.set("ORA-12583",500);N6.set("ORA-27146",500);N6.set("ORA-28511",500);N6.set("ORA-56600",500);N6.set("ORA-24338",107);N6.set("ORA-25708",87);N6.set("ORA-24344",700);N6.set("ORA-26202",172);N6.set("ORA-26211",170);N6.set("ORA-26216",171);N6.set("DPI-1071",174);var u0=new Map;u0.set(2,"invalid pool");u0.set(3,"invalid or closed connection");u0.set(4,'invalid value for property "%s"');u0.set(5,"invalid value for parameter %d");u0.set(7,'invalid value for "%s" in parameter %d');u0.set(9,"invalid number of function parameters: %d provided but expected between %d and %d");u0.set(10,"unsupported data type %d in column %d");u0.set(11,"encountered bind value and type mismatch");u0.set(12,"encountered invalid bind data type in parameter %d");u0.set(13,"invalid bind direction");u0.set(15,"type was not specified for conversion");u0.set(16,"buffer is too small for OUT binds");u0.set(17,"concurrent operations on ResultSet are not allowed");u0.set(18,"invalid ResultSet");u0.set(19,"ResultSet cannot be returned for non-query statements");u0.set(21,"invalid type for conversion specified");u0.set(22,"invalid Lob");u0.set(23,"concurrent operations on a Lob are not allowed");u0.set(24,"memory allocation failed");u0.set(34,"data type is unsupported for array bind");u0.set(35,"maxArraySize is required for IN OUT array bind");u0.set(36,'length of given array is greater than "maxArraySize"');u0.set(37,'invalid data type at array index %d for bind ":%s"');u0.set(40,'connection request timeout. Request exceeded "queueTimeout" of %d');u0.set(41,"cannot convert ResultSet to QueryStream after invoking methods");u0.set(42,"cannot invoke ResultSet methods after converting to QueryStream");u0.set(43,"ResultSet already converted to QueryStream");u0.set(44,'bind object must contain one of the following attributes: "dir", "type", "maxSize", or "val"');u0.set(45,"cannot load a node-oracledb Thick mode binary for Node.js. Please try using Thin mode. %s");u0.set(46,'pool alias "%s" already exists in the connection pool cache');u0.set(47,'pool alias "%s" not found in connection pool cache');u0.set(52,"invalid data type at array index %d for bind position %d");u0.set(55,"binding by position and name cannot be mixed");u0.set(56,"maxSize for bind position %d must be specified and be greater than zero");u0.set(57,'maxSize for bind "%s" must be specified and greater than zero');u0.set(58,"maxSize of %d is too small for value of length %d in row %d");u0.set(59,"type must be specified for bind position %d");u0.set(60,'type must be specified for bind "%s"');u0.set(61,"invalid subscription");u0.set(62,"subscription notification callback missing");u0.set(63,"subscription notification SQL missing");u0.set(64,"connection pool is closing");u0.set(65,"connection pool was closed");u0.set(66,"invalid SODA document cursor");u0.set(67,"a pre-built node-oracledb Thick mode binary was not found for %s");u0.set(68,"invalid error number %d supplied");u0.set(69,"node-oracledb %s requires Node.js %s or later");u0.set(70,"message must be a string, buffer, database object or an object containing a payload property which itself is a string, buffer or database object");u0.set(75,'only one of "connectString" and "connectionString" can be used');u0.set(76,'connection request rejected. Pool queue length "queueMax" %d reached');u0.set(78,"unsupported data type %d in JSON value");u0.set(80,'only one of "user" and "username" can be used');u0.set(81,"concurrent operations on a connection are disabled");u0.set(82,"connection pool is being reconfigured");u0.set(83,"pool statistics are not enabled");u0.set(84,"invalid access token");u0.set(85,'invalid connection pool configuration with token-based authentication. The "homogeneous" and "externalAuth" attributes must be set to true');u0.set(86,'invalid standalone configuration with token-based authentication. The "externalAuth" attribute must be set to true');u0.set(87,"access token has expired");u0.set(89,"%s is not supported by node-oracledb in Thin mode");u0.set(90,"initOracleClient() was already called with different arguments");u0.set(91,"file %s is missing");u0.set(92,'"poolMax" %d must be greater than or equal to "poolMin" %d');u0.set(95,'setting "batchErrors" or "dmlRowCounts" to true is only permitted for DML statements');u0.set(97,'no bind placeholder named ":%s" was found in the statement text');u0.set(98,"%d bind placeholders were used in the SQL statement but %d bind values were provided");u0.set(99,"internal error: buffer of length %d insufficient to hold %d bytes");u0.set(100,"national character set id %d is not supported by node-oracledb in Thin mode");u0.set(101,"no credentials specified");u0.set(102,"unexpected end of data: want %d bytes but only %d bytes are available");u0.set(103,"unexpected message type %d received at position %d of packet %d");u0.set(104,"connection pool cannot be closed because connections are busy");u0.set(105,"value is not a number (NaN) and cannot be used in Oracle Database numbers");u0.set(106,"internal error: %s");u0.set(107,"invalid cursor");u0.set(109,"invalid type number %d");u0.set(110,"invalid Oracle type number %d [csfrm: %d]");u0.set(111,"internal error: read a negative integer when expecting a positive integer at position %d of packet %d");u0.set(112,"internal error: read integer of length %d when expecting integer of no more than length %d at position %d of packet %d");u0.set(113,"unexpected data received: %s");u0.set(114,"OSON field names may not exceed %d UTF-8 encoded bytes");u0.set(115,"value cannot be represented as an Oracle Database number");u0.set(116,"password verifier type 0x%s is not supported by node-oracledb in Thin mode");u0.set(118,"node-oracledb Thick mode cannot be enabled because a Thin mode connection has already been created");u0.set(119,"conversion from type %s to type %s is not supported");u0.set(120,"fetchTypeHandler return value must be an object");u0.set(121,'fetchTypeHandler return value attribute "type" must be a valid database type');u0.set(122,'fetchTypeHandler return value attribute "converter" must be a function');u0.set(123,"call timeout of %d ms exceeded");u0.set(125,'"connectString" cannot be empty or undefined. Bequeath connections are not supported in Thin mode');u0.set(126,"OSON version %s is not supported");u0.set(127,"internal error: unknown server side piggyback opcode %s");u0.set(128,'internal error: unknown column type name "%s"');u0.set(129,'invalid object type name: "%s"');u0.set(130,"Oracle TDS data type %d is not supported");u0.set(131,"given index [%d] must be in the range of [%d] to [%d]");u0.set(132,"element at index %d does not exist");u0.set(133,"cannot delete elements of a VARRAY");u0.set(134,"value is of wrong type for attribute %s of object %s");u0.set(135,"value is of wrong type for an element of object %s");u0.set(136,"user name and password cannot be set when using external authentication");u0.set(137,'a bind variable replacement value for placeholder ":%s" was not provided');u0.set(138,"connections to this database server version are not supported by node-oracledb in Thin mode");u0.set(139,"unexpected XML type with flag %d");u0.set(140,"user name must be enclosed in [] when using external authentication with a proxy user");u0.set(141,"the number of batch errors from executemany() exceeds 65535");u0.set(142,"value too large for attribute %s of object %s (actual: %d, maximum: %d)");u0.set(143,"value too large for element %d of object %s (actual: %d, maximum: %d)");u0.set(144,"VECTOR format %d is not supported");u0.set(145,"VECTOR version %d is not supported");u0.set(146,"object %s is not a collection");u0.set(147,"cursor has been closed by the database");u0.set(149,'the bind variable placeholder "%s" cannot be used both before and after the RETURNING clause in a DML RETURNING statement');u0.set(150,"invalid flags for tpcBegin() in Two Phase Commit");u0.set(151,"invalid flags for tpcEnd() in Two Phase Commit");u0.set(152,"internal error: unknown transaction state {state} in Two Phase Commit");u0.set(153,"size of the transaction ID must be non-zero and must not exceed 64. Its current size is %d.");u0.set(154,"size of the branch ID is %d and cannot exceed 64");u0.set(155,"operation is not supported on BFILE LOBs");u0.set(156,"operation is only supported on BFILE LOBs");u0.set(157,"executeMany() cannot be used with SELECT statement or WITH SQL clause");u0.set(158,"SPARSE VECTOR indices is not Uint32Array or an Array");u0.set(159,"SPARSE VECTOR values is not an Array");u0.set(160,"SPARSE VECTOR dimensions is not an Positive Integer");u0.set(161,"SPARSE VECTOR indices and values must be of same length");u0.set(162,"SPARSE VECTOR string data is not valid JSON");u0.set(163,"SPARSE VECTOR string data Array should have exactly 3 elements");u0.set(164,"SPARSE VECTOR Invalid Input Data");u0.set(165,"SPARSE VECTOR indices element at index %d is not valid");u0.set(166,'DBFetchTypeHandler return value attribute "converter" must be a function');u0.set(167,"DBFetchTypeHandler return value must be an object");u0.set(168,"access token function failed.");u0.set(169,"External function call failed.");u0.set(170,"Different ways to start or suspend sessionless transactions are being used(server procedures and client APIs)");u0.set(171,"Suspend, commit or rollback the currently active sessionless transaction before beginning or resuming another one.");u0.set(172,"No sessionless transaction is active");u0.set(173,"Invalid server response to connection request");u0.set(174,"Payload cannot be enqueued since it does not match the payload type supported by the queue");u0.set(500,"connection to Oracle Database was closed or broken");u0.set(501,`connection to host %s port %d terminated unexpectedly. (CONNECTION_ID=%s)
%s`);u0.set(503,`connection to host %s port %d could not be established. (CONNECTION_ID=%s)
%s`);u0.set(504,`connection establishment through a web proxy at host %s port %d failed. (CONNECTION_ID=%s)
%s`);u0.set(505,`unable to initiate TLS connection. Please check if wallet credentials are valid
%s`);u0.set(506,`connection to host %s port %d encountered TLS handshake failure. (CONNECTION_ID=%s)
%s`);u0.set(507,"TLS detected an invalid certificate. Server DN in certificate does not match the specified DN");u0.set(508,"TLS detected an invalid certificate. %s not present in certificate");u0.set(509,"internal error: invalid packet type or malformed packet received");u0.set(510,'connection to host %s port %d timed out. Request exceeded "%s" of %d seconds. (CONNECTION_ID=%s)');u0.set(511,`connection to listener at host %s port %d was refused. (CONNECTION_ID=%s)
Cause: %s`);u0.set(512,`invalid connection string parameters.
%s`);u0.set(513,"error received through in-band notification: %s");u0.set(514,"syntax error in connection string");u0.set(515,"error in Easy Connect connection string: %s: %s");u0.set(516,"no configuration directory set or available to search for tnsnames.ora");u0.set(517,'cannot connect to Oracle Database. Unable to find "%s" in "%s"');u0.set(518,'cannot connect to Oracle Database. Service "%s" is not registered with the listener at host %s port %s. (CONNECTION_ID=%s)');u0.set(519,'cannot connect to Oracle Database. SID "%s" is not registered with the listener at host %s port %s. (CONNECTION_ID=%s)');u0.set(520,"cannot connect to Oracle Database. File tnsnames.ora not found in %s");u0.set(521,"connection to host %s port %d received end-of-file on communication channel. (CONNECTION_ID=%s)");u0.set(523,`Failed to retrieve configuration from Centralized Configuration Provider:
 %s`);u0.set(524,"%s Configuration provider plugin not registered. Please register the hook function for the same");u0.set(529,"Invalid wallet content format. Supported format is PEM");u0.set(530,"The host addresses or URLs provided by the connect string are incorrect or unresolvable in your network.");u0.set(531,"Error in Advanced Networking Option packet received from the server");u0.set(532,"%s service recieved status failure");u0.set(533,`Advanced Networking Option service negotiation failed. Native Network Encryption and DataIntegrity only supported in node-oracledb thick mode.
Cause: ORA-%s`);u0.set(534,`Error during data compression/decompression: %s
`);u0.set(535,`Parameter does not have a valid type: %s
`);u0.set(700,"creation succeeded with compilation errors");function Mx($){if(!$){let Y=Array.prototype.slice.call(arguments,1);kz0(...Y)}}function kp6($,Y,X){Mx($.length>=Y&&$.length<=X,9,$.length,Y,X)}function vp6($,Y,X){if($[X]!==void 0)iL(typeof $[X]==="boolean",Y,X)}function xp6($,Y,X){if($[X]!==void 0)iL(typeof $[X]==="function",Y,X)}function yp6($,Y,X){if($[X]!==void 0)iL(Number.isInteger($[X]),Y,X)}function bp6($,Y,X){if($[X]!==void 0)iL(Number.isInteger($[X])&&$[X]>=0,Y,X)}function hp6($,Y,X){if($[X]!==void 0)iL(Number.isInteger($[X])&&$[X]>0,Y,X)}function fp6($,Y,X){if($[X]!==void 0)iL(typeof $[X]==="string",Y,X)}function iL($,Y,X){Mx($,7,X,Y)}function gp6($,Y){Mx($,5,Y)}function mp6($,Y){Mx($,4,Y)}function $I($){let Y=u0.get($),X=[...arguments];if(!Y)X=[void 0,$],$=68,Y=u0.get($);let J=`NJS-${$.toString().padStart(3,"0")}`;X[0]=`${J}: ${Y}`;let Q=Error(Cp6.format(...X));return Q.code=J,Q.isRecoverable=$===500,Error.captureStackTrace(Q,$I),Q}function kz0(){throw $I(...arguments)}function up6(){let $=$I(...arguments),Y=$.message.indexOf("ORA-"),X=$.message.substring(Y+4,Y+9);throw $.message=$.message+`
Help: https://docs.oracle.com/error-help/db/ora-`+X,$}function pp6($){kz0(89,$)}function dp6($,Y){if(!$.code){let X=$.message.indexOf(":");if(X>0){$.code=$.message.substr(0,X);let G=wZ();if($.errorNum&&G.thin)$.message+=`
Help: https://docs.oracle.com/error-help/db/ora-${$.errorNum.toString().padStart(5,"0")}/`;if(N6.has($.code)){let J=[],Q,W=N6.get($.code);if(typeof W==="number")Q=W;else{Q=W[0];let K=W[1],H=$.message.match(K);if(H)J=H.slice(1)}let Z=$I(Q,...J);$.code=Z.code,$.message=Z.message+`
`+$.message}}}if($.requiresStackCapture)delete $.requiresStackCapture,Error.captureStackTrace($,Y);return $}function cp6($,Y){let X=$I(Y);throw X.stack=$.stack,X}WA1.exports={ERR_INTEGRITY_ERROR_CODES:Sp6,ERR_INVALID_POOL:2,ERR_INVALID_CONNECTION:3,ERR_INVALID_PROPERTY_VALUE:4,ERR_INVALID_PARAMETER_VALUE:5,ERR_INVALID_PROPERTY_VALUE_IN_PARAM:7,ERR_INVALID_NUMBER_OF_PARAMETERS:9,ERR_UNSUPPORTED_DATA_TYPE:10,ERR_BIND_VALUE_AND_TYPE_MISMATCH:11,ERR_INVALID_BIND_DATA_TYPE:12,ERR_INVALID_BIND_DIRECTION:13,ERR_NO_TYPE_FOR_CONVERSION:15,ERR_INSUFFICIENT_BUFFER_FOR_BINDS:16,ERR_BUSY_RS:17,ERR_INVALID_RS:18,ERR_NOT_A_QUERY:19,ERR_INVALID_TYPE_FOR_CONVERSION:21,ERR_INVALID_LOB:22,ERR_BUSY_LOB:23,ERR_INSUFFICIENT_MEMORY:24,ERR_INVALID_TYPE_FOR_ARRAY_BIND:34,ERR_REQUIRED_MAX_ARRAY_SIZE:35,ERR_INVALID_ARRAY_SIZE:36,ERR_INCOMPATIBLE_TYPE_ARRAY_BIND:37,ERR_CONN_REQUEST_TIMEOUT:40,ERR_CANNOT_CONVERT_RS_TO_STREAM:41,ERR_CANNOT_INVOKE_RS_METHODS:42,ERR_RS_ALREADY_CONVERTED:43,ERR_INVALID_BIND_UNIT:44,ERR_CANNOT_LOAD_BINARY:45,ERR_POOL_WITH_ALIAS_ALREADY_EXISTS:46,ERR_POOL_WITH_ALIAS_NOT_FOUND:47,ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND:52,ERR_MIXED_BIND:55,ERR_MISSING_MAX_SIZE_BY_POS:56,ERR_MISSING_MAX_SIZE_BY_NAME:57,ERR_MAX_SIZE_TOO_SMALL:58,ERR_MISSING_TYPE_BY_POS:59,ERR_MISSING_TYPE_BY_NAME:60,ERR_INVALID_SUBSCR:61,ERR_MISSING_SUBSCR_CALLBACK:62,ERR_MISSING_SUBSCR_SQL:63,ERR_POOL_CLOSING:64,ERR_POOL_CLOSED:65,ERR_INVALID_SODA_DOC_CURSOR:66,ERR_NO_BINARY_AVAILABLE:67,ERR_INVALID_ERR_NUM:68,ERR_NODE_TOO_OLD:69,ERR_INVALID_AQ_MESSAGE:70,ERR_DBL_CONNECT_STRING:75,ERR_QUEUE_MAX_EXCEEDED:76,ERR_UNSUPPORTED_DATA_TYPE_IN_JSON:78,ERR_DBL_USER:80,ERR_CONCURRENT_OPS:81,ERR_POOL_RECONFIGURING:82,ERR_POOL_STATISTICS_DISABLED:83,ERR_TOKEN_BASED_AUTH:84,ERR_POOL_TOKEN_BASED_AUTH:85,ERR_CONN_TOKEN_BASED_AUTH:86,ERR_TOKEN_HAS_EXPIRED:87,ERR_NOT_IMPLEMENTED:89,ERR_INIT_ORACLE_CLIENT_ARGS:90,ERR_MISSING_FILE:91,ERR_INVALID_NUMBER_OF_CONNECTIONS:92,ERR_EXEC_MODE_ONLY_FOR_DML:95,ERR_CONNECTION_CLOSED:500,ERR_CONNECTION_LOSTCONTACT:501,ERR_CONNECTION_INCOMPLETE:503,ERR_PROXY_CONNECTION_FAILURE:504,ERR_TLS_INIT_FAILURE:505,ERR_TLS_AUTH_FAILURE:506,ERR_TLS_DNMATCH_FAILURE:507,ERR_TLS_HOSTMATCH_FAILURE:508,ERR_INVALID_PACKET:509,ERR_CONNECTION_TIMEDOUT:510,ERR_CONNECTION_REFUSED:511,ERR_INVALID_CONNECT_STRING_PARAMETERS:512,ERR_CONNECTION_INBAND:513,ERR_INVALID_CONNECT_STRING_SYNTAX:514,ERR_INVALID_EZCONNECT_SYNTAX:515,ERR_NO_CONFIG_DIR:516,ERR_TNS_ENTRY_NOT_FOUND:517,ERR_CONNECTION_EOF:521,ERR_CONFIG_PROVIDER_FAILED_TO_RETRIEVE_CONFIG:523,ERR_CONFIG_PROVIDER_PARAM_TYPE:535,ERR_REGISTER_HOOKFN_CONFIGPROVIDER:524,ERR_DATA_COMPRESSION:534,ERR_WALLET_TYPE_NOT_SUPPORTED:529,ERR_HOST_NOT_FOUND:530,ERR_ANO_PACKET:531,ERR_ANO_STATUS:532,ERR_ANO_NEGOTIATION:533,ERR_INVALID_BIND_NAME:97,ERR_WRONG_NUMBER_OF_BINDS:98,ERR_BUFFER_LENGTH_INSUFFICIENT:99,ERR_NCHAR_CS_NOT_SUPPORTED:100,ERR_MISSING_CREDENTIALS:101,ERR_UNEXPECTED_END_OF_DATA:102,ERR_UNEXPECTED_MESSAGE_TYPE:103,ERR_POOL_HAS_BUSY_CONNECTIONS:104,ERR_INTERNAL:106,ERR_INVALID_REF_CURSOR:107,ERR_UNSUPPORTED_VERIFIER_TYPE:116,ERR_NAN_VALUE:105,ERR_ORACLE_NUMBER_NO_REPR:115,ERR_INVALID_SERVICE_NAME:518,ERR_INVALID_SID:519,ERR_TNS_NAMES_FILE_MISSING:520,ERR_INVALID_TYPE_NUM:109,ERR_INVALID_ORACLE_TYPE_NUM:110,ERR_UNEXPECTED_NEGATIVE_INTEGER:111,ERR_INTEGER_TOO_LARGE:112,ERR_UNEXPECTED_DATA:113,ERR_OSON_FIELD_NAME_LIMITATION:114,ERR_OSON_VERSION_NOT_SUPPORTED:126,ERR_THIN_CONNECTION_ALREADY_CREATED:118,ERR_UNSUPPORTED_CONVERSION:119,ERR_FETCH_TYPE_HANDLER_RETURN_VALUE:120,ERR_FETCH_TYPE_HANDLER_TYPE:121,ERR_FETCH_TYPE_HANDLER_CONVERTER:122,ERR_CALL_TIMEOUT_EXCEEDED:123,ERR_EMPTY_CONNECT_STRING:125,ERR_UNKOWN_SERVER_SIDE_PIGGYBACK:127,ERR_UNKNOWN_COLUMN_TYPE_NAME:128,ERR_INVALID_OBJECT_TYPE_NAME:129,ERR_TDS_TYPE_NOT_SUPPORTED:130,ERR_INVALID_COLL_INDEX_SET:131,ERR_INVALID_COLL_INDEX_GET:132,ERR_DELETE_ELEMENTS_OF_VARRAY:133,ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR:134,ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM:135,ERR_WRONG_CRED_FOR_EXTAUTH:136,ERR_MISSING_BIND_VALUE:137,ERR_SERVER_VERSION_NOT_SUPPORTED:138,ERR_UNEXPECTED_XML_TYPE:139,ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY:140,ERR_TOO_MANY_BATCH_ERRORS:141,ERR_WRONG_LENGTH_FOR_DBOBJECT_ATTR:142,ERR_WRONG_LENGTH_FOR_DBOBJECT_ELEM:143,ERR_VECTOR_FORMAT_NOT_SUPPORTED:144,ERR_VECTOR_VERSION_NOT_SUPPORTED:145,ERR_OBJECT_IS_NOT_A_COLLECTION:146,ERR_CURSOR_HAS_BEEN_CLOSED:147,ERR_DML_RETURNING_DUP_BINDS:149,ERR_INVALID_TPC_BEGIN_FLAGS:150,ERR_INVALID_TPC_END_FLAGS:151,ERR_UNKNOWN_TRANSACTION_STATE:152,ERR_INVALID_TRANSACTION_SIZE:153,ERR_INVALID_BRANCH_SIZE:154,ERR_SESSIONLESS_DIFFERING_METHODS:170,ERR_SESSIONLESS_ALREADY_ACTIVE:171,ERR_SESSIONLESS_INACTIVE:172,ERR_INVALID_SERVER_RESPONSE:173,ERR_PAYLOAD_CANNOT_BE_ENQUEUED:174,ERR_CONNECTION_CLOSED_CODE:"NJS-500",ERR_OPERATION_NOT_SUPPORTED_ON_BFILE:155,ERR_OPERATION_ONLY_SUPPORTED_ON_BFILE:156,ERR_EXECMANY_NOT_ALLOWED_ON_QUERIES:157,ERR_VECTOR_SPARSE_INDICES_IS_NOT_ARRAY:158,ERR_VECTOR_SPARSE_VALUES_IS_NOT_ARRAY:159,ERR_VECTOR_SPARSE_DIMS_IS_NOT_INTEGER:160,ERR_VECTOR_SPARSE_INDICES_VALUES_NOT_EQUAL:161,ERR_VECTOR_SPARSE_INVALID_JSON:162,ERR_VECTOR_SPARSE_INVALID_STRING:163,ERR_VECTOR_SPARSE_INVALID_INPUT:164,ERR_VECTOR_SPARSE_INDICES_ELEM_IS_NOT_VALID:165,ERR_DB_FETCH_TYPE_HANDLER_CONVERTER:166,ERR_DB_FETCH_TYPE_HANDLER_RETURN_VALUE:167,ERR_ACCESS_TOKEN:168,ERR_CALLOUT_FN:169,WRN_COMPILATION_CREATE:700,assert:Mx,assertArgCount:kp6,assertParamPropBool:vp6,assertParamPropFunction:xp6,assertParamPropInt:yp6,assertParamPropString:fp6,assertParamPropUnsignedInt:bp6,assertParamPropUnsignedIntNonZero:hp6,assertParamPropValue:iL,assertParamValue:gp6,assertPropValue:mp6,getErr:$I,throwErr:kz0,throwErrWithORAError:up6,throwNotImplemented:pp6,transformErr:dp6,throwWrapErr:cp6}});var fa=o((LR5,KA1)=>{class ZA1{constructor(){this._config={}}isEnabled(){return this._config.enable}enable(){this._config.enable=!0}disable(){this._config.enable=!1}onEnterFn(){}onExitFn(){}onBeginRoundTrip(){}onEndRoundTrip(){}}var vz0;function lp6($){vz0=$}function ip6(){return vz0}function np6(){return vz0?.isEnabled()}KA1.exports={TraceHandlerBase:ZA1,setTraceInstance:lp6,getTraceInstance:ip6,isEnabled:np6}});var UA1=o((BR5,rp6)=>{rp6.exports={name:"oracledb",version:"6.10.0",description:"A Node.js module for Oracle Database access from JavaScript and TypeScript",license:"(Apache-2.0 OR UPL-1.0)",homepage:"http://oracle.github.io/node-oracledb/",keywords:["Oracle","Database","official","DB","SQL","JSON","PL/SQL","SODA","OCI","API","client","library","driver","add-on","extension","binding","interface","adapter","module"],repository:{type:"git",url:"git://github.com/oracle/node-oracledb.git"},scripts:{install:"node package/install.js",prune:"node package/prunebinaries.js"},engines:{node:">=14.17"},maintainers:[{name:"Oracle Corp."}],bugs:{url:"https://github.com/oracle/node-oracledb/issues"},main:"./index.js"}});var GY=o((OR5,BA1)=>{var{Buffer:YU}=L0("buffer"),z7=E4(),rJ=L0("process"),ap6=L0("util"),HA1=kY(),Jz=SY(),Rx=fa(),sp6=L0("crypto"),op6=["-----BEGIN CERTIFICATE-----","-----BEGIN PUBLIC KEY-----","-----BEGIN PRIVATE KEY-----","-----BEGIN RSA PRIVATE KEY-----","-----BEGIN DSA PRIVATE KEY-----","-----BEGIN EC PRIVATE KEY-----","-----BEGIN ENCRYPTED PRIVATE KEY-----"],tp6=["-----END CERTIFICATE-----","-----END PUBLIC KEY-----","-----END PRIVATE KEY-----","-----END RSA PRIVATE KEY-----","-----END DSA PRIVATE KEY-----","-----END EC PRIVATE KEY-----","-----END ENCRYPTED PRIVATE KEY-----"],ep6=new Set(["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","<",">","/","\\",",",".",":",";","'",'"',"-","_","$","+","*","#","&","!","%","?","@"]),zA1;try{zA1=UA1()}catch($){z7.throwErr(z7.ERR_MISSING_FILE,"package.json")}var VA1=zA1.version,$d6="build/Release",Yd6="oracledb-"+VA1+"-"+rJ.platform+"-"+rJ.arch+".node",Xd6="oracledb.node",Gd6="package/Staging";function Jd6($,Y,X){z7.assertParamPropString($,Y,X);let G=LA1($[X]);z7.assertParamPropValue($[X]===G,Y,X)}function AA1(){return"Node-oracledb installation instructions: https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html"}function Qd6($){return $=$.trim(),op6.some((Y)=>$.includes(Y))&&tp6.some((Y)=>$.endsWith(Y))}function Wd6(){let $,Y,X=AA1()+`
`;if(rJ.platform==="linux"){if(rJ.arch==="x64")Y=`https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
`,$="64-bit";else if(rJ.arch==="x32")Y=`https://www.oracle.com/database/technologies/instant-client/linux-x86-32-downloads.html
`,$="32-bit";else Y=`https://www.oracle.com/database/technologies/instant-client.html
`,$=rJ.arch;X+="You must have Linux "+$+` Oracle Client libraries configured with ldconfig, or in LD_LIBRARY_PATH.
`,X+=`If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from 
`,X+=Y}else if(rJ.platform==="darwin"){if(rJ.arch==="x64")Y=`https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html
`,$="64-bit";else Y=`https://www.oracle.com/database/technologies/instant-client.html
`,$=rJ.arch;X+="You must have macOS "+$+` Oracle Instant Client Basic or Basic Light package libraries in
`,X+=`/usr/local/lib or set by calling oracledb.initOracleClient({libDir: "/my/instant_client_directory"}).
`,X+="Oracle Instant Client can be downloaded from "+Y}else if(rJ.platform==="win32"){if(rJ.arch==="x64")Y=`https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html
`,$="64-bit";else if(rJ.arch==="x32")Y=`https://www.oracle.com/database/technologies/instant-client/microsoft-windows-32-downloads.html
`,$="32-bit";else Y=`https://www.oracle.com/database/technologies/instant-client.html
`,$=rJ.arch;X+="You must have Windows "+$+` Oracle Client libraries in your PATH environment variable.
`,X+=`If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from
`,X+=Y,X+=`A Microsoft Visual Studio Redistributable suitable for your Oracle client library version must be available.
`}else Y=`https://www.oracle.com/database/technologies/instant-client.html
`,X+="You must have "+rJ.arch+` Oracle Client libraries in your operating system library search path.
`,X+=`If you do not have Oracle Database on this computer, then install an Instant Client Basic or Basic Light package from: 
`,X+=Y;return X}function Zd6($){return`${this.constructor.name==="Object"?"oracledb":`oracledb.${this.constructor.name}`}.${$}`}function Kd6($){if(!Rx.isEnabled())return;if(this._impl)this._impl._callLevelTraceData={};$.additionalConfig={},$.additionalConfig.self=this,$.additionalConfig.args=$.args,$.operation=Zd6.call(this,$.fn.name),$.connectLevelConfig=this._impl?._getConnectTraceConfig(),Rx.getTraceInstance().onEnterFn($)}function Ud6($,Y,X){if(!Rx.isEnabled())return;if($.error=X,$.additionalConfig.result=Y,this._impl)$.callLevelConfig=this._impl._callLevelTraceData;if(["oracledb.getConnection","oracledb.createPool"].includes($.operation))if(X){if($.args&&$.args.length>=1){let J={},Q=$.args[0];J.user=Q.user||Q.username,J.connectString=Q.connectString||Q.connectionString,$.connectLevelConfig=J}}else $.connectLevelConfig=Y._impl._getConnectTraceConfig();else if($.operation==="oracledb.Pool.getConnection"){if(!X)$.connectLevelConfig=Y._impl._getConnectTraceConfig()}if(Rx.getTraceInstance().onExitFn($),this._impl)this._impl._callLevelTraceData=void 0}function FA1($){let Y=function(){if(typeof arguments[arguments.length-1]!=="function")return $.apply(this,arguments);let X=Array.prototype.slice.call(arguments,0,arguments.length-1),G=arguments[arguments.length-1];$.apply(this,X).then(function(J){G(null,J)},G)};if($.name)Object.defineProperty(Y,"name",{value:$.name});return Y}function DA1($,Y,X){let G=async function J(){let Q,W=Rx.isEnabled(),Z={fn:$,args:arguments};if(X){if(this._isActive)z7.throwErr(X);this._isActive=!0}if(Y&&this._impl)Q=this._impl._getConnImpl(),await Q._acquireLock();let K,H;try{if(W)Kd6.call(this,Z);return K=await Z.fn.apply(this,arguments),K}catch(z){throw H=z7.transformErr(z,J),H}finally{if(Q)Q._releaseLock();if(X)this._isActive=!1;if(W)Ud6.call(this,Z,K,H)}};if($.name)Object.defineProperty(G,"name",{value:$.name});return G}function Hd6($){let Y=1,X=!0,G;if(typeof arguments[1]==="number")Y++,G=arguments[1];else if(typeof arguments[1]==="boolean")Y++,X=arguments[1];for(let J=Y;J<arguments.length;J++){let Q=arguments[J],W=$[Q];$[Q]=FA1(DA1(W,X,G))}}function zd6($){if(!Array.isArray($))return!1;for(let Y=0;Y<$.length;Y++)if(typeof $[Y]!=="string")return!1;return!0}function NA1($){return $!==null&&typeof $==="object"}function Vd6($){return $!==null&&typeof $==="object"||Array.isArray($)}function Ad6($){if($&Jz.SYSPRELIM)$=$^Jz.SYSPRELIM;return $===Jz.SYSASM||$===Jz.SYSBACKUP||$===Jz.SYSDBA||$===Jz.SYSDG||$===Jz.SYSKM||$===Jz.SYSOPER||$===Jz.SYSRAC}function Fd6($){if(!Array.isArray($))return!1;for(let Y=0;Y<$.length;Y++){let X=$[Y];if(!(typeof X==="string"||typeof X==="number"||YU.isBuffer(X)||ap6.types.isDate(X)))return!1}return!0}function Dd6($){if(!Array.isArray($))return!1;for(let Y=0;Y<$.length;Y++){let X=$[Y];if(!Array.isArray(X)||X.length!==3)return!1;for(let G=0;G<3;G++)if(typeof X[G]!=="string")return!1}return!0}function Nd6($){return NA1($)&&Number.isInteger($.formatId)&&(YU.isBuffer($.globalTransactionId)||typeof $.globalTransactionId==="string")&&(YU.isBuffer($.branchQualifier)||typeof $.branchQualifier==="string")}function Ld6($){let Y;if(YU.isBuffer($.globalTransactionId)&&YU.isBuffer($.branchQualifier))Y=$;else{if(Y={formatId:$.formatId,globalTransactionId:$.globalTransactionId,branchQualifier:$.branchQualifier},typeof $.globalTransactionId==="string")Y.globalTransactionId=YU.from($.globalTransactionId);if(typeof $.branchQualifier==="string")Y.branchQualifier=YU.from($.branchQualifier)}if(Y.globalTransactionId.length>64)z7.throwErr(z7.ERR_INVALID_TRANSACTION_SIZE,Y.globalTransactionId.length);if(Y.branchQualifier.length>64)z7.throwErr(z7.ERR_INVALID_BRANCH_SIZE,Y.branchQualifier.length);return Y}function Bd6($){return YU.isBuffer($)||typeof $==="string"}function Od6($){let Y=$;if(Y===void 0)Y=sp6.randomUUID();if(typeof Y==="string"){Y=YU.from(Y);let X=Y.length;if(X===0||X>64)z7.throwErr(z7.ERR_INVALID_TRANSACTION_SIZE,X)}return Y}function xz0($){if(z7.assert(typeof $==="string",z7.ERR_TOKEN_BASED_AUTH),$.split(".")[1]===void 0)z7.throwErr(z7.ERR_TOKEN_BASED_AUTH);let X=$.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),J=YU.from(X,"base64").toString("ascii"),Q=JSON.parse(J).exp;return z7.assert(Q!=null,z7.ERR_TOKEN_BASED_AUTH),Q=Q*1000,new Date().getTime()>Q}function Ed6($){switch(typeof $){case"string":if($==="")z7.throwErr(z7.ERR_TOKEN_BASED_AUTH);return!xz0($);case"object":if($.token===void 0||$.token===""||$.privateKey===void 0||$.privateKey==="")z7.throwErr(z7.ERR_TOKEN_BASED_AUTH);return!xz0($.token);default:z7.throwErr(z7.ERR_TOKEN_BASED_AUTH)}}function Md6($){return $=$.replace(/\n/g,""),$=$.replace("-----BEGIN PRIVATE KEY-----",""),$=$.replace("-----END PRIVATE KEY-----",""),$}function Rd6($,Y){let X=Y+"Class",G=Y+"Name",J=$[X],Q=$[Y];if(typeof Q==="number")Q=$[Y]=HA1.getTypeByNum(Q);if(J)$[G]=J.prototype.fqn;else if(Q)$[G]=Q.columnTypeName}function qd6($){return $ instanceof Float32Array||$ instanceof Float64Array||$ instanceof Int8Array||Object.getPrototypeOf($)===Uint8Array.prototype||$ instanceof HA1.SparseVector}function Id6($,Y,X,G,J,Q,W,Z,K){if($)return new Date(Y,X-1,G,J,Q,W,Z);return new Date(Date.UTC(Y,X-1,G,J,Q,W,Z)-K*60000)}function LA1($){let Y=$.split("");if(Y[0]==="'"||Y[0]==='"')Y=Y.splice(1);if(Y[Y.length-1]==="'"||Y[Y.length-1]==='"')Y.pop();for(let X=0;X<Y.length;X++)if(!ep6.has(Y[X]))Y[X]="?";if(Y[Y.length-1]==="\\")Y[Y.length-1]="?";return Y.join("")}BA1.exports={BINARY_FILE:Yd6,BUILD_FILE:Xd6,PACKAGE_JSON_VERSION:VA1,RELEASE_DIR:$d6,STAGING_DIR:Gd6,addTypeProperties:Rd6,assertParamPropNetworkName:Jd6,callbackify:FA1,denormalizePrivateKey:Md6,getInstallURL:AA1,getInstallHelp:Wd6,isArrayOfStrings:zd6,isObject:NA1,isObjectOrArray:Vd6,isPrivilege:Ad6,isShardingKey:Fd6,isAppContext:Dd6,isTokenExpired:xz0,isTokenValid:Ed6,isTransactionId:Bd6,isVectorValue:qd6,isXid:Nd6,normalizeTransactionId:Od6,normalizeXid:Ld6,makeDate:Id6,sanitize:LA1,wrapFn:DA1,wrapFns:Hd6,isPemFile:Qd6}});var MA1=o((ER5,EA1)=>{var JY=E4();class OA1{getCondition(){JY.throwNotImplemented("getting condition (dequeue options)")}getConsumerName(){JY.throwNotImplemented("getting consumer name (dequeue options)")}getCorrelation(){JY.throwNotImplemented("getting correlation (dequeue options)")}getMode(){JY.throwNotImplemented("getting mode (dequeue options)")}getMsgId(){JY.throwNotImplemented("getting message id (dequeue options)")}getNavigation(){JY.throwNotImplemented("getting navigation (dequeue options)")}getTransformation(){JY.throwNotImplemented("getting transformation (dequeue options)")}getVisibility(){JY.throwNotImplemented("getting visibility (dequeue options)")}getWait(){JY.throwNotImplemented("getting wait (dequeue options)")}setCondition(){JY.throwNotImplemented("setting condition (dequeue options)")}setConsumerName(){JY.throwNotImplemented("setting consumer name (dequeue options)")}setCorrelation(){JY.throwNotImplemented("setting correlation (dequeue options)")}setDeliveryMode(){JY.throwNotImplemented("setting deliveryMode (dequeue options)")}setMode(){JY.throwNotImplemented("setting mode (dequeue options)")}setMsgId(){JY.throwNotImplemented("setting message id (dequeue options)")}setNavigation(){JY.throwNotImplemented("setting navigation (dequeue options)")}setTransformation(){JY.throwNotImplemented("setting transformation (dequeue options)")}setVisibility(){JY.throwNotImplemented("setting visibility (dequeue options)")}setWait(){JY.throwNotImplemented("setting wait (dequeue options)")}}EA1.exports=OA1});var IA1=o((MR5,qA1)=>{var YI=E4();class RA1{getDeliveryMode(){YI.throwNotImplemented("getting delivery mode (enqueue options)")}getTransformation(){YI.throwNotImplemented("getting transformation (enqueue options)")}getVisibility(){YI.throwNotImplemented("getting visibility (enqueue options)")}setDeliveryMode(){YI.throwNotImplemented("setting delivery mode (enqueue options)")}setTransformation(){YI.throwNotImplemented("setting transformation (enqueue options)")}setVisibility(){YI.throwNotImplemented("setting visibility (enqueue options)")}}qA1.exports=RA1});var _A1=o((RR5,wA1)=>{var u2=E4();class PA1{getCorrelation(){u2.throwNotImplemented("getting correlation (message)")}getDelay(){u2.throwNotImplemented("getting delay (message)")}getDeliveryMode(){u2.throwNotImplemented("getting delivery mode (message)")}getExceptionQueue(){u2.throwNotImplemented("getting exception queue (message)")}getExpiration(){u2.throwNotImplemented("getting expiration (message)")}getMsgId(){u2.throwNotImplemented("getting message id (message)")}getNumAttempts(){u2.throwNotImplemented("getting number of attempts (message)")}getOriginalMsgId(){u2.throwNotImplemented("getting original message id (message)")}getPayload(){u2.throwNotImplemented("getting payload (message)")}getPriority(){u2.throwNotImplemented("getting priority (message)")}getState(){u2.throwNotImplemented("getting state (message)")}}wA1.exports=PA1});var fA=o((qR5,TA1)=>{class jA1{_getConnectTraceConfig(){let $=this._getConnImpl();if($)return $._getConnectTraceConfig()}}TA1.exports=jA1});var kA1=o((IR5,SA1)=>{var ga=E4(),Pd6=fA();class CA1 extends Pd6{_getConnImpl(){return this._connection}deqMany(){ga.throwNotImplemented("dequeuing multiple items from a queue")}deqOne(){ga.throwNotImplemented("dequeuing a single item from a queue")}enqMany(){ga.throwNotImplemented("enqueuing multiple items from a queue")}enqOne(){ga.throwNotImplemented("enqueuing a single item from a queue")}}SA1.exports=CA1});var ma=o((PR5,xA1)=>{var WW=E4();class vA1{constructor($){this._objType=$}append(){WW.throwNotImplemented("appending element to collection")}copy(){WW.throwNotImplemented("copying an object")}deleteElement(){WW.throwNotImplemented("deleting an element from a collection")}getElement(){WW.throwNotImplemented("getting an element from a collection")}getFirstIndex(){WW.throwNotImplemented("getting the first index in a collection")}getKeys(){WW.throwNotImplemented("returning the keys of a collection")}getLastIndex(){WW.throwNotImplemented("getting the last index in a collection")}getNextIndex(){WW.throwNotImplemented("getting the next index in a collection")}getPrevIndex(){WW.throwNotImplemented("getting the previous index in a collection")}getValues(){WW.throwNotImplemented("getting the values in a collection")}hasElement(){WW.throwNotImplemented("getting if value exists in a collection")}setElement(){WW.throwNotImplemented("setting an element in a collection")}trim(){WW.throwNotImplemented("trimming elements from a collection")}}xA1.exports=vA1});var ua=o((wR5,hA1)=>{var yA1=wZ(),x4=E4(),wd6=L0("util");class bA1{constructor(){this._inProgress=!1,this._dbObjectTypes=new Map,this._requestQueue=[],this._osonMaxFieldNameSize=255}async _acquireLock(){if(this._inProgress){if(yA1.errorOnConcurrentExecute)x4.throwErr(x4.ERR_CONCURRENT_OPS);await new Promise(($,Y)=>{let X={resolve:$,reject:Y};this._requestQueue.push(X)})}this._inProgress=!0}_getConnImpl(){return this}_getConnectTraceConfig(){let $;if(this._pool)$=this._pool._getConnectTraceConfig();else $={connectString:this._connectString,user:this._user};if($.serviceName=this.getServiceName(),$.instanceName=this.getInstanceName(),$.pdbName=this.getDbName(),yA1.thin)$.hostName=this.getHostName(),$.port=this.getPort(),$.protocol=this.getProtocol();return $}_getDbObjectType($,Y,X,G){let J;if(G){if(J=this._dbObjectTypes.get(G),J)return J}let Q=X?`${$}.${X}.${Y}`:`${$}.${Y}`;if(J=this._dbObjectTypes.get(Q),!J)J={oid:G,fqn:Q,schema:$,name:Y,packageName:X,partial:!0,isXmlType:$==="SYS"&&Y==="XMLTYPE"},this._dbObjectTypes.set(Q,J);if(G&&!J.oid)J.oid=G,this._dbObjectTypes.set(G,J);return J}_isDate($){return wd6.types.isDate($)}_releaseLock(){if(this._requestQueue.length>0)this._requestQueue.shift().resolve();else this._inProgress=!1}breakExecution(){x4.throwNotImplemented("getting Oracle Server version number")}changePassword(){x4.throwNotImplemented("changing the password")}close(){x4.throwNotImplemented("closing the connection")}commit(){x4.throwNotImplemented("committing the transaction")}createLob(){x4.throwNotImplemented("creating a temporary LOB")}execute(){x4.throwNotImplemented("executing a SQL statement")}executeMany(){x4.throwNotImplemented("executing a SQL statement multiple times")}getCallTimeout(){x4.throwNotImplemented("getting call timeout")}getCurrentSchema(){x4.throwNotImplemented("getting current schema")}getDbDomain(){x4.throwNotImplemented("getting db domain")}getDbName(){x4.throwNotImplemented("getting db name")}getDbObjectClass(){x4.throwNotImplemented("getting a database object class")}getExternalName(){x4.throwNotImplemented("getting the external name")}getInstanceName(){x4.throwNotImplemented("getting the Oracle Database instance name.")}getInternalName(){x4.throwNotImplemented("getting the internal name")}getLTXID(){x4.throwNotImplemented("getting the logical transaction id")}getMaxIdentifierLength(){x4.throwNotImplemented("getting the maximum identifier length")}getMaxOpenCursors(){x4.throwNotImplemented("getting max open cursors")}getOracleServerVersion(){x4.throwNotImplemented("getting Oracle Server version number")}getOracleServerVersionString(){x4.throwNotImplemented("getting Oracle Server version as a string")}getQueue(){x4.throwNotImplemented("getting a queue")}getServiceName(){x4.throwNotImplemented("getting service name")}getSodaDatabase(){x4.throwNotImplemented("getting a SODA database")}getStatementInfo(){x4.throwNotImplemented("getting information about a statement")}getStmtCacheSize(){x4.throwNotImplemented("getting the statement cache size")}getTag(){x4.throwNotImplemented("getting the tag for the connection")}getTransactionInProgress(){x4.throwNotImplemented("getting the status of an active transaction on the connection")}getWarning(){x4.throwNotImplemented("getting information about warning")}isHealthy(){x4.throwNotImplemented("getting the health of the connection")}isCompressionEnabled(){x4.throwNotImplemented("getting the data compression status on the connection")}ping(){x4.throwNotImplemented("sending a ping to the database")}rollback(){x4.throwNotImplemented("rolling back a transaction")}setAction(){x4.throwNotImplemented("setting end-to-end attribute 'action'")}setCallTimeout(){x4.throwNotImplemented("setting call timeout")}setClientId(){x4.throwNotImplemented("setting end-to-end attribute 'clientId'")}setClientInfo(){x4.throwNotImplemented("setting end-to-end attribute 'clientInfo'")}setCurrentSchema(){x4.throwNotImplemented("setting the current schema")}setDbOp(){x4.throwNotImplemented("setting end-to-end attribute 'dbOp'")}setECID(){x4.throwNotImplemented("setting end-to-end attribute 'ecid'")}setExternalName(){x4.throwNotImplemented("setting the external name")}setInternalName(){x4.throwNotImplemented("setting the internal name")}setStmtCacheSize(){x4.throwNotImplemented("setting the size of the statement cache")}setModule(){x4.throwNotImplemented("setting end-to-end attribute 'module'")}setTag(){x4.throwNotImplemented("setting the tag for the connection")}shutdown(){x4.throwNotImplemented("shutting down the database instance")}startup(){x4.throwNotImplemented("starting up the database instance")}subscribe(){x4.throwNotImplemented("subscribing to events in the database")}tpcBegin(){x4.throwNotImplemented("starting a two-phase transaction")}tpcCommit(){x4.throwNotImplemented("committing a two-phase transaction")}tpcEnd(){x4.throwNotImplemented("ending a two-phase transaction")}tpcForget(){x4.throwNotImplemented("forgetting a two-phase transaction")}tpcPrepare(){x4.throwNotImplemented("preparing a two-phase transaction")}tpcRollback(){x4.throwNotImplemented("rolling back a two-phase transaction")}unsubscribe(){x4.throwNotImplemented("unsubscribing from events")}getHostName(){x4.throwNotImplemented("getting HostName")}getPort(){x4.throwNotImplemented("getting Port")}getProtocol(){x4.throwNotImplemented("getting Protocol")}}hA1.exports=bA1});var yz0=o((_R5,gA1)=>{var _d6=ua(),nL=E4(),jd6=fA();class fA1 extends jd6{_getConnImpl(){let $=this._parentObj;while(!($ instanceof _d6))$=$._parentObj;return $}close(){nL.throwNotImplemented("closing a LOB")}fileExists(){nL.throwNotImplemented("check if BFILE exists")}getData(){nL.throwNotImplemented("getting all of the data from a LOB")}getDirFileName(){nL.throwNotImplemented("getting directory and filename of LOB(BFILE)")}read(){nL.throwNotImplemented("reading from a LOB")}setDirFileName(){nL.throwNotImplemented("setting directory and filename of LOB(BFILE)")}write(){nL.throwNotImplemented("writing to a LOB")}}gA1.exports=fA1});var bz0=o((jR5,pA1)=>{var QY=E4(),mA1=GY();class uA1{async _accessTokenHandler($,Y,X,G){let J;try{let Q=$(X,G);if(Q instanceof Promise)Q=await Q;if(!mA1.isTokenValid(Q))QY.throwErr(QY.ERR_TOKEN_HAS_EXPIRED);if(typeof Q==="object"&&Q.privateKey!==void 0)Q.privateKey=mA1.denormalizePrivateKey(Q.privateKey);J=Q}finally{this.returnAccessToken(Y,J)}}close(){QY.throwNotImplemented("closing the pool")}create(){QY.throwNotImplemented("creating the pool")}getConnection(){QY.throwNotImplemented("getting a connection from the pool")}getConnectionsInUse(){QY.throwNotImplemented("getting num connection in use")}getConnectionsOpen(){QY.throwNotImplemented("getting num connection open")}getPoolIncrement(){QY.throwNotImplemented("getting the pool increment")}getPoolMax(){QY.throwNotImplemented("getting the pool max")}getPoolMaxPerShard(){QY.throwNotImplemented("getting the pool max per shard")}getPoolMin(){QY.throwNotImplemented("getting the pool min")}getPoolPingInterval(){QY.throwNotImplemented("getting the pool ping interval")}getPoolPingTimeout(){QY.throwNotImplemented("getting the pool ping Timeout")}getPoolTimeout(){QY.throwNotImplemented("getting the pool timeout")}getMaxLifetimeSession(){QY.throwNotImplemented("getting the pool max lifetime")}getStmtCacheSize(){QY.throwNotImplemented("getting the pool statement cache size")}_getConnectTraceConfig(){return{connectString:this._connectString,user:this._user,poolMin:this.getPoolMin(),poolMax:this.getPoolMax(),poolIncrement:this.getPoolIncrement()}}getSodaMetaDataCache(){QY.throwNotImplemented("getting the SODA metadata cache flag")}reconfigure(){QY.throwNotImplemented("reconfiguring the pool")}setAccessToken(){QY.throwNotImplemented("sets the access token")}}pA1.exports=uA1});var hz0=o((TR5,cA1)=>{var Td6=E4();class dA1{constructor(){this._featureFlags={},this._featureFlags.oldJsonColumnAsObj=!1}get oldJsonColumnAsObj(){return this._featureFlags.oldJsonColumnAsObj}set oldJsonColumnAsObj($){Td6.assertPropValue(typeof $==="boolean","oldJsonColumnAsObj"),this._featureFlags.oldJsonColumnAsObj=$}}cA1.exports=new dA1});var aL=o((CR5,iA1)=>{var{Buffer:fz0}=L0("buffer"),{Duplex:Cd6}=L0("stream"),lA1=SY(),h5=E4(),da=GY(),pa=kY();class rL extends Cd6{constructor(){super({decodeStrings:!1});this.offset=1,this._isActive=!1,this.once("finish",function(){if(this._autoCloseLob)this.destroy()})}_checkIsBfile(){if(this.type!==pa.DB_TYPE_BFILE)h5.throwErr(h5.ERR_OPERATION_ONLY_SUPPORTED_ON_BFILE)}_checkNotBfile(){if(this.type===pa.DB_TYPE_BFILE)h5.throwErr(h5.ERR_OPERATION_NOT_SUPPORTED_ON_BFILE)}async _destroy($,Y){if($&&$.message.startsWith("NJS-003:"))delete this._impl;if(this._impl){let X=this._impl;delete this._impl;try{await X.close()}catch(G){Y(G);return}}Y($)}async _read(){try{let $=await this._serializedRead(this.offset);if($)this.offset+=$.length,this.push($);else if(this.push(null),this._autoCloseLob)this.destroy()}catch($){if(this._autoCloseLob)this.destroy($);throw $}}async _readData($){h5.assert(this._impl,h5.ERR_INVALID_LOB);try{return await this._impl.read($)}catch(Y){throw h5.transformErr(Y,this._readData)}}_setup($,Y){if(this._impl=$,this.type!==pa.DB_TYPE_BFILE)this._chunkSize=$.getChunkSize();if(this._pieceSize=$.getPieceSize(),this._length=$.getLength(),this._type=$.getType(),typeof this._type==="number")this._type=pa.getTypeByNum(this._type);this._autoCloseLob=Y}async _write($,Y,X){if(this.type==lA1.DB_TYPE_BLOB&&!fz0.isBuffer($))$=fz0.from($);else if(this.type==lA1.DB_TYPE_CLOB&&fz0.isBuffer($))$=$.toString();try{await this._serializedWrite(this.offset,$)}catch(G){if(this._autoCloseLob)this.destroy(G);X(G);return}this.offset+=$.length,X(null)}async _writeData($,Y){h5.assert(this._impl,h5.ERR_INVALID_LOB);try{await this._impl.write($,Y)}catch(X){throw h5.transformErr(X,this._writeData)}}get chunkSize(){return this._checkNotBfile(),this._chunkSize}async close(){if(h5.assertArgCount(arguments,0,0),this._impl){let $=this._impl;delete this._impl;try{await $.close(),this.emit("close")}catch(Y){this.destroy(Y)}}}async getData($,Y){if(h5.assertArgCount(arguments,0,2),$===void 0)$=1;else h5.assertParamValue(Number.isInteger($)&&$>0,1);if(Y===void 0)Y=0;else h5.assertParamValue(Number.isInteger(Y)&&Y>0,2);return h5.assert(this._impl,h5.ERR_INVALID_LOB),await this._impl.getData($,Y)}getDirFileName(){return this._checkIsBfile(),this._impl.getDirFileName()}setDirFileName($){this._checkIsBfile(),h5.assertArgCount(arguments,1,1),h5.assertParamValue(da.isObject($),1),h5.assertParamValue(Object.hasOwn($,"dirName"),1),h5.assertParamValue(Object.hasOwn($,"fileName"),1),h5.assertPropValue($.dirName!=""&&$.dirName!=null,"dirName"),h5.assertPropValue($.fileName!=""&&$.fileName!=null,"fileName"),this._impl.setDirFileName($)}async fileExists(){return this._checkIsBfile(),await this._impl.fileExists()}get length(){return this._length}get pieceSize(){return this._pieceSize}set pieceSize($){h5.assertPropValue(Number.isInteger($)&&$>=0,"pieceSize"),h5.assert(this._impl,h5.ERR_INVALID_LOB),this._impl.setPieceSize($),this._pieceSize=$}get type(){return this._type}}da.wrapFns(rL.prototype,h5.ERR_BUSY_LOB,"close","fileExists","getData");rL.prototype._serializedRead=da.wrapFn(rL.prototype._readData,!0);rL.prototype._serializedWrite=da.wrapFn(rL.prototype._writeData,!0);iA1.exports=rL});var qx=o((SR5,tA1)=>{var{BaseBuffer:Sd6,GrowableBuffer:mz0}=tq(),{Buffer:GI}=L0("buffer"),N4=Ex(),gA=E4(),XI=kY(),kd6=L0("util"),nA1=ba(),vd6=GY();class rA1 extends Sd6{_decodeContainerNode($){let Y,X,G,J=this.pos-this.treeSegPos-1,Q=this._getNumChildren($),W=($&64)===0;if(Q===void 0){let Z=this._getOffset($);X=this.pos,this.pos=this.treeSegPos+Z;let K=this.readUInt8();Q=this._getNumChildren(K),Y=W?{}:Array(Q),G=this.pos}else if(W)Y={},G=this.pos,X=this.pos+this.fieldIdLength*Q;else Y=Array(Q),X=this.pos;for(let Z=0;Z<Q;Z++){let K;if(W){let z;if(this.fieldIdLength===1)z=this.buf[G];else if(this.fieldIdLength==2)z=this.buf.readUInt16BE(G);else z=this.buf.readUInt32BE(G);K=this.fieldNames[z-1],G+=this.fieldIdLength}this.pos=X;let H=this._getOffset($);if(this.relativeOffsets)H+=J;if(X=this.pos,this.pos=this.treeSegPos+H,W)Y[K]=this._decodeNode();else Y[Z]=this._decodeNode()}return Y}_decodeNode(){let $=this.readUInt8();if($&128)return this._decodeContainerNode($);if($===N4.TNS_JSON_TYPE_NULL)return null;else if($===N4.TNS_JSON_TYPE_TRUE)return!0;else if($===N4.TNS_JSON_TYPE_FALSE)return!1;else if($===N4.TNS_JSON_TYPE_DATE||$===N4.TNS_JSON_TYPE_TIMESTAMP7)return this.parseOracleDate(this.readBytes(7));else if($===N4.TNS_JSON_TYPE_TIMESTAMP)return this.parseOracleDate(this.readBytes(11));else if($===N4.TNS_JSON_TYPE_TIMESTAMP_TZ)return this.parseOracleDate(this.readBytes(13));else if($===N4.TNS_JSON_TYPE_BINARY_FLOAT)return this.parseBinaryFloat(this.readBytes(4));else if($===N4.TNS_JSON_TYPE_BINARY_DOUBLE)return this.parseBinaryDouble(this.readBytes(8));else if($===N4.TNS_JSON_TYPE_INTERVAL_YM)return this.parseOracleIntervalYM(this.readBytes(5));else if($===N4.TNS_JSON_TYPE_INTERVAL_DS)return this.parseOracleIntervalDS(this.readBytes(11));else if($===N4.TNS_JSON_TYPE_STRING_LENGTH_UINT8)return this.readBytes(this.readUInt8()).toString();else if($===N4.TNS_JSON_TYPE_STRING_LENGTH_UINT16)return this.readBytes(this.readUInt16BE()).toString();else if($===N4.TNS_JSON_TYPE_STRING_LENGTH_UINT32)return this.readBytes(this.readUInt32BE()).toString();else if($===N4.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8)return parseFloat(this.readOracleNumber());else if($===N4.TNS_JSON_TYPE_ID){let X=this.readBytes(this.readUInt8()),G=new XI.JsonId(X.length);return X.copy(G),G}else if($===N4.TNS_JSON_TYPE_BINARY_LENGTH_UINT16)return GI.from(this.readBytes(this.readUInt16BE()));else if($===N4.TNS_JSON_TYPE_BINARY_LENGTH_UINT32)return GI.from(this.readBytes(this.readUInt32BE()));else if($===N4.TNS_JSON_TYPE_EXTENDED){if($=this.readUInt8(),$===N4.TNS_JSON_TYPE_VECTOR){let X=this.readBytes(this.readUInt32BE());return new nA1.VectorDecoder(X).decode()}}let Y=$&240;if(Y===32||Y===96){let X=$&15;return parseFloat(this.parseOracleNumber(this.readBytes(X+1)))}else if(Y===64||Y===80){let X=$&15;return parseFloat(this.parseOracleNumber(this.readBytes(X)))}else if(($&224)==0){if($===0)return"";return this.readBytes($).toString()}gA.throwErr(gA.ERR_UNSUPPORTED_DATA_TYPE_IN_JSON,$)}_getNumChildren($){let Y=$&24;if(Y===0)return this.readUInt8();else if(Y===8)return this.readUInt16BE();else if(Y===16)return this.readUInt32BE()}_getOffset($){if($&32)return this.readUInt32BE();else return this.readUInt16BE()}_getFieldNames($,Y,X,G,J){this.skipBytes(Y*J);let Q=this.pos;this.skipBytes(Y*X);let W=this.readBytes(G),Z=this.pos;this.pos=Q;let K;for(let H=$;H<$+Y;H++){if(X===2)K=this.readUInt16BE();else K=this.readUInt32BE();let z;if(J===1)z=W.readUInt8(K);else z=W.readUInt16BE(K);this.fieldNames[H]=W.subarray(K+J,K+z+J).toString()}this.pos=Z}decode(){let $=this.readBytes(3);if($[0]!==N4.TNS_JSON_MAGIC_BYTE_1||$[1]!==N4.TNS_JSON_MAGIC_BYTE_2||$[2]!==N4.TNS_JSON_MAGIC_BYTE_3)gA.throwErr(gA.ERR_UNEXPECTED_DATA,$.toString("hex"));let Y=this.readUInt8();if(Y!==N4.TNS_JSON_VERSION_MAX_FNAME_255&&Y!==N4.TNS_JSON_VERSION_MAX_FNAME_65535)gA.throwErr(gA.ERR_OSON_VERSION_NOT_SUPPORTED,Y);let X=this.readUInt16BE();if(this.relativeOffsets=X&N4.TNS_JSON_FLAG_REL_OFFSET_MODE,X&N4.TNS_JSON_FLAG_IS_SCALAR){if(X&N4.TNS_JSON_FLAG_TREE_SEG_UINT32)this.skipBytes(4);else this.skipBytes(2);return this._decodeNode()}let G;if(X&N4.TNS_JSON_FLAG_NUM_FNAMES_UINT32)G=this.readUInt32BE(),this.fieldIdLength=4;else if(X&N4.TNS_JSON_FLAG_NUM_FNAMES_UINT16)G=this.readUInt16BE(),this.fieldIdLength=2;else G=this.readUInt8(),this.fieldIdLength=1;let J,Q;if(X&N4.TNS_JSON_FLAG_FNAMES_SEG_UINT32)J=4,Q=this.readUInt32BE();else J=2,Q=this.readUInt16BE();let W,Z,K=0;if(Y===N4.TNS_JSON_VERSION_MAX_FNAME_65535){if(this.readUInt16BE()&N4.TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16)W=2;else W=4;K=this.readUInt32BE(),Z=this.readUInt32BE()}if(X&N4.TNS_JSON_FLAG_TREE_SEG_UINT32)this.skipBytes(4);else this.skipBytes(2);if(this.skipBytes(2),this.fieldNames=Array(G+K),G>0)this._getFieldNames(0,G,J,Q,1);if(K>0)this._getFieldNames(G,K,W,Z,2);return this.treeSegPos=this.pos,this._decodeNode()}}class aA1{constructor($,Y){if(this.name=$,this.nameBytes=GI.from($),this.nameBytes.length>Y)gA.throwErr(gA.ERR_OSON_FIELD_NAME_LIMITATION,Y);let X=0x811C9DC5n,G=16777619n,J=0xffffffffn;this.hashId=X;for(let Q=0;Q<this.nameBytes.length;Q++){let W=BigInt(this.nameBytes[Q]);this.hashId=(this.hashId^W)*G&J}this.hashId=Number(this.hashId)&255}}class gz0 extends mz0{constructor(){super();this.fieldNames=[]}addName($){if($.offset=this.pos,$.nameBytes.length<=255)this.writeUInt8($.nameBytes.length);else this.writeUInt16BE($.nameBytes.length);this.writeBytes($.nameBytes),this.fieldNames.push($)}_processFieldNames($){this.fieldNames.sort((Y,X)=>{if(Y.hashId<X.hashId)return-1;if(Y.hashId>X.hashId)return 1;if(Y.nameBytes.length<X.nameBytes.length)return-1;if(Y.nameBytes.length>X.nameBytes.length)return 1;if(Y.name<X.name)return-1;if(Y.name>X.name)return 1;return 0});for(let Y=0;Y<this.fieldNames.length;Y++)this.fieldNames[Y].fieldId=$+Y+1;if(this.fieldNames.length<256)this.fieldIdSize=1;else if(this.fieldNames.length<65536)this.fieldIdSize=2;else this.fieldIdSize=4}}class sA1 extends mz0{_encodeArray($,Y){this._encodeContainer(N4.TNS_JSON_TYPE_ARRAY,$.length);let X=$.length*4,J=this.reserveBytes(X);for(let Q of $)this.buf.writeUInt32BE(this.pos,J),J+=4,this.encodeNode(Q,Y)}_encodeContainer($,Y){if($|=32,Y>65535)$|=16;else if(Y>255)$|=8;if(this.writeUInt8($),Y<256)this.writeUInt8(Y);else if(Y<65536)this.writeUInt16BE(Y);else this.writeUInt32BE(Y)}_encodeObject($,Y){let X=$.values.length;this._encodeContainer(N4.TNS_JSON_TYPE_OBJECT,X);let G=this.pos,J=this.pos+X*Y.fieldIdSize,Q=J+X*4;this.reserveBytes(Q-this.pos);for(let W=0;W<$.fields.length;W++){let Z=Y.fieldNamesMap.get($.fields[W]);if(Y.fieldIdSize==1)this.buf[G]=Z.fieldId;else if(Y.fieldIdSize==2)this.buf.writeUInt16BE(Z.fieldId,G);else this.buf.writeUInt32BE(Z.fieldId,G);this.buf.writeUInt32BE(this.pos,J),G+=Y.fieldIdSize,J+=4,this.encodeNode($.values[W],Y)}}encodeNode($,Y){if($===void 0||$===null)this.writeUInt8(N4.TNS_JSON_TYPE_NULL);else if(typeof $==="boolean")if($)this.writeUInt8(N4.TNS_JSON_TYPE_TRUE);else this.writeUInt8(N4.TNS_JSON_TYPE_FALSE);else if(typeof $==="number")if(Number.isNaN($))this.writeUInt8(N4.TNS_JSON_TYPE_BINARY_DOUBLE),this.writeBinaryDouble($);else this.writeUInt8(N4.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8),this.writeOracleNumber($.toString());else if(typeof $==="string"){let X=GI.from($);if(X.length<256)this.writeUInt8(N4.TNS_JSON_TYPE_STRING_LENGTH_UINT8),this.writeUInt8(X.length);else if(X.length<65536)this.writeUInt8(N4.TNS_JSON_TYPE_STRING_LENGTH_UINT16),this.writeUInt16BE(X.length);else this.writeUInt8(N4.TNS_JSON_TYPE_STRING_LENGTH_UINT32),this.writeUInt32BE(X.length);if(X.length>0)this.writeBytes(X)}else if(kd6.types.isDate($))if($.getUTCMilliseconds()===0)this.writeUInt8(N4.TNS_JSON_TYPE_TIMESTAMP7),this.writeOracleDate($,XI.DB_TYPE_DATE,!1);else this.writeUInt8(N4.TNS_JSON_TYPE_TIMESTAMP),this.writeOracleDate($,XI.DB_TYPE_TIMESTAMP,!1);else if($ instanceof XI.IntervalYM)this.writeUInt8(N4.TNS_JSON_TYPE_INTERVAL_YM),this.writeOracleIntervalYM($,!1);else if($ instanceof XI.IntervalDS)this.writeUInt8(N4.TNS_JSON_TYPE_INTERVAL_DS),this.writeOracleIntervalDS($,!1);else if(GI.isBuffer($)){if($.length<65536)this.writeUInt8(N4.TNS_JSON_TYPE_BINARY_LENGTH_UINT16),this.writeUInt16BE($.length);else this.writeUInt8(N4.TNS_JSON_TYPE_BINARY_LENGTH_UINT32),this.writeUInt32BE($.length);this.writeBytes($)}else if(Array.isArray($))this._encodeArray($,Y);else if(vd6.isVectorValue($)){this.writeUInt8(N4.TNS_JSON_TYPE_EXTENDED),this.writeUInt8(N4.TNS_JSON_TYPE_VECTOR);let G=new nA1.VectorEncoder().encode($);this.writeUInt32BE(G.length),this.writeBytes(G)}else if($ instanceof XI.JsonId)this.writeUInt8(N4.TNS_JSON_TYPE_ID),this.writeUInt8($.length),this.writeBytes(GI.from($.buffer));else this._encodeObject($,Y)}}class oA1 extends mz0{_addFieldName($){let Y=new aA1($,this.maxFieldNameSize);if(this.fieldNamesMap.set($,Y),Y.nameBytes.length<=255)this.shortFieldNamesSeg.addName(Y);else{if(!this.longFieldNamesSeg)this.longFieldNamesSeg=new gz0;this.longFieldNamesSeg.addName(Y)}}_examineNode($){if(Array.isArray($))for(let Y of $)this._examineNode(Y);else if($&&Array.isArray($.fields))for(let Y=0;Y<$.fields.length;Y++){let X=$.fields[Y],G=$.values[Y];if(!this.fieldNamesMap.has(X))this._addFieldName(X);this._examineNode(G)}}_writeExtendedHeader(){if(this.fieldIdSize===1)this.writeUInt8(this.shortFieldNamesSeg.fieldNames.length);else if(this.fieldIdSize===2)this.writeUInt16BE(this.shortFieldNamesSeg.fieldNames.length);else this.writeUInt32BE(this.shortFieldNamesSeg.fieldNames.length);if(this.shortFieldNamesSeg.pos<65536)this.writeUInt16BE(this.shortFieldNamesSeg.pos);else this.writeUInt32BE(this.shortFieldNamesSeg.pos);if(this.longFieldNamesSeg){let $=0;if(this.longFieldNamesSeg.pos<65536)$=N4.TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16;this.writeUInt16BE($),this.writeUInt32BE(this.longFieldNamesSeg.fieldNames.length),this.writeUInt32BE(this.longFieldNamesSeg.pos)}}_writeFieldNamesSeg($){for(let Y of $.fieldNames)if(Y.nameBytes.length<=255)this.writeUInt8(Y.hashId);else this.writeUInt16BE(Y.hashId);for(let Y of $.fieldNames)if($.pos<65536)this.writeUInt16BE(Y.offset);else this.writeUInt32BE(Y.offset);if($.pos>0)this.writeBytes($.buf.subarray(0,$.pos))}encode($,Y){this.maxFieldNameSize=Y;let X=N4.TNS_JSON_FLAG_INLINE_LEAF;if(Array.isArray($)||$&&Array.isArray($.fields)){this.fieldNamesMap=new Map,this.shortFieldNamesSeg=new gz0,this._examineNode($);let J=0;if(this.shortFieldNamesSeg)this.shortFieldNamesSeg._processFieldNames(0),J+=this.shortFieldNamesSeg.fieldNames.length;if(this.longFieldNamesSeg)this.longFieldNamesSeg._processFieldNames(J),J+=this.longFieldNamesSeg.fieldNames.length;if(X|=N4.TNS_JSON_FLAG_HASH_ID_UINT8|N4.TNS_JSON_FLAG_TINY_NODES_STAT,J>65535)X|=N4.TNS_JSON_FLAG_NUM_FNAMES_UINT32,this.fieldIdSize=4;else if(J>255)X|=N4.TNS_JSON_FLAG_NUM_FNAMES_UINT16,this.fieldIdSize=2;else this.fieldIdSize=1;if(this.shortFieldNamesSeg.pos>65535)X|=N4.TNS_JSON_FLAG_FNAMES_SEG_UINT32}else X|=N4.TNS_JSON_FLAG_IS_SCALAR;let G=new sA1;if(G.encodeNode($,this),G.pos>65535)X|=N4.TNS_JSON_FLAG_TREE_SEG_UINT32;if(this.writeUInt8(N4.TNS_JSON_MAGIC_BYTE_1),this.writeUInt8(N4.TNS_JSON_MAGIC_BYTE_2),this.writeUInt8(N4.TNS_JSON_MAGIC_BYTE_3),this.longFieldNamesSeg)this.writeUInt8(N4.TNS_JSON_VERSION_MAX_FNAME_65535);else this.writeUInt8(N4.TNS_JSON_VERSION_MAX_FNAME_255);if(this.writeUInt16BE(X),this.shortFieldNamesSeg)this._writeExtendedHeader();if(G.pos<65536)this.writeUInt16BE(G.pos);else this.writeUInt32BE(G.pos);if(this.shortFieldNamesSeg){if(this.writeUInt16BE(0),this._writeFieldNamesSeg(this.shortFieldNamesSeg),this.longFieldNamesSeg)this._writeFieldNamesSeg(this.longFieldNamesSeg)}return this.writeBytes(G.buf.subarray(0,G.pos)),this.buf.subarray(0,this.pos)}}tA1.exports={OsonDecoder:rA1,OsonEncoder:oA1}});var uz0=o((kR5,XF1)=>{var xd6=SY(),XU=E4(),yd6=GY(),eA1=wZ(),bd6=hz0(),O$=kY(),$F1=aL(),hd6=qx(),fd6=fA();class YF1 extends fd6{_determineFetchType($,Y,X){if(delete $.fetchType,delete $.converter,Y.fetchTypeHandler){let Q=Y.fetchTypeHandler($,X);if(Q!==void 0){if(XU.assert(typeof Q==="object",XU.ERR_FETCH_TYPE_HANDLER_RETURN_VALUE),Q.type!==void 0)XU.assert(Q.type instanceof O$.DbType,XU.ERR_FETCH_TYPE_HANDLER_TYPE);if(Q.converter!==void 0)XU.assert(typeof Q.converter==="function",XU.ERR_FETCH_TYPE_HANDLER_CONVERTER);$.fetchType=Q.type,$.converter=Q.converter}}if(!$.fetchType)if(Y.fetchTypeMap&&Y.fetchTypeMap.has($.name)){if($.fetchType=Y.fetchTypeMap.get($.name),$.fetchType===xd6.DEFAULT)$.fetchType=O$.DB_TYPE_FETCH_TYPE_MAP.get($.dbType)}else $.fetchType=eA1.fetchTypeMap.get($.dbType);if($.fetchType!==$.dbType){let Q=O$.DB_TYPE_CONVERSION_MAP.get($.dbType),W=Q&&Q.get($.fetchType);if(!W)XU.throwErr(XU.ERR_UNSUPPORTED_CONVERSION,$.dbType.name,$.fetchType.name);$.fetchType=W}let G,J=$.converter;if($.dbType!==O$.DB_TYPE_JSON&&bd6.oldJsonColumnAsObj&&J===void 0){let Q;if($.isOson)Q=async function(W){if(!W)return W;let Z=W;if(W instanceof $F1)Z=await W.getData();return new hd6.OsonDecoder(Z).decode()},G=Q;else if($.isJson)Q=async function(W){if(!W)return W;let Z=W;if(W instanceof $F1)Z=await W.getData();if(Z instanceof Buffer)Z=Z.toString();return Z=JSON.parse(Z),Z},G=Q}if(eA1.thin){if($.dbType===O$.DB_TYPE_NUMBER&&$.fetchType===O$.DB_TYPE_NUMBER)G=(Q)=>Q===null?null:parseFloat(Q);else if($.fetchType===O$.DB_TYPE_VARCHAR){if($.dbType===O$.DB_TYPE_BINARY_DOUBLE||$.dbType===O$.DB_TYPE_BINARY_FLOAT||$.dbType===O$.DB_TYPE_DATE||$.dbType===O$.DB_TYPE_TIMESTAMP||$.dbType===O$.DB_TYPE_TIMESTAMP_LTZ||$.dbType===O$.DB_TYPE_TIMESTAMP_TZ)G=(Q)=>Q===null?null:Q.toString();else if($.dbType===O$.DB_TYPE_RAW)G=(Q)=>Q===null?null:Q.toString("hex").toUpperCase()}else if($.dbType===O$.DB_TYPE_XMLTYPE)G=async function(W){if(!W)return W;if(typeof W==="string")return W;return await W.getData()};if(J&&G){let Q=G;G=(W)=>J(Q(W))}}if(G)$.converter=G}_getConnImpl(){return this._parentObj}_setup($,Y){this._parentObj=$.connection._impl,this.metaData=Y,this.lobIndices=[],this.dbObjectIndices=[],this.nestedCursorIndices=[],this.converterIndices=[],this.outFormat=$.outFormat,this.fetchArraySize=$.fetchArraySize,this.dbObjectAsPojo=$.dbObjectAsPojo,this.maxRows=$.maxRows;let X=new Map;for(let G=0;G<Y.length;G++){let J=Y[G].name;if(!X.has(J))X.set(J,G)}for(let G=0;G<Y.length;G++){let J=Y[G];if(J.dbTypeClass){let W=$.connection._getDbObjectClass(J.dbTypeClass);J.dbTypeClass=W}if(yd6.addTypeProperties(J,"dbType"),this._determineFetchType(J,$,Y),J.fetchType===O$.DB_TYPE_CURSOR)this.nestedCursorIndices.push(G);else if(J.fetchType===O$.DB_TYPE_CLOB||J.fetchType===O$.DB_TYPE_NCLOB||J.fetchType===O$.DB_TYPE_BLOB||J.fetchType===O$.DB_TYPE_BFILE)this.lobIndices.push(G);else if(J.fetchType===O$.DB_TYPE_OBJECT)this.dbObjectIndices.push(G);if(J.converter)this.converterIndices.push(G);let Q=J.name;if(X.get(Q)!==G){let W=0;while(X.has(Q))W=W+1,Q=`${J.name}_${W}`;X.set(Q,G),J.name=Q}}}close(){XU.throwNotImplemented("closing a result set")}getRows(){XU.throwNotImplemented("getting rows")}async _getAllRows(){let Y=[];while(!0){let X=await this.getRows(100,{});if(X)await this._processRows(X,!1),Y=Y.concat(X);if(X.length<100)break}return Y}}XF1.exports=YF1});var QF1=o((vR5,JF1)=>{var aJ=E4(),gd6=fA();class GF1 extends gd6{_getConnImpl(){return this._database._connection}createIndex(){aJ.throwNotImplemented("creating an index on a SODA collection")}drop(){aJ.throwNotImplemented("dropping a SODA collection")}dropIndex(){aJ.throwNotImplemented("dropping an index on a SODA collection")}find(){aJ.throwNotImplemented("creating a SODA operation")}getDataGuide(){aJ.throwNotImplemented("getting the data guide for the collection")}getMetaData(){aJ.throwNotImplemented("getting the metadata for the collection")}getName(){aJ.throwNotImplemented("getting the name of the collection")}insertMany(){aJ.throwNotImplemented("inserting multiple docs into a collection")}insertManyAndGet(){aJ.throwNotImplemented("insert/return many docs in a collection")}insertOne(){aJ.throwNotImplemented("inserting a single doc into a collection")}insertOneAndGet(){aJ.throwNotImplemented("insert/return a single doc in a collection")}save(){aJ.throwNotImplemented("saving a single doc in a collection")}saveAndGet(){aJ.throwNotImplemented("saving a single doc in a collection")}truncate(){aJ.throwNotImplemented("removing all docs from a collection")}}JF1.exports=GF1});var KF1=o((xR5,ZF1)=>{var ca=E4(),md6=fA();class WF1 extends md6{_getConnImpl(){return this._connection}createCollection(){ca.throwNotImplemented("creating a SODA collection")}createDocument(){ca.throwNotImplemented("creating a SODA document")}getCollectionNames(){ca.throwNotImplemented("getting a list of SODA collection names")}openCollection(){ca.throwNotImplemented("getting a list of SODA collection names")}}ZF1.exports=WF1});var VF1=o((yR5,zF1)=>{var UF1=E4(),ud6=fA();class HF1 extends ud6{_getConnImpl(){return this._operation._getConnImpl()}close(){UF1.throwNotImplemented("closing a SODA document cursor")}getNext(){UF1.throwNotImplemented("getting a document from a SODA doc cursor")}}zF1.exports=HF1});var DF1=o((bR5,FF1)=>{var JI=E4();class AF1{getContent(){JI.throwNotImplemented("getting doc content")}getCreatedOn(){JI.throwNotImplemented("getting the created date of a document")}getKey(){JI.throwNotImplemented("getting the key of a document")}getLastModified(){JI.throwNotImplemented("getting the last modified date of a doc")}getMediaType(){JI.throwNotImplemented("getting the media type of a document")}getVersion(){JI.throwNotImplemented("getting the version of a document")}}FF1.exports=AF1});var BF1=o((hR5,LF1)=>{var sL=E4(),pd6=fA();class NF1 extends pd6{_getConnImpl(){return this._collection._database._connection}count(){sL.throwNotImplemented("getting a count of documents")}getCursor(){sL.throwNotImplemented("getting a cursor for documents")}getDocuments(){sL.throwNotImplemented("getting a cursor for documents")}getOne(){sL.throwNotImplemented("getting a single document")}remove(){sL.throwNotImplemented("removing documents from a collection")}replaceOne(){sL.throwNotImplemented("replacing a single document")}replaceOneAndGet(){sL.throwNotImplemented("replacing/returning a single document")}}LF1.exports=NF1});var QI=o((fR5,OF1)=>{var dd6=MA1(),cd6=IA1(),ld6=_A1(),id6=kA1(),nd6=ma(),rd6=ua(),ad6=yz0(),sd6=bz0(),od6=uz0(),td6=QF1(),ed6=KF1(),$c6=VF1(),Yc6=DF1(),Xc6=BF1();OF1.exports={AqDeqOptionsImpl:dd6,AqEnqOptionsImpl:cd6,AqMessageImpl:ld6,AqQueueImpl:id6,DbObjectImpl:nd6,ConnectionImpl:rd6,LobImpl:ad6,PoolImpl:sd6,ResultSetImpl:od6,SodaCollectionImpl:td6,SodaDatabaseImpl:ed6,SodaDocCursorImpl:$c6,SodaDocumentImpl:Yc6,SodaOperationImpl:Xc6}});var pz0=o((gR5,MF1)=>{var{Buffer:Gc6}=L0("buffer"),_Z=SY(),GU=E4();class EF1{get condition(){return this._impl.getCondition()}set condition($){GU.assertPropValue(typeof $==="string","condition"),this._impl.setCondition($)}get consumerName(){return this._impl.getConsumerName()}set consumerName($){GU.assertPropValue(typeof $==="string","consumerName"),this._impl.setConsumerName($)}get correlation(){return this._impl.getCorrelation()}set correlation($){GU.assertPropValue(typeof $==="string","correlation"),this._impl.setCorrelation($)}get deliveryMode(){return null}set deliveryMode($){GU.assertPropValue($===_Z.AQ_MSG_DELIV_MODE_PERSISTENT||$===_Z.AQ_MSG_DELIV_MODE_BUFFERED||$===_Z.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,"deliveryMode"),this._impl.setDeliveryMode($)}get mode(){return this._impl.getMode()}set mode($){GU.assertPropValue($===_Z.AQ_DEQ_MODE_BROWSE||$===_Z.AQ_DEQ_MODE_LOCKED||$===_Z.AQ_DEQ_MODE_REMOVE||$===_Z.AQ_DEQ_MODE_REMOVE_NO_DATA,"mode"),this._impl.setMode($)}get msgId(){return this._impl.getMsgId()}set msgId($){GU.assertPropValue(Gc6.isBuffer($),"msgId"),this._impl.setMsgId($)}get navigation(){return this._impl.getNavigation()}set navigation($){GU.assertPropValue($===_Z.AQ_DEQ_NAV_FIRST_MSG||$===_Z.AQ_DEQ_NAV_NEXT_TRANSACTION||$===_Z.AQ_DEQ_NAV_NEXT_MSG,"navigation"),this._impl.setNavigation($)}get transformation(){return this._impl.getTransformation()}set transformation($){GU.assertPropValue(typeof $==="string","transformation"),this._impl.setTransformation($)}get visibility(){return this._impl.getVisibility()}set visibility($){GU.assertPropValue($===_Z.AQ_VISIBILITY_IMMEDIATE||$===_Z.AQ_VISIBILITY_ON_COMMIT,"visibility"),this._impl.setVisibility($)}get wait(){return this._impl.getWait()}set wait($){GU.assertPropValue(Number.isInteger($)&&$>=0,"wait"),this._impl.setWait($)}}MF1.exports=EF1});var cz0=o((mR5,qF1)=>{var Ix=SY(),dz0=E4();class RF1{get deliveryMode(){return this._impl.getDeliveryMode()}set deliveryMode($){dz0.assertPropValue($===Ix.AQ_MSG_DELIV_MODE_PERSISTENT||$===Ix.AQ_MSG_DELIV_MODE_BUFFERED||$===Ix.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,"deliveryMode"),this._impl.setDeliveryMode($)}get transformation(){return this._impl.getTransformation()}set transformation($){dz0.assertPropValue(typeof $==="string","transformation"),this._impl.setTransformation($)}get visibility(){return this._impl.getVisibility()}set visibility($){dz0.assertPropValue($===Ix.AQ_VISIBILITY_IMMEDIATE||$===Ix.AQ_VISIBILITY_ON_COMMIT,"visibility"),this._impl.setVisibility($)}}qF1.exports=RF1});var lz0=o((uR5,PF1)=>{var Jc6=ma();class IF1{get correlation(){return this._impl.getCorrelation()}get delay(){return this._impl.getDelay()}get enqTime(){return this._impl.getEnqTime()}get deliveryMode(){return this._impl.getDeliveryMode()}get exceptionQueue(){return this._impl.getExceptionQueue()}get expiration(){return this._impl.getExpiration()}get msgId(){return this._impl.getMsgId()}get numAttempts(){return this._impl.getNumAttempts()}get originalMsgId(){return this._impl.getOriginalMsgId()}get payload(){let $=this._impl.getPayload();if($ instanceof Jc6){let Y=Object.create(this._payloadTypeClass.prototype);return Y._impl=$,Y}return $}get priority(){return this._impl.getPriority()}get state(){return this._impl.getState()}}PF1.exports=IF1});var E9=o((pR5,jF1)=>{var{Buffer:wF1}=L0("buffer"),r7=SY(),_F1=Ex();jF1.exports={BIND_IN:r7.BIND_IN,BIND_INOUT:r7.BIND_INOUT,BIND_OUT:r7.BIND_OUT,CLIENT_VERSION:r7.VERSION_MAJOR<<24|r7.VERSION_MINOR<<20|r7.VERSION_PATCH<<12,CSFRM_IMPLICIT:r7.CSFRM_IMPLICIT,CSFRM_NCHAR:r7.CSFRM_NCHAR,DRIVER_NAME:r7.DEFAULT_DRIVER_NAME+" thn",PURITY_DEFAULT:r7.PURITY_DEFAULT,PURITY_NEW:r7.PURITY_NEW,PURITY_SELF:r7.PURITY_SELF,SYSASM:r7.SYSASM,SYSBKP:r7.SYSBACKUP,SYSDBA:r7.SYSDBA,SYSDG:r7.SYSDG,SYSKM:r7.SYSKM,SYSOPER:r7.SYSOPER,SYSRAC:r7.SYSRAC,AUTH_MODE_DEFAULT:0,AUTH_MODE_PRELIM:8,AUTH_MODE_SYSASM:32768,AUTH_MODE_SYSBKP:131072,AUTH_MODE_SYSDBA:2,AUTH_MODE_SYSDGD:262144,AUTH_MODE_SYSKMT:524288,AUTH_MODE_SYSOPER:4,AUTH_MODE_SYSRAC:1048576,TNS_AUTH_MODE_LOGON:1,TNS_AUTH_MODE_CHANGE_PASSWORD:2,TNS_AUTH_MODE_SYSDBA:32,TNS_AUTH_MODE_SYSOPER:64,TNS_AUTH_MODE_PRELIM:128,TNS_AUTH_MODE_WITH_PASSWORD:256,TNS_AUTH_MODE_SYSASM:4194304,TNS_AUTH_MODE_SYSBKP:16777216,TNS_AUTH_MODE_SYSDGD:33554432,TNS_AUTH_MODE_SYSKMT:67108864,TNS_AUTH_MODE_SYSRAC:134217728,TNS_AUTH_MODE_IAM_TOKEN:536870912,TNS_PACKET_TYPE_CONNECT:1,TNS_PACKET_TYPE_ACCEPT:2,TNS_PACKET_TYPE_REFUSE:4,TNS_PACKET_TYPE_REDIRECT:5,TNS_PACKET_TYPE_DATA:6,TNS_PACKET_TYPE_RESEND:11,TNS_PACKET_TYPE_MARKER:12,TNS_PACKET_TYPE_CONTROL:14,TNS_DATA_TYPE_DEFAULT:0,TNS_DATA_TYPE_VARCHAR:1,TNS_DATA_TYPE_NUMBER:2,TNS_DATA_TYPE_BINARY_INTEGER:3,TNS_DATA_TYPE_FLOAT:4,TNS_DATA_TYPE_STR:5,TNS_DATA_TYPE_VNU:6,TNS_DATA_TYPE_PDN:7,TNS_DATA_TYPE_LONG:8,TNS_DATA_TYPE_VCS:9,TNS_DATA_TYPE_TIDDEF:10,TNS_DATA_TYPE_ROWID:11,TNS_DATA_TYPE_DATE:12,TNS_DATA_TYPE_VBI:15,TNS_DATA_TYPE_RAW:23,TNS_DATA_TYPE_LONG_RAW:24,TNS_DATA_TYPE_UB2:25,TNS_DATA_TYPE_UB4:26,TNS_DATA_TYPE_SB1:27,TNS_DATA_TYPE_SB2:28,TNS_DATA_TYPE_SB4:29,TNS_DATA_TYPE_SWORD:30,TNS_DATA_TYPE_UWORD:31,TNS_DATA_TYPE_PTRB:32,TNS_DATA_TYPE_PTRW:33,TNS_DATA_TYPE_OER8:290,TNS_DATA_TYPE_FUN:291,TNS_DATA_TYPE_AUA:292,TNS_DATA_TYPE_RXH7:293,TNS_DATA_TYPE_NA6:294,TNS_DATA_TYPE_OAC9:39,TNS_DATA_TYPE_AMS:40,TNS_DATA_TYPE_BRN:41,TNS_DATA_TYPE_BRP:298,TNS_DATA_TYPE_BRV:299,TNS_DATA_TYPE_KVA:300,TNS_DATA_TYPE_CLS:301,TNS_DATA_TYPE_CUI:302,TNS_DATA_TYPE_DFN:303,TNS_DATA_TYPE_DQR:304,TNS_DATA_TYPE_DSC:305,TNS_DATA_TYPE_EXE:306,TNS_DATA_TYPE_FCH:307,TNS_DATA_TYPE_GBV:308,TNS_DATA_TYPE_GEM:309,TNS_DATA_TYPE_GIV:310,TNS_DATA_TYPE_OKG:311,TNS_DATA_TYPE_HMI:312,TNS_DATA_TYPE_INO:313,TNS_DATA_TYPE_LNF:315,TNS_DATA_TYPE_ONT:316,TNS_DATA_TYPE_OPE:317,TNS_DATA_TYPE_OSQ:318,TNS_DATA_TYPE_SFE:319,TNS_DATA_TYPE_SPF:320,TNS_DATA_TYPE_VSN:321,TNS_DATA_TYPE_UD7:322,TNS_DATA_TYPE_DSA:323,TNS_DATA_TYPE_UIN:68,TNS_DATA_TYPE_PIN:327,TNS_DATA_TYPE_PFN:328,TNS_DATA_TYPE_PPT:329,TNS_DATA_TYPE_STO:331,TNS_DATA_TYPE_ARC:333,TNS_DATA_TYPE_MRS:334,TNS_DATA_TYPE_MRT:335,TNS_DATA_TYPE_MRG:336,TNS_DATA_TYPE_MRR:337,TNS_DATA_TYPE_MRC:338,TNS_DATA_TYPE_VER:339,TNS_DATA_TYPE_LON2:340,TNS_DATA_TYPE_INO2:341,TNS_DATA_TYPE_ALL:342,TNS_DATA_TYPE_UDB:343,TNS_DATA_TYPE_AQI:344,TNS_DATA_TYPE_ULB:345,TNS_DATA_TYPE_ULD:346,TNS_DATA_TYPE_SLS:91,TNS_DATA_TYPE_SID:348,TNS_DATA_TYPE_NA7:349,TNS_DATA_TYPE_LVC:94,TNS_DATA_TYPE_LVB:95,TNS_DATA_TYPE_CHAR:96,TNS_DATA_TYPE_AVC:97,TNS_DATA_TYPE_AL7:354,TNS_DATA_TYPE_K2RPC:355,TNS_DATA_TYPE_BINARY_FLOAT:100,TNS_DATA_TYPE_BINARY_DOUBLE:101,TNS_DATA_TYPE_CURSOR:102,TNS_DATA_TYPE_RDD:104,TNS_DATA_TYPE_XDP:359,TNS_DATA_TYPE_OSL:106,TNS_DATA_TYPE_OKO8:363,TNS_DATA_TYPE_EXT_NAMED:108,TNS_DATA_TYPE_INT_NAMED:109,TNS_DATA_TYPE_EXT_REF:110,TNS_DATA_TYPE_INT_REF:111,TNS_DATA_TYPE_CLOB:112,TNS_DATA_TYPE_BLOB:113,TNS_DATA_TYPE_BFILE:114,TNS_DATA_TYPE_CFILE:115,TNS_DATA_TYPE_RSET:116,TNS_DATA_TYPE_CWD:117,TNS_DATA_TYPE_JSON:119,TNS_DATA_TYPE_OAC122:120,TNS_DATA_TYPE_UD12:380,TNS_DATA_TYPE_AL8:381,TNS_DATA_TYPE_LFOP:382,TNS_DATA_TYPE_VECTOR:127,TNS_DATA_TYPE_FCRT:383,TNS_DATA_TYPE_DNY:384,TNS_DATA_TYPE_OPR:385,TNS_DATA_TYPE_PLS:386,TNS_DATA_TYPE_XID:387,TNS_DATA_TYPE_TXN:388,TNS_DATA_TYPE_DCB:389,TNS_DATA_TYPE_CCA:390,TNS_DATA_TYPE_WRN:391,TNS_DATA_TYPE_TLH:393,TNS_DATA_TYPE_TOH:394,TNS_DATA_TYPE_FOI:395,TNS_DATA_TYPE_SID2:396,TNS_DATA_TYPE_TCH:397,TNS_DATA_TYPE_PII:398,TNS_DATA_TYPE_PFI:399,TNS_DATA_TYPE_PPU:400,TNS_DATA_TYPE_PTE:401,TNS_DATA_TYPE_CLV:146,TNS_DATA_TYPE_RXH8:404,TNS_DATA_TYPE_N12:405,TNS_DATA_TYPE_AUTH:406,TNS_DATA_TYPE_KVAL:407,TNS_DATA_TYPE_DTR:152,TNS_DATA_TYPE_DUN:153,TNS_DATA_TYPE_DOP:154,TNS_DATA_TYPE_VST:155,TNS_DATA_TYPE_ODT:156,TNS_DATA_TYPE_FGI:413,TNS_DATA_TYPE_DSY:414,TNS_DATA_TYPE_DSYR8:415,TNS_DATA_TYPE_DSYH8:416,TNS_DATA_TYPE_DSYL:417,TNS_DATA_TYPE_DSYT8:418,TNS_DATA_TYPE_DSYV8:419,TNS_DATA_TYPE_DSYP:420,TNS_DATA_TYPE_DSYF:421,TNS_DATA_TYPE_DSYK:422,TNS_DATA_TYPE_DSYY:423,TNS_DATA_TYPE_DSYQ:424,TNS_DATA_TYPE_DSYC:425,TNS_DATA_TYPE_DSYA:426,TNS_DATA_TYPE_OT8:427,TNS_DATA_TYPE_DOL:172,TNS_DATA_TYPE_DSYTY:429,TNS_DATA_TYPE_AQE:430,TNS_DATA_TYPE_KV:431,TNS_DATA_TYPE_AQD:432,TNS_DATA_TYPE_AQ8:433,TNS_DATA_TYPE_TIME:178,TNS_DATA_TYPE_TIME_TZ:179,TNS_DATA_TYPE_TIMESTAMP:180,TNS_DATA_TYPE_TIMESTAMP_TZ:181,TNS_DATA_TYPE_INTERVAL_YM:182,TNS_DATA_TYPE_INTERVAL_DS:183,TNS_DATA_TYPE_EDATE:184,TNS_DATA_TYPE_ETIME:185,TNS_DATA_TYPE_ETTZ:186,TNS_DATA_TYPE_ESTAMP:187,TNS_DATA_TYPE_ESTZ:188,TNS_DATA_TYPE_EIYM:189,TNS_DATA_TYPE_EIDS:190,TNS_DATA_TYPE_RFS:449,TNS_DATA_TYPE_RXH10:450,TNS_DATA_TYPE_DCLOB:195,TNS_DATA_TYPE_DBLOB:196,TNS_DATA_TYPE_DBFILE:197,TNS_DATA_TYPE_DJSON:198,TNS_DATA_TYPE_KPN:454,TNS_DATA_TYPE_KPDNR:455,TNS_DATA_TYPE_DSYD:456,TNS_DATA_TYPE_DSYS:457,TNS_DATA_TYPE_DSYR:458,TNS_DATA_TYPE_DSYH:459,TNS_DATA_TYPE_DSYT:460,TNS_DATA_TYPE_DSYV:461,TNS_DATA_TYPE_AQM:462,TNS_DATA_TYPE_OER11:463,TNS_DATA_TYPE_UROWID:208,TNS_DATA_TYPE_AQL:466,TNS_DATA_TYPE_OTC:467,TNS_DATA_TYPE_KFNO:468,TNS_DATA_TYPE_KFNP:469,TNS_DATA_TYPE_KGT8:470,TNS_DATA_TYPE_RASB4:471,TNS_DATA_TYPE_RAUB2:472,TNS_DATA_TYPE_RAUB1:473,TNS_DATA_TYPE_RATXT:474,TNS_DATA_TYPE_RSSB4:475,TNS_DATA_TYPE_RSUB2:476,TNS_DATA_TYPE_RSUB1:477,TNS_DATA_TYPE_RSTXT:478,TNS_DATA_TYPE_RIDL:479,TNS_DATA_TYPE_GLRDD:480,TNS_DATA_TYPE_GLRDG:481,TNS_DATA_TYPE_GLRDC:482,TNS_DATA_TYPE_OKO:483,TNS_DATA_TYPE_DPP:484,TNS_DATA_TYPE_DPLS:485,TNS_DATA_TYPE_DPMOP:486,TNS_DATA_TYPE_TIMESTAMP_LTZ:231,TNS_DATA_TYPE_ESITZ:232,TNS_DATA_TYPE_UB8:233,TNS_DATA_TYPE_STAT:490,TNS_DATA_TYPE_RFX:491,TNS_DATA_TYPE_FAL:492,TNS_DATA_TYPE_CKV:493,TNS_DATA_TYPE_DRCX:494,TNS_DATA_TYPE_KGH:495,TNS_DATA_TYPE_AQO:496,TNS_DATA_TYPE_PNTY:241,TNS_DATA_TYPE_OKGT:498,TNS_DATA_TYPE_KPFC:499,TNS_DATA_TYPE_FE2:500,TNS_DATA_TYPE_SPFP:501,TNS_DATA_TYPE_DPULS:502,TNS_DATA_TYPE_BOOLEAN:252,TNS_DATA_TYPE_AQA:509,TNS_DATA_TYPE_KPBF:510,TNS_DATA_TYPE_TSM:513,TNS_DATA_TYPE_MSS:514,TNS_DATA_TYPE_KPC:516,TNS_DATA_TYPE_CRS:517,TNS_DATA_TYPE_KKS:518,TNS_DATA_TYPE_KSP:519,TNS_DATA_TYPE_KSPTOP:520,TNS_DATA_TYPE_KSPVAL:521,TNS_DATA_TYPE_PSS:522,TNS_DATA_TYPE_NLS:523,TNS_DATA_TYPE_ALS:524,TNS_DATA_TYPE_KSDEVTVAL:525,TNS_DATA_TYPE_KSDEVTTOP:526,TNS_DATA_TYPE_KPSPP:527,TNS_DATA_TYPE_KOL:528,TNS_DATA_TYPE_LST:529,TNS_DATA_TYPE_ACX:530,TNS_DATA_TYPE_SCS:531,TNS_DATA_TYPE_RXH:532,TNS_DATA_TYPE_KPDNS:533,TNS_DATA_TYPE_KPDCN:534,TNS_DATA_TYPE_KPNNS:535,TNS_DATA_TYPE_KPNCN:536,TNS_DATA_TYPE_KPS:537,TNS_DATA_TYPE_APINF:538,TNS_DATA_TYPE_TEN:539,TNS_DATA_TYPE_XSSCS:540,TNS_DATA_TYPE_XSSSO:541,TNS_DATA_TYPE_XSSAO:542,TNS_DATA_TYPE_KSRPC:543,TNS_DATA_TYPE_KVL:560,TNS_DATA_TYPE_SESSGET:563,TNS_DATA_TYPE_SESSREL:564,TNS_DATA_TYPE_XSSDEF:565,TNS_DATA_TYPE_PDQCINV:572,TNS_DATA_TYPE_PDQIDC:573,TNS_DATA_TYPE_KPDQCSTA:574,TNS_DATA_TYPE_KPRS:575,TNS_DATA_TYPE_KPDQIDC:576,TNS_DATA_TYPE_RTSTRM:578,TNS_DATA_TYPE_SESSRET:579,TNS_DATA_TYPE_SCN6:580,TNS_DATA_TYPE_KECPA:581,TNS_DATA_TYPE_KECPP:582,TNS_DATA_TYPE_SXA:583,TNS_DATA_TYPE_KVARR:584,TNS_DATA_TYPE_KPNGN:585,TNS_DATA_TYPE_XSNSOP:590,TNS_DATA_TYPE_XSATTR:591,TNS_DATA_TYPE_XSNS:592,TNS_DATA_TYPE_TXT:593,TNS_DATA_TYPE_XSSESSNS:594,TNS_DATA_TYPE_XSATTOP:595,TNS_DATA_TYPE_XSCREOP:596,TNS_DATA_TYPE_XSDETOP:597,TNS_DATA_TYPE_XSDESOP:598,TNS_DATA_TYPE_XSSETSP:599,TNS_DATA_TYPE_XSSIDP:600,TNS_DATA_TYPE_XSPRIN:601,TNS_DATA_TYPE_XSKVL:602,TNS_DATA_TYPE_XSSSDEF2:603,TNS_DATA_TYPE_XSNSOP2:604,TNS_DATA_TYPE_XSNS2:605,TNS_DATA_TYPE_IMPLRES:611,TNS_DATA_TYPE_OER19:612,TNS_DATA_TYPE_UB1ARRAY:613,TNS_DATA_TYPE_SESSSTATE:614,TNS_DATA_TYPE_AC_REPLAY:615,TNS_DATA_TYPE_AC_CONT:616,TNS_DATA_TYPE_KPDNREQ:622,TNS_DATA_TYPE_KPDNRNF:623,TNS_DATA_TYPE_KPNGNC:624,TNS_DATA_TYPE_KPNRI:625,TNS_DATA_TYPE_AQENQ:626,TNS_DATA_TYPE_AQDEQ:627,TNS_DATA_TYPE_AQJMS:628,TNS_DATA_TYPE_KPDNRPAY:629,TNS_DATA_TYPE_KPDNRACK:630,TNS_DATA_TYPE_KPDNRMP:631,TNS_DATA_TYPE_KPDNRDQ:632,TNS_DATA_TYPE_CHUNKINFO:636,TNS_DATA_TYPE_SCN:637,TNS_DATA_TYPE_SCN8:638,TNS_DATA_TYPE_UD21:639,TNS_DATA_TYPE_TNP:640,TNS_DATA_TYPE_OAC:646,TNS_DATA_TYPE_SESSSIGN:647,TNS_DATA_TYPE_OER:652,TNS_DATA_TYPE_UDS:663,TNS_TYPE_REP_NATIVE:0,TNS_TYPE_REP_UNIVERSAL:1,TNS_TYPE_REP_ORACLE:10,TNS_MSG_TYPE_PROTOCOL:1,TNS_MSG_TYPE_DATA_TYPES:2,TNS_MSG_TYPE_FUNCTION:3,TNS_MSG_TYPE_ERROR:4,TNS_MSG_TYPE_ROW_HEADER:6,TNS_MSG_TYPE_ROW_DATA:7,TNS_MSG_TYPE_PARAMETER:8,TNS_MSG_TYPE_STATUS:9,TNS_MSG_TYPE_IO_VECTOR:11,TNS_MSG_TYPE_LOB_DATA:14,TNS_MSG_TYPE_WARNING:15,TNS_MSG_TYPE_DESCRIBE_INFO:16,TNS_MSG_TYPE_PIGGYBACK:17,TNS_MSG_TYPE_FLUSH_OUT_BINDS:19,TNS_MSG_TYPE_BIT_VECTOR:21,TNS_MSG_TYPE_SERVER_SIDE_PIGGYBACK:23,TNS_MSG_TYPE_ONEWAY_FN:26,TNS_MSG_TYPE_IMPLICIT_RESULTSET:27,TNS_MSG_TYPE_RENEGOTIATE:28,TNS_MSG_TYPE_END_OF_REQUEST:29,TNS_MSG_TYPE_FAST_AUTH:34,TNS_KEYWORD_NUM_CURRENT_SCHEMA:168,TNS_KEYWORD_NUM_EDITION:172,TNS_KEYWORD_NUM_TRANSACTION_ID:201,TNS_BIND_USE_INDICATORS:1,TNS_BIND_USE_LENGTH:2,TNS_BIND_ARRAY:64,TNS_BIND_DIR_OUTPUT:16,TNS_BIND_DIR_INPUT:32,TNS_BIND_DIR_INPUT_OUTPUT:48,TNS_EXEC_OPTION_PARSE:1,TNS_EXEC_OPTION_BIND:8,TNS_EXEC_OPTION_DEFINE:16,TNS_EXEC_OPTION_EXECUTE:32,TNS_EXEC_OPTION_FETCH:64,TNS_EXEC_OPTION_COMMIT:256,TNS_EXEC_OPTION_COMMIT_REEXECUTE:1,TNS_EXEC_OPTION_PLSQL_BIND:1024,TNS_EXEC_OPTION_DML_ROWCOUNTS:16384,TNS_EXEC_OPTION_NOT_PLSQL:32768,TNS_EXEC_OPTION_IMPLICIT_RESULTSET:32768,TNS_EXEC_OPTION_DESCRIBE:131072,TNS_EXEC_OPTION_NO_COMPRESSED_FETCH:262144,TNS_EXEC_OPTION_BATCH_ERRORS:524288,TNS_EXEC_OPTION_NO_IMPL_REL:2097152,TNS_SERVER_PIGGYBACK_QUERY_CACHE_INVALIDATION:1,TNS_SERVER_PIGGYBACK_OS_PID_MTS:2,TNS_SERVER_PIGGYBACK_TRACE_EVENT:3,TNS_SERVER_PIGGYBACK_SESS_RET:4,TNS_SERVER_PIGGYBACK_SYNC:5,TNS_SERVER_PIGGYBACK_LTXID:7,TNS_SERVER_PIGGYBACK_AC_REPLAY_CONTEXT:8,TNS_SERVER_PIGGYBACK_EXT_SYNC:9,TNS_SERVER_PIGGYBACK_SESS_SIGNATURE:10,TNS_SESSGET_SESSION_CHANGED:4,TNS_LOB_OP_GET_LENGTH:1,TNS_LOB_OP_READ:2,TNS_LOB_OP_TRIM:32,TNS_LOB_OP_WRITE:64,TNS_LOB_OP_GET_CHUNK_SIZE:16384,TNS_LOB_OP_CREATE_TEMP:272,TNS_LOB_OP_FREE_TEMP:273,TNS_LOB_OP_OPEN:32768,TNS_LOB_OP_CLOSE:65536,TNS_LOB_OP_IS_OPEN:69632,TNS_LOB_OP_ARRAY:524288,TNS_LOB_OP_FILE_OPEN:256,TNS_LOB_OP_FILE_CLOSE:512,TNS_LOB_OP_FILE_ISOPEN:1024,TNS_LOB_OP_FILE_EXISTS:2048,TNS_LOB_LOC_OFFSET_FLAG_1:4,TNS_LOB_LOC_OFFSET_FLAG_3:6,TNS_LOB_LOC_OFFSET_FLAG_4:7,TNS_LOB_QLOCATOR_VERSION:4,TNS_LOB_LOC_FIXED_OFFSET:16,TNS_LOB_LOC_FLAGS_BLOB:1,TNS_LOB_LOC_FLAGS_VALUE_BASED:32,TNS_LOB_LOC_FLAGS_ABSTRACT:64,TNS_LOB_LOC_FLAGS_INIT:8,TNS_LOB_LOC_FLAGS_TEMP:1,TNS_LOB_LOC_FLAGS_VAR_LENGTH_CHARSET:128,TNS_LOB_OPEN_READ_WRITE:2,TNS_LOB_OPEN_READ_ONLY:11,TNS_LOB_PREFETCH_FLAG:33554432,TNS_JSON_MAX_LENGTH:33554432,TNS_END_TO_END_ACTION:16,TNS_END_TO_END_CLIENT_IDENTIFIER:1,TNS_END_TO_END_CLIENT_INFO:256,TNS_END_TO_END_DBOP:512,TNS_END_TO_END_MODULE:8,TNS_VERSION_MIN_ACCEPTED:315,TNS_VERSION_MIN_LARGE_SDU:315,TNS_FUNC_AUTH_PHASE_ONE:118,TNS_FUNC_AUTH_PHASE_TWO:115,TNS_FUNC_CLOSE_CURSORS:105,TNS_FUNC_COMMIT:14,TNS_FUNC_EXECUTE:94,TNS_FUNC_FETCH:5,TNS_FUNC_LOB_OP:96,TNS_FUNC_LOGOFF:9,TNS_FUNC_PING:147,TNS_FUNC_ROLLBACK:15,TNS_FUNC_SET_END_TO_END_ATTR:135,TNS_FUNC_REEXECUTE:4,TNS_FUNC_REEXECUTE_AND_FETCH:78,TNS_FUNC_SET_SCHEMA:152,TNS_FUNC_SESSION_GET:162,TNS_FUNC_SESSION_RELEASE:163,TNS_FUNC_SESSION_STATE:176,TNS_FUNC_CANCEL_ALL:120,TNS_FUNC_TPC_TXN_SWITCH:103,TNS_FUNC_TPC_TXN_CHANGE_STATE:104,TNS_FUNC_AQ_ENQ:121,TNS_FUNC_AQ_DEQ:122,TNS_FUNC_ARRAY_AQ:145,TNS_CHARSET_UTF8:873,TNS_CHARSET_UTF16:2000,TNS_ENCODING_UTF8:"UTF-8",TNS_ENCODING_UTF16:"UTF-16LE",TNS_ENCODING_MULTI_BYTE:1,TNS_ENCODING_CONV_LENGTH:2,TNS_CCAP_SQL_VERSION:0,TNS_CCAP_LOGON_TYPES:4,TNS_CCAP_CTB_FEATURE_BACKPORT:5,TNS_CCAP_FIELD_VERSION:7,TNS_CCAP_SERVER_DEFINE_CONV:8,TNS_CCAP_DEQUEUE_WITH_SELECTOR:9,TNS_CCAP_TTC1:15,TNS_CCAP_OCI1:16,TNS_CCAP_TDS_VERSION:17,TNS_CCAP_RPC_VERSION:18,TNS_CCAP_RPC_SIG:19,TNS_CCAP_DBF_VERSION:21,TNS_CCAP_LOB:23,TNS_CCAP_TTC2:26,TNS_CCAP_UB2_DTY:27,TNS_CCAP_OCI2:31,TNS_CCAP_CLIENT_FN:34,TNS_CCAP_OCI3:35,TNS_CCAP_TTC3:37,TNS_CCAP_SESS_SIGNATURE_VERSION:39,TNS_CCAP_TTC4:40,TNS_CCAP_LOB2:42,TNS_CCAP_TTC5:44,TNS_CCAP_VECTOR_FEATURES:52,TNS_CCAP_MAX:53,TNS_CCAP_SQL_VERSION_MAX:6,TNS_CCAP_FIELD_VERSION_11_2:6,TNS_CCAP_FIELD_VERSION_12_1:7,TNS_CCAP_FIELD_VERSION_12_2:8,TNS_CCAP_FIELD_VERSION_12_2_EXT1:9,TNS_CCAP_FIELD_VERSION_18_1:10,TNS_CCAP_FIELD_VERSION_18_1_EXT_1:11,TNS_CCAP_FIELD_VERSION_19_1:12,TNS_CCAP_FIELD_VERSION_19_1_EXT_1:13,TNS_CCAP_FIELD_VERSION_20_1:14,TNS_CCAP_FIELD_VERSION_20_1_EXT_1:15,TNS_CCAP_FIELD_VERSION_21_1:16,TNS_CCAP_FIELD_VERSION_23_1:17,TNS_CCAP_FIELD_VERSION_23_1_EXT_1:18,TNS_CCAP_FIELD_VERSION_23_1_EXT_2:19,TNS_CCAP_FIELD_VERSION_23_1_EXT_3:20,TNS_CCAP_FIELD_VERSION_23_1_EXT_4:21,TNS_CCAP_FIELD_VERSION_23_1_EXT_5:22,TNS_CCAP_FIELD_VERSION_23_1_EXT_6:23,TNS_CCAP_FIELD_VERSION_23_4:24,TNS_CCAP_FIELD_VERSION_MAX:24,TNS_CCAP_O5LOGON:8,TNS_CCAP_O5LOGON_NP:2,TNS_CCAP_O7LOGON:32,TNS_CCAP_O8LOGON_LONG_IDENTIFIER:64,TNS_CCAP_O9LOGON_LONG_PASSWORD:128,TNS_CCAP_END_OF_CALL_STATUS:1,TNS_CCAP_IND_RCD:8,TNS_CCAP_FAST_BVEC:32,TNS_CCAP_FAST_SESSION_PROPAGATE:16,TNS_CCAP_APP_CTX_PIGGYBACK:128,TNS_CCAP_TDS_VERSION_MAX:3,TNS_CCAP_RPC_VERSION_MAX:7,TNS_CCAP_RPC_SIG_VALUE:3,TNS_CCAP_DBF_VERSION_MAX:1,TNS_CCAP_LTXID:8,TNS_CCAP_IMPLICIT_RESULTS:16,TNS_CCAP_BIG_CHUNK_CLR:32,TNS_CCAP_KEEP_OUT_ORDER:128,TNS_CCAP_LOB_UB8_SIZE:1,TNS_CCAP_LOB_ENCS:2,TNS_CCAP_LOB_PREFETCH_DATA:4,TNS_CCAP_LOB_TEMP_SIZE:8,TNS_CCAP_LOB_PREFETCH:64,TNS_CCAP_LOB_12C:128,TNS_CCAP_DRCP:16,TNS_CCAP_ZLNP:4,TNS_CCAP_INBAND_NOTIFICATION:4,TNS_CCAP_END_OF_REQUEST:32,TNS_CCAP_CLIENT_FN_MAX:12,TNS_CCAP_LOB2_QUASI:1,TNS_CCAP_LOB2_2GB_PREFETCH:4,TNS_CCAP_CTB_IMPLICIT_POOL:8,TNS_CCAP_CTB_OAUTH_MSG_ON_ERR:16,TNS_CCAP_VECTOR_SUPPORT:8,TNS_CCAP_VECTOR_FEATURE_BINARY:1,TNS_CCAP_VECTOR_FEATURE_SPARSE:2,TNS_CCAP_TTC5_SESSIONLESS_TXNS:32,TNS_CCAP_OCI3_OCSSYNC:32,TNS_RCAP_COMPAT:0,TNS_RCAP_TTC:6,TNS_RCAP_MAX:7,TNS_RCAP_COMPAT_81:2,TNS_RCAP_TTC_ZERO_COPY:1,TNS_RCAP_TTC_32K:4,TNS_VERIFIER_TYPE_11G_1:45394,TNS_VERIFIER_TYPE_11G_2:6949,TNS_VERIFIER_TYPE_12C:18453,TNS_UDS_FLAGS_IS_JSON:256,TNS_UDS_FLAGS_IS_OSON:2048,TNS_EOCS_FLAGS_TXN_IN_PROGRESS:2,TNS_EOCS_FLAGS_SESS_RELEASE:32768,TNS_TPC_TXN_START:1,TNS_TPC_TXN_DETACH:2,TNS_TPC_TXN_POST_DETACH:4,TNS_TPC_TXN_COMMIT:1,TNS_TPC_TXN_ABORT:2,TNS_TPC_TXN_PREPARE:3,TNS_TPC_TXN_FORGET:4,TNS_TPC_TXN_STATE_PREPARE:0,TNS_TPC_TXN_STATE_REQUIRES_COMMIT:1,TNS_TPC_TXN_STATE_COMMITTED:2,TNS_TPC_TXN_STATE_ABORTED:3,TNS_TPC_TXN_STATE_READ_ONLY:4,TNS_TPC_TXN_STATE_FORGOTTEN:5,TNS_TPC_TRANS_SESSIONLESS:16,TNS_TPC_TRANS_SESSIONLESS_FORMAT:5135422,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_VERSION_1:1,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_SET:64,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_UNSET:128,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_SERVER:1,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_CLIENT:2,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_TXEND_XA:3,TNS_AQ_MSG_PERSISTENT:r7.AQ_MSG_DELIV_MODE_PERSISTENT,TNS_AQ_MSG_BUFFERED:r7.AQ_MSG_DELIV_MODE_BUFFERED,TNS_AQ_MSG_PERSISTENT_OR_BUFFERED:r7.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,TNS_AQ_DEQ_BROWSE:1,TNS_AQ_DEQ_LOCKED:2,TNS_AQ_DEQ_REMOVE:3,TNS_AQ_DEQ_REMOVE_NODATA:4,TNS_AQ_DEQ_FIRST_MSG:1,TNS_AQ_DEQ_NEXT_MSG:3,TNS_AQ_DEQ_NEXT_TRANSACTION:2,TNS_AQ_DEQ_IMMEDIATE:1,TNS_AQ_DEQ_ON_COMMIT:2,TNS_AQ_DEQ_NO_WAIT:0,TNS_AQ_DEQ_WAIT_FOREVER:4294967295,TNS_AQ_ENQ_IMMEDIATE:1,TNS_AQ_ENQ_ON_COMMIT:2,TNS_AQ_MSG_EXPIRED:3,TNS_AQ_MSG_PROCESSED:2,TNS_AQ_MSG_READY:0,TNS_AQ_MSG_WAITING:1,TNS_AQ_MSG_NO_DELAY:0,TNS_AQ_MSG_NO_EXPIRATION:-1,TNS_AQ_ARRAY_ENQ:1,TNS_AQ_ARRAY_DEQ:2,TNS_AQ_ARRAY_FLAGS_RETURN_MESSAGE_ID:1,TNS_TTC_ENQ_STREAMING_ENABLED:1,TNS_TTC_ENQ_STREAMING_DISABLED:0,TNS_KPD_AQ_BUFMSG:2,TNS_KPD_AQ_EITHER:16,TNS_AQ_MESSAGE_ID_LENGTH:16,TNS_AQ_MESSAGE_VERSION:1,TNS_AQ_EXT_KEYWORD_AGENT_NAME:64,TNS_AQ_EXT_KEYWORD_AGENT_ADDRESS:65,TNS_AQ_EXT_KEYWORD_AGENT_PROTOCOL:66,TNS_AQ_EXT_KEYWORD_ORIGINAL_MSGID:69,TNS_ESCAPE_CHAR:253,TNS_LONG_LENGTH_INDICATOR:_F1.TNS_LONG_LENGTH_INDICATOR,TNS_NULL_LENGTH_INDICATOR:_F1.TNS_NULL_LENGTH_INDICATOR,TNS_MAX_ROWID_LENGTH:18,TNS_DURATION_SESSION:10,TNS_MAX_LONG_LENGTH:2147483647,TNS_SDU:8192,TNS_TDU:65535,TNS_MAX_CONNECT_DATA:230,TNS_MAX_UROWID_LENGTH:3950,TNS_SERVER_CONVERTS_CHARS:1,DRCP_DEAUTHENTICATE:2,TNS_OBJ_IS_VERSION_81:128,TNS_OBJ_IS_DEGENERATE:16,TNS_OBJ_IS_COLLECTION:8,TNS_OBJ_NO_PREFIX_SEG:4,TNS_OBJ_IMAGE_VERSION:1,TNS_OBJ_MAX_SHORT_LENGTH:245,TNS_OBJ_ATOMIC_NULL:253,TNS_OBJ_NON_NULL_OID:2,TNS_OBJ_HAS_EXTENT_OID:8,TNS_OBJ_TOP_LEVEL:1,TNS_OBJ_HAS_INDEXES:16,TNS_OBJ_PLSQL_INDEX_TABLE:1,TNS_OBJ_NESTED_TABLE:2,TNS_OBJ_VARRAY:3,TNS_OBJ_TDS_TYPE_CHAR:1,TNS_OBJ_TDS_TYPE_DATE:2,TNS_OBJ_TDS_TYPE_FLOAT:5,TNS_OBJ_TDS_TYPE_NUMBER:6,TNS_OBJ_TDS_TYPE_VARCHAR:7,TNS_OBJ_TDS_TYPE_BOOLEAN:8,TNS_OBJ_TDS_TYPE_RAW:19,TNS_OBJ_TDS_TYPE_TIMESTAMP:21,TNS_OBJ_TDS_TYPE_TIMESTAMP_TZ:23,TNS_OBJ_TDS_TYPE_OBJ:27,TNS_OBJ_TDS_TYPE_COLL:28,TNS_OBJ_TDS_TYPE_CLOB:29,TNS_OBJ_TDS_TYPE_BLOB:30,TNS_OBJ_TDS_TYPE_TIMESTAMP_LTZ:33,TNS_OBJ_TDS_TYPE_BINARY_FLOAT:37,TNS_OBJ_TDS_TYPE_START_EMBED_ADT:39,TNS_OBJ_TDS_TYPE_END_EMBED_ADT:40,TNS_OBJ_TDS_TYPE_SUBTYPE_MARKER:43,TNS_OBJ_TDS_TYPE_EMBED_ADT_INFO:44,TNS_OBJ_TDS_TYPE_BINARY_DOUBLE:45,TNS_XML_TYPE_LOB:1,TNS_XML_TYPE_STRING:4,TNS_XML_TYPE_FLAG_SKIP_NEXT_4:1048576,TNS_ERR_INCONSISTENT_DATA_TYPES:932,TNS_ERR_VAR_NOT_IN_SELECT_LIST:1007,TNS_ERR_INBAND_MESSAGE:12573,TNS_ERR_INVALID_SERVICE_NAME:12514,TNS_ERR_INVALID_SID:12505,TNS_ERR_NO_DATA_FOUND:1403,TNS_ERR_SESSION_SHUTDOWN:12572,TNS_ERR_NO_MESSAGES_FOUND:25228,TNS_WARN_COMPILATION_CREATE:32,TNS_VECTOR_MAX_LENGTH:1048576,VECTOR_FORMAT_FLEX:0,VECTOR_META_FLAG_FLEXIBLE_DIM:1,VECTOR_META_FLAG_SPARSE:2,PACKET_HEADER_SIZE:8,NUMBER_AS_TEXT_CHARS:172,CHUNKED_BYTES_CHUNK_SIZE:65536,TNS_DATA_FLAGS_END_OF_REQUEST:8192,TNS_BASE64_ALPHABET_ARRAY:wF1.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),TNS_EXTENT_OID:wF1.from("00000000000000000000000000010001","hex")}});var WI=o((dR5,SF1)=>{var{Buffer:iz0}=L0("buffer"),TF1=E9(),Qc6=L0("crypto");class CF1 extends Error{}function la($,Y,X,G){for(let J=0;J<X;J++)$[G+X-J-1]=TF1.TNS_BASE64_ALPHABET_ARRAY[Y&63],Y=Y>>6;return G+X}function Wc6($){let Y=0;if($.rba!==0||$.partitionID!==0||$.blockNum!==0||$.slotNum!=0){let X=iz0.allocUnsafe(TF1.TNS_MAX_ROWID_LENGTH);return Y=la(X,$.rba,6,Y),Y=la(X,$.partitionID,3,Y),Y=la(X,$.blockNum,6,Y),la(X,$.slotNum,3,Y),X.toString("utf8")}}function Zc6($){let Y=iz0.from($),X=Qc6.randomBytes(Y.length);for(let G=0;G<Y.length;G++)Y[G]=X[G]^Y[G];return{obfuscatedValue:X,value:Y}}function Kc6($,Y){let X=iz0.from($);for(let J=0;J<$.length;J++)X[J]=$[J]^Y[J];let G=X.toString();return X.fill(0),G}SF1.exports={encodeRowID:Wc6,getDeobfuscatedValue:Kc6,OutOfPacketsError:CF1,setObfuscatedValue:Zc6}});var nz0=o((cR5,vF1)=>{var Uc6=L0("process"),{Readable:Hc6}=L0("stream");class kF1 extends Hc6{constructor($){super({objectMode:!0});if(this._fetching=!1,this._numRows=0,$)Uc6.nextTick(()=>{this._open($)})}async _destroy($,Y){if(this._resultSet){let X=this._resultSet;if(this._resultSet=null,this._fetching)await new Promise((G)=>this.once("_doneFetching",G));try{await X._impl.close()}catch(G){Y(G);return}}Y($)}_open($){this._resultSet=$,this.emit("open"),this.emit("metadata",$.metaData)}async _read(){if(!this._resultSet){this.once("open",this._read);return}try{this._fetching=!0,this._resultSet._allowGetRowCall=!0;let $=await this._resultSet.getRow();if($)this.push($);else this.push(null)}catch($){this.destroy($)}finally{if(this._fetching=!1,this._resultSet)this._resultSet._allowGetRowCall=!1;else this.emit("_doneFetching")}}}vF1.exports=kF1});var na=o((lR5,xF1)=>{var zc6=nz0(),Vc6=ZI(),Ac6=GY(),Fc6=SY(),Dc6=aL(),a7=E4();class ia{constructor(){this._rowCache=[],this._processingStarted=!1,this._convertedToStream=!1,this._allowGetRowCall=!1,this._isActive=!1}async _getAllRows(){try{let $=this._impl.maxRows,Y=this._impl.fetchArraySize,X=[];while(!0){if($>0&&Y>=$)Y=$;let G=await this._getRows(Y);if(G)await this._processRows(G,!0),X=X.concat(G);if(G.length==$||G.length<Y)break;if($>0)$-=G.length}return X}finally{await this._impl.close(),delete this._impl}}async _getRows($){let Y={};if(this._impl.nestedCursorIndices.length>0)Y={connection:this._connection,outFormat:this._impl.outFormat,fetchArraySize:this._impl.fetchArraySize,dbObjectAsPojo:this._impl.dbObjectAsPojo,maxRows:this._impl.maxRows,fetchTypeMap:this._impl.fetchTypeMap};return await this._impl.getRows($,Y)}async _processRows($,Y){for(let X of this._impl.nestedCursorIndices)for(let G=0;G<$.length;G++){let J=$[G][X];if(J){let Q=new ia;if(Q._setup(this._connection,J),this._impl.metaData[X].metaData=J.metaData,Y)$[G][X]=await Q._getAllRows();else $[G][X]=Q}}for(let X of this._impl.lobIndices)for(let G=0;G<$.length;G++){let J=$[G][X];if(J)($[G][X]=new Dc6)._setup(J,!0)}for(let X of this._impl.dbObjectIndices){let G=this._impl.metaData[X].dbTypeClass;for(let J=0;J<$.length;J++){let Q=$[J][X];if(Q){let W=$[J][X]=Object.create(G.prototype);if(W._impl=Q,this._impl.dbObjectAsPojo)$[J][X]=W._toPojo();else if(W.isCollection)$[J][X]=new Proxy(W,Vc6._collectionProxyHandler)}}}for(let X of this._impl.converterIndices){let G=this._impl.metaData[X].converter;this._connection._impl._inProgress=!1;try{for(let J=0;J<$.length;J++){let Q=G($[J][X]);if(Q instanceof Promise)Q=await Q;$[J][X]=Q}}finally{this._connection._impl._inProgress=!0}}if(this._impl.outFormat===Fc6.OUT_FORMAT_OBJECT)for(let X=0;X<$.length;X++){let G=$[X],J=$[X]={},Q=this._impl.metaData;for(let W=0;W<Q.length;W++)J[Q[W].name]=G[W]}}_setup($,Y){this._connection=$,this._impl=Y}async close(){if(a7.assertArgCount(arguments,0,0),a7.assert(this._impl&&this._connection._impl,a7.ERR_INVALID_RS),this._convertedToStream)a7.throwErr(a7.ERR_CANNOT_INVOKE_RS_METHODS);this._processingStarted=!0;let $=this._impl;delete this._impl,await $.close()}async getRow(){if(a7.assertArgCount(arguments,0,0),a7.assert(this._impl&&this._connection._impl,a7.ERR_INVALID_RS),this._convertedToStream&&!this._allowGetRowCall)a7.throwErr(a7.ERR_CANNOT_INVOKE_RS_METHODS);if(this._allowGetRowCall=!1,this._processingStarted=!0,this._rowCache.length==0){let $=await this._getRows(this._impl.fetchArraySize);await this._processRows($,!1),this._rowCache=$}return this._rowCache.shift()}async getRows($){let Y;if(a7.assertArgCount(arguments,0,1),a7.assert(this._impl&&this._connection._impl,a7.ERR_INVALID_RS),arguments.length==0)$=0;else a7.assertParamValue(Number.isInteger($)&&$>=0,1);if(this._convertedToStream)a7.throwErr(a7.ERR_CANNOT_INVOKE_RS_METHODS);this._processingStarted=!0;let X;if($==0){X=this._rowCache;let G=this._impl.fetchArraySize;while(!0){let J=await this._getRows(G);if(J)await this._processRows(J,!1),X=X.concat(J);if(J.length<G)break}return X}if(this._rowCache.length===0)X=await this._getRows($),await this._processRows(X,!1);else if(Y=$-this._rowCache.length,Y<=0)X=this._rowCache.splice(0,$);else{let G=await this._getRows(Y);await this._processRows(G,!1),X=this._rowCache.concat(G),this._rowCache=[]}return X}get metaData(){if(this._impl)return this._impl.metaData;return}toQueryStream(){if(a7.assertArgCount(arguments,0,0),this._processingStarted)a7.throwErr(a7.ERR_CANNOT_CONVERT_RS_TO_STREAM);if(this._convertedToStream)a7.throwErr(a7.ERR_RS_ALREADY_CONVERTED);return this._convertedToStream=!0,new zc6(this)}[Symbol.asyncIterator](){let $=this;return{async next(){let Y=await $.getRow();return{value:Y,done:Y===void 0}},return(){return{done:!0}}}}}Ac6.wrapFns(ia.prototype,a7.ERR_BUSY_RS,"close","getRow","getRows");xF1.exports=ia});var Px=o((iR5,fF1)=>{var rz0=ZI(),{Buffer:az0}=L0("buffer"),Nc6=aL(),Lc6=na(),Bc6=SY(),s7=E4(),yF1=L0("util"),h8=kY(),bF1=GY();function jZ($,Y){if($.type===void 0&&arguments.length>2)$.type=arguments[2];else{let X=!1;for(let G=2;G<arguments.length;G++)if($.type===arguments[G]){X=!0;break}if(!X)if($.attrName)s7.throwErr(s7.ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR,$.attrName,$.fqn);else if($.fqn)s7.throwErr(s7.ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM,$.fqn);else if($.isArray&&$.name)s7.throwErr(s7.ERR_INCOMPATIBLE_TYPE_ARRAY_BIND,Y.pos,$.name);else if($.isArray)s7.throwErr(s7.ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND,Y.pos,$.pos);else s7.throwErr(s7.ERR_BIND_VALUE_AND_TYPE_MISMATCH)}}function ra($){if($===void 0||$===null||typeof $==="number"||typeof $==="string"||typeof $==="boolean"||az0.isBuffer($)||yF1.types.isDate($)||bF1.isVectorValue($)||$ instanceof h8.IntervalYM||$ instanceof h8.IntervalDS)return $;if(Array.isArray($)){let X=Array($.length);for(let G=0;G<$.length;G++)X[G]=ra($[G]);return X}if($ instanceof rz0)return{fields:[],values:[]};if($ instanceof h8.JsonId)return $;let Y={};Y.fields=Object.getOwnPropertyNames($),Y.values=Array(Y.fields.length);for(let X=0;X<Y.fields.length;X++)Y.values[X]=ra($[Y.fields[X]]);return Y}function hF1($,Y,X){if(Y===void 0||Y===null)return;if($.type===h8.DB_TYPE_OBJECT){let G=Y;if(!(Y instanceof rz0))G=new $.typeClass(Y);return G._impl}else if($.type===h8.DB_TYPE_JSON)return ra(Y);else if(typeof Y==="string"){if(jZ($,X,h8.DB_TYPE_VARCHAR,h8.DB_TYPE_NVARCHAR,h8.DB_TYPE_CHAR,h8.DB_TYPE_NCHAR,h8.DB_TYPE_CLOB,h8.DB_TYPE_NCLOB),$.type!==h8.DB_TYPE_CLOB&&$.type!==h8.DB_TYPE_NCLOB){let G=az0.byteLength(Y);if($.maxSize===void 0||G>$.maxSize){if($.checkSize)s7.throwErr(s7.ERR_MAX_SIZE_TOO_SMALL,$.maxSize,G,X.pos);$.maxSize=G}}return Y}else if(typeof Y==="number"||typeof Y==="bigint"){if(jZ($,X,h8.DB_TYPE_NUMBER,h8.DB_TYPE_BINARY_INTEGER,h8.DB_TYPE_BINARY_FLOAT,h8.DB_TYPE_BINARY_DOUBLE),Number.isNaN(Y)&&$.type===h8.DB_TYPE_NUMBER)s7.throwErr(s7.ERR_NAN_VALUE);return Y}else if(typeof Y==="boolean")return jZ($,X,h8.DB_TYPE_BOOLEAN),Y;else if(yF1.types.isDate(Y))return jZ($,X,h8.DB_TYPE_TIMESTAMP,h8.DB_TYPE_TIMESTAMP_TZ,h8.DB_TYPE_TIMESTAMP_LTZ,h8.DB_TYPE_DATE),Y;else if(Y instanceof h8.IntervalYM)return jZ($,X,h8.DB_TYPE_INTERVAL_YM),Y;else if(Y instanceof h8.IntervalDS)return jZ($,X,h8.DB_TYPE_INTERVAL_DS),Y;else if(az0.isBuffer(Y)){if(jZ($,X,h8.DB_TYPE_RAW,h8.DB_TYPE_BLOB),$.type===h8.DB_TYPE_RAW&&($.maxSize===void 0||Y.length>$.maxSize)){if($.checkSize)s7.throwErr(s7.ERR_MAX_SIZE_TOO_SMALL,$.maxSize,Y.length,X.pos);$.maxSize=Y.length}return Y}else if(Y instanceof Lc6)return jZ($,X,h8.DB_TYPE_CURSOR),Y._impl;else if(Y instanceof Nc6)return jZ($,X,Y.type),Y._impl;else if(Y instanceof rz0)return jZ($,X,h8.DB_TYPE_OBJECT),Y._impl;else if(bF1.isVectorValue(Y))return jZ($,X,h8.DB_TYPE_VECTOR),Y;else if($.type===h8.DB_TYPE_VECTOR&&Array.isArray(Y))return new Float64Array(Y);else if(X.allowArray&&Array.isArray(Y)){if($.isArray=!0,$.dir===Bc6.BIND_IN)$.maxArraySize=Y.length||1;else if($.maxArraySize===void 0)s7.throwErr(s7.ERR_REQUIRED_MAX_ARRAY_SIZE);else if(Y.length>$.maxArraySize)s7.throwErr(s7.ERR_INVALID_ARRAY_SIZE);X.allowArray=!1;let G=Array(Y.length);for(let J=0;J<Y.length;J++)X.pos=J,G[J]=hF1($,Y[J],X);return G}if($.type===void 0)s7.throwErr(s7.ERR_INVALID_BIND_DATA_TYPE,2);jZ($,X)}fF1.exports={transformJsonValue:ra,transformValueIn:hF1}});var ZI=o((nR5,mF1)=>{var Oc6=aL(),gF1=QI(),x9=E4(),KI=kY(),sz0=L0("util");function oz0($,Y,X,G){let J,Q=!1;if(X){switch(Y.type){case KI.DB_TYPE_VARCHAR:case KI.DB_TYPE_NVARCHAR:case KI.DB_TYPE_NCHAR:case KI.DB_TYPE_CHAR:if(J=Buffer.byteLength(X),J>Y.maxSize)Q=!0;break;case KI.DB_TYPE_RAW:if(J=X.length,J>Y.maxSize)Q=!0;break;default:break}if(Q)if(G!==void 0)x9.throwErr(x9.ERR_WRONG_LENGTH_FOR_DBOBJECT_ELEM,G,$.fqn,J,Y.maxSize);else x9.throwErr(x9.ERR_WRONG_LENGTH_FOR_DBOBJECT_ATTR,Y.name,$.fqn,J,Y.maxSize)}}class oL{_ensureCollection(){if(!this.isCollection)x9.throwErr(x9.ERR_OBJECT_IS_NOT_A_COLLECTION,this.name)}_getAttrValue($){let Y=this._impl.getAttrValue($);return this._transformValueOut(Y,$.typeClass,$)}_setAttrValue($,Y){let X={fqn:this._objType.fqn,attrName:$.name,type:$.type,typeClass:$.typeClass},G={allowArray:!1};Y=tz0.transformValueIn(X,Y,G),oz0(this._objType,$,Y),this._impl.setAttrValue($,Y)}_toPojo(){if(this.isCollection){let Y=this.getValues();if(this.elementType===KI.DB_TYPE_OBJECT)for(let X=0;X<Y.length;X++)Y[X]=Y[X]._toPojo();return Y}let $={};for(let Y in this.attributes){let X=this[Y];if(X instanceof oL)X=X._toPojo();$[Y]=X}return $}_transformValueOut($,Y,X){let G=$;if($ instanceof gF1.LobImpl)G=new Oc6,G._setup($,!0);else{if($ instanceof gF1.DbObjectImpl){if(G=Object.create(Y.prototype),G._impl=$,G.isCollection)G=new Proxy(G,oL._collectionProxyHandler)}if(X.converter)G=X.converter(G)}return G}append($){x9.assertArgCount(arguments,1,1),this._ensureCollection();let Y={fqn:this._objType.fqn,type:this._objType.elementType,typeClass:this._objType.elementTypeClass},X={allowArray:!1};$=tz0.transformValueIn(Y,$,X);let G=this._impl.getLastIndex();if(G)G=G+1;else G=0;oz0(this._objType,this._objType.elementTypeInfo,$,G),this._impl.append($)}get attributes(){if(!this._attributes){let $=this._objType.attributes||[],Y={};for(let X=0;X<$.length;X++){let G=$[X],J={type:G.type,typeName:G.typeName};if(G.typeClass)J.typeClass=G.typeClass;if(G.precision!=null)J.precision=G.precision;if(G.scale!=null)J.scale=G.scale;if(G.maxSize!=null)J.maxSize=G.maxSize;Y[G.name]=J}this._attributes=Y}return this._attributes}copy(){x9.assertArgCount(arguments,0,0);let $=Object.create(this);if($._impl=this._impl.copy(),this.isCollection)return new Proxy($,oL._collectionProxyHandler);return $}deleteElement($){return x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1),this._impl.deleteElement($)}get elementType(){return this._objType.elementType}get elementTypeClass(){return this._objType.elementTypeClass}get elementTypeName(){return this._objType.elementTypeName}get fqn(){return this._objType.fqn}get length(){if(this.isCollection)return this._impl.getLength();return}getElement($){x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1);let Y=this._impl.getElement($);return this._transformValueOut(Y,this.elementTypeClass,this._objType.elementTypeInfo)}getKeys(){return x9.assertArgCount(arguments,0,0),this._ensureCollection(),this._impl.getKeys()}getFirstIndex(){return x9.assertArgCount(arguments,0,0),this._ensureCollection(),this._impl.getFirstIndex()}getLastIndex(){return x9.assertArgCount(arguments,0,0),this._ensureCollection(),this._impl.getLastIndex()}getNextIndex($){return x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1),this._impl.getNextIndex($)}getPrevIndex($){return x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1),this._impl.getPrevIndex($)}getValues(){x9.assertArgCount(arguments,0,0),this._ensureCollection();let $=this._impl.getValues();for(let Y=0;Y<$.length;Y++)$[Y]=this._transformValueOut($[Y],this.elementTypeClass,this._objType.elementTypeInfo);return $}hasElement($){return x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1),this._impl.hasElement($)}get isCollection(){return this._objType.isCollection}get name(){return this._objType.name}get schema(){return this._objType.schema}get packageName(){return this._objType.packageName}setElement($,Y){x9.assertArgCount(arguments,2,2),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1);let X={fqn:this._objType.fqn,type:this._objType.elementType,typeClass:this._objType.elementTypeClass},G={allowArray:!1};Y=tz0.transformValueIn(X,Y,G),oz0(this._objType,this._objType.elementTypeInfo,Y,$),this._impl.setElement($,Y)}trim($){x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($)&&$>=0,1),this._impl.trim($)}[sz0.inspect.custom]($,Y){return"["+this.fqn+"] "+sz0.inspect(this._toPojo(),Y)}[Symbol.iterator](){if(this.isCollection)return this.getValues()[Symbol.iterator]();throw TypeError("obj is not iterable")}[Symbol.toPrimitive]($){switch($){case"number":return NaN;default:return"["+this.fqn+"] "+sz0.inspect(this._toPojo(),{})}}get[Symbol.toStringTag](){return this.fqn}toJSON(){return this._toPojo()}toMap(){x9.assertArgCount(arguments,0,0),this._ensureCollection();let $=new Map;return this.getKeys().forEach((Y)=>{$.set(Y,this.getElement(Y))}),$}}function Ec6($){return function(){try{return $.apply(this,arguments)}catch(Y){throw x9.transformErr(Y,x9.transformErr)}}}function Mc6($){for(let Y=1;Y<arguments.length;Y++){let X=arguments[Y];$[X]=Ec6($[X])}}Mc6(oL.prototype,"_getAttrValue","_setAttrValue","append","copy","deleteElement","getElement","getKeys","getFirstIndex","getLastIndex","getNextIndex","getPrevIndex","getValues","toMap","hasElement","setElement","trim");oL._collectionProxyHandler={deleteProperty($,Y){if(typeof Y==="string"){let X=+Y;if(!isNaN(X))return $.deleteElement(X)}return delete $[Y]},get($,Y){if(typeof Y==="string"){let G=+Y;if(!isNaN(G))return $.getElement(G)}let X=$[Y];if(typeof X==="function")return X.bind($);return X},set($,Y,X){if(typeof Y==="string"){let G=+Y;if(!isNaN(G))return $.setElement(G,X),!0}return $[Y]=X,!0}};mF1.exports=oL;var tz0=Px()});var GV0=o((rR5,uF1)=>{var{Buffer:ez0}=L0("buffer"),WY=E4(),YV0=GY(),Rc6=pz0(),qc6=cz0(),Ic6=lz0(),$V0=ZI(),Pc6=Px(),UI=kY();class XV0{_isPayload($){return typeof $==="string"||ez0.isBuffer($)||$ instanceof $V0}_makeMessage($){let Y=new Ic6;return Y._impl=$,Y._payloadTypeClass=this._payloadTypeClass,Y}_verifyMessage($){let Y;if(this._isPayload($))Y=$,$={};else if($={...$},this._isJson||this._isPayload($.payload))Y=$.payload;else if(this._payloadTypeClass)Y=new this._payloadTypeClass($.payload);else WY.throwErr(WY.ERR_INVALID_AQ_MESSAGE);if(this._isJson)$.payload=Pc6.transformJsonValue(Y);else if(typeof Y==="string"||ez0.isBuffer(Y))$.payload=ez0.from(Y);else if(this._payloadType==UI.DB_TYPE_OBJECT){if(!(Y instanceof $V0)||this._payloadTypeName!==Y._impl._objType.name)WY.throwErr(WY.ERR_PAYLOAD_CANNOT_BE_ENQUEUED);$.payload=Y._impl}else WY.throwErr(WY.ERR_PAYLOAD_CANNOT_BE_ENQUEUED);if($.correlation!==void 0)WY.assertParamPropValue(typeof $.correlation==="string",1,"correlation");if($.delay!==void 0)WY.assertParamPropValue(Number.isInteger($.delay),1,"delay");if($.exceptionQueue!==void 0)WY.assertParamPropValue(typeof $.exceptionQueue==="string",1,"exceptionQueue");if($.expiration!==void 0)WY.assertParamPropValue(Number.isInteger($.expiration),1,"expiration");if($.priority!==void 0)WY.assertParamPropValue(Number.isInteger($.priority),1,"priority");if($.recipients!==void 0)WY.assertParamPropValue(YV0.isArrayOfStrings($.recipients),1,"recipients");return $}async create($,Y,X){if(X.payloadType===UI.DB_TYPE_JSON)this._isJson=!0,this._payloadType=UI.DB_TYPE_JSON,this._payloadTypeName="JSON";else if(X.payloadType===void 0||X.payloadType===UI.DB_TYPE_RAW)this._payloadType=UI.DB_TYPE_RAW,this._payloadTypeName="RAW";else{if(typeof X.payloadType==="string"){let G=await $._getDbObjectClassForName(X.payloadType);this._payloadTypeClass=G,X.payloadType=G}else WY.assertParamPropValue(YV0.isObject(X.payloadType)&&X.payloadType.prototype instanceof $V0,2,"payloadType"),this._payloadTypeClass=X.payloadType;this._payloadType=UI.DB_TYPE_OBJECT,this._payloadTypeName=this._payloadTypeClass.prototype.name}this._name=Y,this._impl=await $._impl.getQueue(Y,this._payloadTypeClass,this._payloadType)}async deqMany($){return WY.assertArgCount(arguments,1,1),WY.assertParamValue(Number.isInteger($)&&$>0,1),(await this._impl.deq($)).map((X)=>this._makeMessage(X))}async deqOne(){WY.assertArgCount(arguments,0,0);let $=await this._impl.deq(1);if($.length>0)return this._makeMessage($[0])}get deqOptions(){if(!this._deqOptions){let $=new Rc6;$._impl=this._impl.deqOptions,this._deqOptions=$}return this._deqOptions}async enqMany($){WY.assertArgCount(arguments,1,1),WY.assertParamValue(Array.isArray($)&&$.length>0,1);let Y=Array($.length);for(let G=0;G<$.length;G++)Y[G]=this._verifyMessage($[G]);return(await this._impl.enq(Y)).map((G)=>this._makeMessage(G))}async enqOne($){WY.assertArgCount(arguments,1,1),$=this._verifyMessage($);let Y=await this._impl.enq([$]);return this._makeMessage(Y[0])}get enqOptions(){if(!this._enqOptions){let $=new qc6;$._impl=this._impl.enqOptions,this._enqOptions=$}return this._enqOptions}get name(){return this._name}get payloadType(){return this._payloadType}get payloadTypeName(){return this._payloadTypeName}get payloadTypeClass(){return this._payloadTypeClass}}YV0.wrapFns(XV0.prototype,"deqOne","deqMany","enqOne","enqMany");uF1.exports=XV0});var HI=o((aR5,pF1)=>{class JV0{get createdOn(){return this._impl.getCreatedOn()}getContent(){let $=this._impl.getContent();if(typeof $==="string"&&this.mediaType==="application/json")return JSON.parse($);return $}getContentAsBuffer(){let $=this._impl.getContent();if(Buffer.isBuffer($))return $;else if(typeof $=="string")return Buffer.from($);return Buffer.from(JSON.stringify($))}getContentAsString(){let $=this._impl.getContent();if(typeof $==="string")return $;else if(Buffer.isBuffer($))return $.toString();return JSON.stringify($)}get key(){return this._impl.getKey()}get lastModified(){return this._impl.getLastModified()}get mediaType(){return this._impl.getMediaType()}get version(){return this._impl.getVersion()}}JV0.prototype._sodaDocumentMarker=!0;pF1.exports=JV0});var WV0=o((sR5,dF1)=>{var zI=E4(),wc6=GY(),_c6=HI();class QV0{async close(){zI.assertArgCount(arguments,0,0),zI.assert(this._impl,zI.ERR_INVALID_SODA_DOC_CURSOR),await this._impl.close(),delete this._impl}async getNext(){zI.assertArgCount(arguments,0,0),zI.assert(this._impl,zI.ERR_INVALID_SODA_DOC_CURSOR);let $=await this._impl.getNext();if($){let Y=new _c6;return Y._impl=$,Y}}[Symbol.asyncIterator](){let $=this;return{async next(){let Y=await $.getNext();return{value:Y,done:Y===void 0}},return(){return{done:!0}}}}}wc6.wrapFns(QV0.prototype,"close","getNext");dF1.exports=QV0});var UV0=o((oR5,iF1)=>{var jc6=WV0(),ZV0=HI(),s5=E4(),lF1=GY(),cF1=wZ();class KV0{constructor($){this._options={autoCommit:cF1.autoCommit,fetchArraySize:cF1.fetchArraySize},this._sodaDb=$}async count(){return s5.assertArgCount(arguments,0,0),await this._impl.count(this._options)}async getCursor(){s5.assertArgCount(arguments,0,0);let $=new jc6;return $._impl=await this._impl.getCursor(this._options),$}async getDocuments(){s5.assertArgCount(arguments,0,0);let $=await this._impl.getDocuments(this._options),Y=Array($.length);for(let X=0;X<$.length;X++)Y[X]=new ZV0,Y[X]._impl=$[X];return Y}async getOne(){s5.assertArgCount(arguments,0,0);let $=await this._impl.getOne(this._options);if($){let Y=new ZV0;return Y._impl=$,Y}}lock(){return s5.assertArgCount(arguments,0,0),this._options.lock=!0,this}async replaceOne($){return s5.assertArgCount(arguments,1,1),$=this._sodaDb._verifySodaDoc($),await this._impl.replaceOne(this._options,$)}async replaceOneAndGet($){s5.assertArgCount(arguments,1,1),$=this._sodaDb._verifySodaDoc($);let Y=await this._impl.replaceOneAndGet(this._options,$);if(Y){let X=new ZV0;return X._impl=Y,X}}async remove(){return s5.assertArgCount(arguments,0,0),await this._impl.remove(this._options)}fetchArraySize($){return s5.assertArgCount(arguments,1,1),s5.assertParamValue(Number.isInteger($)&&$>=0,1),this._options.fetchArraySize=$,this}filter($){return s5.assertArgCount(arguments,1,1),s5.assertParamValue(lF1.isObject($),1),this._options.filter=JSON.stringify($),this}hint($){return s5.assertArgCount(arguments,1,1),s5.assertParamValue(typeof $==="string",1),this._options.hint=$,this}key($){return s5.assertArgCount(arguments,1,1),s5.assertParamValue(typeof $==="string",1),this._options.key=$,this._options.keys=void 0,this}keys($){s5.assertArgCount(arguments,1,1),s5.assertParamValue(Array.isArray($),1);for(let Y=0;Y<$.length;Y++)s5.assertParamValue(typeof $[Y]==="string",1);return this._options.keys=$,this._options.key=void 0,this}limit($){return s5.assertArgCount(arguments,1,1),s5.assertParamValue(Number.isInteger($)&&$>0,1),this._options.limit=$,this}skip($){return s5.assertArgCount(arguments,1,1),s5.assertParamValue(Number.isInteger($)&&$>=0,1),this._options.skip=$,this}version($){return s5.assertArgCount(arguments,1,1),s5.assertParamValue(typeof $==="string",1),this._options.version=$,this}}lF1.wrapFns(KV0.prototype,"count","getCursor","getDocuments","getOne","remove","replaceOne","replaceOneAndGet");iF1.exports=KV0});var zV0=o((tR5,nF1)=>{var aa=HI(),Tc6=UV0(),V7=E4(),wx=GY(),Qz=wZ();class HV0{constructor($){this._sodaDb=$}async createIndex($){V7.assertArgCount(arguments,1,1),V7.assertParamValue(wx.isObject($),1);let Y={autoCommit:Qz.autoCommit};return await this._impl.createIndex(JSON.stringify($),Y)}async drop(){V7.assertArgCount(arguments,0,0);let $={autoCommit:Qz.autoCommit};return await this._impl.drop($)}async dropIndex($,Y){let X={autoCommit:Qz.autoCommit};if(V7.assertArgCount(arguments,1,2),V7.assertParamValue(typeof $==="string",1),arguments.length==2){if(V7.assertParamValue(typeof Y==="object",2),Y.force!==void 0)V7.assertParamPropValue(typeof Y.force==="boolean",2,"force"),X.force=Y.force}return await this._impl.dropIndex($,X)}find(){V7.assertArgCount(arguments,0,0);let $=new Tc6(this._sodaDb);return $._impl=this._impl.find(),$}async getDataGuide(){V7.assertArgCount(arguments,0,0);let $=new aa;return $._impl=await this._impl.getDataGuide(),$}async insertMany($){V7.assertArgCount(arguments,1,1),V7.assertParamValue(Array.isArray($)&&$.length>0,1);let Y=Array($.length);for(let G=0;G<$.length;G++)Y[G]=this._sodaDb._verifySodaDoc($[G]);let X={autoCommit:Qz.autoCommit};await this._impl.insertMany(Y,X)}async insertManyAndGet($,Y){let X={autoCommit:Qz.autoCommit};if(V7.assertArgCount(arguments,1,2),V7.assertParamValue(Array.isArray($)&&$.length>0,1),arguments.length==2){if(V7.assertParamValue(wx.isObject(Y),2),Y.hint!==void 0)V7.assertParamPropValue(typeof Y.hint==="string",2,"hint"),X.hint=Y.hint}let G=Array($.length);for(let Q=0;Q<$.length;Q++)G[Q]=this._sodaDb._verifySodaDoc($[Q]);let J=await this._impl.insertManyAndGet(G,X);for(let Q=0;Q<$.length;Q++){let W=G[Q]=new aa;W._impl=J[Q]}return G}async insertOne($){V7.assertArgCount(arguments,1,1),$=this._sodaDb._verifySodaDoc($);let Y={autoCommit:Qz.autoCommit};await this._impl.insertOne($,Y)}async insertOneAndGet($,Y){let X={autoCommit:Qz.autoCommit};if(V7.assertArgCount(arguments,1,2),$=this._sodaDb._verifySodaDoc($),arguments.length==2){if(V7.assertParamValue(wx.isObject(Y),2),Y.hint!==void 0)V7.assertParamPropValue(typeof Y.hint==="string",2,"hint"),X.hint=Y.hint}let G=new aa;return G._impl=await this._impl.insertOneAndGet($,X),G}async listIndexes(){return(await this._impl.listIndexes()).map((Y)=>JSON.parse(Y))}get metaData(){return JSON.parse(this._impl.getMetaData())}get name(){return this._impl.getName()}async save($){V7.assertArgCount(arguments,1,1),$=this._sodaDb._verifySodaDoc($);let Y={autoCommit:Qz.autoCommit};await this._impl.save($,Y)}async saveAndGet($,Y){V7.assertArgCount(arguments,1,2),$=this._sodaDb._verifySodaDoc($);let X={autoCommit:Qz.autoCommit};if(arguments.length==2){if(V7.assertParamValue(wx.isObject(Y),2),Y.hint!==void 0)V7.assertParamPropValue(typeof Y.hint==="string",2,"hint"),X.hint=Y.hint}let G=new aa;return G._impl=await this._impl.saveAndGet($,X),G}async truncate(){V7.assertArgCount(arguments,0,0),await this._impl.truncate()}}wx.wrapFns(HV0.prototype,"createIndex","drop","dropIndex","getDataGuide","insertMany","insertManyAndGet","insertOne","insertOneAndGet","listIndexes","save","saveAndGet","truncate");nF1.exports=HV0});var AV0=o((eR5,oF1)=>{var{Buffer:_x}=L0("buffer"),rF1=zV0(),Cc6=HI(),HX=E4(),tL=GY(),aF1=wZ(),sF1=Px();class VV0{_getConnection(){return this._connection}async createCollection($,Y){let X={autoCommit:aF1.autoCommit};if(HX.assertArgCount(arguments,1,2),HX.assertParamValue(typeof $==="string",1),arguments.length==2){if(HX.assertParamValue(tL.isObject(Y),2),Y.mode!==void 0)HX.assertParamPropValue(Number.isInteger(Y.mode)&&Y.mode>0,2,"mode"),X.mode=Y.mode;if(Y.metaData!==void 0)HX.assertParamPropValue(tL.isObject(Y.metaData),2,"metaData"),X.metaData=JSON.stringify(Y.metaData)}let G=new rF1(this);return G._impl=await this._impl.createCollection($,X),G}createDocument($,Y){let X={},G;if(HX.assertArgCount(arguments,1,2),HX.assertParamValue(_x.isBuffer($)||typeof $==="string"||tL.isObject($),1),arguments.length>1)HX.assertParamValue(tL.isObject(Y),2),X=Y,HX.assertParamPropString(X,2,"key"),HX.assertParamPropString(X,2,"mediaType");if(this._impl.supportsJson&&(!X.mediaType||X.mediaType==="application/json"))G=sF1.transformJsonValue($);else if(_x.isBuffer($))G=$;else if(typeof $==="string")G=_x.from($);else G=_x.from(JSON.stringify($));let J=new Cc6;return J._impl=this._impl.createDocument(G,X),J}async getCollectionNames($){let Y={};if(HX.assertArgCount(arguments,0,1),arguments.length==1){if(HX.assertParamValue(tL.isObject($),1),Y=$,Y.startsWith!==void 0)HX.assertParamPropValue(typeof Y.startsWith==="string",1,"startsWith");if(Y.limit!==void 0)HX.assertParamPropValue(Number.isInteger(Y.limit),1,"limit")}return await this._impl.getCollectionNames(Y)}async openCollection($){HX.assertArgCount(arguments,1,1),HX.assertParamValue(typeof $==="string",1);let Y={autoCommit:aF1.autoCommit},X=await this._impl.openCollection($,Y);if(X){let G=new rF1(this);return G._impl=X,G}}_verifySodaDoc($){if($!=null&&$._sodaDocumentMarker)return $._impl;if(HX.assertParamValue(tL.isObject($),1),this._impl._supportsJson)return sF1.transformJsonValue($);return _x.from(JSON.stringify($))}}tL.wrapFns(VV0.prototype,"createCollection","getCollectionNames","openCollection");oF1.exports=VV0});var DV0=o(($q5,XD1)=>{var Sc6=GV0(),VI=ZI(),{Buffer:tF1}=L0("buffer"),FV0=aL(),sa=na(),kc6=AV0(),vc6=L0("events"),xc6=nz0(),_0=E4(),Y8=GY(),oa=QI(),yc6=L0("process"),bc6=L0("util"),P5=SY(),ta=wZ(),eF1=Px(),l8=kY(),$D1=qx(),jx=new Map,hc6=($)=>$===null?null:parseFloat($);function YD1($,Y){if(delete $.converter,Y.dbObjectTypeHandler){let X=Y.dbObjectTypeHandler($);if(X!==void 0){if(_0.assert(typeof X==="object",_0.ERR_DB_FETCH_TYPE_HANDLER_RETURN_VALUE),X.converter!==void 0)_0.assert(typeof X.converter==="function",_0.ERR_DB_FETCH_TYPE_HANDLER_CONVERTER);if([l8.DB_TYPE_CLOB,l8.DB_TYPE_NCLOB,l8.DB_TYPE_BLOB,l8.DB_TYPE_BFILE].includes($.type))return _0.throwErr(_0.ERR_NOT_IMPLEMENTED,"DbObjConverter for LOBs");$.converter=X.converter}}if($.type===l8.DB_TYPE_NUMBER&&!$.converter)$.converter=hc6}class Wz extends vc6{constructor(){super();this._dbObjectClasses=new Map,this._closing=!1}_addDefaultsToExecOpts($){if($.connection=this,$.keepInStmtCache===void 0)$.keepInStmtCache=!0;if($.suspendOnSuccess===void 0)$.suspendOnSuccess=!1;ta.addToOptions($,"autoCommit","dbObjectAsPojo","fetchArraySize","fetchTypeHandler","maxRows","outFormat","prefetchRows")}_buildDbObjectClass($){let Y=function(G){if(this._impl=new oa.DbObjectImpl($),this.isCollection){let J=new Proxy(this,VI._collectionProxyHandler);if(G!==void 0)for(let Q=0;Q<G.length;Q++)this.append(G[Q]);return J}else if(G!==void 0)for(let J of $.attributes){let Q=G[J.name];if(Q!==void 0)this._setAttrValue(J,Q)}};if(Y.prototype=Object.create(VI.prototype),Y.prototype.constructor=Y,Y.prototype._objType=$,$.elementTypeClass){let G=this._getDbObjectClass($.elementTypeClass);$.elementTypeClass=G}let X={dbObjectTypeHandler:ta.dbObjectTypeHandler};if($.isCollection)Y8.addTypeProperties($,"elementType"),$.elementTypeInfo.type=$.elementType,YD1($.elementTypeInfo,X);if($.attributes){let G={};for(let J of $.attributes){if(J.typeClass)J.typeClass=this._getDbObjectClass(J.typeClass);Y8.addTypeProperties(J,"type");let Q={get(){return this._getAttrValue(J)},set(W){this._setAttrValue(J,W)}};G[J.name]=Q,YD1(J,X)}Object.defineProperties(Y.prototype,G)}return Y.toString=function(){return"DbObjectClass ["+$.fqn+"]"},Y}_getDbObjectClass($){if($.prototype instanceof VI)return $;let Y=this._dbObjectClasses.get($);if(!Y)Y=this._buildDbObjectClass($),Y._connection=this,Y._objType=$,$._connection=this._impl,this._dbObjectClasses.set($,Y);return Y}async _getDbObjectClassForName($){let Y=this._dbObjectClasses.get($);if(!Y){let X=await this._impl.getDbObjectClass($);Y=this._getDbObjectClass(X),this._dbObjectClasses.set($,Y)}return Y}_isBindDir($){return $===P5.BIND_IN||$===P5.BIND_OUT||$===P5.BIND_INOUT}_isBindValue($){return $===null||$===void 0||typeof $==="number"||typeof $==="string"||typeof $==="boolean"||typeof $==="bigint"||Array.isArray($)||Y8.isVectorValue($)||tF1.isBuffer($)||bc6.types.isDate($)||$ instanceof FV0||$ instanceof sa||$ instanceof VI}async _processBindUnit($,Y,X){let G=!1;if(Y.dir===void 0)$.dir=P5.BIND_IN;else _0.assert(this._isBindDir(Y.dir),_0.ERR_INVALID_BIND_DIRECTION),$.dir=Y.dir,G=!0;if(Y.type!==void 0){if(typeof Y.type==="string")$.type=l8.DB_TYPE_OBJECT,$.typeClass=await this._getDbObjectClassForName(Y.type),$.objType=$.typeClass._objType;else if(Y.type.prototype instanceof VI)$.type=l8.DB_TYPE_OBJECT,$.typeClass=Y.type,$.objType=$.typeClass._objType;else _0.assert(Y.type instanceof l8.DbType,_0.ERR_INVALID_BIND_DATA_TYPE,2),$.type=Y.type;G=!0}else if(X){if($.name)_0.throwErr(_0.ERR_MISSING_TYPE_BY_NAME,$.name);_0.throwErr(_0.ERR_MISSING_TYPE_BY_POS,$.pos)}if($.dir!==P5.BIND_IN||X)if(Y.maxSize!==void 0)_0.assertParamPropValue(Number.isInteger(Y.maxSize)&&Y.maxSize>0,2,"maxSize"),$.maxSize=Y.maxSize,$.checkSize=!0,G=!0;else if(X){if($.type===l8.DB_TYPE_VARCHAR||$.type===l8.DB_TYPE_RAW){if($.name)_0.throwErr(_0.ERR_MISSING_MAX_SIZE_BY_NAME,$.name);_0.throwErr(_0.ERR_MISSING_MAX_SIZE_BY_POS,$.pos)}}else $.maxSize=P5.DEFAULT_MAX_SIZE_FOR_OUT_BINDS;if($.isArray=!1,!X){if(Y.maxArraySize!==void 0)_0.assertParamPropValue(Number.isInteger(Y.maxArraySize)&&Y.maxArraySize>0,2,"maxArraySize"),$.maxArraySize=Y.maxArraySize,$.isArray=!0}if(!X&&Y.val!==void 0)return Y.val;if(!G)_0.throwErr(_0.ERR_INVALID_BIND_UNIT)}async _processBindValue($,Y,X){let G=eF1.transformValueIn($,Y,X);if($.isArray)$.values=G.concat($.values.slice(G.length));else $.values[X.pos]=G;if($.type===l8.DB_TYPE_OBJECT&&$.typeClass===void 0)$.typeClass=await this._getDbObjectClass(Y._objType),$.objType=$.typeClass._objType}async _processExecuteBind($,Y){$.isArray=!1;let X;if(this._isBindValue(Y))$.dir=P5.BIND_IN,X=Y;else X=await this._processBindUnit($,Y,!1);if($.dir!==P5.BIND_OUT){let G={pos:0,allowArray:!0};await this._processBindValue($,X,G)}if($.type===void 0){if($.type=l8.DB_TYPE_VARCHAR,$.maxSize===void 0)$.maxSize=1}if($.isArray&&$.type!==l8.DB_TYPE_VARCHAR&&$.type!==l8.DB_TYPE_NVARCHAR&&$.type!==l8.DB_TYPE_CHAR&&$.type!==l8.DB_TYPE_NCHAR&&$.type!==l8.DB_TYPE_NUMBER&&$.type!==l8.DB_TYPE_BINARY_FLOAT&&$.type!==l8.DB_TYPE_BINARY_DOUBLE&&$.type!==l8.DB_TYPE_DATE&&$.type!==l8.DB_TYPE_TIMESTAMP&&$.type!==l8.DB_TYPE_TIMESTAMP_LTZ&&$.type!==l8.DB_TYPE_TIMESTAMP_TZ&&$.type!==l8.DB_TYPE_RAW&&$.type!==l8.DB_TYPE_INTERVAL_YM&&$.type!==l8.DB_TYPE_INTERVAL_DS)_0.throwErr(_0.ERR_INVALID_TYPE_FOR_ARRAY_BIND)}async _processExecuteBinds($){let Y=[];if(Array.isArray($))for(let X=0;X<$.length;X++){let G=Y[X]={pos:X+1,values:[]};await this._processExecuteBind(G,$[X])}else{_0.assertParamValue(Y8.isObject($),2);let X=Object.getOwnPropertyNames($);for(let G=0;G<X.length;G++){let J=Y[G]={name:X[G],values:[]};await this._processExecuteBind(J,$[X[G]])}}return Y}async _processExecuteManyBinds($,Y){let X=[],G;if(Y!==void 0)if(Array.isArray(Y)){G=!0;for(let J=0;J<Y.length;J++){let Q=X[J]={pos:J+1,values:[]};await this._processBindUnit(Q,Y[J],!0)}}else{G=!1;let J=Object.getOwnPropertyNames(Y);for(let Q=0;Q<J.length;Q++){let W=X[Q]={name:J[Q],values:[]};await this._processBindUnit(W,Y[J[Q]],!0)}}else{let J=$[0];if(_0.assertParamValue(Y8.isObjectOrArray(J),2),Array.isArray(J)){G=!0;for(let Q=0;Q<J.length;Q++)X[Q]={pos:Q+1}}else{G=!1;let Q=Object.getOwnPropertyNames(J);for(let W=0;W<Q.length;W++)X[W]={name:Q[W]}}for(let Q=0;Q<X.length;Q++)X[Q].dir=P5.BIND_IN,X[Q].isArray=!1,X[Q].values=[]}for(let J=0;J<$.length;J++){let Q=$[J],W={pos:J,allowArray:!1};_0.assert(G&&Array.isArray(Q)||!G&&Y8.isObject(Q),_0.ERR_MIXED_BIND);for(let Z=0;Z<X.length;Z++){let K=X[Z],H=G?Q[Z]:Q[K.name];await this._processBindValue(K,H,W)}}for(let J=0;J<X.length;J++){let Q=X[J];if(Q.type===void 0)Q.type=l8.DB_TYPE_VARCHAR,Q.maxSize=1}return X}_transformOutBind($,Y){let X=$;if(Array.isArray($)){X=[];for(let G=0;G<$.length;G++)X.push(this._transformOutBind($[G],Y))}else if($ instanceof oa.ResultSetImpl)X=new sa,X._setup(this,$);else if($ instanceof oa.LobImpl)X=new FV0,X._setup($,!0);else if($ instanceof oa.DbObjectImpl){let G=this._dbObjectClasses.get($._objType);if(X=Object.create(G.prototype),X._impl=$,Y.dbObjectAsPojo)X=X._toPojo();else if(X.isCollection)X=new Proxy(X,VI._collectionProxyHandler)}return X}_verifyExecOpts($,Y){let X={};if(_0.assertParamValue(Y8.isObject($),3),$.autoCommit!==void 0)_0.assertParamPropValue(typeof $.autoCommit==="boolean",3,"autoCommit"),X.autoCommit=$.autoCommit;if($.dbObjectAsPojo!==void 0)_0.assertParamPropValue(typeof $.dbObjectAsPojo==="boolean",3,"dbObjectAsPojo"),X.dbObjectAsPojo=$.dbObjectAsPojo;if($.keepInStmtCache!==void 0)_0.assertParamPropValue(typeof $.keepInStmtCache==="boolean",3,"keepInStmtCache"),X.keepInStmtCache=$.keepInStmtCache;if($.suspendOnSuccess!==void 0)_0.assertParamPropBool($,2,"suspendOnSucess"),X.suspendOnSuccess=$.suspendOnSuccess;if(Y){if($.bindDefs!==void 0)_0.assertParamPropValue(Y8.isObjectOrArray($.bindDefs),3,"bindDefs"),X.bindDefs=$.bindDefs;if($.batchErrors!==void 0)_0.assertParamPropValue(typeof $.batchErrors==="boolean",3,"batchErrors"),X.batchErrors=$.batchErrors;if($.dmlRowCounts!==void 0)_0.assertParamPropValue(typeof $.dmlRowCounts==="boolean",3,"dmlRowCounts"),X.dmlRowCounts=$.dmlRowCounts}else{if(_0.assertParamPropUnsignedIntNonZero($,3,"fetchArraySize"),X.fetchArraySize=$.fetchArraySize,$.fetchInfo!==void 0){_0.assertParamPropValue(Y8.isObject($.fetchInfo),3,"fetchInfo");let G=Object.getOwnPropertyNames($.fetchInfo),J=new Map(ta.fetchTypeMap);for(let Q of G){let W=$.fetchInfo[Q];if(W.type===void 0)_0.throwErr(_0.ERR_NO_TYPE_FOR_CONVERSION);if(W.type!==P5.DEFAULT&&W.type!==l8.DB_TYPE_VARCHAR&&W.type!==l8.DB_TYPE_RAW)_0.throwErr(_0.ERR_INVALID_TYPE_FOR_CONVERSION);J.set(Q,W.type)}X.fetchTypeMap=J}if($.fetchTypeHandler!==void 0){let G=typeof $.fetchTypeHandler;_0.assertParamPropValue(G==="function",3,"fetchTypeHandler"),X.fetchTypeHandler=$.fetchTypeHandler}if($.maxRows!==void 0)_0.assertParamPropValue(Number.isInteger($.maxRows)&&$.maxRows>=0,3,"maxRows"),X.maxRows=$.maxRows;if($.outFormat!==void 0)_0.assertParamPropValue($.outFormat===P5.OUT_FORMAT_ARRAY||$.outFormat===P5.OUT_FORMAT_OBJECT,3,"outFormat"),X.outFormat=$.outFormat;if($.prefetchRows!==void 0)_0.assertParamPropValue(Number.isInteger($.prefetchRows)&&$.prefetchRows>=0,3,"prefetchRows"),X.prefetchRows=$.prefetchRows;if($.resultSet!==void 0)_0.assertParamPropValue(typeof $.resultSet==="boolean",3,"resultSet"),X.resultSet=$.resultSet}return X}get action(){return null}set action($){_0.assertPropValue(typeof $==="string","action"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setAction($)}async beginSessionlessTransaction($={}){if(_0.assertArgCount(arguments,0,1),_0.assertParamValue(Y8.isObject($),1),$.transactionId!==void 0)_0.assertParamPropValue(Y8.isTransactionId($.transactionId),1,"transactionId");_0.assertParamPropUnsignedIntNonZero($,1,"timeout"),_0.assertParamPropBool($,1,"deferRoundTrip");let Y=Y8.normalizeTransactionId($.transactionId),{timeout:X=60,deferRoundTrip:G=!1}=$;return await this._impl.startSessionlessTransaction(Y,X,P5.TPC_BEGIN_NEW,G),Y}async breakExecution(){_0.assertArgCount(arguments,0,0),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.breakExecution()}get callTimeout(){if(this._impl)return this._impl.getCallTimeout();return}set callTimeout($){_0.assertPropValue(Number.isInteger($)&&$>=0,"callTimeout"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setCallTimeout($)}async changePassword($,Y,X){_0.assertArgCount(arguments,3,3),_0.assertParamValue(typeof $==="string",1),_0.assertParamValue(typeof Y==="string",2),_0.assertParamValue(typeof X==="string",3),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.changePassword($,Y,X)}get clientId(){return null}set clientId($){_0.assertPropValue(typeof $==="string","clientId"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setClientId($)}get clientInfo(){return null}set clientInfo($){_0.assertPropValue(typeof $==="string","clientInfo"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setClientInfo($)}async close($){let Y={};if(_0.assertArgCount(arguments,0,1),arguments.length==1)_0.assertParamValue(Y8.isObject($),1),Y=$,_0.assertParamPropBool(Y,1,"drop");_0.assert(this._impl&&!this._closing,_0.ERR_INVALID_CONNECTION),this._closing=!0;try{if(this._pool)await this._pool._release(this._impl,Y);else await this._impl.close(Y)}finally{this._closing=!1}if(delete this._impl,!this.thin)for(let X of this._dbObjectClasses.values())X._objType.refCleanup();this._dbObjectClasses.clear()}async commit(){_0.assertArgCount(arguments,0,0),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.commit()}async createLob($){_0.assertArgCount(arguments,1,1),_0.assertParamValue($===l8.DB_TYPE_CLOB||$===l8.DB_TYPE_BLOB||$===l8.DB_TYPE_NCLOB,1),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION);let Y=new FV0;return Y._setup(await this._impl.createLob($),!1),Y}get currentSchema(){if(this._impl)return this._impl.getCurrentSchema();return}set currentSchema($){_0.assertPropValue(typeof $==="string","currentSchema"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setCurrentSchema($)}get dbOp(){return null}set dbOp($){_0.assertPropValue(typeof $==="string","dbOp"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setDbOp($)}get thin(){return ta.thin}get ecid(){return null}set ecid($){_0.assertPropValue(typeof $==="string","ecid"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setECID($)}decodeOSON($){return _0.assertArgCount(arguments,1,1),_0.assertParamValue(tF1.isBuffer($),1),new $D1.OsonDecoder($).decode()}encodeOSON($){return new $D1.OsonEncoder().encode(eF1.transformJsonValue($),this._impl._osonMaxFieldNameSize)}async execute($,Y,X){let J=[],Q={};if(_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),Y8.isObject($)&&typeof $.statement==="string"){if(_0.assertArgCount(arguments,1,2),$.values){if(this._impl._callLevelTraceData)this._impl._callLevelTraceData.values=$.values;J=await this._processExecuteBinds($.values)}if($=$.statement,arguments.length==2)Q=this._verifyExecOpts(Y,!1)}else{if(_0.assertArgCount(arguments,1,3),_0.assertParamValue(typeof $==="string",1),arguments.length>=2){if(this._impl._callLevelTraceData)this._impl._callLevelTraceData.values=Y;J=await this._processExecuteBinds(Y)}if(arguments.length==3)Q=this._verifyExecOpts(X,!1)}this._addDefaultsToExecOpts(Q);let W;try{if(this._impl._callLevelTraceData)this._impl._callLevelTraceData.statement=$;W=await this._impl.execute($,1,J,Q,!1)}catch(Z){if(Z.errorNum===1406)_0.throwErr(_0.ERR_INSUFFICIENT_BUFFER_FOR_BINDS);throw Z}if(W.warning)W.warning=_0.transformErr(W.warning);if(W.resultSet!==void 0){let Z=new sa;if(Z._setup(this,W.resultSet),W.metaData=Z._impl.metaData,Q.resultSet)W.resultSet=Z;else W.rows=await Z._getAllRows(),delete W.resultSet}if(W.outBinds!==void 0)for(let[Z,K]of Object.entries(W.outBinds)){let H=this._transformOutBind(K,Q);W.outBinds[Z]=H}if(W.implicitResults)for(let[Z,K]of Object.entries(W.implicitResults)){let H=new sa;if(H._setup(this,K),Q.resultSet)W.implicitResults[Z]=H;else W.implicitResults[Z]=await H._getAllRows()}return W}async executeMany($,Y,X){let G={},J=[],Q;if(_0.assertArgCount(arguments,2,3),_0.assertParamValue(typeof $==="string",1),arguments.length==3)G=this._verifyExecOpts(X,!0);if(this._addDefaultsToExecOpts(G),typeof Y==="number"){if(_0.assertParamValue(Number.isInteger(Y)&&Y>0,2),Q=Y,G.bindDefs!==void 0)J=await this._processExecuteManyBinds([],G.bindDefs)}else _0.assertParamValue(Array.isArray(Y)&&Y.length>0,2),Q=Y.length,J=await this._processExecuteManyBinds(Y,G.bindDefs);_0.assert(this._impl,_0.ERR_INVALID_CONNECTION);let W=await this._impl.execute($,Q,J,G,!0);if(W.warning)W.warning=_0.transformErr(W.warning);if(W.outBinds!==void 0)for(let Z=0;Z<W.outBinds.length;Z++){let K=W.outBinds[Z];for(let[H,z]of Object.entries(K))K[H]=this._transformOutBind(z,G)}return W}get externalName(){if(this._impl)return this._impl.getExternalName();return}set externalName($){_0.assertPropValue(typeof $==="string","externalName"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setExternalName($)}get dbDomain(){return this._impl&&this._impl.getDbDomain()}get dbName(){return this._impl&&this._impl.getDbName()}get hostName(){return this._impl&&this._impl.getHostName()}get port(){return this._impl&&this._impl.getPort()}get protocol(){return this._impl&&this._impl.getProtocol()}get connectString(){return this._impl&&this._impl._connectString}get user(){if(this.currentSchema.length)return this.currentSchema;return this._impl&&this._impl._user}get connectTraceConfig(){return this._impl&&this._impl._getConnectTraceConfig()}async getDbObjectClass($){return _0.assertArgCount(arguments,1,1),_0.assertParamValue(typeof $==="string",1),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._getDbObjectClassForName($)}async getQueue($,Y){let X={};if(_0.assertArgCount(arguments,1,2),_0.assertParamValue(typeof $==="string",1),arguments.length==2)_0.assertParamValue(Y8.isObject(Y),2),X={...Y};_0.assert(this._impl,_0.ERR_INVALID_CONNECTION);let G=new Sc6;return await G.create(this,$,X),G}getSodaDatabase(){_0.assertArgCount(arguments,0,0),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION);let $=new kc6;return $._impl=this._impl.getSodaDatabase(),$}async getStatementInfo($){_0.assertArgCount(arguments,1,1),_0.assertParamValue(typeof $==="string",1),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION);let Y=await this._impl.getStatementInfo($);if(Y.metaData)for(let X=0;X<Y.metaData.length;X++){let G=Y.metaData[X];Y8.addTypeProperties(G,"dbType"),G.fetchType=l8.DB_TYPE_FETCH_TYPE_MAP.get(G.dbType)}return Y}get instanceName(){if(this._impl)return this._impl.getInstanceName();return}get internalName(){if(this._impl)return this._impl.getInternalName();return}set internalName($){_0.assertPropValue(typeof $==="string","internalName"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setInternalName($)}get ltxid(){if(this._impl)return this._impl.getLTXID();return}isHealthy(){return this._impl!==void 0&&!this._closing&&this._impl.isHealthy()}isCompressionEnabled(){return this._impl&&this._impl.isCompressionEnabled()}get maxIdentifierLength(){return this._impl&&this._impl.getMaxIdentifierLength()}get maxOpenCursors(){return this._impl&&this._impl.getMaxOpenCursors()}get warning(){let $=this._impl.getWarning();if($)$=_0.transformErr($);return this._impl&&$}get module(){return null}set module($){_0.assertPropValue(typeof $==="string","module"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setModule($)}get oracleServerVersion(){if(this._impl)return this._impl.getOracleServerVersion();return}get oracleServerVersionString(){if(this._impl)return this._impl.getOracleServerVersionString();return}get serviceName(){return this._impl&&this._impl.getServiceName()}get transactionInProgress(){return this._impl&&this._impl.getTransactionInProgress()}async ping(){_0.assertArgCount(arguments,0,0),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.ping()}queryStream($,Y,X){if(_0.assertArgCount(arguments,1,3),_0.assertParamValue(typeof $==="string",1),arguments.length==3)_0.assertParamValue(Y8.isObject(X),3),X={...X};else X={};X.resultSet=!0;let G=new xc6;return yc6.nextTick(async()=>{try{let J=await this.execute($,Y||[],X);if(!J.resultSet)_0.throwErr(_0.ERR_NOT_A_QUERY);G._open(J.resultSet)}catch(J){G.destroy(J);return}}),G}async resumeSessionlessTransaction($,Y={}){_0.assertArgCount(arguments,1,2),_0.assertParamValue(Y8.isTransactionId($),1),_0.assertParamValue(Y8.isObject(Y),2),_0.assertParamPropUnsignedInt(Y,2,"timeout"),_0.assertParamPropBool(Y,2,"deferRoundTrip");let X=Y8.normalizeTransactionId($),{timeout:G=60,deferRoundTrip:J=!1}=Y;return await this._impl.startSessionlessTransaction(X,G,P5.TPC_BEGIN_RESUME,J),X}async rollback(){_0.assertArgCount(arguments,0,0),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.rollback()}async shutdown($){let Y=P5.SHUTDOWN_MODE_DEFAULT;if(_0.assertArgCount(arguments,0,1),$!==void 0)_0.assertParamValue(typeof Y==="number",1),Y=$;_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.shutdown(Y)}async startup($){let Y={};if(_0.assertArgCount(arguments,0,1),arguments.length==1)_0.assertParamValue(typeof Y==="object",1),Y=$,_0.assertParamPropBool(Y,1,"force"),_0.assertParamPropBool(Y,1,"restrict"),_0.assertParamPropString(Y,1,"pfile");_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.startup(Y)}get stmtCacheSize(){if(this._impl)return this._impl.getStmtCacheSize();return}set stmtCacheSize($){_0.assertPropValue(Number.isInteger($)&&$>=0,"stmtCacheSize"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setStmtCacheSize($)}async subscribe($,Y){if(_0.assertArgCount(arguments,2,2),_0.assertParamValue(typeof $==="string",1),_0.assertParamValue(Y8.isObject(Y),2),Y={name:$,...Y},_0.assertParamPropUnsignedInt(Y,2,"namespace"),Y.namespace===void 0)Y.namespace=P5.SUBSCR_NAMESPACE_DBCHANGE;if(_0.assertParamPropString(Y,2,"ipAddress"),_0.assertParamPropUnsignedInt(Y,2,"port"),_0.assertParamPropUnsignedInt(Y,2,"timeout"),_0.assertParamPropUnsignedInt(Y,2,"operations"),_0.assertParamPropUnsignedInt(Y,2,"qos"),_0.assertParamPropUnsignedInt(Y,2,"groupingClass"),_0.assertParamPropUnsignedInt(Y,2,"groupingValue"),_0.assertParamPropUnsignedInt(Y,2,"groupingType"),_0.assertParamPropBool(Y,2,"clientInitiated"),_0.assertParamPropFunction(Y,2,"callback"),_0.assert(Y.callback,_0.ERR_MISSING_SUBSCR_CALLBACK),Y.namespace===P5.SUBSCR_NAMESPACE_DBCHANGE){if(_0.assertParamPropString(Y,2,"sql"),_0.assert(Y.sql&&Y.sql.length>0,_0.ERR_MISSING_SUBSCR_SQL),Y.binds!==void 0)Y.binds=await this._processExecuteBinds(Y.binds)}_0.assert(this._impl,_0.ERR_INVALID_CONNECTION);let X=jx.get($),G=await this._impl.subscribe(X,Y),J;if(Y.namespace===P5.SUBSCR_NAMESPACE_DBCHANGE)J=G.subscription,delete G.subscription;else J=G;return jx.set($,J),G}async suspendSessionlessTransaction(){_0.assertArgCount(arguments,0,0),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.suspendSessionlessTransaction()}get tag(){if(this._impl)return this._impl.getTag();return}set tag($){_0.assertPropValue(typeof $==="string","tag"),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),this._impl.setTag($)}async tpcBegin($,Y,X){_0.assertArgCount(arguments,1,3),_0.assertParamValue(Y8.isXid($),1);let G=Y8.normalizeXid($);if(arguments.length<3)X=60;else _0.assertParamValue(typeof X==="number",3);if(arguments.length<2)Y=P5.TPC_BEGIN_NEW;else if(_0.assertParamValue(typeof Y==="number",2),[P5.TPC_BEGIN_NEW,P5.TPC_BEGIN_JOIN,P5.TPC_BEGIN_RESUME,P5.TPC_BEGIN_PROMOTE].indexOf(Y)<0)_0.throwErr(_0.ERR_INVALID_TPC_BEGIN_FLAGS);_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.tpcBegin(G,Y,X)}async tpcCommit($,Y){if(_0.assertArgCount(arguments,0,2),arguments.length<2)Y=!1;else _0.assertParamValue(typeof Y==="boolean",2);let X;if(arguments.length>=1)_0.assertParamValue(Y8.isXid($),1),X=Y8.normalizeXid($);_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.tpcCommit(X,Y)}async tpcEnd($,Y){if(_0.assertArgCount(arguments,0,2),arguments.length<2)Y=P5.TPC_END_NORMAL;else if(_0.assertParamValue(typeof Y==="number",2),![P5.TPC_END_NORMAL,P5.TPC_END_SUSPEND].includes(Y))_0.throwErr(_0.ERR_INVALID_TPC_END_FLAGS);let X;if(arguments.length>=1)_0.assertParamValue(Y8.isXid($),1),X=Y8.normalizeXid($);_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.tpcEnd(X,Y)}async tpcForget($){_0.assertArgCount(arguments,1,1),_0.assertParamValue(Y8.isXid($),1);let Y=Y8.normalizeXid($);_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.tpcForget(Y)}async tpcPrepare($){_0.assertArgCount(arguments,0,1);let Y;if(arguments.length>=1)_0.assertParamValue(Y8.isXid($),1),Y=Y8.normalizeXid($);return _0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.tpcPrepare(Y)}async tpcRecover($){if(_0.assertArgCount(arguments,0,1),arguments.length==1)_0.assertParamValue(typeof $==="boolean",1);else $=!0;let Y=`
      SELECT
          formatid as "formatId",
          UTL_RAW.CAST_TO_VARCHAR2(globalid) as "globalTransactionId",
          UTL_RAW.CAST_TO_VARCHAR2(branchid) as "branchQualifier"
      FROM DBA_PENDING_TRANSACTIONS`,X=`
      SELECT
          formatid as "formatId",
          globalid as "globalTransactionId",
          branchid as "branchQualifier"
      FROM DBA_PENDING_TRANSACTIONS`,G={outFormat:P5.OUT_FORMAT_OBJECT,resultSet:!1};return(await this.execute($?Y:X,{},G)).rows}async tpcRollback($){_0.assertArgCount(arguments,0,1);let Y;if(arguments.length==1)_0.assertParamValue(Y8.isXid($),1),Y=Y8.normalizeXid($);_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),await this._impl.tpcRollback(Y)}async unsubscribe($){_0.assertArgCount(arguments,1,1),_0.assertParamValue(typeof $==="string",1),_0.assert(this._impl,_0.ERR_INVALID_CONNECTION),_0.assert(jx.has($),_0.ERR_INVALID_SUBSCR),await this._impl.unsubscribe(jx.get($)),setTimeout(()=>{jx.delete($)},0)}}Wz.prototype.break=Y8.callbackify(Y8.wrapFn(Wz.prototype.breakExecution));Wz.prototype.tpcRecover=Y8.callbackify(Y8.wrapFn(Wz.prototype.tpcRecover));Y8.wrapFns(Wz.prototype,"beginSessionlessTransaction","changePassword","close","commit","createLob","execute","executeMany","getDbObjectClass","getQueue","getStatementInfo","ping","resumeSessionlessTransaction","rollback","shutdown","startup","subscribe","suspendSessionlessTransaction","tpcBegin","tpcCommit","tpcEnd","tpcForget","tpcPrepare","tpcRollback","unsubscribe");Wz.prototype.release=Wz.prototype.close;XD1.exports=Wz});var NV0=o((Yq5,JD1)=>{var fc6=L0("process"),gc6=wZ();class GD1{constructor($){let Y=0;if($._totalRequestsEnqueued!==0)Y=Math.round($._totalTimeInQueue/$._totalRequestsEnqueued);this.gatheredDate=Date.now(),this.upTime=this.gatheredDate-$._createdDate,this.upTimeSinceReset=this.gatheredDate-$._timeOfReset,this.connectionRequests=$._totalConnectionRequests,this.requestsEnqueued=$._totalRequestsEnqueued,this.requestsDequeued=$._totalRequestsDequeued,this.failedRequests=$._totalFailedRequests,this.rejectedRequests=$._totalRequestsRejected,this.requestTimeouts=$._totalRequestTimeouts,this.maximumQueueLength=$._maximumQueueLength,this.currentQueueLength=$._pendingRequestQueue.size,this.timeInQueue=$._totalTimeInQueue,this.minimumTimeInQueue=$._minTimeInQueue,this.maximumTimeInQueue=$._maxTimeInQueue,this.averageTimeInQueue=Y,this.connectionsInUse=$.connectionsInUse,this.connectionsOpen=$.connectionsOpen,this.connectString=$.connectString,this.edition=$.edition,this.events=$.events,this.externalAuth=$.externalAuth,this.homogeneous=$.homogeneous,this.poolAlias=$.poolAlias,this.poolIncrement=$.poolIncrement,this.poolMax=$.poolMax,this.poolMaxPerShard=$.poolMaxPerShard,this.poolMin=$.poolMin,this.poolPingInterval=$.poolPingInterval,this.poolPingTimeout=$.poolPingTimeout,this.poolTimeout=$.poolTimeout,this.maxLifetimeSession=$.maxLifetimeSession,this.queueMax=$.queueMax,this.queueTimeout=$.queueTimeout,this.sodaMetaDataCache=$.sodaMetaDataCache,this.stmtCacheSize=$.stmtCacheSize,this.user=$.user,this.threadPoolSize=fc6.env.UV_THREADPOOL_SIZE,this.thin=gc6.thin}logStatistics(){console.log(`
Driver:`),console.log("...thin mode:",this.thin),console.log("Pool statistics:"),console.log("...gathered at:",new Date(this.gatheredDate).toISOString()),console.log("...up time (milliseconds):",this.upTime),console.log("...up time from last reset (milliseconds)",this.upTimeSinceReset),console.log("...connection requests:",this.connectionRequests),console.log("...requests enqueued:",this.requestsEnqueued),console.log("...requests dequeued:",this.requestsDequeued),console.log("...requests failed:",this.failedRequests),console.log("...requests exceeding queueMax:",this.rejectedRequests),console.log("...requests exceeding queueTimeout:",this.requestTimeouts),console.log("...current queue length:",this.currentQueueLength),console.log("...maximum queue length:",this.maximumQueueLength),console.log("...sum of time in queue (milliseconds):",this.timeInQueue),console.log("...minimum time in queue (milliseconds):",this.minimumTimeInQueue),console.log("...maximum time in queue (milliseconds):",this.maximumTimeInQueue),console.log("...average time in queue (milliseconds):",this.averageTimeInQueue),console.log("...pool connections in use:",this.connectionsInUse),console.log("...pool connections open:",this.connectionsOpen),console.log("Pool attributes:"),console.log("...connectString:",this.connectString),console.log("...edition:",this.edition),console.log("...events:",this.events),console.log("...externalAuth:",this.externalAuth),console.log("...homogeneous:",this.homogeneous),console.log("...poolAlias:",this.poolAlias),console.log("...poolIncrement:",this.poolIncrement),console.log("...poolMax:",this.poolMax),console.log("...poolMaxPerShard:",this.poolMaxPerShard),console.log("...poolMin:",this.poolMin),console.log("...poolPingInterval (seconds):",this.poolPingInterval),console.log("...poolPingTimeout (milliseconds):",this.poolPingTimeout),console.log("...poolTimeout (seconds):",this.poolTimeout),console.log("...maxLifetimeSession (seconds):",this.maxLifetimeSession),console.log("...queueMax:",this.queueMax),console.log("...queueTimeout (milliseconds):",this.queueTimeout),console.log("...sessionCallback:",this.sessionCallback),console.log("...sodaMetaDataCache:",this.sodaMetaDataCache),console.log("...stmtCacheSize:",this.stmtCacheSize),console.log("...user:",this.user),console.log("Related environment variables:"),console.log("...UV_THREADPOOL_SIZE:",this.threadPoolSize)}}JD1.exports=GD1});var ZD1=o((Xq5,WD1)=>{var mc6=DV0(),uc6=L0("events"),p2=SY(),h4=E4(),QD1=wZ(),eL=GY(),pc6=QI(),dc6=NV0();class $B extends uc6{constructor(){super();this._impl=new pc6.PoolImpl,this._queueMax=0,this._queueTimeout=0,this._enableStatistics=!1,this._timeOfReset=this._createdDate=Date.now(),this._sessionCallback=void 0,this._pendingRequestQueue=new Set,this._connectionClass=QD1.connectionClass,this._bgRequestWaiter=null,this._bgRequestId=0,this._processing=0,this._ensureNoPendingRequests=null}_checkPoolOpen($){if(this.status===p2.POOL_STATUS_DRAINING)h4.throwErr(h4.ERR_POOL_CLOSING);else if(this.status===p2.POOL_STATUS_CLOSED)h4.throwErr(h4.ERR_POOL_CLOSED);else if(!$){if(this.status===p2.POOL_STATUS_RECONFIGURING)h4.throwErr(h4.ERR_POOL_RECONFIGURING)}}get _enableStats(){return this._enableStatistics}_resetStatistics(){this._timeOfReset=Date.now(),this._totalConnectionRequests=0,this._totalRequestsEnqueued=0,this._totalRequestsDequeued=0,this._totalFailedRequests=0,this._totalRequestsRejected=0,this._totalRequestTimeouts=0,this._maximumQueueLength=this._pendingRequestQueue.size,this._totalTimeInQueue=0,this._minTimeInQueue=0,this._maxTimeInQueue=0}_setup($,Y){this._queueTimeout=$.queueTimeout,this._queueMax=$.queueMax,this._enableStatistics=$.enableStatistics,this._edition=$.edition,this._eventsFlag=$.events,this._externalAuth=$.externalAuth,this._homogeneous=$.homogeneous,this._user=$.user,this._connectString=$.connectString,this._status=p2.POOL_STATUS_OPEN,this._connectionsOut=0,this._poolAlias=Y,this._bgRequestHandler(),this._resetStatistics()}_updateWaitStatistics($){let Y=Date.now()-$.enqueuedTime;if(this._totalTimeInQueue+=Y,this._minTimeInQueue===0)this._minTimeInQueue=Y;else this._minTimeInQueue=Math.min(this._minTimeInQueue,Y);this._maxTimeInQueue=Math.max(this._maxTimeInQueue,Y)}_verifyGetConnectionOptions($){let Y={};if($.user!==void 0)h4.assertParamPropValue(typeof $.user==="string",1,"user"),Y.user=$.user;if($.username!==void 0)h4.assert(Y.user===void 0,h4.ERR_DBL_USER),h4.assertParamPropValue(typeof $.username==="string",1,"username"),Y.user=$.username;if(this.externalAuth&&Y.user&&(Y.user[0]!=="["||Y.user.slice(-1)!=="]"))h4.throwErr(h4.ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY);if($.password!==void 0){if(h4.assertParamPropValue(typeof $.password==="string",1,"password"),this.externalAuth)h4.throwErr(h4.ERR_WRONG_CRED_FOR_EXTAUTH);Y.password=$.password}if($.tag!==void 0)h4.assertParamPropValue(typeof $.tag==="string",1,"tag"),Y.tag=$.tag;if($.matchAnyTag!==void 0)h4.assertParamPropValue(typeof $.matchAnyTag==="boolean",1,"matchAnyTag"),Y.matchAnyTag=$.matchAnyTag;if($.shardingKey!==void 0){let X=$.shardingKey;h4.assertParamPropValue(eL.isShardingKey(X),1,"shardingKey"),Y.shardingKey=$.shardingKey}if($.superShardingKey!==void 0){let X=$.superShardingKey;h4.assertParamPropValue(eL.isShardingKey(X),1,"superShardingKey"),Y.superShardingKey=$.superShardingKey}if($.privilege!==void 0)h4.assertParamPropValue(eL.isPrivilege($.privilege),1,"privilege"),Y.privilege=$.privilege;return Y}async close($){let Y=0,X=!1;if(h4.assertArgCount(arguments,0,1),arguments.length==1){if(h4.assertParamValue(typeof $==="number",1),$<0||isNaN($)||$>2147483648)h4.throwErr(h4.ERR_INVALID_PARAMETER_VALUE,1);if(X=!0,this._connectionsOut>0)Y=$*1000}if(this._checkPoolOpen(!1),X)this._status=p2.POOL_STATUS_DRAINING;if(Y>0)await new Promise((G)=>{let J=setTimeout(()=>{this.removeAllListeners("_allCheckedIn"),G()},Y);this.once("_allCheckedIn",()=>{clearTimeout(J),G()})});if(!X&&this._connectionsOut>0)h4.throwErr(h4.ERR_POOL_HAS_BUSY_CONNECTIONS);if(this._processing!=0)await new Promise((G)=>this._ensureNoPendingRequests=G);if(await this._impl.close(),this._status=p2.POOL_STATUS_CLOSED,this._bgRequestWaiter)this._bgRequestWaiter();this.emit("_afterPoolClose")}get connectionsInUse(){return this._impl.getConnectionsInUse()}get connectionsOpen(){return this._impl.getConnectionsOpen()}get connectString(){return this._connectString}get thin(){return QD1.thin}get edition(){return this._edition}get enableStatistics(){return this._enableStatistics}get events(){return this._eventsFlag}get externalAuth(){return this._externalAuth}async getConnection($){let Y={};if(h4.assertArgCount(arguments,0,1),arguments.length==1)h4.assertParamValue(eL.isObject($),1),Y=this._verifyGetConnectionOptions($);if(Y.connectionClass=this._connectionClass,this._checkPoolOpen(!0),this._enableStatistics)this._totalConnectionRequests+=1;if(this._bgRequestId==Number.MAX_SAFE_INTEGER)this._bgRequestId=0;let X={id:this._bgRequestId++,options:Y,conn:null,isWaiting:!0,error:null,timeoutHandle:null,enqueuedTime:Date.now(),wasQueued:!1},G=new Promise((Q,W)=>{if(X.resolve=Q,X.reject=W,this._connectionsOut<this.poolMax)this._processRequest(X);else{if(this._pendingRequestQueue.size==this._queueMax){if(this._enableStatistics)this._totalRequestsRejected+=1;return W(h4.getErr(h4.ERR_QUEUE_MAX_EXCEEDED,this._queueMax))}if(X.wasQueued=!0,this._pendingRequestQueue.add(X),this._enableStatistics)this._totalRequestsEnqueued+=1,this._maximumQueueLength=Math.max(this._maximumQueueLength,this._pendingRequestQueue.size)}}),J=new Promise((Q,W)=>{if(this._queueTimeout>0)X.timeoutHandle=setTimeout(()=>{if(X.isWaiting=!1,this._pendingRequestQueue.delete(X),this.enableStatistics)this._totalRequestTimeouts+=1;W(h4.getErr(h4.ERR_CONN_REQUEST_TIMEOUT,this._queueTimeout))},this._queueTimeout)});try{await Promise.race([G,J])}catch(Q){X.error=Q}if(clearTimeout(X.timeoutHandle),this._enableStatistics&&X.wasQueued)this._updateWaitStatistics(X);if(X.error)throw X.error;return X.conn}async _bgRequestHandler(){while(this.status!=p2.POOL_STATUS_DRAINING||this.status!=p2.POOL_STATUS_CLOSED){let $=this._pendingRequestQueue.values().next().value;if($&&this._connectionsOut<this.poolMax)this._processRequest($);else await new Promise((Y)=>{this._bgRequestWaiter=Y}),this._bgRequestWaiter=null}for(let $ of this._pendingRequestQueue)$.reject(h4.throwErr(h4.ERR_POOL_CLOSED))}async _processRequest($){let Y=new mc6;try{if(this._processing+=1,this._connectionsOut+=1,this._pendingRequestQueue.delete($),Y._impl=await this._impl.getConnection($.options),Y._pool=this,await this._tagFixup(Y,$.options.tag),$.isWaiting)$.conn=Y;else await Y.close({});$.resolve()}catch(X){if($.isWaiting){if(this._enableStatistics)this._totalFailedRequests+=1;$.reject(X)}this._release(Y._impl,$.options)}finally{if(this._processing-=1,this.status==p2.POOL_STATUS_DRAINING&&this._processing==0&&this._ensureNoPendingRequests)this._ensureNoPendingRequests()}}async _tagFixup($,Y){let X=Y||"";if(typeof this.sessionCallback==="function"&&($._impl._newSession||$.tag!=X))try{await new Promise((G,J)=>{this.sessionCallback($,X,function(Q){if(Q)J(Q);else G()})})}catch(G){throw await $.close({drop:!0}),G}}async _release($,Y){this._connectionsOut-=1;try{if($)await $.close(Y)}finally{if(this._connectionsOut==0)this.emit("_allCheckedIn");setImmediate(()=>{if(this._pendingRequestQueue.size>0&&this._bgRequestWaiter)this._bgRequestWaiter()})}}getStatistics(){if(this._checkPoolOpen(!1),this._enableStatistics!==!0)return null;return new dc6(this)}get homogeneous(){return this._homogeneous}logStatistics(){let $=this.getStatistics();if($===null)h4.throwErr(h4.ERR_POOL_STATISTICS_DISABLED);$.logStatistics()}get poolAlias(){return this._poolAlias}get poolIncrement(){return this._impl.getPoolIncrement()}get poolMax(){return this._impl.getPoolMax()}get poolMaxPerShard(){return this._impl.getPoolMaxPerShard()}get poolMin(){return this._impl.getPoolMin()}get poolPingInterval(){return this._impl.getPoolPingInterval()}get poolPingTimeout(){return this._impl.getPoolPingTimeout()}get poolTimeout(){return this._impl.getPoolTimeout()}get maxLifetimeSession(){return this._impl.getMaxLifetimeSession()}get queueMax(){return this._queueMax}get queueTimeout(){return this._queueTimeout}async reconfigure($){if(h4.assertArgCount(arguments,1,1),h4.assertParamValue(eL.isObject($)),h4.assertParamPropUnsignedInt($,1,"queueMax"),h4.assertParamPropUnsignedInt($,1,"queueTimeout"),h4.assertParamPropBool($,1,"enableStatistics"),h4.assertParamPropBool($,1,"resetStatistics"),h4.assertParamPropUnsignedInt($,1,"poolMin"),h4.assertParamPropUnsignedIntNonZero($,1,"poolMax"),h4.assertParamPropUnsignedInt($,1,"poolMaxPerShard"),h4.assertParamPropUnsignedInt($,1,"poolIncrement"),h4.assertParamPropInt($,1,"poolPingInterval"),h4.assertParamPropUnsignedInt($,1,"poolTimeout"),h4.assertParamPropUnsignedInt($,1,"maxLifetimeSession"),h4.assertParamPropUnsignedInt($,1,"stmtCacheSize"),h4.assertParamPropBool($,1,"sodaMetaDataCache"),$.poolMin>$.poolMax)h4.throwErr(h4.ERR_INVALID_NUMBER_OF_CONNECTIONS,$.poolMax,$.poolMin);this._checkPoolOpen(!1),this._status=p2.POOL_STATUS_RECONFIGURING;try{if(await this._impl.reconfigure($),$.resetStatistics==!0||$.enableStatistics==!0&&this._enableStatistics==!1)this._resetStatistics();if($.queueMax!==void 0)this._queueMax=$.queueMax;if($.queueTimeout!==void 0)this._queueTimeout=$.queueTimeout;if($.enableStatistics!==void 0)this._enableStatistics=$.enableStatistics}finally{this._status=p2.POOL_STATUS_OPEN}}get sessionCallback(){return this._sessionCallback}async setAccessToken($){h4.assertArgCount(arguments,1,1),h4.assertParamValue(eL.isObject($),1),h4.assertParamPropString($,1,"token"),h4.assertParamPropString($,1,"privateKey"),await this._impl.setAccessToken($)}get sodaMetaDataCache(){return this._impl.getSodaMetaDataCache()}get status(){return this._status}get stmtCacheSize(){return this._impl.getStmtCacheSize()}get user(){return this._user}get connectTraceConfig(){return this._impl&&this._impl._getConnectTraceConfig()}}eL.wrapFns($B.prototype,!1,"close","getConnection","reconfigure","setAccessToken");$B.prototype.terminate=$B.prototype.close;$B.prototype._logStats=$B.prototype.logStatistics;WD1.exports=$B});var CG=o((Gq5,UD1)=>{var{Buffer:ea}=L0("buffer"),X6=E9(),d2=E4(),cc6=new Set([28,31,376,603,1012,1033,1034,1089,1090,1092,1115,2396,3113,3114,3135,12153,12514,12537,12547,12570,12571,12583,12757,16456]);class KD1{constructor($){this.errorInfo={},this.connection=$,this.messageType=X6.TNS_MSG_TYPE_FUNCTION,this.functionCode=0,this.callStatus=0,this.flushOutBinds=!1,this.endOfResponse=!1,this.endToEndSeqNum=0,this.errorOccurred=!1,this.warning=void 0}preProcess(){}async postProcess(){}writeFunctionHeader($){if(this.writePiggybacks($),$.writeUInt8(this.messageType),$.writeUInt8(this.functionCode),$.writeSeqNum(),$.caps.ttcFieldVersion>=X6.TNS_CCAP_FIELD_VERSION_23_1_EXT_1)$.writeUB8(0)}processErrorInfo($){this.callStatus=$.readUB4(),$.skipUB2(),$.skipUB4(),$.skipUB2(),$.skipUB2(),$.skipUB2(),this.errorInfo.cursorId=$.readUB2();let Y=$.readSB2();if($.skipUB1(),$.skipUB1(),$.skipUB1(),$.skipUB1(),$.skipUB1(),$.readUInt8()&X6.TNS_WARN_COMPILATION_CREATE)this.warning=d2.getErr(d2.WRN_COMPILATION_CREATE);if(this.errorInfo.rowID=$.readRowID(),$.skipUB4(),$.skipUB1(),$.skipUB1(),$.skipUB2(),$.skipUB4(),$.readUB4()>0)$.skipBytesChunked();let J=$.readUB2();if(J>0){this.errorInfo.batchErrors=[];let Z=$.readUInt8();for(let K=0;K<J;K++){if(Z===X6.TNS_LONG_LENGTH_INDICATOR)$.skipUB4();let H=$.readUB2();this.errorInfo.batchErrors.push(Error(H))}if(Z===X6.TNS_LONG_LENGTH_INDICATOR)$.skipBytes(1)}let Q=$.readUB4();if(Q>0){if(Q>65535)d2.throwErr(d2.ERR_TOO_MANY_BATCH_ERRORS);let Z=$.readUInt8(),K;for(let H=0;H<Q;H++){if(Z===X6.TNS_LONG_LENGTH_INDICATOR)$.skipUB4();if(K=$.readUB4(),H<J)this.errorInfo.batchErrors[H].offset=K}if(Z===X6.TNS_LONG_LENGTH_INDICATOR)$.skipBytes(1)}let W=$.readUB2();if(W>0){$.skipBytes(1);for(let Z=0;Z<W;Z++)$.skipUB2(),this.errorInfo.batchErrors[Z].message=$.readStr(X6.CSFRM_IMPLICIT),$.skipBytes(2)}if(this.errorInfo.num=$.readUB4(),this.errorInfo.rowCount=$.readUB8(),$.caps.ttcFieldVersion>=X6.TNS_CCAP_FIELD_VERSION_20_1)$.skipUB4(),$.skipUB4();if(this.errorInfo.num!==0){if(this.errorOccurred=!0,Y>=0)this.errorInfo.pos=Y;this.errorInfo.message=$.readStr(X6.CSFRM_IMPLICIT),this.errorInfo.message=this.errorInfo.message.trim()}this.errorInfo.isRecoverable=cc6.has(this.errorInfo.num),this.endOfResponse=!this.connection.nscon.endOfRequestSupport}processReturnParameter(){}processWarningInfo($){let Y=$.readUB2(),X=$.readUB2();if($.skipUB2(),Y!=0&&X>0){let G=$.readStr(X6.CSFRM_IMPLICIT).trim();this.warning=Error(G),this.warning.errorNum=Y}}decode($){this.process($)}process($){this.endOfResponse=!1,this.flushOutBinds=!1;do{this.savePoint($);let Y=$.readUInt8();this.processMessage($,Y)}while(!this.endOfResponse)}savePoint($){$.savePoint()}processMessage($,Y){if(Y===X6.TNS_MSG_TYPE_ERROR)this.processErrorInfo($);else if(Y===X6.TNS_MSG_TYPE_WARNING)this.processWarningInfo($);else if(Y===X6.TNS_MSG_TYPE_STATUS)this.callStatus=$.readUB4(),this.endToEndSeqNum=$.readUB2(),this.endOfResponse=!this.connection.nscon.endOfRequestSupport;else if(Y===X6.TNS_MSG_TYPE_PARAMETER)this.processReturnParameter($);else if(Y===X6.TNS_MSG_TYPE_SERVER_SIDE_PIGGYBACK)this.processServerSidePiggyBack($);else if(Y===X6.TNS_MSG_TYPE_END_OF_REQUEST)this.endOfResponse=!0;else d2.throwErr(d2.ERR_UNEXPECTED_MESSAGE_TYPE,Y,$.pos,$.packetNum)}processServerSidePiggyBack($){let Y=$.readUInt8();if(Y===X6.TNS_SERVER_PIGGYBACK_LTXID){if($.readUB4()>0)this.connection._ltxid=ea.from($.readBytesWithLength())}else if(Y===X6.TNS_SERVER_PIGGYBACK_QUERY_CACHE_INVALIDATION||Y===X6.TNS_SERVER_PIGGYBACK_TRACE_EVENT);else if(Y===X6.TNS_SERVER_PIGGYBACK_OS_PID_MTS){let X=$.readUB2();$.skipUB1(),$.skipBytes(X)}else if(Y===X6.TNS_SERVER_PIGGYBACK_SYNC){$.skipUB2(),$.skipUB1();let X=$.readUB4();$.skipBytes(1);for(let G=0;G<X;G++){let J=$.readUB2(),Q,W;if(J>0)Q=$.readStr(X6.CSFRM_IMPLICIT);if(J=$.readUB2(),J>0)W=$.readBytesWithLength();let Z=$.readUB2();if(Z==X6.TNS_KEYWORD_NUM_TRANSACTION_ID)this._updateSessionlessTxnState(W);else if(Z===X6.TNS_KEYWORD_NUM_CURRENT_SCHEMA)this.connection.currentSchema=Q;else if(Z===X6.TNS_KEYWORD_NUM_EDITION)this.connection._edition=Q}$.skipUB4()}else if(Y===X6.TNS_SERVER_PIGGYBACK_EXT_SYNC)$.skipUB2(),$.skipUB1();else if(Y===X6.TNS_SERVER_PIGGYBACK_AC_REPLAY_CONTEXT){if($.skipUB2(),$.skipUB1(),$.skipUB4(),$.skipUB4(),$.skipUB1(),$.readUB4()>0)$.skipBytesChunked()}else if(Y===X6.TNS_SERVER_PIGGYBACK_SESS_RET){$.skipUB2(),$.skipUB1();let X=$.readUB2();if(X>0){$.skipUB1();for(let J=0;J<X;++J){let Q=$.readUB2();if(Q>0)$.skipBytesChunked();if(Q=$.readUB2(),Q>0)$.skipBytesChunked();$.skipUB2()}}if($.readUB4()&X6.TNS_SESSGET_SESSION_CHANGED){if(this.connection._drcpEstablishSession)this.connection.statementCache.clearCursors()}this.connection._drcpEstablishSession=!1,$.skipUB4(),$.skipUB2()}else if(Y===X6.TNS_SERVER_PIGGYBACK_SESS_SIGNATURE)$.skipUB2(),$.skipUB1(),$.skipUB8(),$.skipUB8(),$.skipUB8();else d2.throwErr(d2.ERR_UNKOWN_SERVER_SIDE_PIGGYBACK,Y)}writePiggybacks($){if(this.connection._protocol.connInProgress)return;if(this.connection._currentSchemaModified)this._writeCurrentSchemaPiggyback($);if(this.connection.statementCache._cursorsToClose.size>0&&!this.connection._drcpEstablishSession)this.writeCloseCursorsPiggyBack($);if(this.connection._actionModified||this.connection._clientIdentifierModified||this.connection._dbopModified||this.connection._clientInfoModified||this.connection._moduleModified)this._writeEndToEndPiggybacks($);if(this.connection._tempLobsTotalSize>0)this.writeCloseTempLobsPiggyback($);if(this.connection._sessionlessData?.pending)this.connection._sessionlessData.pending=!1,this.connection._sessionlessData.piggyback.encode($),this.connection._sessionlessData.piggyback=null}writePiggybackHeader($,Y){if($.writeUInt8(X6.TNS_MSG_TYPE_PIGGYBACK),$.writeUInt8(Y),$.writeSeqNum(),$.caps.ttcFieldVersion>=X6.TNS_CCAP_FIELD_VERSION_23_1_EXT_1)$.writeUB8(0)}writeCloseCursorsPiggyBack($){this.writePiggybackHeader($,X6.TNS_FUNC_CLOSE_CURSORS),$.writeUInt8(1),this.connection.statementCache.writeCursorsToClose($)}writeCloseTempLobsPiggyback($){let Y=this.connection._tempLobsToClose,X=X6.TNS_LOB_OP_FREE_TEMP|X6.TNS_LOB_OP_ARRAY;this.writePiggybackHeader($,X6.TNS_FUNC_LOB_OP),$.writeUInt8(1),$.writeUB4(this.connection._tempLobsTotalSize),$.writeUInt8(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(X),$.writeUInt8(0),$.writeUB4(0),$.writeUB8(0),$.writeUB8(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0);for(let G of Y)$.writeBytes(G);this.connection._tempLobsToClose=[],this.connection._tempLobsTotalSize=0}_writeCurrentSchemaPiggyback($){this.writePiggybackHeader($,X6.TNS_FUNC_SET_SCHEMA),$.writeUInt8(1);let Y=ea.byteLength(this.connection.currentSchema);$.writeUB4(Y),$.writeBytesWithLength(ea.from(this.connection.currentSchema))}_writeEndToEndPiggybacks($){let Y=0;if(this.connection._actionModified)Y|=X6.TNS_END_TO_END_ACTION;if(this.connection._clientIdentifierModified)Y|=X6.TNS_END_TO_END_CLIENT_IDENTIFIER;if(this.connection._clientInfoModified)Y|=X6.TNS_END_TO_END_CLIENT_INFO;if(this.connection._moduleModified)Y|=X6.TNS_END_TO_END_MODULE;if(this.connection._dbOpModified)Y|=X6.TNS_END_TO_END_DBOP;this.writePiggybackHeader($,X6.TNS_FUNC_SET_END_TO_END_ATTR),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(Y);let X=this.writeEndEndTraceValue($,this.connection._clientIdentifier,this.connection._clientIdentifierModified),G=this.writeEndEndTraceValue($,this.connection._module,this.connection._moduleModified),J=this.writeEndEndTraceValue($,this.connection._action,this.connection._actionModified);$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0);let Q=this.writeEndEndTraceValue($,this.connection._clientInfo,this.connection._clientInfoModified);$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0);let W=this.writeEndEndTraceValue($,this.connection._dbOp,this.connection._dbOpModified);if(this.connection._clientIdentifierModified&&this.connection._clientIdentifier)$.writeBytesWithLength(X);if(this.connection._moduleModified&&this.connection._module)$.writeBytesWithLength(G);if(this.connection._actionModified&&this.connection._action)$.writeBytesWithLength(J);if(this.connection._clientInfoModified&&this.connection._clientInfo)$.writeBytesWithLength(Q);if(this.connection._dbOpModified&&this.connection._dbOp)$.writeBytesWithLength(W);this.connection._actionModified=!1,this.connection._action="",this.connection._clientIdentifierModified=!1,this.connection._clientIdentifier="",this.connection._clientInfoModified=!1,this.connection._clientInfo="",this.connection._dbOpModified=!1,this.connection._dbOp="",this.connection._moduleModified=!1,this.connection._module=""}writeEndEndTraceValue($,Y,X){let G;if(X)if($.writeUInt8(1),Y)G=ea.from(Y),$.writeUB4(G.length);else $.writeUB4(0);else $.writeUInt8(0),$.writeUB4(0);return G}saveDeferredErr(){if(!this.deferredErr)this.deferredErr=d2.getErr(...arguments)}_updateSessionlessTxnState($){let Y=$.length,X=$.readUInt8(Y-2),G=$.readUInt8(Y-1),J;if(G==X6.TNS_TPC_TRANS_TRANSACTION_ID_SYNC_VERSION_1){if(X&X6.TNS_TPC_TRANS_TRANSACTION_ID_SYNC_UNSET)this.connection._sessionlessData=null,this.connection._protocol.txnInProgress=!1;else if(X&X6.TNS_TPC_TRANS_TRANSACTION_ID_SYNC_SET){if(X&X6.TNS_TPC_TRANS_TRANSACTION_ID_SYNC_SERVER)J=!0;else if(X&X6.TNS_TPC_TRANS_TRANSACTION_ID_SYNC_CLIENT)J=!1;this.connection._sessionlessData={startedOnServer:J},this.connection._protocol.txnInProgress=!0}}else d2.throwErr(d2.ERR_INTERNAL,"Unexpected TransactionId sync version in session sync piggyback.")}}UD1.exports=KD1});var LV0=o((Jq5,zD1)=>{var{Buffer:Tx}=L0("buffer"),o7=E9(),lc6=CG();class HD1 extends lc6{constructor($,Y){super($);if(this.sourceLobImpl=Y.sourceLobImpl||null,this.operation=Y.operation,this.sourceOffset=Y.sourceOffset||0,this.destOffset=Y.destOffset||0,this.boolFlag=!1,Y.data)this.data=Y.data;this.functionCode=o7.TNS_FUNC_LOB_OP,this.sendAmount=Y.sendAmount,this.amount=Y.amount||0,this.destLength=Y.destLength||0}encode($){if(this.writeFunctionHeader($),this.sourceLobImpl===null)$.writeUInt8(0),$.writeUB4(0);else $.writeUInt8(1),$.writeUB4(this.sourceLobImpl._locator.length);if($.writeUInt8(0),$.writeUB4(this.destLength),$.writeUB4(0),$.writeUB4(0),this.operation===o7.TNS_LOB_OP_CREATE_TEMP)$.writeUInt8(1);else $.writeUInt8(0);if($.writeUInt8(0),[o7.TNS_LOB_OP_CREATE_TEMP,o7.TNS_LOB_OP_IS_OPEN,o7.TNS_LOB_OP_FILE_EXISTS,o7.TNS_LOB_OP_FILE_ISOPEN].includes(this.operation))$.writeUInt8(1);else $.writeUInt8(0);if($.writeUB4(this.operation),$.writeUInt8(0),$.writeUInt8(0),$.writeUB8(this.sourceOffset),$.writeUB8(this.destOffset),this.sendAmount)$.writeUInt8(1);else $.writeUInt8(0);for(let X=0;X<3;X++)$.writeUInt16BE(0);if(this.sourceLobImpl)$.writeBytes(this.sourceLobImpl._locator);if(this.operation===o7.TNS_LOB_OP_CREATE_TEMP)if(this.sourceLobImpl.dbType._csfrm===o7.CSFRM_NCHAR)$.caps.checkNCharsetId(),$.writeUB4(o7.TNS_CHARSET_UTF16);else $.writeUB4(o7.TNS_CHARSET_UTF8);if(this.data){let X;if($.writeUInt8(o7.TNS_MSG_TYPE_LOB_DATA),this.sourceLobImpl.dbType._oraTypeNum===o7.TNS_DATA_TYPE_BLOB)X=this.data;else if(this.sourceLobImpl.getCsfrm()===o7.CSFRM_NCHAR){if(X=this.data,Tx.isBuffer(this.data))X=X.toString();X=Tx.from(X,o7.TNS_ENCODING_UTF16).swap16()}else X=Tx.from(this.data);$.writeBytesWithLength(X)}if(this.sendAmount)$.writeUB8(this.amount)}processMessage($,Y){if(Y===o7.TNS_MSG_TYPE_LOB_DATA){let X=this.sourceLobImpl.dbType._oraTypeNum,G=$.readBytesWithLength();if(G!==null)if(X===o7.TNS_DATA_TYPE_BLOB||X===o7.TNS_DATA_TYPE_BFILE)G=Tx.from(G);else if(this.sourceLobImpl.getCsfrm()===o7.CSFRM_NCHAR)G=Tx.from(G).swap16().toString("utf16le");else G=G.toString();this.data=G}else super.processMessage($,Y)}processReturnParameter($){let Y,X,G,J;if(this.sourceLobImpl!==null)J=this.sourceLobImpl._locator.length,Y=$.readBytes(J),X=Y.slice(0,J),X.copy(this.sourceLobImpl._locator);if(this.operation===o7.TNS_LOB_OP_CREATE_TEMP)$.skipUB2(),$.skipUB1();else if(this.sendAmount)this.amount=$.readSB8();if(this.operation===o7.TNS_LOB_OP_IS_OPEN||this.operation===o7.TNS_LOB_OP_FILE_EXISTS||this.operation===o7.TNS_LOB_OP_FILE_ISOPEN)G=$.readUInt8(),this.boolFlag=G>0}}zD1.exports=HD1});var Cx=o((Qq5,FD1)=>{var{Buffer:$s}=L0("buffer"),ic6=yz0(),y9=E9(),nc6=LV0(),VD1=E4(),rc6=kY();class AD1 extends ic6{_getConnImpl(){return this.conn}async _sendMessage($){let Y=new nc6(this.conn,$);if(await this.conn._protocol._processMessage(Y),$.operation===y9.TNS_LOB_OP_READ)return Y.data?Y.data:null;else if($.operation===y9.TNS_LOB_OP_FILE_EXISTS||$.operation===y9.TNS_LOB_OP_FILE_ISOPEN)return Y.boolFlag;else return Y.amount}getChunkSize(){return this._chunkSize}async _getChunkSizeAsync(){this.checkConn();let $={operation:y9.TNS_LOB_OP_GET_CHUNK_SIZE,sourceLobImpl:this,sendAmount:!0};this._chunkSize=this._pieceSize=await this._sendMessage($)}getLength(){return this._length}getPieceSize(){return this._pieceSize}setPieceSize($){this._pieceSize=$}getType(){return this.dbType}async getData($=1,Y=this._length){let X=!1;if(!Y)Y=this._length;if(this.dbType===rc6.DB_TYPE_BFILE){if(!await this.isFileOpen())X=!0,await this.openFile()}let G;try{G=await this.read($,Y)}finally{if(X)await this.closeFile()}return G}async read($,Y){this.checkConn();let X={operation:y9.TNS_LOB_OP_READ,sourceLobImpl:this,sourceOffset:$,sendAmount:!0,amount:Y||this._pieceSize};return await this._sendMessage(X)}async write($,Y){this.checkConn();let X={operation:y9.TNS_LOB_OP_WRITE,sourceLobImpl:this,sourceOffset:$,data:Y};await this._sendMessage(X),this._length+=Y.length}getCsfrm(){if(this.dbType._csfrm!==y9.CSFRM_NCHAR){if(this._locator[y9.TNS_LOB_LOC_OFFSET_FLAG_3]&y9.TNS_LOB_LOC_FLAGS_VAR_LENGTH_CHARSET)return y9.CSFRM_NCHAR}return this.dbType._csfrm}async create($,Y){this.dirtyLength=!1,this.conn=$,this.dbType=Y,this._locator=$s.alloc(40),this._isTempLob=!0,this._length=0;let X={operation:y9.TNS_LOB_OP_CREATE_TEMP,sourceLobImpl:this,destOffset:Y._oraTypeNum,sourceOffset:Y._csfrm,destLength:y9.TNS_DURATION_SESSION};await this._sendMessage(X),await this._getChunkSizeAsync()}async fileExists(){this.checkConn();let $={operation:y9.TNS_LOB_OP_FILE_EXISTS,sourceLobImpl:this};return await this._sendMessage($)}getDirFileName(){let $=y9.TNS_LOB_LOC_FIXED_OFFSET+2,Y=this._locator.readUInt16BE(y9.TNS_LOB_LOC_FIXED_OFFSET),X=y9.TNS_LOB_LOC_FIXED_OFFSET+Y+4,G=this._locator.readUInt16BE($+Y),J=this._locator.slice($,$+Y).toString(),Q=this._locator.slice(X,X+G).toString();return{dirName:J,fileName:Q}}checkConn(){if(!this.conn.nscon.connected)VD1.throwErr(VD1.ERR_INVALID_CONNECTION)}close(){if(this.checkConn(),this._isTempLob)this.conn._tempLobsToClose.push(this._locator),this.conn._tempLobsTotalSize+=this._locator.length}async closeFile(){this.checkConn();let $={operation:y9.TNS_LOB_OP_FILE_CLOSE,sourceLobImpl:this};await this._sendMessage($)}init($,Y,X,G,J){if(this.dirtyLength=!1,this.conn=$,this._locator=Y,this._isTempLob=!1,this._locator[y9.TNS_LOB_LOC_OFFSET_FLAG_4]&y9.TNS_LOB_LOC_FLAGS_TEMP===y9.TNS_LOB_LOC_FLAGS_TEMP||this._locator[y9.TNS_LOB_LOC_OFFSET_FLAG_1]&y9.TNS_LOB_LOC_FLAGS_ABSTRACT===y9.TNS_LOB_LOC_FLAGS_ABSTRACT)this._isTempLob=!0;this.dbType=X,this._length=G,this._chunkSize=J,this._pieceSize=J}async isFileOpen(){let $={operation:y9.TNS_LOB_OP_FILE_ISOPEN,sourceLobImpl:this};await this._sendMessage($)}async openFile(){this.checkConn();let $={operation:y9.TNS_LOB_OP_FILE_OPEN,sourceLobImpl:this,amount:y9.TNS_LOB_OPEN_READ_ONLY,sendAmount:!0};return await this._sendMessage($)}setDirFileName($){let Y=$s.byteLength($.dirName),X=y9.TNS_LOB_LOC_FIXED_OFFSET+2,G=X+Y+2,J=$s.byteLength($.fileName),Q=G+J,W=$s.allocUnsafe(Q);this._locator.copy(W,0,0,y9.TNS_LOB_LOC_FIXED_OFFSET+1),W.writeUInt16BE(Y,y9.TNS_LOB_LOC_FIXED_OFFSET),W.write($.dirName,X),W.writeInt16BE(J,X+Y),W.write($.fileName,G),this._locator=W}}FD1.exports=AD1});var Gs=o((Wq5,ND1)=>{var{Buffer:YB}=L0("buffer"),b9=E9(),sJ=E4(),o8=kY(),ac6=ma(),{GrowableBuffer:sc6}=tq(),oc6=Cx();class Ys extends sc6{_readBytesWithLength($){if($===b9.TNS_LONG_LENGTH_INDICATOR)$=this.readUInt32BE();return this.readBytes($)}getIsAtomicNull($){let Y=this.readUInt8();if(Y===b9.TNS_OBJ_ATOMIC_NULL||$&&Y===b9.TNS_NULL_LENGTH_INDICATOR)return!0;return this.pos-=1,!1}readHeader($){if($.imageFlags=this.readUInt8(),$.imageVersion=this.readUInt8(),this.readLength(),($.imageFlags&b9.TNS_OBJ_NO_PREFIX_SEG)===0){let Y=this.readLength();this.skipBytes(Y)}}readLength(){let $=this.readUInt8();if($!==b9.TNS_LONG_LENGTH_INDICATOR)return $;return this.readUInt32BE()}writeHeader($){if(this.writeUInt8($.imageFlags),this.writeUInt8($.imageVersion),this.writeUInt8(b9.TNS_LONG_LENGTH_INDICATOR),this.writeUInt32BE(0),$._objType.isCollection)this.writeUInt8(1),this.writeUInt8(1)}writeLength($){if($<=b9.TNS_OBJ_MAX_SHORT_LENGTH)this.writeUInt8($);else this.writeUInt8(b9.TNS_LONG_LENGTH_INDICATOR),this.writeUInt32BE($)}_writeRawBytesAndLength($,Y){this.writeLength(Y),this.writeBytes($)}}class Xs extends ac6{constructor($,Y){if(typeof $==="function")$=$.prototype._objType;super($);if(this.packedData=Y,this.unpackedAttrs=new Map,Y)this.unpackedAssocArray=new Map,this.unpackedAssocKeys=void 0;else if($){let X=YB.from([0,34,b9.TNS_OBJ_NON_NULL_OID,b9.TNS_OBJ_HAS_EXTENT_OID]);if(this.toid=YB.concat([X,$.oid,b9.TNS_EXTENT_OID]),this.flags=b9.TNS_OBJ_TOP_LEVEL,this.imageFlags=b9.TNS_OBJ_IS_VERSION_81,this.imageVersion=b9.TNS_OBJ_IMAGE_VERSION,$.isCollection)if(this.imageFlags|=b9.TNS_OBJ_IS_COLLECTION,$.collectionType===b9.TNS_OBJ_PLSQL_INDEX_TABLE)this.unpackedAssocArray=new Map;else this.unpackedArray=[];else this.imageFlags|=b9.TNS_OBJ_NO_PREFIX_SEG}}_ensureAssocKeys(){if(!this.unpackedAssocKeys)this.unpackedAssocKeys=[...this.unpackedAssocArray.keys()].sort(($,Y)=>$-Y)}_ensureUnpacked(){if(this.packedData)this._unpackData()}_getPackedData(){if(this.packedData)return this.packedData;let $=new Ys;$.writeHeader(this),this._packData($);let Y=$.pos;return $.pos=3,$.writeUInt32BE(Y),$.buf.subarray(0,Y)}_packData($){let Y=this._objType;if(Y.isCollection)if($.writeUInt8(Y.collectionFlags),Y.collectionType===b9.TNS_OBJ_PLSQL_INDEX_TABLE){this._ensureAssocKeys(),$.writeLength(this.unpackedAssocKeys.length);for(let X of this.unpackedAssocKeys)$.writeInt32BE(X),this._packValue($,Y.elementType,Y.elementTypeClass,this.unpackedAssocArray.get(X))}else{$.writeLength(this.unpackedArray.length);for(let X of this.unpackedArray)this._packValue($,Y.elementType,Y.elementTypeClass,X)}else for(let X of Y.attributes)this._packValue($,X.type,X.typeClass,this.unpackedAttrs.get(X.name))}_packValue($,Y,X,G){if(G===null||G===void 0)if(X&&!X.prototype.isCollection)$.writeUInt8(b9.TNS_OBJ_ATOMIC_NULL);else $.writeUInt8(b9.TNS_NULL_LENGTH_INDICATOR);else switch(Y){case o8.DB_TYPE_CHAR:case o8.DB_TYPE_VARCHAR:$.writeBytesWithLength(YB.from(G));break;case o8.DB_TYPE_NCHAR:case o8.DB_TYPE_NVARCHAR:$.writeBytesWithLength(YB.from(G,"utf16le").swap16());break;case o8.DB_TYPE_NUMBER:$.writeOracleNumber(G.toString());break;case o8.DB_TYPE_BINARY_INTEGER:case o8.DB_TYPE_BOOLEAN:$.writeUInt8(4),$.writeUInt32BE(G);break;case o8.DB_TYPE_RAW:$.writeBytesWithLength(G);break;case o8.DB_TYPE_BINARY_DOUBLE:$.writeUInt8(8),$.writeBinaryDouble(G);break;case o8.DB_TYPE_BINARY_FLOAT:$.writeUInt8(4),$.writeBinaryFloat(G);break;case o8.DB_TYPE_DATE:case o8.DB_TYPE_TIMESTAMP:case o8.DB_TYPE_TIMESTAMP_LTZ:case o8.DB_TYPE_TIMESTAMP_TZ:$.writeOracleDate(G,Y);break;case o8.DB_TYPE_OBJECT:if(this._objType.isCollection||G._objType.isCollection)$.writeBytesWithLength(G._getPackedData());else G._packData($);break;default:sJ.throwErr(sJ.ERR_NOT_IMPLEMENTED,Y)}}_unpackData(){let $=new Ys(this.packedData);$.readHeader(this),this._unpackDataFromBuf($),this.packedData=void 0}_unpackDataFromBuf($){let Y,X,G,J,Q=this._objType;if(Q.isCollection){if(Q.collectionType===b9.TNS_OBJ_PLSQL_INDEX_TABLE)X=new Map;else Y=[];this.collectionFlags=$.readUInt8();let W=$.readLength();for(let Z=0;Z<W;Z++){if(Q.collectionType===b9.TNS_OBJ_PLSQL_INDEX_TABLE)G=$.readUInt32BE();let K=this._unpackValue($,Q.elementType,Q.elementTypeClass);if(Q.collectionType===b9.TNS_OBJ_PLSQL_INDEX_TABLE)X.set(G,K);else Y.push(K)}}else{J=new Map;for(let W of Q.attributes){let Z=this._unpackValue($,W.type,W.typeClass);J.set(W.name,Z)}}this.unpackedAttrs=J,this.unpackedArray=Y,this.unpackedAssocArray=X}_unpackValue($,Y,X){let G,J,Q,W;switch(Y){case o8.DB_TYPE_NUMBER:return $.readOracleNumber();case o8.DB_TYPE_BINARY_INTEGER:return $.readBinaryInteger();case o8.DB_TYPE_VARCHAR:case o8.DB_TYPE_CHAR:return $.readStr(b9.CSFRM_IMPLICIT);case o8.DB_TYPE_NVARCHAR:case o8.DB_TYPE_NCHAR:return $.readStr(b9.CSFRM_NCHAR);case o8.DB_TYPE_RAW:if(Q=$.readBytesWithLength(),Q!==null)Q=YB.from(Q);return Q;case o8.DB_TYPE_BINARY_DOUBLE:return $.readBinaryDouble();case o8.DB_TYPE_BINARY_FLOAT:return $.readBinaryFloat();case o8.DB_TYPE_DATE:case o8.DB_TYPE_TIMESTAMP:return $.readOracleDate(!0);case o8.DB_TYPE_TIMESTAMP_LTZ:case o8.DB_TYPE_TIMESTAMP_TZ:return $.readOracleDate(!1);case o8.DB_TYPE_BOOLEAN:return $.readBool();case o8.DB_TYPE_OBJECT:case o8.DB_TYPE_XMLTYPE:if(J=new Xs(X),W=J._objType.isCollection||this._objType.isCollection,G=$.getIsAtomicNull(W),G)return null;if(J._objType.isXmlType)return DD1(J._objType._connection,$.readBytesWithLength());if(W)J.packedData=YB.from($.readBytesWithLength());else J._unpackDataFromBuf($);return J;default:sJ.throwErr(sJ.ERR_NOT_IMPLEMENTED,Y)}}append($){if(this._ensureUnpacked(),this.unpackedArray){let Y=this._objType;if(Y.maxNumElements>0&&this.unpackedArray.length>=Y.maxNumElements)sJ.throwErr(sJ.ERR_INVALID_COLL_INDEX_SET,this.unpackedArray.length,0,Y.maxNumElements-1);this.unpackedArray.push($)}else{this._ensureAssocKeys();let Y;if(this.unpackedAssocKeys.length===0)Y=0;else{let X=this.unpackedAssocKeys.length-1;Y=this.unpackedAssocKeys[X]+1}this.unpackedAssocArray.set(Y,$),this.unpackedAssocKeys.push(Y)}}copy(){let $=new Xs(this._objType,this._getPackedData());return $.toid=this.toid,$.flags=this.flags,$.imageFlags=this.imageFlags,$.imageVersion=this.imageVersion,$}deleteElement($){if(this._ensureUnpacked(),this.unpackedArray){if(this._objType.collectionType==b9.TNS_OBJ_VARRAY)sJ.throwErr(sJ.ERR_DELETE_ELEMENTS_OF_VARRAY);this.unpackedArray.splice($,1)}else this.unpackedAssocKeys=void 0,this.unpackedAssocArray.delete($)}getAttrValue($){this._ensureUnpacked();let Y=this.unpackedAttrs.get($.name);if(Y===void 0)return null;return Y}getElement($){let Y;if(this._ensureUnpacked(),this.unpackedArray)Y=this.unpackedArray[$];else Y=this.unpackedAssocArray.get($);if(Y===void 0)sJ.throwErr(sJ.ERR_INVALID_COLL_INDEX_GET,$);return Y}getFirstIndex(){if(this._ensureUnpacked(),this.unpackedArray)return 0;else if(this.unpackedAssocArray)return this._ensureAssocKeys(),this.unpackedAssocKeys[0]}getKeys(){if(this._ensureUnpacked(),this.unpackedArray)return Array.from(this.unpackedArray.keys());else if(this.unpackedAssocArray)return this._ensureAssocKeys(),Array.from(this.unpackedAssocKeys);return[]}getLastIndex(){if(this._ensureUnpacked(),this.unpackedArray){if(this.unpackedArray.length>0)return this.unpackedArray.length-1}else if(this.unpackedAssocArray)return this._ensureAssocKeys(),this.unpackedAssocKeys[this.unpackedAssocKeys.length-1]}getNextIndex($){if(this._ensureUnpacked(),this.unpackedArray){if($+1<this.unpackedArray.length)return $+1}else if(this.unpackedAssocArray){this._ensureAssocKeys();for(let Y of this.unpackedAssocKeys)if(Y>$)return Y}}getPrevIndex($){if(this._ensureUnpacked(),this.unpackedArray){if($>0)return $-1}else if(this.unpackedAssocArray){this._ensureAssocKeys();let Y;for(let X of this.unpackedAssocKeys){if(X>=$)return Y;Y=X}}}getValues(){let $=[];if(this._ensureUnpacked(),this.unpackedArray)return Array.from(this.unpackedArray);else if(this.unpackedAssocArray){this._ensureAssocKeys();for(let Y of this.unpackedAssocKeys)$.push(this.unpackedAssocArray.get(Y))}return $}getLength(){if(this._ensureUnpacked(),this.unpackedArray)return this.unpackedArray.length;if(this.unpackedAssocArray)return this.unpackedAssocArray.size}hasElement($){if(this._ensureUnpacked(),this.unpackedArray)return $>=0&&$<this.unpackedArray.length;return this.unpackedAssocArray.has($)}setAttrValue($,Y){this._ensureUnpacked(),this.unpackedAttrs.set($.name,Y)}setElement($,Y){if(this._ensureUnpacked(),this.unpackedArray){let X=Math.max(this.unpackedArray.length-1,0);if($>X)sJ.throwErr(sJ.ERR_INVALID_COLL_INDEX_SET,$,0,X);this.unpackedArray[$]=Y}else{if(!this.unpackedAssocArray.has($))this.unpackedAssocKeys=void 0;this.unpackedAssocArray.set($,Y)}}trim($){if(this._ensureUnpacked(),$>0)this.unpackedArray=this.unpackedArray.slice(0,this.unpackedArray.length-$)}}function DD1($,Y){let X,G=new Ys(Y),J={};G.readHeader(J),G.skipBytes(1);let Q=G.readUInt32BE();if(Q&b9.TNS_XML_TYPE_FLAG_SKIP_NEXT_4)G.skipBytes(4);let W=G.numBytesLeft(),Z=G.readBytes(W);if(Q&b9.TNS_XML_TYPE_STRING)X=Z.toString();else if(Q&b9.TNS_XML_TYPE_LOB){let K=new oc6,H=YB.from(Z);K.init($,H,o8.DB_TYPE_CLOB,0,0),X=K}else sJ.throwErr(sJ.ERR_UNEXPECTED_XML_TYPE,Q);return X}ND1.exports={ThinDbObjectImpl:Xs,readXML:DD1}});var BV0=o((Zq5,ED1)=>{var{Buffer:mA}=L0("buffer"),LD1=WI(),e0=E9(),tc6=CG(),{ThinDbObjectImpl:ec6,readXML:$l6}=Gs(),Yl6=Cx(),uA=E4(),o5=kY();class OD1 extends tc6{constructor($,Y=null,X=null){super($);this.statement=Y,this.options=X,this.offset=0,this.numExecs=1,this.arrayDmlRowCounts=!1,this.requiresDefine=!1,this.rowIndex=Y.bufferRowCount||0,this.dmlRowCounts=[],this.batchErrors=!1,this.outVariables=[],this.inFetch=!1,this.parseOnly=!1,this.resultSetsToSetup=[],this.deferredErr=null}processMessage($,Y){if(Y===e0.TNS_MSG_TYPE_DESCRIBE_INFO){$.skipBytesChunked();let X=this.statement.queryVars;this.statement.numQueryVars=0,this.statement.bufferRowCount=0,this.statement.bufferRowIndex=0,this.processDescribeInfo($,this.resultSet,X),this.outVariables=this.statement.queryVars}else if(Y===e0.TNS_MSG_TYPE_ROW_HEADER)this.processRowHeader($);else if(Y===e0.TNS_MSG_TYPE_ROW_DATA)this.processRowData($);else if(Y===e0.TNS_MSG_TYPE_IMPLICIT_RESULTSET)this.processImplicitResultSet($);else if(Y===e0.TNS_MSG_TYPE_BIT_VECTOR)this.processBitVector($);else if(Y===e0.TNS_MSG_TYPE_IO_VECTOR)this.processIOVector($);else if(Y===e0.TNS_MSG_TYPE_FLUSH_OUT_BINDS)this.flushOutBinds=!0,this.endOfResponse=!0;else if(Y===e0.TNS_MSG_TYPE_ERROR)this.processErrorInfo($);else super.processMessage($,Y)}processErrorInfo($){if(super.processErrorInfo($),this.errorInfo.cursorId!==0)this.statement.cursorId=this.errorInfo.cursorId;if(!this.statement.isPlSql)this.statement.rowCount=this.errorInfo.rowCount;if(this.errorInfo.rowCount>0)this.statement.lastRowid=LD1.encodeRowID(this.errorInfo.rowID);if(this.options.batchErrors=this.errorInfo.batchErrors,this.batchErrors&&this.options.batchErrors===null)this.options.batchErrors=[];if(this.errorInfo.num===e0.TNS_ERR_NO_DATA_FOUND&&this.statement.isQuery)this.errorInfo.num=0,this.errorOccurred=!1,this.statement.moreRowsToFetch=!1;else if(this.retry)this.retry=!1;else if(this.statement.isQuery&&(this.errorInfo.num===e0.TNS_ERR_VAR_NOT_IN_SELECT_LIST||this.errorInfo.num===e0.TNS_ERR_INCONSISTENT_DATA_TYPES))this.retry=!0,this.connection.statementCache.clearCursor(this.statement);else if(this.errorInfo.num!==0&&this.errorInfo.cursorId!==0){if(!uA.ERR_INTEGRITY_ERROR_CODES.includes(this.errorInfo.num))this.connection.statementCache.clearCursor(this.statement),this.statement.returnToCache=!1}if(this.errorInfo.batchErrors)this.errorOccurred=!1}_adjustFetchType($,Y){if(Y.fetchInfo.dbType._oraTypeNum===e0.TNS_DATA_TYPE_CLOB&&$.fetchInfo.fetchType._oraTypeNum===e0.TNS_DATA_TYPE_LONG||Y.fetchInfo.dbType._oraTypeNum===e0.TNS_DATA_TYPE_BLOB&&$.fetchInfo.fetchType._oraTypeNum===e0.TNS_DATA_TYPE_LONG_RAW||Y.fetchInfo.dbType._oraTypeNum===e0.TNS_DATA_TYPE_JSON&&$.fetchInfo.fetchType._oraTypeNum===e0.TNS_DATA_TYPE_VARCHAR||Y.fetchInfo.dbType._oraTypeNum===e0.TNS_DATA_TYPE_VECTOR&&$.fetchInfo.fetchType._oraTypeNum===e0.TNS_DATA_TYPE_LONG)Y.type=$.fetchInfo.fetchType,Y.maxSize=$.maxSize}processDescribeInfo($,Y,X){let G=Y.statement;if($.skipUB4(),G.numQueryVars=$.readUB4(),G.numQueryVars>0)$.skipUB1();let J=[],Q=[];for(let Z=0;Z<G.numQueryVars;Z++){let K=this.processColumnInfo($,Z+1);if(X&&Z<X.length)this._adjustFetchType(X[Z],K);Q.push(K),J.push(K.fetchInfo)}let W=$.readUB4();if(W>0)$.skipBytesChunked();if($.skipUB4(),$.skipUB4(),$.skipUB4(),$.skipUB4(),W=$.readUB4(),W>0)$.skipBytesChunked();Y.metaData=J,G.queryVars=Q,this.resultSetsToSetup.push(Y)}processColumnInfo($,Y){let X=$.readUInt8();$.skipUB1();let G=$.readInt8(),J=$.readInt8(),Q=$.readUB4();$.skipUB4(),$.skipUB8();let W,Z=$.readUB4();if(Z>0)W=mA.from($.readBytesWithLength());$.skipUB2(),$.skipUB2();let K=$.readUInt8(),H=$.readUB4();if(X===e0.TNS_DATA_TYPE_RAW)H=Q;if($.caps.ttcFieldVersion>=e0.TNS_CCAP_FIELD_VERSION_12_2)$.skipUB4();let z=Boolean($.readUInt8());$.skipUB1();let V;if(Z=$.readUB4(),Z>0)V=$.readStr(e0.CSFRM_IMPLICIT);let A;if(Z=$.readUB4(),Z>0)A=$.readStr(e0.CSFRM_IMPLICIT);Z=$.readUB4();let F;if(Z>0)F=$.readStr(e0.CSFRM_IMPLICIT);$.skipUB2();let N=$.readUB4(),D={name:V,dbColumnName:V,dbType:o5.getTypeByOraTypeNum(X,K),nullable:z};if(D.isJson=Boolean(N&e0.TNS_UDS_FLAGS_IS_JSON),D.isOson=Boolean(N&e0.TNS_UDS_FLAGS_IS_OSON),$.caps.ttcFieldVersion>=e0.TNS_CCAP_FIELD_VERSION_23_1){if(Z=$.readUB4(),Z>0)D.domainSchema=$.readStr(e0.CSFRM_IMPLICIT);if(Z=$.readUB4(),Z>0)D.domainName=$.readStr(e0.CSFRM_IMPLICIT)}if($.caps.ttcFieldVersion>=e0.TNS_CCAP_FIELD_VERSION_23_1_EXT_3){if($.readUB4()>0){D.annotations={},$.skipUB1();let L=$.readUB4();$.skipUB1();let B,O;for(let E=0;E<L;E++){if($.skipUB4(),O="",B=$.readStr(e0.CSFRM_IMPLICIT),Z=$.readUB4(),Z>0)O=$.readStr(e0.CSFRM_IMPLICIT);D.annotations[B]=O,$.skipUB4()}$.skipUB4()}}if($.caps.ttcFieldVersion>=e0.TNS_CCAP_FIELD_VERSION_23_4){let L=$.readUB4(),B=$.readUInt8(),O=$.readUInt8();if(D.dbType===o5.DB_TYPE_VECTOR){if(!(O&e0.VECTOR_META_FLAG_FLEXIBLE_DIM))D.vectorDimensions=L;if(D.isSparseVector=Boolean(O&e0.VECTOR_META_FLAG_SPARSE),B!==e0.VECTOR_FORMAT_FLEX)D.vectorFormat=B}}switch(D.dbType){case o5.DB_TYPE_VARCHAR:case o5.DB_TYPE_NVARCHAR:case o5.DB_TYPE_CHAR:case o5.DB_TYPE_NCHAR:case o5.DB_TYPE_RAW:D.byteSize=H;break;case o5.DB_TYPE_NUMBER:D.precision=G;break;case o5.DB_TYPE_TIMESTAMP:case o5.DB_TYPE_TIMESTAMP_TZ:case o5.DB_TYPE_TIMESTAMP_LTZ:D.precision=J;break;case o5.DB_TYPE_OBJECT:if(D.dbTypeClass=this.connection._getDbObjectType(A,F,void 0,W),D.dbTypeClass.partial)this.connection._partialDbObjectTypes.push(D.dbTypeClass);if(D.dbTypeClass.isXmlType)D.dbType=o5.DB_TYPE_XMLTYPE;break;default:break}if(D.dbType===o5.DB_TYPE_NUMBER)D.scale=J;return{fetchInfo:D,type:D.dbType,maxSize:Q,columnNum:Y,values:Array(this.options.fetchArraySize)}}processRowHeader($){$.skipUB1(),$.skipUB2(),$.skipUB4(),$.skipUB4(),$.skipUB2();let Y=$.readUB4();if(Y>0)this.bitVector=mA.from($.readBytesWithLength());if(Y=$.readUB4(),Y>0)$.skipBytesChunked()}isDuplicateData($){if(!this.bitVector)return!1;let Y=Math.floor($/8),X=$%8;return(this.bitVector[Y]&1<<X)===0}processRowData($){let Y;for(let[X,G]of this.outVariables.entries())if(G.isArray){G.numElementsInArray=$.readUB4();let J=Array(G.numElementsInArray).fill(null);for(let Q=0;Q<G.numElementsInArray;Q++)Y=this.processColumnData($,G,Q),J[Q]=Y;G.values[this.rowIndex]=J}else if(this.statement.isReturning){let J=$.readUB4(),Q=Array(J).fill(null);for(let W=0;W<J;W++)Q[W]=this.processColumnData($,G,W);G.values[this.rowIndex]=Q}else if(this.isDuplicateData(X)){if(this.rowIndex===0&&G.outConverter)Y=G.lastRawValue;else Y=G.values[this.statement.lastRowIndex];G.values[this.rowIndex]=Y}else Y=this.processColumnData($,G,this.rowIndex),G.values[this.rowIndex]=Y;if(this.rowIndex++,this.inFetch)this.statement.lastRowIndex=this.rowIndex-1,this.statement.bufferRowCount++,this.bitVector=null}processIOVector($){let Y;$.skipUB1();let X=$.readUB2(),J=$.readUB4()*256+X;if($.skipUB4(),$.skipUB2(),Y=$.readUB2(),Y>0)$.skipBytes(Y);if(Y=$.readUB2(),Y>0)$.skipBytes(Y);this.outVariables=[];for(let Q=0;Q<J;Q++){let W=this.statement.bindInfoList[Q];if(W.bindDir=$.readUInt8(),W.bindDir===e0.TNS_BIND_DIR_INPUT)continue;this.outVariables.push(W.bindVar)}}processColumnData($,Y){let X=Y.type,G=X._oraTypeNum,J=X._csfrm,Q=Y.maxSize,W=null;if(Q===0&&G!==e0.TNS_DATA_TYPE_LONG&&G!==e0.TNS_DATA_TYPE_LONG_RAW&&G!==e0.TNS_DATA_TYPE_UROWID)W=null;else if(G===e0.TNS_DATA_TYPE_VARCHAR||G===e0.TNS_DATA_TYPE_CHAR||G===e0.TNS_DATA_TYPE_LONG){if(J===e0.CSFRM_NCHAR)$.caps.checkNCharsetId();W=$.readStr(J)}else if(G===e0.TNS_DATA_TYPE_RAW||G===e0.TNS_DATA_TYPE_LONG_RAW){if(W=$.readBytesWithLength(),W!==null)W=mA.from(W)}else if(G===e0.TNS_DATA_TYPE_NUMBER){if(W=$.readOracleNumber(),!this.inFetch&&W!==null)W=parseFloat(W)}else if(G===e0.TNS_DATA_TYPE_DATE||G===e0.TNS_DATA_TYPE_TIMESTAMP||G===e0.TNS_DATA_TYPE_TIMESTAMP_LTZ||G===e0.TNS_DATA_TYPE_TIMESTAMP_TZ){let Z=G===e0.TNS_DATA_TYPE_DATE||G===e0.TNS_DATA_TYPE_TIMESTAMP;W=$.readOracleDate(Z)}else if(G===e0.TNS_DATA_TYPE_ROWID)if(!this.inFetch)W=$.readStr(e0.CSFRM_IMPLICIT);else{let Z=$.readUInt8();if(BD1(Z))W=null;else{let K=$.readRowID();W=LD1.encodeRowID(K)}}else if(G===e0.TNS_DATA_TYPE_UROWID)if(!this.inFetch)W=$.readStr(e0.CSFRM_IMPLICIT);else W=$.readURowID();else if(G===e0.TNS_DATA_TYPE_BINARY_DOUBLE)W=$.readBinaryDouble();else if(G===e0.TNS_DATA_TYPE_BINARY_FLOAT)W=$.readBinaryFloat();else if(G===e0.TNS_DATA_TYPE_BINARY_INTEGER){if(W=$.readOracleNumber(),W!==null)W=parseFloat(W)}else if(G===e0.TNS_DATA_TYPE_CURSOR){let Z=$.readUInt8();if(BD1(Z))W=null;else if(W=this.createCursorFromDescribe($),W.statement.cursorId=$.readUB2(),W.statement.cursorId===0&&Y.dir!==e0.BIND_IN)if(this.options.nullifyInvalidCursor)W=null;else uA.throwErr(uA.ERR_INVALID_REF_CURSOR)}else if(G===e0.TNS_DATA_TYPE_BOOLEAN)W=$.readBool();else if(G===e0.TNS_DATA_TYPE_INTERVAL_YM)W=$.readOracleIntervalYM();else if(G===e0.TNS_DATA_TYPE_INTERVAL_DS)W=$.readOracleIntervalDS();else if(G===e0.TNS_DATA_TYPE_CLOB||G===e0.TNS_DATA_TYPE_BLOB||G===e0.TNS_DATA_TYPE_BFILE){let Z=0,K=0;if($.readUB4()>0){if(W=new Yl6,G!==e0.TNS_DATA_TYPE_BFILE)Z=$.readUB8(),K=$.readUB4();let z=mA.from($.readBytesWithLength());W.init(this.connection,z,X,Z,K)}}else if(G===e0.TNS_DATA_TYPE_JSON)W=$.readOson();else if(G===e0.TNS_DATA_TYPE_VECTOR)W=$.readVector();else if(G===e0.TNS_DATA_TYPE_INT_NAMED){let Z=$.readDbObject();if(Z.packedData){let K=Y.fetchInfo?Y.fetchInfo.dbTypeClass:Y.typeClass;if(Y.type===o5.DB_TYPE_XMLTYPE)W=$l6(this.connection,Z.packedData);else W=new ec6(K,Z.packedData),W.toid=Z.toid,W.oid=Z.oid}}else uA.throwErr(uA.ERR_UNSUPPORTED_DATA_TYPE,X.num,Y.columnNum);if(!this.inFetch){let Z=$.readSB4();if(Z<0&&G===e0.TNS_DATA_TYPE_BOOLEAN)W=null;else if(Z!==0&&W!==null&&G!==e0.TNS_DATA_TYPE_INT_NAMED)this.saveDeferredErr(uA.ERR_INSUFFICIENT_BUFFER_FOR_BINDS)}else if(G===e0.TNS_DATA_TYPE_LONG||G===e0.TNS_DATA_TYPE_LONG_RAW||Y.maxSize>$.caps.maxStringSize)$.skipSB4(),$.skipUB4();return W}processReturnParameter($){let Y=0,X,G=$.readUB2();for(let Q=0;Q<G;Q++)$.skipUB4();let J=$.readUB2();if(J>0)$.skipBytes(J);G=$.readUB2();for(let Q=0;Q<G;Q++){if(J=$.readUB2(),J>0)X=$.readStr(e0.CSFRM_IMPLICIT);if(J=$.readUB2(),J>0)$.skipBytesChunked();if(Y=$.readUB2(),Y===e0.TNS_KEYWORD_NUM_CURRENT_SCHEMA)this.connection.currentSchema=X;else if(Y===e0.TNS_KEYWORD_NUM_EDITION)this.connection._edition=X}if(J=$.readUB2(),J>0)$.skip(J);if(this.arrayDmlRowCounts){let Q=$.readUB4(),W=this.options.dmlRowCounts=[];for(let Z=0;Z<Q;Z++){let K=$.readUB8();W.push(K)}}}async postProcess(){if(this.deferredErr)throw this.deferredErr;if(this.outVariables){for(let $ of this.outVariables)if($.isArray){if($.outConverter)for(let Y=0;Y<$.numElementsInArray;Y++)$.values[0][Y]=await $.outConverter($.values[0][Y])}else if($.outConverter)$.values[0]=await $.outConverter($.values[0])}await this.connection._populatePartialDbObjectTypes();for(let $ of this.resultSetsToSetup){$._setup(this.options,$.metaData);for(let Y of $.statement.queryVars)if(Y.type===o5.DB_TYPE_CLOB||Y.type===o5.DB_TYPE_NCLOB||Y.type===o5.DB_TYPE_BLOB||Y.type===o5.DB_TYPE_JSON||Y.type===o5.DB_TYPE_VECTOR){if(Y.type!==Y.fetchInfo.fetchType)Y.type=Y.fetchInfo.fetchType,Y.maxSize=e0.TNS_MAX_LONG_LENGTH;if(!$.statement.noPrefetch)$.statement.requiresDefine=!0,$.statement.noPrefetch=!0}}}preProcess(){if(this.statement.isReturning&&!this.parseOnly){this.outVariables=[];for(let $ of this.statement.bindInfoList)if($.isReturnBind)this.outVariables.push($.bindVar)}if(this.statement.isQuery){if(this.inFetch=!0,this.statement.queryVars){this.outVariables=[];for(let $=0;$<this.statement.queryVars.length;$++)this.outVariables.push(this.statement.queryVars[$])}}}processBitVector($){this.numColumnsSent=$.readUB2();let Y=Math.floor(this.statement.numQueryVars/8);if(this.statement.numQueryVars%8>0)Y+=1;this.bitVector=mA.from($.readBytes(Y))}processBindParams($,Y){let X=[],G=[];for(let J of Y){if(!J.isReturnBind)G.push(J);X.push(J.bindVar)}return this.writeColumnMetadata($,X),G}writeColumnMetadata($,Y){for(let X of Y){let G=X.type._oraTypeNum,J=X.maxSize||X.type._bufferSizeFactor,Q=0;if(X.type._csfrm===e0.CSFRM_NCHAR)J=Math.min(J*X.type._bufferSizeFactor,e0.TNS_MAX_LONG_LENGTH);if([e0.TNS_DATA_TYPE_ROWID,e0.TNS_DATA_TYPE_UROWID].includes(G))G=e0.TNS_DATA_TYPE_VARCHAR,J=e0.TNS_MAX_UROWID_LENGTH;let W=e0.TNS_BIND_USE_INDICATORS;if(X.isArray)W|=e0.TNS_BIND_ARRAY;let Z=0;if(X.type===o5.DB_TYPE_BLOB||X.type===o5.DB_TYPE_CLOB||X.type===o5.DB_TYPE_NCLOB)Z=e0.TNS_LOB_PREFETCH_FLAG;else if(X.type===o5.DB_TYPE_JSON)Z=e0.TNS_LOB_PREFETCH_FLAG,J=Q=e0.TNS_JSON_MAX_LENGTH;else if(X.type===o5.DB_TYPE_VECTOR)Z=e0.TNS_LOB_PREFETCH_FLAG,J=Q=e0.TNS_VECTOR_MAX_LENGTH;if($.writeUInt8(G),$.writeUInt8(W),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(J),X.isArray)$.writeUB4(X.maxArraySize);else $.writeUB4(0);if($.writeUB4(Z),X.objType){let K=X.objType;$.writeUB4(K.oid.length),$.writeBytesWithLength(K.oid),$.writeUB2(K.version)}else $.writeUB4(0),$.writeUB2(0);if(X.type._csfrm!==0)$.writeUB2(e0.TNS_CHARSET_UTF8);else $.writeUB2(0);if($.writeUInt8(X.type._csfrm),$.writeUB4(Q),$.caps.ttcFieldVersion>=e0.TNS_CCAP_FIELD_VERSION_12_2)$.writeUB4(0)}}writeBindParamsRow($,Y,X){let G=this.offset,J=!1;for(let Q of Y){if(Q.isReturnBind)continue;let W=Q.bindVar;if(W.isArray){let Z=W.values.length;$.writeUB4(Z);for(let K=0;K<Z;K++)this.writeBindParamsColumn($,W,W.values[K])}else if(!this.statement.isPlSql&&W.maxSize>$.caps.maxStringSize)J=!0;else this.writeBindParamsColumn($,W,W.values[X+G])}if(J)for(let Q of Y){if(Q.isReturnBind)continue;let W=Q.bindVar;if(W.maxSize>$.caps.maxStringSize)this.writeBindParamsColumn($,W,W.values[X+G])}}writeBindParamsColumn($,Y,X){let G=Y.type._oraTypeNum,J;if((X===void 0||X===null)&&G!==e0.TNS_DATA_TYPE_CURSOR&&G!==e0.TNS_DATA_TYPE_JSON)if(G===e0.TNS_DATA_TYPE_BOOLEAN)$.writeUInt8(e0.TNS_ESCAPE_CHAR),$.writeUInt8(1);else if(G===e0.TNS_DATA_TYPE_INT_NAMED)$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(e0.TNS_OBJ_TOP_LEVEL);else $.writeUInt8(0);else if(G===e0.TNS_DATA_TYPE_NUMBER||G===e0.TNS_DATA_TYPE_BINARY_INTEGER){if(typeof X==="boolean")J=X?"1":"0";else J=X.toString();$.writeOracleNumber(J)}else if(G===e0.TNS_DATA_TYPE_VARCHAR||G===e0.TNS_DATA_TYPE_CHAR||G===e0.TNS_DATA_TYPE_LONG||G===e0.TNS_DATA_TYPE_RAW||G===e0.TNS_DATA_TYPE_LONG_RAW){if(Y.type._csfrm===e0.CSFRM_NCHAR)$.caps.checkNCharsetId(),X=mA.from(X,e0.TNS_ENCODING_UTF16).swap16();else X=mA.from(X);$.writeBytesWithLength(X)}else if(G===e0.TNS_DATA_TYPE_DATE||G===e0.TNS_DATA_TYPE_TIMESTAMP||G===e0.TNS_DATA_TYPE_TIMESTAMP_TZ||G===e0.TNS_DATA_TYPE_TIMESTAMP_LTZ)$.writeOracleDate(X,Y.type);else if(G===e0.TNS_DATA_TYPE_BINARY_DOUBLE)$.writeUInt8(8),$.writeBinaryDouble(X);else if(G===e0.TNS_DATA_TYPE_BINARY_FLOAT)$.writeUInt8(4),$.writeBinaryFloat(X);else if(G===e0.TNS_DATA_TYPE_CURSOR){let Q=X;if(!X)Q=this.connection._createResultSet();if(Q.statement.cursorId===0)$.writeUInt8(1),$.writeUInt8(0);else $.writeUB4(1),$.writeUB4(Q.statement.cursorId)}else if(G===e0.TNS_DATA_TYPE_BOOLEAN)if(X)$.writeUInt8(2),$.writeUInt16BE(257);else $.writeUInt16BE(256);else if(G===e0.TNS_DATA_TYPE_INTERVAL_YM)$.writeOracleIntervalYM(X);else if(G===e0.TNS_DATA_TYPE_INTERVAL_DS)$.writeOracleIntervalDS(X);else if(G===e0.TNS_DATA_TYPE_CLOB||G===e0.TNS_DATA_TYPE_BLOB||G===e0.TNS_DATA_TYPE_BFILE)$.writeUB4(X._locator.length),$.writeBytesWithLength(X._locator);else if([e0.TNS_DATA_TYPE_ROWID,e0.TNS_DATA_TYPE_UROWID].includes(G))$.writeBytesWithLength(mA.from(X));else if(G===e0.TNS_DATA_TYPE_JSON)$.writeOson(X,this.connection._osonMaxFieldNameSize);else if(G===e0.TNS_DATA_TYPE_VECTOR)$.writeVector(X);else if(G===e0.TNS_DATA_TYPE_INT_NAMED)$.writeDbObject(X);else{let Q=`Binding data of type ${Y.type}`;uA.throwErr(uA.ERR_NOT_IMPLEMENTED,Q)}}createCursorFromDescribe($){let Y=this.connection._createResultSet(this.options);return Y.options.moreRowsToFetch=!0,Y.statement.isQuery=!0,Y.statement.requiresFullExecute=!0,this.processDescribeInfo($,Y),Y}processImplicitResultSet($){this.options.implicitResultSet=[];let Y=$.readUB4();for(let X=0;X<Y;X++){let G=$.readUInt8();$.skipBytes(G);let J=this.createCursorFromDescribe($);J.statement.cursorId=$.readUB2(),this.options.implicitResultSet.push(J)}}}var BD1=($)=>{return $===0||$===e0.TNS_NULL_LENGTH_INDICATOR};ED1.exports=OD1});var OV0=o((Kq5,qD1)=>{var Xl6=CG(),Gl6=E9(),MD1=E4();class RD1 extends Xl6{constructor($){super($);if(this.functionCode=Gl6.TNS_FUNC_TPC_TXN_SWITCH,this.applicationValue=0,this.internalName=$.internalName,this.internalName)this.internalName=Buffer.from(this.internalName);if(this.externalName=$.externalName,this.externalName)this.externalName=Buffer.from(this.externalName)}processReturnParameter($){if(this.applicationValue=$.readUB4(),this.contextLen=$.readUB2(),this.contextLen>0)this.context=Buffer.from($.readBytes(this.contextLen))}encode($){if(this.connection._sessionlessData?.pending)MD1.throwErr(MD1.ERR_SESSIONLESS_ALREADY_ACTIVE);let Y;if(this.xid){if(Y=Buffer.alloc(128),this.xid.globalTransactionId.copy(Y),this.xid.branchQualifier)this.xid.branchQualifier.copy(Y,this.xid.globalTransactionId.length)}if(this.writeFunctionHeader($),$.writeUB4(this.operation),this.context)$.writeUInt8(1),$.writeUB4(this.context.length);else $.writeUInt8(0),$.writeUB4(0);if(this.xid)$.writeUB4(this.xid.formatId),$.writeUB4(this.xid.globalTransactionId.length),$.writeUB4(this.xid.branchQualifier.length),$.writeUInt8(1),$.writeUB4(Y.length);else $.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0);if($.writeUB4(this.flags),$.writeUB4(this.timeout?this.timeout:0),$.writeUInt8(1),$.writeUInt8(1),$.writeUInt8(1),this.internalName)$.writeUInt8(1),$.writeUB4(this.internalName.length);else $.writeUInt8(0),$.writeUB4(0);if(this.externalName)$.writeUInt8(1),$.writeUB4(this.externalName.length);else $.writeUInt8(0),$.writeUB4(0);if(this.context)$.writeBytes(this.context);if(this.xid)$.writeBytes(Y);if($.writeUB4(this.applicationValue),this.internalName)$.writeBytes(this.internalName);if(this.externalName)$.writeBytes(this.externalName)}}qD1.exports=RD1});var EV0=o((Uq5,PD1)=>{var Jl6=BV0(),M9=E9(),Js=E4(),Ql6=OV0();class ID1 extends Jl6{constructor($,Y,X,G){super($,Y,X);if(!G&&Y.isQuery)G=$._createResultSet(X,Y);this.resultSet=G,this.functionCode=M9.TNS_FUNC_EXECUTE,this.bindParams=void 0,this.currentRow=0}writeExecuteMessage($){let Y=0,X=0,G=0,J=1,Q=this.statement,W=Q.bindInfoList;if(this.noImplicitRelease)X|=M9.TNS_EXEC_OPTION_NO_IMPL_REL;if(!Q.requiresDefine&&!this.parseOnly&&W)G=W.length;if(Q.requiresDefine)Y|=M9.TNS_EXEC_OPTION_DEFINE;else if(!this.parseOnly&&Q.sql)X|=M9.TNS_EXEC_OPTION_IMPLICIT_RESULTSET,Y|=M9.TNS_EXEC_OPTION_EXECUTE;if(Q.cursorId===0||Q.isDdl)Y|=M9.TNS_EXEC_OPTION_PARSE;if(Q.isQuery)if(this.parseOnly)Y|=M9.TNS_EXEC_OPTION_DESCRIBE;else{if(Q.cursorId===0||Q.requiresDefine)J=this.options.prefetchRows;else J=this.options.fetchArraySize;if(J>0&&!Q.noPrefetch)Y|=M9.TNS_EXEC_OPTION_FETCH}if(!Q.isPlSql&&!this.parseOnly)Y|=M9.TNS_EXEC_OPTION_NOT_PLSQL;else if(Q.isPlSql&&G>0)Y|=M9.TNS_EXEC_OPTION_PLSQL_BIND;if(G>0)Y|=M9.TNS_EXEC_OPTION_BIND;if(this.batchErrors)Y|=M9.TNS_EXEC_OPTION_BATCH_ERRORS;if(this.arrayDmlRowCounts)X|=M9.TNS_EXEC_OPTION_DML_ROWCOUNTS;if(this.options.autoCommit)Y|=M9.TNS_EXEC_OPTION_COMMIT;if(this.options.suspendOnSuccess)this._handleSuspendSessionless();if(this.writeFunctionHeader($),$.writeUB4(Y),$.writeUB4(Q.cursorId),Q.cursorId===0||Q.isDdl)$.writeUInt8(1),$.writeUB4(Q.sqlLength);else $.writeUInt8(0),$.writeUB4(0);if($.writeUInt8(1),$.writeUB4(13),$.writeUInt8(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(J),$.writeUB4(M9.TNS_MAX_LONG_LENGTH),G===0)$.writeUInt8(0),$.writeUB4(0);else $.writeUInt8(1),$.writeUB4(G);if($.writeUInt8(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUInt8(0),Q.requiresDefine)$.writeUInt8(1),$.writeUB4(this.statement.queryVars.length);else $.writeUInt8(0),$.writeUB4(0);if($.writeUB4(0),$.writeUInt8(0),$.writeUInt8(1),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUB4(0),this.arrayDmlRowCounts)$.writeUInt8(1),$.writeUB4(this.numExecs),$.writeUInt8(1);else $.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0);if($.caps.ttcFieldVersion>=M9.TNS_CCAP_FIELD_VERSION_12_2){if($.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.caps.ttcFieldVersion>=M9.TNS_CCAP_FIELD_VERSION_12_2_EXT1)$.writeUInt8(0),$.writeUB4(0)}if(Q.cursorId===0||Q.isDdl)if(Q.sql)$.writeBytesWithLength(Q.sqlBytes),$.writeUB4(1);else Js.throwErr(Js.ERR_INVALID_REF_CURSOR);else $.writeUB4(0);if(Q.isQuery)if(Q.cursorId===0)$.writeUB4(0);else $.writeUB4(J);else $.writeUB4(this.numExecs);if($.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(Q.isQuery?1:0),$.writeUB4(0),$.writeUB4(X),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),Q.requiresDefine)this.writeColumnMetadata($,this.statement.queryVars);else if(G>0)return this.processBindParams($,W)}writeReExecuteMessage($){let Y=this.statement,X=Y.bindInfoList,G=0,J=0,Q;if(X!==void 0){if(!Y.isQuery)this.outVariables=[],X.forEach((Z)=>{if(Z.bindDir!==M9.TNS_BIND_DIR_INPUT)this.outVariables.push(Z.bindVar)});let W=[];X.forEach((Z)=>{if(Z.bindDir!==M9.TNS_BIND_DIR_OUTPUT&&!Z.isReturnBind)W.push(Z)}),X=W}if(this.functionCode===M9.TNS_FUNC_REEXECUTE_AND_FETCH)G|=M9.TNS_EXEC_OPTION_EXECUTE,Q=this.options.prefetchRows;else{if(this.options.autoCommit)J|=M9.TNS_EXEC_OPTION_COMMIT_REEXECUTE;Q=this.numExecs}if(this.options.suspendOnSuccess)this._handleSuspendSessionless();return this.writeFunctionHeader($),$.writeUB4(Y.cursorId),$.writeUB4(Q),$.writeUB4(G),$.writeUB4(J),X}_handleSuspendSessionless(){let $=this.connection._sessionlessData;if(this.connection._validateSessionlessState(),!$)Js.throwErr(Js.ERR_SESSIONLESS_INACTIVE);if($.piggyback)$.piggyback.operation|=M9.TNS_TPC_TXN_POST_DETACH;else{let Y=new Ql6(this.connection);Y.operation=M9.TNS_TPC_TXN_POST_DETACH,Y.flags=M9.TNS_TPC_TRANS_SESSIONLESS,Y.messageType=M9.TNS_MSG_TYPE_PIGGYBACK,$.piggyback=Y,$.pending=!0}}encode($){if(this.currentRow===0){let Y=this.statement;if(Y.cursorId!==0&&!Y.requiresFullExecute&&!this.parseOnly&&!Y.requiresDefine&&!Y.noPrefetch&&!Y.isDdl&&!this.batchErrors){if(Y.isQuery&&this.options.prefetchRows>0)this.functionCode=M9.TNS_FUNC_REEXECUTE_AND_FETCH;else this.functionCode=M9.TNS_FUNC_REEXECUTE;this.bindParams=this.writeReExecuteMessage($)}else this.functionCode=M9.TNS_FUNC_EXECUTE,this.bindParams=this.writeExecuteMessage($)}if(this.bindParams&&this.bindParams.length>0){let Y=$.nsi.ntAdapter;while(this.currentRow<this.numExecs)if($.writeUInt8(M9.TNS_MSG_TYPE_ROW_DATA),this.writeBindParamsRow($,this.bindParams,this.currentRow),this.currentRow++,this.currentRow<this.numExecs&&Y.shouldPauseWrite())return!0}this.currentRow=0,this.bindParams=void 0}}PD1.exports=ID1});var MV0=o((Hq5,jD1)=>{var Wl6=E9(),Zl6=BV0(),wD1=E4();class _D1 extends Zl6{constructor($,Y,X,G){super($,Y,X);this.resultSet=G,this.functionCode=Wl6.TNS_FUNC_FETCH}encode($){if(this.writeFunctionHeader($),this.statement.cursorId===0)wD1.throwErr(wD1.ERR_CURSOR_HAS_BEEN_CLOSED);$.writeUB4(this.statement.cursorId),$.writeUB4(this.options.fetchArraySize)}}jD1.exports=_D1});var RV0=o((zq5,CD1)=>{var Kl6=uz0(),Ul6=EV0(),Hl6=MV0();class TD1 extends Kl6{async _fetchMoreRows($){let X=new(this.statement.requiresFullExecute?Ul6:Hl6)(this.connection,this.statement,$,this);await this.connection._protocol._processMessage(X),this.statement.requiresFullExecute=!1}_resultSetNew($,Y,X){this.connection=$,this.statement=Y,this._nestedCursorIndices=[],this.options=X,this.prefetchRowsProcessed=!1,this.statement.bufferRowIndex=0}close(){this.connection._returnStatement(this.statement)}_processRows($){let Y=[],X=this.statement.bufferRowIndex;for(let G=X;G<X+$;G++){let J=[];for(let Q=0;Q<this.statement.numQueryVars;Q++)J.push(this.statement.queryVars[Q].values[G]);Y.push(J)}if(this.statement.bufferRowIndex+=$,this.statement.bufferRowIndex===this.statement.bufferRowCount)this.statement.bufferRowCount=0,this.statement.bufferRowIndex=0;return Y}async getRows($,Y){if(Y.fetchArraySize=$||this.options.fetchArraySize,Y.prefetchRows=this.options.prefetchRows,this.statement.bufferRowCount-this.statement.bufferRowIndex>=Y.fetchArraySize)return this._processRows(Y.fetchArraySize);else{Y.fetchArraySize=Y.fetchArraySize-(this.statement.bufferRowCount-this.statement.bufferRowIndex);let G=this.statement.bufferRowCount;if(this.statement.moreRowsToFetch&&Y.fetchArraySize>0)await this._fetchMoreRows(Y);if(Y.fetchArraySize=$||this.options.fetchArraySize,G===this.statement.bufferRowCount){let J=this.statement.bufferRowCount-this.statement.bufferRowIndex;if(this.statement.bufferRowCount=0,J>0)return this._processRows(J);return[]}}let X=this.statement.bufferRowCount-this.statement.bufferRowIndex;return this._processRows(X)}}CD1.exports=TD1});var yD1=o((Vq5,xD1)=>{var{Buffer:SD1}=L0("buffer"),u1=E9(),kD1=E4();class vD1{constructor($){this.protocolVersion=$.sAtts.version,this.ttcFieldVersion=u1.TNS_CCAP_FIELD_VERSION_MAX,this.supports12cLogon=!0,this.supportsOob=!1,this.nCharsetId=u1.TNS_CHARSET_UTF16,this.compileCaps=SD1.alloc(u1.TNS_CCAP_MAX),this.runtimeCaps=SD1.alloc(u1.TNS_RCAP_MAX),this.initCompileCaps($),this.initRuntimeCaps(),this.maxStringSize=0}adjustForServerCompileCaps($,Y){if($[u1.TNS_CCAP_FIELD_VERSION]<this.ttcFieldVersion)this.ttcFieldVersion=$[u1.TNS_CCAP_FIELD_VERSION],this.compileCaps[u1.TNS_CCAP_FIELD_VERSION]=this.ttcFieldVersion;if(this.ttcFieldVersion<u1.TNS_CCAP_FIELD_VERSION_23_4&&Y.endOfRequestSupport)this.compileCaps[u1.TNS_CCAP_TTC4]^=u1.TNS_CCAP_END_OF_REQUEST,Y.endOfRequestSupport=!1}adjustForServerRuntimeCaps($){if($[u1.TNS_RCAP_TTC]&u1.TNS_RCAP_TTC_32K)this.maxStringSize=32767;else this.maxStringSize=4000}initCompileCaps($){if(this.compileCaps[u1.TNS_CCAP_SQL_VERSION]=u1.TNS_CCAP_SQL_VERSION_MAX,this.compileCaps[u1.TNS_CCAP_LOGON_TYPES]=u1.TNS_CCAP_O5LOGON|u1.TNS_CCAP_O5LOGON_NP|u1.TNS_CCAP_O7LOGON|u1.TNS_CCAP_O8LOGON_LONG_IDENTIFIER|u1.TNS_CCAP_O9LOGON_LONG_PASSWORD,this.compileCaps[u1.TNS_CCAP_FIELD_VERSION]=this.ttcFieldVersion,this.compileCaps[u1.TNS_CCAP_SERVER_DEFINE_CONV]=1,this.compileCaps[u1.TNS_CCAP_DEQUEUE_WITH_SELECTOR]=1,this.compileCaps[u1.TNS_CCAP_TTC1]=u1.TNS_CCAP_FAST_BVEC|u1.TNS_CCAP_END_OF_CALL_STATUS|u1.TNS_CCAP_IND_RCD,this.compileCaps[u1.TNS_CCAP_OCI1]=u1.TNS_CCAP_FAST_SESSION_PROPAGATE|u1.TNS_CCAP_APP_CTX_PIGGYBACK,this.compileCaps[u1.TNS_CCAP_TDS_VERSION]=u1.TNS_CCAP_TDS_VERSION_MAX,this.compileCaps[u1.TNS_CCAP_RPC_VERSION]=u1.TNS_CCAP_RPC_VERSION_MAX,this.compileCaps[u1.TNS_CCAP_RPC_SIG]=u1.TNS_CCAP_RPC_SIG_VALUE,this.compileCaps[u1.TNS_CCAP_DBF_VERSION]=u1.TNS_CCAP_DBF_VERSION_MAX,this.compileCaps[u1.TNS_CCAP_LOB]=u1.TNS_CCAP_LOB_UB8_SIZE|u1.TNS_CCAP_LOB_ENCS|u1.TNS_CCAP_LOB_PREFETCH|u1.TNS_CCAP_LOB_TEMP_SIZE|u1.TNS_CCAP_LOB_12C|u1.TNS_CCAP_LOB_PREFETCH_DATA,this.compileCaps[u1.TNS_CCAP_UB2_DTY]=1,this.compileCaps[u1.TNS_CCAP_LOB2]=u1.TNS_CCAP_LOB2_QUASI|u1.TNS_CCAP_LOB2_2GB_PREFETCH,this.compileCaps[u1.TNS_CCAP_TTC3]=u1.TNS_CCAP_IMPLICIT_RESULTS|u1.TNS_CCAP_BIG_CHUNK_CLR|u1.TNS_CCAP_KEEP_OUT_ORDER|u1.TNS_CCAP_LTXID,this.compileCaps[u1.TNS_CCAP_OCI3]=u1.TNS_CCAP_OCI3_OCSSYNC,this.compileCaps[u1.TNS_CCAP_TTC2]=u1.TNS_CCAP_ZLNP,this.compileCaps[u1.TNS_CCAP_OCI2]=u1.TNS_CCAP_DRCP,this.compileCaps[u1.TNS_CCAP_CLIENT_FN]=u1.TNS_CCAP_CLIENT_FN_MAX,this.compileCaps[u1.TNS_CCAP_SESS_SIGNATURE_VERSION]=u1.TNS_CCAP_FIELD_VERSION_12_2,this.compileCaps[u1.TNS_CCAP_TTC4]=u1.TNS_CCAP_INBAND_NOTIFICATION,$.endOfRequestSupport)this.compileCaps[u1.TNS_CCAP_TTC4]|=u1.TNS_CCAP_END_OF_REQUEST;this.compileCaps[u1.TNS_CCAP_CTB_FEATURE_BACKPORT]=u1.TNS_CCAP_CTB_IMPLICIT_POOL|u1.TNS_CCAP_CTB_OAUTH_MSG_ON_ERR,this.compileCaps[u1.TNS_CCAP_TTC5]=u1.TNS_CCAP_VECTOR_SUPPORT|u1.TNS_CCAP_TTC5_SESSIONLESS_TXNS,this.compileCaps[u1.TNS_CCAP_VECTOR_FEATURES]=u1.TNS_CCAP_VECTOR_FEATURE_BINARY|u1.TNS_CCAP_VECTOR_FEATURE_SPARSE}initRuntimeCaps(){this.runtimeCaps[u1.TNS_RCAP_COMPAT]=u1.TNS_RCAP_COMPAT_81,this.runtimeCaps[u1.TNS_RCAP_TTC]=u1.TNS_RCAP_TTC_ZERO_COPY|u1.TNS_RCAP_TTC_32K}checkNCharsetId(){if(this.nCharsetId!==u1.TNS_CHARSET_UTF16)kD1.throwErr(kD1.ERR_NCHAR_CS_NOT_SUPPORTED,this.nCharsetId)}}xD1.exports=vD1});var cD1=o((Aq5,dD1)=>{var{BaseBuffer:hD1}=tq(),{Buffer:JU}=L0("buffer"),vY=E9(),fD1=qx(),bD1=WI(),gD1=ba(),Qs=E4(),AI=JU.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","utf8");class qV0{constructor($){this.allocLen=$;let Y=$%vY.CHUNKED_BYTES_CHUNK_SIZE;if(Y>0)this.allocLen+=vY.CHUNKED_BYTES_CHUNK_SIZE-Y;this.buf=JU.allocUnsafe(this.allocLen),this.actualLen=0}}class mD1{constructor(){this.chunks=[]}endChunkedRead(){if(this.chunks.length>1){let Y=0;for(let J of this.chunks)Y+=J.actualLen;let X=0,G=new qV0(Y);for(let J of this.chunks)J.buf.copy(G.buf,X,0,J.actualLen),X+=J.actualLen;G.actualLen=Y,this.chunks=[G]}let $=this.chunks[0];return $.buf.subarray(0,$.actualLen)}getBuf($){let Y;if(this.chunks.length>0){if(Y=this.chunks[this.chunks.length-1],Y.allocLen-Y.actualLen<$)Y=void 0}if(!Y)Y=new qV0($),this.chunks.push(Y);let X=Y.buf.subarray(Y.actualLen,Y.actualLen+$);return Y.actualLen+=$,X}startChunkedRead(){if(this.chunks.length>0)this.chunks=this.chunks.splice(0,1),this.chunks[0].actualLen=0}}class uD1 extends hD1{constructor($,Y){super();this.nsi=$,this.caps=Y,this.chunkedBytesBuf=new mD1}_readBytesWithLength($){if($!==vY.TNS_LONG_LENGTH_INDICATOR)return this.readBytes($);this.chunkedBytesBuf.startChunkedRead();while(!0){let Y=this.readUB4();if(Y===0)break;this.readBytes(Y,!0)}return this.chunkedBytesBuf.endChunkedRead()}skipBytes($){if(this.pos===this.size)this.receivePacket();let Y=this.numBytesLeft();if($<=Y){this.pos+=$;return}$-=Y;while($>0){this.receivePacket();let X=Math.min($,this.size-this.pos);this.pos+=X,$-=X}}readBytes($,Y=!1){if(this.pos===this.size)this.receivePacket();let X=this.numBytesLeft();if($<=X){let Q;if(Y)Q=this.chunkedBytesBuf.getBuf($),this.buf.copy(Q,0,this.pos,this.pos+$);else Q=this.buf.subarray(this.pos,this.pos+$);return this.pos+=$,Q}let G;if(Y)G=this.chunkedBytesBuf.getBuf($);else G=JU.allocUnsafe($);let J=0;this.buf.copy(G,J,this.pos,this.pos+X),J+=X,$-=X;while($>0){this.receivePacket();let Q=Math.min($,this.size-this.pos);this.buf.copy(G,J,this.pos,this.pos+Q),this.pos+=Q,J+=Q,$-=Q}return G}receivePacket(){if(this.savedPacketPos===this.savedPackets.length){let $=this.nsi.syncRecvPacket();if(!$||this.nsi.isBreak)throw new bD1.OutOfPacketsError;this.savedPackets.push($)}this.startPacket(this.savedPackets[this.savedPacketPos++])}restorePoint(){this.savedPacketPos=0,this.startPacket(this.savedPackets[this.savedPacketPos++]),this.pos=this.savedPos}savePoint(){if(this.savedPackets)this.savedPackets=this.savedPackets.splice(this.savedPacketPos-1);else this.savedPackets=[this.packet];this.savedPacketPos=1,this.savedPos=this.pos}startPacket($){this.packet=$,this.buf=$.buf,this.pos=10,this.size=$.buf.length,this.packetNum=$.num}async waitForPackets($=!1){let Y=await this.nsi.recvPacket();if(!this.savedPackets)this.savedPackets=[Y],this.savedPacketPos=0;else this.savedPackets.push(Y);if($&&this.nsi.endOfRequestSupport)while(Y.type===vY.TNS_PACKET_TYPE_DATA){if(Y.buf.readUInt16BE(8)&vY.TNS_DATA_FLAGS_END_OF_REQUEST)break;if(Y.buf.length===11&&Y.buf[10]===vY.TNS_MSG_TYPE_END_OF_REQUEST)break;Y=await this.nsi.recvPacket(),this.savedPackets.push(Y)}this.startPacket(this.savedPackets[this.savedPacketPos++])}readOson(){if(this.readUB4()===0)return null;this.skipUB8(),this.skipUB4();let Y=new fD1.OsonDecoder(this.readBytesWithLength());return this.skipBytesChunked(),Y.decode()}readURowID(){let $=0,Y=1,X=this.readBytesWithLength();if(X===null)return null;X=this.readBytesWithLength();let G=X.length;if(X&&X[0]===1){let Z=X.readUInt32BE(1),K=X.readUInt16BE(5),H=X.readUInt32BE(7),z=X.readUInt16BE(11);return bD1.encodeRowID({rba:Z,partitionID:K,blockNum:H,slotNum:z})}let J=Math.floor(G/3)*4,Q=G%3;if(Q===1)J+=1;else if(Q===2)J+=3;let W=JU.allocUnsafe(J);G-=1,W[0]=42,$+=1;while(G>0){let Z=X[Y]>>2;if(W[$]=AI[Z],$+=1,Z=(X[Y]&3)<<4,G==1){W[$]=AI[Z];break}if(Y+=1,Z|=(X[Y]&240)>>4,W[$]=AI[Z],$+=1,Z=(X[Y]&15)<<2,G==2){W[$]=AI[Z];break}Y+=1,Z|=(X[Y]&192)>>6,W[$]=AI[Z],$+=1,Z=X[Y]&63,W[$]=AI[Z],$+=1,Y+=1,G-=3}return W.toString("utf-8")}readRowID(){let $=this.readUB4(),Y=this.readUB2();this.skipUB1();let X=this.readUB4(),G=this.readUB2();return{rba:$,partitionID:Y,blockNum:X,slotNum:G}}readVector(){if(this.readUB4()===0)return null;this.skipUB8(),this.skipUB4();let Y=new gD1.VectorDecoder(this.readBytesWithLength());return this.skipBytesChunked(),Y.decode()}skipBytesChunked(){let $=this.readUInt8();if($===0||$===vY.TNS_NULL_LENGTH_INDICATOR)return;if($!==vY.TNS_LONG_LENGTH_INDICATOR)this.skipBytes($);else while(!0){let Y=this.readUB4();if(Y===0)break;this.skipBytes(Y)}}readNullTerminatedBytes($=50){let Y=0,X=JU.allocUnsafe($);while(Y<$){if(X[Y]=this.readUInt8(),X[Y]===0)break;Y=Y+1}if(Y===$){let G=`Byte Arrray Exceeded MaxSize ${$}`;Qs.throwErr(Qs.ERR_INTERNAL,G)}return X.subarray(0,Y+1)}}class pD1 extends hD1{constructor($,Y,X){super($.sAtts.sdu);this.size=this.maxSize,this.isLargeSDU=$.sAtts.version>=vY.TNS_VERSION_MIN_LARGE_SDU,this.protocol=X,this.packetType=vY.TNS_PACKET_TYPE_DATA,this.caps=Y,this.nsi=$}_grow(){this._sendPacket()}_sendPacket($=!1){let Y=this.pos;if(this.pos=0,this.isLargeSDU)this.writeUInt32BE(Y);else this.writeUInt16BE(Y),this.writeUInt16BE(0);this.writeUInt8(this.packetType),this.writeUInt8(0),this.writeUInt16BE(0);let X=this.buf.subarray(0,Y);if(!$)X=JU.from(X),this.startPacket();else this.buf.writeUInt16BE(2048,8);if(!this.nsi.ntAdapter)Qs.throwErr(Qs.ERR_INVALID_CONNECTION);this.nsi.sendPacket(X)}startPacket($=0){if(this.pos=vY.PACKET_HEADER_SIZE,this.packetType===vY.TNS_PACKET_TYPE_DATA)this.writeUInt16BE($)}startRequest($,Y=0){this.packetType=$,this.startPacket(Y)}endRequest(){if(this.pos>vY.PACKET_HEADER_SIZE)this._sendPacket(!0)}writeKeyValue($,Y,X=0){let G=JU.byteLength($),J=JU.byteLength(Y);if(this.writeUB4(G),this.writeBytesWithLength(JU.from($)),this.writeUB4(J),J>0)this.writeBytesWithLength(JU.from(Y));this.writeUB4(X)}writeOson($,Y,X=!0){let J=new fD1.OsonEncoder().encode($,Y);this.writeQLocator(J.length,X),this.writeBytesWithLength(J)}writeSeqNum(){this.writeUInt8(this.protocol.sequenceId),this.protocol.sequenceId=(this.protocol.sequenceId+1)%256}writeVector($){let X=new gD1.VectorEncoder().encode($);this.writeQLocator(X.length),this.writeBytesWithLength(X)}writeQLocator($,Y=!0){if(this.writeUB4(40),Y)this.writeUInt8(40);this.writeUInt16BE(38),this.writeUInt16BE(vY.TNS_LOB_QLOCATOR_VERSION),this.writeUInt8(vY.TNS_LOB_LOC_FLAGS_VALUE_BASED|vY.TNS_LOB_LOC_FLAGS_BLOB|vY.TNS_LOB_LOC_FLAGS_ABSTRACT),this.writeUInt8(vY.TNS_LOB_LOC_FLAGS_INIT),this.writeUInt16BE(0),this.writeUInt16BE(1),this.writeUInt64BE($),this.writeUInt16BE(0),this.writeUInt16BE(0),this.writeUInt16BE(0),this.writeUInt64BE(0),this.writeUInt64BE(0)}}dD1.exports={ReadPacket:uD1,WritePacket:pD1}});var rD1=o((Fq5,nD1)=>{var XB=E9(),zl6=yD1(),{WritePacket:Vl6,ReadPacket:Al6}=cD1(),GB=E4(),Fl6=WI(),lD1=fa();class iD1{constructor($){this._breakInProgress=!1,this.txnInProgress=!1,this.connInProgress=!0,this.nsi=$.nscon,this.sequenceId=1,this.caps=new zl6($.nscon),this.writeBuf=new Vl6($.nscon,this.caps,this),this.readBuf=new Al6($.nscon,this.caps),this.callTimeout=0}async _decodeMessage($){$.preProcess(),await this.readBuf.waitForPackets(!0);while(!0){if(this.nsi.isBreak)await this.resetMessage(),delete this.readBuf.savedPackets,await this.readBuf.waitForPackets();try{$.decode(this.readBuf);break}catch(Y){if(Y instanceof Fl6.OutOfPacketsError){if(!this.nsi.isBreak)await this.readBuf.waitForPackets(),this.readBuf.restorePoint();continue}throw Y}}await $.postProcess()}async _encodeMessage($){let Y=this.nsi.ntAdapter;this.writeBuf.startRequest(XB.TNS_PACKET_TYPE_DATA);while($.encode(this.writeBuf))await Y.pauseWrite();this.writeBuf.endRequest()}async _recoverFromError($,Y){try{this.breakMessage(),this._breakInProgress=!1,await this.resetMessage(),await this.readBuf.waitForPackets(),Y.decode(this.readBuf)}catch(X){this.nsi.disconnect();let G=GB.getErr(GB.ERR_CONNECTION_CLOSED);throw $.message=G.message+`
Error recovery failed: `+X.message+`
Original error: `+$.message,$}}async _processMessage($){let Y,X=!1,G,J,Q=lD1.isEnabled();if(Q)J={additionalConfig:{}},G=lD1.getTraceInstance();try{if(this.callTimeout>0)Y=setTimeout(()=>{X=!0,this.breakMessage()},this.callTimeout);if(Q)J.operation=`oracledb.${$.constructor.name}`,G.onBeginRoundTrip(J);if(await this._encodeMessage($),$.messageType!==XB.TNS_MSG_TYPE_ONEWAY_FN)await this._decodeMessage($)}catch(W){if(!this.connInProgress&&W.code!==GB.ERR_CONNECTION_CLOSED_CODE)await this._recoverFromError(W,$);if(Q)J.error=W;throw W}finally{if(clearTimeout(Y),Q){if(J.callLevelConfig=$.connection._callLevelTraceData,J.connectLevelConfig=$.connection._getConnectTraceConfig(),$.callStatus&XB.TNS_EOCS_FLAGS_SESS_RELEASE)J.additionalConfig.implicitRelease=!0;G.onEndRoundTrip(J)}}if($.flushOutBinds)await this.flushOutBindMessage($);if(this.txnInProgress=Boolean($.callStatus&XB.TNS_EOCS_FLAGS_TXN_IN_PROGRESS),$.callStatus&XB.TNS_EOCS_FLAGS_SESS_RELEASE)$.connection.statementCache.clearCursors();if($.errorOccurred){if(X)GB.throwErr(GB.ERR_CALL_TIMEOUT_EXCEEDED,this.callTimeout);if($.retry)return $.errorOccurred=!1,await this._processMessage($);let W=Error($.errorInfo.message);if(W.offset=$.errorInfo.pos,W.errorNum=$.errorInfo.num,W.isRecoverable=$.errorInfo.isRecoverable,W=GB.transformErr(W),W.code===GB.ERR_CONNECTION_CLOSED_CODE)this.nsi.disconnect();throw W}}async flushOutBindMessage($){this.writeBuf.startRequest(XB.TNS_PACKET_TYPE_DATA),this.writeBuf.writeUInt8(XB.TNS_MSG_TYPE_FLUSH_OUT_BINDS),this.writeBuf.endRequest(),await this._decodeMessage($)}breakMessage(){this._breakInProgress=!0,this.nsi.sendBreak()}async resetMessage(){await this.nsi.reset()}}nD1.exports=iD1});var pA=o((Dq5,aD1)=>{aD1.exports={NSPTCN:1,NSPTAC:2,NSPTAK:3,NSPTRF:4,NSPTRD:5,NSPTDA:6,NSPTNL:7,NSPTAB:9,NSPTRS:11,NSPTMK:12,NSPTAT:13,NSPTCNL:14,NSPTDD:15,NSPTHI:19,NSPHDLEN:0,NSPHDPSM:2,NSPHDTYP:4,NSPHDFLGS:5,NSPHDHSM:6,NSPSIZHD:8,NSPFSID:1,NSPFRDS:2,NSPFRDR:4,NSPFLSD:32,NO_HEADER_FLAGS:0,NSPFSRN:8,NSPCNVSN:8,NSPCNLOV:10,NSPCNOPT:12,NSPCNSDU:14,NSPCNTDU:16,NSPCNNTC:18,NSPCNTNA:20,NSPCNONE:22,NSPCNLEN:24,NSPCNOFF:26,NSPCNMXC:28,NSPCNFL0:32,NSPCNFL1:33,NSPCNTMO:50,NSPCNTCK:52,NSPCNADL:54,NSPCNAOF:56,NSPCNLSD:58,NSPCNLTD:62,NSPCNCFL:66,NSPCNCFL2:70,NSPCNDAT:74,NSPMXCDATA:230,NSINAWANTED:1,NSINAINTCHG:2,NSINADISABLEDFORCONNECTION:4,NSINANOSERVICES:8,NSINAREQUIRED:16,NSINAAUTHWANTED:32,NSISUPSECRENEG:128,NSGDONTCARE:1,NSGHDX:2,NSGFDX:4,NSGHDRCHKSUM:8,NSGPAKCHKSUM:16,NSGBROKEN:32,NSGUSEVIO:64,NSGOSAUTHOK:128,NSGSENDATTN:512,NSGRECVATTN:1024,NSGNOATTNPR:2048,NSGRAW:4096,TNS_VERSION_DESIRED:319,TNS_VERSION_MINIMUM:300,TNS_VERSION_MIN_DATA_FLAGS:318,TNS_VERSION_MIN_END_OF_RESPONSE:319,TNS_UUID_OFFSET:45,NSPACVSN:8,NSPACOPT:10,NSPACSDU:12,NSPACTDU:14,NSPACONE:16,NSPACLEN:18,NSPACOFF:20,NSPACFL0:22,NSPACFL1:23,NSPACTMO:24,NSPACTCK:26,NSPACADL:28,NSPACAOF:30,NSPACLSD:32,NSPACLTD:36,NSPACCFL:40,NSPACFL2:41,NSPACV310DAT:32,NSPACV315DAT:41,NSPRFURS:8,NSPRFSRS:9,NSPRFLEN:10,NSPRFDAT:12,NSPACCFON:128,NSPACCFAT:64,NSPACCFNT:2,NSPACOOB:1,NSGPCHKSCMD:16777216,TNS_ACCEPT_FLAG_HAS_END_OF_REQUEST:33554432,TNS_ACCEPT_FLAG_FAST_AUTH:268435456,NSPRDLEN:8,NSPRDDAT:10,NSPDAFLG:8,NSPDADAT:10,NSPDAFEOF:64,NSPDAFCMP:1024,NSPMKTYP:8,NSPMKODT:9,NSPMKDAT:10,NSPMKTD0:0,NSPMKTD1:1,NSPMKTAT:2,NIQBMARK:1,NIQRMARK:2,NIQIMARK:3,NSPCTLCMD:8,NSPCTLDAT:10,NSPCTL_SERR:8,NSPCTL_CLRATTN:9,NSPDFSDULN:8192,NSPABSSDULN:2097152,NSPMXSDULN:65535,NSPMNSDULN:512,NSPDFTDULN:2097152,NSPMXTDULN:2097152,NSPMNTDULN:255,NSFIMM:64,DISABLE_OOB_STR:"DISABLE_OOB",EXPIRE_TIME:"EXPIRE_TIME",PEM_WALLET_FILE_NAME:"ewallet.pem",DEFAULT_TRANSPORT_CONNECT_TIMEOUT:20000,DEFAULT_RETRY_DELAY:1000,NT_MOREDATA:1,NS_MOREDATA:2,SVCNAME:3,SERVERTYPE:4,REMOTEADDR:5,HEALTHCHECK:6,CONNCLASS:7,PURITY:8,SID:9,NETWORK_COMPRESSION_ZLIB:2,NSNOBLOCK:1}});var oD1=o((Nq5,sD1)=>{var Ws=L0("buffer").Buffer,j1=pA(),dA=E4();function Dl6($,Y,X=0){this.connectData=$,this.connectDataLen=$.length,this.overflow=!1;let G;if(this.connectDataLen<=230)G=74+this.connectDataLen;else G=74,this.overflow=!0;this.buf=Ws.allocUnsafe(G).fill(0),this.buf.writeUInt16BE(G,j1.NSPHDLEN),this.buf.writeUInt8(X,j1.NSPHDFLGS),this.buf.writeUInt8(j1.NSPTCN,j1.NSPHDTYP),this.buf.writeUInt16BE(j1.TNS_VERSION_DESIRED,j1.NSPCNVSN),this.buf.writeUInt16BE(j1.TNS_VERSION_MINIMUM,j1.NSPCNLOV);let J=j1.NSGDONTCARE;if(this.buf.writeUInt16BE(J,j1.NSPCNOPT),Y.sdu>j1.NSPMXSDULN)this.buf.writeUInt16BE(j1.NSPMXSDULN,j1.NSPCNSDU);else this.buf.writeUInt16BE(Y.sdu,j1.NSPCNSDU);if(Y.tdu>j1.NSPMXSDULN)this.buf.writeUInt16BE(j1.NSPMXSDULN,j1.NSPCNTDU);else this.buf.writeUInt16BE(Y.tdu,j1.NSPCNTDU);this.buf.writeUInt16BE(Y.ntCha,j1.NSPCNNTC),this.buf.writeUInt16BE(1,j1.NSPCNONE),this.buf.writeUInt16BE(this.connectDataLen,j1.NSPCNLEN),this.buf.writeUInt16BE(j1.NSPCNDAT,j1.NSPCNOFF),this.buf.writeUInt8(Y.NAFlags,j1.NSPCNFL0),this.buf.writeUInt8(Y.NAFlags,j1.NSPCNFL1),this.buf.writeUInt16BE(0,j1.NSPCNTMO),this.buf.writeUInt16BE(0,j1.NSPCNTCK),this.buf.writeUInt16BE(0,j1.NSPCNADL),this.buf.writeUInt16BE(0,j1.NSPCNAOF),this.buf.writeUInt32BE(Y.sdu,j1.NSPCNLSD),this.buf.writeUInt32BE(Y.tdu,j1.NSPCNLTD);let Q=0;if(Y.networkCompression){Q=j1.NSPACCFON<<8;let W=10;if(Y.networkCompressionLevels.includes("high"))Q|=j1.NETWORK_COMPRESSION_ZLIB<<W}if(this.buf.writeUInt16BE(Q,j1.NSPCNCFL),this.buf.writeUInt32BE(0,j1.NSPCNCFL2),!this.overflow&&this.connectDataLen)this.buf.write($.toString("ascii"),j1.NSPCNDAT,this.connectDataLen,"ascii")}function Nl6($){this.dataPtr=0,this.dataLen=0,this.offset=0,this.len=0,this.bufLen=0,this.createPacket=function(Y){this.dataPtr=j1.NSPDADAT,this.dataLen=j1.NSPDADAT,this.buf=Ws.allocUnsafe(Y).fill(0),this.buf.writeUInt8(0,j1.NSPHDFLGS),this.buf.writeUInt8(j1.NSPTDA,j1.NSPHDTYP),this.bufLen=Y},this.fillBuf=function(Y,X,G,J=0){let Q;if(!this.buf)this.createPacket(G+j1.NSPDADAT);if(G>this.bufLen-this.dataLen)Q=this.bufLen-this.dataLen;else Q=G;if(Q)Y.copy(this.buf,this.dataLen,X,X+Q);return this.dataLen+=Q,this.prepare2Send(J),Q},this.prepare2Send=function(Y=0){if($)this.buf.writeUInt32BE(this.dataLen,j1.NSPHDLEN);else this.buf.writeUInt16BE(this.dataLen,j1.NSPHDLEN);this.buf.writeUInt16BE(Y,j1.NSPDAFLG),this.dataBuf=this.buf.subarray(0,this.dataLen)},this.fromPacket=function(Y){this.buf=Y.buf,this.dataLen=Y.buf.length,this.dataPtr=j1.NSPDADAT,this.offset=this.dataPtr,this.len=this.dataLen,Y.dataOffset=this.dataPtr}}function Ll6($,Y){if(this.buf=$.buf,this.len=$.buf.length,Y.version=$.buf.readUInt16BE(j1.NSPACVSN),Y.options=$.buf.readUInt16BE(j1.NSPACOPT),Y.sdu=$.buf.readUInt16BE(j1.NSPACSDU),Y.tdu=$.buf.readUInt16BE(j1.NSPACTDU),Y.version>=315)if(Y.sdu=$.buf.readUInt32BE(j1.NSPACLSD),Y.tdu=$.buf.readUInt32BE(j1.NSPACLTD),Y.largeSDU=!0,this.cflag=$.buf.readUInt8(j1.NSPACCFL),(this.cflag&j1.NSPACCFON)!=0)Y.negotiatedNetworkCompressionScheme=(this.cflag&60)>>2,Y.networkCompressionEnabled=!0,Y.firstRecvCompressedPacket=!0,Y.firstSendCompressedPacket=!0;else Y.networkCompressionEnabled=!1;if(this.flag0=$.buf.readUInt8(j1.NSPACFL0),this.flag1=$.buf.readUInt8(j1.NSPACFL1),Y.noNA=(this.flag1&j1.NSINANOSERVICES)==j1.NSINANOSERVICES,!Y.noNA)Y.noNA=(this.flag0&j1.NSINADISABLEDFORCONNECTION)==j1.NSINADISABLEDFORCONNECTION;if(Y.version>=j1.TNS_VERSION_MIN_DATA_FLAGS)$.flags=$.buf.readUInt32BE(j1.NSPACFL2)}function Bl6($){if(this.buf=$.buf,this.len=$.buf.length,this.userReason=$.buf.readUInt8(j1.NSPRFURS),this.systemReason=$.buf.readUInt8(j1.NSPRFURS),this.dataLen=$.buf.readUInt16BE(j1.NSPRFLEN),this.dataOff=j1.NSPRFDAT,this.len>this.dataOff)this.dataBuf=this.buf.toString("ascii",this.dataOff,this.len),this.overflow=!1;else this.overflow=!0}function Ol6($){if(this.buf=$.buf,this.len=$.buf.length,this.flags=$.flags,this.dataLen=$.buf.readUInt16BE(j1.NSPRDLEN),this.dataOff=j1.NSPRDDAT,this.len>this.dataOff)this.dataBuf=this.buf.subarray(this.dataOff,this.len),this.overflow=!1;else this.overflow=!0}function El6($){if(this.len=j1.NSPMKDAT+1,this.buf=Ws.allocUnsafe(j1.NSPMKDAT+1).fill(0),$)this.buf.writeUInt32BE(this.len,j1.NSPHDLEN);else this.buf.writeUInt16BE(this.len,j1.NSPHDLEN);this.buf.writeUInt8(0,j1.NSPHDFLGS),this.buf.writeUInt8(j1.NSPTMK,j1.NSPHDTYP),this.prepare=function(Y,X){this.buf.writeUInt8(Y,j1.NSPMKTYP),this.buf.writeUInt8(X,j1.NSPMKDAT)},this.fromPacket=function(Y,X){switch(this.type=Y.buf.readUInt8(j1.NSPMKTYP),this.type){case j1.NSPMKTD0:X.isBreak=!0;break;case j1.NSPMKTD1:if(this.data=Y.buf.readUInt8(j1.NSPMKDAT),X.isBreak=!0,this.data==j1.NIQRMARK)X.isReset=!0,X.isBreak=!0;break;default:dA.throwErr(dA.ERR_INVALID_PACKET)}}}function Ml6(){this.clear=function(){this.errno=0,this.notif=null,this.notifLen=0,this.cmd=0},this.fromPacket=function($){let J,Q,W;switch(this.cmd=$.buf.readUInt16BE(j1.NSPCTLCMD),this.cmd){case j1.NSPCTL_SERR:if(J=$.buf.readUInt32BE(j1.NSPCTLDAT),Q=$.buf.readUInt32BE(j1.NSPCTLDAT+4),W=$.buf.readUInt32BE(j1.NSPCTLDAT+8),Q==12572)this.errno=Q;else if(Q==12573)this.errno=Q,this.notifLen=W,this.notif=Ws.allocUnsafe(W+1).fill(0),this.buf.copy(this.notif,0,j1.NSPCTLDAT+12,j1.NSPCTLDAT+12+W);else if(this.errno=Q,J==22)dA.throwErr(dA.ERR_CONNECTION_INBAND,"ORA-"+Q);else dA.throwErr(dA.ERR_CONNECTION_INBAND,"TNS-"+Q);break;default:dA.throwErr(dA.ERR_INVALID_PACKET)}}}sD1.exports={ConnectPacket:Dl6,DataPacket:Nl6,AcceptPacket:Ll6,RefusePacket:Bl6,RedirectPacket:Ol6,MarkerPacket:El6,ControlPacket:Ml6}});var FI=o((Lq5,JN1)=>{var K5=E4();class CV0{constructor($){this.name=$,this.listType=3,this.rhsType=0}set setAtom($){if(this._containsComment($))K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);this.rhsType=1,this.list=null,this.atom=$}_containsComment($){for(let Y=0;Y<$.length;Y++)if($.charAt(Y)=="#")if(Y!=0)if($.charAt(Y-1)=="\\")continue;else return!0;else return!0;return!1}getListSize(){if(this.list==null)return 0;else return this.list.length}getListElement($){if(this.list==null)return null;else return this.list[$]}addListElement($){if(this.list==null)this.rhsType=2,this.list=[],this.atom=null;this.list.push($),$.parent=this}removeListElement($){if(this.list!=null){if(this.list.splice($,1),this.getListSize==0)this.list=null,this.rhsType=0}}_space($){var Y="";for(let X=0;X<$;X++)Y+=" ";return Y}valueToString(){let $="";if(this.rhsType==1)$=$+this.atom;else if(this.rhsType==2){if(this.listType==3)for(let Y=0;Y<this.getListSize();Y++)$=$+this.getListElement(Y).toString();else if(this.listType==4)for(let Y=0;Y<this.getListSize();Y++){let X=this.getListElement(Y);if($=$+X.name,Y!=this.getListSize()-1)$=$+", "}}return $}toString(){let $="("+this.name+"=";if(this.rhsType==1)$=$+this.atom;else if(this.rhsType==2){if(this.listType==3)for(let Y=0;Y<this.getListSize();Y++)$=$+this.getListElement(Y).toString();else if(this.listType==4){$=$+" (";for(let Y=0;Y<this.getListSize();Y++){let X=this.getListElement(Y);if($=$+X.name,Y!=this.getListSize()-1)$=$+", "}$=$+")"}}return $=$+")",$}}var Rl6=0,Zs=1,jV0=2,cA=3,eD1=4,Ks=8,ql6=9,IV0="(",PV0=")",wV0=",",_V0="=",Il6="\\",tD1='"',Pl6="'",wl6="%",_l6=" ",jl6="\t",Tl6=`
`,Cl6="\r";class $N1{constructor(){this.tkType=null,this.tkValue=null,this.numTokens=0,this.tkPos=0}_isWhiteSpace($){if($==_l6||$==jl6||$==Tl6||$==Cl6)return!0;return!1}_trimWhiteSpace($){let Y=$.length,X=0,G=Y;while(X<Y&&this._isWhiteSpace($.charAt(X)))X++;while(X<G&&this._isWhiteSpace($.charAt(G-1)))G--;return $.substring(X,G)}parseTokens($){this.numTokens=0,this.tkPos=0,this.tkType=[],this.tkValue=[];let Y=$.length,X=!1,G=[];G=Array.from($);let J=0;while(J<Y){while(J<Y&&this._isWhiteSpace(G[J]))J++;if(J<Y)switch(G[J]){case IV0:X=!1,this._addToken(Zs,IV0),J++;break;case _V0:X=!0,this._addToken(eD1,_V0),J++;break;case PV0:X=!1,this._addToken(jV0,PV0),J++;break;case wV0:X=!1,this._addToken(cA,wV0),J++;break;default:{let Q=J,W=-1,Z=!1,K=tD1;if(G[J]==Pl6||G[J]==tD1)Z=!0,K=G[J],J++,Q=J;while(J<Y){if(G[J]==Il6){J+=2;continue}if(Z){if(G[J]==K){J++,W=J-1;break}}else if(G[J]==IV0||G[J]==PV0||G[J]==wV0&&!X||G[J]==_V0&&!X){W=J;break}J++}if(W==-1)W=J;this._addToken(Ks,$.substring(Q,W).trim());break}}}return this._addToken(ql6,wl6),!0}getToken(){if(this.tkType==null)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.tkPos<this.numTokens)return Number(this.tkType[this.tkPos]);else K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX)}popToken(){let $=Rl6;if(this.tkType==null)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.tkPos<this.numTokens)$=Number(this.tkType[this.tkPos++]);else K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);return $}getLiteral(){let $=null;if(this.tkValue==null)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.tkPos<this.numTokens)$=String(this.tkValue[this.tkPos]);else K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);return $}popLiteral(){let $=null;if(this.tkValue==null)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.tkPos<this.numTokens)$=String(this.tkValue[this.tkPos++]);else K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);return $}eatToken(){if(this.tkPos<this.numTokens)this.tkPos++}toString(){if(this.tkType==null)return"*NO TOKENS*";let $="Tokens";for(let Y=0;Y<this.numTokens;Y++)$=$+" : "+this.tkValue[Y];return $}_addToken($,Y){this.tkType.push(Number($)),this.tkValue.push(String(Y)),this.numTokens++}}function Sl6($){let Y=new $N1;return Y.parseTokens($),kl6(Y)}function kl6($){let Y=$.getToken();if($.eatToken(),Y!=Zs)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);let X=SV0($),G=new CV0(X);if((Y=$.getToken())==cA){while(Y==Ks||Y==cA)X+=$.popLiteral(),Y=$.getToken();return G.name=X,TV0(G,$)}return TV0(G,$)}function vl6($){let Y=$.getToken();if($.eatToken(),!(Y==Zs||Y==cA))K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);let X=SV0($),G=new CV0(X);return TV0(G,$)}function TV0($,Y){let X=Y.getToken();switch(X){case eD1:if(Y.eatToken(),X=Y.getToken(),X==Ks){let G=SV0(Y);$.setAtom=G}else YN1(Y,$);break;case cA:case jV0:$.setAtom=$.name;break;default:K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX)}if(X=Y.getToken(),X==jV0)Y.eatToken();else if(X!=cA)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);return $}function SV0($){if($.getToken()!=Ks)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);return $.popLiteral()}function YN1($,Y){let X=$.getToken();if(!(X==Zs||X==cA))return;let G=vl6($);if(Y.addListElement(G),X==cA||G.name==G.atom){if(Y.getListType!=4)Y.setListType=4}YN1($,Y)}function XN1($,Y){if(!$)return null;if(Y.toUpperCase()==$.name.toUpperCase())return $;if($.getRHSType==1)return null;for(let X=0;X<$.getListSize();X++){let G=XN1($.getListElement(X),Y);if(G!==null)return G}return null}function GN1($,Y){if(!$)return null;if($.getRHSType==1)return null;for(let X=0;X<$.getListSize();X++){let G=$.getListElement(X);if(Y.toUpperCase()==G.name.toUpperCase())return G}return null}function xl6($,Y){if(!$)return null;if(Y[0].toUpperCase()!=$.name.toUpperCase())return null;let X=$,G=Y.length;for(let J=1;J<G;J++)if(X=GN1(X,Y[J]),!X)return null;if(X.atom==null)if(X.list==null)return null;else return X.list.toString();else return X.atom.toString()}JN1.exports={findNVPairRecurse:XN1,createNVPair:Sl6,findNVPair:GN1,findValue:xl6}});var UN1=o((Bq5,KN1)=>{var{Buffer:yl6}=L0("buffer"),bl6=L0("net"),QN1=L0("process"),Sx=L0("tls"),hl6=L0("http"),fl6=L0("timers"),Us=pA(),f5=E4(),{findValue:Hs,findNVPair:gl6}=FI(),ml6=["SERVICE_NAME","INSTANCE_NAME","SERVER","COLOCATION_TAG","CONNECTION_ID","POOL_BOUNDARY","POOL_PURITY","POOL_CONNECTION_CLASS","POOL_NAME","SERVICE_TAG","CID"],kV0=["SERVICE_NAME","INSTANCE_NAME","SERVER","COLOCATION_TAG"],WN1=["S","I","T","C"],ul6=1;class ZN1{constructor($){this.atts=$,this.cha=4878,this.connected=!1,this.err=!1,this.needsDrain=!1,this.numPacketsSinceLastWait=0,this.secure=!1,this.largeSDU=!1,this.streamNum=ul6++,this.packetNum=1,this.doDNMatch=!0}dnMatch($,Y){if(this.atts.sslServerDNMatch&&this.doDNMatch){let X=(G)=>G.split(",").map((J)=>J.split("=").map((Q)=>Q.trim())).reduce((J,Q)=>{return J[Q[0]]=Q[1],J},{});if(this.atts.sslServerCertDN){let G=X(this.atts.sslServerCertDN);if(Object.keys(G).length==Object.keys(Y.subject).length){for(let J in G)if(G[J]!=Y.subject[J])return f5.getErr(f5.ERR_TLS_DNMATCH_FAILURE)}else return f5.getErr(f5.ERR_TLS_DNMATCH_FAILURE)}else if(Sx.checkServerIdentity(this.hostName,Y)&&(!this.originHost||Sx.checkServerIdentity(this.originHost,Y)))if(this.atts.sslAllowWeakDNMatch){if(Hs(this.atts.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"])!=Y.subject.CN)return f5.getErr(f5.ERR_TLS_DNMATCH_FAILURE)}else{let G=this.hostName+" "+(this.originHost?"or "+this.originHost:"");return f5.getErr(f5.ERR_TLS_HOSTMATCH_FAILURE,G)}}}async tlsConnect($,Y){this.stream.removeAllListeners();let X,G=null;if(this.atts.useSNI)G=this.generateSNI();let J={host:this.host,socket:Y,servername:G,rejectUnauthorized:!0,secureContext:$,enableTrace:!1,checkServerIdentity:this.dnMatch.bind(this)};if(await new Promise((Q)=>{this.stream=Sx.connect(J,()=>{if(!this.stream.authorized)X="server certificate unauthorized";Q()}).on("error",(W)=>{X=W.message,Q()})}),X)f5.throwErr(f5.ERR_TLS_AUTH_FAILURE,this.host,this.port,this.atts.connectionId,X);this.connStream=Y}async ntConnect($){if(!$.port)$.port=1521;let Y,X,G,J=$.httpsProxy||this.atts.httpsProxy,Q=$.httpsProxyPort||this.atts.httpsProxyPort;if(await new Promise((W)=>{if(J){if(!Q)Q=80;G=hl6.request({host:J,port:Q,method:"CONNECT",path:$.host+":"+$.port}),G.once("connect",(Z,K)=>{if(Z.statusCode==200)this.connected=!0,this.stream=K;else X=Z.statusCode;W()}),G.once("error",(Z)=>{X=Z.message,W()}),G.end()}else this.stream=bl6.connect($.port,$.host,()=>{this.connected=!0,W()}),this.stream.once("error",(Z)=>{Y=Z.message,W()})}),G)G.removeAllListeners();if(!this.connected)if(X)f5.throwErr(f5.ERR_PROXY_CONNECTION_FAILURE,J,Q,this.atts.connectionId,X);else f5.throwErr(f5.ERR_CONNECTION_INCOMPLETE,this.host,this.port,this.atts.connectionId,Y)}async connect($){this.originHost=$.originHost,this.host=$.host,this.hostName=$.hostname,this.port=$.port;try{if(await this.ntConnect($),this.atts.expireTime||this.atts.enableDCD)if(this.atts.expireTime)this.stream.setKeepAlive(!0,this.atts.expireTime);else this.stream.setKeepAlive(!0);if(this.atts.tcpNoDelay)this.stream.setNoDelay(!0);if($.protocol.toUpperCase()=="TCPS"){let Y;if(this.secure=!0,this.atts.sslAllowWeakDNMatch)this.doDNMatch=!1;try{Y=Sx.createSecureContext({cert:this.atts.wallet,key:this.atts.wallet,passphrase:this.atts.walletPassword,ca:this.atts.wallet})}catch(X){f5.throwErr(f5.ERR_TLS_INIT_FAILURE,X.message)}await this.tlsConnect(Y,this.stream)}}finally{if(this.stream)this.setupEventHandlers()}}disconnect($){if(this.connected&&!this.err)if($==Us.NSFIMM)this.stream.destroy();else this.stream.end();this.stream=null,this.connected=!1,this.drainWaiter=null,this.readWaiter=null}getPacketDump($){let Y=[];for(let X=0;X<$.length;X+=8){let G=X.toString().padStart(4,"0"),J=$.slice(X,X+8),Q=[],W=[];for(let H of J)if(Q.push(H.toString(16).toUpperCase().padStart(2,"0")),H>32&&H<127)W.push(String.fromCharCode(H));else W.push(".");while(Q.length<8)Q.push("  "),W.push(" ");let Z=Q.join(" "),K=W.join("");Y.push(`${G} : ${Z} |${K}|`)}return Y.join(`
`)}printPacket($,Y){let X=new Date,G=`${X.getFullYear()}-${X.getMonth().toString().padStart(2,"0")}-${X.getDay().toString().padStart(2,"0")} ${X.getHours().toString().padStart(2,"0")}:${X.getMinutes().toString().padStart(2,"0")}:${X.getSeconds().toString().padStart(2,"0")}.${X.getMilliseconds().toString().padStart(3,"0")}`,J=this.getPacketDump(Y);console.log(`${G} ${$}:
${J}
`)}checkErr(){if(!this.connected||this.err){let $;if(this.savedErr)$=f5.getErr(f5.ERR_CONNECTION_LOSTCONTACT,this.host,this.port,this.atts.connectionId,this.savedErr.message);else $=f5.getErr(f5.ERR_CONNECTION_EOF,this.host,this.port,this.atts.connectionId);let Y=f5.getErr(f5.ERR_CONNECTION_CLOSED);throw Y.message=Y.message+`
`+$.message,Y}}send($){if(this.checkErr(),QN1.env.NODE_ORACLEDB_DEBUG_PACKETS)this.printPacket(`Sending packet ${this.packetNum} on stream ${this.streamNum}`,$);if(!this.stream.write($,(X)=>{if(X)this.savedErr=X,this.err=!0,this._notifyWaiters()}))this.needsDrain=!0;this.numPacketsSinceLastWait++,this.packetNum++}shouldPauseWrite(){return this.needsDrain||this.numPacketsSinceLastWait>=100}async pauseWrite(){if(this.checkErr(),this.needsDrain)await new Promise(($)=>{this.drainWaiter=$}),this.checkErr();else await new Promise(($)=>fl6.setImmediate($));this.numPacketsSinceLastWait=0}startRead(){let $;this.packets=[],this.stream.on("data",(Y)=>{if($)$=yl6.concat([$,Y]);else $=Y;while($.length>=8){let X;if(this.largeSDU)X=$.readUInt32BE();else X=$.readUInt16BE();if(X>$.length)break;let G={buf:$.subarray(0,X),type:$[4],flags:$[5],num:this.packetNum++};if(this.packets.push(G),this.readWaiter)this.readWaiter(),this.readWaiter=null;if(QN1.env.NODE_ORACLEDB_DEBUG_PACKETS)this.printPacket(`Receiving packet ${G.num} on stream ${this.streamNum}`,G.buf);if(X===$.length){$=null;break}else $=$.subarray(X)}})}syncReceive(){return this.packets.shift()}async receive(){if(this.packets.length===0)this.checkErr(),await new Promise(($)=>{this.readWaiter=$,this.numPacketsSinceLastWait=0}),this.checkErr();return this.packets.shift()}async renegTLS(){let $=!1;this.checkErr();try{this.doDNMatch=!0;let Y=Sx.createSecureContext({cert:this.atts.wallet,key:this.atts.wallet,passphrase:this.atts.walletPassword,ca:this.atts.wallet});$=!0,await this.tlsConnect(Y,this.connStream)}catch(Y){if(!$)f5.throwErr(f5.ERR_TLS_INIT_FAILURE,Y.message);else throw Y}finally{this.setupEventHandlers()}}setupEventHandlers(){this.stream.removeAllListeners(),this.stream.on("error",($)=>{this.savedErr=$,this.err=!0,this._notifyWaiters()}),this.stream.on("end",()=>{this.err=!0,this._notifyWaiters()}),this.stream.on("close",()=>{this.connected=!1,this._notifyWaiters()}),this.stream.on("drain",()=>{if(this.needsDrain=!1,this.drainWaiter)this.drainWaiter(),this.drainWaiter=null})}getOption($){switch(this.checkErr(),$){case Us.NT_MOREDATA:return this.packets.length>0;case Us.REMOTEADDR:{let Y=this.secure?this.connStream:this.stream;return Y.remoteAddress+":"+Y.remotePort}default:f5.throwErr(f5.ERR_INTERNAL,"getOption not supported for opcode "+$)}}_notifyWaiters(){if(this.drainWaiter)this.drainWaiter(),this.drainWaiter=null;if(this.readWaiter)this.readWaiter(),this.readWaiter=null}generateSNI(){if(Hs(this.atts.cDataNVPair,["DESCRIPTION","SOURCE_ROUTE"])=="yes"||Hs(this.atts.cDataNVPair,["DESCRIPTION","ADDRESS_LIST","SOURCE_ROUTE"])=="yes")return null;let $=gl6(this.atts.cDataNVPair,"CONNECT_DATA");for(let J=0;J<$.getListSize();J++){let Q=$.getListElement(J);if(!ml6.includes(Q.name.toUpperCase()))return null}let Y,X="";for(let J=0;J<kV0.length;J++)if(Y=Hs(this.atts.cDataNVPair,["DESCRIPTION","CONNECT_DATA",kV0[J]]))if(kV0[J]=="SERVER")X+=WN1[J]+"1."+Y[0]+".";else X+=WN1[J]+Y.length+"."+Y+".";X+="V3."+Us.TNS_VERSION_DESIRED;let G=new RegExp("^[A-Za-z0-9._-]+$");if(!X.match(G))return null;if(X.length>256)return null;return X}}KN1.exports=ZN1});var xV0=o((Oq5,DN1)=>{var oJ=E4(),vV0=pA(),pl6=[-1,0,1,2,3];class DI{constructor($){this.flags=vV0.NSINAWANTED,this.sAtts=$}getDataSize(){return 20}sendHeader($,Y){return Y=$.writeUInt16BE(this.service,Y),Y=$.writeUInt16BE(this.numSubPackets,Y),Y=$.writeUInt32BE(0,Y),Y}sendVersion($,Y){return Y=$.writeUInt16BE(4,Y),Y=$.writeUInt16BE(5,Y),Y=$.writeUInt32BE(393216000,Y),Y}sendRaw($,Y,X,G){return G=$.writeUInt16BE(X,G),G=$.writeUInt16BE(1,G),G+=Y.copy($,G,0,X),G}sendArray($,Y,X){X=$.writeUInt16BE(10+Y.length*2,X),X=$.writeUInt16BE(1,X),X=$.writeUInt32BE(3735928559,X),X=$.writeUInt16BE(3,X),X=$.writeUInt32BE(Y.length,X);for(let G=0;G<Y.length;G++)X=$.writeUInt16BE(Y[G],X);return X}sendStatus($,Y,X){return X=$.writeUInt16BE(2,X),X=$.writeUInt16BE(6,X),X=$.writeUInt16BE(Y,X),X}sendString($,Y,X){return X=$.writeUInt16BE(Y.length,X),X=$.writeUInt16BE(0,X),X+=$.write(Y,X),X}sendUB1($,Y,X){return X=$.writeUInt16BE(1,X),X=$.writeUInt16BE(2,X),X=$.writeUInt8(Y,X),X}sendUB2($,Y,X){return X=$.writeUInt16BE(2,X),X=$.writeUInt16BE(3,X),X=$.writeUInt16BE(Y,X),X}static receiveHeader($,Y,X){return Y[0]=$.readUInt16BE(X),X+=2,Y[1]=$.readUInt16BE(X),X+=2,Y[2]=$.readUInt32BE(X),X+=4,X}receiveType($,Y,X,G){let J=$.readUInt16BE(G);G+=2;let Q=$.readUInt16BE(G);if(G+=2,Q!=Y)oJ.throwErr(oJ.ERR_ANO_PACKET);let W,Z;switch(Y){case 5:return W=$.readUInt32BE(G),G+=4,X[0]=W,G;case 6:return Z=$.readUInt16BE(G),G+=2,X[0]=Z,G;case 1:return X[0]=J,G;case 0:return X[0]=J,G}}receiveUB2Array($,Y,X){let G=[];if(X=this.receiveType($,1,G,X),$.readUInt32BE(X)!=3735928559)oJ.throwErr(oJ.ERR_ANO_PACKET);X+=4;let J=$.readUInt16BE(X);if(X+=2,J!=3)oJ.throwErr(oJ.ERR_ANO_PACKET);let Q=$.readUInt32BE(X);X+=4;for(let W=0;W<Q;W++)Y[W]=$.readUInt16BE(X),X+=2;return X}receiveString($,Y,X){let G=[];X=this.receiveType($,0,G,X);let J=$.toString("utf8",X,X+G[0]);return X+=G[0],Y[0]=J,X}receiveServiceData($,Y,X){let G=[];return G[0]=$.readUInt16BE(X),X+=2,G[1]=$.readUInt16BE(X),X+=2,G[2]=$.readUInt32BE(X),X+=4,G[3]=$.readUInt16BE(X),X+=2,G[4]=$.readUInt16BE(X),X+=2,G[5]=$.readUInt8(X),X+=1,X}}class HN1 extends DI{constructor($){super($);this.service=4,this.serviceList=[1,2,3,4],this.numSubPackets=3}getDataSize(){return 42+this.serviceList.length*2}sendServiceData($,Y){return Y=this.sendHeader($,Y),Y=this.sendVersion($,Y),Y=this.sendRaw($,Buffer.from(this.sAtts.uuid,"base64"),8,Y),Y=this.sendArray($,this.serviceList,Y),Y}receiveServiceData($,Y,X){let G=[],J=[],Q=[];if(X=this.receiveType($,5,J,X),X=this.receiveType($,6,Q,X),Q[0]!=31)oJ.throwErr(oJ.ERR_ANO_STATUS,"Supervisor");return X=this.receiveUB2Array($,G,X),X}}class zN1 extends DI{constructor($){super($);this.service=1,this.status=64767,this.numSubPackets=5,this.serviceList=["tcps"],this.authActivated=!1}getDataSize(){let $=28;for(let Y=0;Y<this.serviceList.length;Y++)$+=5,$+=4+this.serviceList[Y].length;return $}sendServiceData($,Y){return Y=this.sendHeader($,Y),Y=this.sendVersion($,Y),Y=this.sendUB2($,57569,Y),Y=this.sendStatus($,this.status,Y),Y=this.sendUB1($,2,Y),Y=this.sendString($,"tcps",Y),Y}receiveServiceData($,Y,X){let G=[],J=[],Q=[];if(X=this.receiveType($,5,G,X),X=this.receiveType($,6,J,X),J[0]==64255&&Y>2)X+=5,X=this.receiveString($,Q,X),this.authActivated=!0;else if(J[0]==64511)this.authActivated=!1;else oJ.throwErr(oJ.ERR_ANO_STATUS,"Authentication");return X}}class VN1 extends DI{constructor($){super($);this.service=2,this.numSubPackets=2}getDataSize(){return 21}sendServiceData($,Y){Y=this.sendHeader($,Y),Y=this.sendVersion($,Y);let X=Buffer.from([0]);return Y=this.sendRaw($,X,1,Y),Y}}class AN1 extends DI{constructor($){super($);this.service=3,this.numSubPackets=2}getDataSize(){return 21}sendServiceData($,Y){Y=this.sendHeader($,Y),Y=this.sendVersion($,Y);let X=Buffer.from([0]);return Y=this.sendRaw($,X,1,Y),Y}}class FN1{constructor($){this.serviceList=[new zN1($),new VN1($),new AN1($),new HN1($)]}sendPacket(){let $=13;for(let G=0;G<this.serviceList.length;G++)$+=this.serviceList[G].getDataSize();let Y=Buffer.allocUnsafe($).fill(0),X=Y.writeUInt32BE(3735928559);return X=Y.writeUInt16BE($,X),X=Y.writeUInt32BE(393216000,X),X=Y.writeUInt16BE(this.serviceList.length,X),X=Y.writeUInt8(0,X),X=this.serviceList[3].sendServiceData(Y,X),X=this.serviceList[0].sendServiceData(Y,X),X=this.serviceList[1].sendServiceData(Y,X),this.serviceList[2].sendServiceData(Y,X),Y}processPacket($){let Y=10;if($.readUInt32BE(Y)!=3735928559)oJ.throwErr(oJ.ERR_ANO_PACKET);Y+=4,Y+=2,Y+=4;let X=$.readUInt16BE(Y);Y+=2,Y+=1;let G=[];for(let J=0;J<X;J++){if(Y=DI.receiveHeader($,G,Y),G[2]!=0)oJ.throwErrWithORAError(oJ.ERR_ANO_NEGOTIATION,G[2]);let Q=pl6[G[0]];Y=this.serviceList[Q].receiveServiceData($,G[1],Y)}}}function dl6($,Y){if($.toUpperCase()=="TCPS"&&Y.externalAuth&&!Y.token)return vV0.NSINAWANTED;else return vV0.NSINANOSERVICES}DN1.exports={ANO:FN1,getFlags:dl6}});var BN1=o((Eq5,LN1)=>{var cl6=L0("crypto"),ll6=L0("path"),yV0=pA(),il6=L0("fs"),{getFlags:nl6}=xV0();async function rl6(){return await new Promise(($,Y)=>{cl6.randomBytes(16,(X,G)=>{if(X)Y(X);else $(G)})})}class NN1{constructor($){this.largeSDU=!1,this.tdu=yV0.NSPDFTDULN,this.nt={},this.nt.tcpNoDelay=!0,this.uuid=$,this.nt.sslServerDNMatch=!0,this.nt.sslAllowWeakDNMatch=!1,this.nt.useSNI=!1,this.networkCompressionThreshold=1024}setFrom($){if($){if($.sdu>0)this.sdu=parseInt($.sdu);if(typeof $.networkCompression=="boolean"){if(this.networkCompression=$.networkCompression,this.networkCompressionLevels=[],$.networkCompressionLevels){if($.networkCompressionLevels.includes("high"))this.networkCompressionLevels.push("high");if($.networkCompressionLevels.length==0)this.networkCompressionLevels.push("high")}}if($.networkCompressionThreshold>=200)this.networkCompressionThreshold=parseInt($.networkCompressionThreshold);if(typeof $.walletLocation==="string")this.nt.walletFile=ll6.join($.walletLocation,yV0.PEM_WALLET_FILE_NAME);if(typeof $.walletPassword==="string")this.nt.walletPassword=$.walletPassword;if(typeof $.walletContent==="string")this.nt.wallet=$.walletContent;if($.expireTime>0)this.nt.expireTime=$.expireTime*1000*60;if($.connectTimeout>0)this.connectTimeout=$.connectTimeout*1000;if($.transportConnectTimeout>0)this.transportConnectTimeout=$.transportConnectTimeout*1000;if($.recvTimeout>0)this.recvTimeout=$.recvTimeout*1000;if($.sendTimeout>0)this.sendTimeout=$.sendTimeout*1000;if(typeof $.connectionIdPrefix==="string")this.connectionIdPrefix=$.connectionIdPrefix;if(typeof $.tcpNoDelay==="boolean")this.nt.tcpNoDelay=$.tcpNoDelay;if(typeof $.sslServerDNMatch==="boolean")this.nt.sslServerDNMatch=$.sslServerDNMatch;if(typeof $.sslAllowWeakDNMatch==="boolean")this.nt.sslAllowWeakDNMatch=$.sslAllowWeakDNMatch;if(typeof $.sslServerCertDN==="string")this.nt.sslServerCertDN=$.sslServerCertDN;if(typeof $.enable==="string"&&$.enable.toUpperCase()=="BROKEN")this.nt.enabledDCD=!0;if(typeof $.httpsProxy==="string")this.nt.httpsProxy=$.httpsProxy;if($.httpsProxyPort>=0)this.nt.httpsProxyPort=parseInt($.httpsProxyPort);if(typeof $.useSNI==="boolean")this.nt.useSNI=$.useSNI}}readWalletFile(){return new Promise(($,Y)=>{il6.readFile(this.nt.walletFile,(X,G)=>{if(X)Y(X);else $(G)})})}clearWallet(){if(this.nt.wallet&&Buffer.isBuffer(this.nt.wallet))this.nt.wallet.fill(0);this.nt.wallet=null}async prepare($,Y){if(!this.uuid)this.uuid=await rl6(),this.uuid=this.uuid.toString("base64");if(this.connectionIdPrefix)this.connectionId=this.connectionIdPrefix+this.uuid;else this.connectionId=this.uuid;if(this.nt.connectionId=this.connectionId,$&&($.toUpperCase()=="TCPS"&&!this.nt.wallet&&this.nt.walletFile))this.nt.wallet=await this.readWalletFile();if(!this.connectTimeout&&!this.transportConnectTimeout)this.transportConnectTimeout=yV0.DEFAULT_TRANSPORT_CONNECT_TIMEOUT;this.NAFlags=nl6($,Y)}}LN1.exports=NN1});var kx=o((Mq5,RN1)=>{var al6=SY(),ON1=E4(),EN1=L0("os"),bV0=GY();function sl6(){this.program=bV0.sanitize(process.argv0),this.terminal="unknown",this.pid=process.pid.toString();try{this.userName=bV0.sanitize(EN1.userInfo().username)}catch{this.userName="unknown"}this.hostName=bV0.sanitize(EN1.hostname())}var ol6=new sl6;function tl6($){let Y=[];for(let X of $)Y.push(X.fetchInfo);return Y}function MN1($,Y){let X=$[0].name===void 0,G=X?[]:{};for(let J=0;J<$.length;J++)if(X)G.push($[J].values[Y]);else G[$[J].name]=$[J].values[Y];return G}function el6($,Y,X){let J=$.bindInfoList.map((Q)=>Q.bindVar).filter((Q)=>Q.dir!==al6.BIND_IN);if(J.length>0){if(X){let Q=Array(Y);for(let W=0;W<Y;W++)Q[W]=MN1(J,W);return Q}return MN1(J,0)}}function $i6($){let Y="",X="",G=!1,J=!1,Q=0,W={status:-1,proxyUser:"",schemaUser:""},Z=$.length,K=0,H,z;while(K<Z){if($.charAt(K)==='"')G=!G,Q=K;if($.charAt(K)==="["&&!G){if(J=!0,Q!=0){for(H=Q+1;H<K;H++)if($.charAt(H)!==" ")return W;for(H=0;H<=Q;H++)X+=$.charAt(H)}else for(H=0;H<K;H++)if($.charAt(H)!==" ")X+=$.charAt(H);else break;break}K++}if(X.length!=0)W.proxyUser=X;K=K+1,G=!1;let V=K;Q=0;while(K<Z){if($.charAt(K)==='"')G=!G,Q=K;if($.charAt(K)==="["&&!G&&J)return W;if($.charAt(K)==="]"&&!G){if(Q!=V&&Q!=0){for(H=V;H<=Q;H++)Y+=$.charAt(H);for(H=Q+1;H<K;H++)if($.charAt(H)!=" ")return W}else{for(H=V;H<K;H++)if($.charAt(H)!=" ")break;if(H==K)return W;for(z=H;z<K;z++)Y+=$[z]}for(H=K+1;H<Z;H++)if($[H]!=" ")return W}K++}if(Y.length===0)return W;else W.schemaUser=Y;return W.status=0,W}function Yi6($){if($.externalAuth===!1){if($.password===void 0)ON1.throwErr(ON1.ERR_MISSING_CREDENTIALS)}}function Xi6($){return`-----BEGIN PRIVATE KEY-----
`+$+`
-----END PRIVATE KEY-----`}RN1.exports={getMetadataMany:tl6,CLIENT_INFO:ol6,getOutBinds:el6,checkProxyUserValidity:$i6,checkCredentials:Yi6,normalizePrivateKey:Xi6}});var CN1=o((Rq5,TN1)=>{var{findNVPairRecurse:vx,createNVPair:zs}=FI(),dX=E4(),Gi6=L0("os"),Ji6=L0("net"),Qi6=L0("dns"),qN1=Qi6.promises,hV0=kx().CLIENT_INFO,Vs={ADDR:0,ADDR_LIST:1,DESC:2,DESC_LIST:3};class PN1{isS(){return Vs.ADDR}initFromString($){let Y=zs($);this.initFromNVPair(Y)}initFromNVPair($){if($==null||$.name.toUpperCase()!="ADDRESS")dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);let Y=vx($,"protocol"),X=vx($,"port"),G=vx($,"host"),J=vx($,"https_proxy"),Q=vx($,"https_proxy_port");if(X)this.port=Number(X.atom);if(G)this.host=G.atom;if(Y)this.prot=Y.atom;if(J)this.httpsProxy=J.atom;if(Q)this.httpsProxyPort=Number(Q.atom);this.addr=$.toString()}toString(){return this.addr}}class wN1{constructor(){this.children=[],this.sourceRoute=!1,this.loadBalance=!1,this.failover=!0}isS(){return Vs.ADDR_LIST}initFromString($){let Y=zs($);this.initFromNVPair(Y)}initFromNVPair($){this.children=[];let Y,X,G=$.getListSize();if(G==0)dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let J=0;J<G;J++)if(Y=$.getListElement(J),Y.name.toUpperCase()=="SOURCE_ROUTE")this.sourceRoute=Y.atom.toLowerCase()=="yes"||Y.atom.toLowerCase()=="on"||Y.atom.toLowerCase()=="true";else if(Y.name.toUpperCase()=="LOAD_BALANCE")this.loadBalance=Y.atom.toLowerCase()=="yes"||Y.atom.toLowerCase()=="on"||Y.atom.toLowerCase()=="true";else if(Y.name.toUpperCase()=="FAILOVER")this.failover=Y.atom.toLowerCase()=="yes"||Y.atom.toLowerCase()=="on"||Y.atom.toLowerCase()=="true";else if(Y.name.toUpperCase()=="ADDRESS")X=new As,X.initFromNVPair(Y),this.children.push(X);else if(Y.name.toUpperCase()=="ADDRESS_LIST")X=new Fs,X.initFromNVPair(Y),this.children.push(X);else dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.children.length==0)dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX)}toString(){let $=new String("");if(this.children.size()<1)return $;$+="(ADDRESS_LIST=";for(let Y=0;Y<this.children.size();Y++)$+=this.children[Y].toString();if(this.sourceRoute)$+="(SOURCE_ROUTE=yes)"+NI.HC;if(this.loadBalance)$+="(LOAD_BALANCE=yes)";if(!this.failover)$+="(FAILOVER=false)";return $+=")",$}}class _N1{constructor(){this.children=[],this.sourceRoute=!1,this.loadBalance=!1,this.failover=!0,this.delayInMillis=-1,this.params={}}isS(){return Vs.DESC}initFromString($){let Y=zs($);this.initFromNVPair(Y)}initFromNVPair($){let Y=$.getListSize(),X,G;if(Y==0)dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let J=0;J<Y;J++)if(X=$.getListElement(J),X.name.toUpperCase()=="SOURCE_ROUTE")this.sourceRoute=X.atom.toLowerCase()=="yes"||X.atom.toLowerCase()=="on"||X.atom.toLowerCase()=="true";else if(X.name.toUpperCase()=="LOAD_BALANCE")this.loadBalance=X.atom.toLowerCase()=="yes"||X.atom.toLowerCase()=="on"||X.atom.toLowerCase()=="true";else if(X.name.toUpperCase()=="FAILOVER")this.failover=X.atom.toLowerCase()=="yes"||X.atom.toLowerCase()=="on"||X.atom.toLowerCase()=="true";else if(X.name.toUpperCase()=="USE_SNI")this.params.useSNI=X.atom.toLowerCase()=="yes"||X.atom.toLowerCase()=="on"||X.atom.toLowerCase()=="true";else if(X.name.toUpperCase()=="ADDRESS_LIST")G=new Fs,G.initFromNVPair(X),this.children.push(G);else if(X.name.toUpperCase()=="ADDRESS")G=new As,G.initFromNVPair(X),this.children.push(G);else if(X.name.toUpperCase()=="CONNECT_DATA"){let Q,W=X.getListSize();for(let Z=0;Z<W;Z++)if(Q=X.getListElement(Z),Q.name.toUpperCase()=="CONNECTION_ID_PREFIX"){this.params.connectionIdPrefix=Q.atom,X.removeListElement(Z);break}this.connectData=X.valueToString()}else if(X.name.toUpperCase()=="RETRY_DELAY"){if(X.atom>0)this.delayInMillis=X.atom*1000}else if(X.name.toUpperCase()=="RETRY_COUNT")this.retryCount=X.atom;else if(X.name.toUpperCase()=="CONNECTION_ID_PREFIX")this.conidPrefix=X.atom;else if(X.name.toUpperCase()=="CONNECT_TIMEOUT"){if(X.atom>0)this.params.connectTimeout=X.atom}else if(X.name.toUpperCase()=="TRANSPORT_CONNECT_TIMEOUT"){if(X.atom>0)this.params.transportConnectTimeout=X.atom}else if(X.name.toUpperCase()=="ENABLE")this.params.enable=X.atom;else if(X.name.toUpperCase()=="RECV_TIMEOUT"){if(X.atom>0)this.params.recvTimeout=X.atom}else if(X.name.toUpperCase()=="SDU")this.params.sdu=X.atom;else if(X.name.toUpperCase()=="COMPRESSION")this.params.networkCompression=X.atom.toLowerCase()=="yes"||X.atom.toLowerCase()=="on"||X.atom.toLowerCase()=="true",this.params.networkCompressionLevels=[];else if(X.name.toUpperCase()=="COMPRESSION_LEVELS"){let Q=X.getListSize();for(let W=0;W<Q;W++){let Z=X.getListElement(W);if(Z.name.toUpperCase()=="LEVEL")this.params.networkCompressionLevels.push(Z.atom.toLowerCase())}}else if(X.name.toUpperCase()=="EXPIRE_TIME"){if(X.atom>0)this.params.expireTime=X.atom}else if(X.name.toUpperCase()=="SECURITY"){let Q=X.getListSize(),W;for(let Z=0;Z<Q;Z++)if(W=X.getListElement(Z),W.name.toUpperCase()=="SSL_SERVER_CERT_DN")this.params.sslServerCertDN=W.valueToString();else if(W.name.toUpperCase()=="SSL_SERVER_DN_MATCH")this.params.sslServerDNMatch=W.atom.toLowerCase()=="yes"||W.atom.toLowerCase()=="on"||W.atom.toLowerCase()=="true";else if(W.name.toUpperCase()=="SSL_ALLOW_WEAK_DN_MATCH")this.params.sslAllowWeakDNMatch=W.atom.toLowerCase()=="yes"||W.atom.toLowerCase()=="on"||W.atom.toLowerCase()=="true";else if(W.name.toUpperCase()=="WALLET_LOCATION"||W.name.toUpperCase()=="MY_WALLET_DIRECTORY")this.params.walletLocation=W.atom}}toString(){let $=new String(""),Y;Y=new String("");for(let X=0;X<this.children.size();X++)if(Y=this.children[X].toString(),!Y=="")$+=Y;if(!$==""&&this.sourceRoute)$+="(SOURCE_ROUTE=yes)";if(!$==""&&this.loadBalance)$+="(LOAD_BALANCE=yes)";if(!$==""&&!this.failover)$+="(FAILOVER=false)";if(!$.equals(""))$="(DESCRIPTION="+$+")";return $}}class jN1{constructor(){this.children=[],this.sourceRoute=!1,this.loadBalance=!0,this.failover=!0}isS(){return Vs.ADDR_LIST}initFromString($){let Y=zs($);this.initFromNVPair(Y)}initFromNVPair($){let Y=$.getListSize(),X,G;if(Y==0)dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let J=0;J<Y;J++)if(G=$.getListElement(J),G.name.toUpperCase()=="SOURCE_ROUTE")this.sourceRoute=G.atom.toLowerCase()=="yes"||G.atom.toLowerCase()=="on"||G.atom.toLowerCase=="true";else if(G.name.toUpperCase()=="LOAD_BALANCE")this.loadBalance=G.atom.toLowerCase()=="yes"||G.atom.toLowerCase()=="on"||G.atom.toLowerCase()=="true";else if(G.name.toUpperCase()=="FAILOVER")this.failover=G.atom.toLowerCase()=="yes"||G.atom.toLowerCase()=="on"||G.atom.toLowerCase()=="true";else if(G.name.toUpperCase()=="DESCRIPTION")X=new gV0,X.initFromNVPair(G),this.children.push(X);else dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.children.length==0)dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX)}toString(){let $=new String("");if(this.children.size()<1)return $;let Y=new String("");for(let X=0;X<this.children.size();X++)if(Y=this.children[X].toString(),!Y.equals(""))$+=Y;if($.equals("")&&this.sourceRoute)$+="(SOURCE_ROUTE=yes)";if($.equals("")&&!this.loadBalance)$+="(LOAD_BALANCE=no)";if($.equals("")&&!this.failover)$+="(FAILOVER=false)";if(!$.equals(""))$="(DESCRIPTION_LIST="+$+")";return $}}class fV0{constructor(){this.CNdata=[]}}var NI={DEBUG:!1,SR:"(SOURCE_ROUTE=yes)",HC:"(HOP_COUNT=0)",LB:"(LOAD_BALANCE=yes)",NFO:"(FAILOVER=false)",CD:"(CONNECT_DATA=",CONID:"(CONNECTION_ID="},IN1={all:!0};class As extends PN1{constructor(){super()}async navigate($){let Y,X=!1,G=!1;if(!this.host){X=!0,this.host=Gi6.hostname();try{await qN1.lookup(this.host,IN1)}catch{this.host="localhost"}}if($.getcurrentDescription()==null)$.newConnectionDescription(),G=!0;if(!Ji6.isIP(this.host)&&!($.httpsProxy||this.httpsProxy))try{Y=await qN1.lookup(this.host,IN1);for(let J of Y){let Q=new fV0;if(Q.hostname=this.host,Q.port=this.port,Q.protocol=this.prot,Q.httpsProxy=this.httpsProxy,Q.httpsProxyPort=this.httpsProxyPort,Q.desc=$.getcurrentDescription(),Q.CNdata.push($.sBuf.join("")),X)Q.CNdata.push("(address=(protocol="+this.prot+")(host="+this.host+")(port="+this.port+"))");else Q.CNdata.push(this.toString());Q.host=J.address,Q.addr=this.addr,$.getcurrentDescription().addConnectOption(Q)}}catch{}else{let J=new fV0;J.hostname=this.host,J.port=this.port,J.protocol=this.prot,J.httpsProxy=this.httpsProxy,J.httpsProxyPort=this.httpsProxyPort,J.desc=$.getcurrentDescription(),J.CNdata.push($.sBuf.join("")),J.CNdata.push(this.toString()),J.host=this.host,J.addr=this.addr,$.getcurrentDescription().addConnectOption(J)}if(G)$.closeDescription()}addToString($){let Y=this.toString(),X=[];X=$.getcurrentDescription().getConnectOptions();for(let G=0;G<X.length;G++){if(X[G].done)continue;X[G].CNdata.push(Y)}}}class Fs extends wN1{constructor(){super();this.activeChildren=[],this.sBuflength=0}async navigate($){await this.navigate2($,0)}async navigate2($,Y){if(Y++,this.sBuflength=$.sBuf.length,$.sBuf.push("(ADDRESS_LIST="),this.sourceRoute){this.activeChildren=this.children,await this.activeChildren[0].navigate($);for(let X=1;X<this.activeChildren.length;X++)this.activeChildren[X].addToString($)}else{this.activeChildren=xx.setActiveChildren(this.children,this.failover,this.loadBalance);for(let X=0;X<this.activeChildren.length;X++)if(this.getChildrenType(X)==1)await this.activeChildren[X].navigate2($,Y);else await this.activeChildren[X].navigate($)}this.closeNVPair($),$.sBuf.length=this.sBuflength}addToString($){let Y=this.toString(),X=[];X=$.getcurrentDescription().getConnectOptions();for(let G=0;G<X.length;G++){if(X[G].done)continue;X[G].CNdata.push(Y)}}getChildrenSize(){let $=0;for(let Y=0;Y<this.activeChildren.length;Y++){if(this.getChildrenType(Y)==1)$+=this.activeChildren[Y].getChildrenSize();else $++;if(this.sourceRoute)return $}return $}getChildrenType($){return this.activeChildren[$].isS()}getChild($){return this.children[$]}closeNVPair($){let Y=[],X=this.getChildrenSize();if($.getcurrentDescription()!=null){Y=$.getcurrentDescription().getConnectOptions();let G=0,J=null,Q=null;for(let W=Y.length-1;W>=0&&!Y[W].done;W--){if(Y[W].hostname!=J||Y[W].port!=Q)G++;if(J=Y[W].hostname,Q=Y[W].port,G>X)break;if(this.sourceRoute)Y[W].CNdata.push(NI.SR),Y[W].CNdata.push(NI.HC),Y[W].done=!0;Y[W].CNdata.push(")")}}}}class gV0 extends _N1{constructor(){super();this.activeChildren=[],this.descProcessed=0}async navigate($){$.sBuf.length=0,$.sBuf.push("(DESCRIPTION=");let Y=$.newConnectionDescription();if(this.retryCount!=null)$.retryCount=this.getIntValue(this.retryCount,$.retryCount),Y.retryCount=$.retryCount;if(this.delayInMillis!=-1)Y.delayInMillis=this.delayInMillis;if(Y.params=this.params,"connectTimeout"in this.params)$.sBuf.push("(CONNECT_TIMEOUT="+this.params.connectTimeout+")");if("transportConnectTimeout"in this.params)$.sBuf.push("(TRANSPORT_CONNECT_TIMEOUT="+this.params.transportConnectTimeout+")");if("recvTimeout"in this.params)$.sBuf.push("(RECV_TIMEOUT="+this.params.recvTimeout+")");if("sdu"in this.params)$.sBuf.push("(SDU="+this.params.sdu+")");if("expireTime"in this.params)$.sBuf.push("(EXPIRE_TIME="+this.params.expireTime+")");if("enable"in this.params)$.sBuf.push("(ENABLE="+this.params.enable+")");if("useSNI"in this.params)$.sBuf.push("(USE_SNI="+this.params.useSNI+")");if("sslServerCertDN"in this.params||"sslServerDNMatch"in this.params||"walletLocation"in this.params||"sslAllowWeakDNMatch"in this.params){if($.sBuf.push("(SECURITY="),"sslServerCertDN"in this.params)$.sBuf.push("(SSL_SERVER_CERT_DN="+this.params.sslServerCertDN+")");if("sslServerDNMatch"in this.params)$.sBuf.push("(SSL_SERVER_DN_MATCH="+this.params.sslServerDNMatch+")");if("sslAllowWeakDNMatch"in this.params)$.sBuf.push("(SSL_ALLOW_WEAK_DN_MATCH="+this.params.sslAllowWeakDNMatch+")");if("walletLocation"in this.params)$.sBuf.push("(WALLET_LOCATION="+this.params.walletLocation+")");$.sBuf.push(")")}if("httpsProxyPort"in this.params)$.sBuf.push("(HTTPS_PROXY_PORT="+this.params.httpsProxyPort+")");if("httpsProxy"in this.params)$.sBuf.push("(HTTPS_PROXY="+this.params.httpsProxy+")");if(!this.failover)$.sBuf.push(NI.NFO);if(!this.sourceRoute){this.activeChildren=xx.setActiveChildren(this.children,this.failover,this.loadBalance);for(let X=0;X<this.activeChildren.length;X++)await this.activeChildren[X].navigate($);this.closeNVPair($)}else{this.activeChildren=this.children,await this.activeChildren[0].navigate($);for(let X=1;X<this.activeChildren.length;X++)this.activeChildren[X].addToString($);this.closeNVPair($)}$.closeDescription()}closeNVPair($){if($.getcurrentDescription()==null)return;let Y=[];Y=$.getcurrentDescription().getConnectOptions();for(let X=0;X<Y.length;++X){if(this.sourceRoute)Y[X].CNdata.push(NI.SR);if(this.connectData==null)this.connectData="(SERVICE_NAME=)";let G=hV0.program;if($.program)G=$.program;let J=hV0.hostName;if($.machine)J=$.machine;let Q=hV0.userName;if($.osUser)Q=$.osUser;let W=`(CID=(PROGRAM=${G})(HOST=${J})(USER=${Q}))`;if(Y[X].CNdata.push(NI.CD),Y[X].CNdata.push(this.connectData),Y[X].CNdata.push(W),Y[X].CNdata.push(")"),this.SID!=null)Y[X].sid=this.SID;if(this.serviceName!=null)Y[X].service_name=this.serviceName;if(this.instanceName!=null)Y[X].instance_name=this.instanceName;Y[X].CNdata.push(")"),Y[X].done=!0}}getIntValue($,Y){if(/^\d+$/.test($))return parseInt($);return Y}}class xx extends jN1{constructor($=[],Y=0,X=0){super();this.activeChildren=$,this.descProcessed=Y,this.done=X}async navigate($){$.sBuf.push("(DESCRIPTION_LIST="),this.activeChildren=xx.setActiveChildren(this.children,this.failover,this.loadBalance);while(this.descProcessed<this.activeChildren.length)await this.activeChildren[this.descProcessed].navigate($),this.descProcessed++}static setActiveChildren($,Y,X){let G,J=$.length,Q=[],W=Math.floor(Math.random()*10),Z=Array(J).fill(!1);if(Y)if(X)for(let K=0;K<J;K++){do G=Math.abs(Math.floor(Math.random()*10))%J;while(Z[G]);Z[G]=!0,Q.push($[G])}else Q=$;else if(X)G=Math.abs(W)%J,Q.push($[G]);else Q.push($[0]);return Q}}TN1.exports={NavAddress:As,NavAddressList:Fs,NavDescription:gV0,NavDescriptionList:xx}});var uV0=o((qq5,yN1)=>{var{NavAddress:Wi6,NavAddressList:Zi6,NavDescription:Ki6,NavDescriptionList:Ui6}=CN1(),{createNVPair:Hi6}=FI(),SN1=E4(),zi6=pA();class kN1{constructor(){this.cOpts=[]}addConnectOption($){this.cOpts.push($)}getConnectOptions(){return this.cOpts}}class vN1{constructor(){this.reset(),this.retryCount=0,this.currentDescription=null,this.descriptionList=[],this.sBuf=[]}reset(){this.nextOptToTry=0,this.lastRetryCounter=0,this.lastRetryConnectDescription=0,this.reorderDescriptionList=0}hasMoreOptions(){let $=0;for(let Y=0;Y<this.descriptionList.length;++Y)$+=this.descriptionList[Y].getConnectOptions().length;return this.nextOptToTry<$}newConnectionDescription(){return this.currentDescription=new kN1,this.currentDescription}getcurrentDescription(){return this.currentDescription}closeDescription(){this.descriptionList.push(this.currentDescription),this.currentDescription=null}async execute($){if($!=null){if(this.retryCount==0&&$.retryCount>0)this.retryCount=$.retryCount}if(!this.reorderDescriptionList)this.descriptionList=mV0.reorderDescriptionList(this.descriptionList),this.reorderDescriptionList=!0;for(let Y=this.lastRetryConnectDescription;Y<this.descriptionList.length;Y++){let X=this.descriptionList[Y],G=[];G=X.getConnectOptions();let J=X.delayInMillis;if($!=null){if((J==0||J==null)&&$.retryDelay>0)J=$.retryDelay*1000;else if(!J)J=zi6.DEFAULT_RETRY_DELAY}for(let Q=this.lastRetryCounter;Q<=this.retryCount;++Q){if(this.nextOptToTry==0)G=mV0.reorderAddresses(G);while(this.nextOptToTry<G.length){let W=G[this.nextOptToTry];return this.lastRetryCounter=Q,this.lastRetryConnectDescription=Y,this.nextOptToTry++,W}if(this.nextOptToTry=0,J>0&&Q<this.retryCount)await Vi6(J)}this.lastRetryCounter=0}throw this.nextOptToTry=1000,this.lastRetryCounter=1000,Error("All options tried")}}function Vi6($){return new Promise((Y)=>setTimeout(Y,$))}async function Ai6($,Y){let X;if(typeof $==="string")X=Hi6($);else X=$;let G=X.name.toUpperCase(),J=null;switch(G){case"ADDRESS":J=new Wi6;break;case"ADDRESS_LIST":J=new Zi6;break;case"DESCRIPTION":J=new Ki6;break;case"DESCRIPTION_LIST":J=new Ui6;break;default:SN1.throwErr(SN1.ERR_INVALID_CONNECT_STRING_PARAMETERS,`unknown top element ${G}`)}J.initFromNVPair(X);let Q=new vN1;return Q.driverName=Y.driverName,Q.machine=Y.machine,Q.terminal=Y.terminal,Q.osUser=Y.osUser,Q.program=Y.program,Q.httpsProxy=Y.httpsProxy,await J.navigate(Q),Q}class xN1{constructor(){this.DOWN_HOSTS_TIMEOUT=600,this.MIN_TIME_BETWEEN_REFRESH=60,this.downHostsCacheMap=new Map,this.lastRefreshTime=0}markDownHost($){return this.downHostsCacheMap.set($,Date.now())}refreshCache(){if(Date.now()-this.MIN_TIME_BETWEEN_REFRESH*1000>this.lastRefreshTime)this.downHostsCacheMap.forEach(($,Y)=>{let X=$;if(X!=null&&Date.now()-this.DOWN_HOSTS_TIMEOUT*1000>X)this.downHostsCacheMap.delete(Y)}),this.lastRefreshTime=Date.now()}reorderAddresses($){this.refreshCache();let Y=0,X=$.length-1;while(Y<X){while(Y<=X&&!this.isDownHostsCached($[Y]))Y++;while(X>=Y&&this.isDownHostsCached($[X]))X--;if(Y<X)[$[Y],$[X]]=[$[X],$[Y]]}return $}isDownDescCached($){let Y=$.getConnectOptions();for(let X=0;X<Y.length;X++)if(!this.isDownHostsCached(Y[X]))return!1;return!0}reorderDescriptionList($){this.refreshCache();let Y=0,X=$.length-1;while(Y<X){while(Y<=X&&!this.isDownDescCached($[Y]))Y++;while(X>=Y&&this.isDownDescCached($[X]))X--;if(Y<X)[$[Y],$[X]]=[$[X],$[Y]]}return $}isDownHostsCached($){return this.downHostsCacheMap.has($.host)}}var mV0=new xN1;yN1.exports={createNode:Ai6,SOLE_INST_DHCACHE:mV0}});var gN1=o((Iq5,fN1)=>{var lA=E4(),bN1=new RegExp("((?=(?<hostnames>(((\\[[A-z0-9:]+\\])|([A-z0-9][A-z0-9._-]+))[,]?)+)))\\k<hostnames>(:(?<port>\\d+)?)?","g"),Fi6=new RegExp("^(((?<protocol>[A-z0-9]+):)?//)?(?<hostinfo>("+bN1.source+"(?=([,]|[;]|[/]|[:]|$))([,]|[;])?)+)(/(?<servicename>[A-z0-9][A-z0-9,-.]+)?)?(:(?<servermode>dedicated|shared|pooled))?(/(?<instance>[A-z0-9][A-z0-9]+))?$","ig"),Di6=["ENABLE","FAILOVER","LOAD_BALANCE","RECV_BUF_SIZE","SEND_BUF_SIZE","SDU","SOURCE_ROUTE","RETRY_COUNT","RETRY_DELAY","CONNECT_TIMEOUT","TRANSPORT_CONNECT_TIMEOUT","RECV_TIMEOUT","USE_SNI","COMPRESSION"];class hN1{constructor($){this.URL_PROPS_ALIAS=this.initializeUrlAlias(),this.url=$,this.resolvedUrl="",this.connectionProps=new Map,this.urlProps=new Map,this.lb=!1}getResolvedUrl(){return this.parse(),this.resolvedUrl}parse(){let $=this.parseExtendedSettings(this.url);if(this.connectionProps.size===0&&this.urlProps.size===0)$=this.url;this.resolvedUrl=this.resolveToLongURLFormat($)}resolveToLongURLFormat($){let Y=$.replace(/\s/g,""),X=0,G=null,J=null,Q=null,W=null,Z=null;for(let F of Y.matchAll(Fi6))X=1,G=F.groups.protocol,J=F.groups.hostinfo,Q=F.groups.servicename,W=F.groups.servermode,Z=F.groups.instance;if(!X)lA.throwErr(lA.ERR_INVALID_EZCONNECT_SYNTAX,"input string not in easy connect format",Y);if(G==null){if(!$.includes("//"))G="TCP"}else if(G.toLowerCase()!="tcp"&&G.toLowerCase()!="tcps")lA.throwErr(lA.ERR_INVALID_EZCONNECT_SYNTAX,"Unsupported protocol in thin mode",G);let K=this.urlProps.get("HTTPS_PROXY"),H=this.urlProps.get("HTTPS_PROXY_PORT"),z=this.buildAddressList(J,G,K,H),V=this.urlProps.get("CONNECTION_ID_PREFIX"),A=[];if(this.lb)A.push("(LOAD_BALANCE=ON)");return A.push(this.buildDescriptionParams()),A.push(z),A.push(this.buildConnectData(Q,W,Z,V)),A.push(this.buildSecurityInfo(G)),`(DESCRIPTION=${A.join("")})`}buildConnectData($,Y,X,G){let J=this.urlProps.get("POOL_CONNECTION_CLASS"),Q=this.urlProps.get("POOL_PURITY"),W=this.urlProps.get("SERVICE_TAG"),Z=this.urlProps.get("POOL_BOUNDARY"),K=[];if($)K.push(`(SERVICE_NAME=${$})`);else K.push("(SERVICE_NAME=)");if(Y)K.push(`(SERVER=${Y})`);if(X)K.push(`(INSTANCE_NAME=${X})`);if(J)K.push(`(POOL_CONNECTION_CLASS=${J})`);if(Q)K.push(`(POOL_PURITY=${Q})`);if(W)K.push(`(SERVICE_TAG=${W})`);if(G)K.push(`(CONNECTION_ID_PREFIX=${G})`);if(Z)K.push(`(POOL_BOUNDARY=${Z})`);return`(CONNECT_DATA=${K.join("")})`}buildAddressList($,Y,X,G){let J=[],Q="";if(X!=null)if(G!=null)Q=`(HTTPS_PROXY=${X})(HTTPS_PROXY_PORT=${G})`;else Q=`(HTTPS_PROXY=${X})`;if(Y==null)Y="TCP";let W=0,Z=$.split(";");for(let K of Z){let H=0,z=[];for(let A of K.matchAll(bN1)){let F=A.groups.hostnames.split(","),N=A.groups.port;if(N==null)N="1521";for(let D of F)z.push(this.getAddrStr(D,N,Y,Q)),H++}W+=H;let V=[];if(Z.length>1&&H>1)V.push("(LOAD_BALANCE=ON)");if(V.push(z.join("")),Z.length>1)J.push(`(ADDRESS_LIST=${V.join("")})`);else J.push(V.join(""))}if(Z.length<2&&W>1)this.lb=!0;return J.join("")}getAddrStr($,Y,X,G){let J=$.trim();if(J.startsWith("[")&&J.endsWith("]"))J=J.substring(1,J.length-1);return`(ADDRESS=(PROTOCOL=${X})(HOST=${J})(PORT=${Y})${G})`}buildDescriptionParams(){if(this.urlProps.size===0)return"";let $=[];return this.urlProps.forEach(function(Y,X){if(Di6.includes(X))$.push(`(${X}=${Y})`)}),$.join("")}buildSecurityInfo($){let Y=[];if($!=null&&$.toLowerCase()=="tcps"){let X=this.urlProps.get("SSL_SERVER_DN_MATCH"),G=this.urlProps.get("SSL_SERVER_CERT_DN"),J=this.urlProps.get("MY_WALLET_DIRECTORY");if(X!=null)Y.push(`(SSL_SERVER_DN_MATCH=${X})`);if(G!=null)Y.push(`(SSL_SERVER_CERT_DN=${G}})`);if(J!=null)Y.push(`(MY_WALLET_DIRECTORY=${J})`)}if(Y.length===0)return"";return`(SECURITY=${Y.join("")})`}parseExtendedSettings($){let Y=Array.from($.trim()),X=this.findExtendedSettingPosition(Y);if(X==-1)return $;return this.parseExtendedProperties(Y,X+1),$.substring(0,X)}parseExtendedProperties($,Y){let X=null,G=null,J=Array($.length),Q=0,W="";for(let Z=Y;Z<$.length;Z++){if($[Z].trim()=="")continue;switch($[Z]){case'"':W=this.parseQuotedString(Z,$,Q,J),Q=W[1],Z=W[0];break;case"=":if(X!=null)lA.throwErr(lA.ERR_INVALID_EZCONNECT_SYNTAX,"unable to parse, invalid syntax",this.url);X=J.join("").substring(0,Q).trim(),Q=0;break;case"&":if(X==null)lA.throwErr(lA.ERR_INVALID_EZCONNECT_SYNTAX,"unable to parse, invalid syntax",this.url);G=J.join("").substring(0,Q).trim(),this.addParam(X,G),X=null,G=null,Q=0;break;default:J[Q++]=$[Z]}}if(X!=null)G=J.join("").substring(0,Q).trim(),this.addParam(X,G)}parseQuotedString($,Y,X,G){let J=$+1;while(J<Y.length){let Q=Y[J];if(Q=='"')return[J,X];else G[X++]=Q;J++}}addParam($,Y){let X=$.toLowerCase(),G=this.URL_PROPS_ALIAS.get(X);if(G!=null)this.urlProps.set(G,Y);else this.connectionProps.set(G,Y)}findExtendedSettingPosition($){let Y=0;for(let X=0;X<$.length;X++)if($[X]=="(")Y++;else if($[X]==")")Y--;else if($[X]=="?"&&Y==0)return X;return-1}initializeUrlAlias(){let $=new Map;return $.set("enable","ENABLE"),$.set("compression","COMPRESSION"),$.set("failover","FAILOVER"),$.set("load_balance","LOAD_BALANCE"),$.set("recv_buf_size","RECV_BUF_SIZE"),$.set("send_buf_size","SEND_BUF_SIZE"),$.set("sdu","SDU"),$.set("source_route","SOURCE_ROUTE"),$.set("retry_count","RETRY_COUNT"),$.set("retry_delay","RETRY_DELAY"),$.set("https_proxy","HTTPS_PROXY"),$.set("https_proxy_port","HTTPS_PROXY_PORT"),$.set("connect_timeout","CONNECT_TIMEOUT"),$.set("transport_connect_timeout","TRANSPORT_CONNECT_TIMEOUT"),$.set("recv_timeout","RECV_TIMEOUT"),$.set("ssl_server_cert_dn","SSL_SERVER_CERT_DN"),$.set("ssl_server_dn_match","SSL_SERVER_DN_MATCH"),$.set("wallet_location","MY_WALLET_DIRECTORY"),$.set("pool_connection_class","POOL_CONNECTION_CLASS"),$.set("pool_purity","POOL_PURITY"),$.set("service_tag","SERVICE_TAG"),$.set("connection_id_prefix","CONNECTION_ID_PREFIX"),$.set("pool_boundary","POOL_BOUNDARY"),$.set("use_sni","USE_SNI"),$}}fN1.exports=hN1});var pV0=o((Pq5,dN1)=>{var{createNVPair:Ni6}=FI(),BI=L0("fs"),mN1=L0("process"),Li6=L0("readline"),LI=E4();function Bi6($){let Y=null,X=mN1.env.TNS_ADMIN;if($)if(Y=$+"/tnsnames.ora",BI.existsSync(Y))return Y;else LI.throwErr(LI.ERR_TNS_NAMES_FILE_MISSING,$);else{if(!X)LI.throwErr(LI.ERR_NO_CONFIG_DIR);else if(Y=X,Y+="/tnsnames.ora",!BI.existsSync(Y))LI.throwErr(LI.ERR_TNS_NAMES_FILE_MISSING,X);return Y}}class uN1{constructor(){this.readInProgress=!1,this.waiters=[],this.aliasht=new Map,this.modTime=new Map}}class pN1{constructor(){this.tnsnamesHT=new Map}async initializeNlpa($){let Y;if(this.tnsnamesHT.has($))Y=this.tnsnamesHT.get($);else Y=new uN1;if(Y.readInProgress)await new Promise((X)=>{Y.waiters.push(X)});if(!this.checkModfTime(Y))return Y.aliasht;return Y.readInProgress=!0,await this.start($,0,Y),this.tnsnamesHT.set($,Y),Y.aliasht}async start($,Y,X){if(Y>4)return;let G=BI.statSync($);X.modTime.set($,G.mtime);let J=Li6.createInterface({input:BI.createReadStream($),output:mN1.stdout,terminal:!1}),Q="";for await(let Z of J)if(Z.length==0)continue;else if(Z[0]=="#")continue;else if(Z[0]==" "||Z[0]=="\t"||Z[0]==")"||Z[0]=="(")if(Z=Z.replace(/\s+/g,""),Z=this.checkNLPforComments(Z),Z.length==0)continue;else Q=Q+Z;else if(Q.length==0)Z=this.checkNLPforComments(Z),Q=Q+Z;else if(Q.length!=0)await this.addNLPListElement(Q,Y,X),Q="",Z=this.checkNLPforComments(Z),Q=Q+Z;if(Q.length!=0)await this.addNLPListElement(Q,Y,X),Q="";X.readInProgress=!1;let W;while(W=X.waiters.pop())W()}checkNLPforComments($){let Y=Array($.length);for(let X=0;X<$.length;X++){let G=$[X];if(G=="#")if(X!=0)break;else return"";else Y.push(G)}return Y.join("")}checkModfTime($){if($.modTime.size!=0)for(let[Y,X]of $.modTime)if(BI.existsSync(Y)){if(BI.statSync(Y).mtime-X>0)return!0}else return!0;else return!0;return!1}async addNLPListElement($,Y,X){let G=$.split(/\r?\n/).filter((J)=>J);for(let J=0;J<G.length;J++){if(G[J].charAt(0)!="(")G[J]="("+G[J]+")";let Q=Ni6(G[J]),Z=Q.name.toUpperCase();if(Q.name=Z,Z=="IFILE")await this.start(Q.atom,Y+1,X);else{let K=Z.split(",");for(let H=0;H<K.length;H++)X.aliasht.set(K[H],Q)}}}}dN1.exports={NLParamParser:pN1,tnsnamesFilePath:Bi6}});var lV0=o((wq5,rN1)=>{var iA=L0("zlib"),c2=oD1(),Oi6=UN1(),Ei6=BN1(),z4=pA(),{createNode:lN1}=uV0(),h9=E4(),{findNVPairRecurse:Mi6,createNVPair:Ns,findValue:l2}=FI(),{Buffer:Ds}=L0("buffer"),cN1=gN1(),{NLParamParser:Ri6,tnsnamesFilePath:qi6}=pV0(),Ii6=L0("process"),Pi6=uV0().SOLE_INST_DHCACHE,{ANO:wi6}=xV0();async function _i6($){let Y=await iN1($.connectString,$.configDir),X=await lN1(Y,$),G;if(typeof Y==="string")G=Ns(Y);else G=Y;let J=l2(G,["DESCRIPTION","CONNECT_DATA","SERVER"]),Q=l2(G,["DESCRIPTION","CONNECT_DATA","POOL_CONNECTION_CLASS"]),W=l2(G,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"]),Z=l2(G,["DESCRIPTION","CONNECT_DATA","SID"]),K=l2(G,["DESCRIPTION","CONNECT_DATA","POOL_PURITY"]);return[J,Q,W,K,Z,X]}var ji6=new Ri6;async function iN1($,Y){let X=$.trim(),G=X;if(X.indexOf(")")==-1||X.indexOf("(")!=0)if(X.indexOf(":")!=-1||X.indexOf("/")!=-1)return G=new cN1(X).getResolvedUrl(),G;else{let J=qi6(Y);if(G=(await ji6.initializeNlpa(J)).get(X.toUpperCase()),!G)h9.throwErr(h9.ERR_TNS_ENTRY_NOT_FOUND,X,Y?Y+"/tnsnames.ora":Ii6.env.TNS_ADMIN+"/tnsnames.ora");if(G.rhsType==1){let W=G.atom;if(W.indexOf(":")!=-1||W.indexOf("/")!=-1)return new cN1(W).getResolvedUrl()}G=G.getListElement(0)}return G}async function cV0($,Y){let X=await iN1($,Y.configDir);return lN1(X,Y)}function dV0($,Y,X,G,J){let Q,W=new Promise((Z,K)=>{if(Y>2147483647)Y=2147483647;Q=setTimeout(()=>K(h9.getErr(h9.ERR_CONNECTION_TIMEDOUT,G.host,G.port,X,Y/1000,J)),Y)});return Promise.race([$,W]).then((Z)=>{return clearTimeout(Q),Z}).catch((Z)=>{throw clearTimeout(Q),Z})}class nN1{constructor(){this.connected=!1,this.isBreak=!1,this.isReset=!1,this.breakPosted=!1,this.compressionEnabled=!1}async getAddress($,Y){let X=await $.execute(Y),G=this.sAtts?this.sAtts.uuid:null;this.sAtts=new Ei6(G),this.sAtts.setFrom(Y),this.sAtts.setFrom(X.desc.params),await this.sAtts.prepare(X.protocol,Y);let J=Ns(X.CNdata.join("")),Q=Mi6(J,"CONNECT_DATA"),W=`(CONNECTION_ID=${this.sAtts.connectionId})`,Z=Ns(W);return Q.addListElement(Z),this.cData=Ds.from(J.toString(),"ascii"),this.cDataNVPair=J,this.sAtts.nt.cDataNVPair=J,X}async transportConnect($){if($.protocol.toUpperCase()=="TCP"&&$.httpsProxy)h9.throwErr(h9.ERR_INVALID_CONNECT_STRING_PARAMETERS,"https proxy requires protocol as","tcps ");if($.protocol&&($.protocol.toUpperCase()=="TCP"||$.protocol.toUpperCase()=="TCPS"))this.ntAdapter=new Oi6(this.sAtts.nt);else h9.throwErr(h9.ERR_INVALID_CONNECT_STRING_PARAMETERS,$.protocol+" protocol not supported");await this.ntAdapter.connect($),this.ntAdapter.startRead(),this.sAtts.ntCha=this.ntAdapter.cha,this.sndDatapkt=new c2.DataPacket(this.sAtts.largeSDU),this.rcvDatapkt=new c2.DataPacket(this.sAtts.largeSDU)}_sendConnect($){if(this.sendPacket($.buf),$.overflow)this._send($.connectData,0,$.connectDataLen),this.flush()}async connect2($,Y){if(this.sAtts.sdu){if(this.sAtts.sdu>z4.NSPABSSDULN)this.sAtts.sdu=z4.NSPABSSDULN;else if(this.sAtts.sdu<z4.NSPMNSDULN)this.sAtts.sdu=z4.NSPMNSDULN}else this.sAtts.sdu=z4.NSPDFSDULN;if(this.sAtts.transportConnectTimeout){let G=this.transportConnect($);await dV0(G,this.sAtts.transportConnectTimeout,"transportConnectTimeout",$,this.sAtts.connectionId)}else await this.transportConnect($);let X=new c2.ConnectPacket(this.cData,this.sAtts);this._sendConnect(X);while(!0){let G=await this._recvPacket();if(G.type===z4.NSPTAC)break;if(G.type===z4.NSPTRF){if(this.refusePkt.overflow)await this._recvPacket(),this.refusePkt.dataBuf=this.rcvDatapkt.buf.subarray(this.rcvDatapkt.offset,this.rcvDatapkt.len).toString();let J=Ns(this.refusePkt.dataBuf);this.refusePkt=null;let Q=l2(J,["DESCRIPTION","ERR"]);if(Q=="12514")h9.throwErr(h9.ERR_INVALID_SERVICE_NAME,this.getOption(z4.SVCNAME),$.host,$.port,this.sAtts.connectionId);else if(Q=="12505")h9.throwErr(h9.ERR_INVALID_SID,this.getOption(z4.SID),$.host,$.port,this.sAtts.connectionId);else if(Q)h9.throwErr(h9.ERR_CONNECTION_REFUSED,$.host,$.port,this.sAtts.connectionId,"ORA-"+Q);else h9.throwErr(h9.ERR_CONNECTION_REFUSED,$.host,$.port,this.sAtts.connectionId,"refused")}else if(G.type===z4.NSPTRS){if((G.flags&z4.NSPFSRN)==z4.NSPFSRN)await this.ntAdapter.renegTLS(),this.ntAdapter.startRead();this._sendConnect(X)}else if(G.type===z4.NSPTRD){let J,Q,W;if(this.redirectPkt.overflow)await this._recvPacket(),this.redirectPkt.dataBuf=this.rcvDatapkt.buf.subarray(this.rcvDatapkt.offset,this.rcvDatapkt.len);if(this.redirectPkt.flags&z4.NSPFRDS)J=this.redirectPkt.dataBuf.indexOf("\x00",0,"ascii"),Q=this.redirectPkt.dataBuf.toString("ascii",0,J),W=this.redirectPkt.dataBuf.subarray(J+1,this.redirectPkt.dataLen);else Q=this.redirectPkt.dataBuf.toString("ascii"),W=this.cData;let Z=await cV0(Q,Y),K=$.hostname;if($=await Z.execute(),$.desc)this.sAtts.setFrom($.desc.params);if($.originHost=K,this.redirectPkt=null,this.ntAdapter.disconnect(z4.NSFIMM),this.sAtts.transportConnectTimeout){let H=this.transportConnect($);await dV0(H,this.sAtts.transportConnectTimeout,"transportConnectTimeout",$,this.sAtts.connectionId)}else await this.transportConnect($);X=new c2.ConnectPacket(W,this.sAtts,z4.NSPFRDR),this.sndDatapkt=new c2.DataPacket(this.sAtts.largeSDU),this._sendConnect(X)}}if(this.cData=null,this.sndDatapkt=new c2.DataPacket(this.sAtts.largeSDU),this.markerPkt=new c2.MarkerPacket(this.sAtts.largeSDU),this.controlPkt=new c2.ControlPacket,this.ntAdapter.largeSDU=this.sAtts.largeSDU,this.sAtts.clearWallet(),this.sAtts.nt.walletPassword=null,!this.sAtts.noNA){let G=new wi6(this.sAtts),J=G.sendPacket();this._send(J,0,J.length),this.flush();let Q=await this._recvPacket();G.processPacket(Q.buf)}return this.sndDatapkt.createPacket(z4.NSPDADAT),this.sndDatapkt.offset=this.sndDatapkt.dataPtr,this.sndDatapkt.len=this.sndDatapkt.bufLen,this.connected=!0,!0}async connect1($,Y,X){let G,J;do try{if(this.sAtts.connectTimeout){let Q=this.connect2($,X);G=await dV0(Q,this.sAtts.connectTimeout,"connectTimeout",$,this.sAtts.connectionId)}else G=await this.connect2($,X)}catch(Q){if(Q.message.startsWith("NJS-510")&&!this.ntAdapter.connected)Pi6.markDownHost($.host,Date.now()),this.ntAdapter.connected=!0;if(this.ntAdapter)this.ntAdapter.disconnect(z4.NSFIMM),this.ntAdapter=null;this.sAtts.clearWallet(),G=!1,J=Q;try{$=await this.getAddress(Y,X)}catch(W){break}}while(!G);if(G)return;else throw J}_processPacket($){switch($.type){case z4.NSPTDA:{let Y=$.buf.length;if(($.buf.readUInt16BE(z4.NSPDAFLG)&z4.NSPDAFCMP)!=0){let G=$.buf.subarray(0,z4.NSPDADAT),J=$.buf.subarray(z4.NSPDADAT,Y),Q;try{if(this.sAtts.firstRecvCompressedPacket)Q=iA.inflateSync(J,{finishFlush:iA.constants.Z_SYNC_FLUSH}),this.sAtts.firstRecvCompressedPacket=0;else Q=iA.inflateRawSync(J,{finishFlush:iA.constants.Z_SYNC_FLUSH})}catch(K){h9.throwErr(h9.ERR_DATA_COMPRESSION,K.message)}let W=Q.length;$.buf=Ds.concat([G,Q]);let Z=W+z4.NSPDADAT;if(this.sAtts.largeSDU)$.buf.writeUInt32BE(Z,z4.NSPHDLEN);else $.buf.writeUInt16BE(Z,z4.NSPHDLEN)}this.rcvDatapkt.fromPacket($);break}case z4.NSPTMK:this.markerPkt.fromPacket($,this);break;case z4.NSPTCNL:this.controlPkt.fromPacket($);break;case z4.NSPTAC:if(c2.AcceptPacket($,this.sAtts),this.sAtts.version>=z4.TNS_VERSION_MIN_END_OF_RESPONSE&&$.flags&z4.TNS_ACCEPT_FLAG_HAS_END_OF_REQUEST)this.endOfRequestSupport=!0;if($.flags&z4.TNS_ACCEPT_FLAG_FAST_AUTH)this.supportsFastAuth=!0;break;case z4.NSPTRF:this.refusePkt=new c2.RefusePacket($);break;case z4.NSPTRS:break;case z4.NSPTRD:this.redirectPkt=new c2.RedirectPacket($);break;default:h9.throwErr(h9.ERR_CONNECTION_INVALID_PACKET)}}async _recvPacket(){while(!0){let $=await this.ntAdapter.receive();if(!$)break;if(this._processPacket($),$.type!==z4.NSPTCNL)return $}}sendPacket($){if($.readUInt8(z4.NSPHDTYP)==z4.NSPTDA){let X=$.length,G=$.readUInt16BE(z4.NSPDAFLG);if(this.sAtts.networkCompressionEnabled&&X>this.sAtts.networkCompressionThreshold){this.compressionEnabled=!0;let J=$.subarray(z4.NSPDADAT,X),Q=$.subarray(0,z4.NSPDADAT),W;try{if(this.sAtts.firstSendCompressedPacket)W=iA.deflateSync(J,{finishFlush:iA.constants.Z_SYNC_FLUSH}),this.sAtts.firstSendCompressedPacket=0;else W=iA.deflateRawSync(J,{finishFlush:iA.constants.Z_SYNC_FLUSH})}catch(K){h9.throwErr(h9.ERR_DATA_COMPRESSION,K.message)}let Z=W.length;if(Z<X-z4.NSPDADAT){G|=z4.NSPDAFCMP,$=Ds.concat([Q,W]),$.writeUInt16BE(G,z4.NSPDAFLG);let K=Z+z4.NSPDADAT;if(this.sAtts.largeSDU)$.writeUInt32BE(K,z4.NSPHDLEN);else $.writeUInt16BE(K,z4.NSPHDLEN)}}}this.ntAdapter.send($)}sendBreak(){if(this.isBreak)return;if(!this.connected){this.isBreak=!0,this.breakPosted=!0;return}this.isBreak=!0,this.markerPkt.prepare(z4.NSPMKTD1,z4.NIQIMARK),this.sendPacket(this.markerPkt.buf)}async reset(){if(this.breakPosted)this.markerPkt.prepare(z4.NSPMKTD1,z4.NIQBMARK),this.sendPacket(this.markerPkt.buf),this.breakPosted=!1;this.markerPkt.prepare(z4.NSPMKTD1,z4.NIQRMARK),this.sendPacket(this.markerPkt.buf);while(!this.isReset)await this._recvPacket();this.sndDatapkt.dataPtr=this.sndDatapkt.dataLen=z4.NSPDADAT,this.sndDatapkt.offset=this.sndDatapkt.dataPtr,this.sndDatapkt.len=this.sndDatapkt.bufLen,this.isBreak=this.isReset=!1}async recvPacket(){return await this._recvPacket()}syncRecvPacket(){while(this.ntAdapter.packets.length>0){let $=this.ntAdapter.syncReceive();if(!$)break;if(this._processPacket($),$.type!==z4.NSPTCNL)return $}}_send($,Y,X){if(this.isBreak)return;let G=0;if(this.sndDatapkt.dataLen=this.sndDatapkt.offset,this.sndDatapkt.dataLen<this.sndDatapkt.bufLen||!this.sndDatapkt.bufLen)G=this.sndDatapkt.fillBuf($,Y,X),X-=G,Y+=G,this.sndDatapkt.offset=this.sndDatapkt.dataLen;while(X){if(this.sendPacket(this.sndDatapkt.dataBuf),this.isBreak)return;this.sndDatapkt.dataLen=this.sndDatapkt.dataPtr,this.sndDatapkt.offset=this.sndDatapkt.dataPtr,G=this.sndDatapkt.fillBuf($,Y,X),X-=G,Y+=G,this.sndDatapkt.offset=this.sndDatapkt.dataLen}}flush(){if(this.isBreak)return;this.sndDatapkt.dataLen=this.sndDatapkt.offset,this.sndDatapkt.prepare2Send(),this.sendPacket(Ds.from(this.sndDatapkt.dataBuf)),this.sndDatapkt.dataLen=this.sndDatapkt.dataPtr,this.sndDatapkt.offset=this.sndDatapkt.dataPtr}async connect($){let Y=$.connectString?$.connectString:$.connectionString,X;if($._connInfo)X=$._connInfo[5],X.reset();else X=await cV0(Y,$);let G;try{G=await this.getAddress(X,$)}catch(J){if(J.message=="All options tried")h9.throwErr(h9.ERR_HOST_NOT_FOUND);else h9.throwErr(h9.ERR_INVALID_CONNECT_STRING_PARAMETERS,J.message)}await this.connect1(G,X,$)}forceDisconnect($){if(!this.connected)return;this.ntAdapter.stream.destroy($),this.connected=!1}disconnect($){if(!this.connected)return;if($!=z4.NSFIMM&&!this.ntAdapter.err)this.sndDatapkt.dataLen=this.sndDatapkt.offset,this.sndDatapkt.prepare2Send(z4.NSPDAFEOF),this.sendPacket(this.sndDatapkt.dataBuf);this.ntAdapter.disconnect($),this.ntAdapter=null,this.connected=!1}getOption($){switch($){case z4.NS_MOREDATA:return this.ntAdapter.packets.length>0;case z4.SVCNAME:return l2(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"]);case z4.SID:return l2(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SID"]);case z4.SERVERTYPE:return l2(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVER"]);case z4.REMOTEADDR:if(this.ntAdapter)return this.ntAdapter.getOption($);else return null;case z4.CONNCLASS:return l2(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","POOL_CONNECTION_CLASS"]);case z4.PURITY:return l2(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","POOL_PURITY"]);case z4.HEALTHCHECK:return this.connected&&this.ntAdapter.connected&&!this.ntAdapter.err;default:h9.throwErr(h9.ERR_INTERNAL,"getOption not supported for opcode "+$)}}recvInbandNotif(){let $=0;if(this.controlPkt.errno)return $=this.controlPkt.errno,$;else if(!this.getOption(z4.HEALTHCHECK))return h9.ERR_CONNECTION_CLOSED;else if(this.getOption(z4.NS_MOREDATA)){let Y=this.ntAdapter.syncReceive();if(Y.type==z4.NSPTCNL)return this.controlPkt.fromPacket(Y),$=this.controlPkt.errno,$;else return this.ntAdapter.packets.unshift(Y),0}else return 0}}rN1.exports={NetworkSession:nN1,resolveAddress:cV0,getConnectionInfo:_i6}});var rV0=o((Si6,nV0)=>{var{Buffer:Ti6}=L0("buffer"),cX=SY(),aN1=E4(),Ci6=E9();class Ls{constructor($,Y=!1){this.bindName=$,this.isReturnBind=Y,this.maxSize=0,this.numElements=0,this.maxArraySize=0,this.type=null,this.isArray=!1,this.dir=cX.BIND_IN,this.bindVar=null}}Si6.BindInfo=Ls;class sN1{constructor(){this.returningKeywordFound=!1,this.pos=0,this.maxPos=0,this.sqlData=""}_parseBindName($){let Y=!1,X=!1,G=!1,J=0,Q=this.pos+1,W,Z;while(Q<=this.maxPos){if(Z=this.sqlData[Q],!X){if(/\p{space}/u.test(Z)){Q+=1;continue}else if(Z==='"')Y=!0;else if(/\p{N}/u.test(Z))G=!0;else if(!/\p{Alpha}/u.test(Z))break;X=!0,J=Q}else if(G&&!/\p{N}/u.test(Z)){this.pos=Q-1;break}else if(Y&&Z==='"'){this.pos=Q;break}else if(!G&&!Y&&!/[\p{L}\p{N}]/u.test(Z)&&!["$","_","#"].includes(Z)){this.pos=Q-1;break}Q+=1}if(X){if(Y)W=$.sql.substring(J+1,Q);else if(G)W=$.sql.substring(J,Q);else W=$.sql.substring(J,Q).toUpperCase();$._addBind(W)}}_parseMultiLineComment(){let $=!1,Y=!1,X=this.pos+1,G;while(X<=this.maxPos){if(G=this.sqlData[X],!$){if(G!=="*")break;$=!0}else if(G==="*")Y=!0;else if(Y){if(G==="/"){this.pos=X;break}Y=!1}X+=1}}_parseQstring(){let $=!1,Y=!1,X,G;this.pos+=1;while(this.pos<=this.maxPos){if(G=this.sqlData[this.pos],!Y){if(G==="[")X="]";else if(G==="{")X="}";else if(G==="(")X=")";else if(G==="<")X=">";else X=G;Y=!0}else if(!$&&G===X)$=!0;else if($){if(G==="'")break;else if(G!==X)$=!1}this.pos+=1}}_parseQuotedString($){let Y;this.pos+=1;while(this.pos<=this.maxPos){if(Y=this.sqlData[this.pos],Y===$)break;this.pos+=1}}_parseSingleLineComment(){let $=!1,Y=this.pos+1,X;while(Y<=this.maxPos){if(X=this.sqlData[Y],!$){if(X!=="-")return;$=!0}else if(X===`
`)break;Y+=1}this.pos=Y}parse($){let Y=!1,X=!1,G,J="",Q="",W=0,Z,K,H=!1,z;this.pos=0,this.maxPos=$.sql.length-1,this.sqlData=$.sql;while(this.pos<=this.maxPos){if(G=this.sqlData[this.pos],K=/\p{L}/u.test(G),K&&!H)W=this.pos,Q=G;else if(!K&&H){if(Z=this.pos-W,!Y){if(z=$.sql.substring(W,this.pos).toUpperCase(),$._determineStatementType(z),Y=!0,$.isDdl)break}else if($.isDml&&!this.returningKeywordFound&&(Z===9||Z===6)&&["r","R"].includes(Q)){if(z=$.sql.substring(W,this.pos).toUpperCase(),["RETURNING","RETURN"].includes(z))this.returningKeywordFound=!0}else if(this.returningKeywordFound&&Z===4&&["i","I"].includes(Q)){if(z=$.sql.substring(W,this.pos).toUpperCase(),z==="INTO")$.isReturning=!0}}if(G==="'")if(X=!0,["q","Q"].includes(J))this._parseQstring();else this._parseQuotedString(G);else if(!/\p{space}/u.test(G)){if(G==="-")this._parseSingleLineComment();else if(G==="/")this._parseMultiLineComment();else if(G==='"')this._parseQuotedString(G);else if(G===":"&&!X)this._parseBindName($);X=!1}this.pos+=1,H=K,J=G}if(!Y)$._determineStatementType($.sql.toUpperCase())}}class iV0{constructor(){this.sql="",this.sqlBytes=[],this.sqlLength=0,this.cursorId=0,this.requiresDefine=!1,this.isQuery=!1,this.isPlSql=!1,this.isDml=!1,this.isDdl=!1,this.isReturning=!1,this.bindInfoList=[],this.queryVars=[],this.bindInfoDict=new Map,this.requiresFullExecute=!1,this.noPrefetch=!1,this.returnToCache=!1,this.numColumns=0,this.lastRowIndex,this.lastRowid,this.moreRowsToFetch=!0,this.inUse=!1,this.bufferRowIndex=0,this.bufferRowCount=0,this.pendingClear=!1,this.statementType=cX.STMT_TYPE_UNKNOWN}_copy(){let $=new iV0;$.sql=this.sql,$.sqlBytes=this.sqlBytes,$.sqlLength=this.sqlLength,$.isQuery=this.isQuery,$.isPlSql=this.isPlSql,$.isDml=this.isDml,$.isDdl=this.isDdl,$.isReturning=this.isReturning,$.bindInfoList=[];for(let X of this.bindInfoList){let G=new Ls(X.bindName,X.isReturnBind);$.bindInfoList.push(G)}let Y=$.bindInfoDict=new Map;for(let X of $.bindInfoList)if(Y.has(X.bindName))Y.get(X.bindName).push(X);else Y.set(X.bindName,[X]);return $.returnToCache=!1,$}_determineStatementType($){switch($){case"DECLARE":this.isPlSql=!0,this.statementType=cX.STMT_TYPE_DECLARE;break;case"CALL":this.isPlSql=!0,this.statementType=cX.STMT_TYPE_CALL;break;case"BEGIN":this.isPlSql=!0,this.statementType=cX.STMT_TYPE_BEGIN;break;case"SELECT":this.isQuery=!0,this.statementType=cX.STMT_TYPE_SELECT;break;case"WITH":this.isQuery=!0;break;case"INSERT":this.isDml=!0,this.statementType=cX.STMT_TYPE_INSERT;break;case"UPDATE":this.isDml=!0,this.statementType=cX.STMT_TYPE_UPDATE;break;case"DELETE":this.isDml=!0,this.statementType=cX.STMT_TYPE_DELETE;break;case"MERGE":this.isDml=!0,this.statementType=cX.STMT_TYPE_MERGE;break;case"ALTER":this.isDdl=!0,this.statementType=cX.STMT_TYPE_ALTER;break;case"CREATE":this.isDdl=!0,this.statementType=cX.STMT_TYPE_CREATE;break;case"DROP":this.isDdl=!0,this.statementType=cX.STMT_TYPE_DROP;break;case"ANALYZE":case"AUDIT":case"COMMENT":case"GRANT":case"REVOKE":case"TRUNCATE":this.isDdl=!0;break;case"COMMIT":this.statementType=cX.STMT_TYPE_COMMIT;break;case"ROLLBACK":this.statementType=cX.STMT_TYPE_ROLLBACK;break;default:this.statementType=cX.STMT_TYPE_UNKNOWN;break}}_prepare($){this.sql=$,this.sqlBytes=Ti6.from(this.sql,"utf8"),this.sqlLength=this.sqlBytes.length,new sN1().parse(this)}_addBind($){if(!this.isPlSql||!this.bindInfoDict.has($)){let Y=new Ls($,this.isReturning);if(this.bindInfoList.push(Y),this.bindInfoDict.has(Y.bindName)){if(this.isReturning){if(!this.bindInfoDict.get(Y.bindName)[0].isReturnBind)aN1.throwErr(aN1.ERR_DML_RETURNING_DUP_BINDS,$)}this.bindInfoDict.get(Y.bindName).push(Y)}else this.bindInfoDict.set(Y.bindName,[Y])}}_setVariable($,Y){if(Y.type._oraTypeNum===Ci6.TNS_DATA_TYPE_CURSOR)this.requiresFullExecute=!0;if(Y.maxSize!==$.maxSize||Y.dir!==$.dir||Y.isArray!==$.isArray||Y.values.length>$.numElements||Y.type!=$.type||Y.maxArraySize!=$.maxArraySize)$.isArray=Y.isArray,$.numElements=Y.values.length,$.maxSize=Y.maxSize,$.type=Y.type,$.dir=Y.dir,$.maxArraySize=Y.maxArraySize,this.requiresFullExecute=!0;$.bindVar=Y}_clearAllState(){this.cursorId=0,this.requiresDefine=!1,this.noPrefetch=!1,this.requiresFullExecute=!1,this.queryVars=[],this.numQueryVars=0,this.bufferRowCount=0,this.bufferRowIndex=0}_clearState(){this.cursorId=0,this.requiresDefine=!1,this.noPrefetch=!1,this.requiresFullExecute=!1}}Si6.Statement=iV0});var eN1=o((_q5,tN1)=>{var{Buffer:f9}=L0("buffer"),i2=L0("crypto"),Bs="aes-256-cbc",xi6=f9.from([0,1]);class oN1{decrypt($,Y){let X=f9.alloc(16,0),G=i2.createDecipheriv(Bs,$,X);G.setAutoPadding(!1);let J=G.update(Y);return J=f9.concat([J,G.final()]),J}_encrypt($,Y,X){let J=f9.alloc(16,0),Q=16-Y.length%16,W=f9.alloc(Q,Q);if(Q>0)if(X)Y+=f9.alloc(Q);else Y=f9.concat([Y,W]);let Z=i2.createCipheriv(Bs,$,J),K=Z.update(Y);if(K=f9.concat([K,Z.final()]),!X)K=K.slice(0,Y.length);return Y.fill(0),K}_setEncryptedPasswordBuffers($,Y,X,G){let J=f9.alloc(16);i2.randomFillSync(J,0,16);let Q=f9.concat([J,$]);if(G.encodedPassword=this._encrypt(X,Q),Q.fill(0),G.encodedPassword=G.encodedPassword.slice().toString("hex").toUpperCase(),Y){let W=f9.concat([J,Y]);G.encodedNewPassword=this._encrypt(X,W),W.fill(0),G.encodedNewPassword=G.encodedNewPassword.slice().toString("hex").toUpperCase()}if($.fill(0),Y)Y.fill(0)}updateVerifierData($,Y,X,G,J){let Q=32,W="sha512",Z=f9.from($.AUTH_VFR_DATA,"hex"),K=f9.from($.AUTH_SESSKEY,"hex"),H=Number($.AUTH_PBKDF2_VGEN_COUNT),z=f9.from(Y,"utf8"),V,A;if(G){Bs="aes-192-cbc",Q=24,W="sha1";let O=i2.createHash(W);O.update(z),O.update(Z);let E=O.digest();V=f9.alloc(E.length+4),E.copy(V,0,0,E.length)}else{Bs="aes-256-cbc";let O=f9.from("AUTH_PBKDF2_SPEEDY_KEY","utf8"),E=f9.concat([Z,O]);A=i2.pbkdf2Sync(z,E,H,64,"sha512");let M=i2.createHash(W);M.update(A),M.update(Z),V=M.digest().slice(0,Q)}let F;if(X)F=f9.from(X,"utf8");let N=this.decrypt(V,K),D=f9.alloc(N.length);i2.randomFillSync(D);let L=this._encrypt(V,D);if(N.length===48){J.sessionKey=L.slice().toString("hex").toUpperCase().slice(0,96);let O=f9.alloc(24);for(let R=16;R<=40;R++)O[R-16]=N[R]^D[R];let E=i2.createHash("md5").update(O.subarray(0,16)).digest(),M=i2.createHash("md5").update(O.subarray(16)).digest();J.comboKey=f9.concat([E,M]).slice(0,Q)}else{J.sessionKey=L.slice().toString("hex").toUpperCase().slice(0,64);let O=f9.from($.AUTH_PBKDF2_CSK_SALT,"hex");H=Number($.AUTH_PBKDF2_SDER_COUNT);let M=f9.concat([D.slice(0,Q),N.slice(0,Q)]).toString("hex").toUpperCase(),R=f9.from(M,"utf8");J.comboKey=i2.pbkdf2Sync(R,O,H,Q,"sha512")}let B=f9.alloc(16);if(!G){i2.randomFillSync(B,0,16);let O=f9.concat([B,A]);J.speedyKey=this._encrypt(J.comboKey,O),J.speedyKey=J.speedyKey.slice(0,80).toString("hex").toUpperCase()}this._setEncryptedPasswordBuffers(z,F,J.comboKey,J)}getEncryptedJSWPData($,Y){let X=this._encrypt($,Y,!0);return X=X.slice().toString("hex").toUpperCase(),X=f9.concat([X,xi6]),X}updatePasswordsWithComboKey($,Y,X,G){let J=f9.from($,"utf8"),Q;if(Y)Q=f9.from(Y,"utf8");this._setEncryptedPasswordBuffers(J,Q,X,G)}}var yi6=new oN1;tN1.exports=yi6});var XL1=o((jq5,YL1)=>{var{Buffer:yx}=L0("buffer"),t8=E9(),Os=E4(),Es=L0("process"),Ms=eN1(),bi6=CG(),aV0=kx(),QU=aV0.CLIENT_INFO,hi6=L0("crypto");class $L1 extends bi6{constructor($,Y){super($);if(this.functionCode=t8.TNS_FUNC_AUTH_PHASE_ONE,this.messageType=t8.TNS_MSG_TYPE_FUNCTION,this.sessionData={},this.conn=$,this.sessionKey="",this.encodedPassword="",this.changePassword=!1,Object.defineProperty(this,"password",{enumerable:!1,value:Y.password}),this.username=Y.user,this.username===void 0)this.username="";else this.username=this.username.trim();if(this.schemaUser="",this.proxyUser="",this.proxyStatus=-1,this.username.length!==0){if(this.proxyStatusObj=aV0.checkProxyUserValidity(this.username),this.proxyStatusObj.status===0)this.proxyStatus=0,this.proxyUser=this.proxyStatusObj.proxyUser,this.schemaUser=this.proxyStatusObj.schemaUser,this.username=this.proxyUser}if(this.newPassword=Y.newPassword,Y.changePassword)this.changePassword=!0,this.functionCode=t8.TNS_FUNC_AUTH_PHASE_TWO;if(this.username)this.userByteLen=yx.byteLength(this.username);else this.userByteLen=0;if(this.token=Y.token,Y.externalAuth)this.functionCode=t8.TNS_FUNC_AUTH_PHASE_TWO,this.externalAuth=!0;if(this.privateKey=Y.privateKey,this.privateKey)this.privateKey=aV0.normalizePrivateKey(this.privateKey);if(this.serviceName=this.conn.serviceName,this.remoteAddress=this.conn.remoteAddress,this.driverName=Y.driverName,this.machine=Y.machine,this.osUser=Y.osUser,this.program=Y.program,this.terminal=Y.terminal,Y.edition)this.edition=Y.edition;else if(Es.env.ORA_EDITION)this.edition=Es.env.ORA_EDITION;this.appContext=Y.appContext,this.setAuthMode(Y)}setAuthMode($){if(!this.newPassword)this.authMode=t8.TNS_AUTH_MODE_LOGON;if($.privilege&t8.SYSDBA)this.authMode|=t8.TNS_AUTH_MODE_SYSDBA;if($.privilege&t8.SYSOPER)this.authMode|=t8.TNS_AUTH_MODE_SYSOPER;if($.privilege&t8.SYSASM)this.authMode|=t8.TNS_AUTH_MODE_SYSASM;if($.privilege&t8.SYSBKP)this.authMode|=t8.TNS_AUTH_MODE_SYSBKP;if($.privilege&t8.SYSDG)this.authMode|=t8.TNS_AUTH_MODE_SYSDGD;if($.privilege&t8.SYSKM)this.authMode|=t8.TNS_AUTH_MODE_SYSKMT;if($.privilege&t8.SYSRAC)this.authMode|=t8.TNS_AUTH_MODE_SYSRAC;if(this.privateKey)this.authMode|=t8.TNS_AUTH_MODE_IAM_TOKEN;if(this.newPassword)this.authMode|=t8.TNS_AUTH_MODE_CHANGE_PASSWORD;if(!$.externalAuth)this.authMode|=t8.TNS_AUTH_MODE_WITH_PASSWORD}getAlterTimezoneStatement(){let $,Y;if(Es.env.ORA_SDTZ)Y=Es.env.ORA_SDTZ;else{let G=new Date().getTimezoneOffset(),J=Math.trunc(G/60),Q=Math.abs((G-J*60)%60);if(J<0)$="+",J=-J;else $="-";J=J.toLocaleString("en-US",{minimumIntegerDigits:2}),Y=`${$}${J}:${Q}`}return`ALTER SESSION SET TIME_ZONE ='${Y}'\x00`}encode($){let Y=!1;if(this.writeFunctionHeader($),this.userByteLen>0)$.writeUInt8(1);else $.writeUInt8(0);if($.writeUB4(this.userByteLen),$.writeUB4(this.authMode),this.functionCode===t8.TNS_FUNC_AUTH_PHASE_ONE){if($.writeUInt8(1),$.writeUB4(5),$.writeUInt8(0),$.writeUInt8(1),this.userByteLen>0)$.writeBytesWithLength(yx.from(this.username));$.writeKeyValue("AUTH_TERMINAL",this.terminal??QU.terminal),$.writeKeyValue("AUTH_PROGRAM_NM",this.program??QU.program),$.writeKeyValue("AUTH_MACHINE",this.machine??QU.hostName),$.writeKeyValue("AUTH_PID",QU.pid),$.writeKeyValue("AUTH_SID",this.osUser??QU.userName)}else{let X=0;if(this.changePassword)Ms.updatePasswordsWithComboKey(this.password,this.newPassword,this.conn.comboKey,this),X=2;else{if(X=4,this.externalAuth){if(X+=5,this.token)X+=1}else{if(X+=2,this.verifierType===t8.TNS_VERIFIER_TYPE_11G_1||this.verifierType===t8.TNS_VERIFIER_TYPE_11G_2)Y=!0;else if(this.verifierType!==t8.TNS_VERIFIER_TYPE_12C)Os.throwErr(Os.ERR_UNSUPPORTED_VERIFIER_TYPE,this.verifierType.toString(16));else X+=1;if(Ms.updateVerifierData(this.sessionData,this.password,this.newPassword,Y,this),this.conn.comboKey=this.comboKey,this.newPassword)X+=1}if(this.privateKey)X+=2;if(this.conn.connectionClass)X+=1;if(this.conn.purity)X+=1;if(this.conn.jdwpData)this.encryptedJDWPData=Ms.getEncryptedJSWPData(this.sessionKey,this.conn.jdwpData),X+=1;if(this.edition)X+=1;if(this.appContext)X+=this.appContext.length*3;if(this.schemaUser.length!==0)X+=1}if($.writeUInt8(1),$.writeUB4(X),$.writeUInt8(1),$.writeUInt8(1),this.userByteLen>0)$.writeBytesWithLength(yx.from(this.username));if(this.externalAuth)$.writeKeyValue("AUTH_TERMINAL",this.terminal??QU.terminal),$.writeKeyValue("AUTH_PROGRAM_NM",this.program??QU.program),$.writeKeyValue("AUTH_MACHINE",this.machine??QU.hostName),$.writeKeyValue("AUTH_PID",QU.pid),$.writeKeyValue("AUTH_SID",this.osUser??QU.userName);if(this.token)$.writeKeyValue("AUTH_TOKEN",this.token);else if(!this.changePassword&&!this.externalAuth){if($.writeKeyValue("AUTH_SESSKEY",this.sessionKey,1),!Y)$.writeKeyValue("AUTH_PBKDF2_SPEEDY_KEY",this.speedyKey)}if(!this.changePassword)$.writeKeyValue("SESSION_CLIENT_CHARSET","873"),$.writeKeyValue("SESSION_CLIENT_DRIVER_NAME",this.driverName??t8.DRIVER_NAME),$.writeKeyValue("SESSION_CLIENT_VERSION",t8.CLIENT_VERSION.toString()),$.writeKeyValue("AUTH_ALTER_SESSION",this.getAlterTimezoneStatement(),1);if(this.encodedPassword)$.writeKeyValue("AUTH_PASSWORD",this.encodedPassword);if(this.proxyStatus===0)$.writeKeyValue("PROXY_CLIENT_NAME",this.schemaUser);if(this.encodedNewPassword)$.writeKeyValue("AUTH_NEWPASSWORD",this.encodedNewPassword);if(this.conn.connectionClass)$.writeKeyValue("AUTH_KPPL_CONN_CLASS",this.conn.connectionClass);if(this.conn.purity)$.writeKeyValue("AUTH_KPPL_PURITY",""+this.conn.purity);if(this.privateKey){let Q="date: "+new Date().toGMTString()+`
(request-target): `+this.serviceName+`
host: `+this.remoteAddress,W=hi6.createSign("RSA-SHA256").update(Q).sign(this.privateKey,"base64");$.writeKeyValue("AUTH_HEADER",Q),$.writeKeyValue("AUTH_SIGNATURE",W)}if(this.conn.jdwpData)$.writeKeyValue("AUTH_ORA_DEBUG_JDWP",this.encryptedJDWPData);if(this.edition)$.writeKeyValue("AUTH_ORA_EDITION",this.edition);if(this.appContext)for(let G of this.appContext)$.writeKeyValue("AUTH_APPCTX_NSPACE\x00",G[0]),$.writeKeyValue("AUTH_APPCTX_ATTR\x00",G[1]),$.writeKeyValue("AUTH_APPCTX_VALUE\x00",G[2])}}processReturnParameter($){let Y=$.readUB2();for(let X=0;X<Y;X++){$.skipUB4();let G=$.readStr(t8.CSFRM_IMPLICIT),J="";if($.readUB4()>0)J=$.readStr(t8.CSFRM_IMPLICIT);let W=$.readUB4();if(G==="AUTH_VFR_DATA")this.verifierType=W;this.sessionData[G]=J}if(this.functionCode===t8.TNS_FUNC_AUTH_PHASE_ONE)this.functionCode=t8.TNS_FUNC_AUTH_PHASE_TWO;else if(!this.changePassword&&this.comboKey){let X=this.sessionData.AUTH_SVR_RESPONSE,G;if(X){let J=yx.from(X,"hex");G=Ms.decrypt(this.comboKey,J)}if(!G||!G.subarray(16,32).equals(yx.from("SERVER_TO_CLIENT")))Os.throwErr(Os.ERR_INVALID_SERVER_RESPONSE)}}}YL1.exports=$L1});var QL1=o((Tq5,JL1)=>{var fi6=CG(),gi6=E9();class GL1 extends fi6{constructor($){super($);this.functionCode=gi6.TNS_FUNC_COMMIT}encode($){this.writeFunctionHeader($)}}JL1.exports=GL1});var KL1=o((Cq5,ZL1)=>{var c=E9(),mi6=CG();class WL1 extends mi6{processMessage($,Y){if(Y===c.TNS_MSG_TYPE_DATA_TYPES){while(!0){if($.readUInt16BE()===0)break;if($.readUInt16BE()!==0)$.skipBytes(4)}this.endOfResponse=!this.connection.nscon.endOfRequestSupport}else super.processMessage($,Y)}encode($){$.writeUInt8(c.TNS_MSG_TYPE_DATA_TYPES),$.writeUInt16LE(c.TNS_CHARSET_UTF8),$.writeUInt16LE(c.TNS_CHARSET_UTF8),$.writeUInt8(c.TNS_ENCODING_MULTI_BYTE|c.TNS_ENCODING_CONV_LENGTH),$.writeBytesWithLength($.caps.compileCaps),$.writeBytesWithLength($.caps.runtimeCaps);for(let Y of ui6)$.writeUInt16BE(Y[0]),$.writeUInt16BE(Y[1]),$.writeUInt16BE(Y[2]),$.writeUInt16BE(0);$.writeUInt16BE(0)}}var ui6=[[c.TNS_DATA_TYPE_VARCHAR,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_NUMBER,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_LONG,c.TNS_DATA_TYPE_LONG,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DATE,c.TNS_DATA_TYPE_DATE,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_RAW,c.TNS_DATA_TYPE_RAW,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LONG_RAW,c.TNS_DATA_TYPE_LONG_RAW,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UB2,c.TNS_DATA_TYPE_UB2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UB4,c.TNS_DATA_TYPE_UB4,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SB1,c.TNS_DATA_TYPE_SB1,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_SB2,c.TNS_DATA_TYPE_SB2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SB4,c.TNS_DATA_TYPE_SB4,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SWORD,c.TNS_DATA_TYPE_SWORD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UWORD,c.TNS_DATA_TYPE_UWORD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PTRB,c.TNS_DATA_TYPE_PTRB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PTRW,c.TNS_DATA_TYPE_PTRW,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TIDDEF,c.TNS_DATA_TYPE_TIDDEF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ROWID,c.TNS_DATA_TYPE_ROWID,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AMS,c.TNS_DATA_TYPE_AMS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BRN,c.TNS_DATA_TYPE_BRN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CWD,c.TNS_DATA_TYPE_CWD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OAC122,c.TNS_DATA_TYPE_OAC122,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OER8,c.TNS_DATA_TYPE_OER8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FUN,c.TNS_DATA_TYPE_FUN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AUA,c.TNS_DATA_TYPE_AUA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RXH7,c.TNS_DATA_TYPE_RXH7,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_NA6,c.TNS_DATA_TYPE_NA6,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BRP,c.TNS_DATA_TYPE_BRP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BRV,c.TNS_DATA_TYPE_BRV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KVA,c.TNS_DATA_TYPE_KVA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CLS,c.TNS_DATA_TYPE_CLS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CUI,c.TNS_DATA_TYPE_CUI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DFN,c.TNS_DATA_TYPE_DFN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DQR,c.TNS_DATA_TYPE_DQR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSC,c.TNS_DATA_TYPE_DSC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EXE,c.TNS_DATA_TYPE_EXE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FCH,c.TNS_DATA_TYPE_FCH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GBV,c.TNS_DATA_TYPE_GBV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GEM,c.TNS_DATA_TYPE_GEM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GIV,c.TNS_DATA_TYPE_GIV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OKG,c.TNS_DATA_TYPE_OKG,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_HMI,c.TNS_DATA_TYPE_HMI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INO,c.TNS_DATA_TYPE_INO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LNF,c.TNS_DATA_TYPE_LNF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ONT,c.TNS_DATA_TYPE_ONT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OPE,c.TNS_DATA_TYPE_OPE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OSQ,c.TNS_DATA_TYPE_OSQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SFE,c.TNS_DATA_TYPE_SFE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SPF,c.TNS_DATA_TYPE_SPF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_VSN,c.TNS_DATA_TYPE_VSN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UD7,c.TNS_DATA_TYPE_UD7,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSA,c.TNS_DATA_TYPE_DSA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PIN,c.TNS_DATA_TYPE_PIN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PFN,c.TNS_DATA_TYPE_PFN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PPT,c.TNS_DATA_TYPE_PPT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_STO,c.TNS_DATA_TYPE_STO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ARC,c.TNS_DATA_TYPE_ARC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MRS,c.TNS_DATA_TYPE_MRS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MRT,c.TNS_DATA_TYPE_MRT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MRG,c.TNS_DATA_TYPE_MRG,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MRR,c.TNS_DATA_TYPE_MRR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MRC,c.TNS_DATA_TYPE_MRC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_VER,c.TNS_DATA_TYPE_VER,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LON2,c.TNS_DATA_TYPE_LON2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INO2,c.TNS_DATA_TYPE_INO2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ALL,c.TNS_DATA_TYPE_ALL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UDB,c.TNS_DATA_TYPE_UDB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQI,c.TNS_DATA_TYPE_AQI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ULB,c.TNS_DATA_TYPE_ULB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ULD,c.TNS_DATA_TYPE_ULD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SID,c.TNS_DATA_TYPE_SID,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_NA7,c.TNS_DATA_TYPE_NA7,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AL7,c.TNS_DATA_TYPE_AL7,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_K2RPC,c.TNS_DATA_TYPE_K2RPC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XDP,c.TNS_DATA_TYPE_XDP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OKO8,c.TNS_DATA_TYPE_OKO8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UD12,c.TNS_DATA_TYPE_UD12,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AL8,c.TNS_DATA_TYPE_AL8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LFOP,c.TNS_DATA_TYPE_LFOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FCRT,c.TNS_DATA_TYPE_FCRT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DNY,c.TNS_DATA_TYPE_DNY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OPR,c.TNS_DATA_TYPE_OPR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PLS,c.TNS_DATA_TYPE_PLS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XID,c.TNS_DATA_TYPE_XID,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TXN,c.TNS_DATA_TYPE_TXN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DCB,c.TNS_DATA_TYPE_DCB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CCA,c.TNS_DATA_TYPE_CCA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_WRN,c.TNS_DATA_TYPE_WRN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TLH,c.TNS_DATA_TYPE_TLH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TOH,c.TNS_DATA_TYPE_TOH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FOI,c.TNS_DATA_TYPE_FOI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SID2,c.TNS_DATA_TYPE_SID2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TCH,c.TNS_DATA_TYPE_TCH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PII,c.TNS_DATA_TYPE_PII,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PFI,c.TNS_DATA_TYPE_PFI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PPU,c.TNS_DATA_TYPE_PPU,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PTE,c.TNS_DATA_TYPE_PTE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RXH8,c.TNS_DATA_TYPE_RXH8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_N12,c.TNS_DATA_TYPE_N12,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AUTH,c.TNS_DATA_TYPE_AUTH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KVAL,c.TNS_DATA_TYPE_KVAL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FGI,c.TNS_DATA_TYPE_FGI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSY,c.TNS_DATA_TYPE_DSY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYR8,c.TNS_DATA_TYPE_DSYR8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYH8,c.TNS_DATA_TYPE_DSYH8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYL,c.TNS_DATA_TYPE_DSYL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYT8,c.TNS_DATA_TYPE_DSYT8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYV8,c.TNS_DATA_TYPE_DSYV8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYP,c.TNS_DATA_TYPE_DSYP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYF,c.TNS_DATA_TYPE_DSYF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYK,c.TNS_DATA_TYPE_DSYK,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYY,c.TNS_DATA_TYPE_DSYY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYQ,c.TNS_DATA_TYPE_DSYQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYC,c.TNS_DATA_TYPE_DSYC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYA,c.TNS_DATA_TYPE_DSYA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OT8,c.TNS_DATA_TYPE_OT8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYTY,c.TNS_DATA_TYPE_DSYTY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQE,c.TNS_DATA_TYPE_AQE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KV,c.TNS_DATA_TYPE_KV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQD,c.TNS_DATA_TYPE_AQD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQ8,c.TNS_DATA_TYPE_AQ8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RFS,c.TNS_DATA_TYPE_RFS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RXH10,c.TNS_DATA_TYPE_RXH10,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPN,c.TNS_DATA_TYPE_KPN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNR,c.TNS_DATA_TYPE_KPDNR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYD,c.TNS_DATA_TYPE_DSYD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYS,c.TNS_DATA_TYPE_DSYS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYR,c.TNS_DATA_TYPE_DSYR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYH,c.TNS_DATA_TYPE_DSYH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYT,c.TNS_DATA_TYPE_DSYT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYV,c.TNS_DATA_TYPE_DSYV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQM,c.TNS_DATA_TYPE_AQM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OER11,c.TNS_DATA_TYPE_OER11,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQL,c.TNS_DATA_TYPE_AQL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OTC,c.TNS_DATA_TYPE_OTC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KFNO,c.TNS_DATA_TYPE_KFNO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KFNP,c.TNS_DATA_TYPE_KFNP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KGT8,c.TNS_DATA_TYPE_KGT8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RASB4,c.TNS_DATA_TYPE_RASB4,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RAUB2,c.TNS_DATA_TYPE_RAUB2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RAUB1,c.TNS_DATA_TYPE_RAUB1,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RATXT,c.TNS_DATA_TYPE_RATXT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RSSB4,c.TNS_DATA_TYPE_RSSB4,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RSUB2,c.TNS_DATA_TYPE_RSUB2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RSUB1,c.TNS_DATA_TYPE_RSUB1,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RSTXT,c.TNS_DATA_TYPE_RSTXT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RIDL,c.TNS_DATA_TYPE_RIDL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GLRDD,c.TNS_DATA_TYPE_GLRDD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GLRDG,c.TNS_DATA_TYPE_GLRDG,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GLRDC,c.TNS_DATA_TYPE_GLRDC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OKO,c.TNS_DATA_TYPE_OKO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DPP,c.TNS_DATA_TYPE_DPP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DPLS,c.TNS_DATA_TYPE_DPLS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DPMOP,c.TNS_DATA_TYPE_DPMOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_STAT,c.TNS_DATA_TYPE_STAT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RFX,c.TNS_DATA_TYPE_RFX,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FAL,c.TNS_DATA_TYPE_FAL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CKV,c.TNS_DATA_TYPE_CKV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DRCX,c.TNS_DATA_TYPE_DRCX,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KGH,c.TNS_DATA_TYPE_KGH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQO,c.TNS_DATA_TYPE_AQO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OKGT,c.TNS_DATA_TYPE_OKGT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPFC,c.TNS_DATA_TYPE_KPFC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FE2,c.TNS_DATA_TYPE_FE2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SPFP,c.TNS_DATA_TYPE_SPFP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DPULS,c.TNS_DATA_TYPE_DPULS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQA,c.TNS_DATA_TYPE_AQA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPBF,c.TNS_DATA_TYPE_KPBF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TSM,c.TNS_DATA_TYPE_TSM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MSS,c.TNS_DATA_TYPE_MSS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPC,c.TNS_DATA_TYPE_KPC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CRS,c.TNS_DATA_TYPE_CRS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KKS,c.TNS_DATA_TYPE_KKS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSP,c.TNS_DATA_TYPE_KSP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSPTOP,c.TNS_DATA_TYPE_KSPTOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSPVAL,c.TNS_DATA_TYPE_KSPVAL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PSS,c.TNS_DATA_TYPE_PSS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_NLS,c.TNS_DATA_TYPE_NLS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ALS,c.TNS_DATA_TYPE_ALS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSDEVTVAL,c.TNS_DATA_TYPE_KSDEVTVAL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSDEVTTOP,c.TNS_DATA_TYPE_KSDEVTTOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPSPP,c.TNS_DATA_TYPE_KPSPP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KOL,c.TNS_DATA_TYPE_KOL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LST,c.TNS_DATA_TYPE_LST,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ACX,c.TNS_DATA_TYPE_ACX,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SCS,c.TNS_DATA_TYPE_SCS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RXH,c.TNS_DATA_TYPE_RXH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNS,c.TNS_DATA_TYPE_KPDNS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDCN,c.TNS_DATA_TYPE_KPDCN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPNNS,c.TNS_DATA_TYPE_KPNNS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPNCN,c.TNS_DATA_TYPE_KPNCN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPS,c.TNS_DATA_TYPE_KPS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_APINF,c.TNS_DATA_TYPE_APINF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TEN,c.TNS_DATA_TYPE_TEN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSCS,c.TNS_DATA_TYPE_XSSCS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSSO,c.TNS_DATA_TYPE_XSSSO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSAO,c.TNS_DATA_TYPE_XSSAO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSRPC,c.TNS_DATA_TYPE_KSRPC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KVL,c.TNS_DATA_TYPE_KVL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSDEF,c.TNS_DATA_TYPE_XSSDEF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PDQCINV,c.TNS_DATA_TYPE_PDQCINV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PDQIDC,c.TNS_DATA_TYPE_PDQIDC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDQCSTA,c.TNS_DATA_TYPE_KPDQCSTA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPRS,c.TNS_DATA_TYPE_KPRS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDQIDC,c.TNS_DATA_TYPE_KPDQIDC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RTSTRM,c.TNS_DATA_TYPE_RTSTRM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SESSGET,c.TNS_DATA_TYPE_SESSGET,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SESSREL,c.TNS_DATA_TYPE_SESSREL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SESSRET,c.TNS_DATA_TYPE_SESSRET,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SCN6,c.TNS_DATA_TYPE_SCN6,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KECPA,c.TNS_DATA_TYPE_KECPA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KECPP,c.TNS_DATA_TYPE_KECPP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SXA,c.TNS_DATA_TYPE_SXA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KVARR,c.TNS_DATA_TYPE_KVARR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPNGN,c.TNS_DATA_TYPE_KPNGN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BINARY_INTEGER,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_FLOAT,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_STR,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_VNU,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_PDN,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_VCS,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_VBI,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OAC9,c.TNS_DATA_TYPE_OAC9,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UIN,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_SLS,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_LVC,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LVB,c.TNS_DATA_TYPE_RAW,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CHAR,c.TNS_DATA_TYPE_CHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AVC,c.TNS_DATA_TYPE_CHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BINARY_FLOAT,c.TNS_DATA_TYPE_BINARY_FLOAT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BINARY_DOUBLE,c.TNS_DATA_TYPE_BINARY_DOUBLE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CURSOR,c.TNS_DATA_TYPE_CURSOR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RDD,c.TNS_DATA_TYPE_ROWID,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OSL,c.TNS_DATA_TYPE_OSL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EXT_NAMED,c.TNS_DATA_TYPE_INT_NAMED,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INT_NAMED,c.TNS_DATA_TYPE_INT_NAMED,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EXT_REF,c.TNS_DATA_TYPE_INT_REF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INT_REF,c.TNS_DATA_TYPE_INT_REF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CLOB,c.TNS_DATA_TYPE_CLOB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BLOB,c.TNS_DATA_TYPE_BLOB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BFILE,c.TNS_DATA_TYPE_BFILE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CFILE,c.TNS_DATA_TYPE_CFILE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RSET,c.TNS_DATA_TYPE_CURSOR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_JSON,c.TNS_DATA_TYPE_JSON,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DJSON,c.TNS_DATA_TYPE_DJSON,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CLV,c.TNS_DATA_TYPE_CLV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DTR,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_DUN,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_DOP,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_VST,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ODT,c.TNS_DATA_TYPE_DATE,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_DOL,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_TIME,c.TNS_DATA_TYPE_TIME,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TIME_TZ,c.TNS_DATA_TYPE_TIME_TZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TIMESTAMP,c.TNS_DATA_TYPE_TIMESTAMP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TIMESTAMP_TZ,c.TNS_DATA_TYPE_TIMESTAMP_TZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INTERVAL_YM,c.TNS_DATA_TYPE_INTERVAL_YM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INTERVAL_DS,c.TNS_DATA_TYPE_INTERVAL_DS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EDATE,c.TNS_DATA_TYPE_DATE,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_ETIME,c.TNS_DATA_TYPE_ETIME,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ETTZ,c.TNS_DATA_TYPE_ETTZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ESTAMP,c.TNS_DATA_TYPE_ESTAMP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ESTZ,c.TNS_DATA_TYPE_ESTZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EIYM,c.TNS_DATA_TYPE_EIYM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EIDS,c.TNS_DATA_TYPE_EIDS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DCLOB,c.TNS_DATA_TYPE_CLOB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DBLOB,c.TNS_DATA_TYPE_BLOB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DBFILE,c.TNS_DATA_TYPE_BFILE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UROWID,c.TNS_DATA_TYPE_UROWID,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TIMESTAMP_LTZ,c.TNS_DATA_TYPE_TIMESTAMP_LTZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ESITZ,c.TNS_DATA_TYPE_TIMESTAMP_LTZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UB8,c.TNS_DATA_TYPE_UB8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PNTY,c.TNS_DATA_TYPE_INT_NAMED,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BOOLEAN,c.TNS_DATA_TYPE_BOOLEAN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSNSOP,c.TNS_DATA_TYPE_XSNSOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSATTR,c.TNS_DATA_TYPE_XSATTR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSNS,c.TNS_DATA_TYPE_XSNS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UB1ARRAY,c.TNS_DATA_TYPE_UB1ARRAY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SESSSTATE,c.TNS_DATA_TYPE_SESSSTATE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AC_REPLAY,c.TNS_DATA_TYPE_AC_REPLAY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AC_CONT,c.TNS_DATA_TYPE_AC_CONT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_IMPLRES,c.TNS_DATA_TYPE_IMPLRES,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OER19,c.TNS_DATA_TYPE_OER19,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TXT,c.TNS_DATA_TYPE_TXT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSESSNS,c.TNS_DATA_TYPE_XSSESSNS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSATTOP,c.TNS_DATA_TYPE_XSATTOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSCREOP,c.TNS_DATA_TYPE_XSCREOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSDETOP,c.TNS_DATA_TYPE_XSDETOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSDESOP,c.TNS_DATA_TYPE_XSDESOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSETSP,c.TNS_DATA_TYPE_XSSETSP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSIDP,c.TNS_DATA_TYPE_XSSIDP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSPRIN,c.TNS_DATA_TYPE_XSPRIN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSKVL,c.TNS_DATA_TYPE_XSKVL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSSDEF2,c.TNS_DATA_TYPE_XSSSDEF2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSNSOP2,c.TNS_DATA_TYPE_XSNSOP2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSNS2,c.TNS_DATA_TYPE_XSNS2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNREQ,c.TNS_DATA_TYPE_KPDNREQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNRNF,c.TNS_DATA_TYPE_KPDNRNF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPNGNC,c.TNS_DATA_TYPE_KPNGNC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPNRI,c.TNS_DATA_TYPE_KPNRI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQENQ,c.TNS_DATA_TYPE_AQENQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQDEQ,c.TNS_DATA_TYPE_AQDEQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQJMS,c.TNS_DATA_TYPE_AQJMS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNRPAY,c.TNS_DATA_TYPE_KPDNRPAY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNRACK,c.TNS_DATA_TYPE_KPDNRACK,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNRMP,c.TNS_DATA_TYPE_KPDNRMP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNRDQ,c.TNS_DATA_TYPE_KPDNRDQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SCN,c.TNS_DATA_TYPE_SCN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SCN8,c.TNS_DATA_TYPE_SCN8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CHUNKINFO,c.TNS_DATA_TYPE_CHUNKINFO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UD21,c.TNS_DATA_TYPE_UD21,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UDS,c.TNS_DATA_TYPE_UDS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TNP,c.TNS_DATA_TYPE_TNP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OER,c.TNS_DATA_TYPE_OER,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OAC,c.TNS_DATA_TYPE_OAC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SESSSIGN,c.TNS_DATA_TYPE_SESSSIGN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_VECTOR,c.TNS_DATA_TYPE_VECTOR,c.TNS_TYPE_REP_UNIVERSAL]];ZL1.exports=WL1});var zL1=o((Sq5,HL1)=>{var pi6=CG(),di6=E9();class UL1 extends pi6{constructor($){super($);this.functionCode=di6.TNS_FUNC_LOGOFF}encode($){this.writeFunctionHeader($)}}HL1.exports=UL1});var FL1=o((kq5,AL1)=>{var ci6=CG(),li6=E9();class VL1 extends ci6{constructor($){super($);this.functionCode=li6.TNS_FUNC_PING}encode($){this.writeFunctionHeader($)}}AL1.exports=VL1});var LL1=o((vq5,NL1)=>{var sV0=E9(),ii6=CG();class DL1 extends ii6{encode($){$.writeUInt8(sV0.TNS_MSG_TYPE_PROTOCOL),$.writeUInt8(6),$.writeUInt8(0),$.writeStr("node-oracledb"),$.writeUInt8(0)}processMessage($,Y){if(Y===sV0.TNS_MSG_TYPE_PROTOCOL)this.processProtocolInfo($),this.endOfResponse=!this.connection.nscon.endOfRequestSupport;else super.processMessage($,Y)}processProtocolInfo($){this.serverVersion=$.readUInt8(),$.skipUB1(),this.serverBanner=$.readNullTerminatedBytes(48),$.caps.charSetID=$.readUInt16LE(),this.serverFlags=$.readUInt8();let Y=$.readUInt16LE();if(Y>0)$.skipBytes(Y*5);let X=$.readUInt16BE(),G=$.readBytes(X),J=6+G[5]+G[6];$.caps.nCharsetId=(G[J+3]<<8)+G[J+4];let Q=$.readBytesWithLength();if(Q)if(this.serverCompileCaps=Buffer.from(Q),$.caps.adjustForServerCompileCaps(this.serverCompileCaps,this.connection.nscon),$.caps.ttcFieldVersion>=sV0.TNS_CCAP_FIELD_VERSION_23_1)this.connection._osonMaxFieldNameSize=65535;else this.connection._osonMaxFieldNameSize=255;let W=$.readBytesWithLength();if(W)this.serverRunTimeCaps=Buffer.from(W),$.caps.adjustForServerRuntimeCaps(this.serverRunTimeCaps)}}NL1.exports=DL1});var EL1=o((xq5,OL1)=>{var ni6=CG(),ri6=E9();class BL1 extends ni6{constructor($){super($);this.functionCode=ri6.TNS_FUNC_ROLLBACK}encode($){this.writeFunctionHeader($)}}OL1.exports=BL1});var IL1=o((yq5,qL1)=>{var ai6=CG(),ML1=E9();class RL1 extends ai6{constructor($){super($);this.functionCode=ML1.TNS_FUNC_SESSION_RELEASE,this.messageType=ML1.TNS_MSG_TYPE_ONEWAY_FN,this.sessReleaseMode=0}encode($){this.writeFunctionHeader($),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(this.sessReleaseMode)}decode(){}}qL1.exports=RL1});var _L1=o((bq5,wL1)=>{var JB=E9(),si6=CG();class PL1 extends si6{encode($){$.writeUInt8(JB.TNS_MSG_TYPE_FAST_AUTH),$.writeUInt8(1),$.writeUInt8(JB.TNS_SERVER_CONVERTS_CHARS),$.writeUInt8(0),this.protocolMessage.encode($),$.writeUInt16BE(0),$.writeUInt8(0),$.writeUInt16BE(0),$.caps.ttcFieldVersion=JB.TNS_CCAP_FIELD_VERSION_19_1_EXT_1,$.writeUInt8($.caps.ttcFieldVersion),this.dataTypeMessage.encode($),this.authMessage.encode($),$.caps.ttcFieldVersion=JB.TNS_CCAP_FIELD_VERSION_MAX}processMessage($,Y){if(Y===JB.TNS_MSG_TYPE_RENEGOTIATE)this.reNegotiate=!0;else if(Y===JB.TNS_MSG_TYPE_PROTOCOL)this.protocolMessage.processMessage($,Y);else if(Y===JB.TNS_MSG_TYPE_DATA_TYPES)this.dataTypeMessage.processMessage($,Y);else if(this.authMessage.processMessage($,Y),this.endOfResponse=this.authMessage.endOfResponse,this.authMessage.errorOccurred)this.errorOccurred=this.authMessage.errorOccurred,this.errorInfo=this.authMessage.errorInfo}}wL1.exports=PL1});var CL1=o((hq5,TL1)=>{var oi6=CG(),ti6=E9();class jL1 extends oi6{constructor($){super($);this.functionCode=ti6.TNS_FUNC_TPC_TXN_CHANGE_STATE}processReturnParameter($){this.state=$.readUB4()}encode($){let Y;if(this.xid)Y=Buffer.alloc(128),this.xid.globalTransactionId.copy(Y),this.xid.branchQualifier.copy(Y,this.xid.globalTransactionId.length);if(this.writeFunctionHeader($),$.writeUB4(this.operation),this.context)$.writeUInt8(1),$.writeUB4(this.context.length);else $.writeUInt8(0),$.writeUB4(0);if(this.xid)$.writeUB4(this.xid.formatId),$.writeUB4(this.xid.globalTransactionId.length),$.writeUB4(this.xid.branchQualifier.length),$.writeUInt8(1),$.writeUB4(Y.length);else $.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0);if($.writeUB4(0),$.writeUB4(this.state),$.writeUInt8(1),$.writeUB4(this.flags),this.context)$.writeBytes(this.context);if(this.xid)$.writeBytes(Y)}}TL1.exports=jL1});var kL1=o((fq5,SL1)=>{var ei6=XL1(),$n6=QL1(),Yn6=KL1(),Xn6=EV0(),Gn6=MV0(),Jn6=LV0(),Qn6=zL1(),Wn6=FL1(),Zn6=LL1(),Kn6=EL1(),Un6=IL1(),Hn6=_L1(),zn6=CL1(),Vn6=OV0();SL1.exports={AuthMessage:ei6,CommitMessage:$n6,FastAuthMessage:Hn6,DataTypeMessage:Yn6,ExecuteMessage:Xn6,FetchMessage:Gn6,LobOpMessage:Jn6,LogOffMessage:Qn6,PingMessage:Wn6,ProtocolMessage:Zn6,RollbackMessage:Kn6,SessionReleaseMessage:Un6,TransactionChangeStateMessage:zn6,TransactionSwitchMessage:Vn6}});var bL1=o((gq5,yL1)=>{var vL1=E4(),{Statement:An6}=rV0();class xL1{constructor($){this._cachedStatements=new Map,this._maxSize=$,this._cursorsToClose=new Set,this._openCursors=new Set}_addCursorToClose($){if(this._cursorsToClose.has($.cursorId)){let Y=`attempt to close cursor ${$.cursorId} twice`;vL1.throwErr(vL1.ERR_INTERNAL,Y)}if($.cursorId!=0)this._cursorsToClose.add($.cursorId);this._openCursors.delete($)}_adjustCache(){while(this._cachedStatements.size>this._maxSize){let $=this._cachedStatements.keys().next().value,Y=this._cachedStatements.get($);if(this._cachedStatements.delete($),Y.inUse)Y.returnToCache=!1;else if(Y.cursorId!==0)this._addCursorToClose(Y)}}clearCursors(){let $=new Set;for(let Y of this._openCursors){if(Y.inUse||Y.returnToCache)Y.pendingClear=!0,$.add(Y);Y._clearState()}this._openCursors=$,this._cursorsToClose.clear()}clearPendingStatus(){for(let $ of this._openCursors)if($.pendingClear&&!$.inUse)$._clearAllState(),$.pendingClear=!1}getStatement($,Y=!1,X=!1){let G=null;if($)G=this._cachedStatements.get($);if(!G){if(G=new An6,$)G._prepare($);if(Y&&!G.isDdl&&this._maxSize>0)G.returnToCache=!0,this._cachedStatements.set($,G),this._adjustCache();this._openCursors.add(G)}else if(X||G.inUse){if(!Y)this._addCursorToClose(G),this._cachedStatements.delete($);G=G._copy(),this._openCursors.add(G)}else if(!Y)this._cachedStatements.delete($),G.returnToCache=!1;else this._cachedStatements.delete($),this._cachedStatements.set($,G);return this._openCursors.add(G),G.inUse=!0,G}clearCursor($){this._addCursorToClose($),$.cursorId=0}returnStatement($){if($.bindInfoList)$.bindInfoList.forEach((Y)=>{Y.bindVar=null});if($.queryVars)$.queryVars.forEach((Y)=>{Y.values.fill(null)});if($.returnToCache)$.inUse=!1;else this._addCursorToClose($);this.clearPendingStatus()}writeCursorsToClose($){$.writeUB4(this._cursorsToClose.size);for(let Y of this._cursorsToClose.keys())$.writeUB4(Y);this._cursorsToClose.clear()}}yL1.exports=xL1});var Rs=o((mq5,fL1)=>{var SG=E9(),oV0=E4(),Fn6=CG(),{ThinDbObjectImpl:Dn6}=Gs(),Nn6=qx();class hL1 extends Fn6{constructor($){super($);this.queueImpl=null,this.deqOptionsImpl=null,this.enqOptionsImpl=null,this.noMsgFound=!1}_processDate($){if($.readUB4()>0)return $.readOracleDate(!0)}processErrorInfo($){if(super.processErrorInfo($),this.errorInfo.num===SG.TNS_ERR_NO_MESSAGES_FOUND)this.errorInfo.num=0,this.errorOccurred=!1,this.noMsgFound=!0}_processExtensions($,Y){let X=$.readUB4();if(X>0){$.skipUB1();for(let G=0;G<X;G++){let J=$.readBytesAndLength(),Q=$.readBytesAndLength(),W=J||Q,Z=$.readUB2();if(W){if(Z===SG.TNS_AQ_EXT_KEYWORD_AGENT_NAME)Y.senderAgentName=W;else if(Z===SG.TNS_AQ_EXT_KEYWORD_AGENT_ADDRESS)Y.senderAgentAddress=W;else if(Z===SG.TNS_AQ_EXT_KEYWORD_AGENT_PROTOCOL)Y.senderAgentProtocol=W[0];else if(Z===SG.TNS_AQ_EXT_KEYWORD_ORIGINAL_MSGID)Y.originalMsgId=W}}}}_processMsgId($){return Buffer.from($.readBytes(SG.TNS_AQ_MESSAGE_ID_LENGTH))}_processMsgProps($,Y){if(Y.priority=$.readSB4(),Y.delay=$.readSB4(),Y.expiration=$.readSB4(),Y.correlation=$.readStrAndLength(),Y.numAttempts=$.readSB4(),Y.exceptionQueue=$.readStrAndLength(),Y.state=$.readSB4(),Y.enqTime=this._processDate($),Y.enqTxnId=$.readBytesAndLength(),this._processExtensions($,Y),$.readUB4()>0)oV0.throwErr(oV0.ERR_NOT_IMPLEMENTED);if($.skipUB4(),$.skipUB4(),$.readUB4()===SG.TNS_KPD_AQ_BUFMSG)Y.deliveryMode=SG.TNS_AQ_MSG_BUFFERED;else Y.deliveryMode=SG.TNS_AQ_MSG_PERSISTENT;if($.caps.ttcFieldVersion>=SG.TNS_CCAP_FIELD_VERSION_21_1)$.skipUB4()}_processPayload($){let Y=$.readDbObject();if(this.queueImpl.payloadTypeClass){let X=new this.queueImpl.payloadTypeClass,G=new Dn6(this.queueImpl.payloadTypeClass,Y.packedData);if(Y)G.toid=Y.toid,G.oid=Y.oid;return X._impl=G,X}else if(Y.packedData){let X=Buffer.from(Y.packedData.slice(4));if(this.queueImpl.isJson)return new Nn6.OsonDecoder(X).decode();return X}else if(!this.queueImpl.isJson)return Buffer.alloc(0)}_processRecipients($){if($.readUB4()>0)oV0.throwNotImplemented("aq recipients");return[]}_writeMsgProps($,Y){if($.writeSB4(Y.priority),$.writeSB4(Y.delay),$.writeSB4(Y.expiration),this._writeValueWithLength($,Y.correlation),$.writeUB4(0),this._writeValueWithLength($,Y.exceptionQueue),$.writeUB4(Y.state),$.writeUB4(0),this._writeValueWithLength($,Y.enqTxnId),$.writeUB4(4),$.writeUInt8(14),this._writeKeywordValuePair($,null,null,SG.TNS_AQ_EXT_KEYWORD_AGENT_NAME),this._writeKeywordValuePair($,null,null,SG.TNS_AQ_EXT_KEYWORD_AGENT_ADDRESS),this._writeKeywordValuePair($,null,Buffer.from([0]),SG.TNS_AQ_EXT_KEYWORD_AGENT_PROTOCOL),this._writeKeywordValuePair($,null,null,SG.TNS_AQ_EXT_KEYWORD_ORIGINAL_MSGID),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.caps.ttcFieldVersion>=SG.TNS_CCAP_FIELD_VERSION_21_1)$.writeUB4(4294967295)}_writePayload($,Y){if(this.queueImpl.isJson)$.writeOson(Y.payload,this.connection._osonMaxFieldNameSize,!1);else if(this.queueImpl.payloadTypeClass)$.writeDbObject(Y.payload);else $.writeBytes(Y.payload)}_writeRecipients($,Y){let X=0;for(let G of Y.recipients)this._writeKeywordValuePair($,G,null,X),this._writeKeywordValuePair($,null,null,X+1),this._writeKeywordValuePair($,null,Buffer.from([0]),X+2),X+=3}_writeValueWithLength($,Y){if(!Y)$.writeUB4(0);else{let X=Buffer.isBuffer(Y)?Y:Buffer.from(Y,"utf-8");$.writeUB4(X.length),$.writeBytesWithLength(X)}}_writeKeywordValuePair($,Y,X,G){let J;if(!Y)$.writeUB4(0);else J=Buffer.from(Y),$.writeUB4(J.length),$.writeBytesWithLength(J);if(!X)$.writeUB4(0);else $.writeUB4(X.length),$.writeBytesWithLength(X);$.writeUB2(G)}}fL1.exports=hL1});var uL1=o((uq5,mL1)=>{var Ln6=Rs(),OI=E9();class gL1 extends Ln6{constructor($){super($);this.functionCode=OI.TNS_FUNC_AQ_ENQ,this.propsImpl=null}processReturnParameter($){this.propsImpl.msgId=this._processMsgId($),$.skipUB2()}encode($){let Y=Buffer.from(this.queueImpl.name,"utf-8"),X=0;if(this.enqOptionsImpl.deliveryMode===OI.TNS_AQ_MSG_BUFFERED)X|=OI.TNS_KPD_AQ_BUFMSG;if(this.writeFunctionHeader($),$.writeUInt8(1),$.writeUB4(Y.length),this._writeMsgProps($,this.propsImpl),!this.propsImpl.recipients)$.writeUInt8(0),$.writeUB4(0);else $.writeUInt8(1),$.writeUB4(3*this.propsImpl.recipients.length);if($.writeUB4(this.enqOptionsImpl.visibility),$.writeUInt8(0),$.writeUB4(0),$.writeUB4(0),$.writeUInt8(1),$.writeUB4(16),$.writeUB2(OI.TNS_AQ_MESSAGE_VERSION),this.queueImpl.isJson)$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(0);else if(this.queueImpl.payloadTypeClass)$.writeUInt8(1),$.writeUInt8(0),$.writeUB4(0);else $.writeUInt8(0),$.writeUInt8(1),$.writeUB4(this.propsImpl.payload.length);if($.writeUInt8(1),$.writeUB4(OI.TNS_AQ_MESSAGE_ID_LENGTH),$.writeUB4(X),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUInt8(0),$.caps.ttcFieldVersion>=OI.TNS_CCAP_FIELD_VERSION_20_1)$.writeUInt8(this.queueImpl.isJson?1:0);if($.writeBytesWithLength(Y),this.propsImpl.recipients)this._writeRecipients($,this.propsImpl);$.writeBytes(this.queueImpl.payloadToid),this._writePayload($,this.propsImpl)}}mL1.exports=gL1});var cL1=o((pq5,dL1)=>{var Bn6=Rs(),WU=E9();class pL1 extends Bn6{constructor($){super($);this.functionCode=WU.TNS_FUNC_AQ_DEQ,this.propsImpl=null}processReturnParameter($){if($.readUB4()>0)this._processMsgProps($,this.propsImpl),this.propsImpl.recipients=this._processRecipients($),this.propsImpl.payload=this._processPayload($),this.propsImpl.msgId=this._processMsgId($)}encode($){let Y=Buffer.from(this.queueImpl.name,"utf-8"),X=this.deqOptionsImpl.consumerName?Buffer.from(this.deqOptionsImpl.consumerName,"utf-8"):null,G=this.deqOptionsImpl.correlation?Buffer.from(this.deqOptionsImpl.correlation,"utf-8"):null,J=this.deqOptionsImpl.condition?Buffer.from(this.deqOptionsImpl.condition,"utf-8"):null,Q=this.deqOptionsImpl.msgId?this.deqOptionsImpl.msgId.slice(0,16):null,W=this.deqOptionsImpl.deliveryMode,Z=0;if(Q&&Q.length<16)Q=Buffer.concat([Q,Buffer.alloc(16-Q.length)]);if(W===WU.TNS_AQ_MSG_BUFFERED)Z|=WU.TNS_KPD_AQ_BUFMSG;else if(W===WU.TNS_AQ_MSG_PERSISTENT_OR_BUFFERED)Z|=WU.TNS_KPD_AQ_EITHER;if(this.writeFunctionHeader($),$.writeUInt8(1),$.writeUB4(Y.length),$.writeUInt8(1),$.writeUInt8(1),$.writeUInt8(1),$.writeUInt8(1),X)$.writeUInt8(1),$.writeUB4(X.length);else $.writeUInt8(0),$.writeUB4(0);if($.writeSB4(this.deqOptionsImpl.mode),$.writeSB4(this.deqOptionsImpl.navigation),$.writeSB4(this.deqOptionsImpl.visibility),$.writeSB4(this.deqOptionsImpl.wait),Q)$.writeUInt8(1),$.writeUB4(WU.TNS_AQ_MESSAGE_ID_LENGTH);else $.writeUInt8(0),$.writeUB4(0);if(G)$.writeUInt8(1),$.writeUB4(G.length);else $.writeUInt8(0),$.writeUB4(0);if($.writeUInt8(1),$.writeUB4(16),$.writeUB2(WU.TNS_AQ_MESSAGE_VERSION),$.writeUInt8(1),$.writeUInt8(1),$.writeUB4(WU.TNS_AQ_MESSAGE_ID_LENGTH),$.writeUB4(Z),J)$.writeUInt8(1),$.writeUB4(J.length);else $.writeUInt8(0),$.writeUB4(0);if($.writeUInt8(0),$.writeUB4(0),$.caps.ttcFieldVersion>=WU.TNS_CCAP_FIELD_VERSION_20_1)$.writeUInt8(0);if($.caps.ttcFieldVersion>=WU.TNS_CCAP_FIELD_VERSION_21_1)$.writeUB4(4294967295);if($.writeBytesWithLength(Y),X)$.writeBytesWithLength(X);if(Q)$.writeBytes(Q);if(G)$.writeBytesWithLength(G);if($.writeBytes(this.queueImpl.payloadToid),J)$.writeBytesWithLength(J)}}dL1.exports=pL1});var rL1=o((dq5,nL1)=>{var On6=Rs(),S7=E9(),lL1=E4();class iL1 extends On6{constructor($){super($);this.functionCode=S7.TNS_FUNC_ARRAY_AQ,this.numIters=0,this.propsImpls=[],this.noMsgFound=!1}processReturnParameter($){let Y=$.readUB4();for(let X=0;X<Y;X++){let G=this.propsImpls[X],J=$.readUB2();if(J>0)$.skipUB1(),this._processMsgProps($,G);if(G.recipients=this._processRecipients($),J=$.readUB2(),J>0)G.payload=this._processPayload($);let Q=$.readBytesAndLength();if(this.operation===S7.TNS_AQ_ARRAY_ENQ)for(let W=0;W<this.propsImpls.length;W++)this.propsImpls[W].msgId=Buffer.from(Q.slice(W*16,(W+1)*16));else G.msgId=Buffer.from(Q);if(J=$.readUB2(),J>0)lL1.throwErr(lL1.ERR_NOT_IMPLEMENTED);$.skipUB2()}if(this.operation===S7.TNS_AQ_ARRAY_ENQ)this.numIters=$.readUB4();else this.numIters=Y}_writeArrayDeq($){let Y=null,X=null,G=null,J=Buffer.from(this.queueImpl.name),Q=this.deqOptionsImpl.deliveryMode,W=0;if(Q===S7.TNS_AQ_MSG_BUFFERED)W|=S7.TNS_KPD_AQ_BUFMSG;else if(Q===S7.TNS_AQ_MSG_PERSISTENT_OR_BUFFERED)W|=S7.TNS_KPD_AQ_EITHER;if(this.deqOptionsImpl.consumerName)Y=Buffer.from(this.deqOptionsImpl.consumerName,"utf-8");if(this.deqOptionsImpl.condition)G=Buffer.from(this.deqOptionsImpl.condition,"utf-8");if(this.deqOptionsImpl.correlation)X=Buffer.from(this.deqOptionsImpl.correlation,"utf-8");for(let Z of this.propsImpls)$.writeUB4(J.length),$.writeBytesWithLength(J),this._writeMsgProps($,Z),$.writeUB4(0),this._writeValueWithLength($,Y),$.writeSB4(this.deqOptionsImpl.mode),$.writeSB4(this.deqOptionsImpl.navigation),$.writeSB4(this.deqOptionsImpl.visibility),$.writeSB4(this.deqOptionsImpl.wait),this._writeValueWithLength($,this.deqOptionsImpl.msgid),this._writeValueWithLength($,X),this._writeValueWithLength($,G),$.writeUB4(0),$.writeUB4(0),$.writeSB4(0),$.writeUB4(16),$.writeBytesWithLength(this.queueImpl.payloadToid),$.writeUB2(S7.TNS_AQ_MESSAGE_VERSION),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(W),$.writeUB4(0),$.writeUB4(0)}_writeArrayEnq($){let Y=Buffer.from(this.queueImpl.name),X=this.enqOptionsImpl.deliveryMode,G=0;if(X===S7.TNS_AQ_MSG_BUFFERED)G|=S7.TNS_KPD_AQ_BUFMSG;else if(X===S7.TNS_AQ_MSG_PERSISTENT_OR_BUFFERED)G|=S7.TNS_KPD_AQ_EITHER;$.writeUB4(0),$.writeUInt8(S7.TNS_MSG_TYPE_ROW_HEADER),$.writeUB4(Y.length),$.writeBytesWithLength(Y),$.writeBytes(this.queueImpl.payloadToid),$.writeUB2(S7.TNS_AQ_MESSAGE_VERSION),$.writeUB4(G);for(let J of this.propsImpls){if($.writeUInt8(S7.TNS_MSG_TYPE_ROW_DATA),$.writeUB4(G),this._writeMsgProps($,J),J.recipients===null||J.recipients.length===0)$.writeUB4(0);else $.writeUB4(3*J.recipients.length),this._writeRecipients($,J);if($.writeSB4(this.enqOptionsImpl.visibility),$.writeUB4(0),$.writeSB4(0),!this.queueImpl.payloadTypeClass&&!this.queueImpl.isJson)$.writeUB4(J.payload.length);this._writePayload($,J)}$.writeUInt8(S7.TNS_MSG_TYPE_STATUS)}encode($){if(this.writeFunctionHeader($),this.operation===S7.TNS_AQ_ARRAY_ENQ)$.writeUInt8(0),$.writeUB4(0);else $.writeUInt8(1),$.writeUB4(this.numIters);if($.writeUB4(S7.TNS_AQ_ARRAY_FLAGS_RETURN_MESSAGE_ID),this.operation===S7.TNS_AQ_ARRAY_ENQ)$.writeUInt8(1),$.writeUInt8(0);else $.writeUInt8(1),$.writeUInt8(1);if($.writeSB4(this.operation),this.operation===S7.TNS_AQ_ARRAY_ENQ)$.writeUInt8(1);else $.writeUInt8(0);if($.caps.ttcFieldVersion>=S7.TNS_CCAP_FIELD_VERSION_21_1)$.writeUB4(65535);if(this.operation===S7.TNS_AQ_ARRAY_ENQ)$.writeUB4(this.numIters);if(this.operation===S7.TNS_AQ_ARRAY_ENQ)this._writeArrayEnq($);else this._writeArrayDeq($)}}nL1.exports=iL1});var YB1=o((cq5,$B1)=>{var En6=uL1(),Mn6=cL1(),aL1=rL1(),n2=E9(),EI=E4(),Rn6=kY(),{AQ_VISIBILITY_IMMEDIATE:sL1}=SY();class oL1{constructor($,Y,X,G){if(this._connImpl=$,this.name=Y,this.payloadTypeClass=X,this.isJson=G===Rn6.DB_TYPE_JSON,this.payloadType=G,this.deqOptions=new tL1,this.enqOptions=new eL1,this.isJson)this.payloadToid=Buffer.alloc(16,0),this.payloadToid[15]=71;else if(this.payloadTypeClass)this.payloadToid=this.payloadTypeClass._objType.oid;else this.payloadToid=Buffer.alloc(16,0),this.payloadToid[15]=23}_createArrayDeqMessage($){let Y=new aL1(this._connImpl);return Y.numIters=$,Y.propsImpls=Array.from({length:$},()=>new qs),Y.queueImpl=this,Y.deqOptionsImpl=this.deqOptions,Y.operation=n2.TNS_AQ_ARRAY_DEQ,Y}_createArrayEnqMessage($){let Y=new aL1(this._connImpl);return Y.queueImpl=this,Y.enqOptionsImpl=this.enqOptions,Y.propsImpls=$,Y.operation=n2.TNS_AQ_ARRAY_ENQ,Y.numIters=$.length,Y}_createDeqMessage(){let $=new qs,Y=new Mn6(this._connImpl);return Y.queueImpl=this,Y.deqOptionsImpl=this.deqOptions,Y.propsImpl=$,Y}_createEnqMessage($){let Y=new En6(this._connImpl);return Y.queueImpl=this,Y.enqOptionsImpl=this.enqOptions,Y.propsImpl=$,Y}async deq($){let Y;if($>1)Y=await this.deqMany($);else if($==1)Y=await this.deqOne();else EI.throwErr(EI.ERR_INVALID_MAX_MESSAGES);return Y}async deqMany($){if(this.enqOptions.visibility===sL1)EI.throwNotImplemented("immediate visibility with deqMany");let Y=this._createArrayDeqMessage($);if(await this._connImpl._protocol._processMessage(Y),Y.noMsgFound)return[];return Y.propsImpls.slice(0,Y.numIters)}async deqOne(){let $=this._createDeqMessage();if(await this._connImpl._protocol._processMessage($),$.noMsgFound)return[];return[$.propsImpl]}async enq($){let Y=$.map((X)=>{let G=new qs;return G._init(X),G});if($.length==1)return await this.enqOne(Y[0]);return await this.enqMany(Y)}async enqMany($){if(this.enqOptions.visibility===sL1)EI.throwNotImplemented("immediate visibility with enqMany");let Y=this._createArrayEnqMessage($);return await this._connImpl._protocol._processMessage(Y),$}async enqOne($){let Y=this._createEnqMessage($);return await this._connImpl._protocol._processMessage(Y),[$]}_getConnImpl(){return this._connImpl}}class tL1{constructor(){this.condition=null,this.consumerName=null,this.correlation=null,this.deliveryMode=n2.TNS_AQ_MSG_PERSISTENT,this.mode=n2.TNS_AQ_DEQ_REMOVE,this.msgId=null,this.navigation=n2.TNS_AQ_DEQ_NEXT_MSG,this.transformation=null,this.visibility=n2.TNS_AQ_DEQ_ON_COMMIT,this.wait=n2.TNS_AQ_DEQ_WAIT_FOREVER}getCondition(){return this.condition}getConsumerName(){return this.consumerName}getCorrelation(){return this.correlation}getMsgId(){return this.msgId}getMode(){return this.mode}getNavigation(){return this.navigation}getTransformation(){return this.transformation}getVisibility(){return this.visibility}getWait(){return this.wait}setCondition($){this.condition=$}setConsumerName($){this.consumerName=$}setCorrelation($){this.correlation=$}setDeliveryMode($){this.deliveryMode=$}setMode($){this.mode=$}setMsgId($){this.msgId=$}setNavigation($){this.navigation=$}setTransformation($){this.transformation=$}setVisibility($){this.visibility=$}setWait($){this.wait=$}}class eL1{constructor(){this.transformation=null,this.visibility=n2.TNS_AQ_ENQ_ON_COMMIT,this.deliveryMode=n2.TNS_AQ_MSG_PERSISTENT}getDeliveryMode(){return this.deliveryMode}getTransformation(){EI.throwNotImplemented("transformation")}getVisibility(){return this.visibility}setDeliveryMode($){this.deliveryMode=$}setTransformation($){EI.throwNotImplemented("transformation")}setVisibility($){this.visibility=$}}class qs{constructor(){this.delay=n2.TNS_AQ_MSG_NO_DELAY,this.correlation=null,this.exceptionq=null,this.expiration=n2.TNS_AQ_MSG_NO_EXPIRATION,this.priority=0,this.recipients=[],this.numAttempts=0,this.deliveryMode=0,this.enqTime=null,this.msgId=null,this.state=0,this.payload=null,this.enqTxnId=null,this.senderAgentName=null,this.senderAgentAddress=null,this.senderAgentProtocol=0,this.originalMsgId=null}_init($){if(this.payload=$.payload,$.correlation!==void 0)this.correlation=$.correlation;if($.delay!==void 0)this.delay=$.delay;if($.exceptionQueue!==void 0)this.exceptionQueue=$.exceptionQueue;if($.expiration!==void 0)this.expiration=$.expiration;if($.priority!==void 0)this.priority=$.priority;if($.recipients!==void 0)this.recipients=$.recipients}getNumAttempts(){return this.numAttempts}getCorrelation(){return this.correlation}getDelay(){return this.delay}getDeliveryMode(){return this.deliveryMode}getEnqTime(){return this.enqTime}getExceptionQueue(){return this.exceptionq}getExpiration(){return this.expiration}getMsgId(){return this.msgId}getOriginalMsgId(){return this.originalMsgId}getPayload(){return this.payload}getPriority(){return this.priority}getState(){return this.state}setCorrelation($){this.correlation=$}setDelay($){this.delay=$}setExceptionQueue($){this.exceptionq=$}setExpiration($){this.expiration=$}setPayloadBytes($){this.payload=$}setPayloadObject($){this.payload=$}setPayloadJson($){this.payload=$}setPriority($){this.priority=$}setRecipients($){this.recipients=$}}$B1.exports={ThinQueueImpl:oL1}});var eV0=o((lq5,WB1)=>{var{Buffer:XB1}=L0("buffer"),qn6=ua(),In6=RV0(),tV0=Cx(),Pn6=rD1(),{BaseBuffer:wn6}=tq(),{NetworkSession:_n6}=lV0(),{Statement:jn6}=rV0(),Is=kx(),MI=pA(),V4=E9(),GB1=L0("process"),L6=kY(),e8=E4(),ZY=kL1(),Tn6=bL1(),{ThinQueueImpl:Cn6}=YB1(),Sn6=new global.FinalizationRegistry(($)=>{$.disconnect()});class JB1 extends wn6{}class QB1 extends qn6{async close(){try{if(this._protocol.txnInProgress){if(this.tpcContext){let $=this.createTpcRollbackMessage();await this._protocol._processMessage($)}else await this.rollback();this.tpcContext=null}if(this._drcpEnabled)await this._sessRelease(),this._drcpEstablishSession=!0;if(this._pool&&!this._dropSess)await this._pool.release(this);else{if(!this._drcpEnabled){let $=new ZY.LogOffMessage(this);await this._protocol._processMessage($)}this.nscon.disconnect()}}catch($){if(this.nscon.disconnect(MI.NSFIMM),this._pool)await this._pool.release(this)}}async _sessRelease(){let $=new ZY.SessionReleaseMessage(this);if(!this.isPooled())$.sessReleaseMode=V4.DRCP_DEAUTHENTICATE;await this._protocol._processMessage($)}async _getElementTypeObj($){let Y=[{name:"owner",type:L6.DB_TYPE_VARCHAR,dir:V4.BIND_IN,maxSize:128,values:[$.schema]},{name:"name",type:L6.DB_TYPE_VARCHAR,dir:V4.BIND_IN,maxSize:128,values:[$.name]},{name:"package_name",type:L6.DB_TYPE_VARCHAR,dir:V4.BIND_IN,maxSize:128,values:[$.packageName]}],X;if($.packageName)X=`
        select
            elem_type_owner,
            elem_type_name,
            elem_type_package
        from all_plsql_coll_types
        where owner = :owner
          and type_name = :name
          and package_name = :package_name`;else Y.pop(),X=`
        select
            elem_type_owner,
            elem_type_name
        from all_coll_types
        where owner = :owner
          and type_name = :name`;let G={connection:{_impl:this},prefetchRows:2},J=await this.execute(X,1,Y,G,!1),Q=await J.resultSet.getRows(1,G);await J.resultSet.close();let W=Q[0];if($.elementTypeClass=this._getDbObjectType(W[0],W[1],W[2]),$.elementTypeClass.partial)this._partialDbObjectTypes.push($.elementTypeClass)}async _execute($,Y,X,G,J,Q=[]){if(J&&$.isQuery)e8.throwErr(e8.ERR_EXECMANY_NOT_ALLOWED_ON_QUERIES);let W=$.bindInfoList.length,Z=X.length;if(W!==Z){if(!X[0]?.name)e8.throwErr(e8.ERR_WRONG_NUMBER_OF_BINDS,W,Z);if($.bindInfoDict.size!==Z)e8.throwErr(e8.ERR_WRONG_NUMBER_OF_BINDS,W,Z)}for(let z=0;z<X.length;z++)await this._bind($,X[z],z+1,Q);if($.isPlSql&&(G.batchErrors||G.dmlRowCounts))e8.throwErr(e8.ERR_EXEC_MODE_ONLY_FOR_DML);let K=new ZY.ExecuteMessage(this,$,G);if(K.numExecs=Y,K.arrayDmlRowCounts=G.dmlRowCounts,K.batchErrors=G.batchErrors,$.isPlSql&&($.cursorId===0||$.requiresFullExecute))K.numExecs=1,K.noImplicitRelease=!0,await this._protocol._processMessage(K),$.requiresFullExecute=!1,K.numExecs=Y-1,K.offset=1,K.noImplicitRelease=!1;if(K.numExecs>0)await this._protocol._processMessage(K),$.requiresFullExecute=!1;if($.requiresDefine&&$.sql)$.requiresFullExecute=!0,await this._protocol._processMessage(K),$.requiresFullExecute=!1,$.requiresDefine=!1;let H={};if(K.warning)H.warning=K.warning;if($.numQueryVars>0)H.resultSet=K.resultSet;else{$.bufferRowIndex=0;let z=Is.getOutBinds($,Y,J);if(z)H.outBinds=z;if(J){if(!$.isPlSql)H.rowsAffected=$.rowCount,delete $.rowCount;if(G.dmlRowCounts)H.dmlRowCounts=G.dmlRowCounts;if(G.batchErrors)H.batchErrors=G.batchErrors}else{if($.isPlSql&&G.implicitResultSet)H.implicitResults=G.implicitResultSet;if($.lastRowid)H.lastRowid=$.lastRowid,delete $.lastRowid;if($.isPlSql){if($.rowCount)H.rowsAffected=$.rowCount}else H.rowsAffected=$.rowCount||0;if($.rowCount)delete $.rowCount}this._returnStatement($)}return H}_parseTDSAttr($,Y){let X,G,J;for(;;)if(J=$.readUInt8(),J===V4.TNS_OBJ_TDS_TYPE_EMBED_ADT_INFO)$.skipBytes(1);else if(J!==V4.TNS_OBJ_TDS_TYPE_SUBTYPE_MARKER)break;let Q,W;switch(J){case V4.TNS_OBJ_TDS_TYPE_NUMBER:if(Q=$.readInt8(),W=$.readInt8(),Q||W)Y.precision=Q,Y.scale=W;return L6.DB_TYPE_NUMBER;case V4.TNS_OBJ_TDS_TYPE_FLOAT:if(Q=$.readInt8(),Q)Y.precision=Q;return L6.DB_TYPE_NUMBER;case V4.TNS_OBJ_TDS_TYPE_VARCHAR:case V4.TNS_OBJ_TDS_TYPE_CHAR:return Y.maxSize=$.readUInt16BE(),X=J===V4.TNS_OBJ_TDS_TYPE_VARCHAR?V4.TNS_DATA_TYPE_VARCHAR:V4.TNS_DATA_TYPE_CHAR,G=$.readUInt8(),G=G&127,$.skipBytes(2),L6.getTypeByOraTypeNum(X,G);case V4.TNS_OBJ_TDS_TYPE_RAW:return Y.maxSize=$.readUInt16BE(),L6.DB_TYPE_RAW;case V4.TNS_OBJ_TDS_TYPE_BINARY_FLOAT:return L6.DB_TYPE_BINARY_FLOAT;case V4.TNS_OBJ_TDS_TYPE_BINARY_DOUBLE:return L6.DB_TYPE_BINARY_DOUBLE;case V4.TNS_OBJ_TDS_TYPE_DATE:return L6.DB_TYPE_DATE;case V4.TNS_OBJ_TDS_TYPE_TIMESTAMP:return $.skipBytes(1),L6.DB_TYPE_TIMESTAMP;case V4.TNS_OBJ_TDS_TYPE_TIMESTAMP_LTZ:return $.skipBytes(1),L6.DB_TYPE_TIMESTAMP_LTZ;case V4.TNS_OBJ_TDS_TYPE_TIMESTAMP_TZ:return $.skipBytes(1),L6.DB_TYPE_TIMESTAMP_TZ;case V4.TNS_OBJ_TDS_TYPE_BOOLEAN:return L6.DB_TYPE_BOOLEAN;case V4.TNS_OBJ_TDS_TYPE_CLOB:return L6.DB_TYPE_CLOB;case V4.TNS_OBJ_TDS_TYPE_BLOB:return L6.DB_TYPE_BLOB;case V4.TNS_OBJ_TDS_TYPE_OBJ:return $.skipBytes(5),L6.DB_TYPE_OBJECT;case V4.TNS_OBJ_TDS_TYPE_START_EMBED_ADT:while(this._parseTDSAttr($,{})!==0)continue;return L6.DB_TYPE_OBJECT;case V4.TNS_OBJ_TDS_TYPE_END_EMBED_ADT:return 0;default:e8.throwErr(e8.ERR_TDS_TYPE_NOT_SUPPORTED,J)}}async _parseTDS($,Y){let X=new JB1($);X.skipBytes(4),X.skipBytes(2),X.skipBytes(2);let G=X.readUInt16BE();if(X.skipBytes(1),X.skipBytes(1),X.skipBytes(2),X.skipBytes(4),Y.isCollection=!1,G===1){let J=X.pos;if(X.readUInt8()===V4.TNS_OBJ_TDS_TYPE_COLL)Y.isCollection=!0;else X.pos=J}if(Y.isCollection){let J=X.readUInt32BE();if(Y.maxNumElements=X.readUInt32BE(),Y.collectionType=X.readUInt8(),Y.collectionType===V4.TNS_OBJ_PLSQL_INDEX_TABLE)Y.collectionFlags=V4.TNS_OBJ_HAS_INDEXES;if(X.pos=J,Y.elementTypeInfo={},Y.elementType=this._parseTDSAttr(X,Y.elementTypeInfo),Y.elementType===L6.DB_TYPE_OBJECT){if(await this._getElementTypeObj(Y),Y.elementTypeClass.isXmlType)Y.elementType=L6.DB_TYPE_XMLTYPE}}else if(Y.attributes)for(let J of Y.attributes)this._parseTDSAttr(X,J)}async _populateRowTypeInfo($,Y,X){let J=[{name:"owner",type:L6.DB_TYPE_VARCHAR,maxSize:128,dir:V4.BIND_IN,values:[X.outBinds.schema]},{name:"name",type:L6.DB_TYPE_VARCHAR,maxSize:128,dir:V4.BIND_IN,values:[$.name.substring(0,$.name.length-8)]}],Q=await this.execute(`
      SELECT
        column_name,
        data_type,
        data_type_owner,
        case
          when data_type in
            ('CHAR', 'NCHAR', 'VARCHAR2', 'NVARCHAR2', 'RAW')
            then data_length
          else 0
        end,
        case
          when data_precision is null and data_scale is null
            then 0
          when data_precision is null
            then 38
          else data_precision
        end,
        case
          when data_precision is null and data_scale is null
              and data_type = 'NUMBER'
            then -127
          when data_scale is null
            then 0
          else data_scale
        end
      from all_tab_cols
      where owner = :owner
        and table_name = :name
        and hidden_column != 'YES'
      order by column_id`,1,J,Y,!1);try{let W=await Q.resultSet._getAllRows();$.attributes=[];for(let Z of W){let K={name:Z[0],dataType:Z[1],dataTypeOwner:Z[2],maxSize:Z[3],dataPrecision:Z[4],dataScale:Z[5]};if(!K.dataTypeOwner){let H=Z[1].indexOf("("),z=Z[1].indexOf(")");if(z>H)K.dataType=K.dataType.substring(0,H)+K.dataType.substring(z+1,K.dataType.length)}this._addAttr($.attributes,K)}}finally{Q.resultSet.close()}}async _populateDbObjectTypeInfo($){let X=[{name:"full_name",type:L6.DB_TYPE_VARCHAR,dir:V4.BIND_INOUT,maxSize:500,values:[$]},{name:"ret_val",type:L6.DB_TYPE_BINARY_INTEGER,dir:V4.BIND_OUT,values:[]},{name:"oid",type:L6.DB_TYPE_RAW,maxSize:16,dir:V4.BIND_OUT,values:[]},{name:"version",type:L6.DB_TYPE_BINARY_INTEGER,dir:V4.BIND_OUT,values:[]},{name:"tds",type:L6.DB_TYPE_RAW,maxSize:2000,dir:V4.BIND_OUT,values:[]},{name:"attrs_rc",type:L6.DB_TYPE_CURSOR,dir:V4.BIND_OUT,values:[]},{name:"package_name",type:L6.DB_TYPE_VARCHAR,maxSize:128,dir:V4.BIND_OUT,values:[]},{name:"schema",type:L6.DB_TYPE_VARCHAR,maxSize:128,dir:V4.BIND_OUT,values:[]},{name:"name",type:L6.DB_TYPE_VARCHAR,maxSize:128,dir:V4.BIND_OUT,values:[]}],G={connection:{_impl:this},nullifyInvalidCursor:!0},J=await this.execute(`
      declare
          t_Instantiable              varchar2(3);
          t_SuperTypeOwner            varchar2(128);
          t_SuperTypeName             varchar2(128);
          t_SubTypeRefCursor          sys_refcursor;
          t_Pos                       pls_integer;
      begin
          :ret_val := dbms_pickler.get_type_shape(:full_name, :oid,
              :version, :tds, t_Instantiable, t_SuperTypeOwner,
              t_SuperTypeName, :attrs_rc, t_SubTypeRefCursor);
          :package_name := null;
          if substr(:full_name, length(:full_name) - 7) = '%ROWTYPE' then
              t_Pos := instr(:full_name, '.');
              :schema := substr(:full_name, 1, t_Pos - 1);
              :name := substr(:full_name, t_Pos + 1);
          else
              begin
                  select owner, type_name
                  into :schema, :name
                  from all_types
                  where type_oid = :oid;
              exception
              when no_data_found then
                  begin
                      select owner, package_name, type_name
                      into :schema, :package_name, :name
                      from all_plsql_types
                      where type_oid = :oid;
                  exception
                  when no_data_found then
                      null;
                  end;
              end;
          end if;
      end;`,1,X,G,!1);if(J.outBinds.ret_val!==0)e8.throwErr(e8.ERR_INVALID_OBJECT_TYPE_NAME,$);try{let Q=this._getDbObjectType(J.outBinds.schema,J.outBinds.name,J.outBinds.package_name,J.outBinds.oid);if(!Q.partial)return Q;if(Q.name.endsWith("%ROWTYPE"))await this._populateRowTypeInfo(Q,G,J);else{Q.version=J.outBinds.version;let W=await J.outBinds.attrs_rc._getAllRows();if(W.length>0){Q.attributes=[];for(let Z of W){let K={name:Z[1],dataType:Z[3],dataTypeOwner:Z[4],packageName:Z[5],oid:Z[6]};this._addAttr(Q.attributes,K)}}await this._parseTDS(J.outBinds.tds,Q)}return Q.partial=!1,Q}finally{J.outBinds.attrs_rc.close()}}_addAttr($,Y){let X={name:Y.name};if(Y.dataTypeOwner){if(X.type=L6.DB_TYPE_OBJECT,X.typeClass=this._getDbObjectType(Y.dataTypeOwner,Y.dataType,Y.packageName,Y.oid),X.typeClass.isXmlType)X.type=L6.DB_TYPE_XMLTYPE;if(X.typeClass.partial)this._partialDbObjectTypes.push(X.typeClass)}else if(Y.dataType==="INTEGER"||Y.dataType==="SMALLINT")X.type=L6.DB_TYPE_NUMBER,X.precision=38,X.scale=0;else if(Y.dataType==="REAL")X.type=L6.DB_TYPE_NUMBER,X.precision=63,X.scale=-127;else if(Y.dataType==="DOUBLE PRECISION"||Y.dataType==="FLOAT"){if(X.type=L6.DB_TYPE_NUMBER,Y.dataPrecision!=null||Y.dataPrecision!=null)X.precision=Number(Y.dataPrecision);else X.precision=126;X.scale=-127}else{if(X.type=L6.getTypeByColumnTypeName(Y.dataType),Y.maxSize!=null||Y.maxSize!=null){let G=Number(Y.maxSize);if(G)X.maxSize=G}if(X.type===L6.DB_TYPE_NUMBER)X.precision=Number(Y.dataPrecision),X.scale=Number(Y.dataScale)}$.push(X)}async _populatePartialDbObjectTypes(){while(this._partialDbObjectTypes.length>0){let $=this._partialDbObjectTypes.pop(),Y="%ROWTYPE",X=$.name;if(X.endsWith(Y))X=X.substring(0,X.length-Y.length);else Y="";let G;if($.packageName)G=`"${$.schema}"."${$.packageName}"."${X}"${Y}`;else G=`"${$.schema}"."${X}"${Y}`;await this._populateDbObjectTypeInfo(G)}}async commit(){let $=new ZY.CommitMessage(this);await this._protocol._processMessage($)}async breakExecution(){await this._protocol.breakMessage()}isCompressionEnabled(){return this.nscon.compressionEnabled}isHealthy(){try{if(this.nscon.recvInbandNotif()===0)return!0;return!1}catch{return!1}}isPooled(){return this._pool?!0:!1}_postConnect($){let Y,X,G,J;this.dbDomain=$.sessionData.AUTH_SC_DB_DOMAIN,this.dbName=$.sessionData.AUTH_DBNAME,this.maxOpenCursors=Number($.sessionData.AUTH_MAX_OPEN_CURSORS||0),this.serviceName=$.sessionData.AUTH_SC_SERVICE_NAME,this.instanceName=$.sessionData.AUTH_INSTANCENAME,this.maxIdentifierLength=Number($.sessionData.AUTH_MAX_IDEN_LENGTH||30);let Q=Number($.sessionData.AUTH_VERSION_NO),W=Q>>24&255;if(this.warning=$.warning,this._protocol.caps.ttcFieldVersion>=V4.TNS_CCAP_FIELD_VERSION_18_1_EXT_1)Y=Q>>16&255,X=Q>>12&15,G=Q>>4&255,J=Q&15;else Y=Q>>20&15,X=Q>>12&255,G=Q>>8&15,J=Q&255;this.serverVersionString=W+"."+Y+"."+X+"."+G+"."+J,this.serverVersion=W*1e8+Y*1e6+X*1e4+G*100+J*1}async connect($){if(!$.connectString)e8.throwErr(e8.ERR_EMPTY_CONNECT_STRING);Is.checkCredentials($),this.sessionID=0,this.serialNum=0,this.autoCommit=!1,this.serverVersion="",this.statementCache=null,this.currentSchema="",this.invokeSessionCallback=!0,this.statementCacheSize=$.stmtCacheSize,this._currentSchemaModified=!1,this._tempLobsToClose=[],this._tempLobsTotalSize=0,this._drcpEstablishSession=!1,this._cclass=null,this._clientIdentifier="",this._clientIdentifierModified=!1,this._action="",this._actionModified=!1,this._dbOp="",this._dbOpModified=!1,this._clientInfo="",this._clientInfoModified=!1,this._module="",this._moduleModified=!1,this._drcpEnabled=!1,this.serviceName="",this.remoteAddress="",this.comboKey=null,this.tpcContext=null,this._sessionlessData=null,this.nscon=new _n6,Sn6.register(this,this.nscon),await this.nscon.connect($);let Y;if(this.isPooled())Y=$._connInfo[0],this.serviceName=$._connInfo[2],this.purity=$._connInfo[3]|V4.PURITY_DEFAULT,this.sid=$._connInfo[4];else Y=this.nscon.getOption(MI.SERVERTYPE),this.serviceName=this.nscon.getOption(MI.SVCNAME),this.sid=this.nscon.getOption(MI.SID),this.purity=this.nscon.getOption(MI.PURITY)|V4.PURITY_DEFAULT;if(Y)this._drcpEnabled=Y.toLowerCase()==="pooled";if(this.remoteAddress=this.nscon.getOption(MI.REMOTEADDR),this.connectionClass=$.connectionClass,this.purity===V4.PURITY_DEFAULT&&this._drcpEnabled)if(this.isPooled())this.purity=V4.PURITY_SELF;else this.purity=V4.PURITY_NEW;if(this._protocol=new Pn6(this),this._protocol.caps.protocolVersion<V4.TNS_VERSION_MIN_ACCEPTED)e8.throwErr(e8.ERR_SERVER_VERSION_NOT_SUPPORTED);try{let X=new ZY.ProtocolMessage(this),G=new ZY.DataTypeMessage(this),J=new ZY.AuthMessage(this,$);if(this.nscon.supportsFastAuth){let Q=new ZY.FastAuthMessage(this);if(Q.protocolMessage=X,Q.dataTypeMessage=G,Q.authMessage=J,await this._protocol._processMessage(Q),Q.reNegotiate)await this._protocol._processMessage(G),await this._protocol._processMessage(J)}else{let Q=this.nscon.endOfRequestSupport;this.nscon.endOfRequestSupport=!1,await this._protocol._processMessage(X),await this._protocol._processMessage(G),this.nscon.endOfRequestSupport=Q,await this._protocol._processMessage(J)}if(!$.externalAuth)await this._protocol._processMessage(J);this._postConnect(J)}catch(X){throw this.nscon.disconnect(),X}if(this.statementCache=new Tn6(this.statementCacheSize),this._partialDbObjectTypes=[],$.debugJDWP)this.jdwpData=XB1.from($.debugJDWP);else if(GB1.env.ORA_DEBUG_JDWP)this.jdwpData=XB1.from(GB1.env.ORA_DEBUG_JDWP);this._protocol.connInProgress=!1}_returnStatement($){this.statementCache.returnStatement($)}_prepare($,Y){let X=this._getStatement($,Y.keepInStmtCache);return X.bufferRowIndex=0,X.bufferRowCount=0,X.lastRowIndex=0,X.moreRowsToFetch=!0,X}async _bind($,Y,X=0,G=[]){let{bindInfoDict:J,bindInfoList:Q}=$;if($.isPlSql&&Y.maxSize>32767){if(Y.type===L6.DB_TYPE_RAW||Y.type===L6.DB_TYPE_LONG_RAW)Y.type=L6.DB_TYPE_BLOB;else if(Y.type._csfrm===V4.CSFRM_NCHAR)Y.type=L6.DB_TYPE_NCLOB;else Y.type=L6.DB_TYPE_CLOB;let W=Y.maxSize;delete Y.maxSize,Y.outConverter=async function(Z){if(Z===null)return null;let K=await Z.getData(),H=Z._length;if(K&&H>W)e8.throwErr(e8.ERR_INSUFFICIENT_BUFFER_FOR_BINDS);return K}}if(Y.type===L6.DB_TYPE_CLOB||Y.type===L6.DB_TYPE_NCLOB||Y.type===L6.DB_TYPE_BLOB){for(let[W,Z]of Y.values.entries())if(!(Z instanceof tV0))if(Z&&Z.length>0){let K=new tV0;await K.create(this,Y.type),G.push(K),await K.write(1,Z),Y.values[W]=K}else Y.values[W]=null}if(Y.name){let W;if(Y.name.startsWith('"')&&Y.name.endsWith('"'))W=Y.name.substring(1,Y.name.length-1);else W=Y.name.toUpperCase();if(W.startsWith(":"))W=Y.name.substring(1);if(!J.has(W))e8.throwErr(e8.ERR_INVALID_BIND_NAME,W);J.get(W).forEach((Z)=>{$._setVariable(Z,Y)})}else{let W=Q[X-1];$._setVariable(W,Y)}}_createResultSet($,Y){let X=new In6;if(!Y)Y=new jn6;if(X._resultSetNew(this,Y,$),Y.queryVars.length>0){let G=Is.getMetadataMany(Y.queryVars);X._setup($,G)}return X}async getDbObjectClass($){let Y=await this._populateDbObjectTypeInfo($);return await this._populatePartialDbObjectTypes(),Y}async getStatementInfo($){let Y={},X={},G=this._prepare($,Y);Y.connection=this;try{if(!G.isDdl){let J=new ZY.ExecuteMessage(this,G,Y);J.parseOnly=!0,await this._protocol._processMessage(J)}if(G.numQueryVars>0)X.metaData=Is.getMetadataMany(G.queryVars);return X.bindNames=Array.from(G.bindInfoDict.keys()),X.statementType=G.statementType,X}finally{this._returnStatement(G)}}async execute($,Y,X,G,J){let Q=this._prepare($,G),W=[];try{return await this._execute(Q,Y,X,G,J,W)}catch(Z){throw this._returnStatement(Q),Z}finally{for(let Z of W)this._tempLobsToClose.push(Z._locator),this._tempLobsTotalSize+=Z._locator.length}}_getStatement($,Y=!1){return this.statementCache.getStatement($,Y,this._drcpEstablishSession)}async ping(){let $=new ZY.PingMessage(this);await this._protocol._processMessage($)}async rollback(){let $=new ZY.RollbackMessage(this);await this._protocol._processMessage($)}getOracleServerVersion(){return this.serverVersion}getOracleServerVersionString(){return this.serverVersionString}setCurrentSchema($){this._currentSchemaModified=!0,this.currentSchema=$}getCurrentSchema(){return this.currentSchema}setClientId($){this._clientIdentifierModified=!0,this._clientIdentifier=$}setDbOp($){this._dbOpModified=!0,this._dbOp=$}setExternalName($){this.externalName=$}setInternalName($){this.internalName=$}setClientInfo($){this._clientInfoModified=!0,this._clientInfo=$}setModule($){this._moduleModified=!0,this._module=$,this._actionModified=!0}setAction($){this._actionModified=!0,this._action=$}async changePassword($,Y,X){let G={user:$,newPassword:X,password:Y,changePassword:!0},J=new ZY.AuthMessage(this,G);await this._protocol._processMessage(J)}async createLob($){let Y=new tV0;return await Y.create(this,$),Y}checkTpcCommitState($,Y){if(Y&&$!==V4.TNS_TPC_TXN_STATE_READ_ONLY&&$!==V4.TNS_TPC_TXN_STATE_COMMITTED||!Y&&$!==V4.TNS_TPC_TXN_STATE_FORGOTTEN)e8.throwErr(e8.ERR_UNKNOWN_TRANSACTION_STATE,$)}createTpcCommitMessage($,Y){let X=new ZY.TransactionChangeStateMessage(this);return X.operation=V4.TNS_TPC_TXN_COMMIT,X.state=Y==0?V4.TNS_TPC_TXN_STATE_COMMITTED:V4.TNS_TPC_TXN_STATE_READ_ONLY,X.xid=$,X.context=this.tpcContext,X}createTpcRollbackMessage($=null){let Y=new ZY.TransactionChangeStateMessage(this);return Y.operation=V4.TNS_TPC_TXN_ABORT,Y.state=V4.TNS_TPC_TXN_STATE_ABORTED,Y.xid=$,Y.context=this.tpcContext,Y}async tpcBegin($,Y,X){let G=new ZY.TransactionSwitchMessage(this);G.operation=V4.TNS_TPC_TXN_START,G.xid=$,G.flags=Y,G.timeout=X,await this._protocol._processMessage(G),this.tpcContext=G.context}async tpcCommit($,Y){let X=this.createTpcCommitMessage($,Y);await this._protocol._processMessage(X),this.checkTpcCommitState(X.state,Y)}async tpcEnd($,Y){let X=new ZY.TransactionSwitchMessage(this);X.operation=V4.TNS_TPC_TXN_DETACH,X.xid=$,X.context=this.tpcContext,X.flags=Y,await this._protocol._processMessage(X),this.tpcContext=null}async tpcPrepare($){let Y=new ZY.TransactionChangeStateMessage(this);if(Y.operation=V4.TNS_TPC_TXN_PREPARE,Y.xid=$,Y.context=this.tpcContext,await this._protocol._processMessage(Y),Y.state===V4.TNS_TPC_TXN_STATE_REQUIRES_COMMIT)return!0;else if(Y.state===V4.TNS_TPC_TXN_STATE_READ_ONLY)return!1;e8.throwErr(e8.ERR_UNKNOWN_TRANSACTION_STATE,Y.state)}async tpcRollback($){let Y=this.createTpcRollbackMessage($);if(await this._protocol._processMessage(Y),Y.state!==V4.TNS_TPC_TXN_STATE_ABORTED)e8.throwErr(e8.ERR_UNKNOWN_TRANSACTION_STATE,Y.state)}_validateSessionlessState(){if(this._sessionlessData?.startedOnServer)e8.throwErr(e8.ERR_SESSIONLESS_DIFFERING_METHODS)}async startSessionlessTransaction($,Y,X,G){if(this._validateSessionlessState(),this._sessionlessData)e8.throwErr(e8.ERR_SESSIONLESS_ALREADY_ACTIVE);let J=new ZY.TransactionSwitchMessage(this);if(J.xid={globalTransactionId:$,branchQualifier:"",formatId:V4.TNS_TPC_TRANS_SESSIONLESS_FORMAT},J.timeout=Y,J.operation=V4.TNS_TPC_TXN_START,J.flags=V4.TNS_TPC_TRANS_SESSIONLESS|X,G)J.messageType=V4.TNS_MSG_TYPE_PIGGYBACK,this._sessionlessData={piggyback:J,pending:!0};else await this._protocol._processMessage(J)}async suspendSessionlessTransaction(){if(this._validateSessionlessState(),!this._sessionlessData)e8.throwErr(e8.ERR_SESSIONLESS_INACTIVE);let $=new ZY.TransactionSwitchMessage(this);$.operation=V4.TNS_TPC_TXN_DETACH,$.flags=V4.TNS_TPC_TRANS_SESSIONLESS,await this._protocol._processMessage($)}getStmtCacheSize(){return this.statementCache._maxSize}setCallTimeout($){this._protocol.callTimeout=$}getCallTimeout(){return this._protocol.callTimeout}getTag(){return""}getExternalName(){return this.externalName}getInstanceName(){return this.instanceName}getInternalName(){return this.internalName}getLTXID(){return this._ltxid}getDbDomain(){return this.dbDomain}getHostName(){return this.nscon.ntAdapter.hostName}getPort(){return this.nscon.ntAdapter.port}getProtocol(){return this.nscon.ntAdapter.secure?"TCPS":"TCP"}getDbName(){return this.dbName}getMaxOpenCursors(){return this.maxOpenCursors}getMaxIdentifierLength(){return this.maxIdentifierLength}getServiceName(){return this.serviceName}getTransactionInProgress(){return this._protocol.txnInProgress}getWarning(){return this.warning}getQueue($,Y,X){return new Cn6(this,$,Y,X)}}WB1.exports=QB1});var UB1=o((iq5,KB1)=>{var kn6=bz0(),vn6=eV0(),kG=WI(),TZ=E4(),xn6=wZ(),Ps=GY(),yn6=kx(),{getConnectionInfo:bn6}=lV0(),hn6=L0("crypto"),fn6=L0("timers");class ZB1 extends kn6{_init($){if(!$.homogeneous)TZ.throwErr(TZ.ERR_NOT_IMPLEMENTED,"Heterogeneous Pooling");if(!$.connectString)TZ.throwErr(TZ.ERR_EMPTY_CONNECT_STRING);if(yn6.checkCredentials($),this._availableObjects=[],this._name="node-thin",this._poolMin=$.poolMin,this._poolMax=$.poolMax,this._poolIncrement=$.poolIncrement,this._poolTimeout=$.poolTimeout,this._poolPingInterval=$.poolPingInterval,this._poolPingTimeout=$.poolPingTimeout,this._maxLifetimeSession=$.maxLifetimeSession||0,this._stmtCacheSize=$.stmtCacheSize,this._userConfig=$,this._freeConnectionList=[],this._usedConnectionList=new Set,this._password=$.password,this._walletPassword=$.walletPassword,this._walletContent=$.walletContent,this._obfuscatedPassword=[],this._obfuscatedWalletPassword=[],this._token=$.token,this._obfuscatedToken=[],this._privateKey=$.privateKey,this._obfuscatedPrivateKey=[],this._schedulerJob=null,this._poolCloseWaiter=null,this._pendingRequests=[],this._connsToDrop=[],this._bgCleaner=null,this._poolCloseCleaner=null,this._password!==void 0){let Y=kG.setObfuscatedValue(this._password);this._password=Y.value,this._obfuscatedPassword=Y.obfuscatedValue,this._userConfig.password=null}if(this._walletPassword!==void 0){let Y=kG.setObfuscatedValue(this._walletPassword);this._walletPassword=Y.value,this._obfuscatedWalletPassword=Y.obfuscatedValue,this._userConfig.walletPassword=null}if(this._walletContent!==void 0){let Y=kG.setObfuscatedValue(this._walletContent);this._walletContent=Y.value,this._obfuscatedWalletContent=Y.obfuscatedValue,this._userConfig.walletConent=null}if(this._token!==void 0){let Y=kG.setObfuscatedValue(this._token);this._token=Y.value,this._obfuscatedToken=Y.obfuscatedValue,this._userConfig.token=null}if(this._privateKey!==void 0){let Y=kG.setObfuscatedValue(this._privateKey);this._privateKey=Y.value,this._obfuscatedPrivateKey=Y.obfuscatedValue,this._userConfig.privateKey=null}this._accessTokenFn=$.accessTokenFn,this._accessTokenConfig=$.accessTokenConfig,this._isDRCPEnabled=!1,this._implicitPool=null}async create($){if(this._init($),this._userConfig._connInfo=await bn6($),this._isDRCPEnabled=String(this._userConfig._connInfo[0]).toLowerCase()==="pooled",this._isDRCPEnabled&&xn6.connectionClass==="")this._generateConnectionClass();this.bgThreadFunc(),this._bgConnCleaner()}setAccessToken($){if($.token){this._token=$.token;let Y=kG.setObfuscatedValue(this._token);this._token=Y.value,this._obfuscatedToken=Y.obfuscatedValue}if($.privateKey){this._privateKey=$.privateKey;let Y=kG.setObfuscatedValue(this._privateKey);this._privateKey=Y.value,this._obfuscatedPrivateKey=Y.obfuscatedValue}}async _getConnAttrs(){let $,Y=Object.assign({},this._userConfig);if(Y.password===null)Y.password=kG.getDeobfuscatedValue(this._password,this._obfuscatedPassword);if(Y.walletPassword===null)Y.walletPassword=kG.getDeobfuscatedValue(this._walletPassword,this._obfuscatedWalletPassword);if(Y.walletContent===null)Y.walletContent=kG.getDeobfuscatedValue(this._walletContent,this._obfuscatedWalletContent);if(Y.token===null){if(Y.token=kG.getDeobfuscatedValue(this._token,this._obfuscatedToken),Ps.isTokenExpired(Y.token))if(typeof this._accessTokenFn==="function"){try{$=await this._accessTokenFn(!0,this._accessTokenConfig)}catch(X){TZ.throwWrapErr(X,TZ.ERR_ACCESS_TOKEN)}if(typeof $==="string")if(Y.token=$,Ps.isTokenExpired(Y.token))TZ.throwErr(TZ.ERR_TOKEN_HAS_EXPIRED);else{let X=kG.setObfuscatedValue(Y.token);this._token=X.value,this._obfuscatedToken=X.obfuscatedValue}else if(typeof $==="object")if(Y.token=$.token,Y.privateKey=Ps.denormalizePrivateKey($.privateKey),Ps.isTokenExpired(Y.token))TZ.throwErr(TZ.ERR_TOKEN_HAS_EXPIRED);else{let X=kG.setObfuscatedValue(Y.token);this._token=X.value,this._obfuscatedToken=X.obfuscatedValue;let G=kG.setObfuscatedValue(Y.privateKey);this._privateKey=G.value,this._obfuscatedPrivateKey=G.obfuscatedValue}}else TZ.throwErr(TZ.ERR_TOKEN_HAS_EXPIRED)}if(Y.privateKey===null)Y.privateKey=kG.getDeobfuscatedValue(this._privateKey,this._obfuscatedPrivateKey);return Y}async getConnection(){return await this.acquire()}async _destroy($){try{if($.nscon.ntAdapter.connected)$._dropSess=!0,await $.close()}catch(Y){return}}async close(){if(await new Promise(($)=>{if(this._poolCloseWaiter=$,this.bgWaiter)this.bgWaiter()}),this._schedulerJob)clearTimeout(this._schedulerJob),this._schedulerJob=null;for(let $ of this._freeConnectionList)await this._destroy($);for(let $ of this._usedConnectionList)await this._destroy($);await new Promise(($)=>{if(this._poolCloseCleaner=$,this._bgCleaner)this._bgCleaner()})}getPoolMax(){return this._poolMax}getPoolMin(){return this._poolMin}getConnectionsInUse(){return this._usedConnectionList.size}getConnectionsOpen(){return this._freeConnectionList.length+this._usedConnectionList.size}getPoolIncrement(){return this._poolIncrement}getPoolMaxPerShard(){return}getPoolPingInterval(){return this._poolPingInterval}getPoolPingTimeout(){return this._poolPingTimeout}getPoolTimeout(){return this._poolTimeout}getMaxLifetimeSession(){return this._maxLifetimeSession}getSodaMetaDataCache(){return}getStmtCacheSize(){return this._stmtCacheSize}_setScheduler(){if(!this._schedulerJob&&this._poolTimeout>0&&this._freeConnectionList.length>0&&this._freeConnectionList.length+this._usedConnectionList.size>this._poolMin)this._schedulerJob=setTimeout(()=>{this._scanIdleConnection()},this._poolTimeout*1000)}_scanIdleConnection(){while(this._usedConnectionList.size+this._freeConnectionList.length>this._poolMin&&this._freeConnectionList.length>0){let $=this._freeConnectionList[0];if(Date.now()-$._lastTimeUsed<this._poolTimeout*1000)break;this._connsToDrop.push($),this._freeConnectionList.shift()}if(this._bgCleaner)this._bgCleaner();this._schedulerJob=null,this._setScheduler()}_getNumConnsToCreate(){let $=this._freeConnectionList.length+this._usedConnectionList.size;if($<this._poolMin)return this._poolMin-$;else if(this._pendingRequests.length>0)return Math.min(this._poolIncrement,this._poolMax-$);else return 0}async bgThreadFunc(){while(!this._poolCloseWaiter){let $=this._getNumConnsToCreate();for(let Y=0;Y<$;Y++){try{let X=await this._getConnAttrs(),G=new vn6;G._pool=this,await G.connect(X),G._newSession=!0,G._dropSess=!1,G._creationTime=Date.now(),G._lastTimeUsed=Date.now(),this._freeConnectionList.push(G)}catch(X){this._bgErr=X}if(this._poolIncrement>1&&this._poolMax-this._usedConnectionList.size-this._freeConnectionList.length>1)this._setScheduler();if(this._pendingRequests.length>0)this._pendingRequests.shift().resolve();if(await new Promise((X)=>fn6.setImmediate(X)),this._poolCloseWaiter)break}if(this._poolCloseWaiter)break;if((this._pendingRequests.length==0||this._bgErr)&&this.getConnectionsOpen()>=this._poolMin)await new Promise((Y)=>{this.bgWaiter=Y}),this.bgWaiter=null}this._poolCloseWaiter()}async _bgConnCleaner(){while(!this._poolCloseCleaner){if(this._connsToDrop.length==0)await new Promise(($)=>this._bgCleaner=$);while(this._connsToDrop.length)await this._destroy(this._connsToDrop.pop())}this._poolCloseCleaner()}async acquire(){while(this._freeConnectionList.length>0){let Y=this._freeConnectionList.pop();if(!this._shouldRetainInPool(Y)){this._invokeBgCleaner(Y);continue}let X=!1;if(this._poolPingInterval===0)X=!0;else if(this._poolPingInterval>0){if(Date.now()-Y._lastTimeUsed>this._poolPingInterval*1000)X=!0}if(X){let G;try{if(this._poolPingTimeout)G=setTimeout(()=>{Y.nscon.forceDisconnect()},this._poolPingTimeout);await Y.ping()}catch{Y.nscon.forceDisconnect();continue}finally{clearTimeout(G)}}return this._usedConnectionList.add(Y),Y}if(await new Promise((Y)=>{if(this._pendingRequests.push({resolve:Y}),this.bgWaiter)this.bgWaiter()}),this._bgErr){let Y=this._bgErr;if(this._bgErr=null,this._pendingRequests.length>0&&this.bgWaiter)this.bgWaiter();throw Y}let $=this._freeConnectionList.pop();return this._usedConnectionList.add($),$}release($){if($.warning=void 0,this._usedConnectionList.delete($),$.nscon.connected)if($._lastTimeUsed=Date.now(),$._newSession=!1,this.getConnectionsOpen()<this._poolMax&&this._shouldRetainInPool($))this._freeConnectionList.push($);else this._invokeBgCleaner($);this._setScheduler()}_generateConnectionClass(){this._userConfig.connectionClass=hn6.randomBytes(16).toString("base64"),this._userConfig.connectionClass="NJS:"+this._userConfig.connectionClass}reconfigure($){if($.poolIncrement!==void 0)this._poolIncrement=$.poolIncrement;if($.poolTimeout!==void 0&&this._poolTimeout!==$.poolTimeout){if(this._poolTimeout=$.poolTimeout,this._schedulerJob)clearTimeout(this._schedulerJob),this._schedulerJob=null}if($.poolPingInterval!==void 0)this._poolPingInterval=$.poolPingInterval;if($.stmtCacheSize!==void 0)this._stmtCacheSize=$.stmtCacheSize;if($.poolMax!==void 0)this._poolMax=$.poolMax;if($.poolMin!==void 0)this._poolMin=$.poolMin;if($.maxLifetimeSession!==void 0)this._maxLifetimeSession=$.maxLifetimeSession;let Y=this.getConnectionsOpen()-this._poolMax;while(this._freeConnectionList.length&&Y>0){let X=this._freeConnectionList.pop();this._connsToDrop.push(X),Y--}if(this._bgCleaner)this._bgCleaner()}_invokeBgCleaner($){if(this._connsToDrop.push($),this._bgCleaner)this._bgCleaner();if(this.getConnectionsOpen()<this._poolMin&&this.bgWaiter)this.bgWaiter()}_shouldRetainInPool($){if(!$.isHealthy())return!1;if(this._maxLifetimeSession!==0){if(Date.now()-$._creationTime>this._maxLifetimeSession*1000)return!1}return!0}}KB1.exports=ZB1});var HB1=o(()=>{var gn6=eV0(),mn6=RV0(),un6=UB1(),pn6=Cx(),{ThinDbObjectImpl:dn6}=Gs(),bx=QI();bx.ConnectionImpl=gn6;bx.ResultSetImpl=mn6;bx.PoolImpl=un6;bx.LobImpl=pn6;bx.DbObjectImpl=dn6});var nA=o((aq5,LB1)=>{var __dirname="D:\\tbc_project\\tbc_backend_2.0.0\\node_modules\\oracledb\\lib",Z1=SY(),S6=GY(),m0=E4(),h6=kY(),VB1=QI(),YA0=L0("process"),cn6=L0("util"),$A0=YA0.version.substring(1).split(".").map(Number);m0.assert($A0[0]>14||$A0[0]===14&&$A0[1]>=17,m0.ERR_NODE_TOO_OLD,S6.PACKAGE_JSON_VERSION,"14.17");var ln6=pz0(),in6=cz0(),nn6=lz0(),ws=WI(),rn6=GV0(),an6=hz0(),sn6=fa(),on6=ZI(),AB1=DV0(),tn6=aL(),FB1=ZD1(),en6=NV0(),$r6=na(),X4=wZ(),Yr6=AV0(),Xr6=zV0(),Gr6=WV0(),Jr6=HI(),Qr6=UV0(),RI={},_s={},fx="default",XA0=[],js=new Map,hx,QB;function Wr6($){let X=typeof YA0<"u"&&YA0.versions?.node?typeof __webpack_require__==="function"?__non_webpack_require__:L0:void 0,G=["../"+S6.RELEASE_DIR+"/"+S6.BINARY_FILE,"../"+S6.RELEASE_DIR+"/"+S6.BUILD_FILE,"../build/Debug/"+S6.BUILD_FILE,"./node_modules/oracledb/"+S6.RELEASE_DIR+"/"+S6.BINARY_FILE,"./node_modules/oracledb/"+S6.RELEASE_DIR+"/"+S6.BUILD_FILE];if($.binaryDir!==void 0)G.splice(0,0,$.binaryDir+"/"+S6.BINARY_FILE,$.binaryDir+"/"+S6.BUILD_FILE);let J;for(let Q=0;Q<G.length;Q++)try{J=X(G[Q]);break}catch(W){if(W.code!=="MODULE_NOT_FOUND"||Q==G.length-1){let Z;if(W.code==="MODULE_NOT_FOUND")Z=`
  Looked for ${G.map((K)=>L0("path").resolve(__dirname,K)).join(", ")}
  ${S6.getInstallURL()}
`;else Z=`
  Node.js require('oracledb') error was:
  ${W.message}
  ${S6.getInstallHelp()}
`;m0.throwErr(m0.ERR_CANNOT_LOAD_BINARY,Z)}}return J}function DB1(){HB1()}async function NB1($,Y){let X={};if($=await Fr6($),$.user!==void 0)m0.assertParamPropValue(typeof $.user==="string",1,"user"),X.user=$.user;if($.username!==void 0)m0.assert(X.user===void 0,m0.ERR_DBL_USER),m0.assertParamPropValue(typeof $.username==="string",1,"username"),X.user=$.username;if($.password!==void 0)m0.assertParamPropValue(typeof $.password==="string",1,"password"),X.password=$.password;if($.connectString!==void 0)m0.assertParamPropValue(typeof $.connectString==="string",1,"connectString"),X.connectString=$.connectString;if($.connectionString!==void 0)m0.assert(X.connectString===void 0,m0.ERR_DBL_CONNECT_STRING),m0.assertParamPropValue(typeof $.connectionString==="string",1,"connectionString"),X.connectString=$.connectionString;if($.walletPassword!==void 0)m0.assertParamPropValue(typeof $.walletPassword==="string",1,"walletPassword"),X.walletPassword=$.walletPassword;if($.walletLocation!==void 0)m0.assertParamPropValue(typeof $.walletLocation==="string",1,"walletLocation"),X.walletLocation=$.walletLocation;if($.networkCompression!==void 0)m0.assertParamPropValue(typeof $.networkCompression==="boolean",1,"networkCompression"),X.networkCompression=$.networkCompression,X.networkCompressionLevels=[],X.networkCompressionLevels.push("high");if($.networkCompressionThreshold!==void 0)m0.assertParamPropValue(Number.isInteger($.networkCompressionThreshold),1,"networkCompressionThreshold"),X.networkCompressionThreshold=$.networkCompressionThreshold;if($.walletContent!==void 0)m0.assertParamPropValue(typeof $.walletContent==="string",1,"walletContent"),X.walletContent=$.walletContent;if($.edition!==void 0)m0.assertParamPropValue(typeof $.edition==="string",1,"edition"),X.edition=$.edition;if($.stmtCacheSize!==void 0)m0.assertParamPropValue(Number.isInteger($.stmtCacheSize)&&$.stmtCacheSize>=0,1,"stmtCacheSize"),X.stmtCacheSize=$.stmtCacheSize;if(X.externalAuth=X4.externalAuth,$.externalAuth!==void 0)m0.assertParamPropValue(typeof $.externalAuth==="boolean",1,"externalAuth"),X.externalAuth=$.externalAuth;if($.events!==void 0)m0.assertParamPropValue(typeof $.events==="boolean",1,"events"),X.events=$.events;if($.poolAlias!==void 0)m0.assertParamPropValue(typeof $.poolAlias==="string"&&$.poolAlias.length>0,1,"poolAlias"),X.poolAlias=$.poolAlias;if($.configDir!==void 0)m0.assertParamPropValue(typeof $.configDir==="string",1,"configDir"),X.configDir=$.configDir;if($.sslServerCertDN!==void 0)m0.assertParamPropValue(typeof $.sslServerCertDN==="string",1,"sslServerCertDN"),X.sslServerCertDN=$.sslServerCertDN;if($.sslServerDNMatch!==void 0)m0.assertParamPropValue(typeof $.sslServerDNMatch==="boolean",1,"sslServerDNMatch"),X.sslServerDNMatch=$.sslServerDNMatch;if($.sslAllowWeakDNMatch!==void 0)m0.assertParamPropValue(typeof $.sslAllowWeakDNMatch==="boolean",1,"sslAllowWeakDNMatch"),X.sslAllowWeakDNMatch=$.sslAllowWeakDNMatch;if($.httpsProxy!==void 0)m0.assertParamPropValue(typeof $.httpsProxy==="string",1,"httpsProxy"),X.httpsProxy=$.httpsProxy;if($.httpsProxyPort!==void 0)m0.assertParamPropValue(Number.isInteger($.httpsProxyPort)&&$.httpsProxyPort>=0,1,"httpsProxyPort"),X.httpsProxyPort=$.httpsProxyPort;if($.retryCount!==void 0)m0.assertParamPropValue(Number.isInteger($.retryCount)&&$.retryCount>=0,1,"retryCount"),X.retryCount=$.retryCount;if($.retryDelay!==void 0)m0.assertParamPropValue(Number.isInteger($.retryDelay)&&$.retryDelay>=0,1,"retryDelay"),X.retryDelay=$.retryDelay;if($.connectTimeout!==void 0)m0.assertParamPropValue(Number.isInteger($.connectTimeout)&&$.connectTimeout>=0,1,"connectTimeout"),X.connectTimeout=$.connectTimeout;if($.transportConnectTimeout!==void 0)m0.assertParamPropValue(Number.isInteger($.transportConnectTimeout)&&$.transportConnectTimeout>=0,1,"transportConnectTimeout"),X.transportConnectTimeout=$.transportConnectTimeout;if($.expireTime!==void 0)m0.assertParamPropValue(Number.isInteger($.expireTime)&&$.expireTime>=0,1,"expireTime"),X.expireTime=$.expireTime;if($.sdu!==void 0)m0.assertParamPropValue(Number.isInteger($.sdu)&&$.sdu>0,1,"sdu"),X.sdu=$.sdu;if($.connectionIdPrefix!==void 0)m0.assertParamPropValue(typeof $.connectionIdPrefix==="string",1,"connectionIdPrefix"),X.connectionIdPrefix=$.connectionIdPrefix;if($.privilege!==void 0)m0.assertParamPropValue(S6.isPrivilege($.privilege),1,"privilege"),X.privilege=$.privilege;if($.machine!==void 0)S6.assertParamPropNetworkName($,1,"machine"),X.machine=$.machine;if($.osUser!==void 0)S6.assertParamPropNetworkName($,1,"osUser"),X.osUser=$.osUser;if($.driverName!==void 0)m0.assertParamPropValue(typeof $.driverName==="string",1,"driverName"),X.driverName=$.driverName;if($.program!==void 0)S6.assertParamPropNetworkName($,1,"program"),X.program=$.program;if($.terminal!==void 0)m0.assertParamPropValue(typeof $.terminal==="string",1,"terminal"),X.terminal=$.terminal;if($.useSNI!==void 0)m0.assertParamPropValue(typeof $.useSNI==="boolean",1,"useSNI"),X.useSNI=$.useSNI;if($.appContext!==void 0){let G=$.appContext;m0.assertParamPropValue(S6.isAppContext(G),1,"appContext"),X.appContext=$.appContext}if(Y){if($.poolMax!==void 0)m0.assertParamPropValue(Number.isInteger($.poolMax)&&$.poolMax>0,1,"poolMax"),X.poolMax=$.poolMax;if($.poolMaxPerShard!==void 0)m0.assertParamPropValue(Number.isInteger($.poolMaxPerShard)&&$.poolMaxPerShard>=0,1,"poolMaxPerShard"),X.poolMaxPerShard=$.poolMaxPerShard;if($.poolMin!==void 0)m0.assertParamPropValue(Number.isInteger($.poolMin)&&$.poolMin>=0,1,"poolMin"),X.poolMin=$.poolMin;if($.poolIncrement!==void 0)m0.assertParamPropValue(Number.isInteger($.poolIncrement)&&$.poolIncrement>=0,1,"poolIncrement"),X.poolIncrement=$.poolIncrement;if($.poolTimeout!==void 0)m0.assertParamPropValue(Number.isInteger($.poolTimeout)&&$.poolTimeout>=0,1,"poolTimeout"),X.poolTimeout=$.poolTimeout;if($.poolPingInterval!==void 0)m0.assertParamPropValue(Number.isInteger($.poolPingInterval)&&$.poolPingInterval>=-2147483648&&$.poolPingInterval<=2147483647,1,"poolPingInterval"),X.poolPingInterval=$.poolPingInterval;if($.poolPingTimeout!==void 0)m0.assertParamPropValue(Number.isInteger($.poolPingTimeout)&&$.poolPingTimeout>=0,1,"poolPingTimeout"),X.poolPingTimeout=$.poolPingTimeout;if($.maxLifetimeSession!==void 0)m0.assertParamPropValue(Number.isInteger($.maxLifetimeSession)&&$.maxLifetimeSession>=0,1,"maxLifetimeSession"),X.maxLifetimeSession=$.maxLifetimeSession;if(X.homogeneous=!0,$.homogeneous!==void 0)m0.assertParamPropValue(typeof $.homogeneous==="boolean",1,"homogeneous"),X.homogeneous=$.homogeneous;if($.queueTimeout!==void 0)m0.assertParamPropValue(Number.isInteger($.queueTimeout)&&$.queueTimeout>=0,1,"queueTimeout"),X.queueTimeout=$.queueTimeout;if($.queueMax!==void 0)m0.assertParamPropValue(Number.isInteger($.queueMax),1,"queueMax"),X.queueMax=$.queueMax;if(X.sodaMetaDataCache=!1,$.sodaMetaDataCache!==void 0)m0.assertParamPropValue(typeof $.sodaMetaDataCache==="boolean",1,"sodaMetaDataCache"),X.sodaMetaDataCache=$.sodaMetaDataCache;if($.sessionCallback!==void 0)m0.assertParamPropValue(typeof $.sessionCallback==="string"||typeof $.sessionCallback==="function",1,"sessionCallback"),X.sessionCallback=$.sessionCallback;if(X.enableStatistics=!1,$.enableStatistics!==void 0)m0.assertParamPropValue(typeof $.enableStatistics==="boolean",1,"enableStatistics"),X.enableStatistics=$.enableStatistics;if(!X.enableStatistics&&$._enableStats!==void 0)m0.assertParamPropValue(typeof $._enableStats==="boolean",1,"_enableStats"),X.enableStatistics=$._enableStats}else{if($.newPassword!==void 0)m0.assertParamPropValue(typeof $.newPassword==="string",1,"newPassword"),X.newPassword=$.newPassword;if($.shardingKey!==void 0){let G=$.shardingKey;m0.assertParamPropValue(S6.isShardingKey(G),1,"shardingKey"),X.shardingKey=$.shardingKey}if($.superShardingKey!==void 0){let G=$.superShardingKey;m0.assertParamPropValue(S6.isShardingKey(G),1,"superShardingKey"),X.superShardingKey=$.superShardingKey}}if($.accessToken!==void 0){if(m0.assert(X.user===void 0&&X.password===void 0,m0.ERR_TOKEN_BASED_AUTH),Y)m0.assert(X.homogeneous&&X.externalAuth,m0.ERR_POOL_TOKEN_BASED_AUTH);else m0.assert(X.externalAuth,m0.ERR_CONN_TOKEN_BASED_AUTH);let G;if(typeof $.accessToken==="function"){X.accessTokenFn=$.accessToken,X.accessTokenConfig=$.accessTokenConfig;try{if(G=await $.accessToken(!1,X.accessTokenConfig),!S6.isTokenValid(G))G=await $.accessToken(!0,X.accessTokenConfig)}catch(J){m0.throwWrapErr(J,m0.ERR_ACCESS_TOKEN)}}else G=$.accessToken;if(m0.assert(S6.isTokenValid(G),m0.ERR_TOKEN_HAS_EXPIRED),G.privateKey!==void 0)m0.assert(typeof G.privateKey==="string",m0.ERR_TOKEN_BASED_AUTH),G.privateKey=S6.denormalizePrivateKey(G.privateKey);if(typeof G==="string")X.token=G;else X.token=G.token,X.privateKey=G.privateKey}if(X.token===void 0&&X.externalAuth){if(X.password)m0.throwErr(m0.ERR_WRONG_CRED_FOR_EXTAUTH);if(X.user){if(Y&&!X4.thin)m0.throwErr(m0.ERR_WRONG_CRED_FOR_EXTAUTH);else if(X.user[0]!=="["||X.user.slice(-1)!=="]")m0.throwErr(m0.ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY)}}return X}async function Zr6($){let Y;m0.assertArgCount(arguments,1,1),m0.assertParamValue(S6.isObject($),1);for(let J of XA0)try{await J($)}catch(Q){m0.throwWrapErr(Q,m0.ERR_CALLOUT_FN)}$=await NB1($,!0);let X=$.sessionCallback;if(typeof X==="function")delete $.sessionCallback;if($.poolAlias!==void 0)Y=$.poolAlias;else if($.poolAlias===void 0&&!RI[fx]&&!_s[fx])Y=fx;if(RI[Y]||_s[Y])m0.throwErr(m0.ERR_POOL_WITH_ALIAS_ALREADY_EXISTS,Y);if(X4.addToOptions($,"connectionClass","driverName","edition","events","externalAuth","machine","osUser","stmtCacheSize","poolMax","poolMaxPerShard","poolMin","poolIncrement","poolTimeout","poolPingInterval","poolPingTimeout","program","terminal","queueMax","queueTimeout"),$.poolMin>$.poolMax)m0.throwErr(m0.ERR_INVALID_NUMBER_OF_CONNECTIONS,$.poolMax,$.poolMin);if(QB===void 0&&!X4.thinDriverInitialized)DB1();if(Y)_s[Y]=!0;let G=new FB1;G._impl._connectString=$.connectString,G._impl._user=$.user;try{await G._impl.create($)}finally{if(Y)delete _s[Y]}if(Y)RI[Y]=G;if(G._setup($,Y),G._sessionCallback=X,G.on("_afterPoolClose",()=>{if(G.poolAlias)delete RI[G.poolAlias]}),QB===void 0)X4.thinDriverInitialized=!0;return G}async function Kr6($){let{NLParamParser:Y,tnsnamesFilePath:X}=pV0(),G=new Y,J=X($);return[...(await G.initializeNlpa(J)).keys()]}async function Ur6($){let Y={},X;if(m0.assertArgCount(arguments,0,1),arguments.length==0)X=fx;else if(typeof $==="string")X=$;else Y=$,m0.assertParamValue(S6.isObject(Y),1),X=Y.poolAlias;if(X){let J=RI[X];return m0.assert(J,m0.ERR_POOL_WITH_ALIAS_NOT_FOUND,X),await J.getConnection(Y)}for(let J of XA0)try{await J(Y)}catch(Q){m0.throwWrapErr(Q,m0.ERR_CALLOUT_FN)}if(Y=await NB1(Y,!1),X4.addToOptions(Y,"connectionClass","driverName","edition","events","externalAuth","machine","osUser","program","stmtCacheSize","terminal"),QB===void 0&&!X4.thinDriverInitialized)DB1();let G=new AB1;if(G._impl=new VB1.ConnectionImpl,G._impl._connectString=Y.connectString,G._impl._user=Y.user,await G._impl.connect(Y),QB===void 0)X4.thinDriverInitialized=!0;return G}function Hr6($){if(m0.assertArgCount(arguments,0,1),$)m0.assertParamValue(typeof $==="string"||typeof $==="number",1);$=$||fx;let Y=RI[$];if(!Y)m0.throwErr(m0.ERR_POOL_WITH_ALIAS_NOT_FOUND,$);return Y}function zr6($){let Y={};if(m0.assertArgCount(arguments,0,1),$!==void 0)m0.assertParamValue(S6.isObject($),1),Y={...$},m0.assertParamPropString(Y,1,"libDir"),m0.assertParamPropString(Y,1,"configDir"),m0.assertParamPropString(Y,1,"errorUrl"),m0.assertParamPropString(Y,1,"driverName"),m0.assertParamPropString(Y,1,"binaryDir");if(X4.thinDriverInitialized)m0.throwErr(m0.ERR_THIN_CONNECTION_ALREADY_CREATED);if(QB===void 0){let X=Wr6(Y);if(Y.driverName===void 0)Y.driverName=Z1.DEFAULT_DRIVER_NAME+" thk";if(Y.errorUrl===void 0)Y.errorUrl=Z1.DEFAULT_ERROR_URL;try{X.initOracleClient(Y,VB1,X4)}catch(G){let J=m0.transformErr(G);if(J.code==="DPI-1047")J.message+=`
`+S6.getInstallHelp();throw J}QB=$||{}}else if(!cn6.isDeepStrictEqual(QB,Y))m0.throwErr(m0.ERR_INIT_ORACLE_CLIENT_ARGS);X4.thin=!1}async function Vr6($,Y){let X={},G=Z1.SHUTDOWN_MODE_DEFAULT;if(m0.assertArgCount(arguments,0,2),arguments.length==2)m0.assertParamValue(typeof $==="object",1),m0.assertParamValue(typeof Y==="number",2),X=$,G=Y;else if(arguments.length==1)m0.assertParamValue(typeof $==="object",1),X=$;let J={user:X.user,password:X.password,connectString:X.connectString,connectionString:X.connectionString,externalAuth:X.externalAuth,privilege:Z1.SYSOPER},Q=await this.getConnection(J);if(await Q.shutdown(G),G!=this.SHUTDOWN_MODE_ABORT)await Q.execute("ALTER DATABASE CLOSE"),await Q.execute("ALTER DATABASE DISMOUNT"),await Q.shutdown(this.SHUTDOWN_MODE_FINAL);await Q.close()}async function Ar6($,Y,X){let G={},J="njs",Q=$.njs;for(let W in Q){let Z=Q[W];G[W]=Z}if(G.connectString=$.connect_descriptor,G.configTTL=$.config_time_to_live,!G.connectString)m0.throwErr(m0.ERR_CONFIG_PROVIDER_FAILED_TO_RETRIEVE_CONFIG,"connect_descriptor must be set");if(G.user=$.user,$.password)G.password=await zB1($.password,Y,X);if($.wallet_location){if(G.walletContent=await zB1($.wallet_location,Y,X),!S6.isPemFile(G.walletContent))m0.throwErr(m0.ERR_WALLET_TYPE_NOT_SUPPORTED)}return G}async function zB1($,Y,X){let G=new Map,J=$.authentication;if(J)for(let W in J){if(W=="method")G.set("authentication",J[W]);let Z=J[W];G.set(W.toLowerCase(),Z)}let Q={};if($.type=="base64")return console.log("WARNING: Base64 Encoding in a JSON Password should only be used in development environments"),Buffer.from($.value,"base64").toString("utf-8");else if($.type=="text")if(X=="azurevault"||X=="ocivault")return console.log("WARNING: Plain Text in a JSON Password should only be used in development environments"),$.value;else m0.throwErr(m0.ERR_CONFIG_PROVIDER_PARAM_TYPE,"password type text is only allowed in ocivault and azurevault");else if($.type=="azurevault"){if(G.set("azuresecreturl",$.value),!(X=="azure"||X=="azurevault"))Y=null;let W=js.azurevault;if(W==null)m0.throwErr(m0.ERR_REGISTER_HOOKFN_CONFIGPROVIDER,"azurevault");return Q.credential=Y,Q.paramMap=G,(await W(Q))[0]}else if($.type=="ocivault"){if(G.set("ocidvault",$.value),!(X=="ociobject"||X=="ocivault"))Y=null;let W=js.ocivault;if(W==null)m0.throwErr(m0.ERR_REGISTER_HOOKFN_CONFIGPROVIDER,"ocivault");let Z={};return Z.credential=Y,Z.paramMap=G,(await W(Z))[0]}else m0.throwErr(m0.ERR_CONFIG_PROVIDER_PARAM_TYPE,"password/wallet_location")}async function Fr6($){let Y=X4.configProviderCacheTimeout*1000,X,G,J=$.connectString||$.connectionString;if(!J)return $;if(hx&&(G=hx.get(J))){let Q=G.cacheOpts;if(Q.configTTL)Y=Q.configTTL*1000;if(Date.now()-G.timeAdded<Y){if(X={...Q},X.password)X.password=ws.getDeobfuscatedValue(X.password.value,X.password.obfuscatedValue);if(X.walletContent)X.walletContent=ws.getDeobfuscatedValue(X.walletContent.value,X.walletContent.obfuscatedValue)}}if(!X){let Q=J,W,Z=new RegExp("^config-(?<provider>[A-Za-z0-9]+)(://)(?<provider_arg>[^?]+)");if(J.indexOf("?")!=-1)Q=J.substring(0,J.indexOf("?")),W=J.substring(J.indexOf("?"),J.length);let K=Q.match(Z);if(K){let H=K.groups.provider,z=K.groups.provider_arg,V=js[H];if(V==null)m0.throwErr(m0.ERR_REGISTER_HOOKFN_CONFIGPROVIDER,H);let A={};A.provider_arg=z,A.urlExtendedPart=W;try{let F=await V(A);if(X=F[0],!hx)hx=new Map;if(!X)m0.throwErr(m0.ERR_CONFIG_PROVIDER_FAILED_TO_RETRIEVE_CONFIG,"no configuration found in "+H);if(H!="azure")X=await Ar6(X,F[1],H);let N={...X};if(X.password)N.password=ws.setObfuscatedValue(X.password);if(X.walletContent)N.walletContent=ws.setObfuscatedValue(X.walletContent);hx.set(J,{cacheOpts:N,timeAdded:Date.now()})}catch(F){m0.throwErr(m0.ERR_CONFIG_PROVIDER_FAILED_TO_RETRIEVE_CONFIG,F.message)}}}if(X)$=Dr6(X,$);return $}function Dr6($,Y){if(Y={...Y},!Y.user)Y.user=$.user;if(!Y.password)Y.password=$.password;if($.connectString)Y.connectString=$.connectString,Y.connectionString=void 0;if($.walletContent)Y.walletContent=$.walletContent;if($.poolMin)Y.poolMin=$.poolMin;if($.poolMax)Y.poolMax=$.poolMax;if($.poolIncrement)Y.poolIncrement=$.poolIncrement;if($.poolTimeout)Y.poolTimeout=$.poolTimeout;if($.poolPingInterval)Y.poolPingInterval=$.poolPingInterval;if($.poolPingTimeout)Y.poolPingTimeout=$.poolPingTimeout;if($.stmtCacheSize)Y.stmtCacheSize=$.stmtCacheSize;if($.prefetchRows)Y.prefetchRows=$.prefetchRows;if($.lobPrefetch)Y.lobPrefetch=$.lobPrefetch;return Y}async function Nr6($,Y){let X={},G={};if(m0.assertArgCount(arguments,0,2),arguments.length==2)m0.assertParamValue(typeof $==="object",1),m0.assertParamValue(typeof Y==="object",2),X=$,G=Y;else if(arguments.length==1)m0.assertParamValue(typeof $==="object",1),X=$;let J={user:X.user,password:X.password,connectString:X.connectString,connectionString:X.connectionString,externalAuth:X.externalAuth,privilege:this.SYSOPER|this.SYSPRELIM},Q=await this.getConnection(J);await Q.startup(G),await Q.close(),J.privilege=this.SYSOPER,Q=await this.getConnection(J),await Q.execute("ALTER DATABASE MOUNT"),await Q.execute("ALTER DATABASE OPEN"),await Q.close()}function Lr6($){m0.assertArgCount(arguments,1,1),m0.assertParamValue(typeof $==="function",1),XA0.push($)}function Br6($,Y){m0.assertArgCount(arguments,2,2),m0.assertParamValue(typeof Y==="function",1),m0.assertParamValue(typeof $==="string",1),js[$]=Y}LB1.exports={AqDeqOptions:ln6,AqEnqOptions:in6,AqMessage:nn6,AqQueue:rn6,BaseDbObject:on6,Connection:AB1,JsonId:h6.JsonId,Lob:tn6,Pool:FB1,PoolStatistics:en6,ResultSet:$r6,SodaDatabase:Yr6,SodaCollection:Xr6,SodaDocCursor:Gr6,SodaDocument:Jr6,SodaOperation:Qr6,SparseVector:h6.SparseVector,IntervalYM:h6.IntervalYM,IntervalDS:h6.IntervalDS,getConnection:S6.callbackify(S6.wrapFn(Ur6)),createPool:S6.callbackify(S6.wrapFn(Zr6)),getNetworkServiceNames:S6.callbackify(S6.wrapFn(Kr6)),getPool:Hr6,initOracleClient:zr6,registerProcessConfigurationHook:Lr6,registerConfigurationProviderHook:Br6,shutdown:S6.callbackify(S6.wrapFn(Vr6)),startup:S6.callbackify(S6.wrapFn(Nr6)),CQN_OPCODE_ALL_OPS:Z1.CQN_OPCODE_ALL_OPS,CQN_OPCODE_ALL_ROWS:Z1.CQN_OPCODE_ALL_ROWS,CQN_OPCODE_ALTER:Z1.CQN_OPCODE_ALTER,CQN_OPCODE_DELETE:Z1.CQN_OPCODE_DELETE,CQN_OPCODE_DROP:Z1.CQN_OPCODE_DROP,CQN_OPCODE_INSERT:Z1.CQN_OPCODE_INSERT,CQN_OPCODE_UPDATE:Z1.CQN_OPCODE_UPDATE,DB_TYPE_BFILE:h6.DB_TYPE_BFILE,DB_TYPE_BINARY_DOUBLE:h6.DB_TYPE_BINARY_DOUBLE,DB_TYPE_BINARY_FLOAT:h6.DB_TYPE_BINARY_FLOAT,DB_TYPE_BINARY_INTEGER:h6.DB_TYPE_BINARY_INTEGER,DB_TYPE_BLOB:h6.DB_TYPE_BLOB,DB_TYPE_BOOLEAN:h6.DB_TYPE_BOOLEAN,DB_TYPE_CHAR:h6.DB_TYPE_CHAR,DB_TYPE_CLOB:h6.DB_TYPE_CLOB,DB_TYPE_CURSOR:h6.DB_TYPE_CURSOR,DB_TYPE_DATE:h6.DB_TYPE_DATE,DB_TYPE_INTERVAL_DS:h6.DB_TYPE_INTERVAL_DS,DB_TYPE_INTERVAL_YM:h6.DB_TYPE_INTERVAL_YM,DB_TYPE_JSON:h6.DB_TYPE_JSON,DB_TYPE_LONG:h6.DB_TYPE_LONG,DB_TYPE_LONG_NVARCHAR:h6.DB_TYPE_LONG_NVARCHAR,DB_TYPE_LONG_RAW:h6.DB_TYPE_LONG_RAW,DB_TYPE_NCHAR:h6.DB_TYPE_NCHAR,DB_TYPE_NCLOB:h6.DB_TYPE_NCLOB,DB_TYPE_NUMBER:h6.DB_TYPE_NUMBER,DB_TYPE_NVARCHAR:h6.DB_TYPE_NVARCHAR,DB_TYPE_OBJECT:h6.DB_TYPE_OBJECT,DB_TYPE_RAW:h6.DB_TYPE_RAW,DB_TYPE_ROWID:h6.DB_TYPE_ROWID,DB_TYPE_TIMESTAMP:h6.DB_TYPE_TIMESTAMP,DB_TYPE_TIMESTAMP_LTZ:h6.DB_TYPE_TIMESTAMP_LTZ,DB_TYPE_TIMESTAMP_TZ:h6.DB_TYPE_TIMESTAMP_TZ,DB_TYPE_VARCHAR:h6.DB_TYPE_VARCHAR,DB_TYPE_XMLTYPE:h6.DB_TYPE_XMLTYPE,DB_TYPE_VECTOR:h6.DB_TYPE_VECTOR,DEFAULT:Z1.DEFAULT,STMT_TYPE_UNKNOWN:Z1.STMT_TYPE_UNKNOWN,STMT_TYPE_SELECT:Z1.STMT_TYPE_SELECT,STMT_TYPE_UPDATE:Z1.STMT_TYPE_UPDATE,STMT_TYPE_DELETE:Z1.STMT_TYPE_DELETE,STMT_TYPE_INSERT:Z1.STMT_TYPE_INSERT,STMT_TYPE_CREATE:Z1.STMT_TYPE_CREATE,STMT_TYPE_DROP:Z1.STMT_TYPE_DROP,STMT_TYPE_ALTER:Z1.STMT_TYPE_ALTER,STMT_TYPE_BEGIN:Z1.STMT_TYPE_BEGIN,STMT_TYPE_DECLARE:Z1.STMT_TYPE_DECLARE,STMT_TYPE_CALL:Z1.STMT_TYPE_CALL,STMT_TYPE_EXPLAIN_PLAN:Z1.STMT_TYPE_EXPLAIN_PLAN,STMT_TYPE_MERGE:Z1.STMT_TYPE_MERGE,STMT_TYPE_ROLLBACK:Z1.STMT_TYPE_ROLLBACK,STMT_TYPE_COMMIT:Z1.STMT_TYPE_COMMIT,SHUTDOWN_MODE_DEFAULT:Z1.SHUTDOWN_MODE_DEFAULT,SHUTDOWN_MODE_TRANSACTIONAL:Z1.SHUTDOWN_MODE_TRANSACTIONAL,SHUTDOWN_MODE_TRANSACTIONAL_LOCAL:Z1.SHUTDOWN_MODE_TRANSACTIONAL_LOCAL,SHUTDOWN_MODE_IMMEDIATE:Z1.SHUTDOWN_MODE_IMMEDIATE,SHUTDOWN_MODE_ABORT:Z1.SHUTDOWN_MODE_ABORT,SHUTDOWN_MODE_FINAL:Z1.SHUTDOWN_MODE_FINAL,STARTUP_MODE_DEFAULT:Z1.STARTUP_MODE_DEFAULT,STARTUP_MODE_FORCE:Z1.STARTUP_MODE_FORCE,STARTUP_MODE_RESTRICT:Z1.STARTUP_MODE_RESTRICT,SUBSCR_EVENT_TYPE_SHUTDOWN:Z1.SUBSCR_EVENT_TYPE_SHUTDOWN,SUBSCR_EVENT_TYPE_SHUTDOWN_ANY:Z1.SUBSCR_EVENT_TYPE_SHUTDOWN_ANY,SUBSCR_EVENT_TYPE_STARTUP:Z1.SUBSCR_EVENT_TYPE_STARTUP,SUBSCR_EVENT_TYPE_DEREG:Z1.SUBSCR_EVENT_TYPE_DEREG,SUBSCR_EVENT_TYPE_OBJ_CHANGE:Z1.SUBSCR_EVENT_TYPE_OBJ_CHANGE,SUBSCR_EVENT_TYPE_QUERY_CHANGE:Z1.SUBSCR_EVENT_TYPE_QUERY_CHANGE,SUBSCR_EVENT_TYPE_AQ:Z1.SUBSCR_EVENT_TYPE_AQ,SUBSCR_GROUPING_CLASS_TIME:Z1.SUBSCR_GROUPING_CLASS_TIME,SUBSCR_GROUPING_TYPE_SUMMARY:Z1.SUBSCR_GROUPING_TYPE_SUMMARY,SUBSCR_GROUPING_TYPE_LAST:Z1.SUBSCR_GROUPING_TYPE_LAST,SUBSCR_NAMESPACE_AQ:Z1.SUBSCR_NAMESPACE_AQ,SUBSCR_NAMESPACE_DBCHANGE:Z1.SUBSCR_NAMESPACE_DBCHANGE,SUBSCR_QOS_BEST_EFFORT:Z1.SUBSCR_QOS_BEST_EFFORT,SUBSCR_QOS_DEREG_NFY:Z1.SUBSCR_QOS_DEREG_NFY,SUBSCR_QOS_QUERY:Z1.SUBSCR_QOS_QUERY,SUBSCR_QOS_RELIABLE:Z1.SUBSCR_QOS_RELIABLE,SUBSCR_QOS_ROWIDS:Z1.SUBSCR_QOS_ROWIDS,SYSASM:Z1.SYSASM,SYSBACKUP:Z1.SYSBACKUP,SYSDBA:Z1.SYSDBA,SYSDG:Z1.SYSDG,SYSKM:Z1.SYSKM,SYSOPER:Z1.SYSOPER,SYSPRELIM:Z1.SYSPRELIM,SYSRAC:Z1.SYSRAC,BIND_IN:Z1.BIND_IN,BIND_INOUT:Z1.BIND_INOUT,BIND_OUT:Z1.BIND_OUT,OUT_FORMAT_ARRAY:Z1.OUT_FORMAT_ARRAY,OUT_FORMAT_OBJECT:Z1.OUT_FORMAT_OBJECT,SODA_COLL_MAP_MODE:Z1.SODA_COLL_MAP_MODE,POOL_STATUS_OPEN:Z1.POOL_STATUS_OPEN,POOL_STATUS_DRAINING:Z1.POOL_STATUS_DRAINING,POOL_STATUS_CLOSED:Z1.POOL_STATUS_CLOSED,POOL_STATUS_RECONFIGURING:Z1.POOL_STATUS_RECONFIGURING,AQ_DEQ_NO_WAIT:Z1.AQ_DEQ_NO_WAIT,AQ_DEQ_WAIT_FOREVER:Z1.AQ_DEQ_WAIT_FOREVER,AQ_DEQ_MODE_BROWSE:Z1.AQ_DEQ_MODE_BROWSE,AQ_DEQ_MODE_LOCKED:Z1.AQ_DEQ_MODE_LOCKED,AQ_DEQ_MODE_REMOVE:Z1.AQ_DEQ_MODE_REMOVE,AQ_DEQ_MODE_REMOVE_NO_DATA:Z1.AQ_DEQ_MODE_REMOVE_NO_DATA,AQ_DEQ_NAV_FIRST_MSG:Z1.AQ_DEQ_NAV_FIRST_MSG,AQ_DEQ_NAV_NEXT_TRANSACTION:Z1.AQ_DEQ_NAV_NEXT_TRANSACTION,AQ_DEQ_NAV_NEXT_MSG:Z1.AQ_DEQ_NAV_NEXT_MSG,AQ_MSG_DELIV_MODE_PERSISTENT:Z1.AQ_MSG_DELIV_MODE_PERSISTENT,AQ_MSG_DELIV_MODE_BUFFERED:Z1.AQ_MSG_DELIV_MODE_BUFFERED,AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED:Z1.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,AQ_MSG_STATE_READY:Z1.AQ_MSG_STATE_READY,AQ_MSG_STATE_WAITING:Z1.AQ_MSG_STATE_WAITING,AQ_MSG_STATE_PROCESSED:Z1.AQ_MSG_STATE_PROCESSED,AQ_MSG_STATE_EXPIRED:Z1.AQ_MSG_STATE_EXPIRED,AQ_VISIBILITY_IMMEDIATE:Z1.AQ_VISIBILITY_IMMEDIATE,AQ_VISIBILITY_ON_COMMIT:Z1.AQ_VISIBILITY_ON_COMMIT,TPC_BEGIN_JOIN:Z1.TPC_BEGIN_JOIN,TPC_BEGIN_NEW:Z1.TPC_BEGIN_NEW,TPC_BEGIN_PROMOTE:Z1.TPC_BEGIN_PROMOTE,TPC_BEGIN_RESUME:Z1.TPC_BEGIN_RESUME,TPC_END_NORMAL:Z1.TPC_END_NORMAL,TPC_END_SUSPEND:Z1.TPC_END_SUSPEND,VECTOR_FORMAT_FLOAT32:Z1.VECTOR_FORMAT_FLOAT32,VECTOR_FORMAT_FLOAT64:Z1.VECTOR_FORMAT_FLOAT64,VECTOR_FORMAT_INT8:Z1.VECTOR_FORMAT_INT8,VECTOR_FORMAT_BINARY:Z1.VECTOR_FORMAT_BINARY,BLOB:h6.DB_TYPE_BLOB,BUFFER:h6.DB_TYPE_RAW,CLOB:h6.DB_TYPE_CLOB,CURSOR:h6.DB_TYPE_CURSOR,DATE:h6.DB_TYPE_TIMESTAMP,NCLOB:h6.DB_TYPE_NCLOB,NUMBER:h6.DB_TYPE_NUMBER,STRING:h6.DB_TYPE_VARCHAR,ARRAY:Z1.OUT_FORMAT_ARRAY,OBJECT:Z1.OUT_FORMAT_OBJECT,traceHandler:sn6,future:an6,get autoCommit(){return X4.autoCommit},get connectionClass(){return X4.connectionClass},get dbObjectAsPojo(){return X4.dbObjectAsPojo},get edition(){return X4.edition},get errorOnConcurrentExecute(){return X4.errorOnConcurrentExecute},get events(){return X4.events},get externalAuth(){return X4.externalAuth},get fetchArraySize(){return X4.fetchArraySize},get fetchAsBuffer(){return X4.fetchAsBuffer},get fetchAsString(){return X4.fetchAsString},get fetchTypeHandler(){return X4.fetchTypeHandler},get dbObjectTypeHandler(){return X4.dbObjectTypeHandler},get lobPrefetchSize(){return X4.lobPrefetchSize},get maxRows(){return X4.maxRows},get oracleClientVersion(){return X4.oracleClientVersion},get oracleClientVersionString(){return X4.oracleClientVersionString},get outFormat(){return X4.outFormat},get poolIncrement(){return X4.poolIncrement},get poolMax(){return X4.poolMax},get poolMaxPerShard(){return X4.poolMaxPerShard},get poolMin(){return X4.poolMin},get poolPingInterval(){return X4.poolPingInterval},get poolPingTimeout(){return X4.poolPingTimeout},get poolTimeout(){return X4.poolTimeout},get prefetchRows(){return X4.prefetchRows},get stmtCacheSize(){return X4.stmtCacheSize},get configProviderCacheTimeout(){return X4.configProviderCacheTimeout},get thin(){return X4.thin},get version(){return Z1.VERSION_MAJOR*1e4+Z1.VERSION_MINOR*100+Z1.VERSION_PATCH},get versionString(){return Z1.VERSION_STRING},get versionSuffix(){return Z1.VERSION_SUFFIX},set autoCommit($){m0.assertPropValue(typeof $==="boolean","autoCommit"),X4.autoCommit=$},set connectionClass($){m0.assertPropValue(typeof $==="string","connectionClass"),X4.connectionClass=$},set dbObjectAsPojo($){m0.assertPropValue(typeof $==="boolean","dbObjectAsPojo"),X4.dbObjectAsPojo=$},set driverName($){m0.assertPropValue(typeof $==="string","driverName"),X4.driverName=$},set edition($){m0.assertPropValue(typeof $==="string","edition"),X4.edition=$},set errorOnConcurrentExecute($){m0.assertPropValue(typeof $==="boolean","errorOnConcurrentExecute"),X4.errorOnConcurrentExecute=$},set events($){m0.assertPropValue(typeof $==="boolean","events"),X4.events=$},set externalAuth($){m0.assertPropValue(typeof $==="boolean","externalAuth"),X4.externalAuth=$},set fetchArraySize($){m0.assertPropValue(Number.isInteger($)&&$>0,"fetchArraySize"),X4.fetchArraySize=$},set fetchAsBuffer($){m0.assertPropValue(Array.isArray($),"fetchAsBuffer"),X4.createFetchTypeMap(X4.fetchAsString,$),X4.fetchAsBuffer=$},set fetchAsString($){m0.assertPropValue(Array.isArray($),"fetchAsString"),X4.createFetchTypeMap($,X4.fetchAsBuffer),X4.fetchAsString=$},set fetchTypeHandler($){if($!==void 0)m0.assertPropValue(typeof $==="function","fetchTypeHandler");X4.fetchTypeHandler=$},set dbObjectTypeHandler($){if($!==void 0)m0.assertPropValue(typeof $==="function","dbObjectTypeHandler");X4.dbObjectTypeHandler=$},set lobPrefetchSize($){m0.assertPropValue(Number.isInteger($)&&$>=0,"lobPrefetchSize"),X4.lobPrefetchSize=$},set machine($){m0.assertPropValue(typeof $==="string","machine");let Y=S6.sanitize($);m0.assertPropValue($==Y,"machine"),X4.machine=$},set maxRows($){m0.assertPropValue(Number.isInteger($)&&$>=0,"maxRows"),X4.maxRows=$},set osUser($){m0.assertPropValue(typeof $==="string","osUser");let Y=S6.sanitize($);m0.assertPropValue($==Y,"osUser"),X4.osUser=$},set outFormat($){if($!==Z1.OUT_FORMAT_ARRAY&&$!==Z1.OUT_FORMAT_OBJECT)m0.throwErr(m0.ERR_INVALID_PROPERTY_VALUE,"outFormat");X4.outFormat=$},set poolIncrement($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolIncrement"),X4.poolIncrement=$},set poolMax($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolMax"),X4.poolMax=$},set poolMaxPerShard($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolMaxPerShard"),X4.poolMaxPerShard=$},set poolMin($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolMin"),X4.poolMin=$},set poolPingInterval($){m0.assertPropValue(Number.isInteger($)&&$<2147483648&&$>=-2147483648,"poolPingInterval"),X4.poolPingInterval=$},set poolPingTimeout($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolPingTimeout"),X4.poolPingTimeout=$},set poolTimeout($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolTimeout"),X4.poolTimeout=$},set prefetchRows($){m0.assertPropValue(Number.isInteger($)&&$>=0,"prefetchRows"),X4.prefetchRows=$},set program($){m0.assertPropValue(typeof $==="string","program");let Y=S6.sanitize($);m0.assertPropValue($==Y,"program"),X4.program=$},set stmtCacheSize($){m0.assertPropValue(Number.isInteger($)&&$>=0,"stmtCacheSize"),X4.stmtCacheSize=$},set terminal($){m0.assertPropValue(typeof $==="string","terminal"),X4.terminal=$},set configProviderCacheTimeout($){m0.assertPropValue(Number.isInteger($)&&$>=0,"configProviderCacheTimeout"),X4.configProviderCacheTimeout=$}}});var pO1=o((Q_5,uO1)=>{var mO1=L0("stream").Stream,$s6=L0("util");uO1.exports=o2;function o2(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}$s6.inherits(o2,mO1);o2.create=function($,Y){var X=new this;Y=Y||{};for(var G in Y)X[G]=Y[G];X.source=$;var J=$.emit;if($.emit=function(){return X._handleEmit(arguments),J.apply($,arguments)},$.on("error",function(){}),X.pauseStream)$.pause();return X};Object.defineProperty(o2.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});o2.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};o2.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};o2.prototype.pause=function(){this.source.pause()};o2.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function($){this.emit.apply(this,$)}.bind(this)),this._bufferedEvents=[]};o2.prototype.pipe=function(){var $=mO1.prototype.pipe.apply(this,arguments);return this.resume(),$};o2.prototype._handleEmit=function($){if(this._released){this.emit.apply(this,$);return}if($[0]==="data")this.dataSize+=$[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push($)};o2.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var $="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error($))}});var iO1=o((W_5,lO1)=>{var Ys6=L0("util"),cO1=L0("stream").Stream,dO1=pO1();lO1.exports=e7;function e7(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Ys6.inherits(e7,cO1);e7.create=function($){var Y=new this;$=$||{};for(var X in $)Y[X]=$[X];return Y};e7.isStreamLike=function($){return typeof $!=="function"&&typeof $!=="string"&&typeof $!=="boolean"&&typeof $!=="number"&&!Buffer.isBuffer($)};e7.prototype.append=function($){var Y=e7.isStreamLike($);if(Y){if(!($ instanceof dO1)){var X=dO1.create($,{maxDataSize:1/0,pauseStream:this.pauseStreams});$.on("data",this._checkDataSize.bind(this)),$=X}if(this._handleErrors($),this.pauseStreams)$.pause()}return this._streams.push($),this};e7.prototype.pipe=function($,Y){return cO1.prototype.pipe.call(this,$,Y),this.resume(),$};e7.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};e7.prototype._realGetNext=function(){var $=this._streams.shift();if(typeof $>"u"){this.end();return}if(typeof $!=="function"){this._pipeNext($);return}var Y=$;Y(function(X){var G=e7.isStreamLike(X);if(G)X.on("data",this._checkDataSize.bind(this)),this._handleErrors(X);this._pipeNext(X)}.bind(this))};e7.prototype._pipeNext=function($){this._currentStream=$;var Y=e7.isStreamLike($);if(Y){$.on("end",this._getNext.bind(this)),$.pipe(this,{end:!1});return}var X=$;this.write(X),this._getNext()};e7.prototype._handleErrors=function($){var Y=this;$.on("error",function(X){Y._emitError(X)})};e7.prototype.write=function($){this.emit("data",$)};e7.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};e7.prototype.resume=function(){if(!this._released)this._released=!0,this.writable=!0,this._getNext();if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};e7.prototype.end=function(){this._reset(),this.emit("end")};e7.prototype.destroy=function(){this._reset(),this.emit("close")};e7.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};e7.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var $="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error($))};e7.prototype._updateDataSize=function(){this.dataSize=0;var $=this;if(this._streams.forEach(function(Y){if(!Y.dataSize)return;$.dataSize+=Y.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};e7.prototype._emitError=function($){this._reset(),this.emit("error",$)}});var nO1=o((Z_5,Xs6)=>{Xs6.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana"},"application/3gpp-ims+xml":{source:"iana"},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana"},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",extensions:["atomsvc"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana"},"application/bacnet-xdd+zip":{source:"iana"},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana"},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana"},"application/ccxml+xml":{source:"iana",extensions:["ccxml"]},"application/cdfx+xml":{source:"iana"},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana"},"application/cellml+xml":{source:"iana"},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana"},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana"},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana"},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana"},"application/cstadata+xml":{source:"iana"},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana"},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana"},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/docbook+xml":{source:"apache",extensions:["dbk"]},"application/dskpp+xml":{source:"iana"},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana"},"application/emergencycalldata.control+xml":{source:"iana"},"application/emergencycalldata.deviceinfo+xml":{source:"iana"},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana"},"application/emergencycalldata.serviceinfo+xml":{source:"iana"},"application/emergencycalldata.subscriberinfo+xml":{source:"iana"},"application/emergencycalldata.veds+xml":{source:"iana"},"application/emma+xml":{source:"iana",extensions:["emma"]},"application/emotionml+xml":{source:"iana"},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana"},"application/epub+zip":{source:"iana",extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana"},"application/fhir+xml":{source:"iana"},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1,extensions:["woff"]},"application/framework-attributes+xml":{source:"iana"},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geoxacml+xml":{source:"iana"},"application/gml+xml":{source:"iana",extensions:["gml"]},"application/gpx+xml":{source:"apache",extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana"},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana"},"application/ibe-pkg-reply+xml":{source:"iana"},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana"},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana"},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana"},"application/kpml-response+xml":{source:"iana"},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana"},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana"},"application/lost+xml":{source:"iana",extensions:["lostxml"]},"application/lostsync+xml":{source:"iana"},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",extensions:["mathml"]},"application/mathml-content+xml":{source:"iana"},"application/mathml-presentation+xml":{source:"iana"},"application/mbms-associated-procedure-description+xml":{source:"iana"},"application/mbms-deregister+xml":{source:"iana"},"application/mbms-envelope+xml":{source:"iana"},"application/mbms-msk+xml":{source:"iana"},"application/mbms-msk-response+xml":{source:"iana"},"application/mbms-protection-description+xml":{source:"iana"},"application/mbms-reception-report+xml":{source:"iana"},"application/mbms-register+xml":{source:"iana"},"application/mbms-register-response+xml":{source:"iana"},"application/mbms-schedule+xml":{source:"iana"},"application/mbms-user-service-description+xml":{source:"iana"},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana"},"application/media_control+xml":{source:"iana"},"application/mediaservercontrol+xml":{source:"iana",extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",extensions:["metalink"]},"application/metalink4+xml":{source:"iana",extensions:["meta4"]},"application/mets+xml":{source:"iana",extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mmt-usd+xml":{source:"iana"},"application/mods+xml":{source:"iana",extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana"},"application/mrb-publish+xml":{source:"iana"},"application/msc-ivr+xml":{source:"iana"},"application/msc-mixer+xml":{source:"iana"},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana"},"application/n-triples":{source:"iana"},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana"},"application/news-groupinfo":{source:"iana"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana"},"application/node":{source:"iana"},"application/nss":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana"},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana"},"application/pidf-diff+xml":{source:"iana"},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",extensions:["pls"]},"application/poc-settings+xml":{source:"iana"},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana"},"application/provenance+xml":{source:"iana"},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana"},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana"},"application/pskc+xml":{source:"iana",extensions:["pskcxml"]},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf"]},"application/reginfo+xml":{source:"iana",extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",extensions:["rld"]},"application/rfc+xml":{source:"iana"},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana"},"application/rls-services+xml":{source:"iana",extensions:["rs"]},"application/route-apd+xml":{source:"iana"},"application/route-s-tsid+xml":{source:"iana"},"application/route-usd+xml":{source:"iana"},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana"},"application/samlmetadata+xml":{source:"iana"},"application/sbml+xml":{source:"iana",extensions:["sbml"]},"application/scaip+xml":{source:"iana"},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/sep+xml":{source:"iana"},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",extensions:["shf"]},"application/sieve":{source:"iana"},"application/simple-filter+xml":{source:"iana"},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",extensions:["srx"]},"application/spirits-event+xml":{source:"iana"},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",extensions:["grxml"]},"application/sru+xml":{source:"iana",extensions:["sru"]},"application/ssdl+xml":{source:"apache",extensions:["ssdl"]},"application/ssml+xml":{source:"iana",extensions:["ssml"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/tei+xml":{source:"iana",extensions:["tei","teicorpus"]},"application/thraud+xml":{source:"iana",extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tnauthlist":{source:"iana"},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana"},"application/tve-trigger":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana"},"application/urc-ressheet+xml":{source:"iana"},"application/urc-targetdesc+xml":{source:"iana"},"application/urc-uisocketdesc+xml":{source:"iana"},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana"},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana"},"application/vnd.3gpp-prose+xml":{source:"iana"},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana"},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana"},"application/vnd.3gpp.bsf+xml":{source:"iana"},"application/vnd.3gpp.gmop+xml":{source:"iana"},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana"},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana"},"application/vnd.3gpp.mcptt-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana"},"application/vnd.3gpp.mid-call+xml":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana"},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana"},"application/vnd.3gpp.srvcc-info+xml":{source:"iana"},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana"},"application/vnd.3gpp.ussd+xml":{source:"iana"},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana"},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",extensions:["mpkg"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana"},"application/vnd.balsamiq.bmml+xml":{source:"iana"},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana"},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana"},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana"},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",extensions:["wbs"]},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana"},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana"},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume-movie":{source:"iana"},"application/vnd.desmume.movie":{source:"apache"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana"},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana"},"application/vnd.dvb.notif-container+xml":{source:"iana"},"application/vnd.dvb.notif-generic+xml":{source:"iana"},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana"},"application/vnd.dvb.notif-init+xml":{source:"iana"},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana"},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana"},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana"},"application/vnd.eszigno3+xml":{source:"iana",extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana"},"application/vnd.etsi.asic-e+zip":{source:"iana"},"application/vnd.etsi.asic-s+zip":{source:"iana"},"application/vnd.etsi.cug+xml":{source:"iana"},"application/vnd.etsi.iptvcommand+xml":{source:"iana"},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana"},"application/vnd.etsi.iptvprofile+xml":{source:"iana"},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana"},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana"},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana"},"application/vnd.etsi.iptvservice+xml":{source:"iana"},"application/vnd.etsi.iptvsync+xml":{source:"iana"},"application/vnd.etsi.iptvueprofile+xml":{source:"iana"},"application/vnd.etsi.mcid+xml":{source:"iana"},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana"},"application/vnd.etsi.pstn+xml":{source:"iana"},"application/vnd.etsi.sci+xml":{source:"iana"},"application/vnd.etsi.simservs+xml":{source:"iana"},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana"},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana"},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana"},"application/vnd.gov.sk.e-form+zip":{source:"iana"},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana"},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana"},"application/vnd.imagemeter.image+zip":{source:"iana"},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana"},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana"},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana"},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana"},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana"},"application/vnd.iptc.g2.packageitem+xml":{source:"iana"},"application/vnd.iptc.g2.planningitem+xml":{source:"iana"},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",extensions:["lasxml"]},"application/vnd.liberty-request+xml":{source:"iana"},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",extensions:["lbe"]},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana"},"application/vnd.marlin.drm.conftoken+xml":{source:"iana"},"application/vnd.marlin.drm.license+xml":{source:"iana"},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana"},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana"},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana"},"application/vnd.ms-printing.printticket+xml":{source:"apache"},"application/vnd.ms-printschematicket+xml":{source:"iana"},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana"},"application/vnd.nokia.iptv.config+xml":{source:"iana"},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana"},"application/vnd.nokia.landmarkcollection+xml":{source:"iana"},"application/vnd.nokia.n-gage.ac+xml":{source:"iana"},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana"},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana"},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana"},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana"},"application/vnd.oipf.dae.xhtml+xml":{source:"iana"},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana"},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana"},"application/vnd.oipf.spdlist+xml":{source:"iana"},"application/vnd.oipf.ueprofile+xml":{source:"iana"},"application/vnd.oipf.userprofile+xml":{source:"iana"},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana"},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana"},"application/vnd.oma.bcast.imd+xml":{source:"iana"},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana"},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana"},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana"},"application/vnd.oma.bcast.sprov+xml":{source:"iana"},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana"},"application/vnd.oma.cab-feature-handler+xml":{source:"iana"},"application/vnd.oma.cab-pcc+xml":{source:"iana"},"application/vnd.oma.cab-subs-invite+xml":{source:"iana"},"application/vnd.oma.cab-user-prefs+xml":{source:"iana"},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana"},"application/vnd.oma.group-usage-list+xml":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana"},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana"},"application/vnd.oma.poc.final-report+xml":{source:"iana"},"application/vnd.oma.poc.groups+xml":{source:"iana"},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana"},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana"},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana"},"application/vnd.oma.xcap-directory+xml":{source:"iana"},"application/vnd.omads-email+xml":{source:"iana"},"application/vnd.omads-file+xml":{source:"iana"},"application/vnd.omads-folder+xml":{source:"iana"},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana"},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana"},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana"},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana"},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana"},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana"},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos+xml":{source:"iana"},"application/vnd.paos.xml":{source:"apache"},"application/vnd.patentdive":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana"},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana"},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana"},"application/vnd.radisys.msml+xml":{source:"iana"},"application/vnd.radisys.msml-audit+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana"},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana"},"application/vnd.radisys.msml-conf+xml":{source:"iana"},"application/vnd.radisys.msml-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana"},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.software602.filler.form+xml":{source:"iana"},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana"},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana"},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.tmd.mediaflex.api+xml":{source:"iana"},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana"},"application/vnd.wv.ssp+xml":{source:"iana"},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana"},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",extensions:["zaz"]},"application/voicexml+xml":{source:"iana",extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana"},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"apache",extensions:["der","crt","pem"]},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana"},"application/xaml+xml":{source:"apache",extensions:["xaml"]},"application/xcap-att+xml":{source:"iana"},"application/xcap-caps+xml":{source:"iana"},"application/xcap-diff+xml":{source:"iana",extensions:["xdf"]},"application/xcap-el+xml":{source:"iana"},"application/xcap-error+xml":{source:"iana"},"application/xcap-ns+xml":{source:"iana"},"application/xcon-conference-info+xml":{source:"iana"},"application/xcon-conference-info-diff+xml":{source:"iana"},"application/xenc+xml":{source:"iana",extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache"},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana"},"application/xmpp+xml":{source:"iana"},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",extensions:["xpl"]},"application/xslt+xml":{source:"iana",extensions:["xslt"]},"application/xspf+xml":{source:"apache",extensions:["xspf"]},"application/xv+xml":{source:"iana",extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana"},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana"},"application/yin+xml":{source:"iana",extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana"},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana"},"image/apng":{compressible:!1,extensions:["apng"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana"},"image/emf":{source:"iana"},"image/fits":{source:"iana"},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana"},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana"},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana"},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/tiff-fx":{source:"iana"},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana"},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana"},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana"},"image/vnd.valve.source.texture":{source:"iana"},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana"},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana"},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/vnd.collada+xml":{source:"iana",extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana"},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana"},"model/vnd.parasolid.transmit.binary":{source:"iana"},"model/vnd.parasolid.transmit.text":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.valve.source.compiled-map":{source:"iana"},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana"},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana"},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana",compressible:!1},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fwdred":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shex":{extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana"},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vp8":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var tO1=o((Us6)=>{/*!
 * mime-types
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */var es=nO1(),Gs6=L0("path").extname,rO1=/^\s*([^;\s]*)(?:;|\s|$)/,Js6=/^text\//i;Us6.charset=aO1;Us6.charsets={lookup:aO1};Us6.contentType=Qs6;Us6.extension=Ws6;Us6.extensions=Object.create(null);Us6.lookup=Zs6;Us6.types=Object.create(null);Ks6(Us6.extensions,Us6.types);function aO1($){if(!$||typeof $!=="string")return!1;var Y=rO1.exec($),X=Y&&es[Y[1].toLowerCase()];if(X&&X.charset)return X.charset;if(Y&&Js6.test(Y[1]))return"UTF-8";return!1}function Qs6($){if(!$||typeof $!=="string")return!1;var Y=$.indexOf("/")===-1?Us6.lookup($):$;if(!Y)return!1;if(Y.indexOf("charset")===-1){var X=Us6.charset(Y);if(X)Y+="; charset="+X.toLowerCase()}return Y}function Ws6($){if(!$||typeof $!=="string")return!1;var Y=rO1.exec($),X=Y&&Us6.extensions[Y[1].toLowerCase()];if(!X||!X.length)return!1;return X[0]}function Zs6($){if(!$||typeof $!=="string")return!1;var Y=Gs6("x."+$).toLowerCase().substr(1);if(!Y)return!1;return Us6.types[Y]||!1}function Ks6($,Y){var X=["nginx","apache",void 0,"iana"];Object.keys(es).forEach(function(J){var Q=es[J],W=Q.extensions;if(!W||!W.length)return;$[J]=W;for(var Z=0;Z<W.length;Z++){var K=W[Z];if(Y[K]){var H=X.indexOf(es[Y[K]].source),z=X.indexOf(Q.source);if(Y[K]!=="application/octet-stream"&&(H>z||H===z&&Y[K].substr(0,12)==="application/"))continue}Y[K]=J}})}});var $E1=o((U_5,eO1)=>{eO1.exports=As6;function As6($){var Y=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(Y)Y($);else setTimeout($,0)}});var _A0=o((H_5,XE1)=>{var YE1=$E1();XE1.exports=Fs6;function Fs6($){var Y=!1;return YE1(function(){Y=!0}),function(G,J){if(Y)$(G,J);else YE1(function(){$(G,J)})}}});var jA0=o((z_5,GE1)=>{GE1.exports=Ds6;function Ds6($){Object.keys($.jobs).forEach(Ns6.bind($)),$.jobs={}}function Ns6($){if(typeof this.jobs[$]=="function")this.jobs[$]()}});var TA0=o((V_5,QE1)=>{var JE1=_A0(),Ls6=jA0();QE1.exports=Bs6;function Bs6($,Y,X,G){var J=X.keyedList?X.keyedList[X.index]:X.index;X.jobs[J]=Os6(Y,J,$[J],function(Q,W){if(!(J in X.jobs))return;if(delete X.jobs[J],Q)Ls6(X);else X.results[J]=W;G(Q,X.results)})}function Os6($,Y,X,G){var J;if($.length==2)J=$(X,JE1(G));else J=$(X,Y,JE1(G));return J}});var CA0=o((A_5,WE1)=>{WE1.exports=Es6;function Es6($,Y){var X=!Array.isArray($),G={index:0,keyedList:X||Y?Object.keys($):null,jobs:{},results:X?{}:[],size:X?Object.keys($).length:$.length};if(Y)G.keyedList.sort(X?Y:function(J,Q){return Y($[J],$[Q])});return G}});var SA0=o((F_5,ZE1)=>{var Ms6=jA0(),Rs6=_A0();ZE1.exports=qs6;function qs6($){if(!Object.keys(this.jobs).length)return;this.index=this.size,Ms6(this),Rs6($)(null,this.results)}});var UE1=o((D_5,KE1)=>{var Is6=TA0(),Ps6=CA0(),ws6=SA0();KE1.exports=_s6;function _s6($,Y,X){var G=Ps6($);while(G.index<(G.keyedList||$).length)Is6($,Y,G,function(J,Q){if(J){X(J,Q);return}if(Object.keys(G.jobs).length===0){X(null,G.results);return}}),G.index++;return ws6.bind(G,X)}});var kA0=o((N_5,$o)=>{var HE1=TA0(),js6=CA0(),Ts6=SA0();$o.exports=Cs6;$o.exports.ascending=zE1;$o.exports.descending=Ss6;function Cs6($,Y,X,G){var J=js6($,X);return HE1($,Y,J,function Q(W,Z){if(W){G(W,Z);return}if(J.index++,J.index<(J.keyedList||$).length){HE1($,Y,J,Q);return}G(null,J.results)}),Ts6.bind(J,G)}function zE1($,Y){return $<Y?-1:$>Y?1:0}function Ss6($,Y){return-1*zE1($,Y)}});var AE1=o((L_5,VE1)=>{var ks6=kA0();VE1.exports=vs6;function vs6($,Y,X){return ks6($,Y,null,X)}});var DE1=o((B_5,FE1)=>{FE1.exports={parallel:UE1(),serial:AE1(),serialOrdered:kA0()}});var vA0=o((O_5,NE1)=>{NE1.exports=Object});var BE1=o((E_5,LE1)=>{LE1.exports=Error});var EE1=o((M_5,OE1)=>{OE1.exports=EvalError});var RE1=o((R_5,ME1)=>{ME1.exports=RangeError});var IE1=o((q_5,qE1)=>{qE1.exports=ReferenceError});var wE1=o((I_5,PE1)=>{PE1.exports=SyntaxError});var Yo=o((P_5,_E1)=>{_E1.exports=TypeError});var TE1=o((w_5,jE1)=>{jE1.exports=URIError});var SE1=o((__5,CE1)=>{CE1.exports=Math.abs});var vE1=o((j_5,kE1)=>{kE1.exports=Math.floor});var yE1=o((T_5,xE1)=>{xE1.exports=Math.max});var hE1=o((C_5,bE1)=>{bE1.exports=Math.min});var gE1=o((S_5,fE1)=>{fE1.exports=Math.pow});var uE1=o((k_5,mE1)=>{mE1.exports=Math.round});var dE1=o((v_5,pE1)=>{pE1.exports=Number.isNaN||function(Y){return Y!==Y}});var lE1=o((x_5,cE1)=>{var xs6=dE1();cE1.exports=function(Y){if(xs6(Y)||Y===0)return Y;return Y<0?-1:1}});var nE1=o((y_5,iE1)=>{iE1.exports=Object.getOwnPropertyDescriptor});var xA0=o((b_5,rE1)=>{var Xo=nE1();if(Xo)try{Xo([],"length")}catch($){Xo=null}rE1.exports=Xo});var sE1=o((h_5,aE1)=>{var Go=Object.defineProperty||!1;if(Go)try{Go({},"a",{value:1})}catch($){Go=!1}aE1.exports=Go});var yA0=o((f_5,oE1)=>{oE1.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var Y={},X=Symbol("test"),G=Object(X);if(typeof X==="string")return!1;if(Object.prototype.toString.call(X)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(G)!=="[object Symbol]")return!1;var J=42;Y[X]=J;for(var Q in Y)return!1;if(typeof Object.keys==="function"&&Object.keys(Y).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(Y).length!==0)return!1;var W=Object.getOwnPropertySymbols(Y);if(W.length!==1||W[0]!==X)return!1;if(!Object.prototype.propertyIsEnumerable.call(Y,X))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var Z=Object.getOwnPropertyDescriptor(Y,X);if(Z.value!==J||Z.enumerable!==!0)return!1}return!0}});var $M1=o((g_5,eE1)=>{var tE1=typeof Symbol<"u"&&Symbol,ys6=yA0();eE1.exports=function(){if(typeof tE1!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof tE1("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return ys6()}});var bA0=o((m_5,YM1)=>{YM1.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var hA0=o((u_5,XM1)=>{var bs6=vA0();XM1.exports=bs6.getPrototypeOf||null});var QM1=o((p_5,JM1)=>{var hs6="Function.prototype.bind called on incompatible ",fs6=Object.prototype.toString,gs6=Math.max,ms6="[object Function]",GM1=function(Y,X){var G=[];for(var J=0;J<Y.length;J+=1)G[J]=Y[J];for(var Q=0;Q<X.length;Q+=1)G[Q+Y.length]=X[Q];return G},us6=function(Y,X){var G=[];for(var J=X||0,Q=0;J<Y.length;J+=1,Q+=1)G[Q]=Y[J];return G},ps6=function($,Y){var X="";for(var G=0;G<$.length;G+=1)if(X+=$[G],G+1<$.length)X+=Y;return X};JM1.exports=function(Y){var X=this;if(typeof X!=="function"||fs6.apply(X)!==ms6)throw TypeError(hs6+X);var G=us6(arguments,1),J,Q=function(){if(this instanceof J){var z=X.apply(this,GM1(G,arguments));if(Object(z)===z)return z;return this}return X.apply(Y,GM1(G,arguments))},W=gs6(0,X.length-G.length),Z=[];for(var K=0;K<W;K++)Z[K]="$"+K;if(J=Function("binder","return function ("+ps6(Z,",")+"){ return binder.apply(this,arguments); }")(Q),X.prototype){var H=function(){};H.prototype=X.prototype,J.prototype=new H,H.prototype=null}return J}});var Xy=o((d_5,WM1)=>{var ds6=QM1();WM1.exports=Function.prototype.bind||ds6});var Jo=o((c_5,ZM1)=>{ZM1.exports=Function.prototype.call});var fA0=o((l_5,KM1)=>{KM1.exports=Function.prototype.apply});var HM1=o((i_5,UM1)=>{UM1.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var VM1=o((n_5,zM1)=>{var cs6=Xy(),ls6=fA0(),is6=Jo(),ns6=HM1();zM1.exports=ns6||cs6.call(is6,ls6)});var FM1=o((r_5,AM1)=>{var rs6=Xy(),as6=Yo(),ss6=Jo(),os6=VM1();AM1.exports=function(Y){if(Y.length<1||typeof Y[0]!=="function")throw new as6("a function is required");return os6(rs6,ss6,Y)}});var EM1=o((a_5,OM1)=>{var ts6=FM1(),DM1=xA0(),LM1;try{LM1=[].__proto__===Array.prototype}catch($){if(!$||typeof $!=="object"||!("code"in $)||$.code!=="ERR_PROTO_ACCESS")throw $}var gA0=!!LM1&&DM1&&DM1(Object.prototype,"__proto__"),BM1=Object,NM1=BM1.getPrototypeOf;OM1.exports=gA0&&typeof gA0.get==="function"?ts6([gA0.get]):typeof NM1==="function"?function(Y){return NM1(Y==null?Y:BM1(Y))}:!1});var PM1=o((s_5,IM1)=>{var MM1=bA0(),RM1=hA0(),qM1=EM1();IM1.exports=MM1?function(Y){return MM1(Y)}:RM1?function(Y){if(!Y||typeof Y!=="object"&&typeof Y!=="function")throw TypeError("getProto: not an object");return RM1(Y)}:qM1?function(Y){return qM1(Y)}:null});var Qo=o((o_5,wM1)=>{var es6=Function.prototype.call,$o6=Object.prototype.hasOwnProperty,Yo6=Xy();wM1.exports=Yo6.call(es6,$o6)});var kM1=o((t_5,SM1)=>{var U8,Xo6=vA0(),Go6=BE1(),Jo6=EE1(),Qo6=RE1(),Wo6=IE1(),hI=wE1(),bI=Yo(),Zo6=TE1(),Ko6=SE1(),Uo6=vE1(),Ho6=yE1(),zo6=hE1(),Vo6=gE1(),Ao6=uE1(),Fo6=lE1(),TM1=Function,mA0=function($){try{return TM1('"use strict"; return ('+$+").constructor;")()}catch(Y){}},Gy=xA0(),Do6=sE1(),uA0=function(){throw new bI},No6=Gy?function(){try{return arguments.callee,uA0}catch($){try{return Gy(arguments,"callee").get}catch(Y){return uA0}}}():uA0,xI=$M1()(),yY=PM1(),Lo6=hA0(),Bo6=bA0(),CM1=fA0(),Jy=Jo(),yI={},Oo6=typeof Uint8Array>"u"||!yY?U8:yY(Uint8Array),UB={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?U8:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?U8:ArrayBuffer,"%ArrayIteratorPrototype%":xI&&yY?yY([][Symbol.iterator]()):U8,"%AsyncFromSyncIteratorPrototype%":U8,"%AsyncFunction%":yI,"%AsyncGenerator%":yI,"%AsyncGeneratorFunction%":yI,"%AsyncIteratorPrototype%":yI,"%Atomics%":typeof Atomics>"u"?U8:Atomics,"%BigInt%":typeof BigInt>"u"?U8:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?U8:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?U8:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?U8:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Go6,"%eval%":eval,"%EvalError%":Jo6,"%Float16Array%":typeof Float16Array>"u"?U8:Float16Array,"%Float32Array%":typeof Float32Array>"u"?U8:Float32Array,"%Float64Array%":typeof Float64Array>"u"?U8:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?U8:FinalizationRegistry,"%Function%":TM1,"%GeneratorFunction%":yI,"%Int8Array%":typeof Int8Array>"u"?U8:Int8Array,"%Int16Array%":typeof Int16Array>"u"?U8:Int16Array,"%Int32Array%":typeof Int32Array>"u"?U8:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":xI&&yY?yY(yY([][Symbol.iterator]())):U8,"%JSON%":typeof JSON==="object"?JSON:U8,"%Map%":typeof Map>"u"?U8:Map,"%MapIteratorPrototype%":typeof Map>"u"||!xI||!yY?U8:yY(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Xo6,"%Object.getOwnPropertyDescriptor%":Gy,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?U8:Promise,"%Proxy%":typeof Proxy>"u"?U8:Proxy,"%RangeError%":Qo6,"%ReferenceError%":Wo6,"%Reflect%":typeof Reflect>"u"?U8:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?U8:Set,"%SetIteratorPrototype%":typeof Set>"u"||!xI||!yY?U8:yY(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?U8:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":xI&&yY?yY(""[Symbol.iterator]()):U8,"%Symbol%":xI?Symbol:U8,"%SyntaxError%":hI,"%ThrowTypeError%":No6,"%TypedArray%":Oo6,"%TypeError%":bI,"%Uint8Array%":typeof Uint8Array>"u"?U8:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?U8:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?U8:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?U8:Uint32Array,"%URIError%":Zo6,"%WeakMap%":typeof WeakMap>"u"?U8:WeakMap,"%WeakRef%":typeof WeakRef>"u"?U8:WeakRef,"%WeakSet%":typeof WeakSet>"u"?U8:WeakSet,"%Function.prototype.call%":Jy,"%Function.prototype.apply%":CM1,"%Object.defineProperty%":Do6,"%Object.getPrototypeOf%":Lo6,"%Math.abs%":Ko6,"%Math.floor%":Uo6,"%Math.max%":Ho6,"%Math.min%":zo6,"%Math.pow%":Vo6,"%Math.round%":Ao6,"%Math.sign%":Fo6,"%Reflect.getPrototypeOf%":Bo6};if(yY)try{null.error}catch($){pA0=yY(yY($)),UB["%Error.prototype%"]=pA0}var pA0,Eo6=function $(Y){var X;if(Y==="%AsyncFunction%")X=mA0("async function () {}");else if(Y==="%GeneratorFunction%")X=mA0("function* () {}");else if(Y==="%AsyncGeneratorFunction%")X=mA0("async function* () {}");else if(Y==="%AsyncGenerator%"){var G=$("%AsyncGeneratorFunction%");if(G)X=G.prototype}else if(Y==="%AsyncIteratorPrototype%"){var J=$("%AsyncGenerator%");if(J&&yY)X=yY(J.prototype)}return UB[Y]=X,X},_M1={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qy=Xy(),Wo=Qo(),Mo6=Qy.call(Jy,Array.prototype.concat),Ro6=Qy.call(CM1,Array.prototype.splice),jM1=Qy.call(Jy,String.prototype.replace),Zo=Qy.call(Jy,String.prototype.slice),qo6=Qy.call(Jy,RegExp.prototype.exec),Io6=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Po6=/\\(\\)?/g,wo6=function(Y){var X=Zo(Y,0,1),G=Zo(Y,-1);if(X==="%"&&G!=="%")throw new hI("invalid intrinsic syntax, expected closing `%`");else if(G==="%"&&X!=="%")throw new hI("invalid intrinsic syntax, expected opening `%`");var J=[];return jM1(Y,Io6,function(Q,W,Z,K){J[J.length]=Z?jM1(K,Po6,"$1"):W||Q}),J},_o6=function(Y,X){var G=Y,J;if(Wo(_M1,G))J=_M1[G],G="%"+J[0]+"%";if(Wo(UB,G)){var Q=UB[G];if(Q===yI)Q=Eo6(G);if(typeof Q>"u"&&!X)throw new bI("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:J,name:G,value:Q}}throw new hI("intrinsic "+Y+" does not exist!")};SM1.exports=function(Y,X){if(typeof Y!=="string"||Y.length===0)throw new bI("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof X!=="boolean")throw new bI('"allowMissing" argument must be a boolean');if(qo6(/^%?[^%]*%?$/,Y)===null)throw new hI("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var G=wo6(Y),J=G.length>0?G[0]:"",Q=_o6("%"+J+"%",X),W=Q.name,Z=Q.value,K=!1,H=Q.alias;if(H)J=H[0],Ro6(G,Mo6([0,1],H));for(var z=1,V=!0;z<G.length;z+=1){var A=G[z],F=Zo(A,0,1),N=Zo(A,-1);if((F==='"'||F==="'"||F==="`"||(N==='"'||N==="'"||N==="`"))&&F!==N)throw new hI("property names with quotes must have matching quotes");if(A==="constructor"||!V)K=!0;if(J+="."+A,W="%"+J+"%",Wo(UB,W))Z=UB[W];else if(Z!=null){if(!(A in Z)){if(!X)throw new bI("base intrinsic for "+Y+" exists, but the property is not available.");return}if(Gy&&z+1>=G.length){var D=Gy(Z,A);if(V=!!D,V&&"get"in D&&!("originalValue"in D.get))Z=D.get;else Z=Z[A]}else V=Wo(Z,A),Z=Z[A];if(V&&!K)UB[W]=Z}}return Z}});var xM1=o((e_5,vM1)=>{var jo6=yA0();vM1.exports=function(){return jo6()&&!!Symbol.toStringTag}});var hM1=o(($j5,bM1)=>{var To6=kM1(),yM1=To6("%Object.defineProperty%",!0),Co6=xM1()(),So6=Qo(),ko6=Yo(),Ko=Co6?Symbol.toStringTag:null;bM1.exports=function(Y,X){var G=arguments.length>2&&!!arguments[2]&&arguments[2].force,J=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof G<"u"&&typeof G!=="boolean"||typeof J<"u"&&typeof J!=="boolean")throw new ko6("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(Ko&&(G||!So6(Y,Ko)))if(yM1)yM1(Y,Ko,{configurable:!J,enumerable:!1,value:X,writable:!1});else Y[Ko]=X}});var gM1=o((Yj5,fM1)=>{fM1.exports=function($,Y){return Object.keys(Y).forEach(function(X){$[X]=$[X]||Y[X]}),$}});var uM1=o((Xj5,mM1)=>{var iA0=iO1(),vo6=L0("util"),dA0=L0("path"),xo6=L0("http"),yo6=L0("https"),bo6=L0("url").parse,ho6=L0("fs"),fo6=L0("stream").Stream,go6=L0("crypto"),cA0=tO1(),mo6=DE1(),uo6=hM1(),sA=Qo(),lA0=gM1();function f8($){if(!(this instanceof f8))return new f8($);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],iA0.call(this),$=$||{};for(var Y in $)this[Y]=$[Y]}vo6.inherits(f8,iA0);f8.LINE_BREAK=`\r
`;f8.DEFAULT_CONTENT_TYPE="application/octet-stream";f8.prototype.append=function($,Y,X){if(X=X||{},typeof X==="string")X={filename:X};var G=iA0.prototype.append.bind(this);if(typeof Y==="number"||Y==null)Y=String(Y);if(Array.isArray(Y)){this._error(Error("Arrays are not supported."));return}var J=this._multiPartHeader($,Y,X),Q=this._multiPartFooter();G(J),G(Y),G(Q),this._trackLength(J,Y,X)};f8.prototype._trackLength=function($,Y,X){var G=0;if(X.knownLength!=null)G+=Number(X.knownLength);else if(Buffer.isBuffer(Y))G=Y.length;else if(typeof Y==="string")G=Buffer.byteLength(Y);if(this._valueLength+=G,this._overheadLength+=Buffer.byteLength($)+f8.LINE_BREAK.length,!Y||!Y.path&&!(Y.readable&&sA(Y,"httpVersion"))&&!(Y instanceof fo6))return;if(!X.knownLength)this._valuesToMeasure.push(Y)};f8.prototype._lengthRetriever=function($,Y){if(sA($,"fd"))if($.end!=null&&$.end!=1/0&&$.start!=null)Y(null,$.end+1-($.start?$.start:0));else ho6.stat($.path,function(X,G){if(X){Y(X);return}var J=G.size-($.start?$.start:0);Y(null,J)});else if(sA($,"httpVersion"))Y(null,Number($.headers["content-length"]));else if(sA($,"httpModule"))$.on("response",function(X){$.pause(),Y(null,Number(X.headers["content-length"]))}),$.resume();else Y("Unknown stream")};f8.prototype._multiPartHeader=function($,Y,X){if(typeof X.header==="string")return X.header;var G=this._getContentDisposition(Y,X),J=this._getContentType(Y,X),Q="",W={"Content-Disposition":["form-data",'name="'+$+'"'].concat(G||[]),"Content-Type":[].concat(J||[])};if(typeof X.header==="object")lA0(W,X.header);var Z;for(var K in W)if(sA(W,K)){if(Z=W[K],Z==null)continue;if(!Array.isArray(Z))Z=[Z];if(Z.length)Q+=K+": "+Z.join("; ")+f8.LINE_BREAK}return"--"+this.getBoundary()+f8.LINE_BREAK+Q+f8.LINE_BREAK};f8.prototype._getContentDisposition=function($,Y){var X;if(typeof Y.filepath==="string")X=dA0.normalize(Y.filepath).replace(/\\/g,"/");else if(Y.filename||$&&($.name||$.path))X=dA0.basename(Y.filename||$&&($.name||$.path));else if($&&$.readable&&sA($,"httpVersion"))X=dA0.basename($.client._httpMessage.path||"");if(X)return'filename="'+X+'"'};f8.prototype._getContentType=function($,Y){var X=Y.contentType;if(!X&&$&&$.name)X=cA0.lookup($.name);if(!X&&$&&$.path)X=cA0.lookup($.path);if(!X&&$&&$.readable&&sA($,"httpVersion"))X=$.headers["content-type"];if(!X&&(Y.filepath||Y.filename))X=cA0.lookup(Y.filepath||Y.filename);if(!X&&$&&typeof $==="object")X=f8.DEFAULT_CONTENT_TYPE;return X};f8.prototype._multiPartFooter=function(){return function($){var Y=f8.LINE_BREAK,X=this._streams.length===0;if(X)Y+=this._lastBoundary();$(Y)}.bind(this)};f8.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+f8.LINE_BREAK};f8.prototype.getHeaders=function($){var Y,X={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(Y in $)if(sA($,Y))X[Y.toLowerCase()]=$[Y];return X};f8.prototype.setBoundary=function($){if(typeof $!=="string")throw TypeError("FormData boundary must be a string");this._boundary=$};f8.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};f8.prototype.getBuffer=function(){var $=new Buffer.alloc(0),Y=this.getBoundary();for(var X=0,G=this._streams.length;X<G;X++)if(typeof this._streams[X]!=="function"){if(Buffer.isBuffer(this._streams[X]))$=Buffer.concat([$,this._streams[X]]);else $=Buffer.concat([$,Buffer.from(this._streams[X])]);if(typeof this._streams[X]!=="string"||this._streams[X].substring(2,Y.length+2)!==Y)$=Buffer.concat([$,Buffer.from(f8.LINE_BREAK)])}return Buffer.concat([$,Buffer.from(this._lastBoundary())])};f8.prototype._generateBoundary=function(){this._boundary="--------------------------"+go6.randomBytes(12).toString("hex")};f8.prototype.getLengthSync=function(){var $=this._overheadLength+this._valueLength;if(this._streams.length)$+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return $};f8.prototype.hasKnownLength=function(){var $=!0;if(this._valuesToMeasure.length)$=!1;return $};f8.prototype.getLength=function($){var Y=this._overheadLength+this._valueLength;if(this._streams.length)Y+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick($.bind(this,null,Y));return}mo6.parallel(this._valuesToMeasure,this._lengthRetriever,function(X,G){if(X){$(X);return}G.forEach(function(J){Y+=J}),$(null,Y)})};f8.prototype.submit=function($,Y){var X,G,J={method:"post"};if(typeof $==="string")$=bo6($),G=lA0({port:$.port,path:$.pathname,host:$.hostname,protocol:$.protocol},J);else if(G=lA0($,J),!G.port)G.port=G.protocol==="https:"?443:80;if(G.headers=this.getHeaders($.headers),G.protocol==="https:")X=yo6.request(G);else X=xo6.request(G);return this.getLength(function(Q,W){if(Q&&Q!=="Unknown stream"){this._error(Q);return}if(W)X.setHeader("Content-Length",W);if(this.pipe(X),Y){var Z,K=function(H,z){return X.removeListener("error",K),X.removeListener("response",Z),Y.call(this,H,z)};Z=K.bind(this,null),X.on("error",K),X.on("response",Z)}}.bind(this)),X};f8.prototype._error=function($){if(!this.error)this.error=$,this.pause(),this.emit("error",$)};f8.prototype.toString=function(){return"[object FormData]"};uo6(f8.prototype,"FormData");mM1.exports=f8});var QF0=o((ej5,YR1)=>{function Qt6($){X.debug=X,X.default=X,X.coerce=K,X.disable=W,X.enable=J,X.enabled=Z,X.humanize=Gi(),X.destroy=H,Object.keys($).forEach((z)=>{X[z]=$[z]}),X.names=[],X.skips=[],X.formatters={};function Y(z){let V=0;for(let A=0;A<z.length;A++)V=(V<<5)-V+z.charCodeAt(A),V|=0;return X.colors[Math.abs(V)%X.colors.length]}X.selectColor=Y;function X(z){let V,A=null,F,N;function D(...L){if(!D.enabled)return;let B=D,O=Number(new Date),E=O-(V||O);if(B.diff=E,B.prev=V,B.curr=O,V=O,L[0]=X.coerce(L[0]),typeof L[0]!=="string")L.unshift("%O");let M=0;L[0]=L[0].replace(/%([a-zA-Z%])/g,(q,w)=>{if(q==="%%")return"%";M++;let I=X.formatters[w];if(typeof I==="function"){let P=L[M];q=I.call(B,P),L.splice(M,1),M--}return q}),X.formatArgs.call(B,L),(B.log||X.log).apply(B,L)}if(D.namespace=z,D.useColors=X.useColors(),D.color=X.selectColor(z),D.extend=G,D.destroy=X.destroy,Object.defineProperty(D,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(A!==null)return A;if(F!==X.namespaces)F=X.namespaces,N=X.enabled(z);return N},set:(L)=>{A=L}}),typeof X.init==="function")X.init(D);return D}function G(z,V){let A=X(this.namespace+(typeof V>"u"?":":V)+z);return A.log=this.log,A}function J(z){X.save(z),X.namespaces=z,X.names=[],X.skips=[];let V=(typeof z==="string"?z:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let A of V)if(A[0]==="-")X.skips.push(A.slice(1));else X.names.push(A)}function Q(z,V){let A=0,F=0,N=-1,D=0;while(A<z.length)if(F<V.length&&(V[F]===z[A]||V[F]==="*"))if(V[F]==="*")N=F,D=A,F++;else A++,F++;else if(N!==-1)F=N+1,D++,A=D;else return!1;while(F<V.length&&V[F]==="*")F++;return F===V.length}function W(){let z=[...X.names,...X.skips.map((V)=>"-"+V)].join(",");return X.enable(""),z}function Z(z){for(let V of X.skips)if(Q(z,V))return!1;for(let V of X.names)if(Q(z,V))return!0;return!1}function K(z){if(z instanceof Error)return z.stack||z.message;return z}function H(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return X.enable(X.load()),X}YR1.exports=Qt6});var GR1=o((XR1,zo)=>{XR1.formatArgs=Zt6;XR1.save=Kt6;XR1.load=Ut6;XR1.useColors=Wt6;XR1.storage=Ht6();XR1.destroy=(()=>{let $=!1;return()=>{if(!$)$=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();XR1.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Wt6(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let $;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&($=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt($[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Zt6($){if($[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+$[0]+(this.useColors?"%c ":" ")+"+"+zo.exports.humanize(this.diff),!this.useColors)return;let Y="color: "+this.color;$.splice(1,0,Y,"color: inherit");let X=0,G=0;$[0].replace(/%[a-zA-Z%]/g,(J)=>{if(J==="%%")return;if(X++,J==="%c")G=X}),$.splice(G,0,Y)}XR1.log=console.debug||console.log||(()=>{});function Kt6($){try{if($)XR1.storage.setItem("debug",$);else XR1.storage.removeItem("debug")}catch(Y){}}function Ut6(){let $;try{$=XR1.storage.getItem("debug")||XR1.storage.getItem("DEBUG")}catch(Y){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}function Ht6(){try{return localStorage}catch($){}}zo.exports=QF0()(XR1);var{formatters:zt6}=zo.exports;zt6.j=function($){try{return JSON.stringify($)}catch(Y){return"[UnexpectedJSONParseError]: "+Y.message}}});var QR1=o((YT5,JR1)=>{JR1.exports=($,Y=process.argv)=>{let X=$.startsWith("-")?"":$.length===1?"-":"--",G=Y.indexOf(X+$),J=Y.indexOf("--");return G!==-1&&(J===-1||G<J)}});var ZF0=o((XT5,ZR1)=>{var Ot6=L0("os"),WR1=L0("tty"),kZ=QR1(),{env:bY}=process,Vo;if(kZ("no-color")||kZ("no-colors")||kZ("color=false")||kZ("color=never"))Vo=0;else if(kZ("color")||kZ("colors")||kZ("color=true")||kZ("color=always"))Vo=1;function Et6(){if("FORCE_COLOR"in bY){if(bY.FORCE_COLOR==="true")return 1;if(bY.FORCE_COLOR==="false")return 0;return bY.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(bY.FORCE_COLOR,10),3)}}function Mt6($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function Rt6($,{streamIsTTY:Y,sniffFlags:X=!0}={}){let G=Et6();if(G!==void 0)Vo=G;let J=X?Vo:G;if(J===0)return 0;if(X){if(kZ("color=16m")||kZ("color=full")||kZ("color=truecolor"))return 3;if(kZ("color=256"))return 2}if($&&!Y&&J===void 0)return 0;let Q=J||0;if(bY.TERM==="dumb")return Q;if(process.platform==="win32"){let W=Ot6.release().split(".");if(Number(W[0])>=10&&Number(W[2])>=10586)return Number(W[2])>=14931?3:2;return 1}if("CI"in bY){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((W)=>(W in bY))||bY.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in bY)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(bY.TEAMCITY_VERSION)?1:0;if(bY.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in bY){let W=Number.parseInt((bY.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(bY.TERM_PROGRAM){case"iTerm.app":return W>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(bY.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(bY.TERM))return 1;if("COLORTERM"in bY)return 1;return Q}function WF0($,Y={}){let X=Rt6($,{streamIsTTY:$&&$.isTTY,...Y});return Mt6(X)}ZR1.exports={supportsColor:WF0,stdout:WF0({isTTY:WR1.isatty(1)}),stderr:WF0({isTTY:WR1.isatty(2)})}});var zR1=o((UR1,Fo)=>{var qt6=L0("tty"),Ao=L0("util");UR1.init=Ct6;UR1.log=_t6;UR1.formatArgs=Pt6;UR1.save=jt6;UR1.load=Tt6;UR1.useColors=It6;UR1.destroy=Ao.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");UR1.colors=[6,2,3,4,5,1];try{let $=ZF0();if($&&($.stderr||$).level>=2)UR1.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch($){}UR1.inspectOpts=Object.keys(process.env).filter(($)=>{return/^debug_/i.test($)}).reduce(($,Y)=>{let X=Y.substring(6).toLowerCase().replace(/_([a-z])/g,(J,Q)=>{return Q.toUpperCase()}),G=process.env[Y];if(/^(yes|on|true|enabled)$/i.test(G))G=!0;else if(/^(no|off|false|disabled)$/i.test(G))G=!1;else if(G==="null")G=null;else G=Number(G);return $[X]=G,$},{});function It6(){return"colors"in UR1.inspectOpts?Boolean(UR1.inspectOpts.colors):qt6.isatty(process.stderr.fd)}function Pt6($){let{namespace:Y,useColors:X}=this;if(X){let G=this.color,J="\x1B[3"+(G<8?G:"8;5;"+G),Q=`  ${J};1m${Y} \x1B[0m`;$[0]=Q+$[0].split(`
`).join(`
`+Q),$.push(J+"m+"+Fo.exports.humanize(this.diff)+"\x1B[0m")}else $[0]=wt6()+Y+" "+$[0]}function wt6(){if(UR1.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function _t6(...$){return process.stderr.write(Ao.formatWithOptions(UR1.inspectOpts,...$)+`
`)}function jt6($){if($)process.env.DEBUG=$;else delete process.env.DEBUG}function Tt6(){return process.env.DEBUG}function Ct6($){$.inspectOpts={};let Y=Object.keys(UR1.inspectOpts);for(let X=0;X<Y.length;X++)$.inspectOpts[Y[X]]=UR1.inspectOpts[Y[X]]}Fo.exports=QF0()(UR1);var{formatters:KR1}=Fo.exports;KR1.o=function($){return this.inspectOpts.colors=this.useColors,Ao.inspect($,this.inspectOpts).split(`
`).map((Y)=>Y.trim()).join(" ")};KR1.O=function($){return this.inspectOpts.colors=this.useColors,Ao.inspect($,this.inspectOpts)}});var Uy=o((JT5,KF0)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)KF0.exports=GR1();else KF0.exports=zR1()});var AR1=o((VR1)=>{Object.defineProperty(VR1,"__esModule",{value:!0});function ft6($){return function(Y,X){return new Promise((G,J)=>{$.call(this,Y,X,(Q,W)=>{if(Q)J(Q);else G(W)})})}}VR1.default=ft6});var NR1=o((HF0,DR1)=>{var FR1=HF0&&HF0.__importDefault||function($){return $&&$.__esModule?$:{default:$}},mt6=L0("events"),ut6=FR1(Uy()),pt6=FR1(AR1()),Hy=ut6.default("agent-base");function dt6($){return Boolean($)&&typeof $.addRequest==="function"}function UF0(){let{stack:$}=Error();if(typeof $!=="string")return!1;return $.split(`
`).some((Y)=>Y.indexOf("(https.js:")!==-1||Y.indexOf("node:https:")!==-1)}function Do($,Y){return new Do.Agent($,Y)}(function($){class Y extends mt6.EventEmitter{constructor(X,G){super();let J=G;if(typeof X==="function")this.callback=X;else if(X)J=X;if(this.timeout=null,J&&typeof J.timeout==="number")this.timeout=J.timeout;this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number")return this.explicitDefaultPort;return UF0()?443:80}set defaultPort(X){this.explicitDefaultPort=X}get protocol(){if(typeof this.explicitProtocol==="string")return this.explicitProtocol;return UF0()?"https:":"http:"}set protocol(X){this.explicitProtocol=X}callback(X,G,J){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(X,G){let J=Object.assign({},G);if(typeof J.secureEndpoint!=="boolean")J.secureEndpoint=UF0();if(J.host==null)J.host="localhost";if(J.port==null)J.port=J.secureEndpoint?443:80;if(J.protocol==null)J.protocol=J.secureEndpoint?"https:":"http:";if(J.host&&J.path)delete J.path;delete J.agent,delete J.hostname,delete J._defaultAgent,delete J.defaultPort,delete J.createConnection,X._last=!0,X.shouldKeepAlive=!1;let Q=!1,W=null,Z=J.timeout||this.timeout,K=(A)=>{if(X._hadError)return;X.emit("error",A),X._hadError=!0},H=()=>{W=null,Q=!0;let A=Error(`A "socket" was not created for HTTP request before ${Z}ms`);A.code="ETIMEOUT",K(A)},z=(A)=>{if(Q)return;if(W!==null)clearTimeout(W),W=null;K(A)},V=(A)=>{if(Q)return;if(W!=null)clearTimeout(W),W=null;if(dt6(A)){Hy("Callback returned another Agent instance %o",A.constructor.name),A.addRequest(X,J);return}if(A){A.once("free",()=>{this.freeSocket(A,J)}),X.onSocket(A);return}let F=Error(`no Duplex stream was returned to agent-base for \`${X.method} ${X.path}\``);K(F)};if(typeof this.callback!=="function"){K(Error("`callback` is not defined"));return}if(!this.promisifiedCallback)if(this.callback.length>=3)Hy("Converting legacy callback function to promise"),this.promisifiedCallback=pt6.default(this.callback);else this.promisifiedCallback=this.callback;if(typeof Z==="number"&&Z>0)W=setTimeout(H,Z);if("port"in J&&typeof J.port!=="number")J.port=Number(J.port);try{Hy("Resolving socket for %o request: %o",J.protocol,`${X.method} ${X.path}`),Promise.resolve(this.promisifiedCallback(X,J)).then(V,z)}catch(A){Promise.reject(A).catch(z)}}freeSocket(X,G){Hy("Freeing socket %o %o",X.constructor.name,G),X.destroy()}destroy(){Hy("Destroying agent %o",this.constructor.name)}}$.Agent=Y,$.prototype=$.Agent.prototype})(Do||(Do={}));DR1.exports=Do});var LR1=o((Vy)=>{var ct6=Vy&&Vy.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(Vy,"__esModule",{value:!0});var lt6=ct6(Uy()),zy=lt6.default("https-proxy-agent:parse-proxy-response");function it6($){return new Promise((Y,X)=>{let G=0,J=[];function Q(){let V=$.read();if(V)z(V);else $.once("readable",Q)}function W(){$.removeListener("end",K),$.removeListener("error",H),$.removeListener("close",Z),$.removeListener("readable",Q)}function Z(V){zy("onclose had error %o",V)}function K(){zy("onend")}function H(V){W(),zy("onerror %o",V),X(V)}function z(V){J.push(V),G+=V.length;let A=Buffer.concat(J,G);if(A.indexOf(`\r
\r
`)===-1){zy("have not received end of HTTP headers yet..."),Q();return}let N=A.toString("ascii",0,A.indexOf(`\r
`)),D=+N.split(" ")[1];zy("got proxy server response: %o",N),Y({statusCode:D,buffered:A})}$.on("error",H),$.on("close",Z),$.on("end",K),Q()})}Vy.default=it6});var MR1=o((AB)=>{var nt6=AB&&AB.__awaiter||function($,Y,X,G){function J(Q){return Q instanceof X?Q:new X(function(W){W(Q)})}return new(X||(X=Promise))(function(Q,W){function Z(z){try{H(G.next(z))}catch(V){W(V)}}function K(z){try{H(G.throw(z))}catch(V){W(V)}}function H(z){z.done?Q(z.value):J(z.value).then(Z,K)}H((G=G.apply($,Y||[])).next())})},mI=AB&&AB.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(AB,"__esModule",{value:!0});var BR1=mI(L0("net")),OR1=mI(L0("tls")),rt6=mI(L0("url")),at6=mI(L0("assert")),st6=mI(Uy()),ot6=NR1(),tt6=mI(LR1()),Ay=st6.default("https-proxy-agent:agent");class ER1 extends ot6.Agent{constructor($){let Y;if(typeof $==="string")Y=rt6.default.parse($);else Y=$;if(!Y)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");Ay("creating new HttpsProxyAgent instance: %o",Y);super(Y);let X=Object.assign({},Y);if(this.secureProxy=Y.secureProxy||Ye6(X.protocol),X.host=X.hostname||X.host,typeof X.port==="string")X.port=parseInt(X.port,10);if(!X.port&&X.host)X.port=this.secureProxy?443:80;if(this.secureProxy&&!("ALPNProtocols"in X))X.ALPNProtocols=["http 1.1"];if(X.host&&X.path)delete X.path,delete X.pathname;this.proxy=X}callback($,Y){return nt6(this,void 0,void 0,function*(){let{proxy:X,secureProxy:G}=this,J;if(G)Ay("Creating `tls.Socket`: %o",X),J=OR1.default.connect(X);else Ay("Creating `net.Socket`: %o",X),J=BR1.default.connect(X);let Q=Object.assign({},X.headers),Z=`CONNECT ${`${Y.host}:${Y.port}`} HTTP/1.1\r
`;if(X.auth)Q["Proxy-Authorization"]=`Basic ${Buffer.from(X.auth).toString("base64")}`;let{host:K,port:H,secureEndpoint:z}=Y;if(!$e6(H,z))K+=`:${H}`;Q.Host=K,Q.Connection="close";for(let D of Object.keys(Q))Z+=`${D}: ${Q[D]}\r
`;let V=tt6.default(J);J.write(`${Z}\r
`);let{statusCode:A,buffered:F}=yield V;if(A===200){if($.once("socket",et6),Y.secureEndpoint){Ay("Upgrading socket connection to TLS");let D=Y.servername||Y.host;return OR1.default.connect(Object.assign(Object.assign({},Xe6(Y,"host","hostname","path","port")),{socket:J,servername:D}))}return J}J.destroy();let N=new BR1.default.Socket({writable:!1});return N.readable=!0,$.once("socket",(D)=>{Ay("replaying proxy buffer for failed request"),at6.default(D.listenerCount("data")>0),D.push(F),D.push(null)}),N})}}AB.default=ER1;function et6($){$.resume()}function $e6($,Y){return Boolean(!Y&&$===80||Y&&$===443)}function Ye6($){return typeof $==="string"?/^https:?$/i.test($):!1}function Xe6($,...Y){let X={},G;for(G in $)if(!Y.includes(G))X[G]=$[G];return X}});var qR1=o((AF0,RR1)=>{var Ge6=AF0&&AF0.__importDefault||function($){return $&&$.__esModule?$:{default:$}},zF0=Ge6(MR1());function VF0($){return new zF0.default($)}(function($){$.HttpsProxyAgent=zF0.default,$.prototype=zF0.default.prototype})(VF0||(VF0={}));RR1.exports=VF0});var PR1=o((KT5,IR1)=>{var Fy;IR1.exports=function(){if(!Fy){try{Fy=Uy()("follow-redirects")}catch($){}if(typeof Fy!=="function")Fy=function(){}}Fy.apply(null,arguments)}});var CR1=o((UT5,PF0)=>{var Ny=L0("url"),Dy=Ny.URL,Je6=L0("http"),Qe6=L0("https"),BF0=L0("stream").Writable,OF0=L0("assert"),wR1=PR1();(function(){var Y=typeof process<"u",X=typeof window<"u"&&typeof document<"u",G=DB(Error.captureStackTrace);if(!Y&&(X||!G))console.warn("The follow-redirects package should be excluded from browser builds.")})();var EF0=!1;try{OF0(new Dy(""))}catch($){EF0=$.code==="ERR_INVALID_URL"}var We6=["Authorization","Proxy-Authorization","Cookie"],Ze6=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],MF0=["abort","aborted","connect","error","socket","timeout"],RF0=Object.create(null);MF0.forEach(function($){RF0[$]=function(Y,X,G){this._redirectable.emit($,Y,X,G)}});var DF0=Ly("ERR_INVALID_URL","Invalid URL",TypeError),NF0=Ly("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Ke6=Ly("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",NF0),Ue6=Ly("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),He6=Ly("ERR_STREAM_WRITE_AFTER_END","write after end"),ze6=BF0.prototype.destroy||jR1;function $Q($,Y){if(BF0.call(this),this._sanitizeOptions($),this._options=$,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],Y)this.on("response",Y);var X=this;this._onNativeResponse=function(G){try{X._processResponse(G)}catch(J){X.emit("error",J instanceof NF0?J:new NF0({cause:J}))}},this._headerFilter=new RegExp("^(?:"+We6.concat($.sensitiveHeaders).map(Le6).join("|")+")$","i"),this._performRequest()}$Q.prototype=Object.create(BF0.prototype);$Q.prototype.abort=function(){IF0(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};$Q.prototype.destroy=function($){return IF0(this._currentRequest,$),ze6.call(this,$),this};$Q.prototype.write=function($,Y,X){if(this._ending)throw new He6;if(!FB($)&&!De6($))throw TypeError("data should be a string, Buffer or Uint8Array");if(DB(Y))X=Y,Y=null;if($.length===0){if(X)X();return}if(this._requestBodyLength+$.length<=this._options.maxBodyLength)this._requestBodyLength+=$.length,this._requestBodyBuffers.push({data:$,encoding:Y}),this._currentRequest.write($,Y,X);else this.emit("error",new Ue6),this.abort()};$Q.prototype.end=function($,Y,X){if(DB($))X=$,$=Y=null;else if(DB(Y))X=Y,Y=null;if(!$)this._ended=this._ending=!0,this._currentRequest.end(null,null,X);else{var G=this,J=this._currentRequest;this.write($,Y,function(){G._ended=!0,J.end(null,null,X)}),this._ending=!0}};$Q.prototype.setHeader=function($,Y){this._options.headers[$]=Y,this._currentRequest.setHeader($,Y)};$Q.prototype.removeHeader=function($){delete this._options.headers[$],this._currentRequest.removeHeader($)};$Q.prototype.setTimeout=function($,Y){var X=this;function G(W){W.setTimeout($),W.removeListener("timeout",W.destroy),W.addListener("timeout",W.destroy)}function J(W){if(X._timeout)clearTimeout(X._timeout);X._timeout=setTimeout(function(){X.emit("timeout"),Q()},$),G(W)}function Q(){if(X._timeout)clearTimeout(X._timeout),X._timeout=null;if(X.removeListener("abort",Q),X.removeListener("error",Q),X.removeListener("response",Q),X.removeListener("close",Q),Y)X.removeListener("timeout",Y);if(!X.socket)X._currentRequest.removeListener("socket",J)}if(Y)this.on("timeout",Y);if(this.socket)J(this.socket);else this._currentRequest.once("socket",J);return this.on("socket",G),this.on("abort",Q),this.on("error",Q),this.on("response",Q),this.on("close",Q),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function($){$Q.prototype[$]=function(Y,X){return this._currentRequest[$](Y,X)}});["aborted","connection","socket"].forEach(function($){Object.defineProperty($Q.prototype,$,{get:function(){return this._currentRequest[$]}})});$Q.prototype._sanitizeOptions=function($){if(!$.headers)$.headers={};if(!Fe6($.sensitiveHeaders))$.sensitiveHeaders=[];if($.host){if(!$.hostname)$.hostname=$.host;delete $.host}if(!$.pathname&&$.path){var Y=$.path.indexOf("?");if(Y<0)$.pathname=$.path;else $.pathname=$.path.substring(0,Y),$.search=$.path.substring(Y)}};$Q.prototype._performRequest=function(){var $=this._options.protocol,Y=this._options.nativeProtocols[$];if(!Y)throw TypeError("Unsupported protocol "+$);if(this._options.agents){var X=$.slice(0,-1);this._options.agent=this._options.agents[X]}var G=this._currentRequest=Y.request(this._options,this._onNativeResponse);G._redirectable=this;for(var J of MF0)G.on(J,RF0[J]);if(this._currentUrl=/^\//.test(this._options.path)?Ny.format(this._options):this._options.path,this._isRedirect){var Q=0,W=this,Z=this._requestBodyBuffers;(function K(H){if(G===W._currentRequest){if(H)W.emit("error",H);else if(Q<Z.length){var z=Z[Q++];if(!G.finished)G.write(z.data,z.encoding,K)}else if(W._ended)G.end()}})()}};$Q.prototype._processResponse=function($){var Y=$.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:$.headers,statusCode:Y});var X=$.headers.location;if(!X||this._options.followRedirects===!1||Y<300||Y>=400){$.responseUrl=this._currentUrl,$.redirects=this._redirects,this.emit("response",$),this._requestBodyBuffers=[];return}if(IF0(this._currentRequest),$.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Ke6;var G,J=this._options.beforeRedirect;if(J)G=Object.assign({Host:$.req.getHeader("host")},this._options.headers);var Q=this._options.method;if((Y===301||Y===302)&&this._options.method==="POST"||Y===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],FF0(/^content-/i,this._options.headers);var W=FF0(/^host$/i,this._options.headers),Z=qF0(this._currentUrl),K=W||Z.host,H=/^\w+:/.test(X)?this._currentUrl:Ny.format(Object.assign(Z,{host:K})),z=Ve6(X,H);if(wR1("redirecting to",z.href),this._isRedirect=!0,LF0(z,this._options),z.protocol!==Z.protocol&&z.protocol!=="https:"||z.host!==K&&!Ae6(z.host,K))FF0(this._headerFilter,this._options.headers);if(DB(J)){var V={headers:$.headers,statusCode:Y},A={url:H,method:Q,headers:G};J(this._options,V,A),this._sanitizeOptions(this._options)}this._performRequest()};function _R1($){var Y={maxRedirects:21,maxBodyLength:10485760},X={};return Object.keys($).forEach(function(G){var J=G+":",Q=X[J]=$[G],W=Y[G]=Object.create(Q);function Z(H,z,V){if(Ne6(H))H=LF0(H);else if(FB(H))H=LF0(qF0(H));else V=z,z=TR1(H),H={protocol:J};if(DB(z))V=z,z=null;if(z=Object.assign({maxRedirects:Y.maxRedirects,maxBodyLength:Y.maxBodyLength},H,z),z.nativeProtocols=X,!FB(z.host)&&!FB(z.hostname))z.hostname="::1";return OF0.equal(z.protocol,J,"protocol mismatch"),wR1("options",z),new $Q(z,V)}function K(H,z,V){var A=W.request(H,z,V);return A.end(),A}Object.defineProperties(W,{request:{value:Z,configurable:!0,enumerable:!0,writable:!0},get:{value:K,configurable:!0,enumerable:!0,writable:!0}})}),Y}function jR1(){}function qF0($){var Y;if(EF0)Y=new Dy($);else if(Y=TR1(Ny.parse($)),!FB(Y.protocol))throw new DF0({input:$});return Y}function Ve6($,Y){return EF0?new Dy($,Y):qF0(Ny.resolve(Y,$))}function TR1($){if(/^\[/.test($.hostname)&&!/^\[[:0-9a-f]+\]$/i.test($.hostname))throw new DF0({input:$.href||$});if(/^\[/.test($.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test($.host))throw new DF0({input:$.href||$});return $}function LF0($,Y){var X=Y||{};for(var G of Ze6)X[G]=$[G];if(X.hostname.startsWith("["))X.hostname=X.hostname.slice(1,-1);if(X.port!=="")X.port=Number(X.port);return X.path=X.search?X.pathname+X.search:X.pathname,X}function FF0($,Y){var X;for(var G in Y)if($.test(G))X=Y[G],delete Y[G];return X===null||typeof X>"u"?void 0:String(X).trim()}function Ly($,Y,X){function G(J){if(DB(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,J||{}),this.code=$,this.message=this.cause?Y+": "+this.cause.message:Y}return G.prototype=new(X||Error),Object.defineProperties(G.prototype,{constructor:{value:G,enumerable:!1},name:{value:"Error ["+$+"]",enumerable:!1}}),G}function IF0($,Y){for(var X of MF0)$.removeListener(X,RF0[X]);$.on("error",jR1),$.destroy(Y)}function Ae6($,Y){OF0(FB($)&&FB(Y));var X=$.length-Y.length-1;return X>0&&$[X]==="."&&$.endsWith(Y)}function Fe6($){return $ instanceof Array}function FB($){return typeof $==="string"||$ instanceof String}function DB($){return typeof $==="function"}function De6($){return typeof $==="object"&&"length"in $}function Ne6($){return Dy&&$ instanceof Dy}function Le6($){return $.replace(/[\]\\/()*+?.$]/g,"\\$&")}PF0.exports=_R1({http:Je6,https:Qe6});PF0.exports.wrap=_R1});var Oq1=o((Gk5,Bq1)=>{Bq1.exports=S08;function dI($){if($ instanceof Buffer)return Buffer.from($);return new $.constructor($.buffer.slice(),$.byteOffset,$.length)}function S08($){if($=$||{},$.circles)return k08($);let Y=new Map;if(Y.set(Date,(W)=>new Date(W)),Y.set(Map,(W,Z)=>new Map(G(Array.from(W),Z))),Y.set(Set,(W,Z)=>new Set(G(Array.from(W),Z))),$.constructorHandlers)for(let W of $.constructorHandlers)Y.set(W[0],W[1]);let X=null;return $.proto?Q:J;function G(W,Z){let K=Object.keys(W),H=Array(K.length);for(let z=0;z<K.length;z++){let V=K[z],A=W[V];if(typeof A!=="object"||A===null)H[V]=A;else if(A.constructor!==Object&&(X=Y.get(A.constructor)))H[V]=X(A,Z);else if(ArrayBuffer.isView(A))H[V]=dI(A);else H[V]=Z(A)}return H}function J(W){if(typeof W!=="object"||W===null)return W;if(Array.isArray(W))return G(W,J);if(W.constructor!==Object&&(X=Y.get(W.constructor)))return X(W,J);let Z={};for(let K in W){if(Object.hasOwnProperty.call(W,K)===!1)continue;let H=W[K];if(typeof H!=="object"||H===null)Z[K]=H;else if(H.constructor!==Object&&(X=Y.get(H.constructor)))Z[K]=X(H,J);else if(ArrayBuffer.isView(H))Z[K]=dI(H);else Z[K]=J(H)}return Z}function Q(W){if(typeof W!=="object"||W===null)return W;if(Array.isArray(W))return G(W,Q);if(W.constructor!==Object&&(X=Y.get(W.constructor)))return X(W,Q);let Z={};for(let K in W){let H=W[K];if(typeof H!=="object"||H===null)Z[K]=H;else if(H.constructor!==Object&&(X=Y.get(H.constructor)))Z[K]=X(H,Q);else if(ArrayBuffer.isView(H))Z[K]=dI(H);else Z[K]=Q(H)}return Z}}function k08($){let Y=[],X=[],G=new Map;if(G.set(Date,(K)=>new Date(K)),G.set(Map,(K,H)=>new Map(Q(Array.from(K),H))),G.set(Set,(K,H)=>new Set(Q(Array.from(K),H))),$.constructorHandlers)for(let K of $.constructorHandlers)G.set(K[0],K[1]);let J=null;return $.proto?Z:W;function Q(K,H){let z=Object.keys(K),V=Array(z.length);for(let A=0;A<z.length;A++){let F=z[A],N=K[F];if(typeof N!=="object"||N===null)V[F]=N;else if(N.constructor!==Object&&(J=G.get(N.constructor)))V[F]=J(N,H);else if(ArrayBuffer.isView(N))V[F]=dI(N);else{let D=Y.indexOf(N);if(D!==-1)V[F]=X[D];else V[F]=H(N)}}return V}function W(K){if(typeof K!=="object"||K===null)return K;if(Array.isArray(K))return Q(K,W);if(K.constructor!==Object&&(J=G.get(K.constructor)))return J(K,W);let H={};Y.push(K),X.push(H);for(let z in K){if(Object.hasOwnProperty.call(K,z)===!1)continue;let V=K[z];if(typeof V!=="object"||V===null)H[z]=V;else if(V.constructor!==Object&&(J=G.get(V.constructor)))H[z]=J(V,W);else if(ArrayBuffer.isView(V))H[z]=dI(V);else{let A=Y.indexOf(V);if(A!==-1)H[z]=X[A];else H[z]=W(V)}}return Y.pop(),X.pop(),H}function Z(K){if(typeof K!=="object"||K===null)return K;if(Array.isArray(K))return Q(K,Z);if(K.constructor!==Object&&(J=G.get(K.constructor)))return J(K,Z);let H={};Y.push(K),X.push(H);for(let z in K){let V=K[z];if(typeof V!=="object"||V===null)H[z]=V;else if(V.constructor!==Object&&(J=G.get(V.constructor)))H[z]=J(V,Z);else if(ArrayBuffer.isView(V))H[z]=dI(V);else{let A=Y.indexOf(V);if(A!==-1)H[z]=X[A];else H[z]=Z(V)}}return Y.pop(),X.pop(),H}}});var Mq1=o((Jk5,Eq1)=>{Eq1.exports=Oq1()()});var Py=o((Iq1)=>{Object.defineProperty(Iq1,"__esModule",{value:!0});Iq1.regexpCode=Iq1.getEsmExportName=Iq1.getProperty=Iq1.safeStringify=Iq1.stringify=Iq1.strConcat=Iq1.addCodeArg=Iq1.str=Iq1._=Iq1.nil=Iq1._Code=Iq1.Name=Iq1.IDENTIFIER=Iq1._CodeOrName=void 0;class qo{}Iq1._CodeOrName=qo;Iq1.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class cI extends qo{constructor($){super();if(!Iq1.IDENTIFIER.test($))throw Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Iq1.Name=cI;class $K extends qo{constructor($){super();this._items=typeof $==="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((Y,X)=>`${Y}${X}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((Y,X)=>{if(X instanceof cI)Y[X.str]=(Y[X.str]||0)+1;return Y},{})}}Iq1._Code=$K;Iq1.nil=new $K("");function Rq1($,...Y){let X=[$[0]],G=0;while(G<Y.length)pF0(X,Y[G]),X.push($[++G]);return new $K(X)}Iq1._=Rq1;var uF0=new $K("+");function qq1($,...Y){let X=[Iy($[0])],G=0;while(G<Y.length)X.push(uF0),pF0(X,Y[G]),X.push(uF0,Iy($[++G]));return v08(X),new $K(X)}Iq1.str=qq1;function pF0($,Y){if(Y instanceof $K)$.push(...Y._items);else if(Y instanceof cI)$.push(Y);else $.push(b08(Y))}Iq1.addCodeArg=pF0;function v08($){let Y=1;while(Y<$.length-1){if($[Y]===uF0){let X=x08($[Y-1],$[Y+1]);if(X!==void 0){$.splice(Y-1,3,X);continue}$[Y++]="+"}Y++}}function x08($,Y){if(Y==='""')return $;if($==='""')return Y;if(typeof $=="string"){if(Y instanceof cI||$[$.length-1]!=='"')return;if(typeof Y!="string")return`${$.slice(0,-1)}${Y}"`;if(Y[0]==='"')return $.slice(0,-1)+Y.slice(1);return}if(typeof Y=="string"&&Y[0]==='"'&&!($ instanceof cI))return`"${$}${Y.slice(1)}`;return}function y08($,Y){return Y.emptyStr()?$:$.emptyStr()?Y:qq1`${$}${Y}`}Iq1.strConcat=y08;function b08($){return typeof $=="number"||typeof $=="boolean"||$===null?$:Iy(Array.isArray($)?$.join(","):$)}function h08($){return new $K(Iy($))}Iq1.stringify=h08;function Iy($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Iq1.safeStringify=Iy;function f08($){return typeof $=="string"&&Iq1.IDENTIFIER.test($)?new $K(`.${$}`):Rq1`[${$}]`}Iq1.getProperty=f08;function g08($){if(typeof $=="string"&&Iq1.IDENTIFIER.test($))return new $K(`${$}`);throw Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}Iq1.getEsmExportName=g08;function m08($){return new $K($.toString())}Iq1.regexpCode=m08});var iF0=o((jq1)=>{Object.defineProperty(jq1,"__esModule",{value:!0});jq1.ValueScope=jq1.ValueScopeName=jq1.Scope=jq1.varKinds=jq1.UsedValueState=void 0;var YQ=Py();class wq1 extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`);this.value=$.value}}var Po;(function($){$[$.Started=0]="Started",$[$.Completed=1]="Completed"})(Po||(jq1.UsedValueState=Po={}));jq1.varKinds={const:new YQ.Name("const"),let:new YQ.Name("let"),var:new YQ.Name("var")};class cF0{constructor({prefixes:$,parent:Y}={}){this._names={},this._prefixes=$,this._parent=Y}toName($){return $ instanceof YQ.Name?$:this.name($)}name($){return new YQ.Name(this._newName($))}_newName($){let Y=this._names[$]||this._nameGroup($);return`${$}${Y.index++}`}_nameGroup($){var Y,X;if(((X=(Y=this._parent)===null||Y===void 0?void 0:Y._prefixes)===null||X===void 0?void 0:X.has($))||this._prefixes&&!this._prefixes.has($))throw Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}jq1.Scope=cF0;class lF0 extends YQ.Name{constructor($,Y){super(Y);this.prefix=$}setValue($,{property:Y,itemIndex:X}){this.value=$,this.scopePath=YQ._`.${new YQ.Name(Y)}[${X}]`}}jq1.ValueScopeName=lF0;var e08=YQ._`\n`;class _q1 extends cF0{constructor($){super($);this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?e08:YQ.nil}}get(){return this._scope}name($){return new lF0($,this._newName($))}value($,Y){var X;if(Y.ref===void 0)throw Error("CodeGen: ref must be passed in value");let G=this.toName($),{prefix:J}=G,Q=(X=Y.key)!==null&&X!==void 0?X:Y.ref,W=this._values[J];if(W){let H=W.get(Q);if(H)return H}else W=this._values[J]=new Map;W.set(Q,G);let Z=this._scope[J]||(this._scope[J]=[]),K=Z.length;return Z[K]=Y.ref,G.setValue(Y,{property:J,itemIndex:K}),G}getValue($,Y){let X=this._values[$];if(!X)return;return X.get(Y)}scopeRefs($,Y=this._values){return this._reduceValues(Y,(X)=>{if(X.scopePath===void 0)throw Error(`CodeGen: name "${X}" has no value`);return YQ._`${$}${X.scopePath}`})}scopeCode($=this._values,Y,X){return this._reduceValues($,(G)=>{if(G.value===void 0)throw Error(`CodeGen: name "${G}" has no value`);return G.value.code},Y,X)}_reduceValues($,Y,X={},G){let J=YQ.nil;for(let Q in $){let W=$[Q];if(!W)continue;let Z=X[Q]=X[Q]||new Map;W.forEach((K)=>{if(Z.has(K))return;Z.set(K,Po.Started);let H=Y(K);if(H){let z=this.opts.es5?jq1.varKinds.var:jq1.varKinds.const;J=YQ._`${J}${z} ${K} = ${H};${this.opts._n}`}else if(H=G===null||G===void 0?void 0:G(K))J=YQ._`${J}${H}${this.opts._n}`;else throw new wq1(K);Z.set(K,Po.Completed)})}return J}}jq1.ValueScope=_q1});var d6=o((XQ)=>{Object.defineProperty(XQ,"__esModule",{value:!0});XQ.or=XQ.and=XQ.not=XQ.CodeGen=XQ.operators=XQ.varKinds=XQ.ValueScopeName=XQ.ValueScope=XQ.Scope=XQ.Name=XQ.regexpCode=XQ.stringify=XQ.getProperty=XQ.nil=XQ.strConcat=XQ.str=XQ._=void 0;var k8=Py(),YK=iF0(),$F=Py();Object.defineProperty(XQ,"_",{enumerable:!0,get:function(){return $F._}});Object.defineProperty(XQ,"str",{enumerable:!0,get:function(){return $F.str}});Object.defineProperty(XQ,"strConcat",{enumerable:!0,get:function(){return $F.strConcat}});Object.defineProperty(XQ,"nil",{enumerable:!0,get:function(){return $F.nil}});Object.defineProperty(XQ,"getProperty",{enumerable:!0,get:function(){return $F.getProperty}});Object.defineProperty(XQ,"stringify",{enumerable:!0,get:function(){return $F.stringify}});Object.defineProperty(XQ,"regexpCode",{enumerable:!0,get:function(){return $F.regexpCode}});Object.defineProperty(XQ,"Name",{enumerable:!0,get:function(){return $F.Name}});var So=iF0();Object.defineProperty(XQ,"Scope",{enumerable:!0,get:function(){return So.Scope}});Object.defineProperty(XQ,"ValueScope",{enumerable:!0,get:function(){return So.ValueScope}});Object.defineProperty(XQ,"ValueScopeName",{enumerable:!0,get:function(){return So.ValueScopeName}});Object.defineProperty(XQ,"varKinds",{enumerable:!0,get:function(){return So.varKinds}});XQ.operators={GT:new k8._Code(">"),GTE:new k8._Code(">="),LT:new k8._Code("<"),LTE:new k8._Code("<="),EQ:new k8._Code("==="),NEQ:new k8._Code("!=="),NOT:new k8._Code("!"),OR:new k8._Code("||"),AND:new k8._Code("&&"),ADD:new k8._Code("+")};class YF{optimizeNodes(){return this}optimizeNames($,Y){return this}}class Cq1 extends YF{constructor($,Y,X){super();this.varKind=$,this.name=Y,this.rhs=X}render({es5:$,_n:Y}){let X=$?YK.varKinds.var:this.varKind,G=this.rhs===void 0?"":` = ${this.rhs}`;return`${X} ${this.name}${G};`+Y}optimizeNames($,Y){if(!$[this.name.str])return;if(this.rhs)this.rhs=iI(this.rhs,$,Y);return this}get names(){return this.rhs instanceof k8._CodeOrName?this.rhs.names:{}}}class aF0 extends YF{constructor($,Y,X){super();this.lhs=$,this.rhs=Y,this.sideEffects=X}render({_n:$}){return`${this.lhs} = ${this.rhs};`+$}optimizeNames($,Y){if(this.lhs instanceof k8.Name&&!$[this.lhs.str]&&!this.sideEffects)return;return this.rhs=iI(this.rhs,$,Y),this}get names(){let $=this.lhs instanceof k8.Name?{}:{...this.lhs.names};return Co($,this.rhs)}}class Sq1 extends aF0{constructor($,Y,X,G){super($,X,G);this.op=Y}render({_n:$}){return`${this.lhs} ${this.op}= ${this.rhs};`+$}}class kq1 extends YF{constructor($){super();this.label=$,this.names={}}render({_n:$}){return`${this.label}:`+$}}class vq1 extends YF{constructor($){super();this.label=$,this.names={}}render({_n:$}){return`break${this.label?` ${this.label}`:""};`+$}}class xq1 extends YF{constructor($){super();this.error=$}render({_n:$}){return`throw ${this.error};`+$}get names(){return this.error.names}}class yq1 extends YF{constructor($){super();this.code=$}render({_n:$}){return`${this.code};`+$}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames($,Y){return this.code=iI(this.code,$,Y),this}get names(){return this.code instanceof k8._CodeOrName?this.code.names:{}}}class ko extends YF{constructor($=[]){super();this.nodes=$}render($){return this.nodes.reduce((Y,X)=>Y+X.render($),"")}optimizeNodes(){let{nodes:$}=this,Y=$.length;while(Y--){let X=$[Y].optimizeNodes();if(Array.isArray(X))$.splice(Y,1,...X);else if(X)$[Y]=X;else $.splice(Y,1)}return $.length>0?this:void 0}optimizeNames($,Y){let{nodes:X}=this,G=X.length;while(G--){let J=X[G];if(J.optimizeNames($,Y))continue;G18($,J.names),X.splice(G,1)}return X.length>0?this:void 0}get names(){return this.nodes.reduce(($,Y)=>LB($,Y.names),{})}}class XF extends ko{render($){return"{"+$._n+super.render($)+"}"+$._n}}class bq1 extends ko{}class wy extends XF{}wy.kind="else";class Az extends XF{constructor($,Y){super(Y);this.condition=$}render($){let Y=`if(${this.condition})`+super.render($);if(this.else)Y+="else "+this.else.render($);return Y}optimizeNodes(){super.optimizeNodes();let $=this.condition;if($===!0)return this.nodes;let Y=this.else;if(Y){let X=Y.optimizeNodes();Y=this.else=Array.isArray(X)?new wy(X):X}if(Y){if($===!1)return Y instanceof Az?Y:Y.nodes;if(this.nodes.length)return this;return new Az(uq1($),Y instanceof Az?[Y]:Y.nodes)}if($===!1||!this.nodes.length)return;return this}optimizeNames($,Y){var X;if(this.else=(X=this.else)===null||X===void 0?void 0:X.optimizeNames($,Y),!(super.optimizeNames($,Y)||this.else))return;return this.condition=iI(this.condition,$,Y),this}get names(){let $=super.names;if(Co($,this.condition),this.else)LB($,this.else.names);return $}}Az.kind="if";class lI extends XF{}lI.kind="for";class hq1 extends lI{constructor($){super();this.iteration=$}render($){return`for(${this.iteration})`+super.render($)}optimizeNames($,Y){if(!super.optimizeNames($,Y))return;return this.iteration=iI(this.iteration,$,Y),this}get names(){return LB(super.names,this.iteration.names)}}class fq1 extends lI{constructor($,Y,X,G){super();this.varKind=$,this.name=Y,this.from=X,this.to=G}render($){let Y=$.es5?YK.varKinds.var:this.varKind,{name:X,from:G,to:J}=this;return`for(${Y} ${X}=${G}; ${X}<${J}; ${X}++)`+super.render($)}get names(){let $=Co(super.names,this.from);return Co($,this.to)}}class nF0 extends lI{constructor($,Y,X,G){super();this.loop=$,this.varKind=Y,this.name=X,this.iterable=G}render($){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render($)}optimizeNames($,Y){if(!super.optimizeNames($,Y))return;return this.iterable=iI(this.iterable,$,Y),this}get names(){return LB(super.names,this.iterable.names)}}class wo extends XF{constructor($,Y,X){super();this.name=$,this.args=Y,this.async=X}render($){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render($)}}wo.kind="func";class _o extends ko{render($){return"return "+super.render($)}}_o.kind="return";class gq1 extends XF{render($){let Y="try"+super.render($);if(this.catch)Y+=this.catch.render($);if(this.finally)Y+=this.finally.render($);return Y}optimizeNodes(){var $,Y;return super.optimizeNodes(),($=this.catch)===null||$===void 0||$.optimizeNodes(),(Y=this.finally)===null||Y===void 0||Y.optimizeNodes(),this}optimizeNames($,Y){var X,G;return super.optimizeNames($,Y),(X=this.catch)===null||X===void 0||X.optimizeNames($,Y),(G=this.finally)===null||G===void 0||G.optimizeNames($,Y),this}get names(){let $=super.names;if(this.catch)LB($,this.catch.names);if(this.finally)LB($,this.finally.names);return $}}class jo extends XF{constructor($){super();this.error=$}render($){return`catch(${this.error})`+super.render($)}}jo.kind="catch";class To extends XF{render($){return"finally"+super.render($)}}To.kind="finally";class mq1{constructor($,Y={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...Y,_n:Y.lines?`
`:""},this._extScope=$,this._scope=new YK.Scope({parent:$}),this._nodes=[new bq1]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,Y){let X=this._extScope.value($,Y);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}getScopeValue($,Y){return this._extScope.getValue($,Y)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,Y,X,G){let J=this._scope.toName(Y);if(X!==void 0&&G)this._constants[J.str]=X;return this._leafNode(new Cq1($,J,X)),J}const($,Y,X){return this._def(YK.varKinds.const,$,Y,X)}let($,Y,X){return this._def(YK.varKinds.let,$,Y,X)}var($,Y,X){return this._def(YK.varKinds.var,$,Y,X)}assign($,Y,X){return this._leafNode(new aF0($,Y,X))}add($,Y){return this._leafNode(new Sq1($,XQ.operators.ADD,Y))}code($){if(typeof $=="function")$();else if($!==k8.nil)this._leafNode(new yq1($));return this}object(...$){let Y=["{"];for(let[X,G]of $){if(Y.length>1)Y.push(",");if(Y.push(X),X!==G||this.opts.es5)Y.push(":"),(0,k8.addCodeArg)(Y,G)}return Y.push("}"),new k8._Code(Y)}if($,Y,X){if(this._blockNode(new Az($)),Y&&X)this.code(Y).else().code(X).endIf();else if(Y)this.code(Y).endIf();else if(X)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new Az($))}else(){return this._elseNode(new wy)}endIf(){return this._endBlockNode(Az,wy)}_for($,Y){if(this._blockNode($),Y)this.code(Y).endFor();return this}for($,Y){return this._for(new hq1($),Y)}forRange($,Y,X,G,J=this.opts.es5?YK.varKinds.var:YK.varKinds.let){let Q=this._scope.toName($);return this._for(new fq1(J,Q,Y,X),()=>G(Q))}forOf($,Y,X,G=YK.varKinds.const){let J=this._scope.toName($);if(this.opts.es5){let Q=Y instanceof k8.Name?Y:this.var("_arr",Y);return this.forRange("_i",0,k8._`${Q}.length`,(W)=>{this.var(J,k8._`${Q}[${W}]`),X(J)})}return this._for(new nF0("of",G,J,Y),()=>X(J))}forIn($,Y,X,G=this.opts.es5?YK.varKinds.var:YK.varKinds.const){if(this.opts.ownProperties)return this.forOf($,k8._`Object.keys(${Y})`,X);let J=this._scope.toName($);return this._for(new nF0("in",G,J,Y),()=>X(J))}endFor(){return this._endBlockNode(lI)}label($){return this._leafNode(new kq1($))}break($){return this._leafNode(new vq1($))}return($){let Y=new _o;if(this._blockNode(Y),this.code($),Y.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(_o)}try($,Y,X){if(!Y&&!X)throw Error('CodeGen: "try" without "catch" and "finally"');let G=new gq1;if(this._blockNode(G),this.code($),Y){let J=this.name("e");this._currNode=G.catch=new jo(J),Y(J)}if(X)this._currNode=G.finally=new To,this.code(X);return this._endBlockNode(jo,To)}throw($){return this._leafNode(new xq1($))}block($,Y){if(this._blockStarts.push(this._nodes.length),$)this.code($).endBlock(Y);return this}endBlock($){let Y=this._blockStarts.pop();if(Y===void 0)throw Error("CodeGen: not in self-balancing block");let X=this._nodes.length-Y;if(X<0||$!==void 0&&X!==$)throw Error(`CodeGen: wrong number of nodes: ${X} vs ${$} expected`);return this._nodes.length=Y,this}func($,Y=k8.nil,X,G){if(this._blockNode(new wo($,Y,X)),G)this.code(G).endFunc();return this}endFunc(){return this._endBlockNode(wo)}optimize($=1){while($-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,Y){let X=this._currNode;if(X instanceof $||Y&&X instanceof Y)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${Y?`${$.kind}/${Y.kind}`:$.kind}"`)}_elseNode($){let Y=this._currNode;if(!(Y instanceof Az))throw Error('CodeGen: "else" without "if"');return this._currNode=Y.else=$,this}get _root(){return this._nodes[0]}get _currNode(){let $=this._nodes;return $[$.length-1]}set _currNode($){let Y=this._nodes;Y[Y.length-1]=$}}XQ.CodeGen=mq1;function LB($,Y){for(let X in Y)$[X]=($[X]||0)+(Y[X]||0);return $}function Co($,Y){return Y instanceof k8._CodeOrName?LB($,Y.names):$}function iI($,Y,X){if($ instanceof k8.Name)return G($);if(!J($))return $;return new k8._Code($._items.reduce((Q,W)=>{if(W instanceof k8.Name)W=G(W);if(W instanceof k8._Code)Q.push(...W._items);else Q.push(W);return Q},[]));function G(Q){let W=X[Q.str];if(W===void 0||Y[Q.str]!==1)return Q;return delete Y[Q.str],W}function J(Q){return Q instanceof k8._Code&&Q._items.some((W)=>W instanceof k8.Name&&Y[W.str]===1&&X[W.str]!==void 0)}}function G18($,Y){for(let X in Y)$[X]=($[X]||0)-(Y[X]||0)}function uq1($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:k8._`!${rF0($)}`}XQ.not=uq1;var J18=pq1(XQ.operators.AND);function Q18(...$){return $.reduce(J18)}XQ.and=Q18;var W18=pq1(XQ.operators.OR);function Z18(...$){return $.reduce(W18)}XQ.or=Z18;function pq1($){return(Y,X)=>Y===k8.nil?X:X===k8.nil?Y:k8._`${rF0(Y)} ${$} ${rF0(X)}`}function rF0($){return $ instanceof k8.Name?$:k8._`(${$})`}});var g8=o((oq1)=>{Object.defineProperty(oq1,"__esModule",{value:!0});oq1.checkStrictMode=oq1.getErrorPath=oq1.Type=oq1.useFunc=oq1.setEvaluated=oq1.evaluatedPropsToName=oq1.mergeEvaluated=oq1.eachItem=oq1.unescapeJsonPointer=oq1.escapeJsonPointer=oq1.escapeFragment=oq1.unescapeFragment=oq1.schemaRefOrVal=oq1.schemaHasRulesButRef=oq1.schemaHasRules=oq1.checkUnknownRules=oq1.alwaysValidSchema=oq1.toHash=void 0;var w5=d6(),z18=Py();function V18($){let Y={};for(let X of $)Y[X]=!0;return Y}oq1.toHash=V18;function A18($,Y){if(typeof Y=="boolean")return Y;if(Object.keys(Y).length===0)return!0;return iq1($,Y),!nq1(Y,$.self.RULES.all)}oq1.alwaysValidSchema=A18;function iq1($,Y=$.schema){let{opts:X,self:G}=$;if(!X.strictSchema)return;if(typeof Y==="boolean")return;let J=G.RULES.keywords;for(let Q in Y)if(!J[Q])sq1($,`unknown keyword: "${Q}"`)}oq1.checkUnknownRules=iq1;function nq1($,Y){if(typeof $=="boolean")return!$;for(let X in $)if(Y[X])return!0;return!1}oq1.schemaHasRules=nq1;function F18($,Y){if(typeof $=="boolean")return!$;for(let X in $)if(X!=="$ref"&&Y.all[X])return!0;return!1}oq1.schemaHasRulesButRef=F18;function D18({topSchemaRef:$,schemaPath:Y},X,G,J){if(!J){if(typeof X=="number"||typeof X=="boolean")return X;if(typeof X=="string")return w5._`${X}`}return w5._`${$}${Y}${(0,w5.getProperty)(G)}`}oq1.schemaRefOrVal=D18;function N18($){return rq1(decodeURIComponent($))}oq1.unescapeFragment=N18;function L18($){return encodeURIComponent(oF0($))}oq1.escapeFragment=L18;function oF0($){if(typeof $=="number")return`${$}`;return $.replace(/~/g,"~0").replace(/\//g,"~1")}oq1.escapeJsonPointer=oF0;function rq1($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}oq1.unescapeJsonPointer=rq1;function B18($,Y){if(Array.isArray($))for(let X of $)Y(X);else Y($)}oq1.eachItem=B18;function cq1({mergeNames:$,mergeToName:Y,mergeValues:X,resultToName:G}){return(J,Q,W,Z)=>{let K=W===void 0?Q:W instanceof w5.Name?(Q instanceof w5.Name?$(J,Q,W):Y(J,Q,W),W):Q instanceof w5.Name?(Y(J,W,Q),Q):X(Q,W);return Z===w5.Name&&!(K instanceof w5.Name)?G(J,K):K}}oq1.mergeEvaluated={props:cq1({mergeNames:($,Y,X)=>$.if(w5._`${X} !== true && ${Y} !== undefined`,()=>{$.if(w5._`${Y} === true`,()=>$.assign(X,!0),()=>$.assign(X,w5._`${X} || {}`).code(w5._`Object.assign(${X}, ${Y})`))}),mergeToName:($,Y,X)=>$.if(w5._`${X} !== true`,()=>{if(Y===!0)$.assign(X,!0);else $.assign(X,w5._`${X} || {}`),tF0($,X,Y)}),mergeValues:($,Y)=>$===!0?!0:{...$,...Y},resultToName:aq1}),items:cq1({mergeNames:($,Y,X)=>$.if(w5._`${X} !== true && ${Y} !== undefined`,()=>$.assign(X,w5._`${Y} === true ? true : ${X} > ${Y} ? ${X} : ${Y}`)),mergeToName:($,Y,X)=>$.if(w5._`${X} !== true`,()=>$.assign(X,Y===!0?!0:w5._`${X} > ${Y} ? ${X} : ${Y}`)),mergeValues:($,Y)=>$===!0?!0:Math.max($,Y),resultToName:($,Y)=>$.var("items",Y)})};function aq1($,Y){if(Y===!0)return $.var("props",!0);let X=$.var("props",w5._`{}`);if(Y!==void 0)tF0($,X,Y);return X}oq1.evaluatedPropsToName=aq1;function tF0($,Y,X){Object.keys(X).forEach((G)=>$.assign(w5._`${Y}${(0,w5.getProperty)(G)}`,!0))}oq1.setEvaluated=tF0;var lq1={};function O18($,Y){return $.scopeValue("func",{ref:Y,code:lq1[Y.code]||(lq1[Y.code]=new z18._Code(Y.code))})}oq1.useFunc=O18;var sF0;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(sF0||(oq1.Type=sF0={}));function E18($,Y,X){if($ instanceof w5.Name){let G=Y===sF0.Num;return X?G?w5._`"[" + ${$} + "]"`:w5._`"['" + ${$} + "']"`:G?w5._`"/" + ${$}`:w5._`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return X?(0,w5.getProperty)($).toString():"/"+oF0($)}oq1.getErrorPath=E18;function sq1($,Y,X=$.opts.strictSchema){if(!X)return;if(Y=`strict mode: ${Y}`,X===!0)throw Error(Y);$.self.logger.warn(Y)}oq1.checkStrictMode=sq1});var Fz=o((eq1)=>{Object.defineProperty(eq1,"__esModule",{value:!0});var iX=d6(),f18={data:new iX.Name("data"),valCxt:new iX.Name("valCxt"),instancePath:new iX.Name("instancePath"),parentData:new iX.Name("parentData"),parentDataProperty:new iX.Name("parentDataProperty"),rootData:new iX.Name("rootData"),dynamicAnchors:new iX.Name("dynamicAnchors"),vErrors:new iX.Name("vErrors"),errors:new iX.Name("errors"),this:new iX.Name("this"),self:new iX.Name("self"),scope:new iX.Name("scope"),json:new iX.Name("json"),jsonPos:new iX.Name("jsonPos"),jsonLen:new iX.Name("jsonLen"),jsonPart:new iX.Name("jsonPart")};eq1.default=f18});var _y=o((GI1)=>{Object.defineProperty(GI1,"__esModule",{value:!0});GI1.extendErrors=GI1.resetErrorsCount=GI1.reportExtraError=GI1.reportError=GI1.keyword$DataError=GI1.keywordError=void 0;var m8=d6(),xo=g8(),xG=Fz();GI1.keywordError={message:({keyword:$})=>m8.str`must pass "${$}" keyword validation`};GI1.keyword$DataError={message:({keyword:$,schemaType:Y})=>Y?m8.str`"${$}" keyword must be ${Y} ($data)`:m8.str`"${$}" keyword is invalid ($data)`};function m18($,Y=GI1.keywordError,X,G){let{it:J}=$,{gen:Q,compositeRule:W,allErrors:Z}=J,K=XI1($,Y,X);if(G!==null&&G!==void 0?G:W||Z)$I1(Q,K);else YI1(J,m8._`[${K}]`)}GI1.reportError=m18;function u18($,Y=GI1.keywordError,X){let{it:G}=$,{gen:J,compositeRule:Q,allErrors:W}=G,Z=XI1($,Y,X);if($I1(J,Z),!(Q||W))YI1(G,xG.default.vErrors)}GI1.reportExtraError=u18;function p18($,Y){$.assign(xG.default.errors,Y),$.if(m8._`${xG.default.vErrors} !== null`,()=>$.if(Y,()=>$.assign(m8._`${xG.default.vErrors}.length`,Y),()=>$.assign(xG.default.vErrors,null)))}GI1.resetErrorsCount=p18;function d18({gen:$,keyword:Y,schemaValue:X,data:G,errsCount:J,it:Q}){if(J===void 0)throw Error("ajv implementation error");let W=$.name("err");$.forRange("i",J,xG.default.errors,(Z)=>{if($.const(W,m8._`${xG.default.vErrors}[${Z}]`),$.if(m8._`${W}.instancePath === undefined`,()=>$.assign(m8._`${W}.instancePath`,(0,m8.strConcat)(xG.default.instancePath,Q.errorPath))),$.assign(m8._`${W}.schemaPath`,m8.str`${Q.errSchemaPath}/${Y}`),Q.opts.verbose)$.assign(m8._`${W}.schema`,X),$.assign(m8._`${W}.data`,G)})}GI1.extendErrors=d18;function $I1($,Y){let X=$.const("err",Y);$.if(m8._`${xG.default.vErrors} === null`,()=>$.assign(xG.default.vErrors,m8._`[${X}]`),m8._`${xG.default.vErrors}.push(${X})`),$.code(m8._`${xG.default.errors}++`)}function YI1($,Y){let{gen:X,validateName:G,schemaEnv:J}=$;if(J.$async)X.throw(m8._`new ${$.ValidationError}(${Y})`);else X.assign(m8._`${G}.errors`,Y),X.return(!1)}var BB={keyword:new m8.Name("keyword"),schemaPath:new m8.Name("schemaPath"),params:new m8.Name("params"),propertyName:new m8.Name("propertyName"),message:new m8.Name("message"),schema:new m8.Name("schema"),parentSchema:new m8.Name("parentSchema")};function XI1($,Y,X){let{createErrors:G}=$.it;if(G===!1)return m8._`{}`;return c18($,Y,X)}function c18($,Y,X={}){let{gen:G,it:J}=$,Q=[l18(J,X),i18($,X)];return n18($,Y,Q),G.object(...Q)}function l18({errorPath:$},{instancePath:Y}){let X=Y?m8.str`${$}${(0,xo.getErrorPath)(Y,xo.Type.Str)}`:$;return[xG.default.instancePath,(0,m8.strConcat)(xG.default.instancePath,X)]}function i18({keyword:$,it:{errSchemaPath:Y}},{schemaPath:X,parentSchema:G}){let J=G?Y:m8.str`${Y}/${$}`;if(X)J=m8.str`${J}${(0,xo.getErrorPath)(X,xo.Type.Str)}`;return[BB.schemaPath,J]}function n18($,{params:Y,message:X},G){let{keyword:J,data:Q,schemaValue:W,it:Z}=$,{opts:K,propertyName:H,topSchemaRef:z,schemaPath:V}=Z;if(G.push([BB.keyword,J],[BB.params,typeof Y=="function"?Y($):Y||m8._`{}`]),K.messages)G.push([BB.message,typeof X=="function"?X($):X]);if(K.verbose)G.push([BB.schema,W],[BB.parentSchema,m8._`${z}${V}`],[xG.default.data,Q]);if(H)G.push([BB.propertyName,H])}});var KI1=o((WI1)=>{Object.defineProperty(WI1,"__esModule",{value:!0});WI1.boolOrEmptySchema=WI1.topBoolOrEmptySchema=void 0;var t18=_y(),e18=d6(),$48=Fz(),Y48={message:"boolean schema is false"};function X48($){let{gen:Y,schema:X,validateName:G}=$;if(X===!1)QI1($,!1);else if(typeof X=="object"&&X.$async===!0)Y.return($48.default.data);else Y.assign(e18._`${G}.errors`,null),Y.return(!0)}WI1.topBoolOrEmptySchema=X48;function G48($,Y){let{gen:X,schema:G}=$;if(G===!1)X.var(Y,!1),QI1($);else X.var(Y,!0)}WI1.boolOrEmptySchema=G48;function QI1($,Y){let{gen:X,data:G}=$,J={gen:X,keyword:"false schema",data:G,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:$};(0,t18.reportError)(J,Y48,void 0,Y)}});var $D0=o((UI1)=>{Object.defineProperty(UI1,"__esModule",{value:!0});UI1.getRules=UI1.isJSONType=void 0;var Q48=["string","number","integer","boolean","null","object","array"],W48=new Set(Q48);function Z48($){return typeof $=="string"&&W48.has($)}UI1.isJSONType=Z48;function K48(){let $={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...$,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},$.number,$.string,$.array,$.object],post:{rules:[]},all:{},keywords:{}}}UI1.getRules=K48});var YD0=o((AI1)=>{Object.defineProperty(AI1,"__esModule",{value:!0});AI1.shouldUseRule=AI1.shouldUseGroup=AI1.schemaHasRulesForType=void 0;function H48({schema:$,self:Y},X){let G=Y.RULES.types[X];return G&&G!==!0&&zI1($,G)}AI1.schemaHasRulesForType=H48;function zI1($,Y){return Y.rules.some((X)=>VI1($,X))}AI1.shouldUseGroup=zI1;function VI1($,Y){var X;return $[Y.keyword]!==void 0||((X=Y.definition.implements)===null||X===void 0?void 0:X.some((G)=>$[G]!==void 0))}AI1.shouldUseRule=VI1});var jy=o((BI1)=>{Object.defineProperty(BI1,"__esModule",{value:!0});BI1.reportTypeError=BI1.checkDataTypes=BI1.checkDataType=BI1.coerceAndCheckDataType=BI1.getJSONTypes=BI1.getSchemaTypes=BI1.DataType=void 0;var A48=$D0(),F48=YD0(),D48=_y(),f6=d6(),DI1=g8(),nI;(function($){$[$.Correct=0]="Correct",$[$.Wrong=1]="Wrong"})(nI||(BI1.DataType=nI={}));function N48($){let Y=NI1($.type);if(Y.includes("null")){if($.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!Y.length&&$.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if($.nullable===!0)Y.push("null")}return Y}BI1.getSchemaTypes=N48;function NI1($){let Y=Array.isArray($)?$:$?[$]:[];if(Y.every(A48.isJSONType))return Y;throw Error("type must be JSONType or JSONType[]: "+Y.join(","))}BI1.getJSONTypes=NI1;function L48($,Y){let{gen:X,data:G,opts:J}=$,Q=B48(Y,J.coerceTypes),W=Y.length>0&&!(Q.length===0&&Y.length===1&&(0,F48.schemaHasRulesForType)($,Y[0]));if(W){let Z=GD0(Y,G,J.strictNumbers,nI.Wrong);X.if(Z,()=>{if(Q.length)O48($,Y,Q);else JD0($)})}return W}BI1.coerceAndCheckDataType=L48;var LI1=new Set(["string","number","integer","boolean","null"]);function B48($,Y){return Y?$.filter((X)=>LI1.has(X)||Y==="array"&&X==="array"):[]}function O48($,Y,X){let{gen:G,data:J,opts:Q}=$,W=G.let("dataType",f6._`typeof ${J}`),Z=G.let("coerced",f6._`undefined`);if(Q.coerceTypes==="array")G.if(f6._`${W} == 'object' && Array.isArray(${J}) && ${J}.length == 1`,()=>G.assign(J,f6._`${J}[0]`).assign(W,f6._`typeof ${J}`).if(GD0(Y,J,Q.strictNumbers),()=>G.assign(Z,J)));G.if(f6._`${Z} !== undefined`);for(let H of X)if(LI1.has(H)||H==="array"&&Q.coerceTypes==="array")K(H);G.else(),JD0($),G.endIf(),G.if(f6._`${Z} !== undefined`,()=>{G.assign(J,Z),E48($,Z)});function K(H){switch(H){case"string":G.elseIf(f6._`${W} == "number" || ${W} == "boolean"`).assign(Z,f6._`"" + ${J}`).elseIf(f6._`${J} === null`).assign(Z,f6._`""`);return;case"number":G.elseIf(f6._`${W} == "boolean" || ${J} === null
              || (${W} == "string" && ${J} && ${J} == +${J})`).assign(Z,f6._`+${J}`);return;case"integer":G.elseIf(f6._`${W} === "boolean" || ${J} === null
              || (${W} === "string" && ${J} && ${J} == +${J} && !(${J} % 1))`).assign(Z,f6._`+${J}`);return;case"boolean":G.elseIf(f6._`${J} === "false" || ${J} === 0 || ${J} === null`).assign(Z,!1).elseIf(f6._`${J} === "true" || ${J} === 1`).assign(Z,!0);return;case"null":G.elseIf(f6._`${J} === "" || ${J} === 0 || ${J} === false`),G.assign(Z,null);return;case"array":G.elseIf(f6._`${W} === "string" || ${W} === "number"
              || ${W} === "boolean" || ${J} === null`).assign(Z,f6._`[${J}]`)}}}function E48({gen:$,parentData:Y,parentDataProperty:X},G){$.if(f6._`${Y} !== undefined`,()=>$.assign(f6._`${Y}[${X}]`,G))}function XD0($,Y,X,G=nI.Correct){let J=G===nI.Correct?f6.operators.EQ:f6.operators.NEQ,Q;switch($){case"null":return f6._`${Y} ${J} null`;case"array":Q=f6._`Array.isArray(${Y})`;break;case"object":Q=f6._`${Y} && typeof ${Y} == "object" && !Array.isArray(${Y})`;break;case"integer":Q=W(f6._`!(${Y} % 1) && !isNaN(${Y})`);break;case"number":Q=W();break;default:return f6._`typeof ${Y} ${J} ${$}`}return G===nI.Correct?Q:(0,f6.not)(Q);function W(Z=f6.nil){return(0,f6.and)(f6._`typeof ${Y} == "number"`,Z,X?f6._`isFinite(${Y})`:f6.nil)}}BI1.checkDataType=XD0;function GD0($,Y,X,G){if($.length===1)return XD0($[0],Y,X,G);let J,Q=(0,DI1.toHash)($);if(Q.array&&Q.object){let W=f6._`typeof ${Y} != "object"`;J=Q.null?W:f6._`!${Y} || ${W}`,delete Q.null,delete Q.array,delete Q.object}else J=f6.nil;if(Q.number)delete Q.integer;for(let W in Q)J=(0,f6.and)(J,XD0(W,Y,X,G));return J}BI1.checkDataTypes=GD0;var M48={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:Y})=>typeof $=="string"?f6._`{type: ${$}}`:f6._`{type: ${Y}}`};function JD0($){let Y=R48($);(0,D48.reportError)(Y,M48)}BI1.reportTypeError=JD0;function R48($){let{gen:Y,data:X,schema:G}=$,J=(0,DI1.schemaRefOrVal)($,G,"type");return{gen:Y,keyword:"type",data:X,schema:G.type,schemaCode:J,schemaValue:J,parentSchema:G,params:{},it:$}}});var qI1=o((MI1)=>{Object.defineProperty(MI1,"__esModule",{value:!0});MI1.assignDefaults=void 0;var rI=d6(),T48=g8();function C48($,Y){let{properties:X,items:G}=$.schema;if(Y==="object"&&X)for(let J in X)EI1($,J,X[J].default);else if(Y==="array"&&Array.isArray(G))G.forEach((J,Q)=>EI1($,Q,J.default))}MI1.assignDefaults=C48;function EI1($,Y,X){let{gen:G,compositeRule:J,data:Q,opts:W}=$;if(X===void 0)return;let Z=rI._`${Q}${(0,rI.getProperty)(Y)}`;if(J){(0,T48.checkStrictMode)($,`default is ignored for: ${Z}`);return}let K=rI._`${Z} === undefined`;if(W.useDefaults==="empty")K=rI._`${K} || ${Z} === null || ${Z} === ""`;G.if(K,rI._`${Z} = ${(0,rI.stringify)(X)}`)}});var xZ=o((wI1)=>{Object.defineProperty(wI1,"__esModule",{value:!0});wI1.validateUnion=wI1.validateArray=wI1.usePattern=wI1.callValidateCode=wI1.schemaProperties=wI1.allSchemaProperties=wI1.noPropertyInData=wI1.propertyInData=wI1.isOwnProperty=wI1.hasPropFunc=wI1.reportMissingProp=wI1.checkMissingProp=wI1.checkReportMissingProp=void 0;var e5=d6(),QD0=g8(),GF=Fz(),S48=g8();function k48($,Y){let{gen:X,data:G,it:J}=$;X.if(ZD0(X,G,Y,J.opts.ownProperties),()=>{$.setParams({missingProperty:e5._`${Y}`},!0),$.error()})}wI1.checkReportMissingProp=k48;function v48({gen:$,data:Y,it:{opts:X}},G,J){return(0,e5.or)(...G.map((Q)=>(0,e5.and)(ZD0($,Y,Q,X.ownProperties),e5._`${J} = ${Q}`)))}wI1.checkMissingProp=v48;function x48($,Y){$.setParams({missingProperty:Y},!0),$.error()}wI1.reportMissingProp=x48;function II1($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e5._`Object.prototype.hasOwnProperty`})}wI1.hasPropFunc=II1;function WD0($,Y,X){return e5._`${II1($)}.call(${Y}, ${X})`}wI1.isOwnProperty=WD0;function y48($,Y,X,G){let J=e5._`${Y}${(0,e5.getProperty)(X)} !== undefined`;return G?e5._`${J} && ${WD0($,Y,X)}`:J}wI1.propertyInData=y48;function ZD0($,Y,X,G){let J=e5._`${Y}${(0,e5.getProperty)(X)} === undefined`;return G?(0,e5.or)(J,(0,e5.not)(WD0($,Y,X))):J}wI1.noPropertyInData=ZD0;function PI1($){return $?Object.keys($).filter((Y)=>Y!=="__proto__"):[]}wI1.allSchemaProperties=PI1;function b48($,Y){return PI1(Y).filter((X)=>!(0,QD0.alwaysValidSchema)($,Y[X]))}wI1.schemaProperties=b48;function h48({schemaCode:$,data:Y,it:{gen:X,topSchemaRef:G,schemaPath:J,errorPath:Q},it:W},Z,K,H){let z=H?e5._`${$}, ${Y}, ${G}${J}`:Y,V=[[GF.default.instancePath,(0,e5.strConcat)(GF.default.instancePath,Q)],[GF.default.parentData,W.parentData],[GF.default.parentDataProperty,W.parentDataProperty],[GF.default.rootData,GF.default.rootData]];if(W.opts.dynamicRef)V.push([GF.default.dynamicAnchors,GF.default.dynamicAnchors]);let A=e5._`${z}, ${X.object(...V)}`;return K!==e5.nil?e5._`${Z}.call(${K}, ${A})`:e5._`${Z}(${A})`}wI1.callValidateCode=h48;var f48=e5._`new RegExp`;function g48({gen:$,it:{opts:Y}},X){let G=Y.unicodeRegExp?"u":"",{regExp:J}=Y.code,Q=J(X,G);return $.scopeValue("pattern",{key:Q.toString(),ref:Q,code:e5._`${J.code==="new RegExp"?f48:(0,S48.useFunc)($,J)}(${X}, ${G})`})}wI1.usePattern=g48;function m48($){let{gen:Y,data:X,keyword:G,it:J}=$,Q=Y.name("valid");if(J.allErrors){let Z=Y.let("valid",!0);return W(()=>Y.assign(Z,!1)),Z}return Y.var(Q,!0),W(()=>Y.break()),Q;function W(Z){let K=Y.const("len",e5._`${X}.length`);Y.forRange("i",0,K,(H)=>{$.subschema({keyword:G,dataProp:H,dataPropType:QD0.Type.Num},Q),Y.if((0,e5.not)(Q),Z)})}}wI1.validateArray=m48;function u48($){let{gen:Y,schema:X,keyword:G,it:J}=$;if(!Array.isArray(X))throw Error("ajv implementation error");if(X.some((K)=>(0,QD0.alwaysValidSchema)(J,K))&&!J.opts.unevaluated)return;let W=Y.let("valid",!1),Z=Y.name("_valid");Y.block(()=>X.forEach((K,H)=>{let z=$.subschema({keyword:G,schemaProp:H,compositeRule:!0},Z);if(Y.assign(W,e5._`${W} || ${Z}`),!$.mergeValidEvaluated(z,Z))Y.if((0,e5.not)(W))})),$.result(W,()=>$.reset(),()=>$.error(!0))}wI1.validateUnion=u48});var kI1=o((CI1)=>{Object.defineProperty(CI1,"__esModule",{value:!0});CI1.validateKeywordUsage=CI1.validSchemaType=CI1.funcKeywordCode=CI1.macroKeywordCode=void 0;var yG=d6(),OB=Fz(),$68=xZ(),Y68=_y();function X68($,Y){let{gen:X,keyword:G,schema:J,parentSchema:Q,it:W}=$,Z=Y.macro.call(W.self,J,Q,W),K=TI1(X,G,Z);if(W.opts.validateSchema!==!1)W.self.validateSchema(Z,!0);let H=X.name("valid");$.subschema({schema:Z,schemaPath:yG.nil,errSchemaPath:`${W.errSchemaPath}/${G}`,topSchemaRef:K,compositeRule:!0},H),$.pass(H,()=>$.error(!0))}CI1.macroKeywordCode=X68;function G68($,Y){var X;let{gen:G,keyword:J,schema:Q,parentSchema:W,$data:Z,it:K}=$;Q68(K,Y);let H=!Z&&Y.compile?Y.compile.call(K.self,Q,W,K):Y.validate,z=TI1(G,J,H),V=G.let("valid");$.block$data(V,A),$.ok((X=Y.valid)!==null&&X!==void 0?X:V);function A(){if(Y.errors===!1){if(D(),Y.modifying)jI1($);L(()=>$.error())}else{let B=Y.async?F():N();if(Y.modifying)jI1($);L(()=>J68($,B))}}function F(){let B=G.let("ruleErrs",null);return G.try(()=>D(yG._`await `),(O)=>G.assign(V,!1).if(yG._`${O} instanceof ${K.ValidationError}`,()=>G.assign(B,yG._`${O}.errors`),()=>G.throw(O))),B}function N(){let B=yG._`${z}.errors`;return G.assign(B,null),D(yG.nil),B}function D(B=Y.async?yG._`await `:yG.nil){let O=K.opts.passContext?OB.default.this:OB.default.self,E=!(("compile"in Y)&&!Z||Y.schema===!1);G.assign(V,yG._`${B}${(0,$68.callValidateCode)($,z,O,E)}`,Y.modifying)}function L(B){var O;G.if((0,yG.not)((O=Y.valid)!==null&&O!==void 0?O:V),B)}}CI1.funcKeywordCode=G68;function jI1($){let{gen:Y,data:X,it:G}=$;Y.if(G.parentData,()=>Y.assign(X,yG._`${G.parentData}[${G.parentDataProperty}]`))}function J68($,Y){let{gen:X}=$;X.if(yG._`Array.isArray(${Y})`,()=>{X.assign(OB.default.vErrors,yG._`${OB.default.vErrors} === null ? ${Y} : ${OB.default.vErrors}.concat(${Y})`).assign(OB.default.errors,yG._`${OB.default.vErrors}.length`),(0,Y68.extendErrors)($)},()=>$.error())}function Q68({schemaEnv:$},Y){if(Y.async&&!$.$async)throw Error("async keyword in sync schema")}function TI1($,Y,X){if(X===void 0)throw Error(`keyword "${Y}" failed to compile`);return $.scopeValue("keyword",typeof X=="function"?{ref:X}:{ref:X,code:(0,yG.stringify)(X)})}function W68($,Y,X=!1){return!Y.length||Y.some((G)=>G==="array"?Array.isArray($):G==="object"?$&&typeof $=="object"&&!Array.isArray($):typeof $==G||X&&typeof $>"u")}CI1.validSchemaType=W68;function Z68({schema:$,opts:Y,self:X,errSchemaPath:G},J,Q){if(Array.isArray(J.keyword)?!J.keyword.includes(Q):J.keyword!==Q)throw Error("ajv implementation error");let W=J.dependencies;if(W===null||W===void 0?void 0:W.some((Z)=>!Object.prototype.hasOwnProperty.call($,Z)))throw Error(`parent schema must have dependencies of ${Q}: ${W.join(",")}`);if(J.validateSchema){if(!J.validateSchema($[Q])){let K=`keyword "${Q}" value is invalid at path "${G}": `+X.errorsText(J.validateSchema.errors);if(Y.validateSchema==="log")X.logger.error(K);else throw Error(K)}}}CI1.validateKeywordUsage=Z68});var bI1=o((xI1)=>{Object.defineProperty(xI1,"__esModule",{value:!0});xI1.extendSubschemaMode=xI1.extendSubschemaData=xI1.getSubschema=void 0;var UU=d6(),vI1=g8();function z68($,{keyword:Y,schemaProp:X,schema:G,schemaPath:J,errSchemaPath:Q,topSchemaRef:W}){if(Y!==void 0&&G!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(Y!==void 0){let Z=$.schema[Y];return X===void 0?{schema:Z,schemaPath:UU._`${$.schemaPath}${(0,UU.getProperty)(Y)}`,errSchemaPath:`${$.errSchemaPath}/${Y}`}:{schema:Z[X],schemaPath:UU._`${$.schemaPath}${(0,UU.getProperty)(Y)}${(0,UU.getProperty)(X)}`,errSchemaPath:`${$.errSchemaPath}/${Y}/${(0,vI1.escapeFragment)(X)}`}}if(G!==void 0){if(J===void 0||Q===void 0||W===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:G,schemaPath:J,topSchemaRef:W,errSchemaPath:Q}}throw Error('either "keyword" or "schema" must be passed')}xI1.getSubschema=z68;function V68($,Y,{dataProp:X,dataPropType:G,data:J,dataTypes:Q,propertyName:W}){if(J!==void 0&&X!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:Z}=Y;if(X!==void 0){let{errorPath:H,dataPathArr:z,opts:V}=Y,A=Z.let("data",UU._`${Y.data}${(0,UU.getProperty)(X)}`,!0);K(A),$.errorPath=UU.str`${H}${(0,vI1.getErrorPath)(X,G,V.jsPropertySyntax)}`,$.parentDataProperty=UU._`${X}`,$.dataPathArr=[...z,$.parentDataProperty]}if(J!==void 0){let H=J instanceof UU.Name?J:Z.let("data",J,!0);if(K(H),W!==void 0)$.propertyName=W}if(Q)$.dataTypes=Q;function K(H){$.data=H,$.dataLevel=Y.dataLevel+1,$.dataTypes=[],Y.definedProperties=new Set,$.parentData=Y.data,$.dataNames=[...Y.dataNames,H]}}xI1.extendSubschemaData=V68;function A68($,{jtdDiscriminator:Y,jtdMetadata:X,compositeRule:G,createErrors:J,allErrors:Q}){if(G!==void 0)$.compositeRule=G;if(J!==void 0)$.createErrors=J;if(Q!==void 0)$.allErrors=Q;$.jtdDiscriminator=Y,$.jtdMetadata=X}xI1.extendSubschemaMode=A68});var yo=o((Sk5,hI1)=>{hI1.exports=function $(Y,X){if(Y===X)return!0;if(Y&&X&&typeof Y=="object"&&typeof X=="object"){if(Y.constructor!==X.constructor)return!1;var G,J,Q;if(Array.isArray(Y)){if(G=Y.length,G!=X.length)return!1;for(J=G;J--!==0;)if(!$(Y[J],X[J]))return!1;return!0}if(Y.constructor===RegExp)return Y.source===X.source&&Y.flags===X.flags;if(Y.valueOf!==Object.prototype.valueOf)return Y.valueOf()===X.valueOf();if(Y.toString!==Object.prototype.toString)return Y.toString()===X.toString();if(Q=Object.keys(Y),G=Q.length,G!==Object.keys(X).length)return!1;for(J=G;J--!==0;)if(!Object.prototype.hasOwnProperty.call(X,Q[J]))return!1;for(J=G;J--!==0;){var W=Q[J];if(!$(Y[W],X[W]))return!1}return!0}return Y!==Y&&X!==X}});var gI1=o((kk5,fI1)=>{var JF=fI1.exports=function($,Y,X){if(typeof Y=="function")X=Y,Y={};X=Y.cb||X;var G=typeof X=="function"?X:X.pre||function(){},J=X.post||function(){};bo(Y,G,J,$,"",$)};JF.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};JF.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};JF.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};JF.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function bo($,Y,X,G,J,Q,W,Z,K,H){if(G&&typeof G=="object"&&!Array.isArray(G)){Y(G,J,Q,W,Z,K,H);for(var z in G){var V=G[z];if(Array.isArray(V)){if(z in JF.arrayKeywords)for(var A=0;A<V.length;A++)bo($,Y,X,V[A],J+"/"+z+"/"+A,Q,J,z,G,A)}else if(z in JF.propsKeywords){if(V&&typeof V=="object")for(var F in V)bo($,Y,X,V[F],J+"/"+z+"/"+N68(F),Q,J,z,G,F)}else if(z in JF.keywords||$.allKeys&&!(z in JF.skipKeywords))bo($,Y,X,V,J+"/"+z,Q,J,z,G)}X(G,J,Q,W,Z,K,H)}}function N68($){return $.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ty=o((dI1)=>{Object.defineProperty(dI1,"__esModule",{value:!0});dI1.getSchemaRefs=dI1.resolveUrl=dI1.normalizeId=dI1._getFullPath=dI1.getFullPath=dI1.inlineRef=void 0;var L68=g8(),B68=yo(),O68=gI1(),E68=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function M68($,Y=!0){if(typeof $=="boolean")return!0;if(Y===!0)return!KD0($);if(!Y)return!1;return mI1($)<=Y}dI1.inlineRef=M68;var R68=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function KD0($){for(let Y in $){if(R68.has(Y))return!0;let X=$[Y];if(Array.isArray(X)&&X.some(KD0))return!0;if(typeof X=="object"&&KD0(X))return!0}return!1}function mI1($){let Y=0;for(let X in $){if(X==="$ref")return 1/0;if(Y++,E68.has(X))continue;if(typeof $[X]=="object")(0,L68.eachItem)($[X],(G)=>Y+=mI1(G));if(Y===1/0)return 1/0}return Y}function uI1($,Y="",X){if(X!==!1)Y=aI(Y);let G=$.parse(Y);return pI1($,G)}dI1.getFullPath=uI1;function pI1($,Y){return $.serialize(Y).split("#")[0]+"#"}dI1._getFullPath=pI1;var q68=/#\/?$/;function aI($){return $?$.replace(q68,""):""}dI1.normalizeId=aI;function I68($,Y,X){return X=aI(X),$.resolve(Y,X)}dI1.resolveUrl=I68;var P68=/^[a-z_][-a-z0-9._]*$/i;function w68($,Y){if(typeof $=="boolean")return{};let{schemaId:X,uriResolver:G}=this.opts,J=aI($[X]||Y),Q={"":J},W=uI1(G,J,!1),Z={},K=new Set;return O68($,{allKeys:!0},(V,A,F,N)=>{if(N===void 0)return;let D=W+A,L=Q[N];if(typeof V[X]=="string")L=B.call(this,V[X]);O.call(this,V.$anchor),O.call(this,V.$dynamicAnchor),Q[A]=L;function B(E){let M=this.opts.uriResolver.resolve;if(E=aI(L?M(L,E):E),K.has(E))throw z(E);K.add(E);let R=this.refs[E];if(typeof R=="string")R=this.refs[R];if(typeof R=="object")H(V,R.schema,E);else if(E!==aI(D))if(E[0]==="#")H(V,Z[E],E),Z[E]=V;else this.refs[E]=D;return E}function O(E){if(typeof E=="string"){if(!P68.test(E))throw Error(`invalid anchor "${E}"`);B.call(this,`#${E}`)}}}),Z;function H(V,A,F){if(A!==void 0&&!B68(V,A))throw z(F)}function z(V){return Error(`reference "${V}" resolves to more than one schema`)}}dI1.getSchemaRefs=w68});var ky=o((QP1)=>{Object.defineProperty(QP1,"__esModule",{value:!0});QP1.getData=QP1.KeywordCxt=QP1.validateFunctionCode=void 0;var aI1=KI1(),lI1=jy(),HD0=YD0(),ho=jy(),k68=qI1(),Sy=kI1(),UD0=bI1(),y4=d6(),B6=Fz(),v68=Ty(),Dz=g8(),Cy=_y();function x68($){if(tI1($)){if(eI1($),oI1($)){h68($);return}}sI1($,()=>(0,aI1.topBoolOrEmptySchema)($))}QP1.validateFunctionCode=x68;function sI1({gen:$,validateName:Y,schema:X,schemaEnv:G,opts:J},Q){if(J.code.es5)$.func(Y,y4._`${B6.default.data}, ${B6.default.valCxt}`,G.$async,()=>{$.code(y4._`"use strict"; ${iI1(X,J)}`),b68($,J),$.code(Q)});else $.func(Y,y4._`${B6.default.data}, ${y68(J)}`,G.$async,()=>$.code(iI1(X,J)).code(Q))}function y68($){return y4._`{${B6.default.instancePath}="", ${B6.default.parentData}, ${B6.default.parentDataProperty}, ${B6.default.rootData}=${B6.default.data}${$.dynamicRef?y4._`, ${B6.default.dynamicAnchors}={}`:y4.nil}}={}`}function b68($,Y){$.if(B6.default.valCxt,()=>{if($.var(B6.default.instancePath,y4._`${B6.default.valCxt}.${B6.default.instancePath}`),$.var(B6.default.parentData,y4._`${B6.default.valCxt}.${B6.default.parentData}`),$.var(B6.default.parentDataProperty,y4._`${B6.default.valCxt}.${B6.default.parentDataProperty}`),$.var(B6.default.rootData,y4._`${B6.default.valCxt}.${B6.default.rootData}`),Y.dynamicRef)$.var(B6.default.dynamicAnchors,y4._`${B6.default.valCxt}.${B6.default.dynamicAnchors}`)},()=>{if($.var(B6.default.instancePath,y4._`""`),$.var(B6.default.parentData,y4._`undefined`),$.var(B6.default.parentDataProperty,y4._`undefined`),$.var(B6.default.rootData,B6.default.data),Y.dynamicRef)$.var(B6.default.dynamicAnchors,y4._`{}`)})}function h68($){let{schema:Y,opts:X,gen:G}=$;sI1($,()=>{if(X.$comment&&Y.$comment)YP1($);if(p68($),G.let(B6.default.vErrors,null),G.let(B6.default.errors,0),X.unevaluated)f68($);$P1($),l68($)});return}function f68($){let{gen:Y,validateName:X}=$;$.evaluated=Y.const("evaluated",y4._`${X}.evaluated`),Y.if(y4._`${$.evaluated}.dynamicProps`,()=>Y.assign(y4._`${$.evaluated}.props`,y4._`undefined`)),Y.if(y4._`${$.evaluated}.dynamicItems`,()=>Y.assign(y4._`${$.evaluated}.items`,y4._`undefined`))}function iI1($,Y){let X=typeof $=="object"&&$[Y.schemaId];return X&&(Y.code.source||Y.code.process)?y4._`/*# sourceURL=${X} */`:y4.nil}function g68($,Y){if(tI1($)){if(eI1($),oI1($)){m68($,Y);return}}(0,aI1.boolOrEmptySchema)($,Y)}function oI1({schema:$,self:Y}){if(typeof $=="boolean")return!$;for(let X in $)if(Y.RULES.all[X])return!0;return!1}function tI1($){return typeof $.schema!="boolean"}function m68($,Y){let{schema:X,gen:G,opts:J}=$;if(J.$comment&&X.$comment)YP1($);d68($),c68($);let Q=G.const("_errs",B6.default.errors);$P1($,Q),G.var(Y,y4._`${Q} === ${B6.default.errors}`)}function eI1($){(0,Dz.checkUnknownRules)($),u68($)}function $P1($,Y){if($.opts.jtd)return nI1($,[],!1,Y);let X=(0,lI1.getSchemaTypes)($.schema),G=(0,lI1.coerceAndCheckDataType)($,X);nI1($,X,!G,Y)}function u68($){let{schema:Y,errSchemaPath:X,opts:G,self:J}=$;if(Y.$ref&&G.ignoreKeywordsWithRef&&(0,Dz.schemaHasRulesButRef)(Y,J.RULES))J.logger.warn(`$ref: keywords ignored in schema at path "${X}"`)}function p68($){let{schema:Y,opts:X}=$;if(Y.default!==void 0&&X.useDefaults&&X.strictSchema)(0,Dz.checkStrictMode)($,"default is ignored in the schema root")}function d68($){let Y=$.schema[$.opts.schemaId];if(Y)$.baseId=(0,v68.resolveUrl)($.opts.uriResolver,$.baseId,Y)}function c68($){if($.schema.$async&&!$.schemaEnv.$async)throw Error("async schema in sync schema")}function YP1({gen:$,schemaEnv:Y,schema:X,errSchemaPath:G,opts:J}){let Q=X.$comment;if(J.$comment===!0)$.code(y4._`${B6.default.self}.logger.log(${Q})`);else if(typeof J.$comment=="function"){let W=y4.str`${G}/$comment`,Z=$.scopeValue("root",{ref:Y.root});$.code(y4._`${B6.default.self}.opts.$comment(${Q}, ${W}, ${Z}.schema)`)}}function l68($){let{gen:Y,schemaEnv:X,validateName:G,ValidationError:J,opts:Q}=$;if(X.$async)Y.if(y4._`${B6.default.errors} === 0`,()=>Y.return(B6.default.data),()=>Y.throw(y4._`new ${J}(${B6.default.vErrors})`));else{if(Y.assign(y4._`${G}.errors`,B6.default.vErrors),Q.unevaluated)i68($);Y.return(y4._`${B6.default.errors} === 0`)}}function i68({gen:$,evaluated:Y,props:X,items:G}){if(X instanceof y4.Name)$.assign(y4._`${Y}.props`,X);if(G instanceof y4.Name)$.assign(y4._`${Y}.items`,G)}function nI1($,Y,X,G){let{gen:J,schema:Q,data:W,allErrors:Z,opts:K,self:H}=$,{RULES:z}=H;if(Q.$ref&&(K.ignoreKeywordsWithRef||!(0,Dz.schemaHasRulesButRef)(Q,z))){J.block(()=>GP1($,"$ref",z.all.$ref.definition));return}if(!K.jtd)n68($,Y);J.block(()=>{for(let A of z.rules)V(A);V(z.post)});function V(A){if(!(0,HD0.shouldUseGroup)(Q,A))return;if(A.type){if(J.if((0,ho.checkDataType)(A.type,W,K.strictNumbers)),rI1($,A),Y.length===1&&Y[0]===A.type&&X)J.else(),(0,ho.reportTypeError)($);J.endIf()}else rI1($,A);if(!Z)J.if(y4._`${B6.default.errors} === ${G||0}`)}}function rI1($,Y){let{gen:X,schema:G,opts:{useDefaults:J}}=$;if(J)(0,k68.assignDefaults)($,Y.type);X.block(()=>{for(let Q of Y.rules)if((0,HD0.shouldUseRule)(G,Q))GP1($,Q.keyword,Q.definition,Y.type)})}function n68($,Y){if($.schemaEnv.meta||!$.opts.strictTypes)return;if(r68($,Y),!$.opts.allowUnionTypes)a68($,Y);s68($,$.dataTypes)}function r68($,Y){if(!Y.length)return;if(!$.dataTypes.length){$.dataTypes=Y;return}Y.forEach((X)=>{if(!XP1($.dataTypes,X))zD0($,`type "${X}" not allowed by context "${$.dataTypes.join(",")}"`)}),t68($,Y)}function a68($,Y){if(Y.length>1&&!(Y.length===2&&Y.includes("null")))zD0($,"use allowUnionTypes to allow union type keyword")}function s68($,Y){let X=$.self.RULES.all;for(let G in X){let J=X[G];if(typeof J=="object"&&(0,HD0.shouldUseRule)($.schema,J)){let{type:Q}=J.definition;if(Q.length&&!Q.some((W)=>o68(Y,W)))zD0($,`missing type "${Q.join(",")}" for keyword "${G}"`)}}}function o68($,Y){return $.includes(Y)||Y==="number"&&$.includes("integer")}function XP1($,Y){return $.includes(Y)||Y==="integer"&&$.includes("number")}function t68($,Y){let X=[];for(let G of $.dataTypes)if(XP1(Y,G))X.push(G);else if(Y.includes("integer")&&G==="number")X.push("integer");$.dataTypes=X}function zD0($,Y){let X=$.schemaEnv.baseId+$.errSchemaPath;Y+=` at "${X}" (strictTypes)`,(0,Dz.checkStrictMode)($,Y,$.opts.strictTypes)}class VD0{constructor($,Y,X){if((0,Sy.validateKeywordUsage)($,Y,X),this.gen=$.gen,this.allErrors=$.allErrors,this.keyword=X,this.data=$.data,this.schema=$.schema[X],this.$data=Y.$data&&$.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Dz.schemaRefOrVal)($,this.schema,X,this.$data),this.schemaType=Y.schemaType,this.parentSchema=$.schema,this.params={},this.it=$,this.def=Y,this.$data)this.schemaCode=$.gen.const("vSchema",JP1(this.$data,$));else if(this.schemaCode=this.schemaValue,!(0,Sy.validSchemaType)(this.schema,Y.schemaType,Y.allowUndefined))throw Error(`${X} value must be ${JSON.stringify(Y.schemaType)}`);if("code"in Y?Y.trackErrors:Y.errors!==!1)this.errsCount=$.gen.const("_errs",B6.default.errors)}result($,Y,X){this.failResult((0,y4.not)($),Y,X)}failResult($,Y,X){if(this.gen.if($),X)X();else this.error();if(Y){if(this.gen.else(),Y(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass($,Y){this.failResult((0,y4.not)($),void 0,Y)}fail($){if($===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if($),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data($){if(!this.$data)return this.fail($);let{schemaCode:Y}=this;this.fail(y4._`${Y} !== undefined && (${(0,y4.or)(this.invalid$data(),$)})`)}error($,Y,X){if(Y){this.setParams(Y),this._error($,X),this.setParams({});return}this._error($,X)}_error($,Y){($?Cy.reportExtraError:Cy.reportError)(this,this.def.error,Y)}$dataError(){(0,Cy.reportError)(this,this.def.$dataError||Cy.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,Cy.resetErrorsCount)(this.gen,this.errsCount)}ok($){if(!this.allErrors)this.gen.if($)}setParams($,Y){if(Y)Object.assign(this.params,$);else this.params=$}block$data($,Y,X=y4.nil){this.gen.block(()=>{this.check$data($,X),Y()})}check$data($=y4.nil,Y=y4.nil){if(!this.$data)return;let{gen:X,schemaCode:G,schemaType:J,def:Q}=this;if(X.if((0,y4.or)(y4._`${G} === undefined`,Y)),$!==y4.nil)X.assign($,!0);if(J.length||Q.validateSchema){if(X.elseIf(this.invalid$data()),this.$dataError(),$!==y4.nil)X.assign($,!1)}X.else()}invalid$data(){let{gen:$,schemaCode:Y,schemaType:X,def:G,it:J}=this;return(0,y4.or)(Q(),W());function Q(){if(X.length){if(!(Y instanceof y4.Name))throw Error("ajv implementation error");let Z=Array.isArray(X)?X:[X];return y4._`${(0,ho.checkDataTypes)(Z,Y,J.opts.strictNumbers,ho.DataType.Wrong)}`}return y4.nil}function W(){if(G.validateSchema){let Z=$.scopeValue("validate$data",{ref:G.validateSchema});return y4._`!${Z}(${Y})`}return y4.nil}}subschema($,Y){let X=(0,UD0.getSubschema)(this.it,$);(0,UD0.extendSubschemaData)(X,this.it,$),(0,UD0.extendSubschemaMode)(X,$);let G={...this.it,...X,items:void 0,props:void 0};return g68(G,Y),G}mergeEvaluated($,Y){let{it:X,gen:G}=this;if(!X.opts.unevaluated)return;if(X.props!==!0&&$.props!==void 0)X.props=Dz.mergeEvaluated.props(G,$.props,X.props,Y);if(X.items!==!0&&$.items!==void 0)X.items=Dz.mergeEvaluated.items(G,$.items,X.items,Y)}mergeValidEvaluated($,Y){let{it:X,gen:G}=this;if(X.opts.unevaluated&&(X.props!==!0||X.items!==!0))return G.if(Y,()=>this.mergeEvaluated($,y4.Name)),!0}}QP1.KeywordCxt=VD0;function GP1($,Y,X,G){let J=new VD0($,X,Y);if("code"in X)X.code(J,G);else if(J.$data&&X.validate)(0,Sy.funcKeywordCode)(J,X);else if("macro"in X)(0,Sy.macroKeywordCode)(J,X);else if(X.compile||X.validate)(0,Sy.funcKeywordCode)(J,X)}var e68=/^\/(?:[^~]|~0|~1)*$/,$88=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function JP1($,{dataLevel:Y,dataNames:X,dataPathArr:G}){let J,Q;if($==="")return B6.default.rootData;if($[0]==="/"){if(!e68.test($))throw Error(`Invalid JSON-pointer: ${$}`);J=$,Q=B6.default.rootData}else{let H=$88.exec($);if(!H)throw Error(`Invalid JSON-pointer: ${$}`);let z=+H[1];if(J=H[2],J==="#"){if(z>=Y)throw Error(K("property/index",z));return G[Y-z]}if(z>Y)throw Error(K("data",z));if(Q=X[Y-z],!J)return Q}let W=Q,Z=J.split("/");for(let H of Z)if(H)Q=y4._`${Q}${(0,y4.getProperty)((0,Dz.unescapeJsonPointer)(H))}`,W=y4._`${W} && ${Q}`;return W;function K(H,z){return`Cannot access ${H} ${z} levels up, current level is ${Y}`}}QP1.getData=JP1});var fo=o((KP1)=>{Object.defineProperty(KP1,"__esModule",{value:!0});class ZP1 extends Error{constructor($){super("validation failed");this.errors=$,this.ajv=this.validation=!0}}KP1.default=ZP1});var vy=o((HP1)=>{Object.defineProperty(HP1,"__esModule",{value:!0});var AD0=Ty();class UP1 extends Error{constructor($,Y,X,G){super(G||`can't resolve reference ${X} from id ${Y}`);this.missingRef=(0,AD0.resolveUrl)($,Y,X),this.missingSchema=(0,AD0.normalizeId)((0,AD0.getFullPath)($,this.missingRef))}}HP1.default=UP1});var mo=o((AP1)=>{Object.defineProperty(AP1,"__esModule",{value:!0});AP1.resolveSchema=AP1.getCompilingSchema=AP1.resolveRef=AP1.compileSchema=AP1.SchemaEnv=void 0;var XK=d6(),Q88=fo(),EB=Fz(),GK=Ty(),zP1=g8(),W88=ky();class xy{constructor($){var Y;this.refs={},this.dynamicAnchors={};let X;if(typeof $.schema=="object")X=$.schema;this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(Y=$.baseId)!==null&&Y!==void 0?Y:(0,GK.normalizeId)(X===null||X===void 0?void 0:X[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=X===null||X===void 0?void 0:X.$async,this.refs={}}}AP1.SchemaEnv=xy;function DD0($){let Y=VP1.call(this,$);if(Y)return Y;let X=(0,GK.getFullPath)(this.opts.uriResolver,$.root.baseId),{es5:G,lines:J}=this.opts.code,{ownProperties:Q}=this.opts,W=new XK.CodeGen(this.scope,{es5:G,lines:J,ownProperties:Q}),Z;if($.$async)Z=W.scopeValue("Error",{ref:Q88.default,code:XK._`require("ajv/dist/runtime/validation_error").default`});let K=W.scopeName("validate");$.validateName=K;let H={gen:W,allErrors:this.opts.allErrors,data:EB.default.data,parentData:EB.default.parentData,parentDataProperty:EB.default.parentDataProperty,dataNames:[EB.default.data],dataPathArr:[XK.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:W.scopeValue("schema",this.opts.code.source===!0?{ref:$.schema,code:(0,XK.stringify)($.schema)}:{ref:$.schema}),validateName:K,ValidationError:Z,schema:$.schema,schemaEnv:$,rootId:X,baseId:$.baseId||X,schemaPath:XK.nil,errSchemaPath:$.schemaPath||(this.opts.jtd?"":"#"),errorPath:XK._`""`,opts:this.opts,self:this},z;try{this._compilations.add($),(0,W88.validateFunctionCode)(H),W.optimize(this.opts.code.optimize);let V=W.toString();if(z=`${W.scopeRefs(EB.default.scope)}return ${V}`,this.opts.code.process)z=this.opts.code.process(z,$);let F=Function(`${EB.default.self}`,`${EB.default.scope}`,z)(this,this.scope.get());if(this.scope.value(K,{ref:F}),F.errors=null,F.schema=$.schema,F.schemaEnv=$,$.$async)F.$async=!0;if(this.opts.code.source===!0)F.source={validateName:K,validateCode:V,scopeValues:W._values};if(this.opts.unevaluated){let{props:N,items:D}=H;if(F.evaluated={props:N instanceof XK.Name?void 0:N,items:D instanceof XK.Name?void 0:D,dynamicProps:N instanceof XK.Name,dynamicItems:D instanceof XK.Name},F.source)F.source.evaluated=(0,XK.stringify)(F.evaluated)}return $.validate=F,$}catch(V){if(delete $.validate,delete $.validateName,z)this.logger.error("Error compiling schema, function code:",z);throw V}finally{this._compilations.delete($)}}AP1.compileSchema=DD0;function Z88($,Y,X){var G;X=(0,GK.resolveUrl)(this.opts.uriResolver,Y,X);let J=$.refs[X];if(J)return J;let Q=H88.call(this,$,X);if(Q===void 0){let W=(G=$.localRefs)===null||G===void 0?void 0:G[X],{schemaId:Z}=this.opts;if(W)Q=new xy({schema:W,schemaId:Z,root:$,baseId:Y})}if(Q===void 0)return;return $.refs[X]=K88.call(this,Q)}AP1.resolveRef=Z88;function K88($){if((0,GK.inlineRef)($.schema,this.opts.inlineRefs))return $.schema;return $.validate?$:DD0.call(this,$)}function VP1($){for(let Y of this._compilations)if(U88(Y,$))return Y}AP1.getCompilingSchema=VP1;function U88($,Y){return $.schema===Y.schema&&$.root===Y.root&&$.baseId===Y.baseId}function H88($,Y){let X;while(typeof(X=this.refs[Y])=="string")Y=X;return X||this.schemas[Y]||go.call(this,$,Y)}function go($,Y){let X=this.opts.uriResolver.parse(Y),G=(0,GK._getFullPath)(this.opts.uriResolver,X),J=(0,GK.getFullPath)(this.opts.uriResolver,$.baseId,void 0);if(Object.keys($.schema).length>0&&G===J)return FD0.call(this,X,$);let Q=(0,GK.normalizeId)(G),W=this.refs[Q]||this.schemas[Q];if(typeof W=="string"){let Z=go.call(this,$,W);if(typeof(Z===null||Z===void 0?void 0:Z.schema)!=="object")return;return FD0.call(this,X,Z)}if(typeof(W===null||W===void 0?void 0:W.schema)!=="object")return;if(!W.validate)DD0.call(this,W);if(Q===(0,GK.normalizeId)(Y)){let{schema:Z}=W,{schemaId:K}=this.opts,H=Z[K];if(H)J=(0,GK.resolveUrl)(this.opts.uriResolver,J,H);return new xy({schema:Z,schemaId:K,root:$,baseId:J})}return FD0.call(this,X,W)}AP1.resolveSchema=go;var z88=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function FD0($,{baseId:Y,schema:X,root:G}){var J;if(((J=$.fragment)===null||J===void 0?void 0:J[0])!=="/")return;for(let Z of $.fragment.slice(1).split("/")){if(typeof X==="boolean")return;let K=X[(0,zP1.unescapeFragment)(Z)];if(K===void 0)return;X=K;let H=typeof X==="object"&&X[this.opts.schemaId];if(!z88.has(Z)&&H)Y=(0,GK.resolveUrl)(this.opts.uriResolver,Y,H)}let Q;if(typeof X!="boolean"&&X.$ref&&!(0,zP1.schemaHasRulesButRef)(X,this.RULES)){let Z=(0,GK.resolveUrl)(this.opts.uriResolver,Y,X.$ref);Q=go.call(this,G,Z)}let{schemaId:W}=this.opts;if(Q=Q||new xy({schema:X,schemaId:W,root:G,baseId:Y}),Q.schema!==Q.root.schema)return Q;return}});var DP1=o((fk5,N88)=>{N88.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var BD0=o((gk5,MP1)=>{var L88=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),LP1=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),ND0=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),BP1=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),B88=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function LD0($){let Y="",X=0,G=0;for(G=0;G<$.length;G++){if(X=$[G].charCodeAt(0),X===48)continue;if(!(X>=48&&X<=57||X>=65&&X<=70||X>=97&&X<=102))return"";Y+=$[G];break}for(G+=1;G<$.length;G++){if(X=$[G].charCodeAt(0),!(X>=48&&X<=57||X>=65&&X<=70||X>=97&&X<=102))return"";Y+=$[G]}return Y}var O88=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function NP1($){return $.length=0,!0}function E88($,Y,X){if($.length){let G=LD0($);if(G!=="")Y.push(G);else return X.error=!0,!1;$.length=0}return!0}function M88($){let Y=0,X={error:!1,address:"",zone:""},G=[],J=[],Q=!1,W=!1,Z=E88;for(let K=0;K<$.length;K++){let H=$[K];if(H==="["||H==="]")continue;if(H===":"){if(Q===!0)W=!0;if(!Z(J,G,X))break;if(++Y>7){X.error=!0;break}if(K>0&&$[K-1]===":")Q=!0;G.push(":");continue}else if(H==="%"){if(!Z(J,G,X))break;Z=NP1}else{J.push(H);continue}}if(J.length)if(Z===NP1)X.zone=J.join("");else if(W)G.push(J.join(""));else G.push(LD0(J));return X.address=G.join(""),X}function OP1($){if(R88($,":")<2)return{host:$,isIPV6:!1};let Y=M88($);if(!Y.error){let{address:X,address:G}=Y;if(Y.zone)X+="%"+Y.zone,G+="%25"+Y.zone;return{host:X,isIPV6:!0,escapedHost:G}}else return{host:$,isIPV6:!1}}function R88($,Y){let X=0;for(let G=0;G<$.length;G++)if($[G]===Y)X++;return X}function q88($){let Y=$,X=[],G=-1,J=0;while(J=Y.length){if(J===1)if(Y===".")break;else if(Y==="/"){X.push("/");break}else{X.push(Y);break}else if(J===2){if(Y[0]==="."){if(Y[1]===".")break;else if(Y[1]==="/"){Y=Y.slice(2);continue}}else if(Y[0]==="/"){if(Y[1]==="."||Y[1]==="/"){X.push("/");break}}}else if(J===3){if(Y==="/.."){if(X.length!==0)X.pop();X.push("/");break}}if(Y[0]==="."){if(Y[1]==="."){if(Y[2]==="/"){Y=Y.slice(3);continue}}else if(Y[1]==="/"){Y=Y.slice(2);continue}}else if(Y[0]==="/"){if(Y[1]==="."){if(Y[2]==="/"){Y=Y.slice(2);continue}else if(Y[2]==="."){if(Y[3]==="/"){if(Y=Y.slice(3),X.length!==0)X.pop();continue}}}}if((G=Y.indexOf("/",1))===-1){X.push(Y);break}else X.push(Y.slice(0,G)),Y=Y.slice(G)}return X.join("")}var I88={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},P88=/[@/?#:]/g,w88=/[@/?#]/g;function EP1($,Y){let X=Y?w88:P88;return X.lastIndex=0,$.replace(X,(G)=>I88[G])}function _88($,Y=!1){if($.indexOf("%")===-1)return $;let X="";for(let G=0;G<$.length;G++){if($[G]==="%"&&G+2<$.length){let J=$.slice(G+1,G+3);if(ND0(J)){let Q=J.toUpperCase(),W=String.fromCharCode(parseInt(Q,16));if(Y&&BP1(W))X+=W;else X+="%"+Q;G+=2;continue}}X+=$[G]}return X}function j88($){let Y="";for(let X=0;X<$.length;X++){if($[X]==="%"&&X+2<$.length){let G=$.slice(X+1,X+3);if(ND0(G)){let J=G.toUpperCase(),Q=String.fromCharCode(parseInt(J,16));if(Q!=="."&&BP1(Q))Y+=Q;else Y+="%"+J;X+=2;continue}}if(B88($[X]))Y+=$[X];else Y+=escape($[X])}return Y}function T88($){let Y="";for(let X=0;X<$.length;X++){if($[X]==="%"&&X+2<$.length){let G=$.slice(X+1,X+3);if(ND0(G)){Y+="%"+G.toUpperCase(),X+=2;continue}}Y+=escape($[X])}return Y}function C88($){let Y=[];if($.userinfo!==void 0)Y.push($.userinfo),Y.push("@");if($.host!==void 0){let X=unescape($.host);if(!LP1(X)){let G=OP1(X);if(G.isIPV6===!0)X=`[${G.escapedHost}]`;else X=EP1(X,!1)}Y.push(X)}if(typeof $.port==="number"||typeof $.port==="string")Y.push(":"),Y.push(String($.port));return Y.length?Y.join(""):void 0}MP1.exports={nonSimpleDomain:O88,recomposeAuthority:C88,reescapeHostDelimiters:EP1,normalizePercentEncoding:_88,normalizePathEncoding:j88,escapePreservingEscapes:T88,removeDotSegments:q88,isIPv4:LP1,isUUID:L88,normalizeIPv6:OP1,stringArrayToHexStripped:LD0}});var wP1=o((mk5,PP1)=>{var{isUUID:S88}=BD0(),k88=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,v88=["http","https","ws","wss","urn","urn:uuid"];function x88($){return v88.indexOf($)!==-1}function OD0($){if($.secure===!0)return!0;else if($.secure===!1)return!1;else if($.scheme)return $.scheme.length===3&&($.scheme[0]==="w"||$.scheme[0]==="W")&&($.scheme[1]==="s"||$.scheme[1]==="S")&&($.scheme[2]==="s"||$.scheme[2]==="S");else return!1}function RP1($){if(!$.host)$.error=$.error||"HTTP URIs must have a host.";return $}function qP1($){let Y=String($.scheme).toLowerCase()==="https";if($.port===(Y?443:80)||$.port==="")$.port=void 0;if(!$.path)$.path="/";return $}function y88($){return $.secure=OD0($),$.resourceName=($.path||"/")+($.query?"?"+$.query:""),$.path=void 0,$.query=void 0,$}function b88($){if($.port===(OD0($)?443:80)||$.port==="")$.port=void 0;if(typeof $.secure==="boolean")$.scheme=$.secure?"wss":"ws",$.secure=void 0;if($.resourceName){let[Y,X]=$.resourceName.split("?");$.path=Y&&Y!=="/"?Y:void 0,$.query=X,$.resourceName=void 0}return $.fragment=void 0,$}function h88($,Y){if(!$.path)return $.error="URN can not be parsed",$;let X=$.path.match(k88);if(X){let G=Y.scheme||$.scheme||"urn";$.nid=X[1].toLowerCase(),$.nss=X[2];let J=`${G}:${Y.nid||$.nid}`,Q=ED0(J);if($.path=void 0,Q)$=Q.parse($,Y)}else $.error=$.error||"URN can not be parsed.";return $}function f88($,Y){if($.nid===void 0)throw Error("URN without nid cannot be serialized");let X=Y.scheme||$.scheme||"urn",G=$.nid.toLowerCase(),J=`${X}:${Y.nid||G}`,Q=ED0(J);if(Q)$=Q.serialize($,Y);let W=$,Z=$.nss;return W.path=`${G||Y.nid}:${Z}`,Y.skipEscape=!0,W}function g88($,Y){let X=$;if(X.uuid=X.nss,X.nss=void 0,!Y.tolerant&&(!X.uuid||!S88(X.uuid)))X.error=X.error||"UUID is not valid.";return X}function m88($){let Y=$;return Y.nss=($.uuid||"").toLowerCase(),Y}var IP1={scheme:"http",domainHost:!0,parse:RP1,serialize:qP1},u88={scheme:"https",domainHost:IP1.domainHost,parse:RP1,serialize:qP1},uo={scheme:"ws",domainHost:!0,parse:y88,serialize:b88},p88={scheme:"wss",domainHost:uo.domainHost,parse:uo.parse,serialize:uo.serialize},d88={scheme:"urn",parse:h88,serialize:f88,skipNormalize:!0},c88={scheme:"urn:uuid",parse:g88,serialize:m88,skipNormalize:!0},po={http:IP1,https:u88,ws:uo,wss:p88,urn:d88,"urn:uuid":c88};Object.setPrototypeOf(po,null);function ED0($){return $&&(po[$]||po[$.toLowerCase()])||void 0}PP1.exports={wsIsSecure:OD0,SCHEMES:po,isValidSchemeName:x88,getSchemeHandler:ED0}});var kP1=o((uk5,co)=>{var{normalizeIPv6:l88,removeDotSegments:yy,recomposeAuthority:i88,normalizePercentEncoding:n88,normalizePathEncoding:r88,escapePreservingEscapes:a88,reescapeHostDelimiters:s88,isIPv4:o88,nonSimpleDomain:t88}=BD0(),{SCHEMES:e88,getSchemeHandler:jP1}=wP1();function $98($,Y){if(typeof $==="string")$=Q98($,Y);else if(typeof $==="object")$=sI(MB($,Y),Y);return $}function Y98($,Y,X){let G=X?Object.assign({scheme:"null"},X):{scheme:"null"},J=TP1(sI($,G),sI(Y,G),G,!0);return G.skipEscape=!0,MB(J,G)}function TP1($,Y,X,G){let J={};if(!G)$=sI(MB($,X),X),Y=sI(MB(Y,X),X);if(X=X||{},!X.tolerant&&Y.scheme)J.scheme=Y.scheme,J.userinfo=Y.userinfo,J.host=Y.host,J.port=Y.port,J.path=yy(Y.path||""),J.query=Y.query;else{if(Y.userinfo!==void 0||Y.host!==void 0||Y.port!==void 0)J.userinfo=Y.userinfo,J.host=Y.host,J.port=Y.port,J.path=yy(Y.path||""),J.query=Y.query;else{if(!Y.path)if(J.path=$.path,Y.query!==void 0)J.query=Y.query;else J.query=$.query;else{if(Y.path[0]==="/")J.path=yy(Y.path);else{if(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path)J.path="/"+Y.path;else if(!$.path)J.path=Y.path;else J.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+Y.path;J.path=yy(J.path)}J.query=Y.query}J.userinfo=$.userinfo,J.host=$.host,J.port=$.port}J.scheme=$.scheme}return J.fragment=Y.fragment,J}function X98($,Y,X){let G=_P1($,X),J=_P1(Y,X);return G!==void 0&&J!==void 0&&G.toLowerCase()===J.toLowerCase()}function MB($,Y){let X={host:$.host,scheme:$.scheme,userinfo:$.userinfo,port:$.port,path:$.path,query:$.query,nid:$.nid,nss:$.nss,uuid:$.uuid,fragment:$.fragment,reference:$.reference,resourceName:$.resourceName,secure:$.secure,error:""},G=Object.assign({},Y),J=[],Q=jP1(G.scheme||X.scheme);if(Q&&Q.serialize)Q.serialize(X,G);if(X.path!==void 0)if(!G.skipEscape){if(X.path=a88(X.path),X.scheme!==void 0)X.path=X.path.split("%3A").join(":")}else X.path=n88(X.path);if(G.reference!=="suffix"&&X.scheme)J.push(X.scheme,":");let W=i88(X);if(W!==void 0){if(G.reference!=="suffix")J.push("//");if(J.push(W),X.path&&X.path[0]!=="/")J.push("/")}if(X.path!==void 0){let Z=X.path;if(!G.absolutePath&&(!Q||!Q.absolutePath))Z=yy(Z);if(W===void 0&&Z[0]==="/"&&Z[1]==="/")Z="/%2F"+Z.slice(2);J.push(Z)}if(X.query!==void 0)J.push("?",X.query);if(X.fragment!==void 0)J.push("#",X.fragment);return J.join("")}var G98=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function J98($,Y){if(Y[2]!==void 0&&$.path&&$.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof $.port==="number"&&($.port<0||$.port>65535))return"URI port is malformed.";return}function CP1($,Y){let X=Object.assign({},Y),G={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},J=!1,Q=!1;if(X.reference==="suffix")if(X.scheme)$=X.scheme+":"+$;else $="//"+$;let W=$.match(G98);if(W){if(G.scheme=W[1],G.userinfo=W[3],G.host=W[4],G.port=parseInt(W[5],10),G.path=W[6]||"",G.query=W[7],G.fragment=W[8],isNaN(G.port))G.port=W[5];let Z=J98(G,W);if(Z!==void 0)G.error=G.error||Z,J=!0;if(G.host)if(o88(G.host)===!1){let z=l88(G.host);G.host=z.host.toLowerCase(),Q=z.isIPV6}else Q=!0;if(G.scheme===void 0&&G.userinfo===void 0&&G.host===void 0&&G.port===void 0&&G.query===void 0&&!G.path)G.reference="same-document";else if(G.scheme===void 0)G.reference="relative";else if(G.fragment===void 0)G.reference="absolute";else G.reference="uri";if(X.reference&&X.reference!=="suffix"&&X.reference!==G.reference)G.error=G.error||"URI is not a "+X.reference+" reference.";let K=jP1(X.scheme||G.scheme);if(!X.unicodeSupport&&(!K||!K.unicodeSupport)){if(G.host&&(X.domainHost||K&&K.domainHost)&&Q===!1&&t88(G.host))try{G.host=URL.domainToASCII(G.host.toLowerCase())}catch(H){G.error=G.error||"Host's domain name can not be converted to ASCII: "+H}}if(!K||K&&!K.skipNormalize){if($.indexOf("%")!==-1){if(G.scheme!==void 0)G.scheme=unescape(G.scheme);if(G.host!==void 0)G.host=s88(unescape(G.host),Q)}if(G.path)G.path=r88(G.path);if(G.fragment)try{G.fragment=encodeURI(decodeURIComponent(G.fragment))}catch{G.error=G.error||"URI malformed"}}if(K&&K.parse)K.parse(G,X)}else G.error=G.error||"URI can not be parsed.";return{parsed:G,malformedAuthorityOrPort:J}}function sI($,Y){return CP1($,Y).parsed}function Q98($,Y){return SP1($,Y).normalized}function SP1($,Y){let{parsed:X,malformedAuthorityOrPort:G}=CP1($,Y);return{normalized:G?$:MB(X,Y),malformedAuthorityOrPort:G}}function _P1($,Y){if(typeof $==="string"){let{normalized:X,malformedAuthorityOrPort:G}=SP1($,Y);return G?void 0:X}if(typeof $==="object")return MB($,Y)}var MD0={SCHEMES:e88,normalize:$98,resolve:Y98,resolveComponent:TP1,equal:X98,serialize:MB,parse:sI};co.exports=MD0;co.exports.default=MD0;co.exports.fastUri=MD0});var yP1=o((xP1)=>{Object.defineProperty(xP1,"__esModule",{value:!0});var vP1=kP1();vP1.code='require("ajv/dist/runtime/uri").default';xP1.default=vP1});var dP1=o((Nz)=>{Object.defineProperty(Nz,"__esModule",{value:!0});Nz.CodeGen=Nz.Name=Nz.nil=Nz.stringify=Nz.str=Nz._=Nz.KeywordCxt=void 0;var Z98=ky();Object.defineProperty(Nz,"KeywordCxt",{enumerable:!0,get:function(){return Z98.KeywordCxt}});var oI=d6();Object.defineProperty(Nz,"_",{enumerable:!0,get:function(){return oI._}});Object.defineProperty(Nz,"str",{enumerable:!0,get:function(){return oI.str}});Object.defineProperty(Nz,"stringify",{enumerable:!0,get:function(){return oI.stringify}});Object.defineProperty(Nz,"nil",{enumerable:!0,get:function(){return oI.nil}});Object.defineProperty(Nz,"Name",{enumerable:!0,get:function(){return oI.Name}});Object.defineProperty(Nz,"CodeGen",{enumerable:!0,get:function(){return oI.CodeGen}});var K98=fo(),mP1=vy(),U98=$D0(),by=mo(),H98=d6(),hy=Ty(),lo=jy(),qD0=g8(),bP1=DP1(),z98=yP1(),uP1=($,Y)=>new RegExp($,Y);uP1.code="new RegExp";var V98=["removeAdditional","useDefaults","coerceTypes"],A98=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),F98={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},D98={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},hP1=200;function N98($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D,L,B,O,E,M,R,q,w,I,P;let _=$.strict,C=(Y=$.code)===null||Y===void 0?void 0:Y.optimize,k=C===!0||C===void 0?1:C||0,S=(G=(X=$.code)===null||X===void 0?void 0:X.regExp)!==null&&G!==void 0?G:uP1,T=(J=$.uriResolver)!==null&&J!==void 0?J:z98.default;return{strictSchema:(W=(Q=$.strictSchema)!==null&&Q!==void 0?Q:_)!==null&&W!==void 0?W:!0,strictNumbers:(K=(Z=$.strictNumbers)!==null&&Z!==void 0?Z:_)!==null&&K!==void 0?K:!0,strictTypes:(z=(H=$.strictTypes)!==null&&H!==void 0?H:_)!==null&&z!==void 0?z:"log",strictTuples:(A=(V=$.strictTuples)!==null&&V!==void 0?V:_)!==null&&A!==void 0?A:"log",strictRequired:(N=(F=$.strictRequired)!==null&&F!==void 0?F:_)!==null&&N!==void 0?N:!1,code:$.code?{...$.code,optimize:k,regExp:S}:{optimize:k,regExp:S},loopRequired:(D=$.loopRequired)!==null&&D!==void 0?D:hP1,loopEnum:(L=$.loopEnum)!==null&&L!==void 0?L:hP1,meta:(B=$.meta)!==null&&B!==void 0?B:!0,messages:(O=$.messages)!==null&&O!==void 0?O:!0,inlineRefs:(E=$.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(M=$.schemaId)!==null&&M!==void 0?M:"$id",addUsedSchema:(R=$.addUsedSchema)!==null&&R!==void 0?R:!0,validateSchema:(q=$.validateSchema)!==null&&q!==void 0?q:!0,validateFormats:(w=$.validateFormats)!==null&&w!==void 0?w:!0,unicodeRegExp:(I=$.unicodeRegExp)!==null&&I!==void 0?I:!0,int32range:(P=$.int32range)!==null&&P!==void 0?P:!0,uriResolver:T}}class io{constructor($={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...N98($)};let{es5:Y,lines:X}=this.opts.code;this.scope=new H98.ValueScope({scope:{},prefixes:A98,es5:Y,lines:X}),this.logger=R98($.logger);let G=$.validateFormats;if($.validateFormats=!1,this.RULES=(0,U98.getRules)(),fP1.call(this,F98,$,"NOT SUPPORTED"),fP1.call(this,D98,$,"DEPRECATED","warn"),this._metaOpts=E98.call(this),$.formats)B98.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords)O98.call(this,$.keywords);if(typeof $.meta=="object")this.addMetaSchema($.meta);L98.call(this),$.validateFormats=G}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:$,meta:Y,schemaId:X}=this.opts,G=bP1;if(X==="id")G={...bP1},G.id=G.$id,delete G.$id;if(Y&&$)this.addMetaSchema(G,G[X],!1)}defaultMeta(){let{meta:$,schemaId:Y}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[Y]||$:void 0}validate($,Y){let X;if(typeof $=="string"){if(X=this.getSchema($),!X)throw Error(`no schema with key or ref "${$}"`)}else X=this.compile($);let G=X(Y);if(!("$async"in X))this.errors=X.errors;return G}compile($,Y){let X=this._addSchema($,Y);return X.validate||this._compileSchemaEnv(X)}compileAsync($,Y){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:X}=this.opts;return G.call(this,$,Y);async function G(H,z){await J.call(this,H.$schema);let V=this._addSchema(H,z);return V.validate||Q.call(this,V)}async function J(H){if(H&&!this.getSchema(H))await G.call(this,{$ref:H},!0)}async function Q(H){try{return this._compileSchemaEnv(H)}catch(z){if(!(z instanceof mP1.default))throw z;return W.call(this,z),await Z.call(this,z.missingSchema),Q.call(this,H)}}function W({missingSchema:H,missingRef:z}){if(this.refs[H])throw Error(`AnySchema ${H} is loaded but ${z} cannot be resolved`)}async function Z(H){let z=await K.call(this,H);if(!this.refs[H])await J.call(this,z.$schema);if(!this.refs[H])this.addSchema(z,H,Y)}async function K(H){let z=this._loading[H];if(z)return z;try{return await(this._loading[H]=X(H))}finally{delete this._loading[H]}}}addSchema($,Y,X,G=this.opts.validateSchema){if(Array.isArray($)){for(let Q of $)this.addSchema(Q,void 0,X,G);return this}let J;if(typeof $==="object"){let{schemaId:Q}=this.opts;if(J=$[Q],J!==void 0&&typeof J!="string")throw Error(`schema ${Q} must be string`)}return Y=(0,hy.normalizeId)(Y||J),this._checkUnique(Y),this.schemas[Y]=this._addSchema($,X,Y,G,!0),this}addMetaSchema($,Y,X=this.opts.validateSchema){return this.addSchema($,Y,!0,X),this}validateSchema($,Y){if(typeof $=="boolean")return!0;let X;if(X=$.$schema,X!==void 0&&typeof X!="string")throw Error("$schema must be a string");if(X=X||this.opts.defaultMeta||this.defaultMeta(),!X)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let G=this.validate(X,$);if(!G&&Y){let J="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(J);else throw Error(J)}return G}getSchema($){let Y;while(typeof(Y=gP1.call(this,$))=="string")$=Y;if(Y===void 0){let{schemaId:X}=this.opts,G=new by.SchemaEnv({schema:{},schemaId:X});if(Y=by.resolveSchema.call(this,G,$),!Y)return;this.refs[$]=Y}return Y.validate||this._compileSchemaEnv(Y)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let Y=gP1.call(this,$);if(typeof Y=="object")this._cache.delete(Y.schema);return delete this.schemas[$],delete this.refs[$],this}case"object":{let Y=$;this._cache.delete(Y);let X=$[this.opts.schemaId];if(X)X=(0,hy.normalizeId)(X),delete this.schemas[X],delete this.refs[X];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(let Y of $)this.addKeyword(Y);return this}addKeyword($,Y){let X;if(typeof $=="string"){if(X=$,typeof Y=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),Y.keyword=X}else if(typeof $=="object"&&Y===void 0){if(Y=$,X=Y.keyword,Array.isArray(X)&&!X.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(I98.call(this,X,Y),!Y)return(0,qD0.eachItem)(X,(J)=>RD0.call(this,J)),this;w98.call(this,Y);let G={...Y,type:(0,lo.getJSONTypes)(Y.type),schemaType:(0,lo.getJSONTypes)(Y.schemaType)};return(0,qD0.eachItem)(X,G.type.length===0?(J)=>RD0.call(this,J,G):(J)=>G.type.forEach((Q)=>RD0.call(this,J,G,Q))),this}getKeyword($){let Y=this.RULES.all[$];return typeof Y=="object"?Y.definition:!!Y}removeKeyword($){let{RULES:Y}=this;delete Y.keywords[$],delete Y.all[$];for(let X of Y.rules){let G=X.rules.findIndex((J)=>J.keyword===$);if(G>=0)X.rules.splice(G,1)}return this}addFormat($,Y){if(typeof Y=="string")Y=new RegExp(Y);return this.formats[$]=Y,this}errorsText($=this.errors,{separator:Y=", ",dataVar:X="data"}={}){if(!$||$.length===0)return"No errors";return $.map((G)=>`${X}${G.instancePath} ${G.message}`).reduce((G,J)=>G+Y+J)}$dataMetaSchema($,Y){let X=this.RULES.all;$=JSON.parse(JSON.stringify($));for(let G of Y){let J=G.split("/").slice(1),Q=$;for(let W of J)Q=Q[W];for(let W in X){let Z=X[W];if(typeof Z!="object")continue;let{$data:K}=Z.definition,H=Q[W];if(K&&H)Q[W]=pP1(H)}}return $}_removeAllSchemas($,Y){for(let X in $){let G=$[X];if(!Y||Y.test(X)){if(typeof G=="string")delete $[X];else if(G&&!G.meta)this._cache.delete(G.schema),delete $[X]}}}_addSchema($,Y,X,G=this.opts.validateSchema,J=this.opts.addUsedSchema){let Q,{schemaId:W}=this.opts;if(typeof $=="object")Q=$[W];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof $!="boolean")throw Error("schema must be object or boolean");let Z=this._cache.get($);if(Z!==void 0)return Z;X=(0,hy.normalizeId)(Q||X);let K=hy.getSchemaRefs.call(this,$,X);if(Z=new by.SchemaEnv({schema:$,schemaId:W,meta:Y,baseId:X,localRefs:K}),this._cache.set(Z.schema,Z),J&&!X.startsWith("#")){if(X)this._checkUnique(X);this.refs[X]=Z}if(G)this.validateSchema($,!0);return Z}_checkUnique($){if(this.schemas[$]||this.refs[$])throw Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta)this._compileMetaSchema($);else by.compileSchema.call(this,$);if(!$.validate)throw Error("ajv implementation error");return $.validate}_compileMetaSchema($){let Y=this.opts;this.opts=this._metaOpts;try{by.compileSchema.call(this,$)}finally{this.opts=Y}}}io.ValidationError=K98.default;io.MissingRefError=mP1.default;Nz.default=io;function fP1($,Y,X,G="error"){for(let J in $){let Q=J;if(Q in Y)this.logger[G](`${X}: option ${J}. ${$[Q]}`)}}function gP1($){return $=(0,hy.normalizeId)($),this.schemas[$]||this.refs[$]}function L98(){let $=this.opts.schemas;if(!$)return;if(Array.isArray($))this.addSchema($);else for(let Y in $)this.addSchema($[Y],Y)}function B98(){for(let $ in this.opts.formats){let Y=this.opts.formats[$];if(Y)this.addFormat($,Y)}}function O98($){if(Array.isArray($)){this.addVocabulary($);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let Y in $){let X=$[Y];if(!X.keyword)X.keyword=Y;this.addKeyword(X)}}function E98(){let $={...this.opts};for(let Y of V98)delete $[Y];return $}var M98={log(){},warn(){},error(){}};function R98($){if($===!1)return M98;if($===void 0)return console;if($.log&&$.warn&&$.error)return $;throw Error("logger must implement log, warn and error methods")}var q98=/^[a-z_$][a-z0-9_$:-]*$/i;function I98($,Y){let{RULES:X}=this;if((0,qD0.eachItem)($,(G)=>{if(X.keywords[G])throw Error(`Keyword ${G} is already defined`);if(!q98.test(G))throw Error(`Keyword ${G} has invalid name`)}),!Y)return;if(Y.$data&&!(("code"in Y)||("validate"in Y)))throw Error('$data keyword must have "code" or "validate" function')}function RD0($,Y,X){var G;let J=Y===null||Y===void 0?void 0:Y.post;if(X&&J)throw Error('keyword with "post" flag cannot have "type"');let{RULES:Q}=this,W=J?Q.post:Q.rules.find(({type:K})=>K===X);if(!W)W={type:X,rules:[]},Q.rules.push(W);if(Q.keywords[$]=!0,!Y)return;let Z={keyword:$,definition:{...Y,type:(0,lo.getJSONTypes)(Y.type),schemaType:(0,lo.getJSONTypes)(Y.schemaType)}};if(Y.before)P98.call(this,W,Z,Y.before);else W.rules.push(Z);Q.all[$]=Z,(G=Y.implements)===null||G===void 0||G.forEach((K)=>this.addKeyword(K))}function P98($,Y,X){let G=$.rules.findIndex((J)=>J.keyword===X);if(G>=0)$.rules.splice(G,0,Y);else $.rules.push(Y),this.logger.warn(`rule ${X} is not defined`)}function w98($){let{metaSchema:Y}=$;if(Y===void 0)return;if($.$data&&this.opts.$data)Y=pP1(Y);$.validateSchema=this.compile(Y,!0)}var _98={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pP1($){return{anyOf:[$,_98]}}});var lP1=o((cP1)=>{Object.defineProperty(cP1,"__esModule",{value:!0});var C98={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};cP1.default=C98});var oP1=o((aP1)=>{Object.defineProperty(aP1,"__esModule",{value:!0});aP1.callRef=aP1.getValidate=void 0;var k98=vy(),iP1=xZ(),GQ=d6(),tI=Fz(),nP1=mo(),no=g8(),v98={keyword:"$ref",schemaType:"string",code($){let{gen:Y,schema:X,it:G}=$,{baseId:J,schemaEnv:Q,validateName:W,opts:Z,self:K}=G,{root:H}=Q;if((X==="#"||X==="#/")&&J===H.baseId)return V();let z=nP1.resolveRef.call(K,H,J,X);if(z===void 0)throw new k98.default(G.opts.uriResolver,J,X);if(z instanceof nP1.SchemaEnv)return A(z);return F(z);function V(){if(Q===H)return ro($,W,Q,Q.$async);let N=Y.scopeValue("root",{ref:H});return ro($,GQ._`${N}.validate`,H,H.$async)}function A(N){let D=rP1($,N);ro($,D,N,N.$async)}function F(N){let D=Y.scopeValue("schema",Z.code.source===!0?{ref:N,code:(0,GQ.stringify)(N)}:{ref:N}),L=Y.name("valid"),B=$.subschema({schema:N,dataTypes:[],schemaPath:GQ.nil,topSchemaRef:D,errSchemaPath:X},L);$.mergeEvaluated(B),$.ok(L)}}};function rP1($,Y){let{gen:X}=$;return Y.validate?X.scopeValue("validate",{ref:Y.validate}):GQ._`${X.scopeValue("wrapper",{ref:Y})}.validate`}aP1.getValidate=rP1;function ro($,Y,X,G){let{gen:J,it:Q}=$,{allErrors:W,schemaEnv:Z,opts:K}=Q,H=K.passContext?tI.default.this:GQ.nil;if(G)z();else V();function z(){if(!Z.$async)throw Error("async schema referenced by sync schema");let N=J.let("valid");J.try(()=>{if(J.code(GQ._`await ${(0,iP1.callValidateCode)($,Y,H)}`),F(Y),!W)J.assign(N,!0)},(D)=>{if(J.if(GQ._`!(${D} instanceof ${Q.ValidationError})`,()=>J.throw(D)),A(D),!W)J.assign(N,!1)}),$.ok(N)}function V(){$.result((0,iP1.callValidateCode)($,Y,H),()=>F(Y),()=>A(Y))}function A(N){let D=GQ._`${N}.errors`;J.assign(tI.default.vErrors,GQ._`${tI.default.vErrors} === null ? ${D} : ${tI.default.vErrors}.concat(${D})`),J.assign(tI.default.errors,GQ._`${tI.default.vErrors}.length`)}function F(N){var D;if(!Q.opts.unevaluated)return;let L=(D=X===null||X===void 0?void 0:X.validate)===null||D===void 0?void 0:D.evaluated;if(Q.props!==!0)if(L&&!L.dynamicProps){if(L.props!==void 0)Q.props=no.mergeEvaluated.props(J,L.props,Q.props)}else{let B=J.var("props",GQ._`${N}.evaluated.props`);Q.props=no.mergeEvaluated.props(J,B,Q.props,GQ.Name)}if(Q.items!==!0)if(L&&!L.dynamicItems){if(L.items!==void 0)Q.items=no.mergeEvaluated.items(J,L.items,Q.items)}else{let B=J.var("items",GQ._`${N}.evaluated.items`);Q.items=no.mergeEvaluated.items(J,B,Q.items,GQ.Name)}}}aP1.callRef=ro;aP1.default=v98});var eP1=o((tP1)=>{Object.defineProperty(tP1,"__esModule",{value:!0});var b98=lP1(),h98=oP1(),f98=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",b98.default,h98.default];tP1.default=f98});var Yw1=o(($w1)=>{Object.defineProperty($w1,"__esModule",{value:!0});var ao=d6(),QF=ao.operators,so={maximum:{okStr:"<=",ok:QF.LTE,fail:QF.GT},minimum:{okStr:">=",ok:QF.GTE,fail:QF.LT},exclusiveMaximum:{okStr:"<",ok:QF.LT,fail:QF.GTE},exclusiveMinimum:{okStr:">",ok:QF.GT,fail:QF.LTE}},m98={message:({keyword:$,schemaCode:Y})=>ao.str`must be ${so[$].okStr} ${Y}`,params:({keyword:$,schemaCode:Y})=>ao._`{comparison: ${so[$].okStr}, limit: ${Y}}`},u98={keyword:Object.keys(so),type:"number",schemaType:"number",$data:!0,error:m98,code($){let{keyword:Y,data:X,schemaCode:G}=$;$.fail$data(ao._`${X} ${so[Y].fail} ${G} || isNaN(${X})`)}};$w1.default=u98});var Gw1=o((Xw1)=>{Object.defineProperty(Xw1,"__esModule",{value:!0});var fy=d6(),d98={message:({schemaCode:$})=>fy.str`must be multiple of ${$}`,params:({schemaCode:$})=>fy._`{multipleOf: ${$}}`},c98={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:d98,code($){let{gen:Y,data:X,schemaCode:G,it:J}=$,Q=J.opts.multipleOfPrecision,W=Y.let("res"),Z=Q?fy._`Math.abs(Math.round(${W}) - ${W}) > 1e-${Q}`:fy._`${W} !== parseInt(${W})`;$.fail$data(fy._`(${G} === 0 || (${W} = ${X}/${G}, ${Z}))`)}};Xw1.default=c98});var Ww1=o((Qw1)=>{Object.defineProperty(Qw1,"__esModule",{value:!0});function Jw1($){let Y=$.length,X=0,G=0,J;while(G<Y)if(X++,J=$.charCodeAt(G++),J>=55296&&J<=56319&&G<Y){if(J=$.charCodeAt(G),(J&64512)===56320)G++}return X}Qw1.default=Jw1;Jw1.code='require("ajv/dist/runtime/ucs2length").default'});var Kw1=o((Zw1)=>{Object.defineProperty(Zw1,"__esModule",{value:!0});var RB=d6(),n98=g8(),r98=Ww1(),a98={message({keyword:$,schemaCode:Y}){let X=$==="maxLength"?"more":"fewer";return RB.str`must NOT have ${X} than ${Y} characters`},params:({schemaCode:$})=>RB._`{limit: ${$}}`},s98={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:a98,code($){let{keyword:Y,data:X,schemaCode:G,it:J}=$,Q=Y==="maxLength"?RB.operators.GT:RB.operators.LT,W=J.opts.unicode===!1?RB._`${X}.length`:RB._`${(0,n98.useFunc)($.gen,r98.default)}(${X})`;$.fail$data(RB._`${W} ${Q} ${G}`)}};Zw1.default=s98});var Hw1=o((Uw1)=>{Object.defineProperty(Uw1,"__esModule",{value:!0});var t98=xZ(),e98=g8(),eI=d6(),$58={message:({schemaCode:$})=>eI.str`must match pattern "${$}"`,params:({schemaCode:$})=>eI._`{pattern: ${$}}`},Y58={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:$58,code($){let{gen:Y,data:X,$data:G,schema:J,schemaCode:Q,it:W}=$,Z=W.opts.unicodeRegExp?"u":"";if(G){let{regExp:K}=W.opts.code,H=K.code==="new RegExp"?eI._`new RegExp`:(0,e98.useFunc)(Y,K),z=Y.let("valid");Y.try(()=>Y.assign(z,eI._`${H}(${Q}, ${Z}).test(${X})`),()=>Y.assign(z,!1)),$.fail$data(eI._`!${z}`)}else{let K=(0,t98.usePattern)($,J);$.fail$data(eI._`!${K}.test(${X})`)}}};Uw1.default=Y58});var Vw1=o((zw1)=>{Object.defineProperty(zw1,"__esModule",{value:!0});var gy=d6(),G58={message({keyword:$,schemaCode:Y}){let X=$==="maxProperties"?"more":"fewer";return gy.str`must NOT have ${X} than ${Y} properties`},params:({schemaCode:$})=>gy._`{limit: ${$}}`},J58={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:G58,code($){let{keyword:Y,data:X,schemaCode:G}=$,J=Y==="maxProperties"?gy.operators.GT:gy.operators.LT;$.fail$data(gy._`Object.keys(${X}).length ${J} ${G}`)}};zw1.default=J58});var Fw1=o((Aw1)=>{Object.defineProperty(Aw1,"__esModule",{value:!0});var my=xZ(),uy=d6(),W58=g8(),Z58={message:({params:{missingProperty:$}})=>uy.str`must have required property '${$}'`,params:({params:{missingProperty:$}})=>uy._`{missingProperty: ${$}}`},K58={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Z58,code($){let{gen:Y,schema:X,schemaCode:G,data:J,$data:Q,it:W}=$,{opts:Z}=W;if(!Q&&X.length===0)return;let K=X.length>=Z.loopRequired;if(W.allErrors)H();else z();if(Z.strictRequired){let F=$.parentSchema.properties,{definedProperties:N}=$.it;for(let D of X)if((F===null||F===void 0?void 0:F[D])===void 0&&!N.has(D)){let L=W.schemaEnv.baseId+W.errSchemaPath,B=`required property "${D}" is not defined at "${L}" (strictRequired)`;(0,W58.checkStrictMode)(W,B,W.opts.strictRequired)}}function H(){if(K||Q)$.block$data(uy.nil,V);else for(let F of X)(0,my.checkReportMissingProp)($,F)}function z(){let F=Y.let("missing");if(K||Q){let N=Y.let("valid",!0);$.block$data(N,()=>A(F,N)),$.ok(N)}else Y.if((0,my.checkMissingProp)($,X,F)),(0,my.reportMissingProp)($,F),Y.else()}function V(){Y.forOf("prop",G,(F)=>{$.setParams({missingProperty:F}),Y.if((0,my.noPropertyInData)(Y,J,F,Z.ownProperties),()=>$.error())})}function A(F,N){$.setParams({missingProperty:F}),Y.forOf(F,G,()=>{Y.assign(N,(0,my.propertyInData)(Y,J,F,Z.ownProperties)),Y.if((0,uy.not)(N),()=>{$.error(),Y.break()})},uy.nil)}}};Aw1.default=K58});var Nw1=o((Dw1)=>{Object.defineProperty(Dw1,"__esModule",{value:!0});var py=d6(),H58={message({keyword:$,schemaCode:Y}){let X=$==="maxItems"?"more":"fewer";return py.str`must NOT have ${X} than ${Y} items`},params:({schemaCode:$})=>py._`{limit: ${$}}`},z58={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:H58,code($){let{keyword:Y,data:X,schemaCode:G}=$,J=Y==="maxItems"?py.operators.GT:py.operators.LT;$.fail$data(py._`${X}.length ${J} ${G}`)}};Dw1.default=z58});var oo=o((Bw1)=>{Object.defineProperty(Bw1,"__esModule",{value:!0});var Lw1=yo();Lw1.code='require("ajv/dist/runtime/equal").default';Bw1.default=Lw1});var Ew1=o((Ow1)=>{Object.defineProperty(Ow1,"__esModule",{value:!0});var ID0=jy(),AX=d6(),F58=g8(),D58=oo(),N58={message:({params:{i:$,j:Y}})=>AX.str`must NOT have duplicate items (items ## ${Y} and ${$} are identical)`,params:({params:{i:$,j:Y}})=>AX._`{i: ${$}, j: ${Y}}`},L58={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:N58,code($){let{gen:Y,data:X,$data:G,schema:J,parentSchema:Q,schemaCode:W,it:Z}=$;if(!G&&!J)return;let K=Y.let("valid"),H=Q.items?(0,ID0.getSchemaTypes)(Q.items):[];$.block$data(K,z,AX._`${W} === false`),$.ok(K);function z(){let N=Y.let("i",AX._`${X}.length`),D=Y.let("j");$.setParams({i:N,j:D}),Y.assign(K,!0),Y.if(AX._`${N} > 1`,()=>(V()?A:F)(N,D))}function V(){return H.length>0&&!H.some((N)=>N==="object"||N==="array")}function A(N,D){let L=Y.name("item"),B=(0,ID0.checkDataTypes)(H,L,Z.opts.strictNumbers,ID0.DataType.Wrong),O=Y.const("indices",AX._`{}`);Y.for(AX._`;${N}--;`,()=>{if(Y.let(L,AX._`${X}[${N}]`),Y.if(B,AX._`continue`),H.length>1)Y.if(AX._`typeof ${L} == "string"`,AX._`${L} += "_"`);Y.if(AX._`typeof ${O}[${L}] == "number"`,()=>{Y.assign(D,AX._`${O}[${L}]`),$.error(),Y.assign(K,!1).break()}).code(AX._`${O}[${L}] = ${N}`)})}function F(N,D){let L=(0,F58.useFunc)(Y,D58.default),B=Y.name("outer");Y.label(B).for(AX._`;${N}--;`,()=>Y.for(AX._`${D} = ${N}; ${D}--;`,()=>Y.if(AX._`${L}(${X}[${N}], ${X}[${D}])`,()=>{$.error(),Y.assign(K,!1).break(B)})))}}};Ow1.default=L58});var Rw1=o((Mw1)=>{Object.defineProperty(Mw1,"__esModule",{value:!0});var PD0=d6(),O58=g8(),E58=oo(),M58={message:"must be equal to constant",params:({schemaCode:$})=>PD0._`{allowedValue: ${$}}`},R58={keyword:"const",$data:!0,error:M58,code($){let{gen:Y,data:X,$data:G,schemaCode:J,schema:Q}=$;if(G||Q&&typeof Q=="object")$.fail$data(PD0._`!${(0,O58.useFunc)(Y,E58.default)}(${X}, ${J})`);else $.fail(PD0._`${Q} !== ${X}`)}};Mw1.default=R58});var Iw1=o((qw1)=>{Object.defineProperty(qw1,"__esModule",{value:!0});var dy=d6(),I58=g8(),P58=oo(),w58={message:"must be equal to one of the allowed values",params:({schemaCode:$})=>dy._`{allowedValues: ${$}}`},_58={keyword:"enum",schemaType:"array",$data:!0,error:w58,code($){let{gen:Y,data:X,$data:G,schema:J,schemaCode:Q,it:W}=$;if(!G&&J.length===0)throw Error("enum must have non-empty array");let Z=J.length>=W.opts.loopEnum,K,H=()=>K!==null&&K!==void 0?K:K=(0,I58.useFunc)(Y,P58.default),z;if(Z||G)z=Y.let("valid"),$.block$data(z,V);else{if(!Array.isArray(J))throw Error("ajv implementation error");let F=Y.const("vSchema",Q);z=(0,dy.or)(...J.map((N,D)=>A(F,D)))}$.pass(z);function V(){Y.assign(z,!1),Y.forOf("v",Q,(F)=>Y.if(dy._`${H()}(${X}, ${F})`,()=>Y.assign(z,!0).break()))}function A(F,N){let D=J[N];return typeof D==="object"&&D!==null?dy._`${H()}(${X}, ${F}[${N}])`:dy._`${X} === ${D}`}}};qw1.default=_58});var ww1=o((Pw1)=>{Object.defineProperty(Pw1,"__esModule",{value:!0});var T58=Yw1(),C58=Gw1(),S58=Kw1(),k58=Hw1(),v58=Vw1(),x58=Fw1(),y58=Nw1(),b58=Ew1(),h58=Rw1(),f58=Iw1(),g58=[T58.default,C58.default,S58.default,k58.default,v58.default,x58.default,y58.default,b58.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},h58.default,f58.default];Pw1.default=g58});var _D0=o((jw1)=>{Object.defineProperty(jw1,"__esModule",{value:!0});jw1.validateAdditionalItems=void 0;var qB=d6(),wD0=g8(),u58={message:({params:{len:$}})=>qB.str`must NOT have more than ${$} items`,params:({params:{len:$}})=>qB._`{limit: ${$}}`},p58={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:u58,code($){let{parentSchema:Y,it:X}=$,{items:G}=Y;if(!Array.isArray(G)){(0,wD0.checkStrictMode)(X,'"additionalItems" is ignored when "items" is not an array of schemas');return}_w1($,G)}};function _w1($,Y){let{gen:X,schema:G,data:J,keyword:Q,it:W}=$;W.items=!0;let Z=X.const("len",qB._`${J}.length`);if(G===!1)$.setParams({len:Y.length}),$.pass(qB._`${Z} <= ${Y.length}`);else if(typeof G=="object"&&!(0,wD0.alwaysValidSchema)(W,G)){let H=X.var("valid",qB._`${Z} <= ${Y.length}`);X.if((0,qB.not)(H),()=>K(H)),$.ok(H)}function K(H){X.forRange("i",Y.length,Z,(z)=>{if($.subschema({keyword:Q,dataProp:z,dataPropType:wD0.Type.Num},H),!W.allErrors)X.if((0,qB.not)(H),()=>X.break())})}}jw1.validateAdditionalItems=_w1;jw1.default=p58});var jD0=o((kw1)=>{Object.defineProperty(kw1,"__esModule",{value:!0});kw1.validateTuple=void 0;var Cw1=d6(),to=g8(),c58=xZ(),l58={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code($){let{schema:Y,it:X}=$;if(Array.isArray(Y))return Sw1($,"additionalItems",Y);if(X.items=!0,(0,to.alwaysValidSchema)(X,Y))return;$.ok((0,c58.validateArray)($))}};function Sw1($,Y,X=$.schema){let{gen:G,parentSchema:J,data:Q,keyword:W,it:Z}=$;if(z(J),Z.opts.unevaluated&&X.length&&Z.items!==!0)Z.items=to.mergeEvaluated.items(G,X.length,Z.items);let K=G.name("valid"),H=G.const("len",Cw1._`${Q}.length`);X.forEach((V,A)=>{if((0,to.alwaysValidSchema)(Z,V))return;G.if(Cw1._`${H} > ${A}`,()=>$.subschema({keyword:W,schemaProp:A,dataProp:A},K)),$.ok(K)});function z(V){let{opts:A,errSchemaPath:F}=Z,N=X.length,D=N===V.minItems&&(N===V.maxItems||V[Y]===!1);if(A.strictTuples&&!D){let L=`"${W}" is ${N}-tuple, but minItems or maxItems/${Y} are not specified or different at path "${F}"`;(0,to.checkStrictMode)(Z,L,A.strictTuples)}}}kw1.validateTuple=Sw1;kw1.default=l58});var yw1=o((xw1)=>{Object.defineProperty(xw1,"__esModule",{value:!0});var n58=jD0(),r58={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:($)=>(0,n58.validateTuple)($,"items")};xw1.default=r58});var fw1=o((hw1)=>{Object.defineProperty(hw1,"__esModule",{value:!0});var bw1=d6(),s58=g8(),o58=xZ(),t58=_D0(),e58={message:({params:{len:$}})=>bw1.str`must NOT have more than ${$} items`,params:({params:{len:$}})=>bw1._`{limit: ${$}}`},$78={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:e58,code($){let{schema:Y,parentSchema:X,it:G}=$,{prefixItems:J}=X;if(G.items=!0,(0,s58.alwaysValidSchema)(G,Y))return;if(J)(0,t58.validateAdditionalItems)($,J);else $.ok((0,o58.validateArray)($))}};hw1.default=$78});var mw1=o((gw1)=>{Object.defineProperty(gw1,"__esModule",{value:!0});var yZ=d6(),eo=g8(),X78={message:({params:{min:$,max:Y}})=>Y===void 0?yZ.str`must contain at least ${$} valid item(s)`:yZ.str`must contain at least ${$} and no more than ${Y} valid item(s)`,params:({params:{min:$,max:Y}})=>Y===void 0?yZ._`{minContains: ${$}}`:yZ._`{minContains: ${$}, maxContains: ${Y}}`},G78={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:X78,code($){let{gen:Y,schema:X,parentSchema:G,data:J,it:Q}=$,W,Z,{minContains:K,maxContains:H}=G;if(Q.opts.next)W=K===void 0?1:K,Z=H;else W=1;let z=Y.const("len",yZ._`${J}.length`);if($.setParams({min:W,max:Z}),Z===void 0&&W===0){(0,eo.checkStrictMode)(Q,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(Z!==void 0&&W>Z){(0,eo.checkStrictMode)(Q,'"minContains" > "maxContains" is always invalid'),$.fail();return}if((0,eo.alwaysValidSchema)(Q,X)){let D=yZ._`${z} >= ${W}`;if(Z!==void 0)D=yZ._`${D} && ${z} <= ${Z}`;$.pass(D);return}Q.items=!0;let V=Y.name("valid");if(Z===void 0&&W===1)F(V,()=>Y.if(V,()=>Y.break()));else if(W===0){if(Y.let(V,!0),Z!==void 0)Y.if(yZ._`${J}.length > 0`,A)}else Y.let(V,!1),A();$.result(V,()=>$.reset());function A(){let D=Y.name("_valid"),L=Y.let("count",0);F(D,()=>Y.if(D,()=>N(L)))}function F(D,L){Y.forRange("i",0,z,(B)=>{$.subschema({keyword:"contains",dataProp:B,dataPropType:eo.Type.Num,compositeRule:!0},D),L()})}function N(D){if(Y.code(yZ._`${D}++`),Z===void 0)Y.if(yZ._`${D} >= ${W}`,()=>Y.assign(V,!0).break());else if(Y.if(yZ._`${D} > ${Z}`,()=>Y.assign(V,!1).break()),W===1)Y.assign(V,!0);else Y.if(yZ._`${D} >= ${W}`,()=>Y.assign(V,!0))}}};gw1.default=G78});var iw1=o((dw1)=>{Object.defineProperty(dw1,"__esModule",{value:!0});dw1.validateSchemaDeps=dw1.validatePropertyDeps=dw1.error=void 0;var TD0=d6(),Q78=g8(),cy=xZ();dw1.error={message:({params:{property:$,depsCount:Y,deps:X}})=>{let G=Y===1?"property":"properties";return TD0.str`must have ${G} ${X} when property ${$} is present`},params:({params:{property:$,depsCount:Y,deps:X,missingProperty:G}})=>TD0._`{property: ${$},
    missingProperty: ${G},
    depsCount: ${Y},
    deps: ${X}}`};var W78={keyword:"dependencies",type:"object",schemaType:"object",error:dw1.error,code($){let[Y,X]=Z78($);uw1($,Y),pw1($,X)}};function Z78({schema:$}){let Y={},X={};for(let G in $){if(G==="__proto__")continue;let J=Array.isArray($[G])?Y:X;J[G]=$[G]}return[Y,X]}function uw1($,Y=$.schema){let{gen:X,data:G,it:J}=$;if(Object.keys(Y).length===0)return;let Q=X.let("missing");for(let W in Y){let Z=Y[W];if(Z.length===0)continue;let K=(0,cy.propertyInData)(X,G,W,J.opts.ownProperties);if($.setParams({property:W,depsCount:Z.length,deps:Z.join(", ")}),J.allErrors)X.if(K,()=>{for(let H of Z)(0,cy.checkReportMissingProp)($,H)});else X.if(TD0._`${K} && (${(0,cy.checkMissingProp)($,Z,Q)})`),(0,cy.reportMissingProp)($,Q),X.else()}}dw1.validatePropertyDeps=uw1;function pw1($,Y=$.schema){let{gen:X,data:G,keyword:J,it:Q}=$,W=X.name("valid");for(let Z in Y){if((0,Q78.alwaysValidSchema)(Q,Y[Z]))continue;X.if((0,cy.propertyInData)(X,G,Z,Q.opts.ownProperties),()=>{let K=$.subschema({keyword:J,schemaProp:Z},W);$.mergeValidEvaluated(K,W)},()=>X.var(W,!0)),$.ok(W)}}dw1.validateSchemaDeps=pw1;dw1.default=W78});var aw1=o((rw1)=>{Object.defineProperty(rw1,"__esModule",{value:!0});var nw1=d6(),H78=g8(),z78={message:"property name must be valid",params:({params:$})=>nw1._`{propertyName: ${$.propertyName}}`},V78={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:z78,code($){let{gen:Y,schema:X,data:G,it:J}=$;if((0,H78.alwaysValidSchema)(J,X))return;let Q=Y.name("valid");Y.forIn("key",G,(W)=>{$.setParams({propertyName:W}),$.subschema({keyword:"propertyNames",data:W,dataTypes:["string"],propertyName:W,compositeRule:!0},Q),Y.if((0,nw1.not)(Q),()=>{if($.error(!0),!J.allErrors)Y.break()})}),$.ok(Q)}};rw1.default=V78});var CD0=o((sw1)=>{Object.defineProperty(sw1,"__esModule",{value:!0});var $t=xZ(),JK=d6(),F78=Fz(),Yt=g8(),D78={message:"must NOT have additional properties",params:({params:$})=>JK._`{additionalProperty: ${$.additionalProperty}}`},N78={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:D78,code($){let{gen:Y,schema:X,parentSchema:G,data:J,errsCount:Q,it:W}=$;if(!Q)throw Error("ajv implementation error");let{allErrors:Z,opts:K}=W;if(W.props=!0,K.removeAdditional!=="all"&&(0,Yt.alwaysValidSchema)(W,X))return;let H=(0,$t.allSchemaProperties)(G.properties),z=(0,$t.allSchemaProperties)(G.patternProperties);V(),$.ok(JK._`${Q} === ${F78.default.errors}`);function V(){Y.forIn("key",J,(L)=>{if(!H.length&&!z.length)N(L);else Y.if(A(L),()=>N(L))})}function A(L){let B;if(H.length>8){let O=(0,Yt.schemaRefOrVal)(W,G.properties,"properties");B=(0,$t.isOwnProperty)(Y,O,L)}else if(H.length)B=(0,JK.or)(...H.map((O)=>JK._`${L} === ${O}`));else B=JK.nil;if(z.length)B=(0,JK.or)(B,...z.map((O)=>JK._`${(0,$t.usePattern)($,O)}.test(${L})`));return(0,JK.not)(B)}function F(L){Y.code(JK._`delete ${J}[${L}]`)}function N(L){if(K.removeAdditional==="all"||K.removeAdditional&&X===!1){F(L);return}if(X===!1){if($.setParams({additionalProperty:L}),$.error(),!Z)Y.break();return}if(typeof X=="object"&&!(0,Yt.alwaysValidSchema)(W,X)){let B=Y.name("valid");if(K.removeAdditional==="failing")D(L,B,!1),Y.if((0,JK.not)(B),()=>{$.reset(),F(L)});else if(D(L,B),!Z)Y.if((0,JK.not)(B),()=>Y.break())}}function D(L,B,O){let E={keyword:"additionalProperties",dataProp:L,dataPropType:Yt.Type.Str};if(O===!1)Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1});$.subschema(E,B)}}};sw1.default=N78});var $_1=o((ew1)=>{Object.defineProperty(ew1,"__esModule",{value:!0});var B78=ky(),ow1=xZ(),SD0=g8(),tw1=CD0(),O78={keyword:"properties",type:"object",schemaType:"object",code($){let{gen:Y,schema:X,parentSchema:G,data:J,it:Q}=$;if(Q.opts.removeAdditional==="all"&&G.additionalProperties===void 0)tw1.default.code(new B78.KeywordCxt(Q,tw1.default,"additionalProperties"));let W=(0,ow1.allSchemaProperties)(X);for(let V of W)Q.definedProperties.add(V);if(Q.opts.unevaluated&&W.length&&Q.props!==!0)Q.props=SD0.mergeEvaluated.props(Y,(0,SD0.toHash)(W),Q.props);let Z=W.filter((V)=>!(0,SD0.alwaysValidSchema)(Q,X[V]));if(Z.length===0)return;let K=Y.name("valid");for(let V of Z){if(H(V))z(V);else{if(Y.if((0,ow1.propertyInData)(Y,J,V,Q.opts.ownProperties)),z(V),!Q.allErrors)Y.else().var(K,!0);Y.endIf()}$.it.definedProperties.add(V),$.ok(K)}function H(V){return Q.opts.useDefaults&&!Q.compositeRule&&X[V].default!==void 0}function z(V){$.subschema({keyword:"properties",schemaProp:V,dataProp:V},K)}}};ew1.default=O78});var Q_1=o((J_1)=>{Object.defineProperty(J_1,"__esModule",{value:!0});var Y_1=xZ(),Xt=d6(),X_1=g8(),G_1=g8(),M78={keyword:"patternProperties",type:"object",schemaType:"object",code($){let{gen:Y,schema:X,data:G,parentSchema:J,it:Q}=$,{opts:W}=Q,Z=(0,Y_1.allSchemaProperties)(X),K=Z.filter((D)=>(0,X_1.alwaysValidSchema)(Q,X[D]));if(Z.length===0||K.length===Z.length&&(!Q.opts.unevaluated||Q.props===!0))return;let H=W.strictSchema&&!W.allowMatchingProperties&&J.properties,z=Y.name("valid");if(Q.props!==!0&&!(Q.props instanceof Xt.Name))Q.props=(0,G_1.evaluatedPropsToName)(Y,Q.props);let{props:V}=Q;A();function A(){for(let D of Z){if(H)F(D);if(Q.allErrors)N(D);else Y.var(z,!0),N(D),Y.if(z)}}function F(D){for(let L in H)if(new RegExp(D).test(L))(0,X_1.checkStrictMode)(Q,`property ${L} matches pattern ${D} (use allowMatchingProperties)`)}function N(D){Y.forIn("key",G,(L)=>{Y.if(Xt._`${(0,Y_1.usePattern)($,D)}.test(${L})`,()=>{let B=K.includes(D);if(!B)$.subschema({keyword:"patternProperties",schemaProp:D,dataProp:L,dataPropType:G_1.Type.Str},z);if(Q.opts.unevaluated&&V!==!0)Y.assign(Xt._`${V}[${L}]`,!0);else if(!B&&!Q.allErrors)Y.if((0,Xt.not)(z),()=>Y.break())})})}}};J_1.default=M78});var Z_1=o((W_1)=>{Object.defineProperty(W_1,"__esModule",{value:!0});var q78=g8(),I78={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code($){let{gen:Y,schema:X,it:G}=$;if((0,q78.alwaysValidSchema)(G,X)){$.fail();return}let J=Y.name("valid");$.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},J),$.failResult(J,()=>$.reset(),()=>$.error())},error:{message:"must NOT be valid"}};W_1.default=I78});var U_1=o((K_1)=>{Object.defineProperty(K_1,"__esModule",{value:!0});var w78=xZ(),_78={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:w78.validateUnion,error:{message:"must match a schema in anyOf"}};K_1.default=_78});var z_1=o((H_1)=>{Object.defineProperty(H_1,"__esModule",{value:!0});var Gt=d6(),T78=g8(),C78={message:"must match exactly one schema in oneOf",params:({params:$})=>Gt._`{passingSchemas: ${$.passing}}`},S78={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:C78,code($){let{gen:Y,schema:X,parentSchema:G,it:J}=$;if(!Array.isArray(X))throw Error("ajv implementation error");if(J.opts.discriminator&&G.discriminator)return;let Q=X,W=Y.let("valid",!1),Z=Y.let("passing",null),K=Y.name("_valid");$.setParams({passing:Z}),Y.block(H),$.result(W,()=>$.reset(),()=>$.error(!0));function H(){Q.forEach((z,V)=>{let A;if((0,T78.alwaysValidSchema)(J,z))Y.var(K,!0);else A=$.subschema({keyword:"oneOf",schemaProp:V,compositeRule:!0},K);if(V>0)Y.if(Gt._`${K} && ${W}`).assign(W,!1).assign(Z,Gt._`[${Z}, ${V}]`).else();Y.if(K,()=>{if(Y.assign(W,!0),Y.assign(Z,V),A)$.mergeEvaluated(A,Gt.Name)})})}}};H_1.default=S78});var A_1=o((V_1)=>{Object.defineProperty(V_1,"__esModule",{value:!0});var v78=g8(),x78={keyword:"allOf",schemaType:"array",code($){let{gen:Y,schema:X,it:G}=$;if(!Array.isArray(X))throw Error("ajv implementation error");let J=Y.name("valid");X.forEach((Q,W)=>{if((0,v78.alwaysValidSchema)(G,Q))return;let Z=$.subschema({keyword:"allOf",schemaProp:W},J);$.ok(J),$.mergeEvaluated(Z)})}};V_1.default=x78});var L_1=o((N_1)=>{Object.defineProperty(N_1,"__esModule",{value:!0});var Jt=d6(),D_1=g8(),b78={message:({params:$})=>Jt.str`must match "${$.ifClause}" schema`,params:({params:$})=>Jt._`{failingKeyword: ${$.ifClause}}`},h78={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:b78,code($){let{gen:Y,parentSchema:X,it:G}=$;if(X.then===void 0&&X.else===void 0)(0,D_1.checkStrictMode)(G,'"if" without "then" and "else" is ignored');let J=F_1(G,"then"),Q=F_1(G,"else");if(!J&&!Q)return;let W=Y.let("valid",!0),Z=Y.name("_valid");if(K(),$.reset(),J&&Q){let z=Y.let("ifClause");$.setParams({ifClause:z}),Y.if(Z,H("then",z),H("else",z))}else if(J)Y.if(Z,H("then"));else Y.if((0,Jt.not)(Z),H("else"));$.pass(W,()=>$.error(!0));function K(){let z=$.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},Z);$.mergeEvaluated(z)}function H(z,V){return()=>{let A=$.subschema({keyword:z},Z);if(Y.assign(W,Z),$.mergeValidEvaluated(A,W),V)Y.assign(V,Jt._`${z}`);else $.setParams({ifClause:z})}}}};function F_1($,Y){let X=$.schema[Y];return X!==void 0&&!(0,D_1.alwaysValidSchema)($,X)}N_1.default=h78});var O_1=o((B_1)=>{Object.defineProperty(B_1,"__esModule",{value:!0});var g78=g8(),m78={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:$,parentSchema:Y,it:X}){if(Y.if===void 0)(0,g78.checkStrictMode)(X,`"${$}" without "if" is ignored`)}};B_1.default=m78});var M_1=o((E_1)=>{Object.defineProperty(E_1,"__esModule",{value:!0});var p78=_D0(),d78=yw1(),c78=jD0(),l78=fw1(),i78=mw1(),n78=iw1(),r78=aw1(),a78=CD0(),s78=$_1(),o78=Q_1(),t78=Z_1(),e78=U_1(),$$8=z_1(),Y$8=A_1(),X$8=L_1(),G$8=O_1();function J$8($=!1){let Y=[t78.default,e78.default,$$8.default,Y$8.default,X$8.default,G$8.default,r78.default,a78.default,n78.default,s78.default,o78.default];if($)Y.push(d78.default,l78.default);else Y.push(p78.default,c78.default);return Y.push(i78.default),Y}E_1.default=J$8});var q_1=o((R_1)=>{Object.defineProperty(R_1,"__esModule",{value:!0});var E$=d6(),W$8={message:({schemaCode:$})=>E$.str`must match format "${$}"`,params:({schemaCode:$})=>E$._`{format: ${$}}`},Z$8={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:W$8,code($,Y){let{gen:X,data:G,$data:J,schema:Q,schemaCode:W,it:Z}=$,{opts:K,errSchemaPath:H,schemaEnv:z,self:V}=Z;if(!K.validateFormats)return;if(J)A();else F();function A(){let N=X.scopeValue("formats",{ref:V.formats,code:K.code.formats}),D=X.const("fDef",E$._`${N}[${W}]`),L=X.let("fType"),B=X.let("format");X.if(E$._`typeof ${D} == "object" && !(${D} instanceof RegExp)`,()=>X.assign(L,E$._`${D}.type || "string"`).assign(B,E$._`${D}.validate`),()=>X.assign(L,E$._`"string"`).assign(B,D)),$.fail$data((0,E$.or)(O(),E()));function O(){if(K.strictSchema===!1)return E$.nil;return E$._`${W} && !${B}`}function E(){let M=z.$async?E$._`(${D}.async ? await ${B}(${G}) : ${B}(${G}))`:E$._`${B}(${G})`,R=E$._`(typeof ${B} == "function" ? ${M} : ${B}.test(${G}))`;return E$._`${B} && ${B} !== true && ${L} === ${Y} && !${R}`}}function F(){let N=V.formats[Q];if(!N){O();return}if(N===!0)return;let[D,L,B]=E(N);if(D===Y)$.pass(M());function O(){if(K.strictSchema===!1){V.logger.warn(R());return}throw Error(R());function R(){return`unknown format "${Q}" ignored in schema at path "${H}"`}}function E(R){let q=R instanceof RegExp?(0,E$.regexpCode)(R):K.code.formats?E$._`${K.code.formats}${(0,E$.getProperty)(Q)}`:void 0,w=X.scopeValue("formats",{key:Q,ref:R,code:q});if(typeof R=="object"&&!(R instanceof RegExp))return[R.type||"string",R.validate,E$._`${w}.validate`];return["string",R,w]}function M(){if(typeof N=="object"&&!(N instanceof RegExp)&&N.async){if(!z.$async)throw Error("async format in sync schema");return E$._`await ${B}(${G})`}return typeof L=="function"?E$._`${B}(${G})`:E$._`${B}.test(${G})`}}}};R_1.default=Z$8});var P_1=o((I_1)=>{Object.defineProperty(I_1,"__esModule",{value:!0});var U$8=q_1(),H$8=[U$8.default];I_1.default=H$8});var j_1=o((w_1)=>{Object.defineProperty(w_1,"__esModule",{value:!0});w_1.contentVocabulary=w_1.metadataVocabulary=void 0;w_1.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];w_1.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var S_1=o((C_1)=>{Object.defineProperty(C_1,"__esModule",{value:!0});var A$8=eP1(),F$8=ww1(),D$8=M_1(),N$8=P_1(),T_1=j_1(),L$8=[A$8.default,F$8.default,(0,D$8.default)(),N$8.default,T_1.metadataVocabulary,T_1.contentVocabulary];C_1.default=L$8});var y_1=o((v_1)=>{Object.defineProperty(v_1,"__esModule",{value:!0});v_1.DiscrError=void 0;var k_1;(function($){$.Tag="tag",$.Mapping="mapping"})(k_1||(v_1.DiscrError=k_1={}))});var f_1=o((h_1)=>{Object.defineProperty(h_1,"__esModule",{value:!0});var $P=d6(),kD0=y_1(),b_1=mo(),O$8=vy(),E$8=g8(),M$8={message:({params:{discrError:$,tagName:Y}})=>$===kD0.DiscrError.Tag?`tag "${Y}" must be string`:`value of tag "${Y}" must be in oneOf`,params:({params:{discrError:$,tag:Y,tagName:X}})=>$P._`{error: ${$}, tag: ${X}, tagValue: ${Y}}`},R$8={keyword:"discriminator",type:"object",schemaType:"object",error:M$8,code($){let{gen:Y,data:X,schema:G,parentSchema:J,it:Q}=$,{oneOf:W}=J;if(!Q.opts.discriminator)throw Error("discriminator: requires discriminator option");let Z=G.propertyName;if(typeof Z!="string")throw Error("discriminator: requires propertyName");if(G.mapping)throw Error("discriminator: mapping is not supported");if(!W)throw Error("discriminator: requires oneOf keyword");let K=Y.let("valid",!1),H=Y.const("tag",$P._`${X}${(0,$P.getProperty)(Z)}`);Y.if($P._`typeof ${H} == "string"`,()=>z(),()=>$.error(!1,{discrError:kD0.DiscrError.Tag,tag:H,tagName:Z})),$.ok(K);function z(){let F=A();Y.if(!1);for(let N in F)Y.elseIf($P._`${H} === ${N}`),Y.assign(K,V(F[N]));Y.else(),$.error(!1,{discrError:kD0.DiscrError.Mapping,tag:H,tagName:Z}),Y.endIf()}function V(F){let N=Y.name("valid"),D=$.subschema({keyword:"oneOf",schemaProp:F},N);return $.mergeEvaluated(D,$P.Name),N}function A(){var F;let N={},D=B(J),L=!0;for(let M=0;M<W.length;M++){let R=W[M];if((R===null||R===void 0?void 0:R.$ref)&&!(0,E$8.schemaHasRulesButRef)(R,Q.self.RULES)){let w=R.$ref;if(R=b_1.resolveRef.call(Q.self,Q.schemaEnv.root,Q.baseId,w),R instanceof b_1.SchemaEnv)R=R.schema;if(R===void 0)throw new O$8.default(Q.opts.uriResolver,Q.baseId,w)}let q=(F=R===null||R===void 0?void 0:R.properties)===null||F===void 0?void 0:F[Z];if(typeof q!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${Z}"`);L=L&&(D||B(R)),O(q,M)}if(!L)throw Error(`discriminator: "${Z}" must be required`);return N;function B({required:M}){return Array.isArray(M)&&M.includes(Z)}function O(M,R){if(M.const)E(M.const,R);else if(M.enum)for(let q of M.enum)E(q,R);else throw Error(`discriminator: "properties/${Z}" must have "const" or "enum"`)}function E(M,R){if(typeof M!="string"||M in N)throw Error(`discriminator: "${Z}" values must be unique strings`);N[M]=R}}}};h_1.default=R$8});var g_1=o((yv5,I$8)=>{I$8.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Wt=o((JQ,vD0)=>{Object.defineProperty(JQ,"__esModule",{value:!0});JQ.MissingRefError=JQ.ValidationError=JQ.CodeGen=JQ.Name=JQ.nil=JQ.stringify=JQ.str=JQ._=JQ.KeywordCxt=JQ.Ajv=void 0;var P$8=dP1(),w$8=S_1(),_$8=f_1(),m_1=g_1(),j$8=["/properties"],Qt="http://json-schema.org/draft-07/schema";class ly extends P$8.default{_addVocabularies(){if(super._addVocabularies(),w$8.default.forEach(($)=>this.addVocabulary($)),this.opts.discriminator)this.addKeyword(_$8.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let $=this.opts.$data?this.$dataMetaSchema(m_1,j$8):m_1;this.addMetaSchema($,Qt,!1),this.refs["http://json-schema.org/schema"]=Qt}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Qt)?Qt:void 0)}}JQ.Ajv=ly;vD0.exports=JQ=ly;vD0.exports.Ajv=ly;Object.defineProperty(JQ,"__esModule",{value:!0});JQ.default=ly;var T$8=ky();Object.defineProperty(JQ,"KeywordCxt",{enumerable:!0,get:function(){return T$8.KeywordCxt}});var YP=d6();Object.defineProperty(JQ,"_",{enumerable:!0,get:function(){return YP._}});Object.defineProperty(JQ,"str",{enumerable:!0,get:function(){return YP.str}});Object.defineProperty(JQ,"stringify",{enumerable:!0,get:function(){return YP.stringify}});Object.defineProperty(JQ,"nil",{enumerable:!0,get:function(){return YP.nil}});Object.defineProperty(JQ,"Name",{enumerable:!0,get:function(){return YP.Name}});Object.defineProperty(JQ,"CodeGen",{enumerable:!0,get:function(){return YP.CodeGen}});var C$8=fo();Object.defineProperty(JQ,"ValidationError",{enumerable:!0,get:function(){return C$8.default}});var S$8=vy();Object.defineProperty(JQ,"MissingRefError",{enumerable:!0,get:function(){return S$8.default}})});var cD0=o((i_1)=>{Object.defineProperty(i_1,"__esModule",{value:!0});var ZF;(function($){$[$.key=0]="key",$[$.value=1]="value"})(ZF||(ZF={}));var g$8=Object.freeze({key:{terminator:"=",quotes:{}},value:{terminator:";",quotes:{'"':'"',"'":"'","{":"}"}}});function m$8($,Y=g$8){let X={},G=ZF.key,J=!1,Q=!1,W=!1,Z="",K="",H="",z=0;function V(){J=!0}function A(){Q=!0}function F(){J=!1,Q=!1,W=!1,Z="",K=""}function N(){return G===ZF.key?Y.key:Y.value}function D(M){return N().terminator===M}function L(M){return Object.keys(N().quotes).some((R)=>M===R)}function B(M){return W&&M===N().quotes[Z]}function O(M){K+=M}function E(){if(!W)K=K.trim();switch(G){case ZF.key:H=K.toLowerCase(),G=ZF.value;break;case ZF.value:G=ZF.key,X[H]=K,H="";break}F()}while(z<$.length){let M=$.charAt(z);if(!Q)if(!J){if(M.trim())if(V(),L(M))W=!0,Z=M;else O(M)}else if(W&&B(M)){let R=$.charAt(z+1);if(M===R)O(M),z++;else A()}else if(!W&&D(M)){let R=$.charAt(z+1);if(M===R)O(M),z++;else E()}else O(M);else if(D(M))E();else if(M.trim())throw Error("Malformed connection string");z++}if(W&&!Q)throw Error("Connection string terminated unexpectedly");else E();return X}i_1.default=m$8});var r_1=o((QK)=>{var p$8=QK&&QK.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(QK,"__esModule",{value:!0});QK.SCHEMA=QK.SchemaTypes=void 0;var d$8=p$8(cD0()),_6;(function($){$[$.BOOL=0]="BOOL",$[$.STRING=1]="STRING",$[$.NUMBER=2]="NUMBER"})(_6=QK.SchemaTypes||(QK.SchemaTypes={}));QK.SCHEMA={"Application Name":{type:_6.STRING,aliases:["App"],validator($){return typeof $==="string"&&$.length<=128}},ApplicationIntent:{type:_6.STRING,allowedValues:["ReadOnly","ReadWrite"],default:"ReadWrite"},"Asynchronous Processing":{type:_6.BOOL,default:!1,aliases:["Async"]},AttachDBFilename:{type:_6.STRING,aliases:["Extended Properties","Initial File Name"]},Authentication:{type:_6.STRING,allowedValues:["Active Directory Integrated","Active Directory Password","Sql Password"]},"Column Encryption Setting":{type:_6.STRING},"Connection Timeout":{type:_6.NUMBER,aliases:["Connect Timeout","Timeout"],default:15},"Connection Lifetime":{type:_6.NUMBER,aliases:["Load Balance Timeout"],default:0},ConnectRetryCount:{type:_6.NUMBER,default:1,validator($){return $>0&&$<=255}},ConnectRetryInterval:{type:_6.NUMBER,default:10},"Context Connection":{type:_6.BOOL,default:!1},"Current Language":{aliases:["Language"],type:_6.STRING,validator($){return typeof $==="string"&&$.length<=128}},"Data Source":{aliases:["Addr","Address","Server","Network Address"],type:_6.STRING},Encrypt:{type:_6.BOOL,default:!1},Enlist:{type:_6.BOOL,default:!0},"Failover Partner":{type:_6.STRING},"Initial Catalog":{type:_6.STRING,aliases:["Database"],validator($){return typeof $==="string"&&$.length<=128}},"Integrated Security":{type:_6.BOOL,aliases:["Trusted_Connection"],coerce($){return $==="sspi"||null}},"Max Pool Size":{type:_6.NUMBER,default:100,validator($){return $>=1}},"Min Pool Size":{type:_6.NUMBER,default:0,validator($){return $>=0}},MultipleActiveResultSets:{type:_6.BOOL,default:!1},MultiSubnetFailover:{type:_6.BOOL,default:!1},"Network Library":{type:_6.STRING,aliases:["Network","Net"],allowedValues:["dbnmpntw","dbmsrpcn","dbmsadsn","dbmsgnet","dbmslpcn","dbmsspxn","dbmssocn","Dbmsvinn"]},"Packet Size":{type:_6.NUMBER,default:8000,validator($){return $>=512&&$<=32768}},Password:{type:_6.STRING,aliases:["PWD"],validator($){return typeof $==="string"&&$.length<=128}},"Persist Security Info":{type:_6.BOOL,aliases:["PersistSecurityInfo"],default:!1},PoolBlockingPeriod:{type:_6.NUMBER,default:0,coerce($){if(typeof $!=="string")return null;switch($.toLowerCase()){case"alwaysblock":return 1;case"auto":return 0;case"neverblock":return 2}return null}},Pooling:{type:_6.BOOL,default:!0},Replication:{type:_6.BOOL,default:!1},"Transaction Binding":{type:_6.STRING,allowedValues:["Implicit Unbind","Explicit Unbind"],default:"Implicit Unbind"},TransparentNetworkIPResolution:{type:_6.BOOL,default:!0},TrustServerCertificate:{type:_6.BOOL,default:!1},"Type System Version":{type:_6.STRING,allowedValues:["SQL Server 2012","SQL Server 2008","SQL Server 2005","Latest"]},"User ID":{type:_6.STRING,aliases:["UID"],validator($){return typeof $==="string"&&$.length<=128}},"User Instance":{type:_6.BOOL,default:!1},"Workstation ID":{type:_6.STRING,aliases:["WSID"],validator($){return typeof $==="string"&&$.length<=128}}};function c$8($){if($.trim()==="")return _6.STRING;let Y=parseInt($,10);if(!Number.isNaN(Y)&&Y.toString()===$)return _6.NUMBER;if(["true","false","yes","no"].includes($.toLowerCase()))return _6.BOOL;return _6.STRING}function n_1($,Y,X){if(X){let G=X($);if(G!==null)return G}switch(Y){case _6.BOOL:if(["true","yes","1"].includes($.toLowerCase()))return!0;if(["false","no","0"].includes($.toLowerCase()))return!1;return $;case _6.NUMBER:return parseInt($,10)}return $}function l$8($,Y,X){let G=!0;if(X)G=X($);if(G)G=(Y===null||Y===void 0?void 0:Y.includes($))||!1;return G}function i$8($,Y=!1,X=!1,G=!1,J=QK.SCHEMA){let Q=Object.entries(J).reduce((W,[Z,K])=>{var H;return Object.assign(W,{[Z.toLowerCase()]:K}),((H=K.aliases)===null||H===void 0?void 0:H.reduce((z,V)=>{return Object.assign(z,{[V.toLowerCase()]:{...K,canonical:Z.toLowerCase()}})},W))||W},{});return Object.entries((0,d$8.default)($)).reduce((W,[Z,K])=>{if(!Object.prototype.hasOwnProperty.call(Q,Z))return Object.assign(W,{[Z]:n_1(K,c$8(K))});let H=n_1(K,Q[Z].type,Q[Z].coerce);if(G&&!l$8(H,Q[Z].allowedValues,Q[Z].validator))H=Q[Z].default;let z=Y?Q[Z].canonical||Z:Z;return Object.assign(W,{[z]:H})},{})}QK.default=i$8});var s_1=o((KF)=>{var a_1=KF&&KF.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(KF,"__esModule",{value:!0});KF.parseSqlConnectionString=KF.parseConnectionString=void 0;var n$8=a_1(cD0());KF.parseConnectionString=n$8.default;var r$8=a_1(r_1());KF.parseSqlConnectionString=r$8.default});function x0($,Y,X){function G(Z,K){if(!Z._zod)Object.defineProperty(Z,"_zod",{value:{def:K,constr:W,traits:new Set},enumerable:!1});if(Z._zod.traits.has($))return;Z._zod.traits.add($),Y(Z,K);let H=W.prototype,z=Object.keys(H);for(let V=0;V<z.length;V++){let A=z[V];if(!(A in Z))Z[A]=H[A].bind(Z)}}let J=X?.Parent??Object;class Q extends J{}Object.defineProperty(Q,"name",{value:$});function W(Z){var K;let H=X?.Parent?new Q:this;G(H,Z),(K=H._zod).deferred??(K.deferred=[]);for(let z of H._zod.deferred)z();return H}return Object.defineProperty(W,"init",{value:G}),Object.defineProperty(W,Symbol.hasInstance,{value:(Z)=>{if(X?.Parent&&Z instanceof X.Parent)return!0;return Z?._zod?.traits?.has($)}}),Object.defineProperty(W,"name",{value:$}),W}function k7($){if($)Object.assign(CB,$);return CB}var Kh1,OP,xt,HU,SB,CB;var kB=V0(()=>{OP=Object.freeze({status:"aborted"});xt=Symbol("zod_brand");HU=class HU extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};SB=class SB extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}};(Kh1=globalThis).__zod_globalConfig??(Kh1.__zod_globalConfig={});CB=globalThis.__zod_globalConfig});var V1={};W8(V1,{unwrapMessage:()=>Wb,uint8ArrayToHex:()=>LW8,uint8ArrayToBase64url:()=>DW8,uint8ArrayToBase64:()=>Lh1,stringifyPrimitive:()=>U1,slugify:()=>FI0,shallowClone:()=>ht,safeExtend:()=>Ah1,required:()=>Dh1,randomString:()=>KW8,propertyKeyTypes:()=>Ub,promiseAllObject:()=>ZW8,primitiveTypes:()=>NI0,prefixIssues:()=>ZQ,pick:()=>Hh1,partial:()=>Fh1,parsedType:()=>H1,optionalKeys:()=>LI0,omit:()=>zh1,objectClone:()=>JW8,numKeys:()=>UW8,nullish:()=>HF,normalizeParams:()=>q1,mergeDefs:()=>Bz,merge:()=>VW8,jsonStringifyReplacer:()=>EP,joinValues:()=>i0,issue:()=>RP,isPlainObject:()=>VF,isObject:()=>vB,hexToUint8Array:()=>NW8,getSizableOrigin:()=>Hb,getParsedType:()=>HW8,getLengthableOrigin:()=>zb,getEnumValues:()=>Zb,getElementAtPath:()=>WW8,floatSafeRemainder:()=>AI0,finalizeIssue:()=>gG,extend:()=>Vh1,explicitlyAborted:()=>EI0,escapeRegex:()=>mZ,esc:()=>yt,defineLazy:()=>m6,createTransparentProxy:()=>zW8,cloneDef:()=>QW8,clone:()=>hY,cleanRegex:()=>Kb,cleanEnum:()=>AW8,captureStackTrace:()=>bt,cached:()=>MP,base64urlToUint8Array:()=>FW8,base64ToUint8Array:()=>Nh1,assignProp:()=>zF,assertNotEqual:()=>$W8,assertNever:()=>XW8,assertIs:()=>YW8,assertEqual:()=>eQ8,assert:()=>GW8,allowsEval:()=>DI0,aborted:()=>AF,NUMBER_FORMAT_RANGES:()=>BI0,Class:()=>Bh1,BIGINT_FORMAT_RANGES:()=>OI0});function eQ8($){return $}function $W8($){return $}function YW8($){}function XW8($){throw Error("Unexpected value in exhaustive check")}function GW8($){}function Zb($){let Y=Object.values($).filter((G)=>typeof G==="number");return Object.entries($).filter(([G,J])=>Y.indexOf(+G)===-1).map(([G,J])=>J)}function i0($,Y="|"){return $.map((X)=>U1(X)).join(Y)}function EP($,Y){if(typeof Y==="bigint")return Y.toString();return Y}function MP($){return{get value(){{let X=$();return Object.defineProperty(this,"value",{value:X}),X}throw Error("cached value already set")}}}function HF($){return $===null||$===void 0}function Kb($){let Y=$.startsWith("^")?1:0,X=$.endsWith("$")?$.length-1:$.length;return $.slice(Y,X)}function AI0($,Y){let X=$/Y,G=Math.round(X),J=Number.EPSILON*Math.max(Math.abs(X),1);if(Math.abs(X-G)<J)return 0;return X-G}function m6($,Y,X){let G=void 0;Object.defineProperty($,Y,{get(){if(G===Uh1)return;if(G===void 0)G=Uh1,G=X();return G},set(J){Object.defineProperty($,Y,{value:J})},configurable:!0})}function JW8($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function zF($,Y,X){Object.defineProperty($,Y,{value:X,writable:!0,enumerable:!0,configurable:!0})}function Bz(...$){let Y={};for(let X of $){let G=Object.getOwnPropertyDescriptors(X);Object.assign(Y,G)}return Object.defineProperties({},Y)}function QW8($){return Bz($._zod.def)}function WW8($,Y){if(!Y)return $;return Y.reduce((X,G)=>X?.[G],$)}function ZW8($){let Y=Object.keys($),X=Y.map((G)=>$[G]);return Promise.all(X).then((G)=>{let J={};for(let Q=0;Q<Y.length;Q++)J[Y[Q]]=G[Q];return J})}function KW8($=10){let X="";for(let G=0;G<$;G++)X+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return X}function yt($){return JSON.stringify($)}function FI0($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function vB($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function VF($){if(vB($)===!1)return!1;let Y=$.constructor;if(Y===void 0)return!0;if(typeof Y!=="function")return!0;let X=Y.prototype;if(vB(X)===!1)return!1;if(Object.prototype.hasOwnProperty.call(X,"isPrototypeOf")===!1)return!1;return!0}function ht($){if(VF($))return{...$};if(Array.isArray($))return[...$];if($ instanceof Map)return new Map($);if($ instanceof Set)return new Set($);return $}function UW8($){let Y=0;for(let X in $)if(Object.prototype.hasOwnProperty.call($,X))Y++;return Y}function mZ($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hY($,Y,X){let G=new $._zod.constr(Y??$._zod.def);if(!Y||X?.parent)G._zod.parent=$;return G}function q1($){let Y=$;if(!Y)return{};if(typeof Y==="string")return{error:()=>Y};if(Y?.message!==void 0){if(Y?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");Y.error=Y.message}if(delete Y.message,typeof Y.error==="string")return{...Y,error:()=>Y.error};return Y}function zW8($){let Y;return new Proxy({},{get(X,G,J){return Y??(Y=$()),Reflect.get(Y,G,J)},set(X,G,J,Q){return Y??(Y=$()),Reflect.set(Y,G,J,Q)},has(X,G){return Y??(Y=$()),Reflect.has(Y,G)},deleteProperty(X,G){return Y??(Y=$()),Reflect.deleteProperty(Y,G)},ownKeys(X){return Y??(Y=$()),Reflect.ownKeys(Y)},getOwnPropertyDescriptor(X,G){return Y??(Y=$()),Reflect.getOwnPropertyDescriptor(Y,G)},defineProperty(X,G,J){return Y??(Y=$()),Reflect.defineProperty(Y,G,J)}})}function U1($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function LI0($){return Object.keys($).filter((Y)=>{return $[Y]._zod.optin==="optional"&&$[Y]._zod.optout==="optional"})}function Hh1($,Y){let X=$._zod.def,G=X.checks;if(G&&G.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let Q=Bz($._zod.def,{get shape(){let W={};for(let Z in Y){if(!(Z in X.shape))throw Error(`Unrecognized key: "${Z}"`);if(!Y[Z])continue;W[Z]=X.shape[Z]}return zF(this,"shape",W),W},checks:[]});return hY($,Q)}function zh1($,Y){let X=$._zod.def,G=X.checks;if(G&&G.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let Q=Bz($._zod.def,{get shape(){let W={...$._zod.def.shape};for(let Z in Y){if(!(Z in X.shape))throw Error(`Unrecognized key: "${Z}"`);if(!Y[Z])continue;delete W[Z]}return zF(this,"shape",W),W},checks:[]});return hY($,Q)}function Vh1($,Y){if(!VF(Y))throw Error("Invalid input to extend: expected a plain object");let X=$._zod.def.checks;if(X&&X.length>0){let Q=$._zod.def.shape;for(let W in Y)if(Object.getOwnPropertyDescriptor(Q,W)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let J=Bz($._zod.def,{get shape(){let Q={...$._zod.def.shape,...Y};return zF(this,"shape",Q),Q}});return hY($,J)}function Ah1($,Y){if(!VF(Y))throw Error("Invalid input to safeExtend: expected a plain object");let X=Bz($._zod.def,{get shape(){let G={...$._zod.def.shape,...Y};return zF(this,"shape",G),G}});return hY($,X)}function VW8($,Y){if($._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let X=Bz($._zod.def,{get shape(){let G={...$._zod.def.shape,...Y._zod.def.shape};return zF(this,"shape",G),G},get catchall(){return Y._zod.def.catchall},checks:Y._zod.def.checks??[]});return hY($,X)}function Fh1($,Y,X){let J=Y._zod.def.checks;if(J&&J.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let W=Bz(Y._zod.def,{get shape(){let Z=Y._zod.def.shape,K={...Z};if(X)for(let H in X){if(!(H in Z))throw Error(`Unrecognized key: "${H}"`);if(!X[H])continue;K[H]=$?new $({type:"optional",innerType:Z[H]}):Z[H]}else for(let H in Z)K[H]=$?new $({type:"optional",innerType:Z[H]}):Z[H];return zF(this,"shape",K),K},checks:[]});return hY(Y,W)}function Dh1($,Y,X){let G=Bz(Y._zod.def,{get shape(){let J=Y._zod.def.shape,Q={...J};if(X)for(let W in X){if(!(W in Q))throw Error(`Unrecognized key: "${W}"`);if(!X[W])continue;Q[W]=new $({type:"nonoptional",innerType:J[W]})}else for(let W in J)Q[W]=new $({type:"nonoptional",innerType:J[W]});return zF(this,"shape",Q),Q}});return hY(Y,G)}function AF($,Y=0){if($.aborted===!0)return!0;for(let X=Y;X<$.issues.length;X++)if($.issues[X]?.continue!==!0)return!0;return!1}function EI0($,Y=0){if($.aborted===!0)return!0;for(let X=Y;X<$.issues.length;X++)if($.issues[X]?.continue===!1)return!0;return!1}function ZQ($,Y){return Y.map((X)=>{var G;return(G=X).path??(G.path=[]),X.path.unshift($),X})}function Wb($){return typeof $==="string"?$:$?.message}function gG($,Y,X){let G=$.message?$.message:Wb($.inst?._zod.def?.error?.($))??Wb(Y?.error?.($))??Wb(X.customError?.($))??Wb(X.localeError?.($))??"Invalid input",{inst:J,continue:Q,input:W,...Z}=$;if(Z.path??(Z.path=[]),Z.message=G,Y?.reportInput)Z.input=W;return Z}function Hb($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function zb($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function H1($){let Y=typeof $;switch(Y){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let X=$;if(X&&Object.getPrototypeOf(X)!==Object.prototype&&"constructor"in X&&X.constructor)return X.constructor.name}}return Y}function RP(...$){let[Y,X,G]=$;if(typeof Y==="string")return{message:Y,code:"custom",input:X,inst:G};return{...Y}}function AW8($){return Object.entries($).filter(([Y,X])=>{return Number.isNaN(Number.parseInt(Y,10))}).map((Y)=>Y[1])}function Nh1($){let Y=atob($),X=new Uint8Array(Y.length);for(let G=0;G<Y.length;G++)X[G]=Y.charCodeAt(G);return X}function Lh1($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCharCode($[X]);return btoa(Y)}function FW8($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X="=".repeat((4-Y.length%4)%4);return Nh1(Y+X)}function DW8($){return Lh1($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function NW8($){let Y=$.replace(/^0x/,"");if(Y.length%2!==0)throw Error("Invalid hex string length");let X=new Uint8Array(Y.length/2);for(let G=0;G<Y.length;G+=2)X[G/2]=Number.parseInt(Y.slice(G,G+2),16);return X}function LW8($){return Array.from($).map((Y)=>Y.toString(16).padStart(2,"0")).join("")}class Bh1{constructor(...$){}}var Uh1,bt,DI0,HW8=($)=>{let Y=typeof $;switch(Y){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${Y}`)}},Ub,NI0,BI0,OI0;var _4=V0(()=>{kB();Uh1=Symbol("evaluating");bt="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};DI0=MP(()=>{if(CB.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});Ub=new Set(["string","number","symbol"]),NI0=new Set(["string","number","bigint","boolean","symbol","undefined"]);BI0={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},OI0={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]}});function qP($,Y=(X)=>X.message){let X={},G=[];for(let J of $.issues)if(J.path.length>0)X[J.path[0]]=X[J.path[0]]||[],X[J.path[0]].push(Y(J));else G.push(Y(J));return{formErrors:G,fieldErrors:X}}function IP($,Y=(X)=>X.message){let X={_errors:[]},G=(J,Q=[])=>{for(let W of J.issues)if(W.code==="invalid_union"&&W.errors.length)W.errors.map((Z)=>G({issues:Z},[...Q,...W.path]));else if(W.code==="invalid_key")G({issues:W.issues},[...Q,...W.path]);else if(W.code==="invalid_element")G({issues:W.issues},[...Q,...W.path]);else{let Z=[...Q,...W.path];if(Z.length===0)X._errors.push(Y(W));else{let K=X,H=0;while(H<Z.length){let z=Z[H];if(H!==Z.length-1)K[z]=K[z]||{_errors:[]};else K[z]=K[z]||{_errors:[]},K[z]._errors.push(Y(W));K=K[z],H++}}}};return G($),X}function ft($,Y=(X)=>X.message){let X={errors:[]},G=(J,Q=[])=>{var W,Z;for(let K of J.issues)if(K.code==="invalid_union"&&K.errors.length)K.errors.map((H)=>G({issues:H},[...Q,...K.path]));else if(K.code==="invalid_key")G({issues:K.issues},[...Q,...K.path]);else if(K.code==="invalid_element")G({issues:K.issues},[...Q,...K.path]);else{let H=[...Q,...K.path];if(H.length===0){X.errors.push(Y(K));continue}let z=X,V=0;while(V<H.length){let A=H[V],F=V===H.length-1;if(typeof A==="string")z.properties??(z.properties={}),(W=z.properties)[A]??(W[A]={errors:[]}),z=z.properties[A];else z.items??(z.items=[]),(Z=z.items)[A]??(Z[A]={errors:[]}),z=z.items[A];if(F)z.errors.push(Y(K));V++}}};return G($),X}function Eh1($){let Y=[],X=$.map((G)=>typeof G==="object"?G.key:G);for(let G of X)if(typeof G==="number")Y.push(`[${G}]`);else if(typeof G==="symbol")Y.push(`[${JSON.stringify(String(G))}]`);else if(/[^\w$]/.test(G))Y.push(`[${JSON.stringify(G)}]`);else{if(Y.length)Y.push(".");Y.push(G)}return Y.join("")}function gt($){let Y=[],X=[...$.issues].sort((G,J)=>(G.path??[]).length-(J.path??[]).length);for(let G of X)if(Y.push(`\u2716 ${G.message}`),G.path?.length)Y.push(`  \u2192 at ${Eh1(G.path)}`);return Y.join(`
`)}var Oh1=($,Y)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:Y,enumerable:!1}),$.message=JSON.stringify(Y,EP,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},Vb,KQ;var MI0=V0(()=>{kB();_4();Vb=x0("$ZodError",Oh1),KQ=x0("$ZodError",Oh1,{Parent:Error})});var PP=($)=>(Y,X,G,J)=>{let Q=G?{...G,async:!1}:{async:!1},W=Y._zod.run({value:X,issues:[]},Q);if(W instanceof Promise)throw new HU;if(W.issues.length){let Z=new(J?.Err??$)(W.issues.map((K)=>gG(K,Q,k7())));throw bt(Z,J?.callee),Z}return W.value},xB,wP=($)=>async(Y,X,G,J)=>{let Q=G?{...G,async:!0}:{async:!0},W=Y._zod.run({value:X,issues:[]},Q);if(W instanceof Promise)W=await W;if(W.issues.length){let Z=new(J?.Err??$)(W.issues.map((K)=>gG(K,Q,k7())));throw bt(Z,J?.callee),Z}return W.value},yB,_P=($)=>(Y,X,G)=>{let J=G?{...G,async:!1}:{async:!1},Q=Y._zod.run({value:X,issues:[]},J);if(Q instanceof Promise)throw new HU;return Q.issues.length?{success:!1,error:new($??Vb)(Q.issues.map((W)=>gG(W,J,k7())))}:{success:!0,data:Q.value}},FF,jP=($)=>async(Y,X,G)=>{let J=G?{...G,async:!0}:{async:!0},Q=Y._zod.run({value:X,issues:[]},J);if(Q instanceof Promise)Q=await Q;return Q.issues.length?{success:!1,error:new $(Q.issues.map((W)=>gG(W,J,k7())))}:{success:!0,data:Q.value}},DF,mt=($)=>(Y,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return PP($)(Y,X,J)},Mh1,ut=($)=>(Y,X,G)=>{return PP($)(Y,X,G)},Rh1,pt=($)=>async(Y,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return wP($)(Y,X,J)},qh1,dt=($)=>async(Y,X,G)=>{return wP($)(Y,X,G)},Ih1,ct=($)=>(Y,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return _P($)(Y,X,J)},Ph1,lt=($)=>(Y,X,G)=>{return _P($)(Y,X,G)},wh1,it=($)=>async(Y,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return jP($)(Y,X,J)},_h1,nt=($)=>async(Y,X,G)=>{return jP($)(Y,X,G)},jh1;var RI0=V0(()=>{kB();MI0();_4();xB=PP(KQ),yB=wP(KQ),FF=_P(KQ),DF=jP(KQ),Mh1=mt(KQ),Rh1=ut(KQ),qh1=pt(KQ),Ih1=dt(KQ),Ph1=ct(KQ),wh1=lt(KQ),_h1=it(KQ),jh1=nt(KQ)});var mG={};W8(mG,{xid:()=>wI0,uuid7:()=>RW8,uuid6:()=>MW8,uuid4:()=>EW8,uuid:()=>bB,uppercase:()=>oI0,unicodeEmail:()=>Th1,undefined:()=>aI0,ulid:()=>PI0,time:()=>pI0,string:()=>cI0,sha512_hex:()=>dW8,sha512_base64url:()=>lW8,sha512_base64:()=>cW8,sha384_hex:()=>mW8,sha384_base64url:()=>pW8,sha384_base64:()=>uW8,sha256_hex:()=>hW8,sha256_base64url:()=>gW8,sha256_base64:()=>fW8,sha1_hex:()=>xW8,sha1_base64url:()=>bW8,sha1_base64:()=>yW8,rfc5322Email:()=>IW8,number:()=>Ab,null:()=>rI0,nanoid:()=>jI0,md5_hex:()=>SW8,md5_base64url:()=>vW8,md5_base64:()=>kW8,mac:()=>yI0,lowercase:()=>sI0,ksuid:()=>_I0,ipv6:()=>xI0,ipv4:()=>vI0,integer:()=>iI0,idnEmail:()=>PW8,httpProtocol:()=>gI0,html5Email:()=>qW8,hostname:()=>jW8,hex:()=>CW8,guid:()=>CI0,extendedDuration:()=>OW8,emoji:()=>kI0,email:()=>SI0,e164:()=>mI0,duration:()=>TI0,domain:()=>TW8,datetime:()=>dI0,date:()=>uI0,cuid2:()=>II0,cuid:()=>qI0,cidrv6:()=>hI0,cidrv4:()=>bI0,browserEmail:()=>wW8,boolean:()=>nI0,bigint:()=>lI0,base64url:()=>rt,base64:()=>fI0});function kI0(){return new RegExp(_W8,"u")}function Sh1($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function pI0($){return new RegExp(`^${Sh1($)}$`)}function dI0($){let Y=Sh1({precision:$.precision}),X=["Z"];if($.local)X.push("");if($.offset)X.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let G=`${Y}(?:${X.join("|")})`;return new RegExp(`^${Ch1}T(?:${G})$`)}function Fb($,Y){return new RegExp(`^[A-Za-z0-9+/]{${$}}${Y}$`)}function Db($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var qI0,II0,PI0,wI0,_I0,jI0,TI0,OW8,CI0,bB=($)=>{if(!$)return/^([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)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},EW8,MW8,RW8,SI0,qW8,IW8,Th1,PW8,wW8,_W8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",vI0,xI0,yI0=($)=>{let Y=mZ($??":");return new RegExp(`^(?:[0-9A-F]{2}${Y}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${Y}){5}[0-9a-f]{2}$`)},bI0,hI0,fI0,rt,jW8,TW8,gI0,mI0,Ch1="(?:(?:\\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])))",uI0,cI0=($)=>{let Y=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${Y}$`)},lI0,iI0,Ab,nI0,rI0,aI0,sI0,oI0,CW8,SW8,kW8,vW8,xW8,yW8,bW8,hW8,fW8,gW8,mW8,uW8,pW8,dW8,cW8,lW8;var at=V0(()=>{_4();qI0=/^[cC][0-9a-z]{6,}$/,II0=/^[0-9a-z]+$/,PI0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,wI0=/^[0-9a-vA-V]{20}$/,_I0=/^[A-Za-z0-9]{27}$/,jI0=/^[a-zA-Z0-9_-]{21}$/,TI0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,OW8=/^[-+]?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)?)??$/,CI0=/^([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})$/,EW8=bB(4),MW8=bB(6),RW8=bB(7),SI0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qW8=/^[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])?)*$/,IW8=/^(([^<>()\[\]\\.,;:\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,}))$/,Th1=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,PW8=Th1,wW8=/^[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])?)*$/;vI0=/^(?:(?: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])$/,xI0=/^(([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}|:))$/,bI0=/^((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])$/,hI0=/^(([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])$/,fI0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,rt=/^[A-Za-z0-9_-]*$/,jW8=/^(?=.{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])?)*\.?$/,TW8=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,gI0=/^https?$/,mI0=/^\+[1-9]\d{6,14}$/,uI0=new RegExp(`^${Ch1}$`);lI0=/^-?\d+n?$/,iI0=/^-?\d+$/,Ab=/^-?\d+(?:\.\d+)?$/,nI0=/^(?:true|false)$/i,rI0=/^null$/i,aI0=/^undefined$/i,sI0=/^[^A-Z]*$/,oI0=/^[^a-z]*$/,CW8=/^[0-9a-fA-F]*$/;SW8=/^[0-9a-fA-F]{32}$/,kW8=Fb(22,"=="),vW8=Db(22),xW8=/^[0-9a-fA-F]{40}$/,yW8=Fb(27,"="),bW8=Db(27),hW8=/^[0-9a-fA-F]{64}$/,fW8=Fb(43,"="),gW8=Db(43),mW8=/^[0-9a-fA-F]{96}$/,uW8=Fb(64,""),pW8=Db(64),dW8=/^[0-9a-fA-F]{128}$/,cW8=Fb(86,"=="),lW8=Db(86)});function kh1($,Y,X){if($.issues.length)Y.issues.push(...ZQ(X,$.issues))}var H5,vh1,st,ot,tI0,eI0,$P0,YP0,XP0,GP0,JP0,QP0,WP0,TP,ZP0,KP0,UP0,HP0,zP0,VP0,AP0,FP0,DP0;var tt=V0(()=>{kB();at();_4();H5=x0("$ZodCheck",($,Y)=>{var X;$._zod??($._zod={}),$._zod.def=Y,(X=$._zod).onattach??(X.onattach=[])}),vh1={number:"number",bigint:"bigint",object:"date"},st=x0("$ZodCheckLessThan",($,Y)=>{H5.init($,Y);let X=vh1[typeof Y.value];$._zod.onattach.push((G)=>{let J=G._zod.bag,Q=(Y.inclusive?J.maximum:J.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(Y.value<Q)if(Y.inclusive)J.maximum=Y.value;else J.exclusiveMaximum=Y.value}),$._zod.check=(G)=>{if(Y.inclusive?G.value<=Y.value:G.value<Y.value)return;G.issues.push({origin:X,code:"too_big",maximum:typeof Y.value==="object"?Y.value.getTime():Y.value,input:G.value,inclusive:Y.inclusive,inst:$,continue:!Y.abort})}}),ot=x0("$ZodCheckGreaterThan",($,Y)=>{H5.init($,Y);let X=vh1[typeof Y.value];$._zod.onattach.push((G)=>{let J=G._zod.bag,Q=(Y.inclusive?J.minimum:J.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(Y.value>Q)if(Y.inclusive)J.minimum=Y.value;else J.exclusiveMinimum=Y.value}),$._zod.check=(G)=>{if(Y.inclusive?G.value>=Y.value:G.value>Y.value)return;G.issues.push({origin:X,code:"too_small",minimum:typeof Y.value==="object"?Y.value.getTime():Y.value,input:G.value,inclusive:Y.inclusive,inst:$,continue:!Y.abort})}}),tI0=x0("$ZodCheckMultipleOf",($,Y)=>{H5.init($,Y),$._zod.onattach.push((X)=>{var G;(G=X._zod.bag).multipleOf??(G.multipleOf=Y.value)}),$._zod.check=(X)=>{if(typeof X.value!==typeof Y.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof X.value==="bigint"?X.value%Y.value===BigInt(0):AI0(X.value,Y.value)===0)return;X.issues.push({origin:typeof X.value,code:"not_multiple_of",divisor:Y.value,input:X.value,inst:$,continue:!Y.abort})}}),eI0=x0("$ZodCheckNumberFormat",($,Y)=>{H5.init($,Y),Y.format=Y.format||"float64";let X=Y.format?.includes("int"),G=X?"int":"number",[J,Q]=BI0[Y.format];$._zod.onattach.push((W)=>{let Z=W._zod.bag;if(Z.format=Y.format,Z.minimum=J,Z.maximum=Q,X)Z.pattern=iI0}),$._zod.check=(W)=>{let Z=W.value;if(X){if(!Number.isInteger(Z)){W.issues.push({expected:G,format:Y.format,code:"invalid_type",continue:!1,input:Z,inst:$});return}if(!Number.isSafeInteger(Z)){if(Z>0)W.issues.push({input:Z,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:G,inclusive:!0,continue:!Y.abort});else W.issues.push({input:Z,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:G,inclusive:!0,continue:!Y.abort});return}}if(Z<J)W.issues.push({origin:"number",input:Z,code:"too_small",minimum:J,inclusive:!0,inst:$,continue:!Y.abort});if(Z>Q)W.issues.push({origin:"number",input:Z,code:"too_big",maximum:Q,inclusive:!0,inst:$,continue:!Y.abort})}}),$P0=x0("$ZodCheckBigIntFormat",($,Y)=>{H5.init($,Y);let[X,G]=OI0[Y.format];$._zod.onattach.push((J)=>{let Q=J._zod.bag;Q.format=Y.format,Q.minimum=X,Q.maximum=G}),$._zod.check=(J)=>{let Q=J.value;if(Q<X)J.issues.push({origin:"bigint",input:Q,code:"too_small",minimum:X,inclusive:!0,inst:$,continue:!Y.abort});if(Q>G)J.issues.push({origin:"bigint",input:Q,code:"too_big",maximum:G,inclusive:!0,inst:$,continue:!Y.abort})}}),YP0=x0("$ZodCheckMaxSize",($,Y)=>{var X;H5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!HF(J)&&J.size!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.maximum??Number.POSITIVE_INFINITY;if(Y.maximum<J)G._zod.bag.maximum=Y.maximum}),$._zod.check=(G)=>{let J=G.value;if(J.size<=Y.maximum)return;G.issues.push({origin:Hb(J),code:"too_big",maximum:Y.maximum,inclusive:!0,input:J,inst:$,continue:!Y.abort})}}),XP0=x0("$ZodCheckMinSize",($,Y)=>{var X;H5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!HF(J)&&J.size!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(Y.minimum>J)G._zod.bag.minimum=Y.minimum}),$._zod.check=(G)=>{let J=G.value;if(J.size>=Y.minimum)return;G.issues.push({origin:Hb(J),code:"too_small",minimum:Y.minimum,inclusive:!0,input:J,inst:$,continue:!Y.abort})}}),GP0=x0("$ZodCheckSizeEquals",($,Y)=>{var X;H5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!HF(J)&&J.size!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.minimum=Y.size,J.maximum=Y.size,J.size=Y.size}),$._zod.check=(G)=>{let J=G.value,Q=J.size;if(Q===Y.size)return;let W=Q>Y.size;G.issues.push({origin:Hb(J),...W?{code:"too_big",maximum:Y.size}:{code:"too_small",minimum:Y.size},inclusive:!0,exact:!0,input:G.value,inst:$,continue:!Y.abort})}}),JP0=x0("$ZodCheckMaxLength",($,Y)=>{var X;H5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!HF(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.maximum??Number.POSITIVE_INFINITY;if(Y.maximum<J)G._zod.bag.maximum=Y.maximum}),$._zod.check=(G)=>{let J=G.value;if(J.length<=Y.maximum)return;let W=zb(J);G.issues.push({origin:W,code:"too_big",maximum:Y.maximum,inclusive:!0,input:J,inst:$,continue:!Y.abort})}}),QP0=x0("$ZodCheckMinLength",($,Y)=>{var X;H5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!HF(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(Y.minimum>J)G._zod.bag.minimum=Y.minimum}),$._zod.check=(G)=>{let J=G.value;if(J.length>=Y.minimum)return;let W=zb(J);G.issues.push({origin:W,code:"too_small",minimum:Y.minimum,inclusive:!0,input:J,inst:$,continue:!Y.abort})}}),WP0=x0("$ZodCheckLengthEquals",($,Y)=>{var X;H5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!HF(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.minimum=Y.length,J.maximum=Y.length,J.length=Y.length}),$._zod.check=(G)=>{let J=G.value,Q=J.length;if(Q===Y.length)return;let W=zb(J),Z=Q>Y.length;G.issues.push({origin:W,...Z?{code:"too_big",maximum:Y.length}:{code:"too_small",minimum:Y.length},inclusive:!0,exact:!0,input:G.value,inst:$,continue:!Y.abort})}}),TP=x0("$ZodCheckStringFormat",($,Y)=>{var X,G;if(H5.init($,Y),$._zod.onattach.push((J)=>{let Q=J._zod.bag;if(Q.format=Y.format,Y.pattern)Q.patterns??(Q.patterns=new Set),Q.patterns.add(Y.pattern)}),Y.pattern)(X=$._zod).check??(X.check=(J)=>{if(Y.pattern.lastIndex=0,Y.pattern.test(J.value))return;J.issues.push({origin:"string",code:"invalid_format",format:Y.format,input:J.value,...Y.pattern?{pattern:Y.pattern.toString()}:{},inst:$,continue:!Y.abort})});else(G=$._zod).check??(G.check=()=>{})}),ZP0=x0("$ZodCheckRegex",($,Y)=>{TP.init($,Y),$._zod.check=(X)=>{if(Y.pattern.lastIndex=0,Y.pattern.test(X.value))return;X.issues.push({origin:"string",code:"invalid_format",format:"regex",input:X.value,pattern:Y.pattern.toString(),inst:$,continue:!Y.abort})}}),KP0=x0("$ZodCheckLowerCase",($,Y)=>{Y.pattern??(Y.pattern=sI0),TP.init($,Y)}),UP0=x0("$ZodCheckUpperCase",($,Y)=>{Y.pattern??(Y.pattern=oI0),TP.init($,Y)}),HP0=x0("$ZodCheckIncludes",($,Y)=>{H5.init($,Y);let X=mZ(Y.includes),G=new RegExp(typeof Y.position==="number"?`^.{${Y.position}}${X}`:X);Y.pattern=G,$._zod.onattach.push((J)=>{let Q=J._zod.bag;Q.patterns??(Q.patterns=new Set),Q.patterns.add(G)}),$._zod.check=(J)=>{if(J.value.includes(Y.includes,Y.position))return;J.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:Y.includes,input:J.value,inst:$,continue:!Y.abort})}}),zP0=x0("$ZodCheckStartsWith",($,Y)=>{H5.init($,Y);let X=new RegExp(`^${mZ(Y.prefix)}.*`);Y.pattern??(Y.pattern=X),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(X)}),$._zod.check=(G)=>{if(G.value.startsWith(Y.prefix))return;G.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:Y.prefix,input:G.value,inst:$,continue:!Y.abort})}}),VP0=x0("$ZodCheckEndsWith",($,Y)=>{H5.init($,Y);let X=new RegExp(`.*${mZ(Y.suffix)}$`);Y.pattern??(Y.pattern=X),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(X)}),$._zod.check=(G)=>{if(G.value.endsWith(Y.suffix))return;G.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:Y.suffix,input:G.value,inst:$,continue:!Y.abort})}});AP0=x0("$ZodCheckProperty",($,Y)=>{H5.init($,Y),$._zod.check=(X)=>{let G=Y.schema._zod.run({value:X.value[Y.property],issues:[]},{});if(G instanceof Promise)return G.then((J)=>kh1(J,X,Y.property));kh1(G,X,Y.property);return}}),FP0=x0("$ZodCheckMimeType",($,Y)=>{H5.init($,Y);let X=new Set(Y.mime);$._zod.onattach.push((G)=>{G._zod.bag.mime=Y.mime}),$._zod.check=(G)=>{if(X.has(G.value.type))return;G.issues.push({code:"invalid_value",values:Y.mime,input:G.value.type,inst:$,continue:!Y.abort})}}),DP0=x0("$ZodCheckOverwrite",($,Y)=>{H5.init($,Y),$._zod.check=(X)=>{X.value=Y.tx(X.value)}})});class et{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let X=$.split(`
`).filter((Q)=>Q),G=Math.min(...X.map((Q)=>Q.length-Q.trimStart().length)),J=X.map((Q)=>Q.slice(G)).map((Q)=>" ".repeat(this.indent*2)+Q);for(let Q of J)this.content.push(Q)}compile(){let $=Function,Y=this?.args,G=[...(this?.content??[""]).map((J)=>`  ${J}`)];return new $(...Y,G.join(`
`))}}var NP0;var LP0=V0(()=>{NP0={major:4,minor:4,patch:3}});function qP0($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}function ah1($){if(!rt.test($))return!1;let Y=$.replace(/[-_]/g,(G)=>G==="-"?"+":"/"),X=Y.padEnd(Math.ceil(Y.length/4)*4,"=");return qP0(X)}function sh1($,Y=null){try{let X=$.split(".");if(X.length!==3)return!1;let[G]=X;if(!G)return!1;let J=JSON.parse(atob(G));if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(Y&&(!("alg"in J)||J.alg!==Y))return!1;return!0}catch{return!1}}function yh1($,Y,X){if($.issues.length)Y.issues.push(...ZQ(X,$.issues));Y.value[X]=$.value}function Ge($,Y,X,G,J,Q){let W=X in G;if($.issues.length){if(J&&Q&&!W)return;Y.issues.push(...ZQ(X,$.issues))}if(!W&&!J){if(!$.issues.length)Y.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[X]});return}if($.value===void 0){if(W)Y.value[X]=void 0}else Y.value[X]=$.value}function oh1($){let Y=Object.keys($.shape);for(let G of Y)if(!$.shape?.[G]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${G}": expected a Zod schema`);let X=LI0($.shape);return{...$,keys:Y,keySet:new Set(Y),numKeys:Y.length,optionalKeys:new Set(X)}}function th1($,Y,X,G,J,Q){let W=[],Z=J.keySet,K=J.catchall._zod,H=K.def.type,z=K.optin==="optional",V=K.optout==="optional";for(let A in Y){if(A==="__proto__")continue;if(Z.has(A))continue;if(H==="never"){W.push(A);continue}let F=K.run({value:Y[A],issues:[]},G);if(F instanceof Promise)$.push(F.then((N)=>Ge(N,X,A,Y,z,V)));else Ge(F,X,A,Y,z,V)}if(W.length)X.issues.push({code:"unrecognized_keys",keys:W,input:Y,inst:Q});if(!$.length)return X;return Promise.all($).then(()=>{return X})}function bh1($,Y,X,G){for(let Q of $)if(Q.issues.length===0)return Y.value=Q.value,Y;let J=$.filter((Q)=>!AF(Q));if(J.length===1)return Y.value=J[0].value,J[0];return Y.issues.push({code:"invalid_union",input:Y.value,inst:X,errors:$.map((Q)=>Q.issues.map((W)=>gG(W,G,k7())))}),Y}function hh1($,Y,X,G){let J=$.filter((Q)=>Q.issues.length===0);if(J.length===1)return Y.value=J[0].value,Y;if(J.length===0)Y.issues.push({code:"invalid_union",input:Y.value,inst:X,errors:$.map((Q)=>Q.issues.map((W)=>gG(W,G,k7())))});else Y.issues.push({code:"invalid_union",input:Y.value,inst:X,errors:[],inclusive:!1});return Y}function BP0($,Y){if($===Y)return{valid:!0,data:$};if($ instanceof Date&&Y instanceof Date&&+$===+Y)return{valid:!0,data:$};if(VF($)&&VF(Y)){let X=Object.keys(Y),G=Object.keys($).filter((Q)=>X.indexOf(Q)!==-1),J={...$,...Y};for(let Q of G){let W=BP0($[Q],Y[Q]);if(!W.valid)return{valid:!1,mergeErrorPath:[Q,...W.mergeErrorPath]};J[Q]=W.data}return{valid:!0,data:J}}if(Array.isArray($)&&Array.isArray(Y)){if($.length!==Y.length)return{valid:!1,mergeErrorPath:[]};let X=[];for(let G=0;G<$.length;G++){let J=$[G],Q=Y[G],W=BP0(J,Q);if(!W.valid)return{valid:!1,mergeErrorPath:[G,...W.mergeErrorPath]};X.push(W.data)}return{valid:!0,data:X}}return{valid:!1,mergeErrorPath:[]}}function fh1($,Y,X){let G=new Map,J;for(let Z of Y.issues)if(Z.code==="unrecognized_keys"){J??(J=Z);for(let K of Z.keys){if(!G.has(K))G.set(K,{});G.get(K).l=!0}}else $.issues.push(Z);for(let Z of X.issues)if(Z.code==="unrecognized_keys")for(let K of Z.keys){if(!G.has(K))G.set(K,{});G.get(K).r=!0}else $.issues.push(Z);let Q=[...G].filter(([,Z])=>Z.l&&Z.r).map(([Z])=>Z);if(Q.length&&J)$.issues.push({...J,keys:Q});if(AF($))return $;let W=BP0(Y.value,X.value);if(!W.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(W.mergeErrorPath)}`);return $.value=W.data,$}function gh1($,Y){for(let X=$.length-1;X>=0;X--)if($[X]._zod[Y]!=="optional")return X+1;return 0}function mh1($,Y,X){if($.issues.length)Y.issues.push(...ZQ(X,$.issues));Y.value[X]=$.value}function uh1($,Y,X,G,J){for(let Q=0;Q<X.length;Q++){let W=$[Q],Z=Q<G.length;if(W.issues.length){if(!Z&&Q>=J){Y.value.length=Q;break}Y.issues.push(...ZQ(Q,W.issues))}Y.value[Q]=W.value}for(let Q=Y.value.length-1;Q>=G.length;Q--)if(X[Q]._zod.optout==="optional"&&Y.value[Q]===void 0)Y.value.length=Q;else break;return Y}function ph1($,Y,X,G,J,Q,W){if($.issues.length)if(Ub.has(typeof G))X.issues.push(...ZQ(G,$.issues));else X.issues.push({code:"invalid_key",origin:"map",input:J,inst:Q,issues:$.issues.map((Z)=>gG(Z,W,k7()))});if(Y.issues.length)if(Ub.has(typeof G))X.issues.push(...ZQ(G,Y.issues));else X.issues.push({origin:"map",code:"invalid_element",input:J,inst:Q,key:G,issues:Y.issues.map((Z)=>gG(Z,W,k7()))});X.value.set($.value,Y.value)}function dh1($,Y){if($.issues.length)Y.issues.push(...$.issues);Y.value.add($.value)}function ch1($,Y){if(Y===void 0&&($.issues.length||$.fallback))return{issues:[],value:void 0};return $}function lh1($,Y){if($.value===void 0)$.value=Y.defaultValue;return $}function ih1($,Y){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:Y});return $}function $e($,Y,X){if($.issues.length)return $.aborted=!0,$;return Y._zod.run({value:$.value,issues:$.issues,fallback:$.fallback},X)}function Ye($,Y,X){if($.issues.length)return $.aborted=!0,$;if((X.direction||"forward")==="forward"){let J=Y.transform($.value,$);if(J instanceof Promise)return J.then((Q)=>Xe($,Q,Y.out,X));return Xe($,J,Y.out,X)}else{let J=Y.reverseTransform($.value,$);if(J instanceof Promise)return J.then((Q)=>Xe($,Q,Y.in,X));return Xe($,J,Y.in,X)}}function Xe($,Y,X,G){if($.issues.length)return $.aborted=!0,$;return X._zod.run({value:Y,issues:$.issues},G)}function nh1($){return $.value=Object.freeze($.value),$}function rh1($,Y,X,G){if(!$){let J={code:"custom",input:X,inst:G,path:[...G._zod.def.path??[]],continue:!G._zod.def.abort};if(G._zod.def.params)J.params=G._zod.def.params;Y.issues.push(RP(J))}}var Z6,NF,g9,Je,Qe,We,Ze,Ke,Ue,He,ze,Ve,Ae,Fe,OP0,EP0,MP0,RP0,De,Ne,Le,Be,Oe,Ee,Me,Re,qe,Ie,Nb,Pe,CP,Lb,we,_e,je,Te,Ce,Se,ke,ve,xe,ye,be,IP0,SP,he,fe,ge,Bb,me,ue,pe,de,ce,le,ie,Ob,ne,re,ae,se,oe,te,ee,$00,Eb,kP,PP0,Y00,X00,G00,J00,Q00,W00;var wP0=V0(()=>{tt();kB();RI0();at();_4();LP0();_4();Z6=x0("$ZodType",($,Y)=>{var X;$??($={}),$._zod.def=Y,$._zod.bag=$._zod.bag||{},$._zod.version=NP0;let G=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))G.unshift($);for(let J of G)for(let Q of J._zod.onattach)Q($);if(G.length===0)(X=$._zod).deferred??(X.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let J=(W,Z,K)=>{let H=AF(W),z;for(let V of Z){if(V._zod.def.when){if(EI0(W))continue;if(!V._zod.def.when(W))continue}else if(H)continue;let A=W.issues.length,F=V._zod.check(W);if(F instanceof Promise&&K?.async===!1)throw new HU;if(z||F instanceof Promise)z=(z??Promise.resolve()).then(async()=>{if(await F,W.issues.length===A)return;if(!H)H=AF(W,A)});else{if(W.issues.length===A)continue;if(!H)H=AF(W,A)}}if(z)return z.then(()=>{return W});return W},Q=(W,Z,K)=>{if(AF(W))return W.aborted=!0,W;let H=J(Z,G,K);if(H instanceof Promise){if(K.async===!1)throw new HU;return H.then((z)=>$._zod.parse(z,K))}return $._zod.parse(H,K)};$._zod.run=(W,Z)=>{if(Z.skipChecks)return $._zod.parse(W,Z);if(Z.direction==="backward"){let H=$._zod.parse({value:W.value,issues:[]},{...Z,skipChecks:!0});if(H instanceof Promise)return H.then((z)=>{return Q(z,W,Z)});return Q(H,W,Z)}let K=$._zod.parse(W,Z);if(K instanceof Promise){if(Z.async===!1)throw new HU;return K.then((H)=>J(H,G,Z))}return J(K,G,Z)}}m6($,"~standard",()=>({validate:(J)=>{try{let Q=FF($,J);return Q.success?{value:Q.data}:{issues:Q.error?.issues}}catch(Q){return DF($,J).then((W)=>W.success?{value:W.data}:{issues:W.error?.issues})}},vendor:"zod",version:1}))}),NF=x0("$ZodString",($,Y)=>{Z6.init($,Y),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??cI0($._zod.bag),$._zod.parse=(X,G)=>{if(Y.coerce)try{X.value=String(X.value)}catch(J){}if(typeof X.value==="string")return X;return X.issues.push({expected:"string",code:"invalid_type",input:X.value,inst:$}),X}}),g9=x0("$ZodStringFormat",($,Y)=>{TP.init($,Y),NF.init($,Y)}),Je=x0("$ZodGUID",($,Y)=>{Y.pattern??(Y.pattern=CI0),g9.init($,Y)}),Qe=x0("$ZodUUID",($,Y)=>{if(Y.version){let G={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[Y.version];if(G===void 0)throw Error(`Invalid UUID version: "${Y.version}"`);Y.pattern??(Y.pattern=bB(G))}else Y.pattern??(Y.pattern=bB());g9.init($,Y)}),We=x0("$ZodEmail",($,Y)=>{Y.pattern??(Y.pattern=SI0),g9.init($,Y)}),Ze=x0("$ZodURL",($,Y)=>{g9.init($,Y),$._zod.check=(X)=>{try{let G=X.value.trim();if(!Y.normalize&&Y.protocol?.source===gI0.source){if(!/^https?:\/\//i.test(G)){X.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:X.value,inst:$,continue:!Y.abort});return}}let J=new URL(G);if(Y.hostname){if(Y.hostname.lastIndex=0,!Y.hostname.test(J.hostname))X.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Y.hostname.source,input:X.value,inst:$,continue:!Y.abort})}if(Y.protocol){if(Y.protocol.lastIndex=0,!Y.protocol.test(J.protocol.endsWith(":")?J.protocol.slice(0,-1):J.protocol))X.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:Y.protocol.source,input:X.value,inst:$,continue:!Y.abort})}if(Y.normalize)X.value=J.href;else X.value=G;return}catch(G){X.issues.push({code:"invalid_format",format:"url",input:X.value,inst:$,continue:!Y.abort})}}}),Ke=x0("$ZodEmoji",($,Y)=>{Y.pattern??(Y.pattern=kI0()),g9.init($,Y)}),Ue=x0("$ZodNanoID",($,Y)=>{Y.pattern??(Y.pattern=jI0),g9.init($,Y)}),He=x0("$ZodCUID",($,Y)=>{Y.pattern??(Y.pattern=qI0),g9.init($,Y)}),ze=x0("$ZodCUID2",($,Y)=>{Y.pattern??(Y.pattern=II0),g9.init($,Y)}),Ve=x0("$ZodULID",($,Y)=>{Y.pattern??(Y.pattern=PI0),g9.init($,Y)}),Ae=x0("$ZodXID",($,Y)=>{Y.pattern??(Y.pattern=wI0),g9.init($,Y)}),Fe=x0("$ZodKSUID",($,Y)=>{Y.pattern??(Y.pattern=_I0),g9.init($,Y)}),OP0=x0("$ZodISODateTime",($,Y)=>{Y.pattern??(Y.pattern=dI0(Y)),g9.init($,Y)}),EP0=x0("$ZodISODate",($,Y)=>{Y.pattern??(Y.pattern=uI0),g9.init($,Y)}),MP0=x0("$ZodISOTime",($,Y)=>{Y.pattern??(Y.pattern=pI0(Y)),g9.init($,Y)}),RP0=x0("$ZodISODuration",($,Y)=>{Y.pattern??(Y.pattern=TI0),g9.init($,Y)}),De=x0("$ZodIPv4",($,Y)=>{Y.pattern??(Y.pattern=vI0),g9.init($,Y),$._zod.bag.format="ipv4"}),Ne=x0("$ZodIPv6",($,Y)=>{Y.pattern??(Y.pattern=xI0),g9.init($,Y),$._zod.bag.format="ipv6",$._zod.check=(X)=>{try{new URL(`http://[${X.value}]`)}catch{X.issues.push({code:"invalid_format",format:"ipv6",input:X.value,inst:$,continue:!Y.abort})}}}),Le=x0("$ZodMAC",($,Y)=>{Y.pattern??(Y.pattern=yI0(Y.delimiter)),g9.init($,Y),$._zod.bag.format="mac"}),Be=x0("$ZodCIDRv4",($,Y)=>{Y.pattern??(Y.pattern=bI0),g9.init($,Y)}),Oe=x0("$ZodCIDRv6",($,Y)=>{Y.pattern??(Y.pattern=hI0),g9.init($,Y),$._zod.check=(X)=>{let G=X.value.split("/");try{if(G.length!==2)throw Error();let[J,Q]=G;if(!Q)throw Error();let W=Number(Q);if(`${W}`!==Q)throw Error();if(W<0||W>128)throw Error();new URL(`http://[${J}]`)}catch{X.issues.push({code:"invalid_format",format:"cidrv6",input:X.value,inst:$,continue:!Y.abort})}}});Ee=x0("$ZodBase64",($,Y)=>{Y.pattern??(Y.pattern=fI0),g9.init($,Y),$._zod.bag.contentEncoding="base64",$._zod.check=(X)=>{if(qP0(X.value))return;X.issues.push({code:"invalid_format",format:"base64",input:X.value,inst:$,continue:!Y.abort})}});Me=x0("$ZodBase64URL",($,Y)=>{Y.pattern??(Y.pattern=rt),g9.init($,Y),$._zod.bag.contentEncoding="base64url",$._zod.check=(X)=>{if(ah1(X.value))return;X.issues.push({code:"invalid_format",format:"base64url",input:X.value,inst:$,continue:!Y.abort})}}),Re=x0("$ZodE164",($,Y)=>{Y.pattern??(Y.pattern=mI0),g9.init($,Y)});qe=x0("$ZodJWT",($,Y)=>{g9.init($,Y),$._zod.check=(X)=>{if(sh1(X.value,Y.alg))return;X.issues.push({code:"invalid_format",format:"jwt",input:X.value,inst:$,continue:!Y.abort})}}),Ie=x0("$ZodCustomStringFormat",($,Y)=>{g9.init($,Y),$._zod.check=(X)=>{if(Y.fn(X.value))return;X.issues.push({code:"invalid_format",format:Y.format,input:X.value,inst:$,continue:!Y.abort})}}),Nb=x0("$ZodNumber",($,Y)=>{Z6.init($,Y),$._zod.pattern=$._zod.bag.pattern??Ab,$._zod.parse=(X,G)=>{if(Y.coerce)try{X.value=Number(X.value)}catch(W){}let J=X.value;if(typeof J==="number"&&!Number.isNaN(J)&&Number.isFinite(J))return X;let Q=typeof J==="number"?Number.isNaN(J)?"NaN":!Number.isFinite(J)?"Infinity":void 0:void 0;return X.issues.push({expected:"number",code:"invalid_type",input:J,inst:$,...Q?{received:Q}:{}}),X}}),Pe=x0("$ZodNumberFormat",($,Y)=>{eI0.init($,Y),Nb.init($,Y)}),CP=x0("$ZodBoolean",($,Y)=>{Z6.init($,Y),$._zod.pattern=nI0,$._zod.parse=(X,G)=>{if(Y.coerce)try{X.value=Boolean(X.value)}catch(Q){}let J=X.value;if(typeof J==="boolean")return X;return X.issues.push({expected:"boolean",code:"invalid_type",input:J,inst:$}),X}}),Lb=x0("$ZodBigInt",($,Y)=>{Z6.init($,Y),$._zod.pattern=lI0,$._zod.parse=(X,G)=>{if(Y.coerce)try{X.value=BigInt(X.value)}catch(J){}if(typeof X.value==="bigint")return X;return X.issues.push({expected:"bigint",code:"invalid_type",input:X.value,inst:$}),X}}),we=x0("$ZodBigIntFormat",($,Y)=>{$P0.init($,Y),Lb.init($,Y)}),_e=x0("$ZodSymbol",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(typeof J==="symbol")return X;return X.issues.push({expected:"symbol",code:"invalid_type",input:J,inst:$}),X}}),je=x0("$ZodUndefined",($,Y)=>{Z6.init($,Y),$._zod.pattern=aI0,$._zod.values=new Set([void 0]),$._zod.parse=(X,G)=>{let J=X.value;if(typeof J>"u")return X;return X.issues.push({expected:"undefined",code:"invalid_type",input:J,inst:$}),X}}),Te=x0("$ZodNull",($,Y)=>{Z6.init($,Y),$._zod.pattern=rI0,$._zod.values=new Set([null]),$._zod.parse=(X,G)=>{let J=X.value;if(J===null)return X;return X.issues.push({expected:"null",code:"invalid_type",input:J,inst:$}),X}}),Ce=x0("$ZodAny",($,Y)=>{Z6.init($,Y),$._zod.parse=(X)=>X}),Se=x0("$ZodUnknown",($,Y)=>{Z6.init($,Y),$._zod.parse=(X)=>X}),ke=x0("$ZodNever",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{return X.issues.push({expected:"never",code:"invalid_type",input:X.value,inst:$}),X}}),ve=x0("$ZodVoid",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(typeof J>"u")return X;return X.issues.push({expected:"void",code:"invalid_type",input:J,inst:$}),X}}),xe=x0("$ZodDate",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{if(Y.coerce)try{X.value=new Date(X.value)}catch(Z){}let J=X.value,Q=J instanceof Date;if(Q&&!Number.isNaN(J.getTime()))return X;return X.issues.push({expected:"date",code:"invalid_type",input:J,...Q?{received:"Invalid Date"}:{},inst:$}),X}});ye=x0("$ZodArray",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(!Array.isArray(J))return X.issues.push({expected:"array",code:"invalid_type",input:J,inst:$}),X;X.value=Array(J.length);let Q=[];for(let W=0;W<J.length;W++){let Z=J[W],K=Y.element._zod.run({value:Z,issues:[]},G);if(K instanceof Promise)Q.push(K.then((H)=>yh1(H,X,W)));else yh1(K,X,W)}if(Q.length)return Promise.all(Q).then(()=>X);return X}});be=x0("$ZodObject",($,Y)=>{if(Z6.init($,Y),!Object.getOwnPropertyDescriptor(Y,"shape")?.get){let Z=Y.shape;Object.defineProperty(Y,"shape",{get:()=>{let K={...Z};return Object.defineProperty(Y,"shape",{value:K}),K}})}let G=MP(()=>oh1(Y));m6($._zod,"propValues",()=>{let Z=Y.shape,K={};for(let H in Z){let z=Z[H]._zod;if(z.values){K[H]??(K[H]=new Set);for(let V of z.values)K[H].add(V)}}return K});let J=vB,Q=Y.catchall,W;$._zod.parse=(Z,K)=>{W??(W=G.value);let H=Z.value;if(!J(H))return Z.issues.push({expected:"object",code:"invalid_type",input:H,inst:$}),Z;Z.value={};let z=[],V=W.shape;for(let A of W.keys){let F=V[A],N=F._zod.optin==="optional",D=F._zod.optout==="optional",L=F._zod.run({value:H[A],issues:[]},K);if(L instanceof Promise)z.push(L.then((B)=>Ge(B,Z,A,H,N,D)));else Ge(L,Z,A,H,N,D)}if(!Q)return z.length?Promise.all(z).then(()=>Z):Z;return th1(z,H,Z,K,G.value,$)}}),IP0=x0("$ZodObjectJIT",($,Y)=>{be.init($,Y);let X=$._zod.parse,G=MP(()=>oh1(Y)),J=(A)=>{let F=new et(["shape","payload","ctx"]),N=G.value,D=(E)=>{let M=yt(E);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};F.write("const input = payload.value;");let L=Object.create(null),B=0;for(let E of N.keys)L[E]=`key_${B++}`;F.write("const newResult = {};");for(let E of N.keys){let M=L[E],R=yt(E),q=A[E],w=q?._zod?.optin==="optional",I=q?._zod?.optout==="optional";if(F.write(`const ${M} = ${D(E)};`),w&&I)F.write(`
        if (${M}.issues.length) {
          if (${R} in input) {
            payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
              ...iss,
              path: iss.path ? [${R}, ...iss.path] : [${R}]
            })));
          }
        }
        
        if (${M}.value === undefined) {
          if (${R} in input) {
            newResult[${R}] = undefined;
          }
        } else {
          newResult[${R}] = ${M}.value;
        }
        
      `);else if(!w)F.write(`
        const ${M}_present = ${R} in input;
        if (${M}.issues.length) {
          payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${R}, ...iss.path] : [${R}]
          })));
        }
        if (!${M}_present && !${M}.issues.length) {
          payload.issues.push({
            code: "invalid_type",
            expected: "nonoptional",
            input: undefined,
            path: [${R}]
          });
        }

        if (${M}_present) {
          if (${M}.value === undefined) {
            newResult[${R}] = undefined;
          } else {
            newResult[${R}] = ${M}.value;
          }
        }

      `);else F.write(`
        if (${M}.issues.length) {
          payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${R}, ...iss.path] : [${R}]
          })));
        }
        
        if (${M}.value === undefined) {
          if (${R} in input) {
            newResult[${R}] = undefined;
          }
        } else {
          newResult[${R}] = ${M}.value;
        }
        
      `)}F.write("payload.value = newResult;"),F.write("return payload;");let O=F.compile();return(E,M)=>O(A,E,M)},Q,W=vB,Z=!CB.jitless,H=Z&&DI0.value,z=Y.catchall,V;$._zod.parse=(A,F)=>{V??(V=G.value);let N=A.value;if(!W(N))return A.issues.push({expected:"object",code:"invalid_type",input:N,inst:$}),A;if(Z&&H&&F?.async===!1&&F.jitless!==!0){if(!Q)Q=J(Y.shape);if(A=Q(A,F),!z)return A;return th1([],N,A,F,V,$)}return X(A,F)}});SP=x0("$ZodUnion",($,Y)=>{Z6.init($,Y),m6($._zod,"optin",()=>Y.options.some((G)=>G._zod.optin==="optional")?"optional":void 0),m6($._zod,"optout",()=>Y.options.some((G)=>G._zod.optout==="optional")?"optional":void 0),m6($._zod,"values",()=>{if(Y.options.every((G)=>G._zod.values))return new Set(Y.options.flatMap((G)=>Array.from(G._zod.values)));return}),m6($._zod,"pattern",()=>{if(Y.options.every((G)=>G._zod.pattern)){let G=Y.options.map((J)=>J._zod.pattern);return new RegExp(`^(${G.map((J)=>Kb(J.source)).join("|")})$`)}return});let X=Y.options.length===1?Y.options[0]._zod.run:null;$._zod.parse=(G,J)=>{if(X)return X(G,J);let Q=!1,W=[];for(let Z of Y.options){let K=Z._zod.run({value:G.value,issues:[]},J);if(K instanceof Promise)W.push(K),Q=!0;else{if(K.issues.length===0)return K;W.push(K)}}if(!Q)return bh1(W,G,$,J);return Promise.all(W).then((Z)=>{return bh1(Z,G,$,J)})}});he=x0("$ZodXor",($,Y)=>{SP.init($,Y),Y.inclusive=!1;let X=Y.options.length===1?Y.options[0]._zod.run:null;$._zod.parse=(G,J)=>{if(X)return X(G,J);let Q=!1,W=[];for(let Z of Y.options){let K=Z._zod.run({value:G.value,issues:[]},J);if(K instanceof Promise)W.push(K),Q=!0;else W.push(K)}if(!Q)return hh1(W,G,$,J);return Promise.all(W).then((Z)=>{return hh1(Z,G,$,J)})}}),fe=x0("$ZodDiscriminatedUnion",($,Y)=>{Y.inclusive=!1,SP.init($,Y);let X=$._zod.parse;m6($._zod,"propValues",()=>{let J={};for(let Q of Y.options){let W=Q._zod.propValues;if(!W||Object.keys(W).length===0)throw Error(`Invalid discriminated union option at index "${Y.options.indexOf(Q)}"`);for(let[Z,K]of Object.entries(W)){if(!J[Z])J[Z]=new Set;for(let H of K)J[Z].add(H)}}return J});let G=MP(()=>{let J=Y.options,Q=new Map;for(let W of J){let Z=W._zod.propValues?.[Y.discriminator];if(!Z||Z.size===0)throw Error(`Invalid discriminated union option at index "${Y.options.indexOf(W)}"`);for(let K of Z){if(Q.has(K))throw Error(`Duplicate discriminator value "${String(K)}"`);Q.set(K,W)}}return Q});$._zod.parse=(J,Q)=>{let W=J.value;if(!vB(W))return J.issues.push({code:"invalid_type",expected:"object",input:W,inst:$}),J;let Z=G.value.get(W?.[Y.discriminator]);if(Z)return Z._zod.run(J,Q);if(Y.unionFallback||Q.direction==="backward")return X(J,Q);return J.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:Y.discriminator,options:Array.from(G.value.keys()),input:W,path:[Y.discriminator],inst:$}),J}}),ge=x0("$ZodIntersection",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value,Q=Y.left._zod.run({value:J,issues:[]},G),W=Y.right._zod.run({value:J,issues:[]},G);if(Q instanceof Promise||W instanceof Promise)return Promise.all([Q,W]).then(([K,H])=>{return fh1(X,K,H)});return fh1(X,Q,W)}});Bb=x0("$ZodTuple",($,Y)=>{Z6.init($,Y);let X=Y.items;$._zod.parse=(G,J)=>{let Q=G.value;if(!Array.isArray(Q))return G.issues.push({input:Q,inst:$,expected:"tuple",code:"invalid_type"}),G;G.value=[];let W=[],Z=gh1(X,"optin"),K=gh1(X,"optout");if(!Y.rest){if(Q.length<Z)return G.issues.push({code:"too_small",minimum:Z,inclusive:!0,input:Q,inst:$,origin:"array"}),G;if(Q.length>X.length)G.issues.push({code:"too_big",maximum:X.length,inclusive:!0,input:Q,inst:$,origin:"array"})}let H=Array(X.length);for(let z=0;z<X.length;z++){let V=X[z]._zod.run({value:Q[z],issues:[]},J);if(V instanceof Promise)W.push(V.then((A)=>{H[z]=A}));else H[z]=V}if(Y.rest){let z=X.length-1,V=Q.slice(X.length);for(let A of V){z++;let F=Y.rest._zod.run({value:A,issues:[]},J);if(F instanceof Promise)W.push(F.then((N)=>mh1(N,G,z)));else mh1(F,G,z)}}if(W.length)return Promise.all(W).then(()=>uh1(H,G,X,Q,K));return uh1(H,G,X,Q,K)}});me=x0("$ZodRecord",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(!VF(J))return X.issues.push({expected:"record",code:"invalid_type",input:J,inst:$}),X;let Q=[],W=Y.keyType._zod.values;if(W){X.value={};let Z=new Set;for(let H of W)if(typeof H==="string"||typeof H==="number"||typeof H==="symbol"){Z.add(typeof H==="number"?H.toString():H);let z=Y.keyType._zod.run({value:H,issues:[]},G);if(z instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(z.issues.length){X.issues.push({code:"invalid_key",origin:"record",issues:z.issues.map((F)=>gG(F,G,k7())),input:H,path:[H],inst:$});continue}let V=z.value,A=Y.valueType._zod.run({value:J[H],issues:[]},G);if(A instanceof Promise)Q.push(A.then((F)=>{if(F.issues.length)X.issues.push(...ZQ(H,F.issues));X.value[V]=F.value}));else{if(A.issues.length)X.issues.push(...ZQ(H,A.issues));X.value[V]=A.value}}let K;for(let H in J)if(!Z.has(H))K=K??[],K.push(H);if(K&&K.length>0)X.issues.push({code:"unrecognized_keys",input:J,inst:$,keys:K})}else{X.value={};for(let Z of Reflect.ownKeys(J)){if(Z==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(J,Z))continue;let K=Y.keyType._zod.run({value:Z,issues:[]},G);if(K instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof Z==="string"&&Ab.test(Z)&&K.issues.length){let V=Y.keyType._zod.run({value:Number(Z),issues:[]},G);if(V instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(V.issues.length===0)K=V}if(K.issues.length){if(Y.mode==="loose")X.value[Z]=J[Z];else X.issues.push({code:"invalid_key",origin:"record",issues:K.issues.map((V)=>gG(V,G,k7())),input:Z,path:[Z],inst:$});continue}let z=Y.valueType._zod.run({value:J[Z],issues:[]},G);if(z instanceof Promise)Q.push(z.then((V)=>{if(V.issues.length)X.issues.push(...ZQ(Z,V.issues));X.value[K.value]=V.value}));else{if(z.issues.length)X.issues.push(...ZQ(Z,z.issues));X.value[K.value]=z.value}}}if(Q.length)return Promise.all(Q).then(()=>X);return X}}),ue=x0("$ZodMap",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(!(J instanceof Map))return X.issues.push({expected:"map",code:"invalid_type",input:J,inst:$}),X;let Q=[];X.value=new Map;for(let[W,Z]of J){let K=Y.keyType._zod.run({value:W,issues:[]},G),H=Y.valueType._zod.run({value:Z,issues:[]},G);if(K instanceof Promise||H instanceof Promise)Q.push(Promise.all([K,H]).then(([z,V])=>{ph1(z,V,X,W,J,$,G)}));else ph1(K,H,X,W,J,$,G)}if(Q.length)return Promise.all(Q).then(()=>X);return X}});pe=x0("$ZodSet",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(!(J instanceof Set))return X.issues.push({input:J,inst:$,expected:"set",code:"invalid_type"}),X;let Q=[];X.value=new Set;for(let W of J){let Z=Y.valueType._zod.run({value:W,issues:[]},G);if(Z instanceof Promise)Q.push(Z.then((K)=>dh1(K,X)));else dh1(Z,X)}if(Q.length)return Promise.all(Q).then(()=>X);return X}});de=x0("$ZodEnum",($,Y)=>{Z6.init($,Y);let X=Zb(Y.entries),G=new Set(X);$._zod.values=G,$._zod.pattern=new RegExp(`^(${X.filter((J)=>Ub.has(typeof J)).map((J)=>typeof J==="string"?mZ(J):J.toString()).join("|")})$`),$._zod.parse=(J,Q)=>{let W=J.value;if(G.has(W))return J;return J.issues.push({code:"invalid_value",values:X,input:W,inst:$}),J}}),ce=x0("$ZodLiteral",($,Y)=>{if(Z6.init($,Y),Y.values.length===0)throw Error("Cannot create literal schema with no valid values");let X=new Set(Y.values);$._zod.values=X,$._zod.pattern=new RegExp(`^(${Y.values.map((G)=>typeof G==="string"?mZ(G):G?mZ(G.toString()):String(G)).join("|")})$`),$._zod.parse=(G,J)=>{let Q=G.value;if(X.has(Q))return G;return G.issues.push({code:"invalid_value",values:Y.values,input:Q,inst:$}),G}}),le=x0("$ZodFile",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(J instanceof File)return X;return X.issues.push({expected:"file",code:"invalid_type",input:J,inst:$}),X}}),ie=x0("$ZodTransform",($,Y)=>{Z6.init($,Y),$._zod.optin="optional",$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new SB($.constructor.name);let J=Y.transform(X.value,X);if(G.async)return(J instanceof Promise?J:Promise.resolve(J)).then((W)=>{return X.value=W,X.fallback=!0,X});if(J instanceof Promise)throw new HU;return X.value=J,X.fallback=!0,X}});Ob=x0("$ZodOptional",($,Y)=>{Z6.init($,Y),$._zod.optin="optional",$._zod.optout="optional",m6($._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,void 0]):void 0}),m6($._zod,"pattern",()=>{let X=Y.innerType._zod.pattern;return X?new RegExp(`^(${Kb(X.source)})?$`):void 0}),$._zod.parse=(X,G)=>{if(Y.innerType._zod.optin==="optional"){let J=X.value,Q=Y.innerType._zod.run(X,G);if(Q instanceof Promise)return Q.then((W)=>ch1(W,J));return ch1(Q,J)}if(X.value===void 0)return X;return Y.innerType._zod.run(X,G)}}),ne=x0("$ZodExactOptional",($,Y)=>{Ob.init($,Y),m6($._zod,"values",()=>Y.innerType._zod.values),m6($._zod,"pattern",()=>Y.innerType._zod.pattern),$._zod.parse=(X,G)=>{return Y.innerType._zod.run(X,G)}}),re=x0("$ZodNullable",($,Y)=>{Z6.init($,Y),m6($._zod,"optin",()=>Y.innerType._zod.optin),m6($._zod,"optout",()=>Y.innerType._zod.optout),m6($._zod,"pattern",()=>{let X=Y.innerType._zod.pattern;return X?new RegExp(`^(${Kb(X.source)}|null)$`):void 0}),m6($._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,null]):void 0}),$._zod.parse=(X,G)=>{if(X.value===null)return X;return Y.innerType._zod.run(X,G)}}),ae=x0("$ZodDefault",($,Y)=>{Z6.init($,Y),$._zod.optin="optional",m6($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return Y.innerType._zod.run(X,G);if(X.value===void 0)return X.value=Y.defaultValue,X;let J=Y.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Q)=>lh1(Q,Y));return lh1(J,Y)}});se=x0("$ZodPrefault",($,Y)=>{Z6.init($,Y),$._zod.optin="optional",m6($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return Y.innerType._zod.run(X,G);if(X.value===void 0)X.value=Y.defaultValue;return Y.innerType._zod.run(X,G)}}),oe=x0("$ZodNonOptional",($,Y)=>{Z6.init($,Y),m6($._zod,"values",()=>{let X=Y.innerType._zod.values;return X?new Set([...X].filter((G)=>G!==void 0)):void 0}),$._zod.parse=(X,G)=>{let J=Y.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Q)=>ih1(Q,$));return ih1(J,$)}});te=x0("$ZodSuccess",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new SB("ZodSuccess");let J=Y.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Q)=>{return X.value=Q.issues.length===0,X});return X.value=J.issues.length===0,X}}),ee=x0("$ZodCatch",($,Y)=>{Z6.init($,Y),$._zod.optin="optional",m6($._zod,"optout",()=>Y.innerType._zod.optout),m6($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return Y.innerType._zod.run(X,G);let J=Y.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Q)=>{if(X.value=Q.value,Q.issues.length)X.value=Y.catchValue({...X,error:{issues:Q.issues.map((W)=>gG(W,G,k7()))},input:X.value}),X.issues=[],X.fallback=!0;return X});if(X.value=J.value,J.issues.length)X.value=Y.catchValue({...X,error:{issues:J.issues.map((Q)=>gG(Q,G,k7()))},input:X.value}),X.issues=[],X.fallback=!0;return X}}),$00=x0("$ZodNaN",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{if(typeof X.value!=="number"||!Number.isNaN(X.value))return X.issues.push({input:X.value,inst:$,expected:"nan",code:"invalid_type"}),X;return X}}),Eb=x0("$ZodPipe",($,Y)=>{Z6.init($,Y),m6($._zod,"values",()=>Y.in._zod.values),m6($._zod,"optin",()=>Y.in._zod.optin),m6($._zod,"optout",()=>Y.out._zod.optout),m6($._zod,"propValues",()=>Y.in._zod.propValues),$._zod.parse=(X,G)=>{if(G.direction==="backward"){let Q=Y.out._zod.run(X,G);if(Q instanceof Promise)return Q.then((W)=>$e(W,Y.in,G));return $e(Q,Y.in,G)}let J=Y.in._zod.run(X,G);if(J instanceof Promise)return J.then((Q)=>$e(Q,Y.out,G));return $e(J,Y.out,G)}});kP=x0("$ZodCodec",($,Y)=>{Z6.init($,Y),m6($._zod,"values",()=>Y.in._zod.values),m6($._zod,"optin",()=>Y.in._zod.optin),m6($._zod,"optout",()=>Y.out._zod.optout),m6($._zod,"propValues",()=>Y.in._zod.propValues),$._zod.parse=(X,G)=>{if((G.direction||"forward")==="forward"){let Q=Y.in._zod.run(X,G);if(Q instanceof Promise)return Q.then((W)=>Ye(W,Y,G));return Ye(Q,Y,G)}else{let Q=Y.out._zod.run(X,G);if(Q instanceof Promise)return Q.then((W)=>Ye(W,Y,G));return Ye(Q,Y,G)}}});PP0=x0("$ZodPreprocess",($,Y)=>{Eb.init($,Y)}),Y00=x0("$ZodReadonly",($,Y)=>{Z6.init($,Y),m6($._zod,"propValues",()=>Y.innerType._zod.propValues),m6($._zod,"values",()=>Y.innerType._zod.values),m6($._zod,"optin",()=>Y.innerType?._zod?.optin),m6($._zod,"optout",()=>Y.innerType?._zod?.optout),$._zod.parse=(X,G)=>{if(G.direction==="backward")return Y.innerType._zod.run(X,G);let J=Y.innerType._zod.run(X,G);if(J instanceof Promise)return J.then(nh1);return nh1(J)}});X00=x0("$ZodTemplateLiteral",($,Y)=>{Z6.init($,Y);let X=[];for(let G of Y.parts)if(typeof G==="object"&&G!==null){if(!G._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...G._zod.traits].shift()}`);let J=G._zod.pattern instanceof RegExp?G._zod.pattern.source:G._zod.pattern;if(!J)throw Error(`Invalid template literal part: ${G._zod.traits}`);let Q=J.startsWith("^")?1:0,W=J.endsWith("$")?J.length-1:J.length;X.push(J.slice(Q,W))}else if(G===null||NI0.has(typeof G))X.push(mZ(`${G}`));else throw Error(`Invalid template literal part: ${G}`);$._zod.pattern=new RegExp(`^${X.join("")}$`),$._zod.parse=(G,J)=>{if(typeof G.value!=="string")return G.issues.push({input:G.value,inst:$,expected:"string",code:"invalid_type"}),G;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(G.value))return G.issues.push({input:G.value,inst:$,code:"invalid_format",format:Y.format??"template_literal",pattern:$._zod.pattern.source}),G;return G}}),G00=x0("$ZodFunction",($,Y)=>{return Z6.init($,Y),$._def=Y,$._zod.def=Y,$.implement=(X)=>{if(typeof X!=="function")throw Error("implement() must be called with a function");return function(...G){let J=$._def.input?xB($._def.input,G):G,Q=Reflect.apply(X,this,J);if($._def.output)return xB($._def.output,Q);return Q}},$.implementAsync=(X)=>{if(typeof X!=="function")throw Error("implementAsync() must be called with a function");return async function(...G){let J=$._def.input?await yB($._def.input,G):G,Q=await Reflect.apply(X,this,J);if($._def.output)return await yB($._def.output,Q);return Q}},$._zod.parse=(X,G)=>{if(typeof X.value!=="function")return X.issues.push({code:"invalid_type",expected:"function",input:X.value,inst:$}),X;if($._def.output&&$._def.output._zod.def.type==="promise")X.value=$.implementAsync(X.value);else X.value=$.implement(X.value);return X},$.input=(...X)=>{let G=$.constructor;if(Array.isArray(X[0]))return new G({type:"function",input:new Bb({type:"tuple",items:X[0],rest:X[1]}),output:$._def.output});return new G({type:"function",input:X[0],output:$._def.output})},$.output=(X)=>{return new $.constructor({type:"function",input:$._def.input,output:X})},$}),J00=x0("$ZodPromise",($,Y)=>{Z6.init($,Y),$._zod.parse=(X,G)=>{return Promise.resolve(X.value).then((J)=>Y.innerType._zod.run({value:J,issues:[]},G))}}),Q00=x0("$ZodLazy",($,Y)=>{Z6.init($,Y),m6($._zod,"innerType",()=>{let X=Y;if(!X._cachedInner)X._cachedInner=Y.getter();return X._cachedInner}),m6($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),m6($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),m6($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),m6($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(X,G)=>{return $._zod.innerType._zod.run(X,G)}}),W00=x0("$ZodCustom",($,Y)=>{H5.init($,Y),Z6.init($,Y),$._zod.parse=(X,G)=>{return X},$._zod.check=(X)=>{let G=X.value,J=Y.fn(G);if(J instanceof Promise)return J.then((Q)=>rh1(Q,X,G,$));rh1(J,X,G,$);return}})});function _P0(){return{localeError:nW8()}}var nW8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\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 ${J.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${Z}`;return`\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 ${Q}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${Z}`}case"invalid_value":if(J.values.length===1)return`\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 ${U1(J.values[0])}`;return`\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: ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${J.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${Q} ${J.maximum.toString()} ${W.unit??"\u0639\u0646\u0635\u0631"}`;return`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${J.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${Q} ${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${J.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${Q} ${J.minimum.toString()} ${W.unit}`;return`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${J.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${Q} ${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${J.prefix}"`;if(Q.format==="ends_with")return`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${Q.suffix}"`;if(Q.format==="includes")return`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${Q.includes}"`;if(Q.format==="regex")return`\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 ${Q.pattern}`;return`${X[Q.format]??J.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 ${J.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${J.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${J.keys.length>1?"\u0629":""}: ${i0(J.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${J.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 ${J.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};var eh1=V0(()=>{_4()});function jP0(){return{localeError:rW8()}}var rW8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${J.expected}, daxil olan ${Z}`;return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Q}, daxil olan ${Z}`}case"invalid_value":if(J.values.length===1)return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${U1(J.values[0])}`;return`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${J.origin??"d\u0259y\u0259r"} ${Q}${J.maximum.toString()} ${W.unit??"element"}`;return`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${J.origin??"d\u0259y\u0259r"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${J.origin} ${Q}${J.minimum.toString()} ${W.unit}`;return`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Yanl\u0131\u015F m\u0259tn: "${Q.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`;if(Q.format==="ends_with")return`Yanl\u0131\u015F m\u0259tn: "${Q.suffix}" il\u0259 bitm\u0259lidir`;if(Q.format==="includes")return`Yanl\u0131\u015F m\u0259tn: "${Q.includes}" daxil olmal\u0131d\u0131r`;if(Q.format==="regex")return`Yanl\u0131\u015F m\u0259tn: ${Q.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`;return`Yanl\u0131\u015F ${X[Q.format]??J.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${J.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${J.keys.length>1?"lar":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${J.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};var $f1=V0(()=>{_4()});function Yf1($,Y,X,G){let J=Math.abs($),Q=J%10,W=J%100;if(W>=11&&W<=19)return G;if(Q===1)return Y;if(Q>=2&&Q<=4)return X;return G}function TP0(){return{localeError:aW8()}}var aW8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${J.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${Z}`;return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${Q}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${Z}`}case"invalid_value":if(J.values.length===1)return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${U1(J.values[0])}`;return`\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 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W){let Z=Number(J.maximum),K=Yf1(Z,W.unit.one,W.unit.few,W.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 ${J.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${W.verb} ${Q}${J.maximum.toString()} ${K}`}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 ${J.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W){let Z=Number(J.minimum),K=Yf1(Z,W.unit.one,W.unit.few,W.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 ${J.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${W.verb} ${Q}${J.minimum.toString()} ${K}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${J.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\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 "${Q.prefix}"`;if(Q.format==="ends_with")return`\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 "${Q.suffix}"`;if(Q.format==="includes")return`\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 "${Q.includes}"`;if(Q.format==="regex")return`\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 ${Q.pattern}`;return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${X[Q.format]??J.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 ${J.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${J.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${J.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 ${J.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};var Xf1=V0(()=>{_4()});function CP0(){return{localeError:sW8()}}var sW8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${J.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${Z}`;return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${Q}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${Z}`}case"invalid_value":if(J.values.length===1)return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${U1(J.values[0])}`;return`\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 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${J.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${Q}${J.maximum.toString()} ${W.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`;return`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${J.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${J.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${Q}${J.minimum.toString()} ${W.unit}`;return`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${J.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.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 "${Q.prefix}"`;if(Q.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 "${Q.suffix}"`;if(Q.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 "${Q.includes}"`;if(Q.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 ${Q.pattern}`;let W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";if(Q.format==="emoji")W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";if(Q.format==="datetime")W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";if(Q.format==="date")W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430";if(Q.format==="time")W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";if(Q.format==="duration")W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430";return`${W} ${X[Q.format]??J.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 ${J.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${J.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${J.keys.length>1?"\u043E\u0432\u0435":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${J.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 ${J.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};var Gf1=V0(()=>{_4()});function SP0(){return{localeError:oW8()}}var oW8=()=>{let $={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Tipus inv\xE0lid: s'esperava instanceof ${J.expected}, s'ha rebut ${Z}`;return`Tipus inv\xE0lid: s'esperava ${Q}, s'ha rebut ${Z}`}case"invalid_value":if(J.values.length===1)return`Valor inv\xE0lid: s'esperava ${U1(J.values[0])}`;return`Opci\xF3 inv\xE0lida: s'esperava una de ${i0(J.values," o ")}`;case"too_big":{let Q=J.inclusive?"com a m\xE0xim":"menys de",W=Y(J.origin);if(W)return`Massa gran: s'esperava que ${J.origin??"el valor"} contingu\xE9s ${Q} ${J.maximum.toString()} ${W.unit??"elements"}`;return`Massa gran: s'esperava que ${J.origin??"el valor"} fos ${Q} ${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?"com a m\xEDnim":"m\xE9s de",W=Y(J.origin);if(W)return`Massa petit: s'esperava que ${J.origin} contingu\xE9s ${Q} ${J.minimum.toString()} ${W.unit}`;return`Massa petit: s'esperava que ${J.origin} fos ${Q} ${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Format inv\xE0lid: ha de comen\xE7ar amb "${Q.prefix}"`;if(Q.format==="ends_with")return`Format inv\xE0lid: ha d'acabar amb "${Q.suffix}"`;if(Q.format==="includes")return`Format inv\xE0lid: ha d'incloure "${Q.includes}"`;if(Q.format==="regex")return`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${Q.pattern}`;return`Format inv\xE0lid per a ${X[Q.format]??J.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${J.divisor}`;case"unrecognized_keys":return`Clau${J.keys.length>1?"s":""} no reconeguda${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${J.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${J.origin}`;default:return"Entrada inv\xE0lida"}}};var Jf1=V0(()=>{_4()});function kP0(){return{localeError:tW8()}}var tW8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${J.expected}, obdr\u017Eeno ${Z}`;return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Q}, obdr\u017Eeno ${Z}`}case"invalid_value":if(J.values.length===1)return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${U1(J.values[0])}`;return`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${J.origin??"hodnota"} mus\xED m\xEDt ${Q}${J.maximum.toString()} ${W.unit??"prvk\u016F"}`;return`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${J.origin??"hodnota"} mus\xED b\xFDt ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${J.origin??"hodnota"} mus\xED m\xEDt ${Q}${J.minimum.toString()} ${W.unit??"prvk\u016F"}`;return`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${J.origin??"hodnota"} mus\xED b\xFDt ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${Q.prefix}"`;if(Q.format==="ends_with")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${Q.suffix}"`;if(Q.format==="includes")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${Q.includes}"`;if(Q.format==="regex")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${Q.pattern}`;return`Neplatn\xFD form\xE1t ${X[Q.format]??J.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${J.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${i0(J.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${J.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${J.origin}`;default:return"Neplatn\xFD vstup"}}};var Qf1=V0(()=>{_4()});function vP0(){return{localeError:eW8()}}var eW8=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ugyldigt input: forventede instanceof ${J.expected}, fik ${Z}`;return`Ugyldigt input: forventede ${Q}, fik ${Z}`}case"invalid_value":if(J.values.length===1)return`Ugyldig v\xE6rdi: forventede ${U1(J.values[0])}`;return`Ugyldigt valg: forventede en af f\xF8lgende ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin),Z=G[J.origin]??J.origin;if(W)return`For stor: forventede ${Z??"value"} ${W.verb} ${Q} ${J.maximum.toString()} ${W.unit??"elementer"}`;return`For stor: forventede ${Z??"value"} havde ${Q} ${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin),Z=G[J.origin]??J.origin;if(W)return`For lille: forventede ${Z} ${W.verb} ${Q} ${J.minimum.toString()} ${W.unit}`;return`For lille: forventede ${Z} havde ${Q} ${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ugyldig streng: skal starte med "${Q.prefix}"`;if(Q.format==="ends_with")return`Ugyldig streng: skal ende med "${Q.suffix}"`;if(Q.format==="includes")return`Ugyldig streng: skal indeholde "${Q.includes}"`;if(Q.format==="regex")return`Ugyldig streng: skal matche m\xF8nsteret ${Q.pattern}`;return`Ugyldig ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${J.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${J.origin}`;default:return"Ugyldigt input"}}};var Wf1=V0(()=>{_4()});function xP0(){return{localeError:$Z8()}}var $Z8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"Zahl",array:"Array"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ung\xFCltige Eingabe: erwartet instanceof ${J.expected}, erhalten ${Z}`;return`Ung\xFCltige Eingabe: erwartet ${Q}, erhalten ${Z}`}case"invalid_value":if(J.values.length===1)return`Ung\xFCltige Eingabe: erwartet ${U1(J.values[0])}`;return`Ung\xFCltige Option: erwartet eine von ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Zu gro\xDF: erwartet, dass ${J.origin??"Wert"} ${Q}${J.maximum.toString()} ${W.unit??"Elemente"} hat`;return`Zu gro\xDF: erwartet, dass ${J.origin??"Wert"} ${Q}${J.maximum.toString()} ist`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Zu klein: erwartet, dass ${J.origin} ${Q}${J.minimum.toString()} ${W.unit} hat`;return`Zu klein: erwartet, dass ${J.origin} ${Q}${J.minimum.toString()} ist`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ung\xFCltiger String: muss mit "${Q.prefix}" beginnen`;if(Q.format==="ends_with")return`Ung\xFCltiger String: muss mit "${Q.suffix}" enden`;if(Q.format==="includes")return`Ung\xFCltiger String: muss "${Q.includes}" enthalten`;if(Q.format==="regex")return`Ung\xFCltiger String: muss dem Muster ${Q.pattern} entsprechen`;return`Ung\xFCltig: ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${J.divisor} sein`;case"unrecognized_keys":return`${J.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${J.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${J.origin}`;default:return"Ung\xFCltige Eingabe"}}};var Zf1=V0(()=>{_4()});function yP0(){return{localeError:YZ8()}}var YZ8=()=>{let $={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function Y(J){return $[J]??null}let X={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 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:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(typeof J.expected==="string"&&/^[A-Z]/.test(J.expected))return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${J.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${Z}`;return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${Q}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${Z}`}case"invalid_value":if(J.values.length===1)return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${U1(J.values[0])}`;return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${Q}${J.maximum.toString()} ${W.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${Q}${J.minimum.toString()} ${W.unit}`;return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${Q.prefix}"`;if(Q.format==="ends_with")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${Q.suffix}"`;if(Q.format==="includes")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${Q.includes}"`;if(Q.format==="regex")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${Q.pattern}`;return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${J.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${J.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${J.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${J.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${J.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};var Kf1=V0(()=>{_4()});function Mb(){return{localeError:XZ8()}}var XZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;return`Invalid input: expected ${Q}, received ${Z}`}case"invalid_value":if(J.values.length===1)return`Invalid input: expected ${U1(J.values[0])}`;return`Invalid option: expected one of ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Too big: expected ${J.origin??"value"} to have ${Q}${J.maximum.toString()} ${W.unit??"elements"}`;return`Too big: expected ${J.origin??"value"} to be ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Too small: expected ${J.origin} to have ${Q}${J.minimum.toString()} ${W.unit}`;return`Too small: expected ${J.origin} to be ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Invalid string: must start with "${Q.prefix}"`;if(Q.format==="ends_with")return`Invalid string: must end with "${Q.suffix}"`;if(Q.format==="includes")return`Invalid string: must include "${Q.includes}"`;if(Q.format==="regex")return`Invalid string: must match pattern ${Q.pattern}`;return`Invalid ${X[Q.format]??J.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${J.divisor}`;case"unrecognized_keys":return`Unrecognized key${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Invalid key in ${J.origin}`;case"invalid_union":if(J.options&&Array.isArray(J.options)&&J.options.length>0)return`Invalid discriminator value. Expected ${J.options.map((W)=>`'${W}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${J.origin}`;default:return"Invalid input"}}};var bP0=V0(()=>{_4()});function hP0(){return{localeError:GZ8()}}var GZ8=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Nevalida enigo: atendi\u011Dis instanceof ${J.expected}, ricevi\u011Dis ${Z}`;return`Nevalida enigo: atendi\u011Dis ${Q}, ricevi\u011Dis ${Z}`}case"invalid_value":if(J.values.length===1)return`Nevalida enigo: atendi\u011Dis ${U1(J.values[0])}`;return`Nevalida opcio: atendi\u011Dis unu el ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Tro granda: atendi\u011Dis ke ${J.origin??"valoro"} havu ${Q}${J.maximum.toString()} ${W.unit??"elementojn"}`;return`Tro granda: atendi\u011Dis ke ${J.origin??"valoro"} havu ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Tro malgranda: atendi\u011Dis ke ${J.origin} havu ${Q}${J.minimum.toString()} ${W.unit}`;return`Tro malgranda: atendi\u011Dis ke ${J.origin} estu ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Nevalida karaktraro: devas komenci\u011Di per "${Q.prefix}"`;if(Q.format==="ends_with")return`Nevalida karaktraro: devas fini\u011Di per "${Q.suffix}"`;if(Q.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${Q.includes}"`;if(Q.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${Q.pattern}`;return`Nevalida ${X[Q.format]??J.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${J.divisor}`;case"unrecognized_keys":return`Nekonata${J.keys.length>1?"j":""} \u015Dlosilo${J.keys.length>1?"j":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${J.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${J.origin}`;default:return"Nevalida enigo"}}};var Uf1=V0(()=>{_4()});function fP0(){return{localeError:JZ8()}}var JZ8=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function Y(J){return $[J]??null}let X={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"},G={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(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Entrada inv\xE1lida: se esperaba instanceof ${J.expected}, recibido ${Z}`;return`Entrada inv\xE1lida: se esperaba ${Q}, recibido ${Z}`}case"invalid_value":if(J.values.length===1)return`Entrada inv\xE1lida: se esperaba ${U1(J.values[0])}`;return`Opci\xF3n inv\xE1lida: se esperaba una de ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin),Z=G[J.origin]??J.origin;if(W)return`Demasiado grande: se esperaba que ${Z??"valor"} tuviera ${Q}${J.maximum.toString()} ${W.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${Z??"valor"} fuera ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin),Z=G[J.origin]??J.origin;if(W)return`Demasiado peque\xF1o: se esperaba que ${Z} tuviera ${Q}${J.minimum.toString()} ${W.unit}`;return`Demasiado peque\xF1o: se esperaba que ${Z} fuera ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Cadena inv\xE1lida: debe comenzar con "${Q.prefix}"`;if(Q.format==="ends_with")return`Cadena inv\xE1lida: debe terminar en "${Q.suffix}"`;if(Q.format==="includes")return`Cadena inv\xE1lida: debe incluir "${Q.includes}"`;if(Q.format==="regex")return`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${Q.pattern}`;return`Inv\xE1lido ${X[Q.format]??J.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${J.divisor}`;case"unrecognized_keys":return`Llave${J.keys.length>1?"s":""} desconocida${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${G[J.origin]??J.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${G[J.origin]??J.origin}`;default:return"Entrada inv\xE1lida"}}};var Hf1=V0(()=>{_4()});function gP0(){return{localeError:QZ8()}}var QZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${J.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${Z} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Q} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${Z} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":if(J.values.length===1)return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${U1(J.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`;return`\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 ${i0(J.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${J.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${Q}${J.maximum.toString()} ${W.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`;return`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${J.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${Q}${J.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${J.origin} \u0628\u0627\u06CC\u062F ${Q}${J.minimum.toString()} ${W.unit} \u0628\u0627\u0634\u062F`;return`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${J.origin} \u0628\u0627\u06CC\u062F ${Q}${J.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${Q.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`;if(Q.format==="ends_with")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${Q.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`;if(Q.format==="includes")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${Q.includes}" \u0628\u0627\u0634\u062F`;if(Q.format==="regex")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${Q.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`;return`${X[Q.format]??J.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 ${J.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${J.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${i0(J.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${J.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 ${J.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};var zf1=V0(()=>{_4()});function mP0(){return{localeError:WZ8()}}var WZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Virheellinen tyyppi: odotettiin instanceof ${J.expected}, oli ${Z}`;return`Virheellinen tyyppi: odotettiin ${Q}, oli ${Z}`}case"invalid_value":if(J.values.length===1)return`Virheellinen sy\xF6te: t\xE4ytyy olla ${U1(J.values[0])}`;return`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Liian suuri: ${W.subject} t\xE4ytyy olla ${Q}${J.maximum.toString()} ${W.unit}`.trim();return`Liian suuri: arvon t\xE4ytyy olla ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Liian pieni: ${W.subject} t\xE4ytyy olla ${Q}${J.minimum.toString()} ${W.unit}`.trim();return`Liian pieni: arvon t\xE4ytyy olla ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${Q.prefix}"`;if(Q.format==="ends_with")return`Virheellinen sy\xF6te: t\xE4ytyy loppua "${Q.suffix}"`;if(Q.format==="includes")return`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${Q.includes}"`;if(Q.format==="regex")return`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${Q.pattern}`;return`Virheellinen ${X[Q.format]??J.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${J.divisor} monikerta`;case"unrecognized_keys":return`${J.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${i0(J.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"}}};var Vf1=V0(()=>{_4()});function uP0(){return{localeError:ZZ8()}}var ZZ8=()=>{let $={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function Y(J){return $[J]??null}let X={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"},G={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Entr\xE9e invalide : instanceof ${J.expected} attendu, ${Z} re\xE7u`;return`Entr\xE9e invalide : ${Q} attendu, ${Z} re\xE7u`}case"invalid_value":if(J.values.length===1)return`Entr\xE9e invalide : ${U1(J.values[0])} attendu`;return`Option invalide : une valeur parmi ${i0(J.values,"|")} attendue`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Trop grand : ${G[J.origin]??"valeur"} doit ${W.verb} ${Q}${J.maximum.toString()} ${W.unit??"\xE9l\xE9ment(s)"}`;return`Trop grand : ${G[J.origin]??"valeur"} doit \xEAtre ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Trop petit : ${G[J.origin]??"valeur"} doit ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`Trop petit : ${G[J.origin]??"valeur"} doit \xEAtre ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Cha\xEEne invalide : doit commencer par "${Q.prefix}"`;if(Q.format==="ends_with")return`Cha\xEEne invalide : doit se terminer par "${Q.suffix}"`;if(Q.format==="includes")return`Cha\xEEne invalide : doit inclure "${Q.includes}"`;if(Q.format==="regex")return`Cha\xEEne invalide : doit correspondre au mod\xE8le ${Q.pattern}`;return`${X[Q.format]??J.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${J.divisor}`;case"unrecognized_keys":return`Cl\xE9${J.keys.length>1?"s":""} non reconnue${J.keys.length>1?"s":""} : ${i0(J.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${J.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${J.origin}`;default:return"Entr\xE9e invalide"}}};var Af1=V0(()=>{_4()});function pP0(){return{localeError:KZ8()}}var KZ8=()=>{let $={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Entr\xE9e invalide : attendu instanceof ${J.expected}, re\xE7u ${Z}`;return`Entr\xE9e invalide : attendu ${Q}, re\xE7u ${Z}`}case"invalid_value":if(J.values.length===1)return`Entr\xE9e invalide : attendu ${U1(J.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"\u2264":"<",W=Y(J.origin);if(W)return`Trop grand : attendu que ${J.origin??"la valeur"} ait ${Q}${J.maximum.toString()} ${W.unit}`;return`Trop grand : attendu que ${J.origin??"la valeur"} soit ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?"\u2265":">",W=Y(J.origin);if(W)return`Trop petit : attendu que ${J.origin} ait ${Q}${J.minimum.toString()} ${W.unit}`;return`Trop petit : attendu que ${J.origin} soit ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Cha\xEEne invalide : doit commencer par "${Q.prefix}"`;if(Q.format==="ends_with")return`Cha\xEEne invalide : doit se terminer par "${Q.suffix}"`;if(Q.format==="includes")return`Cha\xEEne invalide : doit inclure "${Q.includes}"`;if(Q.format==="regex")return`Cha\xEEne invalide : doit correspondre au motif ${Q.pattern}`;return`${X[Q.format]??J.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${J.divisor}`;case"unrecognized_keys":return`Cl\xE9${J.keys.length>1?"s":""} non reconnue${J.keys.length>1?"s":""} : ${i0(J.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${J.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${J.origin}`;default:return"Entr\xE9e invalide"}}};var Ff1=V0(()=>{_4()});function dP0(){return{localeError:UZ8()}}var UZ8=()=>{let $={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"}},Y={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"}},X=(H)=>H?$[H]:void 0,G=(H)=>{let z=X(H);if(z)return z.label;return H??$.unknown.label},J=(H)=>`\u05D4${G(H)}`,Q=(H)=>{return(X(H)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"},W=(H)=>{if(!H)return null;return Y[H]??null},Z={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"}},K={nan:"NaN"};return(H)=>{switch(H.code){case"invalid_type":{let z=H.expected,V=K[z??""]??G(z),A=H1(H.input),F=K[A]??$[A]?.label??A;if(/^[A-Z]/.test(H.expected))return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${H.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${F}`;return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${V}, \u05D4\u05EA\u05E7\u05D1\u05DC ${F}`}case"invalid_value":{if(H.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 ${U1(H.values[0])}`;let z=H.values.map((F)=>U1(F));if(H.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 ${z[0]} \u05D0\u05D5 ${z[1]}`;let V=z[z.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 ${z.slice(0,-1).join(", ")} \u05D0\u05D5 ${V}`}case"too_big":{let z=W(H.origin),V=J(H.origin??"value");if(H.origin==="string")return`${z?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${V} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${H.maximum.toString()} ${z?.unit??""} ${H.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(H.origin==="number"){let N=H.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${H.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${H.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${V} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${N}`}if(H.origin==="array"||H.origin==="set"){let N=H.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",D=H.inclusive?`${H.maximum} ${z?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${H.maximum} ${z?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${V} ${N} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`.trim()}let A=H.inclusive?"<=":"<",F=Q(H.origin??"value");if(z?.unit)return`${z.longLabel} \u05DE\u05D3\u05D9: ${V} ${F} ${A}${H.maximum.toString()} ${z.unit}`;return`${z?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${V} ${F} ${A}${H.maximum.toString()}`}case"too_small":{let z=W(H.origin),V=J(H.origin??"value");if(H.origin==="string")return`${z?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${V} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${H.minimum.toString()} ${z?.unit??""} ${H.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(H.origin==="number"){let N=H.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${H.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${H.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${V} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${N}`}if(H.origin==="array"||H.origin==="set"){let N=H.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(H.minimum===1&&H.inclusive){let L=H.origin==="set"?"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3":"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3";return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${V} ${N} \u05DC\u05D4\u05DB\u05D9\u05DC ${L}`}let D=H.inclusive?`${H.minimum} ${z?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${H.minimum} ${z?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${V} ${N} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`.trim()}let A=H.inclusive?">=":">",F=Q(H.origin??"value");if(z?.unit)return`${z.shortLabel} \u05DE\u05D3\u05D9: ${V} ${F} ${A}${H.minimum.toString()} ${z.unit}`;return`${z?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${V} ${F} ${A}${H.minimum.toString()}`}case"invalid_format":{let z=H;if(z.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${z.prefix}"`;if(z.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${z.suffix}"`;if(z.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${z.includes}"`;if(z.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 ${z.pattern}`;let V=Z[z.format],A=V?.label??z.format,N=(V?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${A} \u05DC\u05D0 ${N}`}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 ${H.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${H.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${H.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${i0(H.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${J(H.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};var Df1=V0(()=>{_4()});function cP0(){return{localeError:HZ8()}}var HZ8=()=>{let $={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function Y(J){return $[J]??null}let X={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},G={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Neispravan unos: o\u010Dekuje se instanceof ${J.expected}, a primljeno je ${Z}`;return`Neispravan unos: o\u010Dekuje se ${Q}, a primljeno je ${Z}`}case"invalid_value":if(J.values.length===1)return`Neispravna vrijednost: o\u010Dekivano ${U1(J.values[0])}`;return`Neispravna opcija: o\u010Dekivano jedno od ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin),Z=G[J.origin]??J.origin;if(W)return`Preveliko: o\u010Dekivano da ${Z??"vrijednost"} ima ${Q}${J.maximum.toString()} ${W.unit??"elemenata"}`;return`Preveliko: o\u010Dekivano da ${Z??"vrijednost"} bude ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin),Z=G[J.origin]??J.origin;if(W)return`Premalo: o\u010Dekivano da ${Z} ima ${Q}${J.minimum.toString()} ${W.unit}`;return`Premalo: o\u010Dekivano da ${Z} bude ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Neispravan tekst: mora zapo\u010Dinjati s "${Q.prefix}"`;if(Q.format==="ends_with")return`Neispravan tekst: mora zavr\u0161avati s "${Q.suffix}"`;if(Q.format==="includes")return`Neispravan tekst: mora sadr\u017Eavati "${Q.includes}"`;if(Q.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${Q.pattern}`;return`Neispravna ${X[Q.format]??J.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${J.divisor}`;case"unrecognized_keys":return`Neprepoznat${J.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${G[J.origin]??J.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${G[J.origin]??J.origin}`;default:return"Neispravan unos"}}};var Nf1=V0(()=>{_4()});function lP0(){return{localeError:zZ8()}}var zZ8=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${J.expected}, a kapott \xE9rt\xE9k ${Z}`;return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Q}, a kapott \xE9rt\xE9k ${Z}`}case"invalid_value":if(J.values.length===1)return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${U1(J.values[0])}`;return`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`T\xFAl nagy: ${J.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${Q}${J.maximum.toString()} ${W.unit??"elem"}`;return`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${J.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${J.origin} m\xE9rete t\xFAl kicsi ${Q}${J.minimum.toString()} ${W.unit}`;return`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${J.origin} t\xFAl kicsi ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\xC9rv\xE9nytelen string: "${Q.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`;if(Q.format==="ends_with")return`\xC9rv\xE9nytelen string: "${Q.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`;if(Q.format==="includes")return`\xC9rv\xE9nytelen string: "${Q.includes}" \xE9rt\xE9ket kell tartalmaznia`;if(Q.format==="regex")return`\xC9rv\xE9nytelen string: ${Q.pattern} mint\xE1nak kell megfelelnie`;return`\xC9rv\xE9nytelen ${X[Q.format]??J.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${J.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${J.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${J.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};var Lf1=V0(()=>{_4()});function Bf1($,Y,X){return Math.abs($)===1?Y:X}function vP($){if(!$)return"";let Y=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],X=$[$.length-1];return $+(Y.includes(X)?"\u0576":"\u0568")}function iP0(){return{localeError:VZ8()}}var VZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\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 ${J.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${Z}`;return`\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 ${Q}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${Z}`}case"invalid_value":if(J.values.length===1)return`\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 ${U1(J.values[1])}`;return`\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 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W){let Z=Number(J.maximum),K=Bf1(Z,W.unit.one,W.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 ${vP(J.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${Q}${J.maximum.toString()} ${K}`}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 ${vP(J.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W){let Z=Number(J.minimum),K=Bf1(Z,W.unit.one,W.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 ${vP(J.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${Q}${J.minimum.toString()} ${K}`}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 ${vP(J.origin)} \u056C\u056B\u0576\u056B ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${Q.prefix}"-\u0578\u057E`;if(Q.format==="ends_with")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${Q.suffix}"-\u0578\u057E`;if(Q.format==="includes")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${Q.includes}"`;if(Q.format==="regex")return`\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 ${Q.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`;return`\u054D\u056D\u0561\u056C ${X[Q.format]??J.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 ${J.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${J.keys.length>1?"\u0576\u0565\u0580":""}. ${i0(J.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${vP(J.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 ${vP(J.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};var Of1=V0(()=>{_4()});function nP0(){return{localeError:AZ8()}}var AZ8=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Input tidak valid: diharapkan instanceof ${J.expected}, diterima ${Z}`;return`Input tidak valid: diharapkan ${Q}, diterima ${Z}`}case"invalid_value":if(J.values.length===1)return`Input tidak valid: diharapkan ${U1(J.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Terlalu besar: diharapkan ${J.origin??"value"} memiliki ${Q}${J.maximum.toString()} ${W.unit??"elemen"}`;return`Terlalu besar: diharapkan ${J.origin??"value"} menjadi ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Terlalu kecil: diharapkan ${J.origin} memiliki ${Q}${J.minimum.toString()} ${W.unit}`;return`Terlalu kecil: diharapkan ${J.origin} menjadi ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`String tidak valid: harus dimulai dengan "${Q.prefix}"`;if(Q.format==="ends_with")return`String tidak valid: harus berakhir dengan "${Q.suffix}"`;if(Q.format==="includes")return`String tidak valid: harus menyertakan "${Q.includes}"`;if(Q.format==="regex")return`String tidak valid: harus sesuai pola ${Q.pattern}`;return`${X[Q.format]??J.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${J.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${J.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${J.origin}`;default:return"Input tidak valid"}}};var Ef1=V0(()=>{_4()});function rP0(){return{localeError:FZ8()}}var FZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"n\xFAmer",array:"fylki"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Rangt gildi: \xDE\xFA sl\xF3st inn ${Z} \xFEar sem \xE1 a\xF0 vera instanceof ${J.expected}`;return`Rangt gildi: \xDE\xFA sl\xF3st inn ${Z} \xFEar sem \xE1 a\xF0 vera ${Q}`}case"invalid_value":if(J.values.length===1)return`Rangt gildi: gert r\xE1\xF0 fyrir ${U1(J.values[0])}`;return`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${J.origin??"gildi"} hafi ${Q}${J.maximum.toString()} ${W.unit??"hluti"}`;return`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${J.origin??"gildi"} s\xE9 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${J.origin} hafi ${Q}${J.minimum.toString()} ${W.unit}`;return`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${J.origin} s\xE9 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${Q.prefix}"`;if(Q.format==="ends_with")return`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${Q.suffix}"`;if(Q.format==="includes")return`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${Q.includes}"`;if(Q.format==="regex")return`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${Q.pattern}`;return`Rangt ${X[Q.format]??J.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${J.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${J.keys.length>1?"ir lyklar":"ur lykill"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${J.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${J.origin}`;default:return"Rangt gildi"}}};var Mf1=V0(()=>{_4()});function aP0(){return{localeError:DZ8()}}var DZ8=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"numero",array:"vettore"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Input non valido: atteso instanceof ${J.expected}, ricevuto ${Z}`;return`Input non valido: atteso ${Q}, ricevuto ${Z}`}case"invalid_value":if(J.values.length===1)return`Input non valido: atteso ${U1(J.values[0])}`;return`Opzione non valida: atteso uno tra ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Troppo grande: ${J.origin??"valore"} deve avere ${Q}${J.maximum.toString()} ${W.unit??"elementi"}`;return`Troppo grande: ${J.origin??"valore"} deve essere ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Troppo piccolo: ${J.origin} deve avere ${Q}${J.minimum.toString()} ${W.unit}`;return`Troppo piccolo: ${J.origin} deve essere ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Stringa non valida: deve iniziare con "${Q.prefix}"`;if(Q.format==="ends_with")return`Stringa non valida: deve terminare con "${Q.suffix}"`;if(Q.format==="includes")return`Stringa non valida: deve includere "${Q.includes}"`;if(Q.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${Q.pattern}`;return`Input non valido: ${X[Q.format]??J.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${J.divisor}`;case"unrecognized_keys":return`Chiav${J.keys.length>1?"i":"e"} non riconosciut${J.keys.length>1?"e":"a"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${J.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${J.origin}`;default:return"Input non valido"}}};var Rf1=V0(()=>{_4()});function sP0(){return{localeError:NZ8()}}var NZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u7121\u52B9\u306A\u5165\u529B: instanceof ${J.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${Z}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;return`\u7121\u52B9\u306A\u5165\u529B: ${Q}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${Z}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":if(J.values.length===1)return`\u7121\u52B9\u306A\u5165\u529B: ${U1(J.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`;return`\u7121\u52B9\u306A\u9078\u629E: ${i0(J.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let Q=J.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",W=Y(J.origin);if(W)return`\u5927\u304D\u3059\u304E\u308B\u5024: ${J.origin??"\u5024"}\u306F${J.maximum.toString()}${W.unit??"\u8981\u7D20"}${Q}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;return`\u5927\u304D\u3059\u304E\u308B\u5024: ${J.origin??"\u5024"}\u306F${J.maximum.toString()}${Q}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let Q=J.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",W=Y(J.origin);if(W)return`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${J.origin}\u306F${J.minimum.toString()}${W.unit}${Q}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;return`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${J.origin}\u306F${J.minimum.toString()}${Q}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${Q.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;if(Q.format==="ends_with")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${Q.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;if(Q.format==="includes")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${Q.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;if(Q.format==="regex")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${Q.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;return`\u7121\u52B9\u306A${X[Q.format]??J.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${J.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${J.keys.length>1?"\u7FA4":""}: ${i0(J.keys,"\u3001")}`;case"invalid_key":return`${J.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${J.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};var qf1=V0(()=>{_4()});function oP0(){return{localeError:LZ8()}}var LZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},G={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\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(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\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 ${J.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${Z}`;return`\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 ${Q}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${Z}`}case"invalid_value":if(J.values.length===1)return`\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 ${U1(J.values[0])}`;return`\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 ${i0(J.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${W.verb} ${Q}${J.maximum.toString()} ${W.unit}`;return`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\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 ${J.origin} ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`\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 ${J.origin} \u10D8\u10E7\u10DD\u10E1 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${Q.prefix}"-\u10D8\u10D7`;if(Q.format==="ends_with")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${Q.suffix}"-\u10D8\u10D7`;if(Q.format==="includes")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${Q.includes}"-\u10E1`;if(Q.format==="regex")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\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 ${Q.pattern}`;return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${X[Q.format]??J.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 ${J.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${J.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${J.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 ${J.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};var If1=V0(()=>{_4()});function Rb(){return{localeError:BZ8()}}var BZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={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(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\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 ${J.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${Z}`;return`\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 ${Q} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${Z}`}case"invalid_value":if(J.values.length===1)return`\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 ${U1(J.values[0])}`;return`\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 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${Q} ${J.maximum.toString()} ${W.unit??"\u1792\u17B6\u178F\u17BB"}`;return`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${Q} ${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J.origin} ${Q} ${J.minimum.toString()} ${W.unit}`;return`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J.origin} ${Q} ${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\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 "${Q.prefix}"`;if(Q.format==="ends_with")return`\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 "${Q.suffix}"`;if(Q.format==="includes")return`\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 "${Q.includes}"`;if(Q.format==="regex")return`\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 ${Q.pattern}`;return`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${X[Q.format]??J.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 ${J.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${i0(J.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 ${J.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 ${J.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};var tP0=V0(()=>{_4()});function eP0(){return Rb()}var Pf1=V0(()=>{tP0()});function $w0(){return{localeError:OZ8()}}var OZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${J.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${Z}\uC785\uB2C8\uB2E4`;return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${Q}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${Z}\uC785\uB2C8\uB2E4`}case"invalid_value":if(J.values.length===1)return`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${U1(J.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`;return`\uC798\uBABB\uB41C \uC635\uC158: ${i0(J.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let Q=J.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",W=Q==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",Z=Y(J.origin),K=Z?.unit??"\uC694\uC18C";if(Z)return`${J.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${J.maximum.toString()}${K} ${Q}${W}`;return`${J.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${J.maximum.toString()} ${Q}${W}`}case"too_small":{let Q=J.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",W=Q==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",Z=Y(J.origin),K=Z?.unit??"\uC694\uC18C";if(Z)return`${J.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${J.minimum.toString()}${K} ${Q}${W}`;return`${J.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${J.minimum.toString()} ${Q}${W}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${Q.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`;if(Q.format==="ends_with")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${Q.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`;if(Q.format==="includes")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${Q.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`;if(Q.format==="regex")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${Q.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`;return`\uC798\uBABB\uB41C ${X[Q.format]??J.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${J.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${i0(J.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${J.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${J.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};var wf1=V0(()=>{_4()});function _f1($){let Y=Math.abs($),X=Y%10,G=Y%100;if(G>=11&&G<=19||X===0)return"many";if(X===1)return"one";return"few"}function Yw0(){return{localeError:EZ8()}}var qb=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)},EZ8=()=>{let $={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 Y(J,Q,W,Z){let K=$[J]??null;if(K===null)return K;return{unit:K.unit[Q],verb:K.verb[Z][W?"inclusive":"notInclusive"]}}let X={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"},G={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(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Gautas tipas ${Z}, o tik\u0117tasi - instanceof ${J.expected}`;return`Gautas tipas ${Z}, o tik\u0117tasi - ${Q}`}case"invalid_value":if(J.values.length===1)return`Privalo b\u016Bti ${U1(J.values[0])}`;return`Privalo b\u016Bti vienas i\u0161 ${i0(J.values,"|")} pasirinkim\u0173`;case"too_big":{let Q=G[J.origin]??J.origin,W=Y(J.origin,_f1(Number(J.maximum)),J.inclusive??!1,"smaller");if(W?.verb)return`${qb(Q??J.origin??"reik\u0161m\u0117")} ${W.verb} ${J.maximum.toString()} ${W.unit??"element\u0173"}`;let Z=J.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${qb(Q??J.origin??"reik\u0161m\u0117")} turi b\u016Bti ${Z} ${J.maximum.toString()} ${W?.unit}`}case"too_small":{let Q=G[J.origin]??J.origin,W=Y(J.origin,_f1(Number(J.minimum)),J.inclusive??!1,"bigger");if(W?.verb)return`${qb(Q??J.origin??"reik\u0161m\u0117")} ${W.verb} ${J.minimum.toString()} ${W.unit??"element\u0173"}`;let Z=J.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${qb(Q??J.origin??"reik\u0161m\u0117")} turi b\u016Bti ${Z} ${J.minimum.toString()} ${W?.unit}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Eilut\u0117 privalo prasid\u0117ti "${Q.prefix}"`;if(Q.format==="ends_with")return`Eilut\u0117 privalo pasibaigti "${Q.suffix}"`;if(Q.format==="includes")return`Eilut\u0117 privalo \u012Ftraukti "${Q.includes}"`;if(Q.format==="regex")return`Eilut\u0117 privalo atitikti ${Q.pattern}`;return`Neteisingas ${X[Q.format]??J.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${J.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${J.keys.length>1?"i":"as"} rakt${J.keys.length>1?"ai":"as"}: ${i0(J.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let Q=G[J.origin]??J.origin;return`${qb(Q??J.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};var jf1=V0(()=>{_4()});function Xw0(){return{localeError:MZ8()}}var MZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${J.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${Z}`;return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${Q}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${Z}`}case"invalid_value":if(J.values.length===1)return`Invalid input: expected ${U1(J.values[0])}`;return`\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 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${J.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${Q}${J.maximum.toString()} ${W.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`;return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${J.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${J.origin} \u0434\u0430 \u0438\u043C\u0430 ${Q}${J.minimum.toString()} ${W.unit}`;return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${J.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\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 "${Q.prefix}"`;if(Q.format==="ends_with")return`\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 "${Q.suffix}"`;if(Q.format==="includes")return`\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 "${Q.includes}"`;if(Q.format==="regex")return`\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 ${Q.pattern}`;return`Invalid ${X[Q.format]??J.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 ${J.divisor}`;case"unrecognized_keys":return`${J.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"}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${J.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 ${J.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};var Tf1=V0(()=>{_4()});function Gw0(){return{localeError:RZ8()}}var RZ8=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"nombor"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Input tidak sah: dijangka instanceof ${J.expected}, diterima ${Z}`;return`Input tidak sah: dijangka ${Q}, diterima ${Z}`}case"invalid_value":if(J.values.length===1)return`Input tidak sah: dijangka ${U1(J.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Terlalu besar: dijangka ${J.origin??"nilai"} ${W.verb} ${Q}${J.maximum.toString()} ${W.unit??"elemen"}`;return`Terlalu besar: dijangka ${J.origin??"nilai"} adalah ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Terlalu kecil: dijangka ${J.origin} ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`Terlalu kecil: dijangka ${J.origin} adalah ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`String tidak sah: mesti bermula dengan "${Q.prefix}"`;if(Q.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${Q.suffix}"`;if(Q.format==="includes")return`String tidak sah: mesti mengandungi "${Q.includes}"`;if(Q.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${Q.pattern}`;return`${X[Q.format]??J.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${J.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${i0(J.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${J.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${J.origin}`;default:return"Input tidak sah"}}};var Cf1=V0(()=>{_4()});function Jw0(){return{localeError:qZ8()}}var qZ8=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"getal"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ongeldige invoer: verwacht instanceof ${J.expected}, ontving ${Z}`;return`Ongeldige invoer: verwacht ${Q}, ontving ${Z}`}case"invalid_value":if(J.values.length===1)return`Ongeldige invoer: verwacht ${U1(J.values[0])}`;return`Ongeldige optie: verwacht \xE9\xE9n van ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin),Z=J.origin==="date"?"laat":J.origin==="string"?"lang":"groot";if(W)return`Te ${Z}: verwacht dat ${J.origin??"waarde"} ${Q}${J.maximum.toString()} ${W.unit??"elementen"} ${W.verb}`;return`Te ${Z}: verwacht dat ${J.origin??"waarde"} ${Q}${J.maximum.toString()} is`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin),Z=J.origin==="date"?"vroeg":J.origin==="string"?"kort":"klein";if(W)return`Te ${Z}: verwacht dat ${J.origin} ${Q}${J.minimum.toString()} ${W.unit} ${W.verb}`;return`Te ${Z}: verwacht dat ${J.origin} ${Q}${J.minimum.toString()} is`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ongeldige tekst: moet met "${Q.prefix}" beginnen`;if(Q.format==="ends_with")return`Ongeldige tekst: moet op "${Q.suffix}" eindigen`;if(Q.format==="includes")return`Ongeldige tekst: moet "${Q.includes}" bevatten`;if(Q.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${Q.pattern}`;return`Ongeldig: ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${J.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${J.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${J.origin}`;default:return"Ongeldige invoer"}}};var Sf1=V0(()=>{_4()});function Qw0(){return{localeError:IZ8()}}var IZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"tall",array:"liste"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ugyldig input: forventet instanceof ${J.expected}, fikk ${Z}`;return`Ugyldig input: forventet ${Q}, fikk ${Z}`}case"invalid_value":if(J.values.length===1)return`Ugyldig verdi: forventet ${U1(J.values[0])}`;return`Ugyldig valg: forventet en av ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`For stor(t): forventet ${J.origin??"value"} til \xE5 ha ${Q}${J.maximum.toString()} ${W.unit??"elementer"}`;return`For stor(t): forventet ${J.origin??"value"} til \xE5 ha ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`For lite(n): forventet ${J.origin} til \xE5 ha ${Q}${J.minimum.toString()} ${W.unit}`;return`For lite(n): forventet ${J.origin} til \xE5 ha ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ugyldig streng: m\xE5 starte med "${Q.prefix}"`;if(Q.format==="ends_with")return`Ugyldig streng: m\xE5 ende med "${Q.suffix}"`;if(Q.format==="includes")return`Ugyldig streng: m\xE5 inneholde "${Q.includes}"`;if(Q.format==="regex")return`Ugyldig streng: m\xE5 matche m\xF8nsteret ${Q.pattern}`;return`Ugyldig ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${J.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${J.origin}`;default:return"Ugyldig input"}}};var kf1=V0(()=>{_4()});function Ww0(){return{localeError:PZ8()}}var PZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`F\xE2sit giren: umulan instanceof ${J.expected}, al\u0131nan ${Z}`;return`F\xE2sit giren: umulan ${Q}, al\u0131nan ${Z}`}case"invalid_value":if(J.values.length===1)return`F\xE2sit giren: umulan ${U1(J.values[0])}`;return`F\xE2sit tercih: m\xFBteberler ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Fazla b\xFCy\xFCk: ${J.origin??"value"}, ${Q}${J.maximum.toString()} ${W.unit??"elements"} sahip olmal\u0131yd\u0131.`;return`Fazla b\xFCy\xFCk: ${J.origin??"value"}, ${Q}${J.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Fazla k\xFC\xE7\xFCk: ${J.origin}, ${Q}${J.minimum.toString()} ${W.unit} sahip olmal\u0131yd\u0131.`;return`Fazla k\xFC\xE7\xFCk: ${J.origin}, ${Q}${J.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`F\xE2sit metin: "${Q.prefix}" ile ba\u015Flamal\u0131.`;if(Q.format==="ends_with")return`F\xE2sit metin: "${Q.suffix}" ile bitmeli.`;if(Q.format==="includes")return`F\xE2sit metin: "${Q.includes}" ihtiv\xE2 etmeli.`;if(Q.format==="regex")return`F\xE2sit metin: ${Q.pattern} nak\u015F\u0131na uymal\u0131.`;return`F\xE2sit ${X[Q.format]??J.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${J.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${J.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};var vf1=V0(()=>{_4()});function Zw0(){return{localeError:wZ8()}}var wZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${J.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${Z} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Q} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${Z} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":if(J.values.length===1)return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${U1(J.values[0])} \u0648\u0627\u06CC`;return`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${i0(J.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${J.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${Q}${J.maximum.toString()} ${W.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`;return`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${J.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${Q}${J.maximum.toString()} \u0648\u064A`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${J.origin} \u0628\u0627\u06CC\u062F ${Q}${J.minimum.toString()} ${W.unit} \u0648\u0644\u0631\u064A`;return`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${J.origin} \u0628\u0627\u06CC\u062F ${Q}${J.minimum.toString()} \u0648\u064A`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${Q.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`;if(Q.format==="ends_with")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${Q.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`;if(Q.format==="includes")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${Q.includes}" \u0648\u0644\u0631\u064A`;if(Q.format==="regex")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${Q.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`;return`${X[Q.format]??J.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${J.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${J.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${J.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 ${J.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};var xf1=V0(()=>{_4()});function Kw0(){return{localeError:_Z8()}}var _Z8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"liczba",array:"tablica"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${J.expected}, otrzymano ${Z}`;return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Q}, otrzymano ${Z}`}case"invalid_value":if(J.values.length===1)return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${U1(J.values[0])}`;return`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${J.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${Q}${J.maximum.toString()} ${W.unit??"element\xF3w"}`;return`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${J.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${J.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${Q}${J.minimum.toString()} ${W.unit??"element\xF3w"}`;return`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${J.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${Q.prefix}"`;if(Q.format==="ends_with")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${Q.suffix}"`;if(Q.format==="includes")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${Q.includes}"`;if(Q.format==="regex")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${Q.pattern}`;return`Nieprawid\u0142ow(y/a/e) ${X[Q.format]??J.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${J.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${J.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${J.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};var yf1=V0(()=>{_4()});function Uw0(){return{localeError:jZ8()}}var jZ8=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"n\xFAmero",null:"nulo"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Tipo inv\xE1lido: esperado instanceof ${J.expected}, recebido ${Z}`;return`Tipo inv\xE1lido: esperado ${Q}, recebido ${Z}`}case"invalid_value":if(J.values.length===1)return`Entrada inv\xE1lida: esperado ${U1(J.values[0])}`;return`Op\xE7\xE3o inv\xE1lida: esperada uma das ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Muito grande: esperado que ${J.origin??"valor"} tivesse ${Q}${J.maximum.toString()} ${W.unit??"elementos"}`;return`Muito grande: esperado que ${J.origin??"valor"} fosse ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Muito pequeno: esperado que ${J.origin} tivesse ${Q}${J.minimum.toString()} ${W.unit}`;return`Muito pequeno: esperado que ${J.origin} fosse ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Texto inv\xE1lido: deve come\xE7ar com "${Q.prefix}"`;if(Q.format==="ends_with")return`Texto inv\xE1lido: deve terminar com "${Q.suffix}"`;if(Q.format==="includes")return`Texto inv\xE1lido: deve incluir "${Q.includes}"`;if(Q.format==="regex")return`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${Q.pattern}`;return`${X[Q.format]??J.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${J.divisor}`;case"unrecognized_keys":return`Chave${J.keys.length>1?"s":""} desconhecida${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${J.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${J.origin}`;default:return"Campo inv\xE1lido"}}};var bf1=V0(()=>{_4()});function Hw0(){return{localeError:TZ8()}}var TZ8=()=>{let $={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function Y(J){return $[J]??null}let X={regex:"intrare",email:"adres\u0103 de 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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},G={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;return`Intrare invalid\u0103: a\u0219teptat ${Q}, primit ${Z}`}case"invalid_value":if(J.values.length===1)return`Intrare invalid\u0103: a\u0219teptat ${U1(J.values[0])}`;return`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Prea mare: a\u0219teptat ca ${J.origin??"valoarea"} ${W.verb} ${Q}${J.maximum.toString()} ${W.unit??"elemente"}`;return`Prea mare: a\u0219teptat ca ${J.origin??"valoarea"} s\u0103 fie ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Prea mic: a\u0219teptat ca ${J.origin} ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`Prea mic: a\u0219teptat ca ${J.origin} s\u0103 fie ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${Q.prefix}"`;if(Q.format==="ends_with")return`\u0218ir invalid: trebuie s\u0103 se termine cu "${Q.suffix}"`;if(Q.format==="includes")return`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${Q.includes}"`;if(Q.format==="regex")return`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${Q.pattern}`;return`Format invalid: ${X[Q.format]??J.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${J.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${i0(J.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${J.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${J.origin}`;default:return"Intrare invalid\u0103"}}};var hf1=V0(()=>{_4()});function ff1($,Y,X,G){let J=Math.abs($),Q=J%10,W=J%100;if(W>=11&&W<=19)return G;if(Q===1)return Y;if(Q>=2&&Q<=4)return X;return G}function zw0(){return{localeError:CZ8()}}var CZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${J.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${Z}`;return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Q}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${Z}`}case"invalid_value":if(J.values.length===1)return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${U1(J.values[0])}`;return`\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 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W){let Z=Number(J.maximum),K=ff1(Z,W.unit.one,W.unit.few,W.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 ${J.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${Q}${J.maximum.toString()} ${K}`}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 ${J.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W){let Z=Number(J.minimum),K=ff1(Z,W.unit.one,W.unit.few,W.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 ${J.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${Q}${J.minimum.toString()} ${K}`}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 ${J.origin} \u0431\u0443\u0434\u0435\u0442 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\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 "${Q.prefix}"`;if(Q.format==="ends_with")return`\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 "${Q.suffix}"`;if(Q.format==="includes")return`\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 "${Q.includes}"`;if(Q.format==="regex")return`\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 ${Q.pattern}`;return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${X[Q.format]??J.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 ${J.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${J.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${J.keys.length>1?"\u0438":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${J.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 ${J.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};var gf1=V0(()=>{_4()});function Vw0(){return{localeError:SZ8()}}var SZ8=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Neveljaven vnos: pri\u010Dakovano instanceof ${J.expected}, prejeto ${Z}`;return`Neveljaven vnos: pri\u010Dakovano ${Q}, prejeto ${Z}`}case"invalid_value":if(J.values.length===1)return`Neveljaven vnos: pri\u010Dakovano ${U1(J.values[0])}`;return`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Preveliko: pri\u010Dakovano, da bo ${J.origin??"vrednost"} imelo ${Q}${J.maximum.toString()} ${W.unit??"elementov"}`;return`Preveliko: pri\u010Dakovano, da bo ${J.origin??"vrednost"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Premajhno: pri\u010Dakovano, da bo ${J.origin} imelo ${Q}${J.minimum.toString()} ${W.unit}`;return`Premajhno: pri\u010Dakovano, da bo ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Neveljaven niz: mora se za\u010Deti z "${Q.prefix}"`;if(Q.format==="ends_with")return`Neveljaven niz: mora se kon\u010Dati z "${Q.suffix}"`;if(Q.format==="includes")return`Neveljaven niz: mora vsebovati "${Q.includes}"`;if(Q.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${Q.pattern}`;return`Neveljaven ${X[Q.format]??J.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${J.divisor}`;case"unrecognized_keys":return`Neprepoznan${J.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${J.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${J.origin}`;default:return"Neveljaven vnos"}}};var mf1=V0(()=>{_4()});function Aw0(){return{localeError:kZ8()}}var kZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"antal",array:"lista"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${J.expected}, fick ${Z}`;return`Ogiltig inmatning: f\xF6rv\xE4ntat ${Q}, fick ${Z}`}case"invalid_value":if(J.values.length===1)return`Ogiltig inmatning: f\xF6rv\xE4ntat ${U1(J.values[0])}`;return`Ogiltigt val: f\xF6rv\xE4ntade en av ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`F\xF6r stor(t): f\xF6rv\xE4ntade ${J.origin??"v\xE4rdet"} att ha ${Q}${J.maximum.toString()} ${W.unit??"element"}`;return`F\xF6r stor(t): f\xF6rv\xE4ntat ${J.origin??"v\xE4rdet"} att ha ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`F\xF6r lite(t): f\xF6rv\xE4ntade ${J.origin??"v\xE4rdet"} att ha ${Q}${J.minimum.toString()} ${W.unit}`;return`F\xF6r lite(t): f\xF6rv\xE4ntade ${J.origin??"v\xE4rdet"} att ha ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${Q.prefix}"`;if(Q.format==="ends_with")return`Ogiltig str\xE4ng: m\xE5ste sluta med "${Q.suffix}"`;if(Q.format==="includes")return`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${Q.includes}"`;if(Q.format==="regex")return`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${Q.pattern}"`;return`Ogiltig(t) ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${J.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${J.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};var uf1=V0(()=>{_4()});function Fw0(){return{localeError:vZ8()}}var vZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\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 ${J.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Z}`;return`\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 ${Q}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Z}`}case"invalid_value":if(J.values.length===1)return`\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 ${U1(J.values[0])}`;return`\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 ${i0(J.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\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 ${J.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${Q}${J.maximum.toString()} ${W.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`;return`\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 ${J.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${Q}${J.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\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 ${J.origin} ${Q}${J.minimum.toString()} ${W.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;return`\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 ${J.origin} ${Q}${J.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${Q.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;if(Q.format==="ends_with")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${Q.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;if(Q.format==="includes")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${Q.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;if(Q.format==="regex")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${Q.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`;return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${J.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${J.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`${J.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`${J.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"}}};var pf1=V0(()=>{_4()});function Dw0(){return{localeError:xZ8()}}var xZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={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(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\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 ${J.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${Z}`;return`\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 ${Q} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${Z}`}case"invalid_value":if(J.values.length===1)return`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${U1(J.values[0])}`;return`\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 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",W=Y(J.origin);if(W)return`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${J.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${Q} ${J.maximum.toString()} ${W.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;return`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${J.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${Q} ${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",W=Y(J.origin);if(W)return`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${J.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${Q} ${J.minimum.toString()} ${W.unit}`;return`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${J.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${Q} ${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\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 "${Q.prefix}"`;if(Q.format==="ends_with")return`\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 "${Q.suffix}"`;if(Q.format==="includes")return`\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 "${Q.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`;if(Q.format==="regex")return`\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 ${Q.pattern}`;return`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${X[Q.format]??J.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 ${J.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: ${i0(J.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${J.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 ${J.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};var df1=V0(()=>{_4()});function Nw0(){return{localeError:yZ8()}}var yZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${J.expected}, al\u0131nan ${Z}`;return`Ge\xE7ersiz de\u011Fer: beklenen ${Q}, al\u0131nan ${Z}`}case"invalid_value":if(J.values.length===1)return`Ge\xE7ersiz de\u011Fer: beklenen ${U1(J.values[0])}`;return`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\xC7ok b\xFCy\xFCk: beklenen ${J.origin??"de\u011Fer"} ${Q}${J.maximum.toString()} ${W.unit??"\xF6\u011Fe"}`;return`\xC7ok b\xFCy\xFCk: beklenen ${J.origin??"de\u011Fer"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\xC7ok k\xFC\xE7\xFCk: beklenen ${J.origin} ${Q}${J.minimum.toString()} ${W.unit}`;return`\xC7ok k\xFC\xE7\xFCk: beklenen ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ge\xE7ersiz metin: "${Q.prefix}" ile ba\u015Flamal\u0131`;if(Q.format==="ends_with")return`Ge\xE7ersiz metin: "${Q.suffix}" ile bitmeli`;if(Q.format==="includes")return`Ge\xE7ersiz metin: "${Q.includes}" i\xE7ermeli`;if(Q.format==="regex")return`Ge\xE7ersiz metin: ${Q.pattern} desenine uymal\u0131`;return`Ge\xE7ersiz ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${J.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${J.keys.length>1?"lar":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${J.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};var cf1=V0(()=>{_4()});function Ib(){return{localeError:bZ8()}}var bZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\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 ${J.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${Z}`;return`\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 ${Q}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${Z}`}case"invalid_value":if(J.values.length===1)return`\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 ${U1(J.values[0])}`;return`\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 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\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 ${J.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${W.verb} ${Q}${J.maximum.toString()} ${W.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`;return`\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 ${J.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${J.origin} ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${J.origin} \u0431\u0443\u0434\u0435 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\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 "${Q.prefix}"`;if(Q.format==="ends_with")return`\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 "${Q.suffix}"`;if(Q.format==="includes")return`\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 "${Q.includes}"`;if(Q.format==="regex")return`\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 ${Q.pattern}`;return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${X[Q.format]??J.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 ${J.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${J.keys.length>1?"\u0456":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${J.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 ${J.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};var Lw0=V0(()=>{_4()});function Bw0(){return Ib()}var lf1=V0(()=>{Lw0()});function Ow0(){return{localeError:hZ8()}}var hZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${J.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${Z} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Q} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${Z} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":if(J.values.length===1)return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${U1(J.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;return`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${i0(J.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u0628\u06C1\u062A \u0628\u0691\u0627: ${J.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${Q}${J.maximum.toString()} ${W.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;return`\u0628\u06C1\u062A \u0628\u0691\u0627: ${J.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${Q}${J.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${J.origin} \u06A9\u06D2 ${Q}${J.minimum.toString()} ${W.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;return`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${J.origin} \u06A9\u0627 ${Q}${J.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${Q.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;if(Q.format==="ends_with")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${Q.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;if(Q.format==="includes")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${Q.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;if(Q.format==="regex")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${Q.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;return`\u063A\u0644\u0637 ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${J.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${J.keys.length>1?"\u0632":""}: ${i0(J.keys,"\u060C ")}`;case"invalid_key":return`${J.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${J.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};var if1=V0(()=>{_4()});function Ew0(){return{localeError:fZ8()}}var fZ8=()=>{let $={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"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"raqam",array:"massiv"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${J.expected}, qabul qilingan ${Z}`;return`Noto\u2018g\u2018ri kirish: kutilgan ${Q}, qabul qilingan ${Z}`}case"invalid_value":if(J.values.length===1)return`Noto\u2018g\u2018ri kirish: kutilgan ${U1(J.values[0])}`;return`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Juda katta: kutilgan ${J.origin??"qiymat"} ${Q}${J.maximum.toString()} ${W.unit} ${W.verb}`;return`Juda katta: kutilgan ${J.origin??"qiymat"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Juda kichik: kutilgan ${J.origin} ${Q}${J.minimum.toString()} ${W.unit} ${W.verb}`;return`Juda kichik: kutilgan ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Noto\u2018g\u2018ri satr: "${Q.prefix}" bilan boshlanishi kerak`;if(Q.format==="ends_with")return`Noto\u2018g\u2018ri satr: "${Q.suffix}" bilan tugashi kerak`;if(Q.format==="includes")return`Noto\u2018g\u2018ri satr: "${Q.includes}" ni o\u2018z ichiga olishi kerak`;if(Q.format==="regex")return`Noto\u2018g\u2018ri satr: ${Q.pattern} shabloniga mos kelishi kerak`;return`Noto\u2018g\u2018ri ${X[Q.format]??J.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${J.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${J.keys.length>1?"lar":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${J.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};var nf1=V0(()=>{_4()});function Mw0(){return{localeError:gZ8()}}var gZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${J.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${Z}`;return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Q}, nh\u1EADn \u0111\u01B0\u1EE3c ${Z}`}case"invalid_value":if(J.values.length===1)return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${U1(J.values[0])}`;return`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${J.origin??"gi\xE1 tr\u1ECB"} ${W.verb} ${Q}${J.maximum.toString()} ${W.unit??"ph\u1EA7n t\u1EED"}`;return`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${J.origin??"gi\xE1 tr\u1ECB"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${J.origin} ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${Q.prefix}"`;if(Q.format==="ends_with")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${Q.suffix}"`;if(Q.format==="includes")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${Q.includes}"`;if(Q.format==="regex")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${Q.pattern}`;return`${X[Q.format]??J.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 ${J.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${i0(J.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${J.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 ${J.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};var rf1=V0(()=>{_4()});function Rw0(){return{localeError:mZ8()}}var mZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${J.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${Z}`;return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Q}\uFF0C\u5B9E\u9645\u63A5\u6536 ${Z}`}case"invalid_value":if(J.values.length===1)return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${U1(J.values[0])}`;return`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${J.origin??"\u503C"} ${Q}${J.maximum.toString()} ${W.unit??"\u4E2A\u5143\u7D20"}`;return`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${J.origin??"\u503C"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${J.origin} ${Q}${J.minimum.toString()} ${W.unit}`;return`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${Q.prefix}" \u5F00\u5934`;if(Q.format==="ends_with")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${Q.suffix}" \u7ED3\u5C3E`;if(Q.format==="includes")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${Q.includes}"`;if(Q.format==="regex")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${Q.pattern}`;return`\u65E0\u6548${X[Q.format]??J.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${J.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${J.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};var af1=V0(()=>{_4()});function qw0(){return{localeError:uZ8()}}var uZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${J.expected}\uFF0C\u4F46\u6536\u5230 ${Z}`;return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Q}\uFF0C\u4F46\u6536\u5230 ${Z}`}case"invalid_value":if(J.values.length===1)return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${U1(J.values[0])}`;return`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${J.origin??"\u503C"} \u61C9\u70BA ${Q}${J.maximum.toString()} ${W.unit??"\u500B\u5143\u7D20"}`;return`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${J.origin??"\u503C"} \u61C9\u70BA ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${J.origin} \u61C9\u70BA ${Q}${J.minimum.toString()} ${W.unit}`;return`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${J.origin} \u61C9\u70BA ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${Q.prefix}" \u958B\u982D`;if(Q.format==="ends_with")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${Q.suffix}" \u7D50\u5C3E`;if(Q.format==="includes")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${Q.includes}"`;if(Q.format==="regex")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${Q.pattern}`;return`\u7121\u6548\u7684 ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${J.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${J.keys.length>1?"\u5011":""}\uFF1A${i0(J.keys,"\u3001")}`;case"invalid_key":return`${J.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${J.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};var sf1=V0(()=>{_4()});function Iw0(){return{localeError:pZ8()}}var pZ8=()=>{let $={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 Y(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),Z=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${J.expected}, \xE0m\u1ECD\u0300 a r\xED ${Z}`;return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Q}, \xE0m\u1ECD\u0300 a r\xED ${Z}`}case"invalid_value":if(J.values.length===1)return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${U1(J.values[0])}`;return`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${J.origin??"iye"} ${W.verb} ${Q}${J.maximum} ${W.unit}`;return`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${Q}${J.maximum}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${J.origin} ${W.verb} ${Q}${J.minimum} ${W.unit}`;return`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${Q}${J.minimum}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${Q.prefix}"`;if(Q.format==="ends_with")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${Q.suffix}"`;if(Q.format==="includes")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${Q.includes}"`;if(Q.format==="regex")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${Q.pattern}`;return`A\u1E63\xEC\u1E63e: ${X[Q.format]??J.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 ${J.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${i0(J.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${J.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 ${J.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};var of1=V0(()=>{_4()});var hB={};W8(hB,{zhTW:()=>qw0,zhCN:()=>Rw0,yo:()=>Iw0,vi:()=>Mw0,uz:()=>Ew0,ur:()=>Ow0,uk:()=>Ib,ua:()=>Bw0,tr:()=>Nw0,th:()=>Dw0,ta:()=>Fw0,sv:()=>Aw0,sl:()=>Vw0,ru:()=>zw0,ro:()=>Hw0,pt:()=>Uw0,ps:()=>Zw0,pl:()=>Kw0,ota:()=>Ww0,no:()=>Qw0,nl:()=>Jw0,ms:()=>Gw0,mk:()=>Xw0,lt:()=>Yw0,ko:()=>$w0,km:()=>Rb,kh:()=>eP0,ka:()=>oP0,ja:()=>sP0,it:()=>aP0,is:()=>rP0,id:()=>nP0,hy:()=>iP0,hu:()=>lP0,hr:()=>cP0,he:()=>dP0,frCA:()=>pP0,fr:()=>uP0,fi:()=>mP0,fa:()=>gP0,es:()=>fP0,eo:()=>hP0,en:()=>Mb,el:()=>yP0,de:()=>xP0,da:()=>vP0,cs:()=>kP0,ca:()=>SP0,bg:()=>CP0,be:()=>TP0,az:()=>jP0,ar:()=>_P0});var Z00=V0(()=>{eh1();$f1();Xf1();Gf1();Jf1();Qf1();Wf1();Zf1();Kf1();bP0();Uf1();Hf1();zf1();Vf1();Af1();Ff1();Df1();Nf1();Lf1();Of1();Ef1();Mf1();Rf1();qf1();If1();Pf1();tP0();wf1();jf1();Tf1();Cf1();Sf1();kf1();vf1();xf1();yf1();bf1();hf1();gf1();mf1();uf1();pf1();df1();cf1();lf1();Lw0();if1();nf1();rf1();af1();sf1();of1()});class Pw0{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...Y){let X=Y[0];if(this._map.set($,X),X&&typeof X==="object"&&"id"in X)this._idmap.set(X.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let Y=this._map.get($);if(Y&&typeof Y==="object"&&"id"in Y)this._idmap.delete(Y.id);return this._map.delete($),this}get($){let Y=$._zod.parent;if(Y){let X={...this.get(Y)??{}};delete X.id;let G={...X,...this._map.get($)};return Object.keys(G).length?G:void 0}return this._map.get($)}has($){return this._map.has($)}}function Pb(){return new Pw0}var tf1,K00,U00,fY;var wb=V0(()=>{K00=Symbol("ZodOutput"),U00=Symbol("ZodInput");(tf1=globalThis).__zod_globalRegistry??(tf1.__zod_globalRegistry=Pb());fY=globalThis.__zod_globalRegistry});function H00($,Y){return new $({type:"string",...q1(Y)})}function ww0($,Y){return new $({type:"string",coerce:!0,...q1(Y)})}function _b($,Y){return new $({type:"string",format:"email",check:"string_format",abort:!1,...q1(Y)})}function xP($,Y){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...q1(Y)})}function jb($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...q1(Y)})}function Tb($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...q1(Y)})}function Cb($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...q1(Y)})}function Sb($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...q1(Y)})}function yP($,Y){return new $({type:"string",format:"url",check:"string_format",abort:!1,...q1(Y)})}function kb($,Y){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...q1(Y)})}function vb($,Y){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...q1(Y)})}function xb($,Y){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...q1(Y)})}function yb($,Y){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...q1(Y)})}function bb($,Y){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...q1(Y)})}function hb($,Y){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...q1(Y)})}function fb($,Y){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...q1(Y)})}function gb($,Y){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...q1(Y)})}function mb($,Y){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...q1(Y)})}function z00($,Y){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...q1(Y)})}function ub($,Y){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...q1(Y)})}function pb($,Y){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...q1(Y)})}function db($,Y){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...q1(Y)})}function cb($,Y){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...q1(Y)})}function lb($,Y){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...q1(Y)})}function ib($,Y){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...q1(Y)})}function _w0($,Y){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...q1(Y)})}function jw0($,Y){return new $({type:"string",format:"date",check:"string_format",...q1(Y)})}function Tw0($,Y){return new $({type:"string",format:"time",check:"string_format",precision:null,...q1(Y)})}function Cw0($,Y){return new $({type:"string",format:"duration",check:"string_format",...q1(Y)})}function A00($,Y){return new $({type:"number",checks:[],...q1(Y)})}function Sw0($,Y){return new $({type:"number",coerce:!0,checks:[],...q1(Y)})}function F00($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...q1(Y)})}function D00($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...q1(Y)})}function N00($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...q1(Y)})}function L00($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...q1(Y)})}function B00($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...q1(Y)})}function O00($,Y){return new $({type:"boolean",...q1(Y)})}function kw0($,Y){return new $({type:"boolean",coerce:!0,...q1(Y)})}function E00($,Y){return new $({type:"bigint",...q1(Y)})}function vw0($,Y){return new $({type:"bigint",coerce:!0,...q1(Y)})}function M00($,Y){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...q1(Y)})}function R00($,Y){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...q1(Y)})}function q00($,Y){return new $({type:"symbol",...q1(Y)})}function I00($,Y){return new $({type:"undefined",...q1(Y)})}function P00($,Y){return new $({type:"null",...q1(Y)})}function w00($){return new $({type:"any"})}function _00($){return new $({type:"unknown"})}function j00($,Y){return new $({type:"never",...q1(Y)})}function T00($,Y){return new $({type:"void",...q1(Y)})}function C00($,Y){return new $({type:"date",...q1(Y)})}function xw0($,Y){return new $({type:"date",coerce:!0,...q1(Y)})}function S00($,Y){return new $({type:"nan",...q1(Y)})}function UK($,Y){return new st({check:"less_than",...q1(Y),value:$,inclusive:!1})}function UQ($,Y){return new st({check:"less_than",...q1(Y),value:$,inclusive:!0})}function HK($,Y){return new ot({check:"greater_than",...q1(Y),value:$,inclusive:!1})}function aX($,Y){return new ot({check:"greater_than",...q1(Y),value:$,inclusive:!0})}function nb($){return HK(0,$)}function rb($){return UK(0,$)}function ab($){return UQ(0,$)}function sb($){return aX(0,$)}function Oz($,Y){return new tI0({check:"multiple_of",...q1(Y),value:$})}function Ez($,Y){return new YP0({check:"max_size",...q1(Y),maximum:$})}function zK($,Y){return new XP0({check:"min_size",...q1(Y),minimum:$})}function LF($,Y){return new GP0({check:"size_equals",...q1(Y),size:$})}function BF($,Y){return new JP0({check:"max_length",...q1(Y),maximum:$})}function zU($,Y){return new QP0({check:"min_length",...q1(Y),minimum:$})}function OF($,Y){return new WP0({check:"length_equals",...q1(Y),length:$})}function fB($,Y){return new ZP0({check:"string_format",format:"regex",...q1(Y),pattern:$})}function gB($){return new KP0({check:"string_format",format:"lowercase",...q1($)})}function mB($){return new UP0({check:"string_format",format:"uppercase",...q1($)})}function uB($,Y){return new HP0({check:"string_format",format:"includes",...q1(Y),includes:$})}function pB($,Y){return new zP0({check:"string_format",format:"starts_with",...q1(Y),prefix:$})}function dB($,Y){return new VP0({check:"string_format",format:"ends_with",...q1(Y),suffix:$})}function ob($,Y,X){return new AP0({check:"property",property:$,schema:Y,...q1(X)})}function cB($,Y){return new FP0({check:"mime_type",mime:$,...q1(Y)})}function uZ($){return new DP0({check:"overwrite",tx:$})}function lB($){return uZ((Y)=>Y.normalize($))}function iB(){return uZ(($)=>$.trim())}function nB(){return uZ(($)=>$.toLowerCase())}function rB(){return uZ(($)=>$.toUpperCase())}function aB(){return uZ(($)=>FI0($))}function yw0($,Y,X){return new $({type:"array",element:Y,...q1(X)})}function cZ8($,Y,X){return new $({type:"union",options:Y,...q1(X)})}function lZ8($,Y,X){return new $({type:"union",options:Y,inclusive:!1,...q1(X)})}function iZ8($,Y,X,G){return new $({type:"union",options:X,discriminator:Y,...q1(G)})}function nZ8($,Y,X){return new $({type:"intersection",left:Y,right:X})}function rZ8($,Y,X,G){let J=X instanceof Z6;return new $({type:"tuple",items:Y,rest:J?X:null,...q1(J?G:X)})}function aZ8($,Y,X,G){return new $({type:"record",keyType:Y,valueType:X,...q1(G)})}function sZ8($,Y,X,G){return new $({type:"map",keyType:Y,valueType:X,...q1(G)})}function oZ8($,Y,X){return new $({type:"set",valueType:Y,...q1(X)})}function tZ8($,Y,X){let G=Array.isArray(Y)?Object.fromEntries(Y.map((J)=>[J,J])):Y;return new $({type:"enum",entries:G,...q1(X)})}function eZ8($,Y,X){return new $({type:"enum",entries:Y,...q1(X)})}function $28($,Y,X){return new $({type:"literal",values:Array.isArray(Y)?Y:[Y],...q1(X)})}function k00($,Y){return new $({type:"file",...q1(Y)})}function Y28($,Y){return new $({type:"transform",transform:Y})}function X28($,Y){return new $({type:"optional",innerType:Y})}function G28($,Y){return new $({type:"nullable",innerType:Y})}function J28($,Y,X){return new $({type:"default",innerType:Y,get defaultValue(){return typeof X==="function"?X():ht(X)}})}function Q28($,Y,X){return new $({type:"nonoptional",innerType:Y,...q1(X)})}function W28($,Y){return new $({type:"success",innerType:Y})}function Z28($,Y,X){return new $({type:"catch",innerType:Y,catchValue:typeof X==="function"?X:()=>X})}function K28($,Y,X){return new $({type:"pipe",in:Y,out:X})}function U28($,Y){return new $({type:"readonly",innerType:Y})}function H28($,Y,X){return new $({type:"template_literal",parts:Y,...q1(X)})}function z28($,Y){return new $({type:"lazy",getter:Y})}function V28($,Y){return new $({type:"promise",innerType:Y})}function v00($,Y,X){let G=q1(X);return G.abort??(G.abort=!0),new $({type:"custom",check:"custom",fn:Y,...G})}function x00($,Y,X){return new $({type:"custom",check:"custom",fn:Y,...q1(X)})}function y00($,Y){let X=ef1((G)=>{return G.addIssue=(J)=>{if(typeof J==="string")G.issues.push(RP(J,G.value,X._zod.def));else{let Q=J;if(Q.fatal)Q.continue=!1;Q.code??(Q.code="custom"),Q.input??(Q.input=G.value),Q.inst??(Q.inst=X),Q.continue??(Q.continue=!X._zod.def.abort),G.issues.push(RP(Q))}},$(G.value,G)},Y);return X}function ef1($,Y){let X=new H5({check:"custom",...q1(Y)});return X._zod.check=$,X}function b00($){let Y=new H5({check:"describe"});return Y._zod.onattach=[(X)=>{let G=fY.get(X)??{};fY.add(X,{...G,description:$})}],Y._zod.check=()=>{},Y}function h00($){let Y=new H5({check:"meta"});return Y._zod.onattach=[(X)=>{let G=fY.get(X)??{};fY.add(X,{...G,...$})}],Y._zod.check=()=>{},Y}function f00($,Y){let X=q1(Y),G=X.truthy??["true","1","yes","on","y","enabled"],J=X.falsy??["false","0","no","off","n","disabled"];if(X.case!=="sensitive")G=G.map((F)=>typeof F==="string"?F.toLowerCase():F),J=J.map((F)=>typeof F==="string"?F.toLowerCase():F);let Q=new Set(G),W=new Set(J),Z=$.Codec??kP,K=$.Boolean??CP,z=new($.String??NF)({type:"string",error:X.error}),V=new K({type:"boolean",error:X.error}),A=new Z({type:"pipe",in:z,out:V,transform:(F,N)=>{let D=F;if(X.case!=="sensitive")D=D.toLowerCase();if(Q.has(D))return!0;else if(W.has(D))return!1;else return N.issues.push({code:"invalid_value",expected:"stringbool",values:[...Q,...W],input:N.value,inst:A,continue:!1}),{}},reverseTransform:(F,N)=>{if(F===!0)return G[0]||"true";else return J[0]||"false"},error:X.error});return A}function sB($,Y,X,G={}){let J=q1(G),Q={...q1(G),check:"string_format",type:"string",format:Y,fn:typeof X==="function"?X:(Z)=>X.test(Z),...J};if(X instanceof RegExp)Q.pattern=X;return new $(Q)}var V00;var $g1=V0(()=>{tt();wb();wP0();_4();V00={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function EF($){let Y=$?.target??"draft-2020-12";if(Y==="draft-4")Y="draft-04";if(Y==="draft-7")Y="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??fY,target:Y,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function R9($,Y,X={path:[],schemaPath:[]}){var G;let J=$._zod.def,Q=Y.seen.get($);if(Q){if(Q.count++,X.schemaPath.includes($))Q.cycle=X.path;return Q.schema}let W={schema:{},count:1,cycle:void 0,path:X.path};Y.seen.set($,W);let Z=$._zod.toJSONSchema?.();if(Z)W.schema=Z;else{let z={...X,schemaPath:[...X.schemaPath,$],path:X.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(Y,W.schema,z);else{let A=W.schema,F=Y.processors[J.type];if(!F)throw Error(`[toJSONSchema]: Non-representable type encountered: ${J.type}`);F($,Y,A,z)}let V=$._zod.parent;if(V){if(!W.ref)W.ref=V;R9(V,Y,z),Y.seen.get(V).isParent=!0}}let K=Y.metadataRegistry.get($);if(K)Object.assign(W.schema,K);if(Y.io==="input"&&uG($))delete W.schema.examples,delete W.schema.default;if(Y.io==="input"&&"_prefault"in W.schema)(G=W.schema).default??(G.default=W.schema._prefault);return delete W.schema._prefault,Y.seen.get($).schema}function MF($,Y){let X=$.seen.get(Y);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let G=new Map;for(let W of $.seen.entries()){let Z=$.metadataRegistry.get(W[0])?.id;if(Z){let K=G.get(Z);if(K&&K!==W[0])throw Error(`Duplicate schema id "${Z}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);G.set(Z,W[0])}}let J=(W)=>{let Z=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let V=$.external.registry.get(W[0])?.id,A=$.external.uri??((N)=>N);if(V)return{ref:A(V)};let F=W[1].defId??W[1].schema.id??`schema${$.counter++}`;return W[1].defId=F,{defId:F,ref:`${A("__shared")}#/${Z}/${F}`}}if(W[1]===X)return{ref:"#"};let H=`${"#"}/${Z}/`,z=W[1].schema.id??`__schema${$.counter++}`;return{defId:z,ref:H+z}},Q=(W)=>{if(W[1].schema.$ref)return;let Z=W[1],{ref:K,defId:H}=J(W);if(Z.def={...Z.schema},H)Z.defId=H;let z=Z.schema;for(let V in z)delete z[V];z.$ref=K};if($.cycles==="throw")for(let W of $.seen.entries()){let Z=W[1];if(Z.cycle)throw Error(`Cycle detected: #/${Z.cycle?.join("/")}/<root>

Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let W of $.seen.entries()){let Z=W[1];if(Y===W[0]){Q(W);continue}if($.external){let H=$.external.registry.get(W[0])?.id;if(Y!==W[0]&&H){Q(W);continue}}if($.metadataRegistry.get(W[0])?.id){Q(W);continue}if(Z.cycle){Q(W);continue}if(Z.count>1){if($.reused==="ref"){Q(W);continue}}}}function RF($,Y){let X=$.seen.get(Y);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let G=(Z)=>{let K=$.seen.get(Z);if(K.ref===null)return;let H=K.def??K.schema,z={...H},V=K.ref;if(K.ref=null,V){G(V);let F=$.seen.get(V),N=F.schema;if(N.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))H.allOf=H.allOf??[],H.allOf.push(N);else Object.assign(H,N);if(Object.assign(H,z),Z._zod.parent===V)for(let L in H){if(L==="$ref"||L==="allOf")continue;if(!(L in z))delete H[L]}if(N.$ref&&F.def)for(let L in H){if(L==="$ref"||L==="allOf")continue;if(L in F.def&&JSON.stringify(H[L])===JSON.stringify(F.def[L]))delete H[L]}}let A=Z._zod.parent;if(A&&A!==V){G(A);let F=$.seen.get(A);if(F?.schema.$ref){if(H.$ref=F.schema.$ref,F.def)for(let N in H){if(N==="$ref"||N==="allOf")continue;if(N in F.def&&JSON.stringify(H[N])===JSON.stringify(F.def[N]))delete H[N]}}}$.override({zodSchema:Z,jsonSchema:H,path:K.path??[]})};for(let Z of[...$.seen.entries()].reverse())G(Z[0]);let J={};if($.target==="draft-2020-12")J.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")J.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")J.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let Z=$.external.registry.get(Y)?.id;if(!Z)throw Error("Schema is missing an `id` property");J.$id=$.external.uri(Z)}Object.assign(J,X.def??X.schema);let Q=$.metadataRegistry.get(Y)?.id;if(Q!==void 0&&J.id===Q)delete J.id;let W=$.external?.defs??{};for(let Z of $.seen.entries()){let K=Z[1];if(K.def&&K.defId){if(K.def.id===K.defId)delete K.def.id;W[K.defId]=K.def}}if($.external);else if(Object.keys(W).length>0)if($.target==="draft-2020-12")J.$defs=W;else J.definitions=W;try{let Z=JSON.parse(JSON.stringify(J));return Object.defineProperty(Z,"~standard",{value:{...Y["~standard"],jsonSchema:{input:bP(Y,"input",$.processors),output:bP(Y,"output",$.processors)}},enumerable:!1,writable:!1}),Z}catch(Z){throw Error("Error converting schema to JSON.")}}function uG($,Y){let X=Y??{seen:new Set};if(X.seen.has($))return!1;X.seen.add($);let G=$._zod.def;if(G.type==="transform")return!0;if(G.type==="array")return uG(G.element,X);if(G.type==="set")return uG(G.valueType,X);if(G.type==="lazy")return uG(G.getter(),X);if(G.type==="promise"||G.type==="optional"||G.type==="nonoptional"||G.type==="nullable"||G.type==="readonly"||G.type==="default"||G.type==="prefault")return uG(G.innerType,X);if(G.type==="intersection")return uG(G.left,X)||uG(G.right,X);if(G.type==="record"||G.type==="map")return uG(G.keyType,X)||uG(G.valueType,X);if(G.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return uG(G.in,X)||uG(G.out,X)}if(G.type==="object"){for(let J in G.shape)if(uG(G.shape[J],X))return!0;return!1}if(G.type==="union"){for(let J of G.options)if(uG(J,X))return!0;return!1}if(G.type==="tuple"){for(let J of G.items)if(uG(J,X))return!0;if(G.rest&&uG(G.rest,X))return!0;return!1}return!1}var bw0=($,Y={})=>(X)=>{let G=EF({...X,processors:Y});return R9($,G),MF(G,$),RF(G,$)},bP=($,Y,X={})=>(G)=>{let{libraryOptions:J,target:Q}=G??{},W=EF({...J??{},target:Q,io:Y,processors:X});return R9($,W),MF(W,$),RF(W,$)};var tb=V0(()=>{wb()});function $$($,Y){if("_idmap"in $){let G=$,J=EF({...Y,processors:g00}),Q={};for(let K of G._idmap.entries()){let[H,z]=K;R9(z,J)}let W={},Z={registry:G,uri:Y?.uri,defs:Q};J.external=Z;for(let K of G._idmap.entries()){let[H,z]=K;MF(J,z),W[H]=RF(J,z)}if(Object.keys(Q).length>0){let K=J.target==="draft-2020-12"?"$defs":"definitions";W.__shared={[K]:Q}}return{schemas:W}}let X=EF({...Y,processors:g00});return R9($,X),MF(X,$),RF(X,$)}var A28,hw0=($,Y,X,G)=>{let J=X;J.type="string";let{minimum:Q,maximum:W,format:Z,patterns:K,contentEncoding:H}=$._zod.bag;if(typeof Q==="number")J.minLength=Q;if(typeof W==="number")J.maxLength=W;if(Z){if(J.format=A28[Z]??Z,J.format==="")delete J.format;if(Z==="time")delete J.format}if(H)J.contentEncoding=H;if(K&&K.size>0){let z=[...K];if(z.length===1)J.pattern=z[0].source;else if(z.length>1)J.allOf=[...z.map((V)=>({...Y.target==="draft-07"||Y.target==="draft-04"||Y.target==="openapi-3.0"?{type:"string"}:{},pattern:V.source}))]}},fw0=($,Y,X,G)=>{let J=X,{minimum:Q,maximum:W,format:Z,multipleOf:K,exclusiveMaximum:H,exclusiveMinimum:z}=$._zod.bag;if(typeof Z==="string"&&Z.includes("int"))J.type="integer";else J.type="number";let V=typeof z==="number"&&z>=(Q??Number.NEGATIVE_INFINITY),A=typeof H==="number"&&H<=(W??Number.POSITIVE_INFINITY),F=Y.target==="draft-04"||Y.target==="openapi-3.0";if(V)if(F)J.minimum=z,J.exclusiveMinimum=!0;else J.exclusiveMinimum=z;else if(typeof Q==="number")J.minimum=Q;if(A)if(F)J.maximum=H,J.exclusiveMaximum=!0;else J.exclusiveMaximum=H;else if(typeof W==="number")J.maximum=W;if(typeof K==="number")J.multipleOf=K},gw0=($,Y,X,G)=>{X.type="boolean"},mw0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},uw0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},pw0=($,Y,X,G)=>{if(Y.target==="openapi-3.0")X.type="string",X.nullable=!0,X.enum=[null];else X.type="null"},dw0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},cw0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},lw0=($,Y,X,G)=>{X.not={}},iw0=($,Y,X,G)=>{},nw0=($,Y,X,G)=>{},rw0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},aw0=($,Y,X,G)=>{let J=$._zod.def,Q=Zb(J.entries);if(Q.every((W)=>typeof W==="number"))X.type="number";if(Q.every((W)=>typeof W==="string"))X.type="string";X.enum=Q},sw0=($,Y,X,G)=>{let J=$._zod.def,Q=[];for(let W of J.values)if(W===void 0){if(Y.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof W==="bigint")if(Y.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else Q.push(Number(W));else Q.push(W);if(Q.length===0);else if(Q.length===1){let W=Q[0];if(X.type=W===null?"null":typeof W,Y.target==="draft-04"||Y.target==="openapi-3.0")X.enum=[W];else X.const=W}else{if(Q.every((W)=>typeof W==="number"))X.type="number";if(Q.every((W)=>typeof W==="string"))X.type="string";if(Q.every((W)=>typeof W==="boolean"))X.type="boolean";if(Q.every((W)=>W===null))X.type="null";X.enum=Q}},ow0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},tw0=($,Y,X,G)=>{let J=X,Q=$._zod.pattern;if(!Q)throw Error("Pattern not found in template literal");J.type="string",J.pattern=Q.source},ew0=($,Y,X,G)=>{let J=X,Q={type:"string",format:"binary",contentEncoding:"binary"},{minimum:W,maximum:Z,mime:K}=$._zod.bag;if(W!==void 0)Q.minLength=W;if(Z!==void 0)Q.maxLength=Z;if(K)if(K.length===1)Q.contentMediaType=K[0],Object.assign(J,Q);else Object.assign(J,Q),J.anyOf=K.map((H)=>({contentMediaType:H}));else Object.assign(J,Q)},$_0=($,Y,X,G)=>{X.type="boolean"},Y_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},X_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},G_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},J_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},Q_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},W_0=($,Y,X,G)=>{let J=X,Q=$._zod.def,{minimum:W,maximum:Z}=$._zod.bag;if(typeof W==="number")J.minItems=W;if(typeof Z==="number")J.maxItems=Z;J.type="array",J.items=R9(Q.element,Y,{...G,path:[...G.path,"items"]})},Z_0=($,Y,X,G)=>{let J=X,Q=$._zod.def;J.type="object",J.properties={};let W=Q.shape;for(let H in W)J.properties[H]=R9(W[H],Y,{...G,path:[...G.path,"properties",H]});let Z=new Set(Object.keys(W)),K=new Set([...Z].filter((H)=>{let z=Q.shape[H]._zod;if(Y.io==="input")return z.optin===void 0;else return z.optout===void 0}));if(K.size>0)J.required=Array.from(K);if(Q.catchall?._zod.def.type==="never")J.additionalProperties=!1;else if(!Q.catchall){if(Y.io==="output")J.additionalProperties=!1}else if(Q.catchall)J.additionalProperties=R9(Q.catchall,Y,{...G,path:[...G.path,"additionalProperties"]})},m00=($,Y,X,G)=>{let J=$._zod.def,Q=J.inclusive===!1,W=J.options.map((Z,K)=>R9(Z,Y,{...G,path:[...G.path,Q?"oneOf":"anyOf",K]}));if(Q)X.oneOf=W;else X.anyOf=W},K_0=($,Y,X,G)=>{let J=$._zod.def,Q=R9(J.left,Y,{...G,path:[...G.path,"allOf",0]}),W=R9(J.right,Y,{...G,path:[...G.path,"allOf",1]}),Z=(H)=>("allOf"in H)&&Object.keys(H).length===1,K=[...Z(Q)?Q.allOf:[Q],...Z(W)?W.allOf:[W]];X.allOf=K},U_0=($,Y,X,G)=>{let J=X,Q=$._zod.def;J.type="array";let W=Y.target==="draft-2020-12"?"prefixItems":"items",Z=Y.target==="draft-2020-12"?"items":Y.target==="openapi-3.0"?"items":"additionalItems",K=Q.items.map((A,F)=>R9(A,Y,{...G,path:[...G.path,W,F]})),H=Q.rest?R9(Q.rest,Y,{...G,path:[...G.path,Z,...Y.target==="openapi-3.0"?[Q.items.length]:[]]}):null;if(Y.target==="draft-2020-12"){if(J.prefixItems=K,H)J.items=H}else if(Y.target==="openapi-3.0"){if(J.items={anyOf:K},H)J.items.anyOf.push(H);if(J.minItems=K.length,!H)J.maxItems=K.length}else if(J.items=K,H)J.additionalItems=H;let{minimum:z,maximum:V}=$._zod.bag;if(typeof z==="number")J.minItems=z;if(typeof V==="number")J.maxItems=V},H_0=($,Y,X,G)=>{let J=X,Q=$._zod.def;J.type="object";let W=Q.keyType,K=W._zod.bag?.patterns;if(Q.mode==="loose"&&K&&K.size>0){let z=R9(Q.valueType,Y,{...G,path:[...G.path,"patternProperties","*"]});J.patternProperties={};for(let V of K)J.patternProperties[V.source]=z}else{if(Y.target==="draft-07"||Y.target==="draft-2020-12")J.propertyNames=R9(Q.keyType,Y,{...G,path:[...G.path,"propertyNames"]});J.additionalProperties=R9(Q.valueType,Y,{...G,path:[...G.path,"additionalProperties"]})}let H=W._zod.values;if(H){let z=[...H].filter((V)=>typeof V==="string"||typeof V==="number");if(z.length>0)J.required=z}},z_0=($,Y,X,G)=>{let J=$._zod.def,Q=R9(J.innerType,Y,G),W=Y.seen.get($);if(Y.target==="openapi-3.0")W.ref=J.innerType,X.nullable=!0;else X.anyOf=[Q,{type:"null"}]},V_0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType},A_0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType,X.default=JSON.parse(JSON.stringify(J.defaultValue))},F_0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);if(Q.ref=J.innerType,Y.io==="input")X._prefault=JSON.parse(JSON.stringify(J.defaultValue))},D_0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType;let W;try{W=J.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}X.default=W},N_0=($,Y,X,G)=>{let J=$._zod.def,Q=J.in._zod.traits.has("$ZodTransform"),W=Y.io==="input"?Q?J.out:J.in:J.out;R9(W,Y,G);let Z=Y.seen.get($);Z.ref=W},L_0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType,X.readOnly=!0},B_0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType},u00=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType},O_0=($,Y,X,G)=>{let J=$._zod.innerType;R9(J,Y,G);let Q=Y.seen.get($);Q.ref=J},g00;var hP=V0(()=>{tb();_4();A28={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},g00={string:hw0,number:fw0,boolean:gw0,bigint:mw0,symbol:uw0,null:pw0,undefined:dw0,void:cw0,never:lw0,any:iw0,unknown:nw0,date:rw0,enum:aw0,literal:sw0,nan:ow0,template_literal:tw0,file:ew0,success:$_0,custom:Y_0,function:X_0,transform:G_0,map:J_0,set:Q_0,array:W_0,object:Z_0,union:m00,intersection:K_0,tuple:U_0,record:H_0,nullable:z_0,nonoptional:V_0,default:A_0,prefault:F_0,catch:D_0,pipe:N_0,readonly:L_0,promise:B_0,optional:u00,lazy:O_0}});class E_0{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($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let Y=$?.target??"draft-2020-12";if(Y==="draft-4")Y="draft-04";if(Y==="draft-7")Y="draft-07";this.ctx=EF({processors:g00,target:Y,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,Y={path:[],schemaPath:[]}){return R9($,this.ctx,Y)}emit($,Y){if(Y){if(Y.cycles)this.ctx.cycles=Y.cycles;if(Y.reused)this.ctx.reused=Y.reused;if(Y.external)this.ctx.external=Y.external}MF(this.ctx,$);let X=RF(this.ctx,$),{"~standard":G,...J}=X;return J}}var Yg1=V0(()=>{hP();tb()});var Xg1={};var Gg1=()=>{};var pZ={};W8(pZ,{version:()=>NP0,util:()=>V1,treeifyError:()=>ft,toJSONSchema:()=>$$,toDotPath:()=>Eh1,safeParseAsync:()=>DF,safeParse:()=>FF,safeEncodeAsync:()=>_h1,safeEncode:()=>Ph1,safeDecodeAsync:()=>jh1,safeDecode:()=>wh1,registry:()=>Pb,regexes:()=>mG,process:()=>R9,prettifyError:()=>gt,parseAsync:()=>yB,parse:()=>xB,meta:()=>h00,locales:()=>hB,isValidJWT:()=>sh1,isValidBase64URL:()=>ah1,isValidBase64:()=>qP0,initializeContext:()=>EF,globalRegistry:()=>fY,globalConfig:()=>CB,formatError:()=>IP,flattenError:()=>qP,finalize:()=>RF,extractDefs:()=>MF,encodeAsync:()=>qh1,encode:()=>Mh1,describe:()=>b00,decodeAsync:()=>Ih1,decode:()=>Rh1,createToJSONSchemaMethod:()=>bw0,createStandardJSONSchemaMethod:()=>bP,config:()=>k7,clone:()=>hY,_xor:()=>lZ8,_xid:()=>hb,_void:()=>T00,_uuidv7:()=>Sb,_uuidv6:()=>Cb,_uuidv4:()=>Tb,_uuid:()=>jb,_url:()=>yP,_uppercase:()=>mB,_unknown:()=>_00,_union:()=>cZ8,_undefined:()=>I00,_ulid:()=>bb,_uint64:()=>R00,_uint32:()=>B00,_tuple:()=>rZ8,_trim:()=>iB,_transform:()=>Y28,_toUpperCase:()=>rB,_toLowerCase:()=>nB,_templateLiteral:()=>H28,_symbol:()=>q00,_superRefine:()=>y00,_success:()=>W28,_stringbool:()=>f00,_stringFormat:()=>sB,_string:()=>H00,_startsWith:()=>pB,_slugify:()=>aB,_size:()=>LF,_set:()=>oZ8,_safeParseAsync:()=>jP,_safeParse:()=>_P,_safeEncodeAsync:()=>it,_safeEncode:()=>ct,_safeDecodeAsync:()=>nt,_safeDecode:()=>lt,_regex:()=>fB,_refine:()=>x00,_record:()=>aZ8,_readonly:()=>U28,_property:()=>ob,_promise:()=>V28,_positive:()=>nb,_pipe:()=>K28,_parseAsync:()=>wP,_parse:()=>PP,_overwrite:()=>uZ,_optional:()=>X28,_number:()=>A00,_nullable:()=>G28,_null:()=>P00,_normalize:()=>lB,_nonpositive:()=>ab,_nonoptional:()=>Q28,_nonnegative:()=>sb,_never:()=>j00,_negative:()=>rb,_nativeEnum:()=>eZ8,_nanoid:()=>vb,_nan:()=>S00,_multipleOf:()=>Oz,_minSize:()=>zK,_minLength:()=>zU,_min:()=>aX,_mime:()=>cB,_maxSize:()=>Ez,_maxLength:()=>BF,_max:()=>UQ,_map:()=>sZ8,_mac:()=>z00,_lte:()=>UQ,_lt:()=>UK,_lowercase:()=>gB,_literal:()=>$28,_length:()=>OF,_lazy:()=>z28,_ksuid:()=>fb,_jwt:()=>ib,_isoTime:()=>Tw0,_isoDuration:()=>Cw0,_isoDateTime:()=>_w0,_isoDate:()=>jw0,_ipv6:()=>mb,_ipv4:()=>gb,_intersection:()=>nZ8,_int64:()=>M00,_int32:()=>L00,_int:()=>F00,_includes:()=>uB,_guid:()=>xP,_gte:()=>aX,_gt:()=>HK,_float64:()=>N00,_float32:()=>D00,_file:()=>k00,_enum:()=>tZ8,_endsWith:()=>dB,_encodeAsync:()=>pt,_encode:()=>mt,_emoji:()=>kb,_email:()=>_b,_e164:()=>lb,_discriminatedUnion:()=>iZ8,_default:()=>J28,_decodeAsync:()=>dt,_decode:()=>ut,_date:()=>C00,_custom:()=>v00,_cuid2:()=>yb,_cuid:()=>xb,_coercedString:()=>ww0,_coercedNumber:()=>Sw0,_coercedDate:()=>xw0,_coercedBoolean:()=>kw0,_coercedBigint:()=>vw0,_cidrv6:()=>pb,_cidrv4:()=>ub,_check:()=>ef1,_catch:()=>Z28,_boolean:()=>O00,_bigint:()=>E00,_base64url:()=>cb,_base64:()=>db,_array:()=>yw0,_any:()=>w00,TimePrecision:()=>V00,NEVER:()=>OP,JSONSchemaGenerator:()=>E_0,JSONSchema:()=>Xg1,Doc:()=>et,$output:()=>K00,$input:()=>U00,$constructor:()=>x0,$brand:()=>xt,$ZodXor:()=>he,$ZodXID:()=>Ae,$ZodVoid:()=>ve,$ZodUnknown:()=>Se,$ZodUnion:()=>SP,$ZodUndefined:()=>je,$ZodUUID:()=>Qe,$ZodURL:()=>Ze,$ZodULID:()=>Ve,$ZodType:()=>Z6,$ZodTuple:()=>Bb,$ZodTransform:()=>ie,$ZodTemplateLiteral:()=>X00,$ZodSymbol:()=>_e,$ZodSuccess:()=>te,$ZodStringFormat:()=>g9,$ZodString:()=>NF,$ZodSet:()=>pe,$ZodRegistry:()=>Pw0,$ZodRecord:()=>me,$ZodRealError:()=>KQ,$ZodReadonly:()=>Y00,$ZodPromise:()=>J00,$ZodPreprocess:()=>PP0,$ZodPrefault:()=>se,$ZodPipe:()=>Eb,$ZodOptional:()=>Ob,$ZodObjectJIT:()=>IP0,$ZodObject:()=>be,$ZodNumberFormat:()=>Pe,$ZodNumber:()=>Nb,$ZodNullable:()=>re,$ZodNull:()=>Te,$ZodNonOptional:()=>oe,$ZodNever:()=>ke,$ZodNanoID:()=>Ue,$ZodNaN:()=>$00,$ZodMap:()=>ue,$ZodMAC:()=>Le,$ZodLiteral:()=>ce,$ZodLazy:()=>Q00,$ZodKSUID:()=>Fe,$ZodJWT:()=>qe,$ZodIntersection:()=>ge,$ZodISOTime:()=>MP0,$ZodISODuration:()=>RP0,$ZodISODateTime:()=>OP0,$ZodISODate:()=>EP0,$ZodIPv6:()=>Ne,$ZodIPv4:()=>De,$ZodGUID:()=>Je,$ZodFunction:()=>G00,$ZodFile:()=>le,$ZodExactOptional:()=>ne,$ZodError:()=>Vb,$ZodEnum:()=>de,$ZodEncodeError:()=>SB,$ZodEmoji:()=>Ke,$ZodEmail:()=>We,$ZodE164:()=>Re,$ZodDiscriminatedUnion:()=>fe,$ZodDefault:()=>ae,$ZodDate:()=>xe,$ZodCustomStringFormat:()=>Ie,$ZodCustom:()=>W00,$ZodCodec:()=>kP,$ZodCheckUpperCase:()=>UP0,$ZodCheckStringFormat:()=>TP,$ZodCheckStartsWith:()=>zP0,$ZodCheckSizeEquals:()=>GP0,$ZodCheckRegex:()=>ZP0,$ZodCheckProperty:()=>AP0,$ZodCheckOverwrite:()=>DP0,$ZodCheckNumberFormat:()=>eI0,$ZodCheckMultipleOf:()=>tI0,$ZodCheckMinSize:()=>XP0,$ZodCheckMinLength:()=>QP0,$ZodCheckMimeType:()=>FP0,$ZodCheckMaxSize:()=>YP0,$ZodCheckMaxLength:()=>JP0,$ZodCheckLowerCase:()=>KP0,$ZodCheckLessThan:()=>st,$ZodCheckLengthEquals:()=>WP0,$ZodCheckIncludes:()=>HP0,$ZodCheckGreaterThan:()=>ot,$ZodCheckEndsWith:()=>VP0,$ZodCheckBigIntFormat:()=>$P0,$ZodCheck:()=>H5,$ZodCatch:()=>ee,$ZodCUID2:()=>ze,$ZodCUID:()=>He,$ZodCIDRv6:()=>Oe,$ZodCIDRv4:()=>Be,$ZodBoolean:()=>CP,$ZodBigIntFormat:()=>we,$ZodBigInt:()=>Lb,$ZodBase64URL:()=>Me,$ZodBase64:()=>Ee,$ZodAsyncError:()=>HU,$ZodArray:()=>ye,$ZodAny:()=>Ce});var sX=V0(()=>{_4();at();Z00();hP();Yg1();Gg1();kB();RI0();MI0();wP0();tt();LP0();wb();$g1();tb()});var p00={};W8(p00,{uppercase:()=>mB,trim:()=>iB,toUpperCase:()=>rB,toLowerCase:()=>nB,startsWith:()=>pB,slugify:()=>aB,size:()=>LF,regex:()=>fB,property:()=>ob,positive:()=>nb,overwrite:()=>uZ,normalize:()=>lB,nonpositive:()=>ab,nonnegative:()=>sb,negative:()=>rb,multipleOf:()=>Oz,minSize:()=>zK,minLength:()=>zU,mime:()=>cB,maxSize:()=>Ez,maxLength:()=>BF,lte:()=>UQ,lt:()=>UK,lowercase:()=>gB,length:()=>OF,includes:()=>uB,gte:()=>aX,gt:()=>HK,endsWith:()=>dB});var d00=V0(()=>{sX()});var Mz={};W8(Mz,{time:()=>q_0,duration:()=>I_0,datetime:()=>M_0,date:()=>R_0,ZodISOTime:()=>Yh,ZodISODuration:()=>Xh,ZodISODateTime:()=>eb,ZodISODate:()=>$h});function M_0($){return _w0(eb,$)}function R_0($){return jw0($h,$)}function q_0($){return Tw0(Yh,$)}function I_0($){return Cw0(Xh,$)}var eb,$h,Yh,Xh;var Gh=V0(()=>{sX();Qh();eb=x0("ZodISODateTime",($,Y)=>{OP0.init($,Y),m9.init($,Y)});$h=x0("ZodISODate",($,Y)=>{EP0.init($,Y),m9.init($,Y)});Yh=x0("ZodISOTime",($,Y)=>{MP0.init($,Y),m9.init($,Y)});Xh=x0("ZodISODuration",($,Y)=>{RP0.init($,Y),m9.init($,Y)})});var Jg1=($,Y)=>{Vb.init($,Y),$.name="ZodError",Object.defineProperties($,{format:{value:(X)=>IP($,X)},flatten:{value:(X)=>qP($,X)},addIssue:{value:(X)=>{$.issues.push(X),$.message=JSON.stringify($.issues,EP,2)}},addIssues:{value:(X)=>{$.issues.push(...X),$.message=JSON.stringify($.issues,EP,2)}},isEmpty:{get(){return $.issues.length===0}}})},Qg1,pG;var P_0=V0(()=>{sX();sX();_4();Qg1=x0("ZodError",Jg1),pG=x0("ZodError",Jg1,{Parent:Error})});var c00,l00,i00,oX,n00,r00,a00,s00,o00,t00,e00,$10;var w_0=V0(()=>{sX();P_0();c00=PP(pG),l00=wP(pG),i00=_P(pG),oX=jP(pG),n00=mt(pG),r00=ut(pG),a00=pt(pG),s00=dt(pG),o00=ct(pG),t00=lt(pG),e00=it(pG),$10=nt(pG)});var Jh={};W8(Jh,{xor:()=>Aj0,xid:()=>g_0,void:()=>Uj0,uuidv7:()=>k_0,uuidv6:()=>S_0,uuidv4:()=>C_0,uuid:()=>T_0,url:()=>qz,unknown:()=>u9,union:()=>p9,undefined:()=>Kj0,ulid:()=>f_0,uint64:()=>Wj0,uint32:()=>Gj0,tuple:()=>z10,transform:()=>Th,templateLiteral:()=>Pj0,symbol:()=>Zj0,superRefine:()=>b10,success:()=>Mj0,stringbool:()=>kj0,stringFormat:()=>s_0,string:()=>j0,strictObject:()=>Vj0,set:()=>Lj0,refine:()=>y10,record:()=>q9,readonly:()=>T10,promise:()=>wj0,preprocess:()=>sP,prefault:()=>M10,pipe:()=>Zh,partialRecord:()=>Fj0,optional:()=>z5,object:()=>v1,number:()=>H8,nullish:()=>Ej0,nullable:()=>gP,null:()=>pP,nonoptional:()=>R10,never:()=>jh,nativeEnum:()=>Bj0,nanoid:()=>y_0,nan:()=>Rj0,meta:()=>Cj0,map:()=>Nj0,mac:()=>p_0,looseRecord:()=>Dj0,looseObject:()=>Y$,literal:()=>L4,lazy:()=>k10,ksuid:()=>m_0,keyof:()=>zj0,jwt:()=>a_0,json:()=>vj0,ipv6:()=>d_0,ipv4:()=>u_0,invertCodec:()=>Ij0,intersection:()=>GO,int64:()=>Qj0,int32:()=>Xj0,int:()=>Wh,instanceof:()=>Sj0,httpUrl:()=>v_0,hostname:()=>o_0,hex:()=>t_0,hash:()=>e_0,guid:()=>j_0,function:()=>_j0,float64:()=>Yj0,float32:()=>$j0,file:()=>Oj0,exactOptional:()=>B10,enum:()=>gY,emoji:()=>x_0,email:()=>__0,e164:()=>r_0,discriminatedUnion:()=>cP,describe:()=>Tj0,date:()=>Hj0,custom:()=>Sh,cuid2:()=>h_0,cuid:()=>b_0,codec:()=>qj0,cidrv6:()=>l_0,cidrv4:()=>c_0,check:()=>jj0,catch:()=>P10,boolean:()=>U9,bigint:()=>Jj0,base64url:()=>n_0,base64:()=>i_0,array:()=>b1,any:()=>_h,_function:()=>_j0,_default:()=>O10,_ZodString:()=>Uh,ZodXor:()=>K10,ZodXID:()=>Nh,ZodVoid:()=>Z10,ZodUnknown:()=>Q10,ZodUnion:()=>PF,ZodUndefined:()=>G10,ZodUUID:()=>VK,ZodURL:()=>mP,ZodULID:()=>Dh,ZodType:()=>j6,ZodTuple:()=>H10,ZodTransform:()=>N10,ZodTemplateLiteral:()=>C10,ZodSymbol:()=>X10,ZodSuccess:()=>q10,ZodStringFormat:()=>m9,ZodString:()=>Rz,ZodSet:()=>A10,ZodRecord:()=>oB,ZodReadonly:()=>j10,ZodPromise:()=>v10,ZodPreprocess:()=>_10,ZodPrefault:()=>E10,ZodPipe:()=>nP,ZodOptional:()=>wz,ZodObject:()=>Pz,ZodNumberFormat:()=>qF,ZodNumber:()=>Iz,ZodNullable:()=>lP,ZodNull:()=>uP,ZodNonOptional:()=>Ch,ZodNever:()=>W10,ZodNanoID:()=>Vh,ZodNaN:()=>w10,ZodMap:()=>V10,ZodMAC:()=>Y10,ZodLiteral:()=>F10,ZodLazy:()=>S10,ZodKSUID:()=>Lh,ZodJWT:()=>Ph,ZodIntersection:()=>XO,ZodIPv6:()=>Oh,ZodIPv4:()=>Bh,ZodGUID:()=>fP,ZodFunction:()=>x10,ZodFile:()=>D10,ZodExactOptional:()=>L10,ZodEnum:()=>tB,ZodEmoji:()=>zh,ZodEmail:()=>Hh,ZodE164:()=>Ih,ZodDiscriminatedUnion:()=>U10,ZodDefault:()=>iP,ZodDate:()=>IF,ZodCustomStringFormat:()=>eB,ZodCustom:()=>aP,ZodCodec:()=>rP,ZodCatch:()=>I10,ZodCUID2:()=>Fh,ZodCUID:()=>Ah,ZodCIDRv6:()=>Mh,ZodCIDRv4:()=>Eh,ZodBoolean:()=>$O,ZodBigIntFormat:()=>wh,ZodBigInt:()=>YO,ZodBase64URL:()=>qh,ZodBase64:()=>Rh,ZodArray:()=>dP,ZodAny:()=>J10});function Kh($,Y,X){let G=Object.getPrototypeOf($),J=Wg1.get(G);if(!J)J=new Set,Wg1.set(G,J);if(J.has(Y))return;J.add(Y);for(let Q in X){let W=X[Q];Object.defineProperty(G,Q,{configurable:!0,enumerable:!1,get(){let Z=W.bind(this);return Object.defineProperty(this,Q,{configurable:!0,writable:!0,enumerable:!0,value:Z}),Z},set(Z){Object.defineProperty(this,Q,{configurable:!0,writable:!0,enumerable:!0,value:Z})}})}}function j0($){return H00(Rz,$)}function __0($){return _b(Hh,$)}function j_0($){return xP(fP,$)}function T_0($){return jb(VK,$)}function C_0($){return Tb(VK,$)}function S_0($){return Cb(VK,$)}function k_0($){return Sb(VK,$)}function qz($){return yP(mP,$)}function v_0($){return yP(mP,{protocol:mG.httpProtocol,hostname:mG.domain,...V1.normalizeParams($)})}function x_0($){return kb(zh,$)}function y_0($){return vb(Vh,$)}function b_0($){return xb(Ah,$)}function h_0($){return yb(Fh,$)}function f_0($){return bb(Dh,$)}function g_0($){return hb(Nh,$)}function m_0($){return fb(Lh,$)}function u_0($){return gb(Bh,$)}function p_0($){return z00(Y10,$)}function d_0($){return mb(Oh,$)}function c_0($){return ub(Eh,$)}function l_0($){return pb(Mh,$)}function i_0($){return db(Rh,$)}function n_0($){return cb(qh,$)}function r_0($){return lb(Ih,$)}function a_0($){return ib(Ph,$)}function s_0($,Y,X={}){return sB(eB,$,Y,X)}function o_0($){return sB(eB,"hostname",mG.hostname,$)}function t_0($){return sB(eB,"hex",mG.hex,$)}function e_0($,Y){let X=Y?.enc??"hex",G=`${$}_${X}`,J=mG[G];if(!J)throw Error(`Unrecognized hash format: ${G}`);return sB(eB,G,J,Y)}function H8($){return A00(Iz,$)}function Wh($){return F00(qF,$)}function $j0($){return D00(qF,$)}function Yj0($){return N00(qF,$)}function Xj0($){return L00(qF,$)}function Gj0($){return B00(qF,$)}function U9($){return O00($O,$)}function Jj0($){return E00(YO,$)}function Qj0($){return M00(wh,$)}function Wj0($){return R00(wh,$)}function Zj0($){return q00(X10,$)}function Kj0($){return I00(G10,$)}function pP($){return P00(uP,$)}function _h(){return w00(J10)}function u9(){return _00(Q10)}function jh($){return j00(W10,$)}function Uj0($){return T00(Z10,$)}function Hj0($){return C00(IF,$)}function b1($,Y){return yw0(dP,$,Y)}function zj0($){let Y=$._zod.def.shape;return gY(Object.keys(Y))}function v1($,Y){let X={type:"object",shape:$??{},...V1.normalizeParams(Y)};return new Pz(X)}function Vj0($,Y){return new Pz({type:"object",shape:$,catchall:jh(),...V1.normalizeParams(Y)})}function Y$($,Y){return new Pz({type:"object",shape:$,catchall:u9(),...V1.normalizeParams(Y)})}function p9($,Y){return new PF({type:"union",options:$,...V1.normalizeParams(Y)})}function Aj0($,Y){return new K10({type:"union",options:$,inclusive:!1,...V1.normalizeParams(Y)})}function cP($,Y,X){return new U10({type:"union",options:Y,discriminator:$,...V1.normalizeParams(X)})}function GO($,Y){return new XO({type:"intersection",left:$,right:Y})}function z10($,Y,X){let G=Y instanceof Z6,J=G?X:Y;return new H10({type:"tuple",items:$,rest:G?Y:null,...V1.normalizeParams(J)})}function q9($,Y,X){if(!Y||!Y._zod)return new oB({type:"record",keyType:j0(),valueType:$,...V1.normalizeParams(Y)});return new oB({type:"record",keyType:$,valueType:Y,...V1.normalizeParams(X)})}function Fj0($,Y,X){let G=hY($);return G._zod.values=void 0,new oB({type:"record",keyType:G,valueType:Y,...V1.normalizeParams(X)})}function Dj0($,Y,X){return new oB({type:"record",keyType:$,valueType:Y,mode:"loose",...V1.normalizeParams(X)})}function Nj0($,Y,X){return new V10({type:"map",keyType:$,valueType:Y,...V1.normalizeParams(X)})}function Lj0($,Y){return new A10({type:"set",valueType:$,...V1.normalizeParams(Y)})}function gY($,Y){let X=Array.isArray($)?Object.fromEntries($.map((G)=>[G,G])):$;return new tB({type:"enum",entries:X,...V1.normalizeParams(Y)})}function Bj0($,Y){return new tB({type:"enum",entries:$,...V1.normalizeParams(Y)})}function L4($,Y){return new F10({type:"literal",values:Array.isArray($)?$:[$],...V1.normalizeParams(Y)})}function Oj0($){return k00(D10,$)}function Th($){return new N10({type:"transform",transform:$})}function z5($){return new wz({type:"optional",innerType:$})}function B10($){return new L10({type:"optional",innerType:$})}function gP($){return new lP({type:"nullable",innerType:$})}function Ej0($){return z5(gP($))}function O10($,Y){return new iP({type:"default",innerType:$,get defaultValue(){return typeof Y==="function"?Y():V1.shallowClone(Y)}})}function M10($,Y){return new E10({type:"prefault",innerType:$,get defaultValue(){return typeof Y==="function"?Y():V1.shallowClone(Y)}})}function R10($,Y){return new Ch({type:"nonoptional",innerType:$,...V1.normalizeParams(Y)})}function Mj0($){return new q10({type:"success",innerType:$})}function P10($,Y){return new I10({type:"catch",innerType:$,catchValue:typeof Y==="function"?Y:()=>Y})}function Rj0($){return S00(w10,$)}function Zh($,Y){return new nP({type:"pipe",in:$,out:Y})}function qj0($,Y,X){return new rP({type:"pipe",in:$,out:Y,transform:X.decode,reverseTransform:X.encode})}function Ij0($){let Y=$._zod.def;return new rP({type:"pipe",in:Y.out,out:Y.in,transform:Y.reverseTransform,reverseTransform:Y.transform})}function T10($){return new j10({type:"readonly",innerType:$})}function Pj0($,Y){return new C10({type:"template_literal",parts:$,...V1.normalizeParams(Y)})}function k10($){return new S10({type:"lazy",getter:$})}function wj0($){return new v10({type:"promise",innerType:$})}function _j0($){return new x10({type:"function",input:Array.isArray($?.input)?z10($?.input):$?.input??b1(u9()),output:$?.output??u9()})}function jj0($){let Y=new H5({check:"custom"});return Y._zod.check=$,Y}function Sh($,Y){return v00(aP,$??(()=>!0),Y)}function y10($,Y={}){return x00(aP,$,Y)}function b10($,Y){return y00($,Y)}function Sj0($,Y={}){let X=new aP({type:"custom",check:"custom",fn:(G)=>G instanceof $,abort:!0,...V1.normalizeParams(Y)});return X._zod.bag.Class=$,X._zod.check=(G)=>{if(!(G.value instanceof $))G.issues.push({code:"invalid_type",expected:$.name,input:G.value,inst:X,path:[...X._zod.def.path??[]]})},X}function vj0($){let Y=k10(()=>{return p9([j0($),H8(),U9(),pP(),b1(Y),q9(j0(),Y)])});return Y}function sP($,Y){return new _10({type:"pipe",in:Th($),out:Y})}var Wg1,j6,Uh,Rz,m9,Hh,fP,VK,mP,zh,Vh,Ah,Fh,Dh,Nh,Lh,Bh,Y10,Oh,Eh,Mh,Rh,qh,Ih,Ph,eB,Iz,qF,$O,YO,wh,X10,G10,uP,J10,Q10,W10,Z10,IF,dP,Pz,PF,K10,U10,XO,H10,oB,V10,A10,tB,F10,D10,N10,wz,L10,lP,iP,E10,Ch,q10,I10,w10,nP,rP,_10,j10,C10,S10,v10,x10,aP,Tj0,Cj0,kj0=(...$)=>f00({Codec:rP,Boolean:$O,String:Rz},...$);var Qh=V0(()=>{sX();sX();hP();tb();d00();Gh();w_0();Wg1=new WeakMap;j6=x0("ZodType",($,Y)=>{return Z6.init($,Y),Object.assign($["~standard"],{jsonSchema:{input:bP($,"input"),output:bP($,"output")}}),$.toJSONSchema=bw0($,{}),$.def=Y,$.type=Y.type,Object.defineProperty($,"_def",{value:Y}),$.parse=(X,G)=>c00($,X,G,{callee:$.parse}),$.safeParse=(X,G)=>i00($,X,G),$.parseAsync=async(X,G)=>l00($,X,G,{callee:$.parseAsync}),$.safeParseAsync=async(X,G)=>oX($,X,G),$.spa=$.safeParseAsync,$.encode=(X,G)=>n00($,X,G),$.decode=(X,G)=>r00($,X,G),$.encodeAsync=async(X,G)=>a00($,X,G),$.decodeAsync=async(X,G)=>s00($,X,G),$.safeEncode=(X,G)=>o00($,X,G),$.safeDecode=(X,G)=>t00($,X,G),$.safeEncodeAsync=async(X,G)=>e00($,X,G),$.safeDecodeAsync=async(X,G)=>$10($,X,G),Kh($,"ZodType",{check(...X){let G=this.def;return this.clone(V1.mergeDefs(G,{checks:[...G.checks??[],...X.map((J)=>typeof J==="function"?{_zod:{check:J,def:{check:"custom"},onattach:[]}}:J)]}),{parent:!0})},with(...X){return this.check(...X)},clone(X,G){return hY(this,X,G)},brand(){return this},register(X,G){return X.add(this,G),this},refine(X,G){return this.check(y10(X,G))},superRefine(X,G){return this.check(b10(X,G))},overwrite(X){return this.check(uZ(X))},optional(){return z5(this)},exactOptional(){return B10(this)},nullable(){return gP(this)},nullish(){return z5(gP(this))},nonoptional(X){return R10(this,X)},array(){return b1(this)},or(X){return p9([this,X])},and(X){return GO(this,X)},transform(X){return Zh(this,Th(X))},default(X){return O10(this,X)},prefault(X){return M10(this,X)},catch(X){return P10(this,X)},pipe(X){return Zh(this,X)},readonly(){return T10(this)},describe(X){let G=this.clone();return fY.add(G,{description:X}),G},meta(...X){if(X.length===0)return fY.get(this);let G=this.clone();return fY.add(G,X[0]),G},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(X){return X(this)}}),Object.defineProperty($,"description",{get(){return fY.get($)?.description},configurable:!0}),$}),Uh=x0("_ZodString",($,Y)=>{NF.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(G,J,Q)=>hw0($,G,J,Q);let X=$._zod.bag;$.format=X.format??null,$.minLength=X.minimum??null,$.maxLength=X.maximum??null,Kh($,"_ZodString",{regex(...G){return this.check(fB(...G))},includes(...G){return this.check(uB(...G))},startsWith(...G){return this.check(pB(...G))},endsWith(...G){return this.check(dB(...G))},min(...G){return this.check(zU(...G))},max(...G){return this.check(BF(...G))},length(...G){return this.check(OF(...G))},nonempty(...G){return this.check(zU(1,...G))},lowercase(G){return this.check(gB(G))},uppercase(G){return this.check(mB(G))},trim(){return this.check(iB())},normalize(...G){return this.check(lB(...G))},toLowerCase(){return this.check(nB())},toUpperCase(){return this.check(rB())},slugify(){return this.check(aB())}})}),Rz=x0("ZodString",($,Y)=>{NF.init($,Y),Uh.init($,Y),$.email=(X)=>$.check(_b(Hh,X)),$.url=(X)=>$.check(yP(mP,X)),$.jwt=(X)=>$.check(ib(Ph,X)),$.emoji=(X)=>$.check(kb(zh,X)),$.guid=(X)=>$.check(xP(fP,X)),$.uuid=(X)=>$.check(jb(VK,X)),$.uuidv4=(X)=>$.check(Tb(VK,X)),$.uuidv6=(X)=>$.check(Cb(VK,X)),$.uuidv7=(X)=>$.check(Sb(VK,X)),$.nanoid=(X)=>$.check(vb(Vh,X)),$.guid=(X)=>$.check(xP(fP,X)),$.cuid=(X)=>$.check(xb(Ah,X)),$.cuid2=(X)=>$.check(yb(Fh,X)),$.ulid=(X)=>$.check(bb(Dh,X)),$.base64=(X)=>$.check(db(Rh,X)),$.base64url=(X)=>$.check(cb(qh,X)),$.xid=(X)=>$.check(hb(Nh,X)),$.ksuid=(X)=>$.check(fb(Lh,X)),$.ipv4=(X)=>$.check(gb(Bh,X)),$.ipv6=(X)=>$.check(mb(Oh,X)),$.cidrv4=(X)=>$.check(ub(Eh,X)),$.cidrv6=(X)=>$.check(pb(Mh,X)),$.e164=(X)=>$.check(lb(Ih,X)),$.datetime=(X)=>$.check(M_0(X)),$.date=(X)=>$.check(R_0(X)),$.time=(X)=>$.check(q_0(X)),$.duration=(X)=>$.check(I_0(X))});m9=x0("ZodStringFormat",($,Y)=>{g9.init($,Y),Uh.init($,Y)}),Hh=x0("ZodEmail",($,Y)=>{We.init($,Y),m9.init($,Y)});fP=x0("ZodGUID",($,Y)=>{Je.init($,Y),m9.init($,Y)});VK=x0("ZodUUID",($,Y)=>{Qe.init($,Y),m9.init($,Y)});mP=x0("ZodURL",($,Y)=>{Ze.init($,Y),m9.init($,Y)});zh=x0("ZodEmoji",($,Y)=>{Ke.init($,Y),m9.init($,Y)});Vh=x0("ZodNanoID",($,Y)=>{Ue.init($,Y),m9.init($,Y)});Ah=x0("ZodCUID",($,Y)=>{He.init($,Y),m9.init($,Y)});Fh=x0("ZodCUID2",($,Y)=>{ze.init($,Y),m9.init($,Y)});Dh=x0("ZodULID",($,Y)=>{Ve.init($,Y),m9.init($,Y)});Nh=x0("ZodXID",($,Y)=>{Ae.init($,Y),m9.init($,Y)});Lh=x0("ZodKSUID",($,Y)=>{Fe.init($,Y),m9.init($,Y)});Bh=x0("ZodIPv4",($,Y)=>{De.init($,Y),m9.init($,Y)});Y10=x0("ZodMAC",($,Y)=>{Le.init($,Y),m9.init($,Y)});Oh=x0("ZodIPv6",($,Y)=>{Ne.init($,Y),m9.init($,Y)});Eh=x0("ZodCIDRv4",($,Y)=>{Be.init($,Y),m9.init($,Y)});Mh=x0("ZodCIDRv6",($,Y)=>{Oe.init($,Y),m9.init($,Y)});Rh=x0("ZodBase64",($,Y)=>{Ee.init($,Y),m9.init($,Y)});qh=x0("ZodBase64URL",($,Y)=>{Me.init($,Y),m9.init($,Y)});Ih=x0("ZodE164",($,Y)=>{Re.init($,Y),m9.init($,Y)});Ph=x0("ZodJWT",($,Y)=>{qe.init($,Y),m9.init($,Y)});eB=x0("ZodCustomStringFormat",($,Y)=>{Ie.init($,Y),m9.init($,Y)});Iz=x0("ZodNumber",($,Y)=>{Nb.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(G,J,Q)=>fw0($,G,J,Q),Kh($,"ZodNumber",{gt(G,J){return this.check(HK(G,J))},gte(G,J){return this.check(aX(G,J))},min(G,J){return this.check(aX(G,J))},lt(G,J){return this.check(UK(G,J))},lte(G,J){return this.check(UQ(G,J))},max(G,J){return this.check(UQ(G,J))},int(G){return this.check(Wh(G))},safe(G){return this.check(Wh(G))},positive(G){return this.check(HK(0,G))},nonnegative(G){return this.check(aX(0,G))},negative(G){return this.check(UK(0,G))},nonpositive(G){return this.check(UQ(0,G))},multipleOf(G,J){return this.check(Oz(G,J))},step(G,J){return this.check(Oz(G,J))},finite(){return this}});let X=$._zod.bag;$.minValue=Math.max(X.minimum??Number.NEGATIVE_INFINITY,X.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(X.maximum??Number.POSITIVE_INFINITY,X.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(X.format??"").includes("int")||Number.isSafeInteger(X.multipleOf??0.5),$.isFinite=!0,$.format=X.format??null});qF=x0("ZodNumberFormat",($,Y)=>{Pe.init($,Y),Iz.init($,Y)});$O=x0("ZodBoolean",($,Y)=>{CP.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>gw0($,X,G,J)});YO=x0("ZodBigInt",($,Y)=>{Lb.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(G,J,Q)=>mw0($,G,J,Q),$.gte=(G,J)=>$.check(aX(G,J)),$.min=(G,J)=>$.check(aX(G,J)),$.gt=(G,J)=>$.check(HK(G,J)),$.gte=(G,J)=>$.check(aX(G,J)),$.min=(G,J)=>$.check(aX(G,J)),$.lt=(G,J)=>$.check(UK(G,J)),$.lte=(G,J)=>$.check(UQ(G,J)),$.max=(G,J)=>$.check(UQ(G,J)),$.positive=(G)=>$.check(HK(BigInt(0),G)),$.negative=(G)=>$.check(UK(BigInt(0),G)),$.nonpositive=(G)=>$.check(UQ(BigInt(0),G)),$.nonnegative=(G)=>$.check(aX(BigInt(0),G)),$.multipleOf=(G,J)=>$.check(Oz(G,J));let X=$._zod.bag;$.minValue=X.minimum??null,$.maxValue=X.maximum??null,$.format=X.format??null});wh=x0("ZodBigIntFormat",($,Y)=>{we.init($,Y),YO.init($,Y)});X10=x0("ZodSymbol",($,Y)=>{_e.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>uw0($,X,G,J)});G10=x0("ZodUndefined",($,Y)=>{je.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>dw0($,X,G,J)});uP=x0("ZodNull",($,Y)=>{Te.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>pw0($,X,G,J)});J10=x0("ZodAny",($,Y)=>{Ce.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>iw0($,X,G,J)});Q10=x0("ZodUnknown",($,Y)=>{Se.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>nw0($,X,G,J)});W10=x0("ZodNever",($,Y)=>{ke.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>lw0($,X,G,J)});Z10=x0("ZodVoid",($,Y)=>{ve.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>cw0($,X,G,J)});IF=x0("ZodDate",($,Y)=>{xe.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(G,J,Q)=>rw0($,G,J,Q),$.min=(G,J)=>$.check(aX(G,J)),$.max=(G,J)=>$.check(UQ(G,J));let X=$._zod.bag;$.minDate=X.minimum?new Date(X.minimum):null,$.maxDate=X.maximum?new Date(X.maximum):null});dP=x0("ZodArray",($,Y)=>{ye.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>W_0($,X,G,J),$.element=Y.element,Kh($,"ZodArray",{min(X,G){return this.check(zU(X,G))},nonempty(X){return this.check(zU(1,X))},max(X,G){return this.check(BF(X,G))},length(X,G){return this.check(OF(X,G))},unwrap(){return this.element}})});Pz=x0("ZodObject",($,Y)=>{IP0.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Z_0($,X,G,J),V1.defineLazy($,"shape",()=>{return Y.shape}),Kh($,"ZodObject",{keyof(){return gY(Object.keys(this._zod.def.shape))},catchall(X){return this.clone({...this._zod.def,catchall:X})},passthrough(){return this.clone({...this._zod.def,catchall:u9()})},loose(){return this.clone({...this._zod.def,catchall:u9()})},strict(){return this.clone({...this._zod.def,catchall:jh()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(X){return V1.extend(this,X)},safeExtend(X){return V1.safeExtend(this,X)},merge(X){return V1.merge(this,X)},pick(X){return V1.pick(this,X)},omit(X){return V1.omit(this,X)},partial(...X){return V1.partial(wz,this,X[0])},required(...X){return V1.required(Ch,this,X[0])}})});PF=x0("ZodUnion",($,Y)=>{SP.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>m00($,X,G,J),$.options=Y.options});K10=x0("ZodXor",($,Y)=>{PF.init($,Y),he.init($,Y),$._zod.processJSONSchema=(X,G,J)=>m00($,X,G,J),$.options=Y.options});U10=x0("ZodDiscriminatedUnion",($,Y)=>{PF.init($,Y),fe.init($,Y)});XO=x0("ZodIntersection",($,Y)=>{ge.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>K_0($,X,G,J)});H10=x0("ZodTuple",($,Y)=>{Bb.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>U_0($,X,G,J),$.rest=(X)=>$.clone({...$._zod.def,rest:X})});oB=x0("ZodRecord",($,Y)=>{me.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>H_0($,X,G,J),$.keyType=Y.keyType,$.valueType=Y.valueType});V10=x0("ZodMap",($,Y)=>{ue.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>J_0($,X,G,J),$.keyType=Y.keyType,$.valueType=Y.valueType,$.min=(...X)=>$.check(zK(...X)),$.nonempty=(X)=>$.check(zK(1,X)),$.max=(...X)=>$.check(Ez(...X)),$.size=(...X)=>$.check(LF(...X))});A10=x0("ZodSet",($,Y)=>{pe.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Q_0($,X,G,J),$.min=(...X)=>$.check(zK(...X)),$.nonempty=(X)=>$.check(zK(1,X)),$.max=(...X)=>$.check(Ez(...X)),$.size=(...X)=>$.check(LF(...X))});tB=x0("ZodEnum",($,Y)=>{de.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(G,J,Q)=>aw0($,G,J,Q),$.enum=Y.entries,$.options=Object.values(Y.entries);let X=new Set(Object.keys(Y.entries));$.extract=(G,J)=>{let Q={};for(let W of G)if(X.has(W))Q[W]=Y.entries[W];else throw Error(`Key ${W} not found in enum`);return new tB({...Y,checks:[],...V1.normalizeParams(J),entries:Q})},$.exclude=(G,J)=>{let Q={...Y.entries};for(let W of G)if(X.has(W))delete Q[W];else throw Error(`Key ${W} not found in enum`);return new tB({...Y,checks:[],...V1.normalizeParams(J),entries:Q})}});F10=x0("ZodLiteral",($,Y)=>{ce.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>sw0($,X,G,J),$.values=new Set(Y.values),Object.defineProperty($,"value",{get(){if(Y.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return Y.values[0]}})});D10=x0("ZodFile",($,Y)=>{le.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>ew0($,X,G,J),$.min=(X,G)=>$.check(zK(X,G)),$.max=(X,G)=>$.check(Ez(X,G)),$.mime=(X,G)=>$.check(cB(Array.isArray(X)?X:[X],G))});N10=x0("ZodTransform",($,Y)=>{ie.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>G_0($,X,G,J),$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new SB($.constructor.name);X.addIssue=(Q)=>{if(typeof Q==="string")X.issues.push(V1.issue(Q,X.value,Y));else{let W=Q;if(W.fatal)W.continue=!1;W.code??(W.code="custom"),W.input??(W.input=X.value),W.inst??(W.inst=$),X.issues.push(V1.issue(W))}};let J=Y.transform(X.value,X);if(J instanceof Promise)return J.then((Q)=>{return X.value=Q,X.fallback=!0,X});return X.value=J,X.fallback=!0,X}});wz=x0("ZodOptional",($,Y)=>{Ob.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>u00($,X,G,J),$.unwrap=()=>$._zod.def.innerType});L10=x0("ZodExactOptional",($,Y)=>{ne.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>u00($,X,G,J),$.unwrap=()=>$._zod.def.innerType});lP=x0("ZodNullable",($,Y)=>{re.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>z_0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});iP=x0("ZodDefault",($,Y)=>{ae.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>A_0($,X,G,J),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});E10=x0("ZodPrefault",($,Y)=>{se.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>F_0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});Ch=x0("ZodNonOptional",($,Y)=>{oe.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>V_0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});q10=x0("ZodSuccess",($,Y)=>{te.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>$_0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});I10=x0("ZodCatch",($,Y)=>{ee.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>D_0($,X,G,J),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});w10=x0("ZodNaN",($,Y)=>{$00.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>ow0($,X,G,J)});nP=x0("ZodPipe",($,Y)=>{Eb.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>N_0($,X,G,J),$.in=Y.in,$.out=Y.out});rP=x0("ZodCodec",($,Y)=>{nP.init($,Y),kP.init($,Y)});_10=x0("ZodPreprocess",($,Y)=>{nP.init($,Y),PP0.init($,Y)}),j10=x0("ZodReadonly",($,Y)=>{Y00.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>L_0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});C10=x0("ZodTemplateLiteral",($,Y)=>{X00.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>tw0($,X,G,J)});S10=x0("ZodLazy",($,Y)=>{Q00.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>O_0($,X,G,J),$.unwrap=()=>$._zod.def.getter()});v10=x0("ZodPromise",($,Y)=>{J00.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>B_0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});x10=x0("ZodFunction",($,Y)=>{G00.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>X_0($,X,G,J)});aP=x0("ZodCustom",($,Y)=>{W00.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Y_0($,X,G,J)});Tj0=b00,Cj0=h00});function Zg1($){k7({customError:$})}function Kg1(){return k7().customError}var f10,h10;var Ug1=V0(()=>{sX();f10={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($){})(h10||(h10={}))});function L28($,Y){let X=$.$schema;if(X==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(X==="http://json-schema.org/draft-07/schema#")return"draft-7";if(X==="http://json-schema.org/draft-04/schema#")return"draft-4";return Y??"draft-2020-12"}function B28($,Y){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let X=$.slice(1).split("/").filter(Boolean);if(X.length===0)return Y.rootSchema;let G=Y.version==="draft-2020-12"?"$defs":"definitions";if(X[0]===G){let J=X[1];if(!J||!Y.defs[J])throw Error(`Reference not found: ${$}`);return Y.defs[J]}throw Error(`Reference not found: ${$}`)}function Hg1($,Y){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return e1.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let J=$.$ref;if(Y.refs.has(J))return Y.refs.get(J);if(Y.processing.has(J))return e1.lazy(()=>{if(!Y.refs.has(J))throw Error(`Circular reference not resolved: ${J}`);return Y.refs.get(J)});Y.processing.add(J);let Q=B28(J,Y),W=tX(Q,Y);return Y.refs.set(J,W),Y.processing.delete(J),W}if($.enum!==void 0){let J=$.enum;if(Y.version==="openapi-3.0"&&$.nullable===!0&&J.length===1&&J[0]===null)return e1.null();if(J.length===0)return e1.never();if(J.length===1)return e1.literal(J[0]);if(J.every((W)=>typeof W==="string"))return e1.enum(J);let Q=J.map((W)=>e1.literal(W));if(Q.length<2)return Q[0];return e1.union([Q[0],Q[1],...Q.slice(2)])}if($.const!==void 0)return e1.literal($.const);let X=$.type;if(Array.isArray(X)){let J=X.map((Q)=>{let W={...$,type:Q};return Hg1(W,Y)});if(J.length===0)return e1.never();if(J.length===1)return J[0];return e1.union(J)}if(!X)return e1.any();let G;switch(X){case"string":{let J=e1.string();if($.format){let Q=$.format;if(Q==="email")J=J.check(e1.email());else if(Q==="uri"||Q==="uri-reference")J=J.check(e1.url());else if(Q==="uuid"||Q==="guid")J=J.check(e1.uuid());else if(Q==="date-time")J=J.check(e1.iso.datetime());else if(Q==="date")J=J.check(e1.iso.date());else if(Q==="time")J=J.check(e1.iso.time());else if(Q==="duration")J=J.check(e1.iso.duration());else if(Q==="ipv4")J=J.check(e1.ipv4());else if(Q==="ipv6")J=J.check(e1.ipv6());else if(Q==="mac")J=J.check(e1.mac());else if(Q==="cidr")J=J.check(e1.cidrv4());else if(Q==="cidr-v6")J=J.check(e1.cidrv6());else if(Q==="base64")J=J.check(e1.base64());else if(Q==="base64url")J=J.check(e1.base64url());else if(Q==="e164")J=J.check(e1.e164());else if(Q==="jwt")J=J.check(e1.jwt());else if(Q==="emoji")J=J.check(e1.emoji());else if(Q==="nanoid")J=J.check(e1.nanoid());else if(Q==="cuid")J=J.check(e1.cuid());else if(Q==="cuid2")J=J.check(e1.cuid2());else if(Q==="ulid")J=J.check(e1.ulid());else if(Q==="xid")J=J.check(e1.xid());else if(Q==="ksuid")J=J.check(e1.ksuid())}if(typeof $.minLength==="number")J=J.min($.minLength);if(typeof $.maxLength==="number")J=J.max($.maxLength);if($.pattern)J=J.regex(new RegExp($.pattern));G=J;break}case"number":case"integer":{let J=X==="integer"?e1.number().int():e1.number();if(typeof $.minimum==="number")J=J.min($.minimum);if(typeof $.maximum==="number")J=J.max($.maximum);if(typeof $.exclusiveMinimum==="number")J=J.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")J=J.gt($.minimum);if(typeof $.exclusiveMaximum==="number")J=J.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")J=J.lt($.maximum);if(typeof $.multipleOf==="number")J=J.multipleOf($.multipleOf);G=J;break}case"boolean":{G=e1.boolean();break}case"null":{G=e1.null();break}case"object":{let J={},Q=$.properties||{},W=new Set($.required||[]);for(let[K,H]of Object.entries(Q)){let z=tX(H,Y);J[K]=W.has(K)?z:z.optional()}if($.propertyNames){let K=tX($.propertyNames,Y),H=$.additionalProperties&&typeof $.additionalProperties==="object"?tX($.additionalProperties,Y):e1.any();if(Object.keys(J).length===0){G=e1.record(K,H);break}let z=e1.object(J).passthrough(),V=e1.looseRecord(K,H);G=e1.intersection(z,V);break}if($.patternProperties){let K=$.patternProperties,H=Object.keys(K),z=[];for(let A of H){let F=tX(K[A],Y),N=e1.string().regex(new RegExp(A));z.push(e1.looseRecord(N,F))}let V=[];if(Object.keys(J).length>0)V.push(e1.object(J).passthrough());if(V.push(...z),V.length===0)G=e1.object({}).passthrough();else if(V.length===1)G=V[0];else{let A=e1.intersection(V[0],V[1]);for(let F=2;F<V.length;F++)A=e1.intersection(A,V[F]);G=A}break}let Z=e1.object(J);if($.additionalProperties===!1)G=Z.strict();else if(typeof $.additionalProperties==="object")G=Z.catchall(tX($.additionalProperties,Y));else G=Z.passthrough();break}case"array":{let{prefixItems:J,items:Q}=$;if(J&&Array.isArray(J)){let W=J.map((K)=>tX(K,Y)),Z=Q&&typeof Q==="object"&&!Array.isArray(Q)?tX(Q,Y):void 0;if(Z)G=e1.tuple(W).rest(Z);else G=e1.tuple(W);if(typeof $.minItems==="number")G=G.check(e1.minLength($.minItems));if(typeof $.maxItems==="number")G=G.check(e1.maxLength($.maxItems))}else if(Array.isArray(Q)){let W=Q.map((K)=>tX(K,Y)),Z=$.additionalItems&&typeof $.additionalItems==="object"?tX($.additionalItems,Y):void 0;if(Z)G=e1.tuple(W).rest(Z);else G=e1.tuple(W);if(typeof $.minItems==="number")G=G.check(e1.minLength($.minItems));if(typeof $.maxItems==="number")G=G.check(e1.maxLength($.maxItems))}else if(Q!==void 0){let W=tX(Q,Y),Z=e1.array(W);if(typeof $.minItems==="number")Z=Z.min($.minItems);if(typeof $.maxItems==="number")Z=Z.max($.maxItems);G=Z}else G=e1.array(e1.any());break}default:throw Error(`Unsupported type: ${X}`)}return G}function tX($,Y){if(typeof $==="boolean")return $?e1.any():e1.never();let X=Hg1($,Y),G=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let Z=$.anyOf.map((H)=>tX(H,Y)),K=e1.union(Z);X=G?e1.intersection(X,K):K}if($.oneOf&&Array.isArray($.oneOf)){let Z=$.oneOf.map((H)=>tX(H,Y)),K=e1.xor(Z);X=G?e1.intersection(X,K):K}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)X=G?X:e1.any();else{let Z=G?X:tX($.allOf[0],Y),K=G?0:1;for(let H=K;H<$.allOf.length;H++)Z=e1.intersection(Z,tX($.allOf[H],Y));X=Z}if($.nullable===!0&&Y.version==="openapi-3.0")X=e1.nullable(X);if($.readOnly===!0)X=e1.readonly(X);if($.default!==void 0)X=X.default($.default);let J={},Q=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let Z of Q)if(Z in $)J[Z]=$[Z];let W=["contentEncoding","contentMediaType","contentSchema"];for(let Z of W)if(Z in $)J[Z]=$[Z];for(let Z of Object.keys($))if(!N28.has(Z))J[Z]=$[Z];if(Object.keys(J).length>0)Y.registry.add(X,J);if($.description)X=X.describe($.description);return X}function xj0($,Y){if(typeof $==="boolean")return $?e1.any():e1.never();let X;try{X=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let G=L28(X,Y?.defaultTarget),J=X.$defs||X.definitions||{},Q={version:G,defs:J,refs:new Map,processing:new Set,rootSchema:X,registry:Y?.registry??fY};return tX(X,Q)}var e1,N28;var zg1=V0(()=>{wb();d00();Gh();Qh();e1={...Jh,...p00,iso:Mz},N28=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"])});var oP={};W8(oP,{string:()=>O28,number:()=>E28,date:()=>q28,boolean:()=>M28,bigint:()=>R28});function O28($){return ww0(Rz,$)}function E28($){return Sw0(Iz,$)}function M28($){return kw0($O,$)}function R28($){return vw0(YO,$)}function q28($){return xw0(IF,$)}var Vg1=V0(()=>{sX();Qh()});var U={};W8(U,{xor:()=>Aj0,xid:()=>g_0,void:()=>Uj0,uuidv7:()=>k_0,uuidv6:()=>S_0,uuidv4:()=>C_0,uuid:()=>T_0,util:()=>V1,url:()=>qz,uppercase:()=>mB,unknown:()=>u9,union:()=>p9,undefined:()=>Kj0,ulid:()=>f_0,uint64:()=>Wj0,uint32:()=>Gj0,tuple:()=>z10,trim:()=>iB,treeifyError:()=>ft,transform:()=>Th,toUpperCase:()=>rB,toLowerCase:()=>nB,toJSONSchema:()=>$$,templateLiteral:()=>Pj0,symbol:()=>Zj0,superRefine:()=>b10,success:()=>Mj0,stringbool:()=>kj0,stringFormat:()=>s_0,string:()=>j0,strictObject:()=>Vj0,startsWith:()=>pB,slugify:()=>aB,size:()=>LF,setErrorMap:()=>Zg1,set:()=>Lj0,safeParseAsync:()=>oX,safeParse:()=>i00,safeEncodeAsync:()=>e00,safeEncode:()=>o00,safeDecodeAsync:()=>$10,safeDecode:()=>t00,registry:()=>Pb,regexes:()=>mG,regex:()=>fB,refine:()=>y10,record:()=>q9,readonly:()=>T10,property:()=>ob,promise:()=>wj0,prettifyError:()=>gt,preprocess:()=>sP,prefault:()=>M10,positive:()=>nb,pipe:()=>Zh,partialRecord:()=>Fj0,parseAsync:()=>l00,parse:()=>c00,overwrite:()=>uZ,optional:()=>z5,object:()=>v1,number:()=>H8,nullish:()=>Ej0,nullable:()=>gP,null:()=>pP,normalize:()=>lB,nonpositive:()=>ab,nonoptional:()=>R10,nonnegative:()=>sb,never:()=>jh,negative:()=>rb,nativeEnum:()=>Bj0,nanoid:()=>y_0,nan:()=>Rj0,multipleOf:()=>Oz,minSize:()=>zK,minLength:()=>zU,mime:()=>cB,meta:()=>Cj0,maxSize:()=>Ez,maxLength:()=>BF,map:()=>Nj0,mac:()=>p_0,lte:()=>UQ,lt:()=>UK,lowercase:()=>gB,looseRecord:()=>Dj0,looseObject:()=>Y$,locales:()=>hB,literal:()=>L4,length:()=>OF,lazy:()=>k10,ksuid:()=>m_0,keyof:()=>zj0,jwt:()=>a_0,json:()=>vj0,iso:()=>Mz,ipv6:()=>d_0,ipv4:()=>u_0,invertCodec:()=>Ij0,intersection:()=>GO,int64:()=>Qj0,int32:()=>Xj0,int:()=>Wh,instanceof:()=>Sj0,includes:()=>uB,httpUrl:()=>v_0,hostname:()=>o_0,hex:()=>t_0,hash:()=>e_0,guid:()=>j_0,gte:()=>aX,gt:()=>HK,globalRegistry:()=>fY,getErrorMap:()=>Kg1,function:()=>_j0,fromJSONSchema:()=>xj0,formatError:()=>IP,float64:()=>Yj0,float32:()=>$j0,flattenError:()=>qP,file:()=>Oj0,exactOptional:()=>B10,enum:()=>gY,endsWith:()=>dB,encodeAsync:()=>a00,encode:()=>n00,emoji:()=>x_0,email:()=>__0,e164:()=>r_0,discriminatedUnion:()=>cP,describe:()=>Tj0,decodeAsync:()=>s00,decode:()=>r00,date:()=>Hj0,custom:()=>Sh,cuid2:()=>h_0,cuid:()=>b_0,core:()=>pZ,config:()=>k7,coerce:()=>oP,codec:()=>qj0,clone:()=>hY,cidrv6:()=>l_0,cidrv4:()=>c_0,check:()=>jj0,catch:()=>P10,boolean:()=>U9,bigint:()=>Jj0,base64url:()=>n_0,base64:()=>i_0,array:()=>b1,any:()=>_h,_function:()=>_j0,_default:()=>O10,_ZodString:()=>Uh,ZodXor:()=>K10,ZodXID:()=>Nh,ZodVoid:()=>Z10,ZodUnknown:()=>Q10,ZodUnion:()=>PF,ZodUndefined:()=>G10,ZodUUID:()=>VK,ZodURL:()=>mP,ZodULID:()=>Dh,ZodType:()=>j6,ZodTuple:()=>H10,ZodTransform:()=>N10,ZodTemplateLiteral:()=>C10,ZodSymbol:()=>X10,ZodSuccess:()=>q10,ZodStringFormat:()=>m9,ZodString:()=>Rz,ZodSet:()=>A10,ZodRecord:()=>oB,ZodRealError:()=>pG,ZodReadonly:()=>j10,ZodPromise:()=>v10,ZodPreprocess:()=>_10,ZodPrefault:()=>E10,ZodPipe:()=>nP,ZodOptional:()=>wz,ZodObject:()=>Pz,ZodNumberFormat:()=>qF,ZodNumber:()=>Iz,ZodNullable:()=>lP,ZodNull:()=>uP,ZodNonOptional:()=>Ch,ZodNever:()=>W10,ZodNanoID:()=>Vh,ZodNaN:()=>w10,ZodMap:()=>V10,ZodMAC:()=>Y10,ZodLiteral:()=>F10,ZodLazy:()=>S10,ZodKSUID:()=>Lh,ZodJWT:()=>Ph,ZodIssueCode:()=>f10,ZodIntersection:()=>XO,ZodISOTime:()=>Yh,ZodISODuration:()=>Xh,ZodISODateTime:()=>eb,ZodISODate:()=>$h,ZodIPv6:()=>Oh,ZodIPv4:()=>Bh,ZodGUID:()=>fP,ZodFunction:()=>x10,ZodFirstPartyTypeKind:()=>h10,ZodFile:()=>D10,ZodExactOptional:()=>L10,ZodError:()=>Qg1,ZodEnum:()=>tB,ZodEmoji:()=>zh,ZodEmail:()=>Hh,ZodE164:()=>Ih,ZodDiscriminatedUnion:()=>U10,ZodDefault:()=>iP,ZodDate:()=>IF,ZodCustomStringFormat:()=>eB,ZodCustom:()=>aP,ZodCodec:()=>rP,ZodCatch:()=>I10,ZodCUID2:()=>Fh,ZodCUID:()=>Ah,ZodCIDRv6:()=>Mh,ZodCIDRv4:()=>Eh,ZodBoolean:()=>$O,ZodBigIntFormat:()=>wh,ZodBigInt:()=>YO,ZodBase64URL:()=>qh,ZodBase64:()=>Rh,ZodArray:()=>dP,ZodAny:()=>J10,TimePrecision:()=>V00,NEVER:()=>OP,$output:()=>K00,$input:()=>U00,$brand:()=>xt});var kh=V0(()=>{sX();sX();bP0();sX();hP();zg1();Z00();Gh();Gh();Vg1();Qh();d00();P_0();w_0();Ug1();k7(Mb())});var KY=V0(()=>{kh();kh()});function g10($,Y){if(!$)return Y;if(!Y)return $;return{...$,...Y,agents:{...$.agents,...Y.agents}}}var eX="mastra__resourceId",DX="mastra__threadId",vh="mastra__versions",p1=class{registry=new Map;constructor($){if($&&typeof $==="object"&&typeof $[Symbol.iterator]!=="function")this.registry=new Map(Object.entries($));else this.registry=new Map($)}set($,Y){this.registry.set($,Y)}get($){return this.registry.get($)}has($){return this.registry.has($)}delete($){return this.registry.delete($)}clear(){this.registry.clear()}keys(){return this.registry.keys()}values(){return this.registry.values()}entries(){return this.registry.entries()}size(){return this.registry.size}forEach($){this.registry.forEach($)}toJSON(){let $={};for(let[Y,X]of this.registry.entries())if(this.isSerializable(X))$[Y]=X;return $}isSerializable($){if($===null||$===void 0)return!0;if(typeof $==="function")return!1;if(typeof $==="symbol")return!1;if(typeof $!=="object")return!0;try{return JSON.stringify($),!0}catch{return!1}}get all(){return Object.fromEntries(this.registry)}};var wF=()=>{};function bj0($){return $ in yj0}function Bg1($){return $.every(bj0)}function hj0($){let Y=$??process.env.MASTRA_EE_LICENSE;if(!Y)return{valid:!1};if(Y.length<32)return{valid:!1};return{valid:!0,features:["user","session","sso","rbac","acl","fga","agent-builder"],tier:"enterprise"}}function eP(){let $=Date.now();if(JO&&$-Ag1<I28)return JO.valid;if(JO=hj0(),Ag1=$,!JO.valid&&process.env.MASTRA_EE_LICENSE)console.warn("[mastra/auth-ee] Invalid or expired EE license. EE features are disabled.");return JO.valid}function Eg1($){if(!eP())return!1;if(!JO?.features)return!0;return JO.features.includes($)}function p10(){return process.env.MASTRA_DEV==="true"||process.env.MASTRA_DEV==="1"||!1}function Mg1(){if(p10())return!0;return eP()}function Rg1($){return"user"in $&&$.user!==null}function _F($,Y){return $!==null&&typeof $==="object"&&Y in $}function P28($){if(!$||typeof $!=="object")return!1;return"isMastraCloudAuth"in $&&$.isMastraCloudAuth===!0}function w28($){if(!$||typeof $!=="object")return!1;return"isSimpleAuth"in $&&$.isSimpleAuth===!0}function Fg1($){return $.some((Y)=>Y==="*"||Y==="*:*")}async function qg1($,Y,X){if(!$)return{enabled:!1,login:null};let G=eP(),J=P28($),Q=w28($),W=p10(),Z=G||J||Q||W,K=null,H=_F($,"getLoginUrl")&&Z,z=_F($,"signIn")&&Z,V=(X?.apiPrefix||"/api").trim(),A=V.startsWith("/")?V:`/${V}`,N=`${A.endsWith("/")?A.slice(0,-1):A}/auth/sso/login`,D=!0;if(_F($,"signIn")){let w=$;if(typeof w.isSignUpEnabled==="function")D=w.isSignUpEnabled()}if(H&&z){let w=$.getLoginButtonConfig();K={type:"both",signUpEnabled:D,description:w.description,sso:{...w,url:N}}}else if(H){let w=$.getLoginButtonConfig();K={type:"sso",description:w.description,sso:{...w,url:N}}}else if(z)K={type:"credentials",signUpEnabled:D};let L=null;if(_F($,"getCurrentUser")&&Z)try{L=await $.getCurrentUser(Y)}catch{L=null}if(!L)return{enabled:!0,login:K};let B=X?.rbac,O=!!B&&Z,E=!!X?.fga&&Z,M={user:_F($,"getCurrentUser")&&Z,session:_F($,"createSession")&&Z,sso:_F($,"getLoginUrl")&&Z,rbac:O,acl:_F($,"canAccess")&&Z,fga:E},R=null;if(O&&B)try{let w=await B.getRoles(L),I=await B.getPermissions(L);R={roles:w,permissions:I}}catch{R=null}let q;if(R&&B?.getAvailableRoles){if(Fg1(R.permissions))try{let w=await B.getAvailableRoles(),I=B.getPermissionsForRole;if(I)q=(await Promise.allSettled(w.map(async(_)=>({role:_,perms:await I(_.id)})))).flatMap((_)=>{if(_.status!=="fulfilled")return console.warn("[auth/ee] failed to list permissions for role:",_.reason),[];return Fg1(_.value.perms)?[]:[_.value.role]});else q=w}catch(w){console.warn("[auth/ee] failed to list available roles for admin user:",w)}}return{enabled:!0,login:K,user:{id:L.id,email:L.email,name:L.name,avatarUrl:L.avatarUrl},capabilities:M,access:R,availableRoles:q}}function Ig1($){return d10.find((Y)=>Y.id===$)}function m10($,Y=d10){let X=new Set,G=new Set;function J(Q){if(G.has(Q))return;G.add(Q);let W=Y.find((Z)=>Z.id===Q);if(!W)return;for(let Z of W.permissions)X.add(Z);if(W.inherits)for(let Z of W.inherits)J(Z)}for(let Q of $)J(Q);return Array.from(X)}function QO($,Y){if($==="*")return!0;let X=$.split(":"),G=Y.split(":"),J=_28[X[0]??""];if(J&&J.includes(G[0]??"")){let V=[G[0],...X.slice(1)].join(":");return QO(V,Y)}if(X.length<2||G.length<2)return $===Y;let[Q,W,Z]=X,[K,H,z]=G;if(Q==="*"){if(W==="*"){if(Z===void 0)return!0;return Z===z}if(W!==H)return!1;if(Z===void 0)return!0;return Z===z}if(Q!==K)return!1;if(W==="*"){if(Z===void 0)return!0;return Z===z}if(W!==H)return!1;if(Z===void 0)return!0;return Z===z}function Pg1($,Y){return $.some((X)=>QO(X,Y))}function u10($,Y){let X=new Set,G=Y._default??[];for(let J of $){let Q=Y[J];if(Q)for(let W of Q)X.add(W);else for(let W of G)X.add(W)}return Array.from(X)}var Dg1,Ng1,yj0,Lg1,_z,JO=null,Ag1=0,I28=60000,Og1,d10,_28,wg1=class{roles;_roleMapping;getUserRolesFn;permissionCache=new Map;get roleMapping(){return this._roleMapping}constructor($){if("roles"in $&&$.roles)this.roles=$.roles;if("roleMapping"in $&&$.roleMapping)this._roleMapping=$.roleMapping;this.getUserRolesFn=$.getUserRoles}async getRoles($){return await this.getUserRolesFn($)}async hasRole($,Y){return(await this.getRoles($)).includes(Y)}async getPermissions($){let Y=await this.getRoles($),X=Y.sort().join(","),G=this.permissionCache.get(X);if(G)return G;let J;if(this._roleMapping)J=u10(Y,this._roleMapping);else if(this.roles)J=m10(Y,this.roles);else J=[];return this.permissionCache.set(X,J),J}async hasPermission($,Y){return(await this.getPermissions($)).some((G)=>QO(G,Y))}async hasAllPermissions($,Y){let X=await this.getPermissions($);return Y.every((G)=>X.some((J)=>QO(J,G)))}async hasAnyPermission($,Y){let X=await this.getPermissions($);return Y.some((G)=>X.some((J)=>QO(J,G)))}clearCache(){this.permissionCache.clear()}getRoleDefinitions(){return this.roles??[]}getRoleDefinition($){return this.roles?.find((Y)=>Y.id===$)}async getAvailableRoles(){if(this.roles)return this.roles.map(($)=>({id:$.id,name:$.name}));if(this._roleMapping)return Object.keys(this._roleMapping).filter(($)=>$!=="_default").map(($)=>({id:$,name:$}));return[]}async getPermissionsForRole($){if(this._roleMapping)return u10([$],this._roleMapping);if(this.roles)return m10([$],this.roles);return[]}};var fj0=V0(()=>{Dg1=["a2a","agent-builder","agents","auth","background-tasks","channels","datasets","embedders","experiments","infrastructure","logs","mcp","memory","observability","processor-providers","processors","schedules","scores","stored-agents","stored-mcp-clients","stored-prompt-blocks","stored-scorers","stored-skills","stored-workspaces","system","tool-providers","tools","vector","vectors","workflows","workspaces"],Ng1=["create","delete","execute","publish","read","share","write"],yj0={"*":"*","*:create":"*:create","*:delete":"*:delete","*:execute":"*:execute","*:publish":"*:publish","*:read":"*:read","*:share":"*:share","*:write":"*:write","a2a:*":"a2a:*","agent-builder:*":"agent-builder:*","agents:*":"agents:*","auth:*":"auth:*","background-tasks:*":"background-tasks:*","channels:*":"channels:*","datasets:*":"datasets:*","embedders:*":"embedders:*","experiments:*":"experiments:*","infrastructure:*":"infrastructure:*","logs:*":"logs:*","mcp:*":"mcp:*","memory:*":"memory:*","observability:*":"observability:*","processor-providers:*":"processor-providers:*","processors:*":"processors:*","schedules:*":"schedules:*","scores:*":"scores:*","stored-agents:*":"stored-agents:*","stored-mcp-clients:*":"stored-mcp-clients:*","stored-prompt-blocks:*":"stored-prompt-blocks:*","stored-scorers:*":"stored-scorers:*","stored-skills:*":"stored-skills:*","stored-workspaces:*":"stored-workspaces:*","system:*":"system:*","tool-providers:*":"tool-providers:*","tools:*":"tools:*","vector:*":"vector:*","vectors:*":"vectors:*","workflows:*":"workflows:*","workspaces:*":"workspaces:*","a2a:read":"a2a:read","a2a:write":"a2a:write","agent-builder:execute":"agent-builder:execute","agent-builder:read":"agent-builder:read","agent-builder:write":"agent-builder:write","agents:create":"agents:create","agents:delete":"agents:delete","agents:execute":"agents:execute","agents:read":"agents:read","agents:write":"agents:write","auth:read":"auth:read","background-tasks:read":"background-tasks:read","channels:read":"channels:read","channels:write":"channels:write","datasets:delete":"datasets:delete","datasets:execute":"datasets:execute","datasets:read":"datasets:read","datasets:write":"datasets:write","embedders:read":"embedders:read","experiments:read":"experiments:read","infrastructure:read":"infrastructure:read","logs:read":"logs:read","mcp:execute":"mcp:execute","mcp:read":"mcp:read","mcp:write":"mcp:write","memory:delete":"memory:delete","memory:execute":"memory:execute","memory:read":"memory:read","memory:write":"memory:write","observability:read":"observability:read","observability:write":"observability:write","processor-providers:read":"processor-providers:read","processors:execute":"processors:execute","processors:read":"processors:read","schedules:execute":"schedules:execute","schedules:read":"schedules:read","schedules:write":"schedules:write","scores:read":"scores:read","scores:write":"scores:write","stored-agents:delete":"stored-agents:delete","stored-agents:publish":"stored-agents:publish","stored-agents:read":"stored-agents:read","stored-agents:share":"stored-agents:share","stored-agents:write":"stored-agents:write","stored-mcp-clients:delete":"stored-mcp-clients:delete","stored-mcp-clients:publish":"stored-mcp-clients:publish","stored-mcp-clients:read":"stored-mcp-clients:read","stored-mcp-clients:write":"stored-mcp-clients:write","stored-prompt-blocks:delete":"stored-prompt-blocks:delete","stored-prompt-blocks:publish":"stored-prompt-blocks:publish","stored-prompt-blocks:read":"stored-prompt-blocks:read","stored-prompt-blocks:write":"stored-prompt-blocks:write","stored-scorers:delete":"stored-scorers:delete","stored-scorers:publish":"stored-scorers:publish","stored-scorers:read":"stored-scorers:read","stored-scorers:write":"stored-scorers:write","stored-skills:delete":"stored-skills:delete","stored-skills:publish":"stored-skills:publish","stored-skills:read":"stored-skills:read","stored-skills:share":"stored-skills:share","stored-skills:write":"stored-skills:write","stored-workspaces:delete":"stored-workspaces:delete","stored-workspaces:read":"stored-workspaces:read","stored-workspaces:write":"stored-workspaces:write","system:read":"system:read","tool-providers:read":"tool-providers:read","tools:execute":"tools:execute","tools:read":"tools:read","vector:delete":"vector:delete","vector:execute":"vector:execute","vector:read":"vector:read","vector:write":"vector:write","vectors:read":"vectors:read","workflows:delete":"workflows:delete","workflows:execute":"workflows:execute","workflows:read":"workflows:read","workflows:write":"workflows:write","workspaces:delete":"workspaces:delete","workspaces:read":"workspaces:read","workspaces:write":"workspaces:write","stored:*":"stored:*","stored:read":"stored:read","stored:write":"stored:write","stored:delete":"stored:delete"},Lg1=["a2a:read","a2a:write","agent-builder:execute","agent-builder:read","agent-builder:write","agents:create","agents:delete","agents:execute","agents:read","agents:write","auth:read","background-tasks:read","channels:read","channels:write","datasets:delete","datasets:execute","datasets:read","datasets:write","embedders:read","experiments:read","infrastructure:read","logs:read","mcp:execute","mcp:read","mcp:write","memory:delete","memory:execute","memory:read","memory:write","observability:read","observability:write","processor-providers:read","processors:execute","processors:read","schedules:execute","schedules:read","schedules:write","scores:read","scores:write","stored-agents:delete","stored-agents:publish","stored-agents:read","stored-agents:share","stored-agents:write","stored-mcp-clients:delete","stored-mcp-clients:publish","stored-mcp-clients:read","stored-mcp-clients:write","stored-prompt-blocks:delete","stored-prompt-blocks:publish","stored-prompt-blocks:read","stored-prompt-blocks:write","stored-scorers:delete","stored-scorers:publish","stored-scorers:read","stored-scorers:write","stored-skills:delete","stored-skills:publish","stored-skills:read","stored-skills:share","stored-skills:write","stored-workspaces:delete","stored-workspaces:read","stored-workspaces:write","system:read","tool-providers:read","tools:execute","tools:read","vector:delete","vector:execute","vector:read","vector:write","vectors:read","workflows:delete","workflows:execute","workflows:read","workflows:write","workspaces:delete","workspaces:read","workspaces:write"],_z={A2A_READ:"a2a:read",A2A_WRITE:"a2a:write",AGENT_BUILDER_EXECUTE:"agent-builder:execute",AGENT_BUILDER_READ:"agent-builder:read",AGENT_BUILDER_WRITE:"agent-builder:write",AGENTS_CREATE:"agents:create",AGENTS_DELETE:"agents:delete",AGENTS_EXECUTE:"agents:execute",AGENTS_READ:"agents:read",AGENTS_WRITE:"agents:write",AUTH_READ:"auth:read",BACKGROUND_TASKS_READ:"background-tasks:read",CHANNELS_READ:"channels:read",CHANNELS_WRITE:"channels:write",DATASETS_DELETE:"datasets:delete",DATASETS_EXECUTE:"datasets:execute",DATASETS_READ:"datasets:read",DATASETS_WRITE:"datasets:write",EMBEDDERS_READ:"embedders:read",EXPERIMENTS_READ:"experiments:read",INFRASTRUCTURE_READ:"infrastructure:read",LOGS_READ:"logs:read",MCP_EXECUTE:"mcp:execute",MCP_READ:"mcp:read",MCP_WRITE:"mcp:write",MEMORY_DELETE:"memory:delete",MEMORY_EXECUTE:"memory:execute",MEMORY_READ:"memory:read",MEMORY_WRITE:"memory:write",OBSERVABILITY_READ:"observability:read",OBSERVABILITY_WRITE:"observability:write",PROCESSOR_PROVIDERS_READ:"processor-providers:read",PROCESSORS_EXECUTE:"processors:execute",PROCESSORS_READ:"processors:read",SCHEDULES_EXECUTE:"schedules:execute",SCHEDULES_READ:"schedules:read",SCHEDULES_WRITE:"schedules:write",SCORES_READ:"scores:read",SCORES_WRITE:"scores:write",STORED_AGENTS_DELETE:"stored-agents:delete",STORED_AGENTS_PUBLISH:"stored-agents:publish",STORED_AGENTS_READ:"stored-agents:read",STORED_AGENTS_SHARE:"stored-agents:share",STORED_AGENTS_WRITE:"stored-agents:write",STORED_MCP_CLIENTS_DELETE:"stored-mcp-clients:delete",STORED_MCP_CLIENTS_PUBLISH:"stored-mcp-clients:publish",STORED_MCP_CLIENTS_READ:"stored-mcp-clients:read",STORED_MCP_CLIENTS_WRITE:"stored-mcp-clients:write",STORED_PROMPT_BLOCKS_DELETE:"stored-prompt-blocks:delete",STORED_PROMPT_BLOCKS_PUBLISH:"stored-prompt-blocks:publish",STORED_PROMPT_BLOCKS_READ:"stored-prompt-blocks:read",STORED_PROMPT_BLOCKS_WRITE:"stored-prompt-blocks:write",STORED_SCORERS_DELETE:"stored-scorers:delete",STORED_SCORERS_PUBLISH:"stored-scorers:publish",STORED_SCORERS_READ:"stored-scorers:read",STORED_SCORERS_WRITE:"stored-scorers:write",STORED_SKILLS_DELETE:"stored-skills:delete",STORED_SKILLS_PUBLISH:"stored-skills:publish",STORED_SKILLS_READ:"stored-skills:read",STORED_SKILLS_SHARE:"stored-skills:share",STORED_SKILLS_WRITE:"stored-skills:write",STORED_WORKSPACES_DELETE:"stored-workspaces:delete",STORED_WORKSPACES_READ:"stored-workspaces:read",STORED_WORKSPACES_WRITE:"stored-workspaces:write",SYSTEM_READ:"system:read",TOOL_PROVIDERS_READ:"tool-providers:read",TOOLS_EXECUTE:"tools:execute",TOOLS_READ:"tools:read",VECTOR_DELETE:"vector:delete",VECTOR_EXECUTE:"vector:execute",VECTOR_READ:"vector:read",VECTOR_WRITE:"vector:write",VECTORS_READ:"vectors:read",WORKFLOWS_DELETE:"workflows:delete",WORKFLOWS_EXECUTE:"workflows:execute",WORKFLOWS_READ:"workflows:read",WORKFLOWS_WRITE:"workflows:write",WORKSPACES_DELETE:"workspaces:delete",WORKSPACES_READ:"workspaces:read",WORKSPACES_WRITE:"workspaces:write"};Og1=eP;d10=[{id:"owner",name:"Owner",description:"Full access to all features and settings",permissions:["*"]},{id:"admin",name:"Admin",description:"Manage agents, workflows, and team members",permissions:["*:read","*:write","*:execute","*:publish","*:share"]},{id:"member",name:"Member",description:"Execute agents and workflows",permissions:["*:read","*:execute"]},{id:"viewer",name:"Viewer",description:"Read-only access",permissions:["*:read"]}];_28={stored:["stored-agents","stored-mcp-clients","stored-prompt-blocks","stored-scorers","stored-skills","stored-workspaces"]}});var AK,dG,j28=class{name;level;transports;constructor($={}){this.name=$.name||"Mastra",this.level=$.level||dG.ERROR,this.transports=new Map(Object.entries($.transports||{}))}getTransports(){return this.transports}trackException($,Y){}async listLogs($,Y){if(!$||!this.transports.has($))return{logs:[],total:0,page:Y?.page??1,perPage:Y?.perPage??100,hasMore:!1};return this.transports.get($).listLogs(Y)??{logs:[],total:0,page:Y?.page??1,perPage:Y?.perPage??100,hasMore:!1}}async listLogsByRunId({transportId:$,runId:Y,fromDate:X,toDate:G,logLevel:J,filters:Q,page:W,perPage:Z}){if(!$||!this.transports.has($)||!Y)return{logs:[],total:0,page:W??1,perPage:Z??100,hasMore:!1};return this.transports.get($).listLogsByRunId({runId:Y,fromDate:X,toDate:G,logLevel:J,filters:Q,page:W,perPage:Z})??{logs:[],total:0,page:W??1,perPage:Z??100,hasMore:!1}}},VU;var xh=V0(()=>{AK={AGENT:"AGENT",OBSERVABILITY:"OBSERVABILITY",AUTH:"AUTH",BROWSER:"BROWSER",NETWORK:"NETWORK",WORKFLOW:"WORKFLOW",LLM:"LLM",TTS:"TTS",VOICE:"VOICE",VECTOR:"VECTOR",BUNDLER:"BUNDLER",DEPLOYER:"DEPLOYER",MEMORY:"MEMORY",STORAGE:"STORAGE",EMBEDDINGS:"EMBEDDINGS",MCP_SERVER:"MCP_SERVER",SERVER_CACHE:"SERVER_CACHE",SERVER:"SERVER",WORKSPACE:"WORKSPACE",CHANNEL:"CHANNEL"},dG={DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error",NONE:"silent"},VU=class $ extends j28{component;filter;constructor(Y={}){super(Y);this.component=Y.component,this.filter=Y.filter}child(Y){let X=typeof Y==="string"?Y:Y?.component??this.component;return new $({name:this.name,level:this.level,component:X,filter:this.filter})}shouldLog(Y,X,G){if(!this.filter)return!0;try{return this.filter({component:this.component,level:Y,message:X,args:G})}catch(J){return console.error(`[Logger] Filter error for component=${this.component} level=${Y}:`,J),!0}}prefix(){return this.component?`[${this.component}] `:""}debug(Y,...X){if(this.level===dG.DEBUG&&this.shouldLog(dG.DEBUG,Y,X))console.info(`${this.prefix()}${Y}`,...X)}info(Y,...X){if((this.level===dG.INFO||this.level===dG.DEBUG)&&this.shouldLog(dG.INFO,Y,X))console.info(`${this.prefix()}${Y}`,...X)}warn(Y,...X){if((this.level===dG.WARN||this.level===dG.INFO||this.level===dG.DEBUG)&&this.shouldLog(dG.WARN,Y,X))console.info(`${this.prefix()}${Y}`,...X)}error(Y,...X){if((this.level===dG.ERROR||this.level===dG.WARN||this.level===dG.INFO||this.level===dG.DEBUG)&&this.shouldLog(dG.ERROR,Y,X))console.error(`${this.prefix()}${Y}`,...X)}async listLogs(Y,X){return{logs:[],total:0,page:X?.page??1,perPage:X?.perPage??100,hasMore:!1}}async listLogsByRunId(Y){return{logs:[],total:0,page:Y.page??1,perPage:Y.perPage??100,hasMore:!1}}}});var u8=class{component=AK.LLM;logger;name;#$;constructor({component:$,name:Y,rawConfig:X}){this.component=$||AK.LLM,this.name=Y,this.#$=X,this.logger=new VU({name:`${this.component} - ${this.name}`})}toRawConfig(){return this.#$}__setRawConfig($){this.#$=$}__setLogger($){this.logger="child"in $&&typeof $.child==="function"?$.child({component:this.component}):$}};var dZ=V0(()=>{xh()});var _g1;var gj0=V0(()=>{kh();kh();_g1=U});var AU={};W8(AU,{z:()=>U,xor:()=>Aj0,xid:()=>g_0,void:()=>Uj0,uuidv7:()=>k_0,uuidv6:()=>S_0,uuidv4:()=>C_0,uuid:()=>T_0,util:()=>V1,url:()=>qz,uppercase:()=>mB,unknown:()=>u9,union:()=>p9,undefined:()=>Kj0,ulid:()=>f_0,uint64:()=>Wj0,uint32:()=>Gj0,tuple:()=>z10,trim:()=>iB,treeifyError:()=>ft,transform:()=>Th,toUpperCase:()=>rB,toLowerCase:()=>nB,toJSONSchema:()=>$$,templateLiteral:()=>Pj0,symbol:()=>Zj0,superRefine:()=>b10,success:()=>Mj0,stringbool:()=>kj0,stringFormat:()=>s_0,string:()=>j0,strictObject:()=>Vj0,startsWith:()=>pB,slugify:()=>aB,size:()=>LF,setErrorMap:()=>Zg1,set:()=>Lj0,safeParseAsync:()=>oX,safeParse:()=>i00,safeEncodeAsync:()=>e00,safeEncode:()=>o00,safeDecodeAsync:()=>$10,safeDecode:()=>t00,registry:()=>Pb,regexes:()=>mG,regex:()=>fB,refine:()=>y10,record:()=>q9,readonly:()=>T10,property:()=>ob,promise:()=>wj0,prettifyError:()=>gt,preprocess:()=>sP,prefault:()=>M10,positive:()=>nb,pipe:()=>Zh,partialRecord:()=>Fj0,parseAsync:()=>l00,parse:()=>c00,overwrite:()=>uZ,optional:()=>z5,object:()=>v1,number:()=>H8,nullish:()=>Ej0,nullable:()=>gP,null:()=>pP,normalize:()=>lB,nonpositive:()=>ab,nonoptional:()=>R10,nonnegative:()=>sb,never:()=>jh,negative:()=>rb,nativeEnum:()=>Bj0,nanoid:()=>y_0,nan:()=>Rj0,multipleOf:()=>Oz,minSize:()=>zK,minLength:()=>zU,mime:()=>cB,meta:()=>Cj0,maxSize:()=>Ez,maxLength:()=>BF,map:()=>Nj0,mac:()=>p_0,lte:()=>UQ,lt:()=>UK,lowercase:()=>gB,looseRecord:()=>Dj0,looseObject:()=>Y$,locales:()=>hB,literal:()=>L4,length:()=>OF,lazy:()=>k10,ksuid:()=>m_0,keyof:()=>zj0,jwt:()=>a_0,json:()=>vj0,iso:()=>Mz,ipv6:()=>d_0,ipv4:()=>u_0,invertCodec:()=>Ij0,intersection:()=>GO,int64:()=>Qj0,int32:()=>Xj0,int:()=>Wh,instanceof:()=>Sj0,includes:()=>uB,httpUrl:()=>v_0,hostname:()=>o_0,hex:()=>t_0,hash:()=>e_0,guid:()=>j_0,gte:()=>aX,gt:()=>HK,globalRegistry:()=>fY,getErrorMap:()=>Kg1,function:()=>_j0,fromJSONSchema:()=>xj0,formatError:()=>IP,float64:()=>Yj0,float32:()=>$j0,flattenError:()=>qP,file:()=>Oj0,exactOptional:()=>B10,enum:()=>gY,endsWith:()=>dB,encodeAsync:()=>a00,encode:()=>n00,emoji:()=>x_0,email:()=>__0,e164:()=>r_0,discriminatedUnion:()=>cP,describe:()=>Tj0,default:()=>T28,decodeAsync:()=>s00,decode:()=>r00,date:()=>Hj0,custom:()=>Sh,cuid2:()=>h_0,cuid:()=>b_0,core:()=>pZ,config:()=>k7,coerce:()=>oP,codec:()=>qj0,clone:()=>hY,cidrv6:()=>l_0,cidrv4:()=>c_0,check:()=>jj0,catch:()=>P10,boolean:()=>U9,bigint:()=>Jj0,base64url:()=>n_0,base64:()=>i_0,array:()=>b1,any:()=>_h,_function:()=>_j0,_default:()=>O10,_ZodString:()=>Uh,ZodXor:()=>K10,ZodXID:()=>Nh,ZodVoid:()=>Z10,ZodUnknown:()=>Q10,ZodUnion:()=>PF,ZodUndefined:()=>G10,ZodUUID:()=>VK,ZodURL:()=>mP,ZodULID:()=>Dh,ZodType:()=>j6,ZodTuple:()=>H10,ZodTransform:()=>N10,ZodTemplateLiteral:()=>C10,ZodSymbol:()=>X10,ZodSuccess:()=>q10,ZodStringFormat:()=>m9,ZodString:()=>Rz,ZodSet:()=>A10,ZodRecord:()=>oB,ZodRealError:()=>pG,ZodReadonly:()=>j10,ZodPromise:()=>v10,ZodPreprocess:()=>_10,ZodPrefault:()=>E10,ZodPipe:()=>nP,ZodOptional:()=>wz,ZodObject:()=>Pz,ZodNumberFormat:()=>qF,ZodNumber:()=>Iz,ZodNullable:()=>lP,ZodNull:()=>uP,ZodNonOptional:()=>Ch,ZodNever:()=>W10,ZodNanoID:()=>Vh,ZodNaN:()=>w10,ZodMap:()=>V10,ZodMAC:()=>Y10,ZodLiteral:()=>F10,ZodLazy:()=>S10,ZodKSUID:()=>Lh,ZodJWT:()=>Ph,ZodIssueCode:()=>f10,ZodIntersection:()=>XO,ZodISOTime:()=>Yh,ZodISODuration:()=>Xh,ZodISODateTime:()=>eb,ZodISODate:()=>$h,ZodIPv6:()=>Oh,ZodIPv4:()=>Bh,ZodGUID:()=>fP,ZodFunction:()=>x10,ZodFirstPartyTypeKind:()=>h10,ZodFile:()=>D10,ZodExactOptional:()=>L10,ZodError:()=>Qg1,ZodEnum:()=>tB,ZodEmoji:()=>zh,ZodEmail:()=>Hh,ZodE164:()=>Ih,ZodDiscriminatedUnion:()=>U10,ZodDefault:()=>iP,ZodDate:()=>IF,ZodCustomStringFormat:()=>eB,ZodCustom:()=>aP,ZodCodec:()=>rP,ZodCatch:()=>I10,ZodCUID2:()=>Fh,ZodCUID:()=>Ah,ZodCIDRv6:()=>Mh,ZodCIDRv4:()=>Eh,ZodBoolean:()=>$O,ZodBigIntFormat:()=>wh,ZodBigInt:()=>YO,ZodBase64URL:()=>qh,ZodBase64:()=>Rh,ZodArray:()=>dP,ZodAny:()=>J10,TimePrecision:()=>V00,NEVER:()=>OP,$output:()=>K00,$input:()=>U00,$brand:()=>xt});var T28;var O1=V0(()=>{gj0();gj0();T28=_g1});var z8,mj0,h1,FU=($)=>{switch(typeof $){case"undefined":return h1.undefined;case"string":return h1.string;case"number":return Number.isNaN($)?h1.nan:h1.number;case"boolean":return h1.boolean;case"function":return h1.function;case"bigint":return h1.bigint;case"symbol":return h1.symbol;case"object":if(Array.isArray($))return h1.array;if($===null)return h1.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return h1.promise;if(typeof Map<"u"&&$ instanceof Map)return h1.map;if(typeof Set<"u"&&$ instanceof Set)return h1.set;if(typeof Date<"u"&&$ instanceof Date)return h1.date;return h1.object;default:return h1.unknown}};var yh=V0(()=>{(function($){$.assertEqual=(J)=>{};function Y(J){}$.assertIs=Y;function X(J){throw Error()}$.assertNever=X,$.arrayToEnum=(J)=>{let Q={};for(let W of J)Q[W]=W;return Q},$.getValidEnumValues=(J)=>{let Q=$.objectKeys(J).filter((Z)=>typeof J[J[Z]]!=="number"),W={};for(let Z of Q)W[Z]=J[Z];return $.objectValues(W)},$.objectValues=(J)=>{return $.objectKeys(J).map(function(Q){return J[Q]})},$.objectKeys=typeof Object.keys==="function"?(J)=>Object.keys(J):(J)=>{let Q=[];for(let W in J)if(Object.prototype.hasOwnProperty.call(J,W))Q.push(W);return Q},$.find=(J,Q)=>{for(let W of J)if(Q(W))return W;return},$.isInteger=typeof Number.isInteger==="function"?(J)=>Number.isInteger(J):(J)=>typeof J==="number"&&Number.isFinite(J)&&Math.floor(J)===J;function G(J,Q=" | "){return J.map((W)=>typeof W==="string"?`'${W}'`:W).join(Q)}$.joinValues=G,$.jsonStringifyReplacer=(J,Q)=>{if(typeof Q==="bigint")return Q.toString();return Q}})(z8||(z8={}));(function($){$.mergeShapes=(Y,X)=>{return{...Y,...X}}})(mj0||(mj0={}));h1=z8.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var L1,C28=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")},HQ;var c10=V0(()=>{yh();L1=z8.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"]);HQ=class HQ extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(X)=>{this.issues=[...this.issues,X]},this.addIssues=(X=[])=>{this.issues=[...this.issues,...X]};let Y=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,Y);else this.__proto__=Y;this.name="ZodError",this.issues=$}format($){let Y=$||function(J){return J.message},X={_errors:[]},G=(J)=>{for(let Q of J.issues)if(Q.code==="invalid_union")Q.unionErrors.map(G);else if(Q.code==="invalid_return_type")G(Q.returnTypeError);else if(Q.code==="invalid_arguments")G(Q.argumentsError);else if(Q.path.length===0)X._errors.push(Y(Q));else{let W=X,Z=0;while(Z<Q.path.length){let K=Q.path[Z];if(Z!==Q.path.length-1)W[K]=W[K]||{_errors:[]};else W[K]=W[K]||{_errors:[]},W[K]._errors.push(Y(Q));W=W[K],Z++}}};return G(this),X}static assert($){if(!($ instanceof HQ))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,z8.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(Y)=>Y.message){let Y=Object.create(null),X=[];for(let G of this.issues)if(G.path.length>0){let J=G.path[0];Y[J]=Y[J]||[],Y[J].push($(G))}else X.push($(G));return{formErrors:X,fieldErrors:Y}}get formErrors(){return this.flatten()}};HQ.create=($)=>{return new HQ($)}});var S28=($,Y)=>{let X;switch($.code){case L1.invalid_type:if($.received===h1.undefined)X="Required";else X=`Expected ${$.expected}, received ${$.received}`;break;case L1.invalid_literal:X=`Invalid literal value, expected ${JSON.stringify($.expected,z8.jsonStringifyReplacer)}`;break;case L1.unrecognized_keys:X=`Unrecognized key(s) in object: ${z8.joinValues($.keys,", ")}`;break;case L1.invalid_union:X="Invalid input";break;case L1.invalid_union_discriminator:X=`Invalid discriminator value. Expected ${z8.joinValues($.options)}`;break;case L1.invalid_enum_value:X=`Invalid enum value. Expected ${z8.joinValues($.options)}, received '${$.received}'`;break;case L1.invalid_arguments:X="Invalid function arguments";break;case L1.invalid_return_type:X="Invalid function return type";break;case L1.invalid_date:X="Invalid date";break;case L1.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(X=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")X=`${X} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)X=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)X=`Invalid input: must end with "${$.validation.endsWith}"`;else z8.assertNever($.validation);else if($.validation!=="regex")X=`Invalid ${$.validation}`;else X="Invalid";break;case L1.too_small:if($.type==="array")X=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")X=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")X=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")X=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")X=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else X="Invalid input";break;case L1.too_big:if($.type==="array")X=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")X=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")X=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")X=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")X=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else X="Invalid input";break;case L1.custom:X="Invalid input";break;case L1.invalid_intersection_types:X="Intersection results could not be merged";break;case L1.not_multiple_of:X=`Number must be a multiple of ${$.multipleOf}`;break;case L1.not_finite:X="Number must be finite";break;default:X=Y.defaultError,z8.assertNever($)}return{message:X}},jz;var uj0=V0(()=>{c10();yh();jz=S28});function k28($){jg1=$}function $w(){return jg1}var jg1;var l10=V0(()=>{uj0();jg1=jz});function o1($,Y){let X=$w(),G=bh({issueData:Y,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,X,X===jz?void 0:jz].filter((J)=>!!J)});$.common.issues.push(G)}class NX{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,Y){let X=[];for(let G of Y){if(G.status==="aborted")return a4;if(G.status==="dirty")$.dirty();X.push(G.value)}return{status:$.value,value:X}}static async mergeObjectAsync($,Y){let X=[];for(let G of Y){let J=await G.key,Q=await G.value;X.push({key:J,value:Q})}return NX.mergeObjectSync($,X)}static mergeObjectSync($,Y){let X={};for(let G of Y){let{key:J,value:Q}=G;if(J.status==="aborted")return a4;if(Q.status==="aborted")return a4;if(J.status==="dirty")$.dirty();if(Q.status==="dirty")$.dirty();if(J.value!=="__proto__"&&(typeof Q.value<"u"||G.alwaysSet))X[J.value]=Q.value}return{status:$.value,value:X}}}var bh=($)=>{let{data:Y,path:X,errorMaps:G,issueData:J}=$,Q=[...X,...J.path||[]],W={...J,path:Q};if(J.message!==void 0)return{...J,path:Q,message:J.message};let Z="",K=G.filter((H)=>!!H).slice().reverse();for(let H of K)Z=H(W,{data:Y,defaultError:Z}).message;return{...J,path:Q,message:Z}},v28,a4,WO=($)=>({status:"dirty",value:$}),$G=($)=>({status:"valid",value:$}),i10=($)=>$.status==="aborted",n10=($)=>$.status==="dirty",jF=($)=>$.status==="valid",Yw=($)=>typeof Promise<"u"&&$ instanceof Promise;var pj0=V0(()=>{l10();uj0();v28=[];a4=Object.freeze({status:"aborted"})});var Tg1=()=>{};var j4;var Cg1=V0(()=>{(function($){$.errToObj=(Y)=>typeof Y==="string"?{message:Y}:Y||{},$.toString=(Y)=>typeof Y==="string"?Y:Y?.message})(j4||(j4={}))});class FK{constructor($,Y,X,G){this._cachedPath=[],this.parent=$,this.data=Y,this._path=X,this._key=G}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function k6($){if(!$)return{};let{errorMap:Y,invalid_type_error:X,required_error:G,description:J}=$;if(Y&&(X||G))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(Y)return{errorMap:Y,description:J};return{errorMap:(W,Z)=>{let{message:K}=$;if(W.code==="invalid_enum_value")return{message:K??Z.defaultError};if(typeof Z.data>"u")return{message:K??G??Z.defaultError};if(W.code!=="invalid_type")return{message:Z.defaultError};return{message:K??X??Z.defaultError}},description:J}}class a6{get description(){return this._def.description}_getType($){return FU($.data)}_getOrReturnCtx($,Y){return Y||{common:$.parent.common,data:$.data,parsedType:FU($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new NX,ctx:{common:$.parent.common,data:$.data,parsedType:FU($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let Y=this._parse($);if(Yw(Y))throw Error("Synchronous parse encountered promise.");return Y}_parseAsync($){let Y=this._parse($);return Promise.resolve(Y)}parse($,Y){let X=this.safeParse($,Y);if(X.success)return X.data;throw X.error}safeParse($,Y){let X={common:{issues:[],async:Y?.async??!1,contextualErrorMap:Y?.errorMap},path:Y?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:FU($)},G=this._parseSync({data:$,path:X.path,parent:X});return Sg1(X,G)}"~validate"($){let Y={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:FU($)};if(!this["~standard"].async)try{let X=this._parseSync({data:$,path:[],parent:Y});return jF(X)?{value:X.value}:{issues:Y.common.issues}}catch(X){if(X?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;Y.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:Y}).then((X)=>jF(X)?{value:X.value}:{issues:Y.common.issues})}async parseAsync($,Y){let X=await this.safeParseAsync($,Y);if(X.success)return X.data;throw X.error}async safeParseAsync($,Y){let X={common:{issues:[],contextualErrorMap:Y?.errorMap,async:!0},path:Y?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:FU($)},G=this._parse({data:$,path:X.path,parent:X}),J=await(Yw(G)?G:Promise.resolve(G));return Sg1(X,J)}refine($,Y){let X=(G)=>{if(typeof Y==="string"||typeof Y>"u")return{message:Y};else if(typeof Y==="function")return Y(G);else return Y};return this._refinement((G,J)=>{let Q=$(G),W=()=>J.addIssue({code:L1.custom,...X(G)});if(typeof Promise<"u"&&Q instanceof Promise)return Q.then((Z)=>{if(!Z)return W(),!1;else return!0});if(!Q)return W(),!1;else return!0})}refinement($,Y){return this._refinement((X,G)=>{if(!$(X))return G.addIssue(typeof Y==="function"?Y(X,G):Y),!1;else return!0})}_refinement($){return new DK({schema:this,typeName:U0.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,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:(Y)=>this["~validate"](Y)}}optional(){return DW.create(this,this._def)}nullable(){return NK.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return FW.create(this)}promise(){return UO.create(this,this._def)}or($){return kF.create([this,$],this._def)}and($){return Sz.create(this,$,this._def)}transform($){return new DK({...k6(this._def),schema:this,typeName:U0.ZodEffects,effect:{type:"transform",transform:$}})}default($){let Y=typeof $==="function"?$:()=>$;return new xF({...k6(this._def),innerType:this,defaultValue:Y,typeName:U0.ZodDefault})}brand(){return new a10({typeName:U0.ZodBranded,type:this,...k6(this._def)})}catch($){let Y=typeof $==="function"?$:()=>$;return new Uw({...k6(this._def),innerType:this,catchValue:Y,typeName:U0.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return ph.create(this,$)}readonly(){return Hw.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function xg1($){let Y="[0-5]\\d";if($.precision)Y=`${Y}\\.\\d{${$.precision}}`;else if($.precision==null)Y=`${Y}(\\.\\d+)?`;let X=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${Y})${X}`}function s28($){return new RegExp(`^${xg1($)}$`)}function yg1($){let Y=`${vg1}T${xg1($)}`,X=[];if(X.push($.local?"Z?":"Z"),$.offset)X.push("([+-]\\d{2}:?\\d{2})");return Y=`${Y}(${X.join("|")})`,new RegExp(`^${Y}$`)}function o28($,Y){if((Y==="v4"||!Y)&&d28.test($))return!0;if((Y==="v6"||!Y)&&l28.test($))return!0;return!1}function t28($,Y){if(!g28.test($))return!1;try{let[X]=$.split(".");if(!X)return!1;let G=X.replace(/-/g,"+").replace(/_/g,"/").padEnd(X.length+(4-X.length%4)%4,"="),J=JSON.parse(atob(G));if(typeof J!=="object"||J===null)return!1;if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(Y&&J.alg!==Y)return!1;return!0}catch{return!1}}function e28($,Y){if((Y==="v4"||!Y)&&c28.test($))return!0;if((Y==="v6"||!Y)&&i28.test($))return!0;return!1}function $K8($,Y){let X=($.toString().split(".")[1]||"").length,G=(Y.toString().split(".")[1]||"").length,J=X>G?X:G,Q=Number.parseInt($.toFixed(J).replace(".","")),W=Number.parseInt(Y.toFixed(J).replace(".",""));return Q%W/10**J}function Xw($){if($ instanceof m5){let Y={};for(let X in $.shape){let G=$.shape[X];Y[X]=DW.create(Xw(G))}return new m5({...$._def,shape:()=>Y})}else if($ instanceof FW)return new FW({...$._def,type:Xw($.element)});else if($ instanceof DW)return DW.create(Xw($.unwrap()));else if($ instanceof NK)return NK.create(Xw($.unwrap()));else if($ instanceof LU)return LU.create($.items.map((Y)=>Xw(Y)));else return $}function cj0($,Y){let X=FU($),G=FU(Y);if($===Y)return{valid:!0,data:$};else if(X===h1.object&&G===h1.object){let J=z8.objectKeys(Y),Q=z8.objectKeys($).filter((Z)=>J.indexOf(Z)!==-1),W={...$,...Y};for(let Z of Q){let K=cj0($[Z],Y[Z]);if(!K.valid)return{valid:!1};W[Z]=K.data}return{valid:!0,data:W}}else if(X===h1.array&&G===h1.array){if($.length!==Y.length)return{valid:!1};let J=[];for(let Q=0;Q<$.length;Q++){let W=$[Q],Z=Y[Q],K=cj0(W,Z);if(!K.valid)return{valid:!1};J.push(K.data)}return{valid:!0,data:J}}else if(X===h1.date&&G===h1.date&&+$===+Y)return{valid:!0,data:$};else return{valid:!1}}function bg1($,Y){return new vF({values:$,typeName:U0.ZodEnum,...k6(Y)})}function kg1($,Y){let X=typeof $==="function"?$(Y):typeof $==="string"?{message:$}:$;return typeof X==="string"?{message:X}:X}function hg1($,Y={},X){if($)return ZO.create().superRefine((G,J)=>{let Q=$(G);if(Q instanceof Promise)return Q.then((W)=>{if(!W){let Z=kg1(Y,G),K=Z.fatal??X??!0;J.addIssue({code:"custom",...Z,fatal:K})}});if(!Q){let W=kg1(Y,G),Z=W.fatal??X??!0;J.addIssue({code:"custom",...W,fatal:Z})}return});return ZO.create()}var Sg1=($,Y)=>{if(jF(Y))return{success:!0,data:Y.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let X=new HQ($.common.issues);return this._error=X,this._error}}}},x28,y28,b28,h28,f28,g28,m28,u28,p28="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",dj0,d28,c28,l28,i28,n28,r28,vg1="((\\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])))",a28,AW,DU,CF,Jw,Cz,hh,Qw,SF,ZO,TF,NU,fh,FW,m5,kF,Tz=($)=>{if($ instanceof Ww)return Tz($.schema);else if($ instanceof DK)return Tz($.innerType());else if($ instanceof Zw)return[$.value];else if($ instanceof vF)return $.options;else if($ instanceof Kw)return z8.objectValues($.enum);else if($ instanceof xF)return Tz($._def.innerType);else if($ instanceof Qw)return[void 0];else if($ instanceof SF)return[null];else if($ instanceof DW)return[void 0,...Tz($.unwrap())];else if($ instanceof NK)return[null,...Tz($.unwrap())];else if($ instanceof a10)return Tz($.unwrap());else if($ instanceof Hw)return Tz($.unwrap());else if($ instanceof Uw)return Tz($._def.innerType);else return[]},r10,Sz,LU,gh,mh,KO,Gw,Ww,Zw,vF,Kw,UO,DK,DW,NK,xF,Uw,uh,YK8,a10,ph,Hw,XK8,U0,GK8=($,Y={message:`Input not instance of ${$.name}`})=>hg1((X)=>X instanceof $,Y),fg1,gg1,JK8,QK8,mg1,WK8,ZK8,KK8,UK8,HK8,zK8,VK8,AK8,FK8,lj0,DK8,NK8,LK8,BK8,OK8,EK8,MK8,RK8,qK8,IK8,PK8,wK8,_K8,jK8,TK8,CK8,SK8,kK8,vK8,xK8=()=>fg1().optional(),yK8=()=>gg1().optional(),bK8=()=>mg1().optional(),hK8,fK8;var ug1=V0(()=>{c10();l10();Cg1();pj0();yh();x28=/^c[^\s-]{8,}$/i,y28=/^[0-9a-z]+$/,b28=/^[0-9A-HJKMNP-TV-Z]{26}$/i,h28=/^[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,f28=/^[a-z0-9_-]{21}$/i,g28=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,m28=/^[-+]?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)?)??$/,u28=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,d28=/^(?:(?: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])$/,c28=/^(?:(?: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])$/,l28=/^(([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]))$/,i28=/^(([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])$/,n28=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,r28=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,a28=new RegExp(`^${vg1}$`);AW=class AW extends a6{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==h1.string){let J=this._getOrReturnCtx($);return o1(J,{code:L1.invalid_type,expected:h1.string,received:J.parsedType}),a4}let X=new NX,G=void 0;for(let J of this._def.checks)if(J.kind==="min"){if($.data.length<J.value)G=this._getOrReturnCtx($,G),o1(G,{code:L1.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),X.dirty()}else if(J.kind==="max"){if($.data.length>J.value)G=this._getOrReturnCtx($,G),o1(G,{code:L1.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),X.dirty()}else if(J.kind==="length"){let Q=$.data.length>J.value,W=$.data.length<J.value;if(Q||W){if(G=this._getOrReturnCtx($,G),Q)o1(G,{code:L1.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});else if(W)o1(G,{code:L1.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});X.dirty()}}else if(J.kind==="email"){if(!u28.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"email",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="emoji"){if(!dj0)dj0=new RegExp(p28,"u");if(!dj0.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"emoji",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="uuid"){if(!h28.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"uuid",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="nanoid"){if(!f28.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"nanoid",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cuid"){if(!x28.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"cuid",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cuid2"){if(!y28.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"cuid2",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="ulid"){if(!b28.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"ulid",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="url")try{new URL($.data)}catch{G=this._getOrReturnCtx($,G),o1(G,{validation:"url",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="regex"){if(J.regex.lastIndex=0,!J.regex.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"regex",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="trim")$.data=$.data.trim();else if(J.kind==="includes"){if(!$.data.includes(J.value,J.position))G=this._getOrReturnCtx($,G),o1(G,{code:L1.invalid_string,validation:{includes:J.value,position:J.position},message:J.message}),X.dirty()}else if(J.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(J.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(J.kind==="startsWith"){if(!$.data.startsWith(J.value))G=this._getOrReturnCtx($,G),o1(G,{code:L1.invalid_string,validation:{startsWith:J.value},message:J.message}),X.dirty()}else if(J.kind==="endsWith"){if(!$.data.endsWith(J.value))G=this._getOrReturnCtx($,G),o1(G,{code:L1.invalid_string,validation:{endsWith:J.value},message:J.message}),X.dirty()}else if(J.kind==="datetime"){if(!yg1(J).test($.data))G=this._getOrReturnCtx($,G),o1(G,{code:L1.invalid_string,validation:"datetime",message:J.message}),X.dirty()}else if(J.kind==="date"){if(!a28.test($.data))G=this._getOrReturnCtx($,G),o1(G,{code:L1.invalid_string,validation:"date",message:J.message}),X.dirty()}else if(J.kind==="time"){if(!s28(J).test($.data))G=this._getOrReturnCtx($,G),o1(G,{code:L1.invalid_string,validation:"time",message:J.message}),X.dirty()}else if(J.kind==="duration"){if(!m28.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"duration",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="ip"){if(!o28($.data,J.version))G=this._getOrReturnCtx($,G),o1(G,{validation:"ip",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="jwt"){if(!t28($.data,J.alg))G=this._getOrReturnCtx($,G),o1(G,{validation:"jwt",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cidr"){if(!e28($.data,J.version))G=this._getOrReturnCtx($,G),o1(G,{validation:"cidr",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="base64"){if(!n28.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"base64",code:L1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="base64url"){if(!r28.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"base64url",code:L1.invalid_string,message:J.message}),X.dirty()}else z8.assertNever(J);return{status:X.value,value:$.data}}_regex($,Y,X){return this.refinement((G)=>$.test(G),{validation:Y,code:L1.invalid_string,...j4.errToObj(X)})}_addCheck($){return new AW({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...j4.errToObj($)})}url($){return this._addCheck({kind:"url",...j4.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...j4.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...j4.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...j4.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...j4.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...j4.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...j4.errToObj($)})}base64($){return this._addCheck({kind:"base64",...j4.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...j4.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...j4.errToObj($)})}ip($){return this._addCheck({kind:"ip",...j4.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...j4.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...j4.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...j4.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...j4.errToObj($)})}regex($,Y){return this._addCheck({kind:"regex",regex:$,...j4.errToObj(Y)})}includes($,Y){return this._addCheck({kind:"includes",value:$,position:Y?.position,...j4.errToObj(Y?.message)})}startsWith($,Y){return this._addCheck({kind:"startsWith",value:$,...j4.errToObj(Y)})}endsWith($,Y){return this._addCheck({kind:"endsWith",value:$,...j4.errToObj(Y)})}min($,Y){return this._addCheck({kind:"min",value:$,...j4.errToObj(Y)})}max($,Y){return this._addCheck({kind:"max",value:$,...j4.errToObj(Y)})}length($,Y){return this._addCheck({kind:"length",value:$,...j4.errToObj(Y)})}nonempty($){return this.min(1,j4.errToObj($))}trim(){return new AW({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new AW({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new AW({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxLength(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}};AW.create=($)=>{return new AW({checks:[],typeName:U0.ZodString,coerce:$?.coerce??!1,...k6($)})};DU=class DU extends a6{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==h1.number){let J=this._getOrReturnCtx($);return o1(J,{code:L1.invalid_type,expected:h1.number,received:J.parsedType}),a4}let X=void 0,G=new NX;for(let J of this._def.checks)if(J.kind==="int"){if(!z8.isInteger($.data))X=this._getOrReturnCtx($,X),o1(X,{code:L1.invalid_type,expected:"integer",received:"float",message:J.message}),G.dirty()}else if(J.kind==="min"){if(J.inclusive?$.data<J.value:$.data<=J.value)X=this._getOrReturnCtx($,X),o1(X,{code:L1.too_small,minimum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),G.dirty()}else if(J.kind==="max"){if(J.inclusive?$.data>J.value:$.data>=J.value)X=this._getOrReturnCtx($,X),o1(X,{code:L1.too_big,maximum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),G.dirty()}else if(J.kind==="multipleOf"){if($K8($.data,J.value)!==0)X=this._getOrReturnCtx($,X),o1(X,{code:L1.not_multiple_of,multipleOf:J.value,message:J.message}),G.dirty()}else if(J.kind==="finite"){if(!Number.isFinite($.data))X=this._getOrReturnCtx($,X),o1(X,{code:L1.not_finite,message:J.message}),G.dirty()}else z8.assertNever(J);return{status:G.value,value:$.data}}gte($,Y){return this.setLimit("min",$,!0,j4.toString(Y))}gt($,Y){return this.setLimit("min",$,!1,j4.toString(Y))}lte($,Y){return this.setLimit("max",$,!0,j4.toString(Y))}lt($,Y){return this.setLimit("max",$,!1,j4.toString(Y))}setLimit($,Y,X,G){return new DU({...this._def,checks:[...this._def.checks,{kind:$,value:Y,inclusive:X,message:j4.toString(G)}]})}_addCheck($){return new DU({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:j4.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j4.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j4.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j4.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j4.toString($)})}multipleOf($,Y){return this._addCheck({kind:"multipleOf",value:$,message:j4.toString(Y)})}finite($){return this._addCheck({kind:"finite",message:j4.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j4.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j4.toString($)})}get minValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&z8.isInteger($.value))}get isFinite(){let $=null,Y=null;for(let X of this._def.checks)if(X.kind==="finite"||X.kind==="int"||X.kind==="multipleOf")return!0;else if(X.kind==="min"){if(Y===null||X.value>Y)Y=X.value}else if(X.kind==="max"){if($===null||X.value<$)$=X.value}return Number.isFinite(Y)&&Number.isFinite($)}};DU.create=($)=>{return new DU({checks:[],typeName:U0.ZodNumber,coerce:$?.coerce||!1,...k6($)})};CF=class CF extends a6{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==h1.bigint)return this._getInvalidInput($);let X=void 0,G=new NX;for(let J of this._def.checks)if(J.kind==="min"){if(J.inclusive?$.data<J.value:$.data<=J.value)X=this._getOrReturnCtx($,X),o1(X,{code:L1.too_small,type:"bigint",minimum:J.value,inclusive:J.inclusive,message:J.message}),G.dirty()}else if(J.kind==="max"){if(J.inclusive?$.data>J.value:$.data>=J.value)X=this._getOrReturnCtx($,X),o1(X,{code:L1.too_big,type:"bigint",maximum:J.value,inclusive:J.inclusive,message:J.message}),G.dirty()}else if(J.kind==="multipleOf"){if($.data%J.value!==BigInt(0))X=this._getOrReturnCtx($,X),o1(X,{code:L1.not_multiple_of,multipleOf:J.value,message:J.message}),G.dirty()}else z8.assertNever(J);return{status:G.value,value:$.data}}_getInvalidInput($){let Y=this._getOrReturnCtx($);return o1(Y,{code:L1.invalid_type,expected:h1.bigint,received:Y.parsedType}),a4}gte($,Y){return this.setLimit("min",$,!0,j4.toString(Y))}gt($,Y){return this.setLimit("min",$,!1,j4.toString(Y))}lte($,Y){return this.setLimit("max",$,!0,j4.toString(Y))}lt($,Y){return this.setLimit("max",$,!1,j4.toString(Y))}setLimit($,Y,X,G){return new CF({...this._def,checks:[...this._def.checks,{kind:$,value:Y,inclusive:X,message:j4.toString(G)}]})}_addCheck($){return new CF({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j4.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j4.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j4.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j4.toString($)})}multipleOf($,Y){return this._addCheck({kind:"multipleOf",value:$,message:j4.toString(Y)})}get minValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}};CF.create=($)=>{return new CF({checks:[],typeName:U0.ZodBigInt,coerce:$?.coerce??!1,...k6($)})};Jw=class Jw extends a6{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==h1.boolean){let X=this._getOrReturnCtx($);return o1(X,{code:L1.invalid_type,expected:h1.boolean,received:X.parsedType}),a4}return $G($.data)}};Jw.create=($)=>{return new Jw({typeName:U0.ZodBoolean,coerce:$?.coerce||!1,...k6($)})};Cz=class Cz extends a6{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==h1.date){let J=this._getOrReturnCtx($);return o1(J,{code:L1.invalid_type,expected:h1.date,received:J.parsedType}),a4}if(Number.isNaN($.data.getTime())){let J=this._getOrReturnCtx($);return o1(J,{code:L1.invalid_date}),a4}let X=new NX,G=void 0;for(let J of this._def.checks)if(J.kind==="min"){if($.data.getTime()<J.value)G=this._getOrReturnCtx($,G),o1(G,{code:L1.too_small,message:J.message,inclusive:!0,exact:!1,minimum:J.value,type:"date"}),X.dirty()}else if(J.kind==="max"){if($.data.getTime()>J.value)G=this._getOrReturnCtx($,G),o1(G,{code:L1.too_big,message:J.message,inclusive:!0,exact:!1,maximum:J.value,type:"date"}),X.dirty()}else z8.assertNever(J);return{status:X.value,value:new Date($.data.getTime())}}_addCheck($){return new Cz({...this._def,checks:[...this._def.checks,$]})}min($,Y){return this._addCheck({kind:"min",value:$.getTime(),message:j4.toString(Y)})}max($,Y){return this._addCheck({kind:"max",value:$.getTime(),message:j4.toString(Y)})}get minDate(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $!=null?new Date($):null}};Cz.create=($)=>{return new Cz({checks:[],coerce:$?.coerce||!1,typeName:U0.ZodDate,...k6($)})};hh=class hh extends a6{_parse($){if(this._getType($)!==h1.symbol){let X=this._getOrReturnCtx($);return o1(X,{code:L1.invalid_type,expected:h1.symbol,received:X.parsedType}),a4}return $G($.data)}};hh.create=($)=>{return new hh({typeName:U0.ZodSymbol,...k6($)})};Qw=class Qw extends a6{_parse($){if(this._getType($)!==h1.undefined){let X=this._getOrReturnCtx($);return o1(X,{code:L1.invalid_type,expected:h1.undefined,received:X.parsedType}),a4}return $G($.data)}};Qw.create=($)=>{return new Qw({typeName:U0.ZodUndefined,...k6($)})};SF=class SF extends a6{_parse($){if(this._getType($)!==h1.null){let X=this._getOrReturnCtx($);return o1(X,{code:L1.invalid_type,expected:h1.null,received:X.parsedType}),a4}return $G($.data)}};SF.create=($)=>{return new SF({typeName:U0.ZodNull,...k6($)})};ZO=class ZO extends a6{constructor(){super(...arguments);this._any=!0}_parse($){return $G($.data)}};ZO.create=($)=>{return new ZO({typeName:U0.ZodAny,...k6($)})};TF=class TF extends a6{constructor(){super(...arguments);this._unknown=!0}_parse($){return $G($.data)}};TF.create=($)=>{return new TF({typeName:U0.ZodUnknown,...k6($)})};NU=class NU extends a6{_parse($){let Y=this._getOrReturnCtx($);return o1(Y,{code:L1.invalid_type,expected:h1.never,received:Y.parsedType}),a4}};NU.create=($)=>{return new NU({typeName:U0.ZodNever,...k6($)})};fh=class fh extends a6{_parse($){if(this._getType($)!==h1.undefined){let X=this._getOrReturnCtx($);return o1(X,{code:L1.invalid_type,expected:h1.void,received:X.parsedType}),a4}return $G($.data)}};fh.create=($)=>{return new fh({typeName:U0.ZodVoid,...k6($)})};FW=class FW extends a6{_parse($){let{ctx:Y,status:X}=this._processInputParams($),G=this._def;if(Y.parsedType!==h1.array)return o1(Y,{code:L1.invalid_type,expected:h1.array,received:Y.parsedType}),a4;if(G.exactLength!==null){let Q=Y.data.length>G.exactLength.value,W=Y.data.length<G.exactLength.value;if(Q||W)o1(Y,{code:Q?L1.too_big:L1.too_small,minimum:W?G.exactLength.value:void 0,maximum:Q?G.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:G.exactLength.message}),X.dirty()}if(G.minLength!==null){if(Y.data.length<G.minLength.value)o1(Y,{code:L1.too_small,minimum:G.minLength.value,type:"array",inclusive:!0,exact:!1,message:G.minLength.message}),X.dirty()}if(G.maxLength!==null){if(Y.data.length>G.maxLength.value)o1(Y,{code:L1.too_big,maximum:G.maxLength.value,type:"array",inclusive:!0,exact:!1,message:G.maxLength.message}),X.dirty()}if(Y.common.async)return Promise.all([...Y.data].map((Q,W)=>{return G.type._parseAsync(new FK(Y,Q,Y.path,W))})).then((Q)=>{return NX.mergeArray(X,Q)});let J=[...Y.data].map((Q,W)=>{return G.type._parseSync(new FK(Y,Q,Y.path,W))});return NX.mergeArray(X,J)}get element(){return this._def.type}min($,Y){return new FW({...this._def,minLength:{value:$,message:j4.toString(Y)}})}max($,Y){return new FW({...this._def,maxLength:{value:$,message:j4.toString(Y)}})}length($,Y){return new FW({...this._def,exactLength:{value:$,message:j4.toString(Y)}})}nonempty($){return this.min(1,$)}};FW.create=($,Y)=>{return new FW({type:$,minLength:null,maxLength:null,exactLength:null,typeName:U0.ZodArray,...k6(Y)})};m5=class m5 extends a6{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),Y=z8.objectKeys($);return this._cached={shape:$,keys:Y},this._cached}_parse($){if(this._getType($)!==h1.object){let K=this._getOrReturnCtx($);return o1(K,{code:L1.invalid_type,expected:h1.object,received:K.parsedType}),a4}let{status:X,ctx:G}=this._processInputParams($),{shape:J,keys:Q}=this._getCached(),W=[];if(!(this._def.catchall instanceof NU&&this._def.unknownKeys==="strip")){for(let K in G.data)if(!Q.includes(K))W.push(K)}let Z=[];for(let K of Q){let H=J[K],z=G.data[K];Z.push({key:{status:"valid",value:K},value:H._parse(new FK(G,z,G.path,K)),alwaysSet:K in G.data})}if(this._def.catchall instanceof NU){let K=this._def.unknownKeys;if(K==="passthrough")for(let H of W)Z.push({key:{status:"valid",value:H},value:{status:"valid",value:G.data[H]}});else if(K==="strict"){if(W.length>0)o1(G,{code:L1.unrecognized_keys,keys:W}),X.dirty()}else if(K==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let K=this._def.catchall;for(let H of W){let z=G.data[H];Z.push({key:{status:"valid",value:H},value:K._parse(new FK(G,z,G.path,H)),alwaysSet:H in G.data})}}if(G.common.async)return Promise.resolve().then(async()=>{let K=[];for(let H of Z){let z=await H.key,V=await H.value;K.push({key:z,value:V,alwaysSet:H.alwaysSet})}return K}).then((K)=>{return NX.mergeObjectSync(X,K)});else return NX.mergeObjectSync(X,Z)}get shape(){return this._def.shape()}strict($){return j4.errToObj,new m5({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(Y,X)=>{let G=this._def.errorMap?.(Y,X).message??X.defaultError;if(Y.code==="unrecognized_keys")return{message:j4.errToObj($).message??G};return{message:G}}}:{}})}strip(){return new m5({...this._def,unknownKeys:"strip"})}passthrough(){return new m5({...this._def,unknownKeys:"passthrough"})}extend($){return new m5({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new m5({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:U0.ZodObject})}setKey($,Y){return this.augment({[$]:Y})}catchall($){return new m5({...this._def,catchall:$})}pick($){let Y={};for(let X of z8.objectKeys($))if($[X]&&this.shape[X])Y[X]=this.shape[X];return new m5({...this._def,shape:()=>Y})}omit($){let Y={};for(let X of z8.objectKeys(this.shape))if(!$[X])Y[X]=this.shape[X];return new m5({...this._def,shape:()=>Y})}deepPartial(){return Xw(this)}partial($){let Y={};for(let X of z8.objectKeys(this.shape)){let G=this.shape[X];if($&&!$[X])Y[X]=G;else Y[X]=G.optional()}return new m5({...this._def,shape:()=>Y})}required($){let Y={};for(let X of z8.objectKeys(this.shape))if($&&!$[X])Y[X]=this.shape[X];else{let J=this.shape[X];while(J instanceof DW)J=J._def.innerType;Y[X]=J}return new m5({...this._def,shape:()=>Y})}keyof(){return bg1(z8.objectKeys(this.shape))}};m5.create=($,Y)=>{return new m5({shape:()=>$,unknownKeys:"strip",catchall:NU.create(),typeName:U0.ZodObject,...k6(Y)})};m5.strictCreate=($,Y)=>{return new m5({shape:()=>$,unknownKeys:"strict",catchall:NU.create(),typeName:U0.ZodObject,...k6(Y)})};m5.lazycreate=($,Y)=>{return new m5({shape:$,unknownKeys:"strip",catchall:NU.create(),typeName:U0.ZodObject,...k6(Y)})};kF=class kF extends a6{_parse($){let{ctx:Y}=this._processInputParams($),X=this._def.options;function G(J){for(let W of J)if(W.result.status==="valid")return W.result;for(let W of J)if(W.result.status==="dirty")return Y.common.issues.push(...W.ctx.common.issues),W.result;let Q=J.map((W)=>new HQ(W.ctx.common.issues));return o1(Y,{code:L1.invalid_union,unionErrors:Q}),a4}if(Y.common.async)return Promise.all(X.map(async(J)=>{let Q={...Y,common:{...Y.common,issues:[]},parent:null};return{result:await J._parseAsync({data:Y.data,path:Y.path,parent:Q}),ctx:Q}})).then(G);else{let J=void 0,Q=[];for(let Z of X){let K={...Y,common:{...Y.common,issues:[]},parent:null},H=Z._parseSync({data:Y.data,path:Y.path,parent:K});if(H.status==="valid")return H;else if(H.status==="dirty"&&!J)J={result:H,ctx:K};if(K.common.issues.length)Q.push(K.common.issues)}if(J)return Y.common.issues.push(...J.ctx.common.issues),J.result;let W=Q.map((Z)=>new HQ(Z));return o1(Y,{code:L1.invalid_union,unionErrors:W}),a4}}get options(){return this._def.options}};kF.create=($,Y)=>{return new kF({options:$,typeName:U0.ZodUnion,...k6(Y)})};r10=class r10 extends a6{_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==h1.object)return o1(Y,{code:L1.invalid_type,expected:h1.object,received:Y.parsedType}),a4;let X=this.discriminator,G=Y.data[X],J=this.optionsMap.get(G);if(!J)return o1(Y,{code:L1.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[X]}),a4;if(Y.common.async)return J._parseAsync({data:Y.data,path:Y.path,parent:Y});else return J._parseSync({data:Y.data,path:Y.path,parent:Y})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,Y,X){let G=new Map;for(let J of Y){let Q=Tz(J.shape[$]);if(!Q.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let W of Q){if(G.has(W))throw Error(`Discriminator property ${String($)} has duplicate value ${String(W)}`);G.set(W,J)}}return new r10({typeName:U0.ZodDiscriminatedUnion,discriminator:$,options:Y,optionsMap:G,...k6(X)})}};Sz=class Sz extends a6{_parse($){let{status:Y,ctx:X}=this._processInputParams($),G=(J,Q)=>{if(i10(J)||i10(Q))return a4;let W=cj0(J.value,Q.value);if(!W.valid)return o1(X,{code:L1.invalid_intersection_types}),a4;if(n10(J)||n10(Q))Y.dirty();return{status:Y.value,value:W.data}};if(X.common.async)return Promise.all([this._def.left._parseAsync({data:X.data,path:X.path,parent:X}),this._def.right._parseAsync({data:X.data,path:X.path,parent:X})]).then(([J,Q])=>G(J,Q));else return G(this._def.left._parseSync({data:X.data,path:X.path,parent:X}),this._def.right._parseSync({data:X.data,path:X.path,parent:X}))}};Sz.create=($,Y,X)=>{return new Sz({left:$,right:Y,typeName:U0.ZodIntersection,...k6(X)})};LU=class LU extends a6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==h1.array)return o1(X,{code:L1.invalid_type,expected:h1.array,received:X.parsedType}),a4;if(X.data.length<this._def.items.length)return o1(X,{code:L1.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a4;if(!this._def.rest&&X.data.length>this._def.items.length)o1(X,{code:L1.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Y.dirty();let J=[...X.data].map((Q,W)=>{let Z=this._def.items[W]||this._def.rest;if(!Z)return null;return Z._parse(new FK(X,Q,X.path,W))}).filter((Q)=>!!Q);if(X.common.async)return Promise.all(J).then((Q)=>{return NX.mergeArray(Y,Q)});else return NX.mergeArray(Y,J)}get items(){return this._def.items}rest($){return new LU({...this._def,rest:$})}};LU.create=($,Y)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new LU({items:$,typeName:U0.ZodTuple,rest:null,...k6(Y)})};gh=class gh extends a6{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==h1.object)return o1(X,{code:L1.invalid_type,expected:h1.object,received:X.parsedType}),a4;let G=[],J=this._def.keyType,Q=this._def.valueType;for(let W in X.data)G.push({key:J._parse(new FK(X,W,X.path,W)),value:Q._parse(new FK(X,X.data[W],X.path,W)),alwaysSet:W in X.data});if(X.common.async)return NX.mergeObjectAsync(Y,G);else return NX.mergeObjectSync(Y,G)}get element(){return this._def.valueType}static create($,Y,X){if(Y instanceof a6)return new gh({keyType:$,valueType:Y,typeName:U0.ZodRecord,...k6(X)});return new gh({keyType:AW.create(),valueType:$,typeName:U0.ZodRecord,...k6(Y)})}};mh=class mh extends a6{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==h1.map)return o1(X,{code:L1.invalid_type,expected:h1.map,received:X.parsedType}),a4;let G=this._def.keyType,J=this._def.valueType,Q=[...X.data.entries()].map(([W,Z],K)=>{return{key:G._parse(new FK(X,W,X.path,[K,"key"])),value:J._parse(new FK(X,Z,X.path,[K,"value"]))}});if(X.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let Z of Q){let K=await Z.key,H=await Z.value;if(K.status==="aborted"||H.status==="aborted")return a4;if(K.status==="dirty"||H.status==="dirty")Y.dirty();W.set(K.value,H.value)}return{status:Y.value,value:W}})}else{let W=new Map;for(let Z of Q){let{key:K,value:H}=Z;if(K.status==="aborted"||H.status==="aborted")return a4;if(K.status==="dirty"||H.status==="dirty")Y.dirty();W.set(K.value,H.value)}return{status:Y.value,value:W}}}};mh.create=($,Y,X)=>{return new mh({valueType:Y,keyType:$,typeName:U0.ZodMap,...k6(X)})};KO=class KO extends a6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==h1.set)return o1(X,{code:L1.invalid_type,expected:h1.set,received:X.parsedType}),a4;let G=this._def;if(G.minSize!==null){if(X.data.size<G.minSize.value)o1(X,{code:L1.too_small,minimum:G.minSize.value,type:"set",inclusive:!0,exact:!1,message:G.minSize.message}),Y.dirty()}if(G.maxSize!==null){if(X.data.size>G.maxSize.value)o1(X,{code:L1.too_big,maximum:G.maxSize.value,type:"set",inclusive:!0,exact:!1,message:G.maxSize.message}),Y.dirty()}let J=this._def.valueType;function Q(Z){let K=new Set;for(let H of Z){if(H.status==="aborted")return a4;if(H.status==="dirty")Y.dirty();K.add(H.value)}return{status:Y.value,value:K}}let W=[...X.data.values()].map((Z,K)=>J._parse(new FK(X,Z,X.path,K)));if(X.common.async)return Promise.all(W).then((Z)=>Q(Z));else return Q(W)}min($,Y){return new KO({...this._def,minSize:{value:$,message:j4.toString(Y)}})}max($,Y){return new KO({...this._def,maxSize:{value:$,message:j4.toString(Y)}})}size($,Y){return this.min($,Y).max($,Y)}nonempty($){return this.min(1,$)}};KO.create=($,Y)=>{return new KO({valueType:$,minSize:null,maxSize:null,typeName:U0.ZodSet,...k6(Y)})};Gw=class Gw extends a6{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==h1.function)return o1(Y,{code:L1.invalid_type,expected:h1.function,received:Y.parsedType}),a4;function X(W,Z){return bh({data:W,path:Y.path,errorMaps:[Y.common.contextualErrorMap,Y.schemaErrorMap,$w(),jz].filter((K)=>!!K),issueData:{code:L1.invalid_arguments,argumentsError:Z}})}function G(W,Z){return bh({data:W,path:Y.path,errorMaps:[Y.common.contextualErrorMap,Y.schemaErrorMap,$w(),jz].filter((K)=>!!K),issueData:{code:L1.invalid_return_type,returnTypeError:Z}})}let J={errorMap:Y.common.contextualErrorMap},Q=Y.data;if(this._def.returns instanceof UO){let W=this;return $G(async function(...Z){let K=new HQ([]),H=await W._def.args.parseAsync(Z,J).catch((A)=>{throw K.addIssue(X(Z,A)),K}),z=await Reflect.apply(Q,this,H);return await W._def.returns._def.type.parseAsync(z,J).catch((A)=>{throw K.addIssue(G(z,A)),K})})}else{let W=this;return $G(function(...Z){let K=W._def.args.safeParse(Z,J);if(!K.success)throw new HQ([X(Z,K.error)]);let H=Reflect.apply(Q,this,K.data),z=W._def.returns.safeParse(H,J);if(!z.success)throw new HQ([G(H,z.error)]);return z.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new Gw({...this._def,args:LU.create($).rest(TF.create())})}returns($){return new Gw({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,Y,X){return new Gw({args:$?$:LU.create([]).rest(TF.create()),returns:Y||TF.create(),typeName:U0.ZodFunction,...k6(X)})}};Ww=class Ww extends a6{get schema(){return this._def.getter()}_parse($){let{ctx:Y}=this._processInputParams($);return this._def.getter()._parse({data:Y.data,path:Y.path,parent:Y})}};Ww.create=($,Y)=>{return new Ww({getter:$,typeName:U0.ZodLazy,...k6(Y)})};Zw=class Zw extends a6{_parse($){if($.data!==this._def.value){let Y=this._getOrReturnCtx($);return o1(Y,{received:Y.data,code:L1.invalid_literal,expected:this._def.value}),a4}return{status:"valid",value:$.data}}get value(){return this._def.value}};Zw.create=($,Y)=>{return new Zw({value:$,typeName:U0.ZodLiteral,...k6(Y)})};vF=class vF extends a6{_parse($){if(typeof $.data!=="string"){let Y=this._getOrReturnCtx($),X=this._def.values;return o1(Y,{expected:z8.joinValues(X),received:Y.parsedType,code:L1.invalid_type}),a4}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let Y=this._getOrReturnCtx($),X=this._def.values;return o1(Y,{received:Y.data,code:L1.invalid_enum_value,options:X}),a4}return $G($.data)}get options(){return this._def.values}get enum(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}get Values(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}get Enum(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}extract($,Y=this._def){return vF.create($,{...this._def,...Y})}exclude($,Y=this._def){return vF.create(this.options.filter((X)=>!$.includes(X)),{...this._def,...Y})}};vF.create=bg1;Kw=class Kw extends a6{_parse($){let Y=z8.getValidEnumValues(this._def.values),X=this._getOrReturnCtx($);if(X.parsedType!==h1.string&&X.parsedType!==h1.number){let G=z8.objectValues(Y);return o1(X,{expected:z8.joinValues(G),received:X.parsedType,code:L1.invalid_type}),a4}if(!this._cache)this._cache=new Set(z8.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let G=z8.objectValues(Y);return o1(X,{received:X.data,code:L1.invalid_enum_value,options:G}),a4}return $G($.data)}get enum(){return this._def.values}};Kw.create=($,Y)=>{return new Kw({values:$,typeName:U0.ZodNativeEnum,...k6(Y)})};UO=class UO extends a6{unwrap(){return this._def.type}_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==h1.promise&&Y.common.async===!1)return o1(Y,{code:L1.invalid_type,expected:h1.promise,received:Y.parsedType}),a4;let X=Y.parsedType===h1.promise?Y.data:Promise.resolve(Y.data);return $G(X.then((G)=>{return this._def.type.parseAsync(G,{path:Y.path,errorMap:Y.common.contextualErrorMap})}))}};UO.create=($,Y)=>{return new UO({type:$,typeName:U0.ZodPromise,...k6(Y)})};DK=class DK extends a6{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===U0.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:Y,ctx:X}=this._processInputParams($),G=this._def.effect||null,J={addIssue:(Q)=>{if(o1(X,Q),Q.fatal)Y.abort();else Y.dirty()},get path(){return X.path}};if(J.addIssue=J.addIssue.bind(J),G.type==="preprocess"){let Q=G.transform(X.data,J);if(X.common.async)return Promise.resolve(Q).then(async(W)=>{if(Y.value==="aborted")return a4;let Z=await this._def.schema._parseAsync({data:W,path:X.path,parent:X});if(Z.status==="aborted")return a4;if(Z.status==="dirty")return WO(Z.value);if(Y.value==="dirty")return WO(Z.value);return Z});else{if(Y.value==="aborted")return a4;let W=this._def.schema._parseSync({data:Q,path:X.path,parent:X});if(W.status==="aborted")return a4;if(W.status==="dirty")return WO(W.value);if(Y.value==="dirty")return WO(W.value);return W}}if(G.type==="refinement"){let Q=(W)=>{let Z=G.refinement(W,J);if(X.common.async)return Promise.resolve(Z);if(Z instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if(X.common.async===!1){let W=this._def.schema._parseSync({data:X.data,path:X.path,parent:X});if(W.status==="aborted")return a4;if(W.status==="dirty")Y.dirty();return Q(W.value),{status:Y.value,value:W.value}}else return this._def.schema._parseAsync({data:X.data,path:X.path,parent:X}).then((W)=>{if(W.status==="aborted")return a4;if(W.status==="dirty")Y.dirty();return Q(W.value).then(()=>{return{status:Y.value,value:W.value}})})}if(G.type==="transform")if(X.common.async===!1){let Q=this._def.schema._parseSync({data:X.data,path:X.path,parent:X});if(!jF(Q))return a4;let W=G.transform(Q.value,J);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:Y.value,value:W}}else return this._def.schema._parseAsync({data:X.data,path:X.path,parent:X}).then((Q)=>{if(!jF(Q))return a4;return Promise.resolve(G.transform(Q.value,J)).then((W)=>({status:Y.value,value:W}))});z8.assertNever(G)}};DK.create=($,Y,X)=>{return new DK({schema:$,typeName:U0.ZodEffects,effect:Y,...k6(X)})};DK.createWithPreprocess=($,Y,X)=>{return new DK({schema:Y,effect:{type:"preprocess",transform:$},typeName:U0.ZodEffects,...k6(X)})};DW=class DW extends a6{_parse($){if(this._getType($)===h1.undefined)return $G(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}};DW.create=($,Y)=>{return new DW({innerType:$,typeName:U0.ZodOptional,...k6(Y)})};NK=class NK extends a6{_parse($){if(this._getType($)===h1.null)return $G(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}};NK.create=($,Y)=>{return new NK({innerType:$,typeName:U0.ZodNullable,...k6(Y)})};xF=class xF extends a6{_parse($){let{ctx:Y}=this._processInputParams($),X=Y.data;if(Y.parsedType===h1.undefined)X=this._def.defaultValue();return this._def.innerType._parse({data:X,path:Y.path,parent:Y})}removeDefault(){return this._def.innerType}};xF.create=($,Y)=>{return new xF({innerType:$,typeName:U0.ZodDefault,defaultValue:typeof Y.default==="function"?Y.default:()=>Y.default,...k6(Y)})};Uw=class Uw extends a6{_parse($){let{ctx:Y}=this._processInputParams($),X={...Y,common:{...Y.common,issues:[]}},G=this._def.innerType._parse({data:X.data,path:X.path,parent:{...X}});if(Yw(G))return G.then((J)=>{return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new HQ(X.common.issues)},input:X.data})}});else return{status:"valid",value:G.status==="valid"?G.value:this._def.catchValue({get error(){return new HQ(X.common.issues)},input:X.data})}}removeCatch(){return this._def.innerType}};Uw.create=($,Y)=>{return new Uw({innerType:$,typeName:U0.ZodCatch,catchValue:typeof Y.catch==="function"?Y.catch:()=>Y.catch,...k6(Y)})};uh=class uh extends a6{_parse($){if(this._getType($)!==h1.nan){let X=this._getOrReturnCtx($);return o1(X,{code:L1.invalid_type,expected:h1.nan,received:X.parsedType}),a4}return{status:"valid",value:$.data}}};uh.create=($)=>{return new uh({typeName:U0.ZodNaN,...k6($)})};YK8=Symbol("zod_brand");a10=class a10 extends a6{_parse($){let{ctx:Y}=this._processInputParams($),X=Y.data;return this._def.type._parse({data:X,path:Y.path,parent:Y})}unwrap(){return this._def.type}};ph=class ph extends a6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.common.async)return(async()=>{let J=await this._def.in._parseAsync({data:X.data,path:X.path,parent:X});if(J.status==="aborted")return a4;if(J.status==="dirty")return Y.dirty(),WO(J.value);else return this._def.out._parseAsync({data:J.value,path:X.path,parent:X})})();else{let G=this._def.in._parseSync({data:X.data,path:X.path,parent:X});if(G.status==="aborted")return a4;if(G.status==="dirty")return Y.dirty(),{status:"dirty",value:G.value};else return this._def.out._parseSync({data:G.value,path:X.path,parent:X})}}static create($,Y){return new ph({in:$,out:Y,typeName:U0.ZodPipeline})}};Hw=class Hw extends a6{_parse($){let Y=this._def.innerType._parse($),X=(G)=>{if(jF(G))G.value=Object.freeze(G.value);return G};return Yw(Y)?Y.then((G)=>X(G)):X(Y)}unwrap(){return this._def.innerType}};Hw.create=($,Y)=>{return new Hw({innerType:$,typeName:U0.ZodReadonly,...k6(Y)})};XK8={object:m5.lazycreate};(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(U0||(U0={}));fg1=AW.create,gg1=DU.create,JK8=uh.create,QK8=CF.create,mg1=Jw.create,WK8=Cz.create,ZK8=hh.create,KK8=Qw.create,UK8=SF.create,HK8=ZO.create,zK8=TF.create,VK8=NU.create,AK8=fh.create,FK8=FW.create,lj0=m5.create,DK8=m5.strictCreate,NK8=kF.create,LK8=r10.create,BK8=Sz.create,OK8=LU.create,EK8=gh.create,MK8=mh.create,RK8=KO.create,qK8=Gw.create,IK8=Ww.create,PK8=Zw.create,wK8=vF.create,_K8=Kw.create,jK8=UO.create,TK8=DK.create,CK8=DW.create,SK8=NK.create,kK8=DK.createWithPreprocess,vK8=ph.create,hK8={string:($)=>AW.create({...$,coerce:!0}),number:($)=>DU.create({...$,coerce:!0}),boolean:($)=>Jw.create({...$,coerce:!0}),bigint:($)=>CF.create({...$,coerce:!0}),date:($)=>Cz.create({...$,coerce:!0})},fK8=a4});var NW={};W8(NW,{void:()=>AK8,util:()=>z8,unknown:()=>zK8,union:()=>NK8,undefined:()=>KK8,tuple:()=>OK8,transformer:()=>TK8,symbol:()=>ZK8,string:()=>fg1,strictObject:()=>DK8,setErrorMap:()=>k28,set:()=>RK8,record:()=>EK8,quotelessJson:()=>C28,promise:()=>jK8,preprocess:()=>kK8,pipeline:()=>vK8,ostring:()=>xK8,optional:()=>CK8,onumber:()=>yK8,oboolean:()=>bK8,objectUtil:()=>mj0,object:()=>lj0,number:()=>gg1,nullable:()=>SK8,null:()=>UK8,never:()=>VK8,nativeEnum:()=>_K8,nan:()=>JK8,map:()=>MK8,makeIssue:()=>bh,literal:()=>PK8,lazy:()=>IK8,late:()=>XK8,isValid:()=>jF,isDirty:()=>n10,isAsync:()=>Yw,isAborted:()=>i10,intersection:()=>BK8,instanceof:()=>GK8,getParsedType:()=>FU,getErrorMap:()=>$w,function:()=>qK8,enum:()=>wK8,effect:()=>TK8,discriminatedUnion:()=>LK8,defaultErrorMap:()=>jz,datetimeRegex:()=>yg1,date:()=>WK8,custom:()=>hg1,coerce:()=>hK8,boolean:()=>mg1,bigint:()=>QK8,array:()=>FK8,any:()=>HK8,addIssueToContext:()=>o1,ZodVoid:()=>fh,ZodUnknown:()=>TF,ZodUnion:()=>kF,ZodUndefined:()=>Qw,ZodType:()=>a6,ZodTuple:()=>LU,ZodTransformer:()=>DK,ZodSymbol:()=>hh,ZodString:()=>AW,ZodSet:()=>KO,ZodSchema:()=>a6,ZodRecord:()=>gh,ZodReadonly:()=>Hw,ZodPromise:()=>UO,ZodPipeline:()=>ph,ZodParsedType:()=>h1,ZodOptional:()=>DW,ZodObject:()=>m5,ZodNumber:()=>DU,ZodNullable:()=>NK,ZodNull:()=>SF,ZodNever:()=>NU,ZodNativeEnum:()=>Kw,ZodNaN:()=>uh,ZodMap:()=>mh,ZodLiteral:()=>Zw,ZodLazy:()=>Ww,ZodIssueCode:()=>L1,ZodIntersection:()=>Sz,ZodFunction:()=>Gw,ZodFirstPartyTypeKind:()=>U0,ZodError:()=>HQ,ZodEnum:()=>vF,ZodEffects:()=>DK,ZodDiscriminatedUnion:()=>r10,ZodDefault:()=>xF,ZodDate:()=>Cz,ZodCatch:()=>Uw,ZodBranded:()=>a10,ZodBoolean:()=>Jw,ZodBigInt:()=>CF,ZodArray:()=>FW,ZodAny:()=>ZO,Schema:()=>a6,ParseStatus:()=>NX,OK:()=>$G,NEVER:()=>fK8,INVALID:()=>a4,EMPTY_PATH:()=>v28,DIRTY:()=>WO,BRAND:()=>YK8});var ij0=V0(()=>{l10();pj0();Tg1();yh();ug1();c10()});var pg1;var cG=V0(()=>{ij0();ij0();pg1=NW});function e10($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function nj0($){}function rK8($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=nj0,onError:X=nj0,onRetry:G=nj0,onComment:J}=$,Q="",W=!0,Z,K="",H="";function z(D){let L=W?D.replace(/^\xEF\xBB\xBF/,""):D,[B,O]=aK8(`${Q}${L}`);for(let E of B)V(E);Q=O,W=!1}function V(D){if(D===""){F();return}if(D.startsWith(":")){J&&J(D.slice(D.startsWith(": ")?2:1));return}let L=D.indexOf(":");if(L!==-1){let B=D.slice(0,L),O=D[L+1]===" "?2:1,E=D.slice(L+O);A(B,E,D);return}A(D,"",D)}function A(D,L,B){switch(D){case"event":H=L;break;case"data":K=`${K}${L}
`;break;case"id":Z=L.includes("\x00")?void 0:L;break;case"retry":/^\d+$/.test(L)?G(parseInt(L,10)):X(new Ym1(`Invalid \`retry\` value: "${L}"`,{type:"invalid-retry",value:L,line:B}));break;default:X(new Ym1(`Unknown field "${D.length>20?`${D.slice(0,20)}\u2026`:D}"`,{type:"unknown-field",field:D,value:L,line:B}));break}}function F(){K.length>0&&Y({id:Z,event:H||void 0,data:K.endsWith(`
`)?K.slice(0,-1):K}),Z=void 0,K="",H=""}function N(D={}){Q&&D.consume&&V(Q),W=!0,Z=void 0,K="",H="",Q=""}return{feed:z,reset:N}}function aK8($){let Y=[],X="",G=0;for(;G<$.length;){let J=$.indexOf("\r",G),Q=$.indexOf(`
`,G),W=-1;if(J!==-1&&Q!==-1?W=Math.min(J,Q):J!==-1?J===$.length-1?W=-1:W=J:Q!==-1&&(W=Q),W===-1){X=$.slice(G);break}else{let Z=$.slice(G,W);Y.push(Z),G=W+1,$[G-1]==="\r"&&$[G]===`
`&&G++}}return[Y,X]}function ch(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}function lh($){return Object.fromEntries([...$.headers])}async function Em1({response:$,url:Y,maxBytes:X=ej0}){let G=$.headers.get("content-length");if(G!=null){let z=parseInt(G,10);if(!isNaN(z)&&z>X)throw new yF({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes (Content-Length: ${z}).`})}let J=$.body;if(J==null)return new Uint8Array(0);let Q=J.getReader(),W=[],Z=0;try{while(!0){let{done:z,value:V}=await Q.read();if(z)break;if(Z+=V.length,Z>X)throw new yF({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes.`});W.push(V)}}finally{try{await Q.cancel()}finally{Q.releaseLock()}}let K=new Uint8Array(Z),H=0;for(let z of W)K.set(z,H),H+=z.length;return K}function zw($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function Mm1({error:$,url:Y,requestBodyValues:X}){if(zw($))return $;if($ instanceof TypeError&&tK8.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new M$({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}return $}function $40($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function eK8($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function ih($,...Y){let X=new Headers(eK8($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}function Aw({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}function Jm1($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(Y38.test($)===!1&&X38.test($)===!1)return Y;return G38(Y)}function G38($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function qm1($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return Jm1($)}try{return Jm1($)}finally{Error.stackTraceLimit=Y}}function J38($){return{[t10]:!0,validate:$}}function Q38($){return typeof $==="object"&&$!==null&&t10 in $&&$[t10]===!0&&"validate"in $}function kz($){let Y;return()=>{if(Y==null)Y=$();return Y}}function W38($){return Q38($)?$:typeof $==="function"?$():Z38($)}function Z38($){return J38(async(Y)=>{let X=await $["~standard"].validate(Y);return X.issues==null?{success:!0,value:X.value}:{success:!1,error:new dh({value:Y,cause:X.issues})}})}async function K38({value:$,schema:Y}){let X=await zO({value:$,schema:Y});if(!X.success)throw dh.wrap({value:$,cause:X.error});return X.value}async function zO({value:$,schema:Y}){let X=W38(Y);try{if(X.validate==null)return{success:!0,value:$,rawValue:$};let G=await X.validate($);if(G.success)return{success:!0,value:G.value,rawValue:$};return{success:!1,error:dh.wrap({value:$,cause:G.error}),rawValue:$}}catch(G){return{success:!1,error:dh.wrap({value:$,cause:G}),rawValue:$}}}async function U38({text:$,schema:Y}){try{let X=qm1($);if(Y==null)return X;return K38({value:X,schema:Y})}catch(X){if(o10.isInstance(X)||dh.isInstance(X))throw X;throw new o10({text:$,cause:X})}}async function Fw({text:$,schema:Y}){try{let X=qm1($);if(Y==null)return{success:!0,value:X,rawValue:X};return await zO({value:X,schema:Y})}catch(X){return{success:!1,error:o10.isInstance(X)?X:new o10({text:$,cause:X}),rawValue:void 0}}}function H38({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new sK8).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await Fw({text:X,schema:Y}))}}))}function $T0($){return $}function YT0({id:$,name:Y,inputSchema:X,outputSchema:G}){return({execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K,...H})=>$T0({type:"provider-defined",id:$,name:Y,args:H,inputSchema:X,outputSchema:G,execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K})}async function BW($){if(typeof $==="function")$=$();return Promise.resolve($)}function VO($){let Y;return()=>{if(Y==null)Y=$();return Y}}function XT0($,{validate:Y}={}){return{[sj0]:!0,_type:void 0,[t10]:!0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function s10($){if($.type==="object"){$.additionalProperties=!1;let Y=$.properties;if(Y!=null)for(let X in Y)Y[X]=s10(Y[X])}if($.type==="array"&&$.items!=null)if(Array.isArray($.items))$.items=$.items.map((Y)=>s10(Y));else $.items=s10($.items);return $}function LW(){return{}}function D38($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=d9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function N38($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function L38(){return{type:"boolean"}}function Pm1($,Y){return d9($.type._def,Y)}function wm1($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>wm1($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return O38($)}}function E38($,Y){return{...d9($.innerType._def,Y),default:$.defaultValue()}}function M38($,Y){return Y.effectStrategy==="input"?d9($.schema._def,Y):LW()}function R38($){return{type:"string",enum:Array.from($.values)}}function I38($,Y){let X=[d9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),d9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(q38(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...Z}=J;Q=Z}G.push(Q)}}),G.length?{allOf:G}:void 0}function P38($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}function _m1($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":BK(X,"email",G.message,Y);break;case"format:idn-email":BK(X,"idn-email",G.message,Y);break;case"pattern:zod":lG(X,LK.email,G.message,Y);break}break;case"url":BK(X,"uri",G.message,Y);break;case"uuid":BK(X,"uuid",G.message,Y);break;case"regex":lG(X,G.regex,G.message,Y);break;case"cuid":lG(X,LK.cuid,G.message,Y);break;case"cuid2":lG(X,LK.cuid2,G.message,Y);break;case"startsWith":lG(X,RegExp(`^${aj0(G.value,Y)}`),G.message,Y);break;case"endsWith":lG(X,RegExp(`${aj0(G.value,Y)}$`),G.message,Y);break;case"datetime":BK(X,"date-time",G.message,Y);break;case"date":BK(X,"date",G.message,Y);break;case"time":BK(X,"time",G.message,Y);break;case"duration":BK(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{lG(X,RegExp(aj0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")BK(X,"ipv4",G.message,Y);if(G.version!=="v4")BK(X,"ipv6",G.message,Y);break}case"base64url":lG(X,LK.base64url,G.message,Y);break;case"jwt":lG(X,LK.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")lG(X,LK.ipv4Cidr,G.message,Y);if(G.version!=="v4")lG(X,LK.ipv6Cidr,G.message,Y);break}case"emoji":lG(X,LK.emoji(),G.message,Y);break;case"ulid":{lG(X,LK.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{BK(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{lG(X,LK.base64,G.message,Y);break}}break}case"nanoid":lG(X,LK.nanoid,G.message,Y)}return X}function aj0($,Y){return Y.patternStrategy==="escape"?_38($):$}function _38($){let Y="";for(let X=0;X<$.length;X++){if(!w38.has($[X]))Y+="\\";Y+=$[X]}return Y}function BK($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function lG($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:Wm1(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=Wm1(Y,G)}function Wm1($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,Z=!1,K=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(Z){if(J[H].match(/[a-z]/)){if(K)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),K=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],K=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=Z?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(Z&&J[H]==="]")Z=!1;else if(!Z&&J[H]==="[")Z=!0}return Q}function jm1($,Y){var X,G,J,Q,W,Z;let K={type:"object",additionalProperties:(X=d9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=_m1($.keyType._def,Y);return{...K,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...K,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((Z=$.keyType._def.type._def.checks)==null?void 0:Z.length)){let{type:H,...z}=Pm1($.keyType._def,Y);return{...K,propertyNames:z}}return K}function j38($,Y){if(Y.mapStrategy==="record")return jm1($,Y);let X=d9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||LW(),G=d9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||LW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function T38($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function C38(){return{not:LW()}}function S38(){return{type:"null"}}function k38($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in oj0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=oj0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return v38($,Y)}function x38($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[oj0[$.innerType._def.typeName],"null"]};let X=d9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function y38($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function b38($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let Z=J[W];if(Z===void 0||Z._def===void 0)continue;let K=f38(Z),H=d9(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!K)G.push(W)}if(G.length)X.required=G;let Q=h38($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function h38($,Y){if($.catchall._def.typeName!=="ZodNever")return d9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function f38($){try{return $.isOptional()}catch(Y){return!0}}function u38($,Y){return d9($.type._def,Y)}function p38($,Y){let G={type:"array",uniqueItems:!0,items:d9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function d38($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>d9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:d9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>d9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function c38(){return{not:LW()}}function l38(){return LW()}function d9($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let K=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(K!==A38)return K}if(J&&!X){let K=a38(J,Y);if(K!==void 0)return K}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=n38($,$.typeName,Y),Z=typeof W==="function"?d9(W(),Y):W;if(Z)s38($,Y,Z);if(Y.postProcess){let K=Y.postProcess(Z,$,Y);return Q.jsonSchema=Z,K}return Q.jsonSchema=Z,Z}function $U8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return XT0(()=>e38($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function YU8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return XT0(()=>s10($$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function XU8($){return"_zod"in $}function YG($,Y){if(XU8($))return YU8($,Y);else return $U8($,Y)}function GU8($){return typeof $==="object"&&$!==null&&sj0 in $&&$[sj0]===!0&&"jsonSchema"in $&&"validate"in $}function Y40($){return $==null?XT0({properties:{},additionalProperties:!1}):GU8($)?$:typeof $==="function"?$():YG($)}function GT0($){let Y;try{Y=new URL($)}catch(G){throw new yF({url:$,message:`Invalid URL: ${$}`})}if(Y.protocol==="data:")return;if(Y.protocol!=="http:"&&Y.protocol!=="https:")throw new yF({url:$,message:`URL scheme must be http, https, or data, got ${Y.protocol}`});let X=Y.hostname;if(!X)throw new yF({url:$,message:"URL must have a hostname"});if(X==="localhost"||X.endsWith(".local")||X.endsWith(".localhost"))throw new yF({url:$,message:`URL with hostname ${X} is not allowed`});if(X.startsWith("[")&&X.endsWith("]")){let G=X.slice(1,-1);if(JU8(G))throw new yF({url:$,message:`URL with IPv6 address ${X} is not allowed`});return}if(Tm1(X)){if(tj0(X))throw new yF({url:$,message:`URL with IP address ${X} is not allowed`});return}}function Tm1($){let Y=$.split(".");if(Y.length!==4)return!1;return Y.every((X)=>{let G=Number(X);return Number.isInteger(G)&&G>=0&&G<=255&&String(G)===X})}function tj0($){let Y=$.split(".").map(Number),[X,G]=Y;if(X===0)return!0;if(X===10)return!0;if(X===127)return!0;if(X===169&&G===254)return!0;if(X===172&&G>=16&&G<=31)return!0;if(X===192&&G===168)return!0;return!1}function JU8($){let Y=$.toLowerCase();if(Y==="::1")return!0;if(Y==="::")return!0;if(Y.startsWith("::ffff:")){let X=Y.slice(7);if(Tm1(X))return tj0(X);let G=X.split(":");if(G.length===2){let J=parseInt(G[0],16),Q=parseInt(G[1],16);if(!isNaN(J)&&!isNaN(Q)){let W=J>>8&255,Z=J&255,K=Q>>8&255,H=Q&255;return tj0(`${W}.${Z}.${K}.${H}`)}}}if(Y.startsWith("fc")||Y.startsWith("fd"))return!0;if(Y.startsWith("fe80"))return!0;return!1}function Cm1($){return $==null?void 0:$.replace(/\/$/,"")}var Zm1="vercel.ai.error",mK8,dg1,cg1,UY,Km1="AI_APICallError",Um1,uK8,lg1,ig1,M$,Hm1="AI_EmptyResponseBodyError",zm1,pK8,ng1,rg1,dK8,Vm1="AI_InvalidArgumentError",Am1,cK8,ag1,sg1,lK8,Fm1="AI_JSONParseError",Dm1,iK8,og1,tg1,o10,Nm1="AI_TypeValidationError",Lm1,nK8,eg1,$m1,dh,Ym1,sK8,Bm1="AI_DownloadError",Om1,oK8,Xm1,Gm1,yF,ej0=2147483648,Vw=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let Z=0;Z<Y;Z++)W[Z]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new lK8({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},HO,tK8,Rm1="3.0.25",$38=()=>globalThis.fetch,nh=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=$38()})=>{try{let W=await Q($,{method:"GET",headers:ih(Y,`ai-sdk/provider-utils/${Rm1}`,$40()),signal:J}),Z=lh(W);if(!W.ok){let K;try{K=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(zw(H)||M$.isInstance(H))throw H;throw new M$({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}throw K.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(K){if(K instanceof Error){if(zw(K)||M$.isInstance(K))throw K}throw new M$({message:"Failed to process successful response",cause:K,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}}catch(W){throw Mm1({error:W,url:$,requestBodyValues:{}})}},Y38,X38,t10,z38=()=>globalThis.fetch,rh=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>V38({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),V38=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=z38()})=>{try{let Z=await W($,{method:"POST",headers:ih(Y,`ai-sdk/provider-utils/${Rm1}`,$40()),body:X.content,signal:Q}),K=lh(Z);if(!Z.ok){let H;try{H=await J({response:Z,url:$,requestBodyValues:X.values})}catch(z){if(zw(z)||M$.isInstance(z))throw z;throw new M$({message:"Failed to process error response",cause:z,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}throw H.value}try{return await G({response:Z,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(zw(H)||M$.isInstance(H))throw H}throw new M$({message:"Failed to process successful response",cause:H,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}}catch(Z){throw Mm1({error:Z,url:$,requestBodyValues:X.values})}},vz=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),Z=lh(G);if(W.trim()==="")return{responseHeaders:Z,value:new M$({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let K=await U38({text:W,schema:$});return{responseHeaders:Z,value:new M$({message:Y(K),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,data:K,isRetryable:X==null?void 0:X(G,K)})}}catch(K){return{responseHeaders:Z,value:new M$({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},Im1=($)=>async({response:Y})=>{let X=lh(Y);if(Y.body==null)throw new dK8({});return{responseHeaders:X,value:H38({stream:Y.body,schema:$})}},bF=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await Fw({text:J,schema:$}),W=lh(Y);if(!Q.success)throw new M$({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},sj0,A38,Qm1,F38=($)=>typeof $==="string"?{...Qm1,name:$}:{...Qm1,...$},B38=($,Y)=>{return d9($.innerType._def,Y)},O38=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y},q38=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},rj0=void 0,LK,w38,oj0,v38=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>d9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},g38=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return d9($.innerType._def,Y);let G=d9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:LW()},G]}:LW()},m38=($,Y)=>{if(Y.pipeStrategy==="input")return d9($.in._def,Y);else if(Y.pipeStrategy==="output")return d9($.out._def,Y);let X=d9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=d9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},i38=($,Y)=>{return d9($.innerType._def,Y)},n38=($,Y,X)=>{switch(Y){case U0.ZodString:return _m1($,X);case U0.ZodNumber:return y38($);case U0.ZodObject:return b38($,X);case U0.ZodBigInt:return N38($);case U0.ZodBoolean:return L38();case U0.ZodDate:return wm1($,X);case U0.ZodUndefined:return c38();case U0.ZodNull:return S38();case U0.ZodArray:return D38($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return k38($,X);case U0.ZodIntersection:return I38($,X);case U0.ZodTuple:return d38($,X);case U0.ZodRecord:return jm1($,X);case U0.ZodLiteral:return P38($);case U0.ZodEnum:return R38($);case U0.ZodNativeEnum:return T38($);case U0.ZodNullable:return x38($,X);case U0.ZodOptional:return g38($,X);case U0.ZodMap:return j38($,X);case U0.ZodSet:return p38($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return u38($,X);case U0.ZodNaN:case U0.ZodNever:return C38();case U0.ZodEffects:return M38($,X);case U0.ZodAny:return LW();case U0.ZodUnknown:return l38();case U0.ZodDefault:return E38($,X);case U0.ZodBranded:return Pm1($,X);case U0.ZodReadonly:return i38($,X);case U0.ZodCatch:return B38($,X);case U0.ZodPipeline:return m38($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},r38=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},a38=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:r38(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),LW();return Y.$refStrategy==="seen"?LW():void 0}}},s38=($,Y,X)=>{if($.description)X.description=$.description;return X},o38=($)=>{let Y=F38($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},t38=($,Y)=>{var X;let G=o38(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var A;return{...H,[z]:(A=d9(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?A:LW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=d9($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:LW(),Z=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(Z!==void 0)W.title=Z;let K=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return K.$schema="http://json-schema.org/draft-07/schema#",K},e38;var JT0=V0(()=>{O1();cG();mK8=Symbol.for(Zm1),UY=class $ extends(cg1=Error,dg1=mK8,cg1){constructor({name:Y,message:X,cause:G}){super(X);this[dg1]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,Zm1)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},Um1=`vercel.ai.error.${Km1}`,uK8=Symbol.for(Um1),M$=class extends(ig1=UY,lg1=uK8,ig1){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:Km1,message:$,cause:W});this[lg1]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return UY.hasMarker($,Um1)}},zm1=`vercel.ai.error.${Hm1}`,pK8=Symbol.for(zm1),dK8=class extends(rg1=UY,ng1=pK8,rg1){constructor({message:$="Empty response body"}={}){super({name:Hm1,message:$});this[ng1]=!0}static isInstance($){return UY.hasMarker($,zm1)}};Am1=`vercel.ai.error.${Vm1}`,cK8=Symbol.for(Am1),lK8=class extends(sg1=UY,ag1=cK8,sg1){constructor({message:$,cause:Y,argument:X}){super({name:Vm1,message:$,cause:Y});this[ag1]=!0,this.argument=X}static isInstance($){return UY.hasMarker($,Am1)}},Dm1=`vercel.ai.error.${Fm1}`,iK8=Symbol.for(Dm1),o10=class extends(tg1=UY,og1=iK8,tg1){constructor({text:$,cause:Y}){super({name:Fm1,message:`JSON parsing failed: Text: ${$}.
Error message: ${e10(Y)}`,cause:Y});this[og1]=!0,this.text=$}static isInstance($){return UY.hasMarker($,Dm1)}},Lm1=`vercel.ai.error.${Nm1}`,nK8=Symbol.for(Lm1),dh=class $ extends($m1=UY,eg1=nK8,$m1){constructor({value:Y,cause:X}){super({name:Nm1,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${e10(X)}`,cause:X});this[eg1]=!0,this.value=Y}static isInstance(Y){return UY.hasMarker(Y,Lm1)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}},Ym1=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};sK8=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=rK8({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};Om1=`vercel.ai.error.${Bm1}`,oK8=Symbol.for(Om1),yF=class extends(Gm1=UY,Xm1=oK8,Gm1){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:Bm1,message:J,cause:G});this[Xm1]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return UY.hasMarker($,Om1)}};HO=Vw();tK8=["fetch failed","failed to fetch"];Y38=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,X38=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;t10=Symbol.for("vercel.ai.validator");sj0=Symbol.for("vercel.ai.schema");A38=Symbol("Let zodToJsonSchema decide on which parser to use"),Qm1={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"};LK={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:()=>{if(rj0===void 0)rj0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return rj0},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-_]*$/};w38=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");oj0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};e38=t38});function QU8(){return{headers:{}}}async function WU8(){if(process.env.VERCEL_OIDC_TOKEN)return process.env.VERCEL_OIDC_TOKEN??"";throw Error("@vercel/oidc is not available in the vendored @internal AI packages. Provide an API key instead.")}async function tm1({response:$,statusCode:Y,defaultMessage:X="Gateway request failed",cause:G,authMethod:J}){let Q=await zO({value:$,schema:OU8});if(!Q.success)return new BU8({message:`Invalid error response format: ${X}`,statusCode:Y,response:$,validationError:Q.error,cause:G});let W=Q.value,Z=W.error.type,K=W.error.message;switch(Z){case"authentication_error":return Fu1.createContextualError({apiKeyProvided:J==="api-key",oidcTokenProvided:J==="oidc",statusCode:Y,cause:G});case"invalid_request_error":return new HU8({message:K,statusCode:Y,cause:G});case"rate_limit_exceeded":return new VU8({message:K,statusCode:Y,cause:G});case"model_not_found":{let H=await zO({value:W.error.param,schema:FU8});return new DU8({message:K,statusCode:Y,modelId:H.success?H.value.modelId:void 0,cause:G})}case"internal_server_error":return new rm1({message:K,statusCode:Y,cause:G});default:return new rm1({message:K,statusCode:Y,cause:G})}}function EU8($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(Y){return $.responseBody}return{}}function Gu1($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(Y);return!1}async function cZ($,Y){var X;if(iG.isInstance($))return $;if(Gu1($))return Xu1.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(M$.isInstance($)){if($.cause&&Gu1($.cause))return Xu1.createTimeoutError({originalMessage:$.message,cause:$});return await tm1({response:EU8($),statusCode:(X=$.statusCode)!=null?X:500,defaultMessage:"Gateway request failed",cause:$,authMethod:Y})}return await tm1({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:Y})}async function hF($){let Y=await zO({value:$[Mu1],schema:RU8});return Y.success?Y.value:void 0}async function iU8(){var $;return($=QU8().headers)==null?void 0:$["x-vercel-id"]}function aU8($={}){var Y,X;let G=null,J=null,Q=(Y=$.metadataCacheRefreshMillis)!=null?Y:300000,W=0,Z=(X=Cm1($.baseURL))!=null?X:"https://ai-gateway.vercel.sh/v1/ai",K=async()=>{let L=await sU8($);if(L)return ih({Authorization:`Bearer ${L.token}`,"ai-gateway-protocol-version":rU8,[Mu1]:L.authMethod,...$.headers},`ai-sdk/gateway/${nU8}`);throw Fu1.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401})},H=()=>{let L=Aw({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),B=Aw({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),O=Aw({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),E=Aw({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let M=await iU8();return{...L&&{"ai-o11y-deployment-id":L},...B&&{"ai-o11y-environment":B},...O&&{"ai-o11y-region":O},...M&&{"ai-o11y-request-id":M},...E&&{"ai-o11y-project-id":E}}}},z=(L)=>{return new CU8(L,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},V=async()=>{var L,B,O;let E=(O=(B=(L=$._internal)==null?void 0:L.currentDate)==null?void 0:B.call(L).getTime())!=null?O:Date.now();if(!G||E-W>Q)W=E,G=new Ju1({baseURL:Z,headers:K,fetch:$.fetch}).getAvailableModels().then((M)=>{return J=M,M}).catch(async(M)=>{throw await cZ(M,await hF(await K()))});return J?Promise.resolve(J):G},A=async()=>{return new Ju1({baseURL:Z,headers:K,fetch:$.fetch}).getCredits().catch(async(L)=>{throw await cZ(L,await hF(await K()))})},F=async(L)=>{return new wU8({baseURL:Z,headers:K,fetch:$.fetch}).getSpendReport(L).catch(async(B)=>{throw await cZ(B,await hF(await K()))})},N=async(L)=>{return new jU8({baseURL:Z,headers:K,fetch:$.fetch}).getGenerationInfo(L).catch(async(B)=>{throw await cZ(B,await hF(await K()))})},D=function(L){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return z(L)};return D.getAvailableModels=V,D.getCredits=A,D.getSpendReport=F,D.getGenerationInfo=N,D.imageModel=(L)=>{return new vU8(L,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},D.languageModel=z,D.textEmbeddingModel=(L)=>{return new SU8(L,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},D.tools=lU8,D}async function sU8($){let Y=Aw({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(Y)return{token:Y,authMethod:"api-key"};try{return{token:await WU8(),authMethod:"oidc"}}catch(X){return null}}function tU8($){var Y=new Set([$]),X=new Set,G=$.match(Qu1);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(K){return K===$};function Q(Z){return X.add(Z),!1}function W(Z){return Y.add(Z),!0}return function(K){if(Y.has(K))return!0;if(X.has(K))return!1;var H=K.match(Qu1);if(!H)return Q(K);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(K);if(J.major!==z.major)return Q(K);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(K);return Q(K)}if(J.minor<=z.minor)return W(K);return Q(K)}}function FT0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=th[oh]=(J=th[oh])!==null&&J!==void 0?J:{version:AO};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==AO){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+AO);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+AO+"."),!0}function eh($){var Y,X,G=(Y=th[oh])===null||Y===void 0?void 0:Y.version;if(!G||!eU8(G))return;return(X=th[oh])===null||X===void 0?void 0:X[$]}function DT0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+AO+".");var X=th[oh];if(X)delete X[$]}function ah($,Y,X){var G=eh("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,XH8([],YH8(X),!1))}function JH8($,Y){if($<OW.NONE)$=OW.NONE;else if($>OW.ALL)$=OW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",OW.ERROR),warn:X("warn",OW.WARN),info:X("info",OW.INFO),debug:X("debug",OW.DEBUG),verbose:X("verbose",OW.VERBOSE)}}function KH8($){return Symbol.for($)}function LT0($){return $.getValue(NT0)||void 0}function BH8(){return LT0(Ru1.getInstance().active())}function BT0($,Y){return $.setValue(NT0,Y)}function OH8($){return $.deleteValue(NT0)}function EH8($,Y){return BT0($,new sh(Y))}function Pu1($){var Y;return(Y=LT0($))===null||Y===void 0?void 0:Y.spanContext()}function qH8($){return MH8.test($)&&$!==Iu1}function IH8($){return RH8.test($)&&$!==qu1}function wu1($){return qH8($.traceId)&&IH8($.spanId)}function PH8($){return new sh($)}function wH8($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}function OT0($){return({steps:Y})=>Y.length===$}function Uu1({output:$,tool:Y,errorMode:X}){if(X==="text")return{type:"error-text",value:e10($)};else if(X==="json")return{type:"error-json",value:Hu1($)};if(Y==null?void 0:Y.toModelOutput)return Y.toModelOutput($);return typeof $==="string"?{type:"text",value:$}:{type:"json",value:Hu1($)}}function Hu1($){return $===void 0?null:$}function Wz8($){let Y=["ROOT"],X=-1,G=null;function J(K,H,z){switch(K){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let K=0;K<$.length;K++){let H=$[K];switch(Y[Y.length-1]){case"ROOT":J(H,K,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=K,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,K,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,K);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=K;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=K}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=K,Y.pop();break}default:{X=K,J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=K,Y.pop();break}default:{X=K;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=K;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=K;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,K+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K)}else X=K;break}}}let Z=$.slice(0,X+1);for(let K=Y.length-1;K>=0;K--)switch(Y[K]){case"INSIDE_STRING":{Z+='"';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":{Z+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{Z+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))Z+="true".slice(z.length);else if("false".startsWith(z))Z+="false".slice(z.length);else if("null".startsWith(z))Z+="null".slice(z.length)}}return Z}async function gF($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=await Fw({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=await Fw({text:Wz8($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}function HT0($){return $.type.startsWith("data-")}function zT0($){return $.type==="text"}function VT0($){return $.type==="file"}function zu1($){return $.type==="reasoning"}function zQ($){return $.type.startsWith("tool-")}function ET0($){return $.type==="dynamic-tool"}function Vu1($){return zQ($)||ET0($)}function uu1($){return $.type.split("-").slice(1).join("-")}function Zz8($){return ET0($)?$.toolName:uu1($)}function MT0($,Y){let X=[];if(Y==null?void 0:Y.ignoreIncompleteToolCalls)$=$.map((G)=>({...G,parts:G.parts.filter((J)=>!Vu1(J)||J.state!=="input-streaming"&&J.state!=="input-available")}));for(let G of $)switch(G.role){case"system":{let J=G.parts.filter((W)=>W.type==="text"),Q=J.reduce((W,Z)=>{if(Z.providerMetadata!=null)return{...W,...Z.providerMetadata};return W},{});X.push({role:"system",content:J.map((W)=>W.text).join(""),...Object.keys(Q).length>0?{providerOptions:Q}:{}});break}case"user":{X.push({role:"user",content:G.parts.map((J)=>{var Q;if(zT0(J))return{type:"text",text:J.text,...J.providerMetadata!=null?{providerOptions:J.providerMetadata}:{}};if(VT0(J))return{type:"file",mediaType:J.mediaType,filename:J.filename,data:J.url,...J.providerMetadata!=null?{providerOptions:J.providerMetadata}:{}};if(HT0(J))return(Q=Y==null?void 0:Y.convertDataPart)==null?void 0:Q.call(Y,J)}).filter((J)=>J!=null)});break}case"assistant":{if(G.parts!=null){let J=function(){var W,Z,K;if(Q.length===0)return;let H=[];for(let V of Q)if(zT0(V))H.push({type:"text",text:V.text,...V.providerMetadata!=null?{providerOptions:V.providerMetadata}:{}});else if(VT0(V))H.push({type:"file",mediaType:V.mediaType,filename:V.filename,data:V.url});else if(zu1(V))H.push({type:"reasoning",text:V.text,providerOptions:V.providerMetadata});else if(ET0(V)){let A=V.toolName;if(V.state!=="input-streaming")H.push({type:"tool-call",toolCallId:V.toolCallId,toolName:A,input:V.input,...V.callProviderMetadata!=null?{providerOptions:V.callProviderMetadata}:{}})}else if(zQ(V)){let A=uu1(V);if(V.state!=="input-streaming"){if(H.push({type:"tool-call",toolCallId:V.toolCallId,toolName:A,input:V.state==="output-error"?(W=V.input)!=null?W:V.rawInput:V.input,providerExecuted:V.providerExecuted,...V.callProviderMetadata!=null?{providerOptions:V.callProviderMetadata}:{}}),V.providerExecuted===!0&&(V.state==="output-available"||V.state==="output-error"))H.push({type:"tool-result",toolCallId:V.toolCallId,toolName:A,output:Uu1({output:V.state==="output-error"?V.errorText:V.output,tool:(Z=Y==null?void 0:Y.tools)==null?void 0:Z[A],errorMode:V.state==="output-error"?"json":"none"}),...V.callProviderMetadata!=null?{providerOptions:V.callProviderMetadata}:{}})}}else if(HT0(V)){let A=(K=Y==null?void 0:Y.convertDataPart)==null?void 0:K.call(Y,V);if(A!=null)H.push(A)}else throw Error(`Unsupported part: ${V}`);X.push({role:"assistant",content:H});let z=Q.filter((V)=>zQ(V)&&V.providerExecuted!==!0||V.type==="dynamic-tool");if(z.length>0)X.push({role:"tool",content:z.map((V)=>{var A;switch(V.state){case"output-error":case"output-available":{let F=Zz8(V);return{type:"tool-result",toolCallId:V.toolCallId,toolName:F,output:Uu1({output:V.state==="output-error"?V.errorText:V.output,tool:(A=Y==null?void 0:Y.tools)==null?void 0:A[F],errorMode:V.state==="output-error"?"text":"none"}),...V.callProviderMetadata!=null?{providerOptions:V.callProviderMetadata}:{}}}default:return null}}).filter((V)=>V!=null)});Q=[]},Q=[];for(let W of G.parts)if(zT0(W)||zu1(W)||VT0(W)||Vu1(W)||HT0(W))Q.push(W);else if(W.type==="step-start")J();J();break}break}default:{let J=G.role;throw new cH8({originalMessage:G,message:`Unsupported role: ${J}`})}}return X}function Kz8($){return({url:Y,abortSignal:X})=>oH8({url:Y,maxBytes:void 0,abortSignal:X})}function fF($,Y){if($===Y)return!0;if($==null||Y==null)return!1;if(typeof $!=="object"&&typeof Y!=="object")return $===Y;if($.constructor!==Y.constructor)return!1;if($ instanceof Date&&Y instanceof Date)return $.getTime()===Y.getTime();if(Array.isArray($)){if($.length!==Y.length)return!1;for(let J=0;J<$.length;J++)if(!fF($[J],Y[J]))return!1;return!0}let X=Object.keys($),G=Object.keys(Y);if(X.length!==G.length)return!1;for(let J of X){if(!G.includes(J))return!1;if(!fF($[J],Y[J]))return!1}return!0}var ZU8="vercel.ai.gateway.error",QT0,Sm1,km1,iG,Au1="GatewayAuthenticationError",KU8,vm1,xm1,ym1,Fu1,Du1="GatewayInvalidRequestError",UU8,bm1,hm1,fm1,HU8,Nu1="GatewayRateLimitError",zU8,gm1,mm1,um1,VU8,Lu1="GatewayModelNotFoundError",AU8,pm1,FU8,dm1,cm1,DU8,Bu1="GatewayInternalServerError",NU8,lm1,im1,nm1,rm1,Ou1="GatewayResponseError",LU8,am1,sm1,om1,BU8,OU8,Eu1="GatewayTimeoutError",MU8,em1,$u1,Yu1,Xu1,Mu1="ai-gateway-auth-method",RU8,qU8,Ju1=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await nh({url:`${this.config.baseURL}/config`,headers:await BW(this.config.headers()),successfulResponseHandler:bF(IU8),failedResponseHandler:vz({errorSchema:U.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return $}catch($){throw await cZ($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:Y}=await nh({url:`${$.origin}/v1/credits`,headers:await BW(this.config.headers()),successfulResponseHandler:bF(PU8),failedResponseHandler:vz({errorSchema:U.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Y}catch($){throw await cZ($)}}},IU8,PU8,wU8=class{constructor($){this.config=$}async getSpendReport($){try{let Y=new URL(this.config.baseURL),X=new URLSearchParams;if(X.set("start_date",$.startDate),X.set("end_date",$.endDate),$.groupBy)X.set("group_by",$.groupBy);if($.datePart)X.set("date_part",$.datePart);if($.userId)X.set("user_id",$.userId);if($.model)X.set("model",$.model);if($.provider)X.set("provider",$.provider);if($.credentialType)X.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)X.set("tags",$.tags.join(","));let{value:G}=await nh({url:`${Y.origin}/v1/report?${X.toString()}`,headers:await BW(this.config.headers()),successfulResponseHandler:bF(_U8),failedResponseHandler:vz({errorSchema:U.any(),errorToMessage:(J)=>J}),fetch:this.config.fetch});return G}catch(Y){throw await cZ(Y)}}},_U8,jU8=class{constructor($){this.config=$}async getGenerationInfo($){try{let Y=new URL(this.config.baseURL),{value:X}=await nh({url:`${Y.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await BW(this.config.headers()),successfulResponseHandler:bF(TU8),failedResponseHandler:vz({errorSchema:U.any(),errorToMessage:(G)=>G}),fetch:this.config.fetch});return X}catch(Y){throw await cZ(Y)}}},TU8,CU8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:Y,...X}=$;return{args:this.maybeEncodeFileParts(X),warnings:[]}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await BW(this.config.headers());try{let{responseHeaders:Q,value:W,rawValue:Z}=await rh({url:this.getUrl(),headers:ch(J,$.headers,this.getModelConfigHeaders(this.modelId,!1),await BW(this.config.o11yHeaders)),body:Y,successfulResponseHandler:bF(U.any()),failedResponseHandler:vz({errorSchema:U.any(),errorToMessage:(K)=>K}),...G&&{abortSignal:G},fetch:this.config.fetch});return{...W,request:{body:Y},response:{headers:Q,body:Z},warnings:X}}catch(Q){throw await cZ(Q,await hF(J))}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await BW(this.config.headers());try{let{value:Q,responseHeaders:W}=await rh({url:this.getUrl(),headers:ch(J,$.headers,this.getModelConfigHeaders(this.modelId,!0),await BW(this.config.o11yHeaders)),body:Y,successfulResponseHandler:Im1(U.any()),failedResponseHandler:vz({errorSchema:U.any(),errorToMessage:(Z)=>Z}),...G&&{abortSignal:G},fetch:this.config.fetch});return{stream:Q.pipeThrough(new TransformStream({start(Z){if(X.length>0)Z.enqueue({type:"stream-start",warnings:X})},transform(Z,K){if(Z.success){let H=Z.value;if(H.type==="raw"&&!$.includeRawChunks)return;if(H.type==="response-metadata"&&H.timestamp&&typeof H.timestamp==="string")H.timestamp=new Date(H.timestamp);K.enqueue(H)}else K.error(Z.error)}})),request:{body:Y},response:{headers:W}}}catch(Q){throw await cZ(Q,await hF(J))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let Y of $.prompt)for(let X of Y.content)if(this.isFilePart(X)){let G=X;if(G.data instanceof Uint8Array){let J=Uint8Array.from(G.data),Q=Buffer.from(J).toString("base64");G.data=new URL(`data:${G.mediaType||"application/octet-stream"};base64,${Q}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,Y){return{"ai-language-model-specification-version":"2","ai-language-model-id":$,"ai-language-model-streaming":String(Y)}}},SU8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;let Q=await BW(this.config.headers());try{let{responseHeaders:W,value:Z,rawValue:K}=await rh({url:this.getUrl(),headers:ch(Q,Y!=null?Y:{},this.getModelConfigHeaders(),await BW(this.config.o11yHeaders)),body:{input:$.length===1?$[0]:$,...G?{providerOptions:G}:{}},successfulResponseHandler:bF(kU8),failedResponseHandler:vz({errorSchema:U.any(),errorToMessage:(H)=>H}),...X&&{abortSignal:X},fetch:this.config.fetch});return{embeddings:Z.embeddings,usage:(J=Z.usage)!=null?J:void 0,providerMetadata:Z.providerMetadata,response:{headers:W,body:K}}}catch(W){throw await cZ(W,await hF(Q))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"2","ai-model-id":this.modelId}}},kU8,vU8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:Z}){var K,H,z,V;let A=await BW(this.config.headers());try{let{responseHeaders:F,value:N}=await rh({url:this.getUrl(),headers:ch(A,W!=null?W:{},this.getModelConfigHeaders(),await BW(this.config.o11yHeaders)),body:{prompt:$,n:Y,...X&&{size:X},...G&&{aspectRatio:G},...J&&{seed:J},...Q&&{providerOptions:Q}},successfulResponseHandler:bF(bU8),failedResponseHandler:vz({errorSchema:U.any(),errorToMessage:(D)=>D}),...Z&&{abortSignal:Z},fetch:this.config.fetch});return{images:N.images,warnings:(K=N.warnings)!=null?K:[],providerMetadata:N.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:F},...N.usage!=null&&{usage:{inputTokens:(H=N.usage.inputTokens)!=null?H:void 0,outputTokens:(z=N.usage.outputTokens)!=null?z:void 0,totalTokens:(V=N.usage.totalTokens)!=null?V:void 0}}}}catch(F){throw await cZ(F,await hF(A))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"2","ai-model-id":this.modelId}}},xU8,yU8,bU8,hU8,fU8,gU8,mU8=($={})=>gU8($),uU8,pU8,dU8,cU8=($={})=>dU8($),lU8,nU8="2.0.88",rU8="0.0.1",vg5,oU8,AO="1.9.0",Qu1,eU8,$H8,oh,th,YH8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},XH8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},GH8,OW,QH8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},WH8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},ZH8="diag",X40,UH8,HH8,zH8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},VH8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},AH8,FH8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},DH8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},WT0="context",NH8,Ru1,AT0,qu1="0000000000000000",Iu1="00000000000000000000000000000000",LH8,sh,NT0,MH8,RH8,ZT0,_u1,_H8,jH8,TH8,CH8,Wu1,Zu1,KT0="trace",SH8,xg5,kH8,vH8=($,Y)=>{for(var X in Y)kH8($,X,{get:Y[X],enumerable:!0})},xH8="AI_InvalidArgumentError",yH8,bH8,hH8,ju1="AI_NoObjectGeneratedError",Tu1,fH8,Cu1,Ku1,gH8="AI_InvalidDataContentError",mH8,uH8,pH8,Su1="AI_MessageConversionError",ku1,dH8,vu1,cH8,xu1="AI_DownloadError",yu1,lH8,bu1,UT0,iH8="AI_RetryError",nH8,rH8,aH8,sH8="5.0.186",oH8=async({url:$,maxBytes:Y,abortSignal:X})=>{var G;let J=$.toString();GT0(J);try{let Q=await fetch(J,{headers:ih({},`ai-sdk/${sH8}`,$40()),signal:X});if(Q.redirected)GT0(Q.url);if(!Q.ok)throw new UT0({url:J,statusCode:Q.status,statusText:Q.statusText});return{data:await Em1({response:Q,url:J,maxBytes:ej0}),mediaType:(G=Q.headers.get("content-type"))!=null?G:void 0}}catch(Q){if(UT0.isInstance(Q))throw Q;throw new UT0({url:J,cause:Q})}},hu1,$f,v8,fu1,tH8,gu1,eH8,$z8,Yz8,mu1,Xz8,Gz8,Jz8,Qz8,Uz8,Hz8=()=>({type:"text",responseFormat:{type:"text"},async parsePartial({text:$}){return{partial:$}},async parseOutput({text:$}){return $}}),zz8=({schema:$})=>{let Y=Y40($);return{type:"object",responseFormat:{type:"json",schema:Y.jsonSchema},async parsePartial({text:X}){let G=await gF(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:G.value};default:{let J=G.state;throw Error(`Unsupported parse state: ${J}`)}}},async parseOutput({text:X},G){let J=await Fw({text:X});if(!J.success)throw new Ku1({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});let Q=await zO({value:J.value,schema:Y});if(!Q.success)throw new Ku1({message:"No object generated: response did not match schema.",cause:Q.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return Q.value}}},yg5;var RT0=V0(()=>{JT0();O1();KY();QT0=Symbol.for(ZU8),iG=class $ extends(km1=Error,Sm1=QT0,km1){constructor({message:Y,statusCode:X=500,cause:G}){super(Y);this[Sm1]=!0,this.statusCode=X,this.cause=G}static isInstance(Y){return $.hasMarker(Y)}static hasMarker(Y){return typeof Y==="object"&&Y!==null&&QT0 in Y&&Y[QT0]===!0}},KU8=`vercel.ai.gateway.error.${Au1}`,vm1=Symbol.for(KU8),Fu1=class $ extends(ym1=iG,xm1=vm1,ym1){constructor({message:Y="Authentication failed",statusCode:X=401,cause:G}={}){super({message:Y,statusCode:X,cause:G});this[xm1]=!0,this.name=Au1,this.type="authentication_error"}static isInstance(Y){return iG.hasMarker(Y)&&vm1 in Y}static createContextualError({apiKeyProvided:Y,oidcTokenProvided:X,message:G="Authentication failed",statusCode:J=401,cause:Q}){let W;if(Y)W=`AI Gateway authentication failed: Invalid API key.

Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys

Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;else if(X)W=`AI Gateway authentication failed: Invalid OIDC token.

Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.

Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;else W=`AI Gateway authentication failed: No authentication provided.

Option 1 - API key:
Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.

Option 2 - OIDC token:
Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:W,statusCode:J,cause:Q})}},UU8=`vercel.ai.gateway.error.${Du1}`,bm1=Symbol.for(UU8),HU8=class extends(fm1=iG,hm1=bm1,fm1){constructor({message:$="Invalid request",statusCode:Y=400,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[hm1]=!0,this.name=Du1,this.type="invalid_request_error"}static isInstance($){return iG.hasMarker($)&&bm1 in $}},zU8=`vercel.ai.gateway.error.${Nu1}`,gm1=Symbol.for(zU8),VU8=class extends(um1=iG,mm1=gm1,um1){constructor({message:$="Rate limit exceeded",statusCode:Y=429,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[mm1]=!0,this.name=Nu1,this.type="rate_limit_exceeded"}static isInstance($){return iG.hasMarker($)&&gm1 in $}},AU8=`vercel.ai.gateway.error.${Lu1}`,pm1=Symbol.for(AU8),FU8=kz(()=>YG(U.object({modelId:U.string()}))),DU8=class extends(cm1=iG,dm1=pm1,cm1){constructor({message:$="Model not found",statusCode:Y=404,modelId:X,cause:G}={}){super({message:$,statusCode:Y,cause:G});this[dm1]=!0,this.name=Lu1,this.type="model_not_found",this.modelId=X}static isInstance($){return iG.hasMarker($)&&pm1 in $}},NU8=`vercel.ai.gateway.error.${Bu1}`,lm1=Symbol.for(NU8),rm1=class extends(nm1=iG,im1=lm1,nm1){constructor({message:$="Internal server error",statusCode:Y=500,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[im1]=!0,this.name=Bu1,this.type="internal_server_error"}static isInstance($){return iG.hasMarker($)&&lm1 in $}},LU8=`vercel.ai.gateway.error.${Ou1}`,am1=Symbol.for(LU8),BU8=class extends(om1=iG,sm1=am1,om1){constructor({message:$="Invalid response from Gateway",statusCode:Y=502,response:X,validationError:G,cause:J}={}){super({message:$,statusCode:Y,cause:J});this[sm1]=!0,this.name=Ou1,this.type="response_error",this.response=X,this.validationError=G}static isInstance($){return iG.hasMarker($)&&am1 in $}};OU8=kz(()=>YG(U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.unknown().nullish(),code:U.union([U.string(),U.number()]).nullish()})})));MU8=`vercel.ai.gateway.error.${Eu1}`,em1=Symbol.for(MU8),Xu1=class $ extends(Yu1=iG,$u1=em1,Yu1){constructor({message:Y="Request timed out",statusCode:X=408,cause:G}={}){super({message:Y,statusCode:X,cause:G});this[$u1]=!0,this.name=Eu1,this.type="timeout_error"}static isInstance(Y){return iG.hasMarker(Y)&&em1 in Y}static createTimeoutError({originalMessage:Y,statusCode:X=408,cause:G}){let J=`Gateway request timed out: ${Y}

    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 $({message:J,statusCode:X,cause:G})}};RU8=kz(()=>YG(U.union([U.literal("api-key"),U.literal("oidc")]))),qU8=["embedding","image","language"],IU8=kz(()=>YG(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:$,output:Y,input_cache_read:X,input_cache_write:G})=>({input:$,output:Y,...X?{cachedInputTokens:X}:{},...G?{cacheCreationInputTokens:G}:{}})).nullish(),specification:U.object({specificationVersion:U.literal("v2"),provider:U.string(),modelId:U.string()}),modelType:U.string().nullish()})).transform(($)=>$.filter((Y)=>Y.modelType==null||qU8.includes(Y.modelType)))}))),PU8=kz(()=>YG(U.object({balance:U.string(),total_used:U.string()}).transform(({balance:$,total_used:Y})=>({balance:$,totalUsed:Y})))),_U8=VO(()=>YG(U.object({results:U.array(U.object({day:U.string().optional(),hour:U.string().optional(),user:U.string().optional(),model:U.string().optional(),tag:U.string().optional(),provider:U.string().optional(),credential_type:U.enum(["byok","system"]).optional(),total_cost:U.number(),market_cost:U.number().optional(),input_tokens:U.number().optional(),output_tokens:U.number().optional(),cached_input_tokens:U.number().optional(),cache_creation_input_tokens:U.number().optional(),reasoning_tokens:U.number().optional(),request_count:U.number().optional()}).transform(({credential_type:$,total_cost:Y,market_cost:X,input_tokens:G,output_tokens:J,cached_input_tokens:Q,cache_creation_input_tokens:W,reasoning_tokens:Z,request_count:K,...H})=>({...H,...$!==void 0?{credentialType:$}:{},totalCost:Y,...X!==void 0?{marketCost:X}:{},...G!==void 0?{inputTokens:G}:{},...J!==void 0?{outputTokens:J}:{},...Q!==void 0?{cachedInputTokens:Q}:{},...W!==void 0?{cacheCreationInputTokens:W}:{},...Z!==void 0?{reasoningTokens:Z}:{},...K!==void 0?{requestCount:K}:{}})))}))),TU8=VO(()=>YG(U.object({data:U.object({id:U.string(),total_cost:U.number(),upstream_inference_cost:U.number(),usage:U.number(),created_at:U.string(),model:U.string(),is_byok:U.boolean(),provider_name:U.string(),streamed:U.boolean(),finish_reason:U.string(),latency:U.number(),generation_time:U.number(),native_tokens_prompt:U.number(),native_tokens_completion:U.number(),native_tokens_reasoning:U.number(),native_tokens_cached:U.number(),native_tokens_cache_creation:U.number(),billable_web_search_calls:U.number()}).transform(({total_cost:$,upstream_inference_cost:Y,created_at:X,is_byok:G,provider_name:J,finish_reason:Q,generation_time:W,native_tokens_prompt:Z,native_tokens_completion:K,native_tokens_reasoning:H,native_tokens_cached:z,native_tokens_cache_creation:V,billable_web_search_calls:A,...F})=>({...F,totalCost:$,upstreamInferenceCost:Y,createdAt:X,isByok:G,providerName:J,finishReason:Q,generationTime:W,promptTokens:Z,completionTokens:K,reasoningTokens:H,cachedTokens:z,cacheCreationTokens:V,billableWebSearchCalls:A}))}).transform(({data:$})=>$))),kU8=kz(()=>YG(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()}))),xU8=U.object({images:U.array(U.unknown()).optional()}).catchall(U.unknown()),yU8=U.object({inputTokens:U.number().nullish(),outputTokens:U.number().nullish(),totalTokens:U.number().nullish()}),bU8=U.object({images:U.array(U.string()),warnings:U.array(U.object({type:U.literal("other"),message:U.string()})).optional(),providerMetadata:U.record(U.string(),xU8).optional(),usage:yU8.optional()}),hU8=VO(()=>YG(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.")}))),fU8=VO(()=>YG(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()})]))),gU8=YT0({id:"gateway.parallel_search",name:"parallel_search",inputSchema:hU8,outputSchema:fU8}),uU8=VO(()=>YG(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.")}))),pU8=VO(()=>YG(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()})]))),dU8=YT0({id:"gateway.perplexity_search",name:"perplexity_search",inputSchema:uU8,outputSchema:pU8}),lU8={parallelSearch:mU8,perplexitySearch:cU8};vg5=aU8();oU8=typeof globalThis==="object"?globalThis:global,Qu1=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;eU8=tU8(AO),$H8=AO.split(".")[0],oh=Symbol.for("opentelemetry.js.api."+$H8),th=oU8;GH8=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return ah("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return ah("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return ah("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return ah("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return ah("verbose",this._namespace,Y)},$}();(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(OW||(OW={}));X40=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var Z=eh("diag");if(!Z)return;return Z[J].apply(Z,WH8([],QH8(Q),!1))}}var X=this,G=function(J,Q){var W,Z,K;if(Q===void 0)Q={logLevel:OW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=eh("diag"),V=JH8((Z=Q.logLevel)!==null&&Z!==void 0?Z:OW.INFO,J);if(z&&!Q.suppressOverrideMessage){var A=(K=Error().stack)!==null&&K!==void 0?K:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+A),V.warn("Current logger will overwrite one already registered from "+A)}return FT0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){DT0(ZH8,X)},X.createComponentLogger=function(J){return new GH8(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();UH8=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),HH8=new UH8,AH8=function(){function $(){}return $.prototype.active=function(){return HH8},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,VH8([G],zH8(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),NH8=new AH8,Ru1=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return FT0(WT0,Y,X40.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,DH8([Y,X,G],FH8(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return eh(WT0)||NH8},$.prototype.disable=function(){this._getContextManager().disable(),DT0(WT0,X40.instance())},$}();(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(AT0||(AT0={}));LH8={traceId:Iu1,spanId:qu1,traceFlags:AT0.NONE},sh=function(){function $(Y){if(Y===void 0)Y=LH8;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),NT0=KH8("OpenTelemetry Context Key SPAN");MH8=/^([0-9a-f]{32})$/i,RH8=/^[0-9a-f]{16}$/i;ZT0=Ru1.getInstance(),_u1=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=ZT0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new sh;var Q=G&&Pu1(G);if(wH8(Q)&&wu1(Q))return new sh(Q);else return new sh},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,Z;if(arguments.length<2)return;else if(arguments.length===2)Z=X;else if(arguments.length===3)Q=X,Z=G;else Q=X,W=G,Z=J;var K=W!==null&&W!==void 0?W:ZT0.active(),H=this.startSpan(Y,Q,K),z=BT0(K,H);return ZT0.with(z,Z,void 0,H)},$}();_H8=new _u1,jH8=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return _H8;return this._delegate=Y,this._delegate},$}(),TH8=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new _u1},$}(),CH8=new TH8,Wu1=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new jH8(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:CH8},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}();(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(Zu1||(Zu1={}));SH8=function(){function $(){this._proxyTracerProvider=new Wu1,this.wrapSpanContext=PH8,this.isSpanContextValid=wu1,this.deleteSpan=OH8,this.getSpan=LT0,this.getActiveSpan=BH8,this.getSpanContext=Pu1,this.setSpan=BT0,this.setSpanContext=EH8}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=FT0(KT0,this._proxyTracerProvider,X40.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return eh(KT0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){DT0(KT0,X40.instance()),this._proxyTracerProvider=new Wu1},$}(),xg5=SH8.getInstance(),kH8=Object.defineProperty,yH8=`vercel.ai.error.${xH8}`,bH8=Symbol.for(yH8);hH8=bH8;Tu1=`vercel.ai.error.${ju1}`,fH8=Symbol.for(Tu1),Ku1=class extends UY{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:ju1,message:$,cause:Y});this[Cu1]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return UY.hasMarker($,Tu1)}};Cu1=fH8;mH8=`vercel.ai.error.${gH8}`,uH8=Symbol.for(mH8);pH8=uH8;ku1=`vercel.ai.error.${Su1}`,dH8=Symbol.for(ku1),cH8=class extends UY{constructor({originalMessage:$,message:Y}){super({name:Su1,message:Y});this[vu1]=!0,this.originalMessage=$}static isInstance($){return UY.hasMarker($,ku1)}};vu1=dH8;yu1=`vercel.ai.error.${xu1}`,lH8=Symbol.for(yu1),UT0=class extends UY{constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:xu1,message:J,cause:G});this[bu1]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return UY.hasMarker($,yu1)}};bu1=lH8;nH8=`vercel.ai.error.${iH8}`,rH8=Symbol.for(nH8);aH8=rH8;hu1=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),$f=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),$f),U.array($f)])),v8=U.record(U.string(),U.record(U.string(),$f)),fu1=U.object({type:U.literal("text"),text:U.string(),providerOptions:v8.optional()}),tH8=U.object({type:U.literal("image"),image:U.union([hu1,U.instanceof(URL)]),mediaType:U.string().optional(),providerOptions:v8.optional()}),gu1=U.object({type:U.literal("file"),data:U.union([hu1,U.instanceof(URL)]),filename:U.string().optional(),mediaType:U.string(),providerOptions:v8.optional()}),eH8=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:v8.optional()}),$z8=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerOptions:v8.optional(),providerExecuted:U.boolean().optional()}),Yz8=U.discriminatedUnion("type",[U.object({type:U.literal("text"),value:U.string()}),U.object({type:U.literal("json"),value:$f}),U.object({type:U.literal("error-text"),value:U.string()}),U.object({type:U.literal("error-json"),value:$f}),U.object({type:U.literal("content"),value:U.array(U.union([U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("media"),data:U.string(),mediaType:U.string()})]))})]),mu1=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),output:Yz8,providerOptions:v8.optional()}),Xz8=U.object({role:U.literal("system"),content:U.string(),providerOptions:v8.optional()}),Gz8=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([fu1,tH8,gu1]))]),providerOptions:v8.optional()}),Jz8=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([fu1,gu1,eH8,$z8,mu1]))]),providerOptions:v8.optional()}),Qz8=U.object({role:U.literal("tool"),content:U.array(mu1),providerOptions:v8.optional()});U.union([Xz8,Gz8,Jz8,Qz8]);Vw({prefix:"aitxt",size:24});kz(()=>YG(U.union([U.strictObject({type:U.literal("text-start"),id:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("text-delta"),id:U.string(),delta:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("text-end"),id:U.string(),providerMetadata:v8.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(),dynamic:U.boolean().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:v8.optional(),dynamic:U.boolean().optional()}),U.strictObject({type:U.literal("tool-input-error"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerExecuted:U.boolean().optional(),providerMetadata:v8.optional(),dynamic:U.boolean().optional(),errorText: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("reasoning-start"),id:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("reasoning-delta"),id:U.string(),delta:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("reasoning-end"),id:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("source-url"),sourceId:U.string(),url:U.string(),title:U.string().optional(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("source-document"),sourceId:U.string(),mediaType:U.string(),title:U.string(),filename:U.string().optional(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("file"),url:U.string(),mediaType:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.custom(($)=>typeof $==="string"&&$.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","unknown"]).optional(),messageMetadata:U.unknown().optional()}),U.strictObject({type:U.literal("abort")}),U.strictObject({type:U.literal("message-metadata"),messageMetadata:U.unknown()})])));Vw({prefix:"aitxt",size:24});Vw({prefix:"aiobj",size:24});Vw({prefix:"aiobj",size:24});Uz8={};vH8(Uz8,{object:()=>zz8,text:()=>Hz8});yg5=Kz8();kz(()=>YG(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:v8.optional()}),U.object({type:U.literal("reasoning"),text:U.string(),state:U.enum(["streaming","done"]).optional(),providerMetadata:v8.optional()}),U.object({type:U.literal("source-url"),sourceId:U.string(),url:U.string(),title:U.string().optional(),providerMetadata:v8.optional()}),U.object({type:U.literal("source-document"),sourceId:U.string(),mediaType:U.string(),title:U.string(),filename:U.string().optional(),providerMetadata:v8.optional()}),U.object({type:U.literal("file"),mediaType:U.string(),filename:U.string().optional(),url:U.string(),providerMetadata:v8.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(),output:U.never().optional(),errorText: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:v8.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:v8.optional(),preliminary:U.boolean().optional()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),state:U.literal("output-error"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.string(),callProviderMetadata:v8.optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),state:U.literal("input-streaming"),providerExecuted:U.boolean().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:v8.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:v8.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:v8.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:v8.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(),output:U.never().optional(),errorText:U.string(),callProviderMetadata:v8.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:v8.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")))});function Vz8($){if(typeof $!=="object"||$===null)return String($);try{let Y=JSON.stringify($);if(Y==="{}")return String($);return Y}catch{return String($)}}function XG($,Y={}){let X={fallbackMessage:"Unknown error",maxDepth:5,supportSerialization:!0,serializeStack:!0},G=Y?{...X,...Y}:X,{fallbackMessage:J,maxDepth:Q,supportSerialization:W,serializeStack:Z}=G;if($&&$ instanceof Error){if(W)qT0($,Z,{maxDepth:Q});return $}let K;if($&&typeof $==="object"){let H=$&&"message"in $&&typeof $.message==="string"?$.message:Vz8($),z="cause"in $&&$.cause!==void 0?$.cause instanceof Error?$.cause:Q>0?XG($.cause,{...G,maxDepth:Q-1}):void 0:void 0;K=Error(H,z?{cause:z}:void 0),Object.assign(K,$),K.stack="stack"in $&&typeof $.stack==="string"?$.stack:void 0}else if($&&typeof $==="string")K=Error($),K.stack=void 0;else K=Error(J);if(W)qT0(K,Z,{maxDepth:Q});return K}function qT0($,Y=!0,X){let G=X?.maxDepth??Az8,J=X?.currentDepth??0;if($.toJSON)return;if($.cause instanceof Error&&J<G)qT0($.cause,Y,{maxDepth:G,currentDepth:J+1});Object.defineProperty($,"toJSON",{value:function(){let Q={message:this.message,name:this.name};if(Y&&this.stack!==void 0)Q.stack=this.stack;if(this.cause!==void 0)if(this.cause instanceof Error&&"toJSON"in this.cause&&typeof this.cause.toJSON==="function")Q.cause=this.cause.toJSON();else Q.cause=this.cause;let W=this;for(let Z in W)if(W.hasOwnProperty(Z)&&!(Z in Q)&&Z!=="toJSON")Q[Z]=W[Z];return Q},enumerable:!1,writable:!0,configurable:!0})}var Az8=5,M0,E0,pu1,G0;var EW=V0(()=>{M0=(($)=>{return $.TOOL="TOOL",$.AGENT="AGENT",$.MCP="MCP",$.AGENT_NETWORK="AGENT_NETWORK",$.MASTRA_SERVER="MASTRA_SERVER",$.MASTRA_OBSERVABILITY="MASTRA_OBSERVABILITY",$.MASTRA_WORKFLOW="MASTRA_WORKFLOW",$.MASTRA_VOICE="MASTRA_VOICE",$.MASTRA_VECTOR="MASTRA_VECTOR",$.MASTRA_MEMORY="MASTRA_MEMORY",$.LLM="LLM",$.EVAL="EVAL",$.SCORER="SCORER",$.A2A="A2A",$.MASTRA_INSTANCE="MASTRA_INSTANCE",$.MASTRA="MASTRA",$.DEPLOYER="DEPLOYER",$.STORAGE="STORAGE",$.MODEL_ROUTER="MODEL_ROUTER",$})(M0||{}),E0=(($)=>{return $.UNKNOWN="UNKNOWN",$.USER="USER",$.SYSTEM="SYSTEM",$.THIRD_PARTY="THIRD_PARTY",$})(E0||{}),pu1=class extends Error{id;domain;category;details={};message;cause;constructor($,Y){let X=Y?XG(Y,{serializeStack:!1,fallbackMessage:"Unknown error"}):void 0,G=$.text??X?.message??"Unknown error";super(G,{cause:X});this.id=$.id,this.domain=$.domain,this.category=$.category,this.details=$.details??{},this.message=G,this.cause=X,Object.setPrototypeOf(this,new.target.prototype)}toJSONDetails(){return{message:this.message,domain:this.domain,category:this.category,details:this.details}}toJSON(){return{message:this.message,domain:this.domain,category:this.category,code:this.id,details:this.details,cause:this.cause?.toJSON?.()}}toString(){return JSON.stringify(this.toJSON())}},G0=class extends pu1{}});var Fz8,IT0;var du1=V0(()=>{dZ();EW();Fz8=class extends u8{listeningModel;speechModel;speaker;realtimeConfig;constructor({listeningModel:$,speechModel:Y,speaker:X,realtimeConfig:G,name:J}={}){super({component:"VOICE",name:J});this.listeningModel=$,this.speechModel=Y,this.speaker=X,this.realtimeConfig=G}serializeForSpan(){return{component:"VOICE",name:this.name,speaker:this.speaker,listeningModel:this.listeningModel?{name:this.listeningModel.name}:void 0,speechModel:this.speechModel?{name:this.speechModel.name}:void 0,realtimeModel:this.realtimeConfig?.model}}updateConfig($){this.logger.debug("updateConfig not implemented by this voice provider")}connect($){return this.logger.debug("connect not implemented by this voice provider"),Promise.resolve()}send($){return this.logger.debug("relay not implemented by this voice provider"),Promise.resolve()}answer($){return this.logger.debug("answer not implemented by this voice provider"),Promise.resolve()}addInstructions($){}addTools($){}close(){this.logger.debug("close not implemented by this voice provider")}on($,Y){this.logger.debug("on not implemented by this voice provider")}off($,Y){this.logger.debug("off not implemented by this voice provider")}getSpeakers(){return this.logger.debug("getSpeakers not implemented by this voice provider"),Promise.resolve([])}getListener(){return this.logger.debug("getListener not implemented by this voice provider"),Promise.resolve({enabled:!1})}},IT0=class extends Fz8{constructor(){super()}async speak($){throw new G0({id:"VOICE_DEFAULT_NO_SPEAK_PROVIDER",text:"No voice provider configured",domain:"MASTRA_VOICE",category:"USER"})}async listen($){throw new G0({id:"VOICE_DEFAULT_NO_LISTEN_PROVIDER",text:"No voice provider configured",domain:"MASTRA_VOICE",category:"USER"})}async getSpeakers(){throw new G0({id:"VOICE_DEFAULT_NO_SPEAKERS_PROVIDER",text:"No voice provider configured",domain:"MASTRA_VOICE",category:"USER"})}async getListener(){throw new G0({id:"VOICE_DEFAULT_NO_LISTENER_PROVIDER",text:"No voice provider configured",domain:"MASTRA_VOICE",category:"USER"})}}});var VQ,MW;var PT0=V0(()=>{VQ=Symbol("pubsub"),MW=Symbol("stream_format")});function cu1($){return typeof $==="object"&&$!==null&&"_def"in $&&"parse"in $&&typeof $.parse==="function"&&"safeParse"in $&&typeof $.safeParse==="function"}function mF($){let Y=$;if(Y._def?.typeName)return Y._def.typeName;let X=Y._def?.type;if(typeof X==="string"&&X)return"Zod"+X.charAt(0).toUpperCase()+X.slice(1);return}function uF($){if(!cu1($))return!1;return mF($)==="ZodArray"}function Dw($){if(!cu1($))return!1;return mF($)==="ZodObject"}function Yf($){let Y=$;return Y._zod?.def??Y._def}function wT0($,Y){let X=$;if(Y==="ZodNullable"||Y==="ZodOptional"||Y==="ZodDefault")return X._zod?.def?.innerType??X._def?.innerType;if(Y==="ZodEffects")return X._zod?.def?.schema??X._def?.schema;if(Y==="ZodBranded")return X._zod?.def?.type??X._def?.type;return}function _T0($){let Y=$;while(!0){let X=mF(Y);if(!X)break;let G=wT0(Y,X);if(!G)break;Y=G}return Y}var Xf=()=>{};function lu1($){return new Nz8($)}var Dz8="ai-sdk",Nz8=class{#$;"~standard";constructor($){this.#$=$,this["~standard"]={version:1,vendor:Dz8,validate:this.#Y.bind(this),jsonSchema:{input:this.#J.bind(this),output:this.#J.bind(this)}}}#Y($){if(!this.#$.validate)return{value:$};try{let Y=this.#$.validate($);if(Y&&typeof Y==="object"&&"then"in Y&&typeof Y.then==="function")return Promise.resolve(Y).then((X)=>this.#X(X)).catch((X)=>{return{issues:[{message:`Schema validation error: ${X instanceof Error?X.message:"Unknown validation error"}`}]}});return this.#X(Y)}catch(Y){return{issues:[{message:`Schema validation error: ${Y instanceof Error?Y.message:"Unknown validation error"}`}]}}}#X($){if($.success)return{value:$.value};return{issues:[{message:$.error.message}]}}#J($){let{target:Y}=$,X=JSON.parse(JSON.stringify(this.#$.jsonSchema));if(!X.$schema)switch(Y){case"draft-07":X.$schema="http://json-schema.org/draft-07/schema#";break;case"draft-2020-12":X.$schema="https://json-schema.org/draft/2020-12/schema";break}return X}getSchema(){return this.#$}getJsonSchema(){return this.#$.jsonSchema}};var iu1=()=>{};var Lz8,nu1,Bz8,ru1,Oz8,Ez8,I1=($,Y)=>function(){return Y||(0,$[ru1($)[0]])((Y={exports:{}}).exports,Y),Y.exports},Mz8=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of ru1(Y))if(!Ez8.call($,J)&&J!==X)nu1($,J,{get:()=>Y[J],enumerable:!(G=Bz8(Y,J))||G.enumerable})}return $},pF=($,Y,X)=>(X=$!=null?Lz8(Oz8($)):{},Mz8(Y||!$||!$.__esModule?nu1(X,"default",{value:$,enumerable:!0}):X,$));var Gf=V0(()=>{Lz8=Object.create,nu1=Object.defineProperty,Bz8=Object.getOwnPropertyDescriptor,ru1=Object.getOwnPropertyNames,Oz8=Object.getPrototypeOf,Ez8=Object.prototype.hasOwnProperty});var FO;var G40=V0(()=>{Gf();FO=I1({"../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js"($,Y){var X=Y.exports=function(Q,W,Z){if(typeof W=="function")Z=W,W={};Z=W.cb||Z;var K=typeof Z=="function"?Z:Z.pre||function(){},H=Z.post||function(){};G(W,K,H,Q,"",Q)};X.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},X.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},X.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},X.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function G(Q,W,Z,K,H,z,V,A,F,N){if(K&&typeof K=="object"&&!Array.isArray(K)){W(K,H,z,V,A,F,N);for(var D in K){var L=K[D];if(Array.isArray(L)){if(D in X.arrayKeywords)for(var B=0;B<L.length;B++)G(Q,W,Z,L[B],H+"/"+D+"/"+B,z,H,D,K,B)}else if(D in X.propsKeywords){if(L&&typeof L=="object")for(var O in L)G(Q,W,Z,L[O],H+"/"+D+"/"+J(O),z,H,D,K,O)}else if(D in X.keywords||Q.allKeys&&!(D in X.skipKeywords))G(Q,W,Z,L,H+"/"+D,z,H,D,K)}Z(K,H,z,V,A,F,N)}}function J(Q){return Q.replace(/~/g,"~0").replace(/\//g,"~1")}}})});function Vp1($,Y){return new CV8($,Y)}var J40,au1,v6,V8,OK,W40,Rz8,su1,ou1,Q40,qz8,EK,Iz8,Pz8,tu1,Z40,Jf,K40,Qf,U40,wz8,eu1,_z8,jz8,Tz8,$p1,Cz8,jT0,Yp1,Sz8,kz8,vz8,xz8,yz8,bz8,hz8,fz8,TT0,gz8,mz8,uz8,Xp1,Gp1,Jp1,pz8,dz8,cz8,CT0,lz8,Qp1,iz8,nz8,rz8,az8,sz8,oz8,tz8,ez8,Wp1,$V8,Zp1,Kp1,YV8,XV8,Up1,GV8,JV8,Hp1,zp1,QV8,WV8,ZV8,KV8,UV8,HV8,zV8,VV8,AV8,FV8,DV8,NV8,LV8,BV8,OV8,EV8,MV8,RV8,qV8,IV8,PV8,wV8,_V8,jV8,TV8="json-schema",CV8=class{#$;#Y;#X=null;#J=null;"~standard";constructor($,Y={}){this.#$=$,this.#Y=Y,this["~standard"]={version:1,vendor:TV8,validate:this.#G.bind(this),jsonSchema:{input:this.#U.bind(this),output:this.#U.bind(this)}}}#G($){try{let Y=this.#K(),X=Y($);if(Y.$async)return X.then(()=>({value:$})).catch((J)=>{return{issues:(J?.errors??[]).map((Z)=>({message:Z.message??"Validation error",path:this.#Q(Z.instancePath)}))}});if(X)return{value:$};return{issues:(Y.errors??[]).map((J)=>({message:J.message??"Validation error",path:this.#Q(J.instancePath)}))}}catch(Y){return{issues:[{message:`Schema validation error: ${Y instanceof Error?Y.message:"Unknown validation error"}`}]}}}#Q($){if(!$||$==="")return[];return $.slice(1).split("/").map((X)=>{let G=parseInt(X,10);if(!isNaN(G)&&String(G)===X)return G;return X.replace(/~1/g,"/").replace(/~0/g,"~")})}#U($){let{target:Y}=$,X=JSON.parse(JSON.stringify(this.#$));if(!X.$schema)switch(Y){case"draft-07":X.$schema="http://json-schema.org/draft-07/schema#";break;case"draft-2020-12":X.$schema="https://json-schema.org/draft/2020-12/schema";break}if($?.libraryOptions?.override){let G=$.libraryOptions.override;(0,jV8.default)(X,{cb:{post:(J)=>{G({jsonSchema:J})}}})}return X}#K(){if(!this.#X){let Y=typeof this.#$.$schema==="string"&&this.#$.$schema.includes("2020-12")?_V8.default:wV8.default;this.#J=new Y({allErrors:!0,strict:!1,...this.#Y.ajvOptions}),this.#X=this.#J.compile(this.#$)}return this.#X}getSchema(){return this.#$}getAjv(){return this.#K(),this.#J}};var Ap1=V0(()=>{G40();Gf();J40=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.regexpCode=$.getEsmExportName=$.getProperty=$.safeStringify=$.stringify=$.strConcat=$.addCodeArg=$.str=$._=$.nil=$._Code=$.Name=$.IDENTIFIER=$._CodeOrName=void 0;var Y=class{};$._CodeOrName=Y,$.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var X=class extends Y{constructor(B){super();if(!$.IDENTIFIER.test(B))throw Error("CodeGen: name must be a valid identifier");this.str=B}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};$.Name=X;var G=class extends Y{constructor(B){super();this._items=typeof B==="string"?[B]:B}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let B=this._items[0];return B===""||B==='""'}get str(){var B;return(B=this._str)!==null&&B!==void 0?B:this._str=this._items.reduce((O,E)=>`${O}${E}`,"")}get names(){var B;return(B=this._names)!==null&&B!==void 0?B:this._names=this._items.reduce((O,E)=>{if(E instanceof X)O[E.str]=(O[E.str]||0)+1;return O},{})}};$._Code=G,$.nil=new G("");function J(B,...O){let E=[B[0]],M=0;while(M<O.length)Z(E,O[M]),E.push(B[++M]);return new G(E)}$._=J;var Q=new G("+");function W(B,...O){let E=[F(B[0])],M=0;while(M<O.length)E.push(Q),Z(E,O[M]),E.push(Q,F(B[++M]));return K(E),new G(E)}$.str=W;function Z(B,O){if(O instanceof G)B.push(...O._items);else if(O instanceof X)B.push(O);else B.push(V(O))}$.addCodeArg=Z;function K(B){let O=1;while(O<B.length-1){if(B[O]===Q){let E=H(B[O-1],B[O+1]);if(E!==void 0){B.splice(O-1,3,E);continue}B[O++]="+"}O++}}function H(B,O){if(O==='""')return B;if(B==='""')return O;if(typeof B=="string"){if(O instanceof X||B[B.length-1]!=='"')return;if(typeof O!="string")return`${B.slice(0,-1)}${O}"`;if(O[0]==='"')return B.slice(0,-1)+O.slice(1);return}if(typeof O=="string"&&O[0]==='"'&&!(B instanceof X))return`"${B}${O.slice(1)}`;return}function z(B,O){return O.emptyStr()?B:B.emptyStr()?O:W`${B}${O}`}$.strConcat=z;function V(B){return typeof B=="number"||typeof B=="boolean"||B===null?B:F(Array.isArray(B)?B.join(","):B)}function A(B){return new G(F(B))}$.stringify=A;function F(B){return JSON.stringify(B).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}$.safeStringify=F;function N(B){return typeof B=="string"&&$.IDENTIFIER.test(B)?new G(`.${B}`):J`[${B}]`}$.getProperty=N;function D(B){if(typeof B=="string"&&$.IDENTIFIER.test(B))return new G(`${B}`);throw Error(`CodeGen: invalid export name: ${B}, use explicit $id name mapping`)}$.getEsmExportName=D;function L(B){return new G(B.toString())}$.regexpCode=L}}),au1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.ValueScope=$.ValueScopeName=$.Scope=$.varKinds=$.UsedValueState=void 0;var Y=J40(),X=class extends Error{constructor(K){super(`CodeGen: "code" for ${K} not defined`);this.value=K.value}},G;(function(K){K[K.Started=0]="Started",K[K.Completed=1]="Completed"})(G||($.UsedValueState=G={})),$.varKinds={const:new Y.Name("const"),let:new Y.Name("let"),var:new Y.Name("var")};var J=class{constructor({prefixes:K,parent:H}={}){this._names={},this._prefixes=K,this._parent=H}toName(K){return K instanceof Y.Name?K:this.name(K)}name(K){return new Y.Name(this._newName(K))}_newName(K){let H=this._names[K]||this._nameGroup(K);return`${K}${H.index++}`}_nameGroup(K){var H,z;if(((z=(H=this._parent)===null||H===void 0?void 0:H._prefixes)===null||z===void 0?void 0:z.has(K))||this._prefixes&&!this._prefixes.has(K))throw Error(`CodeGen: prefix "${K}" is not allowed in this scope`);return this._names[K]={prefix:K,index:0}}};$.Scope=J;var Q=class extends Y.Name{constructor(K,H){super(H);this.prefix=K}setValue(K,{property:H,itemIndex:z}){this.value=K,this.scopePath=Y._`.${new Y.Name(H)}[${z}]`}};$.ValueScopeName=Q;var W=Y._`\n`,Z=class extends J{constructor(K){super(K);this._values={},this._scope=K.scope,this.opts={...K,_n:K.lines?W:Y.nil}}get(){return this._scope}name(K){return new Q(K,this._newName(K))}value(K,H){var z;if(H.ref===void 0)throw Error("CodeGen: ref must be passed in value");let V=this.toName(K),{prefix:A}=V,F=(z=H.key)!==null&&z!==void 0?z:H.ref,N=this._values[A];if(N){let B=N.get(F);if(B)return B}else N=this._values[A]=new Map;N.set(F,V);let D=this._scope[A]||(this._scope[A]=[]),L=D.length;return D[L]=H.ref,V.setValue(H,{property:A,itemIndex:L}),V}getValue(K,H){let z=this._values[K];if(!z)return;return z.get(H)}scopeRefs(K,H=this._values){return this._reduceValues(H,(z)=>{if(z.scopePath===void 0)throw Error(`CodeGen: name "${z}" has no value`);return Y._`${K}${z.scopePath}`})}scopeCode(K=this._values,H,z){return this._reduceValues(K,(V)=>{if(V.value===void 0)throw Error(`CodeGen: name "${V}" has no value`);return V.value.code},H,z)}_reduceValues(K,H,z={},V){let A=Y.nil;for(let F in K){let N=K[F];if(!N)continue;let D=z[F]=z[F]||new Map;N.forEach((L)=>{if(D.has(L))return;D.set(L,G.Started);let B=H(L);if(B){let O=this.opts.es5?$.varKinds.var:$.varKinds.const;A=Y._`${A}${O} ${L} = ${B};${this.opts._n}`}else if(B=V===null||V===void 0?void 0:V(L))A=Y._`${A}${B}${this.opts._n}`;else throw new X(L);D.set(L,G.Completed)})}return A}};$.ValueScope=Z}}),v6=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.or=$.and=$.not=$.CodeGen=$.operators=$.varKinds=$.ValueScopeName=$.ValueScope=$.Scope=$.Name=$.regexpCode=$.stringify=$.getProperty=$.nil=$.strConcat=$.str=$._=void 0;var Y=J40(),X=au1(),G=J40();Object.defineProperty($,"_",{enumerable:!0,get:function(){return G._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return G.str}}),Object.defineProperty($,"strConcat",{enumerable:!0,get:function(){return G.strConcat}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return G.nil}}),Object.defineProperty($,"getProperty",{enumerable:!0,get:function(){return G.getProperty}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return G.stringify}}),Object.defineProperty($,"regexpCode",{enumerable:!0,get:function(){return G.regexpCode}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return G.Name}});var J=au1();Object.defineProperty($,"Scope",{enumerable:!0,get:function(){return J.Scope}}),Object.defineProperty($,"ValueScope",{enumerable:!0,get:function(){return J.ValueScope}}),Object.defineProperty($,"ValueScopeName",{enumerable:!0,get:function(){return J.ValueScopeName}}),Object.defineProperty($,"varKinds",{enumerable:!0,get:function(){return J.varKinds}}),$.operators={GT:new Y._Code(">"),GTE:new Y._Code(">="),LT:new Y._Code("<"),LTE:new Y._Code("<="),EQ:new Y._Code("==="),NEQ:new Y._Code("!=="),NOT:new Y._Code("!"),OR:new Y._Code("||"),AND:new Y._Code("&&"),ADD:new Y._Code("+")};var Q=class{optimizeNodes(){return this}optimizeNames(h,n){return this}},W=class extends Q{constructor(h,n,t){super();this.varKind=h,this.name=n,this.rhs=t}render({es5:h,_n:n}){let t=h?X.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${t} ${this.name}${s};`+n}optimizeNames(h,n){if(!h[this.name.str])return;if(this.rhs)this.rhs=T(this.rhs,h,n);return this}get names(){return this.rhs instanceof Y._CodeOrName?this.rhs.names:{}}},Z=class extends Q{constructor(h,n,t){super();this.lhs=h,this.rhs=n,this.sideEffects=t}render({_n:h}){return`${this.lhs} = ${this.rhs};`+h}optimizeNames(h,n){if(this.lhs instanceof Y.Name&&!h[this.lhs.str]&&!this.sideEffects)return;return this.rhs=T(this.rhs,h,n),this}get names(){let h=this.lhs instanceof Y.Name?{}:{...this.lhs.names};return S(h,this.rhs)}},K=class extends Z{constructor(h,n,t,s){super(h,t,s);this.op=n}render({_n:h}){return`${this.lhs} ${this.op}= ${this.rhs};`+h}},H=class extends Q{constructor(h){super();this.label=h,this.names={}}render({_n:h}){return`${this.label}:`+h}},z=class extends Q{constructor(h){super();this.label=h,this.names={}}render({_n:h}){return`break${this.label?` ${this.label}`:""};`+h}},V=class extends Q{constructor(h){super();this.error=h}render({_n:h}){return`throw ${this.error};`+h}get names(){return this.error.names}},A=class extends Q{constructor(h){super();this.code=h}render({_n:h}){return`${this.code};`+h}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(h,n){return this.code=T(this.code,h,n),this}get names(){return this.code instanceof Y._CodeOrName?this.code.names:{}}},F=class extends Q{constructor(h=[]){super();this.nodes=h}render(h){return this.nodes.reduce((n,t)=>n+t.render(h),"")}optimizeNodes(){let{nodes:h}=this,n=h.length;while(n--){let t=h[n].optimizeNodes();if(Array.isArray(t))h.splice(n,1,...t);else if(t)h[n]=t;else h.splice(n,1)}return h.length>0?this:void 0}optimizeNames(h,n){let{nodes:t}=this,s=t.length;while(s--){let Z0=t[s];if(Z0.optimizeNames(h,n))continue;v(h,Z0.names),t.splice(s,1)}return t.length>0?this:void 0}get names(){return this.nodes.reduce((h,n)=>k(h,n.names),{})}},N=class extends F{render(h){return"{"+h._n+super.render(h)+"}"+h._n}},D=class extends F{},L=class extends N{};L.kind="else";var B=class h extends N{constructor(n,t){super(t);this.condition=n}render(n){let t=`if(${this.condition})`+super.render(n);if(this.else)t+="else "+this.else.render(n);return t}optimizeNodes(){super.optimizeNodes();let n=this.condition;if(n===!0)return this.nodes;let t=this.else;if(t){let s=t.optimizeNodes();t=this.else=Array.isArray(s)?new L(s):s}if(t){if(n===!1)return t instanceof h?t:t.nodes;if(this.nodes.length)return this;return new h(x(n),t instanceof h?[t]:t.nodes)}if(n===!1||!this.nodes.length)return;return this}optimizeNames(n,t){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(n,t),!(super.optimizeNames(n,t)||this.else))return;return this.condition=T(this.condition,n,t),this}get names(){let n=super.names;if(S(n,this.condition),this.else)k(n,this.else.names);return n}};B.kind="if";var O=class extends N{};O.kind="for";var E=class extends O{constructor(h){super();this.iteration=h}render(h){return`for(${this.iteration})`+super.render(h)}optimizeNames(h,n){if(!super.optimizeNames(h,n))return;return this.iteration=T(this.iteration,h,n),this}get names(){return k(super.names,this.iteration.names)}},M=class extends O{constructor(h,n,t,s){super();this.varKind=h,this.name=n,this.from=t,this.to=s}render(h){let n=h.es5?X.varKinds.var:this.varKind,{name:t,from:s,to:Z0}=this;return`for(${n} ${t}=${s}; ${t}<${Z0}; ${t}++)`+super.render(h)}get names(){let h=S(super.names,this.from);return S(h,this.to)}},R=class extends O{constructor(h,n,t,s){super();this.loop=h,this.varKind=n,this.name=t,this.iterable=s}render(h){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(h)}optimizeNames(h,n){if(!super.optimizeNames(h,n))return;return this.iterable=T(this.iterable,h,n),this}get names(){return k(super.names,this.iterable.names)}},q=class extends N{constructor(h,n,t){super();this.name=h,this.args=n,this.async=t}render(h){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(h)}};q.kind="func";var w=class extends F{render(h){return"return "+super.render(h)}};w.kind="return";var I=class extends N{render(h){let n="try"+super.render(h);if(this.catch)n+=this.catch.render(h);if(this.finally)n+=this.finally.render(h);return n}optimizeNodes(){var h,n;return super.optimizeNodes(),(h=this.catch)===null||h===void 0||h.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(h,n){var t,s;return super.optimizeNames(h,n),(t=this.catch)===null||t===void 0||t.optimizeNames(h,n),(s=this.finally)===null||s===void 0||s.optimizeNames(h,n),this}get names(){let h=super.names;if(this.catch)k(h,this.catch.names);if(this.finally)k(h,this.finally.names);return h}},P=class extends N{constructor(h){super();this.error=h}render(h){return`catch(${this.error})`+super.render(h)}};P.kind="catch";var _=class extends N{render(h){return"finally"+super.render(h)}};_.kind="finally";var C=class{constructor(h,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
`:""},this._extScope=h,this._scope=new X.Scope({parent:h}),this._nodes=[new D]}toString(){return this._root.render(this.opts)}name(h){return this._scope.name(h)}scopeName(h){return this._extScope.name(h)}scopeValue(h,n){let t=this._extScope.value(h,n);return(this._values[t.prefix]||(this._values[t.prefix]=new Set)).add(t),t}getScopeValue(h,n){return this._extScope.getValue(h,n)}scopeRefs(h){return this._extScope.scopeRefs(h,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(h,n,t,s){let Z0=this._scope.toName(n);if(t!==void 0&&s)this._constants[Z0.str]=t;return this._leafNode(new W(h,Z0,t)),Z0}const(h,n,t){return this._def(X.varKinds.const,h,n,t)}let(h,n,t){return this._def(X.varKinds.let,h,n,t)}var(h,n,t){return this._def(X.varKinds.var,h,n,t)}assign(h,n,t){return this._leafNode(new Z(h,n,t))}add(h,n){return this._leafNode(new K(h,$.operators.ADD,n))}code(h){if(typeof h=="function")h();else if(h!==Y.nil)this._leafNode(new A(h));return this}object(...h){let n=["{"];for(let[t,s]of h){if(n.length>1)n.push(",");if(n.push(t),t!==s||this.opts.es5)n.push(":"),(0,Y.addCodeArg)(n,s)}return n.push("}"),new Y._Code(n)}if(h,n,t){if(this._blockNode(new B(h)),n&&t)this.code(n).else().code(t).endIf();else if(n)this.code(n).endIf();else if(t)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(h){return this._elseNode(new B(h))}else(){return this._elseNode(new L)}endIf(){return this._endBlockNode(B,L)}_for(h,n){if(this._blockNode(h),n)this.code(n).endFor();return this}for(h,n){return this._for(new E(h),n)}forRange(h,n,t,s,Z0=this.opts.es5?X.varKinds.var:X.varKinds.let){let X0=this._scope.toName(h);return this._for(new M(Z0,X0,n,t),()=>s(X0))}forOf(h,n,t,s=X.varKinds.const){let Z0=this._scope.toName(h);if(this.opts.es5){let X0=n instanceof Y.Name?n:this.var("_arr",n);return this.forRange("_i",0,Y._`${X0}.length`,(a)=>{this.var(Z0,Y._`${X0}[${a}]`),t(Z0)})}return this._for(new R("of",s,Z0,n),()=>t(Z0))}forIn(h,n,t,s=this.opts.es5?X.varKinds.var:X.varKinds.const){if(this.opts.ownProperties)return this.forOf(h,Y._`Object.keys(${n})`,t);let Z0=this._scope.toName(h);return this._for(new R("in",s,Z0,n),()=>t(Z0))}endFor(){return this._endBlockNode(O)}label(h){return this._leafNode(new H(h))}break(h){return this._leafNode(new z(h))}return(h){let n=new w;if(this._blockNode(n),this.code(h),n.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(w)}try(h,n,t){if(!n&&!t)throw Error('CodeGen: "try" without "catch" and "finally"');let s=new I;if(this._blockNode(s),this.code(h),n){let Z0=this.name("e");this._currNode=s.catch=new P(Z0),n(Z0)}if(t)this._currNode=s.finally=new _,this.code(t);return this._endBlockNode(P,_)}throw(h){return this._leafNode(new V(h))}block(h,n){if(this._blockStarts.push(this._nodes.length),h)this.code(h).endBlock(n);return this}endBlock(h){let n=this._blockStarts.pop();if(n===void 0)throw Error("CodeGen: not in self-balancing block");let t=this._nodes.length-n;if(t<0||h!==void 0&&t!==h)throw Error(`CodeGen: wrong number of nodes: ${t} vs ${h} expected`);return this._nodes.length=n,this}func(h,n=Y.nil,t,s){if(this._blockNode(new q(h,n,t)),s)this.code(s).endFunc();return this}endFunc(){return this._endBlockNode(q)}optimize(h=1){while(h-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(h){return this._currNode.nodes.push(h),this}_blockNode(h){this._currNode.nodes.push(h),this._nodes.push(h)}_endBlockNode(h,n){let t=this._currNode;if(t instanceof h||n&&t instanceof n)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${n?`${h.kind}/${n.kind}`:h.kind}"`)}_elseNode(h){let n=this._currNode;if(!(n instanceof B))throw Error('CodeGen: "else" without "if"');return this._currNode=n.else=h,this}get _root(){return this._nodes[0]}get _currNode(){let h=this._nodes;return h[h.length-1]}set _currNode(h){let n=this._nodes;n[n.length-1]=h}};$.CodeGen=C;function k(h,n){for(let t in n)h[t]=(h[t]||0)+(n[t]||0);return h}function S(h,n){return n instanceof Y._CodeOrName?k(h,n.names):h}function T(h,n,t){if(h instanceof Y.Name)return s(h);if(!Z0(h))return h;return new Y._Code(h._items.reduce((X0,a)=>{if(a instanceof Y.Name)a=s(a);if(a instanceof Y._Code)X0.push(...a._items);else X0.push(a);return X0},[]));function s(X0){let a=t[X0.str];if(a===void 0||n[X0.str]!==1)return X0;return delete n[X0.str],a}function Z0(X0){return X0 instanceof Y._Code&&X0._items.some((a)=>a instanceof Y.Name&&n[a.str]===1&&t[a.str]!==void 0)}}function v(h,n){for(let t in n)h[t]=(h[t]||0)-(n[t]||0)}function x(h){return typeof h=="boolean"||typeof h=="number"||h===null?!h:Y._`!${p(h)}`}$.not=x;var y=g($.operators.AND);function d(...h){return h.reduce(y)}$.and=d;var u=g($.operators.OR);function b(...h){return h.reduce(u)}$.or=b;function g(h){return(n,t)=>n===Y.nil?t:t===Y.nil?n:Y._`${p(n)} ${h} ${p(t)}`}function p(h){return h instanceof Y.Name?h:Y._`(${h})`}}}),V8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.checkStrictMode=$.getErrorPath=$.Type=$.useFunc=$.setEvaluated=$.evaluatedPropsToName=$.mergeEvaluated=$.eachItem=$.unescapeJsonPointer=$.escapeJsonPointer=$.escapeFragment=$.unescapeFragment=$.schemaRefOrVal=$.schemaHasRulesButRef=$.schemaHasRules=$.checkUnknownRules=$.alwaysValidSchema=$.toHash=void 0;var Y=v6(),X=J40();function G(q){let w={};for(let I of q)w[I]=!0;return w}$.toHash=G;function J(q,w){if(typeof w=="boolean")return w;if(Object.keys(w).length===0)return!0;return Q(q,w),!W(w,q.self.RULES.all)}$.alwaysValidSchema=J;function Q(q,w=q.schema){let{opts:I,self:P}=q;if(!I.strictSchema)return;if(typeof w==="boolean")return;let _=P.RULES.keywords;for(let C in w)if(!_[C])R(q,`unknown keyword: "${C}"`)}$.checkUnknownRules=Q;function W(q,w){if(typeof q=="boolean")return!q;for(let I in q)if(w[I])return!0;return!1}$.schemaHasRules=W;function Z(q,w){if(typeof q=="boolean")return!q;for(let I in q)if(I!=="$ref"&&w.all[I])return!0;return!1}$.schemaHasRulesButRef=Z;function K({topSchemaRef:q,schemaPath:w},I,P,_){if(!_){if(typeof I=="number"||typeof I=="boolean")return I;if(typeof I=="string")return Y._`${I}`}return Y._`${q}${w}${(0,Y.getProperty)(P)}`}$.schemaRefOrVal=K;function H(q){return A(decodeURIComponent(q))}$.unescapeFragment=H;function z(q){return encodeURIComponent(V(q))}$.escapeFragment=z;function V(q){if(typeof q=="number")return`${q}`;return q.replace(/~/g,"~0").replace(/\//g,"~1")}$.escapeJsonPointer=V;function A(q){return q.replace(/~1/g,"/").replace(/~0/g,"~")}$.unescapeJsonPointer=A;function F(q,w){if(Array.isArray(q))for(let I of q)w(I);else w(q)}$.eachItem=F;function N({mergeNames:q,mergeToName:w,mergeValues:I,resultToName:P}){return(_,C,k,S)=>{let T=k===void 0?C:k instanceof Y.Name?(C instanceof Y.Name?q(_,C,k):w(_,C,k),k):C instanceof Y.Name?(w(_,k,C),C):I(C,k);return S===Y.Name&&!(T instanceof Y.Name)?P(_,T):T}}$.mergeEvaluated={props:N({mergeNames:(q,w,I)=>q.if(Y._`${I} !== true && ${w} !== undefined`,()=>{q.if(Y._`${w} === true`,()=>q.assign(I,!0),()=>q.assign(I,Y._`${I} || {}`).code(Y._`Object.assign(${I}, ${w})`))}),mergeToName:(q,w,I)=>q.if(Y._`${I} !== true`,()=>{if(w===!0)q.assign(I,!0);else q.assign(I,Y._`${I} || {}`),L(q,I,w)}),mergeValues:(q,w)=>q===!0?!0:{...q,...w},resultToName:D}),items:N({mergeNames:(q,w,I)=>q.if(Y._`${I} !== true && ${w} !== undefined`,()=>q.assign(I,Y._`${w} === true ? true : ${I} > ${w} ? ${I} : ${w}`)),mergeToName:(q,w,I)=>q.if(Y._`${I} !== true`,()=>q.assign(I,w===!0?!0:Y._`${I} > ${w} ? ${I} : ${w}`)),mergeValues:(q,w)=>q===!0?!0:Math.max(q,w),resultToName:(q,w)=>q.var("items",w)})};function D(q,w){if(w===!0)return q.var("props",!0);let I=q.var("props",Y._`{}`);if(w!==void 0)L(q,I,w);return I}$.evaluatedPropsToName=D;function L(q,w,I){Object.keys(I).forEach((P)=>q.assign(Y._`${w}${(0,Y.getProperty)(P)}`,!0))}$.setEvaluated=L;var B={};function O(q,w){return q.scopeValue("func",{ref:w,code:B[w.code]||(B[w.code]=new X._Code(w.code))})}$.useFunc=O;var E;(function(q){q[q.Num=0]="Num",q[q.Str=1]="Str"})(E||($.Type=E={}));function M(q,w,I){if(q instanceof Y.Name){let P=w===E.Num;return I?P?Y._`"[" + ${q} + "]"`:Y._`"['" + ${q} + "']"`:P?Y._`"/" + ${q}`:Y._`"/" + ${q}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return I?(0,Y.getProperty)(q).toString():"/"+V(q)}$.getErrorPath=M;function R(q,w,I=q.opts.strictSchema){if(!I)return;if(w=`strict mode: ${w}`,I===!0)throw Error(w);q.self.logger.warn(w)}$.checkStrictMode=R}}),OK=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X={data:new Y.Name("data"),valCxt:new Y.Name("valCxt"),instancePath:new Y.Name("instancePath"),parentData:new Y.Name("parentData"),parentDataProperty:new Y.Name("parentDataProperty"),rootData:new Y.Name("rootData"),dynamicAnchors:new Y.Name("dynamicAnchors"),vErrors:new Y.Name("vErrors"),errors:new Y.Name("errors"),this:new Y.Name("this"),self:new Y.Name("self"),scope:new Y.Name("scope"),json:new Y.Name("json"),jsonPos:new Y.Name("jsonPos"),jsonLen:new Y.Name("jsonLen"),jsonPart:new Y.Name("jsonPart")};$.default=X}}),W40=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.extendErrors=$.resetErrorsCount=$.reportExtraError=$.reportError=$.keyword$DataError=$.keywordError=void 0;var Y=v6(),X=V8(),G=OK();$.keywordError={message:({keyword:L})=>Y.str`must pass "${L}" keyword validation`},$.keyword$DataError={message:({keyword:L,schemaType:B})=>B?Y.str`"${L}" keyword must be ${B} ($data)`:Y.str`"${L}" keyword is invalid ($data)`};function J(L,B=$.keywordError,O,E){let{it:M}=L,{gen:R,compositeRule:q,allErrors:w}=M,I=V(L,B,O);if(E!==null&&E!==void 0?E:q||w)K(R,I);else H(M,Y._`[${I}]`)}$.reportError=J;function Q(L,B=$.keywordError,O){let{it:E}=L,{gen:M,compositeRule:R,allErrors:q}=E,w=V(L,B,O);if(K(M,w),!(R||q))H(E,G.default.vErrors)}$.reportExtraError=Q;function W(L,B){L.assign(G.default.errors,B),L.if(Y._`${G.default.vErrors} !== null`,()=>L.if(B,()=>L.assign(Y._`${G.default.vErrors}.length`,B),()=>L.assign(G.default.vErrors,null)))}$.resetErrorsCount=W;function Z({gen:L,keyword:B,schemaValue:O,data:E,errsCount:M,it:R}){if(M===void 0)throw Error("ajv implementation error");let q=L.name("err");L.forRange("i",M,G.default.errors,(w)=>{if(L.const(q,Y._`${G.default.vErrors}[${w}]`),L.if(Y._`${q}.instancePath === undefined`,()=>L.assign(Y._`${q}.instancePath`,(0,Y.strConcat)(G.default.instancePath,R.errorPath))),L.assign(Y._`${q}.schemaPath`,Y.str`${R.errSchemaPath}/${B}`),R.opts.verbose)L.assign(Y._`${q}.schema`,O),L.assign(Y._`${q}.data`,E)})}$.extendErrors=Z;function K(L,B){let O=L.const("err",B);L.if(Y._`${G.default.vErrors} === null`,()=>L.assign(G.default.vErrors,Y._`[${O}]`),Y._`${G.default.vErrors}.push(${O})`),L.code(Y._`${G.default.errors}++`)}function H(L,B){let{gen:O,validateName:E,schemaEnv:M}=L;if(M.$async)O.throw(Y._`new ${L.ValidationError}(${B})`);else O.assign(Y._`${E}.errors`,B),O.return(!1)}var z={keyword:new Y.Name("keyword"),schemaPath:new Y.Name("schemaPath"),params:new Y.Name("params"),propertyName:new Y.Name("propertyName"),message:new Y.Name("message"),schema:new Y.Name("schema"),parentSchema:new Y.Name("parentSchema")};function V(L,B,O){let{createErrors:E}=L.it;if(E===!1)return Y._`{}`;return A(L,B,O)}function A(L,B,O={}){let{gen:E,it:M}=L,R=[F(M,O),N(L,O)];return D(L,B,R),E.object(...R)}function F({errorPath:L},{instancePath:B}){let O=B?Y.str`${L}${(0,X.getErrorPath)(B,X.Type.Str)}`:L;return[G.default.instancePath,(0,Y.strConcat)(G.default.instancePath,O)]}function N({keyword:L,it:{errSchemaPath:B}},{schemaPath:O,parentSchema:E}){let M=E?B:Y.str`${B}/${L}`;if(O)M=Y.str`${M}${(0,X.getErrorPath)(O,X.Type.Str)}`;return[z.schemaPath,M]}function D(L,{params:B,message:O},E){let{keyword:M,data:R,schemaValue:q,it:w}=L,{opts:I,propertyName:P,topSchemaRef:_,schemaPath:C}=w;if(E.push([z.keyword,M],[z.params,typeof B=="function"?B(L):B||Y._`{}`]),I.messages)E.push([z.message,typeof O=="function"?O(L):O]);if(I.verbose)E.push([z.schema,q],[z.parentSchema,Y._`${_}${C}`],[G.default.data,R]);if(P)E.push([z.propertyName,P])}}}),Rz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.boolOrEmptySchema=$.topBoolOrEmptySchema=void 0;var Y=W40(),X=v6(),G=OK(),J={message:"boolean schema is false"};function Q(K){let{gen:H,schema:z,validateName:V}=K;if(z===!1)Z(K,!1);else if(typeof z=="object"&&z.$async===!0)H.return(G.default.data);else H.assign(X._`${V}.errors`,null),H.return(!0)}$.topBoolOrEmptySchema=Q;function W(K,H){let{gen:z,schema:V}=K;if(V===!1)z.var(H,!1),Z(K);else z.var(H,!0)}$.boolOrEmptySchema=W;function Z(K,H){let{gen:z,data:V}=K,A={gen:z,keyword:"false schema",data:V,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:K};(0,Y.reportError)(A,J,void 0,H)}}}),su1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.getRules=$.isJSONType=void 0;var Y=["string","number","integer","boolean","null","object","array"],X=new Set(Y);function G(Q){return typeof Q=="string"&&X.has(Q)}$.isJSONType=G;function J(){let Q={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...Q,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},Q.number,Q.string,Q.array,Q.object],post:{rules:[]},all:{},keywords:{}}}$.getRules=J}}),ou1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.shouldUseRule=$.shouldUseGroup=$.schemaHasRulesForType=void 0;function Y({schema:J,self:Q},W){let Z=Q.RULES.types[W];return Z&&Z!==!0&&X(J,Z)}$.schemaHasRulesForType=Y;function X(J,Q){return Q.rules.some((W)=>G(J,W))}$.shouldUseGroup=X;function G(J,Q){var W;return J[Q.keyword]!==void 0||((W=Q.definition.implements)===null||W===void 0?void 0:W.some((Z)=>J[Z]!==void 0))}$.shouldUseRule=G}}),Q40=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.reportTypeError=$.checkDataTypes=$.checkDataType=$.coerceAndCheckDataType=$.getJSONTypes=$.getSchemaTypes=$.DataType=void 0;var Y=su1(),X=ou1(),G=W40(),J=v6(),Q=V8(),W;(function(E){E[E.Correct=0]="Correct",E[E.Wrong=1]="Wrong"})(W||($.DataType=W={}));function Z(E){let M=K(E.type);if(M.includes("null")){if(E.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!M.length&&E.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(E.nullable===!0)M.push("null")}return M}$.getSchemaTypes=Z;function K(E){let M=Array.isArray(E)?E:E?[E]:[];if(M.every(Y.isJSONType))return M;throw Error("type must be JSONType or JSONType[]: "+M.join(","))}$.getJSONTypes=K;function H(E,M){let{gen:R,data:q,opts:w}=E,I=V(M,w.coerceTypes),P=M.length>0&&!(I.length===0&&M.length===1&&(0,X.schemaHasRulesForType)(E,M[0]));if(P){let _=D(M,q,w.strictNumbers,W.Wrong);R.if(_,()=>{if(I.length)A(E,M,I);else B(E)})}return P}$.coerceAndCheckDataType=H;var z=new Set(["string","number","integer","boolean","null"]);function V(E,M){return M?E.filter((R)=>z.has(R)||M==="array"&&R==="array"):[]}function A(E,M,R){let{gen:q,data:w,opts:I}=E,P=q.let("dataType",J._`typeof ${w}`),_=q.let("coerced",J._`undefined`);if(I.coerceTypes==="array")q.if(J._`${P} == 'object' && Array.isArray(${w}) && ${w}.length == 1`,()=>q.assign(w,J._`${w}[0]`).assign(P,J._`typeof ${w}`).if(D(M,w,I.strictNumbers),()=>q.assign(_,w)));q.if(J._`${_} !== undefined`);for(let k of R)if(z.has(k)||k==="array"&&I.coerceTypes==="array")C(k);q.else(),B(E),q.endIf(),q.if(J._`${_} !== undefined`,()=>{q.assign(w,_),F(E,_)});function C(k){switch(k){case"string":q.elseIf(J._`${P} == "number" || ${P} == "boolean"`).assign(_,J._`"" + ${w}`).elseIf(J._`${w} === null`).assign(_,J._`""`);return;case"number":q.elseIf(J._`${P} == "boolean" || ${w} === null
              || (${P} == "string" && ${w} && ${w} == +${w})`).assign(_,J._`+${w}`);return;case"integer":q.elseIf(J._`${P} === "boolean" || ${w} === null
              || (${P} === "string" && ${w} && ${w} == +${w} && !(${w} % 1))`).assign(_,J._`+${w}`);return;case"boolean":q.elseIf(J._`${w} === "false" || ${w} === 0 || ${w} === null`).assign(_,!1).elseIf(J._`${w} === "true" || ${w} === 1`).assign(_,!0);return;case"null":q.elseIf(J._`${w} === "" || ${w} === 0 || ${w} === false`),q.assign(_,null);return;case"array":q.elseIf(J._`${P} === "string" || ${P} === "number"
              || ${P} === "boolean" || ${w} === null`).assign(_,J._`[${w}]`)}}}function F({gen:E,parentData:M,parentDataProperty:R},q){E.if(J._`${M} !== undefined`,()=>E.assign(J._`${M}[${R}]`,q))}function N(E,M,R,q=W.Correct){let w=q===W.Correct?J.operators.EQ:J.operators.NEQ,I;switch(E){case"null":return J._`${M} ${w} null`;case"array":I=J._`Array.isArray(${M})`;break;case"object":I=J._`${M} && typeof ${M} == "object" && !Array.isArray(${M})`;break;case"integer":I=P(J._`!(${M} % 1) && !isNaN(${M})`);break;case"number":I=P();break;default:return J._`typeof ${M} ${w} ${E}`}return q===W.Correct?I:(0,J.not)(I);function P(_=J.nil){return(0,J.and)(J._`typeof ${M} == "number"`,_,R?J._`isFinite(${M})`:J.nil)}}$.checkDataType=N;function D(E,M,R,q){if(E.length===1)return N(E[0],M,R,q);let w,I=(0,Q.toHash)(E);if(I.array&&I.object){let P=J._`typeof ${M} != "object"`;w=I.null?P:J._`!${M} || ${P}`,delete I.null,delete I.array,delete I.object}else w=J.nil;if(I.number)delete I.integer;for(let P in I)w=(0,J.and)(w,N(P,M,R,q));return w}$.checkDataTypes=D;var L={message:({schema:E})=>`must be ${E}`,params:({schema:E,schemaValue:M})=>typeof E=="string"?J._`{type: ${E}}`:J._`{type: ${M}}`};function B(E){let M=O(E);(0,G.reportError)(M,L)}$.reportTypeError=B;function O(E){let{gen:M,data:R,schema:q}=E,w=(0,Q.schemaRefOrVal)(E,q,"type");return{gen:M,keyword:"type",data:R,schema:q.type,schemaCode:w,schemaValue:w,parentSchema:q,params:{},it:E}}}}),qz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.assignDefaults=void 0;var Y=v6(),X=V8();function G(Q,W){let{properties:Z,items:K}=Q.schema;if(W==="object"&&Z)for(let H in Z)J(Q,H,Z[H].default);else if(W==="array"&&Array.isArray(K))K.forEach((H,z)=>J(Q,z,H.default))}$.assignDefaults=G;function J(Q,W,Z){let{gen:K,compositeRule:H,data:z,opts:V}=Q;if(Z===void 0)return;let A=Y._`${z}${(0,Y.getProperty)(W)}`;if(H){(0,X.checkStrictMode)(Q,`default is ignored for: ${A}`);return}let F=Y._`${A} === undefined`;if(V.useDefaults==="empty")F=Y._`${F} || ${A} === null || ${A} === ""`;K.if(F,Y._`${A} = ${(0,Y.stringify)(Z)}`)}}}),EK=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.validateUnion=$.validateArray=$.usePattern=$.callValidateCode=$.schemaProperties=$.allSchemaProperties=$.noPropertyInData=$.propertyInData=$.isOwnProperty=$.hasPropFunc=$.reportMissingProp=$.checkMissingProp=$.checkReportMissingProp=void 0;var Y=v6(),X=V8(),G=OK(),J=V8();function Q(E,M){let{gen:R,data:q,it:w}=E;R.if(V(R,q,M,w.opts.ownProperties),()=>{E.setParams({missingProperty:Y._`${M}`},!0),E.error()})}$.checkReportMissingProp=Q;function W({gen:E,data:M,it:{opts:R}},q,w){return(0,Y.or)(...q.map((I)=>(0,Y.and)(V(E,M,I,R.ownProperties),Y._`${w} = ${I}`)))}$.checkMissingProp=W;function Z(E,M){E.setParams({missingProperty:M},!0),E.error()}$.reportMissingProp=Z;function K(E){return E.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Y._`Object.prototype.hasOwnProperty`})}$.hasPropFunc=K;function H(E,M,R){return Y._`${K(E)}.call(${M}, ${R})`}$.isOwnProperty=H;function z(E,M,R,q){let w=Y._`${M}${(0,Y.getProperty)(R)} !== undefined`;return q?Y._`${w} && ${H(E,M,R)}`:w}$.propertyInData=z;function V(E,M,R,q){let w=Y._`${M}${(0,Y.getProperty)(R)} === undefined`;return q?(0,Y.or)(w,(0,Y.not)(H(E,M,R))):w}$.noPropertyInData=V;function A(E){return E?Object.keys(E).filter((M)=>M!=="__proto__"):[]}$.allSchemaProperties=A;function F(E,M){return A(M).filter((R)=>!(0,X.alwaysValidSchema)(E,M[R]))}$.schemaProperties=F;function N({schemaCode:E,data:M,it:{gen:R,topSchemaRef:q,schemaPath:w,errorPath:I},it:P},_,C,k){let S=k?Y._`${E}, ${M}, ${q}${w}`:M,T=[[G.default.instancePath,(0,Y.strConcat)(G.default.instancePath,I)],[G.default.parentData,P.parentData],[G.default.parentDataProperty,P.parentDataProperty],[G.default.rootData,G.default.rootData]];if(P.opts.dynamicRef)T.push([G.default.dynamicAnchors,G.default.dynamicAnchors]);let v=Y._`${S}, ${R.object(...T)}`;return C!==Y.nil?Y._`${_}.call(${C}, ${v})`:Y._`${_}(${v})`}$.callValidateCode=N;var D=Y._`new RegExp`;function L({gen:E,it:{opts:M}},R){let q=M.unicodeRegExp?"u":"",{regExp:w}=M.code,I=w(R,q);return E.scopeValue("pattern",{key:I.toString(),ref:I,code:Y._`${w.code==="new RegExp"?D:(0,J.useFunc)(E,w)}(${R}, ${q})`})}$.usePattern=L;function B(E){let{gen:M,data:R,keyword:q,it:w}=E,I=M.name("valid");if(w.allErrors){let _=M.let("valid",!0);return P(()=>M.assign(_,!1)),_}return M.var(I,!0),P(()=>M.break()),I;function P(_){let C=M.const("len",Y._`${R}.length`);M.forRange("i",0,C,(k)=>{E.subschema({keyword:q,dataProp:k,dataPropType:X.Type.Num},I),M.if((0,Y.not)(I),_)})}}$.validateArray=B;function O(E){let{gen:M,schema:R,keyword:q,it:w}=E;if(!Array.isArray(R))throw Error("ajv implementation error");if(R.some((C)=>(0,X.alwaysValidSchema)(w,C))&&!w.opts.unevaluated)return;let P=M.let("valid",!1),_=M.name("_valid");M.block(()=>R.forEach((C,k)=>{let S=E.subschema({keyword:q,schemaProp:k,compositeRule:!0},_);if(M.assign(P,Y._`${P} || ${_}`),!E.mergeValidEvaluated(S,_))M.if((0,Y.not)(P))})),E.result(P,()=>E.reset(),()=>E.error(!0))}$.validateUnion=O}}),Iz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.validateKeywordUsage=$.validSchemaType=$.funcKeywordCode=$.macroKeywordCode=void 0;var Y=v6(),X=OK(),G=EK(),J=W40();function Q(F,N){let{gen:D,keyword:L,schema:B,parentSchema:O,it:E}=F,M=N.macro.call(E.self,B,O,E),R=z(D,L,M);if(E.opts.validateSchema!==!1)E.self.validateSchema(M,!0);let q=D.name("valid");F.subschema({schema:M,schemaPath:Y.nil,errSchemaPath:`${E.errSchemaPath}/${L}`,topSchemaRef:R,compositeRule:!0},q),F.pass(q,()=>F.error(!0))}$.macroKeywordCode=Q;function W(F,N){var D;let{gen:L,keyword:B,schema:O,parentSchema:E,$data:M,it:R}=F;H(R,N);let q=!M&&N.compile?N.compile.call(R.self,O,E,R):N.validate,w=z(L,B,q),I=L.let("valid");F.block$data(I,P),F.ok((D=N.valid)!==null&&D!==void 0?D:I);function P(){if(N.errors===!1){if(k(),N.modifying)Z(F);S(()=>F.error())}else{let T=N.async?_():C();if(N.modifying)Z(F);S(()=>K(F,T))}}function _(){let T=L.let("ruleErrs",null);return L.try(()=>k(Y._`await `),(v)=>L.assign(I,!1).if(Y._`${v} instanceof ${R.ValidationError}`,()=>L.assign(T,Y._`${v}.errors`),()=>L.throw(v))),T}function C(){let T=Y._`${w}.errors`;return L.assign(T,null),k(Y.nil),T}function k(T=N.async?Y._`await `:Y.nil){let v=R.opts.passContext?X.default.this:X.default.self,x=!(("compile"in N)&&!M||N.schema===!1);L.assign(I,Y._`${T}${(0,G.callValidateCode)(F,w,v,x)}`,N.modifying)}function S(T){var v;L.if((0,Y.not)((v=N.valid)!==null&&v!==void 0?v:I),T)}}$.funcKeywordCode=W;function Z(F){let{gen:N,data:D,it:L}=F;N.if(L.parentData,()=>N.assign(D,Y._`${L.parentData}[${L.parentDataProperty}]`))}function K(F,N){let{gen:D}=F;D.if(Y._`Array.isArray(${N})`,()=>{D.assign(X.default.vErrors,Y._`${X.default.vErrors} === null ? ${N} : ${X.default.vErrors}.concat(${N})`).assign(X.default.errors,Y._`${X.default.vErrors}.length`),(0,J.extendErrors)(F)},()=>F.error())}function H({schemaEnv:F},N){if(N.async&&!F.$async)throw Error("async keyword in sync schema")}function z(F,N,D){if(D===void 0)throw Error(`keyword "${N}" failed to compile`);return F.scopeValue("keyword",typeof D=="function"?{ref:D}:{ref:D,code:(0,Y.stringify)(D)})}function V(F,N,D=!1){return!N.length||N.some((L)=>L==="array"?Array.isArray(F):L==="object"?F&&typeof F=="object"&&!Array.isArray(F):typeof F==L||D&&typeof F>"u")}$.validSchemaType=V;function A({schema:F,opts:N,self:D,errSchemaPath:L},B,O){if(Array.isArray(B.keyword)?!B.keyword.includes(O):B.keyword!==O)throw Error("ajv implementation error");let E=B.dependencies;if(E===null||E===void 0?void 0:E.some((M)=>!Object.prototype.hasOwnProperty.call(F,M)))throw Error(`parent schema must have dependencies of ${O}: ${E.join(",")}`);if(B.validateSchema){if(!B.validateSchema(F[O])){let R=`keyword "${O}" value is invalid at path "${L}": `+D.errorsText(B.validateSchema.errors);if(N.validateSchema==="log")D.logger.error(R);else throw Error(R)}}}$.validateKeywordUsage=A}}),Pz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.extendSubschemaMode=$.extendSubschemaData=$.getSubschema=void 0;var Y=v6(),X=V8();function G(W,{keyword:Z,schemaProp:K,schema:H,schemaPath:z,errSchemaPath:V,topSchemaRef:A}){if(Z!==void 0&&H!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(Z!==void 0){let F=W.schema[Z];return K===void 0?{schema:F,schemaPath:Y._`${W.schemaPath}${(0,Y.getProperty)(Z)}`,errSchemaPath:`${W.errSchemaPath}/${Z}`}:{schema:F[K],schemaPath:Y._`${W.schemaPath}${(0,Y.getProperty)(Z)}${(0,Y.getProperty)(K)}`,errSchemaPath:`${W.errSchemaPath}/${Z}/${(0,X.escapeFragment)(K)}`}}if(H!==void 0){if(z===void 0||V===void 0||A===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:H,schemaPath:z,topSchemaRef:A,errSchemaPath:V}}throw Error('either "keyword" or "schema" must be passed')}$.getSubschema=G;function J(W,Z,{dataProp:K,dataPropType:H,data:z,dataTypes:V,propertyName:A}){if(z!==void 0&&K!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:F}=Z;if(K!==void 0){let{errorPath:D,dataPathArr:L,opts:B}=Z,O=F.let("data",Y._`${Z.data}${(0,Y.getProperty)(K)}`,!0);N(O),W.errorPath=Y.str`${D}${(0,X.getErrorPath)(K,H,B.jsPropertySyntax)}`,W.parentDataProperty=Y._`${K}`,W.dataPathArr=[...L,W.parentDataProperty]}if(z!==void 0){let D=z instanceof Y.Name?z:F.let("data",z,!0);if(N(D),A!==void 0)W.propertyName=A}if(V)W.dataTypes=V;function N(D){W.data=D,W.dataLevel=Z.dataLevel+1,W.dataTypes=[],Z.definedProperties=new Set,W.parentData=Z.data,W.dataNames=[...Z.dataNames,D]}}$.extendSubschemaData=J;function Q(W,{jtdDiscriminator:Z,jtdMetadata:K,compositeRule:H,createErrors:z,allErrors:V}){if(H!==void 0)W.compositeRule=H;if(z!==void 0)W.createErrors=z;if(V!==void 0)W.allErrors=V;W.jtdDiscriminator=Z,W.jtdMetadata=K}$.extendSubschemaMode=Q}}),tu1=I1({"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"($,Y){Y.exports=function X(G,J){if(G===J)return!0;if(G&&J&&typeof G=="object"&&typeof J=="object"){if(G.constructor!==J.constructor)return!1;var Q,W,Z;if(Array.isArray(G)){if(Q=G.length,Q!=J.length)return!1;for(W=Q;W--!==0;)if(!X(G[W],J[W]))return!1;return!0}if(G.constructor===RegExp)return G.source===J.source&&G.flags===J.flags;if(G.valueOf!==Object.prototype.valueOf)return G.valueOf()===J.valueOf();if(G.toString!==Object.prototype.toString)return G.toString()===J.toString();if(Z=Object.keys(G),Q=Z.length,Q!==Object.keys(J).length)return!1;for(W=Q;W--!==0;)if(!Object.prototype.hasOwnProperty.call(J,Z[W]))return!1;for(W=Q;W--!==0;){var K=Z[W];if(!X(G[K],J[K]))return!1}return!0}return G!==G&&J!==J}}}),Z40=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.getSchemaRefs=$.resolveUrl=$.normalizeId=$._getFullPath=$.getFullPath=$.inlineRef=void 0;var Y=V8(),X=tu1(),G=FO(),J=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Q(L,B=!0){if(typeof L=="boolean")return!0;if(B===!0)return!Z(L);if(!B)return!1;return K(L)<=B}$.inlineRef=Q;var W=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Z(L){for(let B in L){if(W.has(B))return!0;let O=L[B];if(Array.isArray(O)&&O.some(Z))return!0;if(typeof O=="object"&&Z(O))return!0}return!1}function K(L){let B=0;for(let O in L){if(O==="$ref")return 1/0;if(B++,J.has(O))continue;if(typeof L[O]=="object")(0,Y.eachItem)(L[O],(E)=>B+=K(E));if(B===1/0)return 1/0}return B}function H(L,B="",O){if(O!==!1)B=A(B);let E=L.parse(B);return z(L,E)}$.getFullPath=H;function z(L,B){return L.serialize(B).split("#")[0]+"#"}$._getFullPath=z;var V=/#\/?$/;function A(L){return L?L.replace(V,""):""}$.normalizeId=A;function F(L,B,O){return O=A(O),L.resolve(B,O)}$.resolveUrl=F;var N=/^[a-z_][-a-z0-9._]*$/i;function D(L,B){if(typeof L=="boolean")return{};let{schemaId:O,uriResolver:E}=this.opts,M=A(L[O]||B),R={"":M},q=H(E,M,!1),w={},I=new Set;return G(L,{allKeys:!0},(C,k,S,T)=>{if(T===void 0)return;let v=q+k,x=R[T];if(typeof C[O]=="string")x=y.call(this,C[O]);d.call(this,C.$anchor),d.call(this,C.$dynamicAnchor),R[k]=x;function y(u){let b=this.opts.uriResolver.resolve;if(u=A(x?b(x,u):u),I.has(u))throw _(u);I.add(u);let g=this.refs[u];if(typeof g=="string")g=this.refs[g];if(typeof g=="object")P(C,g.schema,u);else if(u!==A(v))if(u[0]==="#")P(C,w[u],u),w[u]=C;else this.refs[u]=v;return u}function d(u){if(typeof u=="string"){if(!N.test(u))throw Error(`invalid anchor "${u}"`);y.call(this,`#${u}`)}}}),w;function P(C,k,S){if(k!==void 0&&!X(C,k))throw _(S)}function _(C){return Error(`reference "${C}" resolves to more than one schema`)}}$.getSchemaRefs=D}}),Jf=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.getData=$.KeywordCxt=$.validateFunctionCode=void 0;var Y=Rz8(),X=Q40(),G=ou1(),J=Q40(),Q=qz8(),W=Iz8(),Z=Pz8(),K=v6(),H=OK(),z=Z40(),V=V8(),A=W40();function F(m){if(q(m)){if(I(m),R(m)){B(m);return}}N(m,()=>(0,Y.topBoolOrEmptySchema)(m))}$.validateFunctionCode=F;function N({gen:m,validateName:$0,schema:Y0,schemaEnv:K0,opts:A0},D0){if(A0.code.es5)m.func($0,K._`${H.default.data}, ${H.default.valCxt}`,K0.$async,()=>{m.code(K._`"use strict"; ${E(Y0,A0)}`),L(m,A0),m.code(D0)});else m.func($0,K._`${H.default.data}, ${D(A0)}`,K0.$async,()=>m.code(E(Y0,A0)).code(D0))}function D(m){return K._`{${H.default.instancePath}="", ${H.default.parentData}, ${H.default.parentDataProperty}, ${H.default.rootData}=${H.default.data}${m.dynamicRef?K._`, ${H.default.dynamicAnchors}={}`:K.nil}}={}`}function L(m,$0){m.if(H.default.valCxt,()=>{if(m.var(H.default.instancePath,K._`${H.default.valCxt}.${H.default.instancePath}`),m.var(H.default.parentData,K._`${H.default.valCxt}.${H.default.parentData}`),m.var(H.default.parentDataProperty,K._`${H.default.valCxt}.${H.default.parentDataProperty}`),m.var(H.default.rootData,K._`${H.default.valCxt}.${H.default.rootData}`),$0.dynamicRef)m.var(H.default.dynamicAnchors,K._`${H.default.valCxt}.${H.default.dynamicAnchors}`)},()=>{if(m.var(H.default.instancePath,K._`""`),m.var(H.default.parentData,K._`undefined`),m.var(H.default.parentDataProperty,K._`undefined`),m.var(H.default.rootData,H.default.data),$0.dynamicRef)m.var(H.default.dynamicAnchors,K._`{}`)})}function B(m){let{schema:$0,opts:Y0,gen:K0}=m;N(m,()=>{if(Y0.$comment&&$0.$comment)T(m);if(C(m),K0.let(H.default.vErrors,null),K0.let(H.default.errors,0),Y0.unevaluated)O(m);P(m),v(m)});return}function O(m){let{gen:$0,validateName:Y0}=m;m.evaluated=$0.const("evaluated",K._`${Y0}.evaluated`),$0.if(K._`${m.evaluated}.dynamicProps`,()=>$0.assign(K._`${m.evaluated}.props`,K._`undefined`)),$0.if(K._`${m.evaluated}.dynamicItems`,()=>$0.assign(K._`${m.evaluated}.items`,K._`undefined`))}function E(m,$0){let Y0=typeof m=="object"&&m[$0.schemaId];return Y0&&($0.code.source||$0.code.process)?K._`/*# sourceURL=${Y0} */`:K.nil}function M(m,$0){if(q(m)){if(I(m),R(m)){w(m,$0);return}}(0,Y.boolOrEmptySchema)(m,$0)}function R({schema:m,self:$0}){if(typeof m=="boolean")return!m;for(let Y0 in m)if($0.RULES.all[Y0])return!0;return!1}function q(m){return typeof m.schema!="boolean"}function w(m,$0){let{schema:Y0,gen:K0,opts:A0}=m;if(A0.$comment&&Y0.$comment)T(m);k(m),S(m);let D0=K0.const("_errs",H.default.errors);P(m,D0),K0.var($0,K._`${D0} === ${H.default.errors}`)}function I(m){(0,V.checkUnknownRules)(m),_(m)}function P(m,$0){if(m.opts.jtd)return y(m,[],!1,$0);let Y0=(0,X.getSchemaTypes)(m.schema),K0=(0,X.coerceAndCheckDataType)(m,Y0);y(m,Y0,!K0,$0)}function _(m){let{schema:$0,errSchemaPath:Y0,opts:K0,self:A0}=m;if($0.$ref&&K0.ignoreKeywordsWithRef&&(0,V.schemaHasRulesButRef)($0,A0.RULES))A0.logger.warn(`$ref: keywords ignored in schema at path "${Y0}"`)}function C(m){let{schema:$0,opts:Y0}=m;if($0.default!==void 0&&Y0.useDefaults&&Y0.strictSchema)(0,V.checkStrictMode)(m,"default is ignored in the schema root")}function k(m){let $0=m.schema[m.opts.schemaId];if($0)m.baseId=(0,z.resolveUrl)(m.opts.uriResolver,m.baseId,$0)}function S(m){if(m.schema.$async&&!m.schemaEnv.$async)throw Error("async schema in sync schema")}function T({gen:m,schemaEnv:$0,schema:Y0,errSchemaPath:K0,opts:A0}){let D0=Y0.$comment;if(A0.$comment===!0)m.code(K._`${H.default.self}.logger.log(${D0})`);else if(typeof A0.$comment=="function"){let O0=K.str`${K0}/$comment`,R0=m.scopeValue("root",{ref:$0.root});m.code(K._`${H.default.self}.opts.$comment(${D0}, ${O0}, ${R0}.schema)`)}}function v(m){let{gen:$0,schemaEnv:Y0,validateName:K0,ValidationError:A0,opts:D0}=m;if(Y0.$async)$0.if(K._`${H.default.errors} === 0`,()=>$0.return(H.default.data),()=>$0.throw(K._`new ${A0}(${H.default.vErrors})`));else{if($0.assign(K._`${K0}.errors`,H.default.vErrors),D0.unevaluated)x(m);$0.return(K._`${H.default.errors} === 0`)}}function x({gen:m,evaluated:$0,props:Y0,items:K0}){if(Y0 instanceof K.Name)m.assign(K._`${$0}.props`,Y0);if(K0 instanceof K.Name)m.assign(K._`${$0}.items`,K0)}function y(m,$0,Y0,K0){let{gen:A0,schema:D0,data:O0,allErrors:R0,opts:I0,self:g0}=m,{RULES:p0}=g0;if(D0.$ref&&(I0.ignoreKeywordsWithRef||!(0,V.schemaHasRulesButRef)(D0,p0))){A0.block(()=>X0(m,"$ref",p0.all.$ref.definition));return}if(!I0.jtd)u(m,$0);A0.block(()=>{for(let P1 of p0.rules)U4(P1);U4(p0.post)});function U4(P1){if(!(0,G.shouldUseGroup)(D0,P1))return;if(P1.type){if(A0.if((0,J.checkDataType)(P1.type,O0,I0.strictNumbers)),d(m,P1),$0.length===1&&$0[0]===P1.type&&Y0)A0.else(),(0,J.reportTypeError)(m);A0.endIf()}else d(m,P1);if(!R0)A0.if(K._`${H.default.errors} === ${K0||0}`)}}function d(m,$0){let{gen:Y0,schema:K0,opts:{useDefaults:A0}}=m;if(A0)(0,Q.assignDefaults)(m,$0.type);Y0.block(()=>{for(let D0 of $0.rules)if((0,G.shouldUseRule)(K0,D0))X0(m,D0.keyword,D0.definition,$0.type)})}function u(m,$0){if(m.schemaEnv.meta||!m.opts.strictTypes)return;if(b(m,$0),!m.opts.allowUnionTypes)g(m,$0);p(m,m.dataTypes)}function b(m,$0){if(!$0.length)return;if(!m.dataTypes.length){m.dataTypes=$0;return}$0.forEach((Y0)=>{if(!n(m.dataTypes,Y0))s(m,`type "${Y0}" not allowed by context "${m.dataTypes.join(",")}"`)}),t(m,$0)}function g(m,$0){if($0.length>1&&!($0.length===2&&$0.includes("null")))s(m,"use allowUnionTypes to allow union type keyword")}function p(m,$0){let Y0=m.self.RULES.all;for(let K0 in Y0){let A0=Y0[K0];if(typeof A0=="object"&&(0,G.shouldUseRule)(m.schema,A0)){let{type:D0}=A0.definition;if(D0.length&&!D0.some((O0)=>h($0,O0)))s(m,`missing type "${D0.join(",")}" for keyword "${K0}"`)}}}function h(m,$0){return m.includes($0)||$0==="number"&&m.includes("integer")}function n(m,$0){return m.includes($0)||$0==="integer"&&m.includes("number")}function t(m,$0){let Y0=[];for(let K0 of m.dataTypes)if(n($0,K0))Y0.push(K0);else if($0.includes("integer")&&K0==="number")Y0.push("integer");m.dataTypes=Y0}function s(m,$0){let Y0=m.schemaEnv.baseId+m.errSchemaPath;$0+=` at "${Y0}" (strictTypes)`,(0,V.checkStrictMode)(m,$0,m.opts.strictTypes)}var Z0=class{constructor(m,$0,Y0){if((0,W.validateKeywordUsage)(m,$0,Y0),this.gen=m.gen,this.allErrors=m.allErrors,this.keyword=Y0,this.data=m.data,this.schema=m.schema[Y0],this.$data=$0.$data&&m.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,V.schemaRefOrVal)(m,this.schema,Y0,this.$data),this.schemaType=$0.schemaType,this.parentSchema=m.schema,this.params={},this.it=m,this.def=$0,this.$data)this.schemaCode=m.gen.const("vSchema",e(this.$data,m));else if(this.schemaCode=this.schemaValue,!(0,W.validSchemaType)(this.schema,$0.schemaType,$0.allowUndefined))throw Error(`${Y0} value must be ${JSON.stringify($0.schemaType)}`);if("code"in $0?$0.trackErrors:$0.errors!==!1)this.errsCount=m.gen.const("_errs",H.default.errors)}result(m,$0,Y0){this.failResult((0,K.not)(m),$0,Y0)}failResult(m,$0,Y0){if(this.gen.if(m),Y0)Y0();else this.error();if($0){if(this.gen.else(),$0(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(m,$0){this.failResult((0,K.not)(m),void 0,$0)}fail(m){if(m===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(m),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(m){if(!this.$data)return this.fail(m);let{schemaCode:$0}=this;this.fail(K._`${$0} !== undefined && (${(0,K.or)(this.invalid$data(),m)})`)}error(m,$0,Y0){if($0){this.setParams($0),this._error(m,Y0),this.setParams({});return}this._error(m,Y0)}_error(m,$0){(m?A.reportExtraError:A.reportError)(this,this.def.error,$0)}$dataError(){(0,A.reportError)(this,this.def.$dataError||A.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,A.resetErrorsCount)(this.gen,this.errsCount)}ok(m){if(!this.allErrors)this.gen.if(m)}setParams(m,$0){if($0)Object.assign(this.params,m);else this.params=m}block$data(m,$0,Y0=K.nil){this.gen.block(()=>{this.check$data(m,Y0),$0()})}check$data(m=K.nil,$0=K.nil){if(!this.$data)return;let{gen:Y0,schemaCode:K0,schemaType:A0,def:D0}=this;if(Y0.if((0,K.or)(K._`${K0} === undefined`,$0)),m!==K.nil)Y0.assign(m,!0);if(A0.length||D0.validateSchema){if(Y0.elseIf(this.invalid$data()),this.$dataError(),m!==K.nil)Y0.assign(m,!1)}Y0.else()}invalid$data(){let{gen:m,schemaCode:$0,schemaType:Y0,def:K0,it:A0}=this;return(0,K.or)(D0(),O0());function D0(){if(Y0.length){if(!($0 instanceof K.Name))throw Error("ajv implementation error");let R0=Array.isArray(Y0)?Y0:[Y0];return K._`${(0,J.checkDataTypes)(R0,$0,A0.opts.strictNumbers,J.DataType.Wrong)}`}return K.nil}function O0(){if(K0.validateSchema){let R0=m.scopeValue("validate$data",{ref:K0.validateSchema});return K._`!${R0}(${$0})`}return K.nil}}subschema(m,$0){let Y0=(0,Z.getSubschema)(this.it,m);(0,Z.extendSubschemaData)(Y0,this.it,m),(0,Z.extendSubschemaMode)(Y0,m);let K0={...this.it,...Y0,items:void 0,props:void 0};return M(K0,$0),K0}mergeEvaluated(m,$0){let{it:Y0,gen:K0}=this;if(!Y0.opts.unevaluated)return;if(Y0.props!==!0&&m.props!==void 0)Y0.props=V.mergeEvaluated.props(K0,m.props,Y0.props,$0);if(Y0.items!==!0&&m.items!==void 0)Y0.items=V.mergeEvaluated.items(K0,m.items,Y0.items,$0)}mergeValidEvaluated(m,$0){let{it:Y0,gen:K0}=this;if(Y0.opts.unevaluated&&(Y0.props!==!0||Y0.items!==!0))return K0.if($0,()=>this.mergeEvaluated(m,K.Name)),!0}};$.KeywordCxt=Z0;function X0(m,$0,Y0,K0){let A0=new Z0(m,Y0,$0);if("code"in Y0)Y0.code(A0,K0);else if(A0.$data&&Y0.validate)(0,W.funcKeywordCode)(A0,Y0);else if("macro"in Y0)(0,W.macroKeywordCode)(A0,Y0);else if(Y0.compile||Y0.validate)(0,W.funcKeywordCode)(A0,Y0)}var a=/^\/(?:[^~]|~0|~1)*$/,Q0=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function e(m,{dataLevel:$0,dataNames:Y0,dataPathArr:K0}){let A0,D0;if(m==="")return H.default.rootData;if(m[0]==="/"){if(!a.test(m))throw Error(`Invalid JSON-pointer: ${m}`);A0=m,D0=H.default.rootData}else{let g0=Q0.exec(m);if(!g0)throw Error(`Invalid JSON-pointer: ${m}`);let p0=+g0[1];if(A0=g0[2],A0==="#"){if(p0>=$0)throw Error(I0("property/index",p0));return K0[$0-p0]}if(p0>$0)throw Error(I0("data",p0));if(D0=Y0[$0-p0],!A0)return D0}let O0=D0,R0=A0.split("/");for(let g0 of R0)if(g0)D0=K._`${D0}${(0,K.getProperty)((0,V.unescapeJsonPointer)(g0))}`,O0=K._`${O0} && ${D0}`;return O0;function I0(g0,p0){return`Cannot access ${g0} ${p0} levels up, current level is ${$0}`}}$.getData=e}}),K40=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=class extends Error{constructor(X){super("validation failed");this.errors=X,this.ajv=this.validation=!0}};$.default=Y}}),Qf=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Z40(),X=class extends Error{constructor(G,J,Q,W){super(W||`can't resolve reference ${Q} from id ${J}`);this.missingRef=(0,Y.resolveUrl)(G,J,Q),this.missingSchema=(0,Y.normalizeId)((0,Y.getFullPath)(G,this.missingRef))}};$.default=X}}),U40=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.resolveSchema=$.getCompilingSchema=$.resolveRef=$.compileSchema=$.SchemaEnv=void 0;var Y=v6(),X=K40(),G=OK(),J=Z40(),Q=V8(),W=Jf(),Z=class{constructor(B){var O;this.refs={},this.dynamicAnchors={};let E;if(typeof B.schema=="object")E=B.schema;this.schema=B.schema,this.schemaId=B.schemaId,this.root=B.root||this,this.baseId=(O=B.baseId)!==null&&O!==void 0?O:(0,J.normalizeId)(E===null||E===void 0?void 0:E[B.schemaId||"$id"]),this.schemaPath=B.schemaPath,this.localRefs=B.localRefs,this.meta=B.meta,this.$async=E===null||E===void 0?void 0:E.$async,this.refs={}}};$.SchemaEnv=Z;function K(B){let O=V.call(this,B);if(O)return O;let E=(0,J.getFullPath)(this.opts.uriResolver,B.root.baseId),{es5:M,lines:R}=this.opts.code,{ownProperties:q}=this.opts,w=new Y.CodeGen(this.scope,{es5:M,lines:R,ownProperties:q}),I;if(B.$async)I=w.scopeValue("Error",{ref:X.default,code:Y._`require("ajv/dist/runtime/validation_error").default`});let P=w.scopeName("validate");B.validateName=P;let _={gen:w,allErrors:this.opts.allErrors,data:G.default.data,parentData:G.default.parentData,parentDataProperty:G.default.parentDataProperty,dataNames:[G.default.data],dataPathArr:[Y.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:w.scopeValue("schema",this.opts.code.source===!0?{ref:B.schema,code:(0,Y.stringify)(B.schema)}:{ref:B.schema}),validateName:P,ValidationError:I,schema:B.schema,schemaEnv:B,rootId:E,baseId:B.baseId||E,schemaPath:Y.nil,errSchemaPath:B.schemaPath||(this.opts.jtd?"":"#"),errorPath:Y._`""`,opts:this.opts,self:this},C;try{this._compilations.add(B),(0,W.validateFunctionCode)(_),w.optimize(this.opts.code.optimize);let k=w.toString();if(C=`${w.scopeRefs(G.default.scope)}return ${k}`,this.opts.code.process)C=this.opts.code.process(C,B);let T=Function(`${G.default.self}`,`${G.default.scope}`,C)(this,this.scope.get());if(this.scope.value(P,{ref:T}),T.errors=null,T.schema=B.schema,T.schemaEnv=B,B.$async)T.$async=!0;if(this.opts.code.source===!0)T.source={validateName:P,validateCode:k,scopeValues:w._values};if(this.opts.unevaluated){let{props:v,items:x}=_;if(T.evaluated={props:v instanceof Y.Name?void 0:v,items:x instanceof Y.Name?void 0:x,dynamicProps:v instanceof Y.Name,dynamicItems:x instanceof Y.Name},T.source)T.source.evaluated=(0,Y.stringify)(T.evaluated)}return B.validate=T,B}catch(k){if(delete B.validate,delete B.validateName,C)this.logger.error("Error compiling schema, function code:",C);throw k}finally{this._compilations.delete(B)}}$.compileSchema=K;function H(B,O,E){var M;E=(0,J.resolveUrl)(this.opts.uriResolver,O,E);let R=B.refs[E];if(R)return R;let q=F.call(this,B,E);if(q===void 0){let w=(M=B.localRefs)===null||M===void 0?void 0:M[E],{schemaId:I}=this.opts;if(w)q=new Z({schema:w,schemaId:I,root:B,baseId:O})}if(q===void 0)return;return B.refs[E]=z.call(this,q)}$.resolveRef=H;function z(B){if((0,J.inlineRef)(B.schema,this.opts.inlineRefs))return B.schema;return B.validate?B:K.call(this,B)}function V(B){for(let O of this._compilations)if(A(O,B))return O}$.getCompilingSchema=V;function A(B,O){return B.schema===O.schema&&B.root===O.root&&B.baseId===O.baseId}function F(B,O){let E;while(typeof(E=this.refs[O])=="string")O=E;return E||this.schemas[O]||N.call(this,B,O)}function N(B,O){let E=this.opts.uriResolver.parse(O),M=(0,J._getFullPath)(this.opts.uriResolver,E),R=(0,J.getFullPath)(this.opts.uriResolver,B.baseId,void 0);if(Object.keys(B.schema).length>0&&M===R)return L.call(this,E,B);let q=(0,J.normalizeId)(M),w=this.refs[q]||this.schemas[q];if(typeof w=="string"){let I=N.call(this,B,w);if(typeof(I===null||I===void 0?void 0:I.schema)!=="object")return;return L.call(this,E,I)}if(typeof(w===null||w===void 0?void 0:w.schema)!=="object")return;if(!w.validate)K.call(this,w);if(q===(0,J.normalizeId)(O)){let{schema:I}=w,{schemaId:P}=this.opts,_=I[P];if(_)R=(0,J.resolveUrl)(this.opts.uriResolver,R,_);return new Z({schema:I,schemaId:P,root:B,baseId:R})}return L.call(this,E,w)}$.resolveSchema=N;var D=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function L(B,{baseId:O,schema:E,root:M}){var R;if(((R=B.fragment)===null||R===void 0?void 0:R[0])!=="/")return;for(let I of B.fragment.slice(1).split("/")){if(typeof E==="boolean")return;let P=E[(0,Q.unescapeFragment)(I)];if(P===void 0)return;E=P;let _=typeof E==="object"&&E[this.opts.schemaId];if(!D.has(I)&&_)O=(0,J.resolveUrl)(this.opts.uriResolver,O,_)}let q;if(typeof E!="boolean"&&E.$ref&&!(0,Q.schemaHasRulesButRef)(E,this.RULES)){let I=(0,J.resolveUrl)(this.opts.uriResolver,O,E.$ref);q=N.call(this,M,I)}let{schemaId:w}=this.opts;if(q=q||new Z({schema:E,schemaId:w,root:M,baseId:O}),q.schema!==q.root.schema)return q;return}}}),wz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json"($,Y){Y.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}}),eu1=I1({"../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js"($,Y){var X=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),G=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function J(N){let D="",L=0,B=0;for(B=0;B<N.length;B++){if(L=N[B].charCodeAt(0),L===48)continue;if(!(L>=48&&L<=57||L>=65&&L<=70||L>=97&&L<=102))return"";D+=N[B];break}for(B+=1;B<N.length;B++){if(L=N[B].charCodeAt(0),!(L>=48&&L<=57||L>=65&&L<=70||L>=97&&L<=102))return"";D+=N[B]}return D}var Q=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function W(N){return N.length=0,!0}function Z(N,D,L){if(N.length){let B=J(N);if(B!=="")D.push(B);else return L.error=!0,!1;N.length=0}return!0}function K(N){let D=0,L={error:!1,address:"",zone:""},B=[],O=[],E=!1,M=!1,R=Z;for(let q=0;q<N.length;q++){let w=N[q];if(w==="["||w==="]")continue;if(w===":"){if(E===!0)M=!0;if(!R(O,B,L))break;if(++D>7){L.error=!0;break}if(q>0&&N[q-1]===":")E=!0;B.push(":");continue}else if(w==="%"){if(!R(O,B,L))break;R=W}else{O.push(w);continue}}if(O.length)if(R===W)L.zone=O.join("");else if(M)B.push(O.join(""));else B.push(J(O));return L.address=B.join(""),L}function H(N){if(z(N,":")<2)return{host:N,isIPV6:!1};let D=K(N);if(!D.error){let{address:L,address:B}=D;if(D.zone)L+="%"+D.zone,B+="%25"+D.zone;return{host:L,isIPV6:!0,escapedHost:B}}else return{host:N,isIPV6:!1}}function z(N,D){let L=0;for(let B=0;B<N.length;B++)if(N[B]===D)L++;return L}function V(N){let D=N,L=[],B=-1,O=0;while(O=D.length){if(O===1)if(D===".")break;else if(D==="/"){L.push("/");break}else{L.push(D);break}else if(O===2){if(D[0]==="."){if(D[1]===".")break;else if(D[1]==="/"){D=D.slice(2);continue}}else if(D[0]==="/"){if(D[1]==="."||D[1]==="/"){L.push("/");break}}}else if(O===3){if(D==="/.."){if(L.length!==0)L.pop();L.push("/");break}}if(D[0]==="."){if(D[1]==="."){if(D[2]==="/"){D=D.slice(3);continue}}else if(D[1]==="/"){D=D.slice(2);continue}}else if(D[0]==="/"){if(D[1]==="."){if(D[2]==="/"){D=D.slice(2);continue}else if(D[2]==="."){if(D[3]==="/"){if(D=D.slice(3),L.length!==0)L.pop();continue}}}}if((B=D.indexOf("/",1))===-1){L.push(D);break}else L.push(D.slice(0,B)),D=D.slice(B)}return L.join("")}function A(N,D){let L=D!==!0?escape:unescape;if(N.scheme!==void 0)N.scheme=L(N.scheme);if(N.userinfo!==void 0)N.userinfo=L(N.userinfo);if(N.host!==void 0)N.host=L(N.host);if(N.path!==void 0)N.path=L(N.path);if(N.query!==void 0)N.query=L(N.query);if(N.fragment!==void 0)N.fragment=L(N.fragment);return N}function F(N){let D=[];if(N.userinfo!==void 0)D.push(N.userinfo),D.push("@");if(N.host!==void 0){let L=unescape(N.host);if(!G(L)){let B=H(L);if(B.isIPV6===!0)L=`[${B.escapedHost}]`;else L=N.host}D.push(L)}if(typeof N.port==="number"||typeof N.port==="string")D.push(":"),D.push(String(N.port));return D.length?D.join(""):void 0}Y.exports={nonSimpleDomain:Q,recomposeAuthority:F,normalizeComponentEncoding:A,removeDotSegments:V,isIPv4:G,isUUID:X,normalizeIPv6:H,stringArrayToHexStripped:J}}}),_z8=I1({"../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js"($,Y){var{isUUID:X}=eu1(),G=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,J=["http","https","ws","wss","urn","urn:uuid"];function Q(w){return J.indexOf(w)!==-1}function W(w){if(w.secure===!0)return!0;else if(w.secure===!1)return!1;else if(w.scheme)return w.scheme.length===3&&(w.scheme[0]==="w"||w.scheme[0]==="W")&&(w.scheme[1]==="s"||w.scheme[1]==="S")&&(w.scheme[2]==="s"||w.scheme[2]==="S");else return!1}function Z(w){if(!w.host)w.error=w.error||"HTTP URIs must have a host.";return w}function K(w){let I=String(w.scheme).toLowerCase()==="https";if(w.port===(I?443:80)||w.port==="")w.port=void 0;if(!w.path)w.path="/";return w}function H(w){return w.secure=W(w),w.resourceName=(w.path||"/")+(w.query?"?"+w.query:""),w.path=void 0,w.query=void 0,w}function z(w){if(w.port===(W(w)?443:80)||w.port==="")w.port=void 0;if(typeof w.secure==="boolean")w.scheme=w.secure?"wss":"ws",w.secure=void 0;if(w.resourceName){let[I,P]=w.resourceName.split("?");w.path=I&&I!=="/"?I:void 0,w.query=P,w.resourceName=void 0}return w.fragment=void 0,w}function V(w,I){if(!w.path)return w.error="URN can not be parsed",w;let P=w.path.match(G);if(P){let _=I.scheme||w.scheme||"urn";w.nid=P[1].toLowerCase(),w.nss=P[2];let C=`${_}:${I.nid||w.nid}`,k=q(C);if(w.path=void 0,k)w=k.parse(w,I)}else w.error=w.error||"URN can not be parsed.";return w}function A(w,I){if(w.nid===void 0)throw Error("URN without nid cannot be serialized");let P=I.scheme||w.scheme||"urn",_=w.nid.toLowerCase(),C=`${P}:${I.nid||_}`,k=q(C);if(k)w=k.serialize(w,I);let S=w,T=w.nss;return S.path=`${_||I.nid}:${T}`,I.skipEscape=!0,S}function F(w,I){let P=w;if(P.uuid=P.nss,P.nss=void 0,!I.tolerant&&(!P.uuid||!X(P.uuid)))P.error=P.error||"UUID is not valid.";return P}function N(w){let I=w;return I.nss=(w.uuid||"").toLowerCase(),I}var D={scheme:"http",domainHost:!0,parse:Z,serialize:K},L={scheme:"https",domainHost:D.domainHost,parse:Z,serialize:K},B={scheme:"ws",domainHost:!0,parse:H,serialize:z},O={scheme:"wss",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize},E={scheme:"urn",parse:V,serialize:A,skipNormalize:!0},M={scheme:"urn:uuid",parse:F,serialize:N,skipNormalize:!0},R={http:D,https:L,ws:B,wss:O,urn:E,"urn:uuid":M};Object.setPrototypeOf(R,null);function q(w){return w&&(R[w]||R[w.toLowerCase()])||void 0}Y.exports={wsIsSecure:W,SCHEMES:R,isValidSchemeName:Q,getSchemeHandler:q}}}),jz8=I1({"../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js"($,Y){var{normalizeIPv6:X,removeDotSegments:G,recomposeAuthority:J,normalizeComponentEncoding:Q,isIPv4:W,nonSimpleDomain:Z}=eu1(),{SCHEMES:K,getSchemeHandler:H}=_z8();function z(O,E){if(typeof O==="string")O=N(L(O,E),E);else if(typeof O==="object")O=L(N(O,E),E);return O}function V(O,E,M){let R=M?Object.assign({scheme:"null"},M):{scheme:"null"},q=A(L(O,R),L(E,R),R,!0);return R.skipEscape=!0,N(q,R)}function A(O,E,M,R){let q={};if(!R)O=L(N(O,M),M),E=L(N(E,M),M);if(M=M||{},!M.tolerant&&E.scheme)q.scheme=E.scheme,q.userinfo=E.userinfo,q.host=E.host,q.port=E.port,q.path=G(E.path||""),q.query=E.query;else{if(E.userinfo!==void 0||E.host!==void 0||E.port!==void 0)q.userinfo=E.userinfo,q.host=E.host,q.port=E.port,q.path=G(E.path||""),q.query=E.query;else{if(!E.path)if(q.path=O.path,E.query!==void 0)q.query=E.query;else q.query=O.query;else{if(E.path[0]==="/")q.path=G(E.path);else{if((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path)q.path="/"+E.path;else if(!O.path)q.path=E.path;else q.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+E.path;q.path=G(q.path)}q.query=E.query}q.userinfo=O.userinfo,q.host=O.host,q.port=O.port}q.scheme=O.scheme}return q.fragment=E.fragment,q}function F(O,E,M){if(typeof O==="string")O=unescape(O),O=N(Q(L(O,M),!0),{...M,skipEscape:!0});else if(typeof O==="object")O=N(Q(O,!0),{...M,skipEscape:!0});if(typeof E==="string")E=unescape(E),E=N(Q(L(E,M),!0),{...M,skipEscape:!0});else if(typeof E==="object")E=N(Q(E,!0),{...M,skipEscape:!0});return O.toLowerCase()===E.toLowerCase()}function N(O,E){let M={host:O.host,scheme:O.scheme,userinfo:O.userinfo,port:O.port,path:O.path,query:O.query,nid:O.nid,nss:O.nss,uuid:O.uuid,fragment:O.fragment,reference:O.reference,resourceName:O.resourceName,secure:O.secure,error:""},R=Object.assign({},E),q=[],w=H(R.scheme||M.scheme);if(w&&w.serialize)w.serialize(M,R);if(M.path!==void 0)if(!R.skipEscape){if(M.path=escape(M.path),M.scheme!==void 0)M.path=M.path.split("%3A").join(":")}else M.path=unescape(M.path);if(R.reference!=="suffix"&&M.scheme)q.push(M.scheme,":");let I=J(M);if(I!==void 0){if(R.reference!=="suffix")q.push("//");if(q.push(I),M.path&&M.path[0]!=="/")q.push("/")}if(M.path!==void 0){let P=M.path;if(!R.absolutePath&&(!w||!w.absolutePath))P=G(P);if(I===void 0&&P[0]==="/"&&P[1]==="/")P="/%2F"+P.slice(2);q.push(P)}if(M.query!==void 0)q.push("?",M.query);if(M.fragment!==void 0)q.push("#",M.fragment);return q.join("")}var D=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function L(O,E){let M=Object.assign({},E),R={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},q=!1;if(M.reference==="suffix")if(M.scheme)O=M.scheme+":"+O;else O="//"+O;let w=O.match(D);if(w){if(R.scheme=w[1],R.userinfo=w[3],R.host=w[4],R.port=parseInt(w[5],10),R.path=w[6]||"",R.query=w[7],R.fragment=w[8],isNaN(R.port))R.port=w[5];if(R.host)if(W(R.host)===!1){let _=X(R.host);R.host=_.host.toLowerCase(),q=_.isIPV6}else q=!0;if(R.scheme===void 0&&R.userinfo===void 0&&R.host===void 0&&R.port===void 0&&R.query===void 0&&!R.path)R.reference="same-document";else if(R.scheme===void 0)R.reference="relative";else if(R.fragment===void 0)R.reference="absolute";else R.reference="uri";if(M.reference&&M.reference!=="suffix"&&M.reference!==R.reference)R.error=R.error||"URI is not a "+M.reference+" reference.";let I=H(M.scheme||R.scheme);if(!M.unicodeSupport&&(!I||!I.unicodeSupport)){if(R.host&&(M.domainHost||I&&I.domainHost)&&q===!1&&Z(R.host))try{R.host=URL.domainToASCII(R.host.toLowerCase())}catch(P){R.error=R.error||"Host's domain name can not be converted to ASCII: "+P}}if(!I||I&&!I.skipNormalize){if(O.indexOf("%")!==-1){if(R.scheme!==void 0)R.scheme=unescape(R.scheme);if(R.host!==void 0)R.host=unescape(R.host)}if(R.path)R.path=escape(unescape(R.path));if(R.fragment)R.fragment=encodeURI(decodeURIComponent(R.fragment))}if(I&&I.parse)I.parse(R,M)}else R.error=R.error||"URI can not be parsed.";return R}var B={SCHEMES:K,normalize:z,resolve:V,resolveComponent:A,equal:F,serialize:N,parse:L};Y.exports=B,Y.exports.default=B,Y.exports.fastUri=B}}),Tz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=jz8();Y.code='require("ajv/dist/runtime/uri").default',$.default=Y}}),$p1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=void 0;var Y=Jf();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return Y.KeywordCxt}});var X=v6();Object.defineProperty($,"_",{enumerable:!0,get:function(){return X._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return X.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return X.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return X.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return X.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return X.CodeGen}});var G=K40(),J=Qf(),Q=su1(),W=U40(),Z=v6(),K=Z40(),H=Q40(),z=V8(),V=wz8(),A=Tz8(),F=(b,g)=>new RegExp(b,g);F.code="new RegExp";var N=["removeAdditional","useDefaults","coerceTypes"],D=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),L={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},B={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},O=200;function E(b){var g,p,h,n,t,s,Z0,X0,a,Q0,e,m,$0,Y0,K0,A0,D0,O0,R0,I0,g0,p0,U4,P1,d1;let C0=b.strict,n0=(g=b.code)===null||g===void 0?void 0:g.optimize,J0=n0===!0||n0===void 0?1:n0||0,B0=(h=(p=b.code)===null||p===void 0?void 0:p.regExp)!==null&&h!==void 0?h:F,Y1=(n=b.uriResolver)!==null&&n!==void 0?n:A.default;return{strictSchema:(s=(t=b.strictSchema)!==null&&t!==void 0?t:C0)!==null&&s!==void 0?s:!0,strictNumbers:(X0=(Z0=b.strictNumbers)!==null&&Z0!==void 0?Z0:C0)!==null&&X0!==void 0?X0:!0,strictTypes:(Q0=(a=b.strictTypes)!==null&&a!==void 0?a:C0)!==null&&Q0!==void 0?Q0:"log",strictTuples:(m=(e=b.strictTuples)!==null&&e!==void 0?e:C0)!==null&&m!==void 0?m:"log",strictRequired:(Y0=($0=b.strictRequired)!==null&&$0!==void 0?$0:C0)!==null&&Y0!==void 0?Y0:!1,code:b.code?{...b.code,optimize:J0,regExp:B0}:{optimize:J0,regExp:B0},loopRequired:(K0=b.loopRequired)!==null&&K0!==void 0?K0:O,loopEnum:(A0=b.loopEnum)!==null&&A0!==void 0?A0:O,meta:(D0=b.meta)!==null&&D0!==void 0?D0:!0,messages:(O0=b.messages)!==null&&O0!==void 0?O0:!0,inlineRefs:(R0=b.inlineRefs)!==null&&R0!==void 0?R0:!0,schemaId:(I0=b.schemaId)!==null&&I0!==void 0?I0:"$id",addUsedSchema:(g0=b.addUsedSchema)!==null&&g0!==void 0?g0:!0,validateSchema:(p0=b.validateSchema)!==null&&p0!==void 0?p0:!0,validateFormats:(U4=b.validateFormats)!==null&&U4!==void 0?U4:!0,unicodeRegExp:(P1=b.unicodeRegExp)!==null&&P1!==void 0?P1:!0,int32range:(d1=b.int32range)!==null&&d1!==void 0?d1:!0,uriResolver:Y1}}var M=class{constructor(b={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,b=this.opts={...b,...E(b)};let{es5:g,lines:p}=this.opts.code;this.scope=new Z.ValueScope({scope:{},prefixes:D,es5:g,lines:p}),this.logger=k(b.logger);let h=b.validateFormats;if(b.validateFormats=!1,this.RULES=(0,Q.getRules)(),R.call(this,L,b,"NOT SUPPORTED"),R.call(this,B,b,"DEPRECATED","warn"),this._metaOpts=_.call(this),b.formats)I.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),b.keywords)P.call(this,b.keywords);if(typeof b.meta=="object")this.addMetaSchema(b.meta);w.call(this),b.validateFormats=h}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:b,meta:g,schemaId:p}=this.opts,h=V;if(p==="id")h={...V},h.id=h.$id,delete h.$id;if(g&&b)this.addMetaSchema(h,h[p],!1)}defaultMeta(){let{meta:b,schemaId:g}=this.opts;return this.opts.defaultMeta=typeof b=="object"?b[g]||b:void 0}validate(b,g){let p;if(typeof b=="string"){if(p=this.getSchema(b),!p)throw Error(`no schema with key or ref "${b}"`)}else p=this.compile(b);let h=p(g);if(!("$async"in p))this.errors=p.errors;return h}compile(b,g){let p=this._addSchema(b,g);return p.validate||this._compileSchemaEnv(p)}compileAsync(b,g){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:p}=this.opts;return h.call(this,b,g);async function h(a,Q0){await n.call(this,a.$schema);let e=this._addSchema(a,Q0);return e.validate||t.call(this,e)}async function n(a){if(a&&!this.getSchema(a))await h.call(this,{$ref:a},!0)}async function t(a){try{return this._compileSchemaEnv(a)}catch(Q0){if(!(Q0 instanceof J.default))throw Q0;return s.call(this,Q0),await Z0.call(this,Q0.missingSchema),t.call(this,a)}}function s({missingSchema:a,missingRef:Q0}){if(this.refs[a])throw Error(`AnySchema ${a} is loaded but ${Q0} cannot be resolved`)}async function Z0(a){let Q0=await X0.call(this,a);if(!this.refs[a])await n.call(this,Q0.$schema);if(!this.refs[a])this.addSchema(Q0,a,g)}async function X0(a){let Q0=this._loading[a];if(Q0)return Q0;try{return await(this._loading[a]=p(a))}finally{delete this._loading[a]}}}addSchema(b,g,p,h=this.opts.validateSchema){if(Array.isArray(b)){for(let t of b)this.addSchema(t,void 0,p,h);return this}let n;if(typeof b==="object"){let{schemaId:t}=this.opts;if(n=b[t],n!==void 0&&typeof n!="string")throw Error(`schema ${t} must be string`)}return g=(0,K.normalizeId)(g||n),this._checkUnique(g),this.schemas[g]=this._addSchema(b,p,g,h,!0),this}addMetaSchema(b,g,p=this.opts.validateSchema){return this.addSchema(b,g,!0,p),this}validateSchema(b,g){if(typeof b=="boolean")return!0;let p;if(p=b.$schema,p!==void 0&&typeof p!="string")throw Error("$schema must be a string");if(p=p||this.opts.defaultMeta||this.defaultMeta(),!p)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let h=this.validate(p,b);if(!h&&g){let n="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(n);else throw Error(n)}return h}getSchema(b){let g;while(typeof(g=q.call(this,b))=="string")b=g;if(g===void 0){let{schemaId:p}=this.opts,h=new W.SchemaEnv({schema:{},schemaId:p});if(g=W.resolveSchema.call(this,h,b),!g)return;this.refs[b]=g}return g.validate||this._compileSchemaEnv(g)}removeSchema(b){if(b instanceof RegExp)return this._removeAllSchemas(this.schemas,b),this._removeAllSchemas(this.refs,b),this;switch(typeof b){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let g=q.call(this,b);if(typeof g=="object")this._cache.delete(g.schema);return delete this.schemas[b],delete this.refs[b],this}case"object":{let g=b;this._cache.delete(g);let p=b[this.opts.schemaId];if(p)p=(0,K.normalizeId)(p),delete this.schemas[p],delete this.refs[p];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(b){for(let g of b)this.addKeyword(g);return this}addKeyword(b,g){let p;if(typeof b=="string"){if(p=b,typeof g=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),g.keyword=p}else if(typeof b=="object"&&g===void 0){if(g=b,p=g.keyword,Array.isArray(p)&&!p.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(T.call(this,p,g),!g)return(0,z.eachItem)(p,(n)=>v.call(this,n)),this;y.call(this,g);let h={...g,type:(0,H.getJSONTypes)(g.type),schemaType:(0,H.getJSONTypes)(g.schemaType)};return(0,z.eachItem)(p,h.type.length===0?(n)=>v.call(this,n,h):(n)=>h.type.forEach((t)=>v.call(this,n,h,t))),this}getKeyword(b){let g=this.RULES.all[b];return typeof g=="object"?g.definition:!!g}removeKeyword(b){let{RULES:g}=this;delete g.keywords[b],delete g.all[b];for(let p of g.rules){let h=p.rules.findIndex((n)=>n.keyword===b);if(h>=0)p.rules.splice(h,1)}return this}addFormat(b,g){if(typeof g=="string")g=new RegExp(g);return this.formats[b]=g,this}errorsText(b=this.errors,{separator:g=", ",dataVar:p="data"}={}){if(!b||b.length===0)return"No errors";return b.map((h)=>`${p}${h.instancePath} ${h.message}`).reduce((h,n)=>h+g+n)}$dataMetaSchema(b,g){let p=this.RULES.all;b=JSON.parse(JSON.stringify(b));for(let h of g){let n=h.split("/").slice(1),t=b;for(let s of n)t=t[s];for(let s in p){let Z0=p[s];if(typeof Z0!="object")continue;let{$data:X0}=Z0.definition,a=t[s];if(X0&&a)t[s]=u(a)}}return b}_removeAllSchemas(b,g){for(let p in b){let h=b[p];if(!g||g.test(p)){if(typeof h=="string")delete b[p];else if(h&&!h.meta)this._cache.delete(h.schema),delete b[p]}}}_addSchema(b,g,p,h=this.opts.validateSchema,n=this.opts.addUsedSchema){let t,{schemaId:s}=this.opts;if(typeof b=="object")t=b[s];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof b!="boolean")throw Error("schema must be object or boolean");let Z0=this._cache.get(b);if(Z0!==void 0)return Z0;p=(0,K.normalizeId)(t||p);let X0=K.getSchemaRefs.call(this,b,p);if(Z0=new W.SchemaEnv({schema:b,schemaId:s,meta:g,baseId:p,localRefs:X0}),this._cache.set(Z0.schema,Z0),n&&!p.startsWith("#")){if(p)this._checkUnique(p);this.refs[p]=Z0}if(h)this.validateSchema(b,!0);return Z0}_checkUnique(b){if(this.schemas[b]||this.refs[b])throw Error(`schema with key or id "${b}" already exists`)}_compileSchemaEnv(b){if(b.meta)this._compileMetaSchema(b);else W.compileSchema.call(this,b);if(!b.validate)throw Error("ajv implementation error");return b.validate}_compileMetaSchema(b){let g=this.opts;this.opts=this._metaOpts;try{W.compileSchema.call(this,b)}finally{this.opts=g}}};M.ValidationError=G.default,M.MissingRefError=J.default,$.default=M;function R(b,g,p,h="error"){for(let n in b){let t=n;if(t in g)this.logger[h](`${p}: option ${n}. ${b[t]}`)}}function q(b){return b=(0,K.normalizeId)(b),this.schemas[b]||this.refs[b]}function w(){let b=this.opts.schemas;if(!b)return;if(Array.isArray(b))this.addSchema(b);else for(let g in b)this.addSchema(b[g],g)}function I(){for(let b in this.opts.formats){let g=this.opts.formats[b];if(g)this.addFormat(b,g)}}function P(b){if(Array.isArray(b)){this.addVocabulary(b);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let g in b){let p=b[g];if(!p.keyword)p.keyword=g;this.addKeyword(p)}}function _(){let b={...this.opts};for(let g of N)delete b[g];return b}var C={log(){},warn(){},error(){}};function k(b){if(b===!1)return C;if(b===void 0)return console;if(b.log&&b.warn&&b.error)return b;throw Error("logger must implement log, warn and error methods")}var S=/^[a-z_$][a-z0-9_$:-]*$/i;function T(b,g){let{RULES:p}=this;if((0,z.eachItem)(b,(h)=>{if(p.keywords[h])throw Error(`Keyword ${h} is already defined`);if(!S.test(h))throw Error(`Keyword ${h} has invalid name`)}),!g)return;if(g.$data&&!(("code"in g)||("validate"in g)))throw Error('$data keyword must have "code" or "validate" function')}function v(b,g,p){var h;let n=g===null||g===void 0?void 0:g.post;if(p&&n)throw Error('keyword with "post" flag cannot have "type"');let{RULES:t}=this,s=n?t.post:t.rules.find(({type:X0})=>X0===p);if(!s)s={type:p,rules:[]},t.rules.push(s);if(t.keywords[b]=!0,!g)return;let Z0={keyword:b,definition:{...g,type:(0,H.getJSONTypes)(g.type),schemaType:(0,H.getJSONTypes)(g.schemaType)}};if(g.before)x.call(this,s,Z0,g.before);else s.rules.push(Z0);t.all[b]=Z0,(h=g.implements)===null||h===void 0||h.forEach((X0)=>this.addKeyword(X0))}function x(b,g,p){let h=b.rules.findIndex((n)=>n.keyword===p);if(h>=0)b.rules.splice(h,0,g);else b.rules.push(g),this.logger.warn(`rule ${p} is not defined`)}function y(b){let{metaSchema:g}=b;if(g===void 0)return;if(b.$data&&this.opts.$data)g=u(g);b.validateSchema=this.compile(g,!0)}var d={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function u(b){return{anyOf:[b,d]}}}}),Cz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};$.default=Y}}),jT0=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.callRef=$.getValidate=void 0;var Y=Qf(),X=EK(),G=v6(),J=OK(),Q=U40(),W=V8(),Z={keyword:"$ref",schemaType:"string",code(z){let{gen:V,schema:A,it:F}=z,{baseId:N,schemaEnv:D,validateName:L,opts:B,self:O}=F,{root:E}=D;if((A==="#"||A==="#/")&&N===E.baseId)return R();let M=Q.resolveRef.call(O,E,N,A);if(M===void 0)throw new Y.default(F.opts.uriResolver,N,A);if(M instanceof Q.SchemaEnv)return q(M);return w(M);function R(){if(D===E)return H(z,L,D,D.$async);let I=V.scopeValue("root",{ref:E});return H(z,G._`${I}.validate`,E,E.$async)}function q(I){let P=K(z,I);H(z,P,I,I.$async)}function w(I){let P=V.scopeValue("schema",B.code.source===!0?{ref:I,code:(0,G.stringify)(I)}:{ref:I}),_=V.name("valid"),C=z.subschema({schema:I,dataTypes:[],schemaPath:G.nil,topSchemaRef:P,errSchemaPath:A},_);z.mergeEvaluated(C),z.ok(_)}}};function K(z,V){let{gen:A}=z;return V.validate?A.scopeValue("validate",{ref:V.validate}):G._`${A.scopeValue("wrapper",{ref:V})}.validate`}$.getValidate=K;function H(z,V,A,F){let{gen:N,it:D}=z,{allErrors:L,schemaEnv:B,opts:O}=D,E=O.passContext?J.default.this:G.nil;if(F)M();else R();function M(){if(!B.$async)throw Error("async schema referenced by sync schema");let I=N.let("valid");N.try(()=>{if(N.code(G._`await ${(0,X.callValidateCode)(z,V,E)}`),w(V),!L)N.assign(I,!0)},(P)=>{if(N.if(G._`!(${P} instanceof ${D.ValidationError})`,()=>N.throw(P)),q(P),!L)N.assign(I,!1)}),z.ok(I)}function R(){z.result((0,X.callValidateCode)(z,V,E),()=>w(V),()=>q(V))}function q(I){let P=G._`${I}.errors`;N.assign(J.default.vErrors,G._`${J.default.vErrors} === null ? ${P} : ${J.default.vErrors}.concat(${P})`),N.assign(J.default.errors,G._`${J.default.vErrors}.length`)}function w(I){var P;if(!D.opts.unevaluated)return;let _=(P=A===null||A===void 0?void 0:A.validate)===null||P===void 0?void 0:P.evaluated;if(D.props!==!0)if(_&&!_.dynamicProps){if(_.props!==void 0)D.props=W.mergeEvaluated.props(N,_.props,D.props)}else{let C=N.var("props",G._`${I}.evaluated.props`);D.props=W.mergeEvaluated.props(N,C,D.props,G.Name)}if(D.items!==!0)if(_&&!_.dynamicItems){if(_.items!==void 0)D.items=W.mergeEvaluated.items(N,_.items,D.items)}else{let C=N.var("items",G._`${I}.evaluated.items`);D.items=W.mergeEvaluated.items(N,C,D.items,G.Name)}}}$.callRef=H,$.default=Z}}),Yp1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Cz8(),X=jT0(),G=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Y.default,X.default];$.default=G}}),Sz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=Y.operators,G={maximum:{okStr:"<=",ok:X.LTE,fail:X.GT},minimum:{okStr:">=",ok:X.GTE,fail:X.LT},exclusiveMaximum:{okStr:"<",ok:X.LT,fail:X.GTE},exclusiveMinimum:{okStr:">",ok:X.GT,fail:X.LTE}},J={message:({keyword:W,schemaCode:Z})=>Y.str`must be ${G[W].okStr} ${Z}`,params:({keyword:W,schemaCode:Z})=>Y._`{comparison: ${G[W].okStr}, limit: ${Z}}`},Q={keyword:Object.keys(G),type:"number",schemaType:"number",$data:!0,error:J,code(W){let{keyword:Z,data:K,schemaCode:H}=W;W.fail$data(Y._`${K} ${G[Z].fail} ${H} || isNaN(${K})`)}};$.default=Q}}),kz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X={message:({schemaCode:J})=>Y.str`must be multiple of ${J}`,params:({schemaCode:J})=>Y._`{multipleOf: ${J}}`},G={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:X,code(J){let{gen:Q,data:W,schemaCode:Z,it:K}=J,H=K.opts.multipleOfPrecision,z=Q.let("res"),V=H?Y._`Math.abs(Math.round(${z}) - ${z}) > 1e-${H}`:Y._`${z} !== parseInt(${z})`;J.fail$data(Y._`(${Z} === 0 || (${z} = ${W}/${Z}, ${V}))`)}};$.default=G}}),vz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js"($){Object.defineProperty($,"__esModule",{value:!0});function Y(X){let G=X.length,J=0,Q=0,W;while(Q<G)if(J++,W=X.charCodeAt(Q++),W>=55296&&W<=56319&&Q<G){if(W=X.charCodeAt(Q),(W&64512)===56320)Q++}return J}$.default=Y,Y.code='require("ajv/dist/runtime/ucs2length").default'}}),xz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G=vz8(),J={message({keyword:W,schemaCode:Z}){let K=W==="maxLength"?"more":"fewer";return Y.str`must NOT have ${K} than ${Z} characters`},params:({schemaCode:W})=>Y._`{limit: ${W}}`},Q={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:J,code(W){let{keyword:Z,data:K,schemaCode:H,it:z}=W,V=Z==="maxLength"?Y.operators.GT:Y.operators.LT,A=z.opts.unicode===!1?Y._`${K}.length`:Y._`${(0,X.useFunc)(W.gen,G.default)}(${K})`;W.fail$data(Y._`${A} ${V} ${H}`)}};$.default=Q}}),yz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=EK(),X=V8(),G=v6(),J={message:({schemaCode:W})=>G.str`must match pattern "${W}"`,params:({schemaCode:W})=>G._`{pattern: ${W}}`},Q={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:J,code(W){let{gen:Z,data:K,$data:H,schema:z,schemaCode:V,it:A}=W,F=A.opts.unicodeRegExp?"u":"";if(H){let{regExp:N}=A.opts.code,D=N.code==="new RegExp"?G._`new RegExp`:(0,X.useFunc)(Z,N),L=Z.let("valid");Z.try(()=>Z.assign(L,G._`${D}(${V}, ${F}).test(${K})`),()=>Z.assign(L,!1)),W.fail$data(G._`!${L}`)}else{let N=(0,Y.usePattern)(W,z);W.fail$data(G._`!${N}.test(${K})`)}}};$.default=Q}}),bz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X={message({keyword:J,schemaCode:Q}){let W=J==="maxProperties"?"more":"fewer";return Y.str`must NOT have ${W} than ${Q} properties`},params:({schemaCode:J})=>Y._`{limit: ${J}}`},G={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:X,code(J){let{keyword:Q,data:W,schemaCode:Z}=J,K=Q==="maxProperties"?Y.operators.GT:Y.operators.LT;J.fail$data(Y._`Object.keys(${W}).length ${K} ${Z}`)}};$.default=G}}),hz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=EK(),X=v6(),G=V8(),J={message:({params:{missingProperty:W}})=>X.str`must have required property '${W}'`,params:({params:{missingProperty:W}})=>X._`{missingProperty: ${W}}`},Q={keyword:"required",type:"object",schemaType:"array",$data:!0,error:J,code(W){let{gen:Z,schema:K,schemaCode:H,data:z,$data:V,it:A}=W,{opts:F}=A;if(!V&&K.length===0)return;let N=K.length>=F.loopRequired;if(A.allErrors)D();else L();if(F.strictRequired){let E=W.parentSchema.properties,{definedProperties:M}=W.it;for(let R of K)if((E===null||E===void 0?void 0:E[R])===void 0&&!M.has(R)){let q=A.schemaEnv.baseId+A.errSchemaPath,w=`required property "${R}" is not defined at "${q}" (strictRequired)`;(0,G.checkStrictMode)(A,w,A.opts.strictRequired)}}function D(){if(N||V)W.block$data(X.nil,B);else for(let E of K)(0,Y.checkReportMissingProp)(W,E)}function L(){let E=Z.let("missing");if(N||V){let M=Z.let("valid",!0);W.block$data(M,()=>O(E,M)),W.ok(M)}else Z.if((0,Y.checkMissingProp)(W,K,E)),(0,Y.reportMissingProp)(W,E),Z.else()}function B(){Z.forOf("prop",H,(E)=>{W.setParams({missingProperty:E}),Z.if((0,Y.noPropertyInData)(Z,z,E,F.ownProperties),()=>W.error())})}function O(E,M){W.setParams({missingProperty:E}),Z.forOf(E,H,()=>{Z.assign(M,(0,Y.propertyInData)(Z,z,E,F.ownProperties)),Z.if((0,X.not)(M),()=>{W.error(),Z.break()})},X.nil)}}};$.default=Q}}),fz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X={message({keyword:J,schemaCode:Q}){let W=J==="maxItems"?"more":"fewer";return Y.str`must NOT have ${W} than ${Q} items`},params:({schemaCode:J})=>Y._`{limit: ${J}}`},G={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:X,code(J){let{keyword:Q,data:W,schemaCode:Z}=J,K=Q==="maxItems"?Y.operators.GT:Y.operators.LT;J.fail$data(Y._`${W}.length ${K} ${Z}`)}};$.default=G}}),TT0=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=tu1();Y.code='require("ajv/dist/runtime/equal").default',$.default=Y}}),gz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Q40(),X=v6(),G=V8(),J=TT0(),Q={message:({params:{i:Z,j:K}})=>X.str`must NOT have duplicate items (items ## ${K} and ${Z} are identical)`,params:({params:{i:Z,j:K}})=>X._`{i: ${Z}, j: ${K}}`},W={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Q,code(Z){let{gen:K,data:H,$data:z,schema:V,parentSchema:A,schemaCode:F,it:N}=Z;if(!z&&!V)return;let D=K.let("valid"),L=A.items?(0,Y.getSchemaTypes)(A.items):[];Z.block$data(D,B,X._`${F} === false`),Z.ok(D);function B(){let R=K.let("i",X._`${H}.length`),q=K.let("j");Z.setParams({i:R,j:q}),K.assign(D,!0),K.if(X._`${R} > 1`,()=>(O()?E:M)(R,q))}function O(){return L.length>0&&!L.some((R)=>R==="object"||R==="array")}function E(R,q){let w=K.name("item"),I=(0,Y.checkDataTypes)(L,w,N.opts.strictNumbers,Y.DataType.Wrong),P=K.const("indices",X._`{}`);K.for(X._`;${R}--;`,()=>{if(K.let(w,X._`${H}[${R}]`),K.if(I,X._`continue`),L.length>1)K.if(X._`typeof ${w} == "string"`,X._`${w} += "_"`);K.if(X._`typeof ${P}[${w}] == "number"`,()=>{K.assign(q,X._`${P}[${w}]`),Z.error(),K.assign(D,!1).break()}).code(X._`${P}[${w}] = ${R}`)})}function M(R,q){let w=(0,G.useFunc)(K,J.default),I=K.name("outer");K.label(I).for(X._`;${R}--;`,()=>K.for(X._`${q} = ${R}; ${q}--;`,()=>K.if(X._`${w}(${H}[${R}], ${H}[${q}])`,()=>{Z.error(),K.assign(D,!1).break(I)})))}}};$.default=W}}),mz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G=TT0(),J={message:"must be equal to constant",params:({schemaCode:W})=>Y._`{allowedValue: ${W}}`},Q={keyword:"const",$data:!0,error:J,code(W){let{gen:Z,data:K,$data:H,schemaCode:z,schema:V}=W;if(H||V&&typeof V=="object")W.fail$data(Y._`!${(0,X.useFunc)(Z,G.default)}(${K}, ${z})`);else W.fail(Y._`${V} !== ${K}`)}};$.default=Q}}),uz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G=TT0(),J={message:"must be equal to one of the allowed values",params:({schemaCode:W})=>Y._`{allowedValues: ${W}}`},Q={keyword:"enum",schemaType:"array",$data:!0,error:J,code(W){let{gen:Z,data:K,$data:H,schema:z,schemaCode:V,it:A}=W;if(!H&&z.length===0)throw Error("enum must have non-empty array");let F=z.length>=A.opts.loopEnum,N,D=()=>N!==null&&N!==void 0?N:N=(0,X.useFunc)(Z,G.default),L;if(F||H)L=Z.let("valid"),W.block$data(L,B);else{if(!Array.isArray(z))throw Error("ajv implementation error");let E=Z.const("vSchema",V);L=(0,Y.or)(...z.map((M,R)=>O(E,R)))}W.pass(L);function B(){Z.assign(L,!1),Z.forOf("v",V,(E)=>Z.if(Y._`${D()}(${K}, ${E})`,()=>Z.assign(L,!0).break()))}function O(E,M){let R=z[M];return typeof R==="object"&&R!==null?Y._`${D()}(${K}, ${E}[${M}])`:Y._`${K} === ${R}`}}};$.default=Q}}),Xp1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Sz8(),X=kz8(),G=xz8(),J=yz8(),Q=bz8(),W=hz8(),Z=fz8(),K=gz8(),H=mz8(),z=uz8(),V=[Y.default,X.default,G.default,J.default,Q.default,W.default,Z.default,K.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},H.default,z.default];$.default=V}}),Gp1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.validateAdditionalItems=void 0;var Y=v6(),X=V8(),G={message:({params:{len:W}})=>Y.str`must NOT have more than ${W} items`,params:({params:{len:W}})=>Y._`{limit: ${W}}`},J={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:G,code(W){let{parentSchema:Z,it:K}=W,{items:H}=Z;if(!Array.isArray(H)){(0,X.checkStrictMode)(K,'"additionalItems" is ignored when "items" is not an array of schemas');return}Q(W,H)}};function Q(W,Z){let{gen:K,schema:H,data:z,keyword:V,it:A}=W;A.items=!0;let F=K.const("len",Y._`${z}.length`);if(H===!1)W.setParams({len:Z.length}),W.pass(Y._`${F} <= ${Z.length}`);else if(typeof H=="object"&&!(0,X.alwaysValidSchema)(A,H)){let D=K.var("valid",Y._`${F} <= ${Z.length}`);K.if((0,Y.not)(D),()=>N(D)),W.ok(D)}function N(D){K.forRange("i",Z.length,F,(L)=>{if(W.subschema({keyword:V,dataProp:L,dataPropType:X.Type.Num},D),!A.allErrors)K.if((0,Y.not)(D),()=>K.break())})}}$.validateAdditionalItems=Q,$.default=J}}),Jp1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.validateTuple=void 0;var Y=v6(),X=V8(),G=EK(),J={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(W){let{schema:Z,it:K}=W;if(Array.isArray(Z))return Q(W,"additionalItems",Z);if(K.items=!0,(0,X.alwaysValidSchema)(K,Z))return;W.ok((0,G.validateArray)(W))}};function Q(W,Z,K=W.schema){let{gen:H,parentSchema:z,data:V,keyword:A,it:F}=W;if(L(z),F.opts.unevaluated&&K.length&&F.items!==!0)F.items=X.mergeEvaluated.items(H,K.length,F.items);let N=H.name("valid"),D=H.const("len",Y._`${V}.length`);K.forEach((B,O)=>{if((0,X.alwaysValidSchema)(F,B))return;H.if(Y._`${D} > ${O}`,()=>W.subschema({keyword:A,schemaProp:O,dataProp:O},N)),W.ok(N)});function L(B){let{opts:O,errSchemaPath:E}=F,M=K.length,R=M===B.minItems&&(M===B.maxItems||B[Z]===!1);if(O.strictTuples&&!R){let q=`"${A}" is ${M}-tuple, but minItems or maxItems/${Z} are not specified or different at path "${E}"`;(0,X.checkStrictMode)(F,q,O.strictTuples)}}}$.validateTuple=Q,$.default=J}}),pz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Jp1(),X={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(G)=>(0,Y.validateTuple)(G,"items")};$.default=X}}),dz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G=EK(),J=Gp1(),Q={message:({params:{len:Z}})=>Y.str`must NOT have more than ${Z} items`,params:({params:{len:Z}})=>Y._`{limit: ${Z}}`},W={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Q,code(Z){let{schema:K,parentSchema:H,it:z}=Z,{prefixItems:V}=H;if(z.items=!0,(0,X.alwaysValidSchema)(z,K))return;if(V)(0,J.validateAdditionalItems)(Z,V);else Z.ok((0,G.validateArray)(Z))}};$.default=W}}),cz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G={message:({params:{min:Q,max:W}})=>W===void 0?Y.str`must contain at least ${Q} valid item(s)`:Y.str`must contain at least ${Q} and no more than ${W} valid item(s)`,params:({params:{min:Q,max:W}})=>W===void 0?Y._`{minContains: ${Q}}`:Y._`{minContains: ${Q}, maxContains: ${W}}`},J={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:G,code(Q){let{gen:W,schema:Z,parentSchema:K,data:H,it:z}=Q,V,A,{minContains:F,maxContains:N}=K;if(z.opts.next)V=F===void 0?1:F,A=N;else V=1;let D=W.const("len",Y._`${H}.length`);if(Q.setParams({min:V,max:A}),A===void 0&&V===0){(0,X.checkStrictMode)(z,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(A!==void 0&&V>A){(0,X.checkStrictMode)(z,'"minContains" > "maxContains" is always invalid'),Q.fail();return}if((0,X.alwaysValidSchema)(z,Z)){let M=Y._`${D} >= ${V}`;if(A!==void 0)M=Y._`${M} && ${D} <= ${A}`;Q.pass(M);return}z.items=!0;let L=W.name("valid");if(A===void 0&&V===1)O(L,()=>W.if(L,()=>W.break()));else if(V===0){if(W.let(L,!0),A!==void 0)W.if(Y._`${H}.length > 0`,B)}else W.let(L,!1),B();Q.result(L,()=>Q.reset());function B(){let M=W.name("_valid"),R=W.let("count",0);O(M,()=>W.if(M,()=>E(R)))}function O(M,R){W.forRange("i",0,D,(q)=>{Q.subschema({keyword:"contains",dataProp:q,dataPropType:X.Type.Num,compositeRule:!0},M),R()})}function E(M){if(W.code(Y._`${M}++`),A===void 0)W.if(Y._`${M} >= ${V}`,()=>W.assign(L,!0).break());else if(W.if(Y._`${M} > ${A}`,()=>W.assign(L,!1).break()),V===1)W.assign(L,!0);else W.if(Y._`${M} >= ${V}`,()=>W.assign(L,!0))}}};$.default=J}}),CT0=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.validateSchemaDeps=$.validatePropertyDeps=$.error=void 0;var Y=v6(),X=V8(),G=EK();$.error={message:({params:{property:K,depsCount:H,deps:z}})=>{let V=H===1?"property":"properties";return Y.str`must have ${V} ${z} when property ${K} is present`},params:({params:{property:K,depsCount:H,deps:z,missingProperty:V}})=>Y._`{property: ${K},
    missingProperty: ${V},
    depsCount: ${H},
    deps: ${z}}`};var J={keyword:"dependencies",type:"object",schemaType:"object",error:$.error,code(K){let[H,z]=Q(K);W(K,H),Z(K,z)}};function Q({schema:K}){let H={},z={};for(let V in K){if(V==="__proto__")continue;let A=Array.isArray(K[V])?H:z;A[V]=K[V]}return[H,z]}function W(K,H=K.schema){let{gen:z,data:V,it:A}=K;if(Object.keys(H).length===0)return;let F=z.let("missing");for(let N in H){let D=H[N];if(D.length===0)continue;let L=(0,G.propertyInData)(z,V,N,A.opts.ownProperties);if(K.setParams({property:N,depsCount:D.length,deps:D.join(", ")}),A.allErrors)z.if(L,()=>{for(let B of D)(0,G.checkReportMissingProp)(K,B)});else z.if(Y._`${L} && (${(0,G.checkMissingProp)(K,D,F)})`),(0,G.reportMissingProp)(K,F),z.else()}}$.validatePropertyDeps=W;function Z(K,H=K.schema){let{gen:z,data:V,keyword:A,it:F}=K,N=z.name("valid");for(let D in H){if((0,X.alwaysValidSchema)(F,H[D]))continue;z.if((0,G.propertyInData)(z,V,D,F.opts.ownProperties),()=>{let L=K.subschema({keyword:A,schemaProp:D},N);K.mergeValidEvaluated(L,N)},()=>z.var(N,!0)),K.ok(N)}}$.validateSchemaDeps=Z,$.default=J}}),lz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G={message:"property name must be valid",params:({params:Q})=>Y._`{propertyName: ${Q.propertyName}}`},J={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:G,code(Q){let{gen:W,schema:Z,data:K,it:H}=Q;if((0,X.alwaysValidSchema)(H,Z))return;let z=W.name("valid");W.forIn("key",K,(V)=>{Q.setParams({propertyName:V}),Q.subschema({keyword:"propertyNames",data:V,dataTypes:["string"],propertyName:V,compositeRule:!0},z),W.if((0,Y.not)(z),()=>{if(Q.error(!0),!H.allErrors)W.break()})}),Q.ok(z)}};$.default=J}}),Qp1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=EK(),X=v6(),G=OK(),J=V8(),Q={message:"must NOT have additional properties",params:({params:Z})=>X._`{additionalProperty: ${Z.additionalProperty}}`},W={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Q,code(Z){let{gen:K,schema:H,parentSchema:z,data:V,errsCount:A,it:F}=Z;if(!A)throw Error("ajv implementation error");let{allErrors:N,opts:D}=F;if(F.props=!0,D.removeAdditional!=="all"&&(0,J.alwaysValidSchema)(F,H))return;let L=(0,Y.allSchemaProperties)(z.properties),B=(0,Y.allSchemaProperties)(z.patternProperties);O(),Z.ok(X._`${A} === ${G.default.errors}`);function O(){K.forIn("key",V,(w)=>{if(!L.length&&!B.length)R(w);else K.if(E(w),()=>R(w))})}function E(w){let I;if(L.length>8){let P=(0,J.schemaRefOrVal)(F,z.properties,"properties");I=(0,Y.isOwnProperty)(K,P,w)}else if(L.length)I=(0,X.or)(...L.map((P)=>X._`${w} === ${P}`));else I=X.nil;if(B.length)I=(0,X.or)(I,...B.map((P)=>X._`${(0,Y.usePattern)(Z,P)}.test(${w})`));return(0,X.not)(I)}function M(w){K.code(X._`delete ${V}[${w}]`)}function R(w){if(D.removeAdditional==="all"||D.removeAdditional&&H===!1){M(w);return}if(H===!1){if(Z.setParams({additionalProperty:w}),Z.error(),!N)K.break();return}if(typeof H=="object"&&!(0,J.alwaysValidSchema)(F,H)){let I=K.name("valid");if(D.removeAdditional==="failing")q(w,I,!1),K.if((0,X.not)(I),()=>{Z.reset(),M(w)});else if(q(w,I),!N)K.if((0,X.not)(I),()=>K.break())}}function q(w,I,P){let _={keyword:"additionalProperties",dataProp:w,dataPropType:J.Type.Str};if(P===!1)Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1});Z.subschema(_,I)}}};$.default=W}}),iz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Jf(),X=EK(),G=V8(),J=Qp1(),Q={keyword:"properties",type:"object",schemaType:"object",code(W){let{gen:Z,schema:K,parentSchema:H,data:z,it:V}=W;if(V.opts.removeAdditional==="all"&&H.additionalProperties===void 0)J.default.code(new Y.KeywordCxt(V,J.default,"additionalProperties"));let A=(0,X.allSchemaProperties)(K);for(let B of A)V.definedProperties.add(B);if(V.opts.unevaluated&&A.length&&V.props!==!0)V.props=G.mergeEvaluated.props(Z,(0,G.toHash)(A),V.props);let F=A.filter((B)=>!(0,G.alwaysValidSchema)(V,K[B]));if(F.length===0)return;let N=Z.name("valid");for(let B of F){if(D(B))L(B);else{if(Z.if((0,X.propertyInData)(Z,z,B,V.opts.ownProperties)),L(B),!V.allErrors)Z.else().var(N,!0);Z.endIf()}W.it.definedProperties.add(B),W.ok(N)}function D(B){return V.opts.useDefaults&&!V.compositeRule&&K[B].default!==void 0}function L(B){W.subschema({keyword:"properties",schemaProp:B,dataProp:B},N)}}};$.default=Q}}),nz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=EK(),X=v6(),G=V8(),J=V8(),Q={keyword:"patternProperties",type:"object",schemaType:"object",code(W){let{gen:Z,schema:K,data:H,parentSchema:z,it:V}=W,{opts:A}=V,F=(0,Y.allSchemaProperties)(K),N=F.filter((R)=>(0,G.alwaysValidSchema)(V,K[R]));if(F.length===0||N.length===F.length&&(!V.opts.unevaluated||V.props===!0))return;let D=A.strictSchema&&!A.allowMatchingProperties&&z.properties,L=Z.name("valid");if(V.props!==!0&&!(V.props instanceof X.Name))V.props=(0,J.evaluatedPropsToName)(Z,V.props);let{props:B}=V;O();function O(){for(let R of F){if(D)E(R);if(V.allErrors)M(R);else Z.var(L,!0),M(R),Z.if(L)}}function E(R){for(let q in D)if(new RegExp(R).test(q))(0,G.checkStrictMode)(V,`property ${q} matches pattern ${R} (use allowMatchingProperties)`)}function M(R){Z.forIn("key",H,(q)=>{Z.if(X._`${(0,Y.usePattern)(W,R)}.test(${q})`,()=>{let w=N.includes(R);if(!w)W.subschema({keyword:"patternProperties",schemaProp:R,dataProp:q,dataPropType:J.Type.Str},L);if(V.opts.unevaluated&&B!==!0)Z.assign(X._`${B}[${q}]`,!0);else if(!w&&!V.allErrors)Z.if((0,X.not)(L),()=>Z.break())})})}}};$.default=Q}}),rz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=V8(),X={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(G){let{gen:J,schema:Q,it:W}=G;if((0,Y.alwaysValidSchema)(W,Q)){G.fail();return}let Z=J.name("valid");G.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},Z),G.failResult(Z,()=>G.reset(),()=>G.error())},error:{message:"must NOT be valid"}};$.default=X}}),az8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=EK(),X={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Y.validateUnion,error:{message:"must match a schema in anyOf"}};$.default=X}}),sz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G={message:"must match exactly one schema in oneOf",params:({params:Q})=>Y._`{passingSchemas: ${Q.passing}}`},J={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:G,code(Q){let{gen:W,schema:Z,parentSchema:K,it:H}=Q;if(!Array.isArray(Z))throw Error("ajv implementation error");if(H.opts.discriminator&&K.discriminator)return;let z=Z,V=W.let("valid",!1),A=W.let("passing",null),F=W.name("_valid");Q.setParams({passing:A}),W.block(N),Q.result(V,()=>Q.reset(),()=>Q.error(!0));function N(){z.forEach((D,L)=>{let B;if((0,X.alwaysValidSchema)(H,D))W.var(F,!0);else B=Q.subschema({keyword:"oneOf",schemaProp:L,compositeRule:!0},F);if(L>0)W.if(Y._`${F} && ${V}`).assign(V,!1).assign(A,Y._`[${A}, ${L}]`).else();W.if(F,()=>{if(W.assign(V,!0),W.assign(A,L),B)Q.mergeEvaluated(B,Y.Name)})})}}};$.default=J}}),oz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=V8(),X={keyword:"allOf",schemaType:"array",code(G){let{gen:J,schema:Q,it:W}=G;if(!Array.isArray(Q))throw Error("ajv implementation error");let Z=J.name("valid");Q.forEach((K,H)=>{if((0,Y.alwaysValidSchema)(W,K))return;let z=G.subschema({keyword:"allOf",schemaProp:H},Z);G.ok(Z),G.mergeEvaluated(z)})}};$.default=X}}),tz8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G={message:({params:W})=>Y.str`must match "${W.ifClause}" schema`,params:({params:W})=>Y._`{failingKeyword: ${W.ifClause}}`},J={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:G,code(W){let{gen:Z,parentSchema:K,it:H}=W;if(K.then===void 0&&K.else===void 0)(0,X.checkStrictMode)(H,'"if" without "then" and "else" is ignored');let z=Q(H,"then"),V=Q(H,"else");if(!z&&!V)return;let A=Z.let("valid",!0),F=Z.name("_valid");if(N(),W.reset(),z&&V){let L=Z.let("ifClause");W.setParams({ifClause:L}),Z.if(F,D("then",L),D("else",L))}else if(z)Z.if(F,D("then"));else Z.if((0,Y.not)(F),D("else"));W.pass(A,()=>W.error(!0));function N(){let L=W.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},F);W.mergeEvaluated(L)}function D(L,B){return()=>{let O=W.subschema({keyword:L},F);if(Z.assign(A,F),W.mergeValidEvaluated(O,A),B)Z.assign(B,Y._`${L}`);else W.setParams({ifClause:L})}}}};function Q(W,Z){let K=W.schema[Z];return K!==void 0&&!(0,X.alwaysValidSchema)(W,K)}$.default=J}}),ez8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=V8(),X={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:G,parentSchema:J,it:Q}){if(J.if===void 0)(0,Y.checkStrictMode)(Q,`"${G}" without "if" is ignored`)}};$.default=X}}),Wp1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Gp1(),X=pz8(),G=Jp1(),J=dz8(),Q=cz8(),W=CT0(),Z=lz8(),K=Qp1(),H=iz8(),z=nz8(),V=rz8(),A=az8(),F=sz8(),N=oz8(),D=tz8(),L=ez8();function B(O=!1){let E=[V.default,A.default,F.default,N.default,D.default,L.default,Z.default,K.default,W.default,H.default,z.default];if(O)E.push(X.default,J.default);else E.push(Y.default,G.default);return E.push(Q.default),E}$.default=B}}),$V8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X={message:({schemaCode:J})=>Y.str`must match format "${J}"`,params:({schemaCode:J})=>Y._`{format: ${J}}`},G={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:X,code(J,Q){let{gen:W,data:Z,$data:K,schema:H,schemaCode:z,it:V}=J,{opts:A,errSchemaPath:F,schemaEnv:N,self:D}=V;if(!A.validateFormats)return;if(K)L();else B();function L(){let O=W.scopeValue("formats",{ref:D.formats,code:A.code.formats}),E=W.const("fDef",Y._`${O}[${z}]`),M=W.let("fType"),R=W.let("format");W.if(Y._`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>W.assign(M,Y._`${E}.type || "string"`).assign(R,Y._`${E}.validate`),()=>W.assign(M,Y._`"string"`).assign(R,E)),J.fail$data((0,Y.or)(q(),w()));function q(){if(A.strictSchema===!1)return Y.nil;return Y._`${z} && !${R}`}function w(){let I=N.$async?Y._`(${E}.async ? await ${R}(${Z}) : ${R}(${Z}))`:Y._`${R}(${Z})`,P=Y._`(typeof ${R} == "function" ? ${I} : ${R}.test(${Z}))`;return Y._`${R} && ${R} !== true && ${M} === ${Q} && !${P}`}}function B(){let O=D.formats[H];if(!O){q();return}if(O===!0)return;let[E,M,R]=w(O);if(E===Q)J.pass(I());function q(){if(A.strictSchema===!1){D.logger.warn(P());return}throw Error(P());function P(){return`unknown format "${H}" ignored in schema at path "${F}"`}}function w(P){let _=P instanceof RegExp?(0,Y.regexpCode)(P):A.code.formats?Y._`${A.code.formats}${(0,Y.getProperty)(H)}`:void 0,C=W.scopeValue("formats",{key:H,ref:P,code:_});if(typeof P=="object"&&!(P instanceof RegExp))return[P.type||"string",P.validate,Y._`${C}.validate`];return["string",P,C]}function I(){if(typeof O=="object"&&!(O instanceof RegExp)&&O.async){if(!N.$async)throw Error("async format in sync schema");return Y._`await ${R}(${Z})`}return typeof M=="function"?Y._`${R}(${Z})`:Y._`${R}.test(${Z})`}}}};$.default=G}}),Zp1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=$V8(),X=[Y.default];$.default=X}}),Kp1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.contentVocabulary=$.metadataVocabulary=void 0,$.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],$.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}}),YV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Yp1(),X=Xp1(),G=Wp1(),J=Zp1(),Q=Kp1(),W=[Y.default,X.default,(0,G.default)(),J.default,Q.metadataVocabulary,Q.contentVocabulary];$.default=W}}),XV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.DiscrError=void 0;var Y;(function(X){X.Tag="tag",X.Mapping="mapping"})(Y||($.DiscrError=Y={}))}}),Up1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=XV8(),G=U40(),J=Qf(),Q=V8(),W={message:({params:{discrError:K,tagName:H}})=>K===X.DiscrError.Tag?`tag "${H}" must be string`:`value of tag "${H}" must be in oneOf`,params:({params:{discrError:K,tag:H,tagName:z}})=>Y._`{error: ${K}, tag: ${z}, tagValue: ${H}}`},Z={keyword:"discriminator",type:"object",schemaType:"object",error:W,code(K){let{gen:H,data:z,schema:V,parentSchema:A,it:F}=K,{oneOf:N}=A;if(!F.opts.discriminator)throw Error("discriminator: requires discriminator option");let D=V.propertyName;if(typeof D!="string")throw Error("discriminator: requires propertyName");if(V.mapping)throw Error("discriminator: mapping is not supported");if(!N)throw Error("discriminator: requires oneOf keyword");let L=H.let("valid",!1),B=H.const("tag",Y._`${z}${(0,Y.getProperty)(D)}`);H.if(Y._`typeof ${B} == "string"`,()=>O(),()=>K.error(!1,{discrError:X.DiscrError.Tag,tag:B,tagName:D})),K.ok(L);function O(){let R=M();H.if(!1);for(let q in R)H.elseIf(Y._`${B} === ${q}`),H.assign(L,E(R[q]));H.else(),K.error(!1,{discrError:X.DiscrError.Mapping,tag:B,tagName:D}),H.endIf()}function E(R){let q=H.name("valid"),w=K.subschema({keyword:"oneOf",schemaProp:R},q);return K.mergeEvaluated(w,Y.Name),q}function M(){var R;let q={},w=P(A),I=!0;for(let k=0;k<N.length;k++){let S=N[k];if((S===null||S===void 0?void 0:S.$ref)&&!(0,Q.schemaHasRulesButRef)(S,F.self.RULES)){let v=S.$ref;if(S=G.resolveRef.call(F.self,F.schemaEnv.root,F.baseId,v),S instanceof G.SchemaEnv)S=S.schema;if(S===void 0)throw new J.default(F.opts.uriResolver,F.baseId,v)}let T=(R=S===null||S===void 0?void 0:S.properties)===null||R===void 0?void 0:R[D];if(typeof T!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${D}"`);I=I&&(w||P(S)),_(T,k)}if(!I)throw Error(`discriminator: "${D}" must be required`);return q;function P({required:k}){return Array.isArray(k)&&k.includes(D)}function _(k,S){if(k.const)C(k.const,S);else if(k.enum)for(let T of k.enum)C(T,S);else throw Error(`discriminator: "properties/${D}" must have "const" or "enum"`)}function C(k,S){if(typeof k!="string"||k in q)throw Error(`discriminator: "${D}" values must be unique strings`);q[k]=S}}}};$.default=Z}}),GV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.json"($,Y){Y.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}}),JV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js"($,Y){Object.defineProperty($,"__esModule",{value:!0}),$.MissingRefError=$.ValidationError=$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=$.Ajv=void 0;var X=$p1(),G=YV8(),J=Up1(),Q=GV8(),W=["/properties"],Z="http://json-schema.org/draft-07/schema",K=class extends X.default{_addVocabularies(){if(super._addVocabularies(),G.default.forEach((F)=>this.addVocabulary(F)),this.opts.discriminator)this.addKeyword(J.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let F=this.opts.$data?this.$dataMetaSchema(Q,W):Q;this.addMetaSchema(F,Z,!1),this.refs["http://json-schema.org/schema"]=Z}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Z)?Z:void 0)}};$.Ajv=K,Y.exports=$=K,Y.exports.Ajv=K,Object.defineProperty($,"__esModule",{value:!0}),$.default=K;var H=Jf();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return H.KeywordCxt}});var z=v6();Object.defineProperty($,"_",{enumerable:!0,get:function(){return z._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return z.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return z.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return z.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return z.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return z.CodeGen}});var V=K40();Object.defineProperty($,"ValidationError",{enumerable:!0,get:function(){return V.default}});var A=Qf();Object.defineProperty($,"MissingRefError",{enumerable:!0,get:function(){return A.default}})}}),Hp1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.dynamicAnchor=void 0;var Y=v6(),X=OK(),G=U40(),J=jT0(),Q={keyword:"$dynamicAnchor",schemaType:"string",code:(K)=>W(K,K.schema)};function W(K,H){let{gen:z,it:V}=K;V.schemaEnv.root.dynamicAnchors[H]=!0;let A=Y._`${X.default.dynamicAnchors}${(0,Y.getProperty)(H)}`,F=V.errSchemaPath==="#"?V.validateName:Z(K);z.if(Y._`!${A}`,()=>z.assign(A,F))}$.dynamicAnchor=W;function Z(K){let{schemaEnv:H,schema:z,self:V}=K.it,{root:A,baseId:F,localRefs:N,meta:D}=H.root,{schemaId:L}=V.opts,B=new G.SchemaEnv({schema:z,schemaId:L,root:A,baseId:F,localRefs:N,meta:D});return G.compileSchema.call(V,B),(0,J.getValidate)(K,B)}$.default=Q}}),zp1=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.dynamicRef=void 0;var Y=v6(),X=OK(),G=jT0(),J={keyword:"$dynamicRef",schemaType:"string",code:(W)=>Q(W,W.schema)};function Q(W,Z){let{gen:K,keyword:H,it:z}=W;if(Z[0]!=="#")throw Error(`"${H}" only supports hash fragment reference`);let V=Z.slice(1);if(z.allErrors)A();else{let N=K.let("valid",!1);A(N),W.ok(N)}function A(N){if(z.schemaEnv.root.dynamicAnchors[V]){let D=K.let("_v",Y._`${X.default.dynamicAnchors}${(0,Y.getProperty)(V)}`);K.if(D,F(D,N),F(z.validateName,N))}else F(z.validateName,N)()}function F(N,D){return D?()=>K.block(()=>{(0,G.callRef)(W,N),K.let(D,!0)}):()=>(0,G.callRef)(W,N)}}$.dynamicRef=Q,$.default=J}}),QV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Hp1(),X=V8(),G={keyword:"$recursiveAnchor",schemaType:"boolean",code(J){if(J.schema)(0,Y.dynamicAnchor)(J,"");else(0,X.checkStrictMode)(J.it,"$recursiveAnchor: false is ignored")}};$.default=G}}),WV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=zp1(),X={keyword:"$recursiveRef",schemaType:"string",code:(G)=>(0,Y.dynamicRef)(G,G.schema)};$.default=X}}),ZV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Hp1(),X=zp1(),G=QV8(),J=WV8(),Q=[Y.default,X.default,G.default,J.default];$.default=Q}}),KV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=CT0(),X={keyword:"dependentRequired",type:"object",schemaType:"object",error:Y.error,code:(G)=>(0,Y.validatePropertyDeps)(G)};$.default=X}}),UV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=CT0(),X={keyword:"dependentSchemas",type:"object",schemaType:"object",code:(G)=>(0,Y.validateSchemaDeps)(G)};$.default=X}}),HV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=V8(),X={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:G,parentSchema:J,it:Q}){if(J.contains===void 0)(0,Y.checkStrictMode)(Q,`"${G}" without "contains" is ignored`)}};$.default=X}}),zV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/next.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=KV8(),X=UV8(),G=HV8(),J=[Y.default,X.default,G.default];$.default=J}}),VV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G=OK(),J={message:"must NOT have unevaluated properties",params:({params:W})=>Y._`{unevaluatedProperty: ${W.unevaluatedProperty}}`},Q={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:J,code(W){let{gen:Z,schema:K,data:H,errsCount:z,it:V}=W;if(!z)throw Error("ajv implementation error");let{allErrors:A,props:F}=V;if(F instanceof Y.Name)Z.if(Y._`${F} !== true`,()=>Z.forIn("key",H,(B)=>Z.if(D(F,B),()=>N(B))));else if(F!==!0)Z.forIn("key",H,(B)=>F===void 0?N(B):Z.if(L(F,B),()=>N(B)));V.props=!0,W.ok(Y._`${z} === ${G.default.errors}`);function N(B){if(K===!1){if(W.setParams({unevaluatedProperty:B}),W.error(),!A)Z.break();return}if(!(0,X.alwaysValidSchema)(V,K)){let O=Z.name("valid");if(W.subschema({keyword:"unevaluatedProperties",dataProp:B,dataPropType:X.Type.Str},O),!A)Z.if((0,Y.not)(O),()=>Z.break())}}function D(B,O){return Y._`!${B} || !${B}[${O}]`}function L(B,O){let E=[];for(let M in B)if(B[M]===!0)E.push(Y._`${O} !== ${M}`);return(0,Y.and)(...E)}}};$.default=Q}}),AV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G={message:({params:{len:Q}})=>Y.str`must NOT have more than ${Q} items`,params:({params:{len:Q}})=>Y._`{limit: ${Q}}`},J={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:G,code(Q){let{gen:W,schema:Z,data:K,it:H}=Q,z=H.items||0;if(z===!0)return;let V=W.const("len",Y._`${K}.length`);if(Z===!1)Q.setParams({len:z}),Q.fail(Y._`${V} > ${z}`);else if(typeof Z=="object"&&!(0,X.alwaysValidSchema)(H,Z)){let F=W.var("valid",Y._`${V} <= ${z}`);W.if((0,Y.not)(F),()=>A(F,z)),Q.ok(F)}H.items=!0;function A(F,N){W.forRange("i",N,V,(D)=>{if(Q.subschema({keyword:"unevaluatedItems",dataProp:D,dataPropType:X.Type.Num},F),!H.allErrors)W.if((0,Y.not)(F),()=>W.break())})}}};$.default=J}}),FV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=VV8(),X=AV8(),G=[Y.default,X.default];$.default=G}}),DV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft2020.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Yp1(),X=Xp1(),G=Wp1(),J=ZV8(),Q=zV8(),W=FV8(),Z=Zp1(),K=Kp1(),H=[J.default,Y.default,X.default,(0,G.default)(!0),Z.default,K.metadataVocabulary,K.contentVocabulary,Q.default,W.default];$.default=H}}),NV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}}),LV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}}),BV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}}),OV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}}),EV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}}),MV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}}),RV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}}),qV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}}),IV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=NV8(),X=LV8(),G=BV8(),J=OV8(),Q=EV8(),W=MV8(),Z=RV8(),K=qV8(),H=["/properties"];function z(V){return[Y,X,G,J,Q,A(this,W),Z,A(this,K)].forEach((F)=>this.addMetaSchema(F,void 0,!1)),this;function A(F,N){return V?F.$dataMetaSchema(N,H):N}}$.default=z}}),PV8=I1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/2020.js"($,Y){Object.defineProperty($,"__esModule",{value:!0}),$.MissingRefError=$.ValidationError=$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=$.Ajv2020=void 0;var X=$p1(),G=DV8(),J=Up1(),Q=IV8(),W="https://json-schema.org/draft/2020-12/schema",Z=class extends X.default{constructor(A={}){super({...A,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),G.default.forEach((A)=>this.addVocabulary(A)),this.opts.discriminator)this.addKeyword(J.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:A,meta:F}=this.opts;if(!F)return;Q.default.call(this,A),this.refs["http://json-schema.org/schema"]=W}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(W)?W:void 0)}};$.Ajv2020=Z,Y.exports=$=Z,Y.exports.Ajv2020=Z,Object.defineProperty($,"__esModule",{value:!0}),$.default=Z;var K=Jf();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return K.KeywordCxt}});var H=v6();Object.defineProperty($,"_",{enumerable:!0,get:function(){return H._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return H.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return H.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return H.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return H.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return H.CodeGen}});var z=K40();Object.defineProperty($,"ValidationError",{enumerable:!0,get:function(){return z.default}});var V=Qf();Object.defineProperty($,"MissingRefError",{enumerable:!0,get:function(){return V.default}})}}),wV8=pF(JV8(),1),_V8=pF(PV8(),1),jV8=pF(FO(),1)});var H40,Fp1,Dp1=($)=>typeof $==="string"?{...Fp1,name:$}:{...Fp1,...$};var z40=V0(()=>{H40=Symbol("Let zodToJsonSchema decide on which parser to use"),Fp1={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"}});var Np1=($)=>{let Y=Dp1($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,flags:{hasReferencedOpenAiAnyType:!1},currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}};var ST0=V0(()=>{z40()});function kT0($,Y,X,G){if(!G?.errorMessages)return;if(X)$.errorMessage={...$.errorMessage,[Y]:X}}function x8($,Y,X,G,J){$[Y]=X,kT0($,Y,G,J)}var V40=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")};function F7($){if($.target!=="openAi")return{};let Y=[...$.basePath,$.definitionPath,$.openAiAnyTypeName];return $.flags.hasReferencedOpenAiAnyType=!0,{$ref:$.$refStrategy==="relative"?V40(Y,$.currentPath):Y.join("/")}}var lZ=()=>{};function Lp1($,Y){let X={type:"array"};if($.type?._def&&$.type?._def?.typeName!==U0.ZodAny)X.items=G6($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)x8(X,"minItems",$.minLength.value,$.minLength.message,Y);if($.maxLength)x8(X,"maxItems",$.maxLength.value,$.maxLength.message,Y);if($.exactLength)x8(X,"minItems",$.exactLength.value,$.exactLength.message,Y),x8(X,"maxItems",$.exactLength.value,$.exactLength.message,Y);return X}var vT0=V0(()=>{cG();b$()});function Bp1($,Y){let X={type:"integer",format:"int64"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"min":if(Y.target==="jsonSchema7")if(G.inclusive)x8(X,"minimum",G.value,G.message,Y);else x8(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;x8(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)x8(X,"maximum",G.value,G.message,Y);else x8(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;x8(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":x8(X,"multipleOf",G.value,G.message,Y);break}return X}var xT0=()=>{};function Op1(){return{type:"boolean"}}function A40($,Y){return G6($.type._def,Y)}var F40=V0(()=>{b$()});var Ep1=($,Y)=>{return G6($.innerType._def,Y)};var yT0=V0(()=>{b$()});function bT0($,Y,X){let G=X??Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>bT0($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return SV8($,Y)}}var SV8=($,Y)=>{let X={type:"integer",format:"unix-time"};if(Y.target==="openApi3")return X;for(let G of $.checks)switch(G.kind){case"min":x8(X,"minimum",G.value,G.message,Y);break;case"max":x8(X,"maximum",G.value,G.message,Y);break}return X};var hT0=()=>{};function Mp1($,Y){return{...G6($.innerType._def,Y),default:$.defaultValue()}}var fT0=V0(()=>{b$()});function Rp1($,Y){return Y.effectStrategy==="input"?G6($.schema._def,Y):F7(Y)}var gT0=V0(()=>{b$();lZ()});function qp1($){return{type:"string",enum:Array.from($.values)}}function Ip1($,Y){let X=[G6($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G6($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((Q)=>!!Q),G=Y.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,J=[];return X.forEach((Q)=>{if(kV8(Q)){if(J.push(...Q.allOf),Q.unevaluatedProperties===void 0)G=void 0}else{let W=Q;if("additionalProperties"in Q&&Q.additionalProperties===!1){let{additionalProperties:Z,...K}=Q;W=K}else G=void 0;J.push(W)}}),J.length?{allOf:J,...G}:void 0}var kV8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};var mT0=V0(()=>{b$()});function Pp1($,Y){let X=typeof $.value;if(X!=="bigint"&&X!=="number"&&X!=="boolean"&&X!=="string")return{type:Array.isArray($.value)?"array":"object"};if(Y.target==="openApi3")return{type:X==="bigint"?"integer":X,enum:[$.value]};return{type:X==="bigint"?"integer":X,const:$.value}}function D40($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":x8(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y);break;case"max":x8(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"email":switch(Y.emailStrategy){case"format:email":RK(X,"email",G.message,Y);break;case"format:idn-email":RK(X,"idn-email",G.message,Y);break;case"pattern:zod":nG(X,MK.email,G.message,Y);break}break;case"url":RK(X,"uri",G.message,Y);break;case"uuid":RK(X,"uuid",G.message,Y);break;case"regex":nG(X,G.regex,G.message,Y);break;case"cuid":nG(X,MK.cuid,G.message,Y);break;case"cuid2":nG(X,MK.cuid2,G.message,Y);break;case"startsWith":nG(X,RegExp(`^${pT0(G.value,Y)}`),G.message,Y);break;case"endsWith":nG(X,RegExp(`${pT0(G.value,Y)}$`),G.message,Y);break;case"datetime":RK(X,"date-time",G.message,Y);break;case"date":RK(X,"date",G.message,Y);break;case"time":RK(X,"time",G.message,Y);break;case"duration":RK(X,"duration",G.message,Y);break;case"length":x8(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y),x8(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"includes":{nG(X,RegExp(pT0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")RK(X,"ipv4",G.message,Y);if(G.version!=="v4")RK(X,"ipv6",G.message,Y);break}case"base64url":nG(X,MK.base64url,G.message,Y);break;case"jwt":nG(X,MK.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")nG(X,MK.ipv4Cidr,G.message,Y);if(G.version!=="v4")nG(X,MK.ipv6Cidr,G.message,Y);break}case"emoji":nG(X,MK.emoji(),G.message,Y);break;case"ulid":{nG(X,MK.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{RK(X,"binary",G.message,Y);break}case"contentEncoding:base64":{x8(X,"contentEncoding","base64",G.message,Y);break}case"pattern:zod":{nG(X,MK.base64,G.message,Y);break}}break}case"nanoid":nG(X,MK.nanoid,G.message,Y);case"toLowerCase":case"toUpperCase":case"trim":break;default:((J)=>{})(G)}return X}function pT0($,Y){return Y.patternStrategy==="escape"?xV8($):$}function xV8($){let Y="";for(let X=0;X<$.length;X++){if(!vV8.has($[X]))Y+="\\";Y+=$[X]}return Y}function RK($,Y,X,G){if($.format||$.anyOf?.some((J)=>J.format)){if(!$.anyOf)$.anyOf=[];if($.format){if($.anyOf.push({format:$.format,...$.errorMessage&&G.errorMessages&&{errorMessage:{format:$.errorMessage.format}}}),delete $.format,$.errorMessage){if(delete $.errorMessage.format,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else x8($,"format",Y,X,G)}function nG($,Y,X,G){if($.pattern||$.allOf?.some((J)=>J.pattern)){if(!$.allOf)$.allOf=[];if($.pattern){if($.allOf.push({pattern:$.pattern,...$.errorMessage&&G.errorMessages&&{errorMessage:{pattern:$.errorMessage.pattern}}}),delete $.pattern,$.errorMessage){if(delete $.errorMessage.pattern,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.allOf.push({pattern:wp1(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else x8($,"pattern",wp1(Y,G),X,G)}function wp1($,Y){if(!Y.applyRegexFlags||!$.flags)return $.source;let X={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},G=X.i?$.source.toLowerCase():$.source,J="",Q=!1,W=!1,Z=!1;for(let K=0;K<G.length;K++){if(Q){J+=G[K],Q=!1;continue}if(X.i){if(W){if(G[K].match(/[a-z]/)){if(Z)J+=G[K],J+=`${G[K-2]}-${G[K]}`.toUpperCase(),Z=!1;else if(G[K+1]==="-"&&G[K+2]?.match(/[a-z]/))J+=G[K],Z=!0;else J+=`${G[K]}${G[K].toUpperCase()}`;continue}}else if(G[K].match(/[a-z]/)){J+=`[${G[K]}${G[K].toUpperCase()}]`;continue}}if(X.m){if(G[K]==="^"){J+=`(^|(?<=[\r
]))`;continue}else if(G[K]==="$"){J+=`($|(?=[\r
]))`;continue}}if(X.s&&G[K]==="."){J+=W?`${G[K]}\r
`:`[${G[K]}\r
]`;continue}if(J+=G[K],G[K]==="\\")Q=!0;else if(W&&G[K]==="]")W=!1;else if(!W&&G[K]==="[")W=!0}try{new RegExp(J)}catch{return console.warn(`Could not convert regex pattern at ${Y.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),$.source}return J}var uT0=void 0,MK,vV8;var N40=V0(()=>{MK={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:()=>{if(uT0===void 0)uT0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return uT0},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-_]*$/};vV8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function L40($,Y){if(Y.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(Y.target==="openApi3"&&$.keyType?._def.typeName===U0.ZodEnum)return{type:"object",required:$.keyType._def.values,properties:$.keyType._def.values.reduce((G,J)=>({...G,[J]:G6($.valueType._def,{...Y,currentPath:[...Y.currentPath,"properties",J]})??F7(Y)}),{}),additionalProperties:Y.rejectedAdditionalProperties};let X={type:"object",additionalProperties:G6($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]})??Y.allowedAdditionalProperties};if(Y.target==="openApi3")return X;if($.keyType?._def.typeName===U0.ZodString&&$.keyType._def.checks?.length){let{type:G,...J}=D40($.keyType._def,Y);return{...X,propertyNames:J}}else if($.keyType?._def.typeName===U0.ZodEnum)return{...X,propertyNames:{enum:$.keyType._def.values}};else if($.keyType?._def.typeName===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&$.keyType._def.type._def.checks?.length){let{type:G,...J}=A40($.keyType._def,Y);return{...X,propertyNames:J}}return X}var B40=V0(()=>{cG();b$();N40();F40();lZ()});function _p1($,Y){if(Y.mapStrategy==="record")return L40($,Y);let X=G6($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||F7(Y),G=G6($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||F7(Y);return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}var dT0=V0(()=>{b$();B40();lZ()});function jp1($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function Tp1($){return $.target==="openAi"?void 0:{not:F7({...$,currentPath:[...$.currentPath,"not"]})}}var cT0=V0(()=>{lZ()});function Cp1($){return $.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}function kp1($,Y){if(Y.target==="openApi3")return Sp1($,Y);let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in Wf)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=Wf[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return Sp1($,Y)}var Wf,Sp1=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>G6(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};var O40=V0(()=>{b$();Wf={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"}});function vp1($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length)){if(Y.target==="openApi3")return{type:Wf[$.innerType._def.typeName],nullable:!0};return{type:[Wf[$.innerType._def.typeName],"null"]}}if(Y.target==="openApi3"){let G=G6($.innerType._def,{...Y,currentPath:[...Y.currentPath]});if(G&&"$ref"in G)return{allOf:[G],nullable:!0};return G&&{...G,nullable:!0}}let X=G6($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}var lT0=V0(()=>{b$();O40()});function xp1($,Y){let X={type:"number"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"int":X.type="integer",kT0(X,"type",G.message,Y);break;case"min":if(Y.target==="jsonSchema7")if(G.inclusive)x8(X,"minimum",G.value,G.message,Y);else x8(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;x8(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)x8(X,"maximum",G.value,G.message,Y);else x8(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;x8(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":x8(X,"multipleOf",G.value,G.message,Y);break}return X}var iT0=()=>{};function yp1($,Y){let X=Y.target==="openAi",G={type:"object",properties:{}},J=[],Q=$.shape();for(let Z in Q){let K=Q[Z];if(K===void 0||K._def===void 0)continue;let H=bV8(K);if(H&&X){if(K._def.typeName==="ZodOptional")K=K._def.innerType;if(!K.isNullable())K=K.nullable();H=!1}let z=G6(K._def,{...Y,currentPath:[...Y.currentPath,"properties",Z],propertyPath:[...Y.currentPath,"properties",Z]});if(z===void 0)continue;if(G.properties[Z]=z,!H)J.push(Z)}if(J.length)G.required=J;let W=yV8($,Y);if(W!==void 0)G.additionalProperties=W;return G}function yV8($,Y){if($.catchall._def.typeName!=="ZodNever")return G6($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function bV8($){try{return $.isOptional()}catch{return!0}}var nT0=V0(()=>{b$()});var bp1=($,Y)=>{if(Y.currentPath.toString()===Y.propertyPath?.toString())return G6($.innerType._def,Y);let X=G6($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return X?{anyOf:[{not:F7(Y)},X]}:F7(Y)};var rT0=V0(()=>{b$();lZ()});var hp1=($,Y)=>{if(Y.pipeStrategy==="input")return G6($.in._def,Y);else if(Y.pipeStrategy==="output")return G6($.out._def,Y);let X=G6($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=G6($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};var aT0=V0(()=>{b$()});function fp1($,Y){return G6($.type._def,Y)}var sT0=V0(()=>{b$()});function gp1($,Y){let G={type:"array",uniqueItems:!0,items:G6($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)x8(G,"minItems",$.minSize.value,$.minSize.message,Y);if($.maxSize)x8(G,"maxItems",$.maxSize.value,$.maxSize.message,Y);return G}var oT0=V0(()=>{b$()});function mp1($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>G6(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:G6($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>G6(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}var tT0=V0(()=>{b$()});function up1($){return{not:F7($)}}var eT0=V0(()=>{lZ()});function pp1($){return F7($)}var $C0=V0(()=>{lZ()});var dp1=($,Y)=>{return G6($.innerType._def,Y)};var YC0=V0(()=>{b$()});var cp1=($,Y,X)=>{switch(Y){case U0.ZodString:return D40($,X);case U0.ZodNumber:return xp1($,X);case U0.ZodObject:return yp1($,X);case U0.ZodBigInt:return Bp1($,X);case U0.ZodBoolean:return Op1();case U0.ZodDate:return bT0($,X);case U0.ZodUndefined:return up1(X);case U0.ZodNull:return Cp1(X);case U0.ZodArray:return Lp1($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return kp1($,X);case U0.ZodIntersection:return Ip1($,X);case U0.ZodTuple:return mp1($,X);case U0.ZodRecord:return L40($,X);case U0.ZodLiteral:return Pp1($,X);case U0.ZodEnum:return qp1($);case U0.ZodNativeEnum:return jp1($);case U0.ZodNullable:return vp1($,X);case U0.ZodOptional:return bp1($,X);case U0.ZodMap:return _p1($,X);case U0.ZodSet:return gp1($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return fp1($,X);case U0.ZodNaN:case U0.ZodNever:return Tp1(X);case U0.ZodEffects:return Rp1($,X);case U0.ZodAny:return F7(X);case U0.ZodUnknown:return pp1(X);case U0.ZodDefault:return Mp1($,X);case U0.ZodBranded:return A40($,X);case U0.ZodReadonly:return dp1($,X);case U0.ZodCatch:return Ep1($,X);case U0.ZodPipeline:return hp1($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})(Y)}};var XC0=V0(()=>{cG();lZ();vT0();xT0();F40();yT0();hT0();fT0();gT0();mT0();dT0();cT0();lT0();iT0();nT0();rT0();aT0();sT0();B40();oT0();N40();tT0();eT0();O40();$C0();YC0()});function G6($,Y,X=!1){let G=Y.seen.get($);if(Y.override){let Z=Y.override?.($,Y,G,X);if(Z!==H40)return Z}if(G&&!X){let Z=hV8(G,Y);if(Z!==void 0)return Z}let J={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,J);let Q=cp1($,$.typeName,Y),W=typeof Q==="function"?G6(Q(),Y):Q;if(W)fV8($,Y,W);if(Y.postProcess){let Z=Y.postProcess(W,$,Y);return J.jsonSchema=W,Z}return J.jsonSchema=W,W}var hV8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:V40(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),F7(Y);return Y.$refStrategy==="seen"?F7(Y):void 0}}},fV8=($,Y,X)=>{if($.description){if(X.description=$.description,Y.markdownDescription)X.markdownDescription=$.description}return X};var b$=V0(()=>{z40();XC0();lZ()});var lp1=()=>{};var E40=($,Y)=>{let X=Np1(Y),G=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((K,[H,z])=>({...K,[H]:G6(z._def,{...X,currentPath:[...X.basePath,X.definitionPath,H]},!0)??F7(X)}),{}):void 0,J=typeof Y==="string"?Y:Y?.nameStrategy==="title"?void 0:Y?.name,Q=G6($._def,J===void 0?X:{...X,currentPath:[...X.basePath,X.definitionPath,J]},!1)??F7(X),W=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(W!==void 0)Q.title=W;if(X.flags.hasReferencedOpenAiAnyType){if(!G)G={};if(!G[X.openAiAnyTypeName])G[X.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:X.$refStrategy==="relative"?"1":[...X.basePath,X.definitionPath,X.openAiAnyTypeName].join("/")}}}let Z=J===void 0?G?{...Q,[X.definitionPath]:G}:Q:{$ref:[...X.$refStrategy==="relative"?[]:X.basePath,X.definitionPath,J].join("/"),[X.definitionPath]:{...G,[J]:Q}};if(X.target==="jsonSchema7")Z.$schema="http://json-schema.org/draft-07/schema#";else if(X.target==="jsonSchema2019-09"||X.target==="openAi")Z.$schema="https://json-schema.org/draft/2019-09/schema#";if(X.target==="openAi"&&(("anyOf"in Z)||("oneOf"in Z)||("allOf"in Z)||("type"in Z)&&Array.isArray(Z.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return Z};var GC0=V0(()=>{b$();ST0();lZ()});var M40;var R40=V0(()=>{GC0();z40();ST0();b$();lp1();lZ();vT0();xT0();F40();yT0();hT0();fT0();gT0();mT0();dT0();cT0();lT0();iT0();nT0();rT0();aT0();sT0();YC0();B40();oT0();N40();tT0();eT0();O40();$C0();XC0();GC0();M40=E40});function np1($,Y){let X=ip1[Y.target];if(!X){let J=Object.keys(ip1);throw Error(`Unsupported JSON Schema target: "${Y.target}". Supported targets are: ${J.join(", ")}`)}let G=M40($,{$refStrategy:"none",target:X,override:(J)=>{if(J.typeName==="ZodDate")return{type:"string",format:"date-time","x-date":!0};return H40}});return(0,gV8.default)(G,{cb:{pre:(J)=>{if(J.type==="string"&&J.format==="email")J.pattern="^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}}),G}function rp1($){let Y=Object.create($),X=$["~standard"];return Object.defineProperty(Y,"~standard",{value:{...X,jsonSchema:{input:(J)=>{return np1($,J)},output:(J)=>{return np1($,J)}}},writable:!1,enumerable:!0,configurable:!1}),Y}var gV8,ip1;var ap1=V0(()=>{G40();Gf();R40();gV8=pF(FO(),1),ip1={"draft-04":"jsonSchema7","draft-07":"jsonSchema7","draft-2020-12":"jsonSchema2019-09","openapi-3.0":"openApi3"}});function sp1($,Y,X){let G=mV8.has(Y.target)?Y.target:"draft-07",J={target:uV8[G]??G};if(X.unrepresentable)J.unrepresentable=X.unrepresentable;if(X.override)J.override=X.override;return $$($,J)}function pV8($,Y={}){let X=Object.create($),G=$["~standard"];return Object.defineProperty(X,"~standard",{value:{...G,jsonSchema:{input:(Q)=>{return sp1($,Q,Y)},output:(Q)=>{return sp1($,Q,Y)}}},writable:!1,enumerable:!0,configurable:!1}),X}function dV8($){let Y=$.zodSchema;if($.jsonSchema.type==="object"&&$.jsonSchema.properties!==void 0&&!$.jsonSchema.additionalProperties)$.jsonSchema.additionalProperties=!1;if(Y){if(Y?.type==="date"||Y?._def?.typeName==="ZodDate"){if(Y?.type==="date")$.jsonSchema.type="string",$.jsonSchema.format="date-time";$.jsonSchema["x-date"]=!Y._zod?.def?.coerce}else if(Y?.type==="object"&&Y._zod?.def?.catchall?.type==="unknown")$.jsonSchema.additionalProperties=!0}return}function cV8($){return typeof $==="object"&&$!==null&&"_type"in $&&"jsonSchema"in $&&typeof $.jsonSchema==="object"}function op1($){return typeof $==="object"&&$!==null&&"_zod"in $}function lV8($){if($===null||typeof $!=="object")return!1;if(op1($))return!1;if("~standard"in $){let Y=$["~standard"];if(typeof Y==="object"&&Y!==null&&Y.vendor==="zod"&&!("jsonSchema"in Y))return!0}return $ instanceof pg1.ZodType}function W4($){if(V5($))return $;if(op1($))return pV8($,{unrepresentable:Nw.unrepresentable,override:Nw.override});if(lV8($))return rp1($);if(cV8($))return lu1($);if($===null||typeof $!=="object"&&typeof $!=="function")throw Error(`Unsupported schema type: ${typeof $}`);if(typeof $==="function")throw Error("Unsupported schema type: function (schema libraries should implement StandardSchemaWithJSON)");return Vp1($)}function JC0($){if($===null||typeof $!=="object"&&typeof $!=="function")return!1;if(!("~standard"in $))return!1;let Y=$["~standard"];return typeof Y==="object"&&Y!==null&&"version"in Y&&Y.version===1&&"vendor"in Y&&"validate"in Y&&typeof Y.validate==="function"}function QC0($){if($===null||typeof $!=="object"&&typeof $!=="function")return!1;if(!("~standard"in $))return!1;let Y=$["~standard"];if(typeof Y!=="object"||Y===null)return!1;if(!("version"in Y)||Y.version!==1||!("vendor"in Y))return!1;if(!("jsonSchema"in Y)||typeof Y.jsonSchema!=="object")return!1;return typeof Y.jsonSchema.input==="function"&&typeof Y.jsonSchema.output==="function"}function V5($){return JC0($)&&QC0($)}function $6($,Y={}){let{target:X="draft-07",io:G="output",override:J=Nw.override}=Y,Q=$["~standard"].jsonSchema[G],W=Q({target:X,libraryOptions:{...Nw,override:J}});return W=JSON.parse(JSON.stringify(W)),W}var mV8,uV8,Nw;var q40=V0(()=>{iu1();Ap1();ap1();cG();O1();mV8=new Set(["draft-07","draft-04","draft-2020-12"]),uV8={"draft-07":"draft-7","draft-04":"draft-4"};Nw={unrepresentable:"any",override:dV8}});var WC0=V0(()=>{q40()});var DO=V0(()=>{WC0()});function Lw($,Y){try{let X=$["~standard"].validate(Y);if(X instanceof Promise)throw Error("Your schema is async, which is not supported. Please use a sync schema.");return X}catch(X){if(X instanceof TypeError&&X.message.includes("Cannot read properties of undefined"))throw Error(`Schema validation failed due to an invalid schema definition. This often happens when a union schema (z.union or z.or) has undefined options. Please check that all schema options are properly defined. Original error: ${X.message}`);throw X}}function VC0($){return $!==null&&typeof $==="object"&&"error"in $&&$.error===!0&&"validationErrors"in $}function iV8($){if(typeof $==="object"&&$!==null&&"key"in $)return String($.key);return String($)}function ZC0(){return{errors:[],fields:{}}}function I40($){let Y=ZC0();for(let X of $)if(!X.path||X.path.length===0)Y.errors.push(X.message);else{let G=Y;for(let J=0;J<X.path.length;J++){let Q=iV8(X.path[J]);if(J===X.path.length-1){if(!G.fields[Q])G.fields[Q]=ZC0();G.fields[Q].errors.push(X.message)}else{if(!G.fields[Q])G.fields[Q]=ZC0();G=G.fields[Q]}}}return Y}function P40($,Y=200){try{let X=JSON.stringify($,null,2);if(X.length<=Y)return X;return X.slice(0,Y)+"... (truncated)"}catch{return"[Unable to serialize data]"}}function AC0($,Y,X){if(!$||!("~standard"in $))return{data:Y};let G=Lw($,Y);if("value"in G)return{data:G.value};let J=G.issues.map((W)=>`- ${W.path?.join(".")||"root"}: ${W.message}`).join(`
`);return{error:{error:!0,message:`Tool suspension data validation failed${X?` for ${X}`:""}. Please fix the following errors and try again:
${J}

Provided arguments: ${P40(Y)}`,validationErrors:I40(G.issues)}}}function tp1($,Y){if(typeof Y<"u"&&Y!==null)return Y;let X=$6($,{io:"input"});if(X.type==="array")return[];if(X.type==="object")return{};return Y}function Zf($){if($===null||typeof $!=="object")return!1;let Y=Object.getPrototypeOf($);return Y===Object.prototype||Y===null}function KC0($){if($===void 0)return null;if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map(KC0);if(!Zf($))return $;let Y={};for(let[X,G]of Object.entries($))Y[X]=KC0(G);return Y}function UC0($){if($===null||$===void 0)return;if(typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>X===null?null:UC0(X));if(!Zf($))return $;let Y={};for(let[X,G]of Object.entries($)){if(G===null||G===void 0)continue;Y[X]=UC0(G)}return Y}function HC0($,Y,X=""){if($===null||$===void 0)return Y.has(X)?void 0:$;if(typeof $!=="object")return $;if(Array.isArray($))return $.map((J,Q)=>HC0(J,Y,X?`${X}.${Q}`:String(Q)));if(!Zf($))return $;let G={};for(let[J,Q]of Object.entries($)){let W=X?`${X}.${J}`:J;if((Q===null||Q===void 0)&&Y.has(W))continue;G[J]=HC0(Q,Y,W)}return G}function rV8($,Y){let X=$;for(let G of Y){if(X===null||X===void 0||typeof X!=="object")return nV8;let J=typeof G==="object"&&G!==null&&"key"in G?String(G.key):String(G);X=X[J]}return X}function aV8($,Y){if(!Zf(Y))return Y;let X=_T0($);if(!Dw(X))return Y;let G=X.shape;if(!G||typeof G!=="object")return Y;let J=!1,Q={...Y};for(let[W,Z]of Object.entries(Y)){if(typeof Z!=="string")continue;let K=G[W];if(!K)continue;let H=_T0(K);if(mF(H)==="ZodString")continue;let z=Z.trim();if(uF(H)&&z.startsWith("[")||Dw(H)&&z.startsWith("{"))try{let V=JSON.parse(Z);if(uF(H)&&Array.isArray(V)||Dw(H)&&Zf(V))Q[W]=V,J=!0}catch{}}return J?Q:Y}function Kf($,Y,X){if(!$||!("~standard"in $))return{data:Y};let G=tp1($,Y);G=KC0(G);let J=Lw($,G);if("value"in J)return{data:J.value};let Q=aV8($,G);if(Q!==G){let N=Lw($,Q);if("value"in N)return{data:N.value}}let W=new Set(J.issues.filter((N)=>{if(!N.path||N.path.length===0)return!1;let D=rV8(G,N.path);return D===null||D===void 0}).map((N)=>N.path?.map((D)=>typeof D==="object"&&("key"in D)?String(D.key):String(D)).join(".")).filter((N)=>!!N)),Z=W.size>0?HC0(Y,W):UC0(Y),K=tp1($,Z),H=Lw($,K);if("value"in H)return{data:H.value};let z=$6($,{io:"input"});if(z.type==="object"&&z.properties!=null&&"prompt"in z.properties&&G!=null&&typeof G==="object"&&!Array.isArray(G)){let N=G;if(N.prompt==null){let D=[N.query,N.message,N.input].find((L)=>typeof L==="string");if(D!==void 0){let L={...N,prompt:D},B=Lw($,L);if("value"in B)return{data:B.value}}}}let A=J.issues.map((N)=>`- ${N.path?.join(".")||"root"}: ${N.message}`).join(`
`);return{error:{error:!0,message:`Tool input validation failed${X?` for ${X}`:""}. Please fix the following errors and try again:
${A}

Provided arguments: ${P40(Y)}`,validationErrors:I40(J.issues)}}}function FC0($,Y,X,G){if(!$||!("~standard"in $)||G)return{data:Y};let J=Lw($,Y);if("value"in J)return{data:J.value};let Q=J.issues.map((Z)=>`- ${Z.path?.join(".")||"root"}: ${Z.message}`).join(`
`);return{error:{error:!0,message:`Tool output validation failed${X?` for ${X}`:""}. The tool returned invalid output:
${Q}

Returned output: ${P40(Y)}`,validationErrors:I40(J.issues)}}}function zC0($){if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map(zC0);let Y={};for(let[X,G]of Object.entries($))if(sV8.some((J)=>X.toLowerCase().includes(J.toLowerCase())))Y[X]="[REDACTED]";else if(typeof G==="object"&&G!==null)Y[X]=zC0(G);else Y[X]=G;return Y}function oV8($,Y,X){if(!$)return{data:Y?.all??{}};let G=Y?.all??{},Q=W4($)["~standard"].validate(G);if(Q instanceof Promise)throw Error("Your schema is async, which is not supported. Please use a sync schema.");if("value"in Q)return{data:Q.value};let W=Q.issues.map((H)=>`- ${H.path?.join(".")||"root"}: ${H.message}`).join(`
`),Z=zC0(G),K={error:!0,message:`Request context validation failed${X?` for ${X}`:""}. Please fix the following errors and try again:
${W}

Provided request context: ${P40(Z)}`,validationErrors:I40(Q.issues)};return{data:G,error:K}}function X8($){return new RW($)}function Uf($){return $ instanceof RW||typeof $==="object"&&$!==null&&DC0 in $}function BU($){return!!($&&!Uf($)&&(("parameters"in $)||("execute"in $)&&typeof $.execute==="function"&&("inputSchema"in $)))}function Bw($){if(typeof $!=="object"||$===null)return!1;let Y=$;return(Y.type==="provider-defined"||Y.type==="provider")&&typeof Y.id==="string"}function ep1($){return $.split(".").slice(1).join(".")}var nV8,sV8,DC0,RW=class{id;description;inputSchema;outputSchema;suspendSchema;resumeSchema;requestContextSchema;execute;mastra;requireApproval;strict;providerOptions;toModelOutput;transform;mcp;onInputStart;onInputDelta;onInputAvailable;onOutput;inputExamples;mcpMetadata;constructor($){if(this[DC0]=!0,this.id=$.id,this.description=$.description,this.inputSchema=$.inputSchema?W4($.inputSchema):void 0,this.outputSchema=$.outputSchema?W4($.outputSchema):void 0,this.suspendSchema=$.suspendSchema?W4($.suspendSchema):void 0,this.resumeSchema=$.resumeSchema?W4($.resumeSchema):void 0,this.requestContextSchema=$.requestContextSchema,this.mastra=$.mastra,this.requireApproval=$.requireApproval||!1,this.strict=$.strict,this.providerOptions=$.providerOptions,this.toModelOutput=$.toModelOutput,this.transform=$.transform,this.inputExamples=$.inputExamples,this.mcp=$.mcp,this.mcpMetadata=$.mcpMetadata,this.onInputStart=$.onInputStart,this.onInputDelta=$.onInputDelta,this.onInputAvailable=$.onInputAvailable,this.onOutput=$.onOutput,$.execute){let Y=$.execute;this.execute=async(X,G)=>{let{data:J,error:Q}=Kf(this.inputSchema,X,this.id);if(Q)return Q;let{error:W}=oV8(this.requestContextSchema,G?.requestContext,this.id);if(W)return W;let Z=null,K=G?{...G,...G.suspend?{suspend:(N,D)=>{return Z=N,G.suspend?.(N,D)}}:{}}:{},H=K;if(!G)H={requestContext:new p1,mastra:void 0};else{let N=K.toolCallId&&K.messages,D=!N&&(K.workflow||K.workflowId);if(N&&!K.agent){let{agentId:L,toolCallId:B,messages:O,suspend:E,resumeData:M,threadId:R,resourceId:q,writableStream:w,...I}=K;H={...I,agent:{agentId:L||"",toolCallId:B,messages:O,suspend:E,resumeData:M,threadId:R,resourceId:q,writableStream:w},requestContext:I.requestContext||new p1}}else if(D&&!K.workflow){let{workflowId:L,runId:B,state:O,setState:E,suspend:M,resumeData:R,...q}=K;H={...q,workflow:{workflowId:L,runId:B,state:O,setState:E,suspend:M,resumeData:R},requestContext:q.requestContext||new p1}}else H={...K,agent:K.agent?{...K.agent,agentId:K.agent.agentId??"",suspend:(L,B)=>{return Z=L,K.agent?.suspend?.(L,B)}}:K.agent,workflow:K.workflow?{...K.workflow,suspend:(L,B)=>{return Z=L,K.workflow?.suspend?.(L,B)}}:K.workflow,requestContext:K.requestContext||new p1}}let z=H.agent?.resumeData??H.workflow?.resumeData??H?.resumeData;if(z){let N=Kf(this.resumeSchema,z,this.id);if(N.error)return N.error}let V=await Y(J,H);if(Z){let N=AC0(this.suspendSchema,Z,this.id);if(N.error)return N.error}let A=!!(typeof V>"u"&&Z),F=FC0(this.outputSchema,V,this.id,A);if(F.error)return F.error;return F.data}}}},NO;var Ow=V0(()=>{Xf();DO();wF();nV8=Symbol("PATH_NOT_FOUND");sV8=["password","secret","token","apiKey","api_key","auth","credential"];DC0=Symbol.for("mastra.core.tool.Tool");NO=Bw});var $d1={};W8($d1,{pMapSkip:()=>Ew,pMapIterable:()=>tV8,default:()=>LO});async function LO($,Y,{concurrency:X=Number.POSITIVE_INFINITY,stopOnError:G=!0,signal:J}={}){return new Promise((Q,W)=>{if($[Symbol.iterator]===void 0&&$[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof $})`);if(typeof Y!=="function")throw TypeError("Mapper function is required");if(!(Number.isSafeInteger(X)&&X>=1||X===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${X}\` (${typeof X})`);let Z=[],K=[],H=new Map,z=!1,V=!1,A=!1,F=0,N=0,D=$[Symbol.iterator]===void 0?$[Symbol.asyncIterator]():$[Symbol.iterator](),L=()=>{E(J.reason)},B=()=>{J?.removeEventListener("abort",L)},O=(R)=>{Q(R),B()},E=(R)=>{z=!0,V=!0,W(R),B()};if(J){if(J.aborted)E(J.reason);J.addEventListener("abort",L,{once:!0})}let M=async()=>{if(V)return;let R=await D.next(),q=N;if(N++,R.done){if(A=!0,F===0&&!V){if(!G&&K.length>0){E(AggregateError(K));return}if(V=!0,H.size===0){O(Z);return}let w=[];for(let[I,P]of Z.entries()){if(H.get(I)===Ew)continue;w.push(P)}O(w)}return}F++,(async()=>{try{let w=await R.value;if(V)return;let I=await Y(w,q);if(I===Ew)H.set(q,I);Z[q]=I,F--,await M()}catch(w){if(G)E(w);else{K.push(w),F--;try{await M()}catch(I){E(I)}}}})()};(async()=>{for(let R=0;R<X;R++){try{await M()}catch(q){E(q);break}if(A||z)break}})()})}function tV8($,Y,{concurrency:X=Number.POSITIVE_INFINITY,backpressure:G=X}={}){if($[Symbol.iterator]===void 0&&$[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof $})`);if(typeof Y!=="function")throw TypeError("Mapper function is required");if(!(Number.isSafeInteger(X)&&X>=1||X===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${X}\` (${typeof X})`);if(!(Number.isSafeInteger(G)&&G>=X||G===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${X}) and up or \`Infinity\`, got \`${G}\` (${typeof G})`);return{async*[Symbol.asyncIterator](){let J=$[Symbol.asyncIterator]===void 0?$[Symbol.iterator]():$[Symbol.asyncIterator](),Q=[],W=0,Z=!1,K=0;function H(){if(Z||!(W<X&&Q.length<G))return;W++;let z=(async()=>{let{done:V,value:A}=await J.next();if(V)return W--,{done:!0};H();try{let F=await Y(await A,K++);if(W--,F===Ew){let N=Q.indexOf(z);if(N>0)Q.splice(N,1)}return H(),{done:!1,value:F}}catch(F){return W--,Z=!0,{error:F}}})();Q.push(z)}H();while(Q.length>0){let{error:z,done:V,value:A}=await Q[0];if(Q.shift(),z)throw z;if(V)return;if(H(),A===Ew)continue;yield A}}}}var Ew;var NC0=V0(()=>{Ew=Symbol("skip")});var Hf=o((Kc5,Xd1)=>{var Yd1={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:"[^/]",END_ANCHOR:"(?:\\/|$)",DOTS_SLASH:"\\.{1,2}(?:\\/|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|\\/)\\.{1,2}(?:\\/|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:\\/|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:\\/|$))",QMARK_NO_DOT:"[^.\\/]",STAR:"[^/]*?",START_ANCHOR:"(?:^|\\/)",SEP:"/"},eV8={...Yd1,SLASH_LITERAL:"[\\\\/]",QMARK:"[^\\\\/]",STAR:"[^\\\\/]*?",DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},$A8={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Xd1.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:$A8,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars($){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${$.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars($){return $===!0?eV8:Yd1}}});var zf=o((QA8)=>{var{REGEX_BACKSLASH:YA8,REGEX_REMOVE_BACKSLASH:XA8,REGEX_SPECIAL_CHARS:GA8,REGEX_SPECIAL_CHARS_GLOBAL:JA8}=Hf();QA8.isObject=($)=>$!==null&&typeof $==="object"&&!Array.isArray($);QA8.hasRegexChars=($)=>GA8.test($);QA8.isRegexChar=($)=>$.length===1&&QA8.hasRegexChars($);QA8.escapeRegex=($)=>$.replace(JA8,"\\$1");QA8.toPosixSlashes=($)=>$.replace(YA8,"/");QA8.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let $=navigator.platform.toLowerCase();return $==="win32"||$==="windows"}if(typeof process<"u"&&process.platform)return process.platform==="win32";return!1};QA8.removeBackslashes=($)=>{return $.replace(XA8,(Y)=>{return Y==="\\"?"":Y})};QA8.escapeLast=($,Y,X)=>{let G=$.lastIndexOf(Y,X);if(G===-1)return $;if($[G-1]==="\\")return QA8.escapeLast($,Y,G-1);return`${$.slice(0,G)}\\${$.slice(G)}`};QA8.removePrefix=($,Y={})=>{let X=$;if(X.startsWith("./"))X=X.slice(2),Y.prefix="./";return X};QA8.wrapOutput=($,Y={},X={})=>{let G=X.contains?"":"^",J=X.contains?"":"$",Q=`${G}(?:${$})${J}`;if(Y.negated===!0)Q=`(?:^(?!${Q}).*$)`;return Q};QA8.basename=($,{windows:Y}={})=>{let X=$.split(Y?/[\\/]/:"/"),G=X[X.length-1];if(G==="")return X[X.length-2];return G}});var Vd1=o((Hc5,zd1)=>{var Qd1=zf(),{CHAR_ASTERISK:LC0,CHAR_AT:DA8,CHAR_BACKWARD_SLASH:Vf,CHAR_COMMA:NA8,CHAR_DOT:BC0,CHAR_EXCLAMATION_MARK:OC0,CHAR_FORWARD_SLASH:Hd1,CHAR_LEFT_CURLY_BRACE:EC0,CHAR_LEFT_PARENTHESES:MC0,CHAR_LEFT_SQUARE_BRACKET:LA8,CHAR_PLUS:BA8,CHAR_QUESTION_MARK:Wd1,CHAR_RIGHT_CURLY_BRACE:OA8,CHAR_RIGHT_PARENTHESES:Zd1,CHAR_RIGHT_SQUARE_BRACKET:EA8}=Hf(),Kd1=($)=>{return $===Hd1||$===Vf},Ud1=($)=>{if($.isPrefix!==!0)$.depth=$.isGlobstar?1/0:1},MA8=($,Y)=>{let X=Y||{},G=$.length-1,J=X.parts===!0||X.scanToEnd===!0,Q=[],W=[],Z=[],K=$,H=-1,z=0,V=0,A=!1,F=!1,N=!1,D=!1,L=!1,B=!1,O=!1,E=!1,M=!1,R=!1,q=0,w,I,P={value:"",depth:0,isGlob:!1},_=()=>H>=G,C=()=>K.charCodeAt(H+1),k=()=>{return w=I,K.charCodeAt(++H)};while(H<G){I=k();let y;if(I===Vf){if(O=P.backslashes=!0,I=k(),I===EC0)B=!0;continue}if(B===!0||I===EC0){q++;while(_()!==!0&&(I=k())){if(I===Vf){O=P.backslashes=!0,k();continue}if(I===EC0){q++;continue}if(B!==!0&&I===BC0&&(I=k())===BC0){if(A=P.isBrace=!0,N=P.isGlob=!0,R=!0,J===!0)continue;break}if(B!==!0&&I===NA8){if(A=P.isBrace=!0,N=P.isGlob=!0,R=!0,J===!0)continue;break}if(I===OA8){if(q--,q===0){B=!1,A=P.isBrace=!0,R=!0;break}}}if(J===!0)continue;break}if(I===Hd1){if(Q.push(H),W.push(P),P={value:"",depth:0,isGlob:!1},R===!0)continue;if(w===BC0&&H===z+1){z+=2;continue}V=H+1;continue}if(X.noext!==!0){if((I===BA8||I===DA8||I===LC0||I===Wd1||I===OC0)===!0&&C()===MC0){if(N=P.isGlob=!0,D=P.isExtglob=!0,R=!0,I===OC0&&H===z)M=!0;if(J===!0){while(_()!==!0&&(I=k())){if(I===Vf){O=P.backslashes=!0,I=k();continue}if(I===Zd1){N=P.isGlob=!0,R=!0;break}}continue}break}}if(I===LC0){if(w===LC0)L=P.isGlobstar=!0;if(N=P.isGlob=!0,R=!0,J===!0)continue;break}if(I===Wd1){if(N=P.isGlob=!0,R=!0,J===!0)continue;break}if(I===LA8){while(_()!==!0&&(y=k())){if(y===Vf){O=P.backslashes=!0,k();continue}if(y===EA8){F=P.isBracket=!0,N=P.isGlob=!0,R=!0;break}}if(J===!0)continue;break}if(X.nonegate!==!0&&I===OC0&&H===z){E=P.negated=!0,z++;continue}if(X.noparen!==!0&&I===MC0){if(N=P.isGlob=!0,J===!0){while(_()!==!0&&(I=k())){if(I===MC0){O=P.backslashes=!0,I=k();continue}if(I===Zd1){R=!0;break}}continue}break}if(N===!0){if(R=!0,J===!0)continue;break}}if(X.noext===!0)D=!1,N=!1;let S=K,T="",v="";if(z>0)T=K.slice(0,z),K=K.slice(z),V-=z;if(S&&N===!0&&V>0)S=K.slice(0,V),v=K.slice(V);else if(N===!0)S="",v=K;else S=K;if(S&&S!==""&&S!=="/"&&S!==K){if(Kd1(S.charCodeAt(S.length-1)))S=S.slice(0,-1)}if(X.unescape===!0){if(v)v=Qd1.removeBackslashes(v);if(S&&O===!0)S=Qd1.removeBackslashes(S)}let x={prefix:T,input:$,start:z,base:S,glob:v,isBrace:A,isBracket:F,isGlob:N,isExtglob:D,isGlobstar:L,negated:E,negatedExtglob:M};if(X.tokens===!0){if(x.maxDepth=0,!Kd1(I))W.push(P);x.tokens=W}if(X.parts===!0||X.tokens===!0){let y;for(let d=0;d<Q.length;d++){let u=y?y+1:z,b=Q[d],g=$.slice(u,b);if(X.tokens){if(d===0&&z!==0)W[d].isPrefix=!0,W[d].value=T;else W[d].value=g;Ud1(W[d]),x.maxDepth+=W[d].depth}if(d!==0||g!=="")Z.push(g);y=b}if(y&&y+1<$.length){let d=$.slice(y+1);if(Z.push(d),X.tokens)W[W.length-1].value=d,Ud1(W[W.length-1]),x.maxDepth+=W[W.length-1].depth}x.slashes=Q,x.parts=Z}return x};zd1.exports=MA8});var Ld1=o((zc5,Nd1)=>{var Af=Hf(),qW=zf(),{MAX_LENGTH:w40,POSIX_REGEX_SOURCE:RA8,REGEX_NON_SPECIAL_CHARS:qA8,REGEX_SPECIAL_CHARS_BACKREF:IA8,REPLACEMENTS:Ad1}=Af,PA8=($,Y)=>{if(typeof Y.expandRange==="function")return Y.expandRange(...$,Y);$.sort();let X=`[${$.join("-")}]`;try{new RegExp(X)}catch(G){return $.map((J)=>qW.escapeRegex(J)).join("..")}return X},Mw=($,Y)=>{return`Missing ${$}: "${Y}" - use "\\\\${Y}" to match literal characters`},Fd1=($)=>{let Y=[],X=0,G=0,J=0,Q="",W=!1;for(let Z of $){if(W===!0){Q+=Z,W=!1;continue}if(Z==="\\"){Q+=Z,W=!0;continue}if(Z==='"'){J=J===1?0:1,Q+=Z;continue}if(J===0){if(Z==="[")X++;else if(Z==="]"&&X>0)X--;else if(X===0){if(Z==="(")G++;else if(Z===")"&&G>0)G--;else if(Z==="|"&&G===0){Y.push(Q),Q="";continue}}}Q+=Z}return Y.push(Q),Y},wA8=($)=>{let Y=!1;for(let X of $){if(Y===!0){Y=!1;continue}if(X==="\\"){Y=!0;continue}if(/[?*+@!()[\]{}]/.test(X))return!1}return!0},Dd1=($)=>{let Y=$.trim(),X=!0;while(X===!0)if(X=!1,/^@\([^\\()[\]{}|]+\)$/.test(Y))Y=Y.slice(2,-1),X=!0;if(!wA8(Y))return;return Y.replace(/\\(.)/g,"$1")},_A8=($)=>{let Y=$.map(Dd1).filter(Boolean);for(let X=0;X<Y.length;X++)for(let G=X+1;G<Y.length;G++){let J=Y[X],Q=Y[G],W=J[0];if(!W||J!==W.repeat(J.length)||Q!==W.repeat(Q.length))continue;if(J===Q||J.startsWith(Q)||Q.startsWith(J))return!0}return!1},RC0=($,Y=!0)=>{if($[0]!=="+"&&$[0]!=="*"||$[1]!=="(")return;let X=0,G=0,J=0,Q=!1;for(let W=1;W<$.length;W++){let Z=$[W];if(Q===!0){Q=!1;continue}if(Z==="\\"){Q=!0;continue}if(Z==='"'){J=J===1?0:1;continue}if(J===1)continue;if(Z==="["){X++;continue}if(Z==="]"&&X>0){X--;continue}if(X>0)continue;if(Z==="("){G++;continue}if(Z===")"){if(G--,G===0){if(Y===!0&&W!==$.length-1)return;return{type:$[0],body:$.slice(2,W),end:W}}}}},jA8=($)=>{let Y=0,X=[];while(Y<$.length){let J=RC0($.slice(Y),!1);if(!J||J.type!=="*")return;let Q=Fd1(J.body).map((Z)=>Z.trim());if(Q.length!==1)return;let W=Dd1(Q[0]);if(!W||W.length!==1)return;X.push(W),Y+=J.end+1}if(X.length<1)return;return`${X.length===1?qW.escapeRegex(X[0]):`[${X.map((J)=>qW.escapeRegex(J)).join("")}]`}*`},TA8=($)=>{let Y=0,X=$.trim(),G=RC0(X);while(G)Y++,X=G.body.trim(),G=RC0(X);return Y},CA8=($,Y)=>{if(Y.maxExtglobRecursion===!1)return{risky:!1};let X=typeof Y.maxExtglobRecursion==="number"?Y.maxExtglobRecursion:Af.DEFAULT_MAX_EXTGLOB_RECURSION,G=Fd1($).map((J)=>J.trim());if(G.length>1){if(G.some((J)=>J==="")||G.some((J)=>/^[*?]+$/.test(J))||_A8(G))return{risky:!0}}for(let J of G){let Q=jA8(J);if(Q)return{risky:!0,safeOutput:Q};if(TA8(J)>X)return{risky:!0}}return{risky:!1}},qC0=($,Y)=>{if(typeof $!=="string")throw TypeError("Expected a string");$=Ad1[$]||$;let X={...Y},G=typeof X.maxLength==="number"?Math.min(w40,X.maxLength):w40,J=$.length;if(J>G)throw SyntaxError(`Input length: ${J}, exceeds maximum allowed length: ${G}`);let Q={type:"bos",value:"",output:X.prepend||""},W=[Q],Z=X.capture?"":"?:",K=Af.globChars(X.windows),H=Af.extglobChars(K),{DOT_LITERAL:z,PLUS_LITERAL:V,SLASH_LITERAL:A,ONE_CHAR:F,DOTS_SLASH:N,NO_DOT:D,NO_DOT_SLASH:L,NO_DOTS_SLASH:B,QMARK:O,QMARK_NO_DOT:E,STAR:M,START_ANCHOR:R}=K,q=(X0)=>{return`(${Z}(?:(?!${R}${X0.dot?N:z}).)*?)`},w=X.dot?"":D,I=X.dot?O:E,P=X.bash===!0?q(X):M;if(X.capture)P=`(${P})`;if(typeof X.noext==="boolean")X.noextglob=X.noext;let _={input:$,index:-1,start:0,dot:X.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:W};$=qW.removePrefix($,_),J=$.length;let C=[],k=[],S=[],T=Q,v,x=()=>_.index===J-1,y=_.peek=(X0=1)=>$[_.index+X0],d=_.advance=()=>$[++_.index]||"",u=()=>$.slice(_.index+1),b=(X0="",a=0)=>{_.consumed+=X0,_.index+=a},g=(X0)=>{_.output+=X0.output!=null?X0.output:X0.value,b(X0.value)},p=()=>{let X0=1;while(y()==="!"&&(y(2)!=="("||y(3)==="?"))d(),_.start++,X0++;if(X0%2===0)return!1;return _.negated=!0,_.start++,!0},h=(X0)=>{_[X0]++,S.push(X0)},n=(X0)=>{_[X0]--,S.pop()},t=(X0)=>{if(T.type==="globstar"){let a=_.braces>0&&(X0.type==="comma"||X0.type==="brace"),Q0=X0.extglob===!0||C.length&&(X0.type==="pipe"||X0.type==="paren");if(X0.type!=="slash"&&X0.type!=="paren"&&!a&&!Q0)_.output=_.output.slice(0,-T.output.length),T.type="star",T.value="*",T.output=P,_.output+=T.output}if(C.length&&X0.type!=="paren")C[C.length-1].inner+=X0.value;if(X0.value||X0.output)g(X0);if(T&&T.type==="text"&&X0.type==="text"){T.output=(T.output||T.value)+X0.value,T.value+=X0.value;return}X0.prev=T,W.push(X0),T=X0},s=(X0,a)=>{let Q0={...H[a],conditions:1,inner:""};Q0.prev=T,Q0.parens=_.parens,Q0.output=_.output,Q0.startIndex=_.index,Q0.tokensIndex=W.length;let e=(X.capture?"(":"")+Q0.open;h("parens"),t({type:X0,value:a,output:_.output?"":F}),t({type:"paren",extglob:!0,value:d(),output:e}),C.push(Q0)},Z0=(X0)=>{let a=$.slice(X0.startIndex,_.index+1),Q0=$.slice(X0.startIndex+2,_.index),e=CA8(Q0,X);if((X0.type==="plus"||X0.type==="star")&&e.risky){let Y0=e.safeOutput?(X0.output?"":F)+(X.capture?`(${e.safeOutput})`:e.safeOutput):void 0,K0=W[X0.tokensIndex];K0.type="text",K0.value=a,K0.output=Y0||qW.escapeRegex(a);for(let A0=X0.tokensIndex+1;A0<W.length;A0++)W[A0].value="",W[A0].output="",delete W[A0].suffix;_.output=X0.output+K0.output,_.backtrack=!0,t({type:"paren",extglob:!0,value:v,output:""}),n("parens");return}let m=X0.close+(X.capture?")":""),$0;if(X0.type==="negate"){let Y0=P;if(X0.inner&&X0.inner.length>1&&X0.inner.includes("/"))Y0=q(X);if(Y0!==P||x()||/^\)+$/.test(u()))m=X0.close=`)$))${Y0}`;if(X0.inner.includes("*")&&($0=u())&&/^\.[^\\/.]+$/.test($0)){let K0=qC0($0,{...Y,fastpaths:!1}).output;m=X0.close=`)${K0})${Y0})`}if(X0.prev.type==="bos")_.negatedExtglob=!0}t({type:"paren",extglob:!0,value:v,output:m}),n("parens")};if(X.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test($)){let X0=!1,a=$.replace(IA8,(Q0,e,m,$0,Y0,K0)=>{if($0==="\\")return X0=!0,Q0;if($0==="?"){if(e)return e+$0+(Y0?O.repeat(Y0.length):"");if(K0===0)return I+(Y0?O.repeat(Y0.length):"");return O.repeat(m.length)}if($0===".")return z.repeat(m.length);if($0==="*"){if(e)return e+$0+(Y0?P:"");return P}return e?Q0:`\\${Q0}`});if(X0===!0)if(X.unescape===!0)a=a.replace(/\\/g,"");else a=a.replace(/\\+/g,(Q0)=>{return Q0.length%2===0?"\\\\":Q0?"\\":""});if(a===$&&X.contains===!0)return _.output=$,_;return _.output=qW.wrapOutput(a,_,Y),_}while(!x()){if(v=d(),v==="\x00")continue;if(v==="\\"){let Q0=y();if(Q0==="/"&&X.bash!==!0)continue;if(Q0==="."||Q0===";")continue;if(!Q0){v+="\\",t({type:"text",value:v});continue}let e=/^\\+/.exec(u()),m=0;if(e&&e[0].length>2){if(m=e[0].length,_.index+=m,m%2!==0)v+="\\"}if(X.unescape===!0)v=d();else v+=d();if(_.brackets===0){t({type:"text",value:v});continue}}if(_.brackets>0&&(v!=="]"||T.value==="["||T.value==="[^")){if(X.posix!==!1&&v===":"){let Q0=T.value.slice(1);if(Q0.includes("[")){if(T.posix=!0,Q0.includes(":")){let e=T.value.lastIndexOf("["),m=T.value.slice(0,e),$0=T.value.slice(e+2),Y0=RA8[$0];if(Y0){if(T.value=m+Y0,_.backtrack=!0,d(),!Q.output&&W.indexOf(T)===1)Q.output=F;continue}}}}if(v==="["&&y()!==":"||v==="-"&&y()==="]")v=`\\${v}`;if(v==="]"&&(T.value==="["||T.value==="[^"))v=`\\${v}`;if(X.posix===!0&&v==="!"&&T.value==="[")v="^";T.value+=v,g({value:v});continue}if(_.quotes===1&&v!=='"'){v=qW.escapeRegex(v),T.value+=v,g({value:v});continue}if(v==='"'){if(_.quotes=_.quotes===1?0:1,X.keepQuotes===!0)t({type:"text",value:v});continue}if(v==="("){h("parens"),t({type:"paren",value:v});continue}if(v===")"){if(_.parens===0&&X.strictBrackets===!0)throw SyntaxError(Mw("opening","("));let Q0=C[C.length-1];if(Q0&&_.parens===Q0.parens+1){Z0(C.pop());continue}t({type:"paren",value:v,output:_.parens?")":"\\)"}),n("parens");continue}if(v==="["){if(X.nobracket===!0||!u().includes("]")){if(X.nobracket!==!0&&X.strictBrackets===!0)throw SyntaxError(Mw("closing","]"));v=`\\${v}`}else h("brackets");t({type:"bracket",value:v});continue}if(v==="]"){if(X.nobracket===!0||T&&T.type==="bracket"&&T.value.length===1){t({type:"text",value:v,output:`\\${v}`});continue}if(_.brackets===0){if(X.strictBrackets===!0)throw SyntaxError(Mw("opening","["));t({type:"text",value:v,output:`\\${v}`});continue}n("brackets");let Q0=T.value.slice(1);if(T.posix!==!0&&Q0[0]==="^"&&!Q0.includes("/"))v=`/${v}`;if(T.value+=v,g({value:v}),X.literalBrackets===!1||qW.hasRegexChars(Q0))continue;let e=qW.escapeRegex(T.value);if(_.output=_.output.slice(0,-T.value.length),X.literalBrackets===!0){_.output+=e,T.value=e;continue}T.value=`(${Z}${e}|${T.value})`,_.output+=T.value;continue}if(v==="{"&&X.nobrace!==!0){h("braces");let Q0={type:"brace",value:v,output:"(",outputIndex:_.output.length,tokensIndex:_.tokens.length};k.push(Q0),t(Q0);continue}if(v==="}"){let Q0=k[k.length-1];if(X.nobrace===!0||!Q0){t({type:"text",value:v,output:v});continue}let e=")";if(Q0.dots===!0){let m=W.slice(),$0=[];for(let Y0=m.length-1;Y0>=0;Y0--){if(W.pop(),m[Y0].type==="brace")break;if(m[Y0].type!=="dots")$0.unshift(m[Y0].value)}e=PA8($0,X),_.backtrack=!0}if(Q0.comma!==!0&&Q0.dots!==!0){let m=_.output.slice(0,Q0.outputIndex),$0=_.tokens.slice(Q0.tokensIndex);Q0.value=Q0.output="\\{",v=e="\\}",_.output=m;for(let Y0 of $0)_.output+=Y0.output||Y0.value}t({type:"brace",value:v,output:e}),n("braces"),k.pop();continue}if(v==="|"){if(C.length>0)C[C.length-1].conditions++;t({type:"text",value:v});continue}if(v===","){let Q0=v,e=k[k.length-1];if(e&&S[S.length-1]==="braces")e.comma=!0,Q0="|";t({type:"comma",value:v,output:Q0});continue}if(v==="/"){if(T.type==="dot"&&_.index===_.start+1){_.start=_.index+1,_.consumed="",_.output="",W.pop(),T=Q;continue}t({type:"slash",value:v,output:A});continue}if(v==="."){if(_.braces>0&&T.type==="dot"){if(T.value===".")T.output=z;let Q0=k[k.length-1];T.type="dots",T.output+=v,T.value+=v,Q0.dots=!0;continue}if(_.braces+_.parens===0&&T.type!=="bos"&&T.type!=="slash"){t({type:"text",value:v,output:z});continue}t({type:"dot",value:v,output:z});continue}if(v==="?"){if(!(T&&T.value==="(")&&X.noextglob!==!0&&y()==="("&&y(2)!=="?"){s("qmark",v);continue}if(T&&T.type==="paren"){let e=y(),m=v;if(T.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(u()))m=`\\${v}`;t({type:"text",value:v,output:m});continue}if(X.dot!==!0&&(T.type==="slash"||T.type==="bos")){t({type:"qmark",value:v,output:E});continue}t({type:"qmark",value:v,output:O});continue}if(v==="!"){if(X.noextglob!==!0&&y()==="("){if(y(2)!=="?"||!/[!=<:]/.test(y(3))){s("negate",v);continue}}if(X.nonegate!==!0&&_.index===0){p();continue}}if(v==="+"){if(X.noextglob!==!0&&y()==="("&&y(2)!=="?"){s("plus",v);continue}if(T&&T.value==="("||X.regex===!1){t({type:"plus",value:v,output:V});continue}if(T&&(T.type==="bracket"||T.type==="paren"||T.type==="brace")||_.parens>0){t({type:"plus",value:v});continue}t({type:"plus",value:V});continue}if(v==="@"){if(X.noextglob!==!0&&y()==="("&&y(2)!=="?"){t({type:"at",extglob:!0,value:v,output:""});continue}t({type:"text",value:v});continue}if(v!=="*"){if(v==="$"||v==="^")v=`\\${v}`;let Q0=qA8.exec(u());if(Q0)v+=Q0[0],_.index+=Q0[0].length;t({type:"text",value:v});continue}if(T&&(T.type==="globstar"||T.star===!0)){T.type="star",T.star=!0,T.value+=v,T.output=P,_.backtrack=!0,_.globstar=!0,b(v);continue}let X0=u();if(X.noextglob!==!0&&/^\([^?]/.test(X0)){s("star",v);continue}if(T.type==="star"){if(X.noglobstar===!0){b(v);continue}let Q0=T.prev,e=Q0.prev,m=Q0.type==="slash"||Q0.type==="bos",$0=e&&(e.type==="star"||e.type==="globstar");if(X.bash===!0&&(!m||X0[0]&&X0[0]!=="/")){t({type:"star",value:v,output:""});continue}let Y0=_.braces>0&&(Q0.type==="comma"||Q0.type==="brace"),K0=C.length&&(Q0.type==="pipe"||Q0.type==="paren");if(!m&&Q0.type!=="paren"&&!Y0&&!K0){t({type:"star",value:v,output:""});continue}while(X0.slice(0,3)==="/**"){let A0=$[_.index+4];if(A0&&A0!=="/")break;X0=X0.slice(3),b("/**",3)}if(Q0.type==="bos"&&x()){T.type="globstar",T.value+=v,T.output=q(X),_.output=T.output,_.globstar=!0,b(v);continue}if(Q0.type==="slash"&&Q0.prev.type!=="bos"&&!$0&&x()){_.output=_.output.slice(0,-(Q0.output+T.output).length),Q0.output=`(?:${Q0.output}`,T.type="globstar",T.output=q(X)+(X.strictSlashes?")":"|$)"),T.value+=v,_.globstar=!0,_.output+=Q0.output+T.output,b(v);continue}if(Q0.type==="slash"&&Q0.prev.type!=="bos"&&X0[0]==="/"){let A0=X0[1]!==void 0?"|$":"";_.output=_.output.slice(0,-(Q0.output+T.output).length),Q0.output=`(?:${Q0.output}`,T.type="globstar",T.output=`${q(X)}${A}|${A}${A0})`,T.value+=v,_.output+=Q0.output+T.output,_.globstar=!0,b(v+d()),t({type:"slash",value:"/",output:""});continue}if(Q0.type==="bos"&&X0[0]==="/"){T.type="globstar",T.value+=v,T.output=`(?:^|${A}|${q(X)}${A})`,_.output=T.output,_.globstar=!0,b(v+d()),t({type:"slash",value:"/",output:""});continue}_.output=_.output.slice(0,-T.output.length),T.type="globstar",T.output=q(X),T.value+=v,_.output+=T.output,_.globstar=!0,b(v);continue}let a={type:"star",value:v,output:P};if(X.bash===!0){if(a.output=".*?",T.type==="bos"||T.type==="slash")a.output=w+a.output;t(a);continue}if(T&&(T.type==="bracket"||T.type==="paren")&&X.regex===!0){a.output=v,t(a);continue}if(_.index===_.start||T.type==="slash"||T.type==="dot"){if(T.type==="dot")_.output+=L,T.output+=L;else if(X.dot===!0)_.output+=B,T.output+=B;else _.output+=w,T.output+=w;if(y()!=="*")_.output+=F,T.output+=F}t(a)}while(_.brackets>0){if(X.strictBrackets===!0)throw SyntaxError(Mw("closing","]"));_.output=qW.escapeLast(_.output,"["),n("brackets")}while(_.parens>0){if(X.strictBrackets===!0)throw SyntaxError(Mw("closing",")"));_.output=qW.escapeLast(_.output,"("),n("parens")}while(_.braces>0){if(X.strictBrackets===!0)throw SyntaxError(Mw("closing","}"));_.output=qW.escapeLast(_.output,"{"),n("braces")}if(X.strictSlashes!==!0&&(T.type==="star"||T.type==="bracket"))t({type:"maybe_slash",value:"",output:`${A}?`});if(_.backtrack===!0){_.output="";for(let X0 of _.tokens)if(_.output+=X0.output!=null?X0.output:X0.value,X0.suffix)_.output+=X0.suffix}return _};qC0.fastpaths=($,Y)=>{let X={...Y},G=typeof X.maxLength==="number"?Math.min(w40,X.maxLength):w40,J=$.length;if(J>G)throw SyntaxError(`Input length: ${J}, exceeds maximum allowed length: ${G}`);$=Ad1[$]||$;let{DOT_LITERAL:Q,SLASH_LITERAL:W,ONE_CHAR:Z,DOTS_SLASH:K,NO_DOT:H,NO_DOTS:z,NO_DOTS_SLASH:V,STAR:A,START_ANCHOR:F}=Af.globChars(X.windows),N=X.dot?z:H,D=X.dot?V:H,L=X.capture?"":"?:",B={negated:!1,prefix:""},O=X.bash===!0?".*?":A;if(X.capture)O=`(${O})`;let E=(w)=>{if(w.noglobstar===!0)return O;return`(${L}(?:(?!${F}${w.dot?K:Q}).)*?)`},M=(w)=>{switch(w){case"*":return`${N}${Z}${O}`;case".*":return`${Q}${Z}${O}`;case"*.*":return`${N}${O}${Q}${Z}${O}`;case"*/*":return`${N}${O}${W}${Z}${D}${O}`;case"**":return N+E(X);case"**/*":return`(?:${N}${E(X)}${W})?${D}${Z}${O}`;case"**/*.*":return`(?:${N}${E(X)}${W})?${D}${O}${Q}${Z}${O}`;case"**/.*":return`(?:${N}${E(X)}${W})?${Q}${Z}${O}`;default:{let I=/^(.*?)\.(\w+)$/.exec(w);if(!I)return;let P=M(I[1]);if(!P)return;return P+Q+I[2]}}},R=qW.removePrefix($,B),q=M(R);if(q&&X.strictSlashes!==!0)q+=`${W}?`;return q};Nd1.exports=qC0});var Ed1=o((Vc5,Od1)=>{var SA8=Vd1(),IC0=Ld1(),Bd1=zf(),kA8=Hf(),vA8=($)=>$&&typeof $==="object"&&!Array.isArray($),R$=($,Y,X=!1)=>{if(Array.isArray($)){let z=$.map((A)=>R$(A,Y,X));return(A)=>{for(let F of z){let N=F(A);if(N)return N}return!1}}let G=vA8($)&&$.tokens&&$.input;if($===""||typeof $!=="string"&&!G)throw TypeError("Expected pattern to be a non-empty string");let J=Y||{},Q=J.windows,W=G?R$.compileRe($,Y):R$.makeRe($,Y,!1,!0),Z=W.state;delete W.state;let K=()=>!1;if(J.ignore){let z={...Y,ignore:null,onMatch:null,onResult:null};K=R$(J.ignore,z,X)}let H=(z,V=!1)=>{let{isMatch:A,match:F,output:N}=R$.test(z,W,Y,{glob:$,posix:Q}),D={glob:$,state:Z,regex:W,posix:Q,input:z,output:N,match:F,isMatch:A};if(typeof J.onResult==="function")J.onResult(D);if(A===!1)return D.isMatch=!1,V?D:!1;if(K(z)){if(typeof J.onIgnore==="function")J.onIgnore(D);return D.isMatch=!1,V?D:!1}if(typeof J.onMatch==="function")J.onMatch(D);return V?D:!0};if(X)H.state=Z;return H};R$.test=($,Y,X,{glob:G,posix:J}={})=>{if(typeof $!=="string")throw TypeError("Expected input to be a string");if($==="")return{isMatch:!1,output:""};let Q=X||{},W=Q.format||(J?Bd1.toPosixSlashes:null),Z=$===G,K=Z&&W?W($):$;if(Z===!1)K=W?W($):$,Z=K===G;if(Z===!1||Q.capture===!0)if(Q.matchBase===!0||Q.basename===!0)Z=R$.matchBase($,Y,X,J);else Z=Y.exec(K);return{isMatch:Boolean(Z),match:Z,output:K}};R$.matchBase=($,Y,X)=>{return(Y instanceof RegExp?Y:R$.makeRe(Y,X)).test(Bd1.basename($))};R$.isMatch=($,Y,X)=>R$(Y,X)($);R$.parse=($,Y)=>{if(Array.isArray($))return $.map((X)=>R$.parse(X,Y));return IC0($,{...Y,fastpaths:!1})};R$.scan=($,Y)=>SA8($,Y);R$.compileRe=($,Y,X=!1,G=!1)=>{if(X===!0)return $.output;let J=Y||{},Q=J.contains?"":"^",W=J.contains?"":"$",Z=`${Q}(?:${$.output})${W}`;if($&&$.negated===!0)Z=`^(?!${Z}).*$`;let K=R$.toRegex(Z,Y);if(G===!0)K.state=$;return K};R$.makeRe=($,Y={},X=!1,G=!1)=>{if(!$||typeof $!=="string")throw TypeError("Expected a non-empty string");let J={negated:!1,fastpaths:!0};if(Y.fastpaths!==!1&&($[0]==="."||$[0]==="*"))J.output=IC0.fastpaths($,Y);if(!J.output)J=IC0($,Y);return R$.compileRe(J,Y,X,G)};R$.toRegex=($,Y)=>{try{let X=Y||{};return new RegExp($,X.flags||(X.nocase?"i":""))}catch(X){if(Y&&Y.debug===!0)throw X;return/$^/}};R$.constants=kA8;Od1.exports=R$});var Id1=o((Ac5,qd1)=>{var Md1=Ed1(),xA8=zf();function Rd1($,Y,X=!1){if(Y&&(Y.windows===null||Y.windows===void 0))Y={...Y,windows:xA8.isWindows()};return Md1($,Y,X)}Object.assign(Rd1,Md1);qd1.exports=Rd1});var Ff=o((Fc5,wd1)=>{var yA8=Object.prototype.toString;wd1.exports=function(Y){if(Y===void 0)return"undefined";if(Y===null)return"null";var X=typeof Y;if(X==="boolean")return"boolean";if(X==="string")return"string";if(X==="number")return"number";if(X==="symbol")return"symbol";if(X==="function")return mA8(Y)?"generatorfunction":"function";if(bA8(Y))return"array";if(dA8(Y))return"buffer";if(pA8(Y))return"arguments";if(fA8(Y))return"date";if(hA8(Y))return"error";if(gA8(Y))return"regexp";switch(Pd1(Y)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(uA8(Y))return"generator";switch(X=yA8.call(Y),X){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return X.slice(8,-1).toLowerCase().replace(/\s/g,"")};function Pd1($){return typeof $.constructor==="function"?$.constructor.name:null}function bA8($){if(Array.isArray)return Array.isArray($);return $ instanceof Array}function hA8($){return $ instanceof Error||typeof $.message==="string"&&$.constructor&&typeof $.constructor.stackTraceLimit==="number"}function fA8($){if($ instanceof Date)return!0;return typeof $.toDateString==="function"&&typeof $.getDate==="function"&&typeof $.setDate==="function"}function gA8($){if($ instanceof RegExp)return!0;return typeof $.flags==="string"&&typeof $.ignoreCase==="boolean"&&typeof $.multiline==="boolean"&&typeof $.global==="boolean"}function mA8($,Y){return Pd1($)==="GeneratorFunction"}function uA8($){return typeof $.throw==="function"&&typeof $.return==="function"&&typeof $.next==="function"}function pA8($){try{if(typeof $.length==="number"&&typeof $.callee==="function")return!0}catch(Y){if(Y.message.indexOf("callee")!==-1)return!0}return!1}function dA8($){if($.constructor&&typeof $.constructor.isBuffer==="function")return $.constructor.isBuffer($);return!1}});var jd1=o((Dc5,_d1)=>{/*!
 * is-extendable <https://github.com/jonschlinkert/is-extendable>
 *
 * Copyright (c) 2015, Jon Schlinkert.
 * Licensed under the MIT License.
 */_d1.exports=function(Y){return typeof Y<"u"&&Y!==null&&(typeof Y==="object"||typeof Y==="function")}});var Sd1=o((Nc5,Cd1)=>{var Td1=jd1();Cd1.exports=function(Y){if(!Td1(Y))Y={};var X=arguments.length;for(var G=1;G<X;G++){var J=arguments[G];if(Td1(J))cA8(Y,J)}return Y};function cA8($,Y){for(var X in Y)if(lA8(Y,X))$[X]=Y[X]}function lA8($,Y){return Object.prototype.hasOwnProperty.call($,Y)}});var xd1=o((Lc5,vd1)=>{var iA8=Ff(),nA8=Sd1();vd1.exports=function($,Y){if(typeof Y==="function")Y={parse:Y};var X=aA8($),G={section_delimiter:"---",parse:oA8},J=nA8({},G,Y),Q=J.section_delimiter,W=X.content.split(/\r?\n/),Z=null,K=kd1(),H=[],z=[];function V(B){X.content=B,Z=[],H=[]}function A(B){if(z.length)K.key=sA8(z[0],Q),K.content=B,J.parse(K,Z),Z.push(K),K=kd1(),H=[],z=[]}for(var F=0;F<W.length;F++){var N=W[F],D=z.length,L=N.trim();if(rA8(L,Q)){if(L.length===3&&F!==0){if(D===0||D===2){H.push(N);continue}z.push(L),K.data=H.join(`
`),H=[];continue}if(Z===null)V(H.join(`
`));if(D===2)A(H.join(`
`));z.push(L);continue}H.push(N)}if(Z===null)V(H.join(`
`));else A(H.join(`
`));return X.sections=Z,X};function rA8($,Y){if($.slice(0,Y.length)!==Y)return!1;if($.charAt(Y.length+1)===Y.slice(-1))return!1;return!0}function aA8($){if(iA8($)!=="object")$={content:$};if(typeof $.content!=="string"&&!tA8($.content))throw TypeError("expected a buffer or string");return $.content=$.content.toString(),$.sections=[],$}function sA8($,Y){return $?$.slice(Y.length).trim():""}function kd1(){return{key:"",data:"",content:""}}function oA8($){return $}function tA8($){if($&&$.constructor&&typeof $.constructor.isBuffer==="function")return $.constructor.isBuffer($);return!1}});var OO=o((JF8,BO)=>{function yd1($){return typeof $>"u"||$===null}function eA8($){return typeof $==="object"&&$!==null}function $F8($){if(Array.isArray($))return $;else if(yd1($))return[];return[$]}function YF8($,Y){var X,G,J,Q;if(Y){Q=Object.keys(Y);for(X=0,G=Q.length;X<G;X+=1)J=Q[X],$[J]=Y[J]}return $}function XF8($,Y){var X="",G;for(G=0;G<Y;G+=1)X+=$;return X}function GF8($){return $===0&&Number.NEGATIVE_INFINITY===1/$}JF8.isNothing=yd1;JF8.isObject=eA8;JF8.toArray=$F8;JF8.repeat=XF8;JF8.isNegativeZero=GF8;JF8.extend=YF8});var Rw=o((Bc5,bd1)=>{function Df($,Y){if(Error.call(this),this.name="YAMLException",this.reason=$,this.mark=Y,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}Df.prototype=Object.create(Error.prototype);Df.prototype.constructor=Df;Df.prototype.toString=function(Y){var X=this.name+": ";if(X+=this.reason||"(unknown reason)",!Y&&this.mark)X+=" "+this.mark.toString();return X};bd1.exports=Df});var gd1=o((Oc5,fd1)=>{var hd1=OO();function PC0($,Y,X,G,J){this.name=$,this.buffer=Y,this.position=X,this.line=G,this.column=J}PC0.prototype.getSnippet=function(Y,X){var G,J,Q,W,Z;if(!this.buffer)return null;Y=Y||4,X=X||75,G="",J=this.position;while(J>0&&`\x00\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(J-1))===-1)if(J-=1,this.position-J>X/2-1){G=" ... ",J+=5;break}Q="",W=this.position;while(W<this.buffer.length&&`\x00\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(W))===-1)if(W+=1,W-this.position>X/2-1){Q=" ... ",W-=5;break}return Z=this.buffer.slice(J,W),hd1.repeat(" ",Y)+G+Z+Q+`
`+hd1.repeat(" ",Y+this.position-J+G.length)+"^"};PC0.prototype.toString=function(Y){var X,G="";if(this.name)G+='in "'+this.name+'" ';if(G+="at line "+(this.line+1)+", column "+(this.column+1),!Y){if(X=this.getSnippet(),X)G+=`:
`+X}return G};fd1.exports=PC0});var HY=o((Ec5,ud1)=>{var md1=Rw(),zF8=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],VF8=["scalar","sequence","mapping"];function AF8($){var Y={};if($!==null)Object.keys($).forEach(function(X){$[X].forEach(function(G){Y[String(G)]=X})});return Y}function FF8($,Y){if(Y=Y||{},Object.keys(Y).forEach(function(X){if(zF8.indexOf(X)===-1)throw new md1('Unknown option "'+X+'" is met in definition of "'+$+'" YAML type.')}),this.tag=$,this.kind=Y.kind||null,this.resolve=Y.resolve||function(){return!0},this.construct=Y.construct||function(X){return X},this.instanceOf=Y.instanceOf||null,this.predicate=Y.predicate||null,this.represent=Y.represent||null,this.defaultStyle=Y.defaultStyle||null,this.styleAliases=AF8(Y.styleAliases||null),VF8.indexOf(this.kind)===-1)throw new md1('Unknown kind "'+this.kind+'" is specified for "'+$+'" YAML type.')}ud1.exports=FF8});var EO=o((Mc5,dd1)=>{var pd1=OO(),_40=Rw(),DF8=HY();function wC0($,Y,X){var G=[];return $.include.forEach(function(J){X=wC0(J,Y,X)}),$[Y].forEach(function(J){X.forEach(function(Q,W){if(Q.tag===J.tag&&Q.kind===J.kind)G.push(W)}),X.push(J)}),X.filter(function(J,Q){return G.indexOf(Q)===-1})}function NF8(){var $={scalar:{},sequence:{},mapping:{},fallback:{}},Y,X;function G(J){$[J.kind][J.tag]=$.fallback[J.tag]=J}for(Y=0,X=arguments.length;Y<X;Y+=1)arguments[Y].forEach(G);return $}function qw($){this.include=$.include||[],this.implicit=$.implicit||[],this.explicit=$.explicit||[],this.implicit.forEach(function(Y){if(Y.loadKind&&Y.loadKind!=="scalar")throw new _40("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=wC0(this,"implicit",[]),this.compiledExplicit=wC0(this,"explicit",[]),this.compiledTypeMap=NF8(this.compiledImplicit,this.compiledExplicit)}qw.DEFAULT=null;qw.create=function(){var Y,X;switch(arguments.length){case 1:Y=qw.DEFAULT,X=arguments[0];break;case 2:Y=arguments[0],X=arguments[1];break;default:throw new _40("Wrong number of arguments for Schema.create function")}if(Y=pd1.toArray(Y),X=pd1.toArray(X),!Y.every(function(G){return G instanceof qw}))throw new _40("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!X.every(function(G){return G instanceof DF8}))throw new _40("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new qw({include:Y,explicit:X})};dd1.exports=qw});var ld1=o((Rc5,cd1)=>{var LF8=HY();cd1.exports=new LF8("tag:yaml.org,2002:str",{kind:"scalar",construct:function($){return $!==null?$:""}})});var nd1=o((qc5,id1)=>{var BF8=HY();id1.exports=new BF8("tag:yaml.org,2002:seq",{kind:"sequence",construct:function($){return $!==null?$:[]}})});var ad1=o((Ic5,rd1)=>{var OF8=HY();rd1.exports=new OF8("tag:yaml.org,2002:map",{kind:"mapping",construct:function($){return $!==null?$:{}}})});var j40=o((Pc5,sd1)=>{var EF8=EO();sd1.exports=new EF8({explicit:[ld1(),nd1(),ad1()]})});var td1=o((wc5,od1)=>{var MF8=HY();function RF8($){if($===null)return!0;var Y=$.length;return Y===1&&$==="~"||Y===4&&($==="null"||$==="Null"||$==="NULL")}function qF8(){return null}function IF8($){return $===null}od1.exports=new MF8("tag:yaml.org,2002:null",{kind:"scalar",resolve:RF8,construct:qF8,predicate:IF8,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var $c1=o((_c5,ed1)=>{var PF8=HY();function wF8($){if($===null)return!1;var Y=$.length;return Y===4&&($==="true"||$==="True"||$==="TRUE")||Y===5&&($==="false"||$==="False"||$==="FALSE")}function _F8($){return $==="true"||$==="True"||$==="TRUE"}function jF8($){return Object.prototype.toString.call($)==="[object Boolean]"}ed1.exports=new PF8("tag:yaml.org,2002:bool",{kind:"scalar",resolve:wF8,construct:_F8,predicate:jF8,represent:{lowercase:function($){return $?"true":"false"},uppercase:function($){return $?"TRUE":"FALSE"},camelcase:function($){return $?"True":"False"}},defaultStyle:"lowercase"})});var Xc1=o((jc5,Yc1)=>{var TF8=OO(),CF8=HY();function SF8($){return 48<=$&&$<=57||65<=$&&$<=70||97<=$&&$<=102}function kF8($){return 48<=$&&$<=55}function vF8($){return 48<=$&&$<=57}function xF8($){if($===null)return!1;var Y=$.length,X=0,G=!1,J;if(!Y)return!1;if(J=$[X],J==="-"||J==="+")J=$[++X];if(J==="0"){if(X+1===Y)return!0;if(J=$[++X],J==="b"){X++;for(;X<Y;X++){if(J=$[X],J==="_")continue;if(J!=="0"&&J!=="1")return!1;G=!0}return G&&J!=="_"}if(J==="x"){X++;for(;X<Y;X++){if(J=$[X],J==="_")continue;if(!SF8($.charCodeAt(X)))return!1;G=!0}return G&&J!=="_"}for(;X<Y;X++){if(J=$[X],J==="_")continue;if(!kF8($.charCodeAt(X)))return!1;G=!0}return G&&J!=="_"}if(J==="_")return!1;for(;X<Y;X++){if(J=$[X],J==="_")continue;if(J===":")break;if(!vF8($.charCodeAt(X)))return!1;G=!0}if(!G||J==="_")return!1;if(J!==":")return!0;return/^(:[0-5]?[0-9])+$/.test($.slice(X))}function yF8($){var Y=$,X=1,G,J,Q=[];if(Y.indexOf("_")!==-1)Y=Y.replace(/_/g,"");if(G=Y[0],G==="-"||G==="+"){if(G==="-")X=-1;Y=Y.slice(1),G=Y[0]}if(Y==="0")return 0;if(G==="0"){if(Y[1]==="b")return X*parseInt(Y.slice(2),2);if(Y[1]==="x")return X*parseInt(Y,16);return X*parseInt(Y,8)}if(Y.indexOf(":")!==-1)return Y.split(":").forEach(function(W){Q.unshift(parseInt(W,10))}),Y=0,J=1,Q.forEach(function(W){Y+=W*J,J*=60}),X*Y;return X*parseInt(Y,10)}function bF8($){return Object.prototype.toString.call($)==="[object Number]"&&($%1===0&&!TF8.isNegativeZero($))}Yc1.exports=new CF8("tag:yaml.org,2002:int",{kind:"scalar",resolve:xF8,construct:yF8,predicate:bF8,represent:{binary:function($){return $>=0?"0b"+$.toString(2):"-0b"+$.toString(2).slice(1)},octal:function($){return $>=0?"0"+$.toString(8):"-0"+$.toString(8).slice(1)},decimal:function($){return $.toString(10)},hexadecimal:function($){return $>=0?"0x"+$.toString(16).toUpperCase():"-0x"+$.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var Qc1=o((Tc5,Jc1)=>{var Gc1=OO(),hF8=HY(),fF8=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function gF8($){if($===null)return!1;if(!fF8.test($)||$[$.length-1]==="_")return!1;return!0}function mF8($){var Y,X,G,J;if(Y=$.replace(/_/g,"").toLowerCase(),X=Y[0]==="-"?-1:1,J=[],"+-".indexOf(Y[0])>=0)Y=Y.slice(1);if(Y===".inf")return X===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(Y===".nan")return NaN;else if(Y.indexOf(":")>=0)return Y.split(":").forEach(function(Q){J.unshift(parseFloat(Q,10))}),Y=0,G=1,J.forEach(function(Q){Y+=Q*G,G*=60}),X*Y;return X*parseFloat(Y,10)}var uF8=/^[-+]?[0-9]+e/;function pF8($,Y){var X;if(isNaN($))switch(Y){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===$)switch(Y){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===$)switch(Y){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Gc1.isNegativeZero($))return"-0.0";return X=$.toString(10),uF8.test(X)?X.replace("e",".e"):X}function dF8($){return Object.prototype.toString.call($)==="[object Number]"&&($%1!==0||Gc1.isNegativeZero($))}Jc1.exports=new hF8("tag:yaml.org,2002:float",{kind:"scalar",resolve:gF8,construct:mF8,predicate:dF8,represent:pF8,defaultStyle:"lowercase"})});var _C0=o((Cc5,Wc1)=>{var cF8=EO();Wc1.exports=new cF8({include:[j40()],implicit:[td1(),$c1(),Xc1(),Qc1()]})});var jC0=o((Sc5,Zc1)=>{var lF8=EO();Zc1.exports=new lF8({include:[_C0()]})});var zc1=o((kc5,Hc1)=>{var iF8=HY(),Kc1=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Uc1=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function nF8($){if($===null)return!1;if(Kc1.exec($)!==null)return!0;if(Uc1.exec($)!==null)return!0;return!1}function rF8($){var Y,X,G,J,Q,W,Z,K=0,H=null,z,V,A;if(Y=Kc1.exec($),Y===null)Y=Uc1.exec($);if(Y===null)throw Error("Date resolve error");if(X=+Y[1],G=+Y[2]-1,J=+Y[3],!Y[4])return new Date(Date.UTC(X,G,J));if(Q=+Y[4],W=+Y[5],Z=+Y[6],Y[7]){K=Y[7].slice(0,3);while(K.length<3)K+="0";K=+K}if(Y[9]){if(z=+Y[10],V=+(Y[11]||0),H=(z*60+V)*60000,Y[9]==="-")H=-H}if(A=new Date(Date.UTC(X,G,J,Q,W,Z,K)),H)A.setTime(A.getTime()-H);return A}function aF8($){return $.toISOString()}Hc1.exports=new iF8("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:nF8,construct:rF8,instanceOf:Date,represent:aF8})});var Ac1=o((vc5,Vc1)=>{var sF8=HY();function oF8($){return $==="<<"||$===null}Vc1.exports=new sF8("tag:yaml.org,2002:merge",{kind:"scalar",resolve:oF8})});var Dc1=o((xc5,Fc1)=>{var MO;try{TC0=L0,MO=TC0("buffer").Buffer}catch($){}var TC0,tF8=HY(),CC0=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function eF8($){if($===null)return!1;var Y,X,G=0,J=$.length,Q=CC0;for(X=0;X<J;X++){if(Y=Q.indexOf($.charAt(X)),Y>64)continue;if(Y<0)return!1;G+=6}return G%8===0}function $D8($){var Y,X,G=$.replace(/[\r\n=]/g,""),J=G.length,Q=CC0,W=0,Z=[];for(Y=0;Y<J;Y++){if(Y%4===0&&Y)Z.push(W>>16&255),Z.push(W>>8&255),Z.push(W&255);W=W<<6|Q.indexOf(G.charAt(Y))}if(X=J%4*6,X===0)Z.push(W>>16&255),Z.push(W>>8&255),Z.push(W&255);else if(X===18)Z.push(W>>10&255),Z.push(W>>2&255);else if(X===12)Z.push(W>>4&255);if(MO)return MO.from?MO.from(Z):new MO(Z);return Z}function YD8($){var Y="",X=0,G,J,Q=$.length,W=CC0;for(G=0;G<Q;G++){if(G%3===0&&G)Y+=W[X>>18&63],Y+=W[X>>12&63],Y+=W[X>>6&63],Y+=W[X&63];X=(X<<8)+$[G]}if(J=Q%3,J===0)Y+=W[X>>18&63],Y+=W[X>>12&63],Y+=W[X>>6&63],Y+=W[X&63];else if(J===2)Y+=W[X>>10&63],Y+=W[X>>4&63],Y+=W[X<<2&63],Y+=W[64];else if(J===1)Y+=W[X>>2&63],Y+=W[X<<4&63],Y+=W[64],Y+=W[64];return Y}function XD8($){return MO&&MO.isBuffer($)}Fc1.exports=new tF8("tag:yaml.org,2002:binary",{kind:"scalar",resolve:eF8,construct:$D8,predicate:XD8,represent:YD8})});var Lc1=o((bc5,Nc1)=>{var GD8=HY(),JD8=Object.prototype.hasOwnProperty,QD8=Object.prototype.toString;function WD8($){if($===null)return!0;var Y=[],X,G,J,Q,W,Z=$;for(X=0,G=Z.length;X<G;X+=1){if(J=Z[X],W=!1,QD8.call(J)!=="[object Object]")return!1;for(Q in J)if(JD8.call(J,Q))if(!W)W=!0;else return!1;if(!W)return!1;if(Y.indexOf(Q)===-1)Y.push(Q);else return!1}return!0}function ZD8($){return $!==null?$:[]}Nc1.exports=new GD8("tag:yaml.org,2002:omap",{kind:"sequence",resolve:WD8,construct:ZD8})});var Oc1=o((hc5,Bc1)=>{var KD8=HY(),UD8=Object.prototype.toString;function HD8($){if($===null)return!0;var Y,X,G,J,Q,W=$;Q=Array(W.length);for(Y=0,X=W.length;Y<X;Y+=1){if(G=W[Y],UD8.call(G)!=="[object Object]")return!1;if(J=Object.keys(G),J.length!==1)return!1;Q[Y]=[J[0],G[J[0]]]}return!0}function zD8($){if($===null)return[];var Y,X,G,J,Q,W=$;Q=Array(W.length);for(Y=0,X=W.length;Y<X;Y+=1)G=W[Y],J=Object.keys(G),Q[Y]=[J[0],G[J[0]]];return Q}Bc1.exports=new KD8("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:HD8,construct:zD8})});var Mc1=o((fc5,Ec1)=>{var VD8=HY(),AD8=Object.prototype.hasOwnProperty;function FD8($){if($===null)return!0;var Y,X=$;for(Y in X)if(AD8.call(X,Y)){if(X[Y]!==null)return!1}return!0}function DD8($){return $!==null?$:{}}Ec1.exports=new VD8("tag:yaml.org,2002:set",{kind:"mapping",resolve:FD8,construct:DD8})});var Iw=o((gc5,Rc1)=>{var ND8=EO();Rc1.exports=new ND8({include:[jC0()],implicit:[zc1(),Ac1()],explicit:[Dc1(),Lc1(),Oc1(),Mc1()]})});var Ic1=o((mc5,qc1)=>{var LD8=HY();function BD8(){return!0}function OD8(){return}function ED8(){return""}function MD8($){return typeof $>"u"}qc1.exports=new LD8("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:BD8,construct:OD8,predicate:MD8,represent:ED8})});var wc1=o((uc5,Pc1)=>{var RD8=HY();function qD8($){if($===null)return!1;if($.length===0)return!1;var Y=$,X=/\/([gim]*)$/.exec($),G="";if(Y[0]==="/"){if(X)G=X[1];if(G.length>3)return!1;if(Y[Y.length-G.length-1]!=="/")return!1}return!0}function ID8($){var Y=$,X=/\/([gim]*)$/.exec($),G="";if(Y[0]==="/"){if(X)G=X[1];Y=Y.slice(1,Y.length-G.length-1)}return new RegExp(Y,G)}function PD8($){var Y="/"+$.source+"/";if($.global)Y+="g";if($.multiline)Y+="m";if($.ignoreCase)Y+="i";return Y}function wD8($){return Object.prototype.toString.call($)==="[object RegExp]"}Pc1.exports=new RD8("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:qD8,construct:ID8,predicate:wD8,represent:PD8})});var jc1=o((pc5,_c1)=>{var T40;try{SC0=L0,T40=SC0("esprima")}catch($){if(typeof window<"u")T40=window.esprima}var SC0,_D8=HY();function jD8($){if($===null)return!1;try{var Y="("+$+")",X=T40.parse(Y,{range:!0});if(X.type!=="Program"||X.body.length!==1||X.body[0].type!=="ExpressionStatement"||X.body[0].expression.type!=="ArrowFunctionExpression"&&X.body[0].expression.type!=="FunctionExpression")return!1;return!0}catch(G){return!1}}function TD8($){var Y="("+$+")",X=T40.parse(Y,{range:!0}),G=[],J;if(X.type!=="Program"||X.body.length!==1||X.body[0].type!=="ExpressionStatement"||X.body[0].expression.type!=="ArrowFunctionExpression"&&X.body[0].expression.type!=="FunctionExpression")throw Error("Failed to resolve function");if(X.body[0].expression.params.forEach(function(Q){G.push(Q.name)}),J=X.body[0].expression.body.range,X.body[0].expression.body.type==="BlockStatement")return Function(G,Y.slice(J[0]+1,J[1]-1));return Function(G,"return "+Y.slice(J[0],J[1]))}function CD8($){return $.toString()}function SD8($){return Object.prototype.toString.call($)==="[object Function]"}_c1.exports=new _D8("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:jD8,construct:TD8,predicate:SD8,represent:CD8})});var Nf=o((cc5,Cc1)=>{var Tc1=EO();Cc1.exports=Tc1.DEFAULT=new Tc1({include:[Iw()],explicit:[Ic1(),wc1(),jc1()]})});var sc1=o((YN8,Lf)=>{var xz=OO(),hc1=Rw(),kD8=gd1(),fc1=Iw(),vD8=Nf(),lF=Object.prototype.hasOwnProperty,C40=1,gc1=2,mc1=3,S40=4,kC0=1,xD8=2,Sc1=3,yD8=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,bD8=/[\x85\u2028\u2029]/,hD8=/[,\[\]\{\}]/,uc1=/^(?:!|!!|![a-z\-]+!)$/i,pc1=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function kc1($){return Object.prototype.toString.call($)}function OU($){return $===10||$===13}function RO($){return $===9||$===32}function AQ($){return $===9||$===32||$===10||$===13}function Pw($){return $===44||$===91||$===93||$===123||$===125}function fD8($){var Y;if(48<=$&&$<=57)return $-48;if(Y=$|32,97<=Y&&Y<=102)return Y-97+10;return-1}function gD8($){if($===120)return 2;if($===117)return 4;if($===85)return 8;return 0}function mD8($){if(48<=$&&$<=57)return $-48;return-1}function vc1($){return $===48?"\x00":$===97?"\x07":$===98?"\b":$===116?"\t":$===9?"\t":$===110?`
`:$===118?"\v":$===102?"\f":$===114?"\r":$===101?"\x1B":$===32?" ":$===34?'"':$===47?"/":$===92?"\\":$===78?"\x85":$===95?"\xA0":$===76?"\u2028":$===80?"\u2029":""}function uD8($){if($<=65535)return String.fromCharCode($);return String.fromCharCode(($-65536>>10)+55296,($-65536&1023)+56320)}function dc1($,Y,X){if(Y==="__proto__")Object.defineProperty($,Y,{configurable:!0,enumerable:!0,writable:!0,value:X});else $[Y]=X}var cc1=Array(256),lc1=Array(256);for(dF=0;dF<256;dF++)cc1[dF]=vc1(dF)?1:0,lc1[dF]=vc1(dF);var dF;function pD8($,Y){this.input=$,this.filename=Y.filename||null,this.schema=Y.schema||vD8,this.onWarning=Y.onWarning||null,this.legacy=Y.legacy||!1,this.json=Y.json||!1,this.listener=Y.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=$.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function ic1($,Y){return new hc1(Y,new kD8($.filename,$.input,$.position,$.line,$.position-$.lineStart))}function s4($,Y){throw ic1($,Y)}function k40($,Y){if($.onWarning)$.onWarning.call(null,ic1($,Y))}var xc1={YAML:function(Y,X,G){var J,Q,W;if(Y.version!==null)s4(Y,"duplication of %YAML directive");if(G.length!==1)s4(Y,"YAML directive accepts exactly one argument");if(J=/^([0-9]+)\.([0-9]+)$/.exec(G[0]),J===null)s4(Y,"ill-formed argument of the YAML directive");if(Q=parseInt(J[1],10),W=parseInt(J[2],10),Q!==1)s4(Y,"unacceptable YAML version of the document");if(Y.version=G[0],Y.checkLineBreaks=W<2,W!==1&&W!==2)k40(Y,"unsupported YAML version of the document")},TAG:function(Y,X,G){var J,Q;if(G.length!==2)s4(Y,"TAG directive accepts exactly two arguments");if(J=G[0],Q=G[1],!uc1.test(J))s4(Y,"ill-formed tag handle (first argument) of the TAG directive");if(lF.call(Y.tagMap,J))s4(Y,'there is a previously declared suffix for "'+J+'" tag handle');if(!pc1.test(Q))s4(Y,"ill-formed tag prefix (second argument) of the TAG directive");Y.tagMap[J]=Q}};function cF($,Y,X,G){var J,Q,W,Z;if(Y<X){if(Z=$.input.slice(Y,X),G){for(J=0,Q=Z.length;J<Q;J+=1)if(W=Z.charCodeAt(J),!(W===9||32<=W&&W<=1114111))s4($,"expected valid JSON character")}else if(yD8.test(Z))s4($,"the stream contains non-printable characters");$.result+=Z}}function yc1($,Y,X,G){var J,Q,W,Z;if(!xz.isObject(X))s4($,"cannot merge mappings; the provided source object is unacceptable");J=Object.keys(X);for(W=0,Z=J.length;W<Z;W+=1)if(Q=J[W],!lF.call(Y,Q))dc1(Y,Q,X[Q]),G[Q]=!0}function ww($,Y,X,G,J,Q,W,Z){var K,H;if(Array.isArray(J)){J=Array.prototype.slice.call(J);for(K=0,H=J.length;K<H;K+=1){if(Array.isArray(J[K]))s4($,"nested arrays are not supported inside keys");if(typeof J==="object"&&kc1(J[K])==="[object Object]")J[K]="[object Object]"}}if(typeof J==="object"&&kc1(J)==="[object Object]")J="[object Object]";if(J=String(J),Y===null)Y={};if(G==="tag:yaml.org,2002:merge")if(Array.isArray(Q))for(K=0,H=Q.length;K<H;K+=1)yc1($,Y,Q[K],X);else yc1($,Y,Q,X);else{if(!$.json&&!lF.call(X,J)&&lF.call(Y,J))$.line=W||$.line,$.position=Z||$.position,s4($,"duplicated mapping key");dc1(Y,J,Q),delete X[J]}return Y}function vC0($){var Y=$.input.charCodeAt($.position);if(Y===10)$.position++;else if(Y===13){if($.position++,$.input.charCodeAt($.position)===10)$.position++}else s4($,"a line break is expected");$.line+=1,$.lineStart=$.position}function h$($,Y,X){var G=0,J=$.input.charCodeAt($.position);while(J!==0){while(RO(J))J=$.input.charCodeAt(++$.position);if(Y&&J===35)do J=$.input.charCodeAt(++$.position);while(J!==10&&J!==13&&J!==0);if(OU(J)){vC0($),J=$.input.charCodeAt($.position),G++,$.lineIndent=0;while(J===32)$.lineIndent++,J=$.input.charCodeAt(++$.position)}else break}if(X!==-1&&G!==0&&$.lineIndent<X)k40($,"deficient indentation");return G}function v40($){var Y=$.position,X;if(X=$.input.charCodeAt(Y),(X===45||X===46)&&X===$.input.charCodeAt(Y+1)&&X===$.input.charCodeAt(Y+2)){if(Y+=3,X=$.input.charCodeAt(Y),X===0||AQ(X))return!0}return!1}function xC0($,Y){if(Y===1)$.result+=" ";else if(Y>1)$.result+=xz.repeat(`
`,Y-1)}function dD8($,Y,X){var G,J,Q,W,Z,K,H,z,V=$.kind,A=$.result,F;if(F=$.input.charCodeAt($.position),AQ(F)||Pw(F)||F===35||F===38||F===42||F===33||F===124||F===62||F===39||F===34||F===37||F===64||F===96)return!1;if(F===63||F===45){if(J=$.input.charCodeAt($.position+1),AQ(J)||X&&Pw(J))return!1}$.kind="scalar",$.result="",Q=W=$.position,Z=!1;while(F!==0){if(F===58){if(J=$.input.charCodeAt($.position+1),AQ(J)||X&&Pw(J))break}else if(F===35){if(G=$.input.charCodeAt($.position-1),AQ(G))break}else if($.position===$.lineStart&&v40($)||X&&Pw(F))break;else if(OU(F))if(K=$.line,H=$.lineStart,z=$.lineIndent,h$($,!1,-1),$.lineIndent>=Y){Z=!0,F=$.input.charCodeAt($.position);continue}else{$.position=W,$.line=K,$.lineStart=H,$.lineIndent=z;break}if(Z)cF($,Q,W,!1),xC0($,$.line-K),Q=W=$.position,Z=!1;if(!RO(F))W=$.position+1;F=$.input.charCodeAt(++$.position)}if(cF($,Q,W,!1),$.result)return!0;return $.kind=V,$.result=A,!1}function cD8($,Y){var X,G,J;if(X=$.input.charCodeAt($.position),X!==39)return!1;$.kind="scalar",$.result="",$.position++,G=J=$.position;while((X=$.input.charCodeAt($.position))!==0)if(X===39)if(cF($,G,$.position,!0),X=$.input.charCodeAt(++$.position),X===39)G=$.position,$.position++,J=$.position;else return!0;else if(OU(X))cF($,G,J,!0),xC0($,h$($,!1,Y)),G=J=$.position;else if($.position===$.lineStart&&v40($))s4($,"unexpected end of the document within a single quoted scalar");else $.position++,J=$.position;s4($,"unexpected end of the stream within a single quoted scalar")}function lD8($,Y){var X,G,J,Q,W,Z;if(Z=$.input.charCodeAt($.position),Z!==34)return!1;$.kind="scalar",$.result="",$.position++,X=G=$.position;while((Z=$.input.charCodeAt($.position))!==0)if(Z===34)return cF($,X,$.position,!0),$.position++,!0;else if(Z===92){if(cF($,X,$.position,!0),Z=$.input.charCodeAt(++$.position),OU(Z))h$($,!1,Y);else if(Z<256&&cc1[Z])$.result+=lc1[Z],$.position++;else if((W=gD8(Z))>0){J=W,Q=0;for(;J>0;J--)if(Z=$.input.charCodeAt(++$.position),(W=fD8(Z))>=0)Q=(Q<<4)+W;else s4($,"expected hexadecimal character");$.result+=uD8(Q),$.position++}else s4($,"unknown escape sequence");X=G=$.position}else if(OU(Z))cF($,X,G,!0),xC0($,h$($,!1,Y)),X=G=$.position;else if($.position===$.lineStart&&v40($))s4($,"unexpected end of the document within a double quoted scalar");else $.position++,G=$.position;s4($,"unexpected end of the stream within a double quoted scalar")}function iD8($,Y){var X=!0,G,J=$.tag,Q,W=$.anchor,Z,K,H,z,V,A={},F,N,D,L;if(L=$.input.charCodeAt($.position),L===91)K=93,V=!1,Q=[];else if(L===123)K=125,V=!0,Q={};else return!1;if($.anchor!==null)$.anchorMap[$.anchor]=Q;L=$.input.charCodeAt(++$.position);while(L!==0){if(h$($,!0,Y),L=$.input.charCodeAt($.position),L===K)return $.position++,$.tag=J,$.anchor=W,$.kind=V?"mapping":"sequence",$.result=Q,!0;else if(!X)s4($,"missed comma between flow collection entries");if(N=F=D=null,H=z=!1,L===63){if(Z=$.input.charCodeAt($.position+1),AQ(Z))H=z=!0,$.position++,h$($,!0,Y)}if(G=$.line,_w($,Y,C40,!1,!0),N=$.tag,F=$.result,h$($,!0,Y),L=$.input.charCodeAt($.position),(z||$.line===G)&&L===58)H=!0,L=$.input.charCodeAt(++$.position),h$($,!0,Y),_w($,Y,C40,!1,!0),D=$.result;if(V)ww($,Q,A,N,F,D);else if(H)Q.push(ww($,null,A,N,F,D));else Q.push(F);if(h$($,!0,Y),L=$.input.charCodeAt($.position),L===44)X=!0,L=$.input.charCodeAt(++$.position);else X=!1}s4($,"unexpected end of the stream within a flow collection")}function nD8($,Y){var X,G,J=kC0,Q=!1,W=!1,Z=Y,K=0,H=!1,z,V;if(V=$.input.charCodeAt($.position),V===124)G=!1;else if(V===62)G=!0;else return!1;$.kind="scalar",$.result="";while(V!==0)if(V=$.input.charCodeAt(++$.position),V===43||V===45)if(kC0===J)J=V===43?Sc1:xD8;else s4($,"repeat of a chomping mode identifier");else if((z=mD8(V))>=0)if(z===0)s4($,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!W)Z=Y+z-1,W=!0;else s4($,"repeat of an indentation width identifier");else break;if(RO(V)){do V=$.input.charCodeAt(++$.position);while(RO(V));if(V===35)do V=$.input.charCodeAt(++$.position);while(!OU(V)&&V!==0)}while(V!==0){vC0($),$.lineIndent=0,V=$.input.charCodeAt($.position);while((!W||$.lineIndent<Z)&&V===32)$.lineIndent++,V=$.input.charCodeAt(++$.position);if(!W&&$.lineIndent>Z)Z=$.lineIndent;if(OU(V)){K++;continue}if($.lineIndent<Z){if(J===Sc1)$.result+=xz.repeat(`
`,Q?1+K:K);else if(J===kC0){if(Q)$.result+=`
`}break}if(G)if(RO(V))H=!0,$.result+=xz.repeat(`
`,Q?1+K:K);else if(H)H=!1,$.result+=xz.repeat(`
`,K+1);else if(K===0){if(Q)$.result+=" "}else $.result+=xz.repeat(`
`,K);else $.result+=xz.repeat(`
`,Q?1+K:K);Q=!0,W=!0,K=0,X=$.position;while(!OU(V)&&V!==0)V=$.input.charCodeAt(++$.position);cF($,X,$.position,!1)}return!0}function bc1($,Y){var X,G=$.tag,J=$.anchor,Q=[],W,Z=!1,K;if($.anchor!==null)$.anchorMap[$.anchor]=Q;K=$.input.charCodeAt($.position);while(K!==0){if(K!==45)break;if(W=$.input.charCodeAt($.position+1),!AQ(W))break;if(Z=!0,$.position++,h$($,!0,-1)){if($.lineIndent<=Y){Q.push(null),K=$.input.charCodeAt($.position);continue}}if(X=$.line,_w($,Y,mc1,!1,!0),Q.push($.result),h$($,!0,-1),K=$.input.charCodeAt($.position),($.line===X||$.lineIndent>Y)&&K!==0)s4($,"bad indentation of a sequence entry");else if($.lineIndent<Y)break}if(Z)return $.tag=G,$.anchor=J,$.kind="sequence",$.result=Q,!0;return!1}function rD8($,Y,X){var G,J,Q,W,Z=$.tag,K=$.anchor,H={},z={},V=null,A=null,F=null,N=!1,D=!1,L;if($.anchor!==null)$.anchorMap[$.anchor]=H;L=$.input.charCodeAt($.position);while(L!==0){if(G=$.input.charCodeAt($.position+1),Q=$.line,W=$.position,(L===63||L===58)&&AQ(G)){if(L===63){if(N)ww($,H,z,V,A,null),V=A=F=null;D=!0,N=!0,J=!0}else if(N)N=!1,J=!0;else s4($,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");$.position+=1,L=G}else if(_w($,X,gc1,!1,!0))if($.line===Q){L=$.input.charCodeAt($.position);while(RO(L))L=$.input.charCodeAt(++$.position);if(L===58){if(L=$.input.charCodeAt(++$.position),!AQ(L))s4($,"a whitespace character is expected after the key-value separator within a block mapping");if(N)ww($,H,z,V,A,null),V=A=F=null;D=!0,N=!1,J=!1,V=$.tag,A=$.result}else if(D)s4($,"can not read an implicit mapping pair; a colon is missed");else return $.tag=Z,$.anchor=K,!0}else if(D)s4($,"can not read a block mapping entry; a multiline key may not be an implicit key");else return $.tag=Z,$.anchor=K,!0;else break;if($.line===Q||$.lineIndent>Y){if(_w($,Y,S40,!0,J))if(N)A=$.result;else F=$.result;if(!N)ww($,H,z,V,A,F,Q,W),V=A=F=null;h$($,!0,-1),L=$.input.charCodeAt($.position)}if($.lineIndent>Y&&L!==0)s4($,"bad indentation of a mapping entry");else if($.lineIndent<Y)break}if(N)ww($,H,z,V,A,null);if(D)$.tag=Z,$.anchor=K,$.kind="mapping",$.result=H;return D}function aD8($){var Y,X=!1,G=!1,J,Q,W;if(W=$.input.charCodeAt($.position),W!==33)return!1;if($.tag!==null)s4($,"duplication of a tag property");if(W=$.input.charCodeAt(++$.position),W===60)X=!0,W=$.input.charCodeAt(++$.position);else if(W===33)G=!0,J="!!",W=$.input.charCodeAt(++$.position);else J="!";if(Y=$.position,X){do W=$.input.charCodeAt(++$.position);while(W!==0&&W!==62);if($.position<$.length)Q=$.input.slice(Y,$.position),W=$.input.charCodeAt(++$.position);else s4($,"unexpected end of the stream within a verbatim tag")}else{while(W!==0&&!AQ(W)){if(W===33)if(!G){if(J=$.input.slice(Y-1,$.position+1),!uc1.test(J))s4($,"named tag handle cannot contain such characters");G=!0,Y=$.position+1}else s4($,"tag suffix cannot contain exclamation marks");W=$.input.charCodeAt(++$.position)}if(Q=$.input.slice(Y,$.position),hD8.test(Q))s4($,"tag suffix cannot contain flow indicator characters")}if(Q&&!pc1.test(Q))s4($,"tag name cannot contain such characters: "+Q);if(X)$.tag=Q;else if(lF.call($.tagMap,J))$.tag=$.tagMap[J]+Q;else if(J==="!")$.tag="!"+Q;else if(J==="!!")$.tag="tag:yaml.org,2002:"+Q;else s4($,'undeclared tag handle "'+J+'"');return!0}function sD8($){var Y,X;if(X=$.input.charCodeAt($.position),X!==38)return!1;if($.anchor!==null)s4($,"duplication of an anchor property");X=$.input.charCodeAt(++$.position),Y=$.position;while(X!==0&&!AQ(X)&&!Pw(X))X=$.input.charCodeAt(++$.position);if($.position===Y)s4($,"name of an anchor node must contain at least one character");return $.anchor=$.input.slice(Y,$.position),!0}function oD8($){var Y,X,G;if(G=$.input.charCodeAt($.position),G!==42)return!1;G=$.input.charCodeAt(++$.position),Y=$.position;while(G!==0&&!AQ(G)&&!Pw(G))G=$.input.charCodeAt(++$.position);if($.position===Y)s4($,"name of an alias node must contain at least one character");if(X=$.input.slice(Y,$.position),!lF.call($.anchorMap,X))s4($,'unidentified alias "'+X+'"');return $.result=$.anchorMap[X],h$($,!0,-1),!0}function _w($,Y,X,G,J){var Q,W,Z,K=1,H=!1,z=!1,V,A,F,N,D;if($.listener!==null)$.listener("open",$);if($.tag=null,$.anchor=null,$.kind=null,$.result=null,Q=W=Z=S40===X||mc1===X,G){if(h$($,!0,-1)){if(H=!0,$.lineIndent>Y)K=1;else if($.lineIndent===Y)K=0;else if($.lineIndent<Y)K=-1}}if(K===1)while(aD8($)||sD8($))if(h$($,!0,-1)){if(H=!0,Z=Q,$.lineIndent>Y)K=1;else if($.lineIndent===Y)K=0;else if($.lineIndent<Y)K=-1}else Z=!1;if(Z)Z=H||J;if(K===1||S40===X){if(C40===X||gc1===X)N=Y;else N=Y+1;if(D=$.position-$.lineStart,K===1)if(Z&&(bc1($,D)||rD8($,D,N))||iD8($,N))z=!0;else{if(W&&nD8($,N)||cD8($,N)||lD8($,N))z=!0;else if(oD8($)){if(z=!0,$.tag!==null||$.anchor!==null)s4($,"alias node should not have any properties")}else if(dD8($,N,C40===X)){if(z=!0,$.tag===null)$.tag="?"}if($.anchor!==null)$.anchorMap[$.anchor]=$.result}else if(K===0)z=Z&&bc1($,D)}if($.tag!==null&&$.tag!=="!")if($.tag==="?"){if($.result!==null&&$.kind!=="scalar")s4($,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+$.kind+'"');for(V=0,A=$.implicitTypes.length;V<A;V+=1)if(F=$.implicitTypes[V],F.resolve($.result)){if($.result=F.construct($.result),$.tag=F.tag,$.anchor!==null)$.anchorMap[$.anchor]=$.result;break}}else if(lF.call($.typeMap[$.kind||"fallback"],$.tag)){if(F=$.typeMap[$.kind||"fallback"][$.tag],$.result!==null&&F.kind!==$.kind)s4($,"unacceptable node kind for !<"+$.tag+'> tag; it should be "'+F.kind+'", not "'+$.kind+'"');if(!F.resolve($.result))s4($,"cannot resolve a node with !<"+$.tag+"> explicit tag");else if($.result=F.construct($.result),$.anchor!==null)$.anchorMap[$.anchor]=$.result}else s4($,"unknown tag !<"+$.tag+">");if($.listener!==null)$.listener("close",$);return $.tag!==null||$.anchor!==null||z}function tD8($){var Y=$.position,X,G,J,Q=!1,W;$.version=null,$.checkLineBreaks=$.legacy,$.tagMap={},$.anchorMap={};while((W=$.input.charCodeAt($.position))!==0){if(h$($,!0,-1),W=$.input.charCodeAt($.position),$.lineIndent>0||W!==37)break;Q=!0,W=$.input.charCodeAt(++$.position),X=$.position;while(W!==0&&!AQ(W))W=$.input.charCodeAt(++$.position);if(G=$.input.slice(X,$.position),J=[],G.length<1)s4($,"directive name must not be less than one character in length");while(W!==0){while(RO(W))W=$.input.charCodeAt(++$.position);if(W===35){do W=$.input.charCodeAt(++$.position);while(W!==0&&!OU(W));break}if(OU(W))break;X=$.position;while(W!==0&&!AQ(W))W=$.input.charCodeAt(++$.position);J.push($.input.slice(X,$.position))}if(W!==0)vC0($);if(lF.call(xc1,G))xc1[G]($,G,J);else k40($,'unknown document directive "'+G+'"')}if(h$($,!0,-1),$.lineIndent===0&&$.input.charCodeAt($.position)===45&&$.input.charCodeAt($.position+1)===45&&$.input.charCodeAt($.position+2)===45)$.position+=3,h$($,!0,-1);else if(Q)s4($,"directives end mark is expected");if(_w($,$.lineIndent-1,S40,!1,!0),h$($,!0,-1),$.checkLineBreaks&&bD8.test($.input.slice(Y,$.position)))k40($,"non-ASCII line breaks are interpreted as content");if($.documents.push($.result),$.position===$.lineStart&&v40($)){if($.input.charCodeAt($.position)===46)$.position+=3,h$($,!0,-1);return}if($.position<$.length-1)s4($,"end of the stream or a document separator is expected");else return}function nc1($,Y){if($=String($),Y=Y||{},$.length!==0){if($.charCodeAt($.length-1)!==10&&$.charCodeAt($.length-1)!==13)$+=`
`;if($.charCodeAt(0)===65279)$=$.slice(1)}var X=new pD8($,Y),G=$.indexOf("\x00");if(G!==-1)X.position=G,s4(X,"null byte is not allowed in input");X.input+="\x00";while(X.input.charCodeAt(X.position)===32)X.lineIndent+=1,X.position+=1;while(X.position<X.length-1)tD8(X);return X.documents}function rc1($,Y,X){if(Y!==null&&typeof Y==="object"&&typeof X>"u")X=Y,Y=null;var G=nc1($,X);if(typeof Y!=="function")return G;for(var J=0,Q=G.length;J<Q;J+=1)Y(G[J])}function ac1($,Y){var X=nc1($,Y);if(X.length===0)return;else if(X.length===1)return X[0];throw new hc1("expected a single document in the stream, but found more")}function eD8($,Y,X){if(typeof Y==="object"&&Y!==null&&typeof X>"u")X=Y,Y=null;return rc1($,Y,xz.extend({schema:fc1},X))}function $N8($,Y){return ac1($,xz.extend({schema:fc1},Y))}YN8.loadAll=rc1;YN8.load=ac1;YN8.safeLoadAll=eD8;YN8.safeLoad=$N8});var Ol1=o((mN8,fC0)=>{var Of=OO(),Ef=Rw(),WN8=Nf(),ZN8=Iw(),Jl1=Object.prototype.toString,Ql1=Object.prototype.hasOwnProperty,KN8=9,Bf=10,UN8=13,HN8=32,zN8=33,VN8=34,Wl1=35,AN8=37,FN8=38,DN8=39,NN8=42,Zl1=44,LN8=45,Kl1=58,BN8=61,ON8=62,EN8=63,MN8=64,Ul1=91,Hl1=93,RN8=96,zl1=123,qN8=124,Vl1=125,GG={};GG[0]="\\0";GG[7]="\\a";GG[8]="\\b";GG[9]="\\t";GG[10]="\\n";GG[11]="\\v";GG[12]="\\f";GG[13]="\\r";GG[27]="\\e";GG[34]="\\\"";GG[92]="\\\\";GG[133]="\\N";GG[160]="\\_";GG[8232]="\\L";GG[8233]="\\P";var IN8=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function PN8($,Y){var X,G,J,Q,W,Z,K;if(Y===null)return{};X={},G=Object.keys(Y);for(J=0,Q=G.length;J<Q;J+=1){if(W=G[J],Z=String(Y[W]),W.slice(0,2)==="!!")W="tag:yaml.org,2002:"+W.slice(2);if(K=$.compiledTypeMap.fallback[W],K&&Ql1.call(K.styleAliases,Z))Z=K.styleAliases[Z];X[W]=Z}return X}function oc1($){var Y,X,G;if(Y=$.toString(16).toUpperCase(),$<=255)X="x",G=2;else if($<=65535)X="u",G=4;else if($<=4294967295)X="U",G=8;else throw new Ef("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+X+Of.repeat("0",G-Y.length)+Y}function wN8($){this.schema=$.schema||WN8,this.indent=Math.max(1,$.indent||2),this.noArrayIndent=$.noArrayIndent||!1,this.skipInvalid=$.skipInvalid||!1,this.flowLevel=Of.isNothing($.flowLevel)?-1:$.flowLevel,this.styleMap=PN8(this.schema,$.styles||null),this.sortKeys=$.sortKeys||!1,this.lineWidth=$.lineWidth||80,this.noRefs=$.noRefs||!1,this.noCompatMode=$.noCompatMode||!1,this.condenseFlow=$.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function tc1($,Y){var X=Of.repeat(" ",Y),G=0,J=-1,Q="",W,Z=$.length;while(G<Z){if(J=$.indexOf(`
`,G),J===-1)W=$.slice(G),G=Z;else W=$.slice(G,J+1),G=J+1;if(W.length&&W!==`
`)Q+=X;Q+=W}return Q}function yC0($,Y){return`
`+Of.repeat(" ",$.indent*Y)}function _N8($,Y){var X,G,J;for(X=0,G=$.implicitTypes.length;X<G;X+=1)if(J=$.implicitTypes[X],J.resolve(Y))return!0;return!1}function hC0($){return $===HN8||$===KN8}function jw($){return 32<=$&&$<=126||161<=$&&$<=55295&&$!==8232&&$!==8233||57344<=$&&$<=65533&&$!==65279||65536<=$&&$<=1114111}function jN8($){return jw($)&&!hC0($)&&$!==65279&&$!==UN8&&$!==Bf}function ec1($,Y){return jw($)&&$!==65279&&$!==Zl1&&$!==Ul1&&$!==Hl1&&$!==zl1&&$!==Vl1&&$!==Kl1&&($!==Wl1||Y&&jN8(Y))}function TN8($){return jw($)&&$!==65279&&!hC0($)&&$!==LN8&&$!==EN8&&$!==Kl1&&$!==Zl1&&$!==Ul1&&$!==Hl1&&$!==zl1&&$!==Vl1&&$!==Wl1&&$!==FN8&&$!==NN8&&$!==zN8&&$!==qN8&&$!==BN8&&$!==ON8&&$!==DN8&&$!==VN8&&$!==AN8&&$!==MN8&&$!==RN8}function Al1($){var Y=/^\n* /;return Y.test($)}var Fl1=1,Dl1=2,Nl1=3,Ll1=4,x40=5;function CN8($,Y,X,G,J){var Q,W,Z,K=!1,H=!1,z=G!==-1,V=-1,A=TN8($.charCodeAt(0))&&!hC0($.charCodeAt($.length-1));if(Y)for(Q=0;Q<$.length;Q++){if(W=$.charCodeAt(Q),!jw(W))return x40;Z=Q>0?$.charCodeAt(Q-1):null,A=A&&ec1(W,Z)}else{for(Q=0;Q<$.length;Q++){if(W=$.charCodeAt(Q),W===Bf){if(K=!0,z)H=H||Q-V-1>G&&$[V+1]!==" ",V=Q}else if(!jw(W))return x40;Z=Q>0?$.charCodeAt(Q-1):null,A=A&&ec1(W,Z)}H=H||z&&(Q-V-1>G&&$[V+1]!==" ")}if(!K&&!H)return A&&!J($)?Fl1:Dl1;if(X>9&&Al1($))return x40;return H?Ll1:Nl1}function SN8($,Y,X,G){$.dump=function(){if(Y.length===0)return"''";if(!$.noCompatMode&&IN8.indexOf(Y)!==-1)return"'"+Y+"'";var J=$.indent*Math.max(1,X),Q=$.lineWidth===-1?-1:Math.max(Math.min($.lineWidth,40),$.lineWidth-J),W=G||$.flowLevel>-1&&X>=$.flowLevel;function Z(K){return _N8($,K)}switch(CN8(Y,W,$.indent,Q,Z)){case Fl1:return Y;case Dl1:return"'"+Y.replace(/'/g,"''")+"'";case Nl1:return"|"+$l1(Y,$.indent)+Yl1(tc1(Y,J));case Ll1:return">"+$l1(Y,$.indent)+Yl1(tc1(kN8(Y,Q),J));case x40:return'"'+vN8(Y,Q)+'"';default:throw new Ef("impossible error: invalid scalar style")}}()}function $l1($,Y){var X=Al1($)?String(Y):"",G=$[$.length-1]===`
`,J=G&&($[$.length-2]===`
`||$===`
`),Q=J?"+":G?"":"-";return X+Q+`
`}function Yl1($){return $[$.length-1]===`
`?$.slice(0,-1):$}function kN8($,Y){var X=/(\n+)([^\n]*)/g,G=function(){var H=$.indexOf(`
`);return H=H!==-1?H:$.length,X.lastIndex=H,Xl1($.slice(0,H),Y)}(),J=$[0]===`
`||$[0]===" ",Q,W;while(W=X.exec($)){var Z=W[1],K=W[2];Q=K[0]===" ",G+=Z+(!J&&!Q&&K!==""?`
`:"")+Xl1(K,Y),J=Q}return G}function Xl1($,Y){if($===""||$[0]===" ")return $;var X=/ [^ ]/g,G,J=0,Q,W=0,Z=0,K="";while(G=X.exec($)){if(Z=G.index,Z-J>Y)Q=W>J?W:Z,K+=`
`+$.slice(J,Q),J=Q+1;W=Z}if(K+=`
`,$.length-J>Y&&W>J)K+=$.slice(J,W)+`
`+$.slice(W+1);else K+=$.slice(J);return K.slice(1)}function vN8($){var Y="",X,G,J;for(var Q=0;Q<$.length;Q++){if(X=$.charCodeAt(Q),X>=55296&&X<=56319){if(G=$.charCodeAt(Q+1),G>=56320&&G<=57343){Y+=oc1((X-55296)*1024+G-56320+65536),Q++;continue}}J=GG[X],Y+=!J&&jw(X)?$[Q]:J||oc1(X)}return Y}function xN8($,Y,X){var G="",J=$.tag,Q,W;for(Q=0,W=X.length;Q<W;Q+=1)if(qO($,Y,X[Q],!1,!1)){if(Q!==0)G+=","+(!$.condenseFlow?" ":"");G+=$.dump}$.tag=J,$.dump="["+G+"]"}function yN8($,Y,X,G){var J="",Q=$.tag,W,Z;for(W=0,Z=X.length;W<Z;W+=1)if(qO($,Y+1,X[W],!0,!0)){if(!G||W!==0)J+=yC0($,Y);if($.dump&&Bf===$.dump.charCodeAt(0))J+="-";else J+="- ";J+=$.dump}$.tag=Q,$.dump=J||"[]"}function bN8($,Y,X){var G="",J=$.tag,Q=Object.keys(X),W,Z,K,H,z;for(W=0,Z=Q.length;W<Z;W+=1){if(z="",W!==0)z+=", ";if($.condenseFlow)z+='"';if(K=Q[W],H=X[K],!qO($,Y,K,!1,!1))continue;if($.dump.length>1024)z+="? ";if(z+=$.dump+($.condenseFlow?'"':"")+":"+($.condenseFlow?"":" "),!qO($,Y,H,!1,!1))continue;z+=$.dump,G+=z}$.tag=J,$.dump="{"+G+"}"}function hN8($,Y,X,G){var J="",Q=$.tag,W=Object.keys(X),Z,K,H,z,V,A;if($.sortKeys===!0)W.sort();else if(typeof $.sortKeys==="function")W.sort($.sortKeys);else if($.sortKeys)throw new Ef("sortKeys must be a boolean or a function");for(Z=0,K=W.length;Z<K;Z+=1){if(A="",!G||Z!==0)A+=yC0($,Y);if(H=W[Z],z=X[H],!qO($,Y+1,H,!0,!0,!0))continue;if(V=$.tag!==null&&$.tag!=="?"||$.dump&&$.dump.length>1024,V)if($.dump&&Bf===$.dump.charCodeAt(0))A+="?";else A+="? ";if(A+=$.dump,V)A+=yC0($,Y);if(!qO($,Y+1,z,!0,V))continue;if($.dump&&Bf===$.dump.charCodeAt(0))A+=":";else A+=": ";A+=$.dump,J+=A}$.tag=Q,$.dump=J||"{}"}function Gl1($,Y,X){var G,J,Q,W,Z,K;J=X?$.explicitTypes:$.implicitTypes;for(Q=0,W=J.length;Q<W;Q+=1)if(Z=J[Q],(Z.instanceOf||Z.predicate)&&(!Z.instanceOf||typeof Y==="object"&&Y instanceof Z.instanceOf)&&(!Z.predicate||Z.predicate(Y))){if($.tag=X?Z.tag:"?",Z.represent){if(K=$.styleMap[Z.tag]||Z.defaultStyle,Jl1.call(Z.represent)==="[object Function]")G=Z.represent(Y,K);else if(Ql1.call(Z.represent,K))G=Z.represent[K](Y,K);else throw new Ef("!<"+Z.tag+'> tag resolver accepts not "'+K+'" style');$.dump=G}return!0}return!1}function qO($,Y,X,G,J,Q){if($.tag=null,$.dump=X,!Gl1($,X,!1))Gl1($,X,!0);var W=Jl1.call($.dump);if(G)G=$.flowLevel<0||$.flowLevel>Y;var Z=W==="[object Object]"||W==="[object Array]",K,H;if(Z)K=$.duplicates.indexOf(X),H=K!==-1;if($.tag!==null&&$.tag!=="?"||H||$.indent!==2&&Y>0)J=!1;if(H&&$.usedDuplicates[K])$.dump="*ref_"+K;else{if(Z&&H&&!$.usedDuplicates[K])$.usedDuplicates[K]=!0;if(W==="[object Object]"){if(G&&Object.keys($.dump).length!==0){if(hN8($,Y,$.dump,J),H)$.dump="&ref_"+K+$.dump}else if(bN8($,Y,$.dump),H)$.dump="&ref_"+K+" "+$.dump}else if(W==="[object Array]"){var z=$.noArrayIndent&&Y>0?Y-1:Y;if(G&&$.dump.length!==0){if(yN8($,z,$.dump,J),H)$.dump="&ref_"+K+$.dump}else if(xN8($,z,$.dump),H)$.dump="&ref_"+K+" "+$.dump}else if(W==="[object String]"){if($.tag!=="?")SN8($,$.dump,Y,Q)}else{if($.skipInvalid)return!1;throw new Ef("unacceptable kind of an object to dump "+W)}if($.tag!==null&&$.tag!=="?")$.dump="!<"+$.tag+"> "+$.dump}return!0}function fN8($,Y){var X=[],G=[],J,Q;bC0($,X,G);for(J=0,Q=G.length;J<Q;J+=1)Y.duplicates.push(X[G[J]]);Y.usedDuplicates=Array(Q)}function bC0($,Y,X){var G,J,Q;if($!==null&&typeof $==="object")if(J=Y.indexOf($),J!==-1){if(X.indexOf(J)===-1)X.push(J)}else if(Y.push($),Array.isArray($))for(J=0,Q=$.length;J<Q;J+=1)bC0($[J],Y,X);else{G=Object.keys($);for(J=0,Q=G.length;J<Q;J+=1)bC0($[G[J]],Y,X)}}function Bl1($,Y){Y=Y||{};var X=new wN8(Y);if(!X.noRefs)fN8($,X);if(qO(X,0,$,!0,!0))return X.dump+`
`;return""}function gN8($,Y){return Bl1($,Of.extend({schema:ZN8},Y))}mN8.dump=Bl1;mN8.safeDump=gN8});var Ml1=o((dN8,X$)=>{var y40=sc1(),El1=Ol1();function b40($){return function(){throw Error("Function "+$+" is deprecated and cannot be used.")}}dN8.Type=HY();dN8.Schema=EO();dN8.FAILSAFE_SCHEMA=j40();dN8.JSON_SCHEMA=_C0();dN8.CORE_SCHEMA=jC0();dN8.DEFAULT_SAFE_SCHEMA=Iw();dN8.DEFAULT_FULL_SCHEMA=Nf();dN8.load=y40.load;dN8.loadAll=y40.loadAll;dN8.safeLoad=y40.safeLoad;dN8.safeLoadAll=y40.safeLoadAll;dN8.dump=El1.dump;dN8.safeDump=El1.safeDump;dN8.YAMLException=Rw();dN8.MINIMAL_SCHEMA=j40();dN8.SAFE_SCHEMA=Iw();dN8.DEFAULT_SCHEMA=Nf();dN8.scan=b40("scan");dN8.parse=b40("parse");dN8.compose=b40("compose");dN8.addConstructor=b40("addConstructor")});var ql1=o((lc5,Rl1)=>{var zL8=Ml1();Rl1.exports=zL8});var pC0=o((mC0,uC0)=>{var h40=ql1(),gC0=mC0=uC0.exports;gC0.yaml={parse:h40.safeLoad.bind(h40),stringify:h40.safeDump.bind(h40)};gC0.json={parse:JSON.parse.bind(JSON),stringify:function($,Y){let X=Object.assign({replacer:null,space:2},Y);return JSON.stringify($,X.replacer,X.space)}};gC0.javascript={parse:function parse(str,options,wrap){try{if(wrap!==!1)str=`(function() {
return `+str.trim()+`;
}());`;return eval(str)||{}}catch($){if(wrap!==!1&&/(unexpected|identifier)/i.test($.message))return parse(str,options,!1);throw SyntaxError($)}},stringify:function(){throw Error("stringifying JavaScript is not supported")}}});var Pl1=o((ic5,Il1)=>{/*!
 * strip-bom-string <https://github.com/jonschlinkert/strip-bom-string>
 *
 * Copyright (c) 2015, 2017, Jon Schlinkert.
 * Released under the MIT License.
 */Il1.exports=function($){if(typeof $==="string"&&$.charAt(0)==="\uFEFF")return $.slice(1);return $}});var f40=o((VL8)=>{var wl1=Pl1(),_l1=Ff();VL8.define=function($,Y,X){Reflect.defineProperty($,Y,{enumerable:!1,configurable:!0,writable:!0,value:X})};VL8.isBuffer=function($){return _l1($)==="buffer"};VL8.isObject=function($){return _l1($)==="object"};VL8.toBuffer=function($){return typeof $==="string"?Buffer.from($):$};VL8.toString=function($){if(VL8.isBuffer($))return wl1(String($));if(typeof $!=="string")throw TypeError("expected input to be a string or buffer");return wl1($)};VL8.arrayify=function($){return $?Array.isArray($)?$:[$]:[]};VL8.startsWith=function($,Y,X){if(typeof X!=="number")X=Y.length;return $.slice(0,X)===Y}});var Mf=o((rc5,Tl1)=>{var OL8=pC0(),EL8=f40();Tl1.exports=function($){let Y=Object.assign({},$);if(Y.delimiters=EL8.arrayify(Y.delims||Y.delimiters||"---"),Y.delimiters.length===1)Y.delimiters.push(Y.delimiters[0]);return Y.language=(Y.language||Y.lang||"yaml").toLowerCase(),Y.engines=Object.assign({},OL8,Y.parsers,Y.engines),Y}});var dC0=o((ac5,Cl1)=>{Cl1.exports=function($,Y){let X=Y.engines[$]||Y.engines[ML8($)];if(typeof X>"u")throw Error('gray-matter engine "'+$+'" is not registered');if(typeof X==="function")X={parse:X};return X};function ML8($){switch($.toLowerCase()){case"js":case"javascript":return"javascript";case"coffee":case"coffeescript":case"cson":return"coffee";case"yaml":case"yml":return"yaml";default:return $}}});var cC0=o((sc5,Sl1)=>{var RL8=Ff(),qL8=dC0(),IL8=Mf();Sl1.exports=function($,Y,X){if(Y==null&&X==null)switch(RL8($)){case"object":Y=$.data,X={};break;case"string":return $;default:throw TypeError("expected file to be a string or object")}let G=$.content,J=IL8(X);if(Y==null){if(!J.data)return $;Y=J.data}let Q=$.language||J.language,W=qL8(Q,J);if(typeof W.stringify!=="function")throw TypeError('expected "'+Q+'.stringify" to be a function');Y=Object.assign({},$.data,Y);let Z=J.delimiters[0],K=J.delimiters[1],H=W.stringify(Y,X).trim(),z="";if(H!=="{}")z=Tw(Z)+Tw(H)+Tw(K);if(typeof $.excerpt==="string"&&$.excerpt!==""){if(G.indexOf($.excerpt.trim())===-1)z+=Tw($.excerpt)+Tw(K)}return z+Tw(G)};function Tw($){return $.slice(-1)!==`
`?$+`
`:$}});var vl1=o((oc5,kl1)=>{var PL8=Mf();kl1.exports=function($,Y){let X=PL8(Y);if($.data==null)$.data={};if(typeof X.excerpt==="function")return X.excerpt($,X);let G=$.data.excerpt_separator||X.excerpt_separator;if(G==null&&(X.excerpt===!1||X.excerpt==null))return $;let J=typeof X.excerpt==="string"?X.excerpt:G||X.delimiters[0],Q=$.content.indexOf(J);if(Q!==-1)$.excerpt=$.content.slice(0,Q);return $}});var bl1=o((tc5,yl1)=>{var xl1=Ff(),wL8=cC0(),Cw=f40();yl1.exports=function($){if(xl1($)!=="object")$={content:$};if(xl1($.data)!=="object")$.data={};if($.contents&&$.content==null)$.content=$.contents;return Cw.define($,"orig",Cw.toBuffer($.content)),Cw.define($,"language",$.language||""),Cw.define($,"matter",$.matter||""),Cw.define($,"stringify",function(Y,X){if(X&&X.language)$.language=X.language;return wL8($,Y,X)}),$.content=Cw.toString($.content),$.isEmpty=!1,$.excerpt="",$}});var fl1=o((ec5,hl1)=>{var _L8=dC0(),jL8=Mf();hl1.exports=function($,Y,X){let G=jL8(X),J=_L8($,G);if(typeof J.parse!=="function")throw TypeError('expected "'+$+'.parse" to be a function');return J.parse(Y,G)}});var pl1=o(($l5,ul1)=>{var TL8=L0("fs"),CL8=xd1(),lC0=Mf(),SL8=cC0(),gl1=vl1(),kL8=pC0(),vL8=bl1(),xL8=fl1(),ml1=f40();function rG($,Y){if($==="")return{data:{},content:$,excerpt:"",orig:$};let X=vL8($),G=rG.cache[X.content];if(!Y){if(G)return X=Object.assign({},G),X.orig=G.orig,X;rG.cache[X.content]=X}return yL8(X,Y)}function yL8($,Y){let X=lC0(Y),G=X.delimiters[0],J=`
`+X.delimiters[1],Q=$.content;if(X.language)$.language=X.language;let W=G.length;if(!ml1.startsWith(Q,G,W))return gl1($,X),$;if(Q.charAt(W)===G.slice(-1))return $;Q=Q.slice(W);let Z=Q.length,K=rG.language(Q,X);if(K.name)$.language=K.name,Q=Q.slice(K.raw.length);let H=Q.indexOf(J);if(H===-1)H=Z;if($.matter=Q.slice(0,H),$.matter.replace(/^\s*#[^\n]+/gm,"").trim()==="")$.isEmpty=!0,$.empty=$.content,$.data={};else $.data=xL8($.language,$.matter,X);if(H===Z)$.content="";else{if($.content=Q.slice(H+J.length),$.content[0]==="\r")$.content=$.content.slice(1);if($.content[0]===`
`)$.content=$.content.slice(1)}if(gl1($,X),X.sections===!0||typeof X.section==="function")CL8($,X.section);return $}rG.engines=kL8;rG.stringify=function($,Y,X){if(typeof $==="string")$=rG($,X);return SL8($,Y,X)};rG.read=function($,Y){let X=TL8.readFileSync($,"utf8"),G=rG(X,Y);return G.path=$,G};rG.test=function($,Y){return ml1.startsWith($,lC0(Y).delimiters[0])};rG.language=function($,Y){let G=lC0(Y).delimiters[0];if(rG.test($))$=$.slice(G.length);let J=$.slice(0,$.search(/\r?\n/));return{raw:J,name:J?J.trim():""}};rG.cache={};rG.clearCache=function(){rG.cache={}};ul1.exports=rG});function JG($,Y={}){if(!$)return 0;let{defaultCharsPerToken:X=6,languageConfigs:G=ll1}=Y,J=$.split(cl1).filter(Boolean),Q=0;for(let W of J)Q+=il1(W,G,X);return Q}function Rf($,Y=0,X,G={}){if(!$)return"";let{defaultCharsPerToken:J=6,languageConfigs:Q=ll1}=G,W=0;if(Y<0||X!==void 0&&X<0)W=JG($,G);let Z=Y<0?Math.max(0,W+Y):Math.max(0,Y),K=X===void 0?1/0:X<0?Math.max(0,W+X):X;if(Z>=K)return"";let H=$.split(cl1).filter(Boolean),z=[],V=0;for(let A of H){if(V>=K)break;let F=il1(A,Q,J),N=hL8(A,V,F,Z,K);if(N)z.push(N);V+=F}return z.join("")}function il1($,Y,X){if(Sw.whitespace.test($))return 0;if(Sw.cjk.test($))return bL8($);if(Sw.numeric.test($))return 1;if($.length<=3)return 1;if(Sw.punctuation.test($))return $.length>1?Math.ceil($.length/2):1;if(Sw.alphanumeric.test($)){let J=dl1($,Y)??X;return Math.ceil($.length/J)}let G=dl1($,Y)??X;return Math.ceil($.length/G)}function dl1($,Y){for(let X of Y)if(X.pattern.test($))return X.averageCharsPerToken}function bL8($){return Array.from($).length}function hL8($,Y,X,G,J){if(X===0)return Y>=G&&Y<J?$:"";let Q=Y+X;if(Y>=J||Q<=G)return"";let W=Math.max(0,G-Y),Z=Math.min(X,J-Y);if(W===0&&Z===X)return $;let K=Math.floor(W/X*$.length),H=Math.ceil(Z/X*$.length);return $.slice(K,H)}var Sw,cl1,ll1;var g40=V0(()=>{Sw={whitespace:/^\s+$/,cjk:/[\u4E00-\u9FFF\u3400-\u4DBF\u3000-\u303F\uFF00-\uFFEF\u30A0-\u30FF\u2E80-\u2EFF\u31C0-\u31EF\u3200-\u32FF\u3300-\u33FF\uAC00-\uD7AF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]/,numeric:/^\d+(?:[.,]\d+)*$/,punctuation:/[.,!?;(){}[\]<>:/\\|@#$%^&*+=`~_-]/,alphanumeric:/^[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]+$/},cl1=new RegExp(`(\\s+|${Sw.punctuation.source}+)`),ll1=[{pattern:/[\u00E4\u00F6\u00FC\u00DF\u1E9E]/i,averageCharsPerToken:3},{pattern:/[\u00E9\u00E8\u00EA\u00EB\u00E0\u00E2\u00EE\u00EF\u00F4\u00FB\u00F9\u00FC\u00FF\u00E7\u0153\u00E6\u00E1\u00ED\u00F3\u00FA\u00F1]/i,averageCharsPerToken:3},{pattern:/[\u0105\u0107\u0119\u0142\u0144\u00F3\u015B\u017A\u017C\u011B\u0161\u010D\u0159\u017E\u00FD\u016F\u00FA\u010F\u0165\u0148]/i,averageCharsPerToken:3.5}]});var Ji1=o((Xl5,p40)=>{function al1($){return Array.isArray($)?$:[$]}var fL8=void 0,nC0="",nl1=" ",iC0="\\",gL8=/^\s+$/,mL8=/(?:[^\\]|^)\\$/,uL8=/^\\!/,pL8=/^\\#/,dL8=/\r?\n/g,cL8=/^\.{0,2}\/|^\.{1,2}$/,lL8=/\/$/,kw="/",sl1="node-ignore";if(typeof Symbol<"u")sl1=Symbol.for("node-ignore");var ol1=sl1,vw=($,Y,X)=>{return Object.defineProperty($,Y,{value:X}),X},iL8=/([0-z])-([0-z])/g,tl1=()=>!1,nL8=($)=>$.replace(iL8,(Y,X,G)=>X.charCodeAt(0)<=G.charCodeAt(0)?Y:nC0),rL8=($)=>{let{length:Y}=$;return $.slice(0,Y-Y%2)},aL8=[[/^\uFEFF/,()=>nC0],[/((?:\\\\)*?)(\\?\s+)$/,($,Y,X)=>Y+(X.indexOf("\\")===0?nl1:nC0)],[/(\\+?)\s/g,($,Y)=>{let{length:X}=Y;return Y.slice(0,X-X%2)+nl1}],[/[\\$.|*+(){^]/g,($)=>`\\${$}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,($,Y,X)=>Y+6<X.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,($,Y,X)=>{let G=X.replace(/\\\*/g,"[^\\/]*");return Y+G}],[/\\\\\\(?=[$.|*+(){^])/g,()=>iC0],[/\\\\/g,()=>iC0],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,($,Y,X,G,J)=>Y===iC0?`\\[${X}${rL8(G)}${J}`:J==="]"?G.length%2===0?`[${nL8(X)}${G}]`:"[]":"[]"],[/(?:[^*])$/,($)=>/\/$/.test($)?`${$}$`:`${$}(?=$|\\/$)`]],sL8=/(^|\\\/)?\\\*$/,qf="regex",m40="checkRegex",rl1="_",oL8={[qf]($,Y){return`${Y?`${Y}[^/]+`:"[^/]*"}(?=$|\\/$)`},[m40]($,Y){return`${Y?`${Y}[^/]*`:"[^/]*"}(?=$|\\/$)`}},tL8=($)=>aL8.reduce((Y,[X,G])=>Y.replace(X,G.bind($)),$),u40=($)=>typeof $==="string",eL8=($)=>$&&u40($)&&!gL8.test($)&&!mL8.test($)&&$.indexOf("#")!==0,$B8=($)=>$.split(dL8).filter(Boolean);class el1{constructor($,Y,X,G,J,Q){this.pattern=$,this.mark=Y,this.negative=J,vw(this,"body",X),vw(this,"ignoreCase",G),vw(this,"regexPrefix",Q)}get regex(){let $=rl1+qf;if(this[$])return this[$];return this._make(qf,$)}get checkRegex(){let $=rl1+m40;if(this[$])return this[$];return this._make(m40,$)}_make($,Y){let X=this.regexPrefix.replace(sL8,oL8[$]),G=this.ignoreCase?new RegExp(X,"i"):new RegExp(X);return vw(this,Y,G)}}var YB8=({pattern:$,mark:Y},X)=>{let G=!1,J=$;if(J.indexOf("!")===0)G=!0,J=J.substr(1);J=J.replace(uL8,"!").replace(pL8,"#");let Q=tL8(J);return new el1($,Y,J,X,G,Q)};class $i1{constructor($){this._ignoreCase=$,this._rules=[]}_add($){if($&&$[ol1]){this._rules=this._rules.concat($._rules._rules),this._added=!0;return}if(u40($))$={pattern:$};if(eL8($.pattern)){let Y=YB8($,this._ignoreCase);this._added=!0,this._rules.push(Y)}}add($){return this._added=!1,al1(u40($)?$B8($):$).forEach(this._add,this),this._added}test($,Y,X){let G=!1,J=!1,Q;this._rules.forEach((Z)=>{let{negative:K}=Z;if(J===K&&G!==J||K&&!G&&!J&&!Y)return;if(!Z[X].test($))return;G=!K,J=K,Q=K?fL8:Z});let W={ignored:G,unignored:J};if(Q)W.rule=Q;return W}}var XB8=($,Y)=>{throw new Y($)},yz=($,Y,X)=>{if(!u40($))return X(`path must be a string, but got \`${Y}\``,TypeError);if(!$)return X("path must not be empty",TypeError);if(yz.isNotRelative($))return X(`path should be a \`path.relative()\`d string, but got "${Y}"`,RangeError);return!0},Yi1=($)=>cL8.test($);yz.isNotRelative=Yi1;yz.convert=($)=>$;class Xi1{constructor({ignorecase:$=!0,ignoreCase:Y=$,allowRelativePaths:X=!1}={}){vw(this,ol1,!0),this._rules=new $i1(Y),this._strictPathCheck=!X,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add($){if(this._rules.add($))this._initCache();return this}addPattern($){return this.add($)}_test($,Y,X,G){let J=$&&yz.convert($);return yz(J,$,this._strictPathCheck?XB8:tl1),this._t(J,Y,X,G)}checkIgnore($){if(!lL8.test($))return this.test($);let Y=$.split(kw).filter(Boolean);if(Y.pop(),Y.length){let X=this._t(Y.join(kw)+kw,this._testCache,!0,Y);if(X.ignored)return X}return this._rules.test($,!1,m40)}_t($,Y,X,G){if($ in Y)return Y[$];if(!G)G=$.split(kw).filter(Boolean);if(G.pop(),!G.length)return Y[$]=this._rules.test($,X,qf);let J=this._t(G.join(kw)+kw,Y,X,G);return Y[$]=J.ignored?J:this._rules.test($,X,qf)}ignores($){return this._test($,this._ignoreCache,!1).ignored}createFilter(){return($)=>!this.ignores($)}filter($){return al1($).filter(this.createFilter())}test($){return this._test($,this._testCache,!0)}}var rC0=($)=>new Xi1($),GB8=($)=>yz($&&yz.convert($),$,tl1),Gi1=()=>{let $=(X)=>/^\\\\\?\\/.test(X)||/["<>|\u0000-\u001F]+/u.test(X)?X:X.replace(/\\/g,"/");yz.convert=$;let Y=/^[a-z]:\//i;yz.isNotRelative=(X)=>Y.test(X)||Yi1(X)};if(typeof process<"u"&&process.platform==="win32")Gi1();p40.exports=rC0;rC0.default=rC0;p40.exports.isPathValid=GB8;vw(p40.exports,Symbol.for("setupWindows"),Gi1)});import*as q$ from"path";import YS0,{parse as Wl5,join as xw,dirname as Zl5}from"path";import{realpathSync as Hl5,constants as zl5,existsSync as aC0}from"fs";import*as G$ from"fs/promises";import XS0 from"fs/promises";import*as yw from"os";import{createRequire as c40}from"module";import{fileURLToPath as JB8,pathToFileURL as GS0}from"url";import{execFileSync as QB8}from"child_process";function HB8($){return $!==null&&typeof $==="object"&&"code"in $&&$.code==="ENOENT"}function VB8($){let Y=q$.extname($).slice(1).toLowerCase();return zB8[Y]??"application/octet-stream"}function JS0($){let Y=q$.extname($).toLowerCase();return AB8.has(Y)}async function FB8($){try{return await G$.access($),!0}catch{return!1}}async function DB8($,Y){try{let X=await G$.stat($);return{name:q$.basename($),type:X.isDirectory()?"directory":"file",size:X.size,createdAt:X.birthtime,modifiedAt:X.mtime,mimeType:X.isFile()?VB8($):void 0}}catch(X){if(HB8(X))throw new r40(Y);throw X}}function i40($){return Oi1.test($)}function Ei1($){let Y=$.search(Oi1);if(Y===-1)return $;let X=$.slice(0,Y),G=X.lastIndexOf("/");if(G<=0)return".";return X.slice(0,G)}function Qi1($){if($.startsWith("./"))return $.slice(2);if($.startsWith("/"))return $.slice(1);return $}function QS0($,Y){let X=(Array.isArray($)?$:[$]).map(Qi1),G=Di1.default(X,{posix:!0,dot:Y?.dot??!1});return(J)=>G(Qi1(J))}async function Mi1($,Y,X,G){if(X>=G)return[];try{let J=await $(Y),Q=[];for(let W of J){if(W.type==="directory"&&W.isSymlink)continue;let Z=Y==="."||Y===""?W.name:`${Y}/${W.name}`;if(Q.push({path:Z,type:W.type}),W.type==="directory")Q.push(...await Mi1($,Z,X+1,G))}return Q}catch{return[]}}async function Wi1($,Y,X){let G=X?.maxDepth??10,J=$.length>1&&$.endsWith("/")?$.slice(0,-1):$;if(!i40(J))try{return await Y(J),[{path:J,type:"directory"}]}catch{return[{path:J,type:"file"}]}let Q=Ei1(J),W=QS0(J,{dot:X?.dot??!1});return(await Mi1(Y,Q,0,G)).filter((K)=>W(K.path))}function If($){try{let Y=process.platform==="win32"?"where":"which";return QB8(Y,[$],{stdio:"ignore"}),!0}catch{return!1}}function BB8($,Y){try{let X=c40(GS0(xw($,"package.json")));return{require:X,resolved:X.resolve(Y)}}catch{}try{let X=c40(GS0(xw(process.cwd(),"package.json")));return{require:X,resolved:X.resolve(Y)}}catch{return null}}function Zi1($,Y,X){let G=BB8($,Y);if(G)return G;for(let J of X??[])try{let Q=c40(GS0(xw(J,"package.json")));return{require:Q,resolved:Q.resolve(Y)}}catch{}return null}function sC0($,Y,X){let G=xw($,"node_modules",".bin",Y),J=xw(process.cwd(),"node_modules",".bin",Y);if(aC0(G))return G;if(aC0(J))return J;for(let Q of X??[]){let W=xw(Q,"node_modules",".bin",Y);if(aC0(W))return W}return}function OB8($){return{id:$.id,name:$.name,languageIds:$.languageIds,markers:$.markers,command:()=>$.command,initialization:$.initializationOptions?()=>$.initializationOptions:void 0}}function EB8($){let{binaryOverrides:Y,searchPaths:X,packageRunner:G}=$??{},J={typescript:{id:"typescript",name:"TypeScript Language Server",languageIds:["typescript","typescriptreact","javascript","javascriptreact"],markers:["tsconfig.json","package.json"],command:(Q)=>{if(Y?.typescript)return Y.typescript;if(!Zi1(Q,"typescript/lib/tsserver.js",X))return;let W=sC0(Q,"typescript-language-server",X);if(W)return`${W} --stdio`;if(If("typescript-language-server"))return"typescript-language-server --stdio";if(G)return`${G} typescript-language-server --stdio`;return},initialization:(Q)=>{let W=Zi1(Q,"typescript/lib/tsserver.js",X);if(!W)return;return{tsserver:{path:W.resolved,logVerbosity:"off"}}}},eslint:{id:"eslint",name:"ESLint Language Server",languageIds:["typescript","typescriptreact","javascript","javascriptreact"],markers:["package.json",".eslintrc.js",".eslintrc.json",".eslintrc.yml",".eslintrc.yaml","eslint.config.js","eslint.config.mjs","eslint.config.ts"],command:(Q)=>{if(Y?.eslint)return Y.eslint;let W=sC0(Q,"vscode-eslint-language-server",X);if(W)return`${W} --stdio`;if(If("vscode-eslint-language-server"))return"vscode-eslint-language-server --stdio";if(G)return`${G} vscode-eslint-language-server --stdio`;return}},python:{id:"python",name:"Python Language Server (Pyright)",languageIds:["python"],markers:["pyproject.toml","setup.py","requirements.txt","setup.cfg"],command:(Q)=>{if(Y?.python)return Y.python;let W=sC0(Q,"pyright-langserver",X);if(W)return`${W} --stdio`;if(If("pyright-langserver"))return"pyright-langserver --stdio";if(G)return`${G} pyright-langserver --stdio`;return}},go:{id:"go",name:"Go Language Server (gopls)",languageIds:["go"],markers:["go.mod"],command:()=>{if(Y?.go)return Y.go;return If("gopls")?"gopls serve":void 0}},rust:{id:"rust",name:"Rust Language Server (rust-analyzer)",languageIds:["rust"],markers:["Cargo.toml"],command:()=>{if(Y?.rust)return Y.rust;return If("rust-analyzer")?"rust-analyzer --stdio":void 0}}};if($?.servers)for(let Q of Object.values($.servers))J[Q.id]=OB8(Q);return J}function n40($){if(/^[a-zA-Z0-9._\-\/=:@]+$/.test($))return $;return`'${$.replace(/'/g,"'\\''")}'`}function Ki1($){let Y=[],X=[],G="",J=0,Q=!1,W=!1;while(J<$.length){let Z=$[J],K=$[J+1];if(Z==="\\"&&J+1<$.length){G+=Z+K,J+=2;continue}if(Z==="'"&&!W){Q=!Q,G+=Z,J++;continue}if(Z==='"'&&!Q){W=!W,G+=Z,J++;continue}if(!Q&&!W){if(Z==="&"&&K==="&"||Z==="|"&&K==="|"){Y.push(G.trim()),X.push(Z+K),G="",J+=2;while(J<$.length&&/\s/.test($[J]))J++;continue}if(Z===";"){Y.push(G.trim()),X.push(";"),G="",J++;while(J<$.length&&/\s/.test($[J]))J++;continue}}G+=Z,J++}if(G.trim())Y.push(G.trim());return{parts:Y,operators:X}}function MB8($,Y){let X=$[0]??"";for(let G=0;G<Y.length;G++)X+=` ${Y[G]} ${$[G+1]??""}`;return X.trim()}function Ri1($,Y,X){let G=$.split(`
`),J=G.length,Q=Math.max(1,Y??1),W=Math.min(J,X??J);return{content:G.slice(Q-1,W).join(`
`),lines:{start:Q,end:W},totalLines:J}}function RB8($,Y,X){let G=Y??1,J=X?G+X-1:void 0;return Ri1($,G,J)}function qB8($,Y=1){let X=$.split(`
`),G=Y+X.length-1,J=Math.max(6,String(G).length+1);return X.map((Q,W)=>{let Z=Y+W;return`${String(Z).padStart(J)}\u2192${Q}`}).join(`
`)}function IB8($,Y){if(!Y)return 0;let X=0,G=0;while((G=$.indexOf(Y,G))!==-1)X++,G+=Y.length;return X}function PB8($,Y,X,G=!1){let J=IB8($,Y);if(J===0)throw new qi1(Y);if(!G&&J>1)throw new Ii1(Y,J);let Q=X.replace(/\$/g,"$$$$");if(G)return{content:$.split(Y).join(X),replacements:J};else return{content:$.replace(Y,Q),replacements:1}}function _f($,Y={}){let X={..._B8,...Y},G=$;if(X.lowercase)G=G.toLowerCase();if(X.removePunctuation)G=G.replace(/[^\w\s]/g," ");return G.split(X.splitPattern).filter((Q)=>{if(Q.length<X.minLength)return!1;if(X.stopwords?.has(Q))return!1;return!0})}function Ui1($,Y,X={}){if(Y.length===0)return;let G=$.split(`
`),Q={...{lowercase:!0,removePunctuation:!0,minLength:2},...X},W=new Set(Y.map((H)=>Q.lowercase?H.toLowerCase():H)),Z,K;for(let H=0;H<G.length;H++){let z=_f(G[H],X);for(let V of z)if(W.has(V)){let A=H+1;if(Z===void 0)Z=A;K=A;break}}if(Z!==void 0&&K!==void 0)return{start:Z,end:K};return}function jB8($){let Y=new Map;for(let X of $)Y.set(X,(Y.get(X)||0)+1);return Y}function oC0($){return typeof $==="function"&&$.batch===!0}function TB8($){let Y=[],X="name";if(typeof $!=="string")return Y.push(`name: Expected string, received ${typeof $}`),Y;if($.length===0)return Y.push("name: Skill name cannot be empty"),Y;if($.length>iF.MAX_NAME_LENGTH)Y.push(`name: Skill name must be ${iF.MAX_NAME_LENGTH} characters or less`);if(!/^[a-z0-9-]+$/.test($))Y.push("name: Skill name must contain only lowercase letters, numbers, and hyphens");if($.startsWith("-")||$.endsWith("-"))Y.push("name: Skill name must not start or end with a hyphen");if($.includes("--"))Y.push("name: Skill name must not contain consecutive hyphens");return Y}function CB8($){let Y=[],X="description";if(typeof $!=="string")return Y.push(`description: Expected string, received ${typeof $}`),Y;if($.length===0)return Y.push("description: Skill description cannot be empty"),Y;if($.length>iF.MAX_DESCRIPTION_LENGTH)Y.push(`description: Skill description must be ${iF.MAX_DESCRIPTION_LENGTH} characters or less`);if($.trim().length===0)Y.push("description: Skill description cannot be only whitespace");return Y}function SB8($){let Y=[],X="license";if($===void 0||$===null)return Y;if(typeof $!=="string")Y.push(`license: Expected string, received ${typeof $}`);return Y}function kB8($){return[]}function vB8($){let Y=[],X="metadata";if($===void 0||$===null)return Y;if(typeof $!=="object"||Array.isArray($))return Y.push(`metadata: Expected object, received ${Array.isArray($)?"array":typeof $}`),Y;return Y}function xB8($){let Y=$.split(/\s+/).filter(Boolean).length;return Math.ceil(Y*1.3)}function yB8($){return $.split(`
`).length}function bB8($,Y,X){let G=[],J=[];if(typeof $!=="object"||$===null||Array.isArray($))return G.push(`Expected object, received ${$===null?"null":Array.isArray($)?"array":typeof $}`),{valid:!1,errors:G,warnings:J};let Q=$;if(G.push(...TB8(Q.name)),G.push(...CB8(Q.description)),G.push(...SB8(Q.license)),G.push(...kB8()),G.push(...vB8(Q.metadata)),Y&&typeof Q.name==="string"&&Q.name!==Y)G.push(`Skill name "${Q.name}" must match directory name "${Y}"`);if(X){let W=yB8(X),Z=xB8(X);if(W>iF.MAX_INSTRUCTION_LINES)J.push(`Instructions have ${W} lines (recommended: <${iF.MAX_INSTRUCTION_LINES}). Consider moving content to references/.`);if(Z>iF.MAX_INSTRUCTION_TOKENS)J.push(`Instructions have ~${Z} estimated tokens (recommended: <${iF.MAX_INSTRUCTION_TOKENS}). Consider moving content to references/.`)}return{valid:G.length===0,errors:G,warnings:J}}function fB8($){let Y=$.length;while(Y>0&&$.charCodeAt(Y-1)===47)Y--;return Y===$.length?$:$.slice(0,Y)}function gB8($){let Y=0;while(Y<$.length&&$.charCodeAt(Y)===47)Y++;let X=$.length;while(X>Y&&$.charCodeAt(X-1)===47)X--;return Y===0&&X===$.length?$:$.slice(Y,X)}function mY($,Y,X){let G=$?.tracing?.currentSpan??$?.tracingContext?.currentSpan;if(!G)return mB8;let{category:J,operation:Q,input:W,attributes:Z}=X,K=G.createChildSpan({type:"workspace_action",name:`workspace:${J}:${Q}`,input:W,attributes:{category:J,workspaceId:Y?.id,workspaceName:Y?.name,...Z}});return{span:K,end(H,z){K?.end({output:z,attributes:{...H}})},error(H,z){let V=H instanceof Error?H:Error(String(H));K?.error({error:V,attributes:{success:!1,...z}})}}}function wi1($){return{skill:uB8($),skill_search:pB8($),skill_read:dB8($)}}async function _i1($,Y){let X=await $.get(Y);if(X)return{skill:X};let J=(await $.list()).map((Q)=>`${Q.name} (${Q.path})`);return{notFound:`Skill "${Y}" not found. Available skills: ${J.join(", ")}`}}function uB8($){return X8({id:"skill",description:"Activate a skill to load its full instructions. You should activate skills proactively when they are relevant to the user's request without asking for permission first.",inputSchema:U.object({name:U.string().describe("The name or path of the skill to activate. Use the path when multiple skills share the same name.")}),execute:async({name:X},G)=>{let J=mY(G,G?.workspace,{category:"skill",operation:"activate",input:{name:X}});try{let Q=await _i1($,X);if("notFound"in Q)return J.end({success:!1}),Q.notFound;let{skill:W}=Q,Z=[W.instructions];if(W.references?.length)Z.push(`

## References
${W.references.map((K)=>`- references/${K}`).join(`
`)}`);if(W.scripts?.length)Z.push(`

## Scripts
${W.scripts.map((K)=>`- scripts/${K}`).join(`
`)}`);if(W.assets?.length)Z.push(`

## Assets
${W.assets.map((K)=>`- assets/${K}`).join(`
`)}`);return J.end({success:!0}),Z.join("")}catch(Q){throw J.error(Q),Q}}})}function pB8($){return X8({id:"skill_search",description:"Search across skill content to find relevant information. Useful when you need to find specific details within skills.",inputSchema:U.object({query:U.string().describe("The search query"),skillNames:U.array(U.string()).optional().describe("Optional list of skill names to search within"),topK:U.number().optional().describe("Maximum number of results to return (default: 5)")}),execute:async({query:X,skillNames:G,topK:J},Q)=>{let W=mY(Q,Q?.workspace,{category:"skill",operation:"search",input:{query:X,skillNames:G,topK:J},attributes:{}});try{let Z=await $.search(X,{topK:J,skillNames:G});if(Z.length===0)return W.end({success:!0},{resultCount:0}),"No results found.";return W.end({success:!0},{resultCount:Z.length}),Z.map((K)=>{let H=K.content.substring(0,200)+(K.content.length>200?"...":""),z=K.lineRange?` (lines ${K.lineRange.start}-${K.lineRange.end})`:"";return`[${K.skillName}]${z} (score: ${K.score.toFixed(2)})
${H}`}).join(`

`)}catch(Z){throw W.error(Z),Z}}})}function dB8($){return X8({id:"skill_read",description:"Read a file from a skill directory (references, scripts, or assets). The path is relative to the skill root.",inputSchema:U.object({skillName:U.string().describe("The name or path of the skill. Use the path when multiple skills share the same name."),path:U.string().describe('Path to the file relative to the skill root (e.g. "references/colors.md", "scripts/run.sh")'),startLine:U.number().optional().describe("Starting line number (1-indexed). If omitted, starts from the beginning."),endLine:U.number().optional().describe("Ending line number (1-indexed, inclusive). If omitted, reads to the end.")}),execute:async({skillName:X,path:G,startLine:J,endLine:Q},W)=>{let Z=mY(W,W?.workspace,{category:"skill",operation:"read",input:{skillName:X,path:G,startLine:J,endLine:Q},attributes:{}});try{let K=await _i1($,X);if("notFound"in K)return Z.end({success:!1}),K.notFound;let H=K.skill.path,z=null;if(z=await $.getReference(H,G),z===null)z=await $.getScript(H,G);if(z===null)z=await $.getAsset(H,G);if(z===null){let F=(await $.listReferences(H)).map((O)=>`references/${O}`),N=(await $.listScripts(H)).map((O)=>`scripts/${O}`),D=(await $.listAssets(H)).map((O)=>`assets/${O}`),L=[...F,...N,...D],B=L.length>0?`
Available files: ${L.join(", ")}`:"";return Z.end({success:!1}),`File "${G}" not found in skill "${X}".${B}`}let V=typeof z==="string"?z:z.toString("utf-8");if(V.slice(0,1000).includes("\x00")){let F=`${K.skill.path}/${G}`,N=typeof z==="string"?Buffer.byteLength(z):z.length;return Z.end({success:!0},{bytesTransferred:N}),`Binary file: ${F} (${N} bytes)`}z=V;let A=Ri1(z,J,Q);return Z.end({success:!0},{bytesTransferred:Buffer.byteLength(A.content,"utf-8")}),A.content}catch(K){throw Z.error(K),K}}})}function bw($){if(!$?.workspace)throw new WB8;return $.workspace}function hz($){let Y=bw($);if(!Y.filesystem)throw new ZB8;return{workspace:Y,filesystem:Y.filesystem}}function WS0($){let Y=bw($);if(!Y.sandbox)throw new KB8;return{workspace:Y,sandbox:Y.sandbox}}async function sG($,Y){let G=await bw($).getInfo({requestContext:$?.requestContext}),J=$?.agent?.toolCallId;await $?.writer?.custom({type:"data-workspace-metadata",data:{toolName:Y,toolCallId:J,...G}})}async function ZS0($,Y,X){try{let G=$.lsp;if(!G)return"";let J=$.filesystem?.resolveAbsolutePath?.(Y)??YS0.resolve(G.root,Y.replace(/^\/+/,"")),Q=1e4,W,Z=await Promise.race([G.getDiagnostics(J,X),new Promise((D,L)=>{W=setTimeout(()=>L(Error("LSP diagnostics timeout")),Q)})]).finally(()=>clearTimeout(W));if(Z===null)return"";if(Z.length===0)return"";let K=new Set,H=Z.filter((D)=>{let L=`${D.severity}:${D.line}:${D.character}:${D.message}`;if(K.has(L))return!1;return K.add(L),!0}),z={error:[],warning:[],info:[],hint:[]};for(let D of H)z[D.severity].push(D);let V=[`

LSP Diagnostics:`],A=[["error","Errors"],["warning","Warnings"],["info","Info"],["hint","Hints"]];for(let[D,L]of A){let B=z[D];if(B.length===0)continue;V.push(`${L}:`);for(let O of B){let E=O.source?` [${O.source}]`:"";V.push(`  ${O.line}:${O.character} - ${O.message}${E}`)}}let F=V.join(`
`),N=2000;if(F.length>N){let D=F.lastIndexOf(`
`,N);F=F.slice(0,D>0?D:N)+`
  ... (truncated)`}return F}catch{return""}}async function cB8(){if(IO!==void 0)return IO;if(!tC0)tC0=(async()=>{try{let Y=await import("@ast-grep/napi");return IO={parse:Y.parse,Lang:Y.Lang},IO}catch{return IO=null,null}})();return tC0}function lB8(){if(IO!==void 0)return IO!==null;try{return c40(import.meta.url).resolve("@ast-grep/napi"),!0}catch{return!1}}function iB8($,Y){switch($.split(".").pop()?.toLowerCase()){case"ts":return Y.TypeScript;case"tsx":case"jsx":return Y.Tsx;case"js":return Y.JavaScript;case"html":return Y.Html;case"css":return Y.Css;default:return null}}function nB8($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rB8($,Y,X,G){let J=$,Q=0,W=Y.findAll({rule:{kind:"identifier",regex:`^${nB8(X)}$`}}),Z=[],K=new Set;for(let H of W){let z=H.range();if(K.has(z.start.index))continue;K.add(z.start.index),Z.push({start:z.start.index,end:z.end.index,text:G}),Q++}Z.sort((H,z)=>z.start-H.start);for(let{start:H,end:z,text:V}of Z)J=J.slice(0,H)+V+J.slice(z);return{content:J,count:Q}}function ji1($,Y,X){if($&&Y.length>0)return`import ${$}, { ${Y.join(", ")} } from ${X};`;else if($)return`import ${$} from ${X};`;else return`import { ${Y.join(", ")} } from ${X};`}function aB8($,Y,X,G){let J=Y.text();if(/^import\s+\*\s+as\s+/.test(J))return null;let Q=J.match(/^import\s+(?!type\s)(?!\{)(\w+)/),W=J.match(/\{([^}]*)\}/),Z=J.match(/(["'][^"']+["'])\s*;?\s*$/);if(!Z)return null;let K=Z[1]??"",H=Q?Q[1]??null:null,z=W?(W[1]??"").split(",").map((B)=>B.trim()).filter(Boolean):[],V=H,A=[...z];if(G&&X.length>0){if(!H)V=X[0]??null;for(let B of X.slice(1))if(!A.includes(B))A.push(B)}else for(let B of X)if(!A.includes(B))A.push(B);let F=V!==H,N=A.length!==z.length;if(!F&&!N)return null;let D=ji1(V,A,K),L=Y.range();return $.slice(0,L.start.index)+D+$.slice(L.end.index)}function sB8($,Y,X){let{module:G,names:J,isDefault:Q}=X,W=Y.findAll({rule:{kind:"import_statement"}}),Z=W.find((V)=>{let A=V.text();if(/^import\s+type\s/.test(A))return!1;if(/^import\s+\*\s+as\s+/.test(A))return!1;return A.includes(`'${G}'`)||A.includes(`"${G}"`)});if(Z)return aB8($,Z,J,Q)??$;let K=`'${G}'`,H=ji1(Q?J[0]:null,Q?J.slice(1):J,K),z=W.at(-1);if(z){let V=z.range().end.index;return $.slice(0,V)+`
`+H+$.slice(V)}else return H+`

`+$}function oB8($,Y,X){let G=Y.findAll({rule:{kind:"import_statement"}});for(let J of G){let W=J.text().match(/from\s+['"]([^'"]+)['"]|import\s+['"]([^'"]+)['"]/),Z=W?.[1]??W?.[2];if(Z===X||Z?.startsWith(`${X}/`)){let K=J.range(),H=K.start.index,z=K.end.index;if($[z]===`
`)z++;return $.slice(0,H)+$.slice(z)}}return $}function tB8($,Y,X,G){let J=$,Q=0;try{let W=Y.findAll({rule:{pattern:X}}),Z=[],K=[...X.matchAll(/\$(\w+)/g)].map((H)=>H[1]).filter((H)=>H!==void 0);for(let H of W){let z=H.range(),V=G;for(let A of K){let F=H.getMatch(A);if(F)V=V.replace(new RegExp(`\\$${A}`,"g"),F.text())}Z.push({start:z.start.index,end:z.end.index,text:V}),Q++}Z.sort((H,z)=>z.start-H.start);for(let{start:H,end:z,text:V}of Z)J=J.slice(0,H)+V+J.slice(z)}catch(W){return{content:J,count:0,error:W instanceof Error?W.message:"Pattern matching failed"}}return{content:J,count:Q}}function QO8($){return $.replace(JO8,"")}function a40($){if(typeof $==="string")return{type:"text",value:QO8($)};return $}function WO8($,Y){if(!$)return $;let X=Math.abs(Y??KS0);if(X===0)return $;let G=$.endsWith(`
`),J=(G?$.slice(0,-1):$).split(`
`);if(J.length<=X)return $;let Q=J.slice(-X).join(`
`),W=G?Q+`
`:Q;return`[showing last ${X} of ${J.length} lines]
${W}`}async function wf($,Y=Ti1,X="start"){if(!$)return $;let G=JG($);if(G<=Y)return $;let J=X==="start"?Rf($,-Y):Rf($,0,Y),Q=X==="start"?"last":"first";return X==="start"?`[output truncated: showing ${Q} ~${Y} of ~${G} tokens]
${J}`:`${J}
[output truncated: showing ${Q} ~${Y} of ~${G} tokens]`}async function ZO8($,Y=Ti1,X=0.1){if(!$)return $;let G=JG($);if(G<=Y)return $;let J=Math.floor(Y*X),Q=Y-J,W=J>0?Rf($,0,J):"",Z=Q>0?Rf($,-Q):"",K=`[...output truncated \u2014 showing first ~${J} + last ~${Q} of ~${G} tokens...]`;return[W,K,Z].filter(Boolean).join(`
`)}async function bz($,Y,X,G){let J=WO8($,Y);return ZO8(J,X)}function HO8($){let Y=$.match(/\|\s*tail\s+(?:-n\s+)?(-?\d+)\s*$/);if(Y){let X=Math.abs(parseInt(Y[1],10));if(X>0)return{command:$.replace(/\|\s*tail\s+(?:-n\s+)?-?\d+\s*$/,"").trim(),tail:X}}return{command:$}}async function Si1($,Y){let{command:X,cwd:G,tail:J}=$,Q=$.timeout!=null?$.timeout*1000:void 0,W=$.background,{workspace:Z,sandbox:K}=WS0(Y);if(!W){let M=HO8(X);if(X=M.command,M.tail!=null)J=M.tail}let H=Z.browser,{browserClis:z,usingExternalCdp:V,externalCdpUrl:A}=Pf.analyzeCommand(X);if(H&&z.length>0&&!V){let M=Y?.agent?.threadId??Y?.threadId??"default";if(!H.isBrowserRunning(M))await H.launch(M);let R=H.getCdpUrl(M),q=H.id;if(R){let w=Pf.getWarmupCommands(q,z,R,M);for(let{cliName:I,command:P}of w)try{if(K.executeCommand)await K.executeCommand(P,[],{timeout:1e4});Pf.markWarmedUp(q,I,M),Pf.registerWarmupCleanup(q,I,M,H)}catch{}X=Pf.injectCdpUrl(X,R,M)}}else if(H&&z.length>0&&V&&A){let M=Y?.agent?.threadId??Y?.threadId??"default";try{await H.connectToExternalCdp(A,M)}catch{}}await sG(Y,n4.SANDBOX.EXECUTE_COMMAND);let F=Y?.agent?.toolCallId,N=Z.getToolsConfig()?.[n4.SANDBOX.EXECUTE_COMMAND],D=N?.maxOutputTokens,L=mY(Y,Z,{category:"sandbox",operation:W?"spawnProcess":"executeCommand",input:{command:X,cwd:G,timeout:$.timeout,background:W},attributes:{sandboxProvider:K.provider}});if(W){if(!K.processes){let w=new l40("processes");throw L.error(w),w}let M=N?.backgroundProcesses,R=M?.abortSignal===void 0?Y?.abortSignal:M.abortSignal||void 0,q;if(q=await K.processes.spawn(X,{cwd:G??void 0,timeout:Q??void 0,abortSignal:R,onStdout:M?.onStdout?(w)=>M.onStdout(w,{pid:q.pid,toolCallId:F}):void 0,onStderr:M?.onStderr?(w)=>M.onStderr(w,{pid:q.pid,toolCallId:F}):void 0}),M?.onExit)q.wait().then((w)=>{M.onExit({pid:q.pid,exitCode:w.exitCode,stdout:w.stdout,stderr:w.stderr,stdoutTruncated:w.stdoutTruncated,stderrTruncated:w.stderrTruncated,stdoutDroppedBytes:w.stdoutDroppedBytes,stderrDroppedBytes:w.stderrDroppedBytes,toolCallId:F})});return L.end({success:!0},{pid:Number(q.pid)||void 0}),`Started background process (PID: ${q.pid})`}if(!K.executeCommand){let M=new l40("executeCommand");throw L.error(M),M}let B=Date.now(),O="",E="";try{let M=await K.executeCommand(X,[],{timeout:Q??void 0,cwd:G??void 0,abortSignal:Y?.abortSignal,onStdout:async(R)=>{O+=R,await Y?.writer?.custom({type:"data-sandbox-stdout",data:{output:R,timestamp:Date.now(),toolCallId:F},transient:!0})},onStderr:async(R)=>{E+=R,await Y?.writer?.custom({type:"data-sandbox-stderr",data:{output:R,timestamp:Date.now(),toolCallId:F},transient:!0})}});if(await Y?.writer?.custom({type:"data-sandbox-exit",data:{exitCode:M.exitCode,success:M.success,executionTimeMs:M.executionTimeMs,toolCallId:F}}),L.end({success:M.success},{exitCode:M.exitCode}),!M.success){let R=[await bz(M.stdout,J,D),await bz(M.stderr,J,D)].filter(Boolean);return R.push(`Exit code: ${M.exitCode}`),R.join(`
`)}return await bz(M.stdout,J,D)||"(no output)"}catch(M){await Y?.writer?.custom({type:"data-sandbox-exit",data:{exitCode:-1,success:!1,executionTimeMs:Date.now()-B,toolCallId:F}}),L.end({success:!1},{exitCode:-1});let R=[await bz(O,J,D),await bz(E,J,D)].filter(Boolean),q=M instanceof Error?M.message:String(M);return R.push(`Error: ${q}`),R.join(`
`)}}async function vi1($){let Y;try{let G=await $.readFile(".gitignore",{encoding:"utf-8"});if(typeof G!=="string"||!G.trim())return;Y=G}catch{return}let X=Li1.default().add(Y);return(G)=>{let J=G.replace(/^\.\//,"").replace(/^\//,"");if(!J)return!1;return X.ignores(J)}}async function BO8($,Y,X){let G=X?.maxDepth??1/0,J=X?.showHidden??!1,Q=X?.dirsOnly??!1,W=X?.exclude,Z=X?.extension,K=X?.pattern,H=X?.respectGitignore??!0,z=X?.ignoreFilter;if(!z&&H){let R=await vi1($);if(R){let q=Y.replace(/^\.\//,"").replace(/^\//,"").replace(/\/$/,"");z=q&&R(q+"/")?void 0:R}}let V;if(K){let R=Array.isArray(K)?K:[K];V=QS0(R,{dot:J})}let A=["."],F=[],N=0,D=0,L=!1;async function B(R,q){if(q>=G){L=!0;return}let w;try{w=await $.readdir(R)}catch(_){if(q===0)throw _;return}let I=w;if(!J)I=I.filter((_)=>!_.name.startsWith("."));if(W){let _=Array.isArray(W)?W:[W];I=I.filter((C)=>{return!_.some((k)=>C.name.includes(k))})}if(z)I=I.filter((_)=>{let C=$S0("",R,_.name),k=_.type==="directory"?`${C}/`:C;return!z(k)});if(Q)I=I.filter((_)=>_.type==="directory");if(Z&&!Q){let _=Array.isArray(Z)?Z:[Z];I=I.filter((C)=>{if(C.type==="directory")return!0;return _.some((k)=>{let S=k.startsWith(".")?k:`.${k}`;return C.name.endsWith(S)})})}if(V&&!Q)I=I.filter((_)=>{if(_.type==="directory")return!0;let C=$S0(Y,R,_.name);return V(C)});I.sort((_,C)=>{if(_.type==="directory"&&C.type!=="directory")return-1;if(_.type!=="directory"&&C.type==="directory")return 1;return _.name<C.name?-1:_.name>C.name?1:0});let P="\t".repeat(q);for(let _=0;_<I.length;_++){let C=I[_],k=C.isSymlink&&C.symlinkTarget?`${C.name} -> ${C.symlinkTarget}`:C.name;if(A.push(`${P}${k}`),F.push($S0(Y,R,C.name)),C.type==="directory"){if(N++,!C.isSymlink){let S=OO8(R,C.name);await B(S,q+1)}}else D++}}await B(Y,0);let O=N===1?"1 directory":`${N} directories`,E=D===1?"1 file":`${D} files`,M=`${O}, ${E}`;if(L)M+=` (truncated at depth ${G})`;return{tree:A.join(`
`),summary:M,dirCount:N,fileCount:D,truncated:L,paths:F}}function $S0($,Y,X){let G=(W)=>W==="/"||W===""||W===".",J=Y===$||G(Y)&&G($)?X:`${Y==="/"?"":Y}/${X}`;if(G($)){let W=J.replace(/^\.\//,"");return W.startsWith("/")?W.slice(1):W}return(J.startsWith($+"/")?J.slice($.length+1):J)||J}function OO8($,Y){if($===""||$==="./"||$===".")return Y;if($==="/")return`/${Y}`;return`${$}/${Y}`}async function MO8($,Y){try{return(await XS0.readFile($,"utf-8")).split(`
`)[Y-1]?.trim()??null}catch{return null}}function RO8($,Y,X){let G=X?.($);if(G)return G;if(YS0.isAbsolute($))return $;return YS0.resolve(Y,$)}function zi1($){if(!$.startsWith("file://"))return null;try{return JB8($)}catch{return null}}function Vi1($){return`${$.path}:L${$.line}`}function Ai1($){let Y=process.cwd();if($.startsWith(Y))return"$cwd"+$.slice(Y.length);return $}function PO8($){return typeof $==="object"&&$!==null&&$.__workspaceMedia===!0&&typeof $.text==="string"&&typeof $.mediaType==="string"&&typeof $.data==="string"}function TO8($){if(!$)return!0;if($==="application/octet-stream")return!0;if($.startsWith("text/"))return!0;if(jO8.has($))return!0;if($.endsWith("+json")||$.endsWith("+xml"))return!0;return!1}function SO8($){for(let Y of $)if(typeof Y!=="string"||!CO8.test(Y))throw Error(`Invalid \`mediaTypes\` pattern: ${JSON.stringify(Y)}. Expected \`*\`, \`*/*\`, \`type/*\`, or a full mime type like \`application/pdf\`.`)}function kO8($){if($===!1)return()=>!1;if(typeof $==="function")return(X)=>X?$(X):!1;let Y=$??wO8;return SO8(Y),(X)=>{if(!X)return!1;return Y.some((G)=>{if(G==="*"||G==="*/*")return!0;if(G.endsWith("/*"))return X.startsWith(G.slice(0,-1));return X===G})}}async function US0($,Y,X){if($===void 0)return X;if(typeof $==="boolean")return $;if(!Y)return X;try{return await $(Y)}catch(G){return console.warn("[Workspace Tools] Dynamic config function threw, using safe default:",G),X}}function yi1($){if(typeof $?.hasFilesystemConfig==="function")return $.hasFilesystemConfig();return!!$.filesystem}function Fi1($){if(!$)return{};if(typeof $.entries==="function")return Object.fromEntries($.entries());return $}async function bO8($,Y,X){let G=!0,J=!1,Q,W,Z;if($){if($.enabled!==void 0)G=$.enabled;if($.requireApproval!==void 0)J=$.requireApproval;let H=$[Y];if(H){if(H.enabled!==void 0)G=H.enabled;if(H.requireApproval!==void 0)J=H.requireApproval;if(H.requireReadBeforeWrite!==void 0)Q=H.requireReadBeforeWrite;if(H.maxOutputTokens!==void 0)W=H.maxOutputTokens;if(H.name!==void 0)Z=H.name}}return{enabled:await US0(G,X,!1),requireApproval:J,requireReadBeforeWrite:Q,maxOutputTokens:W,name:Z}}async function bi1($,Y){if(!$.filesystem&&yi1($)){let X=Y?.requestContext??new p1,G=await $.resolveFilesystem({requestContext:X});if(G)return new Proxy($,{get(J,Q){if(Q==="filesystem")return G;return J[Q]}})}return $}function hO8($,Y){return{...$,execute:async(X,G={})=>{let J=await bi1(G?.workspace??Y,G),Q={...G,workspace:J};return $.execute(X,Q)}}}function fO8($,Y,X,G,J){return{...$,execute:async(Q,W={})=>{let Z=await bi1(W?.workspace??Y,W),K={...W,workspace:Z},H=Z.filesystem;if(J==="write"&&H){let V=X.getReadRecord(Q.path);if(V)K={...K,__expectedMtime:V.modifiedAtRead};try{let A=await H.stat(Q.path);if(G.requireReadBeforeWrite!==void 0){if(await US0(G.requireReadBeforeWrite,{args:Q,requestContext:K.requestContext??{},workspace:Z},!0)){let N=X.needsReRead(Q.path,A.modifiedAt);if(N.needsReRead)throw new UB8(Q.path,N.reason)}}}catch(A){if(!(A instanceof r40))throw A}}let z=await $.execute(Q,K);if(J==="read"&&H)try{let V=await H.stat(Q.path);X.recordRead(Q.path,V.modifiedAt)}catch{}else if(J==="write")X.clearReadRecord(Q.path);return z}}}function gO8($,Y){return{...$,execute:async(X,G={})=>{if(!X.path)throw Error("wrapWithWriteLock: input.path is required");return Y.withLock(X.path,()=>$.execute(X,G))}}}async function hi1($,Y){let X=Y?{...Y,requestContext:Fi1(Y.requestContext)}:{requestContext:{},workspace:$},G={},J=$.getToolsConfig(),Q=$.filesystem?.readOnly??!1,W=new LB8,Z=new NB8,K=async(H,z,V)=>{let A=await bO8(J,H,X);if(!A.enabled)return;if(V?.requireWrite&&Q)return;let F;if(typeof A.requireApproval==="function"){let D=A.requireApproval;F={...z,requireApproval:!0,needsApprovalFn:async(L,B)=>US0(D,{args:L,requestContext:Fi1(B?.requestContext),workspace:B?.workspace??$},!0)}}else F={...z,requireApproval:A.requireApproval};if(V?.readTrackerMode)F=fO8(F,$,Z,A,V.readTrackerMode);else F=hO8(F,$);if(V?.useWriteLock)F=gO8(F,W);let N=A.name??H;if(G[N])throw Error(`Duplicate workspace tool name "${N}": tool "${H}" conflicts with an already-registered tool. Check your tools config for duplicate "name" values.`);if(N!==H&&"id"in F)F={...F,id:N};G[N]=F};if(yi1($)){if(await K(n4.FILESYSTEM.READ_FILE,vO8,{readTrackerMode:"read"}),await K(n4.FILESYSTEM.WRITE_FILE,yO8,{requireWrite:!0,readTrackerMode:"write",useWriteLock:!0}),await K(n4.FILESYSTEM.EDIT_FILE,YO8,{requireWrite:!0,readTrackerMode:"write",useWriteLock:!0}),await K(n4.FILESYSTEM.LIST_FILES,EO8),await K(n4.FILESYSTEM.DELETE,$O8,{requireWrite:!0,useWriteLock:!0}),await K(n4.FILESYSTEM.FILE_STAT,AO8),await K(n4.FILESYSTEM.MKDIR,IO8,{requireWrite:!0}),await K(n4.FILESYSTEM.GREP,DO8),lB8())await K(n4.FILESYSTEM.AST_EDIT,eB8,{requireWrite:!0,readTrackerMode:"write",useWriteLock:!0})}if($.canBM25||$.canVector){let H=[$.canBM25?"bm25":null,$.canVector?"vector":null,$.canHybrid?"hybrid":null].filter((V)=>V!==null),z={...xO8,inputSchema:xi1.extend({mode:U.enum(H).optional().describe(`Search mode: ${H.join(", ")}`)})};await K(n4.SEARCH.SEARCH,z),await K(n4.SEARCH.INDEX,NO8,{requireWrite:!0})}if($.sandbox){if($.sandbox.executeCommand){let H=$.sandbox.processes?VO8:zO8;await K(n4.SANDBOX.EXECUTE_COMMAND,H)}if($.sandbox.processes)await K(n4.SANDBOX.GET_PROCESS_OUTPUT,FO8),await K(n4.SANDBOX.KILL_PROCESS,LO8)}return await K(n4.LSP.LSP_INSPECT,qO8),G}var Di1,Ni1,Li1,jf,WB8,ZB8,KB8,l40,Tf,Bi1,r40,UB8,zB8,AB8,NB8=class{records=new Map;recordRead($,Y){let X=this.normalizePath($);this.records.set(X,{path:X,readAt:new Date,modifiedAtRead:Y})}getReadRecord($){return this.records.get(this.normalizePath($))}needsReRead($,Y){let X=this.getReadRecord($);if(!X)return{needsReRead:!0,reason:`File "${$}" has not been read. You must read a file before writing to it.`};if(Y.getTime()>X.modifiedAtRead.getTime())return{needsReRead:!0,reason:`File "${$}" was modified since last read (read at: ${X.modifiedAtRead.toISOString()}, current: ${Y.toISOString()}). Please re-read the file to get the latest contents.`};return{needsReRead:!1}}clearReadRecord($){this.records.delete(this.normalizePath($))}clear(){this.records.clear()}normalizePath($){return q$.posix.normalize($.replace(/\\/g,"/")).replace(/\/$/,"")||"/"}},LB8=class{queues=new Map;timeoutMs;constructor($){this.timeoutMs=$?.timeoutMs??30000}get size(){return this.queues.size}withLock($,Y){let X=this.normalizePath($),G=this.queues.get(X)??Promise.resolve(),J,Q,W=new Promise((K,H)=>{J=K,Q=H}),Z=G.catch(()=>{}).then(async()=>{let K;try{let H=await Promise.race([Y(),new Promise((z,V)=>{K=setTimeout(()=>V(Error(`write-lock timeout on "${X}" after ${this.timeoutMs}ms`)),this.timeoutMs)})]);clearTimeout(K),J(H)}catch(H){clearTimeout(K),Q(H)}});return this.queues.set(X,Z),Z.finally(()=>{if(this.queues.get(X)===Z)this.queues.delete(X)}),W}normalizePath($){return q$.posix.normalize($.replace(/\\/g,"/").replace(/^\/\/+/,"/")).replace(/\/+$/,"")||"/"}},Oi1,Bl5,Ol5,El5,qi1,Ii1,wB8,_B8,Pi1=class ${k1;b;#$=new Map;#Y=new Map;#X=new Map;#J=0;#G=0;#Q;constructor(Y={},X={}){this.k1=Y.k1??1.5,this.b=Y.b??0.75,this.#Q=X}add(Y,X,G){if(this.#$.has(Y))this.remove(Y);let J=_f(X,this.#Q),Q=jB8(J),W={id:Y,content:X,tokens:J,termFrequencies:Q,length:J.length,metadata:G};this.#$.set(Y,W),this.#G++;for(let Z of Q.keys()){if(!this.#Y.has(Z))this.#Y.set(Z,new Set);this.#Y.get(Z).add(Y),this.#X.set(Z,(this.#X.get(Z)||0)+1)}this.#U()}remove(Y){let X=this.#$.get(Y);if(!X)return!1;for(let G of X.termFrequencies.keys()){let J=this.#Y.get(G);if(J)if(J.delete(Y),J.size===0)this.#Y.delete(G),this.#X.delete(G);else this.#X.set(G,(this.#X.get(G)||1)-1)}return this.#$.delete(Y),this.#G--,this.#U(),!0}clear(){this.#$.clear(),this.#Y.clear(),this.#X.clear(),this.#G=0,this.#J=0}search(Y,X=10,G=0){let J=_f(Y,this.#Q);if(J.length===0||this.#G===0)return[];let Q=new Map;for(let Z of J){let K=this.#Y.get(Z);if(!K)continue;let H=this.#X.get(Z)||0,z=this.#K(H);for(let V of K){let A=this.#$.get(V),F=A.termFrequencies.get(Z)||0,N=this.#W(F,A.length,z);Q.set(V,(Q.get(V)||0)+N)}}let W=[];for(let[Z,K]of Q.entries())if(K>=G){let H=this.#$.get(Z);W.push({id:Z,content:H.content,score:K,metadata:H.metadata})}return W.sort((Z,K)=>K.score-Z.score),W.slice(0,X)}get(Y){return this.#$.get(Y)}has(Y){return this.#$.has(Y)}get size(){return this.#G}get documentIds(){return Array.from(this.#$.keys())}serialize(){let Y=[];for(let[X,G]of this.#$.entries())Y.push({id:X,content:G.content,tokens:G.tokens,termFrequencies:Object.fromEntries(G.termFrequencies),length:G.length,metadata:G.metadata});return{k1:this.k1,b:this.b,documents:Y,avgDocLength:this.#J}}static deserialize(Y,X={}){let G=new $({k1:Y.k1,b:Y.b},X);for(let J of Y.documents){let Q=new Map(Object.entries(J.termFrequencies)),W={id:J.id,content:J.content,tokens:J.tokens,termFrequencies:Q,length:J.length,metadata:J.metadata};G.#$.set(J.id,W),G.#G++;for(let Z of Q.keys()){if(!G.#Y.has(Z))G.#Y.set(Z,new Set);G.#Y.get(Z).add(J.id),G.#X.set(Z,(G.#X.get(Z)||0)+1)}}return G.#J=Y.avgDocLength,G}#U(){if(this.#G===0){this.#J=0;return}let Y=0;for(let X of this.#$.values())Y+=X.length;this.#J=Y/this.#G}#K(Y){return Math.log((this.#G-Y+0.5)/(Y+0.5)+1)}#W(Y,X,G){let J=Y*(this.k1+1),Q=Y+this.k1*(1-this.b+this.b*(X/this.#J));return G*(J/Q)}},d40=8,Ml5=class{#$;#Y;#X;#J;#G=new Set;#Q=[];#U=!1;#K=!1;constructor($={}){if($.bm25!==void 0)this.#Y=$.bm25.tokenize,this.#$=new Pi1($.bm25.bm25,this.#Y);if($.vector)this.#X=$.vector;this.#J=$.lazyVectorIndex??!1}async index($){let Y={...$.metadata};if($.startLineOffset!==void 0)Y._startLineOffset=$.startLineOffset;if(this.#G.add($.id),this.#$)this.#$.add($.id,$.content,Y);if(this.#X){let X={...$,metadata:Y};if(this.#J)this.#Q.push(X),this.#U=!1;else await this.#V(X)}}async indexMany($,Y){let X=Y?.stopOnError,G=Y?.concurrency??d40;await LO($,(J)=>this.index(J),{stopOnError:X,concurrency:G})}async remove($){if(this.#G.delete($),this.#$)this.#$.remove($);if(this.#X){try{await this.#X.vectorStore.deleteVector({indexName:this.#X.indexName,id:$})}catch{}if(this.#J)this.#Q=this.#Q.filter((Y)=>Y.id!==$)}}async removeByPrefix($){let Y=[...this.#G].filter((X)=>X.startsWith($));for(let X of Y)this.#G.delete(X);if(this.#$)for(let X of Y)this.#$.remove(X);if(this.#X){if(this.#J)this.#Q=this.#Q.filter((X)=>!X.id.startsWith($));for(let X of Y)try{await this.#X.vectorStore.deleteVector({indexName:this.#X.indexName,id:X})}catch{}}}async removeSource($){if(await this.remove($),await this.removeByPrefix(`${$}#chunk-`),this.#X)try{await this.#X.vectorStore.deleteVectors({indexName:this.#X.indexName,filter:{sourceFile:$}})}catch{}}clear(){if(this.#G.clear(),this.#$)this.#$.clear();this.#Q=[],this.#U=!1}async search($,Y={}){let{topK:X=10,minScore:G,mode:J,vectorWeight:Q=0.5,filter:W}=Y,Z=this.#W(J);if(Z==="bm25")return this.#N($,X,G);if(Z==="vector")return this.#B($,X,G,W);return this.#R($,X,G,Q,W)}get canBM25(){return!!this.#$}get canVector(){return!!this.#X}get canHybrid(){return this.canBM25&&this.canVector}get bm25Index(){return this.#$}#W($){if($){if($==="vector"&&!this.canVector)throw Error("Vector search requires vector configuration.");if($==="bm25"&&!this.canBM25)throw Error("BM25 search requires BM25 configuration.");if($==="hybrid"&&!this.canHybrid)throw Error("Hybrid search requires both vector and BM25 configuration.");return $}if(this.canHybrid)return"hybrid";if(this.canVector)return"vector";if(this.canBM25)return"bm25";throw Error("No search configuration available. Provide bm25 or vector config.")}async#H($){if(!this.#X)throw Error("Vector configuration is required to embed text.");let{embedder:Y}=this.#X;if(oC0(Y)){let[X]=await Y([$]);if(!X)throw Error("Batch embedder returned no embedding for input text.");return X}return Y($)}async#A($){if(!this.#X)throw Error("Vector configuration is required to embed texts.");if($.length===0)return[];let{embedder:Y}=this.#X;if(oC0(Y)){let X=Y.maxBatchSize;if(X===void 0||$.length<=X)return Y($);let G=[];for(let Q=0;Q<$.length;Q+=X)G.push($.slice(Q,Q+X));return(await LO(G,(Q)=>Y(Q),{concurrency:d40})).flat()}return LO($,(X)=>Y(X),{concurrency:d40})}async#V($){if(!this.#X)return;let{vectorStore:Y,indexName:X}=this.#X,G=await this.#H($.content);if(!this.#K)try{await Y.createIndex({indexName:X,dimension:G.length})}catch{}await Y.upsert({indexName:X,vectors:[G],metadata:[{id:$.id,text:$.content,...$.metadata}],ids:[$.id]}),this.#K=!0}async#Z($){if(!this.#X||$.length===0)return;let{vectorStore:Y,embedder:X,indexName:G}=this.#X;if(!oC0(X)){await LO($,(Q)=>this.#V(Q),{concurrency:d40});return}let J=await this.#A($.map((Q)=>Q.content));if(J.length!==$.length)throw Error(`Batch embedder returned ${J.length} embeddings for ${$.length} inputs.`);if(!this.#K){let Q=J[0].length;try{await Y.createIndex({indexName:G,dimension:Q})}catch{}}await Y.upsert({indexName:G,vectors:J,metadata:$.map((Q)=>({id:Q.id,text:Q.content,...Q.metadata})),ids:$.map((Q)=>Q.id)}),this.#K=!0}#L($){let Y=new Map;for(let X of $)Y.set(X.id,X);return[...Y.values()]}async#O(){if(!this.#J)return;if(this.#Q.length===0){this.#U=!0;return}while(this.#Q.length>0){let $=this.#Q;this.#Q=[];let Y=this.#L($);try{await this.#Z(Y)}catch(X){throw this.#Q=[...Y,...this.#Q],X}}this.#U=!0}#N($,Y,X){if(!this.#$)throw Error("BM25 search requires BM25 configuration.");let G=this.#$.search($,Y,X),J=_f($,this.#Y);return G.map((Q)=>{let W=Ui1(Q.content,J,this.#Y),Z=this.#F(W,Q.metadata),{_startLineOffset:K,...H}=Q.metadata??{};return{id:Q.id,content:Q.content,score:Q.score,lineRange:Z,metadata:Object.keys(H).length>0?H:void 0,scoreDetails:{bm25:Q.score}}})}async#B($,Y,X,G){if(!this.#X)throw Error("Vector search requires vector configuration.");await this.#O();let{vectorStore:J,indexName:Q}=this.#X,W=await this.#H($),Z=await J.query({indexName:Q,queryVector:W,topK:Y,filter:G}),K=_f($,this.#Y),H=[];for(let z of Z){if(X!==void 0&&z.score<X)continue;let V=z.metadata?.id??z.id,A=z.metadata?.text??"",{id:F,text:N,_startLineOffset:D,...L}=z.metadata??{},B=Ui1(A,K,this.#Y),O=this.#F(B,z.metadata);H.push({id:V,content:A,score:z.score,lineRange:O,metadata:Object.keys(L).length>0?L:void 0,scoreDetails:{vector:z.score}})}return H}async#R($,Y,X,G=0.5,J){let Q=Math.min(Y*2,50),[W,Z]=await Promise.all([this.#B($,Q,void 0,J),Promise.resolve(this.#N($,Q,void 0))]),K=this.#D(Z),H=new Map;for(let D of K)H.set(D.id,D);let z=new Map;for(let D of W)z.set(D.id,D);let V=new Map,A=new Set([...z.keys(),...H.keys()]),F=1-G;for(let D of A){let L=z.get(D),B=H.get(D),O=L?.scoreDetails?.vector??0,E=B?.score??0,M=G*O+F*E,R=L??B;V.set(D,{id:D,content:R.content,score:M,lineRange:B?.lineRange??L?.lineRange,metadata:R.metadata,scoreDetails:{vector:L?.scoreDetails?.vector,bm25:B?.scoreDetails?.bm25}})}let N=Array.from(V.values());if(N.sort((D,L)=>L.score-D.score),X!==void 0)N=N.filter((D)=>D.score>=X);return N.slice(0,Y)}#D($){if($.length===0)return $;let Y=$.map((Q)=>Q.scoreDetails?.bm25??Q.score),X=Math.max(...Y),G=Math.min(...Y),J=X-G;if(J===0)return $.map((Q)=>({...Q,score:1}));return $.map((Q)=>({...Q,score:((Q.scoreDetails?.bm25??Q.score)-G)/J}))}#F($,Y){if(!$)return;let X=Y?._startLineOffset;if(typeof X!=="number")return $;return{start:$.start+X-1,end:$.end+X-1}}},iF,Rl5=class{#$;constructor($={}){this.#$=$.basePath??process.cwd()}#Y($){if(q$.isAbsolute($))return $;return q$.resolve(this.#$,$)}async exists($){return FB8(this.#Y($))}async stat($){return DB8(this.#Y($),$)}async readFile($){let Y=this.#Y($),X=await G$.readFile(Y);if(JS0($))return X.toString("utf-8");return X}async readdir($){let Y=this.#Y($),X=await G$.readdir(Y,{withFileTypes:!0});return Promise.all(X.map(async(G)=>{let J=q$.join(Y,G.name),Q=G.isSymbolicLink(),W=G.isDirectory()?"directory":"file";if(Q)try{W=(await G$.stat(J)).isDirectory()?"directory":"file"}catch{W="file"}return{name:G.name,type:W,isSymlink:Q||void 0}}))}async realpath($){return G$.realpath(this.#Y($))}},hB8=class{#$;#Y;#X;#J;constructor($,Y,X){this.#$=$,this.#Y=Y,this.#X=X,this.#J=this.#G()}#G(){let $=new Set;$.add(""),$.add(".");for(let Y of Object.keys(this.#$.entries)){let X=Y.split("/");for(let G=1;G<X.length;G++)$.add(X.slice(0,G).join("/"))}return $}#Q($){let Y=$.replace(/^[./\\]+|[/\\]+$/g,"");if(Y==="")return"";return Y}async exists($){let Y=this.#Q($);if(this.#$.entries[Y])return!0;return this.#J.has(Y)}async stat($){let Y=this.#Q($),X=Y.split("/").pop()||Y||".",G=this.#$.entries[Y];if(G)return{name:X,type:"file",size:G.size,createdAt:this.#X,modifiedAt:this.#X,mimeType:G.mimeType};if(this.#J.has(Y))return{name:X,type:"directory",size:0,createdAt:this.#X,modifiedAt:this.#X};throw Error(`Path not found in skill version tree: ${$}`)}async readFile($){let Y=this.#Q($),X=this.#$.entries[Y];if(!X)throw Error(`File not found in skill version tree: ${$}`);let G=await this.#Y.get(X.blobHash);if(!G)throw Error(`Blob not found for hash ${X.blobHash} (file: ${$})`);if(X.encoding==="base64")return Buffer.from(G.content,"base64");return G.content}async readdir($){let Y=this.#Q($);if(!this.#J.has(Y))throw Error(`Directory not found in skill version tree: ${$}`);let X=Y===""?"":Y+"/",G=new Set,J=[];for(let Q of Object.keys(this.#$.entries)){if(!Q.startsWith(X))continue;let W=Q.slice(X.length),Z=W.split("/")[0];if(!Z||G.has(Z))continue;G.add(Z);let K=W.includes("/");J.push({name:Z,type:K?"directory":"file"})}return J}async realpath($){return this.#Q($)}},ql5=class{#$=new Map;#Y;#X;#J;constructor($,Y,X){let G=0;for(let J of $){this.#$.set(J.dirName,new hB8(J.tree,Y,J.versionCreatedAt));let Q=J.versionCreatedAt.getTime();if(Q>G)G=Q}this.#J=G>0?new Date(G):new Date(0),this.#Y=X?.fallback,this.#X=new Set(X?.fallbackSkills??[])}#G($){let Y=0;while(Y<$.length){let G=$.charCodeAt(Y);if(G===46||G===47||G===92)Y++;else break}let X=$.length;while(X>Y){let G=$.charCodeAt(X-1);if(G===47||G===92)X--;else break}return Y===0&&X===$.length?$:$.slice(Y,X)}#Q($){let Y=this.#G($);if(Y==="")return null;let X=Y.split("/"),G=X[0],J=X.slice(1).join("/");if(this.#X.has(G)&&this.#Y)return{source:this.#Y,subPath:Y,mountDir:""};let Q=this.#$.get(G);if(Q)return{source:Q,subPath:J,mountDir:G};if(this.#Y)return{source:this.#Y,subPath:Y,mountDir:""};return null}async exists($){if(this.#G($)==="")return!0;let X=this.#Q($);if(!X)return!1;return X.source.exists(X.subPath)}async stat($){if(this.#G($)==="")return{name:".",type:"directory",size:0,createdAt:this.#J,modifiedAt:this.#J};let X=this.#Q($);if(!X)throw Error(`Path not found in composite skill source: ${$}`);return X.source.stat(X.subPath)}async readFile($){let Y=this.#Q($);if(!Y)throw Error(`File not found in composite skill source: ${$}`);return Y.source.readFile(Y.subPath)}async readdir($){if(this.#G($)===""){let G=[],J=new Set;for(let Q of this.#$.keys())G.push({name:Q,type:"directory"}),J.add(Q);for(let Q of this.#X)if(!J.has(Q))G.push({name:Q,type:"directory"}),J.add(Q);return G}let X=this.#Q($);if(!X)throw Error(`Directory not found in composite skill source: ${$}`);return X.source.readdir(X.subPath)}async realpath($){if(this.#G($)==="")return"";let X=this.#Q($);if(!X)throw Error(`Path not found in composite skill source: ${$}`);let G=X.source.realpath?await X.source.realpath(X.subPath):X.subPath;return[X.mountDir,G].filter(Boolean).join("/")}},Il5=class ${#$;#Y;#X;#J;#G;#Q=new Map;#U=!1;#K=null;#W=0;#H=[];#A=new Map;#V=new Map;static GLOB_RESOLVE_INTERVAL=5000;static STALENESS_CHECK_COOLDOWN=2000;constructor(Y){this.#$=Y.source,this.#Y=Y.skills,this.#X=Y.searchEngine,this.#J=Y.validateOnLoad??!0,this.#G=Y.checkSkillFileMtime??!1}async list(){await this.#F();let Y=[];for(let X of this.#Q.values()){let G=await this.#N(X);for(let J of G)Y.push({name:J.name,path:J.path,description:J.description,license:J.license,compatibility:J.compatibility,metadata:J.metadata})}return Y}async get(Y){await this.#F();let X=await this.#Z(Y)??this.#L(Y);if(!X)return null;let{indexableContent:G,...J}=X;return J}async has(Y){return await this.#F(),(await this.#Z(Y)??this.#L(Y))!==null}async#Z(Y){let X=this.#Q.get(Y);if(!X||X.length===0)return null;return this.#B(X)}#L(Y){let X=Y.replace(/\/SKILL\.md$/,"");for(let G of this.#Q.values()){let J=G.find((Q)=>Q.path===X);if(J)return J}return null}async#O(Y){if(!this.#$.realpath)return Y;try{return await this.#$.realpath(Y)}catch{return Y}}async#N(Y){let X=new Map;for(let J of Y){let Q=await this.#O(J.path),W=X.get(Q)??[];W.push(J),X.set(Q,W)}let G={local:0,managed:1,external:2};return[...X.values()].map((J)=>[...J].sort((Q,W)=>{let Z=G[Q.source.type]??99,K=G[W.source.type]??99;if(Z!==K)return Z-K;return Q.path.localeCompare(W.path)})[0])}async#B(Y){if(Y.length===0)return null;if(Y.length===1)return Y[0];let X=await this.#N(Y);if(X.length===1)return X[0];let G={local:0,managed:1,external:2},J=[...X].sort((Z,K)=>{let H=G[Z.source.type]??99,z=G[K.source.type]??99;if(H!==z)return H-z;return Z.path.localeCompare(K.path)}),Q=J[0],W=J[1];if(Q.source.type===W.source.type){let Z=J.filter((K)=>K.source.type===Q.source.type).map((K)=>`"${K.path}"`).join(", ");throw Error(`[WorkspaceSkills] Cannot resolve skill "${Q.name}": multiple ${Q.source.type} skills found at ${Z}. Rename one or move it to a different source type.`)}return console.warn(`[WorkspaceSkills] Multiple skills named "${Q.name}" found. Using "${Q.path}" (source: ${Q.source.type}). Other candidates: ${J.slice(1).map((Z)=>`"${Z.path}" (${Z.source.type})`).join(", ")}`),Q}async refresh(){for(let Y of this.#Q.values())for(let X of Y)await this.#f(X);this.#Q.clear(),this.#U=!1,this.#K=null,await this.#M(),this.#U=!0}async maybeRefresh(Y){await this.#F();let X=await this.#R(Y);if(!this.#D(this.#H,X)){this.#H=X,await this.refresh();return}if(await this.#v())await this.refresh()}async addSkill(Y){await this.#F();let X,G;if(Y.endsWith("/SKILL.md")||Y==="SKILL.md")X=Y,G=this.#S(Y).split("/").pop()||"unknown";else X=this.#C(Y,"SKILL.md"),G=Y.split("/").pop()||"unknown";let J=this.#j(Y),Q=await this.#w(X,G,J),W=this.#Q.get(Q.name)??[],Z=W.findIndex((K)=>K.path===Q.path);if(Z>=0)await this.#f(W[Z]),W[Z]=Q;else W.push(Q);this.#Q.set(Q.name,W),await this.#k(Q),this.#W=Date.now()}async removeSkill(Y){await this.#F();let X=await this.#Z(Y)??this.#L(Y);if(!X)return;await this.#f(X);let G=this.#Q.get(X.name);if(G){let J=G.findIndex((Q)=>Q.path===X.path);if(J>=0)G.splice(J,1);if(G.length===0)this.#Q.delete(X.name)}this.#W=Date.now()}async#R(Y){if(Array.isArray(this.#Y))return this.#Y;return this.#Y(Y??{})}#D(Y,X){if(Y.length!==X.length)return!1;let G=[...Y].sort(),J=[...X].sort();return G.every((Q,W)=>Q===J[W])}async search(Y,X={}){if(await this.#F(),!this.#X)return this.#b(Y,X);let{topK:G=5,minScore:J,skillNames:Q,includeReferences:W=!0,mode:Z}=X,K=[...this.#Q.values()].reduce((F,N)=>F+N.reduce((D,L)=>D+1+L.references.length,0),0),H=Math.max(Q?G*3:G,K),z=await this.#X.search(Y,{topK:H,minScore:J,mode:Z}),V=[],A=new Set;for(let F of z){let N=F.metadata?.skillPath,D=F.metadata?.source;if(!N||!D)continue;let L=this.#L(N);if(!L)continue;let B=await this.#Z(L.name)??L;if(Q&&!Q.includes(B.name))continue;if(!W&&D!=="SKILL.md")continue;let O=`${B.path}:${D}`;if(A.has(O))continue;if(A.add(O),V.push({skillName:B.name,skillPath:B.path,source:D,content:F.content,score:F.score,lineRange:F.lineRange,scoreDetails:F.scoreDetails}),V.length>=G)break}return V}async getReference(Y,X){await this.#F();let G=await this.#Z(Y)??this.#L(Y);if(!G)return null;let J=this.#x(X,"reference"),Q=this.#C(G.path,J);if(!await this.#$.exists(Q))return null;try{let W=await this.#$.readFile(Q);return typeof W==="string"?W:W.toString("utf-8")}catch{return null}}async getScript(Y,X){await this.#F();let G=await this.#Z(Y)??this.#L(Y);if(!G)return null;let J=this.#x(X,"script"),Q=this.#C(G.path,J);if(!await this.#$.exists(Q))return null;try{let W=await this.#$.readFile(Q);return typeof W==="string"?W:W.toString("utf-8")}catch{return null}}async getAsset(Y,X){await this.#F();let G=await this.#Z(Y)??this.#L(Y);if(!G)return null;let J=this.#x(X,"asset"),Q=this.#C(G.path,J);if(!await this.#$.exists(Q))return null;try{let W=await this.#$.readFile(Q);return typeof W==="string"?Buffer.from(W,"utf-8"):W}catch{return null}}async listReferences(Y){return await this.#F(),(await this.#Z(Y)??this.#L(Y))?.references??[]}async listScripts(Y){return await this.#F(),(await this.#Z(Y)??this.#L(Y))?.scripts??[]}async listAssets(Y){return await this.#F(),(await this.#Z(Y)??this.#L(Y))?.assets??[]}async#F(){if(this.#U)return;if(this.#K){await this.#K;return}this.#K=(async()=>{try{if(this.#H.length===0)this.#H=await this.#R();await this.#M(),this.#U=!0}finally{this.#K=null}})(),await this.#K}#P(Y){let X=this.#Q.get(Y.name)??[],G=X.findIndex((J)=>J.path===Y.path);if(G>=0)X[G]=Y;else X.push(Y);this.#Q.set(Y.name,X)}async#M(){this.#A.clear(),this.#V.clear();let Y=async(X)=>{return(await this.#$.readdir(X)).map((J)=>({name:J.name,type:J.type,isSymlink:J.isSymlink}))};for(let X of this.#H){let G=X.length>1&&X.endsWith("/")?X.slice(0,-1):X,J=this.#q(G);if(i40(G)){let Q=await Wi1(G,Y,{dot:!0,maxDepth:4}),W=new Set;for(let K of Q)if(K.type==="directory")W.add(K.path);else W.add(this.#S(K.path));this.#A.set(G,[...W]),this.#V.set(G,Date.now());let Z=await Promise.allSettled(Q.map(async(K)=>{if(K.type==="file")await this.#z(K.path,J);else if(!await this.#z(K.path,J))await this.#I(K.path,J)}));for(let[K,H]of Z.entries()){let z=Q[K];if(z&&H.status==="rejected"){let V=H.reason;if(V instanceof Error)console.error(`[WorkspaceSkills] Failed to load skill from ${z.path}:`,V.message)}}}else if(!await this.#z(G,J))await this.#I(G,J)}this.#W=Date.now()}async#I(Y,X){try{if(!await this.#$.exists(Y))return}catch(G){let J=G instanceof Error?G.message:String(G),Q="";if(Y.startsWith("/")&&J.includes("Permission denied")){let W=Y.slice(1);try{if(await this.#$.exists(W))Q=` (did you mean to use the relative path "${W}"?)`}catch{}}console.warn(`[WorkspaceSkills] Cannot access skills path "${Y}": ${J}${Q}`);return}try{let G=await this.#$.readdir(Y),J=await Promise.allSettled(G.filter((Q)=>Q.type==="directory").map(async(Q)=>{let W=this.#C(Y,Q.name),Z=this.#C(W,"SKILL.md");if(await this.#$.exists(Z))return await this.#w(Z,Q.name,X);return null}));for(let Q of J)if(Q.status==="fulfilled"&&Q.value)this.#P(Q.value),await this.#k(Q.value);else if(Q.status==="rejected"){let W=Q.reason;if(W instanceof Error)console.error(`[WorkspaceSkills] Failed to load skill from ${Y}:`,W.message)}}catch(G){if(G instanceof Error)console.error(`[WorkspaceSkills] Failed to scan skills directory ${Y}:`,G.message)}}async#z(Y,X){try{if(Y.endsWith("/SKILL.md")||Y==="SKILL.md"){if(!await this.#$.exists(Y))return!0;let G=this.#S(Y),J=G.split("/").pop()||G;try{let Q=await this.#w(Y,J,X);this.#P(Q),await this.#k(Q)}catch(Q){if(Q instanceof Error)console.error(`[WorkspaceSkills] Failed to load skill from ${Y}:`,Q.message)}return!0}if(await this.#$.exists(Y)){let G=this.#C(Y,"SKILL.md");if(await this.#$.exists(G)){let J=Y.split("/").pop()||Y;try{let Q=await this.#w(G,J,X);this.#P(Q),await this.#k(Q)}catch(Q){if(Q instanceof Error)console.error(`[WorkspaceSkills] Failed to load skill from ${G}:`,Q.message)}return!0}}return!1}catch{return!1}}async#v(){if(this.#W===0)return!0;if(Date.now()-this.#W<$.STALENESS_CHECK_COOLDOWN)return!1;for(let Y of this.#H){let X;if(i40(Y)){let G=Date.now(),J=this.#V.get(Y)??0;if(G-J>$.GLOB_RESOLVE_INTERVAL||!this.#A.has(Y)){let W=await Wi1(Y,async(H)=>{return(await this.#$.readdir(H)).map((V)=>({name:V.name,type:V.type,isSymlink:V.isSymlink}))},{dot:!0,maxDepth:4}),Z=new Set;for(let H of W)if(H.type==="directory")Z.add(H.path);else Z.add(this.#S(H.path));let K=[...Z];this.#A.set(Y,K),this.#V.set(Y,G)}X=this.#A.get(Y)??[]}else X=[Y];for(let G of X)try{let J=await this.#$.stat(G);if(J.modifiedAt.getTime()>this.#W)return!0;if(J.type!=="directory")continue;if(this.#G){let K=this.#C(G,"SKILL.md");try{let H=await this.#$.stat(K);if(H.type==="file"&&H.modifiedAt.getTime()>this.#W)return!0}catch{}}let Z=(await this.#$.readdir(G)).filter((K)=>K.type==="directory");if(Z.length>0){if((await Promise.all(Z.map(async(H)=>{let z=this.#C(G,H.name);try{if((await this.#$.stat(z)).modifiedAt.getTime()>this.#W)return!0;if(this.#G){let A=this.#C(z,"SKILL.md");try{let F=await this.#$.stat(A);return F.type==="file"&&F.modifiedAt.getTime()>this.#W}catch{}}}catch{}return!1}))).some((H)=>H))return!0}}catch{continue}}return!1}async#w(Y,X,G){let J=await this.#$.readFile(Y),Q=typeof J==="string"?J:J.toString("utf-8"),W=Ni1.default(Q),Z=W.data,K=W.content.trim(),H=this.#S(Y),z={name:Z.name,path:H,description:Z.description,license:Z.license,compatibility:Z.compatibility,metadata:Z.metadata};if(this.#J){let D=this.#g(z,X,K);if(!D.valid)throw Error(`Invalid skill metadata in ${Y}:
${D.errors.join(`
`)}`)}let[V,A,F]=await Promise.all([this.#E(H,"references"),this.#E(H,"scripts"),this.#E(H,"assets")]),N=await this.#h(K,H,V);return{...z,instructions:K,source:G,references:V,scripts:A,assets:F,indexableContent:N}}#g(Y,X,G){let J=bB8(Y,X,G);if(J.warnings.length>0)for(let Q of J.warnings)console.warn(`[WorkspaceSkills] ${Y.name}: ${Q}`);return J}async#E(Y,X){let G=this.#C(Y,X),J=[];if(!await this.#$.exists(G))return J;try{await this.#_(G,G,(Q)=>{J.push(Q)})}catch{}return J}async#_(Y,X,G,J=0,Q=20){if(J>=Q)return;let W=await this.#$.readdir(X);for(let Z of W){let K=this.#C(X,Z.name);if(Z.type==="directory"&&!Z.isSymlink)await this.#_(Y,K,G,J+1,Q);else{let H=K.substring(Y.length+1);G(H)}}}async#h(Y,X,G){let J=[Y],Q=await Promise.all(G.map(async(W)=>{let Z=this.#C(X,"references",W);try{let K=await this.#$.readFile(Z);return typeof K==="string"?K:K.toString("utf-8")}catch{return null}}));for(let W of Q)if(W!==null)J.push(W);return J.join(`

`)}async#f(Y){if(!this.#X?.remove)return;let X=[`skill:${Y.path}:SKILL.md`,...Y.references.map((G)=>`skill:${Y.path}:${G}`)];for(let G of X)try{await this.#X.remove(G)}catch{}}#j(Y){for(let X of this.#H)if(Y===X||Y.startsWith(X+"/"))return this.#q(X);return this.#q(Y)}async#k(Y){if(!this.#X)return;await this.#X.index({id:`skill:${Y.path}:SKILL.md`,content:Y.instructions,metadata:{skillPath:Y.path,source:"SKILL.md"}}),await Promise.all(Y.references.map(async(X)=>{let G=this.#C(Y.path,"references",X);try{let J=await this.#$.readFile(G),Q=typeof J==="string"?J:J.toString("utf-8");await this.#X.index({id:`skill:${Y.path}:${X}`,content:Q,metadata:{skillPath:Y.path,source:`references/${X}`}})}catch{}}))}async#b(Y,X){let{topK:G=5,skillNames:J,includeReferences:Q=!0}=X,W=Y.toLowerCase(),Z=[];for(let K of this.#Q.values()){let H=await this.#B(K);if(!H)continue;if(J&&!J.includes(H.name))continue;if(H.instructions.toLowerCase().includes(W))Z.push({skillName:H.name,skillPath:H.path,source:"SKILL.md",content:H.instructions.substring(0,200),score:1});if(Q)for(let z of H.references){if(Z.length>=G)break;let V=await this.getReference(H.name,`references/${z}`);if(V&&V.toLowerCase().includes(W))Z.push({skillName:H.name,skillPath:H.path,source:`references/${z}`,content:V.substring(0,200),score:0.8})}if(Z.length>=G)break}return Z.slice(0,G)}#q(Y){if(Y.split("/").includes("node_modules"))return{type:"external",packagePath:Y};if(Y.includes("/.mastra/skills")||Y.startsWith(".mastra/skills"))return{type:"managed",mastraPath:Y};return{type:"local",projectPath:Y}}#C(...Y){return Y.map((X,G)=>G===0?fB8(X):gB8(X)).filter(Boolean).join("/")}#x(Y,X){let G=Y.replace(/\\/g,"/"),J=G.split("/").filter((Q)=>Boolean(Q)&&Q!==".");if(G.startsWith("/")||J.some((Q)=>Q===".."))throw Error(`Invalid ${X} path: ${Y}`);return J.join("/")}#S(Y){let X=Y.lastIndexOf("/");return X>0?Y.substring(0,X):"/"}},mB8,aG="mastra_workspace",n4,IO,tC0,eB8,$O8,YO8,XO8,GO8=class{warmedUpClis=new Set;warmupCleanups=new Map;makeWarmupKey($,Y,X){return`${$}:${Y}:${X}`}getBrowserCliConfig($){for(let[Y,X]of Object.entries(XO8))if(X.pattern.test($))return{name:Y,config:X};return null}hasExternalCdpFlag($){for(let Y of $){let X=this.getBrowserCliConfig(Y.trim());if(X){if(X.config.externalCdpPattern){if(X.config.externalCdpPattern.test(Y))return!0}else if(new RegExp(`${X.config.flag}\\s+\\S+`).test(Y))return!0}}return!1}extractExternalCdpUrl($){for(let Y of $){let X=this.getBrowserCliConfig(Y.trim());if(X?.config.externalCdpExtractor){let G=Y.match(X.config.externalCdpExtractor);if(G?.[1])return G[1]}}return null}injectCdpUrlIntoSingleCommand($,Y,X,G){if(new RegExp(`${X.flag}\\s+\\S+`).test($))return $;let Q=`${X.flag} ${n40(Y)}`;if(X.sessionFlag&&G){if(!new RegExp(`${X.sessionFlag}\\s+\\S+`).test($))Q+=` ${X.sessionFlag} ${n40(G)}`}return $.replace(X.pattern,`$& ${Q}`)}injectCdpUrl($,Y,X){let{parts:G,operators:J}=Ki1($),Q=G.map((W)=>{let Z=W.trim(),K=this.getBrowserCliConfig(Z);if(K)return this.injectCdpUrlIntoSingleCommand(Z,Y,K.config,X);return W});return MB8(Q,J)}isWarmedUp($,Y,X){return this.warmedUpClis.has(this.makeWarmupKey($,Y,X))}markWarmedUp($,Y,X){this.warmedUpClis.add(this.makeWarmupKey($,Y,X))}registerWarmupCleanup($,Y,X,G){let J=this.makeWarmupKey($,Y,X);if(!this.warmupCleanups.has(J)){let Q=G.onBrowserClosed(()=>{this.warmedUpClis.delete(J),this.warmupCleanups.delete(J)},X);this.warmupCleanups.set(J,Q)}}getWarmupCommands($,Y,X,G){let J=[],Q=new Set;for(let{name:W,config:Z}of Y){if(Q.has(W))continue;if(Q.add(W),Z.warmupCommand&&!this.isWarmedUp($,W,G))J.push({cliName:W,command:Z.warmupCommand(X,G)})}return J}analyzeCommand($){let{parts:Y}=Ki1($),X=Y.map((Q)=>this.getBrowserCliConfig(Q.trim())).filter((Q)=>Q!==null),G=this.hasExternalCdpFlag(Y),J=G?this.extractExternalCdpUrl(Y):null;return{browserClis:X,parts:Y,usingExternalCdp:G,externalCdpUrl:J}}},Pf,KS0=200,Ti1=2000,JO8,KO8,Ci1,UO8,ki1=`Execute a shell command in the workspace sandbox.

Examples:
  "npm install && npm run build"
  "ls -la src/"
  "cat config.json | jq '.database'"
  "cd /app && python main.py"

Usage:
- Commands run in a shell, so pipes, redirects, and chaining (&&, ||, ;) all work.
- Always quote file paths that contain spaces (e.g., cd "/path/with spaces").
- Use the timeout parameter (in seconds) to limit execution time. Behavior when omitted depends on the sandbox provider.
- Optionally use cwd to override the working directory. Commands run from the sandbox default if omitted.`,zO8,VO8,AO8,FO8,DO8,NO8,eC0=50,LO8,EO8,Hi1="<<<",qO8,IO8,wO8,_O8=10485760,jO8,CO8,vO8,xi1,xO8,yO8;var fi1=V0(()=>{Ow();wF();NC0();O1();g40();Di1=U6(Id1(),1),Ni1=U6(pl1(),1),Li1=U6(Ji1(),1),jf=class extends Error{constructor($,Y,X){super($);this.code=Y,this.workspaceId=X,this.name="WorkspaceError"}code;workspaceId},WB8=class extends jf{constructor(){super("Workspace not available. Ensure the agent has a workspace configured.","NO_WORKSPACE");this.name="WorkspaceNotAvailableError"}},ZB8=class extends jf{constructor(){super("Workspace does not have a filesystem configured","NO_FILESYSTEM");this.name="FilesystemNotAvailableError"}},KB8=class extends jf{constructor($){super($??"Workspace does not have a sandbox configured","NO_SANDBOX");this.name="SandboxNotAvailableError"}},l40=class extends jf{constructor($){super(`Sandbox does not support ${$}`,"FEATURE_NOT_SUPPORTED");this.name="SandboxFeatureNotSupportedError"}},Tf=class extends jf{constructor($){super(`Workspace is in read-only mode. Cannot perform: ${$}`,"READ_ONLY");this.name="WorkspaceReadOnlyError"}},Bi1=class extends Error{constructor($,Y,X){super($);this.code=Y,this.path=X,this.name="FilesystemError"}code;path},r40=class extends Bi1{constructor($){super(`File not found: ${$}`,"ENOENT",$);this.name="FileNotFoundError"}},UB8=class extends Bi1{constructor($,Y){super(Y,"EREAD_REQUIRED",$);this.name="FileReadRequiredError"}};zB8={txt:"text/plain",html:"text/html",htm:"text/html",css:"text/css",csv:"text/csv",md:"text/markdown",js:"application/javascript",mjs:"application/javascript",ts:"application/typescript",tsx:"application/typescript",jsx:"application/javascript",json:"application/json",xml:"application/xml",yaml:"text/yaml",yml:"text/yaml",py:"text/x-python",rb:"text/x-ruby",go:"text/x-go",rs:"text/x-rust",java:"text/x-java",c:"text/x-c",cpp:"text/x-c++",h:"text/x-c",hpp:"text/x-c++",sh:"text/x-sh",bash:"text/x-sh",zsh:"text/x-sh",toml:"text/toml",ini:"text/plain",env:"text/plain",sql:"text/x-sql",graphql:"application/graphql",gql:"application/graphql",vue:"text/x-vue",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",ico:"image/x-icon",bmp:"image/bmp",tiff:"image/tiff",tif:"image/tiff",heic:"image/heic",heif:"image/heif",avif:"image/avif",pdf:"application/pdf",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",flac:"audio/flac",m4a:"audio/mp4",aac:"audio/aac",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo",mkv:"video/x-matroska",zip:"application/zip",tar:"application/x-tar",gz:"application/gzip",tgz:"application/gzip",bz2:"application/x-bzip2","7z":"application/x-7z-compressed",rar:"application/vnd.rar",exe:"application/vnd.microsoft.portable-executable",dll:"application/vnd.microsoft.portable-executable",so:"application/x-sharedlib",dylib:"application/x-sharedlib",bin:"application/x-binary",dat:"application/x-binary",dmg:"application/x-apple-diskimage",iso:"application/x-iso9660-image",deb:"application/vnd.debian.binary-package",rpm:"application/x-rpm",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ttf:"font/ttf",otf:"font/otf",woff:"font/woff",woff2:"font/woff2",wasm:"application/wasm",class:"application/java-vm",pyc:"application/x-python-code"};AB8=new Set([".md",".txt",".json",".yaml",".yml",".js",".mjs",".ts",".tsx",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".sh",".bash",".zsh",".html",".htm",".css",".xml",".toml",".ini",".env",".csv",".sql",".graphql",".gql",".vue",".svg"]);Oi1=/[*?{}[\]]/;Bl5=EB8(),Ol5=process.platform==="win32";El5=q$.join(yw.tmpdir(),".mastra-mounts");qi1=class extends Error{constructor($){super("The specified text was not found. Make sure you use the exact text from the file.");this.searchString=$,this.name="StringNotFoundError"}searchString},Ii1=class extends Error{constructor($,Y){super(`The specified text appears ${Y} times. Provide more surrounding context to make the match unique, or use replace_all to replace all occurrences.`);this.searchString=$,this.occurrences=Y,this.name="StringNotUniqueError"}searchString;occurrences},wB8=new Set(["a","an","and","are","as","at","be","by","for","from","has","he","in","is","it","its","of","on","or","that","the","to","was","were","will","with"]),_B8={lowercase:!0,removePunctuation:!0,minLength:2,stopwords:wB8,splitPattern:/\s+/};iF={MAX_INSTRUCTION_TOKENS:5000,MAX_INSTRUCTION_LINES:500,MAX_NAME_LENGTH:64,MAX_DESCRIPTION_LENGTH:1024};mB8={span:void 0,end(){},error(){}};n4={FILESYSTEM:{READ_FILE:`${aG}_read_file`,WRITE_FILE:`${aG}_write_file`,EDIT_FILE:`${aG}_edit_file`,LIST_FILES:`${aG}_list_files`,DELETE:`${aG}_delete`,FILE_STAT:`${aG}_file_stat`,MKDIR:`${aG}_mkdir`,GREP:`${aG}_grep`,AST_EDIT:`${aG}_ast_edit`},SANDBOX:{EXECUTE_COMMAND:`${aG}_execute_command`,GET_PROCESS_OUTPUT:`${aG}_get_process_output`,KILL_PROCESS:`${aG}_kill_process`},SEARCH:{SEARCH:`${aG}_search`,INDEX:`${aG}_index`},LSP:{LSP_INSPECT:`${aG}_lsp_inspect`}};eB8=X8({id:n4.FILESYSTEM.AST_EDIT,description:`Edit code using AST-based analysis for intelligent transformations.

Use \`transform\` for structured operations (imports, renames). Use \`pattern\`/\`replacement\` only for general find-and-replace.

Transforms:
- add-import: Add or merge imports. Skips duplicates. For default imports, put the default name first in \`names\`.
  { transform: "add-import", importSpec: { module: "react", names: ["useState", "useEffect"] } }
  { transform: "add-import", importSpec: { module: "express", names: ["express"], isDefault: true } }
  { transform: "add-import", importSpec: { module: "express", names: ["express", "Router"], isDefault: true } } \u2192 import express, { Router } from 'express'
- remove-import: Remove an import by module name.
  { transform: "remove-import", targetName: "lodash" }
- rename: Rename all occurrences of an identifier (not scope-aware).
  { transform: "rename", targetName: "oldName", newName: "newName" }

Pattern replace (for everything else):
  { pattern: "console.log($ARG)", replacement: "logger.debug($ARG)" }`,inputSchema:U.object({path:U.string().describe("The path to the file to edit"),pattern:U.string().optional().describe('AST pattern to search for (supports $VARIABLE placeholders, e.g., "console.log($ARG)")'),replacement:U.string().optional().describe('Replacement pattern (can use captured $VARIABLES, e.g., "logger.debug($ARG)")'),transform:U.enum(["add-import","remove-import","rename"]).optional().describe("Structured transformation to apply"),targetName:U.string().optional().describe("Required for remove-import and rename transforms. The current name to target."),newName:U.string().optional().describe("Required for rename transform. The new name to replace targetName with."),importSpec:U.object({module:U.string().describe("Module to import from"),names:U.array(U.string()).min(1).describe("Names to import. For default imports, put the default name first."),isDefault:U.boolean().optional().describe("Whether the first name is a default import")}).optional().describe("Required for add-import transform. Specifies the module and names to import.")}),execute:async({path:$,pattern:Y,replacement:X,transform:G,targetName:J,newName:Q,importSpec:W},Z)=>{let{workspace:K,filesystem:H}=hz(Z);await sG(Z,n4.FILESYSTEM.AST_EDIT);let z=mY(Z,K,{category:"filesystem",operation:"astEdit",input:{path:$,transform:G,pattern:Y},attributes:{filesystemProvider:H.provider}});try{if(H.readOnly)throw new Tf("ast_edit");let V=await cB8();if(!V)return z.end({success:!1}),"@ast-grep/napi is not available. Install it to use AST editing.";let{parse:A,Lang:F}=V,N;try{N=await H.readFile($,{encoding:"utf-8"})}catch(q){if(q instanceof r40)return z.end({success:!1}),`File not found: ${$}. Use the write file tool to create it first.`;throw q}if(typeof N!=="string")return z.end({success:!1}),"Cannot perform AST edits on binary files. Use the write file tool instead.";let D=iB8($,F);if(!D)return z.end({success:!1}),`Unsupported file type for AST editing: ${$}`;let B=A(D,N).root(),O=N,E=[];if(G)switch(G){case"add-import":{if(!W)return z.end({success:!1}),"Error: importSpec is required for add-import transform";O=sB8(N,B,W),E.push(`Added import from '${W.module}'`);break}case"remove-import":{if(!J)return z.end({success:!1}),"Error: targetName is required for remove-import transform";O=oB8(N,B,J),E.push(`Removed import '${J}'`);break}case"rename":{if(!J||!Q)return z.end({success:!1}),"Error: targetName and newName are required for rename transform";let q=rB8(N,B,J,Q);O=q.content,E.push(`Renamed '${J}' to '${Q}' (${q.count} occurrences)`);break}}else if(Y&&X!==void 0){let q=tB8(N,B,Y,X);if(q.error)return z.end({success:!1}),`Error: AST pattern matching failed: ${q.error}`;O=q.content,E.push(`Replaced ${q.count} occurrences of pattern`)}else if(Y&&X===void 0)return z.end({success:!1}),"Error: replacement is required when pattern is provided";else if(!Y&&X!==void 0)return z.end({success:!1}),"Error: pattern is required when replacement is provided";else return z.end({success:!1}),"Error: Must provide either transform or pattern/replacement";let M=O!==N;if(M)await H.writeFile($,O,{overwrite:!0,expectedMtime:Z?.__expectedMtime});if(!M)return z.end({success:!0}),`No changes made to ${$} (${E.join("; ")})`;let R=`${$}: ${E.join("; ")}`;return R+=await ZS0(K,$,O),z.end({success:!0},{bytesTransferred:Buffer.byteLength(O,"utf-8")}),R}catch(V){throw z.error(V),V}}}),$O8=X8({id:n4.FILESYSTEM.DELETE,description:"Delete a file or directory from the workspace filesystem",inputSchema:U.object({path:U.string().describe("The path to the file or directory to delete"),recursive:U.boolean().optional().default(!1).describe("If true, delete directories and their contents recursively. Required for non-empty directories.")}),execute:async({path:$,recursive:Y},X)=>{let{workspace:G,filesystem:J}=hz(X);await sG(X,n4.FILESYSTEM.DELETE);let Q=mY(X,G,{category:"filesystem",operation:"delete",input:{path:$,recursive:Y},attributes:{filesystemProvider:J.provider}});try{if(J.readOnly)throw new Tf("delete");if((await J.stat($)).type==="directory")await J.rmdir($,{recursive:Y,force:Y});else await J.deleteFile($);return Q.end({success:!0}),`Deleted ${$}`}catch(W){throw Q.error(W),W}}}),YO8=X8({id:n4.FILESYSTEM.EDIT_FILE,description:`Edit a file by replacing specific text. The old_string must match exactly and be unique in the file.

Usage:
- Read the file first to get the exact text to replace.
- By default, read file output includes line number prefixes (e.g., "     1\u2192"). Ensure you preserve the exact indentation as it appears AFTER the arrow. Never include any part of the line number prefix in old_string or new_string.
- Include enough surrounding context (multiple lines) to make old_string unique. If it still isn't unique, include more lines.
- Use replace_all only when intentionally replacing all occurrences.`,inputSchema:U.object({path:U.string().describe("The path to the file to edit"),old_string:U.string().describe("The exact text to find and replace. Must be unique in the file."),new_string:U.string().describe("The text to replace old_string with"),replace_all:U.boolean().optional().default(!1).describe("If true, replace all occurrences. If false (default), old_string must be unique.")}),execute:async({path:$,old_string:Y,new_string:X,replace_all:G},J)=>{let{workspace:Q,filesystem:W}=hz(J);await sG(J,n4.FILESYSTEM.EDIT_FILE);let Z=mY(J,Q,{category:"filesystem",operation:"editFile",input:{path:$,replace_all:G},attributes:{filesystemProvider:W.provider}});try{if(W.readOnly)throw new Tf("edit_file");let K=await W.readFile($,{encoding:"utf-8"});if(typeof K!=="string")return Z.end({success:!1}),"Cannot edit binary files. Use the write file tool instead.";let H=PB8(K,Y,X,G);await W.writeFile($,H.content,{overwrite:!0,expectedMtime:J?.__expectedMtime});let z=`Replaced ${H.replacements} occurrence${H.replacements!==1?"s":""} in ${$}`;return z+=await ZS0(Q,$,H.content),Z.end({success:!0},{bytesTransferred:Buffer.byteLength(H.content,"utf-8")}),z}catch(K){if(K instanceof qi1)return Z.end({success:!1}),K.message;if(K instanceof Ii1)return Z.end({success:!1}),K.message;throw Z.error(K),K}}}),XO8={"agent-browser":{pattern:/^agent-browser\b/,flag:"--cdp",sessionFlag:"--session",warmupCommand:($,Y)=>`agent-browser --session ${n40(Y)} connect ${n40($)}`,externalCdpPattern:/(?:\bconnect\s+["']?wss?:\/\/|--cdp\s+["']?\S)/,externalCdpExtractor:/(?:\bconnect|--cdp)\s+["']?(wss?:\/\/[^\s"']+)["']?/},"browser-use":{pattern:/^(?:browser-use|browseruse|browser|bu)\b/,flag:"--cdp-url",sessionFlag:"--session",externalCdpPattern:/--cdp-url\s+["']?\S+/,externalCdpExtractor:/--cdp-url\s+["']?(wss?:\/\/[^\s"']+)["']?/},browse:{pattern:/^browse\b/,flag:"--ws",externalCdpPattern:/--ws\s+["']?\S+/,externalCdpExtractor:/--ws\s+["']?(wss?:\/\/[^\s"']+)["']?/}},Pf=new GO8,JO8=/(?:\u001B\][\s\S]*?(?:\u0007|\u001B\u005C|\u009C))|(?:[\u001B\u009B][\[\]()#;?]*(?:\d{1,4}(?:[;:]\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~])/g;KO8=/^\d+(?:\.\d+)?$/,Ci1=U.object({command:U.string().describe('The shell command to execute (e.g., "npm install", "ls -la src/", "cat file.txt | grep error")'),timeout:U.preprocess(($)=>{if(typeof $!=="string")return $;let Y=$.trim();return KO8.test(Y)?Number(Y):$},U.number()).nullish().describe("Maximum execution time in seconds. Example: 60 for 1 minute."),cwd:U.string().nullish().describe("Working directory for the command"),tail:U.number().nullish().describe(`For foreground commands: limit output to the last N lines, similar to tail -n. Defaults to ${KS0}. Use 0 for no limit.`)}),UO8=Ci1.extend({background:U.boolean().optional().describe("Run the command in the background. Returns a PID immediately instead of waiting for completion. Use get_process_output to check on it later.")});zO8=X8({id:n4.SANDBOX.EXECUTE_COMMAND,description:ki1,inputSchema:Ci1,execute:Si1,toModelOutput:a40}),VO8=X8({id:n4.SANDBOX.EXECUTE_COMMAND,description:`${ki1}

Set background: true to run long-running commands (dev servers, watchers) without blocking. You'll get a PID to track the process.`,inputSchema:UO8,execute:Si1,toModelOutput:a40}),AO8=X8({id:n4.FILESYSTEM.FILE_STAT,description:"Get file or directory metadata from the workspace. Returns existence, type, size, and modification time.",inputSchema:U.object({path:U.string().describe("The path to check")}),execute:async({path:$},Y)=>{let{workspace:X,filesystem:G}=hz(Y);await sG(Y,n4.FILESYSTEM.FILE_STAT);let J=mY(Y,X,{category:"filesystem",operation:"stat",input:{path:$},attributes:{filesystemProvider:G.provider}});try{let Q=await G.stat($),W=Q.modifiedAt.toISOString(),Z=[`${$}`,`Type: ${Q.type}`];if(Q.size!==void 0)Z.push(`Size: ${Q.size} bytes`);return Z.push(`Modified: ${W}`),J.end({success:!0},{bytesTransferred:Q.size}),Z.join(" ")}catch(Q){if(Q instanceof r40)return J.end({success:!1}),`${$}: not found`;throw J.error(Q),Q}}}),FO8=X8({id:n4.SANDBOX.GET_PROCESS_OUTPUT,description:`Get the current output (stdout, stderr) and status of a background process by its PID.

Use this after starting a background command with execute_command (background: true) to check if the process is still running and read its output.`,toModelOutput:a40,inputSchema:U.object({pid:U.string().describe("The process ID returned when the background command was started"),tail:U.number().optional().describe(`Number of lines to return, similar to tail -n. Positive or negative returns last N lines from end. Defaults to ${KS0}. Use 0 for no limit.`),wait:U.boolean().optional().describe("If true, block until the process exits and return the final output. Useful for short-lived background commands where you want to wait for the result.")}),execute:async({pid:$,tail:Y,wait:X},G)=>{let{workspace:J,sandbox:Q}=WS0(G);await sG(G,n4.SANDBOX.GET_PROCESS_OUTPUT);let W=mY(G,J,{category:"sandbox",operation:"getProcessOutput",input:{pid:$,tail:Y,wait:X},attributes:{sandboxProvider:Q.provider}}),Z=G?.agent?.toolCallId;try{if(!Q.processes)throw new l40("processes");let K=await Q.processes.get($);if(!K)return W.end({success:!1}),`No background process found with PID ${$}.`;if(K.command)await G?.writer?.custom({type:"data-sandbox-command",data:{command:K.command,pid:$,toolCallId:Z}});if(X&&K.exitCode===void 0){let N=await K.wait({onStdout:G?.writer?async(D)=>{await G.writer.custom({type:"data-sandbox-stdout",data:{output:D,timestamp:Date.now(),toolCallId:Z},transient:!0})}:void 0,onStderr:G?.writer?async(D)=>{await G.writer.custom({type:"data-sandbox-stderr",data:{output:D,timestamp:Date.now(),toolCallId:Z},transient:!0})}:void 0});await G?.writer?.custom({type:"data-sandbox-exit",data:{exitCode:N.exitCode,success:N.success,executionTimeMs:N.executionTimeMs,toolCallId:Z}})}let H=K.exitCode===void 0,z=J.getToolsConfig()?.[n4.SANDBOX.GET_PROCESS_OUTPUT]?.maxOutputTokens,V=await bz(K.stdout,Y,z),A=await bz(K.stderr,Y,z);if(!V&&!A)return W.end({success:!0},{exitCode:K.exitCode}),"(no output yet)";let F=[];if(V&&A)F.push("stdout:",V,"","stderr:",A);else if(V)F.push(V);else F.push("stderr:",A);if(!H)F.push("",`Exit code: ${K.exitCode}`);return W.end({success:!0},{exitCode:K.exitCode}),F.join(`
`)}catch(K){throw W.error(K),K}}});DO8=X8({id:n4.FILESYSTEM.GREP,description:`Search file contents using a regex pattern. Walks the filesystem and returns matching lines with file paths and line numbers.

Usage:
- Basic search: { pattern: "TODO" }
- Regex: { pattern: "function\\s+\\w+\\(" }
- Multiple terms: { pattern: "TODO|FIXME|HACK" }
- Case-insensitive: { pattern: "error", caseSensitive: false }
- Search in directory: { pattern: "import", path: "./src" }
- Filter by glob: { pattern: "import", path: "**/*.ts" }
- Combined path + glob: { pattern: "import", path: "src/**/*.ts" }
- Multiple file types: { pattern: "import", path: "**/*.{ts,tsx,js}" }
- Multiple directories: { pattern: "TODO", path: "{src,lib}/**/*.ts" }
- With context: { pattern: "function", contextLines: 2 }`,inputSchema:U.object({pattern:U.string().describe("Regex pattern to search for"),path:U.string().optional().default(".").describe('File, directory, or glob pattern to search within (default: "."). A plain path searches that file or directory. A glob pattern (e.g., "**/*.ts", "src/**/*.test.ts") filters which files to search.'),contextLines:U.number().optional().default(0).describe("Number of lines of context to include before and after each match (default: 0)"),maxCount:U.number().optional().describe("Maximum matches per file. Moves on to the next file after this many matches. Similar to grep -m flag."),caseSensitive:U.boolean().optional().default(!0).describe("Whether the search is case-sensitive (default: true)"),includeHidden:U.boolean().optional().default(!1).describe('Include hidden files and directories (names starting with ".") in the search (default: false)')}),execute:async({pattern:$,path:Y=".",contextLines:X=0,maxCount:G,caseSensitive:J=!0,includeHidden:Q=!1},W)=>{let{workspace:Z,filesystem:K}=hz(W);await sG(W,n4.FILESYSTEM.GREP);let H=mY(W,Z,{category:"filesystem",operation:"grep",input:{pattern:$,path:Y,contextLines:X,maxCount:G},attributes:{filesystemProvider:K.provider}});try{if($.length>1000)return H.end({success:!1}),`Error: Pattern too long (${$.length} chars, max 1000). Use a shorter pattern.`;let V;try{V=new RegExp($,J?"g":"gi")}catch(k){return H.end({success:!1}),`Error: Invalid regex pattern: ${k.message}`}let A,F;if(i40(Y))A=Ei1(Y),F=QS0(Y,{dot:Q});else A=Y;let N=await vi1(K),D=A.replace(/^\.\//,"").replace(/\/$/,""),B=N&&D&&N(D+"/")?void 0:N,O;try{if((await K.stat(A)).type==="file")O=JS0(A)?[A]:[];else{let S=async(T)=>{let v=[],x;try{x=await K.readdir(T)}catch{return v}for(let y of x){if(!Q&&y.name.startsWith("."))continue;let d=T.endsWith("/")?`${T}${y.name}`:`${T}/${y.name}`;if(B){let u=d.replace(/^\.\//,""),b=y.type==="directory"?`${u}/`:u;if(B(b))continue}if(y.type==="file"){if(!JS0(y.name))continue;if(F&&!F(d))continue;v.push(d)}else if(y.type==="directory"&&!y.isSymlink)v.push(...await S(d))}return v};O=await S(A)}}catch{O=[]}let E=[],M=new Set,R=0,q=!1,w=500,I=1000;for(let k of O){if(q)break;let S;try{let x=await K.readFile(k,{encoding:"utf-8"});if(typeof x!=="string")continue;S=x}catch{continue}let T=S.split(`
`),v=0;for(let x=0;x<T.length;x++){let y=T[x];V.lastIndex=0;let d=V.exec(y);if(!d)continue;M.add(k);let u=y;if(u.length>w)u=u.slice(0,w)+"...";if(X>0){let b=Math.max(0,x-X);for(let g=b;g<x;g++)E.push(`${k}:${g+1}- ${T[g]}`)}if(E.push(`${k}:${x+1}:${d.index+1}: ${u}`),X>0){let b=Math.min(T.length-1,x+X);for(let g=x+1;g<=b;g++)E.push(`${k}:${g+1}- ${T[g]}`);E.push("--")}if(R++,v++,G!==void 0&&v>=G)break;if(R>=I){q=!0;break}}}let P=[`${R} match${R!==1?"es":""}`];if(P.push(`across ${M.size} file${M.size!==1?"s":""}`),q)P.push(`(truncated at ${I})`);let _=P.join(" ");E.unshift(_,"---");let C=await wf(E.join(`
`),Z.getToolsConfig()?.[n4.FILESYSTEM.GREP]?.maxOutputTokens,"end");return H.end({success:!0},{resultCount:R}),C}catch(z){throw H.error(z),z}}}),NO8=X8({id:n4.SEARCH.INDEX,description:"Index content for search. The path becomes the document ID in search results.",inputSchema:U.object({path:U.string().describe("The document ID/path for search results"),content:U.string().describe("The text content to index"),metadata:U.record(U.string(),U.unknown()).optional().describe("Optional metadata to store with the document")}),execute:async({path:$,content:Y,metadata:X},G)=>{let J=bw(G);await sG(G,n4.SEARCH.INDEX);let Q=mY(G,J,{category:"search",operation:"index",input:{path:$,contentLength:Y.length},attributes:{}});try{return await J.index($,Y,{metadata:X}),Q.end({success:!0},{bytesTransferred:Buffer.byteLength(Y,"utf-8")}),`Indexed ${$}`}catch(W){throw Q.error(W),W}}}),LO8=X8({id:n4.SANDBOX.KILL_PROCESS,description:`Kill a background process by its PID.

Use this to stop a long-running background process that was started with execute_command (background: true). Returns the last ${eC0} lines of output.`,toModelOutput:a40,inputSchema:U.object({pid:U.string().describe("The process ID of the background process to kill")}),execute:async({pid:$},Y)=>{let{workspace:X,sandbox:G}=WS0(Y);await sG(Y,n4.SANDBOX.KILL_PROCESS);let J=mY(Y,X,{category:"sandbox",operation:"killProcess",input:{pid:$},attributes:{sandboxProvider:G.provider}}),Q=Y?.agent?.toolCallId;try{if(!G.processes)throw new l40("processes");let W=await G.processes.get($);if(W?.command)await Y?.writer?.custom({type:"data-sandbox-command",data:{command:W.command,pid:$,toolCallId:Q}});if(!await G.processes.kill($))return await Y?.writer?.custom({type:"data-sandbox-exit",data:{exitCode:W?.exitCode??-1,success:!1,killed:!1,toolCallId:Q}}),J.end({success:!1}),`Process ${$} was not found or had already exited.`;await Y?.writer?.custom({type:"data-sandbox-exit",data:{exitCode:W?.exitCode??137,success:!1,killed:!0,toolCallId:Q}});let K=[`Process ${$} has been killed.`];if(W){let H=X.getToolsConfig()?.[n4.SANDBOX.KILL_PROCESS]?.maxOutputTokens,z=W.stdout?await bz(W.stdout,eC0,H):"",V=W.stderr?await bz(W.stderr,eC0,H):"";if(z)K.push("","--- stdout (last output) ---",z);if(V)K.push("","--- stderr (last output) ---",V)}return J.end({success:!0},{exitCode:W?.exitCode??137}),K.join(`
`)}catch(W){throw J.error(W),W}}});EO8=X8({id:n4.FILESYSTEM.LIST_FILES,description:`List files and directories in the workspace filesystem.
Returns a compact tab-indented listing for efficient token usage.
Options mirror common tree command flags for familiarity.

Examples:
- List workspace root: { path: "." }
- Deep listing: { path: "src", maxDepth: 5 }
- Directories only: { path: ".", dirsOnly: true }
- Exclude node_modules: { path: ".", exclude: "node_modules" }
- Find TypeScript files: { path: "src", pattern: "**/*.ts" }
- Find config files: { path: ".", pattern: "*.config.{js,ts}" }
- Multiple patterns: { path: ".", pattern: ["**/*.ts", "**/*.tsx"] }

To list ALL files, omit the pattern parameter \u2014 do NOT pass pattern: "*".`,inputSchema:U.object({path:U.string().default(".").describe("Directory path to list"),maxDepth:U.number().optional().default(2).describe("Maximum depth to descend (default: 2). Similar to tree -L flag."),showHidden:U.boolean().optional().default(!1).describe('Show hidden files starting with "." (default: false). Similar to tree -a flag.'),dirsOnly:U.boolean().optional().default(!1).describe("List directories only, no files (default: false). Similar to tree -d flag."),exclude:U.string().optional().describe('Pattern to exclude (e.g., "node_modules"). Similar to tree -I flag.'),extension:U.string().optional().describe('Filter by file extension (e.g., ".ts"). Similar to tree -P flag.'),pattern:U.union([U.string(),U.array(U.string())]).optional().describe('Glob pattern(s) to filter files. Omit this parameter to list all files (do NOT pass "*"). Use "**/*.ext" to match files recursively across directories. "*" only matches within a single directory level (standard glob). Glob patterns only filter files \u2014 directories are always shown to preserve tree structure. Examples: "**/*.ts", "src/**/*.test.ts", "*.config.{js,ts}".'),respectGitignore:U.boolean().optional().default(!0).describe("Respect .gitignore in the listed directory (default: true).")}),execute:async({path:$=".",maxDepth:Y=2,showHidden:X,dirsOnly:G,exclude:J,extension:Q,pattern:W,respectGitignore:Z},K)=>{let{workspace:H,filesystem:z}=hz(K);await sG(K,n4.FILESYSTEM.LIST_FILES);let V=(()=>{if(W===void 0)return;if(Array.isArray(W)){let F=W.filter((N)=>typeof N==="string"&&N.trim().length>0);return F.length>0?F:void 0}return W.trim().length>0?W:void 0})(),A=mY(K,H,{category:"filesystem",operation:"listFiles",input:{path:$,maxDepth:Y,pattern:V},attributes:{filesystemProvider:z.provider}});try{let F=await BO8(z,$,{maxDepth:Y,showHidden:X,dirsOnly:G,exclude:J||void 0,extension:Q||void 0,pattern:V,respectGitignore:Z}),N=await wf(`${F.tree}

${F.summary}`,H.getToolsConfig()?.[n4.FILESYSTEM.LIST_FILES]?.maxOutputTokens??1000,"end");return A.end({success:!0},{resultCount:F.fileCount}),N}catch(F){throw A.error(F),F}}});qO8=X8({id:n4.LSP.LSP_INSPECT,description:"Inspect code at a specific symbol position using the Language Server Protocol. Provide an absolute file path, a 1-indexed line number, and the exact line content with <<< marking the cursor position. Exactly one <<< marker is required. Returns hover information, any diagnostics reported on that line, plus definition and implementation locations when available. Use this for type information, symbol navigation, and go-to-definition; use view to read the surrounding implementation.",inputSchema:U.object({path:U.string().describe("Absolute path to the file"),line:U.number().int().positive().describe("Line number (1-indexed)"),match:U.string().describe('Line content with <<< marking the cursor position. Exactly one <<< marker is required. Example: "const foo = <<<bar()" means cursor is at bar')}),execute:async({path:$,line:Y,match:X},G)=>{let J=bw(G);await sG(G,n4.LSP.LSP_INSPECT);let Q=mY(G,J,{category:"filesystem",operation:"lspInspect",input:{path:$,line:Y},attributes:{}}),W=[],Z=0;while(!0){let B=X.indexOf(Hi1,Z);if(B===-1)break;W.push(B),Z=B+Hi1.length}if(W.length===0)return Q.end({success:!1}),{error:"No <<< cursor marker found in match"};if(W.length>1)return Q.end({success:!1}),{error:`Multiple <<< markers found (found ${W.length}, expected 1)`};let K=W[0]+1,H=J.lsp;if(!H)return Q.end({success:!1}),{error:"LSP is not configured for this workspace. Enable LSP in workspace config to use this tool."};let z=RO8($,H.root,J.filesystem?.resolveAbsolutePath?.bind(J.filesystem)),V="";try{V=await XS0.readFile(z,"utf-8")}catch{V=""}let A;try{A=await H.prepareQuery(z)}catch(B){return Q.end({success:!1}),{error:`Failed to initialize LSP client: ${B instanceof Error?B.message:String(B)}`}}if(!A)return Q.end({success:!1}),{error:`No language server available for files of this type: ${$}`};let{client:F,uri:N}=A,D={line:Y-1,character:K-1},L={};try{let B=await F.queryHover(N,D).catch(()=>null);if(B){let P=B.contents;if(P){if(typeof P==="string")L.hover={value:P,kind:"plaintext"};else if(Array.isArray(P)){let _=P[0];if(typeof _==="string")L.hover={value:_,kind:"plaintext"};else if(_?.value)L.hover={value:_.value,kind:_.kind??"markdown"}}else if(P.value)L.hover={value:P.value,kind:P.kind??"markdown"}}}let O=V?Promise.resolve().then(()=>{return F.notifyChange(z,V,1),F.waitForDiagnostics(z,5000,!0)}).catch(()=>[]):Promise.resolve([]),[E,M,R]=await Promise.all([O,F.queryDefinition(N,D).catch(()=>[]),F.queryImplementation(N,D).catch(()=>[])]);if(E&&E.length>0){let P=E.map((_)=>({line:typeof _.line==="number"?_.line:(_.range?.start?.line??-1)+1,severity:typeof _.severity==="number"?_.severity===1?"error":_.severity===2?"warning":_.severity===3?"info":"hint":_.severity,message:_.message,source:_.source??null})).filter((_)=>_.line===Y).map(({severity:_,message:C,source:k})=>({severity:_,message:C,source:k}));if(P.length>0)L.diagnostics=P}let q=M.map((P)=>({uri:P.uri??P.targetUri,range:P.range??P.targetRange})).map((P)=>{let _=P.uri?zi1(String(P.uri)):null;return _?{path:_,line:(P.range?.start?.line??0)+1,character:(P.range?.start?.character??0)+1}:null}).filter((P)=>Boolean(P)).filter((P)=>!(P.path===z&&P.line===Y));if(q.length>0){let P=await Promise.all(q.map((_)=>MO8(_.path,_.line)));L.definition=q.map((_,C)=>({location:`${Ai1(_.path)}:L${_.line}:C${_.character}`,preview:P[C]}))}let w=new Set(q.map(Vi1)),I=R.map((P)=>({uri:P.uri??P.targetUri,range:P.range??P.targetRange})).map((P)=>{let _=P.uri?zi1(String(P.uri)):null;return _?{path:_,line:(P.range?.start?.line??0)+1,character:(P.range?.start?.character??0)+1}:null}).filter((P)=>Boolean(P)).filter((P)=>!w.has(Vi1(P))&&!(P.path===z&&P.line===Y));if(I.length>0)L.implementation=I.map((P)=>`${Ai1(P.path)}:L${P.line}:C${P.character}`)}catch(B){L.error=`LSP query failed: ${B instanceof Error?B.message:String(B)}`}finally{F.notifyClose(z)}return Q.end({success:!L.error}),L}}),IO8=X8({id:n4.FILESYSTEM.MKDIR,description:"Create a directory in the workspace filesystem",inputSchema:U.object({path:U.string().describe("The path of the directory to create"),recursive:U.boolean().optional().default(!0).describe("Whether to create parent directories if they do not exist")}),execute:async({path:$,recursive:Y},X)=>{let{workspace:G,filesystem:J}=hz(X);await sG(X,n4.FILESYSTEM.MKDIR);let Q=mY(X,G,{category:"filesystem",operation:"mkdir",input:{path:$,recursive:Y},attributes:{filesystemProvider:J.provider}});try{if(J.readOnly)throw new Tf("mkdir");return await J.mkdir($,{recursive:Y}),Q.end({success:!0}),`Created directory ${$}`}catch(W){throw Q.error(W),W}}});wO8=["image/png","image/jpeg","image/webp","application/pdf"],jO8=new Set(["application/json","application/javascript","application/typescript","application/xml","application/graphql","application/x-sh","application/x-yaml","application/yaml","application/ld+json","application/sql"]);CO8=/^(?:\*|\*\/\*|[a-z0-9!#$&^_.+-]+\/(?:\*|[a-z0-9!#$&^_.+-]+))$/i;vO8=X8({id:n4.FILESYSTEM.READ_FILE,description:"Read a file from the workspace filesystem. Text files come back as text \u2014 use offset/limit to read a line range from large files. Supported media files come back as a native file part you can view directly. Other binary files return only their metadata (path, size, mime type) since their raw contents are not useful to read.",inputSchema:U.object({path:U.string().describe('The path to the file to read (e.g., "data/config.json")'),offset:U.number().int().min(1).optional().describe("Line number to start reading from (1-indexed). Only used when reading text files; ignored for media and other binary files. Defaults to line 1 if omitted."),limit:U.number().int().min(1).optional().describe("Maximum number of lines to read. Only used when reading text files; ignored for media and other binary files. Defaults to the end of the file if omitted."),showLineNumbers:U.boolean().optional().default(!0).describe("Prefix each line with its line number. Only used when reading text files; ignored for media and other binary files. Defaults to true if omitted."),encoding:U.enum(["utf-8","utf8","base64","hex","binary"]).optional().describe("Usually omit this \u2014 text files and supported media are handled automatically. Pass `base64` or `hex` to get the file's raw bytes encoded as text when you need to inspect an unsupported binary file that would otherwise only return metadata (e.g. checking a file header or magic bytes).")}),execute:async({path:$,encoding:Y,offset:X,limit:G,showLineNumbers:J},Q)=>{let{workspace:W,filesystem:Z}=hz(Q);await sG(Q,n4.FILESYSTEM.READ_FILE);let K=mY(Q,W,{category:"filesystem",operation:"readFile",input:{path:$,encoding:Y,offset:X,limit:G},attributes:{filesystemProvider:Z.provider}});try{let H=await Z.stat($),z=W.getToolsConfig()?.[n4.FILESYSTEM.READ_FILE],V=kO8(z?.mediaTypes);if(!Y&&V(H.mimeType)){let q=z?.maxMediaBytes??_O8;if(H.size>q)return K.end({success:!0},{bytesTransferred:0}),`${H.path} (${H.size} bytes, ${H.mimeType}) \u2014 exceeds maxMediaBytes (${q}). Returning metadata only; configure \`maxMediaBytes\` on the read_file tool to raise this cap.`;let w=await Z.readFile($,{encoding:"base64"}),I=`${H.path} (${H.size} bytes, ${H.mimeType})`;return K.end({success:!0},{bytesTransferred:H.size}),{__workspaceMedia:!0,text:I,mediaType:H.mimeType,data:w}}if(!Y&&!TO8(H.mimeType))return K.end({success:!0},{bytesTransferred:0}),`${H.path} (${H.size} bytes, ${H.mimeType??"unknown"}) \u2014 binary file not readable as text. Pass an explicit \`encoding\` (e.g. \`base64\`) to read the raw bytes, or configure \`mediaTypes\` on the read_file tool to surface it as a media part.`;let A=Y??"utf-8",F=await Z.readFile($,{encoding:A}),N=!Y||Y==="utf-8"||Y==="utf8",D=z?.maxOutputTokens;if(!N){let q=await wf(`${H.path} (${H.size} bytes, ${A})
${F}`,D,"end");return K.end({success:!0},{bytesTransferred:H.size}),q}if(typeof F!=="string"){let q=await wf(`${H.path} (${H.size} bytes, base64)
${F.toString("base64")}`,D,"end");return K.end({success:!0},{bytesTransferred:H.size}),q}let L=X!==void 0||G!==void 0,B=RB8(F,X,G),E=J!==!1?qB8(B.content,B.lines.start):B.content,M;if(L)M=`${H.path} (lines ${B.lines.start}-${B.lines.end} of ${B.totalLines}, ${H.size} bytes)`;else M=`${H.path} (${H.size} bytes)`;let R=await wf(`${M}
${E}`,D,"end");return K.end({success:!0},{bytesTransferred:H.size}),R}catch(H){throw K.error(H),H}},toModelOutput:($)=>{if(PO8($))return{type:"content",value:[{type:"text",text:$.text},{type:"media",data:$.data,mediaType:$.mediaType}]};return}}),xi1=U.object({query:U.string().describe("The search query string"),topK:U.number().optional().default(5).describe("Maximum number of results to return"),mode:U.enum(["bm25","vector","hybrid"]).optional().describe("Search mode: bm25 for keyword search, vector for semantic search, hybrid for both combined"),minScore:U.number().optional().describe("Minimum score threshold (0-1 for normalized scores)")}),xO8=X8({id:n4.SEARCH.SEARCH,description:"Search indexed content in the workspace. Supports keyword (BM25), semantic (vector), and hybrid search modes.",inputSchema:xi1,execute:async({query:$,topK:Y,mode:X,minScore:G},J)=>{let Q=bw(J);await sG(J,n4.SEARCH.SEARCH);let W=mY(J,Q,{category:"search",operation:"search",input:{query:$,topK:Y,mode:X,minScore:G},attributes:{}});try{let Z=X==="hybrid"&&!Q.canHybrid?Q.canVector?"vector":"bm25":X==="vector"&&!Q.canVector?"bm25":X??(Q.canHybrid?"hybrid":Q.canVector?"vector":"bm25"),K=await Q.search($,{topK:Y,mode:Z,minScore:G}),H=K.map((z)=>{let V=z.lineRange?`:${z.lineRange.start}-${z.lineRange.end}`:"";return`${z.id}${V}: ${z.content}`});return H.push("---"),H.push(`${K.length} result${K.length!==1?"s":""} (${Z} search)`),W.end({success:!0},{resultCount:K.length}),H.join(`
`)}catch(Z){throw W.error(Z),Z}}}),yO8=X8({id:n4.FILESYSTEM.WRITE_FILE,description:"Write content to a file in the workspace filesystem. Creates parent directories if needed.",inputSchema:U.object({path:U.string().describe('The path where to write the file (e.g., "data/output.txt")'),content:U.string().describe("The content to write to the file"),overwrite:U.boolean().optional().default(!0).describe("Whether to overwrite the file if it already exists")}),execute:async({path:$,content:Y,overwrite:X},G)=>{let{workspace:J,filesystem:Q}=hz(G);await sG(G,n4.FILESYSTEM.WRITE_FILE);let W=mY(G,J,{category:"filesystem",operation:"writeFile",input:{path:$,overwrite:X,contentLength:Y.length},attributes:{filesystemProvider:Q.provider}});try{if(Q.readOnly)throw new Tf("write_file");await Q.writeFile($,Y,{overwrite:X,expectedMtime:G?.__expectedMtime});let Z=Buffer.byteLength(Y,"utf-8"),K=`Wrote ${Z} bytes to ${$}`;return K+=await ZS0(J,$,Y),W.end({success:!0},{bytesTransferred:Z}),K}catch(Z){throw W.error(Z),Z}}})});import{execFile as mO8}from"child_process";import{realpathSync as gi1}from"fs";import{relative as uO8}from"path";function A4($,Y){if($===!1)return Number.MAX_SAFE_INTEGER;else if($===0)return 0;else if(typeof $==="number"&&$>0)return $;else if(typeof $==="number"&&$<0)throw Error("perPage must be >= 0");return Y}function B4($,Y,X){return{offset:Y===!1?0:$*X,perPage:Y===!1?!1:X}}var HS0,nF,pi1,IW,pO8,mi1,dO8,QG,zS0=class{repoRootCache=new Map;commitCache=new Map;snapshotCache=new Map;async isGitRepo($){let Y=this.repoRootCache.get($);if(Y===!1)return!1;if(typeof Y==="string")return!0;try{let X=(await this.exec($,["rev-parse","--show-toplevel"])).trim();return this.repoRootCache.set($,X),!0}catch{return this.repoRootCache.set($,!1),!1}}async getFileHistory($,Y,X=50){let G=`${$}:${Y}:${X}`;if(this.commitCache.has(G))return this.commitCache.get(G);if(!await this.isGitRepo($))return this.commitCache.set(G,[]),[];try{let J=await this.exec($,["log",`--max-count=${X}`,"--format=%H|%aI|%aN|%s","--follow","--",Y]),Q=[];for(let W of J.split(`
`)){let Z=W.trim();if(!Z)continue;let K=Z.indexOf("|"),H=Z.indexOf("|",K+1),z=Z.indexOf("|",H+1);if(K===-1||H===-1||z===-1)continue;Q.push({hash:Z.slice(0,K),date:new Date(Z.slice(K+1,H)),author:Z.slice(H+1,z),message:Z.slice(z+1)})}return this.commitCache.set(G,Q),Q}catch{return this.commitCache.set(G,[]),[]}}async getFileAtCommit($,Y,X){let G=`${$}:${Y}:${X}`;if(this.snapshotCache.has(G))return this.snapshotCache.get(G);if(!await this.isGitRepo($))return null;try{let J=this.relativeToRepo($,X),Q=await this.exec($,["show",`${Y}:${J}`]),W=JSON.parse(Q);return this.snapshotCache.set(G,W),W}catch{return null}}invalidateCache(){this.repoRootCache.clear(),this.commitCache.clear(),this.snapshotCache.clear()}relativeToRepo($,Y){let X=this.repoRootCache.get($);if(!X)throw Error(`Not a git repository: ${$}`);let G=gi1(X),J=gi1($),Q=uO8(G,J);return Q?`${Q}/${Y}`:Y}exec($,Y){return new Promise((X,G)=>{mO8("git",Y,{cwd:$,maxBuffer:10485760},(J,Q)=>{if(J)G(J);else X(Q)})})}},ui1="git-",WG;var EU=V0(()=>{dZ();HS0=["agents","promptBlocks","scorerDefinitions","mcpClients","mcpServers","workspaces","skills","favorites"];nF=class extends u8{hasInitialized=null;shouldCacheInit=!0;id;stores;disableInit=!1;constructor($){let Y=$.name??"MastraCompositeStore";if(!$.id||typeof $.id!=="string"||$.id.trim()==="")throw Error(`${Y}: id must be provided and cannot be empty.`);super({component:"STORAGE",name:Y});if(this.id=$.id,this.disableInit=$.disableInit??!1,$.default||$.editor||$.domains){let X=$.default?.stores,G=$.editor?.stores,J=$.domains??{},Q=X&&Object.values(X).some((z)=>z!==void 0),W=G&&Object.values(G).some((z)=>z!==void 0),Z=Object.values(J).some((z)=>z!==void 0);if(!Q&&!W&&!Z)throw Error("MastraCompositeStore requires at least one storage source. Provide a default storage, an editor storage, or domain overrides.");let K=new Set(HS0),H=(z)=>{if(J[z]!==void 0)return J[z];if(K.has(z)&&G?.[z]!==void 0)return G[z];return X?.[z]};this.stores={memory:H("memory"),workflows:H("workflows"),scores:H("scores"),observability:H("observability"),agents:H("agents"),datasets:H("datasets"),experiments:H("experiments"),promptBlocks:H("promptBlocks"),scorerDefinitions:H("scorerDefinitions"),mcpClients:H("mcpClients"),mcpServers:H("mcpServers"),workspaces:H("workspaces"),skills:H("skills"),favorites:H("favorites"),blobs:H("blobs"),backgroundTasks:H("backgroundTasks"),schedules:H("schedules"),channels:H("channels")}}}async getStore($){return this.stores?.[$]}async init(){if(this.shouldCacheInit&&await this.hasInitialized)return;let $=[];if(this.stores?.memory)$.push(this.stores.memory.init());if(this.stores?.workflows)$.push(this.stores.workflows.init());if(this.stores?.scores)$.push(this.stores.scores.init());if(this.stores?.observability)$.push(this.stores.observability.init());if(this.stores?.agents)$.push(this.stores.agents.init());if(this.stores?.datasets)$.push(this.stores.datasets.init());if(this.stores?.experiments)$.push(this.stores.experiments.init());if(this.stores?.promptBlocks)$.push(this.stores.promptBlocks.init());if(this.stores?.scorerDefinitions)$.push(this.stores.scorerDefinitions.init());if(this.stores?.mcpClients)$.push(this.stores.mcpClients.init());if(this.stores?.mcpServers)$.push(this.stores.mcpServers.init());if(this.stores?.workspaces)$.push(this.stores.workspaces.init());if(this.stores?.skills)$.push(this.stores.skills.init());if(this.stores?.favorites)$.push(this.stores.favorites.init());if(this.stores?.blobs)$.push(this.stores.blobs.init());if(this.stores?.backgroundTasks)$.push(this.stores.backgroundTasks.init());if(this.stores?.schedules)$.push(this.stores.schedules.init());if(this.stores?.channels)$.push(this.stores.channels.init());this.hasInitialized=Promise.all($).then(()=>!0),await this.hasInitialized}},pi1=class extends nF{},IW=class extends u8{async init(){}},pO8={createdAt:!0,updatedAt:!0},mi1={ASC:!0,DESC:!0},dO8={versionNumber:!0,createdAt:!0},QG=class extends IW{extractSnapshotConfig($){let Y={},X=new Set(this.versionMetadataFields);for(let[G,J]of Object.entries($))if(!X.has(G))Y[G]=J;return Y}async getByIdResolved($,Y){let X=await this.getById($);if(!X)return null;return this.resolveEntity(X,Y)}async listResolved($){let Y=await this.list($),X=$?.status,G=Y[this.listKey],J=await Promise.all(G.map((Q)=>this.resolveEntity(Q,{status:X})));return{...Y,[this.listKey]:J}}async resolveEntity($,Y){let X=Y?.status||"published",G=null;if(Y?.versionId)G=await this.getVersion(Y.versionId);else if(X==="draft")G=await this.getLatestVersion($.id);else{if($.activeVersionId){if(G=await this.getVersion($.activeVersionId),!G)this.logger?.warn?.(`Entity ${$.id} has activeVersionId ${$.activeVersionId} but version not found. Falling back to latest version.`)}if(!G)G=await this.getLatestVersion($.id)}if(G){let J=this.extractSnapshotConfig(G);return{...$,...J,resolvedVersionId:G.id}}return $}parseOrderBy($,Y="DESC"){return{field:$?.field&&$.field in pO8?$.field:"createdAt",direction:$?.direction&&$.direction in mi1?$.direction:Y}}parseVersionOrderBy($,Y="DESC"){return{field:$?.field&&$.field in dO8?$.field:"versionNumber",direction:$?.direction&&$.direction in mi1?$.direction:Y}}},WG=class ${db;entitiesFile;parentIdField;name;versionMetadataFields;gitHistoryLimit;entities=new Map;versions=new Map;hydrated=!1;static gitHistory=new zS0;gitHistoryPromise=null;gitVersionCounts=new Map;constructor(Y){this.db=Y.db,this.entitiesFile=Y.entitiesFile,this.parentIdField=Y.parentIdField,this.name=Y.name,this.versionMetadataFields=Y.versionMetadataFields,this.gitHistoryLimit=Y.gitHistoryLimit??50}static isGitVersion(Y){return Y.startsWith(ui1)}hydrate(){if(this.hydrated)return;this.hydrated=!0;let Y=this.db.readDomain(this.entitiesFile);for(let[X,G]of Object.entries(Y)){if(!G||typeof G!=="object")continue;let J=`hydrated-${X}-v1`,Q=new Date,W={id:X,status:"published",activeVersionId:J,createdAt:Q,updatedAt:Q};this.entities.set(X,W);let Z={id:J,[this.parentIdField]:X,versionNumber:1,...G,createdAt:Q};this.versions.set(J,Z)}this.gitHistoryPromise=this.loadGitHistory()}async ensureGitHistory(){if(this.hydrate(),this.gitHistoryPromise)await this.gitHistoryPromise}async loadGitHistory(){let Y=$.gitHistory,X=this.db.dir;if(!await Y.isGitRepo(X))return;let J=await Y.getFileHistory(X,this.entitiesFile,this.gitHistoryLimit);if(J.length===0)return;let Q=[...J].reverse(),W=new Map,Z=new Map;for(let K=0;K<Q.length;K++){let H=Q[K],z=await Y.getFileAtCommit(X,H.hash,this.entitiesFile);if(!z)continue;for(let[V,A]of Object.entries(z)){if(!A||typeof A!=="object")continue;let F=JSON.stringify(A);if(Z.get(V)===F)continue;Z.set(V,F);let N=(W.get(V)??0)+1;W.set(V,N);let D=`${ui1}${H.hash}-${V}`;if(this.versions.has(D))continue;let L={id:D,[this.parentIdField]:V,versionNumber:N,changeMessage:H.message,...A,createdAt:H.date};this.versions.set(D,L)}}this.gitVersionCounts=W;for(let[K,H]of W){let z=`hydrated-${K}-v1`,V=this.versions.get(z);if(V)V.versionNumber=H+1}}persistToDisk(){let Y={};for(let[X,G]of this.entities){if(G.status!=="published"||!G.activeVersionId)continue;let J=this.versions.get(G.activeVersionId);if(!J)continue;let Q=this.extractSnapshotConfig(J);Y[X]=Q}this.db.writeDomain(this.entitiesFile,Y)}extractSnapshotConfig(Y){let X=new Set(this.versionMetadataFields),G={};for(let[J,Q]of Object.entries(Y))if(!X.has(J))G[J]=Q;return G}async getById(Y){return this.hydrate(),this.entities.has(Y)?structuredClone(this.entities.get(Y)):null}async createEntity(Y,X){if(this.hydrate(),this.entities.has(Y))throw Error(`${this.name}: entity with id ${Y} already exists`);return this.entities.set(Y,structuredClone(X)),structuredClone(X)}async updateEntity(Y,X){this.hydrate();let G=this.entities.get(Y);if(!G)throw Error(`${this.name}: entity with id ${Y} not found`);let J={...G};for(let[K,H]of Object.entries(X)){if(K==="id")continue;if(H===void 0)continue;if(K==="metadata"&&typeof H==="object"&&H!==null)J.metadata={...J.metadata??{},...H};else J[K]=H}J.updatedAt=new Date;let Q=J;this.entities.set(Y,structuredClone(Q));let W=G.status==="published";if(Q.status==="published"&&Q.activeVersionId||W&&X.status!==void 0)this.persistToDisk();return structuredClone(Q)}async deleteEntity(Y){this.hydrate(),this.entities.delete(Y),await this.deleteVersionsByParentId(Y),this.persistToDisk()}async listEntities(Y){this.hydrate();let{page:X=0,perPage:G,orderBy:J,filters:Q,listKey:W}=Y,Z=A4(G,100);if(X<0)throw Error("page must be >= 0");let K=Array.from(this.entities.values());if(Q)for(let[F,N]of Object.entries(Q)){if(N===void 0)continue;if(F==="metadata"&&typeof N==="object"&&N!==null)K=K.filter((D)=>{let L=D.metadata;if(!L)return!1;return Object.entries(N).every(([B,O])=>JSON.stringify(L[B])===JSON.stringify(O))});else K=K.filter((D)=>D[F]===N)}let H=J?.field??"createdAt",z=J?.direction??"DESC";K.sort((F,N)=>{let D=new Date(F[H]).getTime(),L=new Date(N[H]).getTime();return z==="ASC"?D-L:L-D});let{offset:V,perPage:A}=B4(X,G,Z);return{[W]:K.slice(V,V+Z),total:K.length,page:X,perPage:A,hasMore:V+Z<K.length}}async createVersion(Y){if(await this.ensureGitHistory(),this.versions.has(Y.id))throw Error(`${this.name}: version with id ${Y.id} already exists`);let X=Y[this.parentIdField];for(let J of this.versions.values())if(J[this.parentIdField]===X&&J.versionNumber===Y.versionNumber)throw Error(`${this.name}: version number ${Y.versionNumber} already exists for entity ${X}`);let G={...Y,createdAt:new Date};return this.versions.set(Y.id,structuredClone(G)),structuredClone(G)}async getVersion(Y){return await this.ensureGitHistory(),this.versions.has(Y)?structuredClone(this.versions.get(Y)):null}async getVersionByNumber(Y,X){await this.ensureGitHistory();for(let G of this.versions.values())if(G[this.parentIdField]===Y&&G.versionNumber===X)return structuredClone(G);return null}async getLatestVersion(Y){await this.ensureGitHistory();let X=null;for(let G of this.versions.values())if(G[this.parentIdField]===Y){if(!X||G.versionNumber>X.versionNumber)X=G}return X?structuredClone(X):null}async listVersions(Y,X){await this.ensureGitHistory();let{page:G=0,perPage:J,orderBy:Q}=Y,W=Y[X],Z=A4(J,20);if(G<0)throw Error("page must be >= 0");let K=Array.from(this.versions.values()).filter((F)=>F[this.parentIdField]===W),H=Q?.field??"versionNumber",z=Q?.direction??"DESC";K.sort((F,N)=>{let D=H==="createdAt"?new Date(F.createdAt).getTime():F.versionNumber,L=H==="createdAt"?new Date(N.createdAt).getTime():N.versionNumber;return z==="ASC"?D-L:L-D});let{offset:V,perPage:A}=B4(G,J,Z);return{versions:K.slice(V,V+Z),total:K.length,page:G,perPage:A,hasMore:V+Z<K.length}}async deleteVersion(Y){if(await this.ensureGitHistory(),$.isGitVersion(Y))return;this.versions.delete(Y)}async deleteVersionsByParentId(Y){await this.ensureGitHistory();for(let[X,G]of this.versions)if(G[this.parentIdField]===Y){if($.isGitVersion(X))continue;this.versions.delete(X)}}async countVersions(Y){await this.ensureGitHistory();let X=0;for(let G of this.versions.values())if(G[this.parentIdField]===Y)X++;return X}async getNextVersionNumber(Y){return await this.ensureGitHistory(),this._getNextVersionNumber(Y)}_getNextVersionNumber(Y){let G=this.gitVersionCounts.get(Y)??0;for(let J of this.versions.values())if(J[this.parentIdField]===Y)G=Math.max(G,J.versionNumber);return G+1}async dangerouslyClearAll(){this.entities.clear(),this.versions.clear(),this.gitVersionCounts.clear(),this.gitHistoryPromise=null,this.hydrated=!1,this.db.clearDomain(this.entitiesFile)}}});import{WritableStream as cO8}from"stream/web";var PW;var s40=V0(()=>{PW=class extends cO8{prefix;callId;name;runId;writeFn;constructor({prefix:$,callId:Y,name:X,runId:G},J){super({async write(Z){await W()._write(Z)}});let Q=this;function W(){return Q}this.prefix=$,this.callId=Y,this.name=X,this.runId=G,this.writeFn=J}async _write($){if(this.writeFn)await this.writeFn({type:`${this.prefix}-output`,runId:this.runId,from:"USER",payload:{output:$,...this.prefix==="workflow-step"?{runId:this.runId,stepName:this.name}:{[`${this.prefix}CallId`]:this.callId,[`${this.prefix}Name`]:this.name}}})}async write($){await this._write($)}async custom($){if(this.writeFn)await this.writeFn($)}}});function CS0($){if(!$||typeof $!=="object"||Array.isArray($))return $;let Y={...$};if(typeof Y.userId==="string"&&Y.feedbackUserId==null)Y.feedbackUserId=Y.userId,delete Y.userId;return Y}var J6,VS0,AS0,PO,fz,iZ,rF,qU,nZ,gz,Cf,wO,FS0,DS0,NS0,gw,mw,LS0,BS0,aF,OS0,t40,e40,$60,Y60,X60,G60,J60,Q60,W60,ES0,Z60,K60,U60,MS0,H60,z60,RS0,V60,di1,ci1,li1,uw,qS0,pw,dw,ii1,cw,_O,lw,v7,FQ,hw,ni1,ri1,A60,ai1,IS0,si1,PS0,wS0,_S0,F60,oi1,iw,ti1,ei1,MU,$n1,Yn1,D60,Xn1,Sf,Gn1,Jn1,Qn1,Wn1,jO,jS0,TS0,N60,Zn1,Kn1,Un1,Hn1,zn1,Vn1,An1,Fn1,Dn1,RU,nw,Nn1,Ln1,o40,L60,B60,lO8,Bn1,On1,En1,Mn1,Rn1,qn1,In1,rw,SS0,kS0,O60,Pn1,wn1,_n1,jn1,Tn1,Cn1,Sn1,kn1,vn1,xn1,yn1,bn1,hn1,fn1,gn1,iO8,mn1,nO8,E60,un1,vS0,pn1,dn1,TO,xS0,yS0,M60,cn1,bS0,kf,fw,ln1,in1,nn1,rn1,an1,sn1,on1,tn1,en1,$r1,Yr1,Xr1,Gr1,Jr1,Qr1,Wr1,Zr1,Kr1,Ur1,Hr1,zr1,Vr1,Ar1,Fr1,mz;var uz=V0(()=>{O1();J6=(($)=>{return $.AGENT="agent",$.SCORER="scorer",$.RAG_INGESTION="rag_ingestion",$.TRAJECTORY="trajectory",$.INPUT_PROCESSOR="input_processor",$.INPUT_STEP_PROCESSOR="input_step_processor",$.OUTPUT_PROCESSOR="output_processor",$.OUTPUT_STEP_PROCESSOR="output_step_processor",$.WORKFLOW_STEP="workflow_step",$.TOOL="tool",$.WORKFLOW_RUN="workflow_run",$.MEMORY="memory",$})(J6||{}),VS0=U.date().describe("Database record creation time"),AS0=U.date().describe("Database record last update time"),PO={createdAt:VS0,updatedAt:AS0.nullable()},fz=U.object({page:U.coerce.number().int().min(0).optional().default(0).describe("Zero-indexed page number"),perPage:U.coerce.number().int().min(1).max(100).optional().default(10).describe("Number of items per page")}).describe("Pagination options for list queries"),iZ=U.object({total:U.number().describe("Total number of items available"),page:U.number().describe("Current page"),perPage:U.union([U.number(),U.literal(!1)]).describe("Number of items per page, or false if pagination is disabled"),hasMore:U.boolean().describe("True if more pages are available")}),rF=U.object({start:U.coerce.date().optional().describe("Start of date range (inclusive by default)"),end:U.coerce.date().optional().describe("End of date range (inclusive by default)"),startExclusive:U.boolean().optional().describe("When true, excludes the start date from results (uses > instead of >=)"),endExclusive:U.boolean().optional().describe("When true, excludes the end date from results (uses < instead of <=)")}).describe("Date range filter for timestamps"),qU=U.enum(["ASC","DESC"]).describe("Sort direction: 'ASC' | 'DESC'"),nZ=U.enum(["sum","avg","min","max","count","count_distinct","last"]).describe("Aggregation function"),gz=U.enum(["1m","5m","15m","1h","1d"]).describe("Time bucket interval"),Cf=U.enum(["previous_period","previous_day","previous_week"]).describe("Comparison period for aggregate queries"),wO=U.array(U.string()).min(1).describe("Fields to group by"),FS0=U.array(U.number().min(0).max(1)).min(1).describe("Percentile values (0-1)"),DS0={value:U.number().nullable().describe("Aggregated value"),previousValue:U.number().nullable().optional().describe("Value from comparison period"),changePercent:U.number().nullable().optional().describe("Percentage change from comparison period")},NS0=U.record(U.string(),U.string().nullable()).describe("Dimension values for this group"),gw=U.number().describe("Aggregated value"),mw=U.date().describe("Bucket timestamp"),LS0=U.number().describe("Percentile value"),BS0=U.number().describe("Percentile value at this bucket"),aF=U.nativeEnum(J6).describe("Entity type (e.g., 'agent' | 'processor' | 'tool' | 'workflow')"),OS0=U.string().describe('ID of the entity (e.g., "weatherAgent", "orderWorkflow")'),t40=U.string().describe("Name of the entity"),e40=U.string().describe("Human end-user who triggered execution"),$60=U.string().describe("Multi-tenant organization/account"),Y60=U.string().describe("Broader resource context (Mastra memory compatibility)"),X60=U.string().describe("Unique execution run identifier"),G60=U.string().describe("Session identifier for grouping traces"),J60=U.string().describe("Conversation thread identifier"),Q60=U.string().describe("HTTP request ID for log correlation"),W60=U.string().describe('Environment (e.g., "production" | "staging" | "development")'),ES0=U.string().describe('Source of execution (e.g., "local" | "cloud" | "ci")'),Z60=U.string().describe('Source of execution (e.g., "local" | "cloud" | "ci")'),K60=U.string().describe("Name of the service"),U60=U.nativeEnum(J6).describe("Entity type of the parent entity"),MS0=U.string().describe("ID of the parent entity"),H60=U.string().describe("Name of the parent entity"),z60=U.nativeEnum(J6).describe("Entity type of the root entity"),RS0=U.string().describe("ID of the root entity"),V60=U.string().describe("Name of the root entity"),di1=U.string().describe("Version ID of the entity that produced this signal (e.g., agent version, workflow version)"),ci1=U.string().describe("Version ID of the parent entity that produced this signal"),li1=U.string().describe("Version ID of the root entity that produced this signal"),uw=U.string().describe("Experiment or eval run identifier"),qS0=U.record(U.string(),U.unknown()).describe('Arbitrary package/app version info (e.g., {"core": "1.0.0", "memory": "1.0.0", "gitSha": "abcd1234"})'),pw=U.record(U.string(),U.unknown()).describe("User-defined metadata for custom filtering"),dw=U.array(U.string()).describe("Labels for filtering"),ii1={entityType:aF.nullish(),entityId:OS0.nullish(),entityName:t40.nullish(),parentEntityType:U60.nullish(),parentEntityId:MS0.nullish(),parentEntityName:H60.nullish(),rootEntityType:z60.nullish(),rootEntityId:RS0.nullish(),rootEntityName:V60.nullish(),userId:e40.nullish(),organizationId:$60.nullish(),resourceId:Y60.nullish(),runId:X60.nullish(),sessionId:G60.nullish(),threadId:J60.nullish(),requestId:Q60.nullish(),environment:W60.nullish(),serviceName:K60.nullish(),scope:qS0.nullish(),entityVersionId:di1.nullish(),parentEntityVersionId:ci1.nullish(),rootEntityVersionId:li1.nullish(),experimentId:uw.nullish()},cw={...ii1,executionSource:Z60.nullish(),tags:dw.nullish()},_O={...ii1,source:ES0.nullish()},lw={timestamp:rF.optional().describe("Filter by timestamp range"),traceId:U.string().optional().describe("Filter by trace ID"),spanId:U.string().optional().describe("Filter by span ID"),entityType:aF.optional(),entityName:t40.optional(),entityVersionId:di1.optional(),parentEntityVersionId:ci1.optional(),rootEntityVersionId:li1.optional(),userId:e40.optional(),organizationId:$60.optional(),experimentId:uw.optional(),serviceName:K60.optional(),environment:W60.optional(),parentEntityType:U60.optional(),parentEntityName:H60.optional(),rootEntityType:z60.optional(),rootEntityName:V60.optional(),resourceId:Y60.optional(),runId:X60.optional(),sessionId:G60.optional(),threadId:J60.optional(),requestId:Q60.optional(),executionSource:Z60.optional(),tags:U.array(U.string()).optional().describe("Filter by tags (must have all specified tags)")},v7=U.string().describe("Unique trace identifier"),FQ=U.string().describe("Unique span identifier within a trace"),hw=U.enum(["debug","info","warn","error","fatal"]),ni1=U.string().describe("Log message"),ri1=U.record(U.string(),U.unknown()).describe("Structured data attached to the log"),A60=U.object({logId:U.string().nullish().describe("Unique id for this log event"),timestamp:U.date().describe("When the log was created"),level:hw.describe("Log severity level"),message:ni1,data:ri1.nullish(),traceId:v7.nullish(),spanId:FQ.nullish(),...cw,source:U.string().nullish().describe("Execution source"),metadata:pw.nullish()}).describe("Log record as stored in the database"),ai1=U.object({level:hw,message:ni1,data:ri1.optional(),tags:dw.optional()}).describe("User-provided log input"),IS0=A60,si1=U.object({logs:U.array(IS0)}).describe("Arguments for batch creating logs"),PS0=U.object({...lw,source:U.string().optional().describe("Filter by execution source"),level:U.union([hw,U.array(hw)]).optional().describe("Filter by log level(s)")}).describe("Filters for querying logs"),wS0=U.enum(["timestamp"]).describe("Field to order by: 'timestamp'"),_S0=U.object({field:wS0.default("timestamp").describe("Field to order by"),direction:qU.default("DESC").describe("Sort direction")}).describe("Order by configuration"),F60=U.object({filters:PS0.optional().describe("Optional filters to apply"),pagination:fz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:_S0.default({field:"timestamp",direction:"DESC"}).describe("Ordering configuration (defaults to timestamp desc)")}).describe("Arguments for listing logs"),oi1=U.object({pagination:iZ,logs:U.array(A60)}),iw=U.string().describe("Identifier of the scorer (e.g., relevance, accuracy)"),ti1=U.string().describe("Display name of the scorer"),ei1=U.string().describe("Version of the scorer"),MU=U.string().describe("How the score was produced (e.g., manual, automated, experiment)"),$n1=U.number().describe("Score value (range defined by scorer)"),Yn1=U.string().describe("Explanation for the score"),D60=U.object({scoreId:U.string().nullish().describe("Unique id for this score event"),timestamp:U.date().describe("When the score was recorded"),traceId:v7.nullish().describe("Trace that anchors the scored target when available"),spanId:FQ.nullish().describe("Span ID this score applies to"),scorerId:iw,scorerName:ti1.nullish(),scorerVersion:ei1.nullish(),scoreSource:MU.nullish(),source:MU.nullish(),score:$n1,reason:Yn1.nullish(),...cw,scoreTraceId:U.string().nullish().describe("Trace ID of the scoring run for debugging score generation"),metadata:U.record(U.string(),U.unknown()).nullish().describe("User-defined metadata")}).describe("Score record as stored in the database"),Xn1=U.object({scorerId:iw,scorerName:ti1.optional(),scorerVersion:ei1.optional(),scoreSource:MU.optional(),source:MU.optional(),score:$n1,reason:Yn1.optional(),metadata:U.record(U.string(),U.unknown()).optional().describe("Additional scorer-specific metadata"),experimentId:uw.optional(),scoreTraceId:U.string().optional().describe("Trace ID of the scoring run for debugging score generation"),targetEntityType:aF.optional().describe("Entity type the scorer evaluated when known")}).describe("User-provided score input"),Sf=D60,Gn1=U.object({score:Sf}).describe("Arguments for creating a score"),Jn1=U.object({score:Sf.omit({timestamp:!0})}).describe("Arguments for creating a score"),Qn1=U.object({success:U.boolean()}).describe("Response from creating a score"),Wn1=U.object({scores:U.array(Sf)}).describe("Arguments for batch recording scores"),jO=U.object({...lw,scorerId:U.union([U.string(),U.array(U.string())]).optional().describe("Filter by scorer ID(s)"),scoreSource:MU.optional().describe("Filter by how the score was produced"),source:MU.optional().describe("Filter by how the score was produced")}).describe("Filters for querying scores"),jS0=U.enum(["timestamp","score"]).describe("Field to order by: 'timestamp' | 'score'"),TS0=U.object({field:jS0.default("timestamp").describe("Field to order by"),direction:qU.default("DESC").describe("Sort direction")}).describe("Order by configuration"),N60=U.object({filters:jO.optional(),pagination:fz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:TS0.default({field:"timestamp",direction:"DESC"}).describe("Ordering configuration (defaults to timestamp desc)")}).describe("Arguments for listing scores"),Zn1=U.object({pagination:iZ,scores:U.array(D60)}),Kn1=U.object({scorerId:iw,scoreSource:MU.optional(),aggregation:nZ,filters:jO.optional(),comparePeriod:Cf.optional()}).describe("Arguments for getting a score aggregate"),Un1=U.object(DS0),Hn1=U.object({scorerId:iw,scoreSource:MU.optional(),groupBy:wO,aggregation:nZ,filters:jO.optional()}).describe("Arguments for getting a score breakdown"),zn1=U.object({groups:U.array(U.object({dimensions:NS0,value:gw}))}),Vn1=U.object({scorerId:iw,scoreSource:MU.optional(),interval:gz,aggregation:nZ,filters:jO.optional(),groupBy:wO.optional()}).describe("Arguments for getting score time series"),An1=U.object({series:U.array(U.object({name:U.string().describe("Series name (scorer ID or group key)"),points:U.array(U.object({timestamp:mw,value:gw}))}))}),Fn1=U.object({scorerId:iw,scoreSource:MU.optional(),percentiles:FS0,interval:gz,filters:jO.optional()}).describe("Arguments for getting score percentiles"),Dn1=U.object({series:U.array(U.object({percentile:LS0,points:U.array(U.object({timestamp:mw,value:BS0}))}))}),RU=U.string().describe("Source of feedback (e.g., 'user', 'system', 'manual')"),nw=U.string().describe("Type of feedback (e.g., 'thumbs', 'rating', 'correction')"),Nn1=U.union([U.number(),U.string()]).describe("Feedback value (rating number or correction text)"),Ln1=U.string().describe("Additional comment or context"),o40=U.string().describe("User who provided the feedback");L60=U.object({feedbackId:U.string().nullish().describe("Unique id for this feedback event"),timestamp:U.date().describe("When the feedback was recorded"),traceId:v7.nullish().describe("Trace that anchors the feedback target when available"),spanId:FQ.nullish().describe("Span ID this feedback applies to"),feedbackSource:RU.nullish(),source:RU.nullish(),feedbackType:nw,value:Nn1,comment:Ln1.nullish(),feedbackUserId:o40.nullish(),...cw,sourceId:U.string().nullish().describe("ID of the source record this feedback is linked to (e.g. experiment result ID)"),metadata:U.record(U.string(),U.unknown()).nullish().describe("User-defined metadata")}),B60=U.object(L60.shape).describe("Feedback record as stored in the database"),lO8=U.object({feedbackSource:RU.optional(),source:RU.optional(),feedbackType:nw,value:Nn1,comment:Ln1.optional(),feedbackUserId:o40.optional(),userId:o40.optional(),metadata:U.record(U.string(),U.unknown()).optional().describe("Additional feedback-specific metadata"),experimentId:uw.optional(),sourceId:U.string().optional().describe("ID of the source record this feedback is linked to")}),Bn1=U.object(lO8.shape).describe("User-provided feedback input"),On1=B60,En1=U.object({feedback:U.preprocess(CS0,L60)}).describe("Arguments for creating feedback"),Mn1=U.object({feedback:L60.omit({timestamp:!0})}).describe("Arguments for creating feedback"),Rn1=U.object({success:U.boolean()}).describe("Response from creating feedback"),qn1=U.object({feedbacks:U.array(U.preprocess(CS0,L60))}).describe("Arguments for batch recording feedback"),In1=U.object({...lw,feedbackType:U.union([U.string(),U.array(U.string())]).optional().describe("Filter by feedback type(s)"),feedbackSource:RU.optional(),source:RU.optional(),feedbackUserId:o40.optional()}),rw=U.object(In1.shape).describe("Filters for querying feedback"),SS0=U.enum(["timestamp"]).describe("Field to order by: 'timestamp'"),kS0=U.object({field:SS0.default("timestamp").describe("Field to order by"),direction:qU.default("DESC").describe("Sort direction")}).describe("Order by configuration"),O60=U.object({filters:U.preprocess(CS0,In1).optional().describe("Optional filters to apply"),pagination:fz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:kS0.default({field:"timestamp",direction:"DESC"}).describe("Ordering configuration (defaults to timestamp desc)")}).describe("Arguments for listing feedback"),Pn1=U.object({pagination:iZ,feedback:U.array(B60)}),wn1=U.object({feedbackType:nw,feedbackSource:RU.optional(),aggregation:nZ,filters:rw.optional(),comparePeriod:Cf.optional()}).describe("Arguments for getting a feedback aggregate over numeric values"),_n1=U.object(DS0),jn1=U.object({feedbackType:nw,feedbackSource:RU.optional(),groupBy:wO,aggregation:nZ,filters:rw.optional()}).describe("Arguments for getting a feedback breakdown over numeric values"),Tn1=U.object({groups:U.array(U.object({dimensions:NS0,value:gw}))}),Cn1=U.object({feedbackType:nw,feedbackSource:RU.optional(),interval:gz,aggregation:nZ,filters:rw.optional(),groupBy:wO.optional()}).describe("Arguments for getting feedback time series over numeric values"),Sn1=U.object({series:U.array(U.object({name:U.string().describe("Series name (feedback type or group key)"),points:U.array(U.object({timestamp:mw,value:gw}))}))}),kn1=U.object({feedbackType:nw,feedbackSource:RU.optional(),percentiles:FS0,interval:gz,filters:rw.optional()}).describe("Arguments for getting feedback percentiles over numeric values"),vn1=U.object({series:U.array(U.object({percentile:LS0,points:U.array(U.object({timestamp:mw,value:BS0}))}))}),xn1=U.enum(["counter","gauge","histogram"]),yn1=U.string().describe("Metric name (e.g., mastra_agent_duration_ms)"),bn1=U.number().describe("Metric value"),hn1=U.record(U.string(),U.string()).describe("Metric labels for dimensional filtering"),fn1=U.string().describe("Model provider"),gn1=U.string().describe("Model"),iO8=U.number().describe("Estimated cost"),mn1=U.string().describe("Unit for the estimated cost (e.g., usd)"),nO8=U.record(U.string(),U.unknown()).nullish().describe("Structured costing metadata"),E60=U.object({metricId:U.string().nullish().describe("Unique id for this metric event"),timestamp:U.date().describe("When the metric was recorded"),name:yn1,value:bn1,traceId:v7.nullish(),spanId:FQ.nullish(),...cw,source:U.string().nullish().describe("Execution source"),provider:fn1.nullish(),model:gn1.nullish(),estimatedCost:iO8.nullish(),costUnit:mn1.nullish(),costMetadata:nO8.nullish(),labels:hn1.default({}),metadata:pw.nullish()}).describe("Metric record as stored in the database"),un1=U.object({name:yn1,value:bn1,labels:hn1.optional()}).describe("User-provided metric input"),vS0=E60,pn1=U.object({metrics:U.array(vS0)}).describe("Arguments for batch recording metrics"),dn1=U.object({type:nZ,interval:gz.optional(),groupBy:wO.optional()}).describe("Metrics aggregation configuration"),TO=U.object({...lw,name:U.array(U.string()).nonempty().optional().describe("Filter by metric name(s)"),source:U.string().optional().describe("Filter by execution source"),provider:fn1.optional(),model:gn1.optional(),costUnit:mn1.optional(),labels:U.record(U.string(),U.string()).optional().describe("Exact match on label key-value pairs")}).describe("Filters for querying metrics"),xS0=U.enum(["timestamp"]).describe("Field to order by: 'timestamp'"),yS0=U.object({field:xS0.default("timestamp").describe("Field to order by"),direction:qU.default("DESC").describe("Sort direction")}).describe("Order by configuration"),M60=U.object({filters:TO.optional(),pagination:fz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:yS0.default({field:"timestamp",direction:"DESC"}).describe("Ordering configuration (defaults to timestamp desc)")}).describe("Arguments for listing metrics"),cn1=U.object({pagination:iZ,metrics:U.array(E60)}),bS0=["entityType","entityName","parentEntityType","parentEntityName","rootEntityType","rootEntityName","name","provider","model","environment","executionSource","serviceName","threadId","resourceId"],kf=U.enum(bS0).optional().describe("Column to apply count_distinct over (required when aggregation is 'count_distinct'). Restricted to allowlisted metric dimensions."),fw={check:($)=>$.aggregation!=="count_distinct"||$.distinctColumn!==void 0,options:{message:"distinctColumn is required when aggregation is 'count_distinct'",path:["distinctColumn"]}},ln1=U.object({name:U.array(U.string()).nonempty().describe("Metric name(s) to aggregate"),aggregation:nZ,distinctColumn:kf,filters:TO.optional(),comparePeriod:Cf.optional()}).refine(fw.check,fw.options).describe("Arguments for getting a metric aggregate"),in1=U.object({...DS0,estimatedCost:U.number().nullable().optional().describe("Aggregated estimated cost from the same filtered row set"),costUnit:U.string().nullable().optional().describe("Shared cost unit for the aggregated rows, or null when mixed/unknown"),previousEstimatedCost:U.number().nullable().optional().describe("Aggregated estimated cost from the comparison period"),costChangePercent:U.number().nullable().optional().describe("Percentage change in estimated cost from comparison period")}),nn1=U.object({name:U.array(U.string()).nonempty().describe("Metric name(s) to break down"),groupBy:wO,aggregation:nZ,distinctColumn:kf,filters:TO.optional(),limit:U.number().int().positive().max(1000).optional().describe("Maximum number of groups to return (server-side TopK). Required for high-cardinality groupBy."),orderDirection:qU.optional().describe("Sort direction for the aggregated value (defaults to 'DESC' at the storage layer; pairs with limit for top/bottom-N).")}).refine(fw.check,fw.options).describe("Arguments for getting a metric breakdown"),rn1=U.object({groups:U.array(U.object({dimensions:NS0,value:gw,estimatedCost:U.number().nullable().optional().describe("Summed estimated cost for this group"),costUnit:U.string().nullable().optional().describe("Shared cost unit for this group, or null when mixed/unknown")}))}),an1=U.object({name:U.array(U.string()).nonempty().describe("Metric name(s)"),interval:gz,aggregation:nZ,distinctColumn:kf,filters:TO.optional(),groupBy:wO.optional()}).refine(fw.check,fw.options).describe("Arguments for getting metric time series"),sn1=U.object({series:U.array(U.object({name:U.string().describe("Series name (metric name or group key)"),costUnit:U.string().nullable().optional().describe("Shared cost unit for this series, or null when mixed/unknown"),points:U.array(U.object({timestamp:mw,value:gw,estimatedCost:U.number().nullable().optional().describe("Summed estimated cost in this bucket")}))}))}),on1=U.object({name:U.string().describe("Metric name"),percentiles:FS0,interval:gz,filters:TO.optional()}).describe("Arguments for getting metric percentiles"),tn1=U.object({series:U.array(U.object({percentile:LS0,points:U.array(U.object({timestamp:mw,value:BS0}))}))}),en1=U.object({prefix:U.string().optional().describe("Filter metric names by prefix"),limit:U.coerce.number().int().min(1).optional().describe("Maximum number of names to return")}).describe("Arguments for getting metric names"),$r1=U.object({names:U.array(U.string()).describe("Distinct metric names")}),Yr1=U.object({metricName:U.string().describe("Metric name to get label keys for")}).describe("Arguments for getting metric label keys"),Xr1=U.object({keys:U.array(U.string()).describe("Distinct label keys for the metric")}),Gr1=U.object({metricName:U.string().describe("Metric name"),labelKey:U.string().describe("Label key to get values for"),prefix:U.string().optional().describe("Filter values by prefix"),limit:U.coerce.number().int().min(1).optional().describe("Maximum number of values to return")}).describe("Arguments for getting label values"),Jr1=U.object({values:U.array(U.string()).describe("Distinct label values")}),Qr1=U.object({}).describe("Arguments for getting entity types"),Wr1=U.object({entityTypes:U.array(aF).describe("Distinct entity types")}),Zr1=U.object({entityType:aF.optional().describe("Optional entity type filter")}).describe("Arguments for getting entity names"),Kr1=U.object({names:U.array(U.string()).describe("Distinct entity names")}),Ur1=U.object({}).describe("Arguments for getting service names"),Hr1=U.object({serviceNames:U.array(U.string()).describe("Distinct service names")}),zr1=U.object({}).describe("Arguments for getting environments"),Vr1=U.object({environments:U.array(U.string()).describe("Distinct environments")}),Ar1=U.object({entityType:aF.optional().describe("Optional entity type filter")}).describe("Arguments for getting tags"),Fr1=U.object({tags:U.array(U.string()).describe("Distinct tags")}),mz=(($)=>{return $.AGENT_RUN="agent_run",$.SCORER_RUN="scorer_run",$.SCORER_STEP="scorer_step",$.GENERIC="generic",$.MODEL_GENERATION="model_generation",$.MODEL_STEP="model_step",$.MODEL_INFERENCE="model_inference",$.MODEL_CHUNK="model_chunk",$.MCP_TOOL_CALL="mcp_tool_call",$.PROCESSOR_RUN="processor_run",$.TOOL_CALL="tool_call",$.WORKFLOW_RUN="workflow_run",$.WORKFLOW_STEP="workflow_step",$.WORKFLOW_CONDITIONAL="workflow_conditional",$.WORKFLOW_CONDITIONAL_EVAL="workflow_conditional_eval",$.WORKFLOW_PARALLEL="workflow_parallel",$.WORKFLOW_LOOP="workflow_loop",$.WORKFLOW_SLEEP="workflow_sleep",$.WORKFLOW_WAIT_EVENT="workflow_wait_event",$.MEMORY_OPERATION="memory_operation",$.WORKSPACE_ACTION="workspace_action",$.RAG_INGESTION="rag_ingestion",$.RAG_EMBEDDING="rag_embedding",$.RAG_VECTOR_OPERATION="rag_vector_operation",$.RAG_ACTION="rag_action",$.GRAPH_ACTION="graph_action",$.MAPPING="mapping",$})(mz||{})});function hS0(){return rO8?.()}function fS0($,Y){if(Y!==void 0)return[...Y];if($)return Object.keys($);return}async function DQ($){if(Dr1)return Dr1($);let{span:Y,fn:X}=$;if(Y?.executeInContext)return Y.executeInContext(X);return X()}function CO($){if(Nr1)return Nr1($);let{span:Y,fn:X}=$;if(Y?.executeInContextSync)return Y.executeInContextSync(X);return X()}function wW($){let{type:Y,attributes:X,tracingContext:G,requestContext:J,tracingOptions:Q,...W}=$,Z={...W.metadata??{},...Q?.metadata??{}};if(G?.currentSpan)return G.currentSpan.createChildSpan({type:Y,attributes:X,...W,metadata:Z,requestContext:J});return $.mastra?.observability?.getSelectedInstance({requestContext:J})?.startSpan({type:Y,attributes:X,...W,metadata:Z,requestContext:J,tracingOptions:Q,traceId:Q?.traceId,parentSpanId:Q?.parentSpanId,customSamplerOptions:{requestContext:J,metadata:Z}})}function gS0($){if(!$?.isValid)return;let Y=$,X=$.isInternal?void 0:$;while(Y?.parent)if(Y=Y.parent,!Y.isInternal)X=Y;return X}var Wi5,rO8,Dr1,Nr1;var SO=V0(()=>{uz();Wi5=new Set(Object.values(J6))});function Or1($){let Y=$.currentSpan;return Y?.observabilityInstance?.getLoggerContext?.(Y)??Lr1}function Er1($){let Y=$.currentSpan;return Y?.observabilityInstance?.getMetricsContext?.(Y)??Br1}function g4($){let Y=$??mS0;return{tracing:Y,loggerVNext:Or1(Y),metrics:Er1(Y),tracingContext:Y}}function $4($){let Y=$.tracing??$.tracingContext??mS0;return{tracing:Y,loggerVNext:$.loggerVNext??Or1(Y),metrics:$.metrics??Er1(Y),tracingContext:Y}}function R60($){return $.constructor.name==="NoOpSpan"||$.__isNoOp===!0}function $E8($){let Y=Mr1.every((G)=>typeof $?.[G]==="function"),X=Rr1.every((G)=>typeof $?.[G]==="function");return Y&&X}function vf($,Y){if(!Y.currentSpan||R60(Y.currentSpan))return $;if(!$E8($))return $;try{return new Proxy($,{get(X,G){try{if(Mr1.includes(G))return(...Q)=>{let W=X[G](...Q);return YE8(W,Y)};if(Rr1.includes(G))return(...Q)=>{let W=X[G](...Q);return XE8(W,Y)};let J=X[G];return typeof J==="function"?J.bind(X):J}catch(J){console.warn("Tracing: Failed to wrap method, falling back to original",J);let Q=X[G];return typeof Q==="function"?Q.bind(X):Q}}})}catch(X){return console.warn("Tracing: Failed to create proxy, using original Mastra instance",X),$}}function YE8($,Y){if(!Y.currentSpan||R60(Y.currentSpan))return $;try{return new Proxy($,{get(X,G){try{if(tO8.includes(G))return(Q,W={})=>{return X[G](Q,{...W,...g4(Y)})};let J=X[G];return typeof J==="function"?J.bind(X):J}catch(J){console.warn("Tracing: Failed to wrap agent method, falling back to original",J);let Q=X[G];return typeof Q==="function"?Q.bind(X):Q}}})}catch(X){return console.warn("Tracing: Failed to create agent proxy, using original instance",X),$}}function XE8($,Y){if(!Y.currentSpan||R60(Y.currentSpan))return $;try{return new Proxy($,{get(X,G){try{if(eO8.includes(G)){if(G==="createRun"||G==="createRun")return async(Q={})=>{let W=await X[G](Q);return W?GE8(W,Y):W};return(Q,W={})=>{return X[G](Q,{...W,...g4(Y)})}}let J=X[G];return typeof J==="function"?J.bind(X):J}catch(J){console.warn("Tracing: Failed to wrap workflow method, falling back to original",J);let Q=X[G];return typeof Q==="function"?Q.bind(X):Q}}})}catch(X){return console.warn("Tracing: Failed to create workflow proxy, using original instance",X),$}}function GE8($,Y){if(!Y.currentSpan||R60(Y.currentSpan))return $;try{return new Proxy($,{get(X,G){try{if(G==="start")return(Q={})=>{return X.start({...Q,...g4(Q.tracingContext??Y)})};let J=X[G];return typeof J==="function"?J.bind(X):J}catch(J){console.warn("Tracing: Failed to wrap run method, falling back to original",J);let Q=X[G];return typeof Q==="function"?Q.bind(X):Q}}})}catch(X){return console.warn("Tracing: Failed to create run proxy, using original instance",X),$}}var aO8,sO8,oO8,mS0,Lr1,Br1,Mr1,tO8,Rr1,eO8;var aw=V0(()=>{aO8={add(){}},sO8={set(){}},oO8={record(){}},mS0={currentSpan:void 0},Lr1={debug(){},info(){},warn(){},error(){},fatal(){}},Br1={emit(){},counter(){return aO8},gauge(){return sO8},histogram(){return oO8}};Mr1=["getAgent","getAgentById"],tO8=["generate","stream","generateLegacy","streamLegacy"],Rr1=["getWorkflow","getWorkflowById"],eO8=["execute","createRun","createRun"]});function q60($){if(!$)return;if("transformToolPayload"in $)return $;if("projectToolPayload"in $&&$.projectToolPayload)return{transformToolPayload:$.projectToolPayload,targets:$.targets};return}function Ir1($,Y){return Boolean($?.transformToolPayload&&(!$.targets||$.targets.includes(Y)))}function QE8($,Y){return Boolean(Ir1($?.policy,Y)||$?.toolTransform?.[Y])}function WE8($,Y,X){return $?.toolTransform?.[Y]?.[JE8[X]]}function uS0($){return{message:`Tool ${$.phase} payload unavailable`}}async function qr1($,Y,X){if(!QE8(Y,$.target))return;let J=[Ir1(Y?.policy,$.target)?Y?.policy?.transformToolPayload:void 0,WE8(Y,$.target,$.phase)].filter(Boolean);if(J.length===0)return $.phase==="input-delta"?{suppress:!0}:{transformed:uS0($)};for(let Q of J)try{let W=await Q($);if(W!==void 0)return{transformed:W}}catch(W){return X?.warn?.("Tool payload transform failed",{toolName:$.toolName,toolCallId:$.toolCallId,target:$.target,phase:$.phase,error:W}),$.phase==="input-delta"?{suppress:!0,failed:!0}:{transformed:uS0($),failed:!0}}return $.phase==="input-delta"?{suppress:!0}:{transformed:uS0($)}}async function NQ($,Y,X){let G=await qr1({...$,target:"display"},Y,X),J=await qr1({...$,target:"transcript"},Y,X);if(!G&&!J)return;return{...G?{display:{[$.phase]:G}}:{},...J?{transcript:{[$.phase]:J}}:{}}}function uY($,Y,X){let G=$?.mastra,J=G?.toolPayloadTransform?.[Y]?.[X]??G?.toolPayloadProjection?.[Y]?.[X];if(J&&Object.prototype.hasOwnProperty.call(J,"projected")&&!Object.prototype.hasOwnProperty.call(J,"transformed")){let{projected:Q,...W}=J;return{...W,transformed:Q}}return J}function f$($){return Boolean($&&Object.prototype.hasOwnProperty.call($,"transformed"))}function Pr1($,Y){if(!$)return Y;if(!Y)return $;return{display:{...$.display??{},...Y.display??{}},transcript:{...$.transcript??{},...Y.transcript??{}}}}function rZ($,Y){let X=Y?.mastra?.toolPayloadTransform;if(!X)return $;return{...$??{},mastra:{...$?.mastra??{},toolPayloadTransform:Pr1($?.mastra?.toolPayloadTransform,X)}}}function qK($,Y){if(!Y)return $;return{...$,metadata:{...$.metadata??{},mastra:{...$.metadata?.mastra??{},toolPayloadTransform:Pr1($.metadata?.mastra?.toolPayloadTransform,Y)}}}}var JE8;var pS0=V0(()=>{JE8={"input-delta":"inputDelta","input-available":"input","output-available":"output",error:"error",approval:"approval",suspend:"suspend",resume:"resume"}});function xa1($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function dS0($){}function BE8($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=dS0,onError:X=dS0,onRetry:G=dS0,onComment:J}=$,Q=[],W=!0,Z,K="",H=0,z;function V(B){if(W&&(W=!1,B.charCodeAt(0)===239&&B.charCodeAt(1)===187&&B.charCodeAt(2)===191&&(B=B.slice(3))),Q.length===0){let M=A(B);M!==""&&Q.push(M);return}if(B.indexOf(`
`)===-1&&B.indexOf("\r")===-1){Q.push(B);return}Q.push(B);let O=Q.join("");Q.length=0;let E=A(O);E!==""&&Q.push(E)}function A(B){let O=0;if(B.indexOf("\r")===-1){let E=B.indexOf(`
`,O);for(;E!==-1;){if(O===E){H>0&&Y({id:Z,event:z,data:K}),Z=void 0,K="",H=0,z=void 0,O=E+1,E=B.indexOf(`
`,O);continue}let M=B.charCodeAt(O);if(cr1(B,O,M)){let R=B.charCodeAt(O+5)===kO?O+6:O+5,q=B.slice(R,E);if(H===0&&B.charCodeAt(E+1)===dr1){Y({id:Z,event:z,data:q}),Z=void 0,K="",z=void 0,O=E+2,E=B.indexOf(`
`,O);continue}K=H===0?q:`${K}
${q}`,H++}else lr1(B,O,M)?z=B.slice(B.charCodeAt(O+6)===kO?O+7:O+6,E)||void 0:F(B,O,E);O=E+1,E=B.indexOf(`
`,O)}return B.slice(O)}for(;O<B.length;){let E=B.indexOf("\r",O),M=B.indexOf(`
`,O),R=-1;if(E!==-1&&M!==-1?R=E<M?E:M:E!==-1?E===B.length-1?R=-1:R=E:M!==-1&&(R=M),R===-1)break;F(B,O,R),O=R+1,B.charCodeAt(O-1)===LE8&&B.charCodeAt(O)===dr1&&O++}return B.slice(O)}function F(B,O,E){if(O===E){D();return}let M=B.charCodeAt(O);if(cr1(B,O,M)){let _=B.charCodeAt(O+5)===kO?O+6:O+5,C=B.slice(_,E);K=H===0?C:`${K}
${C}`,H++;return}if(lr1(B,O,M)){z=B.slice(B.charCodeAt(O+6)===kO?O+7:O+6,E)||void 0;return}if(M===105&&B.charCodeAt(O+1)===100&&B.charCodeAt(O+2)===58){let _=B.slice(B.charCodeAt(O+3)===kO?O+4:O+3,E);Z=_.includes("\x00")?void 0:_;return}if(M===58){if(J){let _=B.slice(O,E);J(_.slice(B.charCodeAt(O+1)===kO?2:1))}return}let R=B.slice(O,E),q=R.indexOf(":");if(q===-1){N(R,"",R);return}let w=R.slice(0,q),I=R.charCodeAt(q+1)===kO?2:1,P=R.slice(q+I);N(w,P,R)}function N(B,O,E){switch(B){case"event":z=O||void 0;break;case"data":K=H===0?O:`${K}
${O}`,H++;break;case"id":Z=O.includes("\x00")?void 0:O;break;case"retry":/^\d+$/.test(O)?G(parseInt(O,10)):X(new pr1(`Invalid \`retry\` value: "${O}"`,{type:"invalid-retry",value:O,line:E}));break;default:X(new pr1(`Unknown field "${B.length>20?`${B.slice(0,20)}\u2026`:B}"`,{type:"unknown-field",field:B,value:O,line:E}));break}}function D(){H>0&&Y({id:Z,event:z,data:K}),Z=void 0,K="",H=0,z=void 0}function L(B={}){if(B.consume&&Q.length>0){let O=Q.join("");F(O,0,O.length)}W=!0,Z=void 0,K="",H=0,z=void 0,Q.length=0}return{feed:V,reset:L}}function cr1($,Y,X){return X===100&&$.charCodeAt(Y+1)===97&&$.charCodeAt(Y+2)===116&&$.charCodeAt(Y+3)===97&&$.charCodeAt(Y+4)===58}function lr1($,Y,X){return X===101&&$.charCodeAt(Y+1)===118&&$.charCodeAt(Y+2)===101&&$.charCodeAt(Y+3)===110&&$.charCodeAt(Y+4)===116&&$.charCodeAt(Y+5)===58}function sw(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}function uf($){return Object.fromEntries([...$.headers])}function la1($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return EE8(Y)}function hf($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function IE8($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string"&&qE8.includes(Y))return!0;return!1}function ra1({error:$,url:Y,requestBodyValues:X}){if(hf($))return $;if($ instanceof TypeError&&RE8.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new zY({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}if(IE8($))return new zY({message:`Cannot connect to API: ${$.message}`,cause:$,url:Y,requestBodyValues:X,isRetryable:!0});return $}function aa1($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function PE8($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function eS0($,...Y){let X=new Headers(PE8($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}function yf({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}function rr1($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(_E8.test($)===!1&&jE8.test($)===!1)return Y;return TE8(Y)}function TE8($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function oa1($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return rr1($)}try{return rr1($)}finally{Error.stackTraceLimit=Y}}function $k0($){if($.type==="object"||Array.isArray($.type)&&$.type.includes("object")){$.additionalProperties=!1;let{properties:X}=$;if(X!=null)for(let G of Object.keys(X))X[G]=vO(X[G])}if($.items!=null)$.items=Array.isArray($.items)?$.items.map(vO):vO($.items);if($.anyOf!=null)$.anyOf=$.anyOf.map(vO);if($.allOf!=null)$.allOf=$.allOf.map(vO);if($.oneOf!=null)$.oneOf=$.oneOf.map(vO);let{definitions:Y}=$;if(Y!=null)for(let X of Object.keys(Y))Y[X]=vO(Y[X]);return $}function vO($){if(typeof $==="boolean")return $;return $k0($)}function jW(){return{}}function kE8($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=c9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function vE8($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function xE8(){return{type:"boolean"}}function ta1($,Y){return c9($.type._def,Y)}function ea1($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>ea1($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bE8($)}}function hE8($,Y){return{...c9($.innerType._def,Y),default:$.defaultValue()}}function fE8($,Y){return Y.effectStrategy==="input"?c9($.schema._def,Y):jW()}function gE8($){return{type:"string",enum:Array.from($.values)}}function uE8($,Y){let X=[c9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),c9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(mE8(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...Z}=J;Q=Z}G.push(Q)}}),G.length?{allOf:G}:void 0}function pE8($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}function $s1($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":PK(X,"email",G.message,Y);break;case"format:idn-email":PK(X,"idn-email",G.message,Y);break;case"pattern:zod":oG(X,IK.email,G.message,Y);break}break;case"url":PK(X,"uri",G.message,Y);break;case"uuid":PK(X,"uuid",G.message,Y);break;case"regex":oG(X,G.regex,G.message,Y);break;case"cuid":oG(X,IK.cuid,G.message,Y);break;case"cuid2":oG(X,IK.cuid2,G.message,Y);break;case"startsWith":oG(X,RegExp(`^${lS0(G.value,Y)}`),G.message,Y);break;case"endsWith":oG(X,RegExp(`${lS0(G.value,Y)}$`),G.message,Y);break;case"datetime":PK(X,"date-time",G.message,Y);break;case"date":PK(X,"date",G.message,Y);break;case"time":PK(X,"time",G.message,Y);break;case"duration":PK(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{oG(X,RegExp(lS0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")PK(X,"ipv4",G.message,Y);if(G.version!=="v4")PK(X,"ipv6",G.message,Y);break}case"base64url":oG(X,IK.base64url,G.message,Y);break;case"jwt":oG(X,IK.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")oG(X,IK.ipv4Cidr,G.message,Y);if(G.version!=="v4")oG(X,IK.ipv6Cidr,G.message,Y);break}case"emoji":oG(X,IK.emoji(),G.message,Y);break;case"ulid":{oG(X,IK.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{PK(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{oG(X,IK.base64,G.message,Y);break}}break}case"nanoid":oG(X,IK.nanoid,G.message,Y)}return X}function lS0($,Y){return Y.patternStrategy==="escape"?cE8($):$}function cE8($){let Y="";for(let X=0;X<$.length;X++){if(!dE8.has($[X]))Y+="\\";Y+=$[X]}return Y}function PK($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function oG($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:sr1(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=sr1(Y,G)}function sr1($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,Z=!1,K=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(Z){if(J[H].match(/[a-z]/)){if(K)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),K=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],K=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=Z?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(Z&&J[H]==="]")Z=!1;else if(!Z&&J[H]==="[")Z=!0}return Q}function Ys1($,Y){var X,G,J,Q,W,Z;let K={type:"object",additionalProperties:(X=c9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=$s1($.keyType._def,Y);return{...K,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...K,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((Z=$.keyType._def.type._def.checks)==null?void 0:Z.length)){let{type:H,...z}=ta1($.keyType._def,Y);return{...K,propertyNames:z}}return K}function lE8($,Y){if(Y.mapStrategy==="record")return Ys1($,Y);let X=c9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||jW(),G=c9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||jW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function iE8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function nE8(){return{not:jW()}}function rE8(){return{type:"null"}}function aE8($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in sS0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=sS0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return sE8($,Y)}function oE8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[sS0[$.innerType._def.typeName],"null"]};let X=c9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function tE8($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function eE8($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let Z=J[W];if(Z===void 0||Z._def===void 0)continue;let K=YM8(Z),H=c9(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!K)G.push(W)}if(G.length)X.required=G;let Q=$M8($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function $M8($,Y){if($.catchall._def.typeName!=="ZodNever")return c9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function YM8($){try{return $.isOptional()}catch(Y){return!0}}function JM8($,Y){return c9($.type._def,Y)}function QM8($,Y){let G={type:"array",uniqueItems:!0,items:c9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function WM8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>c9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:c9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>c9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function ZM8(){return{not:jW()}}function KM8(){return jW()}function c9($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let K=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(K!==CE8)return K}if(J&&!X){let K=VM8(J,Y);if(K!==void 0)return K}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=HM8($,$.typeName,Y),Z=typeof W==="function"?c9(W(),Y):W;if(Z)AM8($,Y,Z);if(Y.postProcess){let K=Y.postProcess(Z,$,Y);return Q.jsonSchema=Z,K}return Q.jsonSchema=Z,Z}function TW($){let Y;return()=>{if(Y==null)Y=$();return Y}}function _60($,{validate:Y}={}){return{[oS0]:!0,_type:void 0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function NM8($){return typeof $==="object"&&$!==null&&oS0 in $&&$[oS0]===!0&&"jsonSchema"in $&&"validate"in $}function Yk0($){return $==null?_60({properties:{},additionalProperties:!1}):NM8($)?$:("~standard"in $)?$["~standard"].vendor==="zod"?BQ($):LM8($):$()}function LM8($){return _60(()=>$k0($["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(Y)=>{let X=await $["~standard"].validate(Y);return"value"in X?{success:!0,value:X.value}:{success:!1,error:new yO({value:Y,cause:X.issues})}}})}function BM8($,Y){var X;let G=(X=void 0)!=null?X:!1;return _60(()=>DM8($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function OM8($,Y){var X;let G=(X=void 0)!=null?X:!1;return _60(()=>$k0($$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function EM8($){return"_zod"in $}function BQ($,Y){if(EM8($))return OM8($);else return BM8($)}async function MM8({value:$,schema:Y,context:X}){let G=await oF({value:$,schema:Y,context:X});if(!G.success)throw yO.wrap({value:$,cause:G.error,context:X});return G.value}async function oF({value:$,schema:Y,context:X}){let G=Yk0(Y);try{if(G.validate==null)return{success:!0,value:$,rawValue:$};let J=await G.validate($);if(J.success)return{success:!0,value:J.value,rawValue:$};return{success:!1,error:yO.wrap({value:$,cause:J.error,context:X}),rawValue:$}}catch(J){return{success:!1,error:yO.wrap({value:$,cause:J,context:X}),rawValue:$}}}async function RM8({text:$,schema:Y}){try{let X=oa1($);if(Y==null)return X;return MM8({value:X,schema:Y})}catch(X){if(I60.isInstance(X)||yO.isInstance(X))throw X;throw new I60({text:$,cause:X})}}async function tF({text:$,schema:Y}){try{let X=oa1($);if(Y==null)return{success:!0,value:X,rawValue:X};return await oF({value:X,schema:Y})}catch(X){return{success:!1,error:I60.isInstance(X)?X:new I60({text:$,cause:X}),rawValue:void 0}}}function Xs1({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new OE8).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await tF({text:X,schema:Y}))}}))}function PM8($){return $}function Gs1({id:$,inputSchema:Y,outputSchema:X,supportsDeferredResults:G}){return({execute:J,needsApproval:Q,toModelOutput:W,onInputStart:Z,onInputDelta:K,onInputAvailable:H,...z})=>PM8({type:"provider",id:$,args:z,inputSchema:Y,outputSchema:X,execute:J,needsApproval:Q,toModelOutput:W,onInputStart:Z,onInputDelta:K,onInputAvailable:H,supportsDeferredResults:G})}async function pY($){if(typeof $==="function")$=$();return Promise.resolve($)}function _M8($){return $==null?void 0:$.replace(/\/$/,"")}function jM8(){return{headers:{}}}async function TM8(){if(process.env.VERCEL_OIDC_TOKEN)return process.env.VERCEL_OIDC_TOKEN??"";throw Error("@vercel/oidc is not available in the vendored @internal AI packages. Provide an API key instead.")}async function Ba1({response:$,statusCode:Y,defaultMessage:X="Gateway request failed",cause:G,authMethod:J}){var Q;let W=await oF({value:$,schema:pM8});if(!W.success){let V=typeof $==="object"&&$!==null&&"generationId"in $?$.generationId:void 0;return new uM8({message:`Invalid error response format: ${X}`,statusCode:Y,response:$,validationError:W.error,cause:G,generationId:V})}let Z=W.value,K=Z.error.type,H=Z.error.message,z=(Q=Z.generationId)!=null?Q:void 0;switch(K){case"authentication_error":return Qs1.createContextualError({apiKeyProvided:J==="api-key",oidcTokenProvided:J==="oidc",statusCode:Y,cause:G,generationId:z});case"invalid_request_error":return new vM8({message:H,statusCode:Y,cause:G,generationId:z});case"rate_limit_exceeded":return new yM8({message:H,statusCode:Y,cause:G,generationId:z});case"model_not_found":{let V=await oF({value:Z.error.param,schema:hM8});return new fM8({message:H,statusCode:Y,modelId:V.success?V.value.modelId:void 0,cause:G,generationId:z})}case"internal_server_error":return new Fa1({message:H,statusCode:Y,cause:G,generationId:z});default:return new Fa1({message:H,statusCode:Y,cause:G,generationId:z})}}function dM8($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(Y){return $.responseBody}return{}}function qa1($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(Y);return!1}async function LQ($,Y){var X;if(tG.isInstance($))return $;if(qa1($))return Ra1.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(zY.isInstance($)){if($.cause&&qa1($.cause))return Ra1.createTimeoutError({originalMessage:$.message,cause:$});return await Ba1({response:dM8($),statusCode:(X=$.statusCode)!=null?X:500,defaultMessage:"Gateway request failed",cause:$,authMethod:Y})}return await Ba1({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:Y})}async function IU($){let Y=await oF({value:$[Vs1],schema:lM8});return Y.success?Y.value:void 0}function Pa1($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:la1($.data)};return $}function KR8($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:la1($.data)};return $}async function IR8(){var $;return($=jM8().headers)==null?void 0:$["x-vercel-id"]}function Xk0($={}){var Y,X;let G=null,J=null,Q=(Y=$.metadataCacheRefreshMillis)!=null?Y:300000,W=0,Z=(X=_M8($.baseURL))!=null?X:"https://ai-gateway.vercel.sh/v3/ai",K=async()=>{try{let O=await _R8($);return eS0({Authorization:`Bearer ${O.token}`,"ai-gateway-protocol-version":wR8,[Vs1]:O.authMethod,...$.headers},`ai-sdk/gateway/${PR8}`)}catch(O){throw Qs1.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:O})}},H=()=>{let O=yf({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),E=yf({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),M=yf({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),R=yf({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let q=await IR8();return{...O&&{"ai-o11y-deployment-id":O},...E&&{"ai-o11y-environment":E},...M&&{"ai-o11y-region":M},...q&&{"ai-o11y-request-id":q},...R&&{"ai-o11y-project-id":R}}}},z=(O)=>{return new eM8(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},V=async()=>{var O,E,M;let R=(M=(E=(O=$._internal)==null?void 0:O.currentDate)==null?void 0:E.call(O).getTime())!=null?M:Date.now();if(!G||R-W>Q)W=R,G=new Ia1({baseURL:Z,headers:K,fetch:$.fetch}).getAvailableModels().then((q)=>{return J=q,q}).catch(async(q)=>{throw await LQ(q,await IU(await K()))});return J?Promise.resolve(J):G},A=async()=>{return new Ia1({baseURL:Z,headers:K,fetch:$.fetch}).getCredits().catch(async(O)=>{throw await LQ(O,await IU(await K()))})},F=async(O)=>{return new aM8({baseURL:Z,headers:K,fetch:$.fetch}).getSpendReport(O).catch(async(E)=>{throw await LQ(E,await IU(await K()))})},N=async(O)=>{return new oM8({baseURL:Z,headers:K,fetch:$.fetch}).getGenerationInfo(O).catch(async(E)=>{throw await LQ(E,await IU(await K()))})},D=function(O){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return z(O)};D.specificationVersion="v3",D.getAvailableModels=V,D.getCredits=A,D.getSpendReport=F,D.getGenerationInfo=N,D.imageModel=(O)=>{return new XR8(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},D.languageModel=z;let L=(O)=>{return new $R8(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})};D.embeddingModel=L,D.textEmbeddingModel=L,D.videoModel=(O)=>{return new ZR8(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})};let B=(O)=>{return new AR8(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})};return D.rerankingModel=B,D.reranking=B,D.chat=D.languageModel,D.embedding=D.embeddingModel,D.image=D.imageModel,D.video=D.videoModel,D.tools=qR8,D}async function _R8($){let Y=yf({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(Y)return{token:Y,authMethod:"api-key"};return{token:await TM8(),authMethod:"oidc"}}function TR8($){var Y=new Set([$]),X=new Set,G=$.match(wa1);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(K){return K===$};function Q(Z){return X.add(Z),!1}function W(Z){return Y.add(Z),!0}return function(K){if(Y.has(K))return!0;if(X.has(K))return!1;var H=K.match(wa1);if(!H)return Q(K);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(K);if(J.major!==z.major)return Q(K);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(K);return Q(K)}if(J.minor<=z.minor)return W(K);return Q(K)}}function Gk0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=gf[ff]=(J=gf[ff])!==null&&J!==void 0?J:{version:xO};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==xO){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+xO);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+xO+"."),!0}function mf($){var Y,X,G=(Y=gf[ff])===null||Y===void 0?void 0:Y.version;if(!G||!CR8(G))return;return(X=gf[ff])===null||X===void 0?void 0:X[$]}function Jk0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+xO+".");var X=gf[ff];if(X)delete X[$]}function xf($,Y,X){var G=mf("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,vR8([],kR8(X),!1))}function yR8($,Y){if($<_W.NONE)$=_W.NONE;else if($>_W.ALL)$=_W.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",_W.ERROR),warn:X("warn",_W.WARN),info:X("info",_W.INFO),debug:X("debug",_W.DEBUG),verbose:X("verbose",_W.VERBOSE)}}function gR8($){return Symbol.for($)}function Zk0($){return $.getValue(Wk0)||void 0}function aR8(){return Zk0(Qk0.getInstance().active())}function Kk0($,Y){return $.setValue(Wk0,Y)}function sR8($){return $.deleteValue(Wk0)}function oR8($,Y){return Kk0($,new bf(Y))}function Ds1($){var Y;return(Y=Zk0($))===null||Y===void 0?void 0:Y.spanContext()}function $q8($){return tR8.test($)&&$!==Fs1}function Yq8($){return eR8.test($)&&$!==As1}function Ns1($){return $q8($.traceId)&&Yq8($.spanId)}function Xq8($){return new bf($)}function Gq8($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}function AI8($){let Y=["ROOT"],X=-1,G=null;function J(K,H,z){switch(K){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let K=0;K<$.length;K++){let H=$[K];switch(Y[Y.length-1]){case"ROOT":J(H,K,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=K,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,K,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,K);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=K;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=K}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=K,Y.pop();break}default:{X=K,J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=K,Y.pop();break}default:{X=K;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=K;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=K;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,K+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K)}else X=K;break}}}let Z=$.slice(0,X+1);for(let K=Y.length-1;K>=0;K--)switch(Y[K]){case"INSIDE_STRING":{Z+='"';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":{Z+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{Z+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))Z+="true".slice(z.length);else if("false".startsWith(z))Z+="false".slice(z.length);else if("null".startsWith(z))Z+="null".slice(z.length)}}return Z}async function j60($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=await tF({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=await tF({text:AI8($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}function OI8($){return $.type.startsWith("tool-")}function EI8($){return $.type==="dynamic-tool"}function Uk0($){return OI8($)||EI8($)}var Ta1="vercel.ai.error",ZE8,wr1,_r1,dY,Ca1="AI_APICallError",Sa1,KE8,jr1,Tr1,zY,ka1="AI_EmptyResponseBodyError",va1,UE8,Cr1,Sr1,HE8,ya1="AI_InvalidArgumentError",ba1,zE8,kr1,vr1,VE8,ha1="AI_InvalidPromptError",fa1,AE8,xr1,yr1,Ai5,ga1="AI_JSONParseError",ma1,FE8,br1,hr1,I60,ua1="AI_TypeValidationError",pa1,DE8,fr1,gr1,yO,da1="AI_UnsupportedFunctionalityError",ca1,NE8,mr1,ur1,Fi5,pr1,dr1=10,LE8=13,kO=32,OE8,EE8,Di5,ia1="AI_DownloadError",na1,ME8,ir1,nr1,Ni5,pf=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let Z=0;Z<Y;Z++)W[Z]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new VE8({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},RE8,qE8,sa1="4.0.27",wE8=()=>globalThis.fetch,P60=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=wE8()})=>{try{let W=await Q($,{method:"GET",headers:eS0(Y,`ai-sdk/provider-utils/${sa1}`,aa1()),signal:J}),Z=uf(W);if(!W.ok){let K;try{K=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(hf(H)||zY.isInstance(H))throw H;throw new zY({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}throw K.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(K){if(K instanceof Error){if(hf(K)||zY.isInstance(K))throw K}throw new zY({message:"Failed to process successful response",cause:K,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}}catch(W){throw ra1({error:W,url:$,requestBodyValues:{}})}},_E8,jE8,CE8,ar1,SE8=($)=>typeof $==="string"?{...ar1,name:$}:{...ar1,...$},yE8=($,Y)=>{return c9($.innerType._def,Y)},bE8=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y},mE8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},cS0=void 0,IK,dE8,sS0,sE8=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>c9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},XM8=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return c9($.innerType._def,Y);let G=c9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:jW()},G]}:jW()},GM8=($,Y)=>{if(Y.pipeStrategy==="input")return c9($.in._def,Y);else if(Y.pipeStrategy==="output")return c9($.out._def,Y);let X=c9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=c9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},UM8=($,Y)=>{return c9($.innerType._def,Y)},HM8=($,Y,X)=>{switch(Y){case U0.ZodString:return $s1($,X);case U0.ZodNumber:return tE8($);case U0.ZodObject:return eE8($,X);case U0.ZodBigInt:return vE8($);case U0.ZodBoolean:return xE8();case U0.ZodDate:return ea1($,X);case U0.ZodUndefined:return ZM8();case U0.ZodNull:return rE8();case U0.ZodArray:return kE8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return aE8($,X);case U0.ZodIntersection:return uE8($,X);case U0.ZodTuple:return WM8($,X);case U0.ZodRecord:return Ys1($,X);case U0.ZodLiteral:return pE8($);case U0.ZodEnum:return gE8($);case U0.ZodNativeEnum:return iE8($);case U0.ZodNullable:return oE8($,X);case U0.ZodOptional:return XM8($,X);case U0.ZodMap:return lE8($,X);case U0.ZodSet:return QM8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return JM8($,X);case U0.ZodNaN:case U0.ZodNever:return nE8();case U0.ZodEffects:return fE8($,X);case U0.ZodAny:return jW();case U0.ZodUnknown:return KM8();case U0.ZodDefault:return hE8($,X);case U0.ZodBranded:return ta1($,X);case U0.ZodReadonly:return UM8($,X);case U0.ZodCatch:return yE8($,X);case U0.ZodPipeline:return GM8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},zM8=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},VM8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:zM8(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),jW();return Y.$refStrategy==="seen"?jW():void 0}}},AM8=($,Y,X)=>{if($.description)X.description=$.description;return X},FM8=($)=>{let Y=SE8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},DM8=($,Y)=>{var X;let G=FM8(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var A;return{...H,[z]:(A=c9(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?A:jW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=c9($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:jW(),Z=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(Z!==void 0)W.title=Z;let K=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return K.$schema="http://json-schema.org/draft-07/schema#",K},oS0,qM8=()=>globalThis.fetch,ow=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>IM8({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),IM8=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=qM8()})=>{try{let Z=await W($,{method:"POST",headers:eS0(Y,`ai-sdk/provider-utils/${sa1}`,aa1()),body:X.content,signal:Q}),K=uf(Z);if(!Z.ok){let H;try{H=await J({response:Z,url:$,requestBodyValues:X.values})}catch(z){if(hf(z)||zY.isInstance(z))throw z;throw new zY({message:"Failed to process error response",cause:z,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}throw H.value}try{return await G({response:Z,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(hf(H)||zY.isInstance(H))throw H}throw new zY({message:"Failed to process successful response",cause:H,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}}catch(Z){throw ra1({error:Z,url:$,requestBodyValues:X.values})}},PU=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),Z=uf(G);if(W.trim()==="")return{responseHeaders:Z,value:new zY({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let K=await RM8({text:W,schema:$});return{responseHeaders:Z,value:new zY({message:Y(K),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,data:K,isRetryable:X==null?void 0:X(G,K)})}}catch(K){return{responseHeaders:Z,value:new zY({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},wM8=($)=>async({response:Y})=>{let X=uf(Y);if(Y.body==null)throw new HE8({});return{responseHeaders:X,value:Xs1({stream:Y.body,schema:$})}},eF=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await tF({text:J,schema:$}),W=uf(Y);if(!Q.success)throw new zY({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},CM8="vercel.ai.gateway.error",iS0,or1,tr1,tG,Js1="GatewayAuthenticationError",SM8,er1,$a1,Ya1,Qs1,Ws1="GatewayInvalidRequestError",kM8,Xa1,Ga1,Ja1,vM8,Zs1="GatewayRateLimitError",xM8,Qa1,Wa1,Za1,yM8,Ks1="GatewayModelNotFoundError",bM8,Ka1,hM8,Ua1,Ha1,fM8,Us1="GatewayInternalServerError",gM8,za1,Va1,Aa1,Fa1,Hs1="GatewayResponseError",mM8,Da1,Na1,La1,uM8,pM8,zs1="GatewayTimeoutError",cM8,Oa1,Ea1,Ma1,Ra1,Vs1="ai-gateway-auth-method",lM8,iM8,Ia1=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await P60({url:`${this.config.baseURL}/config`,headers:await pY(this.config.headers()),successfulResponseHandler:eF(nM8),failedResponseHandler:PU({errorSchema:U.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return $}catch($){throw await LQ($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:Y}=await P60({url:`${$.origin}/v1/credits`,headers:await pY(this.config.headers()),successfulResponseHandler:eF(rM8),failedResponseHandler:PU({errorSchema:U.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Y}catch($){throw await LQ($)}}},nM8,rM8,aM8=class{constructor($){this.config=$}async getSpendReport($){try{let Y=new URL(this.config.baseURL),X=new URLSearchParams;if(X.set("start_date",$.startDate),X.set("end_date",$.endDate),$.groupBy)X.set("group_by",$.groupBy);if($.datePart)X.set("date_part",$.datePart);if($.userId)X.set("user_id",$.userId);if($.model)X.set("model",$.model);if($.provider)X.set("provider",$.provider);if($.credentialType)X.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)X.set("tags",$.tags.join(","));let{value:G}=await P60({url:`${Y.origin}/v1/report?${X.toString()}`,headers:await pY(this.config.headers()),successfulResponseHandler:eF(sM8),failedResponseHandler:PU({errorSchema:U.any(),errorToMessage:(J)=>J}),fetch:this.config.fetch});return G}catch(Y){throw await LQ(Y)}}},sM8,oM8=class{constructor($){this.config=$}async getGenerationInfo($){try{let Y=new URL(this.config.baseURL),{value:X}=await P60({url:`${Y.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await pY(this.config.headers()),successfulResponseHandler:eF(tM8),failedResponseHandler:PU({errorSchema:U.any(),errorToMessage:(G)=>G}),fetch:this.config.fetch});return X}catch(Y){throw await LQ(Y)}}},tM8,eM8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:Y,...X}=$;return{args:this.maybeEncodeFileParts(X),warnings:[]}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await pY(this.config.headers());try{let{responseHeaders:Q,value:W,rawValue:Z}=await ow({url:this.getUrl(),headers:sw(J,$.headers,this.getModelConfigHeaders(this.modelId,!1),await pY(this.config.o11yHeaders)),body:Y,successfulResponseHandler:eF(U.any()),failedResponseHandler:PU({errorSchema:U.any(),errorToMessage:(K)=>K}),...G&&{abortSignal:G},fetch:this.config.fetch});return{...W,request:{body:Y},response:{headers:Q,body:Z},warnings:X}}catch(Q){throw await LQ(Q,await IU(J))}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await pY(this.config.headers());try{let{value:Q,responseHeaders:W}=await ow({url:this.getUrl(),headers:sw(J,$.headers,this.getModelConfigHeaders(this.modelId,!0),await pY(this.config.o11yHeaders)),body:Y,successfulResponseHandler:wM8(U.any()),failedResponseHandler:PU({errorSchema:U.any(),errorToMessage:(Z)=>Z}),...G&&{abortSignal:G},fetch:this.config.fetch});return{stream:Q.pipeThrough(new TransformStream({start(Z){if(X.length>0)Z.enqueue({type:"stream-start",warnings:X})},transform(Z,K){if(Z.success){let H=Z.value;if(H.type==="raw"&&!$.includeRawChunks)return;if(H.type==="response-metadata"&&H.timestamp&&typeof H.timestamp==="string")H.timestamp=new Date(H.timestamp);K.enqueue(H)}else K.error(Z.error)}})),request:{body:Y},response:{headers:W}}}catch(Q){throw await LQ(Q,await IU(J))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let Y of $.prompt)for(let X of Y.content)if(this.isFilePart(X)){let G=X;if(G.data instanceof Uint8Array){let J=Uint8Array.from(G.data),Q=Buffer.from(J).toString("base64");G.data=new URL(`data:${G.mediaType||"application/octet-stream"};base64,${Q}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,Y){return{"ai-language-model-specification-version":"3","ai-language-model-id":$,"ai-language-model-streaming":String(Y)}}},$R8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;let Q=await pY(this.config.headers());try{let{responseHeaders:W,value:Z,rawValue:K}=await ow({url:this.getUrl(),headers:sw(Q,Y!=null?Y:{},this.getModelConfigHeaders(),await pY(this.config.o11yHeaders)),body:{values:$,...G?{providerOptions:G}:{}},successfulResponseHandler:eF(YR8),failedResponseHandler:PU({errorSchema:U.any(),errorToMessage:(H)=>H}),...X&&{abortSignal:X},fetch:this.config.fetch});return{embeddings:Z.embeddings,usage:(J=Z.usage)!=null?J:void 0,providerMetadata:Z.providerMetadata,response:{headers:W,body:K},warnings:[]}}catch(W){throw await LQ(W,await IU(Q))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},YR8,XR8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,files:Q,mask:W,providerOptions:Z,headers:K,abortSignal:H}){var z,V,A,F;let N=await pY(this.config.headers());try{let{responseHeaders:D,value:L}=await ow({url:this.getUrl(),headers:sw(N,K!=null?K:{},this.getModelConfigHeaders(),await pY(this.config.o11yHeaders)),body:{prompt:$,n:Y,...X&&{size:X},...G&&{aspectRatio:G},...J&&{seed:J},...Z&&{providerOptions:Z},...Q&&{files:Q.map((B)=>Pa1(B))},...W&&{mask:Pa1(W)}},successfulResponseHandler:eF(WR8),failedResponseHandler:PU({errorSchema:U.any(),errorToMessage:(B)=>B}),...H&&{abortSignal:H},fetch:this.config.fetch});return{images:L.images,warnings:(z=L.warnings)!=null?z:[],providerMetadata:L.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:D},...L.usage!=null&&{usage:{inputTokens:(V=L.usage.inputTokens)!=null?V:void 0,outputTokens:(A=L.usage.outputTokens)!=null?A:void 0,totalTokens:(F=L.usage.totalTokens)!=null?F:void 0}}}}catch(D){throw await LQ(D,await IU(N))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}},GR8,JR8,QR8,WR8,ZR8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,aspectRatio:X,resolution:G,duration:J,fps:Q,seed:W,image:Z,providerOptions:K,headers:H,abortSignal:z}){var V;let A=await pY(this.config.headers());try{let{responseHeaders:F,value:N}=await ow({url:this.getUrl(),headers:sw(A,H!=null?H:{},this.getModelConfigHeaders(),await pY(this.config.o11yHeaders),{accept:"text/event-stream"}),body:{prompt:$,n:Y,...X&&{aspectRatio:X},...G&&{resolution:G},...J&&{duration:J},...Q&&{fps:Q},...W&&{seed:W},...K&&{providerOptions:K},...Z&&{image:KR8(Z)}},successfulResponseHandler:async({response:D,url:L,requestBodyValues:B})=>{if(D.body==null)throw new zY({message:"SSE response body is empty",url:L,requestBodyValues:B,statusCode:D.status});let E=Xs1({stream:D.body,schema:VR8}).getReader(),{done:M,value:R}=await E.read();if(E.releaseLock(),M||!R)throw new zY({message:"SSE stream ended without a data event",url:L,requestBodyValues:B,statusCode:D.status});if(!R.success)throw new zY({message:"Failed to parse video SSE event",cause:R.error,url:L,requestBodyValues:B,statusCode:D.status});let q=R.value;if(q.type==="error")throw new zY({message:q.message,statusCode:q.statusCode,url:L,requestBodyValues:B,responseHeaders:Object.fromEntries([...D.headers]),responseBody:JSON.stringify(q),data:{error:{message:q.message,type:q.errorType,param:q.param}}});return{value:{videos:q.videos,warnings:q.warnings,providerMetadata:q.providerMetadata},responseHeaders:Object.fromEntries([...D.headers])}},failedResponseHandler:PU({errorSchema:U.any(),errorToMessage:(D)=>D}),...z&&{abortSignal:z},fetch:this.config.fetch});return{videos:N.videos,warnings:(V=N.warnings)!=null?V:[],providerMetadata:N.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:F}}}catch(F){throw await LQ(F,await IU(A))}}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}},UR8,HR8,zR8,VR8,AR8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async doRerank({documents:$,query:Y,topN:X,headers:G,abortSignal:J,providerOptions:Q}){let W=await pY(this.config.headers());try{let{responseHeaders:Z,value:K,rawValue:H}=await ow({url:this.getUrl(),headers:sw(W,G!=null?G:{},this.getModelConfigHeaders(),await pY(this.config.o11yHeaders)),body:{documents:$,query:Y,...X!=null?{topN:X}:{},...Q?{providerOptions:Q}:{}},successfulResponseHandler:eF(FR8),failedResponseHandler:PU({errorSchema:U.any(),errorToMessage:(z)=>z}),...J&&{abortSignal:J},fetch:this.config.fetch});return{ranking:K.ranking,providerMetadata:K.providerMetadata,response:{headers:Z,body:H},warnings:[]}}catch(Z){throw await LQ(Z,await IU(W))}}getUrl(){return`${this.config.baseURL}/reranking-model`}getModelConfigHeaders(){return{"ai-reranking-model-specification-version":"3","ai-model-id":this.modelId}}},FR8,DR8,NR8,LR8,BR8=($={})=>LR8($),OR8,ER8,MR8,RR8=($={})=>MR8($),qR8,PR8="3.0.112",wR8="0.0.1",Li5,jR8,xO="1.9.0",wa1,CR8,SR8,ff,gf,kR8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},vR8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},xR8,_W,bR8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},hR8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},fR8="diag",w60,mR8,uR8,pR8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},dR8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},cR8,lR8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},iR8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},nS0="context",nR8,Qk0,tS0,As1="0000000000000000",Fs1="00000000000000000000000000000000",rR8,bf,Wk0,tR8,eR8,rS0,Ls1,Jq8,Qq8,Wq8,Zq8,_a1,ja1,Bi5,aS0="trace",Kq8,Oi5,Uq8,Hq8=($,Y)=>{for(var X in Y)Uq8($,X,{get:Y[X],enumerable:!0})},zq8="AI_InvalidArgumentError",Vq8,Aq8,Fq8,Dq8="AI_InvalidToolApprovalError",Nq8,Lq8,Bq8,Oq8="AI_InvalidToolInputError",Eq8,Mq8,Rq8,qq8="AI_ToolCallNotFoundForApprovalError",Iq8,Pq8,wq8,_q8="AI_MissingToolResultsError",jq8,Tq8,Cq8,Bs1="AI_NoObjectGeneratedError",Os1,Sq8,Es1,sF,kq8="AI_NoOutputGeneratedError",vq8,xq8,yq8,bq8="AI_NoSuchToolError",hq8,fq8,gq8,mq8="AI_ToolCallRepairError",uq8,pq8,dq8,cq8="AI_UIMessageStreamError",lq8,iq8,nq8,rq8="AI_InvalidMessageRoleError",aq8,sq8,oq8,tq8="AI_RetryError",eq8,$I8,YI8,Ms1,bO,x7,Rs1,XI8,qs1,GI8,JI8,QI8,Is1,WI8,ZI8,KI8,UI8,HI8,zI8,Ei5,VI8,FI8=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:$}){return $},async parsePartialOutput({text:$}){return{partial:$}},createElementStreamTransform(){return}}),DI8=({schema:$,name:Y,description:X})=>{let G=Yk0($);return{name:"object",responseFormat:pY(G.jsonSchema).then((J)=>({type:"json",schema:J,...Y!=null&&{name:Y},...X!=null&&{description:X}})),async parseCompleteOutput({text:J},Q){let W=await tF({text:J});if(!W.success)throw new sF({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let Z=await oF({value:W.value,schema:G});if(!Z.success)throw new sF({message:"No object generated: response did not match schema.",cause:Z.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});return Z.value},async parsePartialOutput({text:J}){let Q=await j60(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:Q.value}}},createElementStreamTransform(){return}}},NI8=({element:$,name:Y,description:X})=>{let G=Yk0($);return{name:"array",responseFormat:pY(G.jsonSchema).then((J)=>{let{$schema:Q,...W}=J;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:W}},required:["elements"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}}),async parseCompleteOutput({text:J},Q){let W=await tF({text:J});if(!W.success)throw new sF({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let Z=W.value;if(Z==null||typeof Z!=="object"||!("elements"in Z)||!Array.isArray(Z.elements))throw new sF({message:"No object generated: response did not match schema.",cause:new yO({value:Z,cause:"response must be an object with an elements array"}),text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});for(let K of Z.elements){let H=await oF({value:K,schema:G});if(!H.success)throw new sF({message:"No object generated: response did not match schema.",cause:H.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason})}return Z.elements},async parsePartialOutput({text:J}){let Q=await j60(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let W=Q.value;if(W==null||typeof W!=="object"||!("elements"in W)||!Array.isArray(W.elements))return;let Z=Q.state==="repaired-parse"&&W.elements.length>0?W.elements.slice(0,-1):W.elements,K=[];for(let H of Z){let z=await oF({value:H,schema:G});if(z.success)K.push(z.value)}return{partial:K}}}},createElementStreamTransform(){let J=0;return new TransformStream({transform({partialOutput:Q},W){if(Q!=null)for(;J<Q.length;J++)W.enqueue(Q[J])}})}}},LI8=({options:$,name:Y,description:X})=>{return{name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:$}},required:["result"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}),async parseCompleteOutput({text:G},J){let Q=await tF({text:G});if(!Q.success)throw new sF({message:"No object generated: could not parse the response.",cause:Q.error,text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});let W=Q.value;if(W==null||typeof W!=="object"||!("result"in W)||typeof W.result!=="string"||!$.includes(W.result))throw new sF({message:"No object generated: response did not match schema.",cause:new yO({value:W,cause:"response must be an object that contains a choice value."}),text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});return W.result},async parsePartialOutput({text:G}){let J=await j60(G);switch(J.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let Q=J.value;if(Q==null||typeof Q!=="object"||!("result"in Q)||typeof Q.result!=="string")return;let W=$.filter((Z)=>Z.startsWith(Q.result));if(J.state==="successful-parse")return W.includes(Q.result)?{partial:Q.result}:void 0;else return W.length===1?{partial:W[0]}:void 0}}},createElementStreamTransform(){return}}},BI8=({name:$,description:Y}={})=>{return{name:"json",responseFormat:Promise.resolve({type:"json",...$!=null&&{name:$},...Y!=null&&{description:Y}}),async parseCompleteOutput({text:X},G){let J=await tF({text:X});if(!J.success)throw new sF({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return J.value},async parsePartialOutput({text:X}){let G=await j60(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return G.value===void 0?void 0:{partial:G.value}}},createElementStreamTransform(){return}}},Mi5,Ri5,qi5;var Hk0=V0(()=>{O1();O1();cG();KY();ZE8=Symbol.for(Ta1),dY=class $ extends(_r1=Error,wr1=ZE8,_r1){constructor({name:Y,message:X,cause:G}){super(X);this[wr1]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,Ta1)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},Sa1=`vercel.ai.error.${Ca1}`,KE8=Symbol.for(Sa1),zY=class extends(Tr1=dY,jr1=KE8,Tr1){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:Ca1,message:$,cause:W});this[jr1]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return dY.hasMarker($,Sa1)}},va1=`vercel.ai.error.${ka1}`,UE8=Symbol.for(va1),HE8=class extends(Sr1=dY,Cr1=UE8,Sr1){constructor({message:$="Empty response body"}={}){super({name:ka1,message:$});this[Cr1]=!0}static isInstance($){return dY.hasMarker($,va1)}};ba1=`vercel.ai.error.${ya1}`,zE8=Symbol.for(ba1),VE8=class extends(vr1=dY,kr1=zE8,vr1){constructor({message:$,cause:Y,argument:X}){super({name:ya1,message:$,cause:Y});this[kr1]=!0,this.argument=X}static isInstance($){return dY.hasMarker($,ba1)}},fa1=`vercel.ai.error.${ha1}`,AE8=Symbol.for(fa1),Ai5=class extends(yr1=dY,xr1=AE8,yr1){constructor({prompt:$,message:Y,cause:X}){super({name:ha1,message:`Invalid prompt: ${Y}`,cause:X});this[xr1]=!0,this.prompt=$}static isInstance($){return dY.hasMarker($,fa1)}},ma1=`vercel.ai.error.${ga1}`,FE8=Symbol.for(ma1),I60=class extends(hr1=dY,br1=FE8,hr1){constructor({text:$,cause:Y}){super({name:ga1,message:`JSON parsing failed: Text: ${$}.
Error message: ${xa1(Y)}`,cause:Y});this[br1]=!0,this.text=$}static isInstance($){return dY.hasMarker($,ma1)}},pa1=`vercel.ai.error.${ua1}`,DE8=Symbol.for(pa1),yO=class $ extends(gr1=dY,fr1=DE8,gr1){constructor({value:Y,cause:X,context:G}){let J="Type validation failed";if(G==null?void 0:G.field)J+=` for ${G.field}`;if((G==null?void 0:G.entityName)||(G==null?void 0:G.entityId)){J+=" (";let Q=[];if(G.entityName)Q.push(G.entityName);if(G.entityId)Q.push(`id: "${G.entityId}"`);J+=Q.join(", "),J+=")"}super({name:ua1,message:`${J}: Value: ${JSON.stringify(Y)}.
Error message: ${xa1(X)}`,cause:X});this[fr1]=!0,this.value=Y,this.context=G}static isInstance(Y){return dY.hasMarker(Y,pa1)}static wrap({value:Y,cause:X,context:G}){var J,Q,W;if($.isInstance(X)&&X.value===Y&&((J=X.context)==null?void 0:J.field)===(G==null?void 0:G.field)&&((Q=X.context)==null?void 0:Q.entityName)===(G==null?void 0:G.entityName)&&((W=X.context)==null?void 0:W.entityId)===(G==null?void 0:G.entityId))return X;return new $({value:Y,cause:X,context:G})}},ca1=`vercel.ai.error.${da1}`,NE8=Symbol.for(ca1),Fi5=class extends(ur1=dY,mr1=NE8,ur1){constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:da1,message:Y});this[mr1]=!0,this.functionality=$}static isInstance($){return dY.hasMarker($,ca1)}},pr1=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};OE8=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=BE8({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};({btoa:EE8,atob:Di5}=globalThis);na1=`vercel.ai.error.${ia1}`,ME8=Symbol.for(na1),Ni5=class extends(nr1=dY,ir1=ME8,nr1){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:ia1,message:J,cause:G});this[ir1]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return dY.hasMarker($,na1)}};pf();RE8=["fetch failed","failed to fetch"],qE8=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];_E8=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,jE8=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;CE8=Symbol("Let zodToJsonSchema decide on which parser to use"),ar1={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"};IK={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:()=>{if(cS0===void 0)cS0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return cS0},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-_]*$/};dE8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");sS0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};oS0=Symbol.for("vercel.ai.schema");iS0=Symbol.for(CM8),tG=class $ extends(tr1=Error,or1=iS0,tr1){constructor({message:Y,statusCode:X=500,cause:G,generationId:J}){super(J?`${Y} [${J}]`:Y);this[or1]=!0,this.statusCode=X,this.cause=G,this.generationId=J}static isInstance(Y){return $.hasMarker(Y)}static hasMarker(Y){return typeof Y==="object"&&Y!==null&&iS0 in Y&&Y[iS0]===!0}},SM8=`vercel.ai.gateway.error.${Js1}`,er1=Symbol.for(SM8),Qs1=class $ extends(Ya1=tG,$a1=er1,Ya1){constructor({message:Y="Authentication failed",statusCode:X=401,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[$a1]=!0,this.name=Js1,this.type="authentication_error"}static isInstance(Y){return tG.hasMarker(Y)&&er1 in Y}static createContextualError({apiKeyProvided:Y,oidcTokenProvided:X,message:G="Authentication failed",statusCode:J=401,cause:Q,generationId:W}){let Z;if(Y)Z=`AI Gateway authentication failed: Invalid API key.

Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys

Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;else if(X)Z=`AI Gateway authentication failed: Invalid OIDC token.

Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.

Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;else Z=`AI Gateway authentication failed: No authentication provided.

Option 1 - API key:
Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.

Option 2 - OIDC token:
Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:Z,statusCode:J,cause:Q,generationId:W})}},kM8=`vercel.ai.gateway.error.${Ws1}`,Xa1=Symbol.for(kM8),vM8=class extends(Ja1=tG,Ga1=Xa1,Ja1){constructor({message:$="Invalid request",statusCode:Y=400,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[Ga1]=!0,this.name=Ws1,this.type="invalid_request_error"}static isInstance($){return tG.hasMarker($)&&Xa1 in $}},xM8=`vercel.ai.gateway.error.${Zs1}`,Qa1=Symbol.for(xM8),yM8=class extends(Za1=tG,Wa1=Qa1,Za1){constructor({message:$="Rate limit exceeded",statusCode:Y=429,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[Wa1]=!0,this.name=Zs1,this.type="rate_limit_exceeded"}static isInstance($){return tG.hasMarker($)&&Qa1 in $}},bM8=`vercel.ai.gateway.error.${Ks1}`,Ka1=Symbol.for(bM8),hM8=TW(()=>BQ(U.object({modelId:U.string()}))),fM8=class extends(Ha1=tG,Ua1=Ka1,Ha1){constructor({message:$="Model not found",statusCode:Y=404,modelId:X,cause:G,generationId:J}={}){super({message:$,statusCode:Y,cause:G,generationId:J});this[Ua1]=!0,this.name=Ks1,this.type="model_not_found",this.modelId=X}static isInstance($){return tG.hasMarker($)&&Ka1 in $}},gM8=`vercel.ai.gateway.error.${Us1}`,za1=Symbol.for(gM8),Fa1=class extends(Aa1=tG,Va1=za1,Aa1){constructor({message:$="Internal server error",statusCode:Y=500,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[Va1]=!0,this.name=Us1,this.type="internal_server_error"}static isInstance($){return tG.hasMarker($)&&za1 in $}},mM8=`vercel.ai.gateway.error.${Hs1}`,Da1=Symbol.for(mM8),uM8=class extends(La1=tG,Na1=Da1,La1){constructor({message:$="Invalid response from Gateway",statusCode:Y=502,response:X,validationError:G,cause:J,generationId:Q}={}){super({message:$,statusCode:Y,cause:J,generationId:Q});this[Na1]=!0,this.name=Hs1,this.type="response_error",this.response=X,this.validationError=G}static isInstance($){return tG.hasMarker($)&&Da1 in $}};pM8=TW(()=>BQ(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()})));cM8=`vercel.ai.gateway.error.${zs1}`,Oa1=Symbol.for(cM8),Ra1=class $ extends(Ma1=tG,Ea1=Oa1,Ma1){constructor({message:Y="Request timed out",statusCode:X=408,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[Ea1]=!0,this.name=zs1,this.type="timeout_error"}static isInstance(Y){return tG.hasMarker(Y)&&Oa1 in Y}static createTimeoutError({originalMessage:Y,statusCode:X=408,cause:G,generationId:J}){let Q=`Gateway request timed out: ${Y}

    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 $({message:Q,statusCode:X,cause:G,generationId:J})}};lM8=TW(()=>BQ(U.union([U.literal("api-key"),U.literal("oidc")]))),iM8=["embedding","image","language","reranking","video"],nM8=TW(()=>BQ(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:$,output:Y,input_cache_read:X,input_cache_write:G})=>({input:$,output:Y,...X?{cachedInputTokens:X}:{},...G?{cacheCreationInputTokens:G}:{}})).nullish(),specification:U.object({specificationVersion:U.literal("v3"),provider:U.string(),modelId:U.string()}),modelType:U.string().nullish()})).transform(($)=>$.filter((Y)=>Y.modelType==null||iM8.includes(Y.modelType)))}))),rM8=TW(()=>BQ(U.object({balance:U.string(),total_used:U.string()}).transform(({balance:$,total_used:Y})=>({balance:$,totalUsed:Y})))),sM8=TW(()=>BQ(U.object({results:U.array(U.object({day:U.string().optional(),hour:U.string().optional(),user:U.string().optional(),model:U.string().optional(),tag:U.string().optional(),provider:U.string().optional(),credential_type:U.enum(["byok","system"]).optional(),total_cost:U.number(),market_cost:U.number().optional(),input_tokens:U.number().optional(),output_tokens:U.number().optional(),cached_input_tokens:U.number().optional(),cache_creation_input_tokens:U.number().optional(),reasoning_tokens:U.number().optional(),request_count:U.number().optional()}).transform(({credential_type:$,total_cost:Y,market_cost:X,input_tokens:G,output_tokens:J,cached_input_tokens:Q,cache_creation_input_tokens:W,reasoning_tokens:Z,request_count:K,...H})=>({...H,...$!==void 0?{credentialType:$}:{},totalCost:Y,...X!==void 0?{marketCost:X}:{},...G!==void 0?{inputTokens:G}:{},...J!==void 0?{outputTokens:J}:{},...Q!==void 0?{cachedInputTokens:Q}:{},...W!==void 0?{cacheCreationInputTokens:W}:{},...Z!==void 0?{reasoningTokens:Z}:{},...K!==void 0?{requestCount:K}:{}})))}))),tM8=TW(()=>BQ(U.object({data:U.object({id:U.string(),total_cost:U.number(),upstream_inference_cost:U.number(),usage:U.number(),created_at:U.string(),model:U.string(),is_byok:U.boolean(),provider_name:U.string(),streamed:U.boolean(),finish_reason:U.string(),latency:U.number(),generation_time:U.number(),native_tokens_prompt:U.number(),native_tokens_completion:U.number(),native_tokens_reasoning:U.number(),native_tokens_cached:U.number(),native_tokens_cache_creation:U.number(),billable_web_search_calls:U.number()}).transform(({total_cost:$,upstream_inference_cost:Y,created_at:X,is_byok:G,provider_name:J,finish_reason:Q,generation_time:W,native_tokens_prompt:Z,native_tokens_completion:K,native_tokens_reasoning:H,native_tokens_cached:z,native_tokens_cache_creation:V,billable_web_search_calls:A,...F})=>({...F,totalCost:$,upstreamInferenceCost:Y,createdAt:X,isByok:G,providerName:J,finishReason:Q,generationTime:W,promptTokens:Z,completionTokens:K,reasoningTokens:H,cachedTokens:z,cacheCreationTokens:V,billableWebSearchCalls:A}))}).transform(({data:$})=>$))),YR8=TW(()=>BQ(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()})));GR8=U.object({images:U.array(U.unknown()).optional()}).catchall(U.unknown()),JR8=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()})]),QR8=U.object({inputTokens:U.number().nullish(),outputTokens:U.number().nullish(),totalTokens:U.number().nullish()}),WR8=U.object({images:U.array(U.string()),warnings:U.array(JR8).optional(),providerMetadata:U.record(U.string(),GR8).optional(),usage:QR8.optional()});UR8=U.object({videos:U.array(U.unknown()).optional()}).catchall(U.unknown()),HR8=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()})]),zR8=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()})]),VR8=U.discriminatedUnion("type",[U.object({type:U.literal("result"),videos:U.array(HR8),warnings:U.array(zR8).optional(),providerMetadata:U.record(U.string(),UR8).optional()}),U.object({type:U.literal("error"),message:U.string(),errorType:U.string(),statusCode:U.number(),param:U.unknown().nullable()})]),FR8=TW(()=>BQ(U.object({ranking:U.array(U.object({index:U.number(),relevanceScore:U.number()})),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()}))),DR8=TW(()=>BQ(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.")}))),NR8=TW(()=>BQ(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()})]))),LR8=Gs1({id:"gateway.parallel_search",inputSchema:DR8,outputSchema:NR8}),OR8=TW(()=>BQ(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.")}))),ER8=TW(()=>BQ(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()})]))),MR8=Gs1({id:"gateway.perplexity_search",inputSchema:OR8,outputSchema:ER8}),qR8={parallelSearch:BR8,perplexitySearch:RR8};Li5=Xk0();jR8=typeof globalThis==="object"?globalThis:global,wa1=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;CR8=TR8(xO),SR8=xO.split(".")[0],ff=Symbol.for("opentelemetry.js.api."+SR8),gf=jR8;xR8=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return xf("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return xf("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return xf("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return xf("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return xf("verbose",this._namespace,Y)},$}();(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(_W||(_W={}));w60=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var Z=mf("diag");if(!Z)return;return Z[J].apply(Z,hR8([],bR8(Q),!1))}}var X=this,G=function(J,Q){var W,Z,K;if(Q===void 0)Q={logLevel:_W.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=mf("diag"),V=yR8((Z=Q.logLevel)!==null&&Z!==void 0?Z:_W.INFO,J);if(z&&!Q.suppressOverrideMessage){var A=(K=Error().stack)!==null&&K!==void 0?K:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+A),V.warn("Current logger will overwrite one already registered from "+A)}return Gk0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){Jk0(fR8,X)},X.createComponentLogger=function(J){return new xR8(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();mR8=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),uR8=new mR8,cR8=function(){function $(){}return $.prototype.active=function(){return uR8},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,dR8([G],pR8(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),nR8=new cR8,Qk0=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return Gk0(nS0,Y,w60.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,iR8([Y,X,G],lR8(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return mf(nS0)||nR8},$.prototype.disable=function(){this._getContextManager().disable(),Jk0(nS0,w60.instance())},$}();(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(tS0||(tS0={}));rR8={traceId:Fs1,spanId:As1,traceFlags:tS0.NONE},bf=function(){function $(Y){if(Y===void 0)Y=rR8;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),Wk0=gR8("OpenTelemetry Context Key SPAN");tR8=/^([0-9a-f]{32})$/i,eR8=/^[0-9a-f]{16}$/i;rS0=Qk0.getInstance(),Ls1=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=rS0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new bf;var Q=G&&Ds1(G);if(Gq8(Q)&&Ns1(Q))return new bf(Q);else return new bf},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,Z;if(arguments.length<2)return;else if(arguments.length===2)Z=X;else if(arguments.length===3)Q=X,Z=G;else Q=X,W=G,Z=J;var K=W!==null&&W!==void 0?W:rS0.active(),H=this.startSpan(Y,Q,K),z=Kk0(K,H);return rS0.with(z,Z,void 0,H)},$}();Jq8=new Ls1,Qq8=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return Jq8;return this._delegate=Y,this._delegate},$}(),Wq8=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new Ls1},$}(),Zq8=new Wq8,_a1=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new Qq8(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:Zq8},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}();(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(ja1||(ja1={}));Bi5=Qk0.getInstance(),Kq8=function(){function $(){this._proxyTracerProvider=new _a1,this.wrapSpanContext=Xq8,this.isSpanContextValid=Ns1,this.deleteSpan=sR8,this.getSpan=Zk0,this.getActiveSpan=aR8,this.getSpanContext=Ds1,this.setSpan=Kk0,this.setSpanContext=oR8}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=Gk0(aS0,this._proxyTracerProvider,w60.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return mf(aS0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){Jk0(aS0,w60.instance()),this._proxyTracerProvider=new _a1},$}(),Oi5=Kq8.getInstance(),Uq8=Object.defineProperty,Vq8=`vercel.ai.error.${zq8}`,Aq8=Symbol.for(Vq8);Fq8=Aq8;Nq8=`vercel.ai.error.${Dq8}`,Lq8=Symbol.for(Nq8);Bq8=Lq8;Eq8=`vercel.ai.error.${Oq8}`,Mq8=Symbol.for(Eq8);Rq8=Mq8;Iq8=`vercel.ai.error.${qq8}`,Pq8=Symbol.for(Iq8);wq8=Pq8;jq8=`vercel.ai.error.${_q8}`,Tq8=Symbol.for(jq8);Cq8=Tq8;Os1=`vercel.ai.error.${Bs1}`,Sq8=Symbol.for(Os1),sF=class extends dY{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:Bs1,message:$,cause:Y});this[Es1]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return dY.hasMarker($,Os1)}};Es1=Sq8;vq8=`vercel.ai.error.${kq8}`,xq8=Symbol.for(vq8);yq8=xq8;hq8=`vercel.ai.error.${bq8}`,fq8=Symbol.for(hq8);gq8=fq8;uq8=`vercel.ai.error.${mq8}`,pq8=Symbol.for(uq8);dq8=pq8;lq8=`vercel.ai.error.${cq8}`,iq8=Symbol.for(lq8);nq8=iq8;aq8=`vercel.ai.error.${rq8}`,sq8=Symbol.for(aq8);oq8=sq8;eq8=`vercel.ai.error.${tq8}`,$I8=Symbol.for(eq8);YI8=$I8;Ms1=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),bO=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),bO.optional()),U.array(bO)])),x7=U.record(U.string(),U.record(U.string(),bO.optional())),Rs1=U.object({type:U.literal("text"),text:U.string(),providerOptions:x7.optional()}),XI8=U.object({type:U.literal("image"),image:U.union([Ms1,U.instanceof(URL)]),mediaType:U.string().optional(),providerOptions:x7.optional()}),qs1=U.object({type:U.literal("file"),data:U.union([Ms1,U.instanceof(URL)]),filename:U.string().optional(),mediaType:U.string(),providerOptions:x7.optional()}),GI8=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:x7.optional()}),JI8=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerOptions:x7.optional(),providerExecuted:U.boolean().optional()}),QI8=U.discriminatedUnion("type",[U.object({type:U.literal("text"),value:U.string(),providerOptions:x7.optional()}),U.object({type:U.literal("json"),value:bO,providerOptions:x7.optional()}),U.object({type:U.literal("execution-denied"),reason:U.string().optional(),providerOptions:x7.optional()}),U.object({type:U.literal("error-text"),value:U.string(),providerOptions:x7.optional()}),U.object({type:U.literal("error-json"),value:bO,providerOptions:x7.optional()}),U.object({type:U.literal("content"),value:U.array(U.union([U.object({type:U.literal("text"),text:U.string(),providerOptions:x7.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:x7.optional()}),U.object({type:U.literal("file-url"),url:U.string(),providerOptions:x7.optional()}),U.object({type:U.literal("file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:x7.optional()}),U.object({type:U.literal("image-data"),data:U.string(),mediaType:U.string(),providerOptions:x7.optional()}),U.object({type:U.literal("image-url"),url:U.string(),providerOptions:x7.optional()}),U.object({type:U.literal("image-file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:x7.optional()}),U.object({type:U.literal("custom"),providerOptions:x7.optional()})]))})]),Is1=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),output:QI8,providerOptions:x7.optional()}),WI8=U.object({type:U.literal("tool-approval-request"),approvalId:U.string(),toolCallId:U.string()}),ZI8=U.object({type:U.literal("tool-approval-response"),approvalId:U.string(),approved:U.boolean(),reason:U.string().optional()}),KI8=U.object({role:U.literal("system"),content:U.string(),providerOptions:x7.optional()}),UI8=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([Rs1,XI8,qs1]))]),providerOptions:x7.optional()}),HI8=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([Rs1,qs1,GI8,JI8,Is1,WI8]))]),providerOptions:x7.optional()}),zI8=U.object({role:U.literal("tool"),content:U.array(U.union([Is1,ZI8])),providerOptions:x7.optional()}),Ei5=U.union([KI8,UI8,HI8,zI8]),VI8={};Hq8(VI8,{array:()=>NI8,choice:()=>LI8,json:()=>BI8,object:()=>DI8,text:()=>FI8});Mi5=pf({prefix:"aitxt",size:24}),Ri5=class extends TransformStream{constructor(){super({transform($,Y){Y.enqueue(`data: ${JSON.stringify($)}

`)},flush($){$.enqueue(`data: [DONE]

`)}})}};U.record(U.string(),bO.optional());qi5=pf({prefix:"aitxt",size:24});U.record(U.string(),bO.optional());pf({prefix:"aiobj",size:24});pf({prefix:"aiobj",size:24})});var MI8,Vk0,RI8,Ps1,qI8,II8,ws1=($,Y)=>function(){return Y||(0,$[Ps1($)[0]])((Y={exports:{}}).exports,Y),Y.exports},_s1=($,Y)=>{for(var X in Y)Vk0($,X,{get:Y[X],enumerable:!0})},zk0=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of Ps1(Y))if(!II8.call($,J)&&J!==X)Vk0($,J,{get:()=>Y[J],enumerable:!(G=RI8(Y,J))||G.enumerable})}return $},js1=($,Y,X)=>(zk0($,Y,"default"),X&&zk0(X,Y,"default")),Ak0=($,Y,X)=>(X=$!=null?MI8(qI8($)):{},zk0(Y||!$||!$.__esModule?Vk0(X,"default",{value:$,enumerable:!0}):X,$));var Fk0=V0(()=>{MI8=Object.create,Vk0=Object.defineProperty,RI8=Object.getOwnPropertyDescriptor,Ps1=Object.getOwnPropertyNames,qI8=Object.getPrototypeOf,II8=Object.prototype.hasOwnProperty});function tf($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function S60($){if($===null||typeof $==="string"||typeof $==="number"||typeof $==="boolean")return!0;if(Array.isArray($))return $.every(S60);if(typeof $==="object")return Object.entries($).every(([Y,X])=>typeof Y==="string"&&S60(X));return!1}function Ts1($){return Array.isArray($)&&$.every(S60)}function Ik0($){return $!=null&&typeof $==="object"&&Object.entries($).every(([Y,X])=>typeof Y==="string"&&S60(X))}function iI8($){return new ReadableStream({async pull(Y){try{let{value:X,done:G}=await $.next();if(G)Y.close();else Y.enqueue(X)}catch(X){Y.error(X)}},cancel(){}})}async function nI8($){return $==null?Promise.resolve():new Promise((Y)=>setTimeout(Y,$))}function aI8($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function sI8($){return $ instanceof Error&&($.name==="AbortError"||$.name==="TimeoutError")}function oI8($){return{[k60]:!0,validate:$}}function tI8($){return typeof $==="object"&&$!==null&&k60 in $&&$[k60]===!0&&"validate"in $}function eI8($){return tI8($)?$:$P8($)}function $P8($){return oI8((Y)=>{let X=$.safeParse(Y);return X.success?{success:!0,value:X.data}:{success:!1,error:X.error}})}function mO({value:$,schema:Y}){let X=eI8(Y);try{if(X.validate==null)return{success:!0,value:$};let G=X.validate($);if(G.success)return G;return{success:!1,error:gO.wrap({value:$,cause:G.error})}}catch(G){return{success:!1,error:gO.wrap({value:$,cause:G})}}}function lf({text:$,schema:Y}){try{let X=lI8.default.parse($);if(Y==null)return{success:!0,value:X,rawValue:X};let G=mO({value:X,schema:Y});return G.success?{...G,rawValue:X}:G}catch(X){return{success:!1,error:qk0.isInstance(X)?X:new qk0({text:$,cause:X})}}}function xk0($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X=XP8(Y);return Uint8Array.from(X,(G)=>G.codePointAt(0))}function Pk0($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return YP8(Y)}function Ho1($,Y,X,G){if(!G?.errorMessages)return;if(X)$.errorMessage={...$.errorMessage,[Y]:X}}function l9($,Y,X,G,J){$[Y]=X,Ho1($,Y,G,J)}function OQ($){if($.target!=="openAi")return{};let Y=[...$.basePath,$.definitionPath,$.openAiAnyTypeName];return $.flags.hasReferencedOpenAiAnyType=!0,{$ref:$.$refStrategy==="relative"?zo1(Y,$.currentPath):Y.join("/")}}function WP8($,Y){let X={type:"array"};if($.type?._def&&$.type?._def?.typeName!==U0.ZodAny)X.items=H9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)l9(X,"minItems",$.minLength.value,$.minLength.message,Y);if($.maxLength)l9(X,"maxItems",$.maxLength.value,$.maxLength.message,Y);if($.exactLength)l9(X,"minItems",$.exactLength.value,$.exactLength.message,Y),l9(X,"maxItems",$.exactLength.value,$.exactLength.message,Y);return X}function ZP8($,Y){let X={type:"integer",format:"int64"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"min":if(Y.target==="jsonSchema7")if(G.inclusive)l9(X,"minimum",G.value,G.message,Y);else l9(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;l9(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)l9(X,"maximum",G.value,G.message,Y);else l9(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;l9(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":l9(X,"multipleOf",G.value,G.message,Y);break}return X}function KP8(){return{type:"boolean"}}function Vo1($,Y){return H9($.type._def,Y)}function Ao1($,Y,X){let G=X??Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>Ao1($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return HP8($,Y)}}function zP8($,Y){return{...H9($.innerType._def,Y),default:$.defaultValue()}}function VP8($,Y){return Y.effectStrategy==="input"?H9($.schema._def,Y):OQ(Y)}function AP8($){return{type:"string",enum:Array.from($.values)}}function DP8($,Y){let X=[H9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),H9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((Q)=>!!Q),G=Y.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,J=[];return X.forEach((Q)=>{if(FP8(Q)){if(J.push(...Q.allOf),Q.unevaluatedProperties===void 0)G=void 0}else{let W=Q;if("additionalProperties"in Q&&Q.additionalProperties===!1){let{additionalProperties:Z,...K}=Q;W=K}else G=void 0;J.push(W)}}),J.length?{allOf:J,...G}:void 0}function NP8($,Y){let X=typeof $.value;if(X!=="bigint"&&X!=="number"&&X!=="boolean"&&X!=="string")return{type:Array.isArray($.value)?"array":"object"};if(Y.target==="openApi3")return{type:X==="bigint"?"integer":X,enum:[$.value]};return{type:X==="bigint"?"integer":X,const:$.value}}function Fo1($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":l9(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y);break;case"max":l9(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"email":switch(Y.emailStrategy){case"format:email":_K(X,"email",G.message,Y);break;case"format:idn-email":_K(X,"idn-email",G.message,Y);break;case"pattern:zod":eG(X,wK.email,G.message,Y);break}break;case"url":_K(X,"uri",G.message,Y);break;case"uuid":_K(X,"uuid",G.message,Y);break;case"regex":eG(X,G.regex,G.message,Y);break;case"cuid":eG(X,wK.cuid,G.message,Y);break;case"cuid2":eG(X,wK.cuid2,G.message,Y);break;case"startsWith":eG(X,RegExp(`^${Nk0(G.value,Y)}`),G.message,Y);break;case"endsWith":eG(X,RegExp(`${Nk0(G.value,Y)}$`),G.message,Y);break;case"datetime":_K(X,"date-time",G.message,Y);break;case"date":_K(X,"date",G.message,Y);break;case"time":_K(X,"time",G.message,Y);break;case"duration":_K(X,"duration",G.message,Y);break;case"length":l9(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y),l9(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"includes":{eG(X,RegExp(Nk0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")_K(X,"ipv4",G.message,Y);if(G.version!=="v4")_K(X,"ipv6",G.message,Y);break}case"base64url":eG(X,wK.base64url,G.message,Y);break;case"jwt":eG(X,wK.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")eG(X,wK.ipv4Cidr,G.message,Y);if(G.version!=="v4")eG(X,wK.ipv6Cidr,G.message,Y);break}case"emoji":eG(X,wK.emoji(),G.message,Y);break;case"ulid":{eG(X,wK.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{_K(X,"binary",G.message,Y);break}case"contentEncoding:base64":{l9(X,"contentEncoding","base64",G.message,Y);break}case"pattern:zod":{eG(X,wK.base64,G.message,Y);break}}break}case"nanoid":eG(X,wK.nanoid,G.message,Y)}return X}function Nk0($,Y){return Y.patternStrategy==="escape"?BP8($):$}function BP8($){let Y="";for(let X=0;X<$.length;X++){if(!LP8.has($[X]))Y+="\\";Y+=$[X]}return Y}function _K($,Y,X,G){if($.format||$.anyOf?.some((J)=>J.format)){if(!$.anyOf)$.anyOf=[];if($.format){if($.anyOf.push({format:$.format,...$.errorMessage&&G.errorMessages&&{errorMessage:{format:$.errorMessage.format}}}),delete $.format,$.errorMessage){if(delete $.errorMessage.format,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else l9($,"format",Y,X,G)}function eG($,Y,X,G){if($.pattern||$.allOf?.some((J)=>J.pattern)){if(!$.allOf)$.allOf=[];if($.pattern){if($.allOf.push({pattern:$.pattern,...$.errorMessage&&G.errorMessages&&{errorMessage:{pattern:$.errorMessage.pattern}}}),delete $.pattern,$.errorMessage){if(delete $.errorMessage.pattern,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.allOf.push({pattern:Ss1(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else l9($,"pattern",Ss1(Y,G),X,G)}function Ss1($,Y){if(!Y.applyRegexFlags||!$.flags)return $.source;let X={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},G=X.i?$.source.toLowerCase():$.source,J="",Q=!1,W=!1,Z=!1;for(let K=0;K<G.length;K++){if(Q){J+=G[K],Q=!1;continue}if(X.i){if(W){if(G[K].match(/[a-z]/)){if(Z)J+=G[K],J+=`${G[K-2]}-${G[K]}`.toUpperCase(),Z=!1;else if(G[K+1]==="-"&&G[K+2]?.match(/[a-z]/))J+=G[K],Z=!0;else J+=`${G[K]}${G[K].toUpperCase()}`;continue}}else if(G[K].match(/[a-z]/)){J+=`[${G[K]}${G[K].toUpperCase()}]`;continue}}if(X.m){if(G[K]==="^"){J+=`(^|(?<=[\r
]))`;continue}else if(G[K]==="$"){J+=`($|(?=[\r
]))`;continue}}if(X.s&&G[K]==="."){J+=W?`${G[K]}\r
`:`[${G[K]}\r
]`;continue}if(J+=G[K],G[K]==="\\")Q=!0;else if(W&&G[K]==="]")W=!1;else if(!W&&G[K]==="[")W=!0}return J}function Do1($,Y){if(Y.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(Y.target==="openApi3"&&$.keyType?._def.typeName===U0.ZodEnum)return{type:"object",required:$.keyType._def.values,properties:$.keyType._def.values.reduce((G,J)=>({...G,[J]:H9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"properties",J]})??OQ(Y)}),{}),additionalProperties:Y.rejectedAdditionalProperties};let X={type:"object",additionalProperties:H9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]})??Y.allowedAdditionalProperties};if(Y.target==="openApi3")return X;if($.keyType?._def.typeName===U0.ZodString&&$.keyType._def.checks?.length){let{type:G,...J}=Fo1($.keyType._def,Y);return{...X,propertyNames:J}}else if($.keyType?._def.typeName===U0.ZodEnum)return{...X,propertyNames:{enum:$.keyType._def.values}};else if($.keyType?._def.typeName===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&$.keyType._def.type._def.checks?.length){let{type:G,...J}=Vo1($.keyType._def,Y);return{...X,propertyNames:J}}return X}function OP8($,Y){if(Y.mapStrategy==="record")return Do1($,Y);let X=H9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||OQ(Y),G=H9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||OQ(Y);return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function EP8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function MP8($){return $.target==="openAi"?void 0:{not:OQ({...$,currentPath:[...$.currentPath,"not"]})}}function RP8($){return $.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}function qP8($,Y){if(Y.target==="openApi3")return ks1($,Y);let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in v60)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=v60[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return ks1($,Y)}function IP8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length)){if(Y.target==="openApi3")return{type:v60[$.innerType._def.typeName],nullable:!0};return{type:[v60[$.innerType._def.typeName],"null"]}}if(Y.target==="openApi3"){let G=H9($.innerType._def,{...Y,currentPath:[...Y.currentPath]});if(G&&"$ref"in G)return{allOf:[G],nullable:!0};return G&&{...G,nullable:!0}}let X=H9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function PP8($,Y){let X={type:"number"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"int":X.type="integer",Ho1(X,"type",G.message,Y);break;case"min":if(Y.target==="jsonSchema7")if(G.inclusive)l9(X,"minimum",G.value,G.message,Y);else l9(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;l9(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)l9(X,"maximum",G.value,G.message,Y);else l9(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;l9(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":l9(X,"multipleOf",G.value,G.message,Y);break}return X}function wP8($,Y){let X=Y.target==="openAi",G={type:"object",properties:{}},J=[],Q=$.shape();for(let Z in Q){let K=Q[Z];if(K===void 0||K._def===void 0)continue;let H=jP8(K);if(H&&X){if(K._def.typeName==="ZodOptional")K=K._def.innerType;if(!K.isNullable())K=K.nullable();H=!1}let z=H9(K._def,{...Y,currentPath:[...Y.currentPath,"properties",Z],propertyPath:[...Y.currentPath,"properties",Z]});if(z===void 0)continue;if(G.properties[Z]=z,!H)J.push(Z)}if(J.length)G.required=J;let W=_P8($,Y);if(W!==void 0)G.additionalProperties=W;return G}function _P8($,Y){if($.catchall._def.typeName!=="ZodNever")return H9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function jP8($){try{return $.isOptional()}catch{return!0}}function SP8($,Y){return H9($.type._def,Y)}function kP8($,Y){let G={type:"array",uniqueItems:!0,items:H9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)l9(G,"minItems",$.minSize.value,$.minSize.message,Y);if($.maxSize)l9(G,"maxItems",$.maxSize.value,$.maxSize.message,Y);return G}function vP8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>H9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:H9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>H9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function xP8($){return{not:OQ($)}}function yP8($){return OQ($)}function H9($,Y,X=!1){let G=Y.seen.get($);if(Y.override){let Z=Y.override?.($,Y,G,X);if(Z!==GP8)return Z}if(G&&!X){let Z=fP8(G,Y);if(Z!==void 0)return Z}let J={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,J);let Q=hP8($,$.typeName,Y),W=typeof Q==="function"?H9(Q(),Y):Q;if(W)gP8($,Y,W);if(Y.postProcess){let Z=Y.postProcess(W,$,Y);return J.jsonSchema=W,Z}return J.jsonSchema=W,W}function pP8($){let Y=["ROOT"],X=-1,G=null;function J(K,H,z){switch(K){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let K=0;K<$.length;K++){let H=$[K];switch(Y[Y.length-1]){case"ROOT":J(H,K,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=K,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,K,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,K);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=K;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=K}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=K,Y.pop();break}default:{X=K,J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=K,Y.pop();break}default:{X=K;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=K;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=K;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,K+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K)}else X=K;break}}}let Z=$.slice(0,X+1);for(let K=Y.length-1;K>=0;K--)switch(Y[K]){case"INSIDE_STRING":{Z+='"';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":{Z+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{Z+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))Z+="true".slice(z.length);else if("false".startsWith(z))Z+="false".slice(z.length);else if("null".startsWith(z))Z+="null".slice(z.length)}}return Z}function No1($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=lf({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=lf({text:pP8($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}function ZG($,Y){let X=yk0.find((G)=>G.name===$);if(!X)throw Error(`Invalid stream part type: ${$}`);return`${X.code}:${JSON.stringify(Y)}
`}function x60($,Y){if($===Y)return!0;if($==null||Y==null)return!1;if(typeof $!=="object"&&typeof Y!=="object")return $===Y;if($.constructor!==Y.constructor)return!1;if($ instanceof Date&&Y instanceof Date)return $.getTime()===Y.getTime();if(Array.isArray($)){if($.length!==Y.length)return!1;for(let J=0;J<$.length;J++)if(!x60($[J],Y[J]))return!1;return!0}let X=Object.keys($),G=Object.keys(Y);if(X.length!==G.length)return!1;for(let J of X){if(!G.includes(J))return!1;if(!x60($[J],Y[J]))return!1}return!0}function Qw8($,Y){var X;let G=(X=void 0)!=null?X:!1;return Ww8(uP8($,{$refStrategy:G?"root":"none",target:"jsonSchema7"}),{validate:(J)=>{let Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function Ww8($,{validate:Y}={}){return{[wk0]:!0,_type:void 0,[k60]:!0,jsonSchema:$,validate:Y}}function Zw8($){return typeof $==="object"&&$!==null&&wk0 in $&&$[wk0]===!0&&"jsonSchema"in $&&"validate"in $}function tw($){return Zw8($)?$:Qw8($)}function Uw8($){var Y=new Set([$]),X=new Set,G=$.match(vs1);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(K){return K===$};function Q(Z){return X.add(Z),!1}function W(Z){return Y.add(Z),!0}return function(K){if(Y.has(K))return!0;if(X.has(K))return!1;var H=K.match(vs1);if(!H)return Q(K);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(K);if(J.major!==z.major)return Q(K);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(K);return Q(K)}if(J.minor<=z.minor)return W(K);return Q(K)}}function bk0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=rf[nf]=(J=rf[nf])!==null&&J!==void 0?J:{version:hO};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==hO){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+hO);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+hO+"."),!0}function af($){var Y,X,G=(Y=rf[nf])===null||Y===void 0?void 0:Y.version;if(!G||!Hw8(G))return;return(X=rf[nf])===null||X===void 0?void 0:X[$]}function hk0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+hO+".");var X=rf[nf];if(X)delete X[$]}function df($,Y,X){var G=af("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,Aw8([],Vw8(X),!1))}function Dw8($,Y){if($<CW.NONE)$=CW.NONE;else if($>CW.ALL)$=CW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",CW.ERROR),warn:X("warn",CW.WARN),info:X("info",CW.INFO),debug:X("debug",CW.DEBUG),verbose:X("verbose",CW.VERBOSE)}}function Ow8($){return Symbol.for($)}function gk0($){return $.getValue(fk0)||void 0}function Tw8(){return gk0(Lo1.getInstance().active())}function mk0($,Y){return $.setValue(fk0,Y)}function Cw8($){return $.deleteValue(fk0)}function Sw8($,Y){return mk0($,new cf(Y))}function Eo1($){var Y;return(Y=gk0($))===null||Y===void 0?void 0:Y.spanContext()}function xw8($){return kw8.test($)&&$!==Oo1}function yw8($){return vw8.test($)&&$!==Bo1}function Mo1($){return xw8($.traceId)&&yw8($.spanId)}function bw8($){return new cf($)}function hw8($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}function ew($,{contentType:Y,dataStreamVersion:X}){let G=new Headers($!=null?$:{});if(!G.has("Content-Type"))G.set("Content-Type",Y);if(X!==void 0)G.set("X-Vercel-AI-Data-Stream",X);return G}function jk0($,{contentType:Y,dataStreamVersion:X}){let G={};if($!=null)for(let[J,Q]of Object.entries($))G[J]=Q;if(G["Content-Type"]==null)G["Content-Type"]=Y;if(X!==void 0)G["X-Vercel-AI-Data-Stream"]=X;return G}function Tk0({response:$,status:Y,statusText:X,headers:G,stream:J}){$.writeHead(Y!=null?Y:200,X,G);let Q=J.getReader();(async()=>{try{while(!0){let{done:Z,value:K}=await Q.read();if(Z)break;$.write(K)}}catch(Z){throw Z}finally{$.end()}})()}async function To1($,{maxRetries:Y,delayInMs:X,backoffFactor:G},J=[]){try{return await $()}catch(Q){if(sI8(Q))throw Q;if(Y===0)throw Q;let W=aI8(Q),Z=[...J,Q],K=Z.length;if(K>Y)throw new ys1({message:`Failed after ${K} attempts. Last error: ${W}`,reason:"maxRetriesExceeded",errors:Z});if(Q instanceof Error&&bI8.isInstance(Q)&&Q.isRetryable===!0&&K<=Y)return await nI8(X),To1($,{maxRetries:Y,delayInMs:G*X,backoffFactor:G},Z);if(K===1)throw Q;throw new ys1({message:`Failed after ${K} attempts with non-retryable error: '${W}'`,reason:"errorNotRetryable",errors:Z})}}function g60({maxRetries:$}){if($!=null){if(!Number.isInteger($))throw new _5({parameter:"maxRetries",value:$,message:"maxRetries must be an integer"});if($<0)throw new _5({parameter:"maxRetries",value:$,message:"maxRetries must be >= 0"})}let Y=$!=null?$:2;return{maxRetries:Y,retry:nw8({maxRetries:Y})}}function jK({operationId:$,telemetry:Y}){return{"operation.name":`${$}${(Y==null?void 0:Y.functionId)!=null?` ${Y.functionId}`:""}`,"resource.name":Y==null?void 0:Y.functionId,"ai.operationId":$,"ai.telemetry.functionId":Y==null?void 0:Y.functionId}}function m60({model:$,settings:Y,telemetry:X,headers:G}){var J;return{"ai.model.provider":$.provider,"ai.model.id":$.modelId,...Object.entries(Y).reduce((Q,[W,Z])=>{return Q[`ai.settings.${W}`]=Z,Q},{}),...Object.entries((J=X==null?void 0:X.metadata)!=null?J:{}).reduce((Q,[W,Z])=>{return Q[`ai.telemetry.metadata.${W}`]=Z,Q},{}),...Object.entries(G!=null?G:{}).reduce((Q,[W,Z])=>{if(Z!==void 0)Q[`ai.request.headers.${W}`]=Z;return Q},{})}}function u60({isEnabled:$=!1,tracer:Y}={}){if(!$)return rw8;if(Y)return Y;return dw8.getTracer("ai")}function TK({name:$,tracer:Y,attributes:X,fn:G,endWhenDone:J=!0}){return Y.startActiveSpan($,{attributes:X},async(Q)=>{try{let W=await G(Q);if(J)Q.end();return W}catch(W){try{pk0(Q,W)}finally{Q.end()}throw W}})}function pk0($,Y){if(Y instanceof Error)$.recordException({name:Y.name,message:Y.message,stack:Y.stack}),$.setStatus({code:b60.ERROR,message:Y.message});else $.setStatus({code:b60.ERROR})}function J$({telemetry:$,attributes:Y}){if(($==null?void 0:$.isEnabled)!==!0)return{};return Object.entries(Y).reduce((X,[G,J])=>{if(J===void 0)return X;if(typeof J==="object"&&"input"in J&&typeof J.input==="function"){if(($==null?void 0:$.recordInputs)===!1)return X;let Q=J.input();return Q===void 0?X:{...X,[G]:Q}}if(typeof J==="object"&&"output"in J&&typeof J.output==="function"){if(($==null?void 0:$.recordOutputs)===!1)return X;let Q=J.output();return Q===void 0?X:{...X,[G]:Q}}return{...X,[G]:J}},{})}function ew8($){return typeof $==="string"&&$.startsWith("SUQz")||typeof $!=="string"&&$.length>10&&$[0]===73&&$[1]===68&&$[2]===51?tw8($):$}function $_8({data:$,signatures:Y}){let X=ew8($);for(let G of Y)if(typeof X==="string"?X.startsWith(G.base64Prefix):X.length>=G.bytesPrefix.length&&G.bytesPrefix.every((J,Q)=>X[Q]===J))return G.mimeType;return}async function G_8({url:$}){var Y;let X=$.toString();try{let G=await fetch(X);if(!G.ok)throw new Ek0({url:X,statusCode:G.status,statusText:G.statusText});return{data:new Uint8Array(await G.arrayBuffer()),mimeType:(Y=G.headers.get("content-type"))!=null?Y:void 0}}catch(G){if(Ek0.isInstance(G))throw G;throw new Ek0({url:X,cause:G})}}function dk0($){if(typeof $==="string")return $;if($ instanceof ArrayBuffer)return Pk0(new Uint8Array($));return Pk0($)}function h60($){if($ instanceof Uint8Array)return $;if(typeof $==="string")try{return xk0($)}catch(Y){throw new bs1({message:"Invalid data content. Content string is not a base64-encoded media.",content:$,cause:Y})}if($ instanceof ArrayBuffer)return new Uint8Array($);throw new bs1({content:$})}function Q_8($){try{return new TextDecoder().decode($)}catch(Y){throw Error("Error decoding Uint8Array to text")}}function K_8($){try{let[Y,X]=$.split(",");return{mimeType:Y.split(";")[0].split(":")[1],base64Content:X}}catch(Y){return{mimeType:void 0,base64Content:void 0}}}async function $_({prompt:$,modelSupportsImageUrls:Y=!0,modelSupportsUrl:X=()=>!1,downloadImplementation:G=G_8}){let J=await H_8($.messages,G,Y,X);return[...$.system!=null?[{role:"system",content:$.system}]:[],...$.messages.map((Q)=>U_8(Q,J))]}function U_8($,Y){var X,G,J,Q,W,Z;let K=$.role;switch(K){case"system":return{role:"system",content:$.content,providerMetadata:(X=$.providerOptions)!=null?X:$.experimental_providerMetadata};case"user":{if(typeof $.content==="string")return{role:"user",content:[{type:"text",text:$.content}],providerMetadata:(G=$.providerOptions)!=null?G:$.experimental_providerMetadata};return{role:"user",content:$.content.map((H)=>z_8(H,Y)).filter((H)=>H.type!=="text"||H.text!==""),providerMetadata:(J=$.providerOptions)!=null?J:$.experimental_providerMetadata}}case"assistant":{if(typeof $.content==="string")return{role:"assistant",content:[{type:"text",text:$.content}],providerMetadata:(Q=$.providerOptions)!=null?Q:$.experimental_providerMetadata};return{role:"assistant",content:$.content.filter((H)=>H.type!=="text"||H.text!=="").map((H)=>{var z;let V=(z=H.providerOptions)!=null?z:H.experimental_providerMetadata;switch(H.type){case"file":return{type:"file",data:H.data instanceof URL?H.data:dk0(H.data),filename:H.filename,mimeType:H.mimeType,providerMetadata:V};case"reasoning":return{type:"reasoning",text:H.text,signature:H.signature,providerMetadata:V};case"redacted-reasoning":return{type:"redacted-reasoning",data:H.data,providerMetadata:V};case"text":return{type:"text",text:H.text,providerMetadata:V};case"tool-call":return{type:"tool-call",toolCallId:H.toolCallId,toolName:H.toolName,args:H.args,providerMetadata:V}}}),providerMetadata:(W=$.providerOptions)!=null?W:$.experimental_providerMetadata}}case"tool":return{role:"tool",content:$.content.map((H)=>{var z;return{type:"tool-result",toolCallId:H.toolCallId,toolName:H.toolName,result:H.result,content:H.experimental_content,isError:H.isError,providerMetadata:(z=H.providerOptions)!=null?z:H.experimental_providerMetadata}}),providerMetadata:(Z=$.providerOptions)!=null?Z:$.experimental_providerMetadata};default:throw new Z_8({role:K})}}async function H_8($,Y,X,G){let J=$.filter((W)=>W.role==="user").map((W)=>W.content).filter((W)=>Array.isArray(W)).flat().filter((W)=>W.type==="image"||W.type==="file").filter((W)=>!(W.type==="image"&&X===!0)).map((W)=>W.type==="image"?W.image:W.data).map((W)=>typeof W==="string"&&(W.startsWith("http:")||W.startsWith("https:"))?new URL(W):W).filter((W)=>W instanceof URL).filter((W)=>!G(W)),Q=await Promise.all(J.map(async(W)=>({url:W,data:await Y({url:W})})));return Object.fromEntries(Q.map(({url:W,data:Z})=>[W.toString(),Z]))}function z_8($,Y){var X,G,J,Q;if($.type==="text")return{type:"text",text:$.text,providerMetadata:(X=$.providerOptions)!=null?X:$.experimental_providerMetadata};let W=$.mimeType,Z,K,H,z=$.type;switch(z){case"image":Z=$.image;break;case"file":Z=$.data;break;default:throw Error(`Unsupported part type: ${z}`)}try{K=typeof Z==="string"?new URL(Z):Z}catch(V){K=Z}if(K instanceof URL)if(K.protocol==="data:"){let{mimeType:V,base64Content:A}=K_8(K.toString());if(V==null||A==null)throw Error(`Invalid data URL format in part ${z}`);W=V,H=h60(A)}else{let V=Y[K.toString()];if(V)H=V.data,W!=null||(W=V.mimeType);else H=K}else H=h60(K);switch(z){case"image":{if(H instanceof Uint8Array)W=(G=$_8({data:H,signatures:ow8}))!=null?G:W;return{type:"image",image:H,mimeType:W,providerMetadata:(J=$.providerOptions)!=null?J:$.experimental_providerMetadata}}case"file":{if(W==null)throw Error("Mime type is missing for file part");return{type:"file",data:H instanceof Uint8Array?dk0(H):H,filename:$.filename,mimeType:W,providerMetadata:(Q=$.providerOptions)!=null?Q:$.experimental_providerMetadata}}}}function Y_({maxTokens:$,temperature:Y,topP:X,topK:G,presencePenalty:J,frequencyPenalty:Q,stopSequences:W,seed:Z}){if($!=null){if(!Number.isInteger($))throw new _5({parameter:"maxTokens",value:$,message:"maxTokens must be an integer"});if($<1)throw new _5({parameter:"maxTokens",value:$,message:"maxTokens must be >= 1"})}if(Y!=null){if(typeof Y!=="number")throw new _5({parameter:"temperature",value:Y,message:"temperature must be a number"})}if(X!=null){if(typeof X!=="number")throw new _5({parameter:"topP",value:X,message:"topP must be a number"})}if(G!=null){if(typeof G!=="number")throw new _5({parameter:"topK",value:G,message:"topK must be a number"})}if(J!=null){if(typeof J!=="number")throw new _5({parameter:"presencePenalty",value:J,message:"presencePenalty must be a number"})}if(Q!=null){if(typeof Q!=="number")throw new _5({parameter:"frequencyPenalty",value:Q,message:"frequencyPenalty must be a number"})}if(Z!=null){if(!Number.isInteger(Z))throw new _5({parameter:"seed",value:Z,message:"seed must be an integer"})}return{maxTokens:$,temperature:Y!=null?Y:0,topP:X,topK:G,presencePenalty:J,frequencyPenalty:Q,stopSequences:W!=null&&W.length>0?W:void 0,seed:Z}}function hs1($){var Y,X,G;let J=[];for(let Q of $){let W;try{W=new URL(Q.url)}catch(Z){throw Error(`Invalid URL: ${Q.url}`)}switch(W.protocol){case"http:":case"https:":{if((Y=Q.contentType)==null?void 0:Y.startsWith("image/"))J.push({type:"image",image:W});else{if(!Q.contentType)throw Error("If the attachment is not an image, it must specify a content type");J.push({type:"file",data:W,mimeType:Q.contentType})}break}case"data:":{let Z,K,H;try{[Z,K]=Q.url.split(","),H=Z.split(";")[0].split(":")[1]}catch(z){throw Error(`Error processing data URL: ${Q.url}`)}if(H==null||K==null)throw Error(`Invalid data URL format: ${Q.url}`);if((X=Q.contentType)==null?void 0:X.startsWith("image/"))J.push({type:"image",image:h60(K)});else if((G=Q.contentType)==null?void 0:G.startsWith("text/"))J.push({type:"text",text:Q_8(h60(K))});else{if(!Q.contentType)throw Error("If the attachment is not an image or text, it must specify a content type");J.push({type:"file",data:K,mimeType:Q.contentType})}break}default:throw Error(`Unsupported URL protocol: ${W.protocol}`)}}return J}function ck0($,Y){var X,G;let J=(X=Y==null?void 0:Y.tools)!=null?X:{},Q=[];for(let W=0;W<$.length;W++){let Z=$[W],K=W===$.length-1,{role:H,content:z,experimental_attachments:V}=Z;switch(H){case"system":{Q.push({role:"system",content:z});break}case"user":{if(Z.parts==null)Q.push({role:"user",content:V?[{type:"text",text:z},...hs1(V)]:z});else{let A=Z.parts.filter((F)=>F.type==="text").map((F)=>({type:"text",text:F.text}));Q.push({role:"user",content:V?[...A,...hs1(V)]:A})}break}case"assistant":{if(Z.parts!=null){let N=function(){let O=[];for(let M of B)switch(M.type){case"file":case"text":{O.push(M);break}case"reasoning":{for(let R of M.details)switch(R.type){case"text":O.push({type:"reasoning",text:R.text,signature:R.signature});break;case"redacted":O.push({type:"redacted-reasoning",data:R.data});break}break}case"tool-invocation":O.push({type:"tool-call",toolCallId:M.toolInvocation.toolCallId,toolName:M.toolInvocation.toolName,args:M.toolInvocation.args});break;default:throw Error(`Unsupported part: ${M}`)}Q.push({role:"assistant",content:O});let E=B.filter((M)=>M.type==="tool-invocation").map((M)=>M.toolInvocation);if(E.length>0)Q.push({role:"tool",content:E.map((M)=>{if(!("result"in M))throw new Mk0({originalMessage:Z,message:"ToolInvocation must have a result: "+JSON.stringify(M)});let{toolCallId:R,toolName:q,result:w}=M,I=J[q];return(I==null?void 0:I.experimental_toToolResultContent)!=null?{type:"tool-result",toolCallId:R,toolName:q,result:I.experimental_toToolResultContent(w),experimental_content:I.experimental_toToolResultContent(w)}:{type:"tool-result",toolCallId:R,toolName:q,result:w}})});B=[],L=!1,D++},D=0,L=!1,B=[];for(let O of Z.parts)switch(O.type){case"text":{if(L)N();B.push(O);break}case"file":case"reasoning":{B.push(O);break}case"tool-invocation":{if(((G=O.toolInvocation.step)!=null?G:0)!==D)N();B.push(O),L=!0;break}}N();break}let A=Z.toolInvocations;if(A==null||A.length===0){Q.push({role:"assistant",content:z});break}let F=A.reduce((N,D)=>{var L;return Math.max(N,(L=D.step)!=null?L:0)},0);for(let N=0;N<=F;N++){let D=A.filter((L)=>{var B;return((B=L.step)!=null?B:0)===N});if(D.length===0)continue;Q.push({role:"assistant",content:[...K&&z&&N===0?[{type:"text",text:z}]:[],...D.map(({toolCallId:L,toolName:B,args:O})=>({type:"tool-call",toolCallId:L,toolName:B,args:O}))]}),Q.push({role:"tool",content:D.map((L)=>{if(!("result"in L))throw new Mk0({originalMessage:Z,message:"ToolInvocation must have a result: "+JSON.stringify(L)});let{toolCallId:B,toolName:O,result:E}=L,M=J[O];return(M==null?void 0:M.experimental_toToolResultContent)!=null?{type:"tool-result",toolCallId:B,toolName:O,result:M.experimental_toToolResultContent(E),experimental_content:M.experimental_toToolResultContent(E)}:{type:"tool-result",toolCallId:B,toolName:O,result:E}})})}if(z&&!K)Q.push({role:"assistant",content:z});break}case"data":break;default:throw new Mk0({originalMessage:Z,message:`Unsupported role: ${H}`})}}return Q}function X_({prompt:$,tools:Y}){if($.prompt==null&&$.messages==null)throw new $D({prompt:$,message:"prompt or messages must be defined"});if($.prompt!=null&&$.messages!=null)throw new $D({prompt:$,message:"prompt and messages cannot be defined at the same time"});if($.system!=null&&typeof $.system!=="string")throw new $D({prompt:$,message:"system must be a string"});if($.prompt!=null){if(typeof $.prompt!=="string")throw new $D({prompt:$,message:"prompt must be a string"});return{type:"prompt",system:$.system,messages:[{role:"user",content:$.prompt}]}}if($.messages!=null){let G=I_8($.messages)==="ui-messages"?ck0($.messages,{tools:Y}):$.messages;if(G.length===0)throw new $D({prompt:$,message:"messages must not be empty"});let J=mO({value:G,schema:U.array(q_8)});if(!J.success)throw new $D({prompt:$,message:["message must be a CoreMessage or a UI message",`Validation error: ${J.error.message}`].join(`
`),cause:J.error});return{type:"messages",messages:G,system:$.system}}throw Error("unreachable")}function I_8($){if(!Array.isArray($))throw new $D({prompt:$,message:["messages must be an array of CoreMessage or UIMessage",`Received non-array value: ${JSON.stringify($)}`].join(`
`),cause:$});if($.length===0)return"messages";let Y=$.map(P_8);if(Y.some((G)=>G==="has-ui-specific-parts"))return"ui-messages";let X=Y.findIndex((G)=>G!=="has-core-specific-parts"&&G!=="message");if(X===-1)return"messages";throw new $D({prompt:$,message:["messages must be an array of CoreMessage or UIMessage",`Received message of type: "${Y[X]}" at index ${X}`,`messages[${X}]: ${JSON.stringify($[X])}`].join(`
`),cause:$})}function P_8($){if(typeof $==="object"&&$!==null&&($.role==="function"||$.role==="data"||("toolInvocations"in $)||("parts"in $)||("experimental_attachments"in $)))return"has-ui-specific-parts";else if(typeof $==="object"&&$!==null&&"content"in $&&(Array.isArray($.content)||("experimental_providerMetadata"in $)||("providerOptions"in $)))return"has-core-specific-parts";else if(typeof $==="object"&&$!==null&&"role"in $&&"content"in $&&typeof $.content==="string"&&["system","user","assistant","tool"].includes($.role))return"message";else return"other"}function pz({promptTokens:$,completionTokens:Y}){return{promptTokens:$,completionTokens:Y,totalTokens:$+Y}}function ao1($,Y){return{promptTokens:$.promptTokens+Y.promptTokens,completionTokens:$.completionTokens+Y.completionTokens,totalTokens:$.totalTokens+Y.totalTokens}}function sf({prompt:$,schema:Y,schemaPrefix:X=Y!=null?w_8:void 0,schemaSuffix:G=Y!=null?__8:j_8}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}function fO($){let Y=$.pipeThrough(new TransformStream);return Y[Symbol.asyncIterator]=()=>{let X=Y.getReader();return{async next(){let{done:G,value:J}=await X.read();return G?{done:!0,value:void 0}:{done:!1,value:J}}}},Y}function so1({output:$,schema:Y,enumValues:X}){switch($){case"object":return C_8(tw(Y));case"array":return S_8(tw(Y));case"enum":return k_8(X);case"no-schema":return T_8;default:throw Error(`Unsupported output: ${$}`)}}function oo1({output:$,mode:Y,schema:X,schemaName:G,schemaDescription:J,enumValues:Q}){if($!=null&&$!=="object"&&$!=="array"&&$!=="enum"&&$!=="no-schema")throw new _5({parameter:"output",value:$,message:"Invalid output type."});if($==="no-schema"){if(Y==="auto"||Y==="tool")throw new _5({parameter:"mode",value:Y,message:'Mode must be "json" for no-schema output.'});if(X!=null)throw new _5({parameter:"schema",value:X,message:"Schema is not supported for no-schema output."});if(J!=null)throw new _5({parameter:"schemaDescription",value:J,message:"Schema description is not supported for no-schema output."});if(G!=null)throw new _5({parameter:"schemaName",value:G,message:"Schema name is not supported for no-schema output."});if(Q!=null)throw new _5({parameter:"enumValues",value:Q,message:"Enum values are not supported for no-schema output."})}if($==="object"){if(X==null)throw new _5({parameter:"schema",value:X,message:"Schema is required for object output."});if(Q!=null)throw new _5({parameter:"enumValues",value:Q,message:"Enum values are not supported for object output."})}if($==="array"){if(X==null)throw new _5({parameter:"schema",value:X,message:"Element schema is required for array output."});if(Q!=null)throw new _5({parameter:"enumValues",value:Q,message:"Enum values are not supported for array output."})}if($==="enum"){if(X!=null)throw new _5({parameter:"schema",value:X,message:"Schema is not supported for enum output."});if(J!=null)throw new _5({parameter:"schemaDescription",value:J,message:"Schema description is not supported for enum output."});if(G!=null)throw new _5({parameter:"schemaName",value:G,message:"Schema name is not supported for enum output."});if(Q==null)throw new _5({parameter:"enumValues",value:Q,message:"Enum values are required for enum output."});for(let W of Q)if(typeof W!=="string")throw new _5({parameter:"enumValues",value:W,message:"Enum values must be strings."})}}function p60($){let Y=$.map((X)=>{return{...X,content:typeof X.content==="string"?X.content:X.content.map(v_8)}});return JSON.stringify(Y)}function v_8($){if($.type==="image")return{...$,image:$.image instanceof Uint8Array?dk0($.image):$.image};return $}async function to1({model:$,enum:Y,schema:X,schemaName:G,schemaDescription:J,mode:Q,output:W="object",system:Z,prompt:K,messages:H,maxRetries:z,abortSignal:V,headers:A,experimental_repairText:F,experimental_telemetry:N,experimental_providerMetadata:D,providerOptions:L=D,_internal:{generateId:B=x_8,currentDate:O=()=>new Date}={},...E}){if(typeof $==="string"||$.specificationVersion!=="v1")throw new f60;oo1({output:W,mode:Q,schema:X,schemaName:G,schemaDescription:J,enumValues:Y});let{maxRetries:M,retry:R}=g60({maxRetries:z}),q=so1({output:W,schema:X,enumValues:Y});if(q.type==="no-schema"&&Q===void 0)Q="json";let w=m60({model:$,telemetry:N,headers:A,settings:{...E,maxRetries:M}}),I=u60(N);return TK({name:"ai.generateObject",attributes:J$({telemetry:N,attributes:{...jK({operationId:"ai.generateObject",telemetry:N}),...w,"ai.prompt":{input:()=>JSON.stringify({system:Z,prompt:K,messages:H})},"ai.schema":q.jsonSchema!=null?{input:()=>JSON.stringify(q.jsonSchema)}:void 0,"ai.schema.name":G,"ai.schema.description":J,"ai.settings.output":q.type,"ai.settings.mode":Q}}),tracer:I,fn:async(P)=>{var _,C,k,S;if(Q==="auto"||Q==null)Q=$.defaultObjectGenerationMode;let T,v,x,y,d,u,b,g,p;switch(Q){case"json":{let t=X_({prompt:{system:q.jsonSchema==null?sf({prompt:Z}):$.supportsStructuredOutputs?Z:sf({prompt:Z,schema:q.jsonSchema}),prompt:K,messages:H},tools:void 0}),s=await $_({prompt:t,modelSupportsImageUrls:$.supportsImageUrls,modelSupportsUrl:(_=$.supportsUrl)==null?void 0:_.bind($)}),Z0=await R(()=>TK({name:"ai.generateObject.doGenerate",attributes:J$({telemetry:N,attributes:{...jK({operationId:"ai.generateObject.doGenerate",telemetry:N}),...w,"ai.prompt.format":{input:()=>t.type},"ai.prompt.messages":{input:()=>JSON.stringify(s)},"ai.settings.mode":Q,"gen_ai.system":$.provider,"gen_ai.request.model":$.modelId,"gen_ai.request.frequency_penalty":E.frequencyPenalty,"gen_ai.request.max_tokens":E.maxTokens,"gen_ai.request.presence_penalty":E.presencePenalty,"gen_ai.request.temperature":E.temperature,"gen_ai.request.top_k":E.topK,"gen_ai.request.top_p":E.topP}}),tracer:I,fn:async(X0)=>{var a,Q0,e,m,$0,Y0;let K0=await $.doGenerate({mode:{type:"object-json",schema:q.jsonSchema,name:G,description:J},...Y_(E),inputFormat:t.type,prompt:s,providerMetadata:L,abortSignal:V,headers:A}),A0={id:(Q0=(a=K0.response)==null?void 0:a.id)!=null?Q0:B(),timestamp:(m=(e=K0.response)==null?void 0:e.timestamp)!=null?m:O(),modelId:(Y0=($0=K0.response)==null?void 0:$0.modelId)!=null?Y0:$.modelId};if(K0.text===void 0)throw new dz({message:"No object generated: the model did not return a response.",response:A0,usage:pz(K0.usage),finishReason:K0.finishReason});return X0.setAttributes(J$({telemetry:N,attributes:{"ai.response.finishReason":K0.finishReason,"ai.response.object":{output:()=>K0.text},"ai.response.id":A0.id,"ai.response.model":A0.modelId,"ai.response.timestamp":A0.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(K0.providerMetadata),"ai.usage.promptTokens":K0.usage.promptTokens,"ai.usage.completionTokens":K0.usage.completionTokens,"gen_ai.response.finish_reasons":[K0.finishReason],"gen_ai.response.id":A0.id,"gen_ai.response.model":A0.modelId,"gen_ai.usage.prompt_tokens":K0.usage.promptTokens,"gen_ai.usage.completion_tokens":K0.usage.completionTokens}})),{...K0,objectText:K0.text,responseData:A0}}}));T=Z0.objectText,v=Z0.finishReason,x=Z0.usage,y=Z0.warnings,d=Z0.rawResponse,g=Z0.logprobs,p=Z0.providerMetadata,b=(C=Z0.request)!=null?C:{},u=Z0.responseData;break}case"tool":{let t=X_({prompt:{system:Z,prompt:K,messages:H},tools:void 0}),s=await $_({prompt:t,modelSupportsImageUrls:$.supportsImageUrls,modelSupportsUrl:(k=$.supportsUrl)==null?void 0:k.bind($)}),Z0=t.type,X0=await R(()=>TK({name:"ai.generateObject.doGenerate",attributes:J$({telemetry:N,attributes:{...jK({operationId:"ai.generateObject.doGenerate",telemetry:N}),...w,"ai.prompt.format":{input:()=>Z0},"ai.prompt.messages":{input:()=>p60(s)},"ai.settings.mode":Q,"gen_ai.system":$.provider,"gen_ai.request.model":$.modelId,"gen_ai.request.frequency_penalty":E.frequencyPenalty,"gen_ai.request.max_tokens":E.maxTokens,"gen_ai.request.presence_penalty":E.presencePenalty,"gen_ai.request.temperature":E.temperature,"gen_ai.request.top_k":E.topK,"gen_ai.request.top_p":E.topP}}),tracer:I,fn:async(a)=>{var Q0,e,m,$0,Y0,K0,A0,D0;let O0=await $.doGenerate({mode:{type:"object-tool",tool:{type:"function",name:G!=null?G:"json",description:J!=null?J:"Respond with a JSON object.",parameters:q.jsonSchema}},...Y_(E),inputFormat:Z0,prompt:s,providerMetadata:L,abortSignal:V,headers:A}),R0=(e=(Q0=O0.toolCalls)==null?void 0:Q0[0])==null?void 0:e.args,I0={id:($0=(m=O0.response)==null?void 0:m.id)!=null?$0:B(),timestamp:(K0=(Y0=O0.response)==null?void 0:Y0.timestamp)!=null?K0:O(),modelId:(D0=(A0=O0.response)==null?void 0:A0.modelId)!=null?D0:$.modelId};if(R0===void 0)throw new dz({message:"No object generated: the tool was not called.",response:I0,usage:pz(O0.usage),finishReason:O0.finishReason});return a.setAttributes(J$({telemetry:N,attributes:{"ai.response.finishReason":O0.finishReason,"ai.response.object":{output:()=>R0},"ai.response.id":I0.id,"ai.response.model":I0.modelId,"ai.response.timestamp":I0.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(O0.providerMetadata),"ai.usage.promptTokens":O0.usage.promptTokens,"ai.usage.completionTokens":O0.usage.completionTokens,"gen_ai.response.finish_reasons":[O0.finishReason],"gen_ai.response.id":I0.id,"gen_ai.response.model":I0.modelId,"gen_ai.usage.input_tokens":O0.usage.promptTokens,"gen_ai.usage.output_tokens":O0.usage.completionTokens}})),{...O0,objectText:R0,responseData:I0}}}));T=X0.objectText,v=X0.finishReason,x=X0.usage,y=X0.warnings,d=X0.rawResponse,g=X0.logprobs,p=X0.providerMetadata,b=(S=X0.request)!=null?S:{},u=X0.responseData;break}case void 0:throw Error("Model does not have a default object generation mode.");default:throw Error(`Unsupported mode: ${Q}`)}function h(t){let s=lf({text:t});if(!s.success)throw new dz({message:"No object generated: could not parse the response.",cause:s.error,text:t,response:u,usage:pz(x),finishReason:v});let Z0=q.validateFinalResult(s.value,{text:t,response:u,usage:pz(x)});if(!Z0.success)throw new dz({message:"No object generated: response did not match schema.",cause:Z0.error,text:t,response:u,usage:pz(x),finishReason:v});return Z0.value}let n;try{n=h(T)}catch(t){if(F!=null&&dz.isInstance(t)&&(qk0.isInstance(t.cause)||gO.isInstance(t.cause))){let s=await F({text:T,error:t.cause});if(s===null)throw t;n=h(s)}else throw t}return P.setAttributes(J$({telemetry:N,attributes:{"ai.response.finishReason":v,"ai.response.object":{output:()=>JSON.stringify(n)},"ai.usage.promptTokens":x.promptTokens,"ai.usage.completionTokens":x.completionTokens}})),new y_8({object:n,finishReason:v,usage:pz(x),warnings:y,request:b,response:{...u,headers:d==null?void 0:d.headers,body:d==null?void 0:d.body},logprobs:g,providerMetadata:p})}})}function fs1(){let $,Y;return{promise:new Promise((G,J)=>{$=G,Y=J}),resolve:$,reject:Y}}function eo1(){let $=[],Y=null,X=!1,G=fs1(),J=async()=>{if(X&&$.length===0){Y==null||Y.close();return}if($.length===0)return G=fs1(),await G.promise,J();try{let{value:Q,done:W}=await $[0].read();if(W){if($.shift(),$.length>0)await J();else if(X)Y==null||Y.close()}else Y==null||Y.enqueue(Q)}catch(Q){if(Y==null||Y.error(Q),$.shift(),X&&$.length===0)Y==null||Y.close()}};return{stream:new ReadableStream({start(Q){Y=Q},pull:J,async cancel(){for(let Q of $)await Q.cancel();$=[],X=!0}}),addStream:(Q)=>{if(X)throw Error("Cannot add inner stream: outer stream is closed");$.push(Q.getReader()),G.resolve()},close:()=>{if(X=!0,G.resolve(),$.length===0)Y==null||Y.close()},terminate:()=>{X=!0,G.resolve(),$.forEach((Q)=>Q.cancel()),$=[],Y==null||Y.close()}}}function $t1(){var $,Y;return(Y=($=globalThis==null?void 0:globalThis.performance)==null?void 0:$.now())!=null?Y:Date.now()}function Yt1({model:$,schema:Y,schemaName:X,schemaDescription:G,mode:J,output:Q="object",system:W,prompt:Z,messages:K,maxRetries:H,abortSignal:z,headers:V,experimental_telemetry:A,experimental_providerMetadata:F,providerOptions:N=F,onError:D,onFinish:L,_internal:{generateId:B=b_8,currentDate:O=()=>new Date,now:E=$t1}={},...M}){if(typeof $==="string"||$.specificationVersion!=="v1")throw new f60;oo1({output:Q,mode:J,schema:Y,schemaName:X,schemaDescription:G});let R=so1({output:Q,schema:Y});if(R.type==="no-schema"&&J===void 0)J="json";return new h_8({model:$,telemetry:A,headers:V,settings:M,maxRetries:H,abortSignal:z,outputStrategy:R,system:W,prompt:Z,messages:K,schemaName:X,schemaDescription:G,providerOptions:N,mode:J,onError:D,onFinish:L,generateId:B,currentDate:O,now:E})}function m_8($){return $!=null&&Object.keys($).length>0}function Ht1({tools:$,toolChoice:Y,activeTools:X}){if(!m_8($))return{tools:void 0,toolChoice:void 0};return{tools:(X!=null?Object.entries($).filter(([J])=>X.includes(J)):Object.entries($)).map(([J,Q])=>{let W=Q.type;switch(W){case void 0:case"function":return{type:"function",name:J,description:Q.description,parameters:tw(Q.parameters).jsonSchema};case"provider-defined":return{type:"provider-defined",name:J,id:Q.id,args:Q.args};default:throw Error(`Unsupported tool type: ${W}`)}}),toolChoice:Y==null?{type:"auto"}:typeof Y==="string"?{type:Y}:{type:"tool",toolName:Y.toolName}}}function zt1($){let Y=$.match(u_8);return Y?{prefix:Y[1],whitespace:Y[2],suffix:Y[3]}:void 0}function p_8($){let Y=zt1($);return Y?Y.prefix+Y.whitespace:$}async function Rt1({toolCall:$,tools:Y,repairToolCall:X,system:G,messages:J}){if(Y==null)throw new Sk0({toolName:$.toolName});try{return await gs1({toolCall:$,tools:Y})}catch(Q){if(X==null||!(Sk0.isInstance(Q)||Dt1.isInstance(Q)))throw Q;let W=null;try{W=await X({toolCall:$,tools:Y,parameterSchema:({toolName:Z})=>tw(Y[Z].parameters).jsonSchema,system:G,messages:J,error:Q})}catch(Z){throw new i_8({cause:Z,originalError:Q})}if(W==null)throw Q;return await gs1({toolCall:W,tools:Y})}}async function gs1({toolCall:$,tools:Y}){let X=$.toolName,G=Y[X];if(G==null)throw new Sk0({toolName:$.toolName,availableTools:Object.keys(Y)});let J=tw(G.parameters),Q=$.args.trim()===""?mO({value:{},schema:J}):lf({text:$.args,schema:J});if(Q.success===!1)throw new Dt1({toolName:X,toolArgs:$.args,cause:Q.error});return{type:"tool-call",toolCallId:$.toolCallId,toolName:X,args:Q.value}}function kk0($){let Y=$.filter((X)=>X.type==="text").map((X)=>X.text).join("");return Y.length>0?Y:void 0}function vk0({text:$="",files:Y,reasoning:X,tools:G,toolCalls:J,toolResults:Q,messageId:W,generateMessageId:Z}){let K=[],H=[];if(X.length>0)H.push(...X.map((z)=>z.type==="text"?{...z,type:"reasoning"}:{...z,type:"redacted-reasoning"}));if(Y.length>0)H.push(...Y.map((z)=>({type:"file",data:z.base64,mimeType:z.mimeType})));if($.length>0)H.push({type:"text",text:$});if(J.length>0)H.push(...J);if(H.length>0)K.push({role:"assistant",content:H,id:W});if(Q.length>0)K.push({role:"tool",id:Z(),content:Q.map((z)=>{let V=G[z.toolName];return(V==null?void 0:V.experimental_toToolResultContent)!=null?{type:"tool-result",toolCallId:z.toolCallId,toolName:z.toolName,result:V.experimental_toToolResultContent(z.result),experimental_content:V.experimental_toToolResultContent(z.result)}:{type:"tool-result",toolCallId:z.toolCallId,toolName:z.toolName,result:z.result}})});return K}async function qt1({model:$,tools:Y,toolChoice:X,system:G,prompt:J,messages:Q,maxRetries:W,abortSignal:Z,headers:K,maxSteps:H=1,experimental_generateMessageId:z=r_8,experimental_output:V,experimental_continueSteps:A=!1,experimental_telemetry:F,experimental_providerMetadata:N,providerOptions:D=N,experimental_activeTools:L,experimental_prepareStep:B,experimental_repairToolCall:O,_internal:{generateId:E=n_8,currentDate:M=()=>new Date}={},onStepFinish:R,...q}){var w;if(typeof $==="string"||$.specificationVersion!=="v1")throw new f60;if(H<1)throw new _5({parameter:"maxSteps",value:H,message:"maxSteps must be at least 1"});let{maxRetries:I,retry:P}=g60({maxRetries:W}),_=m60({model:$,telemetry:F,headers:K,settings:{...q,maxRetries:I}}),C=X_({prompt:{system:(w=V==null?void 0:V.injectIntoSystemPrompt({system:G,model:$}))!=null?w:G,prompt:J,messages:Q},tools:Y}),k=u60(F);return TK({name:"ai.generateText",attributes:J$({telemetry:F,attributes:{...jK({operationId:"ai.generateText",telemetry:F}),..._,"ai.model.provider":$.provider,"ai.model.id":$.modelId,"ai.prompt":{input:()=>JSON.stringify({system:G,prompt:J,messages:Q})},"ai.settings.maxSteps":H}}),tracer:k,fn:async(S)=>{var T,v,x,y,d,u,b,g,p,h,n,t,s,Z0;let X0=Y_(q),a,Q0=[],e=[],m=[],$0=0,Y0=[],K0="",A0=[],D0=[],O0={completionTokens:0,promptTokens:0,totalTokens:0},R0="initial";do{let I0=$0===0?C.type:"messages",g0=[...C.messages,...Y0],p0=await(B==null?void 0:B({model:$,steps:D0,maxSteps:H,stepNumber:$0})),U4=(T=p0==null?void 0:p0.toolChoice)!=null?T:X,P1=(v=p0==null?void 0:p0.experimental_activeTools)!=null?v:L,d1=(x=p0==null?void 0:p0.model)!=null?x:$,C0=await $_({prompt:{system:C.system,messages:g0},modelSupportsImageUrls:d1.supportsImageUrls,modelSupportsUrl:(y=d1.supportsUrl)==null?void 0:y.bind(d1)}),n0={type:"regular",...Ht1({tools:Y,toolChoice:U4,activeTools:P1})};a=await P(()=>TK({name:"ai.generateText.doGenerate",attributes:J$({telemetry:F,attributes:{...jK({operationId:"ai.generateText.doGenerate",telemetry:F}),..._,"ai.model.provider":d1.provider,"ai.model.id":d1.modelId,"ai.prompt.format":{input:()=>I0},"ai.prompt.messages":{input:()=>p60(C0)},"ai.prompt.tools":{input:()=>{var r4;return(r4=n0.tools)==null?void 0:r4.map((T6)=>JSON.stringify(T6))}},"ai.prompt.toolChoice":{input:()=>n0.toolChoice!=null?JSON.stringify(n0.toolChoice):void 0},"gen_ai.system":d1.provider,"gen_ai.request.model":d1.modelId,"gen_ai.request.frequency_penalty":q.frequencyPenalty,"gen_ai.request.max_tokens":q.maxTokens,"gen_ai.request.presence_penalty":q.presencePenalty,"gen_ai.request.stop_sequences":q.stopSequences,"gen_ai.request.temperature":q.temperature,"gen_ai.request.top_k":q.topK,"gen_ai.request.top_p":q.topP}}),tracer:k,fn:async(r4)=>{var T6,p6,n6,K1,Q4,C6;let t4=await d1.doGenerate({mode:n0,...X0,inputFormat:I0,responseFormat:V==null?void 0:V.responseFormat({model:$}),prompt:C0,providerMetadata:D,abortSignal:Z,headers:K}),a1={id:(p6=(T6=t4.response)==null?void 0:T6.id)!=null?p6:E(),timestamp:(K1=(n6=t4.response)==null?void 0:n6.timestamp)!=null?K1:M(),modelId:(C6=(Q4=t4.response)==null?void 0:Q4.modelId)!=null?C6:d1.modelId};return r4.setAttributes(J$({telemetry:F,attributes:{"ai.response.finishReason":t4.finishReason,"ai.response.text":{output:()=>t4.text},"ai.response.toolCalls":{output:()=>JSON.stringify(t4.toolCalls)},"ai.response.id":a1.id,"ai.response.model":a1.modelId,"ai.response.timestamp":a1.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(t4.providerMetadata),"ai.usage.promptTokens":t4.usage.promptTokens,"ai.usage.completionTokens":t4.usage.completionTokens,"gen_ai.response.finish_reasons":[t4.finishReason],"gen_ai.response.id":a1.id,"gen_ai.response.model":a1.modelId,"gen_ai.usage.input_tokens":t4.usage.promptTokens,"gen_ai.usage.output_tokens":t4.usage.completionTokens}})),{...t4,response:a1}}})),Q0=await Promise.all(((d=a.toolCalls)!=null?d:[]).map((r4)=>Rt1({toolCall:r4,tools:Y,repairToolCall:O,system:G,messages:g0}))),e=Y==null?[]:await a_8({toolCalls:Q0,tools:Y,tracer:k,telemetry:F,messages:g0,abortSignal:Z});let J0=pz(a.usage);O0=ao1(O0,J0);let B0="done";if(++$0<H){if(A&&a.finishReason==="length"&&Q0.length===0)B0="continue";else if(Q0.length>0&&e.length===Q0.length)B0="tool-result"}let Y1=(u=a.text)!=null?u:"",c1=R0==="continue"&&K0.trimEnd()!==K0?Y1.trimStart():Y1,C4=B0==="continue"?p_8(c1):c1;if(K0=B0==="continue"||R0==="continue"?K0+C4:C4,m=ms1(a.reasoning),A0.push(...(b=a.sources)!=null?b:[]),R0==="continue"){let r4=Y0[Y0.length-1];if(typeof r4.content==="string")r4.content+=C4;else r4.content.push({text:C4,type:"text"})}else Y0.push(...vk0({text:K0,files:Rk0(a.files),reasoning:ms1(a.reasoning),tools:Y!=null?Y:{},toolCalls:Q0,toolResults:e,messageId:z(),generateMessageId:z}));let c4={stepType:R0,text:C4,reasoning:kk0(m),reasoningDetails:m,files:Rk0(a.files),sources:(g=a.sources)!=null?g:[],toolCalls:Q0,toolResults:e,finishReason:a.finishReason,usage:J0,warnings:a.warnings,logprobs:a.logprobs,request:(p=a.request)!=null?p:{},response:{...a.response,headers:(h=a.rawResponse)==null?void 0:h.headers,body:(n=a.rawResponse)==null?void 0:n.body,messages:structuredClone(Y0)},providerMetadata:a.providerMetadata,experimental_providerMetadata:a.providerMetadata,isContinued:B0==="continue"};D0.push(c4),await(R==null?void 0:R(c4)),R0=B0}while(R0!=="done");return S.setAttributes(J$({telemetry:F,attributes:{"ai.response.finishReason":a.finishReason,"ai.response.text":{output:()=>a.text},"ai.response.toolCalls":{output:()=>JSON.stringify(a.toolCalls)},"ai.usage.promptTokens":a.usage.promptTokens,"ai.usage.completionTokens":a.usage.completionTokens,"ai.response.providerMetadata":JSON.stringify(a.providerMetadata)}})),new s_8({text:K0,files:Rk0(a.files),reasoning:kk0(m),reasoningDetails:m,sources:A0,outputResolver:()=>{if(V==null)throw new Qt1;return V.parseOutput({text:K0},{response:a.response,usage:O0,finishReason:a.finishReason})},toolCalls:Q0,toolResults:e,finishReason:a.finishReason,usage:O0,warnings:a.warnings,request:(t=a.request)!=null?t:{},response:{...a.response,headers:(s=a.rawResponse)==null?void 0:s.headers,body:(Z0=a.rawResponse)==null?void 0:Z0.body,messages:Y0},logprobs:a.logprobs,steps:D0,providerMetadata:a.providerMetadata})}})}async function a_8({toolCalls:$,tools:Y,tracer:X,telemetry:G,messages:J,abortSignal:Q}){return(await Promise.all($.map(async({toolCallId:Z,toolName:K,args:H})=>{let z=Y[K];if((z==null?void 0:z.execute)==null)return;let V=await TK({name:"ai.toolCall",attributes:J$({telemetry:G,attributes:{...jK({operationId:"ai.toolCall",telemetry:G}),"ai.toolCall.name":K,"ai.toolCall.id":Z,"ai.toolCall.args":{output:()=>JSON.stringify(H)}}}),tracer:X,fn:async(A)=>{try{let F=await z.execute(H,{toolCallId:Z,messages:J,abortSignal:Q});try{A.setAttributes(J$({telemetry:G,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(F)}}}))}catch(N){}return F}catch(F){throw pk0(A,F),new Ut1({toolCallId:Z,toolName:K,toolArgs:H,cause:F})}}});return{type:"tool-result",toolCallId:Z,toolName:K,args:H,result:V}}))).filter((Z)=>Z!=null)}function ms1($){if($==null)return[];if(typeof $==="string")return[{type:"text",text:$}];return $}function Rk0($){var Y;return(Y=$==null?void 0:$.map((X)=>new Co1(X)))!=null?Y:[]}function Yj8($){return $===void 0?[]:Array.isArray($)?$:[$]}async function Xj8({stream:$,onError:Y}){let X=$.getReader();try{while(!0){let{done:G}=await X.read();if(G)break}}catch(G){Y==null||Y(G)}finally{X.releaseLock()}}function lk0($,Y){let X=$.getReader(),G=Y.getReader(),J=void 0,Q=void 0,W=!1,Z=!1;async function K(z){try{if(J==null)J=X.read();let V=await J;if(J=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}async function H(z){try{if(Q==null)Q=G.read();let V=await Q;if(Q=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}return new ReadableStream({async pull(z){try{if(W){await H(z);return}if(Z){await K(z);return}if(J==null)J=X.read();if(Q==null)Q=G.read();let{result:V,reader:A}=await Promise.race([J.then((F)=>({result:F,reader:X})),Q.then((F)=>({result:F,reader:G}))]);if(!V.done)z.enqueue(V.value);if(A===X){if(J=void 0,V.done)await H(z),W=!0}else if(Q=void 0,V.done)Z=!0,await K(z)}catch(V){z.error(V)}},cancel(){X.cancel(),G.cancel()}})}function Gj8({tools:$,generatorStream:Y,toolCallStreaming:X,tracer:G,telemetry:J,system:Q,messages:W,abortSignal:Z,repairToolCall:K}){let H=null,z=new ReadableStream({start(B){H=B}}),V={},A=new Set,F=!1,N=void 0;function D(){if(F&&A.size===0){if(N!=null)H.enqueue(N);H.close()}}let L=new TransformStream({async transform(B,O){let E=B.type;switch(E){case"text-delta":case"reasoning":case"reasoning-signature":case"redacted-reasoning":case"source":case"response-metadata":case"error":{O.enqueue(B);break}case"file":{O.enqueue(new sw8({data:B.data,mimeType:B.mimeType}));break}case"tool-call-delta":{if(X){if(!V[B.toolCallId])O.enqueue({type:"tool-call-streaming-start",toolCallId:B.toolCallId,toolName:B.toolName}),V[B.toolCallId]=!0;O.enqueue({type:"tool-call-delta",toolCallId:B.toolCallId,toolName:B.toolName,argsTextDelta:B.argsTextDelta})}break}case"tool-call":{try{let M=await Rt1({toolCall:B,tools:$,repairToolCall:K,system:Q,messages:W});O.enqueue(M);let R=$[M.toolName];if(R.execute!=null){let q=rI8();A.add(q),TK({name:"ai.toolCall",attributes:J$({telemetry:J,attributes:{...jK({operationId:"ai.toolCall",telemetry:J}),"ai.toolCall.name":M.toolName,"ai.toolCall.id":M.toolCallId,"ai.toolCall.args":{output:()=>JSON.stringify(M.args)}}}),tracer:G,fn:async(w)=>R.execute(M.args,{toolCallId:M.toolCallId,messages:W,abortSignal:Z}).then((I)=>{H.enqueue({...M,type:"tool-result",result:I}),A.delete(q),D();try{w.setAttributes(J$({telemetry:J,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(I)}}}))}catch(P){}},(I)=>{pk0(w,I),H.enqueue({type:"error",error:new Ut1({toolCallId:M.toolCallId,toolName:M.toolName,toolArgs:M.args,cause:I})}),A.delete(q),D()})})}}catch(M){H.enqueue({type:"error",error:M})}break}case"finish":{N={type:"finish",finishReason:B.finishReason,logprobs:B.logprobs,usage:pz(B.usage),experimental_providerMetadata:B.providerMetadata};break}default:throw Error(`Unhandled chunk type: ${E}`)}},flush(){F=!0,D()}});return new ReadableStream({async start(B){return Promise.all([Y.pipeThrough(L).pipeTo(new WritableStream({write(O){B.enqueue(O)},close(){}})),z.pipeTo(new WritableStream({write(O){B.enqueue(O)},close(){B.close()}}))])}})}function _t1({model:$,tools:Y,toolChoice:X,system:G,prompt:J,messages:Q,maxRetries:W,abortSignal:Z,headers:K,maxSteps:H=1,experimental_generateMessageId:z=Qj8,experimental_output:V,experimental_continueSteps:A=!1,experimental_telemetry:F,experimental_providerMetadata:N,providerOptions:D=N,experimental_toolCallStreaming:L=!1,toolCallStreaming:B=L,experimental_activeTools:O,experimental_repairToolCall:E,experimental_transform:M,onChunk:R,onError:q,onFinish:w,onStepFinish:I,_internal:{now:P=$t1,generateId:_=Jj8,currentDate:C=()=>new Date}={},...k}){if(typeof $==="string"||$.specificationVersion!=="v1")throw new f60;return new Zj8({model:$,telemetry:F,headers:K,settings:k,maxRetries:W,abortSignal:Z,system:G,prompt:J,messages:Q,tools:Y,toolChoice:X,toolCallStreaming:B,transforms:Yj8(M),activeTools:O,repairToolCall:E,maxSteps:H,output:V,continueSteps:A,providerOptions:D,onChunk:R,onError:q,onFinish:w,onStepFinish:I,now:P,currentDate:C,generateId:_,generateMessageId:z})}function Wj8($){if(!$)return new TransformStream({transform(Q,W){W.enqueue({part:Q,partialOutput:void 0})}});let Y="",X="",G="";function J({controller:Q,partialOutput:W=void 0}){Q.enqueue({part:{type:"text-delta",textDelta:X},partialOutput:W}),X=""}return new TransformStream({transform(Q,W){if(Q.type==="step-finish")J({controller:W});if(Q.type!=="text-delta"){W.enqueue({part:Q,partialOutput:void 0});return}Y+=Q.textDelta,X+=Q.textDelta;let Z=$.parsePartial({text:Y});if(Z!=null){let K=JSON.stringify(Z.partial);if(K!==G)J({controller:W,partialOutput:Z.partial}),G=K}},flush(Q){if(X.length>0)J({controller:Q})}})}function Tt1($={}){let Y=new TextEncoder,X="";return new TransformStream({async start(){if($.onStart)await $.onStart()},async transform(G,J){if(J.enqueue(Y.encode(G)),X+=G,$.onToken)await $.onToken(G);if($.onText&&typeof G==="string")await $.onText(G)},async flush(){if($.onCompletion)await $.onCompletion(X);if($.onFinal)await $.onFinal(X)}})}function nk0($,Y){return $.pipeThrough(new TransformStream({transform:async(X,G)=>{var J;if(typeof X==="string"){G.enqueue(X);return}if("event"in X){if(X.event==="on_chat_model_stream")us1((J=X.data)==null?void 0:J.chunk,G);return}us1(X,G)}})).pipeThrough(Tt1(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(X,G)=>{G.enqueue(ZG("text",X))}}))}function qj8($,Y){return nk0($,Y).pipeThrough(new TextEncoderStream)}function Ij8($,Y){var X;let G=nk0($,Y==null?void 0:Y.callbacks).pipeThrough(new TextEncoderStream),J=Y==null?void 0:Y.data,Q=Y==null?void 0:Y.init,W=J?lk0(J.stream,G):G;return new Response(W,{status:(X=Q==null?void 0:Q.status)!=null?X:200,statusText:Q==null?void 0:Q.statusText,headers:ew(Q==null?void 0:Q.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function Pj8($,Y){Y.dataStream.merge(nk0($,Y.callbacks))}function us1($,Y){if(typeof $.content==="string")Y.enqueue($.content);else{let X=$.content;for(let G of X)if(G.type==="text")Y.enqueue(G.text)}}function rk0($,Y){let X=Cj8();return iI8($[Symbol.asyncIterator]()).pipeThrough(new TransformStream({async transform(G,J){J.enqueue(X(G.delta))}})).pipeThrough(Tt1(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(G,J)=>{J.enqueue(ZG("text",G))}}))}function _j8($,Y){return rk0($,Y).pipeThrough(new TextEncoderStream)}function jj8($,Y={}){var X;let{init:G,data:J,callbacks:Q}=Y,W=rk0($,Q).pipeThrough(new TextEncoderStream),Z=J?lk0(J.stream,W):W;return new Response(Z,{status:(X=G==null?void 0:G.status)!=null?X:200,statusText:G==null?void 0:G.statusText,headers:ew(G==null?void 0:G.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function Tj8($,Y){Y.dataStream.merge(rk0($,Y.callbacks))}function Cj8(){let $=!0;return(Y)=>{if($){if(Y=Y.trimStart(),Y)$=!1}return Y}}var PI8,ps1,wI8,ds1,_I8,jI8,TI8=($,Y)=>function(){return Y||(0,$[ds1($)[0]])((Y={exports:{}}).exports,Y),Y.exports},CI8=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of ds1(Y))if(!jI8.call($,J)&&J!==X)ps1($,J,{get:()=>Y[J],enumerable:!(G=wI8(Y,J))||G.enumerable})}return $},SI8=($,Y,X)=>(X=$!=null?PI8(_I8($)):{},CI8(ps1(X,"default",{value:$,enumerable:!0}),$)),kI8,cs1="vercel.ai.error",vI8,ls1,xI8,c6,is1="AI_APICallError",ns1,yI8,rs1,bI8,as1="AI_InvalidArgumentError",ss1,hI8,os1,fI8,ts1="AI_InvalidPromptError",es1,gI8,$o1,$D,Yo1="AI_JSONParseError",Xo1,mI8,Go1,qk0,Jo1="AI_TypeValidationError",Qo1,uI8,Wo1,pI8,gO,Zo1="AI_UnsupportedFunctionalityError",Ko1,dI8,Uo1,C60,cI8=($,Y=21)=>{return(X=Y)=>{let G="",J=X|0;while(J--)G+=$[Math.random()*$.length|0];return G}},lI8,uO=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=cI8(X,Y);if($==null)return J;if(X.includes(G))throw new fI8({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return(Q)=>`${$}${G}${J(Q)}`},rI8,k60,YP8,XP8,GP8,Cs1,JP8=($)=>typeof $==="string"?{...Cs1,name:$}:{...Cs1,...$},QP8=($)=>{let Y=JP8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,flags:{hasReferencedOpenAiAnyType:!1},currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},zo1=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},UP8=($,Y)=>{return H9($.innerType._def,Y)},HP8=($,Y)=>{let X={type:"integer",format:"unix-time"};if(Y.target==="openApi3")return X;for(let G of $.checks)switch(G.kind){case"min":l9(X,"minimum",G.value,G.message,Y);break;case"max":l9(X,"maximum",G.value,G.message,Y);break}return X},FP8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},Dk0=void 0,wK,LP8,v60,ks1=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>H9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},TP8=($,Y)=>{if(Y.currentPath.toString()===Y.propertyPath?.toString())return H9($.innerType._def,Y);let X=H9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return X?{anyOf:[{not:OQ(Y)},X]}:OQ(Y)},CP8=($,Y)=>{if(Y.pipeStrategy==="input")return H9($.in._def,Y);else if(Y.pipeStrategy==="output")return H9($.out._def,Y);let X=H9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=H9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},bP8=($,Y)=>{return H9($.innerType._def,Y)},hP8=($,Y,X)=>{switch(Y){case U0.ZodString:return Fo1($,X);case U0.ZodNumber:return PP8($,X);case U0.ZodObject:return wP8($,X);case U0.ZodBigInt:return ZP8($,X);case U0.ZodBoolean:return KP8();case U0.ZodDate:return Ao1($,X);case U0.ZodUndefined:return xP8(X);case U0.ZodNull:return RP8(X);case U0.ZodArray:return WP8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return qP8($,X);case U0.ZodIntersection:return DP8($,X);case U0.ZodTuple:return vP8($,X);case U0.ZodRecord:return Do1($,X);case U0.ZodLiteral:return NP8($,X);case U0.ZodEnum:return AP8($);case U0.ZodNativeEnum:return EP8($);case U0.ZodNullable:return IP8($,X);case U0.ZodOptional:return TP8($,X);case U0.ZodMap:return OP8($,X);case U0.ZodSet:return kP8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return SP8($,X);case U0.ZodNaN:case U0.ZodNever:return MP8(X);case U0.ZodEffects:return VP8($,X);case U0.ZodAny:return OQ(X);case U0.ZodUnknown:return yP8(X);case U0.ZodDefault:return zP8($,X);case U0.ZodBranded:return Vo1($,X);case U0.ZodReadonly:return bP8($,X);case U0.ZodCatch:return UP8($,X);case U0.ZodPipeline:return CP8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},fP8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:zo1(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),OQ(Y);return Y.$refStrategy==="seen"?OQ(Y):void 0}}},gP8=($,Y,X)=>{if($.description){if(X.description=$.description,Y.markdownDescription)X.markdownDescription=$.description}return X},mP8=($,Y)=>{let X=QP8(Y),G=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((K,[H,z])=>({...K,[H]:H9(z._def,{...X,currentPath:[...X.basePath,X.definitionPath,H]},!0)??OQ(X)}),{}):void 0,J=typeof Y==="string"?Y:Y?.nameStrategy==="title"?void 0:Y?.name,Q=H9($._def,J===void 0?X:{...X,currentPath:[...X.basePath,X.definitionPath,J]},!1)??OQ(X),W=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(W!==void 0)Q.title=W;if(X.flags.hasReferencedOpenAiAnyType){if(!G)G={};if(!G[X.openAiAnyTypeName])G[X.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:X.$refStrategy==="relative"?"1":[...X.basePath,X.definitionPath,X.openAiAnyTypeName].join("/")}}}let Z=J===void 0?G?{...Q,[X.definitionPath]:G}:Q:{$ref:[...X.$refStrategy==="relative"?[]:X.basePath,X.definitionPath,J].join("/"),[X.definitionPath]:{...G,[J]:Q}};if(X.target==="jsonSchema7")Z.$schema="http://json-schema.org/draft-07/schema#";else if(X.target==="jsonSchema2019-09"||X.target==="openAi")Z.$schema="https://json-schema.org/draft/2019-09/schema#";if(X.target==="openAi"&&(("anyOf"in Z)||("oneOf"in Z)||("allOf"in Z)||("type"in Z)&&Array.isArray(Z.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return Z},uP8,dP8,cP8,lP8,iP8,nP8,rP8,aP8,sP8,oP8,tP8,eP8,$w8,Yw8,Xw8,Gw8,Jw8,yk0,wk0,Kw8,hO="1.9.0",vs1,Hw8,zw8,nf,rf,Vw8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},Aw8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Fw8,CW,Nw8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},Lw8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Bw8="diag",y60,Ew8,Mw8,Rw8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},qw8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Iw8,Pw8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},ww8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Lk0="context",_w8,Lo1,_k0,Bo1="0000000000000000",Oo1="00000000000000000000000000000000",jw8,cf,fk0,kw8,vw8,Bk0,Ro1,fw8,gw8,mw8,uw8,xs1,b60,Ok0="trace",pw8,dw8,cw8,uk0=($,Y)=>{for(var X in Y)cw8($,X,{get:Y[X],enumerable:!0})},f60,qo1="AI_InvalidArgumentError",Io1,lw8,Po1,_5,wo1="AI_RetryError",_o1,iw8,jo1,ys1,nw8=({maxRetries:$=2,initialDelayInMs:Y=2000,backoffFactor:X=2}={})=>async(G)=>To1(G,{maxRetries:$,delayInMs:Y,backoffFactor:X}),rw8,T60,aw8,Co1=class{constructor({data:$,mimeType:Y}){let X=$ instanceof Uint8Array;this.base64Data=X?void 0:$,this.uint8ArrayData=X?$:void 0,this.mimeType=Y}get base64(){if(this.base64Data==null)this.base64Data=Pk0(this.uint8ArrayData);return this.base64Data}get uint8Array(){if(this.uint8ArrayData==null)this.uint8ArrayData=xk0(this.base64Data);return this.uint8ArrayData}},sw8,ow8,tw8=($)=>{let Y=typeof $==="string"?xk0($):$,X=(Y[6]&127)<<21|(Y[7]&127)<<14|(Y[8]&127)<<7|Y[9]&127;return Y.slice(X+10)},So1="AI_NoObjectGeneratedError",ko1,Y_8,vo1,dz,xo1="AI_DownloadError",yo1,X_8,bo1,Ek0,ho1="AI_InvalidDataContentError",fo1,J_8,go1,bs1,mo1,uo1="AI_InvalidMessageRoleError",po1,W_8,do1,Z_8,co1="AI_MessageConversionError",lo1,V_8,io1,Mk0,Ck0,Q$,A_8,no1,F_8,ro1,D_8,N_8,L_8,B_8,O_8,E_8,M_8,R_8,q_8,w_8="JSON schema:",__8="You MUST answer with a JSON object that matches the JSON schema above.",j_8="You MUST answer with JSON.",T_8,C_8=($)=>({type:"object",jsonSchema:$.jsonSchema,validatePartialResult({value:Y,textDelta:X}){return{success:!0,value:{partial:Y,textDelta:X}}},validateFinalResult(Y){return mO({value:Y,schema:$})},createElementStream(){throw new C60({functionality:"element streams in object mode"})}}),S_8=($)=>{let{$schema:Y,...X}=$.jsonSchema;return{type:"enum",jsonSchema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:X}},required:["elements"],additionalProperties:!1},validatePartialResult({value:G,latestObject:J,isFirstDelta:Q,isFinalDelta:W}){var Z;if(!Ik0(G)||!Ts1(G.elements))return{success:!1,error:new gO({value:G,cause:"value must be an object that contains an array of elements"})};let K=G.elements,H=[];for(let A=0;A<K.length;A++){let F=K[A],N=mO({value:F,schema:$});if(A===K.length-1&&!W)continue;if(!N.success)return N;H.push(N.value)}let z=(Z=J==null?void 0:J.length)!=null?Z:0,V="";if(Q)V+="[";if(z>0)V+=",";if(V+=H.slice(z).map((A)=>JSON.stringify(A)).join(","),W)V+="]";return{success:!0,value:{partial:H,textDelta:V}}},validateFinalResult(G){if(!Ik0(G)||!Ts1(G.elements))return{success:!1,error:new gO({value:G,cause:"value must be an object that contains an array of elements"})};let J=G.elements;for(let Q of J){let W=mO({value:Q,schema:$});if(!W.success)return W}return{success:!0,value:J}},createElementStream(G){let J=0;return fO(G.pipeThrough(new TransformStream({transform(Q,W){switch(Q.type){case"object":{let Z=Q.object;for(;J<Z.length;J++)W.enqueue(Z[J]);break}case"text-delta":case"finish":case"error":break;default:throw Error(`Unsupported chunk type: ${Q}`)}}})))}}},k_8=($)=>{return{type:"enum",jsonSchema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:$}},required:["result"],additionalProperties:!1},validateFinalResult(Y){if(!Ik0(Y)||typeof Y.result!=="string")return{success:!1,error:new gO({value:Y,cause:'value must be an object that contains a string in the "result" property.'})};let X=Y.result;return $.includes(X)?{success:!0,value:X}:{success:!1,error:new gO({value:Y,cause:"value must be a string in the enum"})}},validatePartialResult(){throw new C60({functionality:"partial results in enum mode"})},createElementStream(){throw new C60({functionality:"element streams in enum mode"})}}},x_8,y_8=class{constructor($){this.object=$.object,this.finishReason=$.finishReason,this.usage=$.usage,this.warnings=$.warnings,this.providerMetadata=$.providerMetadata,this.experimental_providerMetadata=$.providerMetadata,this.response=$.response,this.request=$.request,this.logprobs=$.logprobs}toJsonResponse($){var Y;return new Response(JSON.stringify(this.object),{status:(Y=$==null?void 0:$.status)!=null?Y:200,headers:ew($==null?void 0:$.headers,{contentType:"application/json; charset=utf-8"})})}},g$=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get value(){if(this.promise)return this.promise;return this.promise=new Promise(($,Y)=>{if(this.status.type==="resolved")$(this.status.value);else if(this.status.type==="rejected")Y(this.status.error);this._resolve=$,this._reject=Y}),this.promise}resolve($){var Y;if(this.status={type:"resolved",value:$},this.promise)(Y=this._resolve)==null||Y.call(this,$)}reject($){var Y;if(this.status={type:"rejected",error:$},this.promise)(Y=this._reject)==null||Y.call(this,$)}},b_8,h_8=class{constructor({model:$,headers:Y,telemetry:X,settings:G,maxRetries:J,abortSignal:Q,outputStrategy:W,system:Z,prompt:K,messages:H,schemaName:z,schemaDescription:V,providerOptions:A,mode:F,onError:N,onFinish:D,generateId:L,currentDate:B,now:O}){this.objectPromise=new g$,this.usagePromise=new g$,this.providerMetadataPromise=new g$,this.warningsPromise=new g$,this.requestPromise=new g$,this.responsePromise=new g$;let{maxRetries:E,retry:M}=g60({maxRetries:J}),R=m60({model:$,telemetry:X,headers:Y,settings:{...G,maxRetries:E}}),q=u60(X),w=this,I=eo1(),P=new TransformStream({transform(_,C){if(C.enqueue(_),_.type==="error")N==null||N({error:_.error})}});this.baseStream=I.stream.pipeThrough(P),TK({name:"ai.streamObject",attributes:J$({telemetry:X,attributes:{...jK({operationId:"ai.streamObject",telemetry:X}),...R,"ai.prompt":{input:()=>JSON.stringify({system:Z,prompt:K,messages:H})},"ai.schema":W.jsonSchema!=null?{input:()=>JSON.stringify(W.jsonSchema)}:void 0,"ai.schema.name":z,"ai.schema.description":V,"ai.settings.output":W.type,"ai.settings.mode":F}}),tracer:q,endWhenDone:!1,fn:async(_)=>{var C,k;if(F==="auto"||F==null)F=$.defaultObjectGenerationMode;let S,T;switch(F){case"json":{let Y0=X_({prompt:{system:W.jsonSchema==null?sf({prompt:Z}):$.supportsStructuredOutputs?Z:sf({prompt:Z,schema:W.jsonSchema}),prompt:K,messages:H},tools:void 0});S={mode:{type:"object-json",schema:W.jsonSchema,name:z,description:V},...Y_(G),inputFormat:Y0.type,prompt:await $_({prompt:Y0,modelSupportsImageUrls:$.supportsImageUrls,modelSupportsUrl:(C=$.supportsUrl)==null?void 0:C.bind($)}),providerMetadata:A,abortSignal:Q,headers:Y},T={transform:(K0,A0)=>{switch(K0.type){case"text-delta":A0.enqueue(K0.textDelta);break;case"response-metadata":case"finish":case"error":A0.enqueue(K0);break}}};break}case"tool":{let Y0=X_({prompt:{system:Z,prompt:K,messages:H},tools:void 0});S={mode:{type:"object-tool",tool:{type:"function",name:z!=null?z:"json",description:V!=null?V:"Respond with a JSON object.",parameters:W.jsonSchema}},...Y_(G),inputFormat:Y0.type,prompt:await $_({prompt:Y0,modelSupportsImageUrls:$.supportsImageUrls,modelSupportsUrl:(k=$.supportsUrl)==null?void 0:k.bind($)}),providerMetadata:A,abortSignal:Q,headers:Y},T={transform(K0,A0){switch(K0.type){case"tool-call-delta":A0.enqueue(K0.argsTextDelta);break;case"response-metadata":case"finish":case"error":A0.enqueue(K0);break}}};break}case void 0:throw Error("Model does not have a default object generation mode.");default:throw Error(`Unsupported mode: ${F}`)}let{result:{stream:v,warnings:x,rawResponse:y,request:d},doStreamSpan:u,startTimestampMs:b}=await M(()=>TK({name:"ai.streamObject.doStream",attributes:J$({telemetry:X,attributes:{...jK({operationId:"ai.streamObject.doStream",telemetry:X}),...R,"ai.prompt.format":{input:()=>S.inputFormat},"ai.prompt.messages":{input:()=>p60(S.prompt)},"ai.settings.mode":F,"gen_ai.system":$.provider,"gen_ai.request.model":$.modelId,"gen_ai.request.frequency_penalty":G.frequencyPenalty,"gen_ai.request.max_tokens":G.maxTokens,"gen_ai.request.presence_penalty":G.presencePenalty,"gen_ai.request.temperature":G.temperature,"gen_ai.request.top_k":G.topK,"gen_ai.request.top_p":G.topP}}),tracer:q,endWhenDone:!1,fn:async(Y0)=>({startTimestampMs:O(),doStreamSpan:Y0,result:await $.doStream(S)})}));w.requestPromise.resolve(d!=null?d:{});let g,p,h,n,t,s="",Z0="",X0={id:L(),timestamp:B(),modelId:$.modelId},a=void 0,Q0=void 0,e=!0,m=!0,$0=v.pipeThrough(new TransformStream(T)).pipeThrough(new TransformStream({async transform(Y0,K0){var A0,D0,O0;if(e){let R0=O()-b;e=!1,u.addEvent("ai.stream.firstChunk",{"ai.stream.msToFirstChunk":R0}),u.setAttributes({"ai.stream.msToFirstChunk":R0})}if(typeof Y0==="string"){s+=Y0,Z0+=Y0;let{value:R0,state:I0}=No1(s);if(R0!==void 0&&!x60(a,R0)){let g0=W.validatePartialResult({value:R0,textDelta:Z0,latestObject:Q0,isFirstDelta:m,isFinalDelta:I0==="successful-parse"});if(g0.success&&!x60(Q0,g0.value.partial))a=R0,Q0=g0.value.partial,K0.enqueue({type:"object",object:Q0}),K0.enqueue({type:"text-delta",textDelta:g0.value.textDelta}),Z0="",m=!1}return}switch(Y0.type){case"response-metadata":{X0={id:(A0=Y0.id)!=null?A0:X0.id,timestamp:(D0=Y0.timestamp)!=null?D0:X0.timestamp,modelId:(O0=Y0.modelId)!=null?O0:X0.modelId};break}case"finish":{if(Z0!=="")K0.enqueue({type:"text-delta",textDelta:Z0});p=Y0.finishReason,g=pz(Y0.usage),h=Y0.providerMetadata,K0.enqueue({...Y0,usage:g,response:X0}),w.usagePromise.resolve(g),w.providerMetadataPromise.resolve(h),w.responsePromise.resolve({...X0,headers:y==null?void 0:y.headers});let R0=W.validateFinalResult(a,{text:s,response:X0,usage:g});if(R0.success)n=R0.value,w.objectPromise.resolve(n);else t=new dz({message:"No object generated: response did not match schema.",cause:R0.error,text:s,response:X0,usage:g,finishReason:p}),w.objectPromise.reject(t);break}default:{K0.enqueue(Y0);break}}},async flush(Y0){try{let K0=g!=null?g:{promptTokens:NaN,completionTokens:NaN,totalTokens:NaN};u.setAttributes(J$({telemetry:X,attributes:{"ai.response.finishReason":p,"ai.response.object":{output:()=>JSON.stringify(n)},"ai.response.id":X0.id,"ai.response.model":X0.modelId,"ai.response.timestamp":X0.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(h),"ai.usage.promptTokens":K0.promptTokens,"ai.usage.completionTokens":K0.completionTokens,"gen_ai.response.finish_reasons":[p],"gen_ai.response.id":X0.id,"gen_ai.response.model":X0.modelId,"gen_ai.usage.input_tokens":K0.promptTokens,"gen_ai.usage.output_tokens":K0.completionTokens}})),u.end(),_.setAttributes(J$({telemetry:X,attributes:{"ai.usage.promptTokens":K0.promptTokens,"ai.usage.completionTokens":K0.completionTokens,"ai.response.object":{output:()=>JSON.stringify(n)},"ai.response.providerMetadata":JSON.stringify(h)}})),await(D==null?void 0:D({usage:K0,object:n,error:t,response:{...X0,headers:y==null?void 0:y.headers},warnings:x,providerMetadata:h,experimental_providerMetadata:h}))}catch(K0){Y0.enqueue({type:"error",error:K0})}finally{_.end()}}}));I.addStream($0)}}).catch((_)=>{I.addStream(new ReadableStream({start(C){C.enqueue({type:"error",error:_}),C.close()}}))}).finally(()=>{I.close()}),this.outputStrategy=W}get object(){return this.objectPromise.value}get usage(){return this.usagePromise.value}get experimental_providerMetadata(){return this.providerMetadataPromise.value}get providerMetadata(){return this.providerMetadataPromise.value}get warnings(){return this.warningsPromise.value}get request(){return this.requestPromise.value}get response(){return this.responsePromise.value}get partialObjectStream(){return fO(this.baseStream.pipeThrough(new TransformStream({transform($,Y){switch($.type){case"object":Y.enqueue($.object);break;case"text-delta":case"finish":case"error":break;default:throw Error(`Unsupported chunk type: ${$}`)}}})))}get elementStream(){return this.outputStrategy.createElementStream(this.baseStream)}get textStream(){return fO(this.baseStream.pipeThrough(new TransformStream({transform($,Y){switch($.type){case"text-delta":Y.enqueue($.textDelta);break;case"object":case"finish":case"error":break;default:throw Error(`Unsupported chunk type: ${$}`)}}})))}get fullStream(){return fO(this.baseStream)}pipeTextStreamToResponse($,Y){Tk0({response:$,status:Y==null?void 0:Y.status,statusText:Y==null?void 0:Y.statusText,headers:jk0(Y==null?void 0:Y.headers,{contentType:"text/plain; charset=utf-8"}),stream:this.textStream.pipeThrough(new TextEncoderStream)})}toTextStreamResponse($){var Y;return new Response(this.textStream.pipeThrough(new TextEncoderStream),{status:(Y=$==null?void 0:$.status)!=null?Y:200,headers:ew($==null?void 0:$.headers,{contentType:"text/plain; charset=utf-8"})})}},Xt1="AI_NoOutputSpecifiedError",Gt1,f_8,Jt1,Qt1,Wt1="AI_ToolExecutionError",Zt1,g_8,Kt1,Ut1,u_8,Vt1="AI_InvalidToolArgumentsError",At1,d_8,Ft1,Dt1,Nt1="AI_NoSuchToolError",Lt1,c_8,Bt1,Sk0,Ot1="AI_ToolCallRepairError",Et1,l_8,Mt1,i_8,n_8,r_8,s_8=class{constructor($){this.text=$.text,this.files=$.files,this.reasoning=$.reasoning,this.reasoningDetails=$.reasoningDetails,this.toolCalls=$.toolCalls,this.toolResults=$.toolResults,this.finishReason=$.finishReason,this.usage=$.usage,this.warnings=$.warnings,this.request=$.request,this.response=$.response,this.steps=$.steps,this.experimental_providerMetadata=$.providerMetadata,this.providerMetadata=$.providerMetadata,this.logprobs=$.logprobs,this.outputResolver=$.outputResolver,this.sources=$.sources}get experimental_output(){return this.outputResolver()}},d60,It1="AI_InvalidStreamPartError",Pt1,o_8,wt1,t_8,e_8=()=>({type:"text",responseFormat:()=>({type:"text"}),injectIntoSystemPrompt({system:$}){return $},parsePartial({text:$}){return{partial:$}},parseOutput({text:$}){return $}}),$j8=({schema:$})=>{let Y=tw($);return{type:"object",responseFormat:({model:X})=>({type:"json",schema:X.supportsStructuredOutputs?Y.jsonSchema:void 0}),injectIntoSystemPrompt({system:X,model:G}){return G.supportsStructuredOutputs?X:sf({prompt:X,schema:Y.jsonSchema})},parsePartial({text:X}){let G=No1(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:G.value};default:{let J=G.state;throw Error(`Unsupported parse state: ${J}`)}}},parseOutput({text:X},G){let J=lf({text:X});if(!J.success)throw new dz({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});let Q=mO({value:J.value,schema:Y});if(!Q.success)throw new dz({message:"No object generated: response did not match schema.",cause:Q.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return Q.value}}},Jj8,Qj8,Zj8=class{constructor({model:$,telemetry:Y,headers:X,settings:G,maxRetries:J,abortSignal:Q,system:W,prompt:Z,messages:K,tools:H,toolChoice:z,toolCallStreaming:V,transforms:A,activeTools:F,repairToolCall:N,maxSteps:D,output:L,continueSteps:B,providerOptions:O,now:E,currentDate:M,generateId:R,generateMessageId:q,onChunk:w,onError:I,onFinish:P,onStepFinish:_}){this.warningsPromise=new g$,this.usagePromise=new g$,this.finishReasonPromise=new g$,this.providerMetadataPromise=new g$,this.textPromise=new g$,this.reasoningPromise=new g$,this.reasoningDetailsPromise=new g$,this.sourcesPromise=new g$,this.filesPromise=new g$,this.toolCallsPromise=new g$,this.toolResultsPromise=new g$,this.requestPromise=new g$,this.responsePromise=new g$,this.stepsPromise=new g$;var C;if(D<1)throw new _5({parameter:"maxSteps",value:D,message:"maxSteps must be at least 1"});this.output=L;let k="",S="",T="",v=[],x=[],y=void 0,d=[],u=[],b={id:R(),timestamp:M(),modelId:$.modelId,messages:[]},g=[],p=[],h=void 0,n=void 0,t="initial",s=[],Z0,X0=new TransformStream({async transform(D0,O0){O0.enqueue(D0);let{part:R0}=D0;if(R0.type==="text-delta"||R0.type==="reasoning"||R0.type==="source"||R0.type==="tool-call"||R0.type==="tool-result"||R0.type==="tool-call-streaming-start"||R0.type==="tool-call-delta")await(w==null?void 0:w({chunk:R0}));if(R0.type==="error")await(I==null?void 0:I({error:R0.error}));if(R0.type==="text-delta")k+=R0.textDelta,S+=R0.textDelta,T+=R0.textDelta;if(R0.type==="reasoning")if(y==null)y={type:"text",text:R0.textDelta},v.push(y);else y.text+=R0.textDelta;if(R0.type==="reasoning-signature"){if(y==null)throw new c6({name:"InvalidStreamPart",message:"reasoning-signature without reasoning"});y.signature=R0.signature,y=void 0}if(R0.type==="redacted-reasoning")v.push({type:"redacted",data:R0.data});if(R0.type==="file")x.push(R0);if(R0.type==="source")u.push(R0.source),d.push(R0.source);if(R0.type==="tool-call")g.push(R0);if(R0.type==="tool-result")p.push(R0);if(R0.type==="step-finish"){let I0=vk0({text:S,files:x,reasoning:v,tools:H!=null?H:{},toolCalls:g,toolResults:p,messageId:R0.messageId,generateMessageId:q}),g0=s.length,p0="done";if(g0+1<D){if(B&&R0.finishReason==="length"&&g.length===0)p0="continue";else if(g.length>0&&p.length===g.length)p0="tool-result"}let U4={stepType:t,text:k,reasoning:kk0(v),reasoningDetails:v,files:x,sources:d,toolCalls:g,toolResults:p,finishReason:R0.finishReason,usage:R0.usage,warnings:R0.warnings,logprobs:R0.logprobs,request:R0.request,response:{...R0.response,messages:[...b.messages,...I0]},providerMetadata:R0.experimental_providerMetadata,experimental_providerMetadata:R0.experimental_providerMetadata,isContinued:R0.isContinued};if(await(_==null?void 0:_(U4)),s.push(U4),g=[],p=[],k="",d=[],v=[],x=[],y=void 0,p0!=="done")t=p0;if(p0!=="continue")b.messages.push(...I0),S=""}if(R0.type==="finish")b.id=R0.response.id,b.timestamp=R0.response.timestamp,b.modelId=R0.response.modelId,b.headers=R0.response.headers,n=R0.usage,h=R0.finishReason},async flush(D0){var O0;try{if(s.length===0)return;let R0=s[s.length-1];A0.warningsPromise.resolve(R0.warnings),A0.requestPromise.resolve(R0.request),A0.responsePromise.resolve(R0.response),A0.toolCallsPromise.resolve(R0.toolCalls),A0.toolResultsPromise.resolve(R0.toolResults),A0.providerMetadataPromise.resolve(R0.experimental_providerMetadata),A0.reasoningPromise.resolve(R0.reasoning),A0.reasoningDetailsPromise.resolve(R0.reasoningDetails);let I0=h!=null?h:"unknown",g0=n!=null?n:{completionTokens:NaN,promptTokens:NaN,totalTokens:NaN};A0.finishReasonPromise.resolve(I0),A0.usagePromise.resolve(g0),A0.textPromise.resolve(T),A0.sourcesPromise.resolve(u),A0.filesPromise.resolve(R0.files),A0.stepsPromise.resolve(s),await(P==null?void 0:P({finishReason:I0,logprobs:void 0,usage:g0,text:T,reasoning:R0.reasoning,reasoningDetails:R0.reasoningDetails,files:R0.files,sources:R0.sources,toolCalls:R0.toolCalls,toolResults:R0.toolResults,request:(O0=R0.request)!=null?O0:{},response:R0.response,warnings:R0.warnings,providerMetadata:R0.providerMetadata,experimental_providerMetadata:R0.experimental_providerMetadata,steps:s})),Z0.setAttributes(J$({telemetry:Y,attributes:{"ai.response.finishReason":I0,"ai.response.text":{output:()=>T},"ai.response.toolCalls":{output:()=>{var p0;return((p0=R0.toolCalls)==null?void 0:p0.length)?JSON.stringify(R0.toolCalls):void 0}},"ai.usage.promptTokens":g0.promptTokens,"ai.usage.completionTokens":g0.completionTokens,"ai.response.providerMetadata":JSON.stringify(R0.providerMetadata)}}))}catch(R0){D0.error(R0)}finally{Z0.end()}}}),a=eo1();this.addStream=a.addStream,this.closeStream=a.close;let Q0=a.stream;for(let D0 of A)Q0=Q0.pipeThrough(D0({tools:H,stopStream(){a.terminate()}}));this.baseStream=Q0.pipeThrough(Wj8(L)).pipeThrough(X0);let{maxRetries:e,retry:m}=g60({maxRetries:J}),$0=u60(Y),Y0=m60({model:$,telemetry:Y,headers:X,settings:{...G,maxRetries:e}}),K0=X_({prompt:{system:(C=L==null?void 0:L.injectIntoSystemPrompt({system:W,model:$}))!=null?C:W,prompt:Z,messages:K},tools:H}),A0=this;TK({name:"ai.streamText",attributes:J$({telemetry:Y,attributes:{...jK({operationId:"ai.streamText",telemetry:Y}),...Y0,"ai.prompt":{input:()=>JSON.stringify({system:W,prompt:Z,messages:K})},"ai.settings.maxSteps":D}}),tracer:$0,endWhenDone:!1,fn:async(D0)=>{Z0=D0;async function O0({currentStep:R0,responseMessages:I0,usage:g0,stepType:p0,previousStepText:U4,hasLeadingWhitespace:P1,messageId:d1}){var C0;let n0=I0.length===0?K0.type:"messages",J0=[...K0.messages,...I0],B0=await $_({prompt:{system:K0.system,messages:J0},modelSupportsImageUrls:$.supportsImageUrls,modelSupportsUrl:(C0=$.supportsUrl)==null?void 0:C0.bind($)}),Y1={type:"regular",...Ht1({tools:H,toolChoice:z,activeTools:F})},{result:{stream:c1,warnings:C4,rawResponse:c4,request:r4},doStreamSpan:T6,startTimestampMs:p6}=await m(()=>TK({name:"ai.streamText.doStream",attributes:J$({telemetry:Y,attributes:{...jK({operationId:"ai.streamText.doStream",telemetry:Y}),...Y0,"ai.prompt.format":{input:()=>n0},"ai.prompt.messages":{input:()=>p60(B0)},"ai.prompt.tools":{input:()=>{var Q1;return(Q1=Y1.tools)==null?void 0:Q1.map((C1)=>JSON.stringify(C1))}},"ai.prompt.toolChoice":{input:()=>Y1.toolChoice!=null?JSON.stringify(Y1.toolChoice):void 0},"gen_ai.system":$.provider,"gen_ai.request.model":$.modelId,"gen_ai.request.frequency_penalty":G.frequencyPenalty,"gen_ai.request.max_tokens":G.maxTokens,"gen_ai.request.presence_penalty":G.presencePenalty,"gen_ai.request.stop_sequences":G.stopSequences,"gen_ai.request.temperature":G.temperature,"gen_ai.request.top_k":G.topK,"gen_ai.request.top_p":G.topP}}),tracer:$0,endWhenDone:!1,fn:async(Q1)=>({startTimestampMs:E(),doStreamSpan:Q1,result:await $.doStream({mode:Y1,...Y_(G),inputFormat:n0,responseFormat:L==null?void 0:L.responseFormat({model:$}),prompt:B0,providerMetadata:O,abortSignal:Q,headers:X})})})),n6=Gj8({tools:H,generatorStream:c1,toolCallStreaming:V,tracer:$0,telemetry:Y,system:W,messages:J0,repairToolCall:N,abortSignal:Q}),K1=r4!=null?r4:{},Q4=[],C6=[],t4=[],a1=[],A1=void 0,T1="unknown",R4={promptTokens:0,completionTokens:0,totalTokens:0},w4,A6=!0,K4="",b4=p0==="continue"?U4:"",N0,f0={id:R(),timestamp:M(),modelId:$.modelId},a0="",c0=!1,F1=!0,E1=!1;async function l4({controller:Q1,chunk:C1}){Q1.enqueue(C1),K4+=C1.textDelta,b4+=C1.textDelta,c0=!0,E1=C1.textDelta.trimEnd()!==C1.textDelta}A0.addStream(n6.pipeThrough(new TransformStream({async transform(Q1,C1){var f4,O6,J9;if(A6){let Y4=E()-p6;A6=!1,T6.addEvent("ai.stream.firstChunk",{"ai.response.msToFirstChunk":Y4}),T6.setAttributes({"ai.response.msToFirstChunk":Y4}),C1.enqueue({type:"step-start",messageId:d1,request:K1,warnings:C4!=null?C4:[]})}if(Q1.type==="text-delta"&&Q1.textDelta.length===0)return;let o$=Q1.type;switch(o$){case"text-delta":{if(B){let Y4=F1&&P1?Q1.textDelta.trimStart():Q1.textDelta;if(Y4.length===0)break;F1=!1,a0+=Y4;let i4=zt1(a0);if(i4!=null)a0=i4.suffix,await l4({controller:C1,chunk:{type:"text-delta",textDelta:i4.prefix+i4.whitespace}})}else await l4({controller:C1,chunk:Q1});break}case"reasoning":{if(C1.enqueue(Q1),A1==null)A1={type:"text",text:Q1.textDelta},t4.push(A1);else A1.text+=Q1.textDelta;break}case"reasoning-signature":{if(C1.enqueue(Q1),A1==null)throw new t_8({chunk:Q1,message:"reasoning-signature without reasoning"});A1.signature=Q1.signature,A1=void 0;break}case"redacted-reasoning":{C1.enqueue(Q1),t4.push({type:"redacted",data:Q1.data});break}case"tool-call":{C1.enqueue(Q1),Q4.push(Q1);break}case"tool-result":{C1.enqueue(Q1),C6.push(Q1);break}case"response-metadata":{f0={id:(f4=Q1.id)!=null?f4:f0.id,timestamp:(O6=Q1.timestamp)!=null?O6:f0.timestamp,modelId:(J9=Q1.modelId)!=null?J9:f0.modelId};break}case"finish":{R4=Q1.usage,T1=Q1.finishReason,w4=Q1.experimental_providerMetadata,N0=Q1.logprobs;let Y4=E()-p6;T6.addEvent("ai.stream.finish"),T6.setAttributes({"ai.response.msToFinish":Y4,"ai.response.avgCompletionTokensPerSecond":1000*R4.completionTokens/Y4});break}case"file":{a1.push(Q1),C1.enqueue(Q1);break}case"source":case"tool-call-streaming-start":case"tool-call-delta":{C1.enqueue(Q1);break}case"error":{C1.enqueue(Q1),T1="error";break}default:throw Error(`Unknown chunk type: ${o$}`)}},async flush(Q1){let C1=Q4.length>0?JSON.stringify(Q4):void 0,f4="done";if(R0+1<D){if(B&&T1==="length"&&Q4.length===0)f4="continue";else if(Q4.length>0&&C6.length===Q4.length)f4="tool-result"}if(B&&a0.length>0&&(f4!=="continue"||p0==="continue"&&!c0))await l4({controller:Q1,chunk:{type:"text-delta",textDelta:a0}}),a0="";try{T6.setAttributes(J$({telemetry:Y,attributes:{"ai.response.finishReason":T1,"ai.response.text":{output:()=>K4},"ai.response.toolCalls":{output:()=>C1},"ai.response.id":f0.id,"ai.response.model":f0.modelId,"ai.response.timestamp":f0.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(w4),"ai.usage.promptTokens":R4.promptTokens,"ai.usage.completionTokens":R4.completionTokens,"gen_ai.response.finish_reasons":[T1],"gen_ai.response.id":f0.id,"gen_ai.response.model":f0.modelId,"gen_ai.usage.input_tokens":R4.promptTokens,"gen_ai.usage.output_tokens":R4.completionTokens}}))}catch(J9){}finally{T6.end()}Q1.enqueue({type:"step-finish",finishReason:T1,usage:R4,providerMetadata:w4,experimental_providerMetadata:w4,logprobs:N0,request:K1,response:{...f0,headers:c4==null?void 0:c4.headers},warnings:C4,isContinued:f4==="continue",messageId:d1});let O6=ao1(g0,R4);if(f4==="done")Q1.enqueue({type:"finish",finishReason:T1,usage:O6,providerMetadata:w4,experimental_providerMetadata:w4,logprobs:N0,response:{...f0,headers:c4==null?void 0:c4.headers}}),A0.closeStream();else{if(p0==="continue"){let J9=I0[I0.length-1];if(typeof J9.content==="string")J9.content+=K4;else J9.content.push({text:K4,type:"text"})}else I0.push(...vk0({text:K4,files:a1,reasoning:t4,tools:H!=null?H:{},toolCalls:Q4,toolResults:C6,messageId:d1,generateMessageId:q}));await O0({currentStep:R0+1,responseMessages:I0,usage:O6,stepType:f4,previousStepText:b4,hasLeadingWhitespace:E1,messageId:f4==="continue"?d1:q()})}}})))}await O0({currentStep:0,responseMessages:[],usage:{promptTokens:0,completionTokens:0,totalTokens:0},previousStepText:"",stepType:"initial",hasLeadingWhitespace:!1,messageId:q()})}}).catch((D0)=>{A0.addStream(new ReadableStream({start(O0){O0.enqueue({type:"error",error:D0}),O0.close()}})),A0.closeStream()})}get warnings(){return this.warningsPromise.value}get usage(){return this.usagePromise.value}get finishReason(){return this.finishReasonPromise.value}get experimental_providerMetadata(){return this.providerMetadataPromise.value}get providerMetadata(){return this.providerMetadataPromise.value}get text(){return this.textPromise.value}get reasoning(){return this.reasoningPromise.value}get reasoningDetails(){return this.reasoningDetailsPromise.value}get sources(){return this.sourcesPromise.value}get files(){return this.filesPromise.value}get toolCalls(){return this.toolCallsPromise.value}get toolResults(){return this.toolResultsPromise.value}get request(){return this.requestPromise.value}get response(){return this.responsePromise.value}get steps(){return this.stepsPromise.value}teeStream(){let[$,Y]=this.baseStream.tee();return this.baseStream=Y,$}get textStream(){return fO(this.teeStream().pipeThrough(new TransformStream({transform({part:$},Y){if($.type==="text-delta")Y.enqueue($.textDelta)}})))}get fullStream(){return fO(this.teeStream().pipeThrough(new TransformStream({transform({part:$},Y){Y.enqueue($)}})))}async consumeStream($){var Y;try{await Xj8({stream:this.fullStream,onError:$==null?void 0:$.onError})}catch(X){(Y=$==null?void 0:$.onError)==null||Y.call($,X)}}get experimental_partialOutputStream(){if(this.output==null)throw new Qt1;return fO(this.teeStream().pipeThrough(new TransformStream({transform({partialOutput:$},Y){if($!=null)Y.enqueue($)}})))}toDataStreamInternal({getErrorMessage:$=()=>"An error occurred.",sendUsage:Y=!0,sendReasoning:X=!1,sendSources:G=!1,experimental_sendFinish:J=!0}){return this.fullStream.pipeThrough(new TransformStream({transform:async(Q,W)=>{let Z=Q.type;switch(Z){case"text-delta":{W.enqueue(ZG("text",Q.textDelta));break}case"reasoning":{if(X)W.enqueue(ZG("reasoning",Q.textDelta));break}case"redacted-reasoning":{if(X)W.enqueue(ZG("redacted_reasoning",{data:Q.data}));break}case"reasoning-signature":{if(X)W.enqueue(ZG("reasoning_signature",{signature:Q.signature}));break}case"file":{W.enqueue(ZG("file",{mimeType:Q.mimeType,data:Q.base64}));break}case"source":{if(G)W.enqueue(ZG("source",Q.source));break}case"tool-call-streaming-start":{W.enqueue(ZG("tool_call_streaming_start",{toolCallId:Q.toolCallId,toolName:Q.toolName}));break}case"tool-call-delta":{W.enqueue(ZG("tool_call_delta",{toolCallId:Q.toolCallId,argsTextDelta:Q.argsTextDelta}));break}case"tool-call":{W.enqueue(ZG("tool_call",{toolCallId:Q.toolCallId,toolName:Q.toolName,args:Q.args}));break}case"tool-result":{W.enqueue(ZG("tool_result",{toolCallId:Q.toolCallId,result:Q.result}));break}case"error":{W.enqueue(ZG("error",$(Q.error)));break}case"step-start":{W.enqueue(ZG("start_step",{messageId:Q.messageId}));break}case"step-finish":{W.enqueue(ZG("finish_step",{finishReason:Q.finishReason,usage:Y?{promptTokens:Q.usage.promptTokens,completionTokens:Q.usage.completionTokens}:void 0,isContinued:Q.isContinued}));break}case"finish":{if(J)W.enqueue(ZG("finish_message",{finishReason:Q.finishReason,usage:Y?{promptTokens:Q.usage.promptTokens,completionTokens:Q.usage.completionTokens}:void 0}));break}default:throw Error(`Unknown chunk type: ${Z}`)}}}))}pipeDataStreamToResponse($,{status:Y,statusText:X,headers:G,data:J,getErrorMessage:Q,sendUsage:W,sendReasoning:Z,sendSources:K,experimental_sendFinish:H}={}){Tk0({response:$,status:Y,statusText:X,headers:jk0(G,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"}),stream:this.toDataStream({data:J,getErrorMessage:Q,sendUsage:W,sendReasoning:Z,sendSources:K,experimental_sendFinish:H})})}pipeTextStreamToResponse($,Y){Tk0({response:$,status:Y==null?void 0:Y.status,statusText:Y==null?void 0:Y.statusText,headers:jk0(Y==null?void 0:Y.headers,{contentType:"text/plain; charset=utf-8"}),stream:this.textStream.pipeThrough(new TextEncoderStream)})}toDataStream($){let Y=this.toDataStreamInternal({getErrorMessage:$==null?void 0:$.getErrorMessage,sendUsage:$==null?void 0:$.sendUsage,sendReasoning:$==null?void 0:$.sendReasoning,sendSources:$==null?void 0:$.sendSources,experimental_sendFinish:$==null?void 0:$.experimental_sendFinish}).pipeThrough(new TextEncoderStream);return($==null?void 0:$.data)?lk0($==null?void 0:$.data.stream,Y):Y}mergeIntoDataStream($,Y){$.merge(this.toDataStreamInternal({getErrorMessage:$.onError,sendUsage:Y==null?void 0:Y.sendUsage,sendReasoning:Y==null?void 0:Y.sendReasoning,sendSources:Y==null?void 0:Y.sendSources,experimental_sendFinish:Y==null?void 0:Y.experimental_sendFinish}))}toDataStreamResponse({headers:$,status:Y,statusText:X,data:G,getErrorMessage:J,sendUsage:Q,sendReasoning:W,sendSources:Z,experimental_sendFinish:K}={}){return new Response(this.toDataStream({data:G,getErrorMessage:J,sendUsage:Q,sendReasoning:W,sendSources:Z,experimental_sendFinish:K}),{status:Y,statusText:X,headers:ew($,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}toTextStreamResponse($){var Y;return new Response(this.textStream.pipeThrough(new TextEncoderStream),{status:(Y=$==null?void 0:$.status)!=null?Y:200,headers:ew($==null?void 0:$.headers,{contentType:"text/plain; charset=utf-8"})})}},Kj8,ik0,of,Uj8,Hj8,zj8,Vj8,Aj8,Fj8,jt1,Dj8,Nj8,Lj8,c60="2.0",Bj8,Oj8,Ej8,Mj8,Rj8,wj8;var ak0=V0(()=>{cG();KY();PI8=Object.create,ps1=Object.defineProperty,wI8=Object.getOwnPropertyDescriptor,ds1=Object.getOwnPropertyNames,_I8=Object.getPrototypeOf,jI8=Object.prototype.hasOwnProperty,kI8=TI8({"../../../node_modules/.pnpm/secure-json-parse@2.7.0/node_modules/secure-json-parse/index.js"($,Y){var X=typeof Buffer<"u",G=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,J=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Q(H,z,V){if(V==null){if(z!==null&&typeof z==="object")V=z,z=void 0}if(X&&Buffer.isBuffer(H))H=H.toString();if(H&&H.charCodeAt(0)===65279)H=H.slice(1);let A=JSON.parse(H,z);if(A===null||typeof A!=="object")return A;let F=V&&V.protoAction||"error",N=V&&V.constructorAction||"error";if(F==="ignore"&&N==="ignore")return A;if(F!=="ignore"&&N!=="ignore"){if(G.test(H)===!1&&J.test(H)===!1)return A}else if(F!=="ignore"&&N==="ignore"){if(G.test(H)===!1)return A}else if(J.test(H)===!1)return A;return W(A,{protoAction:F,constructorAction:N,safe:V&&V.safe})}function W(H,{protoAction:z="error",constructorAction:V="error",safe:A}={}){let F=[H];while(F.length){let N=F;F=[];for(let D of N){if(z!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"__proto__")){if(A===!0)return null;else if(z==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.__proto__}if(V!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"constructor")&&Object.prototype.hasOwnProperty.call(D.constructor,"prototype")){if(A===!0)return null;else if(V==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.constructor}for(let L in D){let B=D[L];if(B&&typeof B==="object")F.push(B)}}}return H}function Z(H,z,V){let A=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,V)}finally{Error.stackTraceLimit=A}}function K(H,z){let V=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,{safe:!0})}catch(A){return null}finally{Error.stackTraceLimit=V}}Y.exports=Z,Y.exports.default=Z,Y.exports.parse=Z,Y.exports.safeParse=K,Y.exports.scan=W}}),vI8=Symbol.for(cs1),xI8=class $ extends Error{constructor({name:Y,message:X,cause:G}){super(X);this[ls1]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,cs1)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}};ls1=vI8;c6=xI8,ns1=`vercel.ai.error.${is1}`,yI8=Symbol.for(ns1),bI8=class extends c6{constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:is1,message:$,cause:W});this[rs1]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return c6.hasMarker($,ns1)}};rs1=yI8;ss1=`vercel.ai.error.${as1}`,hI8=Symbol.for(ss1),fI8=class extends c6{constructor({message:$,cause:Y,argument:X}){super({name:as1,message:$,cause:Y});this[os1]=!0,this.argument=X}static isInstance($){return c6.hasMarker($,ss1)}};os1=hI8;es1=`vercel.ai.error.${ts1}`,gI8=Symbol.for(es1),$D=class extends c6{constructor({prompt:$,message:Y,cause:X}){super({name:ts1,message:`Invalid prompt: ${Y}`,cause:X});this[$o1]=!0,this.prompt=$}static isInstance($){return c6.hasMarker($,es1)}};$o1=gI8;Xo1=`vercel.ai.error.${Yo1}`,mI8=Symbol.for(Xo1),qk0=class extends c6{constructor({text:$,cause:Y}){super({name:Yo1,message:`JSON parsing failed: Text: ${$}.
Error message: ${tf(Y)}`,cause:Y});this[Go1]=!0,this.text=$}static isInstance($){return c6.hasMarker($,Xo1)}};Go1=mI8;Qo1=`vercel.ai.error.${Jo1}`,uI8=Symbol.for(Qo1),pI8=class $ extends c6{constructor({value:Y,cause:X}){super({name:Jo1,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${tf(X)}`,cause:X});this[Wo1]=!0,this.value=Y}static isInstance(Y){return c6.hasMarker(Y,Qo1)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}};Wo1=uI8;gO=pI8,Ko1=`vercel.ai.error.${Zo1}`,dI8=Symbol.for(Ko1),C60=class extends c6{constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:Zo1,message:Y});this[Uo1]=!0,this.functionality=$}static isInstance($){return c6.hasMarker($,Ko1)}};Uo1=dI8;lI8=SI8(kI8());rI8=uO();k60=Symbol.for("vercel.ai.validator");({btoa:YP8,atob:XP8}=globalThis);GP8=Symbol("Let zodToJsonSchema decide on which parser to use"),Cs1={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"};wK={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:()=>{if(Dk0===void 0)Dk0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return Dk0},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-_]*$/};LP8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");v60={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};uP8=mP8;dP8={code:"0",name:"text",parse:($)=>{if(typeof $!=="string")throw Error('"text" parts expect a string value.');return{type:"text",value:$}}},cP8={code:"2",name:"data",parse:($)=>{if(!Array.isArray($))throw Error('"data" parts expect an array value.');return{type:"data",value:$}}},lP8={code:"3",name:"error",parse:($)=>{if(typeof $!=="string")throw Error('"error" parts expect a string value.');return{type:"error",value:$}}},iP8={code:"8",name:"message_annotations",parse:($)=>{if(!Array.isArray($))throw Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:$}}},nP8={code:"9",name:"tool_call",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string"||!("args"in $)||typeof $.args!=="object")throw Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:$}}},rP8={code:"a",name:"tool_result",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("result"in $))throw Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:$}}},aP8={code:"b",name:"tool_call_streaming_start",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string")throw Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:$}}},sP8={code:"c",name:"tool_call_delta",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("argsTextDelta"in $)||typeof $.argsTextDelta!=="string")throw Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:$}}},oP8={code:"d",name:"finish_message",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_message" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};return{type:"finish_message",value:Y}}},tP8={code:"e",name:"finish_step",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_step" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason,isContinued:!1};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};if("isContinued"in $&&typeof $.isContinued==="boolean")Y.isContinued=$.isContinued;return{type:"finish_step",value:Y}}},eP8={code:"f",name:"start_step",parse:($)=>{if($==null||typeof $!=="object"||!("messageId"in $)||typeof $.messageId!=="string")throw Error('"start_step" parts expect an object with an "id" property.');return{type:"start_step",value:{messageId:$.messageId}}}},$w8={code:"g",name:"reasoning",parse:($)=>{if(typeof $!=="string")throw Error('"reasoning" parts expect a string value.');return{type:"reasoning",value:$}}},Yw8={code:"h",name:"source",parse:($)=>{if($==null||typeof $!=="object")throw Error('"source" parts expect a Source object.');return{type:"source",value:$}}},Xw8={code:"i",name:"redacted_reasoning",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string")throw Error('"redacted_reasoning" parts expect an object with a "data" property.');return{type:"redacted_reasoning",value:{data:$.data}}}},Gw8={code:"j",name:"reasoning_signature",parse:($)=>{if($==null||typeof $!=="object"||!("signature"in $)||typeof $.signature!=="string")throw Error('"reasoning_signature" parts expect an object with a "signature" property.');return{type:"reasoning_signature",value:{signature:$.signature}}}},Jw8={code:"k",name:"file",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string"||!("mimeType"in $)||typeof $.mimeType!=="string")throw Error('"file" parts expect an object with a "data" and "mimeType" property.');return{type:"file",value:$}}},yk0=[dP8,cP8,lP8,iP8,nP8,rP8,aP8,sP8,oP8,tP8,eP8,$w8,Yw8,Xw8,Gw8,Jw8];Object.fromEntries(yk0.map(($)=>[$.code,$]));Object.fromEntries(yk0.map(($)=>[$.name,$.code]));wk0=Symbol.for("vercel.ai.schema");Kw8=typeof globalThis==="object"?globalThis:global,vs1=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Hw8=Uw8(hO),zw8=hO.split(".")[0],nf=Symbol.for("opentelemetry.js.api."+zw8),rf=Kw8;Fw8=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return df("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return df("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return df("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return df("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return df("verbose",this._namespace,Y)},$}();(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(CW||(CW={}));y60=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var Z=af("diag");if(!Z)return;return Z[J].apply(Z,Lw8([],Nw8(Q),!1))}}var X=this,G=function(J,Q){var W,Z,K;if(Q===void 0)Q={logLevel:CW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=af("diag"),V=Dw8((Z=Q.logLevel)!==null&&Z!==void 0?Z:CW.INFO,J);if(z&&!Q.suppressOverrideMessage){var A=(K=Error().stack)!==null&&K!==void 0?K:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+A),V.warn("Current logger will overwrite one already registered from "+A)}return bk0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){hk0(Bw8,X)},X.createComponentLogger=function(J){return new Fw8(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();Ew8=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),Mw8=new Ew8,Iw8=function(){function $(){}return $.prototype.active=function(){return Mw8},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,qw8([G],Rw8(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),_w8=new Iw8,Lo1=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return bk0(Lk0,Y,y60.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,ww8([Y,X,G],Pw8(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return af(Lk0)||_w8},$.prototype.disable=function(){this._getContextManager().disable(),hk0(Lk0,y60.instance())},$}();(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(_k0||(_k0={}));jw8={traceId:Oo1,spanId:Bo1,traceFlags:_k0.NONE},cf=function(){function $(Y){if(Y===void 0)Y=jw8;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),fk0=Ow8("OpenTelemetry Context Key SPAN");kw8=/^([0-9a-f]{32})$/i,vw8=/^[0-9a-f]{16}$/i;Bk0=Lo1.getInstance(),Ro1=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=Bk0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new cf;var Q=G&&Eo1(G);if(hw8(Q)&&Mo1(Q))return new cf(Q);else return new cf},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,Z;if(arguments.length<2)return;else if(arguments.length===2)Z=X;else if(arguments.length===3)Q=X,Z=G;else Q=X,W=G,Z=J;var K=W!==null&&W!==void 0?W:Bk0.active(),H=this.startSpan(Y,Q,K),z=mk0(K,H);return Bk0.with(z,Z,void 0,H)},$}();fw8=new Ro1,gw8=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return fw8;return this._delegate=Y,this._delegate},$}(),mw8=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new Ro1},$}(),uw8=new mw8,xs1=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new gw8(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:uw8},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}();(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(b60||(b60={}));pw8=function(){function $(){this._proxyTracerProvider=new xs1,this.wrapSpanContext=bw8,this.isSpanContextValid=Mo1,this.deleteSpan=Cw8,this.getSpan=gk0,this.getActiveSpan=Tw8,this.getSpanContext=Eo1,this.setSpan=mk0,this.setSpanContext=Sw8}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=bk0(Ok0,this._proxyTracerProvider,y60.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return af(Ok0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){hk0(Ok0,y60.instance()),this._proxyTracerProvider=new xs1},$}(),dw8=pw8.getInstance(),cw8=Object.defineProperty;f60=class extends c6{constructor(){super({name:"AI_UnsupportedModelVersionError",message:'Unsupported model version. AI SDK 4 only supports models that implement specification version "v1". Please upgrade to AI SDK 5 to use this model.'})}},Io1=`vercel.ai.error.${qo1}`,lw8=Symbol.for(Io1),_5=class extends c6{constructor({parameter:$,value:Y,message:X}){super({name:qo1,message:`Invalid argument for parameter ${$}: ${X}`});this[Po1]=!0,this.parameter=$,this.value=Y}static isInstance($){return c6.hasMarker($,Io1)}};Po1=lw8;_o1=`vercel.ai.error.${wo1}`,iw8=Symbol.for(_o1),ys1=class extends c6{constructor({message:$,reason:Y,errors:X}){super({name:wo1,message:$});this[jo1]=!0,this.reason=Y,this.errors=X,this.lastError=X[X.length-1]}static isInstance($){return c6.hasMarker($,_o1)}};jo1=iw8;rw8={startSpan(){return T60},startActiveSpan($,Y,X,G){if(typeof Y==="function")return Y(T60);if(typeof X==="function")return X(T60);if(typeof G==="function")return G(T60)}},T60={spanContext(){return aw8},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}},aw8={traceId:"",spanId:"",traceFlags:0};sw8=class extends Co1{constructor($){super($);this.type="file"}},ow8=[{mimeType:"image/gif",bytesPrefix:[71,73,70],base64Prefix:"R0lG"},{mimeType:"image/png",bytesPrefix:[137,80,78,71],base64Prefix:"iVBORw"},{mimeType:"image/jpeg",bytesPrefix:[255,216],base64Prefix:"/9j/"},{mimeType:"image/webp",bytesPrefix:[82,73,70,70],base64Prefix:"UklGRg"},{mimeType:"image/bmp",bytesPrefix:[66,77],base64Prefix:"Qk"},{mimeType:"image/tiff",bytesPrefix:[73,73,42,0],base64Prefix:"SUkqAA"},{mimeType:"image/tiff",bytesPrefix:[77,77,0,42],base64Prefix:"TU0AKg"},{mimeType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102],base64Prefix:"AAAAIGZ0eXBhdmlm"},{mimeType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99],base64Prefix:"AAAAIGZ0eXBoZWlj"}];ko1=`vercel.ai.error.${So1}`,Y_8=Symbol.for(ko1),dz=class extends c6{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:So1,message:$,cause:Y});this[vo1]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return c6.hasMarker($,ko1)}};vo1=Y_8;yo1=`vercel.ai.error.${xo1}`,X_8=Symbol.for(yo1),Ek0=class extends c6{constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:xo1,message:J,cause:G});this[bo1]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return c6.hasMarker($,yo1)}};bo1=X_8;fo1=`vercel.ai.error.${ho1}`,J_8=Symbol.for(fo1),bs1=class extends c6{constructor({content:$,cause:Y,message:X=`Invalid data content. Expected a base64 string, Uint8Array, ArrayBuffer, or Buffer, but got ${typeof $}.`}){super({name:ho1,message:X,cause:Y});this[go1]=!0,this.content=$}static isInstance($){return c6.hasMarker($,fo1)}};go1=J_8;mo1=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]);po1=`vercel.ai.error.${uo1}`,W_8=Symbol.for(po1),Z_8=class extends c6{constructor({role:$,message:Y=`Invalid message role: '${$}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:uo1,message:Y});this[do1]=!0,this.role=$}static isInstance($){return c6.hasMarker($,po1)}};do1=W_8;lo1=`vercel.ai.error.${co1}`,V_8=Symbol.for(lo1),Mk0=class extends c6{constructor({originalMessage:$,message:Y}){super({name:co1,message:Y});this[io1]=!0,this.originalMessage=$}static isInstance($){return c6.hasMarker($,lo1)}};io1=V_8;Ck0=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),Ck0),U.array(Ck0)])),Q$=U.record(U.string(),U.record(U.string(),Ck0)),A_8=U.array(U.union([U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("image"),data:U.string(),mimeType:U.string().optional()})])),no1=U.object({type:U.literal("text"),text:U.string(),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),F_8=U.object({type:U.literal("image"),image:U.union([mo1,U.instanceof(URL)]),mimeType:U.string().optional(),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),ro1=U.object({type:U.literal("file"),data:U.union([mo1,U.instanceof(URL)]),filename:U.string().optional(),mimeType:U.string(),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),D_8=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),N_8=U.object({type:U.literal("redacted-reasoning"),data:U.string(),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),L_8=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),args:U.unknown(),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),B_8=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),result:U.unknown(),content:A_8.optional(),isError:U.boolean().optional(),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),O_8=U.object({role:U.literal("system"),content:U.string(),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),E_8=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([no1,F_8,ro1]))]),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),M_8=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([no1,ro1,D_8,N_8,L_8]))]),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),R_8=U.object({role:U.literal("tool"),content:U.array(B_8),providerOptions:Q$.optional(),experimental_providerMetadata:Q$.optional()}),q_8=U.union([O_8,E_8,M_8,R_8]);T_8={type:"no-schema",jsonSchema:void 0,validatePartialResult({value:$,textDelta:Y}){return{success:!0,value:{partial:$,textDelta:Y}}},validateFinalResult($,Y){return $===void 0?{success:!1,error:new dz({message:"No object generated: response did not match schema.",text:Y.text,response:Y.response,usage:Y.usage,finishReason:Y.finishReason})}:{success:!0,value:$}},createElementStream(){throw new C60({functionality:"element streams in no-schema mode"})}};x_8=uO({prefix:"aiobj",size:24});b_8=uO({prefix:"aiobj",size:24});Gt1=`vercel.ai.error.${Xt1}`,f_8=Symbol.for(Gt1),Qt1=class extends c6{constructor({message:$="No output specified."}={}){super({name:Xt1,message:$});this[Jt1]=!0}static isInstance($){return c6.hasMarker($,Gt1)}};Jt1=f_8;Zt1=`vercel.ai.error.${Wt1}`,g_8=Symbol.for(Zt1),Ut1=class extends c6{constructor({toolArgs:$,toolName:Y,toolCallId:X,cause:G,message:J=`Error executing tool ${Y}: ${tf(G)}`}){super({name:Wt1,message:J,cause:G});this[Kt1]=!0,this.toolArgs=$,this.toolName=Y,this.toolCallId=X}static isInstance($){return c6.hasMarker($,Zt1)}};Kt1=g_8;u_8=/^([\s\S]*?)(\s+)(\S*)$/;At1=`vercel.ai.error.${Vt1}`,d_8=Symbol.for(At1),Dt1=class extends c6{constructor({toolArgs:$,toolName:Y,cause:X,message:G=`Invalid arguments for tool ${Y}: ${tf(X)}`}){super({name:Vt1,message:G,cause:X});this[Ft1]=!0,this.toolArgs=$,this.toolName=Y}static isInstance($){return c6.hasMarker($,At1)}};Ft1=d_8;Lt1=`vercel.ai.error.${Nt1}`,c_8=Symbol.for(Lt1),Sk0=class extends c6{constructor({toolName:$,availableTools:Y=void 0,message:X=`Model tried to call unavailable tool '${$}'. ${Y===void 0?"No tools are available.":`Available tools: ${Y.join(", ")}.`}`}){super({name:Nt1,message:X});this[Bt1]=!0,this.toolName=$,this.availableTools=Y}static isInstance($){return c6.hasMarker($,Lt1)}};Bt1=c_8;Et1=`vercel.ai.error.${Ot1}`,l_8=Symbol.for(Et1),i_8=class extends c6{constructor({cause:$,originalError:Y,message:X=`Error repairing tool call: ${tf($)}`}){super({name:Ot1,message:X,cause:$});this[Mt1]=!0,this.originalError=Y}static isInstance($){return c6.hasMarker($,Et1)}};Mt1=l_8;n_8=uO({prefix:"aitxt",size:24}),r_8=uO({prefix:"msg",size:24});d60={};uk0(d60,{object:()=>$j8,text:()=>e_8});Pt1=`vercel.ai.error.${It1}`,o_8=Symbol.for(Pt1),t_8=class extends c6{constructor({chunk:$,message:Y}){super({name:It1,message:Y});this[wt1]=!0,this.chunk=$}static isInstance($){return c6.hasMarker($,Pt1)}};wt1=o_8;Jj8=uO({prefix:"aitxt",size:24}),Qj8=uO({prefix:"msg",size:24});Kj8=U.object({name:U.string(),version:U.string()}).passthrough(),ik0=U.object({_meta:U.optional(U.object({}).passthrough())}).passthrough(),of=ik0,Uj8=U.object({method:U.string(),params:U.optional(ik0)}),Hj8=U.object({experimental:U.optional(U.object({}).passthrough()),logging:U.optional(U.object({}).passthrough()),prompts:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough()),resources:U.optional(U.object({subscribe:U.optional(U.boolean()),listChanged:U.optional(U.boolean())}).passthrough()),tools:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough())}).passthrough();of.extend({protocolVersion:U.string(),capabilities:Hj8,serverInfo:Kj8,instructions:U.optional(U.string())});zj8=of.extend({nextCursor:U.optional(U.string())}),Vj8=U.object({name:U.string(),description:U.optional(U.string()),inputSchema:U.object({type:U.literal("object"),properties:U.optional(U.object({}).passthrough())}).passthrough()}).passthrough();zj8.extend({tools:U.array(Vj8)});Aj8=U.object({type:U.literal("text"),text:U.string()}).passthrough(),Fj8=U.object({type:U.literal("image"),data:U.string().base64(),mimeType:U.string()}).passthrough(),jt1=U.object({uri:U.string(),mimeType:U.optional(U.string())}).passthrough(),Dj8=jt1.extend({text:U.string()}),Nj8=jt1.extend({blob:U.string().base64()}),Lj8=U.object({type:U.literal("resource"),resource:U.union([Dj8,Nj8])}).passthrough();of.extend({content:U.array(U.union([Aj8,Fj8,Lj8])),isError:U.boolean().default(!1).optional()}).or(of.extend({toolResult:U.unknown()}));Bj8=U.object({jsonrpc:U.literal(c60),id:U.union([U.string(),U.number().int()])}).merge(Uj8).strict(),Oj8=U.object({jsonrpc:U.literal(c60),id:U.union([U.string(),U.number().int()]),result:of}).strict(),Ej8=U.object({jsonrpc:U.literal(c60),id:U.union([U.string(),U.number().int()]),error:U.object({code:U.number().int(),message:U.string(),data:U.optional(U.unknown())})}).strict(),Mj8=U.object({jsonrpc:U.literal(c60)}).merge(U.object({method:U.string(),params:U.optional(ik0)})).strict();U.union([Bj8,Mj8,Oj8,Ej8]);Rj8={};uk0(Rj8,{mergeIntoDataStream:()=>Pj8,toDataStream:()=>qj8,toDataStreamResponse:()=>Ij8});wj8={};uk0(wj8,{mergeIntoDataStream:()=>Tj8,toDataStream:()=>_j8,toDataStreamResponse:()=>jj8})});async function Ct1($,Y={},X=3,G={}){let J=0,Q=null,W=G.shouldRetryResponse??Sj8;while(J<X){let Z;try{Z=await fetch($,Y)}catch(H){Q=H instanceof Error?H:Error(String(H))}if(Z)if(!Z.ok){if(Q=Error(`Request failed with status: ${Z.status} ${Z.statusText}`),!W(Z))throw Q}else return Z;if(J++,J>=X)break;let K=Math.min(1000*Math.pow(2,J),1e4);await new Promise((H)=>setTimeout(H,K))}throw Q||Error("Request failed after multiple retry attempts")}var Sj8=()=>!0;var St1=()=>{};function n60(){var $=0,Y,X="";if(!l60||pO+16>256){l60=Array($=256);while($--)l60[$]=256*Math.random()|0;$=pO=0}for(;$<16;$++){if(Y=l60[pO+$],$==6)X+=i60[Y&15|64];else if($==8)X+=i60[Y&63|128];else X+=i60[Y];if($&1&&$>1&&$<11)X+="-"}return pO++,X}var pO=256,i60,l60;var kt1=V0(()=>{i60=[];while(pO--)i60[pO]=(pO+256).toString(16).substring(1)});function Ve1($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}var Ze1="vercel.ai.error",kj8,vt1,xt1,i9,Ke1="AI_APICallError",Ue1,vj8,yt1,bt1,jn5,He1="AI_EmptyResponseBodyError",ze1,xj8,ht1,ft1,Tn5,Ae1="AI_InvalidArgumentError",Fe1,yj8,gt1,mt1,De1,Ne1="AI_InvalidPromptError",Le1,bj8,ut1,pt1,Cn5,Be1="AI_InvalidResponseDataError",Oe1,hj8,dt1,ct1,Sn5,Ee1="AI_JSONParseError",Me1,fj8,lt1,it1,kn5,Re1="AI_LoadAPIKeyError",qe1,gj8,nt1,rt1,vn5,Ie1="AI_LoadSettingError",Pe1,mj8,at1,st1,xn5,we1="AI_NoContentGeneratedError",_e1,uj8,ot1,tt1,yn5,je1="AI_NoSuchModelError",Te1,pj8,et1,$e1,bn5,Ce1="AI_TooManyEmbeddingValuesForCallError",Se1,dj8,Ye1,Xe1,hn5,ke1="AI_TypeValidationError",ve1,cj8,Ge1,Je1,fn5,xe1="AI_UnsupportedFunctionalityError",ye1,lj8,Qe1,We1,gn5;var sk0=V0(()=>{kj8=Symbol.for(Ze1),i9=class $ extends(xt1=Error,vt1=kj8,xt1){constructor({name:Y,message:X,cause:G}){super(X);this[vt1]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,Ze1)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},Ue1=`vercel.ai.error.${Ke1}`,vj8=Symbol.for(Ue1),jn5=class extends(bt1=i9,yt1=vj8,bt1){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:Ke1,message:$,cause:W});this[yt1]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return i9.hasMarker($,Ue1)}},ze1=`vercel.ai.error.${He1}`,xj8=Symbol.for(ze1),Tn5=class extends(ft1=i9,ht1=xj8,ft1){constructor({message:$="Empty response body"}={}){super({name:He1,message:$});this[ht1]=!0}static isInstance($){return i9.hasMarker($,ze1)}};Fe1=`vercel.ai.error.${Ae1}`,yj8=Symbol.for(Fe1),De1=class extends(mt1=i9,gt1=yj8,mt1){constructor({message:$,cause:Y,argument:X}){super({name:Ae1,message:$,cause:Y});this[gt1]=!0,this.argument=X}static isInstance($){return i9.hasMarker($,Fe1)}},Le1=`vercel.ai.error.${Ne1}`,bj8=Symbol.for(Le1),Cn5=class extends(pt1=i9,ut1=bj8,pt1){constructor({prompt:$,message:Y,cause:X}){super({name:Ne1,message:`Invalid prompt: ${Y}`,cause:X});this[ut1]=!0,this.prompt=$}static isInstance($){return i9.hasMarker($,Le1)}},Oe1=`vercel.ai.error.${Be1}`,hj8=Symbol.for(Oe1),Sn5=class extends(ct1=i9,dt1=hj8,ct1){constructor({data:$,message:Y=`Invalid response data: ${JSON.stringify($)}.`}){super({name:Be1,message:Y});this[dt1]=!0,this.data=$}static isInstance($){return i9.hasMarker($,Oe1)}},Me1=`vercel.ai.error.${Ee1}`,fj8=Symbol.for(Me1),kn5=class extends(it1=i9,lt1=fj8,it1){constructor({text:$,cause:Y}){super({name:Ee1,message:`JSON parsing failed: Text: ${$}.
Error message: ${Ve1(Y)}`,cause:Y});this[lt1]=!0,this.text=$}static isInstance($){return i9.hasMarker($,Me1)}},qe1=`vercel.ai.error.${Re1}`,gj8=Symbol.for(qe1),vn5=class extends(rt1=i9,nt1=gj8,rt1){constructor({message:$}){super({name:Re1,message:$});this[nt1]=!0}static isInstance($){return i9.hasMarker($,qe1)}},Pe1=`vercel.ai.error.${Ie1}`,mj8=Symbol.for(Pe1),xn5=class extends(st1=i9,at1=mj8,st1){constructor({message:$}){super({name:Ie1,message:$});this[at1]=!0}static isInstance($){return i9.hasMarker($,Pe1)}},_e1=`vercel.ai.error.${we1}`,uj8=Symbol.for(_e1),yn5=class extends(tt1=i9,ot1=uj8,tt1){constructor({message:$="No content generated."}={}){super({name:we1,message:$});this[ot1]=!0}static isInstance($){return i9.hasMarker($,_e1)}},Te1=`vercel.ai.error.${je1}`,pj8=Symbol.for(Te1),bn5=class extends($e1=i9,et1=pj8,$e1){constructor({errorName:$=je1,modelId:Y,modelType:X,message:G=`No such ${X}: ${Y}`}){super({name:$,message:G});this[et1]=!0,this.modelId=Y,this.modelType=X}static isInstance($){return i9.hasMarker($,Te1)}},Se1=`vercel.ai.error.${Ce1}`,dj8=Symbol.for(Se1),hn5=class extends(Xe1=i9,Ye1=dj8,Xe1){constructor($){super({name:Ce1,message:`Too many values for a single embedding call. The ${$.provider} model "${$.modelId}" can only embed up to ${$.maxEmbeddingsPerCall} values per call, but ${$.values.length} values were provided.`});this[Ye1]=!0,this.provider=$.provider,this.modelId=$.modelId,this.maxEmbeddingsPerCall=$.maxEmbeddingsPerCall,this.values=$.values}static isInstance($){return i9.hasMarker($,Se1)}},ve1=`vercel.ai.error.${ke1}`,cj8=Symbol.for(ve1),fn5=class $ extends(Je1=i9,Ge1=cj8,Je1){constructor({value:Y,cause:X}){super({name:ke1,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${Ve1(X)}`,cause:X});this[Ge1]=!0,this.value=Y}static isInstance(Y){return i9.hasMarker(Y,ve1)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}},ye1=`vercel.ai.error.${xe1}`,lj8=Symbol.for(ye1),gn5=class extends(We1=i9,Qe1=lj8,We1){constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:xe1,message:Y});this[Qe1]=!0,this.functionality=$}static isInstance($){return i9.hasMarker($,ye1)}}});function ok0($){}function r60($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=ok0,onError:X=ok0,onRetry:G=ok0,onComment:J}=$,Q=[],W=!0,Z,K="",H=0,z;function V(B){if(W&&(W=!1,B.charCodeAt(0)===239&&B.charCodeAt(1)===187&&B.charCodeAt(2)===191&&(B=B.slice(3))),Q.length===0){let M=A(B);M!==""&&Q.push(M);return}if(B.indexOf(`
`)===-1&&B.indexOf("\r")===-1){Q.push(B);return}Q.push(B);let O=Q.join("");Q.length=0;let E=A(O);E!==""&&Q.push(E)}function A(B){let O=0;if(B.indexOf("\r")===-1){let E=B.indexOf(`
`,O);for(;E!==-1;){if(O===E){H>0&&Y({id:Z,event:z,data:K}),Z=void 0,K="",H=0,z=void 0,O=E+1,E=B.indexOf(`
`,O);continue}let M=B.charCodeAt(O);if(he1(B,O,M)){let R=B.charCodeAt(O+5)===dO?O+6:O+5,q=B.slice(R,E);if(H===0&&B.charCodeAt(E+1)===be1){Y({id:Z,event:z,data:q}),Z=void 0,K="",z=void 0,O=E+2,E=B.indexOf(`
`,O);continue}K=H===0?q:`${K}
${q}`,H++}else fe1(B,O,M)?z=B.slice(B.charCodeAt(O+6)===dO?O+7:O+6,E)||void 0:F(B,O,E);O=E+1,E=B.indexOf(`
`,O)}return B.slice(O)}for(;O<B.length;){let E=B.indexOf("\r",O),M=B.indexOf(`
`,O),R=-1;if(E!==-1&&M!==-1?R=E<M?E:M:E!==-1?E===B.length-1?R=-1:R=E:M!==-1&&(R=M),R===-1)break;F(B,O,R),O=R+1,B.charCodeAt(O-1)===ij8&&B.charCodeAt(O)===be1&&O++}return B.slice(O)}function F(B,O,E){if(O===E){D();return}let M=B.charCodeAt(O);if(he1(B,O,M)){let _=B.charCodeAt(O+5)===dO?O+6:O+5,C=B.slice(_,E);K=H===0?C:`${K}
${C}`,H++;return}if(fe1(B,O,M)){z=B.slice(B.charCodeAt(O+6)===dO?O+7:O+6,E)||void 0;return}if(M===105&&B.charCodeAt(O+1)===100&&B.charCodeAt(O+2)===58){let _=B.slice(B.charCodeAt(O+3)===dO?O+4:O+3,E);Z=_.includes("\x00")?void 0:_;return}if(M===58){if(J){let _=B.slice(O,E);J(_.slice(B.charCodeAt(O+1)===dO?2:1))}return}let R=B.slice(O,E),q=R.indexOf(":");if(q===-1){N(R,"",R);return}let w=R.slice(0,q),I=R.charCodeAt(q+1)===dO?2:1,P=R.slice(q+I);N(w,P,R)}function N(B,O,E){switch(B){case"event":z=O||void 0;break;case"data":K=H===0?O:`${K}
${O}`,H++;break;case"id":Z=O.includes("\x00")?void 0:O;break;case"retry":/^\d+$/.test(O)?G(parseInt(O,10)):X(new tk0(`Invalid \`retry\` value: "${O}"`,{type:"invalid-retry",value:O,line:E}));break;default:X(new tk0(`Unknown field "${B.length>20?`${B.slice(0,20)}\u2026`:B}"`,{type:"unknown-field",field:B,value:O,line:E}));break}}function D(){H>0&&Y({id:Z,event:z,data:K}),Z=void 0,K="",H=0,z=void 0}function L(B={}){if(B.consume&&Q.length>0){let O=Q.join("");F(O,0,O.length)}W=!0,Z=void 0,K="",H=0,z=void 0,Q.length=0}return{feed:V,reset:L}}function he1($,Y,X){return X===100&&$.charCodeAt(Y+1)===97&&$.charCodeAt(Y+2)===116&&$.charCodeAt(Y+3)===97&&$.charCodeAt(Y+4)===58}function fe1($,Y,X){return X===101&&$.charCodeAt(Y+1)===118&&$.charCodeAt(Y+2)===101&&$.charCodeAt(Y+3)===110&&$.charCodeAt(Y+4)===116&&$.charCodeAt(Y+5)===58}var tk0,be1=10,ij8=13,dO=32;var ek0=V0(()=>{tk0=class tk0 extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}}});var ef;var $v0=V0(()=>{ek0();ef=class ef extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=r60({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}}});var Yv0={};W8(Yv0,{default:()=>rj8});var rj8=void 0;var Xv0=()=>{};function Gv0($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function $T8({prompt:$,schema:Y,schemaPrefix:X=Y!=null?oj8:void 0,schemaSuffix:G=Y!=null?tj8:ej8}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}function Jv0({messages:$,schema:Y,schemaPrefix:X,schemaSuffix:G}){var J,Q;let W=((J=$[0])==null?void 0:J.role)==="system"?{...$[0]}:{role:"system",content:""};return W.content=$T8({prompt:W.content,schema:Y,schemaPrefix:X,schemaSuffix:G}),[W,...((Q=$[0])==null?void 0:Q.role)==="system"?$.slice(1):$]}function de1({mediaType:$,url:Y,supportedUrls:X}){return Y=Y.toLowerCase(),$=$.toLowerCase(),Object.entries(X).map(([G,J])=>{let Q=G.toLowerCase();return Q==="*"||Q==="*/*"?{mediaTypePrefix:"",regexes:J}:{mediaTypePrefix:Q.replace(/\*/,""),regexes:J}}).filter(({mediaTypePrefix:G})=>$.startsWith(G)).flatMap(({regexes:G})=>G).some((G)=>G.test(Y))}function Qv0($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X=XT8(Y);return Uint8Array.from(X,(G)=>G.codePointAt(0))}function a60($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return YT8(Y)}var ue1="AI_DownloadError",pe1,aj8,ge1,me1,Gr5,sj8=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let Z=0;Z<Y;Z++)W[Z]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new De1({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},Qr5,oj8="JSON schema:",tj8="You MUST answer with a JSON object that matches the JSON schema above.",ej8="You MUST answer with JSON.",Wr5,YT8,XT8;var Wv0=V0(()=>{sk0();sk0();Xv0();pe1=`vercel.ai.error.${ue1}`,aj8=Symbol.for(pe1),Gr5=class extends(me1=i9,ge1=aj8,me1){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:ue1,message:J,cause:G});this[ge1]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return i9.hasMarker($,pe1)}},Qr5=sj8();Wr5=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),{btoa:YT8,atob:XT8}=globalThis});function GT8($){return{...$,id:$.id??crypto.randomUUID(),createdAt:$.createdAt instanceof Date?$.createdAt:$.createdAt?new Date($.createdAt):new Date,acceptedAt:$.acceptedAt instanceof Date?$.acceptedAt:$.acceptedAt?new Date($.acceptedAt):void 0}}function Y04($){return $.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")}function JT8($){return Y04($).replaceAll('"',"&quot;")}function X04($,Y){if(!QT8.test($))throw Error(`Invalid signal XML ${Y}: ${$}`)}function WT8($){if(!$)return"";let Y=Object.entries($).filter((X)=>X[1]!==null&&X[1]!==void 0).map(([X,G])=>{return X04(X,"attribute name"),`${X}="${JT8(String(G))}"`}).join(" ");return Y?` ${Y}`:""}function zv0($){return X04($.type,"tag name"),`<${$.type}${WT8($.attributes)}>${Y04(Yg($.contents))}</${$.type}>`}function Yg($){if(typeof $==="string")return $;if(Array.isArray($))return $.map((Y)=>Yg(Y)).join(`
`);if($&&typeof $==="object"){let Y=$.content;if(typeof Y==="string")return Y;if(Array.isArray(Y))return Y.map((X)=>X&&typeof X==="object"&&("text"in X)?String(X.text):"").filter(Boolean).join(`
`)}return""}function ZT8($){if($.type==="user-message")return $.contents;return[{role:"user",content:zv0({...$,contents:Yg($.contents)})}]}function KT8($){return{type:`data-${$.type}`,data:{id:$.id,type:$.type,contents:$.contents,createdAt:$.createdAt.toISOString(),...$.acceptedAt?{acceptedAt:$.acceptedAt.toISOString()}:{},...$.attributes?{attributes:$.attributes}:{},...$.metadata?{metadata:$.metadata}:{}}}}function UT8($,Y){return{id:$.id,role:"signal",createdAt:$.createdAt,threadId:Y?.threadId,resourceId:Y?.resourceId,type:$.type,content:{format:2,parts:[{type:"text",text:Yg($.contents)}],metadata:{signal:{id:$.id,type:$.type,createdAt:$.createdAt.toISOString(),...$.acceptedAt?{acceptedAt:$.acceptedAt.toISOString()}:{},contents:$.contents,...$.attributes?{attributes:$.attributes}:{},...$.metadata?{metadata:$.metadata}:{}}}}}}function Kv0($){if(!$||typeof $!=="object"||Array.isArray($))return!1;return $.__isCreatedSignal===!0}function K_($){let Y=GT8($);return{...Y,__isCreatedSignal:!0,toDBMessage:(X)=>UT8(Y,X),toLLMMessage:()=>ZT8(Y),toDataPart:()=>KT8(Y)}}function t60($){let Y=$.content.metadata?.signal,X=Y&&typeof Y==="object"&&!Array.isArray(Y)?Y:void 0,G=typeof X?.type==="string"?X.type:$.type??"user-message",J=X&&"contents"in X?X.contents:typeof $.content.content==="string"?$.content.content:$.content.parts.find((W)=>W.type==="text")?.text??"",Q={id:typeof X?.id==="string"?X.id:$.id,createdAt:typeof X?.createdAt==="string"?X.createdAt:$.createdAt,acceptedAt:typeof X?.acceptedAt==="string"?X.acceptedAt:void 0,attributes:X?.attributes&&typeof X.attributes==="object"&&!Array.isArray(X.attributes)?X.attributes:void 0,metadata:X?.metadata&&typeof X.metadata==="object"&&!Array.isArray(X.metadata)?X.metadata:void 0};return K_(G==="user-message"?{...Q,type:G,contents:J}:{...Q,type:G,contents:Yg(J)})}function Z_($){if(typeof $==="string")return $;if($ instanceof ArrayBuffer)return a60(new Uint8Array($));return a60($)}function o60($){if(!$.startsWith("data:"))return{isDataUri:!1,base64Content:$};let Y=$.indexOf(",");if(Y===-1)return{isDataUri:!0,base64Content:$};let X=$.substring(5,Y),G=$.substring(Y+1),J=X.indexOf(";");return{isDataUri:!0,mimeType:(J!==-1?X.substring(0,J):X)||void 0,base64Content:G}}function e60($,Y="application/octet-stream"){if($.startsWith("data:"))return $;return`data:${Y};base64,${$}`}function HT8($,Y){if(typeof $==="string")return $;if($ instanceof URL)return $.toString();if($ instanceof Uint8Array||$ instanceof ArrayBuffer||globalThis.Buffer&&Buffer.isBuffer($))return Z_($);return String($)}function ce1($){if($ instanceof URL)return $.toString();if(typeof $==="string")return $.length;if($ instanceof Uint8Array)return $.byteLength;if($ instanceof ArrayBuffer)return $.byteLength;return $}function zT8($){try{return new URL($),!0}catch{if($.startsWith("//"))try{return new URL(`https:${$}`),!0}catch{return!1}return!1}}function $g($,Y){let X=o60($),G=X.isDataUri&&X.mimeType?X.mimeType:Y;if(X.isDataUri)return{type:"dataUri",mimeType:G,data:$};if(zT8($))return{type:"url",mimeType:G,data:$};return{type:"raw",mimeType:G,data:$}}function G04($,Y){return`${$}:${Y}`}function AT8($){return J04($)[0]}function le1($){let Y=AT8($);return Y?G04(Y.provider,Y.itemId):void 0}function J04($){if(!$)return[];let X=$.azure?.itemId,J=$.openai?.itemId;if(typeof X==="string"&&X===J)return[{provider:"azure",itemId:X}];return VT8.flatMap((Q)=>{let Z=$[Q]?.itemId;return typeof Z==="string"?[{provider:Q,itemId:Z}]:[]})}function FT8($){return J04($).map(({provider:Y,itemId:X})=>G04(Y,X))}function s60($,Y){let X=[...$],G=X.findIndex((J)=>J.role!=="system");if(G===-1){if(X.length>0)Y?.warn("No user or assistant messages in the request. Some providers (e.g. Gemini) require at least one user message to generate a response.")}else if(X[G]?.role==="assistant")X.splice(G,0,{role:"user",content:"."});return X}function DT8($,Y){return $.map((X)=>LT8(X,Y))}function NT8($){let Y=$.map((G)=>Array.isArray(G.content)?[...G.content]:null);for(let G=0;G<$.length;G++){let J=$[G];if(J.role==="assistant"&&Array.isArray(J.content)){let Q=new Set,W=new Set;for(let z of J.content)if(z.type==="tool-call")Q.add(z.toolCallId);else if(z.type==="tool-result")W.add(z.toolCallId);let Z=$[G+1],K=new Set;if(Z&&Z.role==="tool"&&Array.isArray(Z.content)){for(let z of Z.content)if(z.type==="tool-result")K.add(z.toolCallId)}let H=new Set([...Q].filter((z)=>W.has(z)||K.has(z)));if(Y[G]=Y[G].filter((z)=>{if(z.type!=="tool-call")return!0;let V=z;return V.providerExecuted===!0||H.has(V.toolCallId)}),Z&&Z.role==="tool"&&Array.isArray(Z.content))Y[G+1]=Y[G+1].filter((z)=>z.type!=="tool-result"||H.has(z.toolCallId))}else if(J.role==="tool"&&Array.isArray(J.content)){let Q=$[G-1];if(!Q||Q.role!=="assistant"||!Array.isArray(Q.content))Y[G]=Y[G].filter((W)=>W.type!=="tool-result")}}let X=[];for(let G=0;G<$.length;G++){let J=$[G],Q=Y[G];if(Q==null){X.push(J);continue}if(Q.length===0)continue;if(Array.isArray(J.content)&&Q.length===J.content.length){X.push(J);continue}X.push({...J,content:Q})}return X}function LT8($,Y){if($.role!=="tool"||!Array.isArray($.content))return $;return{...$,content:$.content.map((X)=>{if(X.type==="tool-result")return{...X,input:Vv0(Y,X.toolCallId)};return X})}}function Vv0($,Y){for(let X=$.length-1;X>=0;X--){let G=$[X];if(!G||G.role!=="assistant")continue;if(G.content.parts){let J=G.content.parts.find((Q)=>Q.type==="tool-invocation"&&Q.toolInvocation.toolCallId===Y);if(J&&J.type==="tool-invocation"){let Q=J.toolInvocation.args||{};if(typeof Q==="object"&&Object.keys(Q).length>0)return Q}}if(G.content.toolInvocations){let J=G.content.toolInvocations.find((Q)=>Q.toolCallId===Y);if(J){let Q=J.args||{};if(typeof Q==="object"&&Object.keys(Q).length>0)return Q}}}return{}}function W_($,Y,X,G=!0){if(!G)return X;let J=uY($,"display",Y);return f$(J)?J.transformed:X}function BT8($,Y,X){return{...$,args:W_(Y,"input-available",$.args,X),...$.state==="result"?{result:W_(Y,"output-available",W_(Y,"error",$.result,X),X)}:{}}}function OT8($){return $}function ie1($){if(!$.some((X)=>!(X.type==="text"&&X.text==="")))return $;return $.filter((X)=>{if(X.type==="text")return X.text!=="";return!0})}function Uv0($){let Y=$.content.metadata?.signal;if(Y&&typeof Y==="object"&&!Array.isArray(Y)){let X=Y.type;return typeof X==="string"?X:$.type}return $.type}function ET8($,Y){let X=$.content.metadata?.signal&&typeof $.content.metadata.signal==="object"?$.content.metadata.signal:{},G=X.metadata&&typeof X.metadata==="object"&&!Array.isArray(X.metadata)?X.metadata:{};return{type:`data-${Uv0($)??"signal"}`,data:{id:typeof X.id==="string"?X.id:$.id,type:Uv0($)??"signal",contents:"contents"in X?X.contents:Y,createdAt:typeof X.createdAt==="string"?X.createdAt:$.createdAt.toISOString(),...Object.keys(G).length?{metadata:G}:{}}}}function I$($){if(typeof $!=="string")return ne1;return MT8.test($)?$:ne1}function re1($){if(!$.some((X)=>!(X.type==="text"&&X.text==="")))return $;return $.filter((X)=>{if(X.type==="text")return X.text!=="";return!0})}function Q04($){let Y=$.content.metadata?.signal;if(Y&&typeof Y==="object"&&!Array.isArray(Y)){let X=Y.type;return typeof X==="string"?X:$.type}return $.type}function RT8($){return typeof $.content.content==="string"?$.content.content:$.content.parts.find((Y)=>Y.type==="text")?.text??""}function qT8($){let Y=$.content.metadata?.signal&&typeof $.content.metadata.signal==="object"?$.content.metadata.signal:{},X=Y.metadata&&typeof Y.metadata==="object"&&!Array.isArray(Y.metadata)?Y.metadata:{},G=Q04($)??"signal";return{type:`data-${G}`,data:{id:typeof Y.id==="string"?Y.id:$.id,type:G,contents:"contents"in Y?Y.contents:RT8($),createdAt:typeof Y.createdAt==="string"?Y.createdAt:$.createdAt.toISOString(),...Object.keys(X).length?{metadata:X}:{}}}}function ae1($){if(typeof $==="object"&&$&&"type"in $)$=$.type;if(typeof $!=="string")return I$($);if($==="dynamic-tool")return"dynamic-tool";if($.startsWith("tool-"))return I$($.slice(5));return I$($)}function YD($,Y){if(Y==null)return $;return{...$||{},mastra:{...($||{}).mastra||{},createdAt:Y}}}function SW($){let Y=$?.mastra;if(!Y||typeof Y!=="object")return;let X=Y.createdAt;return typeof X==="number"?X:void 0}function G_($,Y,X,G=!0){if(!G)return X;let J=uY($,"display",Y);return f$(J)?J.transformed:X}function Zv0($,Y,X=!0){if(!X)return $;if(!$||typeof $!=="object")return $;let G=$,J=G.metadata??G.providerMetadata,Q=uY(J,"display",Y),W=uY(J,"display","input-available"),Z=Y==="approval"?f$(Q)?Q.transformed:f$(W)?W.transformed:void 0:f$(W)?W.transformed:f$(Q)?Q.transformed:void 0,K=Y==="suspend"&&f$(Q)?Q.transformed:void 0;return{...G,...Z!==void 0?{args:Z}:{},...K!==void 0?{suspendPayload:K}:{}}}function $J($,Y){for(let[X,G]of Object.entries(Y))if(G!==void 0)$[X]=G;return $}function wU($,Y,X){let G=uY($,"display",Y);return f$(G)?G.transformed:X}function IT8($){return $.startsWith("tool-")?I$($.slice(5)):I$($)}function W04($){return typeof $==="object"&&$!==null&&!Array.isArray($)?$:{}}function PT8($){return typeof $==="object"&&$&&"value"in $?$.value:$}function wT8($){return $==="approval-requested"||$==="approval-responded"||$==="output-denied"}function _T8($){if(!$)return;return{id:$.id,approved:"approved"in $?$.approved:void 0,reason:"reason"in $?$.reason:void 0}}function Z04($){return $}function jT8($){return $.type==="dynamic-tool"?I$($.toolName):IT8($.type)}function TT8($){let Y={toolCallId:$.toolCallId,toolName:jT8($),args:W04($.input),approval:"approval"in $?_T8($.approval):void 0,providerMetadata:"callProviderMetadata"in $?Z04($.callProviderMetadata):void 0,providerExecuted:$.providerExecuted,title:$.title,preliminary:"preliminary"in $?$.preliminary:void 0};switch($.state){case"input-streaming":return cO({...Y,state:"partial-call"});case"input-available":return cO({...Y,state:"call"});case"output-available":return cO({...Y,state:"result",result:PT8($.output)});case"output-error":return cO({...Y,state:"output-error",errorText:$.errorText,rawInput:"rawInput"in $?$.rawInput:void 0});case"approval-requested":case"approval-responded":case"output-denied":return cO({...Y,state:$.state})}}function CT8($){if($.type==="dynamic-tool"&&!wT8($.state))return{...$,type:`tool-${I$($.toolName)}`};return $}function cO({toolCallId:$,toolName:Y,args:X,state:G,approval:J,result:Q,errorText:W,rawInput:Z,providerMetadata:K,providerExecuted:H,title:z,preliminary:V}){return $J({type:"tool-invocation",toolInvocation:$J({toolCallId:$,toolName:Y,args:X,state:G},{approval:J,result:Q,errorText:W,rawInput:Z})},{providerMetadata:K,providerExecuted:H,title:z,preliminary:V})}function ST8($,Y){for(let X of $)if(X.type==="tool-invocation"&&X.toolInvocation.toolCallId===Y)return X;return}function kT8($,Y){if(!$)return;for(let X of[...$].reverse())for(let G of[...X.content.parts||[]].reverse())if(G.type==="tool-invocation"&&G.toolInvocation.approval?.id===Y&&G.toolInvocation.state==="approval-requested")return G;return}function vT8($){let Y=[];for(let X of $){if(X.type!=="tool-invocation")continue;let G=X.toolInvocation;if(G.state==="result"){Y.push({args:G.args,result:G.result,toolCallId:G.toolCallId,toolName:G.toolName,state:"result"});continue}if(G.state==="call"||G.state==="partial-call")Y.push({args:G.args,toolCallId:G.toolCallId,toolName:G.toolName,state:G.state})}return Y.length>0?Y:void 0}function XD($,...Y){let X=new Set(Y.flatMap((G)=>FT8(G)));for(let G of X)$+=`|${G}`;return $}function xT8($){if($.role==="system")return $;if(typeof $.content==="string"&&($.role==="assistant"||$.role==="user"))return{...$,content:[{type:"text",text:$.content}]};if(typeof $.content==="string")throw Error(`Saw text content for input CoreMessage, but the role is ${$.role}. This is only allowed for "system", "assistant", and "user" roles.`);let Y={user:[],assistant:[],tool:[]},X=$.role;for(let G of $.content){let J=`Saw incompatible message content part type ${G.type} for message role ${X}`;switch(G.type){case"text":{if(X==="tool")throw Error(J);Y[X].push(G);break}case"redacted-reasoning":case"reasoning":{if(X!=="assistant")throw Error(J);Y[X].push(G);break}case"tool-call":{if(X==="tool"||X==="user")throw Error(J);Y[X].push({...G,toolName:I$(G.toolName)});break}case"tool-result":{if(X==="assistant"||X==="user")throw Error(J);Y[X].push({...G,toolName:I$(G.toolName)});break}case"image":{if(X==="tool"||X==="assistant")throw Error(J);let Q;if(G.image instanceof URL||G.image instanceof Uint8Array)Q=G.image;else if(Buffer.isBuffer(G.image)||G.image instanceof ArrayBuffer)Q=new Uint8Array(G.image);else if($g(G.image,G.mimeType).type==="raw"){let Z=e60(G.image,G.mimeType||"image/png");Q=new URL(Z)}else Q=new URL(G.image);Y[X].push({...G,image:Q});break}case"file":{if(X==="tool")throw Error(J);Y[X].push({...G,data:G.data instanceof URL?G.data:typeof G.data==="string"?G.data:Z_(G.data)});break}}}if(X==="tool")return{...$,content:Y[X]};if(X==="user")return{...$,content:Y[X]};if(X==="assistant")return{...$,content:Y[X]};throw Error(`Encountered unknown role ${X} when converting V4 CoreMessage -> V4 LanguageModelV1Prompt, input message: ${JSON.stringify($,null,2)}`)}function K04($){if($.role==="system")return $;if(typeof $.content==="string"&&($.role==="assistant"||$.role==="user"))return{role:$.role,content:[{type:"text",text:$.content}],providerOptions:$.providerOptions};if(typeof $.content==="string")throw Error(`Saw text content for input ModelMessage, but the role is ${$.role}. This is only allowed for "system", "assistant", and "user" roles.`);let Y={user:[],assistant:[],tool:[]},X=$.role;for(let G of $.content){let J=`Saw incompatible message content part type ${G.type} for message role ${X}`;switch(G.type){case"text":{if(X==="tool")throw Error(J);Y[X].push(G);break}case"reasoning":{if(X==="tool"||X==="user")throw Error(J);Y[X].push(G);break}case"tool-call":{if(X!=="assistant")throw Error(J);Y[X].push({...G,toolName:I$(G.toolName)});break}case"tool-result":{if(X==="user")throw Error(J);Y[X].push({...G,toolName:I$(G.toolName)});break}case"file":{if(X==="tool")throw Error(J);Y[X].push({...G,data:G.data instanceof ArrayBuffer?new Uint8Array(G.data):G.data});break}case"image":{if(X==="tool")throw Error(J);Y[X].push({...G,mediaType:G.mediaType||"image/unknown",type:"file",data:G.image instanceof ArrayBuffer?new Uint8Array(G.image):G.image});break}}}if(X==="tool")return{...$,content:Y[X]};if(X==="user")return{...$,content:Y[X]};if(X==="assistant")return{...$,content:Y[X]};throw Error(`Encountered unknown role ${X} when converting V5 ModelMessage -> V5 LanguageModelV2Message, input message: ${JSON.stringify($,null,2)}`)}function Av0($){if(typeof $==="string")return $;return $.reduce((Y,X)=>{if(X.type==="text")Y+=X.text;return Y},"")}function JD($,Y){let X=I9.isAIV4UIMessage($)&&$,G=I9.isAIV4UIMessage(Y)&&Y;if(X&&!G)return!1;if(X&&G)return W$.fromAIV4Parts($.parts)===W$.fromAIV4Parts(Y.parts);let J=I9.isAIV4CoreMessage($)&&$,Q=I9.isAIV4CoreMessage(Y)&&Y;if(J&&!Q)return!1;if(J&&Q)return W$.fromAIV4CoreMessageContent(J.content)===W$.fromAIV4CoreMessageContent(Q.content);let W=I9.isMastraMessageV1($)&&$,Z=I9.isMastraMessageV1(Y)&&Y;if(W&&!Z)return!1;if(W&&Z)return W.id===Z.id&&W$.fromAIV4CoreMessageContent(W.content)===W$.fromAIV4CoreMessageContent(Z.content);let K=I9.isMastraDBMessage($)&&$,H=I9.isMastraDBMessage(Y)&&Y;if(K&&!H)return!1;if(K&&H)return K.id===H.id&&W$.fromDBParts(K.content.parts)===W$.fromDBParts(H.content.parts);let z=I9.isAIV5UIMessage($)&&$,V=I9.isAIV5UIMessage(Y)&&Y;if(z&&!V)return!1;if(z&&V)return W$.fromAIV5Parts($.parts)===W$.fromAIV5Parts(Y.parts);let A=I9.isAIV5CoreMessage($)&&$,F=I9.isAIV5CoreMessage(Y)&&Y;if(A&&!F)return!1;if(A&&F)return W$.fromAIV5ModelMessageContent(A.content)===W$.fromAIV5ModelMessageContent(F.content);return!0}function Fv0($){if($.createdAt==null)$.createdAt=Date.now();return $}function J_($,Y){if(Y==="memory"||!Array.isArray($.content.parts))return $;return $.content.parts=$.content.parts.map((X)=>Fv0(X)),$}function se1($,Y,X){if(Y!=="memory"&&"threadId"in $&&$.threadId&&X.memoryInfo&&$.threadId!==X.memoryInfo.threadId)throw Error(`Received input message with wrong threadId. Input ${$.threadId}, expected ${X.memoryInfo.threadId}`);if("resourceId"in $&&$.resourceId&&X.memoryInfo?.resourceId&&$.resourceId!==X.memoryInfo.resourceId)throw Error(`Received input message with wrong resourceId. Input ${$.resourceId}, expected ${X.memoryInfo.resourceId}`);if(I9.isMastraMessageV1($))return J_(yT8($,Y,X),Y);if(I9.isMastraDBMessage($))return J_(bT8($,X),Y);if(I9.isAIV4CoreMessage($))return J_(GD.fromCoreMessage($,X,Y),Y);if(I9.isAIV4UIMessage($))return J_(GD.fromUIMessage($,X,Y),Y);let J="id"in $&&typeof $.id==="string"?$.id:X.newMessageId();if(I9.isAIV6CoreMessage($)){let Q=jU.fromModelMessage($,Y,X),W="metadata"in $&&$.metadata&&typeof $.metadata==="object"&&"createdAt"in $.metadata?$.metadata.createdAt:void 0;return{...Q,id:J,createdAt:X.generateCreatedAt(Y,W),threadId:X.memoryInfo?.threadId,resourceId:X.memoryInfo?.resourceId}}if(I9.isAIV6UIMessage($)){let Q=jU.fromUIMessage($),W="createdAt"in $?$.createdAt:void 0;return{...Q,id:J,createdAt:X.generateCreatedAt(Y,W),threadId:X.memoryInfo?.threadId,resourceId:X.memoryInfo?.resourceId}}if(I9.isAIV5CoreMessage($)){let Q=lz.fromModelMessage($,Y),W="metadata"in $&&$.metadata&&typeof $.metadata==="object"&&"createdAt"in $.metadata?$.metadata.createdAt:void 0;return J_({...Q,id:J,createdAt:X.generateCreatedAt(Y,W),threadId:X.memoryInfo?.threadId,resourceId:X.memoryInfo?.resourceId},Y)}if(I9.isAIV5UIMessage($)){let Q=lz.fromUIMessage($),W="createdAt"in $?$.createdAt:void 0;return J_({...Q,id:J,createdAt:X.generateCreatedAt(Y,W),threadId:X.memoryInfo?.threadId,resourceId:X.memoryInfo?.resourceId},Y)}throw Error(`Found unhandled message ${JSON.stringify($)}`)}function yT8($,Y,X){let G=GD.fromCoreMessage({content:$.content,role:$.role},X,Y);return{id:$.id,role:G.role,createdAt:X.generateCreatedAt(Y,$.createdAt),threadId:$.threadId,resourceId:$.resourceId,content:G.content}}function bT8($,Y){if(!$.id)$.id=Y.newMessageId();if(!($.createdAt instanceof Date))$.createdAt=new Date($.createdAt);if($.content.toolInvocations&&$.content.parts)$.content.toolInvocations=$.content.toolInvocations.map((X)=>{if(!X.args||Object.keys(X.args).length===0){let G=$.content.parts.find((J)=>J.type==="tool-invocation"&&J.toolInvocation&&J.toolInvocation.toolCallId===X.toolCallId&&J.toolInvocation.args&&Object.keys(J.toolInvocation.args).length>0);if(G&&G.type==="tool-invocation")return{...X,args:G.toolInvocation.args}}return X});if(!$.threadId&&Y.memoryInfo?.threadId){if($.threadId=Y.memoryInfo.threadId,!$.resourceId&&Y.memoryInfo?.resourceId)$.resourceId=Y.memoryInfo.resourceId}return $}function hT8($){return $.type.startsWith("source-")}function fT8($){let Y=[];for(let X of $){if(X.type!=="text"){Y.push(X);continue}let G=X,J=le1(G.providerMetadata);if(!J){Y.push(X);continue}let Q=!1;for(let W=Y.length-1;W>=0;W--){let Z=Y[W];if(Z.type==="text"){let K=Z;if(le1(K.providerMetadata)===J)Y[W]={...K,text:K.text+G.text},Q=!0;break}if(!hT8(Z))break}if(Q)continue;Y.push(X)}return Y}function gT8($){return $.map((X)=>{if(X.parts.length===0)return!1;let G=X.parts.filter((Q)=>Q.type!=="tool-invocation"||Q.toolInvocation.state!=="call"&&Q.toolInvocation.state!=="partial-call");if(!G.length)return!1;let J={...X,parts:G};if("toolInvocations"in X&&X.toolInvocations)J.toolInvocations=X.toolInvocations.filter((Q)=>Q.state==="result");return J}).filter((X)=>Boolean(X))}function U04($,Y=!1){let X=-1;for(let W=$.length-1;W>=0;W--)if($[W].role==="user"){X=W;break}let G=(W,Z)=>W.parts.filter((K)=>{if(typeof K.type==="string"&&K.type.startsWith("data-"))return!1;if(K.type==="text"&&(!("text"in K)||K.text===""||K.text?.trim()==="")){if(W.role==="user")return!1;if(W.parts.some((z)=>!(z.type==="text"&&(!("text"in z)||z.text===""||z.text?.trim()===""))))return!1}if(!zQ(K))return!0;if(Y){if(K.state==="output-available"||K.state==="output-error")return!0;if(K.state==="input-available"&&K.providerExecuted&&Z)return!0;return!1}return K.state!=="input-streaming"}),J=-1;if(X!==$.length-1)for(let W=$.length-1;W>X;W--){let Z=$[W];if(Z.role!=="assistant"||Z.parts.length===0)continue;if(G(Z,!0).length>0){J=W;break}}return $.map((W,Z)=>{if(W.parts.length===0)return!1;let K=W.role==="assistant"&&Z===J,H=G(W,K);if(!H.length)return!1;let z=fT8(H);return{...W,parts:z.map((A)=>{if(zQ(A)&&A.state==="output-available")return{...A,output:typeof A.output==="object"&&A.output&&"value"in A.output?A.output.value:A.output};return A})}}).filter((W)=>Boolean(W))}function mT8($){for(let Y of $){if(Y.role!=="assistant")continue;for(let[X,G]of Y.parts.entries()){if(!zQ(G))continue;let J=Y.parts.at(X+1);if(J&&J.type!=="step-start"&&!zQ(J))Y.parts.splice(X+1,0,{type:"step-start"});if(J&&zQ(J)&&!G.providerExecuted&&J.providerExecuted&&(J.state==="output-available"||J.state==="output-error"))Y.parts.splice(X+1,0,{type:"step-start"})}}return $}function aZ($){return ck0(gT8($))}function uT8($,Y){let X=[];for(let J of Y){if(J.role!=="assistant")continue;for(let Q of J.parts)if(Q.type==="file")X.push(Q.providerMetadata??void 0)}if(X.length===0||X.every((J)=>J==null))return $;let G=0;return $.map((J)=>{if(J.role!=="assistant"||typeof J.content==="string")return J;let Q=!1,W=J.content.map((Z)=>{if(Z.type!=="file"||G>=X.length)return Z;let K=X[G++];if(Z.providerOptions||!K)return Z;return Q=!0,{...Z,providerOptions:K}});return Q?{...J,content:W}:J})}function _U($,Y,X=!1){let G=U04($,X),J=mT8(G),Q=[];for(let K of J){let H=MT0([K]);if(H.length===0)continue;let z=K.metadata&&typeof K.metadata==="object"&&"providerMetadata"in K.metadata?K.metadata.providerMetadata:void 0;if(z){let V=-1;for(let A=H.length-1;A>=0;A--)if(H[A]?.role===K.role){V=A;break}if(V!==-1)H[V]={...H[V],providerOptions:z}}Q.push(...H)}let W=uT8(Q,J),Z=DT8(W,Y);return X?NT8(Z):Z}function oe1($,Y,X,G){return _U($.map((J)=>GD.fromCoreMessage(J,X,Y)).map((J)=>lz.toUIMessage(J)),G)}function pT8($){if(typeof $==="string")return{role:"system",content:$};if(I9.isAIV6CoreMessage($)){let Y=jU.fromModelMessage($,"system");return GD.systemToV4Core(Y)}if(I9.isAIV5CoreMessage($)){let Y=lz.fromModelMessage($,"system");return GD.systemToV4Core(Y)}if(I9.isMastraDBMessage($))return GD.systemToV4Core($);return $}function dT8($){try{let[Y,X]=$.split(",");return{mediaType:Y?.split(";")[0]?.split(":")[1],base64Content:X}}catch{return{mediaType:void 0,base64Content:void 0}}}function cT8($){if($ instanceof Uint8Array)return{data:$,mediaType:void 0};if($ instanceof ArrayBuffer)return{data:new Uint8Array($),mediaType:void 0};if(typeof $==="string")try{$=new URL($)}catch{}if($ instanceof URL&&$.protocol==="data:"){let{mediaType:Y,base64Content:X}=dT8($.toString());if(Y==null||X==null)throw new G0({id:"INVALID_DATA_URL_FORMAT",text:`Invalid data URL format in content ${$.toString()}`,domain:"LLM",category:"USER"});return{data:X,mediaType:Y}}return{data:$,mediaType:void 0}}function nT8($){return typeof $==="string"&&$.startsWith("SUQz")||typeof $!=="string"&&$.length>10&&$[0]===73&&$[1]===68&&$[2]===51?iT8($):$}function rT8({data:$,signatures:Y}){let X=nT8($);for(let G of Y)if(typeof X==="string"?X.startsWith(G.base64Prefix):X.length>=G.bytesPrefix.length&&G.bytesPrefix.every((J,Q)=>X[Q]===J))return G.mediaType;return}function ee1($,Y){let X,G=$.type;switch(G){case"image":X=$.image;break;case"file":X=$.data;break;default:throw Error(`Unsupported part type: ${G}`)}let{data:J,mediaType:Q}=cT8(X),W=Q??$.mediaType,Z=J;if(Z instanceof URL&&Y){let K=Y[Z.toString()];if(K)Z=K.data,W??=K.mediaType}switch(G){case"image":{if(Z instanceof Uint8Array||typeof Z==="string")W=rT8({data:Z,signatures:lT8})??W;return{type:"file",mediaType:W??"image/*",filename:void 0,data:Z,providerOptions:$.providerOptions}}case"file":{if(W==null)throw Error("Media type is missing for file part");return{type:"file",mediaType:W,filename:$.filename,data:Z,providerOptions:$.providerOptions}}}}function $04($){let Y=[];for(let X of $){let G=$g(X.url,X.contentType),J=X.url;if(G.type==="raw")J=e60(X.url,X.contentType||"application/octet-stream");let Q;try{Q=new URL(J)}catch{throw Error(`Invalid URL: ${X.url}`)}switch(Q.protocol){case"http:":case"https:":case"gs:":case"s3:":{if(X.contentType?.startsWith("image/"))Y.push({type:"image",image:Q.toString(),mimeType:X.contentType});else{if(!X.contentType)throw Error("If the attachment is not an image, it must specify a content type");Y.push({type:"file",data:Q.toString(),mimeType:X.contentType})}break}case"data:":{if(X.contentType?.startsWith("image/"))Y.push({type:"image",image:J,mimeType:X.contentType});else if(X.contentType?.startsWith("text/"))Y.push({type:"file",data:J,mimeType:X.contentType});else{if(!X.contentType)throw Error("If the attachment is not an image or text, it must specify a content type");Y.push({type:"file",data:J,mimeType:X.contentType})}break}default:throw Error(`Unsupported URL protocol: ${Q.protocol}`)}}return Y}function Q_($){let Y=[],X=aT8(Y);for(let G=0;G<$.length;G++){let J=$[G],Q=G===$.length-1;if(!J?.content)continue;let{content:W,experimental_attachments:Z=[],parts:K}=J.content,{role:H}=J,z={id:J.id,createdAt:J.createdAt,resourceId:J.resourceId,threadId:J.threadId},V=[...Z],A=[];for(let F of K)if(F.type==="file")V.push({url:F.data,contentType:F.mimeType});else A.push(F);switch(H){case"user":{if(A==null){let F=V?[{type:"text",text:W||""},...$04(V)]:{type:"text",text:W||""};X({role:"user",...z,type:"text",content:F})}else{let F=J.content.parts.filter((D)=>D.type==="text").map((D)=>({type:"text",text:D.text})),N=V?[...F,...$04(V)]:F;X({role:"user",...z,type:"text",content:Array.isArray(N)&&N.length===1&&N[0]?.type==="text"&&typeof W<"u"?W:N})}break}case"assistant":{if(J.content.parts!=null){let D=function(){let M=[];for(let w of O)switch(w.type){case"file":case"text":{M.push(w);break}case"reasoning":{for(let I of w.details)switch(I.type){case"text":M.push({type:"reasoning",text:I.text,signature:I.signature});break;case"redacted":M.push({type:"redacted-reasoning",data:I.data});break}break}case"tool-invocation":if(w.toolInvocation.toolName!=="updateWorkingMemory")M.push({type:"tool-call",toolCallId:w.toolInvocation.toolCallId,toolName:w.toolInvocation.toolName,args:w.toolInvocation.args});break}X({role:"assistant",...z,type:M.some((w)=>w.type==="tool-call")?"tool-call":"text",content:typeof M!=="string"&&Array.isArray(M)&&M.length===1&&M[0]?.type==="text"?M[0].text:M});let q=O.filter((w)=>("type"in w)&&w.type==="tool-invocation").map((w)=>w.toolInvocation).filter((w)=>w.toolName!=="updateWorkingMemory").filter((w)=>w.state==="result"&&("result"in w));if(q.length>0)X({role:"tool",...z,type:"tool-result",content:q.map((w)=>{let{toolCallId:I,toolName:P,result:_}=w;return{type:"tool-result",toolCallId:I,toolName:P,result:_}})});O=[],B=!1,L++},L=0,B=!1,O=[];for(let M of J.content.parts)switch(M.type){case"text":{if(B)D();O.push(M);break}case"file":case"reasoning":{O.push(M);break}case"tool-invocation":{if(O.some((q)=>q.type==="text"||q.type==="file"||q.type==="reasoning")||(M.toolInvocation.step??0)!==L)D();O.push(M),B=!0;break}}D();let E=J.content.toolInvocations;if(E&&E.length>0){let M=new Set;for(let q of J.content.parts)if(q.type==="tool-invocation"&&q.toolInvocation.toolCallId)M.add(q.toolInvocation.toolCallId);let R=E.filter((q)=>!M.has(q.toolCallId)&&q.toolName!=="updateWorkingMemory");if(R.length>0){let q=new Map;for(let I of R){let P=I.step??0;if(!q.has(P))q.set(P,[]);q.get(P).push(I)}let w=Array.from(q.keys()).sort((I,P)=>I-P);for(let I of w){let P=q.get(I);X({role:"assistant",...z,type:"tool-call",content:[...P.map(({toolCallId:C,toolName:k,args:S})=>({type:"tool-call",toolCallId:C,toolName:k,args:S}))]});let _=P.filter((C)=>C.state==="result"&&("result"in C));if(_.length>0)X({role:"tool",...z,type:"tool-result",content:_.map((C)=>{let{toolCallId:k,toolName:S,result:T}=C;return{type:"tool-result",toolCallId:k,toolName:S,result:T}})})}}}break}let F=J.content.toolInvocations;if(F==null||F.length===0){X({role:"assistant",...z,content:W||"",type:"text"});break}let N=F.reduce((D,L)=>{return Math.max(D,L.step??0)},0);for(let D=0;D<=N;D++){let L=F.filter((O)=>(O.step??0)===D&&O.toolName!=="updateWorkingMemory");if(L.length===0)continue;X({role:"assistant",...z,type:"tool-call",content:[...Q&&W&&D===0?[{type:"text",text:W}]:[],...L.map(({toolCallId:O,toolName:E,args:M})=>({type:"tool-call",toolCallId:O,toolName:E,args:M}))]});let B=L.filter((O)=>O.state==="result"&&("result"in O));if(B.length>0)X({role:"tool",...z,type:"tool-result",content:B.map((O)=>{let{toolCallId:E,toolName:M,result:R}=O;return{type:"tool-result",toolCallId:E,toolName:M,result:R}})})}if(W&&!Q)X({role:"assistant",...z,type:"text",content:W||""});break}}}return Y}async function oT8({messages:$,downloadConcurrency:Y=10,downloadRetries:X=3,supportedUrls:G}){let J=(await Promise.resolve().then(() => (NC0(),$d1))).default,Q=$.filter((K)=>K.role==="user").map((K)=>K.content).filter((K)=>Array.isArray(K)).flat().filter((K)=>K.type==="image"||K.type==="file").map((K)=>{let H=K.mediaType??(K.type==="image"?"image/*":void 0),z=K.type==="image"?K.image:K.data;if(typeof z==="string")try{z=new URL(z)}catch{}return{mediaType:H,data:z}}).filter((K)=>K.data instanceof URL).map((K)=>{return{url:K.data,isUrlSupportedByModel:K.mediaType!=null&&de1({url:K.data.toString(),mediaType:K.mediaType,supportedUrls:G??{}})}}),Z=(await J(Q,async(K)=>{if(K.isUrlSupportedByModel)return null;return{url:K.url.toString(),...await sT8({url:K.url,downloadRetries:X})}},{concurrency:Y})).filter((K)=>K?.data!=null).map(({url:K,data:H,mediaType:z})=>[K,{data:H,mediaType:z}]);return Object.fromEntries(Z)}function tT8($){return{...$,createdAt:$.createdAt.toISOString()}}function eT8($){return{...$,createdAt:new Date($.createdAt)}}function $C8($){return $.map(tT8)}function YC8($){return $.map(eT8)}var QT8,I9=class ${static isMastraDBMessage(Y){return Boolean("content"in Y&&Y.content&&!Array.isArray(Y.content)&&typeof Y.content!=="string"&&"format"in Y.content&&Y.content.format===2)}static isMastraMessageV1(Y){return!$.isMastraDBMessage(Y)&&(("threadId"in Y)||("resourceId"in Y))}static isMastraMessage(Y){return $.isMastraDBMessage(Y)||$.isMastraMessageV1(Y)}static isAIV4UIMessage(Y){return!$.isMastraMessage(Y)&&!$.isAIV4CoreMessage(Y)&&"parts"in Y&&!$.hasAIV5UIMessageCharacteristics(Y)}static isAIV6UIMessage(Y){return!$.isMastraMessage(Y)&&!$.isAIV4CoreMessage(Y)&&"parts"in Y&&$.hasAIV6UIMessageCharacteristics(Y)}static isAIV5UIMessage(Y){return!$.isMastraMessage(Y)&&!$.isAIV6UIMessage(Y)&&!$.isAIV5CoreMessage(Y)&&"parts"in Y&&$.hasAIV5UIMessageCharacteristics(Y)}static isAIV4CoreMessage(Y){return!$.isMastraMessage(Y)&&!("parts"in Y)&&"content"in Y&&!$.hasAIV5CoreMessageCharacteristics(Y)}static isAIV6CoreMessage(Y){return!$.isMastraMessage(Y)&&!("parts"in Y)&&"content"in Y&&$.hasAIV6CoreMessageCharacteristics(Y)}static isAIV5CoreMessage(Y){return!$.isMastraMessage(Y)&&!$.isAIV6CoreMessage(Y)&&!("parts"in Y)&&"content"in Y&&$.hasAIV5CoreMessageCharacteristics(Y)}static hasAIV6UIMessageCharacteristics(Y){if(!("parts"in Y)||!Y.parts)return!1;for(let X of Y.parts){if(X.type==="source-document")return!0;if(X.type==="dynamic-tool")return!0;if("toolCallId"in X&&"state"in X&&(X.state==="approval-requested"||X.state==="approval-responded"||X.state==="output-denied"))return!0}return!1}static hasAIV5UIMessageCharacteristics(Y){if("toolInvocations"in Y||"reasoning"in Y||"experimental_attachments"in Y||"data"in Y||"annotations"in Y)return!1;if(!Y.parts)return!1;for(let X of Y.parts){if("metadata"in X)return!0;if("toolInvocation"in X)return!1;if("toolCallId"in X)return!0;if(X.type==="source")return!1;if(X.type==="source-url")return!0;if(X.type==="reasoning"){if("state"in X||"text"in X)return!0;if("reasoning"in X||"details"in X)return!1}if(X.type==="file"&&"mediaType"in X)return!0}return!1}static hasAIV6CoreMessageCharacteristics(Y){if("parts"in Y||typeof Y.content==="string")return!1;return Y.content.some((X)=>X.type==="tool-approval-request"||X.type==="tool-approval-response")}static hasAIV5CoreMessageCharacteristics(Y){if("experimental_providerMetadata"in Y)return!1;if(typeof Y.content==="string")return!0;for(let X of Y.content){if(X.type==="tool-result"&&"output"in X)return!0;if(X.type==="tool-call"&&"input"in X)return!0;if(X.type==="tool-result"&&"result"in X)return!1;if(X.type==="tool-call"&&"args"in X)return!1;if("mediaType"in X)return!0;if("mimeType"in X)return!1;if("experimental_providerMetadata"in X)return!1;if(X.type==="reasoning"&&"signature"in X)return!1;if(X.type==="redacted-reasoning")return!1}return!0}static getRole(Y){if(Y.role==="assistant"||Y.role==="tool")return"assistant";if(Y.role==="user")return"user";if(Y.role==="system")return"system";throw Error(`BUG: add handling for message role ${Y.role} in message ${JSON.stringify(Y,null,2)}`)}},VT8,GD=class{static toUIMessage($,Y){let X=Y?.transformToolPayloads??!0,G=$.content.experimental_attachments?[...$.content.experimental_attachments]:[],J=typeof $.content.content==="string"&&$.content.content!==""?$.content.content:($.content.parts??[]).reduce((V,A)=>{if(A.type==="text")return A.text;return V},""),Q=[],W=$.content.parts??[];if(W.length)for(let V of W)if(V.type==="file"){let A;if(typeof V.data==="string")if($g(V.data,V.mimeType).type==="raw")A=e60(V.data,V.mimeType||"application/octet-stream");else A=V.data;else A=V.data;G.push({contentType:V.mimeType,url:A})}else if(V.type==="tool-invocation"&&(V.toolInvocation.state==="call"||V.toolInvocation.state==="partial-call"))continue;else if(V.type==="tool-invocation"){let A={...V.toolInvocation,args:W_(V.providerMetadata,"input-available",V.toolInvocation.args,X),...V.toolInvocation.state==="result"?{result:W_(V.providerMetadata,"output-available",W_(V.providerMetadata,"error",V.toolInvocation.result,X),X)}:{}},F=-1,N=-1;for(let D of W){if(D.type==="step-start")F++;if(D.type==="tool-invocation"&&D.toolInvocation.toolCallId===V.toolInvocation.toolCallId){N=F;break}}if(N>=0){let D={step:N,...A};Q.push({type:"tool-invocation",toolInvocation:D})}else Q.push({type:"tool-invocation",toolInvocation:A})}else Q.push(V);if(Q.length===0&&G.length>0)Q.push({type:"text",text:""});let K=($.role==="signal"?Uv0($):void 0)==="user-message",H=OT8($.role==="signal"&&!K?[ET8($,$.content.content||J)]:Q);if($.role==="user"){let V={id:$.id,role:$.role,content:$.content.content||J,createdAt:$.createdAt,parts:H,experimental_attachments:G};if($.content.metadata)V.metadata=$.content.metadata;return V}else if($.role==="assistant"){let V=Array.isArray($.content.content)&&$.content.content.length===1&&$.content.content[0].type==="text",A={id:$.id,role:$.role,content:V?J:$.content.content||J,createdAt:$.createdAt,parts:H,reasoning:void 0,toolInvocations:"toolInvocations"in $.content?$.content.toolInvocations?.filter((F)=>F.state==="result").map((F)=>{let N=$.content.parts?.find((D)=>D.type==="tool-invocation"&&D.toolInvocation.toolCallId===F.toolCallId)?.providerMetadata;return BT8(F,N,X)}):void 0};if($.content.metadata)A.metadata=$.content.metadata;return A}let z={id:$.id,role:$.role==="signal"?K?"user":"system":$.role,content:$.role==="signal"&&!K?"":$.content.content||J,createdAt:$.createdAt,parts:H,experimental_attachments:G};if($.content.metadata)z.metadata=$.content.metadata;return z}static systemToV4Core($){if($.role!=="system"||!$.content.content)throw new G0({id:"INVALID_SYSTEM_MESSAGE_FORMAT",domain:"AGENT",category:"USER",text:"Invalid system message format. System messages must include 'role' and 'content' properties. The content should be a string.",details:{receivedMessage:JSON.stringify($,null,2)}});let Y={role:"system",content:$.content.content};if($.content.providerMetadata)Y.experimental_providerMetadata=$.content.providerMetadata;return Y}static fromUIMessage($,Y,X){let J={format:2,parts:$.parts?ie1($.parts):[]};if($.toolInvocations)J.toolInvocations=$.toolInvocations;if($.reasoning)J.reasoning=$.reasoning;if($.annotations)J.annotations=$.annotations;if($.experimental_attachments)J.experimental_attachments=$.experimental_attachments;if("metadata"in $&&$.metadata!==null&&$.metadata!==void 0)J.metadata=$.metadata;return{id:$.id||Y.newMessageId(),role:I9.getRole($),createdAt:Y.generateCreatedAt(X,$.createdAt),threadId:Y.memoryInfo?.threadId,resourceId:Y.memoryInfo?.resourceId,content:J}}static fromCoreMessage($,Y,X){let G="id"in $?$.id:Y.newMessageId(),J=[],Q=[],W=[],Z=X==="response"&&Array.isArray($.content)&&$.content.length===1&&$.content[0]&&$.content[0].type==="text"&&"text"in $.content[0]&&$.content[0].text;if(Z&&X==="response")$.content=Z;if(typeof $.content==="string")J.push({type:"text",text:$.content});else if(Array.isArray($.content))for(let V of $.content)switch(V.type){case"text":{let A=J.at(-1);if($.role==="assistant"&&A&&A.type==="tool-invocation")J.push({type:"step-start"});let F={type:"text",text:V.text};if(V.providerOptions)F.providerMetadata=V.providerOptions;J.push(F);break}case"tool-call":{let A={type:"tool-invocation",toolInvocation:{state:"call",toolCallId:V.toolCallId,toolName:V.toolName,args:V.args}};if(V.providerOptions)A.providerMetadata=V.providerOptions;J.push(A);break}case"tool-result":{let A={},F=$.content.find((L)=>L.type==="tool-call"&&L.toolCallId===V.toolCallId);if(F&&F.type==="tool-call")A=F.args;if(Object.keys(A).length===0&&Y.dbMessages)A=Vv0(Y.dbMessages,V.toolCallId);let N={state:"result",toolCallId:V.toolCallId,toolName:V.toolName,result:V.result??"",args:A},D={type:"tool-invocation",toolInvocation:N};if(V.providerOptions)D.providerMetadata=V.providerOptions;J.push(D),W.push(N)}break;case"reasoning":{let A={type:"reasoning",reasoning:"",details:[{type:"text",text:V.text,signature:V.signature}]};if(V.providerOptions)A.providerMetadata=V.providerOptions;J.push(A)}break;case"redacted-reasoning":{let A={type:"reasoning",reasoning:"",details:[{type:"redacted",data:V.data}]};if(V.providerOptions)A.providerMetadata=V.providerOptions;J.push(A)}break;case"image":{let A={type:"file",data:HT8(V.image),mimeType:V.mimeType};if(V.providerOptions)A.providerMetadata=V.providerOptions;J.push(A);break}case"file":{if(V.data instanceof URL){let A={type:"file",data:V.data.toString(),mimeType:V.mimeType};if(V.providerOptions)A.providerMetadata=V.providerOptions;if(V.filename)A.filename=V.filename;J.push(A)}else if(typeof V.data==="string"){let A=$g(V.data,V.mimeType);if(A.type==="url"||A.type==="dataUri"){let F={type:"file",data:V.data,mimeType:A.mimeType||"image/png"};if(V.providerOptions)F.providerMetadata=V.providerOptions;if(V.filename)F.filename=V.filename;J.push(F)}else try{let F={type:"file",mimeType:A.mimeType||"image/png",data:Z_(V.data)};if(V.providerOptions)F.providerMetadata=V.providerOptions;if(V.filename)F.filename=V.filename;J.push(F)}catch(F){console.error(`Failed to convert binary data to base64 in CoreMessage file part: ${F}`,F)}}else try{let A={type:"file",mimeType:V.mimeType,data:Z_(V.data)};if(V.providerOptions)A.providerMetadata=V.providerOptions;if(V.filename)A.filename=V.filename;J.push(A)}catch(A){console.error(`Failed to convert binary data to base64 in CoreMessage file part: ${A}`,A)}break}}let H={format:2,parts:ie1(J)};if(W.length)H.toolInvocations=W;if(typeof $.content==="string")H.content=$.content;if(Q.length)H.experimental_attachments=Q;if($.providerOptions)H.providerMetadata=$.providerOptions;else if("experimental_providerMetadata"in $&&$.experimental_providerMetadata)H.providerMetadata=$.experimental_providerMetadata;if("metadata"in $&&$.metadata!==null&&$.metadata!==void 0)H.metadata=$.metadata;let z="metadata"in $&&$.metadata&&typeof $.metadata==="object"&&"createdAt"in $.metadata?$.metadata.createdAt:void 0;return{id:G,role:I9.getRole($),createdAt:Y.generateCreatedAt(X,z),threadId:Y.memoryInfo?.threadId,resourceId:Y.memoryInfo?.resourceId,content:H}}},MT8,ne1="unknown_tool",lz=class{static toUIMessage($,Y){let G=($.role==="signal"?Q04($):void 0)==="user-message",J=Y?.transformToolPayloads??!0,Q=[],W={...$.content.metadata||{}};if($.role==="signal"&&!G)Q.push(qT8($));if($.createdAt)W.createdAt=$.createdAt;if($.threadId)W.threadId=$.threadId;if($.resourceId)W.resourceId=$.resourceId;if($.content.providerMetadata)W.providerMetadata=$.content.providerMetadata;if($.role==="signal"&&!G)return{id:$.id,role:"system",metadata:W,parts:Q};let Z=$.content.parts?.some((L)=>L.type==="tool-invocation");if($.content.toolInvocations&&!Z)for(let L of $.content.toolInvocations)if(L.state==="result")Q.push({type:`tool-${L.toolName}`,toolCallId:L.toolCallId,state:"output-available",input:L.args,output:L.result});else Q.push({type:`tool-${L.toolName}`,toolCallId:L.toolCallId,state:L.state==="call"?"input-available":"input-streaming",input:L.args});let K=$.content.parts?.some((L)=>L.type==="reasoning"),H=$.content.parts?.some((L)=>L.type==="file");if($.content.reasoning&&!K)Q.push({type:"reasoning",text:$.content.reasoning});let z=new Set;if($.content.experimental_attachments&&!H)for(let L of $.content.experimental_attachments)z.add(L.url),Q.push({type:"file",url:L.url,mediaType:L.contentType||"unknown"});let V=!1;if($.content.parts)for(let L of $.content.parts){if(L.type==="tool-invocation"&&L.toolInvocation){let B=L.toolInvocation;if(B.state==="result")Q.push({type:`tool-${B.toolName}`,toolCallId:B.toolCallId,input:G_(L.providerMetadata,"input-available",B.args,J),output:G_(L.providerMetadata,"output-available",G_(L.providerMetadata,"error",B.result,J),J),state:"output-available",callProviderMetadata:YD(L.providerMetadata,L.createdAt),providerExecuted:L.providerExecuted});else if(B.state==="output-error")Q.push({type:`tool-${B.toolName}`,toolCallId:B.toolCallId,input:G_(L.providerMetadata,"input-available",B.args,J),errorText:G_(L.providerMetadata,"error",B.errorText||"",J),state:"output-error",callProviderMetadata:YD(L.providerMetadata,L.createdAt),providerExecuted:L.providerExecuted});else Q.push({type:`tool-${B.toolName}`,toolCallId:B.toolCallId,input:G_(L.providerMetadata,"input-available",B.args,J),state:"input-available",callProviderMetadata:YD(L.providerMetadata,L.createdAt),providerExecuted:L.providerExecuted});continue}if(L.type==="reasoning"){let B=L.reasoning||(L.details?.reduce((O,E)=>{if(E.type==="text"&&E.text)return O+E.text;return O},"")??"");if(B||L.details?.length){let O={type:"reasoning",text:B||"",state:"done"};O.providerMetadata=YD(L.providerMetadata,L.createdAt),Q.push(O)}continue}if(L.type==="tool-invocation"||L.type.startsWith("tool-"))continue;if(L.type==="file"){if(typeof L.data==="string"&&z.has(L.data))continue;let B=typeof L.data==="string"?$g(L.data,L.mimeType):{type:"raw",mimeType:L.mimeType};if(B.type==="url"&&typeof L.data==="string"){let O={type:"file",url:L.data,mediaType:B.mimeType||"image/png"};O.providerMetadata=YD(L.providerMetadata,L.createdAt),Q.push(O)}else{let O,E=L.mimeType;if(typeof L.data==="string"){let w=o60(L.data);if(w.isDataUri){if(O=w.base64Content,w.mimeType)E=E||w.mimeType}else O=L.data}else O=L.data;let M=E||"image/png",R;if(typeof O==="string"&&O.startsWith("data:"))R=O;else R=e60(O,M);let q={type:"file",url:R,mediaType:M};q.providerMetadata=YD(L.providerMetadata,L.createdAt),Q.push(q)}}else if(L.type==="source"){let B={type:"source-url",url:L.source.url,sourceId:L.source.id,title:L.source.title};B.providerMetadata=YD(L.providerMetadata,L.createdAt),Q.push(B)}else if(L.type==="source-document")continue;else if(L.type==="text"){let B={type:"text",text:L.text};B.providerMetadata=YD(L.providerMetadata,L.createdAt),Q.push(B),V=!0}else if(L.type==="data-tool-call-suspended"||L.type==="data-tool-call-approval")Q.push({...L,data:Zv0(L.data,L.type==="data-tool-call-suspended"?"suspend":"approval",J)});else Q.push(L),V=!0}if($.content.content&&!V)Q.push({type:"text",text:$.content.content});let A=new Set(Q.filter((L)=>L.type==="data-tool-call-suspended"||L.type==="data-tool-call-approval").map((L)=>{let B=L.data;return typeof B?.toolCallId==="string"?B.toolCallId:void 0}).filter((L)=>typeof L==="string")),F=(L,B)=>{let O=Q.findIndex((E)=>E.type.startsWith("tool-")&&E.toolCallId===L);if(O===-1){Q.push(B);return}Q.splice(O+1,0,B)},N=W.suspendedTools;if(N&&typeof N==="object")for(let L of Object.values(N)){if(!L||typeof L!=="object")continue;let B="toolCallId"in L?L.toolCallId:void 0;if(typeof B!=="string"||A.has(B))continue;F(B,{type:"data-tool-call-suspended",data:Zv0(L,"suspend",J)}),A.add(B)}let D=W.pendingToolApprovals;if(D&&typeof D==="object")for(let L of Object.values(D)){if(!L||typeof L!=="object")continue;let B="toolCallId"in L?L.toolCallId:void 0;if(typeof B!=="string"||A.has(B))continue;F(B,{type:"data-tool-call-approval",data:Zv0(L,"approval",J)}),A.add(B)}return{id:$.id,role:$.role==="signal"?G?"user":"system":$.role,metadata:W,parts:Q}}static fromUIMessage($){let{parts:Y,metadata:X}=$,G=X||{},J=G.createdAt,Q=J?typeof J==="string"?new Date(J):J instanceof Date?J:new Date:new Date,W=G.threadId,Z=G.resourceId,K={...G};delete K.createdAt,delete K.threadId,delete K.resourceId;let H=Y.filter((E)=>zQ(E)),z=Y.filter((E)=>E.type==="reasoning"),V=Y.filter((E)=>E.type==="file"),A=Y.filter((E)=>E.type==="text"),F=void 0;if(H.length>0)F=H.map((E)=>{let M=ae1(E);if(E.state==="output-available")return{args:E.input,result:typeof E.output==="object"&&E.output&&"value"in E.output?E.output.value:E.output,toolCallId:E.toolCallId,toolName:M,state:"result"};return{args:E.input,toolCallId:E.toolCallId,toolName:M,state:"call"}});let N=void 0;if(z.length>0)N=z.map((E)=>E.text).join(`
`);let D=void 0;if(V.length>0)D=V.map((E)=>({url:E.url||"",contentType:E.mediaType}));let L=void 0;if(A.length>0)L=A.map((E)=>E.text).join("");let B=Y.map((E)=>{if(zQ(E)){let M=ae1(E),R="callProviderMetadata"in E?E.callProviderMetadata:void 0;if(E.state==="output-available")return{type:"tool-invocation",toolInvocation:{toolCallId:E.toolCallId,toolName:M,args:E.input,result:typeof E.output==="object"&&E.output&&"value"in E.output?E.output.value:E.output,state:"result"},providerMetadata:R,createdAt:SW(R)};return{type:"tool-invocation",toolInvocation:{toolCallId:E.toolCallId,toolName:M,args:E.input,state:"call"},providerMetadata:R,createdAt:SW(R)}}if(E.type==="reasoning")return{type:"reasoning",reasoning:"",details:[{type:"text",text:E.text}],providerMetadata:E.providerMetadata,createdAt:SW(E.providerMetadata)};if(E.type==="file")return{type:"file",mimeType:E.mediaType,data:E.url||"",providerMetadata:E.providerMetadata,createdAt:SW(E.providerMetadata),...E.filename?{filename:E.filename}:{}};if(E.type==="source-url")return{type:"source",source:{url:E.url,sourceType:"url",id:E.url,providerMetadata:E.providerMetadata},providerMetadata:E.providerMetadata,createdAt:SW(E.providerMetadata)};if(E.type==="text")return{type:"text",text:E.text,providerMetadata:E.providerMetadata,createdAt:SW(E.providerMetadata)};if(E.type==="step-start")return E;if(typeof E.type==="string"&&E.type.startsWith("data-"))return{type:E.type,data:"data"in E?E.data:void 0};return null}).filter((E)=>E!==null),O=re1(B);return{id:$.id,role:$.role,createdAt:Q,threadId:W,resourceId:Z,content:{format:2,parts:O,toolInvocations:F,reasoning:N,experimental_attachments:D,content:L,metadata:Object.keys(K).length>0?K:void 0}}}static getDataStringFromAIV5DataPart($){let Y,X;if("data"in $)Y=$.mediaType||"application/octet-stream",X=$.data;else if("image"in $)Y=$.mediaType||"image/jpeg",X=$.image;else if("url"in $&&typeof $.url==="string")return $.url;else throw new G0({id:"MASTRA_AIV5_DATA_PART_INVALID",domain:"AGENT",category:"USER",text:"Invalid AIV5 data part in getDataStringFromAIV5DataPart",details:{part:$}});if(X instanceof URL)return X.toString();else if(X instanceof Buffer){let G=X.toString("base64");return`data:${Y};base64,${G}`}else if(typeof X==="string")return X.startsWith("data:")||X.startsWith("http")?X:`data:${Y};base64,${X}`;else if(X instanceof Uint8Array){let G=Buffer.from(X).toString("base64");return`data:${Y};base64,${G}`}else if(X instanceof ArrayBuffer){let G=Buffer.from(X).toString("base64");return`data:${Y};base64,${G}`}else return""}static fromModelMessage($,Y){let X=Array.isArray($.content)?$.content:[{type:"text",text:$.content}],G=[],J=[],Q=[],W=[];for(let A of X)if(A.type==="text"){let F={type:"text",text:A.text};if(A.providerOptions)F.providerMetadata=A.providerOptions,F.createdAt=SW(A.providerOptions);G.push(F)}else if(A.type==="tool-call"){let F=A,N={type:"tool-invocation",toolInvocation:{toolCallId:F.toolCallId,toolName:I$(F.toolName),args:F.input,state:"call"}};if(A.providerOptions)N.providerMetadata=A.providerOptions,N.createdAt=SW(A.providerOptions);G.push(N),J.push({toolCallId:F.toolCallId,toolName:I$(F.toolName),args:F.input,state:"call"})}else if(A.type==="tool-result"){let F=A,N=J.find((B)=>B.toolCallId===F.toolCallId),D=G.find((B)=>B.type==="tool-invocation"&&("toolInvocation"in B)&&B.toolInvocation.toolCallId===F.toolCallId),L=(B,O)=>{O.state="result",O.result=typeof B.output==="object"&&B.output&&"value"in B.output?B.output.value:B.output};if(N)L(F,N);else{let B={state:"call",toolCallId:F.toolCallId,toolName:I$(F.toolName),args:{}};L(F,B),J.push(B)}if(D&&D.type==="tool-invocation"){if(L(F,D.toolInvocation),F.providerOptions)D.providerMetadata=F.providerOptions,D.createdAt=SW(F.providerOptions)??D.createdAt}else{let B={type:"tool-invocation",toolInvocation:{toolCallId:F.toolCallId,toolName:I$(F.toolName),args:{},state:"call"}};if(L(F,B.toolInvocation),F.providerOptions)B.providerMetadata=F.providerOptions,B.createdAt=SW(F.providerOptions);G.push(B)}}else if(A.type==="reasoning"){let F={type:"reasoning",reasoning:"",details:[{type:"text",text:A.text}]};if(A.providerOptions)F.providerMetadata=A.providerOptions,F.createdAt=SW(A.providerOptions);G.push(F),Q.push(A.text)}else if(A.type==="image"){let F=A,N=F.mediaType||"image/jpeg",D=this.getDataStringFromAIV5DataPart(F),L={type:"file",data:D,mimeType:N};if(A.providerOptions)L.providerMetadata=A.providerOptions,L.createdAt=SW(A.providerOptions);G.push(L),W.push({url:D,contentType:N})}else if(A.type==="file"){let F=A,N=F.mediaType||"application/octet-stream",D=this.getDataStringFromAIV5DataPart(F),L={type:"file",data:D,mimeType:N};if(A.providerOptions)L.providerMetadata=A.providerOptions,L.createdAt=SW(A.providerOptions);if(F.filename)L.filename=F.filename;G.push(L),W.push({url:D,contentType:N})}let Z=re1(G),K=Z.filter((A)=>A.type==="text").map((A)=>A.text).join(`
`),H="metadata"in $&&$.metadata!==null&&$.metadata!==void 0?$.metadata:{},V={id:"id"in $&&typeof $.id==="string"?$.id:`msg-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,role:$.role==="tool"?"assistant":$.role,createdAt:new Date,content:{format:2,parts:Z,toolInvocations:J.length>0?J:void 0,reasoning:Q.length>0?Q.join(`
`):void 0,experimental_attachments:W.length>0?W:void 0,content:K||void 0,metadata:Object.keys(H).length>0?H:void 0}};if($.providerOptions)V.content.providerMetadata=$.providerOptions;return V}},jU=class ${static toUIMessage(Y){let X=lz.toUIMessage(Y),G=X.metadata||{},J=[];if(Y.role==="signal"&&X.role!=="user")return{id:Y.id,role:"system",metadata:Object.keys(G).length>0?G:void 0,parts:X.parts.map((z)=>$.toUIPartFromV5(z))};let Q=Y.content.parts||[],W=Q.some((z)=>z.type==="tool-invocation"),Z=Q.some((z)=>z.type==="reasoning"),K=Q.some((z)=>z.type==="file"),H=Q.some((z)=>z.type==="text");for(let z of Q)J.push($.toUIPart(z));if(!W||!Z||!K||!H)for(let z of X.parts){if(zQ(z)){if(!W)J.push($.toUIPartFromV5(z));continue}if(z.type==="reasoning"){if(!Z)J.push($.toUIPartFromV5(z));continue}if(z.type==="file"){if(!K)J.push($.toUIPartFromV5(z));continue}if(z.type==="text"&&!H)J.push($.toUIPartFromV5(z))}return{id:Y.id,role:Y.role==="signal"?X.role:Y.role,metadata:Object.keys(G).length>0?G:void 0,parts:J}}static fromUIMessage(Y){let X=Y.parts.filter((Z)=>{if(Z.type==="source-document")return!1;if(Uk0(Z))return!1;return!0}),G=lz.fromUIMessage({...Y,parts:X.map((Z)=>CT8(Z))}),J=G.content.parts||[],Q=[],W=0;for(let Z of Y.parts){if(Z.type==="source-document"){Q.push($J({type:"source-document",sourceId:Z.sourceId,mediaType:Z.mediaType,title:Z.title},{filename:Z.filename,providerMetadata:Z04(Z.providerMetadata)}));continue}if(!Uk0(Z)){let K=J[W++];if(K)Q.push(K);continue}Q.push(TT8(Z))}return{...G,content:{...G.content,parts:Q,toolInvocations:vT8(Q)||G.content.toolInvocations}}}static fromModelMessage(Y,X,G={}){let J=Array.isArray(Y.content)?Y.content:[{type:"text",text:Y.content}],Q=J.filter((K)=>K.type!=="tool-approval-request"&&K.type!=="tool-approval-response"),W=lz.fromModelMessage({...Y,content:Q},X),Z=[...W.content.parts];if(Y.role==="assistant"){let K=new Map;for(let H of J){if(H.type==="tool-call"){K.set(H.toolCallId,{toolName:I$(H.toolName),args:W04(H.input)});continue}if(H.type!=="tool-approval-request")continue;let z=K.get(H.toolCallId),V=ST8(Z,H.toolCallId);if(V){V.toolInvocation.state="approval-requested",V.toolInvocation.approval={id:H.approvalId};continue}Z.push(cO({toolCallId:H.toolCallId,toolName:z?.toolName||"unknown",args:z?.args||{},state:"approval-requested",approval:{id:H.approvalId}}))}}else if(Y.role==="tool")for(let K of J){if(K.type!=="tool-approval-response")continue;let H=kT8(G.dbMessages,K.approvalId);if(!H)continue;Z.push(cO({toolCallId:H.toolInvocation.toolCallId,toolName:H.toolInvocation.toolName,args:H.toolInvocation.args,state:"approval-responded",approval:{id:K.approvalId,approved:K.approved,reason:K.reason},providerMetadata:H.providerMetadata,providerExecuted:H.providerExecuted,title:H.title}))}return{...W,content:{...W.content,parts:Z}}}static toUIPart(Y){if(Y.type==="tool-invocation"){let X=$J({type:`tool-${I$(Y.toolInvocation.toolName)}`,toolCallId:Y.toolInvocation.toolCallId,providerExecuted:Y.providerExecuted},{callProviderMetadata:Y.providerMetadata,title:Y.title});switch(Y.toolInvocation.state){case"partial-call":return{...X,state:"input-streaming",input:wU(Y.providerMetadata,"input-available",Y.toolInvocation.args)};case"call":return{...X,state:"input-available",input:wU(Y.providerMetadata,"input-available",Y.toolInvocation.args)};case"approval-requested":return{...X,state:"approval-requested",input:wU(Y.providerMetadata,"input-available",Y.toolInvocation.args),approval:{id:Y.toolInvocation.approval?.id||Y.toolInvocation.toolCallId}};case"approval-responded":return{...X,state:"approval-responded",input:wU(Y.providerMetadata,"input-available",Y.toolInvocation.args),approval:{id:Y.toolInvocation.approval?.id||Y.toolInvocation.toolCallId,approved:Y.toolInvocation.approval?.approved??!1,reason:Y.toolInvocation.approval?.reason}};case"output-error":return $J({...X,state:"output-error",input:wU(Y.providerMetadata,"input-available",Y.toolInvocation.args),errorText:wU(Y.providerMetadata,"error",Y.toolInvocation.errorText||"")},{rawInput:Y.toolInvocation.rawInput,approval:Y.toolInvocation.approval?.approved===!0?{id:Y.toolInvocation.approval.id,approved:!0,reason:Y.toolInvocation.approval.reason}:void 0});case"output-denied":return{...X,state:"output-denied",input:wU(Y.providerMetadata,"input-available",Y.toolInvocation.args),approval:{id:Y.toolInvocation.approval?.id||Y.toolInvocation.toolCallId,approved:!1,reason:Y.toolInvocation.approval?.reason}};case"result":return $J({...X,state:"output-available",input:wU(Y.providerMetadata,"input-available",Y.toolInvocation.args),output:wU(Y.providerMetadata,"output-available",wU(Y.providerMetadata,"error",Y.toolInvocation.result))},{preliminary:Y.preliminary,approval:Y.toolInvocation.approval?.approved===!0?{id:Y.toolInvocation.approval.id,approved:!0,reason:Y.toolInvocation.approval.reason}:void 0});default:throw Error(`Unhandled toolInvocation.state: ${String(Y.toolInvocation.state)}`)}}if(Y.type==="source-document")return $J({type:"source-document",sourceId:Y.sourceId,mediaType:Y.mediaType,title:Y.title},{filename:Y.filename,providerMetadata:Y.providerMetadata});return $.toUIPartFromV5(lz.toUIMessage({id:"tmp",role:"assistant",createdAt:new Date,content:{format:2,parts:[Y]}}).parts[0])}static toUIPartFromV5(Y){if(zQ(Y)){let X={type:Y.type,toolCallId:Y.toolCallId,providerExecuted:Y.providerExecuted};switch(Y.state){case"input-streaming":return $J({...X,state:"input-streaming",input:Y.input},{callProviderMetadata:"callProviderMetadata"in Y?Y.callProviderMetadata:void 0,title:"title"in Y?Y.title:void 0});case"input-available":return $J({...X,state:"input-available",input:Y.input},{callProviderMetadata:"callProviderMetadata"in Y?Y.callProviderMetadata:void 0,title:"title"in Y?Y.title:void 0});case"output-available":return $J({...X,state:"output-available",input:Y.input,output:Y.output},{callProviderMetadata:"callProviderMetadata"in Y?Y.callProviderMetadata:void 0,preliminary:"preliminary"in Y?Y.preliminary:void 0,title:"title"in Y?Y.title:void 0});case"output-error":return $J({...X,state:"output-error",input:Y.input,errorText:Y.errorText},{rawInput:"rawInput"in Y?Y.rawInput:void 0,callProviderMetadata:"callProviderMetadata"in Y?Y.callProviderMetadata:void 0,title:"title"in Y?Y.title:void 0})}}switch(Y.type){case"text":return $J({type:"text",text:Y.text},{providerMetadata:Y.providerMetadata});case"reasoning":return $J({type:"reasoning",text:Y.text,state:Y.state},{providerMetadata:Y.providerMetadata});case"file":return $J({type:"file",url:Y.url,mediaType:Y.mediaType},{filename:"filename"in Y?Y.filename:void 0,providerMetadata:Y.providerMetadata});case"source-url":return $J({type:"source-url",sourceId:Y.sourceId,url:Y.url},{title:Y.title,providerMetadata:Y.providerMetadata});case"step-start":return{type:"step-start"};default:if(typeof Y.type==="string"&&Y.type.startsWith("data-"))return{type:Y.type,data:"data"in Y?Y.data:void 0};return Y}}},W$=class ${static fromAIV4Parts(Y){let X="";for(let G of Y)X+=G.type,X+=$.fromAIV4Part(G);return X}static fromAIV4Part(Y){let X="";if(Y.type==="text")X+=Y.text,X=XD(X,Y.providerMetadata);if(Y.type==="tool-invocation")X+=Y.toolInvocation.toolCallId,X+=Y.toolInvocation.state;if(Y.type==="reasoning"){X+=Y.reasoning,X+=Y.details.reduce((J,Q)=>{if(Q.type==="text")return J+Q.text.length+(Q.signature?.length||0);return J},0);let G=Y;if(G&&Object.hasOwn(G,"providerMetadata"))X=XD(X,G.providerMetadata)}if(Y.type==="file")X+=Y.data,X+=Y.mimeType;return X}static fromDBParts(Y){let X="";for(let G of Y)if(X+=G.type,G.type.startsWith("data-")){let J=G.data;X+=JSON.stringify(J)}else X+=$.fromAIV4Part(G);return X}static fromAIV4CoreMessageContent(Y){if(typeof Y==="string")return Y;let X="";for(let G of Y){if(X+=G.type,G.type==="text"){X+=G.text.length;let J=G;X=XD(X,J.providerMetadata,J.providerOptions)}if(G.type==="reasoning"){X+=G.text.length;let J=G;X=XD(X,J.providerMetadata,J.providerOptions)}if(G.type==="tool-call")X+=G.toolCallId,X+=G.toolName;if(G.type==="tool-result")X+=G.toolCallId,X+=G.toolName;if(G.type==="file")X+=G.filename,X+=G.mimeType;if(G.type==="image")X+=ce1(G.image),X+=G.mimeType;if(G.type==="redacted-reasoning")X+=G.data.length}return X}static fromAIV5Parts(Y){let X="";for(let G of Y){if(X+=G.type,G.type==="text")X+=G.text,X=XD(X,G.providerMetadata);if(zQ(G)||G.type==="dynamic-tool")X+=G.toolCallId,X+=G.state;if(G.type==="reasoning")X+=G.text,X=XD(X,G.providerMetadata);if(G.type==="file")X+=G.url.length,X+=G.mediaType,X+=G.filename||""}return X}static fromAIV5ModelMessageContent(Y){if(typeof Y==="string")return Y;let X="";for(let G of Y){if(X+=G.type,G.type==="text")X+=G.text.length,X=XD(X,G.providerOptions);if(G.type==="reasoning")X+=G.text.length,X=XD(X,G.providerOptions);if(G.type==="tool-call")X+=G.toolCallId,X+=G.toolName;if(G.type==="tool-result")X+=G.toolCallId,X+=G.toolName;if(G.type==="file")X+=G.filename,X+=G.mediaType;if(G.type==="image")X+=ce1(G.image),X+=G.mediaType}return X}},H04=class{base64Data;uint8ArrayData;mediaType;constructor({data:$,mediaType:Y}){let X=$ instanceof Uint8Array;this.base64Data=X?void 0:$,this.uint8ArrayData=X?$:void 0,this.mediaType=Y}get base64(){if(this.base64Data==null)this.base64Data=a60(this.uint8ArrayData);return this.base64Data}get uint8Array(){if(this.uint8ArrayData==null)this.uint8ArrayData=Qv0(this.base64Data);return this.uint8ArrayData}},Hv0,te1=class ${static extractStepContent(Y,X,G){let J=Y.flatMap((W)=>W.parts),Q=[];if(J.forEach((W,Z)=>{if(W.type==="step-start")Q.push(Z)}),X===-1)return $.extractLastStep(J,Q,G);if(X===1)return $.extractFirstStep(J,Q,G);return $.extractMiddleStep(J,Q,X,G)}static extractLastStep(Y,X,G){let J=Y.filter((H)=>H.type?.startsWith("tool-")),Q=X.length>0;if(!Q&&J.length>0){let H=J[J.length-1];if(!H)return[];let z=Y.indexOf(H),V=J[J.length-2],F=(V?Y.indexOf(V):-1)+1,N=Y.slice(F,z+1);return $.convertPartsToContent(N,"last-step",G)}if(X.length+1===1&&!Q)return $.convertPartsToContent(Y,"last-step",G);let Z=X[X.length-1];if(Z===void 0)return[];let K=Y.slice(Z+1);if(K.length===0)return[];return $.convertPartsToContent(K,"last-step",G)}static extractFirstStep(Y,X,G){let J=X[0]??Y.length;if(J===0)return[];let Q=Y.slice(0,J);return $.convertPartsToContent(Q,"step-1",G)}static extractMiddleStep(Y,X,G,J){let Q=G-2;if(Q<0||Q>=X.length)return[];let W=(X[Q]??0)+1,Z=X[Q+1]??Y.length;if(W>=Z)return[];let K=Y.slice(W,Z);return $.convertPartsToContent(K,`step-${G}`,J)}static convertPartsToContent(Y,X,G){return MT0(U04([{id:X,role:"assistant",parts:Y}])).flatMap(G)}static convertToStepContent(Y,X,G){let J=Y?Y:G();if(!J)return[];if(typeof J.content==="string")return[{type:"text",text:J.content}];return J.content.map((Q)=>{if(Q.type==="tool-result")return{type:"tool-result",input:Vv0(X,Q.toolCallId),output:Q.output,toolCallId:Q.toolCallId,toolName:Q.toolName};if(Q.type==="file")return{type:"file",file:new Hv0({data:typeof Q.data==="string"?o60(Q.data).base64Content:Q.data instanceof URL?Q.data.toString():Z_(Q.data),mediaType:Q.mediaType})};if(Q.type==="image")return{type:"file",file:new Hv0({data:typeof Q.image==="string"?o60(Q.image).base64Content:Q.image instanceof URL?Q.image.toString():Z_(Q.image),mediaType:Q.mediaType||"unknown"})};return{...Q}})}},cz=class ${static isSealed(Y){return Y.content?.metadata?.mastra?.sealed===!0}static shouldMerge(Y,X,G,J,Q=!1){if(!Y)return!1;if($.isSealed(Y))return!1;if(Y.content?.metadata?.mastra?.responseBoundary)return!1;if(X.content.metadata?.completionResult||Y.content.metadata?.completionResult||X.content.metadata?.isTaskCompleteResult||Y.content.metadata?.isTaskCompleteResult)return!1;let W=Y.content?.parts??[];if(W.length>0&&W.every((z)=>z.type.startsWith("data-"))&&Y.id!==X.id)return!1;return Y.role==="assistant"&&X.role==="assistant"&&Y.threadId===X.threadId&&G!=="memory"&&(Q?!J:!0)}static merge(Y,X){if(Y.createdAt=X.createdAt||Y.createdAt,X.content.metadata)Y.content.metadata={...Y.content.metadata??{},...X.content.metadata};let G=new Map,J=new Map;for(let[Q,W]of X.content.parts.entries())if(W.type==="tool-invocation"){let Z=[...Y.content.parts].reverse().find((H)=>H.type==="tool-invocation"&&H.toolInvocation.toolCallId===W.toolInvocation.toolCallId);if(!!Z&&Z.type==="tool-invocation"){if(W.toolInvocation.state==="result"){if(Z.toolInvocation={...Z.toolInvocation,step:W.toolInvocation.step,state:"result",result:W.toolInvocation.result,args:{...Z.toolInvocation.args,...W.toolInvocation.args}},W.providerMetadata)Z.providerMetadata={...Z.providerMetadata,...W.providerMetadata};if(!Y.content.toolInvocations)Y.content.toolInvocations=[];let z=Y.content.toolInvocations.findIndex((V)=>V.toolCallId===Z.toolInvocation.toolCallId);if(z===-1)Y.content.toolInvocations.push(Z.toolInvocation);else Y.content.toolInvocations[z]=Z.toolInvocation}else if(W.toolInvocation.state==="approval-requested"||W.toolInvocation.state==="approval-responded"||W.toolInvocation.state==="output-denied"||W.toolInvocation.state==="output-error"){if(Z.toolInvocation={...Z.toolInvocation,state:W.toolInvocation.state,approval:W.toolInvocation.approval,errorText:W.toolInvocation.errorText,rawInput:W.toolInvocation.rawInput,args:{...Z.toolInvocation.args,...W.toolInvocation.args}},W.providerMetadata)Z.providerMetadata={...Z.providerMetadata,...W.providerMetadata};if("providerExecuted"in W&&W.providerExecuted!==void 0)Z.providerExecuted=W.providerExecuted;if("title"in W&&W.title!==void 0)Z.title=W.title;if("preliminary"in W&&W.preliminary!==void 0)Z.preliminary=W.preliminary}let H=Y.content.parts.findIndex((z)=>z===Z);G.set(Q,H)}else J.set(Q,W)}else J.set(Q,W);if($.addPartsToMessage({latestMessage:Y,incomingMessage:X,anchorMap:G,partsToAdd:J}),Y.createdAt.getTime()<X.createdAt.getTime())Y.createdAt=X.createdAt;if(!Y.content.content&&X.content.content)Y.content.content=X.content.content;if(Y.content.content&&X.content.content&&Y.content.content!==X.content.content)Y.content.content=X.content.content}static addPartsToMessage({latestMessage:Y,incomingMessage:X,anchorMap:G,partsToAdd:J}){for(let Q=0;Q<X.content.parts.length;++Q){let W=X.content.parts[Q];if(!W)continue;let Z=W$.fromDBParts([W]),K=J.get(Q);if(!Z||!K)continue;if(G.size>0){if(G.has(Q))continue;let H=[...G.keys()].filter((D)=>D<Q).pop()??-1,z=[...G.keys()].find((D)=>D>Q)??-1,V=H!==-1?G.get(H):0,A=H===-1?Q:Q-H,F=V+A,N=z!==-1?G.get(z):Y.content.parts.length;if(F>=0&&F<=N&&!Y.content.parts.slice(F,N).some((D)=>W$.fromDBParts([D])===W$.fromDBParts([W]))){$.pushNewPart({latestMessage:Y,newMessage:X,part:W,insertAt:F});for(let[D,L]of G.entries())if(L>=F)G.set(D,L+1)}}else $.pushNewPart({latestMessage:Y,newMessage:X,part:W})}}static pushNewPart({latestMessage:Y,newMessage:X,part:G,insertAt:J}){let Q=W$.fromDBParts([G]),W=Y.content.parts.filter((K)=>W$.fromDBParts([K])===Q).length,Z=X.content.parts.filter((K)=>W$.fromDBParts([K])===Q).length;if(W<Z){let K=X.content.parts.indexOf(G),H=K>0&&X.content.parts[K-1]?.type==="step-start",z=Y.role==="assistant"&&G.type==="text"&&!H&&Y.content.parts.length>0&&Y.content.parts.at(-1)?.type==="tool-invocation",V=[...Y.content.parts].reverse().find((F)=>F.type==="step-start"),A=V?.model?Fv0({type:"step-start",model:V.model}):{type:"step-start"};if(typeof J==="number")if(z)Y.content.parts.splice(J,0,A),Y.content.parts.splice(J+1,0,G);else Y.content.parts.splice(J,0,G);else{if(z)Y.content.parts.push(A);Y.content.parts.push(G)}}}},lT8,iT8=($)=>{let Y=typeof $==="string"?Qv0($):$,X=(Y[6]&127)<<21|(Y[7]&127)<<14|(Y[8]&127)<<7|Y[9]&127;return Y.slice(X+10)},aT8=($)=>{let Y=new Map,X=/__split-\d+$/;return(G)=>{let J=$.at(-1);if(G.role===J?.role&&Array.isArray(J.content)&&Array.isArray(G.content)&&(G.role!=="assistant"||G.role==="assistant"&&G.content.at(-1)?.type!=="tool-call"))for(let Q of G.content)J.content.push(Q);else{let Q=G.id;if(X.test(Q)){$.push(G);return}let Z=Y.get(Q)||0;if(Z>0)G.id=`${Q}__split-${Z}`;Y.set(Q,Z+1),$.push(G)}}},sT8=async({url:$,downloadRetries:Y})=>{let X=$.toString();try{let G=await Ct1(X,{method:"GET"},Y,{shouldRetryResponse:(J)=>J.status>=500});if(!G.ok)throw new G0({id:"DOWNLOAD_ASSETS_FAILED",text:"Failed to download asset",domain:"LLM",category:"USER"});return{data:new Uint8Array(await G.arrayBuffer()),mediaType:G.headers.get("content-type")??void 0}}catch(G){throw new G0({id:"DOWNLOAD_ASSETS_FAILED",text:"Failed to download asset",domain:"LLM",category:"USER"},G)}},XC8=class{memoryMessages=new Set;newUserMessages=new Set;newResponseMessages=new Set;userContextMessages=new Set;memoryMessagesPersisted=new Set;newUserMessagesPersisted=new Set;newResponseMessagesPersisted=new Set;userContextMessagesPersisted=new Set;addToSource($,Y){switch(Y){case"memory":this.memoryMessages.add($),this.memoryMessagesPersisted.add($);break;case"response":if(this.memoryMessages.has($))this.memoryMessages.delete($);if(this.newResponseMessages.add($),this.newResponseMessagesPersisted.add($),this.newUserMessages.has($))this.newUserMessages.delete($);break;case"input":case"user":this.newUserMessages.add($),this.newUserMessagesPersisted.add($);break;case"context":this.userContextMessages.add($),this.userContextMessagesPersisted.add($);break;default:throw Error(`Missing message source for message ${$}`)}}isMemoryMessage($){return this.memoryMessages.has($)}isUserMessage($){return this.newUserMessages.has($)}isResponseMessage($){return this.newResponseMessages.has($)}isContextMessage($){return this.userContextMessages.has($)}getMemoryMessages(){return this.memoryMessages}getUserMessages(){return this.newUserMessages}getResponseMessages(){return this.newResponseMessages}getContextMessages(){return this.userContextMessages}getMemoryMessagesPersisted(){return this.memoryMessagesPersisted}getUserMessagesPersisted(){return this.newUserMessagesPersisted}getResponseMessagesPersisted(){return this.newResponseMessagesPersisted}getContextMessagesPersisted(){return this.userContextMessagesPersisted}removeMessage($){this.memoryMessages.delete($),this.newUserMessages.delete($),this.newResponseMessages.delete($),this.userContextMessages.delete($)}clearUserMessages(){this.newUserMessages.clear()}clearResponseMessages(){this.newResponseMessages.clear()}clearContextMessages(){this.userContextMessages.clear()}clearAll(){this.newUserMessages.clear(),this.newResponseMessages.clear(),this.userContextMessages.clear()}createSourceChecker(){let $={memory:new Set(Array.from(this.memoryMessages.values()).map((Y)=>Y.id)),output:new Set(Array.from(this.newResponseMessages.values()).map((Y)=>Y.id)),input:new Set(Array.from(this.newUserMessages.values()).map((Y)=>Y.id)),context:new Set(Array.from(this.userContextMessages.values()).map((Y)=>Y.id))};return{...$,getSource:(Y)=>{if($.memory.has(Y.id))return"memory";if($.input.has(Y.id))return"input";if($.output.has(Y.id))return"response";if($.context.has(Y.id))return"context";return null}}}isNewMessage($){let Y=typeof $==="string"?$:$.id;if(typeof $!=="string"){if(this.newUserMessages.has($)||this.newResponseMessages.has($))return!0}return Array.from(this.newUserMessages).some((X)=>X.id===Y)||Array.from(this.newResponseMessages).some((X)=>X.id===Y)}serializeSourceTracking(){let $=(Y)=>Array.from(Y).map((X)=>X.id);return{memoryMessages:$(this.memoryMessages),newUserMessages:$(this.newUserMessages),newResponseMessages:$(this.newResponseMessages),userContextMessages:$(this.userContextMessages),memoryMessagesPersisted:$(this.memoryMessagesPersisted),newUserMessagesPersisted:$(this.newUserMessagesPersisted),newResponseMessagesPersisted:$(this.newResponseMessagesPersisted),userContextMessagesPersisted:$(this.userContextMessagesPersisted)}}deserializeSourceTracking($,Y){let X=(G)=>new Set(G.map((J)=>Y.find((Q)=>Q.id===J)).filter(Boolean));this.memoryMessages=X($.memoryMessages),this.newUserMessages=X($.newUserMessages),this.newResponseMessages=X($.newResponseMessages),this.userContextMessages=X($.userContextMessages),this.memoryMessagesPersisted=X($.memoryMessagesPersisted),this.newUserMessagesPersisted=X($.newUserMessagesPersisted),this.newResponseMessagesPersisted=X($.newResponseMessagesPersisted),this.userContextMessagesPersisted=X($.userContextMessagesPersisted)}serializeAll($){return{messages:$C8($.messages),systemMessages:$.systemMessages,taggedSystemMessages:$.taggedSystemMessages,memoryInfo:$.memoryInfo,_agentNetworkAppend:$.agentNetworkAppend,...this.serializeSourceTracking()}}deserializeAll($){let Y=YC8($.messages);return this.deserializeSourceTracking({memoryMessages:$.memoryMessages,newUserMessages:$.newUserMessages,newResponseMessages:$.newResponseMessages,userContextMessages:$.userContextMessages,memoryMessagesPersisted:$.memoryMessagesPersisted,newUserMessagesPersisted:$.newUserMessagesPersisted,newResponseMessagesPersisted:$.newResponseMessagesPersisted,userContextMessagesPersisted:$.userContextMessagesPersisted},Y),{messages:Y,systemMessages:$.systemMessages,taggedSystemMessages:$.taggedSystemMessages,memoryInfo:$.memoryInfo,agentNetworkAppend:$._agentNetworkAppend}}},l6=class{messages=[];systemMessages=[];taggedSystemMessages={};memoryInfo=null;stateManager=new XC8;get memoryMessages(){return this.stateManager.getMemoryMessages()}get newUserMessages(){return this.stateManager.getUserMessages()}get newResponseMessages(){return this.stateManager.getResponseMessages()}get userContextMessages(){return this.stateManager.getContextMessages()}get memoryMessagesPersisted(){return this.stateManager.getMemoryMessagesPersisted()}get newUserMessagesPersisted(){return this.stateManager.getUserMessagesPersisted()}get newResponseMessagesPersisted(){return this.stateManager.getResponseMessagesPersisted()}get userContextMessagesPersisted(){return this.stateManager.getContextMessagesPersisted()}generateMessageId;_agentNetworkAppend=!1;filterIncompleteToolCalls;logger;toAIV5UIMessages($,Y){return $.map((X)=>lz.toUIMessage(X,Y))}toAIV4UIMessages($,Y){return $.map((X)=>GD.toUIMessage(X,Y))}isRecording=!1;recordedEvents=[];constructor({threadId:$,resourceId:Y,generateMessageId:X,logger:G,filterIncompleteToolCalls:J,_agentNetworkAppend:Q}={}){if($)this.memoryInfo={threadId:$,resourceId:Y};this.generateMessageId=X,this.logger=G,this.filterIncompleteToolCalls=J??!0,this._agentNetworkAppend=Q||!1}startRecording(){this.isRecording=!0,this.recordedEvents=[]}hasRecordedEvents(){return this.recordedEvents.length>0}getRecordedEvents(){return[...this.recordedEvents]}stopRecording(){this.isRecording=!1;let $=this.getRecordedEvents();return this.recordedEvents=[],$}addSignal($,Y){let X=Y?.source??"input",G=this.generateCreatedAt(X,new Date),J=$.acceptedAt??$.createdAt,Q=K_($.type==="user-message"?{id:$.id,type:"user-message",contents:$.contents,attributes:$.attributes,metadata:$.metadata,createdAt:G,acceptedAt:J}:{id:$.id,type:$.type,contents:String($.contents),attributes:$.attributes,metadata:$.metadata,createdAt:G,acceptedAt:J});return this.addOne(Q.toDBMessage(this.memoryInfo??void 0),X),Q}add($,Y){if(Y==="user")Y="input";if(!$)return this;let X=Array.isArray($)?$:[$];if(this.isRecording)this.recordedEvents.push({type:"add",source:Y,count:X.length});for(let G of X){if(Kv0(G)&&Y==="input"){this.addSignal(G,{source:Y});continue}let J=Kv0(G)?G.toDBMessage(this.memoryInfo??void 0):typeof G==="string"?{role:"user",content:G}:G;if(Array.isArray(J)){for(let Q of J)this.addOne(typeof Q==="string"?{role:"user",content:Q}:Q,Y);continue}this.addOne(typeof J==="string"?{role:"user",content:J}:J,Y)}return this}serialize(){return this.stateManager.serializeAll({messages:this.messages,systemMessages:this.systemMessages,taggedSystemMessages:this.taggedSystemMessages,memoryInfo:this.memoryInfo,agentNetworkAppend:this._agentNetworkAppend})}serializeForSpan(){return{messages:this.all.aiV4.core().map((Y)=>({role:Y.role,content:Y.content})),systemMessages:[...this.systemMessages.map((Y)=>({role:Y.role,content:Y.content})),...Object.entries(this.taggedSystemMessages).flatMap(([Y,X])=>X.map((G)=>({role:G.role,content:G.content,tag:Y})))]}}deserialize($){let Y=this.stateManager.deserializeAll($);this.messages=Y.messages,this.systemMessages=Y.systemMessages,this.taggedSystemMessages=Y.taggedSystemMessages,this.memoryInfo=Y.memoryInfo,this._agentNetworkAppend=Y.agentNetworkAppend;for(let X of this.messages)this.updateLastCreatedAt(X);return this}getMessagesForModelPrompt(){return this.messages.flatMap(($)=>{if($.role!=="signal")return[$];return this.convertSignalForModelPrompt($)})}convertSignalForModelPrompt($){let Y=t60($).toLLMMessage();return(Array.isArray(Y)?Y:[Y]).map((X,G)=>{let J=$.createdAt,Q=G===0?$.id:`${$.id}:prompt:${G}`,W=typeof X==="string"?{id:Q,role:"user",content:X,metadata:{createdAt:J}}:{...X,id:"id"in X&&typeof X.id==="string"?X.id:Q,metadata:{..."metadata"in X&&X.metadata&&typeof X.metadata==="object"?X.metadata:{},createdAt:J}};return se1(W,"input",{memoryInfo:this.memoryInfo,newMessageId:()=>Q,generateCreatedAt:(Z,K)=>{if(K instanceof Date)return K;if(typeof K==="string"||typeof K==="number")return new Date(K);return J},dbMessages:this.messages})})}makeMessageSourceChecker(){return this.stateManager.createSourceChecker()}getLatestUserContent(){let Y=this.all.core().filter((X)=>X.role==="user").at(-1)?.content;if(!Y)return null;return Av0(Y)}get get(){return{all:this.all,remembered:this.remembered,input:this.input,response:this.response}}get getPersisted(){return{remembered:this.rememberedPersisted,input:this.inputPersisted,taggedSystemMessages:this.taggedSystemMessages,response:this.responsePersisted}}get clear(){return{all:{db:()=>{let $=[...this.messages];if(this.messages=[],this.stateManager.clearAll(),this.isRecording&&$.length>0)this.recordedEvents.push({type:"clear",count:$.length});return $}},input:{db:()=>{let $=Array.from(this.stateManager.getUserMessages());if(this.messages=this.messages.filter((Y)=>!this.stateManager.isUserMessage(Y)),this.stateManager.clearUserMessages(),this.isRecording&&$.length>0)this.recordedEvents.push({type:"clear",source:"input",count:$.length});return $}},response:{db:()=>{let $=Array.from(this.stateManager.getResponseMessages());if(this.messages=this.messages.filter((Y)=>!this.stateManager.isResponseMessage(Y)),this.stateManager.clearResponseMessages(),this.isRecording&&$.length>0)this.recordedEvents.push({type:"clear",source:"response",count:$.length});return $}}}}removeByIds($){let Y=new Set($),X=[];if(this.messages=this.messages.filter((G)=>{if(Y.has(G.id))return X.push(G),this.stateManager.removeMessage(G),!1;return!0}),this.isRecording&&X.length>0)this.recordedEvents.push({type:"removeByIds",ids:$,count:X.length});return X}all={db:()=>this.messages,v1:()=>Q_(this.all.db()),aiV5:{model:()=>{let $=this.getMessagesForModelPrompt();return _U(this.toAIV5UIMessages($,{transformToolPayloads:!1}),$)},ui:()=>this.toAIV5UIMessages(this.all.db()),prompt:()=>{let $=oe1([...this.systemMessages,...Object.values(this.taggedSystemMessages).flat()],"system",this.createAdapterContext(),this.messages),Y=this.getMessagesForModelPrompt(),X=_U(this.toAIV5UIMessages(Y,{transformToolPayloads:!1}),Y,this.filterIncompleteToolCalls),G=[...$,...X];return s60(G,this.logger)},llmPrompt:async($={downloadConcurrency:10,downloadRetries:3})=>{let Y=this.getMessagesForModelPrompt(),X=_U(this.toAIV5UIMessages(Y,{transformToolPayloads:!1}),Y,this.filterIncompleteToolCalls),G=new Map;for(let K of this.messages){if(K.content?.format!==2||!K.content.parts)continue;for(let H of K.content.parts)if(H.type==="tool-invocation"&&H.toolInvocation?.state==="result"&&H.providerMetadata?.mastra&&typeof H.providerMetadata.mastra==="object"&&"modelOutput"in H.providerMetadata.mastra)G.set(H.toolInvocation.toolCallId,H.providerMetadata.mastra.modelOutput)}if(G.size>0)for(let K of X){if(K.role!=="tool"||!Array.isArray(K.content))continue;for(let H=0;H<K.content.length;H++){let z=K.content[H];if(z.type==="tool-result"&&G.has(z.toolCallId))K.content[H]={...z,output:G.get(z.toolCallId)}}}let J=oe1([...this.systemMessages,...Object.values(this.taggedSystemMessages).flat()],"system",this.createAdapterContext(),this.messages),Q=await oT8({messages:X,downloadConcurrency:$?.downloadConcurrency,downloadRetries:$?.downloadRetries,supportedUrls:$?.supportedUrls}),W=[...J,...X];if(X.some((K)=>(K.role==="user"||K.role==="assistant")&&typeof K.content!=="string"&&K.content.some((H)=>H.type==="image"||H.type==="file")))W=W.map((K)=>{if(K.role==="user"){if(typeof K.content==="string")return{role:"user",content:[{type:"text",text:K.content}],providerOptions:K.providerOptions};return{role:"user",content:K.content.map((z)=>{if(z.type==="image"||z.type==="file")return ee1(z,Q);return z}).filter((z)=>z.type!=="text"||z.text!==""),providerOptions:K.providerOptions}}if(K.role==="assistant"&&typeof K.content!=="string"){let H=K.content.map((z)=>{if(z.type==="file")return ee1(z,Q);return z});return{...K,content:H}}return K});return W=s60(W,this.logger),W.map(K04).filter((K)=>K.role==="system"||typeof K.content==="string"||K.content.length>0)}},aiV6:{ui:()=>this.all.db().map(jU.toUIMessage)},prompt:()=>this.all.aiV4.prompt(),ui:()=>this.toAIV4UIMessages(this.all.db()),core:()=>aZ(this.toAIV4UIMessages(this.all.db(),{transformToolPayloads:!1})),aiV4:{ui:()=>this.toAIV4UIMessages(this.all.db()),core:()=>aZ(this.toAIV4UIMessages(this.getMessagesForModelPrompt(),{transformToolPayloads:!1})),prompt:()=>{let $=this.all.aiV4.core(),Y=[...this.systemMessages,...Object.values(this.taggedSystemMessages).flat(),...$];return s60(Y,this.logger)},llmPrompt:()=>{let $=this.all.aiV4.core(),X=[...[...this.systemMessages,...Object.values(this.taggedSystemMessages).flat()],...$];return X=s60(X,this.logger),X.map(xT8)}}};remembered={db:()=>this.messages.filter(($)=>this.memoryMessages.has($)),v1:()=>Q_(this.remembered.db()),aiV5:{model:()=>_U(this.toAIV5UIMessages(this.remembered.db(),{transformToolPayloads:!1}),this.messages),ui:()=>this.toAIV5UIMessages(this.remembered.db())},aiV6:{ui:()=>this.remembered.db().map(jU.toUIMessage)},ui:()=>this.toAIV4UIMessages(this.remembered.db()),core:()=>aZ(this.toAIV4UIMessages(this.remembered.db(),{transformToolPayloads:!1})),aiV4:{ui:()=>this.toAIV4UIMessages(this.remembered.db()),core:()=>aZ(this.toAIV4UIMessages(this.remembered.db(),{transformToolPayloads:!1}))}};rememberedPersisted={db:()=>this.all.db().filter(($)=>this.memoryMessagesPersisted.has($)),v1:()=>Q_(this.rememberedPersisted.db()),aiV5:{model:()=>_U(this.toAIV5UIMessages(this.rememberedPersisted.db(),{transformToolPayloads:!1}),this.messages),ui:()=>this.toAIV5UIMessages(this.rememberedPersisted.db())},aiV6:{ui:()=>this.rememberedPersisted.db().map(jU.toUIMessage)},ui:()=>this.toAIV4UIMessages(this.rememberedPersisted.db()),core:()=>aZ(this.toAIV4UIMessages(this.rememberedPersisted.db(),{transformToolPayloads:!1})),aiV4:{ui:()=>this.toAIV4UIMessages(this.rememberedPersisted.db()),core:()=>aZ(this.toAIV4UIMessages(this.rememberedPersisted.db(),{transformToolPayloads:!1}))}};input={db:()=>this.messages.filter(($)=>this.newUserMessages.has($)),v1:()=>Q_(this.input.db()),aiV5:{model:()=>_U(this.toAIV5UIMessages(this.input.db(),{transformToolPayloads:!1}),this.messages),ui:()=>this.toAIV5UIMessages(this.input.db())},aiV6:{ui:()=>this.input.db().map(jU.toUIMessage)},ui:()=>this.toAIV4UIMessages(this.input.db()),core:()=>aZ(this.toAIV4UIMessages(this.input.db(),{transformToolPayloads:!1})),aiV4:{ui:()=>this.toAIV4UIMessages(this.input.db()),core:()=>aZ(this.toAIV4UIMessages(this.input.db(),{transformToolPayloads:!1}))}};inputPersisted={db:()=>this.messages.filter(($)=>this.newUserMessagesPersisted.has($)),v1:()=>Q_(this.inputPersisted.db()),aiV5:{model:()=>_U(this.toAIV5UIMessages(this.inputPersisted.db(),{transformToolPayloads:!1}),this.messages),ui:()=>this.toAIV5UIMessages(this.inputPersisted.db())},aiV6:{ui:()=>this.inputPersisted.db().map(jU.toUIMessage)},ui:()=>this.toAIV4UIMessages(this.inputPersisted.db()),core:()=>aZ(this.toAIV4UIMessages(this.inputPersisted.db(),{transformToolPayloads:!1})),aiV4:{ui:()=>this.toAIV4UIMessages(this.inputPersisted.db()),core:()=>aZ(this.toAIV4UIMessages(this.inputPersisted.db(),{transformToolPayloads:!1}))}};response={db:()=>this.messages.filter(($)=>this.newResponseMessages.has($)),v1:()=>Q_(this.response.db()),aiV5:{ui:()=>this.toAIV5UIMessages(this.response.db()),model:()=>_U(this.toAIV5UIMessages(this.response.db(),{transformToolPayloads:!1}),this.messages).filter(($)=>$.role==="tool"||$.role==="assistant"),modelContent:($)=>{if(typeof $==="number")return te1.extractStepContent(this.response.aiV5.ui(),$,this.response.aiV5.stepContent);return this.response.aiV5.model().map(this.response.aiV5.stepContent).flat()},stepContent:($)=>{return te1.convertToStepContent($,this.messages,()=>this.response.aiV5.model().at(-1))}},aiV6:{ui:()=>this.response.db().map(jU.toUIMessage)},aiV4:{ui:()=>this.toAIV4UIMessages(this.response.db()),core:()=>aZ(this.toAIV4UIMessages(this.response.db(),{transformToolPayloads:!1}))}};responsePersisted={db:()=>this.messages.filter(($)=>this.newResponseMessagesPersisted.has($)),aiV5:{model:()=>_U(this.toAIV5UIMessages(this.responsePersisted.db(),{transformToolPayloads:!1}),this.messages),ui:()=>this.toAIV5UIMessages(this.responsePersisted.db())},aiV6:{ui:()=>this.responsePersisted.db().map(jU.toUIMessage)},ui:()=>this.toAIV4UIMessages(this.responsePersisted.db()),aiV4:{ui:()=>this.toAIV4UIMessages(this.responsePersisted.db()),core:()=>aZ(this.toAIV4UIMessages(this.responsePersisted.db(),{transformToolPayloads:!1}))}};drainUnsavedMessages(){let $=this.messages.filter((Y)=>this.newUserMessages.has(Y)||this.newResponseMessages.has(Y));return this.newUserMessages.clear(),this.newResponseMessages.clear(),$.map((Y)=>this.transformMessageForTranscript(Y))}transformToolStateDataForTranscript($,Y){if(!$||typeof $!=="object")return $;let X=$,G=X.metadata??X.providerMetadata,J=uY(G,"transcript",Y),Q=uY(G,"transcript","input-available"),W=Y==="approval"?f$(J)?J.transformed:f$(Q)?Q.transformed:void 0:f$(Q)?Q.transformed:f$(J)?J.transformed:void 0,Z=Y==="suspend"&&f$(J)?J.transformed:void 0;return{...X,...W!==void 0?{args:W}:{},...Z!==void 0?{suspendPayload:Z}:{}}}transformMessageForTranscript($){if($.content?.format!==2||!$.content.parts)return $;let Y=!1,X=new Map,G=$.content.parts.map((W)=>{if(W.type==="tool-invocation"&&W.toolInvocation){let Z=uY(W.providerMetadata,"transcript","input-available"),K=W.toolInvocation.state==="result"?uY(W.providerMetadata,"transcript","output-available")??uY(W.providerMetadata,"transcript","error"):W.toolInvocation.state==="output-error"?uY(W.providerMetadata,"transcript","error"):void 0;if(!Z&&!K)return W;Y=!0;let H=f$(Z)?Z.transformed:W.toolInvocation.args,z=W.toolInvocation.state==="result"?f$(K)?K.transformed:W.toolInvocation.result:void 0,V=W.toolInvocation.state==="output-error"?f$(K)?K.transformed:W.toolInvocation.errorText:void 0;return X.set(W.toolInvocation.toolCallId,{args:H,...W.toolInvocation.state==="result"?{result:z}:{},...W.toolInvocation.state==="output-error"?{errorText:V}:{}}),{...W,toolInvocation:{...W.toolInvocation,args:H,...W.toolInvocation.state==="result"?{result:z}:{},...W.toolInvocation.state==="output-error"?{errorText:V}:{}}}}if(W.type==="data-tool-call-suspended"||W.type==="data-tool-call-approval")return Y=!0,{...W,data:this.transformToolStateDataForTranscript(W.data,W.type==="data-tool-call-suspended"?"suspend":"approval")};return W}),J=$.content.toolInvocations?.map((W)=>{let Z=X.get(W.toolCallId);if(!Z)return W;let K=W.state;return Y=!0,{...W,...Z.args!==void 0?{args:Z.args}:{},...W.state==="result"&&Z.result!==void 0?{result:Z.result}:{},...K==="output-error"&&Z.errorText!==void 0?{errorText:Z.errorText}:{}}}),Q=$.content.metadata&&typeof $.content.metadata==="object"?{...$.content.metadata}:$.content.metadata;if(Q&&typeof Q==="object")for(let[W,Z]of[["suspendedTools","suspend"],["pendingToolApprovals","approval"]]){let K=Q[W];if(!K||typeof K!=="object")continue;Y=!0,Q[W]=Object.fromEntries(Object.entries(K).map(([H,z])=>[H,this.transformToolStateDataForTranscript(z,Z)]))}if(!Y)return $;return{...$,content:{...$.content,parts:G,...J?{toolInvocations:J}:{},...Q?{metadata:Q}:{}}}}getEarliestUnsavedMessageTimestamp(){let $=this.messages.filter((Y)=>this.newUserMessages.has(Y)||this.newResponseMessages.has(Y));if($.length===0)return;return Math.min(...$.map((Y)=>new Date(Y.createdAt).getTime()))}isNewMessage($){return this.stateManager.isNewMessage($)}updateToolInvocation($,Y){if(!$.toolInvocation?.toolCallId)return!1;let X=$.toolInvocation.toolCallId;for(let G=this.messages.length-1;G>=0;G--){let J=this.messages[G];if(J.role!=="assistant"||!J.content?.parts)continue;for(let Q=0;Q<J.content.parts.length;Q++){let W=J.content.parts[Q];if(W?.type==="tool-invocation"&&W.toolInvocation?.toolCallId===X){let Z=W,K=$,H=Z.providerMetadata!==void 0||K.providerMetadata!==void 0?{...Z.providerMetadata??{},...K.providerMetadata??{}}:void 0;J.content.parts[Q]={...$,toolInvocation:{...$.toolInvocation,args:W.toolInvocation.args},...Z.providerExecuted!==void 0&&K.providerExecuted===void 0?{providerExecuted:Z.providerExecuted}:{},...H!==void 0?{providerMetadata:H}:{}},this.lastCreatedAt=Math.max(this.lastCreatedAt||0,Date.now()),this.updateLastCreatedAt(J);let z=J.content.metadata??{},V=Y??{},A=z.backgroundTasks,F=V.backgroundTasks;if(J.content.metadata={...z,...V,...A||F?{backgroundTasks:{...A??{},...F??{}}}:{}},!this.stateManager.isResponseMessage(J))this.stateManager.removeMessage(J),this.stateManager.addToSource(J,"response");return!0}}}return this.logger?.warn(`updateToolInvocation: no matching tool call found for toolCallId=${X}`),!1}stepStart(){let $=this.messages[this.messages.length-1];if(!$||$.role!=="assistant"||!$.content?.parts)return!1;if(cz.isSealed($))return!1;if($.content.parts[$.content.parts.length-1]?.type==="step-start")return!1;if($.content.parts.push(Fv0({type:"step-start"})),!this.stateManager.isResponseMessage($))this.stateManager.removeMessage($),this.stateManager.addToSource($,"response");return!0}markResponseMessageBoundary($){let Y=$?this.messages.find((X)=>X.id===$):[...this.messages].reverse().find((X)=>X.role==="assistant");if(!Y||Y.role!=="assistant")return!1;if(Y.content.metadata={...Y.content.metadata??{},mastra:{...Y.content.metadata?.mastra??{},responseBoundary:!0}},!this.stateManager.isResponseMessage(Y))this.stateManager.removeMessage(Y),this.stateManager.addToSource(Y,"response");return!0}enrichLastStepStart($){let Y=this.messages[this.messages.length-1];if(!Y||Y.role!=="assistant"||!Y.content?.parts)return!1;if(cz.isSealed(Y))return!1;for(let X=Y.content.parts.length-1;X>=0;X--){let G=Y.content.parts[X];if(G?.type!=="step-start")continue;if(G.model)return!1;if(G.model=$,!this.stateManager.isResponseMessage(Y))this.stateManager.removeMessage(Y),this.stateManager.addToSource(Y,"response");return!0}return!1}getSystemMessages($){if($)return this.taggedSystemMessages[$]||[];return this.systemMessages}getAllSystemMessages(){return[...this.systemMessages,...Object.values(this.taggedSystemMessages).flat()]}clearSystemMessages($){if($)delete this.taggedSystemMessages[$];else this.systemMessages=[];return this}replaceAllSystemMessages($){this.systemMessages=[],this.taggedSystemMessages={};for(let Y of $)if(Y.role==="system")this.systemMessages.push(Y);return this}addSystem($,Y){if(!$)return this;for(let X of Array.isArray($)?$:[$])this.addOneSystem(X,Y);return this}addOneSystem($,Y){let X=pT8($);if(X.role!=="system")throw Error(`Expected role "system" but saw ${X.role} for message ${JSON.stringify(X,null,2)}`);if(Y&&!this.isDuplicateSystem(X,Y)){if(this.taggedSystemMessages[Y]||=[],this.taggedSystemMessages[Y].push(X),this.isRecording)this.recordedEvents.push({type:"addSystem",tag:Y,message:X})}else if(!Y&&!this.isDuplicateSystem(X)){if(this.systemMessages.push(X),this.isRecording)this.recordedEvents.push({type:"addSystem",message:X})}}isDuplicateSystem($,Y){if(Y){if(!this.taggedSystemMessages[Y])return!1;return this.taggedSystemMessages[Y].some((X)=>W$.fromAIV4CoreMessageContent(X.content)===W$.fromAIV4CoreMessageContent($.content))}return this.systemMessages.some((X)=>W$.fromAIV4CoreMessageContent(X.content)===W$.fromAIV4CoreMessageContent($.content))}getMessageById($){return this.messages.find((Y)=>Y.id===$)}shouldReplaceMessage($){if(!this.messages.length)return{exists:!1};if(!("id"in $)||!$?.id)return{exists:!1};let Y=this.getMessageById($.id);if(!Y)return{exists:!1};return{exists:!0,shouldReplace:!JD(Y,$),id:Y.id}}addOne($,Y){if((!("content"in $)||!$.content&&typeof $.content!=="string")&&(!("parts"in $)||!$.parts))throw new G0({id:"INVALID_MESSAGE_CONTENT",domain:"AGENT",category:"USER",text:`Message with role "${$.role}" must have either a 'content' property (string or array) or a 'parts' property (array) that is not empty, null, or undefined. Received message: ${JSON.stringify($,null,2)}`,details:{role:$.role,messageSource:Y,hasContent:"content"in $,hasParts:"parts"in $}});if($.role==="system"){if(Y==="memory")return null;if(I9.isAIV4CoreMessage($)||I9.isAIV6CoreMessage($)||I9.isAIV5CoreMessage($)||I9.isMastraDBMessage($))return this.addSystem($);throw new G0({id:"INVALID_SYSTEM_MESSAGE_FORMAT",domain:"AGENT",category:"USER",text:"Invalid system message format. System messages must be CoreMessage format with 'role' and 'content' properties. The content should be a string or valid content array.",details:{messageSource:Y,receivedMessage:JSON.stringify($,null,2)}})}let X=se1($,Y,this.createAdapterContext()),G=X.role==="signal"?X.content.metadata?.signal:void 0;if(Y==="input"&&X.role==="signal"&&!G?.acceptedAt){let D=G?.createdAt??X.createdAt.toISOString();X.createdAt=this.generateCreatedAt(Y,X.createdAt),X.content.metadata={...X.content.metadata,signal:{...G,createdAt:X.createdAt.toISOString(),acceptedAt:D}}}let{exists:J,shouldReplace:Q,id:W}=this.shouldReplaceMessage(X),Z=this.messages.findLastIndex((D)=>cz.isSealed(D)),K=this.messages.at(-1),H=this.messages.length-1,z=Z===-1||H>Z;if(Y==="memory"){for(let D of this.messages)if(JD(D,X))return}let V=J&&W?this.messages.find((D)=>D.id===W):void 0,A=!!V&&cz.isSealed(V),F=K?this.memoryMessages.has(K):!1;if(z&&!A&&cz.shouldMerge(K,X,Y,F,this._agentNetworkAppend)&&K)cz.merge(K,X),this.updateLastCreatedAt(K),this.pushMessageToSource(K,Y);else{let D=-1;if(Q)D=this.messages.findIndex((B)=>B.id===W);let L=D!==-1&&this.messages[D];if(Q&&L){let B=Z!==-1&&D<=Z;if(cz.isSealed(L)){let O=L.content?.parts||[],E=0;for(let q=O.length-1;q>=0;q--)if(O[q]?.metadata?.mastra?.sealedAt){E=q+1;break}if(E===0)E=O.length;let M=X.content.parts,R;if(M.length<=E){if(JD(L,X))return this;R=M}else R=M.slice(E);if(R.length>0){if(X.id=this.generateMessageId?.({idType:"message",source:"memory"})??n60(),X.content.parts=R,X.createdAt<=L.createdAt)X.createdAt=new Date(L.createdAt.getTime()+1);this.messages.push(X)}}else if(B){if(X.id=this.generateMessageId?.({idType:"message",source:"memory"})??n60(),X.createdAt<=L.createdAt)X.createdAt=new Date(L.createdAt.getTime()+1);this.messages.push(X)}else{let O=this.memoryMessages.has(L);if(cz.shouldMerge(L,X,Y,O,this._agentNetworkAppend))return cz.merge(L,X),this.updateLastCreatedAt(L),this.pushMessageToSource(L,Y),this.messages.sort((M,R)=>M.createdAt.getTime()-R.createdAt.getTime()),this;this.messages[D]=X}}else if(!J)this.messages.push(X);this.pushMessageToSource(X,Y)}for(let D of this.messages)this.updateLastCreatedAt(D);return this.messages.sort((D,L)=>D.createdAt.getTime()-L.createdAt.getTime()),this}pushMessageToSource($,Y){this.stateManager.addToSource($,Y)}lastCreatedAt;updateLastCreatedAt($){let Y=$.createdAt.getTime(),X=Array.isArray($.content.parts)?$.content.parts.reduce((G,J)=>{if(typeof J.createdAt==="number"&&J.createdAt>G)return J.createdAt;return G},Y):Y;this.lastCreatedAt=Math.max(this.lastCreatedAt||0,X)}generateCreatedAt($,Y){let X=Y instanceof Date?Y:typeof Y==="string"||typeof Y==="number"?new Date(Y):void 0;if(X&&!this.lastCreatedAt)return this.lastCreatedAt=X.getTime(),X;if(X&&$==="memory")return X;let G=new Date,J=X?.getTime()||G.getTime(),Q=this.lastCreatedAt||0;if(J<=Q){let W=new Date(Q+1);return this.lastCreatedAt=W.getTime(),W}return this.lastCreatedAt=J,G}newMessageId($){if(this.generateMessageId)return this.generateMessageId({idType:"message",source:"agent",threadId:this.memoryInfo?.threadId,resourceId:this.memoryInfo?.resourceId,role:$});return n60()}createAdapterContext(){return{memoryInfo:this.memoryInfo,newMessageId:()=>this.newMessageId(),generateCreatedAt:($,Y)=>this.generateCreatedAt($,Y),dbMessages:this.messages}}};var Xg=V0(()=>{RT0();pS0();Hk0();ak0();St1();EW();kt1();Wv0();QT8=/^[A-Za-z_][A-Za-z0-9_.-]*$/;VT8=["openai","azure"];MT8=/^[a-zA-Z0-9_-]+$/;Hv0=class extends H04{type="file";constructor($){super($)}};lT8=[{mediaType:"image/gif",bytesPrefix:[71,73,70],base64Prefix:"R0lG"},{mediaType:"image/png",bytesPrefix:[137,80,78,71],base64Prefix:"iVBORw"},{mediaType:"image/jpeg",bytesPrefix:[255,216],base64Prefix:"/9j/"},{mediaType:"image/webp",bytesPrefix:[82,73,70,70],base64Prefix:"UklGRg"},{mediaType:"image/bmp",bytesPrefix:[66,77],base64Prefix:"Qk"},{mediaType:"image/tiff",bytesPrefix:[73,73,42,0],base64Prefix:"SUkqAA"},{mediaType:"image/tiff",bytesPrefix:[77,77,0,42],base64Prefix:"TU0AKg"},{mediaType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102],base64Prefix:"AAAAIGZ0eXBhdmlm"},{mediaType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99],base64Prefix:"AAAAIGZ0eXBoZWlj"}]});import{randomUUID as QD}from"crypto";import{ReadableStream as z04}from"stream/web";import GC8 from"events";function JC8($,Y){new OS($,{timezone:Y}).nextRun()}function QC8($){return $!==null&&typeof $==="object"&&"type"in $&&$.type==="tripwire"&&"payload"in $}function WC8($){let{payload:Y}=$;return new u6(Y.reason||"Agent tripwire triggered",{retry:Y.retry,metadata:Y.metadata},Y.processorId)}function ZC8($,Y){if($.type!=="text-delta")return;return Y?$.payload?.text:$.textDelta}function iz($){let{stepResult:Y,stepResults:X,state:G}=$;return Y?.__state??X?.__state??G??{}}async function V04({workflowId:$,prevResult:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,resumeData:Z,parentWorkflow:K,requestContext:H,retryCount:z=0,perStep:V,state:A,outputOptions:F},{pubsub:N,stepExecutor:D,step:L,stepResult:B}){let O=iz({stepResult:B,stepResults:J,state:A}),E=new p1(Object.entries(H??{})),R=(J[L.step?.id]?.metadata?.iterationCount??0)+1,q=await D.evaluateCondition({workflowId:$,condition:L.condition,runId:X,stepResults:J,state:O,requestContext:E,inputData:Y?.status==="success"?Y.output:void 0,resumeData:Z,abortController:new AbortController,retryCount:z,iterationCount:R}),w={parentWorkflow:K,workflowId:$,runId:X,executionPath:G,resumeSteps:[],stepResults:J,prevResult:B,resumeData:void 0,activeStepsPath:Q,requestContext:H,retryCount:z,perStep:V,state:O,outputOptions:F},I={parentWorkflow:K,workflowId:$,runId:X,executionPath:G,resumeSteps:W,stepResults:J,prevResult:B,resumeData:Z,activeStepsPath:Q,requestContext:H,perStep:V,state:O,outputOptions:F};if(L.loopType==="dountil")if(q)await N.publish("workflows",{type:"workflow.step.end",runId:X,data:I});else await N.publish("workflows",{type:"workflow.step.run",runId:X,data:w});else if(q)await N.publish("workflows",{type:"workflow.step.run",runId:X,data:w});else await N.publish("workflows",{type:"workflow.step.end",runId:X,data:I})}async function Dv0({workflowId:$,prevResult:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,timeTravel:Z,restart:K,resumeData:H,parentWorkflow:z,requestContext:V,perStep:A,state:F,outputOptions:N,forEachIndex:D},{pubsub:L,mastra:B,step:O}){let E=iz({stepResults:J,state:F}),M=J[O.step.id],R=M?.output?.length??0,q=Y?.output?.length??0;if(D!==void 0&&W?.length>0&&R>0){let C=M?.output,k=Array.isArray(C)?C.length:0;if(!Array.isArray(C)||D<0||D>=k){let v=Error(`Invalid forEachIndex ${D} for forEach resume: expected index in range [0, ${k-1}] but output array has length ${k}`);await L.publish("workflows",{type:"workflow.fail",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:G,resumeSteps:W,stepResults:J,prevResult:{status:"failed",error:v},activeStepsPath:Q,requestContext:V,state:E,outputOptions:N}});return}let S=M?.output?.[D];if(S?.status==="suspended"||S===null){let v=O.step.component==="WORKFLOW",x=Y?.output,y=v&&Y.status==="success"&&Array.isArray(x)?{status:"success",output:x[D]}:Y;await L.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:[G[0],D],resumeSteps:W,timeTravel:Z,restart:K,stepResults:J,prevResult:y,resumeData:H,activeStepsPath:Q,requestContext:V,perStep:A,state:E,outputOptions:N}});return}if(M.output.filter((v)=>v===null||v?.status==="suspended").length>0){let v={};for(let y=0;y<M.output.length;y++){let d=M.output[y];if(d?.status==="suspended"&&d.suspendPayload?.__workflow_meta?.resumeLabels)Object.assign(v,d.suspendPayload.__workflow_meta.resumeLabels)}let x={foreachIndex:D};if(Object.keys(v).length>0)x.resumeLabels=v;await L.publish("workflows",{type:"workflow.step.end",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:G,resumeSteps:W,stepResults:{...J,[O.step.id]:{...M,status:"suspended",suspendedAt:Date.now(),suspendPayload:{__workflow_meta:x}}},prevResult:{status:"suspended",output:M.output,suspendPayload:{__workflow_meta:x},payload:M.payload,startedAt:M.startedAt,suspendedAt:Date.now()},activeStepsPath:Q,requestContext:V,state:E,outputOptions:N}});return}return}if(H!==void 0&&D===void 0&&M?.output?.length>0){let C=[];for(let k=0;k<M.output.length;k++){let S=M.output[k];if(S&&typeof S==="object"&&S.status==="suspended")C.push(k)}if(C.length>0){let k=O.opts.concurrency??1,S=C.slice(0,k),T=await B.getStorage()?.getStore("workflows"),v=[...M.output];for(let y of S)v[y]=L04();await T?.updateWorkflowResults({workflowName:$,runId:X,stepId:O.step.id,result:{...M,output:v},requestContext:V});let x=O.step.component==="WORKFLOW";for(let y of S){let d=Y?.output,u=x&&Y.status==="success"&&Array.isArray(d)?{status:"success",output:d[y]}:Y;try{await L.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:[G[0],y],resumeSteps:W,timeTravel:Z,restart:K,stepResults:J,prevResult:u,resumeData:H,activeStepsPath:Q,requestContext:V,perStep:A,state:E,outputOptions:N}})}catch{}}return}}let w=await B.getStorage()?.getStore("workflows");if(R>=q&&M?.output?.filter((C)=>C!==null)?.length>=q||Y?.output?.length===0){let C=M;if(Y?.output?.length===0)C={status:"success",output:[],startedAt:Date.now(),endedAt:Date.now(),payload:Y?.output},await w?.updateWorkflowResults({workflowName:$,runId:X,stepId:O.step.id,result:C,requestContext:V}),J[O.step.id]=C;await L.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:G.slice(0,-1).concat([G[G.length-1]+1]),resumeSteps:W,stepResults:J,timeTravel:Z,restart:K,prevResult:C,resumeData:void 0,activeStepsPath:Q,requestContext:V,perStep:A,state:E,outputOptions:N}});return}else if(R>=q)return;if(G.length===1&&R===0){let C=Math.min(O.opts.concurrency??1,q),k=Array.from({length:C},()=>null);await w?.updateWorkflowResults({workflowName:$,runId:X,stepId:O.step.id,result:{status:"success",output:k,startedAt:Date.now(),payload:Y?.output},requestContext:V});let S=O.step.component==="WORKFLOW";for(let T=0;T<C;T++){let v=Y?.output,x=S&&Y.status==="success"&&Array.isArray(v)?{status:"success",output:v[T]}:Y;await L.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:[G[0],T],resumeSteps:W,stepResults:J,timeTravel:Z,restart:K,prevResult:x,resumeData:H,activeStepsPath:Q,requestContext:V,perStep:A,state:E,outputOptions:N}})}return}M.output.push(null),await w?.updateWorkflowResults({workflowName:$,runId:X,stepId:O.step.id,result:{status:"success",output:M.output,startedAt:Date.now(),payload:Y?.output},requestContext:V});let I=O.step.component==="WORKFLOW",P=Y?.output,_=I&&Y.status==="success"&&Array.isArray(P)?{status:"success",output:P[R]}:Y;await L.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:[G[0],R],resumeSteps:W,timeTravel:Z,restart:K,stepResults:J,prevResult:_,resumeData:H,activeStepsPath:Q,requestContext:V,perStep:A,state:E,outputOptions:N}})}async function HC8({workflowId:$,runId:Y,executionPath:X,stepResults:G,activeStepsPath:J,resumeSteps:Q,timeTravel:W,restart:Z,prevResult:K,resumeData:H,parentWorkflow:z,requestContext:V,perStep:A,state:F,outputOptions:N},{pubsub:D,step:L}){let B={},O=iz({stepResults:G,state:F});for(let E=0;E<L.steps.length;E++){let M=L.steps[E];if(M?.type==="step"){if(Z)B[M.step.id]=!!Z.activeStepsPath[M.step.id];else B[M.step.id]=!0;if(A)break}}await Promise.all(L.steps?.filter((E)=>B[E.step.id]).map(async(E,M)=>{return D.publish("workflows",{type:"workflow.step.run",runId:Y,data:{workflowId:$,runId:Y,executionPath:Z?X.slice(0,-1).concat([M]):X.concat([M]),resumeSteps:Q,stepResults:G,prevResult:K,resumeData:H,timeTravel:W,restart:Z?{...Z,isParallelOrConditionalRestarted:!0}:void 0,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:A,state:O,outputOptions:N}})}))}async function zC8({workflowId:$,runId:Y,executionPath:X,stepResults:G,activeStepsPath:J,resumeSteps:Q,timeTravel:W,restart:Z,prevResult:K,resumeData:H,parentWorkflow:z,requestContext:V,perStep:A,state:F,outputOptions:N},{pubsub:D,stepExecutor:L,step:B}){let O=iz({stepResults:G,state:F}),E=new p1(Object.entries(V??{})),M=await L.evaluateConditions({workflowId:$,step:B,runId:Y,stepResults:G,state:O,requestContext:E,input:K?.status==="success"?K.output:void 0,resumeData:H}),R={};for(let w=0;w<M.length;w++)R[M[w]]=!0;let q;if(A)q=B.steps.filter((I,P)=>R[P])[0];if(q){let w=B.steps.findIndex((I)=>I.step.id===q.step.id);J[q.step.id]=X.concat([w]),await D.publish("workflows",{type:"workflow.step.run",runId:Y,data:{workflowId:$,runId:Y,executionPath:X.concat([w]),resumeSteps:Q,stepResults:G,timeTravel:W,restart:Z,prevResult:K,resumeData:H,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:A,state:O,outputOptions:N}})}else await Promise.all(B.steps.map(async(w,I)=>{if(R[I]){if(w?.type==="step")J[w.step.id]=X.concat([I]);return D.publish("workflows",{type:"workflow.step.run",runId:Y,data:{workflowId:$,runId:Y,executionPath:X.concat([I]),resumeSteps:Q,stepResults:G,timeTravel:W,restart:Z?{...Z,isParallelOrConditionalRestarted:!0}:void 0,prevResult:K,resumeData:H,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:A,state:O,outputOptions:N}})}else return D.publish("workflows",{type:"workflow.step.end",runId:Y,data:{workflowId:$,runId:Y,executionPath:X.concat([I]),resumeSteps:Q,stepResults:G,prevResult:{status:"skipped"},resumeData:H,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:A,state:O,outputOptions:N}})}))}async function VC8($,{pubsub:Y,eventName:X,currentState:G}){let J=G?.waitingPaths[X];if(!J)return;let Q=nz($.workflow,J),W={status:"success",output:G?.context[Q?.id??"input"]?.payload};await Y.publish("workflows",{type:"workflow.step.run",runId:$.runId,data:{workflowId:$.workflowId,runId:$.runId,executionPath:J,resumeSteps:[],resumeData:$.resumeData,parentWorkflow:$.parentWorkflow,stepResults:G?.context,prevResult:W,activeStepsPath:{},requestContext:G?.requestContext,perStep:$.perStep}})}async function AC8({workflowId:$,runId:Y,executionPath:X,stepResults:G,activeStepsPath:J,resumeSteps:Q,timeTravel:W,restart:Z,prevResult:K,resumeData:H,parentWorkflow:z,requestContext:V,perStep:A},{pubsub:F,stepExecutor:N,step:D}){let L=Date.now();await F.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-waiting",payload:{id:D.id,status:"waiting",payload:K.status==="success"?K.output:void 0,startedAt:L}}});let B=new p1(Object.entries(V??{})),O=await N.resolveSleep({workflowId:$,step:D,runId:Y,stepResults:G,requestContext:B,input:K?.status==="success"?K.output:void 0,resumeData:H});setTimeout(async()=>{await F.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-result",payload:{id:D.id,status:"success",payload:K.status==="success"?K.output:void 0,output:K.status==="success"?K.output:void 0,startedAt:L,endedAt:Date.now()}}}),await F.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-finish",payload:{id:D.id,metadata:{}}}}),await F.publish("workflows",{type:"workflow.step.run",runId:Y,data:{workflowId:$,runId:Y,executionPath:X.slice(0,-1).concat([X[X.length-1]+1]),resumeSteps:Q,timeTravel:W,restart:Z,stepResults:G,prevResult:K,resumeData:H,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:A}})},O<0?0:O)}async function FC8({workflowId:$,runId:Y,executionPath:X,stepResults:G,activeStepsPath:J,resumeSteps:Q,timeTravel:W,restart:Z,prevResult:K,resumeData:H,parentWorkflow:z,requestContext:V,perStep:A},{pubsub:F,stepExecutor:N,step:D}){let L=Date.now(),B=new p1(Object.entries(V??{})),O=await N.resolveSleepUntil({workflowId:$,step:D,runId:Y,stepResults:G,requestContext:B,input:K?.status==="success"?K.output:void 0,resumeData:H});await F.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-waiting",payload:{id:D.id,status:"waiting",payload:K.status==="success"?K.output:void 0,startedAt:L}}}),setTimeout(async()=>{await F.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-result",payload:{id:D.id,status:"success",payload:K.status==="success"?K.output:void 0,output:K.status==="success"?K.output:void 0,startedAt:L,endedAt:Date.now()}}}),await F.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-finish",payload:{id:D.id,metadata:{}}}}),await F.publish("workflows",{type:"workflow.step.run",runId:Y,data:{workflowId:$,runId:Y,executionPath:X.slice(0,-1).concat([X[X.length-1]+1]),resumeSteps:Q,timeTravel:W,restart:Z,stepResults:G,prevResult:K,resumeData:H,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:A}})},O<0?0:O)}function NC8($){return $ instanceof RW}function LC8($){return $!==null&&typeof $==="object"&&"id"in $&&"execute"in $&&!($ instanceof YJ)&&!($ instanceof RW)}function BC8($){return $!==null&&typeof $==="object"&&"id"in $&&typeof $.id==="string"&&!($ instanceof YJ)&&!($ instanceof RW)&&(typeof $.processInput==="function"||typeof $.processInputStep==="function"||typeof $.processOutputStream==="function"||typeof $.processOutputResult==="function"||typeof $.processOutputStep==="function")}function U_($,Y){if($===Y)return!0;if(!$||!Y)return $===Y;return $.length===Y.length&&$.every((X,G)=>JD(X,Y[G]))}function Lv0($,Y){if(G80($))return MC8($,Y);if(NC8($))return RC8($,Y);if(BC8($)){let X=qC8($);return X.providesSkillDiscovery=$.providesSkillDiscovery,X}if(LC8($))return OC8($);throw Error("Invalid input: expected StepParams, Agent, ToolStep, or Processor")}function OC8($){return{id:$.id,description:$.description,inputSchema:W4($.inputSchema),stateSchema:$.stateSchema?W4($.stateSchema):void 0,outputSchema:W4($.outputSchema),resumeSchema:$.resumeSchema?W4($.resumeSchema):void 0,suspendSchema:$.suspendSchema?W4($.suspendSchema):void 0,requestContextSchema:$.requestContextSchema?W4($.requestContextSchema):void 0,scorers:$.scorers,retries:$.retries,metadata:$.metadata,execute:$.execute.bind($)}}async function EC8($){let{fullStream:Y,isV2Model:X,pubsub:G,runId:J,toolData:Q,logger:W,writer:Z,streamFormat:K}=$;try{await G.publish(`workflow.events.v2.${J}`,{type:"watch",runId:J,data:{type:"tool-call-streaming-start",...Q}})}catch(z){W?.debug("Failed to publish stream start event",{runId:J,error:z})}let H=null;for await(let z of Y){if(QC8(z)){H=z;break}if(typeof z==="object"&&z!==null&&"type"in z&&z.type==="text-delta"){let V=ZC8(z,X);if(V)try{await G.publish(`workflow.events.v2.${J}`,{type:"watch",runId:J,data:{type:"tool-call-delta",...Q,argsTextDelta:V}})}catch(A){W?.debug("Failed to publish stream delta event",{runId:J,error:A})}}if(K!=="legacy")await Ev0({writer:Z,chunk:z})}try{await G.publish(`workflow.events.v2.${J}`,{type:"watch",runId:J,data:{type:"tool-call-streaming-finish",...Q}})}catch(z){W?.debug("Failed to publish stream finish event",{runId:J,error:z})}return{tripwireChunk:H}}async function A04($,Y,X){if(!$)return;try{await $(Y)}catch(G){X?.warn("User onFinish callback threw an error",{error:G})}}function MC8($,Y){let X=Y??{},G=X?.structuredOutput?.schema??U.object({text:U.string()}),{retries:J,scorers:Q,metadata:W,...Z}=X??{};return{id:$.id,description:$.getDescription(),inputSchema:W4(U.object({prompt:U.string()})),outputSchema:W4(G),retries:J,scorers:Q,metadata:W,execute:async({inputData:K,runId:H,mastra:z,[VQ]:V,[MW]:A,requestContext:F,abortSignal:N,abort:D,writer:L,...B})=>{let O=$4(B),E=z?.getLogger(),M={name:$.name??$.id,args:K},R=KG(await $.getModel({requestContext:F})),q=null,w=(C)=>{let k=C;if(Z?.structuredOutput?.schema&&k.object)q=k.object},I,P;if(R){let C=await $.stream(K.prompt,{...Z??{},...O,requestContext:F,onFinish:(k)=>{w(k),A04(Z?.onFinish,k,E)},abortSignal:N});I=C.fullStream,P=C.text}else{let C;if(P=new Promise((S)=>{C=S}),typeof $.streamLegacy!=="function")throw Error(`Agent step "${$.id}" uses a legacy v1 model but does not implement streamLegacy().`);I=(await $.streamLegacy(K.prompt,{...Z??{},...O,requestContext:F,onFinish:(S)=>{w(S),C(S.text),A04(Z?.onFinish,S,E)},abortSignal:N})).fullStream}if(N.aborted)return D();let{tripwireChunk:_}=await EC8({fullStream:I,isV2Model:R,pubsub:V,runId:H,toolData:M,logger:E,writer:L,streamFormat:A});if(_)throw WC8(_);if(q!==null)return q;return{text:await P}},component:"AGENT"}}function RC8($,Y){let X=Y;if(!$.inputSchema||!$.outputSchema)throw Error("Tool must have input and output schemas defined");return{id:$.id,description:$.description,inputSchema:$.inputSchema,outputSchema:$.outputSchema,resumeSchema:$.resumeSchema,suspendSchema:$.suspendSchema,retries:X?.retries,scorers:X?.scorers,metadata:X?.metadata,execute:async({inputData:G,mastra:J,requestContext:Q,suspend:W,resumeData:Z,runId:K,workflowId:H,state:z,setState:V,...A})=>{let F=$4(A);if(!$.execute)throw Error(`Tool ${$.id} does not have an execute function`);let N={mastra:J,requestContext:Q,...F,workflow:{runId:K,workflowId:H,state:z,setState:V,suspend:W,resumeData:Z}};return $.execute(G,N)},component:"TOOL"}}function qC8($){let Y=(J)=>{switch(J){case"input":return J6.INPUT_PROCESSOR;case"inputStep":return J6.INPUT_STEP_PROCESSOR;case"outputStream":case"outputResult":return J6.OUTPUT_PROCESSOR;case"outputStep":return J6.OUTPUT_STEP_PROCESSOR;default:return J6.OUTPUT_PROCESSOR}},X=(J)=>{switch(J){case"input":return"input processor";case"inputStep":return"input step processor";case"outputStream":return"output stream processor";case"outputResult":return"output processor";case"outputStep":return"output step processor";default:return"processor"}},G=(J)=>{switch(J){case"input":return!!$.processInput;case"inputStep":return!!$.processInputStep;case"outputStream":return!!$.processOutputStream;case"outputResult":return!!$.processOutputResult;case"outputStep":return!!$.processOutputStep;default:return!1}};return{id:`processor:${$.id}`,description:$.name??`Processor ${$.id}`,inputSchema:W4(Gg),outputSchema:W4(X80),execute:async({inputData:J,requestContext:Q,...W})=>{let Z=$4(W),K=J,{phase:H,messages:z,messageList:V,stepNumber:A,systemMessages:F,part:N,streamParts:D,state:L,result:B,finishReason:O,toolCalls:E,text:M,retryCount:R,model:q,tools:w,toolChoice:I,activeTools:P,providerOptions:_,modelSettings:C,structuredOutput:k,steps:S,usage:T,messageId:v,rotateResponseMessageId:x,processorStates:y,abortSignal:d}=K,u=(Y0,K0)=>{throw new u6(Y0||`Tripwire triggered by ${$.id}`,K0,$.id)},b=v,g=v,p=x?()=>{return g=x(),g}:void 0,h={text:"",usage:{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:"unknown",steps:[]},n=()=>{switch(H){case"input":return{messages:z??[],...F?{systemMessages:F}:{},...R!==void 0?{retryCount:R}:{}};case"inputStep":{let Y0=lO(q),K0=WD(w),A0=nO(I,w),D0=iO(P,w);return{messages:z??[],...F?{systemMessages:F}:{},...A!==void 0?{stepNumber:A}:{},...g?{messageId:g}:{},...R!==void 0?{retryCount:R}:{},...Y0?{model:Y0}:{},...K0?{tools:K0}:{},...A0?{toolChoice:A0}:{},...D0?{activeTools:D0}:{}}}case"outputResult":{let Y0=J80(B??h);return{messages:z??[],...Y0?{result:Y0}:{},...R!==void 0?{retryCount:R}:{}}}case"outputStep":return{messages:z??[],...F?{systemMessages:F}:{},...A!==void 0?{stepNumber:A}:{},...O!==void 0?{finishReason:O}:{},...M!==void 0?{text:M}:{},...E!==void 0?{toolCalls:E}:{},...R!==void 0?{retryCount:R}:{}};default:return}},t=(Y0)=>{if(Y0===null||typeof Y0!=="object"||Array.isArray(Y0))return Y0;let K0=Y0;switch(H){case"input":return{...Array.isArray(K0.messages)&&!U_(z,K0.messages)?{messages:K0.messages}:{},...Array.isArray(K0.systemMessages)&&!U_(F,K0.systemMessages)?{systemMessages:K0.systemMessages}:{}};case"inputStep":{let A0={};if(Array.isArray(K0.messages)&&!U_(z,K0.messages))A0.messages=K0.messages;if(Array.isArray(K0.systemMessages)&&!U_(F,K0.systemMessages))A0.systemMessages=K0.systemMessages;if(K0.messageId!==void 0&&K0.messageId!==b)A0.messageId=K0.messageId;if(K0.model!==void 0&&K0.model!==q){let D0=lO(K0.model);if(D0)A0.model=D0}if(K0.tools!==void 0&&K0.tools!==w){let D0=WD(K0.tools);if(D0)A0.tools=D0}if(K0.toolChoice!==void 0&&K0.toolChoice!==I){let D0=nO(K0.toolChoice,K0.tools??w);if(D0)A0.toolChoice=D0}if(K0.activeTools!==void 0&&K0.activeTools!==P){let D0=iO(K0.activeTools,K0.tools??w);if(D0)A0.activeTools=D0}if(K0.retryCount!==void 0&&K0.retryCount!==R)A0.retryCount=K0.retryCount;return A0}case"outputResult":case"outputStep":return{...Array.isArray(K0.messages)&&!U_(z,K0.messages)?{messages:K0.messages}:{},...Array.isArray(K0.systemMessages)&&!U_(F,K0.systemMessages)?{systemMessages:K0.systemMessages}:{}};default:return}};if(!G(H))return K;let s=Z.tracingContext?.currentSpan,Z0=H==="inputStep"||H==="outputStep"?s?.findParent("model_step")||s:s?.findParent("agent_run")||s,X0=H!=="outputStream"?Z0?.createChildSpan({type:"processor_run",name:`${X(H)}: ${$.id}`,entityType:Y(H),entityId:$.id,entityName:$.name??$.id,input:n(),attributes:{processorExecutor:"workflow",processorIndex:$.processorIndex}}):void 0,a=g4(X0?{currentSpan:X0}:Z.tracingContext),Q0;if(y){let Y0=y.get($.id);if(!Y0)Y0=new ZD,y.set($.id,Y0);Q0=Y0.customState}else Q0=L??{};let e={abort:u,retryCount:R??0,requestContext:Q,...a,state:Q0,abortSignal:d,messageId:g,rotateResponseMessageId:p},m={phase:H,messageList:V??(Array.isArray(z)?new l6().add(z,"input").addSystem(F??[]):void 0),stepNumber:A,systemMessages:F,streamParts:D,state:Q0,processorStates:y,result:B,finishReason:O,toolCalls:E,text:M,retryCount:R,model:q,tools:w,toolChoice:I,activeTools:P,providerOptions:_,modelSettings:C,structuredOutput:k,steps:S,usage:T,messageId:g,rotateResponseMessageId:p};return(async(Y0)=>{try{let K0=await DQ({span:X0,fn:Y0});return X0?.end({output:t(K0)}),K0}catch(K0){if(K0 instanceof u6)X0?.end({output:{tripwire:K0.message}});else X0?.error({error:K0,endSpan:!0});throw K0}})(async()=>{switch(H){case"input":{if($.processInput){if(!m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processInput phase`});let Y0=z.map((D0)=>D0.id),K0=m.messageList.makeMessageSourceChecker(),A0=await $.processInput({...e,messages:z,messageList:m.messageList,systemMessages:F??[]});if(A0 instanceof l6){if(A0!==m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...m,messages:A0.get.all.db(),systemMessages:A0.getAllSystemMessages()}}else if(Array.isArray(A0))return A5.applyMessagesToMessageList(A0,m.messageList,Y0,K0,"input"),{...m,messages:A0};else if(A0&&"messages"in A0&&"systemMessages"in A0){let D0=A0;return A5.applyMessagesToMessageList(D0.messages,m.messageList,Y0,K0,"input"),m.messageList.replaceAllSystemMessages(D0.systemMessages),{...m,messages:D0.messages,systemMessages:D0.systemMessages}}return{...m,messages:z}}return{...m,messages:z}}case"inputStep":{if($.processInputStep){if(!m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processInputStep phase`});let Y0=z.map((O0)=>O0.id),K0=m.messageList.makeMessageSourceChecker(),A0=await $.processInputStep({...e,messages:z,messageList:m.messageList,stepNumber:A??0,systemMessages:F??[],model:q,tools:w,toolChoice:I,activeTools:P,providerOptions:_,modelSettings:C,structuredOutput:k,steps:S??[],messageId:g,rotateResponseMessageId:p}),D0=await A5.validateAndFormatProcessInputStepResult(A0,{messageList:m.messageList,processor:$,stepNumber:A??0});if(D0.messages)A5.applyMessagesToMessageList(D0.messages,m.messageList,Y0,K0);if(D0.systemMessages)m.messageList.replaceAllSystemMessages(D0.systemMessages);return{...m,messages:z,...D0,...g?{messageId:D0.messageId??g}:{}}}return{...m,messages:z}}case"outputStream":{if($.processOutputStream&&N){let Y0=`__outputStreamSpan_${$.id}`,K0=Q0,A0=K0[Y0];if(!A0&&Z0)A0=Z0.createChildSpan({type:"processor_run",name:`output stream processor: ${$.id}`,entityType:J6.OUTPUT_PROCESSOR,entityId:$.id,entityName:$.name??$.id,attributes:{processorExecutor:"workflow",processorIndex:$.processorIndex}}),K0[Y0]=A0;let D0=g4(A0?{currentSpan:A0}:e.tracingContext),O0;try{if(O0=await $.processOutputStream({...e,...D0,part:N,streamParts:D??[],state:K0,messageList:m.messageList}),N&&N.type==="finish")A0?.end({output:{totalChunks:(D??[]).length}}),delete K0[Y0]}catch(R0){if(R0 instanceof u6)A0?.end({output:{tripwire:R0.message}});else A0?.error({error:R0,endSpan:!0});throw delete K0[Y0],R0}return{...m,state:K0,part:O0}}return{...m,part:N}}case"outputResult":{if($.processOutputResult){if(!m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processOutputResult phase`});let Y0=z.map((O0)=>O0.id),K0=m.messageList.makeMessageSourceChecker(),A0={text:"",usage:{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:"unknown",steps:[]},D0=await $.processOutputResult({...e,messages:z,messageList:m.messageList,result:m.result??A0});if(D0 instanceof l6){if(D0!==m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...m,messages:D0.get.all.db(),systemMessages:D0.getAllSystemMessages()}}else if(Array.isArray(D0))return A5.applyMessagesToMessageList(D0,m.messageList,Y0,K0,"response"),{...m,messages:D0};else if(D0&&"messages"in D0&&"systemMessages"in D0){let O0=D0;return A5.applyMessagesToMessageList(O0.messages,m.messageList,Y0,K0,"response"),m.messageList.replaceAllSystemMessages(O0.systemMessages),{...m,messages:O0.messages,systemMessages:O0.systemMessages}}return{...m,messages:z}}return{...m,messages:z}}case"outputStep":{if($.processOutputStep){if(!m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processOutputStep phase`});let Y0=z.map((O0)=>O0.id),K0=m.messageList.makeMessageSourceChecker(),A0={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},D0=await $.processOutputStep({...e,messages:z,messageList:m.messageList,stepNumber:A??0,finishReason:O,toolCalls:E,text:M,usage:T??A0,systemMessages:F??[],steps:S??[]});if(D0 instanceof l6){if(D0!==m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...m,messages:D0.get.all.db(),systemMessages:D0.getAllSystemMessages()}}else if(Array.isArray(D0))return A5.applyMessagesToMessageList(D0,m.messageList,Y0,K0,"response"),{...m,messages:D0};else if(D0&&"messages"in D0&&"systemMessages"in D0){let O0=D0;return A5.applyMessagesToMessageList(O0.messages,m.messageList,Y0,K0,"response"),m.messageList.replaceAllSystemMessages(O0.systemMessages),{...m,messages:O0.messages,systemMessages:O0.systemMessages}}return{...m,messages:z}}return{...m,messages:z}}default:return{...m,messages:z}}})},component:"PROCESSOR"}}function $80($){if($.schedule){let G=Array.isArray($.schedule)?$.schedule:[$.schedule];if(Array.isArray($.schedule)){let J=new Set;for(let Q of G){if(!Q.id)throw Error(`Workflow "${$.id}" declares an array of schedules but one entry is missing the required \`id\` field. Every entry in a schedule array must have a unique stable id.`);if(J.has(Q.id))throw Error(`Workflow "${$.id}" declares duplicate schedule id "${Q.id}".`);J.add(Q.id)}}for(let J of G)JC8(J.cron,J.timezone)}let Y=new DC8({mastra:$.mastra}),X=new PC8({mastra:$.mastra,eventProcessor:Y,options:{validateInputs:$.options?.validateInputs??!0,shouldPersistSnapshot:$.options?.shouldPersistSnapshot??(()=>!0),tracingPolicy:$.options?.tracingPolicy,onFinish:$.options?.onFinish,onError:$.options?.onError}});return new Y80({...$,executionEngine:X})}function F04($){if(!$||typeof $!=="object")return!1;if($ instanceof Y80)return!0;if("component"in $&&$.component==="WORKFLOW")return!0;return!1}function D04($,{workflowId:Y,executionPath:X,parentWorkflow:G}){let J=null;if(G){let Z=D04($,G);if(!Z)return null;J=Z}J=J??($.__hasInternalWorkflow(Y)?$.__getInternalWorkflow(Y):$.getWorkflow(Y));let W=J.stepGraph[X[0]];if(W?.type==="parallel"||W?.type==="conditional")W=W.steps[X[1]];if(W?.type==="step"||W?.type==="loop"){if(F04(W.step))return W.step;return null}if(W?.type==="foreach"){if(F04(W.step))return W.step;return null}return null}function nz($,Y){let X=0,J=$.stepGraph[Y[0]];if(J?.type==="parallel"||J?.type==="conditional")J=J.steps[Y[1]],X++;else if(J?.type==="foreach")return J.step;if(!(J?.type==="step"||J?.type==="loop"))return null;if(J instanceof Y80)return nz(J,Y.slice(X+1));return J.step}function Nv0($){return $.type==="step"||$.type==="loop"||$.type==="foreach"}var KC8=class{mastra;__registerMastra($){this.mastra=$}constructor({mastra:$}){this.mastra=$}},UC8,DC8,Y80,IC8,PC8;var N04=V0(()=>{z_();PT0();Bv0();s40();Ow();DO();aw();SO();uz();dZ();xh();Xg();EW();wF();zQ0();O1();UC8=class extends u8{mastra;constructor({mastra:$}){super({name:"StepExecutor",component:AK.WORKFLOW});this.mastra=$}__registerMastra($){this.mastra=$;let Y=$?.getLogger();if(Y)this.__setLogger(Y)}createOutputWriter($){return async(Y)=>{try{if(this.mastra?.pubsub)await this.mastra.pubsub.publish(`workflow.events.v2.${$}`,{type:"watch",runId:$,data:Y})}catch(X){this.logger.debug("Failed to publish workflow watch event",{runId:$,error:X})}}}async execute($){let{step:Y,stepResults:X,runId:G,requestContext:J,retryCount:Q=0,perStep:W}=$,Z=$.abortController??new AbortController,K,H,z=Date.now(),{inputData:V,validationError:A}=await W80({prevOutput:typeof $.foreachIdx==="number"?$.input?.[$.foreachIdx]:$.input,step:Y,validateInputs:$.validateInputs??!0}),F={...X[Y.id],startedAt:z,payload:(typeof $.foreachIdx==="number"?$.input:V)??{}};if($.resumeData){if(F.resumePayload=$.resumeData,F.resumedAt=Date.now(),F.suspendPayload&&"__workflow_meta"in F.suspendPayload){let{__workflow_meta:L,...B}=F.suspendPayload;F.suspendPayload=B}}let N=$.stepResults[Y.id]?.status==="suspended"?$.stepResults[Y.id]?.suspendPayload:void 0;if(N&&"__workflow_meta"in N){let{__workflow_meta:L,...B}=N;N=B}let D;try{if(A)throw A;let L=QD(),B=this.createOutputWriter(G),O=await DQ({span:$.tracingContext?.currentSpan,fn:()=>Y.execute(az({workflowId:$.workflowId,runId:G,mastra:this.mastra,requestContext:J,inputData:V,state:$.state,setState:async(I)=>{D={...D??$.state,...I}},retryCount:Q,resumeData:$.resumeData,suspendData:N,getInitData:()=>X?.input,getStepResult:sZ.bind(this,X),suspend:async(I,P)=>{let{suspendData:_,validationError:C}=await K80({suspendData:I,step:Y,validateInputs:$.validateInputs??!0});if(C)throw C;let k={};if(P?.resumeLabel){let S=Array.isArray(P.resumeLabel)?P.resumeLabel:[P.resumeLabel];for(let T of S)k[T]={stepId:Y.id,foreachIndex:$.foreachIdx}}K={payload:{..._,__workflow_meta:{runId:G,path:[Y.id],foreachIndex:$.foreachIdx,resumeLabels:Object.keys(k).length>0?k:void 0}}}},bail:(I)=>{H={payload:I}},writer:new PW({prefix:"workflow-step",callId:L,name:Y.id,runId:G},B),abort:()=>{Z?.abort()},[VQ]:this.mastra.pubsub,[MW]:$.format,engine:{},abortSignal:Z?.signal,...g4($.tracingContext)},{paramName:"runCount",deprecationMessage:rz,logger:this.logger}))}),M=Y.component==="WORKFLOW"&&W,R=Date.now(),q=D??$.state,w;if(K){if(w={...F,status:"suspended",suspendedAt:R,...O?{suspendOutput:O}:{},__state:q},K.payload)w.suspendPayload=K.payload}else if(H)w={...F,status:"bailed",endedAt:R,output:H.payload,__state:q};else if(M)w={...F,status:"paused",__state:q};else w={...F,status:"success",endedAt:R,output:O,__state:q};return w}catch(L){let B=Date.now(),O=XG(L,{serializeStack:!1,fallbackMessage:"Unknown step execution error"}),E=$.step.id,M=new G0({id:"WORKFLOW_STEP_INVOKE_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",details:{workflowId:$.workflowId,runId:$.runId,stepId:E}},O);return this.logger?.trackException(M),this.logger?.error(`Error executing step ${E}: `+O?.stack),{...F,status:"failed",endedAt:B,error:O,tripwire:L instanceof u6?{reason:L.message,retry:L.options?.retry,metadata:L.options?.metadata,processorId:L.processorId}:void 0}}}async evaluateConditions($){let{step:Y,stepResults:X,runId:G,requestContext:J,retryCount:Q=0}=$,W=$.abortController??new AbortController;return(await Promise.all(Y.conditions.map((H)=>{try{return this.evaluateCondition({workflowId:$.workflowId,condition:H,runId:G,requestContext:J,inputData:$.input,state:$.state,retryCount:Q,resumeData:$.resumeData,abortController:W,stepResults:X,iterationCount:0})}catch(z){return this.mastra?.getLogger()?.error("error evaluating condition",z),!1}}))).reduce((H,z,V)=>{if(z)H.push(V);return H},[])}async evaluateCondition({workflowId:$,condition:Y,runId:X,inputData:G,resumeData:J,stepResults:Q,state:W,requestContext:Z,abortController:K,retryCount:H=0,iterationCount:z}){let V=QD(),A=this.createOutputWriter(X);return Y(az({workflowId:$,runId:X,mastra:this.mastra,requestContext:Z,inputData:G,state:W,retryCount:H,resumeData:J,getInitData:()=>Q?.input,getStepResult:sZ.bind(this,Q),bail:(F)=>{throw Error("Not implemented")},writer:new PW({prefix:"workflow-step",callId:V,name:"condition",runId:X},A),abort:()=>{K?.abort()},[VQ]:this.mastra.pubsub,[MW]:void 0,engine:{},abortSignal:K?.signal,...g4(),iterationCount:z},{paramName:"runCount",deprecationMessage:rz,logger:this.logger}))}async resolveSleep($){let{step:Y,stepResults:X,runId:G,requestContext:J,retryCount:Q=0}=$,W=$.state??X?.__state??{},Z=$.abortController??new AbortController;if(Y.duration)return Y.duration;if(!Y.fn)return 0;try{let K=QD(),H=this.createOutputWriter(G);return await Y.fn(az({workflowId:$.workflowId,runId:G,mastra:this.mastra,requestContext:J,inputData:$.input,state:W,setState:async(z)=>{Object.assign(W,z)},retryCount:Q,resumeData:$.resumeData,getInitData:()=>X?.input,getStepResult:sZ.bind(this,X),suspend:async(z)=>{throw Error("Not implemented")},bail:(z)=>{throw Error("Not implemented")},abort:()=>{Z?.abort()},writer:new PW({prefix:"workflow-step",callId:K,name:Y.id,runId:G},H),[VQ]:this.mastra.pubsub,[MW]:void 0,engine:{},abortSignal:Z?.signal,...g4()},{paramName:"runCount",deprecationMessage:rz,logger:this.logger}))}catch(K){return this.mastra?.getLogger()?.error("error evaluating condition",K),0}}async resolveSleepUntil($){let{step:Y,stepResults:X,runId:G,requestContext:J,retryCount:Q=0}=$,W=$.state??X?.__state??{},Z=$.abortController??new AbortController;if(Y.date)return Y.date.getTime()-Date.now();if(!Y.fn)return 0;try{let K=QD(),H=this.createOutputWriter(G);return(await Y.fn(az({workflowId:$.workflowId,runId:G,mastra:this.mastra,requestContext:J,inputData:$.input,state:W,setState:async(V)=>{Object.assign(W,V)},retryCount:Q,resumeData:$.resumeData,getInitData:()=>X?.input,getStepResult:sZ.bind(this,X),suspend:async(V)=>{throw Error("Not implemented")},bail:(V)=>{throw Error("Not implemented")},abort:()=>{Z?.abort()},writer:new PW({prefix:"workflow-step",callId:K,name:Y.id,runId:G},H),[VQ]:this.mastra.pubsub,[MW]:void 0,engine:{},abortSignal:Z?.signal,...g4()},{paramName:"runCount",deprecationMessage:rz,logger:this.logger}))).getTime()-Date.now()}catch(K){return this.mastra?.getLogger()?.error("error evaluating condition",K),0}}};DC8=class extends KC8{stepExecutor;stepExecutionStrategy;abortControllers=new Map;parentChildRelationships=new Map;runFormats=new Map;constructor({mastra:$,stepExecutionStrategy:Y}){super({mastra:$});this.stepExecutor=new UC8({mastra:$}),this.stepExecutionStrategy=Y}getOrCreateAbortController($){let Y=this.abortControllers.get($);if(!Y)Y=new AbortController,this.abortControllers.set($,Y);return Y}cancelRunAndChildren($){let Y=this.abortControllers.get($);if(Y)Y.abort();for(let[X,G]of this.parentChildRelationships.entries())if(G===$)this.cancelRunAndChildren(X)}cleanupRun($){this.abortControllers.delete($),this.parentChildRelationships.delete($),this.runFormats.delete($);for(let[Y,X]of this.parentChildRelationships.entries())if(X===$)this.parentChildRelationships.delete(Y)}__registerMastra($){super.__registerMastra($),this.stepExecutor.__registerMastra($)}#$($){try{return this.mastra.getWorkflowById($)}catch{return}}async errorWorkflow({parentWorkflow:$,workflowId:Y,runId:X,resumeSteps:G,stepResults:J,resumeData:Q,requestContext:W},Z){await this.mastra.pubsub.publish("workflows",{type:"workflow.fail",runId:X,data:{workflowId:Y,runId:X,executionPath:[],resumeSteps:G,stepResults:J,prevResult:{status:"failed",error:XG(Z).toJSON()},requestContext:W,resumeData:Q,activeStepsPath:{},parentWorkflow:$}})}async processWorkflowCancel({workflowId:$,runId:Y,prevResult:X,...G}){if(this.cancelRunAndChildren(Y),!await(await this.mastra.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({workflowName:$,runId:Y}))this.mastra.getLogger()?.warn("Canceling workflow without loaded state",{workflowId:$,runId:Y});await this.endWorkflow({workflowId:$,runId:Y,prevResult:X,...G},"canceled")}async processWorkflowStart({workflow:$,parentWorkflow:Y,workflowId:X,runId:G,resumeSteps:J,prevResult:Q,resumeData:W,timeTravel:Z,restart:K,executionPath:H,stepResults:z,requestContext:V,perStep:A,format:F,state:N,outputOptions:D,forEachIndex:L}){let B=arguments[0].initialState??N??{},O=F??this.runFormats.get(G);if(this.runFormats.set(G,O),this.getOrCreateAbortController(G),Y?.runId)this.parentChildRelationships.set(G,Y.runId);let E=await this.mastra.getStorage()?.getStore("workflows"),R=(await E?.getWorkflowRunById({runId:G,workflowName:$.id}))?.resourceId;if($?.options?.shouldPersistSnapshot?.({stepResults:z??{},workflowStatus:"running"})??!0){if(await E?.persistWorkflowSnapshot({workflowName:$.id,runId:G,resourceId:R,snapshot:{activePaths:[],suspendedPaths:{},resumeLabels:{},waitingPaths:{},activeStepsPath:{},serializedStepGraph:$.serializedStepGraph,timestamp:Date.now(),runId:G,context:{...z??{input:Q?.status==="success"?Q.output:void 0},__state:B},status:"running",value:B}}),Y){let I=(await E?.loadWorkflowSnapshot({workflowName:Y.workflowId,runId:Y.runId}))?.context?.[X];await E?.updateWorkflowResults({workflowName:Y.workflowId,runId:Y.runId,stepId:X,result:{startedAt:I?.startedAt??Date.now(),status:"running",payload:I?.payload??Y.input?.output??{},...I??{},metadata:{...I?.metadata??{},nestedRunId:G}},requestContext:V})}}await this.mastra.pubsub.publish("workflows",{type:"workflow.step.run",runId:G,data:{parentWorkflow:Y,workflowId:X,runId:G,executionPath:H??[0],resumeSteps:J,stepResults:{...z??{input:Q?.status==="success"?Q.output:void 0},__state:B},prevResult:Q,timeTravel:Z,restart:K,requestContext:V,resumeData:W,activeStepsPath:{},perStep:A,state:B,outputOptions:D,forEachIndex:L}})}async endWorkflow($,Y="success"){let{workflowId:X,runId:G,prevResult:J,perStep:Q,workflow:W,stepResults:Z,activeStepsPath:K,executionPath:H}=$,z=await this.mastra.getStorage()?.getStore("workflows"),V=Q&&Y==="success"?"paused":Y;if(W?.options?.shouldPersistSnapshot?.({stepResults:Z??{},workflowStatus:V})??!0)await z?.updateWorkflowState({workflowName:X,runId:G,opts:{status:V,result:J,activePaths:H,activeStepsPath:K}});if(Q)await this.mastra.pubsub.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-paused",payload:{}}});await this.mastra.pubsub.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-finish",payload:{runId:G}}}),await this.mastra.pubsub.publish("workflows",{type:"workflow.end",runId:G,data:{...$,workflow:void 0}})}async processWorkflowEnd($){let{resumeSteps:Y,prevResult:X,resumeData:G,parentWorkflow:J,activeStepsPath:Q,requestContext:W,runId:Z,timeTravel:K,perStep:H,stepResults:z,state:V}=$,A=iz({stepResults:z,state:V});if(this.cleanupRun(Z),J){let F=J.stepGraph[J.executionPath[0]];if(F?.type==="loop")await V04({workflowId:J.workflowId,prevResult:X,runId:J.runId,executionPath:J.executionPath,stepResults:J.stepResults,activeStepsPath:J.activeStepsPath,resumeSteps:J.resumeSteps,resumeData:J.resumeData,parentWorkflow:J.parentWorkflow,requestContext:W,retryCount:0},{pubsub:this.mastra.pubsub,stepExecutor:this.stepExecutor,step:F,stepResult:X});else await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:J.runId,data:{workflowId:J.workflowId,runId:J.runId,executionPath:J.executionPath,resumeSteps:Y,stepResults:J.stepResults,prevResult:X,resumeData:G,activeStepsPath:Q,parentWorkflow:J.parentWorkflow,parentContext:J,requestContext:W,timeTravel:K,perStep:H,state:A,nestedRunId:Z}})}await this.mastra.pubsub.publish("workflows-finish",{type:"workflow.end",runId:Z,data:{...$,workflow:void 0,state:A}})}async processWorkflowSuspend($){let{workflow:Y,executionPath:X,resumeSteps:G,prevResult:J,resumeData:Q,parentWorkflow:W,activeStepsPath:Z,runId:K,requestContext:H,timeTravel:z,restart:V,stepResults:A,state:F,outputOptions:N}=$,D=iz({stepResults:A,state:F});if(W){let L=J.suspendPayload?.__workflow_meta?.path??[],B=Y&&X?nz(Y,X)?.id:void 0,O=B&&L[0]!==B?[B,...L]:L;await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:W.runId,data:{workflowId:W.workflowId,runId:W.runId,executionPath:W.executionPath,resumeSteps:G,stepResults:W.stepResults,prevResult:{...J,suspendPayload:{...J.suspendPayload,__workflow_meta:{...J.suspendPayload?.__workflow_meta??{},runId:K,path:O}}},timeTravel:z,restart:V,resumeData:Q,activeStepsPath:Z,requestContext:H,parentWorkflow:W.parentWorkflow,parentContext:W,state:D,outputOptions:N,nestedRunId:K}})}await this.mastra.pubsub.publish("workflows-finish",{type:"workflow.suspend",runId:K,data:{...$,workflow:void 0,state:D}})}async processWorkflowFail($){let{workflowId:Y,runId:X,resumeSteps:G,prevResult:J,resumeData:Q,parentWorkflow:W,activeStepsPath:Z,requestContext:K,timeTravel:H,restart:z,stepResults:V,state:A,outputOptions:F,workflow:N,executionPath:D}=$,L=iz({stepResults:V,state:A});this.cleanupRun(X);let B=await this.mastra.getStorage()?.getStore("workflows");if(N?.options?.shouldPersistSnapshot?.({stepResults:V??{},workflowStatus:"failed"})??!0)await B?.updateWorkflowState({workflowName:Y,runId:X,opts:{status:"failed",error:J.error,activePaths:D,activeStepsPath:Z}});if(W)await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:W.runId,data:{workflowId:W.workflowId,runId:W.runId,executionPath:W.executionPath,resumeSteps:G,stepResults:W.stepResults,prevResult:J,timeTravel:H,restart:z,resumeData:Q,activeStepsPath:Z,requestContext:K,parentWorkflow:W.parentWorkflow,parentContext:W,state:L,outputOptions:F,nestedRunId:X}});await this.mastra.pubsub.publish("workflows-finish",{type:"workflow.fail",runId:X,data:{...$,workflow:void 0,state:L}})}async processWorkflowStepRun({workflow:$,workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,timeTravel:Z,restart:K,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A,retryCount:F=0,perStep:N,state:D,outputOptions:L,forEachIndex:B}){let O=this.runFormats.get(X),E=iz({stepResults:J,state:D}),M=$.stepGraph;if(!G?.length)return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A},new G0({id:"MASTRA_WORKFLOW",text:`Execution path is empty: ${JSON.stringify(G)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));let R=M[G[0]];if(!R){if(G[0]>=M.length)return this.endWorkflow({workflow:$,parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,stepResults:J,prevResult:H,activeStepsPath:Q,requestContext:A,state:E,outputOptions:L});return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A},new G0({id:"MASTRA_WORKFLOW",text:`Step not found in step graph: ${JSON.stringify(G)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}))}if((R.type==="parallel"||R.type==="conditional")&&G.length>1&&(!K||K&&K.isParallelOrConditionalRestarted))R=R.steps[G[1]];else if(R.type==="parallel")return HC8({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,restart:K,timeTravel:Z,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A,perStep:N,state:E,outputOptions:L},{pubsub:this.mastra.pubsub,step:R});else if(R?.type==="conditional")return zC8({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,restart:K,timeTravel:Z,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A,perStep:N,state:E,outputOptions:L},{pubsub:this.mastra.pubsub,stepExecutor:this.stepExecutor,step:R});else if(R?.type==="sleep")return AC8({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,timeTravel:Z,restart:K,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A,perStep:N},{pubsub:this.mastra.pubsub,stepExecutor:this.stepExecutor,step:R});else if(R?.type==="sleepUntil")return FC8({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,timeTravel:Z,restart:K,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A,perStep:N},{pubsub:this.mastra.pubsub,stepExecutor:this.stepExecutor,step:R});else if(R?.type==="foreach"&&G.length===1)return Dv0({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,timeTravel:Z,restart:K,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A,perStep:N,state:E,outputOptions:L,forEachIndex:B},{pubsub:this.mastra.pubsub,mastra:this.mastra,step:R});if(!Nv0(R))return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A},new G0({id:"MASTRA_WORKFLOW",text:`Step is not executable: ${R?.type} -- ${JSON.stringify(G)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));Q[R.step.id]=G;let q=await this.mastra?.getStorage()?.getStore("workflows");if(R.step instanceof Y80||R.step.component==="WORKFLOW"){if(W?.length===1&&W[0]===R.step.id){let v=J[R.step.id]?.suspendPayload?.__workflow_meta?.runId;if(!v)return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A},new G0({id:"MASTRA_WORKFLOW",text:`Nested workflow run id not found for auto-detection: ${JSON.stringify(J)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));let x=await q?.loadWorkflowSnapshot({workflowName:R.step.id,runId:v}),y=Object.keys(x?.suspendedPaths??{})?.[0];if(!y)return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A},new G0({id:"MASTRA_WORKFLOW",text:`No suspended step found in nested workflow: ${R.step.id}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));let d=x?.suspendedPaths?.[y],u=x?.context,b={status:"success",output:u?.[y]?.payload??H?.output};await this.mastra.pubsub.publish("workflows",{type:"workflow.resume",runId:X,data:{workflowId:R.step.id,parentWorkflow:{stepId:R.step.id,workflowId:Y,runId:X,stepGraph:M,executionPath:G,resumeSteps:W,stepResults:J,input:H,parentWorkflow:V,activeStepsPath:Q,resumeData:z},executionPath:d,runId:v,resumeSteps:[y],stepResults:u,prevResult:b,resumeData:z,activeStepsPath:Q,requestContext:A,perStep:N,initialState:E,state:E,outputOptions:L}})}else if(W?.length>1&&W[0]===R.step.id){let v=J[R.step.id]?.suspendPayload?.__workflow_meta?.runId;if(!v)return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:A},new G0({id:"MASTRA_WORKFLOW",text:`Nested workflow run id not found: ${JSON.stringify(J)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));let x=await q?.loadWorkflowSnapshot({workflowName:R.step.id,runId:v}),y=x?.context,d=W.slice(1),u={status:"success",output:y?.[d[0]]?.payload??H?.output};await this.mastra.pubsub.publish("workflows",{type:"workflow.resume",runId:X,data:{workflowId:R.step.id,parentWorkflow:{stepId:R.step.id,workflowId:Y,runId:X,stepGraph:M,executionPath:G,resumeSteps:W,stepResults:J,input:H,parentWorkflow:V,activeStepsPath:Q,resumeData:z},executionPath:x?.suspendedPaths?.[d[0]],runId:v,resumeSteps:d,stepResults:y,prevResult:u,resumeData:z,activeStepsPath:Q,requestContext:A,perStep:N,initialState:E,state:E,outputOptions:L}})}else if(Z&&Z.steps?.length>1&&Z.steps[0]===R.step.id){let T=J[R.step.id]?.metadata?.nestedRunId??QD(),v=await q?.loadWorkflowSnapshot({workflowName:R.step.id,runId:T})??{context:{}},x=R.step,y=U80({steps:Z.steps.slice(1),inputData:Z.inputData,resumeData:Z.resumeData,context:Z.nestedStepResults?.[R.step.id]??{},nestedStepsContext:Z.nestedStepResults??{},snapshot:v,graph:x.buildExecutionGraph(),perStep:N}),d=nz(x,y.executionPath),u=y.stepResults[d?.id??"input"];await this.mastra.pubsub.publish("workflows",{type:"workflow.start",runId:X,data:{workflowId:R.step.id,parentWorkflow:{stepId:R.step.id,workflowId:Y,runId:X,stepGraph:M,executionPath:G,resumeSteps:W,stepResults:J,timeTravel:Z,input:H,parentWorkflow:V,activeStepsPath:Q,resumeData:z},executionPath:y.executionPath,runId:T,stepResults:y.stepResults,prevResult:{status:"success",output:u?.payload},timeTravel:y,activeStepsPath:Q,requestContext:A,perStep:N,initialState:E,state:E,outputOptions:L}})}else if(K&&!!K.activeStepsPath?.[R.step.id]){let T=J[R.step.id]?.metadata?.nestedRunId??QD(),v=await q?.loadWorkflowSnapshot({workflowName:R.step.id,runId:T})??{context:{}},x=R.step,y=H80({snapshot:v,graph:x.buildExecutionGraph()}),d=nz(x,v.activePaths),u=y.stepResults[d?.id??"input"];await this.mastra.pubsub.publish("workflows",{type:"workflow.start",runId:X,data:{workflowId:R.step.id,parentWorkflow:{stepId:R.step.id,workflowId:Y,runId:X,stepGraph:M,executionPath:G,resumeSteps:W,stepResults:J,restart:K,input:H,parentWorkflow:V,activeStepsPath:Q,resumeData:z},executionPath:y.activePaths,runId:T,stepResults:y.stepResults,prevResult:{status:"success",output:u?.payload},restart:y,activeStepsPath:y.activeStepsPath,requestContext:A,perStep:N,initialState:y.state,state:y.state,outputOptions:L}})}else await this.mastra.pubsub.publish("workflows",{type:"workflow.start",runId:X,data:{workflowId:R.step.id,parentWorkflow:{stepId:R.step.id,workflowId:Y,stepGraph:M,runId:X,executionPath:G,resumeSteps:W,stepResults:J,input:H,parentWorkflow:V,activeStepsPath:Q,resumeData:z},executionPath:[0],runId:QD(),resumeSteps:W,prevResult:H,resumeData:z,activeStepsPath:Q,requestContext:A,perStep:N,initialState:E,state:E,outputOptions:L}});return}if(R.type==="step")await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-step-start",payload:{id:R.step.id,startedAt:Date.now(),payload:H.status==="success"?H.output:void 0,status:"running"}}});new GC8().on("watch",async(T)=>{await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:T})});let I=new p1;for(let[T,v]of Object.entries(A))I.set(T,v);let{resumeData:P,validationError:_}=await Z80({resumeData:Z?.stepResults[R.step.id]?.status==="suspended"?Z?.resumeData:void 0,step:R.step}),C;if(P&&!_)C=P;else if(P&&_)this.mastra.getLogger()?.warn("Time travel resume data validation failed",{stepId:R.step.id,error:_.message});else if(W?.length>0&&W?.[0]===R.step.id)C=z;let k=this.getOrCreateAbortController(X),S;if(this.stepExecutionStrategy)S=await this.stepExecutionStrategy.executeStep({workflowId:Y,runId:X,stepId:R.step.id,executionPath:G,stepResults:J,state:E,requestContext:Object.fromEntries(I.entries()),input:H?.output,resumeData:C,retryCount:F,foreachIdx:R.type==="foreach"?G[1]:void 0,format:O,perStep:N,validateInputs:$.options.validateInputs,abortSignal:k.signal});else S=await this.stepExecutor.execute({workflowId:Y,step:R.step,runId:X,stepResults:J,state:E,requestContext:I,input:H?.output,resumeData:C,retryCount:F,foreachIdx:R.type==="foreach"?G[1]:void 0,validateInputs:$.options.validateInputs,abortController:k,format:O,perStep:N});if(A=Object.fromEntries(I.entries()),k?.signal?.aborted){let T=S.__state??E;return this.mastra.pubsub.publish("workflows",{type:"workflow.cancel",runId:X,data:{parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,timeTravel:Z,stepResults:{...J,[R.step.id]:S,__state:T},prevResult:{...S,status:"canceled"},activeStepsPath:Q,requestContext:A,perStep:N,state:T,outputOptions:L}})}if(S.status==="bailed"){S.status="success",await this.endWorkflow({workflow:$,resumeData:z,parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,stepResults:{...J,[R.step.id]:S},prevResult:S,activeStepsPath:Q,requestContext:A,perStep:N,state:E,outputOptions:L});return}if(S.status==="failed"){let T=R.step.retries??$.retryConfig.attempts??0;if(F>=T)await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:X,data:{parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,stepResults:J,prevResult:S,activeStepsPath:Q,requestContext:A,state:E,outputOptions:L}});else return this.mastra.pubsub.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,stepResults:J,timeTravel:Z,restart:K,prevResult:H,activeStepsPath:Q,requestContext:A,retryCount:F+1,state:E,outputOptions:L}})}if(R.type==="loop"&&S.status==="suspended"){let T=S.__state??E;await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:X,data:{parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,timeTravel:Z,restart:K,stepResults:{...J,[R.step.id]:S,__state:T},prevResult:S,activeStepsPath:Q,requestContext:A,perStep:N,state:T,outputOptions:L}});return}if(R.type==="loop")await V04({workflowId:Y,prevResult:S,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,resumeData:z,parentWorkflow:V,requestContext:A,retryCount:F+1},{pubsub:this.mastra.pubsub,stepExecutor:this.stepExecutor,step:R,stepResult:S});else{let T=S.__state??E;await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:X,data:{parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,timeTravel:Z,restart:K,stepResults:{...J,[R.step.id]:S,__state:T},prevResult:S,activeStepsPath:Q,requestContext:A,perStep:N,state:T,outputOptions:L,forEachIndex:B}})}}async aggregateBranchResults({workflow:$,workflowId:Y,runId:X,branchEntry:G,branchExecutionPath:J,latestBranchResult:Q,resumeSteps:W,timeTravel:Z,restart:K,parentWorkflow:H,stepResults:z,activeStepsPath:V,requestContext:A,state:F,outputOptions:N}){let D=iz({stepResults:z,state:F}),L=J[0],B=J.length>1?J[1]:void 0,O=0,E=0,M={},R={},q={};if(G.steps.forEach((I,P)=>{if(!Nv0(I))return;let _=z?.[I.step.id];if(!_||!_.status)return;if(_.status==="success"){let C=P===B&&Q?.status==="success"?Q.output:_.output;M[I.step.id]=C}else if(_.status==="skipped")E++;else if(_.status==="suspended")O++,R[I.step.id]=[L,P],Object.assign(q,_.suspendPayload?.__workflow_meta?.resumeLabels??{})}),Object.keys(M).length+E+O<G.steps.length)return;if(O>0){let I=await this.mastra.getStorage()?.getStore("workflows");if($?.options?.shouldPersistSnapshot?.({stepResults:z??{},workflowStatus:"suspended"})??!0)await I?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:"__state",result:D,requestContext:A}),await I?.updateWorkflowState({workflowName:Y,runId:X,opts:{status:"suspended",result:{status:"suspended"},suspendedPaths:R,resumeLabels:q}});await this.mastra.pubsub.publish("workflows",{type:"workflow.suspend",runId:X,data:{workflowId:Y,runId:X,executionPath:J,resumeSteps:W,parentWorkflow:H,stepResults:z,prevResult:{status:"suspended"},activeStepsPath:V,requestContext:A,timeTravel:Z,restart:K,state:D,outputOptions:N}});return}await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:X,data:{parentWorkflow:H,workflowId:Y,runId:X,executionPath:J.slice(0,-1),resumeSteps:W,stepResults:z,prevResult:{status:"success",output:M},activeStepsPath:V,requestContext:A,timeTravel:Z,restart:K,state:D,outputOptions:N}})}async processWorkflowStepEnd({workflow:$,workflowId:Y,runId:X,executionPath:G,resumeSteps:J,timeTravel:Q,restart:W,prevResult:Z,parentWorkflow:K,stepResults:H,activeStepsPath:z,parentContext:V,requestContext:A,perStep:F,state:N,outputOptions:D,forEachIndex:L,nestedRunId:B}){let O=V?N??Z?.__state??H?.__state??{}:Z?.__state??H?.__state??N??{},{__state:E,...M}=Z;Z=M;let R=$.stepGraph[G[0]];if((R?.type==="parallel"||R?.type==="conditional")&&G.length>1)R=R.steps[G[1]];if(!R)return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,resumeSteps:J,prevResult:Z,stepResults:H,activeStepsPath:z,requestContext:A},new G0({id:"MASTRA_WORKFLOW",text:`Step not found: ${JSON.stringify(G)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));let q=await this.mastra.getStorage()?.getStore("workflows");if(R.type==="foreach"){let w=await q?.loadWorkflowSnapshot({workflowName:Y,runId:X}),I=G[1],P=w?.context?.[R.step.id],_=P?.output,C=P?.payload,k=Z;if(I!==void 0){if(Z.status==="bailed"){let v={status:"success",output:Z.output,startedAt:P?.startedAt??Date.now(),endedAt:Date.now(),payload:C};return await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:R.step.id,result:v,requestContext:A}),this.endWorkflow({workflow:$,parentWorkflow:K,workflowId:Y,runId:X,executionPath:[G[0]],resumeSteps:J,stepResults:{...H,[R.step.id]:v},prevResult:v,activeStepsPath:z,requestContext:A,perStep:F,state:O,outputOptions:D})}let T=Z.status==="suspended"?Z:Z.output;if(_)_[I]=T,k={...P,...Z,output:_,payload:C,suspendPayload:P?.suspendPayload??Z.suspendPayload,suspendedAt:P?.suspendedAt??Z.suspendedAt,resumePayload:Z.resumePayload??P?.resumePayload,resumedAt:Z.resumedAt??P?.resumedAt};else k={...Z,output:[T],payload:C}}let S=await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:R.step.id,result:k,requestContext:A});if(!S)return;if(O)await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:"__state",result:O,requestContext:A});if(H={...S,__state:O},I!==void 0){let T=H[R.step.id],v=T?.output??[],x=T?.payload?.length??0,y=v.filter((p)=>p===null).length,d=v.filter((p)=>p&&typeof p==="object"&&p.status==="suspended").length,u=v.length,b=v.filter((p)=>p!==null&&!(typeof p==="object"&&p.status==="suspended")).length,g=Z.status==="suspended"?"suspended":Z.status==="success"?"success":"failed";if(await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-step-progress",payload:{id:R.step.id,completedCount:b,totalCount:x,currentIndex:I,iterationStatus:g,...Z.status==="success"?{iterationOutput:Z.output}:{}}}}),y>0)return;if(u<x){await Dv0({workflowId:Y,prevResult:{status:"success",output:T.payload},runId:X,executionPath:[G[0]],stepResults:H,activeStepsPath:z,resumeSteps:J,timeTravel:Q,restart:W,resumeData:void 0,parentWorkflow:K,requestContext:A,perStep:F,state:O,outputOptions:D},{pubsub:this.mastra.pubsub,mastra:this.mastra,step:R});return}if(d>0){let p={},h={[R.step.id]:[G[0]]};for(let s=0;s<v.length;s++){let Z0=v[s];if(Z0&&typeof Z0==="object"&&Z0.status==="suspended"){if(Z0.suspendPayload?.__workflow_meta?.resumeLabels)Object.assign(p,Z0.suspendPayload.__workflow_meta.resumeLabels)}}let n={status:"suspended",output:v,payload:T.payload,suspendedAt:Date.now(),startedAt:T.startedAt,suspendPayload:{__workflow_meta:{path:G,resumeLabels:p}}};if(await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:R.step.id,result:n,requestContext:A}),$?.options?.shouldPersistSnapshot?.({stepResults:H??{},workflowStatus:"suspended"})??!0)await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:"__state",result:O,requestContext:A}),await q?.updateWorkflowState({workflowName:Y,runId:X,opts:{status:"suspended",result:n,suspendedPaths:h,resumeLabels:p,activePaths:G,activeStepsPath:z}});await this.mastra.pubsub.publish("workflows",{type:"workflow.suspend",runId:X,data:{workflowId:Y,runId:X,executionPath:[G[0]],resumeSteps:J,parentWorkflow:K,stepResults:{...H,[R.step.id]:n},prevResult:n,activeStepsPath:z,requestContext:A,timeTravel:Q,restart:W,state:O,outputOptions:D}});return}await Dv0({workflowId:Y,prevResult:{status:"success",output:T.payload},runId:X,executionPath:[G[0]],stepResults:H,activeStepsPath:z,resumeSteps:J,timeTravel:Q,restart:W,resumeData:void 0,parentWorkflow:K,requestContext:A,perStep:F,state:O,outputOptions:D},{pubsub:this.mastra.pubsub,mastra:this.mastra,step:R});return}}else if(Nv0(R)){if(delete z[R.step.id],V)Z=H[R.step.id]={...Z,payload:V.input?.output??{},...B&&{metadata:{...Z.metadata,nestedRunId:B}}};let w=await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:R.step.id,result:Z,requestContext:A});if(!w)return;H=w}if(H={...H,__state:O},!Z?.status||Z.status==="failed"){await this.mastra.pubsub.publish("workflows",{type:"workflow.fail",runId:X,data:{workflowId:Y,runId:X,executionPath:G,resumeSteps:J,parentWorkflow:K,stepResults:H,timeTravel:Q,restart:W,prevResult:Z,activeStepsPath:z,requestContext:A,state:O,outputOptions:D}});return}else if(Z.status==="suspended"){await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-step-suspended",payload:{id:R?.step?.id,...Z,suspendedAt:Date.now(),suspendPayload:Z.suspendPayload}}});let w=$.stepGraph[G[0]];if((w?.type==="parallel"||w?.type==="conditional")&&G.length>1){await this.aggregateBranchResults({workflow:$,workflowId:Y,runId:X,branchEntry:w,branchExecutionPath:G,latestBranchResult:Z,resumeSteps:J,timeTravel:Q,restart:W,parentWorkflow:K,stepResults:H,activeStepsPath:z,requestContext:A,state:O,outputOptions:D});return}let I={},P=nz($,G);if(P)I[P.id]=G;let _=Z.suspendPayload?.__workflow_meta?.resumeLabels??{};if($?.options?.shouldPersistSnapshot?.({stepResults:H??{},workflowStatus:"suspended"})??!0)await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:"__state",result:O,requestContext:A}),await q?.updateWorkflowState({workflowName:Y,runId:X,opts:{status:"suspended",result:Z,suspendedPaths:I,resumeLabels:_,activePaths:G,activeStepsPath:z}});await this.mastra.pubsub.publish("workflows",{type:"workflow.suspend",runId:X,data:{workflowId:Y,runId:X,executionPath:G,resumeSteps:J,parentWorkflow:K,stepResults:H,prevResult:Z,activeStepsPath:z,requestContext:A,timeTravel:Q,restart:W,state:O,outputOptions:D}});return}if(R?.type==="step"){if(await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-step-result",payload:{id:R.step.id,...Z}}}),Z.status==="success")await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-step-finish",payload:{id:R.step.id,metadata:{}}}})}if(R=$.stepGraph[G[0]],F)if(K&&G[0]<$.stepGraph.length-1){let{endedAt:w,output:I,status:P,..._}=Z;await this.endWorkflow({workflow:$,parentWorkflow:K,workflowId:Y,runId:X,executionPath:G,resumeSteps:J,stepResults:H,prevResult:{..._,status:"paused"},activeStepsPath:z,requestContext:A,perStep:F})}else await this.endWorkflow({workflow:$,parentWorkflow:K,workflowId:Y,runId:X,executionPath:G,resumeSteps:J,stepResults:H,prevResult:Z,activeStepsPath:z,requestContext:A,perStep:F});else if((R?.type==="parallel"||R?.type==="conditional")&&G.length>1)await this.aggregateBranchResults({workflow:$,workflowId:Y,runId:X,branchEntry:R,branchExecutionPath:G,latestBranchResult:Z,resumeSteps:J,timeTravel:Q,restart:W,parentWorkflow:K,stepResults:H,activeStepsPath:z,requestContext:A,state:O,outputOptions:D});else if(R?.type==="foreach"){let I=H[R.step.id]?.payload;await this.mastra.pubsub.publish("workflows",{type:"workflow.step.run",runId:X,data:{workflowId:Y,runId:X,executionPath:G.slice(0,-1),resumeSteps:J,parentWorkflow:K,stepResults:H,prevResult:{...Z,output:I},activeStepsPath:z,requestContext:A,timeTravel:Q,restart:W,state:O,outputOptions:D,forEachIndex:L}})}else if(G[0]>=$.stepGraph.length-1)await this.endWorkflow({workflow:$,parentWorkflow:K,workflowId:Y,runId:X,executionPath:G,resumeSteps:J,stepResults:H,prevResult:Z,activeStepsPath:z,requestContext:A,state:O,outputOptions:D});else await this.mastra.pubsub.publish("workflows",{type:"workflow.step.run",runId:X,data:{workflowId:Y,runId:X,executionPath:G.slice(0,-1).concat([G[G.length-1]+1]),resumeSteps:J,parentWorkflow:K,stepResults:H,prevResult:Z,activeStepsPath:z,requestContext:A,timeTravel:Q,restart:W,state:O,outputOptions:D}})}async loadData({workflowId:$,runId:Y}){return await(await this.mastra.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({workflowName:$,runId:Y})}async handle($){try{return await this.#Y($),{ok:!0}}catch(Y){return this.mastra.getLogger()?.error("WorkflowEventProcessor.handle: error processing event",{type:$.type,runId:$.runId,error:Y}),{ok:!1,retry:!0}}}async process($,Y){if((await this.handle($)).ok)try{await Y?.()}catch(G){this.mastra.getLogger()?.error("Error acking event",G)}}async#Y($){let{type:Y,data:X}=$,G=X,J=await this.loadData({workflowId:G.workflowId,runId:G.runId});if(J?.status==="canceled"&&Y!=="workflow.end"&&Y!=="workflow.cancel")return;if(Y.startsWith("workflow.user-event.")){let Z=this.#$(G.workflowId);if(!Z)return this.errorWorkflow(G,new G0({id:"MASTRA_WORKFLOW",text:`Workflow not found: ${G.workflowId}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));await VC8({...G,workflow:Z},{pubsub:this.mastra.pubsub,eventName:Y.split(".").slice(2).join("."),currentState:J});return}let Q;if(this.mastra.__hasInternalWorkflow(G.workflowId))Q=this.mastra.__getInternalWorkflow(G.workflowId);else if(G.parentWorkflow)Q=D04(this.mastra,G.parentWorkflow);else Q=this.#$(G.workflowId);if(!Q)if(Y==="workflow.fail"||Y==="workflow.end"||Y==="workflow.cancel");else return this.errorWorkflow(G,new G0({id:"MASTRA_WORKFLOW",text:`Workflow not found: ${G.workflowId}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));if(Y==="workflow.start"||Y==="workflow.resume"){let{runId:Z}=G;await this.mastra.pubsub.publish(`workflow.events.v2.${Z}`,{type:"watch",runId:Z,data:{type:"workflow-start",payload:{runId:Z}}})}let W=Q;switch(Y){case"workflow.cancel":await this.processWorkflowCancel({workflow:W,...G});break;case"workflow.start":await this.processWorkflowStart({workflow:W,...G});break;case"workflow.resume":await this.processWorkflowStart({workflow:W,...G});break;case"workflow.end":await this.processWorkflowEnd({workflow:W,...G});break;case"workflow.step.end":await this.processWorkflowStepEnd({workflow:W,...G});break;case"workflow.step.run":await this.processWorkflowStepRun({workflow:W,...G});break;case"workflow.suspend":await this.processWorkflowSuspend({workflow:W,...G});break;case"workflow.fail":await this.processWorkflowFail({workflow:W,...G});break}}};Mv0($80);Y80=class extends V80{#$;constructor($){super($);if(this.engineType="evented",!$.schedule)this.#$=[];else if(Array.isArray($.schedule))this.#$=$.schedule.map((Y)=>({...Y}));else this.#$=[{...$.schedule}]}getScheduleConfigs(){return this.#$.map(($)=>({...$}))}__registerMastra($){super.__registerMastra($),this.executionEngine.__registerMastra($)}async createRun($){if(this.stepFlow.length===0)throw Error("Execution flow of workflow is not defined. Add steps to the workflow via .then(), .branch(), etc.");if(!this.executionGraph.steps)throw Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");let Y=$?.runId||QD(),X=await this.mastra?.getStorage()?.getStore("workflows"),G=X?.supportsConcurrentUpdates?.()??!1;if(X&&!G)throw new G0({id:"ATOMIC_STORAGE_OPERATIONS_NOT_SUPPORTED",domain:"MASTRA",category:"USER",text:`Workflow "${this.id}" runs on the evented execution engine, which requires a storage adapter that supports concurrent updates. Your current workflow storage adapter does not. Switch to an adapter that does (for example @mastra/libsql), or, if you do not need scheduled execution, remove the \`schedule\` field from this workflow's definition to use the default execution engine.`,details:{workflowId:this.id}});let J=this.runs.get(Y)??new IC8({workflowId:this.id,runId:Y,resourceId:$?.resourceId,executionEngine:this.executionEngine,executionGraph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,mastra:this.mastra,retryConfig:this.retryConfig,cleanup:()=>this.runs.delete(Y),workflowSteps:this.steps,validateInputs:this.options?.validateInputs,inputSchema:this.inputSchema,stateSchema:this.stateSchema,workflowEngineType:this.engineType});this.runs.set(Y,J);let Q=this.options?.shouldPersistSnapshot?.({workflowStatus:J.workflowRunStatus,stepResults:{}}),W=await this.getWorkflowRunById(Y,{withNestedWorkflows:!1}),Z=W&&!W.isFromInMemory;if(Z&&W.status)J.workflowRunStatus=W.status;if(!Z&&Q)await X?.persistWorkflowSnapshot({workflowName:this.id,runId:Y,resourceId:$?.resourceId,snapshot:{runId:Y,status:"pending",value:{},context:{},activePaths:[],serializedStepGraph:this.serializedStepGraph,activeStepsPath:{},suspendedPaths:{},resumeLabels:{},waitingPaths:{},result:void 0,error:void 0,timestamp:Date.now()}});return J}},IC8=class extends A80{constructor($){super($);this.serializedStepGraph=$.serializedStepGraph}setupAbortHandler(){let $=()=>{this.mastra?.pubsub.publish("workflows",{type:"workflow.cancel",runId:this.runId,data:{workflowId:this.workflowId,runId:this.runId}}).catch((Y)=>{this.mastra?.getLogger()?.error(`Failed to publish workflow.cancel for runId ${this.runId}:`,Y)})};this.abortController.signal.addEventListener("abort",$,{once:!0})}async start({inputData:$,initialState:Y,requestContext:X,perStep:G,outputOptions:J}){if(this.serializedStepGraph.length===0)throw Error("Execution flow of workflow is not defined. Add steps to the workflow via .then(), .branch(), etc.");if(!this.executionGraph.steps)throw Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");X=X??new p1,await(await this.mastra?.getStorage()?.getStore("workflows"))?.persistWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId,resourceId:this.resourceId,snapshot:{runId:this.runId,serializedStepGraph:this.serializedStepGraph,status:"running",value:{},context:{},requestContext:X.toJSON(),activePaths:[],activeStepsPath:{},suspendedPaths:{},resumeLabels:{},waitingPaths:{},timestamp:Date.now()}});let W=await this._validateInput($??{}),Z=await this._validateInitialState(Y??{});if(!this.mastra?.pubsub)throw Error("Mastra instance with pubsub is required for workflow execution");this.setupAbortHandler();let K=await this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,resourceId:this.resourceId,graph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,input:W,initialState:Z,pubsub:this.mastra.pubsub,retryConfig:this.retryConfig,requestContext:X,abortController:this.abortController,perStep:G,outputOptions:J});if(K.status!=="suspended")this.cleanup?.();return K}async startAsync({inputData:$,initialState:Y,requestContext:X,perStep:G}){if(this.serializedStepGraph.length===0)throw Error("Execution flow of workflow is not defined. Add steps to the workflow via .then(), .branch(), etc.");if(!this.executionGraph.steps)throw Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");X=X??new p1,await(await this.mastra?.getStorage()?.getStore("workflows"))?.persistWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId,resourceId:this.resourceId,snapshot:{runId:this.runId,serializedStepGraph:this.serializedStepGraph,status:"running",value:{},context:{},requestContext:X.toJSON(),activePaths:[],activeStepsPath:{},suspendedPaths:{},resumeLabels:{},waitingPaths:{},timestamp:Date.now()}});let Q=await this._validateInput($??{}),W=await this._validateInitialState(Y??{});if(!this.mastra?.pubsub)throw Error("Mastra instance with pubsub is required for workflow execution");return await this.mastra.pubsub.publish("workflows",{type:"workflow.start",runId:this.runId,data:{workflowId:this.workflowId,runId:this.runId,prevResult:{status:"success",output:Q},requestContext:X.toJSON(),initialState:W,perStep:G}}),{runId:this.runId}}stream({inputData:$,requestContext:Y,initialState:X,closeOnSuspend:G=!0,perStep:J,outputOptions:Q}){if(this.closeStreamAction&&this.streamOutput)return this.streamOutput;this.closeStreamAction=async()=>{};let W=this,Z=new z04({async start(K){let H=W.watch((z)=>{let{type:V,payload:A}=z;K.enqueue({type:V,runId:W.runId,from:"WORKFLOW",payload:{stepName:A?.id,...A}})});W.closeStreamAction=async()=>{H();try{if(K.desiredSize!==null)K.close()}catch(z){W.mastra?.getLogger()?.error("Error closing stream:",z)}};try{let z=await W.start({inputData:$,requestContext:Y,initialState:X,perStep:J,outputOptions:Q});if(W.streamOutput)W.streamOutput.updateResults(z);if(G)W.closeStreamAction?.().catch(()=>{});else if(z.status!=="suspended")W.closeStreamAction?.().catch(()=>{})}catch(z){W.streamOutput?.rejectResults(z),W.closeStreamAction?.().catch(()=>{})}}});return this.streamOutput=new H_({runId:this.runId,workflowId:this.workflowId,stream:Z}),this.streamOutput}resumeStream({step:$,resumeData:Y,requestContext:X,perStep:G,outputOptions:J}={}){this.closeStreamAction=async()=>{};let Q=this,W=new z04({async start(Z){let K=Q.watch((H)=>{let{type:z,payload:V}=H;Z.enqueue({type:z,runId:Q.runId,from:"WORKFLOW",payload:{stepName:V?.id,...V}})});Q.closeStreamAction=async()=>{K();try{if(Z.desiredSize!==null)Z.close()}catch(H){Q.mastra?.getLogger()?.error("Error closing stream:",H)}};try{let H=await Q.resume({resumeData:Y,step:$,requestContext:X,perStep:G,outputOptions:J});if(Q.streamOutput)Q.streamOutput.updateResults(H);await new Promise((z)=>setTimeout(z,0)),Q.closeStreamAction?.().catch(()=>{})}catch(H){Q.streamOutput?.rejectResults(H),Q.closeStreamAction?.().catch(()=>{})}}});return this.streamOutput=new H_({runId:this.runId,workflowId:this.workflowId,stream:W}),this.streamOutput}async resume($){let Y=await this.mastra?.getStorage()?.getStore("workflows");if(!Y)throw Error("Cannot resume workflow: workflows store is required");let X=await Y.loadWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId});if(!X)throw Error(`Cannot resume workflow: no snapshot found for runId ${this.runId}`);if(X.status!=="suspended")throw Error("This workflow run was not suspended");let G=$.label?X?.resumeLabels?.[$.label]:void 0;if($.label&&!G){let D=Object.keys(X?.resumeLabels??{});throw Error(`Resume label "${$.label}" not found. Available labels: [${D.join(", ")}]`)}let J=G?.stepId??$.step,Q;if(J)if(typeof J==="string")Q=J.split(".");else Q=(Array.isArray(J)?J:[J]).map((D)=>typeof D==="string"?D:D?.id);else{let D=[];if(Object.entries(X?.suspendedPaths??{}).forEach(([L,B])=>{let O=X?.context?.[L];if(O&&typeof O==="object"&&"status"in O){let E=O;if(E.status==="suspended"){let M=E.suspendPayload?.__workflow_meta?.path;if(M&&Array.isArray(M))D.push([L,...M]);else D.push([L])}}}),D.length===0)throw Error("No suspended steps found in this workflow run");if(D.length===1)Q=D[0];else{let L=D.map((B)=>`[${B.join(", ")}]`);throw Error(`Multiple suspended steps found: ${L.join(", ")}. Please specify which step to resume using the "step" parameter.`)}}let W=Object.keys(X?.suspendedPaths??{});if(!W.includes(Q?.[0]??""))throw Error(`This workflow step "${Q?.[0]}" was not suspended. Available suspended steps: [${W.join(", ")}]`);let K=X.suspendedPaths?.[Q[0]],H=X.requestContext??{},z=new p1;for(let[D,L]of Object.entries(H))z.set(D,L);if($.requestContext)for(let[D,L]of $.requestContext.entries())z.set(D,L);let V=this.workflowSteps[Q?.[0]??""],A=await this._validateResumeData($.resumeData,V);if(!this.mastra?.pubsub)throw Error("Mastra instance with pubsub is required for workflow execution");this.setupAbortHandler();let F=X?.context?.__state??X?.value??{},N=this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,graph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,input:X?.context?.input,initialState:F,resume:{steps:Q,stepResults:X?.context,resumePayload:A,resumePath:K,forEachIndex:$.forEachIndex??G?.foreachIndex},pubsub:this.mastra.pubsub,requestContext:z,abortController:this.abortController,perStep:$.perStep,outputOptions:$.outputOptions}).then((D)=>{if(D.status!=="suspended")this.closeStreamAction?.().catch(()=>{});return D});return this.executionResults=N,N}watch($){let Y=async(X,G)=>{if(X.runId!==this.runId)return;$(X.data),await G?.()};return this.mastra?.pubsub.subscribe(`workflow.events.v2.${this.runId}`,Y).catch(()=>{}),()=>{this.mastra?.pubsub.unsubscribe(`workflow.events.v2.${this.runId}`,Y).catch(()=>{})}}async watchAsync($){let Y=async(X,G)=>{if(X.runId!==this.runId)return;$(X.data),await G?.()};return await this.mastra?.pubsub.subscribe(`workflow.events.v2.${this.runId}`,Y).catch(()=>{}),async()=>{await this.mastra?.pubsub.unsubscribe(`workflow.events.v2.${this.runId}`,Y).catch(()=>{})}}async cancel(){await(await this.mastra?.getStorage()?.getStore("workflows"))?.updateWorkflowState({workflowName:this.workflowId,runId:this.runId,opts:{status:"canceled"}}),this.abortController.abort()}};PC8=class extends Q80{eventProcessor;constructor({mastra:$,eventProcessor:Y,options:X}){super({mastra:$,options:X});this.eventProcessor=Y}__registerMastra($){super.__registerMastra($),this.eventProcessor.__registerMastra($)}resolveWorkflow($){if(this.mastra?.__hasInternalWorkflow($))return this.mastra.__getInternalWorkflow($);return this.mastra.getWorkflow($)}async execute($){let Y=this.mastra?.pubsub;if(!Y)throw Error("No Pubsub adapter configured on the Mastra instance");let X,G,J=new Promise((F,N)=>{X=F,G=N}),Q=async(F,N)=>{if(F.runId!==$.runId){await N?.();return}if(["workflow.end","workflow.fail","workflow.suspend"].includes(F.type)){if(await N?.(),await Y.unsubscribe("workflows-finish",Q),F.type==="workflow.fail"&&F.data.stepResults)F.data.stepResults=Ov0(F.data.stepResults);X(F.data);return}await N?.()};try{await Y.subscribe("workflows-finish",Q)}catch(F){throw this.mastra?.getLogger()?.error("Failed to subscribe to workflows-finish:",F),F}try{if($.resume){let F=nz(this.resolveWorkflow($.workflowId),$.resume.resumePath),N=$.resume.stepResults[F?.id??"input"],D=$.resume.stepResults?.__state??$.initialState??{};await Y.publish("workflows",{type:"workflow.resume",runId:$.runId,data:{workflowId:$.workflowId,runId:$.runId,executionPath:$.resume.resumePath,stepResults:$.resume.stepResults,resumeSteps:$.resume.steps,prevResult:{status:"success",output:N?.payload},resumeData:$.resume.resumePayload,requestContext:$.requestContext.toJSON(),format:$.format,perStep:$.perStep,initialState:D,state:D,outputOptions:$.outputOptions,forEachIndex:$.resume.forEachIndex}})}else if($.timeTravel){let F=nz(this.resolveWorkflow($.workflowId),$.timeTravel.executionPath),N=$.timeTravel.stepResults[F?.id??"input"];await Y.publish("workflows",{type:"workflow.start",runId:$.runId,data:{workflowId:$.workflowId,runId:$.runId,executionPath:$.timeTravel.executionPath,stepResults:$.timeTravel.stepResults,timeTravel:$.timeTravel,prevResult:{status:"success",output:N?.payload},requestContext:$.requestContext.toJSON(),format:$.format,perStep:$.perStep,state:$.timeTravel.state}})}else if($.restart){let F=nz(this.resolveWorkflow($.workflowId),$.restart.activePaths),N=$.restart.stepResults[F?.id??"input"];await Y.publish("workflows",{type:"workflow.start",runId:$.runId,data:{workflowId:$.workflowId,runId:$.runId,executionPath:$.restart.activePaths,stepResults:$.restart.stepResults,restart:$.restart,prevResult:{status:"success",output:N?.payload},requestContext:$.requestContext.toJSON(),format:$.format,perStep:$.perStep,state:$.restart.state}})}else await Y.publish("workflows",{type:"workflow.start",runId:$.runId,data:{workflowId:$.workflowId,runId:$.runId,prevResult:{status:"success",output:$.input},requestContext:$.requestContext.toJSON(),format:$.format,perStep:$.perStep,initialState:$.initialState,outputOptions:$.outputOptions}})}catch(F){throw await Y.unsubscribe("workflows-finish",Q),G(F),F}let W=await J,Z=W.state??W.stepResults?.__state??$.initialState??{},{__state:K,...H}=W.stepResults??{},z={};for(let[F,N]of Object.entries(H)){if(N?.status==="skipped")continue;z[F]=z80(N)}let V;if(W.prevResult.status==="failed"){let F;for(let N of Object.values(z))if(N?.status==="failed"&&N?.tripwire){F=N.tripwire;break}if(F&&typeof F==="object"&&"reason"in F)V={status:"tripwire",steps:z,state:Z,tripwire:F};else V={status:"failed",error:W.prevResult.error,steps:z,state:Z}}else if(W.prevResult.status==="suspended")V={status:"suspended",steps:z,state:Z};else if(W.prevResult.status==="paused"||$.perStep)V={status:"paused",steps:z,state:Z};else V={status:W.prevResult.status,result:W.prevResult?.output,steps:z,state:Z};if(V.status!=="paused")await this.invokeLifecycleCallbacks({status:V.status,result:V.result,error:V.error,steps:V.steps,tripwire:V.tripwire,runId:$.runId,workflowId:$.workflowId,resourceId:$.resourceId,input:$.input,requestContext:$.requestContext,state:Z});let A;if(W.prevResult.status==="suspended"){let F=Object.entries(W.stepResults).map(([N,D])=>{if(D.status==="suspended"){let L=D.suspendPayload?.__workflow_meta?.path??[];return[N,...L]}return null}).filter(Boolean);A={status:V.status,steps:V.steps,suspended:F}}else if(W.prevResult.status==="failed")if(V.status==="tripwire"&&V.tripwire)A={status:"tripwire",tripwire:V.tripwire,steps:V.steps};else A={status:V.status,error:V.error,steps:V.steps};else if(W.prevResult.status==="paused"||$.perStep)A={status:"paused",steps:V.steps};else A={status:V.status,result:V.result,steps:V.steps};if($.outputOptions?.includeState)A.state=Z;return A}}});var M04={};W8(M04,{buildBackgroundTaskWorkflow:()=>jC8,BACKGROUND_TASK_WORKFLOW_ID:()=>TU});function jC8($){let Y=Lv0({id:"run-attempt",inputSchema:O04,outputSchema:B04,execute:async({inputData:J,abortSignal:Q,suspend:W,resumeData:Z})=>{let{taskId:K}=J,H=await $.getStorage(),z=await H.getTask(K);if(!z||z.status==="cancelled")return $.deregisterTaskContext(K),{taskId:K,outcome:"cancelled"};let A=$.taskContexts.get(K)?.executor??$.getStaticExecutor(z.toolName);if(!A){let q={message:`No executor registered for tool "${z.toolName}". Register the tool on Mastra (so workers can resolve it cross-process) or run the task in the same process as the producer.`};await H.updateTask(K,{status:"failed",error:q,completedAt:new Date});let w=await H.getTask(K);if(w)await $.runLocalCompletionHooks(w,"failed",{error:q}),await $.publishLifecycleEvent("task.failed",w);throw $.deregisterTaskContext(K),Error(q.message)}let F=$.config.progressThrottleMs,N=typeof F==="number"&&Number.isFinite(F)&&F>0,D,L=async(q)=>{if(N){let w=Date.now();if(D!==void 0&&w-D<F)return;D=w}await $.publishLifecycleEvent("task.output",{...z,chunk:q})},B=new AbortController;$.activeAbortControllers.set(K,B);let O=()=>B.abort(Error("Task cancelled"));if(Q.aborted)B.abort(Error("Task cancelled"));else Q.addEventListener("abort",O,{once:!0});let E=setTimeout(()=>{B.abort(Error(`Task timed out after ${z.timeoutMs}ms`))},z.timeoutMs),M,R=async(q,w)=>{await H.updateTask(K,{status:"suspended",suspendPayload:q,suspendedAt:new Date});let I=await H.getTask(K);if(I)await $.runLocalSuspendHooks(I),await $.publishLifecycleEvent("task.suspended",I);M={data:q,suspendOptions:w}};try{let q=await A.execute(z.args,{abortSignal:B.signal,onProgress:L,suspend:R,resumeData:Z});if(M)return W(M.data,M.suspendOptions);return{taskId:K,outcome:"success",result:q}}catch(q){let w=await H.getTask(K);if(!w||w.status==="cancelled")return $.deregisterTaskContext(K),{taskId:K,outcome:"cancelled"};if(B.signal.aborted||q?.name==="AbortError"||q?.message==="Task cancelled"||q?.message?.startsWith("Task timed out after "))return{taskId:K,outcome:"timed_out"};return{taskId:K,outcome:"retry",error:{message:q?.message??"Unknown error",stack:q?.stack}}}finally{clearTimeout(E),Q.removeEventListener("abort",O),$.activeAbortControllers.delete(K)}}}),X=Lv0({id:"classify-outcome",inputSchema:B04,outputSchema:Rv0,execute:async({inputData:J})=>{let{taskId:Q,outcome:W,result:Z,error:K}=J,H=await $.getStorage(),z=await H.getTask(Q);if(!z)return{taskId:Q,done:!0};if(W==="cancelled")return $.deregisterTaskContext(Q),{taskId:Q,done:!0};if(W==="timed_out"){let N=z.status;if(N!=="timed_out"&&N!=="cancelled"){await H.updateTask(Q,{status:"timed_out",error:{message:`Task timed out after ${z.timeoutMs}ms`},completedAt:new Date});let D=await H.getTask(Q);if(D)await $.publishLifecycleEvent("task.failed",D)}return{taskId:Q,done:!0}}if(W==="success"){if(z.status==="cancelled")return $.deregisterTaskContext(Q),{taskId:Q,done:!0};await H.updateTask(Q,{status:"completed",result:Z,completedAt:new Date});let N=await H.getTask(Q);if(N)await $.runLocalCompletionHooks(N,"completed",{result:Z}),await $.publishLifecycleEvent("task.completed",N);return{taskId:Q,done:!0,result:Z}}if(z.retryCount<z.maxRetries)return await H.updateTask(Q,{retryCount:z.retryCount+1,error:void 0,startedAt:new Date}),{taskId:Q,done:!1};let V=K??{message:"Unknown error"};await H.updateTask(Q,{status:"failed",error:V,completedAt:new Date});let A=await H.getTask(Q);if(A)await $.runLocalCompletionHooks(A,"failed",{error:V}),await $.publishLifecycleEvent("task.failed",A);let F=Error(V.message);if(V.stack)F.stack=V.stack;throw F}}),G=$80({id:`${TU}__attempt`,inputSchema:O04,outputSchema:Rv0,steps:[Y,X],options:{validateInputs:!1,shouldPersistSnapshot:({workflowStatus:J})=>E04.includes(J)}}).then(Y).then(X).commit();return $80({id:TU,inputSchema:wC8,outputSchema:Rv0,steps:[G],options:{shouldPersistSnapshot:({workflowStatus:J})=>E04.includes(J)}}).dountil(G,async({inputData:J})=>J?.done===!0).commit()}var wC8,_C8,B04,O04,Rv0,E04;var R04=V0(()=>{N04();Jg();Jg();KY();wC8=U.object({taskId:U.string()}),_C8=U.enum(["success","retry","cancelled","timed_out"]),B04=U.object({taskId:U.string(),outcome:_C8,result:U.unknown().optional(),error:U.any().optional()}),O04=U.object({taskId:U.string(),done:U.boolean().optional(),result:U.unknown().optional()}),Rv0=U.object({taskId:U.string(),done:U.boolean(),result:U.unknown().optional()}),E04=["suspended","pending","paused","waiting"]});import{randomUUID as TC8}from"crypto";function q04($,Y){let{context:X,...G}=Y,J;return{get task(){if(!J)throw Error("Task has not been dispatched yet");return{id:J}},async dispatch(){let Q=await $.enqueue(G,X);return J=Q.task.id,Q},async checkIfSuspended(Q){let W=await $.listTasks({toolCallId:Q.toolCallId,runId:Q.runId,agentId:Q.agentId,threadId:Q.threadId,resourceId:Q.resourceId,toolName:Q.toolName,status:"suspended"});if(W.total>0){let Z=W.tasks[0];if(Z)return J=Z.id,!0}return!1},async resume(Q){if(!J)throw Error("Task has not been dispatched yet");return $.resume(J,Q)},async cancel(){if(!J)throw Error("Task has not been dispatched yet");return $.cancel(J)},async waitForCompletion(Q){if(!J)throw Error("Task has not been dispatched yet");return $.waitForNextTask([J],Q)}}}function I04({llmBgOverrides:$,toolName:Y,toolConfig:X,agentConfig:G,managerConfig:J}){let Q=$;if(G?.disabled)return{runInBackground:!1,timeoutMs:J?.defaultTimeoutMs??300000,maxRetries:J?.defaultRetries?.maxRetries??0};let W=SC8(Y,G),Z=Q?.enabled??W?.enabled??X?.enabled??!1,K=Q?.timeoutMs??W?.timeoutMs??X?.timeoutMs??J?.defaultTimeoutMs??300000,H=Q?.maxRetries??X?.maxRetries??J?.defaultRetries?.maxRetries??0;return{runInBackground:Z,timeoutMs:K,maxRetries:H}}function SC8($,Y){if(!Y?.tools)return;if(Y.tools==="all")return{enabled:!0};if($.startsWith("agent-"))$=$.substring(6);else if($.startsWith("workflow-"))$=$.substring(9);let X=Y.tools[$];if(X===void 0)return;if(typeof X==="boolean")return{enabled:X};return X}function _04($,Y){let X=[],G=Y?.tools==="all";for(let[Q,W]of Object.entries($)){let Z=Y?.tools==="all"?!1:typeof Y?.tools?.[Q]==="boolean"?Y.tools[Q]:Y?.tools?.[Q]?.enabled??!1;X.push({toolName:Q,toolConfig:W.background,defaultBackground:G?!0:Z??W.background?.enabled??!1})}if(X.length===0)return;return`You have the ability to run certain tools in the background while continuing the conversation. The following tools support background execution:
${X.map((Q)=>`- ${Q.toolName} (default: ${Q.defaultBackground?"background":"foreground"})`).join(`
`)}

For any of these tools, you can include a "_background" field in the tool arguments to override the default:
  "_background": { "enabled": true/false, "timeoutMs": number, "maxRetries": number }

All fields in "_background" are optional. Only include what you want to override.

Guidelines:
- Use background execution when the user doesn't need the result immediately, or when you're launching multiple independent tasks.
- Use foreground execution when the user is directly waiting for the result and the conversation can't continue without it.
- If you don't include "_background", the tool's default configuration is used.
- When a tool runs in the background, you'll receive a placeholder result with a task ID. You can reference this in your response to the user.`}var TU="__background-task",Qg="background-tasks",Wg="background-tasks-result",CC8="background-task-workers",Ga5=class{pubsub;config;#$;taskContexts=new Map;staticExecutors=new Map;activeAbortControllers=new Map;workerCallback;resultCallback;shuttingDown=!1;cleanupInterval;initPromise;constructor($={enabled:!1}){this.config={globalConcurrency:$.globalConcurrency??10,perAgentConcurrency:$.perAgentConcurrency??5,backpressure:$.backpressure??"queue",defaultTimeoutMs:$.defaultTimeoutMs??300000,...$}}__registerMastra($){this.#$=$}async getStorage(){let $=this.#$?.getStorage();if(!$)throw Error("Storage is not initialized");let Y=await $.getStore("backgroundTasks");if(!Y)throw Error("Background tasks storage is not available");return Y}async init($){if(this.initPromise)return this.initPromise;return this.initPromise=this.#Y($),this.initPromise}async#Y($){if(this.pubsub=$,this.workerCallback=async(X,G)=>{if(X.type==="task.dispatch")await this.handleDispatch(X);else if(X.type==="task.resume")await this.handleResume(X);else if(X.type==="task.cancel")this.handleCancel(X);await G?.()},this.resultCallback=async(X,G)=>{if(X.type==="task.completed"||X.type==="task.failed")await this.handleResult(X);await G?.()},this.#$){let{buildBackgroundTaskWorkflow:X}=await Promise.resolve().then(() => (R04(),M04)),G=X(this);if(!this.#$.__hasInternalWorkflow(TU))this.#$.__registerInternalWorkflow(G)}await this.pubsub.subscribe(Qg,this.workerCallback,{group:CC8}),await this.pubsub.subscribe(Wg,this.resultCallback),await this.recoverStaleTasks();let Y=this.config.cleanup;if(Y){let X=Y.cleanupIntervalMs??60000;this.cleanupInterval=setInterval(()=>{this.cleanup()},X)}}registerTaskContext($,Y){this.taskContexts.set($,Y)}deregisterTaskContext($){this.taskContexts.delete($)}registerStaticExecutor($,Y){if(this.staticExecutors.has($))this.#$?.getLogger?.()?.debug?.(`Overwriting existing static executor for tool "${$}"`);this.staticExecutors.set($,Y)}unregisterStaticExecutor($){this.staticExecutors.delete($)}getStaticExecutor($){return this.staticExecutors.get($)}async enqueue($,Y){if(this.shuttingDown)throw Error("BackgroundTaskManager is shutting down, cannot enqueue new tasks");if(this.initPromise)await this.initPromise;let X={id:this.#$?.generateId()??TC8(),status:"pending",toolName:$.toolName,toolCallId:$.toolCallId,args:$.args,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,runId:$.runId,retryCount:0,maxRetries:$.maxRetries??this.config.defaultRetries?.maxRetries??0,timeoutMs:$.timeoutMs??this.config.defaultTimeoutMs,createdAt:new Date};if(Y)this.registerTaskContext(X.id,Y);let G=await this.getStorage();if(await G.createTask(X),await this.checkConcurrency(X.agentId))return await this.dispatch(X),{task:X};switch(this.config.backpressure){case"reject":throw this.deregisterTaskContext(X.id),await G.deleteTask(X.id),Error(`Concurrency limit reached, cannot enqueue task for tool "${X.toolName}"`);case"fallback-sync":return this.deregisterTaskContext(X.id),await G.deleteTask(X.id),{task:X,fallbackToSync:!0};case"queue":default:return{task:X}}}async cancel($){if(this.initPromise)await this.initPromise;let Y=await this.getStorage(),X=await Y.getTask($);if(!X)throw Error(`Task not found: ${$}`);if(X.status==="completed"||X.status==="failed"||X.status==="cancelled"||X.status==="timed_out")return;if(X.status==="pending"){await Y.updateTask($,{status:"cancelled",completedAt:new Date});let G=await Y.getTask($);if(G)await this.publishLifecycleEvent("task.cancelled",G);this.deregisterTaskContext($);return}if(X.status==="suspended"){if(await Y.updateTask($,{status:"cancelled",completedAt:new Date}),this.#$)try{await(await this.#$.__getInternalWorkflow(TU).createRun({runId:$})).cancel()}catch(J){this.#$?.getLogger?.()?.warn(`background-task workflow cancel failed for ${$}:`,J)}let G=await Y.getTask($);if(G)await this.publishLifecycleEvent("task.cancelled",G);this.deregisterTaskContext($);return}if(X.status==="running"){await Y.updateTask($,{status:"cancelled",completedAt:new Date});let G=this.activeAbortControllers.get($);if(G)G.abort(Error("Task cancelled")),this.activeAbortControllers.delete($);if(this.#$)try{await(await this.#$.__getInternalWorkflow(TU).createRun({runId:$})).cancel()}catch(Q){this.#$?.getLogger?.()?.warn(`background-task workflow cancel failed for ${$}:`,Q)}let J=await Y.getTask($);if(J)await this.publishLifecycleEvent("task.cancelled",J);this.deregisterTaskContext($),await this.pubsub.publish(Qg,{type:"task.cancel",data:{taskId:$},runId:$})}}async resume($,Y){if(!this.#$)throw Error("Mastra is not registered with this manager");if(this.initPromise)await this.initPromise;let G=await(await this.getStorage()).getTask($);if(!G)throw Error(`Task not found: ${$}`);if(G.status!=="suspended")throw Error(`Cannot resume task in status '${G.status}' (expected 'suspended')`);if(!await this.checkConcurrency(G.agentId))throw Error(`Concurrency limit reached, cannot resume task "${$}" \u2014 retry once a slot is available`);return await this.pubsub.publish(Qg,{type:"task.resume",data:{taskId:$,resumeData:Y},runId:$}),G}async getTask($){return(await this.getStorage()).getTask($)}async listTasks($={}){return(await this.getStorage()).listTasks($)}async cleanup(){let $=this.config.cleanup?.completedTtlMs??3600000,Y=this.config.cleanup?.failedTtlMs??86400000,X=Date.now(),G=await this.getStorage();await G.deleteTasks({status:["completed"],toDate:new Date(X-$),dateFilterBy:"completedAt"}),await G.deleteTasks({status:["failed","cancelled","timed_out"],toDate:new Date(X-Y),dateFilterBy:"completedAt"})}async waitForNextTask($,Y){let X=await this.getStorage(),G=(J)=>J==="completed"||J==="failed"||J==="cancelled"||J==="timed_out";for(let J of $){let Q=await X.getTask(J);if(Q&&G(Q.status))return Q}return new Promise((J,Q)=>{let W=Date.now(),Z=Y?.timeoutMs?setTimeout(()=>{if(clearInterval(H),K)clearInterval(K);Q(Error("Timed out waiting for background task"))},Y.timeoutMs):void 0,K=Y?.onProgress?setInterval(()=>{Y.onProgress(Date.now()-W)},Y.progressIntervalMs??3000):void 0,H=setInterval(async()=>{for(let z of $){let V=await X.getTask(z);if(V&&G(V.status)){if(clearInterval(H),Z)clearTimeout(Z);if(K)clearInterval(K);J(V);return}}},50)})}stream($){let Y=this,X=this.pubsub,{agentId:G,runId:J,threadId:Q,resourceId:W,abortSignal:Z,taskId:K}=$??{},H={"task.running":"running","task.output":"running","task.completed":"completed","task.failed":"failed","task.cancelled":"cancelled","task.suspended":"suspended","task.resumed":"running"},z={"task.running":"background-task-running","task.output":"background-task-output","task.completed":"background-task-completed","task.failed":"background-task-failed","task.cancelled":"background-task-cancelled","task.suspended":"background-task-suspended","task.resumed":"background-task-resumed"};return new ReadableStream({async start(V){let A=async(F)=>{if(!H[F.type])return;let D=F.data;if(G&&D.agentId!==G)return;if(J&&D.runId!==J)return;if(Q&&D.threadId!==Q)return;if(W&&D.resourceId!==W)return;if(K&&D.taskId!==K)return;let L={taskId:D.taskId,toolName:D.toolName,toolCallId:D.toolCallId,agentId:D.agentId,runId:D.runId};switch(F.type){case"task.running":L.startedAt=D.startedAt,L.args=D.args;break;case"task.completed":L.completedAt=D.completedAt,L.result=D.result;break;case"task.failed":L.completedAt=D.completedAt,L.error=D.error;break;case"task.cancelled":L.completedAt=D.completedAt;break;case"task.output":L.payload=D.chunk;break;case"task.suspended":L.suspendPayload=D.suspendPayload,L.suspendedAt=D.suspendedAt,L.args=D.args;break;case"task.resumed":L.startedAt=D.startedAt,L.args=D.args;break}try{V.enqueue({type:z[F.type],payload:L})}catch{}};X.subscribe(Wg,A),Z?.addEventListener("abort",()=>{X.unsubscribe(Wg,A);try{V.close()}catch{}});try{let F=await Y.getStorage();if(K){let N=await F.getTask(K);if(N&&N.status==="running")V.enqueue({type:"background-task-running",payload:{taskId:N.id,toolName:N.toolName,toolCallId:N.toolCallId,agentId:N.agentId,runId:N.runId,startedAt:N.startedAt,args:N.args}})}else{let{tasks:N}=await F.listTasks({agentId:G,runId:J,threadId:Q,resourceId:W,status:["running"]});for(let D of N){if(Z?.aborted)break;try{V.enqueue({type:"background-task-running",payload:{taskId:D.id,toolName:D.toolName,toolCallId:D.toolCallId,agentId:D.agentId,runId:D.runId,startedAt:D.startedAt,args:D.args}})}catch{break}}}}catch{}}})}async shutdown(){if(this.shuttingDown=!0,this.cleanupInterval)clearInterval(this.cleanupInterval),this.cleanupInterval=void 0;if(this.workerCallback)await this.pubsub.unsubscribe(Qg,this.workerCallback);if(this.resultCallback)await this.pubsub.unsubscribe(Wg,this.resultCallback);this.taskContexts.clear(),await this.pubsub.flush()}async dispatch($){await this.pubsub.publish(Qg,{type:"task.dispatch",data:{taskId:$.id,toolName:$.toolName,toolCallId:$.toolCallId,args:$.args,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,timeoutMs:$.timeoutMs,maxRetries:$.maxRetries,runId:$.runId},runId:$.id})}async handleDispatch($){let{taskId:Y}=$.data,X=$.deliveryAttempt??1,G=!1,J=await this.getStorage(),Q=await J.getTask(Y);if(!Q||Q.status==="cancelled")return this.deregisterTaskContext(Y),!1;await J.updateTask(Y,{status:"running",startedAt:new Date,retryCount:X-1});let W=await J.getTask(Y);if(W)await this.publishLifecycleEvent("task.running",W);if(this.#$){if(W)this.runLocalExecutionHook(W);let Z=this.#$.__getInternalWorkflow(TU);(await Z.createRun({runId:Y})).start({inputData:{taskId:Y}}).then((H)=>{if(H.status!=="suspended")Z.deleteWorkflowRunById(Y)}).catch((H)=>{this.#$?.getLogger?.()?.error(`background-task workflow start failed for ${Y}:`,H)}).finally(()=>{this.drainPending()})}return G}async handleResume($){let{taskId:Y,resumeData:X}=$.data,G=await this.getStorage(),J=await G.getTask(Y);if(!J||J.status!=="suspended")return;await G.updateTask(Y,{status:"running",startedAt:new Date,suspendPayload:void 0,suspendedAt:void 0});let Q=await G.getTask(Y);if(Q)await this.publishLifecycleEvent("task.resumed",Q);if(!this.#$)return;let W=this.#$.__getInternalWorkflow(TU);(await W.createRun({runId:Y})).resume({resumeData:X}).then((K)=>{if(K.status!=="suspended")W.deleteWorkflowRunById(Y)}).catch((K)=>{this.#$?.getLogger?.()?.error(`background-task workflow resume failed for ${Y}:`,K)}).finally(()=>{this.drainPending()})}async runLocalCompletionHooks($,Y,X){let G=this.taskContexts.get($.id);if(!G)return;try{if(Y==="completed")G.onChunk?.({type:"background-task-completed",payload:{taskId:$.id,toolName:$.toolName,toolCallId:$.toolCallId,runId:$.runId,result:X.result,completedAt:$.completedAt,agentId:$.agentId}}),await G.onResult?.({runId:$.runId,taskId:$.id,toolCallId:$.toolCallId,toolName:$.toolName,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,result:X.result,status:"completed",completedAt:$.completedAt,startedAt:$.startedAt}),await G.onComplete?.($);else G.onChunk?.({type:"background-task-failed",payload:{taskId:$.id,toolName:$.toolName,toolCallId:$.toolCallId,runId:$.runId,error:X.error??{message:"Unknown error"},completedAt:$.completedAt,agentId:$.agentId}}),await G.onResult?.({runId:$.runId,taskId:$.id,toolCallId:$.toolCallId,toolName:$.toolName,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,error:X.error,status:"failed",completedAt:$.completedAt,startedAt:$.startedAt}),await G.onFailed?.($)}finally{this.deregisterTaskContext($.id)}}async runLocalSuspendHooks($){let Y=this.taskContexts.get($.id);if(!Y)return;await Y.onExecution?.({runId:$.runId,taskId:$.id,toolCallId:$.toolCallId,toolName:$.toolName,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,startedAt:$.startedAt,suspendedAt:$.suspendedAt})}async runLocalExecutionHook($){let Y=this.taskContexts.get($.id);if(!Y)return;try{await Y.onExecution?.({runId:$.runId,taskId:$.id,toolCallId:$.toolCallId,toolName:$.toolName,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,startedAt:$.startedAt})}catch{}}async handleResult($){let{taskId:Y,toolName:X,toolCallId:G,threadId:J,resourceId:Q,runId:W}=$.data,K=await(await this.getStorage()).getTask(Y);if(K?.completedAt){let H=this.taskContexts.get(Y);if($.type==="task.completed"){if(H?.onChunk?.({type:"background-task-completed",payload:{taskId:Y,toolName:X,toolCallId:G,runId:W,result:$.data.result,completedAt:K.completedAt,agentId:K.agentId}}),await H?.onResult?.({runId:W,taskId:Y,toolCallId:G,toolName:X,agentId:$.data.agentId,threadId:J,resourceId:Q,result:$.data.result,status:"completed",completedAt:K.completedAt,startedAt:K.startedAt}),K)await Promise.all([H?.onComplete?.(K),this.config.onTaskComplete?.(K)])}if($.type==="task.failed"){if(H?.onChunk?.({type:"background-task-failed",payload:{taskId:Y,toolName:X,toolCallId:G,runId:W,error:$.data.error,completedAt:K.completedAt,agentId:K.agentId}}),await H?.onResult?.({runId:W,taskId:Y,toolCallId:G,toolName:X,agentId:$.data.agentId,threadId:J,resourceId:Q,error:$.data.error,status:"failed",completedAt:K.completedAt,startedAt:K.startedAt}),K)await Promise.all([H?.onFailed?.(K),this.config.onTaskFailed?.(K)])}this.deregisterTaskContext(Y)}}handleCancel($){let{taskId:Y}=$.data,X=this.activeAbortControllers.get(Y);if(X)X.abort(Error("Task cancelled")),this.activeAbortControllers.delete(Y);this.deregisterTaskContext(Y)}async publishLifecycleEvent($,Y){await this.pubsub.publish(Wg,{type:$,data:{taskId:Y.id,toolName:Y.toolName,toolCallId:Y.toolCallId,runId:Y.runId,agentId:Y.agentId,threadId:Y.threadId,resourceId:Y.resourceId,args:Y.args,result:Y.result,error:Y.error,chunk:Y.chunk,completedAt:Y.completedAt,startedAt:Y.startedAt,suspendPayload:Y.suspendPayload,suspendedAt:Y.suspendedAt},runId:Y.id})}async checkConcurrency($){let Y=await this.getStorage();if(await Y.getRunningCount()>=this.config.globalConcurrency)return!1;if(await Y.getRunningCountByAgent($)>=this.config.perAgentConcurrency)return!1;return!0}async drainPending(){let $=await this.getStorage(),{tasks:Y}=await $.listTasks({status:"pending",orderBy:"createdAt",orderDirection:"asc"});for(let X of Y)if(await this.checkConcurrency(X.agentId))await this.dispatch(X)}async recoverStaleTasks(){try{let $=await this.getStorage(),{tasks:Y}=await $.listTasks({status:"running"});for(let G of Y)if(G.maxRetries>0)await $.updateTask(G.id,{status:"pending",startedAt:void 0});else await $.updateTask(G.id,{status:"failed",error:{message:"Worker process terminated before task completed"},completedAt:new Date});let{tasks:X}=await $.listTasks({status:"pending",orderBy:"createdAt",orderDirection:"asc"});for(let G of X)if(await this.checkConcurrency(G.agentId))await this.dispatch(G)}catch($){let Y=this.#$?.getLogger();if(Y)Y.error("Failed to recover stale background tasks",$)}}},P04,w04;var Jg=V0(()=>{O1();P04={type:"object",description:"Optional: override background execution behavior for this specific call. Set enabled=false to force foreground, enabled=true to force background. Omit entirely to use the default configuration.",properties:{enabled:{type:"boolean",description:"Force background (true) or foreground (false) execution for this call."},timeoutMs:{type:"number",description:"Override timeout in milliseconds for this call."},maxRetries:{type:"number",description:"Override maximum retry attempts for this call."}},additionalProperties:!1},w04=U.object({enabled:U.boolean().optional().describe("Force background (true) or foreground (false) execution for this call."),timeoutMs:U.number().optional().describe("Override timeout in milliseconds for this call."),maxRetries:U.number().optional().describe("Override maximum retry attempts for this call.")}).optional().describe("Optional: override background execution behavior for this specific call. Set enabled=false to force foreground, enabled=true to force background. Omit entirely to use the default configuration.")});var j04=()=>{};var V_=($,Y)=>{return $.anyOf.length?$.anyOf.length===1?A8($.anyOf[0],{...Y,path:[...Y.path,"anyOf",0]}):`z.union([${$.anyOf.map((X,G)=>A8(X,{...Y,path:[...Y.path,"anyOf",G]})).join(", ")}])`:"z.any()"};var F80=V0(()=>{EQ()});var T04=($)=>{return"z.boolean()"};var C04=($)=>{return"z.any()"};var S04=($,Y)=>{return`z.union([${$.type.map((X)=>A8({...$,type:X},{...Y,withoutDefaults:!0})).join(", ")}])`};var qv0=V0(()=>{EQ()});var k04=($,Y)=>{return`z.any().refine((value) => !${A8($.not,{...Y,path:[...Y.path,"not"]})}.safeParse(value).success, "Invalid input: Should NOT be valid against schema")`};var Iv0=V0(()=>{EQ()});var v04=($)=>{return"z.null()"};var x04=($)=>{return[$.slice(0,$.length/2),$.slice($.length/2)]};function KD($,Y){if($.allOf.length===0)return"z.never()";else if($.allOf.length===1){let X=$.allOf[0];return A8(X,{...Y,path:[...Y.path,"allOf",X[Zg]]})}else{let[X,G]=x04(kC8($.allOf));return`z.intersection(${KD({allOf:X},Y)}, ${KD({allOf:G},Y)})`}}var Zg,kC8=($)=>{let Y=[];for(let X=0;X<$.length;X++){let G=$[X];if(typeof G==="boolean")Y.push(G?{[Zg]:X}:{[Zg]:X,not:{}});else if(Zg in G)return $;else Y.push({...G,[Zg]:X})}return Y};var D80=V0(()=>{EQ();Zg=Symbol("Original index")});function Z$($,Y,X,G){let J=$[Y],Q="";if(J!==void 0){let W=X({value:J,json:JSON.stringify(J)});if(W){let Z=W[0],K=W.length===3?W[1]:"",H=W.length===3?W[2]:W[1];Q+=Z;let z=$.errorMessage?.[Y]??G;if(z!==void 0)Q+=K+JSON.stringify(z);Q+=H}}return Q}var y04=($,Y)=>{if(Array.isArray($.items))return`z.tuple([${$.items.map((G,J)=>A8(G,{...Y,path:[...Y.path,"items",J]}))}])`;let X=!$.items?"z.array(z.any())":`z.array(${A8($.items,{...Y,path:[...Y.path,"items"]})})`;if(X+=Z$($,"minItems",({json:G})=>[`.min(${G}`,", ",")"]),X+=Z$($,"maxItems",({json:G})=>[`.max(${G}`,", ",")"]),$.uniqueItems===!0)X+=Z$($,"uniqueItems",()=>[".refine((arr) => arr.every((item, i) => arr.indexOf(item) == i)",", ",")"],"All items must be unique!");return X};var Pv0=V0(()=>{EQ()});var b04=($)=>{return`z.literal(${JSON.stringify($.const)})`};var h04=($)=>{if($.enum.length===0)return"z.never()";else if($.enum.length===1)return`z.literal(${JSON.stringify($.enum[0])})`;else if($.enum.every((Y)=>typeof Y==="string"))return`z.enum([${$.enum.map((Y)=>JSON.stringify(Y))}])`;else return`z.union([${$.enum.map((Y)=>`z.literal(${JSON.stringify(Y)})`).join(", ")}])`};var f04=($,Y)=>{let X=A8($.if,{...Y,path:[...Y.path,"if"]}),G=A8($.then,{...Y,path:[...Y.path,"then"]}),J=A8($.else,{...Y,path:[...Y.path,"else"]});return`z.union([${G}, ${J}]).superRefine((value,ctx) => {
  const result = ${X}.safeParse(value).success
    ? ${G}.safeParse(value)
    : ${J}.safeParse(value);
  if (!result.success) {
    result.error.errors.forEach((error) => ctx.addIssue(error))
  }
})`};var wv0=V0(()=>{EQ()});var g04=($)=>{let Y="z.number()";if($.type==="integer")Y+=Z$($,"type",()=>[".int(",")"]);else Y+=Z$($,"format",({value:X})=>{if(X==="int64")return[".int(",")"]});if(Y+=Z$($,"multipleOf",({value:X,json:G})=>{if(X===1){if(Y.startsWith("z.number().int("))return;return[".int(",")"]}return[`.multipleOf(${G}`,", ",")"]}),typeof $.minimum==="number")if($.exclusiveMinimum===!0)Y+=Z$($,"minimum",({json:X})=>[`.gt(${X}`,", ",")"]);else Y+=Z$($,"minimum",({json:X})=>[`.gte(${X}`,", ",")"]);else if(typeof $.exclusiveMinimum==="number")Y+=Z$($,"exclusiveMinimum",({json:X})=>[`.gt(${X}`,", ",")"]);if(typeof $.maximum==="number")if($.exclusiveMaximum===!0)Y+=Z$($,"maximum",({json:X})=>[`.lt(${X}`,", ",")"]);else Y+=Z$($,"maximum",({json:X})=>[`.lte(${X}`,", ",")"]);else if(typeof $.exclusiveMaximum==="number")Y+=Z$($,"exclusiveMaximum",({json:X})=>[`.lt(${X}`,", ",")"]);return Y};var _v0=()=>{};var A_=($,Y)=>{let X=Y.zodVersion===3;return $.oneOf.length?$.oneOf.length===1?A8($.oneOf[0],{...Y,path:[...Y.path,"oneOf",0]}):`z.any().superRefine((x, ctx) => {
    const schemas = [${$.oneOf.map((G,J)=>A8(G,{...Y,path:[...Y.path,"oneOf",J]})).join(", ")}];
    const { errors, failed } = schemas.reduce<{
      errors: z.${X?"ZodError":"core.$ZodIssue"}[];
      failed: number;
    }>(
      ({ errors, failed }, schema) =>
        ((result) =>
          result.error
            ? {
                errors: [...errors, ${X?"result.error":"...result.error.issues"}],
                failed: failed + 1,
              }
            : { errors, failed })(
          schema.safeParse(x),
        ),
      { errors: [], failed: 0 },
    );
    const passed = schemas.length - failed;
    if (passed !== 1) {
      ctx.addIssue(errors.length ? {
        path: ${X?"ctx.path":"[]"},
        code: "invalid_union",
        ${X?"unionErrors: errors":"errors: [errors]"},
        message: "Invalid input: Should pass single schema. Passed " + passed,
      } : {
        path: ${X?"ctx.path":"[]"},
        code: "custom",${X?"":`
        errors: [errors],`}
        message: "Invalid input: Should pass single schema. Passed " + passed,
      });
    }
  })`:"z.any()"};var N80=V0(()=>{EQ()});var jv0=($)=>{let Y=$.split(`
`);return`/**${Y.length===1?Y[0]:`
${Y.map((G)=>`* ${G}`).join(`
`)}
`}*/
`},L80=($,Y)=>{let X=$.description;if(!X)return Y;return`
${jv0(X)}${Y}`};function Kg($,Y){if(Y.zodVersion===3)return`z.record(${$})`;return`z.record(z.string(), ${$})`}function m04($){if($.zodVersion===3)return"path: [...ctx.path, key]";return"path: [key]"}function u04($,Y){let X=void 0;if($.properties)if(!Object.keys($.properties).length)X="z.object({})";else X="z.object({ ",X+=Object.keys($.properties).map((W)=>{let Z=$.properties[W],K=`${JSON.stringify(W)}: ${A8(Z,{...Y,path:[...Y.path,"properties",W]})}`;if(Y.withJsdocs&&typeof Z==="object")K=L80(Z,K);let H=typeof Z==="object"&&Z.default!==void 0,z=Array.isArray($.required)?$.required.includes(W):typeof Z==="object"&&Z.required===!0;return!H&&!z?`${K}.optional()`:K}).join(", "),X+=" })";let G=$.additionalProperties!==void 0?A8($.additionalProperties,{...Y,path:[...Y.path,"additionalProperties"]}):void 0,J=void 0;if($.patternProperties){let W=Object.fromEntries(Object.entries($.patternProperties).map(([Z,K])=>{return[Z,A8(K,{...Y,path:[...Y.path,"patternProperties",Z]})]},{}));if(J="",X)if(G)J+=`.catchall(z.union([${[...Object.values(W),G].join(", ")}]))`;else if(Object.keys(W).length>1)J+=`.catchall(z.union([${Object.values(W).join(", ")}]))`;else J+=`.catchall(${Object.values(W)})`;else if(G)J+=Kg(`z.union([${[...Object.values(W),G].join(", ")}])`,Y);else if(Object.keys(W).length>1)J+=Kg(`z.union([${Object.values(W).join(", ")}])`,Y);else J+=Kg(`${Object.values(W)}`,Y);if(J+=`.superRefine((value, ctx) => {
`,J+=`for (const key in value) {
`,G)if($.properties)J+=`let evaluated = [${Object.keys($.properties).map((Z)=>JSON.stringify(Z)).join(", ")}].includes(key)
`;else J+=`let evaluated = false
`;for(let Z in $.patternProperties){if(J+="if (key.match(new RegExp("+JSON.stringify(Z)+`))) {
`,G)J+=`evaluated = true
`;J+="const result = "+W[Z]+`.safeParse(value[key])
`,J+=`if (!result.success) {
`,J+=`ctx.addIssue({
          ${m04(Y)},
          code: 'custom',
          message: \`Invalid input: Key matching regex /\${key}/ must match schema\`,
          params: {
            issues: result.error.issues
          }
        })
`,J+=`}
`,J+=`}
`}if(G)J+=`if (!evaluated) {
`,J+="const result = "+G+`.safeParse(value[key])
`,J+=`if (!result.success) {
`,J+=`ctx.addIssue({
          ${m04(Y)},
          code: 'custom',
          message: \`Invalid input: must match catchall schema\`,
          params: {
            issues: result.error.issues
          }
        })
`,J+=`}
`,J+=`}
`;J+=`}
`,J+="})"}let Q=X?J?X+J:G?G==="z.never()"?X+".strict()":X+`.catchall(${G})`:X:J?J:G?Kg(G,Y):Kg("z.any()",Y);if(n9.an.anyOf($))Q+=`.and(${V_({...$,anyOf:$.anyOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;if(n9.a.oneOf($))Q+=`.and(${A_({...$,oneOf:$.oneOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;if(n9.an.allOf($))Q+=`.and(${KD({...$,allOf:$.allOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;return Q}var Tv0=V0(()=>{F80();N80();EQ();D80()});var p04=($)=>{let Y="z.string()";Y+=Z$($,"format",({value:G})=>{switch(G){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime({ offset: true",", message: "," })"];case"time":return[".time(",")"];case"date":return[".date(",")"];case"binary":return[".base64(",")"];case"duration":return[".duration(",")"]}}),Y+=Z$($,"pattern",({json:G})=>[`.regex(new RegExp(${G})`,", ",")"]),Y+=Z$($,"minLength",({json:G})=>[`.min(${G}`,", ",")"]),Y+=Z$($,"maxLength",({json:G})=>[`.max(${G}`,", ",")"]),Y+=Z$($,"contentEncoding",({value:G})=>{if(G==="base64")return[".base64(",")"]});let X=Z$($,"contentMediaType",({value:G})=>{if(G==="application/json")return['.transform((str, ctx) => { try { return JSON.parse(str); } catch (err) { ctx.addIssue({ code: "custom", message: "Invalid JSON" }); }}',", ",")"]});if(X!="")Y+=X,Y+=Z$($,"contentSchema",({value:G})=>{if(G&&G instanceof Object)return[`.pipe(${A8(G)}`,", ",")"]});return Y};var Cv0=V0(()=>{EQ()});var d04=($,Y)=>{return $.oneOf.length?$.oneOf.length===1?A8($.oneOf[0],{...Y,path:[...Y.path,"oneOf",0]}):`z.discriminatedUnion("${$.discriminator.propertyName}", [${$.oneOf.map((X,G)=>A8(X,{...Y,path:[...Y.path,"oneOf",G]})).join(", ")}])`:"z.any()"};var Sv0=V0(()=>{EQ()});var c04=($,...Y)=>Object.keys($).reduce((X,G)=>{if(!Y.includes(G))X[G]=$[G];return X},{});var l04=($,Y)=>{return`${A8(c04($,"nullable"),Y,!0)}.nullable()`};var kv0=V0(()=>{EQ()});var A8=($,Y={seen:new Map,path:[]},X)=>{if(typeof $!=="object")return $?"z.any()":"z.never()";if(Y.parserOverride){let Q=Y.parserOverride($,Y);if(typeof Q==="string")return Q}let G=Y.seen.get($);if(G){if(G.r!==void 0)return G.r;if(Y.depth===void 0||G.n>=Y.depth)return"z.any()";G.n+=1}else G={r:void 0,n:0},Y.seen.set($,G);let J=bC8($,Y);if(!X){if(!Y.withoutDescribes)J=vC8($,J);if(!Y.withoutDefaults)J=xC8($,J);J=yC8($,J)}return G.r=J,J},vC8=($,Y)=>{if($.description)Y+=`.describe(${JSON.stringify($.description)})`;return Y},xC8=($,Y)=>{if($.default!==void 0)Y+=`.default(${JSON.stringify($.default)})`;return Y},yC8=($,Y)=>{if($.readOnly)Y+=".readonly()";return Y},bC8=($,Y)=>{if(n9.a.nullable($))return l04($,Y);else if(n9.an.object($))return u04($,Y);else if(n9.an.array($))return y04($,Y);else if(n9.an.anyOf($))return V_($,Y);else if(n9.an.allOf($))return KD($,Y);else if(n9.a.simpleDiscriminatedOneOf($))return d04($,Y);else if(n9.a.oneOf($))return A_($,Y);else if(n9.a.not($))return k04($,Y);else if(n9.an.enum($))return h04($);else if(n9.a.const($))return b04($);else if(n9.a.multipleType($))return S04($,Y);else if(n9.a.primitive($,"string"))return p04($);else if(n9.a.primitive($,"number")||n9.a.primitive($,"integer"))return g04($);else if(n9.a.primitive($,"boolean"))return T04($);else if(n9.a.primitive($,"null"))return v04($);else if(n9.a.conditional($))return f04($,Y);else return C04($)},n9;var EQ=V0(()=>{F80();qv0();Iv0();D80();Pv0();wv0();_v0();Tv0();Cv0();N80();Sv0();kv0();n9={an:{object:($)=>$.type==="object",array:($)=>$.type==="array",anyOf:($)=>$.anyOf!==void 0,allOf:($)=>$.allOf!==void 0,enum:($)=>$.enum!==void 0},a:{nullable:($)=>$.nullable===!0,multipleType:($)=>Array.isArray($.type),not:($)=>$.not!==void 0,const:($)=>$.const!==void 0,primitive:($,Y)=>$.type===Y,conditional:($)=>Boolean("if"in $&&$.if&&"then"in $&&"else"in $&&$.then&&$.else),simpleDiscriminatedOneOf:($)=>{if(!$.oneOf||!Array.isArray($.oneOf)||$.oneOf.length===0||!$.discriminator||typeof $.discriminator!=="object"||!("propertyName"in $.discriminator)||typeof $.discriminator.propertyName!=="string")return!1;let Y=$.discriminator.propertyName;return $.oneOf.every((X)=>{if(!X||typeof X!=="object"||X.type!=="object"||!X.properties||typeof X.properties!=="object"||!(Y in X.properties))return!1;let G=X.properties[Y];return G&&typeof G==="object"&&G.type==="string"&&(G.const!==void 0||G.enum&&Array.isArray(G.enum)&&G.enum.length===1)&&Array.isArray(X.required)&&X.required.includes(Y)})},oneOf:($)=>$.oneOf!==void 0}}});var i04=($,{module:Y,name:X,type:G,noImport:J,zodVersion:Q=4,...W}={})=>{if(G&&(!X||Y!=="esm"))throw Error("Option `type` requires `name` to be set and `module` to be `esm`");let Z=A8($,{module:Y,name:X,path:[],seen:new Map,zodVersion:Q,...W}),K=W.withJsdocs&&typeof $!=="boolean"&&$.description?jv0($.description):"";if(Y==="cjs"){if(Z=`${K}module.exports = ${X?`{ ${JSON.stringify(X)}: ${Z} }`:Z}
`,!J)Z=`${K}const { z } = require("zod")

${Z}`}else if(Y==="esm"){if(Z=`${K}export ${X?`const ${X} =`:"default"} ${Z}
`,!J)Z=`import { z } from "zod"

${Z}`}else if(X)Z=`${K}const ${X} = ${Z}`;if(G&&X){let H=typeof G==="string"?G:`${X[0].toUpperCase()}${X.substring(1)}`;Z+=`export type ${H} = z.infer<typeof ${X}>
`}return Z};var vv0=V0(()=>{EQ()});var n04;var xv0=V0(()=>{vv0();j04();vv0();D80();F80();Pv0();wv0();qv0();Iv0();kv0();_v0();Tv0();N80();EQ();Sv0();Cv0();n04=i04});function hC8($,Y){let X=void 0;if($.properties)if(!Object.keys($.properties).length)X="z.object({})";else X="z.object({ ",X+=Object.keys($.properties).map((W)=>{let Z=$.properties[W],K=`${JSON.stringify(W)}: ${A8(Z,{...Y,path:[...Y.path,"properties",W]})}`;if(Y.withJsdocs&&typeof Z==="object")K=L80(Z,K);let H=typeof Z==="object"&&Z.default!==void 0,z=Array.isArray($.required)?$.required.includes(W):typeof Z==="object"&&Z.required===!0;return!H&&!z?`${K}.optional()`:K}).join(", "),X+=" })";let G=$.additionalProperties!==void 0&&$.additionalProperties!==!1?A8($.additionalProperties,{...Y,path:[...Y.path,"additionalProperties"]}):void 0,J=void 0;if($.patternProperties){let W=Object.fromEntries(Object.entries($.patternProperties).map(([Z,K])=>{return[Z,A8(K,{...Y,path:[...Y.path,"patternProperties",Z]})]},{}));if(J="",X)if(G)J+=`.catchall(z.union([${[...Object.values(W),G].join(", ")}]))`;else if(Object.keys(W).length>1)J+=`.catchall(z.union([${Object.values(W).join(", ")}]))`;else J+=`.catchall(${Object.values(W)})`;else if(G)J+=`z.record(z.union([${[...Object.values(W),G].join(", ")}]))`;else if(Object.keys(W).length>1)J+=`z.record(z.union([${Object.values(W).join(", ")}]))`;else J+=`z.record(${Object.values(W)})`;if(J+=`.superRefine((value, ctx) => {
`,J+=`for (const key in value) {
`,G)if($.properties)J+=`let evaluated = [${Object.keys($.properties).map((Z)=>JSON.stringify(Z)).join(", ")}].includes(key)
`;else J+=`let evaluated = false
`;for(let Z in $.patternProperties){if(J+="if (key.match(new RegExp("+JSON.stringify(Z)+`))) {
`,G)J+=`evaluated = true
`;J+="const result = "+W[Z]+`.safeParse(value[key])
`,J+=`if (!result.success) {
`,J+=`ctx.addIssue({
          path: [...ctx.path, key],
          code: 'custom',
          message: \`Invalid input: Key matching regex /\${key}/ must match schema\`,
          params: {
            issues: result.error.issues
          }
        })
`,J+=`}
`,J+=`}
`}if(G)J+=`if (!evaluated) {
`,J+="const result = "+G+`.safeParse(value[key])
`,J+=`if (!result.success) {
`,J+=`ctx.addIssue({
          path: [...ctx.path, key],
          code: 'custom',
          message: \`Invalid input: must match catchall schema\`,
          params: {
            issues: result.error.issues
          }
        })
`,J+=`}
`,J+=`}
`;J+=`}
`,J+="})"}let Q=X?J?X+J:G?G==="z.never()"?X+".strict()":X+`.catchall(${G})`:X:J?J:G?`z.record(${G})`:"z.record(z.any())";if(n9.an.anyOf($))Q+=`.and(${V_({...$,anyOf:$.anyOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;if(n9.a.oneOf($))Q+=`.and(${A_({...$,oneOf:$.oneOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;if(n9.an.allOf($))Q+=`.and(${KD({...$,allOf:$.allOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;return Q}function B80($,Y={}){return n04($,{...Y,parserOverride:fC8}).replace(/\.reduce<[^>]+>/g,".reduce")}var fC8=($,Y)=>{let X="",G=Y.seen.get($);if(n9.an.anyOf($)){let J=$.anyOf.every((Q)=>typeof Q==="object"&&n9.an.object(Q)&&Q.properties!==void 0);if($.anyOf.length>1&&J){let Q=$.anyOf.reduce((W,Z)=>{if(typeof Z==="object"&&n9.an.object(Z)){let K=Object.entries(Z.properties??{}).filter(([H,z])=>typeof z==="object"&&z?.const!==void 0);if(K?.length){let H=K.map(([z,V])=>z);W.push(H)}}return W},[]);if(Q.length===$.anyOf.length){if(G){if(G.r!==void 0)return G.r;if(Y.depth===void 0||G.n>=Y.depth)return"z.any()";G.n+=1}else G={r:void 0,n:0},Y.seen.set($,G);let W=Q.length>0&&Q[0]?Q.reduce((Z,K)=>{return Z.filter((H)=>K.includes(H))},Q[0]):[];if(W.length>0){let Z=W[0];if(Z)X=`z.discriminatedUnion("${Z}", [${$.anyOf.map((K,H)=>A8(K,{...Y,path:[...Y.path,"anyOf",H]})).join(", ")}])`}}}}else if(n9.an.object($)){if(G){if(G.r!==void 0)return G.r;if(Y.depth===void 0||G.n>=Y.depth)return"z.any()";G.n+=1}else G={r:void 0,n:0},Y.seen.set($,G);X=hC8($,Y)}if(X){if(!Y.withoutDescribes)X=gC8($,X);if(!Y.withoutDefaults)X=mC8($,X);if(X=uC8($,X),G)G.r=X;return X}},gC8=($,Y)=>{if($.description)Y+=`.describe(${JSON.stringify($.description)})`;return Y},mC8=($,Y)=>{if($.default!==void 0)Y+=`.default(${JSON.stringify($.default)})`;return Y},uC8=($,Y)=>{if($.readOnly)Y+=".readonly()";return Y};var yv0=V0(()=>{xv0();xv0()});function CU($){if(!$||typeof $!=="object")return $;if($[r04])return $;$[r04]=!0;let Y=$._zod?.def;if(Y?.type==="record"&&Y.keyType&&!Y.valueType)Y.valueType=Y.keyType,Y.keyType=U.string();if(!Y)return $;if(Y.type==="object"&&Y.shape){let X=typeof Y.shape==="function"?Y.shape():Y.shape;for(let G of Object.keys(X))CU(X[G])}if(Y.type==="array"&&Y.element)CU(Y.element);if(Y.type==="union"&&Y.options)Y.options.forEach(CU);if(Y.type==="record"){if(Y.keyType)CU(Y.keyType);if(Y.valueType)CU(Y.valueType)}if(Y.type==="intersection"){if(Y.left)CU(Y.left);if(Y.right)CU(Y.right)}if(Y.type==="lazy"){if(Y.getter&&typeof Y.getter==="function"){let X=Y.getter;Y.getter=function(){let G=X();if(G)CU(G);return G}}}if(Y.innerType)CU(Y.innerType);return $}function sz($){if(typeof $!=="object"||$===null)return $;let Y={...$};if(Y.anyOf&&Array.isArray(Y.anyOf)&&Y.anyOf.length===2){let X=Y.anyOf.find((J)=>typeof J==="object"&&J!==null&&J.type==="null"),G=Y.anyOf.find((J)=>typeof J==="object"&&J!==null&&J.type!=="null");if(X&&G&&typeof G==="object"&&G.type){let{anyOf:J,...Q}=Y,W=sz(Q),Z=sz(G);return{...W,...Z,type:Array.isArray(Z.type)?[...Z.type,"null"]:[Z.type,"null"]}}}if(Y.properties&&typeof Y.properties==="object"&&!Array.isArray(Y.properties))Y.properties=Object.fromEntries(Object.entries(Y.properties).map(([X,G])=>{let J=G;if(typeof J==="object"&&J!==null&&!Array.isArray(J)&&Object.keys(J).length===0)return[X,{type:["string","number","boolean","null"]}];return[X,sz(J)]}));if(Y.items)if(Array.isArray(Y.items))Y.items=Y.items.map((X)=>sz(X));else Y.items=sz(Y.items);if(Y.anyOf&&Array.isArray(Y.anyOf))Y.anyOf=Y.anyOf.map((X)=>sz(X));if(Y.oneOf&&Array.isArray(Y.oneOf))Y.oneOf=Y.oneOf.map((X)=>sz(X));if(Y.allOf&&Array.isArray(Y.allOf))Y.allOf=Y.allOf.map((X)=>sz(X));return Y}function oz($){if(typeof $!=="object"||$===null)return $;let Y={...$};if(Y.type==="object"&&Y.properties)Y.required=Object.keys(Y.properties),Y.properties=Object.fromEntries(Object.entries(Y.properties).map(([X,G])=>[X,oz(G)]));if(Y.items){if(Array.isArray(Y.items))Y.items=Y.items.map((X)=>oz(X));else if(typeof Y.items==="object")Y.items=oz(Y.items)}if(Y.additionalProperties&&typeof Y.additionalProperties==="object")Y.additionalProperties=oz(Y.additionalProperties);if(Y.anyOf&&Array.isArray(Y.anyOf))Y.anyOf=Y.anyOf.map((X)=>oz(X));if(Y.oneOf&&Array.isArray(Y.oneOf))Y.oneOf=Y.oneOf.map((X)=>oz(X));if(Y.allOf&&Array.isArray(Y.allOf))Y.allOf=Y.allOf.map((X)=>oz(X));return Y}function bv0($){let Y=oz($);return rO(Y)}function rO($){if(typeof $!=="object"||$===null)return $;let Y={...$};if(Y.type==="object"||Y.properties)Y.additionalProperties=!1;if(Y.properties)Y.properties=Object.fromEntries(Object.entries(Y.properties).map(([X,G])=>[X,rO(G)]));if(Y.items){if(Array.isArray(Y.items))Y.items=Y.items.map((X)=>rO(X));else if(typeof Y.items==="object")Y.items=rO(Y.items)}if(Y.anyOf&&Array.isArray(Y.anyOf))Y.anyOf=Y.anyOf.map((X)=>rO(X));if(Y.oneOf&&Array.isArray(Y.oneOf))Y.oneOf=Y.oneOf.map((X)=>rO(X));if(Y.allOf&&Array.isArray(Y.allOf))Y.allOf=Y.allOf.map((X)=>rO(X));return Y}function a04($,Y="jsonSchema7",X="relative"){if($?._zod){CU($);let G=U.toJSONSchema($,{unrepresentable:"any",override:(J)=>{let Q=J.zodSchema?._def||J.zodSchema?._zod?.def;if(Q&&(Q.typeName==="ZodDate"||Q.type==="date"))J.jsonSchema.type="string",J.jsonSchema.format="date-time";if(Q&&(Q.typeName==="ZodObject"||Q.type==="object"))J.jsonSchema.additionalProperties=!1}});return sz(G)}else return M40($,{$refStrategy:X,target:Y})}var r04;var hv0=V0(()=>{O1();R40();r04=Symbol("__mastra_patched__")});function Ug($,Y){if($===Y)return!0;if($==null||Y==null)return $===Y;if(typeof $!==typeof Y)return!1;if(Array.isArray($)&&Array.isArray(Y)){if($.length!==Y.length)return!1;return $.every((X,G)=>Ug(X,Y[G]))}if(typeof $==="object"&&typeof Y==="object"){let X=Object.keys($),G=Object.keys(Y);if(X.length!==G.length)return!1;return X.every((J)=>G.includes(J)&&Ug($[J],Y[J]))}return!1}function HS8(){return($)=>{if(!Array.isArray($))return!0;let Y=[];return $.every((X)=>{if(Y.some((J)=>Ug(X,J)))return!1;return Y.push(X),!0})}}function O80($,Y){return $.safeParse(Y).success}function UG($){if(typeof $==="boolean")return $?U.any():U.never();let Y={};for(let J of IS8)J.apply(Y,$);let X=[];if(Y.string!==!1)X.push(Y.string||U.string());if(Y.number!==!1)X.push(Y.number||U.number());if(Y.boolean!==!1)X.push(Y.boolean||U.boolean());if(Y.null!==!1)X.push(Y.null||U.null());if(Y.array!==!1)X.push(Y.array||U.array(U.any()));if(Y.tuple!==!1&&Y.tuple!==void 0)X.push(Y.tuple);if(Y.object!==!1)if(Y.object)X.push(Y.object);else{let J=U.custom((Q)=>{return typeof Q==="object"&&Q!==null&&!Array.isArray(Q)},"Must be an object, not an array");X.push(J)}if(Y.file!==!1&&Y.file!==void 0)X.push(Y.file);let G;if(X.length===0)G=U.never();else if(X.length===1)G=X[0];else if(!Object.keys($).some((Q)=>Q!=="$schema"&&Q!=="title"&&Q!=="description"))G=U.any();else G=U.union(X);for(let J of PS8)G=J.apply(G,$);return G}var pC8=class{apply($,Y){if(!Y.type)return;let X=Array.isArray(Y.type)?Y.type:[Y.type],G=new Set(X);if(!G.has("string"))$.string=!1;if(!G.has("number")&&!G.has("integer"))$.number=!1;if(!G.has("boolean"))$.boolean=!1;if(!G.has("null"))$.null=!1;if(!G.has("array"))$.array=!1;if(!G.has("object"))$.object=!1;if(G.has("integer")&&$.number!==!1){let J=$.number||U.number();if(J instanceof U.ZodNumber)$.number=J.int()}}},dC8=class{apply($,Y){if(Y.const===void 0)return;let X=Y.const;if($.string=!1,$.number=!1,$.boolean=!1,$.null=!1,$.array=!1,$.object=!1,typeof X==="string")$.string=U.literal(X);else if(typeof X==="number")$.number=U.literal(X);else if(typeof X==="boolean")$.boolean=U.literal(X);else if(X===null)$.null=U.null();else if(Array.isArray(X))$.array=void 0;else if(typeof X==="object")$.object=void 0}},cC8=class{apply($,Y){if(!Y.enum)return;if(Y.enum.length===0){if(!Y.type)$.string=!1,$.number=!1,$.boolean=!1,$.null=!1,$.array=!1,$.object=!1;return}let X={string:Y.enum.filter((G)=>typeof G==="string"),number:Y.enum.filter((G)=>typeof G==="number"),boolean:Y.enum.filter((G)=>typeof G==="boolean"),null:Y.enum.filter((G)=>G===null),array:Y.enum.filter((G)=>Array.isArray(G)),object:Y.enum.filter((G)=>typeof G==="object"&&G!==null&&!Array.isArray(G))};$.string=this.createTypeSchema(X.string,"string"),$.number=this.createTypeSchema(X.number,"number"),$.boolean=this.createTypeSchema(X.boolean,"boolean"),$.null=X.null.length>0?U.null():!1,$.array=X.array.length>0?void 0:!1,$.object=X.object.length>0?void 0:!1}createTypeSchema($,Y){if($.length===0)return!1;if($.length===1)return U.literal($[0]);if(Y==="string")return U.enum($);if(Y==="number"){let[X,G,...J]=$;return U.union([U.literal(X),U.literal(G),...J.map((Q)=>U.literal(Q))])}if(Y==="boolean")return U.union([U.literal(!0),U.literal(!1)]);return!1}},lC8=class{apply($,Y){let X=Y;if(X.type==="string"&&X.format==="binary"&&X.contentEncoding==="binary"){let G=U.file();if(X.minLength!==void 0)G=G.min(X.minLength);if(X.maxLength!==void 0)G=G.max(X.maxLength);if(X.contentMediaType!==void 0)G=G.mime(X.contentMediaType);$.file=G,$.string=!1}}},iC8=class{apply($,Y){let X=Y;if(Y.type===void 0&&(X.minLength!==void 0||X.maxLength!==void 0||X.pattern!==void 0)){if($.string===void 0)$.string=U.string()}}},nC8=class{apply($,Y){let X=Y;if(X.minLength===void 0)return;if($.string!==!1){let G=$.string||U.string();if(G instanceof U.ZodString)$.string=G.refine((J)=>{return Array.from(J).length>=X.minLength},{message:`String must be at least ${X.minLength} characters long`})}}},rC8=class{apply($,Y){let X=Y;if(X.maxLength===void 0)return;if($.string!==!1){let G=$.string||U.string();if(G instanceof U.ZodString)$.string=G.refine((J)=>{return Array.from(J).length<=X.maxLength},{message:`String must be at most ${X.maxLength} characters long`})}}},aC8=class{apply($,Y){let X=Y;if(!X.pattern)return;if($.string!==!1){let G=$.string||U.string();if(G instanceof U.ZodString){let J=new RegExp(X.pattern);$.string=G.regex(J)}}}},sC8=class{apply($,Y){let X=Y;if(X.minimum===void 0)return;if($.number!==!1){let G=$.number||U.number();if(G instanceof U.ZodNumber)$.number=G.min(X.minimum)}}},oC8=class{apply($,Y){let X=Y;if(X.maximum===void 0)return;if($.number!==!1){let G=$.number||U.number();if(G instanceof U.ZodNumber)$.number=G.max(X.maximum)}}},tC8=class{apply($,Y){let X=Y;if(X.exclusiveMinimum===void 0)return;if($.number!==!1){let G=$.number||U.number();if(G instanceof U.ZodNumber)if(typeof X.exclusiveMinimum==="number")$.number=G.gt(X.exclusiveMinimum);else $.number=!1}}},eC8=class{apply($,Y){let X=Y;if(X.exclusiveMaximum===void 0)return;if($.number!==!1){let G=$.number||U.number();if(G instanceof U.ZodNumber)if(typeof X.exclusiveMaximum==="number")$.number=G.lt(X.exclusiveMaximum);else $.number=!1}}},$S8=class{apply($,Y){let X=Y;if(X.multipleOf===void 0)return;if($.number!==!1){let G=$.number||U.number();if(G instanceof U.ZodNumber)$.number=G.refine((J)=>{if(X.multipleOf===0)return!1;let Q=J/X.multipleOf,W=Math.round(Q),Z=Math.min(Math.abs(J)*Number.EPSILON*10,Math.abs(X.multipleOf)*Number.EPSILON*10);return Math.abs(Q-W)<=Z/Math.abs(X.multipleOf)},{message:`Must be a multiple of ${X.multipleOf}`})}}},YS8=class{apply($,Y){let X=Y;if(Y.type===void 0&&(X.minItems!==void 0||X.maxItems!==void 0||X.items!==void 0||X.prefixItems!==void 0)){if($.array===void 0)$.array=U.array(U.any())}}},XS8=class{apply($,Y){let X=Y;if(X.minItems===void 0)return;if($.array!==!1)$.array=($.array||U.array(U.any())).min(X.minItems)}},GS8=class{apply($,Y){let X=Y;if(X.maxItems===void 0)return;if($.array!==!1)$.array=($.array||U.array(U.any())).max(X.maxItems)}},JS8=class{apply($,Y){let X=Y;if($.array===!1)return;if(Array.isArray(X.items))$.array=$.array||U.array(U.any());else if(X.items&&typeof X.items!=="boolean"&&!X.prefixItems){let G=UG(X.items),J=U.array(G);if($.array&&$.array instanceof U.ZodArray){let Q=$.array._def;if(Q.checks)Q.checks.forEach((W)=>{if(W._zod&&W._zod.def){let Z=W._zod.def;if(Z.check==="min_length"&&Z.minimum!==void 0)J=J.min(Z.minimum);else if(Z.check==="max_length"&&Z.maximum!==void 0)J=J.max(Z.maximum)}})}$.array=J}else if(typeof X.items==="boolean"&&X.items===!1)if(!X.prefixItems)$.array=U.array(U.any()).max(0);else $.array=$.array||U.array(U.any());else if(typeof X.items==="boolean"&&X.items===!0)$.array=$.array||U.array(U.any());else if(X.prefixItems)$.array=$.array||U.array(U.any())}},QS8=class{apply($,Y){if(Y.type!=="array")return;let X=Y;if(!Array.isArray(X.items))return;if($.array===!1)return;let G=X.items.map((Q)=>UG(Q)),J;if(G.length===0)J=U.tuple([]);else J=U.tuple(G);if(X.minItems!==void 0&&X.minItems>G.length)J=!1;if(X.maxItems!==void 0&&X.maxItems<G.length)J=!1;$.tuple=J,$.array=!1}},WS8=class{apply($,Y){let X=Y;if($.object===!1)return;if(X.properties||X.required||X.additionalProperties!==void 0)$.object=$.object||U.object({}).passthrough()}},ZS8=class{apply($,Y){let X=Y;if(Y.type===void 0&&(X.maxProperties!==void 0||X.minProperties!==void 0)){if($.object===void 0)$.object=U.object({}).passthrough()}}},KS8=class{apply($,Y){let X=Y;if(X.maxProperties===void 0)return;if($.object!==!1){let G=$.object||U.object({}).passthrough();$.object=G.refine((J)=>Object.keys(J).length<=X.maxProperties,{message:`Object must have at most ${X.maxProperties} properties`})}}},US8=class{apply($,Y){let X=Y;if(X.minProperties===void 0)return;if($.object!==!1){let G=$.object||U.object({}).passthrough();$.object=G.refine((J)=>Object.keys(J).length>=X.minProperties,{message:`Object must have at least ${X.minProperties} properties`})}}},zS8=class{apply($,Y){if(!Y.not)return $;let X=UG(Y.not);return $.refine((G)=>!O80(X,G),{message:"Value must not match the 'not' schema"})}},VS8=class{apply($,Y){if(Y.uniqueItems!==!0)return $;return $.refine(HS8(),{message:"Array items must be unique"})}},AS8=class{apply($,Y){if(!Y.allOf||Y.allOf.length===0)return $;return Y.allOf.map((G)=>UG(G)).reduce((G,J)=>U.intersection(G,J),$)}},FS8=class{apply($,Y){if(!Y.anyOf||Y.anyOf.length===0)return $;let X=Y.anyOf.length===1?UG(Y.anyOf[0]):U.union([UG(Y.anyOf[0]),UG(Y.anyOf[1]),...Y.anyOf.slice(2).map((G)=>UG(G))]);return U.intersection($,X)}},DS8=class{apply($,Y){if(!Y.oneOf||Y.oneOf.length===0)return $;let X=Y.oneOf.map((G)=>UG(G));return $.refine((G)=>{let J=0;for(let Q of X)if(Q.safeParse(G).success){if(J++,J>1)return!1}return J===1},{message:"Value must match exactly one of the oneOf schemas"})}},NS8=class{apply($,Y){let X=Y;if(X.prefixItems&&Array.isArray(X.prefixItems)){let J=X.prefixItems.map((Q)=>UG(Q));return $.refine((Q)=>{if(!Array.isArray(Q))return!0;for(let W=0;W<Math.min(Q.length,J.length);W++)if(!O80(J[W],Q[W]))return!1;if(Q.length>J.length){if(typeof X.items==="boolean"&&X.items===!1)return!1;else if(X.items&&typeof X.items==="object"&&!Array.isArray(X.items)){let W=UG(X.items);for(let Z=J.length;Z<Q.length;Z++)if(!O80(W,Q[Z]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return $}},LS8=class{apply($,Y){let X=Y;if(!X.properties&&!X.required&&X.additionalProperties!==!1)return $;if($ instanceof U.ZodObject||$ instanceof U.ZodRecord){let G={};if(X.properties){for(let[J,Q]of Object.entries(X.properties))if(Q!==void 0)G[J]=UG(Q)}if(X.required&&Array.isArray(X.required)){let J=new Set(X.required);for(let Q of Object.keys(G))if(!J.has(Q))G[Q]=G[Q].optional()}else for(let J of Object.keys(G))G[J]=G[J].optional();if(X.additionalProperties===!1)return U.object(G);else return U.object(G).passthrough()}return $.refine((G)=>{if(typeof G!=="object"||G===null||Array.isArray(G))return!0;if(X.properties){for(let[J,Q]of Object.entries(X.properties))if(Q!==void 0){if(Object.getOwnPropertyDescriptor(G,J)!==void 0){if(!UG(Q).safeParse(G[J]).success)return!1}}}if(X.required&&Array.isArray(X.required)){for(let J of X.required)if(Object.getOwnPropertyDescriptor(G,J)===void 0)return!1}if(X.additionalProperties===!1&&X.properties){let J=new Set(Object.keys(X.properties));for(let Q in G)if(!J.has(Q))return!1}return!0},{message:"Object constraints validation failed"})}},BS8=class{apply($,Y){if(!Y.enum||Y.enum.length===0)return $;let X=Y.enum.filter((G)=>Array.isArray(G)||typeof G==="object"&&G!==null);if(X.length===0)return $;return $.refine((G)=>{if(typeof G!=="object"||G===null)return!0;return X.some((J)=>Ug(G,J))},{message:"Value must match one of the enum values"})}},OS8=class{apply($,Y){if(Y.const===void 0)return $;let X=Y.const;if(typeof X!=="object"||X===null)return $;return $.refine((G)=>Ug(G,X),{message:"Value must equal the const value"})}},ES8=class{apply($,Y){if(Y.description)$=$.describe(Y.description);return $}},MS8=class{apply($,Y){var X;let G=Y;if(!((X=G.required)==null?void 0:X.includes("__proto__"))||Y.type!==void 0)return $;return U.any().refine((J)=>this.validateRequired(J,G.required),{message:"Missing required properties"})}validateRequired($,Y){if(typeof $!=="object"||$===null||Array.isArray($))return!0;return Y.every((X)=>Object.prototype.hasOwnProperty.call($,X))}},RS8=class{apply($,Y){var X;let G=Y;if(G.contains===void 0)return $;let J=UG(G.contains),Q=(X=G.minContains)!=null?X:1,W=G.maxContains;return $.refine((Z)=>{if(!Array.isArray(Z))return!0;let K=0;for(let H of Z)if(O80(J,H))K++;if(K<Q)return!1;if(W!==void 0&&K>W)return!1;return!0},{message:"Array must contain required items matching the schema"})}},qS8=class{apply($,Y){let{default:X}=Y;if(X===void 0)return $;if(!$.safeParse(X).success)return $;return $.default(X)}},IS8,PS8;var s04=V0(()=>{O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();IS8=[new dC8,new cC8,new pC8,new lC8,new iC8,new YS8,new ZS8,new nC8,new rC8,new aC8,new sC8,new oC8,new tC8,new eC8,new $S8,new QS8,new XS8,new GS8,new JS8,new KS8,new US8,new WS8],PS8=[new MS8,new BS8,new OS8,new AS8,new FS8,new DS8,new NS8,new LS8,new RS8,new zS8,new VS8,new qS8,new ES8]});var F8,fv0,f1,SU=($)=>{switch(typeof $){case"undefined":return f1.undefined;case"string":return f1.string;case"number":return Number.isNaN($)?f1.nan:f1.number;case"boolean":return f1.boolean;case"function":return f1.function;case"bigint":return f1.bigint;case"symbol":return f1.symbol;case"object":if(Array.isArray($))return f1.array;if($===null)return f1.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return f1.promise;if(typeof Map<"u"&&$ instanceof Map)return f1.map;if(typeof Set<"u"&&$ instanceof Set)return f1.set;if(typeof Date<"u"&&$ instanceof Date)return f1.date;return f1.object;default:return f1.unknown}};var Hg=V0(()=>{(function($){$.assertEqual=(J)=>{};function Y(J){}$.assertIs=Y;function X(J){throw Error()}$.assertNever=X,$.arrayToEnum=(J)=>{let Q={};for(let W of J)Q[W]=W;return Q},$.getValidEnumValues=(J)=>{let Q=$.objectKeys(J).filter((Z)=>typeof J[J[Z]]!=="number"),W={};for(let Z of Q)W[Z]=J[Z];return $.objectValues(W)},$.objectValues=(J)=>{return $.objectKeys(J).map(function(Q){return J[Q]})},$.objectKeys=typeof Object.keys==="function"?(J)=>Object.keys(J):(J)=>{let Q=[];for(let W in J)if(Object.prototype.hasOwnProperty.call(J,W))Q.push(W);return Q},$.find=(J,Q)=>{for(let W of J)if(Q(W))return W;return},$.isInteger=typeof Number.isInteger==="function"?(J)=>Number.isInteger(J):(J)=>typeof J==="number"&&Number.isFinite(J)&&Math.floor(J)===J;function G(J,Q=" | "){return J.map((W)=>typeof W==="string"?`'${W}'`:W).join(Q)}$.joinValues=G,$.jsonStringifyReplacer=(J,Q)=>{if(typeof Q==="bigint")return Q.toString();return Q}})(F8||(F8={}));(function($){$.mergeShapes=(Y,X)=>{return{...Y,...X}}})(fv0||(fv0={}));f1=F8.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var B1,wS8=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")},MQ;var E80=V0(()=>{Hg();B1=F8.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"]);MQ=class MQ extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(X)=>{this.issues=[...this.issues,X]},this.addIssues=(X=[])=>{this.issues=[...this.issues,...X]};let Y=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,Y);else this.__proto__=Y;this.name="ZodError",this.issues=$}format($){let Y=$||function(J){return J.message},X={_errors:[]},G=(J)=>{for(let Q of J.issues)if(Q.code==="invalid_union")Q.unionErrors.map(G);else if(Q.code==="invalid_return_type")G(Q.returnTypeError);else if(Q.code==="invalid_arguments")G(Q.argumentsError);else if(Q.path.length===0)X._errors.push(Y(Q));else{let W=X,Z=0;while(Z<Q.path.length){let K=Q.path[Z];if(Z!==Q.path.length-1)W[K]=W[K]||{_errors:[]};else W[K]=W[K]||{_errors:[]},W[K]._errors.push(Y(Q));W=W[K],Z++}}};return G(this),X}static assert($){if(!($ instanceof MQ))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,F8.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(Y)=>Y.message){let Y={},X=[];for(let G of this.issues)if(G.path.length>0){let J=G.path[0];Y[J]=Y[J]||[],Y[J].push($(G))}else X.push($(G));return{formErrors:X,fieldErrors:Y}}get formErrors(){return this.flatten()}};MQ.create=($)=>{return new MQ($)}});var _S8=($,Y)=>{let X;switch($.code){case B1.invalid_type:if($.received===f1.undefined)X="Required";else X=`Expected ${$.expected}, received ${$.received}`;break;case B1.invalid_literal:X=`Invalid literal value, expected ${JSON.stringify($.expected,F8.jsonStringifyReplacer)}`;break;case B1.unrecognized_keys:X=`Unrecognized key(s) in object: ${F8.joinValues($.keys,", ")}`;break;case B1.invalid_union:X="Invalid input";break;case B1.invalid_union_discriminator:X=`Invalid discriminator value. Expected ${F8.joinValues($.options)}`;break;case B1.invalid_enum_value:X=`Invalid enum value. Expected ${F8.joinValues($.options)}, received '${$.received}'`;break;case B1.invalid_arguments:X="Invalid function arguments";break;case B1.invalid_return_type:X="Invalid function return type";break;case B1.invalid_date:X="Invalid date";break;case B1.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(X=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")X=`${X} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)X=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)X=`Invalid input: must end with "${$.validation.endsWith}"`;else F8.assertNever($.validation);else if($.validation!=="regex")X=`Invalid ${$.validation}`;else X="Invalid";break;case B1.too_small:if($.type==="array")X=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")X=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")X=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")X=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")X=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else X="Invalid input";break;case B1.too_big:if($.type==="array")X=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")X=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")X=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")X=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")X=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else X="Invalid input";break;case B1.custom:X="Invalid input";break;case B1.invalid_intersection_types:X="Intersection results could not be merged";break;case B1.not_multiple_of:X=`Number must be a multiple of ${$.multipleOf}`;break;case B1.not_finite:X="Number must be finite";break;default:X=Y.defaultError,F8.assertNever($)}return{message:X}},tz;var gv0=V0(()=>{E80();Hg();tz=_S8});function jS8($){o04=$}function F_(){return o04}var o04;var M80=V0(()=>{gv0();o04=tz});function t1($,Y){let X=F_(),G=zg({issueData:Y,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,X,X===tz?void 0:tz].filter((J)=>!!J)});$.common.issues.push(G)}class LX{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,Y){let X=[];for(let G of Y){if(G.status==="aborted")return o4;if(G.status==="dirty")$.dirty();X.push(G.value)}return{status:$.value,value:X}}static async mergeObjectAsync($,Y){let X=[];for(let G of Y){let J=await G.key,Q=await G.value;X.push({key:J,value:Q})}return LX.mergeObjectSync($,X)}static mergeObjectSync($,Y){let X={};for(let G of Y){let{key:J,value:Q}=G;if(J.status==="aborted")return o4;if(Q.status==="aborted")return o4;if(J.status==="dirty")$.dirty();if(Q.status==="dirty")$.dirty();if(J.value!=="__proto__"&&(typeof Q.value<"u"||G.alwaysSet))X[J.value]=Q.value}return{status:$.value,value:X}}}var zg=($)=>{let{data:Y,path:X,errorMaps:G,issueData:J}=$,Q=[...X,...J.path||[]],W={...J,path:Q};if(J.message!==void 0)return{...J,path:Q,message:J.message};let Z="",K=G.filter((H)=>!!H).slice().reverse();for(let H of K)Z=H(W,{data:Y,defaultError:Z}).message;return{...J,path:Q,message:Z}},TS8,o4,aO=($)=>({status:"dirty",value:$}),HG=($)=>({status:"valid",value:$}),R80=($)=>$.status==="aborted",q80=($)=>$.status==="dirty",UD=($)=>$.status==="valid",D_=($)=>typeof Promise<"u"&&$ instanceof Promise;var mv0=V0(()=>{M80();gv0();TS8=[];o4=Object.freeze({status:"aborted"})});var t04=()=>{};var T4;var e04=V0(()=>{(function($){$.errToObj=(Y)=>typeof Y==="string"?{message:Y}:Y||{},$.toString=(Y)=>typeof Y==="string"?Y:Y?.message})(T4||(T4={}))});class vK{constructor($,Y,X,G){this._cachedPath=[],this.parent=$,this.data=Y,this._path=X,this._key=G}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function x6($){if(!$)return{};let{errorMap:Y,invalid_type_error:X,required_error:G,description:J}=$;if(Y&&(X||G))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(Y)return{errorMap:Y,description:J};return{errorMap:(W,Z)=>{let{message:K}=$;if(W.code==="invalid_enum_value")return{message:K??Z.defaultError};if(typeof Z.data>"u")return{message:K??G??Z.defaultError};if(W.code!=="invalid_type")return{message:Z.defaultError};return{message:K??X??Z.defaultError}},description:J}}class s6{get description(){return this._def.description}_getType($){return SU($.data)}_getOrReturnCtx($,Y){return Y||{common:$.parent.common,data:$.data,parsedType:SU($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new LX,ctx:{common:$.parent.common,data:$.data,parsedType:SU($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let Y=this._parse($);if(D_(Y))throw Error("Synchronous parse encountered promise.");return Y}_parseAsync($){let Y=this._parse($);return Promise.resolve(Y)}parse($,Y){let X=this.safeParse($,Y);if(X.success)return X.data;throw X.error}safeParse($,Y){let X={common:{issues:[],async:Y?.async??!1,contextualErrorMap:Y?.errorMap},path:Y?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:SU($)},G=this._parseSync({data:$,path:X.path,parent:X});return $14(X,G)}"~validate"($){let Y={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:SU($)};if(!this["~standard"].async)try{let X=this._parseSync({data:$,path:[],parent:Y});return UD(X)?{value:X.value}:{issues:Y.common.issues}}catch(X){if(X?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;Y.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:Y}).then((X)=>UD(X)?{value:X.value}:{issues:Y.common.issues})}async parseAsync($,Y){let X=await this.safeParseAsync($,Y);if(X.success)return X.data;throw X.error}async safeParseAsync($,Y){let X={common:{issues:[],contextualErrorMap:Y?.errorMap,async:!0},path:Y?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:SU($)},G=this._parse({data:$,path:X.path,parent:X}),J=await(D_(G)?G:Promise.resolve(G));return $14(X,J)}refine($,Y){let X=(G)=>{if(typeof Y==="string"||typeof Y>"u")return{message:Y};else if(typeof Y==="function")return Y(G);else return Y};return this._refinement((G,J)=>{let Q=$(G),W=()=>J.addIssue({code:B1.custom,...X(G)});if(typeof Promise<"u"&&Q instanceof Promise)return Q.then((Z)=>{if(!Z)return W(),!1;else return!0});if(!Q)return W(),!1;else return!0})}refinement($,Y){return this._refinement((X,G)=>{if(!$(X))return G.addIssue(typeof Y==="function"?Y(X,G):Y),!1;else return!0})}_refinement($){return new xK({schema:this,typeName:Q6.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,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:(Y)=>this["~validate"](Y)}}optional(){return kK.create(this,this._def)}nullable(){return $V.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return SK.create(this)}promise(){return eO.create(this,this._def)}or($){return M_.create([this,$],this._def)}and($){return R_.create(this,$,this._def)}transform($){return new xK({...x6(this._def),schema:this,typeName:Q6.ZodEffects,effect:{type:"transform",transform:$}})}default($){let Y=typeof $==="function"?$:()=>$;return new w_({...x6(this._def),innerType:this,defaultValue:Y,typeName:Q6.ZodDefault})}brand(){return new P80({typeName:Q6.ZodBranded,type:this,...x6(this._def)})}catch($){let Y=typeof $==="function"?$:()=>$;return new __({...x6(this._def),innerType:this,catchValue:Y,typeName:Q6.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return Lg.create(this,$)}readonly(){return j_.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function G14($){let Y="[0-5]\\d";if($.precision)Y=`${Y}\\.\\d{${$.precision}}`;else if($.precision==null)Y=`${Y}(\\.\\d+)?`;let X=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${Y})${X}`}function iS8($){return new RegExp(`^${G14($)}$`)}function J14($){let Y=`${X14}T${G14($)}`,X=[];if(X.push($.local?"Z?":"Z"),$.offset)X.push("([+-]\\d{2}:?\\d{2})");return Y=`${Y}(${X.join("|")})`,new RegExp(`^${Y}$`)}function nS8($,Y){if((Y==="v4"||!Y)&&gS8.test($))return!0;if((Y==="v6"||!Y)&&uS8.test($))return!0;return!1}function rS8($,Y){if(!yS8.test($))return!1;try{let[X]=$.split(".");if(!X)return!1;let G=X.replace(/-/g,"+").replace(/_/g,"/").padEnd(X.length+(4-X.length%4)%4,"="),J=JSON.parse(atob(G));if(typeof J!=="object"||J===null)return!1;if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(Y&&J.alg!==Y)return!1;return!0}catch{return!1}}function aS8($,Y){if((Y==="v4"||!Y)&&mS8.test($))return!0;if((Y==="v6"||!Y)&&pS8.test($))return!0;return!1}function sS8($,Y){let X=($.toString().split(".")[1]||"").length,G=(Y.toString().split(".")[1]||"").length,J=X>G?X:G,Q=Number.parseInt($.toFixed(J).replace(".","")),W=Number.parseInt(Y.toFixed(J).replace(".",""));return Q%W/10**J}function N_($){if($ instanceof y7){let Y={};for(let X in $.shape){let G=$.shape[X];Y[X]=kK.create(N_(G))}return new y7({...$._def,shape:()=>Y})}else if($ instanceof SK)return new SK({...$._def,type:N_($.element)});else if($ instanceof kK)return kK.create(N_($.unwrap()));else if($ instanceof $V)return $V.create(N_($.unwrap()));else if($ instanceof vU)return vU.create($.items.map((Y)=>N_(Y)));else return $}function pv0($,Y){let X=SU($),G=SU(Y);if($===Y)return{valid:!0,data:$};else if(X===f1.object&&G===f1.object){let J=F8.objectKeys(Y),Q=F8.objectKeys($).filter((Z)=>J.indexOf(Z)!==-1),W={...$,...Y};for(let Z of Q){let K=pv0($[Z],Y[Z]);if(!K.valid)return{valid:!1};W[Z]=K.data}return{valid:!0,data:W}}else if(X===f1.array&&G===f1.array){if($.length!==Y.length)return{valid:!1};let J=[];for(let Q=0;Q<$.length;Q++){let W=$[Q],Z=Y[Q],K=pv0(W,Z);if(!K.valid)return{valid:!1};J.push(K.data)}return{valid:!0,data:J}}else if(X===f1.date&&G===f1.date&&+$===+Y)return{valid:!0,data:$};else return{valid:!1}}function Q14($,Y){return new AD({values:$,typeName:Q6.ZodEnum,...x6(Y)})}function Y14($,Y){let X=typeof $==="function"?$(Y):typeof $==="string"?{message:$}:$;return typeof X==="string"?{message:X}:X}function W14($,Y={},X){if($)return oO.create().superRefine((G,J)=>{let Q=$(G);if(Q instanceof Promise)return Q.then((W)=>{if(!W){let Z=Y14(Y,G),K=Z.fatal??X??!0;J.addIssue({code:"custom",...Z,fatal:K})}});if(!Q){let W=Y14(Y,G),Z=W.fatal??X??!0;J.addIssue({code:"custom",...W,fatal:Z})}return});return oO.create()}var $14=($,Y)=>{if(UD(Y))return{success:!0,data:Y.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let X=new MQ($.common.issues);return this._error=X,this._error}}}},CS8,SS8,kS8,vS8,xS8,yS8,bS8,hS8,fS8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",uv0,gS8,mS8,uS8,pS8,dS8,cS8,X14="((\\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])))",lS8,CK,zD,VD,B_,sO,Vg,O_,E_,oO,HD,kU,Ag,SK,y7,M_,ez=($)=>{if($ instanceof q_)return ez($.schema);else if($ instanceof xK)return ez($.innerType());else if($ instanceof I_)return[$.value];else if($ instanceof AD)return $.options;else if($ instanceof P_)return F8.objectValues($.enum);else if($ instanceof w_)return ez($._def.innerType);else if($ instanceof O_)return[void 0];else if($ instanceof E_)return[null];else if($ instanceof kK)return[void 0,...ez($.unwrap())];else if($ instanceof $V)return[null,...ez($.unwrap())];else if($ instanceof P80)return ez($.unwrap());else if($ instanceof j_)return ez($.unwrap());else if($ instanceof __)return ez($._def.innerType);else return[]},I80,R_,vU,Fg,Dg,tO,L_,q_,I_,AD,P_,eO,xK,kK,$V,w_,__,Ng,oS8,P80,Lg,j_,tS8,Q6,eS8=($,Y={message:`Input not instance of ${$.name}`})=>W14((X)=>X instanceof $,Y),Z14,K14,$k8,Yk8,U14,Xk8,Gk8,Jk8,Qk8,Wk8,Zk8,Kk8,Uk8,Hk8,zk8,Vk8,Ak8,Fk8,Dk8,Nk8,Lk8,Bk8,Ok8,Ek8,Mk8,Rk8,qk8,Ik8,Pk8,wk8,_k8,jk8,Tk8,Ck8,Sk8=()=>Z14().optional(),kk8=()=>K14().optional(),vk8=()=>U14().optional(),xk8,yk8;var H14=V0(()=>{E80();M80();e04();mv0();Hg();CS8=/^c[^\s-]{8,}$/i,SS8=/^[0-9a-z]+$/,kS8=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vS8=/^[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,xS8=/^[a-z0-9_-]{21}$/i,yS8=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,bS8=/^[-+]?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)?)??$/,hS8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,gS8=/^(?:(?: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])$/,mS8=/^(?:(?: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])$/,uS8=/^(([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]))$/,pS8=/^(([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])$/,dS8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,cS8=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,lS8=new RegExp(`^${X14}$`);CK=class CK extends s6{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==f1.string){let J=this._getOrReturnCtx($);return t1(J,{code:B1.invalid_type,expected:f1.string,received:J.parsedType}),o4}let X=new LX,G=void 0;for(let J of this._def.checks)if(J.kind==="min"){if($.data.length<J.value)G=this._getOrReturnCtx($,G),t1(G,{code:B1.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),X.dirty()}else if(J.kind==="max"){if($.data.length>J.value)G=this._getOrReturnCtx($,G),t1(G,{code:B1.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),X.dirty()}else if(J.kind==="length"){let Q=$.data.length>J.value,W=$.data.length<J.value;if(Q||W){if(G=this._getOrReturnCtx($,G),Q)t1(G,{code:B1.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});else if(W)t1(G,{code:B1.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});X.dirty()}}else if(J.kind==="email"){if(!hS8.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"email",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="emoji"){if(!uv0)uv0=new RegExp(fS8,"u");if(!uv0.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"emoji",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="uuid"){if(!vS8.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"uuid",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="nanoid"){if(!xS8.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"nanoid",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cuid"){if(!CS8.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"cuid",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cuid2"){if(!SS8.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"cuid2",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="ulid"){if(!kS8.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"ulid",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="url")try{new URL($.data)}catch{G=this._getOrReturnCtx($,G),t1(G,{validation:"url",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="regex"){if(J.regex.lastIndex=0,!J.regex.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"regex",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="trim")$.data=$.data.trim();else if(J.kind==="includes"){if(!$.data.includes(J.value,J.position))G=this._getOrReturnCtx($,G),t1(G,{code:B1.invalid_string,validation:{includes:J.value,position:J.position},message:J.message}),X.dirty()}else if(J.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(J.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(J.kind==="startsWith"){if(!$.data.startsWith(J.value))G=this._getOrReturnCtx($,G),t1(G,{code:B1.invalid_string,validation:{startsWith:J.value},message:J.message}),X.dirty()}else if(J.kind==="endsWith"){if(!$.data.endsWith(J.value))G=this._getOrReturnCtx($,G),t1(G,{code:B1.invalid_string,validation:{endsWith:J.value},message:J.message}),X.dirty()}else if(J.kind==="datetime"){if(!J14(J).test($.data))G=this._getOrReturnCtx($,G),t1(G,{code:B1.invalid_string,validation:"datetime",message:J.message}),X.dirty()}else if(J.kind==="date"){if(!lS8.test($.data))G=this._getOrReturnCtx($,G),t1(G,{code:B1.invalid_string,validation:"date",message:J.message}),X.dirty()}else if(J.kind==="time"){if(!iS8(J).test($.data))G=this._getOrReturnCtx($,G),t1(G,{code:B1.invalid_string,validation:"time",message:J.message}),X.dirty()}else if(J.kind==="duration"){if(!bS8.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"duration",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="ip"){if(!nS8($.data,J.version))G=this._getOrReturnCtx($,G),t1(G,{validation:"ip",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="jwt"){if(!rS8($.data,J.alg))G=this._getOrReturnCtx($,G),t1(G,{validation:"jwt",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cidr"){if(!aS8($.data,J.version))G=this._getOrReturnCtx($,G),t1(G,{validation:"cidr",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="base64"){if(!dS8.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"base64",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="base64url"){if(!cS8.test($.data))G=this._getOrReturnCtx($,G),t1(G,{validation:"base64url",code:B1.invalid_string,message:J.message}),X.dirty()}else F8.assertNever(J);return{status:X.value,value:$.data}}_regex($,Y,X){return this.refinement((G)=>$.test(G),{validation:Y,code:B1.invalid_string,...T4.errToObj(X)})}_addCheck($){return new CK({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...T4.errToObj($)})}url($){return this._addCheck({kind:"url",...T4.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...T4.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...T4.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...T4.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...T4.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...T4.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...T4.errToObj($)})}base64($){return this._addCheck({kind:"base64",...T4.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...T4.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...T4.errToObj($)})}ip($){return this._addCheck({kind:"ip",...T4.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...T4.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...T4.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...T4.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...T4.errToObj($)})}regex($,Y){return this._addCheck({kind:"regex",regex:$,...T4.errToObj(Y)})}includes($,Y){return this._addCheck({kind:"includes",value:$,position:Y?.position,...T4.errToObj(Y?.message)})}startsWith($,Y){return this._addCheck({kind:"startsWith",value:$,...T4.errToObj(Y)})}endsWith($,Y){return this._addCheck({kind:"endsWith",value:$,...T4.errToObj(Y)})}min($,Y){return this._addCheck({kind:"min",value:$,...T4.errToObj(Y)})}max($,Y){return this._addCheck({kind:"max",value:$,...T4.errToObj(Y)})}length($,Y){return this._addCheck({kind:"length",value:$,...T4.errToObj(Y)})}nonempty($){return this.min(1,T4.errToObj($))}trim(){return new CK({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new CK({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new CK({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxLength(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}};CK.create=($)=>{return new CK({checks:[],typeName:Q6.ZodString,coerce:$?.coerce??!1,...x6($)})};zD=class zD extends s6{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==f1.number){let J=this._getOrReturnCtx($);return t1(J,{code:B1.invalid_type,expected:f1.number,received:J.parsedType}),o4}let X=void 0,G=new LX;for(let J of this._def.checks)if(J.kind==="int"){if(!F8.isInteger($.data))X=this._getOrReturnCtx($,X),t1(X,{code:B1.invalid_type,expected:"integer",received:"float",message:J.message}),G.dirty()}else if(J.kind==="min"){if(J.inclusive?$.data<J.value:$.data<=J.value)X=this._getOrReturnCtx($,X),t1(X,{code:B1.too_small,minimum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),G.dirty()}else if(J.kind==="max"){if(J.inclusive?$.data>J.value:$.data>=J.value)X=this._getOrReturnCtx($,X),t1(X,{code:B1.too_big,maximum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),G.dirty()}else if(J.kind==="multipleOf"){if(sS8($.data,J.value)!==0)X=this._getOrReturnCtx($,X),t1(X,{code:B1.not_multiple_of,multipleOf:J.value,message:J.message}),G.dirty()}else if(J.kind==="finite"){if(!Number.isFinite($.data))X=this._getOrReturnCtx($,X),t1(X,{code:B1.not_finite,message:J.message}),G.dirty()}else F8.assertNever(J);return{status:G.value,value:$.data}}gte($,Y){return this.setLimit("min",$,!0,T4.toString(Y))}gt($,Y){return this.setLimit("min",$,!1,T4.toString(Y))}lte($,Y){return this.setLimit("max",$,!0,T4.toString(Y))}lt($,Y){return this.setLimit("max",$,!1,T4.toString(Y))}setLimit($,Y,X,G){return new zD({...this._def,checks:[...this._def.checks,{kind:$,value:Y,inclusive:X,message:T4.toString(G)}]})}_addCheck($){return new zD({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:T4.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:T4.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:T4.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:T4.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:T4.toString($)})}multipleOf($,Y){return this._addCheck({kind:"multipleOf",value:$,message:T4.toString(Y)})}finite($){return this._addCheck({kind:"finite",message:T4.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:T4.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:T4.toString($)})}get minValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&F8.isInteger($.value))}get isFinite(){let $=null,Y=null;for(let X of this._def.checks)if(X.kind==="finite"||X.kind==="int"||X.kind==="multipleOf")return!0;else if(X.kind==="min"){if(Y===null||X.value>Y)Y=X.value}else if(X.kind==="max"){if($===null||X.value<$)$=X.value}return Number.isFinite(Y)&&Number.isFinite($)}};zD.create=($)=>{return new zD({checks:[],typeName:Q6.ZodNumber,coerce:$?.coerce||!1,...x6($)})};VD=class VD extends s6{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==f1.bigint)return this._getInvalidInput($);let X=void 0,G=new LX;for(let J of this._def.checks)if(J.kind==="min"){if(J.inclusive?$.data<J.value:$.data<=J.value)X=this._getOrReturnCtx($,X),t1(X,{code:B1.too_small,type:"bigint",minimum:J.value,inclusive:J.inclusive,message:J.message}),G.dirty()}else if(J.kind==="max"){if(J.inclusive?$.data>J.value:$.data>=J.value)X=this._getOrReturnCtx($,X),t1(X,{code:B1.too_big,type:"bigint",maximum:J.value,inclusive:J.inclusive,message:J.message}),G.dirty()}else if(J.kind==="multipleOf"){if($.data%J.value!==BigInt(0))X=this._getOrReturnCtx($,X),t1(X,{code:B1.not_multiple_of,multipleOf:J.value,message:J.message}),G.dirty()}else F8.assertNever(J);return{status:G.value,value:$.data}}_getInvalidInput($){let Y=this._getOrReturnCtx($);return t1(Y,{code:B1.invalid_type,expected:f1.bigint,received:Y.parsedType}),o4}gte($,Y){return this.setLimit("min",$,!0,T4.toString(Y))}gt($,Y){return this.setLimit("min",$,!1,T4.toString(Y))}lte($,Y){return this.setLimit("max",$,!0,T4.toString(Y))}lt($,Y){return this.setLimit("max",$,!1,T4.toString(Y))}setLimit($,Y,X,G){return new VD({...this._def,checks:[...this._def.checks,{kind:$,value:Y,inclusive:X,message:T4.toString(G)}]})}_addCheck($){return new VD({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:T4.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:T4.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:T4.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:T4.toString($)})}multipleOf($,Y){return this._addCheck({kind:"multipleOf",value:$,message:T4.toString(Y)})}get minValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}};VD.create=($)=>{return new VD({checks:[],typeName:Q6.ZodBigInt,coerce:$?.coerce??!1,...x6($)})};B_=class B_ extends s6{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==f1.boolean){let X=this._getOrReturnCtx($);return t1(X,{code:B1.invalid_type,expected:f1.boolean,received:X.parsedType}),o4}return HG($.data)}};B_.create=($)=>{return new B_({typeName:Q6.ZodBoolean,coerce:$?.coerce||!1,...x6($)})};sO=class sO extends s6{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==f1.date){let J=this._getOrReturnCtx($);return t1(J,{code:B1.invalid_type,expected:f1.date,received:J.parsedType}),o4}if(Number.isNaN($.data.getTime())){let J=this._getOrReturnCtx($);return t1(J,{code:B1.invalid_date}),o4}let X=new LX,G=void 0;for(let J of this._def.checks)if(J.kind==="min"){if($.data.getTime()<J.value)G=this._getOrReturnCtx($,G),t1(G,{code:B1.too_small,message:J.message,inclusive:!0,exact:!1,minimum:J.value,type:"date"}),X.dirty()}else if(J.kind==="max"){if($.data.getTime()>J.value)G=this._getOrReturnCtx($,G),t1(G,{code:B1.too_big,message:J.message,inclusive:!0,exact:!1,maximum:J.value,type:"date"}),X.dirty()}else F8.assertNever(J);return{status:X.value,value:new Date($.data.getTime())}}_addCheck($){return new sO({...this._def,checks:[...this._def.checks,$]})}min($,Y){return this._addCheck({kind:"min",value:$.getTime(),message:T4.toString(Y)})}max($,Y){return this._addCheck({kind:"max",value:$.getTime(),message:T4.toString(Y)})}get minDate(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $!=null?new Date($):null}};sO.create=($)=>{return new sO({checks:[],coerce:$?.coerce||!1,typeName:Q6.ZodDate,...x6($)})};Vg=class Vg extends s6{_parse($){if(this._getType($)!==f1.symbol){let X=this._getOrReturnCtx($);return t1(X,{code:B1.invalid_type,expected:f1.symbol,received:X.parsedType}),o4}return HG($.data)}};Vg.create=($)=>{return new Vg({typeName:Q6.ZodSymbol,...x6($)})};O_=class O_ extends s6{_parse($){if(this._getType($)!==f1.undefined){let X=this._getOrReturnCtx($);return t1(X,{code:B1.invalid_type,expected:f1.undefined,received:X.parsedType}),o4}return HG($.data)}};O_.create=($)=>{return new O_({typeName:Q6.ZodUndefined,...x6($)})};E_=class E_ extends s6{_parse($){if(this._getType($)!==f1.null){let X=this._getOrReturnCtx($);return t1(X,{code:B1.invalid_type,expected:f1.null,received:X.parsedType}),o4}return HG($.data)}};E_.create=($)=>{return new E_({typeName:Q6.ZodNull,...x6($)})};oO=class oO extends s6{constructor(){super(...arguments);this._any=!0}_parse($){return HG($.data)}};oO.create=($)=>{return new oO({typeName:Q6.ZodAny,...x6($)})};HD=class HD extends s6{constructor(){super(...arguments);this._unknown=!0}_parse($){return HG($.data)}};HD.create=($)=>{return new HD({typeName:Q6.ZodUnknown,...x6($)})};kU=class kU extends s6{_parse($){let Y=this._getOrReturnCtx($);return t1(Y,{code:B1.invalid_type,expected:f1.never,received:Y.parsedType}),o4}};kU.create=($)=>{return new kU({typeName:Q6.ZodNever,...x6($)})};Ag=class Ag extends s6{_parse($){if(this._getType($)!==f1.undefined){let X=this._getOrReturnCtx($);return t1(X,{code:B1.invalid_type,expected:f1.void,received:X.parsedType}),o4}return HG($.data)}};Ag.create=($)=>{return new Ag({typeName:Q6.ZodVoid,...x6($)})};SK=class SK extends s6{_parse($){let{ctx:Y,status:X}=this._processInputParams($),G=this._def;if(Y.parsedType!==f1.array)return t1(Y,{code:B1.invalid_type,expected:f1.array,received:Y.parsedType}),o4;if(G.exactLength!==null){let Q=Y.data.length>G.exactLength.value,W=Y.data.length<G.exactLength.value;if(Q||W)t1(Y,{code:Q?B1.too_big:B1.too_small,minimum:W?G.exactLength.value:void 0,maximum:Q?G.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:G.exactLength.message}),X.dirty()}if(G.minLength!==null){if(Y.data.length<G.minLength.value)t1(Y,{code:B1.too_small,minimum:G.minLength.value,type:"array",inclusive:!0,exact:!1,message:G.minLength.message}),X.dirty()}if(G.maxLength!==null){if(Y.data.length>G.maxLength.value)t1(Y,{code:B1.too_big,maximum:G.maxLength.value,type:"array",inclusive:!0,exact:!1,message:G.maxLength.message}),X.dirty()}if(Y.common.async)return Promise.all([...Y.data].map((Q,W)=>{return G.type._parseAsync(new vK(Y,Q,Y.path,W))})).then((Q)=>{return LX.mergeArray(X,Q)});let J=[...Y.data].map((Q,W)=>{return G.type._parseSync(new vK(Y,Q,Y.path,W))});return LX.mergeArray(X,J)}get element(){return this._def.type}min($,Y){return new SK({...this._def,minLength:{value:$,message:T4.toString(Y)}})}max($,Y){return new SK({...this._def,maxLength:{value:$,message:T4.toString(Y)}})}length($,Y){return new SK({...this._def,exactLength:{value:$,message:T4.toString(Y)}})}nonempty($){return this.min(1,$)}};SK.create=($,Y)=>{return new SK({type:$,minLength:null,maxLength:null,exactLength:null,typeName:Q6.ZodArray,...x6(Y)})};y7=class y7 extends s6{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),Y=F8.objectKeys($);return this._cached={shape:$,keys:Y},this._cached}_parse($){if(this._getType($)!==f1.object){let K=this._getOrReturnCtx($);return t1(K,{code:B1.invalid_type,expected:f1.object,received:K.parsedType}),o4}let{status:X,ctx:G}=this._processInputParams($),{shape:J,keys:Q}=this._getCached(),W=[];if(!(this._def.catchall instanceof kU&&this._def.unknownKeys==="strip")){for(let K in G.data)if(!Q.includes(K))W.push(K)}let Z=[];for(let K of Q){let H=J[K],z=G.data[K];Z.push({key:{status:"valid",value:K},value:H._parse(new vK(G,z,G.path,K)),alwaysSet:K in G.data})}if(this._def.catchall instanceof kU){let K=this._def.unknownKeys;if(K==="passthrough")for(let H of W)Z.push({key:{status:"valid",value:H},value:{status:"valid",value:G.data[H]}});else if(K==="strict"){if(W.length>0)t1(G,{code:B1.unrecognized_keys,keys:W}),X.dirty()}else if(K==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let K=this._def.catchall;for(let H of W){let z=G.data[H];Z.push({key:{status:"valid",value:H},value:K._parse(new vK(G,z,G.path,H)),alwaysSet:H in G.data})}}if(G.common.async)return Promise.resolve().then(async()=>{let K=[];for(let H of Z){let z=await H.key,V=await H.value;K.push({key:z,value:V,alwaysSet:H.alwaysSet})}return K}).then((K)=>{return LX.mergeObjectSync(X,K)});else return LX.mergeObjectSync(X,Z)}get shape(){return this._def.shape()}strict($){return T4.errToObj,new y7({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(Y,X)=>{let G=this._def.errorMap?.(Y,X).message??X.defaultError;if(Y.code==="unrecognized_keys")return{message:T4.errToObj($).message??G};return{message:G}}}:{}})}strip(){return new y7({...this._def,unknownKeys:"strip"})}passthrough(){return new y7({...this._def,unknownKeys:"passthrough"})}extend($){return new y7({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new y7({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:Q6.ZodObject})}setKey($,Y){return this.augment({[$]:Y})}catchall($){return new y7({...this._def,catchall:$})}pick($){let Y={};for(let X of F8.objectKeys($))if($[X]&&this.shape[X])Y[X]=this.shape[X];return new y7({...this._def,shape:()=>Y})}omit($){let Y={};for(let X of F8.objectKeys(this.shape))if(!$[X])Y[X]=this.shape[X];return new y7({...this._def,shape:()=>Y})}deepPartial(){return N_(this)}partial($){let Y={};for(let X of F8.objectKeys(this.shape)){let G=this.shape[X];if($&&!$[X])Y[X]=G;else Y[X]=G.optional()}return new y7({...this._def,shape:()=>Y})}required($){let Y={};for(let X of F8.objectKeys(this.shape))if($&&!$[X])Y[X]=this.shape[X];else{let J=this.shape[X];while(J instanceof kK)J=J._def.innerType;Y[X]=J}return new y7({...this._def,shape:()=>Y})}keyof(){return Q14(F8.objectKeys(this.shape))}};y7.create=($,Y)=>{return new y7({shape:()=>$,unknownKeys:"strip",catchall:kU.create(),typeName:Q6.ZodObject,...x6(Y)})};y7.strictCreate=($,Y)=>{return new y7({shape:()=>$,unknownKeys:"strict",catchall:kU.create(),typeName:Q6.ZodObject,...x6(Y)})};y7.lazycreate=($,Y)=>{return new y7({shape:$,unknownKeys:"strip",catchall:kU.create(),typeName:Q6.ZodObject,...x6(Y)})};M_=class M_ extends s6{_parse($){let{ctx:Y}=this._processInputParams($),X=this._def.options;function G(J){for(let W of J)if(W.result.status==="valid")return W.result;for(let W of J)if(W.result.status==="dirty")return Y.common.issues.push(...W.ctx.common.issues),W.result;let Q=J.map((W)=>new MQ(W.ctx.common.issues));return t1(Y,{code:B1.invalid_union,unionErrors:Q}),o4}if(Y.common.async)return Promise.all(X.map(async(J)=>{let Q={...Y,common:{...Y.common,issues:[]},parent:null};return{result:await J._parseAsync({data:Y.data,path:Y.path,parent:Q}),ctx:Q}})).then(G);else{let J=void 0,Q=[];for(let Z of X){let K={...Y,common:{...Y.common,issues:[]},parent:null},H=Z._parseSync({data:Y.data,path:Y.path,parent:K});if(H.status==="valid")return H;else if(H.status==="dirty"&&!J)J={result:H,ctx:K};if(K.common.issues.length)Q.push(K.common.issues)}if(J)return Y.common.issues.push(...J.ctx.common.issues),J.result;let W=Q.map((Z)=>new MQ(Z));return t1(Y,{code:B1.invalid_union,unionErrors:W}),o4}}get options(){return this._def.options}};M_.create=($,Y)=>{return new M_({options:$,typeName:Q6.ZodUnion,...x6(Y)})};I80=class I80 extends s6{_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==f1.object)return t1(Y,{code:B1.invalid_type,expected:f1.object,received:Y.parsedType}),o4;let X=this.discriminator,G=Y.data[X],J=this.optionsMap.get(G);if(!J)return t1(Y,{code:B1.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[X]}),o4;if(Y.common.async)return J._parseAsync({data:Y.data,path:Y.path,parent:Y});else return J._parseSync({data:Y.data,path:Y.path,parent:Y})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,Y,X){let G=new Map;for(let J of Y){let Q=ez(J.shape[$]);if(!Q.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let W of Q){if(G.has(W))throw Error(`Discriminator property ${String($)} has duplicate value ${String(W)}`);G.set(W,J)}}return new I80({typeName:Q6.ZodDiscriminatedUnion,discriminator:$,options:Y,optionsMap:G,...x6(X)})}};R_=class R_ extends s6{_parse($){let{status:Y,ctx:X}=this._processInputParams($),G=(J,Q)=>{if(R80(J)||R80(Q))return o4;let W=pv0(J.value,Q.value);if(!W.valid)return t1(X,{code:B1.invalid_intersection_types}),o4;if(q80(J)||q80(Q))Y.dirty();return{status:Y.value,value:W.data}};if(X.common.async)return Promise.all([this._def.left._parseAsync({data:X.data,path:X.path,parent:X}),this._def.right._parseAsync({data:X.data,path:X.path,parent:X})]).then(([J,Q])=>G(J,Q));else return G(this._def.left._parseSync({data:X.data,path:X.path,parent:X}),this._def.right._parseSync({data:X.data,path:X.path,parent:X}))}};R_.create=($,Y,X)=>{return new R_({left:$,right:Y,typeName:Q6.ZodIntersection,...x6(X)})};vU=class vU extends s6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==f1.array)return t1(X,{code:B1.invalid_type,expected:f1.array,received:X.parsedType}),o4;if(X.data.length<this._def.items.length)return t1(X,{code:B1.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o4;if(!this._def.rest&&X.data.length>this._def.items.length)t1(X,{code:B1.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Y.dirty();let J=[...X.data].map((Q,W)=>{let Z=this._def.items[W]||this._def.rest;if(!Z)return null;return Z._parse(new vK(X,Q,X.path,W))}).filter((Q)=>!!Q);if(X.common.async)return Promise.all(J).then((Q)=>{return LX.mergeArray(Y,Q)});else return LX.mergeArray(Y,J)}get items(){return this._def.items}rest($){return new vU({...this._def,rest:$})}};vU.create=($,Y)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new vU({items:$,typeName:Q6.ZodTuple,rest:null,...x6(Y)})};Fg=class Fg extends s6{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==f1.object)return t1(X,{code:B1.invalid_type,expected:f1.object,received:X.parsedType}),o4;let G=[],J=this._def.keyType,Q=this._def.valueType;for(let W in X.data)G.push({key:J._parse(new vK(X,W,X.path,W)),value:Q._parse(new vK(X,X.data[W],X.path,W)),alwaysSet:W in X.data});if(X.common.async)return LX.mergeObjectAsync(Y,G);else return LX.mergeObjectSync(Y,G)}get element(){return this._def.valueType}static create($,Y,X){if(Y instanceof s6)return new Fg({keyType:$,valueType:Y,typeName:Q6.ZodRecord,...x6(X)});return new Fg({keyType:CK.create(),valueType:$,typeName:Q6.ZodRecord,...x6(Y)})}};Dg=class Dg extends s6{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==f1.map)return t1(X,{code:B1.invalid_type,expected:f1.map,received:X.parsedType}),o4;let G=this._def.keyType,J=this._def.valueType,Q=[...X.data.entries()].map(([W,Z],K)=>{return{key:G._parse(new vK(X,W,X.path,[K,"key"])),value:J._parse(new vK(X,Z,X.path,[K,"value"]))}});if(X.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let Z of Q){let K=await Z.key,H=await Z.value;if(K.status==="aborted"||H.status==="aborted")return o4;if(K.status==="dirty"||H.status==="dirty")Y.dirty();W.set(K.value,H.value)}return{status:Y.value,value:W}})}else{let W=new Map;for(let Z of Q){let{key:K,value:H}=Z;if(K.status==="aborted"||H.status==="aborted")return o4;if(K.status==="dirty"||H.status==="dirty")Y.dirty();W.set(K.value,H.value)}return{status:Y.value,value:W}}}};Dg.create=($,Y,X)=>{return new Dg({valueType:Y,keyType:$,typeName:Q6.ZodMap,...x6(X)})};tO=class tO extends s6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==f1.set)return t1(X,{code:B1.invalid_type,expected:f1.set,received:X.parsedType}),o4;let G=this._def;if(G.minSize!==null){if(X.data.size<G.minSize.value)t1(X,{code:B1.too_small,minimum:G.minSize.value,type:"set",inclusive:!0,exact:!1,message:G.minSize.message}),Y.dirty()}if(G.maxSize!==null){if(X.data.size>G.maxSize.value)t1(X,{code:B1.too_big,maximum:G.maxSize.value,type:"set",inclusive:!0,exact:!1,message:G.maxSize.message}),Y.dirty()}let J=this._def.valueType;function Q(Z){let K=new Set;for(let H of Z){if(H.status==="aborted")return o4;if(H.status==="dirty")Y.dirty();K.add(H.value)}return{status:Y.value,value:K}}let W=[...X.data.values()].map((Z,K)=>J._parse(new vK(X,Z,X.path,K)));if(X.common.async)return Promise.all(W).then((Z)=>Q(Z));else return Q(W)}min($,Y){return new tO({...this._def,minSize:{value:$,message:T4.toString(Y)}})}max($,Y){return new tO({...this._def,maxSize:{value:$,message:T4.toString(Y)}})}size($,Y){return this.min($,Y).max($,Y)}nonempty($){return this.min(1,$)}};tO.create=($,Y)=>{return new tO({valueType:$,minSize:null,maxSize:null,typeName:Q6.ZodSet,...x6(Y)})};L_=class L_ extends s6{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==f1.function)return t1(Y,{code:B1.invalid_type,expected:f1.function,received:Y.parsedType}),o4;function X(W,Z){return zg({data:W,path:Y.path,errorMaps:[Y.common.contextualErrorMap,Y.schemaErrorMap,F_(),tz].filter((K)=>!!K),issueData:{code:B1.invalid_arguments,argumentsError:Z}})}function G(W,Z){return zg({data:W,path:Y.path,errorMaps:[Y.common.contextualErrorMap,Y.schemaErrorMap,F_(),tz].filter((K)=>!!K),issueData:{code:B1.invalid_return_type,returnTypeError:Z}})}let J={errorMap:Y.common.contextualErrorMap},Q=Y.data;if(this._def.returns instanceof eO){let W=this;return HG(async function(...Z){let K=new MQ([]),H=await W._def.args.parseAsync(Z,J).catch((A)=>{throw K.addIssue(X(Z,A)),K}),z=await Reflect.apply(Q,this,H);return await W._def.returns._def.type.parseAsync(z,J).catch((A)=>{throw K.addIssue(G(z,A)),K})})}else{let W=this;return HG(function(...Z){let K=W._def.args.safeParse(Z,J);if(!K.success)throw new MQ([X(Z,K.error)]);let H=Reflect.apply(Q,this,K.data),z=W._def.returns.safeParse(H,J);if(!z.success)throw new MQ([G(H,z.error)]);return z.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new L_({...this._def,args:vU.create($).rest(HD.create())})}returns($){return new L_({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,Y,X){return new L_({args:$?$:vU.create([]).rest(HD.create()),returns:Y||HD.create(),typeName:Q6.ZodFunction,...x6(X)})}};q_=class q_ extends s6{get schema(){return this._def.getter()}_parse($){let{ctx:Y}=this._processInputParams($);return this._def.getter()._parse({data:Y.data,path:Y.path,parent:Y})}};q_.create=($,Y)=>{return new q_({getter:$,typeName:Q6.ZodLazy,...x6(Y)})};I_=class I_ extends s6{_parse($){if($.data!==this._def.value){let Y=this._getOrReturnCtx($);return t1(Y,{received:Y.data,code:B1.invalid_literal,expected:this._def.value}),o4}return{status:"valid",value:$.data}}get value(){return this._def.value}};I_.create=($,Y)=>{return new I_({value:$,typeName:Q6.ZodLiteral,...x6(Y)})};AD=class AD extends s6{_parse($){if(typeof $.data!=="string"){let Y=this._getOrReturnCtx($),X=this._def.values;return t1(Y,{expected:F8.joinValues(X),received:Y.parsedType,code:B1.invalid_type}),o4}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let Y=this._getOrReturnCtx($),X=this._def.values;return t1(Y,{received:Y.data,code:B1.invalid_enum_value,options:X}),o4}return HG($.data)}get options(){return this._def.values}get enum(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}get Values(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}get Enum(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}extract($,Y=this._def){return AD.create($,{...this._def,...Y})}exclude($,Y=this._def){return AD.create(this.options.filter((X)=>!$.includes(X)),{...this._def,...Y})}};AD.create=Q14;P_=class P_ extends s6{_parse($){let Y=F8.getValidEnumValues(this._def.values),X=this._getOrReturnCtx($);if(X.parsedType!==f1.string&&X.parsedType!==f1.number){let G=F8.objectValues(Y);return t1(X,{expected:F8.joinValues(G),received:X.parsedType,code:B1.invalid_type}),o4}if(!this._cache)this._cache=new Set(F8.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let G=F8.objectValues(Y);return t1(X,{received:X.data,code:B1.invalid_enum_value,options:G}),o4}return HG($.data)}get enum(){return this._def.values}};P_.create=($,Y)=>{return new P_({values:$,typeName:Q6.ZodNativeEnum,...x6(Y)})};eO=class eO extends s6{unwrap(){return this._def.type}_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==f1.promise&&Y.common.async===!1)return t1(Y,{code:B1.invalid_type,expected:f1.promise,received:Y.parsedType}),o4;let X=Y.parsedType===f1.promise?Y.data:Promise.resolve(Y.data);return HG(X.then((G)=>{return this._def.type.parseAsync(G,{path:Y.path,errorMap:Y.common.contextualErrorMap})}))}};eO.create=($,Y)=>{return new eO({type:$,typeName:Q6.ZodPromise,...x6(Y)})};xK=class xK extends s6{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Q6.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:Y,ctx:X}=this._processInputParams($),G=this._def.effect||null,J={addIssue:(Q)=>{if(t1(X,Q),Q.fatal)Y.abort();else Y.dirty()},get path(){return X.path}};if(J.addIssue=J.addIssue.bind(J),G.type==="preprocess"){let Q=G.transform(X.data,J);if(X.common.async)return Promise.resolve(Q).then(async(W)=>{if(Y.value==="aborted")return o4;let Z=await this._def.schema._parseAsync({data:W,path:X.path,parent:X});if(Z.status==="aborted")return o4;if(Z.status==="dirty")return aO(Z.value);if(Y.value==="dirty")return aO(Z.value);return Z});else{if(Y.value==="aborted")return o4;let W=this._def.schema._parseSync({data:Q,path:X.path,parent:X});if(W.status==="aborted")return o4;if(W.status==="dirty")return aO(W.value);if(Y.value==="dirty")return aO(W.value);return W}}if(G.type==="refinement"){let Q=(W)=>{let Z=G.refinement(W,J);if(X.common.async)return Promise.resolve(Z);if(Z instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if(X.common.async===!1){let W=this._def.schema._parseSync({data:X.data,path:X.path,parent:X});if(W.status==="aborted")return o4;if(W.status==="dirty")Y.dirty();return Q(W.value),{status:Y.value,value:W.value}}else return this._def.schema._parseAsync({data:X.data,path:X.path,parent:X}).then((W)=>{if(W.status==="aborted")return o4;if(W.status==="dirty")Y.dirty();return Q(W.value).then(()=>{return{status:Y.value,value:W.value}})})}if(G.type==="transform")if(X.common.async===!1){let Q=this._def.schema._parseSync({data:X.data,path:X.path,parent:X});if(!UD(Q))return o4;let W=G.transform(Q.value,J);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:Y.value,value:W}}else return this._def.schema._parseAsync({data:X.data,path:X.path,parent:X}).then((Q)=>{if(!UD(Q))return o4;return Promise.resolve(G.transform(Q.value,J)).then((W)=>({status:Y.value,value:W}))});F8.assertNever(G)}};xK.create=($,Y,X)=>{return new xK({schema:$,typeName:Q6.ZodEffects,effect:Y,...x6(X)})};xK.createWithPreprocess=($,Y,X)=>{return new xK({schema:Y,effect:{type:"preprocess",transform:$},typeName:Q6.ZodEffects,...x6(X)})};kK=class kK extends s6{_parse($){if(this._getType($)===f1.undefined)return HG(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}};kK.create=($,Y)=>{return new kK({innerType:$,typeName:Q6.ZodOptional,...x6(Y)})};$V=class $V extends s6{_parse($){if(this._getType($)===f1.null)return HG(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}};$V.create=($,Y)=>{return new $V({innerType:$,typeName:Q6.ZodNullable,...x6(Y)})};w_=class w_ extends s6{_parse($){let{ctx:Y}=this._processInputParams($),X=Y.data;if(Y.parsedType===f1.undefined)X=this._def.defaultValue();return this._def.innerType._parse({data:X,path:Y.path,parent:Y})}removeDefault(){return this._def.innerType}};w_.create=($,Y)=>{return new w_({innerType:$,typeName:Q6.ZodDefault,defaultValue:typeof Y.default==="function"?Y.default:()=>Y.default,...x6(Y)})};__=class __ extends s6{_parse($){let{ctx:Y}=this._processInputParams($),X={...Y,common:{...Y.common,issues:[]}},G=this._def.innerType._parse({data:X.data,path:X.path,parent:{...X}});if(D_(G))return G.then((J)=>{return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new MQ(X.common.issues)},input:X.data})}});else return{status:"valid",value:G.status==="valid"?G.value:this._def.catchValue({get error(){return new MQ(X.common.issues)},input:X.data})}}removeCatch(){return this._def.innerType}};__.create=($,Y)=>{return new __({innerType:$,typeName:Q6.ZodCatch,catchValue:typeof Y.catch==="function"?Y.catch:()=>Y.catch,...x6(Y)})};Ng=class Ng extends s6{_parse($){if(this._getType($)!==f1.nan){let X=this._getOrReturnCtx($);return t1(X,{code:B1.invalid_type,expected:f1.nan,received:X.parsedType}),o4}return{status:"valid",value:$.data}}};Ng.create=($)=>{return new Ng({typeName:Q6.ZodNaN,...x6($)})};oS8=Symbol("zod_brand");P80=class P80 extends s6{_parse($){let{ctx:Y}=this._processInputParams($),X=Y.data;return this._def.type._parse({data:X,path:Y.path,parent:Y})}unwrap(){return this._def.type}};Lg=class Lg extends s6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.common.async)return(async()=>{let J=await this._def.in._parseAsync({data:X.data,path:X.path,parent:X});if(J.status==="aborted")return o4;if(J.status==="dirty")return Y.dirty(),aO(J.value);else return this._def.out._parseAsync({data:J.value,path:X.path,parent:X})})();else{let G=this._def.in._parseSync({data:X.data,path:X.path,parent:X});if(G.status==="aborted")return o4;if(G.status==="dirty")return Y.dirty(),{status:"dirty",value:G.value};else return this._def.out._parseSync({data:G.value,path:X.path,parent:X})}}static create($,Y){return new Lg({in:$,out:Y,typeName:Q6.ZodPipeline})}};j_=class j_ extends s6{_parse($){let Y=this._def.innerType._parse($),X=(G)=>{if(UD(G))G.value=Object.freeze(G.value);return G};return D_(Y)?Y.then((G)=>X(G)):X(Y)}unwrap(){return this._def.innerType}};j_.create=($,Y)=>{return new j_({innerType:$,typeName:Q6.ZodReadonly,...x6(Y)})};tS8={object:y7.lazycreate};(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(Q6||(Q6={}));Z14=CK.create,K14=zD.create,$k8=Ng.create,Yk8=VD.create,U14=B_.create,Xk8=sO.create,Gk8=Vg.create,Jk8=O_.create,Qk8=E_.create,Wk8=oO.create,Zk8=HD.create,Kk8=kU.create,Uk8=Ag.create,Hk8=SK.create,zk8=y7.create,Vk8=y7.strictCreate,Ak8=M_.create,Fk8=I80.create,Dk8=R_.create,Nk8=vU.create,Lk8=Fg.create,Bk8=Dg.create,Ok8=tO.create,Ek8=L_.create,Mk8=q_.create,Rk8=I_.create,qk8=AD.create,Ik8=P_.create,Pk8=eO.create,wk8=xK.create,_k8=kK.create,jk8=$V.create,Tk8=xK.createWithPreprocess,Ck8=Lg.create,xk8={string:($)=>CK.create({...$,coerce:!0}),number:($)=>zD.create({...$,coerce:!0}),boolean:($)=>B_.create({...$,coerce:!0}),bigint:($)=>VD.create({...$,coerce:!0}),date:($)=>sO.create({...$,coerce:!0})},yk8=o4});var q8={};W8(q8,{void:()=>Uk8,util:()=>F8,unknown:()=>Zk8,union:()=>Ak8,undefined:()=>Jk8,tuple:()=>Nk8,transformer:()=>wk8,symbol:()=>Gk8,string:()=>Z14,strictObject:()=>Vk8,setErrorMap:()=>jS8,set:()=>Ok8,record:()=>Lk8,quotelessJson:()=>wS8,promise:()=>Pk8,preprocess:()=>Tk8,pipeline:()=>Ck8,ostring:()=>Sk8,optional:()=>_k8,onumber:()=>kk8,oboolean:()=>vk8,objectUtil:()=>fv0,object:()=>zk8,number:()=>K14,nullable:()=>jk8,null:()=>Qk8,never:()=>Kk8,nativeEnum:()=>Ik8,nan:()=>$k8,map:()=>Bk8,makeIssue:()=>zg,literal:()=>Rk8,lazy:()=>Mk8,late:()=>tS8,isValid:()=>UD,isDirty:()=>q80,isAsync:()=>D_,isAborted:()=>R80,intersection:()=>Dk8,instanceof:()=>eS8,getParsedType:()=>SU,getErrorMap:()=>F_,function:()=>Ek8,enum:()=>qk8,effect:()=>wk8,discriminatedUnion:()=>Fk8,defaultErrorMap:()=>tz,datetimeRegex:()=>J14,date:()=>Xk8,custom:()=>W14,coerce:()=>xk8,boolean:()=>U14,bigint:()=>Yk8,array:()=>Hk8,any:()=>Wk8,addIssueToContext:()=>t1,ZodVoid:()=>Ag,ZodUnknown:()=>HD,ZodUnion:()=>M_,ZodUndefined:()=>O_,ZodType:()=>s6,ZodTuple:()=>vU,ZodTransformer:()=>xK,ZodSymbol:()=>Vg,ZodString:()=>CK,ZodSet:()=>tO,ZodSchema:()=>s6,ZodRecord:()=>Fg,ZodReadonly:()=>j_,ZodPromise:()=>eO,ZodPipeline:()=>Lg,ZodParsedType:()=>f1,ZodOptional:()=>kK,ZodObject:()=>y7,ZodNumber:()=>zD,ZodNullable:()=>$V,ZodNull:()=>E_,ZodNever:()=>kU,ZodNativeEnum:()=>P_,ZodNaN:()=>Ng,ZodMap:()=>Dg,ZodLiteral:()=>I_,ZodLazy:()=>q_,ZodIssueCode:()=>B1,ZodIntersection:()=>R_,ZodFunction:()=>L_,ZodFirstPartyTypeKind:()=>Q6,ZodError:()=>MQ,ZodEnum:()=>AD,ZodEffects:()=>xK,ZodDiscriminatedUnion:()=>I80,ZodDefault:()=>w_,ZodDate:()=>sO,ZodCatch:()=>__,ZodBranded:()=>P80,ZodBoolean:()=>B_,ZodBigInt:()=>VD,ZodArray:()=>SK,ZodAny:()=>oO,Schema:()=>s6,ParseStatus:()=>LX,OK:()=>HG,NEVER:()=>yk8,INVALID:()=>o4,EMPTY_PATH:()=>TS8,DIRTY:()=>aO,BRAND:()=>oS8});var dv0=V0(()=>{M80();mv0();t04();Hg();H14();E80()});var z14=V0(()=>{dv0();dv0()});function $E($){function Y(X,G){if(G.description)X=X.describe(G.description);return X}if($.const!==void 0){if(typeof $.const==="string")return Y(q8.literal($.const),$);else if(typeof $.const==="number")return Y(q8.literal($.const),$);else if(typeof $.const==="boolean")return Y(q8.literal($.const),$);else if($.const===null)return Y(q8.null(),$);return Y(q8.literal($.const),$)}if($.type)switch($.type){case"string":{if($.enum){if($.enum.length===0)return Y(q8.string(),$);return Y(q8.enum($.enum),$)}let X=q8.string();if($.minLength!==void 0)X=X.min($.minLength);if($.maxLength!==void 0)X=X.max($.maxLength);if($.pattern!==void 0){let G=new RegExp($.pattern);X=X.regex(G)}return Y(X,$)}case"number":case"integer":{if($.enum){if($.enum.length===0)return Y(q8.number(),$);let G=$.enum.map((J)=>q8.literal(J));if(G.length===1)return Y(G[0],$);if(G.length>=2){let J=q8.union([G[0],G[1],...G.slice(2)]);return Y(J,$)}}let X=$.type==="integer"?q8.number().int():q8.number();if($.minimum!==void 0)X=X.min($.minimum);if($.maximum!==void 0)X=X.max($.maximum);if($.exclusiveMinimum!==void 0)X=X.gt($.exclusiveMinimum);if($.exclusiveMaximum!==void 0)X=X.lt($.exclusiveMaximum);if($.multipleOf!==void 0)X=X.multipleOf($.multipleOf);return Y(X,$)}case"boolean":if($.enum){if($.enum.length===0)return Y(q8.boolean(),$);let X=$.enum.map((G)=>q8.literal(G));if(X.length===1)return Y(X[0],$);if(X.length>=2){let G=q8.union([X[0],X[1],...X.slice(2)]);return Y(G,$)}}return Y(q8.boolean(),$);case"null":return Y(q8.null(),$);case"object":if($.properties){let X={};for(let[J,Q]of Object.entries($.properties))X[J]=$E(Q);if($.required&&Array.isArray($.required)){let J=new Set($.required);for(let Q of Object.keys(X))if(!J.has(Q))X[Q]=X[Q].optional()}else for(let J of Object.keys(X))X[J]=X[J].optional();let G;if($.additionalProperties!==!1)G=q8.object(X).passthrough();else G=q8.object(X);return Y(G,$)}return Y(q8.object({}),$);case"array":{let X;if($.items)X=q8.array($E($.items));else X=q8.array(q8.any());if($.minItems!==void 0)X=X.min($.minItems);if($.maxItems!==void 0)X=X.max($.maxItems);if($.uniqueItems===!0)X=X.refine((G)=>{let J=new Set;return G.every((Q)=>{if(typeof Q==="string"||typeof Q==="number"||typeof Q==="boolean"){if(J.has(Q))return!1;return J.add(Q),!0}let W=JSON.stringify(Q);if(J.has(W))return!1;return J.add(W),!0})},{message:"Array items must be unique"});return Y(X,$)}}if($.enum){if($.enum.length===0)return Y(q8.never(),$);if($.enum.every((G)=>typeof G==="string"))return Y(q8.enum($.enum),$);else{let G=$.enum.map((J)=>q8.literal(J));if(G.length===1)return Y(G[0],$);if(G.length>=2){let J=q8.union([G[0],G[1],...G.slice(2)]);return Y(J,$)}}}if($.anyOf&&$.anyOf.length>=2){let X=$.anyOf.map($E);return Y(q8.union([X[0],X[1],...X.slice(2)]),$)}if($.allOf)return Y($.allOf.reduce((X,G)=>q8.intersection(X,$E(G)),q8.object({})),$);if($.oneOf&&$.oneOf.length>=2){let X=$.oneOf.map($E);return Y(q8.union([X[0],X[1],...X.slice(2)]),$)}return Y(q8.any(),$)}var V14=V0(()=>{z14()});function j14($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function ek8($){return new ReadableStream({async pull(Y){try{let{value:X,done:G}=await $.next();if(G)Y.close();else Y.enqueue(X)}catch(X){Y.error(X)}},cancel(){}})}function $v8($){return{[w80]:!0,validate:$}}function Yv8($){return typeof $==="object"&&$!==null&&w80 in $&&$[w80]===!0&&"validate"in $}function Xv8($){return Yv8($)?$:Gv8($)}function Gv8($){return $v8((Y)=>{let X=$.safeParse(Y);return X.success?{success:!0,value:X.data}:{success:!1,error:X.error}})}function f14({value:$,schema:Y}){let X=Xv8(Y);try{if(X.validate==null)return{success:!0,value:$};let G=X.validate($);if(G.success)return G;return{success:!1,error:F14.wrap({value:$,cause:G.error})}}catch(G){return{success:!1,error:F14.wrap({value:$,cause:G})}}}function av0({text:$,schema:Y}){try{let X=tk8.default.parse($);if(Y==null)return{success:!0,value:X,rawValue:X};let G=f14({value:X,schema:Y});return G.success?{...G,rawValue:X}:G}catch(X){return{success:!1,error:A14.isInstance(X)?X:new A14({text:$,cause:X})}}}function g14($,Y,X,G){if(!G?.errorMessages)return;if(X)$.errorMessage={...$.errorMessage,[Y]:X}}function r9($,Y,X,G,J){$[Y]=X,g14($,Y,G,J)}function RQ($){if($.target!=="openAi")return{};let Y=[...$.basePath,$.definitionPath,$.openAiAnyTypeName];return $.flags.hasReferencedOpenAiAnyType=!0,{$ref:$.$refStrategy==="relative"?m14(Y,$.currentPath):Y.join("/")}}function Zv8($,Y){let X={type:"array"};if($.type?._def&&$.type?._def?.typeName!==U0.ZodAny)X.items=z9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)r9(X,"minItems",$.minLength.value,$.minLength.message,Y);if($.maxLength)r9(X,"maxItems",$.maxLength.value,$.maxLength.message,Y);if($.exactLength)r9(X,"minItems",$.exactLength.value,$.exactLength.message,Y),r9(X,"maxItems",$.exactLength.value,$.exactLength.message,Y);return X}function Kv8($,Y){let X={type:"integer",format:"int64"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"min":if(Y.target==="jsonSchema7")if(G.inclusive)r9(X,"minimum",G.value,G.message,Y);else r9(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;r9(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)r9(X,"maximum",G.value,G.message,Y);else r9(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;r9(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":r9(X,"multipleOf",G.value,G.message,Y);break}return X}function Uv8(){return{type:"boolean"}}function u14($,Y){return z9($.type._def,Y)}function p14($,Y,X){let G=X??Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>p14($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return zv8($,Y)}}function Vv8($,Y){return{...z9($.innerType._def,Y),default:$.defaultValue()}}function Av8($,Y){return Y.effectStrategy==="input"?z9($.schema._def,Y):RQ(Y)}function Fv8($){return{type:"string",enum:Array.from($.values)}}function Nv8($,Y){let X=[z9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),z9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((Q)=>!!Q),G=Y.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,J=[];return X.forEach((Q)=>{if(Dv8(Q)){if(J.push(...Q.allOf),Q.unevaluatedProperties===void 0)G=void 0}else{let W=Q;if("additionalProperties"in Q&&Q.additionalProperties===!1){let{additionalProperties:Z,...K}=Q;W=K}else G=void 0;J.push(W)}}),J.length?{allOf:J,...G}:void 0}function Lv8($,Y){let X=typeof $.value;if(X!=="bigint"&&X!=="number"&&X!=="boolean"&&X!=="string")return{type:Array.isArray($.value)?"array":"object"};if(Y.target==="openApi3")return{type:X==="bigint"?"integer":X,enum:[$.value]};return{type:X==="bigint"?"integer":X,const:$.value}}function d14($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":r9(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y);break;case"max":r9(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"email":switch(Y.emailStrategy){case"format:email":bK(X,"email",G.message,Y);break;case"format:idn-email":bK(X,"idn-email",G.message,Y);break;case"pattern:zod":XJ(X,yK.email,G.message,Y);break}break;case"url":bK(X,"uri",G.message,Y);break;case"uuid":bK(X,"uuid",G.message,Y);break;case"regex":XJ(X,G.regex,G.message,Y);break;case"cuid":XJ(X,yK.cuid,G.message,Y);break;case"cuid2":XJ(X,yK.cuid2,G.message,Y);break;case"startsWith":XJ(X,RegExp(`^${lv0(G.value,Y)}`),G.message,Y);break;case"endsWith":XJ(X,RegExp(`${lv0(G.value,Y)}$`),G.message,Y);break;case"datetime":bK(X,"date-time",G.message,Y);break;case"date":bK(X,"date",G.message,Y);break;case"time":bK(X,"time",G.message,Y);break;case"duration":bK(X,"duration",G.message,Y);break;case"length":r9(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y),r9(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"includes":{XJ(X,RegExp(lv0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")bK(X,"ipv4",G.message,Y);if(G.version!=="v4")bK(X,"ipv6",G.message,Y);break}case"base64url":XJ(X,yK.base64url,G.message,Y);break;case"jwt":XJ(X,yK.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")XJ(X,yK.ipv4Cidr,G.message,Y);if(G.version!=="v4")XJ(X,yK.ipv6Cidr,G.message,Y);break}case"emoji":XJ(X,yK.emoji(),G.message,Y);break;case"ulid":{XJ(X,yK.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{bK(X,"binary",G.message,Y);break}case"contentEncoding:base64":{r9(X,"contentEncoding","base64",G.message,Y);break}case"pattern:zod":{XJ(X,yK.base64,G.message,Y);break}}break}case"nanoid":XJ(X,yK.nanoid,G.message,Y)}return X}function lv0($,Y){return Y.patternStrategy==="escape"?Ov8($):$}function Ov8($){let Y="";for(let X=0;X<$.length;X++){if(!Bv8.has($[X]))Y+="\\";Y+=$[X]}return Y}function bK($,Y,X,G){if($.format||$.anyOf?.some((J)=>J.format)){if(!$.anyOf)$.anyOf=[];if($.format){if($.anyOf.push({format:$.format,...$.errorMessage&&G.errorMessages&&{errorMessage:{format:$.errorMessage.format}}}),delete $.format,$.errorMessage){if(delete $.errorMessage.format,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else r9($,"format",Y,X,G)}function XJ($,Y,X,G){if($.pattern||$.allOf?.some((J)=>J.pattern)){if(!$.allOf)$.allOf=[];if($.pattern){if($.allOf.push({pattern:$.pattern,...$.errorMessage&&G.errorMessages&&{errorMessage:{pattern:$.errorMessage.pattern}}}),delete $.pattern,$.errorMessage){if(delete $.errorMessage.pattern,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.allOf.push({pattern:N14(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else r9($,"pattern",N14(Y,G),X,G)}function N14($,Y){if(!Y.applyRegexFlags||!$.flags)return $.source;let X={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},G=X.i?$.source.toLowerCase():$.source,J="",Q=!1,W=!1,Z=!1;for(let K=0;K<G.length;K++){if(Q){J+=G[K],Q=!1;continue}if(X.i){if(W){if(G[K].match(/[a-z]/)){if(Z)J+=G[K],J+=`${G[K-2]}-${G[K]}`.toUpperCase(),Z=!1;else if(G[K+1]==="-"&&G[K+2]?.match(/[a-z]/))J+=G[K],Z=!0;else J+=`${G[K]}${G[K].toUpperCase()}`;continue}}else if(G[K].match(/[a-z]/)){J+=`[${G[K]}${G[K].toUpperCase()}]`;continue}}if(X.m){if(G[K]==="^"){J+=`(^|(?<=[\r
]))`;continue}else if(G[K]==="$"){J+=`($|(?=[\r
]))`;continue}}if(X.s&&G[K]==="."){J+=W?`${G[K]}\r
`:`[${G[K]}\r
]`;continue}if(J+=G[K],G[K]==="\\")Q=!0;else if(W&&G[K]==="]")W=!1;else if(!W&&G[K]==="[")W=!0}return J}function c14($,Y){if(Y.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(Y.target==="openApi3"&&$.keyType?._def.typeName===U0.ZodEnum)return{type:"object",required:$.keyType._def.values,properties:$.keyType._def.values.reduce((G,J)=>({...G,[J]:z9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"properties",J]})??RQ(Y)}),{}),additionalProperties:Y.rejectedAdditionalProperties};let X={type:"object",additionalProperties:z9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]})??Y.allowedAdditionalProperties};if(Y.target==="openApi3")return X;if($.keyType?._def.typeName===U0.ZodString&&$.keyType._def.checks?.length){let{type:G,...J}=d14($.keyType._def,Y);return{...X,propertyNames:J}}else if($.keyType?._def.typeName===U0.ZodEnum)return{...X,propertyNames:{enum:$.keyType._def.values}};else if($.keyType?._def.typeName===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&$.keyType._def.type._def.checks?.length){let{type:G,...J}=u14($.keyType._def,Y);return{...X,propertyNames:J}}return X}function Ev8($,Y){if(Y.mapStrategy==="record")return c14($,Y);let X=z9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||RQ(Y),G=z9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||RQ(Y);return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function Mv8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function Rv8($){return $.target==="openAi"?void 0:{not:RQ({...$,currentPath:[...$.currentPath,"not"]})}}function qv8($){return $.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}function Iv8($,Y){if(Y.target==="openApi3")return L14($,Y);let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in _80)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=_80[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return L14($,Y)}function Pv8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length)){if(Y.target==="openApi3")return{type:_80[$.innerType._def.typeName],nullable:!0};return{type:[_80[$.innerType._def.typeName],"null"]}}if(Y.target==="openApi3"){let G=z9($.innerType._def,{...Y,currentPath:[...Y.currentPath]});if(G&&"$ref"in G)return{allOf:[G],nullable:!0};return G&&{...G,nullable:!0}}let X=z9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function wv8($,Y){let X={type:"number"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"int":X.type="integer",g14(X,"type",G.message,Y);break;case"min":if(Y.target==="jsonSchema7")if(G.inclusive)r9(X,"minimum",G.value,G.message,Y);else r9(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;r9(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)r9(X,"maximum",G.value,G.message,Y);else r9(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;r9(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":r9(X,"multipleOf",G.value,G.message,Y);break}return X}function _v8($,Y){let X=Y.target==="openAi",G={type:"object",properties:{}},J=[],Q=$.shape();for(let Z in Q){let K=Q[Z];if(K===void 0||K._def===void 0)continue;let H=Tv8(K);if(H&&X){if(K._def.typeName==="ZodOptional")K=K._def.innerType;if(!K.isNullable())K=K.nullable();H=!1}let z=z9(K._def,{...Y,currentPath:[...Y.currentPath,"properties",Z],propertyPath:[...Y.currentPath,"properties",Z]});if(z===void 0)continue;if(G.properties[Z]=z,!H)J.push(Z)}if(J.length)G.required=J;let W=jv8($,Y);if(W!==void 0)G.additionalProperties=W;return G}function jv8($,Y){if($.catchall._def.typeName!=="ZodNever")return z9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function Tv8($){try{return $.isOptional()}catch{return!0}}function kv8($,Y){return z9($.type._def,Y)}function vv8($,Y){let G={type:"array",uniqueItems:!0,items:z9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)r9(G,"minItems",$.minSize.value,$.minSize.message,Y);if($.maxSize)r9(G,"maxItems",$.maxSize.value,$.maxSize.message,Y);return G}function xv8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>z9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:z9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>z9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function yv8($){return{not:RQ($)}}function bv8($){return RQ($)}function z9($,Y,X=!1){let G=Y.seen.get($);if(Y.override){let Z=Y.override?.($,Y,G,X);if(Z!==Jv8)return Z}if(G&&!X){let Z=gv8(G,Y);if(Z!==void 0)return Z}let J={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,J);let Q=fv8($,$.typeName,Y),W=typeof Q==="function"?z9(Q(),Y):Q;if(W)mv8($,Y,W);if(Y.postProcess){let Z=Y.postProcess(W,$,Y);return J.jsonSchema=W,Z}return J.jsonSchema=W,W}function dv8($){let Y=["ROOT"],X=-1,G=null;function J(K,H,z){switch(K){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let K=0;K<$.length;K++){let H=$[K];switch(Y[Y.length-1]){case"ROOT":J(H,K,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=K,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,K,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,K);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=K;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=K}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=K,Y.pop();break}default:{X=K,J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=K,Y.pop();break}default:{X=K;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=K;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=K;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,K+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K)}else X=K;break}}}let Z=$.slice(0,X+1);for(let K=Y.length-1;K>=0;K--)switch(Y[K]){case"INSIDE_STRING":{Z+='"';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":{Z+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{Z+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))Z+="true".slice(z.length);else if("false".startsWith(z))Z+="false".slice(z.length);else if("null".startsWith(z))Z+="null".slice(z.length)}}return Z}function cv8($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=av0({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=av0({text:dv8($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}function l14($,Y){let X=Xx0.find((G)=>G.name===$);if(!X)throw Error(`Invalid stream part type: ${$}`);return`${X.code}:${JSON.stringify(Y)}
`}function Zx8($,Y){var X;let G=(X=void 0)!=null?X:!1;return BX(pv8($,{$refStrategy:G?"root":"none",target:"jsonSchema7"}),{validate:(J)=>{let Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function BX($,{validate:Y}={}){return{[sv0]:!0,_type:void 0,[w80]:!0,jsonSchema:$,validate:Y}}function Kx8($){return typeof $==="object"&&$!==null&&sv0 in $&&$[sv0]===!0&&"jsonSchema"in $&&"validate"in $}function Ux8($){return Kx8($)?$:Zx8($)}function zx8($){var Y=new Set([$]),X=new Set,G=$.match(B14);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(K){return K===$};function Q(Z){return X.add(Z),!1}function W(Z){return Y.add(Z),!0}return function(K){if(Y.has(K))return!0;if(X.has(K))return!1;var H=K.match(B14);if(!H)return Q(K);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(K);if(J.major!==z.major)return Q(K);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(K);return Q(K)}if(J.minor<=z.minor)return W(K);return Q(K)}}function Gx0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=Mg[Eg]=(J=Mg[Eg])!==null&&J!==void 0?J:{version:YE};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==YE){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+YE);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+YE+"."),!0}function Rg($){var Y,X,G=(Y=Mg[Eg])===null||Y===void 0?void 0:Y.version;if(!G||!Vx8(G))return;return(X=Mg[Eg])===null||X===void 0?void 0:X[$]}function Jx0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+YE+".");var X=Mg[Eg];if(X)delete X[$]}function Bg($,Y,X){var G=Rg("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,Dx8([],Fx8(X),!1))}function Lx8($,Y){if($<kW.NONE)$=kW.NONE;else if($>kW.ALL)$=kW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",kW.ERROR),warn:X("warn",kW.WARN),info:X("info",kW.INFO),debug:X("debug",kW.DEBUG),verbose:X("verbose",kW.VERBOSE)}}function Mx8($){return Symbol.for($)}function Wx0($){return $.getValue(Qx0)||void 0}function Sx8(){return Wx0(i14.getInstance().active())}function Zx0($,Y){return $.setValue(Qx0,Y)}function kx8($){return $.deleteValue(Qx0)}function vx8($,Y){return Zx0($,new Og(Y))}function a14($){var Y;return(Y=Wx0($))===null||Y===void 0?void 0:Y.spanContext()}function bx8($){return xx8.test($)&&$!==r14}function hx8($){return yx8.test($)&&$!==n14}function s14($){return bx8($.traceId)&&hx8($.spanId)}function fx8($){return new Og($)}function gx8($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}function t14($,{contentType:Y,dataStreamVersion:X}){let G=new Headers($!=null?$:{});if(!G.has("Content-Type"))G.set("Content-Type",Y);return G.set("X-Vercel-AI-Data-Stream",X),G}function Wy8({prompt:$,schema:Y,schemaPrefix:X=Y!=null?Gy8:void 0,schemaSuffix:G=Y!=null?Jy8:Qy8}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}function Q44($,Y){let X=$.getReader(),G=Y.getReader(),J=void 0,Q=void 0,W=!1,Z=!1;async function K(z){try{if(J==null)J=X.read();let V=await J;if(J=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}async function H(z){try{if(Q==null)Q=G.read();let V=await Q;if(Q=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}return new ReadableStream({async pull(z){try{if(W){await H(z);return}if(Z){await K(z);return}if(J==null)J=X.read();if(Q==null)Q=G.read();let{result:V,reader:A}=await Promise.race([J.then((F)=>({result:F,reader:X})),Q.then((F)=>({result:F,reader:G}))]);if(!V.done)z.enqueue(V.value);if(A===X){if(J=void 0,V.done)await H(z),W=!0}else if(Q=void 0,V.done)Z=!0,await K(z)}catch(V){z.error(V)}},cancel(){X.cancel(),G.cancel()}})}function Z44($={}){let Y=new TextEncoder,X="";return new TransformStream({async start(){if($.onStart)await $.onStart()},async transform(G,J){if(J.enqueue(Y.encode(G)),X+=G,$.onToken)await $.onToken(G);if($.onText&&typeof G==="string")await $.onText(G)},async flush(){if($.onCompletion)await $.onCompletion(X);if($.onFinal)await $.onFinal(X)}})}function Hx0($,Y){return $.pipeThrough(new TransformStream({transform:async(X,G)=>{var J;if(typeof X==="string"){G.enqueue(X);return}if("event"in X){if(X.event==="on_chat_model_stream")R14((J=X.data)==null?void 0:J.chunk,G);return}R14(X,G)}})).pipeThrough(Z44(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(X,G)=>{G.enqueue(l14("text",X))}}))}function Py8($,Y){return Hx0($,Y).pipeThrough(new TextEncoderStream)}function wy8($,Y){var X;let G=Hx0($,Y==null?void 0:Y.callbacks).pipeThrough(new TextEncoderStream),J=Y==null?void 0:Y.data,Q=Y==null?void 0:Y.init,W=J?Q44(J.stream,G):G;return new Response(W,{status:(X=Q==null?void 0:Q.status)!=null?X:200,statusText:Q==null?void 0:Q.statusText,headers:t14(Q==null?void 0:Q.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function _y8($,Y){Y.dataStream.merge(Hx0($,Y.callbacks))}function R14($,Y){if(typeof $.content==="string")Y.enqueue($.content);else{let X=$.content;for(let G of X)if(G.type==="text")Y.enqueue(G.text)}}function zx0($,Y){let X=ky8();return ek8($[Symbol.asyncIterator]()).pipeThrough(new TransformStream({async transform(G,J){J.enqueue(X(G.delta))}})).pipeThrough(Z44(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(G,J)=>{J.enqueue(l14("text",G))}}))}function Ty8($,Y){return zx0($,Y).pipeThrough(new TextEncoderStream)}function Cy8($,Y={}){var X;let{init:G,data:J,callbacks:Q}=Y,W=zx0($,Q).pipeThrough(new TextEncoderStream),Z=J?Q44(J.stream,W):W;return new Response(Z,{status:(X=G==null?void 0:G.status)!=null?X:200,statusText:G==null?void 0:G.statusText,headers:t14(G==null?void 0:G.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function Sy8($,Y){Y.dataStream.merge(zx0($,Y.callbacks))}function ky8(){let $=!0;return(Y)=>{if($){if(Y=Y.trimStart(),Y)$=!1}return Y}}function QE($,Y="jsonSchema7"){let X=a04($,Y);return BX(X,{validate:(G)=>{let J=$.safeParse(G);return J.success?{success:!0,value:J.data}:{success:!1,error:J.error}}})}function k80($){return typeof $==="object"&&$!==null&&(("_def"in $)||("_zod"in $))&&"parse"in $&&typeof $.parse==="function"&&"safeParse"in $&&typeof $.safeParse==="function"}function vy8($){if(k80($))return $;else{let Y="jsonSchema"in $?$.jsonSchema:$;try{if("toJSONSchema"in U)return UG(Y);else return $E(Y)}catch(X){let G=`[Schema Builder] Failed to convert schema parameters to Zod. Original schema: ${JSON.stringify(Y)}`;throw console.error(G,X),Error(G+(X instanceof Error?`
${X.stack}`:`
Unknown error object`))}}}function WE({schema:$,compatLayers:Y,mode:X}){if(X==="jsonSchema"){let G=W4($);for(let J of Y)if(J.shouldApply()){let Q=J.processToCompatSchema(G);return $6(Q)}return $6(G)}else{let G;if(k80($))G=$;else{if(V5($))throw Error("StandardSchemaWithJSON is not supported for applyCompatLayer and aiSdkSchema mode");G=vy8($)}for(let J of Y)if(J.shouldApply())return J.processToAISDKSchema(G);return QE(G)}}function Ig($,Y){if($.type===Y)return!0;if(Array.isArray($.type)&&$.type.includes(Y))return!0;return!1}function XE($){return Ig($,"object")||$.properties!==void 0}function T_($){return Ig($,"array")||$.items!==void 0}function C_($){return Ig($,"string")}function v80($){return Ig($,"number")||Ig($,"integer")}function gy8($){return Array.isArray($.anyOf)&&$.anyOf.length>0}function my8($){return Array.isArray($.oneOf)&&$.oneOf.length>0}function S_($){return gy8($)||my8($)||Array.isArray($.type)}function k_($){return Array.isArray($.allOf)&&$.allOf.length>0}function uy8($,Y){if(!Y.required||!Array.isArray(Y.required))return!0;return!Y.required.includes($)}function Yx0($,Y){if($===null||$===void 0)return $;if(typeof $!=="object"||Array.isArray($)){if(Array.isArray($)&&Y.items&&typeof Y.items==="object")return $.map((Q)=>Yx0(Q,Y.items));return $}let X=Y.properties;if(!X)return $;let G=Y.required||[],J={};for(let[Q,W]of Object.entries($))if(W===null&&!G.includes(Q))J[Q]=void 0;else if(W!==null&&typeof W==="object"&&X[Q])J[Q]=Yx0(W,X[Q]);else J[Q]=W;return J}function z44($){let Y;try{Y=$["~standard"].jsonSchema.input({target:"draft-07"})}catch{}if(!Y)return $;let X=$["~standard"];return{"~standard":{version:X.version,vendor:X.vendor,types:X.types,validate:(G,J)=>{let Q=Yx0(G,Y);return X.validate(Q,J)},jsonSchema:X.jsonSchema}}}function GE($){return(Y)=>Y instanceof $.ZodOptional}function _g($){return(Y)=>Y instanceof $.ZodObject}function Vx0($){return(Y)=>Y instanceof $.ZodNull}function jg($){return(Y)=>Y instanceof $.ZodArray}function Tg($){return(Y)=>Y instanceof $.ZodUnion}function Cg($){return(Y)=>Y instanceof $.ZodString}function Ax0($){return(Y)=>Y instanceof $.ZodNumber}function py8($){return(Y)=>Y instanceof $.ZodDate}function V44($){return(Y)=>Y instanceof $.ZodDefault}function Pg($){return(Y)=>Y instanceof $.ZodNullable}function v_($){return(Y)=>Y instanceof $.ZodIntersection}function cy8($){return $.format==="date-time"||$.format==="date"}function YV($){if(typeof $!=="object"||$===null)return $;let Y={...$};if(Array.isArray(Y.type)){let X=Y.type.filter((G)=>G!=="null");if(X.length===1)Y.type=X[0],Y.nullable=!0;else delete Y.type,delete Y.nullable}if(Array.isArray(Y.enum)&&Y.enum.some((X)=>typeof X!=="string"))delete Y.enum;if("const"in Y&&typeof Y.const!=="string")delete Y.const;if(Y.anyOf&&Array.isArray(Y.anyOf)){let X=Y.anyOf.find((J)=>typeof J==="object"&&J!==null&&J.type==="null"),G=Y.anyOf.filter((J)=>!(typeof J==="object"&&J!==null&&J.type==="null"));if(X){let{anyOf:J,...Q}=Y;if(G.length===1&&typeof G[0]==="object"&&G[0]!==null){let W=YV(G[0]);return W.type?{...Q,...W,nullable:!0}:{...Q,...W}}return Q}}if(Y.properties&&typeof Y.properties==="object")Y.properties=Object.fromEntries(Object.entries(Y.properties).map(([X,G])=>[X,YV(G)]));if(Y.items)if(Array.isArray(Y.items))Y.items=Y.items.map((X)=>YV(X));else Y.items=YV(Y.items);if(Y.additionalProperties&&typeof Y.additionalProperties==="object")Y.additionalProperties=YV(Y.additionalProperties);if(Y.anyOf&&Array.isArray(Y.anyOf))Y.anyOf=Y.anyOf.map((X)=>YV(X));if(Y.oneOf&&Array.isArray(Y.oneOf))Y.oneOf=Y.oneOf.map((X)=>YV(X));if(Y.allOf&&Array.isArray(Y.allOf))Y.allOf=Y.allOf.map((X)=>YV(X));if(Y.anyOf&&Array.isArray(Y.anyOf)){if(Y.description){for(let X of Y.anyOf)if(typeof X==="object"&&X!==null&&!X.description)X.description=Y.description}return{anyOf:Y.anyOf}}return Y}var bk8,I14,hk8,P14,fk8,gk8,mk8=($,Y)=>function(){return Y||(0,$[P14($)[0]])((Y={exports:{}}).exports,Y),Y.exports},uk8=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of P14(Y))if(!gk8.call($,J)&&J!==X)I14($,J,{get:()=>Y[J],enumerable:!(G=hk8(Y,J))||G.enumerable})}return $},pk8=($,Y,X)=>(X=$!=null?bk8(fk8($)):{},uk8(I14(X,"default",{value:$,enumerable:!0}),$)),dk8,w14="vercel.ai.error",ck8,_14,lk8,FD,T14="AI_InvalidArgumentError",C14,ik8,S14,nk8,k14="AI_JSONParseError",v14,rk8,x14,A14,y14="AI_TypeValidationError",b14,ak8,h14,sk8,F14,ok8=($,Y=21)=>{return(X=Y)=>{let G="",J=X|0;while(J--)G+=$[Math.random()*$.length|0];return G}},tk8,JE=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=ok8(X,Y);if($==null)return J;if(X.includes(G))throw new nk8({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return(Q)=>`${$}${G}${J(Q)}`},w80,Jv8,D14,Qv8=($)=>typeof $==="string"?{...D14,name:$}:{...D14,...$},Wv8=($)=>{let Y=Qv8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,flags:{hasReferencedOpenAiAnyType:!1},currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},m14=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},Hv8=($,Y)=>{return z9($.innerType._def,Y)},zv8=($,Y)=>{let X={type:"integer",format:"unix-time"};if(Y.target==="openApi3")return X;for(let G of $.checks)switch(G.kind){case"min":r9(X,"minimum",G.value,G.message,Y);break;case"max":r9(X,"maximum",G.value,G.message,Y);break}return X},Dv8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},cv0=void 0,yK,Bv8,_80,L14=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>z9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},Cv8=($,Y)=>{if(Y.currentPath.toString()===Y.propertyPath?.toString())return z9($.innerType._def,Y);let X=z9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return X?{anyOf:[{not:RQ(Y)},X]}:RQ(Y)},Sv8=($,Y)=>{if(Y.pipeStrategy==="input")return z9($.in._def,Y);else if(Y.pipeStrategy==="output")return z9($.out._def,Y);let X=z9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=z9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},hv8=($,Y)=>{return z9($.innerType._def,Y)},fv8=($,Y,X)=>{switch(Y){case U0.ZodString:return d14($,X);case U0.ZodNumber:return wv8($,X);case U0.ZodObject:return _v8($,X);case U0.ZodBigInt:return Kv8($,X);case U0.ZodBoolean:return Uv8();case U0.ZodDate:return p14($,X);case U0.ZodUndefined:return yv8(X);case U0.ZodNull:return qv8(X);case U0.ZodArray:return Zv8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return Iv8($,X);case U0.ZodIntersection:return Nv8($,X);case U0.ZodTuple:return xv8($,X);case U0.ZodRecord:return c14($,X);case U0.ZodLiteral:return Lv8($,X);case U0.ZodEnum:return Fv8($);case U0.ZodNativeEnum:return Mv8($);case U0.ZodNullable:return Pv8($,X);case U0.ZodOptional:return Cv8($,X);case U0.ZodMap:return Ev8($,X);case U0.ZodSet:return vv8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return kv8($,X);case U0.ZodNaN:case U0.ZodNever:return Rv8(X);case U0.ZodEffects:return Av8($,X);case U0.ZodAny:return RQ(X);case U0.ZodUnknown:return bv8(X);case U0.ZodDefault:return Vv8($,X);case U0.ZodBranded:return u14($,X);case U0.ZodReadonly:return hv8($,X);case U0.ZodCatch:return Hv8($,X);case U0.ZodPipeline:return Sv8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},gv8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:m14(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),RQ(Y);return Y.$refStrategy==="seen"?RQ(Y):void 0}}},mv8=($,Y,X)=>{if($.description){if(X.description=$.description,Y.markdownDescription)X.markdownDescription=$.description}return X},uv8=($,Y)=>{let X=Wv8(Y),G=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((K,[H,z])=>({...K,[H]:z9(z._def,{...X,currentPath:[...X.basePath,X.definitionPath,H]},!0)??RQ(X)}),{}):void 0,J=typeof Y==="string"?Y:Y?.nameStrategy==="title"?void 0:Y?.name,Q=z9($._def,J===void 0?X:{...X,currentPath:[...X.basePath,X.definitionPath,J]},!1)??RQ(X),W=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(W!==void 0)Q.title=W;if(X.flags.hasReferencedOpenAiAnyType){if(!G)G={};if(!G[X.openAiAnyTypeName])G[X.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:X.$refStrategy==="relative"?"1":[...X.basePath,X.definitionPath,X.openAiAnyTypeName].join("/")}}}let Z=J===void 0?G?{...Q,[X.definitionPath]:G}:Q:{$ref:[...X.$refStrategy==="relative"?[]:X.basePath,X.definitionPath,J].join("/"),[X.definitionPath]:{...G,[J]:Q}};if(X.target==="jsonSchema7")Z.$schema="http://json-schema.org/draft-07/schema#";else if(X.target==="jsonSchema2019-09"||X.target==="openAi")Z.$schema="https://json-schema.org/draft/2019-09/schema#";if(X.target==="openAi"&&(("anyOf"in Z)||("oneOf"in Z)||("allOf"in Z)||("type"in Z)&&Array.isArray(Z.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return Z},pv8,lv8,iv8,nv8,rv8,av8,sv8,ov8,tv8,ev8,$x8,Yx8,Xx8,Gx8,Jx8,Qx8,Wx8,Xx0,sv0,Hx8,YE="1.9.0",B14,Vx8,Ax8,Eg,Mg,Fx8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},Dx8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Nx8,kW,Bx8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},Ox8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Ex8="diag",j80,Rx8,qx8,Ix8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},Px8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},wx8,_x8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},jx8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},iv0="context",Tx8,i14,ov0,n14="0000000000000000",r14="00000000000000000000000000000000",Cx8,Og,Qx0,xx8,yx8,nv0,o14,mx8,ux8,px8,dx8,O14,E14,rv0="trace",cx8,lx8,Kx0=($,Y)=>{for(var X in Y)lx8($,X,{get:Y[X],enumerable:!0})},e14="AI_NoObjectGeneratedError",$44,ix8,Y44,M14,X44,tv0,K$,nx8,G44,rx8,J44,ax8,sx8,ox8,tx8,ex8,$y8,Yy8,Xy8,Gy8="JSON schema:",Jy8="You MUST answer with a JSON object that matches the JSON schema above.",Qy8="You MUST answer with JSON.",Zy8,Ky8=()=>({type:"text",responseFormat:()=>({type:"text"}),injectIntoSystemPrompt({system:$}){return $},parsePartial({text:$}){return{partial:$}},parseOutput({text:$}){return $}}),Uy8=({schema:$})=>{let Y=Ux8($);return{type:"object",responseFormat:({model:X})=>({type:"json",schema:X.supportsStructuredOutputs?Y.jsonSchema:void 0}),injectIntoSystemPrompt({system:X,model:G}){return G.supportsStructuredOutputs?X:Wy8({prompt:X,schema:Y.jsonSchema})},parsePartial({text:X}){let G=cv8(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:G.value};default:{let J=G.state;throw Error(`Unsupported parse state: ${J}`)}}},parseOutput({text:X},G){let J=av0({text:X});if(!J.success)throw new M14({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});let Q=f14({value:J.value,schema:Y});if(!Q.success)throw new M14({message:"No object generated: response did not match schema.",cause:Q.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return Q.value}}},Hy8,Ux0,qg,zy8,Vy8,Ay8,Fy8,Dy8,Ny8,W44,Ly8,By8,Oy8,S80="2.0",Ey8,My8,Ry8,qy8,Iy8,jy8,K44,U44,H44,T80,C80,Pt5,xy8=class{model;parent;constructor($,Y){this.model=$,this.parent=Y}getModel(){return this.model}getUnsupportedZodTypes(){return T80}isOptional($){return $ instanceof DW}isObj($){return $ instanceof m5}isNull($){return $ instanceof SF}isNullable($){return $ instanceof NK}isArr($){return $ instanceof FW}isUnion($){return $ instanceof kF}isString($){return $ instanceof AW}isNumber($){return $ instanceof DU}isDate($){return $ instanceof Cz}isDefault($){return $ instanceof xF}isIntersection($){return $ instanceof Sz}shouldApply(){return this.parent.shouldApply()}getSchemaTarget(){return this.parent.getSchemaTarget()}processZodType($){return this.parent.processZodType($)}defaultZodObjectHandler($,Y={passthrough:!0}){let X=Object.entries($.shape).reduce((J,[Q,W])=>{return J[Q]=this.processZodType(W),J},{}),G=NW.object(X);if($._def.unknownKeys==="strict")G=G.strict();if($._def.catchall&&!($._def.catchall instanceof NW.ZodNever))G=G.catchall($._def.catchall);if($.description)G=G.describe($.description);if(Y.passthrough&&$._def.unknownKeys==="passthrough")G=G.passthrough();return G}mergeParameterDescription($,Y){if(Y.length>0)return($?$+`
`:"")+`constraints: ${Y.join(", ")}`;else return $}defaultUnsupportedZodTypeHandler($,Y=T80){if(Y.includes($._def?.typeName))throw Error(`${this.model.modelId} does not support zod type: ${$._def?.typeName}`);return $}defaultZodArrayHandler($,Y=H44){let X=$._def,G=this.processZodType(X.type),J=NW.array(G),Q=[];if(X.minLength?.value!==void 0)if(Y.includes("min"))Q.push(`minimum length ${X.minLength.value}`);else J=J.min(X.minLength.value);if(X.maxLength?.value!==void 0)if(Y.includes("max"))Q.push(`maximum length ${X.maxLength.value}`);else J=J.max(X.maxLength.value);if(X.exactLength?.value!==void 0)if(Y.includes("length"))Q.push(`exact length ${X.exactLength.value}`);else J=J.length(X.exactLength.value);let W=this.mergeParameterDescription($.description,Q);if(W)J=J.describe(W);return J}defaultZodUnionHandler($){let Y=$._def.options.map((G)=>this.processZodType(G));if(Y.length<2)throw Error("Union must have at least 2 options");let X=NW.union(Y);if($.description)X=X.describe($.description);return X}defaultZodStringHandler($,Y=K44){let X=[],G=$._def.checks||[],J=[];for(let Z of G)if("kind"in Z)if(Y.includes(Z.kind))switch(Z.kind){case"regex":{X.push(`input must match this regex ${Z.regex.source}`);break}case"emoji":case"email":case"url":case"uuid":case"cuid":{X.push(`a valid ${Z.kind}`);break}case"min":case"max":{X.push(`${Z.kind}imum length ${Z.value}`);break}}else J.push(Z);let Q=NW.string();for(let Z of J)Q=Q._addCheck(Z);let W=this.mergeParameterDescription($.description,X);if(W)Q=Q.describe(W);return Q}defaultZodNumberHandler($,Y=U44){let X=[],G=$._def.checks||[],J=[];for(let Z of G)if("kind"in Z)if(Y.includes(Z.kind))switch(Z.kind){case"min":if(Z.inclusive)X.push(`greater than or equal to ${Z.value}`);else X.push(`greater than ${Z.value}`);break;case"max":if(Z.inclusive)X.push(`lower than or equal to ${Z.value}`);else X.push(`lower than ${Z.value}`);break;case"multipleOf":{X.push(`multiple of ${Z.value}`);break}}else J.push(Z);let Q=NW.number();for(let Z of J)switch(Z.kind){case"int":Q=Q.int();break;case"finite":Q=Q.finite();break;default:Q=Q._addCheck(Z)}let W=this.mergeParameterDescription($.description,X);if(W)Q=Q.describe(W);return Q}defaultZodDateHandler($){let Y=[],X=$._def.checks||[];for(let Q of X)if("kind"in Q)switch(Q.kind){case"min":let W=new Date(Q.value);if(!isNaN(W.getTime()))Y.push(`Date must be newer than ${W.toISOString()} (ISO)`);break;case"max":let Z=new Date(Q.value);if(!isNaN(Z.getTime()))Y.push(`Date must be older than ${Z.toISOString()} (ISO)`);break}Y.push("Date format is date-time");let G=NW.string().describe("date-time"),J=this.mergeParameterDescription($.description,Y);if(J)G=G.describe(J);return G}defaultZodOptionalHandler($,Y=C80){if(Y.includes($._def.innerType._def.typeName))return this.processZodType($._def.innerType).optional();else return $}defaultZodNullableHandler($,Y=C80){if(Y.includes($._def.innerType._def.typeName))return this.processZodType($._def.innerType).nullable();else return $}collectIntersectionLeaves($){if($ instanceof Sz)return[...this.collectIntersectionLeaves($._def.left),...this.collectIntersectionLeaves($._def.right)];return[$]}defaultZodIntersectionHandler($){let X=this.collectIntersectionLeaves($).map((G)=>this.processZodType(G));if(X.every((G)=>G instanceof m5)){let G={};for(let Q of X)Object.assign(G,Q.shape);let J=NW.object(G);if($.description)J=J.describe($.description);return J}return NW.any().describe($.description||"intersection type")}processToAISDKSchema($){let Y=this.processZodType($);return QE(Y,this.getSchemaTarget())}processToJSONSchema($){return this.processToAISDKSchema($).jsonSchema}},yy8,by8,hy8,ev0,$x0,fy8=class{model;parent;constructor($,Y){this.model=$,this.parent=Y}getModel(){return this.model}getUnsupportedZodTypes(){return ev0}isOptional($){return $ instanceof wz}isObj($){return $ instanceof Pz}isNull($){return $ instanceof uP}isNullable($){return $ instanceof lP}isArr($){return $ instanceof dP}isUnion($){return $ instanceof PF}isString($){return $ instanceof Rz}isNumber($){return $ instanceof Iz}isDate($){return $ instanceof IF}isDefault($){return $ instanceof iP}isIntersection($){return $ instanceof XO}shouldApply(){return this.parent.shouldApply()}getSchemaTarget(){return this.parent.getSchemaTarget()}processZodType($){return this.parent.processZodType($)}defaultZodObjectHandler($,Y={passthrough:!0}){let X=Object.entries($.shape).reduce((J,[Q,W])=>{return J[Q]=this.processZodType(W),J},{}),G=U.object(X);if($._zod.def.catchall instanceof U.ZodNever)G=U.strictObject(X);else if($._zod.def.catchall instanceof U.ZodUnknown){if(Y.passthrough)G=U.looseObject(X)}else if($._zod.def.catchall)G=G.catchall($._zod.def.catchall);if($.description)G=G.describe($.description);return G}mergeParameterDescription($,Y){if(Y.length>0)return($?$+`
`:"")+`constraints: ${Y.join(", ")}`;else return $}defaultUnsupportedZodTypeHandler($,Y=ev0){if(Y.includes($.constructor.name))throw Error(`${this.model.modelId} does not support zod type: ${$.constructor.name}`);return $}defaultZodArrayHandler($,Y=hy8){let X=$._zod.def,G=this.processZodType(X.element),J=U.array(G),Q=[];if(X.checks)for(let H of X.checks){if(H._zod.def.check==="min_length")if(Y.includes("min"))Q.push(`minimum length ${H._zod.def.minimum}`);else J=J.min(H._zod.def.minimum);if(H._zod.def.check==="max_length")if(Y.includes("max"))Q.push(`maximum length ${H._zod.def.maximum}`);else J=J.max(H._zod.def.maximum);if(H._zod.def.check==="length_equals")if(Y.includes("length"))Q.push(`exact length ${H._zod.def.length}`);else J=J.length(H._zod.def.length)}let W=$.meta()?.description,Z=$.description,K=this.mergeParameterDescription(W||Z,Q);if(K)J=J.describe(K);return J}defaultZodUnionHandler($){let Y=$._zod.def.options.map((G)=>this.processZodType(G));if(Y.length<2)throw Error("Union must have at least 2 options");let X=U.union(Y);if($.description)X=X.describe($.description);return X}defaultZodStringHandler($,Y=yy8){let X=[],G=$._zod.def.checks||[],J=[];if(G)for(let H of G)if(Y.includes(H._zod.def.check))switch(H._zod.def.check){case"min_length":X.push(`minimum length ${H._zod.def.minimum}`);break;case"max_length":X.push(`maximum length ${H._zod.def.maximum}`);break;case"string_format":switch(H._zod.def.format){case"email":case"url":case"emoji":case"uuid":case"cuid":X.push(`a valid ${H._zod.def.format}`);break;case"regex":X.push(`input must match this regex ${H._zod.def.pattern}`);break}break}else J.push(H);let Q=U.string();for(let H of J)Q=Q.check(H);let W=$.meta()?.description,Z=$.description,K=this.mergeParameterDescription(W||Z,X);if(K)Q=Q.describe(K);return Q}defaultZodNumberHandler($,Y=by8){let X=[],G=$._zod.def.checks||[],J=[];if(G)for(let Z of G)if(Y.includes(Z._zod.def.check))switch(Z._zod.def.check){case"greater_than":if(Z._zod.def.inclusive)X.push(`greater than or equal to ${Z._zod.def.value}`);else X.push(`greater than ${Z._zod.def.value}`);break;case"less_than":if(Z._zod.def.inclusive)X.push(`lower than or equal to ${Z._zod.def.value}`);else X.push(`lower than ${Z._zod.def.value}`);break;case"multiple_of":{X.push(`multiple of ${Z._zod.def.value}`);break}}else J.push(Z);let Q=U.number();for(let Z of J)switch(Z._zod.def.check){case"number_format":{switch(Z._zod.def.format){case"safeint":Q=Q.int();break}break}default:Q=Q.check(Z)}let W=this.mergeParameterDescription($.description,X);if(W)Q=Q.describe(W);return Q}defaultZodDateHandler($){let Y=[],X=$._zod.def.checks||[];if(X)for(let Q of X)switch(Q._zod.def.check){case"less_than":let W=new Date(Q._zod.def.value);if(!isNaN(W.getTime()))Y.push(`Date must be newer than ${W.toISOString()} (ISO)`);break;case"greater_than":let Z=new Date(Q._zod.def.value);if(!isNaN(Z.getTime()))Y.push(`Date must be older than ${Z.toISOString()} (ISO)`);break}Y.push("Date format is date-time");let G=U.string().describe("date-time"),J=this.mergeParameterDescription($.description,Y);if(J)G=G.describe(J);return G}defaultZodOptionalHandler($,Y=$x0){if(Y.includes($.constructor.name))return this.processZodType($._zod.def.innerType).optional();else return $}defaultZodNullableHandler($,Y=$x0){if(Y.includes($.constructor.name))return this.processZodType($._zod.def.innerType).nullable();else return $}collectIntersectionLeaves($){if($ instanceof XO)return[...this.collectIntersectionLeaves($._zod.def.left),...this.collectIntersectionLeaves($._zod.def.right)];return[$]}defaultZodIntersectionHandler($){let X=this.collectIntersectionLeaves($).map((G)=>this.processZodType(G));if(X.every((G)=>G instanceof Pz)){let G={};for(let Q of X)for(let[W,Z]of Object.entries(Q.shape)){if(W in G)throw Error("Cannot flatten intersections with overlapping keys");G[W]=Z}let J=U.object(G);if($.description)J=J.describe($.description);return J}return U.any().describe($.description||"intersection type")}processToAISDKSchema($){let Y=this.processZodType($);return QE(Y,this.getSchemaTarget())}processToJSONSchema($){return this.processToAISDKSchema($).jsonSchema}},q14,wg=class{model;v3Layer;v4Layer;constructor($){this.model=$,this.v3Layer=new xy8($,this),this.v4Layer=new fy8($,this)}preProcessJSONNode($,Y){}postProcessJSONNode($,Y){}getModel(){return this.model}getUnsupportedZodTypes($){if("_zod"in $)return this.v4Layer.getUnsupportedZodTypes();else return this.v3Layer.getUnsupportedZodTypes()}isOptional($){if("_zod"in $)return this.v4Layer.isOptional($);else return this.v3Layer.isOptional($)}isObj($){if("_zod"in $)return this.v4Layer.isObj($);else return this.v3Layer.isObj($)}isNull($){if("_zod"in $)return this.v4Layer.isNull($);else return this.v3Layer.isNull($)}isNullable($){if("_zod"in $)return this.v4Layer.isNullable($);else return this.v3Layer.isNullable($)}isArr($){if("_zod"in $)return this.v4Layer.isArr($);else return this.v3Layer.isArr($)}isUnion($){if("_zod"in $)return this.v4Layer.isUnion($);else return this.v3Layer.isUnion($)}isString($){if("_zod"in $)return this.v4Layer.isString($);else return this.v3Layer.isString($)}isNumber($){if("_zod"in $)return this.v4Layer.isNumber($);else return this.v3Layer.isNumber($)}isDate($){if("_zod"in $)return this.v4Layer.isDate($);else return this.v3Layer.isDate($)}isDefault($){if("_zod"in $)return this.v4Layer.isDefault($);else return this.v3Layer.isDefault($)}isIntersection($){if("_zod"in $)return this.v4Layer.isIntersection($);else return this.v3Layer.isIntersection($)}defaultZodObjectHandler($,Y={passthrough:!0}){if("_zod"in $)return this.v4Layer.defaultZodObjectHandler($,Y);else return this.v3Layer.defaultZodObjectHandler($,Y)}mergeParameterDescription($,Y){return this.v3Layer.mergeParameterDescription($,Y)}defaultUnsupportedZodTypeHandler($,Y){if("_zod"in $)return this.v4Layer.defaultUnsupportedZodTypeHandler($,Y??ev0);else return this.v3Layer.defaultUnsupportedZodTypeHandler($,Y??T80)}defaultZodArrayHandler($,Y=H44){if("_zod"in $)return this.v4Layer.defaultZodArrayHandler($,Y);else return this.v3Layer.defaultZodArrayHandler($,Y)}defaultZodUnionHandler($){if("_zod"in $)return this.v4Layer.defaultZodUnionHandler($);else return this.v3Layer.defaultZodUnionHandler($)}defaultZodStringHandler($,Y=K44){if("_zod"in $)return this.v4Layer.defaultZodStringHandler($);else return this.v3Layer.defaultZodStringHandler($,Y)}defaultZodNumberHandler($,Y=U44){if("_zod"in $)return this.v4Layer.defaultZodNumberHandler($);else return this.v3Layer.defaultZodNumberHandler($,Y)}defaultZodDateHandler($){if("_zod"in $)return this.v4Layer.defaultZodDateHandler($);else return this.v3Layer.defaultZodDateHandler($)}defaultZodOptionalHandler($,Y){if(!Y)Y=["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber"];let X;if("_zod"in $){let J=$._zod?.def?.innerType?._zod?.def?.type;if(!J)return $;X="Zod"+J.charAt(0).toUpperCase()+J.slice(1)}else X=$._def.innerType._def.typeName;if(Y.includes(X))if("_zod"in $){let G=$._zod?.def?.innerType;if(!G)return $;return this.processZodType(G).optional()}else return this.processZodType($._def.innerType).optional();else return $}defaultZodNullableHandler($,Y){if("_zod"in $)return this.v4Layer.defaultZodNullableHandler($,Y??$x0);else return this.v3Layer.defaultZodNullableHandler($,Y??C80)}defaultZodIntersectionHandler($){if("_zod"in $)return this.v4Layer.defaultZodIntersectionHandler($);else return this.v3Layer.defaultZodIntersectionHandler($)}processToAISDKSchema($){let Y=this.processZodType($);return QE(Y,this.getSchemaTarget())}processToJSONSchema($,Y="input"){let X=W4($),G=$6(X,{target:"draft-07",io:Y});return(0,q14.default)(G,{cb:{pre:(J)=>{this.preProcessJSONNode(J)},post:(J)=>{this.postProcessJSONNode(J)}}}),G}processToCompatSchema($){return{"~standard":{version:1,vendor:"mastra",validate:(Y)=>W4($)["~standard"].validate(Y),jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}defaultObjectHandler($){if($.properties&&$.additionalProperties===void 0)$.additionalProperties=!1;if(!Object.keys($.properties??{}).length)$.required=[];return $}defaultArrayHandler($){let Y=[],X=$.minItems,G=$.maxItems;if(X!==void 0&&G!==void 0&&X===G)Y=[`exact length ${X}`],delete $.minItems,delete $.maxItems;else{if(X!==void 0)Y.push(`minimum length ${X}`),delete $.minItems;if(G!==void 0)Y.push(`maximum length ${G}`),delete $.maxItems}if(Y.length)$.description=this.mergeParameterDescription($.description,Y);return $}defaultStringHandler($){let Y=[];if($.minLength!==void 0)Y.push(`minimum length ${$.minLength}`),delete $.minLength;if($.maxLength!==void 0)Y.push(`maximum length ${$.maxLength}`),delete $.maxLength;switch($.format){case"email":case"emoji":case"uri":case"uuid":case"date-time":case"date":case"time":{Y.push(`a valid ${$.format}`),delete $.pattern,delete $.format;break}}if(Y.length===0&&$.pattern!==void 0)Y.push(`input must match this regex ${$.pattern}`),delete $.pattern;if(Y.length)$.description=this.mergeParameterDescription($.description,Y);return $}defaultNumberHandler($){let Y=[];if($.minimum!==void 0){if($.minimum!==Number.MIN_SAFE_INTEGER)Y.push(`greater than or equal to ${$.minimum}`);delete $.minimum}if($.maximum!==void 0){if($.maximum!==Number.MAX_SAFE_INTEGER)Y.push(`lower than or equal to ${$.maximum}`);delete $.maximum}if($.exclusiveMinimum!==void 0)Y.push(`greater than ${$.exclusiveMinimum}`),delete $.exclusiveMinimum;if($.exclusiveMaximum!==void 0)Y.push(`lower than ${$.exclusiveMaximum}`),delete $.exclusiveMaximum;if($.multipleOf!==void 0)Y.push(`multiple of ${$.multipleOf}`),delete $.multipleOf;if(Y.length)$.description=this.mergeParameterDescription($.description,Y);return $}defaultUnionHandler($){if(Array.isArray($.anyOf)){if($.anyOf=$.anyOf.map((Y)=>{if(typeof Y!=="object"||Y===null)return!1;return this.preProcessJSONNode(Y),this.postProcessJSONNode(Y),Y}).filter(Boolean),$.anyOf.length===1)$=$.anyOf[0]}return $}defaultAllOfHandler($){if(!$.allOf||!Array.isArray($.allOf))return $;let Y={},X=[];for(let G of $.allOf){if(G.properties)Object.assign(Y,G.properties);if(Array.isArray(G.required))X.push(...G.required)}if(delete $.allOf,$.type="object",$.properties=Y,X.length>0)$.required=[...new Set(X)];return $.additionalProperties=!1,$}defaultNullableHandler($){return this.defaultUnionHandler($)}defaultDateHandler($){if($.format==="date"||$.format==="date-time"){let Y=$.format;delete $.format,$.description=this.mergeParameterDescription($.description,[`format: ${Y}`])}return $}defaultEmptySchemaHandler($){if(Object.keys($).length===0)$.type=["string","number","boolean","null"];return $}defaultUnsupportedHandler($,Y=[]){for(let X of Y)if(X in $)delete $[X];return $}isObjectSchema($){return XE($)}isArraySchema($){return T_($)}isStringSchema($){return C_($)}isNumberSchema($){return v80($)}isUnionSchema($){return S_($)}isAllOfSchema($){return k_($)}isOptionalProperty($,Y){return uy8($,Y)}toJSONSchema($){let Y={jsonSchema7:"draft-07","jsonSchema2019-09":"draft-2020-12",openApi3:"openapi-3.0"},X=this.getSchemaTarget(),G=(X&&Y[X])??X,J=W4($),Q=$6(J,{target:G,io:"input"});return(0,q14.default)(Q,{cb:{pre:(W)=>{this.preProcessJSONNode(W)},post:(W)=>{this.postProcessJSONNode(W)}}}),Q}},dy8,Sg,x80,x_,y80,b80,h80;var f80=V0(()=>{q40();q40();hv0();hv0();G40();Gf();cG();KY();s04();V14();O1();bk8=Object.create,I14=Object.defineProperty,hk8=Object.getOwnPropertyDescriptor,P14=Object.getOwnPropertyNames,fk8=Object.getPrototypeOf,gk8=Object.prototype.hasOwnProperty,dk8=mk8({"../../../node_modules/.pnpm/secure-json-parse@2.7.0/node_modules/secure-json-parse/index.js"($,Y){var X=typeof Buffer<"u",G=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,J=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Q(H,z,V){if(V==null){if(z!==null&&typeof z==="object")V=z,z=void 0}if(X&&Buffer.isBuffer(H))H=H.toString();if(H&&H.charCodeAt(0)===65279)H=H.slice(1);let A=JSON.parse(H,z);if(A===null||typeof A!=="object")return A;let F=V&&V.protoAction||"error",N=V&&V.constructorAction||"error";if(F==="ignore"&&N==="ignore")return A;if(F!=="ignore"&&N!=="ignore"){if(G.test(H)===!1&&J.test(H)===!1)return A}else if(F!=="ignore"&&N==="ignore"){if(G.test(H)===!1)return A}else if(J.test(H)===!1)return A;return W(A,{protoAction:F,constructorAction:N,safe:V&&V.safe})}function W(H,{protoAction:z="error",constructorAction:V="error",safe:A}={}){let F=[H];while(F.length){let N=F;F=[];for(let D of N){if(z!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"__proto__")){if(A===!0)return null;else if(z==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.__proto__}if(V!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"constructor")&&Object.prototype.hasOwnProperty.call(D.constructor,"prototype")){if(A===!0)return null;else if(V==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.constructor}for(let L in D){let B=D[L];if(B&&typeof B==="object")F.push(B)}}}return H}function Z(H,z,V){let A=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,V)}finally{Error.stackTraceLimit=A}}function K(H,z){let V=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,{safe:!0})}catch(A){return null}finally{Error.stackTraceLimit=V}}Y.exports=Z,Y.exports.default=Z,Y.exports.parse=Z,Y.exports.safeParse=K,Y.exports.scan=W}}),ck8=Symbol.for(w14),lk8=class $ extends Error{constructor({name:Y,message:X,cause:G}){super(X);this[_14]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,w14)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}};_14=ck8;FD=lk8;C14=`vercel.ai.error.${T14}`,ik8=Symbol.for(C14),nk8=class extends FD{constructor({message:$,cause:Y,argument:X}){super({name:T14,message:$,cause:Y});this[S14]=!0,this.argument=X}static isInstance($){return FD.hasMarker($,C14)}};S14=ik8;v14=`vercel.ai.error.${k14}`,rk8=Symbol.for(v14),A14=class extends FD{constructor({text:$,cause:Y}){super({name:k14,message:`JSON parsing failed: Text: ${$}.
Error message: ${j14(Y)}`,cause:Y});this[x14]=!0,this.text=$}static isInstance($){return FD.hasMarker($,v14)}};x14=rk8;b14=`vercel.ai.error.${y14}`,ak8=Symbol.for(b14),sk8=class $ extends FD{constructor({value:Y,cause:X}){super({name:y14,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${j14(X)}`,cause:X});this[h14]=!0,this.value=Y}static isInstance(Y){return FD.hasMarker(Y,b14)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}};h14=ak8;F14=sk8,tk8=pk8(dk8());JE();w80=Symbol.for("vercel.ai.validator");Jv8=Symbol("Let zodToJsonSchema decide on which parser to use"),D14={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"};yK={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:()=>{if(cv0===void 0)cv0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return cv0},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-_]*$/};Bv8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");_80={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};pv8=uv8;lv8={code:"0",name:"text",parse:($)=>{if(typeof $!=="string")throw Error('"text" parts expect a string value.');return{type:"text",value:$}}},iv8={code:"2",name:"data",parse:($)=>{if(!Array.isArray($))throw Error('"data" parts expect an array value.');return{type:"data",value:$}}},nv8={code:"3",name:"error",parse:($)=>{if(typeof $!=="string")throw Error('"error" parts expect a string value.');return{type:"error",value:$}}},rv8={code:"8",name:"message_annotations",parse:($)=>{if(!Array.isArray($))throw Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:$}}},av8={code:"9",name:"tool_call",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string"||!("args"in $)||typeof $.args!=="object")throw Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:$}}},sv8={code:"a",name:"tool_result",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("result"in $))throw Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:$}}},ov8={code:"b",name:"tool_call_streaming_start",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string")throw Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:$}}},tv8={code:"c",name:"tool_call_delta",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("argsTextDelta"in $)||typeof $.argsTextDelta!=="string")throw Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:$}}},ev8={code:"d",name:"finish_message",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_message" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};return{type:"finish_message",value:Y}}},$x8={code:"e",name:"finish_step",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_step" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason,isContinued:!1};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};if("isContinued"in $&&typeof $.isContinued==="boolean")Y.isContinued=$.isContinued;return{type:"finish_step",value:Y}}},Yx8={code:"f",name:"start_step",parse:($)=>{if($==null||typeof $!=="object"||!("messageId"in $)||typeof $.messageId!=="string")throw Error('"start_step" parts expect an object with an "id" property.');return{type:"start_step",value:{messageId:$.messageId}}}},Xx8={code:"g",name:"reasoning",parse:($)=>{if(typeof $!=="string")throw Error('"reasoning" parts expect a string value.');return{type:"reasoning",value:$}}},Gx8={code:"h",name:"source",parse:($)=>{if($==null||typeof $!=="object")throw Error('"source" parts expect a Source object.');return{type:"source",value:$}}},Jx8={code:"i",name:"redacted_reasoning",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string")throw Error('"redacted_reasoning" parts expect an object with a "data" property.');return{type:"redacted_reasoning",value:{data:$.data}}}},Qx8={code:"j",name:"reasoning_signature",parse:($)=>{if($==null||typeof $!=="object"||!("signature"in $)||typeof $.signature!=="string")throw Error('"reasoning_signature" parts expect an object with a "signature" property.');return{type:"reasoning_signature",value:{signature:$.signature}}}},Wx8={code:"k",name:"file",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string"||!("mimeType"in $)||typeof $.mimeType!=="string")throw Error('"file" parts expect an object with a "data" and "mimeType" property.');return{type:"file",value:$}}},Xx0=[lv8,iv8,nv8,rv8,av8,sv8,ov8,tv8,ev8,$x8,Yx8,Xx8,Gx8,Jx8,Qx8,Wx8];Object.fromEntries(Xx0.map(($)=>[$.code,$]));Object.fromEntries(Xx0.map(($)=>[$.name,$.code]));sv0=Symbol.for("vercel.ai.schema");Hx8=typeof globalThis==="object"?globalThis:global,B14=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Vx8=zx8(YE),Ax8=YE.split(".")[0],Eg=Symbol.for("opentelemetry.js.api."+Ax8),Mg=Hx8;Nx8=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Bg("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Bg("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Bg("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Bg("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Bg("verbose",this._namespace,Y)},$}();(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(kW||(kW={}));j80=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var Z=Rg("diag");if(!Z)return;return Z[J].apply(Z,Ox8([],Bx8(Q),!1))}}var X=this,G=function(J,Q){var W,Z,K;if(Q===void 0)Q={logLevel:kW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=Rg("diag"),V=Lx8((Z=Q.logLevel)!==null&&Z!==void 0?Z:kW.INFO,J);if(z&&!Q.suppressOverrideMessage){var A=(K=Error().stack)!==null&&K!==void 0?K:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+A),V.warn("Current logger will overwrite one already registered from "+A)}return Gx0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){Jx0(Ex8,X)},X.createComponentLogger=function(J){return new Nx8(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();Rx8=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),qx8=new Rx8,wx8=function(){function $(){}return $.prototype.active=function(){return qx8},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,Px8([G],Ix8(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),Tx8=new wx8,i14=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return Gx0(iv0,Y,j80.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,jx8([Y,X,G],_x8(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return Rg(iv0)||Tx8},$.prototype.disable=function(){this._getContextManager().disable(),Jx0(iv0,j80.instance())},$}();(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(ov0||(ov0={}));Cx8={traceId:r14,spanId:n14,traceFlags:ov0.NONE},Og=function(){function $(Y){if(Y===void 0)Y=Cx8;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),Qx0=Mx8("OpenTelemetry Context Key SPAN");xx8=/^([0-9a-f]{32})$/i,yx8=/^[0-9a-f]{16}$/i;nv0=i14.getInstance(),o14=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=nv0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new Og;var Q=G&&a14(G);if(gx8(Q)&&s14(Q))return new Og(Q);else return new Og},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,Z;if(arguments.length<2)return;else if(arguments.length===2)Z=X;else if(arguments.length===3)Q=X,Z=G;else Q=X,W=G,Z=J;var K=W!==null&&W!==void 0?W:nv0.active(),H=this.startSpan(Y,Q,K),z=Zx0(K,H);return nv0.with(z,Z,void 0,H)},$}();mx8=new o14,ux8=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return mx8;return this._delegate=Y,this._delegate},$}(),px8=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new o14},$}(),dx8=new px8,O14=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new ux8(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:dx8},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}();(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(E14||(E14={}));cx8=function(){function $(){this._proxyTracerProvider=new O14,this.wrapSpanContext=fx8,this.isSpanContextValid=s14,this.deleteSpan=kx8,this.getSpan=Wx0,this.getActiveSpan=Sx8,this.getSpanContext=a14,this.setSpan=Zx0,this.setSpanContext=vx8}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=Gx0(rv0,this._proxyTracerProvider,j80.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return Rg(rv0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){Jx0(rv0,j80.instance()),this._proxyTracerProvider=new O14},$}();cx8.getInstance();lx8=Object.defineProperty;$44=`vercel.ai.error.${e14}`,ix8=Symbol.for($44),M14=class extends FD{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:e14,message:$,cause:Y});this[Y44]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return FD.hasMarker($,$44)}};Y44=ix8;X44=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),tv0=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),tv0),U.array(tv0)])),K$=U.record(U.string(),U.record(U.string(),tv0)),nx8=U.array(U.union([U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("image"),data:U.string(),mimeType:U.string().optional()})])),G44=U.object({type:U.literal("text"),text:U.string(),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()}),rx8=U.object({type:U.literal("image"),image:U.union([X44,U.instanceof(URL)]),mimeType:U.string().optional(),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()}),J44=U.object({type:U.literal("file"),data:U.union([X44,U.instanceof(URL)]),filename:U.string().optional(),mimeType:U.string(),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()}),ax8=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()}),sx8=U.object({type:U.literal("redacted-reasoning"),data:U.string(),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()}),ox8=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),args:U.unknown(),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()}),tx8=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),result:U.unknown(),content:nx8.optional(),isError:U.boolean().optional(),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()}),ex8=U.object({role:U.literal("system"),content:U.string(),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()}),$y8=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([G44,rx8,J44]))]),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()}),Yy8=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([G44,J44,ax8,sx8,ox8]))]),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()}),Xy8=U.object({role:U.literal("tool"),content:U.array(tx8),providerOptions:K$.optional(),experimental_providerMetadata:K$.optional()});U.union([ex8,$y8,Yy8,Xy8]);JE({prefix:"aiobj",size:24});JE({prefix:"aiobj",size:24});JE({prefix:"aitxt",size:24});JE({prefix:"msg",size:24});Zy8={};Kx0(Zy8,{object:()=>Uy8,text:()=>Ky8});JE({prefix:"aitxt",size:24});JE({prefix:"msg",size:24});Hy8=U.object({name:U.string(),version:U.string()}).passthrough(),Ux0=U.object({_meta:U.optional(U.object({}).passthrough())}).passthrough(),qg=Ux0,zy8=U.object({method:U.string(),params:U.optional(Ux0)}),Vy8=U.object({experimental:U.optional(U.object({}).passthrough()),logging:U.optional(U.object({}).passthrough()),prompts:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough()),resources:U.optional(U.object({subscribe:U.optional(U.boolean()),listChanged:U.optional(U.boolean())}).passthrough()),tools:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough())}).passthrough();qg.extend({protocolVersion:U.string(),capabilities:Vy8,serverInfo:Hy8,instructions:U.optional(U.string())});Ay8=qg.extend({nextCursor:U.optional(U.string())}),Fy8=U.object({name:U.string(),description:U.optional(U.string()),inputSchema:U.object({type:U.literal("object"),properties:U.optional(U.object({}).passthrough())}).passthrough()}).passthrough();Ay8.extend({tools:U.array(Fy8)});Dy8=U.object({type:U.literal("text"),text:U.string()}).passthrough(),Ny8=U.object({type:U.literal("image"),data:U.string().base64(),mimeType:U.string()}).passthrough(),W44=U.object({uri:U.string(),mimeType:U.optional(U.string())}).passthrough(),Ly8=W44.extend({text:U.string()}),By8=W44.extend({blob:U.string().base64()}),Oy8=U.object({type:U.literal("resource"),resource:U.union([Ly8,By8])}).passthrough();qg.extend({content:U.array(U.union([Dy8,Ny8,Oy8])),isError:U.boolean().default(!1).optional()}).or(qg.extend({toolResult:U.unknown()}));Ey8=U.object({jsonrpc:U.literal(S80),id:U.union([U.string(),U.number().int()])}).merge(zy8).strict(),My8=U.object({jsonrpc:U.literal(S80),id:U.union([U.string(),U.number().int()]),result:qg}).strict(),Ry8=U.object({jsonrpc:U.literal(S80),id:U.union([U.string(),U.number().int()]),error:U.object({code:U.number().int(),message:U.string(),data:U.optional(U.unknown())})}).strict(),qy8=U.object({jsonrpc:U.literal(S80)}).merge(U.object({method:U.string(),params:U.optional(Ux0)})).strict();U.union([Ey8,qy8,My8,Ry8]);Iy8={};Kx0(Iy8,{mergeIntoDataStream:()=>_y8,toDataStream:()=>Py8,toDataStreamResponse:()=>wy8});jy8={};Kx0(jy8,{mergeIntoDataStream:()=>Sy8,toDataStream:()=>Ty8,toDataStreamResponse:()=>Cy8});K44=["regex","emoji","email","url","uuid","cuid","min","max"],U44=["min","max","multipleOf"],H44=["min","max","length"],T80=["ZodIntersection","ZodNever","ZodNull","ZodTuple","ZodUndefined"],C80=["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber","ZodDate","ZodAny","ZodDefault","ZodNullable"],Pt5=[...C80,...T80],yy8=["regex","emoji","email","url","uuid","cuid","min_length","max_length","string_format"],by8=["greater_than","less_than","multiple_of"],hy8=["min","max","length"],ev0=["ZodIntersection","ZodNever","ZodNull","ZodTuple","ZodUndefined"],$x0=["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber","ZodDate","ZodAny","ZodDefault","ZodNullable"],q14=pF(FO(),1);dy8=["date-time","time","date","duration","email","hostname","ipv4","ipv6","uuid"],Sg=class extends wg{getSchemaTarget(){return"jsonSchema7"}isReasoningModel(){let $=this.getModel().modelId;if(!$)return!1;return $.includes("o3")||$.includes("o4")||$.includes("o1")}shouldApply(){let $=this.getModel();if(!this.isReasoningModel()&&($.provider.includes("openai")||$.modelId?.includes("openai")||$.provider.includes("groq")))return!0;return!1}processZodType($){if(GE(U)($)){let Y="_def"in $?$._def.innerType:$._zod?.def?.innerType;if(Y){if(Pg(U)(Y))return this.processZodType(Y).transform((J)=>J===null?void 0:J);return this.processZodType(Y).nullable().transform((G)=>G===null?void 0:G)}return $}else if(Pg(U)($)){let Y="_def"in $?$._def.innerType:$._zod?.def?.innerType;if(Y){if(GE(U)(Y)){let G="_def"in Y?Y._def.innerType:Y._zod?.def?.innerType;if(G)return this.processZodType(G).nullable().transform((Q)=>Q===null?void 0:Q)}return this.processZodType(Y).nullable()}return $}else if(V44(U)($)){let Y="_def"in $?$._def.innerType:$._zod?.def?.innerType,X="_def"in $?$._def.defaultValue:$._zod?.def?.defaultValue;if(Y)return this.processZodType(Y).nullable().transform((J)=>{if(J===null)return typeof X==="function"?X():X;return J});return $}else if(_g(U)($))return this.defaultZodObjectHandler($);else if(Tg(U)($))return this.defaultZodUnionHandler($);else if(jg(U)($))return this.defaultZodArrayHandler($);else if(Cg(U)($)){let Y=this.getModel(),X=["emoji"];if(Y.modelId?.includes("gpt-4o-mini"))return this.defaultZodStringHandler($,["emoji","regex"]);return this.defaultZodStringHandler($,X)}if(v_(U)($))return this.defaultZodIntersectionHandler($);return this.defaultUnsupportedZodTypeHandler($,["ZodNever","ZodUndefined","ZodTuple"])}processToAISDKSchema($){let Y=this.processToCompatSchema($),X=$6(Y);return BX(X,{validate:(G)=>{let J=this.#$(G,X),Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}processToCompatSchema($){let Y=W4($);return{"~standard":{version:1,vendor:"mastra",validate:(X)=>{let G=this.processToJSONSchema($,"input"),J=this.#$(X,G);return Y["~standard"].validate(J)},jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}preProcessJSONNode($,Y){if(k_($))this.defaultAllOfHandler($);if(XE($))this.defaultObjectHandler($);else if(T_($))this.defaultArrayHandler($);else if(v80($))this.defaultNumberHandler($);else if(C_($)){if($.format){if(!dy8.includes($.format))delete $.format,delete $.pattern}this.defaultStringHandler($)}}postProcessJSONNode($){if(S_($))this.defaultUnionHandler($);if($.type===void 0&&!$.anyOf){let Y={};for(let X of Object.keys($))Y[X]=$[X],delete $[X];$.anyOf=[Y,{type:"null"}]}if(XE($)){if($.additionalProperties=!1,$.properties)for(let Y of Object.keys($.properties)){let X=$.properties[Y];if(!$.required)$.required=[];if(!$.required?.includes(Y)){if($["x-optional"]=[...$["x-optional"]||[],Y],$.required?.push(Y),X.type){if(Array.isArray(X.type)){let G=[...X.type];if(!G.includes("null"))G.push("null");let J={...X};delete J.anyOf,delete J.type,delete X.type,X.anyOf=G.map((Q)=>Q==="null"?{type:"null"}:{...J,type:Q})}else if(X.type!=="null"){let G=X.type,J={...X};delete J.anyOf,delete J.type,delete X.type,X.anyOf=[{...J,type:G},{type:"null"}]}}}}}}#$($,Y){let X=this.#Y(Y);if((cy8(X)||X["x-date"]===!0)&&typeof $==="string")return new Date($);if(X.type==="array"||Array.isArray(X.type)&&X.type.includes("array")){if(!Array.isArray($))return $;return $.map((K)=>this.#$(K,X.items))}if(!(X.type==="object"||Array.isArray(X.type)&&X.type.includes("object")))return $;let Q=X.properties;if(!Q||!$)return $;let W=$,Z=X["x-optional"]??[];for(let K in W)if(Z.includes(K)&&W[K]===null)W[K]=void 0;else if(Q[K])W[K]=this.#$(W[K],Q[K]);return W}#Y($){if(Array.isArray($.anyOf)){let Y=$.anyOf.find((X)=>X.type!=="null");if(Y)return Y}return $}};x80=class extends Sg{getSchemaTarget(){return"openApi3"}isReasoningModel(){let $=this.getModel().modelId;if(!$)return!1;return $.includes("o3")||$.includes("o4")||$.includes("o1")}shouldApply(){let $=this.getModel();if(this.isReasoningModel()&&($.provider.includes("openai")||$.modelId?.includes("openai")))return!0;return!1}processZodType($){if(GE(U)($)){let Y="_def"in $?$._def.innerType:$._zod?.def?.innerType;if(Y){if(Pg(U)(Y))return this.processZodType(Y).transform((J)=>J===null?void 0:J);return this.processZodType(Y).nullable().transform((G)=>G===null?void 0:G)}return $}else if(Pg(U)($)){let Y="_def"in $?$._def.innerType:$._zod?.def?.innerType;if(Y&&GE(U)(Y)){let X="_def"in Y?Y._def.innerType:Y._zod?.def?.innerType;if(X)return this.processZodType(X).nullable().transform((J)=>J===null?void 0:J)}if(Y)return this.processZodType(Y).nullable();return $}else if(_g(U)($))return this.defaultZodObjectHandler($,{passthrough:!1});else if(jg(U)($))return this.defaultZodArrayHandler($);else if(Tg(U)($))return this.defaultZodUnionHandler($);else if(V44(U)($)){let Y=$._def,X=Y.innerType,G=typeof Y.defaultValue==="function"?Y.defaultValue():Y.defaultValue,J=[];if(G!==void 0)J.push(`the default value is ${G}`);let Q=this.mergeParameterDescription($.description,J),W=this.processZodType(X);if(Q)W=W.describe(Q);return W}else if(Ax0(U)($))return this.defaultZodNumberHandler($);else if(Cg(U)($))return this.defaultZodStringHandler($);else if(py8(U)($))return this.defaultZodDateHandler($);else if(Vx0(U)($))return U.any().refine((Y)=>Y===null,{message:"must be null"}).describe($.description||"must be null");else if($.constructor.name==="ZodAny")return U.string().describe(($.description??"")+`
Argument was an "any" type, but you (the LLM) do not support "any", so it was cast to a "string" type`);if(v_(U)($))return this.defaultZodIntersectionHandler($);return this.defaultUnsupportedZodTypeHandler($)}},x_=class extends wg{constructor($){super($)}getSchemaTarget(){return"jsonSchema7"}shouldApply(){return this.getModel().modelId.includes("claude")}processZodType($){if(this.isOptional($)){let Y=["ZodObject","ZodArray","ZodUnion","ZodNever","ZodUndefined","ZodTuple"];if(this.getModel().modelId.includes("claude-3.5-haiku"))Y.push("ZodString");return this.defaultZodOptionalHandler($,Y)}else if(this.isObj($))return this.defaultZodObjectHandler($);else if(this.isArr($))return this.defaultZodArrayHandler($,[]);else if(this.isUnion($))return this.defaultZodUnionHandler($);else if(this.isString($))if(this.getModel().modelId.includes("claude-3.5-haiku"))return this.defaultZodStringHandler($,["max","min"]);else return $;else if(Vx0(U)($))return U.any().refine((Y)=>Y===null,{message:"must be null"}).describe($.description||"must be null");else if(v_(U)($))return this.defaultZodIntersectionHandler($);return this.defaultUnsupportedZodTypeHandler($)}processToAISDKSchema($){let Y=this.processToCompatSchema($),X=$6(Y);return BX(X,{validate:(G)=>{let J=this.#$(G,X),Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}processToCompatSchema($){let Y=W4($);return{"~standard":{version:1,vendor:"mastra",validate:(X)=>{let G=this.processToJSONSchema($,"input"),J=this.#$(X,G);return Y["~standard"].validate(J)},jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}preProcessJSONNode($){if(k_($))this.defaultAllOfHandler($);if(XE($))this.defaultObjectHandler($);else if(T_($))this.defaultArrayHandler($);else if(v80($))this.defaultNumberHandler($);else if(C_($))this.defaultStringHandler($)}postProcessJSONNode($){if(S_($))this.defaultUnionHandler($)}#$($,Y){let X=this.#Y(Y,$);if(X["x-date"]===!0&&typeof $==="string")return new Date($);if(X.type==="array"||Array.isArray(X.type)&&X.type.includes("array")){if(!Array.isArray($))return $;return $.map((Z)=>this.#$(Z,X.items))}if(!(X.type==="object"||Array.isArray(X.type)&&X.type.includes("object")))return $;let Q=X.properties;if(!Q||!$)return $;let W=$;for(let Z in W)if(Q[Z])W[Z]=this.#$(W[Z],Q[Z]);return W}#Y($,Y){if(!Array.isArray($.anyOf))return $;let X=$.anyOf,G=X.filter((Q)=>Q.type!=="null");if(X.length===2&&G.length===1)return G[0];let J=Y&&typeof Y==="object"?Object.keys(Y):[];return G.find((Q)=>{let W=Q.properties;return!!W&&J.some((Z)=>(Z in W))})??$}},y80=class extends wg{constructor($){super($)}getSchemaTarget(){return"jsonSchema7"}shouldApply(){return this.getModel().modelId.includes("deepseek")&&!this.getModel().modelId.includes("r1")}processZodType($){if(GE(U)($))return this.defaultZodOptionalHandler($,["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber"]);else if(_g(U)($))return this.defaultZodObjectHandler($);else if(jg(U)($))return this.defaultZodArrayHandler($,["min","max"]);else if(Tg(U)($))return this.defaultZodUnionHandler($);else if(Cg(U)($))return this.defaultZodStringHandler($);else if(v_(U)($))return this.defaultZodIntersectionHandler($);return $}processToAISDKSchema($){let Y=this.processToCompatSchema($),X=$6(Y);return BX(X,{validate:(G)=>{let J=this.#$(G,X),Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}processToCompatSchema($){let Y=W4($);return{"~standard":{version:1,vendor:"mastra",validate:(X)=>{let G=this.processToJSONSchema($,"input"),J=this.#$(X,G);return Y["~standard"].validate(J)},jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}preProcessJSONNode($){if(k_($))this.defaultAllOfHandler($);if(XE($))this.defaultObjectHandler($);else if(T_($))this.defaultArrayHandler($);else if(C_($))this.defaultStringHandler($)}postProcessJSONNode($){if(S_($))this.defaultUnionHandler($)}#$($,Y){let X=this.#Y(Y);if(X["x-date"]===!0&&typeof $==="string")return new Date($);if(X.type==="array"||Array.isArray(X.type)&&X.type.includes("array")){if(!Array.isArray($))return $;return $.map((Z)=>this.#$(Z,X.items))}if(!(X.type==="object"||Array.isArray(X.type)&&X.type.includes("object")))return $;let Q=X.properties;if(!Q||!$)return $;let W=$;for(let Z in W)if(Q[Z])W[Z]=this.#$(W[Z],Q[Z]);return W}#Y($){if(Array.isArray($.anyOf)){let Y=$.anyOf.find((X)=>X.type!=="null");if(Y)return Y}return $}};b80=class extends wg{constructor($){super($)}getSchemaTarget(){return"jsonSchema7"}shouldApply(){return this.getModel().provider.includes("google")||this.getModel().modelId.includes("gemini-")||this.getModel().modelId.includes("google")}processZodType($){if(GE(U)($))return this.defaultZodOptionalHandler($,["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber","ZodNullable"]);else if(Pg(U)($))return this.defaultZodNullableHandler($);else if(Vx0(U)($))return U.any().refine((Y)=>Y===null,{message:"must be null"}).describe($.description||"must be null");else if(_g(U)($))return this.defaultZodObjectHandler($);else if(jg(U)($))return this.defaultZodArrayHandler($,[]);else if(Tg(U)($))return this.defaultZodUnionHandler($);else if(Cg(U)($))return this.defaultZodStringHandler($);else if(Ax0(U)($))return this.defaultZodNumberHandler($);else if(v_(U)($))return this.defaultZodIntersectionHandler($);return this.defaultUnsupportedZodTypeHandler($)}processToJSONSchema($,Y){return super.processToJSONSchema($,Y)}processToAISDKSchema($){let Y=this.processToCompatSchema($),X=$6(Y),G=YV(X);return BX(G,{validate:(J)=>{let Q=this.#$(J,G),W=$.safeParse(Q);return W.success?{success:!0,value:W.data}:{success:!1,error:W.error}}})}processToCompatSchema($){let Y=W4($);return{"~standard":{version:1,vendor:"mastra",validate:(X)=>{let G=this.processToJSONSchema($,"input"),J=this.#$(X,G);return Y["~standard"].validate(J)},jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}preProcessJSONNode($){if(k_($))this.defaultAllOfHandler($);if(XE($))this.defaultObjectHandler($);else if(v80($))this.defaultNumberHandler($);else if(T_($))this.defaultArrayHandler($);else if(C_($))this.defaultStringHandler($)}postProcessJSONNode($){if(S_($))this.defaultUnionHandler($)}#$($,Y){let X=this.#Y(Y);if(X["x-date"]===!0&&typeof $==="string")return new Date($);if(X.type==="array"||Array.isArray(X.type)&&X.type.includes("array")){if(!Array.isArray($))return $;return $.map((Z)=>this.#$(Z,X.items))}if(!(X.type==="object"||Array.isArray(X.type)&&X.type.includes("object")))return $;let Q=X.properties;if(!Q||!$)return $;let W=$;for(let Z in W)if(Q[Z])W[Z]=this.#$(W[Z],Q[Z]);return W}#Y($){if(Array.isArray($.anyOf)){let Y=$.anyOf.find((X)=>X.type!=="null");if(Y)return Y}return $}},h80=class extends wg{constructor($){super($)}getSchemaTarget(){return"jsonSchema7"}shouldApply(){return this.getModel().modelId.includes("meta")}processZodType($){if(GE(U)($))return this.defaultZodOptionalHandler($,["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber"]);else if(_g(U)($))return this.defaultZodObjectHandler($);else if(jg(U)($))return this.defaultZodArrayHandler($,["min","max"]);else if(Tg(U)($))return this.defaultZodUnionHandler($);else if(Ax0(U)($))return this.defaultZodNumberHandler($);else if(Cg(U)($))return this.defaultZodStringHandler($);else if(v_(U)($))return this.defaultZodIntersectionHandler($);return $}processToAISDKSchema($){let Y=this.processToCompatSchema($),X=$6(Y);return BX(X,{validate:(G)=>{let J=this.#$(G,X),Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}processToCompatSchema($){let Y=W4($);return{"~standard":{version:1,vendor:"mastra",validate:(X)=>{let G=this.processToJSONSchema($,"input"),J=this.#$(X,G);return Y["~standard"].validate(J)},jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}preProcessJSONNode($){if(k_($))this.defaultAllOfHandler($);if(XE($))this.defaultObjectHandler($);else if(T_($))this.defaultArrayHandler($);else if(C_($))this.defaultStringHandler($)}postProcessJSONNode($){if(S_($))this.defaultUnionHandler($)}#$($,Y){let X=this.#Y(Y);if(X["x-date"]===!0&&typeof $==="string")return new Date($);if(X.type==="array"||Array.isArray(X.type)&&X.type.includes("array")){if(!Array.isArray($))return $;return $.map((Z)=>this.#$(Z,X.items))}if(!(X.type==="object"||Array.isArray(X.type)&&X.type.includes("object")))return $;let Q=X.properties;if(!Q||!$)return $;let W=$;for(let Z in W)if(Q[Z])W[Z]=this.#$(W[Z],Q[Z]);return W}#Y($){if(Array.isArray($.anyOf)){let Y=$.anyOf.find((X)=>X.type!=="null");if(Y)return Y}return $}}});import{createHash as ly8}from"crypto";function ZE($,Y){let X=[];return JSON.stringify($,function(G,J){if(typeof J==="bigint")return J.toString();if(J!==null&&typeof J==="object"){while(X.length>0&&X[X.length-1]!==this)X.pop();if(X.includes(J))return"[Circular]";X.push(J)}return J},Y)}function Fx0($){if($===null||typeof $!=="object")return $;try{return JSON.stringify($),$}catch{return JSON.parse(ZE($))}}function A44($){if($===null||typeof $!=="object")return!1;let Y=Object.getPrototypeOf($);return Y===Object.prototype||Y===null}function XV($,Y){let X={...$};if(!Y)return X;return Object.keys(Y).forEach((G)=>{let J=X[G],Q=Y[G];if(A44(J)&&A44(Q))X[G]=XV(J,Q);else if(Q!==void 0)X[G]=Q}),X}function GJ($,Y){if($===Y)return!0;if($==null||Y==null)return $===Y;if(typeof $!==typeof Y)return!1;if(Array.isArray($)&&Array.isArray(Y)){if($.length!==Y.length)return!1;return $.every((X,G)=>GJ(X,Y[G]))}if($ instanceof Date&&Y instanceof Date)return $.getTime()===Y.getTime();if(typeof $==="object"&&typeof Y==="object"){let X=$,G=Y,J=Object.keys(X),Q=Object.keys(G);if(J.length!==Q.length)return!1;return J.every((W)=>Object.prototype.hasOwnProperty.call(G,W)&&GJ(X[W],G[W]))}return!1}function b_($){try{let Y=typeof $==="string"?JSON.parse($):$;if(!Y||Y.type!=="object"||!Y.properties)return{};let X={};for(let[G,J]of Object.entries(Y.properties))if(J.default!==void 0)X[G]=typeof J.default==="object"&&J.default!==null?JSON.parse(JSON.stringify(J.default)):J.default;else if(J.type==="object"&&J.properties)X[G]=b_(J);else if(J.type==="object")X[G]={};else if(J.type==="string")X[G]="";else if(J.type==="array")X[G]=[];else if(J.type==="number"||J.type==="integer")X[G]=0;else if(J.type==="boolean")X[G]=!1;else X[G]=null;return X}catch{return{}}}function F44($){return Function("z",`"use strict";return (${$});`)(U)}function g80($){return typeof $==="object"&&$!==null&&"_def"in $&&"parse"in $&&typeof $.parse==="function"&&"safeParse"in $&&typeof $.safeParse==="function"}function ny8($){return ly8("sha256").update($).digest("hex").slice(0,8)}function ry8($){let Y="inputSchema"in $?$.inputSchema:ay8($),X=!("id"in $)?$.description?`tool-${ny8($.description)}`:`tool-${Math.random().toString(36).substring(2,9)}`:$.id;return{...$,id:X,inputSchema:Y}}function m80($){return Object.keys($).reduce((X,G)=>{let J=$?.[G];if(J){if(typeof J==="function"&&!(J instanceof RW)&&!BU(J))throw new G0({id:"TOOL_INVALID_FORMAT",domain:"TOOL",category:"USER",text:`Tool "${G}" is not a valid tool format. Tools must be created using createTool() or be a valid Vercel AI SDK tool. Received a function.`});if(BU(J))X[G]=ry8(J);else X[G]=J}return X},{})}function ay8($){let Y=$.parameters??U.object({});if(typeof Y==="function")Y=Y();return g80(Y)?Y:F44(B80(Y))}function VY($,Y,X,G,J){return new iy8({originalTool:$,options:Y,logType:X,autoResumeSuspendedTools:G,backgroundTaskEnabled:J}).build()}function u80({mastra:$,logger:Y}){return new Proxy($,{get(X,G){if(Reflect.has(X,G)){let Q=Reflect.get(X,G);if(typeof Q==="function")return Q.bind(X);return Q}if(G==="logger")return Y.warn("Please use 'getLogger' instead, logger is deprecated"),Reflect.apply(X.getLogger,X,[]);if(G==="storage")return Y.warn("Please use 'getStorage' instead, storage is deprecated"),Reflect.get(X,"storage");if(G==="agents")return Y.warn("Please use 'listAgents' instead, agents is deprecated"),Reflect.apply(X.listAgents,X,[]);if(G==="tts")return Y.warn("Please use 'getTTS' instead, tts is deprecated"),Reflect.apply(X.getTTS,X,[]);if(G==="vectors")return Y.warn("Please use 'getVectors' instead, vectors is deprecated"),Reflect.apply(X.getVectors,X,[]);if(G==="memory")return Y.warn("Please use 'getMemory' instead, memory is deprecated"),Reflect.get(X,"memory");return Reflect.get(X,G)}})}function b7($,Y="identifier"){if(!D44.test($)||$.length>63)throw Error(`Invalid ${Y}: ${$}. Must start with a letter or underscore, contain only letters, numbers, or underscores, and be at most 63 characters long.`);return $}function Dx0($){if(!$)throw Error("Field key cannot be empty");let Y=$.split(".");for(let X of Y)if(!D44.test(X)||X.length>63)throw Error(`Invalid field key segment: ${X} in ${$}`);return $}function Nx0($,Y){if(!$||typeof $!=="object")return $;let X={};for(let G of Y){let J=N44($,G);if(J!==void 0)L44(X,G,J)}return X}function N44($,Y){return Y.split(".").reduce((X,G)=>{return X&&typeof X==="object"?X[G]:void 0},$)}function L44($,Y,X){let G=Y.split("."),J=G.pop();if(!J)return;for(let W of G)if(W==="__proto__"||W==="constructor"||W==="prototype")return;if(J==="__proto__"||J==="constructor"||J==="prototype")return;let Q=$;for(let W of G){let Z=Object.prototype.hasOwnProperty.call(Q,W)?Q[W]:void 0;if(Z===null||typeof Z!=="object")Object.defineProperty(Q,W,{value:Object.create(null),writable:!0,enumerable:!0,configurable:!0});Q=Q[W]}Object.defineProperty(Q,J,{value:X,writable:!0,enumerable:!0,configurable:!0})}var iy8,y_=($)=>new Promise((Y)=>setTimeout(Y,$)),D44,Lx0=($)=>{return Object.fromEntries(Object.entries($).filter(([Y,X])=>X!==void 0))};var xU=V0(()=>{s40();Ow();Xf();DO();aw();SO();uz();Jg();dZ();EW();wF();yv0();O1();f80();iy8=class extends u8{originalTool;options;logType;constructor($){super({name:"CoreToolBuilder"});this.originalTool=$.originalTool,this.options=$.options,this.logType=$.logType;let Y=!!$.backgroundTaskEnabled,X=$.autoResumeSuspendedTools||this.originalTool.id?.startsWith("agent-")||this.originalTool.id?.startsWith("workflow-");if(!BU(this.originalTool)&&!Bw(this.originalTool)){if(Y||X){let G=this.originalTool.inputSchema;if(typeof G==="function")G=G();if(!G)G=U.object({});if(Dw(G)){let J=G;if(Y)J=J.extend({_background:w04});if(X)J=J.extend({suspendedToolRunId:U.string().describe("The runId of the suspended tool").nullable().optional(),resumeData:U.any().describe("The resumeData object created from the resumeSchema of suspended tool").optional()});this.originalTool.inputSchema=J}else{let J=$6(G,{io:"input"});if(J&&typeof J==="object"&&J.type==="object"){if(Y)J.properties={...J.properties,_background:P04};if(X)J.properties={...J.properties,suspendedToolRunId:{type:["string","null"],description:"The runId of the suspended tool"},resumeData:{description:"The resumeData object created from the resumeSchema of suspended tool"}};this.originalTool.inputSchema=W4(J)}}}}}getParameters=()=>{if(BU(this.originalTool)){let Y=this.originalTool.parameters??("inputSchema"in this.originalTool?this.originalTool.inputSchema:void 0)??U.object({});if(typeof Y==="function")Y=Y();return Y}let $=this.originalTool.inputSchema;if(V5($))return $;if(typeof $==="function")$=$();return $};getOutputSchema=()=>{if("outputSchema"in this.originalTool){let $=this.originalTool.outputSchema;if(V5($))return $;if(typeof $==="function")$=$();return $}return null};getResumeSchema=()=>{if("resumeSchema"in this.originalTool){let $=this.originalTool.resumeSchema;if(typeof $==="function")$=$();return $}return null};getSuspendSchema=()=>{if("suspendSchema"in this.originalTool){let $=this.originalTool.suspendSchema;if(typeof $==="function")$=$();return $}return null};buildProviderTool($){if("type"in $&&($.type==="provider-defined"||$.type==="provider")&&"id"in $&&typeof $.id==="string"&&$.id.includes(".")){let Y="parameters"in $?$.parameters:("inputSchema"in $)?$.inputSchema:void 0;if(typeof Y==="function")Y=Y();let X="outputSchema"in $?$.outputSchema:void 0;if(typeof X==="function")X=X();let G;if(Y!==void 0&&Y!==null)if(typeof Y==="object"&&"jsonSchema"in Y)G=Y;else if(V5(Y))G={jsonSchema:$6(Y,{io:"input"})};else G=QE(Y);else G={jsonSchema:{type:"object",properties:{},additionalProperties:!1}};let J;if(X!==void 0&&X!==null)if(typeof X==="object"&&"jsonSchema"in X)J=X;else if(V5(X))J={jsonSchema:$6(X)};else J=QE(X);return{...J?{outputSchema:J}:{},type:"provider-defined",id:$.id,..."name"in $&&typeof $.name==="string"?{name:$.name}:{},args:"args"in this.originalTool?this.originalTool.args:{},description:$.description,parameters:G,execute:this.originalTool.execute?this.createExecute(this.originalTool,{...this.options,description:this.originalTool.description},this.logType):void 0,toModelOutput:"toModelOutput"in this.originalTool?this.originalTool.toModelOutput:void 0,transform:"transform"in this.originalTool?this.originalTool.transform:void 0,inputExamples:"inputExamples"in this.originalTool?this.originalTool.inputExamples:void 0}}return}createLogMessageOptions({agentName:$,toolName:Y,type:X}){let G=X==="toolset"?"toolset":"tool";return{start:`Executing ${G}`,error:`Failed ${G} execution`,logData:{agent:$,tool:Y}}}createExecute($,Y,X){let{logger:G,mastra:J,memory:Q,requestContext:W,model:Z,tracingContext:K,tracingPolicy:H,...z}=Y,V={modelId:Z?.modelId,provider:Z?.provider,specificationVersion:Z?.specificationVersion},{start:A,logData:F}=this.createLogMessageOptions({agentName:Y.agentName,toolName:Y.name,type:X}),N=!BU($)&&"mcpMetadata"in $?$.mcpMetadata:void 0,D=async(L,B,O)=>{try{let E,M=null;if(BU($))E=await DQ({span:O,fn:async()=>$?.execute?.(L,B)});else{let q=Y.mastra?vf(Y.mastra,{currentSpan:O}):Y.mastra,w=this.getResumeSchema(),I={threadId:Y.threadId,resourceId:Y.resourceId,mastra:q,memory:Y.memory,runId:Y.runId,requestContext:B.requestContext??Y.requestContext??new p1,workspace:B.workspace??Y.workspace,browser:Y.browser,writer:new PW({prefix:"tool",callId:B.toolCallId,name:Y.name,runId:Y.runId},Y.outputWriter||B.outputWriter),...g4({currentSpan:O}),abortSignal:B.abortSignal,suspend:(S,T)=>{M=S;let v={...T??{},resumeSchema:T?.resumeSchema??(w?JSON.stringify($6(W4(w),{io:"input"})):void 0)};return B.suspend?.(S,v)},resumeData:B.resumeData},P=B.toolCallId&&B.messages||Y.agentName&&Y.threadId&&!Y.workflowId,_=!P&&(Y.workflow||Y.workflowId),C;if(P){let{suspend:S,resumeData:T,threadId:v,resourceId:x,...y}=I;C={...y,agent:{agentId:Y.agentId||"",toolCallId:B.toolCallId||"",messages:B.messages||[],suspend:S,resumeData:T,threadId:v,resourceId:x,outputWriter:B.outputWriter,flushMessages:B.flushMessages}}}else if(_){let{suspend:S,resumeData:T,...v}=I;C={...v,workflow:Y.workflow||{runId:Y.runId,workflowId:Y.workflowId,state:Y.state,setState:Y.setState,suspend:S,resumeData:T}}}else if(B.mcp)C={...I,mcp:B.mcp};else C=I;let k=B.resumeData;if(k){let S=Kf(w,k,Y.name);if(S.error)return G?.warn(S.error.message),O?.end({output:S.error,attributes:{success:!1}}),S.error}E=await DQ({span:O,fn:async()=>$?.execute?.(L,C)})}if(M){let q=this.getSuspendSchema(),w=AC0(q,M,Y.name);if(w.error)return G?.warn(w.error.message),O?.end({output:w.error,attributes:{success:!1}}),w.error}if(typeof E>"u"&&!!M)return O?.end({output:E,attributes:{success:!0}}),E;if(BU($)){let q=this.getOutputSchema(),w=FC0(q,E,Y.name,!1);if(w.error)return G?.warn(w.error.message),O?.end({output:w.error,attributes:{success:!1}}),w.error;E=w.data}return O?.end({output:E,attributes:{success:!0}}),E}catch(E){throw O?.error({error:E,attributes:{success:!1}}),E}};return async(L,B)=>{let O=Y.logger||this.logger,E=B?.tracingContext||Y.tracingContext,M=B?.requestContext??Y.requestContext,R=wW({type:N?"mcp_tool_call":"tool_call",name:N?`mcp_tool: '${Y.name}' on '${N.serverName}'`:`tool: '${Y.name}'`,input:L,entityType:J6.TOOL,entityId:Y.name,entityName:Y.name,attributes:N?{mcpServer:N.serverName,serverVersion:N.serverVersion,toolDescription:Y.description}:{toolDescription:Y.description,toolType:X||"tool"},tracingPolicy:Y.tracingPolicy,tracingContext:E,requestContext:M,mastra:Y.mastra&&"observability"in Y.mastra?Y.mastra:void 0});try{O.debug(A,{...F,...z,model:V,args:L});let q=this.getParameters(),{data:w,error:I}=Kf(q,L,Y.name),P=I?.message?.includes("suspendedToolRunId: Required")&&!L?.resumeData;if(I&&!P)return O.warn("Tool input validation failed",{...F,validationError:I.message}),R?.end({output:I,attributes:{success:!1}}),I;return L=w,await new Promise((_,C)=>{setImmediate(async()=>{try{let k=await D(L,B,R);_(k)}catch(k){C(k)}})})}catch(q){let w=new G0({id:"TOOL_EXECUTION_FAILED",domain:"TOOL",category:"USER",details:{errorMessage:String(q),argsJson:ZE(L),model:Z?.modelId??""}},q);throw R?.error({error:w,attributes:{success:!1}}),O.trackException(w,{...F,...z,model:V,args:L}),w}}}buildV5(){let $=this.build();if(!$.parameters)throw Error("Tool parameters are required");let Y={...$,inputSchema:$.parameters,onInputStart:"onInputStart"in this.originalTool?this.originalTool.onInputStart:void 0,onInputDelta:"onInputDelta"in this.originalTool?this.originalTool.onInputDelta:void 0,onInputAvailable:"onInputAvailable"in this.originalTool?this.originalTool.onInputAvailable:void 0,onOutput:"onOutput"in this.originalTool?this.originalTool.onOutput:void 0};if($.type==="provider-defined"){let{execute:X,parameters:G,...J}=Y,Q=("name"in $&&typeof $.name==="string"?$.name:null)||$.id.split(".")[1]||$.id;return{...J,type:$.type,id:$.id,name:Q,args:$.args}}return Y}build(){let $=this.buildProviderTool(this.originalTool);if($)return $;let Y=this.options.model,X=[];if(Y){let z="supportsStructuredOutputs"in Y?Y.supportsStructuredOutputs??!1:!1,V={modelId:Y.modelId,supportsStructuredOutputs:z,provider:Y.provider};X.push(new x80(V),new Sg(V),new b80(V),new x_(V),new y80(V),new h80(V))}let G=this.getParameters(),J;if(G)if(V5(G)){let z=X.find((A)=>A.shouldApply()),V;if(z)V=z.processToCompatSchema(G);else V=W4(G);J=BX($6(V,{io:"input"}),{validate:(A)=>{let F=V["~standard"].validate(A);if(F instanceof Promise)return F.then((N)=>{if("issues"in N&&N.issues)return{success:!1,error:Error(N.issues.map((D)=>D.message).join(", "))};return{success:!0,value:N.value}});if("issues"in F&&F.issues)return{success:!1,error:Error(F.issues.map((N)=>N.message).join(", "))};return{success:!0,value:F.value}}})}else J=WE({schema:G,compatLayers:X,mode:"aiSdkSchema"});let Q=this.getOutputSchema(),W;if(Q)if(V5(Q))W=$6(Q,{io:"output"});else W=WE({schema:Q,compatLayers:[],mode:"aiSdkSchema"});let Z=!1,K;if(typeof this.options.requireApproval==="function")Z=!0,K=this.options.requireApproval;else if(typeof this.options.requireApproval==="boolean")Z=this.options.requireApproval,K=void 0;if(BU(this.originalTool)&&"needsApproval"in this.originalTool){let z=this.originalTool.needsApproval;if(typeof z==="boolean")Z=z,K=void 0;else if(typeof z==="function")K=z,Z=!0}return{...{type:"function",description:this.originalTool.description,requireApproval:Z,needsApprovalFn:K,hasSuspendSchema:!!this.getSuspendSchema(),execute:this.originalTool.execute?this.createExecute(this.originalTool,{...this.options,description:this.originalTool.description},this.logType):void 0},id:"id"in this.originalTool?this.originalTool.id:void 0,parameters:J??U.object({}),outputSchema:W,strict:"strict"in this.originalTool?this.originalTool.strict:void 0,providerOptions:"providerOptions"in this.originalTool?this.originalTool.providerOptions:void 0,mcp:"mcp"in this.originalTool?this.originalTool.mcp:void 0,toModelOutput:"toModelOutput"in this.originalTool?this.originalTool.toModelOutput:void 0,transform:"transform"in this.originalTool?this.originalTool.transform:void 0,inputExamples:"inputExamples"in this.originalTool?this.originalTool.inputExamples:void 0,onInputStart:"onInputStart"in this.originalTool?this.originalTool.onInputStart:void 0,onInputDelta:"onInputDelta"in this.originalTool?this.originalTool.onInputDelta:void 0,onInputAvailable:"onInputAvailable"in this.originalTool?this.originalTool.onInputAvailable:void 0,onOutput:"onOutput"in this.originalTool?this.originalTool.onOutput:void 0,backgroundConfig:this.options.backgroundConfig}}};D44=/^[a-zA-Z_][a-zA-Z0-9_]*$/});var h_,p80,d80;var Bx0=V0(()=>{EU();xU();h_=class extends QG{listKey="mcpServers";versionMetadataFields=["id","mcpServerId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"MCP_SERVERS"})}},p80=class extends h_{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.mcpServers.clear(),this.db.mcpServerVersions.clear()}async getById($){let Y=this.db.mcpServers.get($);return Y?this.deepCopyConfig(Y):null}async create($){let{mcpServer:Y}=$;if(this.db.mcpServers.has(Y.id))throw Error(`MCP server with id ${Y.id} already exists`);let X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};this.db.mcpServers.set(Y.id,G);let{id:J,authorId:Q,metadata:W,...Z}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,mcpServerId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),this.deepCopyConfig(G)}async update($){let{id:Y,...X}=$,G=this.db.mcpServers.get(Y);if(!G)throw Error(`MCP server with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:Z}=X,K={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{activeVersionId:Q},...Z!==void 0&&{status:Z},...W!==void 0&&{metadata:{...G.metadata,...W}},updatedAt:new Date};return this.db.mcpServers.set(Y,K),this.deepCopyConfig(K)}async delete($){this.db.mcpServers.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W="published"}=$||{},{field:Z,direction:K}=this.parseOrderBy(G),H=A4(X,100);if(Y<0)throw Error("page must be >= 0");let z=Number.MAX_SAFE_INTEGER/2;if(Y*H>z)throw Error("page value too large");let V=Array.from(this.db.mcpServers.values());if(W)V=V.filter((L)=>L.status===W);if(J!==void 0)V=V.filter((L)=>L.authorId===J);if(Q&&Object.keys(Q).length>0)V=V.filter((L)=>{if(!L.metadata)return!1;return Object.entries(Q).every(([B,O])=>GJ(L.metadata[B],O))});let F=this.sortConfigs(V,Z,K).map((L)=>this.deepCopyConfig(L)),{offset:N,perPage:D}=B4(Y,X,H);return{mcpServers:F.slice(N,N+H),total:F.length,page:Y,perPage:D,hasMore:N+H<F.length}}async createVersion($){if(this.db.mcpServerVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.mcpServerVersions.values())if(X.mcpServerId===$.mcpServerId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for MCP server ${$.mcpServerId}`);let Y={...$,createdAt:new Date};return this.db.mcpServerVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.mcpServerVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.mcpServerVersions.values())if(X.mcpServerId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.mcpServerVersions.values())if(X.mcpServerId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{mcpServerId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=A4(G,20);if(X<0)throw Error("page must be >= 0");let K=Number.MAX_SAFE_INTEGER/2;if(X*Z>K)throw Error("page value too large");let H=Array.from(this.db.mcpServerVersions.values()).filter((D)=>D.mcpServerId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:A,perPage:F}=B4(X,G,Z);return{versions:z.slice(A,A+Z),total:V,page:X,perPage:F,hasMore:A+Z<V}}async deleteVersion($){this.db.mcpServerVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.mcpServerVersions.entries())if(G.mcpServerId===$)Y.push(X);for(let X of Y)this.db.mcpServerVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.mcpServerVersions.values())if(X.mcpServerId===$)Y++;return Y}deepCopyConfig($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return{...$,tools:$.tools?JSON.parse(JSON.stringify($.tools)):$.tools,agents:$.agents?JSON.parse(JSON.stringify($.agents)):$.agents,workflows:$.workflows?JSON.parse(JSON.stringify($.workflows)):$.workflows,repository:$.repository?{...$.repository}:$.repository,changedFields:$.changedFields?[...$.changedFields]:$.changedFields}}sortConfigs($,Y,X){return $.sort((G,J)=>{let Q=G[Y].getTime(),W=J[Y].getTime();return X==="ASC"?Q-W:W-Q})}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},d80=class extends h_{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"mcp-servers.json",parentIdField:"mcpServerId",name:"FilesystemMCPServersStorage",versionMetadataFields:["id","mcpServerId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{mcpServer:Y}=$,X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,G);let{id:J,authorId:Q,metadata:W,...Z}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,mcpServerId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),structuredClone(G)}async update($){let{id:Y,...X}=$;return this.helpers.updateEntity(Y,X)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"mcpServers",filters:{authorId:J,metadata:Q,status:W}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"mcpServerId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});var f_,c80,l80;var Ox0=V0(()=>{EU();xU();f_=class extends QG{listKey="promptBlocks";versionMetadataFields=["id","blockId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"PROMPT_BLOCKS"})}},c80=class extends f_{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.promptBlocks.clear(),this.db.promptBlockVersions.clear()}async getById($){let Y=this.db.promptBlocks.get($);return Y?this.deepCopyBlock(Y):null}async create($){let{promptBlock:Y}=$;if(this.db.promptBlocks.has(Y.id))throw Error(`Prompt block with id ${Y.id} already exists`);let X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};this.db.promptBlocks.set(Y.id,G);let{id:J,authorId:Q,metadata:W,...Z}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,blockId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),this.deepCopyBlock(G)}async update($){let{id:Y,...X}=$,G=this.db.promptBlocks.get(Y);if(!G)throw Error(`Prompt block with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:Z}=X,K={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{activeVersionId:Q},...Z!==void 0&&{status:Z},...W!==void 0&&{metadata:{...G.metadata,...W}},updatedAt:new Date};return this.db.promptBlocks.set(Y,K),this.deepCopyBlock(K)}async delete($){this.db.promptBlocks.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{},{field:Z,direction:K}=this.parseOrderBy(G),H=A4(X,100);if(Y<0)throw Error("page must be >= 0");let z=Number.MAX_SAFE_INTEGER/2;if(Y*H>z)throw Error("page value too large");let V=Array.from(this.db.promptBlocks.values());if(W)V=V.filter((L)=>L.status===W);if(J!==void 0)V=V.filter((L)=>L.authorId===J);if(Q&&Object.keys(Q).length>0)V=V.filter((L)=>{if(!L.metadata)return!1;return Object.entries(Q).every(([B,O])=>GJ(L.metadata[B],O))});let F=this.sortBlocks(V,Z,K).map((L)=>this.deepCopyBlock(L)),{offset:N,perPage:D}=B4(Y,X,H);return{promptBlocks:F.slice(N,N+H),total:F.length,page:Y,perPage:D,hasMore:N+H<F.length}}async createVersion($){if(this.db.promptBlockVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.promptBlockVersions.values())if(X.blockId===$.blockId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for prompt block ${$.blockId}`);let Y={...$,createdAt:new Date};return this.db.promptBlockVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.promptBlockVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.promptBlockVersions.values())if(X.blockId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.promptBlockVersions.values())if(X.blockId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{blockId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=A4(G,20);if(X<0)throw Error("page must be >= 0");let K=Number.MAX_SAFE_INTEGER/2;if(X*Z>K)throw Error("page value too large");let H=Array.from(this.db.promptBlockVersions.values()).filter((D)=>D.blockId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:A,perPage:F}=B4(X,G,Z);return{versions:z.slice(A,A+Z),total:V,page:X,perPage:F,hasMore:A+Z<V}}async deleteVersion($){this.db.promptBlockVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.promptBlockVersions.entries())if(G.blockId===$)Y.push(X);for(let X of Y)this.db.promptBlockVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.promptBlockVersions.values())if(X.blockId===$)Y++;return Y}deepCopyBlock($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return{...$,rules:$.rules?JSON.parse(JSON.stringify($.rules)):$.rules,changedFields:$.changedFields?[...$.changedFields]:$.changedFields}}sortBlocks($,Y,X){return $.sort((G,J)=>{let Q=G[Y].getTime(),W=J[Y].getTime();return X==="ASC"?Q-W:W-Q})}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},l80=class extends f_{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"prompt-blocks.json",parentIdField:"blockId",name:"FilesystemPromptBlocksStorage",versionMetadataFields:["id","blockId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{promptBlock:Y}=$,X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,G);let{id:J,authorId:Q,metadata:W,...Z}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,blockId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),structuredClone(G)}async update($){let{id:Y,...X}=$;return this.helpers.updateEntity(Y,X)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"promptBlocks",filters:{authorId:J,metadata:Q,status:W}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"blockId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});var g_,i80,n80;var Ex0=V0(()=>{EU();xU();g_=class extends QG{listKey="scorerDefinitions";versionMetadataFields=["id","scorerDefinitionId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"SCORER_DEFINITIONS"})}},i80=class extends g_{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.scorerDefinitions.clear(),this.db.scorerDefinitionVersions.clear()}async getById($){let Y=this.db.scorerDefinitions.get($);return Y?this.deepCopyScorer(Y):null}async create($){let{scorerDefinition:Y}=$;if(this.db.scorerDefinitions.has(Y.id))throw Error(`Scorer definition with id ${Y.id} already exists`);let X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};this.db.scorerDefinitions.set(Y.id,G);let{id:J,authorId:Q,metadata:W,...Z}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,scorerDefinitionId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),this.deepCopyScorer(G)}async update($){let{id:Y,...X}=$,G=this.db.scorerDefinitions.get(Y);if(!G)throw Error(`Scorer definition with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:Z}=X,K={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{activeVersionId:Q},...Z!==void 0&&{status:Z},...W!==void 0&&{metadata:{...G.metadata,...W}},updatedAt:new Date};return this.db.scorerDefinitions.set(Y,K),this.deepCopyScorer(K)}async delete($){this.db.scorerDefinitions.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{},{field:Z,direction:K}=this.parseOrderBy(G),H=A4(X,100);if(Y<0)throw Error("page must be >= 0");let z=Number.MAX_SAFE_INTEGER/2;if(Y*H>z)throw Error("page value too large");let V=Array.from(this.db.scorerDefinitions.values());if(W)V=V.filter((L)=>L.status===W);if(J!==void 0)V=V.filter((L)=>L.authorId===J);if(Q&&Object.keys(Q).length>0)V=V.filter((L)=>{if(!L.metadata)return!1;return Object.entries(Q).every(([B,O])=>GJ(L.metadata[B],O))});let F=this.sortScorers(V,Z,K).map((L)=>this.deepCopyScorer(L)),{offset:N,perPage:D}=B4(Y,X,H);return{scorerDefinitions:F.slice(N,N+H),total:F.length,page:Y,perPage:D,hasMore:N+H<F.length}}async createVersion($){if(this.db.scorerDefinitionVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.scorerDefinitionVersions.values())if(X.scorerDefinitionId===$.scorerDefinitionId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for scorer definition ${$.scorerDefinitionId}`);let Y={...$,createdAt:new Date};return this.db.scorerDefinitionVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.scorerDefinitionVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.scorerDefinitionVersions.values())if(X.scorerDefinitionId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.scorerDefinitionVersions.values())if(X.scorerDefinitionId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{scorerDefinitionId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=A4(G,20);if(X<0)throw Error("page must be >= 0");let K=Number.MAX_SAFE_INTEGER/2;if(X*Z>K)throw Error("page value too large");let H=Array.from(this.db.scorerDefinitionVersions.values()).filter((D)=>D.scorerDefinitionId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:A,perPage:F}=B4(X,G,Z);return{versions:z.slice(A,A+Z),total:V,page:X,perPage:F,hasMore:A+Z<V}}async deleteVersion($){this.db.scorerDefinitionVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.scorerDefinitionVersions.entries())if(G.scorerDefinitionId===$)Y.push(X);for(let X of Y)this.db.scorerDefinitionVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.scorerDefinitionVersions.values())if(X.scorerDefinitionId===$)Y++;return Y}deepCopyScorer($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return{...$,model:$.model?JSON.parse(JSON.stringify($.model)):$.model,scoreRange:$.scoreRange?JSON.parse(JSON.stringify($.scoreRange)):$.scoreRange,presetConfig:$.presetConfig?JSON.parse(JSON.stringify($.presetConfig)):$.presetConfig,defaultSampling:$.defaultSampling?JSON.parse(JSON.stringify($.defaultSampling)):$.defaultSampling,changedFields:$.changedFields?[...$.changedFields]:$.changedFields}}sortScorers($,Y,X){return $.sort((G,J)=>{let Q=G[Y].getTime(),W=J[Y].getTime();return X==="ASC"?Q-W:W-Q})}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},n80=class extends g_{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"scorer-definitions.json",parentIdField:"scorerDefinitionId",name:"FilesystemScorerDefinitionsStorage",versionMetadataFields:["id","scorerDefinitionId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{scorerDefinition:Y}=$,X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,G);let{id:J,authorId:Q,metadata:W,...Z}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,scorerDefinitionId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),structuredClone(G)}async update($){let{id:Y,...X}=$;return this.helpers.updateEntity(Y,X)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"scorerDefinitions",filters:{authorId:J,metadata:Q,status:W}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"scorerDefinitionId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});import{randomUUID as B44}from"crypto";var m_,r80,a80;var Mx0=V0(()=>{EU();m_=class extends QG{listKey="skills";versionMetadataFields=["id","skillId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"SKILLS"})}},r80=class extends m_{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.skills.clear(),this.db.skillVersions.clear()}async getById($){let Y=this.db.skills.get($);return Y?this.deepCopyConfig(Y):null}async create($){let{skill:Y}=$;if(this.db.skills.has(Y.id))throw Error(`Skill with id ${Y.id} already exists`);let X=new Date,G=Y.visibility??(Y.authorId?"private":void 0),J={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,visibility:G,favoriteCount:0,createdAt:X,updatedAt:X};this.db.skills.set(Y.id,J);let{id:Q,authorId:W,visibility:Z,...K}=Y,H=B44();try{await this.createVersion({id:H,skillId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"})}catch(z){throw this.db.skills.delete(Y.id),z}return this.deepCopyConfig(J)}async update($){let{id:Y,...X}=$,G=this.db.skills.get(Y);if(!G)throw Error(`Skill with id ${Y} not found`);let{authorId:J,visibility:Q,activeVersionId:W,status:Z,...K}=X,H={};for(let[F,N]of Object.entries(K))if(N!==void 0)H[F]=N;let z=["name","description","instructions","license","compatibility","source","references","scripts","assets","files","metadata","tree"],V=z.some((F)=>(F in H)),A={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{visibility:Q},...W!==void 0&&{activeVersionId:W},...Z!==void 0&&{status:Z},updatedAt:new Date};if(W!==void 0&&Z===void 0)A.status="published";if(V){let F=await this.getLatestVersion(Y);if(!F)throw Error(`No versions found for skill ${Y}`);let{id:N,skillId:D,versionNumber:L,changedFields:B,changeMessage:O,createdAt:E,...M}=F,R={...M,...H},q=z.filter((w)=>(w in H)&&JSON.stringify(H[w])!==JSON.stringify(M[w]));if(q.length>0){let w=B44(),I=F.versionNumber+1;await this.createVersion({id:w,skillId:Y,versionNumber:I,...R,changedFields:q,changeMessage:`Updated ${q.join(", ")}`})}}return this.db.skills.set(Y,A),this.deepCopyConfig(A)}async delete($){this.db.skills.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,status:Q,visibility:W,metadata:Z,entityIds:K,pinFavoritedFor:H,favoritedOnly:z}=$||{},{field:V,direction:A}=this.parseOrderBy(G),F=A4(X,100);if(Y<0)throw Error("page must be >= 0");let N=Number.MAX_SAFE_INTEGER/2;if(Y*F>N)throw Error("page value too large");let D=Array.from(this.db.skills.values());if(K!==void 0){if(K.length===0)return{skills:[],total:0,page:Y,perPage:X===!1?!1:F,hasMore:!1};let R=new Set(K);D=D.filter((q)=>R.has(q.id))}if(J!==void 0)D=D.filter((R)=>R.authorId===J);if(Q!==void 0)D=D.filter((R)=>R.status===Q);if(W!==void 0)D=D.filter((R)=>R.visibility===W);if(Z&&Object.keys(Z).length>0)D=D.filter((R)=>{return!1});let L=H?this.collectFavoritedIdsFor(H):void 0;if(z)if(L)D=D.filter((R)=>L.has(R.id));else D=[];let O=this.sortConfigs(D,V,A,L).map((R)=>this.deepCopyConfig(R)),{offset:E,perPage:M}=B4(Y,X,F);return{skills:O.slice(E,E+F),total:O.length,page:Y,perPage:M,hasMore:E+F<O.length}}async createVersion($){if(this.db.skillVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.skillVersions.values())if(X.skillId===$.skillId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for skill ${$.skillId}`);let Y={...$,createdAt:new Date};return this.db.skillVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.skillVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.skillVersions.values())if(X.skillId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.skillVersions.values())if(X.skillId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{skillId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=A4(G,20);if(X<0)throw Error("page must be >= 0");let K=Number.MAX_SAFE_INTEGER/2;if(X*Z>K)throw Error("page value too large");let H=Array.from(this.db.skillVersions.values()).filter((D)=>D.skillId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:A,perPage:F}=B4(X,G,Z);return{versions:z.slice(A,A+Z),total:V,page:X,perPage:F,hasMore:A+Z<V}}async deleteVersion($){this.db.skillVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.skillVersions.entries())if(G.skillId===$)Y.push(X);for(let X of Y)this.db.skillVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.skillVersions.values())if(X.skillId===$)Y++;return Y}deepCopyConfig($){return{...$}}deepCopyVersion($){return structuredClone($)}sortConfigs($,Y,X,G){return $.sort((J,Q)=>{if(G){let K=G.has(J.id)?1:0,H=G.has(Q.id)?1:0;if(K!==H)return H-K}let W=J[Y].getTime(),Z=Q[Y].getTime();if(W!==Z)return X==="ASC"?W-Z:Z-W;return J.id<Q.id?-1:J.id>Q.id?1:0})}collectFavoritedIdsFor($){let Y=new Set;for(let X of this.db.favorites.values())if(X.userId===$&&X.entityType==="skill")Y.add(X.entityId);return Y}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},a80=class extends m_{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"skills.json",parentIdField:"skillId",name:"FilesystemSkillsStorage",versionMetadataFields:["id","skillId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{skill:Y}=$,X=new Date,G=Y.visibility??(Y.authorId?"private":void 0),J={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,visibility:G,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,J);let{id:Q,authorId:W,visibility:Z,...K}=Y,H=crypto.randomUUID();return await this.createVersion({id:H,skillId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),structuredClone(J)}async update($){let{id:Y,...X}=$;if(!await this.helpers.getById(Y))throw Error(`FilesystemSkillsStorage: skill with id ${Y} not found`);let{authorId:J,visibility:Q,activeVersionId:W,status:Z,...K}=X,H={};for(let[F,N]of Object.entries(K))if(N!==void 0)H[F]=N;let z=["name","description","instructions","license","compatibility","source","references","scripts","assets","files","metadata","tree"];if(z.some((F)=>(F in H))){let F=await this.getLatestVersion(Y);if(!F)throw Error(`No versions found for skill ${Y}`);let{id:N,skillId:D,versionNumber:L,changedFields:B,changeMessage:O,createdAt:E,...M}=F,R={...M,...H},q=z.filter((w)=>(w in H)&&JSON.stringify(H[w])!==JSON.stringify(M[w]));if(q.length>0){let w=crypto.randomUUID(),I=F.versionNumber+1;await this.createVersion({id:w,skillId:Y,versionNumber:I,...R,changedFields:q,changeMessage:`Updated ${q.join(", ")}`})}}let A={...J!==void 0&&{authorId:J},...Q!==void 0&&{visibility:Q},...W!==void 0&&{activeVersionId:W},...Z!==void 0&&{status:Z}};if(W!==void 0&&Z===void 0)A.status="published";return await this.helpers.updateEntity(Y,A)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,visibility:Q,metadata:W}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"skills",filters:{authorId:J,visibility:Q,metadata:W}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"skillId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});var u_,s80,o80;var Rx0=V0(()=>{EU();xU();u_=class extends QG{listKey="workspaces";versionMetadataFields=["id","workspaceId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"WORKSPACES"})}},s80=class extends u_{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.workspaces.clear(),this.db.workspaceVersions.clear()}async getById($){let Y=this.db.workspaces.get($);return Y?this.deepCopyConfig(Y):null}async create($){let{workspace:Y}=$;if(this.db.workspaces.has(Y.id))throw Error(`Workspace with id ${Y.id} already exists`);let X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};this.db.workspaces.set(Y.id,G);let{id:J,authorId:Q,metadata:W,...Z}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,workspaceId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),this.deepCopyConfig(G)}async update($){let{id:Y,...X}=$,G=this.db.workspaces.get(Y);if(!G)throw Error(`Workspace with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:Z,...K}=X,H={};for(let[F,N]of Object.entries(K))if(N!==void 0)H[F]=N;let z=["name","description","filesystem","sandbox","mounts","search","skills","tools","autoSync","operationTimeout"],V=z.some((F)=>(F in H)),A={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{activeVersionId:Q},...Z!==void 0&&{status:Z},...W!==void 0&&{metadata:{...G.metadata,...W}},updatedAt:new Date};if(Q!==void 0&&Z===void 0)A.status="published";if(V){let F=await this.getLatestVersion(Y);if(!F)throw Error(`No versions found for workspace ${Y}`);let{id:N,workspaceId:D,versionNumber:L,changedFields:B,changeMessage:O,createdAt:E,...M}=F,R={...M,...H},q=z.filter((w)=>(w in H)&&JSON.stringify(H[w])!==JSON.stringify(M[w]));if(q.length>0){let w=crypto.randomUUID(),I=F.versionNumber+1;await this.createVersion({id:w,workspaceId:Y,versionNumber:I,...R,changedFields:q,changeMessage:`Updated ${q.join(", ")}`})}}return this.db.workspaces.set(Y,A),this.deepCopyConfig(A)}async delete($){this.db.workspaces.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q}=$||{},{field:W,direction:Z}=this.parseOrderBy(G),K=A4(X,100);if(Y<0)throw Error("page must be >= 0");let H=Number.MAX_SAFE_INTEGER/2;if(Y*K>H)throw Error("page value too large");let z=Array.from(this.db.workspaces.values());if(J!==void 0)z=z.filter((D)=>D.authorId===J);if(Q&&Object.keys(Q).length>0)z=z.filter((D)=>{if(!D.metadata)return!1;return Object.entries(Q).every(([L,B])=>GJ(D.metadata[L],B))});let A=this.sortConfigs(z,W,Z).map((D)=>this.deepCopyConfig(D)),{offset:F,perPage:N}=B4(Y,X,K);return{workspaces:A.slice(F,F+K),total:A.length,page:Y,perPage:N,hasMore:F+K<A.length}}async createVersion($){if(this.db.workspaceVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.workspaceVersions.values())if(X.workspaceId===$.workspaceId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for workspace ${$.workspaceId}`);let Y={...$,createdAt:new Date};return this.db.workspaceVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.workspaceVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.workspaceVersions.values())if(X.workspaceId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.workspaceVersions.values())if(X.workspaceId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{workspaceId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=A4(G,20);if(X<0)throw Error("page must be >= 0");let K=Number.MAX_SAFE_INTEGER/2;if(X*Z>K)throw Error("page value too large");let H=Array.from(this.db.workspaceVersions.values()).filter((D)=>D.workspaceId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:A,perPage:F}=B4(X,G,Z);return{versions:z.slice(A,A+Z),total:V,page:X,perPage:F,hasMore:A+Z<V}}async deleteVersion($){this.db.workspaceVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.workspaceVersions.entries())if(G.workspaceId===$)Y.push(X);for(let X of Y)this.db.workspaceVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.workspaceVersions.values())if(X.workspaceId===$)Y++;return Y}deepCopyConfig($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return structuredClone($)}sortConfigs($,Y,X){return $.sort((G,J)=>{let Q=G[Y].getTime(),W=J[Y].getTime();return X==="ASC"?Q-W:W-Q})}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},o80=class extends u_{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"workspaces.json",parentIdField:"workspaceId",name:"FilesystemWorkspacesStorage",versionMetadataFields:["id","workspaceId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{workspace:Y}=$,X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,G);let{id:J,authorId:Q,metadata:W,...Z}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,workspaceId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),structuredClone(G)}async update($){let{id:Y,...X}=$;return this.helpers.updateEntity(Y,X)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,metadata:Q}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"workspaces",filters:{authorId:J,metadata:Q}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"workspaceId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});function O44($){let Y={};for(let[X,G]of Object.entries($))if(sy8.has(X))Y[X]=G;return Y}var p_,t80,sy8,e80;var qx0=V0(()=>{EU();xU();p_=class extends QG{listKey="agents";versionMetadataFields=["id","agentId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"AGENTS"})}},t80=class extends p_{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.agents.clear(),this.db.agentVersions.clear()}async getById($){let Y=this.db.agents.get($);return Y?this.deepCopyAgent(Y):null}async create($){let{agent:Y}=$;if(this.db.agents.has(Y.id))throw Error(`Agent with id ${Y.id} already exists`);let X=new Date,G=Y.visibility??(Y.authorId?"private":void 0),J={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,visibility:G,metadata:Y.metadata,favoriteCount:0,createdAt:X,updatedAt:X};this.db.agents.set(Y.id,J);let{id:Q,authorId:W,visibility:Z,metadata:K,...H}=Y,z=crypto.randomUUID();return await this.createVersion({id:z,agentId:Y.id,versionNumber:1,...H,changedFields:Object.keys(H),changeMessage:"Initial version"}),this.deepCopyAgent(J)}async update($){let{id:Y,...X}=$,G=this.db.agents.get(Y);if(!G)throw Error(`Agent with id ${Y} not found`);let{authorId:J,visibility:Q,activeVersionId:W,metadata:Z,status:K}=X,H={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{visibility:Q},...W!==void 0&&{activeVersionId:W},...Z!==void 0&&{metadata:{...G.metadata,...Z}},...K!==void 0&&{status:K},updatedAt:new Date};return this.db.agents.set(Y,H),this.deepCopyAgent(H)}async delete($){this.db.agents.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,visibility:Q,metadata:W,status:Z,entityIds:K,pinFavoritedFor:H,favoritedOnly:z}=$||{},{field:V,direction:A}=this.parseOrderBy(G),F=A4(X,100);if(Y<0)throw Error("page must be >= 0");let N=Number.MAX_SAFE_INTEGER/2;if(Y*F>N)throw Error("page value too large");let D=Array.from(this.db.agents.values());if(K!==void 0){if(K.length===0)return{agents:[],total:0,page:Y,perPage:X===!1?!1:F,hasMore:!1};let R=new Set(K);D=D.filter((q)=>R.has(q.id))}if(Z)D=D.filter((R)=>R.status===Z);if(J!==void 0)D=D.filter((R)=>R.authorId===J);if(Q!==void 0)D=D.filter((R)=>R.visibility===Q);if(W&&Object.keys(W).length>0)D=D.filter((R)=>{if(!R.metadata)return!1;return Object.entries(W).every(([q,w])=>GJ(R.metadata[q],w))});let L=H?this.collectFavoritedIdsFor(H):void 0;if(z)if(L)D=D.filter((R)=>L.has(R.id));else D=[];let O=this.sortAgents(D,V,A,L).map((R)=>this.deepCopyAgent(R)),{offset:E,perPage:M}=B4(Y,X,F);return{agents:O.slice(E,E+F),total:O.length,page:Y,perPage:M,hasMore:E+F<O.length}}async createVersion($){if(this.db.agentVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.agentVersions.values())if(X.agentId===$.agentId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for agent ${$.agentId}`);let Y={...$,createdAt:new Date};return this.db.agentVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.agentVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.agentVersions.values())if(X.agentId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.agentVersions.values())if(X.agentId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{agentId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=A4(G,20);if(X<0)throw Error("page must be >= 0");let K=Number.MAX_SAFE_INTEGER/2;if(X*Z>K)throw Error("page value too large");let H=Array.from(this.db.agentVersions.values()).filter((D)=>D.agentId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:A,perPage:F}=B4(X,G,Z);return{versions:z.slice(A,A+Z),total:V,page:X,perPage:F,hasMore:A+Z<V}}async deleteVersion($){this.db.agentVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.agentVersions.entries())if(G.agentId===$)Y.push(X);for(let X of Y)this.db.agentVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.agentVersions.values())if(X.agentId===$)Y++;return Y}deepCopyAgent($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return structuredClone($)}sortAgents($,Y,X,G){return $.sort((J,Q)=>{if(G){let K=G.has(J.id)?1:0,H=G.has(Q.id)?1:0;if(K!==H)return H-K}let W=new Date(J[Y]).getTime(),Z=new Date(Q[Y]).getTime();if(W!==Z)return X==="ASC"?W-Z:Z-W;return J.id<Q.id?-1:J.id>Q.id?1:0})}collectFavoritedIdsFor($){let Y=new Set;for(let X of this.db.favorites.values())if(X.userId===$&&X.entityType==="agent")Y.add(X.entityId);return Y}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},sy8=new Set(["name","instructions","model","tools","integrationTools","mcpClients","requestContextSchema"]);e80=class extends p_{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"agents.json",parentIdField:"agentId",name:"FilesystemAgentsStorage",versionMetadataFields:["id","agentId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{agent:Y}=$,X=new Date,G=Y.visibility??(Y.authorId?"private":void 0),J={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,visibility:G,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,J);let{id:Q,authorId:W,visibility:Z,metadata:K,...H}=Y,z=O44(H),V=crypto.randomUUID();return await this.createVersion({id:V,agentId:Y.id,versionNumber:1,...z,changedFields:Object.keys(z),changeMessage:"Initial version"}),structuredClone(J)}async update($){let{id:Y,...X}=$,G={},J=new Set(["authorId","visibility","metadata","activeVersionId","status"]);for(let[Q,W]of Object.entries(X))if(J.has(Q))G[Q]=W;return this.helpers.updateEntity(Y,G)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,visibility:Q,metadata:W,status:Z}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"agents",filters:{authorId:J,visibility:Q,metadata:W,status:Z}})}async createVersion($){let{id:Y,agentId:X,versionNumber:G,changedFields:J,changeMessage:Q,...W}=$,Z=O44(W);return this.helpers.createVersion({id:Y,agentId:X,versionNumber:G,changedFields:J,changeMessage:Q,...Z})}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"agentId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});function $90($,Y,X){return`${$}\x00${Y}\x00${X}`}var kg,Y90;var Ix0=V0(()=>{dZ();kg=class extends u8{constructor(){super({component:"STORAGE",name:"FAVORITES"})}};Y90=class extends kg{db;constructor({db:$}){super();this.db=$}async init(){}async dangerouslyClearAll(){this.db.favorites.clear();for(let $ of this.db.agents.values())if($.favoriteCount)$.favoriteCount=0;for(let $ of this.db.skills.values())if($.favoriteCount)$.favoriteCount=0}async favorite({userId:$,entityType:Y,entityId:X}){let G=this.requireEntity(Y,X),J=$90($,Y,X);if(this.db.favorites.has(J))return{favorited:!0,favoriteCount:G.favoriteCount??0};let Q={userId:$,entityType:Y,entityId:X,createdAt:new Date};this.db.favorites.set(J,Q);let W=(G.favoriteCount??0)+1;return G.favoriteCount=W,G.updatedAt=new Date,{favorited:!0,favoriteCount:W}}async unfavorite({userId:$,entityType:Y,entityId:X}){let G=this.requireEntity(Y,X),J=$90($,Y,X);if(!this.db.favorites.has(J))return{favorited:!1,favoriteCount:G.favoriteCount??0};this.db.favorites.delete(J);let Q=Math.max(0,(G.favoriteCount??0)-1);return G.favoriteCount=Q,G.updatedAt=new Date,{favorited:!1,favoriteCount:Q}}async isFavorited({userId:$,entityType:Y,entityId:X}){return this.db.favorites.has($90($,Y,X))}async isFavoritedBatch({userId:$,entityType:Y,entityIds:X}){let G=new Set;for(let J of X)if(this.db.favorites.has($90($,Y,J)))G.add(J);return G}async listFavoritedIds({userId:$,entityType:Y}){let X=[];for(let G of this.db.favorites.values())if(G.userId===$&&G.entityType===Y)X.push(G.entityId);return X}async deleteFavoritesForEntity({entityType:$,entityId:Y}){let X=0;for(let[Q,W]of this.db.favorites)if(W.entityType===$&&W.entityId===Y)this.db.favorites.delete(Q),X++;let J=($==="agent"?this.db.agents:this.db.skills).get(Y);if(J&&J.favoriteCount)J.favoriteCount=0;return X}requireEntity($,Y){let G=($==="agent"?this.db.agents:this.db.skills).get(Y);if(!G)throw Error(`Cannot favorite: ${$} with id ${Y} does not exist`);return G}}});var d_,X90,G90;var Px0=V0(()=>{EU();xU();d_=class extends QG{listKey="mcpClients";versionMetadataFields=["id","mcpClientId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"MCP_CLIENTS"})}},X90=class extends d_{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.mcpClients.clear(),this.db.mcpClientVersions.clear()}async getById($){let Y=this.db.mcpClients.get($);return Y?this.deepCopyConfig(Y):null}async create($){let{mcpClient:Y}=$;if(this.db.mcpClients.has(Y.id))throw Error(`MCP client with id ${Y.id} already exists`);let X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};this.db.mcpClients.set(Y.id,G);let{id:J,authorId:Q,metadata:W,...Z}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,mcpClientId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),this.deepCopyConfig(G)}async update($){let{id:Y,...X}=$,G=this.db.mcpClients.get(Y);if(!G)throw Error(`MCP client with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:Z}=X,K={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{activeVersionId:Q},...Z!==void 0&&{status:Z},...W!==void 0&&{metadata:{...G.metadata,...W}},updatedAt:new Date};return this.db.mcpClients.set(Y,K),this.deepCopyConfig(K)}async delete($){this.db.mcpClients.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{},{field:Z,direction:K}=this.parseOrderBy(G),H=A4(X,100);if(Y<0)throw Error("page must be >= 0");let z=Number.MAX_SAFE_INTEGER/2;if(Y*H>z)throw Error("page value too large");let V=Array.from(this.db.mcpClients.values());if(W)V=V.filter((L)=>L.status===W);if(J!==void 0)V=V.filter((L)=>L.authorId===J);if(Q&&Object.keys(Q).length>0)V=V.filter((L)=>{if(!L.metadata)return!1;return Object.entries(Q).every(([B,O])=>GJ(L.metadata[B],O))});let F=this.sortConfigs(V,Z,K).map((L)=>this.deepCopyConfig(L)),{offset:N,perPage:D}=B4(Y,X,H);return{mcpClients:F.slice(N,N+H),total:F.length,page:Y,perPage:D,hasMore:N+H<F.length}}async createVersion($){if(this.db.mcpClientVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.mcpClientVersions.values())if(X.mcpClientId===$.mcpClientId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for MCP client ${$.mcpClientId}`);let Y={...$,createdAt:new Date};return this.db.mcpClientVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.mcpClientVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.mcpClientVersions.values())if(X.mcpClientId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.mcpClientVersions.values())if(X.mcpClientId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{mcpClientId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=A4(G,20);if(X<0)throw Error("page must be >= 0");let K=Number.MAX_SAFE_INTEGER/2;if(X*Z>K)throw Error("page value too large");let H=Array.from(this.db.mcpClientVersions.values()).filter((D)=>D.mcpClientId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:A,perPage:F}=B4(X,G,Z);return{versions:z.slice(A,A+Z),total:V,page:X,perPage:F,hasMore:A+Z<V}}async deleteVersion($){this.db.mcpClientVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.mcpClientVersions.entries())if(G.mcpClientId===$)Y.push(X);for(let X of Y)this.db.mcpClientVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.mcpClientVersions.values())if(X.mcpClientId===$)Y++;return Y}deepCopyConfig($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return{...$,servers:$.servers?JSON.parse(JSON.stringify($.servers)):$.servers,changedFields:$.changedFields?[...$.changedFields]:$.changedFields}}sortConfigs($,Y,X){return $.sort((G,J)=>{let Q=G[Y].getTime(),W=J[Y].getTime();return X==="ASC"?Q-W:W-Q})}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},G90=class extends d_{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"mcp-clients.json",parentIdField:"mcpClientId",name:"FilesystemMCPClientsStorage",versionMetadataFields:["id","mcpClientId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{mcpClient:Y}=$,X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,G);let{id:J,authorId:Q,metadata:W,...Z}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,mcpClientId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),structuredClone(G)}async update($){let{id:Y,...X}=$;return this.helpers.updateEntity(Y,X)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"mcpClients",filters:{authorId:J,metadata:Q,status:W}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"mcpClientId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});function Sx0($){if($.error!=null)return"error";if($.endedAt==null)return"running";return"success"}function l_($){return{...$,status:Sx0($)}}function i_($){return $.map(l_)}function yg($,Y,X){let G=$.find((H)=>H.spanId===Y);if(!G)return[];let J=new Map;for(let H of $){if(H.parentSpanId==null)continue;let z=J.get(H.parentSpanId);if(z)z.push(H);else J.set(H.parentSpanId,[H])}let Q=new Set([G.spanId]),W=[],Z=[G],K=0;while(Z.length>0){if(X!=null&&K>=X)break;let H=[];for(let z of Z){let V=J.get(z.spanId);if(!V)continue;for(let A of V){if(Q.has(A.spanId))continue;Q.add(A.spanId),W.push(A),H.push(A)}}Z=H,K++}return W.sort((H,z)=>H.startedAt.getTime()-z.startedAt.getTime()),[G,...W]}function Ub8($){let Y=$,X=!1;while(!0){let G=mF(Y);if(!G)break;if(G==="ZodNullable"||G==="ZodOptional")X=!0;let J=wT0(Y,G);if(!J)break;Y=J}return{base:Y,nullable:X}}function E44($){if("_zod"in $){let X=$._zod?.def?.checks;if(X&&Array.isArray(X))return X.map((G)=>{if(typeof G==="object"&&G!==null&&"def"in G&&typeof G.def==="object"&&G.def!==null){let J=G.def;if(J.check==="number_format"&&J.format==="safeint")return{kind:"int"};if(J.check==="string_format"&&typeof J.format==="string")return{kind:J.format};return{kind:typeof J.check==="string"?J.check:"unknown"}}return{kind:"unknown"}})}if("_def"in $){let X=$._def?.checks;if(X&&Array.isArray(X))return X}return[]}function Hb8($){let Y=mF($);if(Y==="ZodString"){if(E44($).some((G)=>G.kind==="uuid"))return"uuid";return"text"}if(Y==="ZodNativeEnum"||Y==="ZodEnum")return"text";if(Y==="ZodNumber")return E44($).some((G)=>G.kind==="int")?"integer":"float";if(Y==="ZodBigInt"||Y==="ZodBigint")return"bigint";if(Y==="ZodDate")return"timestamp";if(Y==="ZodBoolean")return"boolean";return"jsonb"}function mx0($){let Y=$.shape,X={};for(let[G,J]of Object.entries(Y)){let{base:Q,nullable:W}=Ub8(J);X[G]={type:Hb8(Q),nullable:W}}return X}var wx0,_x0,oy8,vg,qQ,M44,ty8,R44,ey8,q44,I44,$b8,J90,jx0,Yb8,P44=($)=>Object.fromEntries(Object.keys($).map((Y)=>[Y,!0])),w44,_44,Q90,Xb8,Gb8,Jb8,Qb8,j44,T44,C44,S44,DD,Tx0,Wb8,Cx0,c_,k44,Zb8,Kb8,yU,W90,xg,v44,x44,y44,b44,h44,f44,g44,m44,u44,p44,Z90,d44,K90,kx0,c44,vx0,xx0,yx0,n_,l44,i44,bx0,bg,hx0,fx0,gx0,U90,n44,H90,r44,a44,s44,o44,t44,e44,$64,Y64,D7="mastra_workflow_snapshot",j5="mastra_messages",OX="mastra_threads",ux0="mastra_traces",bU="mastra_resources",N7="mastra_scorers",V6="mastra_ai_spans",L7="mastra_agents",u5="mastra_agent_versions",px0="mastra_observational_memory",IQ="mastra_prompt_blocks",P$="mastra_prompt_block_versions",PQ="mastra_scorer_definitions",m$="mastra_scorer_definition_versions",JJ="mastra_mcp_clients",u$="mastra_mcp_client_versions",QJ="mastra_mcp_servers",p$="mastra_mcp_server_versions",WJ="mastra_workspaces",d$="mastra_workspace_versions",cY="mastra_skills",w$="mastra_skill_versions",ZJ="mastra_skill_blobs",zG="mastra_favorites",D8="mastra_datasets",I8="mastra_dataset_items",lY="mastra_dataset_versions",iY="mastra_experiments",c$="mastra_experiment_results",l$="mastra_background_tasks",EX="mastra_schedules",hK="mastra_schedule_triggers",VG="mastra_channel_installations",fK="mastra_channel_config",r_,a_,X64,KE,UE,hg,s_,fg,gg,mg,ug,pg,dg,cg,lg,o_,t_,e_,ig,dx0,ng,$j,rg,Yj,Xj,F5,G64,J64;var z90=V0(()=>{Xf();uz();O1();wx0=U.enum(["LIVE","TEST"]),_x0=U.enum(["AGENT","WORKFLOW","TRAJECTORY","STEP",...Object.values(mz)]),oy8=U.object({description:U.string(),prompt:U.string()}),vg=U.record(U.string(),U.unknown()),qQ=vg.optional(),M44=U.object({runId:U.string().optional(),input:U.unknown().optional(),output:U.unknown(),additionalContext:qQ,requestContext:qQ}),ty8=U.object({runId:U.string().optional(),scorer:vg,input:U.unknown(),output:U.unknown(),metadata:qQ,additionalContext:qQ,source:wx0,entity:vg,entityType:_x0,requestContext:qQ,structuredOutput:U.boolean().optional(),traceId:U.string().optional(),spanId:U.string().optional(),resourceId:U.string().optional(),threadId:U.string().optional()}),R44=U.number(),ey8=U.object({result:qQ,score:R44,prompt:U.string().optional()}),q44=M44.extend({runId:U.string(),extractStepResult:qQ,extractPrompt:U.string().optional()}),I44=q44.extend({score:U.number(),analyzeStepResult:qQ,analyzePrompt:U.string().optional()}),$b8=I44.extend({reason:U.string().optional(),reasonPrompt:U.string().optional()}),J90=U.object({id:U.string(),scorerId:U.string(),entityId:U.string(),runId:U.string(),input:U.unknown().optional(),output:U.unknown(),additionalContext:qQ,requestContext:qQ,extractStepResult:qQ,extractPrompt:U.string().optional(),score:U.number(),analyzeStepResult:qQ,analyzePrompt:U.string().optional(),reason:U.string().optional(),reasonPrompt:U.string().optional(),scorer:vg,metadata:qQ,source:wx0,entity:vg,entityType:_x0.optional(),structuredOutput:U.boolean().optional(),traceId:U.string().optional(),spanId:U.string().optional(),resourceId:U.string().optional(),threadId:U.string().optional(),preprocessStepResult:qQ,preprocessPrompt:U.string().optional(),generateScorePrompt:U.string().optional(),generateReasonPrompt:U.string().optional(),...PO}),jx0=J90.omit({id:!0,createdAt:!0,updatedAt:!0}),Yb8=U.object({pagination:iZ,scores:U.array(J90)}),w44=U.string().describe("Human-readable span name"),_44=U.string().describe("Parent span reference (null = root span)"),Q90=U.nativeEnum(mz).describe("Span type (e.g., WORKFLOW_RUN, AGENT_RUN, TOOL_CALL, etc.)"),Xb8=U.record(U.string(),U.unknown()).describe("Span-type specific attributes (e.g., model, tokens, tools)"),Gb8=U.array(U.unknown()).describe("References to related spans in other traces"),Jb8=U.unknown().describe("Input data passed to the span"),Qb8=U.unknown().describe("Output data returned from the span"),j44=U.unknown().describe("Error info - presence indicates failure (status derived from this)"),T44=U.boolean().describe("Whether this is an event (point-in-time) vs a span (duration)"),C44=U.date().describe("When the span started"),S44=U.date().describe("When the span ended (null = running, status derived from this)"),DD=(($)=>{return $.SUCCESS="success",$.ERROR="error",$.RUNNING="running",$})(DD||{}),Tx0=U.nativeEnum(DD).describe("Current status of the trace"),Wb8=U.preprocess(($)=>{if($==="true")return!0;if($==="false")return!1;return $},U.boolean()).describe("True if any span in the trace encountered an error"),Cx0={..._O,metadata:pw.nullish(),tags:dw.nullish()},c_={traceId:v7,spanId:FQ},k44=U.object({...c_}),Zb8=P44(PO),Kb8=P44(c_),yU=U.object({...c_,name:w44,spanType:Q90,isEvent:T44,startedAt:C44,parentSpanId:_44.nullish(),...Cx0,experimentId:U.string().nullish().describe("Experiment or eval run identifier"),attributes:Xb8.nullish(),links:Gb8.nullish(),input:Jb8.nullish(),output:Qb8.nullish(),error:j44.nullish(),endedAt:S44.nullish(),requestContext:U.record(U.string(),U.unknown()).nullish().describe("Request context data"),...PO}).describe("Span record data");W90=yU.extend({status:Tx0}).describe("Trace span with computed status (root spans only)");xg=yU.omit(Zb8),v44=U.object({span:xg}).describe("Arguments for creating a single span"),x44=U.object({records:U.array(xg)}).describe("Arguments for batch creating spans"),y44=U.object({traceId:v7.min(1),spanId:FQ.min(1)}).describe("Arguments for getting a single span"),b44=U.object({span:yU}),h44=U.object({traceId:v7.min(1),spanIds:U.array(FQ.min(1)).min(1).describe("Span IDs to fetch within the trace")}).describe("Arguments for batch-fetching spans by spanId within a trace"),f44=U.object({traceId:v7,spans:U.array(yU)}),g44=U.object({traceId:v7.min(1)}).describe("Arguments for getting a root span"),m44=U.object({span:yU}),u44=U.object({traceId:v7.min(1)}).describe("Arguments for getting a single trace"),p44=U.object({traceId:v7,spans:U.array(yU)}),Z90=U.object({traceId:v7.min(1),spanId:FQ.min(1),depth:U.coerce.number().int().min(0).optional().describe("Maximum descendant levels below the anchor span (omit for full subtree)")}).describe("Arguments for getting a span branch (subtree rooted at a span)"),d44=U.object({traceId:v7,spans:U.array(yU)});K90=U.object({...c_,name:w44,spanType:Q90,isEvent:T44,startedAt:C44,parentSpanId:_44.nullish(),endedAt:S44.nullish(),error:j44.nullish(),entityType:_O.entityType,entityId:_O.entityId,entityName:_O.entityName,...PO}).describe("Lightweight span record for timeline rendering (excludes input, output, attributes, metadata, tags, links)"),kx0=U.object({traceId:v7,spans:U.array(K90)}),c44=kx0,vx0=U.object({startedAt:rF.optional().describe("Filter by span start time range"),endedAt:rF.optional().describe("Filter by span end time range"),spanType:Q90.optional(),traceId:v7.optional().describe("Filter by trace ID (matches root span)"),...Cx0,status:Tx0.optional(),hasChildError:Wb8.optional()}).describe("Filters for querying traces"),xx0=U.enum(["startedAt","endedAt"]).describe("Field to order by: 'startedAt' | 'endedAt'"),yx0=U.object({field:xx0.default("startedAt").describe("Field to order by"),direction:qU.default("DESC").describe("Sort direction")}).describe("Order by configuration"),n_=U.object({filters:vx0.optional().describe("Optional filters to apply"),pagination:fz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:yx0.default({field:"startedAt",direction:"DESC"}).describe("Ordering configuration (defaults to startedAt desc)")}).describe("Arguments for listing traces"),l44=U.object({pagination:iZ,spans:U.array(W90)}),i44=U.object({pagination:iZ,spans:U.array(K90)}),bx0=["agent_run","workflow_run","processor_run","scorer_run","rag_ingestion","tool_call","mcp_tool_call"],bg=new Set(bx0),hx0=U.object({startedAt:rF.optional().describe("Filter by span start time range"),endedAt:rF.optional().describe("Filter by span end time range"),spanType:Q90.optional(),traceId:v7.optional().describe("Filter by parent trace ID"),...Cx0,status:Tx0.optional()}).describe("Filters for querying trace branches"),fx0=U.enum(["startedAt","endedAt"]).describe("Field to order by: 'startedAt' | 'endedAt'"),gx0=U.object({field:fx0.default("startedAt").describe("Field to order by"),direction:qU.default("DESC").describe("Sort direction")}).describe("Order by configuration"),U90=U.object({filters:hx0.optional().describe("Optional filters to apply"),pagination:fz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:gx0.default({field:"startedAt",direction:"DESC"}).describe("Ordering configuration (defaults to startedAt desc)")}).describe("Arguments for listing trace branches"),n44=U.object({pagination:iZ,branches:U.array(W90)}),H90=xg.omit(Kb8),r44=U.object({spanId:FQ,traceId:v7,updates:H90.partial()}).describe("Arguments for updating a single span"),a44=U.object({records:U.array(U.object({traceId:v7,spanId:FQ,updates:H90.partial()}))}).describe("Arguments for batch updating spans"),s44=U.object({traceIds:U.array(v7)}).describe("Arguments for batch deleting traces"),o44=U.object({pagination:iZ,scores:U.array(J90)}),t44=U.object({scorerName:U.string().min(1),targets:U.array(U.object({traceId:v7,spanId:FQ.optional()})).min(1)}),e44=U.object({status:U.string(),message:U.string(),traceCount:U.number()}),$64=["private","public"];Y64=["agent","skill"],r_={id:{type:"text",nullable:!1,primaryKey:!0},scorerId:{type:"text"},traceId:{type:"text",nullable:!0},spanId:{type:"text",nullable:!0},runId:{type:"text"},scorer:{type:"jsonb"},preprocessStepResult:{type:"jsonb",nullable:!0},extractStepResult:{type:"jsonb",nullable:!0},analyzeStepResult:{type:"jsonb",nullable:!0},score:{type:"float"},reason:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},preprocessPrompt:{type:"text",nullable:!0},extractPrompt:{type:"text",nullable:!0},generateScorePrompt:{type:"text",nullable:!0},generateReasonPrompt:{type:"text",nullable:!0},analyzePrompt:{type:"text",nullable:!0},reasonPrompt:{type:"text",nullable:!0},input:{type:"jsonb"},output:{type:"jsonb"},additionalContext:{type:"jsonb",nullable:!0},requestContext:{type:"jsonb",nullable:!0},entityType:{type:"text",nullable:!0},entity:{type:"jsonb",nullable:!0},entityId:{type:"text",nullable:!0},source:{type:"text"},resourceId:{type:"text",nullable:!0},threadId:{type:"text",nullable:!0},createdAt:{type:"timestamp"},updatedAt:{type:"timestamp"}},a_=mx0(yU),X64={traceId:{type:"text",nullable:!1},spanId:{type:"text",nullable:!1},parentSpanId:{type:"text",nullable:!0},name:{type:"text",nullable:!1},scope:{type:"jsonb",nullable:!0},spanType:{type:"text",nullable:!1},attributes:{type:"jsonb",nullable:!0},metadata:{type:"jsonb",nullable:!0},links:{type:"jsonb",nullable:!0},input:{type:"jsonb",nullable:!0},output:{type:"jsonb",nullable:!0},error:{type:"jsonb",nullable:!0},startedAt:{type:"timestamp",nullable:!1},endedAt:{type:"timestamp",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!0},isEvent:{type:"boolean",nullable:!1}},KE={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},visibility:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},favoriteCount:{type:"integer",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},UE={id:{type:"text",nullable:!1,primaryKey:!0},agentId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},instructions:{type:"text",nullable:!1},model:{type:"jsonb",nullable:!1},tools:{type:"jsonb",nullable:!0},defaultOptions:{type:"jsonb",nullable:!0},workflows:{type:"jsonb",nullable:!0},agents:{type:"jsonb",nullable:!0},integrationTools:{type:"jsonb",nullable:!0},inputProcessors:{type:"jsonb",nullable:!0},outputProcessors:{type:"jsonb",nullable:!0},memory:{type:"jsonb",nullable:!0},scorers:{type:"jsonb",nullable:!0},mcpClients:{type:"jsonb",nullable:!0},requestContextSchema:{type:"jsonb",nullable:!0},workspace:{type:"jsonb",nullable:!0},skills:{type:"jsonb",nullable:!0},skillsFormat:{type:"text",nullable:!0},browser:{type:"jsonb",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},hg={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},s_={id:{type:"text",nullable:!1,primaryKey:!0},blockId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},content:{type:"text",nullable:!1},rules:{type:"jsonb",nullable:!0},requestContextSchema:{type:"jsonb",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},fg={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},gg={id:{type:"text",nullable:!1,primaryKey:!0},scorerDefinitionId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},type:{type:"text",nullable:!1},model:{type:"jsonb",nullable:!0},instructions:{type:"text",nullable:!0},scoreRange:{type:"jsonb",nullable:!0},presetConfig:{type:"jsonb",nullable:!0},defaultSampling:{type:"jsonb",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},mg={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},ug={id:{type:"text",nullable:!1,primaryKey:!0},mcpClientId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},servers:{type:"jsonb",nullable:!1},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},pg={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},dg={id:{type:"text",nullable:!1,primaryKey:!0},mcpServerId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},version:{type:"text",nullable:!1},description:{type:"text",nullable:!0},instructions:{type:"text",nullable:!0},repository:{type:"jsonb",nullable:!0},releaseDate:{type:"text",nullable:!0},isLatest:{type:"boolean",nullable:!0},packageCanonical:{type:"text",nullable:!0},tools:{type:"jsonb",nullable:!0},agents:{type:"jsonb",nullable:!0},workflows:{type:"jsonb",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},cg={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},lg={id:{type:"text",nullable:!1,primaryKey:!0},workspaceId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},filesystem:{type:"jsonb",nullable:!0},sandbox:{type:"jsonb",nullable:!0},mounts:{type:"jsonb",nullable:!0},search:{type:"jsonb",nullable:!0},skills:{type:"jsonb",nullable:!0},tools:{type:"jsonb",nullable:!0},autoSync:{type:"boolean",nullable:!0},operationTimeout:{type:"integer",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},o_={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},visibility:{type:"text",nullable:!0},favoriteCount:{type:"integer",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},t_={userId:{type:"text",nullable:!1},entityType:{type:"text",nullable:!1},entityId:{type:"text",nullable:!1},createdAt:{type:"timestamp",nullable:!1}},e_={id:{type:"text",nullable:!1,primaryKey:!0},skillId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!1},instructions:{type:"text",nullable:!1},license:{type:"text",nullable:!0},compatibility:{type:"jsonb",nullable:!0},source:{type:"jsonb",nullable:!0},references:{type:"jsonb",nullable:!0},scripts:{type:"jsonb",nullable:!0},assets:{type:"jsonb",nullable:!0},files:{type:"jsonb",nullable:!0},metadata:{type:"jsonb",nullable:!0},tree:{type:"jsonb",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},ig={hash:{type:"text",nullable:!1,primaryKey:!0},content:{type:"text",nullable:!1},size:{type:"integer",nullable:!1},mimeType:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},dx0={id:{type:"text",nullable:!1,primaryKey:!0},lookupKey:{type:"text",nullable:!1},scope:{type:"text",nullable:!1},resourceId:{type:"text",nullable:!0},threadId:{type:"text",nullable:!0},activeObservations:{type:"text",nullable:!1},activeObservationsPendingUpdate:{type:"text",nullable:!0},originType:{type:"text",nullable:!1},config:{type:"text",nullable:!1},generationCount:{type:"integer",nullable:!1},lastObservedAt:{type:"timestamp",nullable:!0},lastReflectionAt:{type:"timestamp",nullable:!0},pendingMessageTokens:{type:"integer",nullable:!1},totalTokensObserved:{type:"integer",nullable:!1},observationTokenCount:{type:"integer",nullable:!1},isObserving:{type:"boolean",nullable:!1},isReflecting:{type:"boolean",nullable:!1},observedMessageIds:{type:"jsonb",nullable:!0},observedTimezone:{type:"text",nullable:!0},bufferedObservations:{type:"text",nullable:!0},bufferedObservationTokens:{type:"integer",nullable:!0},bufferedMessageIds:{type:"jsonb",nullable:!0},bufferedReflection:{type:"text",nullable:!0},bufferedReflectionTokens:{type:"integer",nullable:!0},bufferedReflectionInputTokens:{type:"integer",nullable:!0},reflectedObservationLineCount:{type:"integer",nullable:!0},bufferedObservationChunks:{type:"jsonb",nullable:!0},isBufferingObservation:{type:"boolean",nullable:!1},isBufferingReflection:{type:"boolean",nullable:!1},lastBufferedAtTokens:{type:"integer",nullable:!1},lastBufferedAtTime:{type:"timestamp",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},ng={id:{type:"text",nullable:!1,primaryKey:!0},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},inputSchema:{type:"jsonb",nullable:!0},groundTruthSchema:{type:"jsonb",nullable:!0},requestContextSchema:{type:"jsonb",nullable:!0},tags:{type:"jsonb",nullable:!0},targetType:{type:"text",nullable:!0},targetIds:{type:"jsonb",nullable:!0},scorerIds:{type:"jsonb",nullable:!0},version:{type:"integer",nullable:!1},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},$j={id:{type:"text",nullable:!1},datasetId:{type:"text",nullable:!1,references:{table:"mastra_datasets",column:"id"}},datasetVersion:{type:"integer",nullable:!1},validTo:{type:"integer",nullable:!0},isDeleted:{type:"boolean",nullable:!1},input:{type:"jsonb",nullable:!1},groundTruth:{type:"jsonb",nullable:!0},requestContext:{type:"jsonb",nullable:!0},metadata:{type:"jsonb",nullable:!0},source:{type:"jsonb",nullable:!0},expectedTrajectory:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},rg={id:{type:"text",nullable:!1,primaryKey:!0},datasetId:{type:"text",nullable:!1,references:{table:"mastra_datasets",column:"id"}},version:{type:"integer",nullable:!1},createdAt:{type:"timestamp",nullable:!1}},Yj={id:{type:"text",nullable:!1,primaryKey:!0},name:{type:"text",nullable:!0},description:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},datasetId:{type:"text",nullable:!0,references:{table:"mastra_datasets",column:"id"}},datasetVersion:{type:"integer",nullable:!0},targetType:{type:"text",nullable:!1},targetId:{type:"text",nullable:!1},status:{type:"text",nullable:!1},totalItems:{type:"integer",nullable:!1},succeededCount:{type:"integer",nullable:!1},failedCount:{type:"integer",nullable:!1},skippedCount:{type:"integer",nullable:!1},startedAt:{type:"timestamp",nullable:!0},completedAt:{type:"timestamp",nullable:!0},agentVersion:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},Xj={id:{type:"text",nullable:!1,primaryKey:!0},experimentId:{type:"text",nullable:!1,references:{table:"mastra_experiments",column:"id"}},itemId:{type:"text",nullable:!1,references:{table:"mastra_dataset_items",column:"id"}},itemDatasetVersion:{type:"integer",nullable:!0},input:{type:"jsonb",nullable:!1},output:{type:"jsonb",nullable:!0},groundTruth:{type:"jsonb",nullable:!0},error:{type:"jsonb",nullable:!0},startedAt:{type:"timestamp",nullable:!1},completedAt:{type:"timestamp",nullable:!1},retryCount:{type:"integer",nullable:!1},traceId:{type:"text",nullable:!0},status:{type:"text",nullable:!0},tags:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},F5={[D7]:{workflow_name:{type:"text"},run_id:{type:"text"},resourceId:{type:"text",nullable:!0},snapshot:{type:"jsonb"},createdAt:{type:"timestamp"},updatedAt:{type:"timestamp"}},[N7]:r_,[OX]:{id:{type:"text",nullable:!1,primaryKey:!0},resourceId:{type:"text",nullable:!1},title:{type:"text",nullable:!1},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},[j5]:{id:{type:"text",nullable:!1,primaryKey:!0},thread_id:{type:"text",nullable:!1},content:{type:"text",nullable:!1},role:{type:"text",nullable:!1},type:{type:"text",nullable:!1},createdAt:{type:"timestamp",nullable:!1},resourceId:{type:"text",nullable:!0}},[V6]:a_,[ux0]:{id:{type:"text",nullable:!1,primaryKey:!0},parentSpanId:{type:"text",nullable:!0},name:{type:"text",nullable:!1},traceId:{type:"text",nullable:!1},scope:{type:"text",nullable:!1},kind:{type:"integer",nullable:!1},attributes:{type:"jsonb",nullable:!0},status:{type:"jsonb",nullable:!0},events:{type:"jsonb",nullable:!0},links:{type:"jsonb",nullable:!0},other:{type:"text",nullable:!0},startTime:{type:"bigint",nullable:!1},endTime:{type:"bigint",nullable:!1},createdAt:{type:"timestamp",nullable:!1}},[bU]:{id:{type:"text",nullable:!1,primaryKey:!0},workingMemory:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},[L7]:KE,[u5]:UE,[IQ]:hg,[P$]:s_,[PQ]:fg,[m$]:gg,[JJ]:mg,[u$]:ug,[QJ]:pg,[p$]:dg,[WJ]:cg,[d$]:lg,[cY]:o_,[w$]:e_,[ZJ]:ig,[D8]:ng,[I8]:$j,[lY]:rg,[iY]:Yj,[c$]:Xj,[zG]:t_,[l$]:{id:{type:"text",nullable:!1,primaryKey:!0},tool_call_id:{type:"text",nullable:!1},tool_name:{type:"text",nullable:!1},agent_id:{type:"text",nullable:!1},run_id:{type:"text",nullable:!1},thread_id:{type:"text",nullable:!0},resource_id:{type:"text",nullable:!0},status:{type:"text",nullable:!1},args:{type:"jsonb",nullable:!1},result:{type:"jsonb",nullable:!0},error:{type:"jsonb",nullable:!0},suspend_payload:{type:"jsonb",nullable:!0},retry_count:{type:"integer",nullable:!1},max_retries:{type:"integer",nullable:!1},timeout_ms:{type:"integer",nullable:!1},createdAt:{type:"timestamp",nullable:!1},startedAt:{type:"timestamp",nullable:!0},suspendedAt:{type:"timestamp",nullable:!0},completedAt:{type:"timestamp",nullable:!0}},[EX]:{id:{type:"text",nullable:!1,primaryKey:!0},target:{type:"jsonb",nullable:!1},cron:{type:"text",nullable:!1},timezone:{type:"text",nullable:!0},status:{type:"text",nullable:!1},next_fire_at:{type:"bigint",nullable:!1},last_fire_at:{type:"bigint",nullable:!0},last_run_id:{type:"text",nullable:!0},created_at:{type:"bigint",nullable:!1},updated_at:{type:"bigint",nullable:!1},metadata:{type:"jsonb",nullable:!0},owner_type:{type:"text",nullable:!0},owner_id:{type:"text",nullable:!0}},[hK]:{id:{type:"text",nullable:!1,primaryKey:!0},schedule_id:{type:"text",nullable:!1},run_id:{type:"text",nullable:!0},scheduled_fire_at:{type:"bigint",nullable:!1},actual_fire_at:{type:"bigint",nullable:!1},outcome:{type:"text",nullable:!1},error:{type:"text",nullable:!0},trigger_kind:{type:"text",nullable:!1},parent_trigger_id:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0}},[VG]:{id:{type:"text",nullable:!1,primaryKey:!0},platform:{type:"text",nullable:!1},agentId:{type:"text",nullable:!1},status:{type:"text",nullable:!1},webhookId:{type:"text",nullable:!0},data:{type:"jsonb",nullable:!1},configHash:{type:"text",nullable:!0},error:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},[fK]:{platform:{type:"text",nullable:!1,primaryKey:!0},data:{type:"jsonb",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}}},G64={[I8]:{columns:$j,compositePrimaryKey:["id","datasetVersion"]},[zG]:{columns:t_,compositePrimaryKey:["userId","entityType","entityId"]}},J64={[px0]:dx0}});import{randomUUID as zb8}from"crypto";import{join as ag,dirname as Q64,resolve as nx0,sep as cx0,relative as Vb8}from"path";import{existsSync as ND,mkdirSync as V90,readFileSync as W64,writeFileSync as Z64,renameSync as Ab8,rmSync as Fb8,readdirSync as Db8,statSync as Nb8}from"fs";function N8($){if($&&typeof $==="object")return $;if($==null)return{};if(typeof $==="string")try{return JSON.parse($)}catch{return $}return{}}function ax0($,Y,X={}){let{preferredTimestampFields:G={},convertTimestamps:J=!1,nullValuePattern:Q,fieldMappings:W={}}=X,Z=F5[Y],K={};for(let[H,z]of Object.entries(Z)){let V=W[H]??H,A=$[V];if(G[H])A=$[G[H]]??A;if(A===void 0||A===null)continue;if(Q&&A===Q)continue;if(z.type==="jsonb")if(typeof A==="string")K[H]=N8(A);else if(typeof A==="object")K[H]=A;else K[H]=A;else if(z.type==="timestamp"&&J&&typeof A==="string")K[H]=new Date(A);else K[H]=A}return K}function N90($,Y={}){return ax0($,N7,Y)}function lx0($){return $.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toUpperCase().replace(/[^A-Z0-9]+/g,"_").replace(/^_+|_+$/g,"")}function L90($,Y,X,G){let J=lx0(Y),Q=lx0(X),W=lx0(G);return`MASTRA_${$==="storage"?"STORAGE":"VECTOR"}_${J}_${Q}_${W}`}function P0($,Y,X){return L90("storage",$,Y,X)}function sx0($,Y,X){return L90("vector",$,Y,X)}function B90($){switch($){case"text":return"TEXT";case"timestamp":return"TIMESTAMP";case"float":return"FLOAT";case"integer":return"INTEGER";case"bigint":return"BIGINT";case"jsonb":return"JSONB";case"boolean":return"BOOLEAN";default:return"TEXT"}}function H64($){switch($){case"text":case"uuid":return"DEFAULT ''";case"timestamp":return"DEFAULT '1970-01-01 00:00:00'";case"integer":case"bigint":case"float":return"DEFAULT 0";case"jsonb":return"DEFAULT '{}'";case"boolean":return"DEFAULT FALSE";default:return"DEFAULT ''"}}function i$($){if(!$)return;return $ instanceof Date?$:new Date($)}function z64($){if(!$)return;return i$($)?.toISOString()}function D90($,Y,X){if(!X)return $;let G=$;if(X.start){let J=i$(X.start).getTime();G=G.filter((Q)=>{let W=Y(Q).getTime();return X.startExclusive?W>J:W>=J})}if(X.end){let J=i$(X.end).getTime();G=G.filter((Q)=>{let W=Y(Q).getTime();return X.endExclusive?W<J:W<=J})}return G}function JV($,Y){if($===void 0||Y===void 0)return $===Y;if($===null||Y===null)return $===Y;if(typeof $!==typeof Y)return!1;if($ instanceof Date&&Y instanceof Date)return $.getTime()===Y.getTime();if($ instanceof Date||Y instanceof Date)return!1;if(typeof $==="object"){if(Array.isArray($)&&Array.isArray(Y)){if($.length!==Y.length)return!1;return $.every((J,Q)=>JV(J,Y[Q]))}if(Array.isArray($)||Array.isArray(Y))return!1;let X=Object.keys($),G=Object.keys(Y);if(X.length!==G.length)return!1;return X.every((J)=>JV($[J],Y[J]))}return $===Y}function zE($){if($&&Lb8.has($))return $;return null}function p5($){return typeof $==="string"?$:null}function tx0($){return $!==null&&typeof $==="object"&&!Array.isArray($)?$:null}function O90($){if(!$.attributes)return null;try{return JSON.parse(JSON.stringify($.attributes,(Y,X)=>{if(X instanceof Date)return X.toISOString();return X}))}catch{return null}}function E90($){return{tags:$?.tags??null,entityType:$?.entityType??null,entityId:$?.entityId??null,entityName:$?.entityName??null,entityVersionId:$?.entityVersionId??null,parentEntityType:$?.parentEntityType??null,parentEntityId:$?.parentEntityId??null,parentEntityName:$?.parentEntityName??null,parentEntityVersionId:$?.parentEntityVersionId??null,rootEntityType:$?.rootEntityType??null,rootEntityId:$?.rootEntityId??null,rootEntityName:$?.rootEntityName??null,rootEntityVersionId:$?.rootEntityVersionId??null,userId:$?.userId??null,organizationId:$?.organizationId??null,resourceId:$?.resourceId??null,runId:$?.runId??null,sessionId:$?.sessionId??null,threadId:$?.threadId??null,requestId:$?.requestId??null,environment:$?.environment??null,executionSource:$?.source??null,serviceName:$?.serviceName??null,experimentId:$?.experimentId??null}}function Bb8($){return{entityType:zE($.entity_type),entityName:p5($.entity_name),parentEntityType:zE($.parent_type),parentEntityName:p5($.parent_name),serviceName:p5($.service_name)}}function Ob8($){let Y={...$};return delete Y.entity_type,delete Y.entity_name,delete Y.parent_type,delete Y.parent_name,delete Y.service_name,Y}function Eb8($){return{entityType:zE(p5($?.entity_type)??void 0),entityName:p5($?.entity_name),parentEntityType:zE(p5($?.parent_type)??void 0),parentEntityName:p5($?.parent_name),rootEntityType:zE(p5($?.root_type)??void 0),rootEntityName:p5($?.root_name),environment:p5($?.environment),executionSource:p5($?.source),serviceName:p5($?.service_name)}}function V64($){let Y=$.metadata??{};return{traceId:$.traceId,spanId:$.id,parentSpanId:$.parentSpanId??null,name:$.name,entityType:$.entityType??null,entityId:$.entityId??null,entityName:$.entityName??null,entityVersionId:p5(Y.entityVersionId),userId:p5(Y.userId),organizationId:p5(Y.organizationId),resourceId:p5(Y.resourceId),runId:p5(Y.runId),sessionId:p5(Y.sessionId),threadId:p5(Y.threadId),requestId:p5(Y.requestId),environment:p5(Y.environment),source:p5(Y.source),serviceName:p5(Y.serviceName),scope:tx0(Y.scope),experimentId:p5(Y.experimentId),spanType:$.type,attributes:O90($),metadata:$.metadata??null,tags:$.tags??null,links:null,input:$.input??null,output:$.output??null,error:$.errorInfo??null,isEvent:$.isEvent,requestContext:$.requestContext??null,startedAt:$.startTime,endedAt:$.endTime??null}}function A64($){return{name:$.name,scope:null,attributes:O90($),metadata:$.metadata??null,links:null,endedAt:$.endTime??null,input:$.input,output:$.output,error:$.errorInfo??null}}function F64($){let Y=$.metric,X=Ob8(Y.labels),G=E90(Y.correlationContext),J=Bb8(Y.labels),Q=Y.costContext;return{metricId:Y.metricId,timestamp:Y.timestamp,name:Y.name,value:Y.value,labels:X,traceId:Y.traceId??Y.correlationContext?.traceId??null,spanId:Y.spanId??Y.correlationContext?.spanId??null,...G,scope:null,entityType:G.entityType??J.entityType??null,entityName:G.entityName??J.entityName??null,parentEntityType:G.parentEntityType??J.parentEntityType??null,parentEntityName:G.parentEntityName??J.parentEntityName??null,serviceName:G.serviceName??J.serviceName??null,provider:Q?.provider??null,model:Q?.model??null,estimatedCost:Q?.estimatedCost??null,costUnit:Q?.costUnit??null,costMetadata:Q?.costMetadata??null,metadata:Y.metadata??null}}function D64($){let Y=$.log,X=E90(Y.correlationContext),G=Eb8(Y.metadata??null);return{logId:Y.logId,timestamp:Y.timestamp,level:Y.level,message:Y.message,data:Y.data??null,...X,traceId:Y.traceId??Y.correlationContext?.traceId??null,spanId:Y.spanId??Y.correlationContext?.spanId??null,tags:X.tags??Y.tags??null,entityType:X.entityType??G.entityType??null,entityName:X.entityName??G.entityName??null,parentEntityType:X.parentEntityType??G.parentEntityType??null,parentEntityName:X.parentEntityName??G.parentEntityName??null,rootEntityType:X.rootEntityType??G.rootEntityType??null,rootEntityName:X.rootEntityName??G.rootEntityName??null,environment:X.environment??G.environment??null,executionSource:X.executionSource??G.executionSource??null,serviceName:X.serviceName??G.serviceName??null,scope:null,metadata:Y.metadata??null}}function N64($){let Y=$.score,X=E90(Y.correlationContext);return{scoreId:Y.scoreId,timestamp:Y.timestamp,traceId:Y.traceId??Y.correlationContext?.traceId??null,spanId:Y.spanId??Y.correlationContext?.spanId??null,scorerId:Y.scorerId,scorerName:Y.scorerName??null,scorerVersion:Y.scorerVersion??null,scoreSource:Y.scoreSource??Y.source??null,source:Y.scoreSource??Y.source??null,score:Y.score,reason:Y.reason??null,...X,entityType:X.entityType??Y.targetEntityType??null,experimentId:X.experimentId??Y.experimentId??null,scope:null,scoreTraceId:Y.scoreTraceId??null,metadata:Y.metadata??null}}function L64($){let Y=$.feedback,X=E90(Y.correlationContext);return{feedbackId:Y.feedbackId,timestamp:Y.timestamp,traceId:Y.traceId??Y.correlationContext?.traceId??null,spanId:Y.spanId??Y.correlationContext?.spanId??null,feedbackSource:Y.feedbackSource??Y.source??"",source:Y.feedbackSource??Y.source??"",feedbackType:Y.feedbackType,value:Y.value,comment:Y.comment??null,...X,experimentId:X.experimentId??Y.experimentId??null,feedbackUserId:Y.feedbackUserId??Y.userId??(typeof Y.metadata?.userId==="string"?Y.metadata.userId:null),scope:null,sourceId:Y.sourceId??null,metadata:Y.metadata??null}}function qb8($){return Function("z",`"use strict";return (${$});`)(U)}function A90(){if(!ix0)ix0=new Ib8;return ix0}function HE($){return{id:$.id,datasetId:$.datasetId,datasetVersion:$.datasetVersion,input:$.input,groundTruth:$.groundTruth,expectedTrajectory:$.expectedTrajectory,requestContext:$.requestContext,metadata:$.metadata,source:$.source,createdAt:$.createdAt,updatedAt:$.updatedAt}}function F90($){return{...$,inputSchema:$.inputSchema??void 0,groundTruthSchema:$.groundTruthSchema??void 0,requestContextSchema:$.requestContextSchema??void 0}}function K64($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function GV($){return $==null?$:JSON.parse(JSON.stringify($))}function L04(){return{[rx0]:!0}}function Tb8($){return $!==null&&typeof $==="object"&&rx0 in $&&$[rx0]===!0}function Cb8($,Y){if(typeof Y==="string"&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(Y)){let X=new Date(Y);if(!isNaN(X.getTime()))return X}return Y}function O64($){let Y=[];for(let X of Db8($)){let G=ag($,X);if(Nb8(G).isDirectory())Y.push(...O64(G));else Y.push(G)}return Y}var sg,ox0,Lb8,og,ex0,tg,$y0,eg,Yy0,Mb8,Rb8,Ib8=class{cache=new Map;getValidator($,Y){let X=this.cache.get(Y);if(!X){let G=B80($);X=qb8(G),this.cache.set(Y,X)}return X}clearCache($){this.cache.delete($)}validate($,Y,X,G){let Q=this.getValidator(Y,G).safeParse($);if(!Q.success)throw new Mb8(X,this.formatErrors(Q.error))}validateBatch($,Y,X,G,J=10){let Q={valid:[],invalid:[]},W=Y?this.getValidator(Y,`${G}:input`):null,Z=X?this.getValidator(X,`${G}:output`):null;for(let[K,H]of $.entries()){let z=!1;if(W){let V=W.safeParse(H.input);if(!V.success){if(Q.invalid.push({index:K,data:H,field:"input",errors:this.formatErrors(V.error)}),z=!0,Q.invalid.length>=J)break}}if(!z&&Z&&H.groundTruth!==void 0){let V=Z.safeParse(H.groundTruth);if(!V.success){if(Q.invalid.push({index:K,data:H,field:"groundTruth",errors:this.formatErrors(V.error)}),z=!0,Q.invalid.length>=J)break}}if(!z)Q.valid.push({index:K,data:H})}return Q}formatErrors($){return $.issues.slice(0,5).map((Y)=>({path:Y.path.length>0?"/"+Y.path.join("/"):"/",code:Y.code,message:Y.message}))}},ix0=null,$m,Xy0,Ym,Gy0,Jy0=class{threads=new Map;messages=new Map;resources=new Map;workflows=new Map;scores=new Map;traces=new Map;metricRecords=[];logRecords=[];scoreRecords=[];feedbackRecords=[];agents=new Map;agentVersions=new Map;promptBlocks=new Map;promptBlockVersions=new Map;scorerDefinitions=new Map;scorerDefinitionVersions=new Map;mcpClients=new Map;mcpClientVersions=new Map;mcpServers=new Map;mcpServerVersions=new Map;workspaces=new Map;workspaceVersions=new Map;skills=new Map;skillVersions=new Map;favorites=new Map;observationalMemory=new Map;datasets=new Map;datasetItems=new Map;datasetVersions=new Map;experiments=new Map;experimentResults=new Map;backgroundTasks=new Map;schedules=new Map;scheduleTriggers=[];clear(){this.threads.clear(),this.messages.clear(),this.resources.clear(),this.workflows.clear(),this.scores.clear(),this.traces.clear(),this.metricRecords.length=0,this.logRecords.length=0,this.scoreRecords.length=0,this.feedbackRecords.length=0,this.agents.clear(),this.agentVersions.clear(),this.promptBlocks.clear(),this.promptBlockVersions.clear(),this.scorerDefinitions.clear(),this.scorerDefinitionVersions.clear(),this.mcpClients.clear(),this.mcpClientVersions.clear(),this.mcpServers.clear(),this.mcpServerVersions.clear(),this.workspaces.clear(),this.workspaceVersions.clear(),this.skills.clear(),this.skillVersions.clear(),this.favorites.clear(),this.observationalMemory.clear(),this.datasets.clear(),this.datasetItems.clear(),this.datasetVersions.clear(),this.experiments.clear(),this.experimentResults.clear(),this.backgroundTasks.clear(),this.schedules.clear(),this.scheduleTriggers.length=0}},Pb8,U64=128,wb8,Xm,_b8,jb8,Qy0,Gm,Wy0,Jm,Zy0,rx0="__mastra_pending__",Qm,Ky0,Uy0,B64,Hy0=class{dir;cache=new Map;initialized=!1;constructor($){this.dir=$}async init(){if(this.initialized)return;this.ensureDir(),this.initialized=!0}ensureDir(){if(!ND(this.dir))V90(this.dir,{recursive:!0});let $=ag(this.dir,"skills");if(!ND($))V90($,{recursive:!0})}readDomain($){if(this.cache.has($))return this.cache.get($);let Y=ag(this.dir,$),X={};if(ND(Y))try{let G=W64(Y,"utf-8");X=JSON.parse(G,Cb8)}catch{X={}}return this.cache.set($,X),X}writeDomain($,Y){this.cache.set($,Y);let X=ag(this.dir,$),G=X+".tmp",J=Q64(X);if(!ND(J))V90(J,{recursive:!0});Z64(G,JSON.stringify(Y,null,2),"utf-8"),Ab8(G,X)}clearDomain($){this.writeDomain($,{})}invalidateCache($){if($)this.cache.delete($);else this.cache.clear()}get($,Y){return this.readDomain($)[Y]??null}getAll($){let Y=this.readDomain($);return Object.values(Y)}set($,Y,X){let G=this.readDomain($);G[Y]=X,this.writeDomain($,G)}remove($,Y){let X=this.readDomain($);if(Y in X)delete X[Y],this.writeDomain($,X)}skillDir($){let Y=ag(this.dir,"skills"),X=nx0(Y,$);if(!X.startsWith(Y+cx0)&&X!==Y)throw Error(`Path traversal detected: skill name "${$}" escapes skills directory`);return X}safeSkillPath($,Y){let X=this.skillDir($),G=nx0(X,Y);if(!G.startsWith(X+cx0)&&G!==X)throw Error(`Path traversal detected: "${Y}" escapes skill directory`);return G}listSkillFiles($){let Y=this.skillDir($);if(!ND(Y))return[];return O64(Y).map((X)=>Vb8(Y,X).split(cx0).join("/"))}readSkillFile($,Y){let X=this.safeSkillPath($,Y);if(!ND(X))return null;try{return W64(X)}catch{return null}}writeSkillFile($,Y,X){let G=this.safeSkillPath($,Y),J=Q64(G);if(!ND(J))V90(J,{recursive:!0});Z64(G,X)}deleteSkillDir($){let Y=this.skillDir($);if(ND(Y))Fb8(Y,{recursive:!0,force:!0})}},E64,zy0,M64;var Bv0=V0(()=>{Bx0();Ox0();Ex0();Mx0();Rx0();qx0();Ix0();Px0();EU();z90();uz();dZ();Xg();EW();yv0();O1();sg=class $ extends IW{constructor(){super({component:"STORAGE",name:"OBSERVABILITY"})}async dangerouslyClearAll(){}get observabilityStrategy(){return{preferred:"batch-with-updates",supported:["realtime","batch-with-updates","insert-only"]}}get tracingStrategy(){return this.observabilityStrategy}get runtimeTracingStrategy(){let Y=this.observabilityStrategy.supported;return Y.length===1?Y[0]:void 0}async createSpan(Y){throw new G0({id:"OBSERVABILITY_CREATE_SPAN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support creating spans"})}async updateSpan(Y){throw new G0({id:"OBSERVABILITY_STORAGE_UPDATE_SPAN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support updating spans"})}async getSpan(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SPAN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting spans"})}async getRootSpan(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_ROOT_SPAN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting root spans"})}async getTrace(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_TRACE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting traces"})}async getStructure(Y){if(this.getTraceLight===$.prototype.getTraceLight)throw new G0({id:"OBSERVABILITY_STORAGE_GET_STRUCTURE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting trace structure"});return this.getTraceLight(Y)}async getTraceLight(Y){if(this.getStructure===$.prototype.getStructure)throw new G0({id:"OBSERVABILITY_STORAGE_GET_TRACE_LIGHT_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting lightweight traces"});return this.getStructure(Y)}async getBranch(Y){let X=Z90.parse(Y);try{let Q=await this.getStructure({traceId:X.traceId});if(!Q)return null;let W=yg(Q.spans,X.spanId,X.depth).map((K)=>K.spanId);if(W.length===0)return null;let{spans:Z}=await this.getSpans({traceId:X.traceId,spanIds:W});if(Z.length===0)return null;return Z.sort((K,H)=>K.startedAt.getTime()-H.startedAt.getTime()),{traceId:X.traceId,spans:Z}}catch(Q){if(!(Q instanceof G0&&(Q.id==="OBSERVABILITY_STORAGE_GET_STRUCTURE_NOT_IMPLEMENTED"||Q.id==="OBSERVABILITY_STORAGE_GET_TRACE_LIGHT_NOT_IMPLEMENTED"||Q.id==="OBSERVABILITY_STORAGE_GET_SPANS_NOT_IMPLEMENTED")))throw Q}let G=await this.getTrace({traceId:X.traceId});if(!G)return null;let J=yg(G.spans,X.spanId,X.depth);if(J.length===0)return null;return{traceId:X.traceId,spans:J}}async getSpans(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SPANS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch-fetching spans"})}async listTraces(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_TRACES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing traces"})}async listTracesLight(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_TRACES_LIGHT_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing lightweight traces"})}async listBranches(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_BRANCHES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing trace branches"})}async batchCreateSpans(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_CREATE_SPAN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch creating spans"})}async batchUpdateSpans(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_UPDATE_SPANS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch updating spans"})}async batchDeleteTraces(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_DELETE_TRACES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch deleting traces"})}async batchCreateLogs(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_CREATE_LOGS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch creating logs"})}async listLogs(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_LOGS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing logs"})}async batchCreateMetrics(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_CREATE_METRICS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch creating metrics"})}async listMetrics(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_METRICS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing metrics"})}async getMetricAggregate(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_AGGREGATE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric aggregation"})}async getMetricBreakdown(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_BREAKDOWN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric breakdown"})}async getMetricTimeSeries(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_TIME_SERIES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric time series"})}async getMetricPercentiles(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_PERCENTILES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric percentiles"})}async getMetricNames(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_NAMES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric name discovery"})}async getMetricLabelKeys(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_LABEL_KEYS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric label key discovery"})}async getMetricLabelValues(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support label value discovery"})}async getEntityTypes(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_ENTITY_TYPES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support entity type discovery"})}async getEntityNames(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support entity name discovery"})}async getServiceNames(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support service name discovery"})}async getEnvironments(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_ENVIRONMENTS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support environment discovery"})}async getTags(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_TAGS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support tag discovery"})}async createScore(Y){throw new G0({id:"OBSERVABILITY_STORAGE_CREATE_SCORE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support creating scores"})}async batchCreateScores(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_CREATE_SCORES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch creating scores"})}async listScores(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_SCORES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing scores"})}async getScoreById(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SCORE_BY_ID_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting scores by ID"})}async getScoreAggregate(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SCORE_AGGREGATE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support score aggregation"})}async getScoreBreakdown(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SCORE_BREAKDOWN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support score breakdown"})}async getScoreTimeSeries(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SCORE_TIME_SERIES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support score time series"})}async getScorePercentiles(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SCORE_PERCENTILES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support score percentiles"})}async createFeedback(Y){throw new G0({id:"OBSERVABILITY_STORAGE_CREATE_FEEDBACK_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support creating feedback"})}async batchCreateFeedback(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_CREATE_FEEDBACK_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch creating feedback"})}async listFeedback(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_FEEDBACK_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing feedback"})}async getFeedbackAggregate(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support feedback aggregation"})}async getFeedbackBreakdown(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_FEEDBACK_BREAKDOWN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support feedback breakdown"})}async getFeedbackTimeSeries(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_FEEDBACK_TIME_SERIES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support feedback time series"})}async getFeedbackPercentiles(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_FEEDBACK_PERCENTILES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support feedback percentiles"})}};ox0=class extends sg{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.traces.clear(),this.db.metricRecords.length=0,this.db.logRecords.length=0,this.db.scoreRecords.length=0,this.db.feedbackRecords.length=0}async createSpan($){let{span:Y}=$;this.validateCreateSpan(Y);let X=new Date,G={...Y,createdAt:X,updatedAt:X};this.upsertSpanToTrace(G)}async batchCreateSpans($){let Y=new Date;for(let X of $.records){this.validateCreateSpan(X);let G={...X,createdAt:Y,updatedAt:Y};this.upsertSpanToTrace(G)}}validateCreateSpan($){if(!$.spanId)throw new G0({id:"OBSERVABILITY_SPAN_ID_REQUIRED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"Span ID is required for creating a span"});if(!$.traceId)throw new G0({id:"OBSERVABILITY_TRACE_ID_REQUIRED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"Trace ID is required for creating a span"})}upsertSpanToTrace($){let{traceId:Y,spanId:X}=$,G=this.db.traces.get(Y);if(!G)G={spans:{},rootSpan:null,status:"running",hasChildError:!1},this.db.traces.set(Y,G);if(G.spans[X]=$,$.parentSpanId==null)G.rootSpan=$;this.recomputeTraceProperties(G)}recomputeTraceProperties($){let Y=Object.values($.spans);if(Y.length===0)return;$.hasChildError=Y.some((G)=>G.error!=null);let X=$.rootSpan;if(X)if(X.error!=null)$.status="error";else if(X.endedAt==null)$.status="running";else $.status="success";else $.status="running"}async getSpan($){let{traceId:Y,spanId:X}=$,G=this.db.traces.get(Y);if(!G)return null;let J=G.spans[X];if(!J)return null;return{span:J}}async getRootSpan($){let{traceId:Y}=$,X=this.db.traces.get(Y);if(!X||!X.rootSpan)return null;return{span:X.rootSpan}}async getTrace($){let{traceId:Y}=$,X=this.db.traces.get(Y);if(!X)return null;let G=Object.values(X.spans);if(G.length===0)return null;return G.sort((J,Q)=>J.startedAt.getTime()-Q.startedAt.getTime()),{traceId:Y,spans:G}}async getTraceLight($){let{traceId:Y}=$,X=this.db.traces.get(Y);if(!X)return null;let G=Object.values(X.spans);if(G.length===0)return null;return G.sort((J,Q)=>J.startedAt.getTime()-Q.startedAt.getTime()),{traceId:Y,spans:G.map((J)=>({traceId:J.traceId,spanId:J.spanId,parentSpanId:J.parentSpanId,name:J.name,spanType:J.spanType,isEvent:J.isEvent,startedAt:J.startedAt,endedAt:J.endedAt,error:J.error,entityType:J.entityType,entityId:J.entityId,entityName:J.entityName,createdAt:J.createdAt,updatedAt:J.updatedAt}))}}getMatchingRootSpans($){let{filters:Y,pagination:X,orderBy:G}=n_.parse($),J=[];for(let[,F]of this.db.traces){if(!F.rootSpan)continue;if(this.traceMatchesFilters(F,Y))J.push(F.rootSpan)}let{field:Q,direction:W}=G;J.sort((F,N)=>{if(Q==="endedAt"){let D=F.endedAt,L=N.endedAt;if(D==null&&L==null)return 0;if(D==null)return W==="DESC"?-1:1;if(L==null)return W==="DESC"?1:-1;let B=D.getTime()-L.getTime();return W==="DESC"?-B:B}else{let D=F.startedAt.getTime()-N.startedAt.getTime();return W==="DESC"?-D:D}});let Z=J.length,{page:K,perPage:H}=X,z=K*H,V=z+H;return{paged:J.slice(z,V),total:Z,page:K,perPage:H,hasMore:V<Z}}async listTraces($){let{paged:Y,total:X,page:G,perPage:J,hasMore:Q}=this.getMatchingRootSpans($);return{spans:i_(Y),pagination:{total:X,page:G,perPage:J,hasMore:Q}}}async listTracesLight($){let{paged:Y,total:X,page:G,perPage:J,hasMore:Q}=this.getMatchingRootSpans($);return{spans:Y.map((W)=>({traceId:W.traceId,spanId:W.spanId,parentSpanId:W.parentSpanId,name:W.name,spanType:W.spanType,isEvent:W.isEvent,startedAt:W.startedAt,endedAt:W.endedAt,error:W.error,entityType:W.entityType,entityId:W.entityId,entityName:W.entityName,createdAt:W.createdAt,updatedAt:W.updatedAt})),pagination:{total:X,page:G,perPage:J,hasMore:Q}}}traceMatchesFilters($,Y){if(!Y)return!0;let X=$.rootSpan;if(!X)return!1;if(Y.startedAt){if(Y.startedAt.start&&X.startedAt<Y.startedAt.start)return!1;if(Y.startedAt.end&&X.startedAt>Y.startedAt.end)return!1}if(Y.endedAt){if(X.endedAt==null)return!1;if(Y.endedAt.start&&X.endedAt<Y.endedAt.start)return!1;if(Y.endedAt.end&&X.endedAt>Y.endedAt.end)return!1}if(Y.spanType!==void 0&&X.spanType!==Y.spanType)return!1;if(Y.entityType!==void 0&&X.entityType!==Y.entityType)return!1;if(Y.entityId!==void 0&&X.entityId!==Y.entityId)return!1;if(Y.entityName!==void 0&&X.entityName!==Y.entityName)return!1;if(Y.entityVersionId!==void 0&&X.entityVersionId!==Y.entityVersionId)return!1;if(Y.experimentId!==void 0&&X.experimentId!==Y.experimentId)return!1;if(Y.userId!==void 0&&X.userId!==Y.userId)return!1;if(Y.organizationId!==void 0&&X.organizationId!==Y.organizationId)return!1;if(Y.resourceId!==void 0&&X.resourceId!==Y.resourceId)return!1;if(Y.runId!==void 0&&X.runId!==Y.runId)return!1;if(Y.sessionId!==void 0&&X.sessionId!==Y.sessionId)return!1;if(Y.threadId!==void 0&&X.threadId!==Y.threadId)return!1;if(Y.requestId!==void 0&&X.requestId!==Y.requestId)return!1;if(Y.environment!==void 0&&X.environment!==Y.environment)return!1;if(Y.source!==void 0&&X.source!==Y.source)return!1;if(Y.serviceName!==void 0&&X.serviceName!==Y.serviceName)return!1;if(Y.scope!=null&&X.scope!=null){for(let[G,J]of Object.entries(Y.scope))if(!JV(X.scope[G],J))return!1}else if(Y.scope!=null&&X.scope==null)return!1;if(Y.metadata!=null&&X.metadata!=null){for(let[G,J]of Object.entries(Y.metadata))if(!JV(X.metadata[G],J))return!1}else if(Y.metadata!=null&&X.metadata==null)return!1;if(Y.tags!=null&&Y.tags.length>0){if(X.tags==null)return!1;for(let G of Y.tags)if(!X.tags.includes(G))return!1}if(Y.status!==void 0&&$.status!==Y.status)return!1;if(Y.hasChildError!==void 0&&$.hasChildError!==Y.hasChildError)return!1;return!0}async listBranches($){let{filters:Y,pagination:X,orderBy:G}=U90.parse($),J=Y?.spanType?bg.has(Y.spanType)?new Set([Y.spanType]):new Set:bg,Q=[];for(let[,N]of this.db.traces)for(let D of Object.values(N.spans)){if(!J.has(D.spanType))continue;if(!this.spanMatchesBranchFilters(D,Y))continue;Q.push(D)}let{field:W,direction:Z}=G;Q.sort((N,D)=>{if(W==="endedAt"){let B=N.endedAt,O=D.endedAt;if(B==null&&O==null)return 0;if(B==null)return Z==="DESC"?-1:1;if(O==null)return Z==="DESC"?1:-1;let E=B.getTime()-O.getTime();return Z==="DESC"?-E:E}let L=N.startedAt.getTime()-D.startedAt.getTime();return Z==="DESC"?-L:L});let K=Q.length,{page:H,perPage:z}=X,V=H*z,A=V+z,F=Q.slice(V,A);return{pagination:{total:K,page:H,perPage:z,hasMore:A<K},branches:F.map(l_)}}spanMatchesBranchFilters($,Y){if(!Y)return!0;if(Y.startedAt){if(Y.startedAt.start&&$.startedAt<Y.startedAt.start)return!1;if(Y.startedAt.end&&$.startedAt>Y.startedAt.end)return!1}if(Y.endedAt){if($.endedAt==null)return!1;if(Y.endedAt.start&&$.endedAt<Y.endedAt.start)return!1;if(Y.endedAt.end&&$.endedAt>Y.endedAt.end)return!1}if(Y.traceId!==void 0&&$.traceId!==Y.traceId)return!1;if(Y.entityType!==void 0&&$.entityType!==Y.entityType)return!1;if(Y.entityId!==void 0&&$.entityId!==Y.entityId)return!1;if(Y.entityName!==void 0&&$.entityName!==Y.entityName)return!1;if(Y.entityVersionId!==void 0&&$.entityVersionId!==Y.entityVersionId)return!1;if(Y.parentEntityType!==void 0&&$.parentEntityType!==Y.parentEntityType)return!1;if(Y.parentEntityId!==void 0&&$.parentEntityId!==Y.parentEntityId)return!1;if(Y.parentEntityName!==void 0&&$.parentEntityName!==Y.parentEntityName)return!1;if(Y.parentEntityVersionId!==void 0&&$.parentEntityVersionId!==Y.parentEntityVersionId)return!1;if(Y.rootEntityType!==void 0&&$.rootEntityType!==Y.rootEntityType)return!1;if(Y.rootEntityId!==void 0&&$.rootEntityId!==Y.rootEntityId)return!1;if(Y.rootEntityName!==void 0&&$.rootEntityName!==Y.rootEntityName)return!1;if(Y.rootEntityVersionId!==void 0&&$.rootEntityVersionId!==Y.rootEntityVersionId)return!1;if(Y.experimentId!==void 0&&$.experimentId!==Y.experimentId)return!1;if(Y.userId!==void 0&&$.userId!==Y.userId)return!1;if(Y.organizationId!==void 0&&$.organizationId!==Y.organizationId)return!1;if(Y.resourceId!==void 0&&$.resourceId!==Y.resourceId)return!1;if(Y.runId!==void 0&&$.runId!==Y.runId)return!1;if(Y.sessionId!==void 0&&$.sessionId!==Y.sessionId)return!1;if(Y.threadId!==void 0&&$.threadId!==Y.threadId)return!1;if(Y.requestId!==void 0&&$.requestId!==Y.requestId)return!1;if(Y.environment!==void 0&&$.environment!==Y.environment)return!1;if(Y.source!==void 0&&$.source!==Y.source)return!1;if(Y.serviceName!==void 0&&$.serviceName!==Y.serviceName)return!1;if(Y.scope!=null&&$.scope!=null){for(let[X,G]of Object.entries(Y.scope))if(!JV($.scope[X],G))return!1}else if(Y.scope!=null&&$.scope==null)return!1;if(Y.metadata!=null&&$.metadata!=null){for(let[X,G]of Object.entries(Y.metadata))if(!JV($.metadata[X],G))return!1}else if(Y.metadata!=null&&$.metadata==null)return!1;if(Y.tags!=null&&Y.tags.length>0){if($.tags==null)return!1;for(let X of Y.tags)if(!$.tags.includes(X))return!1}if(Y.status!==void 0){if(l_($).status!==Y.status)return!1}return!0}async updateSpan($){let{traceId:Y,spanId:X,updates:G}=$,J=this.db.traces.get(Y);if(!J)throw new G0({id:"OBSERVABILITY_UPDATE_SPAN_NOT_FOUND",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"Trace not found for span update"});let Q=J.spans[X];if(!Q)throw new G0({id:"OBSERVABILITY_UPDATE_SPAN_NOT_FOUND",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"Span not found for update"});let W={...Q,...G,updatedAt:new Date};if(J.spans[X]=W,W.parentSpanId==null)J.rootSpan=W;this.recomputeTraceProperties(J)}async batchUpdateSpans($){for(let Y of $.records)await this.updateSpan(Y)}async batchDeleteTraces($){for(let Y of $.traceIds)this.db.traces.delete(Y)}async batchCreateMetrics($){for(let Y of $.metrics)this.db.metricRecords.push(Y)}async listMetrics($){let{filters:Y,pagination:X,orderBy:G}=M60.parse($),J=this.filterMetrics(Y),Q=G.direction==="DESC"?-1:1;J.sort((z,V)=>Q*(z.timestamp.getTime()-V.timestamp.getTime()));let W=J.length,Z=Number(X.page),K=Number(X.perPage),H=Z*K;return{metrics:J.slice(H,H+K),pagination:{total:W,page:Z,perPage:K,hasMore:H+K<W}}}filterMetrics($){if(!$)return[...this.db.metricRecords];return this.db.metricRecords.filter((Y)=>{if($.timestamp){let G=$.timestamp;if(G.start&&(G.startExclusive?Y.timestamp<=G.start:Y.timestamp<G.start))return!1;if(G.end&&(G.endExclusive?Y.timestamp>=G.end:Y.timestamp>G.end))return!1}if($.name!=null){if(!$.name.includes(Y.name))return!1}if($.traceId!==void 0&&Y.traceId!==$.traceId)return!1;if($.spanId!==void 0&&Y.spanId!==$.spanId)return!1;if($.provider!==void 0&&Y.provider!==$.provider)return!1;if($.model!==void 0&&Y.model!==$.model)return!1;if($.costUnit!==void 0&&Y.costUnit!==$.costUnit)return!1;if($.entityType!==void 0&&Y.entityType!==$.entityType)return!1;if($.entityName!==void 0&&Y.entityName!==$.entityName)return!1;if($.entityVersionId!==void 0&&Y.entityVersionId!==$.entityVersionId)return!1;if($.parentEntityVersionId!==void 0&&Y.parentEntityVersionId!==$.parentEntityVersionId)return!1;if($.rootEntityVersionId!==void 0&&Y.rootEntityVersionId!==$.rootEntityVersionId)return!1;if($.userId!==void 0&&Y.userId!==$.userId)return!1;if($.organizationId!==void 0&&Y.organizationId!==$.organizationId)return!1;if($.resourceId!==void 0&&Y.resourceId!==$.resourceId)return!1;if($.runId!==void 0&&Y.runId!==$.runId)return!1;if($.sessionId!==void 0&&Y.sessionId!==$.sessionId)return!1;if($.threadId!==void 0&&Y.threadId!==$.threadId)return!1;if($.requestId!==void 0&&Y.requestId!==$.requestId)return!1;if($.experimentId!==void 0&&Y.experimentId!==$.experimentId)return!1;if($.serviceName!==void 0&&Y.serviceName!==$.serviceName)return!1;if($.environment!==void 0&&Y.environment!==$.environment)return!1;let X=Y.executionSource??Y.source??null;if($.executionSource!==void 0&&X!==$.executionSource)return!1;if($.source!==void 0&&X!==$.source)return!1;if($.parentEntityType!==void 0&&Y.parentEntityType!==$.parentEntityType)return!1;if($.parentEntityName!==void 0&&Y.parentEntityName!==$.parentEntityName)return!1;if($.rootEntityType!==void 0&&Y.rootEntityType!==$.rootEntityType)return!1;if($.rootEntityName!==void 0&&Y.rootEntityName!==$.rootEntityName)return!1;if($.tags!=null&&Array.isArray($.tags)&&$.tags.length>0){if(Y.tags==null)return!1;for(let G of $.tags)if(!Y.tags.includes(G))return!1}if($.labels){let G=$.labels;for(let[J,Q]of Object.entries(G))if(Y.labels[J]!==Q)return!1}return!0})}aggregate($,Y,X,G){if(Y==="count_distinct"){if(!G)return 0;let J=new Set;for(let Q of G){if(Q===null||Q===void 0)continue;J.add(Q)}return J.size}if($.length===0)return null;switch(Y){case"sum":return $.reduce((J,Q)=>J+Q,0);case"avg":return $.reduce((J,Q)=>J+Q,0)/$.length;case"min":return Math.min(...$);case"max":return Math.max(...$);case"count":return $.length;case"last":{if(!X||X.length!==$.length)return $[$.length-1];let J=0,Q=X[0];for(let W=1;W<X.length;W++){let Z=X[W];if(Z>=Q)Q=Z,J=W}return $[J]}default:return $.reduce((J,Q)=>J+Q,0)}}extractDistinctValues($,Y){if(!Y)return;return $.map((X)=>{let G=X[Y];if(G===null||G===void 0)return null;if(typeof G==="string"||typeof G==="number")return G;return String(G)})}interpolatePercentile($,Y){if($.length===0)return 0;let X=Y*($.length-1),G=Math.floor(X),J=Math.ceil(X),Q=$[G],W=$[J];if(G===J)return Q;return Q+(W-Q)*(X-G)}summarizeCost($){let Y=$.map((G)=>G.estimatedCost).filter((G)=>typeof G==="number"&&Number.isFinite(G)),X=new Set($.map((G)=>G.costUnit).filter((G)=>typeof G==="string"));return{estimatedCost:Y.length>0?Y.reduce((G,J)=>G+J,0):null,costUnit:X.size===1?Array.from(X)[0]:null}}async getMetricAggregate($){let Y=Array.isArray($.name)?$.name:[$.name],X=this.filterMetrics($.filters).filter((Q)=>Y.includes(Q.name)),G=this.aggregate(X.map((Q)=>Q.value),$.aggregation,void 0,this.extractDistinctValues(X,$.distinctColumn)),J=this.summarizeCost(X);if($.comparePeriod&&$.filters?.timestamp){let Q=$.filters.timestamp;if(Q.start&&Q.end){let W=Q.end.getTime()-Q.start.getTime(),Z,K;switch($.comparePeriod){case"previous_period":Z=new Date(Q.start.getTime()-W),K=new Date(Q.end.getTime()-W);break;case"previous_day":Z=new Date(Q.start.getTime()-86400000),K=new Date(Q.end.getTime()-86400000);break;case"previous_week":Z=new Date(Q.start.getTime()-604800000),K=new Date(Q.end.getTime()-604800000);break}let H=this.filterMetrics({...$.filters,timestamp:{...Q,start:Z,end:K}}).filter((N)=>Y.includes(N.name)),z=this.aggregate(H.map((N)=>N.value),$.aggregation,void 0,this.extractDistinctValues(H,$.distinctColumn)),V=this.summarizeCost(H),A=null;if(z!==null&&z!==0&&G!==null)A=(G-z)/Math.abs(z)*100;let F=null;if(V.estimatedCost!==null&&V.estimatedCost!==0&&J.estimatedCost!==null)F=(J.estimatedCost-V.estimatedCost)/Math.abs(V.estimatedCost)*100;return{value:G,estimatedCost:J.estimatedCost,costUnit:J.costUnit,previousValue:z,previousEstimatedCost:V.estimatedCost,changePercent:A,costChangePercent:F}}}return{value:G,estimatedCost:J.estimatedCost,costUnit:J.costUnit}}async getMetricBreakdown($){let Y=Array.isArray($.name)?$.name:[$.name],X=this.filterMetrics($.filters).filter((Z)=>Y.includes(Z.name)),G=new Map;for(let Z of X){let K={};for(let z of $.groupBy)K[z]=Z[z]??Z.labels[z]??null;let H=JSON.stringify(K);if(!G.has(H))G.set(H,[]);G.get(H).push(Z)}let J=Array.from(G.entries()).map(([Z,K])=>{let H=this.summarizeCost(K);return{dimensions:JSON.parse(Z),value:this.aggregate(K.map((z)=>z.value),$.aggregation,void 0,this.extractDistinctValues(K,$.distinctColumn))??0,estimatedCost:H.estimatedCost,costUnit:H.costUnit}}),Q=$.orderDirection==="ASC"?1:-1;return J.sort((Z,K)=>(Z.value-K.value)*Q),{groups:typeof $.limit==="number"?J.slice(0,$.limit):J}}async getMetricTimeSeries($){let Y=Array.isArray($.name)?$.name:[$.name],X=this.filterMetrics($.filters).filter((Z)=>Y.includes(Z.name)),G=this.intervalToMs($.interval);if($.groupBy&&$.groupBy.length>0){let Z=new Map;for(let K of X){let H=$.groupBy.map((A)=>String(K[A]??K.labels[A]??"")).join("|");if(!Z.has(H))Z.set(H,new Map);let z=Math.floor(K.timestamp.getTime()/G)*G,V=Z.get(H);if(!V.has(z))V.set(z,[]);V.get(z).push(K)}return{series:Array.from(Z.entries()).map(([K,H])=>{let z=Array.from(H.values()).flat(),V=this.summarizeCost(z);return{name:K,costUnit:V.costUnit,points:Array.from(H.entries()).sort(([A],[F])=>A-F).map(([A,F])=>({timestamp:new Date(A),value:this.aggregate(F.map((N)=>N.value),$.aggregation,void 0,this.extractDistinctValues(F,$.distinctColumn))??0,estimatedCost:this.summarizeCost(F).estimatedCost}))}})}}let J=new Map;for(let Z of X){let K=Math.floor(Z.timestamp.getTime()/G)*G;if(!J.has(K))J.set(K,[]);J.get(K).push(Z)}let Q=Array.isArray($.name)?$.name.join(","):$.name,W=this.summarizeCost(X);return{series:[{name:Q,costUnit:W.costUnit,points:Array.from(J.entries()).sort(([Z],[K])=>Z-K).map(([Z,K])=>({timestamp:new Date(Z),value:this.aggregate(K.map((H)=>H.value),$.aggregation,void 0,this.extractDistinctValues(K,$.distinctColumn))??0,estimatedCost:this.summarizeCost(K).estimatedCost}))}]}}async getMetricPercentiles($){let Y=this.filterMetrics($.filters).filter((Q)=>Q.name===$.name),X=this.intervalToMs($.interval),G=new Map;for(let Q of Y){let W=Math.floor(Q.timestamp.getTime()/X)*X;if(!G.has(W))G.set(W,[]);G.get(W).push(Q.value)}let J=Array.from(G.entries()).sort(([Q],[W])=>Q-W);return{series:$.percentiles.map((Q)=>({percentile:Q,points:J.map(([W,Z])=>{let K=[...Z].sort((z,V)=>z-V),H=Math.min(Math.floor(Q*K.length),K.length-1);return{timestamp:new Date(W),value:K[H]??0}})}))}}intervalToMs($){switch($){case"1m":return 60000;case"5m":return 300000;case"15m":return 900000;case"1h":return 3600000;case"1d":return 86400000;default:return 3600000}}async getMetricNames($){let Y=new Set;for(let G of this.db.metricRecords){if($.prefix&&!G.name.startsWith($.prefix))continue;Y.add(G.name)}let X=Array.from(Y).sort();if($.limit)X=X.slice(0,$.limit);return{names:X}}async getMetricLabelKeys($){let Y=new Set;for(let X of this.db.metricRecords){if(X.name!==$.metricName)continue;for(let G of Object.keys(X.labels))Y.add(G)}return{keys:Array.from(Y).sort()}}async getMetricLabelValues($){let Y=new Set;for(let G of this.db.metricRecords){if(G.name!==$.metricName)continue;let J=G.labels[$.labelKey];if(J===void 0)continue;if($.prefix&&!J.startsWith($.prefix))continue;Y.add(J)}let X=Array.from(Y).sort();if($.limit)X=X.slice(0,$.limit);return{values:X}}async getEntityTypes($){let Y=new Set(Object.values(J6)),X=new Set;for(let[,G]of this.db.traces)for(let J of Object.values(G.spans))if(J.entityType&&Y.has(J.entityType))X.add(J.entityType);return{entityTypes:Array.from(X).sort()}}async getEntityNames($){let Y=new Set;for(let[,X]of this.db.traces)for(let G of Object.values(X.spans)){if(!G.entityName)continue;if($.entityType&&G.entityType!==$.entityType)continue;Y.add(G.entityName)}return{names:Array.from(Y).sort()}}async getServiceNames($){let Y=new Set;for(let[,X]of this.db.traces)for(let G of Object.values(X.spans))if(G.serviceName)Y.add(G.serviceName);return{serviceNames:Array.from(Y).sort()}}async getEnvironments($){let Y=new Set;for(let[,X]of this.db.traces)for(let G of Object.values(X.spans))if(G.environment)Y.add(G.environment);return{environments:Array.from(Y).sort()}}async getTags($){let Y=new Set;for(let[,X]of this.db.traces)for(let G of Object.values(X.spans)){if(!G.tags)continue;if($.entityType&&G.entityType!==$.entityType)continue;for(let J of G.tags)Y.add(J)}return{tags:Array.from(Y).sort()}}async batchCreateLogs($){for(let Y of $.logs)this.db.logRecords.push(Y)}async listLogs($){let{filters:Y,pagination:X,orderBy:G}=F60.parse($),J=this.db.logRecords.filter((z)=>this.logMatchesFilters(z,Y)),Q=G.direction==="DESC"?-1:1;J.sort((z,V)=>Q*(z.timestamp.getTime()-V.timestamp.getTime()));let W=J.length,Z=Number(X.page),K=Number(X.perPage),H=Z*K;return{logs:J.slice(H,H+K),pagination:{total:W,page:Z,perPage:K,hasMore:H+K<W}}}logMatchesFilters($,Y){if(!Y)return!0;if(Y.timestamp){if(Y.timestamp.start&&(Y.timestamp.startExclusive?$.timestamp<=Y.timestamp.start:$.timestamp<Y.timestamp.start))return!1;if(Y.timestamp.end&&(Y.timestamp.endExclusive?$.timestamp>=Y.timestamp.end:$.timestamp>Y.timestamp.end))return!1}if(Y.level!==void 0){if(!(Array.isArray(Y.level)?Y.level:[Y.level]).includes($.level))return!1}if(Y.traceId!==void 0&&$.traceId!==Y.traceId)return!1;if(Y.spanId!==void 0&&$.spanId!==Y.spanId)return!1;if(Y.entityType!==void 0&&$.entityType!==Y.entityType)return!1;if(Y.entityName!==void 0&&$.entityName!==Y.entityName)return!1;if(Y.entityVersionId!==void 0&&$.entityVersionId!==Y.entityVersionId)return!1;if(Y.parentEntityVersionId!==void 0&&$.parentEntityVersionId!==Y.parentEntityVersionId)return!1;if(Y.rootEntityVersionId!==void 0&&$.rootEntityVersionId!==Y.rootEntityVersionId)return!1;if(Y.userId!==void 0&&$.userId!==Y.userId)return!1;if(Y.organizationId!==void 0&&$.organizationId!==Y.organizationId)return!1;if(Y.resourceId!==void 0&&$.resourceId!==Y.resourceId)return!1;if(Y.runId!==void 0&&$.runId!==Y.runId)return!1;if(Y.sessionId!==void 0&&$.sessionId!==Y.sessionId)return!1;if(Y.threadId!==void 0&&$.threadId!==Y.threadId)return!1;if(Y.requestId!==void 0&&$.requestId!==Y.requestId)return!1;if(Y.parentEntityType!==void 0&&$.parentEntityType!==Y.parentEntityType)return!1;if(Y.parentEntityName!==void 0&&$.parentEntityName!==Y.parentEntityName)return!1;if(Y.rootEntityType!==void 0&&$.rootEntityType!==Y.rootEntityType)return!1;if(Y.rootEntityName!==void 0&&$.rootEntityName!==Y.rootEntityName)return!1;if(Y.serviceName!==void 0&&$.serviceName!==Y.serviceName)return!1;if(Y.environment!==void 0&&$.environment!==Y.environment)return!1;let X=$.executionSource??$.source??null;if(Y.executionSource!==void 0&&X!==Y.executionSource)return!1;if(Y.source!==void 0&&X!==Y.source)return!1;if(Y.experimentId!==void 0&&$.experimentId!==Y.experimentId)return!1;if(Y.tags!=null&&Y.tags.length>0){if($.tags==null)return!1;for(let G of Y.tags)if(!$.tags.includes(G))return!1}return!0}async createScore($){let Y=$.score.scoreSource??$.score.source??null;this.db.scoreRecords.push({...$.score,scoreSource:Y,source:Y})}async batchCreateScores($){for(let Y of $.scores){let X=Y.scoreSource??Y.source??null;this.db.scoreRecords.push({...Y,scoreSource:X,source:X})}}async listScores($){let{filters:Y,pagination:X,orderBy:G}=N60.parse($),J=this.db.scoreRecords.filter((z)=>this.scoreMatchesFilters(z,Y)),Q=G.direction==="DESC"?-1:1;if(G.field==="score")J.sort((z,V)=>Q*(z.score-V.score));else J.sort((z,V)=>Q*(z.timestamp.getTime()-V.timestamp.getTime()));let W=J.length,Z=Number(X.page),K=Number(X.perPage),H=Z*K;return{scores:J.slice(H,H+K),pagination:{total:W,page:Z,perPage:K,hasMore:H+K<W}}}async getScoreById($){return this.db.scoreRecords.find((Y)=>Y.scoreId===$)??null}scoreMatchesFilters($,Y){if(!Y)return!0;if(Y.timestamp){if(Y.timestamp.start&&$.timestamp<Y.timestamp.start)return!1;if(Y.timestamp.end&&$.timestamp>Y.timestamp.end)return!1}if(Y.traceId!==void 0&&$.traceId!==Y.traceId)return!1;if(Y.spanId!==void 0&&$.spanId!==Y.spanId)return!1;if(Y.entityType!==void 0&&$.entityType!==Y.entityType)return!1;if(Y.entityName!==void 0&&$.entityName!==Y.entityName)return!1;if(Y.entityVersionId!==void 0&&$.entityVersionId!==Y.entityVersionId)return!1;if(Y.parentEntityVersionId!==void 0&&$.parentEntityVersionId!==Y.parentEntityVersionId)return!1;if(Y.rootEntityVersionId!==void 0&&$.rootEntityVersionId!==Y.rootEntityVersionId)return!1;if(Y.userId!==void 0&&$.userId!==Y.userId)return!1;if(Y.organizationId!==void 0&&$.organizationId!==Y.organizationId)return!1;if(Y.resourceId!==void 0&&$.resourceId!==Y.resourceId)return!1;if(Y.runId!==void 0&&$.runId!==Y.runId)return!1;if(Y.sessionId!==void 0&&$.sessionId!==Y.sessionId)return!1;if(Y.threadId!==void 0&&$.threadId!==Y.threadId)return!1;if(Y.requestId!==void 0&&$.requestId!==Y.requestId)return!1;if(Y.parentEntityType!==void 0&&$.parentEntityType!==Y.parentEntityType)return!1;if(Y.parentEntityName!==void 0&&$.parentEntityName!==Y.parentEntityName)return!1;if(Y.rootEntityType!==void 0&&$.rootEntityType!==Y.rootEntityType)return!1;if(Y.rootEntityName!==void 0&&$.rootEntityName!==Y.rootEntityName)return!1;if(Y.serviceName!==void 0&&$.serviceName!==Y.serviceName)return!1;if(Y.environment!==void 0&&$.environment!==Y.environment)return!1;if(Y.executionSource!==void 0&&$.executionSource!==Y.executionSource)return!1;if(Y.scorerId!==void 0){if(!(Array.isArray(Y.scorerId)?Y.scorerId:[Y.scorerId]).includes($.scorerId))return!1}let X=$.scoreSource??$.source??null;if(Y.scoreSource!==void 0&&X!==Y.scoreSource)return!1;if(Y.source!==void 0&&X!==Y.source)return!1;if(Y.experimentId!==void 0&&$.experimentId!==Y.experimentId)return!1;if(Y.tags!=null&&Y.tags.length>0){if($.tags==null)return!1;for(let G of Y.tags)if(!$.tags.includes(G))return!1}return!0}async getScoreAggregate($){let Y=this.db.scoreRecords.filter((G)=>this.scoreMatchesFilters(G,$.filters)).filter((G)=>G.scorerId===$.scorerId).filter((G)=>$.scoreSource?(G.scoreSource??G.source??null)===$.scoreSource:!0),X=this.aggregate(Y.map((G)=>G.score),$.aggregation,Y.map((G)=>G.timestamp.getTime()));if($.comparePeriod&&$.filters?.timestamp){let G=this.getComparisonDateRange($.comparePeriod,$.filters.timestamp);if(G){let J=this.db.scoreRecords.filter((Z)=>this.scoreMatchesFilters(Z,{...$.filters??{},timestamp:G})).filter((Z)=>Z.scorerId===$.scorerId).filter((Z)=>$.scoreSource?(Z.scoreSource??Z.source??null)===$.scoreSource:!0),Q=this.aggregate(J.map((Z)=>Z.score),$.aggregation,J.map((Z)=>Z.timestamp.getTime())),W=null;if(Q!==null&&Q!==0&&X!==null)W=(X-Q)/Math.abs(Q)*100;return{value:X,previousValue:Q,changePercent:W}}}return{value:X}}async getScoreBreakdown($){let Y=this.db.scoreRecords.filter((J)=>this.scoreMatchesFilters(J,$.filters)).filter((J)=>J.scorerId===$.scorerId).filter((J)=>$.scoreSource?(J.scoreSource??J.source??null)===$.scoreSource:!0),X=new Map;for(let J of Y){let Q={};for(let Z of $.groupBy){let K=J[Z];Q[Z]=K===null||K===void 0?null:String(K)}let W=JSON.stringify(Q);if(!X.has(W))X.set(W,[]);X.get(W).push(J)}let G=Array.from(X.entries()).map(([J,Q])=>({dimensions:JSON.parse(J),value:this.aggregate(Q.map((W)=>W.score),$.aggregation,Q.map((W)=>W.timestamp.getTime()))??0}));return G.sort((J,Q)=>Q.value-J.value),{groups:G}}async getScoreTimeSeries($){let Y=this.db.scoreRecords.filter((J)=>this.scoreMatchesFilters(J,$.filters)).filter((J)=>J.scorerId===$.scorerId).filter((J)=>$.scoreSource?(J.scoreSource??J.source??null)===$.scoreSource:!0),X=this.intervalToMs($.interval);if($.groupBy&&$.groupBy.length>0){let J=new Map,Q=new Map;for(let W of Y){let Z=$.groupBy.map((V)=>W[V]??""),K=JSON.stringify(Z);if(!J.has(K))J.set(K,new Map);if(!Q.has(K))Q.set(K,Z.map((V)=>V===null||V===void 0?"":String(V)).join("|"));let H=Math.floor(W.timestamp.getTime()/X)*X,z=J.get(K);if(!z.has(H))z.set(H,[]);z.get(H).push(W)}return{series:Array.from(J.entries()).map(([W,Z])=>({name:Q.get(W),points:Array.from(Z.entries()).sort(([K],[H])=>K-H).map(([K,H])=>({timestamp:new Date(K),value:this.aggregate(H.map((z)=>z.score),$.aggregation,H.map((z)=>z.timestamp.getTime()))??0}))}))}}let G=new Map;for(let J of Y){let Q=Math.floor(J.timestamp.getTime()/X)*X;if(!G.has(Q))G.set(Q,[]);G.get(Q).push(J)}return{series:[{name:$.scoreSource?`${$.scorerId}|${$.scoreSource}`:$.scorerId,points:Array.from(G.entries()).sort(([J],[Q])=>J-Q).map(([J,Q])=>({timestamp:new Date(J),value:this.aggregate(Q.map((W)=>W.score),$.aggregation,Q.map((W)=>W.timestamp.getTime()))??0}))}]}}async getScorePercentiles($){let Y=this.db.scoreRecords.filter((Q)=>this.scoreMatchesFilters(Q,$.filters)).filter((Q)=>Q.scorerId===$.scorerId).filter((Q)=>$.scoreSource?(Q.scoreSource??Q.source??null)===$.scoreSource:!0),X=this.intervalToMs($.interval),G=new Map;for(let Q of Y){let W=Math.floor(Q.timestamp.getTime()/X)*X;if(!G.has(W))G.set(W,[]);G.get(W).push(Q.score)}let J=Array.from(G.entries()).sort(([Q],[W])=>Q-W);return{series:$.percentiles.map((Q)=>({percentile:Q,points:J.map(([W,Z])=>{let K=[...Z].sort((H,z)=>H-z);return{timestamp:new Date(W),value:this.interpolatePercentile(K,Q)}})}))}}getNumericFeedbackValue($){if(typeof $==="number")return Number.isFinite($)?$:null;if(typeof $==="string"){let Y=$.trim();if(Y.length===0)return null;let X=Number(Y);return Number.isFinite(X)?X:null}return null}getComparisonDateRange($,Y){if(!Y.start||!Y.end)return null;let X=Y.end.getTime()-Y.start.getTime();switch($){case"previous_period":return{start:new Date(Y.start.getTime()-X),end:new Date(Y.end.getTime()-X),startExclusive:Y.startExclusive,endExclusive:Y.endExclusive};case"previous_day":return{start:new Date(Y.start.getTime()-86400000),end:new Date(Y.end.getTime()-86400000),startExclusive:Y.startExclusive,endExclusive:Y.endExclusive};case"previous_week":return{start:new Date(Y.start.getTime()-604800000),end:new Date(Y.end.getTime()-604800000),startExclusive:Y.startExclusive,endExclusive:Y.endExclusive}}}async createFeedback($){this.db.feedbackRecords.push({...$.feedback,feedbackSource:$.feedback.feedbackSource??$.feedback.source??"",source:$.feedback.feedbackSource??$.feedback.source??"",feedbackUserId:$.feedback.feedbackUserId??$.feedback.userId??(typeof $.feedback.metadata?.userId==="string"?$.feedback.metadata.userId:null)})}async batchCreateFeedback($){for(let Y of $.feedbacks)this.db.feedbackRecords.push({...Y,feedbackSource:Y.feedbackSource??Y.source??"",source:Y.feedbackSource??Y.source??"",feedbackUserId:Y.feedbackUserId??Y.userId??(typeof Y.metadata?.userId==="string"?Y.metadata.userId:null)})}async listFeedback($){let{filters:Y,pagination:X,orderBy:G}=O60.parse($),J=this.db.feedbackRecords.filter((z)=>this.feedbackMatchesFilters(z,Y)),Q=G.direction==="DESC"?-1:1;J.sort((z,V)=>Q*(z.timestamp.getTime()-V.timestamp.getTime()));let W=J.length,Z=Number(X.page),K=Number(X.perPage),H=Z*K;return{feedback:J.slice(H,H+K),pagination:{total:W,page:Z,perPage:K,hasMore:H+K<W}}}async getFeedbackAggregate($){let X=this.db.feedbackRecords.filter((J)=>this.feedbackMatchesFilters(J,$.filters)).filter((J)=>J.feedbackType===$.feedbackType).filter((J)=>$.feedbackSource?(J.feedbackSource??J.source??"")===$.feedbackSource:!0).flatMap((J)=>{let Q=this.getNumericFeedbackValue(J.value);return Q===null?[]:[{numericValue:Q,timestamp:J.timestamp.getTime()}]}),G=this.aggregate(X.map((J)=>J.numericValue),$.aggregation,X.map((J)=>J.timestamp));if($.comparePeriod&&$.filters?.timestamp){let J=this.getComparisonDateRange($.comparePeriod,$.filters.timestamp);if(J){let Q=this.db.feedbackRecords.filter((K)=>this.feedbackMatchesFilters(K,{...$.filters??{},timestamp:J})).filter((K)=>K.feedbackType===$.feedbackType).filter((K)=>$.feedbackSource?(K.feedbackSource??K.source??"")===$.feedbackSource:!0).flatMap((K)=>{let H=this.getNumericFeedbackValue(K.value);return H===null?[]:[{numericValue:H,timestamp:K.timestamp.getTime()}]}),W=this.aggregate(Q.map((K)=>K.numericValue),$.aggregation,Q.map((K)=>K.timestamp)),Z=null;if(W!==null&&W!==0&&G!==null)Z=(G-W)/Math.abs(W)*100;return{value:G,previousValue:W,changePercent:Z}}}return{value:G}}async getFeedbackBreakdown($){let Y=this.db.feedbackRecords.filter((J)=>this.feedbackMatchesFilters(J,$.filters)).filter((J)=>J.feedbackType===$.feedbackType).filter((J)=>$.feedbackSource?(J.feedbackSource??J.source??"")===$.feedbackSource:!0).filter((J)=>this.getNumericFeedbackValue(J.value)!==null),X=new Map;for(let J of Y){let Q={};for(let Z of $.groupBy){let K=J[Z];Q[Z]=K===null||K===void 0?null:String(K)}let W=JSON.stringify(Q);if(!X.has(W))X.set(W,[]);X.get(W).push(J)}let G=Array.from(X.entries()).map(([J,Q])=>({dimensions:JSON.parse(J),value:(()=>{let W=Q.flatMap((Z)=>{let K=this.getNumericFeedbackValue(Z.value);return K===null?[]:[{numericValue:K,timestamp:Z.timestamp.getTime()}]});return this.aggregate(W.map((Z)=>Z.numericValue),$.aggregation,W.map((Z)=>Z.timestamp))??0})()}));return G.sort((J,Q)=>Q.value-J.value),{groups:G}}async getFeedbackTimeSeries($){let Y=this.db.feedbackRecords.filter((J)=>this.feedbackMatchesFilters(J,$.filters)).filter((J)=>J.feedbackType===$.feedbackType).filter((J)=>$.feedbackSource?(J.feedbackSource??J.source??"")===$.feedbackSource:!0).filter((J)=>this.getNumericFeedbackValue(J.value)!==null),X=this.intervalToMs($.interval);if($.groupBy&&$.groupBy.length>0){let J=new Map,Q=new Map;for(let W of Y){let Z=$.groupBy.map((V)=>W[V]??""),K=JSON.stringify(Z);if(!J.has(K))J.set(K,new Map);if(!Q.has(K))Q.set(K,Z.map((V)=>V===null||V===void 0?"":String(V)).join("|"));let H=Math.floor(W.timestamp.getTime()/X)*X,z=J.get(K);if(!z.has(H))z.set(H,[]);z.get(H).push(W)}return{series:Array.from(J.entries()).map(([W,Z])=>({name:Q.get(W),points:Array.from(Z.entries()).sort(([K],[H])=>K-H).map(([K,H])=>({timestamp:new Date(K),value:(()=>{let z=H.flatMap((V)=>{let A=this.getNumericFeedbackValue(V.value);return A===null?[]:[{numericValue:A,timestamp:V.timestamp.getTime()}]});return this.aggregate(z.map((V)=>V.numericValue),$.aggregation,z.map((V)=>V.timestamp))??0})()}))}))}}let G=new Map;for(let J of Y){let Q=Math.floor(J.timestamp.getTime()/X)*X;if(!G.has(Q))G.set(Q,[]);G.get(Q).push(J)}return{series:[{name:$.feedbackSource?`${$.feedbackType}|${$.feedbackSource}`:$.feedbackType,points:Array.from(G.entries()).sort(([J],[Q])=>J-Q).map(([J,Q])=>({timestamp:new Date(J),value:(()=>{let W=Q.flatMap((Z)=>{let K=this.getNumericFeedbackValue(Z.value);return K===null?[]:[{numericValue:K,timestamp:Z.timestamp.getTime()}]});return this.aggregate(W.map((Z)=>Z.numericValue),$.aggregation,W.map((Z)=>Z.timestamp))??0})()}))}]}}async getFeedbackPercentiles($){let Y=this.db.feedbackRecords.filter((Q)=>this.feedbackMatchesFilters(Q,$.filters)).filter((Q)=>Q.feedbackType===$.feedbackType).filter((Q)=>$.feedbackSource?(Q.feedbackSource??Q.source??"")===$.feedbackSource:!0),X=this.intervalToMs($.interval),G=new Map;for(let Q of Y){let W=this.getNumericFeedbackValue(Q.value);if(W===null)continue;let Z=Math.floor(Q.timestamp.getTime()/X)*X;if(!G.has(Z))G.set(Z,[]);G.get(Z).push(W)}let J=Array.from(G.entries()).sort(([Q],[W])=>Q-W);return{series:$.percentiles.map((Q)=>({percentile:Q,points:J.map(([W,Z])=>{let K=[...Z].sort((H,z)=>H-z);return{timestamp:new Date(W),value:this.interpolatePercentile(K,Q)}})}))}}feedbackMatchesFilters($,Y){if(!Y)return!0;if(Y.timestamp){if(Y.timestamp.start&&$.timestamp<Y.timestamp.start)return!1;if(Y.timestamp.end&&$.timestamp>Y.timestamp.end)return!1}if(Y.traceId!==void 0&&$.traceId!==Y.traceId)return!1;if(Y.spanId!==void 0&&$.spanId!==Y.spanId)return!1;if(Y.entityType!==void 0&&$.entityType!==Y.entityType)return!1;if(Y.entityName!==void 0&&$.entityName!==Y.entityName)return!1;if(Y.entityVersionId!==void 0&&$.entityVersionId!==Y.entityVersionId)return!1;if(Y.parentEntityVersionId!==void 0&&$.parentEntityVersionId!==Y.parentEntityVersionId)return!1;if(Y.rootEntityVersionId!==void 0&&$.rootEntityVersionId!==Y.rootEntityVersionId)return!1;if(Y.userId!==void 0&&$.userId!==Y.userId)return!1;if(Y.organizationId!==void 0&&$.organizationId!==Y.organizationId)return!1;if(Y.resourceId!==void 0&&$.resourceId!==Y.resourceId)return!1;if(Y.runId!==void 0&&$.runId!==Y.runId)return!1;if(Y.sessionId!==void 0&&$.sessionId!==Y.sessionId)return!1;if(Y.threadId!==void 0&&$.threadId!==Y.threadId)return!1;if(Y.requestId!==void 0&&$.requestId!==Y.requestId)return!1;if(Y.parentEntityType!==void 0&&$.parentEntityType!==Y.parentEntityType)return!1;if(Y.parentEntityName!==void 0&&$.parentEntityName!==Y.parentEntityName)return!1;if(Y.rootEntityType!==void 0&&$.rootEntityType!==Y.rootEntityType)return!1;if(Y.rootEntityName!==void 0&&$.rootEntityName!==Y.rootEntityName)return!1;if(Y.serviceName!==void 0&&$.serviceName!==Y.serviceName)return!1;if(Y.environment!==void 0&&$.environment!==Y.environment)return!1;if(Y.executionSource!==void 0&&$.executionSource!==Y.executionSource)return!1;if(Y.feedbackType!==void 0){if(!(Array.isArray(Y.feedbackType)?Y.feedbackType:[Y.feedbackType]).includes($.feedbackType))return!1}let X=$.feedbackSource??$.source??"";if(Y.feedbackSource!==void 0&&X!==Y.feedbackSource)return!1;if(Y.source!==void 0&&X!==Y.source)return!1;if(Y.experimentId!==void 0&&$.experimentId!==Y.experimentId)return!1;if(Y.feedbackUserId!==void 0&&$.feedbackUserId!==Y.feedbackUserId)return!1;if(Y.tags!=null&&Y.tags.length>0){if($.tags==null)return!1;for(let G of Y.tags)if(!$.tags.includes(G))return!1}return!0}},Lb8=new Set(Object.values(J6));og=class extends IW{constructor(){super({component:"STORAGE",name:"BACKGROUND_TASKS"})}async dangerouslyClearAll(){}},ex0=class extends og{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.backgroundTasks.clear()}async createTask($){this.db.backgroundTasks.set($.id,{...$})}async updateTask($,Y){let X=this.db.backgroundTasks.get($);if(!X)return;this.db.backgroundTasks.set($,{...X,...Y})}async getTask($){let Y=this.db.backgroundTasks.get($);return Y?{...Y}:null}async listTasks($){let Y=Array.from(this.db.backgroundTasks.values());if($.status){let W=Array.isArray($.status)?$.status:[$.status];Y=Y.filter((Z)=>W.includes(Z.status))}if($.agentId)Y=Y.filter((W)=>W.agentId===$.agentId);if($.threadId)Y=Y.filter((W)=>W.threadId===$.threadId);if($.resourceId)Y=Y.filter((W)=>W.resourceId===$.resourceId);if($.toolName)Y=Y.filter((W)=>W.toolName===$.toolName);if($.toolCallId)Y=Y.filter((W)=>W.toolCallId===$.toolCallId);if($.runId)Y=Y.filter((W)=>W.runId===$.runId);let X=$.dateFilterBy??"createdAt";if($.fromDate)Y=Y.filter((W)=>{let Z=W[X];return Z!=null&&Z>=$.fromDate});if($.toDate)Y=Y.filter((W)=>{let Z=W[X];return Z!=null&&Z<$.toDate});let G=$.orderBy??"createdAt",J=$.orderDirection??"asc";Y.sort((W,Z)=>{let K=W[G]?.getTime()??0,H=Z[G]?.getTime()??0;return J==="asc"?K-H:H-K});let Q=Y.length;if($.page!=null&&$.perPage!=null){let W=$.page*$.perPage;Y=Y.slice(W,W+$.perPage)}else if($.perPage!=null)Y=Y.slice(0,$.perPage);return{tasks:Y.map((W)=>({...W})),total:Q}}async deleteTask($){this.db.backgroundTasks.delete($)}async deleteTasks($){let{tasks:Y}=await this.listTasks($);for(let X of Y)this.db.backgroundTasks.delete(X.id)}async getRunningCount(){let $=0;for(let Y of this.db.backgroundTasks.values())if(Y.status==="running")$++;return $}async getRunningCountByAgent($){let Y=0;for(let X of this.db.backgroundTasks.values())if(X.status==="running"&&X.agentId===$)Y++;return Y}},tg=class extends u8{constructor(){super({component:"STORAGE",name:"BLOBS"})}},$y0=class extends tg{#$=new Map;async init(){}async put($){if(!this.#$.has($.hash))this.#$.set($.hash,$)}async get($){return this.#$.get($)??null}async has($){return this.#$.has($)}async delete($){return this.#$.delete($)}async putMany($){for(let Y of $)await this.put(Y)}async getMany($){let Y=new Map;for(let X of $){let G=this.#$.get(X);if(G)Y.set(X,G)}return Y}async dangerouslyClearAll(){this.#$.clear()}},eg=class extends IW{constructor(){super({component:"STORAGE",name:"CHANNELS"})}},Yy0=class extends eg{#$=new Map;#Y=new Map;async saveInstallation($){this.#$.set($.id,{...$})}async getInstallation($){let Y=this.#$.get($);return Y?{...Y}:null}async getInstallationByAgent($,Y){let X={active:0,pending:1,error:2},G=null;for(let J of this.#$.values())if(J.platform===$&&J.agentId===Y){if(!G||(X[J.status]??3)<(X[G.status]??3))G=J}return G?{...G}:null}async getInstallationByWebhookId($){for(let Y of this.#$.values())if(Y.webhookId===$)return{...Y};return null}async listInstallations($){let Y=[];for(let X of this.#$.values())if(X.platform===$)Y.push({...X});return Y}async deleteInstallation($){this.#$.delete($)}async saveConfig($){this.#Y.set($.platform,{...$})}async getConfig($){let Y=this.#Y.get($);return Y?{...Y}:null}async deleteConfig($){this.#Y.delete($)}async dangerouslyClearAll(){this.#$.clear(),this.#Y.clear()}},Mb8=class extends Error{constructor($,Y){let X=Y.slice(0,3).map((G)=>G.message).join("; ");super(`Validation failed for ${$}: ${X}`);this.field=$,this.errors=Y,this.name="SchemaValidationError"}field;errors},Rb8=class extends Error{constructor($){let Y=$.length;super(`Cannot update schema: ${Y} existing item(s) would fail validation`);this.failingItems=$,this.name="SchemaUpdateValidationError"}failingItems};$m=class extends IW{constructor(){super({component:"STORAGE",name:"DATASETS"})}async dangerouslyClearAll(){}async updateDataset($){let Y=await this.getDatasetById({id:$.id});if(!Y)throw Error(`Dataset not found: ${$.id}`);let X=$.inputSchema!==void 0&&JSON.stringify($.inputSchema)!==JSON.stringify(Y.inputSchema),G=$.groundTruthSchema!==void 0&&JSON.stringify($.groundTruthSchema)!==JSON.stringify(Y.groundTruthSchema);if(X||G){let Q=(await this.listItems({datasetId:$.id,pagination:{page:0,perPage:!1}})).items;if(Q.length>0){let W=A90(),Z=$.inputSchema!==void 0?$.inputSchema:Y.inputSchema,K=$.groundTruthSchema!==void 0?$.groundTruthSchema:Y.groundTruthSchema,H=W.validateBatch(Q.map((z)=>({input:z.input,groundTruth:z.groundTruth})),Z,K,`dataset:${$.id}:schema-update`,10);if(H.invalid.length>0)throw new Rb8(H.invalid);W.clearCache(`dataset:${$.id}:input`),W.clearCache(`dataset:${$.id}:output`)}}return this._doUpdateDataset($)}async addItem($){let Y=await this.getDatasetById({id:$.datasetId});if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=A90(),G=`dataset:${$.datasetId}`;if(Y.inputSchema)X.validate($.input,Y.inputSchema,"input",`${G}:input`);if(Y.groundTruthSchema&&$.groundTruth!==void 0)X.validate($.groundTruth,Y.groundTruthSchema,"groundTruth",`${G}:output`);return this._doAddItem($)}async updateItem($){let Y=await this.getDatasetById({id:$.datasetId});if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=A90(),G=`dataset:${$.datasetId}`;if($.input!==void 0&&Y.inputSchema)X.validate($.input,Y.inputSchema,"input",`${G}:input`);if($.groundTruth!==void 0&&Y.groundTruthSchema)X.validate($.groundTruth,Y.groundTruthSchema,"groundTruth",`${G}:output`);return this._doUpdateItem($)}async deleteItem($){return this._doDeleteItem($)}async batchInsertItems($){let Y=await this.getDatasetById({id:$.datasetId});if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=A90(),G=`dataset:${$.datasetId}`;for(let J of $.items){if(Y.inputSchema)X.validate(J.input,Y.inputSchema,"input",`${G}:input`);if(Y.groundTruthSchema&&J.groundTruth!==void 0)X.validate(J.groundTruth,Y.groundTruthSchema,"groundTruth",`${G}:output`)}return this._doBatchInsertItems($)}async batchDeleteItems($){if(!await this.getDatasetById({id:$.datasetId}))throw Error(`Dataset not found: ${$.datasetId}`);return this._doBatchDeleteItems($)}};Xy0=class extends $m{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.datasets.clear(),this.db.datasetItems.clear(),this.db.datasetVersions.clear()}async createDataset($){let Y=crypto.randomUUID(),X=new Date,G={id:Y,name:$.name,description:$.description,metadata:$.metadata,inputSchema:$.inputSchema,groundTruthSchema:$.groundTruthSchema,requestContextSchema:$.requestContextSchema,targetType:$.targetType,targetIds:$.targetIds,scorerIds:$.scorerIds??null,version:0,createdAt:X,updatedAt:X};return this.db.datasets.set(Y,G),F90(G)}async getDatasetById({id:$}){let Y=this.db.datasets.get($);return Y?F90(Y):null}async _doUpdateDataset($){let Y=this.db.datasets.get($.id);if(!Y)throw Error(`Dataset not found: ${$.id}`);let X={...Y,name:$.name??Y.name,description:$.description??Y.description,metadata:$.metadata??Y.metadata,inputSchema:$.inputSchema!==void 0?$.inputSchema:Y.inputSchema,groundTruthSchema:$.groundTruthSchema!==void 0?$.groundTruthSchema:Y.groundTruthSchema,requestContextSchema:$.requestContextSchema!==void 0?$.requestContextSchema:Y.requestContextSchema,tags:$.tags!==void 0?$.tags:Y.tags,targetType:$.targetType!==void 0?$.targetType:Y.targetType,targetIds:$.targetIds!==void 0?$.targetIds:Y.targetIds,scorerIds:$.scorerIds!==void 0?$.scorerIds:Y.scorerIds,updatedAt:new Date};return this.db.datasets.set($.id,X),F90(X)}async deleteDataset({id:$}){for(let[Y,X]of this.db.datasetItems)if(X.length>0&&X[0].datasetId===$)this.db.datasetItems.delete(Y);for(let[Y,X]of this.db.datasetVersions)if(X.datasetId===$)this.db.datasetVersions.delete(Y);for(let[Y,X]of this.db.experiments)if(X.datasetId===$)this.db.experiments.set(Y,{...X,datasetId:null,datasetVersion:null});this.db.datasets.delete($)}async listDatasets($){let Y=Array.from(this.db.datasets.values());Y.sort((K,H)=>H.createdAt.getTime()-K.createdAt.getTime());let{page:X,perPage:G}=$.pagination,J=A4(G,100),{offset:Q,perPage:W}=B4(X,G,J),Z=G===!1?Y.length:Q+J;return{datasets:Y.slice(Q,Z).map(F90),pagination:{total:Y.length,page:X,perPage:W,hasMore:G===!1?!1:Y.length>Z}}}async _doAddItem($){let Y=this.db.datasets.get($.datasetId);if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=Y.version+1;this.db.datasets.set($.datasetId,{...Y,version:X});let G=new Date,J=crypto.randomUUID(),Q={id:J,datasetId:$.datasetId,datasetVersion:X,validTo:null,isDeleted:!1,input:$.input,groundTruth:$.groundTruth,expectedTrajectory:$.expectedTrajectory,requestContext:$.requestContext,metadata:$.metadata,source:$.source,createdAt:G,updatedAt:G};return this.db.datasetItems.set(J,[Q]),await this.createDatasetVersion($.datasetId,X),HE(Q)}async _doUpdateItem($){let Y=this.db.datasetItems.get($.id);if(!Y||Y.length===0)throw Error(`Item not found: ${$.id}`);let X=Y.find((Z)=>Z.validTo===null&&!Z.isDeleted);if(!X)throw Error(`Item not found: ${$.id}`);if(X.datasetId!==$.datasetId)throw Error(`Item ${$.id} does not belong to dataset ${$.datasetId}`);let G=this.db.datasets.get($.datasetId);if(!G)throw Error(`Dataset not found: ${$.datasetId}`);let J=G.version+1;this.db.datasets.set($.datasetId,{...G,version:J}),X.validTo=J;let Q=new Date,W={id:$.id,datasetId:$.datasetId,datasetVersion:J,validTo:null,isDeleted:!1,input:$.input!==void 0?$.input:X.input,groundTruth:$.groundTruth!==void 0?$.groundTruth:X.groundTruth,expectedTrajectory:$.expectedTrajectory!==void 0?$.expectedTrajectory:X.expectedTrajectory,requestContext:$.requestContext!==void 0?$.requestContext:X.requestContext,metadata:$.metadata!==void 0?$.metadata:X.metadata,source:$.source!==void 0?$.source:X.source,createdAt:X.createdAt,updatedAt:Q};return Y.push(W),await this.createDatasetVersion($.datasetId,J),HE(W)}async _doDeleteItem({id:$,datasetId:Y}){let X=this.db.datasetItems.get($);if(!X||X.length===0)return;let G=X.find((Z)=>Z.validTo===null&&!Z.isDeleted);if(!G)return;if(G.datasetId!==Y)throw Error(`Item ${$} does not belong to dataset ${Y}`);let J=this.db.datasets.get(Y);if(!J)throw Error(`Dataset not found: ${Y}`);let Q=J.version+1;this.db.datasets.set(Y,{...J,version:Q}),G.validTo=Q;let W=new Date;X.push({id:$,datasetId:Y,datasetVersion:Q,validTo:null,isDeleted:!0,input:G.input,groundTruth:G.groundTruth,requestContext:G.requestContext,metadata:G.metadata,createdAt:G.createdAt,updatedAt:W}),await this.createDatasetVersion(Y,Q)}async getItemById($){let Y=this.db.datasetItems.get($.id);if(!Y||Y.length===0)return null;if($.datasetVersion!==void 0){let G=Y.find((J)=>J.datasetVersion===$.datasetVersion&&!J.isDeleted);return G?HE(G):null}let X=Y.find((G)=>G.validTo===null&&!G.isDeleted);return X?HE(X):null}async getItemsByVersion({datasetId:$,version:Y}){let X=[];for(let G of this.db.datasetItems.values()){if(G.length===0||G[0].datasetId!==$)continue;let J=G.find((Q)=>Q.datasetVersion<=Y&&(Q.validTo===null||Q.validTo>Y)&&!Q.isDeleted);if(J)X.push(HE(J))}return X.sort((G,J)=>J.createdAt.getTime()-G.createdAt.getTime()||J.id.localeCompare(G.id)),X}async getItemHistory($){let Y=this.db.datasetItems.get($);if(!Y)return[];return[...Y].sort((X,G)=>G.datasetVersion-X.datasetVersion)}async listItems($){let Y;if($.version!==void 0)Y=await this.getItemsByVersion({datasetId:$.datasetId,version:$.version});else{Y=[];for(let K of this.db.datasetItems.values()){if(K.length===0||K[0].datasetId!==$.datasetId)continue;let H=K.find((z)=>z.validTo===null&&!z.isDeleted);if(H)Y.push(HE(H))}}if($.search){let K=$.search.toLowerCase();Y=Y.filter((H)=>{let z=typeof H.input==="string"?H.input:JSON.stringify(H.input),V=H.groundTruth?typeof H.groundTruth==="string"?H.groundTruth:JSON.stringify(H.groundTruth):"";return z.toLowerCase().includes(K)||V.toLowerCase().includes(K)})}Y.sort((K,H)=>H.createdAt.getTime()-K.createdAt.getTime()||H.id.localeCompare(K.id));let{page:X,perPage:G}=$.pagination,J=A4(G,100),{offset:Q,perPage:W}=B4(X,G,J),Z=G===!1?Y.length:Q+J;return{items:Y.slice(Q,Z),pagination:{total:Y.length,page:X,perPage:W,hasMore:G===!1?!1:Y.length>Z}}}async createDatasetVersion($,Y){let X=crypto.randomUUID(),G={id:X,datasetId:$,version:Y,createdAt:new Date};return this.db.datasetVersions.set(X,G),G}async listDatasetVersions($){let Y=[];for(let K of this.db.datasetVersions.values())if(K.datasetId===$.datasetId)Y.push(K);Y.sort((K,H)=>H.version-K.version);let{page:X,perPage:G}=$.pagination,J=A4(G,100),{offset:Q,perPage:W}=B4(X,G,J),Z=G===!1?Y.length:Q+J;return{versions:Y.slice(Q,Z),pagination:{total:Y.length,page:X,perPage:W,hasMore:G===!1?!1:Y.length>Z}}}async _doBatchInsertItems($){let Y=this.db.datasets.get($.datasetId);if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=Y.version+1;this.db.datasets.set($.datasetId,{...Y,version:X});let G=new Date,J=[];for(let Q of $.items){let W=crypto.randomUUID(),Z={id:W,datasetId:$.datasetId,datasetVersion:X,validTo:null,isDeleted:!1,input:Q.input,groundTruth:Q.groundTruth,expectedTrajectory:Q.expectedTrajectory,requestContext:Q.requestContext,metadata:Q.metadata,source:Q.source,createdAt:G,updatedAt:G};this.db.datasetItems.set(W,[Z]),J.push(HE(Z))}return await this.createDatasetVersion($.datasetId,X),J}async _doBatchDeleteItems($){let Y=this.db.datasets.get($.datasetId);if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=Y.version+1;this.db.datasets.set($.datasetId,{...Y,version:X});let G=new Date;for(let J of $.itemIds){let Q=this.db.datasetItems.get(J);if(!Q)continue;let W=Q.find((Z)=>Z.validTo===null&&!Z.isDeleted);if(!W||W.datasetId!==$.datasetId)continue;W.validTo=X,Q.push({id:J,datasetId:$.datasetId,datasetVersion:X,validTo:null,isDeleted:!0,input:W.input,groundTruth:W.groundTruth,requestContext:W.requestContext,metadata:W.metadata,createdAt:W.createdAt,updatedAt:G})}await this.createDatasetVersion($.datasetId,X)}},Ym=class extends IW{constructor(){super({component:"STORAGE",name:"EXPERIMENTS"})}async dangerouslyClearAll(){}},Gy0=class extends Ym{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.experiments.clear(),this.db.experimentResults.clear()}async createExperiment($){let Y=new Date,X={id:$.id??crypto.randomUUID(),datasetId:$.datasetId,datasetVersion:$.datasetVersion,agentVersion:$.agentVersion??null,targetType:$.targetType,targetId:$.targetId,name:$.name,description:$.description,metadata:$.metadata,status:"pending",totalItems:$.totalItems,succeededCount:0,failedCount:0,skippedCount:0,startedAt:null,completedAt:null,createdAt:Y,updatedAt:Y};return this.db.experiments.set(X.id,X),X}async updateExperiment($){let Y=this.db.experiments.get($.id);if(!Y)throw Error(`Experiment not found: ${$.id}`);let X={...Y,status:$.status??Y.status,totalItems:$.totalItems??Y.totalItems,succeededCount:$.succeededCount??Y.succeededCount,failedCount:$.failedCount??Y.failedCount,skippedCount:$.skippedCount??Y.skippedCount,startedAt:$.startedAt??Y.startedAt,completedAt:$.completedAt??Y.completedAt,name:$.name??Y.name,description:$.description??Y.description,metadata:$.metadata??Y.metadata,updatedAt:new Date};return this.db.experiments.set($.id,X),X}async getExperimentById($){return this.db.experiments.get($.id)??null}async listExperiments($){let Y=Array.from(this.db.experiments.values());if($.datasetId)Y=Y.filter((K)=>K.datasetId===$.datasetId);if($.targetType)Y=Y.filter((K)=>K.targetType===$.targetType);if($.targetId)Y=Y.filter((K)=>K.targetId===$.targetId);if($.agentVersion)Y=Y.filter((K)=>K.agentVersion===$.agentVersion);if($.status)Y=Y.filter((K)=>K.status===$.status);Y.sort((K,H)=>H.createdAt.getTime()-K.createdAt.getTime());let{page:X,perPage:G}=$.pagination,J=A4(G,100),{offset:Q,perPage:W}=B4(X,G,J),Z=G===!1?Y.length:Q+J;return{experiments:Y.slice(Q,Z),pagination:{total:Y.length,page:X,perPage:W,hasMore:G===!1?!1:Y.length>Z}}}async deleteExperiment($){this.db.experiments.delete($.id);for(let[Y,X]of this.db.experimentResults)if(X.experimentId===$.id)this.db.experimentResults.delete(Y)}async addExperimentResult($){let Y=new Date,X={id:$.id??crypto.randomUUID(),experimentId:$.experimentId,itemId:$.itemId,itemDatasetVersion:$.itemDatasetVersion,input:$.input,output:$.output,groundTruth:$.groundTruth,error:$.error,startedAt:$.startedAt,completedAt:$.completedAt,retryCount:$.retryCount,traceId:$.traceId??null,status:$.status??null,tags:$.tags??null,createdAt:Y};return this.db.experimentResults.set(X.id,X),X}async updateExperimentResult($){let Y=this.db.experimentResults.get($.id);if(!Y)throw Error(`Experiment result not found: ${$.id}`);if($.experimentId&&Y.experimentId!==$.experimentId)throw Error(`Experiment result ${$.id} does not belong to experiment ${$.experimentId}`);let X={...Y,status:$.status!==void 0?$.status:Y.status,tags:$.tags!==void 0?$.tags:Y.tags};return this.db.experimentResults.set($.id,X),X}async getExperimentResultById($){return this.db.experimentResults.get($.id)??null}async listExperimentResults($){let Y=Array.from(this.db.experimentResults.values()).filter((K)=>K.experimentId===$.experimentId);if($.traceId)Y=Y.filter((K)=>K.traceId===$.traceId);if($.status)Y=Y.filter((K)=>K.status===$.status);Y.sort((K,H)=>K.startedAt.getTime()-H.startedAt.getTime());let{page:X,perPage:G}=$.pagination,J=A4(G,100),{offset:Q,perPage:W}=B4(X,G,J),Z=G===!1?Y.length:Q+J;return{results:Y.slice(Q,Z),pagination:{total:Y.length,page:X,perPage:W,hasMore:G===!1?!1:Y.length>Z}}}async deleteExperimentResults($){for(let[Y,X]of this.db.experimentResults)if(X.experimentId===$.experimentId)this.db.experimentResults.delete(Y)}async getReviewSummary(){let $=new Map;for(let Y of this.db.experimentResults.values()){let X=$.get(Y.experimentId);if(!X)X={experimentId:Y.experimentId,total:0,needsReview:0,reviewed:0,complete:0},$.set(Y.experimentId,X);if(X.total++,Y.status==="needs-review")X.needsReview++;else if(Y.status==="reviewed")X.reviewed++;else if(Y.status==="complete")X.complete++}return Array.from($.values())}};Pb8=/^[a-zA-Z_][a-zA-Z0-9_]*$/,wb8=new Set(["__proto__","prototype","constructor"]),Xm=class extends IW{supportsObservationalMemory=!1;constructor(){super({component:"STORAGE",name:"MEMORY"})}async listMessagesByResourceId($){throw Error(`Resource-scoped message listing is not implemented by this storage adapter (${this.constructor.name}). Use an adapter that supports Observational Memory (pg, libsql, mongodb) or disable observational memory.`)}async deleteMessages($){throw Error(`Message deletion is not supported by this storage adapter (${this.constructor.name}). The deleteMessages method needs to be implemented in the storage adapter.`)}async cloneThread($){throw Error(`Thread cloning is not implemented by this storage adapter (${this.constructor.name}). The cloneThread method needs to be implemented in the storage adapter.`)}async getResourceById($){throw Error(`Resource working memory is not implemented by this storage adapter (${this.constructor.name}). This is likely a bug - all Mastra storage adapters should implement resource support. Please report this issue at https://github.com/mastra-ai/mastra/issues`)}async saveResource($){throw Error(`Resource working memory is not implemented by this storage adapter (${this.constructor.name}). This is likely a bug - all Mastra storage adapters should implement resource support. Please report this issue at https://github.com/mastra-ai/mastra/issues`)}async updateResource($){throw Error(`Resource working memory is not implemented by this storage adapter (${this.constructor.name}). This is likely a bug - all Mastra storage adapters should implement resource support. Please report this issue at https://github.com/mastra-ai/mastra/issues`)}parseOrderBy($,Y="DESC"){return{field:$?.field&&$.field in _b8?$.field:"createdAt",direction:$?.direction&&$.direction in jb8?$.direction:Y}}async getObservationalMemory($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async getObservationalMemoryHistory($,Y,X,G){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async initializeObservationalMemory($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async updateActiveObservations($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async updateBufferedObservations($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async swapBufferedToActive($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async createReflectionGeneration($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async updateBufferedReflection($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async swapBufferedReflectionToActive($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async setReflectingFlag($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async setObservingFlag($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async setBufferingObservationFlag($,Y,X){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async setBufferingReflectionFlag($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async insertObservationalMemoryRecord($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async clearObservationalMemory($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async setPendingMessageTokens($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async updateObservationalMemoryConfig($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}deepMergeConfig($,Y){let X={...$};for(let G of Object.keys(Y)){let J=$[G],Q=Y[G];if(K64(J)&&K64(Q))X[G]=this.deepMergeConfig(J,Q);else if(Q!==void 0)X[G]=Q}return X}validateMetadataKeys($){if(!$)return;for(let Y of Object.keys($)){if(wb8.has(Y))throw Error(`Invalid metadata key: "${Y}".`);if(!Pb8.test(Y))throw Error(`Invalid metadata key: "${Y}". Keys must start with a letter or underscore and contain only alphanumeric characters and underscores.`);if(Y.length>U64)throw Error(`Metadata key "${Y}" exceeds maximum length of ${U64} characters.`)}}validatePagination($,Y){if(!Number.isFinite($)||!Number.isSafeInteger($)||$<0)throw Error("page must be >= 0");if(!Number.isFinite(Y)||!Number.isSafeInteger(Y)||Y<0)throw Error("perPage must be >= 0");if(Y===0)return;let X=$*Y;if(!Number.isSafeInteger(X)||X>Number.MAX_SAFE_INTEGER)throw Error("page value too large")}validatePaginationInput($,Y){if(Y!==!1){if(typeof Y!=="number"||!Number.isFinite(Y)||!Number.isSafeInteger(Y))throw Error("perPage must be false or a safe integer");if(Y<0)throw Error("perPage must be >= 0")}if(Y===!1){if($!==0)throw Error("page must be 0 when perPage is false");if(!Number.isFinite($)||!Number.isSafeInteger($))throw Error("page must be >= 0");return}this.validatePagination($,Y)}},_b8={createdAt:!0,updatedAt:!0},jb8={ASC:!0,DESC:!0},Qy0=class extends Xm{supportsObservationalMemory=!0;db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.threads.clear(),this.db.messages.clear(),this.db.resources.clear(),this.db.observationalMemory.clear()}async getThreadById({threadId:$,resourceId:Y}){let X=this.db.threads.get($);if(!X||Y!==void 0&&X.resourceId!==Y)return null;return{...X,metadata:X.metadata?{...X.metadata}:X.metadata}}async saveThread({thread:$}){let Y=$.id;return this.db.threads.set(Y,$),$}async updateThread({id:$,title:Y,metadata:X}){let G=this.db.threads.get($);if(!G)throw Error(`Thread with id ${$} not found`);if(G)G.title=Y,G.metadata={...G.metadata,...X},G.updatedAt=new Date;return G}async deleteThread({threadId:$}){this.db.threads.delete($),this.db.messages.forEach((Y,X)=>{if(Y.thread_id===$)this.db.messages.delete(X)})}async listMessages({threadId:$,resourceId:Y,include:X,filter:G,perPage:J,page:Q=0,orderBy:W}){let Z=Array.isArray($)?$:[$];if(Z.length===0||Z.some((R)=>!R.trim()))throw Error("threadId must be a non-empty string or array of non-empty strings");let K=new Set(Z),{field:H,direction:z}=this.parseOrderBy(W,"ASC"),V=A4(J,40);if(Q<0)throw Error("page must be >= 0");let A=Number.MAX_SAFE_INTEGER/2;if(Q*V>A)throw Error("page value too large");let{offset:F,perPage:N}=B4(Q,J,V);if(V===0&&(!X||X.length===0))return{messages:[],total:0,page:Q,perPage:N,hasMore:!1};let D=Array.from(this.db.messages.values()).filter((R)=>{if(K&&!K.has(R.thread_id))return!1;if(Y&&R.resourceId!==Y)return!1;return!0});D=D90(D,(R)=>new Date(R.createdAt),G?.dateRange),D.sort((R,q)=>{let w=H==="createdAt"||H==="updatedAt",I=w?new Date(R[H]).getTime():R[H],P=w?new Date(q[H]).getTime():q[H];if(typeof I==="number"&&typeof P==="number")return z==="ASC"?I-P:P-I;return z==="ASC"?String(I).localeCompare(String(P)):String(P).localeCompare(String(I))});let L=V===0?0:D.length,B=V===0?[]:D.slice(F,F+V),O=[],E=new Set;for(let R of B){let q=this.parseStoredMessage(R);O.push(q),E.add(R.id)}if(X&&X.length>0)for(let R of X){let q=this.db.messages.get(R.id);if(q){let w={id:q.id,threadId:q.thread_id,content:N8(q.content),role:q.role,type:q.type,createdAt:q.createdAt,resourceId:q.resourceId};if(!E.has(w.id))O.push(w),E.add(w.id);if(R.withPreviousMessages){let I=Array.from(this.db.messages.values()).filter((_)=>_.thread_id===(R.threadId||$)).sort((_,C)=>new Date(_.createdAt).getTime()-new Date(C.createdAt).getTime()),P=I.findIndex((_)=>_.id===R.id);if(P!==-1){let _=Math.max(0,P-(R.withPreviousMessages||0));for(let C=_;C<P;C++){let k=I[C];if(k&&!E.has(k.id)){let S={id:k.id,threadId:k.thread_id,content:N8(k.content),role:k.role,type:k.type,createdAt:k.createdAt,resourceId:k.resourceId};O.push(S),E.add(k.id)}}}}if(R.withNextMessages){let I=Array.from(this.db.messages.values()).filter((_)=>_.thread_id===(R.threadId||$)).sort((_,C)=>new Date(_.createdAt).getTime()-new Date(C.createdAt).getTime()),P=I.findIndex((_)=>_.id===R.id);if(P!==-1){let _=Math.min(I.length,P+(R.withNextMessages||0)+1);for(let C=P+1;C<_;C++){let k=I[C];if(k&&!E.has(k.id)){let S={id:k.id,threadId:k.thread_id,content:N8(k.content),role:k.role,type:k.type,createdAt:k.createdAt,resourceId:k.resourceId};O.push(S),E.add(k.id)}}}}}}O.sort((R,q)=>{let w=H==="createdAt"||H==="updatedAt",I=w?new Date(R[H]).getTime():R[H],P=w?new Date(q[H]).getTime():q[H];if(typeof I==="number"&&typeof P==="number")return z==="ASC"?I-P:P-I;return z==="ASC"?String(I).localeCompare(String(P)):String(P).localeCompare(String(I))});let M;if(V===0)M=!1;else if(X&&X.length>0)M=new Set(O.filter((q)=>q.threadId===$).map((q)=>q.id)).size<L;else M=F+V<L;return{messages:O,total:L,page:Q,perPage:N,hasMore:M}}async listMessagesByResourceId({resourceId:$,filter:Y,perPage:X,page:G=0,orderBy:J}){let{field:Q,direction:W}=this.parseOrderBy(J,"ASC"),Z=A4(X,40);if(G<0)throw Error("page must be >= 0");let K=Number.MAX_SAFE_INTEGER/2;if(G*Z>K)throw Error("page value too large");let{offset:H,perPage:z}=B4(G,X,Z),V=Array.from(this.db.messages.values()).filter((L)=>L.resourceId===$);V=D90(V,(L)=>new Date(L.createdAt),Y?.dateRange),V.sort((L,B)=>{let O=Q==="createdAt"||Q==="updatedAt",E=O?new Date(L[Q]).getTime():L[Q],M=O?new Date(B[Q]).getTime():B[Q];if(typeof E==="number"&&typeof M==="number")return W==="ASC"?E-M:M-E;return W==="ASC"?String(E).localeCompare(String(M)):String(M).localeCompare(String(E))});let A=V.length,F=V.slice(H,H+Z),N=new l6().add(F.map((L)=>this.parseStoredMessage(L)),"memory"),D=H+F.length<A;return{messages:N.get.all.db(),total:A,page:G,perPage:z,hasMore:D}}parseStoredMessage($){let{resourceId:Y,content:X,role:G,thread_id:J,...Q}=$,W=N8(X);if(typeof W==="string")W={format:2,content:W,parts:[{type:"text",text:W}]};return{...Q,threadId:J,...$.resourceId&&{resourceId:$.resourceId},content:W,role:G}}async listMessagesById({messageIds:$}){let Y=$.map((G)=>this.db.messages.get(G)).filter((G)=>!!G);return{messages:new l6().add(Y.map((G)=>this.parseStoredMessage(G)),"memory").get.all.db()}}async saveMessages($){let{messages:Y}=$;if(Y.some((J)=>J.id==="error-message"||J.resourceId===null))throw Error("Simulated error for testing");let X=new Set(Y.map((J)=>J.threadId).filter((J)=>Boolean(J)));for(let J of X){let Q=this.db.threads.get(J);if(Q)Q.updatedAt=new Date}for(let J of Y){let Q=J.id,W={id:J.id,thread_id:J.threadId||"",content:JSON.stringify(J.content),role:J.role||"user",type:J.type||"text",createdAt:J.createdAt,resourceId:J.resourceId||null};this.db.messages.set(Q,W)}return{messages:new l6().add(Y,"memory").get.all.db()}}async updateMessages($){let Y=[];for(let X of $.messages){let G=this.db.messages.get(X.id);if(!G)continue;let J=G.thread_id,Q=X.threadId||J,W=!1;if(X.threadId&&X.threadId!==J)W=!0;if(X.role!==void 0)G.role=X.role;if(X.type!==void 0)G.type=X.type;if(X.createdAt!==void 0)G.createdAt=X.createdAt;if(X.resourceId!==void 0)G.resourceId=X.resourceId;if(X.content!==void 0){let Z=N8(G.content),K=X.content;if(typeof K==="object"&&typeof Z==="object"){if(K={...Z,...K},Z.metadata&&K.metadata)K.metadata={...Z.metadata,...K.metadata}}G.content=JSON.stringify(K)}if(W){G.thread_id=Q;let Z=Date.now(),K,H=this.db.threads.get(J);if(H){let V=new Date(H.updatedAt).getTime();K=Math.max(Z,V+1),H.updatedAt=new Date(K)}let z=this.db.threads.get(Q);if(z){let V=new Date(z.updatedAt).getTime(),A=Math.max(Z+1,V+1);if(K!==void 0&&A<=K)A=K+1;z.updatedAt=new Date(A)}}else{let Z=this.db.threads.get(J);if(Z){let K=new Date(Z.updatedAt).getTime(),H=Date.now();if(H<=K)H=K+1;Z.updatedAt=new Date(H)}}this.db.messages.set(X.id,G),Y.push({id:G.id,threadId:G.thread_id,content:N8(G.content),role:G.role==="user"||G.role==="assistant"?G.role:"user",type:G.type,createdAt:G.createdAt,resourceId:G.resourceId===null?void 0:G.resourceId})}return Y}async deleteMessages($){if(!$||$.length===0)return;let Y=new Set;for(let G of $){let J=this.db.messages.get(G);if(J&&J.thread_id)Y.add(J.thread_id);this.db.messages.delete(G)}let X=new Date;for(let G of Y){let J=this.db.threads.get(G);if(J)J.updatedAt=X}}async listThreads($){let{page:Y=0,perPage:X,orderBy:G,filter:J}=$,{field:Q,direction:W}=this.parseOrderBy(G);this.validatePaginationInput(Y,X??100);let Z=A4(X,100),K=Array.from(this.db.threads.values());if(J?.resourceId)K=K.filter((F)=>F.resourceId===J.resourceId);if(this.validateMetadataKeys(J?.metadata),J?.metadata&&Object.keys(J.metadata).length>0)K=K.filter((F)=>{if(!F.metadata)return!1;return Object.entries(J.metadata).every(([N,D])=>JV(F.metadata[N],D))});let z=this.sortThreads(K,Q,W).map((F)=>({...F,metadata:F.metadata?{...F.metadata}:F.metadata})),{offset:V,perPage:A}=B4(Y,X,Z);return{threads:z.slice(V,V+Z),total:z.length,page:Y,perPage:A,hasMore:V+Z<z.length}}async getResourceById({resourceId:$}){let Y=this.db.resources.get($);return Y?{...Y,metadata:Y.metadata?{...Y.metadata}:Y.metadata}:null}async saveResource({resource:$}){return this.db.resources.set($.id,$),$}async updateResource({resourceId:$,workingMemory:Y,metadata:X}){let G=this.db.resources.get($);if(!G)G={id:$,workingMemory:Y,metadata:X||{},createdAt:new Date,updatedAt:new Date};else G={...G,workingMemory:Y!==void 0?Y:G.workingMemory,metadata:{...G.metadata,...X},updatedAt:new Date};return this.db.resources.set($,G),G}async cloneThread($){let{sourceThreadId:Y,newThreadId:X,resourceId:G,title:J,metadata:Q,options:W}=$,Z=this.db.threads.get(Y);if(!Z)throw Error(`Source thread with id ${Y} not found`);let K=X||crypto.randomUUID();if(this.db.threads.has(K))throw Error(`Thread with id ${K} already exists`);let H=Array.from(this.db.messages.values()).filter((L)=>L.thread_id===Y).sort((L,B)=>new Date(L.createdAt).getTime()-new Date(B.createdAt).getTime());if(W?.messageFilter){let{startDate:L,endDate:B,messageIds:O}=W.messageFilter;if(O&&O.length>0){let E=new Set(O);H=H.filter((M)=>E.has(M.id))}if(L)H=H.filter((E)=>new Date(E.createdAt)>=L);if(B)H=H.filter((E)=>new Date(E.createdAt)<=B)}if(W?.messageLimit&&W.messageLimit>0&&H.length>W.messageLimit)H=H.slice(-W.messageLimit);let z=new Date,V=H.length>0?H[H.length-1].id:void 0,A={sourceThreadId:Y,clonedAt:z,...V&&{lastMessageId:V}},F={id:K,resourceId:G||Z.resourceId,title:J||(Z.title?`Clone of ${Z.title}`:void 0),metadata:{...Q,clone:A},createdAt:z,updatedAt:z};this.db.threads.set(K,F);let N=[],D={};for(let L of H){let B=crypto.randomUUID();D[L.id]=B;let O=N8(L.content),E={id:B,thread_id:K,content:L.content,role:L.role,type:L.type,createdAt:L.createdAt,resourceId:G||L.resourceId};this.db.messages.set(B,E),N.push({id:B,threadId:K,content:O,role:L.role,type:L.type,createdAt:L.createdAt,resourceId:G||L.resourceId||void 0})}return{thread:F,clonedMessages:N,messageIdMap:D}}sortThreads($,Y,X){return $.sort((G,J)=>{let Q=Y==="createdAt"||Y==="updatedAt",W=Q?new Date(G[Y]).getTime():G[Y],Z=Q?new Date(J[Y]).getTime():J[Y];if(typeof W==="number"&&typeof Z==="number")if(X==="ASC")return W-Z;else return Z-W;return X==="ASC"?String(W).localeCompare(String(Z)):String(Z).localeCompare(String(W))})}getObservationalMemoryKey($,Y){if($)return`thread:${$}`;return`resource:${Y}`}async getObservationalMemory($,Y){let X=this.getObservationalMemoryKey($,Y);return this.db.observationalMemory.get(X)?.[0]??null}async getObservationalMemoryHistory($,Y,X,G){let J=this.getObservationalMemoryKey($,Y),Q=this.db.observationalMemory.get(J)??[];if(G?.from)Q=Q.filter((W)=>W.createdAt>=G.from);if(G?.to)Q=Q.filter((W)=>W.createdAt<=G.to);if(G?.offset!=null)Q=Q.slice(G.offset);return X!=null?Q.slice(0,X):Q}async initializeObservationalMemory($){let{threadId:Y,resourceId:X,scope:G,config:J,observedTimezone:Q}=$,W=this.getObservationalMemoryKey(Y,X),Z=new Date,K={id:crypto.randomUUID(),scope:G,threadId:Y,resourceId:X,createdAt:Z,updatedAt:Z,lastObservedAt:void 0,originType:"initial",generationCount:0,activeObservations:"",bufferedObservations:void 0,bufferedReflection:void 0,totalTokensObserved:0,observationTokenCount:0,pendingMessageTokens:0,isReflecting:!1,isObserving:!1,isBufferingObservation:!1,isBufferingReflection:!1,lastBufferedAtTokens:0,lastBufferedAtTime:null,config:J,observedTimezone:Q,metadata:{}},H=this.db.observationalMemory.get(W)??[];return this.db.observationalMemory.set(W,[K,...H]),K}async insertObservationalMemoryRecord($){let Y=this.getObservationalMemoryKey($.threadId,$.resourceId),X=this.db.observationalMemory.get(Y)??[],G=!1;for(let J=0;J<X.length;J++)if($.generationCount>=X[J].generationCount){X.splice(J,0,$),G=!0;break}if(!G)X.push($);this.db.observationalMemory.set(Y,X)}async updateActiveObservations($){let{id:Y,observations:X,tokenCount:G,lastObservedAt:J,observedMessageIds:Q}=$,W=this.findObservationalMemoryRecordById(Y);if(!W)throw Error(`Observational memory record not found: ${Y}`);if(W.activeObservations=X,W.observationTokenCount=G,W.totalTokensObserved+=G,W.pendingMessageTokens=0,W.lastObservedAt=J,W.updatedAt=new Date,Q)W.observedMessageIds=Q}async updateBufferedObservations($){let{id:Y,chunk:X}=$,G=this.findObservationalMemoryRecordById(Y);if(!G)throw Error(`Observational memory record not found: ${Y}`);let J={id:`ombuf-${crypto.randomUUID()}`,cycleId:X.cycleId,observations:X.observations,tokenCount:X.tokenCount,messageIds:X.messageIds,messageTokens:X.messageTokens,lastObservedAt:X.lastObservedAt,createdAt:new Date,suggestedContinuation:X.suggestedContinuation,currentTask:X.currentTask,threadTitle:X.threadTitle},Q=Array.isArray(G.bufferedObservationChunks)?G.bufferedObservationChunks:[];if(G.bufferedObservationChunks=[...Q,J],$.lastBufferedAtTime)G.lastBufferedAtTime=$.lastBufferedAtTime;G.updatedAt=new Date}async swapBufferedToActive($){let{id:Y,activationRatio:X,lastObservedAt:G}=$,J=this.findObservationalMemoryRecordById(Y);if(!J)throw Error(`Observational memory record not found: ${Y}`);let Q=Array.isArray(J.bufferedObservationChunks)?J.bufferedObservationChunks:[],W=Array.isArray($.bufferedChunks)?$.bufferedChunks:Q;if(W.length===0)return{chunksActivated:0,messageTokensActivated:0,observationTokensActivated:0,messagesActivated:0,activatedCycleIds:[],activatedMessageIds:[]};let Z=$.messageTokensThreshold*(1-X),K=Math.max(0,$.currentPendingTokens-Z),H=0,z=0,V=0,A=0,F=0;for(let v=0;v<W.length;v++){H+=W[v].messageTokens??0;let x=v+1;if(H>=K){if(z===0||H<V)z=x,V=H}else if(H>F)A=x,F=H}let N=Z*0.95,D=V-K,L=$.currentPendingTokens-V,B=$.currentPendingTokens-F,O=Math.min(1000,Z),E;if($.forceMaxActivation&&z>0&&L>=O)E=z;else if(z>0&&D<=N&&L>=O)E=z;else if(A>0&&B>=O)E=A;else if(z>0)E=z;else E=1;let M=W.slice(0,E),R=W.slice(E),q=M.map((v)=>v.observations).join(`

`),w=M.reduce((v,x)=>v+x.tokenCount,0),I=M.reduce((v,x)=>v+(x.messageTokens??0),0),P=M.reduce((v,x)=>v+x.messageIds.length,0),_=M.map((v)=>v.cycleId).filter((v)=>!!v),C=M.flatMap((v)=>v.messageIds),k=M[M.length-1],S=G??(k?.lastObservedAt?new Date(k.lastObservedAt):new Date);if(J.activeObservations){let v=`

--- message boundary (${S.toISOString()}) ---

`;J.activeObservations=`${J.activeObservations}${v}${q}`}else J.activeObservations=q;J.observationTokenCount=(J.observationTokenCount??0)+w,J.pendingMessageTokens=Math.max(0,(J.pendingMessageTokens??0)-I),J.bufferedObservationChunks=R.length>0?R:void 0,J.lastObservedAt=S,J.updatedAt=new Date;let T=M[M.length-1];return{chunksActivated:M.length,messageTokensActivated:I,observationTokensActivated:w,messagesActivated:P,activatedCycleIds:_,activatedMessageIds:C,observations:q,perChunk:M.map((v)=>({cycleId:v.cycleId??"",messageTokens:v.messageTokens??0,observationTokens:v.tokenCount,messageCount:v.messageIds.length,observations:v.observations})),suggestedContinuation:T?.suggestedContinuation??void 0,currentTask:T?.currentTask??void 0}}async createReflectionGeneration($){let{currentRecord:Y,reflection:X,tokenCount:G}=$,J=this.getObservationalMemoryKey(Y.threadId,Y.resourceId),Q=new Date,W={id:crypto.randomUUID(),scope:Y.scope,threadId:Y.threadId,resourceId:Y.resourceId,createdAt:Q,updatedAt:Q,lastObservedAt:Y.lastObservedAt??Q,originType:"reflection",generationCount:Y.generationCount+1,activeObservations:X,config:Y.config,totalTokensObserved:Y.totalTokensObserved,observationTokenCount:G,pendingMessageTokens:0,isReflecting:!1,isObserving:!1,isBufferingObservation:!1,isBufferingReflection:!1,lastBufferedAtTokens:0,lastBufferedAtTime:null,observedTimezone:Y.observedTimezone,metadata:{}},Z=this.db.observationalMemory.get(J)??[];return this.db.observationalMemory.set(J,[W,...Z]),W}async updateBufferedReflection($){let{id:Y,reflection:X,tokenCount:G,inputTokenCount:J,reflectedObservationLineCount:Q}=$,W=this.findObservationalMemoryRecordById(Y);if(!W)throw Error(`Observational memory record not found: ${Y}`);let Z=W.bufferedReflection||"";W.bufferedReflection=Z?`${Z}

${X}`:X,W.bufferedReflectionTokens=(W.bufferedReflectionTokens||0)+G,W.bufferedReflectionInputTokens=(W.bufferedReflectionInputTokens||0)+J,W.reflectedObservationLineCount=Q,W.updatedAt=new Date}async swapBufferedReflectionToActive($){let{currentRecord:Y}=$,X=this.findObservationalMemoryRecordById(Y.id);if(!X)throw Error(`Observational memory record not found: ${Y.id}`);if(!X.bufferedReflection)throw Error("No buffered reflection to swap");let G=X.bufferedReflection,J=X.reflectedObservationLineCount??0,K=(X.activeObservations??"").split(`
`).slice(J).join(`
`).trim(),H=K?`${G}

${K}`:G,z=await this.createReflectionGeneration({currentRecord:X,reflection:H,tokenCount:$.tokenCount});return X.bufferedReflection=void 0,X.bufferedReflectionTokens=void 0,X.bufferedReflectionInputTokens=void 0,X.reflectedObservationLineCount=void 0,z}async setReflectingFlag($,Y){let X=this.findObservationalMemoryRecordById($);if(!X)throw Error(`Observational memory record not found: ${$}`);X.isReflecting=Y,X.updatedAt=new Date}async setObservingFlag($,Y){let X=this.findObservationalMemoryRecordById($);if(!X)throw Error(`Observational memory record not found: ${$}`);X.isObserving=Y,X.updatedAt=new Date}async setBufferingObservationFlag($,Y,X){let G=this.findObservationalMemoryRecordById($);if(!G)throw Error(`Observational memory record not found: ${$}`);if(G.isBufferingObservation=Y,X!==void 0)G.lastBufferedAtTokens=X;G.updatedAt=new Date}async setBufferingReflectionFlag($,Y){let X=this.findObservationalMemoryRecordById($);if(!X)throw Error(`Observational memory record not found: ${$}`);X.isBufferingReflection=Y,X.updatedAt=new Date}async clearObservationalMemory($,Y){let X=this.getObservationalMemoryKey($,Y);this.db.observationalMemory.delete(X)}async setPendingMessageTokens($,Y){let X=this.findObservationalMemoryRecordById($);if(!X)throw Error(`Observational memory record not found: ${$}`);X.pendingMessageTokens=Y,X.updatedAt=new Date}async updateObservationalMemoryConfig($){let Y=this.findObservationalMemoryRecordById($.id);if(!Y)throw Error(`Observational memory record not found: ${$.id}`);Y.config=this.deepMergeConfig(Y.config,$.config),Y.updatedAt=new Date}findObservationalMemoryRecordById($){for(let Y of this.db.observationalMemory.values()){let X=Y.find((G)=>G.id===$);if(X)return X}return null}},Gm=class extends IW{constructor(){super({component:"STORAGE",name:"SCHEDULES"})}async dangerouslyClearAll(){}};Wy0=class extends Gm{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.schedules.clear(),this.db.scheduleTriggers.length=0}async createSchedule($){if(this.db.schedules.has($.id))throw Error(`Schedule ${$.id} already exists`);let Y=GV($);return this.db.schedules.set(Y.id,Y),GV(Y)}async getSchedule($){let Y=this.db.schedules.get($);return Y?GV(Y):null}async listSchedules($){let Y=Array.from(this.db.schedules.values());if($?.status)Y=Y.filter((X)=>X.status===$.status);if($?.workflowId)Y=Y.filter((X)=>X.target.type==="workflow"&&X.target.workflowId===$.workflowId);if($?.ownerType!==void 0)Y=Y.filter((X)=>(X.ownerType??null)===$.ownerType);if($?.ownerId!==void 0)Y=Y.filter((X)=>(X.ownerId??null)===$.ownerId);return Y.sort((X,G)=>X.createdAt-G.createdAt),Y.map(GV)}async listDueSchedules($,Y){let X=[];for(let J of this.db.schedules.values())if(J.status==="active"&&J.nextFireAt<=$)X.push(J);X.sort((J,Q)=>J.nextFireAt-Q.nextFireAt);let G=Y??X.length;return X.slice(0,G).map(GV)}async updateSchedule($,Y){let X=this.db.schedules.get($);if(!X)throw Error(`Schedule ${$} not found`);let G={...X,...Y,target:Y.target!==void 0?Y.target:X.target,metadata:Y.metadata!==void 0?Y.metadata:X.metadata,updatedAt:Date.now()},J=GV(G);return this.db.schedules.set($,J),GV(J)}async updateScheduleNextFire($,Y,X,G,J){let Q=this.db.schedules.get($);if(!Q)return!1;if(Q.nextFireAt!==Y)return!1;if(Q.status!=="active")return!1;let W={...Q,nextFireAt:X,lastFireAt:G,lastRunId:J,updatedAt:Date.now()};return this.db.schedules.set($,W),!0}async deleteSchedule($){this.db.schedules.delete($);for(let Y=this.db.scheduleTriggers.length-1;Y>=0;Y--)if(this.db.scheduleTriggers[Y].scheduleId===$)this.db.scheduleTriggers.splice(Y,1)}async recordTrigger($){let Y={...$,id:$.id??zb8(),triggerKind:$.triggerKind??"schedule-fire"};this.db.scheduleTriggers.push(GV(Y))}async listTriggers($,Y){let X=this.db.scheduleTriggers.filter((G)=>G.scheduleId===$);if(Y?.fromActualFireAt!=null)X=X.filter((G)=>G.actualFireAt>=Y.fromActualFireAt);if(Y?.toActualFireAt!=null)X=X.filter((G)=>G.actualFireAt<Y.toActualFireAt);if(X.sort((G,J)=>J.actualFireAt-G.actualFireAt),Y?.limit!=null)X=X.slice(0,Y.limit);return X.map(GV)}},Jm=class extends IW{constructor(){super({component:"STORAGE",name:"SCORES"})}async dangerouslyClearAll(){}async listScoresBySpan({traceId:$,spanId:Y,pagination:X}){throw new G0({id:"SCORES_STORAGE_GET_SCORES_BY_SPAN_NOT_IMPLEMENTED",domain:"STORAGE",category:"SYSTEM",details:{traceId:$,spanId:Y}})}},Zy0=class extends Jm{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.scores.clear()}async getScoreById({id:$}){return this.db.scores.get($)??null}async saveScore($){let Y={id:crypto.randomUUID(),createdAt:new Date,updatedAt:new Date,...$};return this.db.scores.set(Y.id,Y),{score:Y}}async listScoresByScorerId({scorerId:$,pagination:Y,entityId:X,entityType:G,source:J}){let Q=Array.from(this.db.scores.values()).filter((A)=>{let F=A.scorerId===$;if(X)F=F&&A.entityId===X;if(G)F=F&&A.entityType===G;if(J)F=F&&A.source===J;return F}),{page:W,perPage:Z}=Y,K=A4(Z,Number.MAX_SAFE_INTEGER),{offset:H,perPage:z}=B4(W,Z,K),V=Z===!1?Q.length:H+K;return{scores:Q.slice(H,V),pagination:{total:Q.length,page:W,perPage:z,hasMore:Z===!1?!1:Q.length>V}}}async listScoresByRunId({runId:$,pagination:Y}){let X=Array.from(this.db.scores.values()).filter((H)=>H.runId===$),{page:G,perPage:J}=Y,Q=A4(J,Number.MAX_SAFE_INTEGER),{offset:W,perPage:Z}=B4(G,J,Q),K=J===!1?X.length:W+Q;return{scores:X.slice(W,K),pagination:{total:X.length,page:G,perPage:Z,hasMore:J===!1?!1:X.length>K}}}async listScoresByEntityId({entityId:$,entityType:Y,pagination:X}){let G=Array.from(this.db.scores.values()).filter((z)=>{return z.entityId===$&&z.entityType===Y}),{page:J,perPage:Q}=X,W=A4(Q,Number.MAX_SAFE_INTEGER),{offset:Z,perPage:K}=B4(J,Q,W),H=Q===!1?G.length:Z+W;return{scores:G.slice(Z,H),pagination:{total:G.length,page:J,perPage:K,hasMore:Q===!1?!1:G.length>H}}}async listScoresBySpan({traceId:$,spanId:Y,pagination:X}){let G=Array.from(this.db.scores.values()).filter((z)=>z.traceId===$&&z.spanId===Y);G.sort((z,V)=>new Date(V.createdAt).getTime()-new Date(z.createdAt).getTime());let{page:J,perPage:Q}=X,W=A4(Q,Number.MAX_SAFE_INTEGER),{offset:Z,perPage:K}=B4(J,Q,W),H=Q===!1?G.length:Z+W;return{scores:G.slice(Z,H),pagination:{total:G.length,page:J,perPage:K,hasMore:Q===!1?!1:G.length>H}}}};Qm=class extends IW{constructor(){super({component:"STORAGE",name:"WORKFLOWS"})}},Ky0=class extends Qm{db;constructor({db:$}){super();this.db=$}supportsConcurrentUpdates(){return!0}async dangerouslyClearAll(){this.db.workflows.clear()}getWorkflowKey($,Y){return`${$}-${Y}`}async updateWorkflowResults({workflowName:$,runId:Y,stepId:X,result:G,requestContext:J}){let Q=this.getWorkflowKey($,Y),W=this.db.workflows.get(Q);if(!W)return{};let Z;if(!W.snapshot)Z={context:{},activePaths:[],activeStepsPath:{},timestamp:Date.now(),suspendedPaths:{},resumeLabels:{},serializedStepGraph:[],value:{},waitingPaths:{},status:"pending",runId:W.run_id},this.db.workflows.set(Q,{...W,snapshot:Z});else Z=typeof W.snapshot==="string"?JSON.parse(W.snapshot):W.snapshot;if(!Z||!Z?.context)throw Error(`Snapshot not found for runId ${Y}`);let K=Z.context[X];if(K&&"output"in K&&Array.isArray(K.output)&&G&&typeof G==="object"&&"output"in G&&Array.isArray(G.output)){let H=K.output,z=G.output,V=[...H];for(let A=0;A<Math.max(H.length,z.length);A++)if(A<z.length){let F=z[A];if(Tb8(F))V[A]=null;else if(F!==null)V[A]=F}Z.context[X]={...K,...G,output:V}}else Z.context[X]=G;return Z.requestContext={...Z.requestContext,...J},this.db.workflows.set(Q,{...W,snapshot:Z}),JSON.parse(JSON.stringify(Z.context))}async updateWorkflowState({workflowName:$,runId:Y,opts:X}){let G=this.getWorkflowKey($,Y),J=this.db.workflows.get(G);if(!J)return;let Q;if(!J.snapshot)Q={context:{},activePaths:[],activeStepsPath:{},timestamp:Date.now(),suspendedPaths:{},resumeLabels:{},serializedStepGraph:[],value:{},waitingPaths:{},status:"pending",runId:J.run_id},this.db.workflows.set(G,{...J,snapshot:Q});else Q=typeof J.snapshot==="string"?JSON.parse(J.snapshot):J.snapshot;if(!Q||!Q?.context)throw Error(`Snapshot not found for runId ${Y}`);return Q={...Q,...X},this.db.workflows.set(G,{...J,snapshot:Q}),Q}async persistWorkflowSnapshot({workflowName:$,runId:Y,resourceId:X,snapshot:G,createdAt:J,updatedAt:Q}){let W=this.getWorkflowKey($,Y),Z=new Date,K={workflow_name:$,run_id:Y,resourceId:X,snapshot:G,createdAt:J??Z,updatedAt:Q??Z};this.db.workflows.set(W,K)}async loadWorkflowSnapshot({workflowName:$,runId:Y}){let X=this.getWorkflowKey($,Y),G=this.db.workflows.get(X);if(!G)return null;let J=typeof G.snapshot==="string"?JSON.parse(G.snapshot):G.snapshot;return J?JSON.parse(JSON.stringify(J)):null}async listWorkflowRuns({workflowName:$,fromDate:Y,toDate:X,perPage:G,page:J,resourceId:Q,status:W}={}){if(J!==void 0&&J<0)throw Error("page must be >= 0");let Z=Array.from(this.db.workflows.values());if($)Z=Z.filter((z)=>z.workflow_name===$);if(W)Z=Z.filter((z)=>{let V=z?.snapshot;if(!V)return!1;if(typeof V==="string")try{V=JSON.parse(V)}catch{return!1}else V=JSON.parse(JSON.stringify(V));return V.status===W});if(Y&&X)Z=Z.filter((z)=>new Date(z.createdAt).getTime()>=Y.getTime()&&new Date(z.createdAt).getTime()<=X.getTime());else if(Y)Z=Z.filter((z)=>new Date(z.createdAt).getTime()>=Y.getTime());else if(X)Z=Z.filter((z)=>new Date(z.createdAt).getTime()<=X.getTime());if(Q)Z=Z.filter((z)=>z.resourceId===Q);let K=Z.length;if(Z.sort((z,V)=>new Date(V.createdAt).getTime()-new Date(z.createdAt).getTime()),G!==void 0&&J!==void 0){let z=A4(G,Number.MAX_SAFE_INTEGER),A=J*z,F=A+z;Z=Z.slice(A,F)}return{runs:Z.map((z)=>({...z,snapshot:typeof z.snapshot==="string"?JSON.parse(z.snapshot):JSON.parse(JSON.stringify(z.snapshot)),createdAt:new Date(z.createdAt),updatedAt:new Date(z.updatedAt),runId:z.run_id,workflowName:z.workflow_name,resourceId:z.resourceId})),total:K}}async getWorkflowRunById({runId:$,workflowName:Y}){let G=Array.from(this.db.workflows.values()).filter((Q)=>Q.run_id===$).find((Q)=>Q.workflow_name===Y);if(!G)return null;return{...G,snapshot:typeof G.snapshot==="string"?JSON.parse(G.snapshot):JSON.parse(JSON.stringify(G.snapshot)),createdAt:new Date(G.createdAt),updatedAt:new Date(G.updatedAt),runId:G.run_id,workflowName:G.workflow_name,resourceId:G.resourceId}}async deleteWorkflowRunById({runId:$,workflowName:Y}){let X=this.getWorkflowKey(Y,$);this.db.workflows.delete(X)}},Uy0=class extends nF{stores;#$;constructor({id:$="in-memory"}={}){super({id:$,name:"InMemoryStorage"});this.hasInitialized=Promise.resolve(!0),this.#$=new Jy0,this.stores={memory:new Qy0({db:this.#$}),workflows:new Ky0({db:this.#$}),scores:new Zy0({db:this.#$}),observability:new ox0({db:this.#$}),agents:new t80({db:this.#$}),channels:new Yy0,datasets:new Xy0({db:this.#$}),experiments:new Gy0({db:this.#$}),promptBlocks:new c80({db:this.#$}),scorerDefinitions:new i80({db:this.#$}),mcpClients:new X90({db:this.#$}),mcpServers:new p80({db:this.#$}),workspaces:new s80({db:this.#$}),skills:new r80({db:this.#$}),favorites:new Y90({db:this.#$}),blobs:new $y0,backgroundTasks:new ex0({db:this.#$}),schedules:new Wy0({db:this.#$})}}clear(){this.#$.clear(),this.stores.channels?.dangerouslyClearAll?.()}},B64=Uy0;E64=class extends nF{#$;#Y;constructor($={}){let Y=nx0($.dir??".mastra-storage");super({id:"filesystem",name:"FilesystemStore"});this.#Y=Y,this.#$=new Hy0(Y),this.stores={agents:new e80({db:this.#$}),promptBlocks:new l80({db:this.#$}),scorerDefinitions:new n80({db:this.#$}),mcpClients:new G90({db:this.#$}),mcpServers:new d80({db:this.#$}),workspaces:new o80({db:this.#$}),skills:new a80({db:this.#$})}}get dir(){return this.#Y}},zy0=class extends u8{constructor(){super({component:"STORAGE",name:"OPERATIONS"})}getSqlType($){switch($){case"text":return"TEXT";case"timestamp":return"TIMESTAMP";case"float":return"FLOAT";case"integer":return"INTEGER";case"bigint":return"BIGINT";case"jsonb":return"JSONB";default:return"TEXT"}}getDefaultValue($){switch($){case"text":case"uuid":return"DEFAULT ''";case"timestamp":return"DEFAULT '1970-01-01 00:00:00'";case"integer":case"bigint":case"float":return"DEFAULT 0";case"jsonb":return"DEFAULT '{}'";default:return"DEFAULT ''"}}async createIndex($){throw new G0({id:"MASTRA_STORAGE_CREATE_INDEX_NOT_SUPPORTED",domain:"STORAGE",category:"SYSTEM",text:"Index management is not supported by this storage adapter"})}async dropIndex($){throw new G0({id:"MASTRA_STORAGE_DROP_INDEX_NOT_SUPPORTED",domain:"STORAGE",category:"SYSTEM",text:"Index management is not supported by this storage adapter"})}async listIndexes($){throw new G0({id:"MASTRA_STORAGE_LIST_INDEXES_NOT_SUPPORTED",domain:"STORAGE",category:"SYSTEM",text:"Index management is not supported by this storage adapter"})}async describeIndex($){throw new G0({id:"MASTRA_STORAGE_DESCRIBE_INDEX_NOT_SUPPORTED",domain:"STORAGE",category:"SYSTEM",text:"Index management is not supported by this storage adapter"})}getAutomaticIndexDefinitions(){return[]}},M64=class extends zy0{data;constructor(){super();this.data={mastra_workflow_snapshot:new Map,mastra_messages:new Map,mastra_threads:new Map,mastra_traces:new Map,mastra_resources:new Map,mastra_scorers:new Map,mastra_ai_spans:new Map,mastra_agents:new Map,mastra_agent_versions:new Map,mastra_observational_memory:new Map,mastra_prompt_blocks:new Map,mastra_prompt_block_versions:new Map,mastra_scorer_definitions:new Map,mastra_scorer_definition_versions:new Map,mastra_mcp_clients:new Map,mastra_mcp_client_versions:new Map,mastra_mcp_servers:new Map,mastra_mcp_server_versions:new Map,mastra_workspaces:new Map,mastra_workspace_versions:new Map,mastra_skills:new Map,mastra_skill_versions:new Map,mastra_skill_blobs:new Map,mastra_datasets:new Map,mastra_dataset_items:new Map,mastra_dataset_versions:new Map,mastra_experiments:new Map,mastra_experiment_results:new Map,mastra_background_tasks:new Map,mastra_favorites:new Map,mastra_schedules:new Map,mastra_schedule_triggers:new Map,mastra_channel_installations:new Map,mastra_channel_config:new Map}}getDatabase(){return this.data}async insert({tableName:$,record:Y}){let X=this.data[$],G=Y.id;if([D7].includes($)&&!Y.id&&Y.run_id)G=Y.workflow_name?`${Y.workflow_name}-${Y.run_id}`:Y.run_id,Y.id=G;else if(!Y.id)G=`auto-${Date.now()}-${Math.random()}`,Y.id=G;X.set(G,Y)}async batchInsert({tableName:$,records:Y}){let X=this.data[$];for(let G of Y){let J=G.id;if([D7].includes($)&&!G.id&&G.run_id)J=G.run_id,G.id=J;else if(!G.id)J=`auto-${Date.now()}-${Math.random()}`,G.id=J;X.set(J,G)}}async load({tableName:$,keys:Y}){let X=this.data[$];return Array.from(X.values()).filter((J)=>Object.keys(Y).every((Q)=>J[Q]===Y[Q]))?.[0]}async createTable({tableName:$,schema:Y}){this.data[$]=new Map}async clearTable({tableName:$}){this.data[$].clear()}async dropTable({tableName:$}){this.data[$].clear()}async alterTable({tableName:$,schema:Y}){}async hasColumn($,Y){return!0}}});var a07=class{#$;#Y;constructor($,Y){this.#$=$,this.#Y=Y}setLoggerVNext($){this.#Y=$}debug($,...Y){this.#$.debug($,...Y),this.#J("debug",$,Y)}info($,...Y){this.#$.info($,...Y),this.#J("info",$,Y)}warn($,...Y){this.#$.warn($,...Y),this.#J("warn",$,Y)}error($,...Y){this.#$.error($,...Y),this.#J("error",$,Y)}trackException($,Y){this.#$.trackException($,Y);try{this.#X()?.error($.message,{errorId:$.id,domain:$.domain,category:$.category,details:$.details,cause:$.cause?.message,...Y})}catch{}}getTransports(){return this.#$.getTransports()}async listLogs($,Y){return this.#$.listLogs($,Y)}async listLogsByRunId($){return this.#$.listLogsByRunId($)}#X(){let $=hS0();if($){let Y=$.observabilityInstance?.getLoggerContext?.($);if(Y)return Y}return this.#Y?.()}#J($,Y,X){try{let G=this.#X();if(!G)return;let J=X.find((Z)=>Z!==null&&typeof Z==="object"&&!Array.isArray(Z)&&!(Z instanceof Error)),Q=X.find((Z)=>Z instanceof Error),W=X.filter((Z)=>Z!==J&&Z!==Q);G[$](Y,{...J??{},...Q?{error:{name:Q.name,message:Q.message,stack:Q.stack}}:{},...W.length>0?{args:W}:{}})}catch{}}},Vy0;var R64=V0(()=>{SO();Vy0={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{},cleanup:async()=>{},getTransports:()=>new Map,trackException:()=>{},listLogs:async()=>({logs:[],total:0,page:1,perPage:100,hasMore:!1}),listLogsByRunId:async()=>({logs:[],total:0,page:1,perPage:100,hasMore:!1})}});import Sb8 from"events";var kb8=class{get supportedModes(){return["pull"]}getHistory($,Y){return Promise.resolve([])}subscribeWithReplay($,Y){return this.subscribe($,Y)}subscribeFromOffset($,Y,X){return this.subscribeWithReplay($,X)}},q64;var I64=V0(()=>{q64=class extends kb8{get supportedModes(){return["pull","push"]}emitter;groups=new Map;groupCounters=new Map;groupListeners=new Map;pendingNacks=new Set;deliveryAttempts=new Map;fanoutWrappers=new Map;constructor($){super();this.emitter=$??new Sb8}async publish($,Y){let X=crypto.randomUUID(),G=new Date;this.emitter.emit($,{...Y,id:X,createdAt:G,deliveryAttempt:1})}async subscribe($,Y,X){if(X?.group)this.subscribeWithGroup($,Y,X.group);else{let G=(Q)=>{Y(Q,async()=>{},async()=>{})},J=this.fanoutWrappers.get($);if(!J)J=new Map,this.fanoutWrappers.set($,J);J.set(Y,G),this.emitter.on($,G)}}async unsubscribe($,Y){for(let[J,Q]of this.groups){let W=Q.get($);if(W){let Z=W.indexOf(Y);if(Z!==-1){if(W.splice(Z,1),W.length===0){Q.delete($);let K=`${$}:${J}`,H=this.groupListeners.get(K);if(H)this.emitter.off($,H),this.groupListeners.delete(K),this.groupCounters.delete(K)}if(Q.size===0)this.groups.delete(J);return}}}let X=this.fanoutWrappers.get($),G=X?.get(Y);if(G&&X){if(this.emitter.off($,G),X.delete(Y),X.size===0)this.fanoutWrappers.delete($)}else this.emitter.off($,Y)}async flush(){if(this.pendingNacks.size>0)await new Promise(($)=>{let Y=()=>{if(this.pendingNacks.size===0)$();else setTimeout(Y,10)};Y()})}async close(){for(let $ of this.pendingNacks)clearTimeout($);this.pendingNacks.clear(),this.deliveryAttempts.clear(),this.emitter.removeAllListeners(),this.groups.clear(),this.groupCounters.clear(),this.groupListeners.clear(),this.fanoutWrappers.clear()}subscribeWithGroup($,Y,X){let G=this.groups.get(X);if(!G)G=new Map,this.groups.set(X,G);let J=G.get($);if(!J)J=[],G.set($,J);J.push(Y);let Q=`${$}:${X}`;if(!this.groupListeners.has(Q)){let W=(Z)=>{this.deliverToGroup($,X,Q,Z)};this.groupListeners.set(Q,W),this.emitter.on($,W)}}deliverToGroup($,Y,X,G){let J=this.groups.get(Y)?.get($);if(!J||J.length===0)return;let Q=this.groupCounters.get(X)??0,W=Q%J.length;this.groupCounters.set(X,Q+1);let Z=`${X}:${G.id}`,K=this.deliveryAttempts.get(Z)??1,H={...G,deliveryAttempt:K},z=async()=>{this.deliveryAttempts.delete(Z)},V=async()=>{this.deliveryAttempts.set(Z,K+1);let A=setTimeout(()=>{this.pendingNacks.delete(A),this.deliverToGroup($,Y,X,G)},0);this.pendingNacks.add(A)};J[W](H,z,V)}}});function vb8($){return $=$||new Map,{all:$,on(Y,X){let G=$.get(Y);if(G)G.push(X);else $.set(Y,[X])},off(Y,X){let G=$.get(Y);if(G)if(X)G.splice(G.indexOf(X)>>>0,1);else $.set(Y,[])},emit(Y,X){let G=$.get(Y);if(G)G.slice().map((J)=>{J(X)});if(G=$.get("*"),G)G.slice().map((J)=>{J(Y,X)})}}}function P64($,Y){setImmediate(()=>{xb8.emit($,Y)})}var xb8;var w64=V0(()=>{xb8=vb8()});function k94($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function Ay0($){}function rb8($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=Ay0,onError:X=Ay0,onRetry:G=Ay0,onComment:J}=$,Q="",W=!0,Z,K="",H="";function z(D){let L=W?D.replace(/^\xEF\xBB\xBF/,""):D,[B,O]=ab8(`${Q}${L}`);for(let E of B)V(E);Q=O,W=!1}function V(D){if(D===""){F();return}if(D.startsWith(":")){J&&J(D.slice(D.startsWith(": ")?2:1));return}let L=D.indexOf(":");if(L!==-1){let B=D.slice(0,L),O=D[L+1]===" "?2:1,E=D.slice(L+O);A(B,E,D);return}A(D,"",D)}function A(D,L,B){switch(D){case"event":H=L;break;case"data":K=`${K}${L}
`;break;case"id":Z=L.includes("\x00")?void 0:L;break;case"retry":/^\d+$/.test(L)?G(parseInt(L,10)):X(new e64(`Invalid \`retry\` value: "${L}"`,{type:"invalid-retry",value:L,line:B}));break;default:X(new e64(`Unknown field "${D.length>20?`${D.slice(0,20)}\u2026`:D}"`,{type:"unknown-field",field:D,value:L,line:B}));break}}function F(){K.length>0&&Y({id:Z,event:H||void 0,data:K.endsWith(`
`)?K.slice(0,-1):K}),Z=void 0,K="",H=""}function N(D={}){Q&&D.consume&&V(Q),W=!0,Z=void 0,K="",H="",Q=""}return{feed:z,reset:N}}function ab8($){let Y=[],X="",G=0;for(;G<$.length;){let J=$.indexOf("\r",G),Q=$.indexOf(`
`,G),W=-1;if(J!==-1&&Q!==-1?W=Math.min(J,Q):J!==-1?J===$.length-1?W=-1:W=J:Q!==-1&&(W=Q),W===-1){X=$.slice(G);break}else{let Z=$.slice(G,W);Y.push(Z),G=W+1,$[G-1]==="\r"&&$[G]===`
`&&G++}}return[Y,X]}function o6(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}function sb8($){let Y=!1;return new ReadableStream({async pull(X){if(Y)return;try{let{value:G,done:J}=await $.next();if(J)X.close();else X.enqueue(G)}catch(G){X.error(G)}},async cancel(X){if(Y=!0,$.return)try{await $.return(X)}catch(G){}}})}async function ob8($,Y){if($==null)return Promise.resolve();let X=Y==null?void 0:Y.abortSignal;return new Promise((G,J)=>{if(X==null?void 0:X.aborted){J($84());return}let Q=setTimeout(()=>{W(),G()},$),W=()=>{clearTimeout(Q),X==null||X.removeEventListener("abort",Z)},Z=()=>{W(),J($84())};X==null||X.addEventListener("abort",Z)})}function $84(){return new DOMException("Delay was aborted","AbortError")}function WV($){return Object.fromEntries([...$.headers])}async function $h8({response:$,url:Y,maxBytes:X=J54}){let G=$.headers.get("content-length");if(G!=null){let z=parseInt(G,10);if(!isNaN(z)&&z>X)throw new QV({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes (Content-Length: ${z}).`})}let J=$.body;if(J==null)return new Uint8Array(0);let Q=J.getReader(),W=[],Z=0;try{while(!0){let{done:z,value:V}=await Q.read();if(z)break;if(Z+=V.length,Z>X)throw new QV({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes.`});W.push(V)}}finally{try{await Q.cancel()}finally{Q.releaseLock()}}let K=new Uint8Array(Z),H=0;for(let z of W)K.set(z,H),H+=z.length;return K}function Yh8($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function Gj($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function W54({error:$,url:Y,requestBodyValues:X}){if(Gj($))return $;if($ instanceof TypeError&&Xh8.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new AY({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}return $}function my0($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function Z54($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function wQ($,...Y){let X=new Headers(Z54($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}function Kh8({prompt:$,schema:Y,schemaPrefix:X=Y!=null?Qh8:void 0,schemaSuffix:G=Y!=null?Wh8:Zh8}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}function Uh8({messages:$,schema:Y,schemaPrefix:X,schemaSuffix:G}){var J,Q;let W=((J=$[0])==null?void 0:J.role)==="system"?{...$[0]}:{role:"system",content:""};return W.content=Kh8({prompt:W.content,schema:Y,schemaPrefix:X,schemaSuffix:G}),[W,...((Q=$[0])==null?void 0:Q.role)==="system"?$.slice(1):$]}function Hh8({mediaType:$,url:Y,supportedUrls:X}){return Y=Y.toLowerCase(),$=$.toLowerCase(),Object.entries(X).map(([G,J])=>{let Q=G.toLowerCase();return Q==="*"||Q==="*/*"?{mediaTypePrefix:"",regexes:J}:{mediaTypePrefix:Q.replace(/\*/,""),regexes:J}}).filter(({mediaTypePrefix:G})=>$.startsWith(G)).flatMap(({regexes:G})=>G).some((G)=>G.test(Y))}function aK({apiKey:$,environmentVariableName:Y,apiKeyParameterName:X="apiKey",description:G}){if(typeof $==="string")return $;if($!=null)throw new M90({message:`${G} API key must be a string.`});if(typeof process>"u")throw new M90({message:`${G} API key is missing. Pass it using the '${X}' parameter. Environment variables is not supported in this environment.`});if($=process.env[Y],$==null)throw new M90({message:`${G} API key is missing. Pass it using the '${X}' parameter or the ${Y} environment variable.`});if(typeof $!=="string")throw new M90({message:`${G} API key must be a string. The value of the ${Y} environment variable is not a string.`});return $}function py0({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}function dy0({settingValue:$,environmentVariableName:Y,settingName:X,description:G}){if(typeof $==="string")return $;if($!=null)throw new R90({message:`${G} setting must be a string.`});if(typeof process>"u")throw new R90({message:`${G} setting is missing. Pass it using the '${X}' parameter. Environment variables is not supported in this environment.`});if($=process.env[Y],$==null)throw new R90({message:`${G} setting is missing. Pass it using the '${X}' parameter or the ${Y} environment variable.`});if(typeof $!=="string")throw new R90({message:`${G} setting must be a string. The value of the ${Y} environment variable is not a string.`});return $}function x90($){var Y;let[X,G=""]=$.toLowerCase().split("/");return(Y={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[G])!=null?Y:G}function G84($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(zh8.test($)===!1&&Vh8.test($)===!1)return Y;return Ah8(Y)}function Ah8($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function cy0($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return G84($)}try{return G84($)}finally{Error.stackTraceLimit=Y}}function K54($){return{[T90]:!0,validate:$}}function U54($){return typeof $==="object"&&$!==null&&T90 in $&&$[T90]===!0&&"validate"in $}function _8($){let Y;return()=>{if(Y==null)Y=$();return Y}}function H54($){return U54($)?$:typeof $==="function"?$():z54($)}function z54($){return K54(async(Y)=>{let X=await $["~standard"].validate(Y);return X.issues==null?{success:!0,value:X.value}:{success:!1,error:new Zm({value:Y,cause:X.issues})}})}async function MX({value:$,schema:Y}){let X=await y90({value:$,schema:Y});if(!X.success)throw Zm.wrap({value:$,cause:X.error});return X.value}async function y90({value:$,schema:Y}){let X=H54(Y);try{if(X.validate==null)return{success:!0,value:$,rawValue:$};let G=await X.validate($);if(G.success)return{success:!0,value:G.value,rawValue:$};return{success:!1,error:Zm.wrap({value:$,cause:G.error}),rawValue:$}}catch(G){return{success:!1,error:Zm.wrap({value:$,cause:G}),rawValue:$}}}async function V54({text:$,schema:Y}){try{let X=cy0($);if(Y==null)return X;return MX({value:X,schema:Y})}catch(X){if(j90.isInstance(X)||Zm.isInstance(X))throw X;throw new j90({text:$,cause:X})}}async function b90({text:$,schema:Y}){try{let X=cy0($);if(Y==null)return{success:!0,value:X,rawValue:X};return await y90({value:X,schema:Y})}catch(X){return{success:!1,error:j90.isInstance(X)?X:new j90({text:$,cause:X}),rawValue:void 0}}}function nK($){try{return cy0($),!0}catch(Y){return!1}}function A54({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new Y54).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await b90({text:X,schema:Y}))}}))}async function _9({provider:$,providerOptions:Y,schema:X}){if((Y==null?void 0:Y[$])==null)return;let G=await y90({value:Y[$],schema:X});if(!G.success)throw new y94({argument:"providerOptions",message:`invalid ${$} provider options`,cause:G.error});return G.value}function iy0($){return $}function Dh8($){return{...$,type:"dynamic"}}function BD({id:$,name:Y,inputSchema:X}){return({execute:G,outputSchema:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K,...H})=>iy0({type:"provider-defined",id:$,name:Y,args:H,inputSchema:X,outputSchema:J,execute:G,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K})}function HJ({id:$,name:Y,inputSchema:X,outputSchema:G}){return({execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K,...H})=>iy0({type:"provider-defined",id:$,name:Y,args:H,inputSchema:X,outputSchema:G,execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K})}function Nh8($){return Object.fromEntries(Object.entries($).filter(([Y,X])=>X!=null))}async function Jj($){if(typeof $==="function")$=$();return Promise.resolve($)}function Y6($){let Y;return()=>{if(Y==null)Y=$();return Y}}function g90($,{validate:Y}={}){return{[wy0]:!0,_type:void 0,[T90]:!0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function _90($){if($.type==="object"){$.additionalProperties=!1;let Y=$.properties;if(Y!=null)for(let X in Y)Y[X]=_90(Y[X])}if($.type==="array"&&$.items!=null)if(Array.isArray($.items))$.items=$.items.map((Y)=>_90(Y));else $.items=_90($.items);return $}function vW(){return{}}function Mh8($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=a9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function Rh8($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function qh8(){return{type:"boolean"}}function F54($,Y){return a9($.type._def,Y)}function D54($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>D54($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Ph8($)}}function wh8($,Y){return{...a9($.innerType._def,Y),default:$.defaultValue()}}function _h8($,Y){return Y.effectStrategy==="input"?a9($.schema._def,Y):vW()}function jh8($){return{type:"string",enum:Array.from($.values)}}function Ch8($,Y){let X=[a9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),a9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(Th8(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...Z}=J;Q=Z}G.push(Q)}}),G.length?{allOf:G}:void 0}function Sh8($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}function N54($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":mK(X,"email",G.message,Y);break;case"format:idn-email":mK(X,"idn-email",G.message,Y);break;case"pattern:zod":KJ(X,gK.email,G.message,Y);break}break;case"url":mK(X,"uri",G.message,Y);break;case"uuid":mK(X,"uuid",G.message,Y);break;case"regex":KJ(X,G.regex,G.message,Y);break;case"cuid":KJ(X,gK.cuid,G.message,Y);break;case"cuid2":KJ(X,gK.cuid2,G.message,Y);break;case"startsWith":KJ(X,RegExp(`^${Dy0(G.value,Y)}`),G.message,Y);break;case"endsWith":KJ(X,RegExp(`${Dy0(G.value,Y)}$`),G.message,Y);break;case"datetime":mK(X,"date-time",G.message,Y);break;case"date":mK(X,"date",G.message,Y);break;case"time":mK(X,"time",G.message,Y);break;case"duration":mK(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{KJ(X,RegExp(Dy0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")mK(X,"ipv4",G.message,Y);if(G.version!=="v4")mK(X,"ipv6",G.message,Y);break}case"base64url":KJ(X,gK.base64url,G.message,Y);break;case"jwt":KJ(X,gK.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")KJ(X,gK.ipv4Cidr,G.message,Y);if(G.version!=="v4")KJ(X,gK.ipv6Cidr,G.message,Y);break}case"emoji":KJ(X,gK.emoji(),G.message,Y);break;case"ulid":{KJ(X,gK.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{mK(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{KJ(X,gK.base64,G.message,Y);break}}break}case"nanoid":KJ(X,gK.nanoid,G.message,Y)}return X}function Dy0($,Y){return Y.patternStrategy==="escape"?vh8($):$}function vh8($){let Y="";for(let X=0;X<$.length;X++){if(!kh8.has($[X]))Y+="\\";Y+=$[X]}return Y}function mK($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function KJ($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:Q84(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=Q84(Y,G)}function Q84($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,Z=!1,K=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(Z){if(J[H].match(/[a-z]/)){if(K)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),K=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],K=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=Z?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(Z&&J[H]==="]")Z=!1;else if(!Z&&J[H]==="[")Z=!0}return Q}function L54($,Y){var X,G,J,Q,W,Z;let K={type:"object",additionalProperties:(X=a9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=N54($.keyType._def,Y);return{...K,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...K,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((Z=$.keyType._def.type._def.checks)==null?void 0:Z.length)){let{type:H,...z}=F54($.keyType._def,Y);return{...K,propertyNames:z}}return K}function xh8($,Y){if(Y.mapStrategy==="record")return L54($,Y);let X=a9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||vW(),G=a9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||vW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function yh8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function bh8(){return{not:vW()}}function hh8(){return{type:"null"}}function fh8($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in _y0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=_y0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return gh8($,Y)}function mh8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[_y0[$.innerType._def.typeName],"null"]};let X=a9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function uh8($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function ph8($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let Z=J[W];if(Z===void 0||Z._def===void 0)continue;let K=ch8(Z),H=a9(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!K)G.push(W)}if(G.length)X.required=G;let Q=dh8($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function dh8($,Y){if($.catchall._def.typeName!=="ZodNever")return a9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function ch8($){try{return $.isOptional()}catch(Y){return!0}}function nh8($,Y){return a9($.type._def,Y)}function rh8($,Y){let G={type:"array",uniqueItems:!0,items:a9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function ah8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>a9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:a9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>a9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function sh8(){return{not:vW()}}function oh8(){return vW()}function a9($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let K=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(K!==Oh8)return K}if(J&&!X){let K=Yf8(J,Y);if(K!==void 0)return K}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=eh8($,$.typeName,Y),Z=typeof W==="function"?a9(W(),Y):W;if(Z)Xf8($,Y,Z);if(Y.postProcess){let K=Y.postProcess(Z,$,Y);return Q.jsonSchema=Z,K}return Q.jsonSchema=Z,Z}function Wf8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return g90(()=>Qf8($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function Zf8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return g90(()=>_90($$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function Kf8($){return"_zod"in $}function x1($,Y){if(Kf8($))return Zf8($,Y);else return Wf8($,Y)}function Uf8($){return typeof $==="object"&&$!==null&&wy0 in $&&$[wy0]===!0&&"jsonSchema"in $&&"validate"in $}function Hf8($){return $==null?g90({properties:{},additionalProperties:!1}):Uf8($)?$:typeof $==="function"?$():x1($)}function m90($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X=Vf8(Y);return Uint8Array.from(X,(G)=>G.codePointAt(0))}function Am($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return zf8(Y)}function RX($){return $ instanceof Uint8Array?Am($):$}function Af8($){let Y;try{Y=new URL($)}catch(G){throw new QV({url:$,message:`Invalid URL: ${$}`})}if(Y.protocol==="data:")return;if(Y.protocol!=="http:"&&Y.protocol!=="https:")throw new QV({url:$,message:`URL scheme must be http, https, or data, got ${Y.protocol}`});let X=Y.hostname;if(!X)throw new QV({url:$,message:"URL must have a hostname"});if(X==="localhost"||X.endsWith(".local")||X.endsWith(".localhost"))throw new QV({url:$,message:`URL with hostname ${X} is not allowed`});if(X.startsWith("[")&&X.endsWith("]")){let G=X.slice(1,-1);if(Ff8(G))throw new QV({url:$,message:`URL with IPv6 address ${X} is not allowed`});return}if(B54(X)){if(jy0(X))throw new QV({url:$,message:`URL with IP address ${X} is not allowed`});return}}function B54($){let Y=$.split(".");if(Y.length!==4)return!1;return Y.every((X)=>{let G=Number(X);return Number.isInteger(G)&&G>=0&&G<=255&&String(G)===X})}function jy0($){let Y=$.split(".").map(Number),[X,G]=Y;if(X===0)return!0;if(X===10)return!0;if(X===127)return!0;if(X===169&&G===254)return!0;if(X===172&&G>=16&&G<=31)return!0;if(X===192&&G===168)return!0;return!1}function Ff8($){let Y=$.toLowerCase();if(Y==="::1")return!0;if(Y==="::")return!0;if(Y.startsWith("::ffff:")){let X=Y.slice(7);if(B54(X))return jy0(X);let G=X.split(":");if(G.length===2){let J=parseInt(G[0],16),Q=parseInt(G[1],16);if(!isNaN(J)&&!isNaN(Q)){let W=J>>8&255,Z=J&255,K=Q>>8&255,H=Q&255;return jy0(`${W}.${Z}.${K}.${H}`)}}}if(Y.startsWith("fc")||Y.startsWith("fd"))return!0;if(Y.startsWith("fe80"))return!0;return!1}function sK($){return $==null?void 0:$.replace(/\/$/,"")}function Df8($){return $!=null&&typeof $[Symbol.asyncIterator]==="function"}async function*Nf8({execute:$,input:Y,options:X}){let G=$(Y,X);if(Df8(G)){let J;for await(let Q of G)J=Q,yield{type:"preliminary",output:Q};yield{type:"final",output:J}}else yield{type:"final",output:await G}}function Wm($){var Y,X;return(X=(Y=$==null?void 0:$.providerOptions)==null?void 0:Y.openaiCompatible)!=null?X:{}}function Lf8($){let Y=[];for(let{role:X,content:G,...J}of $){let Q=Wm({...J});switch(X){case"system":{Y.push({role:"system",content:G,...Q});break}case"user":{if(G.length===1&&G[0].type==="text"){Y.push({role:"user",content:G[0].text,...Wm(G[0])});break}Y.push({role:"user",content:G.map((W)=>{let Z=Wm(W);switch(W.type){case"text":return{type:"text",text:W.text,...Z};case"file":if(W.mediaType.startsWith("image/")){let K=W.mediaType==="image/*"?"image/jpeg":W.mediaType;return{type:"image_url",image_url:{url:W.data instanceof URL?W.data.toString():`data:${K};base64,${RX(W.data)}`},...Z}}else throw new w9({functionality:`file part media type ${W.mediaType}`})}}),...Q});break}case"assistant":{let W="",Z="",K=[];for(let H of G){let z=Wm(H);switch(H.type){case"text":{W+=H.text;break}case"reasoning":{Z+=H.text;break}case"tool-call":{K.push({id:H.toolCallId,type:"function",function:{name:H.toolName,arguments:JSON.stringify(H.input)},...z});break}}}Y.push({role:"assistant",content:W,...Z.length>0?{reasoning_content:Z}:{},tool_calls:K.length>0?K:void 0,...Q});break}case"tool":{for(let W of G){let Z=W.output,K;switch(Z.type){case"text":case"error-text":K=Z.value;break;case"content":case"json":case"error-json":K=JSON.stringify(Z.value);break}let H=Wm(W);Y.push({role:"tool",tool_call_id:W.toolCallId,content:K,...H})}break}default:throw Error(`Unsupported role: ${X}`)}}return Y}function W84({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function Z84($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function Of8({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)if(Q.type==="provider-defined")X.push({type:"unsupported-tool",tool:Q});else G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema}});if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":case"required":return{tools:G,toolChoice:J,toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new w9({functionality:`tool choice type: ${J}`})}}function Ef8($){var Y,X,G,J,Q,W,Z;return{inputTokens:(Y=$==null?void 0:$.prompt_tokens)!=null?Y:void 0,outputTokens:(X=$==null?void 0:$.completion_tokens)!=null?X:void 0,totalTokens:(G=$==null?void 0:$.total_tokens)!=null?G:void 0,reasoningTokens:(Q=(J=$==null?void 0:$.completion_tokens_details)==null?void 0:J.reasoning_tokens)!=null?Q:void 0,cachedInputTokens:(Z=(W=$==null?void 0:$.prompt_tokens_details)==null?void 0:W.cached_tokens)!=null?Z:void 0}}function qf8({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new v90({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text;case"tool-call":throw new w9({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new w9({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function K84({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function U84($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function OD($){let Y=sK($.baseURL),X=$.name,G={...$.apiKey&&{Authorization:`Bearer ${$.apiKey}`},...$.headers},J=()=>wQ(G,`ai-sdk/openai-compatible/${Cf8}`),Q=(A)=>({provider:`${X}.${A}`,url:({path:F})=>{let N=new URL(`${Y}${F}`);if($.queryParams)N.search=new URLSearchParams($.queryParams).toString();return N.toString()},headers:J,fetch:$.fetch}),W=(A)=>Z(A),Z=(A)=>new Fm(A,{...Q("chat"),includeUsage:$.includeUsage,supportsStructuredOutputs:$.supportsStructuredOutputs,supportedUrls:$.supportedUrls,transformRequestBody:$.transformRequestBody,metadataExtractor:$.metadataExtractor,convertUsage:$.convertUsage}),K=(A)=>new p90(A,{...Q("completion"),includeUsage:$.includeUsage}),H=(A)=>new d90(A,{...Q("embedding")}),z=(A)=>new jf8(A,Q("image")),V=(A)=>W(A);return V.languageModel=W,V.chatModel=Z,V.completionModel=K,V.textEmbeddingModel=H,V.imageModel=z,V}function w54($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function Ly0($){}function if8($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=Ly0,onError:X=Ly0,onRetry:G=Ly0,onComment:J}=$,Q=[],W=!0,Z,K="",H=0,z;function V(B){if(W&&(W=!1,B.charCodeAt(0)===239&&B.charCodeAt(1)===187&&B.charCodeAt(2)===191&&(B=B.slice(3))),Q.length===0){let M=A(B);M!==""&&Q.push(M);return}if(B.indexOf(`
`)===-1&&B.indexOf("\r")===-1){Q.push(B);return}Q.push(B);let O=Q.join("");Q.length=0;let E=A(O);E!==""&&Q.push(E)}function A(B){let O=0;if(B.indexOf("\r")===-1){let E=B.indexOf(`
`,O);for(;E!==-1;){if(O===E){H>0&&Y({id:Z,event:z,data:K}),Z=void 0,K="",H=0,z=void 0,O=E+1,E=B.indexOf(`
`,O);continue}let M=B.charCodeAt(O);if(h84(B,O,M)){let R=B.charCodeAt(O+5)===VE?O+6:O+5,q=B.slice(R,E);if(H===0&&B.charCodeAt(E+1)===b84){Y({id:Z,event:z,data:q}),Z=void 0,K="",z=void 0,O=E+2,E=B.indexOf(`
`,O);continue}K=H===0?q:`${K}
${q}`,H++}else f84(B,O,M)?z=B.slice(B.charCodeAt(O+6)===VE?O+7:O+6,E)||void 0:F(B,O,E);O=E+1,E=B.indexOf(`
`,O)}return B.slice(O)}for(;O<B.length;){let E=B.indexOf("\r",O),M=B.indexOf(`
`,O),R=-1;if(E!==-1&&M!==-1?R=E<M?E:M:E!==-1?E===B.length-1?R=-1:R=E:M!==-1&&(R=M),R===-1)break;F(B,O,R),O=R+1,B.charCodeAt(O-1)===lf8&&B.charCodeAt(O)===b84&&O++}return B.slice(O)}function F(B,O,E){if(O===E){D();return}let M=B.charCodeAt(O);if(h84(B,O,M)){let _=B.charCodeAt(O+5)===VE?O+6:O+5,C=B.slice(_,E);K=H===0?C:`${K}
${C}`,H++;return}if(f84(B,O,M)){z=B.slice(B.charCodeAt(O+6)===VE?O+7:O+6,E)||void 0;return}if(M===105&&B.charCodeAt(O+1)===100&&B.charCodeAt(O+2)===58){let _=B.slice(B.charCodeAt(O+3)===VE?O+4:O+3,E);Z=_.includes("\x00")?void 0:_;return}if(M===58){if(J){let _=B.slice(O,E);J(_.slice(B.charCodeAt(O+1)===VE?2:1))}return}let R=B.slice(O,E),q=R.indexOf(":");if(q===-1){N(R,"",R);return}let w=R.slice(0,q),I=R.charCodeAt(q+1)===VE?2:1,P=R.slice(q+I);N(w,P,R)}function N(B,O,E){switch(B){case"event":z=O||void 0;break;case"data":K=H===0?O:`${K}
${O}`,H++;break;case"id":Z=O.includes("\x00")?void 0:O;break;case"retry":/^\d+$/.test(O)?G(parseInt(O,10)):X(new y84(`Invalid \`retry\` value: "${O}"`,{type:"invalid-retry",value:O,line:E}));break;default:X(new y84(`Unknown field "${B.length>20?`${B.slice(0,20)}\u2026`:B}"`,{type:"unknown-field",field:B,value:O,line:E}));break}}function D(){H>0&&Y({id:Z,event:z,data:K}),Z=void 0,K="",H=0,z=void 0}function L(B={}){if(B.consume&&Q.length>0){let O=Q.join("");F(O,0,O.length)}W=!0,Z=void 0,K="",H=0,z=void 0,Q.length=0}return{feed:V,reset:L}}function h84($,Y,X){return X===100&&$.charCodeAt(Y+1)===97&&$.charCodeAt(Y+2)===116&&$.charCodeAt(Y+3)===97&&$.charCodeAt(Y+4)===58}function f84($,Y,X){return X===101&&$.charCodeAt(Y+1)===118&&$.charCodeAt(Y+2)===101&&$.charCodeAt(Y+3)===110&&$.charCodeAt(Y+4)===116&&$.charCodeAt(Y+5)===58}function p8(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}function l54({tools:$=[],providerToolNames:Y,resolveProviderToolName:X}){var G;let J={},Q={};for(let W of $)if(W.type==="provider"){let Z=(G=X==null?void 0:X(W))!=null?G:(W.id in Y)?Y[W.id]:void 0;if(Z==null)continue;J[W.name]=Z,Q[Z]=W.name}return{toProviderToolName:(W)=>{var Z;return(Z=J[W])!=null?Z:W},toCustomToolName:(W)=>{var Z;return(Z=Q[W])!=null?Z:W}}}async function l90($,Y){if($==null)return Promise.resolve();let X=Y==null?void 0:Y.abortSignal;return new Promise((G,J)=>{if(X==null?void 0:X.aborted){J(g84());return}let Q=setTimeout(()=>{W(),G()},$),W=()=>{clearTimeout(Q),X==null||X.removeEventListener("abort",Z)},Z=()=>{W(),J(g84())};X==null||X.addEventListener("abort",Z)})}function g84(){return new DOMException("Delay was aborted","AbortError")}function ZV($){return Object.fromEntries([...$.headers])}function Qj($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X=af8(Y);return Uint8Array.from(X,(G)=>G.codePointAt(0))}function Dm($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return rf8(Y)}function nY($){return $ instanceof Uint8Array?Dm($):$}function i54($){if($.type==="url")return $.url;return`data:${$.mediaType};base64,${typeof $.data==="string"?$.data:Dm($.data)}`}function sf8($,Y={}){let{useArrayBrackets:X=!0}=Y,G=new FormData;for(let[J,Q]of Object.entries($)){if(Q==null)continue;if(Array.isArray(Q)){if(Q.length===1){G.append(J,Q[0]);continue}let W=X?`${J}[]`:J;for(let Z of Q)G.append(W,Z);continue}G.append(J,Q)}return G}async function tf8({response:$,url:Y,maxBytes:X=a54}){let G=$.headers.get("content-length");if(G!=null){let z=parseInt(G,10);if(!isNaN(z)&&z>X)throw new cK({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes (Content-Length: ${z}).`})}let J=$.body;if(J==null)return new Uint8Array(0);let Q=J.getReader(),W=[],Z=0;try{while(!0){let{done:z,value:V}=await Q.read();if(z)break;if(Z+=V.length,Z>X)throw new cK({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes.`});W.push(V)}}finally{try{await Q.cancel()}finally{Q.releaseLock()}}let K=new Uint8Array(Z),H=0;for(let z of W)K.set(z,H),H+=z.length;return K}function p84($){let Y;try{Y=new URL($)}catch(G){throw new cK({url:$,message:`Invalid URL: ${$}`})}if(Y.protocol==="data:")return;if(Y.protocol!=="http:"&&Y.protocol!=="https:")throw new cK({url:$,message:`URL scheme must be http, https, or data, got ${Y.protocol}`});let X=Y.hostname;if(!X)throw new cK({url:$,message:"URL must have a hostname"});if(X==="localhost"||X.endsWith(".local")||X.endsWith(".localhost"))throw new cK({url:$,message:`URL with hostname ${X} is not allowed`});if(X.startsWith("[")&&X.endsWith("]")){let G=X.slice(1,-1);if(ef8(G))throw new cK({url:$,message:`URL with IPv6 address ${X} is not allowed`});return}if(s54(X)){if(Ty0(X))throw new cK({url:$,message:`URL with IP address ${X} is not allowed`});return}}function s54($){let Y=$.split(".");if(Y.length!==4)return!1;return Y.every((X)=>{let G=Number(X);return Number.isInteger(G)&&G>=0&&G<=255&&String(G)===X})}function Ty0($){let Y=$.split(".").map(Number),[X,G]=Y;if(X===0)return!0;if(X===10)return!0;if(X===127)return!0;if(X===169&&G===254)return!0;if(X===172&&G>=16&&G<=31)return!0;if(X===192&&G===168)return!0;return!1}function ef8($){let Y=$.toLowerCase();if(Y==="::1")return!0;if(Y==="::")return!0;if(Y.startsWith("::ffff:")){let X=Y.slice(7);if(s54(X))return Ty0(X);let G=X.split(":");if(G.length===2){let J=parseInt(G[0],16),Q=parseInt(G[1],16);if(!isNaN(J)&&!isNaN(Q)){let W=J>>8&255,Z=J&255,K=Q>>8&255,H=Q&255;return Ty0(`${W}.${Z}.${K}.${H}`)}}}if(Y.startsWith("fc")||Y.startsWith("fd"))return!0;if(Y.startsWith("fe80"))return!0;return!1}async function o54($,Y){var X,G;p84($);try{let J=await fetch($,{signal:void 0});if(J.redirected)p84(J.url);if(!J.ok)throw new cK({url:$,statusCode:J.status,statusText:J.statusText});let Q=await tf8({response:J,url:$,maxBytes:(X=void 0)!=null?X:a54}),W=(G=J.headers.get("content-type"))!=null?G:void 0;return new Blob([Q],W?{type:W}:void 0)}catch(J){if(cK.isInstance(J))throw J;throw new cK({url:$,cause:J})}}function Um($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function Gg8($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string"&&Xg8.includes(Y))return!0;return!1}function t54({error:$,url:Y,requestBodyValues:X}){if(Um($))return $;if($ instanceof TypeError&&Yg8.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new h7({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}if(Gg8($))return new h7({message:`Cannot connect to API: ${$.message}`,cause:$,url:Y,requestBodyValues:X,isRetryable:!0});return $}function e54($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function Jg8($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function KV($,...Y){let X=new Headers(Jg8($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}function Ug8({prompt:$,schema:Y,schemaPrefix:X=Y!=null?Wg8:void 0,schemaSuffix:G=Y!=null?Zg8:Kg8}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}function Y74({messages:$,schema:Y,schemaPrefix:X,schemaSuffix:G}){var J,Q;let W=((J=$[0])==null?void 0:J.role)==="system"?{...$[0]}:{role:"system",content:""};return W.content=Ug8({prompt:W.content,schema:Y,schemaPrefix:X,schemaSuffix:G}),[W,...((Q=$[0])==null?void 0:Q.role)==="system"?$.slice(1):$]}function Cy0($){return $!=null}function BE({apiKey:$,environmentVariableName:Y,apiKeyParameterName:X="apiKey",description:G}){if(typeof $==="string")return $;if($!=null)throw new q90({message:`${G} API key must be a string.`});if(typeof process>"u")throw new q90({message:`${G} API key is missing. Pass it using the '${X}' parameter. Environment variables are not supported in this environment.`});if($=process.env[Y],$==null)throw new q90({message:`${G} API key is missing. Pass it using the '${X}' parameter or the ${Y} environment variable.`});if(typeof $!=="string")throw new q90({message:`${G} API key must be a string. The value of the ${Y} environment variable is not a string.`});return $}function X74({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}function ry0($){var Y;let[X,G=""]=$.toLowerCase().split("/");return(Y={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[G])!=null?Y:G}function d84($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(Hg8.test($)===!1&&zg8.test($)===!1)return Y;return Vg8(Y)}function Vg8($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function ay0($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return d84($)}try{return d84($)}finally{Error.stackTraceLimit=Y}}function sy0($){if($.type==="object"||Array.isArray($.type)&&$.type.includes("object")){$.additionalProperties=!1;let{properties:X}=$;if(X!=null)for(let G of Object.keys(X))X[G]=AE(X[G])}if($.items!=null)$.items=Array.isArray($.items)?$.items.map(AE):AE($.items);if($.anyOf!=null)$.anyOf=$.anyOf.map(AE);if($.allOf!=null)$.allOf=$.allOf.map(AE);if($.oneOf!=null)$.oneOf=$.oneOf.map(AE);let{definitions:Y}=$;if(Y!=null)for(let X of Object.keys(Y))Y[X]=AE(Y[X]);return $}function AE($){if(typeof $==="boolean")return $;return sy0($)}function xW(){return{}}function Dg8($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=s9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function Ng8($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function Lg8(){return{type:"boolean"}}function G74($,Y){return s9($.type._def,Y)}function J74($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>J74($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Og8($)}}function Eg8($,Y){return{...s9($.innerType._def,Y),default:$.defaultValue()}}function Mg8($,Y){return Y.effectStrategy==="input"?s9($.schema._def,Y):xW()}function Rg8($){return{type:"string",enum:Array.from($.values)}}function Ig8($,Y){let X=[s9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),s9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(qg8(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...Z}=J;Q=Z}G.push(Q)}}),G.length?{allOf:G}:void 0}function Pg8($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}function Q74($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":pK(X,"email",G.message,Y);break;case"format:idn-email":pK(X,"idn-email",G.message,Y);break;case"pattern:zod":UJ(X,uK.email,G.message,Y);break}break;case"url":pK(X,"uri",G.message,Y);break;case"uuid":pK(X,"uuid",G.message,Y);break;case"regex":UJ(X,G.regex,G.message,Y);break;case"cuid":UJ(X,uK.cuid,G.message,Y);break;case"cuid2":UJ(X,uK.cuid2,G.message,Y);break;case"startsWith":UJ(X,RegExp(`^${Oy0(G.value,Y)}`),G.message,Y);break;case"endsWith":UJ(X,RegExp(`${Oy0(G.value,Y)}$`),G.message,Y);break;case"datetime":pK(X,"date-time",G.message,Y);break;case"date":pK(X,"date",G.message,Y);break;case"time":pK(X,"time",G.message,Y);break;case"duration":pK(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{UJ(X,RegExp(Oy0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")pK(X,"ipv4",G.message,Y);if(G.version!=="v4")pK(X,"ipv6",G.message,Y);break}case"base64url":UJ(X,uK.base64url,G.message,Y);break;case"jwt":UJ(X,uK.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")UJ(X,uK.ipv4Cidr,G.message,Y);if(G.version!=="v4")UJ(X,uK.ipv6Cidr,G.message,Y);break}case"emoji":UJ(X,uK.emoji(),G.message,Y);break;case"ulid":{UJ(X,uK.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{pK(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{UJ(X,uK.base64,G.message,Y);break}}break}case"nanoid":UJ(X,uK.nanoid,G.message,Y)}return X}function Oy0($,Y){return Y.patternStrategy==="escape"?_g8($):$}function _g8($){let Y="";for(let X=0;X<$.length;X++){if(!wg8.has($[X]))Y+="\\";Y+=$[X]}return Y}function pK($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function UJ($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:l84(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=l84(Y,G)}function l84($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,Z=!1,K=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(Z){if(J[H].match(/[a-z]/)){if(K)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),K=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],K=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=Z?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(Z&&J[H]==="]")Z=!1;else if(!Z&&J[H]==="[")Z=!0}return Q}function W74($,Y){var X,G,J,Q,W,Z;let K={type:"object",additionalProperties:(X=s9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=Q74($.keyType._def,Y);return{...K,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...K,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((Z=$.keyType._def.type._def.checks)==null?void 0:Z.length)){let{type:H,...z}=G74($.keyType._def,Y);return{...K,propertyNames:z}}return K}function jg8($,Y){if(Y.mapStrategy==="record")return W74($,Y);let X=s9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||xW(),G=s9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||xW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function Tg8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function Cg8(){return{not:xW()}}function Sg8(){return{type:"null"}}function kg8($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in Sy0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=Sy0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return vg8($,Y)}function xg8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[Sy0[$.innerType._def.typeName],"null"]};let X=s9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function yg8($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function bg8($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let Z=J[W];if(Z===void 0||Z._def===void 0)continue;let K=fg8(Z),H=s9(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!K)G.push(W)}if(G.length)X.required=G;let Q=hg8($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function hg8($,Y){if($.catchall._def.typeName!=="ZodNever")return s9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function fg8($){try{return $.isOptional()}catch(Y){return!0}}function ug8($,Y){return s9($.type._def,Y)}function pg8($,Y){let G={type:"array",uniqueItems:!0,items:s9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function dg8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>s9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:s9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>s9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function cg8(){return{not:xW()}}function lg8(){return xW()}function s9($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let K=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(K!==Ag8)return K}if(J&&!X){let K=ag8(J,Y);if(K!==void 0)return K}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=ng8($,$.typeName,Y),Z=typeof W==="function"?s9(W(),Y):W;if(Z)sg8($,Y,Z);if(Y.postProcess){let K=Y.postProcess(Z,$,Y);return Q.jsonSchema=Z,K}return Q.jsonSchema=Z,Z}function J1($){let Y;return()=>{if(Y==null)Y=$();return Y}}function i90($,{validate:Y}={}){return{[ky0]:!0,_type:void 0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function eg8($){return typeof $==="object"&&$!==null&&ky0 in $&&$[ky0]===!0&&"jsonSchema"in $&&"validate"in $}function $m8($){return $==null?i90({properties:{},additionalProperties:!1}):eg8($)?$:("~standard"in $)?$["~standard"].vendor==="zod"?G1($):Ym8($):$()}function Ym8($){return i90(()=>sy0($["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(Y)=>{let X=await $["~standard"].validate(Y);return"value"in X?{success:!0,value:X.value}:{success:!1,error:new Km({value:Y,cause:X.issues})}}})}function Xm8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return i90(()=>tg8($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function Gm8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return i90(()=>sy0($$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function Jm8($){return"_zod"in $}function G1($,Y){if(Jm8($))return Gm8($,Y);else return Xm8($,Y)}async function P8({value:$,schema:Y,context:X}){let G=await oy0({value:$,schema:Y,context:X});if(!G.success)throw Km.wrap({value:$,cause:G.error,context:X});return G.value}async function oy0({value:$,schema:Y,context:X}){let G=$m8(Y);try{if(G.validate==null)return{success:!0,value:$,rawValue:$};let J=await G.validate($);if(J.success)return{success:!0,value:J.value,rawValue:$};return{success:!1,error:Km.wrap({value:$,cause:J.error,context:X}),rawValue:$}}catch(J){return{success:!1,error:Km.wrap({value:$,cause:J,context:X}),rawValue:$}}}async function Z74({text:$,schema:Y}){try{let X=ay0($);if(Y==null)return X;return P8({value:X,schema:Y})}catch(X){if(C90.isInstance(X)||Km.isInstance(X))throw X;throw new C90({text:$,cause:X})}}async function n90({text:$,schema:Y}){try{let X=ay0($);if(Y==null)return{success:!0,value:X,rawValue:X};return await oy0({value:X,schema:Y})}catch(X){return{success:!1,error:C90.isInstance(X)?X:new C90({text:$,cause:X}),rawValue:void 0}}}function Hm($){try{return ay0($),!0}catch(Y){return!1}}function Qm8({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new nf8).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await n90({text:X,schema:Y}))}}))}async function P9({provider:$,providerOptions:Y,schema:X}){if((Y==null?void 0:Y[$])==null)return;let G=await oy0({value:Y[$],schema:X});if(!G.success)throw new ny0({argument:"providerOptions",message:`invalid ${$} provider options`,cause:G.error});return G.value}function U74($){return $}function FY({id:$,inputSchema:Y}){return({execute:X,outputSchema:G,needsApproval:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K,...H})=>U74({type:"provider",id:$,args:H,inputSchema:Y,outputSchema:G,execute:X,needsApproval:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K})}function D5({id:$,inputSchema:Y,outputSchema:X,supportsDeferredResults:G}){return({execute:J,needsApproval:Q,toModelOutput:W,onInputStart:Z,onInputDelta:K,onInputAvailable:H,...z})=>U74({type:"provider",id:$,args:z,inputSchema:Y,outputSchema:X,execute:J,needsApproval:Q,toModelOutput:W,onInputStart:Z,onInputDelta:K,onInputAvailable:H,supportsDeferredResults:G})}async function lK($){if(typeof $==="function")$=$();return Promise.resolve($)}function EE($){return $==null?void 0:$.replace(/\/$/,"")}function z74($){let Y=$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),X=$.startsWith("gpt-4")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-nano")&&!$.startsWith("gpt-5-chat")&&!$.startsWith("gpt-5.4-nano")||$.startsWith("o3")||$.startsWith("o4-mini"),G=$.startsWith("o1")||$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),J=$.startsWith("gpt-5.1")||$.startsWith("gpt-5.2")||$.startsWith("gpt-5.3")||$.startsWith("gpt-5.4")||$.startsWith("gpt-5.5");return{supportsFlexProcessing:Y,supportsPriorityProcessing:X,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:J}}function i84($){var Y,X,G,J,Q,W;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Z=(Y=$.prompt_tokens)!=null?Y:0,K=(X=$.completion_tokens)!=null?X:0,H=(J=(G=$.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?J:0,z=(W=(Q=$.completion_tokens_details)==null?void 0:Q.reasoning_tokens)!=null?W:0;return{inputTokens:{total:Z,noCache:Z-H,cacheRead:H,cacheWrite:void 0},outputTokens:{total:K,text:K-z,reasoning:z},raw:$}}function Zm8($){return JSON.stringify($===void 0?{}:$)}function Km8({prompt:$,systemMessageMode:Y="system"}){var X;let G=[],J=[];for(let{role:Q,content:W}of $)switch(Q){case"system":{switch(Y){case"system":{G.push({role:"system",content:W});break}case"developer":{G.push({role:"developer",content:W});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(W.length===1&&W[0].type==="text"){G.push({role:"user",content:W[0].text});break}G.push({role:"user",content:W.map((Z,K)=>{var H,z,V;switch(Z.type){case"text":return{type:"text",text:Z.text};case"file":if(Z.mediaType.startsWith("image/")){let A=Z.mediaType==="image/*"?"image/jpeg":Z.mediaType;return{type:"image_url",image_url:{url:Z.data instanceof URL?Z.data.toString():`data:${A};base64,${nY(Z.data)}`,detail:(z=(H=Z.providerOptions)==null?void 0:H.openai)==null?void 0:z.imageDetail}}}else if(Z.mediaType.startsWith("audio/")){if(Z.data instanceof URL)throw new d5({functionality:"audio file parts with URLs"});switch(Z.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:nY(Z.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:nY(Z.data),format:"mp3"}};default:throw new d5({functionality:`audio content parts with media type ${Z.mediaType}`})}}else if(Z.mediaType==="application/pdf"){if(Z.data instanceof URL)throw new d5({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof Z.data==="string"&&Z.data.startsWith("file-")?{file_id:Z.data}:{filename:(V=Z.filename)!=null?V:`part-${K}.pdf`,file_data:`data:application/pdf;base64,${nY(Z.data)}`}}}else throw new d5({functionality:`file part media type ${Z.mediaType}`})}})});break}case"assistant":{let Z="",K=[];for(let H of W)switch(H.type){case"text":{Z+=H.text;break}case"tool-call":{K.push({id:H.toolCallId,type:"function",function:{name:H.toolName,arguments:Zm8(H.input)}});break}}G.push({role:"assistant",content:K.length>0?Z||null:Z,tool_calls:K.length>0?K:void 0});break}case"tool":{for(let Z of W){if(Z.type==="tool-approval-response")continue;let K=Z.output,H;switch(K.type){case"text":case"error-text":H=K.value;break;case"execution-denied":H=(X=K.reason)!=null?X:"Tool execution denied.";break;case"content":case"json":case"error-json":H=JSON.stringify(K.value);break}G.push({role:"tool",tool_call_id:Z.toolCallId,content:H})}break}default:throw Error(`Unsupported role: ${Q}`)}return{messages:G,warnings:J}}function Ey0({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X?new Date(X*1000):void 0}}function n84($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}function Vm8({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)switch(Q.type){case"function":G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema,...Q.strict!=null?{strict:Q.strict}:{}}});break;default:X.push({type:"unsupported",feature:`tool type: ${Q.type}`});break}if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":case"required":return{tools:G,toolChoice:J,toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new d5({functionality:`tool choice type: ${J}`})}}function r84($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Q=(Y=$.prompt_tokens)!=null?Y:0,W=(X=$.completion_tokens)!=null?X:0;return{inputTokens:{total:(G=$.prompt_tokens)!=null?G:void 0,noCache:Q,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=$.completion_tokens)!=null?J:void 0,text:W,reasoning:void 0},raw:$}}function Fm8({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new hf8({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text;case"tool-call":throw new d5({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new d5({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function a84({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function s84($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}function qm8($){return Rm8.some((Y)=>$.startsWith(Y))}function e84($,Y,X){if($==null)return{};let G={};if($.image_tokens!=null){let J=Math.floor($.image_tokens/X),Q=$.image_tokens-J*(X-1);G.imageTokens=Y===X-1?Q:J}if($.text_tokens!=null){let J=Math.floor($.text_tokens/X),Q=$.text_tokens-J*(X-1);G.textTokens=Y===X-1?Q:J}return G}async function _m8($){if(!$)return;if($.type==="url")return o54($.url);let Y=$.data instanceof Uint8Array?$.data:Qj($.data);return new Blob([Y],{type:$.mediaType})}function $94($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let{input_tokens:Q,output_tokens:W}=$,Z=(X=(Y=$.input_tokens_details)==null?void 0:Y.cached_tokens)!=null?X:0,K=(J=(G=$.output_tokens_details)==null?void 0:G.reasoning_tokens)!=null?J:0;return{inputTokens:{total:Q,noCache:Q-Z,cacheRead:Z,cacheWrite:void 0},outputTokens:{total:W,text:W-K,reasoning:K},raw:$}}function Du8($){return JSON.stringify($===void 0?{}:$)}function Y94($,Y){if(!Y)return!1;return Y.some((X)=>$.startsWith(X))}async function Nu8({prompt:$,toolNameMapping:Y,systemMessageMode:X,providerOptionsName:G,fileIdPrefixes:J,store:Q,hasConversation:W=!1,hasLocalShellTool:Z=!1,hasShellTool:K=!1,hasApplyPatchTool:H=!1,customProviderToolNames:z}){var V,A,F,N,D,L,B,O,E,M,R,q,w,I,P,_,C;let k=[],S=[],T=new Set;for(let{role:v,content:x}of $)switch(v){case"system":{switch(X){case"system":{k.push({role:"system",content:x});break}case"developer":{k.push({role:"developer",content:x});break}case"remove":{S.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${X}`)}break}case"user":{k.push({role:"user",content:x.map((y,d)=>{var u,b,g;switch(y.type){case"text":return{type:"input_text",text:y.text};case"file":if(y.mediaType.startsWith("image/")){let p=y.mediaType==="image/*"?"image/jpeg":y.mediaType;return{type:"input_image",...y.data instanceof URL?{image_url:y.data.toString()}:typeof y.data==="string"&&Y94(y.data,J)?{file_id:y.data}:{image_url:`data:${p};base64,${nY(y.data)}`},detail:(b=(u=y.providerOptions)==null?void 0:u[G])==null?void 0:b.imageDetail}}else if(y.mediaType==="application/pdf"){if(y.data instanceof URL)return{type:"input_file",file_url:y.data.toString()};return{type:"input_file",...typeof y.data==="string"&&Y94(y.data,J)?{file_id:y.data}:{filename:(g=y.filename)!=null?g:`part-${d}.pdf`,file_data:`data:application/pdf;base64,${nY(y.data)}`}}}else throw new d5({functionality:`file part media type ${y.mediaType}`})}})});break}case"assistant":{let y={};for(let d of x)switch(d.type){case"text":{let u=(V=d.providerOptions)==null?void 0:V[G],b=u==null?void 0:u.itemId,g=u==null?void 0:u.phase;if(W&&b!=null)break;if(Q&&b!=null){k.push({type:"item_reference",id:b});break}k.push({role:"assistant",content:[{type:"output_text",text:d.text}],id:b,...g!=null&&{phase:g}});break}case"tool-call":{let u=(L=(F=(A=d.providerOptions)==null?void 0:A[G])==null?void 0:F.itemId)!=null?L:(D=(N=d.providerMetadata)==null?void 0:N[G])==null?void 0:D.itemId;if(W&&u!=null)break;let b=Y.toProviderToolName(d.toolName);if(b==="tool_search"){if(Q&&u!=null){k.push({type:"item_reference",id:u});break}let g=typeof d.input==="string"?await Z74({text:d.input,schema:xy0}):await P8({value:d.input,schema:xy0}),p=g.call_id!=null?"client":"server";k.push({type:"tool_search_call",id:u!=null?u:d.toolCallId,execution:p,call_id:(B=g.call_id)!=null?B:null,status:"completed",arguments:g.arguments});break}if(d.providerExecuted){if(Q&&u!=null)k.push({type:"item_reference",id:u});break}if(Q&&u!=null){k.push({type:"item_reference",id:u});break}if(Z&&b==="local_shell"){let g=await P8({value:d.input,schema:L74});k.push({type:"local_shell_call",call_id:d.toolCallId,id:u,action:{type:"exec",command:g.action.command,timeout_ms:g.action.timeoutMs,user:g.action.user,working_directory:g.action.workingDirectory,env:g.action.env}});break}if(K&&b==="shell"){let g=await P8({value:d.input,schema:O74});k.push({type:"shell_call",call_id:d.toolCallId,id:u,status:"completed",action:{commands:g.action.commands,timeout_ms:g.action.timeoutMs,max_output_length:g.action.maxOutputLength}});break}if(H&&b==="apply_patch"){let g=await P8({value:d.input,schema:A74});k.push({type:"apply_patch_call",call_id:g.callId,id:u,status:"completed",operation:g.operation});break}if(z==null?void 0:z.has(b)){k.push({type:"custom_tool_call",call_id:d.toolCallId,name:b,input:typeof d.input==="string"?d.input:JSON.stringify(d.input),id:u});break}k.push({type:"function_call",call_id:d.toolCallId,name:b,arguments:Du8(d.input),id:u});break}case"tool-result":{if(d.output.type==="execution-denied"||d.output.type==="json"&&typeof d.output.value==="object"&&d.output.value!=null&&"type"in d.output.value&&d.output.value.type==="execution-denied")break;if(W)break;let u=Y.toProviderToolName(d.toolName);if(u==="tool_search"){let b=(M=(E=(O=d.providerOptions)==null?void 0:O[G])==null?void 0:E.itemId)!=null?M:d.toolCallId;if(Q)k.push({type:"item_reference",id:b});else if(d.output.type==="json"){let g=await P8({value:d.output.value,schema:yy0});k.push({type:"tool_search_output",id:b,execution:"server",call_id:null,status:"completed",tools:g.tools})}break}if(K&&u==="shell"){if(d.output.type==="json"){let b=await P8({value:d.output.value,schema:vy0});k.push({type:"shell_call_output",call_id:d.toolCallId,output:b.output.map((g)=>({stdout:g.stdout,stderr:g.stderr,outcome:g.outcome.type==="timeout"?{type:"timeout"}:{type:"exit",exit_code:g.outcome.exitCode}}))})}break}if(Q){let b=(w=(q=(R=d.providerOptions)==null?void 0:R[G])==null?void 0:q.itemId)!=null?w:d.toolCallId;k.push({type:"item_reference",id:b})}else S.push({type:"other",message:`Results for OpenAI tool ${d.toolName} are not sent to the API when store is false`});break}case"reasoning":{let u=await P9({provider:G,providerOptions:d.providerOptions,schema:Lu8}),b=u==null?void 0:u.itemId;if(W&&b!=null)break;if(b!=null){let g=y[b];if(Q){if(g===void 0)k.push({type:"item_reference",id:b}),y[b]={type:"reasoning",id:b,summary:[]}}else{let p=[];if(d.text.length>0)p.push({type:"summary_text",text:d.text});else if(g!==void 0)S.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(d)}.`});if(g===void 0)y[b]={type:"reasoning",id:b,encrypted_content:u==null?void 0:u.reasoningEncryptedContent,summary:p},k.push(y[b]);else if(g.summary.push(...p),(u==null?void 0:u.reasoningEncryptedContent)!=null)g.encrypted_content=u.reasoningEncryptedContent}}else{let g=u==null?void 0:u.reasoningEncryptedContent;if(g!=null){let p=[];if(d.text.length>0)p.push({type:"summary_text",text:d.text});k.push({type:"reasoning",encrypted_content:g,summary:p})}else S.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(d)}.`})}break}}break}case"tool":{for(let y of x){if(y.type==="tool-approval-response"){let g=y;if(T.has(g.approvalId))continue;if(T.add(g.approvalId),Q)k.push({type:"item_reference",id:g.approvalId});k.push({type:"mcp_approval_response",approval_request_id:g.approvalId,approve:g.approved});continue}let d=y.output;if(d.type==="execution-denied"){if((P=(I=d.providerOptions)==null?void 0:I.openai)==null?void 0:P.approvalId)continue}let u=Y.toProviderToolName(y.toolName);if(u==="tool_search"&&d.type==="json"){let g=await P8({value:d.value,schema:yy0});k.push({type:"tool_search_output",execution:"client",call_id:y.toolCallId,status:"completed",tools:g.tools});continue}if(Z&&u==="local_shell"&&d.type==="json"){let g=await P8({value:d.value,schema:B74});k.push({type:"local_shell_call_output",call_id:y.toolCallId,output:g.output});continue}if(K&&u==="shell"&&d.type==="json"){let g=await P8({value:d.value,schema:vy0});k.push({type:"shell_call_output",call_id:y.toolCallId,output:g.output.map((p)=>({stdout:p.stdout,stderr:p.stderr,outcome:p.outcome.type==="timeout"?{type:"timeout"}:{type:"exit",exit_code:p.outcome.exitCode}}))});continue}if(H&&y.toolName==="apply_patch"&&d.type==="json"){let g=await P8({value:d.value,schema:F74});k.push({type:"apply_patch_call_output",call_id:y.toolCallId,status:g.status,output:g.output});continue}if(z==null?void 0:z.has(u)){let g;switch(d.type){case"text":case"error-text":g=d.value;break;case"execution-denied":g=(_=d.reason)!=null?_:"Tool execution denied.";break;case"json":case"error-json":g=JSON.stringify(d.value);break;case"content":g=d.value.map((p)=>{var h,n,t,s,Z0;switch(p.type){case"text":return{type:"input_text",text:p.text};case"image-data":return{type:"input_image",image_url:`data:${p.mediaType};base64,${p.data}`,detail:(n=(h=p.providerOptions)==null?void 0:h[G])==null?void 0:n.imageDetail};case"image-url":return{type:"input_image",image_url:p.url,detail:(s=(t=p.providerOptions)==null?void 0:t[G])==null?void 0:s.imageDetail};case"file-data":return{type:"input_file",filename:(Z0=p.filename)!=null?Z0:"data",file_data:`data:${p.mediaType};base64,${p.data}`};case"file-url":return{type:"input_file",file_url:p.url};default:S.push({type:"other",message:`unsupported custom tool content part type: ${p.type}`});return}}).filter(Cy0);break;default:g=""}k.push({type:"custom_tool_call_output",call_id:y.toolCallId,output:g});continue}let b;switch(d.type){case"text":case"error-text":b=d.value;break;case"execution-denied":b=(C=d.reason)!=null?C:"Tool execution denied.";break;case"json":case"error-json":b=JSON.stringify(d.value);break;case"content":b=d.value.map((g)=>{var p,h,n,t,s;switch(g.type){case"text":return{type:"input_text",text:g.text};case"image-data":return{type:"input_image",image_url:`data:${g.mediaType};base64,${g.data}`,detail:(h=(p=g.providerOptions)==null?void 0:p[G])==null?void 0:h.imageDetail};case"image-url":return{type:"input_image",image_url:g.url,detail:(t=(n=g.providerOptions)==null?void 0:n[G])==null?void 0:t.imageDetail};case"file-data":return{type:"input_file",filename:(s=g.filename)!=null?s:"data",file_data:`data:${g.mediaType};base64,${g.data}`};case"file-url":return{type:"input_file",file_url:g.url};default:{S.push({type:"other",message:`unsupported tool content part type: ${g.type}`});return}}}).filter(Cy0);break}k.push({type:"function_call_output",call_id:y.toolCallId,output:b})}break}default:throw Error(`Unsupported role: ${v}`)}if(!Q&&k.some((v)=>("type"in v)&&v.type==="reasoning"&&v.encrypted_content==null))S.push({type:"other",message:"Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."}),k=k.filter((v)=>!("type"in v)||v.type!=="reasoning"||v.encrypted_content!=null);return{input:k,warnings:S}}function My0({finishReason:$,hasFunctionCall:Y}){switch($){case void 0:case null:return Y?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return Y?"tool-calls":"other"}}async function Eu8({tools:$,toolChoice:Y,allowedTools:X,toolNameMapping:G,customProviderToolNames:J}){var Q,W,Z;$=($==null?void 0:$.length)?$:void 0;let K=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:K};let H=[],z=J!=null?J:new Set;for(let A of $)switch(A.type){case"function":{let F=(Q=A.providerOptions)==null?void 0:Q.openai,N=F==null?void 0:F.deferLoading;H.push({type:"function",name:A.name,description:A.description,parameters:A.inputSchema,...A.strict!=null?{strict:A.strict}:{},...N!=null?{defer_loading:N}:{}});break}case"provider":{switch(A.id){case"openai.file_search":{let F=await P8({value:A.args,schema:gm8});H.push({type:"file_search",vector_store_ids:F.vectorStoreIds,max_num_results:F.maxNumResults,ranking_options:F.ranking?{ranker:F.ranking.ranker,score_threshold:F.ranking.scoreThreshold}:void 0,filters:F.filters});break}case"openai.local_shell":{H.push({type:"local_shell"});break}case"openai.shell":{let F=await P8({value:A.args,schema:am8});H.push({type:"shell",...F.environment&&{environment:Mu8(F.environment)}});break}case"openai.apply_patch":{H.push({type:"apply_patch"});break}case"openai.web_search_preview":{let F=await P8({value:A.args,schema:Qu8});H.push({type:"web_search_preview",search_context_size:F.searchContextSize,user_location:F.userLocation});break}case"openai.web_search":{let F=await P8({value:A.args,schema:$u8});H.push({type:"web_search",filters:F.filters!=null?{allowed_domains:F.filters.allowedDomains}:void 0,external_web_access:F.externalWebAccess,search_context_size:F.searchContextSize,user_location:F.userLocation});break}case"openai.code_interpreter":{let F=await P8({value:A.args,schema:km8});H.push({type:"code_interpreter",container:F.container==null?{type:"auto",file_ids:void 0}:typeof F.container==="string"?F.container:{type:"auto",file_ids:F.container.fileIds}});break}case"openai.image_generation":{let F=await P8({value:A.args,schema:pm8});H.push({type:"image_generation",background:F.background,input_fidelity:F.inputFidelity,input_image_mask:F.inputImageMask?{file_id:F.inputImageMask.fileId,image_url:F.inputImageMask.imageUrl}:void 0,model:F.model,moderation:F.moderation,partial_images:F.partialImages,quality:F.quality,output_compression:F.outputCompression,output_format:F.outputFormat,size:F.size});break}case"openai.mcp":{let F=await P8({value:A.args,schema:Uu8}),N=(B)=>({tool_names:B.toolNames}),D=F.requireApproval,L=D==null?void 0:typeof D==="string"?D:D.never!=null?{never:N(D.never)}:void 0;H.push({type:"mcp",server_label:F.serverLabel,allowed_tools:Array.isArray(F.allowedTools)?F.allowedTools:F.allowedTools?{read_only:F.allowedTools.readOnly,tool_names:F.allowedTools.toolNames}:void 0,authorization:F.authorization,connector_id:F.connectorId,headers:F.headers,require_approval:L!=null?L:"never",server_description:F.serverDescription,server_url:F.serverUrl});break}case"openai.custom":{let F=await P8({value:A.args,schema:ym8});H.push({type:"custom",name:F.name,description:F.description,format:F.format}),z.add(F.name);break}case"openai.tool_search":{let F=await P8({value:A.args,schema:om8});H.push({type:"tool_search",...F.execution!=null?{execution:F.execution}:{},...F.description!=null?{description:F.description}:{},...F.parameters!=null?{parameters:F.parameters}:{}});break}}break}default:K.push({type:"unsupported",feature:`function tool ${A}`});break}if(X!=null)return{tools:H,toolChoice:{type:"allowed_tools",mode:(W=X.mode)!=null?W:"auto",tools:X.toolNames.map((A)=>{var F;return{type:"function",name:(F=G==null?void 0:G.toProviderToolName(A))!=null?F:A}})},toolWarnings:K};if(Y==null)return{tools:H,toolChoice:void 0,toolWarnings:K};let V=Y.type;switch(V){case"auto":case"none":case"required":return{tools:H,toolChoice:V,toolWarnings:K};case"tool":{let A=(Z=G==null?void 0:G.toProviderToolName(Y.toolName))!=null?Z:Y.toolName;return{tools:H,toolChoice:A==="code_interpreter"||A==="file_search"||A==="image_generation"||A==="web_search_preview"||A==="web_search"||A==="mcp"||A==="apply_patch"?{type:A}:z.has(A)?{type:"custom",name:A}:{type:"function",name:A},toolWarnings:K}}default:throw new d5({functionality:`tool choice type: ${V}`})}}function Mu8($){if($.type==="containerReference")return{type:"container_reference",container_id:$.containerId};if($.type==="containerAuto"){let X=$;return{type:"container_auto",file_ids:X.fileIds,memory_limit:X.memoryLimit,network_policy:X.networkPolicy==null?void 0:X.networkPolicy.type==="disabled"?{type:"disabled"}:{type:"allowlist",allowed_domains:X.networkPolicy.allowedDomains,domain_secrets:X.networkPolicy.domainSecrets},skills:Ru8(X.skills)}}return{type:"local",skills:$.skills}}function Ru8($){return $==null?void 0:$.map((Y)=>Y.type==="skillReference"?{type:"skill_reference",skill_id:Y.skillId,version:Y.version}:{type:"inline",name:Y.name,description:Y.description,source:{type:"base64",media_type:Y.source.mediaType,data:Y.source.data}})}function G94($){var Y,X;let G={};for(let J of $){if(J.role!=="assistant")continue;for(let Q of J.content){if(Q.type!=="tool-call")continue;let W=(X=(Y=Q.providerOptions)==null?void 0:Y.openai)==null?void 0:X.approvalRequestId;if(W!=null)G[W]=Q.toolCallId}}return G}function Iu8($){return $.type==="response.output_text.delta"}function Pu8($){return $.type==="response.output_item.done"}function wu8($){return $.type==="response.completed"||$.type==="response.incomplete"}function _u8($){return $.type==="response.failed"}function ju8($){return $.type==="response.created"}function Tu8($){return $.type==="response.function_call_arguments.delta"}function Cu8($){return $.type==="response.custom_tool_call_input.delta"}function Su8($){return $.type==="response.image_generation_call.partial_image"}function ku8($){return $.type==="response.code_interpreter_call_code.delta"}function vu8($){return $.type==="response.code_interpreter_call_code.done"}function xu8($){return $.type==="response.apply_patch_call_operation_diff.delta"}function yu8($){return $.type==="response.apply_patch_call_operation_diff.done"}function J94($){return $.type==="response.output_item.added"}function bu8($){return $.type==="response.output_text.annotation.added"}function hu8($){return $.type==="error"}function Q94($){var Y;if($==null)return{};switch($.type){case"search":return{action:{type:"search",query:(Y=$.query)!=null?Y:void 0},...$.sources!=null&&{sources:$.sources}};case"open_page":return{action:{type:"openPage",url:$.url}};case"find_in_page":return{action:{type:"findInPage",url:$.url,pattern:$.pattern}}}}function FE($){return JSON.stringify($).slice(1,-1)}function ED($={}){var Y,X;let G=(Y=EE(X74({settingValue:$.baseURL,environmentVariableName:"OPENAI_BASE_URL"})))!=null?Y:"https://api.openai.com/v1",J=(X=$.name)!=null?X:"openai",Q=()=>KV({Authorization:`Bearer ${BE({apiKey:$.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":$.organization,"OpenAI-Project":$.project,...$.headers},`ai-sdk/openai/${du8}`),W=(D)=>new Am8(D,{provider:`${J}.chat`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),Z=(D)=>new Lm8(D,{provider:`${J}.completion`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),K=(D)=>new Em8(D,{provider:`${J}.embedding`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),H=(D)=>new wm8(D,{provider:`${J}.image`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),z=(D)=>new pu8(D,{provider:`${J}.transcription`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),V=(D)=>new gu8(D,{provider:`${J}.speech`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),A=(D)=>{if(new.target)throw Error("The OpenAI model function cannot be called with the new keyword.");return F(D)},F=(D)=>{return new qu8(D,{provider:`${J}.responses`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch,fileIdPrefixes:["file-"]})},N=function(D){return A(D)};return N.specificationVersion="v3",N.languageModel=A,N.chat=W,N.completion=Z,N.responses=F,N.embedding=K,N.embeddingModel=K,N.textEmbedding=K,N.textEmbeddingModel=K,N.image=H,N.imageModel=H,N.transcription=z,N.transcriptionModel=z,N.speech=V,N.speechModel=V,N.tools=Fu8,N}function au8($){var Y;let X=$==null?void 0:$.anthropic;return(Y=X==null?void 0:X.cacheControl)!=null?Y:X==null?void 0:X.cache_control}async function Bp8({tools:$,toolChoice:Y,disableParallelToolUse:X,cacheControlValidator:G,supportsStructuredOutput:J,supportsStrictTools:Q,defaultEagerInputStreaming:W=!1}){var Z,K;$=($==null?void 0:$.length)?$:void 0;let H=[],z=new Set,V=G||new Xb0;if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:H,betas:z};let A=[];for(let N of $)switch(N.type){case"function":{let D=V.getCacheControl(N.providerOptions,{type:"tool definition",canCache:!0}),L=(Z=N.providerOptions)==null?void 0:Z.anthropic,B=(K=L==null?void 0:L.eagerInputStreaming)!=null?K:W,O=L==null?void 0:L.deferLoading,E=L==null?void 0:L.allowedCallers;if(!Q&&N.strict!=null)H.push({type:"unsupported",feature:"strict",details:`Tool '${N.name}' has strict: ${N.strict}, but strict mode is not supported by this provider. The strict property will be ignored.`});if(A.push({name:N.name,description:N.description,input_schema:N.inputSchema,cache_control:D,...B?{eager_input_streaming:!0}:{},...Q===!0&&N.strict!=null?{strict:N.strict}:{},...O!=null?{defer_loading:O}:{},...E!=null?{allowed_callers:E}:{},...N.inputExamples!=null?{input_examples:N.inputExamples.map((M)=>M.input)}:{}}),J===!0)z.add("structured-outputs-2025-11-13");if(N.inputExamples!=null||E!=null)z.add("advanced-tool-use-2025-11-20");break}case"provider":{switch(N.id){case"anthropic.code_execution_20250522":{z.add("code-execution-2025-05-22"),A.push({type:"code_execution_20250522",name:"code_execution",cache_control:void 0});break}case"anthropic.code_execution_20250825":{z.add("code-execution-2025-08-25"),A.push({type:"code_execution_20250825",name:"code_execution"});break}case"anthropic.code_execution_20260120":{A.push({type:"code_execution_20260120",name:"code_execution"});break}case"anthropic.computer_20250124":{z.add("computer-use-2025-01-24"),A.push({name:"computer",type:"computer_20250124",display_width_px:N.args.displayWidthPx,display_height_px:N.args.displayHeightPx,display_number:N.args.displayNumber,cache_control:void 0});break}case"anthropic.computer_20251124":{z.add("computer-use-2025-11-24"),A.push({name:"computer",type:"computer_20251124",display_width_px:N.args.displayWidthPx,display_height_px:N.args.displayHeightPx,display_number:N.args.displayNumber,enable_zoom:N.args.enableZoom,cache_control:void 0});break}case"anthropic.computer_20241022":{z.add("computer-use-2024-10-22"),A.push({name:"computer",type:"computer_20241022",display_width_px:N.args.displayWidthPx,display_height_px:N.args.displayHeightPx,display_number:N.args.displayNumber,cache_control:void 0});break}case"anthropic.text_editor_20250124":{z.add("computer-use-2025-01-24"),A.push({name:"str_replace_editor",type:"text_editor_20250124",cache_control:void 0});break}case"anthropic.text_editor_20241022":{z.add("computer-use-2024-10-22"),A.push({name:"str_replace_editor",type:"text_editor_20241022",cache_control:void 0});break}case"anthropic.text_editor_20250429":{z.add("computer-use-2025-01-24"),A.push({name:"str_replace_based_edit_tool",type:"text_editor_20250429",cache_control:void 0});break}case"anthropic.text_editor_20250728":{let D=await P8({value:N.args,schema:su8});A.push({name:"str_replace_based_edit_tool",type:"text_editor_20250728",max_characters:D.maxCharacters,cache_control:void 0});break}case"anthropic.bash_20250124":{z.add("computer-use-2025-01-24"),A.push({name:"bash",type:"bash_20250124",cache_control:void 0});break}case"anthropic.bash_20241022":{z.add("computer-use-2024-10-22"),A.push({name:"bash",type:"bash_20241022",cache_control:void 0});break}case"anthropic.memory_20250818":{z.add("context-management-2025-06-27"),A.push({name:"memory",type:"memory_20250818"});break}case"anthropic.web_fetch_20250910":{z.add("web-fetch-2025-09-10");let D=await P8({value:N.args,schema:Fp8});A.push({type:"web_fetch_20250910",name:"web_fetch",max_uses:D.maxUses,allowed_domains:D.allowedDomains,blocked_domains:D.blockedDomains,citations:D.citations,max_content_tokens:D.maxContentTokens,cache_control:void 0});break}case"anthropic.web_fetch_20260209":{z.add("code-execution-web-tools-2026-02-09");let D=await P8({value:N.args,schema:Up8});A.push({type:"web_fetch_20260209",name:"web_fetch",max_uses:D.maxUses,allowed_domains:D.allowedDomains,blocked_domains:D.blockedDomains,citations:D.citations,max_content_tokens:D.maxContentTokens,cache_control:void 0});break}case"anthropic.web_search_20250305":{let D=await P8({value:N.args,schema:Qp8});A.push({type:"web_search_20250305",name:"web_search",max_uses:D.maxUses,allowed_domains:D.allowedDomains,blocked_domains:D.blockedDomains,user_location:D.userLocation,cache_control:void 0});break}case"anthropic.web_search_20260209":{z.add("code-execution-web-tools-2026-02-09");let D=await P8({value:N.args,schema:$p8});A.push({type:"web_search_20260209",name:"web_search",max_uses:D.maxUses,allowed_domains:D.allowedDomains,blocked_domains:D.blockedDomains,user_location:D.userLocation,cache_control:void 0});break}case"anthropic.tool_search_regex_20251119":{A.push({type:"tool_search_tool_regex_20251119",name:"tool_search_tool_regex"});break}case"anthropic.tool_search_bm25_20251119":{A.push({type:"tool_search_tool_bm25_20251119",name:"tool_search_tool_bm25"});break}default:{H.push({type:"unsupported",feature:`provider-defined tool ${N.id}`});break}}break}default:{H.push({type:"unsupported",feature:`tool ${N}`});break}}if(Y==null)return{tools:A,toolChoice:X?{type:"auto",disable_parallel_tool_use:X}:void 0,toolWarnings:H,betas:z};let F=Y.type;switch(F){case"auto":return{tools:A,toolChoice:{type:"auto",disable_parallel_tool_use:X},toolWarnings:H,betas:z};case"required":return{tools:A,toolChoice:{type:"any",disable_parallel_tool_use:X},toolWarnings:H,betas:z};case"none":return{tools:void 0,toolChoice:void 0,toolWarnings:H,betas:z};case"tool":return{tools:A,toolChoice:{type:"tool",name:Y.toolName,disable_parallel_tool_use:X},toolWarnings:H,betas:z};default:throw new d5({functionality:`tool choice type: ${F}`})}}function z94({usage:$,rawUsage:Y}){var X,G;let J=(X=$.cache_creation_input_tokens)!=null?X:0,Q=(G=$.cache_read_input_tokens)!=null?G:0,W,Z;if($.iterations&&$.iterations.length>0){let K=$.iterations.reduce((H,z)=>({input:H.input+z.input_tokens,output:H.output+z.output_tokens}),{input:0,output:0});W=K.input,Z=K.output}else W=$.input_tokens,Z=$.output_tokens;return{inputTokens:{total:W+J+Q,noCache:W,cacheRead:Q,cacheWrite:J},outputTokens:{total:Z,text:void 0,reasoning:void 0},raw:Y!=null?Y:$}}function Sp8($){if(typeof $==="string")return new TextDecoder().decode(Qj($));if($ instanceof Uint8Array)return new TextDecoder().decode($);if($ instanceof URL)throw new d5({functionality:"URL-based text documents are not supported for citations"});throw new d5({functionality:`unsupported data type for text documents: ${typeof $}`})}function Ry0($){return $ instanceof URL||kp8($)}function kp8($){return typeof $==="string"&&/^https?:\/\//i.test($)}function qy0($){return $ instanceof URL?$.toString():$}async function vp8({prompt:$,sendReasoning:Y,warnings:X,cacheControlValidator:G,toolNameMapping:J}){var Q,W,Z,K,H,z,V,A,F,N,D,L,B,O,E,M,R,q,w;let I=new Set,P=xp8($),_=G||new Xb0,C=void 0,k=[];async function S(v){var x,y;let d=await P9({provider:"anthropic",providerOptions:v,schema:K94});return(y=(x=d==null?void 0:d.citations)==null?void 0:x.enabled)!=null?y:!1}async function T(v){let x=await P9({provider:"anthropic",providerOptions:v,schema:K94});return{title:x==null?void 0:x.title,context:x==null?void 0:x.context}}for(let v=0;v<P.length;v++){let x=P[v],y=v===P.length-1,d=x.type;switch(d){case"system":{if(C!=null)throw new d5({functionality:"Multiple system messages that are separated by user/assistant messages"});C=x.messages.map(({content:u,providerOptions:b})=>({type:"text",text:u,cache_control:_.getCacheControl(b,{type:"system message",canCache:!0})}));break}case"user":{let u=[];for(let b of x.messages){let{role:g,content:p}=b;switch(g){case"user":{for(let h=0;h<p.length;h++){let n=p[h],t=h===p.length-1,s=(Q=_.getCacheControl(n.providerOptions,{type:"user message part",canCache:!0}))!=null?Q:t?_.getCacheControl(b.providerOptions,{type:"user message",canCache:!0}):void 0;switch(n.type){case"text":{u.push({type:"text",text:n.text,cache_control:s});break}case"file":{if(n.mediaType.startsWith("image/"))u.push({type:"image",source:Ry0(n.data)?{type:"url",url:qy0(n.data)}:{type:"base64",media_type:n.mediaType==="image/*"?"image/jpeg":n.mediaType,data:nY(n.data)},cache_control:s});else if(n.mediaType==="application/pdf"){I.add("pdfs-2024-09-25");let Z0=await S(n.providerOptions),X0=await T(n.providerOptions);u.push({type:"document",source:Ry0(n.data)?{type:"url",url:qy0(n.data)}:{type:"base64",media_type:"application/pdf",data:nY(n.data)},title:(W=X0.title)!=null?W:n.filename,...X0.context&&{context:X0.context},...Z0&&{citations:{enabled:!0}},cache_control:s})}else if(n.mediaType==="text/plain"){let Z0=await S(n.providerOptions),X0=await T(n.providerOptions);u.push({type:"document",source:Ry0(n.data)?{type:"url",url:qy0(n.data)}:{type:"text",media_type:"text/plain",data:Sp8(n.data)},title:(Z=X0.title)!=null?Z:n.filename,...X0.context&&{context:X0.context},...Z0&&{citations:{enabled:!0}},cache_control:s})}else throw new d5({functionality:`media type: ${n.mediaType}`});break}}}break}case"tool":{for(let h=0;h<p.length;h++){let n=p[h];if(n.type==="tool-approval-response")continue;let t=h===p.length-1,s=(K=_.getCacheControl(n.providerOptions,{type:"tool result part",canCache:!0}))!=null?K:t?_.getCacheControl(b.providerOptions,{type:"tool result message",canCache:!0}):void 0,Z0=n.output,X0;switch(Z0.type){case"content":X0=Z0.value.map((a)=>{var Q0;switch(a.type){case"text":return{type:"text",text:a.text};case"image-data":return{type:"image",source:{type:"base64",media_type:a.mediaType,data:a.data}};case"image-url":return{type:"image",source:{type:"url",url:a.url}};case"file-url":return{type:"document",source:{type:"url",url:a.url}};case"file-data":{if(a.mediaType==="application/pdf")return I.add("pdfs-2024-09-25"),{type:"document",source:{type:"base64",media_type:a.mediaType,data:a.data}};X.push({type:"other",message:`unsupported tool content part type: ${a.type} with media type: ${a.mediaType}`});return}case"custom":{let e=(Q0=a.providerOptions)==null?void 0:Q0.anthropic;if((e==null?void 0:e.type)==="tool-reference")return{type:"tool_reference",tool_name:e.toolName};X.push({type:"other",message:"unsupported custom tool content part"});return}default:{X.push({type:"other",message:`unsupported tool content part type: ${a.type}`});return}}}).filter(Cy0);break;case"text":case"error-text":X0=Z0.value;break;case"execution-denied":X0=(H=Z0.reason)!=null?H:"Tool execution denied.";break;case"json":case"error-json":default:X0=JSON.stringify(Z0.value);break}u.push({type:"tool_result",tool_use_id:n.toolCallId,content:X0,is_error:Z0.type==="error-text"||Z0.type==="error-json"?!0:void 0,cache_control:s})}break}default:throw Error(`Unsupported role: ${g}`)}}k.push({role:"user",content:u});break}case"assistant":{let u=[],b=new Set;for(let g=0;g<x.messages.length;g++){let p=x.messages[g],h=g===x.messages.length-1,{content:n}=p;for(let t=0;t<n.length;t++){let s=n[t],Z0=t===n.length-1,X0=(z=_.getCacheControl(s.providerOptions,{type:"assistant message part",canCache:!0}))!=null?z:Z0?_.getCacheControl(p.providerOptions,{type:"assistant message",canCache:!0}):void 0;switch(s.type){case"text":{let a=(V=s.providerOptions)==null?void 0:V.anthropic;if((a==null?void 0:a.type)==="compaction")u.push({type:"compaction",content:s.text,cache_control:X0});else u.push({type:"text",text:y&&h&&Z0?s.text.trim():s.text,cache_control:X0});break}case"reasoning":{if(Y){let a=await P9({provider:"anthropic",providerOptions:s.providerOptions,schema:ru8});if(a!=null)if(a.signature!=null)_.getCacheControl(s.providerOptions,{type:"thinking block",canCache:!1}),u.push({type:"thinking",thinking:s.text,signature:a.signature});else if(a.redactedData!=null)_.getCacheControl(s.providerOptions,{type:"redacted thinking block",canCache:!1}),u.push({type:"redacted_thinking",data:a.redactedData});else X.push({type:"other",message:"unsupported reasoning metadata"});else X.push({type:"other",message:"unsupported reasoning metadata"})}else X.push({type:"other",message:"sending reasoning content is disabled for this model"});break}case"tool-call":{if(s.providerExecuted){let e=J.toProviderToolName(s.toolName);if(((F=(A=s.providerOptions)==null?void 0:A.anthropic)==null?void 0:F.type)==="mcp-tool-use"){b.add(s.toolCallId);let $0=(D=(N=s.providerOptions)==null?void 0:N.anthropic)==null?void 0:D.serverName;if($0==null||typeof $0!=="string"){X.push({type:"other",message:"mcp tool use server name is required and must be a string"});break}u.push({type:"mcp_tool_use",id:s.toolCallId,name:s.toolName,input:s.input,server_name:$0,cache_control:X0})}else if(e==="code_execution"&&s.input!=null&&typeof s.input==="object"&&"type"in s.input&&typeof s.input.type==="string"&&(s.input.type==="bash_code_execution"||s.input.type==="text_editor_code_execution"))u.push({type:"server_tool_use",id:s.toolCallId,name:s.input.type,input:s.input,cache_control:X0});else if(e==="code_execution"&&s.input!=null&&typeof s.input==="object"&&"type"in s.input&&s.input.type==="programmatic-tool-call"){let{type:$0,...Y0}=s.input;u.push({type:"server_tool_use",id:s.toolCallId,name:"code_execution",input:Y0,cache_control:X0})}else if(e==="code_execution"||e==="web_fetch"||e==="web_search")u.push({type:"server_tool_use",id:s.toolCallId,name:e,input:s.input,cache_control:X0});else if(e==="tool_search_tool_regex"||e==="tool_search_tool_bm25")u.push({type:"server_tool_use",id:s.toolCallId,name:e,input:s.input,cache_control:X0});else X.push({type:"other",message:`provider executed tool call for tool ${s.toolName} is not supported`});break}let a=(L=s.providerOptions)==null?void 0:L.anthropic,Q0=(a==null?void 0:a.caller)?(a.caller.type==="code_execution_20250825"||a.caller.type==="code_execution_20260120")&&a.caller.toolId?{type:a.caller.type,tool_id:a.caller.toolId}:a.caller.type==="direct"?{type:"direct"}:void 0:void 0;u.push({type:"tool_use",id:s.toolCallId,name:s.toolName,input:s.input,...Q0&&{caller:Q0},cache_control:X0});break}case"tool-result":{let a=J.toProviderToolName(s.toolName);if(b.has(s.toolCallId)){let Q0=s.output;if(Q0.type!=="json"&&Q0.type!=="error-json"){X.push({type:"other",message:`provider executed tool result output type ${Q0.type} for tool ${s.toolName} is not supported`});break}u.push({type:"mcp_tool_result",tool_use_id:s.toolCallId,is_error:Q0.type==="error-json",content:Q0.value,cache_control:X0})}else if(a==="code_execution"){let Q0=s.output;if(Q0.type==="error-text"||Q0.type==="error-json"){let e={};try{if(typeof Q0.value==="string")e=JSON.parse(Q0.value);else if(typeof Q0.value==="object"&&Q0.value!==null)e=Q0.value}catch(m){}if(e.type==="code_execution_tool_result_error")u.push({type:"code_execution_tool_result",tool_use_id:s.toolCallId,content:{type:"code_execution_tool_result_error",error_code:(B=e.errorCode)!=null?B:"unknown"},cache_control:X0});else u.push({type:"bash_code_execution_tool_result",tool_use_id:s.toolCallId,cache_control:X0,content:{type:"bash_code_execution_tool_result_error",error_code:(O=e.errorCode)!=null?O:"unknown"}});break}if(Q0.type!=="json"){X.push({type:"other",message:`provider executed tool result output type ${Q0.type} for tool ${s.toolName} is not supported`});break}if(Q0.value==null||typeof Q0.value!=="object"||!("type"in Q0.value)||typeof Q0.value.type!=="string"){X.push({type:"other",message:`provider executed tool result output value is not a valid code execution result for tool ${s.toolName}`});break}if(Q0.value.type==="code_execution_result"){let e=await P8({value:Q0.value,schema:P74});u.push({type:"code_execution_tool_result",tool_use_id:s.toolCallId,content:{type:e.type,stdout:e.stdout,stderr:e.stderr,return_code:e.return_code,content:(E=e.content)!=null?E:[]},cache_control:X0})}else if(Q0.value.type==="encrypted_code_execution_result"){let e=await P8({value:Q0.value,schema:_74});if(e.type==="encrypted_code_execution_result")u.push({type:"code_execution_tool_result",tool_use_id:s.toolCallId,content:{type:e.type,encrypted_stdout:e.encrypted_stdout,stderr:e.stderr,return_code:e.return_code,content:(M=e.content)!=null?M:[]},cache_control:X0})}else{let e=await P8({value:Q0.value,schema:w74});if(e.type==="code_execution_result")u.push({type:"code_execution_tool_result",tool_use_id:s.toolCallId,content:{type:e.type,stdout:e.stdout,stderr:e.stderr,return_code:e.return_code,content:(R=e.content)!=null?R:[]},cache_control:X0});else if(e.type==="bash_code_execution_result"||e.type==="bash_code_execution_tool_result_error")u.push({type:"bash_code_execution_tool_result",tool_use_id:s.toolCallId,cache_control:X0,content:e});else u.push({type:"text_editor_code_execution_tool_result",tool_use_id:s.toolCallId,cache_control:X0,content:e})}break}if(a==="web_fetch"){let Q0=s.output;if(Q0.type==="error-json"){let m={};try{if(typeof Q0.value==="string")m=JSON.parse(Q0.value);else if(typeof Q0.value==="object"&&Q0.value!==null)m=Q0.value}catch($0){let Y0=(q=Q0.value)==null?void 0:q.errorCode;m={errorCode:typeof Y0==="string"?Y0:"unavailable"}}u.push({type:"web_fetch_tool_result",tool_use_id:s.toolCallId,content:{type:"web_fetch_tool_result_error",error_code:(w=m.errorCode)!=null?w:"unavailable"},cache_control:X0});break}if(Q0.type!=="json"){X.push({type:"other",message:`provider executed tool result output type ${Q0.type} for tool ${s.toolName} is not supported`});break}let e=await P8({value:Q0.value,schema:I74});u.push({type:"web_fetch_tool_result",tool_use_id:s.toolCallId,content:{type:"web_fetch_result",url:e.url,retrieved_at:e.retrievedAt,content:{type:"document",title:e.content.title,citations:e.content.citations,source:{type:e.content.source.type,media_type:e.content.source.mediaType,data:e.content.source.data}}},cache_control:X0});break}if(a==="web_search"){let Q0=s.output;if(Q0.type!=="json"){X.push({type:"other",message:`provider executed tool result output type ${Q0.type} for tool ${s.toolName} is not supported`});break}let e=await P8({value:Q0.value,schema:q74});u.push({type:"web_search_tool_result",tool_use_id:s.toolCallId,content:e.map((m)=>({url:m.url,title:m.title,page_age:m.pageAge,encrypted_content:m.encryptedContent,type:m.type})),cache_control:X0});break}if(a==="tool_search_tool_regex"||a==="tool_search_tool_bm25"){let Q0=s.output;if(Q0.type!=="json"){X.push({type:"other",message:`provider executed tool result output type ${Q0.type} for tool ${s.toolName} is not supported`});break}let m=(await P8({value:Q0.value,schema:j74})).map(($0)=>({type:"tool_reference",tool_name:$0.toolName}));u.push({type:"tool_search_tool_result",tool_use_id:s.toolCallId,content:{type:"tool_search_tool_search_result",tool_references:m},cache_control:X0});break}X.push({type:"other",message:`provider executed tool result for tool ${s.toolName} is not supported`});break}}}}k.push({role:"assistant",content:u});break}default:throw Error(`content type: ${d}`)}}return{prompt:{system:C,messages:k},betas:I}}function xp8($){let Y=[],X=void 0;for(let G of $){let{role:J}=G;switch(J){case"system":{if((X==null?void 0:X.type)!=="system")X={type:"system",messages:[]},Y.push(X);X.messages.push(G);break}case"assistant":{if((X==null?void 0:X.type)!=="assistant")X={type:"assistant",messages:[]},Y.push(X);X.messages.push(G);break}case"user":{if((X==null?void 0:X.type)!=="user")X={type:"user",messages:[]},Y.push(X);X.messages.push(G);break}case"tool":{if((X==null?void 0:X.type)!=="user")X={type:"user",messages:[]},Y.push(X);X.messages.push(G);break}default:throw Error(`Unsupported role: ${J}`)}}return Y}function Iy0({finishReason:$,isJsonResponseFromTool:Y}){switch($){case"pause_turn":case"end_turn":case"stop_sequence":return"stop";case"refusal":return"content-filter";case"tool_use":return Y?"stop":"tool-calls";case"max_tokens":case"model_context_window_exceeded":return"length";case"compaction":return"other";default:return"other"}}function bp8($){return C74($)}function LD($){if(typeof $==="boolean"||!mp8($))return $;return C74($)}function C74($){let Y={},X=$;if($.$ref!=null)return{$ref:$.$ref};if($.$schema!=null)Y.$schema=$.$schema;if($.$id!=null)Y.$id=$.$id;if($.title!=null)Y.title=$.title;if($.description!=null)Y.description=$.description;if($.default!==void 0)Y.default=$.default;if($.const!==void 0)Y.const=$.const;if($.enum!=null)Y.enum=$.enum;if($.type!=null)Y.type=$.type;if($.anyOf!=null)Y.anyOf=$.anyOf.map(LD);else if($.oneOf!=null)Y.anyOf=$.oneOf.map(LD);if($.allOf!=null)Y.allOf=$.allOf.map(LD);if($.definitions!=null)Y.definitions=Object.fromEntries(Object.entries($.definitions).map(([J,Q])=>[J,LD(Q)]));if(X.$defs!=null){let J=Y;J.$defs=Object.fromEntries(Object.entries(X.$defs).map(([Q,W])=>[Q,LD(W)]))}if($.type==="object"||$.properties!=null){if($.properties!=null)Y.properties=Object.fromEntries(Object.entries($.properties).map(([J,Q])=>[J,LD(Q)]));if(Y.additionalProperties=!1,$.required!=null)Y.required=$.required}if($.items!=null)Y.items=Array.isArray($.items)?$.items.map(LD):LD($.items);if(typeof $.format==="string"&&T74.has($.format))Y.format=$.format;let G=hp8($);if(G!=null)Y.description=Y.description==null?G:`${Y.description}
${G}`;return Y}function hp8($){let Y=yp8.flatMap((X)=>{let G=$[X];if(G==null||G===!1)return[];return`${fp8(X)}: ${gp8(G)}`});if(typeof $.format==="string"&&!T74.has($.format))Y.push(`format: ${$.format}`);return Y.length===0?void 0:`${Y.join("; ")}.`}function fp8($){return $.replace(/[A-Z]/g,(Y)=>` ${Y.toLowerCase()}`)}function gp8($){if(typeof $==="string")return $;return JSON.stringify($)}function mp8($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function V94($,Y,X){var G;if($.type==="web_search_result_location")return{type:"source",sourceType:"url",id:X(),url:$.url,title:$.title,providerMetadata:{anthropic:{citedText:$.cited_text,encryptedIndex:$.encrypted_index}}};if($.type!=="page_location"&&$.type!=="char_location")return;let J=Y[$.document_index];if(!J)return;return{type:"source",sourceType:"document",id:X(),mediaType:J.mediaType,title:(G=$.document_title)!=null?G:J.title,filename:J.filename,providerMetadata:{anthropic:$.type==="page_location"?{citedText:$.cited_text,startPageNumber:$.start_page_number,endPageNumber:$.end_page_number}:{citedText:$.cited_text,startCharIndex:$.start_char_index,endCharIndex:$.end_char_index}}}}function pp8($){if($.includes("claude-opus-4-7"))return{maxOutputTokens:128000,supportsStructuredOutput:!0,rejectsSamplingParameters:!0,isKnownModel:!0};else if($.includes("claude-sonnet-4-6")||$.includes("claude-opus-4-6"))return{maxOutputTokens:128000,supportsStructuredOutput:!0,rejectsSamplingParameters:!1,isKnownModel:!0};else if($.includes("claude-sonnet-4-5")||$.includes("claude-opus-4-5")||$.includes("claude-haiku-4-5"))return{maxOutputTokens:64000,supportsStructuredOutput:!0,rejectsSamplingParameters:!1,isKnownModel:!0};else if($.includes("claude-opus-4-1"))return{maxOutputTokens:32000,supportsStructuredOutput:!0,rejectsSamplingParameters:!1,isKnownModel:!0};else if($.includes("claude-sonnet-4-"))return{maxOutputTokens:64000,supportsStructuredOutput:!1,rejectsSamplingParameters:!1,isKnownModel:!0};else if($.includes("claude-opus-4-"))return{maxOutputTokens:32000,supportsStructuredOutput:!1,rejectsSamplingParameters:!1,isKnownModel:!0};else if($.includes("claude-3-haiku"))return{maxOutputTokens:4096,supportsStructuredOutput:!1,rejectsSamplingParameters:!1,isKnownModel:!0};else return{maxOutputTokens:4096,supportsStructuredOutput:!1,rejectsSamplingParameters:!1,isKnownModel:!1}}function A94($){if(!$)return!1;let Y=!1,X=!1;for(let G of $){if("type"in G&&(G.type==="web_fetch_20260209"||G.type==="web_search_20260209")){Y=!0;continue}if(G.name==="code_execution"){X=!0;break}}return Y&&!X}function F94($){return $?{appliedEdits:$.applied_edits.map((Y)=>{switch(Y.type){case"clear_tool_uses_20250919":return{type:Y.type,clearedToolUses:Y.cleared_tool_uses,clearedInputTokens:Y.cleared_input_tokens};case"clear_thinking_20251015":return{type:Y.type,clearedThinkingTurns:Y.cleared_thinking_turns,clearedInputTokens:Y.cleared_input_tokens};case"compact_20260112":return{type:Y.type}}}).filter((Y)=>Y!==void 0)}:null}function UV($={}){var Y,X;let G=(Y=EE(X74({settingValue:$.baseURL,environmentVariableName:"ANTHROPIC_BASE_URL"})))!=null?Y:"https://api.anthropic.com/v1",J=(X=$.name)!=null?X:"anthropic.messages";if($.apiKey&&$.authToken)throw new ny0({argument:"apiKey/authToken",message:"Both apiKey and authToken were provided. Please use only one authentication method."});let Q=()=>{let K=$.authToken?{Authorization:`Bearer ${$.authToken}`}:{"x-api-key":BE({apiKey:$.apiKey,environmentVariableName:"ANTHROPIC_API_KEY",description:"Anthropic"})};return KV({"anthropic-version":"2023-06-01",...K,...$.headers},`ai-sdk/anthropic/${cu8}`)},W=(K)=>{var H;return new up8(K,{provider:J,baseURL:G,headers:Q,fetch:$.fetch,generateId:(H=$.generateId)!=null?H:X9,supportedUrls:()=>({"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]})})},Z=function(K){if(new.target)throw Error("The Anthropic model function cannot be called with the new keyword.");return W(K)};return Z.specificationVersion="v3",Z.languageModel=W,Z.chat=W,Z.messages=W,Z.embeddingModel=(K)=>{throw new NE({modelId:K,modelType:"embeddingModel"})},Z.textEmbeddingModel=Z.embeddingModel,Z.imageModel=(K)=>{throw new NE({modelId:K,modelType:"imageModel"})},Z.tools=zd8,Z}function D94($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Q=(Y=$.promptTokenCount)!=null?Y:0,W=(X=$.candidatesTokenCount)!=null?X:0,Z=(G=$.cachedContentTokenCount)!=null?G:0,K=(J=$.thoughtsTokenCount)!=null?J:0;return{inputTokens:{total:Q,noCache:Q-Z,cacheRead:Z,cacheWrite:void 0},outputTokens:{total:W+K,text:W,reasoning:K},raw:$}}function dK($,Y=!0){if($==null)return;if(Od8($)){if(Y)return;if(typeof $==="object"&&$.description)return{type:"object",description:$.description};return{type:"object"}}if(typeof $==="boolean")return{type:"boolean",properties:{}};let{type:X,description:G,required:J,properties:Q,items:W,allOf:Z,anyOf:K,oneOf:H,format:z,const:V,minLength:A,enum:F}=$,N={};if(G)N.description=G;if(J)N.required=J;if(z)N.format=z;if(V!==void 0)N.enum=[V];if(X)if(Array.isArray(X)){let D=X.includes("null"),L=X.filter((B)=>B!=="null");if(L.length===0)N.type="null";else if(N.anyOf=L.map((B)=>({type:B})),D)N.nullable=!0}else N.type=X;if(F!==void 0)N.enum=F;if(Q!=null)N.properties=Object.entries(Q).reduce((D,[L,B])=>{return D[L]=dK(B,!1),D},{});if(W)N.items=Array.isArray(W)?W.map((D)=>dK(D,!1)):dK(W,!1);if(Z)N.allOf=Z.map((D)=>dK(D,!1));if(K)if(K.some((D)=>typeof D==="object"&&(D==null?void 0:D.type)==="null")){let D=K.filter((L)=>!(typeof L==="object"&&(L==null?void 0:L.type)==="null"));if(D.length===1){let L=dK(D[0],!1);if(typeof L==="object")N.nullable=!0,Object.assign(N,L)}else N.anyOf=D.map((L)=>dK(L,!1)),N.nullable=!0}else N.anyOf=K.map((D)=>dK(D,!1));if(H)N.oneOf=H.map((D)=>dK(D,!1));if(A!==void 0)N.minLength=A;return N}function Od8($){return $!=null&&typeof $==="object"&&$.type==="object"&&($.properties==null||Object.keys($.properties).length===0)&&!$.additionalProperties}function Md8($){let Y=Ed8.exec($);if(Y==null)return;return{mediaType:Y[1],data:Y[2]}}function Rd8($){let Y=Md8($);if(Y==null)return;return{inlineData:{mimeType:Y.mediaType,data:Y.data}}}function qd8($,Y,X){let G=[],J=[];for(let Q of X)switch(Q.type){case"text":{J.push(Q.text);break}case"image-data":case"file-data":{G.push({inlineData:{mimeType:Q.mediaType,data:Q.data}});break}case"image-url":case"file-url":{let W=Rd8(Q.url);if(W!=null)G.push(W);else J.push(JSON.stringify(Q));break}default:{J.push(JSON.stringify(Q));break}}$.push({functionResponse:{name:Y,response:{name:Y,content:J.length>0?J.join(`
`):"Tool executed successfully."},...G.length>0?{parts:G}:{}}})}function Id8($,Y,X){for(let G of X)switch(G.type){case"text":$.push({functionResponse:{name:Y,response:{name:Y,content:G.text}}});break;case"image-data":$.push({inlineData:{mimeType:String(G.mediaType),data:String(G.data)}},{text:"Tool executed successfully and returned this image as a response"});break;default:$.push({text:JSON.stringify(G)});break}}function Pd8($,Y){var X,G,J,Q,W,Z,K,H;let z=[],V=[],A=!0,F=(X=Y==null?void 0:Y.isGemmaModel)!=null?X:!1,N=(G=Y==null?void 0:Y.providerOptionsName)!=null?G:"google",D=(J=Y==null?void 0:Y.supportsFunctionResponseParts)!=null?J:!0;for(let{role:L,content:B}of $)switch(L){case"system":{if(!A)throw new d5({functionality:"system messages are only supported at the beginning of the conversation"});z.push({text:B});break}case"user":{A=!1;let O=[];for(let E of B)switch(E.type){case"text":{O.push({text:E.text});break}case"file":{let M=E.mediaType==="image/*"?"image/jpeg":E.mediaType;O.push(E.data instanceof URL?{fileData:{mimeType:M,fileUri:E.data.toString()}}:{inlineData:{mimeType:M,data:nY(E.data)}});break}}V.push({role:"user",parts:O});break}case"assistant":{A=!1,V.push({role:"model",parts:B.map((O)=>{var E,M,R,q;let w=(q=(E=O.providerOptions)==null?void 0:E[N])!=null?q:N!=="google"?(M=O.providerOptions)==null?void 0:M.google:(R=O.providerOptions)==null?void 0:R.vertex,I=(w==null?void 0:w.thoughtSignature)!=null?String(w.thoughtSignature):void 0;switch(O.type){case"text":return O.text.length===0?void 0:{text:O.text,thoughtSignature:I};case"reasoning":return O.text.length===0?void 0:{text:O.text,thought:!0,thoughtSignature:I};case"file":{if(O.data instanceof URL)throw new d5({functionality:"File data URLs in assistant messages are not supported"});return{inlineData:{mimeType:O.mediaType,data:nY(O.data)},...(w==null?void 0:w.thought)===!0?{thought:!0}:{},thoughtSignature:I}}case"tool-call":{let P=(w==null?void 0:w.serverToolCallId)!=null?String(w.serverToolCallId):void 0,_=(w==null?void 0:w.serverToolType)!=null?String(w.serverToolType):void 0;if(P&&_)return{toolCall:{toolType:_,args:typeof O.input==="string"?JSON.parse(O.input):O.input,id:P},thoughtSignature:I};return{functionCall:{name:O.toolName,args:O.input},thoughtSignature:I}}case"tool-result":{let P=(w==null?void 0:w.serverToolCallId)!=null?String(w.serverToolCallId):void 0,_=(w==null?void 0:w.serverToolType)!=null?String(w.serverToolType):void 0;if(P&&_)return{toolResponse:{toolType:_,response:O.output.type==="json"?O.output.value:{},id:P},thoughtSignature:I};return}}}).filter((O)=>O!==void 0)});break}case"tool":{A=!1;let O=[];for(let E of B){if(E.type==="tool-approval-response")continue;let M=(K=(Q=E.providerOptions)==null?void 0:Q[N])!=null?K:N!=="google"?(W=E.providerOptions)==null?void 0:W.google:(Z=E.providerOptions)==null?void 0:Z.vertex,R=(M==null?void 0:M.serverToolCallId)!=null?String(M.serverToolCallId):void 0,q=(M==null?void 0:M.serverToolType)!=null?String(M.serverToolType):void 0;if(R&&q){let I=(M==null?void 0:M.thoughtSignature)!=null?String(M.thoughtSignature):void 0;if(V.length>0){let P=V[V.length-1];if(P.role==="model"){P.parts.push({toolResponse:{toolType:q,response:E.output.type==="json"?E.output.value:{},id:R},thoughtSignature:I});continue}}}let w=E.output;if(w.type==="content")if(D)qd8(O,E.toolName,w.value);else Id8(O,E.toolName,w.value);else O.push({functionResponse:{name:E.toolName,response:{name:E.toolName,content:w.type==="execution-denied"?(H=w.reason)!=null?H:"Tool execution denied.":w.value}}})}V.push({role:"user",parts:O});break}}if(F&&z.length>0&&V.length>0&&V[0].role==="user"){let L=z.map((B)=>B.text).join(`

`);V[0].parts.unshift({text:L+`

`})}return{systemInstruction:z.length>0&&!F?{parts:z}:void 0,contents:V}}function N94($){return $.includes("/")?$:`models/${$}`}function _d8({tools:$,toolChoice:Y,modelId:X,isVertexProvider:G=!1}){var J,Q;$=($==null?void 0:$.length)?$:void 0;let W=[],Z=["gemini-flash-latest","gemini-flash-lite-latest","gemini-pro-latest"].some((L)=>L===X),K=X.includes("gemini-2")||X.includes("gemini-3")||X.includes("nano-banana")||Z,H=X.includes("gemini-3"),z=X.includes("gemini-2.5")||X.includes("gemini-3");if($==null)return{tools:void 0,toolConfig:void 0,toolWarnings:W};let V=$.some((L)=>L.type==="function"),A=$.some((L)=>L.type==="provider");if(V&&A&&!H)W.push({type:"unsupported",feature:"combination of function and provider-defined tools"});if(A){let L=[];if($.filter((O)=>O.type==="provider").forEach((O)=>{switch(O.id){case"google.google_search":if(K)L.push({googleSearch:{...O.args}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"Google Search requires Gemini 2.0 or newer."});break;case"google.enterprise_web_search":if(K)L.push({enterpriseWebSearch:{}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"Enterprise Web Search requires Gemini 2.0 or newer."});break;case"google.url_context":if(K)L.push({urlContext:{}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"The URL context tool is not supported with other Gemini models than Gemini 2."});break;case"google.code_execution":if(K)L.push({codeExecution:{}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"The code execution tool is not supported with other Gemini models than Gemini 2."});break;case"google.file_search":if(z)L.push({fileSearch:{...O.args}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"The file search tool is only supported with Gemini 2.5 models and Gemini 3 models."});break;case"google.vertex_rag_store":if(K)L.push({retrieval:{vertex_rag_store:{rag_resources:{rag_corpus:O.args.ragCorpus},similarity_top_k:O.args.topK}}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"The RAG store tool is not supported with other Gemini models than Gemini 2."});break;case"google.google_maps":if(K)L.push({googleMaps:{}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"The Google Maps grounding tool is not supported with Gemini models other than Gemini 2 or newer."});break;default:W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`});break}}),V&&H&&L.length>0){let O=[];for(let M of $)if(M.type==="function")O.push({name:M.name,description:(J=M.description)!=null?J:"",parameters:dK(M.inputSchema)});let E={functionCallingConfig:{mode:"VALIDATED"},...!G&&{includeServerSideToolInvocations:!0}};if(Y!=null)switch(Y.type){case"auto":break;case"none":E.functionCallingConfig={mode:"NONE"};break;case"required":E.functionCallingConfig={mode:"ANY"};break;case"tool":E.functionCallingConfig={mode:"ANY",allowedFunctionNames:[Y.toolName]};break}return{tools:[...L,{functionDeclarations:O}],toolConfig:E,toolWarnings:W}}return{tools:L.length>0?L:void 0,toolConfig:void 0,toolWarnings:W}}let F=[],N=!1;for(let L of $)switch(L.type){case"function":if(F.push({name:L.name,description:(Q=L.description)!=null?Q:"",parameters:dK(L.inputSchema)}),L.strict===!0)N=!0;break;default:W.push({type:"unsupported",feature:`function tool ${L.name}`});break}if(Y==null)return{tools:[{functionDeclarations:F}],toolConfig:N?{functionCallingConfig:{mode:"VALIDATED"}}:void 0,toolWarnings:W};let D=Y.type;switch(D){case"auto":return{tools:[{functionDeclarations:F}],toolConfig:{functionCallingConfig:{mode:N?"VALIDATED":"AUTO"}},toolWarnings:W};case"none":return{tools:[{functionDeclarations:F}],toolConfig:{functionCallingConfig:{mode:"NONE"}},toolWarnings:W};case"required":return{tools:[{functionDeclarations:F}],toolConfig:{functionCallingConfig:{mode:N?"VALIDATED":"ANY"}},toolWarnings:W};case"tool":return{tools:[{functionDeclarations:F}],toolConfig:{functionCallingConfig:{mode:N?"VALIDATED":"ANY",allowedFunctionNames:[Y.toolName]}},toolWarnings:W};default:throw new d5({functionality:`tool choice type: ${D}`})}}function Td8($){let Y=[];for(let X of $.split(".")){let G=X.indexOf("[");if(G===-1)Y.push(X);else{if(G>0)Y.push(X.slice(0,G));for(let J of X.matchAll(/\[(\d+)\]/g))Y.push(parseInt(J[1],10))}}return Y}function Cd8($,Y){let X=$;for(let G of Y){if(X==null||typeof X!=="object")return;X=X[G]}return X}function B94($,Y,X){let G=$;for(let J=0;J<Y.length-1;J++){let Q=Y[J],W=Y[J+1];if(G[Q]==null)G[Q]=typeof W==="number"?[]:{};G=G[Q]}G[Y[Y.length-1]]=X}function Sd8($){var Y,X;let G=(X=(Y=$.stringValue)!=null?Y:$.numberValue)!=null?X:$.boolValue;if(G!=null)return{value:G,json:JSON.stringify(G)};if("nullValue"in $)return{value:null,json:"null"};return}function O94({finishReason:$,hasToolCalls:Y}){switch($){case"STOP":return Y?"tool-calls":"stop";case"MAX_TOKENS":return"length";case"IMAGE_SAFETY":case"RECITATION":case"SAFETY":case"BLOCKLIST":case"PROHIBITED_CONTENT":case"SPII":return"content-filter";case"MALFORMED_FUNCTION_CALL":return"error";case"FINISH_REASON_UNSPECIFIED":case"OTHER":default:return"other"}}function E94({groundingMetadata:$,generateId:Y}){var X,G,J,Q,W,Z;if(!($==null?void 0:$.groundingChunks))return;let K=[];for(let H of $.groundingChunks)if(H.web!=null)K.push({type:"source",sourceType:"url",id:Y(),url:H.web.uri,title:(X=H.web.title)!=null?X:void 0});else if(H.image!=null)K.push({type:"source",sourceType:"url",id:Y(),url:H.image.sourceUri,title:(G=H.image.title)!=null?G:void 0});else if(H.retrievedContext!=null){let z=H.retrievedContext.uri,V=H.retrievedContext.fileSearchStore;if(z&&(z.startsWith("http://")||z.startsWith("https://")))K.push({type:"source",sourceType:"url",id:Y(),url:z,title:(J=H.retrievedContext.title)!=null?J:void 0});else if(z){let A=(Q=H.retrievedContext.title)!=null?Q:"Unknown Document",F="application/octet-stream",N=void 0;if(z.endsWith(".pdf"))F="application/pdf",N=z.split("/").pop();else if(z.endsWith(".txt"))F="text/plain",N=z.split("/").pop();else if(z.endsWith(".docx"))F="application/vnd.openxmlformats-officedocument.wordprocessingml.document",N=z.split("/").pop();else if(z.endsWith(".doc"))F="application/msword",N=z.split("/").pop();else if(z.match(/\.(md|markdown)$/))F="text/markdown",N=z.split("/").pop();else N=z.split("/").pop();K.push({type:"source",sourceType:"document",id:Y(),mediaType:F,title:A,filename:N})}else if(V){let A=(W=H.retrievedContext.title)!=null?W:"Unknown Document";K.push({type:"source",sourceType:"document",id:Y(),mediaType:"application/octet-stream",title:A,filename:V.split("/").pop()})}}else if(H.maps!=null){if(H.maps.uri)K.push({type:"source",sourceType:"url",id:Y(),url:H.maps.uri,title:(Z=H.maps.title)!=null?Z:void 0})}return K.length>0?K:void 0}function R94($){return $.startsWith("gemini-")}function Gb0($){var Y,X,G,J,Q,W,Z,K;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let H=(Y=$.total_input_tokens)!=null?Y:0,z=(X=$.total_output_tokens)!=null?X:0,V=(G=$.total_thought_tokens)!=null?G:0,A=(J=$.total_cached_tokens)!=null?J:0;return{inputTokens:{total:(Q=$.total_input_tokens)!=null?Q:void 0,noCache:$.total_input_tokens==null?void 0:H-A,cacheRead:(W=$.total_cached_tokens)!=null?W:void 0,cacheWrite:void 0},outputTokens:{total:$.total_output_tokens==null&&$.total_thought_tokens==null?void 0:z+V,text:(Z=$.total_output_tokens)!=null?Z:void 0,reasoning:(K=$.total_thought_tokens)!=null?K:void 0},raw:$}}function b74($){let Y=$.toLowerCase();for(let[X,G]of Object.entries(td8))if(Y.endsWith(`.${X}`))return G;return"application/octet-stream"}function h74($){let Y=$.split("/"),X=Y[Y.length-1];return X&&X.length>0?X:void 0}function ed8({annotation:$,generateId:Y}){var X,G,J,Q,W;switch($.type){case"url_citation":{let Z=$;if(Z.url==null||Z.url.length===0)return;return{type:"source",sourceType:"url",id:Y(),url:Z.url,...Z.title!=null?{title:Z.title}:{}}}case"file_citation":{let Z=$,K=(G=(X=Z.document_uri)!=null?X:Z.source)!=null?G:Z.file_name;if(K==null||K.length===0)return;if(K.startsWith("http://")||K.startsWith("https://"))return{type:"source",sourceType:"url",id:Y(),url:K,...Z.file_name!=null?{title:Z.file_name}:{}};let H=(J=Z.file_name)!=null?J:h74(K),z=b74(K);return{type:"source",sourceType:"document",id:Y(),mediaType:z,title:(W=(Q=Z.file_name)!=null?Q:H)!=null?W:K,...H!=null?{filename:H}:{}}}case"place_citation":{let Z=$;if(Z.url==null||Z.url.length===0)return;return{type:"source",sourceType:"url",id:Y(),url:Z.url,...Z.name!=null?{title:Z.name}:{}}}default:return}}function f74({block:$,generateId:Y}){var X,G,J,Q,W,Z,K,H,z,V,A;let F=[];switch($.type){case"url_context_result":{let N=(X=$.result)!=null?X:[];for(let D of N){if((D==null?void 0:D.url)==null||D.url.length===0)continue;if(D.status!=null&&D.status!=="success")continue;F.push({type:"source",sourceType:"url",id:Y(),url:D.url})}break}case"google_search_result":{let N=(G=$.result)!=null?G:[];for(let D of N){let L=D==null?void 0:D.url;if(L==null||L.length===0)continue;F.push({type:"source",sourceType:"url",id:Y(),url:L,...D.title!=null?{title:D.title}:{}})}break}case"google_maps_result":{let N=(J=$.result)!=null?J:[];for(let D of N)for(let L of(Q=D.places)!=null?Q:[]){if(L.url==null||L.url.length===0)continue;F.push({type:"source",sourceType:"url",id:Y(),url:L.url,...L.name!=null?{title:L.name}:{}})}break}case"file_search_result":{let N=(W=$.result)!=null?W:[];for(let D of N){if(D==null||typeof D!=="object")continue;let L=D,B=(K=(Z=L.document_uri)!=null?Z:L.source)!=null?K:L.file_name;if(B==null||B.length===0)continue;if(B.startsWith("http://")||B.startsWith("https://")){F.push({type:"source",sourceType:"url",id:Y(),url:B,...L.title!=null?{title:L.title}:{}});continue}let O=(H=L.file_name)!=null?H:h74(B),E=b74(B);F.push({type:"source",sourceType:"document",id:Y(),mediaType:E,title:(A=(V=(z=L.title)!=null?z:L.file_name)!=null?V:O)!=null?A:B,...O!=null?{filename:O}:{}})}break}}return F}function hy0({annotations:$,generateId:Y}){var X;if($==null)return[];let G=new Set,J=[];for(let Q of $){let W=ed8({annotation:Q,generateId:Y});if(W==null)continue;let Z=W.sourceType==="url"?`url:${W.url}`:`doc:${(X=W.filename)!=null?X:W.title}`;if(G.has(Z))continue;G.add(Z),J.push(W)}return J}function Jb0({status:$,hasFunctionCall:Y}){switch($){case"completed":return Y?"tool-calls":"stop";case"requires_action":return"tool-calls";case"failed":return"error";case"incomplete":return"length";case"cancelled":return"other";case"in_progress":default:return"other"}}function Xc8($){return $.replace(/_call$/,"")}function Gc8($){return $.replace(/_result$/,"")}function Jc8({warnings:$,generateId:Y,includeRawChunks:X,serviceTier:G}){let J,Q,W=G,Z,K=!1,H=new Map,z=new Set;function V(A){var F;return A.sourceType==="url"?`url:${A.url}`:`doc:${(F=A.filename)!=null?F:A.title}`}return new TransformStream({start(A){A.enqueue({type:"stream-start",warnings:$})},transform(A,F){var N,D,L,B,O,E,M,R,q,w,I,P,_,C,k,S;if(X)F.enqueue({type:"raw",rawValue:A.rawValue});if(!A.success){Z="failed",F.enqueue({type:"error",error:A.error});return}let T=A.value;switch(T.event_type){case"interaction.start":{let y=T.interaction;J=(y==null?void 0:y.id)!=null&&y.id.length>0?y.id:void 0;let d=y==null?void 0:y.created,u;if(typeof d==="string"){let b=new Date(d);if(!Number.isNaN(b.getTime()))u=b}F.enqueue({type:"response-metadata",...J!=null?{id:J}:{},modelId:y==null?void 0:y.model,...u?{timestamp:u}:{}});break}case"content.start":{let x=T,y=x.content,d=x.index,u=`${J!=null?J:"interaction"}:${d}`;if((y==null?void 0:y.type)==="text"){H.set(d,{kind:"text",id:u,emittedSourceKeys:new Set}),F.enqueue({type:"text-start",id:u});let b=hy0({annotations:y.annotations,generateId:Y});for(let g of b){let p=V(g);if(z.has(p))continue;z.add(p),F.enqueue(g)}}else if((y==null?void 0:y.type)==="image"){let b=y;H.set(d,{kind:"image",id:u,...b.data!=null?{data:b.data}:{},...b.mime_type!=null?{mimeType:b.mime_type}:{},...b.uri!=null?{uri:b.uri}:{}})}else if((y==null?void 0:y.type)==="thought"){let b=y.signature;H.set(d,{kind:"reasoning",id:u,...b!=null?{signature:b}:{}}),F.enqueue({type:"reasoning-start",id:u})}else if((y==null?void 0:y.type)==="function_call"){let b=y,g=(N=b.id)!=null?N:u;K=!0;let p={kind:"function_call",id:u,toolCallId:g,toolName:b.name,arguments:(D=b.arguments)!=null?D:{},...b.signature!=null?{signature:b.signature}:{},startEmitted:!1};if(H.set(d,p),p.toolName!=null)F.enqueue({type:"tool-input-start",id:g,toolName:p.toolName}),p.startEmitted=!0}else if((y==null?void 0:y.type)!=null&&$c8.has(y.type)){let b=y.type==="mcp_server_tool_call"?(L=y.name)!=null?L:"mcp_server_tool":Xc8(y.type),g=(B=y.id)!=null?B:u,p={kind:"builtin_tool_call",id:u,blockType:y.type,toolCallId:g,toolName:b,arguments:(O=y.arguments)!=null?O:{},callEmitted:!1};H.set(d,p)}else if((y==null?void 0:y.type)!=null&&Yc8.has(y.type)){let b=y.type==="mcp_server_tool_result"?(E=y.name)!=null?E:"mcp_server_tool":Gc8(y.type),g=(M=y.call_id)!=null?M:u,p={kind:"builtin_tool_result",id:u,blockType:y.type,callId:g,toolName:b,result:(R=y.result)!=null?R:null,...y.is_error!=null?{isError:y.is_error}:{},resultEmitted:!1};H.set(d,p)}else H.set(d,{kind:"unknown",id:u});break}case"content.delta":{let x=T,y=H.get(x.index);if(y==null)break;let d=x.delta;if(y.kind==="text"&&(d==null?void 0:d.type)==="text"){let u=(q=d.text)!=null?q:"";if(u.length>0)F.enqueue({type:"text-delta",id:y.id,delta:u})}else if(y.kind==="text"&&(d==null?void 0:d.type)==="text_annotation"){let u=hy0({annotations:d.annotations,generateId:Y});for(let b of u){let g=V(b);if(z.has(g))continue;z.add(g),y.emittedSourceKeys.add(g),F.enqueue(b)}}else if(y.kind==="image"&&(d==null?void 0:d.type)==="image"){if(d.data!=null)y.data=d.data;if(d.mime_type!=null)y.mimeType=d.mime_type;if(d.uri!=null)y.uri=d.uri}else if(y.kind==="reasoning"){if((d==null?void 0:d.type)==="thought_summary"){let u=d.content;if((u==null?void 0:u.type)==="text"&&typeof u.text==="string")F.enqueue({type:"reasoning-delta",id:y.id,delta:u.text})}else if((d==null?void 0:d.type)==="thought_signature"){let u=d.signature;if(u!=null)y.signature=u}}else if(y.kind==="function_call"&&(d==null?void 0:d.type)==="function_call"){if(d.id!=null)y.toolCallId=d.id;if(d.name!=null)y.toolName=d.name;if(d.arguments!=null)y.arguments=d.arguments;if(d.signature!=null)y.signature=d.signature;if(!y.startEmitted&&y.toolName!=null)F.enqueue({type:"tool-input-start",id:y.toolCallId,toolName:y.toolName}),y.startEmitted=!0;K=!0}else if(y.kind==="builtin_tool_call"&&(d==null?void 0:d.type)===y.blockType){if(d.id!=null)y.toolCallId=d.id;if(d.arguments!=null)y.arguments=d.arguments;if(d.name!=null&&y.blockType==="mcp_server_tool_call")y.toolName=d.name}else if(y.kind==="builtin_tool_result"&&(d==null?void 0:d.type)===y.blockType){if(d.call_id!=null)y.callId=d.call_id;if(d.result!==void 0)y.result=d.result;if(d.is_error!=null)y.isError=d.is_error;if(d.name!=null&&y.blockType==="mcp_server_tool_result")y.toolName=d.name}break}case"content.stop":{let x=T,y=H.get(x.index);if(y==null)break;if(y.kind==="text"){let d=J!=null?{google:{interactionId:J}}:void 0;F.enqueue({type:"text-end",id:y.id,...d?{providerMetadata:d}:{}})}else if(y.kind==="reasoning"){let d={};if(y.signature!=null)d.signature=y.signature;if(J!=null)d.interactionId=J;let u=Object.keys(d).length>0?{google:d}:void 0;F.enqueue({type:"reasoning-end",id:y.id,...u?{providerMetadata:u}:{}})}else if(y.kind==="image"){let d={};if(J!=null)d.interactionId=J;let u=Object.keys(d).length>0?{google:d}:void 0;if(y.data!=null&&y.data.length>0)F.enqueue({type:"file",mediaType:(w=y.mimeType)!=null?w:"image/png",data:y.data,...u?{providerMetadata:u}:{}});else if(y.uri!=null&&y.uri.length>0){let b={google:{...J!=null?{interactionId:J}:{},imageUri:y.uri}};F.enqueue({type:"file",mediaType:(I=y.mimeType)!=null?I:"image/png",data:"",providerMetadata:b})}}else if(y.kind==="function_call"){let d=(P=y.toolName)!=null?P:"unknown",u=JSON.stringify((_=y.arguments)!=null?_:{});if(!y.startEmitted)F.enqueue({type:"tool-input-start",id:y.toolCallId,toolName:d});F.enqueue({type:"tool-input-delta",id:y.toolCallId,delta:u}),F.enqueue({type:"tool-input-end",id:y.toolCallId});let b={};if(y.signature!=null)b.signature=y.signature;if(J!=null)b.interactionId=J;let g=Object.keys(b).length>0?{google:b}:void 0;F.enqueue({type:"tool-call",toolCallId:y.toolCallId,toolName:d,input:u,...g?{providerMetadata:g}:{}})}else if(y.kind==="builtin_tool_call"&&!y.callEmitted)F.enqueue({type:"tool-call",toolCallId:y.toolCallId,toolName:y.toolName,input:JSON.stringify((C=y.arguments)!=null?C:{}),providerExecuted:!0}),y.callEmitted=!0;else if(y.kind==="builtin_tool_result"&&!y.resultEmitted){F.enqueue({type:"tool-result",toolCallId:y.callId,toolName:y.toolName,result:(k=y.result)!=null?k:null}),y.resultEmitted=!0;let d=f74({block:{type:y.blockType,result:y.result},generateId:Y});for(let u of d){let b=V(u);if(z.has(b))continue;z.add(b),F.enqueue(u)}}H.delete(x.index);break}case"interaction.status_update":{Z=T.status;break}case"interaction.complete":{let y=T.interaction;if((y==null?void 0:y.id)!=null&&y.id.length>0)J=y.id;if((y==null?void 0:y.status)!=null)Z=y.status;if((y==null?void 0:y.usage)!=null)Q=y.usage;if((y==null?void 0:y.service_tier)!=null)W=y.service_tier;break}case"error":{let x=T;Z="failed";let y=(S=x.error)!=null?S:{message:"Unknown interaction error"};F.enqueue({type:"error",error:y});break}}},flush(A){let F={unified:Jb0({status:Z,hasFunctionCall:K}),raw:Z},N={google:{...J!=null?{interactionId:J}:{},...W!=null?{serviceTier:W}:{}}};A.enqueue({type:"finish",finishReason:F,usage:Gb0(Q),providerMetadata:N})}})}function g74($){let Y=$.indexOf("/");return Y===-1?$:$.substring(0,Y)}function k90($){let Y=$.indexOf("/");if(Y===-1)return!1;let X=$.substring(Y+1);return X.length>0&&X!=="*"}function Qc8({prompt:$,previousInteractionId:Y,store:X,mediaResolution:G}){var J,Q,W,Z,K,H,z;let V=[],A=Y!=null&&X===!1,F=Y!=null&&X!==!1;if(A)V.push({type:"other",message:"google.interactions: providerOptions.google.previousInteractionId was set together with store: false. These are incoherent (the prior interaction cannot be referenced when nothing was stored on the server); the full history will be sent and previous_interaction_id will still be emitted."});let N=F?Wc8({prompt:$,previousInteractionId:Y}):$,D=[],L=[];for(let E of N)switch(E.role){case"system":{D.push(E.content);break}case"user":{let M=[];for(let q of E.content)if(q.type==="text"){let w={type:"text",text:q.text};M.push(w)}else if(q.type==="file"){let w=I94({part:q,warnings:V,mediaResolution:G});if(w!=null)M.push(w)}let R=Uc8(M);if(R.length>0)L.push({role:"user",content:R});break}case"assistant":{let M=[];for(let R of E.content)if(R.type==="text")M.push({type:"text",text:R.text});else if(R.type==="reasoning"){let q=(Q=(J=R.providerOptions)==null?void 0:J.google)==null?void 0:Q.signature;M.push({type:"thought",...q!=null?{signature:q}:{},summary:R.text.length>0?[{type:"text",text:R.text}]:void 0})}else if(R.type==="file"){let q=I94({part:R,warnings:V,mediaResolution:G});if(q!=null)M.push(q)}else if(R.type==="tool-call"){let q=(Z=(W=R.providerOptions)==null?void 0:W.google)==null?void 0:Z.signature,w=typeof R.input==="string"?Zc8(R.input):(K=R.input)!=null?K:{};M.push({type:"function_call",id:R.toolCallId,name:R.toolName,arguments:w,...q!=null?{signature:q}:{}})}else V.push({type:"other",message:`google.interactions: unsupported assistant content part type "${R.type}"; part dropped.`});if(M.length>0)L.push({role:"model",content:M});break}case"tool":{let M=[];for(let R of E.content){if(R.type!=="tool-result"){V.push({type:"other",message:`google.interactions: unsupported tool message part type "${R.type}"; part dropped.`});continue}let q=Kc8({toolCallId:R.toolCallId,toolName:R.toolName,output:R.output,signature:(z=(H=R.providerOptions)==null?void 0:H.google)==null?void 0:z.signature,warnings:V});M.push(q)}if(M.length>0)L.push({role:"user",content:M});break}}let B=D.length>0?D.join(`

`):void 0,O;if(L.length===0)O="";else if(L.length===1&&L[0].role==="user"&&Array.isArray(L[0].content))O=L[0].content;else O=L;return{input:O,systemInstruction:B,warnings:V}}function I94({part:$,warnings:Y,mediaResolution:X}){let G=g74($.mediaType),J;switch(G){case"image":J="image";break;case"audio":J="audio";break;case"video":J="video";break;case"application":J="document";break;default:J=void 0}if(J==null){Y.push({type:"other",message:`google.interactions: unsupported file media type "${$.mediaType}"; part dropped.`});return}let Q=X!=null&&(J==="image"||J==="video")?{resolution:X}:{};if($.data instanceof URL)return{type:J,uri:$.data.toString(),...k90($.mediaType)?{mime_type:$.mediaType}:{},...Q};if(!k90($.mediaType)){Y.push({type:"other",message:`google.interactions: inline file data requires a full IANA media type (e.g. "image/png"), got "${$.mediaType}"; part dropped.`});return}return{type:J,data:nY($.data),mime_type:$.mediaType,...Q}}function Wc8({prompt:$,previousInteractionId:Y}){let X=[],G=new Set;for(let J of $){if(J.role==="assistant"){if(J.content.some((W)=>{var Z,K;return((K=(Z=W.providerOptions)==null?void 0:Z.google)==null?void 0:K.interactionId)===Y})){for(let W of J.content)if(W.type==="tool-call")G.add(W.toolCallId);continue}X.push(J);continue}if(J.role==="tool"){let Q=J.content.filter((W)=>{if(W.type!=="tool-result")return!0;return!G.has(W.toolCallId)});if(Q.length===0)continue;X.push({...J,content:Q});continue}X.push(J)}return X}function Zc8($){try{let Y=JSON.parse($);if(Y!=null&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{value:Y}}catch(Y){return{value:$}}}function Kc8({toolCallId:$,toolName:Y,output:X,signature:G,warnings:J}){var Q;let W={type:"function_result",call_id:$,name:Y,...G!=null?{signature:G}:{}};switch(X.type){case"text":return{...W,result:X.value};case"json":return{...W,result:JSON.stringify(X.value)};case"error-text":return{...W,is_error:!0,result:X.value};case"error-json":return{...W,is_error:!0,result:JSON.stringify(X.value)};case"execution-denied":return{...W,is_error:!0,result:(Q=X.reason)!=null?Q:"Tool execution denied by user."};case"content":{let Z=[];for(let K of X.value)if(K.type==="text")Z.push({type:"text",text:K.text});else if(K.type==="image-data"){let H=Py0({part:{mediaType:K.mediaType,data:K.data},warnings:J});if(H!=null)Z.push(H)}else if(K.type==="image-url"){let H=Py0({part:{mediaType:"image/*",data:new URL(K.url)},warnings:J});if(H!=null)Z.push(H)}else if(K.type==="file-data"||K.type==="file-url"){let H=K.type==="file-data"?K.mediaType:"application/*";if(g74(H)!=="image"){J.push({type:"other",message:`google.interactions: tool-result file with mediaType "${H}" is not supported (Interactions \`function_result.result\` accepts only text and image content); part dropped.`});continue}let V=Py0({part:K.type==="file-data"?{mediaType:K.mediaType,data:K.data}:{mediaType:H,data:new URL(K.url)},warnings:J});if(V!=null)Z.push(V)}else J.push({type:"other",message:`google.interactions: tool-result content part type "${K.type}" is not supported; part dropped.`});return{...W,result:Z}}}}function Py0({part:$,warnings:Y}){if($.data instanceof URL)return{type:"image",uri:$.data.toString(),...k90($.mediaType)?{mime_type:$.mediaType}:{}};if(!k90($.mediaType)){Y.push({type:"other",message:`google.interactions: tool-result image part requires a full IANA media type (e.g. "image/png"), got "${$.mediaType}"; part dropped.`});return}return{type:"image",data:nY($.data),mime_type:$.mediaType}}function Uc8($){if($.length<2)return $;let Y=[];for(let X of $){let G=Y[Y.length-1];if(X.type==="text"&&G!=null&&G.type==="text"&&G.annotations==null&&X.annotations==null){let J={type:"text",text:`${G.text}

${X.text}`};Y[Y.length-1]=J;continue}Y.push(X)}return Y}function P90({signature:$,interactionId:Y}){let X={};if($!=null)X.signature=$;if(Y!=null)X.interactionId=Y;return Object.keys(X).length>0?{providerMetadata:{google:X}}:{}}function Fc8($){return $.replace(/_call$/,"")}function Dc8($){return $.replace(/_result$/,"")}function l74({outputs:$,generateId:Y,interactionId:X}){var G,J,Q,W,Z,K,H,z,V,A;let F=[],N=!1;if($==null)return{content:F,hasFunctionCall:N};for(let D of $){if(D==null||typeof D!=="object")continue;let L=D.type;if(typeof L!=="string")continue;switch(L){case"text":{let B=(G=D.text)!=null?G:"",O=D.annotations;F.push({type:"text",text:B,...P90({interactionId:X})});let E=hy0({annotations:O,generateId:Y});for(let M of E)F.push(M);break}case"thought":{let B=D,E=(Array.isArray(B.summary)?B.summary:[]).filter((M)=>(M==null?void 0:M.type)==="text"&&typeof M.text==="string").map((M)=>M.text).join(`
`);F.push({type:"reasoning",text:E,...P90({signature:B.signature,interactionId:X})});break}case"image":{let B=D;if(B.data!=null&&B.data.length>0)F.push({type:"file",mediaType:(J=B.mime_type)!=null?J:"image/png",data:B.data,...P90({interactionId:X})});else if(B.uri!=null&&B.uri.length>0)F.push({type:"file",mediaType:(Q=B.mime_type)!=null?Q:"image/png",data:"",providerMetadata:{google:{...X!=null?{interactionId:X}:{},imageUri:B.uri}}});break}case"function_call":{N=!0;let B=D;F.push({type:"tool-call",toolCallId:B.id,toolName:B.name,input:JSON.stringify((W=B.arguments)!=null?W:{}),...P90({signature:B.signature,interactionId:X})});break}default:{if(Vc8.has(L)){let B=D,O=L==="mcp_server_tool_call"?(Z=B.name)!=null?Z:"mcp_server_tool":Fc8(L),E=JSON.stringify((K=B.arguments)!=null?K:{});F.push({type:"tool-call",toolCallId:(H=B.id)!=null?H:Y(),toolName:O,input:E,providerExecuted:!0})}else if(Ac8.has(L)){let B=D,O=L==="mcp_server_tool_result"?(z=B.name)!=null?z:"mcp_server_tool":Dc8(L);F.push({type:"tool-result",toolCallId:(V=B.call_id)!=null?V:Y(),toolName:O,result:(A=B.result)!=null?A:null});let E=f74({block:D,generateId:Y});for(let M of E)F.push(M)}break}}}return{content:F,hasFunctionCall:N}}function gy0($){return $!=null&&Nc8.has($)}async function P94({baseURL:$,interactionId:Y,headers:X,fetch:G,abortSignal:J,initialDelayMs:Q=Lc8,maxDelayMs:W=Bc8,timeoutMs:Z=Oc8}){if(Y==null||Y.length===0)throw Error("google.interactions: cannot poll a background interaction without an id. The POST response did not include an interaction id.");let K=Date.now(),H=Q,z=`${$}/interactions/${encodeURIComponent(Y)}`;while(!0){if(J==null?void 0:J.aborted)throw new DOMException("Polling was aborted","AbortError");if(Date.now()-K>Z)throw Error(`google.interactions: timed out polling interaction ${Y} after ${Z}ms.`);await l90(H,{abortSignal:J});let{value:V,rawValue:A,responseHeaders:F}=await Nm({url:z,headers:X,failedResponseHandler:iK,successfulResponseHandler:T5(fy0),abortSignal:J,fetch:G});if(gy0(V.status))return{response:V,rawResponse:A,responseHeaders:F};H=Math.min(H*2,W)}}function Ec8({tools:$,toolChoice:Y}){var X,G,J,Q;let W=[],Z=($==null?void 0:$.length)?$:void 0;if(Z==null)return{tools:void 0,toolChoice:void 0,toolWarnings:W};let K=[];for(let V of Z){if(V.type==="function"){K.push({type:"function",name:V.name,description:(X=V.description)!=null?X:"",parameters:V.inputSchema});continue}if(V.type==="provider"){let A=(G=V.args)!=null?G:{};switch(V.id){case"google.google_search":{let F=A.searchTypes,N;if(F!=null&&typeof F==="object"){let D=[];if(F.webSearch!=null)D.push("web_search");if(F.imageSearch!=null)D.push("image_search");if(D.length>0)N=D}K.push({type:"google_search",...N!=null?{search_types:N}:{}});break}case"google.code_execution":{K.push({type:"code_execution"});break}case"google.url_context":{K.push({type:"url_context"});break}case"google.file_search":{K.push({type:"file_search",...A.fileSearchStoreNames!=null?{file_search_store_names:A.fileSearchStoreNames}:{},...A.topK!=null?{top_k:A.topK}:{},...A.metadataFilter!=null?{metadata_filter:A.metadataFilter}:{}});break}case"google.google_maps":{K.push({type:"google_maps",...A.latitude!=null?{latitude:A.latitude}:{},...A.longitude!=null?{longitude:A.longitude}:{},...A.enableWidget!=null?{enable_widget:A.enableWidget}:{}});break}case"google.computer_use":{K.push({type:"computer_use",environment:(J=A.environment)!=null?J:"browser",...A.excludedPredefinedFunctions!=null?{excludedPredefinedFunctions:A.excludedPredefinedFunctions}:{}});break}case"google.mcp_server":{K.push({type:"mcp_server",...A.name!=null?{name:A.name}:{},...A.url!=null?{url:A.url}:{},...A.headers!=null?{headers:A.headers}:{},...A.allowedTools!=null?{allowed_tools:A.allowedTools}:{}});break}case"google.retrieval":{let F=(Q=A.vertexAiSearchConfig)!=null?Q:void 0;K.push({type:"retrieval",...A.retrievalTypes!=null?{retrieval_types:A.retrievalTypes}:{retrieval_types:["vertex_ai_search"]},...F!=null?{vertex_ai_search_config:F}:{}});break}default:{W.push({type:"unsupported",feature:`provider-defined tool ${V.id}`,details:`provider-defined tool ${V.id} is not supported by google.interactions; tool dropped.`});break}}continue}W.push({type:"unsupported",feature:`tool of type ${V.type}`,details:"Only function tools and google.* provider-defined tools are supported by google.interactions; tool dropped."})}let H=K.some((V)=>V.type==="function"),z;if(Y!=null&&H)switch(Y.type){case"auto":z="auto";break;case"required":z="any";break;case"none":z="none";break;case"tool":z={allowed_tools:{mode:"validated",tools:[Y.toolName]}};break}return{tools:K.length>0?K:void 0,toolChoice:z,toolWarnings:W}}function Mc8({response:$,warnings:Y,generateId:X,includeRawChunks:G,headerServiceTier:J}){return new ReadableStream({start(Q){var W,Z,K;Q.enqueue({type:"stream-start",warnings:Y});let H=typeof $.id==="string"&&$.id.length>0?$.id:void 0,z,V=$.created;if(typeof V==="string"){let E=new Date(V);if(!Number.isNaN(E.getTime()))z=E}if(Q.enqueue({type:"response-metadata",...H!=null?{id:H}:{},modelId:(W=$.model)!=null?W:void 0,...z?{timestamp:z}:{}}),G)Q.enqueue({type:"raw",rawValue:$});let{content:A,hasFunctionCall:F}=l74({outputs:(Z=$.outputs)!=null?Z:null,generateId:X,interactionId:H}),N=0,D=()=>`${H!=null?H:"agent"}:${N++}`;for(let E of A)switch(E.type){case"text":{let M=D(),R=E.providerMetadata;if(Q.enqueue({type:"text-start",id:M}),E.text.length>0)Q.enqueue({type:"text-delta",id:M,delta:E.text});Q.enqueue({type:"text-end",id:M,...R?{providerMetadata:R}:{}});break}case"reasoning":{let M=D(),R=E.providerMetadata;if(Q.enqueue({type:"reasoning-start",id:M}),E.text.length>0)Q.enqueue({type:"reasoning-delta",id:M,delta:E.text});Q.enqueue({type:"reasoning-end",id:M,...R?{providerMetadata:R}:{}});break}case"tool-call":{let M=E.providerMetadata;Q.enqueue({type:"tool-input-start",id:E.toolCallId,toolName:E.toolName,...E.providerExecuted?{providerExecuted:E.providerExecuted}:{}}),Q.enqueue({type:"tool-input-delta",id:E.toolCallId,delta:E.input}),Q.enqueue({type:"tool-input-end",id:E.toolCallId}),Q.enqueue({type:"tool-call",toolCallId:E.toolCallId,toolName:E.toolName,input:E.input,...E.providerExecuted?{providerExecuted:E.providerExecuted}:{},...M?{providerMetadata:M}:{}});break}case"tool-result":{Q.enqueue({type:"tool-result",toolCallId:E.toolCallId,toolName:E.toolName,result:E.result});break}case"source":case"file":{Q.enqueue(E);break}}let L=(K=$.service_tier)!=null?K:J,B={unified:Jb0({status:$.status,hasFunctionCall:F}),raw:$.status},O={google:{...H!=null?{interactionId:H}:{},...L!=null?{serviceTier:L}:{}}};Q.enqueue({type:"finish",finishReason:B,usage:Gb0($.usage),providerMetadata:O}),Q.close()}})}function w90($){let Y={};for(let[X,G]of Object.entries($)){if(G===void 0)continue;Y[X]=G}return Y}function Wj($={}){var Y,X;let G=(Y=EE($.baseURL))!=null?Y:"https://generativelanguage.googleapis.com/v1beta",J=(X=$.name)!=null?X:"google.generative-ai",Q=()=>KV({"x-goog-api-key":BE({apiKey:$.apiKey,environmentVariableName:"GOOGLE_GENERATIVE_AI_API_KEY",description:"Google Generative AI"}),...$.headers},`ai-sdk/google/${Vd8}`),W=(A)=>{var F;return new S74(A,{provider:J,baseURL:G,headers:Q,generateId:(F=$.generateId)!=null?F:X9,supportedUrls:()=>({"*":[new RegExp(`^${G}/files/.*$`),new RegExp("^https://(?:www\\.)?youtube\\.com/watch\\?v=[\\w-]+(?:&[\\w=&.-]*)?$"),new RegExp("^https://youtu\\.be/[\\w-]+(?:\\?[\\w=&.-]*)?$")]}),fetch:$.fetch})},Z=(A)=>new Nd8(A,{provider:J,baseURL:G,headers:Q,fetch:$.fetch}),K=(A,F={})=>new nd8(A,F,{provider:J,baseURL:G,headers:Q,fetch:$.fetch}),H=(A)=>{var F;return new sd8(A,{provider:J,baseURL:G,headers:Q,fetch:$.fetch,generateId:(F=$.generateId)!=null?F:X9})},z=(A)=>{var F;return new Rc8(A,{provider:`${J}.interactions`,baseURL:G,headers:Q,generateId:(F=$.generateId)!=null?F:X9,fetch:$.fetch})},V=function(A){if(new.target)throw Error("The Google Generative AI model function cannot be called with the new keyword.");return W(A)};return V.specificationVersion="v3",V.languageModel=W,V.chat=W,V.generativeAI=W,V.embedding=Z,V.embeddingModel=Z,V.textEmbedding=Z,V.textEmbeddingModel=Z,V.image=K,V.imageModel=K,V.video=H,V.videoModel=H,V.interactions=z,V.tools=id8,V}var w94="vercel.ai.error",yb8,_64,j64,c5,_94="AI_APICallError",j94,bb8,T64,C64,AY,T94="AI_EmptyResponseBodyError",C94,hb8,S64,k64,S94,v94="AI_InvalidArgumentError",x94,fb8,v64,x64,y94,b94="AI_InvalidPromptError",h94,gb8,y64,b64,v90,f94="AI_InvalidResponseDataError",g94,mb8,h64,f64,oZ,m94="AI_JSONParseError",u94,ub8,g64,m64,j90,p94="AI_LoadAPIKeyError",d94,pb8,u64,p64,M90,c94="AI_LoadSettingError",l94,db8,d64,c64,R90,i94="AI_NoSuchModelError",n94,cb8,l64,i64,LE,r94="AI_TooManyEmbeddingValuesForCallError",a94,lb8,n64,r64,Vm,s94="AI_TypeValidationError",o94,ib8,a64,s64,Zm,t94="AI_UnsupportedFunctionalityError",e94,nb8,o64,t64,w9,$54,e64,Y54,tb8=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){if(this._promise)return this._promise;return this._promise=new Promise(($,Y)=>{if(this.status.type==="resolved")$(this.status.value);else if(this.status.type==="rejected")Y(this.status.error);this._resolve=$,this._reject=Y}),this._promise}resolve($){var Y;if(this.status={type:"resolved",value:$},this._promise)(Y=this._resolve)==null||Y.call(this,$)}reject($){var Y;if(this.status={type:"rejected",error:$},this._promise)(Y=this._reject)==null||Y.call(this,$)}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}},X54="AI_DownloadError",G54,eb8,Y84,X84,QV,J54=2147483648,Q54=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let Z=0;Z<Y;Z++)W[Z]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new y94({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},w8,Xh8,uy0="3.0.25",Gh8=()=>globalThis.fetch,Jh8=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=Gh8()})=>{try{let W=await Q($,{method:"GET",headers:wQ(Y,`ai-sdk/provider-utils/${uy0}`,my0()),signal:J}),Z=WV(W);if(!W.ok){let K;try{K=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(Gj(H)||AY.isInstance(H))throw H;throw new AY({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}throw K.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(K){if(K instanceof Error){if(Gj(K)||AY.isInstance(K))throw K}throw new AY({message:"Failed to process successful response",cause:K,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}}catch(W){throw W54({error:W,url:$,requestBodyValues:{}})}},Qh8="JSON schema:",Wh8="You MUST answer with a JSON object that matches the JSON schema above.",Zh8="You MUST answer with JSON.",zh8,Vh8,T90,Fh8=()=>globalThis.fetch,G8=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>ly0({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),h90=async({url:$,headers:Y,formData:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>ly0({url:$,headers:Y,body:{content:X,values:Object.fromEntries(X.entries())},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),ly0=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=Fh8()})=>{try{let Z=await W($,{method:"POST",headers:wQ(Y,`ai-sdk/provider-utils/${uy0}`,my0()),body:X.content,signal:Q}),K=WV(Z);if(!Z.ok){let H;try{H=await J({response:Z,url:$,requestBodyValues:X.values})}catch(z){if(Gj(z)||AY.isInstance(z))throw z;throw new AY({message:"Failed to process error response",cause:z,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}throw H.value}try{return await G({response:Z,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(Gj(H)||AY.isInstance(H))throw H}throw new AY({message:"Failed to process successful response",cause:H,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}}catch(Z){throw W54({error:Z,url:$,requestBodyValues:X.values})}},zJ=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),Z=WV(G);if(W.trim()==="")return{responseHeaders:Z,value:new AY({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let K=await V54({text:W,schema:$});return{responseHeaders:Z,value:new AY({message:Y(K),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,data:K,isRetryable:X==null?void 0:X(G,K)})}}catch(K){return{responseHeaders:Z,value:new AY({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},_Q=($)=>async({response:Y})=>{let X=WV(Y);if(Y.body==null)throw new S94({});return{responseHeaders:X,value:A54({stream:Y.body,schema:$})}},Lh8=($)=>async({response:Y})=>{let X=WV(Y);if(Y.body==null)throw new S94({});let G="";return{responseHeaders:X,value:Y.body.pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({async transform(J,Q){if(J.endsWith(`
`))Q.enqueue(await b90({text:G+J,schema:$})),G="";else G+=J}}))}},C5=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await b90({text:J,schema:$}),W=WV(Y);if(!Q.success)throw new AY({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},f90=()=>async({response:$,url:Y,requestBodyValues:X})=>{let G=WV($);if(!$.body)throw new AY({message:"Response body is empty",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0});try{let J=await $.arrayBuffer();return{responseHeaders:G,value:new Uint8Array(J)}}catch(J){throw new AY({message:"Failed to read response as array buffer",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0,cause:J})}},Bh8=()=>async({response:$,url:Y,requestBodyValues:X})=>{let G=WV($),J=await $.text();return{responseHeaders:G,value:new AY({message:$.statusText,url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:J})}},wy0,Oh8,J84,Eh8=($)=>typeof $==="string"?{...J84,name:$}:{...J84,...$},Ih8=($,Y)=>{return a9($.innerType._def,Y)},Ph8=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y},Th8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},Fy0=void 0,gK,kh8,_y0,gh8=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>a9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},lh8=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return a9($.innerType._def,Y);let G=a9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:vW()},G]}:vW()},ih8=($,Y)=>{if(Y.pipeStrategy==="input")return a9($.in._def,Y);else if(Y.pipeStrategy==="output")return a9($.out._def,Y);let X=a9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=a9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},th8=($,Y)=>{return a9($.innerType._def,Y)},eh8=($,Y,X)=>{switch(Y){case U0.ZodString:return N54($,X);case U0.ZodNumber:return uh8($);case U0.ZodObject:return ph8($,X);case U0.ZodBigInt:return Rh8($);case U0.ZodBoolean:return qh8();case U0.ZodDate:return D54($,X);case U0.ZodUndefined:return sh8();case U0.ZodNull:return hh8();case U0.ZodArray:return Mh8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return fh8($,X);case U0.ZodIntersection:return Ch8($,X);case U0.ZodTuple:return ah8($,X);case U0.ZodRecord:return L54($,X);case U0.ZodLiteral:return Sh8($);case U0.ZodEnum:return jh8($);case U0.ZodNativeEnum:return yh8($);case U0.ZodNullable:return mh8($,X);case U0.ZodOptional:return lh8($,X);case U0.ZodMap:return xh8($,X);case U0.ZodSet:return rh8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return nh8($,X);case U0.ZodNaN:case U0.ZodNever:return bh8();case U0.ZodEffects:return _h8($,X);case U0.ZodAny:return vW();case U0.ZodUnknown:return oh8();case U0.ZodDefault:return wh8($,X);case U0.ZodBranded:return F54($,X);case U0.ZodReadonly:return th8($,X);case U0.ZodCatch:return Ih8($,X);case U0.ZodPipeline:return ih8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},$f8=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},Yf8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:$f8(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),vW();return Y.$refStrategy==="seen"?vW():void 0}}},Xf8=($,Y,X)=>{if($.description)X.description=$.description;return X},Gf8=($)=>{let Y=Eh8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},Jf8=($,Y)=>{var X;let G=Gf8(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var A;return{...H,[z]:(A=a9(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?A:vW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=a9($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:vW(),Z=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(Z!==void 0)W.title=Z;let K=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return K.$schema="http://json-schema.org/draft-07/schema#",K},Qf8,zf8,Vf8,Ny0,Bf8,u90,Fm=class{constructor($,Y){this.specificationVersion="v2";var X,G;this.modelId=$,this.config=Y;let J=(X=Y.errorStructure)!=null?X:u90;this.chunkSchema=Rf8(J.errorSchema),this.failedResponseHandler=zJ(J),this.supportsStructuredOutputs=(G=Y.supportsStructuredOutputs)!=null?G:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}transformRequestBody($){var Y,X,G;return(G=(X=(Y=this.config).transformRequestBody)==null?void 0:X.call(Y,$))!=null?G:$}convertUsage($){var Y,X,G;return(G=(X=(Y=this.config).convertUsage)==null?void 0:X.call(Y,$))!=null?G:Ef8($)}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,providerOptions:Z,stopSequences:K,responseFormat:H,seed:z,toolChoice:V,tools:A}){var F,N,D,L;let B=[],O=Object.assign((F=await _9({provider:"openai-compatible",providerOptions:Z,schema:Ny0}))!=null?F:{},(N=await _9({provider:this.providerOptionsName,providerOptions:Z,schema:Ny0}))!=null?N:{});if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if((H==null?void 0:H.type)==="json"&&H.schema!=null&&!this.supportsStructuredOutputs)B.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:E,toolChoice:M,toolWarnings:R}=Of8({tools:A,toolChoice:V});return{args:{model:this.modelId,user:O.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(H==null?void 0:H.type)==="json"?this.supportsStructuredOutputs===!0&&H.schema!=null?{type:"json_schema",json_schema:{schema:H.schema,name:(D=H.name)!=null?D:"response",description:H.description}}:{type:"json_object"}:void 0,stop:K,seed:z,...Object.fromEntries(Object.entries((L=Z==null?void 0:Z[this.providerOptionsName])!=null?L:{}).filter(([q])=>!Object.keys(Ny0.shape).includes(q))),reasoning_effort:O.reasoningEffort,verbosity:O.textVerbosity,messages:Lf8($),tools:E,tool_choice:M},warnings:[...B,...R]}}async doGenerate($){var Y,X,G,J,Q;let{args:W,warnings:Z}=await this.getArgs({...$}),K=this.transformRequestBody(W),H=JSON.stringify(K),{responseHeaders:z,value:V,rawValue:A}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:K,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:C5(Mf8),abortSignal:$.abortSignal,fetch:this.config.fetch}),F=V.choices[0],N=[],D=F.message.content;if(D!=null&&D.length>0)N.push({type:"text",text:D});let L=(Y=F.message.reasoning_content)!=null?Y:F.message.reasoning;if(L!=null&&L.length>0)N.push({type:"reasoning",text:L});if(F.message.tool_calls!=null)for(let E of F.message.tool_calls)N.push({type:"tool-call",toolCallId:(X=E.id)!=null?X:w8(),toolName:E.function.name,input:E.function.arguments});let B={[this.providerOptionsName]:{},...await((J=(G=this.config.metadataExtractor)==null?void 0:G.extractMetadata)==null?void 0:J.call(G,{parsedBody:A}))},O=(Q=V.usage)==null?void 0:Q.completion_tokens_details;if((O==null?void 0:O.accepted_prediction_tokens)!=null)B[this.providerOptionsName].acceptedPredictionTokens=O==null?void 0:O.accepted_prediction_tokens;if((O==null?void 0:O.rejected_prediction_tokens)!=null)B[this.providerOptionsName].rejectedPredictionTokens=O==null?void 0:O.rejected_prediction_tokens;return{content:N,finishReason:Z84(F.finish_reason),usage:this.convertUsage(V.usage),providerMetadata:B,request:{body:H},response:{...W84(V),headers:z,body:A},warnings:Z}}async doStream($){var Y;let{args:X,warnings:G}=await this.getArgs({...$}),J=this.transformRequestBody({...X,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),Q=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:W,value:Z}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:J,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:_Q(this.chunkSchema),abortSignal:$.abortSignal,fetch:this.config.fetch}),K=[],H="unknown",z={completionTokens:void 0,completionTokensDetails:{reasoningTokens:void 0,acceptedPredictionTokens:void 0,rejectedPredictionTokens:void 0},promptTokens:void 0,promptTokensDetails:{cachedTokens:void 0},totalTokens:void 0},V=void 0,A=!0,F=this.providerOptionsName,N=!1,D=!1,L=(B)=>this.convertUsage(B);return{stream:Z.pipeThrough(new TransformStream({start(B){B.enqueue({type:"stream-start",warnings:G})},transform(B,O){var E,M,R,q,w,I,P,_,C,k,S,T,v;if($.includeRawChunks)O.enqueue({type:"raw",rawValue:B.rawValue});if(!B.success){H="error",O.enqueue({type:"error",error:B.error});return}let x=B.value;if(Q==null||Q.processChunk(B.rawValue),"error"in x){H="error",O.enqueue({type:"error",error:x.error.message});return}if(A)A=!1,O.enqueue({type:"response-metadata",...W84(x)});if(x.usage!=null){V=x.usage;let{prompt_tokens:b,completion_tokens:g,total_tokens:p,prompt_tokens_details:h,completion_tokens_details:n}=x.usage;if(z.promptTokens=b!=null?b:void 0,z.completionTokens=g!=null?g:void 0,z.totalTokens=p!=null?p:void 0,(n==null?void 0:n.reasoning_tokens)!=null)z.completionTokensDetails.reasoningTokens=n==null?void 0:n.reasoning_tokens;if((n==null?void 0:n.accepted_prediction_tokens)!=null)z.completionTokensDetails.acceptedPredictionTokens=n==null?void 0:n.accepted_prediction_tokens;if((n==null?void 0:n.rejected_prediction_tokens)!=null)z.completionTokensDetails.rejectedPredictionTokens=n==null?void 0:n.rejected_prediction_tokens;if((h==null?void 0:h.cached_tokens)!=null)z.promptTokensDetails.cachedTokens=h==null?void 0:h.cached_tokens}let y=x.choices[0];if((y==null?void 0:y.finish_reason)!=null)H=Z84(y.finish_reason);if((y==null?void 0:y.delta)==null)return;let d=y.delta,u=(E=d.reasoning_content)!=null?E:d.reasoning;if(u){if(!N)O.enqueue({type:"reasoning-start",id:"reasoning-0"}),N=!0;O.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:u})}if(d.content){if(!D)O.enqueue({type:"text-start",id:"txt-0"}),D=!0;O.enqueue({type:"text-delta",id:"txt-0",delta:d.content})}if(d.tool_calls!=null)for(let b of d.tool_calls){let g=b.index;if(K[g]==null){if(b.id==null)throw new oZ({data:b,message:"Expected 'id' to be a string."});if(((M=b.function)==null?void 0:M.name)==null)throw new oZ({data:b,message:"Expected 'function.name' to be a string."});O.enqueue({type:"tool-input-start",id:b.id,toolName:b.function.name}),K[g]={id:b.id,type:"function",function:{name:b.function.name,arguments:(R=b.function.arguments)!=null?R:""},hasFinished:!1};let h=K[g];if(((q=h.function)==null?void 0:q.name)!=null&&((w=h.function)==null?void 0:w.arguments)!=null){if(h.function.arguments.length>0)O.enqueue({type:"tool-input-delta",id:h.id,delta:h.function.arguments});if(nK(h.function.arguments))O.enqueue({type:"tool-input-end",id:h.id}),O.enqueue({type:"tool-call",toolCallId:(I=h.id)!=null?I:w8(),toolName:h.function.name,input:h.function.arguments}),h.hasFinished=!0}continue}let p=K[g];if(p.hasFinished)continue;if(((P=b.function)==null?void 0:P.arguments)!=null)p.function.arguments+=(C=(_=b.function)==null?void 0:_.arguments)!=null?C:"";if(O.enqueue({type:"tool-input-delta",id:p.id,delta:(k=b.function.arguments)!=null?k:""}),((S=p.function)==null?void 0:S.name)!=null&&((T=p.function)==null?void 0:T.arguments)!=null&&nK(p.function.arguments))O.enqueue({type:"tool-input-end",id:p.id}),O.enqueue({type:"tool-call",toolCallId:(v=p.id)!=null?v:w8(),toolName:p.function.name,input:p.function.arguments}),p.hasFinished=!0}},flush(B){var O;if(N)B.enqueue({type:"reasoning-end",id:"reasoning-0"});if(D)B.enqueue({type:"text-end",id:"txt-0"});for(let M of K.filter((R)=>!R.hasFinished))B.enqueue({type:"tool-input-end",id:M.id}),B.enqueue({type:"tool-call",toolCallId:(O=M.id)!=null?O:w8(),toolName:M.function.name,input:M.function.arguments});let E={[F]:{},...Q==null?void 0:Q.buildMetadata()};if(z.completionTokensDetails.acceptedPredictionTokens!=null)E[F].acceptedPredictionTokens=z.completionTokensDetails.acceptedPredictionTokens;if(z.completionTokensDetails.rejectedPredictionTokens!=null)E[F].rejectedPredictionTokens=z.completionTokensDetails.rejectedPredictionTokens;B.enqueue({type:"finish",finishReason:H,usage:L(V),providerMetadata:E})}})),request:{body:J},response:{headers:W}}}},O54,Mf8,Rf8=($)=>U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:O54}),$]),If8,p90=class{constructor($,Y){this.specificationVersion="v2";var X;this.modelId=$,this.config=Y;let G=(X=Y.errorStructure)!=null?X:u90;this.chunkSchema=wf8(G.errorSchema),this.failedResponseHandler=zJ(G)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,providerOptions:z,tools:V,toolChoice:A}){var F;let N=[],D=(F=await _9({provider:this.providerOptionsName,providerOptions:z,schema:If8}))!=null?F:{};if(J!=null)N.push({type:"unsupported-setting",setting:"topK"});if(V==null?void 0:V.length)N.push({type:"unsupported-setting",setting:"tools"});if(A!=null)N.push({type:"unsupported-setting",setting:"toolChoice"});if(K!=null&&K.type!=="text")N.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format is not supported."});let{prompt:L,stopSequences:B}=qf8({prompt:$}),O=[...B!=null?B:[],...Z!=null?Z:[]];return{args:{model:this.modelId,echo:D.echo,logit_bias:D.logitBias,suffix:D.suffix,user:D.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:H,...z==null?void 0:z[this.providerOptionsName],prompt:L,stop:O.length>0?O:void 0},warnings:N}}async doGenerate($){var Y,X,G,J,Q,W;let{args:Z,warnings:K}=await this.getArgs($),{responseHeaders:H,value:z,rawValue:V}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:Z,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:C5(Pf8),abortSignal:$.abortSignal,fetch:this.config.fetch}),A=z.choices[0],F=[];if(A.text!=null&&A.text.length>0)F.push({type:"text",text:A.text});return{content:F,usage:{inputTokens:(X=(Y=z.usage)==null?void 0:Y.prompt_tokens)!=null?X:void 0,outputTokens:(J=(G=z.usage)==null?void 0:G.completion_tokens)!=null?J:void 0,totalTokens:(W=(Q=z.usage)==null?void 0:Q.total_tokens)!=null?W:void 0},finishReason:U84(A.finish_reason),request:{body:Z},response:{...K84(z),headers:H,body:V},warnings:K}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:_Q(this.chunkSchema),abortSignal:$.abortSignal,fetch:this.config.fetch}),W="unknown",Z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},K=!0;return{stream:Q.pipeThrough(new TransformStream({start(H){H.enqueue({type:"stream-start",warnings:X})},transform(H,z){var V,A,F;if($.includeRawChunks)z.enqueue({type:"raw",rawValue:H.rawValue});if(!H.success){W="error",z.enqueue({type:"error",error:H.error});return}let N=H.value;if("error"in N){W="error",z.enqueue({type:"error",error:N.error});return}if(K)K=!1,z.enqueue({type:"response-metadata",...K84(N)}),z.enqueue({type:"text-start",id:"0"});if(N.usage!=null)Z.inputTokens=(V=N.usage.prompt_tokens)!=null?V:void 0,Z.outputTokens=(A=N.usage.completion_tokens)!=null?A:void 0,Z.totalTokens=(F=N.usage.total_tokens)!=null?F:void 0;let D=N.choices[0];if((D==null?void 0:D.finish_reason)!=null)W=U84(D.finish_reason);if((D==null?void 0:D.text)!=null)z.enqueue({type:"text-delta",id:"0",delta:D.text})},flush(H){if(!K)H.enqueue({type:"text-end",id:"0"});H.enqueue({type:"finish",finishReason:W,usage:Z})}})),request:{body:G},response:{headers:J}}}},E54,Pf8,wf8=($)=>U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number()})),usage:E54.nullish()}),$]),H84,d90=class{constructor($,Y){this.specificationVersion="v2",this.modelId=$,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var $;return($=this.config.maxEmbeddingsPerCall)!=null?$:2048}get supportsParallelCalls(){var $;return($=this.config.supportsParallelCalls)!=null?$:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J,Q,W;let Z=Object.assign((J=await _9({provider:"openai-compatible",providerOptions:G,schema:H84}))!=null?J:{},(Q=await _9({provider:this.providerOptionsName,providerOptions:G,schema:H84}))!=null?Q:{});if($.length>this.maxEmbeddingsPerCall)throw new Vm({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let{responseHeaders:K,value:H,rawValue:z}=await G8({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:o6(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:Z.dimensions,user:Z.user},failedResponseHandler:zJ((W=this.config.errorStructure)!=null?W:u90),successfulResponseHandler:C5(_f8),abortSignal:X,fetch:this.config.fetch});return{embeddings:H.data.map((V)=>V.embedding),usage:H.usage?{tokens:H.usage.prompt_tokens}:void 0,providerMetadata:H.providerMetadata,response:{headers:K,body:z}}}},_f8,jf8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:Z}){var K,H,z,V;let A=[];if(G!=null)A.push({type:"unsupported-setting",setting:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(J!=null)A.push({type:"unsupported-setting",setting:"seed"});let F=(z=(H=(K=this.config._internal)==null?void 0:K.currentDate)==null?void 0:H.call(K))!=null?z:new Date,{value:N,responseHeaders:D}=await G8({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:o6(this.config.headers(),W),body:{model:this.modelId,prompt:$,n:Y,size:X,...Q[this.providerOptionsKey],response_format:"b64_json"},failedResponseHandler:zJ((V=this.config.errorStructure)!=null?V:u90),successfulResponseHandler:C5(Tf8),abortSignal:Z,fetch:this.config.fetch});return{images:N.data.map((L)=>L.b64_json),warnings:A,response:{timestamp:F,modelId:this.modelId,headers:D}}}},Tf8,Cf8="1.0.39",M54="vercel.ai.error",Sf8,z84,V84,L8,R54="AI_APICallError",q54,kf8,A84,F84,h7,I54="AI_EmptyResponseBodyError",P54,vf8,D84,N84,xf8,_54="AI_InvalidArgumentError",j54,yf8,L84,B84,ny0,T54="AI_InvalidPromptError",C54,bf8,O84,E84,hf8,S54="AI_InvalidResponseDataError",k54,ff8,M84,R84,DE,v54="AI_JSONParseError",x54,gf8,q84,I84,C90,y54="AI_LoadAPIKeyError",b54,mf8,P84,w84,q90,h54="AI_NoSuchModelError",f54,uf8,_84,j84,NE,g54="AI_TooManyEmbeddingValuesForCallError",m54,pf8,T84,C84,c90,u54="AI_TypeValidationError",p54,df8,S84,k84,Km,d54="AI_UnsupportedFunctionalityError",c54,cf8,v84,x84,d5,y84,b84=10,lf8=13,VE=32,nf8,rf8,af8,n54="AI_DownloadError",r54,of8,m84,u84,cK,a54=2147483648,$g8=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let Z=0;Z<Y;Z++)W[Z]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new ny0({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},X9,Yg8,Xg8,$74="4.0.27",Qg8=()=>globalThis.fetch,Nm=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=Qg8()})=>{try{let W=await Q($,{method:"GET",headers:KV(Y,`ai-sdk/provider-utils/${$74}`,e54()),signal:J}),Z=ZV(W);if(!W.ok){let K;try{K=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(Um(H)||h7.isInstance(H))throw H;throw new h7({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}throw K.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(K){if(K instanceof Error){if(Um(K)||h7.isInstance(K))throw K}throw new h7({message:"Failed to process successful response",cause:K,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}}catch(W){throw t54({error:W,url:$,requestBodyValues:{}})}},Wg8="JSON schema:",Zg8="You MUST answer with a JSON object that matches the JSON schema above.",Kg8="You MUST answer with JSON.",Hg8,zg8,Ag8,c84,Fg8=($)=>typeof $==="string"?{...c84,name:$}:{...c84,...$},Bg8=($,Y)=>{return s9($.innerType._def,Y)},Og8=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y},qg8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},By0=void 0,uK,wg8,Sy0,vg8=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>s9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},gg8=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return s9($.innerType._def,Y);let G=s9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:xW()},G]}:xW()},mg8=($,Y)=>{if(Y.pipeStrategy==="input")return s9($.in._def,Y);else if(Y.pipeStrategy==="output")return s9($.out._def,Y);let X=s9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=s9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},ig8=($,Y)=>{return s9($.innerType._def,Y)},ng8=($,Y,X)=>{switch(Y){case U0.ZodString:return Q74($,X);case U0.ZodNumber:return yg8($);case U0.ZodObject:return bg8($,X);case U0.ZodBigInt:return Ng8($);case U0.ZodBoolean:return Lg8();case U0.ZodDate:return J74($,X);case U0.ZodUndefined:return cg8();case U0.ZodNull:return Sg8();case U0.ZodArray:return Dg8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return kg8($,X);case U0.ZodIntersection:return Ig8($,X);case U0.ZodTuple:return dg8($,X);case U0.ZodRecord:return W74($,X);case U0.ZodLiteral:return Pg8($);case U0.ZodEnum:return Rg8($);case U0.ZodNativeEnum:return Tg8($);case U0.ZodNullable:return xg8($,X);case U0.ZodOptional:return gg8($,X);case U0.ZodMap:return jg8($,X);case U0.ZodSet:return pg8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return ug8($,X);case U0.ZodNaN:case U0.ZodNever:return Cg8();case U0.ZodEffects:return Mg8($,X);case U0.ZodAny:return xW();case U0.ZodUnknown:return lg8();case U0.ZodDefault:return Eg8($,X);case U0.ZodBranded:return G74($,X);case U0.ZodReadonly:return ig8($,X);case U0.ZodCatch:return Bg8($,X);case U0.ZodPipeline:return mg8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},rg8=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},ag8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:rg8(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),xW();return Y.$refStrategy==="seen"?xW():void 0}}},sg8=($,Y,X)=>{if($.description)X.description=$.description;return X},og8=($)=>{let Y=Fg8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},tg8=($,Y)=>{var X;let G=og8(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var A;return{...H,[z]:(A=s9(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?A:xW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=s9($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:xW(),Z=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(Z!==void 0)W.title=Z;let K=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return K.$schema="http://json-schema.org/draft-07/schema#",K},ky0,Wm8=()=>globalThis.fetch,G9=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>K74({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),r90=async({url:$,headers:Y,formData:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>K74({url:$,headers:Y,body:{content:X,values:Object.fromEntries(X.entries())},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),K74=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=Wm8()})=>{try{let Z=await W($,{method:"POST",headers:KV(Y,`ai-sdk/provider-utils/${$74}`,e54()),body:X.content,signal:Q}),K=ZV(Z);if(!Z.ok){let H;try{H=await J({response:Z,url:$,requestBodyValues:X.values})}catch(z){if(Um(z)||h7.isInstance(z))throw z;throw new h7({message:"Failed to process error response",cause:z,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}throw H.value}try{return await G({response:Z,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(Um(H)||h7.isInstance(H))throw H}throw new h7({message:"Failed to process successful response",cause:H,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}}catch(Z){throw t54({error:Z,url:$,requestBodyValues:X.values})}},OE=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),Z=ZV(G);if(W.trim()==="")return{responseHeaders:Z,value:new h7({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let K=await Z74({text:W,schema:$});return{responseHeaders:Z,value:new h7({message:Y(K),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,data:K,isRetryable:X==null?void 0:X(G,K)})}}catch(K){return{responseHeaders:Z,value:new h7({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},oK=($)=>async({response:Y})=>{let X=ZV(Y);if(Y.body==null)throw new xf8({});return{responseHeaders:X,value:Qm8({stream:Y.body,schema:$})}},T5=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await n90({text:J,schema:$}),W=ZV(Y);if(!Q.success)throw new h7({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},ty0=()=>async({response:$,url:Y,requestBodyValues:X})=>{let G=ZV($);if(!$.body)throw new h7({message:"Response body is empty",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0});try{let J=await $.arrayBuffer();return{responseHeaders:G,value:new Uint8Array(J)}}catch(J){throw new h7({message:"Failed to read response as array buffer",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0,cause:J})}},H74=()=>async({response:$,url:Y,requestBodyValues:X})=>{let G=ZV($),J=await $.text();return{responseHeaders:G,value:new h7({message:$.statusText,url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:J})}},ey0,rK,Um8,Hm8,zm8,Am8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,tools:z,toolChoice:V,providerOptions:A}){var F,N,D,L,B;let O=[],E=(F=await P9({provider:"openai",providerOptions:A,schema:zm8}))!=null?F:{},M=z74(this.modelId),R=(N=E.forceReasoning)!=null?N:M.isReasoningModel;if(J!=null)O.push({type:"unsupported",feature:"topK"});let{messages:q,warnings:w}=Km8({prompt:$,systemMessageMode:(D=E.systemMessageMode)!=null?D:R?"developer":M.systemMessageMode});O.push(...w);let I=(L=E.strictJsonSchema)!=null?L:!0,P={model:this.modelId,logit_bias:E.logitBias,logprobs:E.logprobs===!0||typeof E.logprobs==="number"?!0:void 0,top_logprobs:typeof E.logprobs==="number"?E.logprobs:typeof E.logprobs==="boolean"?E.logprobs?0:void 0:void 0,user:E.user,parallel_tool_calls:E.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(K==null?void 0:K.type)==="json"?K.schema!=null?{type:"json_schema",json_schema:{schema:K.schema,strict:I,name:(B=K.name)!=null?B:"response",description:K.description}}:{type:"json_object"}:void 0,stop:Z,seed:H,verbosity:E.textVerbosity,max_completion_tokens:E.maxCompletionTokens,store:E.store,metadata:E.metadata,prediction:E.prediction,reasoning_effort:E.reasoningEffort,service_tier:E.serviceTier,prompt_cache_key:E.promptCacheKey,prompt_cache_retention:E.promptCacheRetention,safety_identifier:E.safetyIdentifier,messages:q};if(R){if(E.reasoningEffort!=="none"||!M.supportsNonReasoningParameters){if(P.temperature!=null)P.temperature=void 0,O.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(P.top_p!=null)P.top_p=void 0,O.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(P.logprobs!=null)P.logprobs=void 0,O.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(P.frequency_penalty!=null)P.frequency_penalty=void 0,O.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(P.presence_penalty!=null)P.presence_penalty=void 0,O.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(P.logit_bias!=null)P.logit_bias=void 0,O.push({type:"other",message:"logitBias is not supported for reasoning models"});if(P.top_logprobs!=null)P.top_logprobs=void 0,O.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(P.max_tokens!=null){if(P.max_completion_tokens==null)P.max_completion_tokens=P.max_tokens;P.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(P.temperature!=null)P.temperature=void 0,O.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(E.serviceTier==="flex"&&!M.supportsFlexProcessing)O.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),P.service_tier=void 0;if(E.serviceTier==="priority"&&!M.supportsPriorityProcessing)O.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),P.service_tier=void 0;let{tools:_,toolChoice:C,toolWarnings:k}=Vm8({tools:z,toolChoice:V});return{args:{...P,tools:_,tool_choice:C},warnings:[...O,...k]}}async doGenerate($){var Y,X,G,J,Q,W;let{args:Z,warnings:K}=await this.getArgs($),{responseHeaders:H,value:z,rawValue:V}=await G9({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:Z,failedResponseHandler:rK,successfulResponseHandler:T5(Um8),abortSignal:$.abortSignal,fetch:this.config.fetch}),A=z.choices[0],F=[],N=A.message.content;if(N!=null&&N.length>0)F.push({type:"text",text:N});for(let B of(Y=A.message.tool_calls)!=null?Y:[])F.push({type:"tool-call",toolCallId:(X=B.id)!=null?X:X9(),toolName:B.function.name,input:B.function.arguments});for(let B of(G=A.message.annotations)!=null?G:[])F.push({type:"source",sourceType:"url",id:X9(),url:B.url_citation.url,title:B.url_citation.title});let D=(J=z.usage)==null?void 0:J.completion_tokens_details,L={openai:{}};if((D==null?void 0:D.accepted_prediction_tokens)!=null)L.openai.acceptedPredictionTokens=D==null?void 0:D.accepted_prediction_tokens;if((D==null?void 0:D.rejected_prediction_tokens)!=null)L.openai.rejectedPredictionTokens=D==null?void 0:D.rejected_prediction_tokens;if(((Q=A.logprobs)==null?void 0:Q.content)!=null)L.openai.logprobs=A.logprobs.content;return{content:F,finishReason:{unified:n84(A.finish_reason),raw:(W=A.finish_reason)!=null?W:void 0},usage:i84(z.usage),request:{body:Z},response:{...Ey0(z),headers:H,body:V},warnings:K,providerMetadata:L}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G9({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:G,failedResponseHandler:rK,successfulResponseHandler:oK(Hm8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],Z={unified:"other",raw:void 0},K=void 0,H=!1,z=!1,V={openai:{}};return{stream:Q.pipeThrough(new TransformStream({start(A){A.enqueue({type:"stream-start",warnings:X})},transform(A,F){var N,D,L,B,O,E,M,R,q,w,I,P,_,C,k,S,T;if($.includeRawChunks)F.enqueue({type:"raw",rawValue:A.rawValue});if(!A.success){Z={unified:"error",raw:void 0},F.enqueue({type:"error",error:A.error});return}let v=A.value;if("error"in v){Z={unified:"error",raw:void 0},F.enqueue({type:"error",error:v.error});return}if(!H){let d=Ey0(v);if(Object.values(d).some(Boolean))H=!0,F.enqueue({type:"response-metadata",...Ey0(v)})}if(v.usage!=null){if(K=v.usage,((N=v.usage.completion_tokens_details)==null?void 0:N.accepted_prediction_tokens)!=null)V.openai.acceptedPredictionTokens=(D=v.usage.completion_tokens_details)==null?void 0:D.accepted_prediction_tokens;if(((L=v.usage.completion_tokens_details)==null?void 0:L.rejected_prediction_tokens)!=null)V.openai.rejectedPredictionTokens=(B=v.usage.completion_tokens_details)==null?void 0:B.rejected_prediction_tokens}let x=v.choices[0];if((x==null?void 0:x.finish_reason)!=null)Z={unified:n84(x.finish_reason),raw:x.finish_reason};if(((O=x==null?void 0:x.logprobs)==null?void 0:O.content)!=null)V.openai.logprobs=x.logprobs.content;if((x==null?void 0:x.delta)==null)return;let y=x.delta;if(y.content!=null){if(!z)F.enqueue({type:"text-start",id:"0"}),z=!0;F.enqueue({type:"text-delta",id:"0",delta:y.content})}if(y.tool_calls!=null)for(let d of y.tool_calls){let u=d.index;if(W[u]==null){if(d.type!=null&&d.type!=="function")throw new DE({data:d,message:"Expected 'function' type."});if(d.id==null)throw new DE({data:d,message:"Expected 'id' to be a string."});if(((E=d.function)==null?void 0:E.name)==null)throw new DE({data:d,message:"Expected 'function.name' to be a string."});F.enqueue({type:"tool-input-start",id:d.id,toolName:d.function.name}),W[u]={id:d.id,type:"function",function:{name:d.function.name,arguments:(M=d.function.arguments)!=null?M:""},hasFinished:!1};let g=W[u];if(((R=g.function)==null?void 0:R.name)!=null&&((q=g.function)==null?void 0:q.arguments)!=null){if(g.function.arguments.length>0)F.enqueue({type:"tool-input-delta",id:g.id,delta:g.function.arguments});if(Hm(g.function.arguments))F.enqueue({type:"tool-input-end",id:g.id}),F.enqueue({type:"tool-call",toolCallId:(w=g.id)!=null?w:X9(),toolName:g.function.name,input:g.function.arguments}),g.hasFinished=!0}continue}let b=W[u];if(b.hasFinished)continue;if(((I=d.function)==null?void 0:I.arguments)!=null)b.function.arguments+=(_=(P=d.function)==null?void 0:P.arguments)!=null?_:"";if(F.enqueue({type:"tool-input-delta",id:b.id,delta:(C=d.function.arguments)!=null?C:""}),((k=b.function)==null?void 0:k.name)!=null&&((S=b.function)==null?void 0:S.arguments)!=null&&Hm(b.function.arguments))F.enqueue({type:"tool-input-end",id:b.id}),F.enqueue({type:"tool-call",toolCallId:(T=b.id)!=null?T:X9(),toolName:b.function.name,input:b.function.arguments}),b.hasFinished=!0}if(y.annotations!=null)for(let d of y.annotations)F.enqueue({type:"source",sourceType:"url",id:X9(),url:d.url_citation.url,title:d.url_citation.title})},flush(A){if(z)A.enqueue({type:"text-end",id:"0"});A.enqueue({type:"finish",finishReason:Z,usage:i84(K),...V!=null?{providerMetadata:V}:{}})}})),request:{body:G},response:{headers:J}}}},Dm8,Nm8,o84,Lm8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={},this.modelId=$,this.config=Y}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,tools:H,toolChoice:z,seed:V,providerOptions:A}){let F=[],N={...await P9({provider:"openai",providerOptions:A,schema:o84}),...await P9({provider:this.providerOptionsName,providerOptions:A,schema:o84})};if(J!=null)F.push({type:"unsupported",feature:"topK"});if(H==null?void 0:H.length)F.push({type:"unsupported",feature:"tools"});if(z!=null)F.push({type:"unsupported",feature:"toolChoice"});if(K!=null&&K.type!=="text")F.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:D,stopSequences:L}=Fm8({prompt:$}),B=[...L!=null?L:[],...Z!=null?Z:[]];return{args:{model:this.modelId,echo:N.echo,logit_bias:N.logitBias,logprobs:(N==null?void 0:N.logprobs)===!0?0:(N==null?void 0:N.logprobs)===!1?void 0:N==null?void 0:N.logprobs,suffix:N.suffix,user:N.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:V,prompt:D,stop:B.length>0?B:void 0},warnings:F}}async doGenerate($){var Y;let{args:X,warnings:G}=await this.getArgs($),{responseHeaders:J,value:Q,rawValue:W}=await G9({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:X,failedResponseHandler:rK,successfulResponseHandler:T5(Dm8),abortSignal:$.abortSignal,fetch:this.config.fetch}),Z=Q.choices[0],K={openai:{}};if(Z.logprobs!=null)K.openai.logprobs=Z.logprobs;return{content:[{type:"text",text:Z.text}],usage:r84(Q.usage),finishReason:{unified:s84(Z.finish_reason),raw:(Y=Z.finish_reason)!=null?Y:void 0},request:{body:X},response:{...a84(Q),headers:J,body:W},providerMetadata:K,warnings:G}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G9({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:G,failedResponseHandler:rK,successfulResponseHandler:oK(Nm8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W={unified:"other",raw:void 0},Z={openai:{}},K=void 0,H=!0;return{stream:Q.pipeThrough(new TransformStream({start(z){z.enqueue({type:"stream-start",warnings:X})},transform(z,V){if($.includeRawChunks)V.enqueue({type:"raw",rawValue:z.rawValue});if(!z.success){W={unified:"error",raw:void 0},V.enqueue({type:"error",error:z.error});return}let A=z.value;if("error"in A){W={unified:"error",raw:void 0},V.enqueue({type:"error",error:A.error});return}if(H)H=!1,V.enqueue({type:"response-metadata",...a84(A)}),V.enqueue({type:"text-start",id:"0"});if(A.usage!=null)K=A.usage;let F=A.choices[0];if((F==null?void 0:F.finish_reason)!=null)W={unified:s84(F.finish_reason),raw:F.finish_reason};if((F==null?void 0:F.logprobs)!=null)Z.openai.logprobs=F.logprobs;if((F==null?void 0:F.text)!=null&&F.text.length>0)V.enqueue({type:"text-delta",id:"0",delta:F.text})},flush(z){if(!H)z.enqueue({type:"text-end",id:"0"});z.enqueue({type:"finish",finishReason:W,providerMetadata:Z,usage:r84(K)})}})),request:{body:G},response:{headers:J}}}},Bm8,Om8,Em8=class{constructor($,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;if($.length>this.maxEmbeddingsPerCall)throw new c90({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=(J=await P9({provider:"openai",providerOptions:G,schema:Bm8}))!=null?J:{},{responseHeaders:W,value:Z,rawValue:K}=await G9({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:p8(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:Q.dimensions,user:Q.user},failedResponseHandler:rK,successfulResponseHandler:T5(Om8),abortSignal:X,fetch:this.config.fetch});return{warnings:[],embeddings:Z.data.map((H)=>H.embedding),usage:Z.usage?{tokens:Z.usage.prompt_tokens}:void 0,response:{headers:W,body:K}}}},t84,Mm8,Rm8,V74,Im8,Pm8,wm8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get maxImagesPerCall(){var $;return($=Mm8[this.modelId])!=null?$:1}get provider(){return this.config.provider}async doGenerate({prompt:$,files:Y,mask:X,n:G,size:J,aspectRatio:Q,seed:W,providerOptions:Z,headers:K,abortSignal:H}){var z,V,A,F,N,D,L,B,O,E,M;let R=[];if(Q!=null)R.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(W!=null)R.push({type:"unsupported",feature:"seed"});let q=(A=(V=(z=this.config._internal)==null?void 0:z.currentDate)==null?void 0:V.call(z))!=null?A:new Date;if(Y!=null){let _=(F=await P9({provider:"openai",providerOptions:Z,schema:Pm8}))!=null?F:{},{value:C,responseHeaders:k}=await r90({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:p8(this.config.headers(),K),formData:sf8({model:this.modelId,prompt:$,image:await Promise.all(Y.map((S)=>S.type==="file"?new Blob([S.data instanceof Uint8Array?new Blob([S.data],{type:S.mediaType}):new Blob([Qj(S.data)],{type:S.mediaType})],{type:S.mediaType}):o54(S.url))),mask:X!=null?await _m8(X):void 0,n:G,size:J,quality:_.quality,background:_.background,output_format:_.outputFormat,output_compression:_.outputCompression,input_fidelity:_.inputFidelity,user:_.user}),failedResponseHandler:rK,successfulResponseHandler:T5(t84),abortSignal:H,fetch:this.config.fetch});return{images:C.data.map((S)=>S.b64_json),warnings:R,usage:C.usage!=null?{inputTokens:(N=C.usage.input_tokens)!=null?N:void 0,outputTokens:(D=C.usage.output_tokens)!=null?D:void 0,totalTokens:(L=C.usage.total_tokens)!=null?L:void 0}:void 0,response:{timestamp:q,modelId:this.modelId,headers:k},providerMetadata:{openai:{images:C.data.map((S,T)=>{var v,x,y,d,u,b;return{...S.revised_prompt?{revisedPrompt:S.revised_prompt}:{},created:(v=C.created)!=null?v:void 0,size:(x=C.size)!=null?x:void 0,quality:(y=C.quality)!=null?y:void 0,background:(d=C.background)!=null?d:void 0,outputFormat:(u=C.output_format)!=null?u:void 0,...e84((b=C.usage)==null?void 0:b.input_tokens_details,T,C.data.length)}})}}}}let w=(B=await P9({provider:"openai",providerOptions:Z,schema:Im8}))!=null?B:{},{value:I,responseHeaders:P}=await G9({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:p8(this.config.headers(),K),body:{model:this.modelId,prompt:$,n:G,size:J,quality:w.quality,style:w.style,background:w.background,moderation:w.moderation,output_format:w.outputFormat,output_compression:w.outputCompression,user:w.user,...!qm8(this.modelId)?{response_format:"b64_json"}:{}},failedResponseHandler:rK,successfulResponseHandler:T5(t84),abortSignal:H,fetch:this.config.fetch});return{images:I.data.map((_)=>_.b64_json),warnings:R,usage:I.usage!=null?{inputTokens:(O=I.usage.input_tokens)!=null?O:void 0,outputTokens:(E=I.usage.output_tokens)!=null?E:void 0,totalTokens:(M=I.usage.total_tokens)!=null?M:void 0}:void 0,response:{timestamp:q,modelId:this.modelId,headers:P},providerMetadata:{openai:{images:I.data.map((_,C)=>{var k,S,T,v,x,y;return{..._.revised_prompt?{revisedPrompt:_.revised_prompt}:{},created:(k=I.created)!=null?k:void 0,size:(S=I.size)!=null?S:void 0,quality:(T=I.quality)!=null?T:void 0,background:(v=I.background)!=null?v:void 0,outputFormat:(x=I.output_format)!=null?x:void 0,...e84((y=I.usage)==null?void 0:y.input_tokens_details,C,I.data.length)}})}}}}},A74,F74,jm8,Tm8,Cm8,Sm8,km8,vm8,xm8=($={})=>{return vm8($)},ym8,bm8,hm8,fm8=($)=>hm8($),D74,N74,gm8,mm8,um8,pm8,dm8,cm8,lm8,im8=($={})=>{return lm8($)},L74,B74,nm8,O74,vy0,rm8,am8,sm8,om8,xy0,yy0,tm8,em8=($={})=>tm8($),$u8,Yu8,Xu8,Gu8,Ju8=($={})=>Gu8($),Qu8,Wu8,Zu8,Ku8,by0,Uu8,Hu8,zu8,Vu8,Au8=($)=>Vu8($),Fu8,Lu8,zm,Bu8,Ou8,E74=20,X94,qu8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({maxOutputTokens:$,temperature:Y,stopSequences:X,topP:G,topK:J,presencePenalty:Q,frequencyPenalty:W,seed:Z,prompt:K,providerOptions:H,tools:z,toolChoice:V,responseFormat:A}){var F,N,D,L,B,O,E,M,R,q;let w=[],I=z74(this.modelId);if(J!=null)w.push({type:"unsupported",feature:"topK"});if(Z!=null)w.push({type:"unsupported",feature:"seed"});if(Q!=null)w.push({type:"unsupported",feature:"presencePenalty"});if(W!=null)w.push({type:"unsupported",feature:"frequencyPenalty"});if(X!=null)w.push({type:"unsupported",feature:"stopSequences"});let P=this.config.provider.includes("azure")?"azure":"openai",_=await P9({provider:P,providerOptions:H,schema:X94});if(_==null&&P!=="openai")_=await P9({provider:"openai",providerOptions:H,schema:X94});let C=(F=_==null?void 0:_.forceReasoning)!=null?F:I.isReasoningModel;if((_==null?void 0:_.conversation)&&(_==null?void 0:_.previousResponseId))w.push({type:"unsupported",feature:"conversation",details:"conversation and previousResponseId cannot be used together"});let k=l54({tools:z,providerToolNames:{"openai.code_interpreter":"code_interpreter","openai.file_search":"file_search","openai.image_generation":"image_generation","openai.local_shell":"local_shell","openai.shell":"shell","openai.web_search":"web_search","openai.web_search_preview":"web_search_preview","openai.mcp":"mcp","openai.apply_patch":"apply_patch","openai.tool_search":"tool_search"},resolveProviderToolName:(a)=>a.id==="openai.custom"?a.args.name:void 0}),S=new Set,{tools:T,toolChoice:v,toolWarnings:x}=await Eu8({tools:z,toolChoice:V,allowedTools:(N=_==null?void 0:_.allowedTools)!=null?N:void 0,toolNameMapping:k,customProviderToolNames:S}),{input:y,warnings:d}=await Nu8({prompt:K,toolNameMapping:k,systemMessageMode:(D=_==null?void 0:_.systemMessageMode)!=null?D:C?"developer":I.systemMessageMode,providerOptionsName:P,fileIdPrefixes:this.config.fileIdPrefixes,store:(L=_==null?void 0:_.store)!=null?L:!0,hasConversation:(_==null?void 0:_.conversation)!=null,hasLocalShellTool:p("openai.local_shell"),hasShellTool:p("openai.shell"),hasApplyPatchTool:p("openai.apply_patch"),customProviderToolNames:S.size>0?S:void 0});w.push(...d);let u=(B=_==null?void 0:_.strictJsonSchema)!=null?B:!0,b=_==null?void 0:_.include;function g(a){if(b==null)b=[a];else if(!b.includes(a))b=[...b,a]}function p(a){return(z==null?void 0:z.find((Q0)=>Q0.type==="provider"&&Q0.id===a))!=null}let h=typeof(_==null?void 0:_.logprobs)==="number"?_==null?void 0:_.logprobs:(_==null?void 0:_.logprobs)===!0?E74:void 0;if(h)g("message.output_text.logprobs");let n=(O=z==null?void 0:z.find((a)=>a.type==="provider"&&(a.id==="openai.web_search"||a.id==="openai.web_search_preview")))==null?void 0:O.name;if(n)g("web_search_call.action.sources");if(p("openai.code_interpreter"))g("code_interpreter_call.outputs");let t=_==null?void 0:_.store;if(t===!1&&C)g("reasoning.encrypted_content");let s={model:this.modelId,input:y,temperature:Y,top_p:G,max_output_tokens:$,...((A==null?void 0:A.type)==="json"||(_==null?void 0:_.textVerbosity))&&{text:{...(A==null?void 0:A.type)==="json"&&{format:A.schema!=null?{type:"json_schema",strict:u,name:(E=A.name)!=null?E:"response",description:A.description,schema:A.schema}:{type:"json_object"}},...(_==null?void 0:_.textVerbosity)&&{verbosity:_.textVerbosity}}},conversation:_==null?void 0:_.conversation,max_tool_calls:_==null?void 0:_.maxToolCalls,metadata:_==null?void 0:_.metadata,parallel_tool_calls:_==null?void 0:_.parallelToolCalls,previous_response_id:_==null?void 0:_.previousResponseId,store:t,user:_==null?void 0:_.user,instructions:_==null?void 0:_.instructions,service_tier:_==null?void 0:_.serviceTier,include:b,prompt_cache_key:_==null?void 0:_.promptCacheKey,prompt_cache_retention:_==null?void 0:_.promptCacheRetention,safety_identifier:_==null?void 0:_.safetyIdentifier,top_logprobs:h,truncation:_==null?void 0:_.truncation,...C&&((_==null?void 0:_.reasoningEffort)!=null||(_==null?void 0:_.reasoningSummary)!=null)&&{reasoning:{...(_==null?void 0:_.reasoningEffort)!=null&&{effort:_.reasoningEffort},...(_==null?void 0:_.reasoningSummary)!=null&&{summary:_.reasoningSummary}}}};if(C){if(!((_==null?void 0:_.reasoningEffort)==="none"&&I.supportsNonReasoningParameters)){if(s.temperature!=null)s.temperature=void 0,w.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(s.top_p!=null)s.top_p=void 0,w.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})}}else{if((_==null?void 0:_.reasoningEffort)!=null)w.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if((_==null?void 0:_.reasoningSummary)!=null)w.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if((_==null?void 0:_.serviceTier)==="flex"&&!I.supportsFlexProcessing)w.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete s.service_tier;if((_==null?void 0:_.serviceTier)==="priority"&&!I.supportsPriorityProcessing)w.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete s.service_tier;let Z0=(q=(R=(M=z==null?void 0:z.find((a)=>a.type==="provider"&&a.id==="openai.shell"))==null?void 0:M.args)==null?void 0:R.environment)==null?void 0:q.type,X0=Z0==="containerAuto"||Z0==="containerReference";return{webSearchToolName:n,args:{...s,tools:T,tool_choice:v},warnings:[...w,...x],store:t,toolNameMapping:k,providerOptionsName:P,isShellProviderExecuted:X0}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D,L,B,O,E,M,R,q,w,I,P,_,C,k;let{args:S,warnings:T,webSearchToolName:v,toolNameMapping:x,providerOptionsName:y,isShellProviderExecuted:d}=await this.getArgs($),u=this.config.url({path:"/responses",modelId:this.modelId}),b=G94($.prompt),{responseHeaders:g,value:p,rawValue:h}=await G9({url:u,headers:p8(this.config.headers(),$.headers),body:S,failedResponseHandler:rK,successfulResponseHandler:T5(Ou8),abortSignal:$.abortSignal,fetch:this.config.fetch});if(p.error)throw new h7({message:p.error.message,url:u,requestBodyValues:S,statusCode:400,responseHeaders:g,responseBody:h,isRetryable:!1});let n=[],t=[],s=!1,Z0=[];for(let Q0 of p.output)switch(Q0.type){case"reasoning":{if(Q0.summary.length===0)Q0.summary.push({type:"summary_text",text:""});for(let e of Q0.summary)n.push({type:"reasoning",text:e.text,providerMetadata:{[y]:{itemId:Q0.id,reasoningEncryptedContent:(Y=Q0.encrypted_content)!=null?Y:null}}});break}case"image_generation_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("image_generation"),result:{result:Q0.result}});break}case"tool_search_call":{let e=(X=Q0.call_id)!=null?X:Q0.id,m=Q0.execution==="server";if(m)Z0.push(e);n.push({type:"tool-call",toolCallId:e,toolName:x.toCustomToolName("tool_search"),input:JSON.stringify({arguments:Q0.arguments,call_id:Q0.call_id}),...m?{providerExecuted:!0}:{},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"tool_search_output":{let e=(J=(G=Q0.call_id)!=null?G:Z0.shift())!=null?J:Q0.id;n.push({type:"tool-result",toolCallId:e,toolName:x.toCustomToolName("tool_search"),result:{tools:Q0.tools},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"local_shell_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("local_shell"),input:JSON.stringify({action:Q0.action}),providerMetadata:{[y]:{itemId:Q0.id}}});break}case"shell_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("shell"),input:JSON.stringify({action:{commands:Q0.action.commands}}),...d&&{providerExecuted:!0},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"shell_call_output":{n.push({type:"tool-result",toolCallId:Q0.call_id,toolName:x.toCustomToolName("shell"),result:{output:Q0.output.map((e)=>({stdout:e.stdout,stderr:e.stderr,outcome:e.outcome.type==="exit"?{type:"exit",exitCode:e.outcome.exit_code}:{type:"timeout"}}))}});break}case"message":{for(let e of Q0.content){if(((W=(Q=$.providerOptions)==null?void 0:Q[y])==null?void 0:W.logprobs)&&e.logprobs)t.push(e.logprobs);let m={itemId:Q0.id,...Q0.phase!=null&&{phase:Q0.phase},...e.annotations.length>0&&{annotations:e.annotations}};n.push({type:"text",text:e.text,providerMetadata:{[y]:m}});for(let $0 of e.annotations)if($0.type==="url_citation")n.push({type:"source",sourceType:"url",id:(H=(K=(Z=this.config).generateId)==null?void 0:K.call(Z))!=null?H:X9(),url:$0.url,title:$0.title});else if($0.type==="file_citation")n.push({type:"source",sourceType:"document",id:(A=(V=(z=this.config).generateId)==null?void 0:V.call(z))!=null?A:X9(),mediaType:"text/plain",title:$0.filename,filename:$0.filename,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,index:$0.index}}});else if($0.type==="container_file_citation")n.push({type:"source",sourceType:"document",id:(D=(N=(F=this.config).generateId)==null?void 0:N.call(F))!=null?D:X9(),mediaType:"text/plain",title:$0.filename,filename:$0.filename,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,containerId:$0.container_id}}});else if($0.type==="file_path")n.push({type:"source",sourceType:"document",id:(O=(B=(L=this.config).generateId)==null?void 0:B.call(L))!=null?O:X9(),mediaType:"application/octet-stream",title:$0.file_id,filename:$0.file_id,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,index:$0.index}}})}break}case"function_call":{s=!0,n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:Q0.name,input:Q0.arguments,providerMetadata:{[y]:{itemId:Q0.id,...Q0.namespace!=null&&{namespace:Q0.namespace}}}});break}case"custom_tool_call":{s=!0;let e=x.toCustomToolName(Q0.name);n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:e,input:JSON.stringify(Q0.input),providerMetadata:{[y]:{itemId:Q0.id}}});break}case"web_search_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName(v!=null?v:"web_search"),input:JSON.stringify({}),providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName(v!=null?v:"web_search"),result:Q94(Q0.action)});break}case"mcp_call":{let e=Q0.approval_request_id!=null?(E=b[Q0.approval_request_id])!=null?E:Q0.id:Q0.id,m=`mcp.${Q0.name}`;n.push({type:"tool-call",toolCallId:e,toolName:m,input:Q0.arguments,providerExecuted:!0,dynamic:!0}),n.push({type:"tool-result",toolCallId:e,toolName:m,result:{type:"call",serverLabel:Q0.server_label,name:Q0.name,arguments:Q0.arguments,...Q0.output!=null?{output:Q0.output}:{},...Q0.error!=null?{error:Q0.error}:{}},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"mcp_list_tools":break;case"mcp_approval_request":{let e=(M=Q0.approval_request_id)!=null?M:Q0.id,m=(w=(q=(R=this.config).generateId)==null?void 0:q.call(R))!=null?w:X9(),$0=`mcp.${Q0.name}`;n.push({type:"tool-call",toolCallId:m,toolName:$0,input:Q0.arguments,providerExecuted:!0,dynamic:!0}),n.push({type:"tool-approval-request",approvalId:e,toolCallId:m});break}case"computer_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:Q0.status||"completed"}});break}case"file_search_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("file_search"),input:"{}",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("file_search"),result:{queries:Q0.queries,results:(P=(I=Q0.results)==null?void 0:I.map((e)=>({attributes:e.attributes,fileId:e.file_id,filename:e.filename,score:e.score,text:e.text})))!=null?P:null}});break}case"code_interpreter_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("code_interpreter"),input:JSON.stringify({code:Q0.code,containerId:Q0.container_id}),providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("code_interpreter"),result:{outputs:Q0.outputs}});break}case"apply_patch_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("apply_patch"),input:JSON.stringify({callId:Q0.call_id,operation:Q0.operation}),providerMetadata:{[y]:{itemId:Q0.id}}});break}}let X0={[y]:{responseId:p.id,...t.length>0?{logprobs:t}:{},...typeof p.service_tier==="string"?{serviceTier:p.service_tier}:{}}},a=p.usage;return{content:n,finishReason:{unified:My0({finishReason:(_=p.incomplete_details)==null?void 0:_.reason,hasFunctionCall:s}),raw:(k=(C=p.incomplete_details)==null?void 0:C.reason)!=null?k:void 0},usage:$94(a),request:{body:S},response:{id:p.id,timestamp:new Date(p.created_at*1000),modelId:p.model,headers:g,body:h},providerMetadata:X0,warnings:T}}async doStream($){let{args:Y,warnings:X,webSearchToolName:G,toolNameMapping:J,store:Q,providerOptionsName:W,isShellProviderExecuted:Z}=await this.getArgs($),{responseHeaders:K,value:H}=await G9({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:{...Y,stream:!0},failedResponseHandler:rK,successfulResponseHandler:oK(Bu8),abortSignal:$.abortSignal,fetch:this.config.fetch}),z=this,V=G94($.prompt),A=new Map,F={unified:"other",raw:void 0},N=void 0,D=[],L=null,B={},O=[],E,M=!1,R={},q,w=[];return{stream:H.pipeThrough(new TransformStream({start(I){I.enqueue({type:"stream-start",warnings:X})},transform(I,P){var _,C,k,S,T,v,x,y,d,u,b,g,p,h,n,t,s,Z0,X0,a,Q0,e,m,$0,Y0,K0,A0,D0,O0,R0,I0,g0,p0,U4,P1,d1,C0,n0;if($.includeRawChunks)P.enqueue({type:"raw",rawValue:I.rawValue});if(!I.success){F={unified:"error",raw:void 0},P.enqueue({type:"error",error:I.error});return}let J0=I.value;if(J94(J0)){if(J0.item.type==="function_call")B[J0.output_index]={toolName:J0.item.name,toolCallId:J0.item.call_id},P.enqueue({type:"tool-input-start",id:J0.item.call_id,toolName:J0.item.name});else if(J0.item.type==="custom_tool_call"){let B0=J.toCustomToolName(J0.item.name);B[J0.output_index]={toolName:B0,toolCallId:J0.item.call_id},P.enqueue({type:"tool-input-start",id:J0.item.call_id,toolName:B0})}else if(J0.item.type==="web_search_call")B[J0.output_index]={toolName:J.toCustomToolName(G!=null?G:"web_search"),toolCallId:J0.item.id},P.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),providerExecuted:!0}),P.enqueue({type:"tool-input-end",id:J0.item.id}),P.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),input:JSON.stringify({}),providerExecuted:!0});else if(J0.item.type==="computer_call")B[J0.output_index]={toolName:J.toCustomToolName("computer_use"),toolCallId:J0.item.id},P.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName("computer_use"),providerExecuted:!0});else if(J0.item.type==="code_interpreter_call")B[J0.output_index]={toolName:J.toCustomToolName("code_interpreter"),toolCallId:J0.item.id,codeInterpreter:{containerId:J0.item.container_id}},P.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName("code_interpreter"),providerExecuted:!0}),P.enqueue({type:"tool-input-delta",id:J0.item.id,delta:`{"containerId":"${J0.item.container_id}","code":"`});else if(J0.item.type==="file_search_call")P.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("file_search"),input:"{}",providerExecuted:!0});else if(J0.item.type==="image_generation_call")P.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0});else if(J0.item.type==="tool_search_call"){let B0=J0.item.id,Y1=J.toCustomToolName("tool_search"),c1=J0.item.execution==="server";if(B[J0.output_index]={toolName:Y1,toolCallId:B0,toolSearchExecution:(_=J0.item.execution)!=null?_:"server"},c1)P.enqueue({type:"tool-input-start",id:B0,toolName:Y1,providerExecuted:!0})}else if(J0.item.type==="tool_search_output");else if(J0.item.type==="mcp_call"||J0.item.type==="mcp_list_tools"||J0.item.type==="mcp_approval_request");else if(J0.item.type==="apply_patch_call"){let{call_id:B0,operation:Y1}=J0.item;if(B[J0.output_index]={toolName:J.toCustomToolName("apply_patch"),toolCallId:B0,applyPatch:{hasDiff:Y1.type==="delete_file",endEmitted:Y1.type==="delete_file"}},P.enqueue({type:"tool-input-start",id:B0,toolName:J.toCustomToolName("apply_patch")}),Y1.type==="delete_file"){let c1=JSON.stringify({callId:B0,operation:Y1});P.enqueue({type:"tool-input-delta",id:B0,delta:c1}),P.enqueue({type:"tool-input-end",id:B0})}else P.enqueue({type:"tool-input-delta",id:B0,delta:`{"callId":"${FE(B0)}","operation":{"type":"${FE(Y1.type)}","path":"${FE(Y1.path)}","diff":"`})}else if(J0.item.type==="shell_call")B[J0.output_index]={toolName:J.toCustomToolName("shell"),toolCallId:J0.item.call_id};else if(J0.item.type==="shell_call_output");else if(J0.item.type==="message")O.splice(0,O.length),E=(C=J0.item.phase)!=null?C:void 0,P.enqueue({type:"text-start",id:J0.item.id,providerMetadata:{[W]:{itemId:J0.item.id,...J0.item.phase!=null&&{phase:J0.item.phase}}}});else if(J94(J0)&&J0.item.type==="reasoning")R[J0.item.id]={encryptedContent:J0.item.encrypted_content,summaryParts:{0:"active"}},P.enqueue({type:"reasoning-start",id:`${J0.item.id}:0`,providerMetadata:{[W]:{itemId:J0.item.id,reasoningEncryptedContent:(k=J0.item.encrypted_content)!=null?k:null}}})}else if(Pu8(J0)){if(J0.item.type==="message"){let B0=(S=J0.item.phase)!=null?S:E;E=void 0,P.enqueue({type:"text-end",id:J0.item.id,providerMetadata:{[W]:{itemId:J0.item.id,...B0!=null&&{phase:B0},...O.length>0&&{annotations:O}}}})}else if(J0.item.type==="function_call")B[J0.output_index]=void 0,M=!0,P.enqueue({type:"tool-input-end",id:J0.item.call_id,...J0.item.namespace!=null&&{providerMetadata:{[W]:{namespace:J0.item.namespace}}}}),P.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J0.item.name,input:J0.item.arguments,providerMetadata:{[W]:{itemId:J0.item.id,...J0.item.namespace!=null&&{namespace:J0.item.namespace}}}});else if(J0.item.type==="custom_tool_call"){B[J0.output_index]=void 0,M=!0;let B0=J.toCustomToolName(J0.item.name);P.enqueue({type:"tool-input-end",id:J0.item.call_id}),P.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:B0,input:JSON.stringify(J0.item.input),providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="web_search_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),result:Q94(J0.item.action)});else if(J0.item.type==="computer_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-input-end",id:J0.item.id}),P.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),P.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:J0.item.status||"completed"}});else if(J0.item.type==="file_search_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("file_search"),result:{queries:J0.item.queries,results:(v=(T=J0.item.results)==null?void 0:T.map((B0)=>({attributes:B0.attributes,fileId:B0.file_id,filename:B0.filename,score:B0.score,text:B0.text})))!=null?v:null}});else if(J0.item.type==="code_interpreter_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("code_interpreter"),result:{outputs:J0.item.outputs}});else if(J0.item.type==="image_generation_call")P.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("image_generation"),result:{result:J0.item.result}});else if(J0.item.type==="tool_search_call"){let B0=B[J0.output_index],Y1=J0.item.execution==="server";if(B0!=null){let c1=Y1?B0.toolCallId:(x=J0.item.call_id)!=null?x:J0.item.id;if(Y1)w.push(c1);else P.enqueue({type:"tool-input-start",id:c1,toolName:B0.toolName});P.enqueue({type:"tool-input-end",id:c1}),P.enqueue({type:"tool-call",toolCallId:c1,toolName:B0.toolName,input:JSON.stringify({arguments:J0.item.arguments,call_id:Y1?null:c1}),...Y1?{providerExecuted:!0}:{},providerMetadata:{[W]:{itemId:J0.item.id}}})}B[J0.output_index]=void 0}else if(J0.item.type==="tool_search_output"){let B0=(d=(y=J0.item.call_id)!=null?y:w.shift())!=null?d:J0.item.id;P.enqueue({type:"tool-result",toolCallId:B0,toolName:J.toCustomToolName("tool_search"),result:{tools:J0.item.tools},providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="mcp_call"){B[J0.output_index]=void 0;let B0=(u=J0.item.approval_request_id)!=null?u:void 0,Y1=B0!=null?(g=(b=A.get(B0))!=null?b:V[B0])!=null?g:J0.item.id:J0.item.id,c1=`mcp.${J0.item.name}`;P.enqueue({type:"tool-call",toolCallId:Y1,toolName:c1,input:J0.item.arguments,providerExecuted:!0,dynamic:!0}),P.enqueue({type:"tool-result",toolCallId:Y1,toolName:c1,result:{type:"call",serverLabel:J0.item.server_label,name:J0.item.name,arguments:J0.item.arguments,...J0.item.output!=null?{output:J0.item.output}:{},...J0.item.error!=null?{error:J0.item.error}:{}},providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="mcp_list_tools")B[J0.output_index]=void 0;else if(J0.item.type==="apply_patch_call"){let B0=B[J0.output_index];if((B0==null?void 0:B0.applyPatch)&&!B0.applyPatch.endEmitted&&J0.item.operation.type!=="delete_file"){if(!B0.applyPatch.hasDiff)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:FE(J0.item.operation.diff)});P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}}'}),P.enqueue({type:"tool-input-end",id:B0.toolCallId}),B0.applyPatch.endEmitted=!0}if(B0&&J0.item.status==="completed")P.enqueue({type:"tool-call",toolCallId:B0.toolCallId,toolName:J.toCustomToolName("apply_patch"),input:JSON.stringify({callId:J0.item.call_id,operation:J0.item.operation}),providerMetadata:{[W]:{itemId:J0.item.id}}});B[J0.output_index]=void 0}else if(J0.item.type==="mcp_approval_request"){B[J0.output_index]=void 0;let B0=(n=(h=(p=z.config).generateId)==null?void 0:h.call(p))!=null?n:X9(),Y1=(t=J0.item.approval_request_id)!=null?t:J0.item.id;A.set(Y1,B0);let c1=`mcp.${J0.item.name}`;P.enqueue({type:"tool-call",toolCallId:B0,toolName:c1,input:J0.item.arguments,providerExecuted:!0,dynamic:!0}),P.enqueue({type:"tool-approval-request",approvalId:Y1,toolCallId:B0})}else if(J0.item.type==="local_shell_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("local_shell"),input:JSON.stringify({action:{type:"exec",command:J0.item.action.command,timeoutMs:J0.item.action.timeout_ms,user:J0.item.action.user,workingDirectory:J0.item.action.working_directory,env:J0.item.action.env}}),providerMetadata:{[W]:{itemId:J0.item.id}}});else if(J0.item.type==="shell_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("shell"),input:JSON.stringify({action:{commands:J0.item.action.commands}}),...Z&&{providerExecuted:!0},providerMetadata:{[W]:{itemId:J0.item.id}}});else if(J0.item.type==="shell_call_output")P.enqueue({type:"tool-result",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("shell"),result:{output:J0.item.output.map((B0)=>({stdout:B0.stdout,stderr:B0.stderr,outcome:B0.outcome.type==="exit"?{type:"exit",exitCode:B0.outcome.exit_code}:{type:"timeout"}}))}});else if(J0.item.type==="reasoning"){let B0=R[J0.item.id],Y1=Object.entries(B0.summaryParts).filter(([c1,C4])=>C4==="active"||C4==="can-conclude").map(([c1])=>c1);for(let c1 of Y1)P.enqueue({type:"reasoning-end",id:`${J0.item.id}:${c1}`,providerMetadata:{[W]:{itemId:J0.item.id,reasoningEncryptedContent:(s=J0.item.encrypted_content)!=null?s:null}}});delete R[J0.item.id]}}else if(Tu8(J0)){let B0=B[J0.output_index];if(B0!=null)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:J0.delta})}else if(Cu8(J0)){let B0=B[J0.output_index];if(B0!=null)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:J0.delta})}else if(xu8(J0)){let B0=B[J0.output_index];if(B0==null?void 0:B0.applyPatch)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:FE(J0.delta)}),B0.applyPatch.hasDiff=!0}else if(yu8(J0)){let B0=B[J0.output_index];if((B0==null?void 0:B0.applyPatch)&&!B0.applyPatch.endEmitted){if(!B0.applyPatch.hasDiff)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:FE(J0.diff)}),B0.applyPatch.hasDiff=!0;P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}}'}),P.enqueue({type:"tool-input-end",id:B0.toolCallId}),B0.applyPatch.endEmitted=!0}}else if(Su8(J0))P.enqueue({type:"tool-result",toolCallId:J0.item_id,toolName:J.toCustomToolName("image_generation"),result:{result:J0.partial_image_b64},preliminary:!0});else if(ku8(J0)){let B0=B[J0.output_index];if(B0!=null)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:FE(J0.delta)})}else if(vu8(J0)){let B0=B[J0.output_index];if(B0!=null)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}'}),P.enqueue({type:"tool-input-end",id:B0.toolCallId}),P.enqueue({type:"tool-call",toolCallId:B0.toolCallId,toolName:J.toCustomToolName("code_interpreter"),input:JSON.stringify({code:J0.code,containerId:B0.codeInterpreter.containerId}),providerExecuted:!0})}else if(ju8(J0))L=J0.response.id,P.enqueue({type:"response-metadata",id:J0.response.id,timestamp:new Date(J0.response.created_at*1000),modelId:J0.response.model});else if(Iu8(J0)){if(P.enqueue({type:"text-delta",id:J0.item_id,delta:J0.delta}),((X0=(Z0=$.providerOptions)==null?void 0:Z0[W])==null?void 0:X0.logprobs)&&J0.logprobs)D.push(J0.logprobs)}else if(J0.type==="response.reasoning_summary_part.added"){if(J0.summary_index>0){let B0=R[J0.item_id];B0.summaryParts[J0.summary_index]="active";for(let Y1 of Object.keys(B0.summaryParts))if(B0.summaryParts[Y1]==="can-conclude")P.enqueue({type:"reasoning-end",id:`${J0.item_id}:${Y1}`,providerMetadata:{[W]:{itemId:J0.item_id}}}),B0.summaryParts[Y1]="concluded";P.enqueue({type:"reasoning-start",id:`${J0.item_id}:${J0.summary_index}`,providerMetadata:{[W]:{itemId:J0.item_id,reasoningEncryptedContent:(Q0=(a=R[J0.item_id])==null?void 0:a.encryptedContent)!=null?Q0:null}}})}}else if(J0.type==="response.reasoning_summary_text.delta")P.enqueue({type:"reasoning-delta",id:`${J0.item_id}:${J0.summary_index}`,delta:J0.delta,providerMetadata:{[W]:{itemId:J0.item_id}}});else if(J0.type==="response.reasoning_summary_part.done")if(Q)P.enqueue({type:"reasoning-end",id:`${J0.item_id}:${J0.summary_index}`,providerMetadata:{[W]:{itemId:J0.item_id}}}),R[J0.item_id].summaryParts[J0.summary_index]="concluded";else R[J0.item_id].summaryParts[J0.summary_index]="can-conclude";else if(wu8(J0)){if(F={unified:My0({finishReason:(e=J0.response.incomplete_details)==null?void 0:e.reason,hasFunctionCall:M}),raw:($0=(m=J0.response.incomplete_details)==null?void 0:m.reason)!=null?$0:void 0},N=J0.response.usage,typeof J0.response.service_tier==="string")q=J0.response.service_tier}else if(_u8(J0)){let B0=(Y0=J0.response.incomplete_details)==null?void 0:Y0.reason;F={unified:B0?My0({finishReason:B0,hasFunctionCall:M}):"error",raw:B0!=null?B0:"error"},N=(K0=J0.response.usage)!=null?K0:void 0}else if(bu8(J0)){if(O.push(J0.annotation),J0.annotation.type==="url_citation")P.enqueue({type:"source",sourceType:"url",id:(O0=(D0=(A0=z.config).generateId)==null?void 0:D0.call(A0))!=null?O0:X9(),url:J0.annotation.url,title:J0.annotation.title});else if(J0.annotation.type==="file_citation")P.enqueue({type:"source",sourceType:"document",id:(g0=(I0=(R0=z.config).generateId)==null?void 0:I0.call(R0))!=null?g0:X9(),mediaType:"text/plain",title:J0.annotation.filename,filename:J0.annotation.filename,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,index:J0.annotation.index}}});else if(J0.annotation.type==="container_file_citation")P.enqueue({type:"source",sourceType:"document",id:(P1=(U4=(p0=z.config).generateId)==null?void 0:U4.call(p0))!=null?P1:X9(),mediaType:"text/plain",title:J0.annotation.filename,filename:J0.annotation.filename,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,containerId:J0.annotation.container_id}}});else if(J0.annotation.type==="file_path")P.enqueue({type:"source",sourceType:"document",id:(n0=(C0=(d1=z.config).generateId)==null?void 0:C0.call(d1))!=null?n0:X9(),mediaType:"application/octet-stream",title:J0.annotation.file_id,filename:J0.annotation.file_id,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,index:J0.annotation.index}}})}else if(hu8(J0))P.enqueue({type:"error",error:J0})},flush(I){let P={[W]:{responseId:L,...D.length>0?{logprobs:D}:{},...q!==void 0?{serviceTier:q}:{}}};I.enqueue({type:"finish",finishReason:F,usage:$94(N),providerMetadata:P})}})),request:{body:Y},response:{headers:K}}}},fu8,gu8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({text:$,voice:Y="alloy",outputFormat:X="mp3",speed:G,instructions:J,language:Q,providerOptions:W}){let Z=[],K=await P9({provider:"openai",providerOptions:W,schema:fu8}),H={model:this.modelId,input:$,voice:Y,response_format:"mp3",speed:G,instructions:J};if(X)if(["mp3","opus","aac","flac","wav","pcm"].includes(X))H.response_format=X;else Z.push({type:"unsupported",feature:"outputFormat",details:`Unsupported output format: ${X}. Using mp3 instead.`});if(K){let z={};for(let V in z){let A=z[V];if(A!==void 0)H[V]=A}}if(Q)Z.push({type:"unsupported",feature:"language",details:`OpenAI speech models do not support language selection. Language parameter "${Q}" was ignored.`});return{requestBody:H,warnings:Z}}async doGenerate($){var Y,X,G;let J=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{requestBody:Q,warnings:W}=await this.getArgs($),{value:Z,responseHeaders:K,rawValue:H}=await G9({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:Q,failedResponseHandler:rK,successfulResponseHandler:ty0(),abortSignal:$.abortSignal,fetch:this.config.fetch});return{audio:Z,warnings:W,request:{body:JSON.stringify(Q)},response:{timestamp:J,modelId:this.modelId,headers:K,body:H}}}},mu8,uu8,W94,pu8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:$,mediaType:Y,providerOptions:X}){let G=[],J=await P9({provider:"openai",providerOptions:X,schema:uu8}),Q=new FormData,W=$ instanceof Uint8Array?new Blob([$]):new Blob([Qj($)]);Q.append("model",this.modelId);let Z=ry0(Y);if(Q.append("file",new File([W],"audio",{type:Y}),`audio.${Z}`),J){let K={include:J.include,language:J.language,prompt:J.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:J.temperature,timestamp_granularities:J.timestampGranularities};for(let[H,z]of Object.entries(K))if(z!=null)if(Array.isArray(z))for(let V of z)Q.append(`${H}[]`,String(V));else Q.append(H,String(z))}return{formData:Q,warnings:G}}async doGenerate($){var Y,X,G,J,Q,W,Z,K;let H=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{formData:z,warnings:V}=await this.getArgs($),{value:A,responseHeaders:F,rawValue:N}=await r90({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),formData:z,failedResponseHandler:rK,successfulResponseHandler:T5(mu8),abortSignal:$.abortSignal,fetch:this.config.fetch}),D=A.language!=null&&A.language in W94?W94[A.language]:void 0;return{text:A.text,segments:(Z=(W=(J=A.segments)==null?void 0:J.map((L)=>({text:L.text,startSecond:L.start,endSecond:L.end})))!=null?W:(Q=A.words)==null?void 0:Q.map((L)=>({text:L.word,startSecond:L.start,endSecond:L.end})))!=null?Z:[],language:D,durationInSeconds:(K=A.duration)!=null?K:void 0,warnings:V,response:{timestamp:H,modelId:this.modelId,headers:F,body:N}}}},du8="3.0.63",$b0,MD=class{getId(){return this.id}shouldEnable(){return!0}serializeForSpan(){return{id:this.id,name:this.name}}},hU="mastra/1.35.0",M74,R74,Yb0="X-Memory-Gateway-Authorization",cu8="3.0.76",lu8,Z94,iu8,nu8,ru8,K94,U94,H94=4,Xb0=class{constructor(){this.breakpointCount=0,this.warnings=[]}getCacheControl($,Y){let X=au8($);if(!X)return;if(!Y.canCache){this.warnings.push({type:"unsupported",feature:"cache_control on non-cacheable context",details:`cache_control cannot be set on ${Y.type}. It will be ignored.`});return}if(this.breakpointCount++,this.breakpointCount>H94){this.warnings.push({type:"unsupported",feature:"cacheControl breakpoint limit",details:`Maximum ${H94} cache breakpoints exceeded (found ${this.breakpointCount}). This breakpoint will be ignored.`});return}return X}getWarnings(){return this.warnings}},su8,ou8,tu8,eu8=($={})=>{return tu8($)},$p8,Yp8,Xp8,Gp8,Jp8=($={})=>{return Gp8($)},Qp8,q74,Wp8,Zp8,Kp8=($={})=>{return Zp8($)},Up8,Hp8,zp8,Vp8,Ap8=($={})=>{return Vp8($)},Fp8,I74,Dp8,Np8,Lp8=($={})=>{return Np8($)},P74,Op8,Ep8,Mp8=($={})=>{return Ep8($)},w74,Rp8,qp8,Ip8=($={})=>{return qp8($)},_74,Pp8,wp8,_p8=($={})=>{return wp8($)},j74,jp8,Tp8,Cp8=($={})=>{return Tp8($)},T74,yp8,up8=class{constructor($,Y){this.specificationVersion="v3";var X;this.modelId=$,this.config=Y,this.generateId=(X=Y.generateId)!=null?X:X9}supportsUrl($){return $.protocol==="https:"}get provider(){return this.config.provider}get providerOptionsName(){let $=this.config.provider,Y=$.indexOf(".");return Y===-1?$:$.substring(0,Y)}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}async getArgs({userSuppliedBetas:$,prompt:Y,maxOutputTokens:X,temperature:G,topP:J,topK:Q,frequencyPenalty:W,presencePenalty:Z,stopSequences:K,responseFormat:H,seed:z,tools:V,toolChoice:A,providerOptions:F,stream:N}){var D,L,B,O,E,M,R,q,w,I;let P=[];if(W!=null)P.push({type:"unsupported",feature:"frequencyPenalty"});if(Z!=null)P.push({type:"unsupported",feature:"presencePenalty"});if(z!=null)P.push({type:"unsupported",feature:"seed"});if(G!=null&&G>1)P.push({type:"unsupported",feature:"temperature",details:`${G} exceeds anthropic maximum of 1.0. clamped to 1.0`}),G=1;else if(G!=null&&G<0)P.push({type:"unsupported",feature:"temperature",details:`${G} is below anthropic minimum of 0. clamped to 0`}),G=0;if((H==null?void 0:H.type)==="json"){if(H.schema==null)P.push({type:"unsupported",feature:"responseFormat",details:"JSON response format requires a schema. The response format is ignored."})}let _=this.providerOptionsName,C=await P9({provider:"anthropic",providerOptions:F,schema:U94}),k=_!=="anthropic"?await P9({provider:_,providerOptions:F,schema:U94}):null,S=k!=null,T=Object.assign({},C!=null?C:{},k!=null?k:{}),{maxOutputTokens:v,supportsStructuredOutput:x,rejectsSamplingParameters:y,isKnownModel:d}=pp8(this.modelId);if(y){if(G!=null)P.push({type:"unsupported",feature:"temperature",details:`temperature is not supported by ${this.modelId} and will be ignored`}),G=void 0;if(Q!=null)P.push({type:"unsupported",feature:"topK",details:`topK is not supported by ${this.modelId} and will be ignored`}),Q=void 0;if(J!=null)P.push({type:"unsupported",feature:"topP",details:`topP is not supported by ${this.modelId} and will be ignored`}),J=void 0}let u=d||this.modelId.startsWith("claude-"),b=((D=this.config.supportsNativeStructuredOutput)!=null?D:!0)&&x,g=((L=this.config.supportsStrictTools)!=null?L:!0)&&x,p=(B=T==null?void 0:T.structuredOutputMode)!=null?B:"auto",h=p==="outputFormat"||p==="auto"&&b,n=(H==null?void 0:H.type)==="json"&&H.schema!=null&&!h?{type:"function",name:"json",description:"Respond with a JSON object.",inputSchema:H.schema}:void 0,t=T==null?void 0:T.contextManagement,s=new Xb0,Z0=l54({tools:V,providerToolNames:{"anthropic.code_execution_20250522":"code_execution","anthropic.code_execution_20250825":"code_execution","anthropic.code_execution_20260120":"code_execution","anthropic.computer_20241022":"computer","anthropic.computer_20250124":"computer","anthropic.text_editor_20241022":"str_replace_editor","anthropic.text_editor_20250124":"str_replace_editor","anthropic.text_editor_20250429":"str_replace_based_edit_tool","anthropic.text_editor_20250728":"str_replace_based_edit_tool","anthropic.bash_20241022":"bash","anthropic.bash_20250124":"bash","anthropic.memory_20250818":"memory","anthropic.web_search_20250305":"web_search","anthropic.web_search_20260209":"web_search","anthropic.web_fetch_20250910":"web_fetch","anthropic.web_fetch_20260209":"web_fetch","anthropic.tool_search_regex_20251119":"tool_search_tool_regex","anthropic.tool_search_bm25_20251119":"tool_search_tool_bm25"}}),{prompt:X0,betas:a}=await vp8({prompt:Y,sendReasoning:(O=T==null?void 0:T.sendReasoning)!=null?O:!0,warnings:P,cacheControlValidator:s,toolNameMapping:Z0}),Q0=(E=T==null?void 0:T.thinking)==null?void 0:E.type,e=Q0==="enabled"||Q0==="adaptive",m=Q0==="enabled"?(M=T==null?void 0:T.thinking)==null?void 0:M.budgetTokens:void 0,$0=Q0==="adaptive"?(R=T==null?void 0:T.thinking)==null?void 0:R.display:void 0,Y0=X!=null?X:v,K0={model:this.modelId,max_tokens:Y0,temperature:G,top_k:Q,top_p:J,stop_sequences:K,...e&&{thinking:{type:Q0,...m!=null&&{budget_tokens:m},...$0!=null&&{display:$0}}},...((T==null?void 0:T.effort)||(T==null?void 0:T.taskBudget)||h&&(H==null?void 0:H.type)==="json"&&H.schema!=null)&&{output_config:{...(T==null?void 0:T.effort)&&{effort:T.effort},...(T==null?void 0:T.taskBudget)&&{task_budget:{type:T.taskBudget.type,total:T.taskBudget.total,...T.taskBudget.remaining!=null&&{remaining:T.taskBudget.remaining}}},...h&&(H==null?void 0:H.type)==="json"&&H.schema!=null&&{format:{type:"json_schema",schema:bp8(H.schema)}}}},...(T==null?void 0:T.speed)&&{speed:T.speed},...(T==null?void 0:T.inferenceGeo)&&{inference_geo:T.inferenceGeo},...(T==null?void 0:T.cacheControl)&&{cache_control:T.cacheControl},...((q=T==null?void 0:T.metadata)==null?void 0:q.userId)!=null&&{metadata:{user_id:T.metadata.userId}},...(T==null?void 0:T.mcpServers)&&T.mcpServers.length>0&&{mcp_servers:T.mcpServers.map((p0)=>({type:p0.type,name:p0.name,url:p0.url,authorization_token:p0.authorizationToken,tool_configuration:p0.toolConfiguration?{allowed_tools:p0.toolConfiguration.allowedTools,enabled:p0.toolConfiguration.enabled}:void 0}))},...(T==null?void 0:T.container)&&{container:T.container.skills&&T.container.skills.length>0?{id:T.container.id,skills:T.container.skills.map((p0)=>({type:p0.type,skill_id:p0.skillId,version:p0.version}))}:T.container.id},system:X0.system,messages:X0.messages,...t&&{context_management:{edits:t.edits.map((p0)=>{let U4=p0.type;switch(U4){case"clear_tool_uses_20250919":return{type:p0.type,...p0.trigger!==void 0&&{trigger:p0.trigger},...p0.keep!==void 0&&{keep:p0.keep},...p0.clearAtLeast!==void 0&&{clear_at_least:p0.clearAtLeast},...p0.clearToolInputs!==void 0&&{clear_tool_inputs:p0.clearToolInputs},...p0.excludeTools!==void 0&&{exclude_tools:p0.excludeTools}};case"clear_thinking_20251015":return{type:p0.type,...p0.keep!==void 0&&{keep:p0.keep}};case"compact_20260112":return{type:p0.type,...p0.trigger!==void 0&&{trigger:p0.trigger},...p0.pauseAfterCompaction!==void 0&&{pause_after_compaction:p0.pauseAfterCompaction},...p0.instructions!==void 0&&{instructions:p0.instructions}};default:P.push({type:"other",message:`Unknown context management strategy: ${U4}`});return}}).filter((p0)=>p0!==void 0)}}};if(e){if(Q0==="enabled"&&m==null)P.push({type:"compatibility",feature:"extended thinking",details:"thinking budget is required when thinking is enabled. using default budget of 1024 tokens."}),K0.thinking={type:"enabled",budget_tokens:1024},m=1024;if(K0.temperature!=null)K0.temperature=void 0,P.push({type:"unsupported",feature:"temperature",details:"temperature is not supported when thinking is enabled"});if(Q!=null)K0.top_k=void 0,P.push({type:"unsupported",feature:"topK",details:"topK is not supported when thinking is enabled"});if(J!=null)K0.top_p=void 0,P.push({type:"unsupported",feature:"topP",details:"topP is not supported when thinking is enabled"});K0.max_tokens=Y0+(m!=null?m:0)}else if(u&&J!=null&&G!=null)P.push({type:"unsupported",feature:"topP",details:"topP is not supported when temperature is set. topP is ignored."}),K0.top_p=void 0;if(d&&K0.max_tokens>v){if(X!=null)P.push({type:"unsupported",feature:"maxOutputTokens",details:`${K0.max_tokens} (maxOutputTokens + thinkingBudget) is greater than ${this.modelId} ${v} max output tokens. The max output tokens have been limited to ${v}.`});K0.max_tokens=v}if((T==null?void 0:T.mcpServers)&&T.mcpServers.length>0)a.add("mcp-client-2025-04-04");if(t){if(a.add("context-management-2025-06-27"),t.edits.some((p0)=>p0.type==="compact_20260112"))a.add("compact-2026-01-12")}if((T==null?void 0:T.container)&&T.container.skills&&T.container.skills.length>0){if(a.add("code-execution-2025-08-25"),a.add("skills-2025-10-02"),a.add("files-api-2025-04-14"),!(V==null?void 0:V.some((p0)=>p0.type==="provider"&&(p0.id==="anthropic.code_execution_20250825"||p0.id==="anthropic.code_execution_20260120"))))P.push({type:"other",message:"code execution tool is required when using skills"})}if(T==null?void 0:T.taskBudget)a.add("task-budgets-2026-03-13");if((T==null?void 0:T.speed)==="fast")a.add("fast-mode-2026-02-01");let A0=N&&((w=T==null?void 0:T.toolStreaming)!=null?w:!0),{tools:D0,toolChoice:O0,toolWarnings:R0,betas:I0}=await Bp8(n!=null?{tools:[...V!=null?V:[],n],toolChoice:{type:"required"},disableParallelToolUse:!0,cacheControlValidator:s,supportsStructuredOutput:!1,supportsStrictTools:g,defaultEagerInputStreaming:A0}:{tools:V!=null?V:[],toolChoice:A,disableParallelToolUse:T==null?void 0:T.disableParallelToolUse,cacheControlValidator:s,supportsStructuredOutput:b,supportsStrictTools:g,defaultEagerInputStreaming:A0}),g0=s.getWarnings();return{args:{...K0,tools:D0,tool_choice:O0,stream:N===!0?!0:void 0},warnings:[...P,...R0,...g0],betas:new Set([...a,...I0,...$,...(I=T==null?void 0:T.anthropicBeta)!=null?I:[]]),usesJsonResponseTool:n!=null,toolNameMapping:Z0,providerOptionsName:_,usedCustomProviderKey:S}}async getHeaders({betas:$,headers:Y}){return p8(await lK(this.config.headers),Y,$.size>0?{"anthropic-beta":Array.from($).join(",")}:{})}async getBetasFromHeaders($){var Y,X;let J=(Y=(await lK(this.config.headers))["anthropic-beta"])!=null?Y:"",Q=(X=$==null?void 0:$["anthropic-beta"])!=null?X:"";return new Set([...J.toLowerCase().split(","),...Q.toLowerCase().split(",")].map((W)=>W.trim()).filter((W)=>W!==""))}buildRequestUrl($){var Y,X,G;return(G=(X=(Y=this.config).buildRequestUrl)==null?void 0:X.call(Y,this.config.baseURL,$))!=null?G:`${this.config.baseURL}/messages`}transformRequestBody($,Y){var X,G,J;return(J=(G=(X=this.config).transformRequestBody)==null?void 0:G.call(X,$,Y))!=null?J:$}extractCitationDocuments($){let Y=(X)=>{var G,J;if(X.type!=="file")return!1;if(X.mediaType!=="application/pdf"&&X.mediaType!=="text/plain")return!1;let Q=(G=X.providerOptions)==null?void 0:G.anthropic,W=Q==null?void 0:Q.citations;return(J=W==null?void 0:W.enabled)!=null?J:!1};return $.filter((X)=>X.role==="user").flatMap((X)=>X.content).filter(Y).map((X)=>{var G;let J=X;return{title:(G=J.filename)!=null?G:"Untitled Document",filename:J.filename,mediaType:J.mediaType}})}async doGenerate($){var Y,X,G,J,Q,W,Z;let{args:K,warnings:H,betas:z,usesJsonResponseTool:V,toolNameMapping:A,providerOptionsName:F,usedCustomProviderKey:N}=await this.getArgs({...$,stream:!1,userSuppliedBetas:await this.getBetasFromHeaders($.headers)}),D=[...this.extractCitationDocuments($.prompt)],L=A94(K.tools),{responseHeaders:B,value:O,rawValue:E}=await G9({url:this.buildRequestUrl(!1),headers:await this.getHeaders({betas:z,headers:$.headers}),body:this.transformRequestBody(K,z),failedResponseHandler:Z94,successfulResponseHandler:T5(iu8),abortSignal:$.abortSignal,fetch:this.config.fetch}),M=[],R={},q={},w=!1;for(let I of O.content)switch(I.type){case"text":{if(!V){if(M.push({type:"text",text:I.text}),I.citations)for(let P of I.citations){let _=V94(P,D,this.generateId);if(_)M.push(_)}}break}case"thinking":{M.push({type:"reasoning",text:I.thinking,providerMetadata:{anthropic:{signature:I.signature}}});break}case"redacted_thinking":{M.push({type:"reasoning",text:"",providerMetadata:{anthropic:{redactedData:I.data}}});break}case"compaction":{M.push({type:"text",text:I.content,providerMetadata:{anthropic:{type:"compaction"}}});break}case"tool_use":{if(V&&I.name==="json")w=!0,M.push({type:"text",text:JSON.stringify(I.input)});else{let _=I.caller,C=_?{type:_.type,toolId:"tool_id"in _?_.tool_id:void 0}:void 0;M.push({type:"tool-call",toolCallId:I.id,toolName:I.name,input:JSON.stringify(I.input),...C&&{providerMetadata:{anthropic:{caller:C}}}})}break}case"server_tool_use":{if(I.name==="text_editor_code_execution"||I.name==="bash_code_execution")M.push({type:"tool-call",toolCallId:I.id,toolName:A.toCustomToolName("code_execution"),input:JSON.stringify({type:I.name,...I.input}),providerExecuted:!0});else if(I.name==="web_search"||I.name==="code_execution"||I.name==="web_fetch"){let P=I.name==="code_execution"&&I.input!=null&&typeof I.input==="object"&&"code"in I.input&&!("type"in I.input)?{type:"programmatic-tool-call",...I.input}:I.input;M.push({type:"tool-call",toolCallId:I.id,toolName:A.toCustomToolName(I.name),input:JSON.stringify(P),providerExecuted:!0,...L&&I.name==="code_execution"?{dynamic:!0}:{}})}else if(I.name==="tool_search_tool_regex"||I.name==="tool_search_tool_bm25")q[I.id]=I.name,M.push({type:"tool-call",toolCallId:I.id,toolName:A.toCustomToolName(I.name),input:JSON.stringify(I.input),providerExecuted:!0});break}case"mcp_tool_use":{R[I.id]={type:"tool-call",toolCallId:I.id,toolName:I.name,input:JSON.stringify(I.input),providerExecuted:!0,dynamic:!0,providerMetadata:{anthropic:{type:"mcp-tool-use",serverName:I.server_name}}},M.push(R[I.id]);break}case"mcp_tool_result":{M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:R[I.tool_use_id].toolName,isError:I.is_error,result:I.content,dynamic:!0,providerMetadata:R[I.tool_use_id].providerMetadata});break}case"web_fetch_tool_result":{if(I.content.type==="web_fetch_result")D.push({title:(Y=I.content.content.title)!=null?Y:I.content.url,mediaType:I.content.content.source.media_type}),M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:A.toCustomToolName("web_fetch"),result:{type:"web_fetch_result",url:I.content.url,retrievedAt:I.content.retrieved_at,content:{type:I.content.content.type,title:I.content.content.title,citations:I.content.content.citations,source:{type:I.content.content.source.type,mediaType:I.content.content.source.media_type,data:I.content.content.source.data}}}});else if(I.content.type==="web_fetch_tool_result_error")M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:A.toCustomToolName("web_fetch"),isError:!0,result:{type:"web_fetch_tool_result_error",errorCode:I.content.error_code}});break}case"web_search_tool_result":{if(Array.isArray(I.content)){M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:A.toCustomToolName("web_search"),result:I.content.map((P)=>{var _;return{url:P.url,title:P.title,pageAge:(_=P.page_age)!=null?_:null,encryptedContent:P.encrypted_content,type:P.type}})});for(let P of I.content)M.push({type:"source",sourceType:"url",id:this.generateId(),url:P.url,title:P.title,providerMetadata:{anthropic:{pageAge:(X=P.page_age)!=null?X:null}}})}else M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:A.toCustomToolName("web_search"),isError:!0,result:{type:"web_search_tool_result_error",errorCode:I.content.error_code}});break}case"code_execution_tool_result":{if(I.content.type==="code_execution_result")M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:A.toCustomToolName("code_execution"),result:{type:I.content.type,stdout:I.content.stdout,stderr:I.content.stderr,return_code:I.content.return_code,content:(G=I.content.content)!=null?G:[]}});else if(I.content.type==="encrypted_code_execution_result")M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:A.toCustomToolName("code_execution"),result:{type:I.content.type,encrypted_stdout:I.content.encrypted_stdout,stderr:I.content.stderr,return_code:I.content.return_code,content:(J=I.content.content)!=null?J:[]}});else if(I.content.type==="code_execution_tool_result_error")M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:A.toCustomToolName("code_execution"),isError:!0,result:{type:"code_execution_tool_result_error",errorCode:I.content.error_code}});break}case"bash_code_execution_tool_result":case"text_editor_code_execution_tool_result":{M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:A.toCustomToolName("code_execution"),result:I.content});break}case"tool_search_tool_result":{let P=q[I.tool_use_id];if(P==null){let _=A.toCustomToolName("tool_search_tool_bm25"),C=A.toCustomToolName("tool_search_tool_regex");if(_!=="tool_search_tool_bm25")P="tool_search_tool_bm25";else if(C!=="tool_search_tool_regex")P="tool_search_tool_regex";else P="tool_search_tool_regex"}if(I.content.type==="tool_search_tool_search_result")M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:A.toCustomToolName(P),result:I.content.tool_references.map((_)=>({type:_.type,toolName:_.tool_name}))});else M.push({type:"tool-result",toolCallId:I.tool_use_id,toolName:A.toCustomToolName(P),isError:!0,result:{type:"tool_search_tool_result_error",errorCode:I.content.error_code}});break}}return{content:M,finishReason:{unified:Iy0({finishReason:O.stop_reason,isJsonResponseFromTool:w}),raw:(Q=O.stop_reason)!=null?Q:void 0},usage:z94({usage:O.usage}),request:{body:K},response:{id:(W=O.id)!=null?W:void 0,modelId:(Z=O.model)!=null?Z:void 0,headers:B,body:E},warnings:H,providerMetadata:(()=>{var I,P,_,C,k;let S={usage:O.usage,cacheCreationInputTokens:(I=O.usage.cache_creation_input_tokens)!=null?I:null,stopSequence:(P=O.stop_sequence)!=null?P:null,iterations:O.usage.iterations?O.usage.iterations.map((v)=>({type:v.type,inputTokens:v.input_tokens,outputTokens:v.output_tokens})):null,container:O.container?{expiresAt:O.container.expires_at,id:O.container.id,skills:(C=(_=O.container.skills)==null?void 0:_.map((v)=>({type:v.type,skillId:v.skill_id,version:v.version})))!=null?C:null}:null,contextManagement:(k=F94(O.context_management))!=null?k:null},T={anthropic:S};if(N&&F!=="anthropic")T[F]=S;return T})()}}async doStream($){var Y,X;let{args:G,warnings:J,betas:Q,usesJsonResponseTool:W,toolNameMapping:Z,providerOptionsName:K,usedCustomProviderKey:H}=await this.getArgs({...$,stream:!0,userSuppliedBetas:await this.getBetasFromHeaders($.headers)}),z=[...this.extractCitationDocuments($.prompt)],V=A94(G.tools),A=this.buildRequestUrl(!0),{responseHeaders:F,value:N}=await G9({url:A,headers:await this.getHeaders({betas:Q,headers:$.headers}),body:this.transformRequestBody(G,Q),failedResponseHandler:Z94,successfulResponseHandler:oK(nu8),abortSignal:$.abortSignal,fetch:this.config.fetch}),D={unified:"other",raw:void 0},L={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0,iterations:null},B={},O={},E={},M=null,R=void 0,q=null,w=null,I=null,P=!1,_=void 0,C=this.generateId,k=N.pipeThrough(new TransformStream({start(x){x.enqueue({type:"stream-start",warnings:J})},transform(x,y){var d,u,b,g,p,h,n,t,s,Z0,X0,a,Q0,e;if($.includeRawChunks)y.enqueue({type:"raw",rawValue:x.rawValue});if(!x.success){y.enqueue({type:"error",error:x.error});return}let m=x.value;switch(m.type){case"ping":return;case"content_block_start":{let $0=m.content_block,Y0=$0.type;switch(_=Y0,Y0){case"text":{if(W)return;B[m.index]={type:"text"},y.enqueue({type:"text-start",id:String(m.index)});return}case"thinking":{B[m.index]={type:"reasoning"},y.enqueue({type:"reasoning-start",id:String(m.index)});return}case"redacted_thinking":{B[m.index]={type:"reasoning"},y.enqueue({type:"reasoning-start",id:String(m.index),providerMetadata:{anthropic:{redactedData:$0.data}}});return}case"compaction":{B[m.index]={type:"text"},y.enqueue({type:"text-start",id:String(m.index),providerMetadata:{anthropic:{type:"compaction"}}});return}case"tool_use":{if(W&&$0.name==="json")P=!0,B[m.index]={type:"text"},y.enqueue({type:"text-start",id:String(m.index)});else{let A0=$0.caller,D0=A0?{type:A0.type,toolId:"tool_id"in A0?A0.tool_id:void 0}:void 0,R0=$0.input&&Object.keys($0.input).length>0?JSON.stringify($0.input):"";B[m.index]={type:"tool-call",toolCallId:$0.id,toolName:$0.name,input:R0,firstDelta:R0.length===0,...D0&&{caller:D0}},y.enqueue({type:"tool-input-start",id:$0.id,toolName:$0.name})}return}case"server_tool_use":{if(["web_fetch","web_search","code_execution","text_editor_code_execution","bash_code_execution"].includes($0.name)){let K0=$0.name==="text_editor_code_execution"||$0.name==="bash_code_execution"?"code_execution":$0.name,A0=Z.toCustomToolName(K0),D0=$0.input!=null&&typeof $0.input==="object"&&Object.keys($0.input).length>0?JSON.stringify($0.input):"";B[m.index]={type:"tool-call",toolCallId:$0.id,toolName:A0,input:D0,providerExecuted:!0,...V&&K0==="code_execution"?{dynamic:!0}:{},firstDelta:!0,providerToolName:$0.name},y.enqueue({type:"tool-input-start",id:$0.id,toolName:A0,providerExecuted:!0,...V&&K0==="code_execution"?{dynamic:!0}:{}})}else if($0.name==="tool_search_tool_regex"||$0.name==="tool_search_tool_bm25"){E[$0.id]=$0.name;let K0=Z.toCustomToolName($0.name);B[m.index]={type:"tool-call",toolCallId:$0.id,toolName:K0,input:"",providerExecuted:!0,firstDelta:!0,providerToolName:$0.name},y.enqueue({type:"tool-input-start",id:$0.id,toolName:K0,providerExecuted:!0})}return}case"web_fetch_tool_result":{if($0.content.type==="web_fetch_result")z.push({title:(d=$0.content.content.title)!=null?d:$0.content.url,mediaType:$0.content.content.source.media_type}),y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:Z.toCustomToolName("web_fetch"),result:{type:"web_fetch_result",url:$0.content.url,retrievedAt:$0.content.retrieved_at,content:{type:$0.content.content.type,title:$0.content.content.title,citations:$0.content.content.citations,source:{type:$0.content.content.source.type,mediaType:$0.content.content.source.media_type,data:$0.content.content.source.data}}}});else if($0.content.type==="web_fetch_tool_result_error")y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:Z.toCustomToolName("web_fetch"),isError:!0,result:{type:"web_fetch_tool_result_error",errorCode:$0.content.error_code}});return}case"web_search_tool_result":{if(Array.isArray($0.content)){y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:Z.toCustomToolName("web_search"),result:$0.content.map((K0)=>{var A0;return{url:K0.url,title:K0.title,pageAge:(A0=K0.page_age)!=null?A0:null,encryptedContent:K0.encrypted_content,type:K0.type}})});for(let K0 of $0.content)y.enqueue({type:"source",sourceType:"url",id:C(),url:K0.url,title:K0.title,providerMetadata:{anthropic:{pageAge:(u=K0.page_age)!=null?u:null}}})}else y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:Z.toCustomToolName("web_search"),isError:!0,result:{type:"web_search_tool_result_error",errorCode:$0.content.error_code}});return}case"code_execution_tool_result":{if($0.content.type==="code_execution_result")y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:Z.toCustomToolName("code_execution"),result:{type:$0.content.type,stdout:$0.content.stdout,stderr:$0.content.stderr,return_code:$0.content.return_code,content:(b=$0.content.content)!=null?b:[]}});else if($0.content.type==="encrypted_code_execution_result")y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:Z.toCustomToolName("code_execution"),result:{type:$0.content.type,encrypted_stdout:$0.content.encrypted_stdout,stderr:$0.content.stderr,return_code:$0.content.return_code,content:(g=$0.content.content)!=null?g:[]}});else if($0.content.type==="code_execution_tool_result_error")y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:Z.toCustomToolName("code_execution"),isError:!0,result:{type:"code_execution_tool_result_error",errorCode:$0.content.error_code}});return}case"bash_code_execution_tool_result":case"text_editor_code_execution_tool_result":{y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:Z.toCustomToolName("code_execution"),result:$0.content});return}case"tool_search_tool_result":{let K0=E[$0.tool_use_id];if(K0==null){let A0=Z.toCustomToolName("tool_search_tool_bm25"),D0=Z.toCustomToolName("tool_search_tool_regex");if(A0!=="tool_search_tool_bm25")K0="tool_search_tool_bm25";else if(D0!=="tool_search_tool_regex")K0="tool_search_tool_regex";else K0="tool_search_tool_regex"}if($0.content.type==="tool_search_tool_search_result")y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:Z.toCustomToolName(K0),result:$0.content.tool_references.map((A0)=>({type:A0.type,toolName:A0.tool_name}))});else y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:Z.toCustomToolName(K0),isError:!0,result:{type:"tool_search_tool_result_error",errorCode:$0.content.error_code}});return}case"mcp_tool_use":{O[$0.id]={type:"tool-call",toolCallId:$0.id,toolName:$0.name,input:JSON.stringify($0.input),providerExecuted:!0,dynamic:!0,providerMetadata:{anthropic:{type:"mcp-tool-use",serverName:$0.server_name}}},y.enqueue(O[$0.id]);return}case"mcp_tool_result":{y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:O[$0.tool_use_id].toolName,isError:$0.is_error,result:$0.content,dynamic:!0,providerMetadata:O[$0.tool_use_id].providerMetadata});return}default:throw Error(`Unsupported content block type: ${Y0}`)}}case"content_block_stop":{if(B[m.index]!=null){let $0=B[m.index];switch($0.type){case"text":{y.enqueue({type:"text-end",id:String(m.index)});break}case"reasoning":{y.enqueue({type:"reasoning-end",id:String(m.index)});break}case"tool-call":if(!(W&&$0.toolName==="json")){y.enqueue({type:"tool-input-end",id:$0.toolCallId});let K0=$0.input===""?"{}":$0.input;if($0.providerToolName==="code_execution")try{let A0=JSON.parse(K0);if(A0!=null&&typeof A0==="object"&&"code"in A0&&!("type"in A0))K0=JSON.stringify({type:"programmatic-tool-call",...A0})}catch(A0){}y.enqueue({type:"tool-call",toolCallId:$0.toolCallId,toolName:$0.toolName,input:K0,providerExecuted:$0.providerExecuted,...V&&$0.providerToolName==="code_execution"?{dynamic:!0}:{},...$0.caller&&{providerMetadata:{anthropic:{caller:$0.caller}}}})}break}delete B[m.index]}_=void 0;return}case"content_block_delta":{let $0=m.delta.type;switch($0){case"text_delta":{if(W)return;y.enqueue({type:"text-delta",id:String(m.index),delta:m.delta.text});return}case"thinking_delta":{y.enqueue({type:"reasoning-delta",id:String(m.index),delta:m.delta.thinking});return}case"signature_delta":{if(_==="thinking")y.enqueue({type:"reasoning-delta",id:String(m.index),delta:"",providerMetadata:{anthropic:{signature:m.delta.signature}}});return}case"compaction_delta":{if(m.delta.content!=null)y.enqueue({type:"text-delta",id:String(m.index),delta:m.delta.content});return}case"input_json_delta":{let Y0=B[m.index],K0=m.delta.partial_json;if(K0.length===0)return;if(P){if((Y0==null?void 0:Y0.type)!=="text")return;y.enqueue({type:"text-delta",id:String(m.index),delta:K0})}else{if((Y0==null?void 0:Y0.type)!=="tool-call")return;if(Y0.firstDelta&&(Y0.providerToolName==="bash_code_execution"||Y0.providerToolName==="text_editor_code_execution"))K0=`{"type": "${Y0.providerToolName}",${K0.substring(1)}`;y.enqueue({type:"tool-input-delta",id:Y0.toolCallId,delta:K0}),Y0.input+=K0,Y0.firstDelta=!1}return}case"citations_delta":{let Y0=m.delta.citation,K0=V94(Y0,z,C);if(K0)y.enqueue(K0);return}default:throw Error(`Unsupported delta type: ${$0}`)}}case"message_start":{if(L.input_tokens=m.message.usage.input_tokens,L.cache_read_input_tokens=(p=m.message.usage.cache_read_input_tokens)!=null?p:0,L.cache_creation_input_tokens=(h=m.message.usage.cache_creation_input_tokens)!=null?h:0,R={...m.message.usage},q=(n=m.message.usage.cache_creation_input_tokens)!=null?n:null,m.message.container!=null)I={expiresAt:m.message.container.expires_at,id:m.message.container.id,skills:null};if(m.message.stop_reason!=null)D={unified:Iy0({finishReason:m.message.stop_reason,isJsonResponseFromTool:P}),raw:m.message.stop_reason};if(y.enqueue({type:"response-metadata",id:(t=m.message.id)!=null?t:void 0,modelId:(s=m.message.model)!=null?s:void 0}),m.message.content!=null)for(let $0=0;$0<m.message.content.length;$0++){let Y0=m.message.content[$0];if(Y0.type==="tool_use"){let K0=Y0.caller,A0=K0?{type:K0.type,toolId:"tool_id"in K0?K0.tool_id:void 0}:void 0;y.enqueue({type:"tool-input-start",id:Y0.id,toolName:Y0.name});let D0=JSON.stringify((Z0=Y0.input)!=null?Z0:{});y.enqueue({type:"tool-input-delta",id:Y0.id,delta:D0}),y.enqueue({type:"tool-input-end",id:Y0.id}),y.enqueue({type:"tool-call",toolCallId:Y0.id,toolName:Y0.name,input:D0,...A0&&{providerMetadata:{anthropic:{caller:A0}}}})}}return}case"message_delta":{if(m.usage.input_tokens!=null&&L.input_tokens!==m.usage.input_tokens)L.input_tokens=m.usage.input_tokens;if(L.output_tokens=m.usage.output_tokens,m.usage.cache_read_input_tokens!=null)L.cache_read_input_tokens=m.usage.cache_read_input_tokens;if(m.usage.cache_creation_input_tokens!=null)L.cache_creation_input_tokens=m.usage.cache_creation_input_tokens,q=m.usage.cache_creation_input_tokens;if(m.usage.iterations!=null)L.iterations=m.usage.iterations;if(D={unified:Iy0({finishReason:m.delta.stop_reason,isJsonResponseFromTool:P}),raw:(X0=m.delta.stop_reason)!=null?X0:void 0},w=(a=m.delta.stop_sequence)!=null?a:null,I=m.delta.container!=null?{expiresAt:m.delta.container.expires_at,id:m.delta.container.id,skills:(e=(Q0=m.delta.container.skills)==null?void 0:Q0.map(($0)=>({type:$0.type,skillId:$0.skill_id,version:$0.version})))!=null?e:null}:null,m.context_management)M=F94(m.context_management);R={...R,...m.usage};return}case"message_stop":{let $0={usage:R!=null?R:null,cacheCreationInputTokens:q,stopSequence:w,iterations:L.iterations?L.iterations.map((K0)=>({type:K0.type,inputTokens:K0.input_tokens,outputTokens:K0.output_tokens})):null,container:I,contextManagement:M},Y0={anthropic:$0};if(H&&K!=="anthropic")Y0[K]=$0;y.enqueue({type:"finish",finishReason:D,usage:z94({usage:L,rawUsage:R}),providerMetadata:Y0});return}case"error":{y.enqueue({type:"error",error:m.error});return}default:throw Error(`Unsupported chunk type: ${m}`)}}})),[S,T]=k.tee(),v=S.getReader();try{await v.read();let x=await v.read();if(((Y=x.value)==null?void 0:Y.type)==="raw")x=await v.read();if(((X=x.value)==null?void 0:X.type)==="error"){let y=x.value.error;throw new h7({message:y.message,url:A,requestBodyValues:G,statusCode:y.type==="overloaded_error"?529:500,responseHeaders:F,responseBody:JSON.stringify(y),isRetryable:y.type==="overloaded_error"})}}finally{v.cancel().catch(()=>{}),v.releaseLock()}return{stream:T,request:{body:G},response:{headers:F}}}},dp8,cp8,lp8,ip8,np8,rp8,ap8,sp8,op8,tp8,ep8,$d8,Yd8,Xd8,Gd8,Jd8,Qd8,Wd8,Zd8,Kd8,Ud8,Hd8=($={})=>{return Ud8($)},zd8,Vd8="3.0.70",Ad8,iK,Fd8,Dd8,Nd8=class{constructor($,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){let J=await P9({provider:"google",providerOptions:G,schema:Dd8});if($.length>this.maxEmbeddingsPerCall)throw new c90({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=p8(await lK(this.config.headers),Y),W=J==null?void 0:J.content;if(W!=null&&W.length!==$.length)throw Error(`The number of multimodal content entries (${W.length}) must match the number of values (${$.length}).`);if($.length===1){let z=W==null?void 0:W[0],V=$[0]?[{text:$[0]}]:[],A=z!=null?[...V,...z]:[{text:$[0]}],{responseHeaders:F,value:N,rawValue:D}=await G9({url:`${this.config.baseURL}/models/${this.modelId}:embedContent`,headers:Q,body:{model:`models/${this.modelId}`,content:{parts:A},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType},failedResponseHandler:iK,successfulResponseHandler:T5(Bd8),abortSignal:X,fetch:this.config.fetch});return{warnings:[],embeddings:[N.embedding.values],usage:void 0,response:{headers:F,body:D}}}let{responseHeaders:Z,value:K,rawValue:H}=await G9({url:`${this.config.baseURL}/models/${this.modelId}:batchEmbedContents`,headers:Q,body:{requests:$.map((z,V)=>{let A=W==null?void 0:W[V],F=z?[{text:z}]:[];return{model:`models/${this.modelId}`,content:{role:"user",parts:A!=null?[...F,...A]:[{text:z}]},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType}})},failedResponseHandler:iK,successfulResponseHandler:T5(Ld8),abortSignal:X,fetch:this.config.fetch});return{warnings:[],embeddings:K.embeddings.map((z)=>z.values),usage:void 0,response:{headers:Z,body:H}}}},Ld8,Bd8,Ed8,L94,wd8,jd8=class{constructor(){this.accumulatedArgs={},this.jsonText="",this.pathStack=[],this.stringOpen=!1}processPartialArgs($){let Y="";for(let X of $){let G=X.jsonPath.replace(/^\$\./,"");if(!G)continue;let J=Td8(G),Q=Cd8(this.accumulatedArgs,J);if(X.stringValue!=null&&Q!==void 0){let K=JSON.stringify(X.stringValue).slice(1,-1);B94(this.accumulatedArgs,J,Q+X.stringValue),Y+=K;continue}let Z=Sd8(X);if(Z==null)continue;B94(this.accumulatedArgs,J,Z.value),Y+=this.emitNavigationTo(J,X,Z.json)}return this.jsonText+=Y,{currentJSON:this.accumulatedArgs,textDelta:Y}}finalize(){let $=JSON.stringify(this.accumulatedArgs),Y=$.slice(this.jsonText.length);return{finalJSON:$,closingDelta:Y}}ensureRoot(){if(this.pathStack.length===0)return this.pathStack.push({segment:"",isArray:!1,childCount:0}),"{";return""}emitNavigationTo($,Y,X){let G="";if(this.stringOpen)G+='"',this.stringOpen=!1;G+=this.ensureRoot();let J=$.slice(0,-1),Q=$[$.length-1],W=this.findCommonStackDepth(J);return G+=this.closeDownTo(W),G+=this.openDownTo(J,Q),G+=this.emitLeaf(Q,Y,X),G}findCommonStackDepth($){let Y=Math.min(this.pathStack.length-1,$.length),X=0;for(let G=0;G<Y;G++)if(this.pathStack[G+1].segment===$[G])X++;else break;return X+1}closeDownTo($){let Y="";while(this.pathStack.length>$){let X=this.pathStack.pop();Y+=X.isArray?"]":"}"}return Y}openDownTo($,Y){let X="",G=this.pathStack.length-1;for(let J=G;J<$.length;J++){let Q=$[J],W=this.pathStack[this.pathStack.length-1];if(W.childCount>0)X+=",";if(W.childCount++,typeof Q==="string")X+=`${JSON.stringify(Q)}:`;let K=typeof(J+1<$.length?$[J+1]:Y)==="number";X+=K?"[":"{",this.pathStack.push({segment:Q,isArray:K,childCount:0})}return X}emitLeaf($,Y,X){let G="",J=this.pathStack[this.pathStack.length-1];if(J.childCount>0)G+=",";if(J.childCount++,typeof $==="string")G+=`${JSON.stringify($)}:`;if(Y.stringValue!=null&&Y.willContinue)G+=X.slice(0,-1),this.stringOpen=!0;else G+=X;return G}},S74=class{constructor($,Y){this.specificationVersion="v3";var X;this.modelId=$,this.config=Y,this.generateId=(X=Y.generateId)!=null?X:X9}get provider(){return this.config.provider}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,tools:z,toolChoice:V,providerOptions:A},{isStreaming:F=!1}={}){var N,D;let L=[],B=this.config.provider.includes("vertex")?"vertex":"google",O=await P9({provider:B,providerOptions:A,schema:L94});if(O==null&&B!=="google")O=await P9({provider:"google",providerOptions:A,schema:L94});let E=this.config.provider.startsWith("google.vertex.");if((z==null?void 0:z.some((T)=>T.type==="provider"&&T.id==="google.vertex_rag_store"))&&!E)L.push({type:"other",message:`The 'vertex_rag_store' tool is only supported with the Google Vertex provider and might not be supported or could behave unexpectedly with the current Google provider (${this.config.provider}).`});if((O==null?void 0:O.streamFunctionCallArguments)&&!E)L.push({type:"other",message:`'streamFunctionCallArguments' is only supported on the Vertex AI API and will be ignored with the current Google provider (${this.config.provider}). See https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc`});let M=O==null?void 0:O.serviceTier;if((O==null?void 0:O.serviceTier)&&E)M=wd8[O.serviceTier];let R=this.modelId.toLowerCase().startsWith("gemma-"),q=this.modelId.startsWith("gemini-3"),{contents:w,systemInstruction:I}=Pd8($,{isGemmaModel:R,providerOptionsName:B,supportsFunctionResponseParts:q}),{tools:P,toolConfig:_,toolWarnings:C}=_d8({tools:z,toolChoice:V,modelId:this.modelId,isVertexProvider:E}),k=F&&E?(N=O==null?void 0:O.streamFunctionCallArguments)!=null?N:!1:void 0,S=_||k||(O==null?void 0:O.retrievalConfig)?{..._,...k&&{functionCallingConfig:{..._==null?void 0:_.functionCallingConfig,streamFunctionCallArguments:!0}},...(O==null?void 0:O.retrievalConfig)&&{retrievalConfig:O.retrievalConfig}}:void 0;return{args:{generationConfig:{maxOutputTokens:Y,temperature:X,topK:J,topP:G,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,seed:H,responseMimeType:(K==null?void 0:K.type)==="json"?"application/json":void 0,responseSchema:(K==null?void 0:K.type)==="json"&&K.schema!=null&&((D=O==null?void 0:O.structuredOutputs)!=null?D:!0)?dK(K.schema):void 0,...(O==null?void 0:O.audioTimestamp)&&{audioTimestamp:O.audioTimestamp},responseModalities:O==null?void 0:O.responseModalities,thinkingConfig:O==null?void 0:O.thinkingConfig,...(O==null?void 0:O.mediaResolution)&&{mediaResolution:O.mediaResolution},...(O==null?void 0:O.imageConfig)&&{imageConfig:O.imageConfig}},contents:w,systemInstruction:R?void 0:I,safetySettings:O==null?void 0:O.safetySettings,tools:P,toolConfig:S,cachedContent:O==null?void 0:O.cachedContent,labels:O==null?void 0:O.labels,serviceTier:M},warnings:[...L,...C],providerOptionsName:B}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D,L;let{args:B,warnings:O,providerOptionsName:E}=await this.getArgs($),M=p8(await lK(this.config.headers),$.headers),{responseHeaders:R,value:q,rawValue:w}=await G9({url:`${this.config.baseURL}/${N94(this.modelId)}:generateContent`,headers:M,body:B,failedResponseHandler:iK,successfulResponseHandler:T5(vd8),abortSignal:$.abortSignal,fetch:this.config.fetch}),I=q.candidates[0],P=[],_=(X=(Y=I.content)==null?void 0:Y.parts)!=null?X:[],C=q.usageMetadata,k,S;for(let v of _)if("executableCode"in v&&((G=v.executableCode)==null?void 0:G.code)){let x=this.config.generateId();k=x,P.push({type:"tool-call",toolCallId:x,toolName:"code_execution",input:JSON.stringify(v.executableCode),providerExecuted:!0})}else if("codeExecutionResult"in v&&v.codeExecutionResult)P.push({type:"tool-result",toolCallId:k,toolName:"code_execution",result:{outcome:v.codeExecutionResult.outcome,output:(J=v.codeExecutionResult.output)!=null?J:""}}),k=void 0;else if("text"in v&&v.text!=null){let x=v.thoughtSignature?{[E]:{thoughtSignature:v.thoughtSignature}}:void 0;if(v.text.length===0){if(x!=null&&P.length>0){let y=P[P.length-1];y.providerMetadata=x}}else P.push({type:v.thought===!0?"reasoning":"text",text:v.text,providerMetadata:x})}else if("functionCall"in v&&v.functionCall.name!=null&&v.functionCall.args!=null)P.push({type:"tool-call",toolCallId:this.config.generateId(),toolName:v.functionCall.name,input:JSON.stringify(v.functionCall.args),providerMetadata:v.thoughtSignature?{[E]:{thoughtSignature:v.thoughtSignature}}:void 0});else if("inlineData"in v){let x=v.thought===!0,y=!!v.thoughtSignature;P.push({type:"file",data:v.inlineData.data,mediaType:v.inlineData.mimeType,providerMetadata:x||y?{[E]:{...x?{thought:!0}:{},...y?{thoughtSignature:v.thoughtSignature}:{}}}:void 0})}else if("toolCall"in v&&v.toolCall){let x=(Q=v.toolCall.id)!=null?Q:this.config.generateId();S=x,P.push({type:"tool-call",toolCallId:x,toolName:`server:${v.toolCall.toolType}`,input:JSON.stringify((W=v.toolCall.args)!=null?W:{}),providerExecuted:!0,dynamic:!0,providerMetadata:v.thoughtSignature?{[E]:{thoughtSignature:v.thoughtSignature,serverToolCallId:x,serverToolType:v.toolCall.toolType}}:{[E]:{serverToolCallId:x,serverToolType:v.toolCall.toolType}}})}else if("toolResponse"in v&&v.toolResponse){let x=(Z=S!=null?S:v.toolResponse.id)!=null?Z:this.config.generateId();P.push({type:"tool-result",toolCallId:x,toolName:`server:${v.toolResponse.toolType}`,result:(K=v.toolResponse.response)!=null?K:{},providerMetadata:v.thoughtSignature?{[E]:{thoughtSignature:v.thoughtSignature,serverToolCallId:x,serverToolType:v.toolResponse.toolType}}:{[E]:{serverToolCallId:x,serverToolType:v.toolResponse.toolType}}}),S=void 0}let T=(H=E94({groundingMetadata:I.groundingMetadata,generateId:this.config.generateId}))!=null?H:[];for(let v of T)P.push(v);return{content:P,finishReason:{unified:O94({finishReason:I.finishReason,hasToolCalls:P.some((v)=>v.type==="tool-call"&&!v.providerExecuted)}),raw:(z=I.finishReason)!=null?z:void 0},usage:D94(C),warnings:O,providerMetadata:{[E]:{promptFeedback:(V=q.promptFeedback)!=null?V:null,groundingMetadata:(A=I.groundingMetadata)!=null?A:null,urlContextMetadata:(F=I.urlContextMetadata)!=null?F:null,safetyRatings:(N=I.safetyRatings)!=null?N:null,usageMetadata:C!=null?C:null,finishMessage:(D=I.finishMessage)!=null?D:null,serviceTier:(L=q.serviceTier)!=null?L:null}},request:{body:B},response:{headers:R,body:w}}}async doStream($){let{args:Y,warnings:X,providerOptionsName:G}=await this.getArgs($,{isStreaming:!0}),J=p8(await lK(this.config.headers),$.headers),{responseHeaders:Q,value:W}=await G9({url:`${this.config.baseURL}/${N94(this.modelId)}:streamGenerateContent?alt=sse`,headers:J,body:Y,failedResponseHandler:iK,successfulResponseHandler:oK(xd8),abortSignal:$.abortSignal,fetch:this.config.fetch}),Z={unified:"other",raw:void 0},K=void 0,H=void 0,z=null,V=null,A=null,F=this.config.generateId,N=!1,D=null,L=null,B=0,O=new Set,E,M,R=[];return{stream:W.pipeThrough(new TransformStream({start(q){q.enqueue({type:"stream-start",warnings:X})},transform(q,w){var I,P,_,C,k,S,T,v,x,y,d,u;if($.includeRawChunks)w.enqueue({type:"raw",rawValue:q.rawValue});if(!q.success){w.enqueue({type:"error",error:q.error});return}let b=q.value,g=b.usageMetadata;if(g!=null)K=g;if(b.serviceTier!=null)A=b.serviceTier;let p=(I=b.candidates)==null?void 0:I[0];if(p==null)return;let h=p.content;if(p.groundingMetadata!=null)z=p.groundingMetadata;if(p.urlContextMetadata!=null)V=p.urlContextMetadata;let n=E94({groundingMetadata:p.groundingMetadata,generateId:F});if(n!=null){for(let t of n)if(t.sourceType==="url"&&!O.has(t.url))O.add(t.url),w.enqueue(t)}if(h!=null){let t=(P=h.parts)!=null?P:[];for(let s of t)if("executableCode"in s&&((_=s.executableCode)==null?void 0:_.code)){let Z0=F();E=Z0,w.enqueue({type:"tool-call",toolCallId:Z0,toolName:"code_execution",input:JSON.stringify(s.executableCode),providerExecuted:!0})}else if("codeExecutionResult"in s&&s.codeExecutionResult){let Z0=E;if(Z0)w.enqueue({type:"tool-result",toolCallId:Z0,toolName:"code_execution",result:{outcome:s.codeExecutionResult.outcome,output:(C=s.codeExecutionResult.output)!=null?C:""}}),E=void 0}else if("text"in s&&s.text!=null){let Z0=s.thoughtSignature?{[G]:{thoughtSignature:s.thoughtSignature}}:void 0;if(s.text.length===0){if(Z0!=null&&D!==null)w.enqueue({type:"text-delta",id:D,delta:"",providerMetadata:Z0})}else if(s.thought===!0){if(D!==null)w.enqueue({type:"text-end",id:D}),D=null;if(L===null)L=String(B++),w.enqueue({type:"reasoning-start",id:L,providerMetadata:Z0});w.enqueue({type:"reasoning-delta",id:L,delta:s.text,providerMetadata:Z0})}else{if(L!==null)w.enqueue({type:"reasoning-end",id:L}),L=null;if(D===null)D=String(B++),w.enqueue({type:"text-start",id:D,providerMetadata:Z0});w.enqueue({type:"text-delta",id:D,delta:s.text,providerMetadata:Z0})}}else if("inlineData"in s){if(D!==null)w.enqueue({type:"text-end",id:D}),D=null;if(L!==null)w.enqueue({type:"reasoning-end",id:L}),L=null;let Z0=s.thought===!0,X0=!!s.thoughtSignature,a=Z0||X0?{[G]:{...Z0?{thought:!0}:{},...X0?{thoughtSignature:s.thoughtSignature}:{}}}:void 0;w.enqueue({type:"file",mediaType:s.inlineData.mimeType,data:s.inlineData.data,providerMetadata:a})}else if("toolCall"in s&&s.toolCall){let Z0=(k=s.toolCall.id)!=null?k:F();M=Z0;let X0={[G]:{...s.thoughtSignature?{thoughtSignature:s.thoughtSignature}:{},serverToolCallId:Z0,serverToolType:s.toolCall.toolType}};w.enqueue({type:"tool-call",toolCallId:Z0,toolName:`server:${s.toolCall.toolType}`,input:JSON.stringify((S=s.toolCall.args)!=null?S:{}),providerExecuted:!0,dynamic:!0,providerMetadata:X0})}else if("toolResponse"in s&&s.toolResponse){let Z0=(T=M!=null?M:s.toolResponse.id)!=null?T:F(),X0={[G]:{...s.thoughtSignature?{thoughtSignature:s.thoughtSignature}:{},serverToolCallId:Z0,serverToolType:s.toolResponse.toolType}};w.enqueue({type:"tool-result",toolCallId:Z0,toolName:`server:${s.toolResponse.toolType}`,result:(v=s.toolResponse.response)!=null?v:{},providerMetadata:X0}),M=void 0}for(let s of t){if(!("functionCall"in s))continue;let Z0=s.thoughtSignature?{[G]:{thoughtSignature:s.thoughtSignature}}:void 0,X0=s.functionCall.partialArgs!=null||s.functionCall.name!=null&&s.functionCall.willContinue===!0,a=s.functionCall.name==null&&s.functionCall.args==null&&s.functionCall.partialArgs==null&&s.functionCall.willContinue==null,Q0=s.functionCall.name!=null&&s.functionCall.args!=null&&s.functionCall.partialArgs==null;if(X0){if(s.functionCall.name!=null&&s.functionCall.willContinue===!0){let e=F(),m=new jd8;if(R.push({toolCallId:e,toolName:s.functionCall.name,accumulator:m,providerMetadata:Z0}),w.enqueue({type:"tool-input-start",id:e,toolName:s.functionCall.name,providerMetadata:Z0}),s.functionCall.partialArgs!=null){let{textDelta:$0}=m.processPartialArgs(s.functionCall.partialArgs);if($0.length>0)w.enqueue({type:"tool-input-delta",id:e,delta:$0,providerMetadata:Z0})}}else if(s.functionCall.partialArgs!=null&&R.length>0){let e=R[R.length-1],{textDelta:m}=e.accumulator.processPartialArgs(s.functionCall.partialArgs);if(m.length>0)w.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:m,providerMetadata:Z0})}}else if(a&&R.length>0){let e=R.pop(),{finalJSON:m,closingDelta:$0}=e.accumulator.finalize();if($0.length>0)w.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:$0,providerMetadata:e.providerMetadata});w.enqueue({type:"tool-input-end",id:e.toolCallId,providerMetadata:e.providerMetadata}),w.enqueue({type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:m,providerMetadata:e.providerMetadata}),N=!0}else if(Q0){let e=F(),m=s.functionCall.name,$0=typeof s.functionCall.args==="string"?s.functionCall.args:JSON.stringify((x=s.functionCall.args)!=null?x:{});w.enqueue({type:"tool-input-start",id:e,toolName:m,providerMetadata:Z0}),w.enqueue({type:"tool-input-delta",id:e,delta:$0,providerMetadata:Z0}),w.enqueue({type:"tool-input-end",id:e,providerMetadata:Z0}),w.enqueue({type:"tool-call",toolCallId:e,toolName:m,input:$0,providerMetadata:Z0}),N=!0}}}if(p.finishReason!=null)Z={unified:O94({finishReason:p.finishReason,hasToolCalls:N}),raw:p.finishReason},H={[G]:{promptFeedback:(y=b.promptFeedback)!=null?y:null,groundingMetadata:z,urlContextMetadata:V,safetyRatings:(d=p.safetyRatings)!=null?d:null,usageMetadata:g!=null?g:null,finishMessage:(u=p.finishMessage)!=null?u:null,serviceTier:A}}},flush(q){if(D!==null)q.enqueue({type:"text-end",id:D});if(L!==null)q.enqueue({type:"reasoning-end",id:L});q.enqueue({type:"finish",finishReason:Z,usage:D94(K),providerMetadata:H})}})),response:{headers:Q},request:{body:Y}}}},k74=()=>U.object({webSearchQueries:U.array(U.string()).nullish(),imageSearchQueries:U.array(U.string()).nullish(),retrievalQueries:U.array(U.string()).nullish(),searchEntryPoint:U.object({renderedContent:U.string()}).nullish(),groundingChunks:U.array(U.object({web:U.object({uri:U.string(),title:U.string().nullish()}).nullish(),image:U.object({sourceUri:U.string(),imageUri:U.string(),title:U.string().nullish(),domain:U.string().nullish()}).nullish(),retrievedContext:U.object({uri:U.string().nullish(),title:U.string().nullish(),text:U.string().nullish(),fileSearchStore:U.string().nullish()}).nullish(),maps:U.object({uri:U.string().nullish(),title:U.string().nullish(),text:U.string().nullish(),placeId:U.string().nullish()}).nullish()})).nullish(),groundingSupports:U.array(U.object({segment:U.object({startIndex:U.number().nullish(),endIndex:U.number().nullish(),text:U.string().nullish()}).nullish(),segment_text:U.string().nullish(),groundingChunkIndices:U.array(U.number()).nullish(),supportChunkIndices:U.array(U.number()).nullish(),confidenceScores:U.array(U.number()).nullish(),confidenceScore:U.array(U.number()).nullish()})).nullish(),retrievalMetadata:U.union([U.object({webDynamicRetrievalScore:U.number()}),U.object({})]).nullish()}),kd8,v74=()=>U.object({parts:U.array(U.union([U.object({functionCall:U.object({name:U.string().nullish(),args:U.unknown().nullish(),partialArgs:U.array(kd8).nullish(),willContinue:U.boolean().nullish()}),thoughtSignature:U.string().nullish()}),U.object({inlineData:U.object({mimeType:U.string(),data:U.string()}),thought:U.boolean().nullish(),thoughtSignature:U.string().nullish()}),U.object({toolCall:U.object({toolType:U.string(),args:U.unknown().nullish(),id:U.string()}),thoughtSignature:U.string().nullish()}),U.object({toolResponse:U.object({toolType:U.string(),response:U.unknown().nullish(),id:U.string()}),thoughtSignature:U.string().nullish()}),U.object({executableCode:U.object({language:U.string(),code:U.string()}).nullish(),codeExecutionResult:U.object({outcome:U.string(),output:U.string().nullish()}).nullish(),text:U.string().nullish(),thought:U.boolean().nullish(),thoughtSignature:U.string().nullish()})])).nullish()}),S90=()=>U.object({category:U.string().nullish(),probability:U.string().nullish(),probabilityScore:U.number().nullish(),severity:U.string().nullish(),severityScore:U.number().nullish(),blocked:U.boolean().nullish()}),M94,x74,y74=()=>U.object({urlMetadata:U.array(U.object({retrievedUrl:U.string(),urlRetrievalStatus:U.string()})).nullish()}),vd8,xd8,yd8,bd8,hd8,fd8,gd8,md8,ud8,pd8,dd8,cd8,ld8,id8,nd8=class{constructor($,Y,X){this.modelId=$,this.settings=Y,this.config=X,this.specificationVersion="v3"}get maxImagesPerCall(){if(this.settings.maxImagesPerCall!=null)return this.settings.maxImagesPerCall;if(R94(this.modelId))return 10;return 4}get provider(){return this.config.provider}async doGenerate($){if(R94(this.modelId))return this.doGenerateGemini($);return this.doGenerateImagen($)}async doGenerateImagen($){var Y,X,G;let{prompt:J,n:Q=1,size:W,aspectRatio:Z="1:1",seed:K,providerOptions:H,headers:z,abortSignal:V,files:A,mask:F}=$,N=[];if(A!=null&&A.length>0)throw Error("Google Generative AI does not support image editing with Imagen models. Use Google Vertex AI (@ai-sdk/google-vertex) for image editing capabilities.");if(F!=null)throw Error("Google Generative AI does not support image editing with masks. Use Google Vertex AI (@ai-sdk/google-vertex) for image editing capabilities.");if(W!=null)N.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});if(K!=null)N.push({type:"unsupported",feature:"seed",details:"This model does not support the `seed` option through this provider."});let D=await P9({provider:"google",providerOptions:H,schema:ad8}),L=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,B={sampleCount:Q};if(Z!=null)B.aspectRatio=Z;if(D)Object.assign(B,D);let O={instances:[{prompt:J}],parameters:B},{responseHeaders:E,value:M}=await G9({url:`${this.config.baseURL}/models/${this.modelId}:predict`,headers:p8(await lK(this.config.headers),z),body:O,failedResponseHandler:iK,successfulResponseHandler:T5(rd8),abortSignal:V,fetch:this.config.fetch});return{images:M.predictions.map((R)=>R.bytesBase64Encoded),warnings:N,providerMetadata:{google:{images:M.predictions.map(()=>({}))}},response:{timestamp:L,modelId:this.modelId,headers:E}}}async doGenerateGemini($){var Y,X,G,J,Q,W,Z,K,H;let{prompt:z,n:V,size:A,aspectRatio:F,seed:N,providerOptions:D,headers:L,abortSignal:B,files:O,mask:E}=$,M=[];if(E!=null)throw Error("Gemini image models do not support mask-based image editing.");if(V!=null&&V>1)throw Error("Gemini image models do not support generating a set number of images per call. Use n=1 or omit the n parameter.");if(A!=null)M.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});let R=[];if(z!=null)R.push({type:"text",text:z});if(O!=null&&O.length>0)for(let C of O)if(C.type==="url")R.push({type:"file",data:new URL(C.url),mediaType:"image/*"});else R.push({type:"file",data:typeof C.data==="string"?C.data:new Uint8Array(C.data),mediaType:C.mediaType});let q=[{role:"user",content:R}],I=await new S74(this.modelId,{provider:this.config.provider,baseURL:this.config.baseURL,headers:(Y=this.config.headers)!=null?Y:{},fetch:this.config.fetch,generateId:(X=this.config.generateId)!=null?X:X9}).doGenerate({prompt:q,seed:N,providerOptions:{google:{responseModalities:["IMAGE"],imageConfig:F?{aspectRatio:F}:void 0,...(G=D==null?void 0:D.google)!=null?G:{}}},headers:L,abortSignal:B}),P=(W=(Q=(J=this.config._internal)==null?void 0:J.currentDate)==null?void 0:Q.call(J))!=null?W:new Date,_=[];for(let C of I.content)if(C.type==="file"&&C.mediaType.startsWith("image/"))_.push(nY(C.data));return{images:_,warnings:M,providerMetadata:{google:{images:_.map(()=>({}))}},response:{timestamp:P,modelId:this.modelId,headers:(Z=I.response)==null?void 0:Z.headers},usage:I.usage?{inputTokens:I.usage.inputTokens.total,outputTokens:I.usage.outputTokens.total,totalTokens:((K=I.usage.inputTokens.total)!=null?K:0)+((H=I.usage.outputTokens.total)!=null?H:0)}:void 0}}},rd8,ad8,sd8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}get maxVideosPerCall(){return 4}async doGenerate($){var Y,X,G,J,Q,W,Z,K;let H=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,z=[],V=await P9({provider:"google",providerOptions:$.providerOptions,schema:od8}),A=[{}],F=A[0];if($.prompt!=null)F.prompt=$.prompt;if($.image!=null)if($.image.type==="url")z.push({type:"unsupported",feature:"URL-based image input",details:"Google Generative AI video models require base64-encoded images. URL will be ignored."});else{let C=typeof $.image.data==="string"?$.image.data:Dm($.image.data);F.image={inlineData:{mimeType:$.image.mediaType||"image/png",data:C}}}if((V==null?void 0:V.referenceImages)!=null)F.referenceImages=V.referenceImages.map((C)=>{if(C.bytesBase64Encoded)return{inlineData:{mimeType:"image/png",data:C.bytesBase64Encoded}};else if(C.gcsUri)return{gcsUri:C.gcsUri};return C});let N={sampleCount:$.n};if($.aspectRatio)N.aspectRatio=$.aspectRatio;if($.resolution){let C={"1280x720":"720p","1920x1080":"1080p","3840x2160":"4k"};N.resolution=C[$.resolution]||$.resolution}if($.duration)N.durationSeconds=$.duration;if($.seed)N.seed=$.seed;if(V!=null){let C=V;if(C.personGeneration!==void 0&&C.personGeneration!==null)N.personGeneration=C.personGeneration;if(C.negativePrompt!==void 0&&C.negativePrompt!==null)N.negativePrompt=C.negativePrompt;for(let[k,S]of Object.entries(C))if(!["pollIntervalMs","pollTimeoutMs","personGeneration","negativePrompt","referenceImages"].includes(k))N[k]=S}let{value:D}=await G9({url:`${this.config.baseURL}/models/${this.modelId}:predictLongRunning`,headers:p8(await lK(this.config.headers),$.headers),body:{instances:A,parameters:N},successfulResponseHandler:T5(q94),failedResponseHandler:iK,abortSignal:$.abortSignal,fetch:this.config.fetch}),L=D.name;if(!L)throw new L8({name:"GOOGLE_VIDEO_GENERATION_ERROR",message:"No operation name returned from API"});let B=(J=V==null?void 0:V.pollIntervalMs)!=null?J:1e4,O=(Q=V==null?void 0:V.pollTimeoutMs)!=null?Q:600000,E=Date.now(),M=D,R;while(!M.done){if(Date.now()-E>O)throw new L8({name:"GOOGLE_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${O}ms`});if(await l90(B),(W=$.abortSignal)==null?void 0:W.aborted)throw new L8({name:"GOOGLE_VIDEO_GENERATION_ABORTED",message:"Video generation request was aborted"});let{value:C,responseHeaders:k}=await Nm({url:`${this.config.baseURL}/${L}`,headers:p8(await lK(this.config.headers),$.headers),successfulResponseHandler:T5(q94),failedResponseHandler:iK,abortSignal:$.abortSignal,fetch:this.config.fetch});M=C,R=k}if(M.error)throw new L8({name:"GOOGLE_VIDEO_GENERATION_FAILED",message:`Video generation failed: ${M.error.message}`});let q=M.response;if(!((Z=q==null?void 0:q.generateVideoResponse)==null?void 0:Z.generatedSamples)||q.generateVideoResponse.generatedSamples.length===0)throw new L8({name:"GOOGLE_VIDEO_GENERATION_ERROR",message:`No videos in response. Response: ${JSON.stringify(M)}`});let w=[],I=[],P=await lK(this.config.headers),_=P==null?void 0:P["x-goog-api-key"];for(let C of q.generateVideoResponse.generatedSamples)if((K=C.video)==null?void 0:K.uri){let k=_?`${C.video.uri}${C.video.uri.includes("?")?"&":"?"}key=${_}`:C.video.uri;w.push({type:"url",url:k,mediaType:"video/mp4"}),I.push({uri:C.video.uri})}if(w.length===0)throw new L8({name:"GOOGLE_VIDEO_GENERATION_ERROR",message:"No valid videos in response"});return{videos:w,warnings:z,response:{timestamp:H,modelId:this.modelId,headers:R},providerMetadata:{google:{videos:I}}}}},q94,od8,td8,$c8,Yc8,I90=()=>U.object({modality:U.string().nullish(),tokens:U.number().nullish()}).loose(),m74=()=>U.object({total_input_tokens:U.number().nullish(),total_output_tokens:U.number().nullish(),total_thought_tokens:U.number().nullish(),total_cached_tokens:U.number().nullish(),total_tool_use_tokens:U.number().nullish(),total_tokens:U.number().nullish(),input_tokens_by_modality:U.array(I90()).nullish(),output_tokens_by_modality:U.array(I90()).nullish(),cached_tokens_by_modality:U.array(I90()).nullish(),tool_use_tokens_by_modality:U.array(I90()).nullish(),grounding_tool_count:U.array(U.object({type:U.string().nullish(),count:U.number().nullish()}).loose()).nullish()}).loose(),u74=()=>U.enum(["in_progress","requires_action","completed","failed","cancelled","incomplete"]),p74=()=>{let $=U.object({type:U.literal("url_citation"),url:U.string().nullish(),title:U.string().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish()}).loose(),Y=U.object({type:U.literal("file_citation"),file_name:U.string().nullish(),document_uri:U.string().nullish(),source:U.string().nullish(),page_number:U.number().nullish(),media_id:U.string().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),custom_metadata:U.record(U.string(),U.unknown()).nullish()}).loose(),X=U.object({type:U.literal("place_citation"),name:U.string().nullish(),url:U.string().nullish(),place_id:U.string().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish()}).loose();return U.union([$,Y,X,U.object({type:U.string()}).loose()])},d74=()=>U.object({type:U.string(),text:U.string().nullish(),data:U.string().nullish(),mime_type:U.string().nullish()}).loose(),c74=()=>{let $=U.object({type:U.literal("text"),text:U.string(),annotations:U.array(p74()).nullish()}).loose(),Y=U.object({type:U.literal("thought"),signature:U.string().nullish(),summary:U.array(d74()).nullish()}).loose(),X=U.object({type:U.literal("function_call"),id:U.string(),name:U.string(),arguments:U.record(U.string(),U.unknown()).nullish(),signature:U.string().nullish()}).loose(),G=U.object({type:U.literal("image"),data:U.string().nullish(),mime_type:U.string().nullish(),resolution:U.enum(["low","medium","high","ultra_high"]).nullish(),uri:U.string().nullish()}).loose(),J=U.object({type:U.enum(["google_search_call","code_execution_call","url_context_call","file_search_call","google_maps_call","mcp_server_tool_call"]),id:U.string(),arguments:U.record(U.string(),U.unknown()).nullish(),name:U.string().nullish(),server_name:U.string().nullish(),search_type:U.string().nullish(),signature:U.string().nullish()}).loose(),Q=U.object({type:U.enum(["google_search_result","code_execution_result","url_context_result","file_search_result","google_maps_result","mcp_server_tool_result"]),call_id:U.string(),result:U.unknown().nullish(),is_error:U.boolean().nullish(),name:U.string().nullish(),server_name:U.string().nullish(),signature:U.string().nullish()}).loose();return U.union([$,G,Y,X,J,Q,U.object({type:U.string()}).loose()])},fy0,Hc8,zc8,Vc8,Ac8,Nc8,Lc8=1000,Bc8=1e4,Oc8=1800000,Rc8=class{constructor($,Y){if(this.specificationVersion="v3",typeof $==="string")this.modelId=$,this.agent=void 0;else this.modelId=$.agent,this.agent=$.agent;this.config=Y}get provider(){return this.config.provider}get supportedUrls(){if(this.config.supportedUrls)return this.config.supportedUrls();return{"image/*":[/^https?:\/\/.+/],"application/pdf":[/^https?:\/\/.+/],"audio/*":[/^https?:\/\/.+/],"video/*":[/^https?:\/\/(www\.)?youtube\.com\/watch\?v=.+/,/^https?:\/\/youtu\.be\/.+/,/^gs:\/\/.+/]}}async getArgs($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D,L,B,O,E,M;let R=[],q=await P9({provider:"google",providerOptions:$.providerOptions,schema:zc8}),w=this.agent!=null,I=$.tools!=null&&$.tools.length>0,P,_;if(I&&w)R.push({type:"other",message:"google.interactions: tools are not supported when an agent is set; tools will be omitted from the request body."});else if(I){let g=Ec8({tools:$.tools,toolChoice:$.toolChoice});P=g.tools,_=g.toolChoice,R.push(...g.toolWarnings)}let C,k;if(((Y=$.responseFormat)==null?void 0:Y.type)==="json"){if(w)R.push({type:"other",message:"google.interactions: structured output (responseFormat) is not supported when an agent is set; responseFormat will be ignored."});else if(C="application/json",$.responseFormat.schema!=null)k=$.responseFormat.schema}let{input:S,systemInstruction:T,warnings:v}=Qc8({prompt:$.prompt,previousInteractionId:(X=q==null?void 0:q.previousInteractionId)!=null?X:void 0,store:(G=q==null?void 0:q.store)!=null?G:void 0,mediaResolution:(J=q==null?void 0:q.mediaResolution)!=null?J:void 0});R.push(...v);let x=T,y=(Q=q==null?void 0:q.systemInstruction)!=null?Q:void 0;if(x!=null&&y!=null)R.push({type:"other",message:"google.interactions: both AI SDK system message and providerOptions.google.systemInstruction were set; using the AI SDK system message."});else if(x==null&&y!=null)x=y;let d;if(w){let g=[];if($.temperature!=null)g.push("temperature");if($.topP!=null)g.push("topP");if($.seed!=null)g.push("seed");if($.stopSequences!=null&&$.stopSequences.length>0)g.push("stopSequences");if($.maxOutputTokens!=null)g.push("maxOutputTokens");if((q==null?void 0:q.thinkingLevel)!=null)g.push("thinkingLevel");if((q==null?void 0:q.thinkingSummaries)!=null)g.push("thinkingSummaries");if((q==null?void 0:q.imageConfig)!=null)g.push("imageConfig");if(g.length>0)R.push({type:"other",message:`google.interactions: ${g.join(", ")} ${g.length===1?"is":"are"} not supported when an agent is set; use providerOptions.google.agentConfig instead. Dropped from the request body.`});d=void 0}else d=w90({temperature:(W=$.temperature)!=null?W:void 0,top_p:(Z=$.topP)!=null?Z:void 0,seed:(K=$.seed)!=null?K:void 0,stop_sequences:$.stopSequences!=null&&$.stopSequences.length>0?$.stopSequences:void 0,max_output_tokens:(H=$.maxOutputTokens)!=null?H:void 0,thinking_level:(z=q==null?void 0:q.thinkingLevel)!=null?z:void 0,thinking_summaries:(V=q==null?void 0:q.thinkingSummaries)!=null?V:void 0,image_config:(q==null?void 0:q.imageConfig)!=null?w90({aspect_ratio:(A=q.imageConfig.aspectRatio)!=null?A:void 0,image_size:(F=q.imageConfig.imageSize)!=null?F:void 0}):void 0,tool_choice:_});let u;if(w&&(q==null?void 0:q.agentConfig)!=null){let g=q.agentConfig;if(g.type==="deep-research")u=w90({type:"deep-research",thinking_summaries:(N=g.thinkingSummaries)!=null?N:void 0,visualization:(D=g.visualization)!=null?D:void 0,collaborative_planning:(L=g.collaborativePlanning)!=null?L:void 0});else if(g.type==="dynamic")u={type:"dynamic"}}return{args:w90({...w?{agent:this.agent}:{model:this.modelId},input:S,system_instruction:x,tools:P,response_format:k,response_mime_type:C,response_modalities:(q==null?void 0:q.responseModalities)!=null?q.responseModalities:void 0,previous_interaction_id:(B=q==null?void 0:q.previousInteractionId)!=null?B:void 0,service_tier:(O=q==null?void 0:q.serviceTier)!=null?O:void 0,store:(E=q==null?void 0:q.store)!=null?E:void 0,generation_config:d!=null&&Object.keys(d).length>0?d:void 0,agent_config:u,...w?{background:!0}:{}}),warnings:R,isAgent:w,pollingTimeoutMs:(M=q==null?void 0:q.pollingTimeoutMs)!=null?M:void 0}}async doGenerate($){var Y,X,G,J,Q,W;let{args:Z,warnings:K,isAgent:H,pollingTimeoutMs:z}=await this.getArgs($),V=`${this.config.baseURL}/interactions`,A=p8(this.config.headers?await lK(this.config.headers):void 0,$.headers),F=await G9({url:V,headers:A,body:Z,failedResponseHandler:iK,successfulResponseHandler:T5(fy0),abortSignal:$.abortSignal,fetch:this.config.fetch}),{responseHeaders:N,value:D,rawValue:L}=F;if(H&&!gy0(D.status)){let I=await P94({baseURL:this.config.baseURL,interactionId:D.id,headers:A,fetch:this.config.fetch,abortSignal:$.abortSignal,timeoutMs:z});D=I.response,L=I.rawResponse,N=(Y=I.responseHeaders)!=null?Y:N}let B=typeof D.id==="string"&&D.id.length>0?D.id:void 0,{content:O,hasFunctionCall:E}=l74({outputs:(X=D.outputs)!=null?X:null,generateId:(G=this.config.generateId)!=null?G:X9,interactionId:B}),M={unified:Jb0({status:D.status,hasFunctionCall:E}),raw:D.status},R=(Q=(J=D.service_tier)!=null?J:N==null?void 0:N["x-gemini-service-tier"])!=null?Q:void 0,q={google:{...B!=null?{interactionId:B}:{},...R!=null?{serviceTier:R}:{}}},w;if(typeof D.created==="string"){let I=new Date(D.created);if(!Number.isNaN(I.getTime()))w=I}return{content:O,finishReason:M,usage:Gb0(D.usage),warnings:K,providerMetadata:q,request:{body:Z},response:{headers:N,body:L,...B!=null?{id:B}:{},...w?{timestamp:w}:{},modelId:(W=D.model)!=null?W:void 0}}}async doStream($){var Y;let{args:X,warnings:G,isAgent:J,pollingTimeoutMs:Q}=await this.getArgs($),W=`${this.config.baseURL}/interactions`,Z=p8(this.config.headers?await lK(this.config.headers):void 0,$.headers);if(J)return this.doStreamAgent({args:X,warnings:G,url:W,mergedHeaders:Z,options:$,pollingTimeoutMs:Q});let K={...X,stream:!0},{responseHeaders:H,value:z}=await G9({url:W,headers:Z,body:K,failedResponseHandler:iK,successfulResponseHandler:oK(Hc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),V=H==null?void 0:H["x-gemini-service-tier"],A=Jc8({warnings:G,generateId:(Y=this.config.generateId)!=null?Y:X9,includeRawChunks:$.includeRawChunks,serviceTier:V});return{stream:z.pipeThrough(A),request:{body:K},response:{headers:H}}}async doStreamAgent({args:$,warnings:Y,url:X,mergedHeaders:G,options:J,pollingTimeoutMs:Q}){var W,Z;let K=await G9({url:X,headers:G,body:$,failedResponseHandler:iK,successfulResponseHandler:T5(fy0),abortSignal:J.abortSignal,fetch:this.config.fetch}),{responseHeaders:H,value:z}=K,V=z.id;if(V==null||V.length===0)throw Error("google.interactions: agent POST response did not include an interaction id; cannot poll for the agent result.");if(!gy0(z.status)){let F=await P94({baseURL:this.config.baseURL,interactionId:V,headers:G,fetch:this.config.fetch,abortSignal:J.abortSignal,timeoutMs:Q});z=F.response,H=(W=F.responseHeaders)!=null?W:H}return{stream:Mc8({response:z,warnings:Y,generateId:(Z=this.config.generateId)!=null?Z:X9,includeRawChunks:J.includeRawChunks,headerServiceTier:H==null?void 0:H["x-gemini-service-tier"]}),request:{body:$},response:{headers:H}}}};var Lm=V0(()=>{Fk0();O1();O1();cG();Xv0();yb8=Symbol.for(w94),c5=class $ extends(j64=Error,_64=yb8,j64){constructor({name:Y,message:X,cause:G}){super(X);this[_64]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,w94)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},j94=`vercel.ai.error.${_94}`,bb8=Symbol.for(j94),AY=class extends(C64=c5,T64=bb8,C64){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:_94,message:$,cause:W});this[T64]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return c5.hasMarker($,j94)}},C94=`vercel.ai.error.${T94}`,hb8=Symbol.for(C94),S94=class extends(k64=c5,S64=hb8,k64){constructor({message:$="Empty response body"}={}){super({name:T94,message:$});this[S64]=!0}static isInstance($){return c5.hasMarker($,C94)}};x94=`vercel.ai.error.${v94}`,fb8=Symbol.for(x94),y94=class extends(x64=c5,v64=fb8,x64){constructor({message:$,cause:Y,argument:X}){super({name:v94,message:$,cause:Y});this[v64]=!0,this.argument=X}static isInstance($){return c5.hasMarker($,x94)}},h94=`vercel.ai.error.${b94}`,gb8=Symbol.for(h94),v90=class extends(b64=c5,y64=gb8,b64){constructor({prompt:$,message:Y,cause:X}){super({name:b94,message:`Invalid prompt: ${Y}`,cause:X});this[y64]=!0,this.prompt=$}static isInstance($){return c5.hasMarker($,h94)}},g94=`vercel.ai.error.${f94}`,mb8=Symbol.for(g94),oZ=class extends(f64=c5,h64=mb8,f64){constructor({data:$,message:Y=`Invalid response data: ${JSON.stringify($)}.`}){super({name:f94,message:Y});this[h64]=!0,this.data=$}static isInstance($){return c5.hasMarker($,g94)}},u94=`vercel.ai.error.${m94}`,ub8=Symbol.for(u94),j90=class extends(m64=c5,g64=ub8,m64){constructor({text:$,cause:Y}){super({name:m94,message:`JSON parsing failed: Text: ${$}.
Error message: ${k94(Y)}`,cause:Y});this[g64]=!0,this.text=$}static isInstance($){return c5.hasMarker($,u94)}},d94=`vercel.ai.error.${p94}`,pb8=Symbol.for(d94),M90=class extends(p64=c5,u64=pb8,p64){constructor({message:$}){super({name:p94,message:$});this[u64]=!0}static isInstance($){return c5.hasMarker($,d94)}},l94=`vercel.ai.error.${c94}`,db8=Symbol.for(l94),R90=class extends(c64=c5,d64=db8,c64){constructor({message:$}){super({name:c94,message:$});this[d64]=!0}static isInstance($){return c5.hasMarker($,l94)}},n94=`vercel.ai.error.${i94}`,cb8=Symbol.for(n94),LE=class extends(i64=c5,l64=cb8,i64){constructor({errorName:$=i94,modelId:Y,modelType:X,message:G=`No such ${X}: ${Y}`}){super({name:$,message:G});this[l64]=!0,this.modelId=Y,this.modelType=X}static isInstance($){return c5.hasMarker($,n94)}},a94=`vercel.ai.error.${r94}`,lb8=Symbol.for(a94),Vm=class extends(r64=c5,n64=lb8,r64){constructor($){super({name:r94,message:`Too many values for a single embedding call. The ${$.provider} model "${$.modelId}" can only embed up to ${$.maxEmbeddingsPerCall} values per call, but ${$.values.length} values were provided.`});this[n64]=!0,this.provider=$.provider,this.modelId=$.modelId,this.maxEmbeddingsPerCall=$.maxEmbeddingsPerCall,this.values=$.values}static isInstance($){return c5.hasMarker($,a94)}},o94=`vercel.ai.error.${s94}`,ib8=Symbol.for(o94),Zm=class $ extends(s64=c5,a64=ib8,s64){constructor({value:Y,cause:X}){super({name:s94,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${k94(X)}`,cause:X});this[a64]=!0,this.value=Y}static isInstance(Y){return c5.hasMarker(Y,o94)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}},e94=`vercel.ai.error.${t94}`,nb8=Symbol.for(e94),w9=class extends(t64=c5,o64=nb8,t64){constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:t94,message:Y});this[o64]=!0,this.functionality=$}static isInstance($){return c5.hasMarker($,e94)}},$54={};_s1($54,{DEFAULT_MAX_DOWNLOAD_SIZE:()=>J54,DelayedPromise:()=>tb8,DownloadError:()=>QV,EventSourceParserStream:()=>Y54,VERSION:()=>uy0,asSchema:()=>Hf8,asValidator:()=>H54,combineHeaders:()=>o6,convertAsyncIteratorToReadableStream:()=>sb8,convertBase64ToUint8Array:()=>m90,convertToBase64:()=>RX,convertUint8ArrayToBase64:()=>Am,createBinaryResponseHandler:()=>f90,createEventSourceResponseHandler:()=>_Q,createIdGenerator:()=>Q54,createJsonErrorResponseHandler:()=>zJ,createJsonResponseHandler:()=>C5,createJsonStreamResponseHandler:()=>Lh8,createProviderDefinedToolFactory:()=>BD,createProviderDefinedToolFactoryWithOutputSchema:()=>HJ,createStatusCodeErrorResponseHandler:()=>Bh8,delay:()=>ob8,dynamicTool:()=>Dh8,executeTool:()=>Nf8,extractResponseHeaders:()=>WV,generateId:()=>w8,getErrorMessage:()=>Yh8,getFromApi:()=>Jh8,getRuntimeEnvironmentUserAgent:()=>my0,injectJsonInstructionIntoMessages:()=>Uh8,isAbortError:()=>Gj,isParsableJson:()=>nK,isUrlSupported:()=>Hh8,isValidator:()=>U54,jsonSchema:()=>g90,lazySchema:()=>Y6,lazyValidator:()=>_8,loadApiKey:()=>aK,loadOptionalSetting:()=>py0,loadSetting:()=>dy0,mediaTypeToExtension:()=>x90,normalizeHeaders:()=>Z54,parseJSON:()=>V54,parseJsonEventStream:()=>A54,parseProviderOptions:()=>_9,postFormDataToApi:()=>h90,postJsonToApi:()=>G8,postToApi:()=>ly0,readResponseWithSizeLimit:()=>$h8,removeUndefinedEntries:()=>Nh8,resolve:()=>Jj,safeParseJSON:()=>b90,safeValidateTypes:()=>y90,standardSchemaValidator:()=>z54,tool:()=>iy0,validateDownloadUrl:()=>Af8,validateTypes:()=>MX,validator:()=>K54,withUserAgentSuffix:()=>wQ,withoutTrailingSlash:()=>sK,zodSchema:()=>x1});e64=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};Y54=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=rb8({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};js1($54,Yv0);G54=`vercel.ai.error.${X54}`,eb8=Symbol.for(G54),QV=class extends(X84=c5,Y84=eb8,X84){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:X54,message:J,cause:G});this[Y84]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return c5.hasMarker($,G54)}};w8=Q54();Xh8=["fetch failed","failed to fetch"];zh8=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Vh8=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;T90=Symbol.for("vercel.ai.validator");wy0=Symbol.for("vercel.ai.schema");Oh8=Symbol("Let zodToJsonSchema decide on which parser to use"),J84={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"};gK={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:()=>{if(Fy0===void 0)Fy0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return Fy0},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-_]*$/};kh8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");_y0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};Qf8=Jf8;({btoa:zf8,atob:Vf8}=globalThis);Ny0=U.object({user:U.string().optional(),reasoningEffort:U.string().optional(),textVerbosity:U.string().optional()}),Bf8=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),u90={errorSchema:Bf8,errorToMessage:($)=>$.error.message};O54=U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish();Mf8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),finish_reason:U.string().nullish()})),usage:O54});If8=U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional()}),E54=U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}),Pf8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string()})),usage:E54.nullish()}),H84=U.object({dimensions:U.number().optional(),user:U.string().optional()}),_f8=U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish(),providerMetadata:U.record(U.string(),U.record(U.string(),U.any())).optional()}),Tf8=U.object({data:U.array(U.object({b64_json:U.string()}))});Sf8=Symbol.for(M54),L8=class $ extends(V84=Error,z84=Sf8,V84){constructor({name:Y,message:X,cause:G}){super(X);this[z84]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,M54)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},q54=`vercel.ai.error.${R54}`,kf8=Symbol.for(q54),h7=class extends(F84=L8,A84=kf8,F84){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:R54,message:$,cause:W});this[A84]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return L8.hasMarker($,q54)}},P54=`vercel.ai.error.${I54}`,vf8=Symbol.for(P54),xf8=class extends(N84=L8,D84=vf8,N84){constructor({message:$="Empty response body"}={}){super({name:I54,message:$});this[D84]=!0}static isInstance($){return L8.hasMarker($,P54)}};j54=`vercel.ai.error.${_54}`,yf8=Symbol.for(j54),ny0=class extends(B84=L8,L84=yf8,B84){constructor({message:$,cause:Y,argument:X}){super({name:_54,message:$,cause:Y});this[L84]=!0,this.argument=X}static isInstance($){return L8.hasMarker($,j54)}},C54=`vercel.ai.error.${T54}`,bf8=Symbol.for(C54),hf8=class extends(E84=L8,O84=bf8,E84){constructor({prompt:$,message:Y,cause:X}){super({name:T54,message:`Invalid prompt: ${Y}`,cause:X});this[O84]=!0,this.prompt=$}static isInstance($){return L8.hasMarker($,C54)}},k54=`vercel.ai.error.${S54}`,ff8=Symbol.for(k54),DE=class extends(R84=L8,M84=ff8,R84){constructor({data:$,message:Y=`Invalid response data: ${JSON.stringify($)}.`}){super({name:S54,message:Y});this[M84]=!0,this.data=$}static isInstance($){return L8.hasMarker($,k54)}},x54=`vercel.ai.error.${v54}`,gf8=Symbol.for(x54),C90=class extends(I84=L8,q84=gf8,I84){constructor({text:$,cause:Y}){super({name:v54,message:`JSON parsing failed: Text: ${$}.
Error message: ${w54(Y)}`,cause:Y});this[q84]=!0,this.text=$}static isInstance($){return L8.hasMarker($,x54)}},b54=`vercel.ai.error.${y54}`,mf8=Symbol.for(b54),q90=class extends(w84=L8,P84=mf8,w84){constructor({message:$}){super({name:y54,message:$});this[P84]=!0}static isInstance($){return L8.hasMarker($,b54)}},f54=`vercel.ai.error.${h54}`,uf8=Symbol.for(f54),NE=class extends(j84=L8,_84=uf8,j84){constructor({errorName:$=h54,modelId:Y,modelType:X,message:G=`No such ${X}: ${Y}`}){super({name:$,message:G});this[_84]=!0,this.modelId=Y,this.modelType=X}static isInstance($){return L8.hasMarker($,f54)}},m54=`vercel.ai.error.${g54}`,pf8=Symbol.for(m54),c90=class extends(C84=L8,T84=pf8,C84){constructor($){super({name:g54,message:`Too many values for a single embedding call. The ${$.provider} model "${$.modelId}" can only embed up to ${$.maxEmbeddingsPerCall} values per call, but ${$.values.length} values were provided.`});this[T84]=!0,this.provider=$.provider,this.modelId=$.modelId,this.maxEmbeddingsPerCall=$.maxEmbeddingsPerCall,this.values=$.values}static isInstance($){return L8.hasMarker($,m54)}},p54=`vercel.ai.error.${u54}`,df8=Symbol.for(p54),Km=class $ extends(k84=L8,S84=df8,k84){constructor({value:Y,cause:X,context:G}){let J="Type validation failed";if(G==null?void 0:G.field)J+=` for ${G.field}`;if((G==null?void 0:G.entityName)||(G==null?void 0:G.entityId)){J+=" (";let Q=[];if(G.entityName)Q.push(G.entityName);if(G.entityId)Q.push(`id: "${G.entityId}"`);J+=Q.join(", "),J+=")"}super({name:u54,message:`${J}: Value: ${JSON.stringify(Y)}.
Error message: ${w54(X)}`,cause:X});this[S84]=!0,this.value=Y,this.context=G}static isInstance(Y){return L8.hasMarker(Y,p54)}static wrap({value:Y,cause:X,context:G}){var J,Q,W;if($.isInstance(X)&&X.value===Y&&((J=X.context)==null?void 0:J.field)===(G==null?void 0:G.field)&&((Q=X.context)==null?void 0:Q.entityName)===(G==null?void 0:G.entityName)&&((W=X.context)==null?void 0:W.entityId)===(G==null?void 0:G.entityId))return X;return new $({value:Y,cause:X,context:G})}},c54=`vercel.ai.error.${d54}`,cf8=Symbol.for(c54),d5=class extends(x84=L8,v84=cf8,x84){constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:d54,message:Y});this[v84]=!0,this.functionality=$}static isInstance($){return L8.hasMarker($,c54)}},y84=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};nf8=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=if8({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};({btoa:rf8,atob:af8}=globalThis);r54=`vercel.ai.error.${n54}`,of8=Symbol.for(r54),cK=class extends(u84=L8,m84=of8,u84){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:n54,message:J,cause:G});this[m84]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return L8.hasMarker($,r54)}};X9=$g8();Yg8=["fetch failed","failed to fetch"],Xg8=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];Hg8=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,zg8=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;Ag8=Symbol("Let zodToJsonSchema decide on which parser to use"),c84={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"};uK={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:()=>{if(By0===void 0)By0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return By0},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-_]*$/};wg8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");Sy0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};ky0=Symbol.for("vercel.ai.schema");ey0=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),rK=OE({errorSchema:ey0,errorToMessage:($)=>$.error.message});Um8=J1(()=>G1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}),index:U.number(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}))),Hm8=J1(()=>G1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),type:U.literal("function").nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}).nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish(),index:U.number()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}),ey0]))),zm8=J1(()=>G1(U.object({logitBias:U.record(U.coerce.number(),U.number()).optional(),logprobs:U.union([U.boolean(),U.number()]).optional(),parallelToolCalls:U.boolean().optional(),user:U.string().optional(),reasoningEffort:U.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:U.number().optional(),store:U.boolean().optional(),metadata:U.record(U.string().max(64),U.string().max(512)).optional(),prediction:U.record(U.string(),U.any()).optional(),serviceTier:U.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:U.boolean().optional(),textVerbosity:U.enum(["low","medium","high"]).optional(),promptCacheKey:U.string().optional(),promptCacheRetention:U.enum(["in_memory","24h"]).optional(),safetyIdentifier:U.string().optional(),systemMessageMode:U.enum(["system","developer","remove"]).optional(),forceReasoning:U.boolean().optional()})));Dm8=J1(()=>G1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}))),Nm8=J1(()=>G1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}),ey0]))),o84=J1(()=>G1(U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional(),logprobs:U.union([U.boolean(),U.number()]).optional()}))),Bm8=J1(()=>G1(U.object({dimensions:U.number().optional(),user:U.string().optional()}))),Om8=J1(()=>G1(U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish()}))),t84=J1(()=>G1(U.object({created:U.number().nullish(),data:U.array(U.object({b64_json:U.string(),revised_prompt:U.string().nullish()})),background:U.string().nullish(),output_format:U.string().nullish(),size:U.string().nullish(),quality:U.string().nullish(),usage:U.object({input_tokens:U.number().nullish(),output_tokens:U.number().nullish(),total_tokens:U.number().nullish(),input_tokens_details:U.object({image_tokens:U.number().nullish(),text_tokens:U.number().nullish()}).nullish()}).nullish()}))),Mm8={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10,"gpt-image-2":10,"chatgpt-image-latest":10},Rm8=["chatgpt-image-","gpt-image-1-mini","gpt-image-1.5","gpt-image-1","gpt-image-2"];V74=U.object({quality:U.enum(["standard","hd","low","medium","high","auto"]).optional(),background:U.enum(["transparent","opaque","auto"]).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),user:U.string().optional()}),Im8=J1(()=>G1(V74.extend({style:U.enum(["vivid","natural"]).optional(),moderation:U.enum(["auto","low"]).optional()}))),Pm8=J1(()=>G1(V74.extend({inputFidelity:U.enum(["high","low"]).optional()})));A74=J1(()=>G1(U.object({callId:U.string(),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}))),F74=J1(()=>G1(U.object({status:U.enum(["completed","failed"]),output:U.string().optional()}))),jm8=D5({id:"openai.apply_patch",inputSchema:A74,outputSchema:F74}),Tm8=jm8,Cm8=J1(()=>G1(U.object({code:U.string().nullish(),containerId:U.string()}))),Sm8=J1(()=>G1(U.object({outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullish()}))),km8=J1(()=>G1(U.object({container:U.union([U.string(),U.object({fileIds:U.array(U.string()).optional()})]).optional()}))),vm8=D5({id:"openai.code_interpreter",inputSchema:Cm8,outputSchema:Sm8}),ym8=J1(()=>G1(U.object({name:U.string(),description:U.string().optional(),format:U.union([U.object({type:U.literal("grammar"),syntax:U.enum(["regex","lark"]),definition:U.string()}),U.object({type:U.literal("text")})]).optional()}))),bm8=J1(()=>G1(U.string())),hm8=FY({id:"openai.custom",inputSchema:bm8}),D74=U.object({key:U.string(),type:U.enum(["eq","ne","gt","gte","lt","lte","in","nin"]),value:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())])}),N74=U.object({type:U.enum(["and","or"]),filters:U.array(U.union([D74,U.lazy(()=>N74)]))}),gm8=J1(()=>G1(U.object({vectorStoreIds:U.array(U.string()),maxNumResults:U.number().optional(),ranking:U.object({ranker:U.string().optional(),scoreThreshold:U.number().optional()}).optional(),filters:U.union([D74,N74]).optional()}))),mm8=J1(()=>G1(U.object({queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),fileId:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullable()}))),um8=D5({id:"openai.file_search",inputSchema:U.object({}),outputSchema:mm8}),pm8=J1(()=>G1(U.object({background:U.enum(["auto","opaque","transparent"]).optional(),inputFidelity:U.enum(["low","high"]).optional(),inputImageMask:U.object({fileId:U.string().optional(),imageUrl:U.string().optional()}).optional(),model:U.string().optional(),moderation:U.enum(["auto"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),partialImages:U.number().int().min(0).max(3).optional(),quality:U.enum(["auto","low","medium","high"]).optional(),size:U.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict())),dm8=J1(()=>G1(U.object({}))),cm8=J1(()=>G1(U.object({result:U.string()}))),lm8=D5({id:"openai.image_generation",inputSchema:dm8,outputSchema:cm8}),L74=J1(()=>G1(U.object({action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeoutMs:U.number().optional(),user:U.string().optional(),workingDirectory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}))),B74=J1(()=>G1(U.object({output:U.string()}))),nm8=D5({id:"openai.local_shell",inputSchema:L74,outputSchema:B74}),O74=J1(()=>G1(U.object({action:U.object({commands:U.array(U.string()),timeoutMs:U.number().optional(),maxOutputLength:U.number().optional()})}))),vy0=J1(()=>G1(U.object({output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exitCode:U.number()})])}))}))),rm8=U.array(U.discriminatedUnion("type",[U.object({type:U.literal("skillReference"),skillId:U.string(),version:U.string().optional()}),U.object({type:U.literal("inline"),name:U.string(),description:U.string(),source:U.object({type:U.literal("base64"),mediaType:U.literal("application/zip"),data:U.string()})})])).optional(),am8=J1(()=>G1(U.object({environment:U.union([U.object({type:U.literal("containerAuto"),fileIds:U.array(U.string()).optional(),memoryLimit:U.enum(["1g","4g","16g","64g"]).optional(),networkPolicy:U.discriminatedUnion("type",[U.object({type:U.literal("disabled")}),U.object({type:U.literal("allowlist"),allowedDomains:U.array(U.string()),domainSecrets:U.array(U.object({domain:U.string(),name:U.string(),value:U.string()})).optional()})]).optional(),skills:rm8}),U.object({type:U.literal("containerReference"),containerId:U.string()}),U.object({type:U.literal("local").optional(),skills:U.array(U.object({name:U.string(),description:U.string(),path:U.string()})).optional()})]).optional()}))),sm8=D5({id:"openai.shell",inputSchema:O74,outputSchema:vy0}),om8=J1(()=>G1(U.object({execution:U.enum(["server","client"]).optional(),description:U.string().optional(),parameters:U.record(U.string(),U.unknown()).optional()}))),xy0=J1(()=>G1(U.object({arguments:U.unknown().optional(),call_id:U.string().nullish()}))),yy0=J1(()=>G1(U.object({tools:U.array(U.record(U.string(),U.unknown()))}))),tm8=D5({id:"openai.tool_search",inputSchema:xy0,outputSchema:yy0}),$u8=J1(()=>G1(U.object({externalWebAccess:U.boolean().optional(),filters:U.object({allowedDomains:U.array(U.string()).optional()}).optional(),searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),Yu8=J1(()=>G1(U.object({}))),Xu8=J1(()=>G1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).optional()}))),Gu8=D5({id:"openai.web_search",inputSchema:Yu8,outputSchema:Xu8}),Qu8=J1(()=>G1(U.object({searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),Wu8=J1(()=>G1(U.object({}))),Zu8=J1(()=>G1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional()}))),Ku8=D5({id:"openai.web_search_preview",inputSchema:Wu8,outputSchema:Zu8}),by0=U.lazy(()=>U.union([U.string(),U.number(),U.boolean(),U.null(),U.array(by0),U.record(U.string(),by0)])),Uu8=J1(()=>G1(U.object({serverLabel:U.string(),allowedTools:U.union([U.array(U.string()),U.object({readOnly:U.boolean().optional(),toolNames:U.array(U.string()).optional()})]).optional(),authorization:U.string().optional(),connectorId:U.string().optional(),headers:U.record(U.string(),U.string()).optional(),requireApproval:U.union([U.enum(["always","never"]),U.object({never:U.object({toolNames:U.array(U.string()).optional()}).optional()})]).optional(),serverDescription:U.string().optional(),serverUrl:U.string().optional()}).refine(($)=>$.serverUrl!=null||$.connectorId!=null,"One of serverUrl or connectorId must be provided."))),Hu8=J1(()=>G1(U.object({}))),zu8=J1(()=>G1(U.object({type:U.literal("call"),serverLabel:U.string(),name:U.string(),arguments:U.string(),output:U.string().nullish(),error:U.union([U.string(),by0]).optional()}))),Vu8=D5({id:"openai.mcp",inputSchema:Hu8,outputSchema:zu8}),Fu8={applyPatch:Tm8,customTool:fm8,codeInterpreter:xm8,fileSearch:um8,imageGeneration:im8,localShell:nm8,shell:sm8,webSearchPreview:Ku8,webSearch:Ju8,mcp:Au8,toolSearch:em8};Lu8=U.object({itemId:U.string().nullish(),reasoningEncryptedContent:U.string().nullish()});zm=U.lazy(()=>U.union([U.string(),U.number(),U.boolean(),U.null(),U.array(zm),U.record(U.string(),zm.optional())])),Bu8=J1(()=>G1(U.union([U.object({type:U.literal("response.output_text.delta"),item_id:U.string(),delta:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}),U.object({type:U.enum(["response.completed","response.incomplete"]),response:U.object({incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.failed"),response:U.object({error:U.object({code:U.string().nullish(),message:U.string()}).nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).nullish(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.created"),response:U.object({id:U.string(),created_at:U.number(),model:U.string(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.output_item.added"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),namespace:U.string().nullish()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("file_search_call"),id:U.string()}),U.object({type:U.literal("image_generation_call"),id:U.string()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),container_id:U.string(),code:U.string().nullable(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable(),status:U.string()}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string()}),U.object({type:U.literal("mcp_approval_request"),id:U.string()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("custom_tool_call"),id:U.string(),call_id:U.string(),name:U.string(),input:U.string()}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),zm.optional()))})])}),U.object({type:U.literal("response.output_item.done"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),status:U.literal("completed"),namespace:U.string().nullish()}),U.object({type:U.literal("custom_tool_call"),id:U.string(),call_id:U.string(),name:U.string(),input:U.string(),status:U.literal("completed")}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.literal("completed")}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),arguments:U.string(),name:U.string(),server_label:U.string(),output:U.string().nullish(),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).nullish(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string(),server_label:U.string(),tools:U.array(U.object({name:U.string(),description:U.string().optional(),input_schema:U.any(),annotations:U.record(U.string(),U.unknown()).optional()})),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).optional()}),U.object({type:U.literal("mcp_approval_request"),id:U.string(),server_label:U.string(),name:U.string(),arguments:U.string(),approval_request_id:U.string().optional()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),zm.optional()))})])}),U.object({type:U.literal("response.function_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.custom_tool_call_input.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.image_generation_call.partial_image"),item_id:U.string(),output_index:U.number(),partial_image_b64:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.done"),item_id:U.string(),output_index:U.number(),code:U.string()}),U.object({type:U.literal("response.output_text.annotation.added"),annotation:U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string(),index:U.number()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string(),start_index:U.number(),end_index:U.number()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number()})])}),U.object({type:U.literal("response.reasoning_summary_part.added"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.reasoning_summary_text.delta"),item_id:U.string(),summary_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_summary_part.done"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.apply_patch_call_operation_diff.delta"),item_id:U.string(),output_index:U.number(),delta:U.string(),obfuscation:U.string().nullish()}),U.object({type:U.literal("response.apply_patch_call_operation_diff.done"),item_id:U.string(),output_index:U.number(),diff:U.string()}),U.object({type:U.literal("error"),sequence_number:U.number(),error:U.object({type:U.string(),code:U.string(),message:U.string(),param:U.string().nullish()})}),U.object({type:U.string()}).loose().transform(($)=>({type:"unknown_chunk",message:$.type}))]))),Ou8=J1(()=>G1(U.object({id:U.string().optional(),created_at:U.number().optional(),error:U.object({message:U.string(),type:U.string(),param:U.string().nullish(),code:U.string()}).nullish(),model:U.string().optional(),output:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("message"),role:U.literal("assistant"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish(),content:U.array(U.object({type:U.literal("output_text"),text:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish(),annotations:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string(),index:U.number()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string(),start_index:U.number(),end_index:U.number()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number()})]))}))}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("function_call"),call_id:U.string(),name:U.string(),arguments:U.string(),id:U.string(),namespace:U.string().nullish()}),U.object({type:U.literal("custom_tool_call"),call_id:U.string(),name:U.string(),input:U.string(),id:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string().optional()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish(),summary:U.array(U.object({type:U.literal("summary_text"),text:U.string()}))}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),arguments:U.string(),name:U.string(),server_label:U.string(),output:U.string().nullish(),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).nullish(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string(),server_label:U.string(),tools:U.array(U.object({name:U.string(),description:U.string().optional(),input_schema:U.any(),annotations:U.record(U.string(),U.unknown()).optional()})),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).optional()}),U.object({type:U.literal("mcp_approval_request"),id:U.string(),server_label:U.string(),name:U.string(),arguments:U.string(),approval_request_id:U.string().optional()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),zm.optional()))})])).optional(),service_tier:U.string().nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).optional()}))),X94=J1(()=>G1(U.object({conversation:U.string().nullish(),include:U.array(U.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:U.string().nullish(),logprobs:U.union([U.boolean(),U.number().min(1).max(E74)]).optional(),maxToolCalls:U.number().nullish(),metadata:U.any().nullish(),parallelToolCalls:U.boolean().nullish(),previousResponseId:U.string().nullish(),promptCacheKey:U.string().nullish(),promptCacheRetention:U.enum(["in_memory","24h"]).nullish(),reasoningEffort:U.string().nullish(),reasoningSummary:U.string().nullish(),safetyIdentifier:U.string().nullish(),serviceTier:U.enum(["auto","flex","priority","default"]).nullish(),store:U.boolean().nullish(),strictJsonSchema:U.boolean().nullish(),textVerbosity:U.enum(["low","medium","high"]).nullish(),truncation:U.enum(["auto","disabled"]).nullish(),user:U.string().nullish(),systemMessageMode:U.enum(["system","developer","remove"]).optional(),forceReasoning:U.boolean().optional(),allowedTools:U.object({toolNames:U.array(U.string()).min(1),mode:U.enum(["auto","required"]).optional()}).optional()})));fu8=J1(()=>G1(U.object({instructions:U.string().nullish(),speed:U.number().min(0.25).max(4).default(1).nullish()}))),mu8=J1(()=>G1(U.object({text:U.string(),language:U.string().nullish(),duration:U.number().nullish(),words:U.array(U.object({word:U.string(),start:U.number(),end:U.number()})).nullish(),segments:U.array(U.object({id:U.number(),seek:U.number(),start:U.number(),end:U.number(),text:U.string(),tokens:U.array(U.number()),temperature:U.number(),avg_logprob:U.number(),compression_ratio:U.number(),no_speech_prob:U.number()})).nullish()}))),uu8=J1(()=>G1(U.object({include:U.array(U.string()).optional(),language:U.string().optional(),prompt:U.string().optional(),temperature:U.number().min(0).max(1).default(0).optional(),timestampGranularities:U.array(U.enum(["word","segment"])).default(["segment"]).optional()}))),W94={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"};ED();$b0=Symbol.for("@mastra/core.gatewayStreamTransport"),M74=["anthropic","cerebras","deepinfra","deepseek","google","groq","mistral","openai","openrouter","perplexity","togetherai","vercel","xai"],R74=["github-copilot"],lu8=J1(()=>G1(U.object({type:U.literal("error"),error:U.object({type:U.string(),message:U.string()})}))),Z94=OE({errorSchema:lu8,errorToMessage:($)=>$.error.message}),iu8=J1(()=>G1(U.object({type:U.literal("message"),id:U.string().nullish(),model:U.string().nullish(),content:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("text"),text:U.string(),citations:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("web_search_result_location"),cited_text:U.string(),url:U.string(),title:U.string(),encrypted_index:U.string()}),U.object({type:U.literal("page_location"),cited_text:U.string(),document_index:U.number(),document_title:U.string().nullable(),start_page_number:U.number(),end_page_number:U.number()}),U.object({type:U.literal("char_location"),cited_text:U.string(),document_index:U.number(),document_title:U.string().nullable(),start_char_index:U.number(),end_char_index:U.number()})])).optional()}),U.object({type:U.literal("thinking"),thinking:U.string(),signature:U.string()}),U.object({type:U.literal("redacted_thinking"),data:U.string()}),U.object({type:U.literal("compaction"),content:U.string()}),U.object({type:U.literal("tool_use"),id:U.string(),name:U.string(),input:U.unknown(),caller:U.union([U.object({type:U.literal("code_execution_20250825"),tool_id:U.string()}),U.object({type:U.literal("code_execution_20260120"),tool_id:U.string()}),U.object({type:U.literal("direct")})]).optional()}),U.object({type:U.literal("server_tool_use"),id:U.string(),name:U.string(),input:U.record(U.string(),U.unknown()).nullish(),caller:U.union([U.object({type:U.literal("code_execution_20260120"),tool_id:U.string()}),U.object({type:U.literal("direct")})]).optional()}),U.object({type:U.literal("mcp_tool_use"),id:U.string(),name:U.string(),input:U.unknown(),server_name:U.string()}),U.object({type:U.literal("mcp_tool_result"),tool_use_id:U.string(),is_error:U.boolean(),content:U.array(U.union([U.string(),U.object({type:U.literal("text"),text:U.string()})]))}),U.object({type:U.literal("web_fetch_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("web_fetch_result"),url:U.string(),retrieved_at:U.string(),content:U.object({type:U.literal("document"),title:U.string().nullable(),citations:U.object({enabled:U.boolean()}).optional(),source:U.union([U.object({type:U.literal("base64"),media_type:U.literal("application/pdf"),data:U.string()}),U.object({type:U.literal("text"),media_type:U.literal("text/plain"),data:U.string()})])})}),U.object({type:U.literal("web_fetch_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("web_search_tool_result"),tool_use_id:U.string(),content:U.union([U.array(U.object({type:U.literal("web_search_result"),url:U.string(),title:U.string(),encrypted_content:U.string(),page_age:U.string().nullish()})),U.object({type:U.literal("web_search_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("code_execution_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("code_execution_result"),stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("encrypted_code_execution_result"),encrypted_stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("code_execution_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("bash_code_execution_tool_result"),tool_use_id:U.string(),content:U.discriminatedUnion("type",[U.object({type:U.literal("bash_code_execution_result"),content:U.array(U.object({type:U.literal("bash_code_execution_output"),file_id:U.string()})),stdout:U.string(),stderr:U.string(),return_code:U.number()}),U.object({type:U.literal("bash_code_execution_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("text_editor_code_execution_tool_result"),tool_use_id:U.string(),content:U.discriminatedUnion("type",[U.object({type:U.literal("text_editor_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_view_result"),content:U.string(),file_type:U.string(),num_lines:U.number().nullable(),start_line:U.number().nullable(),total_lines:U.number().nullable()}),U.object({type:U.literal("text_editor_code_execution_create_result"),is_file_update:U.boolean()}),U.object({type:U.literal("text_editor_code_execution_str_replace_result"),lines:U.array(U.string()).nullable(),new_lines:U.number().nullable(),new_start:U.number().nullable(),old_lines:U.number().nullable(),old_start:U.number().nullable()})])}),U.object({type:U.literal("tool_search_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("tool_search_tool_search_result"),tool_references:U.array(U.object({type:U.literal("tool_reference"),tool_name:U.string()}))}),U.object({type:U.literal("tool_search_tool_result_error"),error_code:U.string()})])})])),stop_reason:U.string().nullish(),stop_sequence:U.string().nullish(),usage:U.looseObject({input_tokens:U.number(),output_tokens:U.number(),cache_creation_input_tokens:U.number().nullish(),cache_read_input_tokens:U.number().nullish(),iterations:U.array(U.object({type:U.union([U.literal("compaction"),U.literal("message")]),input_tokens:U.number(),output_tokens:U.number()})).nullish()}),container:U.object({expires_at:U.string(),id:U.string(),skills:U.array(U.object({type:U.union([U.literal("anthropic"),U.literal("custom")]),skill_id:U.string(),version:U.string()})).nullish()}).nullish(),context_management:U.object({applied_edits:U.array(U.union([U.object({type:U.literal("clear_tool_uses_20250919"),cleared_tool_uses:U.number(),cleared_input_tokens:U.number()}),U.object({type:U.literal("clear_thinking_20251015"),cleared_thinking_turns:U.number(),cleared_input_tokens:U.number()}),U.object({type:U.literal("compact_20260112")})]))}).nullish()}))),nu8=J1(()=>G1(U.discriminatedUnion("type",[U.object({type:U.literal("message_start"),message:U.object({id:U.string().nullish(),model:U.string().nullish(),role:U.string().nullish(),usage:U.looseObject({input_tokens:U.number(),cache_creation_input_tokens:U.number().nullish(),cache_read_input_tokens:U.number().nullish()}),content:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("tool_use"),id:U.string(),name:U.string(),input:U.unknown(),caller:U.union([U.object({type:U.literal("code_execution_20250825"),tool_id:U.string()}),U.object({type:U.literal("code_execution_20260120"),tool_id:U.string()}),U.object({type:U.literal("direct")})]).optional()})])).nullish(),stop_reason:U.string().nullish(),container:U.object({expires_at:U.string(),id:U.string()}).nullish()})}),U.object({type:U.literal("content_block_start"),index:U.number(),content_block:U.discriminatedUnion("type",[U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("thinking"),thinking:U.string()}),U.object({type:U.literal("tool_use"),id:U.string(),name:U.string(),input:U.record(U.string(),U.unknown()).optional(),caller:U.union([U.object({type:U.literal("code_execution_20250825"),tool_id:U.string()}),U.object({type:U.literal("code_execution_20260120"),tool_id:U.string()}),U.object({type:U.literal("direct")})]).optional()}),U.object({type:U.literal("redacted_thinking"),data:U.string()}),U.object({type:U.literal("compaction"),content:U.string().nullish()}),U.object({type:U.literal("server_tool_use"),id:U.string(),name:U.string(),input:U.record(U.string(),U.unknown()).nullish(),caller:U.union([U.object({type:U.literal("code_execution_20260120"),tool_id:U.string()}),U.object({type:U.literal("direct")})]).optional()}),U.object({type:U.literal("mcp_tool_use"),id:U.string(),name:U.string(),input:U.unknown(),server_name:U.string()}),U.object({type:U.literal("mcp_tool_result"),tool_use_id:U.string(),is_error:U.boolean(),content:U.array(U.union([U.string(),U.object({type:U.literal("text"),text:U.string()})]))}),U.object({type:U.literal("web_fetch_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("web_fetch_result"),url:U.string(),retrieved_at:U.string(),content:U.object({type:U.literal("document"),title:U.string().nullable(),citations:U.object({enabled:U.boolean()}).optional(),source:U.union([U.object({type:U.literal("base64"),media_type:U.literal("application/pdf"),data:U.string()}),U.object({type:U.literal("text"),media_type:U.literal("text/plain"),data:U.string()})])})}),U.object({type:U.literal("web_fetch_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("web_search_tool_result"),tool_use_id:U.string(),content:U.union([U.array(U.object({type:U.literal("web_search_result"),url:U.string(),title:U.string(),encrypted_content:U.string(),page_age:U.string().nullish()})),U.object({type:U.literal("web_search_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("code_execution_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("code_execution_result"),stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("encrypted_code_execution_result"),encrypted_stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("code_execution_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("bash_code_execution_tool_result"),tool_use_id:U.string(),content:U.discriminatedUnion("type",[U.object({type:U.literal("bash_code_execution_result"),content:U.array(U.object({type:U.literal("bash_code_execution_output"),file_id:U.string()})),stdout:U.string(),stderr:U.string(),return_code:U.number()}),U.object({type:U.literal("bash_code_execution_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("text_editor_code_execution_tool_result"),tool_use_id:U.string(),content:U.discriminatedUnion("type",[U.object({type:U.literal("text_editor_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_view_result"),content:U.string(),file_type:U.string(),num_lines:U.number().nullable(),start_line:U.number().nullable(),total_lines:U.number().nullable()}),U.object({type:U.literal("text_editor_code_execution_create_result"),is_file_update:U.boolean()}),U.object({type:U.literal("text_editor_code_execution_str_replace_result"),lines:U.array(U.string()).nullable(),new_lines:U.number().nullable(),new_start:U.number().nullable(),old_lines:U.number().nullable(),old_start:U.number().nullable()})])}),U.object({type:U.literal("tool_search_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("tool_search_tool_search_result"),tool_references:U.array(U.object({type:U.literal("tool_reference"),tool_name:U.string()}))}),U.object({type:U.literal("tool_search_tool_result_error"),error_code:U.string()})])})])}),U.object({type:U.literal("content_block_delta"),index:U.number(),delta:U.discriminatedUnion("type",[U.object({type:U.literal("input_json_delta"),partial_json:U.string()}),U.object({type:U.literal("text_delta"),text:U.string()}),U.object({type:U.literal("thinking_delta"),thinking:U.string()}),U.object({type:U.literal("signature_delta"),signature:U.string()}),U.object({type:U.literal("compaction_delta"),content:U.string().nullish()}),U.object({type:U.literal("citations_delta"),citation:U.discriminatedUnion("type",[U.object({type:U.literal("web_search_result_location"),cited_text:U.string(),url:U.string(),title:U.string(),encrypted_index:U.string()}),U.object({type:U.literal("page_location"),cited_text:U.string(),document_index:U.number(),document_title:U.string().nullable(),start_page_number:U.number(),end_page_number:U.number()}),U.object({type:U.literal("char_location"),cited_text:U.string(),document_index:U.number(),document_title:U.string().nullable(),start_char_index:U.number(),end_char_index:U.number()})])})])}),U.object({type:U.literal("content_block_stop"),index:U.number()}),U.object({type:U.literal("error"),error:U.object({type:U.string(),message:U.string()})}),U.object({type:U.literal("message_delta"),delta:U.object({stop_reason:U.string().nullish(),stop_sequence:U.string().nullish(),container:U.object({expires_at:U.string(),id:U.string(),skills:U.array(U.object({type:U.union([U.literal("anthropic"),U.literal("custom")]),skill_id:U.string(),version:U.string()})).nullish()}).nullish()}),usage:U.looseObject({input_tokens:U.number().nullish(),output_tokens:U.number(),cache_creation_input_tokens:U.number().nullish(),cache_read_input_tokens:U.number().nullish(),iterations:U.array(U.object({type:U.union([U.literal("compaction"),U.literal("message")]),input_tokens:U.number(),output_tokens:U.number()})).nullish()}),context_management:U.object({applied_edits:U.array(U.union([U.object({type:U.literal("clear_tool_uses_20250919"),cleared_tool_uses:U.number(),cleared_input_tokens:U.number()}),U.object({type:U.literal("clear_thinking_20251015"),cleared_thinking_turns:U.number(),cleared_input_tokens:U.number()}),U.object({type:U.literal("compact_20260112")})]))}).nullish()}),U.object({type:U.literal("message_stop")}),U.object({type:U.literal("ping")})]))),ru8=J1(()=>G1(U.object({signature:U.string().optional(),redactedData:U.string().optional()}))),K94=U.object({citations:U.object({enabled:U.boolean()}).optional(),title:U.string().optional(),context:U.string().optional()}),U94=U.object({sendReasoning:U.boolean().optional(),structuredOutputMode:U.enum(["outputFormat","jsonTool","auto"]).optional(),thinking:U.discriminatedUnion("type",[U.object({type:U.literal("adaptive"),display:U.enum(["omitted","summarized"]).optional()}),U.object({type:U.literal("enabled"),budgetTokens:U.number().optional()}),U.object({type:U.literal("disabled")})]).optional(),disableParallelToolUse:U.boolean().optional(),cacheControl:U.object({type:U.literal("ephemeral"),ttl:U.union([U.literal("5m"),U.literal("1h")]).optional()}).optional(),metadata:U.object({userId:U.string().optional()}).optional(),mcpServers:U.array(U.object({type:U.literal("url"),name:U.string(),url:U.string(),authorizationToken:U.string().nullish(),toolConfiguration:U.object({enabled:U.boolean().nullish(),allowedTools:U.array(U.string()).nullish()}).nullish()})).optional(),container:U.object({id:U.string().optional(),skills:U.array(U.object({type:U.union([U.literal("anthropic"),U.literal("custom")]),skillId:U.string(),version:U.string().optional()})).optional()}).optional(),toolStreaming:U.boolean().optional(),effort:U.enum(["low","medium","high","xhigh","max"]).optional(),taskBudget:U.object({type:U.literal("tokens"),total:U.number().int().min(20000),remaining:U.number().int().min(0).optional()}).optional(),speed:U.enum(["fast","standard"]).optional(),inferenceGeo:U.enum(["us","global"]).optional(),anthropicBeta:U.array(U.string()).optional(),contextManagement:U.object({edits:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("clear_tool_uses_20250919"),trigger:U.discriminatedUnion("type",[U.object({type:U.literal("input_tokens"),value:U.number()}),U.object({type:U.literal("tool_uses"),value:U.number()})]).optional(),keep:U.object({type:U.literal("tool_uses"),value:U.number()}).optional(),clearAtLeast:U.object({type:U.literal("input_tokens"),value:U.number()}).optional(),clearToolInputs:U.boolean().optional(),excludeTools:U.array(U.string()).optional()}),U.object({type:U.literal("clear_thinking_20251015"),keep:U.union([U.literal("all"),U.object({type:U.literal("thinking_turns"),value:U.number()})]).optional()}),U.object({type:U.literal("compact_20260112"),trigger:U.object({type:U.literal("input_tokens"),value:U.number()}).optional(),pauseAfterCompaction:U.boolean().optional(),instructions:U.string().optional()})]))}).optional()});su8=J1(()=>G1(U.object({maxCharacters:U.number().optional()}))),ou8=J1(()=>G1(U.object({command:U.enum(["view","create","str_replace","insert"]),path:U.string(),file_text:U.string().optional(),insert_line:U.number().int().optional(),new_str:U.string().optional(),insert_text:U.string().optional(),old_str:U.string().optional(),view_range:U.array(U.number().int()).optional()}))),tu8=FY({id:"anthropic.text_editor_20250728",inputSchema:ou8}),$p8=J1(()=>G1(U.object({maxUses:U.number().optional(),allowedDomains:U.array(U.string()).optional(),blockedDomains:U.array(U.string()).optional(),userLocation:U.object({type:U.literal("approximate"),city:U.string().optional(),region:U.string().optional(),country:U.string().optional(),timezone:U.string().optional()}).optional()}))),Yp8=J1(()=>G1(U.array(U.object({url:U.string(),title:U.string().nullable(),pageAge:U.string().nullable(),encryptedContent:U.string(),type:U.literal("web_search_result")})))),Xp8=J1(()=>G1(U.object({query:U.string()}))),Gp8=D5({id:"anthropic.web_search_20260209",inputSchema:Xp8,outputSchema:Yp8,supportsDeferredResults:!0}),Qp8=J1(()=>G1(U.object({maxUses:U.number().optional(),allowedDomains:U.array(U.string()).optional(),blockedDomains:U.array(U.string()).optional(),userLocation:U.object({type:U.literal("approximate"),city:U.string().optional(),region:U.string().optional(),country:U.string().optional(),timezone:U.string().optional()}).optional()}))),q74=J1(()=>G1(U.array(U.object({url:U.string(),title:U.string().nullable(),pageAge:U.string().nullable(),encryptedContent:U.string(),type:U.literal("web_search_result")})))),Wp8=J1(()=>G1(U.object({query:U.string()}))),Zp8=D5({id:"anthropic.web_search_20250305",inputSchema:Wp8,outputSchema:q74,supportsDeferredResults:!0}),Up8=J1(()=>G1(U.object({maxUses:U.number().optional(),allowedDomains:U.array(U.string()).optional(),blockedDomains:U.array(U.string()).optional(),citations:U.object({enabled:U.boolean()}).optional(),maxContentTokens:U.number().optional()}))),Hp8=J1(()=>G1(U.object({type:U.literal("web_fetch_result"),url:U.string(),content:U.object({type:U.literal("document"),title:U.string().nullable(),citations:U.object({enabled:U.boolean()}).optional(),source:U.union([U.object({type:U.literal("base64"),mediaType:U.literal("application/pdf"),data:U.string()}),U.object({type:U.literal("text"),mediaType:U.literal("text/plain"),data:U.string()})])}),retrievedAt:U.string().nullable()}))),zp8=J1(()=>G1(U.object({url:U.string()}))),Vp8=D5({id:"anthropic.web_fetch_20260209",inputSchema:zp8,outputSchema:Hp8,supportsDeferredResults:!0}),Fp8=J1(()=>G1(U.object({maxUses:U.number().optional(),allowedDomains:U.array(U.string()).optional(),blockedDomains:U.array(U.string()).optional(),citations:U.object({enabled:U.boolean()}).optional(),maxContentTokens:U.number().optional()}))),I74=J1(()=>G1(U.object({type:U.literal("web_fetch_result"),url:U.string(),content:U.object({type:U.literal("document"),title:U.string().nullable(),citations:U.object({enabled:U.boolean()}).optional(),source:U.union([U.object({type:U.literal("base64"),mediaType:U.literal("application/pdf"),data:U.string()}),U.object({type:U.literal("text"),mediaType:U.literal("text/plain"),data:U.string()})])}),retrievedAt:U.string().nullable()}))),Dp8=J1(()=>G1(U.object({url:U.string()}))),Np8=D5({id:"anthropic.web_fetch_20250910",inputSchema:Dp8,outputSchema:I74,supportsDeferredResults:!0});P74=J1(()=>G1(U.object({type:U.literal("code_execution_result"),stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}))),Op8=J1(()=>G1(U.object({code:U.string()}))),Ep8=D5({id:"anthropic.code_execution_20250522",inputSchema:Op8,outputSchema:P74}),w74=J1(()=>G1(U.discriminatedUnion("type",[U.object({type:U.literal("code_execution_result"),stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("bash_code_execution_result"),content:U.array(U.object({type:U.literal("bash_code_execution_output"),file_id:U.string()})),stdout:U.string(),stderr:U.string(),return_code:U.number()}),U.object({type:U.literal("bash_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_view_result"),content:U.string(),file_type:U.string(),num_lines:U.number().nullable(),start_line:U.number().nullable(),total_lines:U.number().nullable()}),U.object({type:U.literal("text_editor_code_execution_create_result"),is_file_update:U.boolean()}),U.object({type:U.literal("text_editor_code_execution_str_replace_result"),lines:U.array(U.string()).nullable(),new_lines:U.number().nullable(),new_start:U.number().nullable(),old_lines:U.number().nullable(),old_start:U.number().nullable()})]))),Rp8=J1(()=>G1(U.discriminatedUnion("type",[U.object({type:U.literal("programmatic-tool-call"),code:U.string()}),U.object({type:U.literal("bash_code_execution"),command:U.string()}),U.discriminatedUnion("command",[U.object({type:U.literal("text_editor_code_execution"),command:U.literal("view"),path:U.string()}),U.object({type:U.literal("text_editor_code_execution"),command:U.literal("create"),path:U.string(),file_text:U.string().nullish()}),U.object({type:U.literal("text_editor_code_execution"),command:U.literal("str_replace"),path:U.string(),old_str:U.string(),new_str:U.string()})])]))),qp8=D5({id:"anthropic.code_execution_20250825",inputSchema:Rp8,outputSchema:w74,supportsDeferredResults:!0}),_74=J1(()=>G1(U.discriminatedUnion("type",[U.object({type:U.literal("code_execution_result"),stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("encrypted_code_execution_result"),encrypted_stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("bash_code_execution_result"),content:U.array(U.object({type:U.literal("bash_code_execution_output"),file_id:U.string()})),stdout:U.string(),stderr:U.string(),return_code:U.number()}),U.object({type:U.literal("bash_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_view_result"),content:U.string(),file_type:U.string(),num_lines:U.number().nullable(),start_line:U.number().nullable(),total_lines:U.number().nullable()}),U.object({type:U.literal("text_editor_code_execution_create_result"),is_file_update:U.boolean()}),U.object({type:U.literal("text_editor_code_execution_str_replace_result"),lines:U.array(U.string()).nullable(),new_lines:U.number().nullable(),new_start:U.number().nullable(),old_lines:U.number().nullable(),old_start:U.number().nullable()})]))),Pp8=J1(()=>G1(U.discriminatedUnion("type",[U.object({type:U.literal("programmatic-tool-call"),code:U.string()}),U.object({type:U.literal("bash_code_execution"),command:U.string()}),U.discriminatedUnion("command",[U.object({type:U.literal("text_editor_code_execution"),command:U.literal("view"),path:U.string()}),U.object({type:U.literal("text_editor_code_execution"),command:U.literal("create"),path:U.string(),file_text:U.string().nullish()}),U.object({type:U.literal("text_editor_code_execution"),command:U.literal("str_replace"),path:U.string(),old_str:U.string(),new_str:U.string()})])]))),wp8=D5({id:"anthropic.code_execution_20260120",inputSchema:Pp8,outputSchema:_74,supportsDeferredResults:!0}),j74=J1(()=>G1(U.array(U.object({type:U.literal("tool_reference"),toolName:U.string()})))),jp8=J1(()=>G1(U.object({pattern:U.string(),limit:U.number().optional()}))),Tp8=D5({id:"anthropic.tool_search_regex_20251119",inputSchema:jp8,outputSchema:j74,supportsDeferredResults:!0});T74=new Set(["date-time","time","date","duration","email","hostname","uri","ipv4","ipv6","uuid"]),yp8=["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","minLength","maxLength","pattern","minItems","maxItems","uniqueItems","minProperties","maxProperties","not"];dp8=J1(()=>G1(U.object({command:U.string(),restart:U.boolean().optional()}))),cp8=FY({id:"anthropic.bash_20241022",inputSchema:dp8}),lp8=J1(()=>G1(U.object({command:U.string(),restart:U.boolean().optional()}))),ip8=FY({id:"anthropic.bash_20250124",inputSchema:lp8}),np8=J1(()=>G1(U.object({action:U.enum(["key","type","mouse_move","left_click","left_click_drag","right_click","middle_click","double_click","screenshot","cursor_position"]),coordinate:U.array(U.number().int()).optional(),text:U.string().optional()}))),rp8=FY({id:"anthropic.computer_20241022",inputSchema:np8}),ap8=J1(()=>G1(U.object({action:U.enum(["key","hold_key","type","cursor_position","mouse_move","left_mouse_down","left_mouse_up","left_click","left_click_drag","right_click","middle_click","double_click","triple_click","scroll","wait","screenshot"]),coordinate:U.tuple([U.number().int(),U.number().int()]).optional(),duration:U.number().optional(),scroll_amount:U.number().optional(),scroll_direction:U.enum(["up","down","left","right"]).optional(),start_coordinate:U.tuple([U.number().int(),U.number().int()]).optional(),text:U.string().optional()}))),sp8=FY({id:"anthropic.computer_20250124",inputSchema:ap8}),op8=J1(()=>G1(U.object({action:U.enum(["key","hold_key","type","cursor_position","mouse_move","left_mouse_down","left_mouse_up","left_click","left_click_drag","right_click","middle_click","double_click","triple_click","scroll","wait","screenshot","zoom"]),coordinate:U.tuple([U.number().int(),U.number().int()]).optional(),duration:U.number().optional(),region:U.tuple([U.number().int(),U.number().int(),U.number().int(),U.number().int()]).optional(),scroll_amount:U.number().optional(),scroll_direction:U.enum(["up","down","left","right"]).optional(),start_coordinate:U.tuple([U.number().int(),U.number().int()]).optional(),text:U.string().optional()}))),tp8=FY({id:"anthropic.computer_20251124",inputSchema:op8}),ep8=J1(()=>G1(U.discriminatedUnion("command",[U.object({command:U.literal("view"),path:U.string(),view_range:U.tuple([U.number(),U.number()]).optional()}),U.object({command:U.literal("create"),path:U.string(),file_text:U.string()}),U.object({command:U.literal("str_replace"),path:U.string(),old_str:U.string(),new_str:U.string()}),U.object({command:U.literal("insert"),path:U.string(),insert_line:U.number(),insert_text:U.string()}),U.object({command:U.literal("delete"),path:U.string()}),U.object({command:U.literal("rename"),old_path:U.string(),new_path:U.string()})]))),$d8=FY({id:"anthropic.memory_20250818",inputSchema:ep8}),Yd8=J1(()=>G1(U.object({command:U.enum(["view","create","str_replace","insert","undo_edit"]),path:U.string(),file_text:U.string().optional(),insert_line:U.number().int().optional(),new_str:U.string().optional(),insert_text:U.string().optional(),old_str:U.string().optional(),view_range:U.array(U.number().int()).optional()}))),Xd8=FY({id:"anthropic.text_editor_20241022",inputSchema:Yd8}),Gd8=J1(()=>G1(U.object({command:U.enum(["view","create","str_replace","insert","undo_edit"]),path:U.string(),file_text:U.string().optional(),insert_line:U.number().int().optional(),new_str:U.string().optional(),insert_text:U.string().optional(),old_str:U.string().optional(),view_range:U.array(U.number().int()).optional()}))),Jd8=FY({id:"anthropic.text_editor_20250124",inputSchema:Gd8}),Qd8=J1(()=>G1(U.object({command:U.enum(["view","create","str_replace","insert"]),path:U.string(),file_text:U.string().optional(),insert_line:U.number().int().optional(),new_str:U.string().optional(),insert_text:U.string().optional(),old_str:U.string().optional(),view_range:U.array(U.number().int()).optional()}))),Wd8=FY({id:"anthropic.text_editor_20250429",inputSchema:Qd8}),Zd8=J1(()=>G1(U.array(U.object({type:U.literal("tool_reference"),toolName:U.string()})))),Kd8=J1(()=>G1(U.object({query:U.string(),limit:U.number().optional()}))),Ud8=D5({id:"anthropic.tool_search_bm25_20251119",inputSchema:Kd8,outputSchema:Zd8,supportsDeferredResults:!0}),zd8={bash_20241022:cp8,bash_20250124:ip8,codeExecution_20250522:Mp8,codeExecution_20250825:Ip8,codeExecution_20260120:_p8,computer_20241022:rp8,computer_20250124:sp8,computer_20251124:tp8,memory_20250818:$d8,textEditor_20241022:Xd8,textEditor_20250124:Jd8,textEditor_20250429:Wd8,textEditor_20250728:eu8,webFetch_20250910:Lp8,webFetch_20260209:Ap8,webSearch_20250305:Kp8,webSearch_20260209:Jp8,toolSearchRegex_20251119:Cp8,toolSearchBm25_20251119:Hd8};UV();Ad8=J1(()=>G1(U.object({error:U.object({code:U.number().nullable(),message:U.string(),status:U.string()})}))),iK=OE({errorSchema:Ad8,errorToMessage:($)=>$.error.message}),Fd8=U.union([U.object({text:U.string()}),U.object({inlineData:U.object({mimeType:U.string(),data:U.string()})})]),Dd8=J1(()=>G1(U.object({outputDimensionality:U.number().optional(),taskType:U.enum(["SEMANTIC_SIMILARITY","CLASSIFICATION","CLUSTERING","RETRIEVAL_DOCUMENT","RETRIEVAL_QUERY","QUESTION_ANSWERING","FACT_VERIFICATION","CODE_RETRIEVAL_QUERY"]).optional(),content:U.array(U.array(Fd8).min(1).nullable()).optional()}))),Ld8=J1(()=>G1(U.object({embeddings:U.array(U.object({values:U.array(U.number())}))}))),Bd8=J1(()=>G1(U.object({embedding:U.object({values:U.array(U.number())})})));Ed8=/^data:([^;,]+);base64,(.+)$/s;L94=J1(()=>G1(U.object({responseModalities:U.array(U.enum(["TEXT","IMAGE"])).optional(),thinkingConfig:U.object({thinkingBudget:U.number().optional(),includeThoughts:U.boolean().optional(),thinkingLevel:U.enum(["minimal","low","medium","high"]).optional()}).optional(),cachedContent:U.string().optional(),structuredOutputs:U.boolean().optional(),safetySettings:U.array(U.object({category:U.enum(["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_CIVIC_INTEGRITY"]),threshold:U.enum(["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"])})).optional(),threshold:U.enum(["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"]).optional(),audioTimestamp:U.boolean().optional(),labels:U.record(U.string(),U.string()).optional(),mediaResolution:U.enum(["MEDIA_RESOLUTION_UNSPECIFIED","MEDIA_RESOLUTION_LOW","MEDIA_RESOLUTION_MEDIUM","MEDIA_RESOLUTION_HIGH"]).optional(),imageConfig:U.object({aspectRatio:U.enum(["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9","1:8","8:1","1:4","4:1"]).optional(),imageSize:U.enum(["1K","2K","4K","512"]).optional()}).optional(),retrievalConfig:U.object({latLng:U.object({latitude:U.number(),longitude:U.number()}).optional()}).optional(),streamFunctionCallArguments:U.boolean().optional(),serviceTier:U.enum(["standard","flex","priority"]).optional()}))),wd8={standard:"SERVICE_TIER_STANDARD",flex:"SERVICE_TIER_FLEX",priority:"SERVICE_TIER_PRIORITY"};kd8=U.object({jsonPath:U.string(),stringValue:U.string().nullish(),numberValue:U.number().nullish(),boolValue:U.boolean().nullish(),nullValue:U.unknown().nullish(),willContinue:U.boolean().nullish()}),M94=U.array(U.object({modality:U.string(),tokenCount:U.number()})).nullish(),x74=U.object({cachedContentTokenCount:U.number().nullish(),thoughtsTokenCount:U.number().nullish(),promptTokenCount:U.number().nullish(),candidatesTokenCount:U.number().nullish(),totalTokenCount:U.number().nullish(),trafficType:U.string().nullish(),promptTokensDetails:M94,candidatesTokensDetails:M94}),vd8=J1(()=>G1(U.object({candidates:U.array(U.object({content:v74().nullish().or(U.object({}).strict()),finishReason:U.string().nullish(),finishMessage:U.string().nullish(),safetyRatings:U.array(S90()).nullish(),groundingMetadata:k74().nullish(),urlContextMetadata:y74().nullish()})),usageMetadata:x74.nullish(),promptFeedback:U.object({blockReason:U.string().nullish(),safetyRatings:U.array(S90()).nullish()}).nullish(),serviceTier:U.string().nullish()}))),xd8=J1(()=>G1(U.object({candidates:U.array(U.object({content:v74().nullish(),finishReason:U.string().nullish(),finishMessage:U.string().nullish(),safetyRatings:U.array(S90()).nullish(),groundingMetadata:k74().nullish(),urlContextMetadata:y74().nullish()})).nullish(),usageMetadata:x74.nullish(),promptFeedback:U.object({blockReason:U.string().nullish(),safetyRatings:U.array(S90()).nullish()}).nullish(),serviceTier:U.string().nullish()}))),yd8=D5({id:"google.code_execution",inputSchema:U.object({language:U.string().describe("The programming language of the code."),code:U.string().describe("The code to be executed.")}),outputSchema:U.object({outcome:U.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),output:U.string().describe("The output from the code execution.")})}),bd8=FY({id:"google.enterprise_web_search",inputSchema:J1(()=>G1(U.object({})))}),hd8=U.object({fileSearchStoreNames:U.array(U.string()).describe("The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"),topK:U.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),metadataFilter:U.string().describe("Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression.").optional()}).passthrough(),fd8=J1(()=>G1(hd8)),gd8=FY({id:"google.file_search",inputSchema:fd8}),md8=FY({id:"google.google_maps",inputSchema:J1(()=>G1(U.object({})))}),ud8=U.object({searchTypes:U.object({webSearch:U.object({}).optional(),imageSearch:U.object({}).optional()}).optional(),timeRangeFilter:U.object({startTime:U.string(),endTime:U.string()}).optional()}).passthrough(),pd8=J1(()=>G1(ud8)),dd8=FY({id:"google.google_search",inputSchema:pd8}),cd8=FY({id:"google.url_context",inputSchema:J1(()=>G1(U.object({})))}),ld8=FY({id:"google.vertex_rag_store",inputSchema:U.object({ragCorpus:U.string(),topK:U.number().optional()})}),id8={googleSearch:dd8,enterpriseWebSearch:bd8,googleMaps:md8,urlContext:cd8,fileSearch:gd8,codeExecution:yd8,vertexRagStore:ld8};rd8=J1(()=>G1(U.object({predictions:U.array(U.object({bytesBase64Encoded:U.string()})).default([])}))),ad8=J1(()=>G1(U.object({personGeneration:U.enum(["dont_allow","allow_adult","allow_all"]).nullish(),aspectRatio:U.enum(["1:1","3:4","4:3","9:16","16:9"]).nullish()}))),q94=U.object({name:U.string().nullish(),done:U.boolean().nullish(),error:U.object({code:U.number().nullish(),message:U.string(),status:U.string().nullish()}).nullish(),response:U.object({generateVideoResponse:U.object({generatedSamples:U.array(U.object({video:U.object({uri:U.string().nullish()}).nullish()})).nullish()}).nullish()}).nullish()}),od8=J1(()=>G1(U.object({pollIntervalMs:U.number().positive().nullish(),pollTimeoutMs:U.number().positive().nullish(),personGeneration:U.enum(["dont_allow","allow_adult","allow_all"]).nullish(),negativePrompt:U.string().nullish(),referenceImages:U.array(U.object({bytesBase64Encoded:U.string().nullish(),gcsUri:U.string().nullish()})).nullish()}).passthrough()));td8={pdf:"application/pdf",txt:"text/plain",md:"text/markdown",markdown:"text/markdown",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};$c8=new Set(["google_search_call","code_execution_call","url_context_call","file_search_call","google_maps_call","mcp_server_tool_call"]),Yc8=new Set(["google_search_result","code_execution_result","url_context_result","file_search_result","google_maps_result","mcp_server_tool_result"]);fy0=J1(()=>G1(U.object({id:U.string().nullish(),created:U.string().nullish(),updated:U.string().nullish(),status:u74(),model:U.string().nullish(),agent:U.string().nullish(),outputs:U.array(c74()).nullish(),usage:m74().nullish(),service_tier:U.string().nullish(),previous_interaction_id:U.string().nullish(),response_modalities:U.array(U.string()).nullish()}).loose())),Hc8=J1(()=>G1((()=>{let $=u74(),Y=p74(),X=d74(),G=U.object({event_type:U.literal("interaction.start"),event_id:U.string().nullish(),interaction:U.object({id:U.string().nullish(),created:U.string().nullish(),model:U.string().nullish(),agent:U.string().nullish(),status:$.nullish()}).loose()}).loose(),J=U.object({event_type:U.literal("content.start"),event_id:U.string().nullish(),index:U.number(),content:c74()}).loose(),Q=U.object({type:U.literal("text"),text:U.string()}).loose(),W=U.object({type:U.literal("thought_summary"),content:X.nullish()}).loose(),Z=U.object({type:U.literal("thought_signature"),signature:U.string().nullish()}).loose(),K=U.object({type:U.literal("function_call"),id:U.string(),name:U.string(),arguments:U.record(U.string(),U.unknown()).nullish(),signature:U.string().nullish()}).loose(),H=U.object({type:U.literal("text_annotation"),annotations:U.array(Y).nullish()}).loose(),z=U.object({type:U.literal("image"),data:U.string().nullish(),mime_type:U.string().nullish(),resolution:U.enum(["low","medium","high","ultra_high"]).nullish(),uri:U.string().nullish()}).loose(),V=U.object({type:U.enum(["google_search_call","code_execution_call","url_context_call","file_search_call","google_maps_call","mcp_server_tool_call"]),id:U.string(),arguments:U.record(U.string(),U.unknown()).nullish(),name:U.string().nullish(),server_name:U.string().nullish(),search_type:U.string().nullish(),signature:U.string().nullish()}).loose(),A=U.object({type:U.enum(["google_search_result","code_execution_result","url_context_result","file_search_result","google_maps_result","mcp_server_tool_result"]),call_id:U.string(),result:U.unknown().nullish(),is_error:U.boolean().nullish(),name:U.string().nullish(),server_name:U.string().nullish(),signature:U.string().nullish()}).loose(),F=U.object({type:U.string()}).loose(),N=U.union([Q,z,W,Z,K,H,V,A,F]),D=U.object({event_type:U.literal("content.delta"),event_id:U.string().nullish(),index:U.number(),delta:N}).loose(),L=U.object({event_type:U.literal("content.stop"),event_id:U.string().nullish(),index:U.number()}).loose(),B=U.object({event_type:U.literal("interaction.status_update"),event_id:U.string().nullish(),interaction_id:U.string().nullish(),status:$}).loose(),O=U.object({event_type:U.literal("interaction.complete"),event_id:U.string().nullish(),interaction:U.object({id:U.string().nullish(),status:$.nullish(),usage:m74().nullish(),service_tier:U.string().nullish()}).loose()}).loose(),E=U.object({event_type:U.literal("error"),event_id:U.string().nullish(),error:U.object({code:U.string().nullish(),message:U.string().nullish()}).loose().nullish()}).loose(),M=U.object({event_type:U.string()}).loose();return U.union([G,J,D,L,B,O,E,M])})())),zc8=J1(()=>G1(U.object({previousInteractionId:U.string().nullish(),store:U.boolean().nullish(),agent:U.string().nullish(),agentConfig:U.union([U.object({type:U.literal("dynamic")}).loose(),U.object({type:U.literal("deep-research"),thinkingSummaries:U.enum(["auto","none"]).nullish(),visualization:U.enum(["off","auto"]).nullish(),collaborativePlanning:U.boolean().nullish()})]).nullish(),thinkingLevel:U.enum(["minimal","low","medium","high"]).nullish(),thinkingSummaries:U.enum(["auto","none"]).nullish(),imageConfig:U.object({aspectRatio:U.enum(["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9","1:8","8:1","1:4","4:1"]).nullish(),imageSize:U.enum(["1K","2K","4K","512"]).nullish()}).nullish(),mediaResolution:U.enum(["low","medium","high","ultra_high"]).nullish(),responseModalities:U.array(U.enum(["text","image","audio","video","document"])).nullish(),serviceTier:U.enum(["flex","standard","priority"]).nullish(),systemInstruction:U.string().nullish(),signature:U.string().nullish(),interactionId:U.string().nullish(),pollingTimeoutMs:U.number().int().positive().nullish()})));Vc8=new Set(["google_search_call","code_execution_call","url_context_call","file_search_call","google_maps_call","mcp_server_tool_call"]),Ac8=new Set(["google_search_result","code_execution_result","url_context_result","file_search_result","google_maps_result","mcp_server_tool_result"]);Nc8=new Set(["completed","failed","cancelled","incomplete"]);Wj()});function N$4($={}){var Y;let X=sK((Y=$.baseURL)!=null?Y:"https://api.cerebras.ai/v1"),G=()=>wQ({Authorization:`Bearer ${aK({apiKey:$.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...$.headers},`ai-sdk/cerebras/${qc8}`),J=(W)=>{return new Fm(W,{provider:"cerebras.chat",url:({path:Z})=>`${X}${Z}`,headers:G,fetch:$.fetch,errorStructure:Pc8,supportsStructuredOutputs:!0})},Q=(W)=>J(W);return Q.languageModel=J,Q.chat=J,Q.textEmbeddingModel=(W)=>{throw new LE({modelId:W,modelType:"textEmbeddingModel"})},Q.imageModel=(W)=>{throw new LE({modelId:W,modelType:"imageModel"})},Q}function L$4($={}){var Y;let X=sK((Y=$.baseURL)!=null?Y:"https://api.deepinfra.com/v1"),G=()=>wQ({Authorization:`Bearer ${aK({apiKey:$.apiKey,environmentVariableName:"DEEPINFRA_API_KEY",description:"DeepInfra's API key"})}`,...$.headers},`ai-sdk/deepinfra/${Cc8}`),J=(z)=>({provider:`deepinfra.${z}`,url:({path:V})=>`${X}/openai${V}`,headers:G,fetch:$.fetch}),Q=(z)=>{return new Tc8(z,J("chat"))},W=(z)=>new p90(z,J("completion")),Z=(z)=>new d90(z,J("embedding")),K=(z)=>new wc8(z,{...J("image"),baseURL:X?`${X}/inference`:"https://api.deepinfra.com/v1/inference"}),H=(z)=>Q(z);return H.completionModel=W,H.chatModel=Q,H.image=K,H.imageModel=K,H.languageModel=Q,H.textEmbeddingModel=Z,H}function Sc8({prompt:$,responseFormat:Y,modelId:X}){let G=X.includes("deepseek-v4"),J=[],Q=[];if((Y==null?void 0:Y.type)==="json")if(Y.schema==null)J.push({role:"system",content:"Return JSON."});else J.push({role:"system",content:"Return JSON that conforms to the following schema: "+JSON.stringify(Y.schema)});let W=-1;for(let K=$.length-1;K>=0;K--)if($[K].role==="user"){W=K;break}let Z=-1;for(let{role:K,content:H}of $)switch(Z++,K){case"system":{J.push({role:"system",content:H});break}case"user":{let z="";for(let V of H)if(V.type==="text")z+=V.text;else Q.push({type:"other",message:`Unsupported user message part type: ${V.type}`});J.push({role:"user",content:z});break}case"assistant":{let z="",V,A=[];for(let F of H)switch(F.type){case"text":{z+=F.text;break}case"reasoning":{if(Z<=W&&!G)break;if(V==null)V=F.text;else V+=F.text;break}case"tool-call":{A.push({id:F.toolCallId,type:"function",function:{name:F.toolName,arguments:JSON.stringify(F.input)}});break}}J.push({role:"assistant",content:z,reasoning_content:V!=null?V:G?"":void 0,tool_calls:A.length>0?A:void 0});break}case"tool":{for(let z of H){let V=z.output,A;switch(V.type){case"text":case"error-text":A=V.value;break;case"content":case"json":case"error-json":A=JSON.stringify(V.value);break}J.push({role:"tool",tool_call_id:z.toolCallId,content:A})}break}default:{Q.push({type:"other",message:`Unsupported message role: ${K}`});break}}return{messages:J,warnings:Q}}function yc8({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)if(Q.type==="provider-defined")X.push({type:"unsupported-tool",tool:Q});else G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema}});if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":case"required":return{tools:G,toolChoice:J,toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new w9({functionality:`tool choice type: ${J}`})}}function i74({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function n74($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"tool_calls":return"tool-calls";case"insufficient_system_resource":return"error";default:return"unknown"}}function E$4($={}){var Y;let X=sK((Y=$.baseURL)!=null?Y:"https://api.deepseek.com"),G=()=>wQ({Authorization:`Bearer ${aK({apiKey:$.apiKey,environmentVariableName:"DEEPSEEK_API_KEY",description:"DeepSeek API key"})}`,...$.headers},`ai-sdk/deepseek/${hc8}`),J=(W)=>{return new bc8(W,{provider:"deepseek.chat",url:({path:Z})=>`${X}${Z}`,headers:G,fetch:$.fetch})},Q=(W)=>J(W);return Q.languageModel=J,Q.chat=J,Q.textEmbeddingModel=(W)=>{throw new LE({modelId:W,modelType:"textEmbeddingModel"})},Q.imageModel=(W)=>{throw new LE({modelId:W,modelType:"imageModel"})},Q}function r74($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Q=(Y=$.prompt_tokens)!=null?Y:0,W=(X=$.completion_tokens)!=null?X:0,Z=(J=(G=$.completion_tokens_details)==null?void 0:G.reasoning_tokens)!=null?J:void 0,K=Z!=null?W-Z:W;return{inputTokens:{total:Q,noCache:Q,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:W,text:K,reasoning:Z},raw:$}}function fc8($){var Y;let X=[];for(let{role:G,content:J}of $)switch(G){case"system":{X.push({role:"system",content:J});break}case"user":{if(J.length===1&&J[0].type==="text"){X.push({role:"user",content:J[0].text});break}X.push({role:"user",content:J.map((Q)=>{switch(Q.type){case"text":return{type:"text",text:Q.text};case"file":{if(!Q.mediaType.startsWith("image/"))throw new d5({functionality:"Non-image file content parts"});let W=Q.mediaType==="image/*"?"image/jpeg":Q.mediaType;return{type:"image_url",image_url:{url:Q.data instanceof URL?Q.data.toString():`data:${W};base64,${nY(Q.data)}`}}}}})});break}case"assistant":{let Q="",W="",Z=[];for(let K of J)switch(K.type){case"reasoning":{W+=K.text;break}case"text":{Q+=K.text;break}case"tool-call":{Z.push({id:K.toolCallId,type:"function",function:{name:K.toolName,arguments:JSON.stringify(K.input)}});break}}X.push({role:"assistant",content:Q,...W.length>0?{reasoning:W}:null,...Z.length>0?{tool_calls:Z}:null});break}case"tool":{for(let Q of J){if(Q.type==="tool-approval-response")continue;let W=Q.output,Z;switch(W.type){case"text":case"error-text":Z=W.value;break;case"execution-denied":Z=(Y=W.reason)!=null?Y:"Tool execution denied.";break;case"content":case"json":case"error-json":Z=JSON.stringify(W.value);break}X.push({role:"tool",tool_call_id:Q.toolCallId,content:Z})}break}default:throw Error(`Unsupported role: ${G}`)}return X}function a74({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function mc8($){return R$4.includes($)}function uc8(){return R$4.join(", ")}function pc8({tools:$,toolChoice:Y,modelId:X}){$=($==null?void 0:$.length)?$:void 0;let G=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:G};let J=[];for(let W of $)if(W.type==="provider")if(W.id==="groq.browser_search")if(!mc8(X))G.push({type:"unsupported",feature:`provider-defined tool ${W.id}`,details:`Browser search is only supported on the following models: ${uc8()}. Current model: ${X}`});else J.push({type:"browser_search"});else G.push({type:"unsupported",feature:`provider-defined tool ${W.id}`});else J.push({type:"function",function:{name:W.name,description:W.description,parameters:W.inputSchema,...W.strict!=null?{strict:W.strict}:{}}});if(Y==null)return{tools:J,toolChoice:void 0,toolWarnings:G};let Q=Y.type;switch(Q){case"auto":case"none":case"required":return{tools:J,toolChoice:Q,toolWarnings:G};case"tool":return{tools:J,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:G};default:throw new d5({functionality:`tool choice type: ${Q}`})}}function s74($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}function q$4($={}){var Y;let X=(Y=EE($.baseURL))!=null?Y:"https://api.groq.com/openai/v1",G=()=>KV({Authorization:`Bearer ${BE({apiKey:$.apiKey,environmentVariableName:"GROQ_API_KEY",description:"Groq"})}`,...$.headers},`ai-sdk/groq/${oc8}`),J=(K)=>new dc8(K,{provider:"groq.chat",url:({path:H})=>`${X}${H}`,headers:G,fetch:$.fetch}),Q=(K)=>{if(new.target)throw Error("The Groq model function cannot be called with the new keyword.");return J(K)},W=(K)=>{return new nc8(K,{provider:"groq.transcription",url:({path:H})=>`${X}${H}`,headers:G,fetch:$.fetch})},Z=function(K){return Q(K)};return Z.specificationVersion="v3",Z.languageModel=Q,Z.chat=J,Z.embeddingModel=(K)=>{throw new NE({modelId:K,modelType:"embeddingModel"})},Z.textEmbeddingModel=Z.embeddingModel,Z.imageModel=(K)=>{throw new NE({modelId:K,modelType:"imageModel"})},Z.transcription=W,Z.transcriptionModel=W,Z.tools=sc8,Z}function o74($){var Y,X,G,J,Q;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let{prompt_tokens:W,completion_tokens:Z}=$,K=(Q=(J=(X=$.num_cached_tokens)!=null?X:(Y=$.prompt_tokens_details)==null?void 0:Y.cached_tokens)!=null?J:(G=$.prompt_token_details)==null?void 0:G.cached_tokens)!=null?Q:0;return{inputTokens:{total:W,noCache:W-K,cacheRead:K||void 0,cacheWrite:void 0},outputTokens:{total:Z,text:Z,reasoning:void 0},raw:$}}function t74({data:$,mediaType:Y}){return $ instanceof URL?$.toString():`data:${Y};base64,${nY($)}`}function tc8($){var Y;let X=[];for(let G=0;G<$.length;G++){let{role:J,content:Q}=$[G],W=G===$.length-1;switch(J){case"system":{X.push({role:"system",content:Q});break}case"user":{X.push({role:"user",content:Q.map((Z)=>{switch(Z.type){case"text":return{type:"text",text:Z.text};case"file":if(Z.mediaType.startsWith("image/")){let K=Z.mediaType==="image/*"?"image/jpeg":Z.mediaType;return{type:"image_url",image_url:t74({data:Z.data,mediaType:K})}}else if(Z.mediaType==="application/pdf")return{type:"document_url",document_url:t74({data:Z.data,mediaType:"application/pdf"})};else throw new d5({functionality:"Only images and PDF file parts are supported"})}})});break}case"assistant":{let Z="",K=[];for(let H of Q)switch(H.type){case"text":{Z+=H.text;break}case"tool-call":{K.push({id:H.toolCallId,type:"function",function:{name:H.toolName,arguments:JSON.stringify(H.input)}});break}case"reasoning":{Z+=H.text;break}default:throw Error(`Unsupported content type in assistant message: ${H.type}`)}X.push({role:"assistant",content:Z,prefix:W?!0:void 0,tool_calls:K.length>0?K:void 0});break}case"tool":{for(let Z of Q){if(Z.type==="tool-approval-response")continue;let K=Z.output,H;switch(K.type){case"text":case"error-text":H=K.value;break;case"execution-denied":H=(Y=K.reason)!=null?Y:"Tool execution denied.";break;case"content":case"json":case"error-json":H=JSON.stringify(K.value);break}X.push({role:"tool",name:Z.toolName,tool_call_id:Z.toolCallId,content:H})}break}default:throw Error(`Unsupported role: ${J}`)}}return X}function e74({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function $$4($){switch($){case"stop":return"stop";case"length":case"model_length":return"length";case"tool_calls":return"tool-calls";default:return"other"}}function Yl8({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)if(Q.type==="provider")X.push({type:"unsupported",feature:`provider-defined tool ${Q.id}`});else G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema,...Q.strict!=null?{strict:Q.strict}:{}}});if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":return{tools:G,toolChoice:J,toolWarnings:X};case"required":return{tools:G,toolChoice:"any",toolWarnings:X};case"tool":return{tools:G.filter((Q)=>Q.function.name===Y.toolName),toolChoice:"any",toolWarnings:X};default:throw new d5({functionality:`tool choice type: ${J}`})}}function Y$4($){return $.filter((Y)=>Y.type==="text").map((Y)=>Y.text).join("")}function X$4($){if(typeof $==="string")return $;if($==null)return;let Y=[];for(let X of $){let{type:G}=X;switch(G){case"text":Y.push(X.text);break;case"thinking":case"image_url":case"reference":break;default:throw Error(`Unsupported type: ${G}`)}}return Y.length?Y.join(""):void 0}function zb0($={}){var Y;let X=(Y=EE($.baseURL))!=null?Y:"https://api.mistral.ai/v1",G=()=>KV({Authorization:`Bearer ${BE({apiKey:$.apiKey,environmentVariableName:"MISTRAL_API_KEY",description:"Mistral"})}`,...$.headers},`ai-sdk/mistral/${Zl8}`),J=(Z)=>new Xl8(Z,{provider:"mistral.chat",baseURL:X,headers:G,fetch:$.fetch,generateId:$.generateId}),Q=(Z)=>new Ql8(Z,{provider:"mistral.embedding",baseURL:X,headers:G,fetch:$.fetch}),W=function(Z){if(new.target)throw Error("The Mistral model function cannot be called with the new keyword.");return J(Z)};return W.specificationVersion="v3",W.languageModel=J,W.chat=J,W.embedding=Q,W.embeddingModel=Q,W.textEmbedding=Q,W.textEmbeddingModel=Q,W.imageModel=(Z)=>{throw new NE({modelId:Z,modelType:"imageModel"})},W}function Kl8($){let Y=[];for(let{role:X,content:G}of $)switch(X){case"system":{Y.push({role:"system",content:G});break}case"user":case"assistant":{let J=G.some((W)=>W.type==="file"&&W.mediaType.startsWith("image/")||W.type==="file"&&W.mediaType==="application/pdf"),Q=G.map((W,Z)=>{var K;switch(W.type){case"text":return{type:"text",text:W.text};case"file":if(W.mediaType==="application/pdf")return W.data instanceof URL?{type:"file_url",file_url:{url:W.data.toString()},file_name:W.filename}:{type:"file_url",file_url:{url:typeof W.data==="string"?W.data:Am(W.data)},file_name:W.filename||`document-${Z}.pdf`};else if(W.mediaType.startsWith("image/"))return W.data instanceof URL?{type:"image_url",image_url:{url:W.data.toString()}}:{type:"image_url",image_url:{url:`data:${(K=W.mediaType)!=null?K:"image/jpeg"};base64,${typeof W.data==="string"?W.data:Am(W.data)}`}}}}).filter(Boolean);Y.push({role:X,content:J?Q:Q.filter((W)=>W.type==="text").map((W)=>W.text).join("")});break}case"tool":throw new w9({functionality:"Tool messages"});default:throw Error(`Unsupported role: ${X}`)}return Y}function G$4($){switch($){case"stop":case"length":return $;default:return"unknown"}}function J$4({id:$,model:Y,created:X}){return{id:$,modelId:Y,timestamp:new Date(X*1000)}}function j$4($={}){let Y=()=>wQ({Authorization:`Bearer ${aK({apiKey:$.apiKey,environmentVariableName:"PERPLEXITY_API_KEY",description:"Perplexity"})}`,...$.headers},`ai-sdk/perplexity/${Al8}`),X=(J)=>{var Q;return new Ul8(J,{baseURL:sK((Q=$.baseURL)!=null?Q:"https://api.perplexity.ai"),headers:Y,generateId:w8,fetch:$.fetch})},G=(J)=>X(J);return G.languageModel=X,G.textEmbeddingModel=(J)=>{throw new LE({modelId:J,modelType:"textEmbeddingModel"})},G.imageModel=(J)=>{throw new LE({modelId:J,modelType:"imageModel"})},G}function Bl8(){if(typeof process>"u")return;if(typeof process.env.TOGETHER_API_KEY==="string")return;let $=process.env.TOGETHER_AI_API_KEY;if(typeof $==="string")console.warn("TOGETHER_AI_API_KEY is deprecated and will be removed in a future release. Please use TOGETHER_API_KEY instead.");return $}function T$4($={}){var Y;let X=sK((Y=$.baseURL)!=null?Y:"https://api.together.xyz/v1/"),G=()=>{var z;return wQ({Authorization:`Bearer ${aK({apiKey:(z=$.apiKey)!=null?z:Bl8(),environmentVariableName:"TOGETHER_API_KEY",description:"TogetherAI"})}`,...$.headers},`ai-sdk/togetherai/${Ll8}`)},J=(z)=>({provider:`togetherai.${z}`,url:({path:V})=>`${X}${V}`,headers:G,fetch:$.fetch}),Q=(z)=>{return new Fm(z,J("chat"))},W=(z)=>new p90(z,J("completion")),Z=(z)=>new d90(z,J("embedding")),K=(z)=>new Fl8(z,{...J("image"),baseURL:X!=null?X:"https://api.together.xyz/v1/"}),H=(z)=>Q(z);return H.completionModel=W,H.languageModel=Q,H.chatModel=Q,H.textEmbeddingModel=Z,H.image=K,H.imageModel=K,H}function Ol8($){var Y;let X=[],G=[];for(let{role:J,content:Q}of $)switch(J){case"system":{X.push({role:"system",content:Q});break}case"user":{if(Q.length===1&&Q[0].type==="text"){X.push({role:"user",content:Q[0].text});break}X.push({role:"user",content:Q.map((W)=>{switch(W.type){case"text":return{type:"text",text:W.text};case"file":if(W.mediaType.startsWith("image/")){let Z=W.mediaType==="image/*"?"image/jpeg":W.mediaType;return{type:"image_url",image_url:{url:W.data instanceof URL?W.data.toString():`data:${Z};base64,${nY(W.data)}`}}}else throw new d5({functionality:`file part media type ${W.mediaType}`})}})});break}case"assistant":{let W="",Z=[];for(let K of Q)switch(K.type){case"text":{W+=K.text;break}case"tool-call":{Z.push({id:K.toolCallId,type:"function",function:{name:K.toolName,arguments:JSON.stringify(K.input)}});break}}X.push({role:"assistant",content:W,tool_calls:Z.length>0?Z:void 0});break}case"tool":{for(let W of Q){if(W.type==="tool-approval-response")continue;let Z=W.output,K;switch(Z.type){case"text":case"error-text":K=Z.value;break;case"execution-denied":K=(Y=Z.reason)!=null?Y:"Tool execution denied.";break;case"content":case"json":case"error-json":K=JSON.stringify(Z.value);break}X.push({role:"tool",tool_call_id:W.toolCallId,content:K})}break}default:throw Error(`Unsupported role: ${J}`)}return{messages:X,warnings:G}}function Z$4($){var Y,X,G,J;let Q=(X=(Y=$.prompt_tokens_details)==null?void 0:Y.cached_tokens)!=null?X:0,W=(J=(G=$.completion_tokens_details)==null?void 0:G.reasoning_tokens)!=null?J:0,Z=Q<=$.prompt_tokens;return{inputTokens:{total:Z?$.prompt_tokens:$.prompt_tokens+Q,noCache:Z?$.prompt_tokens-Q:$.prompt_tokens,cacheRead:Q,cacheWrite:void 0},outputTokens:{total:$.completion_tokens+W,text:$.completion_tokens,reasoning:W},raw:$}}function t90({id:$,model:Y,created:X,created_at:G}){let J=X!=null?X:G;return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:J!=null?new Date(J*1000):void 0}}function K$4($){switch($){case"stop":return"stop";case"length":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}function _l8({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)if(Q.type==="provider")X.push({type:"unsupported",feature:`provider-defined tool ${Q.name}`});else G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema,...Q.strict!=null?{strict:Q.strict}:{}}});if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":return{tools:G,toolChoice:J,toolWarnings:X};case"required":return{tools:G,toolChoice:"required",toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new d5({functionality:`tool choice type: ${J}`})}}async function yl8({prompt:$}){var Y,X,G,J,Q,W,Z,K,H;let z=[],V=[];for(let A of $)switch(A.role){case"system":{z.push({role:"system",content:A.content});break}case"user":{let F=[];for(let N of A.content)switch(N.type){case"text":{F.push({type:"input_text",text:N.text});break}case"file":{if(N.mediaType.startsWith("image/")){let D=N.mediaType==="image/*"?"image/jpeg":N.mediaType,L=N.data instanceof URL?N.data.toString():`data:${D};base64,${nY(N.data)}`;F.push({type:"input_image",image_url:L})}else if(N.data instanceof URL)F.push({type:"input_file",file_url:N.data.toString()});else throw new d5({functionality:`file part media type ${N.mediaType} as inline data (xAI Responses requires a URL or a Files API reference for non-image files)`});break}default:V.push({type:"other",message:"xAI Responses API does not support this content type in user messages"})}z.push({role:"user",content:F});break}case"assistant":{for(let F of A.content)switch(F.type){case"text":{let N=typeof((X=(Y=F.providerOptions)==null?void 0:Y.xai)==null?void 0:X.itemId)==="string"?F.providerOptions.xai.itemId:void 0;z.push({role:"assistant",content:F.text,id:N});break}case"tool-call":{if(F.providerExecuted)break;let N=typeof((J=(G=F.providerOptions)==null?void 0:G.xai)==null?void 0:J.itemId)==="string"?F.providerOptions.xai.itemId:void 0;z.push({type:"function_call",id:N!=null?N:F.toolCallId,call_id:F.toolCallId,name:F.toolName,arguments:JSON.stringify(F.input),status:"completed"});break}case"tool-result":break;case"reasoning":{let N=typeof((W=(Q=F.providerOptions)==null?void 0:Q.xai)==null?void 0:W.itemId)==="string"?F.providerOptions.xai.itemId:void 0,D=typeof((K=(Z=F.providerOptions)==null?void 0:Z.xai)==null?void 0:K.reasoningEncryptedContent)==="string"?F.providerOptions.xai.reasoningEncryptedContent:void 0;if(N!=null||D!=null){let L=[];if(F.text.length>0)L.push({type:"summary_text",text:F.text});z.push({type:"reasoning",id:N!=null?N:"",summary:L,status:"completed",...D!=null&&{encrypted_content:D}})}else V.push({type:"other",message:"Reasoning parts without itemId or encrypted content cannot be sent back to xAI. Skipping."});break}case"file":{V.push({type:"other",message:`xAI Responses API does not support ${F.type} in assistant messages`});break}default:V.push({type:"other",message:"xAI Responses API does not support this content type in assistant messages"})}break}case"tool":{for(let F of A.content){if(F.type==="tool-approval-response")continue;let N=F.output,D;switch(N.type){case"text":case"error-text":D=N.value;break;case"execution-denied":D=(H=N.reason)!=null?H:"tool execution denied";break;case"json":case"error-json":D=JSON.stringify(N.value);break;case"content":D=N.value.map((L)=>{if(L.type==="text")return L.text;return""}).join("");break;default:D=""}z.push({type:"function_call_output",call_id:F.toolCallId,output:D})}break}default:V.push({type:"other",message:"unsupported message role"})}return{input:z,inputWarnings:V}}function Qb0($){var Y,X,G,J;let Q=(X=(Y=$.input_tokens_details)==null?void 0:Y.cached_tokens)!=null?X:0,W=(J=(G=$.output_tokens_details)==null?void 0:G.reasoning_tokens)!=null?J:0,Z=Q<=$.input_tokens;return{inputTokens:{total:Z?$.input_tokens:$.input_tokens+Q,noCache:Z?$.input_tokens-Q:$.input_tokens,cacheRead:Q,cacheWrite:void 0},outputTokens:{total:$.output_tokens,text:$.output_tokens-W,reasoning:W},raw:$}}function a90($){switch($){case"stop":case"completed":return"stop";case"length":case"max_output_tokens":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}async function Yi8({tools:$,toolChoice:Y}){let X=($==null?void 0:$.length)?$:void 0,G=[];if(X==null)return{tools:void 0,toolChoice:void 0,toolWarnings:G};let J=[],Q=new Map;for(let Z of X)if(Q.set(Z.name,Z),Z.type==="provider")switch(Z.id){case"xai.web_search":{let K=await P8({value:Z.args,schema:nl8});J.push({type:"web_search",allowed_domains:K.allowedDomains,excluded_domains:K.excludedDomains,enable_image_understanding:K.enableImageUnderstanding});break}case"xai.x_search":{let K=await P8({value:Z.args,schema:ol8});J.push({type:"x_search",allowed_x_handles:K.allowedXHandles,excluded_x_handles:K.excludedXHandles,from_date:K.fromDate,to_date:K.toDate,enable_image_understanding:K.enableImageUnderstanding,enable_video_understanding:K.enableVideoUnderstanding});break}case"xai.code_execution":{J.push({type:"code_interpreter"});break}case"xai.view_image":{J.push({type:"view_image"});break}case"xai.view_x_video":{J.push({type:"view_x_video"});break}case"xai.file_search":{let K=await P8({value:Z.args,schema:gl8});J.push({type:"file_search",vector_store_ids:K.vectorStoreIds,max_num_results:K.maxNumResults});break}case"xai.mcp":{let K=await P8({value:Z.args,schema:dl8});J.push({type:"mcp",server_url:K.serverUrl,server_label:K.serverLabel,server_description:K.serverDescription,allowed_tools:K.allowedTools,headers:K.headers,authorization:K.authorization});break}default:{G.push({type:"unsupported",feature:`provider-defined tool ${Z.name}`});break}}else J.push({type:"function",name:Z.name,description:Z.description,parameters:Z.inputSchema,...Z.strict!=null?{strict:Z.strict}:{}});if(Y==null)return{tools:J,toolChoice:void 0,toolWarnings:G};let W=Y.type;switch(W){case"auto":case"none":return{tools:J,toolChoice:W,toolWarnings:G};case"required":return{tools:J,toolChoice:"required",toolWarnings:G};case"tool":{let Z=Q.get(Y.toolName);if(Z==null)return{tools:J,toolChoice:void 0,toolWarnings:G};if(Z.type==="provider")return G.push({type:"unsupported",feature:`toolChoice for server-side tool "${Z.name}"`}),{tools:J,toolChoice:void 0,toolWarnings:G};return{tools:J,toolChoice:{type:"function",name:Z.name},toolWarnings:G}}default:throw new d5({functionality:`tool choice type: ${W}`})}}function qi8($){if(($==null?void 0:$.mode)!=null)return $.mode;if(($==null?void 0:$.videoUrl)!=null)return"edit-video";if(($==null?void 0:$.referenceImageUrls)!=null&&$.referenceImageUrls.length>0)return"reference-to-video";return}function S$4($={}){var Y;let X=EE((Y=$.baseURL)!=null?Y:"https://api.x.ai/v1"),G=()=>KV({Authorization:`Bearer ${BE({apiKey:$.apiKey,environmentVariableName:"XAI_API_KEY",description:"xAI API key"})}`,...$.headers},`ai-sdk/xai/${Ai8}`),J=(H)=>{return new jl8(H,{provider:"xai.chat",baseURL:X,headers:G,generateId:X9,fetch:$.fetch})},Q=(H)=>{return new Xi8(H,{provider:"xai.responses",baseURL:X,headers:G,generateId:X9,fetch:$.fetch})},W=(H)=>{return new vl8(H,{provider:"xai.image",baseURL:X,headers:G,fetch:$.fetch})},Z=(H)=>{return new Ii8(H,{provider:"xai.video",baseURL:X,headers:G,fetch:$.fetch})},K=(H)=>J(H);return K.specificationVersion="v3",K.languageModel=J,K.chat=J,K.responses=Q,K.embeddingModel=(H)=>{throw new NE({modelId:H,modelType:"embeddingModel"})},K.textEmbeddingModel=K.embeddingModel,K.imageModel=W,K.image=W,K.videoModel=Z,K.video=Z,K.tools=Vi8,K}function m$4($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function Wb0($){}function ni8($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=Wb0,onError:X=Wb0,onRetry:G=Wb0,onComment:J}=$,Q="",W=!0,Z,K="",H="";function z(D){let L=W?D.replace(/^\xEF\xBB\xBF/,""):D,[B,O]=ri8(`${Q}${L}`);for(let E of B)V(E);Q=O,W=!1}function V(D){if(D===""){F();return}if(D.startsWith(":")){J&&J(D.slice(D.startsWith(": ")?2:1));return}let L=D.indexOf(":");if(L!==-1){let B=D.slice(0,L),O=D[L+1]===" "?2:1,E=D.slice(L+O);A(B,E,D);return}A(D,"",D)}function A(D,L,B){switch(D){case"event":H=L;break;case"data":K=`${K}${L}
`;break;case"id":Z=L.includes("\x00")?void 0:L;break;case"retry":/^\d+$/.test(L)?G(parseInt(L,10)):X(new z$4(`Invalid \`retry\` value: "${L}"`,{type:"invalid-retry",value:L,line:B}));break;default:X(new z$4(`Unknown field "${D.length>20?`${D.slice(0,20)}\u2026`:D}"`,{type:"unknown-field",field:D,value:L,line:B}));break}}function F(){K.length>0&&Y({id:Z,event:H||void 0,data:K.endsWith(`
`)?K.slice(0,-1):K}),Z=void 0,K="",H=""}function N(D={}){Q&&D.consume&&V(Q),W=!0,Z=void 0,K="",H="",Q=""}return{feed:z,reset:N}}function ri8($){let Y=[],X="",G=0;for(;G<$.length;){let J=$.indexOf("\r",G),Q=$.indexOf(`
`,G),W=-1;if(J!==-1&&Q!==-1?W=Math.min(J,Q):J!==-1?W=J:Q!==-1&&(W=Q),W===-1){X=$.slice(G);break}else{let Z=$.slice(G,W);Y.push(Z),G=W+1,$[G-1]==="\r"&&$[G]===`
`&&G++}}return[Y,X]}function $50(...$){return $.reduce((Y,X)=>f7(f7({},Y),X!=null?X:{}),{})}function J50($){return Object.fromEntries([...$.headers])}function Lb0($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function ti8({error:$,url:Y,requestBodyValues:X}){if(Lb0($))return $;if($ instanceof TypeError&&oi8.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new eK({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}return $}function ei8($){return Object.fromEntries(Object.entries($).filter(([Y,X])=>X!=null))}function $n8({apiKey:$,environmentVariableName:Y,apiKeyParameterName:X="apiKey",description:G}){if(typeof $==="string")return $;if($!=null)throw new s90({message:`${G} API key must be a string.`});if(typeof process>"u")throw new s90({message:`${G} API key is missing. Pass it using the '${X}' parameter. Environment variables is not supported in this environment.`});if($=process.env[Y],$==null)throw new s90({message:`${G} API key is missing. Pass it using the '${X}' parameter or the ${Y} environment variable.`});if(typeof $!=="string")throw new s90({message:`${G} API key must be a string. The value of the ${Y} environment variable is not a string.`});return $}function Gn8($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(Yn8.test($)===!1&&Xn8.test($)===!1)return Y;return Jn8(Y)}function Jn8($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function Ob0($){let{stackTraceLimit:Y}=Error;Error.stackTraceLimit=0;try{return Gn8($)}finally{Error.stackTraceLimit=Y}}function Qn8($){return{[Bb0]:!0,validate:$}}function Wn8($){return typeof $==="object"&&$!==null&&Bb0 in $&&$[Bb0]===!0&&"validate"in $}function Zn8($){return Wn8($)?$:Kn8($)}function Kn8($){return Qn8(async(Y)=>{let X=await $["~standard"].validate(Y);return X.issues==null?{success:!0,value:X.value}:{success:!1,error:new Rm({value:Y,cause:X.issues})}})}async function Un8({value:$,schema:Y}){let X=await AY4({value:$,schema:Y});if(!X.success)throw Rm.wrap({value:$,cause:X.error});return X.value}async function AY4({value:$,schema:Y}){let X=Zn8(Y);try{if(X.validate==null)return{success:!0,value:$,rawValue:$};let G=await X.validate($);if(G.success)return{success:!0,value:G.value,rawValue:$};return{success:!1,error:Rm.wrap({value:$,cause:G.error}),rawValue:$}}catch(G){return{success:!1,error:Rm.wrap({value:$,cause:G}),rawValue:$}}}async function Hn8({text:$,schema:Y}){try{let X=Ob0($);if(Y==null)return X;return Un8({value:X,schema:Y})}catch(X){if(e90.isInstance(X)||Rm.isInstance(X))throw X;throw new e90({text:$,cause:X})}}async function FY4({text:$,schema:Y}){try{let X=Ob0($);if(Y==null)return{success:!0,value:X,rawValue:X};return await AY4({value:X,schema:Y})}catch(X){return{success:!1,error:e90.isInstance(X)?X:new e90({text:$,cause:X}),rawValue:void 0}}}function Zb0($){try{return Ob0($),!0}catch(Y){return!1}}function zn8({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new ai8).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await FY4({text:X,schema:Y}))}}))}function Nn8($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return Dn8(Y)}function Ln8($){return $==null?void 0:$.replace(/\/$/,"")}function Kb0($){return $!==null&&$!==void 0}function G50($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function BY4({url:$,protocols:Y}){try{let X=new URL($);return Y.has(X.protocol)}catch(X){return!1}}function V$4({part:$,defaultMediaType:Y}){var X,G;if($.data instanceof Uint8Array){let Q=Nn8($.data);return`data:${(X=$.mediaType)!=null?X:Y};base64,${Q}`}let J=$.data.toString();if(BY4({url:J,protocols:new Set(["http:","https:"])}))return J;return J.startsWith("data:")?J:`data:${(G=$.mediaType)!=null?G:Y};base64,${J}`}function A$4($,Y){var X;let G=$.match(/^data:([^;]+)/);return G?(X=G[1])!=null?X:Y:Y}function F$4($){let Y=$.match(/^data:[^;]*;base64,(.+)$/);return Y?Y[1]:$}function RD($){var Y,X,G;let J=$==null?void 0:$.anthropic,Q=$==null?void 0:$.openrouter;return(G=(X=(Y=Q==null?void 0:Q.cacheControl)!=null?Y:Q==null?void 0:Q.cache_control)!=null?X:J==null?void 0:J.cacheControl)!=null?G:J==null?void 0:J.cache_control}function qn8($){var Y,X,G,J,Q;let W=[];for(let{role:Z,content:K,providerOptions:H}of $)switch(Z){case"system":{W.push({role:"system",content:K,cache_control:RD(H)});break}case"user":{if(K.length===1&&((Y=K[0])==null?void 0:Y.type)==="text"){let A=(X=RD(H))!=null?X:RD(K[0].providerOptions),F=A?[{type:"text",text:K[0].text,cache_control:A}]:K[0].text;W.push({role:"user",content:F});break}let z=RD(H),V=K.map((A)=>{var F,N,D,L,B,O;let E=(F=RD(A.providerOptions))!=null?F:z;switch(A.type){case"text":return{type:"text",text:A.text,cache_control:E};case"file":{if((N=A.mediaType)==null?void 0:N.startsWith("image/"))return{type:"image_url",image_url:{url:V$4({part:A,defaultMediaType:"image/jpeg"})},cache_control:E};let M=String((O=(B=(L=(D=A.providerOptions)==null?void 0:D.openrouter)==null?void 0:L.filename)!=null?B:A.filename)!=null?O:""),R=V$4({part:A,defaultMediaType:"application/pdf"});if(BY4({url:R,protocols:new Set(["http:","https:"])}))return{type:"file",file:{filename:M,file_data:R}};return{type:"file",file:{filename:M,file_data:R},cache_control:E}}default:return{type:"text",text:"",cache_control:E}}});W.push({role:"user",content:V});break}case"assistant":{let z="",V="",A=[];for(let D of K)switch(D.type){case"text":{z+=D.text;break}case"tool-call":{A.push({id:D.toolCallId,type:"function",function:{name:D.toolName,arguments:JSON.stringify(D.input)}});break}case"reasoning":{V+=D.text;break}}let F=Rn8.safeParse(H),N=F.success?(J=(G=F.data)==null?void 0:G.openrouter)==null?void 0:J.reasoning_details:void 0;W.push({role:"assistant",content:z,tool_calls:A.length>0?A:void 0,reasoning:V||void 0,reasoning_details:N&&Array.isArray(N)&&N.length>0?N:void 0,cache_control:RD(H)});break}case"tool":{for(let z of K){let V=In8(z);W.push({role:"tool",tool_call_id:z.toolCallId,content:V,cache_control:(Q=RD(H))!=null?Q:RD(z.providerOptions)})}break}}return W}function In8($){return $.output.type==="text"?$.output.value:JSON.stringify($.output.value)}function Pn8($){switch($.type){case"auto":case"none":case"required":return $.type;case"tool":return{type:"function",function:{name:$.toolName}};default:throw new c$4({argument:"toolChoice",message:`Invalid tool choice type: ${JSON.stringify($)}`})}}function Sn8({prompt:$,inputFormat:Y,user:X="user",assistant:G="assistant"}){if($.length===1&&$[0]&&$[0].role==="user"&&$[0].content.length===1&&$[0].content[0]&&$[0].content[0].type==="text")return{prompt:$[0].content[0].text};let J="";if($[0]&&$[0].role==="system")J+=`${$[0].content}

`,$=$.slice(1);for(let{role:Q,content:W}of $)switch(Q){case"system":throw new gi8({message:`Unexpected system message in prompt: ${W}`,prompt:$});case"user":{let Z=W.map((K)=>{switch(K.type){case"text":return K.text;case"file":throw new qD({functionality:"file attachments"});default:return""}}).join("");J+=`${X}:
${Z}

`;break}case"assistant":{let Z=W.map((K)=>{switch(K.type){case"text":return K.text;case"tool-call":throw new qD({functionality:"tool-call messages"});case"tool-result":throw new qD({functionality:"tool-result messages"});case"reasoning":throw new qD({functionality:"reasoning messages"});case"file":throw new qD({functionality:"file attachments"});default:return""}}).join("");J+=`${G}:
${Z}

`;break}case"tool":throw new qD({functionality:"tool messages"})}return J+=`${G}:
`,{prompt:J}}function vn8($){return Object.fromEntries(Object.entries($).filter(([,Y])=>Y!==null))}function xn8($,...Y){let X=vn8($!=null?$:{}),J=[X["user-agent"]||"",...Y].filter(Boolean).join(" ");return Mm(f7({},X),{"user-agent":J})}function Im($={}){var Y,X,G;let J=(X=Ln8((Y=$.baseURL)!=null?Y:$.baseUrl))!=null?X:"https://openrouter.ai/api/v1",Q=(G=$.compatibility)!=null?G:"compatible",W=()=>xn8(f7({Authorization:`Bearer ${$n8({apiKey:$.apiKey,environmentVariableName:"OPENROUTER_API_KEY",description:"OpenRouter"})}`},$.headers),`ai-sdk/openrouter/${yn8}`),Z=(V,A={})=>new Cn8(V,A,{provider:"openrouter.chat",url:({path:F})=>`${J}${F}`,headers:W,compatibility:Q,fetch:$.fetch,extraBody:$.extraBody}),K=(V,A={})=>new kn8(V,A,{provider:"openrouter.completion",url:({path:F})=>`${J}${F}`,headers:W,compatibility:Q,fetch:$.fetch,extraBody:$.extraBody}),H=(V,A)=>{if(new.target)throw Error("The OpenRouter model function cannot be called with the new keyword.");if(V==="openai/gpt-3.5-turbo-instruct")return K(V,A);return Z(V,A)},z=(V,A)=>H(V,A);return z.languageModel=H,z.chat=Z,z.completion=K,z}function Zj($,Y){if(Y&&!$.startsWith(`${Y}/`))throw Error(`Expected ${Y}/ in model router ID ${$}`);let X=$.split("/");if(Y==="azure-openai"){if(X.length<2)throw Error(`Expected format azure-openai/deployment-name, but got ${$}`);return{providerId:"azure-openai",modelId:X.slice(1).join("/")}}if(Y&&X.length<3)throw Error(`Expected atleast 3 id parts ${Y}/provider/model, but only saw ${X.length} in ${$}`);let G=X.at(Y?1:0),J=X.slice(Y?2:1).join("/");if(!$.includes("/")||!G||!J)throw Error(`Attempted to parse provider/model from ${$} but this ID doesn't appear to contain a provider`);return{providerId:G,modelId:J}}function bn8({envVars:$,providerId:Y}){let X=`${Y.toUpperCase().replace(/-/g,"_")}_API_KEY`;if(!$?.length)return X;let G=["_API_TOKEN","_API_KEY","_TOKEN","_KEY","_PAT"];for(let J of G){let Q=$.find((W)=>W.endsWith(J));if(Q)return Q}return $[0]||X}function hn8($,Y){return $.replace(/\$\{([^}]+)\}/g,(X,G)=>{let J=G.trim(),Q=Y?.[J]??process.env[J];if(Q===void 0||Q===null)throw Error(`Missing environment variable ${G} required to build provider URL`);return Q})}var qc8="1.0.44",Ic8,Pc8,wc8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxImagesPerCall=1}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:Z}){var K,H,z,V;let A=[],F=X==null?void 0:X.split("x"),N=(z=(H=(K=this.config._internal)==null?void 0:K.currentDate)==null?void 0:H.call(K))!=null?z:new Date,{value:D,responseHeaders:L}=await G8({url:`${this.config.baseURL}/${this.modelId}`,headers:o6(this.config.headers(),W),body:{prompt:$,num_images:Y,...G&&{aspect_ratio:G},...F&&{width:F[0],height:F[1]},...J!=null&&{seed:J},...(V=Q.deepinfra)!=null?V:{}},failedResponseHandler:zJ({errorSchema:_c8,errorToMessage:(B)=>B.detail.error}),successfulResponseHandler:C5(jc8),abortSignal:Z,fetch:this.config.fetch});return{images:D.images.map((B)=>B.replace(/^data:image\/\w+;base64,/,"")),warnings:A,response:{timestamp:N,modelId:this.modelId,headers:L}}}},_c8,jc8,Tc8,Cc8="1.0.42",B$4,O$4,kc8,vc8,xc8,bc8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={},this.modelId=$,this.config=Y,this.failedResponseHandler=zJ({errorSchema:O$4,errorToMessage:(X)=>X.error.message})}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,providerOptions:Z,stopSequences:K,responseFormat:H,tools:z,toolChoice:V,seed:A}){var F,N;let D=(F=await _9({provider:this.providerOptionsName,providerOptions:Z,schema:xc8}))!=null?F:{},{messages:L,warnings:B}=Sc8({prompt:$,responseFormat:H,modelId:this.modelId});if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if(A!=null)B.push({type:"unsupported-setting",setting:"seed"});let{tools:O,toolChoice:E,toolWarnings:M}=yc8({tools:z,toolChoice:V}),R=((N=D.thinking)==null?void 0:N.type)!=null?{type:D.thinking.type}:void 0;return{args:{model:this.modelId,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(H==null?void 0:H.type)==="json"?{type:"json_object"}:void 0,stop:K,messages:L,tools:O,tool_choice:E,thinking:R,...(R==null?void 0:R.type)!=="disabled"&&D.reasoningEffort!=null&&{reasoning_effort:D.reasoningEffort}},warnings:[...B,...M]}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D,L;let{args:B,warnings:O}=await this.getArgs({...$}),{responseHeaders:E,value:M,rawValue:R}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:B,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:C5(kc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),q=M.choices[0],w=[],I=q.message.reasoning_content;if(I!=null&&I.length>0)w.push({type:"reasoning",text:I});if(q.message.tool_calls!=null)for(let _ of q.message.tool_calls)w.push({type:"tool-call",toolCallId:(Y=_.id)!=null?Y:w8(),toolName:_.function.name,input:_.function.arguments});let P=q.message.content;if(P!=null&&P.length>0)w.push({type:"text",text:P});return{content:w,finishReason:n74(q.finish_reason),usage:{inputTokens:(G=(X=M.usage)==null?void 0:X.prompt_tokens)!=null?G:void 0,outputTokens:(Q=(J=M.usage)==null?void 0:J.completion_tokens)!=null?Q:void 0,totalTokens:(Z=(W=M.usage)==null?void 0:W.total_tokens)!=null?Z:void 0,reasoningTokens:(z=(H=(K=M.usage)==null?void 0:K.completion_tokens_details)==null?void 0:H.reasoning_tokens)!=null?z:void 0,cachedInputTokens:(A=(V=M.usage)==null?void 0:V.prompt_cache_hit_tokens)!=null?A:void 0},providerMetadata:{[this.providerOptionsName]:{promptCacheHitTokens:(N=(F=M.usage)==null?void 0:F.prompt_cache_hit_tokens)!=null?N:null,promptCacheMissTokens:(L=(D=M.usage)==null?void 0:D.prompt_cache_miss_tokens)!=null?L:null}},request:{body:B},response:{...i74(M),headers:E,body:R},warnings:O}}async doStream($){let{args:Y,warnings:X}=await this.getArgs({...$}),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:_Q(vc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],Z="unknown",K=void 0,H=!0,z=this.providerOptionsName,V=!1,A=!1;return{stream:Q.pipeThrough(new TransformStream({start(F){F.enqueue({type:"stream-start",warnings:X})},transform(F,N){var D,L,B,O,E,M,R,q,w,I,P,_;if($.includeRawChunks)N.enqueue({type:"raw",rawValue:F.rawValue});if(!F.success){Z="error",N.enqueue({type:"error",error:F.error});return}let C=F.value;if("error"in C){Z="error",N.enqueue({type:"error",error:C.error.message});return}if(H)H=!1,N.enqueue({type:"response-metadata",...i74(C)});if(C.usage!=null)K=C.usage;let k=C.choices[0];if((k==null?void 0:k.finish_reason)!=null)Z=n74(k.finish_reason);if((k==null?void 0:k.delta)==null)return;let S=k.delta,T=S.reasoning_content;if(T){if(!V)N.enqueue({type:"reasoning-start",id:"reasoning-0"}),V=!0;N.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:T})}if(S.content){if(!A)N.enqueue({type:"text-start",id:"txt-0"}),A=!0;if(V)N.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;N.enqueue({type:"text-delta",id:"txt-0",delta:S.content})}if(S.tool_calls!=null){if(V)N.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;for(let v of S.tool_calls){let x=v.index;if(W[x]==null){if(v.id==null)throw new oZ({data:v,message:"Expected 'id' to be a string."});if(((D=v.function)==null?void 0:D.name)==null)throw new oZ({data:v,message:"Expected 'function.name' to be a string."});N.enqueue({type:"tool-input-start",id:v.id,toolName:v.function.name}),W[x]={id:v.id,type:"function",function:{name:v.function.name,arguments:(L=v.function.arguments)!=null?L:""},hasFinished:!1};let d=W[x];if(((B=d.function)==null?void 0:B.name)!=null&&((O=d.function)==null?void 0:O.arguments)!=null){if(d.function.arguments.length>0)N.enqueue({type:"tool-input-delta",id:d.id,delta:d.function.arguments});if(nK(d.function.arguments))N.enqueue({type:"tool-input-end",id:d.id}),N.enqueue({type:"tool-call",toolCallId:(E=d.id)!=null?E:w8(),toolName:d.function.name,input:d.function.arguments}),d.hasFinished=!0}continue}let y=W[x];if(y.hasFinished)continue;if(((M=v.function)==null?void 0:M.arguments)!=null)y.function.arguments+=(q=(R=v.function)==null?void 0:R.arguments)!=null?q:"";if(N.enqueue({type:"tool-input-delta",id:y.id,delta:(w=v.function.arguments)!=null?w:""}),((I=y.function)==null?void 0:I.name)!=null&&((P=y.function)==null?void 0:P.arguments)!=null&&nK(y.function.arguments))N.enqueue({type:"tool-input-end",id:y.id}),N.enqueue({type:"tool-call",toolCallId:(_=y.id)!=null?_:w8(),toolName:y.function.name,input:y.function.arguments}),y.hasFinished=!0}}},flush(F){var N,D,L,B,O,E,M,R,q;if(V)F.enqueue({type:"reasoning-end",id:"reasoning-0"});if(A)F.enqueue({type:"text-end",id:"txt-0"});for(let w of W.filter((I)=>!I.hasFinished))F.enqueue({type:"tool-input-end",id:w.id}),F.enqueue({type:"tool-call",toolCallId:(N=w.id)!=null?N:w8(),toolName:w.function.name,input:w.function.arguments});F.enqueue({type:"finish",finishReason:Z,usage:{inputTokens:(D=K==null?void 0:K.prompt_tokens)!=null?D:void 0,outputTokens:(L=K==null?void 0:K.completion_tokens)!=null?L:void 0,totalTokens:(B=K==null?void 0:K.total_tokens)!=null?B:void 0,reasoningTokens:(E=(O=K==null?void 0:K.completion_tokens_details)==null?void 0:O.reasoning_tokens)!=null?E:void 0,cachedInputTokens:(M=K==null?void 0:K.prompt_cache_hit_tokens)!=null?M:void 0},providerMetadata:{[z]:{promptCacheHitTokens:(R=K==null?void 0:K.prompt_cache_hit_tokens)!=null?R:null,promptCacheMissTokens:(q=K==null?void 0:K.prompt_cache_miss_tokens)!=null?q:null}}})}})),request:{body:G},response:{headers:J}}}},hc8="1.0.40",gc8,M$4,Ub0,R$4,dc8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,stream:z,tools:V,toolChoice:A,providerOptions:F}){var N,D,L;let B=[],O=await P9({provider:"groq",providerOptions:F,schema:gc8}),E=(N=O==null?void 0:O.structuredOutputs)!=null?N:!0,M=(D=O==null?void 0:O.strictJsonSchema)!=null?D:!0;if(J!=null)B.push({type:"unsupported",feature:"topK"});if((K==null?void 0:K.type)==="json"&&K.schema!=null&&!E)B.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:R,toolChoice:q,toolWarnings:w}=pc8({tools:V,toolChoice:A,modelId:this.modelId});return{args:{model:this.modelId,user:O==null?void 0:O.user,parallel_tool_calls:O==null?void 0:O.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,stop:Z,seed:H,response_format:(K==null?void 0:K.type)==="json"?E&&K.schema!=null?{type:"json_schema",json_schema:{schema:K.schema,strict:M,name:(L=K.name)!=null?L:"response",description:K.description}}:{type:"json_object"}:void 0,reasoning_format:O==null?void 0:O.reasoningFormat,reasoning_effort:O==null?void 0:O.reasoningEffort,service_tier:O==null?void 0:O.serviceTier,messages:fc8($),tools:R,tool_choice:q},warnings:[...B,...w]}}async doGenerate($){var Y,X;let{args:G,warnings:J}=await this.getArgs({...$,stream:!1}),Q=JSON.stringify(G),{responseHeaders:W,value:Z,rawValue:K}=await G9({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:G,failedResponseHandler:Ub0,successfulResponseHandler:T5(cc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),H=Z.choices[0],z=[],V=H.message.content;if(V!=null&&V.length>0)z.push({type:"text",text:V});let A=H.message.reasoning;if(A!=null&&A.length>0)z.push({type:"reasoning",text:A});if(H.message.tool_calls!=null)for(let F of H.message.tool_calls)z.push({type:"tool-call",toolCallId:(Y=F.id)!=null?Y:X9(),toolName:F.function.name,input:F.function.arguments});return{content:z,finishReason:{unified:s74(H.finish_reason),raw:(X=H.finish_reason)!=null?X:void 0},usage:r74(Z.usage),response:{...a74(Z),headers:W,body:K},warnings:J,request:{body:Q}}}async doStream($){let{args:Y,warnings:X}=await this.getArgs({...$,stream:!0}),G=JSON.stringify({...Y,stream:!0}),{responseHeaders:J,value:Q}=await G9({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:{...Y,stream:!0},failedResponseHandler:Ub0,successfulResponseHandler:oK(lc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],Z={unified:"other",raw:void 0},K=void 0,H=!0,z=!1,V=!1;return{stream:Q.pipeThrough(new TransformStream({start(A){A.enqueue({type:"stream-start",warnings:X})},transform(A,F){var N,D,L,B,O,E,M,R,q,w,I,P,_;if($.includeRawChunks)F.enqueue({type:"raw",rawValue:A.rawValue});if(!A.success){Z={unified:"error",raw:void 0},F.enqueue({type:"error",error:A.error});return}let C=A.value;if("error"in C){Z={unified:"error",raw:void 0},F.enqueue({type:"error",error:C.error});return}if(H)H=!1,F.enqueue({type:"response-metadata",...a74(C)});if(((N=C.x_groq)==null?void 0:N.usage)!=null)K=C.x_groq.usage;let k=C.choices[0];if((k==null?void 0:k.finish_reason)!=null)Z={unified:s74(k.finish_reason),raw:k.finish_reason};if((k==null?void 0:k.delta)==null)return;let S=k.delta;if(S.reasoning!=null&&S.reasoning.length>0){if(!V)F.enqueue({type:"reasoning-start",id:"reasoning-0"}),V=!0;F.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:S.reasoning})}if(S.content!=null&&S.content.length>0){if(V)F.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;if(!z)F.enqueue({type:"text-start",id:"txt-0"}),z=!0;F.enqueue({type:"text-delta",id:"txt-0",delta:S.content})}if(S.tool_calls!=null){if(V)F.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;for(let T of S.tool_calls){let v=T.index;if(W[v]==null){if(T.type!=="function")throw new DE({data:T,message:"Expected 'function' type."});if(T.id==null)throw new DE({data:T,message:"Expected 'id' to be a string."});if(((D=T.function)==null?void 0:D.name)==null)throw new DE({data:T,message:"Expected 'function.name' to be a string."});F.enqueue({type:"tool-input-start",id:T.id,toolName:T.function.name}),W[v]={id:T.id,type:"function",function:{name:T.function.name,arguments:(L=T.function.arguments)!=null?L:""},hasFinished:!1};let y=W[v];if(((B=y.function)==null?void 0:B.name)!=null&&((O=y.function)==null?void 0:O.arguments)!=null){if(y.function.arguments.length>0)F.enqueue({type:"tool-input-delta",id:y.id,delta:y.function.arguments});if(Hm(y.function.arguments))F.enqueue({type:"tool-input-end",id:y.id}),F.enqueue({type:"tool-call",toolCallId:(E=y.id)!=null?E:X9(),toolName:y.function.name,input:y.function.arguments}),y.hasFinished=!0}continue}let x=W[v];if(x.hasFinished)continue;if(((M=T.function)==null?void 0:M.arguments)!=null)x.function.arguments+=(q=(R=T.function)==null?void 0:R.arguments)!=null?q:"";if(F.enqueue({type:"tool-input-delta",id:x.id,delta:(w=T.function.arguments)!=null?w:""}),((I=x.function)==null?void 0:I.name)!=null&&((P=x.function)==null?void 0:P.arguments)!=null&&Hm(x.function.arguments))F.enqueue({type:"tool-input-end",id:x.id}),F.enqueue({type:"tool-call",toolCallId:(_=x.id)!=null?_:X9(),toolName:x.function.name,input:x.function.arguments}),x.hasFinished=!0}}},flush(A){if(V)A.enqueue({type:"reasoning-end",id:"reasoning-0"});if(z)A.enqueue({type:"text-end",id:"txt-0"});A.enqueue({type:"finish",finishReason:Z,usage:r74(K),...{}})}})),request:{body:G},response:{headers:J}}}},cc8,lc8,ic8,nc8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:$,mediaType:Y,providerOptions:X}){var G,J,Q,W,Z;let K=[],H=await P9({provider:"groq",providerOptions:X,schema:ic8}),z=new FormData,V=$ instanceof Uint8Array?new Blob([$]):new Blob([Qj($)]);z.append("model",this.modelId);let A=ry0(Y);if(z.append("file",new File([V],"audio",{type:Y}),`audio.${A}`),H){let F={language:(G=H.language)!=null?G:void 0,prompt:(J=H.prompt)!=null?J:void 0,response_format:(Q=H.responseFormat)!=null?Q:void 0,temperature:(W=H.temperature)!=null?W:void 0,timestamp_granularities:(Z=H.timestampGranularities)!=null?Z:void 0};for(let N in F){let D=F[N];if(D!==void 0)if(Array.isArray(D))for(let L of D)z.append(`${N}[]`,String(L));else z.append(N,String(D))}}return{formData:z,warnings:K}}async doGenerate($){var Y,X,G,J,Q,W,Z;let K=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{formData:H,warnings:z}=await this.getArgs($),{value:V,responseHeaders:A,rawValue:F}=await r90({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),formData:H,failedResponseHandler:Ub0,successfulResponseHandler:T5(rc8),abortSignal:$.abortSignal,fetch:this.config.fetch});return{text:V.text,segments:(Q=(J=V.segments)==null?void 0:J.map((N)=>({text:N.text,startSecond:N.start,endSecond:N.end})))!=null?Q:[],language:(W=V.language)!=null?W:void 0,durationInSeconds:(Z=V.duration)!=null?Z:void 0,warnings:z,response:{timestamp:K,modelId:this.modelId,headers:A,body:F}}}},rc8,ac8,sc8,oc8="3.0.39",ec8,$l8,Hb0,Xl8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"application/pdf":[/^https:\/\/.*$/]};var X;this.modelId=$,this.config=Y,this.generateId=(X=Y.generateId)!=null?X:X9}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,providerOptions:z,tools:V,toolChoice:A}){var F,N,D,L;let B=[],O=(F=await P9({provider:"mistral",providerOptions:z,schema:ec8}))!=null?F:{};if(J!=null)B.push({type:"unsupported",feature:"topK"});if(Q!=null)B.push({type:"unsupported",feature:"frequencyPenalty"});if(W!=null)B.push({type:"unsupported",feature:"presencePenalty"});if(Z!=null)B.push({type:"unsupported",feature:"stopSequences"});let E=(N=O.structuredOutputs)!=null?N:!0,M=(D=O.strictJsonSchema)!=null?D:!1;if((K==null?void 0:K.type)==="json"&&!(K==null?void 0:K.schema))$=Y74({messages:$,schema:K.schema});let R={model:this.modelId,safe_prompt:O.safePrompt,max_tokens:Y,temperature:X,top_p:G,random_seed:H,reasoning_effort:O.reasoningEffort,response_format:(K==null?void 0:K.type)==="json"?E&&(K==null?void 0:K.schema)!=null?{type:"json_schema",json_schema:{schema:K.schema,strict:M,name:(L=K.name)!=null?L:"response",description:K.description}}:{type:"json_object"}:void 0,document_image_limit:O.documentImageLimit,document_page_limit:O.documentPageLimit,messages:tc8($)},{tools:q,toolChoice:w,toolWarnings:I}=Yl8({tools:V,toolChoice:A});return{args:{...R,tools:q,tool_choice:w,...q!=null&&O.parallelToolCalls!==void 0?{parallel_tool_calls:O.parallelToolCalls}:{}},warnings:[...B,...I]}}async doGenerate($){var Y;let{args:X,warnings:G}=await this.getArgs($),{responseHeaders:J,value:Q,rawValue:W}=await G9({url:`${this.config.baseURL}/chat/completions`,headers:p8(this.config.headers(),$.headers),body:X,failedResponseHandler:Hb0,successfulResponseHandler:T5(Gl8),abortSignal:$.abortSignal,fetch:this.config.fetch}),Z=Q.choices[0],K=[];if(Z.message.content!=null&&Array.isArray(Z.message.content)){for(let H of Z.message.content)if(H.type==="thinking"){let z=Y$4(H.thinking);if(z.length>0)K.push({type:"reasoning",text:z})}else if(H.type==="text"){if(H.text.length>0)K.push({type:"text",text:H.text})}}else{let H=X$4(Z.message.content);if(H!=null&&H.length>0)K.push({type:"text",text:H})}if(Z.message.tool_calls!=null)for(let H of Z.message.tool_calls)K.push({type:"tool-call",toolCallId:H.id,toolName:H.function.name,input:H.function.arguments});return{content:K,finishReason:{unified:$$4(Z.finish_reason),raw:(Y=Z.finish_reason)!=null?Y:void 0},usage:o74(Q.usage),request:{body:X},response:{...e74(Q),headers:J,body:W},warnings:G}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0},{responseHeaders:J,value:Q}=await G9({url:`${this.config.baseURL}/chat/completions`,headers:p8(this.config.headers(),$.headers),body:G,failedResponseHandler:Hb0,successfulResponseHandler:oK(Jl8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W={unified:"other",raw:void 0},Z=void 0,K=!0,H=!1,z=null,V=this.generateId;return{stream:Q.pipeThrough(new TransformStream({start(A){A.enqueue({type:"stream-start",warnings:X})},transform(A,F){if($.includeRawChunks)F.enqueue({type:"raw",rawValue:A.rawValue});if(!A.success){F.enqueue({type:"error",error:A.error});return}let N=A.value;if(K)K=!1,F.enqueue({type:"response-metadata",...e74(N)});if(N.usage!=null)Z=N.usage;let D=N.choices[0],L=D.delta,B=X$4(L.content);if(L.content!=null&&Array.isArray(L.content)){for(let O of L.content)if(O.type==="thinking"){let E=Y$4(O.thinking);if(E.length>0){if(z==null){if(H)F.enqueue({type:"text-end",id:"0"}),H=!1;z=V(),F.enqueue({type:"reasoning-start",id:z})}F.enqueue({type:"reasoning-delta",id:z,delta:E})}}}if(B!=null&&B.length>0){if(!H){if(z!=null)F.enqueue({type:"reasoning-end",id:z}),z=null;F.enqueue({type:"text-start",id:"0"}),H=!0}F.enqueue({type:"text-delta",id:"0",delta:B})}if((L==null?void 0:L.tool_calls)!=null)for(let O of L.tool_calls){let E=O.id,M=O.function.name,R=O.function.arguments;F.enqueue({type:"tool-input-start",id:E,toolName:M}),F.enqueue({type:"tool-input-delta",id:E,delta:R}),F.enqueue({type:"tool-input-end",id:E}),F.enqueue({type:"tool-call",toolCallId:E,toolName:M,input:R})}if(D.finish_reason!=null)W={unified:$$4(D.finish_reason),raw:D.finish_reason}},flush(A){if(z!=null)A.enqueue({type:"reasoning-end",id:z});if(H)A.enqueue({type:"text-end",id:"0"});A.enqueue({type:"finish",finishReason:W,usage:o74(Z)})}})),request:{body:G},response:{headers:J}}}},I$4,P$4,Gl8,Jl8,Ql8=class{constructor($,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=32,this.supportsParallelCalls=!1,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,abortSignal:Y,headers:X}){if($.length>this.maxEmbeddingsPerCall)throw new c90({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let{responseHeaders:G,value:J,rawValue:Q}=await G9({url:`${this.config.baseURL}/embeddings`,headers:p8(this.config.headers(),X),body:{model:this.modelId,input:$,encoding_format:"float"},failedResponseHandler:Hb0,successfulResponseHandler:T5(Wl8),abortSignal:Y,fetch:this.config.fetch});return{warnings:[],embeddings:J.data.map((W)=>W.embedding),usage:J.usage?{tokens:J.usage.prompt_tokens}:void 0,response:{headers:G,body:Q}}}},Wl8,Zl8="3.0.36",Ul8=class{constructor($,Y){this.specificationVersion="v2",this.provider="perplexity",this.supportedUrls={},this.modelId=$,this.config=Y}getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,providerOptions:z}){var V;let A=[];if(J!=null)A.push({type:"unsupported-setting",setting:"topK"});if(Z!=null)A.push({type:"unsupported-setting",setting:"stopSequences"});if(H!=null)A.push({type:"unsupported-setting",setting:"seed"});return{args:{model:this.modelId,frequency_penalty:Q,max_tokens:Y,presence_penalty:W,temperature:X,top_k:J,top_p:G,response_format:(K==null?void 0:K.type)==="json"?{type:"json_schema",json_schema:{schema:K.schema}}:void 0,...(V=z==null?void 0:z.perplexity)!=null?V:{},messages:Kl8($)},warnings:A}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D,L,B;let{args:O,warnings:E}=this.getArgs($),{responseHeaders:M,value:R,rawValue:q}=await G8({url:`${this.config.baseURL}/chat/completions`,headers:o6(this.config.headers(),$.headers),body:O,failedResponseHandler:zJ({errorSchema:Q$4,errorToMessage:W$4}),successfulResponseHandler:C5(zl8),abortSignal:$.abortSignal,fetch:this.config.fetch}),w=R.choices[0],I=[],P=w.message.content;if(P.length>0)I.push({type:"text",text:P});if(R.citations!=null)for(let _ of R.citations)I.push({type:"source",sourceType:"url",id:this.config.generateId(),url:_});return{content:I,finishReason:G$4(w.finish_reason),usage:{inputTokens:(Y=R.usage)==null?void 0:Y.prompt_tokens,outputTokens:(X=R.usage)==null?void 0:X.completion_tokens,totalTokens:(J=(G=R.usage)==null?void 0:G.total_tokens)!=null?J:void 0,reasoningTokens:(W=(Q=R.usage)==null?void 0:Q.reasoning_tokens)!=null?W:void 0},request:{body:O},response:{...J$4(R),headers:M,body:q},warnings:E,providerMetadata:{perplexity:{images:(K=(Z=R.images)==null?void 0:Z.map((_)=>({imageUrl:_.image_url,originUrl:_.origin_url,height:_.height,width:_.width})))!=null?K:null,usage:{citationTokens:(z=(H=R.usage)==null?void 0:H.citation_tokens)!=null?z:null,numSearchQueries:(A=(V=R.usage)==null?void 0:V.num_search_queries)!=null?A:null},cost:((F=R.usage)==null?void 0:F.cost)?{inputTokensCost:(N=R.usage.cost.input_tokens_cost)!=null?N:null,outputTokensCost:(D=R.usage.cost.output_tokens_cost)!=null?D:null,requestCost:(L=R.usage.cost.request_cost)!=null?L:null,totalCost:(B=R.usage.cost.total_cost)!=null?B:null}:null}}}}async doStream($){let{args:Y,warnings:X}=this.getArgs($),G={...Y,stream:!0},{responseHeaders:J,value:Q}=await G8({url:`${this.config.baseURL}/chat/completions`,headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:zJ({errorSchema:Q$4,errorToMessage:W$4}),successfulResponseHandler:_Q(Vl8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W="unknown",Z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0},K={perplexity:{usage:{citationTokens:null,numSearchQueries:null},cost:null,images:null}},H=!0,z=!1,V=this;return{stream:Q.pipeThrough(new TransformStream({start(A){A.enqueue({type:"stream-start",warnings:X})},transform(A,F){var N,D,L,B,O,E,M,R;if($.includeRawChunks)F.enqueue({type:"raw",rawValue:A.rawValue});if(!A.success){F.enqueue({type:"error",error:A.error});return}let q=A.value;if(H)F.enqueue({type:"response-metadata",...J$4(q)}),(N=q.citations)==null||N.forEach((_)=>{F.enqueue({type:"source",sourceType:"url",id:V.config.generateId(),url:_})}),H=!1;if(q.usage!=null)Z.inputTokens=q.usage.prompt_tokens,Z.outputTokens=q.usage.completion_tokens,Z.reasoningTokens=(D=q.usage.reasoning_tokens)!=null?D:void 0,K.perplexity.usage={citationTokens:(L=q.usage.citation_tokens)!=null?L:null,numSearchQueries:(B=q.usage.num_search_queries)!=null?B:null},K.perplexity.cost=q.usage.cost?{inputTokensCost:(O=q.usage.cost.input_tokens_cost)!=null?O:null,outputTokensCost:(E=q.usage.cost.output_tokens_cost)!=null?E:null,requestCost:(M=q.usage.cost.request_cost)!=null?M:null,totalCost:(R=q.usage.cost.total_cost)!=null?R:null}:null;if(q.images!=null)K.perplexity.images=q.images.map((_)=>({imageUrl:_.image_url,originUrl:_.origin_url,height:_.height,width:_.width}));let w=q.choices[0];if((w==null?void 0:w.finish_reason)!=null)W=G$4(w.finish_reason);if((w==null?void 0:w.delta)==null)return;let P=w.delta.content;if(P!=null){if(!z)F.enqueue({type:"text-start",id:"0"}),z=!0;F.enqueue({type:"text-delta",id:"0",delta:P})}},flush(A){if(z)A.enqueue({type:"text-end",id:"0"});A.enqueue({type:"finish",finishReason:W,usage:Z,providerMetadata:K})}})),request:{body:G},response:{headers:J}}}},Hl8,w$4,_$4,zl8,Vl8,Q$4,W$4=($)=>{var Y,X;return(X=(Y=$.error.message)!=null?Y:$.error.type)!=null?X:"unknown error"},Al8="2.0.30",Fl8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxImagesPerCall=1}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,seed:G,providerOptions:J,headers:Q,abortSignal:W}){var Z,K,H,z;let V=[];if(X!=null)V.push({type:"unsupported-setting",setting:"aspectRatio",details:"This model does not support the `aspectRatio` option. Use `size` instead."});let A=(H=(K=(Z=this.config._internal)==null?void 0:Z.currentDate)==null?void 0:K.call(Z))!=null?H:new Date,F=X==null?void 0:X.split("x"),{value:N,responseHeaders:D}=await G8({url:`${this.config.baseURL}/images/generations`,headers:o6(this.config.headers(),Q),body:{model:this.modelId,prompt:$,seed:G,...Y>1?{n:Y}:{},...F&&{width:parseInt(F[0]),height:parseInt(F[1])},response_format:"base64",...(z=J.togetherai)!=null?z:{}},failedResponseHandler:zJ({errorSchema:Nl8,errorToMessage:(L)=>L.error.message}),successfulResponseHandler:C5(Dl8),abortSignal:W,fetch:this.config.fetch});return{images:N.data.map((L)=>L.b64_json),warnings:V,response:{timestamp:A,modelId:this.modelId,headers:D}}}},Dl8,Nl8,Ll8="1.0.42",El8,Ml8,Rl8,ql8,Il8,Pl8,wl8,RE,jl8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,seed:K,responseFormat:H,providerOptions:z,tools:V,toolChoice:A}){var F,N,D;let L=[],B=(F=await P9({provider:"xai",providerOptions:z,schema:Pl8}))!=null?F:{};if(J!=null)L.push({type:"unsupported",feature:"topK"});if(Q!=null)L.push({type:"unsupported",feature:"frequencyPenalty"});if(W!=null)L.push({type:"unsupported",feature:"presencePenalty"});if(Z!=null)L.push({type:"unsupported",feature:"stopSequences"});let{messages:O,warnings:E}=Ol8($);L.push(...E);let{tools:M,toolChoice:R,toolWarnings:q}=_l8({tools:V,toolChoice:A});return L.push(...q),{args:{model:this.modelId,logprobs:B.logprobs===!0||B.topLogprobs!=null?!0:void 0,top_logprobs:B.topLogprobs,max_completion_tokens:Y,temperature:X,top_p:G,seed:K,reasoning_effort:B.reasoningEffort,parallel_function_calling:B.parallel_function_calling,response_format:(H==null?void 0:H.type)==="json"?H.schema!=null?{type:"json_schema",json_schema:{name:(N=H.name)!=null?N:"response",schema:H.schema,strict:!0}}:{type:"json_object"}:void 0,search_parameters:B.searchParameters?{mode:B.searchParameters.mode,return_citations:B.searchParameters.returnCitations,from_date:B.searchParameters.fromDate,to_date:B.searchParameters.toDate,max_search_results:B.searchParameters.maxSearchResults,sources:(D=B.searchParameters.sources)==null?void 0:D.map((I)=>{var P;return{type:I.type,...I.type==="web"&&{country:I.country,excluded_websites:I.excludedWebsites,allowed_websites:I.allowedWebsites,safe_search:I.safeSearch},...I.type==="x"&&{excluded_x_handles:I.excludedXHandles,included_x_handles:(P=I.includedXHandles)!=null?P:I.xHandles,post_favorite_count:I.postFavoriteCount,post_view_count:I.postViewCount},...I.type==="news"&&{country:I.country,excluded_websites:I.excludedWebsites,safe_search:I.safeSearch},...I.type==="rss"&&{links:I.links}}})}:void 0,messages:O,tools:M,tool_choice:R},warnings:L}}async doGenerate($){var Y,X;let{args:G,warnings:J}=await this.getArgs($),Q=`${(Y=this.config.baseURL)!=null?Y:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:W,value:Z,rawValue:K}=await G9({url:Q,headers:p8(this.config.headers(),$.headers),body:G,failedResponseHandler:RE,successfulResponseHandler:T5(Tl8),abortSignal:$.abortSignal,fetch:this.config.fetch});if(Z.error!=null)throw new h7({message:Z.error,url:Q,requestBodyValues:G,statusCode:200,responseHeaders:W,responseBody:JSON.stringify(K),isRetryable:Z.code==="The service is currently unavailable"});let H=Z.choices[0],z=[];if(H.message.content!=null&&H.message.content.length>0){let V=H.message.content,A=G.messages[G.messages.length-1];if((A==null?void 0:A.role)==="assistant"&&V===A.content)V="";if(V.length>0)z.push({type:"text",text:V})}if(H.message.reasoning_content!=null&&H.message.reasoning_content.length>0)z.push({type:"reasoning",text:H.message.reasoning_content});if(H.message.tool_calls!=null)for(let V of H.message.tool_calls)z.push({type:"tool-call",toolCallId:V.id,toolName:V.function.name,input:V.function.arguments});if(Z.citations!=null)for(let V of Z.citations)z.push({type:"source",sourceType:"url",id:this.config.generateId(),url:V});return{content:z,finishReason:{unified:K$4(H.finish_reason),raw:(X=H.finish_reason)!=null?X:void 0},usage:Z.usage?Z$4(Z.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:G},response:{...t90(Z),headers:W,body:K},warnings:J}}async doStream($){var Y;let{args:X,warnings:G}=await this.getArgs($),J={...X,stream:!0,stream_options:{include_usage:!0}},Q=`${(Y=this.config.baseURL)!=null?Y:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:W,value:Z}=await G9({url:Q,headers:p8(this.config.headers(),$.headers),body:J,failedResponseHandler:RE,successfulResponseHandler:async({response:D})=>{let L=ZV(D),B=D.headers.get("content-type");if(B==null?void 0:B.includes("application/json")){let O=await D.text(),E=await n90({text:O,schema:Sl8});if(E.success)throw new h7({message:E.value.error,url:Q,requestBodyValues:J,statusCode:200,responseHeaders:L,responseBody:O,isRetryable:E.value.code==="The service is currently unavailable"});throw new h7({message:"Invalid JSON response",url:Q,requestBodyValues:J,statusCode:200,responseHeaders:L,responseBody:O})}return oK(Cl8)({response:D,url:Q,requestBodyValues:J})},abortSignal:$.abortSignal,fetch:this.config.fetch}),K={unified:"other",raw:void 0},H=void 0,z=!0,V={},A={},F=void 0,N=this;return{stream:Z.pipeThrough(new TransformStream({start(D){D.enqueue({type:"stream-start",warnings:G})},transform(D,L){if($.includeRawChunks)L.enqueue({type:"raw",rawValue:D.rawValue});if(!D.success){L.enqueue({type:"error",error:D.error});return}let B=D.value;if(z)L.enqueue({type:"response-metadata",...t90(B)}),z=!1;if(B.citations!=null)for(let R of B.citations)L.enqueue({type:"source",sourceType:"url",id:N.config.generateId(),url:R});if(B.usage!=null)H=Z$4(B.usage);let O=B.choices[0];if((O==null?void 0:O.finish_reason)!=null)K={unified:K$4(O.finish_reason),raw:O.finish_reason};if((O==null?void 0:O.delta)==null)return;let{delta:E,index:M}=O;if(E.content!=null&&E.content.length>0){let R=E.content;if(F!=null&&!V[F].ended)L.enqueue({type:"reasoning-end",id:F}),V[F].ended=!0,F=void 0;let q=J.messages[J.messages.length-1];if((q==null?void 0:q.role)==="assistant"&&R===q.content)return;let w=`text-${B.id||M}`;if(V[w]==null)V[w]={type:"text",ended:!1},L.enqueue({type:"text-start",id:w});L.enqueue({type:"text-delta",id:w,delta:R})}if(E.reasoning_content!=null&&E.reasoning_content.length>0){let R=`reasoning-${B.id||M}`;if(A[R]===E.reasoning_content)return;if(A[R]=E.reasoning_content,V[R]==null)V[R]={type:"reasoning",ended:!1},F=R,L.enqueue({type:"reasoning-start",id:R});L.enqueue({type:"reasoning-delta",id:R,delta:E.reasoning_content})}if(E.tool_calls!=null){if(F!=null&&!V[F].ended)L.enqueue({type:"reasoning-end",id:F}),V[F].ended=!0,F=void 0;for(let R of E.tool_calls){let q=R.id;L.enqueue({type:"tool-input-start",id:q,toolName:R.function.name}),L.enqueue({type:"tool-input-delta",id:q,delta:R.function.arguments}),L.enqueue({type:"tool-input-end",id:q}),L.enqueue({type:"tool-call",toolCallId:q,toolName:R.function.name,input:R.function.arguments})}}},flush(D){for(let[L,B]of Object.entries(V))if(!B.ended)D.enqueue({type:B.type==="text"?"text-end":"reasoning-end",id:L});D.enqueue({type:"finish",finishReason:K,usage:H!=null?H:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:J},response:{headers:W}}}},C$4,Tl8,Cl8,Sl8,kl8,vl8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=3}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:Z,files:K,mask:H}){var z,V,A,F,N;let D=[];if(X!=null)D.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});if(J!=null)D.push({type:"unsupported",feature:"seed"});if(H!=null)D.push({type:"unsupported",feature:"mask"});let L=await P9({provider:"xai",providerOptions:Q,schema:kl8}),B=K!=null&&K.length>0,O=B?K.map((C)=>i54(C)):[],E=B?"/images/edits":"/images/generations",M={model:this.modelId,prompt:$,n:Y,response_format:"b64_json"};if(G!=null)M.aspect_ratio=G;if((L==null?void 0:L.output_format)!=null)M.output_format=L.output_format;if((L==null?void 0:L.sync_mode)!=null)M.sync_mode=L.sync_mode;if((L==null?void 0:L.aspect_ratio)!=null&&G==null)M.aspect_ratio=L.aspect_ratio;if((L==null?void 0:L.resolution)!=null)M.resolution=L.resolution;if((L==null?void 0:L.quality)!=null)M.quality=L.quality;if((L==null?void 0:L.user)!=null)M.user=L.user;if(O.length===1)M.image={url:O[0],type:"image_url"};else if(O.length>1)M.images=O.map((C)=>({url:C,type:"image_url"}));let R=(z=this.config.baseURL)!=null?z:"https://api.x.ai/v1",q=(F=(A=(V=this.config._internal)==null?void 0:V.currentDate)==null?void 0:A.call(V))!=null?F:new Date,{value:w,responseHeaders:I}=await G9({url:`${R}${E}`,headers:p8(this.config.headers(),W),body:M,failedResponseHandler:RE,successfulResponseHandler:T5(xl8),abortSignal:Z,fetch:this.config.fetch});return{images:w.data.every((C)=>C.b64_json!=null)?w.data.map((C)=>C.b64_json):await Promise.all(w.data.map((C)=>this.downloadImage(C.url,Z))),warnings:D,response:{timestamp:q,modelId:this.modelId,headers:I},providerMetadata:{xai:{images:w.data.map((C)=>({...C.revised_prompt?{revisedPrompt:C.revised_prompt}:{}})),...((N=w.usage)==null?void 0:N.cost_in_usd_ticks)!=null?{costInUsdTicks:w.usage.cost_in_usd_ticks}:{}}}}}async downloadImage($,Y){let{value:X}=await Nm({url:$,abortSignal:Y,failedResponseHandler:H74(),successfulResponseHandler:ty0(),fetch:this.config.fetch});return X}},xl8,Vb0,Ab0,Fb0,ME,bl8,Db0,Nb0,Em,hl8,fl8,gl8,ml8,ul8,pl8=($)=>ul8($),dl8,cl8,ll8,il8=($)=>ll8($),nl8,rl8,al8,sl8=($={})=>al8($),ol8,tl8,el8,$i8=($={})=>el8($),Xi8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/],"text/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,stopSequences:J,seed:Q,responseFormat:W,providerOptions:Z,tools:K,toolChoice:H}){var z,V,A,F,N,D,L;let B=[],O=(z=await P9({provider:"xai",providerOptions:Z,schema:fl8}))!=null?z:{};if(J!=null)B.push({type:"unsupported",feature:"stopSequences"});let E=(V=K==null?void 0:K.find((v)=>v.type==="provider"&&v.id==="xai.web_search"))==null?void 0:V.name,M=(A=K==null?void 0:K.find((v)=>v.type==="provider"&&v.id==="xai.x_search"))==null?void 0:A.name,R=(F=K==null?void 0:K.find((v)=>v.type==="provider"&&v.id==="xai.code_execution"))==null?void 0:F.name,q=(N=K==null?void 0:K.find((v)=>v.type==="provider"&&v.id==="xai.mcp"))==null?void 0:N.name,w=(D=K==null?void 0:K.find((v)=>v.type==="provider"&&v.id==="xai.file_search"))==null?void 0:D.name,{input:I,inputWarnings:P}=await yl8({prompt:$});B.push(...P);let{tools:_,toolChoice:C,toolWarnings:k}=await Yi8({tools:K,toolChoice:H});B.push(...k);let S=O.include?[...O.include]:void 0;if(O.store===!1)if(S==null)S=["reasoning.encrypted_content"];else S=[...S,"reasoning.encrypted_content"];let T={model:this.modelId,input:I,logprobs:O.logprobs===!0||O.topLogprobs!=null?!0:void 0,top_logprobs:O.topLogprobs,max_output_tokens:Y,temperature:X,top_p:G,seed:Q,...(W==null?void 0:W.type)==="json"&&{text:{format:W.schema!=null?{type:"json_schema",strict:!0,name:(L=W.name)!=null?L:"response",description:W.description,schema:W.schema}:{type:"json_object"}}},...O.reasoningEffort!=null&&{reasoning:{effort:O.reasoningEffort}},...O.store===!1&&{store:O.store},...S!=null&&{include:S},...O.previousResponseId!=null&&{previous_response_id:O.previousResponseId}};if(_&&_.length>0)T.tools=_;if(C!=null)T.tool_choice=C;return{args:T,warnings:B,webSearchToolName:E,xSearchToolName:M,codeExecutionToolName:R,mcpToolName:q,fileSearchToolName:w}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F;let{args:N,warnings:D,webSearchToolName:L,xSearchToolName:B,codeExecutionToolName:O,mcpToolName:E,fileSearchToolName:M}=await this.getArgs($),{responseHeaders:R,value:q,rawValue:w}=await G9({url:`${(Y=this.config.baseURL)!=null?Y:"https://api.x.ai/v1"}/responses`,headers:p8(this.config.headers(),$.headers),body:N,failedResponseHandler:RE,successfulResponseHandler:T5(Em),abortSignal:$.abortSignal,fetch:this.config.fetch}),I=[],P=!1,_=["web_search","web_search_with_snippets","browse_page"],C=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"];for(let k of q.output){if(k.type==="file_search_call"){let S=M!=null?M:"file_search";I.push({type:"tool-call",toolCallId:k.id,toolName:S,input:"",providerExecuted:!0}),I.push({type:"tool-result",toolCallId:k.id,toolName:S,result:{queries:(X=k.queries)!=null?X:[],results:(J=(G=k.results)==null?void 0:G.map((T)=>({fileId:T.file_id,filename:T.filename,score:T.score,text:T.text})))!=null?J:null}});continue}if(k.type==="web_search_call"||k.type==="x_search_call"||k.type==="code_interpreter_call"||k.type==="code_execution_call"||k.type==="view_image_call"||k.type==="view_x_video_call"||k.type==="custom_tool_call"||k.type==="mcp_call"){let S=(Q=k.name)!=null?Q:"";if(_.includes((W=k.name)!=null?W:"")||k.type==="web_search_call")S=L!=null?L:"web_search";else if(C.includes((Z=k.name)!=null?Z:"")||k.type==="x_search_call")S=B!=null?B:"x_search";else if(k.name==="code_execution"||k.type==="code_interpreter_call"||k.type==="code_execution_call")S=O!=null?O:"code_execution";else if(k.type==="mcp_call")S=(K=E!=null?E:k.name)!=null?K:"mcp";let T=k.type==="custom_tool_call"?(H=k.input)!=null?H:"":k.type==="mcp_call"?(z=k.arguments)!=null?z:"":(V=k.arguments)!=null?V:"";I.push({type:"tool-call",toolCallId:k.id,toolName:S,input:T,providerExecuted:!0});continue}switch(k.type){case"message":{for(let S of k.content){if(S.text)I.push({type:"text",text:S.text});if(S.annotations){for(let T of S.annotations)if(T.type==="url_citation"&&"url"in T)I.push({type:"source",sourceType:"url",id:this.config.generateId(),url:T.url,title:(A=T.title)!=null?A:T.url})}}break}case"function_call":{P=!0,I.push({type:"tool-call",toolCallId:k.call_id,toolName:k.name,input:k.arguments});break}case"reasoning":{let T=k.summary.map((v)=>v.text).filter((v)=>v&&v.length>0).join("");if(T||k.encrypted_content){let v=k.encrypted_content||k.id;I.push({type:"reasoning",text:T,...v&&{providerMetadata:{xai:{...k.encrypted_content&&{reasoningEncryptedContent:k.encrypted_content},...k.id&&{itemId:k.id}}}}})}break}}}return{content:I,finishReason:{unified:P?"tool-calls":a90(q.status),raw:(F=q.status)!=null?F:void 0},usage:q.usage?Qb0(q.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:N},response:{...t90(q),headers:R,body:w},warnings:D}}async doStream($){var Y;let{args:X,warnings:G,webSearchToolName:J,xSearchToolName:Q,codeExecutionToolName:W,mcpToolName:Z,fileSearchToolName:K}=await this.getArgs($),H={...X,stream:!0},{responseHeaders:z,value:V}=await G9({url:`${(Y=this.config.baseURL)!=null?Y:"https://api.x.ai/v1"}/responses`,headers:p8(this.config.headers(),$.headers),body:H,failedResponseHandler:RE,successfulResponseHandler:oK(hl8),abortSignal:$.abortSignal,fetch:this.config.fetch}),A={unified:"other",raw:void 0},F=!1,N=void 0,D=!0,L={},B=new Set,O={},E={},M=this;return{stream:V.pipeThrough(new TransformStream({start(R){R.enqueue({type:"stream-start",warnings:G})},transform(R,q){var w,I,P,_,C,k,S,T,v,x,y,d,u,b,g;if($.includeRawChunks)q.enqueue({type:"raw",rawValue:R.rawValue});if(!R.success){q.enqueue({type:"error",error:R.error});return}let p=R.value;if(p.type==="response.created"||p.type==="response.in_progress"){if(D)q.enqueue({type:"response-metadata",...t90(p.response)}),D=!1;return}if(p.type==="response.reasoning_summary_part.added"){let h=`reasoning-${p.item_id}`;E[p.item_id]={},q.enqueue({type:"reasoning-start",id:h,providerMetadata:{xai:{itemId:p.item_id}}})}if(p.type==="response.reasoning_summary_text.delta"){let h=`reasoning-${p.item_id}`;q.enqueue({type:"reasoning-delta",id:h,delta:p.delta,providerMetadata:{xai:{itemId:p.item_id}}});return}if(p.type==="response.reasoning_summary_text.done")return;if(p.type==="response.reasoning_text.delta"){let h=`reasoning-${p.item_id}`;if(E[p.item_id]==null)E[p.item_id]={},q.enqueue({type:"reasoning-start",id:h,providerMetadata:{xai:{itemId:p.item_id}}});q.enqueue({type:"reasoning-delta",id:h,delta:p.delta,providerMetadata:{xai:{itemId:p.item_id}}});return}if(p.type==="response.reasoning_text.done")return;if(p.type==="response.output_text.delta"){let h=`text-${p.item_id}`;if(L[h]==null)L[h]={type:"text"},q.enqueue({type:"text-start",id:h});q.enqueue({type:"text-delta",id:h,delta:p.delta});return}if(p.type==="response.output_text.done"){if(p.annotations){for(let h of p.annotations)if(h.type==="url_citation"&&"url"in h)q.enqueue({type:"source",sourceType:"url",id:M.config.generateId(),url:h.url,title:(w=h.title)!=null?w:h.url})}return}if(p.type==="response.output_text.annotation.added"){let h=p.annotation;if(h.type==="url_citation"&&"url"in h)q.enqueue({type:"source",sourceType:"url",id:M.config.generateId(),url:h.url,title:(I=h.title)!=null?I:h.url});return}if(p.type==="response.done"||p.type==="response.completed"||p.type==="response.incomplete"){let h=p.response;if(h.usage)N=Qb0(h.usage);if(p.type==="response.incomplete"){let n="incomplete_details"in h?(P=h.incomplete_details)==null?void 0:P.reason:void 0;A={unified:n?a90(n):"other",raw:n!=null?n:"incomplete"}}else if("status"in h&&h.status)A={unified:F?"tool-calls":a90(h.status),raw:h.status};return}if(p.type==="response.failed"){let h=(_=p.response.incomplete_details)==null?void 0:_.reason;if(A={unified:h?a90(h):"error",raw:h!=null?h:"error"},p.response.usage)N=Qb0(p.response.usage);return}if(p.type==="error"){q.enqueue({type:"error",error:p});return}if(p.type==="response.custom_tool_call_input.delta"||p.type==="response.custom_tool_call_input.done")return;if(p.type==="response.function_call_arguments.delta"){let h=O[p.output_index];if(h!=null)q.enqueue({type:"tool-input-delta",id:h.toolCallId,delta:p.delta});return}if(p.type==="response.function_call_arguments.done")return;if(p.type==="response.output_item.added"||p.type==="response.output_item.done"){let h=p.item;if(h.type==="reasoning"){if(p.type==="response.output_item.done"){let n=`reasoning-${h.id}`;if(!(h.id in E))E[h.id]={},q.enqueue({type:"reasoning-start",id:n,providerMetadata:{xai:{...h.id&&{itemId:h.id}}}});q.enqueue({type:"reasoning-end",id:n,providerMetadata:{xai:{...h.encrypted_content&&{reasoningEncryptedContent:h.encrypted_content},...h.id&&{itemId:h.id}}}}),delete E[h.id]}return}if(h.type==="file_search_call"){let n=K!=null?K:"file_search";if(!B.has(h.id))B.add(h.id),q.enqueue({type:"tool-input-start",id:h.id,toolName:n}),q.enqueue({type:"tool-input-delta",id:h.id,delta:""}),q.enqueue({type:"tool-input-end",id:h.id}),q.enqueue({type:"tool-call",toolCallId:h.id,toolName:n,input:"",providerExecuted:!0});if(p.type==="response.output_item.done")q.enqueue({type:"tool-result",toolCallId:h.id,toolName:n,result:{queries:(C=h.queries)!=null?C:[],results:(S=(k=h.results)==null?void 0:k.map((t)=>({fileId:t.file_id,filename:t.filename,score:t.score,text:t.text})))!=null?S:null}});return}if(h.type==="web_search_call"||h.type==="x_search_call"||h.type==="code_interpreter_call"||h.type==="code_execution_call"||h.type==="view_image_call"||h.type==="view_x_video_call"||h.type==="custom_tool_call"||h.type==="mcp_call"){let n=["web_search","web_search_with_snippets","browse_page"],t=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"],s=(T=h.name)!=null?T:"";if(n.includes((v=h.name)!=null?v:"")||h.type==="web_search_call")s=J!=null?J:"web_search";else if(t.includes((x=h.name)!=null?x:"")||h.type==="x_search_call")s=Q!=null?Q:"x_search";else if(h.name==="code_execution"||h.type==="code_interpreter_call"||h.type==="code_execution_call")s=W!=null?W:"code_execution";else if(h.type==="mcp_call")s=(y=Z!=null?Z:h.name)!=null?y:"mcp";let Z0=h.type==="custom_tool_call"?(d=h.input)!=null?d:"":h.type==="mcp_call"?(u=h.arguments)!=null?u:"":(b=h.arguments)!=null?b:"";if((h.type==="custom_tool_call"?p.type==="response.output_item.done":!B.has(h.id))&&!B.has(h.id))B.add(h.id),q.enqueue({type:"tool-input-start",id:h.id,toolName:s}),q.enqueue({type:"tool-input-delta",id:h.id,delta:Z0}),q.enqueue({type:"tool-input-end",id:h.id}),q.enqueue({type:"tool-call",toolCallId:h.id,toolName:s,input:Z0,providerExecuted:!0});return}if(h.type==="message")for(let n of h.content){if(n.text&&n.text.length>0){let t=`text-${h.id}`;if(L[t]==null)L[t]={type:"text"},q.enqueue({type:"text-start",id:t}),q.enqueue({type:"text-delta",id:t,delta:n.text})}if(n.annotations){for(let t of n.annotations)if(t.type==="url_citation"&&"url"in t)q.enqueue({type:"source",sourceType:"url",id:M.config.generateId(),url:t.url,title:(g=t.title)!=null?g:t.url})}}else if(h.type==="function_call"){if(p.type==="response.output_item.added")O[p.output_index]={toolName:h.name,toolCallId:h.call_id},q.enqueue({type:"tool-input-start",id:h.call_id,toolName:h.name});else if(p.type==="response.output_item.done")F=!0,O[p.output_index]=void 0,q.enqueue({type:"tool-input-end",id:h.call_id}),q.enqueue({type:"tool-call",toolCallId:h.call_id,toolName:h.name,input:h.arguments})}}},flush(R){for(let[q,w]of Object.entries(L))if(w.type==="text")R.enqueue({type:"text-end",id:q});R.enqueue({type:"finish",finishReason:A,usage:N!=null?N:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:H},response:{headers:z}}}},Gi8,Ji8,Qi8=($={})=>Ji8($),Wi8,Zi8,Ki8=($={})=>Zi8($),Ui8,Hi8,zi8=($={})=>Hi8($),Vi8,Ai8="3.0.89",qE,Fi8,Di8,qm,Ni8,Li8,Bi8,Oi8,Ei8,Mi8,Ri8,Ii8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxVideosPerCall=1}get provider(){return this.config.provider}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z;let V=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,A=[],F=await P9({provider:"xai",providerOptions:$.providerOptions,schema:Mi8}),N=qi8(F),D=N==="edit-video",L=N==="extend-video",B=N==="reference-to-video";if($.fps!=null)A.push({type:"unsupported",feature:"fps",details:"xAI video models do not support custom FPS."});if($.seed!=null)A.push({type:"unsupported",feature:"seed",details:"xAI video models do not support seed."});if($.n!=null&&$.n>1)A.push({type:"unsupported",feature:"n",details:"xAI video models do not support generating multiple videos per call. Only 1 video will be generated."});if(D&&$.duration!=null)A.push({type:"unsupported",feature:"duration",details:"xAI video editing does not support custom duration."});if(D&&$.aspectRatio!=null)A.push({type:"unsupported",feature:"aspectRatio",details:"xAI video editing does not support custom aspect ratio."});if(D&&((F==null?void 0:F.resolution)!=null||$.resolution!=null))A.push({type:"unsupported",feature:"resolution",details:"xAI video editing does not support custom resolution."});if(L&&$.aspectRatio!=null)A.push({type:"unsupported",feature:"aspectRatio",details:"xAI video extension does not support custom aspect ratio."});if(L&&((F==null?void 0:F.resolution)!=null||$.resolution!=null))A.push({type:"unsupported",feature:"resolution",details:"xAI video extension does not support custom resolution."});let O={model:this.modelId,prompt:$.prompt},E=!D,M=!D&&!L,R=!D&&!L;if(E&&$.duration!=null)O.duration=$.duration;if(M&&$.aspectRatio!=null)O.aspect_ratio=$.aspectRatio;if(R&&(F==null?void 0:F.resolution)!=null)O.resolution=F.resolution;else if(R&&$.resolution!=null){let T=Ri8[$.resolution];if(T!=null)O.resolution=T;else A.push({type:"unsupported",feature:"resolution",details:`Unrecognized resolution "${$.resolution}". Use providerOptions.xai.resolution with "480p" or "720p" instead.`})}if(D)O.video={url:F.videoUrl};if(L)O.video={url:F.videoUrl};if($.image!=null)if($.image.type==="url")O.image={url:$.image.url};else{let T=typeof $.image.data==="string"?$.image.data:Dm($.image.data);O.image={url:`data:${$.image.mediaType};base64,${T}`}}if(B)O.reference_images=F.referenceImageUrls.map((T)=>({url:T}));if(F!=null){for(let[T,v]of Object.entries(F))if(!["mode","pollIntervalMs","pollTimeoutMs","resolution","videoUrl","referenceImageUrls"].includes(T))O[T]=v}let q=(J=this.config.baseURL)!=null?J:"https://api.x.ai/v1",w;if(D)w=`${q}/videos/edits`;else if(L)w=`${q}/videos/extensions`;else w=`${q}/videos/generations`;let{value:I}=await G9({url:w,headers:p8(this.config.headers(),$.headers),body:O,failedResponseHandler:RE,successfulResponseHandler:T5(Pi8),abortSignal:$.abortSignal,fetch:this.config.fetch}),P=I.request_id;if(!P)throw new L8({name:"XAI_VIDEO_GENERATION_ERROR",message:`No request_id returned from xAI API. Response: ${JSON.stringify(I)}`});let _=(Q=F==null?void 0:F.pollIntervalMs)!=null?Q:5000,C=(W=F==null?void 0:F.pollTimeoutMs)!=null?W:600000,k=Date.now(),S;while(!0){if(await l90(_,{abortSignal:$.abortSignal}),Date.now()-k>C)throw new L8({name:"XAI_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${C}ms`});let{value:T,responseHeaders:v}=await Nm({url:`${q}/videos/${P}`,headers:p8(this.config.headers(),$.headers),successfulResponseHandler:T5(wi8),failedResponseHandler:RE,abortSignal:$.abortSignal,fetch:this.config.fetch});if(S=v,T.status==="done"||T.status==null&&((Z=T.video)==null?void 0:Z.url)){if(((K=T.video)==null?void 0:K.respect_moderation)===!1)throw new L8({name:"XAI_VIDEO_MODERATION_ERROR",message:"Video generation was blocked due to a content policy violation."});if(!((H=T.video)==null?void 0:H.url))throw new L8({name:"XAI_VIDEO_GENERATION_ERROR",message:"Video generation completed but no video URL was returned."});return{videos:[{type:"url",url:T.video.url,mediaType:"video/mp4"}],warnings:A,response:{timestamp:V,modelId:this.modelId,headers:S},providerMetadata:{xai:{requestId:P,videoUrl:T.video.url,...T.video.duration!=null?{duration:T.video.duration}:{},...((z=T.usage)==null?void 0:z.cost_in_usd_ticks)!=null?{costInUsdTicks:T.usage.cost_in_usd_ticks}:{},...T.progress!=null?{progress:T.progress}:{}}}}}if(T.status==="expired")throw new L8({name:"XAI_VIDEO_GENERATION_EXPIRED",message:"Video generation request expired."});if(T.status==="failed")throw new L8({name:"XAI_VIDEO_GENERATION_FAILED",message:"Video generation failed."})}}},Pi8,wi8,_i8,ji8,Ti8,U$4,Ci8,Si8,H$4=($,Y,X)=>(Y in $)?_i8($,Y,{enumerable:!0,configurable:!0,writable:!0,value:X}):$[Y]=X,f7=($,Y)=>{for(var X in Y||(Y={}))if(Ci8.call(Y,X))H$4($,X,Y[X]);if(U$4){for(var X of U$4(Y))if(Si8.call(Y,X))H$4($,X,Y[X])}return $},Mm=($,Y)=>ji8($,Ti8(Y)),k$4="vercel.ai.error",ki8,v$4,vi8,n$,x$4="AI_APICallError",y$4,xi8,b$4,eK,h$4="AI_EmptyResponseBodyError",f$4,yi8,g$4,bi8,u$4="AI_InvalidArgumentError",p$4,hi8,d$4,c$4,l$4="AI_InvalidPromptError",i$4,fi8,n$4,gi8,r$4="AI_InvalidResponseDataError",a$4,mi8,s$4,Bm,o$4="AI_JSONParseError",t$4,ui8,e$4,e90,$Y4="AI_LoadAPIKeyError",YY4,pi8,XY4,s90,GY4="AI_NoContentGeneratedError",JY4,di8,QY4,WY4,ZY4="AI_TypeValidationError",KY4,ci8,UY4,li8,Rm,HY4="AI_UnsupportedFunctionalityError",zY4,ii8,VY4,qD,z$4,ai8,si8=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let Z=0;Z<Y;Z++)W[Z]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new c$4({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},tK,oi8,Yn8,Xn8,Bb0,Vn8=()=>globalThis.fetch,Y50=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>An8({url:$,headers:f7({"Content-Type":"application/json"},Y),body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),An8=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=Vn8()})=>{try{let Z=await W($,{method:"POST",headers:ei8(Y),body:X.content,signal:Q}),K=J50(Z);if(!Z.ok){let H;try{H=await J({response:Z,url:$,requestBodyValues:X.values})}catch(z){if(Lb0(z)||eK.isInstance(z))throw z;throw new eK({message:"Failed to process error response",cause:z,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}throw H.value}try{return await G({response:Z,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(Lb0(H)||eK.isInstance(H))throw H}throw new eK({message:"Failed to process successful response",cause:H,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}}catch(Z){throw ti8({error:Z,url:$,requestBodyValues:X.values})}},Fn8=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),Z=J50(G);if(W.trim()==="")return{responseHeaders:Z,value:new eK({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let K=await Hn8({text:W,schema:$});return{responseHeaders:Z,value:new eK({message:Y(K),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,data:K,isRetryable:X==null?void 0:X(G,K)})}}catch(K){return{responseHeaders:Z,value:new eK({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},DY4=($)=>async({response:Y})=>{let X=J50(Y);if(Y.body==null)throw new bi8({});return{responseHeaders:X,value:zn8({stream:Y.body,schema:$})}},NY4=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await FY4({text:J,schema:$}),W=J50(Y);if(!Q.success)throw new eK({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},Dn8,LY4,Eb0,Bn8,On8,En8,Mb0,o90,Rb0,Q50,X50,Mn8,Rn8,wn8,_n8,OY4,EY4,jn8,Tn8,Cn8=class{constructor($,Y,X){this.specificationVersion="v2",this.provider="openrouter",this.defaultObjectGenerationMode="tool",this.supportedUrls={"image/*":[/^data:image\/[a-zA-Z]+;base64,/,/^https?:\/\/.+\.(jpg|jpeg|png|gif|webp)$/i],"application/*":[/^data:application\//,/^https?:\/\/.+$/]},this.modelId=$,this.settings=Y,this.config=X}getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,frequencyPenalty:J,presencePenalty:Q,seed:W,stopSequences:Z,responseFormat:K,topK:H,tools:z,toolChoice:V}){var A;let F=f7(f7({model:this.modelId,models:this.settings.models,logit_bias:this.settings.logitBias,logprobs:this.settings.logprobs===!0||typeof this.settings.logprobs==="number"?!0:void 0,top_logprobs:typeof this.settings.logprobs==="number"?this.settings.logprobs:typeof this.settings.logprobs==="boolean"?this.settings.logprobs?0:void 0:void 0,user:this.settings.user,parallel_tool_calls:this.settings.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:J,presence_penalty:Q,seed:W,stop:Z,response_format:K,top_k:H,messages:qn8($),include_reasoning:this.settings.includeReasoning,reasoning:this.settings.reasoning,usage:this.settings.usage,plugins:this.settings.plugins,web_search_options:this.settings.web_search_options,provider:this.settings.provider},this.config.extraBody),this.settings.extraBody);if((K==null?void 0:K.type)==="json"&&K.schema!=null)return Mm(f7({},F),{response_format:{type:"json_schema",json_schema:f7({schema:K.schema,strict:!0,name:(A=K.name)!=null?A:"response"},K.description&&{description:K.description})}});if(z&&z.length>0){let N=z.filter((D)=>D.type==="function").map((D)=>({type:"function",function:{name:D.name,description:D.description,parameters:D.inputSchema}}));return Mm(f7({},F),{tools:N,tool_choice:V?Pn8(V):void 0})}return F}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D,L,B,O,E,M,R,q,w,I,P;let C=($.providerOptions||{}).openrouter||{},k=f7(f7({},this.getArgs($)),C),{value:S,responseHeaders:T}=await Y50({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:$50(this.config.headers(),$.headers),body:k,failedResponseHandler:X50,successfulResponseHandler:NY4(jn8),abortSignal:$.abortSignal,fetch:this.config.fetch});if("error"in S){let g=S.error;throw new eK({message:g.message,url:this.config.url({path:"/chat/completions",modelId:this.modelId}),requestBodyValues:k,statusCode:200,responseHeaders:T,data:g})}let v=S,x=v.choices[0];if(!x)throw new WY4({message:"No choice in response"});let y=v.usage?{inputTokens:(Y=v.usage.prompt_tokens)!=null?Y:0,outputTokens:(X=v.usage.completion_tokens)!=null?X:0,totalTokens:((G=v.usage.prompt_tokens)!=null?G:0)+((J=v.usage.completion_tokens)!=null?J:0),reasoningTokens:(W=(Q=v.usage.completion_tokens_details)==null?void 0:Q.reasoning_tokens)!=null?W:0,cachedInputTokens:(K=(Z=v.usage.prompt_tokens_details)==null?void 0:Z.cached_tokens)!=null?K:0}:{inputTokens:0,outputTokens:0,totalTokens:0,reasoningTokens:0,cachedInputTokens:0},d=(H=x.message.reasoning_details)!=null?H:[],u=d.length>0?d.map((g)=>{switch(g.type){case"reasoning.text":{if(g.text)return{type:"reasoning",text:g.text};break}case"reasoning.summary":{if(g.summary)return{type:"reasoning",text:g.summary};break}case"reasoning.encrypted":{if(g.data)return{type:"reasoning",text:"[REDACTED]"};break}}return null}).filter((g)=>g!==null):x.message.reasoning?[{type:"reasoning",text:x.message.reasoning}]:[],b=[];if(b.push(...u),x.message.content)b.push({type:"text",text:x.message.content});if(x.message.tool_calls)for(let g of x.message.tool_calls)b.push({type:"tool-call",toolCallId:(z=g.id)!=null?z:tK(),toolName:g.function.name,input:g.function.arguments});if(x.message.images)for(let g of x.message.images)b.push({type:"file",mediaType:A$4(g.image_url.url,"image/jpeg"),data:F$4(g.image_url.url)});if(x.message.annotations){for(let g of x.message.annotations)if(g.type==="url_citation")b.push({type:"source",sourceType:"url",id:g.url_citation.url,url:g.url_citation.url,title:g.url_citation.title,providerMetadata:{openrouter:{content:g.url_citation.content||""}}})}return{content:b,finishReason:G50(x.finish_reason),usage:y,warnings:[],providerMetadata:{openrouter:Mn8.parse({provider:(V=v.provider)!=null?V:"",reasoning_details:(A=x.message.reasoning_details)!=null?A:[],usage:{promptTokens:(F=y.inputTokens)!=null?F:0,completionTokens:(N=y.outputTokens)!=null?N:0,totalTokens:(D=y.totalTokens)!=null?D:0,cost:(L=v.usage)==null?void 0:L.cost,promptTokensDetails:{cachedTokens:(E=(O=(B=v.usage)==null?void 0:B.prompt_tokens_details)==null?void 0:O.cached_tokens)!=null?E:0},completionTokensDetails:{reasoningTokens:(q=(R=(M=v.usage)==null?void 0:M.completion_tokens_details)==null?void 0:R.reasoning_tokens)!=null?q:0},costDetails:{upstreamInferenceCost:(P=(I=(w=v.usage)==null?void 0:w.cost_details)==null?void 0:I.upstream_inference_cost)!=null?P:0}}})},request:{body:k},response:{id:v.id,modelId:v.model,headers:T}}}async doStream($){var Y;let G=($.providerOptions||{}).openrouter||{},J=f7(f7({},this.getArgs($)),G),{value:Q,responseHeaders:W}=await Y50({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:$50(this.config.headers(),$.headers),body:Mm(f7({},J),{stream:!0,stream_options:this.config.compatibility==="strict"?f7({include_usage:!0},((Y=this.settings.usage)==null?void 0:Y.include)?{include_usage:!0}:{}):void 0}),failedResponseHandler:X50,successfulResponseHandler:DY4(Tn8),abortSignal:$.abortSignal,fetch:this.config.fetch}),Z=[],K="other",H={inputTokens:Number.NaN,outputTokens:Number.NaN,totalTokens:Number.NaN,reasoningTokens:Number.NaN,cachedInputTokens:Number.NaN},z={},V=[],A=!1,F=!1,N,D,L,B;return{stream:Q.pipeThrough(new TransformStream({transform(O,E){var M,R,q,w,I,P,_,C,k,S,T,v,x,y;if(!O.success){K="error",E.enqueue({type:"error",error:O.error});return}let d=O.value;if("error"in d){K="error",E.enqueue({type:"error",error:d.error});return}if(d.provider)B=d.provider;if(d.id)L=d.id,E.enqueue({type:"response-metadata",id:d.id});if(d.model)E.enqueue({type:"response-metadata",modelId:d.model});if(d.usage!=null){if(H.inputTokens=d.usage.prompt_tokens,H.outputTokens=d.usage.completion_tokens,H.totalTokens=d.usage.prompt_tokens+d.usage.completion_tokens,z.promptTokens=d.usage.prompt_tokens,d.usage.prompt_tokens_details){let p=(M=d.usage.prompt_tokens_details.cached_tokens)!=null?M:0;H.cachedInputTokens=p,z.promptTokensDetails={cachedTokens:p}}if(z.completionTokens=d.usage.completion_tokens,d.usage.completion_tokens_details){let p=(R=d.usage.completion_tokens_details.reasoning_tokens)!=null?R:0;H.reasoningTokens=p,z.completionTokensDetails={reasoningTokens:p}}z.cost=d.usage.cost,z.totalTokens=d.usage.total_tokens}let u=d.choices[0];if((u==null?void 0:u.finish_reason)!=null)K=G50(u.finish_reason);if((u==null?void 0:u.delta)==null)return;let b=u.delta,g=(p)=>{if(!F)D=L||tK(),E.enqueue({type:"reasoning-start",id:D}),F=!0;E.enqueue({type:"reasoning-delta",delta:p,id:D||tK()})};if(b.reasoning_details&&b.reasoning_details.length>0){V.push(...b.reasoning_details);for(let p of b.reasoning_details)switch(p.type){case"reasoning.text":{if(p.text)g(p.text);break}case"reasoning.encrypted":{if(p.data)g("[REDACTED]");break}case"reasoning.summary":{if(p.summary)g(p.summary);break}}}else if(b.reasoning)g(b.reasoning);if(b.content){if(F&&!A)E.enqueue({type:"reasoning-end",id:D||tK()}),F=!1;if(!A)N=L||tK(),E.enqueue({type:"text-start",id:N}),A=!0;E.enqueue({type:"text-delta",delta:b.content,id:N||tK()})}if(b.annotations){for(let p of b.annotations)if(p.type==="url_citation")E.enqueue({type:"source",sourceType:"url",id:p.url_citation.url,url:p.url_citation.url,title:p.url_citation.title,providerMetadata:{openrouter:{content:p.url_citation.content||""}}})}if(b.tool_calls!=null)for(let p of b.tool_calls){let h=(q=p.index)!=null?q:Z.length-1;if(Z[h]==null){if(p.type!=="function")throw new Bm({data:p,message:"Expected 'function' type."});if(p.id==null)throw new Bm({data:p,message:"Expected 'id' to be a string."});if(((w=p.function)==null?void 0:w.name)==null)throw new Bm({data:p,message:"Expected 'function.name' to be a string."});Z[h]={id:p.id,type:"function",function:{name:p.function.name,arguments:(I=p.function.arguments)!=null?I:""},inputStarted:!1,sent:!1};let t=Z[h];if(t==null)throw new Bm({data:{index:h,toolCallsLength:Z.length},message:`Tool call at index ${h} is missing after creation.`});if(((P=t.function)==null?void 0:P.name)!=null&&((_=t.function)==null?void 0:_.arguments)!=null&&Zb0(t.function.arguments))t.inputStarted=!0,E.enqueue({type:"tool-input-start",id:t.id,toolName:t.function.name}),E.enqueue({type:"tool-input-delta",id:t.id,delta:t.function.arguments}),E.enqueue({type:"tool-input-end",id:t.id}),E.enqueue({type:"tool-call",toolCallId:t.id,toolName:t.function.name,input:t.function.arguments}),t.sent=!0;continue}let n=Z[h];if(n==null)throw new Bm({data:{index:h,toolCallsLength:Z.length,toolCallDelta:p},message:`Tool call at index ${h} is missing during merge.`});if(!n.inputStarted)n.inputStarted=!0,E.enqueue({type:"tool-input-start",id:n.id,toolName:n.function.name});if(((C=p.function)==null?void 0:C.arguments)!=null)n.function.arguments+=(S=(k=p.function)==null?void 0:k.arguments)!=null?S:"";if(E.enqueue({type:"tool-input-delta",id:n.id,delta:(T=p.function.arguments)!=null?T:""}),((v=n.function)==null?void 0:v.name)!=null&&((x=n.function)==null?void 0:x.arguments)!=null&&Zb0(n.function.arguments))E.enqueue({type:"tool-call",toolCallId:(y=n.id)!=null?y:tK(),toolName:n.function.name,input:n.function.arguments}),n.sent=!0}if(b.images!=null)for(let p of b.images)E.enqueue({type:"file",mediaType:A$4(p.image_url.url,"image/jpeg"),data:F$4(p.image_url.url)})},flush(O){var E;if(K==="tool-calls"){for(let R of Z)if(R&&!R.sent)O.enqueue({type:"tool-call",toolCallId:(E=R.id)!=null?E:tK(),toolName:R.function.name,input:Zb0(R.function.arguments)?R.function.arguments:"{}"}),R.sent=!0}if(F)O.enqueue({type:"reasoning-end",id:D||tK()});if(A)O.enqueue({type:"text-end",id:N||tK()});let M={usage:z};if(B!==void 0)M.provider=B;if(V.length>0)M.reasoning_details=V;O.enqueue({type:"finish",finishReason:K,usage:H,providerMetadata:{openrouter:M}})}})),warnings:[],request:{body:J},response:{headers:W}}}},D$4,kn8=class{constructor($,Y,X){this.specificationVersion="v2",this.provider="openrouter",this.supportedUrls={"image/*":[/^data:image\/[a-zA-Z]+;base64,/,/^https?:\/\/.+\.(jpg|jpeg|png|gif|webp)$/i],"text/*":[/^data:text\//,/^https?:\/\/.+$/],"application/*":[/^data:application\//,/^https?:\/\/.+$/]},this.defaultObjectGenerationMode=void 0,this.modelId=$,this.settings=Y,this.config=X}getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,frequencyPenalty:J,presencePenalty:Q,seed:W,responseFormat:Z,topK:K,stopSequences:H,tools:z,toolChoice:V}){let{prompt:A}=Sn8({prompt:$,inputFormat:"prompt"});if(z==null?void 0:z.length)throw new qD({functionality:"tools"});if(V)throw new qD({functionality:"toolChoice"});return f7(f7({model:this.modelId,models:this.settings.models,logit_bias:this.settings.logitBias,logprobs:typeof this.settings.logprobs==="number"?this.settings.logprobs:typeof this.settings.logprobs==="boolean"?this.settings.logprobs?0:void 0:void 0,suffix:this.settings.suffix,user:this.settings.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:J,presence_penalty:Q,seed:W,stop:H,response_format:Z,top_k:K,prompt:A,include_reasoning:this.settings.includeReasoning,reasoning:this.settings.reasoning},this.config.extraBody),this.settings.extraBody)}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D;let B=($.providerOptions||{}).openrouter||{},O=f7(f7({},this.getArgs($)),B),{value:E,responseHeaders:M}=await Y50({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:$50(this.config.headers(),$.headers),body:O,failedResponseHandler:X50,successfulResponseHandler:NY4(D$4),abortSignal:$.abortSignal,fetch:this.config.fetch});if("error"in E){let q=E.error;throw new eK({message:q.message,url:this.config.url({path:"/completions",modelId:this.modelId}),requestBodyValues:O,statusCode:200,responseHeaders:M,data:q})}let R=E.choices[0];if(!R)throw new WY4({message:"No choice in OpenRouter completion response"});return{content:[{type:"text",text:(Y=R.text)!=null?Y:""}],finishReason:G50(R.finish_reason),usage:{inputTokens:(G=(X=E.usage)==null?void 0:X.prompt_tokens)!=null?G:0,outputTokens:(Q=(J=E.usage)==null?void 0:J.completion_tokens)!=null?Q:0,totalTokens:((Z=(W=E.usage)==null?void 0:W.prompt_tokens)!=null?Z:0)+((H=(K=E.usage)==null?void 0:K.completion_tokens)!=null?H:0),reasoningTokens:(A=(V=(z=E.usage)==null?void 0:z.completion_tokens_details)==null?void 0:V.reasoning_tokens)!=null?A:0,cachedInputTokens:(D=(N=(F=E.usage)==null?void 0:F.prompt_tokens_details)==null?void 0:N.cached_tokens)!=null?D:0},warnings:[],response:{headers:M}}}async doStream($){let X=($.providerOptions||{}).openrouter||{},G=f7(f7({},this.getArgs($)),X),{value:J,responseHeaders:Q}=await Y50({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:$50(this.config.headers(),$.headers),body:Mm(f7({},G),{stream:!0,stream_options:this.config.compatibility==="strict"?{include_usage:!0}:void 0}),failedResponseHandler:X50,successfulResponseHandler:DY4(D$4),abortSignal:$.abortSignal,fetch:this.config.fetch}),W="other",Z={inputTokens:Number.NaN,outputTokens:Number.NaN,totalTokens:Number.NaN,reasoningTokens:Number.NaN,cachedInputTokens:Number.NaN},K={};return{stream:J.pipeThrough(new TransformStream({transform(H,z){var V,A;if(!H.success){W="error",z.enqueue({type:"error",error:H.error});return}let F=H.value;if("error"in F){W="error",z.enqueue({type:"error",error:F.error});return}if(F.usage!=null){if(Z.inputTokens=F.usage.prompt_tokens,Z.outputTokens=F.usage.completion_tokens,Z.totalTokens=F.usage.prompt_tokens+F.usage.completion_tokens,K.promptTokens=F.usage.prompt_tokens,F.usage.prompt_tokens_details){let D=(V=F.usage.prompt_tokens_details.cached_tokens)!=null?V:0;Z.cachedInputTokens=D,K.promptTokensDetails={cachedTokens:D}}if(K.completionTokens=F.usage.completion_tokens,F.usage.completion_tokens_details){let D=(A=F.usage.completion_tokens_details.reasoning_tokens)!=null?A:0;Z.reasoningTokens=D,K.completionTokensDetails={reasoningTokens:D}}K.cost=F.usage.cost,K.totalTokens=F.usage.total_tokens}let N=F.choices[0];if((N==null?void 0:N.finish_reason)!=null)W=G50(N.finish_reason);if((N==null?void 0:N.text)!=null)z.enqueue({type:"text-delta",delta:N.text,id:tK()})},flush(H){H.enqueue({type:"finish",finishReason:W,usage:Z,providerMetadata:{openrouter:{usage:K}}})}})),response:{headers:Q}}}},yn8="1.2.3",Om,Kj;var W50=V0(()=>{Lm();Hk0();O1();Ic8=U.object({message:U.string(),type:U.string(),param:U.string(),code:U.string()}),Pc8={errorSchema:Ic8,errorToMessage:($)=>$.message};N$4();_c8=U.object({detail:U.object({error:U.string()})}),jc8=U.object({images:U.array(U.string())}),Tc8=class extends Fm{constructor($,Y){super($,Y)}fixUsage($){var Y,X;let G=(Y=$.outputTokens)!=null?Y:0,J=(X=$.reasoningTokens)!=null?X:0;if(J>G){let Q=G+J;return{...$,outputTokens:Q,totalTokens:$.totalTokens!=null?$.totalTokens+J:void 0}}return $}async doGenerate($){let Y=await super.doGenerate($);return{...Y,usage:this.fixUsage(Y.usage)}}async doStream($){let Y=await super.doStream($),X=this.fixUsage.bind(this),G=Y.stream.pipeThrough(new TransformStream({transform(J,Q){if(J.type==="finish")Q.enqueue({...J,usage:X(J.usage)});else Q.enqueue(J)}}));return{...Y,stream:G}}};L$4();B$4=U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),prompt_cache_hit_tokens:U.number().nullish(),prompt_cache_miss_tokens:U.number().nullish(),total_tokens:U.number().nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).nullish(),O$4=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),kc8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),finish_reason:U.string().nullish()})),usage:B$4}),vc8=Y6(()=>x1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:B$4}),O$4]))),xc8=U.object({thinking:U.object({type:U.enum(["enabled","disabled"]).optional()}).optional(),reasoningEffort:U.enum(["high","max"]).optional()});E$4();gc8=U.object({reasoningFormat:U.enum(["parsed","raw","hidden"]).optional(),reasoningEffort:U.enum(["none","default","low","medium","high"]).optional(),parallelToolCalls:U.boolean().optional(),user:U.string().optional(),structuredOutputs:U.boolean().optional(),strictJsonSchema:U.boolean().optional(),serviceTier:U.enum(["on_demand","performance","flex","auto"]).optional()}),M$4=U.object({error:U.object({message:U.string(),type:U.string()})}),Ub0=OE({errorSchema:M$4,errorToMessage:($)=>$.error.message}),R$4=["openai/gpt-oss-20b","openai/gpt-oss-120b"];cc8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),index:U.number(),finish_reason:U.string().nullish()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).nullish()}),lc8=U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),type:U.literal("function").optional(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish()}).nullish(),finish_reason:U.string().nullable().optional(),index:U.number()})),x_groq:U.object({usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).nullish()}).nullish()}),M$4]),ic8=J1(()=>G1(U.object({language:U.string().nullish(),prompt:U.string().nullish(),responseFormat:U.string().nullish(),temperature:U.number().min(0).max(1).nullish(),timestampGranularities:U.array(U.string()).nullish()}))),rc8=U.object({text:U.string(),x_groq:U.object({id:U.string()}),task:U.string().nullish(),language:U.string().nullish(),duration:U.number().nullish(),segments:U.array(U.object({id:U.number(),seek:U.number(),start:U.number(),end:U.number(),text:U.string(),tokens:U.array(U.number()),temperature:U.number(),avg_logprob:U.number(),compression_ratio:U.number(),no_speech_prob:U.number()})).nullish()}),ac8=FY({id:"groq.browser_search",inputSchema:U.object({})}),sc8={browserSearch:ac8};q$4();ec8=U.object({safePrompt:U.boolean().optional(),documentImageLimit:U.number().optional(),documentPageLimit:U.number().optional(),structuredOutputs:U.boolean().optional(),strictJsonSchema:U.boolean().optional(),parallelToolCalls:U.boolean().optional(),reasoningEffort:U.enum(["high","none"]).optional()}),$l8=U.object({object:U.literal("error"),message:U.string(),type:U.string(),param:U.string().nullable(),code:U.string().nullable()}),Hb0=OE({errorSchema:$l8,errorToMessage:($)=>$.message});I$4=U.union([U.string(),U.array(U.discriminatedUnion("type",[U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("image_url"),image_url:U.union([U.string(),U.object({url:U.string(),detail:U.string().nullable()})])}),U.object({type:U.literal("reference"),reference_ids:U.array(U.union([U.string(),U.number()]))}),U.object({type:U.literal("thinking"),thinking:U.array(U.object({type:U.literal("text"),text:U.string()}))})]))]).nullish(),P$4=U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number(),num_cached_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),prompt_token_details:U.object({cached_tokens:U.number().nullish()}).nullish()}),Gl8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant"),content:I$4,tool_calls:U.array(U.object({id:U.string(),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),index:U.number(),finish_reason:U.string().nullish()})),object:U.literal("chat.completion"),usage:P$4}),Jl8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).optional(),content:I$4,tool_calls:U.array(U.object({id:U.string(),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),finish_reason:U.string().nullish(),index:U.number()})),usage:P$4.nullish()}),Wl8=U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish()});zb0();Hl8=U.object({input_tokens_cost:U.number().nullish(),output_tokens_cost:U.number().nullish(),request_cost:U.number().nullish(),total_cost:U.number().nullish()}),w$4=U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number().nullish(),citation_tokens:U.number().nullish(),num_search_queries:U.number().nullish(),reasoning_tokens:U.number().nullish(),cost:Hl8.nullish()}),_$4=U.object({image_url:U.string(),origin_url:U.string(),height:U.number(),width:U.number()}),zl8=U.object({id:U.string(),created:U.number(),model:U.string(),choices:U.array(U.object({message:U.object({role:U.literal("assistant"),content:U.string()}),finish_reason:U.string().nullish()})),citations:U.array(U.string()).nullish(),images:U.array(_$4).nullish(),usage:w$4.nullish()}),Vl8=U.object({id:U.string(),created:U.number(),model:U.string(),choices:U.array(U.object({delta:U.object({role:U.literal("assistant"),content:U.string()}),finish_reason:U.string().nullish()})),citations:U.array(U.string()).nullish(),images:U.array(_$4).nullish(),usage:w$4.nullish()}),Q$4=U.object({error:U.object({code:U.number(),message:U.string().nullish(),type:U.string().nullish()})});j$4();Dl8=U.object({data:U.array(U.object({b64_json:U.string()}))}),Nl8=U.object({error:U.object({message:U.string()})});T$4();El8=U.object({type:U.literal("web"),country:U.string().length(2).optional(),excludedWebsites:U.array(U.string()).max(5).optional(),allowedWebsites:U.array(U.string()).max(5).optional(),safeSearch:U.boolean().optional()}),Ml8=U.object({type:U.literal("x"),excludedXHandles:U.array(U.string()).optional(),includedXHandles:U.array(U.string()).optional(),postFavoriteCount:U.number().int().optional(),postViewCount:U.number().int().optional(),xHandles:U.array(U.string()).optional()}),Rl8=U.object({type:U.literal("news"),country:U.string().length(2).optional(),excludedWebsites:U.array(U.string()).max(5).optional(),safeSearch:U.boolean().optional()}),ql8=U.object({type:U.literal("rss"),links:U.array(U.string().url()).max(1)}),Il8=U.discriminatedUnion("type",[El8,Ml8,Rl8,ql8]),Pl8=U.object({reasoningEffort:U.enum(["low","high"]).optional(),logprobs:U.boolean().optional(),topLogprobs:U.number().int().min(0).max(8).optional(),parallel_function_calling:U.boolean().optional(),searchParameters:U.object({mode:U.enum(["off","auto","on"]),returnCitations:U.boolean().optional(),fromDate:U.string().optional(),toDate:U.string().optional(),maxSearchResults:U.number().min(1).max(50).optional(),sources:U.array(Il8).optional()}).optional()}),wl8=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),RE=OE({errorSchema:wl8,errorToMessage:($)=>$.error.message});C$4=U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number(),prompt_tokens_details:U.object({text_tokens:U.number().nullish(),audio_tokens:U.number().nullish(),image_tokens:U.number().nullish(),cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),audio_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}),Tl8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant"),content:U.string().nullish(),reasoning_content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),index:U.number(),finish_reason:U.string().nullish()})).nullish(),object:U.literal("chat.completion").nullish(),usage:C$4.nullish(),citations:U.array(U.string().url()).nullish(),code:U.string().nullish(),error:U.string().nullish()}),Cl8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).optional(),content:U.string().nullish(),reasoning_content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),finish_reason:U.string().nullish(),index:U.number()})),usage:C$4.nullish(),citations:U.array(U.string().url()).nullish()}),Sl8=U.object({code:U.string(),error:U.string()}),kl8=U.object({aspect_ratio:U.string().optional(),output_format:U.string().optional(),sync_mode:U.boolean().optional(),resolution:U.enum(["1k","2k"]).optional(),quality:U.enum(["low","medium","high"]).optional(),user:U.string().optional()}),xl8=U.object({data:U.array(U.object({url:U.string().nullish(),b64_json:U.string().nullish(),revised_prompt:U.string().nullish()})),usage:U.object({cost_in_usd_ticks:U.number().nullish()}).nullish()});Vb0=U.union([U.object({type:U.literal("url_citation"),url:U.string(),title:U.string().optional()}),U.object({type:U.string()})]),Ab0=U.object({type:U.string(),text:U.string().optional(),logprobs:U.array(U.any()).optional(),annotations:U.array(Vb0).optional()}),Fb0=U.object({type:U.string(),text:U.string()}),ME=U.object({name:U.string().optional(),arguments:U.string().optional(),input:U.string().optional(),call_id:U.string().optional(),id:U.string(),status:U.string(),action:U.any().optional()}),bl8=U.object({name:U.string().optional(),arguments:U.string().optional(),output:U.string().optional(),error:U.string().optional(),id:U.string(),status:U.string(),server_label:U.string().optional()}),Db0=U.discriminatedUnion("type",[U.object({type:U.literal("web_search_call"),...ME.shape}),U.object({type:U.literal("x_search_call"),...ME.shape}),U.object({type:U.literal("code_interpreter_call"),...ME.shape}),U.object({type:U.literal("code_execution_call"),...ME.shape}),U.object({type:U.literal("view_image_call"),...ME.shape}),U.object({type:U.literal("view_x_video_call"),...ME.shape}),U.object({type:U.literal("file_search_call"),id:U.string(),status:U.string(),queries:U.array(U.string()).optional(),results:U.array(U.object({file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("custom_tool_call"),...ME.shape}),U.object({type:U.literal("mcp_call"),...bl8.shape}),U.object({type:U.literal("message"),role:U.string(),content:U.array(Ab0),id:U.string(),status:U.string()}),U.object({type:U.literal("function_call"),name:U.string(),arguments:U.string(),call_id:U.string(),id:U.string()}),U.object({type:U.literal("reasoning"),id:U.string(),summary:U.array(Fb0),status:U.string(),encrypted_content:U.string().nullish()})]),Nb0=U.object({input_tokens:U.number(),output_tokens:U.number(),total_tokens:U.number().optional(),input_tokens_details:U.object({cached_tokens:U.number().optional()}).optional(),output_tokens_details:U.object({reasoning_tokens:U.number().optional()}).optional(),num_sources_used:U.number().optional(),num_server_side_tools_used:U.number().optional()}),Em=U.object({id:U.string().nullish(),created_at:U.number().nullish(),model:U.string().nullish(),object:U.literal("response"),output:U.array(Db0),usage:Nb0.nullish(),status:U.string()}),hl8=U.union([U.object({type:U.literal("response.created"),response:Em.partial({usage:!0,status:!0})}),U.object({type:U.literal("response.in_progress"),response:Em.partial({usage:!0,status:!0})}),U.object({type:U.literal("response.output_item.added"),item:Db0,output_index:U.number()}),U.object({type:U.literal("response.output_item.done"),item:Db0,output_index:U.number()}),U.object({type:U.literal("response.content_part.added"),item_id:U.string(),output_index:U.number(),content_index:U.number(),part:Ab0}),U.object({type:U.literal("response.content_part.done"),item_id:U.string(),output_index:U.number(),content_index:U.number(),part:Ab0}),U.object({type:U.literal("response.output_text.delta"),item_id:U.string(),output_index:U.number(),content_index:U.number(),delta:U.string(),logprobs:U.array(U.any()).optional()}),U.object({type:U.literal("response.output_text.done"),item_id:U.string(),output_index:U.number(),content_index:U.number(),text:U.string(),logprobs:U.array(U.any()).optional(),annotations:U.array(Vb0).optional()}),U.object({type:U.literal("response.output_text.annotation.added"),item_id:U.string(),output_index:U.number(),content_index:U.number(),annotation_index:U.number(),annotation:Vb0}),U.object({type:U.literal("response.reasoning_summary_part.added"),item_id:U.string(),output_index:U.number(),summary_index:U.number(),part:Fb0}),U.object({type:U.literal("response.reasoning_summary_part.done"),item_id:U.string(),output_index:U.number(),summary_index:U.number(),part:Fb0}),U.object({type:U.literal("response.reasoning_summary_text.delta"),item_id:U.string(),output_index:U.number(),summary_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_summary_text.done"),item_id:U.string(),output_index:U.number(),summary_index:U.number(),text:U.string()}),U.object({type:U.literal("response.reasoning_text.delta"),item_id:U.string(),output_index:U.number(),content_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_text.done"),item_id:U.string(),output_index:U.number(),content_index:U.number(),text:U.string()}),U.object({type:U.literal("response.web_search_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.web_search_call.searching"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.web_search_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.x_search_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.x_search_call.searching"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.x_search_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.file_search_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.file_search_call.searching"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.file_search_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_execution_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_execution_call.executing"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_execution_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_interpreter_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_interpreter_call.executing"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_interpreter_call.interpreting"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_interpreter_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_interpreter_call_code.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.done"),item_id:U.string(),output_index:U.number(),code:U.string()}),U.object({type:U.literal("response.custom_tool_call_input.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.custom_tool_call_input.done"),item_id:U.string(),output_index:U.number(),input:U.string()}),U.object({type:U.literal("response.function_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.function_call_arguments.done"),item_id:U.string(),output_index:U.number(),arguments:U.string()}),U.object({type:U.literal("response.mcp_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.mcp_call.executing"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.mcp_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.mcp_call.failed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.mcp_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.mcp_call_arguments.done"),item_id:U.string(),output_index:U.number(),arguments:U.string().optional()}),U.object({type:U.literal("response.mcp_call_output.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.mcp_call_output.done"),item_id:U.string(),output_index:U.number(),output:U.string().optional()}),U.object({type:U.literal("response.incomplete"),response:U.object({incomplete_details:U.object({reason:U.string()}).nullish(),usage:Nb0.nullish()})}),U.object({type:U.literal("response.failed"),response:U.object({error:U.object({code:U.string().nullish(),message:U.string()}).nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:Nb0.nullish()})}),U.object({type:U.literal("error"),code:U.string().nullish(),message:U.string(),param:U.string().nullish()}),U.object({type:U.literal("response.done"),response:Em}),U.object({type:U.literal("response.completed"),response:Em})]),fl8=U.object({reasoningEffort:U.enum(["low","medium","high"]).optional(),logprobs:U.boolean().optional(),topLogprobs:U.number().int().min(0).max(8).optional(),store:U.boolean().optional(),previousResponseId:U.string().optional(),include:U.array(U.enum(["file_search_call.results"])).nullish()}),gl8=J1(()=>G1(U.object({vectorStoreIds:U.array(U.string()),maxNumResults:U.number().optional()}))),ml8=J1(()=>G1(U.object({queries:U.array(U.string()),results:U.array(U.object({fileId:U.string(),filename:U.string(),score:U.number().min(0).max(1),text:U.string()})).nullable()}))),ul8=D5({id:"xai.file_search",inputSchema:J1(()=>G1(U.object({}))),outputSchema:ml8}),dl8=J1(()=>G1(U.object({serverUrl:U.string().describe("The URL of the MCP server"),serverLabel:U.string().optional().describe("A label for the MCP server"),serverDescription:U.string().optional().describe("Description of the MCP server"),allowedTools:U.array(U.string()).optional().describe("List of allowed tool names"),headers:U.record(U.string(),U.string()).optional().describe("Custom headers to send"),authorization:U.string().optional().describe("Authorization header value")}))),cl8=J1(()=>G1(U.object({name:U.string(),arguments:U.string(),result:U.unknown()}))),ll8=D5({id:"xai.mcp",inputSchema:J1(()=>G1(U.object({}))),outputSchema:cl8}),nl8=J1(()=>G1(U.object({allowedDomains:U.array(U.string()).max(5).optional(),excludedDomains:U.array(U.string()).max(5).optional(),enableImageUnderstanding:U.boolean().optional()}))),rl8=J1(()=>G1(U.object({query:U.string(),sources:U.array(U.object({title:U.string(),url:U.string(),snippet:U.string()}))}))),al8=D5({id:"xai.web_search",inputSchema:J1(()=>G1(U.object({}))),outputSchema:rl8}),ol8=J1(()=>G1(U.object({allowedXHandles:U.array(U.string()).max(10).optional(),excludedXHandles:U.array(U.string()).max(10).optional(),fromDate:U.string().optional(),toDate:U.string().optional(),enableImageUnderstanding:U.boolean().optional(),enableVideoUnderstanding:U.boolean().optional()}))),tl8=J1(()=>G1(U.object({query:U.string(),posts:U.array(U.object({author:U.string(),text:U.string(),url:U.string(),likes:U.number()}))}))),el8=D5({id:"xai.x_search",inputSchema:J1(()=>G1(U.object({}))),outputSchema:tl8});Gi8=U.object({output:U.string().describe("the output of the code execution"),error:U.string().optional().describe("any error that occurred")}),Ji8=D5({id:"xai.code_execution",inputSchema:U.object({}).describe("no input parameters"),outputSchema:Gi8}),Wi8=U.object({description:U.string().describe("description of the image"),objects:U.array(U.string()).optional().describe("objects detected in the image")}),Zi8=D5({id:"xai.view_image",inputSchema:U.object({}).describe("no input parameters"),outputSchema:Wi8}),Ui8=U.object({transcript:U.string().optional().describe("transcript of the video"),description:U.string().describe("description of the video content"),duration:U.number().optional().describe("duration in seconds")}),Hi8=D5({id:"xai.view_x_video",inputSchema:U.object({}).describe("no input parameters"),outputSchema:Ui8}),Vi8={codeExecution:Qi8,fileSearch:pl8,mcpServer:il8,viewImage:Ki8,viewXVideo:zi8,webSearch:sl8,xSearch:$i8},qE=U.string().min(1),Fi8=U.enum(["480p","720p"]),Di8=U.enum(["edit-video","extend-video","reference-to-video"]),qm={pollIntervalMs:U.number().positive().nullish(),pollTimeoutMs:U.number().positive().nullish(),resolution:Fi8.nullish()},Ni8=U.object({...qm,mode:U.literal("edit-video"),videoUrl:qE,referenceImageUrls:U.undefined().optional()}),Li8=U.object({...qm,mode:U.literal("extend-video"),videoUrl:qE,referenceImageUrls:U.undefined().optional()}),Bi8=U.object({...qm,mode:U.literal("reference-to-video"),referenceImageUrls:U.array(qE).min(1).max(7),videoUrl:U.undefined().optional()}),Oi8=U.object({...qm,mode:U.undefined().optional(),videoUrl:qE.optional(),referenceImageUrls:U.array(qE).min(1).max(7).optional()});U.union([Ni8,Li8,Bi8,Oi8]);Ei8=U.object({mode:Di8.optional(),videoUrl:qE.optional(),referenceImageUrls:U.array(qE).min(1).max(7).optional(),...qm}).passthrough(),Mi8=J1(()=>G1(Ei8)),Ri8={"1280x720":"720p","854x480":"480p","640x480":"480p"};Pi8=U.object({request_id:U.string().nullish()}),wi8=U.object({status:U.string().nullish(),video:U.object({url:U.string(),duration:U.number().nullish(),respect_moderation:U.boolean().nullish()}).nullish(),model:U.string().nullish(),usage:U.object({cost_in_usd_ticks:U.number().nullish()}).nullish(),progress:U.number().nullish(),error:U.object({code:U.string().nullish(),message:U.string().nullish()}).nullish()});S$4();_i8=Object.defineProperty,ji8=Object.defineProperties,Ti8=Object.getOwnPropertyDescriptors,U$4=Object.getOwnPropertySymbols,Ci8=Object.prototype.hasOwnProperty,Si8=Object.prototype.propertyIsEnumerable,ki8=Symbol.for(k$4),vi8=class $ extends Error{constructor({name:Y,message:X,cause:G}){super(X);this[v$4]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,k$4)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}};v$4=ki8;n$=vi8,y$4=`vercel.ai.error.${x$4}`,xi8=Symbol.for(y$4),eK=class extends n${constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:x$4,message:$,cause:W});this[b$4]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return n$.hasMarker($,y$4)}};b$4=xi8;f$4=`vercel.ai.error.${h$4}`,yi8=Symbol.for(f$4),bi8=class extends n${constructor({message:$="Empty response body"}={}){super({name:h$4,message:$});this[g$4]=!0}static isInstance($){return n$.hasMarker($,f$4)}};g$4=yi8;p$4=`vercel.ai.error.${u$4}`,hi8=Symbol.for(p$4),c$4=class extends n${constructor({message:$,cause:Y,argument:X}){super({name:u$4,message:$,cause:Y});this[d$4]=!0,this.argument=X}static isInstance($){return n$.hasMarker($,p$4)}};d$4=hi8;i$4=`vercel.ai.error.${l$4}`,fi8=Symbol.for(i$4),gi8=class extends n${constructor({prompt:$,message:Y,cause:X}){super({name:l$4,message:`Invalid prompt: ${Y}`,cause:X});this[n$4]=!0,this.prompt=$}static isInstance($){return n$.hasMarker($,i$4)}};n$4=fi8;a$4=`vercel.ai.error.${r$4}`,mi8=Symbol.for(a$4),Bm=class extends n${constructor({data:$,message:Y=`Invalid response data: ${JSON.stringify($)}.`}){super({name:r$4,message:Y});this[s$4]=!0,this.data=$}static isInstance($){return n$.hasMarker($,a$4)}};s$4=mi8;t$4=`vercel.ai.error.${o$4}`,ui8=Symbol.for(t$4),e90=class extends n${constructor({text:$,cause:Y}){super({name:o$4,message:`JSON parsing failed: Text: ${$}.
Error message: ${m$4(Y)}`,cause:Y});this[e$4]=!0,this.text=$}static isInstance($){return n$.hasMarker($,t$4)}};e$4=ui8;YY4=`vercel.ai.error.${$Y4}`,pi8=Symbol.for(YY4),s90=class extends n${constructor({message:$}){super({name:$Y4,message:$});this[XY4]=!0}static isInstance($){return n$.hasMarker($,YY4)}};XY4=pi8;JY4=`vercel.ai.error.${GY4}`,di8=Symbol.for(JY4),WY4=class extends n${constructor({message:$="No content generated."}={}){super({name:GY4,message:$});this[QY4]=!0}static isInstance($){return n$.hasMarker($,JY4)}};QY4=di8;KY4=`vercel.ai.error.${ZY4}`,ci8=Symbol.for(KY4),li8=class $ extends n${constructor({value:Y,cause:X}){super({name:ZY4,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${m$4(X)}`,cause:X});this[UY4]=!0,this.value=Y}static isInstance(Y){return n$.hasMarker(Y,KY4)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}};UY4=ci8;Rm=li8,zY4=`vercel.ai.error.${HY4}`,ii8=Symbol.for(zY4),qD=class extends n${constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:HY4,message:Y});this[VY4]=!0,this.functionality=$}static isInstance($){return n$.hasMarker($,zY4)}};VY4=ii8;z$4=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};ai8=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=ni8({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");tK=si8();oi8=["fetch failed","failed to fetch"];Yn8=/"__proto__"\s*:/,Xn8=/"constructor"\s*:/;Bb0=Symbol.for("vercel.ai.validator");({btoa:Dn8}=globalThis);LY4=(($)=>{return $.Unknown="unknown",$.OpenAIResponsesV1="openai-responses-v1",$.XAIResponsesV1="xai-responses-v1",$.AnthropicClaudeV1="anthropic-claude-v1",$})(LY4||{}),Eb0=U.object({id:U.string().nullish(),format:U.nativeEnum(LY4).nullish(),index:U.number().optional()}).passthrough(),Bn8=U.object({type:U.literal("reasoning.summary"),summary:U.string()}).extend(Eb0.shape),On8=U.object({type:U.literal("reasoning.encrypted"),data:U.string()}).extend(Eb0.shape),En8=U.object({type:U.literal("reasoning.text"),text:U.string().nullish(),signature:U.string().nullish()}).extend(Eb0.shape),Mb0=U.union([Bn8,On8,En8]),o90=U.union([Mb0,U.unknown().transform(()=>null)]),Rb0=U.array(o90).transform(($)=>$.filter((Y)=>!!Y));U.union([U.object({delta:U.object({reasoning_details:U.array(o90)})}).transform(($)=>$.delta.reasoning_details.filter(Kb0)),U.object({message:U.object({reasoning_details:U.array(o90)})}).transform(($)=>$.message.reasoning_details.filter(Kb0)),U.object({text:U.string(),reasoning_details:U.array(o90)}).transform(($)=>$.reasoning_details.filter(Kb0))]);Q50=U.object({error:U.object({code:U.union([U.string(),U.number()]).nullable().optional().default(null),message:U.string(),type:U.string().nullable().optional().default(null),param:U.any().nullable().optional().default(null)}).passthrough()}).passthrough(),X50=Fn8({errorSchema:Q50,errorToMessage:($)=>$.error.message}),Mn8=U.object({provider:U.string(),reasoning_details:U.array(Mb0).optional(),usage:U.object({promptTokens:U.number(),promptTokensDetails:U.object({cachedTokens:U.number()}).passthrough().optional(),completionTokens:U.number(),completionTokensDetails:U.object({reasoningTokens:U.number()}).passthrough().optional(),totalTokens:U.number(),cost:U.number().optional(),costDetails:U.object({upstreamInferenceCost:U.number()}).passthrough()}).passthrough()}).passthrough(),Rn8=U.object({openrouter:U.object({reasoning_details:U.array(Mb0).optional()}).optional()}).optional();U.union([U.literal("auto"),U.literal("none"),U.literal("required"),U.object({type:U.literal("function"),function:U.object({name:U.string()})})]);wn8=U.object({type:U.literal("image_url"),image_url:U.object({url:U.string()}).passthrough()}).passthrough(),_n8=U.union([wn8,U.unknown().transform(()=>null)]),OY4=U.array(_n8).transform(($)=>$.filter((Y)=>!!Y)),EY4=U.object({id:U.string().optional(),model:U.string().optional(),provider:U.string().optional(),usage:U.object({prompt_tokens:U.number(),prompt_tokens_details:U.object({cached_tokens:U.number()}).passthrough().nullish(),completion_tokens:U.number(),completion_tokens_details:U.object({reasoning_tokens:U.number()}).passthrough().nullish(),total_tokens:U.number(),cost:U.number().optional(),cost_details:U.object({upstream_inference_cost:U.number().nullish()}).passthrough().nullish()}).passthrough().nullish()}).passthrough(),jn8=U.union([EY4.extend({choices:U.array(U.object({message:U.object({role:U.literal("assistant"),content:U.string().nullable().optional(),reasoning:U.string().nullable().optional(),reasoning_details:Rb0.nullish(),images:OY4.nullish(),tool_calls:U.array(U.object({id:U.string().optional().nullable(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()}).passthrough()}).passthrough()).optional(),annotations:U.array(U.union([U.object({type:U.literal("url_citation"),url_citation:U.object({end_index:U.number(),start_index:U.number(),title:U.string(),url:U.string(),content:U.string().optional()}).passthrough()}).passthrough(),U.object({type:U.literal("file_annotation"),file_annotation:U.object({file_id:U.string(),quote:U.string().optional()}).passthrough()}).passthrough(),U.object({type:U.literal("file"),file:U.object({hash:U.string(),name:U.string(),content:U.array(U.object({type:U.string(),text:U.string()}).passthrough()).optional()}).passthrough()}).passthrough()])).nullish()}).passthrough(),index:U.number().nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}).passthrough())}).passthrough()).nullable()}).passthrough().nullable().optional(),finish_reason:U.string().optional().nullable()}).passthrough())}),Q50.extend({user_id:U.string().optional()})]),Tn8=U.union([EY4.extend({choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).optional(),content:U.string().nullish(),reasoning:U.string().nullish().optional(),reasoning_details:Rb0.nullish(),images:OY4.nullish(),tool_calls:U.array(U.object({index:U.number().nullish(),id:U.string().nullish(),type:U.literal("function").optional(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()}).passthrough()}).passthrough()).nullish(),annotations:U.array(U.union([U.object({type:U.literal("url_citation"),url_citation:U.object({end_index:U.number(),start_index:U.number(),title:U.string(),url:U.string(),content:U.string().optional()}).passthrough()}).passthrough(),U.object({type:U.literal("file_annotation"),file_annotation:U.object({file_id:U.string(),quote:U.string().optional()}).passthrough()}).passthrough(),U.object({type:U.literal("file"),file:U.object({hash:U.string(),name:U.string(),content:U.array(U.object({type:U.string(),text:U.string()}).passthrough()).optional()}).passthrough()}).passthrough()])).nullish()}).passthrough().nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}).passthrough())}).passthrough()).nullable()}).passthrough().nullish(),finish_reason:U.string().nullable().optional(),index:U.number().nullish()}).passthrough())}),Q50]);D$4=U.union([U.object({id:U.string().optional(),model:U.string().optional(),choices:U.array(U.object({text:U.string(),reasoning:U.string().nullish().optional(),reasoning_details:Rb0.nullish(),finish_reason:U.string().nullish(),index:U.number().nullish(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullable()}).passthrough().nullable().optional()}).passthrough()),usage:U.object({prompt_tokens:U.number(),prompt_tokens_details:U.object({cached_tokens:U.number()}).passthrough().nullish(),completion_tokens:U.number(),completion_tokens_details:U.object({reasoning_tokens:U.number()}).passthrough().nullish(),total_tokens:U.number(),cost:U.number().optional()}).passthrough().nullish()}).passthrough(),Q50]);Im({compatibility:"strict"});Om={mistral:{url:"https://api.mistral.ai/v1"},groq:{url:"https://api.groq.com/openai/v1"},moonshotai:{url:"https://api.moonshot.ai/anthropic/v1",npm:"@ai-sdk/anthropic"},"moonshotai-cn":{url:"https://api.moonshot.cn/anthropic/v1",npm:"@ai-sdk/anthropic"}},Kj=class extends MD{id="models.dev";name="models.dev";providerConfigs={};constructor($){super();if($)this.providerConfigs=$}async fetchProviders(){let $=await fetch("https://models.dev/api.json");if(!$.ok)throw Error(`Failed to fetch from models.dev: ${$.statusText}`);let Y=await $.json(),X={};for(let[G,J]of Object.entries(Y)){if(R74.includes(G))continue;if(!J||typeof J!=="object"||!J.models)continue;let Q=G,W=J.npm==="@ai-sdk/openai-compatible"||J.npm==="@ai-sdk/gateway"||Q in Om,Z=M74.includes(G),K=J.api&&J.env&&J.env.length>0;if(W||Z||K){let H=Object.entries(J.models).filter(([,F])=>F?.status!=="deprecated").map(([F])=>F).sort(),z=Om[Q]?.url||J.api;if(!Z&&!z)continue;let V=Om[Q]?.apiKeyEnvVar||bn8({envVars:J.env,providerId:Q}),A=!Z?Om[Q]?.apiKeyHeader||"Authorization":void 0;X[Q]={url:z,apiKeyEnvVar:V,apiKeyHeader:A,name:J.name||G.charAt(0).toUpperCase()+G.slice(1),models:H,docUrl:J.doc,gateway:"models.dev",npm:Om[Q]?.npm||(J.npm&&J.npm!=="@ai-sdk/openai-compatible"&&J.npm!=="@ai-sdk/gateway"?J.npm:void 0)}}}return this.providerConfigs=X,X}buildUrl($,Y){let{providerId:X}=Zj($),G=this.providerConfigs[X];if(!G?.url)return;let J=`${X.toUpperCase().replace(/-/g,"_")}_BASE_URL`;return Y?.[J]||process.env[J]||hn8(G.url,Y)}getApiKey($){let[Y,X]=$.split("/");if(!Y||!X)throw Error(`Could not identify provider from model id ${$}`);let G=this.providerConfigs[Y];if(!G)throw Error(`Could not find config for provider ${Y} with model id ${$}`);let J=typeof G.apiKeyEnvVar==="string"?process.env[G.apiKeyEnvVar]:void 0;if(!J)throw Error(`Could not find API key process.env.${G.apiKeyEnvVar} for model id ${$}`);return Promise.resolve(J)}async resolveLanguageModel({modelId:$,providerId:Y,apiKey:X,headers:G}){let J=this.buildUrl(`${Y}/${$}`),Q={"User-Agent":hU,...G};switch(Y){case"openai":return ED({apiKey:X,headers:Q}).responses($);case"gemini":case"google":return Wj({apiKey:X,headers:Q}).chat($);case"anthropic":return UV({apiKey:X,headers:Q})($);case"mistral":return zb0({apiKey:X,headers:Q})($);case"groq":return q$4({apiKey:X,headers:Q})($);case"openrouter":return Im({apiKey:X,headers:Q})($);case"xai":return S$4({apiKey:X,headers:Q})($);case"deepseek":return E$4({apiKey:X,headers:Q})($);case"perplexity":return j$4({apiKey:X,headers:Q})($);case"cerebras":return N$4({apiKey:X,headers:Q})($);case"togetherai":return T$4({apiKey:X,headers:Q})($);case"deepinfra":return L$4({apiKey:X,headers:Q})($);case"vercel":return Xk0({apiKey:X,headers:Q})($);case"moonshotai":case"moonshotai-cn":{if(!J)throw Error(`No API URL found for ${Y}/${$}`);return UV({apiKey:X,baseURL:J,headers:Q})($)}default:{let Z=this.providerConfigs[Y]?.npm;if(Z==="@ai-sdk/anthropic"){if(!J)throw Error(`No API URL found for ${Y}/${$}`);return UV({apiKey:X,baseURL:J,headers:Q})($)}if(Z==="@ai-sdk/openai"){if(!J)throw Error(`No API URL found for ${Y}/${$}`);return ED({apiKey:X,baseURL:J,headers:Q}).chat($)}if(Z==="@ai-sdk/google"){if(!J)throw Error(`No API URL found for ${Y}/${$}`);return Wj({apiKey:X,baseURL:J,headers:Q}).chat($)}if(Z==="@ai-sdk/mistral"){if(!J)throw Error(`No API URL found for ${Y}/${$}`);return zb0({apiKey:X,baseURL:J,headers:Q})($)}if(!J)throw Error(`No API URL found for ${Y}/${$}`);return OD({name:Y,apiKey:X,baseURL:J,headers:Q,supportsStructuredOutputs:!0}).chatModel($)}}}}});var fn8,Z50=()=>fn8.now(),gn8=($)=>!!$&&$===Math.floor($)&&$>0&&isFinite($),qb0=($)=>$===1/0||gn8($),K50;var MY4=V0(()=>{fn8=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;K50=class K50{expirations=Object.create(null);data=new Map;expirationMap=new Map;ttl;max;updateAgeOnGet;updateAgeOnHas;noUpdateTTL;noDisposeOnSet;checkAgeOnGet;checkAgeOnHas;dispose;timer;timerExpiration;immortalKeys=new Set;constructor({max:$=1/0,ttl:Y,updateAgeOnGet:X=!1,checkAgeOnGet:G=!1,updateAgeOnHas:J=!1,checkAgeOnHas:Q=!1,noUpdateTTL:W=!1,dispose:Z,noDisposeOnSet:K=!1}={}){if(Y!==void 0&&!qb0(Y))throw TypeError("ttl must be positive integer or Infinity if set");if(!qb0($))throw TypeError("max must be positive integer or Infinity");if(this.ttl=Y,this.max=$,this.updateAgeOnGet=!!X,this.checkAgeOnGet=!!G,this.updateAgeOnHas=!!J,this.checkAgeOnHas=!!Q,this.noUpdateTTL=!!W,this.noDisposeOnSet=!!K,Z!==void 0){if(typeof Z!=="function")throw TypeError("dispose must be function if set");this.dispose=Z}else this.dispose=(H,z,V)=>{};this.timer=void 0,this.timerExpiration=void 0}setTimer($,Y){if(this.timerExpiration&&this.timerExpiration<$)return;if(this.timer)clearTimeout(this.timer);let X=setTimeout(()=>{this.timer=void 0,this.timerExpiration=void 0,this.purgeStale();for(let G in this.expirations){let J=Number(G);this.setTimer(J,J-Z50());break}},Math.min(2147483647,Math.max(0,Y)));if(X.unref)X.unref();this.timerExpiration=$,this.timer=X}cancelTimer(){if(this.timer)clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0}cancelTimers(){return process.emitWarning('TTLCache.cancelTimers has been renamed to TTLCache.cancelTimer (no "s"), and will be removed in the next major version update'),this.cancelTimer()}clear(){let $=this.dispose!==K50.prototype.dispose?[...this]:[];this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null);for(let[Y,X]of $)this.dispose(X,Y,"delete")}setTTL($,Y=this.ttl){let X=this.expirationMap.get($);if(X!==void 0){let G=this.expirations[X];if(!G||G.length<=1)delete this.expirations[X];else this.expirations[X]=G.filter((J)=>J!==$)}if(Y&&Y!==1/0){this.immortalKeys.delete($);let G=Math.floor(Z50()+Y);if(this.expirationMap.set($,G),!this.expirations[G])this.expirations[G]=[],this.setTimer(G,Y);this.expirations[G].push($)}else this.immortalKeys.add($),this.expirationMap.set($,1/0)}set($,Y,{ttl:X=this.ttl,noUpdateTTL:G=this.noUpdateTTL,noDisposeOnSet:J=this.noDisposeOnSet}={}){if(!qb0(X))throw TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has($)){if(!G)this.setTTL($,X);let Q=this.data.get($),W=!J&&this.data.has($);if(Q!==Y){if(this.data.set($,Y),W)this.dispose(Q,$,"set")}}else this.setTTL($,X),this.data.set($,Y);while(this.size>this.max)this.purgeToCapacity();return this}has($,{checkAgeOnHas:Y=this.checkAgeOnHas,ttl:X=this.ttl,updateAgeOnHas:G=this.updateAgeOnHas}={}){if(this.data.has($)){if(Y&&this.getRemainingTTL($)===0)return this.delete($),!1;if(G)this.setTTL($,X);return!0}return!1}getRemainingTTL($){let Y=this.expirationMap.get($);return Y===1/0?Y:Y!==void 0?Math.max(0,Math.ceil(Y-Z50())):0}get($,{updateAgeOnGet:Y=this.updateAgeOnGet,ttl:X=this.ttl,checkAgeOnGet:G=this.checkAgeOnGet}={}){let J=this.data.get($);if(G&&this.getRemainingTTL($)===0){this.delete($);return}if(Y)this.setTTL($,X);return J}delete($){let Y=this.expirationMap.get($);if(Y!==void 0){let X=this.data.get($);this.data.delete($),this.expirationMap.delete($),this.immortalKeys.delete($);let G=this.expirations[Y];if(G)if(G.length<=1)delete this.expirations[Y];else this.expirations[Y]=G.filter((J)=>J!==$);if(this.dispose(X,$,"delete"),this.size===0)this.cancelTimer();return!0}return!1}purgeToCapacity(){for(let $ in this.expirations){let Y=this.expirations[$];if(this.size-Y.length>=this.max){delete this.expirations[$];let X=[];for(let G of Y)X.push([G,this.data.get(G)]),this.data.delete(G),this.expirationMap.delete(G);for(let[G,J]of X)this.dispose(J,G,"evict")}else{let X=this.size-this.max,G=[];for(let J of Y.splice(0,X))G.push([J,this.data.get(J)]),this.data.delete(J),this.expirationMap.delete(J);for(let[J,Q]of G)this.dispose(Q,J,"evict");return}}}get size(){return this.data.size}purgeStale(){let $=Math.ceil(Z50());for(let Y in this.expirations){if(Y==="Infinity"||Number(Y)>$)return;let X=[...this.expirations[Y]||[]],G=[];delete this.expirations[Y];for(let J of X)G.push([J,this.data.get(J)]),this.data.delete(J),this.expirationMap.delete(J);for(let[J,Q]of G)this.dispose(Q,J,"stale")}if(this.size===0)this.cancelTimer()}*entries(){for(let $ in this.expirations)for(let Y of this.expirations[$])yield[Y,this.data.get(Y)];for(let $ of this.immortalKeys)yield[$,this.data.get($)]}*keys(){for(let $ in this.expirations)for(let Y of this.expirations[$])yield Y;for(let $ of this.immortalKeys)yield $}*values(){for(let $ in this.expirations)for(let Y of this.expirations[$])yield this.data.get(Y);for(let $ of this.immortalKeys)yield this.data.get($)}[Symbol.iterator](){return this.entries()}}});var mn8,U50;var Ib0=V0(()=>{dZ();MY4();mn8=class extends u8{constructor({name:$}){super({component:"SERVER_CACHE",name:$})}},U50=class extends mn8{cache;ttlMs;constructor($={}){super({name:"InMemoryServerCache"});this.ttlMs=$.ttlMs??300000;let Y=this.ttlMs>0?this.ttlMs:1/0;this.cache=new K50({max:$.maxSize??1000,ttl:Y})}async get($){return this.cache.get($)}async set($,Y,X){if(X===void 0){this.cache.set($,Y);return}this.cache.set($,Y,{ttl:X>0?X:1/0})}async listLength($){let Y=this.cache.get($);if(Y===void 0)return 0;if(!Array.isArray(Y))throw Error(`${$} exists but is not an array`);return Y.length}async listPush($,Y){let X=this.cache.get($);if(Array.isArray(X)){if(X.push(Y),this.ttlMs>0)this.cache.set($,X,{ttl:this.ttlMs})}else if(X!==void 0)throw Error(`${$} exists but is not an array`);else this.cache.set($,[Y])}async listFromTo($,Y,X=-1){let G=this.cache.get($);if(Array.isArray(G)){let J=X===-1?void 0:X+1;return G.slice(Y,J)}return[]}async delete($){this.cache.delete($)}async clear(){this.cache.clear()}async increment($){let Y=this.cache.get($),X;if(Y===void 0)X=1;else if(typeof Y==="number")X=Y+1;else throw Error(`${$} exists but is not a number`);return this.cache.set($,X),X}}});var Uj;var H50=V0(()=>{Lm();Ib0();EW();Uj=class extends MD{id="netlify";name="Netlify AI Gateway";tokenCache=new U50;async fetchProviders(){let $=await fetch("https://api.netlify.com/api/v1/ai-gateway/providers");if(!$.ok)throw Error(`Failed to fetch from Netlify: ${$.statusText}`);let Y=await $.json(),X={apiKeyEnvVar:["NETLIFY_TOKEN","NETLIFY_SITE_ID"],apiKeyHeader:"Authorization",name:"Netlify",gateway:"netlify",models:[],docUrl:"https://docs.netlify.com/build/ai-gateway/overview/"};for(let[G,J]of Object.entries(Y.providers))for(let Q of J.models)X.models.push(`${G}/${Q}`);return{netlify:X}}async buildUrl($,Y){let X=Y?.NETLIFY_SITE_ID||process.env.NETLIFY_SITE_ID,G=Y?.NETLIFY_TOKEN||process.env.NETLIFY_TOKEN;if(!G)throw new G0({id:"NETLIFY_GATEWAY_NO_TOKEN",domain:"LLM",category:"UNKNOWN",text:`Missing NETLIFY_TOKEN environment variable required for model: ${$}`});if(!X)throw new G0({id:"NETLIFY_GATEWAY_NO_SITE_ID",domain:"LLM",category:"UNKNOWN",text:`Missing NETLIFY_SITE_ID environment variable required for model: ${$}`});try{let J=await this.getOrFetchToken(X,G);return J.url.endsWith("/")?J.url.substring(0,J.url.length-1):J.url}catch(J){throw new G0({id:"NETLIFY_GATEWAY_TOKEN_ERROR",domain:"LLM",category:"UNKNOWN",text:`Failed to get Netlify AI Gateway token for model ${$}: ${J instanceof Error?J.message:String(J)}`})}}async getOrFetchToken($,Y){let X=`netlify-token:${$}:${Y}`,G=await this.tokenCache.get(X);if(G&&G.expiresAt>Date.now()/1000+60)return{token:G.token,url:G.url};let J=await fetch(`https://api.netlify.com/api/v1/sites/${$}/ai-gateway/token`,{method:"GET",headers:{Authorization:`Bearer ${Y}`}});if(!J.ok){let W=await J.text();throw Error(`Failed to get Netlify AI Gateway token: ${J.status} ${W}`)}let Q=await J.json();return await this.tokenCache.set(X,{token:Q.token,url:Q.url,expiresAt:Q.expires_at}),{token:Q.token,url:Q.url}}async getApiKey($){let Y=process.env.NETLIFY_SITE_ID,X=process.env.NETLIFY_TOKEN;if(!X)throw new G0({id:"NETLIFY_GATEWAY_NO_TOKEN",domain:"LLM",category:"UNKNOWN",text:`Missing NETLIFY_TOKEN environment variable required for model: ${$}`});if(!Y)throw new G0({id:"NETLIFY_GATEWAY_NO_SITE_ID",domain:"LLM",category:"UNKNOWN",text:`Missing NETLIFY_SITE_ID environment variable required for model: ${$}`});try{return(await this.getOrFetchToken(Y,X)).token}catch(G){throw new G0({id:"NETLIFY_GATEWAY_TOKEN_ERROR",domain:"LLM",category:"UNKNOWN",text:`Failed to get Netlify AI Gateway token for model ${$}: ${G instanceof Error?G.message:String(G)}`})}}async resolveLanguageModel({modelId:$,providerId:Y,apiKey:X,headers:G}){let J=await this.buildUrl(`${Y}/${$}`),Q={"User-Agent":hU,...G};switch(Y){case"openai":return ED({apiKey:X,baseURL:J,headers:Q}).responses($);case"gemini":return Wj({baseURL:`${J}/v1beta/`,apiKey:X,headers:{"user-agent":"google-genai-sdk/",...Q}}).chat($);case"anthropic":return UV({apiKey:X,baseURL:`${J}/v1/`,headers:{"anthropic-version":"2023-06-01",...Q}})($);default:return OD({name:Y,apiKey:X,baseURL:J,headers:Q,supportsStructuredOutputs:!0}).chatModel($)}}}});var RY4={};W8(RY4,{ModelsDevGateway:()=>Kj});var qY4=V0(()=>{W50()});var IY4={};W8(IY4,{NetlifyGateway:()=>Uj});var PY4=V0(()=>{H50()});var wY4={};W8(wY4,{MastraGateway:()=>Pm});var _Y4=V0(()=>{Pb0()});var CY4={};W8(CY4,{writeRegistryFiles:()=>pn8,generateTypesContent:()=>TY4,fetchProvidersFromGateways:()=>un8,atomicWriteFile:()=>wb0});import wm from"fs/promises";import jY4 from"path";async function wb0($,Y,X="utf-8"){let G=Math.random().toString(36).substring(2,15),J=`${$}.${process.pid}.${Date.now()}.${G}.tmp`;try{await wm.writeFile(J,Y,X),await wm.rename(J,$)}catch(Q){try{await wm.unlink(J)}catch{}throw Q}}async function un8($){let Y=[];for(let Q of $)if(await Q.shouldEnable())Y.push(Q);let X={},G={},J=3;for(let Q of Y){let W=null;for(let Z=1;Z<=J;Z++)try{let K=await Q.fetchProviders(),H=Q.id==="models.dev";for(let[z,V]of Object.entries(K)){let A=H?z:z===Q.id?Q.id:`${Q.id}/${z}`;X[A]=V,G[A]=V.models.sort()}W=null;break}catch(K){if(W=K instanceof Error?K:Error(String(K)),Z<J){let H=Math.min(1000*Math.pow(2,Z-1),5000);await new Promise((z)=>setTimeout(z,H))}}if(W)throw W}return{providers:X,models:G}}function TY4($){return`/**
 * THIS FILE IS AUTO-GENERATED - DO NOT EDIT
 * Generated from model gateway providers
 */

/**
 * Provider models mapping type
 * This is derived from the JSON data and provides type-safe access
 */
export type ProviderModelsMap = {
${Object.entries($).map(([X,G])=>{let J=G.map((K)=>`'${K}'`),W=!/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(X)?`'${X}'`:X,Z=`  readonly ${W}: readonly [${J.join(", ")}];`;if(Z.length>120){let K=G.map((H)=>`    '${H}',`).join(`
`);return`  readonly ${W}: readonly [
${K}
  ];`}return Z}).join(`
`)}
};

/**
 * Union type of all registered provider IDs
 */
export type Provider = keyof ProviderModelsMap;

/**
 * Provider models mapping interface
 */
export interface ProviderModels {
  [key: string]: string[];
}

/**
 * OpenAI-compatible model ID type
 * Dynamically derived from ProviderModelsMap
 * Full provider/model paths (e.g., "openai/gpt-4o", "anthropic/claude-3-5-sonnet-20241022")
 */
export type ModelRouterModelId =
  | {
      [P in Provider]: \`\${P}/\${ProviderModelsMap[P][number]}\`;
    }[Provider]
  | \`mastra/\${ProviderModelsMap['openrouter'][number]}\`
  | (string & {});

/**
 * Extract the model part from a ModelRouterModelId for a specific provider
 * Dynamically derived from ProviderModelsMap
 * Example: ModelForProvider<'openai'> = 'gpt-4o' | 'gpt-4-turbo' | ...
 */
export type ModelForProvider<P extends Provider> = ProviderModelsMap[P][number];
`}async function pn8($,Y,X,G){let J=jY4.dirname($),Q=jY4.dirname(Y);await wm.mkdir(J,{recursive:!0}),await wm.mkdir(Q,{recursive:!0}),await wb0($,JSON.stringify({providers:X,models:G,version:"1.0.0"},null,2),"utf-8");let Z=TY4(G);await wb0(Y,Z,"utf-8")}var SY4=()=>{};import $7 from"fs";import{createRequire as dn8}from"module";import cn8 from"os";import qX from"path";function jb0(){let $=process.env.MASTRA_OFFLINE;return $==="true"||$==="1"}function ln8($){let Y=new Set;for(let X of $)if(X.shouldEnable())Y.add(X.id);return Y}function z50($,Y){let X=Object.fromEntries(Object.entries($.providers).filter(([,J])=>Y.has(J.gateway))),G=Object.fromEntries(Object.entries($.models).filter(([J])=>(J in X)));return{...$,providers:X,models:G}}function kY4($,Y,X="utf-8"){let G=Math.random().toString(36).substring(2,15),J=`${$}.${process.pid}.${Date.now()}.${G}.tmp`;try{$7.writeFileSync(J,Y,X),$7.renameSync(J,$)}catch(Q){try{$7.unlinkSync(J)}catch{}throw Q}}function in8(){try{let $=$7.existsSync(A50()),Y=$7.existsSync(F50());if(!$&&!Y)return;let X=Cb0(),G=qX.join(X,"dist","provider-registry.json"),J=qX.join(X,"dist","llm","model","provider-types.generated.d.ts");if($7.mkdirSync(qX.dirname(G),{recursive:!0}),$7.mkdirSync(qX.dirname(J),{recursive:!0}),$){let Q=$7.readFileSync(A50(),"utf-8");try{JSON.parse(Q)}catch{try{$7.unlinkSync(A50())}catch{}return}let W=!0;if($7.existsSync(G)){let Z=$7.readFileSync(G,"utf-8");W=Q!==Z}if(W)kY4(G,Q,"utf-8")}if(Y){let Q=$7.readFileSync(F50(),"utf-8");if(/readonly\s+\d/.test(Q))try{$7.unlinkSync(F50())}catch{}else{let W=!0;if($7.existsSync(J)){let Z=$7.readFileSync(J,"utf-8");W=Q!==Z}if(W)kY4(J,Q,"utf-8")}}}catch{}}function vY4(){try{if(!$7.existsSync(Tb0()))return null;let $=$7.readFileSync(Tb0(),"utf-8").trim();return new Date(parseInt($,10))}catch($){return console.warn("[GatewayRegistry] Failed to read cache file:",$),D50=!0,null}}function nn8($){try{if(!$7.existsSync(Hj()))$7.mkdirSync(Hj(),{recursive:!0});$7.writeFileSync(Tb0(),$.getTime().toString(),"utf-8")}catch(Y){D50=!0,console.warn("[GatewayRegistry] Failed to write cache file:",Y)}}function Cb0(){try{let Y=dn8(import.meta.url||"file://").resolve("@mastra/core/package.json");return qX.dirname(Y)}catch{return process.cwd()}}function V50($,Y=[]){let X=ln8([new Kj({}),new Uj,new Pm,...Y]);if(!$)return z50(_b0,X);if(in8(),HV)return HV;let G=Cb0(),J=[qX.join(G,"dist","provider-registry.json"),qX.join(G,"src","llm","model","provider-registry.json"),qX.join(process.cwd(),"packages/core/src/llm/model/provider-registry.json"),qX.join(process.cwd(),"src/llm/model/provider-registry.json")],Q=[];for(let W of J)try{let Z=$7.readFileSync(W,"utf-8"),K=JSON.parse(Z);return HV=z50(K,X),HV}catch(Z){let K=Z instanceof Error?Z.message:String(Z);Q.push(`${W}: ${K}`);let H=Z instanceof Error&&"code"in Z&&Z.code==="ENOENT",z=Z instanceof SyntaxError;if(!H&&z){console.warn(`[GatewayRegistry] Detected corrupted provider-registry.json at ${W}. Deleting corrupted file and falling back to static registry.`);try{$7.unlinkSync(W)}catch{}return HV=z50(_b0,X),HV}continue}return console.warn(`[GatewayRegistry] Could not load provider registry from any path. Falling back to static registry.
Tried paths:
${Q.join(`
`)}`),HV=z50(_b0,X),HV}var Pm,_b0,HV=null,Hj=()=>qX.join(cn8.homedir(),".cache","mastra"),Tb0=()=>qX.join(Hj(),"gateway-refresh-time"),A50=()=>qX.join(Hj(),"provider-registry.json"),F50=()=>qX.join(Hj(),"provider-types.generated.d.ts"),D50=!1,Sb0,X67,$3=class ${static instance=null;lastRefreshTime=null;refreshInterval=null;isRefreshing=!1;useDynamicLoading;customGateways=[];constructor(Y={}){let X=process.env.MASTRA_DEV==="true"||process.env.MASTRA_DEV==="1";this.useDynamicLoading=Y.useDynamicLoading??X}static getInstance(Y){if(!$.instance)return $.instance=new $(Y),$.instance;if(Y?.useDynamicLoading===!0)$.instance.useDynamicLoading=!0;return $.instance}registerCustomGateways(Y){this.customGateways=Y}getCustomGateways(){return this.customGateways}async syncGateways(Y=!1,X=!1){if(!this.useDynamicLoading&&!X)return;if(jb0())return;if(this.isRefreshing&&!Y)return;this.isRefreshing=!0;try{let{ModelsDevGateway:G}=await Promise.resolve().then(() => (qY4(),RY4)),{NetlifyGateway:J}=await Promise.resolve().then(() => (PY4(),IY4)),{MastraGateway:Q}=await Promise.resolve().then(() => (_Y4(),wY4)),{fetchProvidersFromGateways:W,writeRegistryFiles:Z}=await Promise.resolve().then(() => (SY4(),CY4)),H=[...[new G({}),new J,...X?[]:[new Q]],...this.customGateways],{providers:z,models:V}=await W(H),A=Cb0();try{$7.mkdirSync(Hj(),{recursive:!0}),await Z(A50(),F50(),z,V)}catch(L){console.warn("[GatewayRegistry] Failed to write to global cache:",L)}let F=qX.join(A,"dist","provider-registry.json"),N=qX.join(A,"dist","llm","model","provider-types.generated.d.ts");if(await Z(F,N,z,V),X){let L=qX.join(A,"src","llm","model","provider-registry.json"),B=qX.join(A,"src","llm","model","provider-types.generated.d.ts");await $7.promises.copyFile(F,L),await $7.promises.copyFile(N,B)}if(this.useDynamicLoading)HV=null;this.lastRefreshTime=new Date,nn8(this.lastRefreshTime)}catch(G){throw console.error("[GatewayRegistry] \u274C Gateway sync failed:",G),G}finally{this.isRefreshing=!1}}getLastRefreshTime(){return this.lastRefreshTime||vY4()}startAutoRefresh(Y=3600000){if(!this.useDynamicLoading)return;if(jb0())return;if(this.refreshInterval)return;let X=vY4(),G=Date.now();if(!D50&&(!X||G-X.getTime()>Y))this.syncGateways().catch((Q)=>{console.error("[GatewayRegistry] Initial auto-refresh failed:",Q)});if(this.refreshInterval=setInterval(()=>{if(D50&&this.refreshInterval){clearInterval(this.refreshInterval),this.refreshInterval=null;return}this.syncGateways().catch((Q)=>{console.error("[GatewayRegistry] Auto-refresh failed:",Q)})},Y),this.refreshInterval.unref)this.refreshInterval.unref()}stopAutoRefresh(){if(this.refreshInterval)clearInterval(this.refreshInterval),this.refreshInterval=null}getProviderConfig(Y){return V50(this.useDynamicLoading,this.customGateways).providers[Y]}isProviderRegistered(Y){let X=V50(this.useDynamicLoading,this.customGateways);return Y in X.providers}getProviders(){return V50(this.useDynamicLoading,this.customGateways).providers}getModels(){return V50(this.useDynamicLoading,this.customGateways).models}},xY4,rn8;var Pb0=V0(()=>{W50();H50();Lm();EW();Pm=class extends MD{constructor($){super();this.config=$}config;id="mastra";name="Memory Gateway";getBaseUrl(){return(this.config?.baseUrl??process.env.MASTRA_GATEWAY_URL??"https://gateway-api.mastra.ai").replace(/\/+$/,"").replace(/\/v1$/,"")}shouldEnable(){return!!(this.config?.apiKey??process.env.MASTRA_GATEWAY_API_KEY)}async fetchProviders(){if(!this.shouldEnable())return{};return{mastra:{apiKeyEnvVar:"MASTRA_GATEWAY_API_KEY",apiKeyHeader:"Authorization",name:"Memory Gateway",gateway:"mastra",models:[...Sb0.openrouter?.models??[]],docUrl:"https://mastra.ai/docs/gateway"}}}async buildUrl($){return`${this.getBaseUrl()}/v1`}async getApiKey(){let $=this.config?.apiKey??process.env.MASTRA_GATEWAY_API_KEY;if(!$)throw new G0({id:"MASTRA_GATEWAY_NO_API_KEY",domain:"LLM",category:"UNKNOWN",text:"Missing MASTRA_GATEWAY_API_KEY environment variable"});return $}resolveLanguageModel({modelId:$,providerId:Y,apiKey:X,headers:G}){let J=`${this.getBaseUrl()}/v1`,Q=`${Y}/${$}`;if(this.config?.customFetch&&Y==="anthropic")return UV({apiKey:"oauth-gateway-placeholder",baseURL:J,headers:{"User-Agent":hU,[Yb0]:`Bearer ${X}`,...G},fetch:this.config.customFetch})($);if(this.config?.customFetch)return Im({apiKey:"oauth-gateway-placeholder",baseURL:J,headers:{"User-Agent":hU,[Yb0]:`Bearer ${X}`,...G},fetch:this.config.customFetch}).chat(Q);return Im({apiKey:X,baseURL:J,headers:{"User-Agent":hU,...G}}).chat(Q)}},_b0={providers:{"302ai":{url:"https://api.302.ai/v1",apiKeyEnvVar:"302AI_API_KEY",apiKeyHeader:"Authorization",name:"302.AI",models:["MiniMax-M1","MiniMax-M2","MiniMax-M2.1","MiniMax-M2.7","MiniMax-M2.7-highspeed","chatgpt-4o-latest","claude-3-5-haiku-20241022","claude-3-5-haiku-latest","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-1-20250805-thinking","claude-opus-4-20250514","claude-opus-4-5","claude-opus-4-5-20251101","claude-opus-4-5-20251101-thinking","claude-opus-4-6","claude-opus-4-6-thinking","claude-opus-4-7","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929-thinking","claude-sonnet-4-6","claude-sonnet-4-6-thinking","deepseek-chat","deepseek-reasoner","deepseek-v3.2","deepseek-v3.2-thinking","doubao-seed-1-6-thinking-250715","doubao-seed-1-6-vision-250815","doubao-seed-1-8-251215","doubao-seed-code-preview-251028","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-nothink","gemini-2.5-flash-preview-09-2025","gemini-2.5-pro","gemini-3-flash-preview","gemini-3-pro-image-preview","gemini-3-pro-preview","gemini-3.1-flash-image-preview","glm-4.5","glm-4.5-air","glm-4.5-airx","glm-4.5-x","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flashx","glm-5","glm-5-turbo","glm-5.1","glm-5v-turbo","glm-for-coding","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-5","gpt-5-mini","gpt-5-pro","gpt-5-thinking","gpt-5.1","gpt-5.1-chat-latest","gpt-5.2","gpt-5.2-chat-latest","gpt-5.4","gpt-5.4-mini","gpt-5.4-mini-2026-03-17","gpt-5.4-nano","gpt-5.4-nano-2026-03-17","gpt-5.4-pro","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-4.1","grok-4.20-beta-0309-non-reasoning","grok-4.20-beta-0309-reasoning","grok-4.20-multi-agent-beta-0309","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","ministral-14b-2512","mistral-large-2512","qwen-flash","qwen-max-latest","qwen-plus","qwen3-235b-a22b","qwen3-235b-a22b-instruct-2507","qwen3-30b-a3b","qwen3-coder-480b-a35b-instruct","qwen3-max-2025-09-23"],docUrl:"https://doc.302.ai",gateway:"models.dev"},alibaba:{url:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",apiKeyEnvVar:"DASHSCOPE_API_KEY",apiKeyHeader:"Authorization",name:"Alibaba",models:["qvq-max","qwen-flash","qwen-max","qwen-mt-plus","qwen-mt-turbo","qwen-omni-turbo","qwen-omni-turbo-realtime","qwen-plus","qwen-plus-character-ja","qwen-turbo","qwen-vl-max","qwen-vl-ocr","qwen-vl-plus","qwen2-5-14b-instruct","qwen2-5-32b-instruct","qwen2-5-72b-instruct","qwen2-5-7b-instruct","qwen2-5-omni-7b","qwen2-5-vl-72b-instruct","qwen2-5-vl-7b-instruct","qwen3-14b","qwen3-235b-a22b","qwen3-32b","qwen3-8b","qwen3-asr-flash","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-plus","qwen3-livetranslate-flash-realtime","qwen3-max","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-omni-flash","qwen3-omni-flash-realtime","qwen3-vl-235b-a22b","qwen3-vl-30b-a3b","qwen3-vl-plus","qwen3.5-122b-a10b","qwen3.5-27b","qwen3.5-35b-a3b","qwen3.5-397b-a17b","qwen3.5-plus","qwen3.6-27b","qwen3.6-35b-a3b","qwen3.6-max-preview","qwen3.6-plus","qwq-plus"],docUrl:"https://www.alibabacloud.com/help/en/model-studio/models",gateway:"models.dev"},scaleway:{url:"https://api.scaleway.ai/v1",apiKeyEnvVar:"SCALEWAY_API_KEY",apiKeyHeader:"Authorization",name:"Scaleway",models:["bge-multilingual-gemma2","deepseek-r1-distill-llama-70b","devstral-2-123b-instruct-2512","gemma-3-27b-it","gpt-oss-120b","llama-3.1-8b-instruct","llama-3.3-70b-instruct","mistral-nemo-instruct-2407","mistral-small-3.2-24b-instruct-2506","pixtral-12b-2409","qwen3-235b-a22b-instruct-2507","qwen3-coder-30b-a3b-instruct","qwen3-embedding-8b","qwen3.5-397b-a17b","voxtral-small-24b-2507","whisper-large-v3"],docUrl:"https://www.scaleway.com/en/docs/generative-apis/",gateway:"models.dev"},"nano-gpt":{url:"https://nano-gpt.com/api/v1",apiKeyEnvVar:"NANO_GPT_API_KEY",apiKeyHeader:"Authorization",name:"NanoGPT",models:["Alibaba-NLP/Tongyi-DeepResearch-30B-A3B","Baichuan-M2","Baichuan4-Air","Baichuan4-Turbo","CrucibleLab/L3.3-70B-Loki-V2.0","Doctor-Shotgun/MS3.2-24B-Magnum-Diamond","EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.0","EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.1","EVA-UNIT-01/EVA-Qwen2.5-32B-v0.2","EVA-UNIT-01/EVA-Qwen2.5-72B-v0.2","Envoid/Llama-3.05-NT-Storybreaker-Ministral-70B","Envoid/Llama-3.05-Nemotron-Tenyxchat-Storybreaker-70B","GLM-4.5-Air-Derestricted","GLM-4.5-Air-Derestricted-Iceblink","GLM-4.5-Air-Derestricted-Iceblink-ReExtract","GLM-4.5-Air-Derestricted-Iceblink-v2","GLM-4.5-Air-Derestricted-Iceblink-v2-ReExtract","GLM-4.5-Air-Derestricted-Steam","GLM-4.5-Air-Derestricted-Steam-ReExtract","GLM-4.6-Derestricted-v5","GalrionSoftworks/MN-LooseCannon-12B-v1","Gemma-3-27B-ArliAI-RPMax-v3","Gemma-3-27B-Big-Tiger-v3","Gemma-3-27B-CardProjector-v4","Gemma-3-27B-Glitter","Gemma-3-27B-Nidum-Uncensored","Gemma-3-27B-it","Gemma-3-27B-it-Abliterated","Gryphe/MythoMax-L2-13b","Infermatic/MN-12B-Inferor-v0.0","KAT-Coder-Air-V1","KAT-Coder-Exp-72B-1010","KAT-Coder-Pro-V1","LLM360/K2-Think","LatitudeGames/Wayfarer-Large-70B-Llama-3.3","Llama-3.3+(3.1v3.3)-70B-Hanami-x1","Llama-3.3+(3.1v3.3)-70B-New-Dawn-v1.1","Llama-3.3+(3v3.3)-70B-TenyxChat-DaybreakStorywriter","Llama-3.3-70B-Anthrobomination","Llama-3.3-70B-Argunaut-1-SFT","Llama-3.3-70B-ArliAI-RPMax-v1.4","Llama-3.3-70B-ArliAI-RPMax-v2","Llama-3.3-70B-ArliAI-RPMax-v3","Llama-3.3-70B-Aurora-Borealis","Llama-3.3-70B-Bigger-Body","Llama-3.3-70B-Cirrus-x1","Llama-3.3-70B-Cu-Mai-R1","Llama-3.3-70B-Damascus-R1","Llama-3.3-70B-Dark-Ages-v0.1","Llama-3.3-70B-Electra-R1","Llama-3.3-70B-Electranova-v1.0","Llama-3.3-70B-Fallen-R1-v1","Llama-3.3-70B-Fallen-v1","Llama-3.3-70B-Forgotten-Abomination-v5.0","Llama-3.3-70B-Forgotten-Safeword-3.6","Llama-3.3-70B-GeneticLemonade-Opus","Llama-3.3-70B-GeneticLemonade-Unleashed-v3","Llama-3.3-70B-Ignition-v0.1","Llama-3.3-70B-Incandescent-Malevolence","Llama-3.3-70B-Legion-V2.1","Llama-3.3-70B-MS-Nevoria","Llama-3.3-70B-Magnum-v4-SE","Llama-3.3-70B-Magnum-v4-SE-Cirrus-x1-SLERP","Llama-3.3-70B-Mhnnn-x1","Llama-3.3-70B-MiraiFanfare","Llama-3.3-70B-Mokume-Gane-R1","Llama-3.3-70B-Nova","Llama-3.3-70B-Predatorial-Extasy","Llama-3.3-70B-Progenitor-V3.3","Llama-3.3-70B-RAWMAW","Llama-3.3-70B-Sapphira-0.1","Llama-3.3-70B-Sapphira-0.2","Llama-3.3-70B-Shakudo","Llama-3.3-70B-StrawberryLemonade-v1.0","Llama-3.3-70B-Strawberrylemonade-v1.2","Llama-3.3-70B-The-Omega-Directive-Unslop-v2.0","Llama-3.3-70B-The-Omega-Directive-Unslop-v2.1","Llama-3.3-70B-Vulpecula-R1","Magistral-Small-2506","MarinaraSpaghetti/NemoMix-Unleashed-12B","Meta-Llama-3-1-8B-Instruct-FP8","MiniMax-M1","MiniMax-M2","MiniMaxAI/MiniMax-M1-80k","Mistral-Nemo-12B-Instruct-2407","NeverSleep/Llama-3-Lumimaid-70B-v0.1","NeverSleep/Lumimaid-v0.2-70B","NousResearch 2/DeepHermes-3-Mistral-24B-Preview","NousResearch 2/Hermes-4-70B:thinking","NousResearch 2/hermes-3-llama-3.1-70b","NousResearch 2/hermes-4-405b","NousResearch 2/hermes-4-405b:thinking","NousResearch 2/hermes-4-70b","QwQ-32B-ArliAI-RpR-v1","Qwen2.5-32B-EVA-v0.2","ReadyArt/MS3.2-The-Omega-Directive-24B-Unslop-v2.0","ReadyArt/The-Omega-Abomination-L-70B-v1.0","Salesforce/Llama-xLAM-2-70b-fc-r","Sao10K/L3-8B-Stheno-v3.2","Sao10K/L3.1-70B-Euryale-v2.2","Sao10K/L3.1-70B-Hanami-x1","Sao10K/L3.3-70B-Euryale-v2.3","Steelskull/L3.3-Cu-Mai-R1-70b","Steelskull/L3.3-Electra-R1-70b","Steelskull/L3.3-MS-Evalebis-70b","Steelskull/L3.3-MS-Evayale-70B","Steelskull/L3.3-MS-Nevoria-70b","Steelskull/L3.3-Nevoria-R1-70b","TEE/deepseek-r1-0528","TEE/deepseek-v3.1","TEE/deepseek-v3.2","TEE/gemma-3-27b-it","TEE/glm-4.6","TEE/glm-4.7","TEE/glm-4.7-flash","TEE/glm-5","TEE/gpt-oss-120b","TEE/gpt-oss-20b","TEE/kimi-k2-thinking","TEE/kimi-k2.5","TEE/kimi-k2.5-thinking","TEE/llama3-3-70b","TEE/minimax-m2.1","TEE/qwen2.5-vl-72b-instruct","TEE/qwen3-30b-a3b-instruct-2507","TEE/qwen3-coder","TEE/qwen3.5-397b-a17b","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","THUDM/GLM-Z1-Rumination-32B-0414","TheDrummer 2/Anubis-70B-v1","TheDrummer 2/Anubis-70B-v1.1","TheDrummer 2/Cydonia-24B-v2","TheDrummer 2/Cydonia-24B-v4","TheDrummer 2/Cydonia-24B-v4.1","TheDrummer 2/Cydonia-24B-v4.3","TheDrummer 2/Magidonia-24B-v4.3","TheDrummer 2/Rocinante-12B-v1.1","TheDrummer 2/UnslopNemo-12B-v4.1","TheDrummer 2/skyfall-36b-v2","Tongyi-Zhiwen/QwenLong-L1-32B","VongolaChouko/Starcannon-Unleashed-12B-v1.0","abacusai/Dracarys-72B-Instruct","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-rp-llama-3.1-8b","alibaba/qwen3.6-flash","allenai/molmo-2-8b","allenai/olmo-3-32b-think","allenai/olmo-3.1-32b-instruct","allenai/olmo-3.1-32b-think","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-pro-v1","anthracite-org/magnum-v2-72b","anthracite-org/magnum-v4-72b","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6:thinking","anthropic/claude-opus-4.6:thinking:low","anthropic/claude-opus-4.6:thinking:max","anthropic/claude-opus-4.6:thinking:medium","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4.6:thinking","arcee-ai/trinity-large","arcee-ai/trinity-mini","asi1-mini","auto-model","auto-model-basic","auto-model-premium","auto-model-standard","azure-gpt-4-turbo","azure-gpt-4o","azure-gpt-4o-mini","azure-o1","azure-o3-mini","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baseten/Kimi-K2-Instruct-FP4","brave","brave-pro","brave-research","chroma","chutesai/Mistral-Small-3.2-24B-Instruct-2506","claude-3-5-haiku-20241022","claude-3-5-sonnet-20240620","claude-3-5-sonnet-20241022","claude-3-7-sonnet-20250219","claude-3-7-sonnet-reasoner","claude-3-7-sonnet-thinking","claude-3-7-sonnet-thinking:1024","claude-3-7-sonnet-thinking:128000","claude-3-7-sonnet-thinking:32768","claude-3-7-sonnet-thinking:8192","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-1-thinking","claude-opus-4-1-thinking:1024","claude-opus-4-1-thinking:32000","claude-opus-4-1-thinking:32768","claude-opus-4-1-thinking:8192","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-5-20251101:thinking","claude-opus-4-thinking","claude-opus-4-thinking:1024","claude-opus-4-thinking:32000","claude-opus-4-thinking:32768","claude-opus-4-thinking:8192","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929-thinking","claude-sonnet-4-thinking","claude-sonnet-4-thinking:1024","claude-sonnet-4-thinking:32768","claude-sonnet-4-thinking:64000","claude-sonnet-4-thinking:8192","cognitivecomputations/dolphin-2.9.2-qwen2-72b","cohere/command-r","cohere/command-r-plus-08-2024","command-a-reasoning-08-2025","deepclaude","deepcogito/cogito-v1-preview-qwen-32B","deepcogito/cogito-v2.1-671b","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.1-Terminus:thinking","deepseek-ai/DeepSeek-V3.1:thinking","deepseek-ai/deepseek-v3.2-exp","deepseek-ai/deepseek-v3.2-exp-thinking","deepseek-chat","deepseek-chat-cheaper","deepseek-math-v2","deepseek-r1","deepseek-r1-sambanova","deepseek-reasoner","deepseek-reasoner-cheaper","deepseek-v3-0324","deepseek/deepseek-prover-v2-671b","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v3.2:thinking","dmind/dmind-1","dmind/dmind-1-mini","doubao-1-5-thinking-pro-250415","doubao-1-5-thinking-pro-vision-250415","doubao-1-5-thinking-vision-pro-250428","doubao-1.5-pro-256k","doubao-1.5-pro-32k","doubao-1.5-vision-pro-32k","doubao-seed-1-6-250615","doubao-seed-1-6-flash-250615","doubao-seed-1-6-thinking-250615","doubao-seed-1-8-251215","doubao-seed-2-0-code-preview-260215","doubao-seed-2-0-lite-260215","doubao-seed-2-0-mini-260215","doubao-seed-2-0-pro-260215","doubao-seed-code-preview-latest","ernie-4.5-8k-preview","ernie-4.5-turbo-128k","ernie-4.5-turbo-vl-32k","ernie-5.0-thinking-latest","ernie-5.0-thinking-preview","ernie-x1-32k","ernie-x1-32k-preview","ernie-x1-turbo-32k","ernie-x1.1-preview","essentialai/rnj-1-instruct","exa-answer","exa-research","exa-research-pro","failspy/Meta-Llama-3-70B-Instruct-abliterated-v3.5","fastgpt","featherless-ai/Qwerky-72B","gemini-2.0-flash-001","gemini-2.0-flash-exp-image-generation","gemini-2.0-flash-lite","gemini-2.0-flash-thinking-exp-01-21","gemini-2.0-flash-thinking-exp-1219","gemini-2.0-pro-exp-02-05","gemini-2.0-pro-reasoner","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-lite-preview-09-2025-thinking","gemini-2.5-flash-nothinking","gemini-2.5-flash-preview-04-17","gemini-2.5-flash-preview-04-17:thinking","gemini-2.5-flash-preview-05-20","gemini-2.5-flash-preview-05-20:thinking","gemini-2.5-flash-preview-09-2025","gemini-2.5-flash-preview-09-2025-thinking","gemini-2.5-pro","gemini-2.5-pro-exp-03-25","gemini-2.5-pro-preview-03-25","gemini-2.5-pro-preview-05-06","gemini-2.5-pro-preview-06-05","gemini-3-pro-image-preview","gemini-3-pro-preview","gemini-3-pro-preview-thinking","gemini-exp-1206","glm-4","glm-4-air","glm-4-air-0111","glm-4-airx","glm-4-flash","glm-4-long","glm-4-plus","glm-4-plus-0111","glm-4.1v-thinking-flash","glm-4.1v-thinking-flashx","glm-z1-air","glm-z1-airx","glm-zero-preview","google/gemini-3-flash-preview","google/gemini-3-flash-preview-thinking","google/gemini-flash-1.5","grok-3-beta","grok-3-fast-beta","grok-3-mini-beta","grok-3-mini-fast-beta","hidream","huihui-ai/DeepSeek-R1-Distill-Llama-70B-abliterated","huihui-ai/DeepSeek-R1-Distill-Qwen-32B-abliterated","huihui-ai/Llama-3.1-Nemotron-70B-Instruct-HF-abliterated","huihui-ai/Llama-3.3-70B-Instruct-abliterated","huihui-ai/Qwen2.5-32B-Instruct-abliterated","hunyuan-t1-latest","hunyuan-turbos-20250226","inflatebot/MN-12B-Mag-Mell-R1","inflection/inflection-3-pi","inflection/inflection-3-productivity","jamba-large","jamba-large-1.6","jamba-large-1.7","jamba-mini","jamba-mini-1.6","jamba-mini-1.7","kimi-k2-instruct-fast","kimi-thinking-preview","learnlm-1.5-pro-experimental","meganova-ai/manta-flash-1.0","meganova-ai/manta-mini-1.0","meganova-ai/manta-pro-1.0","meituan-longcat/LongCat-Flash-Chat-FP8","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.2-90b-vision-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","microsoft/MAI-DS-R1-FP8","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.7","miromind-ai/mirothinker-v1.5-235b","mistral-small-31-24b-instruct","mistralai/Devstral-Small-2505","mistralai/Mistral-Nemo-Instruct-2407","mistralai/codestral-2508","mistralai/devstral-2-123b-instruct-2512","mistralai/ministral-14b-2512","mistralai/ministral-14b-instruct-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct","mistralai/mistral-large","mistralai/mistral-large-3-675b-instruct-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3.1","mistralai/mistral-saba","mistralai/mistral-small-creative","mistralai/mistral-tiny","mistralai/mixtral-8x22b-instruct-v0.1","mistralai/mixtral-8x7b-instruct-v0.1","mlabonne/NeuralDaredevil-8B-abliterated","moonshotai/Kimi-Dev-72B","moonshotai/Kimi-K2-Instruct-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-instruct-0711","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-original","moonshotai/kimi-k2-thinking-turbo-original","moonshotai/kimi-k2.5","moonshotai/kimi-k2.5:thinking","moonshotai/kimi-k2.6","moonshotai/kimi-k2.6:thinking","nex-agi/deepseek-v3.1-nex-n1","nothingiisreal/L3.1-70B-Celeste-V0.1-BF16","nvidia/Llama-3.1-Nemotron-70B-Instruct-HF","nvidia/Llama-3.1-Nemotron-Ultra-253B-v1","nvidia/Llama-3.3-Nemotron-Super-49B-v1","nvidia/Llama-3_3-Nemotron-Super-49B-v1_5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nvidia-nemotron-nano-9b-v2","openai/chatgpt-4o-latest","openai/gpt-3.5-turbo","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-mini","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat-latest","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-2025-11-13","openai/gpt-5.1-chat","openai/gpt-5.1-chat-latest","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-preview","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-mini-low","openai/o3-pro-2025-06-10","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","pamanseau/OpenReasoning-Nemotron-32B","phi-4-mini-instruct","phi-4-multimodal-instruct","qvq-max","qwen-3.6-plus","qwen-image","qwen-long","qwen-max","qwen-plus","qwen-turbo","qwen/Qwen3.6-35B-A3B","qwen/Qwen3.6-35B-A3B:thinking","qwen/qwen3.5-397b-a17b","qwen25-vl-72b-instruct","qwen3-30b-a3b-instruct-2507","qwen3-coder-30b-a3b-instruct","qwen3-max-2026-01-23","qwen3-vl-235b-a22b-instruct-original","qwen3-vl-235b-a22b-thinking","qwen3.6-max-preview","qwq-32b","raifle/sorcererlm-8x22b","sarvan-medium","shisa-ai/shisa-v2-llama3.3-70b","shisa-ai/shisa-v2.1-llama3.3-70b","sonar","sonar-deep-research","sonar-pro","sonar-reasoning-pro","soob3123/GrayLine-Qwen3-8B","soob3123/Veiled-Calla-12B","soob3123/amoral-gemma3-27B-v2","step-2-16k-exp","step-2-mini","step-3","step-r1-v-mini","stepfun-ai/step-3.5-flash","stepfun-ai/step-3.5-flash:thinking","study_gpt-chatgpt-4o-latest","tencent/Hunyuan-MT-7B","tngtech/DeepSeek-TNG-R1T2-Chimera","tngtech/tng-r1t-chimera","undi95/remm-slerp-l2-13b","universal-summarizer","unsloth/gemma-3-12b-it","unsloth/gemma-3-1b-it","unsloth/gemma-3-27b-it","unsloth/gemma-3-4b-it","v0-1.0-md","v0-1.5-lg","v0-1.5-md","venice-uncensored","venice-uncensored:web","x-ai/grok-4-07-09","x-ai/grok-4-fast","x-ai/grok-4-fast:thinking","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-flash-original","xiaomi/mimo-v2-flash-thinking","xiaomi/mimo-v2-flash-thinking-original","yi-large","yi-lightning","yi-medium-200k","z-ai/glm-4.5v","z-ai/glm-4.5v:thinking","z-ai/glm-4.6","z-ai/glm-4.6:thinking","z-image-turbo","zai-org/glm-4.7","zai-org/glm-4.7-flash","zai-org/glm-5","zai-org/glm-5.1","zai-org/glm-5.1:thinking","zai-org/glm-5:thinking"],docUrl:"https://docs.nano-gpt.com",gateway:"models.dev"},abacus:{url:"https://routellm.abacus.ai/v1",apiKeyEnvVar:"ABACUS_API_KEY",apiKeyHeader:"Authorization",name:"Abacus",models:["Qwen/QwQ-32B","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-32B","Qwen/qwen3-coder-480b-a35b-instruct","claude-3-7-sonnet-20250219","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","claude-sonnet-4-6","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek/deepseek-v3.1","gemini-2.5-flash","gemini-2.5-pro","gemini-3-flash-preview","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o-2024-11-20","gpt-4o-mini","gpt-5","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.3-codex-xhigh","gpt-5.4","grok-4-0709","grok-4-1-fast-non-reasoning","grok-4-fast-non-reasoning","grok-code-fast-1","kimi-k2-turbo-preview","kimi-k2.5","llama-3.3-70b-versatile","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-8B-Instruct","o3","o3-mini","o3-pro","o4-mini","openai/gpt-oss-120b","qwen-2.5-coder-32b","qwen3-max","route-llm","zai-org/glm-4.5","zai-org/glm-4.6","zai-org/glm-4.7","zai-org/glm-5"],docUrl:"https://abacus.ai/help/api",gateway:"models.dev"},"perplexity-agent":{url:"https://api.perplexity.ai/v1",apiKeyEnvVar:"PERPLEXITY_API_KEY",apiKeyHeader:"Authorization",name:"Perplexity Agent",models:["anthropic/claude-haiku-4-5","anthropic/claude-opus-4-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","google/gemini-2.5-flash","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3.1-pro-preview","nvidia/nemotron-3-super-120b-a12b","openai/gpt-5-mini","openai/gpt-5.1","openai/gpt-5.2","openai/gpt-5.4","openai/gpt-5.5","perplexity/sonar","xai/grok-4-1-fast-non-reasoning"],docUrl:"https://docs.perplexity.ai/docs/agent-api/models",gateway:"models.dev",npm:"@ai-sdk/openai"},"siliconflow-cn":{url:"https://api.siliconflow.cn/v1",apiKeyEnvVar:"SILICONFLOW_CN_API_KEY",apiKeyHeader:"Authorization",name:"SiliconFlow (China)",models:["ByteDance-Seed/Seed-OSS-36B-Instruct","Kwaipilot/KAT-Dev","PaddlePaddle/PaddleOCR-VL","PaddlePaddle/PaddleOCR-VL-1.5","Pro/MiniMaxAI/MiniMax-M2.1","Pro/MiniMaxAI/MiniMax-M2.5","Pro/deepseek-ai/DeepSeek-R1","Pro/deepseek-ai/DeepSeek-V3","Pro/deepseek-ai/DeepSeek-V3.1-Terminus","Pro/deepseek-ai/DeepSeek-V3.2","Pro/moonshotai/Kimi-K2-Instruct-0905","Pro/moonshotai/Kimi-K2-Thinking","Pro/moonshotai/Kimi-K2.5","Pro/moonshotai/Kimi-K2.6","Pro/zai-org/GLM-4.7","Pro/zai-org/GLM-5","Pro/zai-org/GLM-5.1","Qwen/QwQ-32B","Qwen/Qwen2.5-14B-Instruct","Qwen/Qwen2.5-32B-Instruct","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-72B-Instruct-128K","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen3-14B","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-32B","Qwen/Qwen3-8B","Qwen/Qwen3-Coder-30B-A3B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Omni-30B-A3B-Captioner","Qwen/Qwen3-Omni-30B-A3B-Instruct","Qwen/Qwen3-Omni-30B-A3B-Thinking","Qwen/Qwen3-VL-235B-A22B-Instruct","Qwen/Qwen3-VL-235B-A22B-Thinking","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3-VL-30B-A3B-Thinking","Qwen/Qwen3-VL-32B-Instruct","Qwen/Qwen3-VL-32B-Thinking","Qwen/Qwen3-VL-8B-Instruct","Qwen/Qwen3-VL-8B-Thinking","Qwen/Qwen3.5-122B-A10B","Qwen/Qwen3.5-27B","Qwen/Qwen3.5-35B-A3B","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.5-4B","Qwen/Qwen3.5-9B","Qwen/Qwen3.6-35B-A3B","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","ascend-tribe/pangu-pro-moe","baidu/ERNIE-4.5-300B-A47B","deepseek-ai/DeepSeek-OCR","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-R1-Distill-Qwen-14B","deepseek-ai/DeepSeek-R1-Distill-Qwen-32B","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek-ai/deepseek-vl2","inclusionAI/Ling-flash-2.0","inclusionAI/Ling-mini-2.0","inclusionAI/Ring-flash-2.0","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","stepfun-ai/Step-3.5-Flash","tencent/Hunyuan-A13B-Instruct","tencent/Hunyuan-MT-7B","zai-org/GLM-4.5-Air","zai-org/GLM-4.5V","zai-org/GLM-4.6","zai-org/GLM-4.6V"],docUrl:"https://cloud.siliconflow.com/models",gateway:"models.dev"},submodel:{url:"https://llm.submodel.ai/v1",apiKeyEnvVar:"SUBMODEL_INSTAGEN_ACCESS_KEY",apiKeyHeader:"Authorization",name:"submodel",models:["Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","openai/gpt-oss-120b","zai-org/GLM-4.5-Air","zai-org/GLM-4.5-FP8"],docUrl:"https://submodel.gitbook.io",gateway:"models.dev"},"minimax-coding-plan":{url:"https://api.minimax.io/anthropic/v1",apiKeyEnvVar:"MINIMAX_API_KEY",apiKeyHeader:"Authorization",name:"MiniMax Token Plan (minimax.io)",models:["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],docUrl:"https://platform.minimax.io/docs/token-plan/intro",gateway:"models.dev",npm:"@ai-sdk/anthropic"},claudinio:{url:"https://api.claudin.io/v1",apiKeyEnvVar:"CLAUDINIO_API_KEY",apiKeyHeader:"Authorization",name:"Claudinio",models:["claudinio"],docUrl:"https://claudin.io",gateway:"models.dev"},perplexity:{apiKeyEnvVar:"PERPLEXITY_API_KEY",name:"Perplexity",models:["sonar","sonar-deep-research","sonar-pro","sonar-reasoning-pro"],docUrl:"https://docs.perplexity.ai",gateway:"models.dev",npm:"@ai-sdk/perplexity"},deepseek:{url:"https://api.deepseek.com",apiKeyEnvVar:"DEEPSEEK_API_KEY",name:"DeepSeek",models:["deepseek-chat","deepseek-reasoner","deepseek-v4-flash","deepseek-v4-pro"],docUrl:"https://api-docs.deepseek.com/quick_start/pricing",gateway:"models.dev"},llama:{url:"https://api.llama.com/compat/v1/",apiKeyEnvVar:"LLAMA_API_KEY",apiKeyHeader:"Authorization",name:"Llama",models:["cerebras-llama-4-maverick-17b-128e-instruct","cerebras-llama-4-scout-17b-16e-instruct","groq-llama-4-maverick-17b-128e-instruct","llama-3.3-70b-instruct","llama-3.3-8b-instruct","llama-4-maverick-17b-128e-instruct-fp8","llama-4-scout-17b-16e-instruct-fp8"],docUrl:"https://llama.developer.meta.com/docs/models",gateway:"models.dev"},openrouter:{url:"https://openrouter.ai/api/v1",apiKeyEnvVar:"OPENROUTER_API_KEY",name:"OpenRouter",models:["ai21/jamba-large-1.7","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-2.0","aion-labs/aion-rp-llama-3.1-8b","alfredpros/codellama-7b-instruct-solidity","alibaba/tongyi-deepresearch-30b-a3b","allenai/olmo-3-32b-think","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-premier-v1","amazon/nova-pro-v1","anthracite-org/magnum-v4-72b","anthropic/claude-3-haiku","anthropic/claude-3.5-haiku","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6-fast","anthropic/claude-opus-4.7","anthropic/claude-opus-4.7-fast","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/coder-large","arcee-ai/maestro-reasoning","arcee-ai/spotlight","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-large-thinking:free","arcee-ai/trinity-mini","arcee-ai/virtuoso-large","baidu/cobuddy:free","baidu/ernie-4.5-21b-a3b","baidu/ernie-4.5-21b-a3b-thinking","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-424b-a47b","baidu/qianfan-ocr-fast","bytedance-seed/seed-1.6","bytedance-seed/seed-1.6-flash","bytedance-seed/seed-2.0-lite","bytedance-seed/seed-2.0-mini","bytedance/ui-tars-1.5-7b","cognitivecomputations/dolphin-mistral-24b-venice-edition:free","cohere/command-a","cohere/command-r-08-2024","cohere/command-r-plus-08-2024","cohere/command-r7b-12-2024","deepcogito/cogito-v2.1-671b","deepseek/deepseek-chat","deepseek/deepseek-chat-v3-0324","deepseek/deepseek-chat-v3.1","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-flash:free","deepseek/deepseek-v4-pro","essentialai/rnj-1-instruct","google/gemini-2.0-flash-001","google/gemini-2.0-flash-lite-001","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-pro","google/gemini-2.5-pro-preview","google/gemini-2.5-pro-preview-05-06","google/gemini-3-flash-preview","google/gemini-3-pro-image-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemma-2-27b-it","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-3-4b-it","google/gemma-3n-e4b-it","google/gemma-4-26b-a4b-it","google/gemma-4-26b-a4b-it:free","google/gemma-4-31b-it","google/gemma-4-31b-it:free","google/lyria-3-clip-preview","google/lyria-3-pro-preview","gryphe/mythomax-l2-13b","ibm-granite/granite-4.0-h-micro","ibm-granite/granite-4.1-8b","inception/mercury-2","inclusionai/ling-2.6-1t","inclusionai/ling-2.6-flash","inclusionai/ring-2.6-1t:free","inflection/inflection-3-pi","inflection/inflection-3-productivity","kwaipilot/kat-coder-pro-v2","liquid/lfm-2-24b-a2b","liquid/lfm-2.5-1.2b-instruct:free","liquid/lfm-2.5-1.2b-thinking:free","mancer/weaver","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-70b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-11b-vision-instruct","meta-llama/llama-3.2-1b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.2-3b-instruct:free","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-3.3-70b-instruct:free","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","meta-llama/llama-guard-3-8b","meta-llama/llama-guard-4-12b","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m1","minimax/minimax-m2","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5:free","minimax/minimax-m2.7","mistralai/codestral-2508","mistralai/devstral-2512","mistralai/devstral-medium","mistralai/devstral-small","mistralai/ministral-14b-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct-v0.1","mistralai/mistral-large","mistralai/mistral-large-2407","mistralai/mistral-large-2411","mistralai/mistral-large-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3-5","mistralai/mistral-medium-3.1","mistralai/mistral-nemo","mistralai/mistral-saba","mistralai/mistral-small-24b-instruct-2501","mistralai/mistral-small-2603","mistralai/mistral-small-3.1-24b-instruct","mistralai/mistral-small-3.2-24b-instruct","mistralai/mixtral-8x22b-instruct","mistralai/pixtral-large-2411","mistralai/voxtral-small-24b-2507","moonshotai/kimi-k2","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nex-agi/deepseek-v3.1-nex-n1","nousresearch/hermes-2-pro-llama-3-8b","nousresearch/hermes-3-llama-3.1-405b","nousresearch/hermes-3-llama-3.1-405b:free","nousresearch/hermes-3-llama-3.1-70b","nousresearch/hermes-4-405b","nousresearch/hermes-4-70b","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-30b-a3b:free","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-super-120b-a12b:free","nvidia/nemotron-nano-12b-v2-vl:free","nvidia/nemotron-nano-9b-v2","nvidia/nemotron-nano-9b-v2:free","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-0613","openai/gpt-3.5-turbo-16k","openai/gpt-3.5-turbo-instruct","openai/gpt-4","openai/gpt-4-0314","openai/gpt-4-1106-preview","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-audio-preview","openai/gpt-4o-mini","openai/gpt-4o-mini-2024-07-18","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-image-mini","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-image-2","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-audio","openai/gpt-audio-mini","openai/gpt-chat-latest","openai/gpt-oss-120b","openai/gpt-oss-120b:free","openai/gpt-oss-20b","openai/gpt-oss-20b:free","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","openrouter/auto","openrouter/bodybuilder","openrouter/free","openrouter/owl-alpha","openrouter/pareto-code","perceptron/perceptron-mk1","perplexity/sonar","perplexity/sonar-deep-research","perplexity/sonar-pro","perplexity/sonar-pro-search","perplexity/sonar-reasoning-pro","poolside/laguna-m.1:free","poolside/laguna-xs.2:free","prime-intellect/intellect-3","qwen/qwen-2.5-72b-instruct","qwen/qwen-2.5-7b-instruct","qwen/qwen-2.5-coder-32b-instruct","qwen/qwen-plus","qwen/qwen-plus-2025-07-28","qwen/qwen-plus-2025-07-28:thinking","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-14b","qwen/qwen3-235b-a22b","qwen/qwen3-235b-a22b-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b","qwen/qwen3-30b-a3b-instruct-2507","qwen/qwen3-30b-a3b-thinking-2507","qwen/qwen3-32b","qwen/qwen3-8b","qwen/qwen3-coder","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-flash","qwen/qwen3-coder-next","qwen/qwen3-coder-plus","qwen/qwen3-coder:free","qwen/qwen3-max","qwen/qwen3-max-thinking","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-instruct:free","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-32b-instruct","qwen/qwen3-vl-8b-instruct","qwen/qwen3-vl-8b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b","qwen/qwen3.5-flash-02-23","qwen/qwen3.5-plus-02-15","qwen/qwen3.5-plus-20260420","qwen/qwen3.6-27b","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-flash","qwen/qwen3.6-max-preview","qwen/qwen3.6-plus","rekaai/reka-edge","rekaai/reka-flash-3","relace/relace-apply-3","relace/relace-search","sao10k/l3-euryale-70b","sao10k/l3-lunaris-8b","sao10k/l3.1-70b-hanami-x1","sao10k/l3.1-euryale-70b","sao10k/l3.3-euryale-70b","stepfun/step-3.5-flash","switchpoint/router","tencent/hunyuan-a13b-instruct","tencent/hy3-preview","thedrummer/cydonia-24b-v4.1","thedrummer/rocinante-12b","thedrummer/skyfall-36b-v2","thedrummer/unslopnemo-12b","undi95/remm-slerp-l2-13b","upstage/solar-pro-3","writer/palmyra-x5","x-ai/grok-3","x-ai/grok-3-beta","x-ai/grok-3-mini","x-ai/grok-3-mini-beta","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.20","x-ai/grok-4.20-multi-agent","x-ai/grok-4.3","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4-32b","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.5-air:free","z-ai/glm-4.5v","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.7","z-ai/glm-4.7-flash","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo","~anthropic/claude-haiku-latest","~anthropic/claude-opus-latest","~anthropic/claude-sonnet-latest","~google/gemini-flash-latest","~google/gemini-pro-latest","~moonshotai/kimi-latest","~openai/gpt-latest","~openai/gpt-mini-latest"],docUrl:"https://openrouter.ai/models",gateway:"models.dev",npm:"@openrouter/ai-sdk-provider"},"fireworks-ai":{url:"https://api.fireworks.ai/inference/v1/",apiKeyEnvVar:"FIREWORKS_API_KEY",apiKeyHeader:"Authorization",name:"Fireworks AI",models:["accounts/fireworks/models/deepseek-v3p1","accounts/fireworks/models/deepseek-v3p2","accounts/fireworks/models/deepseek-v4-pro","accounts/fireworks/models/glm-4p5","accounts/fireworks/models/glm-4p5-air","accounts/fireworks/models/glm-4p7","accounts/fireworks/models/glm-5","accounts/fireworks/models/glm-5p1","accounts/fireworks/models/gpt-oss-120b","accounts/fireworks/models/gpt-oss-20b","accounts/fireworks/models/kimi-k2-instruct","accounts/fireworks/models/kimi-k2-thinking","accounts/fireworks/models/kimi-k2p5","accounts/fireworks/models/kimi-k2p6","accounts/fireworks/models/minimax-m2p1","accounts/fireworks/models/minimax-m2p5","accounts/fireworks/models/minimax-m2p7","accounts/fireworks/models/qwen3p6-plus","accounts/fireworks/routers/kimi-k2p5-turbo"],docUrl:"https://fireworks.ai/docs/",gateway:"models.dev"},ambient:{url:"https://api.ambient.xyz/v1",apiKeyEnvVar:"AMBIENT_API_KEY",apiKeyHeader:"Authorization",name:"Ambient",models:["moonshotai/kimi-k2.6","zai-org/GLM-5.1-FP8"],docUrl:"https://ambient.xyz",gateway:"models.dev"},"kimi-for-coding":{url:"https://api.kimi.com/coding/v1",apiKeyEnvVar:"KIMI_API_KEY",apiKeyHeader:"Authorization",name:"Kimi For Coding",models:["k2p5","k2p6","kimi-k2-thinking"],docUrl:"https://www.kimi.com/coding/docs/en/third-party-agents.html",gateway:"models.dev",npm:"@ai-sdk/anthropic"},moark:{url:"https://moark.com/v1",apiKeyEnvVar:"MOARK_API_KEY",apiKeyHeader:"Authorization",name:"Moark",models:["GLM-4.7","MiniMax-M2.1"],docUrl:"https://moark.com/docs/openapi/v1#tag/%E6%96%87%E6%9C%AC%E7%94%9F%E6%88%90",gateway:"models.dev"},"opencode-go":{url:"https://opencode.ai/zen/go/v1",apiKeyEnvVar:"OPENCODE_API_KEY",apiKeyHeader:"Authorization",name:"OpenCode Go",models:["deepseek-v4-flash","deepseek-v4-pro","glm-5","glm-5.1","kimi-k2.5","kimi-k2.6","mimo-v2.5","mimo-v2.5-pro","minimax-m2.5","minimax-m2.7","qwen3.5-plus","qwen3.6-plus"],docUrl:"https://opencode.ai/docs/zen",gateway:"models.dev"},databricks:{url:"https://${DATABRICKS_HOST}/ai-gateway/mlflow/v1",apiKeyEnvVar:"DATABRICKS_TOKEN",apiKeyHeader:"Authorization",name:"Databricks",models:["databricks-claude-haiku-4-5","databricks-claude-opus-4-1","databricks-claude-opus-4-5","databricks-claude-opus-4-6","databricks-claude-opus-4-7","databricks-claude-sonnet-4","databricks-claude-sonnet-4-5","databricks-claude-sonnet-4-6","databricks-gemini-2-5-flash","databricks-gemini-2-5-pro","databricks-gemini-3-1-flash-lite","databricks-gemini-3-1-pro","databricks-gemini-3-flash","databricks-gemini-3-pro","databricks-gpt-5","databricks-gpt-5-1","databricks-gpt-5-2","databricks-gpt-5-4","databricks-gpt-5-4-mini","databricks-gpt-5-4-nano","databricks-gpt-5-5","databricks-gpt-5-mini","databricks-gpt-5-nano","databricks-gpt-oss-120b","databricks-gpt-oss-20b"],docUrl:"https://docs.databricks.com/aws/en/machine-learning/foundation-models/",gateway:"models.dev"},"io-net":{url:"https://api.intelligence.io.solutions/api/v1",apiKeyEnvVar:"IOINTELLIGENCE_API_KEY",apiKeyHeader:"Authorization",name:"IO.NET",models:["Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Next-80B-A3B-Instruct","deepseek-ai/DeepSeek-R1-0528","meta-llama/Llama-3.2-90B-Vision-Instruct","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","mistralai/Devstral-Small-2505","mistralai/Magistral-Small-2506","mistralai/Mistral-Large-Instruct-2411","mistralai/Mistral-Nemo-Instruct-2407","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","openai/gpt-oss-120b","openai/gpt-oss-20b","zai-org/GLM-4.6"],docUrl:"https://io.net/docs/guides/intelligence/io-intelligence",gateway:"models.dev"},"alibaba-cn":{url:"https://dashscope.aliyuncs.com/compatible-mode/v1",apiKeyEnvVar:"DASHSCOPE_API_KEY",apiKeyHeader:"Authorization",name:"Alibaba (China)",models:["MiniMax-M2.5","MiniMax/MiniMax-M2.7","deepseek-r1","deepseek-r1-0528","deepseek-r1-distill-llama-70b","deepseek-r1-distill-llama-8b","deepseek-r1-distill-qwen-1-5b","deepseek-r1-distill-qwen-14b","deepseek-r1-distill-qwen-32b","deepseek-r1-distill-qwen-7b","deepseek-v3","deepseek-v3-1","deepseek-v3-2-exp","deepseek-v4-flash","deepseek-v4-pro","glm-5","glm-5.1","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","kimi/kimi-k2.5","moonshot-kimi-k2-instruct","qvq-max","qwen-deep-research","qwen-doc-turbo","qwen-flash","qwen-long","qwen-math-plus","qwen-math-turbo","qwen-max","qwen-mt-plus","qwen-mt-turbo","qwen-omni-turbo","qwen-omni-turbo-realtime","qwen-plus","qwen-plus-character","qwen-turbo","qwen-vl-max","qwen-vl-ocr","qwen-vl-plus","qwen2-5-14b-instruct","qwen2-5-32b-instruct","qwen2-5-72b-instruct","qwen2-5-7b-instruct","qwen2-5-coder-32b-instruct","qwen2-5-coder-7b-instruct","qwen2-5-math-72b-instruct","qwen2-5-math-7b-instruct","qwen2-5-omni-7b","qwen2-5-vl-72b-instruct","qwen2-5-vl-7b-instruct","qwen3-14b","qwen3-235b-a22b","qwen3-32b","qwen3-8b","qwen3-asr-flash","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-plus","qwen3-max","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-omni-flash","qwen3-omni-flash-realtime","qwen3-vl-235b-a22b","qwen3-vl-30b-a3b","qwen3-vl-plus","qwen3.5-397b-a17b","qwen3.5-flash","qwen3.5-plus","qwen3.6-max-preview","qwen3.6-plus","qwq-32b","qwq-plus","siliconflow/deepseek-r1-0528","siliconflow/deepseek-v3-0324","siliconflow/deepseek-v3.1-terminus","siliconflow/deepseek-v3.2","tongyi-intent-detect-v3"],docUrl:"https://www.alibabacloud.com/help/en/model-studio/models",gateway:"models.dev"},firepass:{url:"https://api.fireworks.ai/inference/v1/",apiKeyEnvVar:"FIREPASS_API_KEY",apiKeyHeader:"Authorization",name:"Fireworks (Firepass)",models:["accounts/fireworks/routers/kimi-k2p6-turbo"],docUrl:"https://docs.fireworks.ai/firepass",gateway:"models.dev"},"minimax-cn-coding-plan":{url:"https://api.minimaxi.com/anthropic/v1",apiKeyEnvVar:"MINIMAX_API_KEY",apiKeyHeader:"Authorization",name:"MiniMax Token Plan (minimaxi.com)",models:["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],docUrl:"https://platform.minimaxi.com/docs/token-plan/intro",gateway:"models.dev",npm:"@ai-sdk/anthropic"},jiekou:{url:"https://api.jiekou.ai/openai",apiKeyEnvVar:"JIEKOU_API_KEY",apiKeyHeader:"Authorization",name:"Jiekou.AI",models:["baidu/ernie-4.5-300b-a47b-paddle","baidu/ernie-4.5-vl-424b-a47b","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","deepseek/deepseek-r1-0528","deepseek/deepseek-v3-0324","deepseek/deepseek-v3.1","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-preview-05-20","gemini-2.5-pro","gemini-2.5-pro-preview-06-05","gemini-3-flash-preview","gemini-3-pro-preview","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-codex","gpt-5.2-pro","grok-4-0709","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","minimax/minimax-m2.1","minimaxai/minimax-m1-80k","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2.5","o3","o3-mini","o4-mini","qwen/qwen3-235b-a22b-fp8","qwen/qwen3-235b-a22b-instruct-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b-fp8","qwen/qwen3-32b-fp8","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-coder-next","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","xiaomimimo/mimo-v2-flash","zai-org/glm-4.5","zai-org/glm-4.5v","zai-org/glm-4.7","zai-org/glm-4.7-flash"],docUrl:"https://docs.jiekou.ai/docs/support/quickstart?utm_source=github_models.dev",gateway:"models.dev"},bailing:{url:"https://api.tbox.cn/api/llm/v1/chat/completions",apiKeyEnvVar:"BAILING_API_TOKEN",apiKeyHeader:"Authorization",name:"Bailing",models:["Ling-1T","Ring-1T"],docUrl:"https://alipaytbox.yuque.com/sxs0ba/ling/intro",gateway:"models.dev"},iflowcn:{url:"https://apis.iflow.cn/v1",apiKeyEnvVar:"IFLOW_API_KEY",apiKeyHeader:"Authorization",name:"iFlow",models:["deepseek-r1","deepseek-v3","deepseek-v3.2","glm-4.6","kimi-k2","kimi-k2-0905","qwen3-235b","qwen3-235b-a22b-instruct","qwen3-235b-a22b-thinking-2507","qwen3-32b","qwen3-coder-plus","qwen3-max","qwen3-max-preview","qwen3-vl-plus"],docUrl:"https://platform.iflow.cn/en/docs",gateway:"models.dev"},orcarouter:{url:"https://api.orcarouter.ai/v1",apiKeyEnvVar:"ORCAROUTER_API_KEY",apiKeyHeader:"Authorization",name:"OrcaRouter",models:["anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","deepseek/deepseek-chat","deepseek/deepseek-reasoner","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3-pro-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemini-flash-latest","google/gemini-flash-lite-latest","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","grok/grok-4.3","kimi/kimi-k2.5","kimi/kimi-k2.6","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","openai/gpt-3.5-turbo","openai/gpt-4","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-chat-latest","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat-latest","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat-latest","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat-latest","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","orcarouter/auto","qwen/qwen3-max","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-plus","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-plus","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.6","z-ai/glm-4.7","z-ai/glm-5","z-ai/glm-5.1"],docUrl:"https://docs.orcarouter.ai",gateway:"models.dev"},huggingface:{url:"https://router.huggingface.co/v1",apiKeyEnvVar:"HF_TOKEN",apiKeyHeader:"Authorization",name:"Hugging Face",models:["MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.7","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Coder-Next","Qwen/Qwen3-Embedding-4B","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3.5-397B-A17B","XiaomiMiMo/MiMo-V2-Flash","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","zai-org/GLM-4.7","zai-org/GLM-4.7-Flash","zai-org/GLM-5","zai-org/GLM-5.1"],docUrl:"https://huggingface.co/docs/inference-providers",gateway:"models.dev"},zenmux:{url:"https://zenmux.ai/api/v1",apiKeyEnvVar:"ZENMUX_API_KEY",apiKeyHeader:"Authorization",name:"ZenMux",models:["anthropic/claude-3.5-haiku","anthropic/claude-3.7-sonnet","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","baidu/ernie-5.0-thinking-preview","deepseek/deepseek-chat","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","inclusionai/ling-1t","inclusionai/ring-1t","kuaishou/kat-coder-pro-v2","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-lightning","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-turbo","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","openai/gpt-5","openai/gpt-5-codex","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","qwen/qwen3-coder-plus","qwen/qwen3-max","qwen/qwen3.5-flash","qwen/qwen3.5-plus","qwen/qwen3.6-plus","sapiens-ai/agnes-1.5-lite","sapiens-ai/agnes-1.5-pro","stepfun/step-3","stepfun/step-3.5-flash","stepfun/step-3.5-flash-free","tencent/hy3-preview","volcengine/doubao-seed-1.8","volcengine/doubao-seed-2.0-code","volcengine/doubao-seed-2.0-lite","volcengine/doubao-seed-2.0-mini","volcengine/doubao-seed-2.0-pro","volcengine/doubao-seed-code","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-non-reasoning","x-ai/grok-4.2-fast","x-ai/grok-4.2-fast-non-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.6v-flash","z-ai/glm-4.6v-flash-free","z-ai/glm-4.7","z-ai/glm-4.7-flash-free","z-ai/glm-4.7-flashx","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo"],docUrl:"https://docs.zenmux.ai",gateway:"models.dev"},upstage:{url:"https://api.upstage.ai/v1/solar",apiKeyEnvVar:"UPSTAGE_API_KEY",apiKeyHeader:"Authorization",name:"Upstage",models:["solar-mini","solar-pro2","solar-pro3"],docUrl:"https://developers.upstage.ai/docs/apis/chat",gateway:"models.dev"},"novita-ai":{url:"https://api.novita.ai/openai",apiKeyEnvVar:"NOVITA_API_KEY",apiKeyHeader:"Authorization",name:"NovitaAI",models:["Sao10K/L3-8B-Stheno-v3.2","baichuan/baichuan-m2-32b","baidu/ernie-4.5-21B-a3b","baidu/ernie-4.5-21B-a3b-thinking","baidu/ernie-4.5-300b-a47b-paddle","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-28b-a3b-thinking","baidu/ernie-4.5-vl-424b-a47b","deepseek/deepseek-ocr","deepseek/deepseek-ocr-2","deepseek/deepseek-prover-v2-671b","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-0528-qwen3-8b","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-14b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-r1-turbo","deepseek/deepseek-v3-0324","deepseek/deepseek-v3-turbo","deepseek/deepseek-v3.1","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","gryphe/mythomax-l2-13b","inclusionai/ling-2.6-1t","inclusionai/ling-2.6-flash","kwaipilot/kat-coder-pro","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick-17b-128e-instruct-fp8","meta-llama/llama-4-scout-17b-16e-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimaxai/minimax-m1-80k","mistralai/mistral-nemo","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","nousresearch/hermes-2-pro-llama-3-8b","openai/gpt-oss-120b","openai/gpt-oss-20b","paddlepaddle/paddleocr-vl","qwen/qwen-2.5-72b-instruct","qwen/qwen-mt-plus","qwen/qwen2.5-7b-instruct","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-235b-a22b-fp8","qwen/qwen3-235b-a22b-instruct-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b-fp8","qwen/qwen3-32b-fp8","qwen/qwen3-4b-fp8","qwen/qwen3-8b-fp8","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-coder-next","qwen/qwen3-max","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-omni-30b-a3b-instruct","qwen/qwen3-omni-30b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-8b-instruct","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","sao10k/l3-70b-euryale-v2.1","sao10k/l3-8b-lunaris","sao10k/l31-70b-euryale-v2.2","xiaomimimo/mimo-v2-flash","zai-org/autoglm-phone-9b-multilingual","zai-org/glm-4.5","zai-org/glm-4.5-air","zai-org/glm-4.5v","zai-org/glm-4.6","zai-org/glm-4.6v","zai-org/glm-4.7","zai-org/glm-4.7-flash","zai-org/glm-5","zai-org/glm-5.1"],docUrl:"https://novita.ai/docs/guides/introduction",gateway:"models.dev"},"xiaomi-token-plan-cn":{url:"https://token-plan-cn.xiaomimimo.com/v1",apiKeyEnvVar:"XIAOMI_API_KEY",apiKeyHeader:"Authorization",name:"Xiaomi Token Plan (China)",models:["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],docUrl:"https://platform.xiaomimimo.com/#/docs",gateway:"models.dev"},wandb:{url:"https://api.inference.wandb.ai/v1",apiKeyEnvVar:"WANDB_API_KEY",apiKeyHeader:"Authorization",name:"Weights & Biases",models:["MiniMaxAI/MiniMax-M2.5","OpenPipe/Qwen3-14B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct","deepseek-ai/DeepSeek-V3.1","meta-llama/Llama-3.1-70B-Instruct","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Llama-4-Scout-17B-16E-Instruct","microsoft/Phi-4-mini-instruct","moonshotai/Kimi-K2.5","nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8","openai/gpt-oss-120b","openai/gpt-oss-20b","zai-org/GLM-5-FP8","zai-org/GLM-5.1"],docUrl:"https://docs.wandb.ai/guides/integrations/inference/",gateway:"models.dev"},chutes:{url:"https://llm.chutes.ai/v1",apiKeyEnvVar:"CHUTES_API_KEY",apiKeyHeader:"Authorization",name:"Chutes",models:["MiniMaxAI/MiniMax-M2.5-TEE","NousResearch/DeepHermes-3-Mistral-24B-Preview","NousResearch/Hermes-4-14B","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507-TEE","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B","Qwen/Qwen3-32B-TEE","Qwen/Qwen3-Coder-Next-TEE","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3.5-397B-A17B-TEE","Qwen/Qwen3.6-27B-TEE","Qwen/Qwen3Guard-Gen-0.6B","XiaomiMiMo/MiMo-V2-Flash-TEE","deepseek-ai/DeepSeek-R1-0528-TEE","deepseek-ai/DeepSeek-R1-Distill-Llama-70B","deepseek-ai/DeepSeek-V3-0324-TEE","deepseek-ai/DeepSeek-V3.1-TEE","deepseek-ai/DeepSeek-V3.2-TEE","google/gemma-4-31B-turbo-TEE","moonshotai/Kimi-K2.5-TEE","moonshotai/Kimi-K2.6-TEE","openai/gpt-oss-120b-TEE","rednote-hilab/dots.ocr","tngtech/DeepSeek-TNG-R1T2-Chimera-TEE","unsloth/Llama-3.2-1B-Instruct","unsloth/Llama-3.2-3B-Instruct","unsloth/Mistral-Nemo-Instruct-2407","unsloth/gemma-3-12b-it","unsloth/gemma-3-27b-it","unsloth/gemma-3-4b-it","zai-org/GLM-4.6V","zai-org/GLM-4.7-FP8","zai-org/GLM-4.7-TEE","zai-org/GLM-5-TEE","zai-org/GLM-5-Turbo","zai-org/GLM-5.1-TEE"],docUrl:"https://llm.chutes.ai/v1/models",gateway:"models.dev"},dinference:{url:"https://api.dinference.com/v1",apiKeyEnvVar:"DINFERENCE_API_KEY",apiKeyHeader:"Authorization",name:"DInference",models:["glm-4.7","glm-5","glm-5.1","gpt-oss-120b","minimax-m2.5"],docUrl:"https://dinference.com",gateway:"models.dev"},vivgrid:{url:"https://api.vivgrid.com/v1",apiKeyEnvVar:"VIVGRID_API_KEY",apiKeyHeader:"Authorization",name:"Vivgrid",models:["deepseek-v3.2","deepseek-v4-pro","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gpt-5-mini","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2-codex","gpt-5.3-codex","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.5"],docUrl:"https://docs.vivgrid.com/models",gateway:"models.dev",npm:"@ai-sdk/openai"},deepinfra:{apiKeyEnvVar:"DEEPINFRA_API_KEY",name:"Deep Infra",models:["MiniMaxAI/MiniMax-M2","MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo","Qwen/Qwen3.5-35B-A3B","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.6-35B-A3B","anthropic/claude-3-7-sonnet-latest","anthropic/claude-4-opus","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V4-Flash","deepseek-ai/DeepSeek-V4-Pro","google/gemma-4-26B-A4B-it","google/gemma-4-31B-it","meta-llama/Llama-3.1-70B-Instruct","meta-llama/Llama-3.1-70B-Instruct-Turbo","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.1-8B-Instruct-Turbo","meta-llama/Llama-3.3-70B-Instruct-Turbo","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","meta-llama/Llama-4-Scout-17B-16E-Instruct","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-120b","openai/gpt-oss-20b","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","zai-org/GLM-4.6","zai-org/GLM-4.6V","zai-org/GLM-4.7","zai-org/GLM-4.7-Flash","zai-org/GLM-5","zai-org/GLM-5.1"],docUrl:"https://deepinfra.com/models",gateway:"models.dev",npm:"@ai-sdk/deepinfra"},"qiniu-ai":{url:"https://api.qnaigc.com/v1",apiKeyEnvVar:"QINIU_API_KEY",apiKeyHeader:"Authorization",name:"Qiniu",models:["MiniMax-M1","claude-3.5-haiku","claude-3.5-sonnet","claude-3.7-sonnet","claude-4.0-opus","claude-4.0-sonnet","claude-4.1-opus","claude-4.5-haiku","claude-4.5-opus","claude-4.5-sonnet","deepseek-r1","deepseek-r1-0528","deepseek-v3","deepseek-v3-0324","deepseek-v3.1","deepseek/deepseek-math-v2","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.1-terminus-thinking","deepseek/deepseek-v3.2-251201","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-exp-thinking","doubao-1.5-pro-32k","doubao-1.5-thinking-pro","doubao-1.5-vision-pro","doubao-seed-1.6","doubao-seed-1.6-flash","doubao-seed-1.6-thinking","doubao-seed-2.0-code","doubao-seed-2.0-lite","doubao-seed-2.0-mini","doubao-seed-2.0-pro","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-lite","gemini-2.5-pro","gemini-3.0-flash-preview","gemini-3.0-pro-image-preview","gemini-3.0-pro-preview","glm-4.5","glm-4.5-air","gpt-oss-120b","gpt-oss-20b","kimi-k2","kling-v2-6","meituan/longcat-flash-chat","meituan/longcat-flash-lite","mimo-v2-flash","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","openai/gpt-5","openai/gpt-5.2","qwen-max-2025-01-25","qwen-turbo","qwen-vl-max-2025-01-25","qwen2.5-vl-72b-instruct","qwen2.5-vl-7b-instruct","qwen3-235b-a22b","qwen3-235b-a22b-instruct-2507","qwen3-235b-a22b-thinking-2507","qwen3-30b-a3b","qwen3-30b-a3b-instruct-2507","qwen3-30b-a3b-thinking-2507","qwen3-32b","qwen3-coder-480b-a35b-instruct","qwen3-max","qwen3-max-preview","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-vl-30b-a3b-thinking","qwen3.5-397b-a17b","stepfun-ai/gelab-zero-4b-preview","stepfun/step-3.5-flash","x-ai/grok-4-fast","x-ai/grok-4-fast-non-reasoning","x-ai/grok-4-fast-reasoning","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-non-reasoning","x-ai/grok-4.1-fast-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","z-ai/autoglm-phone-9b","z-ai/glm-4.6","z-ai/glm-4.7","z-ai/glm-5"],docUrl:"https://developer.qiniu.com/aitokenapi",gateway:"models.dev"},kilo:{url:"https://api.kilo.ai/api/gateway",apiKeyEnvVar:"KILO_API_KEY",apiKeyHeader:"Authorization",name:"Kilo Gateway",models:["ai21/jamba-large-1.7","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-2.0","aion-labs/aion-rp-llama-3.1-8b","alfredpros/codellama-7b-instruct-solidity","alibaba/tongyi-deepresearch-30b-a3b","allenai/olmo-3-32b-think","alpindale/goliath-120b","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-premier-v1","amazon/nova-pro-v1","anthracite-org/magnum-v4-72b","anthropic/claude-3-haiku","anthropic/claude-3.5-haiku","anthropic/claude-3.7-sonnet","anthropic/claude-3.7-sonnet:thinking","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6-fast","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/coder-large","arcee-ai/maestro-reasoning","arcee-ai/spotlight","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-mini","arcee-ai/virtuoso-large","baidu/cobuddy:free","baidu/ernie-4.5-21b-a3b","baidu/ernie-4.5-21b-a3b-thinking","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-424b-a47b","baidu/qianfan-ocr-fast:free","bytedance-seed/seed-1.6","bytedance-seed/seed-1.6-flash","bytedance-seed/seed-2.0-lite","bytedance-seed/seed-2.0-mini","bytedance/ui-tars-1.5-7b","cohere/command-a","cohere/command-r-08-2024","cohere/command-r-plus-08-2024","cohere/command-r7b-12-2024","deepcogito/cogito-v2.1-671b","deepseek/deepseek-chat","deepseek/deepseek-chat-v3-0324","deepseek/deepseek-chat-v3.1","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","essentialai/rnj-1-instruct","google/gemini-2.0-flash-001","google/gemini-2.0-flash-lite-001","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-pro","google/gemini-2.5-pro-preview","google/gemini-2.5-pro-preview-05-06","google/gemini-3-flash-preview","google/gemini-3-pro-image-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemma-2-27b-it","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-3-4b-it","google/gemma-3n-e4b-it","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","google/lyria-3-clip-preview","google/lyria-3-pro-preview","gryphe/mythomax-l2-13b","ibm-granite/granite-4.0-h-micro","ibm-granite/granite-4.1-8b","inception/mercury-2","inclusionai/ling-2.6-1t:free","inclusionai/ling-2.6-flash","inflection/inflection-3-pi","inflection/inflection-3-productivity","kilo-auto/balanced","kilo-auto/free","kilo-auto/frontier","kilo-auto/small","kwaipilot/kat-coder-pro-v2","liquid/lfm-2-24b-a2b","mancer/weaver","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-70b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-11b-vision-instruct","meta-llama/llama-3.2-1b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","meta-llama/llama-guard-3-8b","meta-llama/llama-guard-4-12b","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m1","minimax/minimax-m2","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.7","mistralai/codestral-2508","mistralai/devstral-2512","mistralai/devstral-medium","mistralai/devstral-small","mistralai/ministral-14b-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct-v0.1","mistralai/mistral-large","mistralai/mistral-large-2407","mistralai/mistral-large-2411","mistralai/mistral-large-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3-5","mistralai/mistral-medium-3.1","mistralai/mistral-nemo","mistralai/mistral-saba","mistralai/mistral-small-24b-instruct-2501","mistralai/mistral-small-2603","mistralai/mistral-small-3.1-24b-instruct","mistralai/mistral-small-3.2-24b-instruct","mistralai/mixtral-8x22b-instruct","mistralai/mixtral-8x7b-instruct","mistralai/pixtral-large-2411","mistralai/voxtral-small-24b-2507","moonshotai/kimi-k2","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nex-agi/deepseek-v3.1-nex-n1","nousresearch/hermes-2-pro-llama-3-8b","nousresearch/hermes-3-llama-3.1-405b","nousresearch/hermes-3-llama-3.1-70b","nousresearch/hermes-4-405b","nousresearch/hermes-4-70b","nvidia/llama-3.1-nemotron-70b-instruct","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-super-120b-a12b:free","nvidia/nemotron-nano-9b-v2","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-0613","openai/gpt-3.5-turbo-16k","openai/gpt-3.5-turbo-instruct","openai/gpt-4","openai/gpt-4-0314","openai/gpt-4-1106-preview","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-audio-preview","openai/gpt-4o-mini","openai/gpt-4o-mini-2024-07-18","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-image-mini","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-image-2","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-audio","openai/gpt-audio-mini","openai/gpt-chat-latest","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","openrouter/auto","openrouter/bodybuilder","openrouter/free","openrouter/owl-alpha","openrouter/pareto-code","perplexity/sonar","perplexity/sonar-deep-research","perplexity/sonar-pro","perplexity/sonar-pro-search","perplexity/sonar-reasoning-pro","poolside/laguna-m.1:free","poolside/laguna-xs.2:free","prime-intellect/intellect-3","qwen/qwen-2.5-72b-instruct","qwen/qwen-2.5-7b-instruct","qwen/qwen-2.5-coder-32b-instruct","qwen/qwen-max","qwen/qwen-plus","qwen/qwen-plus-2025-07-28","qwen/qwen-plus-2025-07-28:thinking","qwen/qwen-turbo","qwen/qwen-vl-max","qwen/qwen-vl-plus","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-14b","qwen/qwen3-235b-a22b","qwen/qwen3-235b-a22b-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b","qwen/qwen3-30b-a3b-instruct-2507","qwen/qwen3-30b-a3b-thinking-2507","qwen/qwen3-32b","qwen/qwen3-8b","qwen/qwen3-coder","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-flash","qwen/qwen3-coder-next","qwen/qwen3-coder-plus","qwen/qwen3-max","qwen/qwen3-max-thinking","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-32b-instruct","qwen/qwen3-vl-8b-instruct","qwen/qwen3-vl-8b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b","qwen/qwen3.5-flash-02-23","qwen/qwen3.5-plus-02-15","qwen/qwen3.5-plus-20260420","qwen/qwen3.6-27b","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-flash","qwen/qwen3.6-max-preview","qwen/qwen3.6-plus","rekaai/reka-edge","rekaai/reka-flash-3","relace/relace-apply-3","relace/relace-search","sao10k/l3-euryale-70b","sao10k/l3-lunaris-8b","sao10k/l3.1-70b-hanami-x1","sao10k/l3.1-euryale-70b","sao10k/l3.3-euryale-70b","stepfun/step-3.5-flash","stepfun/step-3.5-flash:free","switchpoint/router","tencent/hunyuan-a13b-instruct","tencent/hy3-preview:free","thedrummer/cydonia-24b-v4.1","thedrummer/rocinante-12b","thedrummer/skyfall-36b-v2","thedrummer/unslopnemo-12b","tngtech/deepseek-r1t2-chimera","undi95/remm-slerp-l2-13b","upstage/solar-pro-3","writer/palmyra-x5","x-ai/grok-3","x-ai/grok-3-beta","x-ai/grok-3-mini","x-ai/grok-3-mini-beta","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.20","x-ai/grok-4.20-multi-agent","x-ai/grok-4.3","x-ai/grok-code-fast-1","x-ai/grok-code-fast-1:optimized:free","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4-32b","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.5v","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.7","z-ai/glm-4.7-flash","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo","~anthropic/claude-haiku-latest","~anthropic/claude-opus-latest","~anthropic/claude-sonnet-latest","~google/gemini-flash-latest","~google/gemini-pro-latest","~moonshotai/kimi-latest","~openai/gpt-latest","~openai/gpt-mini-latest"],docUrl:"https://kilo.ai",gateway:"models.dev"},auriko:{url:"https://api.auriko.ai/v1",apiKeyEnvVar:"AURIKO_API_KEY",apiKeyHeader:"Authorization",name:"Auriko",models:["claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-6","deepseek-v4-flash","deepseek-v4-pro","gemini-2.5-flash","gemini-2.5-pro","gemini-3.1-pro-preview","glm-5.1","grok-4.3","kimi-k2.5","kimi-k2.6","minimax-m2-7","minimax-m2-7-highspeed","qwen-3.6-plus"],docUrl:"https://docs.auriko.ai",gateway:"models.dev"},morph:{url:"https://api.morphllm.com/v1",apiKeyEnvVar:"MORPH_API_KEY",apiKeyHeader:"Authorization",name:"Morph",models:["auto","morph-v3-fast","morph-v3-large"],docUrl:"https://docs.morphllm.com/api-reference/introduction",gateway:"models.dev"},mixlayer:{url:"https://models.mixlayer.ai/v1",apiKeyEnvVar:"MIXLAYER_API_KEY",apiKeyHeader:"Authorization",name:"Mixlayer",models:["qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b"],docUrl:"https://docs.mixlayer.com",gateway:"models.dev"},"xiaomi-token-plan-sgp":{url:"https://token-plan-sgp.xiaomimimo.com/v1",apiKeyEnvVar:"XIAOMI_API_KEY",apiKeyHeader:"Authorization",name:"Xiaomi Token Plan (Singapore)",models:["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],docUrl:"https://platform.xiaomimimo.com/#/docs",gateway:"models.dev"},zai:{url:"https://api.z.ai/api/paas/v4",apiKeyEnvVar:"ZHIPU_API_KEY",apiKeyHeader:"Authorization",name:"Z.AI",models:["glm-4.5","glm-4.5-air","glm-4.5-flash","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5-turbo","glm-5.1","glm-5v-turbo"],docUrl:"https://docs.z.ai/guides/overview/pricing",gateway:"models.dev"},opencode:{url:"https://opencode.ai/zen/v1",apiKeyEnvVar:"OPENCODE_API_KEY",apiKeyHeader:"Authorization",name:"OpenCode Zen",models:["big-pickle","claude-haiku-4-5","claude-opus-4-1","claude-opus-4-5","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4","claude-sonnet-4-5","claude-sonnet-4-6","deepseek-v4-flash-free","gemini-3-flash","gemini-3.1-pro","glm-5","glm-5.1","gpt-5","gpt-5-codex","gpt-5-nano","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-codex","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","kimi-k2.5","kimi-k2.6","minimax-m2.5","minimax-m2.5-free","minimax-m2.7","nemotron-3-super-free","qwen3.5-plus","qwen3.6-plus","qwen3.6-plus-free"],docUrl:"https://opencode.ai/docs/zen",gateway:"models.dev"},stepfun:{url:"https://api.stepfun.com/v1",apiKeyEnvVar:"STEPFUN_API_KEY",apiKeyHeader:"Authorization",name:"StepFun",models:["step-1-32k","step-2-16k","step-3.5-flash","step-3.5-flash-2603"],docUrl:"https://platform.stepfun.com/docs/zh/overview/concept",gateway:"models.dev"},nebius:{url:"https://api.tokenfactory.nebius.com/v1",apiKeyEnvVar:"NEBIUS_API_KEY",apiKeyHeader:"Authorization",name:"Nebius Token Factory",models:["MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.5-fast","NousResearch/Hermes-4-405B","NousResearch/Hermes-4-70B","PrimeIntellect/INTELLECT-3","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507-fast","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-32B","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Next-80B-A3B-Thinking-fast","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.5-397B-A17B-fast","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-fast","deepseek-ai/DeepSeek-V4-Pro","google/gemma-2-2b-it","google/gemma-3-27b-it","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Meta-Llama-3.1-8B-Instruct","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.5-fast","nvidia/Llama-3_1-Nemotron-Ultra-253B-v1","nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B","nvidia/Nemotron-3-Nano-Omni","nvidia/nemotron-3-super-120b-a12b","openai/gpt-oss-120b","openai/gpt-oss-120b-fast","zai-org/GLM-5"],docUrl:"https://docs.tokenfactory.nebius.com/",gateway:"models.dev"},poe:{url:"https://api.poe.com/v1",apiKeyEnvVar:"POE_API_KEY",apiKeyHeader:"Authorization",name:"Poe",models:["anthropic/claude-haiku-3","anthropic/claude-haiku-3.5","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-3.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","cerebras/gpt-oss-120b-cs","cerebras/llama-3.1-8b-cs","elevenlabs/elevenlabs-music","elevenlabs/elevenlabs-v2.5-turbo","elevenlabs/elevenlabs-v3","empiriolabs/deepseek-v4-flash-el","empiriolabs/deepseek-v4-pro-el","fireworks-ai/kimi-k2.5-fw","google/gemini-2.0-flash","google/gemini-2.0-flash-lite","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash","google/gemini-3.1-flash-lite","google/gemini-3.1-pro","google/gemma-4-31b","google/imagen-3","google/imagen-3-fast","google/imagen-4","google/imagen-4-fast","google/imagen-4-ultra","google/lyria","google/nano-banana","google/nano-banana-pro","google/veo-2","google/veo-3","google/veo-3-fast","google/veo-3.1","google/veo-3.1-fast","ideogramai/ideogram","ideogramai/ideogram-v2","ideogramai/ideogram-v2a","ideogramai/ideogram-v2a-turbo","lumalabs/ray2","novita/deepseek-v3.2","novita/glm-4.6","novita/glm-4.6v","novita/glm-4.7-flash","novita/glm-4.7-n","novita/glm-5","novita/kimi-k2-thinking","novita/kimi-k2.5","novita/kimi-k2.6","novita/minimax-m2.1","openai/dall-e-3","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-instruct","openai/gpt-3.5-turbo-raw","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-aug","openai/gpt-4o-mini","openai/gpt-4o-mini-search","openai/gpt-4o-search","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.1-instant","openai/gpt-5.2","openai/gpt-5.2-codex","openai/gpt-5.2-instant","openai/gpt-5.2-pro","openai/gpt-5.3-codex","openai/gpt-5.3-codex-spark","openai/gpt-5.3-instant","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-image-1","openai/gpt-image-1-mini","openai/gpt-image-1.5","openai/gpt-image-2","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/sora-2","openai/sora-2-pro","poetools/claude-code","runwayml/runway","runwayml/runway-gen-4-turbo","stabilityai/stablediffusionxl","topazlabs-co/topazlabs","trytako/tako","xai/grok-3","xai/grok-3-mini","xai/grok-4","xai/grok-4-fast-non-reasoning","xai/grok-4-fast-reasoning","xai/grok-4.1-fast-non-reasoning","xai/grok-4.1-fast-reasoning","xai/grok-4.20-multi-agent","xai/grok-code-fast-1"],docUrl:"https://creator.poe.com/docs/external-applications/openai-compatible-api",gateway:"models.dev"},helicone:{url:"https://ai-gateway.helicone.ai/v1",apiKeyEnvVar:"HELICONE_API_KEY",apiKeyHeader:"Authorization",name:"Helicone",models:["chatgpt-4o-latest","claude-3-haiku-20240307","claude-3.5-haiku","claude-3.5-sonnet-v2","claude-3.7-sonnet","claude-4.5-haiku","claude-4.5-opus","claude-4.5-sonnet","claude-haiku-4-5-20251001","claude-opus-4","claude-opus-4-1","claude-opus-4-1-20250805","claude-sonnet-4","claude-sonnet-4-5-20250929","deepseek-r1-distill-llama-70b","deepseek-reasoner","deepseek-tng-r1t2-chimera","deepseek-v3","deepseek-v3.1-terminus","deepseek-v3.2","ernie-4.5-21b-a3b-thinking","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-pro","gemini-3-pro-preview","gemma-3-12b-it","gemma2-9b-it","glm-4.6","gpt-4.1","gpt-4.1-mini","gpt-4.1-mini-2025-04-14","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-mini","gpt-oss-120b","gpt-oss-20b","grok-3","grok-3-mini","grok-4","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","hermes-2-pro-llama-3-8b","kimi-k2-0711","kimi-k2-0905","kimi-k2-thinking","llama-3.1-8b-instant","llama-3.1-8b-instruct","llama-3.1-8b-instruct-turbo","llama-3.3-70b-instruct","llama-3.3-70b-versatile","llama-4-maverick","llama-4-scout","llama-guard-4","llama-prompt-guard-2-22m","llama-prompt-guard-2-86m","mistral-large-2411","mistral-nemo","mistral-small","o1","o1-mini","o3","o3-mini","o3-pro","o4-mini","qwen2.5-coder-7b-fast","qwen3-235b-a22b-thinking","qwen3-30b-a3b","qwen3-32b","qwen3-coder","qwen3-coder-30b-a3b-instruct","qwen3-next-80b-a3b-instruct","qwen3-vl-235b-a22b-instruct","sonar","sonar-deep-research","sonar-pro","sonar-reasoning","sonar-reasoning-pro"],docUrl:"https://helicone.ai/models",gateway:"models.dev"},"ollama-cloud":{url:"https://ollama.com/v1",apiKeyEnvVar:"OLLAMA_API_KEY",apiKeyHeader:"Authorization",name:"Ollama Cloud",models:["cogito-2.1:671b","deepseek-v3.1:671b","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2:123b","devstral-small-2:24b","gemini-3-flash-preview","gemma3:12b","gemma3:27b","gemma3:4b","gemma4:31b","glm-4.6","glm-4.7","glm-5","glm-5.1","gpt-oss:120b","gpt-oss:20b","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","kimi-k2:1t","minimax-m2","minimax-m2.1","minimax-m2.5","minimax-m2.7","ministral-3:14b","ministral-3:3b","ministral-3:8b","mistral-large-3:675b","nemotron-3-nano:30b","nemotron-3-super","qwen3-coder-next","qwen3-coder:480b","qwen3-next:80b","qwen3-vl:235b","qwen3-vl:235b-instruct","qwen3.5:397b","rnj-1:8b"],docUrl:"https://docs.ollama.com/cloud",gateway:"models.dev"},"zai-coding-plan":{url:"https://api.z.ai/api/coding/paas/v4",apiKeyEnvVar:"ZHIPU_API_KEY",apiKeyHeader:"Authorization",name:"Z.AI Coding Plan",models:["glm-4.5-air","glm-4.7","glm-5-turbo","glm-5.1","glm-5v-turbo"],docUrl:"https://docs.z.ai/devpack/overview",gateway:"models.dev"},"umans-ai-coding-plan":{url:"https://api.code.umans.ai/v1",apiKeyEnvVar:"UMANS_AI_CODING_PLAN_API_KEY",apiKeyHeader:"Authorization",name:"Umans AI Coding Plan",models:["umans-coder","umans-flash","umans-glm-5.1","umans-kimi-k2.6","umans-qwen3.6-35b-a3b"],docUrl:"https://app.umans.ai/offers/code/docs",gateway:"models.dev"},"the-grid-ai":{url:"https://api.thegrid.ai/v1",apiKeyEnvVar:"THEGRIDAI_API_KEY",apiKeyHeader:"Authorization",name:"The Grid AI",models:["text-max","text-prime","text-standard"],docUrl:"https://thegrid.ai/docs",gateway:"models.dev"},baseten:{url:"https://inference.baseten.co/v1",apiKeyEnvVar:"BASETEN_API_KEY",apiKeyHeader:"Authorization",name:"Baseten",models:["MiniMaxAI/MiniMax-M2.5","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","nvidia/Nemotron-120B-A12B","openai/gpt-oss-120b","zai-org/GLM-4.6","zai-org/GLM-4.7","zai-org/GLM-5"],docUrl:"https://docs.baseten.co/development/model-apis/overview",gateway:"models.dev"},frogbot:{url:"https://app.frogbot.ai/api/v1",apiKeyEnvVar:"FROGBOT_API_KEY",apiKeyHeader:"Authorization",name:"FrogBot",models:["claude-haiku-4-5","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-6","deepseek-v4-pro","gemini-2.5-flash","gemini-2.5-pro","gemini-3-1-pro-preview","gemini-3-flash-preview","gpt-4o","gpt-5-3-codex","gpt-5-4-mini","gpt-5-4-nano","gpt-5-5","gpt-oss-120b","gpt-oss-20b","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-3","grok-code-fast-1","kimi-k2-6","kimi-k2.5","minimax-m2-5","minimax-m2-7","qwen-3-6-plus","zai-glm-5-1"],docUrl:"https://docs.frogbot.ai",gateway:"models.dev"},"zhipuai-coding-plan":{url:"https://open.bigmodel.cn/api/coding/paas/v4",apiKeyEnvVar:"ZHIPU_API_KEY",apiKeyHeader:"Authorization",name:"Zhipu AI Coding Plan",models:["glm-4.5-air","glm-4.7","glm-5-turbo","glm-5.1","glm-5v-turbo"],docUrl:"https://docs.bigmodel.cn/cn/coding-plan/overview",gateway:"models.dev"},"alibaba-coding-plan":{url:"https://coding-intl.dashscope.aliyuncs.com/v1",apiKeyEnvVar:"ALIBABA_CODING_PLAN_API_KEY",apiKeyHeader:"Authorization",name:"Alibaba Coding Plan",models:["MiniMax-M2.5","glm-4.7","glm-5","kimi-k2.5","qwen3-coder-next","qwen3-coder-plus","qwen3-max-2026-01-23","qwen3.5-plus","qwen3.6-plus"],docUrl:"https://www.alibabacloud.com/help/en/model-studio/coding-plan",gateway:"models.dev"},cerebras:{apiKeyEnvVar:"CEREBRAS_API_KEY",name:"Cerebras",models:["gpt-oss-120b","llama3.1-8b","qwen-3-235b-a22b-instruct-2507","zai-glm-4.7"],docUrl:"https://inference-docs.cerebras.ai/models/overview",gateway:"models.dev",npm:"@ai-sdk/cerebras"},lmstudio:{url:"http://127.0.0.1:1234/v1",apiKeyEnvVar:"LMSTUDIO_API_KEY",apiKeyHeader:"Authorization",name:"LMStudio",models:["openai/gpt-oss-20b","qwen/qwen3-30b-a3b-2507","qwen/qwen3-coder-30b"],docUrl:"https://lmstudio.ai/models",gateway:"models.dev"},lucidquery:{url:"https://lucidquery.com/api/v1",apiKeyEnvVar:"LUCIDQUERY_API_KEY",apiKeyHeader:"Authorization",name:"LucidQuery AI",models:["lucidnova-rf1-100b","lucidquery-nexus-coder"],docUrl:"https://lucidquery.com/api/docs",gateway:"models.dev"},"moonshotai-cn":{url:"https://api.moonshot.cn/anthropic/v1",apiKeyEnvVar:"MOONSHOT_API_KEY",apiKeyHeader:"Authorization",name:"Moonshot AI (China)",models:["kimi-k2-0711-preview","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2-turbo-preview","kimi-k2.5","kimi-k2.6"],docUrl:"https://platform.moonshot.cn/docs/api/chat",gateway:"models.dev",npm:"@ai-sdk/anthropic"},gmicloud:{url:"https://api.gmi-serving.com/v1",apiKeyEnvVar:"GMICLOUD_API_KEY",apiKeyHeader:"Authorization",name:"GMI Cloud",models:["anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6","deepseek-ai/DeepSeek-V4-Flash","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2.6","zai-org/GLM-5-FP8","zai-org/GLM-5.1-FP8"],docUrl:"https://docs.gmicloud.ai/inference-engine/api-reference/llm-api-reference",gateway:"models.dev"},"abliteration-ai":{url:"https://api.abliteration.ai/v1",apiKeyEnvVar:"ABLIT_KEY",apiKeyHeader:"Authorization",name:"abliteration.ai",models:["abliterated-model"],docUrl:"https://docs.abliteration.ai/models",gateway:"models.dev"},"wafer.ai":{url:"https://pass.wafer.ai/v1",apiKeyEnvVar:"WAFER_API_KEY",apiKeyHeader:"Authorization",name:"Wafer",models:["GLM-5.1","Qwen3.5-397B-A17B"],docUrl:"https://docs.wafer.ai/wafer-pass",gateway:"models.dev"},xpersona:{url:"https://xpersona.co/v1",apiKeyEnvVar:"XPERSONA_API_KEY",apiKeyHeader:"Authorization",name:"Xpersona",models:["xpersona-frieren-coder"],docUrl:"https://xpersona.co/docs",gateway:"models.dev"},"cloudferro-sherlock":{url:"https://api-sherlock.cloudferro.com/openai/v1/",apiKeyEnvVar:"CLOUDFERRO_SHERLOCK_API_KEY",apiKeyHeader:"Authorization",name:"CloudFerro Sherlock",models:["MiniMaxAI/MiniMax-M2.5","meta-llama/Llama-3.3-70B-Instruct","openai/gpt-oss-120b","speakleash/Bielik-11B-v2.6-Instruct","speakleash/Bielik-11B-v3.0-Instruct"],docUrl:"https://docs.sherlock.cloudferro.com/",gateway:"models.dev"},"kuae-cloud-coding-plan":{url:"https://coding-plan-endpoint.kuaecloud.net/v1",apiKeyEnvVar:"KUAE_API_KEY",apiKeyHeader:"Authorization",name:"KUAE Cloud Coding Plan",models:["GLM-4.7"],docUrl:"https://docs.mthreads.com/kuaecloud/kuaecloud-doc-online/coding_plan/",gateway:"models.dev"},xai:{apiKeyEnvVar:"XAI_API_KEY",name:"xAI",models:["grok-2","grok-2-1212","grok-2-latest","grok-2-vision","grok-2-vision-1212","grok-2-vision-latest","grok-3","grok-3-fast","grok-3-fast-latest","grok-3-latest","grok-3-mini","grok-3-mini-fast","grok-3-mini-fast-latest","grok-3-mini-latest","grok-4","grok-4-1-fast","grok-4-1-fast-non-reasoning","grok-4-fast","grok-4-fast-non-reasoning","grok-4.20-0309-non-reasoning","grok-4.20-0309-reasoning","grok-4.20-multi-agent-0309","grok-4.3","grok-beta","grok-code-fast-1","grok-vision-beta"],docUrl:"https://docs.x.ai/docs/models",gateway:"models.dev",npm:"@ai-sdk/xai"},meganova:{url:"https://api.meganova.ai/v1",apiKeyEnvVar:"MEGANOVA_API_KEY",apiKeyHeader:"Authorization",name:"Meganova",models:["MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3.5-Plus","XiaomiMiMo/MiMo-V2-Flash","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-Exp","meta-llama/Llama-3.3-70B-Instruct","mistralai/Mistral-Nemo-Instruct-2407","mistralai/Mistral-Small-3.2-24B-Instruct-2506","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","zai-org/GLM-4.6","zai-org/GLM-4.7","zai-org/GLM-5"],docUrl:"https://docs.meganova.ai",gateway:"models.dev"},evroc:{url:"https://models.think.evroc.com/v1",apiKeyEnvVar:"EVROC_API_KEY",apiKeyHeader:"Authorization",name:"evroc",models:["KBLab/kb-whisper-large","Qwen/Qwen3-30B-A3B-Instruct-2507-FP8","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-VL-30B-A3B-Instruct","intfloat/multilingual-e5-large-instruct","microsoft/Phi-4-multimodal-instruct","mistralai/Magistral-Small-2509","mistralai/Voxtral-Small-24B-2507","mistralai/devstral-small-2-24b-instruct-2512","moonshotai/Kimi-K2.5","nvidia/Llama-3.3-70B-Instruct-FP8","openai/gpt-oss-120b","openai/whisper-large-v3"],docUrl:"https://docs.evroc.com/products/think/overview.html",gateway:"models.dev"},nearai:{url:"https://cloud-api.near.ai/v1",apiKeyEnvVar:"NEARAI_API_KEY",apiKeyHeader:"Authorization",name:"NEAR AI Cloud",models:["Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-Embedding-0.6B","Qwen/Qwen3-Reranker-0.6B","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3.5-122B-A10B","anthropic/claude-haiku-4-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","black-forest-labs/FLUX.2-klein-4B","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3.1-flash-lite","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-5","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5.1","openai/gpt-5.2","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5","openai/gpt-oss-120b","openai/o3","openai/o3-mini","openai/o4-mini","openai/whisper-large-v3","zai-org/GLM-5.1-FP8"],docUrl:"https://docs.near.ai/",gateway:"models.dev"},synthetic:{url:"https://api.synthetic.new/openai/v1",apiKeyEnvVar:"SYNTHETIC_API_KEY",apiKeyHeader:"Authorization",name:"Synthetic",models:["hf:MiniMaxAI/MiniMax-M2","hf:MiniMaxAI/MiniMax-M2.1","hf:MiniMaxAI/MiniMax-M2.5","hf:Qwen/Qwen2.5-Coder-32B-Instruct","hf:Qwen/Qwen3-235B-A22B-Instruct-2507","hf:Qwen/Qwen3-235B-A22B-Thinking-2507","hf:Qwen/Qwen3-Coder-480B-A35B-Instruct","hf:Qwen/Qwen3.5-397B-A17B","hf:deepseek-ai/DeepSeek-R1","hf:deepseek-ai/DeepSeek-R1-0528","hf:deepseek-ai/DeepSeek-V3","hf:deepseek-ai/DeepSeek-V3-0324","hf:deepseek-ai/DeepSeek-V3.1","hf:deepseek-ai/DeepSeek-V3.1-Terminus","hf:deepseek-ai/DeepSeek-V3.2","hf:meta-llama/Llama-3.1-405B-Instruct","hf:meta-llama/Llama-3.1-70B-Instruct","hf:meta-llama/Llama-3.1-8B-Instruct","hf:meta-llama/Llama-3.3-70B-Instruct","hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","hf:meta-llama/Llama-4-Scout-17B-16E-Instruct","hf:moonshotai/Kimi-K2-Instruct-0905","hf:moonshotai/Kimi-K2-Thinking","hf:moonshotai/Kimi-K2.5","hf:moonshotai/Kimi-K2.6","hf:nvidia/Kimi-K2.5-NVFP4","hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4","hf:openai/gpt-oss-120b","hf:zai-org/GLM-4.6","hf:zai-org/GLM-4.7","hf:zai-org/GLM-4.7-Flash","hf:zai-org/GLM-5","hf:zai-org/GLM-5.1"],docUrl:"https://synthetic.new/pricing",gateway:"models.dev"},nvidia:{url:"https://integrate.api.nvidia.com/v1",apiKeyEnvVar:"NVIDIA_API_KEY",apiKeyHeader:"Authorization",name:"Nvidia",models:["abacusai/dracarys-llama-3_1-70b-instruct","baai/bge-m3","black-forest-labs/flux.1-dev","black-forest-labs/flux_1-kontext-dev","black-forest-labs/flux_1-schnell","black-forest-labs/flux_2-klein-4b","bytedance/seed-oss-36b-instruct","deepseek-ai/deepseek-v3.1-terminus","deepseek-ai/deepseek-v3.2","deepseek-ai/deepseek-v4-flash","deepseek-ai/deepseek-v4-pro","google/gemma-2-2b-it","google/gemma-3-27b-it","google/gemma-3n-e2b-it","google/gemma-3n-e4b-it","google/gemma-4-31b-it","google/google-paligemma","meta/esm2-650m","meta/esmfold","meta/llama-3.1-70b-instruct","meta/llama-3.1-8b-instruct","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-1b-instruct","meta/llama-3.2-3b-instruct","meta/llama-3.2-90b-vision-instruct","meta/llama-3.3-70b-instruct","meta/llama-4-maverick-17b-128e-instruct","meta/llama-guard-4-12b","microsoft/phi-4-mini-instruct","microsoft/phi-4-multimodal-instruct","minimaxai/minimax-m2.5","minimaxai/minimax-m2.7","mistralai/devstral-2-123b-instruct-2512","mistralai/magistral-small-2506","mistralai/mistral-7b-instruct-v03","mistralai/mistral-large-3-675b-instruct-2512","mistralai/mistral-medium-3-instruct","mistralai/mistral-nemotron","mistralai/mistral-small-4-119b-2603","mistralai/mixtral-8x22b-instruct","mistralai/mixtral-8x7b-instruct","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-instruct-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.6","nvidia/active-speaker-detection","nvidia/bevformer","nvidia/cosmos-predict1-5b","nvidia/cosmos-transfer1-7b","nvidia/cosmos-transfer2_5-2b","nvidia/gliner-pii","nvidia/llama-3_1-nemotron-safety-guard-8b-v3","nvidia/llama-3_2-nemoretriever-300m-embed-v1","nvidia/llama-3_3-nemotron-super-49b-v1","nvidia/llama-3_3-nemotron-super-49b-v1_5","nvidia/llama-nemotron-embed-vl-1b-v2","nvidia/llama-nemotron-rerank-vl-1b-v2","nvidia/magpie-tts-zeroshot","nvidia/nemotron-3-content-safety","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-content-safety-reasoning-4b","nvidia/nemotron-mini-4b-instruct","nvidia/nemotron-voicechat","nvidia/nv-embed-v1","nvidia/nv-embedcode-7b-v1","nvidia/nvidia-nemotron-nano-9b-v2","nvidia/rerank-qa-mistral-4b","nvidia/riva-translate-4b-instruct-v1_1","nvidia/sparsedrive","nvidia/streampetr","nvidia/studiovoice","nvidia/synthetic-video-detector","nvidia/usdcode","nvidia/usdvalidate","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/whisper-large-v3","qwen/qwen-image","qwen/qwen-image-edit","qwen/qwen2.5-coder-32b-instruct","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-397b-a17b","sarvamai/sarvam-m","stepfun-ai/step-3.5-flash","upstage/solar-10_7b-instruct","z-ai/glm-5.1","z-ai/glm4.7"],docUrl:"https://docs.api.nvidia.com/nim/",gateway:"models.dev"},inference:{url:"https://inference.net/v1",apiKeyEnvVar:"INFERENCE_API_KEY",apiKeyHeader:"Authorization",name:"Inference",models:["google/gemma-3","meta/llama-3.1-8b-instruct","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-1b-instruct","meta/llama-3.2-3b-instruct","mistral/mistral-nemo-12b-instruct","osmosis/osmosis-structure-0.6b","qwen/qwen-2.5-7b-vision-instruct","qwen/qwen3-embedding-4b"],docUrl:"https://inference.net/models",gateway:"models.dev"},inception:{url:"https://api.inceptionlabs.ai/v1/",apiKeyEnvVar:"INCEPTION_API_KEY",apiKeyHeader:"Authorization",name:"Inception",models:["mercury-2","mercury-edit-2"],docUrl:"https://platform.inceptionlabs.ai/docs",gateway:"models.dev"},openai:{apiKeyEnvVar:"OPENAI_API_KEY",name:"OpenAI",models:["chatgpt-image-latest","gpt-3.5-turbo","gpt-4","gpt-4-turbo","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-2024-05-13","gpt-4o-2024-08-06","gpt-4o-2024-11-20","gpt-4o-mini","gpt-5","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.2-pro","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","gpt-image-1","gpt-image-1-mini","gpt-image-1.5","o1","o1-mini","o1-preview","o1-pro","o3","o3-deep-research","o3-mini","o3-pro","o4-mini","o4-mini-deep-research","text-embedding-3-large","text-embedding-3-small","text-embedding-ada-002"],docUrl:"https://platform.openai.com/docs/models",gateway:"models.dev",npm:"@ai-sdk/openai"},requesty:{url:"https://router.requesty.ai/v1",apiKeyEnvVar:"REQUESTY_API_KEY",apiKeyHeader:"Authorization",name:"Requesty",models:["anthropic/claude-3-7-sonnet","anthropic/claude-haiku-4-5","anthropic/claude-opus-4","anthropic/claude-opus-4-1","anthropic/claude-opus-4-5","anthropic/claude-opus-4-6","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","google/gemini-2.5-flash","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3-pro-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-pro","openai/o4-mini","xai/grok-4","xai/grok-4-fast"],docUrl:"https://requesty.ai/solution/llm-routing/models",gateway:"models.dev"},digitalocean:{url:"https://inference.do-ai.run/v1",apiKeyEnvVar:"DIGITALOCEAN_ACCESS_TOKEN",apiKeyHeader:"Authorization",name:"DigitalOcean",models:["alibaba-qwen3-32b","all-mini-lm-l6-v2","anthropic-claude-4.1-opus","anthropic-claude-4.5-haiku","anthropic-claude-4.5-sonnet","anthropic-claude-4.6-sonnet","anthropic-claude-haiku-4.5","anthropic-claude-opus-4","anthropic-claude-opus-4.5","anthropic-claude-opus-4.6","anthropic-claude-opus-4.7","anthropic-claude-sonnet-4","arcee-trinity-large-thinking","bge-m3","bge-reranker-v2-m3","deepseek-3.2","deepseek-r1-distill-llama-70b","deepseek-v3","deepseek-v4-pro","e5-large-v2","fal-ai/elevenlabs/tts/multilingual-v2","fal-ai/fast-sdxl","fal-ai/flux/schnell","fal-ai/stable-audio-25/text-to-audio","gemma-4-31B-it","glm-5","gte-large-en-v1.5","kimi-k2.5","kimi-k2.6","llama-4-maverick","llama3-8b-instruct","llama3.3-70b-instruct","minimax-m2.5","ministral-3-8b-instruct-2512","mistral-3-14B","mistral-7b-instruct-v0.3","multi-qa-mpnet-base-dot-v1","nemotron-3-nano-30b","nemotron-3-nano-omni","nemotron-nano-12b-v2-vl","nvidia-nemotron-3-super-120b","openai-gpt-4.1","openai-gpt-4o","openai-gpt-4o-mini","openai-gpt-5","openai-gpt-5-mini","openai-gpt-5-nano","openai-gpt-5.1-codex-max","openai-gpt-5.2","openai-gpt-5.2-pro","openai-gpt-5.3-codex","openai-gpt-5.4","openai-gpt-5.4-mini","openai-gpt-5.4-nano","openai-gpt-5.4-pro","openai-gpt-5.5","openai-gpt-image-1","openai-gpt-image-1.5","openai-gpt-image-2","openai-gpt-oss-120b","openai-gpt-oss-20b","openai-o1","openai-o3","openai-o3-mini","qwen-2.5-14b-instruct","qwen3-coder-flash","qwen3-embedding-0.6b","qwen3-tts-voicedesign","qwen3.5-397b-a17b","stable-diffusion-3.5-large","wan2-2-t2v-a14b"],docUrl:"https://docs.digitalocean.com/products/gradient-ai-platform/details/models/",gateway:"models.dev"},vultr:{url:"https://api.vultrinference.com/v1",apiKeyEnvVar:"VULTR_API_KEY",apiKeyHeader:"Authorization",name:"Vultr",models:["DeepSeek-V3.2","GLM-5-FP8","Kimi-K2.5","MiniMax-M2.5","gpt-oss-120b"],docUrl:"https://api.vultrinference.com/",gateway:"models.dev"},"alibaba-coding-plan-cn":{url:"https://coding.dashscope.aliyuncs.com/v1",apiKeyEnvVar:"ALIBABA_CODING_PLAN_API_KEY",apiKeyHeader:"Authorization",name:"Alibaba Coding Plan (China)",models:["MiniMax-M2.5","glm-4.7","glm-5","kimi-k2.5","qwen3-coder-next","qwen3-coder-plus","qwen3-max-2026-01-23","qwen3.5-plus","qwen3.6-plus"],docUrl:"https://help.aliyun.com/zh/model-studio/coding-plan",gateway:"models.dev"},mistral:{url:"https://api.mistral.ai/v1",apiKeyEnvVar:"MISTRAL_API_KEY",name:"Mistral",models:["codestral-latest","devstral-2512","devstral-medium-2507","devstral-medium-latest","devstral-small-2505","devstral-small-2507","labs-devstral-small-2512","magistral-medium-latest","magistral-small","ministral-3b-latest","ministral-8b-latest","mistral-embed","mistral-large-2411","mistral-large-2512","mistral-large-latest","mistral-medium-2505","mistral-medium-2508","mistral-medium-2604","mistral-medium-latest","mistral-nemo","mistral-small-2506","mistral-small-2603","mistral-small-latest","open-mistral-7b","open-mixtral-8x22b","open-mixtral-8x7b","pixtral-12b","pixtral-large-latest"],docUrl:"https://docs.mistral.ai/getting-started/models/",gateway:"models.dev",npm:"@ai-sdk/mistral"},ovhcloud:{url:"https://oai.endpoints.kepler.ai.cloud.ovh.net/v1",apiKeyEnvVar:"OVHCLOUD_API_KEY",apiKeyHeader:"Authorization",name:"OVHcloud AI Endpoints",models:["gpt-oss-120b","gpt-oss-20b","llama-3.1-8b-instruct","meta-llama-3_3-70b-instruct","mistral-7b-instruct-v0.3","mistral-nemo-instruct-2407","mistral-small-3.2-24b-instruct-2506","qwen2.5-vl-72b-instruct","qwen3-32b","qwen3-coder-30b-a3b-instruct","qwen3.5-9b"],docUrl:"https://www.ovhcloud.com/en/public-cloud/ai-endpoints/catalog//",gateway:"models.dev"},friendli:{url:"https://api.friendli.ai/serverless/v1",apiKeyEnvVar:"FRIENDLI_TOKEN",apiKeyHeader:"Authorization",name:"Friendli",models:["MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3-235B-A22B-Instruct-2507","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.3-70B-Instruct","zai-org/GLM-5","zai-org/GLM-5.1"],docUrl:"https://friendli.ai/docs/guides/serverless_endpoints/introduction",gateway:"models.dev"},cortecs:{url:"https://api.cortecs.ai/v1",apiKeyEnvVar:"CORTECS_API_KEY",apiKeyHeader:"Authorization",name:"Cortecs",models:["claude-4-5-sonnet","claude-4-6-sonnet","claude-haiku-4-5","claude-opus4-5","claude-opus4-6","claude-opus4-7","claude-sonnet-4","codestral-2508","deepseek-r1-0528","deepseek-v3-0324","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2512","devstral-small-2512","gemini-2.5-pro","glm-4.5","glm-4.5-air","glm-4.7","glm-4.7-flash","glm-5","glm-5.1","gpt-4.1","gpt-oss-120b","hermes-4-70b","intellect-3","kimi-k2-instruct","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","llama-3.1-405b-instruct","llama-3.3-70b-instruct","minimax-m2","minimax-m2.1","minimax-m2.5","minimax-m2.7","mistral-large-2512","mixtral-8x7B-instruct-v0.1","nemotron-3-super-120b-a12b","nova-pro-v1","qwen-2.5-72b-instruct","qwen3-235b-a22b-instruct-2507","qwen3-32b","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-next","qwen3-next-80b-a3b-thinking","qwen3.5-122b-a10b","qwen3.5-397b-a17b"],docUrl:"https://api.cortecs.ai/v1/models",gateway:"models.dev"},siliconflow:{url:"https://api.siliconflow.com/v1",apiKeyEnvVar:"SILICONFLOW_API_KEY",apiKeyHeader:"Authorization",name:"SiliconFlow",models:["ByteDance-Seed/Seed-OSS-36B-Instruct","MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/QwQ-32B","Qwen/Qwen2.5-14B-Instruct","Qwen/Qwen2.5-32B-Instruct","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-72B-Instruct-128K","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen2.5-VL-7B-Instruct","Qwen/Qwen3-14B","Qwen/Qwen3-235B-A22B","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-32B","Qwen/Qwen3-8B","Qwen/Qwen3-Coder-30B-A3B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Omni-30B-A3B-Captioner","Qwen/Qwen3-Omni-30B-A3B-Instruct","Qwen/Qwen3-Omni-30B-A3B-Thinking","Qwen/Qwen3-VL-235B-A22B-Instruct","Qwen/Qwen3-VL-235B-A22B-Thinking","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3-VL-30B-A3B-Thinking","Qwen/Qwen3-VL-32B-Instruct","Qwen/Qwen3-VL-32B-Thinking","Qwen/Qwen3-VL-8B-Instruct","Qwen/Qwen3-VL-8B-Thinking","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","baidu/ERNIE-4.5-300B-A47B","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-R1-Distill-Qwen-14B","deepseek-ai/DeepSeek-R1-Distill-Qwen-32B","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-Exp","deepseek-ai/deepseek-v4-flash","deepseek-ai/deepseek-v4-pro","deepseek-ai/deepseek-vl2","inclusionAI/Ling-flash-2.0","inclusionAI/Ling-mini-2.0","inclusionAI/Ring-flash-2.0","meta-llama/Meta-Llama-3.1-8B-Instruct","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","nex-agi/DeepSeek-V3.1-Nex-N1","openai/gpt-oss-120b","openai/gpt-oss-20b","stepfun-ai/Step-3.5-Flash","tencent/Hunyuan-A13B-Instruct","tencent/Hunyuan-MT-7B","zai-org/GLM-4.5","zai-org/GLM-4.5-Air","zai-org/GLM-4.5V","zai-org/GLM-4.6","zai-org/GLM-4.6V","zai-org/GLM-4.7","zai-org/GLM-5","zai-org/GLM-5.1","zai-org/GLM-5V-Turbo"],docUrl:"https://cloud.siliconflow.com/models",gateway:"models.dev"},vercel:{apiKeyEnvVar:"AI_GATEWAY_API_KEY",name:"Vercel AI Gateway",models:["alibaba/qwen-3-14b","alibaba/qwen-3-235b","alibaba/qwen-3-30b","alibaba/qwen-3-32b","alibaba/qwen-3.6-max-preview","alibaba/qwen3-235b-a22b-thinking","alibaba/qwen3-coder","alibaba/qwen3-coder-30b-a3b","alibaba/qwen3-coder-next","alibaba/qwen3-coder-plus","alibaba/qwen3-embedding-0.6b","alibaba/qwen3-embedding-4b","alibaba/qwen3-embedding-8b","alibaba/qwen3-max","alibaba/qwen3-max-preview","alibaba/qwen3-max-thinking","alibaba/qwen3-next-80b-a3b-instruct","alibaba/qwen3-next-80b-a3b-thinking","alibaba/qwen3-vl-235b-a22b-instruct","alibaba/qwen3-vl-instruct","alibaba/qwen3-vl-thinking","alibaba/qwen3.5-flash","alibaba/qwen3.5-plus","alibaba/qwen3.6-27b","alibaba/qwen3.6-plus","amazon/nova-2-lite","amazon/nova-lite","amazon/nova-micro","amazon/nova-pro","amazon/titan-embed-text-v2","anthropic/claude-3-haiku","anthropic/claude-3-opus","anthropic/claude-3.5-haiku","anthropic/claude-3.5-sonnet","anthropic/claude-3.5-sonnet-20240620","anthropic/claude-3.7-sonnet","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-mini","bfl/flux-kontext-max","bfl/flux-kontext-pro","bfl/flux-pro-1.0-fill","bfl/flux-pro-1.1","bfl/flux-pro-1.1-ultra","bytedance/seed-1.6","bytedance/seed-1.8","cohere/command-a","cohere/embed-v4.0","deepseek/deepseek-r1","deepseek/deepseek-v3","deepseek/deepseek-v3.1","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-thinking","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.0-flash","google/gemini-2.0-flash-lite","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-image-preview","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-flash-preview-09-2025","google/gemini-2.5-pro","google/gemini-3-flash","google/gemini-3-pro-image","google/gemini-3-pro-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-embedding-001","google/gemini-embedding-2","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","google/imagen-4.0-fast-generate-001","google/imagen-4.0-generate-001","google/imagen-4.0-ultra-generate-001","google/text-embedding-005","google/text-multilingual-embedding-002","inception/mercury-2","inception/mercury-coder-small","inception/mercury-edit-2","interfaze/interfaze-beta","kwaipilot/kat-coder-pro-v1","kwaipilot/kat-coder-pro-v2","meituan/longcat-flash-chat","meituan/longcat-flash-thinking","meituan/longcat-flash-thinking-2601","meta/llama-3.1-70b","meta/llama-3.1-8b","meta/llama-3.2-11b","meta/llama-3.2-1b","meta/llama-3.2-3b","meta/llama-3.2-90b","meta/llama-3.3-70b","meta/llama-4-maverick","meta/llama-4-scout","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.1-lightning","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","mistral/codestral","mistral/codestral-embed","mistral/devstral-2","mistral/devstral-small","mistral/devstral-small-2","mistral/magistral-medium","mistral/magistral-small","mistral/ministral-14b","mistral/ministral-3b","mistral/ministral-8b","mistral/mistral-embed","mistral/mistral-large-3","mistral/mistral-medium","mistral/mistral-nemo","mistral/mistral-small","mistral/mixtral-8x22b-instruct","mistral/pixtral-12b","mistral/pixtral-large","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-turbo","moonshotai/kimi-k2-turbo","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-nano-12b-v2-vl","nvidia/nemotron-nano-9b-v2","openai/codex-mini","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-instruct","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-4o-mini-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.1-instant","openai/gpt-5.1-thinking","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-pro","openai/o4-mini","openai/text-embedding-3-large","openai/text-embedding-3-small","openai/text-embedding-ada-002","perplexity/sonar","perplexity/sonar-pro","perplexity/sonar-reasoning","perplexity/sonar-reasoning-pro","prime-intellect/intellect-3","recraft/recraft-v2","recraft/recraft-v3","vercel/v0-1.0-md","vercel/v0-1.5-md","voyage/voyage-3-large","voyage/voyage-3.5","voyage/voyage-3.5-lite","voyage/voyage-4","voyage/voyage-4-large","voyage/voyage-4-lite","voyage/voyage-code-2","voyage/voyage-code-3","voyage/voyage-finance-2","voyage/voyage-law-2","xai/grok-2-vision","xai/grok-3","xai/grok-3-fast","xai/grok-3-mini","xai/grok-3-mini-fast","xai/grok-4","xai/grok-4-fast-non-reasoning","xai/grok-4-fast-reasoning","xai/grok-4.1-fast-non-reasoning","xai/grok-4.1-fast-reasoning","xai/grok-4.20-multi-agent","xai/grok-4.20-multi-agent-beta","xai/grok-4.20-non-reasoning","xai/grok-4.20-non-reasoning-beta","xai/grok-4.20-reasoning","xai/grok-4.20-reasoning-beta","xai/grok-4.3","xai/grok-code-fast-1","xai/grok-imagine-image","xai/grok-imagine-image-pro","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","zai/glm-4.5","zai/glm-4.5-air","zai/glm-4.5v","zai/glm-4.6","zai/glm-4.6v","zai/glm-4.6v-flash","zai/glm-4.7","zai/glm-4.7-flash","zai/glm-4.7-flashx","zai/glm-5","zai/glm-5-turbo","zai/glm-5.1","zai/glm-5v-turbo"],docUrl:"https://github.com/vercel/ai/tree/5eb85cc45a259553501f535b8ac79a77d0e79223/packages/gateway",gateway:"models.dev"},minimax:{url:"https://api.minimax.io/anthropic/v1",apiKeyEnvVar:"MINIMAX_API_KEY",apiKeyHeader:"Authorization",name:"MiniMax (minimax.io)",models:["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],docUrl:"https://platform.minimax.io/docs/guides/quickstart",gateway:"models.dev",npm:"@ai-sdk/anthropic"},llmgateway:{url:"https://api.llmgateway.io/v1",apiKeyEnvVar:"LLMGATEWAY_API_KEY",apiKeyHeader:"Authorization",name:"LLM Gateway",models:["auto","claude-3-5-sonnet-20241022","claude-3-7-sonnet","claude-3-7-sonnet-20250219","claude-3-opus","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-6","codestral-2508","custom","deepseek-r1-0528","deepseek-v3.1","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2512","devstral-small-2507","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-pro","gemini-3-flash-preview","gemini-3.1-flash-lite","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gemini-pro-latest","gemma-2-27b-it-together","gemma-3-12b-it","gemma-3-1b-it","gemma-3-27b","gemma-3-4b-it","gemma-3n-e2b-it","gemma-3n-e4b-it","glm-4-32b-0414-128k","glm-4.5","glm-4.5-air","glm-4.5-airx","glm-4.5-flash","glm-4.5-x","glm-4.5v","glm-4.6","glm-4.6v","glm-4.6v-flash","glm-4.6v-flashx","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5.1","gpt-3.5-turbo","gpt-4","gpt-4-turbo","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-4o-mini-search-preview","gpt-4o-search-preview","gpt-5","gpt-5-chat-latest","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.2-pro","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","gpt-oss-120b","gpt-oss-20b","grok-3","grok-4","grok-4-0709","grok-4-1-fast","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-20-beta-0309-non-reasoning","grok-4-20-beta-0309-reasoning","grok-4-3","grok-4-fast","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","hermes-2-pro-llama-3-8b","kimi-k2","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2.5","kimi-k2.6","llama-3-70b-instruct","llama-3-8b-instruct","llama-3.1-70b-instruct","llama-3.1-8b-instruct","llama-3.1-nemotron-ultra-253b","llama-3.2-11b-instruct","llama-3.2-3b-instruct","llama-3.3-70b-instruct","llama-4-maverick-17b-instruct","llama-4-scout","llama-4-scout-17b-instruct","mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2.5","mimo-v2.5-pro","minimax-m2","minimax-m2.1","minimax-m2.1-lightning","minimax-m2.5","minimax-m2.5-highspeed","minimax-m2.7","minimax-m2.7-highspeed","minimax-text-01","ministral-14b-2512","ministral-3b-2512","ministral-8b-2512","mistral-large-2512","mistral-large-latest","mistral-small-2506","o1","o3","o3-mini","o4-mini","pixtral-large-latest","qwen-coder-plus","qwen-flash","qwen-max","qwen-max-latest","qwen-omni-turbo","qwen-plus","qwen-plus-latest","qwen-turbo","qwen-vl-max","qwen-vl-plus","qwen2-5-vl-32b-instruct","qwen2-5-vl-72b-instruct","qwen25-coder-7b","qwen3-235b-a22b-fp8","qwen3-235b-a22b-instruct-2507","qwen3-235b-a22b-thinking-2507","qwen3-30b-a3b-fp8","qwen3-30b-a3b-instruct-2507","qwen3-30b-a3b-thinking-2507","qwen3-32b","qwen3-32b-fp8","qwen3-4b-fp8","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-next","qwen3-coder-plus","qwen3-max","qwen3-max-2026-01-23","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-vl-235b-a22b-instruct","qwen3-vl-235b-a22b-thinking","qwen3-vl-30b-a3b-instruct","qwen3-vl-30b-a3b-thinking","qwen3-vl-8b-instruct","qwen3-vl-flash","qwen3-vl-plus","qwen3.6-35b-a3b","qwen3.6-max-preview","qwen3.6-plus","qwen35-397b-a17b","qwq-plus","seed-1-6-250615","seed-1-6-250915","seed-1-6-flash-250715","seed-1-8-251228","sonar","sonar-pro","sonar-reasoning-pro"],docUrl:"https://llmgateway.io/docs",gateway:"models.dev"},"cloudflare-workers-ai":{url:"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1",apiKeyEnvVar:"CLOUDFLARE_API_KEY",apiKeyHeader:"Authorization",name:"Cloudflare Workers AI",models:["@cf/google/gemma-4-26b-a4b-it","@cf/meta/llama-4-scout-17b-16e-instruct","@cf/moonshotai/kimi-k2.5","@cf/moonshotai/kimi-k2.6","@cf/nvidia/nemotron-3-120b-a12b","@cf/openai/gpt-oss-120b","@cf/openai/gpt-oss-20b","@cf/zai-org/glm-4.7-flash"],docUrl:"https://developers.cloudflare.com/workers-ai/models/",gateway:"models.dev"},groq:{url:"https://api.groq.com/openai/v1",apiKeyEnvVar:"GROQ_API_KEY",name:"Groq",models:["allam-2-7b","canopylabs/orpheus-arabic-saudi","canopylabs/orpheus-v1-english","groq/compound","groq/compound-mini","llama-3.1-8b-instant","llama-3.3-70b-versatile","meta-llama/llama-4-scout-17b-16e-instruct","meta-llama/llama-prompt-guard-2-22m","meta-llama/llama-prompt-guard-2-86m","moonshotai/kimi-k2-instruct-0905","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","qwen/qwen3-32b","whisper-large-v3","whisper-large-v3-turbo"],docUrl:"https://console.groq.com/docs/models",gateway:"models.dev",npm:"@ai-sdk/groq"},fastrouter:{url:"https://go.fastrouter.ai/api/v1",apiKeyEnvVar:"FASTROUTER_API_KEY",apiKeyHeader:"Authorization",name:"FastRouter",models:["anthropic/claude-opus-4.1","anthropic/claude-sonnet-4","deepseek-ai/deepseek-r1-distill-llama-70b","google/gemini-2.5-flash","google/gemini-2.5-pro","moonshotai/kimi-k2","openai/gpt-4.1","openai/gpt-5","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-oss-120b","openai/gpt-oss-20b","qwen/qwen3-coder","x-ai/grok-4","z-ai/glm-5"],docUrl:"https://fastrouter.ai/models",gateway:"models.dev"},stackit:{url:"https://api.openai-compat.model-serving.eu01.onstackit.cloud/v1",apiKeyEnvVar:"STACKIT_API_KEY",apiKeyHeader:"Authorization",name:"STACKIT",models:["Qwen/Qwen3-VL-235B-A22B-Instruct-FP8","Qwen/Qwen3-VL-Embedding-8B","cortecs/Llama-3.3-70B-Instruct-FP8-Dynamic","google/gemma-3-27b-it","intfloat/e5-mistral-7b-instruct","neuralmagic/Meta-Llama-3.1-8B-Instruct-FP8","neuralmagic/Mistral-Nemo-Instruct-2407-FP8","openai/gpt-oss-120b"],docUrl:"https://docs.stackit.cloud/products/data-and-ai/ai-model-serving/basics/available-shared-models",gateway:"models.dev"},"tencent-coding-plan":{url:"https://api.lkeap.cloud.tencent.com/coding/v3",apiKeyEnvVar:"TENCENT_CODING_PLAN_API_KEY",apiKeyHeader:"Authorization",name:"Tencent Coding Plan (China)",models:["glm-5","hunyuan-2.0-instruct","hunyuan-2.0-thinking","hunyuan-t1","hunyuan-turbos","kimi-k2.5","minimax-m2.5","tc-code-latest"],docUrl:"https://cloud.tencent.com/document/product/1772/128947",gateway:"models.dev"},"privatemode-ai":{url:"http://localhost:8080/v1",apiKeyEnvVar:"PRIVATEMODE_API_KEY",apiKeyHeader:"Authorization",name:"Privatemode AI",models:["gemma-3-27b","gpt-oss-120b","qwen3-coder-30b-a3b","qwen3-embedding-4b","whisper-large-v3"],docUrl:"https://docs.privatemode.ai/api/overview",gateway:"models.dev"},google:{apiKeyEnvVar:"GOOGLE_GENERATIVE_AI_API_KEY",name:"Google",models:["gemini-1.5-flash","gemini-1.5-flash-8b","gemini-1.5-pro","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-image-preview","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-preview-04-17","gemini-2.5-flash-preview-05-20","gemini-2.5-flash-preview-09-2025","gemini-2.5-flash-preview-tts","gemini-2.5-pro","gemini-2.5-pro-preview-05-06","gemini-2.5-pro-preview-06-05","gemini-2.5-pro-preview-tts","gemini-3-flash-preview","gemini-3-pro-preview","gemini-3.1-flash-image-preview","gemini-3.1-flash-lite","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gemini-3.1-pro-preview-customtools","gemini-embedding-001","gemini-flash-latest","gemini-flash-lite-latest","gemini-live-2.5-flash","gemini-live-2.5-flash-preview-native-audio","gemma-3-12b-it","gemma-3-27b-it","gemma-3-4b-it","gemma-3n-e2b-it","gemma-3n-e4b-it","gemma-4-26b-a4b-it","gemma-4-31b-it"],docUrl:"https://ai.google.dev/gemini-api/docs/models",gateway:"models.dev",npm:"@ai-sdk/google"},drun:{url:"https://chat.d.run/v1",apiKeyEnvVar:"DRUN_API_KEY",apiKeyHeader:"Authorization",name:"D.Run (China)",models:["public/deepseek-r1","public/deepseek-v3","public/minimax-m25"],docUrl:"https://www.d.run",gateway:"models.dev"},moonshotai:{url:"https://api.moonshot.ai/anthropic/v1",apiKeyEnvVar:"MOONSHOT_API_KEY",apiKeyHeader:"Authorization",name:"Moonshot AI",models:["kimi-k2-0711-preview","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2-turbo-preview","kimi-k2.5","kimi-k2.6"],docUrl:"https://platform.moonshot.ai/docs/api/chat",gateway:"models.dev",npm:"@ai-sdk/anthropic"},berget:{url:"https://api.berget.ai/v1",apiKeyEnvVar:"BERGET_API_KEY",apiKeyHeader:"Authorization",name:"Berget.AI",models:["google/gemma-4-31B-it","meta-llama/Llama-3.3-70B-Instruct","mistralai/Mistral-Medium-3.5-128B","mistralai/Mistral-Small-3.2-24B-Instruct-2506","openai/gpt-oss-120b","zai-org/GLM-4.7"],docUrl:"https://api.berget.ai",gateway:"models.dev"},"github-models":{url:"https://models.github.ai/inference",apiKeyEnvVar:"GITHUB_TOKEN",apiKeyHeader:"Authorization",name:"GitHub Models",models:["ai21-labs/ai21-jamba-1.5-large","ai21-labs/ai21-jamba-1.5-mini","cohere/cohere-command-a","cohere/cohere-command-r","cohere/cohere-command-r-08-2024","cohere/cohere-command-r-plus","cohere/cohere-command-r-plus-08-2024","core42/jais-30b-chat","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-v3-0324","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-90b-vision-instruct","meta/llama-3.3-70b-instruct","meta/llama-4-maverick-17b-128e-instruct-fp8","meta/llama-4-scout-17b-16e-instruct","meta/meta-llama-3-70b-instruct","meta/meta-llama-3-8b-instruct","meta/meta-llama-3.1-405b-instruct","meta/meta-llama-3.1-70b-instruct","meta/meta-llama-3.1-8b-instruct","microsoft/mai-ds-r1","microsoft/phi-3-medium-128k-instruct","microsoft/phi-3-medium-4k-instruct","microsoft/phi-3-mini-128k-instruct","microsoft/phi-3-mini-4k-instruct","microsoft/phi-3-small-128k-instruct","microsoft/phi-3-small-8k-instruct","microsoft/phi-3.5-mini-instruct","microsoft/phi-3.5-moe-instruct","microsoft/phi-3.5-vision-instruct","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/phi-4-mini-reasoning","microsoft/phi-4-multimodal-instruct","microsoft/phi-4-reasoning","mistral-ai/codestral-2501","mistral-ai/ministral-3b","mistral-ai/mistral-large-2411","mistral-ai/mistral-medium-2505","mistral-ai/mistral-nemo","mistral-ai/mistral-small-2503","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/o1","openai/o1-mini","openai/o1-preview","openai/o3","openai/o3-mini","openai/o4-mini","xai/grok-3","xai/grok-3-mini"],docUrl:"https://docs.github.com/en/github-models",gateway:"models.dev"},neuralwatt:{url:"https://api.neuralwatt.com/v1",apiKeyEnvVar:"NEURALWATT_API_KEY",apiKeyHeader:"Authorization",name:"Neuralwatt",models:["MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3.5-397B-A17B-FP8","Qwen/Qwen3.6-35B-A3B","glm-5-fast","glm-5.1-fast","kimi-k2.5-fast","kimi-k2.6-fast","mistralai/Devstral-Small-2-24B-Instruct-2512","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-20b","qwen3.5-397b-fast","qwen3.6-35b-fast","zai-org/GLM-5.1-FP8"],docUrl:"https://portal.neuralwatt.com/docs",gateway:"models.dev"},sarvam:{url:"https://api.sarvam.ai/v1",apiKeyEnvVar:"SARVAM_API_KEY",apiKeyHeader:"Authorization",name:"Sarvam AI",models:["sarvam-105b","sarvam-30b"],docUrl:"https://docs.sarvam.ai/api-reference-docs/getting-started/models",gateway:"models.dev"},togetherai:{apiKeyEnvVar:"TOGETHER_API_KEY",name:"Together AI",models:["MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.7","Qwen/Qwen3-235B-A22B-Instruct-2507-tput","Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8","Qwen/Qwen3-Coder-Next-FP8","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.6-Plus","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3-1","deepseek-ai/DeepSeek-V4-Pro","essentialai/Rnj-1-Instruct","google/gemma-4-31B-it","meta-llama/Llama-3.3-70B-Instruct-Turbo","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-120b","zai-org/GLM-5.1"],docUrl:"https://docs.together.ai/docs/serverless-models",gateway:"models.dev",npm:"@ai-sdk/togetherai"},"qihang-ai":{url:"https://api.qhaigc.net/v1",apiKeyEnvVar:"QIHANG_API_KEY",apiKeyHeader:"Authorization",name:"QiHang",models:["claude-haiku-4-5-20251001","claude-opus-4-5-20251101","claude-sonnet-4-5-20250929","gemini-2.5-flash","gemini-3-flash-preview","gemini-3-pro-preview","gpt-5-mini","gpt-5.2","gpt-5.2-codex"],docUrl:"https://www.qhaigc.net/docs",gateway:"models.dev"},"tencent-tokenhub":{url:"https://tokenhub.tencentmaas.com/v1",apiKeyEnvVar:"TENCENT_TOKENHUB_API_KEY",apiKeyHeader:"Authorization",name:"Tencent TokenHub",models:["hy3-preview"],docUrl:"https://cloud.tencent.com/document/product/1823/130050",gateway:"models.dev"},anthropic:{apiKeyEnvVar:"ANTHROPIC_API_KEY",name:"Anthropic",models:["claude-3-5-haiku-20241022","claude-3-5-haiku-latest","claude-3-5-sonnet-20240620","claude-3-5-sonnet-20241022","claude-3-7-sonnet-20250219","claude-3-haiku-20240307","claude-3-opus-20240229","claude-3-sonnet-20240229","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-0","claude-opus-4-1","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-0","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-6"],docUrl:"https://docs.anthropic.com/en/docs/about-claude/models",gateway:"models.dev",npm:"@ai-sdk/anthropic"},modelscope:{url:"https://api-inference.modelscope.cn/v1",apiKeyEnvVar:"MODELSCOPE_API_KEY",apiKeyHeader:"Authorization",name:"ModelScope",models:["Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-Coder-30B-A3B-Instruct","ZhipuAI/GLM-4.5","ZhipuAI/GLM-4.6"],docUrl:"https://modelscope.cn/docs/model-service/API-Inference/intro",gateway:"models.dev"},"hpc-ai":{url:"https://api.hpc-ai.com/inference/v1",apiKeyEnvVar:"HPC_AI_API_KEY",apiKeyHeader:"Authorization",name:"HPC-AI",models:["minimax/minimax-m2.5","moonshotai/kimi-k2.5","zai-org/glm-5.1"],docUrl:"https://www.hpc-ai.com/doc/docs/quickstart/",gateway:"models.dev"},xiaomi:{url:"https://api.xiaomimimo.com/v1",apiKeyEnvVar:"XIAOMI_API_KEY",apiKeyHeader:"Authorization",name:"Xiaomi",models:["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2.5","mimo-v2.5-pro"],docUrl:"https://platform.xiaomimimo.com/#/docs",gateway:"models.dev"},clarifai:{url:"https://api.clarifai.com/v2/ext/openai/v1",apiKeyEnvVar:"CLARIFAI_PAT",apiKeyHeader:"Authorization",name:"Clarifai",models:["arcee_ai/AFM/models/trinity-mini","clarifai/main/models/mm-poly-8b","deepseek-ai/deepseek-ocr/models/DeepSeek-OCR","minimaxai/chat-completion/models/MiniMax-M2_5-high-throughput","mistralai/completion/models/Ministral-3-14B-Reasoning-2512","mistralai/completion/models/Ministral-3-3B-Reasoning-2512","moonshotai/chat-completion/models/Kimi-K2_6","openai/chat-completion/models/gpt-oss-120b-high-throughput","openai/chat-completion/models/gpt-oss-20b","qwen/qwenCoder/models/Qwen3-Coder-30B-A3B-Instruct","qwen/qwenLM/models/Qwen3-30B-A3B-Instruct-2507","qwen/qwenLM/models/Qwen3-30B-A3B-Thinking-2507"],docUrl:"https://docs.clarifai.com/compute/inference/",gateway:"models.dev"},"minimax-cn":{url:"https://api.minimaxi.com/anthropic/v1",apiKeyEnvVar:"MINIMAX_API_KEY",apiKeyHeader:"Authorization",name:"MiniMax (minimaxi.com)",models:["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],docUrl:"https://platform.minimaxi.com/docs/guides/quickstart",gateway:"models.dev",npm:"@ai-sdk/anthropic"},"regolo-ai":{url:"https://api.regolo.ai/v1",apiKeyEnvVar:"REGOLO_API_KEY",apiKeyHeader:"Authorization",name:"Regolo AI",models:["gpt-oss-120b","gpt-oss-20b","llama-3.1-8b-instruct","llama-3.3-70b-instruct","minimax-m2.5","mistral-small-4-119b","mistral-small3.2","qwen-image","qwen3-coder-next","qwen3-embedding-8b","qwen3-reranker-4b","qwen3.5-122b","qwen3.5-9b"],docUrl:"https://docs.regolo.ai/",gateway:"models.dev"},"xiaomi-token-plan-ams":{url:"https://token-plan-ams.xiaomimimo.com/v1",apiKeyEnvVar:"XIAOMI_API_KEY",apiKeyHeader:"Authorization",name:"Xiaomi Token Plan (Europe)",models:["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],docUrl:"https://platform.xiaomimimo.com/#/docs",gateway:"models.dev"},zhipuai:{url:"https://open.bigmodel.cn/api/paas/v4",apiKeyEnvVar:"ZHIPU_API_KEY",apiKeyHeader:"Authorization",name:"Zhipu AI",models:["glm-4.5","glm-4.5-air","glm-4.5-flash","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5.1","glm-5v-turbo"],docUrl:"https://docs.z.ai/guides/overview/pricing",gateway:"models.dev"},nova:{url:"https://api.nova.amazon.com/v1",apiKeyEnvVar:"NOVA_API_KEY",apiKeyHeader:"Authorization",name:"Nova",models:["nova-2-lite-v1","nova-2-pro-v1"],docUrl:"https://nova.amazon.com/dev/documentation",gateway:"models.dev"},"atomic-chat":{url:"http://127.0.0.1:1337/v1",apiKeyEnvVar:"ATOMIC_CHAT_API_KEY",apiKeyHeader:"Authorization",name:"Atomic Chat",models:["Meta-Llama-3_1-8B-Instruct-GGUF","Qwen3_5-9B-MLX-4bit","Qwen3_5-9B-Q4_K_M","gemma-4-E4B-it-IQ4_XS","gemma-4-E4B-it-MLX-4bit"],docUrl:"https://atomic.chat",gateway:"models.dev"},netlify:{apiKeyEnvVar:["NETLIFY_TOKEN","NETLIFY_SITE_ID"],apiKeyHeader:"Authorization",name:"Netlify",gateway:"netlify",models:["anthropic/claude-haiku-4-5","anthropic/claude-haiku-4-5-20251001","anthropic/claude-opus-4-1-20250805","anthropic/claude-opus-4-20250514","anthropic/claude-opus-4-5","anthropic/claude-opus-4-5-20251101","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-0","anthropic/claude-sonnet-4-20250514","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-5-20250929","anthropic/claude-sonnet-4-6","gemini/gemini-2.0-flash","gemini/gemini-2.0-flash-lite","gemini/gemini-2.5-flash","gemini/gemini-2.5-flash-image","gemini/gemini-2.5-flash-lite","gemini/gemini-2.5-pro","gemini/gemini-3-flash-preview","gemini/gemini-3-pro-image-preview","gemini/gemini-3.1-flash-image-preview","gemini/gemini-3.1-flash-lite","gemini/gemini-3.1-flash-lite-preview","gemini/gemini-3.1-pro-preview","gemini/gemini-3.1-pro-preview-customtools","gemini/gemini-flash-latest","gemini/gemini-flash-lite-latest","openai/chat-latest","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-2025-08-07","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-mini-2025-08-07","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-2025-11-13","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-2025-12-11","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.2-pro-2025-12-11","openai/gpt-5.3-chat-latest","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-2026-03-05","openai/gpt-5.4-mini","openai/gpt-5.4-mini-2026-03-17","openai/gpt-5.4-nano","openai/gpt-5.4-nano-2026-03-17","openai/gpt-5.4-pro","openai/gpt-5.4-pro-2026-03-05","openai/gpt-5.5","openai/gpt-5.5-2026-04-23","openai/gpt-5.5-pro","openai/gpt-5.5-pro-2026-04-23","openai/o3","openai/o3-mini","openai/o4-mini"],docUrl:"https://docs.netlify.com/build/ai-gateway/overview/"}},models:{"302ai":["MiniMax-M1","MiniMax-M2","MiniMax-M2.1","MiniMax-M2.7","MiniMax-M2.7-highspeed","chatgpt-4o-latest","claude-3-5-haiku-20241022","claude-3-5-haiku-latest","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-1-20250805-thinking","claude-opus-4-20250514","claude-opus-4-5","claude-opus-4-5-20251101","claude-opus-4-5-20251101-thinking","claude-opus-4-6","claude-opus-4-6-thinking","claude-opus-4-7","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929-thinking","claude-sonnet-4-6","claude-sonnet-4-6-thinking","deepseek-chat","deepseek-reasoner","deepseek-v3.2","deepseek-v3.2-thinking","doubao-seed-1-6-thinking-250715","doubao-seed-1-6-vision-250815","doubao-seed-1-8-251215","doubao-seed-code-preview-251028","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-nothink","gemini-2.5-flash-preview-09-2025","gemini-2.5-pro","gemini-3-flash-preview","gemini-3-pro-image-preview","gemini-3-pro-preview","gemini-3.1-flash-image-preview","glm-4.5","glm-4.5-air","glm-4.5-airx","glm-4.5-x","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flashx","glm-5","glm-5-turbo","glm-5.1","glm-5v-turbo","glm-for-coding","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-5","gpt-5-mini","gpt-5-pro","gpt-5-thinking","gpt-5.1","gpt-5.1-chat-latest","gpt-5.2","gpt-5.2-chat-latest","gpt-5.4","gpt-5.4-mini","gpt-5.4-mini-2026-03-17","gpt-5.4-nano","gpt-5.4-nano-2026-03-17","gpt-5.4-pro","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-4.1","grok-4.20-beta-0309-non-reasoning","grok-4.20-beta-0309-reasoning","grok-4.20-multi-agent-beta-0309","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","ministral-14b-2512","mistral-large-2512","qwen-flash","qwen-max-latest","qwen-plus","qwen3-235b-a22b","qwen3-235b-a22b-instruct-2507","qwen3-30b-a3b","qwen3-coder-480b-a35b-instruct","qwen3-max-2025-09-23"],alibaba:["qvq-max","qwen-flash","qwen-max","qwen-mt-plus","qwen-mt-turbo","qwen-omni-turbo","qwen-omni-turbo-realtime","qwen-plus","qwen-plus-character-ja","qwen-turbo","qwen-vl-max","qwen-vl-ocr","qwen-vl-plus","qwen2-5-14b-instruct","qwen2-5-32b-instruct","qwen2-5-72b-instruct","qwen2-5-7b-instruct","qwen2-5-omni-7b","qwen2-5-vl-72b-instruct","qwen2-5-vl-7b-instruct","qwen3-14b","qwen3-235b-a22b","qwen3-32b","qwen3-8b","qwen3-asr-flash","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-plus","qwen3-livetranslate-flash-realtime","qwen3-max","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-omni-flash","qwen3-omni-flash-realtime","qwen3-vl-235b-a22b","qwen3-vl-30b-a3b","qwen3-vl-plus","qwen3.5-122b-a10b","qwen3.5-27b","qwen3.5-35b-a3b","qwen3.5-397b-a17b","qwen3.5-plus","qwen3.6-27b","qwen3.6-35b-a3b","qwen3.6-max-preview","qwen3.6-plus","qwq-plus"],scaleway:["bge-multilingual-gemma2","deepseek-r1-distill-llama-70b","devstral-2-123b-instruct-2512","gemma-3-27b-it","gpt-oss-120b","llama-3.1-8b-instruct","llama-3.3-70b-instruct","mistral-nemo-instruct-2407","mistral-small-3.2-24b-instruct-2506","pixtral-12b-2409","qwen3-235b-a22b-instruct-2507","qwen3-coder-30b-a3b-instruct","qwen3-embedding-8b","qwen3.5-397b-a17b","voxtral-small-24b-2507","whisper-large-v3"],"nano-gpt":["Alibaba-NLP/Tongyi-DeepResearch-30B-A3B","Baichuan-M2","Baichuan4-Air","Baichuan4-Turbo","CrucibleLab/L3.3-70B-Loki-V2.0","Doctor-Shotgun/MS3.2-24B-Magnum-Diamond","EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.0","EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.1","EVA-UNIT-01/EVA-Qwen2.5-32B-v0.2","EVA-UNIT-01/EVA-Qwen2.5-72B-v0.2","Envoid/Llama-3.05-NT-Storybreaker-Ministral-70B","Envoid/Llama-3.05-Nemotron-Tenyxchat-Storybreaker-70B","GLM-4.5-Air-Derestricted","GLM-4.5-Air-Derestricted-Iceblink","GLM-4.5-Air-Derestricted-Iceblink-ReExtract","GLM-4.5-Air-Derestricted-Iceblink-v2","GLM-4.5-Air-Derestricted-Iceblink-v2-ReExtract","GLM-4.5-Air-Derestricted-Steam","GLM-4.5-Air-Derestricted-Steam-ReExtract","GLM-4.6-Derestricted-v5","GalrionSoftworks/MN-LooseCannon-12B-v1","Gemma-3-27B-ArliAI-RPMax-v3","Gemma-3-27B-Big-Tiger-v3","Gemma-3-27B-CardProjector-v4","Gemma-3-27B-Glitter","Gemma-3-27B-Nidum-Uncensored","Gemma-3-27B-it","Gemma-3-27B-it-Abliterated","Gryphe/MythoMax-L2-13b","Infermatic/MN-12B-Inferor-v0.0","KAT-Coder-Air-V1","KAT-Coder-Exp-72B-1010","KAT-Coder-Pro-V1","LLM360/K2-Think","LatitudeGames/Wayfarer-Large-70B-Llama-3.3","Llama-3.3+(3.1v3.3)-70B-Hanami-x1","Llama-3.3+(3.1v3.3)-70B-New-Dawn-v1.1","Llama-3.3+(3v3.3)-70B-TenyxChat-DaybreakStorywriter","Llama-3.3-70B-Anthrobomination","Llama-3.3-70B-Argunaut-1-SFT","Llama-3.3-70B-ArliAI-RPMax-v1.4","Llama-3.3-70B-ArliAI-RPMax-v2","Llama-3.3-70B-ArliAI-RPMax-v3","Llama-3.3-70B-Aurora-Borealis","Llama-3.3-70B-Bigger-Body","Llama-3.3-70B-Cirrus-x1","Llama-3.3-70B-Cu-Mai-R1","Llama-3.3-70B-Damascus-R1","Llama-3.3-70B-Dark-Ages-v0.1","Llama-3.3-70B-Electra-R1","Llama-3.3-70B-Electranova-v1.0","Llama-3.3-70B-Fallen-R1-v1","Llama-3.3-70B-Fallen-v1","Llama-3.3-70B-Forgotten-Abomination-v5.0","Llama-3.3-70B-Forgotten-Safeword-3.6","Llama-3.3-70B-GeneticLemonade-Opus","Llama-3.3-70B-GeneticLemonade-Unleashed-v3","Llama-3.3-70B-Ignition-v0.1","Llama-3.3-70B-Incandescent-Malevolence","Llama-3.3-70B-Legion-V2.1","Llama-3.3-70B-MS-Nevoria","Llama-3.3-70B-Magnum-v4-SE","Llama-3.3-70B-Magnum-v4-SE-Cirrus-x1-SLERP","Llama-3.3-70B-Mhnnn-x1","Llama-3.3-70B-MiraiFanfare","Llama-3.3-70B-Mokume-Gane-R1","Llama-3.3-70B-Nova","Llama-3.3-70B-Predatorial-Extasy","Llama-3.3-70B-Progenitor-V3.3","Llama-3.3-70B-RAWMAW","Llama-3.3-70B-Sapphira-0.1","Llama-3.3-70B-Sapphira-0.2","Llama-3.3-70B-Shakudo","Llama-3.3-70B-StrawberryLemonade-v1.0","Llama-3.3-70B-Strawberrylemonade-v1.2","Llama-3.3-70B-The-Omega-Directive-Unslop-v2.0","Llama-3.3-70B-The-Omega-Directive-Unslop-v2.1","Llama-3.3-70B-Vulpecula-R1","Magistral-Small-2506","MarinaraSpaghetti/NemoMix-Unleashed-12B","Meta-Llama-3-1-8B-Instruct-FP8","MiniMax-M1","MiniMax-M2","MiniMaxAI/MiniMax-M1-80k","Mistral-Nemo-12B-Instruct-2407","NeverSleep/Llama-3-Lumimaid-70B-v0.1","NeverSleep/Lumimaid-v0.2-70B","NousResearch 2/DeepHermes-3-Mistral-24B-Preview","NousResearch 2/Hermes-4-70B:thinking","NousResearch 2/hermes-3-llama-3.1-70b","NousResearch 2/hermes-4-405b","NousResearch 2/hermes-4-405b:thinking","NousResearch 2/hermes-4-70b","QwQ-32B-ArliAI-RpR-v1","Qwen2.5-32B-EVA-v0.2","ReadyArt/MS3.2-The-Omega-Directive-24B-Unslop-v2.0","ReadyArt/The-Omega-Abomination-L-70B-v1.0","Salesforce/Llama-xLAM-2-70b-fc-r","Sao10K/L3-8B-Stheno-v3.2","Sao10K/L3.1-70B-Euryale-v2.2","Sao10K/L3.1-70B-Hanami-x1","Sao10K/L3.3-70B-Euryale-v2.3","Steelskull/L3.3-Cu-Mai-R1-70b","Steelskull/L3.3-Electra-R1-70b","Steelskull/L3.3-MS-Evalebis-70b","Steelskull/L3.3-MS-Evayale-70B","Steelskull/L3.3-MS-Nevoria-70b","Steelskull/L3.3-Nevoria-R1-70b","TEE/deepseek-r1-0528","TEE/deepseek-v3.1","TEE/deepseek-v3.2","TEE/gemma-3-27b-it","TEE/glm-4.6","TEE/glm-4.7","TEE/glm-4.7-flash","TEE/glm-5","TEE/gpt-oss-120b","TEE/gpt-oss-20b","TEE/kimi-k2-thinking","TEE/kimi-k2.5","TEE/kimi-k2.5-thinking","TEE/llama3-3-70b","TEE/minimax-m2.1","TEE/qwen2.5-vl-72b-instruct","TEE/qwen3-30b-a3b-instruct-2507","TEE/qwen3-coder","TEE/qwen3.5-397b-a17b","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","THUDM/GLM-Z1-Rumination-32B-0414","TheDrummer 2/Anubis-70B-v1","TheDrummer 2/Anubis-70B-v1.1","TheDrummer 2/Cydonia-24B-v2","TheDrummer 2/Cydonia-24B-v4","TheDrummer 2/Cydonia-24B-v4.1","TheDrummer 2/Cydonia-24B-v4.3","TheDrummer 2/Magidonia-24B-v4.3","TheDrummer 2/Rocinante-12B-v1.1","TheDrummer 2/UnslopNemo-12B-v4.1","TheDrummer 2/skyfall-36b-v2","Tongyi-Zhiwen/QwenLong-L1-32B","VongolaChouko/Starcannon-Unleashed-12B-v1.0","abacusai/Dracarys-72B-Instruct","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-rp-llama-3.1-8b","alibaba/qwen3.6-flash","allenai/molmo-2-8b","allenai/olmo-3-32b-think","allenai/olmo-3.1-32b-instruct","allenai/olmo-3.1-32b-think","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-pro-v1","anthracite-org/magnum-v2-72b","anthracite-org/magnum-v4-72b","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6:thinking","anthropic/claude-opus-4.6:thinking:low","anthropic/claude-opus-4.6:thinking:max","anthropic/claude-opus-4.6:thinking:medium","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4.6:thinking","arcee-ai/trinity-large","arcee-ai/trinity-mini","asi1-mini","auto-model","auto-model-basic","auto-model-premium","auto-model-standard","azure-gpt-4-turbo","azure-gpt-4o","azure-gpt-4o-mini","azure-o1","azure-o3-mini","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baseten/Kimi-K2-Instruct-FP4","brave","brave-pro","brave-research","chroma","chutesai/Mistral-Small-3.2-24B-Instruct-2506","claude-3-5-haiku-20241022","claude-3-5-sonnet-20240620","claude-3-5-sonnet-20241022","claude-3-7-sonnet-20250219","claude-3-7-sonnet-reasoner","claude-3-7-sonnet-thinking","claude-3-7-sonnet-thinking:1024","claude-3-7-sonnet-thinking:128000","claude-3-7-sonnet-thinking:32768","claude-3-7-sonnet-thinking:8192","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-1-thinking","claude-opus-4-1-thinking:1024","claude-opus-4-1-thinking:32000","claude-opus-4-1-thinking:32768","claude-opus-4-1-thinking:8192","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-5-20251101:thinking","claude-opus-4-thinking","claude-opus-4-thinking:1024","claude-opus-4-thinking:32000","claude-opus-4-thinking:32768","claude-opus-4-thinking:8192","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929-thinking","claude-sonnet-4-thinking","claude-sonnet-4-thinking:1024","claude-sonnet-4-thinking:32768","claude-sonnet-4-thinking:64000","claude-sonnet-4-thinking:8192","cognitivecomputations/dolphin-2.9.2-qwen2-72b","cohere/command-r","cohere/command-r-plus-08-2024","command-a-reasoning-08-2025","deepclaude","deepcogito/cogito-v1-preview-qwen-32B","deepcogito/cogito-v2.1-671b","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.1-Terminus:thinking","deepseek-ai/DeepSeek-V3.1:thinking","deepseek-ai/deepseek-v3.2-exp","deepseek-ai/deepseek-v3.2-exp-thinking","deepseek-chat","deepseek-chat-cheaper","deepseek-math-v2","deepseek-r1","deepseek-r1-sambanova","deepseek-reasoner","deepseek-reasoner-cheaper","deepseek-v3-0324","deepseek/deepseek-prover-v2-671b","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v3.2:thinking","dmind/dmind-1","dmind/dmind-1-mini","doubao-1-5-thinking-pro-250415","doubao-1-5-thinking-pro-vision-250415","doubao-1-5-thinking-vision-pro-250428","doubao-1.5-pro-256k","doubao-1.5-pro-32k","doubao-1.5-vision-pro-32k","doubao-seed-1-6-250615","doubao-seed-1-6-flash-250615","doubao-seed-1-6-thinking-250615","doubao-seed-1-8-251215","doubao-seed-2-0-code-preview-260215","doubao-seed-2-0-lite-260215","doubao-seed-2-0-mini-260215","doubao-seed-2-0-pro-260215","doubao-seed-code-preview-latest","ernie-4.5-8k-preview","ernie-4.5-turbo-128k","ernie-4.5-turbo-vl-32k","ernie-5.0-thinking-latest","ernie-5.0-thinking-preview","ernie-x1-32k","ernie-x1-32k-preview","ernie-x1-turbo-32k","ernie-x1.1-preview","essentialai/rnj-1-instruct","exa-answer","exa-research","exa-research-pro","failspy/Meta-Llama-3-70B-Instruct-abliterated-v3.5","fastgpt","featherless-ai/Qwerky-72B","gemini-2.0-flash-001","gemini-2.0-flash-exp-image-generation","gemini-2.0-flash-lite","gemini-2.0-flash-thinking-exp-01-21","gemini-2.0-flash-thinking-exp-1219","gemini-2.0-pro-exp-02-05","gemini-2.0-pro-reasoner","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-lite-preview-09-2025-thinking","gemini-2.5-flash-nothinking","gemini-2.5-flash-preview-04-17","gemini-2.5-flash-preview-04-17:thinking","gemini-2.5-flash-preview-05-20","gemini-2.5-flash-preview-05-20:thinking","gemini-2.5-flash-preview-09-2025","gemini-2.5-flash-preview-09-2025-thinking","gemini-2.5-pro","gemini-2.5-pro-exp-03-25","gemini-2.5-pro-preview-03-25","gemini-2.5-pro-preview-05-06","gemini-2.5-pro-preview-06-05","gemini-3-pro-image-preview","gemini-3-pro-preview","gemini-3-pro-preview-thinking","gemini-exp-1206","glm-4","glm-4-air","glm-4-air-0111","glm-4-airx","glm-4-flash","glm-4-long","glm-4-plus","glm-4-plus-0111","glm-4.1v-thinking-flash","glm-4.1v-thinking-flashx","glm-z1-air","glm-z1-airx","glm-zero-preview","google/gemini-3-flash-preview","google/gemini-3-flash-preview-thinking","google/gemini-flash-1.5","grok-3-beta","grok-3-fast-beta","grok-3-mini-beta","grok-3-mini-fast-beta","hidream","huihui-ai/DeepSeek-R1-Distill-Llama-70B-abliterated","huihui-ai/DeepSeek-R1-Distill-Qwen-32B-abliterated","huihui-ai/Llama-3.1-Nemotron-70B-Instruct-HF-abliterated","huihui-ai/Llama-3.3-70B-Instruct-abliterated","huihui-ai/Qwen2.5-32B-Instruct-abliterated","hunyuan-t1-latest","hunyuan-turbos-20250226","inflatebot/MN-12B-Mag-Mell-R1","inflection/inflection-3-pi","inflection/inflection-3-productivity","jamba-large","jamba-large-1.6","jamba-large-1.7","jamba-mini","jamba-mini-1.6","jamba-mini-1.7","kimi-k2-instruct-fast","kimi-thinking-preview","learnlm-1.5-pro-experimental","meganova-ai/manta-flash-1.0","meganova-ai/manta-mini-1.0","meganova-ai/manta-pro-1.0","meituan-longcat/LongCat-Flash-Chat-FP8","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.2-90b-vision-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","microsoft/MAI-DS-R1-FP8","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.7","miromind-ai/mirothinker-v1.5-235b","mistral-small-31-24b-instruct","mistralai/Devstral-Small-2505","mistralai/Mistral-Nemo-Instruct-2407","mistralai/codestral-2508","mistralai/devstral-2-123b-instruct-2512","mistralai/ministral-14b-2512","mistralai/ministral-14b-instruct-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct","mistralai/mistral-large","mistralai/mistral-large-3-675b-instruct-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3.1","mistralai/mistral-saba","mistralai/mistral-small-creative","mistralai/mistral-tiny","mistralai/mixtral-8x22b-instruct-v0.1","mistralai/mixtral-8x7b-instruct-v0.1","mlabonne/NeuralDaredevil-8B-abliterated","moonshotai/Kimi-Dev-72B","moonshotai/Kimi-K2-Instruct-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-instruct-0711","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-original","moonshotai/kimi-k2-thinking-turbo-original","moonshotai/kimi-k2.5","moonshotai/kimi-k2.5:thinking","moonshotai/kimi-k2.6","moonshotai/kimi-k2.6:thinking","nex-agi/deepseek-v3.1-nex-n1","nothingiisreal/L3.1-70B-Celeste-V0.1-BF16","nvidia/Llama-3.1-Nemotron-70B-Instruct-HF","nvidia/Llama-3.1-Nemotron-Ultra-253B-v1","nvidia/Llama-3.3-Nemotron-Super-49B-v1","nvidia/Llama-3_3-Nemotron-Super-49B-v1_5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nvidia-nemotron-nano-9b-v2","openai/chatgpt-4o-latest","openai/gpt-3.5-turbo","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-mini","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat-latest","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-2025-11-13","openai/gpt-5.1-chat","openai/gpt-5.1-chat-latest","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-preview","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-mini-low","openai/o3-pro-2025-06-10","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","pamanseau/OpenReasoning-Nemotron-32B","phi-4-mini-instruct","phi-4-multimodal-instruct","qvq-max","qwen-3.6-plus","qwen-image","qwen-long","qwen-max","qwen-plus","qwen-turbo","qwen/Qwen3.6-35B-A3B","qwen/Qwen3.6-35B-A3B:thinking","qwen/qwen3.5-397b-a17b","qwen25-vl-72b-instruct","qwen3-30b-a3b-instruct-2507","qwen3-coder-30b-a3b-instruct","qwen3-max-2026-01-23","qwen3-vl-235b-a22b-instruct-original","qwen3-vl-235b-a22b-thinking","qwen3.6-max-preview","qwq-32b","raifle/sorcererlm-8x22b","sarvan-medium","shisa-ai/shisa-v2-llama3.3-70b","shisa-ai/shisa-v2.1-llama3.3-70b","sonar","sonar-deep-research","sonar-pro","sonar-reasoning-pro","soob3123/GrayLine-Qwen3-8B","soob3123/Veiled-Calla-12B","soob3123/amoral-gemma3-27B-v2","step-2-16k-exp","step-2-mini","step-3","step-r1-v-mini","stepfun-ai/step-3.5-flash","stepfun-ai/step-3.5-flash:thinking","study_gpt-chatgpt-4o-latest","tencent/Hunyuan-MT-7B","tngtech/DeepSeek-TNG-R1T2-Chimera","tngtech/tng-r1t-chimera","undi95/remm-slerp-l2-13b","universal-summarizer","unsloth/gemma-3-12b-it","unsloth/gemma-3-1b-it","unsloth/gemma-3-27b-it","unsloth/gemma-3-4b-it","v0-1.0-md","v0-1.5-lg","v0-1.5-md","venice-uncensored","venice-uncensored:web","x-ai/grok-4-07-09","x-ai/grok-4-fast","x-ai/grok-4-fast:thinking","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-flash-original","xiaomi/mimo-v2-flash-thinking","xiaomi/mimo-v2-flash-thinking-original","yi-large","yi-lightning","yi-medium-200k","z-ai/glm-4.5v","z-ai/glm-4.5v:thinking","z-ai/glm-4.6","z-ai/glm-4.6:thinking","z-image-turbo","zai-org/glm-4.7","zai-org/glm-4.7-flash","zai-org/glm-5","zai-org/glm-5.1","zai-org/glm-5.1:thinking","zai-org/glm-5:thinking"],abacus:["Qwen/QwQ-32B","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-32B","Qwen/qwen3-coder-480b-a35b-instruct","claude-3-7-sonnet-20250219","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","claude-sonnet-4-6","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek/deepseek-v3.1","gemini-2.5-flash","gemini-2.5-pro","gemini-3-flash-preview","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o-2024-11-20","gpt-4o-mini","gpt-5","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.3-codex-xhigh","gpt-5.4","grok-4-0709","grok-4-1-fast-non-reasoning","grok-4-fast-non-reasoning","grok-code-fast-1","kimi-k2-turbo-preview","kimi-k2.5","llama-3.3-70b-versatile","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-8B-Instruct","o3","o3-mini","o3-pro","o4-mini","openai/gpt-oss-120b","qwen-2.5-coder-32b","qwen3-max","route-llm","zai-org/glm-4.5","zai-org/glm-4.6","zai-org/glm-4.7","zai-org/glm-5"],"perplexity-agent":["anthropic/claude-haiku-4-5","anthropic/claude-opus-4-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","google/gemini-2.5-flash","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3.1-pro-preview","nvidia/nemotron-3-super-120b-a12b","openai/gpt-5-mini","openai/gpt-5.1","openai/gpt-5.2","openai/gpt-5.4","openai/gpt-5.5","perplexity/sonar","xai/grok-4-1-fast-non-reasoning"],"siliconflow-cn":["ByteDance-Seed/Seed-OSS-36B-Instruct","Kwaipilot/KAT-Dev","PaddlePaddle/PaddleOCR-VL","PaddlePaddle/PaddleOCR-VL-1.5","Pro/MiniMaxAI/MiniMax-M2.1","Pro/MiniMaxAI/MiniMax-M2.5","Pro/deepseek-ai/DeepSeek-R1","Pro/deepseek-ai/DeepSeek-V3","Pro/deepseek-ai/DeepSeek-V3.1-Terminus","Pro/deepseek-ai/DeepSeek-V3.2","Pro/moonshotai/Kimi-K2-Instruct-0905","Pro/moonshotai/Kimi-K2-Thinking","Pro/moonshotai/Kimi-K2.5","Pro/moonshotai/Kimi-K2.6","Pro/zai-org/GLM-4.7","Pro/zai-org/GLM-5","Pro/zai-org/GLM-5.1","Qwen/QwQ-32B","Qwen/Qwen2.5-14B-Instruct","Qwen/Qwen2.5-32B-Instruct","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-72B-Instruct-128K","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen3-14B","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-32B","Qwen/Qwen3-8B","Qwen/Qwen3-Coder-30B-A3B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Omni-30B-A3B-Captioner","Qwen/Qwen3-Omni-30B-A3B-Instruct","Qwen/Qwen3-Omni-30B-A3B-Thinking","Qwen/Qwen3-VL-235B-A22B-Instruct","Qwen/Qwen3-VL-235B-A22B-Thinking","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3-VL-30B-A3B-Thinking","Qwen/Qwen3-VL-32B-Instruct","Qwen/Qwen3-VL-32B-Thinking","Qwen/Qwen3-VL-8B-Instruct","Qwen/Qwen3-VL-8B-Thinking","Qwen/Qwen3.5-122B-A10B","Qwen/Qwen3.5-27B","Qwen/Qwen3.5-35B-A3B","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.5-4B","Qwen/Qwen3.5-9B","Qwen/Qwen3.6-35B-A3B","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","ascend-tribe/pangu-pro-moe","baidu/ERNIE-4.5-300B-A47B","deepseek-ai/DeepSeek-OCR","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-R1-Distill-Qwen-14B","deepseek-ai/DeepSeek-R1-Distill-Qwen-32B","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek-ai/deepseek-vl2","inclusionAI/Ling-flash-2.0","inclusionAI/Ling-mini-2.0","inclusionAI/Ring-flash-2.0","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","stepfun-ai/Step-3.5-Flash","tencent/Hunyuan-A13B-Instruct","tencent/Hunyuan-MT-7B","zai-org/GLM-4.5-Air","zai-org/GLM-4.5V","zai-org/GLM-4.6","zai-org/GLM-4.6V"],submodel:["Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","openai/gpt-oss-120b","zai-org/GLM-4.5-Air","zai-org/GLM-4.5-FP8"],"minimax-coding-plan":["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],claudinio:["claudinio"],perplexity:["sonar","sonar-deep-research","sonar-pro","sonar-reasoning-pro"],deepseek:["deepseek-chat","deepseek-reasoner","deepseek-v4-flash","deepseek-v4-pro"],llama:["cerebras-llama-4-maverick-17b-128e-instruct","cerebras-llama-4-scout-17b-16e-instruct","groq-llama-4-maverick-17b-128e-instruct","llama-3.3-70b-instruct","llama-3.3-8b-instruct","llama-4-maverick-17b-128e-instruct-fp8","llama-4-scout-17b-16e-instruct-fp8"],openrouter:["ai21/jamba-large-1.7","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-2.0","aion-labs/aion-rp-llama-3.1-8b","alfredpros/codellama-7b-instruct-solidity","alibaba/tongyi-deepresearch-30b-a3b","allenai/olmo-3-32b-think","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-premier-v1","amazon/nova-pro-v1","anthracite-org/magnum-v4-72b","anthropic/claude-3-haiku","anthropic/claude-3.5-haiku","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6-fast","anthropic/claude-opus-4.7","anthropic/claude-opus-4.7-fast","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/coder-large","arcee-ai/maestro-reasoning","arcee-ai/spotlight","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-large-thinking:free","arcee-ai/trinity-mini","arcee-ai/virtuoso-large","baidu/cobuddy:free","baidu/ernie-4.5-21b-a3b","baidu/ernie-4.5-21b-a3b-thinking","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-424b-a47b","baidu/qianfan-ocr-fast","bytedance-seed/seed-1.6","bytedance-seed/seed-1.6-flash","bytedance-seed/seed-2.0-lite","bytedance-seed/seed-2.0-mini","bytedance/ui-tars-1.5-7b","cognitivecomputations/dolphin-mistral-24b-venice-edition:free","cohere/command-a","cohere/command-r-08-2024","cohere/command-r-plus-08-2024","cohere/command-r7b-12-2024","deepcogito/cogito-v2.1-671b","deepseek/deepseek-chat","deepseek/deepseek-chat-v3-0324","deepseek/deepseek-chat-v3.1","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-flash:free","deepseek/deepseek-v4-pro","essentialai/rnj-1-instruct","google/gemini-2.0-flash-001","google/gemini-2.0-flash-lite-001","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-pro","google/gemini-2.5-pro-preview","google/gemini-2.5-pro-preview-05-06","google/gemini-3-flash-preview","google/gemini-3-pro-image-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemma-2-27b-it","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-3-4b-it","google/gemma-3n-e4b-it","google/gemma-4-26b-a4b-it","google/gemma-4-26b-a4b-it:free","google/gemma-4-31b-it","google/gemma-4-31b-it:free","google/lyria-3-clip-preview","google/lyria-3-pro-preview","gryphe/mythomax-l2-13b","ibm-granite/granite-4.0-h-micro","ibm-granite/granite-4.1-8b","inception/mercury-2","inclusionai/ling-2.6-1t","inclusionai/ling-2.6-flash","inclusionai/ring-2.6-1t:free","inflection/inflection-3-pi","inflection/inflection-3-productivity","kwaipilot/kat-coder-pro-v2","liquid/lfm-2-24b-a2b","liquid/lfm-2.5-1.2b-instruct:free","liquid/lfm-2.5-1.2b-thinking:free","mancer/weaver","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-70b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-11b-vision-instruct","meta-llama/llama-3.2-1b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.2-3b-instruct:free","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-3.3-70b-instruct:free","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","meta-llama/llama-guard-3-8b","meta-llama/llama-guard-4-12b","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m1","minimax/minimax-m2","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5:free","minimax/minimax-m2.7","mistralai/codestral-2508","mistralai/devstral-2512","mistralai/devstral-medium","mistralai/devstral-small","mistralai/ministral-14b-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct-v0.1","mistralai/mistral-large","mistralai/mistral-large-2407","mistralai/mistral-large-2411","mistralai/mistral-large-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3-5","mistralai/mistral-medium-3.1","mistralai/mistral-nemo","mistralai/mistral-saba","mistralai/mistral-small-24b-instruct-2501","mistralai/mistral-small-2603","mistralai/mistral-small-3.1-24b-instruct","mistralai/mistral-small-3.2-24b-instruct","mistralai/mixtral-8x22b-instruct","mistralai/pixtral-large-2411","mistralai/voxtral-small-24b-2507","moonshotai/kimi-k2","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nex-agi/deepseek-v3.1-nex-n1","nousresearch/hermes-2-pro-llama-3-8b","nousresearch/hermes-3-llama-3.1-405b","nousresearch/hermes-3-llama-3.1-405b:free","nousresearch/hermes-3-llama-3.1-70b","nousresearch/hermes-4-405b","nousresearch/hermes-4-70b","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-30b-a3b:free","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-super-120b-a12b:free","nvidia/nemotron-nano-12b-v2-vl:free","nvidia/nemotron-nano-9b-v2","nvidia/nemotron-nano-9b-v2:free","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-0613","openai/gpt-3.5-turbo-16k","openai/gpt-3.5-turbo-instruct","openai/gpt-4","openai/gpt-4-0314","openai/gpt-4-1106-preview","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-audio-preview","openai/gpt-4o-mini","openai/gpt-4o-mini-2024-07-18","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-image-mini","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-image-2","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-audio","openai/gpt-audio-mini","openai/gpt-chat-latest","openai/gpt-oss-120b","openai/gpt-oss-120b:free","openai/gpt-oss-20b","openai/gpt-oss-20b:free","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","openrouter/auto","openrouter/bodybuilder","openrouter/free","openrouter/owl-alpha","openrouter/pareto-code","perceptron/perceptron-mk1","perplexity/sonar","perplexity/sonar-deep-research","perplexity/sonar-pro","perplexity/sonar-pro-search","perplexity/sonar-reasoning-pro","poolside/laguna-m.1:free","poolside/laguna-xs.2:free","prime-intellect/intellect-3","qwen/qwen-2.5-72b-instruct","qwen/qwen-2.5-7b-instruct","qwen/qwen-2.5-coder-32b-instruct","qwen/qwen-plus","qwen/qwen-plus-2025-07-28","qwen/qwen-plus-2025-07-28:thinking","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-14b","qwen/qwen3-235b-a22b","qwen/qwen3-235b-a22b-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b","qwen/qwen3-30b-a3b-instruct-2507","qwen/qwen3-30b-a3b-thinking-2507","qwen/qwen3-32b","qwen/qwen3-8b","qwen/qwen3-coder","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-flash","qwen/qwen3-coder-next","qwen/qwen3-coder-plus","qwen/qwen3-coder:free","qwen/qwen3-max","qwen/qwen3-max-thinking","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-instruct:free","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-32b-instruct","qwen/qwen3-vl-8b-instruct","qwen/qwen3-vl-8b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b","qwen/qwen3.5-flash-02-23","qwen/qwen3.5-plus-02-15","qwen/qwen3.5-plus-20260420","qwen/qwen3.6-27b","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-flash","qwen/qwen3.6-max-preview","qwen/qwen3.6-plus","rekaai/reka-edge","rekaai/reka-flash-3","relace/relace-apply-3","relace/relace-search","sao10k/l3-euryale-70b","sao10k/l3-lunaris-8b","sao10k/l3.1-70b-hanami-x1","sao10k/l3.1-euryale-70b","sao10k/l3.3-euryale-70b","stepfun/step-3.5-flash","switchpoint/router","tencent/hunyuan-a13b-instruct","tencent/hy3-preview","thedrummer/cydonia-24b-v4.1","thedrummer/rocinante-12b","thedrummer/skyfall-36b-v2","thedrummer/unslopnemo-12b","undi95/remm-slerp-l2-13b","upstage/solar-pro-3","writer/palmyra-x5","x-ai/grok-3","x-ai/grok-3-beta","x-ai/grok-3-mini","x-ai/grok-3-mini-beta","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.20","x-ai/grok-4.20-multi-agent","x-ai/grok-4.3","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4-32b","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.5-air:free","z-ai/glm-4.5v","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.7","z-ai/glm-4.7-flash","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo","~anthropic/claude-haiku-latest","~anthropic/claude-opus-latest","~anthropic/claude-sonnet-latest","~google/gemini-flash-latest","~google/gemini-pro-latest","~moonshotai/kimi-latest","~openai/gpt-latest","~openai/gpt-mini-latest"],"fireworks-ai":["accounts/fireworks/models/deepseek-v3p1","accounts/fireworks/models/deepseek-v3p2","accounts/fireworks/models/deepseek-v4-pro","accounts/fireworks/models/glm-4p5","accounts/fireworks/models/glm-4p5-air","accounts/fireworks/models/glm-4p7","accounts/fireworks/models/glm-5","accounts/fireworks/models/glm-5p1","accounts/fireworks/models/gpt-oss-120b","accounts/fireworks/models/gpt-oss-20b","accounts/fireworks/models/kimi-k2-instruct","accounts/fireworks/models/kimi-k2-thinking","accounts/fireworks/models/kimi-k2p5","accounts/fireworks/models/kimi-k2p6","accounts/fireworks/models/minimax-m2p1","accounts/fireworks/models/minimax-m2p5","accounts/fireworks/models/minimax-m2p7","accounts/fireworks/models/qwen3p6-plus","accounts/fireworks/routers/kimi-k2p5-turbo"],ambient:["moonshotai/kimi-k2.6","zai-org/GLM-5.1-FP8"],"kimi-for-coding":["k2p5","k2p6","kimi-k2-thinking"],moark:["GLM-4.7","MiniMax-M2.1"],"opencode-go":["deepseek-v4-flash","deepseek-v4-pro","glm-5","glm-5.1","kimi-k2.5","kimi-k2.6","mimo-v2.5","mimo-v2.5-pro","minimax-m2.5","minimax-m2.7","qwen3.5-plus","qwen3.6-plus"],databricks:["databricks-claude-haiku-4-5","databricks-claude-opus-4-1","databricks-claude-opus-4-5","databricks-claude-opus-4-6","databricks-claude-opus-4-7","databricks-claude-sonnet-4","databricks-claude-sonnet-4-5","databricks-claude-sonnet-4-6","databricks-gemini-2-5-flash","databricks-gemini-2-5-pro","databricks-gemini-3-1-flash-lite","databricks-gemini-3-1-pro","databricks-gemini-3-flash","databricks-gemini-3-pro","databricks-gpt-5","databricks-gpt-5-1","databricks-gpt-5-2","databricks-gpt-5-4","databricks-gpt-5-4-mini","databricks-gpt-5-4-nano","databricks-gpt-5-5","databricks-gpt-5-mini","databricks-gpt-5-nano","databricks-gpt-oss-120b","databricks-gpt-oss-20b"],"io-net":["Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Next-80B-A3B-Instruct","deepseek-ai/DeepSeek-R1-0528","meta-llama/Llama-3.2-90B-Vision-Instruct","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","mistralai/Devstral-Small-2505","mistralai/Magistral-Small-2506","mistralai/Mistral-Large-Instruct-2411","mistralai/Mistral-Nemo-Instruct-2407","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","openai/gpt-oss-120b","openai/gpt-oss-20b","zai-org/GLM-4.6"],"alibaba-cn":["MiniMax-M2.5","MiniMax/MiniMax-M2.7","deepseek-r1","deepseek-r1-0528","deepseek-r1-distill-llama-70b","deepseek-r1-distill-llama-8b","deepseek-r1-distill-qwen-1-5b","deepseek-r1-distill-qwen-14b","deepseek-r1-distill-qwen-32b","deepseek-r1-distill-qwen-7b","deepseek-v3","deepseek-v3-1","deepseek-v3-2-exp","deepseek-v4-flash","deepseek-v4-pro","glm-5","glm-5.1","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","kimi/kimi-k2.5","moonshot-kimi-k2-instruct","qvq-max","qwen-deep-research","qwen-doc-turbo","qwen-flash","qwen-long","qwen-math-plus","qwen-math-turbo","qwen-max","qwen-mt-plus","qwen-mt-turbo","qwen-omni-turbo","qwen-omni-turbo-realtime","qwen-plus","qwen-plus-character","qwen-turbo","qwen-vl-max","qwen-vl-ocr","qwen-vl-plus","qwen2-5-14b-instruct","qwen2-5-32b-instruct","qwen2-5-72b-instruct","qwen2-5-7b-instruct","qwen2-5-coder-32b-instruct","qwen2-5-coder-7b-instruct","qwen2-5-math-72b-instruct","qwen2-5-math-7b-instruct","qwen2-5-omni-7b","qwen2-5-vl-72b-instruct","qwen2-5-vl-7b-instruct","qwen3-14b","qwen3-235b-a22b","qwen3-32b","qwen3-8b","qwen3-asr-flash","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-plus","qwen3-max","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-omni-flash","qwen3-omni-flash-realtime","qwen3-vl-235b-a22b","qwen3-vl-30b-a3b","qwen3-vl-plus","qwen3.5-397b-a17b","qwen3.5-flash","qwen3.5-plus","qwen3.6-max-preview","qwen3.6-plus","qwq-32b","qwq-plus","siliconflow/deepseek-r1-0528","siliconflow/deepseek-v3-0324","siliconflow/deepseek-v3.1-terminus","siliconflow/deepseek-v3.2","tongyi-intent-detect-v3"],firepass:["accounts/fireworks/routers/kimi-k2p6-turbo"],"minimax-cn-coding-plan":["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],jiekou:["baidu/ernie-4.5-300b-a47b-paddle","baidu/ernie-4.5-vl-424b-a47b","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","deepseek/deepseek-r1-0528","deepseek/deepseek-v3-0324","deepseek/deepseek-v3.1","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-preview-05-20","gemini-2.5-pro","gemini-2.5-pro-preview-06-05","gemini-3-flash-preview","gemini-3-pro-preview","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-codex","gpt-5.2-pro","grok-4-0709","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","minimax/minimax-m2.1","minimaxai/minimax-m1-80k","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2.5","o3","o3-mini","o4-mini","qwen/qwen3-235b-a22b-fp8","qwen/qwen3-235b-a22b-instruct-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b-fp8","qwen/qwen3-32b-fp8","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-coder-next","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","xiaomimimo/mimo-v2-flash","zai-org/glm-4.5","zai-org/glm-4.5v","zai-org/glm-4.7","zai-org/glm-4.7-flash"],bailing:["Ling-1T","Ring-1T"],iflowcn:["deepseek-r1","deepseek-v3","deepseek-v3.2","glm-4.6","kimi-k2","kimi-k2-0905","qwen3-235b","qwen3-235b-a22b-instruct","qwen3-235b-a22b-thinking-2507","qwen3-32b","qwen3-coder-plus","qwen3-max","qwen3-max-preview","qwen3-vl-plus"],orcarouter:["anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","deepseek/deepseek-chat","deepseek/deepseek-reasoner","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3-pro-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemini-flash-latest","google/gemini-flash-lite-latest","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","grok/grok-4.3","kimi/kimi-k2.5","kimi/kimi-k2.6","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","openai/gpt-3.5-turbo","openai/gpt-4","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-chat-latest","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat-latest","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat-latest","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat-latest","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","orcarouter/auto","qwen/qwen3-max","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-plus","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-plus","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.6","z-ai/glm-4.7","z-ai/glm-5","z-ai/glm-5.1"],huggingface:["MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.7","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Coder-Next","Qwen/Qwen3-Embedding-4B","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3.5-397B-A17B","XiaomiMiMo/MiMo-V2-Flash","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","zai-org/GLM-4.7","zai-org/GLM-4.7-Flash","zai-org/GLM-5","zai-org/GLM-5.1"],zenmux:["anthropic/claude-3.5-haiku","anthropic/claude-3.7-sonnet","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","baidu/ernie-5.0-thinking-preview","deepseek/deepseek-chat","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","inclusionai/ling-1t","inclusionai/ring-1t","kuaishou/kat-coder-pro-v2","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-lightning","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-turbo","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","openai/gpt-5","openai/gpt-5-codex","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","qwen/qwen3-coder-plus","qwen/qwen3-max","qwen/qwen3.5-flash","qwen/qwen3.5-plus","qwen/qwen3.6-plus","sapiens-ai/agnes-1.5-lite","sapiens-ai/agnes-1.5-pro","stepfun/step-3","stepfun/step-3.5-flash","stepfun/step-3.5-flash-free","tencent/hy3-preview","volcengine/doubao-seed-1.8","volcengine/doubao-seed-2.0-code","volcengine/doubao-seed-2.0-lite","volcengine/doubao-seed-2.0-mini","volcengine/doubao-seed-2.0-pro","volcengine/doubao-seed-code","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-non-reasoning","x-ai/grok-4.2-fast","x-ai/grok-4.2-fast-non-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.6v-flash","z-ai/glm-4.6v-flash-free","z-ai/glm-4.7","z-ai/glm-4.7-flash-free","z-ai/glm-4.7-flashx","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo"],upstage:["solar-mini","solar-pro2","solar-pro3"],"novita-ai":["Sao10K/L3-8B-Stheno-v3.2","baichuan/baichuan-m2-32b","baidu/ernie-4.5-21B-a3b","baidu/ernie-4.5-21B-a3b-thinking","baidu/ernie-4.5-300b-a47b-paddle","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-28b-a3b-thinking","baidu/ernie-4.5-vl-424b-a47b","deepseek/deepseek-ocr","deepseek/deepseek-ocr-2","deepseek/deepseek-prover-v2-671b","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-0528-qwen3-8b","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-14b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-r1-turbo","deepseek/deepseek-v3-0324","deepseek/deepseek-v3-turbo","deepseek/deepseek-v3.1","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","gryphe/mythomax-l2-13b","inclusionai/ling-2.6-1t","inclusionai/ling-2.6-flash","kwaipilot/kat-coder-pro","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick-17b-128e-instruct-fp8","meta-llama/llama-4-scout-17b-16e-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimaxai/minimax-m1-80k","mistralai/mistral-nemo","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","nousresearch/hermes-2-pro-llama-3-8b","openai/gpt-oss-120b","openai/gpt-oss-20b","paddlepaddle/paddleocr-vl","qwen/qwen-2.5-72b-instruct","qwen/qwen-mt-plus","qwen/qwen2.5-7b-instruct","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-235b-a22b-fp8","qwen/qwen3-235b-a22b-instruct-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b-fp8","qwen/qwen3-32b-fp8","qwen/qwen3-4b-fp8","qwen/qwen3-8b-fp8","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-coder-next","qwen/qwen3-max","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-omni-30b-a3b-instruct","qwen/qwen3-omni-30b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-8b-instruct","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","sao10k/l3-70b-euryale-v2.1","sao10k/l3-8b-lunaris","sao10k/l31-70b-euryale-v2.2","xiaomimimo/mimo-v2-flash","zai-org/autoglm-phone-9b-multilingual","zai-org/glm-4.5","zai-org/glm-4.5-air","zai-org/glm-4.5v","zai-org/glm-4.6","zai-org/glm-4.6v","zai-org/glm-4.7","zai-org/glm-4.7-flash","zai-org/glm-5","zai-org/glm-5.1"],"xiaomi-token-plan-cn":["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],wandb:["MiniMaxAI/MiniMax-M2.5","OpenPipe/Qwen3-14B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct","deepseek-ai/DeepSeek-V3.1","meta-llama/Llama-3.1-70B-Instruct","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Llama-4-Scout-17B-16E-Instruct","microsoft/Phi-4-mini-instruct","moonshotai/Kimi-K2.5","nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8","openai/gpt-oss-120b","openai/gpt-oss-20b","zai-org/GLM-5-FP8","zai-org/GLM-5.1"],chutes:["MiniMaxAI/MiniMax-M2.5-TEE","NousResearch/DeepHermes-3-Mistral-24B-Preview","NousResearch/Hermes-4-14B","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507-TEE","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B","Qwen/Qwen3-32B-TEE","Qwen/Qwen3-Coder-Next-TEE","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3.5-397B-A17B-TEE","Qwen/Qwen3.6-27B-TEE","Qwen/Qwen3Guard-Gen-0.6B","XiaomiMiMo/MiMo-V2-Flash-TEE","deepseek-ai/DeepSeek-R1-0528-TEE","deepseek-ai/DeepSeek-R1-Distill-Llama-70B","deepseek-ai/DeepSeek-V3-0324-TEE","deepseek-ai/DeepSeek-V3.1-TEE","deepseek-ai/DeepSeek-V3.2-TEE","google/gemma-4-31B-turbo-TEE","moonshotai/Kimi-K2.5-TEE","moonshotai/Kimi-K2.6-TEE","openai/gpt-oss-120b-TEE","rednote-hilab/dots.ocr","tngtech/DeepSeek-TNG-R1T2-Chimera-TEE","unsloth/Llama-3.2-1B-Instruct","unsloth/Llama-3.2-3B-Instruct","unsloth/Mistral-Nemo-Instruct-2407","unsloth/gemma-3-12b-it","unsloth/gemma-3-27b-it","unsloth/gemma-3-4b-it","zai-org/GLM-4.6V","zai-org/GLM-4.7-FP8","zai-org/GLM-4.7-TEE","zai-org/GLM-5-TEE","zai-org/GLM-5-Turbo","zai-org/GLM-5.1-TEE"],dinference:["glm-4.7","glm-5","glm-5.1","gpt-oss-120b","minimax-m2.5"],vivgrid:["deepseek-v3.2","deepseek-v4-pro","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gpt-5-mini","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2-codex","gpt-5.3-codex","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.5"],deepinfra:["MiniMaxAI/MiniMax-M2","MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo","Qwen/Qwen3.5-35B-A3B","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.6-35B-A3B","anthropic/claude-3-7-sonnet-latest","anthropic/claude-4-opus","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V4-Flash","deepseek-ai/DeepSeek-V4-Pro","google/gemma-4-26B-A4B-it","google/gemma-4-31B-it","meta-llama/Llama-3.1-70B-Instruct","meta-llama/Llama-3.1-70B-Instruct-Turbo","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.1-8B-Instruct-Turbo","meta-llama/Llama-3.3-70B-Instruct-Turbo","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","meta-llama/Llama-4-Scout-17B-16E-Instruct","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-120b","openai/gpt-oss-20b","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","zai-org/GLM-4.6","zai-org/GLM-4.6V","zai-org/GLM-4.7","zai-org/GLM-4.7-Flash","zai-org/GLM-5","zai-org/GLM-5.1"],"qiniu-ai":["MiniMax-M1","claude-3.5-haiku","claude-3.5-sonnet","claude-3.7-sonnet","claude-4.0-opus","claude-4.0-sonnet","claude-4.1-opus","claude-4.5-haiku","claude-4.5-opus","claude-4.5-sonnet","deepseek-r1","deepseek-r1-0528","deepseek-v3","deepseek-v3-0324","deepseek-v3.1","deepseek/deepseek-math-v2","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.1-terminus-thinking","deepseek/deepseek-v3.2-251201","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-exp-thinking","doubao-1.5-pro-32k","doubao-1.5-thinking-pro","doubao-1.5-vision-pro","doubao-seed-1.6","doubao-seed-1.6-flash","doubao-seed-1.6-thinking","doubao-seed-2.0-code","doubao-seed-2.0-lite","doubao-seed-2.0-mini","doubao-seed-2.0-pro","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-lite","gemini-2.5-pro","gemini-3.0-flash-preview","gemini-3.0-pro-image-preview","gemini-3.0-pro-preview","glm-4.5","glm-4.5-air","gpt-oss-120b","gpt-oss-20b","kimi-k2","kling-v2-6","meituan/longcat-flash-chat","meituan/longcat-flash-lite","mimo-v2-flash","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","openai/gpt-5","openai/gpt-5.2","qwen-max-2025-01-25","qwen-turbo","qwen-vl-max-2025-01-25","qwen2.5-vl-72b-instruct","qwen2.5-vl-7b-instruct","qwen3-235b-a22b","qwen3-235b-a22b-instruct-2507","qwen3-235b-a22b-thinking-2507","qwen3-30b-a3b","qwen3-30b-a3b-instruct-2507","qwen3-30b-a3b-thinking-2507","qwen3-32b","qwen3-coder-480b-a35b-instruct","qwen3-max","qwen3-max-preview","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-vl-30b-a3b-thinking","qwen3.5-397b-a17b","stepfun-ai/gelab-zero-4b-preview","stepfun/step-3.5-flash","x-ai/grok-4-fast","x-ai/grok-4-fast-non-reasoning","x-ai/grok-4-fast-reasoning","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-non-reasoning","x-ai/grok-4.1-fast-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","z-ai/autoglm-phone-9b","z-ai/glm-4.6","z-ai/glm-4.7","z-ai/glm-5"],kilo:["ai21/jamba-large-1.7","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-2.0","aion-labs/aion-rp-llama-3.1-8b","alfredpros/codellama-7b-instruct-solidity","alibaba/tongyi-deepresearch-30b-a3b","allenai/olmo-3-32b-think","alpindale/goliath-120b","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-premier-v1","amazon/nova-pro-v1","anthracite-org/magnum-v4-72b","anthropic/claude-3-haiku","anthropic/claude-3.5-haiku","anthropic/claude-3.7-sonnet","anthropic/claude-3.7-sonnet:thinking","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6-fast","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/coder-large","arcee-ai/maestro-reasoning","arcee-ai/spotlight","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-mini","arcee-ai/virtuoso-large","baidu/cobuddy:free","baidu/ernie-4.5-21b-a3b","baidu/ernie-4.5-21b-a3b-thinking","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-424b-a47b","baidu/qianfan-ocr-fast:free","bytedance-seed/seed-1.6","bytedance-seed/seed-1.6-flash","bytedance-seed/seed-2.0-lite","bytedance-seed/seed-2.0-mini","bytedance/ui-tars-1.5-7b","cohere/command-a","cohere/command-r-08-2024","cohere/command-r-plus-08-2024","cohere/command-r7b-12-2024","deepcogito/cogito-v2.1-671b","deepseek/deepseek-chat","deepseek/deepseek-chat-v3-0324","deepseek/deepseek-chat-v3.1","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","essentialai/rnj-1-instruct","google/gemini-2.0-flash-001","google/gemini-2.0-flash-lite-001","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-pro","google/gemini-2.5-pro-preview","google/gemini-2.5-pro-preview-05-06","google/gemini-3-flash-preview","google/gemini-3-pro-image-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemma-2-27b-it","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-3-4b-it","google/gemma-3n-e4b-it","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","google/lyria-3-clip-preview","google/lyria-3-pro-preview","gryphe/mythomax-l2-13b","ibm-granite/granite-4.0-h-micro","ibm-granite/granite-4.1-8b","inception/mercury-2","inclusionai/ling-2.6-1t:free","inclusionai/ling-2.6-flash","inflection/inflection-3-pi","inflection/inflection-3-productivity","kilo-auto/balanced","kilo-auto/free","kilo-auto/frontier","kilo-auto/small","kwaipilot/kat-coder-pro-v2","liquid/lfm-2-24b-a2b","mancer/weaver","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-70b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-11b-vision-instruct","meta-llama/llama-3.2-1b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","meta-llama/llama-guard-3-8b","meta-llama/llama-guard-4-12b","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m1","minimax/minimax-m2","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.7","mistralai/codestral-2508","mistralai/devstral-2512","mistralai/devstral-medium","mistralai/devstral-small","mistralai/ministral-14b-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct-v0.1","mistralai/mistral-large","mistralai/mistral-large-2407","mistralai/mistral-large-2411","mistralai/mistral-large-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3-5","mistralai/mistral-medium-3.1","mistralai/mistral-nemo","mistralai/mistral-saba","mistralai/mistral-small-24b-instruct-2501","mistralai/mistral-small-2603","mistralai/mistral-small-3.1-24b-instruct","mistralai/mistral-small-3.2-24b-instruct","mistralai/mixtral-8x22b-instruct","mistralai/mixtral-8x7b-instruct","mistralai/pixtral-large-2411","mistralai/voxtral-small-24b-2507","moonshotai/kimi-k2","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nex-agi/deepseek-v3.1-nex-n1","nousresearch/hermes-2-pro-llama-3-8b","nousresearch/hermes-3-llama-3.1-405b","nousresearch/hermes-3-llama-3.1-70b","nousresearch/hermes-4-405b","nousresearch/hermes-4-70b","nvidia/llama-3.1-nemotron-70b-instruct","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-super-120b-a12b:free","nvidia/nemotron-nano-9b-v2","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-0613","openai/gpt-3.5-turbo-16k","openai/gpt-3.5-turbo-instruct","openai/gpt-4","openai/gpt-4-0314","openai/gpt-4-1106-preview","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-audio-preview","openai/gpt-4o-mini","openai/gpt-4o-mini-2024-07-18","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-image-mini","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-image-2","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-audio","openai/gpt-audio-mini","openai/gpt-chat-latest","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","openrouter/auto","openrouter/bodybuilder","openrouter/free","openrouter/owl-alpha","openrouter/pareto-code","perplexity/sonar","perplexity/sonar-deep-research","perplexity/sonar-pro","perplexity/sonar-pro-search","perplexity/sonar-reasoning-pro","poolside/laguna-m.1:free","poolside/laguna-xs.2:free","prime-intellect/intellect-3","qwen/qwen-2.5-72b-instruct","qwen/qwen-2.5-7b-instruct","qwen/qwen-2.5-coder-32b-instruct","qwen/qwen-max","qwen/qwen-plus","qwen/qwen-plus-2025-07-28","qwen/qwen-plus-2025-07-28:thinking","qwen/qwen-turbo","qwen/qwen-vl-max","qwen/qwen-vl-plus","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-14b","qwen/qwen3-235b-a22b","qwen/qwen3-235b-a22b-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b","qwen/qwen3-30b-a3b-instruct-2507","qwen/qwen3-30b-a3b-thinking-2507","qwen/qwen3-32b","qwen/qwen3-8b","qwen/qwen3-coder","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-flash","qwen/qwen3-coder-next","qwen/qwen3-coder-plus","qwen/qwen3-max","qwen/qwen3-max-thinking","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-32b-instruct","qwen/qwen3-vl-8b-instruct","qwen/qwen3-vl-8b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b","qwen/qwen3.5-flash-02-23","qwen/qwen3.5-plus-02-15","qwen/qwen3.5-plus-20260420","qwen/qwen3.6-27b","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-flash","qwen/qwen3.6-max-preview","qwen/qwen3.6-plus","rekaai/reka-edge","rekaai/reka-flash-3","relace/relace-apply-3","relace/relace-search","sao10k/l3-euryale-70b","sao10k/l3-lunaris-8b","sao10k/l3.1-70b-hanami-x1","sao10k/l3.1-euryale-70b","sao10k/l3.3-euryale-70b","stepfun/step-3.5-flash","stepfun/step-3.5-flash:free","switchpoint/router","tencent/hunyuan-a13b-instruct","tencent/hy3-preview:free","thedrummer/cydonia-24b-v4.1","thedrummer/rocinante-12b","thedrummer/skyfall-36b-v2","thedrummer/unslopnemo-12b","tngtech/deepseek-r1t2-chimera","undi95/remm-slerp-l2-13b","upstage/solar-pro-3","writer/palmyra-x5","x-ai/grok-3","x-ai/grok-3-beta","x-ai/grok-3-mini","x-ai/grok-3-mini-beta","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.20","x-ai/grok-4.20-multi-agent","x-ai/grok-4.3","x-ai/grok-code-fast-1","x-ai/grok-code-fast-1:optimized:free","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4-32b","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.5v","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.7","z-ai/glm-4.7-flash","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo","~anthropic/claude-haiku-latest","~anthropic/claude-opus-latest","~anthropic/claude-sonnet-latest","~google/gemini-flash-latest","~google/gemini-pro-latest","~moonshotai/kimi-latest","~openai/gpt-latest","~openai/gpt-mini-latest"],auriko:["claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-6","deepseek-v4-flash","deepseek-v4-pro","gemini-2.5-flash","gemini-2.5-pro","gemini-3.1-pro-preview","glm-5.1","grok-4.3","kimi-k2.5","kimi-k2.6","minimax-m2-7","minimax-m2-7-highspeed","qwen-3.6-plus"],morph:["auto","morph-v3-fast","morph-v3-large"],mixlayer:["qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b"],"xiaomi-token-plan-sgp":["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],zai:["glm-4.5","glm-4.5-air","glm-4.5-flash","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5-turbo","glm-5.1","glm-5v-turbo"],opencode:["big-pickle","claude-haiku-4-5","claude-opus-4-1","claude-opus-4-5","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4","claude-sonnet-4-5","claude-sonnet-4-6","deepseek-v4-flash-free","gemini-3-flash","gemini-3.1-pro","glm-5","glm-5.1","gpt-5","gpt-5-codex","gpt-5-nano","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-codex","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","kimi-k2.5","kimi-k2.6","minimax-m2.5","minimax-m2.5-free","minimax-m2.7","nemotron-3-super-free","qwen3.5-plus","qwen3.6-plus","qwen3.6-plus-free"],stepfun:["step-1-32k","step-2-16k","step-3.5-flash","step-3.5-flash-2603"],nebius:["MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.5-fast","NousResearch/Hermes-4-405B","NousResearch/Hermes-4-70B","PrimeIntellect/INTELLECT-3","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507-fast","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-32B","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Next-80B-A3B-Thinking-fast","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.5-397B-A17B-fast","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-fast","deepseek-ai/DeepSeek-V4-Pro","google/gemma-2-2b-it","google/gemma-3-27b-it","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Meta-Llama-3.1-8B-Instruct","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.5-fast","nvidia/Llama-3_1-Nemotron-Ultra-253B-v1","nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B","nvidia/Nemotron-3-Nano-Omni","nvidia/nemotron-3-super-120b-a12b","openai/gpt-oss-120b","openai/gpt-oss-120b-fast","zai-org/GLM-5"],poe:["anthropic/claude-haiku-3","anthropic/claude-haiku-3.5","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-3.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","cerebras/gpt-oss-120b-cs","cerebras/llama-3.1-8b-cs","elevenlabs/elevenlabs-music","elevenlabs/elevenlabs-v2.5-turbo","elevenlabs/elevenlabs-v3","empiriolabs/deepseek-v4-flash-el","empiriolabs/deepseek-v4-pro-el","fireworks-ai/kimi-k2.5-fw","google/gemini-2.0-flash","google/gemini-2.0-flash-lite","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash","google/gemini-3.1-flash-lite","google/gemini-3.1-pro","google/gemma-4-31b","google/imagen-3","google/imagen-3-fast","google/imagen-4","google/imagen-4-fast","google/imagen-4-ultra","google/lyria","google/nano-banana","google/nano-banana-pro","google/veo-2","google/veo-3","google/veo-3-fast","google/veo-3.1","google/veo-3.1-fast","ideogramai/ideogram","ideogramai/ideogram-v2","ideogramai/ideogram-v2a","ideogramai/ideogram-v2a-turbo","lumalabs/ray2","novita/deepseek-v3.2","novita/glm-4.6","novita/glm-4.6v","novita/glm-4.7-flash","novita/glm-4.7-n","novita/glm-5","novita/kimi-k2-thinking","novita/kimi-k2.5","novita/kimi-k2.6","novita/minimax-m2.1","openai/dall-e-3","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-instruct","openai/gpt-3.5-turbo-raw","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-aug","openai/gpt-4o-mini","openai/gpt-4o-mini-search","openai/gpt-4o-search","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.1-instant","openai/gpt-5.2","openai/gpt-5.2-codex","openai/gpt-5.2-instant","openai/gpt-5.2-pro","openai/gpt-5.3-codex","openai/gpt-5.3-codex-spark","openai/gpt-5.3-instant","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-image-1","openai/gpt-image-1-mini","openai/gpt-image-1.5","openai/gpt-image-2","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/sora-2","openai/sora-2-pro","poetools/claude-code","runwayml/runway","runwayml/runway-gen-4-turbo","stabilityai/stablediffusionxl","topazlabs-co/topazlabs","trytako/tako","xai/grok-3","xai/grok-3-mini","xai/grok-4","xai/grok-4-fast-non-reasoning","xai/grok-4-fast-reasoning","xai/grok-4.1-fast-non-reasoning","xai/grok-4.1-fast-reasoning","xai/grok-4.20-multi-agent","xai/grok-code-fast-1"],helicone:["chatgpt-4o-latest","claude-3-haiku-20240307","claude-3.5-haiku","claude-3.5-sonnet-v2","claude-3.7-sonnet","claude-4.5-haiku","claude-4.5-opus","claude-4.5-sonnet","claude-haiku-4-5-20251001","claude-opus-4","claude-opus-4-1","claude-opus-4-1-20250805","claude-sonnet-4","claude-sonnet-4-5-20250929","deepseek-r1-distill-llama-70b","deepseek-reasoner","deepseek-tng-r1t2-chimera","deepseek-v3","deepseek-v3.1-terminus","deepseek-v3.2","ernie-4.5-21b-a3b-thinking","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-pro","gemini-3-pro-preview","gemma-3-12b-it","gemma2-9b-it","glm-4.6","gpt-4.1","gpt-4.1-mini","gpt-4.1-mini-2025-04-14","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-mini","gpt-oss-120b","gpt-oss-20b","grok-3","grok-3-mini","grok-4","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","hermes-2-pro-llama-3-8b","kimi-k2-0711","kimi-k2-0905","kimi-k2-thinking","llama-3.1-8b-instant","llama-3.1-8b-instruct","llama-3.1-8b-instruct-turbo","llama-3.3-70b-instruct","llama-3.3-70b-versatile","llama-4-maverick","llama-4-scout","llama-guard-4","llama-prompt-guard-2-22m","llama-prompt-guard-2-86m","mistral-large-2411","mistral-nemo","mistral-small","o1","o1-mini","o3","o3-mini","o3-pro","o4-mini","qwen2.5-coder-7b-fast","qwen3-235b-a22b-thinking","qwen3-30b-a3b","qwen3-32b","qwen3-coder","qwen3-coder-30b-a3b-instruct","qwen3-next-80b-a3b-instruct","qwen3-vl-235b-a22b-instruct","sonar","sonar-deep-research","sonar-pro","sonar-reasoning","sonar-reasoning-pro"],"ollama-cloud":["cogito-2.1:671b","deepseek-v3.1:671b","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2:123b","devstral-small-2:24b","gemini-3-flash-preview","gemma3:12b","gemma3:27b","gemma3:4b","gemma4:31b","glm-4.6","glm-4.7","glm-5","glm-5.1","gpt-oss:120b","gpt-oss:20b","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","kimi-k2:1t","minimax-m2","minimax-m2.1","minimax-m2.5","minimax-m2.7","ministral-3:14b","ministral-3:3b","ministral-3:8b","mistral-large-3:675b","nemotron-3-nano:30b","nemotron-3-super","qwen3-coder-next","qwen3-coder:480b","qwen3-next:80b","qwen3-vl:235b","qwen3-vl:235b-instruct","qwen3.5:397b","rnj-1:8b"],"zai-coding-plan":["glm-4.5-air","glm-4.7","glm-5-turbo","glm-5.1","glm-5v-turbo"],"umans-ai-coding-plan":["umans-coder","umans-flash","umans-glm-5.1","umans-kimi-k2.6","umans-qwen3.6-35b-a3b"],"the-grid-ai":["text-max","text-prime","text-standard"],baseten:["MiniMaxAI/MiniMax-M2.5","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","nvidia/Nemotron-120B-A12B","openai/gpt-oss-120b","zai-org/GLM-4.6","zai-org/GLM-4.7","zai-org/GLM-5"],frogbot:["claude-haiku-4-5","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-6","deepseek-v4-pro","gemini-2.5-flash","gemini-2.5-pro","gemini-3-1-pro-preview","gemini-3-flash-preview","gpt-4o","gpt-5-3-codex","gpt-5-4-mini","gpt-5-4-nano","gpt-5-5","gpt-oss-120b","gpt-oss-20b","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-3","grok-code-fast-1","kimi-k2-6","kimi-k2.5","minimax-m2-5","minimax-m2-7","qwen-3-6-plus","zai-glm-5-1"],"zhipuai-coding-plan":["glm-4.5-air","glm-4.7","glm-5-turbo","glm-5.1","glm-5v-turbo"],"alibaba-coding-plan":["MiniMax-M2.5","glm-4.7","glm-5","kimi-k2.5","qwen3-coder-next","qwen3-coder-plus","qwen3-max-2026-01-23","qwen3.5-plus","qwen3.6-plus"],cerebras:["gpt-oss-120b","llama3.1-8b","qwen-3-235b-a22b-instruct-2507","zai-glm-4.7"],lmstudio:["openai/gpt-oss-20b","qwen/qwen3-30b-a3b-2507","qwen/qwen3-coder-30b"],lucidquery:["lucidnova-rf1-100b","lucidquery-nexus-coder"],"moonshotai-cn":["kimi-k2-0711-preview","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2-turbo-preview","kimi-k2.5","kimi-k2.6"],gmicloud:["anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6","deepseek-ai/DeepSeek-V4-Flash","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2.6","zai-org/GLM-5-FP8","zai-org/GLM-5.1-FP8"],"abliteration-ai":["abliterated-model"],"wafer.ai":["GLM-5.1","Qwen3.5-397B-A17B"],xpersona:["xpersona-frieren-coder"],"cloudferro-sherlock":["MiniMaxAI/MiniMax-M2.5","meta-llama/Llama-3.3-70B-Instruct","openai/gpt-oss-120b","speakleash/Bielik-11B-v2.6-Instruct","speakleash/Bielik-11B-v3.0-Instruct"],"kuae-cloud-coding-plan":["GLM-4.7"],xai:["grok-2","grok-2-1212","grok-2-latest","grok-2-vision","grok-2-vision-1212","grok-2-vision-latest","grok-3","grok-3-fast","grok-3-fast-latest","grok-3-latest","grok-3-mini","grok-3-mini-fast","grok-3-mini-fast-latest","grok-3-mini-latest","grok-4","grok-4-1-fast","grok-4-1-fast-non-reasoning","grok-4-fast","grok-4-fast-non-reasoning","grok-4.20-0309-non-reasoning","grok-4.20-0309-reasoning","grok-4.20-multi-agent-0309","grok-4.3","grok-beta","grok-code-fast-1","grok-vision-beta"],meganova:["MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3.5-Plus","XiaomiMiMo/MiMo-V2-Flash","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-Exp","meta-llama/Llama-3.3-70B-Instruct","mistralai/Mistral-Nemo-Instruct-2407","mistralai/Mistral-Small-3.2-24B-Instruct-2506","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","zai-org/GLM-4.6","zai-org/GLM-4.7","zai-org/GLM-5"],evroc:["KBLab/kb-whisper-large","Qwen/Qwen3-30B-A3B-Instruct-2507-FP8","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-VL-30B-A3B-Instruct","intfloat/multilingual-e5-large-instruct","microsoft/Phi-4-multimodal-instruct","mistralai/Magistral-Small-2509","mistralai/Voxtral-Small-24B-2507","mistralai/devstral-small-2-24b-instruct-2512","moonshotai/Kimi-K2.5","nvidia/Llama-3.3-70B-Instruct-FP8","openai/gpt-oss-120b","openai/whisper-large-v3"],nearai:["Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-Embedding-0.6B","Qwen/Qwen3-Reranker-0.6B","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3.5-122B-A10B","anthropic/claude-haiku-4-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","black-forest-labs/FLUX.2-klein-4B","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3.1-flash-lite","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-5","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5.1","openai/gpt-5.2","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5","openai/gpt-oss-120b","openai/o3","openai/o3-mini","openai/o4-mini","openai/whisper-large-v3","zai-org/GLM-5.1-FP8"],synthetic:["hf:MiniMaxAI/MiniMax-M2","hf:MiniMaxAI/MiniMax-M2.1","hf:MiniMaxAI/MiniMax-M2.5","hf:Qwen/Qwen2.5-Coder-32B-Instruct","hf:Qwen/Qwen3-235B-A22B-Instruct-2507","hf:Qwen/Qwen3-235B-A22B-Thinking-2507","hf:Qwen/Qwen3-Coder-480B-A35B-Instruct","hf:Qwen/Qwen3.5-397B-A17B","hf:deepseek-ai/DeepSeek-R1","hf:deepseek-ai/DeepSeek-R1-0528","hf:deepseek-ai/DeepSeek-V3","hf:deepseek-ai/DeepSeek-V3-0324","hf:deepseek-ai/DeepSeek-V3.1","hf:deepseek-ai/DeepSeek-V3.1-Terminus","hf:deepseek-ai/DeepSeek-V3.2","hf:meta-llama/Llama-3.1-405B-Instruct","hf:meta-llama/Llama-3.1-70B-Instruct","hf:meta-llama/Llama-3.1-8B-Instruct","hf:meta-llama/Llama-3.3-70B-Instruct","hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","hf:meta-llama/Llama-4-Scout-17B-16E-Instruct","hf:moonshotai/Kimi-K2-Instruct-0905","hf:moonshotai/Kimi-K2-Thinking","hf:moonshotai/Kimi-K2.5","hf:moonshotai/Kimi-K2.6","hf:nvidia/Kimi-K2.5-NVFP4","hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4","hf:openai/gpt-oss-120b","hf:zai-org/GLM-4.6","hf:zai-org/GLM-4.7","hf:zai-org/GLM-4.7-Flash","hf:zai-org/GLM-5","hf:zai-org/GLM-5.1"],nvidia:["abacusai/dracarys-llama-3_1-70b-instruct","baai/bge-m3","black-forest-labs/flux.1-dev","black-forest-labs/flux_1-kontext-dev","black-forest-labs/flux_1-schnell","black-forest-labs/flux_2-klein-4b","bytedance/seed-oss-36b-instruct","deepseek-ai/deepseek-v3.1-terminus","deepseek-ai/deepseek-v3.2","deepseek-ai/deepseek-v4-flash","deepseek-ai/deepseek-v4-pro","google/gemma-2-2b-it","google/gemma-3-27b-it","google/gemma-3n-e2b-it","google/gemma-3n-e4b-it","google/gemma-4-31b-it","google/google-paligemma","meta/esm2-650m","meta/esmfold","meta/llama-3.1-70b-instruct","meta/llama-3.1-8b-instruct","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-1b-instruct","meta/llama-3.2-3b-instruct","meta/llama-3.2-90b-vision-instruct","meta/llama-3.3-70b-instruct","meta/llama-4-maverick-17b-128e-instruct","meta/llama-guard-4-12b","microsoft/phi-4-mini-instruct","microsoft/phi-4-multimodal-instruct","minimaxai/minimax-m2.5","minimaxai/minimax-m2.7","mistralai/devstral-2-123b-instruct-2512","mistralai/magistral-small-2506","mistralai/mistral-7b-instruct-v03","mistralai/mistral-large-3-675b-instruct-2512","mistralai/mistral-medium-3-instruct","mistralai/mistral-nemotron","mistralai/mistral-small-4-119b-2603","mistralai/mixtral-8x22b-instruct","mistralai/mixtral-8x7b-instruct","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-instruct-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.6","nvidia/active-speaker-detection","nvidia/bevformer","nvidia/cosmos-predict1-5b","nvidia/cosmos-transfer1-7b","nvidia/cosmos-transfer2_5-2b","nvidia/gliner-pii","nvidia/llama-3_1-nemotron-safety-guard-8b-v3","nvidia/llama-3_2-nemoretriever-300m-embed-v1","nvidia/llama-3_3-nemotron-super-49b-v1","nvidia/llama-3_3-nemotron-super-49b-v1_5","nvidia/llama-nemotron-embed-vl-1b-v2","nvidia/llama-nemotron-rerank-vl-1b-v2","nvidia/magpie-tts-zeroshot","nvidia/nemotron-3-content-safety","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-content-safety-reasoning-4b","nvidia/nemotron-mini-4b-instruct","nvidia/nemotron-voicechat","nvidia/nv-embed-v1","nvidia/nv-embedcode-7b-v1","nvidia/nvidia-nemotron-nano-9b-v2","nvidia/rerank-qa-mistral-4b","nvidia/riva-translate-4b-instruct-v1_1","nvidia/sparsedrive","nvidia/streampetr","nvidia/studiovoice","nvidia/synthetic-video-detector","nvidia/usdcode","nvidia/usdvalidate","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/whisper-large-v3","qwen/qwen-image","qwen/qwen-image-edit","qwen/qwen2.5-coder-32b-instruct","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-397b-a17b","sarvamai/sarvam-m","stepfun-ai/step-3.5-flash","upstage/solar-10_7b-instruct","z-ai/glm-5.1","z-ai/glm4.7"],inference:["google/gemma-3","meta/llama-3.1-8b-instruct","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-1b-instruct","meta/llama-3.2-3b-instruct","mistral/mistral-nemo-12b-instruct","osmosis/osmosis-structure-0.6b","qwen/qwen-2.5-7b-vision-instruct","qwen/qwen3-embedding-4b"],inception:["mercury-2","mercury-edit-2"],openai:["chatgpt-image-latest","gpt-3.5-turbo","gpt-4","gpt-4-turbo","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-2024-05-13","gpt-4o-2024-08-06","gpt-4o-2024-11-20","gpt-4o-mini","gpt-5","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.2-pro","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","gpt-image-1","gpt-image-1-mini","gpt-image-1.5","o1","o1-mini","o1-preview","o1-pro","o3","o3-deep-research","o3-mini","o3-pro","o4-mini","o4-mini-deep-research","text-embedding-3-large","text-embedding-3-small","text-embedding-ada-002"],requesty:["anthropic/claude-3-7-sonnet","anthropic/claude-haiku-4-5","anthropic/claude-opus-4","anthropic/claude-opus-4-1","anthropic/claude-opus-4-5","anthropic/claude-opus-4-6","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","google/gemini-2.5-flash","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3-pro-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-pro","openai/o4-mini","xai/grok-4","xai/grok-4-fast"],digitalocean:["alibaba-qwen3-32b","all-mini-lm-l6-v2","anthropic-claude-4.1-opus","anthropic-claude-4.5-haiku","anthropic-claude-4.5-sonnet","anthropic-claude-4.6-sonnet","anthropic-claude-haiku-4.5","anthropic-claude-opus-4","anthropic-claude-opus-4.5","anthropic-claude-opus-4.6","anthropic-claude-opus-4.7","anthropic-claude-sonnet-4","arcee-trinity-large-thinking","bge-m3","bge-reranker-v2-m3","deepseek-3.2","deepseek-r1-distill-llama-70b","deepseek-v3","deepseek-v4-pro","e5-large-v2","fal-ai/elevenlabs/tts/multilingual-v2","fal-ai/fast-sdxl","fal-ai/flux/schnell","fal-ai/stable-audio-25/text-to-audio","gemma-4-31B-it","glm-5","gte-large-en-v1.5","kimi-k2.5","kimi-k2.6","llama-4-maverick","llama3-8b-instruct","llama3.3-70b-instruct","minimax-m2.5","ministral-3-8b-instruct-2512","mistral-3-14B","mistral-7b-instruct-v0.3","multi-qa-mpnet-base-dot-v1","nemotron-3-nano-30b","nemotron-3-nano-omni","nemotron-nano-12b-v2-vl","nvidia-nemotron-3-super-120b","openai-gpt-4.1","openai-gpt-4o","openai-gpt-4o-mini","openai-gpt-5","openai-gpt-5-mini","openai-gpt-5-nano","openai-gpt-5.1-codex-max","openai-gpt-5.2","openai-gpt-5.2-pro","openai-gpt-5.3-codex","openai-gpt-5.4","openai-gpt-5.4-mini","openai-gpt-5.4-nano","openai-gpt-5.4-pro","openai-gpt-5.5","openai-gpt-image-1","openai-gpt-image-1.5","openai-gpt-image-2","openai-gpt-oss-120b","openai-gpt-oss-20b","openai-o1","openai-o3","openai-o3-mini","qwen-2.5-14b-instruct","qwen3-coder-flash","qwen3-embedding-0.6b","qwen3-tts-voicedesign","qwen3.5-397b-a17b","stable-diffusion-3.5-large","wan2-2-t2v-a14b"],vultr:["DeepSeek-V3.2","GLM-5-FP8","Kimi-K2.5","MiniMax-M2.5","gpt-oss-120b"],"alibaba-coding-plan-cn":["MiniMax-M2.5","glm-4.7","glm-5","kimi-k2.5","qwen3-coder-next","qwen3-coder-plus","qwen3-max-2026-01-23","qwen3.5-plus","qwen3.6-plus"],mistral:["codestral-latest","devstral-2512","devstral-medium-2507","devstral-medium-latest","devstral-small-2505","devstral-small-2507","labs-devstral-small-2512","magistral-medium-latest","magistral-small","ministral-3b-latest","ministral-8b-latest","mistral-embed","mistral-large-2411","mistral-large-2512","mistral-large-latest","mistral-medium-2505","mistral-medium-2508","mistral-medium-2604","mistral-medium-latest","mistral-nemo","mistral-small-2506","mistral-small-2603","mistral-small-latest","open-mistral-7b","open-mixtral-8x22b","open-mixtral-8x7b","pixtral-12b","pixtral-large-latest"],ovhcloud:["gpt-oss-120b","gpt-oss-20b","llama-3.1-8b-instruct","meta-llama-3_3-70b-instruct","mistral-7b-instruct-v0.3","mistral-nemo-instruct-2407","mistral-small-3.2-24b-instruct-2506","qwen2.5-vl-72b-instruct","qwen3-32b","qwen3-coder-30b-a3b-instruct","qwen3.5-9b"],friendli:["MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3-235B-A22B-Instruct-2507","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.3-70B-Instruct","zai-org/GLM-5","zai-org/GLM-5.1"],cortecs:["claude-4-5-sonnet","claude-4-6-sonnet","claude-haiku-4-5","claude-opus4-5","claude-opus4-6","claude-opus4-7","claude-sonnet-4","codestral-2508","deepseek-r1-0528","deepseek-v3-0324","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2512","devstral-small-2512","gemini-2.5-pro","glm-4.5","glm-4.5-air","glm-4.7","glm-4.7-flash","glm-5","glm-5.1","gpt-4.1","gpt-oss-120b","hermes-4-70b","intellect-3","kimi-k2-instruct","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","llama-3.1-405b-instruct","llama-3.3-70b-instruct","minimax-m2","minimax-m2.1","minimax-m2.5","minimax-m2.7","mistral-large-2512","mixtral-8x7B-instruct-v0.1","nemotron-3-super-120b-a12b","nova-pro-v1","qwen-2.5-72b-instruct","qwen3-235b-a22b-instruct-2507","qwen3-32b","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-next","qwen3-next-80b-a3b-thinking","qwen3.5-122b-a10b","qwen3.5-397b-a17b"],siliconflow:["ByteDance-Seed/Seed-OSS-36B-Instruct","MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/QwQ-32B","Qwen/Qwen2.5-14B-Instruct","Qwen/Qwen2.5-32B-Instruct","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-72B-Instruct-128K","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen2.5-VL-7B-Instruct","Qwen/Qwen3-14B","Qwen/Qwen3-235B-A22B","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-32B","Qwen/Qwen3-8B","Qwen/Qwen3-Coder-30B-A3B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Omni-30B-A3B-Captioner","Qwen/Qwen3-Omni-30B-A3B-Instruct","Qwen/Qwen3-Omni-30B-A3B-Thinking","Qwen/Qwen3-VL-235B-A22B-Instruct","Qwen/Qwen3-VL-235B-A22B-Thinking","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3-VL-30B-A3B-Thinking","Qwen/Qwen3-VL-32B-Instruct","Qwen/Qwen3-VL-32B-Thinking","Qwen/Qwen3-VL-8B-Instruct","Qwen/Qwen3-VL-8B-Thinking","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","baidu/ERNIE-4.5-300B-A47B","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-R1-Distill-Qwen-14B","deepseek-ai/DeepSeek-R1-Distill-Qwen-32B","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-Exp","deepseek-ai/deepseek-v4-flash","deepseek-ai/deepseek-v4-pro","deepseek-ai/deepseek-vl2","inclusionAI/Ling-flash-2.0","inclusionAI/Ling-mini-2.0","inclusionAI/Ring-flash-2.0","meta-llama/Meta-Llama-3.1-8B-Instruct","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","nex-agi/DeepSeek-V3.1-Nex-N1","openai/gpt-oss-120b","openai/gpt-oss-20b","stepfun-ai/Step-3.5-Flash","tencent/Hunyuan-A13B-Instruct","tencent/Hunyuan-MT-7B","zai-org/GLM-4.5","zai-org/GLM-4.5-Air","zai-org/GLM-4.5V","zai-org/GLM-4.6","zai-org/GLM-4.6V","zai-org/GLM-4.7","zai-org/GLM-5","zai-org/GLM-5.1","zai-org/GLM-5V-Turbo"],vercel:["alibaba/qwen-3-14b","alibaba/qwen-3-235b","alibaba/qwen-3-30b","alibaba/qwen-3-32b","alibaba/qwen-3.6-max-preview","alibaba/qwen3-235b-a22b-thinking","alibaba/qwen3-coder","alibaba/qwen3-coder-30b-a3b","alibaba/qwen3-coder-next","alibaba/qwen3-coder-plus","alibaba/qwen3-embedding-0.6b","alibaba/qwen3-embedding-4b","alibaba/qwen3-embedding-8b","alibaba/qwen3-max","alibaba/qwen3-max-preview","alibaba/qwen3-max-thinking","alibaba/qwen3-next-80b-a3b-instruct","alibaba/qwen3-next-80b-a3b-thinking","alibaba/qwen3-vl-235b-a22b-instruct","alibaba/qwen3-vl-instruct","alibaba/qwen3-vl-thinking","alibaba/qwen3.5-flash","alibaba/qwen3.5-plus","alibaba/qwen3.6-27b","alibaba/qwen3.6-plus","amazon/nova-2-lite","amazon/nova-lite","amazon/nova-micro","amazon/nova-pro","amazon/titan-embed-text-v2","anthropic/claude-3-haiku","anthropic/claude-3-opus","anthropic/claude-3.5-haiku","anthropic/claude-3.5-sonnet","anthropic/claude-3.5-sonnet-20240620","anthropic/claude-3.7-sonnet","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-mini","bfl/flux-kontext-max","bfl/flux-kontext-pro","bfl/flux-pro-1.0-fill","bfl/flux-pro-1.1","bfl/flux-pro-1.1-ultra","bytedance/seed-1.6","bytedance/seed-1.8","cohere/command-a","cohere/embed-v4.0","deepseek/deepseek-r1","deepseek/deepseek-v3","deepseek/deepseek-v3.1","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-thinking","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.0-flash","google/gemini-2.0-flash-lite","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-image-preview","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-flash-preview-09-2025","google/gemini-2.5-pro","google/gemini-3-flash","google/gemini-3-pro-image","google/gemini-3-pro-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-embedding-001","google/gemini-embedding-2","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","google/imagen-4.0-fast-generate-001","google/imagen-4.0-generate-001","google/imagen-4.0-ultra-generate-001","google/text-embedding-005","google/text-multilingual-embedding-002","inception/mercury-2","inception/mercury-coder-small","inception/mercury-edit-2","interfaze/interfaze-beta","kwaipilot/kat-coder-pro-v1","kwaipilot/kat-coder-pro-v2","meituan/longcat-flash-chat","meituan/longcat-flash-thinking","meituan/longcat-flash-thinking-2601","meta/llama-3.1-70b","meta/llama-3.1-8b","meta/llama-3.2-11b","meta/llama-3.2-1b","meta/llama-3.2-3b","meta/llama-3.2-90b","meta/llama-3.3-70b","meta/llama-4-maverick","meta/llama-4-scout","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.1-lightning","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","mistral/codestral","mistral/codestral-embed","mistral/devstral-2","mistral/devstral-small","mistral/devstral-small-2","mistral/magistral-medium","mistral/magistral-small","mistral/ministral-14b","mistral/ministral-3b","mistral/ministral-8b","mistral/mistral-embed","mistral/mistral-large-3","mistral/mistral-medium","mistral/mistral-nemo","mistral/mistral-small","mistral/mixtral-8x22b-instruct","mistral/pixtral-12b","mistral/pixtral-large","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-turbo","moonshotai/kimi-k2-turbo","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-nano-12b-v2-vl","nvidia/nemotron-nano-9b-v2","openai/codex-mini","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-instruct","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-4o-mini-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.1-instant","openai/gpt-5.1-thinking","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-pro","openai/o4-mini","openai/text-embedding-3-large","openai/text-embedding-3-small","openai/text-embedding-ada-002","perplexity/sonar","perplexity/sonar-pro","perplexity/sonar-reasoning","perplexity/sonar-reasoning-pro","prime-intellect/intellect-3","recraft/recraft-v2","recraft/recraft-v3","vercel/v0-1.0-md","vercel/v0-1.5-md","voyage/voyage-3-large","voyage/voyage-3.5","voyage/voyage-3.5-lite","voyage/voyage-4","voyage/voyage-4-large","voyage/voyage-4-lite","voyage/voyage-code-2","voyage/voyage-code-3","voyage/voyage-finance-2","voyage/voyage-law-2","xai/grok-2-vision","xai/grok-3","xai/grok-3-fast","xai/grok-3-mini","xai/grok-3-mini-fast","xai/grok-4","xai/grok-4-fast-non-reasoning","xai/grok-4-fast-reasoning","xai/grok-4.1-fast-non-reasoning","xai/grok-4.1-fast-reasoning","xai/grok-4.20-multi-agent","xai/grok-4.20-multi-agent-beta","xai/grok-4.20-non-reasoning","xai/grok-4.20-non-reasoning-beta","xai/grok-4.20-reasoning","xai/grok-4.20-reasoning-beta","xai/grok-4.3","xai/grok-code-fast-1","xai/grok-imagine-image","xai/grok-imagine-image-pro","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","zai/glm-4.5","zai/glm-4.5-air","zai/glm-4.5v","zai/glm-4.6","zai/glm-4.6v","zai/glm-4.6v-flash","zai/glm-4.7","zai/glm-4.7-flash","zai/glm-4.7-flashx","zai/glm-5","zai/glm-5-turbo","zai/glm-5.1","zai/glm-5v-turbo"],minimax:["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],llmgateway:["auto","claude-3-5-sonnet-20241022","claude-3-7-sonnet","claude-3-7-sonnet-20250219","claude-3-opus","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-6","codestral-2508","custom","deepseek-r1-0528","deepseek-v3.1","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2512","devstral-small-2507","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-pro","gemini-3-flash-preview","gemini-3.1-flash-lite","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gemini-pro-latest","gemma-2-27b-it-together","gemma-3-12b-it","gemma-3-1b-it","gemma-3-27b","gemma-3-4b-it","gemma-3n-e2b-it","gemma-3n-e4b-it","glm-4-32b-0414-128k","glm-4.5","glm-4.5-air","glm-4.5-airx","glm-4.5-flash","glm-4.5-x","glm-4.5v","glm-4.6","glm-4.6v","glm-4.6v-flash","glm-4.6v-flashx","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5.1","gpt-3.5-turbo","gpt-4","gpt-4-turbo","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-4o-mini-search-preview","gpt-4o-search-preview","gpt-5","gpt-5-chat-latest","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.2-pro","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","gpt-oss-120b","gpt-oss-20b","grok-3","grok-4","grok-4-0709","grok-4-1-fast","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-20-beta-0309-non-reasoning","grok-4-20-beta-0309-reasoning","grok-4-3","grok-4-fast","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","hermes-2-pro-llama-3-8b","kimi-k2","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2.5","kimi-k2.6","llama-3-70b-instruct","llama-3-8b-instruct","llama-3.1-70b-instruct","llama-3.1-8b-instruct","llama-3.1-nemotron-ultra-253b","llama-3.2-11b-instruct","llama-3.2-3b-instruct","llama-3.3-70b-instruct","llama-4-maverick-17b-instruct","llama-4-scout","llama-4-scout-17b-instruct","mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2.5","mimo-v2.5-pro","minimax-m2","minimax-m2.1","minimax-m2.1-lightning","minimax-m2.5","minimax-m2.5-highspeed","minimax-m2.7","minimax-m2.7-highspeed","minimax-text-01","ministral-14b-2512","ministral-3b-2512","ministral-8b-2512","mistral-large-2512","mistral-large-latest","mistral-small-2506","o1","o3","o3-mini","o4-mini","pixtral-large-latest","qwen-coder-plus","qwen-flash","qwen-max","qwen-max-latest","qwen-omni-turbo","qwen-plus","qwen-plus-latest","qwen-turbo","qwen-vl-max","qwen-vl-plus","qwen2-5-vl-32b-instruct","qwen2-5-vl-72b-instruct","qwen25-coder-7b","qwen3-235b-a22b-fp8","qwen3-235b-a22b-instruct-2507","qwen3-235b-a22b-thinking-2507","qwen3-30b-a3b-fp8","qwen3-30b-a3b-instruct-2507","qwen3-30b-a3b-thinking-2507","qwen3-32b","qwen3-32b-fp8","qwen3-4b-fp8","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-next","qwen3-coder-plus","qwen3-max","qwen3-max-2026-01-23","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-vl-235b-a22b-instruct","qwen3-vl-235b-a22b-thinking","qwen3-vl-30b-a3b-instruct","qwen3-vl-30b-a3b-thinking","qwen3-vl-8b-instruct","qwen3-vl-flash","qwen3-vl-plus","qwen3.6-35b-a3b","qwen3.6-max-preview","qwen3.6-plus","qwen35-397b-a17b","qwq-plus","seed-1-6-250615","seed-1-6-250915","seed-1-6-flash-250715","seed-1-8-251228","sonar","sonar-pro","sonar-reasoning-pro"],"cloudflare-workers-ai":["@cf/google/gemma-4-26b-a4b-it","@cf/meta/llama-4-scout-17b-16e-instruct","@cf/moonshotai/kimi-k2.5","@cf/moonshotai/kimi-k2.6","@cf/nvidia/nemotron-3-120b-a12b","@cf/openai/gpt-oss-120b","@cf/openai/gpt-oss-20b","@cf/zai-org/glm-4.7-flash"],groq:["allam-2-7b","canopylabs/orpheus-arabic-saudi","canopylabs/orpheus-v1-english","groq/compound","groq/compound-mini","llama-3.1-8b-instant","llama-3.3-70b-versatile","meta-llama/llama-4-scout-17b-16e-instruct","meta-llama/llama-prompt-guard-2-22m","meta-llama/llama-prompt-guard-2-86m","moonshotai/kimi-k2-instruct-0905","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","qwen/qwen3-32b","whisper-large-v3","whisper-large-v3-turbo"],fastrouter:["anthropic/claude-opus-4.1","anthropic/claude-sonnet-4","deepseek-ai/deepseek-r1-distill-llama-70b","google/gemini-2.5-flash","google/gemini-2.5-pro","moonshotai/kimi-k2","openai/gpt-4.1","openai/gpt-5","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-oss-120b","openai/gpt-oss-20b","qwen/qwen3-coder","x-ai/grok-4","z-ai/glm-5"],stackit:["Qwen/Qwen3-VL-235B-A22B-Instruct-FP8","Qwen/Qwen3-VL-Embedding-8B","cortecs/Llama-3.3-70B-Instruct-FP8-Dynamic","google/gemma-3-27b-it","intfloat/e5-mistral-7b-instruct","neuralmagic/Meta-Llama-3.1-8B-Instruct-FP8","neuralmagic/Mistral-Nemo-Instruct-2407-FP8","openai/gpt-oss-120b"],"tencent-coding-plan":["glm-5","hunyuan-2.0-instruct","hunyuan-2.0-thinking","hunyuan-t1","hunyuan-turbos","kimi-k2.5","minimax-m2.5","tc-code-latest"],"privatemode-ai":["gemma-3-27b","gpt-oss-120b","qwen3-coder-30b-a3b","qwen3-embedding-4b","whisper-large-v3"],google:["gemini-1.5-flash","gemini-1.5-flash-8b","gemini-1.5-pro","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-image-preview","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-preview-04-17","gemini-2.5-flash-preview-05-20","gemini-2.5-flash-preview-09-2025","gemini-2.5-flash-preview-tts","gemini-2.5-pro","gemini-2.5-pro-preview-05-06","gemini-2.5-pro-preview-06-05","gemini-2.5-pro-preview-tts","gemini-3-flash-preview","gemini-3-pro-preview","gemini-3.1-flash-image-preview","gemini-3.1-flash-lite","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gemini-3.1-pro-preview-customtools","gemini-embedding-001","gemini-flash-latest","gemini-flash-lite-latest","gemini-live-2.5-flash","gemini-live-2.5-flash-preview-native-audio","gemma-3-12b-it","gemma-3-27b-it","gemma-3-4b-it","gemma-3n-e2b-it","gemma-3n-e4b-it","gemma-4-26b-a4b-it","gemma-4-31b-it"],drun:["public/deepseek-r1","public/deepseek-v3","public/minimax-m25"],moonshotai:["kimi-k2-0711-preview","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2-turbo-preview","kimi-k2.5","kimi-k2.6"],berget:["google/gemma-4-31B-it","meta-llama/Llama-3.3-70B-Instruct","mistralai/Mistral-Medium-3.5-128B","mistralai/Mistral-Small-3.2-24B-Instruct-2506","openai/gpt-oss-120b","zai-org/GLM-4.7"],"github-models":["ai21-labs/ai21-jamba-1.5-large","ai21-labs/ai21-jamba-1.5-mini","cohere/cohere-command-a","cohere/cohere-command-r","cohere/cohere-command-r-08-2024","cohere/cohere-command-r-plus","cohere/cohere-command-r-plus-08-2024","core42/jais-30b-chat","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-v3-0324","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-90b-vision-instruct","meta/llama-3.3-70b-instruct","meta/llama-4-maverick-17b-128e-instruct-fp8","meta/llama-4-scout-17b-16e-instruct","meta/meta-llama-3-70b-instruct","meta/meta-llama-3-8b-instruct","meta/meta-llama-3.1-405b-instruct","meta/meta-llama-3.1-70b-instruct","meta/meta-llama-3.1-8b-instruct","microsoft/mai-ds-r1","microsoft/phi-3-medium-128k-instruct","microsoft/phi-3-medium-4k-instruct","microsoft/phi-3-mini-128k-instruct","microsoft/phi-3-mini-4k-instruct","microsoft/phi-3-small-128k-instruct","microsoft/phi-3-small-8k-instruct","microsoft/phi-3.5-mini-instruct","microsoft/phi-3.5-moe-instruct","microsoft/phi-3.5-vision-instruct","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/phi-4-mini-reasoning","microsoft/phi-4-multimodal-instruct","microsoft/phi-4-reasoning","mistral-ai/codestral-2501","mistral-ai/ministral-3b","mistral-ai/mistral-large-2411","mistral-ai/mistral-medium-2505","mistral-ai/mistral-nemo","mistral-ai/mistral-small-2503","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/o1","openai/o1-mini","openai/o1-preview","openai/o3","openai/o3-mini","openai/o4-mini","xai/grok-3","xai/grok-3-mini"],neuralwatt:["MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3.5-397B-A17B-FP8","Qwen/Qwen3.6-35B-A3B","glm-5-fast","glm-5.1-fast","kimi-k2.5-fast","kimi-k2.6-fast","mistralai/Devstral-Small-2-24B-Instruct-2512","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-20b","qwen3.5-397b-fast","qwen3.6-35b-fast","zai-org/GLM-5.1-FP8"],sarvam:["sarvam-105b","sarvam-30b"],togetherai:["MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.7","Qwen/Qwen3-235B-A22B-Instruct-2507-tput","Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8","Qwen/Qwen3-Coder-Next-FP8","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.6-Plus","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3-1","deepseek-ai/DeepSeek-V4-Pro","essentialai/Rnj-1-Instruct","google/gemma-4-31B-it","meta-llama/Llama-3.3-70B-Instruct-Turbo","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-120b","zai-org/GLM-5.1"],"qihang-ai":["claude-haiku-4-5-20251001","claude-opus-4-5-20251101","claude-sonnet-4-5-20250929","gemini-2.5-flash","gemini-3-flash-preview","gemini-3-pro-preview","gpt-5-mini","gpt-5.2","gpt-5.2-codex"],"tencent-tokenhub":["hy3-preview"],anthropic:["claude-3-5-haiku-20241022","claude-3-5-haiku-latest","claude-3-5-sonnet-20240620","claude-3-5-sonnet-20241022","claude-3-7-sonnet-20250219","claude-3-haiku-20240307","claude-3-opus-20240229","claude-3-sonnet-20240229","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-0","claude-opus-4-1","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-0","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-6"],modelscope:["Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-Coder-30B-A3B-Instruct","ZhipuAI/GLM-4.5","ZhipuAI/GLM-4.6"],"hpc-ai":["minimax/minimax-m2.5","moonshotai/kimi-k2.5","zai-org/glm-5.1"],xiaomi:["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2.5","mimo-v2.5-pro"],clarifai:["arcee_ai/AFM/models/trinity-mini","clarifai/main/models/mm-poly-8b","deepseek-ai/deepseek-ocr/models/DeepSeek-OCR","minimaxai/chat-completion/models/MiniMax-M2_5-high-throughput","mistralai/completion/models/Ministral-3-14B-Reasoning-2512","mistralai/completion/models/Ministral-3-3B-Reasoning-2512","moonshotai/chat-completion/models/Kimi-K2_6","openai/chat-completion/models/gpt-oss-120b-high-throughput","openai/chat-completion/models/gpt-oss-20b","qwen/qwenCoder/models/Qwen3-Coder-30B-A3B-Instruct","qwen/qwenLM/models/Qwen3-30B-A3B-Instruct-2507","qwen/qwenLM/models/Qwen3-30B-A3B-Thinking-2507"],"minimax-cn":["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],"regolo-ai":["gpt-oss-120b","gpt-oss-20b","llama-3.1-8b-instruct","llama-3.3-70b-instruct","minimax-m2.5","mistral-small-4-119b","mistral-small3.2","qwen-image","qwen3-coder-next","qwen3-embedding-8b","qwen3-reranker-4b","qwen3.5-122b","qwen3.5-9b"],"xiaomi-token-plan-ams":["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],zhipuai:["glm-4.5","glm-4.5-air","glm-4.5-flash","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5.1","glm-5v-turbo"],nova:["nova-2-lite-v1","nova-2-pro-v1"],"atomic-chat":["Meta-Llama-3_1-8B-Instruct-GGUF","Qwen3_5-9B-MLX-4bit","Qwen3_5-9B-Q4_K_M","gemma-4-E4B-it-IQ4_XS","gemma-4-E4B-it-MLX-4bit"],netlify:["anthropic/claude-haiku-4-5","anthropic/claude-haiku-4-5-20251001","anthropic/claude-opus-4-1-20250805","anthropic/claude-opus-4-20250514","anthropic/claude-opus-4-5","anthropic/claude-opus-4-5-20251101","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-0","anthropic/claude-sonnet-4-20250514","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-5-20250929","anthropic/claude-sonnet-4-6","gemini/gemini-2.0-flash","gemini/gemini-2.0-flash-lite","gemini/gemini-2.5-flash","gemini/gemini-2.5-flash-image","gemini/gemini-2.5-flash-lite","gemini/gemini-2.5-pro","gemini/gemini-3-flash-preview","gemini/gemini-3-pro-image-preview","gemini/gemini-3.1-flash-image-preview","gemini/gemini-3.1-flash-lite","gemini/gemini-3.1-flash-lite-preview","gemini/gemini-3.1-pro-preview","gemini/gemini-3.1-pro-preview-customtools","gemini/gemini-flash-latest","gemini/gemini-flash-lite-latest","openai/chat-latest","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-2025-08-07","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-mini-2025-08-07","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-2025-11-13","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-2025-12-11","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.2-pro-2025-12-11","openai/gpt-5.3-chat-latest","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-2026-03-05","openai/gpt-5.4-mini","openai/gpt-5.4-mini-2026-03-17","openai/gpt-5.4-nano","openai/gpt-5.4-nano-2026-03-17","openai/gpt-5.4-pro","openai/gpt-5.4-pro-2026-03-05","openai/gpt-5.5","openai/gpt-5.5-2026-04-23","openai/gpt-5.5-pro","openai/gpt-5.5-pro-2026-04-23","openai/o3","openai/o3-mini","openai/o4-mini"]},version:"1.0.0"};Sb0=new Proxy({},{get($,Y){return $3.getInstance().getProviders()[Y]},ownKeys(){let Y=$3.getInstance().getProviders();return Object.keys(Y)},has($,Y){let G=$3.getInstance().getProviders();return Y in G},getOwnPropertyDescriptor($,Y){let G=$3.getInstance().getProviders();if(Y in G)return{enumerable:!0,configurable:!0};return}}),X67=new Proxy({},{get($,Y){return $3.getInstance().getModels()[Y]},ownKeys(){let Y=$3.getInstance().getModels();return Object.keys(Y)},has($,Y){let G=$3.getInstance().getModels();return Y in G},getOwnPropertyDescriptor($,Y){let G=$3.getInstance().getModels();if(Y in G)return{enumerable:!0,configurable:!0};return}}),xY4=process.env.MASTRA_DEV==="true"||process.env.MASTRA_DEV==="1",rn8=!jb0()&&(process.env.MASTRA_AUTO_REFRESH_PROVIDERS==="true"||process.env.MASTRA_AUTO_REFRESH_PROVIDERS!=="false"&&xY4);if(rn8)$3.getInstance({useDynamicLoading:xY4}).startAutoRefresh()});import{randomUUID as yY4}from"crypto";function kb0($){if(!$)return{};return{inputTokens:$.promptTokens,outputTokens:$.completionTokens}}function vb0($){return new ReadableStream({start(Y){Y.enqueue({type:"stream-start",warnings:$.warnings}),Y.enqueue({type:"response-metadata",id:$.response?.id,modelId:$.response?.modelId,timestamp:$.response?.timestamp});let X={};for(let G of $.content)if(G.type==="tool-call"){let J=G;X[J.toolCallId]={providerExecuted:J.providerExecuted},Y.enqueue({type:"tool-input-start",id:J.toolCallId,toolName:J.toolName,providerExecuted:J.providerExecuted,dynamic:J.dynamic,providerMetadata:J.providerMetadata}),Y.enqueue({type:"tool-input-delta",id:J.toolCallId,delta:J.input,providerMetadata:J.providerMetadata}),Y.enqueue({type:"tool-input-end",id:J.toolCallId,providerMetadata:J.providerMetadata}),Y.enqueue(J)}else if(G.type==="tool-result"){let J=G,Q=X[J.toolCallId];if(Q?.providerExecuted)Y.enqueue({...J,providerExecuted:Q.providerExecuted});else Y.enqueue(G)}else if(G.type==="text"){let J=G,Q=`msg_${yY4()}`;Y.enqueue({type:"text-start",id:Q,providerMetadata:J.providerMetadata}),Y.enqueue({type:"text-delta",id:Q,delta:J.text}),Y.enqueue({type:"text-end",id:Q})}else if(G.type==="reasoning"){let J=`reasoning_${yY4()}`,Q=G;Y.enqueue({type:"reasoning-start",id:J,providerMetadata:Q.providerMetadata}),Y.enqueue({type:"reasoning-delta",id:J,delta:Q.text,providerMetadata:Q.providerMetadata}),Y.enqueue({type:"reasoning-end",id:J,providerMetadata:Q.providerMetadata})}else if(G.type==="file"){let J=G;Y.enqueue({type:"file",mediaType:J.mediaType,data:J.data})}else if(G.type==="source"){let J=G;if(J.sourceType==="url")Y.enqueue({type:"source",id:J.id,sourceType:"url",url:J.url,title:J.title,providerMetadata:J.providerMetadata});else Y.enqueue({type:"source",id:J.id,sourceType:"document",mediaType:J.mediaType,filename:J.filename,title:J.title,providerMetadata:J.providerMetadata})}Y.enqueue({type:"finish",finishReason:$.finishReason,usage:$.usage,providerMetadata:$.providerMetadata}),Y.close()}})}function bY4($){if(!$.tools?.length)return $;let Y=!1,X=$.tools.map((J)=>{if(J.type!=="function"||!("strict"in J))return J;if(J.strict===!0)Y=!0;let{strict:Q,...W}=J;return W}),G={...$,tools:X};if(Y){let J=$.providerOptions?.openai??{};if(J.strictJsonSchema==null)G={...G,providerOptions:{...$.providerOptions,openai:{...J,strictJsonSchema:!0}}}}return G}var hY4,zj=class{specificationVersion="v2";provider;modelId;gatewayId;supportedUrls;#$;constructor($){this.#$=$,this.provider=this.#$.provider,this.modelId=this.#$.modelId,this.gatewayId=$.gatewayId,this.supportedUrls=this.#$.supportedUrls}async doGenerate($){let Y=await this.#$.doGenerate(bY4($));return{...Y,request:Y.request,response:Y.response,stream:vb0(Y)}}async doStream($){return await this.#$.doStream(bY4($))}serializeForSpan(){return{specificationVersion:this.specificationVersion,modelId:this.modelId,provider:this.provider,gatewayId:this.gatewayId}}};var xb0=V0(()=>{xU();Xf();DO();aw();SO();dZ();ak0();EW();f80();hY4=class extends u8{#$;#Y;#X;constructor({model:$,mastra:Y,options:X}){super({name:"aisdk"});if(this.#$=$,this.#X=X,Y){if(this.#Y=Y,Y.getLogger())this.__setLogger(this.#Y.getLogger())}}__registerPrimitives($){if($.logger)this.__setLogger($.logger)}__registerMastra($){this.#Y=$}getProvider(){return this.#$.provider}getModelId(){return this.#$.modelId}getModel(){return this.#$}_applySchemaCompat($){let Y=this.#$,X=[];if(Y){let G={modelId:Y.modelId,supportsStructuredOutputs:Y.supportsStructuredOutputs??!1,provider:Y.provider};X.push(new x80(G),new Sg(G),new b80(G),new x_(G),new y80(G),new h80(G))}return WE({schema:$,compatLayers:X,mode:"aiSdkSchema"})}async __text({runId:$,messages:Y,maxSteps:X=5,tools:G={},temperature:J,toolChoice:Q="auto",onStepFinish:W,experimental_output:Z,threadId:K,resourceId:H,requestContext:z,...V}){let A=this.#$,F=$4(V);this.logger.debug("Generating text",{runId:$,messages:Y,maxSteps:X,threadId:K,resourceId:H,tools:Object.keys(G)});let N=void 0;if(Z)if(this.logger.debug("Using experimental output",{runId:$}),g80(Z)){if(N=Z,uF(N))N=Yf(N).type;let B=W4(N),O=$6(B);N=BX(O)}else N=BX(Z);if(G&&Object.keys(G).length>0){for(let B of Object.values(G))if(B.parameters)if("validate"in B.parameters)B.parameters=B.parameters;else if(V5(B.parameters))B.parameters=BX($6(B.parameters));else B.parameters=BX(B.parameters)}let D=F.tracingContext.currentSpan?.createChildSpan({name:`llm: '${A.modelId}'`,type:"model_generation",input:{messages:Y,schema:N},attributes:{model:A.modelId,provider:A.provider,parameters:{temperature:J,maxOutputTokens:V.maxTokens,topP:V.topP,frequencyPenalty:V.frequencyPenalty,presencePenalty:V.presencePenalty},streaming:!1},metadata:{runId:$,threadId:K,resourceId:H},tracingPolicy:this.#X?.tracingPolicy,requestContext:z}),L={...V,messages:Y,model:A,temperature:J,tools:{...G},toolChoice:Q,maxSteps:X,onStepFinish:async(B)=>{try{await W?.({...B,runId:$})}catch(E){throw new G0({id:"LLM_TEXT_ON_STEP_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:A.modelId,modelProvider:A.provider,runId:$??"unknown",threadId:K??"unknown",resourceId:H??"unknown",finishReason:B?.finishReason,toolCalls:B?.toolCalls?JSON.stringify(B.toolCalls):"",toolResults:B?.toolResults?JSON.stringify(B.toolResults):"",usage:B?.usage?JSON.stringify(B.usage):""}},E)}this.logger.debug("Text step change",{text:B?.text,toolCalls:B?.toolCalls,toolResults:B?.toolResults,finishReason:B?.finishReason,usage:B?.usage,runId:$});let O=parseInt(B?.response?.headers?.["x-ratelimit-remaining-tokens"]??"",10);if(!isNaN(O)&&O>0&&O<2000)this.logger.warn("Rate limit approaching, waiting 10 seconds",{runId:$}),await y_(1e4)},experimental_output:N?d60.object({schema:N}):void 0};try{let B=await DQ({span:D,fn:()=>qt1(L)});if(N&&B.finishReason==="stop")B.object=B.experimental_output;return D?.end({output:{text:B.text,object:B.object,reasoning:B.reasoningDetails,reasoningText:B.reasoning,files:B.files,sources:B.sources,toolCalls:B.toolCalls,warnings:B.warnings},attributes:{finishReason:B.finishReason,responseId:B.response?.id,responseModel:B.response?.modelId,usage:kb0(B.usage)}}),B}catch(B){let O=new G0({id:"LLM_GENERATE_TEXT_AI_SDK_EXECUTION_FAILED",domain:"LLM",category:"THIRD_PARTY",details:{modelId:A.modelId,modelProvider:A.provider,runId:$??"unknown",threadId:K??"unknown",resourceId:H??"unknown"}},B);throw this.logger.error("Generate text failed",{error:O,runId:$,threadId:K,resourceId:H,modelId:A.modelId,modelProvider:A.provider}),D?.error({error:O}),O}}async __textObject({messages:$,structuredOutput:Y,runId:X,threadId:G,resourceId:J,requestContext:Q,...W}){let Z=this.#$,K=$4(W);this.logger.debug("Generating text object",{runId:X});let H=K.tracingContext.currentSpan?.createChildSpan({name:`llm: '${Z.modelId}'`,type:"model_generation",input:{messages:$},attributes:{model:Z.modelId,provider:Z.provider,parameters:{temperature:W.temperature,maxOutputTokens:W.maxTokens,topP:W.topP,frequencyPenalty:W.frequencyPenalty,presencePenalty:W.presencePenalty},streaming:!1},metadata:{runId:X,threadId:G,resourceId:J},tracingPolicy:this.#X?.tracingPolicy,requestContext:Q});try{let z="object";if(uF(Y)){z="array";let F=Yf(Y);if("element"in F)Y=F.element;else Y=F.type}let V=this._applySchemaCompat(Y);H?.update({input:{messages:$,schema:V}});let A={...W,messages:$,model:Z,output:z,schema:V};try{let F=await to1(A);return H?.end({output:{object:F.object,warnings:F.warnings},attributes:{finishReason:F.finishReason,responseId:F.response?.id,responseModel:F.response?.modelId,usage:kb0(F.usage)}}),F}catch(F){let N=new G0({id:"LLM_GENERATE_OBJECT_AI_SDK_EXECUTION_FAILED",domain:"LLM",category:"THIRD_PARTY",details:{modelId:Z.modelId,modelProvider:Z.provider,runId:X??"unknown",threadId:G??"unknown",resourceId:J??"unknown"}},F);throw this.logger.error("Generate object failed",{error:N,runId:X,threadId:G,resourceId:J,modelId:Z.modelId,modelProvider:Z.provider}),H?.error({error:N}),N}}catch(z){if(z instanceof G0)throw z;let V=new G0({id:"LLM_GENERATE_OBJECT_AI_SDK_SCHEMA_CONVERSION_FAILED",domain:"LLM",category:"USER",details:{modelId:Z.modelId,modelProvider:Z.provider,runId:X??"unknown",threadId:G??"unknown",resourceId:J??"unknown"}},z);throw this.logger.error("Generate object schema conversion failed",{error:V,runId:X,threadId:G,resourceId:J,modelId:Z.modelId,modelProvider:Z.provider}),H?.error({error:V}),V}}__stream({messages:$,onStepFinish:Y,onFinish:X,maxSteps:G=5,tools:J={},runId:Q,temperature:W,toolChoice:Z="auto",experimental_output:K,threadId:H,resourceId:z,requestContext:V,...A}){let F=this.#$,N=$4(A),D;if(K)if(typeof K.parse==="function"){if(D=K,uF(D))D=Yf(D).type}else D=BX(K);let L=N.tracingContext.currentSpan?.createChildSpan({name:`llm: '${F.modelId}'`,type:"model_generation",input:{messages:$},attributes:{model:F.modelId,provider:F.provider,parameters:{temperature:W,maxOutputTokens:A.maxTokens,topP:A.topP,frequencyPenalty:A.frequencyPenalty,presencePenalty:A.presencePenalty},streaming:!0},metadata:{runId:Q,threadId:H,resourceId:z},tracingPolicy:this.#X?.tracingPolicy,requestContext:V});if(L)CO({span:L,fn:()=>this.logger.debug("Streaming text",{runId:Q,threadId:H,resourceId:z,messages:$,maxSteps:G,tools:Object.keys(J||{})})});if(J&&Object.keys(J).length>0){for(let O of Object.values(J))if(O.parameters)if("validate"in O.parameters)O.parameters=O.parameters;else if(V5(O.parameters))O.parameters=BX($6(O.parameters));else O.parameters=BX(O.parameters)}let B={model:F,temperature:W,tools:{...J},maxSteps:G,toolChoice:Z,onStepFinish:async(O)=>{try{await Y?.({...O,runId:Q})}catch(M){let R=new G0({id:"LLM_STREAM_ON_STEP_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:F.modelId,modelProvider:F.provider,runId:Q??"unknown",threadId:H??"unknown",resourceId:z??"unknown",finishReason:O?.finishReason,toolCalls:O?.toolCalls?JSON.stringify(O.toolCalls):"",toolResults:O?.toolResults?JSON.stringify(O.toolResults):"",usage:O?.usage?JSON.stringify(O.usage):""}},M);throw this.logger.trackException(R),L?.error({error:R}),R}this.logger.debug("Stream step change",{text:O?.text,toolCalls:O?.toolCalls,toolResults:O?.toolResults,finishReason:O?.finishReason,usage:O?.usage,runId:Q});let E=parseInt(O?.response?.headers?.["x-ratelimit-remaining-tokens"]??"",10);if(!isNaN(E)&&E>0&&E<2000)this.logger.warn("Rate limit approaching, waiting 10 seconds",{runId:Q}),await y_(1e4)},onFinish:async(O)=>{L?.end({output:{text:O?.text,reasoning:O?.reasoningDetails,reasoningText:O?.reasoning,files:O?.files,sources:O?.sources,toolCalls:O?.toolCalls,warnings:O?.warnings},attributes:{finishReason:O?.finishReason,usage:kb0(O?.usage)}});try{await X?.({...O,runId:Q})}catch(E){let M=new G0({id:"LLM_STREAM_ON_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:F.modelId,modelProvider:F.provider,runId:Q??"unknown",threadId:H??"unknown",resourceId:z??"unknown",finishReason:O?.finishReason,toolCalls:O?.toolCalls?JSON.stringify(O.toolCalls):"",toolResults:O?.toolResults?JSON.stringify(O.toolResults):"",usage:O?.usage?JSON.stringify(O.usage):""}},E);throw L?.error({error:M}),this.logger.trackException(M),M}this.logger.debug("Stream finished",{text:O?.text,toolCalls:O?.toolCalls,toolResults:O?.toolResults,finishReason:O?.finishReason,usage:O?.usage,runId:Q,threadId:H,resourceId:z})},onError:({error:O})=>{let E=new G0({id:"LLM_STREAM_TEXT_AI_SDK_STREAMING_ERROR",domain:"LLM",category:"THIRD_PARTY",details:{modelId:F.modelId,modelProvider:F.provider,runId:Q??"unknown",threadId:H??"unknown",resourceId:z??"unknown"}},O);this.logger.error("Stream text error",{error:E,runId:Q,threadId:H,resourceId:z,modelId:F.modelId,modelProvider:F.provider}),L?.error({error:E})},...A,messages:$,experimental_output:D?d60.object({schema:D}):void 0};try{return CO({span:L,fn:()=>_t1(B)})}catch(O){let E=new G0({id:"LLM_STREAM_TEXT_AI_SDK_EXECUTION_FAILED",domain:"LLM",category:"THIRD_PARTY",details:{modelId:F.modelId,modelProvider:F.provider,runId:Q??"unknown",threadId:H??"unknown",resourceId:z??"unknown"}},O);throw this.logger.error("Stream text failed",{error:E,runId:Q,threadId:H,resourceId:z,modelId:F.modelId,modelProvider:F.provider}),L?.error({error:E}),E}}__streamObject({messages:$,runId:Y,requestContext:X,threadId:G,resourceId:J,onFinish:Q,structuredOutput:W,...Z}){let K=this.#$,H=$4(Z);this.logger.debug("Streaming structured output",{runId:Y,messages:$});let z=H.tracingContext.currentSpan?.createChildSpan({name:`llm: '${K.modelId}'`,type:"model_generation",input:{messages:$},attributes:{model:K.modelId,provider:K.provider,parameters:{temperature:Z.temperature,maxOutputTokens:Z.maxTokens,topP:Z.topP,frequencyPenalty:Z.frequencyPenalty,presencePenalty:Z.presencePenalty},streaming:!0},metadata:{runId:Y,threadId:G,resourceId:J},tracingPolicy:this.#X?.tracingPolicy,requestContext:X});try{let V="object";if(uF(W))V="array",W=Yf(W).type;let A=this._applySchemaCompat(W);z?.update({input:{messages:$,schema:A}});let F={...Z,model:K,onFinish:async(N)=>{z?.end({output:{text:N?.text,object:N?.object,reasoning:N?.reasoningDetails,reasoningText:N?.reasoning,files:N?.files,sources:N?.sources,warnings:N?.warnings},attributes:{finishReason:N?.finishReason,usage:N?.usage}});try{await Q?.({...N,runId:Y})}catch(D){let L=new G0({id:"LLM_STREAM_OBJECT_ON_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:K.modelId,modelProvider:K.provider,runId:Y??"unknown",threadId:G??"unknown",resourceId:J??"unknown",toolCalls:"",toolResults:"",finishReason:"",usage:N?.usage?JSON.stringify(N.usage):""}},D);throw this.logger.trackException(L),z?.error({error:L}),L}this.logger.debug("Object stream finished",{usage:N?.usage,runId:Y,threadId:G,resourceId:J})},onError:({error:N})=>{let D=new G0({id:"LLM_STREAM_OBJECT_AI_SDK_STREAMING_ERROR",domain:"LLM",category:"THIRD_PARTY",details:{modelId:K.modelId,modelProvider:K.provider,runId:Y??"unknown",threadId:G??"unknown",resourceId:J??"unknown"}},N);this.logger.error("Stream object error",{error:D,runId:Y,threadId:G,resourceId:J,modelId:K.modelId,modelProvider:K.provider}),z?.error({error:D})},messages:$,output:V,schema:A};try{return Yt1(F)}catch(N){let D=new G0({id:"LLM_STREAM_OBJECT_AI_SDK_EXECUTION_FAILED",domain:"LLM",category:"THIRD_PARTY",details:{modelId:K.modelId,modelProvider:K.provider,runId:Y??"unknown",threadId:G??"unknown",resourceId:J??"unknown"}},N);throw this.logger.error("Stream object failed",{error:D,runId:Y,threadId:G,resourceId:J,modelId:K.modelId,modelProvider:K.provider}),z?.error({error:D}),D}}catch(V){if(V instanceof G0)throw z?.error({error:V}),V;let A=new G0({id:"LLM_STREAM_OBJECT_AI_SDK_SCHEMA_CONVERSION_FAILED",domain:"LLM",category:"USER",details:{modelId:K.modelId,modelProvider:K.provider,runId:Y??"unknown",threadId:G??"unknown",resourceId:J??"unknown"}},V);throw this.logger.error("Stream object schema conversion failed",{error:A,runId:Y,threadId:G,resourceId:J,modelId:K.modelId,modelProvider:K.provider}),z?.error({error:A}),A}}convertToMessages($){if(Array.isArray($))return $.map((Y)=>{if(typeof Y==="string")return{role:"user",content:Y};return Y});return[{role:"user",content:$}]}async generate($,Y){let X=this.convertToMessages($),{output:G,...J}=Y??{};if(!G)return await this.__text({messages:X,...J});return await this.__textObject({messages:X,structuredOutput:G,...J})}stream($,Y){let X=this.convertToMessages($),{output:G,...J}=Y??{};if(!G){let{maxSteps:Z=5,onFinish:K,...H}=J;return this.__stream({messages:X,maxSteps:Z,onFinish:K,...H})}let{onFinish:Q,...W}=J;return this.__streamObject({messages:X,structuredOutput:G,onFinish:Q,...W})}}});import{createHash as an8}from"crypto";import yb0 from"ws";function N50($,Y){if(!Y)return;Object.defineProperty($,AX4,{configurable:!0,value:Y})}function ub0($){return $?.[AX4]}function fY4($){if(!$.tools?.length)return $;let Y=$.tools.map((X)=>{if(X.type==="provider-defined")return{...X,type:"provider"};return X});return{...$,tools:Y}}function FX4($){let Y=$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),X=$.startsWith("gpt-4")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-nano")&&!$.startsWith("gpt-5-chat")&&!$.startsWith("gpt-5.4-nano")||$.startsWith("o3")||$.startsWith("o4-mini"),G=!($.startsWith("gpt-3")||$.startsWith("gpt-4")||$.startsWith("chatgpt-4o")||$.startsWith("gpt-5-chat")),J=$.startsWith("gpt-5.1")||$.startsWith("gpt-5.2")||$.startsWith("gpt-5.3")||$.startsWith("gpt-5.4");return{supportsFlexProcessing:Y,supportsPriorityProcessing:X,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:J}}function sn8({prompt:$,systemMessageMode:Y="system"}){let X=[],G=[];for(let{role:J,content:Q}of $)switch(J){case"system":{switch(Y){case"system":{X.push({role:"system",content:Q});break}case"developer":{X.push({role:"developer",content:Q});break}case"remove":{G.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(Q.length===1&&Q[0].type==="text"){X.push({role:"user",content:Q[0].text});break}X.push({role:"user",content:Q.map((W,Z)=>{var K,H,z;switch(W.type){case"text":return{type:"text",text:W.text};case"file":if(W.mediaType.startsWith("image/")){let V=W.mediaType==="image/*"?"image/jpeg":W.mediaType;return{type:"image_url",image_url:{url:W.data instanceof URL?W.data.toString():`data:${V};base64,${RX(W.data)}`,detail:(H=(K=W.providerOptions)==null?void 0:K.openai)==null?void 0:H.imageDetail}}}else if(W.mediaType.startsWith("audio/")){if(W.data instanceof URL)throw new w9({functionality:"audio file parts with URLs"});switch(W.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:RX(W.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:RX(W.data),format:"mp3"}};default:throw new w9({functionality:`audio content parts with media type ${W.mediaType}`})}}else if(W.mediaType==="application/pdf"){if(W.data instanceof URL)throw new w9({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof W.data==="string"&&W.data.startsWith("file-")?{file_id:W.data}:{filename:(z=W.filename)!=null?z:`part-${Z}.pdf`,file_data:`data:application/pdf;base64,${RX(W.data)}`}}}else throw new w9({functionality:`file part media type ${W.mediaType}`})}})});break}case"assistant":{let W="",Z=[];for(let K of Q)switch(K.type){case"text":{W+=K.text;break}case"tool-call":{Z.push({id:K.toolCallId,type:"function",function:{name:K.toolName,arguments:JSON.stringify(K.input)}});break}}X.push({role:"assistant",content:W,tool_calls:Z.length>0?Z:void 0});break}case"tool":{for(let W of Q){let Z=W.output,K;switch(Z.type){case"text":case"error-text":K=Z.value;break;case"content":case"json":case"error-json":K=JSON.stringify(Z.value);break}X.push({role:"tool",tool_call_id:W.toolCallId,content:K})}break}default:throw Error(`Unsupported role: ${J}`)}return{messages:X,warnings:G}}function bb0({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X?new Date(X*1000):void 0}}function gY4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function $r8({tools:$,toolChoice:Y,structuredOutputs:X,strictJsonSchema:G}){$=($==null?void 0:$.length)?$:void 0;let J=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:J};let Q=[];for(let Z of $)switch(Z.type){case"function":Q.push({type:"function",function:{name:Z.name,description:Z.description,parameters:Z.inputSchema,strict:X?G:void 0}});break;default:J.push({type:"unsupported-tool",tool:Z});break}if(Y==null)return{tools:Q,toolChoice:void 0,toolWarnings:J};let W=Y.type;switch(W){case"auto":case"none":case"required":return{tools:Q,toolChoice:W,toolWarnings:J};case"tool":return{tools:Q,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:J};default:throw new w9({functionality:`tool choice type: ${W}`})}}function Xr8({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new v90({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text;case"tool-call":throw new w9({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new w9({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function mY4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function uY4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function Fr8($,Y,X){if($==null)return{};let G={},J=$.input_tokens_details;if((J==null?void 0:J.image_tokens)!=null){let Q=Math.floor(J.image_tokens/X),W=J.image_tokens-Q*(X-1);G.imageTokens=Y===X-1?W:Q}if((J==null?void 0:J.text_tokens)!=null){let Q=Math.floor(J.text_tokens/X),W=J.text_tokens-Q*(X-1);G.textTokens=Y===X-1?W:Q}if($.input_tokens!=null){let Q=Math.floor($.input_tokens/X),W=$.input_tokens-Q*(X-1);G.inputTokens=Y===X-1?W:Q}if($.output_tokens!=null){let Q=Math.floor($.output_tokens/X),W=$.output_tokens-Q*(X-1);G.outputTokens=Y===X-1?W:Q}return G}function cY4($,Y){if(!Y)return!1;return Y.some((X)=>$.startsWith(X))}async function Er8({prompt:$,systemMessageMode:Y,fileIdPrefixes:X,store:G,hasLocalShellTool:J=!1}){var Q,W,Z,K,H,z;let V=[],A=[];for(let{role:F,content:N}of $)switch(F){case"system":{switch(Y){case"system":{V.push({role:"system",content:N});break}case"developer":{V.push({role:"developer",content:N});break}case"remove":{A.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{V.push({role:"user",content:N.map((D,L)=>{var B,O,E;switch(D.type){case"text":return{type:"input_text",text:D.text};case"file":if(D.mediaType.startsWith("image/")){let M=D.mediaType==="image/*"?"image/jpeg":D.mediaType;return{type:"input_image",...D.data instanceof URL?{image_url:D.data.toString()}:typeof D.data==="string"&&cY4(D.data,X)?{file_id:D.data}:{image_url:`data:${M};base64,${RX(D.data)}`},detail:(O=(B=D.providerOptions)==null?void 0:B.openai)==null?void 0:O.imageDetail}}else if(D.mediaType==="application/pdf"){if(D.data instanceof URL)return{type:"input_file",file_url:D.data.toString()};return{type:"input_file",...typeof D.data==="string"&&cY4(D.data,X)?{file_id:D.data}:{filename:(E=D.filename)!=null?E:`part-${L}.pdf`,file_data:`data:application/pdf;base64,${RX(D.data)}`}}}else throw new w9({functionality:`file part media type ${D.mediaType}`})}})});break}case"assistant":{let D={};for(let L of N)switch(L.type){case"text":{let B=(W=(Q=L.providerOptions)==null?void 0:Q.openai)==null?void 0:W.itemId,O=(K=(Z=L.providerOptions)==null?void 0:Z.openai)==null?void 0:K.phase;if(G&&B!=null){V.push({type:"item_reference",id:B});break}V.push({role:"assistant",content:[{type:"output_text",text:L.text}],id:B,...O!=null&&{phase:O}});break}case"tool-call":{if(L.providerExecuted)break;let B=(z=(H=L.providerOptions)==null?void 0:H.openai)==null?void 0:z.itemId;if(G&&B!=null){V.push({type:"item_reference",id:B});break}if(J&&L.toolName==="local_shell"){let O=await MX({value:L.input,schema:NX4});V.push({type:"local_shell_call",call_id:L.toolCallId,id:B,action:{type:"exec",command:O.action.command,timeout_ms:O.action.timeoutMs,user:O.action.user,working_directory:O.action.workingDirectory,env:O.action.env}});break}V.push({type:"function_call",call_id:L.toolCallId,name:L.toolName,arguments:JSON.stringify(L.input),id:B});break}case"tool-result":{if(G)V.push({type:"item_reference",id:L.toolCallId});else A.push({type:"other",message:`Results for OpenAI tool ${L.toolName} are not sent to the API when store is false`});break}case"reasoning":{let B=await _9({provider:"openai",providerOptions:L.providerOptions,schema:Mr8}),O=B==null?void 0:B.itemId;if(O!=null){let E=D[O];if(G){if(E===void 0)V.push({type:"item_reference",id:O}),D[O]={type:"reasoning",id:O,summary:[]}}else{let M=[];if(L.text.length>0)M.push({type:"summary_text",text:L.text});else if(E!==void 0)A.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(L)}.`});if(E===void 0)D[O]={type:"reasoning",id:O,encrypted_content:B==null?void 0:B.reasoningEncryptedContent,summary:M},V.push(D[O]);else if(E.summary.push(...M),(B==null?void 0:B.reasoningEncryptedContent)!=null)E.encrypted_content=B.reasoningEncryptedContent}}else A.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(L)}.`});break}}break}case"tool":{for(let D of N){let L=D.output;if(J&&D.toolName==="local_shell"&&L.type==="json"){let O=await MX({value:L.value,schema:LX4});V.push({type:"local_shell_call_output",call_id:D.toolCallId,output:O.output});break}let B;switch(L.type){case"text":case"error-text":B=L.value;break;case"json":case"error-json":B=JSON.stringify(L.value);break;case"content":B=L.value.map((O)=>{switch(O.type){case"text":return{type:"input_text",text:O.text};case"media":return O.mediaType.startsWith("image/")?{type:"input_image",image_url:`data:${O.mediaType};base64,${O.data}`}:{type:"input_file",filename:"data",file_data:`data:${O.mediaType};base64,${O.data}`}}});break}V.push({type:"function_call_output",call_id:D.toolCallId,output:B})}break}default:throw Error(`Unsupported role: ${F}`)}if(!G&&V.some((F)=>("type"in F)&&F.type==="reasoning"&&F.encrypted_content==null))A.push({type:"other",message:"Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."}),V=V.filter((F)=>!("type"in F)||F.type!=="reasoning"||F.encrypted_content!=null);return{input:V,warnings:A}}function lY4({finishReason:$,hasFunctionCall:Y}){switch($){case void 0:case null:return Y?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return Y?"tool-calls":"unknown"}}async function lr8({tools:$,toolChoice:Y,strictJsonSchema:X}){$=($==null?void 0:$.length)?$:void 0;let G=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:G};let J=[];for(let W of $)switch(W.type){case"function":J.push({type:"function",name:W.name,description:W.description,parameters:W.inputSchema,strict:X});break;case"provider-defined":{switch(W.id){case"openai.file_search":{let Z=await MX({value:W.args,schema:Cr8});J.push({type:"file_search",vector_store_ids:Z.vectorStoreIds,max_num_results:Z.maxNumResults,ranking_options:Z.ranking?{ranker:Z.ranking.ranker,score_threshold:Z.ranking.scoreThreshold}:void 0,filters:Z.filters});break}case"openai.local_shell":{J.push({type:"local_shell"});break}case"openai.web_search_preview":{let Z=await MX({value:W.args,schema:br8});J.push({type:"web_search_preview",search_context_size:Z.searchContextSize,user_location:Z.userLocation});break}case"openai.web_search":{let Z=await MX({value:W.args,schema:vr8});J.push({type:"web_search",filters:Z.filters!=null?{allowed_domains:Z.filters.allowedDomains}:void 0,external_web_access:Z.externalWebAccess,search_context_size:Z.searchContextSize,user_location:Z.userLocation});break}case"openai.code_interpreter":{let Z=await MX({value:W.args,schema:_r8});J.push({type:"code_interpreter",container:Z.container==null?{type:"auto",file_ids:void 0}:typeof Z.container==="string"?Z.container:{type:"auto",file_ids:Z.container.fileIds}});break}case"openai.image_generation":{let Z=await MX({value:W.args,schema:mr8});J.push({type:"image_generation",background:Z.background,input_fidelity:Z.inputFidelity,input_image_mask:Z.inputImageMask?{file_id:Z.inputImageMask.fileId,image_url:Z.inputImageMask.imageUrl}:void 0,model:Z.model,size:Z.size,quality:Z.quality,moderation:Z.moderation,output_format:Z.outputFormat,output_compression:Z.outputCompression});break}}break}default:G.push({type:"unsupported-tool",tool:W});break}if(Y==null)return{tools:J,toolChoice:void 0,toolWarnings:G};let Q=Y.type;switch(Q){case"auto":case"none":case"required":return{tools:J,toolChoice:Q,toolWarnings:G};case"tool":return{tools:J,toolChoice:Y.toolName==="code_interpreter"||Y.toolName==="file_search"||Y.toolName==="image_generation"||Y.toolName==="web_search_preview"||Y.toolName==="web_search"?{type:Y.toolName}:{type:"function",name:Y.toolName},toolWarnings:G};default:throw new w9({functionality:`tool choice type: ${Q}`})}}function nr8($){return $.type==="response.output_text.delta"}function rr8($){return $.type==="response.output_item.done"}function ar8($){return $.type==="response.completed"||$.type==="response.incomplete"}function sr8($){return $.type==="response.created"}function or8($){return $.type==="response.function_call_arguments.delta"}function tr8($){return $.type==="response.code_interpreter_call_code.delta"}function er8($){return $.type==="response.code_interpreter_call_code.done"}function iY4($){return $.type==="response.output_item.added"}function $a8($){return $.type==="response.output_text.annotation.added"}function Ya8($){return $.type==="error"}function nY4($){var Y;if($==null)return{};switch($.type){case"search":return{action:{type:"search",query:(Y=$.query)!=null?Y:void 0},...$.sources!=null&&{sources:$.sources}};case"open_page":return{action:{type:"openPage",url:$.url}};case"find_in_page":return{action:{type:"findInPage",url:$.url,pattern:$.pattern}}}}function MX4($={}){var Y;let X=()=>{let N={"api-key":aK({apiKey:$.apiKey,environmentVariableName:"AZURE_API_KEY",description:"Azure OpenAI"}),...$.headers};return wQ(N,`ai-sdk/azure/${Ga8}`)},G=()=>dy0({settingValue:$.resourceName,settingName:"resourceName",environmentVariableName:"AZURE_RESOURCE_NAME",description:"Azure OpenAI resource name"}),J=(Y=$.apiVersion)!=null?Y:"v1",Q=({path:N,modelId:D})=>{var L;let B=(L=$.baseURL)!=null?L:`https://${G()}.openai.azure.com/openai`,O;if($.useDeploymentBasedUrls)O=new URL(`${B}/deployments/${D}${N}`);else O=new URL(`${B}/v1${N}`);return O.searchParams.set("api-version",J),O.toString()},W=(N)=>new Yr8(N,{provider:"azure.chat",url:Q,headers:X,fetch:$.fetch}),Z=(N)=>new Qr8(N,{provider:"azure.completion",url:Q,headers:X,fetch:$.fetch}),K=(N)=>new Kr8(N,{provider:"azure.embeddings",headers:X,url:Q,fetch:$.fetch}),H=(N)=>new ir8(N,{provider:"azure.responses",url:Q,headers:X,fetch:$.fetch,fileIdPrefixes:["assistant-"]}),z=(N)=>new Ar8(N,{provider:"azure.image",url:Q,headers:X,fetch:$.fetch}),V=(N)=>new Lr8(N,{provider:"azure.transcription",url:Q,headers:X,fetch:$.fetch}),A=(N)=>new Or8(N,{provider:"azure.speech",url:Q,headers:X,fetch:$.fetch}),F=function(N){if(new.target)throw Error("The Azure OpenAI model function cannot be called with the new keyword.");return W(N)};return F.languageModel=W,F.chat=W,F.completion=Z,F.embedding=K,F.image=z,F.imageModel=z,F.textEmbedding=K,F.textEmbeddingModel=K,F.responses=H,F.transcription=V,F.speech=A,F.tools=Xa8,F}function RX4($){let Y=$?.url??"wss://api.openai.com/v1/responses",X=$?.betaHeader===void 0?"responses_websockets=2026-02-06":$.betaHeader,G=$?.apiKeyQueryParam??!1,J=null,Q=null,W=null,Z=0,K=new Map,H=!1;function z(F){if(!F)return"";let N=K.get(F);if(N)return N;let D=String(++Z);return K.set(F,D),D}function V(F,N,D){if(D?.aborted)return Promise.reject(hb0(D));let L={...rY4($?.headers),...N},B=L["api-key"];if(delete L.authorization,delete L["openai-beta"],$?.apiKeyAsBearer||G)delete L["api-key"];let O=G?`${G}:${z(B)}`:"",E=Ka8(F,L,O);if(J?.readyState===yb0.OPEN&&W===E)return Promise.resolve(J);if(J?.readyState===yb0.OPEN&&W!==E)J.close(),J=null,W=null;if(Q&&W===E)return Q;return W=E,Q=new Promise((M,R)=>{let q=!1,w=new yb0(Wa8(Y,G,B),{headers:{...L,...F?{Authorization:F}:{},...X?{"OpenAI-Beta":X}:{}}});function I(){D?.removeEventListener("abort",_)}function P(C,k=!0){if(q)return;if(q=!0,Q=null,W=null,I(),k)w.close();R(C)}function _(){P(hb0(D))}D?.addEventListener("abort",_,{once:!0}),w.on("open",()=>{if(D?.aborted){P(hb0(D));return}q=!0,J=w,Q=null,I(),M(w)}),w.on("error",(C)=>{P(C,!1)}),w.on("close",()=>{if(q)return;P(Error("WebSocket closed before the connection opened"),!1)}),w.on("close",()=>{if(J===w)J=null;if(J===null)W=null})}),Q}async function A(F,N){let D=F instanceof URL?F.toString():typeof F==="string"?F:F.url;if(N?.method!=="POST"||!Qa8(D))return globalThis.fetch(F,N);let L;try{L=JSON.parse(typeof N.body==="string"?N.body:"")}catch{return globalThis.fetch(F,N)}if(!L.stream)return globalThis.fetch(F,N);if(H){if(L.previous_response_id)throw Error("Cannot start an overlapping WebSocket Responses continuation. Wait for the active stream to finish before sending previous_response_id.");return globalThis.fetch(F,N)}let B=rY4(N.headers),O=B.authorization??($?.apiKeyAsBearer&&B["api-key"]?`Bearer ${B["api-key"]}`:"");H=!0;let E;try{E=await V(O,B,N?.signal)}catch(_){throw H=!1,_}let{stream:M,background:R,...q}=L,w=new TextEncoder,I,P=new ReadableStream({start(_){let C=!1,k;function S({closeSocket:d=!1}={}){if(C)return;if(C=!0,E.off("message",T),E.off("error",v),E.off("close",x),k)N?.signal?.removeEventListener("abort",k),k=void 0;if(d&&J===E)E.close(),J=null,W=null;H=!1,I=void 0}I=S;function T(d){let u=d.toString();_.enqueue(w.encode(Za8(u)));try{let b=JSON.parse(u);if(Ua8(b))_.enqueue(w.encode(`data: [DONE]

`)),S({closeSocket:Ha8(b)}),_.close()}catch{}}function v(d){S(),_.error(d)}function x(){S();try{_.close()}catch{}}E.on("message",T),E.on("error",v),E.on("close",x);let y=N?.signal;if(y){if(y.aborted){S({closeSocket:!0}),_.error(y.reason??new DOMException("Aborted","AbortError"));return}k=()=>{S({closeSocket:!0});try{_.error(y.reason??new DOMException("Aborted","AbortError"))}catch{}},y.addEventListener("abort",k,{once:!0})}E.send(JSON.stringify({type:"response.create",...q}))},cancel(){I?.({closeSocket:!0})}});return new Response(P,{status:200,headers:{"content-type":"text/event-stream"}})}return Object.assign(A,{close(){if(J)J.close(),J=null;W=null,Q=null}})}function Qa8($){try{return new URL($).pathname.endsWith("/responses")}catch{return $.split("?")[0]?.endsWith("/responses")??!1}}function Wa8($,Y,X){if(!Y||!X)return $;let G=new URL($);return G.searchParams.set(Y,X),G.toString()}function Za8($){return`${$.split(/\r?\n/).map((Y)=>`data: ${Y}`).join(`
`)}

`}function Ka8($,Y,X=""){return JSON.stringify({authorization:$,queryCredential:X,headers:Object.entries(Y).sort(([G],[J])=>G.localeCompare(J))})}function Ua8($){return typeof $==="object"&&$!==null&&"type"in $&&typeof $.type==="string"&&Ja8.has($.type)}function Ha8($){if(typeof $!=="object"||$===null||!("error"in $))return!1;let Y=$.error;return typeof Y==="object"&&Y!==null&&"code"in Y&&Y.code==="websocket_connection_limit_reached"}function hb0($){return $?.reason??new DOMException("Aborted","AbortError")}function rY4($){let Y={};if(!$)return Y;if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else if(Array.isArray($))for(let[X,G]of $)Y[X.toLowerCase()]=G;else for(let[X,G]of Object.entries($))if(G!=null)Y[X.toLowerCase()]=G;return Y}function fb0($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function B50($){if(!fb0($)||!fb0($.azure))return $;let Y=fb0($.openai)?$.openai:{};return{...$,openai:{...Y,...$.azure}}}function aY4($){let Y=!1,X=$.map((G)=>{let J=G,Q=B50(J.providerOptions),W=Q!==J.providerOptions;if(!Array.isArray(G.content)){if(W)return Y=!0,{...G,providerOptions:Q};return G}let Z=!1,K=G.content.map((H)=>{if(!("providerOptions"in H))return H;let z=B50(H.providerOptions);if(z===H.providerOptions)return H;return Z=!0,{...H,providerOptions:z}});if(!Z){if(W)return Y=!0,{...G,providerOptions:Q};return G}return Y=!0,{...G,...W?{providerOptions:Q}:{},content:K}});return Y?X:$}function za8($){return new Proxy($,{get(Y,X,G){if(X==="doGenerate")return(J)=>Y.doGenerate({...J,providerOptions:B50(J.providerOptions),prompt:aY4(J.prompt)});if(X==="doStream")return(J)=>Y.doStream({...J,providerOptions:B50(J.providerOptions),prompt:aY4(J.prompt)});return Reflect.get(Y,X,G)}})}function Aa8($,Y){let X=Y.find((J)=>J.id!=="models.dev"&&(J.id===$||$.startsWith(`${J.id}/`)));if(X)return X;let G=Y.find((J)=>J.id==="models.dev");if(G)return G;throw new G0({id:"MODEL_ROUTER_NO_GATEWAY_FOUND",category:"USER",domain:"MODEL_ROUTER",text:`No Mastra model router gateway found for model id ${$}`})}function sY4($){return $.specificationVersion==="v3"}function oY4(){return{modelInstances:new Map,webSocketFetches:new Map,gatewayStreamTransports:new Map}}function Na8($,Y){let X=Y==="azure-openai"?$?.azure:$?.openai;return{transport:X?.transport??"fetch",websocket:X?.websocket}}function La8($){if(!$)return!0;try{return new URL($).hostname===Da8}catch{return!1}}function tY4($){if(!$)return"";let Y=Object.entries($);if(Y.length===0)return"";return JSON.stringify(Y.sort(([X],[G])=>X.localeCompare(G)))}function Ba8($){return Object.fromEntries(Object.entries(Sb0).filter(([Y,X])=>X.gateway===$))}function Oa8($){return $[$b0]}function Ea8($){if(typeof $==="object"&&"specificationVersion"in $)return!1;if(typeof $==="object"&&!("model"in $)){if("id"in $)return!0;if("providerId"in $&&"modelId"in $)return!0}return!1}async function PE($,Y=new p1,X){if(typeof $==="function")$=await $({requestContext:Y,mastra:X});if($ instanceof IE||$ instanceof eY4||$ instanceof zj||$ instanceof L50)return $;if(typeof $==="object"&&"specificationVersion"in $){if($.specificationVersion==="v2")return new zj($);if($.specificationVersion==="v3")return new L50($);if($.specificationVersion==="v1")return new eY4($);if(typeof $.doStream==="function"&&typeof $.doGenerate==="function")return new zj($);return $}let G=X?.listGateways(),J=G?Object.values(G):void 0;if(typeof $==="string"||Ea8($))return new IE($,J);throw Error("Invalid model configuration provided")}function fU($,Y=!0){if($==null)return;if(ja8($)){if(Y)return;if(typeof $==="object"&&$.description)return{type:"object",description:$.description};return{type:"object"}}if(typeof $==="boolean")return{type:"boolean",properties:{}};let{type:X,description:G,required:J,properties:Q,items:W,allOf:Z,anyOf:K,oneOf:H,format:z,const:V,minLength:A,enum:F}=$,N={};if(G)N.description=G;if(J)N.required=J;if(z)N.format=z;if(V!==void 0)N.enum=[V];if(X)if(Array.isArray(X)){let D=X.includes("null"),L=X.filter((B)=>B!=="null");if(L.length===0)N.type="null";else if(N.anyOf=L.map((B)=>({type:B})),D)N.nullable=!0}else N.type=X;if(F!==void 0)N.enum=F;if(Q!=null)N.properties=Object.entries(Q).reduce((D,[L,B])=>{return D[L]=fU(B,!1),D},{});if(W)N.items=Array.isArray(W)?W.map((D)=>fU(D,!1)):fU(W,!1);if(Z)N.allOf=Z.map((D)=>fU(D,!1));if(K)if(K.some((D)=>typeof D==="object"&&(D==null?void 0:D.type)==="null")){let D=K.filter((L)=>!(typeof L==="object"&&(L==null?void 0:L.type)==="null"));if(D.length===1){let L=fU(D[0],!1);if(typeof L==="object")N.nullable=!0,Object.assign(N,L)}else N.anyOf=D.map((L)=>fU(L,!1)),N.nullable=!0}else N.anyOf=K.map((D)=>fU(D,!1));if(H)N.oneOf=H.map((D)=>fU(D,!1));if(A!==void 0)N.minLength=A;return N}function ja8($){return $!=null&&typeof $==="object"&&$.type==="object"&&($.properties==null||Object.keys($.properties).length===0)&&!$.additionalProperties}function Ta8($,Y){var X,G;let J=[],Q=[],W=!0,Z=(X=Y==null?void 0:Y.isGemmaModel)!=null?X:!1,K=(G=Y==null?void 0:Y.supportsFunctionResponseParts)!=null?G:!0;for(let{role:H,content:z}of $)switch(H){case"system":{if(!W)throw new w9({functionality:"system messages are only supported at the beginning of the conversation"});J.push({text:z});break}case"user":{W=!1;let V=[];for(let A of z)switch(A.type){case"text":{V.push({text:A.text});break}case"file":{let F=A.mediaType==="image/*"?"image/jpeg":A.mediaType;V.push(A.data instanceof URL?{fileData:{mimeType:F,fileUri:A.data.toString()}}:{inlineData:{mimeType:F,data:RX(A.data)}});break}}Q.push({role:"user",parts:V});break}case"assistant":{W=!1,Q.push({role:"model",parts:z.map((V)=>{var A,F,N;let D=((F=(A=V.providerOptions)==null?void 0:A.google)==null?void 0:F.thoughtSignature)!=null?String((N=V.providerOptions.google)==null?void 0:N.thoughtSignature):void 0;switch(V.type){case"text":return V.text.length===0?void 0:{text:V.text,thoughtSignature:D};case"reasoning":return V.text.length===0?void 0:{text:V.text,thought:!0,thoughtSignature:D};case"file":{if(V.mediaType!=="image/png")throw new w9({functionality:"Only PNG images are supported in assistant messages"});if(V.data instanceof URL)throw new w9({functionality:"File data URLs in assistant messages are not supported"});return{inlineData:{mimeType:V.mediaType,data:RX(V.data)}}}case"tool-call":return{functionCall:{name:V.toolName,args:V.input},thoughtSignature:D}}}).filter((V)=>V!==void 0)});break}case"tool":{W=!1;let V=[];for(let A of z){let F=A.output;if(F.type==="content")if(K)Ca8({parts:V,part:A,output:F});else Sa8({parts:V,part:A,output:F});else V.push({functionResponse:{name:A.toolName,response:{name:A.toolName,content:F.value}}})}Q.push({role:"user",parts:V});break}}if(Z&&J.length>0&&Q.length>0&&Q[0].role==="user"){let H=J.map((z)=>z.text).join(`

`);Q[0].parts.unshift({text:H+`

`})}return{systemInstruction:J.length>0&&!Z?{parts:J}:void 0,contents:Q}}function Ca8({parts:$,part:Y,output:X}){let G=[],J=[];for(let W of X.value)switch(W.type){case"text":G.push(W.text);break;case"media":J.push({inlineData:{mimeType:W.mediaType,data:W.data}});break}let Q=G.length>0?G.join(`
`):"Tool executed successfully.";$.push({functionResponse:{name:Y.toolName,response:{name:Y.toolName,content:Q},...J.length>0?{parts:J}:{}}})}function Sa8({parts:$,part:Y,output:X}){for(let G of X.value)switch(G.type){case"text":$.push({functionResponse:{name:Y.toolName,response:{name:Y.toolName,content:G.text}}});break;case"media":$.push({inlineData:{mimeType:G.mediaType,data:G.data}},{text:"Tool executed successfully and returned this image as a response"});break;default:$.push({text:JSON.stringify(G)});break}}function $X4($){return $.includes("/")?$:`models/${$}`}function xa8({tools:$,toolChoice:Y,modelId:X}){var G;$=($==null?void 0:$.length)?$:void 0;let J=[],Q=["gemini-flash-latest","gemini-flash-lite-latest","gemini-pro-latest"].some((F)=>F===X),W=X.includes("gemini-2")||X.includes("gemini-3")||X.includes("nano-banana")||Q,Z=X.includes("gemini-2.5")||X.includes("gemini-3");if($==null)return{tools:void 0,toolConfig:void 0,toolWarnings:J};let K=$.some((F)=>F.type==="function"),H=$.some((F)=>F.type==="provider-defined");if(K&&H){let F=$.filter((N)=>N.type==="function");J.push({type:"unsupported-tool",tool:$.find((N)=>N.type==="function"),details:`Cannot mix function tools with provider-defined tools in the same request. Falling back to provider-defined tools only. The following function tools will be ignored: ${F.map((N)=>N.name).join(", ")}. Please use either function tools or provider-defined tools, but not both.`})}if(H){let F=[];return $.filter((D)=>D.type==="provider-defined").forEach((D)=>{switch(D.id){case"google.google_search":if(W)F.push({googleSearch:{...D.args}});else J.push({type:"unsupported-tool",tool:D,details:"Google Search requires Gemini 2.0 or newer."});break;case"google.enterprise_web_search":if(W)F.push({enterpriseWebSearch:{}});else J.push({type:"unsupported-tool",tool:D,details:"Enterprise Web Search requires Gemini 2.0 or newer."});break;case"google.url_context":if(W)F.push({urlContext:{}});else J.push({type:"unsupported-tool",tool:D,details:"The URL context tool is not supported with other Gemini models than Gemini 2."});break;case"google.code_execution":if(W)F.push({codeExecution:{}});else J.push({type:"unsupported-tool",tool:D,details:"The code execution tools is not supported with other Gemini models than Gemini 2."});break;case"google.file_search":if(Z)F.push({fileSearch:{...D.args}});else J.push({type:"unsupported-tool",tool:D,details:"The file search tool is only supported with Gemini 2.5 models."});break;case"google.vertex_rag_store":if(W)F.push({retrieval:{vertex_rag_store:{rag_resources:{rag_corpus:D.args.ragCorpus},similarity_top_k:D.args.topK}}});else J.push({type:"unsupported-tool",tool:D,details:"The RAG store tool is not supported with other Gemini models than Gemini 2."});break;case"google.google_maps":if(W)F.push({googleMaps:{}});else J.push({type:"unsupported-tool",tool:D,details:"The Google Maps grounding tool is not supported with Gemini models other than Gemini 2 or newer."});break;default:J.push({type:"unsupported-tool",tool:D});break}}),{tools:F.length>0?F:void 0,toolConfig:void 0,toolWarnings:J}}let z=[],V=!1;for(let F of $)switch(F.type){case"function":if(z.push({name:F.name,description:(G=F.description)!=null?G:"",parameters:fU(F.inputSchema)}),F.strict===!0)V=!0;break;default:J.push({type:"unsupported-tool",tool:F});break}if(Y==null)return{tools:[{functionDeclarations:z}],toolConfig:V?{functionCallingConfig:{mode:"VALIDATED"}}:void 0,toolWarnings:J};let A=Y.type;switch(A){case"auto":return{tools:[{functionDeclarations:z}],toolConfig:{functionCallingConfig:{mode:V?"VALIDATED":"AUTO"}},toolWarnings:J};case"none":return{tools:[{functionDeclarations:z}],toolConfig:{functionCallingConfig:{mode:"NONE"}},toolWarnings:J};case"required":return{tools:[{functionDeclarations:z}],toolConfig:{functionCallingConfig:{mode:V?"VALIDATED":"ANY"}},toolWarnings:J};case"tool":return{tools:[{functionDeclarations:z}],toolConfig:{functionCallingConfig:{mode:V?"VALIDATED":"ANY",allowedFunctionNames:[Y.toolName]}},toolWarnings:J};default:throw new w9({functionality:`tool choice type: ${A}`})}}function YX4({finishReason:$,hasToolCalls:Y}){switch($){case"STOP":return Y?"tool-calls":"stop";case"MAX_TOKENS":return"length";case"IMAGE_SAFETY":case"RECITATION":case"SAFETY":case"BLOCKLIST":case"PROHIBITED_CONTENT":case"SPII":return"content-filter";case"FINISH_REASON_UNSPECIFIED":case"OTHER":return"other";case"MALFORMED_FUNCTION_CALL":return"error";default:return"unknown"}}function ba8({parts:$,generateId:Y}){let X=$==null?void 0:$.filter((G)=>("functionCall"in G));return X==null||X.length===0?void 0:X.map((G)=>({type:"tool-call",toolCallId:Y(),toolName:G.functionCall.name,args:JSON.stringify(G.functionCall.args),providerMetadata:G.thoughtSignature?{google:{thoughtSignature:G.thoughtSignature}}:void 0}))}function XX4({groundingMetadata:$,generateId:Y}){var X,G,J,Q,W,Z;if(!($==null?void 0:$.groundingChunks))return;let K=[];for(let H of $.groundingChunks)if(H.web!=null)K.push({type:"source",sourceType:"url",id:Y(),url:H.web.uri,title:(X=H.web.title)!=null?X:void 0});else if(H.image!=null)K.push({type:"source",sourceType:"url",id:Y(),url:H.image.sourceUri,title:(G=H.image.title)!=null?G:void 0});else if(H.retrievedContext!=null){let z=H.retrievedContext.uri,V=H.retrievedContext.fileSearchStore;if(z&&(z.startsWith("http://")||z.startsWith("https://")))K.push({type:"source",sourceType:"url",id:Y(),url:z,title:(J=H.retrievedContext.title)!=null?J:void 0});else if(z){let A=(Q=H.retrievedContext.title)!=null?Q:"Unknown Document",F="application/octet-stream",N=void 0;if(z.endsWith(".pdf"))F="application/pdf",N=z.split("/").pop();else if(z.endsWith(".txt"))F="text/plain",N=z.split("/").pop();else if(z.endsWith(".docx"))F="application/vnd.openxmlformats-officedocument.wordprocessingml.document",N=z.split("/").pop();else if(z.endsWith(".doc"))F="application/msword",N=z.split("/").pop();else if(z.match(/\.(md|markdown)$/))F="text/markdown",N=z.split("/").pop();else N=z.split("/").pop();K.push({type:"source",sourceType:"document",id:Y(),mediaType:F,title:A,filename:N})}else if(V){let A=(W=H.retrievedContext.title)!=null?W:"Unknown Document";K.push({type:"source",sourceType:"document",id:Y(),mediaType:"application/octet-stream",title:A,filename:V.split("/").pop()})}}else if(H.maps!=null){if(H.maps.uri)K.push({type:"source",sourceType:"url",id:Y(),url:H.maps.uri,title:(Z=H.maps.title)!=null?Z:void 0})}return K.length>0?K:void 0}function _X4($={}){var Y,X;let G=(Y=sK($.baseURL))!=null?Y:"https://generativelanguage.googleapis.com/v1beta",J=(X=$.name)!=null?X:"google.generative-ai",Q=()=>wQ({"x-goog-api-key":aK({apiKey:$.apiKey,environmentVariableName:"GOOGLE_GENERATIVE_AI_API_KEY",description:"Google Generative AI"}),...$.headers},`ai-sdk/google/${Ma8}`),W=(z)=>{var V;return new ya8(z,{provider:J,baseURL:G,headers:Q,generateId:(V=$.generateId)!=null?V:w8,supportedUrls:()=>({"*":[new RegExp(`^${G}/files/.*$`),new RegExp("^https://(?:www\\.)?youtube\\.com/watch\\?v=[\\w-]+(?:&[\\w=&.-]*)?$"),new RegExp("^https://youtu\\.be/[\\w-]+(?:\\?[\\w=&.-]*)?$")]}),fetch:$.fetch})},Z=(z)=>new Pa8(z,{provider:J,baseURL:G,headers:Q,fetch:$.fetch}),K=(z,V={})=>new oa8(z,V,{provider:J,baseURL:G,headers:Q,fetch:$.fetch}),H=function(z){if(new.target)throw Error("The Google Generative AI model function cannot be called with the new keyword.");return W(z)};return H.languageModel=W,H.chat=W,H.generativeAI=W,H.embedding=Z,H.textEmbedding=Z,H.textEmbeddingModel=Z,H.image=K,H.imageModel=K,H.tools=sa8,H}function jX4($){let Y=$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),X=$.startsWith("gpt-4")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-nano")&&!$.startsWith("gpt-5-chat")&&!$.startsWith("gpt-5.4-nano")||$.startsWith("o3")||$.startsWith("o4-mini"),G=!($.startsWith("gpt-3")||$.startsWith("gpt-4")||$.startsWith("chatgpt-4o")||$.startsWith("gpt-5-chat")),J=$.startsWith("gpt-5.1")||$.startsWith("gpt-5.2")||$.startsWith("gpt-5.3")||$.startsWith("gpt-5.4");return{supportsFlexProcessing:Y,supportsPriorityProcessing:X,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:J}}function $s8({prompt:$,systemMessageMode:Y="system"}){let X=[],G=[];for(let{role:J,content:Q}of $)switch(J){case"system":{switch(Y){case"system":{X.push({role:"system",content:Q});break}case"developer":{X.push({role:"developer",content:Q});break}case"remove":{G.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(Q.length===1&&Q[0].type==="text"){X.push({role:"user",content:Q[0].text});break}X.push({role:"user",content:Q.map((W,Z)=>{var K,H,z;switch(W.type){case"text":return{type:"text",text:W.text};case"file":if(W.mediaType.startsWith("image/")){let V=W.mediaType==="image/*"?"image/jpeg":W.mediaType;return{type:"image_url",image_url:{url:W.data instanceof URL?W.data.toString():`data:${V};base64,${RX(W.data)}`,detail:(H=(K=W.providerOptions)==null?void 0:K.openai)==null?void 0:H.imageDetail}}}else if(W.mediaType.startsWith("audio/")){if(W.data instanceof URL)throw new w9({functionality:"audio file parts with URLs"});switch(W.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:RX(W.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:RX(W.data),format:"mp3"}};default:throw new w9({functionality:`audio content parts with media type ${W.mediaType}`})}}else if(W.mediaType==="application/pdf"){if(W.data instanceof URL)throw new w9({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof W.data==="string"&&W.data.startsWith("file-")?{file_id:W.data}:{filename:(z=W.filename)!=null?z:`part-${Z}.pdf`,file_data:`data:application/pdf;base64,${RX(W.data)}`}}}else throw new w9({functionality:`file part media type ${W.mediaType}`})}})});break}case"assistant":{let W="",Z=[];for(let K of Q)switch(K.type){case"text":{W+=K.text;break}case"tool-call":{Z.push({id:K.toolCallId,type:"function",function:{name:K.toolName,arguments:JSON.stringify(K.input)}});break}}X.push({role:"assistant",content:W,tool_calls:Z.length>0?Z:void 0});break}case"tool":{for(let W of Q){let Z=W.output,K;switch(Z.type){case"text":case"error-text":K=Z.value;break;case"content":case"json":case"error-json":K=JSON.stringify(Z.value);break}X.push({role:"tool",tool_call_id:W.toolCallId,content:K})}break}default:throw Error(`Unsupported role: ${J}`)}return{messages:X,warnings:G}}function gb0({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X?new Date(X*1000):void 0}}function JX4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function Js8({tools:$,toolChoice:Y,structuredOutputs:X,strictJsonSchema:G}){$=($==null?void 0:$.length)?$:void 0;let J=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:J};let Q=[];for(let Z of $)switch(Z.type){case"function":Q.push({type:"function",function:{name:Z.name,description:Z.description,parameters:Z.inputSchema,strict:X?G:void 0}});break;default:J.push({type:"unsupported-tool",tool:Z});break}if(Y==null)return{tools:Q,toolChoice:void 0,toolWarnings:J};let W=Y.type;switch(W){case"auto":case"none":case"required":return{tools:Q,toolChoice:W,toolWarnings:J};case"tool":return{tools:Q,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:J};default:throw new w9({functionality:`tool choice type: ${W}`})}}function Ws8({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new v90({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text;case"tool-call":throw new w9({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new w9({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function QX4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function WX4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function Bs8($,Y,X){if($==null)return{};let G={},J=$.input_tokens_details;if((J==null?void 0:J.image_tokens)!=null){let Q=Math.floor(J.image_tokens/X),W=J.image_tokens-Q*(X-1);G.imageTokens=Y===X-1?W:Q}if((J==null?void 0:J.text_tokens)!=null){let Q=Math.floor(J.text_tokens/X),W=J.text_tokens-Q*(X-1);G.textTokens=Y===X-1?W:Q}if($.input_tokens!=null){let Q=Math.floor($.input_tokens/X),W=$.input_tokens-Q*(X-1);G.inputTokens=Y===X-1?W:Q}if($.output_tokens!=null){let Q=Math.floor($.output_tokens/X),W=$.output_tokens-Q*(X-1);G.outputTokens=Y===X-1?W:Q}return G}function KX4($,Y){if(!Y)return!1;return Y.some((X)=>$.startsWith(X))}async function ds8({prompt:$,systemMessageMode:Y,fileIdPrefixes:X,store:G,hasLocalShellTool:J=!1}){var Q,W,Z,K,H,z;let V=[],A=[];for(let{role:F,content:N}of $)switch(F){case"system":{switch(Y){case"system":{V.push({role:"system",content:N});break}case"developer":{V.push({role:"developer",content:N});break}case"remove":{A.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{V.push({role:"user",content:N.map((D,L)=>{var B,O,E;switch(D.type){case"text":return{type:"input_text",text:D.text};case"file":if(D.mediaType.startsWith("image/")){let M=D.mediaType==="image/*"?"image/jpeg":D.mediaType;return{type:"input_image",...D.data instanceof URL?{image_url:D.data.toString()}:typeof D.data==="string"&&KX4(D.data,X)?{file_id:D.data}:{image_url:`data:${M};base64,${RX(D.data)}`},detail:(O=(B=D.providerOptions)==null?void 0:B.openai)==null?void 0:O.imageDetail}}else if(D.mediaType==="application/pdf"){if(D.data instanceof URL)return{type:"input_file",file_url:D.data.toString()};return{type:"input_file",...typeof D.data==="string"&&KX4(D.data,X)?{file_id:D.data}:{filename:(E=D.filename)!=null?E:`part-${L}.pdf`,file_data:`data:application/pdf;base64,${RX(D.data)}`}}}else throw new w9({functionality:`file part media type ${D.mediaType}`})}})});break}case"assistant":{let D={};for(let L of N)switch(L.type){case"text":{let B=(W=(Q=L.providerOptions)==null?void 0:Q.openai)==null?void 0:W.itemId,O=(K=(Z=L.providerOptions)==null?void 0:Z.openai)==null?void 0:K.phase;if(G&&B!=null){V.push({type:"item_reference",id:B});break}V.push({role:"assistant",content:[{type:"output_text",text:L.text}],id:B,...O!=null&&{phase:O}});break}case"tool-call":{if(L.providerExecuted)break;let B=(z=(H=L.providerOptions)==null?void 0:H.openai)==null?void 0:z.itemId;if(G&&B!=null){V.push({type:"item_reference",id:B});break}if(J&&L.toolName==="local_shell"){let O=await MX({value:L.input,schema:kX4});V.push({type:"local_shell_call",call_id:L.toolCallId,id:B,action:{type:"exec",command:O.action.command,timeout_ms:O.action.timeoutMs,user:O.action.user,working_directory:O.action.workingDirectory,env:O.action.env}});break}V.push({type:"function_call",call_id:L.toolCallId,name:L.toolName,arguments:JSON.stringify(L.input),id:B});break}case"tool-result":{if(G)V.push({type:"item_reference",id:L.toolCallId});else A.push({type:"other",message:`Results for OpenAI tool ${L.toolName} are not sent to the API when store is false`});break}case"reasoning":{let B=await _9({provider:"openai",providerOptions:L.providerOptions,schema:cs8}),O=B==null?void 0:B.itemId;if(O!=null){let E=D[O];if(G){if(E===void 0)V.push({type:"item_reference",id:O}),D[O]={type:"reasoning",id:O,summary:[]}}else{let M=[];if(L.text.length>0)M.push({type:"summary_text",text:L.text});else if(E!==void 0)A.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(L)}.`});if(E===void 0)D[O]={type:"reasoning",id:O,encrypted_content:B==null?void 0:B.reasoningEncryptedContent,summary:M},V.push(D[O]);else if(E.summary.push(...M),(B==null?void 0:B.reasoningEncryptedContent)!=null)E.encrypted_content=B.reasoningEncryptedContent}}else A.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(L)}.`});break}}break}case"tool":{for(let D of N){let L=D.output;if(J&&D.toolName==="local_shell"&&L.type==="json"){let O=await MX({value:L.value,schema:vX4});V.push({type:"local_shell_call_output",call_id:D.toolCallId,output:O.output});break}let B;switch(L.type){case"text":case"error-text":B=L.value;break;case"json":case"error-json":B=JSON.stringify(L.value);break;case"content":B=L.value.map((O)=>{switch(O.type){case"text":return{type:"input_text",text:O.text};case"media":return O.mediaType.startsWith("image/")?{type:"input_image",image_url:`data:${O.mediaType};base64,${O.data}`}:{type:"input_file",filename:"data",file_data:`data:${O.mediaType};base64,${O.data}`}}});break}V.push({type:"function_call_output",call_id:D.toolCallId,output:B})}break}default:throw Error(`Unsupported role: ${F}`)}if(!G&&V.some((F)=>("type"in F)&&F.type==="reasoning"&&F.encrypted_content==null))A.push({type:"other",message:"Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."}),V=V.filter((F)=>!("type"in F)||F.type!=="reasoning"||F.encrypted_content!=null);return{input:V,warnings:A}}function UX4({finishReason:$,hasFunctionCall:Y}){switch($){case void 0:case null:return Y?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return Y?"tool-calls":"unknown"}}async function rs8({tools:$,toolChoice:Y,strictJsonSchema:X}){$=($==null?void 0:$.length)?$:void 0;let G=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:G};let J=[];for(let W of $)switch(W.type){case"function":J.push({type:"function",name:W.name,description:W.description,parameters:W.inputSchema,strict:X});break;case"provider-defined":{switch(W.id){case"openai.file_search":{let Z=await MX({value:W.args,schema:Is8});J.push({type:"file_search",vector_store_ids:Z.vectorStoreIds,max_num_results:Z.maxNumResults,ranking_options:Z.ranking?{ranker:Z.ranking.ranker,score_threshold:Z.ranking.scoreThreshold}:void 0,filters:Z.filters});break}case"openai.local_shell":{J.push({type:"local_shell"});break}case"openai.web_search_preview":{let Z=await MX({value:W.args,schema:fs8});J.push({type:"web_search_preview",search_context_size:Z.searchContextSize,user_location:Z.userLocation});break}case"openai.web_search":{let Z=await MX({value:W.args,schema:vs8});J.push({type:"web_search",filters:Z.filters!=null?{allowed_domains:Z.filters.allowedDomains}:void 0,external_web_access:Z.externalWebAccess,search_context_size:Z.searchContextSize,user_location:Z.userLocation});break}case"openai.code_interpreter":{let Z=await MX({value:W.args,schema:Ms8});J.push({type:"code_interpreter",container:Z.container==null?{type:"auto",file_ids:void 0}:typeof Z.container==="string"?Z.container:{type:"auto",file_ids:Z.container.fileIds}});break}case"openai.image_generation":{let Z=await MX({value:W.args,schema:_s8});J.push({type:"image_generation",background:Z.background,input_fidelity:Z.inputFidelity,input_image_mask:Z.inputImageMask?{file_id:Z.inputImageMask.fileId,image_url:Z.inputImageMask.imageUrl}:void 0,model:Z.model,size:Z.size,quality:Z.quality,moderation:Z.moderation,output_format:Z.outputFormat,output_compression:Z.outputCompression});break}}break}default:G.push({type:"unsupported-tool",tool:W});break}if(Y==null)return{tools:J,toolChoice:void 0,toolWarnings:G};let Q=Y.type;switch(Q){case"auto":case"none":case"required":return{tools:J,toolChoice:Q,toolWarnings:G};case"tool":return{tools:J,toolChoice:Y.toolName==="code_interpreter"||Y.toolName==="file_search"||Y.toolName==="image_generation"||Y.toolName==="web_search_preview"||Y.toolName==="web_search"?{type:Y.toolName}:{type:"function",name:Y.toolName},toolWarnings:G};default:throw new w9({functionality:`tool choice type: ${Q}`})}}function ss8($){return $.type==="response.output_text.delta"}function os8($){return $.type==="response.output_item.done"}function ts8($){return $.type==="response.completed"||$.type==="response.incomplete"}function es8($){return $.type==="response.created"}function $o8($){return $.type==="response.function_call_arguments.delta"}function Yo8($){return $.type==="response.code_interpreter_call_code.delta"}function Xo8($){return $.type==="response.code_interpreter_call_code.done"}function HX4($){return $.type==="response.output_item.added"}function Go8($){return $.type==="response.output_text.annotation.added"}function Jo8($){return $.type==="error"}function zX4($){var Y;if($==null)return{};switch($.type){case"search":return{action:{type:"search",query:(Y=$.query)!=null?Y:void 0},...$.sources!=null&&{sources:$.sources}};case"open_page":return{action:{type:"openPage",url:$.url}};case"find_in_page":return{action:{type:"findInPage",url:$.url,pattern:$.pattern}}}}function yX4($={}){var Y,X;let G=(Y=sK(py0({settingValue:$.baseURL,environmentVariableName:"OPENAI_BASE_URL"})))!=null?Y:"https://api.openai.com/v1",J=(X=$.name)!=null?X:"openai",Q=()=>wQ({Authorization:`Bearer ${aK({apiKey:$.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":$.organization,"OpenAI-Project":$.project,...$.headers},`ai-sdk/openai/${Ho8}`),W=(D)=>new Qs8(D,{provider:`${J}.chat`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),Z=(D)=>new Us8(D,{provider:`${J}.completion`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),K=(D)=>new Vs8(D,{provider:`${J}.embedding`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),H=(D)=>new Ls8(D,{provider:`${J}.image`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),z=(D)=>new Uo8(D,{provider:`${J}.transcription`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),V=(D)=>new Wo8(D,{provider:`${J}.speech`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),A=(D)=>{if(new.target)throw Error("The OpenAI model function cannot be called with the new keyword.");return F(D)},F=(D)=>{return new as8(D,{provider:`${J}.responses`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch,fileIdPrefixes:["file-"]})},N=function(D){return A(D)};return N.languageModel=A,N.chat=W,N.completion=Z,N.responses=F,N.embedding=K,N.textEmbedding=K,N.textEmbeddingModel=K,N.image=H,N.imageModel=H,N.transcription=z,N.transcriptionModel=z,N.speech=V,N.speechModel=V,N.tools=ps8,N}var AX4,L50=class{specificationVersion="v3";provider;modelId;supportedUrls;#$;constructor($){this.#$=$,this.provider=this.#$.provider,this.modelId=this.#$.modelId,this.supportedUrls=this.#$.supportedUrls}async doGenerate($){let Y=await this.#$.doGenerate(fY4($));return{...Y,request:Y.request,response:Y.response,stream:vb0(Y)}}async doStream($){return await this.#$.doStream(fY4($))}serializeForSpan(){return{specificationVersion:this.specificationVersion,modelId:this.modelId,provider:this.provider}}},pb0,gU,on8,tn8,en8,Yr8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,tools:z,toolChoice:V,providerOptions:A}){var F,N,D,L;let B=[],O=(F=await _9({provider:"openai",providerOptions:A,schema:en8}))!=null?F:{},E=(N=O.structuredOutputs)!=null?N:!0,M=FX4(this.modelId);if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if((K==null?void 0:K.type)==="json"&&K.schema!=null&&!E)B.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{messages:R,warnings:q}=sn8({prompt:$,systemMessageMode:M.systemMessageMode});B.push(...q);let w=(D=O.strictJsonSchema)!=null?D:!1,I={model:this.modelId,logit_bias:O.logitBias,logprobs:O.logprobs===!0||typeof O.logprobs==="number"?!0:void 0,top_logprobs:typeof O.logprobs==="number"?O.logprobs:typeof O.logprobs==="boolean"?O.logprobs?0:void 0:void 0,user:O.user,parallel_tool_calls:O.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(K==null?void 0:K.type)==="json"?E&&K.schema!=null?{type:"json_schema",json_schema:{schema:K.schema,strict:w,name:(L=K.name)!=null?L:"response",description:K.description}}:{type:"json_object"}:void 0,stop:Z,seed:H,verbosity:O.textVerbosity,max_completion_tokens:O.maxCompletionTokens,store:O.store,metadata:O.metadata,prediction:O.prediction,reasoning_effort:O.reasoningEffort,service_tier:O.serviceTier,prompt_cache_key:O.promptCacheKey,prompt_cache_retention:O.promptCacheRetention,safety_identifier:O.safetyIdentifier,messages:R};if(M.isReasoningModel){if(O.reasoningEffort!=="none"||!M.supportsNonReasoningParameters){if(I.temperature!=null)I.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"});if(I.top_p!=null)I.top_p=void 0,B.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"});if(I.logprobs!=null)I.logprobs=void 0,B.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(I.frequency_penalty!=null)I.frequency_penalty=void 0,B.push({type:"unsupported-setting",setting:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(I.presence_penalty!=null)I.presence_penalty=void 0,B.push({type:"unsupported-setting",setting:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(I.logit_bias!=null)I.logit_bias=void 0,B.push({type:"other",message:"logitBias is not supported for reasoning models"});if(I.top_logprobs!=null)I.top_logprobs=void 0,B.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(I.max_tokens!=null){if(I.max_completion_tokens==null)I.max_completion_tokens=I.max_tokens;I.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(I.temperature!=null)I.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(O.serviceTier==="flex"&&!M.supportsFlexProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),I.service_tier=void 0;if(O.serviceTier==="priority"&&!M.supportsPriorityProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),I.service_tier=void 0;let{tools:P,toolChoice:_,toolWarnings:C}=$r8({tools:z,toolChoice:V,structuredOutputs:E,strictJsonSchema:w});return{args:{...I,tools:P,tool_choice:_},warnings:[...B,...C]}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N;let{args:D,warnings:L}=await this.getArgs($),{responseHeaders:B,value:O,rawValue:E}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:D,failedResponseHandler:gU,successfulResponseHandler:C5(on8),abortSignal:$.abortSignal,fetch:this.config.fetch}),M=O.choices[0],R=[],q=M.message.content;if(q!=null&&q.length>0)R.push({type:"text",text:q});for(let _ of(Y=M.message.tool_calls)!=null?Y:[])R.push({type:"tool-call",toolCallId:(X=_.id)!=null?X:w8(),toolName:_.function.name,input:_.function.arguments});for(let _ of(G=M.message.annotations)!=null?G:[])R.push({type:"source",sourceType:"url",id:w8(),url:_.url_citation.url,title:_.url_citation.title});let w=(J=O.usage)==null?void 0:J.completion_tokens_details,I=(Q=O.usage)==null?void 0:Q.prompt_tokens_details,P={openai:{}};if((w==null?void 0:w.accepted_prediction_tokens)!=null)P.openai.acceptedPredictionTokens=w==null?void 0:w.accepted_prediction_tokens;if((w==null?void 0:w.rejected_prediction_tokens)!=null)P.openai.rejectedPredictionTokens=w==null?void 0:w.rejected_prediction_tokens;if(((W=M.logprobs)==null?void 0:W.content)!=null)P.openai.logprobs=M.logprobs.content;return{content:R,finishReason:gY4(M.finish_reason),usage:{inputTokens:(K=(Z=O.usage)==null?void 0:Z.prompt_tokens)!=null?K:void 0,outputTokens:(z=(H=O.usage)==null?void 0:H.completion_tokens)!=null?z:void 0,totalTokens:(A=(V=O.usage)==null?void 0:V.total_tokens)!=null?A:void 0,reasoningTokens:(F=w==null?void 0:w.reasoning_tokens)!=null?F:void 0,cachedInputTokens:(N=I==null?void 0:I.cached_tokens)!=null?N:void 0},request:{body:D},response:{...bb0(O),headers:B,body:E},warnings:L,providerMetadata:P}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:gU,successfulResponseHandler:_Q(tn8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],Z="unknown",K={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},H=!1,z=!1,V={openai:{}};return{stream:Q.pipeThrough(new TransformStream({start(A){A.enqueue({type:"stream-start",warnings:X})},transform(A,F){var N,D,L,B,O,E,M,R,q,w,I,P,_,C,k,S,T,v,x,y,d,u,b,g;if($.includeRawChunks)F.enqueue({type:"raw",rawValue:A.rawValue});if(!A.success){Z="error",F.enqueue({type:"error",error:A.error});return}let p=A.value;if("error"in p){Z="error",F.enqueue({type:"error",error:p.error});return}if(!H){let t=bb0(p);if(Object.values(t).some(Boolean))H=!0,F.enqueue({type:"response-metadata",...bb0(p)})}if(p.usage!=null){if(K.inputTokens=(N=p.usage.prompt_tokens)!=null?N:void 0,K.outputTokens=(D=p.usage.completion_tokens)!=null?D:void 0,K.totalTokens=(L=p.usage.total_tokens)!=null?L:void 0,K.reasoningTokens=(O=(B=p.usage.completion_tokens_details)==null?void 0:B.reasoning_tokens)!=null?O:void 0,K.cachedInputTokens=(M=(E=p.usage.prompt_tokens_details)==null?void 0:E.cached_tokens)!=null?M:void 0,((R=p.usage.completion_tokens_details)==null?void 0:R.accepted_prediction_tokens)!=null)V.openai.acceptedPredictionTokens=(q=p.usage.completion_tokens_details)==null?void 0:q.accepted_prediction_tokens;if(((w=p.usage.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens)!=null)V.openai.rejectedPredictionTokens=(I=p.usage.completion_tokens_details)==null?void 0:I.rejected_prediction_tokens}let h=p.choices[0];if((h==null?void 0:h.finish_reason)!=null)Z=gY4(h.finish_reason);if(((P=h==null?void 0:h.logprobs)==null?void 0:P.content)!=null)V.openai.logprobs=h.logprobs.content;if((h==null?void 0:h.delta)==null)return;let n=h.delta;if(n.content!=null){if(!z)F.enqueue({type:"text-start",id:"0"}),z=!0;F.enqueue({type:"text-delta",id:"0",delta:n.content})}if(n.tool_calls!=null)for(let t of n.tool_calls){let s=t.index;if(W[s]==null){if(t.type!=null&&t.type!=="function")throw new oZ({data:t,message:"Expected 'function' type."});if(t.id==null)throw new oZ({data:t,message:"Expected 'id' to be a string."});if(((_=t.function)==null?void 0:_.name)==null)throw new oZ({data:t,message:"Expected 'function.name' to be a string."});F.enqueue({type:"tool-input-start",id:t.id,toolName:t.function.name}),W[s]={id:t.id,type:"function",function:{name:t.function.name,arguments:(C=t.function.arguments)!=null?C:""},hasFinished:!1};let X0=W[s];if(((k=X0.function)==null?void 0:k.name)!=null&&((S=X0.function)==null?void 0:S.arguments)!=null){if(X0.function.arguments.length>0)F.enqueue({type:"tool-input-delta",id:X0.id,delta:X0.function.arguments});if(nK(X0.function.arguments))F.enqueue({type:"tool-input-end",id:X0.id}),F.enqueue({type:"tool-call",toolCallId:(T=X0.id)!=null?T:w8(),toolName:X0.function.name,input:X0.function.arguments}),X0.hasFinished=!0}continue}let Z0=W[s];if(Z0.hasFinished)continue;if(((v=t.function)==null?void 0:v.arguments)!=null)Z0.function.arguments+=(y=(x=t.function)==null?void 0:x.arguments)!=null?y:"";if(F.enqueue({type:"tool-input-delta",id:Z0.id,delta:(d=t.function.arguments)!=null?d:""}),((u=Z0.function)==null?void 0:u.name)!=null&&((b=Z0.function)==null?void 0:b.arguments)!=null&&nK(Z0.function.arguments))F.enqueue({type:"tool-input-end",id:Z0.id}),F.enqueue({type:"tool-call",toolCallId:(g=Z0.id)!=null?g:w8(),toolName:Z0.function.name,input:Z0.function.arguments}),Z0.hasFinished=!0}if(n.annotations!=null)for(let t of n.annotations)F.enqueue({type:"source",sourceType:"url",id:w8(),url:t.url_citation.url,title:t.url_citation.title})},flush(A){if(z)A.enqueue({type:"text-end",id:"0"});A.enqueue({type:"finish",finishReason:Z,usage:K,...V!=null?{providerMetadata:V}:{}})}})),request:{body:G},response:{headers:J}}}},Gr8,Jr8,pY4,Qr8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={},this.modelId=$,this.config=Y}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,tools:H,toolChoice:z,seed:V,providerOptions:A}){let F=[],N={...await _9({provider:"openai",providerOptions:A,schema:pY4}),...await _9({provider:this.providerOptionsName,providerOptions:A,schema:pY4})};if(J!=null)F.push({type:"unsupported-setting",setting:"topK"});if(H==null?void 0:H.length)F.push({type:"unsupported-setting",setting:"tools"});if(z!=null)F.push({type:"unsupported-setting",setting:"toolChoice"});if(K!=null&&K.type!=="text")F.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format is not supported."});let{prompt:D,stopSequences:L}=Xr8({prompt:$}),B=[...L!=null?L:[],...Z!=null?Z:[]];return{args:{model:this.modelId,echo:N.echo,logit_bias:N.logitBias,logprobs:(N==null?void 0:N.logprobs)===!0?0:(N==null?void 0:N.logprobs)===!1?void 0:N==null?void 0:N.logprobs,suffix:N.suffix,user:N.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:V,prompt:D,stop:B.length>0?B:void 0},warnings:F}}async doGenerate($){var Y,X,G;let{args:J,warnings:Q}=await this.getArgs($),{responseHeaders:W,value:Z,rawValue:K}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:J,failedResponseHandler:gU,successfulResponseHandler:C5(Gr8),abortSignal:$.abortSignal,fetch:this.config.fetch}),H=Z.choices[0],z={openai:{}};if(H.logprobs!=null)z.openai.logprobs=H.logprobs;return{content:[{type:"text",text:H.text}],usage:{inputTokens:(Y=Z.usage)==null?void 0:Y.prompt_tokens,outputTokens:(X=Z.usage)==null?void 0:X.completion_tokens,totalTokens:(G=Z.usage)==null?void 0:G.total_tokens},finishReason:uY4(H.finish_reason),request:{body:J},response:{...mY4(Z),headers:W,body:K},providerMetadata:z,warnings:Q}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:gU,successfulResponseHandler:_Q(Jr8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W="unknown",Z={openai:{}},K={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},H=!0;return{stream:Q.pipeThrough(new TransformStream({start(z){z.enqueue({type:"stream-start",warnings:X})},transform(z,V){if($.includeRawChunks)V.enqueue({type:"raw",rawValue:z.rawValue});if(!z.success){W="error",V.enqueue({type:"error",error:z.error});return}let A=z.value;if("error"in A){W="error",V.enqueue({type:"error",error:A.error});return}if(H)H=!1,V.enqueue({type:"response-metadata",...mY4(A)}),V.enqueue({type:"text-start",id:"0"});if(A.usage!=null)K.inputTokens=A.usage.prompt_tokens,K.outputTokens=A.usage.completion_tokens,K.totalTokens=A.usage.total_tokens;let F=A.choices[0];if((F==null?void 0:F.finish_reason)!=null)W=uY4(F.finish_reason);if((F==null?void 0:F.logprobs)!=null)Z.openai.logprobs=F.logprobs;if((F==null?void 0:F.text)!=null&&F.text.length>0)V.enqueue({type:"text-delta",id:"0",delta:F.text})},flush(z){if(!H)z.enqueue({type:"text-end",id:"0"});z.enqueue({type:"finish",finishReason:W,providerMetadata:Z,usage:K})}})),request:{body:G},response:{headers:J}}}},Wr8,Zr8,Kr8=class{constructor($,Y){this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;if($.length>this.maxEmbeddingsPerCall)throw new Vm({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=(J=await _9({provider:"openai",providerOptions:G,schema:Wr8}))!=null?J:{},{responseHeaders:W,value:Z,rawValue:K}=await G8({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:o6(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:Q.dimensions,user:Q.user},failedResponseHandler:gU,successfulResponseHandler:C5(Zr8),abortSignal:X,fetch:this.config.fetch});return{embeddings:Z.data.map((H)=>H.embedding),usage:Z.usage?{tokens:Z.usage.prompt_tokens}:void 0,response:{headers:W,body:K}}}},Ur8,Hr8,zr8,DX4,Vr8,Ar8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get maxImagesPerCall(){var $;return($=Hr8[this.modelId])!=null?$:1}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:Z}){var K,H,z,V;let A=[];if(G!=null)A.push({type:"unsupported-setting",setting:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(J!=null)A.push({type:"unsupported-setting",setting:"seed"});let F=(z=(H=(K=this.config._internal)==null?void 0:K.currentDate)==null?void 0:H.call(K))!=null?z:new Date,N=(V=await _9({provider:"openai",providerOptions:Q,schema:Vr8}))!=null?V:{},{value:D,responseHeaders:L}=await G8({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:o6(this.config.headers(),W),body:{model:this.modelId,prompt:$,n:Y,size:X,quality:N.quality,style:N.style,background:N.background,moderation:N.moderation,output_format:N.outputFormat,output_compression:N.outputCompression,user:N.user,...!zr8.has(this.modelId)?{response_format:"b64_json"}:{}},failedResponseHandler:gU,successfulResponseHandler:C5(Ur8),abortSignal:Z,fetch:this.config.fetch});return{images:D.data.map((B)=>B.b64_json),warnings:A,response:{timestamp:F,modelId:this.modelId,headers:L},providerMetadata:{openai:{images:D.data.map((B,O)=>({...B.revised_prompt?{revisedPrompt:B.revised_prompt}:{},...D.created!=null?{created:D.created}:{},...D.size!=null?{size:D.size}:{},...D.quality!=null?{quality:D.quality}:{},...D.background!=null?{background:D.background}:{},...D.output_format!=null?{outputFormat:D.output_format}:{},...Fr8(D.usage,O,D.data.length)}))}}}}},Dr8,Nr8,dY4,Lr8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get provider(){return this.config.provider}async getArgs({audio:$,mediaType:Y,providerOptions:X}){let G=[],J=await _9({provider:"openai",providerOptions:X,schema:Nr8}),Q=new FormData,W=$ instanceof Uint8Array?new Blob([$]):new Blob([m90($)]);Q.append("model",this.modelId);let Z=x90(Y);if(Q.append("file",new File([W],"audio",{type:Y}),`audio.${Z}`),J){let K={include:J.include,language:J.language,prompt:J.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:J.temperature,timestamp_granularities:J.timestampGranularities};for(let[H,z]of Object.entries(K))if(z!=null)if(Array.isArray(z))for(let V of z)Q.append(`${H}[]`,String(V));else Q.append(H,String(z))}return{formData:Q,warnings:G}}async doGenerate($){var Y,X,G,J,Q,W,Z,K;let H=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{formData:z,warnings:V}=await this.getArgs($),{value:A,responseHeaders:F,rawValue:N}=await h90({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),formData:z,failedResponseHandler:gU,successfulResponseHandler:C5(Dr8),abortSignal:$.abortSignal,fetch:this.config.fetch}),D=A.language!=null&&A.language in dY4?dY4[A.language]:void 0;return{text:A.text,segments:(Z=(W=(J=A.segments)==null?void 0:J.map((L)=>({text:L.text,startSecond:L.start,endSecond:L.end})))!=null?W:(Q=A.words)==null?void 0:Q.map((L)=>({text:L.word,startSecond:L.start,endSecond:L.end})))!=null?Z:[],language:D,durationInSeconds:(K=A.duration)!=null?K:void 0,warnings:V,response:{timestamp:H,modelId:this.modelId,headers:F,body:N}}}},Br8,Or8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get provider(){return this.config.provider}async getArgs({text:$,voice:Y="alloy",outputFormat:X="mp3",speed:G,instructions:J,language:Q,providerOptions:W}){let Z=[],K=await _9({provider:"openai",providerOptions:W,schema:Br8}),H={model:this.modelId,input:$,voice:Y,response_format:"mp3",speed:G,instructions:J};if(X)if(["mp3","opus","aac","flac","wav","pcm"].includes(X))H.response_format=X;else Z.push({type:"unsupported-setting",setting:"outputFormat",details:`Unsupported output format: ${X}. Using mp3 instead.`});if(K){let z={};for(let V in z){let A=z[V];if(A!==void 0)H[V]=A}}if(Q)Z.push({type:"unsupported-setting",setting:"language",details:`OpenAI speech models do not support language selection. Language parameter "${Q}" was ignored.`});return{requestBody:H,warnings:Z}}async doGenerate($){var Y,X,G;let J=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{requestBody:Q,warnings:W}=await this.getArgs($),{value:Z,responseHeaders:K,rawValue:H}=await G8({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:Q,failedResponseHandler:gU,successfulResponseHandler:f90(),abortSignal:$.abortSignal,fetch:this.config.fetch});return{audio:Z,warnings:W,request:{body:JSON.stringify(Q)},response:{timestamp:J,modelId:this.modelId,headers:K,body:H}}}},NX4,LX4,Mr8,Rr8,qr8,BX4=20,Ir8,Pr8,wr8,_r8,jr8,Tr8=($={})=>{return jr8($)},OX4,EX4,Cr8,Sr8,kr8,vr8,xr8,yr8,br8,hr8,fr8,gr8,mr8,ur8,pr8,dr8,cr8=($={})=>{return dr8($)},ir8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({maxOutputTokens:$,temperature:Y,stopSequences:X,topP:G,topK:J,presencePenalty:Q,frequencyPenalty:W,seed:Z,prompt:K,providerOptions:H,tools:z,toolChoice:V,responseFormat:A}){var F,N,D,L;let B=[],O=FX4(this.modelId);if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if(Z!=null)B.push({type:"unsupported-setting",setting:"seed"});if(Q!=null)B.push({type:"unsupported-setting",setting:"presencePenalty"});if(W!=null)B.push({type:"unsupported-setting",setting:"frequencyPenalty"});if(X!=null)B.push({type:"unsupported-setting",setting:"stopSequences"});let E=await _9({provider:"openai",providerOptions:H,schema:Ir8});if((E==null?void 0:E.conversation)&&(E==null?void 0:E.previousResponseId))B.push({type:"unsupported-setting",setting:"conversation",details:"conversation and previousResponseId cannot be used together"});let{input:M,warnings:R}=await Er8({prompt:K,systemMessageMode:O.systemMessageMode,fileIdPrefixes:this.config.fileIdPrefixes,store:(F=E==null?void 0:E.store)!=null?F:!0,hasLocalShellTool:P("openai.local_shell")});B.push(...R);let q=(N=E==null?void 0:E.strictJsonSchema)!=null?N:!1,w=E==null?void 0:E.include;function I(y){if(w==null)w=[y];else if(!w.includes(y))w=[...w,y]}function P(y){return(z==null?void 0:z.find((d)=>d.type==="provider-defined"&&d.id===y))!=null}let _=typeof(E==null?void 0:E.logprobs)==="number"?E==null?void 0:E.logprobs:(E==null?void 0:E.logprobs)===!0?BX4:void 0;if(_)I("message.output_text.logprobs");let C=(D=z==null?void 0:z.find((y)=>y.type==="provider-defined"&&(y.id==="openai.web_search"||y.id==="openai.web_search_preview")))==null?void 0:D.name;if(C)I("web_search_call.action.sources");if(P("openai.code_interpreter"))I("code_interpreter_call.outputs");let k=E==null?void 0:E.store;if(k===!1&&O.isReasoningModel)I("reasoning.encrypted_content");let S={model:this.modelId,input:M,temperature:Y,top_p:G,max_output_tokens:$,...((A==null?void 0:A.type)==="json"||(E==null?void 0:E.textVerbosity))&&{text:{...(A==null?void 0:A.type)==="json"&&{format:A.schema!=null?{type:"json_schema",strict:q,name:(L=A.name)!=null?L:"response",description:A.description,schema:A.schema}:{type:"json_object"}},...(E==null?void 0:E.textVerbosity)&&{verbosity:E.textVerbosity}}},conversation:E==null?void 0:E.conversation,max_tool_calls:E==null?void 0:E.maxToolCalls,metadata:E==null?void 0:E.metadata,parallel_tool_calls:E==null?void 0:E.parallelToolCalls,previous_response_id:E==null?void 0:E.previousResponseId,store:k,user:E==null?void 0:E.user,instructions:E==null?void 0:E.instructions,service_tier:E==null?void 0:E.serviceTier,include:w,prompt_cache_key:E==null?void 0:E.promptCacheKey,prompt_cache_retention:E==null?void 0:E.promptCacheRetention,safety_identifier:E==null?void 0:E.safetyIdentifier,top_logprobs:_,truncation:E==null?void 0:E.truncation,...O.isReasoningModel&&((E==null?void 0:E.reasoningEffort)!=null||(E==null?void 0:E.reasoningSummary)!=null)&&{reasoning:{...(E==null?void 0:E.reasoningEffort)!=null&&{effort:E.reasoningEffort},...(E==null?void 0:E.reasoningSummary)!=null&&{summary:E.reasoningSummary}}}};if(O.isReasoningModel){if(!((E==null?void 0:E.reasoningEffort)==="none"&&O.supportsNonReasoningParameters)){if(S.temperature!=null)S.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"});if(S.top_p!=null)S.top_p=void 0,B.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"})}}else{if((E==null?void 0:E.reasoningEffort)!=null)B.push({type:"unsupported-setting",setting:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if((E==null?void 0:E.reasoningSummary)!=null)B.push({type:"unsupported-setting",setting:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if((E==null?void 0:E.serviceTier)==="flex"&&!O.supportsFlexProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete S.service_tier;if((E==null?void 0:E.serviceTier)==="priority"&&!O.supportsPriorityProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete S.service_tier;let{tools:T,toolChoice:v,toolWarnings:x}=await lr8({tools:z,toolChoice:V,strictJsonSchema:q});return{webSearchToolName:C,args:{...S,tools:T,tool_choice:v},warnings:[...B,...x],store:k}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D,L,B,O,E,M,R,q,w,I,P,_,C,k;let{args:S,warnings:T,webSearchToolName:v}=await this.getArgs($),x=this.config.url({path:"/responses",modelId:this.modelId}),y=this.config.provider.replace(".responses",""),{responseHeaders:d,value:u,rawValue:b}=await G8({url:x,headers:o6(this.config.headers(),$.headers),body:S,failedResponseHandler:gU,successfulResponseHandler:C5(qr8),abortSignal:$.abortSignal,fetch:this.config.fetch});if(u.error)throw new AY({message:u.error.message,url:x,requestBodyValues:S,statusCode:400,responseHeaders:d,responseBody:b,isRetryable:!1});let g=[],p=[],h=!1;for(let s of u.output)switch(s.type){case"reasoning":{if(s.summary.length===0)s.summary.push({type:"summary_text",text:""});for(let Z0 of s.summary)g.push({type:"reasoning",text:Z0.text,providerMetadata:{[y]:{itemId:s.id,reasoningEncryptedContent:(Y=s.encrypted_content)!=null?Y:null}}});break}case"image_generation_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"image_generation",input:"{}",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"image_generation",result:{result:s.result},providerExecuted:!0});break}case"local_shell_call":{g.push({type:"tool-call",toolCallId:s.call_id,toolName:"local_shell",input:JSON.stringify({action:s.action}),providerMetadata:{[y]:{itemId:s.id}}});break}case"message":{for(let Z0 of s.content){if(((G=(X=$.providerOptions)==null?void 0:X.openai)==null?void 0:G.logprobs)&&Z0.logprobs)p.push(Z0.logprobs);g.push({type:"text",text:Z0.text,providerMetadata:{[y]:{itemId:s.id,...s.phase!=null&&{phase:s.phase}}}});for(let X0 of Z0.annotations)if(X0.type==="url_citation")g.push({type:"source",sourceType:"url",id:(W=(Q=(J=this.config).generateId)==null?void 0:Q.call(J))!=null?W:w8(),url:X0.url,title:X0.title});else if(X0.type==="file_citation")g.push({type:"source",sourceType:"document",id:(H=(K=(Z=this.config).generateId)==null?void 0:K.call(Z))!=null?H:w8(),mediaType:"text/plain",title:(V=(z=X0.quote)!=null?z:X0.filename)!=null?V:"Document",filename:(A=X0.filename)!=null?A:X0.file_id,...X0.file_id?{providerMetadata:{[y]:{fileId:X0.file_id}}}:{}});else if(X0.type==="container_file_citation")g.push({type:"source",sourceType:"document",id:(D=(N=(F=this.config).generateId)==null?void 0:N.call(F))!=null?D:w8(),mediaType:"text/plain",title:(B=(L=X0.filename)!=null?L:X0.file_id)!=null?B:"Document",filename:(O=X0.filename)!=null?O:X0.file_id,providerMetadata:{[y]:{fileId:X0.file_id,containerId:X0.container_id,...X0.index!=null?{index:X0.index}:{}}}});else if(X0.type==="file_path")g.push({type:"source",sourceType:"document",id:(R=(M=(E=this.config).generateId)==null?void 0:M.call(E))!=null?R:w8(),mediaType:"application/octet-stream",title:X0.file_id,filename:X0.file_id,providerMetadata:{[y]:{fileId:X0.file_id,...X0.index!=null?{index:X0.index}:{}}}})}break}case"function_call":{h=!0,g.push({type:"tool-call",toolCallId:s.call_id,toolName:s.name,input:s.arguments,providerMetadata:{[y]:{itemId:s.id}}});break}case"web_search_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:v!=null?v:"web_search",input:JSON.stringify({}),providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:v!=null?v:"web_search",result:nY4(s.action),providerExecuted:!0});break}case"computer_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"computer_use",input:"",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:s.status||"completed"},providerExecuted:!0});break}case"file_search_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"file_search",input:"{}",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"file_search",result:{queries:s.queries,results:(w=(q=s.results)==null?void 0:q.map((Z0)=>({attributes:Z0.attributes,fileId:Z0.file_id,filename:Z0.filename,score:Z0.score,text:Z0.text})))!=null?w:null},providerExecuted:!0});break}case"code_interpreter_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"code_interpreter",input:JSON.stringify({code:s.code,containerId:s.container_id}),providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"code_interpreter",result:{outputs:s.outputs},providerExecuted:!0});break}}let n={[y]:{...u.id!=null?{responseId:u.id}:{}}};if(p.length>0)n[y].logprobs=p;if(typeof u.service_tier==="string")n[y].serviceTier=u.service_tier;let t=u.usage;return{content:g,finishReason:lY4({finishReason:(I=u.incomplete_details)==null?void 0:I.reason,hasFunctionCall:h}),usage:{inputTokens:t.input_tokens,outputTokens:t.output_tokens,totalTokens:t.input_tokens+t.output_tokens,reasoningTokens:(_=(P=t.output_tokens_details)==null?void 0:P.reasoning_tokens)!=null?_:void 0,cachedInputTokens:(k=(C=t.input_tokens_details)==null?void 0:C.cached_tokens)!=null?k:void 0},request:{body:S},response:{id:u.id,timestamp:new Date(u.created_at*1000),modelId:u.model,headers:d,body:b},providerMetadata:n,warnings:T}}async doStream($){let{args:Y,warnings:X,webSearchToolName:G,store:J}=await this.getArgs($),{responseHeaders:Q,value:W}=await G8({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:{...Y,stream:!0},failedResponseHandler:gU,successfulResponseHandler:_Q(Rr8),abortSignal:$.abortSignal,fetch:this.config.fetch}),Z=this,K=this.config.provider.replace(".responses",""),H="unknown",z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},V=[],A=null,F={},N=[],D,L=!1,B={},O;return{stream:W.pipeThrough(new TransformStream({start(E){E.enqueue({type:"stream-start",warnings:X})},transform(E,M){var R,q,w,I,P,_,C,k,S,T,v,x,y,d,u,b,g,p,h,n,t,s,Z0,X0;if($.includeRawChunks)M.enqueue({type:"raw",rawValue:E.rawValue});if(!E.success){H="error",M.enqueue({type:"error",error:E.error});return}let a=E.value;if(iY4(a)){if(a.item.type==="function_call")F[a.output_index]={toolName:a.item.name,toolCallId:a.item.call_id},M.enqueue({type:"tool-input-start",id:a.item.call_id,toolName:a.item.name});else if(a.item.type==="web_search_call")F[a.output_index]={toolName:G!=null?G:"web_search",toolCallId:a.item.id},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:G!=null?G:"web_search",providerExecuted:!0}),M.enqueue({type:"tool-input-end",id:a.item.id}),M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:G!=null?G:"web_search",input:JSON.stringify({}),providerExecuted:!0});else if(a.item.type==="computer_call")F[a.output_index]={toolName:"computer_use",toolCallId:a.item.id},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:"computer_use",providerExecuted:!0});else if(a.item.type==="code_interpreter_call")F[a.output_index]={toolName:"code_interpreter",toolCallId:a.item.id,codeInterpreter:{containerId:a.item.container_id}},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:"code_interpreter",providerExecuted:!0}),M.enqueue({type:"tool-input-delta",id:a.item.id,delta:`{"containerId":"${a.item.container_id}","code":"`});else if(a.item.type==="file_search_call")M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"file_search",input:"{}",providerExecuted:!0});else if(a.item.type==="image_generation_call")M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"image_generation",input:"{}",providerExecuted:!0});else if(a.item.type==="message")N.splice(0,N.length),D=(R=a.item.phase)!=null?R:void 0,M.enqueue({type:"text-start",id:a.item.id,providerMetadata:{[K]:{itemId:a.item.id,...a.item.phase!=null&&{phase:a.item.phase}}}});else if(iY4(a)&&a.item.type==="reasoning")B[a.item.id]={encryptedContent:a.item.encrypted_content,summaryParts:{0:"active"}},M.enqueue({type:"reasoning-start",id:`${a.item.id}:0`,providerMetadata:{[K]:{itemId:a.item.id,reasoningEncryptedContent:(q=a.item.encrypted_content)!=null?q:null}}})}else if(rr8(a)){if(a.item.type==="message"){let Q0=(w=a.item.phase)!=null?w:D;D=void 0,M.enqueue({type:"text-end",id:a.item.id,providerMetadata:{[K]:{itemId:a.item.id,...Q0!=null&&{phase:Q0},...N.length>0&&{annotations:N}}}})}else if(a.item.type==="function_call")F[a.output_index]=void 0,L=!0,M.enqueue({type:"tool-input-end",id:a.item.call_id}),M.enqueue({type:"tool-call",toolCallId:a.item.call_id,toolName:a.item.name,input:a.item.arguments,providerMetadata:{[K]:{itemId:a.item.id}}});else if(a.item.type==="web_search_call")F[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:G!=null?G:"web_search",result:nY4(a.item.action),providerExecuted:!0});else if(a.item.type==="computer_call")F[a.output_index]=void 0,M.enqueue({type:"tool-input-end",id:a.item.id}),M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:a.item.status||"completed"},providerExecuted:!0});else if(a.item.type==="file_search_call")F[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"file_search",result:{queries:a.item.queries,results:(P=(I=a.item.results)==null?void 0:I.map((Q0)=>({attributes:Q0.attributes,fileId:Q0.file_id,filename:Q0.filename,score:Q0.score,text:Q0.text})))!=null?P:null},providerExecuted:!0});else if(a.item.type==="code_interpreter_call")F[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"code_interpreter",result:{outputs:a.item.outputs},providerExecuted:!0});else if(a.item.type==="image_generation_call")M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"image_generation",result:{result:a.item.result},providerExecuted:!0});else if(a.item.type==="local_shell_call")F[a.output_index]=void 0,M.enqueue({type:"tool-call",toolCallId:a.item.call_id,toolName:"local_shell",input:JSON.stringify({action:{type:"exec",command:a.item.action.command,timeoutMs:a.item.action.timeout_ms,user:a.item.action.user,workingDirectory:a.item.action.working_directory,env:a.item.action.env}}),providerMetadata:{[K]:{itemId:a.item.id}}});else if(a.item.type==="reasoning"){let Q0=B[a.item.id],e=Object.entries(Q0.summaryParts).filter(([m,$0])=>$0==="active"||$0==="can-conclude").map(([m])=>m);for(let m of e)M.enqueue({type:"reasoning-end",id:`${a.item.id}:${m}`,providerMetadata:{[K]:{itemId:a.item.id,reasoningEncryptedContent:(_=a.item.encrypted_content)!=null?_:null}}});delete B[a.item.id]}}else if(or8(a)){let Q0=F[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:a.delta})}else if(tr8(a)){let Q0=F[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:JSON.stringify(a.delta).slice(1,-1)})}else if(er8(a)){let Q0=F[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:'"}'}),M.enqueue({type:"tool-input-end",id:Q0.toolCallId}),M.enqueue({type:"tool-call",toolCallId:Q0.toolCallId,toolName:"code_interpreter",input:JSON.stringify({code:a.code,containerId:Q0.codeInterpreter.containerId}),providerExecuted:!0})}else if(sr8(a))A=a.response.id,M.enqueue({type:"response-metadata",id:a.response.id,timestamp:new Date(a.response.created_at*1000),modelId:a.response.model});else if(nr8(a)){if(M.enqueue({type:"text-delta",id:a.item_id,delta:a.delta}),((k=(C=$.providerOptions)==null?void 0:C.openai)==null?void 0:k.logprobs)&&a.logprobs)V.push(a.logprobs)}else if(a.type==="response.reasoning_summary_part.added"){if(a.summary_index>0){let Q0=B[a.item_id];Q0.summaryParts[a.summary_index]="active";for(let e of Object.keys(Q0.summaryParts))if(Q0.summaryParts[e]==="can-conclude")M.enqueue({type:"reasoning-end",id:`${a.item_id}:${e}`,providerMetadata:{[K]:{itemId:a.item_id}}}),Q0.summaryParts[e]="concluded";M.enqueue({type:"reasoning-start",id:`${a.item_id}:${a.summary_index}`,providerMetadata:{[K]:{itemId:a.item_id,reasoningEncryptedContent:(T=(S=B[a.item_id])==null?void 0:S.encryptedContent)!=null?T:null}}})}}else if(a.type==="response.reasoning_summary_text.delta")M.enqueue({type:"reasoning-delta",id:`${a.item_id}:${a.summary_index}`,delta:a.delta,providerMetadata:{[K]:{itemId:a.item_id}}});else if(a.type==="response.reasoning_summary_part.done")if(J)M.enqueue({type:"reasoning-end",id:`${a.item_id}:${a.summary_index}`,providerMetadata:{[K]:{itemId:a.item_id}}}),B[a.item_id].summaryParts[a.summary_index]="concluded";else B[a.item_id].summaryParts[a.summary_index]="can-conclude";else if(ar8(a)){if(H=lY4({finishReason:(v=a.response.incomplete_details)==null?void 0:v.reason,hasFunctionCall:L}),z.inputTokens=a.response.usage.input_tokens,z.outputTokens=a.response.usage.output_tokens,z.totalTokens=a.response.usage.input_tokens+a.response.usage.output_tokens,z.reasoningTokens=(y=(x=a.response.usage.output_tokens_details)==null?void 0:x.reasoning_tokens)!=null?y:void 0,z.cachedInputTokens=(u=(d=a.response.usage.input_tokens_details)==null?void 0:d.cached_tokens)!=null?u:void 0,typeof a.response.service_tier==="string")O=a.response.service_tier}else if($a8(a)){if(N.push(a.annotation),a.annotation.type==="url_citation")M.enqueue({type:"source",sourceType:"url",id:(p=(g=(b=Z.config).generateId)==null?void 0:g.call(b))!=null?p:w8(),url:a.annotation.url,title:a.annotation.title});else if(a.annotation.type==="file_citation")M.enqueue({type:"source",sourceType:"document",id:(t=(n=(h=Z.config).generateId)==null?void 0:n.call(h))!=null?t:w8(),mediaType:"text/plain",title:(Z0=(s=a.annotation.quote)!=null?s:a.annotation.filename)!=null?Z0:"Document",filename:(X0=a.annotation.filename)!=null?X0:a.annotation.file_id,...a.annotation.file_id?{providerMetadata:{[K]:{fileId:a.annotation.file_id}}}:{}})}else if(Ya8(a))M.enqueue({type:"error",error:a})},flush(E){let M={[K]:{responseId:A}};if(V.length>0)M[K].logprobs=V;if(O!==void 0)M[K].serviceTier=O;E.enqueue({type:"finish",finishReason:H,usage:z,providerMetadata:M})}})),request:{body:Y},response:{headers:Q}}}},Xa8,Ga8="2.0.108",Ja8,Va8,Fa8,Da8="api.openai.com",mb0,IE,eY4=class{specificationVersion="v1";provider;modelId;defaultObjectGenerationMode;supportsImageUrls;supportsStructuredOutputs;#$;constructor($){this.#$=$,this.provider=$.provider,this.modelId=$.modelId,this.defaultObjectGenerationMode=$.defaultObjectGenerationMode,this.supportsImageUrls=$.supportsImageUrls,this.supportsStructuredOutputs=$.supportsStructuredOutputs}supportsUrl($){return this.#$.supportsUrl?.($)??!1}doGenerate($){return this.#$.doGenerate($)}doStream($){return this.#$.doStream($)}serializeForSpan(){return{specificationVersion:this.specificationVersion,modelId:this.modelId,provider:this.provider}}},Ma8="2.0.72",Ra8,_m,qa8,Ia8,Pa8=class{constructor($,Y){this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){let J=await _9({provider:"google",providerOptions:G,schema:Ia8});if($.length>this.maxEmbeddingsPerCall)throw new Vm({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=o6(await Jj(this.config.headers),Y),W=J==null?void 0:J.content;if(W!=null&&W.length!==$.length)throw Error(`The number of multimodal content entries (${W.length}) must match the number of values (${$.length}).`);if($.length===1){let z=W==null?void 0:W[0],V=$[0]?[{text:$[0]}]:[],A=z!=null?[...V,...z]:[{text:$[0]}],{responseHeaders:F,value:N,rawValue:D}=await G8({url:`${this.config.baseURL}/models/${this.modelId}:embedContent`,headers:Q,body:{model:`models/${this.modelId}`,content:{parts:A},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType},failedResponseHandler:_m,successfulResponseHandler:C5(_a8),abortSignal:X,fetch:this.config.fetch});return{embeddings:[N.embedding.values],usage:void 0,response:{headers:F,body:D}}}let{responseHeaders:Z,value:K,rawValue:H}=await G8({url:`${this.config.baseURL}/models/${this.modelId}:batchEmbedContents`,headers:Q,body:{requests:$.map((z,V)=>{let A=W==null?void 0:W[V],F=z?[{text:z}]:[];return{model:`models/${this.modelId}`,content:{role:"user",parts:A!=null?[...F,...A]:[{text:z}]},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType}})},failedResponseHandler:_m,successfulResponseHandler:C5(wa8),abortSignal:X,fetch:this.config.fetch});return{embeddings:K.embeddings.map((z)=>z.values),usage:void 0,response:{headers:Z,body:H}}}},wa8,_a8,ka8,va8,ya8=class{constructor($,Y){this.specificationVersion="v2";var X;this.modelId=$,this.config=Y,this.generateId=(X=Y.generateId)!=null?X:w8}get provider(){return this.config.provider}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,tools:z,toolChoice:V,providerOptions:A}){var F;let N=[],D=await _9({provider:"google",providerOptions:A,schema:ka8}),L=this.config.provider.startsWith("google.vertex.");if((z==null?void 0:z.some((P)=>P.type==="provider-defined"&&P.id==="google.vertex_rag_store"))&&!L)N.push({type:"other",message:`The 'vertex_rag_store' tool is only supported with the Google Vertex provider and might not be supported or could behave unexpectedly with the current Google provider (${this.config.provider}).`});let B=D==null?void 0:D.serviceTier;if((D==null?void 0:D.serviceTier)&&L)B=va8[D.serviceTier];let O=this.modelId.toLowerCase().startsWith("gemma-"),E=this.modelId.startsWith("gemini-3"),{contents:M,systemInstruction:R}=Ta8($,{isGemmaModel:O,supportsFunctionResponseParts:E}),{tools:q,toolConfig:w,toolWarnings:I}=xa8({tools:z,toolChoice:V,modelId:this.modelId});return{args:{generationConfig:{maxOutputTokens:Y,temperature:X,topK:J,topP:G,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,seed:H,responseMimeType:(K==null?void 0:K.type)==="json"?"application/json":void 0,responseSchema:(K==null?void 0:K.type)==="json"&&K.schema!=null&&((F=D==null?void 0:D.structuredOutputs)!=null?F:!0)?fU(K.schema):void 0,...(D==null?void 0:D.audioTimestamp)&&{audioTimestamp:D.audioTimestamp},responseModalities:D==null?void 0:D.responseModalities,thinkingConfig:D==null?void 0:D.thinkingConfig,...(D==null?void 0:D.imageConfig)&&{imageConfig:D.imageConfig},...(D==null?void 0:D.mediaResolution)&&{mediaResolution:D.mediaResolution}},contents:M,systemInstruction:O?void 0:R,safetySettings:D==null?void 0:D.safetySettings,tools:q,toolConfig:(D==null?void 0:D.retrievalConfig)?{...w,retrievalConfig:D.retrievalConfig}:w,cachedContent:D==null?void 0:D.cachedContent,labels:D==null?void 0:D.labels,serviceTier:B},warnings:[...N,...I]}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N;let{args:D,warnings:L}=await this.getArgs($),B=JSON.stringify(D),O=o6(await Jj(this.config.headers),$.headers),{responseHeaders:E,value:M,rawValue:R}=await G8({url:`${this.config.baseURL}/${$X4(this.modelId)}:generateContent`,headers:O,body:D,failedResponseHandler:_m,successfulResponseHandler:C5(ha8),abortSignal:$.abortSignal,fetch:this.config.fetch}),q=M.candidates[0],w=[],I=(X=(Y=q.content)==null?void 0:Y.parts)!=null?X:[],P=M.usageMetadata,_;for(let k of I)if("executableCode"in k&&((G=k.executableCode)==null?void 0:G.code)){let S=this.config.generateId();_=S,w.push({type:"tool-call",toolCallId:S,toolName:"code_execution",input:JSON.stringify(k.executableCode),providerExecuted:!0})}else if("codeExecutionResult"in k&&k.codeExecutionResult)w.push({type:"tool-result",toolCallId:_,toolName:"code_execution",result:{outcome:k.codeExecutionResult.outcome,output:k.codeExecutionResult.output},providerExecuted:!0}),_=void 0;else if("text"in k&&k.text!=null){let S=k.thoughtSignature?{google:{thoughtSignature:k.thoughtSignature}}:void 0;if(k.text.length===0){if(S!=null&&w.length>0){let T=w[w.length-1];if(T.type!=="file")T.providerMetadata=S}}else w.push({type:k.thought===!0?"reasoning":"text",text:k.text,providerMetadata:S})}else if("functionCall"in k)w.push({type:"tool-call",toolCallId:this.config.generateId(),toolName:k.functionCall.name,input:JSON.stringify(k.functionCall.args),providerMetadata:k.thoughtSignature?{google:{thoughtSignature:k.thoughtSignature}}:void 0});else if("inlineData"in k)w.push({type:"file",data:k.inlineData.data,mediaType:k.inlineData.mimeType});let C=(J=XX4({groundingMetadata:q.groundingMetadata,generateId:this.config.generateId}))!=null?J:[];for(let k of C)w.push(k);return{content:w,finishReason:YX4({finishReason:q.finishReason,hasToolCalls:w.some((k)=>k.type==="tool-call")}),usage:{inputTokens:(Q=P==null?void 0:P.promptTokenCount)!=null?Q:void 0,outputTokens:(W=P==null?void 0:P.candidatesTokenCount)!=null?W:void 0,totalTokens:(Z=P==null?void 0:P.totalTokenCount)!=null?Z:void 0,reasoningTokens:(K=P==null?void 0:P.thoughtsTokenCount)!=null?K:void 0,cachedInputTokens:(H=P==null?void 0:P.cachedContentTokenCount)!=null?H:void 0},warnings:L,providerMetadata:{google:{promptFeedback:(z=M.promptFeedback)!=null?z:null,groundingMetadata:(V=q.groundingMetadata)!=null?V:null,urlContextMetadata:(A=q.urlContextMetadata)!=null?A:null,safetyRatings:(F=q.safetyRatings)!=null?F:null,serviceTier:(N=M.serviceTier)!=null?N:null}},request:{body:B},response:{headers:E,body:R}}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G=JSON.stringify(Y),J=o6(await Jj(this.config.headers),$.headers),{responseHeaders:Q,value:W}=await G8({url:`${this.config.baseURL}/${$X4(this.modelId)}:streamGenerateContent?alt=sse`,headers:J,body:Y,failedResponseHandler:_m,successfulResponseHandler:_Q(fa8),abortSignal:$.abortSignal,fetch:this.config.fetch}),Z="unknown",K={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},H=void 0,z=null,V=null,A=null,F=this.config.generateId,N=!1,D=null,L=null,B=0,O=new Set,E;return{stream:W.pipeThrough(new TransformStream({start(M){M.enqueue({type:"stream-start",warnings:X})},transform(M,R){var q,w,I,P,_,C,k,S,T,v;if($.includeRawChunks)R.enqueue({type:"raw",rawValue:M.rawValue});if(!M.success){R.enqueue({type:"error",error:M.error});return}let x=M.value,y=x.usageMetadata;if(y!=null)K.inputTokens=(q=y.promptTokenCount)!=null?q:void 0,K.outputTokens=(w=y.candidatesTokenCount)!=null?w:void 0,K.totalTokens=(I=y.totalTokenCount)!=null?I:void 0,K.reasoningTokens=(P=y.thoughtsTokenCount)!=null?P:void 0,K.cachedInputTokens=(_=y.cachedContentTokenCount)!=null?_:void 0;if(x.serviceTier!=null)A=x.serviceTier;let d=(C=x.candidates)==null?void 0:C[0];if(d==null)return;let u=d.content;if(d.groundingMetadata!=null)z=d.groundingMetadata;if(d.urlContextMetadata!=null)V=d.urlContextMetadata;let b=XX4({groundingMetadata:d.groundingMetadata,generateId:F});if(b!=null){for(let g of b)if(g.sourceType==="url"&&!O.has(g.url))O.add(g.url),R.enqueue(g)}if(u!=null){let g=(k=u.parts)!=null?k:[];for(let h of g)if("executableCode"in h&&((S=h.executableCode)==null?void 0:S.code)){let n=F();E=n,R.enqueue({type:"tool-call",toolCallId:n,toolName:"code_execution",input:JSON.stringify(h.executableCode),providerExecuted:!0}),N=!0}else if("codeExecutionResult"in h&&h.codeExecutionResult){let n=E;if(n)R.enqueue({type:"tool-result",toolCallId:n,toolName:"code_execution",result:{outcome:h.codeExecutionResult.outcome,output:h.codeExecutionResult.output},providerExecuted:!0}),E=void 0}else if("text"in h&&h.text!=null){let n=h.thoughtSignature?{google:{thoughtSignature:h.thoughtSignature}}:void 0;if(h.text.length===0){if(n!=null&&D!==null)R.enqueue({type:"text-delta",id:D,delta:"",providerMetadata:n})}else if(h.thought===!0){if(D!==null)R.enqueue({type:"text-end",id:D}),D=null;if(L===null)L=String(B++),R.enqueue({type:"reasoning-start",id:L,providerMetadata:n});R.enqueue({type:"reasoning-delta",id:L,delta:h.text,providerMetadata:n})}else{if(L!==null)R.enqueue({type:"reasoning-end",id:L}),L=null;if(D===null)D=String(B++),R.enqueue({type:"text-start",id:D,providerMetadata:n});R.enqueue({type:"text-delta",id:D,delta:h.text,providerMetadata:n})}}else if("inlineData"in h)R.enqueue({type:"file",mediaType:h.inlineData.mimeType,data:h.inlineData.data});let p=ba8({parts:u.parts,generateId:F});if(p!=null)for(let h of p)R.enqueue({type:"tool-input-start",id:h.toolCallId,toolName:h.toolName,providerMetadata:h.providerMetadata}),R.enqueue({type:"tool-input-delta",id:h.toolCallId,delta:h.args,providerMetadata:h.providerMetadata}),R.enqueue({type:"tool-input-end",id:h.toolCallId,providerMetadata:h.providerMetadata}),R.enqueue({type:"tool-call",toolCallId:h.toolCallId,toolName:h.toolName,input:h.args,providerMetadata:h.providerMetadata}),N=!0}if(d.finishReason!=null){if(Z=YX4({finishReason:d.finishReason,hasToolCalls:N}),H={google:{promptFeedback:(T=x.promptFeedback)!=null?T:null,groundingMetadata:z,urlContextMetadata:V,safetyRatings:(v=d.safetyRatings)!=null?v:null,serviceTier:A}},y!=null)H.google.usageMetadata=y}},flush(M){if(D!==null)M.enqueue({type:"text-end",id:D});if(L!==null)M.enqueue({type:"reasoning-end",id:L});M.enqueue({type:"finish",finishReason:Z,usage:K,providerMetadata:H})}})),response:{headers:Q},request:{body:G}}}},qX4=()=>U.object({webSearchQueries:U.array(U.string()).nullish(),imageSearchQueries:U.array(U.string()).nullish(),retrievalQueries:U.array(U.string()).nullish(),searchEntryPoint:U.object({renderedContent:U.string()}).nullish(),groundingChunks:U.array(U.object({web:U.object({uri:U.string(),title:U.string().nullish()}).nullish(),image:U.object({sourceUri:U.string(),imageUri:U.string(),title:U.string().nullish(),domain:U.string().nullish()}).nullish(),retrievedContext:U.object({uri:U.string().nullish(),title:U.string().nullish(),text:U.string().nullish(),fileSearchStore:U.string().nullish()}).nullish(),maps:U.object({uri:U.string().nullish(),title:U.string().nullish(),text:U.string().nullish(),placeId:U.string().nullish()}).nullish()})).nullish(),groundingSupports:U.array(U.object({segment:U.object({startIndex:U.number().nullish(),endIndex:U.number().nullish(),text:U.string().nullish()}).nullish(),segment_text:U.string().nullish(),groundingChunkIndices:U.array(U.number()).nullish(),supportChunkIndices:U.array(U.number()).nullish(),confidenceScores:U.array(U.number()).nullish(),confidenceScore:U.array(U.number()).nullish()})).nullish(),retrievalMetadata:U.union([U.object({webDynamicRetrievalScore:U.number()}),U.object({})]).nullish()}),IX4=()=>U.object({parts:U.array(U.union([U.object({functionCall:U.object({name:U.string(),args:U.unknown()}),thoughtSignature:U.string().nullish()}),U.object({inlineData:U.object({mimeType:U.string(),data:U.string()})}),U.object({executableCode:U.object({language:U.string(),code:U.string()}).nullish(),codeExecutionResult:U.object({outcome:U.string(),output:U.string()}).nullish(),text:U.string().nullish(),thought:U.boolean().nullish(),thoughtSignature:U.string().nullish()})])).nullish()}),O50=()=>U.object({category:U.string().nullish(),probability:U.string().nullish(),probabilityScore:U.number().nullish(),severity:U.string().nullish(),severityScore:U.number().nullish(),blocked:U.boolean().nullish()}),GX4,PX4,wX4=()=>U.object({urlMetadata:U.array(U.object({retrievedUrl:U.string(),urlRetrievalStatus:U.string()}))}),ha8,fa8,ga8,ma8,ua8,pa8,da8,ca8,la8,ia8,na8,ra8,aa8,sa8,oa8=class{constructor($,Y,X){this.modelId=$,this.settings=Y,this.config=X,this.specificationVersion="v2"}get maxImagesPerCall(){var $;return($=this.settings.maxImagesPerCall)!=null?$:4}get provider(){return this.config.provider}async doGenerate($){var Y,X,G;let{prompt:J,n:Q=1,size:W="1024x1024",aspectRatio:Z="1:1",seed:K,providerOptions:H,headers:z,abortSignal:V}=$,A=[];if(W!=null)A.push({type:"unsupported-setting",setting:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});if(K!=null)A.push({type:"unsupported-setting",setting:"seed",details:"This model does not support the `seed` option through this provider."});let F=await _9({provider:"google",providerOptions:H,schema:ea8}),N=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,D={sampleCount:Q};if(Z!=null)D.aspectRatio=Z;if(F)Object.assign(D,F);let L={instances:[{prompt:J}],parameters:D},{responseHeaders:B,value:O}=await G8({url:`${this.config.baseURL}/models/${this.modelId}:predict`,headers:o6(await Jj(this.config.headers),z),body:L,failedResponseHandler:_m,successfulResponseHandler:C5(ta8),abortSignal:V,fetch:this.config.fetch});return{images:O.predictions.map((E)=>E.bytesBase64Encoded),warnings:A!=null?A:[],providerMetadata:{google:{images:O.predictions.map((E)=>({}))}},response:{timestamp:N,modelId:this.modelId,headers:B}}}},ta8,ea8,db0,mU,Ys8,Xs8,Gs8,Qs8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,tools:z,toolChoice:V,providerOptions:A}){var F,N,D,L;let B=[],O=(F=await _9({provider:"openai",providerOptions:A,schema:Gs8}))!=null?F:{},E=(N=O.structuredOutputs)!=null?N:!0,M=jX4(this.modelId);if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if((K==null?void 0:K.type)==="json"&&K.schema!=null&&!E)B.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{messages:R,warnings:q}=$s8({prompt:$,systemMessageMode:M.systemMessageMode});B.push(...q);let w=(D=O.strictJsonSchema)!=null?D:!1,I={model:this.modelId,logit_bias:O.logitBias,logprobs:O.logprobs===!0||typeof O.logprobs==="number"?!0:void 0,top_logprobs:typeof O.logprobs==="number"?O.logprobs:typeof O.logprobs==="boolean"?O.logprobs?0:void 0:void 0,user:O.user,parallel_tool_calls:O.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(K==null?void 0:K.type)==="json"?E&&K.schema!=null?{type:"json_schema",json_schema:{schema:K.schema,strict:w,name:(L=K.name)!=null?L:"response",description:K.description}}:{type:"json_object"}:void 0,stop:Z,seed:H,verbosity:O.textVerbosity,max_completion_tokens:O.maxCompletionTokens,store:O.store,metadata:O.metadata,prediction:O.prediction,reasoning_effort:O.reasoningEffort,service_tier:O.serviceTier,prompt_cache_key:O.promptCacheKey,prompt_cache_retention:O.promptCacheRetention,safety_identifier:O.safetyIdentifier,messages:R};if(M.isReasoningModel){if(O.reasoningEffort!=="none"||!M.supportsNonReasoningParameters){if(I.temperature!=null)I.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"});if(I.top_p!=null)I.top_p=void 0,B.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"});if(I.logprobs!=null)I.logprobs=void 0,B.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(I.frequency_penalty!=null)I.frequency_penalty=void 0,B.push({type:"unsupported-setting",setting:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(I.presence_penalty!=null)I.presence_penalty=void 0,B.push({type:"unsupported-setting",setting:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(I.logit_bias!=null)I.logit_bias=void 0,B.push({type:"other",message:"logitBias is not supported for reasoning models"});if(I.top_logprobs!=null)I.top_logprobs=void 0,B.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(I.max_tokens!=null){if(I.max_completion_tokens==null)I.max_completion_tokens=I.max_tokens;I.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(I.temperature!=null)I.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(O.serviceTier==="flex"&&!M.supportsFlexProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),I.service_tier=void 0;if(O.serviceTier==="priority"&&!M.supportsPriorityProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),I.service_tier=void 0;let{tools:P,toolChoice:_,toolWarnings:C}=Js8({tools:z,toolChoice:V,structuredOutputs:E,strictJsonSchema:w});return{args:{...I,tools:P,tool_choice:_},warnings:[...B,...C]}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N;let{args:D,warnings:L}=await this.getArgs($),{responseHeaders:B,value:O,rawValue:E}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:D,failedResponseHandler:mU,successfulResponseHandler:C5(Ys8),abortSignal:$.abortSignal,fetch:this.config.fetch}),M=O.choices[0],R=[],q=M.message.content;if(q!=null&&q.length>0)R.push({type:"text",text:q});for(let _ of(Y=M.message.tool_calls)!=null?Y:[])R.push({type:"tool-call",toolCallId:(X=_.id)!=null?X:w8(),toolName:_.function.name,input:_.function.arguments});for(let _ of(G=M.message.annotations)!=null?G:[])R.push({type:"source",sourceType:"url",id:w8(),url:_.url_citation.url,title:_.url_citation.title});let w=(J=O.usage)==null?void 0:J.completion_tokens_details,I=(Q=O.usage)==null?void 0:Q.prompt_tokens_details,P={openai:{}};if((w==null?void 0:w.accepted_prediction_tokens)!=null)P.openai.acceptedPredictionTokens=w==null?void 0:w.accepted_prediction_tokens;if((w==null?void 0:w.rejected_prediction_tokens)!=null)P.openai.rejectedPredictionTokens=w==null?void 0:w.rejected_prediction_tokens;if(((W=M.logprobs)==null?void 0:W.content)!=null)P.openai.logprobs=M.logprobs.content;return{content:R,finishReason:JX4(M.finish_reason),usage:{inputTokens:(K=(Z=O.usage)==null?void 0:Z.prompt_tokens)!=null?K:void 0,outputTokens:(z=(H=O.usage)==null?void 0:H.completion_tokens)!=null?z:void 0,totalTokens:(A=(V=O.usage)==null?void 0:V.total_tokens)!=null?A:void 0,reasoningTokens:(F=w==null?void 0:w.reasoning_tokens)!=null?F:void 0,cachedInputTokens:(N=I==null?void 0:I.cached_tokens)!=null?N:void 0},request:{body:D},response:{...gb0(O),headers:B,body:E},warnings:L,providerMetadata:P}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:mU,successfulResponseHandler:_Q(Xs8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],Z="unknown",K={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},H=!1,z=!1,V={openai:{}};return{stream:Q.pipeThrough(new TransformStream({start(A){A.enqueue({type:"stream-start",warnings:X})},transform(A,F){var N,D,L,B,O,E,M,R,q,w,I,P,_,C,k,S,T,v,x,y,d,u,b,g;if($.includeRawChunks)F.enqueue({type:"raw",rawValue:A.rawValue});if(!A.success){Z="error",F.enqueue({type:"error",error:A.error});return}let p=A.value;if("error"in p){Z="error",F.enqueue({type:"error",error:p.error});return}if(!H){let t=gb0(p);if(Object.values(t).some(Boolean))H=!0,F.enqueue({type:"response-metadata",...gb0(p)})}if(p.usage!=null){if(K.inputTokens=(N=p.usage.prompt_tokens)!=null?N:void 0,K.outputTokens=(D=p.usage.completion_tokens)!=null?D:void 0,K.totalTokens=(L=p.usage.total_tokens)!=null?L:void 0,K.reasoningTokens=(O=(B=p.usage.completion_tokens_details)==null?void 0:B.reasoning_tokens)!=null?O:void 0,K.cachedInputTokens=(M=(E=p.usage.prompt_tokens_details)==null?void 0:E.cached_tokens)!=null?M:void 0,((R=p.usage.completion_tokens_details)==null?void 0:R.accepted_prediction_tokens)!=null)V.openai.acceptedPredictionTokens=(q=p.usage.completion_tokens_details)==null?void 0:q.accepted_prediction_tokens;if(((w=p.usage.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens)!=null)V.openai.rejectedPredictionTokens=(I=p.usage.completion_tokens_details)==null?void 0:I.rejected_prediction_tokens}let h=p.choices[0];if((h==null?void 0:h.finish_reason)!=null)Z=JX4(h.finish_reason);if(((P=h==null?void 0:h.logprobs)==null?void 0:P.content)!=null)V.openai.logprobs=h.logprobs.content;if((h==null?void 0:h.delta)==null)return;let n=h.delta;if(n.content!=null){if(!z)F.enqueue({type:"text-start",id:"0"}),z=!0;F.enqueue({type:"text-delta",id:"0",delta:n.content})}if(n.tool_calls!=null)for(let t of n.tool_calls){let s=t.index;if(W[s]==null){if(t.type!=null&&t.type!=="function")throw new oZ({data:t,message:"Expected 'function' type."});if(t.id==null)throw new oZ({data:t,message:"Expected 'id' to be a string."});if(((_=t.function)==null?void 0:_.name)==null)throw new oZ({data:t,message:"Expected 'function.name' to be a string."});F.enqueue({type:"tool-input-start",id:t.id,toolName:t.function.name}),W[s]={id:t.id,type:"function",function:{name:t.function.name,arguments:(C=t.function.arguments)!=null?C:""},hasFinished:!1};let X0=W[s];if(((k=X0.function)==null?void 0:k.name)!=null&&((S=X0.function)==null?void 0:S.arguments)!=null){if(X0.function.arguments.length>0)F.enqueue({type:"tool-input-delta",id:X0.id,delta:X0.function.arguments});if(nK(X0.function.arguments))F.enqueue({type:"tool-input-end",id:X0.id}),F.enqueue({type:"tool-call",toolCallId:(T=X0.id)!=null?T:w8(),toolName:X0.function.name,input:X0.function.arguments}),X0.hasFinished=!0}continue}let Z0=W[s];if(Z0.hasFinished)continue;if(((v=t.function)==null?void 0:v.arguments)!=null)Z0.function.arguments+=(y=(x=t.function)==null?void 0:x.arguments)!=null?y:"";if(F.enqueue({type:"tool-input-delta",id:Z0.id,delta:(d=t.function.arguments)!=null?d:""}),((u=Z0.function)==null?void 0:u.name)!=null&&((b=Z0.function)==null?void 0:b.arguments)!=null&&nK(Z0.function.arguments))F.enqueue({type:"tool-input-end",id:Z0.id}),F.enqueue({type:"tool-call",toolCallId:(g=Z0.id)!=null?g:w8(),toolName:Z0.function.name,input:Z0.function.arguments}),Z0.hasFinished=!0}if(n.annotations!=null)for(let t of n.annotations)F.enqueue({type:"source",sourceType:"url",id:w8(),url:t.url_citation.url,title:t.url_citation.title})},flush(A){if(z)A.enqueue({type:"text-end",id:"0"});A.enqueue({type:"finish",finishReason:Z,usage:K,...V!=null?{providerMetadata:V}:{}})}})),request:{body:G},response:{headers:J}}}},Zs8,Ks8,ZX4,Us8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={},this.modelId=$,this.config=Y}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,tools:H,toolChoice:z,seed:V,providerOptions:A}){let F=[],N={...await _9({provider:"openai",providerOptions:A,schema:ZX4}),...await _9({provider:this.providerOptionsName,providerOptions:A,schema:ZX4})};if(J!=null)F.push({type:"unsupported-setting",setting:"topK"});if(H==null?void 0:H.length)F.push({type:"unsupported-setting",setting:"tools"});if(z!=null)F.push({type:"unsupported-setting",setting:"toolChoice"});if(K!=null&&K.type!=="text")F.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format is not supported."});let{prompt:D,stopSequences:L}=Ws8({prompt:$}),B=[...L!=null?L:[],...Z!=null?Z:[]];return{args:{model:this.modelId,echo:N.echo,logit_bias:N.logitBias,logprobs:(N==null?void 0:N.logprobs)===!0?0:(N==null?void 0:N.logprobs)===!1?void 0:N==null?void 0:N.logprobs,suffix:N.suffix,user:N.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:V,prompt:D,stop:B.length>0?B:void 0},warnings:F}}async doGenerate($){var Y,X,G;let{args:J,warnings:Q}=await this.getArgs($),{responseHeaders:W,value:Z,rawValue:K}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:J,failedResponseHandler:mU,successfulResponseHandler:C5(Zs8),abortSignal:$.abortSignal,fetch:this.config.fetch}),H=Z.choices[0],z={openai:{}};if(H.logprobs!=null)z.openai.logprobs=H.logprobs;return{content:[{type:"text",text:H.text}],usage:{inputTokens:(Y=Z.usage)==null?void 0:Y.prompt_tokens,outputTokens:(X=Z.usage)==null?void 0:X.completion_tokens,totalTokens:(G=Z.usage)==null?void 0:G.total_tokens},finishReason:WX4(H.finish_reason),request:{body:J},response:{...QX4(Z),headers:W,body:K},providerMetadata:z,warnings:Q}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:mU,successfulResponseHandler:_Q(Ks8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W="unknown",Z={openai:{}},K={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},H=!0;return{stream:Q.pipeThrough(new TransformStream({start(z){z.enqueue({type:"stream-start",warnings:X})},transform(z,V){if($.includeRawChunks)V.enqueue({type:"raw",rawValue:z.rawValue});if(!z.success){W="error",V.enqueue({type:"error",error:z.error});return}let A=z.value;if("error"in A){W="error",V.enqueue({type:"error",error:A.error});return}if(H)H=!1,V.enqueue({type:"response-metadata",...QX4(A)}),V.enqueue({type:"text-start",id:"0"});if(A.usage!=null)K.inputTokens=A.usage.prompt_tokens,K.outputTokens=A.usage.completion_tokens,K.totalTokens=A.usage.total_tokens;let F=A.choices[0];if((F==null?void 0:F.finish_reason)!=null)W=WX4(F.finish_reason);if((F==null?void 0:F.logprobs)!=null)Z.openai.logprobs=F.logprobs;if((F==null?void 0:F.text)!=null&&F.text.length>0)V.enqueue({type:"text-delta",id:"0",delta:F.text})},flush(z){if(!H)z.enqueue({type:"text-end",id:"0"});z.enqueue({type:"finish",finishReason:W,providerMetadata:Z,usage:K})}})),request:{body:G},response:{headers:J}}}},Hs8,zs8,Vs8=class{constructor($,Y){this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;if($.length>this.maxEmbeddingsPerCall)throw new Vm({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=(J=await _9({provider:"openai",providerOptions:G,schema:Hs8}))!=null?J:{},{responseHeaders:W,value:Z,rawValue:K}=await G8({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:o6(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:Q.dimensions,user:Q.user},failedResponseHandler:mU,successfulResponseHandler:C5(zs8),abortSignal:X,fetch:this.config.fetch});return{embeddings:Z.data.map((H)=>H.embedding),usage:Z.usage?{tokens:Z.usage.prompt_tokens}:void 0,response:{headers:W,body:K}}}},As8,Fs8,Ds8,TX4,Ns8,Ls8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get maxImagesPerCall(){var $;return($=Fs8[this.modelId])!=null?$:1}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:Z}){var K,H,z,V;let A=[];if(G!=null)A.push({type:"unsupported-setting",setting:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(J!=null)A.push({type:"unsupported-setting",setting:"seed"});let F=(z=(H=(K=this.config._internal)==null?void 0:K.currentDate)==null?void 0:H.call(K))!=null?z:new Date,N=(V=await _9({provider:"openai",providerOptions:Q,schema:Ns8}))!=null?V:{},{value:D,responseHeaders:L}=await G8({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:o6(this.config.headers(),W),body:{model:this.modelId,prompt:$,n:Y,size:X,quality:N.quality,style:N.style,background:N.background,moderation:N.moderation,output_format:N.outputFormat,output_compression:N.outputCompression,user:N.user,...!Ds8.has(this.modelId)?{response_format:"b64_json"}:{}},failedResponseHandler:mU,successfulResponseHandler:C5(As8),abortSignal:Z,fetch:this.config.fetch});return{images:D.data.map((B)=>B.b64_json),warnings:A,response:{timestamp:F,modelId:this.modelId,headers:L},providerMetadata:{openai:{images:D.data.map((B,O)=>({...B.revised_prompt?{revisedPrompt:B.revised_prompt}:{},...D.created!=null?{created:D.created}:{},...D.size!=null?{size:D.size}:{},...D.quality!=null?{quality:D.quality}:{},...D.background!=null?{background:D.background}:{},...D.output_format!=null?{outputFormat:D.output_format}:{},...Bs8(D.usage,O,D.data.length)}))}}}}},Os8,Es8,Ms8,Rs8,qs8=($={})=>{return Rs8($)},CX4,SX4,Is8,Ps8,ws8,_s8,js8,Ts8,Cs8,Ss8=($={})=>{return Cs8($)},kX4,vX4,ks8,vs8,xs8,ys8,bs8,hs8=($={})=>bs8($),fs8,gs8,ms8,us8,ps8,cs8,ls8,is8,xX4=20,ns8,as8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({maxOutputTokens:$,temperature:Y,stopSequences:X,topP:G,topK:J,presencePenalty:Q,frequencyPenalty:W,seed:Z,prompt:K,providerOptions:H,tools:z,toolChoice:V,responseFormat:A}){var F,N,D,L;let B=[],O=jX4(this.modelId);if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if(Z!=null)B.push({type:"unsupported-setting",setting:"seed"});if(Q!=null)B.push({type:"unsupported-setting",setting:"presencePenalty"});if(W!=null)B.push({type:"unsupported-setting",setting:"frequencyPenalty"});if(X!=null)B.push({type:"unsupported-setting",setting:"stopSequences"});let E=await _9({provider:"openai",providerOptions:H,schema:ns8});if((E==null?void 0:E.conversation)&&(E==null?void 0:E.previousResponseId))B.push({type:"unsupported-setting",setting:"conversation",details:"conversation and previousResponseId cannot be used together"});let{input:M,warnings:R}=await ds8({prompt:K,systemMessageMode:O.systemMessageMode,fileIdPrefixes:this.config.fileIdPrefixes,store:(F=E==null?void 0:E.store)!=null?F:!0,hasLocalShellTool:P("openai.local_shell")});B.push(...R);let q=(N=E==null?void 0:E.strictJsonSchema)!=null?N:!1,w=E==null?void 0:E.include;function I(y){if(w==null)w=[y];else if(!w.includes(y))w=[...w,y]}function P(y){return(z==null?void 0:z.find((d)=>d.type==="provider-defined"&&d.id===y))!=null}let _=typeof(E==null?void 0:E.logprobs)==="number"?E==null?void 0:E.logprobs:(E==null?void 0:E.logprobs)===!0?xX4:void 0;if(_)I("message.output_text.logprobs");let C=(D=z==null?void 0:z.find((y)=>y.type==="provider-defined"&&(y.id==="openai.web_search"||y.id==="openai.web_search_preview")))==null?void 0:D.name;if(C)I("web_search_call.action.sources");if(P("openai.code_interpreter"))I("code_interpreter_call.outputs");let k=E==null?void 0:E.store;if(k===!1&&O.isReasoningModel)I("reasoning.encrypted_content");let S={model:this.modelId,input:M,temperature:Y,top_p:G,max_output_tokens:$,...((A==null?void 0:A.type)==="json"||(E==null?void 0:E.textVerbosity))&&{text:{...(A==null?void 0:A.type)==="json"&&{format:A.schema!=null?{type:"json_schema",strict:q,name:(L=A.name)!=null?L:"response",description:A.description,schema:A.schema}:{type:"json_object"}},...(E==null?void 0:E.textVerbosity)&&{verbosity:E.textVerbosity}}},conversation:E==null?void 0:E.conversation,max_tool_calls:E==null?void 0:E.maxToolCalls,metadata:E==null?void 0:E.metadata,parallel_tool_calls:E==null?void 0:E.parallelToolCalls,previous_response_id:E==null?void 0:E.previousResponseId,store:k,user:E==null?void 0:E.user,instructions:E==null?void 0:E.instructions,service_tier:E==null?void 0:E.serviceTier,include:w,prompt_cache_key:E==null?void 0:E.promptCacheKey,prompt_cache_retention:E==null?void 0:E.promptCacheRetention,safety_identifier:E==null?void 0:E.safetyIdentifier,top_logprobs:_,truncation:E==null?void 0:E.truncation,...O.isReasoningModel&&((E==null?void 0:E.reasoningEffort)!=null||(E==null?void 0:E.reasoningSummary)!=null)&&{reasoning:{...(E==null?void 0:E.reasoningEffort)!=null&&{effort:E.reasoningEffort},...(E==null?void 0:E.reasoningSummary)!=null&&{summary:E.reasoningSummary}}}};if(O.isReasoningModel){if(!((E==null?void 0:E.reasoningEffort)==="none"&&O.supportsNonReasoningParameters)){if(S.temperature!=null)S.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"});if(S.top_p!=null)S.top_p=void 0,B.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"})}}else{if((E==null?void 0:E.reasoningEffort)!=null)B.push({type:"unsupported-setting",setting:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if((E==null?void 0:E.reasoningSummary)!=null)B.push({type:"unsupported-setting",setting:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if((E==null?void 0:E.serviceTier)==="flex"&&!O.supportsFlexProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete S.service_tier;if((E==null?void 0:E.serviceTier)==="priority"&&!O.supportsPriorityProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete S.service_tier;let{tools:T,toolChoice:v,toolWarnings:x}=await rs8({tools:z,toolChoice:V,strictJsonSchema:q});return{webSearchToolName:C,args:{...S,tools:T,tool_choice:v},warnings:[...B,...x],store:k}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D,L,B,O,E,M,R,q,w,I,P,_,C,k;let{args:S,warnings:T,webSearchToolName:v}=await this.getArgs($),x=this.config.url({path:"/responses",modelId:this.modelId}),y=this.config.provider.replace(".responses",""),{responseHeaders:d,value:u,rawValue:b}=await G8({url:x,headers:o6(this.config.headers(),$.headers),body:S,failedResponseHandler:mU,successfulResponseHandler:C5(is8),abortSignal:$.abortSignal,fetch:this.config.fetch});if(u.error)throw new AY({message:u.error.message,url:x,requestBodyValues:S,statusCode:400,responseHeaders:d,responseBody:b,isRetryable:!1});let g=[],p=[],h=!1;for(let s of u.output)switch(s.type){case"reasoning":{if(s.summary.length===0)s.summary.push({type:"summary_text",text:""});for(let Z0 of s.summary)g.push({type:"reasoning",text:Z0.text,providerMetadata:{[y]:{itemId:s.id,reasoningEncryptedContent:(Y=s.encrypted_content)!=null?Y:null}}});break}case"image_generation_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"image_generation",input:"{}",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"image_generation",result:{result:s.result},providerExecuted:!0});break}case"local_shell_call":{g.push({type:"tool-call",toolCallId:s.call_id,toolName:"local_shell",input:JSON.stringify({action:s.action}),providerMetadata:{[y]:{itemId:s.id}}});break}case"message":{for(let Z0 of s.content){if(((G=(X=$.providerOptions)==null?void 0:X.openai)==null?void 0:G.logprobs)&&Z0.logprobs)p.push(Z0.logprobs);g.push({type:"text",text:Z0.text,providerMetadata:{[y]:{itemId:s.id,...s.phase!=null&&{phase:s.phase}}}});for(let X0 of Z0.annotations)if(X0.type==="url_citation")g.push({type:"source",sourceType:"url",id:(W=(Q=(J=this.config).generateId)==null?void 0:Q.call(J))!=null?W:w8(),url:X0.url,title:X0.title});else if(X0.type==="file_citation")g.push({type:"source",sourceType:"document",id:(H=(K=(Z=this.config).generateId)==null?void 0:K.call(Z))!=null?H:w8(),mediaType:"text/plain",title:(V=(z=X0.quote)!=null?z:X0.filename)!=null?V:"Document",filename:(A=X0.filename)!=null?A:X0.file_id,...X0.file_id?{providerMetadata:{[y]:{fileId:X0.file_id}}}:{}});else if(X0.type==="container_file_citation")g.push({type:"source",sourceType:"document",id:(D=(N=(F=this.config).generateId)==null?void 0:N.call(F))!=null?D:w8(),mediaType:"text/plain",title:(B=(L=X0.filename)!=null?L:X0.file_id)!=null?B:"Document",filename:(O=X0.filename)!=null?O:X0.file_id,providerMetadata:{[y]:{fileId:X0.file_id,containerId:X0.container_id,...X0.index!=null?{index:X0.index}:{}}}});else if(X0.type==="file_path")g.push({type:"source",sourceType:"document",id:(R=(M=(E=this.config).generateId)==null?void 0:M.call(E))!=null?R:w8(),mediaType:"application/octet-stream",title:X0.file_id,filename:X0.file_id,providerMetadata:{[y]:{fileId:X0.file_id,...X0.index!=null?{index:X0.index}:{}}}})}break}case"function_call":{h=!0,g.push({type:"tool-call",toolCallId:s.call_id,toolName:s.name,input:s.arguments,providerMetadata:{[y]:{itemId:s.id}}});break}case"web_search_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:v!=null?v:"web_search",input:JSON.stringify({}),providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:v!=null?v:"web_search",result:zX4(s.action),providerExecuted:!0});break}case"computer_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"computer_use",input:"",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:s.status||"completed"},providerExecuted:!0});break}case"file_search_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"file_search",input:"{}",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"file_search",result:{queries:s.queries,results:(w=(q=s.results)==null?void 0:q.map((Z0)=>({attributes:Z0.attributes,fileId:Z0.file_id,filename:Z0.filename,score:Z0.score,text:Z0.text})))!=null?w:null},providerExecuted:!0});break}case"code_interpreter_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"code_interpreter",input:JSON.stringify({code:s.code,containerId:s.container_id}),providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"code_interpreter",result:{outputs:s.outputs},providerExecuted:!0});break}}let n={[y]:{...u.id!=null?{responseId:u.id}:{}}};if(p.length>0)n[y].logprobs=p;if(typeof u.service_tier==="string")n[y].serviceTier=u.service_tier;let t=u.usage;return{content:g,finishReason:UX4({finishReason:(I=u.incomplete_details)==null?void 0:I.reason,hasFunctionCall:h}),usage:{inputTokens:t.input_tokens,outputTokens:t.output_tokens,totalTokens:t.input_tokens+t.output_tokens,reasoningTokens:(_=(P=t.output_tokens_details)==null?void 0:P.reasoning_tokens)!=null?_:void 0,cachedInputTokens:(k=(C=t.input_tokens_details)==null?void 0:C.cached_tokens)!=null?k:void 0},request:{body:S},response:{id:u.id,timestamp:new Date(u.created_at*1000),modelId:u.model,headers:d,body:b},providerMetadata:n,warnings:T}}async doStream($){let{args:Y,warnings:X,webSearchToolName:G,store:J}=await this.getArgs($),{responseHeaders:Q,value:W}=await G8({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:{...Y,stream:!0},failedResponseHandler:mU,successfulResponseHandler:_Q(ls8),abortSignal:$.abortSignal,fetch:this.config.fetch}),Z=this,K=this.config.provider.replace(".responses",""),H="unknown",z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},V=[],A=null,F={},N=[],D,L=!1,B={},O;return{stream:W.pipeThrough(new TransformStream({start(E){E.enqueue({type:"stream-start",warnings:X})},transform(E,M){var R,q,w,I,P,_,C,k,S,T,v,x,y,d,u,b,g,p,h,n,t,s,Z0,X0;if($.includeRawChunks)M.enqueue({type:"raw",rawValue:E.rawValue});if(!E.success){H="error",M.enqueue({type:"error",error:E.error});return}let a=E.value;if(HX4(a)){if(a.item.type==="function_call")F[a.output_index]={toolName:a.item.name,toolCallId:a.item.call_id},M.enqueue({type:"tool-input-start",id:a.item.call_id,toolName:a.item.name});else if(a.item.type==="web_search_call")F[a.output_index]={toolName:G!=null?G:"web_search",toolCallId:a.item.id},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:G!=null?G:"web_search",providerExecuted:!0}),M.enqueue({type:"tool-input-end",id:a.item.id}),M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:G!=null?G:"web_search",input:JSON.stringify({}),providerExecuted:!0});else if(a.item.type==="computer_call")F[a.output_index]={toolName:"computer_use",toolCallId:a.item.id},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:"computer_use",providerExecuted:!0});else if(a.item.type==="code_interpreter_call")F[a.output_index]={toolName:"code_interpreter",toolCallId:a.item.id,codeInterpreter:{containerId:a.item.container_id}},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:"code_interpreter",providerExecuted:!0}),M.enqueue({type:"tool-input-delta",id:a.item.id,delta:`{"containerId":"${a.item.container_id}","code":"`});else if(a.item.type==="file_search_call")M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"file_search",input:"{}",providerExecuted:!0});else if(a.item.type==="image_generation_call")M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"image_generation",input:"{}",providerExecuted:!0});else if(a.item.type==="message")N.splice(0,N.length),D=(R=a.item.phase)!=null?R:void 0,M.enqueue({type:"text-start",id:a.item.id,providerMetadata:{[K]:{itemId:a.item.id,...a.item.phase!=null&&{phase:a.item.phase}}}});else if(HX4(a)&&a.item.type==="reasoning")B[a.item.id]={encryptedContent:a.item.encrypted_content,summaryParts:{0:"active"}},M.enqueue({type:"reasoning-start",id:`${a.item.id}:0`,providerMetadata:{[K]:{itemId:a.item.id,reasoningEncryptedContent:(q=a.item.encrypted_content)!=null?q:null}}})}else if(os8(a)){if(a.item.type==="message"){let Q0=(w=a.item.phase)!=null?w:D;D=void 0,M.enqueue({type:"text-end",id:a.item.id,providerMetadata:{[K]:{itemId:a.item.id,...Q0!=null&&{phase:Q0},...N.length>0&&{annotations:N}}}})}else if(a.item.type==="function_call")F[a.output_index]=void 0,L=!0,M.enqueue({type:"tool-input-end",id:a.item.call_id}),M.enqueue({type:"tool-call",toolCallId:a.item.call_id,toolName:a.item.name,input:a.item.arguments,providerMetadata:{[K]:{itemId:a.item.id}}});else if(a.item.type==="web_search_call")F[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:G!=null?G:"web_search",result:zX4(a.item.action),providerExecuted:!0});else if(a.item.type==="computer_call")F[a.output_index]=void 0,M.enqueue({type:"tool-input-end",id:a.item.id}),M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:a.item.status||"completed"},providerExecuted:!0});else if(a.item.type==="file_search_call")F[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"file_search",result:{queries:a.item.queries,results:(P=(I=a.item.results)==null?void 0:I.map((Q0)=>({attributes:Q0.attributes,fileId:Q0.file_id,filename:Q0.filename,score:Q0.score,text:Q0.text})))!=null?P:null},providerExecuted:!0});else if(a.item.type==="code_interpreter_call")F[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"code_interpreter",result:{outputs:a.item.outputs},providerExecuted:!0});else if(a.item.type==="image_generation_call")M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"image_generation",result:{result:a.item.result},providerExecuted:!0});else if(a.item.type==="local_shell_call")F[a.output_index]=void 0,M.enqueue({type:"tool-call",toolCallId:a.item.call_id,toolName:"local_shell",input:JSON.stringify({action:{type:"exec",command:a.item.action.command,timeoutMs:a.item.action.timeout_ms,user:a.item.action.user,workingDirectory:a.item.action.working_directory,env:a.item.action.env}}),providerMetadata:{[K]:{itemId:a.item.id}}});else if(a.item.type==="reasoning"){let Q0=B[a.item.id],e=Object.entries(Q0.summaryParts).filter(([m,$0])=>$0==="active"||$0==="can-conclude").map(([m])=>m);for(let m of e)M.enqueue({type:"reasoning-end",id:`${a.item.id}:${m}`,providerMetadata:{[K]:{itemId:a.item.id,reasoningEncryptedContent:(_=a.item.encrypted_content)!=null?_:null}}});delete B[a.item.id]}}else if($o8(a)){let Q0=F[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:a.delta})}else if(Yo8(a)){let Q0=F[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:JSON.stringify(a.delta).slice(1,-1)})}else if(Xo8(a)){let Q0=F[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:'"}'}),M.enqueue({type:"tool-input-end",id:Q0.toolCallId}),M.enqueue({type:"tool-call",toolCallId:Q0.toolCallId,toolName:"code_interpreter",input:JSON.stringify({code:a.code,containerId:Q0.codeInterpreter.containerId}),providerExecuted:!0})}else if(es8(a))A=a.response.id,M.enqueue({type:"response-metadata",id:a.response.id,timestamp:new Date(a.response.created_at*1000),modelId:a.response.model});else if(ss8(a)){if(M.enqueue({type:"text-delta",id:a.item_id,delta:a.delta}),((k=(C=$.providerOptions)==null?void 0:C.openai)==null?void 0:k.logprobs)&&a.logprobs)V.push(a.logprobs)}else if(a.type==="response.reasoning_summary_part.added"){if(a.summary_index>0){let Q0=B[a.item_id];Q0.summaryParts[a.summary_index]="active";for(let e of Object.keys(Q0.summaryParts))if(Q0.summaryParts[e]==="can-conclude")M.enqueue({type:"reasoning-end",id:`${a.item_id}:${e}`,providerMetadata:{[K]:{itemId:a.item_id}}}),Q0.summaryParts[e]="concluded";M.enqueue({type:"reasoning-start",id:`${a.item_id}:${a.summary_index}`,providerMetadata:{[K]:{itemId:a.item_id,reasoningEncryptedContent:(T=(S=B[a.item_id])==null?void 0:S.encryptedContent)!=null?T:null}}})}}else if(a.type==="response.reasoning_summary_text.delta")M.enqueue({type:"reasoning-delta",id:`${a.item_id}:${a.summary_index}`,delta:a.delta,providerMetadata:{[K]:{itemId:a.item_id}}});else if(a.type==="response.reasoning_summary_part.done")if(J)M.enqueue({type:"reasoning-end",id:`${a.item_id}:${a.summary_index}`,providerMetadata:{[K]:{itemId:a.item_id}}}),B[a.item_id].summaryParts[a.summary_index]="concluded";else B[a.item_id].summaryParts[a.summary_index]="can-conclude";else if(ts8(a)){if(H=UX4({finishReason:(v=a.response.incomplete_details)==null?void 0:v.reason,hasFunctionCall:L}),z.inputTokens=a.response.usage.input_tokens,z.outputTokens=a.response.usage.output_tokens,z.totalTokens=a.response.usage.input_tokens+a.response.usage.output_tokens,z.reasoningTokens=(y=(x=a.response.usage.output_tokens_details)==null?void 0:x.reasoning_tokens)!=null?y:void 0,z.cachedInputTokens=(u=(d=a.response.usage.input_tokens_details)==null?void 0:d.cached_tokens)!=null?u:void 0,typeof a.response.service_tier==="string")O=a.response.service_tier}else if(Go8(a)){if(N.push(a.annotation),a.annotation.type==="url_citation")M.enqueue({type:"source",sourceType:"url",id:(p=(g=(b=Z.config).generateId)==null?void 0:g.call(b))!=null?p:w8(),url:a.annotation.url,title:a.annotation.title});else if(a.annotation.type==="file_citation")M.enqueue({type:"source",sourceType:"document",id:(t=(n=(h=Z.config).generateId)==null?void 0:n.call(h))!=null?t:w8(),mediaType:"text/plain",title:(Z0=(s=a.annotation.quote)!=null?s:a.annotation.filename)!=null?Z0:"Document",filename:(X0=a.annotation.filename)!=null?X0:a.annotation.file_id,...a.annotation.file_id?{providerMetadata:{[K]:{fileId:a.annotation.file_id}}}:{}})}else if(Jo8(a))M.enqueue({type:"error",error:a})},flush(E){let M={[K]:{responseId:A}};if(V.length>0)M[K].logprobs=V;if(O!==void 0)M[K].serviceTier=O;E.enqueue({type:"finish",finishReason:H,usage:z,providerMetadata:M})}})),request:{body:Y},response:{headers:Q}}}},Qo8,Wo8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get provider(){return this.config.provider}async getArgs({text:$,voice:Y="alloy",outputFormat:X="mp3",speed:G,instructions:J,language:Q,providerOptions:W}){let Z=[],K=await _9({provider:"openai",providerOptions:W,schema:Qo8}),H={model:this.modelId,input:$,voice:Y,response_format:"mp3",speed:G,instructions:J};if(X)if(["mp3","opus","aac","flac","wav","pcm"].includes(X))H.response_format=X;else Z.push({type:"unsupported-setting",setting:"outputFormat",details:`Unsupported output format: ${X}. Using mp3 instead.`});if(K){let z={};for(let V in z){let A=z[V];if(A!==void 0)H[V]=A}}if(Q)Z.push({type:"unsupported-setting",setting:"language",details:`OpenAI speech models do not support language selection. Language parameter "${Q}" was ignored.`});return{requestBody:H,warnings:Z}}async doGenerate($){var Y,X,G;let J=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{requestBody:Q,warnings:W}=await this.getArgs($),{value:Z,responseHeaders:K,rawValue:H}=await G8({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:Q,failedResponseHandler:mU,successfulResponseHandler:f90(),abortSignal:$.abortSignal,fetch:this.config.fetch});return{audio:Z,warnings:W,request:{body:JSON.stringify(Q)},response:{timestamp:J,modelId:this.modelId,headers:K,body:H}}}},Zo8,Ko8,VX4,Uo8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get provider(){return this.config.provider}async getArgs({audio:$,mediaType:Y,providerOptions:X}){let G=[],J=await _9({provider:"openai",providerOptions:X,schema:Ko8}),Q=new FormData,W=$ instanceof Uint8Array?new Blob([$]):new Blob([m90($)]);Q.append("model",this.modelId);let Z=x90(Y);if(Q.append("file",new File([W],"audio",{type:Y}),`audio.${Z}`),J){let K={include:J.include,language:J.language,prompt:J.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:J.temperature,timestamp_granularities:J.timestampGranularities};for(let[H,z]of Object.entries(K))if(z!=null)if(Array.isArray(z))for(let V of z)Q.append(`${H}[]`,String(V));else Q.append(H,String(z))}return{formData:Q,warnings:G}}async doGenerate($){var Y,X,G,J,Q,W,Z,K;let H=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{formData:z,warnings:V}=await this.getArgs($),{value:A,responseHeaders:F,rawValue:N}=await h90({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),formData:z,failedResponseHandler:mU,successfulResponseHandler:C5(Zo8),abortSignal:$.abortSignal,fetch:this.config.fetch}),D=A.language!=null&&A.language in VX4?VX4[A.language]:void 0;return{text:A.text,segments:(Z=(W=(J=A.segments)==null?void 0:J.map((L)=>({text:L.text,startSecond:L.start,endSecond:L.end})))!=null?W:(Q=A.words)==null?void 0:Q.map((L)=>({text:L.word,startSecond:L.start,endSecond:L.end})))!=null?Z:[],language:D,durationInSeconds:(K=A.duration)!=null?K:void 0,warnings:V,response:{timestamp:H,modelId:this.modelId,headers:F,body:N}}}},Ho8="2.0.106",jm=class{specificationVersion="v2";modelId;provider;maxEmbeddingsPerCall=2048;supportsParallelCalls=!0;providerModel;constructor($){let Y;if(typeof $==="string"){let X=$.split("/");if(X.length!==2)throw Error(`Invalid model string format: "${$}". Expected format: "provider/model"`);let[G,J]=X;Y={providerId:G,modelId:J}}else if("providerId"in $&&"modelId"in $)Y={providerId:$.providerId,modelId:$.modelId,url:$.url,apiKey:$.apiKey,headers:$.headers};else{let X=$.id.split("/");if(X.length!==2)throw Error(`Invalid model string format: "${$.id}". Expected format: "provider/model"`);let[G,J]=X;Y={providerId:G,modelId:J,url:$.url,apiKey:$.apiKey,headers:$.headers}}if(this.provider=Y.providerId,this.modelId=Y.modelId,Y.url){let X=Y.apiKey||"";this.providerModel=OD({name:Y.providerId,apiKey:X,baseURL:Y.url,headers:Y.headers}).textEmbeddingModel(Y.modelId)}else{let G=$3.getInstance().getProviderConfig(Y.providerId);if(!G)throw Error(`Unknown provider: ${Y.providerId}`);let J=Y.apiKey;if(!J){let Q=G.apiKeyEnvVar;if(Array.isArray(Q)){for(let W of Q)if(J=process.env[W],J)break}else J=process.env[Q]}if(!J){let Q=Array.isArray(G.apiKeyEnvVar)?G.apiKeyEnvVar.join(" or "):G.apiKeyEnvVar;throw Error(`API key not found for provider ${Y.providerId}. Set ${Q}`)}if(Y.providerId==="openai")this.providerModel=yX4({apiKey:J}).textEmbeddingModel(Y.modelId);else if(Y.providerId==="google")this.providerModel=_X4({apiKey:J}).textEmbedding(Y.modelId);else{if(!G.url)throw Error(`Provider ${Y.providerId} does not have a URL configured`);this.providerModel=OD({name:Y.providerId,apiKey:J,baseURL:G.url}).textEmbeddingModel(Y.modelId)}}if(this.providerModel.maxEmbeddingsPerCall!==void 0)this.maxEmbeddingsPerCall=this.providerModel.maxEmbeddingsPerCall;if(this.providerModel.supportsParallelCalls!==void 0)this.supportsParallelCalls=this.providerModel.supportsParallelCalls}async doEmbed($){let Y=await this.providerModel.doEmbed($),X=Y.warnings??[];return{...Y,warnings:X}}};var cb0=V0(()=>{Pb0();W50();H50();Lm();xb0();Ib0();EW();wF();O1();AX4=Symbol.for("@mastra/core.modelStreamTransport");pb0=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),gU=zJ({errorSchema:pb0,errorToMessage:($)=>$.error.message});on8=_8(()=>x1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}),index:U.number(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}))),tn8=_8(()=>x1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),type:U.literal("function").nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}).nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish(),index:U.number()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}),pb0]))),en8=_8(()=>x1(U.object({logitBias:U.record(U.coerce.number(),U.number()).optional(),logprobs:U.union([U.boolean(),U.number()]).optional(),parallelToolCalls:U.boolean().optional(),user:U.string().optional(),reasoningEffort:U.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:U.number().optional(),store:U.boolean().optional(),metadata:U.record(U.string().max(64),U.string().max(512)).optional(),prediction:U.record(U.string(),U.any()).optional(),structuredOutputs:U.boolean().optional(),serviceTier:U.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:U.boolean().optional(),textVerbosity:U.enum(["low","medium","high"]).optional(),promptCacheKey:U.string().optional(),promptCacheRetention:U.enum(["in_memory","24h"]).optional(),safetyIdentifier:U.string().optional()})));Gr8=_8(()=>x1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}))),Jr8=_8(()=>x1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}),pb0]))),pY4=_8(()=>x1(U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional(),logprobs:U.union([U.boolean(),U.number()]).optional()}))),Wr8=_8(()=>x1(U.object({dimensions:U.number().optional(),user:U.string().optional()}))),Zr8=_8(()=>x1(U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish()}))),Ur8=_8(()=>x1(U.object({created:U.number().nullish(),data:U.array(U.object({b64_json:U.string(),revised_prompt:U.string().nullish()})),background:U.string().nullish(),output_format:U.string().nullish(),size:U.string().nullish(),quality:U.string().nullish(),usage:U.object({input_tokens:U.number().nullish(),output_tokens:U.number().nullish(),total_tokens:U.number().nullish(),input_tokens_details:U.object({image_tokens:U.number().nullish(),text_tokens:U.number().nullish()}).nullish()}).nullish()}))),Hr8={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10,"gpt-image-2":10},zr8=new Set(["gpt-image-1","gpt-image-1-mini","gpt-image-1.5","gpt-image-2"]),DX4=U.object({quality:U.enum(["standard","hd","low","medium","high","auto"]).optional(),background:U.enum(["transparent","opaque","auto"]).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),user:U.string().optional()});_8(()=>x1(DX4));Vr8=_8(()=>x1(DX4.extend({style:U.enum(["vivid","natural"]).optional(),moderation:U.enum(["auto","low"]).optional()})));Dr8=_8(()=>x1(U.object({text:U.string(),language:U.string().nullish(),duration:U.number().nullish(),words:U.array(U.object({word:U.string(),start:U.number(),end:U.number()})).nullish(),segments:U.array(U.object({id:U.number(),seek:U.number(),start:U.number(),end:U.number(),text:U.string(),tokens:U.array(U.number()),temperature:U.number(),avg_logprob:U.number(),compression_ratio:U.number(),no_speech_prob:U.number()})).nullish()}))),Nr8=_8(()=>x1(U.object({include:U.array(U.string()).optional(),language:U.string().optional(),prompt:U.string().optional(),temperature:U.number().min(0).max(1).default(0).optional(),timestampGranularities:U.array(U.enum(["word","segment"])).default(["segment"]).optional()}))),dY4={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"},Br8=_8(()=>x1(U.object({instructions:U.string().nullish(),speed:U.number().min(0.25).max(4).default(1).nullish()}))),NX4=Y6(()=>x1(U.object({action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeoutMs:U.number().optional(),user:U.string().optional(),workingDirectory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}))),LX4=Y6(()=>x1(U.object({output:U.string()})));HJ({id:"openai.local_shell",name:"local_shell",inputSchema:NX4,outputSchema:LX4});Mr8=U.object({itemId:U.string().nullish(),reasoningEncryptedContent:U.string().nullish()});Rr8=_8(()=>x1(U.union([U.object({type:U.literal("response.output_text.delta"),item_id:U.string(),delta:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}),U.object({type:U.enum(["response.completed","response.incomplete"]),response:U.object({incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.created"),response:U.object({id:U.string(),created_at:U.number(),model:U.string(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.output_item.added"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("file_search_call"),id:U.string()}),U.object({type:U.literal("image_generation_call"),id:U.string()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),container_id:U.string(),code:U.string().nullable(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable(),status:U.string()})])}),U.object({type:U.literal("response.output_item.done"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),status:U.literal("completed")}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.literal("completed")})])}),U.object({type:U.literal("response.function_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.image_generation_call.partial_image"),item_id:U.string(),output_index:U.number(),partial_image_b64:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.done"),item_id:U.string(),output_index:U.number(),code:U.string()}),U.object({type:U.literal("response.output_text.annotation.added"),annotation:U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string().nullish(),index:U.number().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),quote:U.string().nullish()})])}),U.object({type:U.literal("response.reasoning_summary_part.added"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.reasoning_summary_text.delta"),item_id:U.string(),summary_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_summary_part.done"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("error"),sequence_number:U.number(),error:U.object({type:U.string(),code:U.string(),message:U.string(),param:U.string().nullish()})}),U.object({type:U.string()}).loose().transform(($)=>({type:"unknown_chunk",message:$.type}))]))),qr8=_8(()=>x1(U.object({id:U.string().optional(),created_at:U.number().optional(),error:U.object({message:U.string(),type:U.string(),param:U.string().nullish(),code:U.string()}).nullish(),model:U.string().optional(),output:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("message"),role:U.literal("assistant"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish(),content:U.array(U.object({type:U.literal("output_text"),text:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish(),annotations:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string().nullish(),index:U.number().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),quote:U.string().nullish()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),index:U.number().nullish()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number().nullish()})]))}))}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("function_call"),call_id:U.string(),name:U.string(),arguments:U.string(),id:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string().optional()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish(),summary:U.array(U.object({type:U.literal("summary_text"),text:U.string()}))})])).optional(),service_tier:U.string().nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).optional()}))),Ir8=_8(()=>x1(U.object({conversation:U.string().nullish(),include:U.array(U.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:U.string().nullish(),logprobs:U.union([U.boolean(),U.number().min(1).max(BX4)]).optional(),maxToolCalls:U.number().nullish(),metadata:U.any().nullish(),parallelToolCalls:U.boolean().nullish(),previousResponseId:U.string().nullish(),promptCacheKey:U.string().nullish(),promptCacheRetention:U.enum(["in_memory","24h"]).nullish(),reasoningEffort:U.string().nullish(),reasoningSummary:U.string().nullish(),safetyIdentifier:U.string().nullish(),serviceTier:U.enum(["auto","flex","priority","default"]).nullish(),store:U.boolean().nullish(),strictJsonSchema:U.boolean().nullish(),textVerbosity:U.enum(["low","medium","high"]).nullish(),truncation:U.enum(["auto","disabled"]).nullish(),user:U.string().nullish()}))),Pr8=Y6(()=>x1(U.object({code:U.string().nullish(),containerId:U.string()}))),wr8=Y6(()=>x1(U.object({outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullish()}))),_r8=Y6(()=>x1(U.object({container:U.union([U.string(),U.object({fileIds:U.array(U.string()).optional()})]).optional()}))),jr8=HJ({id:"openai.code_interpreter",name:"code_interpreter",inputSchema:Pr8,outputSchema:wr8}),OX4=U.object({key:U.string(),type:U.enum(["eq","ne","gt","gte","lt","lte","in","nin"]),value:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())])}),EX4=U.object({type:U.enum(["and","or"]),filters:U.array(U.union([OX4,U.lazy(()=>EX4)]))}),Cr8=Y6(()=>x1(U.object({vectorStoreIds:U.array(U.string()),maxNumResults:U.number().optional(),ranking:U.object({ranker:U.string().optional(),scoreThreshold:U.number().optional()}).optional(),filters:U.union([OX4,EX4]).optional()}))),Sr8=Y6(()=>x1(U.object({queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),fileId:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullable()}))),kr8=HJ({id:"openai.file_search",name:"file_search",inputSchema:U.object({}),outputSchema:Sr8}),vr8=Y6(()=>x1(U.object({externalWebAccess:U.boolean().optional(),filters:U.object({allowedDomains:U.array(U.string()).optional()}).optional(),searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),xr8=Y6(()=>x1(U.object({}))),yr8=Y6(()=>x1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).optional()})));HJ({id:"openai.web_search",name:"web_search",inputSchema:xr8,outputSchema:yr8});br8=Y6(()=>x1(U.object({searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),hr8=Y6(()=>x1(U.object({}))),fr8=Y6(()=>x1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional()}))),gr8=HJ({id:"openai.web_search_preview",name:"web_search_preview",inputSchema:hr8,outputSchema:fr8}),mr8=Y6(()=>x1(U.object({background:U.enum(["auto","opaque","transparent"]).optional(),inputFidelity:U.enum(["low","high"]).optional(),inputImageMask:U.object({fileId:U.string().optional(),imageUrl:U.string().optional()}).optional(),model:U.string().optional(),moderation:U.enum(["auto"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),partialImages:U.number().int().min(0).max(3).optional(),quality:U.enum(["auto","low","medium","high"]).optional(),size:U.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict())),ur8=Y6(()=>x1(U.object({}))),pr8=Y6(()=>x1(U.object({result:U.string()}))),dr8=HJ({id:"openai.image_generation",name:"image_generation",inputSchema:ur8,outputSchema:pr8});Xa8={codeInterpreter:Tr8,fileSearch:kr8,imageGeneration:cr8,webSearchPreview:gr8};MX4();Ja8=new Set(["response.completed","response.failed","response.incomplete","error"]);Va8=class extends MD{constructor($){super();this.config=$,this.validateConfig()}config;id="azure-openai";name="azure-openai";tokenCache=new U50;entraIdTokenRequests=new Map;validateConfig(){if(!this.config.resourceName)throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:"resourceName is required for Azure OpenAI gateway"});if(!this.config.apiKey&&this.config.authentication?.type!=="entraId")throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:"apiKey or Entra ID authentication is required for Azure OpenAI gateway"});if(this.config.authentication?.type==="entraId"&&!this.config.authentication.credential)throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:"credential is required for Azure OpenAI Entra ID authentication"});if(this.config.apiKey&&this.config.authentication?.type==="entraId")console.warn("[AzureOpenAIGateway] Both apiKey and Entra ID authentication provided. Using Entra ID authentication and ignoring apiKey.");if(this.config.useResponsesAPI&&this.config.useDeploymentBasedUrls===!0)throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:"useResponsesAPI: true cannot be combined with useDeploymentBasedUrls: true. Omit useDeploymentBasedUrls or set it to false."});if(this.config.useResponsesAPI&&this.config.apiVersion&&!["v1","preview"].includes(this.config.apiVersion))throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:'useResponsesAPI: true requires apiVersion: "v1" or apiVersion: "preview". Omit apiVersion to use "v1".'});if(this.config.useDeploymentBasedUrls===!1&&this.config.apiVersion&&!["v1","preview"].includes(this.config.apiVersion))throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:'useDeploymentBasedUrls: false requires apiVersion: "v1" or apiVersion: "preview". Omit apiVersion to use "v1".'});let $=this.config.deployments&&this.config.deployments.length>0,Y=this.config.management!==void 0;if($&&Y)console.warn("[AzureOpenAIGateway] Both deployments and management credentials provided. Using static deployments list and ignoring management API.");if(Y)this.getManagementCredentials(this.config.management)}async fetchProviders(){if(this.config.deployments&&this.config.deployments.length>0)return{"azure-openai":{apiKeyEnvVar:[],apiKeyHeader:"api-key",name:"Azure OpenAI",models:this.config.deployments,docUrl:"https://learn.microsoft.com/en-us/azure/ai-services/openai/",gateway:"azure-openai"}};if(!this.config.management)return{"azure-openai":{apiKeyEnvVar:[],apiKeyHeader:"api-key",name:"Azure OpenAI",models:[],docUrl:"https://learn.microsoft.com/en-us/azure/ai-services/openai/",gateway:"azure-openai"}};try{let $=this.getManagementCredentials(this.config.management),Y=await this.getAzureADToken({tenantId:$.tenantId,clientId:$.clientId,clientSecret:$.clientSecret}),X=await this.fetchDeployments(Y,{subscriptionId:$.subscriptionId,resourceGroup:$.resourceGroup,resourceName:this.config.resourceName});return{"azure-openai":{apiKeyEnvVar:[],apiKeyHeader:"api-key",name:"Azure OpenAI",models:X.map((G)=>G.name),docUrl:"https://learn.microsoft.com/en-us/azure/ai-services/openai/",gateway:"azure-openai"}}}catch($){let Y=$ instanceof Error?$.message:String($);return console.warn(`[AzureOpenAIGateway] Deployment discovery failed: ${Y}`,`
Returning fallback configuration. Azure OpenAI can still be used by manually specifying deployment names.`),{"azure-openai":{apiKeyEnvVar:[],apiKeyHeader:"api-key",name:"Azure OpenAI",models:[],docUrl:"https://learn.microsoft.com/en-us/azure/ai-services/openai/",gateway:"azure-openai"}}}}getManagementCredentials($){let{tenantId:Y,clientId:X,clientSecret:G,subscriptionId:J,resourceGroup:Q}=$,W=[];if(!Y)W.push("tenantId");if(!X)W.push("clientId");if(!G)W.push("clientSecret");if(!J)W.push("subscriptionId");if(!Q)W.push("resourceGroup");if(W.length>0)throw new G0({id:"AZURE_MANAGEMENT_CREDENTIALS_MISSING",domain:"LLM",category:"UNKNOWN",text:`Management credentials incomplete. Missing: ${W.join(", ")}. Required fields: tenantId, clientId, clientSecret, subscriptionId, resourceGroup.`});return{tenantId:Y,clientId:X,clientSecret:G,subscriptionId:J,resourceGroup:Q}}async getAzureADToken($){let{tenantId:Y,clientId:X,clientSecret:G}=$,J=`azure-mgmt-token:${Y}:${X}`,Q=await this.tokenCache.get(J);if(Q&&Q.expiresAt>Date.now()/1000+60)return Q.token;let W=`https://login.microsoftonline.com/${Y}/oauth2/v2.0/token`,Z=new URLSearchParams({grant_type:"client_credentials",client_id:X,client_secret:G,scope:"https://management.azure.com/.default"}),K=await fetch(W,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:Z.toString()});if(!K.ok){let V=await K.text();throw new G0({id:"AZURE_AD_TOKEN_ERROR",domain:"LLM",category:"UNKNOWN",text:`Failed to get Azure AD token: ${K.status} ${V}`})}let H=await K.json(),z=Math.floor(Date.now()/1000)+H.expires_in;return await this.tokenCache.set(J,{token:H.access_token,expiresAt:z}),H.access_token}async fetchDeployments($,Y){let{subscriptionId:X,resourceGroup:G,resourceName:J}=Y,Q=`https://management.azure.com/subscriptions/${X}/resourceGroups/${G}/providers/Microsoft.CognitiveServices/accounts/${J}/deployments?api-version=2024-10-01`,W=[];while(Q){let K=await fetch(Q,{headers:{Authorization:`Bearer ${$}`,"Content-Type":"application/json"}});if(!K.ok){let z=await K.text();throw new G0({id:"AZURE_DEPLOYMENTS_FETCH_ERROR",domain:"LLM",category:"UNKNOWN",text:`Failed to fetch Azure deployments: ${K.status} ${z}`})}let H=await K.json();W.push(...H.value),Q=H.nextLink}return W.filter((K)=>K.properties.provisioningState==="Succeeded")}buildUrl($,Y){return}async getApiKey($){return this.config.authentication?.type==="entraId"?"":this.config.apiKey??""}async getEntraIdToken(){if(this.config.authentication?.type!=="entraId")throw new G0({id:"AZURE_ENTRA_ID_AUTH_NOT_CONFIGURED",domain:"LLM",category:"UNKNOWN",text:"Entra ID authentication is not configured for Azure OpenAI gateway"});let $=this.config.authentication.scope??"https://cognitiveservices.azure.com/.default",Y=`azure-openai-token:${$}`,X=await this.tokenCache.get(Y);if(X&&X.expiresAt>Date.now()/1000+60)return X.token;let G=this.entraIdTokenRequests.get(Y);if(!G)G=this.fetchEntraIdToken($,Y),this.entraIdTokenRequests.set(Y,G);try{return(await G).token}finally{this.entraIdTokenRequests.delete(Y)}}async fetchEntraIdToken($,Y){if(this.config.authentication?.type!=="entraId")throw new G0({id:"AZURE_ENTRA_ID_AUTH_NOT_CONFIGURED",domain:"LLM",category:"UNKNOWN",text:"Entra ID authentication is not configured for Azure OpenAI gateway"});let X=await this.config.authentication.credential.getToken($);if(!X?.token)throw new G0({id:"AZURE_ENTRA_ID_TOKEN_ERROR",domain:"LLM",category:"UNKNOWN",text:"Failed to get Entra ID token for Azure OpenAI gateway"});let G={token:X.token,expiresAt:X.expiresOnTimestamp?Math.floor(X.expiresOnTimestamp/1000):Math.floor(Date.now()/1000)+300};return await this.tokenCache.set(Y,G),G}createEntraIdFetch($=fetch){return async(Y,X)=>{let G=await this.getEntraIdToken(),J=new Headers(X?.headers);return J.delete("api-key"),J.set("Authorization",`Bearer ${G}`),$(Y,{...X,headers:J})}}createAzureResponsesWebSocketFetch({useEntraId:$,responsesWebSocket:Y}){let X=RX4({url:Y?.url??`wss://${this.config.resourceName}.openai.azure.com/openai/v1/responses`,headers:Y?.headers,apiKeyQueryParam:$?!1:"api-key",betaHeader:!1});return $?Object.assign(this.createEntraIdFetch(X),{close:X.close}):X}async resolveLanguageModel({modelId:$,apiKey:Y,headers:X,transport:G,responsesWebSocket:J}){let Q=this.config.useResponsesAPI??!1,W=this.config.apiVersion||(Q||this.config.useDeploymentBasedUrls===!1?"v1":"2024-04-01-preview"),Z=this.config.useDeploymentBasedUrls??(Q?!1:!0),K=this.config.authentication?.type==="entraId",z=Q&&G==="websocket"?this.createAzureResponsesWebSocketFetch({useEntraId:K,responsesWebSocket:J}):void 0,V={resourceName:this.config.resourceName,apiKey:K?"":Y,apiVersion:W,useDeploymentBasedUrls:Z,headers:{"User-Agent":hU,...X},...z&&!K?{fetch:z}:{}},A=MX4(K?{...V,fetch:z??this.createEntraIdFetch()}:V);if(Q){let F=za8(A.responses($));if(z)Object.defineProperty(F,$b0,{configurable:!0,value:{type:"openai-websocket",close:z.close}});return F}return A($)}};Fa8=new Set(["openai"]);mb0=[new Uj,new Pm,new Kj(Ba8("models.dev"))],IE=class ${specificationVersion="v2";defaultObjectGenerationMode="json";supportsStructuredOutputs=!0;supportsImageUrls=!0;supportedUrls;modelId;provider;gatewayId;config;gateway;_supportedUrlsPromise=null;instanceGatewayCache=oY4();#$;constructor(Y,X){let G;if(typeof Y==="string")G={id:Y};else if("providerId"in Y&&"modelId"in Y)G={id:`${Y.providerId}/${Y.modelId}`,url:Y.url,apiKey:Y.apiKey,headers:Y.headers};else G={id:Y.id,url:Y.url,apiKey:Y.apiKey,headers:Y.headers};let J={...G,routerId:G.id},Q=X?.length?[...X,...mb0.filter((H)=>!X.some((z)=>z.id===H.id))]:mb0;this.gateway=Aa8(G.id,Q),this.gatewayId=this.gateway.id;let W=this.gateway.id==="models.dev"?void 0:this.gateway.id,Z=Zj(G.id,W);if(this.provider=Z.providerId||"openai-compatible",Z.providerId&&Z.modelId!==G.id)J.id=Z.modelId;this.modelId=J.id,this.config=J;let K=this;this.supportedUrls={then(H,z){return K._resolveSupportedUrls().then(H,z)}}}async _resolveSupportedUrls(){if(this._supportedUrlsPromise)return this._supportedUrlsPromise;return this._supportedUrlsPromise=this._fetchSupportedUrls(),this._supportedUrlsPromise}async _fetchSupportedUrls(){let Y;try{if(this.config.url)Y=this.config.apiKey||"";else Y=this.config.apiKey||await this.gateway.getApiKey(this.config.routerId)}catch{return{}}try{let X=this.gateway.id==="models.dev"?void 0:this.gateway.id,J=(await this.resolveLanguageModel({apiKey:Y,headers:this.config.headers,...Zj(this.config.routerId,X)})).supportedUrls;if(!J)return{};if(typeof J.then==="function")return await J??{};return J??{}}catch{return{}}}_getStreamTransport(){return this.#$}serializeForSpan(){return{specificationVersion:this.specificationVersion,modelId:this.modelId,provider:this.provider,gatewayId:this.gatewayId}}getGatewayCache(){let Y=$.gatewayCaches.get(this.gateway);if(!Y)Y=oY4(),$.gatewayCaches.set(this.gateway,Y);return Y}setStreamTransportHandle({resolvedTransport:Y,transport:X,responsesWebSocket:G}){if(Y!=="websocket"){this.#$=void 0;return}if(!X){this.#$=void 0;return}this.#$={type:X.type,close:X.close,closeOnFinish:G?.closeOnFinish??!0}}setStreamTransportFromCache({cache:Y,resolvedTransport:X,key:G,responsesWebSocket:J}){let Q=Y.webSocketFetches.get(G),W=Y.gatewayStreamTransports.get(G),Z=Q?{type:"openai-websocket",close:()=>Q.close()}:W;this.setStreamTransportHandle({resolvedTransport:X,transport:Z,responsesWebSocket:J})}async doGenerate(Y){let X;try{if(this.config.url)X=this.config.apiKey||"";else X=this.config.apiKey||await this.gateway.getApiKey(this.config.routerId)}catch(W){return{stream:new ReadableStream({start(Z){Z.enqueue({type:"error",error:W}),Z.close()}})}}let G=this.gateway.id==="models.dev"?void 0:this.gateway.id,J=await this.resolveLanguageModel({apiKey:X,headers:this.config.headers,...Zj(this.config.routerId,G)});if(sY4(J))return new L50(J).doGenerate(Y);return new zj(J).doGenerate(Y)}async doStream(Y){let X;try{if(this.config.url)X=this.config.apiKey||"";else X=this.config.apiKey||await this.gateway.getApiKey(this.config.routerId)}catch(N){return{stream:new ReadableStream({start(D){D.enqueue({type:"error",error:N}),D.close()}})}}let G=this.gateway.id==="models.dev"?void 0:this.gateway.id,J=Zj(this.config.routerId,G),{transport:Q,websocket:W}=Na8(Y.providerOptions,J.providerId),H=(Q==="auto"?"websocket":Q)==="websocket"&&!this.config.url&&(this.gateway.id==="models.dev"&&Fa8.has(this.provider)||this.gateway.id==="azure-openai")?"websocket":"fetch",z=await this.resolveLanguageModel({apiKey:X,headers:this.config.headers,transport:H,responsesWebSocket:W,...J}),V=this.#$;if(sY4(z)){let D=await new L50(z).doStream(Y);return N50(D,V),D}let F=await new zj(z).doStream(Y);return N50(F,V),F}async resolveLanguageModel({modelId:Y,providerId:X,apiKey:G,headers:J,transport:Q,responsesWebSocket:W}){let Z=Q??"fetch",K=Z==="websocket"?`${W?.url??""}:${tY4(W?.headers)}`:"",z=this.config.apiKey!==void 0?this.instanceGatewayCache:this.getGatewayCache(),V=an8("sha256").update(JSON.stringify([this.gateway.id,Y,X,this.config.url||"",tY4(J),Z,K])).digest("hex");if(z.modelInstances.has(V))return this.setStreamTransportFromCache({cache:z,resolvedTransport:Z,key:V,responsesWebSocket:W}),z.modelInstances.get(V);if(this.config.url){let N=OD({name:X,apiKey:G,baseURL:this.config.url,headers:this.config.headers,supportsStructuredOutputs:!0}).chatModel(Y);return z.modelInstances.set(V,N),this.setStreamTransportHandle({resolvedTransport:Z,responsesWebSocket:W}),N}if(Z==="websocket"&&X==="openai"&&this.gateway.id==="models.dev"){let N=await this.gateway.buildUrl(this.config.routerId,process.env);if(La8(N)){let{modelInstance:D,wsFetch:L}=this.resolveOpenAIWebSocketModel({modelId:Y,apiKey:G,baseURL:N,headers:J,responsesWebSocket:W});return z.modelInstances.set(V,D),z.webSocketFetches.set(V,L),this.setStreamTransportFromCache({cache:z,resolvedTransport:Z,key:V,responsesWebSocket:W}),D}}let A=await this.gateway.resolveLanguageModel({modelId:Y,providerId:X,apiKey:G,headers:J,transport:Z,responsesWebSocket:W}),F=Oa8(A);if(z.modelInstances.set(V,A),F)z.gatewayStreamTransports.set(V,F);return this.setStreamTransportHandle({resolvedTransport:Z,transport:F,responsesWebSocket:W}),A}resolveOpenAIWebSocketModel({modelId:Y,apiKey:X,baseURL:G,headers:J,responsesWebSocket:Q}){let W=RX4({url:Q?.url,headers:Q?.headers});return{modelInstance:ED({apiKey:X,baseURL:G,headers:J,fetch:W}).responses(Y),wsFetch:W}}static _clearCachesForTests(){$.gatewayCaches=new WeakMap}static gatewayCaches=new WeakMap};Ra8=Y6(()=>x1(U.object({error:U.object({code:U.number().nullable(),message:U.string(),status:U.string()})}))),_m=zJ({errorSchema:Ra8,errorToMessage:($)=>$.error.message}),qa8=U.union([U.object({text:U.string()}),U.object({inlineData:U.object({mimeType:U.string(),data:U.string()})})]),Ia8=Y6(()=>x1(U.object({outputDimensionality:U.number().optional(),taskType:U.enum(["SEMANTIC_SIMILARITY","CLASSIFICATION","CLUSTERING","RETRIEVAL_DOCUMENT","RETRIEVAL_QUERY","QUESTION_ANSWERING","FACT_VERIFICATION","CODE_RETRIEVAL_QUERY"]).optional(),content:U.array(U.array(qa8).min(1).nullable()).optional()}))),wa8=Y6(()=>x1(U.object({embeddings:U.array(U.object({values:U.array(U.number())}))}))),_a8=Y6(()=>x1(U.object({embedding:U.object({values:U.array(U.number())})})));ka8=Y6(()=>x1(U.object({responseModalities:U.array(U.enum(["TEXT","IMAGE"])).optional(),thinkingConfig:U.object({thinkingBudget:U.number().optional(),includeThoughts:U.boolean().optional(),thinkingLevel:U.enum(["minimal","low","medium","high"]).optional()}).optional(),cachedContent:U.string().optional(),structuredOutputs:U.boolean().optional(),safetySettings:U.array(U.object({category:U.enum(["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_CIVIC_INTEGRITY"]),threshold:U.enum(["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"])})).optional(),threshold:U.enum(["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"]).optional(),audioTimestamp:U.boolean().optional(),labels:U.record(U.string(),U.string()).optional(),mediaResolution:U.enum(["MEDIA_RESOLUTION_UNSPECIFIED","MEDIA_RESOLUTION_LOW","MEDIA_RESOLUTION_MEDIUM","MEDIA_RESOLUTION_HIGH"]).optional(),imageConfig:U.object({aspectRatio:U.enum(["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9","1:8","8:1","1:4","4:1"]).optional(),imageSize:U.enum(["1K","2K","4K","512"]).optional()}).optional(),retrievalConfig:U.object({latLng:U.object({latitude:U.number(),longitude:U.number()}).optional()}).optional(),serviceTier:U.enum(["standard","flex","priority"]).optional()}))),va8={standard:"SERVICE_TIER_STANDARD",flex:"SERVICE_TIER_FLEX",priority:"SERVICE_TIER_PRIORITY"};GX4=U.array(U.object({modality:U.string(),tokenCount:U.number()})).nullish(),PX4=U.object({cachedContentTokenCount:U.number().nullish(),thoughtsTokenCount:U.number().nullish(),promptTokenCount:U.number().nullish(),candidatesTokenCount:U.number().nullish(),totalTokenCount:U.number().nullish(),trafficType:U.string().nullish(),promptTokensDetails:GX4,candidatesTokensDetails:GX4}),ha8=Y6(()=>x1(U.object({candidates:U.array(U.object({content:IX4().nullish().or(U.object({}).strict()),finishReason:U.string().nullish(),safetyRatings:U.array(O50()).nullish(),groundingMetadata:qX4().nullish(),urlContextMetadata:wX4().nullish()})),usageMetadata:PX4.nullish(),promptFeedback:U.object({blockReason:U.string().nullish(),safetyRatings:U.array(O50()).nullish()}).nullish(),serviceTier:U.string().nullish()}))),fa8=Y6(()=>x1(U.object({candidates:U.array(U.object({content:IX4().nullish(),finishReason:U.string().nullish(),safetyRatings:U.array(O50()).nullish(),groundingMetadata:qX4().nullish(),urlContextMetadata:wX4().nullish()})).nullish(),usageMetadata:PX4.nullish(),promptFeedback:U.object({blockReason:U.string().nullish(),safetyRatings:U.array(O50()).nullish()}).nullish(),serviceTier:U.string().nullish()}))),ga8=HJ({id:"google.code_execution",name:"code_execution",inputSchema:U.object({language:U.string().describe("The programming language of the code."),code:U.string().describe("The code to be executed.")}),outputSchema:U.object({outcome:U.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),output:U.string().describe("The output from the code execution.")})}),ma8=BD({id:"google.enterprise_web_search",name:"enterprise_web_search",inputSchema:Y6(()=>x1(U.object({})))}),ua8=U.object({fileSearchStoreNames:U.array(U.string()).describe("The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"),topK:U.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),metadataFilter:U.string().describe("Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression.").optional()}).passthrough(),pa8=Y6(()=>x1(ua8)),da8=BD({id:"google.file_search",name:"file_search",inputSchema:pa8}),ca8=BD({id:"google.google_maps",name:"google_maps",inputSchema:Y6(()=>x1(U.object({})))}),la8=U.object({searchTypes:U.object({webSearch:U.object({}).optional(),imageSearch:U.object({}).optional()}).optional(),timeRangeFilter:U.object({startTime:U.string(),endTime:U.string()}).optional()}).passthrough(),ia8=Y6(()=>x1(la8)),na8=BD({id:"google.google_search",name:"google_search",inputSchema:ia8}),ra8=BD({id:"google.url_context",name:"url_context",inputSchema:Y6(()=>x1(U.object({})))}),aa8=BD({id:"google.vertex_rag_store",name:"vertex_rag_store",inputSchema:U.object({ragCorpus:U.string(),topK:U.number().optional()})}),sa8={googleSearch:na8,enterpriseWebSearch:ma8,googleMaps:ca8,urlContext:ra8,fileSearch:da8,codeExecution:ga8,vertexRagStore:aa8},ta8=Y6(()=>x1(U.object({predictions:U.array(U.object({bytesBase64Encoded:U.string()})).default([])}))),ea8=Y6(()=>x1(U.object({personGeneration:U.enum(["dont_allow","allow_adult","allow_all"]).nullish(),aspectRatio:U.enum(["1:1","3:4","4:3","9:16","16:9"]).nullish()})));_X4();db0=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),mU=zJ({errorSchema:db0,errorToMessage:($)=>$.error.message});Ys8=_8(()=>x1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}),index:U.number(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}))),Xs8=_8(()=>x1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),type:U.literal("function").nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}).nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish(),index:U.number()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}),db0]))),Gs8=_8(()=>x1(U.object({logitBias:U.record(U.coerce.number(),U.number()).optional(),logprobs:U.union([U.boolean(),U.number()]).optional(),parallelToolCalls:U.boolean().optional(),user:U.string().optional(),reasoningEffort:U.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:U.number().optional(),store:U.boolean().optional(),metadata:U.record(U.string().max(64),U.string().max(512)).optional(),prediction:U.record(U.string(),U.any()).optional(),structuredOutputs:U.boolean().optional(),serviceTier:U.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:U.boolean().optional(),textVerbosity:U.enum(["low","medium","high"]).optional(),promptCacheKey:U.string().optional(),promptCacheRetention:U.enum(["in_memory","24h"]).optional(),safetyIdentifier:U.string().optional()})));Zs8=_8(()=>x1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}))),Ks8=_8(()=>x1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}),db0]))),ZX4=_8(()=>x1(U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional(),logprobs:U.union([U.boolean(),U.number()]).optional()}))),Hs8=_8(()=>x1(U.object({dimensions:U.number().optional(),user:U.string().optional()}))),zs8=_8(()=>x1(U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish()}))),As8=_8(()=>x1(U.object({created:U.number().nullish(),data:U.array(U.object({b64_json:U.string(),revised_prompt:U.string().nullish()})),background:U.string().nullish(),output_format:U.string().nullish(),size:U.string().nullish(),quality:U.string().nullish(),usage:U.object({input_tokens:U.number().nullish(),output_tokens:U.number().nullish(),total_tokens:U.number().nullish(),input_tokens_details:U.object({image_tokens:U.number().nullish(),text_tokens:U.number().nullish()}).nullish()}).nullish()}))),Fs8={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10,"gpt-image-2":10},Ds8=new Set(["gpt-image-1","gpt-image-1-mini","gpt-image-1.5","gpt-image-2"]),TX4=U.object({quality:U.enum(["standard","hd","low","medium","high","auto"]).optional(),background:U.enum(["transparent","opaque","auto"]).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),user:U.string().optional()});_8(()=>x1(TX4));Ns8=_8(()=>x1(TX4.extend({style:U.enum(["vivid","natural"]).optional(),moderation:U.enum(["auto","low"]).optional()})));Os8=Y6(()=>x1(U.object({code:U.string().nullish(),containerId:U.string()}))),Es8=Y6(()=>x1(U.object({outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullish()}))),Ms8=Y6(()=>x1(U.object({container:U.union([U.string(),U.object({fileIds:U.array(U.string()).optional()})]).optional()}))),Rs8=HJ({id:"openai.code_interpreter",name:"code_interpreter",inputSchema:Os8,outputSchema:Es8}),CX4=U.object({key:U.string(),type:U.enum(["eq","ne","gt","gte","lt","lte","in","nin"]),value:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())])}),SX4=U.object({type:U.enum(["and","or"]),filters:U.array(U.union([CX4,U.lazy(()=>SX4)]))}),Is8=Y6(()=>x1(U.object({vectorStoreIds:U.array(U.string()),maxNumResults:U.number().optional(),ranking:U.object({ranker:U.string().optional(),scoreThreshold:U.number().optional()}).optional(),filters:U.union([CX4,SX4]).optional()}))),Ps8=Y6(()=>x1(U.object({queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),fileId:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullable()}))),ws8=HJ({id:"openai.file_search",name:"file_search",inputSchema:U.object({}),outputSchema:Ps8}),_s8=Y6(()=>x1(U.object({background:U.enum(["auto","opaque","transparent"]).optional(),inputFidelity:U.enum(["low","high"]).optional(),inputImageMask:U.object({fileId:U.string().optional(),imageUrl:U.string().optional()}).optional(),model:U.string().optional(),moderation:U.enum(["auto"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),partialImages:U.number().int().min(0).max(3).optional(),quality:U.enum(["auto","low","medium","high"]).optional(),size:U.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict())),js8=Y6(()=>x1(U.object({}))),Ts8=Y6(()=>x1(U.object({result:U.string()}))),Cs8=HJ({id:"openai.image_generation",name:"image_generation",inputSchema:js8,outputSchema:Ts8}),kX4=Y6(()=>x1(U.object({action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeoutMs:U.number().optional(),user:U.string().optional(),workingDirectory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}))),vX4=Y6(()=>x1(U.object({output:U.string()}))),ks8=HJ({id:"openai.local_shell",name:"local_shell",inputSchema:kX4,outputSchema:vX4}),vs8=Y6(()=>x1(U.object({externalWebAccess:U.boolean().optional(),filters:U.object({allowedDomains:U.array(U.string()).optional()}).optional(),searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),xs8=Y6(()=>x1(U.object({}))),ys8=Y6(()=>x1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).optional()}))),bs8=HJ({id:"openai.web_search",name:"web_search",inputSchema:xs8,outputSchema:ys8}),fs8=Y6(()=>x1(U.object({searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),gs8=Y6(()=>x1(U.object({}))),ms8=Y6(()=>x1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional()}))),us8=HJ({id:"openai.web_search_preview",name:"web_search_preview",inputSchema:gs8,outputSchema:ms8}),ps8={codeInterpreter:qs8,fileSearch:ws8,imageGeneration:Ss8,localShell:ks8,webSearchPreview:us8,webSearch:hs8};cs8=U.object({itemId:U.string().nullish(),reasoningEncryptedContent:U.string().nullish()});ls8=_8(()=>x1(U.union([U.object({type:U.literal("response.output_text.delta"),item_id:U.string(),delta:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}),U.object({type:U.enum(["response.completed","response.incomplete"]),response:U.object({incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.created"),response:U.object({id:U.string(),created_at:U.number(),model:U.string(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.output_item.added"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("file_search_call"),id:U.string()}),U.object({type:U.literal("image_generation_call"),id:U.string()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),container_id:U.string(),code:U.string().nullable(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable(),status:U.string()})])}),U.object({type:U.literal("response.output_item.done"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),status:U.literal("completed")}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.literal("completed")})])}),U.object({type:U.literal("response.function_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.image_generation_call.partial_image"),item_id:U.string(),output_index:U.number(),partial_image_b64:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.done"),item_id:U.string(),output_index:U.number(),code:U.string()}),U.object({type:U.literal("response.output_text.annotation.added"),annotation:U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string().nullish(),index:U.number().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),quote:U.string().nullish()})])}),U.object({type:U.literal("response.reasoning_summary_part.added"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.reasoning_summary_text.delta"),item_id:U.string(),summary_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_summary_part.done"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("error"),sequence_number:U.number(),error:U.object({type:U.string(),code:U.string(),message:U.string(),param:U.string().nullish()})}),U.object({type:U.string()}).loose().transform(($)=>({type:"unknown_chunk",message:$.type}))]))),is8=_8(()=>x1(U.object({id:U.string().optional(),created_at:U.number().optional(),error:U.object({message:U.string(),type:U.string(),param:U.string().nullish(),code:U.string()}).nullish(),model:U.string().optional(),output:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("message"),role:U.literal("assistant"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish(),content:U.array(U.object({type:U.literal("output_text"),text:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish(),annotations:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string().nullish(),index:U.number().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),quote:U.string().nullish()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),index:U.number().nullish()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number().nullish()})]))}))}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("function_call"),call_id:U.string(),name:U.string(),arguments:U.string(),id:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string().optional()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish(),summary:U.array(U.object({type:U.literal("summary_text"),text:U.string()}))})])).optional(),service_tier:U.string().nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).optional()}))),ns8=_8(()=>x1(U.object({conversation:U.string().nullish(),include:U.array(U.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:U.string().nullish(),logprobs:U.union([U.boolean(),U.number().min(1).max(xX4)]).optional(),maxToolCalls:U.number().nullish(),metadata:U.any().nullish(),parallelToolCalls:U.boolean().nullish(),previousResponseId:U.string().nullish(),promptCacheKey:U.string().nullish(),promptCacheRetention:U.enum(["in_memory","24h"]).nullish(),reasoningEffort:U.string().nullish(),reasoningSummary:U.string().nullish(),safetyIdentifier:U.string().nullish(),serviceTier:U.enum(["auto","flex","priority","default"]).nullish(),store:U.boolean().nullish(),strictJsonSchema:U.boolean().nullish(),textVerbosity:U.enum(["low","medium","high"]).nullish(),truncation:U.enum(["auto","disabled"]).nullish(),user:U.string().nullish()})));Qo8=_8(()=>x1(U.object({instructions:U.string().nullish(),speed:U.number().min(0.25).max(4).default(1).nullish()}))),Zo8=_8(()=>x1(U.object({text:U.string(),language:U.string().nullish(),duration:U.number().nullish(),words:U.array(U.object({word:U.string(),start:U.number(),end:U.number()})).nullish(),segments:U.array(U.object({id:U.number(),seek:U.number(),start:U.number(),end:U.number(),text:U.string(),tokens:U.array(U.number()),temperature:U.number(),avg_logprob:U.number(),compression_ratio:U.number(),no_speech_prob:U.number()})).nullish()}))),Ko8=_8(()=>x1(U.object({include:U.array(U.string()).optional(),language:U.string().optional(),prompt:U.string().optional(),temperature:U.number().min(0).max(1).default(0).optional(),timestampGranularities:U.array(U.enum(["word","segment"])).default(["segment"]).optional()}))),VX4={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"};yX4()});async function wE(){return function($){let{exports:{mem:Y,xxh32:X,xxh64:G,init32:J,update32:Q,digest32:W,init64:Z,update64:K,digest64:H}}=$,z=new Uint8Array(Y.buffer);function V(R,q){if(Y.buffer.byteLength<R+q){let w=Math.ceil((R+q-Y.buffer.byteLength)/65536);Y.grow(w),z=new Uint8Array(Y.buffer)}}function A(R,q,w,I,P,_){V(R);let C=new Uint8Array(R);return z.set(C),w(0,q),C.set(z.subarray(0,R)),{update(k){let S;return z.set(C),typeof k=="string"?(V(3*k.length,R),S=L.encodeInto(k,z.subarray(R)).written):(V(k.byteLength,R),z.set(k,R),S=k.byteLength),I(0,R,S),C.set(z.subarray(0,R)),this},digest:()=>(z.set(C),_(P(0)))}}function F(R){return R>>>0}let N=2n**64n-1n;function D(R){return R&N}let L=new TextEncoder,B=0,O=0n;function E(R,q=B){return V(3*R.length,0),F(X(0,L.encodeInto(R,z).written,q))}function M(R,q=O){return V(3*R.length,0),D(G(0,L.encodeInto(R,z).written,q))}return{h32:E,h32ToString:(R,q=B)=>E(R,q).toString(16).padStart(8,"0"),h32Raw:(R,q=B)=>(V(R.byteLength,0),z.set(R),F(X(0,R.byteLength,q))),create32:(R=B)=>A(48,R,J,Q,W,F),h64:M,h64ToString:(R,q=O)=>M(R,q).toString(16).padStart(16,"0"),h64Raw:(R,q=O)=>(V(R.byteLength,0),z.set(R),D(G(0,R.byteLength,q))),create64:(R=O)=>A(88,R,Z,K,H,D)}}((await WebAssembly.instantiate(zo8)).instance)}var zo8;var E50=V0(()=>{zo8=new Uint8Array([0,97,115,109,1,0,0,0,1,48,8,96,3,127,127,127,1,127,96,3,127,127,127,0,96,2,127,127,0,96,1,127,1,127,96,3,127,127,126,1,126,96,3,126,127,127,1,126,96,2,127,126,0,96,1,127,1,126,3,11,10,0,0,2,1,3,4,5,6,1,7,5,3,1,0,1,7,85,9,3,109,101,109,2,0,5,120,120,104,51,50,0,0,6,105,110,105,116,51,50,0,2,8,117,112,100,97,116,101,51,50,0,3,8,100,105,103,101,115,116,51,50,0,4,5,120,120,104,54,52,0,5,6,105,110,105,116,54,52,0,7,8,117,112,100,97,116,101,54,52,0,8,8,100,105,103,101,115,116,54,52,0,9,10,251,22,10,242,1,1,4,127,32,0,32,1,106,33,3,32,1,65,16,79,4,127,32,3,65,16,107,33,6,32,2,65,168,136,141,161,2,106,33,3,32,2,65,137,235,208,208,7,107,33,4,32,2,65,207,140,162,142,6,106,33,5,3,64,32,3,32,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,4,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,2,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,5,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,6,32,0,65,4,106,34,0,79,13,0,11,32,2,65,12,119,32,5,65,18,119,106,32,4,65,7,119,106,32,3,65,1,119,106,5,32,2,65,177,207,217,178,1,106,11,32,1,106,32,0,32,1,65,15,113,16,1,11,146,1,0,32,1,32,2,106,33,2,3,64,32,1,65,4,106,32,2,75,69,4,64,32,0,32,1,40,2,0,65,189,220,202,149,124,108,106,65,17,119,65,175,214,211,190,2,108,33,0,32,1,65,4,106,33,1,12,1,11,11,3,64,32,1,32,2,79,69,4,64,32,0,32,1,45,0,0,65,177,207,217,178,1,108,106,65,11,119,65,177,243,221,241,121,108,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,65,15,118,115,65,247,148,175,175,120,108,34,0,65,13,118,32,0,115,65,189,220,202,149,124,108,34,0,65,16,118,32,0,115,11,63,0,32,0,65,8,106,32,1,65,168,136,141,161,2,106,54,2,0,32,0,65,12,106,32,1,65,137,235,208,208,7,107,54,2,0,32,0,65,16,106,32,1,54,2,0,32,0,65,20,106,32,1,65,207,140,162,142,6,106,54,2,0,11,195,4,1,6,127,32,1,32,2,106,33,6,32,0,65,24,106,33,4,32,0,65,40,106,40,2,0,33,3,32,0,32,0,40,2,0,32,2,106,54,2,0,32,0,65,4,106,34,5,32,5,40,2,0,32,2,65,16,79,32,0,40,2,0,65,16,79,114,114,54,2,0,32,2,32,3,106,65,16,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,40,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,16,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,40,2,0,32,4,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,12,106,34,3,32,3,40,2,0,32,4,65,4,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,16,106,34,3,32,3,40,2,0,32,4,65,8,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,20,106,34,3,32,3,40,2,0,32,4,65,12,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,40,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,32,6,65,16,107,77,4,64,32,6,65,16,107,33,8,32,0,65,8,106,40,2,0,33,2,32,0,65,12,106,40,2,0,33,3,32,0,65,16,106,40,2,0,33,5,32,0,65,20,106,40,2,0,33,7,3,64,32,2,32,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,3,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,5,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,7,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,7,32,8,32,1,65,4,106,34,1,79,13,0,11,32,0,65,8,106,32,2,54,2,0,32,0,65,12,106,32,3,54,2,0,32,0,65,16,106,32,5,54,2,0,32,0,65,20,106,32,7,54,2,0,11,32,1,32,6,73,4,64,32,4,32,1,32,6,32,1,107,34,1,252,10,0,0,32,0,65,40,106,32,1,54,2,0,11,11,97,1,1,127,32,0,65,16,106,40,2,0,33,1,32,0,65,4,106,40,2,0,4,127,32,1,65,12,119,32,0,65,20,106,40,2,0,65,18,119,106,32,0,65,12,106,40,2,0,65,7,119,106,32,0,65,8,106,40,2,0,65,1,119,106,5,32,1,65,177,207,217,178,1,106,11,32,0,40,2,0,106,32,0,65,24,106,32,0,65,40,106,40,2,0,16,1,11,255,3,2,3,126,1,127,32,0,32,1,106,33,6,32,1,65,32,79,4,126,32,6,65,32,107,33,6,32,2,66,214,235,130,238,234,253,137,245,224,0,124,33,3,32,2,66,177,169,172,193,173,184,212,166,61,125,33,4,32,2,66,249,234,208,208,231,201,161,228,225,0,124,33,5,3,64,32,3,32,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,3,32,4,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,4,32,2,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,5,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,5,32,6,32,0,65,8,106,34,0,79,13,0,11,32,2,66,12,137,32,5,66,18,137,124,32,4,66,7,137,124,32,3,66,1,137,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,2,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,2,66,197,207,217,178,241,229,186,234,39,124,11,32,1,173,124,32,0,32,1,65,31,113,16,6,11,134,2,0,32,1,32,2,106,33,2,3,64,32,2,32,1,65,8,106,79,4,64,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,32,0,133,66,27,137,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,33,0,32,1,65,8,106,33,1,12,1,11,11,32,1,65,4,106,32,2,77,4,64,32,0,32,1,53,2,0,66,135,149,175,175,152,182,222,155,158,127,126,133,66,23,137,66,207,214,211,190,210,199,171,217,66,126,66,249,243,221,241,153,246,153,171,22,124,33,0,32,1,65,4,106,33,1,11,3,64,32,1,32,2,73,4,64,32,0,32,1,49,0,0,66,197,207,217,178,241,229,186,234,39,126,133,66,11,137,66,135,149,175,175,152,182,222,155,158,127,126,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,66,33,136,133,66,207,214,211,190,210,199,171,217,66,126,34,0,32,0,66,29,136,133,66,249,243,221,241,153,246,153,171,22,126,34,0,32,0,66,32,136,133,11,77,0,32,0,65,8,106,32,1,66,214,235,130,238,234,253,137,245,224,0,124,55,3,0,32,0,65,16,106,32,1,66,177,169,172,193,173,184,212,166,61,125,55,3,0,32,0,65,24,106,32,1,55,3,0,32,0,65,32,106,32,1,66,249,234,208,208,231,201,161,228,225,0,124,55,3,0,11,244,4,2,3,127,4,126,32,1,32,2,106,33,5,32,0,65,40,106,33,4,32,0,65,200,0,106,40,2,0,33,3,32,0,32,0,41,3,0,32,2,173,124,55,3,0,32,2,32,3,106,65,32,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,200,0,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,32,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,41,3,0,32,4,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,16,106,34,3,32,3,41,3,0,32,4,65,8,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,24,106,34,3,32,3,41,3,0,32,4,65,16,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,32,106,34,3,32,3,41,3,0,32,4,65,24,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,200,0,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,65,32,106,32,5,77,4,64,32,5,65,32,107,33,2,32,0,65,8,106,41,3,0,33,6,32,0,65,16,106,41,3,0,33,7,32,0,65,24,106,41,3,0,33,8,32,0,65,32,106,41,3,0,33,9,3,64,32,6,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,7,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,7,32,8,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,8,32,9,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,9,32,2,32,1,65,8,106,34,1,79,13,0,11,32,0,65,8,106,32,6,55,3,0,32,0,65,16,106,32,7,55,3,0,32,0,65,24,106,32,8,55,3,0,32,0,65,32,106,32,9,55,3,0,11,32,1,32,5,73,4,64,32,4,32,1,32,5,32,1,107,34,1,252,10,0,0,32,0,65,200,0,106,32,1,54,2,0,11,11,188,2,1,5,126,32,0,65,24,106,41,3,0,33,1,32,0,41,3,0,34,2,66,32,90,4,126,32,0,65,8,106,41,3,0,34,3,66,1,137,32,0,65,16,106,41,3,0,34,4,66,7,137,124,32,1,66,12,137,32,0,65,32,106,41,3,0,34,5,66,18,137,124,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,1,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,1,66,197,207,217,178,241,229,186,234,39,124,11,32,2,124,32,0,65,40,106,32,2,66,31,131,167,16,6,11])});var hX4=o((t67,bX4)=>{function Vo8($){var Y=new $,X=Y;function G(){var Q=Y;if(Q.next)Y=Q.next;else Y=new $,X=Y;return Q.next=null,Q}function J(Q){X.next=Q,X=Q}return{get:G,release:J}}bX4.exports=Vo8});var gX4=o((e67,lb0)=>{var Ao8=hX4();function fX4($,Y,X){if(typeof $==="function")X=Y,Y=$,$=null;if(!(X>=1))throw Error("fastqueue concurrency must be equal to or greater than 1");var G=Ao8(Fo8),J=null,Q=null,W=0,Z=null,K={push:D,drain:jQ,saturated:jQ,pause:z,paused:!1,get concurrency(){return X},set concurrency(q){if(!(q>=1))throw Error("fastqueue concurrency must be equal to or greater than 1");if(X=q,K.paused)return;for(;J&&W<X;)W++,B()},running:H,resume:F,idle:N,length:V,getQueue:A,unshift:L,empty:jQ,kill:O,killAndDrain:E,error:R,abort:M};return K;function H(){return W}function z(){K.paused=!0}function V(){var q=J,w=0;while(q)q=q.next,w++;return w}function A(){var q=J,w=[];while(q)w.push(q.value),q=q.next;return w}function F(){if(!K.paused)return;if(K.paused=!1,J===null){W++,B();return}for(;J&&W<X;)W++,B()}function N(){return W===0&&K.length()===0}function D(q,w){var I=G.get();if(I.context=$,I.release=B,I.value=q,I.callback=w||jQ,I.errorHandler=Z,W>=X||K.paused)if(Q)Q.next=I,Q=I;else J=I,Q=I,K.saturated();else W++,Y.call($,I.value,I.worked)}function L(q,w){var I=G.get();if(I.context=$,I.release=B,I.value=q,I.callback=w||jQ,I.errorHandler=Z,W>=X||K.paused)if(J)I.next=J,J=I;else J=I,Q=I,K.saturated();else W++,Y.call($,I.value,I.worked)}function B(q){if(q)G.release(q);var w=J;if(w&&W<=X)if(!K.paused){if(Q===J)Q=null;if(J=w.next,w.next=null,Y.call($,w.value,w.worked),Q===null)K.empty()}else W--;else if(--W===0)K.drain()}function O(){J=null,Q=null,K.drain=jQ}function E(){J=null,Q=null,K.drain(),K.drain=jQ}function M(){var q=J;J=null,Q=null;while(q){var{next:w,callback:I,errorHandler:P,value:_,context:C}=q;if(q.value=null,q.callback=jQ,q.errorHandler=null,P)P(Error("abort"),_);I.call(C,Error("abort")),q.release(q),q=w}K.drain=jQ}function R(q){Z=q}}function jQ(){}function Fo8(){this.value=null,this.callback=jQ,this.next=null,this.release=jQ,this.context=null,this.errorHandler=null;var $=this;this.worked=function(X,G){var{callback:J,errorHandler:Q,value:W}=$;if($.value=null,$.callback=jQ,$.errorHandler)Q(X,W);J.call($.context,X,G),$.release($)}}function Do8($,Y,X){if(typeof $==="function")X=Y,Y=$,$=null;function G(z,V){Y.call(this,z).then(function(A){V(null,A)},V)}var J=fX4($,G,X),Q=J.push,W=J.unshift;return J.push=Z,J.unshift=K,J.drained=H,J;function Z(z){var V=new Promise(function(A,F){Q(z,function(N,D){if(N){F(N);return}A(D)})});return V.catch(jQ),V}function K(z){var V=new Promise(function(A,F){W(z,function(N,D){if(N){F(N);return}A(D)})});return V.catch(jQ),V}function H(){var z=new Promise(function(V){process.nextTick(function(){if(J.idle())V();else{var A=J.drain;J.drain=function(){if(typeof A==="function")A();V(),J.drain=A}}})});return z}}lb0.exports=fX4;lb0.exports.promise=Do8});async function M50($){let{fgaProvider:Y,user:X,resource:G,permission:J,context:Q}=$;if(!Y)return;await Y.require(X,{resource:G,permission:J,context:Q})}var R50;var ib0=V0(()=>{R50=class extends Error{user;resource;permission;status;constructor($,Y,X){let G=$?.id||$?.workosId||"unknown";super(`FGA authorization denied: user ${G} cannot ${X} on ${Y.type}:${Y.id}`);this.name="FGADeniedError",this.user=$,this.resource=Y,this.permission=X,this.status=403}}});var Vj={};W8(Vj,{checkFGA:()=>M50,FGADeniedError:()=>R50});var Aj=V0(()=>{ib0()});function Y3($,Y){let X=Y||No8,G=typeof X.includeImageAlt==="boolean"?X.includeImageAlt:!0,J=typeof X.includeHtml==="boolean"?X.includeHtml:!0;return uX4($,G,J)}function uX4($,Y,X){if(Lo8($)){if("value"in $)return $.type==="html"&&!X?"":$.value;if(Y&&"alt"in $&&$.alt)return $.alt;if("children"in $)return mX4($.children,Y,X)}if(Array.isArray($))return mX4($,Y,X);return""}function mX4($,Y,X){let G=[],J=-1;while(++J<$.length)G[J]=uX4($[J],Y,X);return G.join("")}function Lo8($){return Boolean($&&typeof $==="object")}var No8;var pX4=V0(()=>{No8={}});var Tm=V0(()=>{pX4()});function nb0($,Y){let X=String($);if(typeof Y!=="string")throw TypeError("Expected character");let G=0,J=X.indexOf(Y);while(J!==-1)G++,J=X.indexOf(Y,J+Y.length);return G}function IX(){}function _E($){return $!==null&&($<32||$===127)}function J4($){return $!==null&&$<-2}function J8($){return $!==null&&($<0||$===32)}function d4($){return $===-2||$===-1||$===32}function ID($){return Y;function Y(X){return X!==null&&X>-1&&$.test(String.fromCharCode(X))}}var DY,NY,dX4,Cm,cX4,lX4,jE,uU;var i8=V0(()=>{DY=ID(/[A-Za-z]/),NY=ID(/[\dA-Za-z]/),dX4=ID(/[#-'*+\--9=?A-Z^-~]/);Cm=ID(/\d/),cX4=ID(/[\dA-Fa-f]/),lX4=ID(/[!-/:-@[-`{-~]/);jE=ID(/\p{P}|\p{S}/u),uU=ID(/\s/)});function PD($){if(typeof $!=="string")throw TypeError("Expected a string");return $.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Bo8($){let Y=[],X=-1;while(++X<$.length)Y[X]=wD($[X]);return q50(G);function G(...J){let Q=-1;while(++Q<Y.length)if(Y[Q].apply(this,J))return!0;return!1}}function Oo8($){let Y=$;return q50(X);function X(G){let J=G,Q;for(Q in $)if(J[Q]!==Y[Q])return!1;return!0}}function Eo8($){return q50(Y);function Y(X){return X&&X.type===$}}function q50($){return Y;function Y(X,G,J){return Boolean(Ro8(X)&&$.call(this,X,typeof G==="number"?G:void 0,J||void 0))}}function Mo8(){return!0}function Ro8($){return $!==null&&typeof $==="object"&&"type"in $}var wD=function($){if($===null||$===void 0)return Mo8;if(typeof $==="function")return q50($);if(typeof $==="object")return Array.isArray($)?Bo8($):Oo8($);if(typeof $==="string")return Eo8($);throw Error("Expected function, string, or object as test")};var I50=()=>{};function iX4($){return"\x1B[33m"+$+"\x1B[39m"}function Sm($,Y,X,G){let J;if(typeof Y==="function"&&typeof X!=="function")G=X,X=Y;else J=Y;let Q=wD(J),W=G?-1:1;Z($,void 0,[])();function Z(K,H,z){let V=K&&typeof K==="object"?K:{};if(typeof V.type==="string"){let F=typeof V.tagName==="string"?V.tagName:typeof V.name==="string"?V.name:void 0;Object.defineProperty(A,"name",{value:"node ("+iX4(K.type+(F?"<"+F+">":""))+")"})}return A;function A(){let F=nX4,N,D,L;if(!Y||Q(K,H,z[z.length-1]||void 0)){if(F=qo8(X(K,z)),F[0]===TE)return F}if("children"in K&&K.children){let B=K;if(B.children&&F[0]!==w50){D=(G?B.children.length:-1)+W,L=z.concat(B);while(D>-1&&D<B.children.length){let O=B.children[D];if(N=Z(O,D,L)(),N[0]===TE)return N;D=typeof N[1]==="number"?N[1]:D+W}}}return F}}}function qo8($){if(Array.isArray($))return $;if(typeof $==="number")return[P50,$];return $===null||$===void 0?nX4:[$]}var nX4,P50=!0,TE=!1,w50="skip";var rX4=V0(()=>{I50();nX4=[]});var _50=V0(()=>{rX4()});function rb0($,Y,X){let J=wD((X||{}).ignore||[]),Q=Io8(Y),W=-1;while(++W<Q.length)Sm($,"text",Z);function Z(H,z){let V=-1,A;while(++V<z.length){let F=z[V],N=A?A.children:void 0;if(J(F,N?N.indexOf(F):void 0,A))return;A=F}if(A)return K(H,z)}function K(H,z){let V=z[z.length-1],A=Q[W][0],F=Q[W][1],N=0,L=V.children.indexOf(H),B=!1,O=[];A.lastIndex=0;let E=A.exec(H.value);while(E){let M=E.index,R={index:E.index,input:E.input,stack:[...z,H]},q=F(...E,R);if(typeof q==="string")q=q.length>0?{type:"text",value:q}:void 0;if(q===!1)A.lastIndex=M+1;else{if(N!==M)O.push({type:"text",value:H.value.slice(N,M)});if(Array.isArray(q))O.push(...q);else if(q)O.push(q);N=M+E[0].length,B=!0}if(!A.global)break;E=A.exec(H.value)}if(B){if(N<H.value.length)O.push({type:"text",value:H.value.slice(N)});V.children.splice(L,1,...O)}else O=[H];return L+O.length}}function Io8($){let Y=[];if(!Array.isArray($))throw TypeError("Expected find and replace tuple or list of tuples");let X=!$[0]||Array.isArray($[0])?$:[$],G=-1;while(++G<X.length){let J=X[G];Y.push([Po8(J[0]),wo8(J[1])])}return Y}function Po8($){return typeof $==="string"?new RegExp(PD($),"g"):$}function wo8($){return typeof $==="function"?$:function(){return $}}var aX4=V0(()=>{_50();I50()});var sX4=V0(()=>{aX4()});function tb0(){return{transforms:[ko8],enter:{literalAutolink:_o8,literalAutolinkEmail:ob0,literalAutolinkHttp:ob0,literalAutolinkWww:ob0},exit:{literalAutolink:So8,literalAutolinkEmail:Co8,literalAutolinkHttp:jo8,literalAutolinkWww:To8}}}function eb0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ab0,notInConstruct:sb0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ab0,notInConstruct:sb0},{character:":",before:"[ps]",after:"\\/",inConstruct:ab0,notInConstruct:sb0}]}}function _o8($){this.enter({type:"link",title:null,url:"",children:[]},$)}function ob0($){this.config.enter.autolinkProtocol.call(this,$)}function jo8($){this.config.exit.autolinkProtocol.call(this,$)}function To8($){this.config.exit.data.call(this,$);let Y=this.stack[this.stack.length-1];IX(Y.type==="link"),Y.url="http://"+this.sliceSerialize($)}function Co8($){this.config.exit.autolinkEmail.call(this,$)}function So8($){this.exit($)}function ko8($){rb0($,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vo8],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,xo8]],{ignore:["link","linkReference"]})}function vo8($,Y,X,G,J){let Q="";if(!oX4(J))return!1;if(/^w/i.test(Y))X=Y+X,Y="",Q="http://";if(!yo8(X))return!1;let W=bo8(X+G);if(!W[0])return!1;let Z={type:"link",title:null,url:Q+Y+W[0],children:[{type:"text",value:Y+W[0]}]};if(W[1])return[Z,{type:"text",value:W[1]}];return Z}function xo8($,Y,X,G){if(!oX4(G,!0)||/[-\d_]$/.test(X))return!1;return{type:"link",title:null,url:"mailto:"+Y+"@"+X,children:[{type:"text",value:Y+"@"+X}]}}function yo8($){let Y=$.split(".");if(Y.length<2||Y[Y.length-1]&&(/_/.test(Y[Y.length-1])||!/[a-zA-Z\d]/.test(Y[Y.length-1]))||Y[Y.length-2]&&(/_/.test(Y[Y.length-2])||!/[a-zA-Z\d]/.test(Y[Y.length-2])))return!1;return!0}function bo8($){let Y=/[!"&'),.:;<>?\]}]+$/.exec($);if(!Y)return[$,void 0];$=$.slice(0,Y.index);let X=Y[0],G=X.indexOf(")"),J=nb0($,"("),Q=nb0($,")");while(G!==-1&&J>Q)$+=X.slice(0,G+1),X=X.slice(G+1),G=X.indexOf(")"),Q++;return[$,X]}function oX4($,Y){let X=$.input.charCodeAt($.index-1);return($.index===0||uU(X)||jE(X))&&(!Y||X!==47)}var ab0="phrasing",sb0;var tX4=V0(()=>{i8();sX4();sb0=["autolink","link","image","label"]});var eX4=V0(()=>{tX4()});function AG($){return $.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function ho8(){this.buffer()}function fo8($){this.enter({type:"footnoteReference",identifier:"",label:""},$)}function go8(){this.buffer()}function mo8($){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},$)}function uo8($){let Y=this.resume(),X=this.stack[this.stack.length-1];IX(X.type==="footnoteReference"),X.identifier=AG(this.sliceSerialize($)).toLowerCase(),X.label=Y}function po8($){this.exit($)}function do8($){let Y=this.resume(),X=this.stack[this.stack.length-1];IX(X.type==="footnoteDefinition"),X.identifier=AG(this.sliceSerialize($)).toLowerCase(),X.label=Y}function co8($){this.exit($)}function lo8(){return"["}function $G4($,Y,X,G){let J=X.createTracker(G),Q=J.move("[^"),W=X.enter("footnoteReference"),Z=X.enter("reference");return Q+=J.move(X.safe(X.associationId($),{after:"]",before:Q})),Z(),W(),Q+=J.move("]"),Q}function $h0(){return{enter:{gfmFootnoteCallString:ho8,gfmFootnoteCall:fo8,gfmFootnoteDefinitionLabelString:go8,gfmFootnoteDefinition:mo8},exit:{gfmFootnoteCallString:uo8,gfmFootnoteCall:po8,gfmFootnoteDefinitionLabelString:do8,gfmFootnoteDefinition:co8}}}function Yh0($){let Y=!1;if($&&$.firstLineBlank)Y=!0;return{handlers:{footnoteDefinition:X,footnoteReference:$G4},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function X(G,J,Q,W){let Z=Q.createTracker(W),K=Z.move("[^"),H=Q.enter("footnoteDefinition"),z=Q.enter("label");if(K+=Z.move(Q.safe(Q.associationId(G),{before:K,after:"]"})),z(),K+=Z.move("]:"),G.children&&G.children.length>0)Z.shift(4),K+=Z.move((Y?`
`:" ")+Q.indentLines(Q.containerFlow(G,Z.current()),Y?YG4:io8));return H(),K}}function io8($,Y,X){return Y===0?$:YG4($,Y,X)}function YG4($,Y,X){return(X?"":"    ")+$}var XG4=V0(()=>{$G4.peek=lo8});var GG4=V0(()=>{XG4()});function Xh0(){return{canContainEols:["delete"],enter:{strikethrough:ro8},exit:{strikethrough:ao8}}}function Gh0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:no8}],handlers:{delete:JG4}}}function ro8($){this.enter({type:"delete",children:[]},$)}function ao8($){this.exit($)}function JG4($,Y,X,G){let J=X.createTracker(G),Q=X.enter("strikethrough"),W=J.move("~~");return W+=X.containerPhrasing($,{...J.current(),before:W,after:"~"}),W+=J.move("~~"),Q(),W}function so8(){return"~"}var no8;var QG4=V0(()=>{no8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];JG4.peek=so8});var WG4=V0(()=>{QG4()});function oo8($){return $.length}function KG4($,Y){let X=Y||{},G=(X.align||[]).concat(),J=X.stringLength||oo8,Q=[],W=[],Z=[],K=[],H=0,z=-1;while(++z<$.length){let D=[],L=[],B=-1;if($[z].length>H)H=$[z].length;while(++B<$[z].length){let O=to8($[z][B]);if(X.alignDelimiters!==!1){let E=J(O);if(L[B]=E,K[B]===void 0||E>K[B])K[B]=E}D.push(O)}W[z]=D,Z[z]=L}let V=-1;if(typeof G==="object"&&"length"in G)while(++V<H)Q[V]=ZG4(G[V]);else{let D=ZG4(G);while(++V<H)Q[V]=D}V=-1;let A=[],F=[];while(++V<H){let D=Q[V],L="",B="";if(D===99)L=":",B=":";else if(D===108)L=":";else if(D===114)B=":";let O=X.alignDelimiters===!1?1:Math.max(1,K[V]-L.length-B.length),E=L+"-".repeat(O)+B;if(X.alignDelimiters!==!1){if(O=L.length+O+B.length,O>K[V])K[V]=O;F[V]=O}A[V]=E}W.splice(1,0,A),Z.splice(1,0,F),z=-1;let N=[];while(++z<W.length){let D=W[z],L=Z[z];V=-1;let B=[];while(++V<H){let O=D[V]||"",E="",M="";if(X.alignDelimiters!==!1){let R=K[V]-(L[V]||0),q=Q[V];if(q===114)E=" ".repeat(R);else if(q===99)if(R%2)E=" ".repeat(R/2+0.5),M=" ".repeat(R/2-0.5);else E=" ".repeat(R/2),M=E;else M=" ".repeat(R)}if(X.delimiterStart!==!1&&!V)B.push("|");if(X.padding!==!1&&!(X.alignDelimiters===!1&&O==="")&&(X.delimiterStart!==!1||V))B.push(" ");if(X.alignDelimiters!==!1)B.push(E);if(B.push(O),X.alignDelimiters!==!1)B.push(M);if(X.padding!==!1)B.push(" ");if(X.delimiterEnd!==!1||V!==H-1)B.push("|")}N.push(X.delimiterEnd===!1?B.join("").replace(/ +$/,""):B.join(""))}return N.join(`
`)}function to8($){return $===null||$===void 0?"":String($)}function ZG4($){let Y=typeof $==="string"?$.codePointAt(0):0;return Y===67||Y===99?99:Y===76||Y===108?108:Y===82||Y===114?114:0}function HG4($,Y){let X=Y||{};function G(J,...Q){let{invalid:W,handlers:Z}=G;if(J&&UG4.call(J,$)){let K=String(J[$]);W=UG4.call(Z,K)?Z[K]:G.unknown}if(W)return W.call(this,J,...Q)}return G.handlers=X.handlers||{},G.invalid=X.invalid,G.unknown=X.unknown,G}var UG4;var zG4=V0(()=>{UG4={}.hasOwnProperty});function Jh0($,Y){let X=-1,G;if(Y.extensions)while(++X<Y.extensions.length)Jh0($,Y.extensions[X]);for(G in Y)if(eo8.call(Y,G))switch(G){case"extensions":break;case"unsafe":{VG4($[G],Y[G]);break}case"join":{VG4($[G],Y[G]);break}case"handlers":{$t8($[G],Y[G]);break}default:$.options[G]=Y[G]}return $}function VG4($,Y){if(Y)$.push(...Y)}function $t8($,Y){if(Y)Object.assign($,Y)}var eo8;var AG4=V0(()=>{eo8={}.hasOwnProperty});function FG4($,Y,X,G){let J=X.enter("blockquote"),Q=X.createTracker(G);Q.move("> "),Q.shift(2);let W=X.indentLines(X.containerFlow($,Q.current()),Yt8);return J(),W}function Yt8($,Y,X){return">"+(X?"":" ")+$}function j50($,Y){return DG4($,Y.inConstruct,!0)&&!DG4($,Y.notInConstruct,!1)}function DG4($,Y,X){if(typeof Y==="string")Y=[Y];if(!Y||Y.length===0)return X;let G=-1;while(++G<Y.length)if($.includes(Y[G]))return!0;return!1}function Qh0($,Y,X,G){let J=-1;while(++J<X.unsafe.length)if(X.unsafe[J].character===`
`&&j50(X.stack,X.unsafe[J]))return/[ \t]/.test(G.before)?"":" ";return"\\\n"}var NG4=()=>{};function LG4($,Y){let X=String($),G=X.indexOf(Y),J=G,Q=0,W=0;if(typeof Y!=="string")throw TypeError("Expected substring");while(G!==-1){if(G===J){if(++Q>W)W=Q}else Q=1;J=G+Y.length,G=X.indexOf(Y,J)}return W}function km($,Y){return Boolean(Y.options.fences===!1&&$.value&&!$.lang&&/[^ \r\n]/.test($.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test($.value))}function BG4($){let Y=$.options.fence||"`";if(Y!=="`"&&Y!=="~")throw Error("Cannot serialize code with `"+Y+"` for `options.fence`, expected `` ` `` or `~`");return Y}function OG4($,Y,X,G){let J=BG4(X),Q=$.value||"",W=J==="`"?"GraveAccent":"Tilde";if(km($,X)){let V=X.enter("codeIndented"),A=X.indentLines(Q,Xt8);return V(),A}let Z=X.createTracker(G),K=J.repeat(Math.max(LG4(Q,J)+1,3)),H=X.enter("codeFenced"),z=Z.move(K);if($.lang){let V=X.enter(`codeFencedLang${W}`);z+=Z.move(X.safe($.lang,{before:z,after:" ",encode:["`"],...Z.current()})),V()}if($.lang&&$.meta){let V=X.enter(`codeFencedMeta${W}`);z+=Z.move(" "),z+=Z.move(X.safe($.meta,{before:z,after:`
`,encode:["`"],...Z.current()})),V()}if(z+=Z.move(`
`),Q)z+=Z.move(Q+`
`);return z+=Z.move(K),H(),z}function Xt8($,Y,X){return(X?"":"    ")+$}var EG4=()=>{};function Fj($){let Y=$.options.quote||'"';if(Y!=='"'&&Y!=="'")throw Error("Cannot serialize title with `"+Y+"` for `options.quote`, expected `\"`, or `'`");return Y}function MG4($,Y,X,G){let J=Fj(X),Q=J==='"'?"Quote":"Apostrophe",W=X.enter("definition"),Z=X.enter("label"),K=X.createTracker(G),H=K.move("[");if(H+=K.move(X.safe(X.associationId($),{before:H,after:"]",...K.current()})),H+=K.move("]: "),Z(),!$.url||/[\0- \u007F]/.test($.url))Z=X.enter("destinationLiteral"),H+=K.move("<"),H+=K.move(X.safe($.url,{before:H,after:">",...K.current()})),H+=K.move(">");else Z=X.enter("destinationRaw"),H+=K.move(X.safe($.url,{before:H,after:$.title?" ":`
`,...K.current()}));if(Z(),$.title)Z=X.enter(`title${Q}`),H+=K.move(" "+J),H+=K.move(X.safe($.title,{before:H,after:J,...K.current()})),H+=K.move(J),Z();return W(),H}var RG4=()=>{};function qG4($){let Y=$.options.emphasis||"*";if(Y!=="*"&&Y!=="_")throw Error("Cannot serialize emphasis with `"+Y+"` for `options.emphasis`, expected `*`, or `_`");return Y}function yW($){return"&#x"+$.toString(16).toUpperCase()+";"}function zV($){if($===null||J8($)||uU($))return 1;if(jE($))return 2}var T50=V0(()=>{i8()});function Dj($,Y,X){let G=zV($),J=zV(Y);if(G===void 0)return J===void 0?X==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:J===1?{inside:!0,outside:!0}:{inside:!1,outside:!0};if(G===1)return J===void 0?{inside:!1,outside:!1}:J===1?{inside:!0,outside:!0}:{inside:!1,outside:!1};return J===void 0?{inside:!1,outside:!1}:J===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var Wh0=V0(()=>{T50()});function Zh0($,Y,X,G){let J=qG4(X),Q=X.enter("emphasis"),W=X.createTracker(G),Z=W.move(J),K=W.move(X.containerPhrasing($,{after:J,before:Z,...W.current()})),H=K.charCodeAt(0),z=Dj(G.before.charCodeAt(G.before.length-1),H,J);if(z.inside)K=yW(H)+K.slice(1);let V=K.charCodeAt(K.length-1),A=Dj(G.after.charCodeAt(0),V,J);if(A.inside)K=K.slice(0,-1)+yW(V);let F=W.move(J);return Q(),X.attentionEncodeSurroundingInfo={after:A.outside,before:z.outside},Z+K+F}function Gt8($,Y,X){return X.options.emphasis||"*"}var IG4=V0(()=>{Wh0();Zh0.peek=Gt8});function Kh0($,Y,X,G){let J,Q,W;if(typeof Y==="function"&&typeof X!=="function")Q=void 0,W=Y,J=X;else Q=Y,W=X,J=G;Sm($,Q,Z,J);function Z(K,H){let z=H[H.length-1],V=z?z.children.indexOf(K):void 0;return W(K,V,z)}}var PG4=V0(()=>{_50();_50()});var wG4=V0(()=>{PG4()});function C50($,Y){let X=!1;return Kh0($,function(G){if("value"in G&&/\r?\n|\r/.test(G.value)||G.type==="break")return X=!0,TE}),Boolean((!$.depth||$.depth<3)&&Y3($)&&(Y.options.setext||X))}var Uh0=V0(()=>{wG4();Tm()});function _G4($,Y,X,G){let J=Math.max(Math.min(6,$.depth||1),1),Q=X.createTracker(G);if(C50($,X)){let z=X.enter("headingSetext"),V=X.enter("phrasing"),A=X.containerPhrasing($,{...Q.current(),before:`
`,after:`
`});return V(),z(),A+`
`+(J===1?"=":"-").repeat(A.length-(Math.max(A.lastIndexOf("\r"),A.lastIndexOf(`
`))+1))}let W="#".repeat(J),Z=X.enter("headingAtx"),K=X.enter("phrasing");Q.move(W+" ");let H=X.containerPhrasing($,{before:"# ",after:`
`,...Q.current()});if(/^[\t ]/.test(H))H=yW(H.charCodeAt(0))+H.slice(1);if(H=H?W+" "+H:W,X.options.closeAtx)H+=" "+W;return K(),Z(),H}var jG4=V0(()=>{Uh0()});function Hh0($){return $.value||""}function Jt8(){return"<"}var TG4=V0(()=>{Hh0.peek=Jt8});function zh0($,Y,X,G){let J=Fj(X),Q=J==='"'?"Quote":"Apostrophe",W=X.enter("image"),Z=X.enter("label"),K=X.createTracker(G),H=K.move("![");if(H+=K.move(X.safe($.alt,{before:H,after:"]",...K.current()})),H+=K.move("]("),Z(),!$.url&&$.title||/[\0- \u007F]/.test($.url))Z=X.enter("destinationLiteral"),H+=K.move("<"),H+=K.move(X.safe($.url,{before:H,after:">",...K.current()})),H+=K.move(">");else Z=X.enter("destinationRaw"),H+=K.move(X.safe($.url,{before:H,after:$.title?" ":")",...K.current()}));if(Z(),$.title)Z=X.enter(`title${Q}`),H+=K.move(" "+J),H+=K.move(X.safe($.title,{before:H,after:J,...K.current()})),H+=K.move(J),Z();return H+=K.move(")"),W(),H}function Qt8(){return"!"}var CG4=V0(()=>{zh0.peek=Qt8});function Vh0($,Y,X,G){let J=$.referenceType,Q=X.enter("imageReference"),W=X.enter("label"),Z=X.createTracker(G),K=Z.move("!["),H=X.safe($.alt,{before:K,after:"]",...Z.current()});K+=Z.move(H+"]["),W();let z=X.stack;X.stack=[],W=X.enter("reference");let V=X.safe(X.associationId($),{before:K,after:"]",...Z.current()});if(W(),X.stack=z,Q(),J==="full"||!H||H!==V)K+=Z.move(V+"]");else if(J==="shortcut")K=K.slice(0,-1);else K+=Z.move("]");return K}function Wt8(){return"!"}var SG4=V0(()=>{Vh0.peek=Wt8});function Ah0($,Y,X){let G=$.value||"",J="`",Q=-1;while(new RegExp("(^|[^`])"+J+"([^`]|$)").test(G))J+="`";if(/[^ \r\n]/.test(G)&&(/^[ \r\n]/.test(G)&&/[ \r\n]$/.test(G)||/^`|`$/.test(G)))G=" "+G+" ";while(++Q<X.unsafe.length){let W=X.unsafe[Q],Z=X.compilePattern(W),K;if(!W.atBreak)continue;while(K=Z.exec(G)){let H=K.index;if(G.charCodeAt(H)===10&&G.charCodeAt(H-1)===13)H--;G=G.slice(0,H)+" "+G.slice(K.index+1)}}return J+G+J}function Zt8(){return"`"}var kG4=V0(()=>{Ah0.peek=Zt8});function Fh0($,Y){let X=Y3($);return Boolean(!Y.options.resourceLink&&$.url&&!$.title&&$.children&&$.children.length===1&&$.children[0].type==="text"&&(X===$.url||"mailto:"+X===$.url)&&/^[a-z][a-z+.-]+:/i.test($.url)&&!/[\0- <>\u007F]/.test($.url))}var vG4=V0(()=>{Tm()});function Dh0($,Y,X,G){let J=Fj(X),Q=J==='"'?"Quote":"Apostrophe",W=X.createTracker(G),Z,K;if(Fh0($,X)){let z=X.stack;X.stack=[],Z=X.enter("autolink");let V=W.move("<");return V+=W.move(X.containerPhrasing($,{before:V,after:">",...W.current()})),V+=W.move(">"),Z(),X.stack=z,V}Z=X.enter("link"),K=X.enter("label");let H=W.move("[");if(H+=W.move(X.containerPhrasing($,{before:H,after:"](",...W.current()})),H+=W.move("]("),K(),!$.url&&$.title||/[\0- \u007F]/.test($.url))K=X.enter("destinationLiteral"),H+=W.move("<"),H+=W.move(X.safe($.url,{before:H,after:">",...W.current()})),H+=W.move(">");else K=X.enter("destinationRaw"),H+=W.move(X.safe($.url,{before:H,after:$.title?" ":")",...W.current()}));if(K(),$.title)K=X.enter(`title${Q}`),H+=W.move(" "+J),H+=W.move(X.safe($.title,{before:H,after:J,...W.current()})),H+=W.move(J),K();return H+=W.move(")"),Z(),H}function Kt8($,Y,X){return Fh0($,X)?"<":"["}var xG4=V0(()=>{vG4();Dh0.peek=Kt8});function Nh0($,Y,X,G){let J=$.referenceType,Q=X.enter("linkReference"),W=X.enter("label"),Z=X.createTracker(G),K=Z.move("["),H=X.containerPhrasing($,{before:K,after:"]",...Z.current()});K+=Z.move(H+"]["),W();let z=X.stack;X.stack=[],W=X.enter("reference");let V=X.safe(X.associationId($),{before:K,after:"]",...Z.current()});if(W(),X.stack=z,Q(),J==="full"||!H||H!==V)K+=Z.move(V+"]");else if(J==="shortcut")K=K.slice(0,-1);else K+=Z.move("]");return K}function Ut8(){return"["}var yG4=V0(()=>{Nh0.peek=Ut8});function Nj($){let Y=$.options.bullet||"*";if(Y!=="*"&&Y!=="+"&&Y!=="-")throw Error("Cannot serialize items with `"+Y+"` for `options.bullet`, expected `*`, `+`, or `-`");return Y}function bG4($){let Y=Nj($),X=$.options.bulletOther;if(!X)return Y==="*"?"-":"*";if(X!=="*"&&X!=="+"&&X!=="-")throw Error("Cannot serialize items with `"+X+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(X===Y)throw Error("Expected `bullet` (`"+Y+"`) and `bulletOther` (`"+X+"`) to be different");return X}var hG4=()=>{};function fG4($){let Y=$.options.bulletOrdered||".";if(Y!=="."&&Y!==")")throw Error("Cannot serialize items with `"+Y+"` for `options.bulletOrdered`, expected `.` or `)`");return Y}function S50($){let Y=$.options.rule||"*";if(Y!=="*"&&Y!=="-"&&Y!=="_")throw Error("Cannot serialize rules with `"+Y+"` for `options.rule`, expected `*`, `-`, or `_`");return Y}function gG4($,Y,X,G){let J=X.enter("list"),Q=X.bulletCurrent,W=$.ordered?fG4(X):Nj(X),Z=$.ordered?W==="."?")":".":bG4(X),K=Y&&X.bulletLastUsed?W===X.bulletLastUsed:!1;if(!$.ordered){let z=$.children?$.children[0]:void 0;if((W==="*"||W==="-")&&z&&(!z.children||!z.children[0])&&X.stack[X.stack.length-1]==="list"&&X.stack[X.stack.length-2]==="listItem"&&X.stack[X.stack.length-3]==="list"&&X.stack[X.stack.length-4]==="listItem"&&X.indexStack[X.indexStack.length-1]===0&&X.indexStack[X.indexStack.length-2]===0&&X.indexStack[X.indexStack.length-3]===0)K=!0;if(S50(X)===W&&z){let V=-1;while(++V<$.children.length){let A=$.children[V];if(A&&A.type==="listItem"&&A.children&&A.children[0]&&A.children[0].type==="thematicBreak"){K=!0;break}}}}if(K)W=Z;X.bulletCurrent=W;let H=X.containerFlow($,G);return X.bulletLastUsed=W,X.bulletCurrent=Q,J(),H}var mG4=V0(()=>{hG4()});function uG4($){let Y=$.options.listItemIndent||"one";if(Y!=="tab"&&Y!=="one"&&Y!=="mixed")throw Error("Cannot serialize items with `"+Y+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return Y}function pG4($,Y,X,G){let J=uG4(X),Q=X.bulletCurrent||Nj(X);if(Y&&Y.type==="list"&&Y.ordered)Q=(typeof Y.start==="number"&&Y.start>-1?Y.start:1)+(X.options.incrementListMarker===!1?0:Y.children.indexOf($))+Q;let W=Q.length+1;if(J==="tab"||J==="mixed"&&(Y&&Y.type==="list"&&Y.spread||$.spread))W=Math.ceil(W/4)*4;let Z=X.createTracker(G);Z.move(Q+" ".repeat(W-Q.length)),Z.shift(W);let K=X.enter("listItem"),H=X.indentLines(X.containerFlow($,Z.current()),z);return K(),H;function z(V,A,F){if(A)return(F?"":" ".repeat(W))+V;return(F?Q:Q+" ".repeat(W-Q.length))+V}}var dG4=()=>{};function cG4($,Y,X,G){let J=X.enter("paragraph"),Q=X.enter("phrasing"),W=X.containerPhrasing($,G);return Q(),J(),W}var Lh0;var lG4=V0(()=>{I50();Lh0=wD(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var iG4=V0(()=>{lG4()});function nG4($,Y,X,G){return($.children.some(function(W){return Lh0(W)})?X.containerPhrasing:X.containerFlow).call(X,$,G)}var rG4=V0(()=>{iG4()});function aG4($){let Y=$.options.strong||"*";if(Y!=="*"&&Y!=="_")throw Error("Cannot serialize strong with `"+Y+"` for `options.strong`, expected `*`, or `_`");return Y}function Bh0($,Y,X,G){let J=aG4(X),Q=X.enter("strong"),W=X.createTracker(G),Z=W.move(J+J),K=W.move(X.containerPhrasing($,{after:J,before:Z,...W.current()})),H=K.charCodeAt(0),z=Dj(G.before.charCodeAt(G.before.length-1),H,J);if(z.inside)K=yW(H)+K.slice(1);let V=K.charCodeAt(K.length-1),A=Dj(G.after.charCodeAt(0),V,J);if(A.inside)K=K.slice(0,-1)+yW(V);let F=W.move(J+J);return Q(),X.attentionEncodeSurroundingInfo={after:A.outside,before:z.outside},Z+K+F}function Ht8($,Y,X){return X.options.strong||"*"}var sG4=V0(()=>{Wh0();Bh0.peek=Ht8});function oG4($,Y,X,G){return X.safe($.value,G)}function tG4($){let Y=$.options.ruleRepetition||3;if(Y<3)throw Error("Cannot serialize rules with repetition `"+Y+"` for `options.ruleRepetition`, expected `3` or more");return Y}function eG4($,Y,X){let G=(S50(X)+(X.options.ruleSpaces?" ":"")).repeat(tG4(X));return X.options.ruleSpaces?G.slice(0,-1):G}var $J4=()=>{};var CE;var Oh0=V0(()=>{NG4();EG4();RG4();IG4();jG4();TG4();CG4();SG4();kG4();xG4();yG4();mG4();dG4();rG4();sG4();$J4();CE={blockquote:FG4,break:Qh0,code:OG4,definition:MG4,emphasis:Zh0,hardBreak:Qh0,heading:_G4,html:Hh0,image:zh0,imageReference:Vh0,inlineCode:Ah0,link:Dh0,linkReference:Nh0,list:gG4,listItem:pG4,paragraph:cG4,root:nG4,strong:Bh0,text:oG4,thematicBreak:eG4}});function zt8($,Y,X,G){if(Y.type==="code"&&km(Y,G)&&($.type==="list"||$.type===Y.type&&km($,G)))return!1;if("spread"in X&&typeof X.spread==="boolean"){if($.type==="paragraph"&&($.type===Y.type||Y.type==="definition"||Y.type==="heading"&&C50(Y,G)))return;return X.spread?1:0}}var YJ4;var XJ4=V0(()=>{Uh0();YJ4=[zt8]});var SE,GJ4;var JJ4=V0(()=>{SE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],GJ4=[{character:"\t",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:SE},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:SE},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ 	\r
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:SE},{atBreak:!0,character:"+",after:`(?:[ 	\r
])`},{atBreak:!0,character:"-",after:`(?:[ 	\r
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ 	\r
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:SE},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:SE},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:SE},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:SE},{atBreak:!0,character:"~"}]});var Eh0;var QJ4=V0(()=>{Eh0={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\uD835\uDD04",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\uD835\uDD38",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\uD835\uDC9C",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\uD835\uDD05",Bopf:"\uD835\uDD39",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\uD835\uDC9E",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\uD835\uDD07",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\uD835\uDD3B",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\uD835\uDC9F",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\uD835\uDD08",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\uD835\uDD3C",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\uD835\uDD09",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\uD835\uDD3D",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\uD835\uDD0A",Gg:"\u22D9",Gopf:"\uD835\uDD3E",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\uD835\uDCA2",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\uD835\uDD40",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\uD835\uDD0D",Jopf:"\uD835\uDD41",Jscr:"\uD835\uDCA5",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\uD835\uDD0E",Kopf:"\uD835\uDD42",Kscr:"\uD835\uDCA6",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\uD835\uDD0F",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\uD835\uDD43",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\uD835\uDD10",MinusPlus:"\u2213",Mopf:"\uD835\uDD44",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
`,Nfr:"\uD835\uDD11",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\uD835\uDCA9",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\uD835\uDD12",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\uD835\uDD46",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\uD835\uDCAA",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\uD835\uDD13",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\uD835\uDCAB",Psi:"\u03A8",QUOT:'"',Qfr:"\uD835\uDD14",Qopf:"\u211A",Qscr:"\uD835\uDCAC",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\uD835\uDD16",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\uD835\uDD4A",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\uD835\uDCAE",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:"\t",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\uD835\uDD17",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\uD835\uDD4B",TripleDot:"\u20DB",Tscr:"\uD835\uDCAF",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\uD835\uDD18",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\uD835\uDD4C",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\uD835\uDCB0",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\uD835\uDD19",Vopf:"\uD835\uDD4D",Vscr:"\uD835\uDCB1",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\uD835\uDD1A",Wopf:"\uD835\uDD4E",Wscr:"\uD835\uDCB2",Xfr:"\uD835\uDD1B",Xi:"\u039E",Xopf:"\uD835\uDD4F",Xscr:"\uD835\uDCB3",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\uD835\uDD1C",Yopf:"\uD835\uDD50",Yscr:"\uD835\uDCB4",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\uD835\uDCB5",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\uD835\uDD1E",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\uD835\uDD52",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\uD835\uDCB6",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\uD835\uDD1F",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\uD835\uDD53",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\uD835\uDCB7",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\uD835\uDD20",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\uD835\uDD54",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\uD835\uDCB8",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\uD835\uDD21",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\uD835\uDD55",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\uD835\uDCB9",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\uD835\uDD22",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\uD835\uDD56",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\uD835\uDD23",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\uD835\uDD57",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\uD835\uDCBB",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\uD835\uDD24",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\uD835\uDD58",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\uD835\uDD25",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\uD835\uDD59",horbar:"\u2015",hscr:"\uD835\uDCBD",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\uD835\uDD26",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\uD835\uDD5A",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\uD835\uDCBE",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\uD835\uDD27",jmath:"\u0237",jopf:"\uD835\uDD5B",jscr:"\uD835\uDCBF",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\uD835\uDD28",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\uD835\uDD5C",kscr:"\uD835\uDCC0",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\uD835\uDD29",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\uD835\uDD5D",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\uD835\uDCC1",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\uD835\uDD2A",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\uD835\uDD5E",mp:"\u2213",mscr:"\uD835\uDCC2",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\uD835\uDD2B",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\uD835\uDD5F",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\uD835\uDCC3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\uD835\uDD2C",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\uD835\uDD60",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\uD835\uDD2D",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\uD835\uDD61",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\uD835\uDCC5",psi:"\u03C8",puncsp:"\u2008",qfr:"\uD835\uDD2E",qint:"\u2A0C",qopf:"\uD835\uDD62",qprime:"\u2057",qscr:"\uD835\uDCC6",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\uD835\uDD2F",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\uD835\uDD63",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\uD835\uDCC7",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\uD835\uDD30",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\uD835\uDD64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\uD835\uDCC8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\uD835\uDD31",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\uD835\uDD65",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\uD835\uDCC9",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\uD835\uDD32",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\uD835\uDD66",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\uD835\uDCCA",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\uD835\uDD33",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\uD835\uDD67",vprop:"\u221D",vrtri:"\u22B3",vscr:"\uD835\uDCCB",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\uD835\uDD34",wopf:"\uD835\uDD68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\uD835\uDCCC",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\uD835\uDD35",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\uD835\uDD69",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\uD835\uDCCD",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\uD835\uDD36",yicy:"\u0457",yopf:"\uD835\uDD6A",yscr:"\uD835\uDCCE",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\uD835\uDD37",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\uD835\uDD6B",zscr:"\uD835\uDCCF",zwj:"\u200D",zwnj:"\u200C"}});function Lj($){return Vt8.call(Eh0,$)?Eh0[$]:!1}var Vt8;var k50=V0(()=>{QJ4();Vt8={}.hasOwnProperty});function v50($,Y){let X=Number.parseInt($,Y);if(X<9||X===11||X>13&&X<32||X>126&&X<160||X>55295&&X<57344||X>64975&&X<65008||(X&65535)===65535||(X&65535)===65534||X>1114111)return"\uFFFD";return String.fromCodePoint(X)}function x50($){return $.replace(At8,Ft8)}function Ft8($,Y,X){if(Y)return Y;if(X.charCodeAt(0)===35){let J=X.charCodeAt(1),Q=J===120||J===88;return v50(X.slice(Q?2:1),Q?16:10)}return Lj(X)||$}var At8;var Mh0=V0(()=>{k50();At8=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function WJ4($){if($.label||!$.identifier)return $.label||"";return x50($.identifier)}var ZJ4=V0(()=>{Mh0()});function KJ4($){if(!$._compiled){let Y=($.atBreak?"[\\r\\n][\\t ]*":"")+($.before?"(?:"+$.before+")":"");$._compiled=new RegExp((Y?"("+Y+")":"")+(/[|\\{}()[\]^$+*?.-]/.test($.character)?"\\":"")+$.character+($.after?"(?:"+$.after+")":""),"g")}return $._compiled}function UJ4($,Y,X){let G=Y.indexStack,J=$.children||[],Q=[],W=-1,Z=X.before,K;G.push(-1);let H=Y.createTracker(X);while(++W<J.length){let z=J[W],V;if(G[G.length-1]=W,W+1<J.length){let N=Y.handle.handlers[J[W+1].type];if(N&&N.peek)N=N.peek;V=N?N(J[W+1],$,Y,{before:"",after:"",...H.current()}).charAt(0):""}else V=X.after;if(Q.length>0&&(Z==="\r"||Z===`
`)&&z.type==="html")Q[Q.length-1]=Q[Q.length-1].replace(/(\r?\n|\r)$/," "),Z=" ",H=Y.createTracker(X),H.move(Q.join(""));let A=Y.handle(z,$,Y,{...H.current(),after:V,before:Z});if(K&&K===A.slice(0,1))A=yW(K.charCodeAt(0))+A.slice(1);let F=Y.attentionEncodeSurroundingInfo;if(Y.attentionEncodeSurroundingInfo=void 0,K=void 0,F){if(Q.length>0&&F.before&&Z===Q[Q.length-1].slice(-1))Q[Q.length-1]=Q[Q.length-1].slice(0,-1)+yW(Z.charCodeAt(0));if(F.after)K=V}H.move(A),Q.push(A),Z=A.slice(-1)}return G.pop(),Q.join("")}var HJ4=()=>{};function zJ4($,Y,X){let G=Y.indexStack,J=$.children||[],Q=Y.createTracker(X),W=[],Z=-1;G.push(-1);while(++Z<J.length){let K=J[Z];if(G[G.length-1]=Z,W.push(Q.move(Y.handle(K,$,Y,{before:`
`,after:`
`,...Q.current()}))),K.type!=="list")Y.bulletLastUsed=void 0;if(Z<J.length-1)W.push(Q.move(Dt8(K,J[Z+1],$,Y)))}return G.pop(),W.join("")}function Dt8($,Y,X,G){let J=G.join.length;while(J--){let Q=G.join[J]($,Y,X,G);if(Q===!0||Q===1)break;if(typeof Q==="number")return`
`.repeat(1+Q);if(Q===!1)return`

<!---->

`}return`

`}function VJ4($,Y){let X=[],G=0,J=0,Q;while(Q=Nt8.exec($))W($.slice(G,Q.index)),X.push(Q[0]),G=Q.index+Q[0].length,J++;return W($.slice(G)),X.join("");function W(Z){X.push(Y(Z,J,!Z))}}var Nt8;var AJ4=V0(()=>{Nt8=/\r?\n|\r/g});function DJ4($,Y,X){let G=(X.before||"")+(Y||"")+(X.after||""),J=[],Q=[],W={},Z=-1;while(++Z<$.unsafe.length){let z=$.unsafe[Z];if(!j50($.stack,z))continue;let V=$.compilePattern(z),A;while(A=V.exec(G)){let F="before"in z||Boolean(z.atBreak),N="after"in z,D=A.index+(F?A[1].length:0);if(J.includes(D)){if(W[D].before&&!F)W[D].before=!1;if(W[D].after&&!N)W[D].after=!1}else J.push(D),W[D]={before:F,after:N}}}J.sort(Lt8);let K=X.before?X.before.length:0,H=G.length-(X.after?X.after.length:0);Z=-1;while(++Z<J.length){let z=J[Z];if(z<K||z>=H)continue;if(z+1<H&&J[Z+1]===z+1&&W[z].after&&!W[z+1].before&&!W[z+1].after||J[Z-1]===z-1&&W[z].before&&!W[z-1].before&&!W[z-1].after)continue;if(K!==z)Q.push(FJ4(G.slice(K,z),"\\"));if(K=z,/[!-/:-@[-`{-~]/.test(G.charAt(z))&&(!X.encode||!X.encode.includes(G.charAt(z))))Q.push("\\");else Q.push(yW(G.charCodeAt(z))),K++}return Q.push(FJ4(G.slice(K,H),X.after)),Q.join("")}function Lt8($,Y){return $-Y}function FJ4($,Y){let X=/\\(?=[!-/:-@[-`{-~])/g,G=[],J=[],Q=$+Y,W=-1,Z=0,K;while(K=X.exec(Q))G.push(K.index);while(++W<G.length){if(Z!==G[W])J.push($.slice(Z,G[W]));J.push("\\"),Z=G[W]}return J.push($.slice(Z)),J.join("")}var NJ4=()=>{};function LJ4($){let Y=$||{},X=Y.now||{},G=Y.lineShift||0,J=X.line||1,Q=X.column||1;return{move:K,current:W,shift:Z};function W(){return{now:{line:J,column:Q},lineShift:G}}function Z(H){G+=H}function K(H){let z=H||"",V=z.split(/\r?\n|\r/g),A=V[V.length-1];return J+=V.length-1,Q=V.length===1?Q+A.length:1+A.length+G,z}}function Rh0($,Y){let X=Y||{},G={associationId:WJ4,containerPhrasing:Mt8,containerFlow:Rt8,createTracker:LJ4,compilePattern:KJ4,enter:Q,handlers:{...CE},handle:void 0,indentLines:VJ4,indexStack:[],join:[...YJ4],options:{},safe:qt8,stack:[],unsafe:[...GJ4]};if(Jh0(G,X),G.options.tightDefinitions)G.join.push(Et8);G.handle=HG4("type",{invalid:Bt8,unknown:Ot8,handlers:G.handlers});let J=G.handle($,void 0,G,{before:`
`,after:`
`,now:{line:1,column:1},lineShift:0});if(J&&J.charCodeAt(J.length-1)!==10&&J.charCodeAt(J.length-1)!==13)J+=`
`;return J;function Q(W){return G.stack.push(W),Z;function Z(){G.stack.pop()}}}function Bt8($){throw Error("Cannot handle value `"+$+"`, expected node")}function Ot8($){throw Error("Cannot handle unknown node `"+$.type+"`")}function Et8($,Y){if($.type==="definition"&&$.type===Y.type)return 0}function Mt8($,Y){return UJ4($,this,Y)}function Rt8($,Y){return zJ4($,this,Y)}function qt8($,Y){return DJ4(this,$,Y)}var BJ4=V0(()=>{zG4();AG4();Oh0();XJ4();JJ4();ZJ4();HJ4();AJ4();NJ4()});var y50=V0(()=>{BJ4();Oh0()});function Ih0(){return{enter:{table:It8,tableData:OJ4,tableHeader:OJ4,tableRow:wt8},exit:{codeText:_t8,table:Pt8,tableData:qh0,tableHeader:qh0,tableRow:qh0}}}function It8($){let Y=$._align;IX(Y,"expected `_align` on table"),this.enter({type:"table",align:Y.map(function(X){return X==="none"?null:X}),children:[]},$),this.data.inTable=!0}function Pt8($){this.exit($),this.data.inTable=void 0}function wt8($){this.enter({type:"tableRow",children:[]},$)}function qh0($){this.exit($)}function OJ4($){this.enter({type:"tableCell",children:[]},$)}function _t8($){let Y=this.resume();if(this.data.inTable)Y=Y.replace(/\\([\\|])/g,jt8);let X=this.stack[this.stack.length-1];IX(X.type==="inlineCode"),X.value=Y,this.exit($)}function jt8($,Y){return Y==="|"?Y:$}function Ph0($){let Y=$||{},X=Y.tableCellPadding,G=Y.tablePipeAlign,J=Y.stringLength,Q=X?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:A,table:W,tableCell:K,tableRow:Z}};function W(F,N,D,L){return H(z(F,D,L),F.align)}function Z(F,N,D,L){let B=V(F,D,L),O=H([B]);return O.slice(0,O.indexOf(`
`))}function K(F,N,D,L){let B=D.enter("tableCell"),O=D.enter("phrasing"),E=D.containerPhrasing(F,{...L,before:Q,after:Q});return O(),B(),E}function H(F,N){return KG4(F,{align:N,alignDelimiters:G,padding:X,stringLength:J})}function z(F,N,D){let L=F.children,B=-1,O=[],E=N.enter("table");while(++B<L.length)O[B]=V(L[B],N,D);return E(),O}function V(F,N,D){let L=F.children,B=-1,O=[],E=N.enter("tableRow");while(++B<L.length)O[B]=K(L[B],F,N,D);return E(),O}function A(F,N,D){let L=CE.inlineCode(F,N,D);if(D.stack.includes("tableCell"))L=L.replace(/\|/g,"\\$&");return L}}var EJ4=V0(()=>{y50()});var MJ4=V0(()=>{EJ4()});function wh0(){return{exit:{taskListCheckValueChecked:RJ4,taskListCheckValueUnchecked:RJ4,paragraph:Tt8}}}function _h0(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ct8}}}function RJ4($){let Y=this.stack[this.stack.length-2];IX(Y.type==="listItem"),Y.checked=$.type==="taskListCheckValueChecked"}function Tt8($){let Y=this.stack[this.stack.length-2];if(Y&&Y.type==="listItem"&&typeof Y.checked==="boolean"){let X=this.stack[this.stack.length-1];IX(X.type==="paragraph");let G=X.children[0];if(G&&G.type==="text"){let J=Y.children,Q=-1,W;while(++Q<J.length){let Z=J[Q];if(Z.type==="paragraph"){W=Z;break}}if(W===X){if(G.value=G.value.slice(1),G.value.length===0)X.children.shift();else if(X.position&&G.position&&typeof G.position.start.offset==="number")G.position.start.column++,G.position.start.offset++,X.position.start=Object.assign({},G.position.start)}}}this.exit($)}function Ct8($,Y,X,G){let J=$.children[0],Q=typeof $.checked==="boolean"&&J&&J.type==="paragraph",W="["+($.checked?"x":" ")+"] ",Z=X.createTracker(G);if(Q)Z.move(W);let K=CE.listItem($,Y,X,{...G,...Z.current()});if(Q)K=K.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,H);return K;function H(z){return z+W}}var qJ4=V0(()=>{y50()});var IJ4=V0(()=>{qJ4()});function jh0(){return[tb0(),$h0(),Xh0(),Ih0(),wh0()]}function Th0($){return{extensions:[eb0(),Yh0($),Gh0(),Ph0($),_h0()]}}var PJ4=V0(()=>{eX4();GG4();WG4();MJ4();IJ4()});var wJ4=V0(()=>{PJ4()});function _$($,Y,X,G){let J=$.length,Q=0,W;if(Y<0)Y=-Y>J?0:J+Y;else Y=Y>J?J:Y;if(X=X>0?X:0,G.length<1e4)W=Array.from(G),W.unshift(Y,X),$.splice(...W);else{if(X)$.splice(Y,X);while(Q<G.length)W=G.slice(Q,Q+1e4),W.unshift(Y,0),$.splice(...W),Q+=1e4,Y+=1e4}}function VJ($,Y){if($.length>0)return _$($,$.length,0,Y),$;return Y}function b50($){let Y={},X=-1;while(++X<$.length)St8(Y,$[X]);return Y}function St8($,Y){let X;for(X in Y){let J=(_J4.call($,X)?$[X]:void 0)||($[X]={}),Q=Y[X],W;if(Q)for(W in Q){if(!_J4.call(J,W))J[W]=[];let Z=Q[W];kt8(J[W],Array.isArray(Z)?Z:Z?[Z]:[])}}}function kt8($,Y){let X=-1,G=[];while(++X<Y.length)(Y[X].add==="after"?$:G).push(Y[X]);_$($,0,0,G)}var _J4;var Ch0=V0(()=>{_J4={}.hasOwnProperty});function kh0(){return{text:pU}}function yt8($,Y,X){let G=this,J,Q;return W;function W(V){if(!Sh0(V)||!yJ4.call(G,G.previous)||vh0(G.events))return X(V);return $.enter("literalAutolink"),$.enter("literalAutolinkEmail"),Z(V)}function Z(V){if(Sh0(V))return $.consume(V),Z;if(V===64)return $.consume(V),K;return X(V)}function K(V){if(V===46)return $.check(xt8,z,H)(V);if(V===45||V===95||NY(V))return Q=!0,$.consume(V),K;return z(V)}function H(V){return $.consume(V),J=!0,K}function z(V){if(Q&&J&&DY(G.previous))return $.exit("literalAutolinkEmail"),$.exit("literalAutolink"),Y(V);return X(V)}}function bt8($,Y,X){let G=this;return J;function J(W){if(W!==87&&W!==119||!vJ4.call(G,G.previous)||vh0(G.events))return X(W);return $.enter("literalAutolink"),$.enter("literalAutolinkWww"),$.check(vt8,$.attempt(jJ4,$.attempt(TJ4,Q),X),X)(W)}function Q(W){return $.exit("literalAutolinkWww"),$.exit("literalAutolink"),Y(W)}}function ht8($,Y,X){let G=this,J="",Q=!1;return W;function W(V){if((V===72||V===104)&&xJ4.call(G,G.previous)&&!vh0(G.events))return $.enter("literalAutolink"),$.enter("literalAutolinkHttp"),J+=String.fromCodePoint(V),$.consume(V),Z;return X(V)}function Z(V){if(DY(V)&&J.length<5)return J+=String.fromCodePoint(V),$.consume(V),Z;if(V===58){let A=J.toLowerCase();if(A==="http"||A==="https")return $.consume(V),K}return X(V)}function K(V){if(V===47){if($.consume(V),Q)return H;return Q=!0,K}return X(V)}function H(V){return V===null||_E(V)||J8(V)||uU(V)||jE(V)?X(V):$.attempt(jJ4,$.attempt(TJ4,z),X)(V)}function z(V){return $.exit("literalAutolinkHttp"),$.exit("literalAutolink"),Y(V)}}function ft8($,Y,X){let G=0;return J;function J(W){if((W===87||W===119)&&G<3)return G++,$.consume(W),J;if(W===46&&G===3)return $.consume(W),Q;return X(W)}function Q(W){return W===null?X(W):Y(W)}}function gt8($,Y,X){let G,J,Q;return W;function W(H){if(H===46||H===95)return $.check(CJ4,K,Z)(H);if(H===null||J8(H)||uU(H)||H!==45&&jE(H))return K(H);return Q=!0,$.consume(H),W}function Z(H){if(H===95)G=!0;else J=G,G=void 0;return $.consume(H),W}function K(H){if(J||G||!Q)return X(H);return Y(H)}}function mt8($,Y){let X=0,G=0;return J;function J(W){if(W===40)return X++,$.consume(W),J;if(W===41&&G<X)return Q(W);if(W===33||W===34||W===38||W===39||W===41||W===42||W===44||W===46||W===58||W===59||W===60||W===63||W===93||W===95||W===126)return $.check(CJ4,Y,Q)(W);if(W===null||J8(W)||uU(W))return Y(W);return $.consume(W),J}function Q(W){if(W===41)G++;return $.consume(W),J}}function ut8($,Y,X){return G;function G(Z){if(Z===33||Z===34||Z===39||Z===41||Z===42||Z===44||Z===46||Z===58||Z===59||Z===63||Z===95||Z===126)return $.consume(Z),G;if(Z===38)return $.consume(Z),Q;if(Z===93)return $.consume(Z),J;if(Z===60||Z===null||J8(Z)||uU(Z))return Y(Z);return X(Z)}function J(Z){if(Z===null||Z===40||Z===91||J8(Z)||uU(Z))return Y(Z);return G(Z)}function Q(Z){return DY(Z)?W(Z):X(Z)}function W(Z){if(Z===59)return $.consume(Z),G;if(DY(Z))return $.consume(Z),W;return X(Z)}}function pt8($,Y,X){return G;function G(Q){return $.consume(Q),J}function J(Q){return NY(Q)?X(Q):Y(Q)}}function vJ4($){return $===null||$===40||$===42||$===95||$===91||$===93||$===126||J8($)}function xJ4($){return!DY($)}function yJ4($){return!($===47||Sh0($))}function Sh0($){return $===43||$===45||$===46||$===95||NY($)}function vh0($){let Y=$.length,X=!1;while(Y--){let G=$[Y][1];if((G.type==="labelLink"||G.type==="labelImage")&&!G._balanced){X=!0;break}if(G._gfmAutolinkLiteralWalkedInto){X=!1;break}}if($.length>0&&!X)$[$.length-1][1]._gfmAutolinkLiteralWalkedInto=!0;return X}var vt8,jJ4,TJ4,CJ4,xt8,SJ4,kJ4,VV,pU,kE=48;var bJ4=V0(()=>{i8();vt8={tokenize:ft8,partial:!0},jJ4={tokenize:gt8,partial:!0},TJ4={tokenize:mt8,partial:!0},CJ4={tokenize:ut8,partial:!0},xt8={tokenize:pt8,partial:!0},SJ4={name:"wwwAutolink",tokenize:bt8,previous:vJ4},kJ4={name:"protocolAutolink",tokenize:ht8,previous:xJ4},VV={name:"emailAutolink",tokenize:yt8,previous:yJ4},pU={};while(kE<123)if(pU[kE]=VV,kE++,kE===58)kE=65;else if(kE===91)kE=97;pU[43]=VV;pU[45]=VV;pU[46]=VV;pU[95]=VV;pU[72]=[VV,kJ4];pU[104]=[VV,kJ4];pU[87]=[VV,SJ4];pU[119]=[VV,SJ4]});var hJ4=V0(()=>{bJ4()});function _D($,Y,X){let G=[],J=-1;while(++J<$.length){let Q=$[J].resolveAll;if(Q&&!G.includes(Q))Y=Q(Y,X),G.push(Q)}return Y}function dt8($,Y){let X=-1,G,J,Q,W,Z,K,H,z;while(++X<$.length)if($[X][0]==="enter"&&$[X][1].type==="attentionSequence"&&$[X][1]._close){G=X;while(G--)if($[G][0]==="exit"&&$[G][1].type==="attentionSequence"&&$[G][1]._open&&Y.sliceSerialize($[G][1]).charCodeAt(0)===Y.sliceSerialize($[X][1]).charCodeAt(0)){if(($[G][1]._close||$[X][1]._open)&&($[X][1].end.offset-$[X][1].start.offset)%3&&!(($[G][1].end.offset-$[G][1].start.offset+$[X][1].end.offset-$[X][1].start.offset)%3))continue;K=$[G][1].end.offset-$[G][1].start.offset>1&&$[X][1].end.offset-$[X][1].start.offset>1?2:1;let V={...$[G][1].end},A={...$[X][1].start};if(fJ4(V,-K),fJ4(A,K),W={type:K>1?"strongSequence":"emphasisSequence",start:V,end:{...$[G][1].end}},Z={type:K>1?"strongSequence":"emphasisSequence",start:{...$[X][1].start},end:A},Q={type:K>1?"strongText":"emphasisText",start:{...$[G][1].end},end:{...$[X][1].start}},J={type:K>1?"strong":"emphasis",start:{...W.start},end:{...Z.end}},$[G][1].end={...W.start},$[X][1].start={...Z.end},H=[],$[G][1].end.offset-$[G][1].start.offset)H=VJ(H,[["enter",$[G][1],Y],["exit",$[G][1],Y]]);if(H=VJ(H,[["enter",J,Y],["enter",W,Y],["exit",W,Y],["enter",Q,Y]]),H=VJ(H,_D(Y.parser.constructs.insideSpan.null,$.slice(G+1,X),Y)),H=VJ(H,[["exit",Q,Y],["enter",Z,Y],["exit",Z,Y],["exit",J,Y]]),$[X][1].end.offset-$[X][1].start.offset)z=2,H=VJ(H,[["enter",$[X][1],Y],["exit",$[X][1],Y]]);else z=0;_$($,G-1,X-G+3,H),X=G+H.length-z-2;break}}X=-1;while(++X<$.length)if($[X][1].type==="attentionSequence")$[X][1].type="data";return $}function ct8($,Y){let X=this.parser.constructs.attentionMarkers.null,G=this.previous,J=zV(G),Q;return W;function W(K){return Q=K,$.enter("attentionSequence"),Z(K)}function Z(K){if(K===Q)return $.consume(K),Z;let H=$.exit("attentionSequence"),z=zV(K),V=!z||z===2&&J||X.includes(K),A=!J||J===2&&z||X.includes(G);return H._open=Boolean(Q===42?V:V&&(J||!A)),H._close=Boolean(Q===42?A:A&&(z||!V)),Y(K)}}function fJ4($,Y){$.column+=Y,$.offset+=Y,$._bufferIndex+=Y}var vm;var gJ4=V0(()=>{T50();vm={name:"attention",resolveAll:dt8,tokenize:ct8}});function lt8($,Y,X){let G=0;return J;function J(F){return $.enter("autolink"),$.enter("autolinkMarker"),$.consume(F),$.exit("autolinkMarker"),$.enter("autolinkProtocol"),Q}function Q(F){if(DY(F))return $.consume(F),W;if(F===64)return X(F);return H(F)}function W(F){if(F===43||F===45||F===46||NY(F))return G=1,Z(F);return H(F)}function Z(F){if(F===58)return $.consume(F),G=0,K;if((F===43||F===45||F===46||NY(F))&&G++<32)return $.consume(F),Z;return G=0,H(F)}function K(F){if(F===62)return $.exit("autolinkProtocol"),$.enter("autolinkMarker"),$.consume(F),$.exit("autolinkMarker"),$.exit("autolink"),Y;if(F===null||F===32||F===60||_E(F))return X(F);return $.consume(F),K}function H(F){if(F===64)return $.consume(F),z;if(dX4(F))return $.consume(F),H;return X(F)}function z(F){return NY(F)?V(F):X(F)}function V(F){if(F===46)return $.consume(F),G=0,z;if(F===62)return $.exit("autolinkProtocol").type="autolinkEmail",$.enter("autolinkMarker"),$.consume(F),$.exit("autolinkMarker"),$.exit("autolink"),Y;return A(F)}function A(F){if((F===45||NY(F))&&G++<63){let N=F===45?A:V;return $.consume(F),N}return X(F)}}var xh0;var mJ4=V0(()=>{i8();xh0={name:"autolink",tokenize:lt8}});function u4($,Y,X,G){let J=G?G-1:Number.POSITIVE_INFINITY,Q=0;return W;function W(K){if(d4(K))return $.enter(X),Z(K);return Y(K)}function Z(K){if(d4(K)&&Q++<J)return $.consume(K),Z;return $.exit(X),Y(K)}}var j$=V0(()=>{i8()});function it8($,Y,X){return G;function G(Q){return d4(Q)?u4($,J,"linePrefix")(Q):J(Q)}function J(Q){return Q===null||J4(Q)?Y(Q):X(Q)}}var dU;var h50=V0(()=>{j$();i8();dU={partial:!0,tokenize:it8}});function nt8($,Y,X){let G=this;return J;function J(W){if(W===62){let Z=G.containerState;if(!Z.open)$.enter("blockQuote",{_container:!0}),Z.open=!0;return $.enter("blockQuotePrefix"),$.enter("blockQuoteMarker"),$.consume(W),$.exit("blockQuoteMarker"),Q}return X(W)}function Q(W){if(d4(W))return $.enter("blockQuotePrefixWhitespace"),$.consume(W),$.exit("blockQuotePrefixWhitespace"),$.exit("blockQuotePrefix"),Y;return $.exit("blockQuotePrefix"),Y(W)}}function rt8($,Y,X){let G=this;return J;function J(W){if(d4(W))return u4($,Q,"linePrefix",G.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W);return Q(W)}function Q(W){return $.attempt(f50,Y,X)(W)}}function at8($){$.exit("blockQuote")}var f50;var uJ4=V0(()=>{j$();i8();f50={continuation:{tokenize:rt8},exit:at8,name:"blockQuote",tokenize:nt8}});function st8($,Y,X){return G;function G(Q){return $.enter("characterEscape"),$.enter("escapeMarker"),$.consume(Q),$.exit("escapeMarker"),J}function J(Q){if(lX4(Q))return $.enter("characterEscapeValue"),$.consume(Q),$.exit("characterEscapeValue"),$.exit("characterEscape"),Y;return X(Q)}}var g50;var pJ4=V0(()=>{i8();g50={name:"characterEscape",tokenize:st8}});function ot8($,Y,X){let G=this,J=0,Q,W;return Z;function Z(V){return $.enter("characterReference"),$.enter("characterReferenceMarker"),$.consume(V),$.exit("characterReferenceMarker"),K}function K(V){if(V===35)return $.enter("characterReferenceMarkerNumeric"),$.consume(V),$.exit("characterReferenceMarkerNumeric"),H;return $.enter("characterReferenceValue"),Q=31,W=NY,z(V)}function H(V){if(V===88||V===120)return $.enter("characterReferenceMarkerHexadecimal"),$.consume(V),$.exit("characterReferenceMarkerHexadecimal"),$.enter("characterReferenceValue"),Q=6,W=cX4,z;return $.enter("characterReferenceValue"),Q=7,W=Cm,z(V)}function z(V){if(V===59&&J){let A=$.exit("characterReferenceValue");if(W===NY&&!Lj(G.sliceSerialize(A)))return X(V);return $.enter("characterReferenceMarker"),$.consume(V),$.exit("characterReferenceMarker"),$.exit("characterReference"),Y}if(W(V)&&J++<Q)return $.consume(V),z;return X(V)}}var m50;var dJ4=V0(()=>{k50();i8();m50={name:"characterReference",tokenize:ot8}});function tt8($,Y,X){let G=this,J={partial:!0,tokenize:R},Q=0,W=0,Z;return K;function K(q){return H(q)}function H(q){let w=G.events[G.events.length-1];return Q=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,Z=q,$.enter("codeFenced"),$.enter("codeFencedFence"),$.enter("codeFencedFenceSequence"),z(q)}function z(q){if(q===Z)return W++,$.consume(q),z;if(W<3)return X(q);return $.exit("codeFencedFenceSequence"),d4(q)?u4($,V,"whitespace")(q):V(q)}function V(q){if(q===null||J4(q))return $.exit("codeFencedFence"),G.interrupt?Y(q):$.check(cJ4,D,M)(q);return $.enter("codeFencedFenceInfo"),$.enter("chunkString",{contentType:"string"}),A(q)}function A(q){if(q===null||J4(q))return $.exit("chunkString"),$.exit("codeFencedFenceInfo"),V(q);if(d4(q))return $.exit("chunkString"),$.exit("codeFencedFenceInfo"),u4($,F,"whitespace")(q);if(q===96&&q===Z)return X(q);return $.consume(q),A}function F(q){if(q===null||J4(q))return V(q);return $.enter("codeFencedFenceMeta"),$.enter("chunkString",{contentType:"string"}),N(q)}function N(q){if(q===null||J4(q))return $.exit("chunkString"),$.exit("codeFencedFenceMeta"),V(q);if(q===96&&q===Z)return X(q);return $.consume(q),N}function D(q){return $.attempt(J,M,L)(q)}function L(q){return $.enter("lineEnding"),$.consume(q),$.exit("lineEnding"),B}function B(q){return Q>0&&d4(q)?u4($,O,"linePrefix",Q+1)(q):O(q)}function O(q){if(q===null||J4(q))return $.check(cJ4,D,M)(q);return $.enter("codeFlowValue"),E(q)}function E(q){if(q===null||J4(q))return $.exit("codeFlowValue"),O(q);return $.consume(q),E}function M(q){return $.exit("codeFenced"),Y(q)}function R(q,w,I){let P=0;return _;function _(v){return q.enter("lineEnding"),q.consume(v),q.exit("lineEnding"),C}function C(v){return q.enter("codeFencedFence"),d4(v)?u4(q,k,"linePrefix",G.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):k(v)}function k(v){if(v===Z)return q.enter("codeFencedFenceSequence"),S(v);return I(v)}function S(v){if(v===Z)return P++,q.consume(v),S;if(P>=W)return q.exit("codeFencedFenceSequence"),d4(v)?u4(q,T,"whitespace")(v):T(v);return I(v)}function T(v){if(v===null||J4(v))return q.exit("codeFencedFence"),w(v);return I(v)}}}function et8($,Y,X){let G=this;return J;function J(W){if(W===null)return X(W);return $.enter("lineEnding"),$.consume(W),$.exit("lineEnding"),Q}function Q(W){return G.parser.lazy[G.now().line]?X(W):Y(W)}}var cJ4,u50;var lJ4=V0(()=>{j$();i8();cJ4={partial:!0,tokenize:et8},u50={concrete:!0,name:"codeFenced",tokenize:tt8}});function Ye8($,Y,X){let G=this;return J;function J(H){return $.enter("codeIndented"),u4($,Q,"linePrefix",5)(H)}function Q(H){let z=G.events[G.events.length-1];return z&&z[1].type==="linePrefix"&&z[2].sliceSerialize(z[1],!0).length>=4?W(H):X(H)}function W(H){if(H===null)return K(H);if(J4(H))return $.attempt($e8,W,K)(H);return $.enter("codeFlowValue"),Z(H)}function Z(H){if(H===null||J4(H))return $.exit("codeFlowValue"),W(H);return $.consume(H),Z}function K(H){return $.exit("codeIndented"),Y(H)}}function Xe8($,Y,X){let G=this;return J;function J(W){if(G.parser.lazy[G.now().line])return X(W);if(J4(W))return $.enter("lineEnding"),$.consume(W),$.exit("lineEnding"),J;return u4($,Q,"linePrefix",5)(W)}function Q(W){let Z=G.events[G.events.length-1];return Z&&Z[1].type==="linePrefix"&&Z[2].sliceSerialize(Z[1],!0).length>=4?Y(W):J4(W)?J(W):X(W)}}var xm,$e8;var iJ4=V0(()=>{j$();i8();xm={name:"codeIndented",tokenize:Ye8},$e8={partial:!0,tokenize:Xe8}});function Ge8($){let Y=$.length-4,X=3,G,J;if(($[X][1].type==="lineEnding"||$[X][1].type==="space")&&($[Y][1].type==="lineEnding"||$[Y][1].type==="space")){G=X;while(++G<Y)if($[G][1].type==="codeTextData"){$[X][1].type="codeTextPadding",$[Y][1].type="codeTextPadding",X+=2,Y-=2;break}}G=X-1,Y++;while(++G<=Y)if(J===void 0){if(G!==Y&&$[G][1].type!=="lineEnding")J=G}else if(G===Y||$[G][1].type==="lineEnding"){if($[J][1].type="codeTextData",G!==J+2)$[J][1].end=$[G-1][1].end,$.splice(J+2,G-J-2),Y-=G-J-2,G=J+2;J=void 0}return $}function Je8($){return $!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Qe8($,Y,X){let G=this,J=0,Q,W;return Z;function Z(A){return $.enter("codeText"),$.enter("codeTextSequence"),K(A)}function K(A){if(A===96)return $.consume(A),J++,K;return $.exit("codeTextSequence"),H(A)}function H(A){if(A===null)return X(A);if(A===32)return $.enter("space"),$.consume(A),$.exit("space"),H;if(A===96)return W=$.enter("codeTextSequence"),Q=0,V(A);if(J4(A))return $.enter("lineEnding"),$.consume(A),$.exit("lineEnding"),H;return $.enter("codeTextData"),z(A)}function z(A){if(A===null||A===32||A===96||J4(A))return $.exit("codeTextData"),H(A);return $.consume(A),z}function V(A){if(A===96)return $.consume(A),Q++,V;if(Q===J)return $.exit("codeTextSequence"),$.exit("codeText"),Y(A);return W.type="codeTextData",z(A)}}var yh0;var nJ4=V0(()=>{i8();yh0={name:"codeText",previous:Je8,resolve:Ge8,tokenize:Qe8}});class bh0{constructor($){this.left=$?[...$]:[],this.right=[]}get($){if($<0||$>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+$+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if($<this.left.length)return this.left[$];return this.right[this.right.length-$+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice($,Y){let X=Y===null||Y===void 0?Number.POSITIVE_INFINITY:Y;if(X<this.left.length)return this.left.slice($,X);if($>this.left.length)return this.right.slice(this.right.length-X+this.left.length,this.right.length-$+this.left.length).reverse();return this.left.slice($).concat(this.right.slice(this.right.length-X+this.left.length).reverse())}splice($,Y,X){let G=Y||0;this.setCursor(Math.trunc($));let J=this.right.splice(this.right.length-G,Number.POSITIVE_INFINITY);if(X)ym(this.left,X);return J.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push($){this.setCursor(Number.POSITIVE_INFINITY),this.left.push($)}pushMany($){this.setCursor(Number.POSITIVE_INFINITY),ym(this.left,$)}unshift($){this.setCursor(0),this.right.push($)}unshiftMany($){this.setCursor(0),ym(this.right,$.reverse())}setCursor($){if($===this.left.length||$>this.left.length&&this.right.length===0||$<0&&this.left.length===0)return;if($<this.left.length){let Y=this.left.splice($,Number.POSITIVE_INFINITY);ym(this.right,Y.reverse())}else{let Y=this.right.splice(this.left.length+this.right.length-$,Number.POSITIVE_INFINITY);ym(this.left,Y.reverse())}}}function ym($,Y){let X=0;if(Y.length<1e4)$.push(...Y);else while(X<Y.length)$.push(...Y.slice(X,X+1e4)),X+=1e4}function p50($){let Y={},X=-1,G,J,Q,W,Z,K,H,z=new bh0($);while(++X<z.length){while(X in Y)X=Y[X];if(G=z.get(X),X&&G[1].type==="chunkFlow"&&z.get(X-1)[1].type==="listItemPrefix"){if(K=G[1]._tokenizer.events,Q=0,Q<K.length&&K[Q][1].type==="lineEndingBlank")Q+=2;if(Q<K.length&&K[Q][1].type==="content")while(++Q<K.length){if(K[Q][1].type==="content")break;if(K[Q][1].type==="chunkText")K[Q][1]._isInFirstContentOfListItem=!0,Q++}}if(G[0]==="enter"){if(G[1].contentType)Object.assign(Y,We8(z,X)),X=Y[X],H=!0}else if(G[1]._container){Q=X,J=void 0;while(Q--)if(W=z.get(Q),W[1].type==="lineEnding"||W[1].type==="lineEndingBlank"){if(W[0]==="enter"){if(J)z.get(J)[1].type="lineEndingBlank";W[1].type="lineEnding",J=Q}}else if(W[1].type==="linePrefix"||W[1].type==="listItemIndent");else break;if(J)G[1].end={...z.get(J)[1].start},Z=z.slice(J,X),Z.unshift(G),z.splice(J,X-J+1,Z)}}return _$($,0,Number.POSITIVE_INFINITY,z.slice(0)),!H}function We8($,Y){let X=$.get(Y)[1],G=$.get(Y)[2],J=Y-1,Q=[],W=X._tokenizer;if(!W){if(W=G.parser[X.contentType](X.start),X._contentTypeTextTrailing)W._contentTypeTextTrailing=!0}let Z=W.events,K=[],H={},z,V,A=-1,F=X,N=0,D=0,L=[D];while(F){while($.get(++J)[1]!==F);if(Q.push(J),!F._tokenizer){if(z=G.sliceStream(F),!F.next)z.push(null);if(V)W.defineSkip(F.start);if(F._isInFirstContentOfListItem)W._gfmTasklistFirstContentOfListItem=!0;if(W.write(z),F._isInFirstContentOfListItem)W._gfmTasklistFirstContentOfListItem=void 0}V=F,F=F.next}F=X;while(++A<Z.length)if(Z[A][0]==="exit"&&Z[A-1][0]==="enter"&&Z[A][1].type===Z[A-1][1].type&&Z[A][1].start.line!==Z[A][1].end.line)D=A+1,L.push(D),F._tokenizer=void 0,F.previous=void 0,F=F.next;if(W.events=[],F)F._tokenizer=void 0,F.previous=void 0;else L.pop();A=L.length;while(A--){let B=Z.slice(L[A],L[A+1]),O=Q.pop();K.push([O,O+B.length-1]),$.splice(O,2,B)}K.reverse(),A=-1;while(++A<K.length)H[N+K[A][0]]=N+K[A][1],N+=K[A][1]-K[A][0]-1;return H}var hh0=()=>{};function Ke8($){return p50($),$}function Ue8($,Y){let X;return G;function G(Z){return $.enter("content"),X=$.enter("chunkContent",{contentType:"content"}),J(Z)}function J(Z){if(Z===null)return Q(Z);if(J4(Z))return $.check(Ze8,W,Q)(Z);return $.consume(Z),J}function Q(Z){return $.exit("chunkContent"),$.exit("content"),Y(Z)}function W(Z){return $.consume(Z),$.exit("chunkContent"),X.next=$.enter("chunkContent",{contentType:"content",previous:X}),X=X.next,J}}function He8($,Y,X){let G=this;return J;function J(W){return $.exit("chunkContent"),$.enter("lineEnding"),$.consume(W),$.exit("lineEnding"),u4($,Q,"linePrefix")}function Q(W){if(W===null||J4(W))return X(W);let Z=G.events[G.events.length-1];if(!G.parser.constructs.disable.null.includes("codeIndented")&&Z&&Z[1].type==="linePrefix"&&Z[2].sliceSerialize(Z[1],!0).length>=4)return Y(W);return $.interrupt(G.parser.constructs.flow,X,Y)(W)}}var fh0,Ze8;var rJ4=V0(()=>{j$();i8();hh0();fh0={resolve:Ke8,tokenize:Ue8},Ze8={partial:!0,tokenize:He8}});function d50($,Y,X,G,J,Q,W,Z,K){let H=K||Number.POSITIVE_INFINITY,z=0;return V;function V(B){if(B===60)return $.enter(G),$.enter(J),$.enter(Q),$.consume(B),$.exit(Q),A;if(B===null||B===32||B===41||_E(B))return X(B);return $.enter(G),$.enter(W),$.enter(Z),$.enter("chunkString",{contentType:"string"}),D(B)}function A(B){if(B===62)return $.enter(Q),$.consume(B),$.exit(Q),$.exit(J),$.exit(G),Y;return $.enter(Z),$.enter("chunkString",{contentType:"string"}),F(B)}function F(B){if(B===62)return $.exit("chunkString"),$.exit(Z),A(B);if(B===null||B===60||J4(B))return X(B);return $.consume(B),B===92?N:F}function N(B){if(B===60||B===62||B===92)return $.consume(B),F;return F(B)}function D(B){if(!z&&(B===null||B===41||J8(B)))return $.exit("chunkString"),$.exit(Z),$.exit(W),$.exit(G),Y(B);if(z<H&&B===40)return $.consume(B),z++,D;if(B===41)return $.consume(B),z--,D;if(B===null||B===32||B===40||_E(B))return X(B);return $.consume(B),B===92?L:D}function L(B){if(B===40||B===41||B===92)return $.consume(B),D;return D(B)}}var gh0=V0(()=>{i8()});function c50($,Y,X,G,J,Q){let W=this,Z=0,K;return H;function H(F){return $.enter(G),$.enter(J),$.consume(F),$.exit(J),$.enter(Q),z}function z(F){if(Z>999||F===null||F===91||F===93&&!K||F===94&&!Z&&"_hiddenFootnoteSupport"in W.parser.constructs)return X(F);if(F===93)return $.exit(Q),$.enter(J),$.consume(F),$.exit(J),$.exit(G),Y;if(J4(F))return $.enter("lineEnding"),$.consume(F),$.exit("lineEnding"),z;return $.enter("chunkString",{contentType:"string"}),V(F)}function V(F){if(F===null||F===91||F===93||J4(F)||Z++>999)return $.exit("chunkString"),z(F);if($.consume(F),!K)K=!d4(F);return F===92?A:V}function A(F){if(F===91||F===92||F===93)return $.consume(F),Z++,V;return V(F)}}var mh0=V0(()=>{i8()});function l50($,Y,X,G,J,Q){let W;return Z;function Z(A){if(A===34||A===39||A===40)return $.enter(G),$.enter(J),$.consume(A),$.exit(J),W=A===40?41:A,K;return X(A)}function K(A){if(A===W)return $.enter(J),$.consume(A),$.exit(J),$.exit(G),Y;return $.enter(Q),H(A)}function H(A){if(A===W)return $.exit(Q),K(W);if(A===null)return X(A);if(J4(A))return $.enter("lineEnding"),$.consume(A),$.exit("lineEnding"),u4($,H,"linePrefix");return $.enter("chunkString",{contentType:"string"}),z(A)}function z(A){if(A===W||A===null||J4(A))return $.exit("chunkString"),H(A);return $.consume(A),A===92?V:z}function V(A){if(A===W||A===92)return $.consume(A),z;return z(A)}}var uh0=V0(()=>{j$();i8()});function vE($,Y){let X;return G;function G(J){if(J4(J))return $.enter("lineEnding"),$.consume(J),$.exit("lineEnding"),X=!0,G;if(d4(J))return u4($,G,X?"linePrefix":"lineSuffix")(J);return Y(J)}}var ph0=V0(()=>{j$();i8()});function Ve8($,Y,X){let G=this,J;return Q;function Q(F){return $.enter("definition"),W(F)}function W(F){return c50.call(G,$,Z,X,"definitionLabel","definitionLabelMarker","definitionLabelString")(F)}function Z(F){if(J=AG(G.sliceSerialize(G.events[G.events.length-1][1]).slice(1,-1)),F===58)return $.enter("definitionMarker"),$.consume(F),$.exit("definitionMarker"),K;return X(F)}function K(F){return J8(F)?vE($,H)(F):H(F)}function H(F){return d50($,z,X,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(F)}function z(F){return $.attempt(ze8,V,V)(F)}function V(F){return d4(F)?u4($,A,"whitespace")(F):A(F)}function A(F){if(F===null||J4(F))return $.exit("definition"),G.parser.defined.push(J),Y(F);return X(F)}}function Ae8($,Y,X){return G;function G(Z){return J8(Z)?vE($,J)(Z):X(Z)}function J(Z){return l50($,Q,X,"definitionTitle","definitionTitleMarker","definitionTitleString")(Z)}function Q(Z){return d4(Z)?u4($,W,"whitespace")(Z):W(Z)}function W(Z){return Z===null||J4(Z)?Y(Z):X(Z)}}var dh0,ze8;var aJ4=V0(()=>{gh0();mh0();j$();uh0();ph0();i8();dh0={name:"definition",tokenize:Ve8},ze8={partial:!0,tokenize:Ae8}});function Fe8($,Y,X){return G;function G(Q){return $.enter("hardBreakEscape"),$.consume(Q),J}function J(Q){if(J4(Q))return $.exit("hardBreakEscape"),Y(Q);return X(Q)}}var ch0;var sJ4=V0(()=>{i8();ch0={name:"hardBreakEscape",tokenize:Fe8}});function De8($,Y){let X=$.length-2,G=3,J,Q;if($[G][1].type==="whitespace")G+=2;if(X-2>G&&$[X][1].type==="whitespace")X-=2;if($[X][1].type==="atxHeadingSequence"&&(G===X-1||X-4>G&&$[X-2][1].type==="whitespace"))X-=G+1===X?2:4;if(X>G)J={type:"atxHeadingText",start:$[G][1].start,end:$[X][1].end},Q={type:"chunkText",start:$[G][1].start,end:$[X][1].end,contentType:"text"},_$($,G,X-G+1,[["enter",J,Y],["enter",Q,Y],["exit",Q,Y],["exit",J,Y]]);return $}function Ne8($,Y,X){let G=0;return J;function J(z){return $.enter("atxHeading"),Q(z)}function Q(z){return $.enter("atxHeadingSequence"),W(z)}function W(z){if(z===35&&G++<6)return $.consume(z),W;if(z===null||J8(z))return $.exit("atxHeadingSequence"),Z(z);return X(z)}function Z(z){if(z===35)return $.enter("atxHeadingSequence"),K(z);if(z===null||J4(z))return $.exit("atxHeading"),Y(z);if(d4(z))return u4($,Z,"whitespace")(z);return $.enter("atxHeadingText"),H(z)}function K(z){if(z===35)return $.consume(z),K;return $.exit("atxHeadingSequence"),Z(z)}function H(z){if(z===null||z===35||J8(z))return $.exit("atxHeadingText"),Z(z);return $.consume(z),H}}var lh0;var oJ4=V0(()=>{j$();i8();lh0={name:"headingAtx",resolve:De8,tokenize:Ne8}});var tJ4,ih0;var eJ4=V0(()=>{tJ4=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ih0=["pre","script","style","textarea"]});function Oe8($){let Y=$.length;while(Y--)if($[Y][0]==="enter"&&$[Y][1].type==="htmlFlow")break;if(Y>1&&$[Y-2][1].type==="linePrefix")$[Y][1].start=$[Y-2][1].start,$[Y+1][1].start=$[Y-2][1].start,$.splice(Y-2,2);return $}function Ee8($,Y,X){let G=this,J,Q,W,Z,K;return H;function H(h){return z(h)}function z(h){return $.enter("htmlFlow"),$.enter("htmlFlowData"),$.consume(h),V}function V(h){if(h===33)return $.consume(h),A;if(h===47)return $.consume(h),Q=!0,D;if(h===63)return $.consume(h),J=3,G.interrupt?Y:b;if(DY(h))return $.consume(h),W=String.fromCharCode(h),L;return X(h)}function A(h){if(h===45)return $.consume(h),J=2,F;if(h===91)return $.consume(h),J=5,Z=0,N;if(DY(h))return $.consume(h),J=4,G.interrupt?Y:b;return X(h)}function F(h){if(h===45)return $.consume(h),G.interrupt?Y:b;return X(h)}function N(h){if(h==="CDATA[".charCodeAt(Z++)){if($.consume(h),Z===6)return G.interrupt?Y:k;return N}return X(h)}function D(h){if(DY(h))return $.consume(h),W=String.fromCharCode(h),L;return X(h)}function L(h){if(h===null||h===47||h===62||J8(h)){let n=h===47,t=W.toLowerCase();if(!n&&!Q&&ih0.includes(t))return J=1,G.interrupt?Y(h):k(h);if(tJ4.includes(W.toLowerCase())){if(J=6,n)return $.consume(h),B;return G.interrupt?Y(h):k(h)}return J=7,G.interrupt&&!G.parser.lazy[G.now().line]?X(h):Q?O(h):E(h)}if(h===45||NY(h))return $.consume(h),W+=String.fromCharCode(h),L;return X(h)}function B(h){if(h===62)return $.consume(h),G.interrupt?Y:k;return X(h)}function O(h){if(d4(h))return $.consume(h),O;return _(h)}function E(h){if(h===47)return $.consume(h),_;if(h===58||h===95||DY(h))return $.consume(h),M;if(d4(h))return $.consume(h),E;return _(h)}function M(h){if(h===45||h===46||h===58||h===95||NY(h))return $.consume(h),M;return R(h)}function R(h){if(h===61)return $.consume(h),q;if(d4(h))return $.consume(h),R;return E(h)}function q(h){if(h===null||h===60||h===61||h===62||h===96)return X(h);if(h===34||h===39)return $.consume(h),K=h,w;if(d4(h))return $.consume(h),q;return I(h)}function w(h){if(h===K)return $.consume(h),K=null,P;if(h===null||J4(h))return X(h);return $.consume(h),w}function I(h){if(h===null||h===34||h===39||h===47||h===60||h===61||h===62||h===96||J8(h))return R(h);return $.consume(h),I}function P(h){if(h===47||h===62||d4(h))return E(h);return X(h)}function _(h){if(h===62)return $.consume(h),C;return X(h)}function C(h){if(h===null||J4(h))return k(h);if(d4(h))return $.consume(h),C;return X(h)}function k(h){if(h===45&&J===2)return $.consume(h),x;if(h===60&&J===1)return $.consume(h),y;if(h===62&&J===4)return $.consume(h),g;if(h===63&&J===3)return $.consume(h),b;if(h===93&&J===5)return $.consume(h),u;if(J4(h)&&(J===6||J===7))return $.exit("htmlFlowData"),$.check(Le8,p,S)(h);if(h===null||J4(h))return $.exit("htmlFlowData"),S(h);return $.consume(h),k}function S(h){return $.check(Be8,T,p)(h)}function T(h){return $.enter("lineEnding"),$.consume(h),$.exit("lineEnding"),v}function v(h){if(h===null||J4(h))return S(h);return $.enter("htmlFlowData"),k(h)}function x(h){if(h===45)return $.consume(h),b;return k(h)}function y(h){if(h===47)return $.consume(h),W="",d;return k(h)}function d(h){if(h===62){let n=W.toLowerCase();if(ih0.includes(n))return $.consume(h),g;return k(h)}if(DY(h)&&W.length<8)return $.consume(h),W+=String.fromCharCode(h),d;return k(h)}function u(h){if(h===93)return $.consume(h),b;return k(h)}function b(h){if(h===62)return $.consume(h),g;if(h===45&&J===2)return $.consume(h),b;return k(h)}function g(h){if(h===null||J4(h))return $.exit("htmlFlowData"),p(h);return $.consume(h),g}function p(h){return $.exit("htmlFlow"),Y(h)}}function Me8($,Y,X){let G=this;return J;function J(W){if(J4(W))return $.enter("lineEnding"),$.consume(W),$.exit("lineEnding"),Q;return X(W)}function Q(W){return G.parser.lazy[G.now().line]?X(W):Y(W)}}function Re8($,Y,X){return G;function G(J){return $.enter("lineEnding"),$.consume(J),$.exit("lineEnding"),$.attempt(dU,Y,X)}}var nh0,Le8,Be8;var $Q4=V0(()=>{i8();eJ4();h50();nh0={concrete:!0,name:"htmlFlow",resolveTo:Oe8,tokenize:Ee8},Le8={partial:!0,tokenize:Re8},Be8={partial:!0,tokenize:Me8}});function qe8($,Y,X){let G=this,J,Q,W;return Z;function Z(b){return $.enter("htmlText"),$.enter("htmlTextData"),$.consume(b),K}function K(b){if(b===33)return $.consume(b),H;if(b===47)return $.consume(b),R;if(b===63)return $.consume(b),E;if(DY(b))return $.consume(b),I;return X(b)}function H(b){if(b===45)return $.consume(b),z;if(b===91)return $.consume(b),Q=0,N;if(DY(b))return $.consume(b),O;return X(b)}function z(b){if(b===45)return $.consume(b),F;return X(b)}function V(b){if(b===null)return X(b);if(b===45)return $.consume(b),A;if(J4(b))return W=V,y(b);return $.consume(b),V}function A(b){if(b===45)return $.consume(b),F;return V(b)}function F(b){return b===62?x(b):b===45?A(b):V(b)}function N(b){if(b==="CDATA[".charCodeAt(Q++))return $.consume(b),Q===6?D:N;return X(b)}function D(b){if(b===null)return X(b);if(b===93)return $.consume(b),L;if(J4(b))return W=D,y(b);return $.consume(b),D}function L(b){if(b===93)return $.consume(b),B;return D(b)}function B(b){if(b===62)return x(b);if(b===93)return $.consume(b),B;return D(b)}function O(b){if(b===null||b===62)return x(b);if(J4(b))return W=O,y(b);return $.consume(b),O}function E(b){if(b===null)return X(b);if(b===63)return $.consume(b),M;if(J4(b))return W=E,y(b);return $.consume(b),E}function M(b){return b===62?x(b):E(b)}function R(b){if(DY(b))return $.consume(b),q;return X(b)}function q(b){if(b===45||NY(b))return $.consume(b),q;return w(b)}function w(b){if(J4(b))return W=w,y(b);if(d4(b))return $.consume(b),w;return x(b)}function I(b){if(b===45||NY(b))return $.consume(b),I;if(b===47||b===62||J8(b))return P(b);return X(b)}function P(b){if(b===47)return $.consume(b),x;if(b===58||b===95||DY(b))return $.consume(b),_;if(J4(b))return W=P,y(b);if(d4(b))return $.consume(b),P;return x(b)}function _(b){if(b===45||b===46||b===58||b===95||NY(b))return $.consume(b),_;return C(b)}function C(b){if(b===61)return $.consume(b),k;if(J4(b))return W=C,y(b);if(d4(b))return $.consume(b),C;return P(b)}function k(b){if(b===null||b===60||b===61||b===62||b===96)return X(b);if(b===34||b===39)return $.consume(b),J=b,S;if(J4(b))return W=k,y(b);if(d4(b))return $.consume(b),k;return $.consume(b),T}function S(b){if(b===J)return $.consume(b),J=void 0,v;if(b===null)return X(b);if(J4(b))return W=S,y(b);return $.consume(b),S}function T(b){if(b===null||b===34||b===39||b===60||b===61||b===96)return X(b);if(b===47||b===62||J8(b))return P(b);return $.consume(b),T}function v(b){if(b===47||b===62||J8(b))return P(b);return X(b)}function x(b){if(b===62)return $.consume(b),$.exit("htmlTextData"),$.exit("htmlText"),Y;return X(b)}function y(b){return $.exit("htmlTextData"),$.enter("lineEnding"),$.consume(b),$.exit("lineEnding"),d}function d(b){return d4(b)?u4($,u,"linePrefix",G.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):u(b)}function u(b){return $.enter("htmlTextData"),W(b)}}var rh0;var YQ4=V0(()=>{j$();i8();rh0={name:"htmlText",tokenize:qe8}});function _e8($){let Y=-1,X=[];while(++Y<$.length){let G=$[Y][1];if(X.push($[Y]),G.type==="labelImage"||G.type==="labelLink"||G.type==="labelEnd"){let J=G.type==="labelImage"?4:2;G.type="data",Y+=J}}if($.length!==X.length)_$($,0,$.length,X);return $}function je8($,Y){let X=$.length,G=0,J,Q,W,Z;while(X--)if(J=$[X][1],Q){if(J.type==="link"||J.type==="labelLink"&&J._inactive)break;if($[X][0]==="enter"&&J.type==="labelLink")J._inactive=!0}else if(W){if($[X][0]==="enter"&&(J.type==="labelImage"||J.type==="labelLink")&&!J._balanced){if(Q=X,J.type!=="labelLink"){G=2;break}}}else if(J.type==="labelEnd")W=X;let K={type:$[Q][1].type==="labelLink"?"link":"image",start:{...$[Q][1].start},end:{...$[$.length-1][1].end}},H={type:"label",start:{...$[Q][1].start},end:{...$[W][1].end}},z={type:"labelText",start:{...$[Q+G+2][1].end},end:{...$[W-2][1].start}};return Z=[["enter",K,Y],["enter",H,Y]],Z=VJ(Z,$.slice(Q+1,Q+G+3)),Z=VJ(Z,[["enter",z,Y]]),Z=VJ(Z,_D(Y.parser.constructs.insideSpan.null,$.slice(Q+G+4,W-3),Y)),Z=VJ(Z,[["exit",z,Y],$[W-2],$[W-1],["exit",H,Y]]),Z=VJ(Z,$.slice(W+1)),Z=VJ(Z,[["exit",K,Y]]),_$($,Q,$.length,Z),$}function Te8($,Y,X){let G=this,J=G.events.length,Q,W;while(J--)if((G.events[J][1].type==="labelImage"||G.events[J][1].type==="labelLink")&&!G.events[J][1]._balanced){Q=G.events[J][1];break}return Z;function Z(A){if(!Q)return X(A);if(Q._inactive)return V(A);return W=G.parser.defined.includes(AG(G.sliceSerialize({start:Q.end,end:G.now()}))),$.enter("labelEnd"),$.enter("labelMarker"),$.consume(A),$.exit("labelMarker"),$.exit("labelEnd"),K}function K(A){if(A===40)return $.attempt(Ie8,z,W?z:V)(A);if(A===91)return $.attempt(Pe8,z,W?H:V)(A);return W?z(A):V(A)}function H(A){return $.attempt(we8,z,V)(A)}function z(A){return Y(A)}function V(A){return Q._balanced=!0,X(A)}}function Ce8($,Y,X){return G;function G(V){return $.enter("resource"),$.enter("resourceMarker"),$.consume(V),$.exit("resourceMarker"),J}function J(V){return J8(V)?vE($,Q)(V):Q(V)}function Q(V){if(V===41)return z(V);return d50($,W,Z,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(V)}function W(V){return J8(V)?vE($,K)(V):z(V)}function Z(V){return X(V)}function K(V){if(V===34||V===39||V===40)return l50($,H,X,"resourceTitle","resourceTitleMarker","resourceTitleString")(V);return z(V)}function H(V){return J8(V)?vE($,z)(V):z(V)}function z(V){if(V===41)return $.enter("resourceMarker"),$.consume(V),$.exit("resourceMarker"),$.exit("resource"),Y;return X(V)}}function Se8($,Y,X){let G=this;return J;function J(Z){return c50.call(G,$,Q,W,"reference","referenceMarker","referenceString")(Z)}function Q(Z){return G.parser.defined.includes(AG(G.sliceSerialize(G.events[G.events.length-1][1]).slice(1,-1)))?Y(Z):X(Z)}function W(Z){return X(Z)}}function ke8($,Y,X){return G;function G(Q){return $.enter("reference"),$.enter("referenceMarker"),$.consume(Q),$.exit("referenceMarker"),J}function J(Q){if(Q===93)return $.enter("referenceMarker"),$.consume(Q),$.exit("referenceMarker"),$.exit("reference"),Y;return X(Q)}}var xE,Ie8,Pe8,we8;var i50=V0(()=>{gh0();mh0();uh0();ph0();i8();xE={name:"labelEnd",resolveAll:_e8,resolveTo:je8,tokenize:Te8},Ie8={tokenize:Ce8},Pe8={tokenize:Se8},we8={tokenize:ke8}});function ve8($,Y,X){let G=this;return J;function J(Z){return $.enter("labelImage"),$.enter("labelImageMarker"),$.consume(Z),$.exit("labelImageMarker"),Q}function Q(Z){if(Z===91)return $.enter("labelMarker"),$.consume(Z),$.exit("labelMarker"),$.exit("labelImage"),W;return X(Z)}function W(Z){return Z===94&&"_hiddenFootnoteSupport"in G.parser.constructs?X(Z):Y(Z)}}var ah0;var XQ4=V0(()=>{i50();ah0={name:"labelStartImage",resolveAll:xE.resolveAll,tokenize:ve8}});function xe8($,Y,X){let G=this;return J;function J(W){return $.enter("labelLink"),$.enter("labelMarker"),$.consume(W),$.exit("labelMarker"),$.exit("labelLink"),Q}function Q(W){return W===94&&"_hiddenFootnoteSupport"in G.parser.constructs?X(W):Y(W)}}var sh0;var GQ4=V0(()=>{i50();sh0={name:"labelStartLink",resolveAll:xE.resolveAll,tokenize:xe8}});function ye8($,Y){return X;function X(G){return $.enter("lineEnding"),$.consume(G),$.exit("lineEnding"),u4($,Y,"linePrefix")}}var bm;var JQ4=V0(()=>{j$();bm={name:"lineEnding",tokenize:ye8}});function be8($,Y,X){let G=0,J;return Q;function Q(H){return $.enter("thematicBreak"),W(H)}function W(H){return J=H,Z(H)}function Z(H){if(H===J)return $.enter("thematicBreakSequence"),K(H);if(G>=3&&(H===null||J4(H)))return $.exit("thematicBreak"),Y(H);return X(H)}function K(H){if(H===J)return $.consume(H),G++,K;return $.exit("thematicBreakSequence"),d4(H)?u4($,Z,"whitespace")(H):Z(H)}}var yE;var oh0=V0(()=>{j$();i8();yE={name:"thematicBreak",tokenize:be8}});function ge8($,Y,X){let G=this,J=G.events[G.events.length-1],Q=J&&J[1].type==="linePrefix"?J[2].sliceSerialize(J[1],!0).length:0,W=0;return Z;function Z(F){let N=G.containerState.type||(F===42||F===43||F===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!G.containerState.marker||F===G.containerState.marker:Cm(F)){if(!G.containerState.type)G.containerState.type=N,$.enter(N,{_container:!0});if(N==="listUnordered")return $.enter("listItemPrefix"),F===42||F===45?$.check(yE,X,H)(F):H(F);if(!G.interrupt||F===49)return $.enter("listItemPrefix"),$.enter("listItemValue"),K(F)}return X(F)}function K(F){if(Cm(F)&&++W<10)return $.consume(F),K;if((!G.interrupt||W<2)&&(G.containerState.marker?F===G.containerState.marker:F===41||F===46))return $.exit("listItemValue"),H(F);return X(F)}function H(F){return $.enter("listItemMarker"),$.consume(F),$.exit("listItemMarker"),G.containerState.marker=G.containerState.marker||F,$.check(dU,G.interrupt?X:z,$.attempt(he8,A,V))}function z(F){return G.containerState.initialBlankLine=!0,Q++,A(F)}function V(F){if(d4(F))return $.enter("listItemPrefixWhitespace"),$.consume(F),$.exit("listItemPrefixWhitespace"),A;return X(F)}function A(F){return G.containerState.size=Q+G.sliceSerialize($.exit("listItemPrefix"),!0).length,Y(F)}}function me8($,Y,X){let G=this;return G.containerState._closeFlow=void 0,$.check(dU,J,Q);function J(Z){return G.containerState.furtherBlankLines=G.containerState.furtherBlankLines||G.containerState.initialBlankLine,u4($,Y,"listItemIndent",G.containerState.size+1)(Z)}function Q(Z){if(G.containerState.furtherBlankLines||!d4(Z))return G.containerState.furtherBlankLines=void 0,G.containerState.initialBlankLine=void 0,W(Z);return G.containerState.furtherBlankLines=void 0,G.containerState.initialBlankLine=void 0,$.attempt(fe8,Y,W)(Z)}function W(Z){return G.containerState._closeFlow=!0,G.interrupt=void 0,u4($,$.attempt(FG,Y,X),"linePrefix",G.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z)}}function ue8($,Y,X){let G=this;return u4($,J,"listItemIndent",G.containerState.size+1);function J(Q){let W=G.events[G.events.length-1];return W&&W[1].type==="listItemIndent"&&W[2].sliceSerialize(W[1],!0).length===G.containerState.size?Y(Q):X(Q)}}function pe8($){$.exit(this.containerState.type)}function de8($,Y,X){let G=this;return u4($,J,"listItemPrefixWhitespace",G.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function J(Q){let W=G.events[G.events.length-1];return!d4(Q)&&W&&W[1].type==="listItemPrefixWhitespace"?Y(Q):X(Q)}}var FG,he8,fe8;var QQ4=V0(()=>{j$();i8();h50();oh0();FG={continuation:{tokenize:me8},exit:pe8,name:"list",tokenize:ge8},he8={partial:!0,tokenize:de8},fe8={partial:!0,tokenize:ue8}});function ce8($,Y){let X=$.length,G,J,Q;while(X--)if($[X][0]==="enter"){if($[X][1].type==="content"){G=X;break}if($[X][1].type==="paragraph")J=X}else{if($[X][1].type==="content")$.splice(X,1);if(!Q&&$[X][1].type==="definition")Q=X}let W={type:"setextHeading",start:{...$[G][1].start},end:{...$[$.length-1][1].end}};if($[J][1].type="setextHeadingText",Q)$.splice(J,0,["enter",W,Y]),$.splice(Q+1,0,["exit",$[G][1],Y]),$[G][1].end={...$[Q][1].end};else $[G][1]=W;return $.push(["exit",W,Y]),$}function le8($,Y,X){let G=this,J;return Q;function Q(H){let z=G.events.length,V;while(z--)if(G.events[z][1].type!=="lineEnding"&&G.events[z][1].type!=="linePrefix"&&G.events[z][1].type!=="content"){V=G.events[z][1].type==="paragraph";break}if(!G.parser.lazy[G.now().line]&&(G.interrupt||V))return $.enter("setextHeadingLine"),J=H,W(H);return X(H)}function W(H){return $.enter("setextHeadingLineSequence"),Z(H)}function Z(H){if(H===J)return $.consume(H),Z;return $.exit("setextHeadingLineSequence"),d4(H)?u4($,K,"lineSuffix")(H):K(H)}function K(H){if(H===null||J4(H))return $.exit("setextHeadingLine"),Y(H);return X(H)}}var n50;var WQ4=V0(()=>{j$();i8();n50={name:"setextUnderline",resolveTo:ce8,tokenize:le8}});var r50=V0(()=>{gJ4();mJ4();h50();uJ4();pJ4();dJ4();lJ4();iJ4();nJ4();rJ4();aJ4();sJ4();oJ4();$Q4();YQ4();i50();XQ4();GQ4();JQ4();QQ4();WQ4();oh0()});function th0(){return{document:{[91]:{name:"gfmFootnoteDefinition",tokenize:se8,continuation:{tokenize:oe8},exit:te8}},text:{[91]:{name:"gfmFootnoteCall",tokenize:ae8},[93]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ne8,resolveTo:re8}}}}function ne8($,Y,X){let G=this,J=G.events.length,Q=G.parser.gfmFootnotes||(G.parser.gfmFootnotes=[]),W;while(J--){let K=G.events[J][1];if(K.type==="labelImage"){W=K;break}if(K.type==="gfmFootnoteCall"||K.type==="labelLink"||K.type==="label"||K.type==="image"||K.type==="link")break}return Z;function Z(K){if(!W||!W._balanced)return X(K);let H=AG(G.sliceSerialize({start:W.end,end:G.now()}));if(H.codePointAt(0)!==94||!Q.includes(H.slice(1)))return X(K);return $.enter("gfmFootnoteCallLabelMarker"),$.consume(K),$.exit("gfmFootnoteCallLabelMarker"),Y(K)}}function re8($,Y){let X=$.length,G;while(X--)if($[X][1].type==="labelImage"&&$[X][0]==="enter"){G=$[X][1];break}$[X+1][1].type="data",$[X+3][1].type="gfmFootnoteCallLabelMarker";let J={type:"gfmFootnoteCall",start:Object.assign({},$[X+3][1].start),end:Object.assign({},$[$.length-1][1].end)},Q={type:"gfmFootnoteCallMarker",start:Object.assign({},$[X+3][1].end),end:Object.assign({},$[X+3][1].end)};Q.end.column++,Q.end.offset++,Q.end._bufferIndex++;let W={type:"gfmFootnoteCallString",start:Object.assign({},Q.end),end:Object.assign({},$[$.length-1][1].start)},Z={type:"chunkString",contentType:"string",start:Object.assign({},W.start),end:Object.assign({},W.end)},K=[$[X+1],$[X+2],["enter",J,Y],$[X+3],$[X+4],["enter",Q,Y],["exit",Q,Y],["enter",W,Y],["enter",Z,Y],["exit",Z,Y],["exit",W,Y],$[$.length-2],$[$.length-1],["exit",J,Y]];return $.splice(X,$.length-X+1,...K),$}function ae8($,Y,X){let G=this,J=G.parser.gfmFootnotes||(G.parser.gfmFootnotes=[]),Q=0,W;return Z;function Z(V){return $.enter("gfmFootnoteCall"),$.enter("gfmFootnoteCallLabelMarker"),$.consume(V),$.exit("gfmFootnoteCallLabelMarker"),K}function K(V){if(V!==94)return X(V);return $.enter("gfmFootnoteCallMarker"),$.consume(V),$.exit("gfmFootnoteCallMarker"),$.enter("gfmFootnoteCallString"),$.enter("chunkString").contentType="string",H}function H(V){if(Q>999||V===93&&!W||V===null||V===91||J8(V))return X(V);if(V===93){$.exit("chunkString");let A=$.exit("gfmFootnoteCallString");if(!J.includes(AG(G.sliceSerialize(A))))return X(V);return $.enter("gfmFootnoteCallLabelMarker"),$.consume(V),$.exit("gfmFootnoteCallLabelMarker"),$.exit("gfmFootnoteCall"),Y}if(!J8(V))W=!0;return Q++,$.consume(V),V===92?z:H}function z(V){if(V===91||V===92||V===93)return $.consume(V),Q++,H;return H(V)}}function se8($,Y,X){let G=this,J=G.parser.gfmFootnotes||(G.parser.gfmFootnotes=[]),Q,W=0,Z;return K;function K(N){return $.enter("gfmFootnoteDefinition")._container=!0,$.enter("gfmFootnoteDefinitionLabel"),$.enter("gfmFootnoteDefinitionLabelMarker"),$.consume(N),$.exit("gfmFootnoteDefinitionLabelMarker"),H}function H(N){if(N===94)return $.enter("gfmFootnoteDefinitionMarker"),$.consume(N),$.exit("gfmFootnoteDefinitionMarker"),$.enter("gfmFootnoteDefinitionLabelString"),$.enter("chunkString").contentType="string",z;return X(N)}function z(N){if(W>999||N===93&&!Z||N===null||N===91||J8(N))return X(N);if(N===93){$.exit("chunkString");let D=$.exit("gfmFootnoteDefinitionLabelString");return Q=AG(G.sliceSerialize(D)),$.enter("gfmFootnoteDefinitionLabelMarker"),$.consume(N),$.exit("gfmFootnoteDefinitionLabelMarker"),$.exit("gfmFootnoteDefinitionLabel"),A}if(!J8(N))Z=!0;return W++,$.consume(N),N===92?V:z}function V(N){if(N===91||N===92||N===93)return $.consume(N),W++,z;return z(N)}function A(N){if(N===58){if($.enter("definitionMarker"),$.consume(N),$.exit("definitionMarker"),!J.includes(Q))J.push(Q);return u4($,F,"gfmFootnoteDefinitionWhitespace")}return X(N)}function F(N){return Y(N)}}function oe8($,Y,X){return $.check(dU,Y,$.attempt(ie8,Y,X))}function te8($){$.exit("gfmFootnoteDefinition")}function ee8($,Y,X){let G=this;return u4($,J,"gfmFootnoteDefinitionIndent",5);function J(Q){let W=G.events[G.events.length-1];return W&&W[1].type==="gfmFootnoteDefinitionIndent"&&W[2].sliceSerialize(W[1],!0).length===4?Y(Q):X(Q)}}var ie8;var ZQ4=V0(()=>{r50();j$();i8();ie8={tokenize:ee8,partial:!0}});var KQ4=V0(()=>{ZQ4()});function eh0($){let X=($||{}).singleTilde,G={name:"strikethrough",tokenize:Q,resolveAll:J};if(X===null||X===void 0)X=!0;return{text:{[126]:G},insideSpan:{null:[G]},attentionMarkers:{null:[126]}};function J(W,Z){let K=-1;while(++K<W.length)if(W[K][0]==="enter"&&W[K][1].type==="strikethroughSequenceTemporary"&&W[K][1]._close){let H=K;while(H--)if(W[H][0]==="exit"&&W[H][1].type==="strikethroughSequenceTemporary"&&W[H][1]._open&&W[K][1].end.offset-W[K][1].start.offset===W[H][1].end.offset-W[H][1].start.offset){W[K][1].type="strikethroughSequence",W[H][1].type="strikethroughSequence";let z={type:"strikethrough",start:Object.assign({},W[H][1].start),end:Object.assign({},W[K][1].end)},V={type:"strikethroughText",start:Object.assign({},W[H][1].end),end:Object.assign({},W[K][1].start)},A=[["enter",z,Z],["enter",W[H][1],Z],["exit",W[H][1],Z],["enter",V,Z]],F=Z.parser.constructs.insideSpan.null;if(F)_$(A,A.length,0,_D(F,W.slice(H+1,K),Z));_$(A,A.length,0,[["exit",V,Z],["enter",W[K][1],Z],["exit",W[K][1],Z],["exit",z,Z]]),_$(W,H-1,K-H+3,A),K=H+A.length-2;break}}K=-1;while(++K<W.length)if(W[K][1].type==="strikethroughSequenceTemporary")W[K][1].type="data";return W}function Q(W,Z,K){let H=this.previous,z=this.events,V=0;return A;function A(N){if(H===126&&z[z.length-1][1].type!=="characterEscape")return K(N);return W.enter("strikethroughSequenceTemporary"),F(N)}function F(N){let D=zV(H);if(N===126){if(V>1)return K(N);return W.consume(N),V++,F}if(V<2&&!X)return K(N);let L=W.exit("strikethroughSequenceTemporary"),B=zV(N);return L._open=!B||B===2&&Boolean(D),L._close=!D||D===2&&Boolean(B),Z(N)}}}var UQ4=V0(()=>{T50()});var HQ4=V0(()=>{UQ4()});class $f0{constructor(){this.map=[]}add($,Y,X){$09(this,$,Y,X)}consume($){if(this.map.sort(function(J,Q){return J[0]-Q[0]}),this.map.length===0)return;let Y=this.map.length,X=[];while(Y>0)Y-=1,X.push($.slice(this.map[Y][0]+this.map[Y][1]),this.map[Y][2]),$.length=this.map[Y][0];X.push($.slice()),$.length=0;let G=X.pop();while(G){for(let J of G)$.push(J);G=X.pop()}this.map.length=0}}function $09($,Y,X,G){let J=0;if(X===0&&G.length===0)return;while(J<$.map.length){if($.map[J][0]===Y){$.map[J][1]+=X,$.map[J][2].push(...G);return}J+=1}$.map.push([Y,X,G])}function zQ4($,Y){let X=!1,G=[];while(Y<$.length){let J=$[Y];if(X){if(J[0]==="enter"){if(J[1].type==="tableContent")G.push($[Y+1][1].type==="tableDelimiterMarker"?"left":"none")}else if(J[1].type==="tableContent"){if($[Y-1][1].type==="tableDelimiterMarker"){let Q=G.length-1;G[Q]=G[Q]==="left"?"center":"right"}}else if(J[1].type==="tableDelimiterRow")break}else if(J[0]==="enter"&&J[1].type==="tableDelimiterRow")X=!0;Y+=1}return G}function Yf0(){return{flow:{null:{name:"table",tokenize:Y09,resolveAll:X09}}}}function Y09($,Y,X){let G=this,J=0,Q=0,W;return Z;function Z(_){let C=G.events.length-1;while(C>-1){let T=G.events[C][1].type;if(T==="lineEnding"||T==="linePrefix")C--;else break}let k=C>-1?G.events[C][1].type:null,S=k==="tableHead"||k==="tableRow"?q:K;if(S===q&&G.parser.lazy[G.now().line])return X(_);return S(_)}function K(_){return $.enter("tableHead"),$.enter("tableRow"),H(_)}function H(_){if(_===124)return z(_);return W=!0,Q+=1,z(_)}function z(_){if(_===null)return X(_);if(J4(_)){if(Q>1)return Q=0,G.interrupt=!0,$.exit("tableRow"),$.enter("lineEnding"),$.consume(_),$.exit("lineEnding"),F;return X(_)}if(d4(_))return u4($,z,"whitespace")(_);if(Q+=1,W)W=!1,J+=1;if(_===124)return $.enter("tableCellDivider"),$.consume(_),$.exit("tableCellDivider"),W=!0,z;return $.enter("data"),V(_)}function V(_){if(_===null||_===124||J8(_))return $.exit("data"),z(_);return $.consume(_),_===92?A:V}function A(_){if(_===92||_===124)return $.consume(_),V;return V(_)}function F(_){if(G.interrupt=!1,G.parser.lazy[G.now().line])return X(_);if($.enter("tableDelimiterRow"),W=!1,d4(_))return u4($,N,"linePrefix",G.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_);return N(_)}function N(_){if(_===45||_===58)return L(_);if(_===124)return W=!0,$.enter("tableCellDivider"),$.consume(_),$.exit("tableCellDivider"),D;return R(_)}function D(_){if(d4(_))return u4($,L,"whitespace")(_);return L(_)}function L(_){if(_===58)return Q+=1,W=!0,$.enter("tableDelimiterMarker"),$.consume(_),$.exit("tableDelimiterMarker"),B;if(_===45)return Q+=1,B(_);if(_===null||J4(_))return M(_);return R(_)}function B(_){if(_===45)return $.enter("tableDelimiterFiller"),O(_);return R(_)}function O(_){if(_===45)return $.consume(_),O;if(_===58)return W=!0,$.exit("tableDelimiterFiller"),$.enter("tableDelimiterMarker"),$.consume(_),$.exit("tableDelimiterMarker"),E;return $.exit("tableDelimiterFiller"),E(_)}function E(_){if(d4(_))return u4($,M,"whitespace")(_);return M(_)}function M(_){if(_===124)return N(_);if(_===null||J4(_)){if(!W||J!==Q)return R(_);return $.exit("tableDelimiterRow"),$.exit("tableHead"),Y(_)}return R(_)}function R(_){return X(_)}function q(_){return $.enter("tableRow"),w(_)}function w(_){if(_===124)return $.enter("tableCellDivider"),$.consume(_),$.exit("tableCellDivider"),w;if(_===null||J4(_))return $.exit("tableRow"),Y(_);if(d4(_))return u4($,w,"whitespace")(_);return $.enter("data"),I(_)}function I(_){if(_===null||_===124||J8(_))return $.exit("data"),w(_);return $.consume(_),_===92?P:I}function P(_){if(_===92||_===124)return $.consume(_),I;return I(_)}}function X09($,Y){let X=-1,G=!0,J=0,Q=[0,0,0,0],W=[0,0,0,0],Z=!1,K=0,H,z,V,A=new $f0;while(++X<$.length){let F=$[X],N=F[1];if(F[0]==="enter"){if(N.type==="tableHead"){if(Z=!1,K!==0)VQ4(A,Y,K,H,z),z=void 0,K=0;H={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},A.add(X,0,[["enter",H,Y]])}else if(N.type==="tableRow"||N.type==="tableDelimiterRow"){if(G=!0,V=void 0,Q=[0,0,0,0],W=[0,X+1,0,0],Z)Z=!1,z={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},A.add(X,0,[["enter",z,Y]]);J=N.type==="tableDelimiterRow"?2:z?3:1}else if(J&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")){if(G=!1,W[2]===0){if(Q[1]!==0)W[0]=W[1],V=a50(A,Y,Q,J,void 0,V),Q=[0,0,0,0];W[2]=X}}else if(N.type==="tableCellDivider")if(G)G=!1;else{if(Q[1]!==0)W[0]=W[1],V=a50(A,Y,Q,J,void 0,V);Q=W,W=[Q[1],X,0,0]}}else if(N.type==="tableHead")Z=!0,K=X;else if(N.type==="tableRow"||N.type==="tableDelimiterRow"){if(K=X,Q[1]!==0)W[0]=W[1],V=a50(A,Y,Q,J,X,V);else if(W[1]!==0)V=a50(A,Y,W,J,X,V);J=0}else if(J&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller"))W[3]=X}if(K!==0)VQ4(A,Y,K,H,z);A.consume(Y.events),X=-1;while(++X<Y.events.length){let F=Y.events[X];if(F[0]==="enter"&&F[1].type==="table")F[1]._align=zQ4(Y.events,X)}return $}function a50($,Y,X,G,J,Q){let W=G===1?"tableHeader":G===2?"tableDelimiter":"tableData",Z="tableContent";if(X[0]!==0)Q.end=Object.assign({},Bj(Y.events,X[0])),$.add(X[0],0,[["exit",Q,Y]]);let K=Bj(Y.events,X[1]);if(Q={type:W,start:Object.assign({},K),end:Object.assign({},K)},$.add(X[1],0,[["enter",Q,Y]]),X[2]!==0){let H=Bj(Y.events,X[2]),z=Bj(Y.events,X[3]),V={type:"tableContent",start:Object.assign({},H),end:Object.assign({},z)};if($.add(X[2],0,[["enter",V,Y]]),G!==2){let A=Y.events[X[2]],F=Y.events[X[3]];if(A[1].end=Object.assign({},F[1].end),A[1].type="chunkText",A[1].contentType="text",X[3]>X[2]+1){let N=X[2]+1,D=X[3]-X[2]-1;$.add(N,D,[])}}$.add(X[3]+1,0,[["exit",V,Y]])}if(J!==void 0)Q.end=Object.assign({},Bj(Y.events,J)),$.add(J,0,[["exit",Q,Y]]),Q=void 0;return Q}function VQ4($,Y,X,G,J){let Q=[],W=Bj(Y.events,X);if(J)J.end=Object.assign({},W),Q.push(["exit",J,Y]);G.end=Object.assign({},W),Q.push(["exit",G,Y]),$.add(X+1,0,Q)}function Bj($,Y){let X=$[Y],G=X[0]==="enter"?"start":"end";return X[1][G]}var AQ4=V0(()=>{j$();i8()});var FQ4=V0(()=>{AQ4()});function Xf0(){return{text:{[91]:G09}}}function J09($,Y,X){let G=this;return J;function J(K){if(G.previous!==null||!G._gfmTasklistFirstContentOfListItem)return X(K);return $.enter("taskListCheck"),$.enter("taskListCheckMarker"),$.consume(K),$.exit("taskListCheckMarker"),Q}function Q(K){if(J8(K))return $.enter("taskListCheckValueUnchecked"),$.consume(K),$.exit("taskListCheckValueUnchecked"),W;if(K===88||K===120)return $.enter("taskListCheckValueChecked"),$.consume(K),$.exit("taskListCheckValueChecked"),W;return X(K)}function W(K){if(K===93)return $.enter("taskListCheckMarker"),$.consume(K),$.exit("taskListCheckMarker"),$.exit("taskListCheck"),Z;return X(K)}function Z(K){if(J4(K))return Y(K);if(d4(K))return $.check({tokenize:Q09},Y,X)(K);return X(K)}}function Q09($,Y,X){return u4($,G,"whitespace");function G(J){return J===null?X(J):Y(J)}}var G09;var DQ4=V0(()=>{j$();i8();G09={name:"tasklistCheck",tokenize:J09}});var NQ4=V0(()=>{DQ4()});function LQ4($){return b50([kh0(),th0(),eh0($),Yf0(),Xf0()])}var BQ4=V0(()=>{Ch0();hJ4();KQ4();HQ4();FQ4();NQ4()});function hm($){let Y=this,X=$||W09,G=Y.data(),J=G.micromarkExtensions||(G.micromarkExtensions=[]),Q=G.fromMarkdownExtensions||(G.fromMarkdownExtensions=[]),W=G.toMarkdownExtensions||(G.toMarkdownExtensions=[]);J.push(LQ4(X)),Q.push(jh0()),W.push(Th0(X))}var W09;var OQ4=V0(()=>{wJ4();BQ4();W09={}});var EQ4=V0(()=>{OQ4()});function Z09($){let Y=$.attempt(this.parser.constructs.contentInitial,G,J),X;return Y;function G(Z){if(Z===null){$.consume(Z);return}return $.enter("lineEnding"),$.consume(Z),$.exit("lineEnding"),u4($,Y,"linePrefix")}function J(Z){return $.enter("paragraph"),Q(Z)}function Q(Z){let K=$.enter("chunkText",{contentType:"text",previous:X});if(X)X.next=K;return X=K,W(Z)}function W(Z){if(Z===null){$.exit("chunkText"),$.exit("paragraph"),$.consume(Z);return}if(J4(Z))return $.consume(Z),$.exit("chunkText"),Q;return $.consume(Z),W}}var MQ4;var RQ4=V0(()=>{j$();i8();MQ4={tokenize:Z09}});function K09($){let Y=this,X=[],G=0,J,Q,W;return Z;function Z(E){if(G<X.length){let M=X[G];return Y.containerState=M[1],$.attempt(M[0].continuation,K,H)(E)}return H(E)}function K(E){if(G++,Y.containerState._closeFlow){if(Y.containerState._closeFlow=void 0,J)O();let M=Y.events.length,R=M,q;while(R--)if(Y.events[R][0]==="exit"&&Y.events[R][1].type==="chunkFlow"){q=Y.events[R][1].end;break}B(G);let w=M;while(w<Y.events.length)Y.events[w][1].end={...q},w++;return _$(Y.events,R+1,0,Y.events.slice(M)),Y.events.length=w,H(E)}return Z(E)}function H(E){if(G===X.length){if(!J)return A(E);if(J.currentConstruct&&J.currentConstruct.concrete)return N(E);Y.interrupt=Boolean(J.currentConstruct&&!J._gfmTableDynamicInterruptHack)}return Y.containerState={},$.check(qQ4,z,V)(E)}function z(E){if(J)O();return B(G),A(E)}function V(E){return Y.parser.lazy[Y.now().line]=G!==X.length,W=Y.now().offset,N(E)}function A(E){return Y.containerState={},$.attempt(qQ4,F,N)(E)}function F(E){return G++,X.push([Y.currentConstruct,Y.containerState]),A(E)}function N(E){if(E===null){if(J)O();B(0),$.consume(E);return}return J=J||Y.parser.flow(Y.now()),$.enter("chunkFlow",{_tokenizer:J,contentType:"flow",previous:Q}),D(E)}function D(E){if(E===null){L($.exit("chunkFlow"),!0),B(0),$.consume(E);return}if(J4(E))return $.consume(E),L($.exit("chunkFlow")),G=0,Y.interrupt=void 0,Z;return $.consume(E),D}function L(E,M){let R=Y.sliceStream(E);if(M)R.push(null);if(E.previous=Q,Q)Q.next=E;if(Q=E,J.defineSkip(E.start),J.write(R),Y.parser.lazy[E.start.line]){let q=J.events.length;while(q--)if(J.events[q][1].start.offset<W&&(!J.events[q][1].end||J.events[q][1].end.offset>W))return;let w=Y.events.length,I=w,P,_;while(I--)if(Y.events[I][0]==="exit"&&Y.events[I][1].type==="chunkFlow"){if(P){_=Y.events[I][1].end;break}P=!0}B(G),q=w;while(q<Y.events.length)Y.events[q][1].end={..._},q++;_$(Y.events,I+1,0,Y.events.slice(w)),Y.events.length=q}}function B(E){let M=X.length;while(M-- >E){let R=X[M];Y.containerState=R[1],R[0].exit.call(Y,$)}X.length=E}function O(){J.write([null]),Q=void 0,J=void 0,Y.containerState._closeFlow=void 0}}function U09($,Y,X){return u4($,$.attempt(this.parser.constructs.document,Y,X),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var IQ4,qQ4;var PQ4=V0(()=>{j$();i8();IQ4={tokenize:K09},qQ4={tokenize:U09}});function H09($){let Y=this,X=$.attempt(dU,G,$.attempt(this.parser.constructs.flowInitial,J,u4($,$.attempt(this.parser.constructs.flow,J,$.attempt(fh0,J)),"linePrefix")));return X;function G(Q){if(Q===null){$.consume(Q);return}return $.enter("lineEndingBlank"),$.consume(Q),$.exit("lineEndingBlank"),Y.currentConstruct=void 0,X}function J(Q){if(Q===null){$.consume(Q);return}return $.enter("lineEnding"),$.consume(Q),$.exit("lineEnding"),Y.currentConstruct=void 0,X}}var wQ4;var _Q4=V0(()=>{r50();j$();wQ4={tokenize:H09}});function SQ4($){return{resolveAll:kQ4($==="text"?z09:void 0),tokenize:Y};function Y(X){let G=this,J=this.parser.constructs[$],Q=X.attempt(J,W,Z);return W;function W(z){return H(z)?Q(z):Z(z)}function Z(z){if(z===null){X.consume(z);return}return X.enter("data"),X.consume(z),K}function K(z){if(H(z))return X.exit("data"),Q(z);return X.consume(z),K}function H(z){if(z===null)return!0;let V=J[z],A=-1;if(V)while(++A<V.length){let F=V[A];if(!F.previous||F.previous.call(G,G.previous))return!0}return!1}}}function kQ4($){return Y;function Y(X,G){let J=-1,Q;while(++J<=X.length)if(Q===void 0){if(X[J]&&X[J][1].type==="data")Q=J,J++}else if(!X[J]||X[J][1].type!=="data"){if(J!==Q+2)X[Q][1].end=X[J-1][1].end,X.splice(Q+2,J-Q-2),J=Q+2;Q=void 0}return $?$(X,G):X}}function z09($,Y){let X=0;while(++X<=$.length)if((X===$.length||$[X][1].type==="lineEnding")&&$[X-1][1].type==="data"){let G=$[X-1][1],J=Y.sliceStream(G),Q=J.length,W=-1,Z=0,K;while(Q--){let H=J[Q];if(typeof H==="string"){W=H.length;while(H.charCodeAt(W-1)===32)Z++,W--;if(W)break;W=-1}else if(H===-2)K=!0,Z++;else if(H===-1);else{Q++;break}}if(Y._contentTypeTextTrailing&&X===$.length)Z=0;if(Z){let H={type:X===$.length||K||Z<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:Q?W:G.start._bufferIndex+W,_index:G.start._index+Q,line:G.end.line,column:G.end.column-Z,offset:G.end.offset-Z},end:{...G.end}};if(G.end={...H.start},G.start.offset===G.end.offset)Object.assign(G,H);else $.splice(X,0,["enter",H,Y],["exit",H,Y]),X+=2}X++}return $}var jQ4,TQ4,CQ4;var Gf0=V0(()=>{jQ4={resolveAll:kQ4()},TQ4=SQ4("string"),CQ4=SQ4("text")});var Jf0={};W8(Jf0,{text:()=>L09,string:()=>N09,insideSpan:()=>B09,flowInitial:()=>F09,flow:()=>D09,document:()=>V09,disable:()=>E09,contentInitial:()=>A09,attentionMarkers:()=>O09});var V09,A09,F09,D09,N09,L09,B09,O09,E09;var vQ4=V0(()=>{r50();Gf0();V09={[42]:FG,[43]:FG,[45]:FG,[48]:FG,[49]:FG,[50]:FG,[51]:FG,[52]:FG,[53]:FG,[54]:FG,[55]:FG,[56]:FG,[57]:FG,[62]:f50},A09={[91]:dh0},F09={[-2]:xm,[-1]:xm,[32]:xm},D09={[35]:lh0,[42]:yE,[45]:[n50,yE],[60]:nh0,[61]:n50,[95]:yE,[96]:u50,[126]:u50},N09={[38]:m50,[92]:g50},L09={[-5]:bm,[-4]:bm,[-3]:bm,[33]:ah0,[38]:m50,[42]:vm,[60]:[xh0,rh0],[91]:sh0,[92]:[ch0,g50],[93]:xE,[95]:vm,[96]:yh0},B09={null:[vm,jQ4]},O09={null:[42,95]},E09={null:[]}});function xQ4($,Y,X){let G={_bufferIndex:-1,_index:0,line:X&&X.line||1,column:X&&X.column||1,offset:X&&X.offset||0},J={},Q=[],W=[],Z=[],K=!0,H={attempt:P(w),check:P(I),consume:M,enter:R,exit:q,interrupt:P(I,{interrupt:!0})},z={code:null,containerState:{},defineSkip:B,events:[],now:L,parser:$,previous:null,sliceSerialize:N,sliceStream:D,write:F},V=Y.tokenize.call(z,H),A;if(Y.resolveAll)Q.push(Y);return z;function F(S){if(W=VJ(W,S),O(),W[W.length-1]!==null)return[];return _(Y,0),z.events=_D(Q,z.events,z),z.events}function N(S,T){return R09(D(S),T)}function D(S){return M09(W,S)}function L(){let{_bufferIndex:S,_index:T,line:v,column:x,offset:y}=G;return{_bufferIndex:S,_index:T,line:v,column:x,offset:y}}function B(S){J[S.line]=S.column,k()}function O(){let S;while(G._index<W.length){let T=W[G._index];if(typeof T==="string"){if(S=G._index,G._bufferIndex<0)G._bufferIndex=0;while(G._index===S&&G._bufferIndex<T.length)E(T.charCodeAt(G._bufferIndex))}else E(T)}}function E(S){K=void 0,A=S,V=V(S)}function M(S){if(J4(S))G.line++,G.column=1,G.offset+=S===-3?2:1,k();else if(S!==-1)G.column++,G.offset++;if(G._bufferIndex<0)G._index++;else if(G._bufferIndex++,G._bufferIndex===W[G._index].length)G._bufferIndex=-1,G._index++;z.previous=S,K=!0}function R(S,T){let v=T||{};return v.type=S,v.start=L(),z.events.push(["enter",v,z]),Z.push(v),v}function q(S){let T=Z.pop();return T.end=L(),z.events.push(["exit",T,z]),T}function w(S,T){_(S,T.from)}function I(S,T){T.restore()}function P(S,T){return v;function v(x,y,d){let u,b,g,p;return Array.isArray(x)?n(x):("tokenize"in x)?n([x]):h(x);function h(X0){return a;function a(Q0){let e=Q0!==null&&X0[Q0],m=Q0!==null&&X0.null,$0=[...Array.isArray(e)?e:e?[e]:[],...Array.isArray(m)?m:m?[m]:[]];return n($0)(Q0)}}function n(X0){if(u=X0,b=0,X0.length===0)return d;return t(X0[b])}function t(X0){return a;function a(Q0){if(p=C(),g=X0,!X0.partial)z.currentConstruct=X0;if(X0.name&&z.parser.constructs.disable.null.includes(X0.name))return Z0(Q0);return X0.tokenize.call(T?Object.assign(Object.create(z),T):z,H,s,Z0)(Q0)}}function s(X0){return K=!0,S(g,p),y}function Z0(X0){if(K=!0,p.restore(),++b<u.length)return t(u[b]);return d}}}function _(S,T){if(S.resolveAll&&!Q.includes(S))Q.push(S);if(S.resolve)_$(z.events,T,z.events.length-T,S.resolve(z.events.slice(T),z));if(S.resolveTo)z.events=S.resolveTo(z.events,z)}function C(){let S=L(),T=z.previous,v=z.currentConstruct,x=z.events.length,y=Array.from(Z);return{from:x,restore:d};function d(){G=S,z.previous=T,z.currentConstruct=v,z.events.length=x,Z=y,k()}}function k(){if(G.line in J&&G.column<2)G.column=J[G.line],G.offset+=J[G.line]-1}}function M09($,Y){let X=Y.start._index,G=Y.start._bufferIndex,J=Y.end._index,Q=Y.end._bufferIndex,W;if(X===J)W=[$[X].slice(G,Q)];else{if(W=$.slice(X,J),G>-1){let Z=W[0];if(typeof Z==="string")W[0]=Z.slice(G);else W.shift()}if(Q>0)W.push($[J].slice(0,Q))}return W}function R09($,Y){let X=-1,G=[],J;while(++X<$.length){let Q=$[X],W;if(typeof Q==="string")W=Q;else switch(Q){case-5:{W="\r";break}case-4:{W=`
`;break}case-3:{W=`\r
`;break}case-2:{W=Y?" ":"\t";break}case-1:{if(!Y&&J)continue;W=" ";break}default:W=String.fromCharCode(Q)}J=Q===-2,G.push(W)}return G.join("")}var yQ4=V0(()=>{i8()});function Qf0($){let G={constructs:b50([Jf0,...($||{}).extensions||[]]),content:J(MQ4),defined:[],document:J(IQ4),flow:J(wQ4),lazy:{},string:J(TQ4),text:J(CQ4)};return G;function J(Q){return W;function W(Z){return xQ4(G,Q,Z)}}}var bQ4=V0(()=>{Ch0();RQ4();PQ4();_Q4();Gf0();vQ4();yQ4()});function Wf0($){while(!p50($));return $}var hQ4=V0(()=>{hh0()});function Zf0(){let $=1,Y="",X=!0,G;return J;function J(Q,W,Z){let K=[],H,z,V,A,F;if(Q=Y+(typeof Q==="string"?Q.toString():new TextDecoder(W||void 0).decode(Q)),V=0,Y="",X){if(Q.charCodeAt(0)===65279)V++;X=void 0}while(V<Q.length){if(fQ4.lastIndex=V,H=fQ4.exec(Q),A=H&&H.index!==void 0?H.index:Q.length,F=Q.charCodeAt(A),!H){Y=Q.slice(V);break}if(F===10&&V===A&&G)K.push(-3),G=void 0;else{if(G)K.push(-5),G=void 0;if(V<A)K.push(Q.slice(V,A)),$+=A-V;switch(F){case 0:{K.push(65533),$++;break}case 9:{z=Math.ceil($/4)*4,K.push(-2);while($++<z)K.push(-1);break}case 10:{K.push(-4),$=1;break}default:G=!0,$=1}}V=A+1}if(Z){if(G)K.push(-5);if(Y)K.push(Y);K.push(null)}return K}}var fQ4;var gQ4=V0(()=>{fQ4=/[\0\t\n\r]/g});var mQ4=V0(()=>{bQ4();hQ4();gQ4()});function jD($){if(!$||typeof $!=="object")return"";if("position"in $||"type"in $)return uQ4($.position);if("start"in $||"end"in $)return uQ4($);if("line"in $||"column"in $)return Kf0($);return""}function Kf0($){return pQ4($&&$.line)+":"+pQ4($&&$.column)}function uQ4($){return Kf0($&&$.start)+"-"+Kf0($&&$.end)}function pQ4($){return $&&typeof $==="number"?$:1}var Uf0=()=>{};function Hf0($,Y,X){if(Y&&typeof Y==="object")X=Y,Y=void 0;return q09(X)(Wf0(Qf0(X).document().write(Zf0()($,Y,!0))))}function q09($){let Y={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:Q(R0),autolinkProtocol:P,autolinkEmail:P,atxHeading:Q(K0),blockQuote:Q(Q0),characterEscape:P,characterReference:P,codeFenced:Q(e),codeFencedFenceInfo:W,codeFencedFenceMeta:W,codeIndented:Q(e,W),codeText:Q(m,W),codeTextData:P,data:P,codeFlowValue:P,definition:Q($0),definitionDestinationString:W,definitionLabelString:W,definitionTitleString:W,emphasis:Q(Y0),hardBreakEscape:Q(A0),hardBreakTrailing:Q(A0),htmlFlow:Q(D0,W),htmlFlowData:P,htmlText:Q(D0,W),htmlTextData:P,image:Q(O0),label:W,link:Q(R0),listItem:Q(g0),listItemValue:A,listOrdered:Q(I0,V),listUnordered:Q(I0),paragraph:Q(p0),reference:h,referenceString:W,resourceDestinationString:W,resourceTitleString:W,setextHeading:Q(K0),strong:Q(U4),thematicBreak:Q(d1)},exit:{atxHeading:K(),atxHeadingSequence:R,autolink:K(),autolinkEmail:a,autolinkProtocol:X0,blockQuote:K(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:t,characterReferenceMarkerNumeric:t,characterReferenceValue:s,characterReference:Z0,codeFenced:K(L),codeFencedFence:D,codeFencedFenceInfo:F,codeFencedFenceMeta:N,codeFlowValue:_,codeIndented:K(B),codeText:K(v),codeTextData:_,data:_,definition:K(),definitionDestinationString:M,definitionLabelString:O,definitionTitleString:E,emphasis:K(),hardBreakEscape:K(k),hardBreakTrailing:K(k),htmlFlow:K(S),htmlFlowData:_,htmlText:K(T),htmlTextData:_,image:K(y),label:u,labelText:d,lineEnding:C,link:K(x),listItem:K(),listOrdered:K(),listUnordered:K(),paragraph:K(),referenceString:n,resourceDestinationString:b,resourceTitleString:g,resource:p,setextHeading:K(I),setextHeadingLineSequence:w,setextHeadingText:q,strong:K(),thematicBreak:K()}};lQ4(Y,($||{}).mdastExtensions||[]);let X={};return G;function G(C0){let n0={type:"root",children:[]},J0={stack:[n0],tokenStack:[],config:Y,enter:Z,exit:H,buffer:W,resume:z,data:X},B0=[],Y1=-1;while(++Y1<C0.length)if(C0[Y1][1].type==="listOrdered"||C0[Y1][1].type==="listUnordered")if(C0[Y1][0]==="enter")B0.push(Y1);else{let c1=B0.pop();Y1=J(C0,c1,Y1)}Y1=-1;while(++Y1<C0.length){let c1=Y[C0[Y1][0]];if(cQ4.call(c1,C0[Y1][1].type))c1[C0[Y1][1].type].call(Object.assign({sliceSerialize:C0[Y1][2].sliceSerialize},J0),C0[Y1][1])}if(J0.tokenStack.length>0){let c1=J0.tokenStack[J0.tokenStack.length-1];(c1[1]||dQ4).call(J0,void 0,c1[0])}n0.position={start:TD(C0.length>0?C0[0][1].start:{line:1,column:1,offset:0}),end:TD(C0.length>0?C0[C0.length-2][1].end:{line:1,column:1,offset:0})},Y1=-1;while(++Y1<Y.transforms.length)n0=Y.transforms[Y1](n0)||n0;return n0}function J(C0,n0,J0){let B0=n0-1,Y1=-1,c1=!1,C4,c4,r4,T6;while(++B0<=J0){let p6=C0[B0];switch(p6[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{if(p6[0]==="enter")Y1++;else Y1--;T6=void 0;break}case"lineEndingBlank":{if(p6[0]==="enter"){if(C4&&!T6&&!Y1&&!r4)r4=B0;T6=void 0}break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:T6=void 0}if(!Y1&&p6[0]==="enter"&&p6[1].type==="listItemPrefix"||Y1===-1&&p6[0]==="exit"&&(p6[1].type==="listUnordered"||p6[1].type==="listOrdered")){if(C4){let n6=B0;c4=void 0;while(n6--){let K1=C0[n6];if(K1[1].type==="lineEnding"||K1[1].type==="lineEndingBlank"){if(K1[0]==="exit")continue;if(c4)C0[c4][1].type="lineEndingBlank",c1=!0;K1[1].type="lineEnding",c4=n6}else if(K1[1].type==="linePrefix"||K1[1].type==="blockQuotePrefix"||K1[1].type==="blockQuotePrefixWhitespace"||K1[1].type==="blockQuoteMarker"||K1[1].type==="listItemIndent");else break}if(r4&&(!c4||r4<c4))C4._spread=!0;C4.end=Object.assign({},c4?C0[c4][1].start:p6[1].end),C0.splice(c4||B0,0,["exit",C4,p6[2]]),B0++,J0++}if(p6[1].type==="listItemPrefix"){let n6={type:"listItem",_spread:!1,start:Object.assign({},p6[1].start),end:void 0};C4=n6,C0.splice(B0,0,["enter",n6,p6[2]]),B0++,J0++,r4=void 0,T6=!0}}}return C0[n0][1]._spread=c1,J0}function Q(C0,n0){return J0;function J0(B0){if(Z.call(this,C0(B0),B0),n0)n0.call(this,B0)}}function W(){this.stack.push({type:"fragment",children:[]})}function Z(C0,n0,J0){this.stack[this.stack.length-1].children.push(C0),this.stack.push(C0),this.tokenStack.push([n0,J0||void 0]),C0.position={start:TD(n0.start),end:void 0}}function K(C0){return n0;function n0(J0){if(C0)C0.call(this,J0);H.call(this,J0)}}function H(C0,n0){let J0=this.stack.pop(),B0=this.tokenStack.pop();if(!B0)throw Error("Cannot close `"+C0.type+"` ("+jD({start:C0.start,end:C0.end})+"): it\u2019s not open");else if(B0[0].type!==C0.type)if(n0)n0.call(this,C0,B0[0]);else(B0[1]||dQ4).call(this,C0,B0[0]);J0.position.end=TD(C0.end)}function z(){return Y3(this.stack.pop())}function V(){this.data.expectingFirstListItemValue=!0}function A(C0){if(this.data.expectingFirstListItemValue){let n0=this.stack[this.stack.length-2];n0.start=Number.parseInt(this.sliceSerialize(C0),10),this.data.expectingFirstListItemValue=void 0}}function F(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.lang=C0}function N(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.meta=C0}function D(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function L(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.value=C0.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function B(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.value=C0.replace(/(\r?\n|\r)$/g,"")}function O(C0){let n0=this.resume(),J0=this.stack[this.stack.length-1];J0.label=n0,J0.identifier=AG(this.sliceSerialize(C0)).toLowerCase()}function E(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.title=C0}function M(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.url=C0}function R(C0){let n0=this.stack[this.stack.length-1];if(!n0.depth){let J0=this.sliceSerialize(C0).length;n0.depth=J0}}function q(){this.data.setextHeadingSlurpLineEnding=!0}function w(C0){let n0=this.stack[this.stack.length-1];n0.depth=this.sliceSerialize(C0).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function P(C0){let J0=this.stack[this.stack.length-1].children,B0=J0[J0.length-1];if(!B0||B0.type!=="text")B0=P1(),B0.position={start:TD(C0.start),end:void 0},J0.push(B0);this.stack.push(B0)}function _(C0){let n0=this.stack.pop();n0.value+=this.sliceSerialize(C0),n0.position.end=TD(C0.end)}function C(C0){let n0=this.stack[this.stack.length-1];if(this.data.atHardBreak){let J0=n0.children[n0.children.length-1];J0.position.end=TD(C0.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&Y.canContainEols.includes(n0.type))P.call(this,C0),_.call(this,C0)}function k(){this.data.atHardBreak=!0}function S(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.value=C0}function T(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.value=C0}function v(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.value=C0}function x(){let C0=this.stack[this.stack.length-1];if(this.data.inReference){let n0=this.data.referenceType||"shortcut";C0.type+="Reference",C0.referenceType=n0,delete C0.url,delete C0.title}else delete C0.identifier,delete C0.label;this.data.referenceType=void 0}function y(){let C0=this.stack[this.stack.length-1];if(this.data.inReference){let n0=this.data.referenceType||"shortcut";C0.type+="Reference",C0.referenceType=n0,delete C0.url,delete C0.title}else delete C0.identifier,delete C0.label;this.data.referenceType=void 0}function d(C0){let n0=this.sliceSerialize(C0),J0=this.stack[this.stack.length-2];J0.label=x50(n0),J0.identifier=AG(n0).toLowerCase()}function u(){let C0=this.stack[this.stack.length-1],n0=this.resume(),J0=this.stack[this.stack.length-1];if(this.data.inReference=!0,J0.type==="link"){let B0=C0.children;J0.children=B0}else J0.alt=n0}function b(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.url=C0}function g(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.title=C0}function p(){this.data.inReference=void 0}function h(){this.data.referenceType="collapsed"}function n(C0){let n0=this.resume(),J0=this.stack[this.stack.length-1];J0.label=n0,J0.identifier=AG(this.sliceSerialize(C0)).toLowerCase(),this.data.referenceType="full"}function t(C0){this.data.characterReferenceType=C0.type}function s(C0){let n0=this.sliceSerialize(C0),J0=this.data.characterReferenceType,B0;if(J0)B0=v50(n0,J0==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0;else B0=Lj(n0);let Y1=this.stack[this.stack.length-1];Y1.value+=B0}function Z0(C0){let n0=this.stack.pop();n0.position.end=TD(C0.end)}function X0(C0){_.call(this,C0);let n0=this.stack[this.stack.length-1];n0.url=this.sliceSerialize(C0)}function a(C0){_.call(this,C0);let n0=this.stack[this.stack.length-1];n0.url="mailto:"+this.sliceSerialize(C0)}function Q0(){return{type:"blockquote",children:[]}}function e(){return{type:"code",lang:null,meta:null,value:""}}function m(){return{type:"inlineCode",value:""}}function $0(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Y0(){return{type:"emphasis",children:[]}}function K0(){return{type:"heading",depth:0,children:[]}}function A0(){return{type:"break"}}function D0(){return{type:"html",value:""}}function O0(){return{type:"image",title:null,url:"",alt:null}}function R0(){return{type:"link",title:null,url:"",children:[]}}function I0(C0){return{type:"list",ordered:C0.type==="listOrdered",start:null,spread:C0._spread,children:[]}}function g0(C0){return{type:"listItem",spread:C0._spread,checked:null,children:[]}}function p0(){return{type:"paragraph",children:[]}}function U4(){return{type:"strong",children:[]}}function P1(){return{type:"text",value:""}}function d1(){return{type:"thematicBreak"}}}function TD($){return{line:$.line,column:$.column,offset:$.offset}}function lQ4($,Y){let X=-1;while(++X<Y.length){let G=Y[X];if(Array.isArray(G))lQ4($,G);else I09($,G)}}function I09($,Y){let X;for(X in Y)if(cQ4.call(Y,X))switch(X){case"canContainEols":{let G=Y[X];if(G)$[X].push(...G);break}case"transforms":{let G=Y[X];if(G)$[X].push(...G);break}case"enter":case"exit":{let G=Y[X];if(G)Object.assign($[X],G);break}}}function dQ4($,Y){if($)throw Error("Cannot close `"+$.type+"` ("+jD({start:$.start,end:$.end})+"): a different token (`"+Y.type+"`, "+jD({start:Y.start,end:Y.end})+") is open");else throw Error("Cannot close document, a token (`"+Y.type+"`, "+jD({start:Y.start,end:Y.end})+") is still open")}var cQ4;var iQ4=V0(()=>{Tm();mQ4();Mh0();k50();Uf0();cQ4={}.hasOwnProperty});var nQ4=V0(()=>{iQ4()});function s50($){let Y=this;Y.parser=X;function X(G){return Hf0(G,{...Y.data("settings"),...$,extensions:Y.data("micromarkExtensions")||[],mdastExtensions:Y.data("fromMarkdownExtensions")||[]})}}var rQ4=V0(()=>{nQ4()});var aQ4=V0(()=>{rQ4()});function o50($){let Y=this;Y.compiler=X;function X(G){return Rh0(G,{...Y.data("settings"),...$,extensions:Y.data("toMarkdownExtensions")||[]})}}var sQ4=V0(()=>{y50()});var oQ4=V0(()=>{sQ4()});function zf0($){if($)throw $}var WW4=o((dG7,QW4)=>{var t50=Object.prototype.hasOwnProperty,JW4=Object.prototype.toString,tQ4=Object.defineProperty,eQ4=Object.getOwnPropertyDescriptor,$W4=function(Y){if(typeof Array.isArray==="function")return Array.isArray(Y);return JW4.call(Y)==="[object Array]"},YW4=function(Y){if(!Y||JW4.call(Y)!=="[object Object]")return!1;var X=t50.call(Y,"constructor"),G=Y.constructor&&Y.constructor.prototype&&t50.call(Y.constructor.prototype,"isPrototypeOf");if(Y.constructor&&!X&&!G)return!1;var J;for(J in Y);return typeof J>"u"||t50.call(Y,J)},XW4=function(Y,X){if(tQ4&&X.name==="__proto__")tQ4(Y,X.name,{enumerable:!0,configurable:!0,value:X.newValue,writable:!0});else Y[X.name]=X.newValue},GW4=function(Y,X){if(X==="__proto__"){if(!t50.call(Y,X))return;else if(eQ4)return eQ4(Y,X).value}return Y[X]};QW4.exports=function $(){var Y,X,G,J,Q,W,Z=arguments[0],K=1,H=arguments.length,z=!1;if(typeof Z==="boolean")z=Z,Z=arguments[1]||{},K=2;if(Z==null||typeof Z!=="object"&&typeof Z!=="function")Z={};for(;K<H;++K)if(Y=arguments[K],Y!=null){for(X in Y)if(G=GW4(Z,X),J=GW4(Y,X),Z!==J){if(z&&J&&(YW4(J)||(Q=$W4(J)))){if(Q)Q=!1,W=G&&$W4(G)?G:[];else W=G&&YW4(G)?G:{};XW4(Z,{name:X,newValue:$(z,W,J)})}else if(typeof J<"u")XW4(Z,{name:X,newValue:J})}}return Z}});function fm($){if(typeof $!=="object"||$===null)return!1;let Y=Object.getPrototypeOf($);return(Y===null||Y===Object.prototype||Object.getPrototypeOf(Y)===null)&&!(Symbol.toStringTag in $)&&!(Symbol.iterator in $)}function Vf0(){let $=[],Y={run:X,use:G};return Y;function X(...J){let Q=-1,W=J.pop();if(typeof W!=="function")throw TypeError("Expected function as last argument, not "+W);Z(null,...J);function Z(K,...H){let z=$[++Q],V=-1;if(K){W(K);return}while(++V<J.length)if(H[V]===null||H[V]===void 0)H[V]=J[V];if(J=H,z)ZW4(z,Z)(...H);else W(null,...H)}}function G(J){if(typeof J!=="function")throw TypeError("Expected `middelware` to be a function, not "+J);return $.push(J),Y}}function ZW4($,Y){let X;return G;function G(...W){let Z=$.length>W.length,K;if(Z)W.push(J);try{K=$.apply(this,W)}catch(H){let z=H;if(Z&&X)throw z;return J(z)}if(!Z)if(K&&K.then&&typeof K.then==="function")K.then(Q,J);else if(K instanceof Error)J(K);else Q(K)}function J(W,...Z){if(!X)X=!0,Y(W,...Z)}function Q(W){J(null,W)}}var KW4=()=>{};var PX;var UW4=V0(()=>{Uf0();PX=class PX extends Error{constructor($,Y,X){super();if(typeof Y==="string")X=Y,Y=void 0;let G="",J={},Q=!1;if(Y)if("line"in Y&&"column"in Y)J={place:Y};else if("start"in Y&&"end"in Y)J={place:Y};else if("type"in Y)J={ancestors:[Y],place:Y.position};else J={...Y};if(typeof $==="string")G=$;else if(!J.cause&&$)Q=!0,G=$.message,J.cause=$;if(!J.ruleId&&!J.source&&typeof X==="string"){let Z=X.indexOf(":");if(Z===-1)J.ruleId=X;else J.source=X.slice(0,Z),J.ruleId=X.slice(Z+1)}if(!J.place&&J.ancestors&&J.ancestors){let Z=J.ancestors[J.ancestors.length-1];if(Z)J.place=Z.position}let W=J.place&&"start"in J.place?J.place.start:J.place;this.ancestors=J.ancestors||void 0,this.cause=J.cause||void 0,this.column=W?W.column:void 0,this.fatal=void 0,this.file="",this.message=G,this.line=W?W.line:void 0,this.name=jD(J.place)||"1:1",this.place=J.place||void 0,this.reason=this.message,this.ruleId=J.ruleId||void 0,this.source=J.source||void 0,this.stack=Q&&J.cause&&typeof J.cause.stack==="string"?J.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};PX.prototype.file="";PX.prototype.name="";PX.prototype.reason="";PX.prototype.message="";PX.prototype.stack="";PX.prototype.column=void 0;PX.prototype.line=void 0;PX.prototype.ancestors=void 0;PX.prototype.cause=void 0;PX.prototype.fatal=void 0;PX.prototype.place=void 0;PX.prototype.ruleId=void 0;PX.prototype.source=void 0});var HW4=V0(()=>{UW4()});import{default as X3}from"path";var zW4=()=>{};import{default as VW4}from"process";var AW4=()=>{};function e50($){return Boolean($!==null&&typeof $==="object"&&"href"in $&&$.href&&"protocol"in $&&$.protocol&&$.auth===void 0)}import{fileURLToPath as FW4}from"url";var DW4=()=>{};class $70{constructor($){let Y;if(!$)Y={};else if(e50($))Y={path:$};else if(typeof $==="string"||P09($))Y={value:$};else Y=$;this.cwd="cwd"in Y?"":VW4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let X=-1;while(++X<Af0.length){let J=Af0[X];if(J in Y&&Y[J]!==void 0&&Y[J]!==null)this[J]=J==="history"?[...Y[J]]:Y[J]}let G;for(G in Y)if(!Af0.includes(G))this[G]=Y[G]}get basename(){return typeof this.path==="string"?X3.basename(this.path):void 0}set basename($){Df0($,"basename"),Ff0($,"basename"),this.path=X3.join(this.dirname||"",$)}get dirname(){return typeof this.path==="string"?X3.dirname(this.path):void 0}set dirname($){NW4(this.basename,"dirname"),this.path=X3.join($||"",this.basename)}get extname(){return typeof this.path==="string"?X3.extname(this.path):void 0}set extname($){if(Ff0($,"extname"),NW4(this.dirname,"extname"),$){if($.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if($.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=X3.join(this.dirname,this.stem+($||""))}get path(){return this.history[this.history.length-1]}set path($){if(e50($))$=FW4($);if(Df0($,"path"),this.path!==$)this.history.push($)}get stem(){return typeof this.path==="string"?X3.basename(this.path,this.extname):void 0}set stem($){Df0($,"stem"),Ff0($,"stem"),this.path=X3.join(this.dirname||"",$+(this.extname||""))}fail($,Y,X){let G=this.message($,Y,X);throw G.fatal=!0,G}info($,Y,X){let G=this.message($,Y,X);return G.fatal=void 0,G}message($,Y,X){let G=new PX($,Y,X);if(this.path)G.name=this.path+":"+G.name,G.file=this.path;return G.fatal=!1,this.messages.push(G),G}toString($){if(this.value===void 0)return"";if(typeof this.value==="string")return this.value;return new TextDecoder($||void 0).decode(this.value)}}function Ff0($,Y){if($&&$.includes(X3.sep))throw Error("`"+Y+"` cannot be a path: did not expect `"+X3.sep+"`")}function Df0($,Y){if(!$)throw Error("`"+Y+"` cannot be empty")}function NW4($,Y){if(!$)throw Error("Setting `"+Y+"` requires `path` to be set too")}function P09($){return Boolean($&&typeof $==="object"&&"byteLength"in $&&"byteOffset"in $)}var Af0;var LW4=V0(()=>{HW4();zW4();AW4();DW4();Af0=["history","path","basename","stem","extname","dirname"]});var BW4=V0(()=>{LW4()});var OW4=function($){let G=this.constructor.prototype,J=G[$],Q=function(){return J.apply(Q,arguments)};return Object.setPrototypeOf(Q,G),Q};function Nf0($,Y){if(typeof Y!=="function")throw TypeError("Cannot `"+$+"` without `parser`")}function Lf0($,Y){if(typeof Y!=="function")throw TypeError("Cannot `"+$+"` without `compiler`")}function Bf0($,Y){if(Y)throw Error("Cannot call `"+$+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function EW4($){if(!fm($)||typeof $.type!=="string")throw TypeError("Expected node, got `"+$+"`")}function MW4($,Y,X){if(!X)throw Error("`"+$+"` finished async. Use `"+Y+"` instead")}function Y70($){return _09($)?$:new $70($)}function _09($){return Boolean($&&typeof $==="object"&&"message"in $&&"messages"in $)}function j09($){return typeof $==="string"||T09($)}function T09($){return Boolean($&&typeof $==="object"&&"byteLength"in $&&"byteOffset"in $)}var X70,w09,Of0,G70;var RW4=V0(()=>{KW4();BW4();X70=U6(WW4(),1),w09={}.hasOwnProperty;Of0=class Of0 extends OW4{constructor(){super("copy");this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Vf0()}copy(){let $=new Of0,Y=-1;while(++Y<this.attachers.length){let X=this.attachers[Y];$.use(...X)}return $.data(X70.default(!0,{},this.namespace)),$}data($,Y){if(typeof $==="string"){if(arguments.length===2)return Bf0("data",this.frozen),this.namespace[$]=Y,this;return w09.call(this.namespace,$)&&this.namespace[$]||void 0}if($)return Bf0("data",this.frozen),this.namespace=$,this;return this.namespace}freeze(){if(this.frozen)return this;let $=this;while(++this.freezeIndex<this.attachers.length){let[Y,...X]=this.attachers[this.freezeIndex];if(X[0]===!1)continue;if(X[0]===!0)X[0]=void 0;let G=Y.call($,...X);if(typeof G==="function")this.transformers.use(G)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse($){this.freeze();let Y=Y70($),X=this.parser||this.Parser;return Nf0("parse",X),X(String(Y),Y)}process($,Y){let X=this;return this.freeze(),Nf0("process",this.parser||this.Parser),Lf0("process",this.compiler||this.Compiler),Y?G(void 0,Y):new Promise(G);function G(J,Q){let W=Y70($),Z=X.parse(W);X.run(Z,W,function(H,z,V){if(H||!z||!V)return K(H);let A=z,F=X.stringify(A,V);if(j09(F))V.value=F;else V.result=F;K(H,V)});function K(H,z){if(H||!z)Q(H);else if(J)J(z);else IX(Y,"`done` is defined if `resolve` is not"),Y(void 0,z)}}}processSync($){let Y=!1,X;return this.freeze(),Nf0("processSync",this.parser||this.Parser),Lf0("processSync",this.compiler||this.Compiler),this.process($,G),MW4("processSync","process",Y),IX(X,"we either bailed on an error or have a tree"),X;function G(J,Q){Y=!0,zf0(J),X=Q}}run($,Y,X){EW4($),this.freeze();let G=this.transformers;if(!X&&typeof Y==="function")X=Y,Y=void 0;return X?J(void 0,X):new Promise(J);function J(Q,W){IX(typeof Y!=="function","`file` can\u2019t be a `done` anymore, we checked");let Z=Y70(Y);G.run($,Z,K);function K(H,z,V){let A=z||$;if(H)W(H);else if(Q)Q(A);else IX(X,"`done` is defined if `resolve` is not"),X(void 0,A,V)}}}runSync($,Y){let X=!1,G;return this.run($,Y,J),MW4("runSync","run",X),IX(G,"we either bailed on an error or have a tree"),G;function J(Q,W){zf0(Q),G=W,X=!0}}stringify($,Y){this.freeze();let X=Y70(Y),G=this.compiler||this.Compiler;return Lf0("stringify",G),EW4($),G($,X)}use($,...Y){let X=this.attachers,G=this.namespace;if(Bf0("use",this.frozen),$===null||$===void 0);else if(typeof $==="function")Z($,Y);else if(typeof $==="object")if(Array.isArray($))W($);else Q($);else throw TypeError("Expected usable value, not `"+$+"`");return this;function J(K){if(typeof K==="function")Z(K,[]);else if(typeof K==="object")if(Array.isArray(K)){let[H,...z]=K;Z(H,z)}else Q(K);else throw TypeError("Expected usable value, not `"+K+"`")}function Q(K){if(!("plugins"in K)&&!("settings"in K))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");if(W(K.plugins),K.settings)G.settings=X70.default(!0,G.settings,K.settings)}function W(K){let H=-1;if(K===null||K===void 0);else if(Array.isArray(K))while(++H<K.length){let z=K[H];J(z)}else throw TypeError("Expected a list of plugins, not `"+K+"`")}function Z(K,H){let z=-1,V=-1;while(++z<X.length)if(X[z][0]===K){V=z;break}if(V===-1)X.push([K,...H]);else if(H.length>0){let[A,...F]=H,N=X[V][1];if(fm(N)&&fm(A))A=X70.default(!0,N,A);X[V]=[K,A,...F]}}}};G70=new Of0().freeze()});var qW4=V0(()=>{RW4()});function PW4($){return $.type==="text"}function wW4($){return $.type==="paragraph"}function _W4($){return $.type==="strong"}function jW4($){return $.type==="emphasis"}function TW4($){return $.type==="delete"}function CW4($){return $.type==="inlineCode"}function SW4($){return $.type==="code"}function kW4($){return $.type==="link"}function vW4($){return $.type==="blockquote"}function Rf0($){return $.type==="list"}function xW4($){return $.type==="listItem"}function yW4($){return $.type==="table"}function bW4($){return $.type==="tableRow"}function hW4($){return $.type==="tableCell"}function fW4($){let Y=[];for(let J of $.children){let Q=[];for(let W of J.children)Q.push(Y3(W));Y.push(Q)}if(Y.length===0)return"";let X=Y[0],G=Y.slice(1);return pm(X,G)}function pm($,Y){let X=[$,...Y],G=Math.max(...X.map((Z)=>Z.length));if(G===0)return"";let J=Array.from({length:G},()=>0);for(let Z of X)for(let K=0;K<G;K++){let H=(Z[K]||"").length;if(H>J[K])J[K]=H}let Q=(Z)=>Array.from({length:G},(K,H)=>(Z[H]||"").padEnd(J[H])).join(" | ").trimEnd(),W=[];W.push(Q($)),W.push(J.map((Z)=>"-".repeat(Z)).join("-|-"));for(let Z of Y)W.push(Q(Z));return W.join(`
`)}function mm($){if("children"in $&&Array.isArray($.children))return $.children;return[]}function qf0($){if("value"in $&&typeof $.value==="string")return $.value;return""}function bE($){return G70().use(s50).use(hm).parse($)}function If0($,Y){return G70().use(o50,Y).use(hm).stringify($)}function AV($){return Y3($)}function gW4($){let Y=bE($);return Y3(Y)}function Pf0($,Y){if("children"in $&&Array.isArray($.children))$.children=$.children.map((X)=>{let G=Y(X);if(G===null)return null;return Pf0(G,Y)}).filter((X)=>X!==null);return $}function cU($){return{type:"text",value:$}}function mW4($){return{type:"strong",children:$}}function uW4($){return{type:"emphasis",children:$}}function pW4($){return{type:"delete",children:$}}function dW4($){return{type:"inlineCode",value:$}}function cW4($,Y){return{type:"code",value:$,lang:Y}}function lW4($,Y,X){return{type:"link",url:$,children:Y,title:X}}function iW4($){return{type:"blockquote",children:$}}function lU($){return{type:"paragraph",children:$}}function iU($){return{type:"root",children:$}}function wf0($){return typeof $==="object"&&$!==null&&"type"in $&&$.type==="card"}function dm($={}){return{type:"card",title:$.title,subtitle:$.subtitle,imageUrl:$.imageUrl,children:$.children??[]}}function um($,Y={}){return{type:"text",content:$,style:Y.style}}function Oj($){return{type:"image",url:$.url,alt:$.alt}}function Ej(){return{type:"divider"}}function Mj($){return{type:"section",children:$}}function Rj($){return{type:"actions",children:$}}function qj($){return{type:"button",id:$.id,label:$.label,style:$.style,value:$.value,disabled:$.disabled,actionType:$.actionType,callbackUrl:$.callbackUrl}}function Ij($){return{type:"link-button",url:$.url,label:$.label,style:$.style}}function Pj($){return{type:"field",label:$.label,value:$.value}}function wj($){return{type:"fields",children:$}}function _j($){return{type:"table",headers:$.headers,rows:$.rows,align:$.align}}function jj($){return{type:"link",url:$.url,label:$.label}}function C09($){if(typeof $!=="object"||$===null)return!1;let Y=$;if(typeof Y.$$typeof!=="symbol")return!1;let X=Y.$$typeof.toString();return X.includes("react.element")||X.includes("react.transitional.element")}function _f0($){if(!C09($)){if(wf0($))return $;if(typeof $==="object"&&$!==null&&"type"in $)return $;return null}let{type:Y,props:X}=$,G=S09.get(Y);if(!G){if(typeof Y==="string")throw Error(`HTML element <${Y}> is not supported in card elements. Use Card, Text, Section, Actions, Button, Fields, Field, Image, or Divider components instead.`);if(X.children)return Ef0(X.children)[0]??null;return null}let J=X.children?Ef0(X.children):[],Q=(W)=>W.type!=="card"&&W.type!=="button"&&W.type!=="link-button"&&W.type!=="field"&&W.type!=="select"&&W.type!=="radio_select";switch(G){case"Card":return dm({title:X.title,subtitle:X.subtitle,imageUrl:X.imageUrl,children:J.filter(Q)});case"Text":{let W=gm(X.children);return um(W,{style:X.style})}case"Image":return Oj({url:X.url,alt:X.alt});case"Divider":return Ej();case"Section":return Mj(J.filter(Q));case"Actions":return Rj(J.filter((W)=>W.type==="button"||W.type==="link-button"||W.type==="select"||W.type==="radio_select"));case"Button":{let W=gm(X.children);return qj({id:X.id,label:X.label??W,style:X.style,value:X.value,actionType:X.actionType,disabled:X.disabled})}case"LinkButton":{let W=gm(X.children);return Ij({url:X.url,label:X.label??W,style:X.style})}case"CardLink":{let W=gm(X.children);return jj({url:X.url,label:X.label??W})}case"Field":return Pj({label:X.label,value:X.value});case"Fields":return wj(J.filter((W)=>W.type==="field"));case"Table":return _j({headers:X.headers,rows:X.rows,align:X.align});default:return null}}function Ef0($){if($==null)return[];if(Array.isArray($))return $.flatMap(Ef0);let Y=_f0($);if(Y&&typeof Y==="object"&&"type"in Y){if(Y.type==="card")return Y.children;return[Y]}return[]}function gm($){if(typeof $==="string")return $;if(typeof $==="number")return String($);if(Array.isArray($))return $.map(gm).join("");return""}function cm($){let Y=[];if($.title)Y.push(`**${$.title}**`);if($.subtitle)Y.push($.subtitle);for(let X of $.children){let G=J70(X);if(G)Y.push(G)}return Y.join(`
`)}function J70($){switch($.type){case"text":return $.content;case"link":return`${$.label} (${$.url})`;case"fields":return $.children.map((Y)=>`${Y.label}: ${Y.value}`).join(`
`);case"actions":return null;case"table":return pm($.headers,$.rows);case"section":return $.children.map((Y)=>J70(Y)).filter(Boolean).join(`
`);default:return null}}function lm($){return typeof $==="object"&&$!==null&&"type"in $&&$.type==="modal"}function aW4($){let Y=$.filter((X)=>typeof X==="object"&&X!==null&&("type"in X)&&k09.includes(X.type));if(Y.length<$.length)console.warn("[chat] Modal contains unsupported child elements that were ignored");return Y}function Tj($){return{type:"modal",callbackId:$.callbackId,callbackUrl:$.callbackUrl,title:$.title,submitLabel:$.submitLabel,closeLabel:$.closeLabel,notifyOnClose:$.notifyOnClose,privateMetadata:$.privateMetadata,children:$.children??[]}}function Cj($){return{type:"text_input",id:$.id,label:$.label,placeholder:$.placeholder,initialValue:$.initialValue,multiline:$.multiline,optional:$.optional,maxLength:$.maxLength}}function Sj($){if(!$.options||$.options.length===0)throw Error("Select requires at least one option");return{type:"select",id:$.id,label:$.label,placeholder:$.placeholder,options:$.options,initialOption:$.initialOption,optional:$.optional}}function kj($){return{type:"external_select",id:$.id,initialOption:$.initialOption,label:$.label,placeholder:$.placeholder,minQueryLength:$.minQueryLength,optional:$.optional}}function vj($){return{label:$.label,value:$.value,description:$.description}}function xj($){if(!$.options||$.options.length===0)throw Error("RadioSelect requires at least one option");return{type:"radio_select",id:$.id,label:$.label,options:$.options,initialOption:$.initialOption,optional:$.optional}}function v09($){if(typeof $!=="object"||$===null)return!1;let Y=$;if(typeof Y.$$typeof!=="symbol")return!1;let X=Y.$$typeof.toString();return X.includes("react.element")||X.includes("react.transitional.element")}function jf0($){if(!v09($)){if(lm($))return $;if(typeof $==="object"&&$!==null&&"type"in $)return $;return null}let{type:Y,props:X}=$,G=x09.get(Y);if(!G){if(X.children)return Mf0(X.children)[0]??null;return null}let J=X.children?Mf0(X.children):[];switch(G){case"Modal":return Tj({callbackId:X.callbackId,title:X.title,submitLabel:X.submitLabel,closeLabel:X.closeLabel,notifyOnClose:X.notifyOnClose,privateMetadata:X.privateMetadata,children:aW4(J)});case"TextInput":return Cj({id:X.id,label:X.label,placeholder:X.placeholder,initialValue:X.initialValue,multiline:X.multiline,optional:X.optional,maxLength:X.maxLength});case"Select":return Sj({id:X.id,label:X.label,placeholder:X.placeholder,options:J.filter((Q)=>Q!==null&&("label"in Q)&&("value"in Q)&&!("type"in Q)),initialOption:X.initialOption,optional:X.optional});case"ExternalSelect":return kj({id:X.id,initialOption:X.initialOption,label:X.label,placeholder:X.placeholder,minQueryLength:X.minQueryLength,optional:X.optional});case"RadioSelect":return xj({id:X.id,label:X.label,options:J.filter((Q)=>Q!==null&&("label"in Q)&&("value"in Q)&&!("type"in Q)),initialOption:X.initialOption,optional:X.optional});case"SelectOption":return vj({label:X.label,value:X.value,description:X.description});default:return null}}function Mf0($){if($==null)return[];if(Array.isArray($))return $.flatMap(Mf0);let Y=jf0($);if(Y){if(lm(Y))return Y.children;return[Y]}return[]}function Q70($){return typeof $==="object"&&$!==null&&$.$$typeof===y09}function sW4($){if($==null)return[];if(Array.isArray($))return $.flatMap(sW4);if(Q70($)){let Y=Tf0($);if(Y)return[Y];return[]}if(typeof $==="object"&&"type"in $)return[$];if(typeof $==="string"||typeof $==="number")return[String($)];return[]}function b09($){return!(("id"in $)||("url"in $)||("label"in $))}function h09($){return"id"in $&&typeof $.id==="string"&&!("url"in $)}function f09($){return"url"in $&&typeof $.url==="string"&&!("id"in $)}function g09($){return"url"in $&&typeof $.url==="string"&&!("id"in $)&&!("alt"in $)&&!("style"in $)}function m09($){return"url"in $&&typeof $.url==="string"}function u09($){return"label"in $&&"value"in $&&typeof $.label==="string"&&typeof $.value==="string"}function p09($){return!(("id"in $)||("url"in $)||("callbackId"in $))&&(("title"in $)||("subtitle"in $)||("imageUrl"in $))}function d09($){return"callbackId"in $&&"title"in $}function c09($){return"id"in $&&"label"in $&&!("options"in $)&&!("value"in $)}function IW4($){return"id"in $&&"label"in $&&!("value"in $)}function l09($){return"id"in $&&"label"in $&&!("value"in $)&&!("children"in $)}function i09($){return"label"in $&&"value"in $&&!("id"in $)}function Tf0($){let{type:Y,props:X,children:G}=$,J=sW4(G);if(Y===um){let W=b09(X)?X:{style:void 0},Z=J.length>0?J.map(String).join(""):String(W.children??"");return um(Z,{style:W.style})}if(Y===Mj)return Mj(J);if(Y===Rj)return Rj(J);if(Y===wj)return wj(J);if(Y===qj){if(!h09(X))throw Error("Button requires an 'id' prop");let W=J.length>0?J.map(String).join(""):X.label??"";return qj({id:X.id,label:W,style:X.style,value:X.value,actionType:X.actionType,callbackUrl:X.callbackUrl,disabled:X.disabled})}if(Y===Ij){if(!f09(X))throw Error("LinkButton requires a 'url' prop");let W=J.length>0?J.map(String).join(""):X.label??"";return Ij({url:X.url,label:W,style:X.style})}if(Y===jj){if(!g09(X))throw Error("CardLink requires a 'url' prop");let W=J.length>0?J.map(String).join(""):X.label??"";return jj({url:X.url,label:W})}if(Y===Oj){if(!m09(X))throw Error("Image requires a 'url' prop");return Oj({url:X.url,alt:X.alt})}if(Y===Pj){if(!u09(X))throw Error("Field requires 'label' and 'value' props");return Pj({label:X.label,value:X.value})}if(Y===Ej)return Ej();if(Y===Tj){if(!d09(X))throw Error("Modal requires 'callbackId' and 'title' props");return Tj({callbackId:X.callbackId,callbackUrl:X.callbackUrl,title:X.title,submitLabel:X.submitLabel,closeLabel:X.closeLabel,notifyOnClose:X.notifyOnClose,privateMetadata:X.privateMetadata,children:aW4(J)})}if(Y===Cj){if(!c09(X))throw Error("TextInput requires 'id' and 'label' props");return Cj({id:X.id,label:X.label,placeholder:X.placeholder,initialValue:X.initialValue,multiline:X.multiline,optional:X.optional,maxLength:X.maxLength})}if(Y===Sj){if(!IW4(X))throw Error("Select requires 'id' and 'label' props");return Sj({id:X.id,label:X.label,placeholder:X.placeholder,initialOption:X.initialOption,optional:X.optional,options:J})}if(Y===kj){if(!l09(X))throw Error("ExternalSelect requires 'id' and 'label' props");return kj({id:X.id,initialOption:X.initialOption,label:X.label,placeholder:X.placeholder,minQueryLength:X.minQueryLength,optional:X.optional})}if(Y===xj){if(!IW4(X))throw Error("RadioSelect requires 'id' and 'label' props");return xj({id:X.id,label:X.label,initialOption:X.initialOption,optional:X.optional,options:J})}if(Y===vj){if(!i09(X))throw Error("SelectOption requires 'label' and 'value' props");return vj({label:X.label,value:X.value,description:X.description})}if(Y===_j){let W=X;return _j({headers:W.headers,rows:W.rows})}let Q=p09(X)?X:{};return dm({title:Q.title,subtitle:Q.subtitle,imageUrl:Q.imageUrl,children:J})}function G3($){if(Q70($)){let Y=Tf0($);if(Y&&typeof Y==="object"&&"type"in Y&&Y.type==="card")return Y}if(typeof $==="object"&&$!==null&&"type"in $&&$.type==="card")return $;return null}function W70($){if(Q70($)){let Y=Tf0($);if(Y&&typeof Y==="object"&&"type"in Y&&Y.type==="modal")return Y}if(lm($))return $;return null}function bW($){if(Q70($))return!0;if(typeof $==="object"&&$!==null&&"$$typeof"in $&&typeof $.$$typeof==="symbol"){let Y=$.$$typeof.toString();return Y.includes("react.element")||Y.includes("react.transitional.element")}return!1}var nW4=class{renderList($,Y,X,G="-"){let J="  ".repeat(Y),Q=$.start??1,W=[];for(let[Z,K]of mm($).entries()){let H=$.ordered?`${Q+Z}.`:G,z=!0;for(let V of mm(K)){if(Rf0(V)){W.push(this.renderList(V,Y+1,X,G));continue}let A=X(V);if(!A.trim())continue;if(z)W.push(`${J}${H} ${A}`),z=!1;else W.push(`${J}  ${A}`)}}return W.join(`
`)}defaultNodeToText($,Y){let X=mm($);if(X.length>0)return X.map(Y).join("");return qf0($)}fromAstWithNodeConverter($,Y){let X=[];for(let G of $.children)X.push(Y(G));return X.join(`

`)}extractPlainText($){return AV(this.toAst($))}fromMarkdown($){return this.fromAst(bE($))}toMarkdown($){return If0(this.toAst($))}toPlainText($){return this.extractPlainText($)}renderPostable($){if(typeof $==="string")return $;if("raw"in $)return $.raw;if("markdown"in $)return this.fromMarkdown($.markdown);if("ast"in $)return this.fromAst($.ast);if("card"in $)return $.fallbackText||this.cardToFallbackText($.card);if("type"in $&&$.type==="card")return this.cardToFallbackText($);throw Error("Invalid PostableMessage format")}cardToFallbackText($){let Y=[];if($.title)Y.push(`**${$.title}**`);if($.subtitle)Y.push($.subtitle);for(let X of $.children){let G=this.cardChildToFallbackText(X);if(G)Y.push(G)}return Y.join(`
`)}cardChildToFallbackText($){switch($.type){case"text":return $.content;case"fields":return $.children.map((Y)=>`**${Y.label}**: ${Y.value}`).join(`
`);case"actions":return null;case"table":return pm($.headers,$.rows);case"section":return $.children.map((Y)=>this.cardChildToFallbackText(Y)).filter(Boolean).join(`
`);default:return null}}},rW4,S09,k09,x09,y09;var oW4=V0(()=>{Tm();EQ4();aQ4();oQ4();qW4();rW4=um;S09=new Map([[dm,"Card"],[um,"Text"],[Oj,"Image"],[Ej,"Divider"],[Mj,"Section"],[Rj,"Actions"],[qj,"Button"],[Ij,"LinkButton"],[jj,"CardLink"],[Pj,"Field"],[wj,"Fields"],[_j,"Table"]]);k09=["text_input","select","external_select","radio_select","text","fields"];x09=new Map([[Tj,"Modal"],[Cj,"TextInput"],[Sj,"Select"],[kj,"ExternalSelect"],[xj,"RadioSelect"],[vj,"SelectOption"]]);y09=Symbol.for("chat.jsx.element")});var yj,bj;var Z70=V0(()=>{yj=Symbol.for("workflow-serialize"),bj=Symbol.for("workflow-deserialize")});var n09,r09,a09,tW4,s09,o09,eW4=($,Y,X)=>(Y in $)?n09($,Y,{enumerable:!0,configurable:!0,writable:!0,value:X}):$[Y]=X,GZ4=($,Y)=>{for(var X in Y||(Y={}))s09.call(Y,X)&&eW4($,X,Y[X]);if(tW4)for(var X of tW4(Y))o09.call(Y,X)&&eW4($,X,Y[X]);return $},JZ4=($,Y)=>r09($,a09(Y)),FJ=($,Y)=>{let X=!1,G=!1;for(let J=0;J<Y;J+=1){if($[J]==="\\"&&J+1<$.length&&$[J+1]==="`"){J+=1;continue}if($.substring(J,J+3)==="```"){G=!G,J+=2;continue}!G&&$[J]==="`"&&(X=!X)}return X||G},t09=($,Y)=>{let X=$.substring(Y,Y+3)==="```",G=Y>0&&$.substring(Y-1,Y+2)==="```",J=Y>1&&$.substring(Y-2,Y+1)==="```";return X||G||J},e09=($)=>{let Y=0;for(let X=0;X<$.length;X+=1){if($[X]==="\\"&&X+1<$.length&&$[X+1]==="`"){X+=1;continue}$[X]==="`"&&!t09($,X)&&(Y+=1)}return Y},CD=($,Y)=>{let X=!1,G=!1,J=-1;for(let Q=0;Q<$.length;Q+=1){if($[Q]==="\\"&&Q+1<$.length&&$[Q+1]==="`"){Q+=1;continue}if($.substring(Q,Q+3)==="```"){G=!G,Q+=2;continue}if(!G&&$[Q]==="`")if(X){if(J<Y&&Y<Q)return!0;X=!1,J=-1}else X=!0,J=Q}return!1},$19,Y19=($)=>!$||typeof $!="string"||!$.includes(">")?$:$.replace($19,(Y,X,G,J)=>FJ($,J)?Y:`${X}\\>${G}`),X19,G19,J19,Q19,W19,Z19,K19,hE,QZ4,U19,H19,z19,V19,A19,$Z4,SD=($)=>{if(!$)return!1;let Y=$.charCodeAt(0);return Y>=48&&Y<=57||Y>=65&&Y<=90||Y>=97&&Y<=122||Y===95?!0:U19.test($)},F19=($,Y)=>{let X=1;for(let G=Y-1;G>=0;G-=1)if($[G]==="]")X+=1;else if($[G]==="["&&(X-=1,X===0))return G;return-1},WZ4=($,Y)=>{let X=1;for(let G=Y+1;G<$.length;G+=1)if($[G]==="[")X+=1;else if($[G]==="]"&&(X-=1,X===0))return G;return-1},K70=($,Y)=>{let X=!1,G=!1;for(let J=0;J<$.length&&J<Y;J+=1){if($[J]==="\\"&&$[J+1]==="$"){J+=1;continue}$[J]==="$"&&($[J+1]==="$"?(G=!G,J+=1,X=!1):G||(X=!X))}return X||G},D19=($,Y)=>{for(let X=Y;X<$.length;X+=1){if($[X]===")")return!0;if($[X]===`
`)return!1}return!1},ZZ4=($,Y)=>{for(let X=Y-1;X>=0;X-=1){if($[X]===")")return!1;if($[X]==="(")return X>0&&$[X-1]==="]"?D19($,Y):!1;if($[X]===`
`)return!1}return!1},N19=($,Y)=>{for(let X=Y-1;X>=0;X-=1){if($[X]===">")return!1;if($[X]==="<"){let G=X+1<$.length?$[X+1]:"";return G>="a"&&G<="z"||G>="A"&&G<="Z"||G==="/"}if($[X]===`
`)return!1}return!1},Sf0=($,Y,X)=>{let G=0;for(let K=Y-1;K>=0;K-=1)if($[K]===`
`){G=K+1;break}let J=$.length;for(let K=Y;K<$.length;K+=1)if($[K]===`
`){J=K;break}let Q=$.substring(G,J),W=0,Z=!1;for(let K of Q)if(K===X)W+=1;else if(K!==" "&&K!=="\t"){Z=!0;break}return W>=3&&!Z},L19=($,Y,X,G)=>X==="\\"||$.includes("$")&&K70($,Y)?!0:X!=="*"&&G==="*"?(Y<$.length-2?$[Y+2]:"")!=="*":!!(X==="*"||X&&G&&SD(X)&&SD(G)||(!X||X===" "||X==="\t"||X===`
`)&&(!G||G===" "||G==="\t"||G===`
`)),KZ4=($)=>{let Y=0,X=!1,G=$.length;for(let J=0;J<G;J+=1){if($[J]==="`"&&J+2<G&&$[J+1]==="`"&&$[J+2]==="`"){X=!X,J+=2;continue}if(X||$[J]!=="*")continue;let Q=J>0?$[J-1]:"",W=J<G-1?$[J+1]:"";L19($,J,Q,W)||(Y+=1)}return Y},B19=($,Y,X,G)=>!!(X==="\\"||$.includes("$")&&K70($,Y)||ZZ4($,Y)||N19($,Y)||X==="_"||G==="_"||X&&G&&SD(X)&&SD(G)),O19=($)=>{let Y=0,X=!1,G=$.length;for(let J=0;J<G;J+=1){if($[J]==="`"&&J+2<G&&$[J+1]==="`"&&$[J+2]==="`"){X=!X,J+=2;continue}if(X||$[J]!=="_")continue;let Q=J>0?$[J-1]:"",W=J<G-1?$[J+1]:"";B19($,J,Q,W)||(Y+=1)}return Y},E19=($)=>{let Y=0,X=0,G=!1;for(let J=0;J<$.length;J+=1){if($[J]==="`"&&J+2<$.length&&$[J+1]==="`"&&$[J+2]==="`"){X>=3&&(Y+=Math.floor(X/3)),X=0,G=!G,J+=2;continue}G||($[J]==="*"?X+=1:(X>=3&&(Y+=Math.floor(X/3)),X=0))}return X>=3&&(Y+=Math.floor(X/3)),Y},kf0=($)=>{let Y=0,X=!1;for(let G=0;G<$.length;G+=1){if($[G]==="`"&&G+2<$.length&&$[G+1]==="`"&&$[G+2]==="`"){X=!X,G+=2;continue}X||$[G]==="*"&&G+1<$.length&&$[G+1]==="*"&&(Y+=1,G+=1)}return Y},YZ4=($)=>{let Y=0,X=!1;for(let G=0;G<$.length;G+=1){if($[G]==="`"&&G+2<$.length&&$[G+1]==="`"&&$[G+2]==="`"){X=!X,G+=2;continue}X||$[G]==="_"&&G+1<$.length&&$[G+1]==="_"&&(Y+=1,G+=1)}return Y},M19=($,Y,X)=>{if(!Y||hE.test(Y))return!0;let G=$.substring(0,X).lastIndexOf(`
`),J=G===-1?0:G+1,Q=$.substring(J,X);return QZ4.test(Q)&&Y.includes(`
`)?!0:Sf0($,X,"*")},R19=($)=>{let Y=$.match(X19);if(!Y)return $;let X=Y[2],G=$.lastIndexOf(Y[1]);return FJ($,G)||CD($,G)||M19($,X,G)?$:kf0($)%2===1?X.endsWith("*")?`${$}*`:`${$}**`:$},q19=($,Y,X)=>{if(!Y||hE.test(Y))return!0;let G=$.substring(0,X).lastIndexOf(`
`),J=G===-1?0:G+1,Q=$.substring(J,X);return QZ4.test(Q)&&Y.includes(`
`)?!0:Sf0($,X,"_")},I19=($)=>{let Y=$.match(G19);if(!Y){let J=$.match(V19);if(J){let Q=$.lastIndexOf(J[1]);if(!(FJ($,Q)||CD($,Q))&&YZ4($)%2===1)return`${$}_`}return $}let X=Y[2],G=$.lastIndexOf(Y[1]);return FJ($,G)||CD($,G)||q19($,X,G)?$:YZ4($)%2===1?`${$}__`:$},P19=($)=>{let Y=!1;for(let X=0;X<$.length;X+=1){if($[X]==="`"&&X+2<$.length&&$[X+1]==="`"&&$[X+2]==="`"){Y=!Y,X+=2;continue}if(!Y&&$[X]==="*"&&$[X-1]!=="*"&&$[X+1]!=="*"&&$[X-1]!=="\\"&&!K70($,X)){let G=X>0?$[X-1]:"",J=X<$.length-1?$[X+1]:"";if((!G||G===" "||G==="\t"||G===`
`)&&(!J||J===" "||J==="\t"||J===`
`)||G&&J&&SD(G)&&SD(J))continue;return X}}return-1},w19=($)=>{if(!$.match(Q19))return $;let Y=P19($);if(Y===-1||FJ($,Y)||CD($,Y))return $;let X=$.substring(Y+1);return!X||hE.test(X)?$:KZ4($)%2===1?`${$}*`:$},UZ4=($)=>{let Y=!1;for(let X=0;X<$.length;X+=1){if($[X]==="`"&&X+2<$.length&&$[X+1]==="`"&&$[X+2]==="`"){Y=!Y,X+=2;continue}if(!Y&&$[X]==="_"&&$[X-1]!=="_"&&$[X+1]!=="_"&&$[X-1]!=="\\"&&!K70($,X)&&!ZZ4($,X)){let G=X>0?$[X-1]:"",J=X<$.length-1?$[X+1]:"";if(G&&J&&SD(G)&&SD(J))continue;return X}}return-1},_19=($)=>{let Y=$.length;for(;Y>0&&$[Y-1]===`
`;)Y-=1;if(Y<$.length){let X=$.slice(0,Y),G=$.slice(Y);return`${X}_${G}`}return`${$}_`},j19=($)=>{if(!$.endsWith("**"))return null;let Y=$.slice(0,-2);if(kf0(Y)%2!==1)return null;let X=Y.indexOf("**"),G=UZ4(Y);return X!==-1&&G!==-1&&X<G?`${Y}_**`:null},T19=($)=>{if(!$.match(W19))return $;let Y=UZ4($);if(Y===-1)return $;let X=$.substring(Y+1);if(!X||hE.test(X)||FJ($,Y)||CD($,Y))return $;if(O19($)%2===1){let G=j19($);return G!==null?G:_19($)}return $},C19=($)=>{let Y=kf0($),X=KZ4($);return Y%2===0&&X%2===0},S19=($,Y,X)=>!Y||hE.test(Y)||FJ($,X)||CD($,X)?!0:Sf0($,X,"*"),k19=($)=>{if(z19.test($))return $;let Y=$.match(J19);if(!Y)return $;let X=Y[2],G=$.lastIndexOf(Y[1]);return S19($,X,G)?$:E19($)%2===1?C19($)?$:`${$}***`:$},v19,x19=($)=>{let Y=$.match(v19);return!Y||Y.index===void 0||FJ($,Y.index)?$:$.substring(0,Y.index).trimEnd()},y19=($)=>!$.match(H19)||$.includes(`
`)?null:$.endsWith("``")&&!$.endsWith("```")?`${$}\``:$,b19=($)=>($.match(/```/g)||[]).length%2===1,h19=($)=>{let Y=y19($);if(Y!==null)return Y;let X=$.match(Z19);if(X&&!b19($)){let G=X[2];if(!G||hE.test(G))return $;if(e09($)%2===1)return`${$}\``}return $},HZ4=($,Y)=>Y>=2&&$.substring(Y-2,Y+1)==="```"||Y>=1&&$.substring(Y-1,Y+2)==="```"||Y<=$.length-3&&$.substring(Y,Y+3)==="```",f19=($)=>{let Y=0,X=!1;for(let G=0;G<$.length-1;G+=1)$[G]==="`"&&!HZ4($,G)&&(X=!X),!X&&$[G]==="$"&&$[G+1]==="$"&&(Y+=1,G+=1);return Y},g19=($)=>{let Y=0,X=!1;for(let G=0;G<$.length;G+=1){if($[G]==="\\"){G+=1;continue}if($[G]==="`"&&!HZ4($,G)){X=!X;continue}!X&&$[G]==="$"&&(G+1<$.length&&$[G+1]==="$"?G+=1:Y+=1)}return Y},m19=($)=>{if($.endsWith("$")&&!$.endsWith("$$"))return`${$}$`;let Y=$.indexOf("$$");return Y!==-1&&$.indexOf(`
`,Y)!==-1&&!$.endsWith(`
`)?`${$}
$$`:`${$}$$`},u19=($)=>f19($)%2===0?$:m19($),p19=($)=>g19($)%2===1?`${$}$`:$,d19=($,Y,X)=>{if($.substring(Y+2).includes(")"))return null;let G=F19($,Y);if(G===-1||FJ($,G))return null;let J=G>0&&$[G-1]==="!",Q=J?G-1:G,W=$.substring(0,Q);if(J)return W;let Z=$.substring(G+1,Y);return X==="text-only"?`${W}${Z}`:`${W}[${Z}](streamdown:incomplete-link)`},XZ4=($,Y)=>{for(let X=0;X<Y;X++)if($[X]==="["&&!FJ($,X)){if(X>0&&$[X-1]==="!")continue;let G=WZ4($,X);if(G===-1)return X;if(G+1<$.length&&$[G+1]==="("){let J=$.indexOf(")",G+2);J!==-1&&(X=J)}}return Y},c19=($,Y,X)=>{let G=Y>0&&$[Y-1]==="!",J=G?Y-1:Y;if(!$.substring(Y+1).includes("]")){let Q=$.substring(0,J);if(G)return Q;if(X==="text-only"){let W=XZ4($,Y);return $.substring(0,W)+$.substring(W+1)}return`${$}](streamdown:incomplete-link)`}if(WZ4($,Y)===-1){let Q=$.substring(0,J);if(G)return Q;if(X==="text-only"){let W=XZ4($,Y);return $.substring(0,W)+$.substring(W+1)}return`${$}](streamdown:incomplete-link)`}return null},zZ4=($,Y="protocol")=>{let X=$.lastIndexOf("](");if(X!==-1&&!FJ($,X)){let G=d19($,X,Y);if(G!==null)return G}for(let G=$.length-1;G>=0;G-=1)if($[G]==="["&&!FJ($,G)){let J=c19($,G,Y);if(J!==null)return J}return $},l19,i19,n19,r19,a19=($)=>{if(!$||typeof $!="string")return $;let Y=$.lastIndexOf(`
`);if(Y===-1)return $;let X=$.substring(Y+1),G=$.substring(0,Y),J=X.trim();if(l19.test(J)&&!X.match(i19)){let Q=G.split(`
`).at(-1);if(Q&&Q.trim().length>0)return`${$}\u200B`}if(n19.test(J)&&!X.match(r19)){let Q=G.split(`
`).at(-1);if(Q&&Q.trim().length>0)return`${$}\u200B`}return $},s19,o19=($)=>!$||typeof $!="string"||!$.includes("~")?$:$.replace(s19,(Y,X)=>FJ($,X)?Y:"\\~"),t19=($)=>{var Y,X;let G=$.match(K19);if(G){let J=G[2];if(!J||hE.test(J))return $;let Q=$.lastIndexOf(G[1]);if(FJ($,Q)||CD($,Q))return $;if(((Y=$.match($Z4))==null?void 0:Y.length)%2===1)return`${$}~~`}else{let J=$.match(A19);if(J){let Q=$.lastIndexOf(J[0].slice(0,2));if(FJ($,Q)||CD($,Q))return $;if(((X=$.match($Z4))==null?void 0:X.length)%2===1)return`${$}~`}}return $},Cf0=($)=>$!==!1,e19=($)=>$===!0,AJ,$49,Y49=($)=>{var Y;let X=(Y=$==null?void 0:$.linkMode)!=null?Y:"protocol";return $49.filter(({handler:G,optionKey:J})=>G.name==="links"?Cf0($==null?void 0:$.links)||Cf0($==null?void 0:$.images):G.name==="inlineKatex"?e19($==null?void 0:$.inlineKatex):Cf0($==null?void 0:$[J])).map(({handler:G,earlyReturn:J})=>G.name==="links"?{handler:JZ4(GZ4({},G),{handle:(Q)=>zZ4(Q,X)}),earlyReturn:X==="protocol"?J:void 0}:{handler:G,earlyReturn:J})},X49=($,Y)=>{var X;if(!$||typeof $!="string")return $;let G=$.endsWith(" ")&&!$.endsWith("  ")?$.slice(0,-1):$,J=Y49(Y),Q=((X=Y==null?void 0:Y.handlers)!=null?X:[]).map((Z)=>{var K;return{handler:JZ4(GZ4({},Z),{priority:(K=Z.priority)!=null?K:AJ.DEFAULT}),earlyReturn:void 0}}),W=[...J,...Q].sort((Z,K)=>{var H,z;return((H=Z.handler.priority)!=null?H:0)-((z=K.handler.priority)!=null?z:0)});for(let{handler:Z,earlyReturn:K}of W)if(G=Z.handle(G),K!=null&&K(G))return G;return G},im;var VZ4=V0(()=>{n09=Object.defineProperty,r09=Object.defineProperties,a09=Object.getOwnPropertyDescriptors,tW4=Object.getOwnPropertySymbols,s09=Object.prototype.hasOwnProperty,o09=Object.prototype.propertyIsEnumerable,$19=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,X19=/(\*\*)([^*]*\*?)$/,G19=/(__)([^_]*?)$/,J19=/(\*\*\*)([^*]*?)$/,Q19=/(\*)([^*]*?)$/,W19=/(_)([^_]*?)$/,Z19=/(`)([^`]*?)$/,K19=/(~~)([^~]*?)$/,hE=/^[\s_~*`]*$/,QZ4=/^[\s]*[-*+][\s]+$/,U19=/[\p{L}\p{N}_]/u,H19=/^```[^`\n]*```?$/,z19=/^\*{4,}$/,V19=/(__)([^_]+)_$/,A19=/(~~)([^~]+)~$/,$Z4=/~~/g,v19=/<[a-zA-Z/][^>]*$/,l19=/^-{1,2}$/,i19=/^[\s]*-{1,2}[\s]+$/,n19=/^={1,2}$/,r19=/^[\s]*={1,2}[\s]+$/,s19=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),AJ={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},$49=[{handler:{name:"singleTilde",handle:o19,priority:AJ.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:Y19,priority:AJ.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:x19,priority:AJ.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:a19,priority:AJ.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:zZ4,priority:AJ.LINKS},optionKey:"links",earlyReturn:($)=>$.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:k19,priority:AJ.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:R19,priority:AJ.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:I19,priority:AJ.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:w19,priority:AJ.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:T19,priority:AJ.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:h19,priority:AJ.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:t19,priority:AJ.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:u19,priority:AJ.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:p19,priority:AJ.INLINE_KATEX},optionKey:"inlineKatex"}],im=X49});var vZ4={};W8(vZ4,{walkAst:()=>Pf0,toPlainText:()=>AV,toModalElement:()=>V69,toCardElement:()=>z69,toAiMessages:()=>W49,text:()=>cU,tableToAscii:()=>fW4,tableElementToAscii:()=>pm,strong:()=>mW4,stringifyMarkdown:()=>If0,strikethrough:()=>pW4,root:()=>iU,reviver:()=>jZ4,parseMarkdown:()=>bE,paragraph:()=>lU,markdownToPlainText:()=>gW4,link:()=>lW4,isTextNode:()=>PW4,isTableRowNode:()=>bW4,isTableNode:()=>yW4,isTableCellNode:()=>hW4,isStrongNode:()=>_W4,isPostableObject:()=>pf0,isParagraphNode:()=>wW4,isModalElement:()=>F69,isListNode:()=>Rf0,isListItemNode:()=>xW4,isLinkNode:()=>kW4,isJSX:()=>Z69,isInlineCodeNode:()=>CW4,isEmphasisNode:()=>jW4,isDeleteNode:()=>TW4,isCodeNode:()=>SW4,isCardElement:()=>W69,isBlockquoteNode:()=>vW4,inlineCode:()=>dW4,getNodeValue:()=>qf0,getNodeChildren:()=>mm,getEmoji:()=>fE,fromReactModalElement:()=>A69,fromReactElement:()=>J69,fromFullStream:()=>mf0,emphasis:()=>uW4,emoji:()=>r49,deriveChannelId:()=>wZ4,defaultEmojiResolver:()=>lf0,createEmoji:()=>kZ4,convertEmojiPlaceholders:()=>n49,codeBlock:()=>cW4,cardChildToFallbackText:()=>t49,blockquote:()=>iW4,ThreadImpl:()=>A70,ThreadHistoryCache:()=>cf0,TextInput:()=>E69,Table:()=>H69,THREAD_STATE_TTL_MS:()=>am,StreamingPlan:()=>l49,StreamingMarkdownRenderer:()=>_Z4,SelectOption:()=>O69,Select:()=>B69,Section:()=>U69,RateLimitError:()=>N49,RadioSelect:()=>L69,Plan:()=>c49,NotImplementedError:()=>df0,Modal:()=>N69,MessageHistoryCache:()=>d49,Message:()=>wX,LockError:()=>PZ4,LinkButton:()=>K69,Image:()=>Q69,Fields:()=>G69,Field:()=>X69,ExternalSelect:()=>D69,EmojiResolver:()=>SZ4,Divider:()=>Y69,DEFAULT_EMOJI_MAP:()=>CZ4,ConsoleLogger:()=>hf0,ChatError:()=>tZ,Chat:()=>p49,ChannelImpl:()=>hj,CardText:()=>$69,CardLink:()=>e49,Card:()=>o49,Button:()=>s49,BaseFormatConverter:()=>nW4,Actions:()=>a49});function J49($){return G49.some((Y)=>$===Y||$.startsWith(Y))}async function Q49($){if($.type==="image"){if($.fetchData)try{let Y=await $.fetchData(),X=$.mimeType??"image/png";return{type:"file",data:`data:${X};base64,${Y.toString("base64")}`,mediaType:X,filename:$.name}}catch(Y){return console.error("toAiMessages: failed to fetch image data",Y),null}return null}if($.type==="file"&&$.mimeType&&J49($.mimeType)){if($.fetchData)try{let Y=await $.fetchData();return{type:"file",data:`data:${$.mimeType};base64,${Y.toString("base64")}`,filename:$.name,mediaType:$.mimeType}}catch(Y){return console.error("toAiMessages: failed to fetch file data",Y),null}return null}return null}async function W49($,Y){let X=Y?.includeNames??!1,G=Y?.transformMessage,J=Y?.onUnsupportedAttachment??((K)=>{console.warn(`toAiMessages: unsupported attachment type "${K.type}"${K.name?` (${K.name})`:""} \u2014 skipped`)}),W=[...$].sort((K,H)=>(K.metadata.dateSent?.getTime()??0)-(H.metadata.dateSent?.getTime()??0)).filter((K)=>K.text.trim());return(await Promise.all(W.map(async(K)=>{let H=K.author.isMe?"assistant":"user",z=X&&H==="user"?`[${K.author.userName}]: ${K.text}`:K.text;if(K.links&&K.links.length>0){let A=K.links.map((F)=>{let N=F.fetchMessage?[`[Embedded message: ${F.url}]`]:[F.url];if(F.title)N.push(`Title: ${F.title}`);if(F.description)N.push(`Description: ${F.description}`);if(F.siteName)N.push(`Site: ${F.siteName}`);return N.join(`
`)}).join(`

`);z+=`

Links:
${A}`}let V;if(H==="user"){let A=[];for(let F of K.attachments??[]){let N=await Q49(F);if(N)A.push(N);else if(F.type==="video"||F.type==="audio")J(F,K)}if(A.length>0)V={role:H,content:[{type:"text",text:z},...A]};else V={role:H,content:z}}else V={role:H,content:z};if(G)return{result:await G(V,K),source:K};return{result:V,source:K}}))).filter((K)=>K.result!=null).map((K)=>K.result)}function K49($){return`${bf0}${$}`}function U49($){if(!$?.startsWith(bf0))return{callbackToken:void 0};return{callbackToken:$.slice(bf0.length)}}function H49(){return crypto.randomUUID().replace(/-/g,"").slice(0,16)}async function z49($,Y){return{type:"actions",children:await Promise.all($.children.map(async(X)=>{if(X.type!=="button"||!X.callbackUrl)return X;let G=H49(),J={url:X.callbackUrl,originalValue:X.value};return await Y.set(`${EZ4}${G}`,J,Z49),{type:"button",id:X.id,label:X.label,style:X.style,disabled:X.disabled,value:K49(G),actionType:X.actionType}}))}}function MZ4($){for(let Y of $){if(Y.type==="actions"){for(let X of Y.children)if(X.type==="button"&&X.callbackUrl)return!0}if(Y.type==="section"&&"children"in Y&&MZ4(Y.children))return!0}return!1}async function RZ4($,Y){let X=[];for(let G of $)if(G.type==="actions")X.push(await z49(G,Y));else if(G.type==="section"&&"children"in G)X.push({...G,children:await RZ4(G.children,Y)});else X.push(G);return X}async function z70($,Y){if(!MZ4($.children))return $;return{...$,children:await RZ4($.children,Y)}}async function V49($,Y){let X=await Y.get(`${EZ4}${$}`);if(!X)return null;if(typeof X==="string")return{url:X};return X}async function AZ4($,Y){try{let X=await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Y)});if(!X.ok)return{error:Error(`Callback URL returned ${X.status}: ${await X.text().catch(()=>"")}`),status:X.status};return{status:X.status}}catch(X){return{error:X}}}function A49($){V70=$}function rm(){if(!V70)throw Error("No Chat singleton registered. Call chat.registerSingleton() first.");return V70}function F49(){return V70!==null}async function*mf0($){let Y=!1,X=!1;for await(let G of $){if(typeof G==="string"){yield G;continue}if(G===null||typeof G!=="object"||!("type"in G))continue;let J=G;if(D49.has(J.type)){yield G;continue}let Q=J.text??J.delta??J.textDelta;if(J.type==="text-delta"&&typeof Q==="string"){if(Y&&X)yield`

`;Y=!1,X=!0,yield Q}else if(J.type==="finish-step")Y=!0}}function vf0($,Y){qZ4.set($,Y)}function pf0($){return typeof $==="object"&&$!==null&&$.$$typeof===uf0}async function IZ4($,Y,X,G,J){let Q=(W)=>({adapter:Y,logger:J,messageId:W.id,threadId:W.threadId??X});if($.isSupported(Y)&&Y.postObject){let W=await Y.postObject(X,$.kind,$.getPostData());$.onPosted(Q(W))}else{let W=await G(X,$.getFallbackText());$.onPosted(Q(W))}}function L49($){return"adapterName"in $&&!("adapter"in $)}function B49($){return $!==null&&typeof $==="object"&&Symbol.asyncIterator in $}function wZ4($,Y){return $.channelIdFromThreadId(Y)}function O49($){if(typeof $==="string")return{plainText:$,formatted:iU([lU([cU($)])]),attachments:[]};if("raw"in $)return{plainText:$.raw,formatted:iU([lU([cU($.raw)])]),attachments:$.attachments||[]};if("markdown"in $){let Y=bE($.markdown);return{plainText:AV(Y),formatted:Y,attachments:$.attachments||[]}}if("ast"in $)return{plainText:AV($.ast),formatted:$.ast,attachments:$.attachments||[]};if("card"in $){let Y=$.fallbackText||cm($.card);return{plainText:Y,formatted:iU([lU([cU(Y)])]),attachments:[]}}if("type"in $&&$.type==="card"){let Y=cm($);return{plainText:Y,formatted:iU([lU([cU(Y)])]),attachments:[]}}throw Error("Invalid PostableMessage format")}function DZ4($){return im($).length<=$.length}function M49($){if($.length===0||DZ4($))return $;for(let Y=$.length-1;Y>=0;Y--)if(E49.has($[Y])){while(Y>0&&$[Y-1]===$[Y])Y--;let X=$.slice(0,Y);if(DZ4(X))return X}return""}function xf0($){let Y=!1;for(let X of $.split(`
`)){let G=X.trimStart();if(G.startsWith("```")||G.startsWith("~~~"))Y=!Y}return Y}function NZ4($){let Y=$.endsWith(`
`),X=$.split(`
`);if(!Y&&X.length>0)X.pop();if(Y&&X.length>0&&X.at(-1)==="")X.pop();let G=0,J=!1;for(let K=X.length-1;K>=0;K--){let H=X[K].trim();if(H==="")break;if(gf0.test(H)){J=!0;break}if(ff0.test(H))G++;else break}if(J||G===0)return $;let Q=X.length-G,W=X.slice(0,Q),Z=W.join(`
`);if(W.length>0)Z+=`
`;return Z}function R49($,Y=!1){let X=$.endsWith(`
`),G=$.split(`
`);if(X&&G.length>0&&G.at(-1)==="")G.pop();let J=[],Q=!1,W=!1;for(let K=0;K<G.length;K++){let H=G[K].trim();if(!Q&&(H.startsWith("```")||H.startsWith("~~~"))){W=!W,J.push(G[K]);continue}if(W){J.push(G[K]);continue}let z=H!==""&&(ff0.test(H)||gf0.test(H));if(z&&!Q){let V=!1;for(let A=K;A<G.length;A++){let F=G[A].trim();if(gf0.test(F)){V=!0;break}if(F===""||!ff0.test(F))break}if(V)J.push("```"),Q=!0}else if(!z&&Q)J.push("```"),Q=!1;J.push(G[K])}if(Q&&Y)J.push("```");let Z=J.join(`
`);if(X)Z+=`
`;return Z}function q49($){return"adapterName"in $&&!("adapter"in $)}function I49($){return $!==null&&typeof $==="object"&&Symbol.asyncIterator in $}function P49($){if(typeof $==="string")return{plainText:$,formatted:iU([lU([cU($)])]),attachments:[]};if("raw"in $)return{plainText:$.raw,formatted:iU([lU([cU($.raw)])]),attachments:$.attachments||[]};if("markdown"in $){let Y=bE($.markdown);return{plainText:AV(Y),formatted:Y,attachments:$.attachments||[]}}if("ast"in $)return{plainText:AV($.ast),formatted:$.ast,attachments:$.attachments||[]};if("card"in $){let Y=$.fallbackText||cm($.card);return{plainText:Y,formatted:iU([lU([cU(Y)])]),attachments:[]}}if("type"in $&&$.type==="card"){let Y=cm($);return{plainText:Y,formatted:iU([lU([cU(Y)])]),attachments:[]}}throw Error("Invalid PostableMessage format")}function jZ4($,Y){if(Y&&typeof Y==="object"&&"_type"in Y){let X=Y;if(X._type==="chat:Thread")return A70.fromJSON(Y);if(X._type==="chat:Channel")return hj.fromJSON(Y);if(X._type==="chat:Message")return wX.fromJSON(Y)}return Y}function yf0($){return typeof $==="object"&&$!==null&&$[TZ4]===!0}function U70($){return`${j49}${$}`}function x49($){if($===void 0)return;if(typeof $==="number")return $;let Y=S49.exec($);if(!Y)throw Error(`Invalid duration: ${$} (expected number of ms, or "<n>[smhd]")`);let X=Number.parseInt(Y[1],10),G=Y[2];return X*k49[G]}function y49($){return new Promise((Y)=>setTimeout(Y,$))}function H70($){if(!$)return"";if(Array.isArray($))return $.join(" ").trim();if(typeof $==="string")return $;if("markdown"in $)return AV(bE($.markdown));if("ast"in $)return AV($.ast);return""}function fE($){let Y=OZ4.get($);if(!Y)Y=Object.freeze({name:$,toString:()=>`{{emoji:${$}}}`,toJSON:()=>`{{emoji:${$}}}`}),OZ4.set($,Y);return Y}function n49($,Y,X=lf0){return $.replace(i49,(G,J)=>{switch(Y){case"slack":return`:${X.toSlack(J)}:`;case"gchat":return X.toGChat(J);case"teams":return X.toGChat(J);case"discord":return X.toDiscord(J);case"messenger":return X.toGChat(J);case"github":return X.toGChat(J);case"linear":return X.toGChat(J);case"whatsapp":return X.toGChat(J);default:return X.toGChat(J)}})}function kZ4($){let Y=["thumbs_up","thumbs_down","clap","wave","pray","muscle","ok_hand","point_up","point_down","point_left","point_right","raised_hands","shrug","facepalm","heart","smile","laugh","thinking","sad","cry","angry","love_eyes","cool","wink","surprised","worried","confused","neutral","sleeping","sick","mind_blown","relieved","grimace","rolling_eyes","hug","zany","check","x","question","exclamation","warning","stop","info","100","fire","star","sparkles","lightning","boom","eyes","green_circle","yellow_circle","red_circle","blue_circle","white_circle","black_circle","rocket","party","confetti","balloon","gift","trophy","medal","lightbulb","gear","wrench","hammer","bug","link","lock","unlock","key","pin","memo","clipboard","calendar","clock","hourglass","bell","megaphone","speech_bubble","email","inbox","outbox","package","folder","file","chart_up","chart_down","coffee","pizza","beer","arrow_up","arrow_down","arrow_left","arrow_right","refresh","sun","cloud","rain","snow","rainbow"],X={custom:(G)=>fE(G)};for(let G of Y)X[G]=fE(G);if($){for(let G of Object.keys($))X[G]=fE(G);lf0.extend($)}return X}var G49,bf0="__cb:",EZ4="chat:callback:",Z49=2592000000,V70=null,D49,qZ4,wX,uf0,tZ,N49,PZ4,df0,hf0=class ${prefix;level;constructor(Y="info",X="chat-sdk"){this.level=Y,this.prefix=X}shouldLog(Y){let X=["debug","info","warn","error","silent"];return X.indexOf(Y)>=X.indexOf(this.level)}child(Y){return new $(this.level,`${this.prefix}:${Y}`)}debug(Y,...X){if(this.shouldLog("debug"))console.debug(`[${this.prefix}] ${Y}`,...X)}info(Y,...X){if(this.shouldLog("info"))console.info(`[${this.prefix}] ${Y}`,...X)}warn(Y,...X){if(this.shouldLog("warn"))console.warn(`[${this.prefix}] ${Y}`,...X)}error(Y,...X){if(this.shouldLog("error"))console.error(`[${this.prefix}] ${Y}`,...X)}},am=2592000000,FZ4="channel-state:",hj,_Z4=class{accumulated="";dirty=!0;cachedRender="";finished=!1;fenceToggles=0;incompleteLine="";options;constructor($={}){this.options={wrapTablesForAppend:$.wrapTablesForAppend??!0}}push($){this.accumulated+=$,this.dirty=!0,this.incompleteLine+=$;let Y=this.incompleteLine.split(`
`);this.incompleteLine=Y.pop()??"";for(let X of Y){let G=X.trimStart();if(G.startsWith("```")||G.startsWith("~~~"))this.fenceToggles++}}isAccumulatedInsideFence(){let $=this.fenceToggles%2===1,Y=this.incompleteLine.trimStart();if(Y.startsWith("```")||Y.startsWith("~~~"))$=!$;return $}render(){if(!this.dirty)return this.cachedRender;if(this.dirty=!1,this.finished)return this.cachedRender=im(this.accumulated),this.cachedRender;if(this.isAccumulatedInsideFence())return this.cachedRender=im(this.accumulated),this.cachedRender;let $=NZ4(this.accumulated);return this.cachedRender=im($),this.cachedRender}getCommittableText(){if(this.finished)return this.formatAppendOnlyText(this.accumulated,!0);let $=this.accumulated;if($.length>0&&!$.endsWith(`
`)){let G=$.lastIndexOf(`
`),J=G>=0?$.slice(0,G+1):"";if(xf0(J))return this.formatAppendOnlyText($);$=J}if(xf0($))return this.formatAppendOnlyText($);let Y=NZ4($),X=this.formatAppendOnlyText(Y);if(xf0(X))return X;return M49(X)}getText(){return this.accumulated}finish(){return this.finished=!0,this.dirty=!0,this.render()}formatAppendOnlyText($,Y=!1){if(!this.options.wrapTablesForAppend)return $;return R49($,Y)}},E49,ff0,gf0,LZ4="thread-state:",A70,w49=100,_49=604800000,BZ4="msg-history:",cf0=class{state;maxMessages;ttlMs;constructor($,Y){this.state=$,this.maxMessages=Y?.maxMessages??w49,this.ttlMs=Y?.ttlMs??_49}async append($,Y){let X=`${BZ4}${$}`,G=Y.toJSON();G.raw=null,await this.state.appendToList(X,G,{maxLength:this.maxMessages,ttlMs:this.ttlMs})}async getMessages($,Y){let X=`${BZ4}${$}`,G=await this.state.getList(X);return(Y&&G.length>Y?G.slice(G.length-Y):G).map((Q)=>wX.fromJSON(Q))}},j49="transcripts:user:",T49=200,C49=50,S49,TZ4="__chatSdkTombstone",k49,v49=class{state;maxPerUser;retentionMs;storeFormatted;constructor($,Y){this.state=$,this.maxPerUser=Y.maxPerUser??T49,this.retentionMs=x49(Y.retention),this.storeFormatted=Y.storeFormatted??!1}async append($,Y,X){let G=Y instanceof wX,J,Q,W;if(G){if(J=Y.userKey,Q="user",W=Y.id,!J)return null}else if(J=X?.userKey,Q=Y.role,W=Y.platformMessageId,!J)throw Error("transcripts.append: options.userKey is required when appending an AppendInput");let Z={id:crypto.randomUUID(),userKey:J,role:Q,text:Y.text,platform:$.adapter.name,threadId:$.id,timestamp:Date.now()};if(this.storeFormatted&&Y.formatted)Z.formatted=Y.formatted;if(W!==void 0)Z.platformMessageId=W;return await this.state.appendToList(U70(J),Z,{maxLength:this.maxPerUser,ttlMs:this.retentionMs}),Z}async list($){let X=(await this.state.getList(U70($.userKey))).filter((J)=>!yf0(J));if($.platforms&&$.platforms.length>0){let J=new Set($.platforms);X=X.filter((Q)=>J.has(Q.platform))}if($.threadId!==void 0){let J=$.threadId;X=X.filter((Q)=>Q.threadId===J)}if($.roles&&$.roles.length>0){let J=new Set($.roles);X=X.filter((Q)=>J.has(Q.role))}let G=$.limit??C49;if(X.length>G)X=X.slice(X.length-G);return X}async count($){return(await this.state.getList(U70($.userKey))).filter((X)=>!yf0(X)).length}async delete($){let Y=U70($.userKey),G=(await this.state.getList(Y)).filter((Q)=>!yf0(Q)).length,J={[TZ4]:!0};return await this.state.appendToList(Y,J,{maxLength:1,ttlMs:this.retentionMs}),{deleted:G}}},nm=30000,b49,h49,f49,g49,m49=300000,u49=86400000,p49=class{registerSingleton(){return A49(this),this}get transcripts(){if(!this._transcripts)throw Error("chat.transcripts is not configured \u2014 pass `transcripts` and `identity` to ChatConfig to enable it");return this._transcripts}static getSingleton(){return rm()}static hasSingleton(){return F49()}adapters;_stateAdapter;userName;logger;_streamingUpdateIntervalMs;_fallbackStreamingPlaceholderText;_dedupeTtlMs;_onLockConflict;_threadHistory;_identity;_transcripts;_concurrencyStrategy;_concurrencyConfig;_concurrentSlots=new Map;_lockScope;mentionHandlers=[];directMessageHandlers=[];messagePatterns=[];subscribedMessageHandlers=[];reactionHandlers=[];actionHandlers=[];optionsLoadHandlers=[];modalSubmitHandlers=[];modalCloseHandlers=[];slashCommandHandlers=[];assistantThreadStartedHandlers=[];assistantContextChangedHandlers=[];appHomeOpenedHandlers=[];memberJoinedChannelHandlers=[];initPromise=null;initialized=!1;webhooks;constructor($){if(this.userName=$.userName,this._stateAdapter=$.state,this.adapters=new Map,this._streamingUpdateIntervalMs=$.streamingUpdateIntervalMs??500,this._fallbackStreamingPlaceholderText=$.fallbackStreamingPlaceholderText!==void 0?$.fallbackStreamingPlaceholderText:"...",this._dedupeTtlMs=$.dedupeTtlMs??m49,this._onLockConflict=$.onLockConflict,this._lockScope=$.lockScope,typeof $.logger==="string")this.logger=new hf0($.logger);else this.logger=$.logger||new hf0("info");let Y=$.concurrency;if(Y)if(typeof Y==="string")this._concurrencyStrategy=Y,this._concurrencyConfig={debounceMs:1500,maxConcurrent:Number.POSITIVE_INFINITY,maxQueueSize:10,onQueueFull:"drop-oldest",queueEntryTtlMs:90000};else{if(Y.maxConcurrent!==void 0&&Y.maxConcurrent<1)throw Error(`concurrency.maxConcurrent must be >= 1 (got ${Y.maxConcurrent})`);if(Y.maxConcurrent!==void 0&&Y.strategy!=="concurrent")this.logger.warn(`concurrency.maxConcurrent has no effect when strategy is "${Y.strategy}" \u2014 it only applies to the "concurrent" strategy.`);this._concurrencyStrategy=Y.strategy,this._concurrencyConfig={debounceMs:Y.debounceMs??1500,maxConcurrent:Y.maxConcurrent??Number.POSITIVE_INFINITY,maxQueueSize:Y.maxQueueSize??10,onQueueFull:Y.onQueueFull??"drop-oldest",queueEntryTtlMs:Y.queueEntryTtlMs??90000}}else this._concurrencyStrategy="drop",this._concurrencyConfig={debounceMs:1500,maxConcurrent:Number.POSITIVE_INFINITY,maxQueueSize:10,onQueueFull:"drop-oldest",queueEntryTtlMs:90000};if(this._threadHistory=new cf0(this._stateAdapter,$.threadHistory??$.messageHistory),$.transcripts){if(!$.identity)throw Error("ChatConfig.transcripts requires ChatConfig.identity to be set \u2014 the cross-platform user key must be resolvable");this._identity=$.identity,this._transcripts=new v49(this._stateAdapter,$.transcripts)}else this._identity=$.identity;let X={};for(let[G,J]of Object.entries($.adapters))this.adapters.set(G,J),X[G]=(Q,W)=>this.handleWebhook(G,Q,W);this.webhooks=X,this.logger.debug("Chat instance created",{adapters:Object.keys($.adapters)})}async handleWebhook($,Y,X){await this.ensureInitialized();let G=this.adapters.get($);if(!G)return new Response(`Unknown adapter: ${$}`,{status:404});return G.handleWebhook(Y,X)}async ensureInitialized(){if(this.initialized)return;if(!this.initPromise)this.initPromise=this.doInitialize();await this.initPromise}async doInitialize(){this.logger.info("Initializing chat instance..."),await this._stateAdapter.connect(),this.logger.debug("State connected");let $=Array.from(this.adapters.values()).map(async(Y)=>{this.logger.debug("Initializing adapter",Y.name);let X=await Y.initialize(this);return this.logger.debug("Adapter initialized",Y.name),X});await Promise.all($),this.initialized=!0,this.logger.info("Chat instance initialized",{adapters:Array.from(this.adapters.keys())})}async shutdown(){this.logger.info("Shutting down chat instance...");let $=Array.from(this.adapters.values()).map(async(X)=>{if(!X.disconnect)return;this.logger.debug("Disconnecting adapter",X.name),await X.disconnect(),this.logger.debug("Adapter disconnected",X.name)}),Y=await Promise.allSettled($);for(let X of Y)if(X.status==="rejected")this.logger.error("Adapter disconnect failed",X.reason);await this._stateAdapter.disconnect(),this.initialized=!1,this.initPromise=null,this.logger.info("Chat instance shut down")}async initialize(){await this.ensureInitialized()}onNewMention($){this.mentionHandlers.push($),this.logger.debug("Registered mention handler")}onDirectMessage($){this.directMessageHandlers.push($),this.logger.debug("Registered direct message handler")}onNewMessage($,Y){this.messagePatterns.push({pattern:$,handler:Y}),this.logger.debug("Registered message pattern handler",{pattern:$.toString()})}onSubscribedMessage($){this.subscribedMessageHandlers.push($),this.logger.debug("Registered subscribed message handler")}onReaction($,Y){if(typeof $==="function")this.reactionHandlers.push({emoji:[],handler:$}),this.logger.debug("Registered reaction handler for all emoji");else if(Y)this.reactionHandlers.push({emoji:$,handler:Y}),this.logger.debug("Registered reaction handler",{emoji:$.map((X)=>typeof X==="string"?X:X.name)})}onAction($,Y){if(typeof $==="function")this.actionHandlers.push({actionIds:[],handler:$}),this.logger.debug("Registered action handler for all actions");else if(Y){let X=Array.isArray($)?$:[$];this.actionHandlers.push({actionIds:X,handler:Y}),this.logger.debug("Registered action handler",{actionIds:X})}}onOptionsLoad($,Y){if(typeof $==="function")this.optionsLoadHandlers.push({actionIds:[],handler:$}),this.logger.debug("Registered options load handler for all action IDs");else if(Y){let X=Array.isArray($)?$:[$];this.optionsLoadHandlers.push({actionIds:X,handler:Y}),this.logger.debug("Registered options load handler",{actionIds:X})}}onModalSubmit($,Y){if(typeof $==="function")this.modalSubmitHandlers.push({callbackIds:[],handler:$}),this.logger.debug("Registered modal submit handler for all modals");else if(Y){let X=Array.isArray($)?$:[$];this.modalSubmitHandlers.push({callbackIds:X,handler:Y}),this.logger.debug("Registered modal submit handler",{callbackIds:X})}}onModalClose($,Y){if(typeof $==="function")this.modalCloseHandlers.push({callbackIds:[],handler:$}),this.logger.debug("Registered modal close handler for all modals");else if(Y){let X=Array.isArray($)?$:[$];this.modalCloseHandlers.push({callbackIds:X,handler:Y}),this.logger.debug("Registered modal close handler",{callbackIds:X})}}onSlashCommand($,Y){if(typeof $==="function")this.slashCommandHandlers.push({commands:[],handler:$}),this.logger.debug("Registered slash command handler for all commands");else if(Y){let G=(Array.isArray($)?$:[$]).map((J)=>J.startsWith("/")?J:`/${J}`);this.slashCommandHandlers.push({commands:G,handler:Y}),this.logger.debug("Registered slash command handler",{commands:G})}}onAssistantThreadStarted($){this.assistantThreadStartedHandlers.push($),this.logger.debug("Registered assistant thread started handler")}onAssistantContextChanged($){this.assistantContextChangedHandlers.push($),this.logger.debug("Registered assistant context changed handler")}onAppHomeOpened($){this.appHomeOpenedHandlers.push($),this.logger.debug("Registered app home opened handler")}onMemberJoinedChannel($){this.memberJoinedChannelHandlers.push($),this.logger.debug("Registered member joined channel handler")}getAdapter($){return this.adapters.get($)}reviver(){return this.registerSingleton(),jZ4}processMessage($,Y,X,G){let J=(async()=>{let W=typeof X==="function"?await X():X;await this.handleIncomingMessage($,Y,W)})(),Q=J.catch((W)=>{this.logger.error("Message processing error",{error:W,threadId:Y})});if(G?.waitUntil)G.waitUntil(Q);return J}processReaction($,Y){let X=this.handleReactionEvent($).catch((G)=>{this.logger.error("Reaction processing error",{error:G,emoji:$.emoji,messageId:$.messageId})});if(Y?.waitUntil)Y.waitUntil(X)}processAction($,Y){let X=this.handleActionEvent($,Y).catch((G)=>{this.logger.error("Action processing error",{error:G,actionId:$.actionId,messageId:$.messageId})});if(Y?.waitUntil)Y.waitUntil(X);return X}async processOptionsLoad($,Y){let X=[...this.optionsLoadHandlers.filter(({actionIds:G})=>G.length>0&&G.includes($.actionId)),...this.optionsLoadHandlers.filter(({actionIds:G})=>G.length===0)];for(let{handler:G}of X)try{let J=await G($);if(J)return J}catch(J){this.logger.error("Options load handler error",{error:J,actionId:$.actionId})}}async processModalSubmit($,Y,X){let{callbackUrl:G,relatedThread:J,relatedMessage:Q,relatedChannel:W}=await this.retrieveModalContext($.adapter.name,Y),Z={...$,relatedThread:J,relatedMessage:Q,relatedChannel:W},K;for(let{callbackIds:H,handler:z}of this.modalSubmitHandlers)if(H.length===0||H.includes($.callbackId))try{let V=await z(Z);if(V){K=V;break}}catch(V){this.logger.error("Modal submit handler error",{error:V,callbackId:$.callbackId})}if(G&&K?.action!=="errors"){let H=AZ4(G,{type:"modal_submit",callbackId:$.callbackId,values:$.values,user:{id:$.user.userId,name:$.user.userName}}).then(({error:z})=>{if(z)this.logger.error("Modal callbackUrl POST failed",{callbackUrl:G,error:z})}).catch((z)=>{this.logger.error("Modal callbackUrl POST failed",{callbackUrl:G,error:z})});if(X?.waitUntil)X.waitUntil(H)}return K}processModalClose($,Y,X){let G=(async()=>{let{relatedThread:J,relatedMessage:Q,relatedChannel:W}=await this.retrieveModalContext($.adapter.name,Y),Z={...$,relatedThread:J,relatedMessage:Q,relatedChannel:W};for(let{callbackIds:K,handler:H}of this.modalCloseHandlers)if(K.length===0||K.includes($.callbackId))await H(Z)})().catch((J)=>{this.logger.error("Modal close handler error",{error:J,callbackId:$.callbackId})});if(X?.waitUntil)X.waitUntil(G)}processSlashCommand($,Y){let X=this.handleSlashCommandEvent($,Y).catch((G)=>{this.logger.error("Slash command processing error",{error:G,command:$.command,text:$.text})});if(Y?.waitUntil)Y.waitUntil(X)}processAssistantThreadStarted($,Y){let X=(async()=>{for(let G of this.assistantThreadStartedHandlers)await G($)})().catch((G)=>{this.logger.error("Assistant thread started handler error",{error:G,threadId:$.threadId})});if(Y?.waitUntil)Y.waitUntil(X)}processAssistantContextChanged($,Y){let X=(async()=>{for(let G of this.assistantContextChangedHandlers)await G($)})().catch((G)=>{this.logger.error("Assistant context changed handler error",{error:G,threadId:$.threadId})});if(Y?.waitUntil)Y.waitUntil(X)}processAppHomeOpened($,Y){let X=(async()=>{for(let G of this.appHomeOpenedHandlers)await G($)})().catch((G)=>{this.logger.error("App home opened handler error",{error:G,userId:$.userId})});if(Y?.waitUntil)Y.waitUntil(X)}processMemberJoinedChannel($,Y){let X=(async()=>{for(let G of this.memberJoinedChannelHandlers)await G($)})().catch((G)=>{this.logger.error("Member joined channel handler error",{error:G,channelId:$.channelId,userId:$.userId})});if(Y?.waitUntil)Y.waitUntil(X)}async handleSlashCommandEvent($,Y){if(this.logger.debug("Incoming slash command",{adapter:$.adapter.name,command:$.command,text:$.text,user:$.user.userName}),$.user.isMe){this.logger.debug("Skipping slash command from self",{command:$.command});return}let X=new hj({id:$.channelId,adapter:$.adapter,stateAdapter:this._stateAdapter}),G={...$,channel:X,openModal:async(J)=>{if(!($.triggerId||Y?.onOpenModal)){this.logger.warn("Cannot open modal: no triggerId available");return}if(!(Y?.onOpenModal||$.adapter.openModal)){this.logger.warn(`Cannot open modal: ${$.adapter.name} does not support modals`);return}let Q=J;if(bW(J)){let Z=W70(J);if(!Z)throw Error("Invalid JSX element: must be a Modal element");Q=Z}let W=crypto.randomUUID();if(await this.storeModalContext($.adapter.name,W,void 0,void 0,X,Q.callbackUrl),Y?.onOpenModal)return Y.onOpenModal(Q,W);if($.triggerId&&$.adapter.openModal)return $.adapter.openModal($.triggerId,Q,W);return}};this.logger.debug("Checking slash command handlers",{handlerCount:this.slashCommandHandlers.length,command:$.command});for(let{commands:J,handler:Q}of this.slashCommandHandlers){if(J.length===0){this.logger.debug("Running catch-all slash command handler"),await Q(G);continue}if(J.includes($.command))this.logger.debug("Running matched slash command handler",{command:$.command}),await Q(G)}}async storeModalContext($,Y,X,G,J,Q){let W=`modal-context:${$}:${Y}`,Z={thread:X?.toJSON(),message:G?.toJSON(),channel:J?.toJSON(),callbackUrl:Q};try{await this._stateAdapter.set(W,Z,u49)}catch(K){this.logger.error("Failed to store modal context",{contextId:Y,error:K})}}async retrieveModalContext($,Y){if(!Y)return{callbackUrl:void 0,relatedThread:void 0,relatedMessage:void 0,relatedChannel:void 0};let X=`modal-context:${$}:${Y}`,G=await this._stateAdapter.get(X);if(!G)return{callbackUrl:void 0,relatedThread:void 0,relatedMessage:void 0,relatedChannel:void 0};await this._stateAdapter.delete(X);let J=this.adapters.get($),Q;if(G.thread)Q=A70.fromJSON(G.thread,J);let W;if(G.message&&Q){let K=wX.fromJSON(G.message);W=Q.createSentMessageFromMessage(K)}let Z;if(G.channel)Z=hj.fromJSON(G.channel,J);return{callbackUrl:G.callbackUrl,relatedThread:Q,relatedMessage:W,relatedChannel:Z}}async handleActionEvent($,Y){if(this.logger.debug("Incoming action",{adapter:$.adapter.name,actionId:$.actionId,value:$.value,user:$.user.userName,messageId:$.messageId,threadId:$.threadId}),$.user.isMe){this.logger.debug("Skipping action from self",{actionId:$.actionId});return}let{callbackToken:X}=U49($.value),G=null;if(X)G=await V49(X,this._stateAdapter);let J=G?{...$,value:G.originalValue}:$,Q;if(G){let z=G.url;Q=(async()=>{let{error:V}=await AZ4(z,{type:"action",actionId:$.actionId,value:G.originalValue,user:{id:$.user.userId,name:$.user.userName},threadId:$.threadId,messageId:$.messageId});if(V)this.logger.error("Button callbackUrl POST failed",{callbackUrl:z,actionId:$.actionId,error:V})})()}let W=!1,Z=$.messageId?new wX({id:$.messageId,threadId:$.threadId,text:"",formatted:{type:"root",children:[]},raw:$.raw,author:$.user,metadata:{dateSent:new Date,edited:!1},attachments:[]}):{},K=$.threadId?await this.createThread($.adapter,$.threadId,Z,W):null,H={...J,thread:K,openModal:async(z)=>{if(!($.triggerId||Y?.onOpenModal)){this.logger.warn("Cannot open modal: no triggerId available");return}if(!(Y?.onOpenModal||$.adapter.openModal)){this.logger.warn(`Cannot open modal: ${$.adapter.name} does not support modals`);return}let V=z;if(bW(z)){let D=W70(z);if(!D)throw Error("Invalid JSX element: must be a Modal element");V=D}let A;if(K){if($.messageId?.startsWith("ephemeral:")){let L=K.recentMessages[0];if(L&&typeof L.toJSON==="function")A=L}else if($.messageId&&$.adapter.fetchMessage){let L=await $.adapter.fetchMessage($.threadId,$.messageId).catch(()=>null);if(L)A=new wX(L);else{let B=K.recentMessages[0];if(B&&typeof B.toJSON==="function")A=B}}}let F=crypto.randomUUID(),N=K?K.channel:void 0;if(await this.storeModalContext($.adapter.name,F,K?K:void 0,A,N,V.callbackUrl),Y?.onOpenModal)return Y.onOpenModal(V,F);if($.triggerId&&$.adapter.openModal)return $.adapter.openModal($.triggerId,V,F);return}};this.logger.debug("Checking action handlers",{handlerCount:this.actionHandlers.length,actionId:$.actionId});for(let{actionIds:z,handler:V}of this.actionHandlers){if(z.length===0){this.logger.debug("Running catch-all action handler"),await V(H);continue}if(z.includes($.actionId))this.logger.debug("Running matched action handler",{actionId:$.actionId}),await V(H)}if(Q)await Q}async handleReactionEvent($){if(this.logger.debug("Incoming reaction",{adapter:$.adapter?.name,emoji:$.emoji,rawEmoji:$.rawEmoji,added:$.added,user:$.user.userName,messageId:$.messageId,threadId:$.threadId}),$.user.isMe){this.logger.debug("Skipping reaction from self",{emoji:$.emoji});return}if(!$.adapter){this.logger.error("Reaction event missing adapter");return}let Y=await this._stateAdapter.isSubscribed($.threadId),X=await this.createThread($.adapter,$.threadId,$.message??{},Y),G={...$,adapter:$.adapter,thread:X};this.logger.debug("Checking reaction handlers",{handlerCount:this.reactionHandlers.length,emoji:$.emoji.name,rawEmoji:$.rawEmoji});for(let{emoji:J,handler:Q}of this.reactionHandlers){if(J.length===0){this.logger.debug("Running catch-all reaction handler"),await Q(G);continue}let W=J.some((Z)=>{if(Z===G.emoji)return!0;let K=typeof Z==="string"?Z:Z.name;return K===G.emoji.name||K===G.rawEmoji});if(this.logger.debug("Reaction filter check",{filterEmoji:J.map((Z)=>typeof Z==="string"?Z:Z.name),eventEmoji:G.emoji.name,matches:W}),W)this.logger.debug("Running matched reaction handler"),await Q(G)}}getState(){return this._stateAdapter}getUserName(){return this.userName}getLogger($){if($)return this.logger.child($);return this.logger}async openDM($){let Y=typeof $==="string"?$:$.userId,X=this.inferAdapterFromUserId(Y);if(!X.openDM)throw new tZ(`Adapter "${X.name}" does not support openDM`,"NOT_SUPPORTED");let G=await X.openDM(Y);return this.createThread(X,G,{},!1)}async getUser($){let Y=typeof $==="string"?$:$.userId,X=this.inferAdapterFromUserId(Y);if(!X.getUser)throw new tZ(`Adapter "${X.name}" does not support getUser`,"NOT_SUPPORTED");return X.getUser(Y)}channel($){let Y=$.split(":")[0];if(!Y)throw new tZ(`Invalid channel ID: ${$}`,"INVALID_CHANNEL_ID");let X=this.adapters.get(Y);if(!X)throw new tZ(`Adapter "${Y}" not found for channel ID "${$}"`,"ADAPTER_NOT_FOUND");return new hj({id:$,adapter:X,stateAdapter:this._stateAdapter})}thread($){let Y=$.split(":")[0];if(!Y)throw new tZ(`Invalid thread ID: ${$}`,"INVALID_THREAD_ID");let X=this.adapters.get(Y);if(!X)throw new tZ(`Adapter "${Y}" not found for thread ID "${$}"`,"ADAPTER_NOT_FOUND");return this.createThread(X,$,{},!1)}inferAdapterFromUserId($){if($.startsWith("users/")){let Y=this.adapters.get("gchat");if(Y)return Y}if($.startsWith("29:")){let Y=this.adapters.get("teams");if(Y)return Y}if(f49.test($)){let Y=this.adapters.get("linear");if(Y)return Y}if(b49.test($)){let Y=this.adapters.get("slack");if(Y)return Y}if(g49.test($)){let Y=[];if(h49.test($)&&this.adapters.has("discord"))Y.push("discord");if(this.adapters.has("telegram"))Y.push("telegram");if(this.adapters.has("github"))Y.push("github");if(Y.length===1){let X=this.adapters.get(Y[0]);if(X)return X}if(Y.length>1)throw new tZ(`Numeric userId "${$}" is ambiguous between adapters: ${Y.join(", ")}. Call the platform's adapter directly (e.g. \`adapter.getUser(userId)\`).`,"AMBIGUOUS_USER_ID")}throw new tZ(`Cannot infer adapter from userId "${$}". Expected: Slack ("U..."), Teams ("29:..."), Google Chat ("users/..."), Linear (UUID), or Discord/Telegram/GitHub (numeric).`,"UNKNOWN_USER_ID_FORMAT")}async getLockKey($,Y){let X=$.channelIdFromThreadId(Y),G;if(typeof this._lockScope==="function"){let J=$.isDM?.(Y)??!1;G=await this._lockScope({adapter:$,channelId:X,isDM:J,threadId:Y})}else G=this._lockScope??$.lockScope??"thread";return G==="channel"?X:Y}async handleIncomingMessage($,Y,X){if(vf0(X,$),this.logger.debug("Incoming message",{adapter:$.name,threadId:Y,messageId:X.id,text:X.text,author:X.author.userName,authorUserId:X.author.userId,isBot:X.author.isBot,isMe:X.author.isMe}),X.author.isMe){this.logger.debug("Skipping message from self (isMe=true)",{adapter:$.name,threadId:Y,author:X.author.userName});return}let G=`dedupe:${$.name}:${X.id}`;if(!await this._stateAdapter.setIfNotExists(G,!0,this._dedupeTtlMs)){this.logger.debug("Skipping duplicate message",{adapter:$.name,messageId:X.id});return}if($.persistThreadHistory||$.persistMessageHistory){let Z=$.channelIdFromThreadId(Y),K=[this._threadHistory.append(Y,X)];if(Z!==Y)K.push(this._threadHistory.append(Z,X));await Promise.all(K)}let Q=await this.getLockKey($,Y),W=this._concurrencyStrategy;if(W==="concurrent"){await this.handleConcurrent($,Y,X);return}if(W==="queue"||W==="debounce"){await this.handleQueueOrDebounce($,Y,Q,X,W);return}await this.handleDrop($,Y,Q,X)}async handleDrop($,Y,X,G){let J=await this._stateAdapter.acquireLock(X,nm);if(!J){if((typeof this._onLockConflict==="function"?await this._onLockConflict(Y,G):this._onLockConflict??"drop")==="force")this.logger.info("Force-releasing lock on thread",{threadId:Y,lockKey:X}),await this._stateAdapter.forceReleaseLock(X),J=await this._stateAdapter.acquireLock(X,nm);if(!J)throw this.logger.warn("Could not acquire lock on thread",{threadId:Y,lockKey:X}),new PZ4(`Could not acquire lock on thread ${Y}. Another instance may be processing.`)}this.logger.debug("Lock acquired",{threadId:Y,lockKey:X,token:J.token});try{await this.dispatchToHandlers($,Y,G)}finally{await this._stateAdapter.releaseLock(J),this.logger.debug("Lock released",{threadId:Y,lockKey:X})}}async handleQueueOrDebounce($,Y,X,G,J){let{maxQueueSize:Q,queueEntryTtlMs:W,onQueueFull:Z,debounceMs:K}=this._concurrencyConfig,H=await this._stateAdapter.acquireLock(X,nm);if(!H){let z=J==="debounce"?1:Q,V=await this._stateAdapter.queueDepth(X);if(V>=z&&J!=="debounce"&&Z==="drop-newest"){this.logger.info("message-dropped",{threadId:Y,lockKey:X,messageId:G.id,reason:"queue-full"});return}await this._stateAdapter.enqueue(X,{message:G,enqueuedAt:Date.now(),expiresAt:Date.now()+W},z),this.logger.info(J==="debounce"?"message-debounce-reset":"message-queued",{threadId:Y,lockKey:X,messageId:G.id,queueDepth:Math.min(V+1,z)});return}this.logger.debug("Lock acquired",{threadId:Y,lockKey:X,token:H.token});try{if(J==="debounce")await this._stateAdapter.enqueue(X,{message:G,enqueuedAt:Date.now(),expiresAt:Date.now()+W},1),this.logger.info("message-debouncing",{threadId:Y,lockKey:X,messageId:G.id,debounceMs:K}),await this.debounceLoop(H,$,Y,X);else await this.dispatchToHandlers($,Y,G),await this.drainQueue(H,$,Y,X)}finally{await this._stateAdapter.releaseLock(H),this.logger.debug("Lock released",{threadId:Y,lockKey:X})}}async debounceLoop($,Y,X,G){let{debounceMs:J}=this._concurrencyConfig;while(!0){await y49(J),await this._stateAdapter.extendLock($,nm);let Q=await this._stateAdapter.dequeue(G);if(!Q)break;let W=this.rehydrateMessage(Q.message,Y);if(Date.now()>Q.expiresAt){this.logger.info("message-expired",{threadId:X,lockKey:G,messageId:W.id});continue}if(await this._stateAdapter.queueDepth(G)>0){this.logger.info("message-superseded",{threadId:X,lockKey:G,droppedId:W.id});continue}this.logger.info("message-dequeued",{threadId:X,lockKey:G,messageId:W.id}),await this.dispatchToHandlers(Y,X,W);break}}async drainQueue($,Y,X,G){while(!0){let J=[];while(!0){let K=await this._stateAdapter.dequeue(G);if(!K)break;let H=this.rehydrateMessage(K.message,Y);if(Date.now()<=K.expiresAt)J.push({message:H,expiresAt:K.expiresAt});else this.logger.info("message-expired",{threadId:X,lockKey:G,messageId:H.id})}if(J.length===0)return;await this._stateAdapter.extendLock($,nm);let Q=J.at(-1);if(!Q)return;let W=J.slice(0,-1).map((K)=>K.message);this.logger.info("message-dequeued",{threadId:X,lockKey:G,messageId:Q.message.id,skippedCount:W.length,totalSinceLastHandler:J.length});let Z={skipped:W,totalSinceLastHandler:J.length};await this.dispatchToHandlers(Y,X,Q.message,Z)}}async handleConcurrent($,Y,X){let{maxConcurrent:G}=this._concurrencyConfig;if(!Number.isFinite(G)){await this.dispatchToHandlers($,Y,X);return}await this.acquireConcurrentSlot(Y,G);try{await this.dispatchToHandlers($,Y,X)}finally{this.releaseConcurrentSlot(Y)}}acquireConcurrentSlot($,Y){let X=this._concurrentSlots.get($);if(!X)X={inFlight:0,waiters:[]},this._concurrentSlots.set($,X);if(X.inFlight<Y)return X.inFlight++,Promise.resolve();return new Promise((G)=>{X.waiters.push(G)})}releaseConcurrentSlot($){let Y=this._concurrentSlots.get($);if(!Y)return;let X=Y.waiters.shift();if(X){X();return}if(Y.inFlight--,Y.inFlight===0&&Y.waiters.length===0)this._concurrentSlots.delete($)}async dispatchToHandlers($,Y,X,G){X.isMention=X.isMention||this.detectMention($,X);let J=await this._stateAdapter.isSubscribed(Y);this.logger.debug("Subscription check",{threadId:Y,isSubscribed:J,subscribedHandlerCount:this.subscribedMessageHandlers.length});let Q=await this.createThread($,Y,X,J);if(this._identity&&X.userKey===void 0)try{let K=await this._identity({adapter:$.name,author:X.author,message:X});if(K)X.userKey=K}catch(K){this.logger.warn("Identity resolver threw; skipping userKey",{error:K,adapter:$.name,threadId:Y,authorUserId:X.author.userId})}let W=$.isDM?.(Y)??!1;if(W&&this.directMessageHandlers.length>0){this.logger.debug("Direct message received - calling handlers",{threadId:Y,handlerCount:this.directMessageHandlers.length});let K=Q.channel;for(let H of this.directMessageHandlers)await H(Q,X,K,G);return}if(W)X.isMention=!0;if(J){this.logger.debug("Message in subscribed thread - calling handlers",{threadId:Y,handlerCount:this.subscribedMessageHandlers.length}),await this.runHandlers(this.subscribedMessageHandlers,Q,X,G);return}if(X.isMention){this.logger.debug("Bot mentioned",{threadId:Y,text:X.text.slice(0,100)}),await this.runHandlers(this.mentionHandlers,Q,X,G);return}this.logger.debug("Checking message patterns",{patternCount:this.messagePatterns.length,patterns:this.messagePatterns.map((K)=>K.pattern.toString()),messageText:X.text});let Z=!1;for(let{pattern:K,handler:H}of this.messagePatterns){let z=K.test(X.text);if(this.logger.debug("Pattern test",{pattern:K.toString(),text:X.text,matches:z}),z)this.logger.debug("Message matched pattern - calling handler",{pattern:K.toString()}),Z=!0,await H(Q,X,G)}if(!Z)this.logger.debug("No handlers matched message",{threadId:Y,text:X.text.slice(0,100)})}createThread($,Y,X,G=!1){let J=$.channelIdFromThreadId(Y),Q=$.isDM?.(Y)??!1,W=$.getChannelVisibility?.(Y)??"unknown";return new A70({id:Y,adapter:$,channelId:J,stateAdapter:this._stateAdapter,initialMessage:X,isSubscribedContext:G,isDM:Q,channelVisibility:W,currentMessage:X,logger:this.logger,streamingUpdateIntervalMs:this._streamingUpdateIntervalMs,fallbackStreamingPlaceholderText:this._fallbackStreamingPlaceholderText,threadHistory:$.persistThreadHistory||$.persistMessageHistory?this._threadHistory:void 0})}detectMention($,Y){let X=$.userName||this.userName,G=$.botUserId;if(new RegExp(`@${this.escapeRegex(X)}\\b`,"i").test(Y.text))return!0;if(G){if(new RegExp(`@${this.escapeRegex(G)}\\b`,"i").test(Y.text))return!0;if(new RegExp(`<@!?${this.escapeRegex(G)}>`,"i").test(Y.text))return!0}return!1}escapeRegex($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}rehydrateMessage($,Y){if($ instanceof wX){if(Y)vf0($,Y);return $}let X=$,G;if(X._type==="chat:Message")G=wX.fromJSON(X);else{let Q=X.metadata,W=Q.dateSent,Z=Q.editedAt;G=new wX({id:X.id,threadId:X.threadId,text:X.text,formatted:X.formatted,raw:X.raw,author:X.author,metadata:{dateSent:W instanceof Date?W:new Date(W),edited:Q.edited,editedAt:Z?new Date(Z instanceof Date?Z.toISOString():Z):void 0},attachments:X.attachments??[],isMention:X.isMention,links:X.links??[]})}if(Y)vf0(G,Y);let J=Y?.rehydrateAttachment?.bind(Y);if(J&&G.attachments.length>0)G.attachments=G.attachments.map((Q)=>Q.fetchData?Q:J(Q));return G}async runHandlers($,Y,X,G){for(let J of $)await J(Y,X,G)}},d49,c49=class{$$typeof=uf0;kind="plan";_model;_bound=null;constructor($){let Y=H70($.initialMessage)||"Plan",X={id:crypto.randomUUID(),title:Y,status:"in_progress"};this._model={title:Y,tasks:[X]}}isSupported($){return!!$.postObject&&!!$.editObject}getPostData(){return this._model}getFallbackText(){let $=[];$.push(`\uD83D\uDCCB ${this._model.title||"Plan"}`);for(let Y of this._model.tasks){let G={complete:"\u2705",in_progress:"\uD83D\uDD04",error:"\u274C"}[Y.status]??"\u2B1C";$.push(`${G} ${Y.title}`)}return $.join(`
`)}onPosted($){this._bound={adapter:$.adapter,fallback:!this.isSupported($.adapter),logger:$.logger,messageId:$.messageId,threadId:$.threadId,updateChain:Promise.resolve()}}get id(){return this._bound?.messageId??""}get threadId(){return this._bound?.threadId??""}get title(){return this._model.title}get tasks(){return this._model.tasks.map(($)=>({id:$.id,title:$.title,status:$.status}))}get currentTask(){let $;for(let Y=this._model.tasks.length-1;Y>=0;Y--)if(this._model.tasks[Y].status==="in_progress"){$=this._model.tasks[Y];break}if($??=this._model.tasks.at(-1),!$)return null;return{id:$.id,title:$.title,status:$.status}}async addTask($){if(!this.canMutate())return null;let Y=H70($.title)||"Task";for(let G of this._model.tasks)if(G.status==="in_progress")G.status="complete";let X={id:crypto.randomUUID(),title:Y,status:"in_progress",details:$.children};return this._model.tasks.push(X),this._model.title=Y,await this.enqueueEdit(),{id:X.id,title:X.title,status:X.status}}async updateTask($){if(!this.canMutate())return null;let Y;if(typeof $==="object"&&$!==null&&"id"in $&&$.id)Y=this._model.tasks.find((X)=>X.id===$.id);else{for(let X=this._model.tasks.length-1;X>=0;X--)if(this._model.tasks[X].status==="in_progress"){Y=this._model.tasks[X];break}Y??=this._model.tasks.at(-1)}if(!Y)return null;if($!==void 0)if(typeof $==="object"&&$!==null&&"output"in $){if($.output!==void 0)Y.output=$.output;if($.status)Y.status=$.status}else Y.output=$;return await this.enqueueEdit(),{id:Y.id,title:Y.title,status:Y.status}}async reset($){if(!this.canMutate())return null;let Y=H70($.initialMessage)||"Plan",X={id:crypto.randomUUID(),title:Y,status:"in_progress"};return this._model={title:Y,tasks:[X]},await this.enqueueEdit(),{id:X.id,title:X.title,status:X.status}}async complete($){if(!this.canMutate())return;for(let Y of this._model.tasks)if(Y.status==="in_progress")Y.status="complete";this._model.title=H70($.completeMessage)||this._model.title,await this.enqueueEdit()}canMutate(){return!!this._bound}enqueueEdit(){if(!this._bound)return Promise.resolve();let $=this._bound,Y=async()=>{if($.fallback)await $.adapter.editMessage($.threadId,$.messageId,this.getFallbackText());else{let G=$.adapter.editObject;if(!G)return;await G.call($.adapter,$.threadId,$.messageId,this.kind,this._model)}},X=$.updateChain.then(Y,Y);return $.updateChain=X.then(()=>{return},(G)=>{$.logger?.warn("Failed to edit plan",G)}),X}},l49=class{$$typeof=uf0;kind="stream";_stream;_options;constructor($,Y={}){this._stream=$,this._options=Y}get stream(){return this._stream}get options(){return this._options}getFallbackText(){return""}getPostData(){return{stream:this._stream,options:this._options}}isSupported($){return!0}onPosted($){}},OZ4,CZ4,SZ4=class{emojiMap;slackToNormalized;gchatToNormalized;constructor($){this.emojiMap={...CZ4,...$},this.slackToNormalized=new Map,this.gchatToNormalized=new Map,this.buildReverseMaps()}buildReverseMaps(){for(let[$,Y]of Object.entries(this.emojiMap)){let X=Array.isArray(Y.slack)?Y.slack:[Y.slack];for(let J of X)this.slackToNormalized.set(J.toLowerCase(),$);let G=Array.isArray(Y.gchat)?Y.gchat:[Y.gchat];for(let J of G)this.gchatToNormalized.set(J,$)}}fromSlack($){let Y=$.replace(/^:|:$/g,"").toLowerCase(),X=this.slackToNormalized.get(Y)??$;return fE(X)}fromGChat($){let Y=this.gchatToNormalized.get($)??$;return fE(Y)}fromTeams($){let X={like:"thumbs_up",heart:"heart",laugh:"laugh",surprised:"surprised",sad:"sad",angry:"angry"}[$]??$;return fE(X)}toSlack($){let Y=typeof $==="string"?$:$.name,X=this.emojiMap[Y];if(!X)return Y;return Array.isArray(X.slack)?X.slack[0]:X.slack}toGChat($){let Y=typeof $==="string"?$:$.name,X=this.emojiMap[Y];if(!X)return Y;return Array.isArray(X.gchat)?X.gchat[0]:X.gchat}toDiscord($){return this.toGChat($)}matches($,Y){let X=typeof Y==="string"?Y:Y.name,G=this.emojiMap[X];if(!G)return $===X;let J=Array.isArray(G.slack)?G.slack:[G.slack],Q=Array.isArray(G.gchat)?G.gchat:[G.gchat],W=$.replace(/^:|:$/g,"").toLowerCase();return J.some((Z)=>Z.toLowerCase()===W)||Q.includes($)}extend($){Object.assign(this.emojiMap,$),this.buildReverseMaps()}},lf0,i49,r49,a49,s49,o49,t49,e49,$69,Y69,X69,G69,J69,Q69,W69,Z69,K69,U69,H69,z69,V69,A69,F69,D69,N69,L69,B69,O69,E69;var xZ4=V0(()=>{oW4();Z70();Z70();Z70();VZ4();G49=["text/","application/json","application/xml","application/javascript","application/typescript","application/yaml","application/x-yaml","application/toml"];D49=new Set(["markdown_text","task_update","plan_update"]);qZ4=new WeakMap;wX=class ${id;threadId;text;formatted;raw;author;metadata;attachments;isMention;userKey;links;_subjectPromise;get subject(){if(this._subjectPromise)return this._subjectPromise;let Y=qZ4.get(this);if(!Y?.fetchSubject)return this._subjectPromise=Promise.resolve(null),this._subjectPromise;return this._subjectPromise=Y.fetchSubject(this.raw).catch(()=>null),this._subjectPromise}constructor(Y){this.id=Y.id,this.threadId=Y.threadId,this.text=Y.text,this.formatted=Y.formatted,this.raw=Y.raw,this.author=Y.author,this.metadata=Y.metadata,this.attachments=Y.attachments,this.isMention=Y.isMention,this.links=Y.links??[]}toJSON(){return{_type:"chat:Message",id:this.id,threadId:this.threadId,text:this.text,formatted:this.formatted,raw:this.raw,author:{userId:this.author.userId,userName:this.author.userName,fullName:this.author.fullName,isBot:this.author.isBot,isMe:this.author.isMe},metadata:{dateSent:this.metadata.dateSent.toISOString(),edited:this.metadata.edited,editedAt:this.metadata.editedAt?.toISOString()},attachments:this.attachments.map((Y)=>({type:Y.type,url:Y.url,name:Y.name,mimeType:Y.mimeType,size:Y.size,width:Y.width,height:Y.height,fetchMetadata:Y.fetchMetadata})),isMention:this.isMention,links:this.links.length>0?this.links.map((Y)=>({url:Y.url,title:Y.title,description:Y.description,imageUrl:Y.imageUrl,siteName:Y.siteName})):void 0}}static fromJSON(Y){return new $({id:Y.id,threadId:Y.threadId,text:Y.text,formatted:Y.formatted,raw:Y.raw,author:Y.author,metadata:{dateSent:new Date(Y.metadata.dateSent),edited:Y.metadata.edited,editedAt:Y.metadata.editedAt?new Date(Y.metadata.editedAt):void 0},attachments:Y.attachments,isMention:Y.isMention,links:Y.links})}static[yj](Y){return Y.toJSON()}static[bj](Y){return $.fromJSON(Y)}},uf0=Symbol.for("chat.postable");tZ=class extends Error{code;cause;constructor($,Y,X){super($);this.name="ChatError",this.code=Y,this.cause=X}},N49=class extends tZ{retryAfterMs;constructor($,Y,X){super($,"RATE_LIMITED",X);this.name="RateLimitError",this.retryAfterMs=Y}},PZ4=class extends tZ{constructor($,Y){super($,"LOCK_FAILED",Y);this.name="LockError"}},df0=class extends tZ{feature;constructor($,Y,X){super($,"NOT_IMPLEMENTED",X);this.name="NotImplementedError",this.feature=Y}};hj=class ${id;isDM;channelVisibility;_adapter;_adapterName;_stateAdapterInstance;_name=null;_threadHistory;constructor(Y){if(this.id=Y.id,this.isDM=Y.isDM??!1,this.channelVisibility=Y.channelVisibility??"unknown",L49(Y))this._adapterName=Y.adapterName;else this._adapter=Y.adapter,this._stateAdapterInstance=Y.stateAdapter,this._threadHistory=Y.threadHistory}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw Error("Channel has no adapter configured");let X=rm().getAdapter(this._adapterName);if(!X)throw Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=X,X}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let Y=rm();return this._stateAdapterInstance=Y.getState(),this._stateAdapterInstance}get name(){return this._name}get state(){return this._stateAdapter.get(`${FZ4}${this.id}`)}async setState(Y,X){let G=`${FZ4}${this.id}`;if(X?.replace)await this._stateAdapter.set(G,Y,am);else{let Q={...await this._stateAdapter.get(G),...Y};await this._stateAdapter.set(G,Q,am)}}get messages(){let Y=this.adapter,X=this.id,G=this._threadHistory;return{async*[Symbol.asyncIterator](){let J,Q=!1;while(!0){let W={cursor:J,direction:"backward"},Z=Y.fetchChannelMessages?await Y.fetchChannelMessages(X,W):await Y.fetchMessages(X,W),K=[...Z.messages].reverse();for(let H of K)Q=!0,yield H;if(!Z.nextCursor||Z.messages.length===0)break;J=Z.nextCursor}if(!Q&&G){let W=await G.getMessages(X);for(let Z=W.length-1;Z>=0;Z--)yield W[Z]}}}}threads(){let Y=this.adapter,X=this.id;return{async*[Symbol.asyncIterator](){if(!Y.listThreads)return;let G;while(!0){let J=await Y.listThreads(X,{cursor:G});for(let Q of J.threads)yield Q;if(!J.nextCursor||J.threads.length===0)break;G=J.nextCursor}}}}async fetchMetadata(){if(this.adapter.fetchChannelInfo){let Y=await this.adapter.fetchChannelInfo(this.id);return this._name=Y.name??null,Y}return{id:this.id,isDM:this.isDM,metadata:{}}}async post(Y){if(pf0(Y))return await this.handlePostableObject(Y),Y;if(B49(Y)){let G="";for await(let J of mf0(Y))if(typeof J==="string")G+=J;else if(J.type==="markdown_text")G+=J.text;return this.postSingleMessage({markdown:G})}let X=Y;if(bW(Y)){let G=G3(Y);if(!G)throw Error("Invalid JSX element: must be a Card element");X=G}return X=await this.processCallbackUrls(X),this.postSingleMessage(X)}async handlePostableObject(Y){await IZ4(Y,this.adapter,this.id,(X,G)=>this.adapter.postChannelMessage?this.adapter.postChannelMessage(X,G):this.adapter.postMessage(X,G))}async postSingleMessage(Y){let X=this.adapter.postChannelMessage?await this.adapter.postChannelMessage(this.id,Y):await this.adapter.postMessage(this.id,Y),G=this.createSentMessage(X.id,Y,X.threadId);if(this._threadHistory)await this._threadHistory.append(this.id,new wX(G));return G}async postEphemeral(Y,X,G){let{fallbackToDM:J}=G,Q=typeof Y==="string"?Y:Y.userId,W;if(bW(X)){let Z=G3(X);if(!Z)throw Error("Invalid JSX element: must be a Card element");W=Z}else W=X;if(W=await this.processCallbackUrls(W),this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,Q,W);if(!J)return null;if(this.adapter.openDM){let Z=await this.adapter.openDM(Q),K=await this.adapter.postMessage(Z,W);return{id:K.id,threadId:Z,usedFallback:!0,raw:K.raw}}return null}async schedule(Y,X){let G;if(bW(Y)){let J=G3(Y);if(!J)throw Error("Invalid JSX element: must be a Card element");G=J}else G=Y;if(G=await this.processCallbackUrls(G),!this.adapter.scheduleMessage)throw new df0("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,G,X)}async processCallbackUrls(Y){if(typeof Y==="string")return Y;if("type"in Y&&Y.type==="card")return z70(Y,this._stateAdapter);if("card"in Y&&Y.card?.type==="card"){let X=await z70(Y.card,this._stateAdapter);if(X!==Y.card)return{...Y,card:X}}return Y}async startTyping(Y){await this.adapter.startTyping(this.id,Y)}mentionUser(Y){return`<@${Y}>`}toJSON(){return{_type:"chat:Channel",id:this.id,adapterName:this._adapterName??this.adapter.name,channelVisibility:this.channelVisibility,isDM:this.isDM}}static fromJSON(Y,X){let G=new $({id:Y.id,adapterName:Y.adapterName,channelVisibility:Y.channelVisibility,isDM:Y.isDM});if(X)G._adapter=X;return G}static[yj](Y){return Y.toJSON()}static[bj](Y){return $.fromJSON(Y)}createSentMessage(Y,X,G){let J=this.adapter,Q=G||this.id,W=this,{plainText:Z,formatted:K,attachments:H}=O49(X);return{id:Y,threadId:Q,text:Z,formatted:K,raw:null,author:{userId:"self",userName:J.userName,fullName:J.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:H,links:[],toJSON(){return new wX(this).toJSON()},async edit(V){let A=V;if(bW(V)){let F=G3(V);if(!F)throw Error("Invalid JSX element: must be a Card element");A=F}return A=await W.processCallbackUrls(A),await J.editMessage(Q,Y,A),W.createSentMessage(Y,A)},async delete(){await J.deleteMessage(Q,Y)},async addReaction(V){await J.addReaction(Q,Y,V)},async removeReaction(V){await J.removeReaction(Q,Y,V)}}}};E49=new Set(["*","~","`","["]);ff0=/^\|.*\|$/,gf0=/^\|[\s:]*-{1,}[\s:]*(\|[\s:]*-{1,}[\s:]*)*\|$/;A70=class ${id;channelId;isDM;channelVisibility;_adapter;_adapterName;_stateAdapterInstance;_recentMessages=[];_isSubscribedContext;_currentMessage;_streamingUpdateIntervalMs;_fallbackStreamingPlaceholderText;_channel;_threadHistory;_logger;constructor(Y){if(this.id=Y.id,this.channelId=Y.channelId,this.isDM=Y.isDM??!1,this.channelVisibility=Y.channelVisibility??"unknown",this._isSubscribedContext=Y.isSubscribedContext??!1,this._currentMessage=Y.currentMessage,this._logger=Y.logger,this._streamingUpdateIntervalMs=Y.streamingUpdateIntervalMs??500,this._fallbackStreamingPlaceholderText=Y.fallbackStreamingPlaceholderText!==void 0?Y.fallbackStreamingPlaceholderText:"...",q49(Y))this._adapterName=Y.adapterName;else this._adapter=Y.adapter,this._stateAdapterInstance=Y.stateAdapter,this._threadHistory=Y.threadHistory;if(Y.initialMessage)this._recentMessages=[Y.initialMessage]}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw Error("Thread has no adapter configured");let X=rm().getAdapter(this._adapterName);if(!X)throw Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=X,X}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let Y=rm();return this._stateAdapterInstance=Y.getState(),this._stateAdapterInstance}get recentMessages(){return this._recentMessages}set recentMessages(Y){this._recentMessages=Y}get state(){return this._stateAdapter.get(`${LZ4}${this.id}`)}async setState(Y,X){let G=`${LZ4}${this.id}`;if(X?.replace)await this._stateAdapter.set(G,Y,am);else{let Q={...await this._stateAdapter.get(G),...Y};await this._stateAdapter.set(G,Q,am)}}get channel(){if(!this._channel){let Y=wZ4(this.adapter,this.id);this._channel=new hj({id:Y,adapter:this.adapter,stateAdapter:this._stateAdapter,isDM:this.isDM,channelVisibility:this.channelVisibility,threadHistory:this._threadHistory})}return this._channel}get messages(){let Y=this.adapter,X=this.id,G=this._threadHistory;return{async*[Symbol.asyncIterator](){let J,Q=!1;while(!0){let W=await Y.fetchMessages(X,{cursor:J,direction:"backward"}),Z=[...W.messages].reverse();for(let K of Z)Q=!0,yield K;if(!W.nextCursor||W.messages.length===0)break;J=W.nextCursor}if(!Q&&G){let W=await G.getMessages(X);for(let Z=W.length-1;Z>=0;Z--)yield W[Z]}}}}get allMessages(){let Y=this.adapter,X=this.id,G=this._threadHistory;return{async*[Symbol.asyncIterator](){let J,Q=!1;while(!0){let W=await Y.fetchMessages(X,{limit:100,cursor:J,direction:"forward"});for(let Z of W.messages)Q=!0,yield Z;if(!W.nextCursor||W.messages.length===0)break;J=W.nextCursor}if(!Q&&G){let W=await G.getMessages(X);for(let Z of W)yield Z}}}}async getParticipants(){let Y=new Map;if(this._currentMessage&&!this._currentMessage.author.isMe&&!this._currentMessage.author.isBot)Y.set(this._currentMessage.author.userId,this._currentMessage.author);for await(let X of this.allMessages){if(X.author.isMe||X.author.isBot||Y.has(X.author.userId))continue;Y.set(X.author.userId,X.author)}return[...Y.values()]}async isSubscribed(){if(this._isSubscribedContext)return!0;return this._stateAdapter.isSubscribed(this.id)}async subscribe(){if(await this._stateAdapter.subscribe(this.id),this.adapter.onThreadSubscribe)await this.adapter.onThreadSubscribe(this.id)}async unsubscribe(){await this._stateAdapter.unsubscribe(this.id)}async post(Y){if(pf0(Y)){if(Y.kind==="stream"){let Q=Y.getPostData(),W={...Q.options.updateIntervalMs?{updateIntervalMs:Q.options.updateIntervalMs}:{},...Q.options.groupTasks?{taskDisplayMode:Q.options.groupTasks}:{},...Q.options.endWith?{stopBlocks:Q.options.endWith}:{}};return await this.handleStream(Q.stream,W),Y}return await this.handlePostableObject(Y),Y}if(I49(Y))return this.handleStream(Y);let X=Y;if(bW(Y)){let Q=G3(Y);if(!Q)throw Error("Invalid JSX element: must be a Card element");X=Q}X=await this.processCallbackUrls(X);let G=await this.adapter.postMessage(this.id,X),J=this.createSentMessage(G.id,X,G.threadId);if(this._threadHistory)await this._threadHistory.append(this.id,new wX(J));return J}async handlePostableObject(Y){await IZ4(Y,this.adapter,this.id,(X,G)=>this.adapter.postMessage(X,G),this._logger)}async postEphemeral(Y,X,G){let{fallbackToDM:J}=G,Q=typeof Y==="string"?Y:Y.userId,W;if(bW(X)){let Z=G3(X);if(!Z)throw Error("Invalid JSX element: must be a Card element");W=Z}else W=X;if(W=await this.processCallbackUrls(W),this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,Q,W);if(!J)return null;if(this.adapter.openDM){let Z=await this.adapter.openDM(Q),K=await this.adapter.postMessage(Z,W);return{id:K.id,threadId:Z,usedFallback:!0,raw:K.raw}}return null}async processCallbackUrls(Y){if(typeof Y==="string")return Y;if("type"in Y&&Y.type==="card")return z70(Y,this._stateAdapter);if("card"in Y&&Y.card?.type==="card"){let X=await z70(Y.card,this._stateAdapter);if(X!==Y.card)return{...Y,card:X}}return Y}async schedule(Y,X){let G;if(bW(Y)){let J=G3(Y);if(!J)throw Error("Invalid JSX element: must be a Card element");G=J}else G=Y;if(G=await this.processCallbackUrls(G),!this.adapter.scheduleMessage)throw new df0("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,G,X)}async handleStream(Y,X){let G=mf0(Y),J={...X};if(this._currentMessage)J.recipientUserId=this._currentMessage.author.userId,J.recipientTeamId=this.extractSlackRecipientTeamId(this._currentMessage.raw);if(this.adapter.stream){let W="",Z={[Symbol.asyncIterator]:()=>{let z=G[Symbol.asyncIterator]();return{async next(){let V=await z.next();if(!V.done){let A=V.value;if(typeof A==="string")W+=A;else if(A.type==="markdown_text")W+=A.text}return V}}}},K=await this.adapter.stream(this.id,Z,J),H=this.createSentMessage(K.id,{markdown:W},K.threadId);if(this._threadHistory)await this._threadHistory.append(this.id,new wX(H));return H}let Q={[Symbol.asyncIterator]:()=>{let W=G[Symbol.asyncIterator]();return{async next(){while(!0){let Z=await W.next();if(Z.done)return{value:void 0,done:!0};let K=Z.value;if(typeof K==="string")return{value:K,done:!1};if(K.type==="markdown_text")return{value:K.text,done:!1}}}}}};return this.fallbackStream(Q,J)}extractSlackRecipientTeamId(Y){if(!Y||typeof Y!=="object")return;let X=Y;if(typeof X.team_id==="string"&&X.team_id)return X.team_id;if(typeof X.team==="string"&&X.team)return X.team;if(X.team&&typeof X.team==="object"&&typeof X.team.id==="string"&&X.team.id)return X.team.id;if(typeof X.user?.team_id==="string"&&X.user.team_id)return X.user.team_id;return}async startTyping(Y){await this.adapter.startTyping(this.id,Y)}async fallbackStream(Y,X){let G=X?.updateIntervalMs??this._streamingUpdateIntervalMs,J=this._fallbackStreamingPlaceholderText,Q=J===null?null:await this.adapter.postMessage(this.id,J),W=this.id,Z=new _Z4,K="",H=!1,z=null,V=null;if(Q)W=Q.threadId||this.id,K=J??"";let A=()=>{V=setTimeout(()=>{z=F()},G)},F=async()=>{if(H||!Q)return;let B=Z.render();if(B.trim()&&B!==K)try{await this.adapter.editMessage(W,Q.id,{markdown:B}),K=B}catch(O){this._logger?.warn("fallbackStream edit failed",O)}if(!H)A()};if(Q)A();try{for await(let B of Y)if(Z.push(B),!Q){let O=Z.render();if(O.trim())Q=await this.adapter.postMessage(this.id,{markdown:O}),W=Q.threadId||this.id,K=O,A()}}finally{if(H=!0,V)clearTimeout(V),V=null}if(z)await z;let N=Z.getText(),D=Z.finish();if(!Q)Q=await this.adapter.postMessage(this.id,{markdown:N.trim()?N:" "}),W=Q.threadId||this.id,K=N;if(D.trim()&&D!==K)await this.adapter.editMessage(W,Q.id,{markdown:N});let L=this.createSentMessage(Q.id,{markdown:N},W);if(this._threadHistory)await this._threadHistory.append(this.id,new wX(L));return L}async refresh(){let Y=await this.adapter.fetchMessages(this.id,{limit:50});if(Y.messages.length>0)this._recentMessages=Y.messages;else if(this._threadHistory)this._recentMessages=await this._threadHistory.getMessages(this.id,50);else this._recentMessages=[]}mentionUser(Y){return`<@${Y}>`}toJSON(){return{_type:"chat:Thread",id:this.id,channelId:this.channelId,channelVisibility:this.channelVisibility,currentMessage:this._currentMessage?.toJSON(),isDM:this.isDM,adapterName:this._adapterName??this.adapter.name}}static fromJSON(Y,X){let G=new $({id:Y.id,adapterName:Y.adapterName,channelId:Y.channelId,channelVisibility:Y.channelVisibility,currentMessage:Y.currentMessage?wX.fromJSON(Y.currentMessage):void 0,isDM:Y.isDM});if(X)G._adapter=X;return G}static[yj](Y){return Y.toJSON()}static[bj](Y){return $.fromJSON(Y)}createSentMessage(Y,X,G){let J=this.adapter,Q=G||this.id,W=this,{plainText:Z,formatted:K,attachments:H}=P49(X);return{id:Y,threadId:Q,text:Z,formatted:K,raw:null,links:[],author:{userId:"self",userName:J.userName,fullName:J.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:H,toJSON(){return new wX(this).toJSON()},async edit(V){let A=V;if(bW(V)){let F=G3(V);if(!F)throw Error("Invalid JSX element: must be a Card element");A=F}return A=await W.processCallbackUrls(A),await J.editMessage(Q,Y,A),W.createSentMessage(Y,A)},async delete(){await J.deleteMessage(Q,Y)},async addReaction(V){await J.addReaction(Q,Y,V)},async removeReaction(V){await J.removeReaction(Q,Y,V)}}}createSentMessageFromMessage(Y){let X=this.adapter,G=this.id,J=Y.id,Q=this;return{id:Y.id,threadId:Y.threadId,text:Y.text,formatted:Y.formatted,raw:Y.raw,author:Y.author,metadata:Y.metadata,attachments:Y.attachments,links:Y.links,isMention:Y.isMention,toJSON(){return Y.toJSON()},async edit(W){let Z=W;if(bW(W)){let K=G3(W);if(!K)throw Error("Invalid JSX element: must be a Card element");Z=K}return Z=await Q.processCallbackUrls(Z),await X.editMessage(G,J,Z),Q.createSentMessage(J,Z,G)},async delete(){await X.deleteMessage(G,J)},async addReaction(W){await X.addReaction(G,J,W)},async removeReaction(W){await X.removeReaction(G,J,W)}}}};S49=/^(\d+)([smhd])$/;k49={s:1000,m:60000,h:3600000,d:86400000};b49=/^[UW][A-Z0-9]+$/,h49=/^\d{17,19}$/,f49=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,g49=/^\d+$/,d49=cf0;OZ4=new Map;CZ4={thumbs_up:{slack:["+1","thumbsup"],gchat:"\uD83D\uDC4D"},thumbs_down:{slack:["-1","thumbsdown"],gchat:"\uD83D\uDC4E"},clap:{slack:"clap",gchat:"\uD83D\uDC4F"},wave:{slack:"wave",gchat:"\uD83D\uDC4B"},pray:{slack:"pray",gchat:"\uD83D\uDE4F"},muscle:{slack:"muscle",gchat:"\uD83D\uDCAA"},ok_hand:{slack:"ok_hand",gchat:"\uD83D\uDC4C"},point_up:{slack:"point_up",gchat:"\uD83D\uDC46"},point_down:{slack:"point_down",gchat:"\uD83D\uDC47"},point_left:{slack:"point_left",gchat:"\uD83D\uDC48"},point_right:{slack:"point_right",gchat:"\uD83D\uDC49"},raised_hands:{slack:"raised_hands",gchat:"\uD83D\uDE4C"},shrug:{slack:"shrug",gchat:"\uD83E\uDD37"},facepalm:{slack:"facepalm",gchat:"\uD83E\uDD26"},heart:{slack:"heart",gchat:["\u2764\uFE0F","\u2764"]},smile:{slack:["smile","slightly_smiling_face"],gchat:"\uD83D\uDE0A"},laugh:{slack:["laughing","satisfied","joy"],gchat:["\uD83D\uDE02","\uD83D\uDE06"]},thinking:{slack:"thinking_face",gchat:"\uD83E\uDD14"},sad:{slack:["cry","sad","white_frowning_face"],gchat:"\uD83D\uDE22"},cry:{slack:"sob",gchat:"\uD83D\uDE2D"},angry:{slack:"angry",gchat:"\uD83D\uDE20"},love_eyes:{slack:"heart_eyes",gchat:"\uD83D\uDE0D"},cool:{slack:"sunglasses",gchat:"\uD83D\uDE0E"},wink:{slack:"wink",gchat:"\uD83D\uDE09"},surprised:{slack:"open_mouth",gchat:"\uD83D\uDE2E"},worried:{slack:"worried",gchat:"\uD83D\uDE1F"},confused:{slack:"confused",gchat:"\uD83D\uDE15"},neutral:{slack:"neutral_face",gchat:"\uD83D\uDE10"},sleeping:{slack:"sleeping",gchat:"\uD83D\uDE34"},sick:{slack:"nauseated_face",gchat:"\uD83E\uDD22"},mind_blown:{slack:"exploding_head",gchat:"\uD83E\uDD2F"},relieved:{slack:"relieved",gchat:"\uD83D\uDE0C"},grimace:{slack:"grimacing",gchat:"\uD83D\uDE2C"},rolling_eyes:{slack:"rolling_eyes",gchat:"\uD83D\uDE44"},hug:{slack:"hugging_face",gchat:"\uD83E\uDD17"},zany:{slack:"zany_face",gchat:"\uD83E\uDD2A"},check:{slack:["white_check_mark","heavy_check_mark"],gchat:["\u2705","\u2714\uFE0F"]},x:{slack:["x","heavy_multiplication_x"],gchat:["\u274C","\u2716\uFE0F"]},question:{slack:"question",gchat:["\u2753","?"]},exclamation:{slack:"exclamation",gchat:"\u2757"},warning:{slack:"warning",gchat:"\u26A0\uFE0F"},stop:{slack:"octagonal_sign",gchat:"\uD83D\uDED1"},info:{slack:"information_source",gchat:"\u2139\uFE0F"},"100":{slack:"100",gchat:"\uD83D\uDCAF"},fire:{slack:"fire",gchat:"\uD83D\uDD25"},star:{slack:"star",gchat:"\u2B50"},sparkles:{slack:"sparkles",gchat:"\u2728"},lightning:{slack:"zap",gchat:"\u26A1"},boom:{slack:"boom",gchat:"\uD83D\uDCA5"},eyes:{slack:"eyes",gchat:"\uD83D\uDC40"},green_circle:{slack:"large_green_circle",gchat:"\uD83D\uDFE2"},yellow_circle:{slack:"large_yellow_circle",gchat:"\uD83D\uDFE1"},red_circle:{slack:"red_circle",gchat:"\uD83D\uDD34"},blue_circle:{slack:"large_blue_circle",gchat:"\uD83D\uDD35"},white_circle:{slack:"white_circle",gchat:"\u26AA"},black_circle:{slack:"black_circle",gchat:"\u26AB"},rocket:{slack:"rocket",gchat:"\uD83D\uDE80"},party:{slack:["tada","partying_face"],gchat:["\uD83C\uDF89","\uD83E\uDD73"]},confetti:{slack:"confetti_ball",gchat:"\uD83C\uDF8A"},balloon:{slack:"balloon",gchat:"\uD83C\uDF88"},gift:{slack:"gift",gchat:"\uD83C\uDF81"},trophy:{slack:"trophy",gchat:"\uD83C\uDFC6"},medal:{slack:"first_place_medal",gchat:"\uD83E\uDD47"},lightbulb:{slack:"bulb",gchat:"\uD83D\uDCA1"},gear:{slack:"gear",gchat:"\u2699\uFE0F"},wrench:{slack:"wrench",gchat:"\uD83D\uDD27"},hammer:{slack:"hammer",gchat:"\uD83D\uDD28"},bug:{slack:"bug",gchat:"\uD83D\uDC1B"},link:{slack:"link",gchat:"\uD83D\uDD17"},lock:{slack:"lock",gchat:"\uD83D\uDD12"},unlock:{slack:"unlock",gchat:"\uD83D\uDD13"},key:{slack:"key",gchat:"\uD83D\uDD11"},pin:{slack:"pushpin",gchat:"\uD83D\uDCCC"},memo:{slack:"memo",gchat:"\uD83D\uDCDD"},clipboard:{slack:"clipboard",gchat:"\uD83D\uDCCB"},calendar:{slack:"calendar",gchat:"\uD83D\uDCC5"},clock:{slack:"clock1",gchat:"\uD83D\uDD50"},hourglass:{slack:"hourglass",gchat:"\u23F3"},bell:{slack:"bell",gchat:"\uD83D\uDD14"},megaphone:{slack:"mega",gchat:"\uD83D\uDCE2"},speech_bubble:{slack:"speech_balloon",gchat:"\uD83D\uDCAC"},email:{slack:"email",gchat:"\uD83D\uDCE7"},inbox:{slack:"inbox_tray",gchat:"\uD83D\uDCE5"},outbox:{slack:"outbox_tray",gchat:"\uD83D\uDCE4"},package:{slack:"package",gchat:"\uD83D\uDCE6"},folder:{slack:"file_folder",gchat:"\uD83D\uDCC1"},file:{slack:"page_facing_up",gchat:"\uD83D\uDCC4"},chart_up:{slack:"chart_with_upwards_trend",gchat:"\uD83D\uDCC8"},chart_down:{slack:"chart_with_downwards_trend",gchat:"\uD83D\uDCC9"},coffee:{slack:"coffee",gchat:"\u2615"},pizza:{slack:"pizza",gchat:"\uD83C\uDF55"},beer:{slack:"beer",gchat:"\uD83C\uDF7A"},arrow_up:{slack:"arrow_up",gchat:"\u2B06\uFE0F"},arrow_down:{slack:"arrow_down",gchat:"\u2B07\uFE0F"},arrow_left:{slack:"arrow_left",gchat:"\u2B05\uFE0F"},arrow_right:{slack:"arrow_right",gchat:"\u27A1\uFE0F"},refresh:{slack:"arrows_counterclockwise",gchat:"\uD83D\uDD04"},sun:{slack:"sunny",gchat:"\u2600\uFE0F"},cloud:{slack:"cloud",gchat:"\u2601\uFE0F"},rain:{slack:"rain_cloud",gchat:"\uD83C\uDF27\uFE0F"},snow:{slack:"snowflake",gchat:"\u2744\uFE0F"},rainbow:{slack:"rainbow",gchat:"\uD83C\uDF08"}},lf0=new SZ4,i49=/\{\{emoji:([a-z0-9_]+)\}\}/gi;r49=kZ4(),a49=Rj,s49=qj,o49=dm,t49=J70,e49=jj,$69=rW4,Y69=Ej,X69=Pj,G69=wj,J69=_f0,Q69=Oj,W69=wf0,Z69=bW,K69=Ij,U69=Mj,H69=_j,z69=G3,V69=W70,A69=jf0,F69=lm,D69=kj,N69=Tj,L69=xj,B69=Sj,O69=vj,E69=Cj});function if0($){if(!($&&R69($)&&$.name==="TypeError"&&typeof $.message==="string"))return!1;let{message:X,stack:G}=$;if(X==="Load failed"||X.startsWith("Load failed (")&&X.endsWith(")"))return G===void 0||"__sentry_captured__"in $;if(X.startsWith("error sending request for url"))return!0;if(X==="Failed to fetch"||X.startsWith("Failed to fetch (")&&X.endsWith(")"))return!0;return q69.has(X)}var M69,R69=($)=>M69.call($)==="[object Error]",q69;var yZ4=V0(()=>{M69=Object.prototype.toString,q69=new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"])});var hZ4={};W8(hZ4,{makeRetriable:()=>_69,default:()=>rf0,AbortError:()=>nf0});function I69($){if(typeof $==="number"){if($<0)throw TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN($))throw TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if($!==void 0)throw TypeError("Expected `retries` to be a number or Infinity.")}function F70($,Y,{min:X=0,allowInfinity:G=!1}={}){if(Y===void 0)return;if(typeof Y!=="number"||Number.isNaN(Y))throw TypeError(`Expected \`${$}\` to be a number${G?" or Infinity":""}.`);if(!G&&!Number.isFinite(Y))throw TypeError(`Expected \`${$}\` to be a finite number.`);if(Y<X)throw TypeError(`Expected \`${$}\` to be \u2265 ${X}.`)}function P69($,Y){let X=Math.max(1,$+1),G=Y.randomize?Math.random()+1:1,J=Math.round(G*Y.minTimeout*Y.factor**(X-1));return J=Math.min(J,Y.maxTimeout),J}function bZ4($,Y){if(!Number.isFinite(Y))return Y;return Y-(performance.now()-$)}async function w69({error:$,attemptNumber:Y,retriesConsumed:X,startTime:G,options:J}){let Q=$ instanceof Error?$:TypeError(`Non-error was thrown: "${$}". You should only throw errors.`);if(Q instanceof nf0)throw Q.originalError;let W=Number.isFinite(J.retries)?Math.max(0,J.retries-X):J.retries,Z=J.maxRetryTime??Number.POSITIVE_INFINITY,K=Object.freeze({error:Q,attemptNumber:Y,retriesLeft:W,retriesConsumed:X});if(await J.onFailedAttempt(K),bZ4(G,Z)<=0)throw Q;let H=await J.shouldConsumeRetry(K),z=bZ4(G,Z);if(z<=0||W<=0)throw Q;if(Q instanceof TypeError&&!if0(Q)){if(H)throw Q;return J.signal?.throwIfAborted(),!1}if(!await J.shouldRetry(K))throw Q;if(!H)return J.signal?.throwIfAborted(),!1;let V=P69(X,J),A=Math.min(V,z);if(J.signal?.throwIfAborted(),A>0)await new Promise((F,N)=>{let D=()=>{clearTimeout(L),J.signal?.removeEventListener("abort",D),N(J.signal.reason)},L=setTimeout(()=>{J.signal?.removeEventListener("abort",D),F()},A);if(J.unref)L.unref?.();J.signal?.addEventListener("abort",D,{once:!0})});return J.signal?.throwIfAborted(),!0}async function rf0($,Y={}){if(Y={...Y},I69(Y.retries),Object.hasOwn(Y,"forever"))throw Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");if(Y.retries??=10,Y.factor??=2,Y.minTimeout??=1000,Y.maxTimeout??=Number.POSITIVE_INFINITY,Y.maxRetryTime??=Number.POSITIVE_INFINITY,Y.randomize??=!1,Y.onFailedAttempt??=()=>{},Y.shouldRetry??=()=>!0,Y.shouldConsumeRetry??=()=>!0,F70("factor",Y.factor,{min:0,allowInfinity:!1}),F70("minTimeout",Y.minTimeout,{min:0,allowInfinity:!1}),F70("maxTimeout",Y.maxTimeout,{min:0,allowInfinity:!0}),F70("maxRetryTime",Y.maxRetryTime,{min:0,allowInfinity:!0}),!(Y.factor>0))Y.factor=1;Y.signal?.throwIfAborted();let X=0,G=0,J=performance.now();while(Number.isFinite(Y.retries)?G<=Y.retries:!0){X++;try{Y.signal?.throwIfAborted();let Q=await $(X);return Y.signal?.throwIfAborted(),Q}catch(Q){if(await w69({error:Q,attemptNumber:X,retriesConsumed:G,startTime:J,options:Y}))G++}}throw Error("Retry attempts exhausted without throwing an error.")}function _69($,Y){return function(...X){return rf0(()=>$.apply(this,X),Y)}}var nf0;var fZ4=V0(()=>{yZ4();nf0=class nf0 extends Error{constructor($){super();if($ instanceof Error)this.originalError=$,{message:$}=$;else this.originalError=Error($),this.originalError.stack=this.stack;this.name="AbortError",this.message=$}}});var j69,gZ4;var mZ4=V0(()=>{j69=[["\xDF","ss"],["\u1E9E","Ss"],["\xE4","ae"],["\xC4","Ae"],["\xF6","oe"],["\xD6","Oe"],["\xFC","ue"],["\xDC","Ue"],["\xC0","A"],["\xC1","A"],["\xC2","A"],["\xC3","A"],["\xC4","Ae"],["\xC5","A"],["\xC6","AE"],["\xC7","C"],["\xC8","E"],["\xC9","E"],["\xCA","E"],["\xCB","E"],["\xCC","I"],["\xCD","I"],["\xCE","I"],["\xCF","I"],["\xD0","D"],["\xD1","N"],["\xD2","O"],["\xD3","O"],["\xD4","O"],["\xD5","O"],["\xD6","Oe"],["\u0150","O"],["\xD8","O"],["\xD9","U"],["\xDA","U"],["\xDB","U"],["\xDC","Ue"],["\u0170","U"],["\xDD","Y"],["\xDE","TH"],["\xDF","ss"],["\xE0","a"],["\xE1","a"],["\xE2","a"],["\xE3","a"],["\xE4","ae"],["\xE5","a"],["\xE6","ae"],["\xE7","c"],["\xE8","e"],["\xE9","e"],["\xEA","e"],["\xEB","e"],["\xEC","i"],["\xED","i"],["\xEE","i"],["\xEF","i"],["\xF0","d"],["\xF1","n"],["\xF2","o"],["\xF3","o"],["\xF4","o"],["\xF5","o"],["\xF6","oe"],["\u0151","o"],["\xF8","o"],["\xF9","u"],["\xFA","u"],["\xFB","u"],["\xFC","ue"],["\u0171","u"],["\xFD","y"],["\xFE","th"],["\xFF","y"],["\u1E9E","SS"],["\xE0","a"],["\xC0","A"],["\xE1","a"],["\xC1","A"],["\xE2","a"],["\xC2","A"],["\xE3","a"],["\xC3","A"],["\xE8","e"],["\xC8","E"],["\xE9","e"],["\xC9","E"],["\xEA","e"],["\xCA","E"],["\xEC","i"],["\xCC","I"],["\xED","i"],["\xCD","I"],["\xF2","o"],["\xD2","O"],["\xF3","o"],["\xD3","O"],["\xF4","o"],["\xD4","O"],["\xF5","o"],["\xD5","O"],["\xF9","u"],["\xD9","U"],["\xFA","u"],["\xDA","U"],["\xFD","y"],["\xDD","Y"],["\u0103","a"],["\u0102","A"],["\u0110","D"],["\u0111","d"],["\u0129","i"],["\u0128","I"],["\u0169","u"],["\u0168","U"],["\u01A1","o"],["\u01A0","O"],["\u01B0","u"],["\u01AF","U"],["\u1EA1","a"],["\u1EA0","A"],["\u1EA3","a"],["\u1EA2","A"],["\u1EA5","a"],["\u1EA4","A"],["\u1EA7","a"],["\u1EA6","A"],["\u1EA9","a"],["\u1EA8","A"],["\u1EAB","a"],["\u1EAA","A"],["\u1EAD","a"],["\u1EAC","A"],["\u1EAF","a"],["\u1EAE","A"],["\u1EB1","a"],["\u1EB0","A"],["\u1EB3","a"],["\u1EB2","A"],["\u1EB5","a"],["\u1EB4","A"],["\u1EB7","a"],["\u1EB6","A"],["\u1EB9","e"],["\u1EB8","E"],["\u1EBB","e"],["\u1EBA","E"],["\u1EBD","e"],["\u1EBC","E"],["\u1EBF","e"],["\u1EBE","E"],["\u1EC1","e"],["\u1EC0","E"],["\u1EC3","e"],["\u1EC2","E"],["\u1EC5","e"],["\u1EC4","E"],["\u1EC7","e"],["\u1EC6","E"],["\u1EC9","i"],["\u1EC8","I"],["\u1ECB","i"],["\u1ECA","I"],["\u1ECD","o"],["\u1ECC","O"],["\u1ECF","o"],["\u1ECE","O"],["\u1ED1","o"],["\u1ED0","O"],["\u1ED3","o"],["\u1ED2","O"],["\u1ED5","o"],["\u1ED4","O"],["\u1ED7","o"],["\u1ED6","O"],["\u1ED9","o"],["\u1ED8","O"],["\u1EDB","o"],["\u1EDA","O"],["\u1EDD","o"],["\u1EDC","O"],["\u1EDF","o"],["\u1EDE","O"],["\u1EE1","o"],["\u1EE0","O"],["\u1EE3","o"],["\u1EE2","O"],["\u1EE5","u"],["\u1EE4","U"],["\u1EE7","u"],["\u1EE6","U"],["\u1EE9","u"],["\u1EE8","U"],["\u1EEB","u"],["\u1EEA","U"],["\u1EED","u"],["\u1EEC","U"],["\u1EEF","u"],["\u1EEE","U"],["\u1EF1","u"],["\u1EF0","U"],["\u1EF3","y"],["\u1EF2","Y"],["\u1EF5","y"],["\u1EF4","Y"],["\u1EF7","y"],["\u1EF6","Y"],["\u1EF9","y"],["\u1EF8","Y"],["\u0621","e"],["\u0622","a"],["\u0623","a"],["\u0624","w"],["\u0625","i"],["\u0626","y"],["\u0627","a"],["\u0628","b"],["\u0629","t"],["\u062A","t"],["\u062B","th"],["\u062C","j"],["\u062D","h"],["\u062E","kh"],["\u062F","d"],["\u0630","dh"],["\u0631","r"],["\u0632","z"],["\u0633","s"],["\u0634","sh"],["\u0635","s"],["\u0636","d"],["\u0637","t"],["\u0638","z"],["\u0639","e"],["\u063A","gh"],["\u0640","_"],["\u0641","f"],["\u0642","q"],["\u0643","k"],["\u0644","l"],["\u0645","m"],["\u0646","n"],["\u0647","h"],["\u0648","w"],["\u0649","a"],["\u064A","y"],["\u064E\u200E","a"],["\u064F","u"],["\u0650\u200E","i"],["\u0660","0"],["\u0661","1"],["\u0662","2"],["\u0663","3"],["\u0664","4"],["\u0665","5"],["\u0666","6"],["\u0667","7"],["\u0668","8"],["\u0669","9"],["\u0686","ch"],["\u06A9","k"],["\u06AF","g"],["\u067E","p"],["\u0698","zh"],["\u06CC","y"],["\u06F0","0"],["\u06F1","1"],["\u06F2","2"],["\u06F3","3"],["\u06F4","4"],["\u06F5","5"],["\u06F6","6"],["\u06F7","7"],["\u06F8","8"],["\u06F9","9"],["\u067C","p"],["\u0681","z"],["\u0685","c"],["\u0689","d"],["\uFEAB","d"],["\uFEAD","r"],["\u0693","r"],["\uFEAF","z"],["\u0696","g"],["\u069A","x"],["\u06AB","g"],["\u06BC","n"],["\u06C0","e"],["\u06D0","e"],["\u06CD","ai"],["\u0679","t"],["\u0688","d"],["\u0691","r"],["\u06BA","n"],["\u06C1","h"],["\u06BE","h"],["\u06D2","e"],["\u0410","A"],["\u0430","a"],["\u0411","B"],["\u0431","b"],["\u0412","V"],["\u0432","v"],["\u0413","G"],["\u0433","g"],["\u0414","D"],["\u0434","d"],["\u044A\u0435","ye"],["\u042A\u0435","Ye"],["\u044A\u0415","yE"],["\u042A\u0415","YE"],["\u0415","E"],["\u0435","e"],["\u0401","Yo"],["\u0451","yo"],["\u0416","Zh"],["\u0436","zh"],["\u0417","Z"],["\u0437","z"],["\u0418","I"],["\u0438","i"],["\u044B\u0439","iy"],["\u042B\u0439","Iy"],["\u042B\u0419","IY"],["\u044B\u0419","iY"],["\u0419","Y"],["\u0439","y"],["\u041A","K"],["\u043A","k"],["\u041B","L"],["\u043B","l"],["\u041C","M"],["\u043C","m"],["\u041D","N"],["\u043D","n"],["\u041E","O"],["\u043E","o"],["\u041F","P"],["\u043F","p"],["\u0420","R"],["\u0440","r"],["\u0421","S"],["\u0441","s"],["\u0422","T"],["\u0442","t"],["\u0423","U"],["\u0443","u"],["\u0424","F"],["\u0444","f"],["\u0425","Kh"],["\u0445","kh"],["\u0426","Ts"],["\u0446","ts"],["\u0427","Ch"],["\u0447","ch"],["\u0428","Sh"],["\u0448","sh"],["\u0429","Sch"],["\u0449","sch"],["\u042A",""],["\u044A",""],["\u042B","Y"],["\u044B","y"],["\u042C",""],["\u044C",""],["\u042D","E"],["\u044D","e"],["\u042E","Yu"],["\u044E","yu"],["\u042F","Ya"],["\u044F","ya"],["\u0103","a"],["\u0102","A"],["\u0219","s"],["\u0218","S"],["\u021B","t"],["\u021A","T"],["\u0163","t"],["\u0162","T"],["\u015F","s"],["\u015E","S"],["\xE7","c"],["\xC7","C"],["\u011F","g"],["\u011E","G"],["\u0131","i"],["\u0130","I"],["\u0561","a"],["\u0531","A"],["\u0562","b"],["\u0532","B"],["\u0563","g"],["\u0533","G"],["\u0564","d"],["\u0534","D"],["\u0565","ye"],["\u0535","Ye"],["\u0566","z"],["\u0536","Z"],["\u0567","e"],["\u0537","E"],["\u0568","y"],["\u0538","Y"],["\u0569","t"],["\u0539","T"],["\u056A","zh"],["\u053A","Zh"],["\u056B","i"],["\u053B","I"],["\u056C","l"],["\u053C","L"],["\u056D","kh"],["\u053D","Kh"],["\u056E","ts"],["\u053E","Ts"],["\u056F","k"],["\u053F","K"],["\u0570","h"],["\u0540","H"],["\u0571","dz"],["\u0541","Dz"],["\u0572","gh"],["\u0542","Gh"],["\u0573","tch"],["\u0543","Tch"],["\u0574","m"],["\u0544","M"],["\u0575","y"],["\u0545","Y"],["\u0576","n"],["\u0546","N"],["\u0577","sh"],["\u0547","Sh"],["\u0578","vo"],["\u0548","Vo"],["\u0579","ch"],["\u0549","Ch"],["\u057A","p"],["\u054A","P"],["\u057B","j"],["\u054B","J"],["\u057C","r"],["\u054C","R"],["\u057D","s"],["\u054D","S"],["\u057E","v"],["\u054E","V"],["\u057F","t"],["\u054F","T"],["\u0580","r"],["\u0550","R"],["\u0581","c"],["\u0551","C"],["\u0578\u0582","u"],["\u0548\u0552","U"],["\u0548\u0582","U"],["\u0583","p"],["\u0553","P"],["\u0584","q"],["\u0554","Q"],["\u0585","o"],["\u0555","O"],["\u0586","f"],["\u0556","F"],["\u0587","yev"],["\u10D0","a"],["\u10D1","b"],["\u10D2","g"],["\u10D3","d"],["\u10D4","e"],["\u10D5","v"],["\u10D6","z"],["\u10D7","t"],["\u10D8","i"],["\u10D9","k"],["\u10DA","l"],["\u10DB","m"],["\u10DC","n"],["\u10DD","o"],["\u10DE","p"],["\u10DF","zh"],["\u10E0","r"],["\u10E1","s"],["\u10E2","t"],["\u10E3","u"],["\u10E4","ph"],["\u10E5","q"],["\u10E6","gh"],["\u10E7","k"],["\u10E8","sh"],["\u10E9","ch"],["\u10EA","ts"],["\u10EB","dz"],["\u10EC","ts"],["\u10ED","tch"],["\u10EE","kh"],["\u10EF","j"],["\u10F0","h"],["\u010D","c"],["\u010F","d"],["\u011B","e"],["\u0148","n"],["\u0159","r"],["\u0161","s"],["\u0165","t"],["\u016F","u"],["\u017E","z"],["\u010C","C"],["\u010E","D"],["\u011A","E"],["\u0147","N"],["\u0158","R"],["\u0160","S"],["\u0164","T"],["\u016E","U"],["\u017D","Z"],["\u0780","h"],["\u0781","sh"],["\u0782","n"],["\u0783","r"],["\u0784","b"],["\u0785","lh"],["\u0786","k"],["\u0787","a"],["\u0788","v"],["\u0789","m"],["\u078A","f"],["\u078B","dh"],["\u078C","th"],["\u078D","l"],["\u078E","g"],["\u078F","gn"],["\u0790","s"],["\u0791","d"],["\u0792","z"],["\u0793","t"],["\u0794","y"],["\u0795","p"],["\u0796","j"],["\u0797","ch"],["\u0798","tt"],["\u0799","hh"],["\u079A","kh"],["\u079B","th"],["\u079C","z"],["\u079D","sh"],["\u079E","s"],["\u079F","d"],["\u07A0","t"],["\u07A1","z"],["\u07A2","a"],["\u07A3","gh"],["\u07A4","q"],["\u07A5","w"],["\u07A6","a"],["\u07A7","aa"],["\u07A8","i"],["\u07A9","ee"],["\u07AA","u"],["\u07AB","oo"],["\u07AC","e"],["\u07AD","ey"],["\u07AE","o"],["\u07AF","oa"],["\u07B0",""],["\u03B1","a"],["\u03B2","v"],["\u03B3","g"],["\u03B4","d"],["\u03B5","e"],["\u03B6","z"],["\u03B7","i"],["\u03B8","th"],["\u03B9","i"],["\u03BA","k"],["\u03BB","l"],["\u03BC","m"],["\u03BD","n"],["\u03BE","ks"],["\u03BF","o"],["\u03C0","p"],["\u03C1","r"],["\u03C3","s"],["\u03C4","t"],["\u03C5","y"],["\u03C6","f"],["\u03C7","x"],["\u03C8","ps"],["\u03C9","o"],["\u03AC","a"],["\u03AD","e"],["\u03AF","i"],["\u03CC","o"],["\u03CD","y"],["\u03AE","i"],["\u03CE","o"],["\u03C2","s"],["\u03CA","i"],["\u03B0","y"],["\u03CB","y"],["\u0390","i"],["\u0391","A"],["\u0392","B"],["\u0393","G"],["\u0394","D"],["\u0395","E"],["\u0396","Z"],["\u0397","I"],["\u0398","TH"],["\u0399","I"],["\u039A","K"],["\u039B","L"],["\u039C","M"],["\u039D","N"],["\u039E","KS"],["\u039F","O"],["\u03A0","P"],["\u03A1","R"],["\u03A3","S"],["\u03A4","T"],["\u03A5","Y"],["\u03A6","F"],["\u03A7","X"],["\u03A8","PS"],["\u03A9","O"],["\u0386","A"],["\u0388","E"],["\u038A","I"],["\u038C","O"],["\u038E","Y"],["\u0389","I"],["\u038F","O"],["\u03AA","I"],["\u03AB","Y"],["\u0101","a"],["\u0113","e"],["\u0123","g"],["\u012B","i"],["\u0137","k"],["\u013C","l"],["\u0146","n"],["\u016B","u"],["\u0100","A"],["\u0112","E"],["\u0122","G"],["\u012A","I"],["\u0136","K"],["\u013B","L"],["\u0145","N"],["\u016A","U"],["\u010D","c"],["\u0161","s"],["\u017E","z"],["\u010C","C"],["\u0160","S"],["\u017D","Z"],["\u0105","a"],["\u010D","c"],["\u0119","e"],["\u0117","e"],["\u012F","i"],["\u0161","s"],["\u0173","u"],["\u016B","u"],["\u017E","z"],["\u0104","A"],["\u010C","C"],["\u0118","E"],["\u0116","E"],["\u012E","I"],["\u0160","S"],["\u0172","U"],["\u016A","U"],["\u040C","Kj"],["\u045C","kj"],["\u0409","Lj"],["\u0459","lj"],["\u040A","Nj"],["\u045A","nj"],["\u0422\u0441","Ts"],["\u0442\u0441","ts"],["\u0105","a"],["\u0107","c"],["\u0119","e"],["\u0142","l"],["\u0144","n"],["\u015B","s"],["\u017A","z"],["\u017C","z"],["\u0104","A"],["\u0106","C"],["\u0118","E"],["\u0141","L"],["\u0143","N"],["\u015A","S"],["\u0179","Z"],["\u017B","Z"],["\u0404","Ye"],["\u0406","I"],["\u0407","Yi"],["\u0490","G"],["\u0454","ye"],["\u0456","i"],["\u0457","yi"],["\u0491","g"],["\u0132","IJ"],["\u0133","ij"],["\xA2","c"],["\xA5","Y"],["\u07FF","b"],["\u09F3","t"],["\u0AF1","Bo"],["\u0E3F","B"],["\u20A0","CE"],["\u20A1","C"],["\u20A2","Cr"],["\u20A3","F"],["\u20A5","m"],["\u20A6","N"],["\u20A7","Pt"],["\u20A8","Rs"],["\u20A9","W"],["\u20AB","s"],["\u20AC","E"],["\u20AD","K"],["\u20AE","T"],["\u20AF","Dp"],["\u20B0","S"],["\u20B1","P"],["\u20B2","G"],["\u20B3","A"],["\u20B4","S"],["\u20B5","C"],["\u20B6","tt"],["\u20B7","S"],["\u20B8","T"],["\u20B9","R"],["\u20BA","L"],["\u20BD","P"],["\u20BF","B"],["\uFE69","$"],["\uFFE0","c"],["\uFFE5","Y"],["\uFFE6","W"],["\uD835\uDC00","A"],["\uD835\uDC01","B"],["\uD835\uDC02","C"],["\uD835\uDC03","D"],["\uD835\uDC04","E"],["\uD835\uDC05","F"],["\uD835\uDC06","G"],["\uD835\uDC07","H"],["\uD835\uDC08","I"],["\uD835\uDC09","J"],["\uD835\uDC0A","K"],["\uD835\uDC0B","L"],["\uD835\uDC0C","M"],["\uD835\uDC0D","N"],["\uD835\uDC0E","O"],["\uD835\uDC0F","P"],["\uD835\uDC10","Q"],["\uD835\uDC11","R"],["\uD835\uDC12","S"],["\uD835\uDC13","T"],["\uD835\uDC14","U"],["\uD835\uDC15","V"],["\uD835\uDC16","W"],["\uD835\uDC17","X"],["\uD835\uDC18","Y"],["\uD835\uDC19","Z"],["\uD835\uDC1A","a"],["\uD835\uDC1B","b"],["\uD835\uDC1C","c"],["\uD835\uDC1D","d"],["\uD835\uDC1E","e"],["\uD835\uDC1F","f"],["\uD835\uDC20","g"],["\uD835\uDC21","h"],["\uD835\uDC22","i"],["\uD835\uDC23","j"],["\uD835\uDC24","k"],["\uD835\uDC25","l"],["\uD835\uDC26","m"],["\uD835\uDC27","n"],["\uD835\uDC28","o"],["\uD835\uDC29","p"],["\uD835\uDC2A","q"],["\uD835\uDC2B","r"],["\uD835\uDC2C","s"],["\uD835\uDC2D","t"],["\uD835\uDC2E","u"],["\uD835\uDC2F","v"],["\uD835\uDC30","w"],["\uD835\uDC31","x"],["\uD835\uDC32","y"],["\uD835\uDC33","z"],["\uD835\uDC34","A"],["\uD835\uDC35","B"],["\uD835\uDC36","C"],["\uD835\uDC37","D"],["\uD835\uDC38","E"],["\uD835\uDC39","F"],["\uD835\uDC3A","G"],["\uD835\uDC3B","H"],["\uD835\uDC3C","I"],["\uD835\uDC3D","J"],["\uD835\uDC3E","K"],["\uD835\uDC3F","L"],["\uD835\uDC40","M"],["\uD835\uDC41","N"],["\uD835\uDC42","O"],["\uD835\uDC43","P"],["\uD835\uDC44","Q"],["\uD835\uDC45","R"],["\uD835\uDC46","S"],["\uD835\uDC47","T"],["\uD835\uDC48","U"],["\uD835\uDC49","V"],["\uD835\uDC4A","W"],["\uD835\uDC4B","X"],["\uD835\uDC4C","Y"],["\uD835\uDC4D","Z"],["\uD835\uDC4E","a"],["\uD835\uDC4F","b"],["\uD835\uDC50","c"],["\uD835\uDC51","d"],["\uD835\uDC52","e"],["\uD835\uDC53","f"],["\uD835\uDC54","g"],["\uD835\uDC56","i"],["\uD835\uDC57","j"],["\uD835\uDC58","k"],["\uD835\uDC59","l"],["\uD835\uDC5A","m"],["\uD835\uDC5B","n"],["\uD835\uDC5C","o"],["\uD835\uDC5D","p"],["\uD835\uDC5E","q"],["\uD835\uDC5F","r"],["\uD835\uDC60","s"],["\uD835\uDC61","t"],["\uD835\uDC62","u"],["\uD835\uDC63","v"],["\uD835\uDC64","w"],["\uD835\uDC65","x"],["\uD835\uDC66","y"],["\uD835\uDC67","z"],["\uD835\uDC68","A"],["\uD835\uDC69","B"],["\uD835\uDC6A","C"],["\uD835\uDC6B","D"],["\uD835\uDC6C","E"],["\uD835\uDC6D","F"],["\uD835\uDC6E","G"],["\uD835\uDC6F","H"],["\uD835\uDC70","I"],["\uD835\uDC71","J"],["\uD835\uDC72","K"],["\uD835\uDC73","L"],["\uD835\uDC74","M"],["\uD835\uDC75","N"],["\uD835\uDC76","O"],["\uD835\uDC77","P"],["\uD835\uDC78","Q"],["\uD835\uDC79","R"],["\uD835\uDC7A","S"],["\uD835\uDC7B","T"],["\uD835\uDC7C","U"],["\uD835\uDC7D","V"],["\uD835\uDC7E","W"],["\uD835\uDC7F","X"],["\uD835\uDC80","Y"],["\uD835\uDC81","Z"],["\uD835\uDC82","a"],["\uD835\uDC83","b"],["\uD835\uDC84","c"],["\uD835\uDC85","d"],["\uD835\uDC86","e"],["\uD835\uDC87","f"],["\uD835\uDC88","g"],["\uD835\uDC89","h"],["\uD835\uDC8A","i"],["\uD835\uDC8B","j"],["\uD835\uDC8C","k"],["\uD835\uDC8D","l"],["\uD835\uDC8E","m"],["\uD835\uDC8F","n"],["\uD835\uDC90","o"],["\uD835\uDC91","p"],["\uD835\uDC92","q"],["\uD835\uDC93","r"],["\uD835\uDC94","s"],["\uD835\uDC95","t"],["\uD835\uDC96","u"],["\uD835\uDC97","v"],["\uD835\uDC98","w"],["\uD835\uDC99","x"],["\uD835\uDC9A","y"],["\uD835\uDC9B","z"],["\uD835\uDC9C","A"],["\uD835\uDC9E","C"],["\uD835\uDC9F","D"],["\uD835\uDCA2","g"],["\uD835\uDCA5","J"],["\uD835\uDCA6","K"],["\uD835\uDCA9","N"],["\uD835\uDCAA","O"],["\uD835\uDCAB","P"],["\uD835\uDCAC","Q"],["\uD835\uDCAE","S"],["\uD835\uDCAF","T"],["\uD835\uDCB0","U"],["\uD835\uDCB1","V"],["\uD835\uDCB2","W"],["\uD835\uDCB3","X"],["\uD835\uDCB4","Y"],["\uD835\uDCB5","Z"],["\uD835\uDCB6","a"],["\uD835\uDCB7","b"],["\uD835\uDCB8","c"],["\uD835\uDCB9","d"],["\uD835\uDCBB","f"],["\uD835\uDCBD","h"],["\uD835\uDCBE","i"],["\uD835\uDCBF","j"],["\uD835\uDCC0","h"],["\uD835\uDCC1","l"],["\uD835\uDCC2","m"],["\uD835\uDCC3","n"],["\uD835\uDCC5","p"],["\uD835\uDCC6","q"],["\uD835\uDCC7","r"],["\uD835\uDCC8","s"],["\uD835\uDCC9","t"],["\uD835\uDCCA","u"],["\uD835\uDCCB","v"],["\uD835\uDCCC","w"],["\uD835\uDCCD","x"],["\uD835\uDCCE","y"],["\uD835\uDCCF","z"],["\uD835\uDCD0","A"],["\uD835\uDCD1","B"],["\uD835\uDCD2","C"],["\uD835\uDCD3","D"],["\uD835\uDCD4","E"],["\uD835\uDCD5","F"],["\uD835\uDCD6","G"],["\uD835\uDCD7","H"],["\uD835\uDCD8","I"],["\uD835\uDCD9","J"],["\uD835\uDCDA","K"],["\uD835\uDCDB","L"],["\uD835\uDCDC","M"],["\uD835\uDCDD","N"],["\uD835\uDCDE","O"],["\uD835\uDCDF","P"],["\uD835\uDCE0","Q"],["\uD835\uDCE1","R"],["\uD835\uDCE2","S"],["\uD835\uDCE3","T"],["\uD835\uDCE4","U"],["\uD835\uDCE5","V"],["\uD835\uDCE6","W"],["\uD835\uDCE7","X"],["\uD835\uDCE8","Y"],["\uD835\uDCE9","Z"],["\uD835\uDCEA","a"],["\uD835\uDCEB","b"],["\uD835\uDCEC","c"],["\uD835\uDCED","d"],["\uD835\uDCEE","e"],["\uD835\uDCEF","f"],["\uD835\uDCF0","g"],["\uD835\uDCF1","h"],["\uD835\uDCF2","i"],["\uD835\uDCF3","j"],["\uD835\uDCF4","k"],["\uD835\uDCF5","l"],["\uD835\uDCF6","m"],["\uD835\uDCF7","n"],["\uD835\uDCF8","o"],["\uD835\uDCF9","p"],["\uD835\uDCFA","q"],["\uD835\uDCFB","r"],["\uD835\uDCFC","s"],["\uD835\uDCFD","t"],["\uD835\uDCFE","u"],["\uD835\uDCFF","v"],["\uD835\uDD00","w"],["\uD835\uDD01","x"],["\uD835\uDD02","y"],["\uD835\uDD03","z"],["\uD835\uDD04","A"],["\uD835\uDD05","B"],["\uD835\uDD07","D"],["\uD835\uDD08","E"],["\uD835\uDD09","F"],["\uD835\uDD0A","G"],["\uD835\uDD0D","J"],["\uD835\uDD0E","K"],["\uD835\uDD0F","L"],["\uD835\uDD10","M"],["\uD835\uDD11","N"],["\uD835\uDD12","O"],["\uD835\uDD13","P"],["\uD835\uDD14","Q"],["\uD835\uDD16","S"],["\uD835\uDD17","T"],["\uD835\uDD18","U"],["\uD835\uDD19","V"],["\uD835\uDD1A","W"],["\uD835\uDD1B","X"],["\uD835\uDD1C","Y"],["\uD835\uDD1E","a"],["\uD835\uDD1F","b"],["\uD835\uDD20","c"],["\uD835\uDD21","d"],["\uD835\uDD22","e"],["\uD835\uDD23","f"],["\uD835\uDD24","g"],["\uD835\uDD25","h"],["\uD835\uDD26","i"],["\uD835\uDD27","j"],["\uD835\uDD28","k"],["\uD835\uDD29","l"],["\uD835\uDD2A","m"],["\uD835\uDD2B","n"],["\uD835\uDD2C","o"],["\uD835\uDD2D","p"],["\uD835\uDD2E","q"],["\uD835\uDD2F","r"],["\uD835\uDD30","s"],["\uD835\uDD31","t"],["\uD835\uDD32","u"],["\uD835\uDD33","v"],["\uD835\uDD34","w"],["\uD835\uDD35","x"],["\uD835\uDD36","y"],["\uD835\uDD37","z"],["\uD835\uDD38","A"],["\uD835\uDD39","B"],["\uD835\uDD3B","D"],["\uD835\uDD3C","E"],["\uD835\uDD3D","F"],["\uD835\uDD3E","G"],["\uD835\uDD40","I"],["\uD835\uDD41","J"],["\uD835\uDD42","K"],["\uD835\uDD43","L"],["\uD835\uDD44","M"],["\uD835\uDD46","N"],["\uD835\uDD4A","S"],["\uD835\uDD4B","T"],["\uD835\uDD4C","U"],["\uD835\uDD4D","V"],["\uD835\uDD4E","W"],["\uD835\uDD4F","X"],["\uD835\uDD50","Y"],["\uD835\uDD52","a"],["\uD835\uDD53","b"],["\uD835\uDD54","c"],["\uD835\uDD55","d"],["\uD835\uDD56","e"],["\uD835\uDD57","f"],["\uD835\uDD58","g"],["\uD835\uDD59","h"],["\uD835\uDD5A","i"],["\uD835\uDD5B","j"],["\uD835\uDD5C","k"],["\uD835\uDD5D","l"],["\uD835\uDD5E","m"],["\uD835\uDD5F","n"],["\uD835\uDD60","o"],["\uD835\uDD61","p"],["\uD835\uDD62","q"],["\uD835\uDD63","r"],["\uD835\uDD64","s"],["\uD835\uDD65","t"],["\uD835\uDD66","u"],["\uD835\uDD67","v"],["\uD835\uDD68","w"],["\uD835\uDD69","x"],["\uD835\uDD6A","y"],["\uD835\uDD6B","z"],["\uD835\uDD6C","A"],["\uD835\uDD6D","B"],["\uD835\uDD6E","C"],["\uD835\uDD6F","D"],["\uD835\uDD70","E"],["\uD835\uDD71","F"],["\uD835\uDD72","G"],["\uD835\uDD73","H"],["\uD835\uDD74","I"],["\uD835\uDD75","J"],["\uD835\uDD76","K"],["\uD835\uDD77","L"],["\uD835\uDD78","M"],["\uD835\uDD79","N"],["\uD835\uDD7A","O"],["\uD835\uDD7B","P"],["\uD835\uDD7C","Q"],["\uD835\uDD7D","R"],["\uD835\uDD7E","S"],["\uD835\uDD7F","T"],["\uD835\uDD80","U"],["\uD835\uDD81","V"],["\uD835\uDD82","W"],["\uD835\uDD83","X"],["\uD835\uDD84","Y"],["\uD835\uDD85","Z"],["\uD835\uDD86","a"],["\uD835\uDD87","b"],["\uD835\uDD88","c"],["\uD835\uDD89","d"],["\uD835\uDD8A","e"],["\uD835\uDD8B","f"],["\uD835\uDD8C","g"],["\uD835\uDD8D","h"],["\uD835\uDD8E","i"],["\uD835\uDD8F","j"],["\uD835\uDD90","k"],["\uD835\uDD91","l"],["\uD835\uDD92","m"],["\uD835\uDD93","n"],["\uD835\uDD94","o"],["\uD835\uDD95","p"],["\uD835\uDD96","q"],["\uD835\uDD97","r"],["\uD835\uDD98","s"],["\uD835\uDD99","t"],["\uD835\uDD9A","u"],["\uD835\uDD9B","v"],["\uD835\uDD9C","w"],["\uD835\uDD9D","x"],["\uD835\uDD9E","y"],["\uD835\uDD9F","z"],["\uD835\uDDA0","A"],["\uD835\uDDA1","B"],["\uD835\uDDA2","C"],["\uD835\uDDA3","D"],["\uD835\uDDA4","E"],["\uD835\uDDA5","F"],["\uD835\uDDA6","G"],["\uD835\uDDA7","H"],["\uD835\uDDA8","I"],["\uD835\uDDA9","J"],["\uD835\uDDAA","K"],["\uD835\uDDAB","L"],["\uD835\uDDAC","M"],["\uD835\uDDAD","N"],["\uD835\uDDAE","O"],["\uD835\uDDAF","P"],["\uD835\uDDB0","Q"],["\uD835\uDDB1","R"],["\uD835\uDDB2","S"],["\uD835\uDDB3","T"],["\uD835\uDDB4","U"],["\uD835\uDDB5","V"],["\uD835\uDDB6","W"],["\uD835\uDDB7","X"],["\uD835\uDDB8","Y"],["\uD835\uDDB9","Z"],["\uD835\uDDBA","a"],["\uD835\uDDBB","b"],["\uD835\uDDBC","c"],["\uD835\uDDBD","d"],["\uD835\uDDBE","e"],["\uD835\uDDBF","f"],["\uD835\uDDC0","g"],["\uD835\uDDC1","h"],["\uD835\uDDC2","i"],["\uD835\uDDC3","j"],["\uD835\uDDC4","k"],["\uD835\uDDC5","l"],["\uD835\uDDC6","m"],["\uD835\uDDC7","n"],["\uD835\uDDC8","o"],["\uD835\uDDC9","p"],["\uD835\uDDCA","q"],["\uD835\uDDCB","r"],["\uD835\uDDCC","s"],["\uD835\uDDCD","t"],["\uD835\uDDCE","u"],["\uD835\uDDCF","v"],["\uD835\uDDD0","w"],["\uD835\uDDD1","x"],["\uD835\uDDD2","y"],["\uD835\uDDD3","z"],["\uD835\uDDD4","A"],["\uD835\uDDD5","B"],["\uD835\uDDD6","C"],["\uD835\uDDD7","D"],["\uD835\uDDD8","E"],["\uD835\uDDD9","F"],["\uD835\uDDDA","G"],["\uD835\uDDDB","H"],["\uD835\uDDDC","I"],["\uD835\uDDDD","J"],["\uD835\uDDDE","K"],["\uD835\uDDDF","L"],["\uD835\uDDE0","M"],["\uD835\uDDE1","N"],["\uD835\uDDE2","O"],["\uD835\uDDE3","P"],["\uD835\uDDE4","Q"],["\uD835\uDDE5","R"],["\uD835\uDDE6","S"],["\uD835\uDDE7","T"],["\uD835\uDDE8","U"],["\uD835\uDDE9","V"],["\uD835\uDDEA","W"],["\uD835\uDDEB","X"],["\uD835\uDDEC","Y"],["\uD835\uDDED","Z"],["\uD835\uDDEE","a"],["\uD835\uDDEF","b"],["\uD835\uDDF0","c"],["\uD835\uDDF1","d"],["\uD835\uDDF2","e"],["\uD835\uDDF3","f"],["\uD835\uDDF4","g"],["\uD835\uDDF5","h"],["\uD835\uDDF6","i"],["\uD835\uDDF7","j"],["\uD835\uDDF8","k"],["\uD835\uDDF9","l"],["\uD835\uDDFA","m"],["\uD835\uDDFB","n"],["\uD835\uDDFC","o"],["\uD835\uDDFD","p"],["\uD835\uDDFE","q"],["\uD835\uDDFF","r"],["\uD835\uDE00","s"],["\uD835\uDE01","t"],["\uD835\uDE02","u"],["\uD835\uDE03","v"],["\uD835\uDE04","w"],["\uD835\uDE05","x"],["\uD835\uDE06","y"],["\uD835\uDE07","z"],["\uD835\uDE08","A"],["\uD835\uDE09","B"],["\uD835\uDE0A","C"],["\uD835\uDE0B","D"],["\uD835\uDE0C","E"],["\uD835\uDE0D","F"],["\uD835\uDE0E","G"],["\uD835\uDE0F","H"],["\uD835\uDE10","I"],["\uD835\uDE11","J"],["\uD835\uDE12","K"],["\uD835\uDE13","L"],["\uD835\uDE14","M"],["\uD835\uDE15","N"],["\uD835\uDE16","O"],["\uD835\uDE17","P"],["\uD835\uDE18","Q"],["\uD835\uDE19","R"],["\uD835\uDE1A","S"],["\uD835\uDE1B","T"],["\uD835\uDE1C","U"],["\uD835\uDE1D","V"],["\uD835\uDE1E","W"],["\uD835\uDE1F","X"],["\uD835\uDE20","Y"],["\uD835\uDE21","Z"],["\uD835\uDE22","a"],["\uD835\uDE23","b"],["\uD835\uDE24","c"],["\uD835\uDE25","d"],["\uD835\uDE26","e"],["\uD835\uDE27","f"],["\uD835\uDE28","g"],["\uD835\uDE29","h"],["\uD835\uDE2A","i"],["\uD835\uDE2B","j"],["\uD835\uDE2C","k"],["\uD835\uDE2D","l"],["\uD835\uDE2E","m"],["\uD835\uDE2F","n"],["\uD835\uDE30","o"],["\uD835\uDE31","p"],["\uD835\uDE32","q"],["\uD835\uDE33","r"],["\uD835\uDE34","s"],["\uD835\uDE35","t"],["\uD835\uDE36","u"],["\uD835\uDE37","v"],["\uD835\uDE38","w"],["\uD835\uDE39","x"],["\uD835\uDE3A","y"],["\uD835\uDE3B","z"],["\uD835\uDE3C","A"],["\uD835\uDE3D","B"],["\uD835\uDE3E","C"],["\uD835\uDE3F","D"],["\uD835\uDE40","E"],["\uD835\uDE41","F"],["\uD835\uDE42","G"],["\uD835\uDE43","H"],["\uD835\uDE44","I"],["\uD835\uDE45","J"],["\uD835\uDE46","K"],["\uD835\uDE47","L"],["\uD835\uDE48","M"],["\uD835\uDE49","N"],["\uD835\uDE4A","O"],["\uD835\uDE4B","P"],["\uD835\uDE4C","Q"],["\uD835\uDE4D","R"],["\uD835\uDE4E","S"],["\uD835\uDE4F","T"],["\uD835\uDE50","U"],["\uD835\uDE51","V"],["\uD835\uDE52","W"],["\uD835\uDE53","X"],["\uD835\uDE54","Y"],["\uD835\uDE55","Z"],["\uD835\uDE56","a"],["\uD835\uDE57","b"],["\uD835\uDE58","c"],["\uD835\uDE59","d"],["\uD835\uDE5A","e"],["\uD835\uDE5B","f"],["\uD835\uDE5C","g"],["\uD835\uDE5D","h"],["\uD835\uDE5E","i"],["\uD835\uDE5F","j"],["\uD835\uDE60","k"],["\uD835\uDE61","l"],["\uD835\uDE62","m"],["\uD835\uDE63","n"],["\uD835\uDE64","o"],["\uD835\uDE65","p"],["\uD835\uDE66","q"],["\uD835\uDE67","r"],["\uD835\uDE68","s"],["\uD835\uDE69","t"],["\uD835\uDE6A","u"],["\uD835\uDE6B","v"],["\uD835\uDE6C","w"],["\uD835\uDE6D","x"],["\uD835\uDE6E","y"],["\uD835\uDE6F","z"],["\uD835\uDE70","A"],["\uD835\uDE71","B"],["\uD835\uDE72","C"],["\uD835\uDE73","D"],["\uD835\uDE74","E"],["\uD835\uDE75","F"],["\uD835\uDE76","G"],["\uD835\uDE77","H"],["\uD835\uDE78","I"],["\uD835\uDE79","J"],["\uD835\uDE7A","K"],["\uD835\uDE7B","L"],["\uD835\uDE7C","M"],["\uD835\uDE7D","N"],["\uD835\uDE7E","O"],["\uD835\uDE7F","P"],["\uD835\uDE80","Q"],["\uD835\uDE81","R"],["\uD835\uDE82","S"],["\uD835\uDE83","T"],["\uD835\uDE84","U"],["\uD835\uDE85","V"],["\uD835\uDE86","W"],["\uD835\uDE87","X"],["\uD835\uDE88","Y"],["\uD835\uDE89","Z"],["\uD835\uDE8A","a"],["\uD835\uDE8B","b"],["\uD835\uDE8C","c"],["\uD835\uDE8D","d"],["\uD835\uDE8E","e"],["\uD835\uDE8F","f"],["\uD835\uDE90","g"],["\uD835\uDE91","h"],["\uD835\uDE92","i"],["\uD835\uDE93","j"],["\uD835\uDE94","k"],["\uD835\uDE95","l"],["\uD835\uDE96","m"],["\uD835\uDE97","n"],["\uD835\uDE98","o"],["\uD835\uDE99","p"],["\uD835\uDE9A","q"],["\uD835\uDE9B","r"],["\uD835\uDE9C","s"],["\uD835\uDE9D","t"],["\uD835\uDE9E","u"],["\uD835\uDE9F","v"],["\uD835\uDEA0","w"],["\uD835\uDEA1","x"],["\uD835\uDEA2","y"],["\uD835\uDEA3","z"],["\uD835\uDEA4","l"],["\uD835\uDEA5","j"],["\uD835\uDEE2","A"],["\uD835\uDEE3","B"],["\uD835\uDEE4","G"],["\uD835\uDEE5","D"],["\uD835\uDEE6","E"],["\uD835\uDEE7","Z"],["\uD835\uDEE8","I"],["\uD835\uDEE9","TH"],["\uD835\uDEEA","I"],["\uD835\uDEEB","K"],["\uD835\uDEEC","L"],["\uD835\uDEED","M"],["\uD835\uDEEE","N"],["\uD835\uDEEF","KS"],["\uD835\uDEF0","O"],["\uD835\uDEF1","P"],["\uD835\uDEF2","R"],["\uD835\uDEF3","TH"],["\uD835\uDEF4","S"],["\uD835\uDEF5","T"],["\uD835\uDEF6","Y"],["\uD835\uDEF7","F"],["\uD835\uDEF8","x"],["\uD835\uDEF9","PS"],["\uD835\uDEFA","O"],["\uD835\uDEFB","D"],["\uD835\uDEFC","a"],["\uD835\uDEFD","b"],["\uD835\uDEFE","g"],["\uD835\uDEFF","d"],["\uD835\uDF00","e"],["\uD835\uDF01","z"],["\uD835\uDF02","i"],["\uD835\uDF03","th"],["\uD835\uDF04","i"],["\uD835\uDF05","k"],["\uD835\uDF06","l"],["\uD835\uDF07","m"],["\uD835\uDF08","n"],["\uD835\uDF09","ks"],["\uD835\uDF0A","o"],["\uD835\uDF0B","p"],["\uD835\uDF0C","r"],["\uD835\uDF0D","s"],["\uD835\uDF0E","s"],["\uD835\uDF0F","t"],["\uD835\uDF10","y"],["\uD835\uDF11","f"],["\uD835\uDF12","x"],["\uD835\uDF13","ps"],["\uD835\uDF14","o"],["\uD835\uDF15","d"],["\uD835\uDF16","E"],["\uD835\uDF17","TH"],["\uD835\uDF18","K"],["\uD835\uDF19","f"],["\uD835\uDF1A","r"],["\uD835\uDF1B","p"],["\uD835\uDF1C","A"],["\uD835\uDF1D","V"],["\uD835\uDF1E","G"],["\uD835\uDF1F","D"],["\uD835\uDF20","E"],["\uD835\uDF21","Z"],["\uD835\uDF22","I"],["\uD835\uDF23","TH"],["\uD835\uDF24","I"],["\uD835\uDF25","K"],["\uD835\uDF26","L"],["\uD835\uDF27","M"],["\uD835\uDF28","N"],["\uD835\uDF29","KS"],["\uD835\uDF2A","O"],["\uD835\uDF2B","P"],["\uD835\uDF2C","S"],["\uD835\uDF2D","TH"],["\uD835\uDF2E","S"],["\uD835\uDF2F","T"],["\uD835\uDF30","Y"],["\uD835\uDF31","F"],["\uD835\uDF32","X"],["\uD835\uDF33","PS"],["\uD835\uDF34","O"],["\uD835\uDF35","D"],["\uD835\uDF36","a"],["\uD835\uDF37","v"],["\uD835\uDF38","g"],["\uD835\uDF39","d"],["\uD835\uDF3A","e"],["\uD835\uDF3B","z"],["\uD835\uDF3C","i"],["\uD835\uDF3D","th"],["\uD835\uDF3E","i"],["\uD835\uDF3F","k"],["\uD835\uDF40","l"],["\uD835\uDF41","m"],["\uD835\uDF42","n"],["\uD835\uDF43","ks"],["\uD835\uDF44","o"],["\uD835\uDF45","p"],["\uD835\uDF46","r"],["\uD835\uDF47","s"],["\uD835\uDF48","s"],["\uD835\uDF49","t"],["\uD835\uDF4A","y"],["\uD835\uDF4B","f"],["\uD835\uDF4C","x"],["\uD835\uDF4D","ps"],["\uD835\uDF4E","o"],["\uD835\uDF4F","a"],["\uD835\uDF50","e"],["\uD835\uDF51","i"],["\uD835\uDF52","k"],["\uD835\uDF53","f"],["\uD835\uDF54","r"],["\uD835\uDF55","p"],["\uD835\uDF56","A"],["\uD835\uDF57","B"],["\uD835\uDF58","G"],["\uD835\uDF59","D"],["\uD835\uDF5A","E"],["\uD835\uDF5B","Z"],["\uD835\uDF5C","I"],["\uD835\uDF5D","TH"],["\uD835\uDF5E","I"],["\uD835\uDF5F","K"],["\uD835\uDF60","L"],["\uD835\uDF61","M"],["\uD835\uDF62","N"],["\uD835\uDF63","KS"],["\uD835\uDF64","O"],["\uD835\uDF65","P"],["\uD835\uDF66","R"],["\uD835\uDF67","TH"],["\uD835\uDF68","S"],["\uD835\uDF69","T"],["\uD835\uDF6A","Y"],["\uD835\uDF6B","F"],["\uD835\uDF6C","X"],["\uD835\uDF6D","PS"],["\uD835\uDF6E","O"],["\uD835\uDF6F","D"],["\uD835\uDF70","a"],["\uD835\uDF71","v"],["\uD835\uDF72","g"],["\uD835\uDF73","d"],["\uD835\uDF74","e"],["\uD835\uDF75","z"],["\uD835\uDF76","i"],["\uD835\uDF77","th"],["\uD835\uDF78","i"],["\uD835\uDF79","k"],["\uD835\uDF7A","l"],["\uD835\uDF7B","m"],["\uD835\uDF7C","n"],["\uD835\uDF7D","ks"],["\uD835\uDF7E","o"],["\uD835\uDF7F","p"],["\uD835\uDF80","r"],["\uD835\uDF81","s"],["\uD835\uDF82","s"],["\uD835\uDF83","t"],["\uD835\uDF84","y"],["\uD835\uDF85","f"],["\uD835\uDF86","x"],["\uD835\uDF87","ps"],["\uD835\uDF88","o"],["\uD835\uDF89","a"],["\uD835\uDF8A","e"],["\uD835\uDF8B","i"],["\uD835\uDF8C","k"],["\uD835\uDF8D","f"],["\uD835\uDF8E","r"],["\uD835\uDF8F","p"],["\uD835\uDF90","A"],["\uD835\uDF91","V"],["\uD835\uDF92","G"],["\uD835\uDF93","D"],["\uD835\uDF94","E"],["\uD835\uDF95","Z"],["\uD835\uDF96","I"],["\uD835\uDF97","TH"],["\uD835\uDF98","I"],["\uD835\uDF99","K"],["\uD835\uDF9A","L"],["\uD835\uDF9B","M"],["\uD835\uDF9C","N"],["\uD835\uDF9D","KS"],["\uD835\uDF9E","O"],["\uD835\uDF9F","P"],["\uD835\uDFA0","S"],["\uD835\uDFA1","TH"],["\uD835\uDFA2","S"],["\uD835\uDFA3","T"],["\uD835\uDFA4","Y"],["\uD835\uDFA5","F"],["\uD835\uDFA6","X"],["\uD835\uDFA7","PS"],["\uD835\uDFA8","O"],["\uD835\uDFA9","D"],["\uD835\uDFAA","av"],["\uD835\uDFAB","g"],["\uD835\uDFAC","d"],["\uD835\uDFAD","e"],["\uD835\uDFAE","z"],["\uD835\uDFAF","i"],["\uD835\uDFB0","i"],["\uD835\uDFB1","th"],["\uD835\uDFB2","i"],["\uD835\uDFB3","k"],["\uD835\uDFB4","l"],["\uD835\uDFB5","m"],["\uD835\uDFB6","n"],["\uD835\uDFB7","ks"],["\uD835\uDFB8","o"],["\uD835\uDFB9","p"],["\uD835\uDFBA","r"],["\uD835\uDFBB","s"],["\uD835\uDFBC","s"],["\uD835\uDFBD","t"],["\uD835\uDFBE","y"],["\uD835\uDFBF","f"],["\uD835\uDFC0","x"],["\uD835\uDFC1","ps"],["\uD835\uDFC2","o"],["\uD835\uDFC3","a"],["\uD835\uDFC4","e"],["\uD835\uDFC5","i"],["\uD835\uDFC6","k"],["\uD835\uDFC7","f"],["\uD835\uDFC8","r"],["\uD835\uDFC9","p"],["\uD835\uDFCA","F"],["\uD835\uDFCB","f"],["\u249C","(a)"],["\u249D","(b)"],["\u249E","(c)"],["\u249F","(d)"],["\u24A0","(e)"],["\u24A1","(f)"],["\u24A2","(g)"],["\u24A3","(h)"],["\u24A4","(i)"],["\u24A5","(j)"],["\u24A6","(k)"],["\u24A7","(l)"],["\u24A8","(m)"],["\u24A9","(n)"],["\u24AA","(o)"],["\u24AB","(p)"],["\u24AC","(q)"],["\u24AD","(r)"],["\u24AE","(s)"],["\u24AF","(t)"],["\u24B0","(u)"],["\u24B1","(v)"],["\u24B2","(w)"],["\u24B3","(x)"],["\u24B4","(y)"],["\u24B5","(z)"],["\u24B6","(A)"],["\u24B7","(B)"],["\u24B8","(C)"],["\u24B9","(D)"],["\u24BA","(E)"],["\u24BB","(F)"],["\u24BC","(G)"],["\u24BD","(H)"],["\u24BE","(I)"],["\u24BF","(J)"],["\u24C0","(K)"],["\u24C1","(L)"],["\u24C3","(N)"],["\u24C4","(O)"],["\u24C5","(P)"],["\u24C6","(Q)"],["\u24C7","(R)"],["\u24C8","(S)"],["\u24C9","(T)"],["\u24CA","(U)"],["\u24CB","(V)"],["\u24CC","(W)"],["\u24CD","(X)"],["\u24CE","(Y)"],["\u24CF","(Z)"],["\u24D0","(a)"],["\u24D1","(b)"],["\u24D2","(b)"],["\u24D3","(c)"],["\u24D4","(e)"],["\u24D5","(f)"],["\u24D6","(g)"],["\u24D7","(h)"],["\u24D8","(i)"],["\u24D9","(j)"],["\u24DA","(k)"],["\u24DB","(l)"],["\u24DC","(m)"],["\u24DD","(n)"],["\u24DE","(o)"],["\u24DF","(p)"],["\u24E0","(q)"],["\u24E1","(r)"],["\u24E2","(s)"],["\u24E3","(t)"],["\u24E4","(u)"],["\u24E5","(v)"],["\u24E6","(w)"],["\u24E7","(x)"],["\u24E8","(y)"],["\u24E9","(z)"],["\u010A","C"],["\u010B","c"],["\u0120","G"],["\u0121","g"],["\u0126","H"],["\u0127","h"],["\u017B","Z"],["\u017C","z"],["\uD835\uDFCE","0"],["\uD835\uDFCF","1"],["\uD835\uDFD0","2"],["\uD835\uDFD1","3"],["\uD835\uDFD2","4"],["\uD835\uDFD3","5"],["\uD835\uDFD4","6"],["\uD835\uDFD5","7"],["\uD835\uDFD6","8"],["\uD835\uDFD7","9"],["\uD835\uDFD8","0"],["\uD835\uDFD9","1"],["\uD835\uDFDA","2"],["\uD835\uDFDB","3"],["\uD835\uDFDC","4"],["\uD835\uDFDD","5"],["\uD835\uDFDE","6"],["\uD835\uDFDF","7"],["\uD835\uDFE0","8"],["\uD835\uDFE1","9"],["\uD835\uDFE2","0"],["\uD835\uDFE3","1"],["\uD835\uDFE4","2"],["\uD835\uDFE5","3"],["\uD835\uDFE6","4"],["\uD835\uDFE7","5"],["\uD835\uDFE8","6"],["\uD835\uDFE9","7"],["\uD835\uDFEA","8"],["\uD835\uDFEB","9"],["\uD835\uDFEC","0"],["\uD835\uDFED","1"],["\uD835\uDFEE","2"],["\uD835\uDFEF","3"],["\uD835\uDFF0","4"],["\uD835\uDFF1","5"],["\uD835\uDFF2","6"],["\uD835\uDFF3","7"],["\uD835\uDFF4","8"],["\uD835\uDFF5","9"],["\uD835\uDFF6","0"],["\uD835\uDFF7","1"],["\uD835\uDFF8","2"],["\uD835\uDFF9","3"],["\uD835\uDFFA","4"],["\uD835\uDFFB","5"],["\uD835\uDFFC","6"],["\uD835\uDFFD","7"],["\uD835\uDFFE","8"],["\uD835\uDFFF","9"],["\u2460","1"],["\u2461","2"],["\u2462","3"],["\u2463","4"],["\u2464","5"],["\u2465","6"],["\u2466","7"],["\u2467","8"],["\u2468","9"],["\u2469","10"],["\u246A","11"],["\u246B","12"],["\u246C","13"],["\u246D","14"],["\u246E","15"],["\u246F","16"],["\u2470","17"],["\u2471","18"],["\u2472","19"],["\u2473","20"],["\u2474","1"],["\u2475","2"],["\u2476","3"],["\u2477","4"],["\u2478","5"],["\u2479","6"],["\u247A","7"],["\u247B","8"],["\u247C","9"],["\u247D","10"],["\u247E","11"],["\u247F","12"],["\u2480","13"],["\u2481","14"],["\u2482","15"],["\u2483","16"],["\u2484","17"],["\u2485","18"],["\u2486","19"],["\u2487","20"],["\u2488","1."],["\u2489","2."],["\u248A","3."],["\u248B","4."],["\u248C","5."],["\u248D","6."],["\u248E","7."],["\u248F","8."],["\u2490","9."],["\u2491","10."],["\u2492","11."],["\u2493","12."],["\u2494","13."],["\u2495","14."],["\u2496","15."],["\u2497","16."],["\u2498","17."],["\u2499","18."],["\u249A","19."],["\u249B","20."],["\u24EA","0"],["\u24EB","11"],["\u24EC","12"],["\u24ED","13"],["\u24EE","14"],["\u24EF","15"],["\u24F0","16"],["\u24F1","17"],["\u24F2","18"],["\u24F3","19"],["\u24F4","20"],["\u24F5","1"],["\u24F6","2"],["\u24F7","3"],["\u24F8","4"],["\u24F9","5"],["\u24FA","6"],["\u24FB","7"],["\u24FC","8"],["\u24FD","9"],["\u24FE","10"],["\u24FF","0"],["\uD83D\uDE70","&"],["\uD83D\uDE71","&"],["\uD83D\uDE72","&"],["\uD83D\uDE73","&"],["\uD83D\uDE74","&"],["\uD83D\uDE75","&"],["\uD83D\uDE76",'"'],["\uD83D\uDE77",'"'],["\uD83D\uDE78",'"'],["\u203D","?!"],["\uD83D\uDE79","?!"],["\uD83D\uDE7A","?!"],["\uD83D\uDE7B","?!"],["\uD83D\uDE7C","/"],["\uD83D\uDE7D","\\"],["\uD83D\uDF07","AR"],["\uD83D\uDF08","V"],["\uD83D\uDF09","V"],["\uD83D\uDF06","VR"],["\uD83D\uDF05","VF"],["\uD83D\uDF29","2"],["\uD83D\uDF2A","5"],["\uD83D\uDF61","f"],["\uD83D\uDF62","W"],["\uD83D\uDF63","U"],["\uD83D\uDF67","V"],["\uD83D\uDF68","T"],["\uD83D\uDF6A","V"],["\uD83D\uDF6B","MB"],["\uD83D\uDF6C","VB"],["\uD83D\uDF72","3B"],["\uD83D\uDF73","3B"],["\uD83D\uDCAF","100"],["\uD83D\uDD19","BACK"],["\uD83D\uDD1A","END"],["\uD83D\uDD1B","ON!"],["\uD83D\uDD1C","SOON"],["\uD83D\uDD1D","TOP"],["\uD83D\uDD1E","18"],["\uD83D\uDD24","abc"],["\uD83D\uDD20","ABCD"],["\uD83D\uDD21","abcd"],["\uD83D\uDD22","1234"],["\uD83D\uDD23","T&@%"],["#\uFE0F\u20E3","#"],["*\uFE0F\u20E3","*"],["0\uFE0F\u20E3","0"],["1\uFE0F\u20E3","1"],["2\uFE0F\u20E3","2"],["3\uFE0F\u20E3","3"],["4\uFE0F\u20E3","4"],["5\uFE0F\u20E3","5"],["6\uFE0F\u20E3","6"],["7\uFE0F\u20E3","7"],["8\uFE0F\u20E3","8"],["9\uFE0F\u20E3","9"],["\uD83D\uDD1F","10"],["\uD83C\uDD70\uFE0F","A"],["\uD83C\uDD71\uFE0F","B"],["\uD83C\uDD8E","AB"],["\uD83C\uDD91","CL"],["\uD83C\uDD7E\uFE0F","O"],["\uD83C\uDD7F","P"],["\uD83C\uDD98","SOS"],["\uD83C\uDD72","C"],["\uD83C\uDD73","D"],["\uD83C\uDD74","E"],["\uD83C\uDD75","F"],["\uD83C\uDD76","G"],["\uD83C\uDD77","H"],["\uD83C\uDD78","I"],["\uD83C\uDD79","J"],["\uD83C\uDD7A","K"],["\uD83C\uDD7B","L"],["\uD83C\uDD7C","M"],["\uD83C\uDD7D","N"],["\uD83C\uDD80","Q"],["\uD83C\uDD81","R"],["\uD83C\uDD82","S"],["\uD83C\uDD83","T"],["\uD83C\uDD84","U"],["\uD83C\uDD85","V"],["\uD83C\uDD86","W"],["\uD83C\uDD87","X"],["\uD83C\uDD88","Y"],["\uD83C\uDD89","Z"]],gZ4=j69});function af0($,Y){if(typeof $!=="string")throw TypeError(`Expected a string, got \`${typeof $}\``);Y={customReplacements:[],...Y};let X=new Map([...gZ4,...Y.customReplacements]);return $=$.normalize(),$=T69($,X),$=$.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),$}var T69=($,Y)=>{for(let[X,G]of Y)$=$.replace(new RegExp(PD(X),"g"),G);return $};var uZ4=V0(()=>{mZ4()});var C69,pZ4;var dZ4=V0(()=>{C69=[["&"," and "],["\uD83E\uDD84"," unicorn "],["\u2665"," love "]],pZ4=C69});var cZ4={};W8(cZ4,{slugifyWithCounter:()=>x69,default:()=>sm});function sm($,Y){if(typeof $!=="string")throw TypeError(`Expected a string, got \`${typeof $}\``);Y={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...Y};let X=Y.preserveLeadingUnderscore&&$.startsWith("_"),G=Y.preserveTrailingDash&&$.endsWith("-"),J=new Map([...pZ4,...Y.customReplacements]);if($=af0($,{customReplacements:J}),Y.decamelize)$=S69($);let Q=v69(Y);if(Y.lowercase)$=$.toLowerCase();if($=$.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3"),$=$.replace(Q,Y.separator),$=$.replace(/\\/g,""),Y.separator)$=k69($,Y.separator);if(X)$=`_${$}`;if(G)$=`${$}-`;return $}function x69(){let $=new Map,Y=(X,G)=>{if(X=sm(X,G),!X)return"";let J=X.toLowerCase(),Q=$.get(J.replace(/(?:-\d+?)+?$/,""))||0,W=$.get(J);$.set(J,typeof W==="number"?W+1:1);let Z=$.get(J)||2;if(Z>=2||Q>2)X=`${X}-${Z}`;return X};return Y.reset=()=>{$.clear()},Y}var S69=($)=>{return $.replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2")},k69=($,Y)=>{let X=PD(Y);return $.replace(new RegExp(`${X}{2,}`,"g"),Y).replace(new RegExp(`^${X}|${X}$`,"g"),"")},v69=($)=>{let Y="a-z\\d";if(Y+=$.lowercase?"":"A-Z",$.preserveCharacters.length>0)for(let X of $.preserveCharacters){if(X===$.separator)throw Error(`The separator character \`${$.separator}\` cannot be included in preserved characters: ${$.preserveCharacters}`);Y+=PD(X)}return new RegExp(`[^${Y}]+`,"g")};var sf0=V0(()=>{uZ4();dZ4()});import{createHash as SQ7,randomUUID as M6}from"crypto";import{ReadableStream as $2,WritableStream as lZ4,TransformStream as FV}from"stream/web";import y69,{EventEmitter as b69}from"events";function L70($){if(typeof $!=="object"||$===null)return $;let Y={...$};if(Y.properties&&typeof Y.properties==="object"&&!Array.isArray(Y.properties))Y.properties=Object.fromEntries(Object.entries(Y.properties).map(([X,G])=>{if(typeof G!=="object"||G===null||Array.isArray(G))return[X,G];let J=G,Q="type"in J,W="$ref"in J,Z="anyOf"in J,K="oneOf"in J,H="allOf"in J;if(!Q&&!W&&!Z&&!K&&!H){let{items:z,...V}=J;return[X,{...V,type:["string","number","integer","boolean","object","null"]}]}return[X,L70(J)]}));if(Y.items){if(Array.isArray(Y.items))Y.items=Y.items.map((X)=>L70(X));else if(typeof Y.items==="object")Y.items=L70(Y.items)}return Y}function h69({tools:$,toolChoice:Y,activeTools:X,targetVersion:G="v2"}){if(Y==="none")return{tools:void 0,toolChoice:{type:"none"}};if(Object.keys($||{}).length===0)return{tools:void 0,toolChoice:void 0};let J=X!=null?Object.entries($||{}).filter(([W])=>X.includes(W)):Object.entries($||{}),Q=G==="v3"?"provider":"provider-defined";return{tools:J.map(([W,Z])=>{try{if(Bw(Z)){let A=Z.name??W;return{type:Q,name:A,id:Z.id,args:Z.args??{}}}let K;if("inputSchema"in Z)K=Z.inputSchema;else if("parameters"in Z)K=Z.parameters;let H=$T0({type:"function",...Z,inputSchema:K}),z="strict"in Z?Z.strict:void 0,V=H?.type??"function";switch(V){case void 0:case"dynamic":case"function":let A;if(H.inputSchema){if("$schema"in H.inputSchema&&typeof H.inputSchema.$schema==="string"&&H.inputSchema.$schema.startsWith("http://json-schema.org/"))A=H.inputSchema;else if(V5(H.inputSchema))A=$6(H.inputSchema,{io:"input",target:"draft-07"});else A=Y40(H.inputSchema).jsonSchema;if(A&&typeof A==="object"&&"$schema"in A&&A.$schema!=="http://json-schema.org/draft-07/schema#")A.$schema="http://json-schema.org/draft-07/schema#"}else A={type:"object",properties:{},additionalProperties:!1};return{type:"function",name:W,description:H.description,inputSchema:L70(A),...z!=null?{strict:z}:{},providerOptions:H.providerOptions};case"provider-defined":{let F=H.id,N=H.name??W;return{type:Q,name:N,id:F,args:H.args}}default:throw Error(`Unsupported tool type: ${V}`)}}catch(K){return console.error("Error preparing tool",K),null}}).filter((W)=>W!==null),toolChoice:Y==null?{type:"auto"}:typeof Y==="string"?{type:Y}:{type:"tool",toolName:Y.toolName}}}async function f69({stream:$,onError:Y,logger:X}){let G=$.getReader();try{while(!0){let{done:J}=await G.read();if(J)break}}catch(J){X?.error("consumeStream error",J),Y?.(J)}finally{G.releaseLock()}}function gE($){return typeof $==="object"&&$!==null}function Gg0($,Y){let X=$[Y];return typeof X==="string"?X:void 0}function c69($){if($ instanceof Error)return $.cause;if(!gE($))return;return $.cause}function l69($){if(!gE($))return;if($.type==="error"&&gE($.error))return $.error;if($.type==="response.failed"&&gE($.response)){let Y=$.response.error;return gE(Y)?Y:void 0}return}function i69($){let Y=Gg0($,"code")??Gg0($,"type");if(!Y)return!1;let X=Y.toLowerCase();return u69.some((G)=>X.includes(G))}function n69($){let Y=Gg0($,"message");return Y!==void 0&&p69.test(Y)}function O24($){let Y=l69($);if(!Y)return!1;return i69(Y)||n69(Y)}function r69($){return(M$.isInstance($)?$.isRetryable:gE($)&&typeof $.isRetryable==="boolean"?$.isRetryable:void 0)===!0}function a69($,Y){let X=new WeakSet;function G(J){if(gE(J)){if(X.has(J))return!1;X.add(J)}if(r69(J))return!0;if(Y.some((W)=>W(J)))return!0;let Q=c69(J);return Q!==void 0&&G(Q)}return G($)}function O70($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function uE($){if(!$)return;let Y=$.mastra;if(!O70(Y))return;let X=Y.om;if(!O70(X))return;return X}function mj($,Y){let X=$??{},G=O70(X.mastra)?X.mastra:{},J=O70(G.om)?G.om:{};return{...X,mastra:{...G,om:{...J,...Y}}}}function rU($){if(!$)return null;let Y=$.get("MastraMemory");if(!Y)return null;if(typeof Y!=="object"||Y===null)throw Error(`Invalid MemoryRequestContext: expected object, got ${typeof Y}`);let X=Y;if(X.thread!==void 0){if(typeof X.thread!=="object"||X.thread===null)throw Error(`Invalid MemoryRequestContext.thread: expected object, got ${typeof X.thread}`);let G=X.thread;if(typeof G.id!=="string")throw Error(`Invalid MemoryRequestContext.thread.id: expected string, got ${typeof G.id}`)}if(X.resourceId!==void 0&&typeof X.resourceId!=="string")throw Error(`Invalid MemoryRequestContext.resourceId: expected string, got ${typeof X.resourceId}`);return Y}function Jg0($){if($===!0)return!0;if($===!1||$===void 0)return!1;return $.enabled!==!1}function nZ4($){let Y=null,X=async()=>{if($.disableInit)return;if(process.env.MASTRA_DISABLE_STORAGE_INIT==="true")return;if(!Y)Y=$.init();await Y};if($[iZ4])return $;return new Proxy($,{get(J,Q){if(Q===iZ4)return!0;let W=J[Q];if(typeof W==="function"){if(Q==="init")return async(...Z)=>{if(!Y)Y=Reflect.apply(W,J,Z);return Y};return async(...Z)=>{return await X(),Reflect.apply(W,J,Z)}}return Reflect.get(J,Q)}})}function of0($){if(typeof $==="string")return $;if(typeof $==="function")return;if($&&typeof $==="object"&&"id"in $&&typeof $.id==="string")return $.id;return}function Zg0($){let Y="",X=0;while(X<$.length){let G=$.indexOf(Qg0,X);if(G===-1){Y+=$.substring(X);break}Y+=$.substring(X,G);let J=$.indexOf(Wg0,G+Qg0.length);if(J===-1){Y+=$.substring(G);break}X=J+Wg0.length}return Y}function V9($){return $!==null&&typeof $==="object"&&"id"in $&&typeof $.id==="string"&&"inputSchema"in $&&"outputSchema"in $&&"execute"in $&&typeof $.execute==="function"&&!("processInput"in $)&&!("processInputStep"in $)&&!("processOutputStream"in $)&&!("processOutputResult"in $)&&!("processOutputStep"in $)&&!("processLLMRequest"in $)&&!("processAPIError"in $)}async function G89(){if(tm)return tm;if(!tf0)tf0=(async()=>{let Y=await Promise.resolve().then(() => (xZ4(),vZ4));return tm=Y,Y})();return tf0}function J89(){if(!tm)throw Error("chat module not loaded yet \u2014 call getChatModule() first");return tm}function D70($){for(let Y of Q89)if($.startsWith(Y))return $.slice(Y.length);return $}function N70($){try{let Y=typeof $==="string"?JSON.parse($):$;if(!Y||typeof Y!=="object")return"";let X=Object.entries(Y).filter(([Q,W])=>Q!=="__mastraMetadata"&&W!=null&&W!==!1&&W!=="");if(X.length===0)return"";let[,G]=X[0],J=typeof G==="string"?G:JSON.stringify(G);if(J.length>aZ4)J=J.slice(0,aZ4)+"\u2026";return J}catch{return""}}function W89($,Y){let X=Y?"Error: ":"";if($==null)return`${X}(no output)`;let G=typeof $==="string"?$:JSON.stringify($,null,2);if(G=G.trim(),G.length>sZ4)G=G.slice(0,sZ4)+"\u2026";return`${X}${G}`}function Z89($){if($<1000)return`${$}ms`;return`${($/1000).toFixed(1)}s`}function Ju($,Y){return Y?`*${$}* \`${Y}\``:`*${$}*`}function K89($,Y,X){let G=Ju($,Y);if(X)return jX().Card({children:[jX().CardText(`${G} \u22EF`)]});return`${G} \u22EF`}function U89($,Y,X,G,J,Q){let W=J!=null?`${Z89(J)} ${G?"\u2717":"\u2713"}`:G?"\u2717":"\u2713",Z=Ju($,Y);if(Q){let H=`${Z} \xB7 ${W}`,z=G?X:`\`\`\`
${X}
\`\`\``;return jX().Card({children:[jX().CardText(H),jX().CardText(z,{style:G?"bold":"plain"})]})}let K=G&&!X.startsWith("Error: ")?`Error: ${X}`:X;return`${Z} \xB7 ${W}
${K}`}function H89($,Y,X,G){let J=Ju($,Y);if(G)return jX().Card({children:[jX().CardText(J),jX().CardText("Requires approval to run."),jX().Actions([jX().Button({id:`tool_approve:${X}`,label:"Approve",style:"primary"}),jX().Button({id:`tool_deny:${X}`,label:"Deny",style:"danger"})])]});return`${J}
\u23F8 Requires approval to run. Reply "approve" or "deny".`}function z89($,Y,X){let G=Ju($,Y);if(X)return jX().Card({children:[jX().CardText(`${G} \u22EF`),jX().CardText("\u2713 Approved")]});return`${G} \u22EF
\u2713 Approved`}function V89($,Y,X,G){let J=Ju($,Y),Q=X?` by ${X}`:"";if(G)return jX().Card({children:[jX().CardText(`${J} \u2717`),jX().CardText(`\u2717 Denied${Q}`)]});return`${J} \u2717
\u2717 Denied${Q}`}function D89($){if(typeof $==="function")return $;let Y=$??["image/*"];return(X)=>{return Y.some((G)=>{if(G==="*"||G==="*/*")return!0;if(G.endsWith("/*"))return X.startsWith(G.slice(0,-1));return X===G})}}function N89($){if($==null||$.length===0)return;return $.map((Y)=>typeof Y==="string"?{match:Y}:{match:Y.match,forcedMimeType:Y.mimeType})}function L89($,Y){if(Y==="*")return!0;try{let X=new URL($).hostname;return X===Y||X.endsWith(`.${Y}`)}catch{return!1}}function B89($,Y){return Y.find((X)=>L89($,X.match))}function E89($){return Array.from($.matchAll(O89),(Y)=>Y[0])}async function M89($,Y){try{let X=await fetch($,{method:"HEAD",redirect:"follow"});if(!X.ok)return;return X.headers.get("content-type")?.split(";")[0]?.trim()||void 0}catch(X){Y?.debug("[CHANNEL] HEAD request failed for link",{url:$,error:String(X)});return}}function f24({runId:$,scorerId:Y,scorerObject:X,input:G,output:J,requestContext:Q,entity:W,structuredOutput:Z,source:K,entityType:H,threadId:z,resourceId:V,...A}){let F=!1;if(!X?.sampling||X?.sampling?.type==="none")F=!0;if(X?.sampling?.type)switch(X?.sampling?.type){case"ratio":F=Math.random()<X?.sampling?.rate;break;default:F=!0}if(!F)return;let N={};if(Q){let B=new WeakSet,O=(E,M,R=0)=>{if(R>8)return;if(B.has(E))return;B.add(E);let q=typeof E.entries==="function"?E.entries():Object.entries(E);for(let[w,I]of q){let P=M?`${M}.${w}`:w;if(typeof I==="string"||typeof I==="number"||typeof I==="boolean")N[P]=I;else if(I&&typeof I==="object"&&!Array.isArray(I))O(I,P,R+1)}};O(Q)}let D={scorer:{id:X.scorer?.id||Y,name:X.scorer?.name,description:X.scorer.description},input:G,output:J,requestContext:N,runId:$,source:K,entity:W,structuredOutput:Z,entityType:H,threadId:z,resourceId:V,...A};P64("onScorerRun",D)}function A9($,Y){try{return $.enqueue(Y),!0}catch{return!1}}function E70($){try{return $.close(),!0}catch{return!1}}function R89($,Y){try{return $.error(Y),!0}catch{return!1}}function G80($){if(typeof $!=="object"||$===null)return!1;let Y=$;return typeof Y.id==="string"&&Y.id.length>0&&typeof Y.generate==="function"&&typeof Y.stream==="function"&&typeof Y.getDescription==="function"&&typeof Y.getModel==="function"&&typeof Y.hasOwnMemory==="function"&&typeof Y.__setMemory==="function"&&typeof Y.getMemory==="function"&&typeof Y.getInstructions==="function"&&typeof Y.resumeGenerate==="function"&&typeof Y.resumeStream==="function"}function pj($){if($===null||typeof $!=="object"||Array.isArray($))return!1;let Y=Object.getPrototypeOf($);return Y===Object.prototype||Y===null}function hW($){return typeof $==="string"?$:void 0}function I89($,Y){if(!pj(Y))return{id:$,name:$};let X=hW(Y.id)??$,G=hW(Y.name)??X,J=hW(Y.description);return{id:X,name:G,...J!==void 0?{description:J}:{}}}function lO($){if(!pj($))return;let Y=hW($.modelId)??hW($.id),X=hW($.provider),G=hW($.specificationVersion);if(Y===void 0&&X===void 0&&G===void 0)return;return{...Y!==void 0?{modelId:Y}:{},...X!==void 0?{provider:X}:{},...G!==void 0?{specificationVersion:G}:{}}}function WD($){if(!pj($))return;return Object.entries($).map(([Y,X])=>I89(Y,X))}function g24($){if(!pj($))return;let Y=WD($);if(!Y)return;return Object.keys($).map((X,G)=>({registryKey:X,summary:Y[G]}))}function m24($,Y){return $.find((X)=>X.summary.id===Y||X.summary.name===Y||X.registryKey===Y)}function iO($,Y){if(!Array.isArray($))return;let X=g24(Y)??[];return $.map((J)=>{let Q=hW(J);if(Q===void 0)return;let W=m24(X,Q);return{id:W?.summary.id??Q,name:W?.summary.name??Q}}).filter((J)=>J!==void 0)}function nO($,Y){if(typeof $==="string")return{type:$};if(!pj($))return;let X=hW($.type);if(X===void 0)return;if(X!=="tool")return{type:X};let G=hW($.toolName)??hW($.toolId);if(G===void 0)return{type:X};let J=g24(Y)??[],Q=m24(J,G),W=hW($.toolId)??G,Z=hW($.toolName)??G;return{type:X,tool:Q?{id:Q.summary.id,name:Q.summary.name}:{id:W,name:Z}}}function J80($){if(!pj($))return;let Y={};for(let X of["text","object","finishReason","toolCalls","toolResults","warnings","files","sources","reasoning","reasoningText","tripwire"])if($[X]!==void 0)Y[X]=$[X];if(Array.isArray($.steps))Y.stepCount=$.steps.length;return Object.keys(Y).length>0?Y:void 0}async function P89({stream:$,onError:Y}){let X=$.getReader();try{while(!0){let{done:G}=await X.read();if(G)break}}catch(G){Y==null||Y(G)}finally{X.releaseLock()}}async function Qu($,Y){let X=$["~standard"].validate(Y),G=X instanceof Promise?await X:X;if("issues"in G&&G.issues)return{success:!1,issues:G.issues.map((J)=>({path:J.path?.map((Q)=>typeof Q==="object"&&("key"in Q)?Q.key:Q),message:J.message}))};return{success:!0,data:G.value}}async function W80({prevOutput:$,step:Y,validateInputs:X}){let G=$,J,Q=Y.inputSchema;if(X&&Q){let W=await Qu(Q,$);if(!W.success){let Z=W.issues.map((K)=>`- ${K.path?.join(".")}: ${K.message}`).join(`
`);J=new G0({id:"WORKFLOW_STEP_INPUT_VALIDATION_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",text:`Step input validation failed: 
`+Z},{issues:W.issues})}else G=W.data!==null&&typeof W.data==="object"&&!Array.isArray(W.data)&&Object.keys(W.data).length===0?$:W.data}return{inputData:G,validationError:J}}async function Z80({resumeData:$,step:Y}){if(!$)return{resumeData:void 0,validationError:void 0};let X,G=Y.resumeSchema;if(G){let J=await Qu(G,$);if(!J.success){let Q=J.issues.map((W)=>`- ${W.path?.join(".")}: ${W.message}`).join(`
`);X=new G0({id:"WORKFLOW_STEP_RESUME_DATA_VALIDATION_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",text:`Step resume data validation failed: 
`+Q})}else $=J.data}return{resumeData:$,validationError:X}}async function K80({suspendData:$,step:Y,validateInputs:X}){if(!$)return{suspendData:void 0,validationError:void 0};let G,J=Y.suspendSchema;if(J&&X){let Q=await Qu(J,$);if(!Q.success){let W=Q.issues.map((Z)=>`- ${Z.path?.join(".")}: ${Z.message}`).join(`
`);G=new G0({id:"WORKFLOW_STEP_SUSPEND_DATA_VALIDATION_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",text:`Step suspend data validation failed: 
`+W})}else $=Q.data}return{suspendData:$,validationError:G}}async function u24({stateData:$,step:Y,validateInputs:X}){if(!$)return{stateData:void 0,validationError:void 0};let G,J=Y.stateSchema;if(J&&X){let Q=await Qu(J,$);if(!Q.success){let W=Q.issues.map((Z)=>`- ${Z.path?.join(".")}: ${Z.message}`).join(`
`);G=Error(`Step state data validation failed: 
`+W)}else $=Q.data}return{stateData:$,validationError:G}}async function p24({requestContext:$,step:Y,validateInputs:X}){let G,J=Y.requestContextSchema;if(J&&X){let Q=$?.all??{},W=await Qu(J,Q);if(!W.success){let Z=W.issues.map((K)=>`- ${K.path?.join(".")}: ${K.message}`).join(`
`);G=new G0({id:"WORKFLOW_STEP_REQUEST_CONTEXT_VALIDATION_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",text:`Step request context validation failed for step '${Y.id}': 
`+Z})}}return{validationError:G}}function d24($,Y){return Object.entries($).filter(([X,G])=>G.stepId===Y).reduce((X,[G,J])=>{return X[G]=J,X},{})}function az($,{paramName:Y,deprecationMessage:X,logger:G}){return new Proxy($,{get(J,Q,W){if(Q===Y&&!tZ4.has(Y))if(tZ4.add(Y),G)G.warn("\x1B[33m%s\x1B[0m",X);else console.warn("\x1B[33m%s\x1B[0m",X);return Reflect.get(J,Q,W)}})}function Ov0($){if($){for(let Y of Object.values($))if(Y.status==="failed"&&"error"in Y&&Y.error)Y.error=XG(Y.error,{serializeStack:!1})}return $}function ef0($){let{__state:Y,metadata:X,...G}=$;if(X&&typeof X==="object"&&!Array.isArray(X)){let{nestedRunId:J,...Q}=X;if(Object.keys(Q).length>0)return{...G,metadata:Q}}return G}function z80($){if($===null||$===void 0)return $;if(typeof $!=="object")return $;if(Array.isArray($))return $.map((G)=>{if(G&&typeof G==="object"&&!Array.isArray(G))return ef0(G);return G});let X=ef0($);if(Array.isArray(X.output))X.output=X.output.map((G)=>{if(G&&typeof G==="object"&&!Array.isArray(G))return ef0(G);return G});return X}async function w89($,Y){let{workflowId:X,runId:G,resourceId:J,entry:Q,prevStep:W,serializedStepGraph:Z,stepResults:K,resume:H,restart:z,timeTravel:V,executionContext:A,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,perStep:O,...E}=Y,M=$4(E),R=await $.createChildSpan({parentSpan:M.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.parallel.${A.executionPath.join("-")}.span.start`,options:{type:"workflow_parallel",name:`parallel: '${Q.steps.length} branches'`,input:$.getStepOutput(K,W),attributes:{branchCount:Q.steps.length,parallelSteps:Q.steps.map((C)=>C.type==="step"?C.step.id:`control-${C.type}`)},tracingPolicy:$.options?.tracingPolicy},executionContext:A}),q=$.getStepOutput(K,W);for(let[C,k]of Q.steps.entries()){let S=!0;if(z)S=!!z.activeStepsPath[k.step.id];if(V&&V.executionPath.length>0)S=V.steps[0]===k.step.id;if(!S)break;let T=H?.steps[0]===k.step.id?void 0:Date.now(),v=H?.steps[0]===k.step.id?Date.now():void 0;if(K[k.step.id]={...K[k.step.id],status:"running",...v?{resumePayload:H?.resumePayload}:{payload:q},...T?{startedAt:T}:{},...v?{resumedAt:v}:{}},A.activeStepsPath[k.step.id]=[...A.executionPath,C],O)break}if(V&&V.executionPath.length>0)V.executionPath.shift();let w,I=await Promise.all(Q.steps.map(async(C,k)=>{let S=K[C.step.id];if(S&&S.status!=="running")return S;if(!S&&(O||V))return{};let T=await $.executeStep({workflowId:X,runId:G,resourceId:J,step:C.step,prevOutput:q,stepResults:K,serializedStepGraph:Z,restart:z,timeTravel:V,resume:H,executionContext:{activeStepsPath:A.activeStepsPath,workflowId:X,runId:G,executionPath:[...A.executionPath,k],stepExecutionPath:A.stepExecutionPath,suspendedPaths:A.suspendedPaths,resumeLabels:A.resumeLabels,retryConfig:A.retryConfig,state:A.state,tracingIds:A.tracingIds},...g4({currentSpan:R}),pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,perStep:O});return $.applyMutableContext(A,T.mutableContext),Object.assign(K,T.stepResults),T.result})),P=I.find((C)=>C.status==="failed"),_=I.find((C)=>C.status==="suspended");if(P)w={status:"failed",error:P.error,tripwire:P.tripwire};else if(_)w={status:"suspended",suspendPayload:_.suspendPayload,..._.suspendOutput?{suspendOutput:_.suspendOutput}:{}};else if(N?.signal?.aborted)w={status:"canceled"};else w={status:"success",output:I.reduce((C,k,S)=>{if(k.status==="success")C[Q.steps[S].step.id]=k.output;return C},{})};if(w.status==="failed")await $.errorChildSpan({span:R,operationId:`workflow.${X}.run.${G}.parallel.${A.executionPath.join("-")}.span.error`,errorOptions:{error:w.error}});else await $.endChildSpan({span:R,operationId:`workflow.${X}.run.${G}.parallel.${A.executionPath.join("-")}.span.end`,endOptions:{output:w.output||w}});return w}async function _89($,Y){let{workflowId:X,runId:G,resourceId:J,entry:Q,prevOutput:W,serializedStepGraph:Z,stepResults:K,resume:H,restart:z,timeTravel:V,executionContext:A,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,perStep:O,...E}=Y,M=$4(E),R=await $.createChildSpan({parentSpan:M.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.conditional.${A.executionPath.join("-")}.span.start`,options:{type:"workflow_conditional",name:`conditional: '${Q.conditions.length} conditions'`,input:W,attributes:{conditionCount:Q.conditions.length},tracingPolicy:$.options?.tracingPolicy},executionContext:A}),q,w=(await Promise.all(Q.conditions.map(async(k,S)=>{let T=await $.createChildSpan({parentSpan:R,operationId:`workflow.${X}.run.${G}.conditional.${A.executionPath.join("-")}.eval.${S}.span.start`,options:{type:"workflow_conditional_eval",name:`condition '${S}'`,input:W,attributes:{conditionIndex:S},tracingPolicy:$.options?.tracingPolicy},executionContext:A}),v=`workflow.${X}.conditional.${S}`,x=az({runId:G,workflowId:X,mastra:$.mastra,requestContext:D,inputData:W,state:A.state,retryCount:-1,...g4({currentSpan:T}),getInitData:()=>K?.input,getStepResult:sZ.bind(null,K),bail:()=>{},abort:()=>{N?.abort()},[VQ]:F,[MW]:A.format,engine:$.getEngineContext(),abortSignal:N?.signal,writer:new PW({prefix:"workflow-step",callId:M6(),name:"conditional",runId:G},L)},{paramName:"runCount",deprecationMessage:rz,logger:$.getLogger()});try{let y=await $.evaluateCondition(k,S,x,v);return await $.endChildSpan({span:T,operationId:`workflow.${X}.run.${G}.conditional.${A.executionPath.join("-")}.eval.${S}.span.end`,endOptions:{output:y!==null,attributes:{result:y!==null}}}),y}catch(y){let d=XG(y,{serializeStack:!1}),u=new G0({id:"WORKFLOW_CONDITION_EVALUATION_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",details:{workflowId:X,runId:G}},d);return $.getLogger()?.trackException(u),$.getLogger()?.error("Error evaluating condition: "+d.stack),await $.errorChildSpan({span:T,operationId:`workflow.${X}.run.${G}.conditional.${A.executionPath.join("-")}.eval.${S}.span.error`,errorOptions:{error:u,attributes:{result:!1}}}),null}}))).filter((k)=>k!==null),I=Q.steps.filter((k,S)=>w.includes(S));if(O||V&&V.executionPath.length>0){let S=I.filter((T)=>{let v=K[T.step.id];if(V&&V.executionPath.length>0)return V.steps[0]===T.step.id;return!v})?.[0];I=S?[S]:I}R?.update({attributes:{truthyIndexes:w,selectedSteps:I.map((k)=>k.type==="step"?k.step.id:`control-${k.type}`)}});let P=await Promise.all(I.map(async(k)=>{let S=K[k.step.id],T=z?!!z.activeStepsPath[k.step.id]:void 0;if(S&&V&&V.executionPath.length>0){if(V.steps[0]!==k.step.id)return S}if(S&&["success","failed"].includes(S.status)&&T===void 0)return S;let v=await $.executeStep({workflowId:X,runId:G,resourceId:J,step:k.step,prevOutput:W,stepResults:K,serializedStepGraph:Z,resume:H,restart:z,timeTravel:V,executionContext:{workflowId:X,runId:G,executionPath:[...A.executionPath,Q.steps.indexOf(k)],stepExecutionPath:A.stepExecutionPath,activeStepsPath:A.activeStepsPath,suspendedPaths:A.suspendedPaths,resumeLabels:A.resumeLabels,retryConfig:A.retryConfig,state:A.state,tracingIds:A.tracingIds},...g4({currentSpan:R}),pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,perStep:O});return $.applyMutableContext(A,v.mutableContext),Object.assign(K,v.stepResults),v.result})),_=P.find((k)=>k.status==="failed"),C=P.find((k)=>k.status==="suspended");if(_)q={status:"failed",error:_.error,tripwire:_.tripwire};else if(C)q={status:"suspended",suspendPayload:C.suspendPayload,...C.suspendOutput?{suspendOutput:C.suspendOutput}:{},suspendedAt:C.suspendedAt};else if(N?.signal?.aborted)q={status:"canceled"};else q={status:"success",output:P.reduce((k,S,T)=>{if(S.status==="success")k[I[T].step.id]=S.output;return k},{})};if(q.status==="failed")await $.errorChildSpan({span:R,operationId:`workflow.${X}.run.${G}.conditional.${A.executionPath.join("-")}.span.error`,errorOptions:{error:q.error}});else await $.endChildSpan({span:R,operationId:`workflow.${X}.run.${G}.conditional.${A.executionPath.join("-")}.span.end`,endOptions:{output:q.output||q}});return q}async function j89($,Y){let{workflowId:X,runId:G,resourceId:J,entry:Q,prevOutput:W,stepResults:Z,resume:K,restart:H,timeTravel:z,executionContext:V,pubsub:A,abortController:F,requestContext:N,outputWriter:D,disableScorers:L,serializedStepGraph:B,perStep:O,...E}=Y,M=$4(E),{step:R,condition:q}=Q,w=await $.createChildSpan({parentSpan:M.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.start`,options:{type:"workflow_loop",name:`loop: '${Q.loopType}'`,input:W,attributes:{loopType:Q.loopType},tracingPolicy:$.options?.tracingPolicy},executionContext:V}),I=!0,P=Z[R.id]?.metadata?.iterationCount,_=P?P-1:0,C=Z[R.id],S={status:"success",output:C&&Object.prototype.hasOwnProperty.call(C,"payload")?C.payload:W},T=K,v=H,x=z;do{if(F?.signal?.aborted)return await $.endChildSpan({span:w,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.end.early`,endOptions:{attributes:{totalIterations:_}}}),{status:"canceled"};let y=await $.executeStep({workflowId:X,runId:G,resourceId:J,step:R,stepResults:Z,executionContext:V,restart:v,resume:T,timeTravel:x,prevOutput:S.output,...g4({currentSpan:w}),pubsub:A,abortController:F,requestContext:N,outputWriter:D,disableScorers:L,serializedStepGraph:B,iterationCount:_+1,perStep:O});if($.applyMutableContext(V,y.mutableContext),Object.assign(Z,y.stepResults),S=y.result,v=void 0,x=void 0,T&&S.status!=="suspended")T=void 0;if(S.status!=="success")return await $.endChildSpan({span:w,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.end.early`,endOptions:{attributes:{totalIterations:_}}}),S;if(F?.signal?.aborted)return await $.endChildSpan({span:w,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.end.early`,endOptions:{attributes:{totalIterations:_+1}}}),{status:"canceled"};let d=await $.createChildSpan({parentSpan:w,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.eval.${_}.span.start`,options:{type:"workflow_conditional_eval",name:`condition: '${Q.loopType}'`,input:Nx0(S.output,["stepResult","output.text","output.object","messages"]),attributes:{conditionIndex:_},tracingPolicy:$.options?.tracingPolicy},executionContext:V});if(I=await q(az({workflowId:X,runId:G,mastra:$.mastra,requestContext:N,inputData:S.output,state:V.state,retryCount:-1,...g4({currentSpan:d}),iterationCount:_+1,getInitData:()=>Z?.input,getStepResult:sZ.bind(null,Z),bail:()=>{},abort:()=>{F?.abort()},[VQ]:A,[MW]:V.format,engine:$.getEngineContext(),abortSignal:F?.signal,writer:new PW({prefix:"workflow-step",callId:M6(),name:"loop",runId:G},D)},{paramName:"runCount",deprecationMessage:rz,logger:$.getLogger()})),await $.endChildSpan({span:d,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.eval.${_}.span.end`,endOptions:{output:I}}),_++,F?.signal?.aborted)return await $.endChildSpan({span:w,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.end.early`,endOptions:{attributes:{totalIterations:_}}}),{status:"canceled"}}while(Q.loopType==="dowhile"?I:!I);return await $.endChildSpan({span:w,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.end`,endOptions:{output:S.output,attributes:{totalIterations:_}}}),S}async function T89($,Y){let{workflowId:X,runId:G,resourceId:J,entry:Q,prevOutput:W,stepResults:Z,restart:K,resume:H,timeTravel:z,executionContext:V,pubsub:A,abortController:F,requestContext:N,outputWriter:D,disableScorers:L,serializedStepGraph:B,perStep:O,...E}=Y,M=$4(E),{step:R,opts:q}=Q,w=[],I=q.concurrency,P=H?.steps[0]===R.id?void 0:Date.now(),_=H?.steps[0]===R.id?Date.now():void 0,C={...Z[R.id],...H?.steps[0]===R.id?{resumePayload:H?.resumePayload}:{payload:W},...P?{startedAt:P}:{},..._?{resumedAt:_}:{}},k=await $.createChildSpan({parentSpan:M.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.start`,options:{type:"workflow_loop",name:"loop: 'foreach'",input:W,attributes:{loopType:"foreach",concurrency:I},tracingPolicy:$.options?.tracingPolicy},executionContext:V});await A.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-start",payload:{id:R.id,...C,status:"running"}}});let S=Z[R.id],T={},v=S?.status==="suspended"?S?.suspendPayload?.__workflow_meta?.foreachIndex||0:0,x=S?.suspendPayload?.__workflow_meta?.foreachOutput||[],y=S?.suspendPayload?.__workflow_meta?.resumeLabels||{},d=d24(y,R.id),u=W.length,b=0,g=null,p=null,h=null,n=0,t,s=(Y0,K0,A0)=>A.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-progress",payload:{id:R.id,completedCount:b,totalCount:u,currentIndex:Y0,iterationStatus:K0,...A0!==void 0?{iterationOutput:A0}:{}}}}),Z0=()=>{n-=m.length(),m.kill()},X0=(Y0,K0,A0)=>$.executeStep({workflowId:X,runId:G,resourceId:J,step:R,stepResults:Z,restart:K,timeTravel:z,executionContext:{...V,foreachIndex:K0},resume:A0,prevOutput:Y0,...g4({currentSpan:k}),pubsub:A,abortController:F,requestContext:N,skipEmits:!0,outputWriter:D,disableScorers:L,serializedStepGraph:B,perStep:O}),a=async(Y0,K0)=>{if(Y0.status==="suspended"){if(!T[K0])T[K0]={status:Y0.status,suspendPayload:Y0.suspendPayload,suspendedAt:Y0.suspendedAt};await s(K0,"suspended")}else if(Y0.status==="failed"){if(b++,await s(K0,"failed"),!g)g=Y0}else if(Y0.status!=="success"){if(b++,await s(K0,"failed"),!p)p=Y0}Z0()},Q0=async(Y0,K0)=>{b++,await s(K0,"success",Y0.output);let A0=Object.keys(d).find((D0)=>d[D0]?.foreachIndex===K0);if(A0!==void 0)delete d[A0]},m=F24.default(async(Y0,K0)=>{let{item:A0,k:D0,resumeToUse:O0}=Y0;try{if(F?.signal?.aborted){if(!h)h={...C,status:"canceled",output:w,endedAt:Date.now()};if(Z0(),n--,K0(null),n===0)t?.();return}let R0=await X0(A0,D0,O0);$.applyMutableContext(V,R0.mutableContext),Object.assign(Z,R0.stepResults);let I0=R0.result;if(I0.status!=="success")await a(I0,D0);else await Q0(I0,D0);if(I0.status==="success"&&I0.output!==void 0)w[D0]=I0.output;x[D0]=I0.status==="suspended"?I0:{...I0,suspendPayload:{}}}catch(R0){if(!g)g={status:"failed",error:R0 instanceof Error?R0:Error(String(R0)),payload:void 0,startedAt:Date.now(),endedAt:Date.now()};Z0()}if(n--,K0(null),n===0)t?.()},I);for(let Y0=0;Y0<W.length;Y0++){let K0=x[Y0];if(K0?.status==="success"||K0?.status==="suspended"&&H?.forEachIndex!==Y0&&H?.forEachIndex!==void 0){if(K0?.status==="success"){let D0=Object.keys(d).find((O0)=>d[O0]?.foreachIndex===Y0);if(D0!==void 0)delete d[D0]}else T[Y0]={status:K0.status,suspendPayload:K0.suspendPayload,suspendedAt:K0.suspendedAt};if(K0.status==="success"&&K0.output!==void 0)w[Y0]=K0.output;x[Y0]=K0.status==="suspended"?K0:{...K0,suspendPayload:{}};continue}let A0=void 0;if(H?.forEachIndex!==void 0)A0=H.forEachIndex===Y0?H:void 0;else if(K0?.status==="suspended"||v===Y0)A0=H;n++,m.push({item:W[Y0],k:Y0,resumeToUse:A0})}if(n>0)await new Promise((Y0)=>{t=Y0});if(h)return await $.endChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.end.early`,endOptions:{output:w}}),h;if(F?.signal?.aborted)return await $.endChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.end.early`,endOptions:{output:w}}),{...C,status:"canceled",output:w,endedAt:Date.now()};let $0=g;if($0){let Y0={status:$0.status,error:$0.error,suspendPayload:$0.suspendPayload,suspendedAt:$0.suspendedAt,endedAt:$0.endedAt};return await $.errorChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.error`,errorOptions:{error:$0.error}}),await A.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-result",payload:{id:R.id,...Y0}}}),await A.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-finish",payload:{id:R.id,metadata:{}}}}),$0}if(p)return await $.endChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.end.early`,endOptions:{output:"output"in p?p.output:void 0}}),await A.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-result",payload:{id:R.id,...p}}}),await A.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-finish",payload:{id:R.id,metadata:{}}}}),p;if(Object.keys(T).length>0){let K0=Object.keys(T).map(Number)[0];return await $.endChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.end`,endOptions:{output:T[K0]}}),await A.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-suspended",payload:{id:R.id,...T[K0]}}}),V.suspendedPaths[R.id]=V.executionPath,V.resumeLabels={...d,...V.resumeLabels},{...C,suspendedAt:Date.now(),status:"suspended",...T[K0].suspendOutput?{suspendOutput:T[K0].suspendOutput}:{},suspendPayload:{...T[K0].suspendPayload,__workflow_meta:{...T[K0].suspendPayload?.__workflow_meta,foreachIndex:K0,foreachOutput:x,resumeLabels:V.resumeLabels}}}}return await A.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-result",payload:{id:R.id,status:"success",output:w,endedAt:Date.now()}}}),await A.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-finish",payload:{id:R.id,metadata:{}}}}),await $.endChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.end`,endOptions:{output:w}}),{...C,status:"success",output:w,endedAt:Date.now()}}function eZ4($,Y,X,G){let J=G?.onlyExecutedSteps?$.filter((Z)=>Z.type==="step"&&Y[Z.step.id]!==void 0):$,Q=J.every((Z)=>{if(Z.type==="step"){let K=Y[Z.step.id];return K&&K.status==="success"}return!0}),W;if(Q)W={status:"success",output:$.reduce((Z,K)=>{if(K.type==="step"){let H=Y[K.step.id];if(H&&H.status==="success")Z[K.step.id]=H.output}return Z},{})};else{let Z=J.find((K)=>K.type==="step"&&Y[K.step.id]?.status==="failed");if(Z&&Z.type==="step"){let K=Y[Z.step.id];W={status:"failed",error:K?.error??Error("Workflow step failed after resume"),tripwire:K?.tripwire}}else{let K=$.find((z)=>z.type==="step"&&Y[z.step.id]?.status==="suspended"),H=K&&K.type==="step"?Y[K.step.id]?.suspendPayload:{};W={status:"suspended",payload:H,suspendPayload:H,suspendedAt:Date.now()}}}if(W.status==="suspended")$.forEach((Z,K)=>{if(Z.type==="step"&&Y[Z.step.id]?.status==="suspended")X.suspendedPaths[Z.step.id]=[...X.executionPath,K]});return W}function $g0({isResumedStep:$,stepId:Y,stepResults:X,prevOutput:G}){if(!$)return G;let J=X[Y];return J&&Object.prototype.hasOwnProperty.call(J,"payload")?J.payload:G}async function C89($,Y){let{workflowId:X,runId:G,resourceId:J,stepResults:Q,serializedStepGraph:W,executionContext:Z,workflowStatus:K,result:H,error:z,requestContext:V,tracingContext:A}=Y,F=`workflow.${X}.run.${G}.path.${JSON.stringify(Z.executionPath)}.stepUpdate`;await $.wrapDurableOperation(F,async()=>{if(!$.options?.shouldPersistSnapshot?.({stepResults:Q,workflowStatus:K}))return;let D=$.serializeRequestContext(V);await(await $.mastra?.getStorage()?.getStore("workflows"))?.persistWorkflowSnapshot({workflowName:X,runId:G,resourceId:J,snapshot:{runId:G,status:K,value:Z.state,context:Q,activePaths:Z.executionPath,stepExecutionPath:Z.stepExecutionPath,activeStepsPath:Z.activeStepsPath,serializedStepGraph:W,suspendedPaths:Z.suspendedPaths,waitingPaths:{},resumeLabels:Z.resumeLabels,result:H,error:z,requestContext:D,timestamp:Date.now(),tracingContext:A}})})}async function Hg0($,Y){let{workflowId:X,runId:G,resourceId:J,entry:Q,prevStep:W,serializedStepGraph:Z,stepResults:K,restart:H,timeTravel:z,resume:V,executionContext:A,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,perStep:O,...E}=Y,M=$4(E),R=$.getStepOutput(K,W),q,w;if(Q.type==="step"){let I=V?.steps?.includes(Q.step.id)??!1;if(!I)A.stepExecutionPath?.push(Q.step.id);let{step:P}=Q,_=$g0({isResumedStep:I,stepId:P.id,stepResults:K,prevOutput:R}),C=await $.executeStep({workflowId:X,runId:G,resourceId:J,step:P,stepResults:K,executionContext:A,timeTravel:z,restart:H,resume:V,prevOutput:_,...M,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,serializedStepGraph:Z,perStep:O});q=C.result,$.applyMutableContext(A,C.mutableContext),Object.assign(K,C.stepResults),w=C.requestContext}else if(V?.resumePath?.length&&Q.type==="parallel"){let I=V.resumePath.shift(),P=await Hg0($,{workflowId:X,runId:G,resourceId:J,entry:Q.steps[I],prevStep:W,serializedStepGraph:Z,stepResults:K,resume:V,executionContext:{workflowId:X,runId:G,executionPath:[...A.executionPath,I],stepExecutionPath:A.stepExecutionPath?[...A.stepExecutionPath]:void 0,suspendedPaths:A.suspendedPaths,resumeLabels:A.resumeLabels,retryConfig:A.retryConfig,activeStepsPath:A.activeStepsPath,state:A.state},...M,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,perStep:O});return $.applyMutableContext(A,P.mutableContext),Object.assign(K,P.stepResults),q=eZ4(Q.steps,K,A),{result:q,stepResults:K,mutableContext:$.buildMutableContext(A),requestContext:P.requestContext}}else if(Q.type==="parallel")q=await $.executeParallel({workflowId:X,runId:G,resourceId:J,entry:Q,prevStep:W,stepResults:K,serializedStepGraph:Z,timeTravel:z,restart:H,resume:V,executionContext:A,...M,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,perStep:O});else if(V?.resumePath?.length&&Q.type==="conditional"){let I=V.resumePath.shift(),P=Q.steps[I],_;if(P.type!=="step")_=await Hg0($,{workflowId:X,runId:G,resourceId:J,entry:P,prevStep:W,serializedStepGraph:Z,stepResults:K,resume:V,executionContext:{workflowId:X,runId:G,executionPath:[...A.executionPath,I],stepExecutionPath:A.stepExecutionPath?[...A.stepExecutionPath]:void 0,suspendedPaths:A.suspendedPaths,resumeLabels:A.resumeLabels,retryConfig:A.retryConfig,activeStepsPath:A.activeStepsPath,state:A.state},...M,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,perStep:O});else{let C=$g0({isResumedStep:!0,stepId:P.step.id,stepResults:K,prevOutput:R});_=await $.executeStep({workflowId:X,runId:G,resourceId:J,step:P.step,prevOutput:C,stepResults:K,serializedStepGraph:Z,resume:V,restart:H,timeTravel:z,executionContext:{workflowId:X,runId:G,executionPath:[...A.executionPath,I],stepExecutionPath:A.stepExecutionPath?[...A.stepExecutionPath]:void 0,suspendedPaths:A.suspendedPaths,resumeLabels:A.resumeLabels,retryConfig:A.retryConfig,activeStepsPath:A.activeStepsPath,state:A.state},...M,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,perStep:O})}return $.applyMutableContext(A,_.mutableContext),Object.assign(K,_.stepResults),q=eZ4(Q.steps,K,A,{onlyExecutedSteps:!0}),{result:q,stepResults:K,mutableContext:$.buildMutableContext(A),requestContext:_.requestContext}}else if(Q.type==="conditional")q=await $.executeConditional({workflowId:X,runId:G,resourceId:J,entry:Q,prevOutput:R,stepResults:K,serializedStepGraph:Z,timeTravel:z,restart:H,resume:V,executionContext:A,...M,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,perStep:O});else if(Q.type==="loop")q=await $.executeLoop({workflowId:X,runId:G,resourceId:J,entry:Q,prevStep:W,prevOutput:R,stepResults:K,timeTravel:z,restart:H,resume:V,executionContext:A,...M,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,serializedStepGraph:Z,perStep:O});else if(Q.type==="foreach"){let I=$g0({isResumedStep:V?.steps?.includes(Q.step.id)??!1,stepId:Q.step.id,stepResults:K,prevOutput:R});q=await $.executeForeach({workflowId:X,runId:G,resourceId:J,entry:Q,prevStep:W,prevOutput:I,stepResults:K,timeTravel:z,restart:H,resume:V,executionContext:A,...M,pubsub:F,abortController:N,requestContext:D,outputWriter:L,disableScorers:B,serializedStepGraph:Z,perStep:O})}else if(Q.type==="sleep"){A.stepExecutionPath?.push(Q.id);let I=Date.now(),P=`workflow.${X}.run.${G}.sleep.${Q.id}.waiting_ev`;await $.wrapDurableOperation(P,async()=>{await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-waiting",payload:{id:Q.id,payload:R,startedAt:I,status:"waiting"}}})}),K[Q.id]={status:"waiting",payload:R,startedAt:I},A.activeStepsPath[Q.id]=A.executionPath,await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:Z,stepResults:K,executionContext:A,workflowStatus:"waiting",requestContext:D}),await $.executeSleep({workflowId:X,runId:G,entry:Q,prevStep:W,prevOutput:R,stepResults:K,serializedStepGraph:Z,resume:V,executionContext:A,...M,pubsub:F,abortController:N,requestContext:D,outputWriter:L}),delete A.activeStepsPath[Q.id],await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:Z,stepResults:K,executionContext:A,workflowStatus:"running",requestContext:D});let _=Date.now(),C={payload:R,startedAt:I,endedAt:_};q={...C,status:"success",output:R},K[Q.id]={...C,status:"success",output:R};let k=`workflow.${X}.run.${G}.sleep.${Q.id}.result_ev`;await $.wrapDurableOperation(k,async()=>{await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-result",payload:{id:Q.id,endedAt:_,status:"success",output:R}}}),await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-finish",payload:{id:Q.id,metadata:{}}}})})}else if(Q.type==="sleepUntil"){A.stepExecutionPath?.push(Q.id);let I=Date.now(),P=`workflow.${X}.run.${G}.sleepUntil.${Q.id}.waiting_ev`;await $.wrapDurableOperation(P,async()=>{await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-waiting",payload:{id:Q.id,payload:R,startedAt:I,status:"waiting"}}})}),K[Q.id]={status:"waiting",payload:R,startedAt:I},A.activeStepsPath[Q.id]=A.executionPath,await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:Z,stepResults:K,executionContext:A,workflowStatus:"waiting",requestContext:D}),await $.executeSleepUntil({workflowId:X,runId:G,entry:Q,prevStep:W,prevOutput:R,stepResults:K,serializedStepGraph:Z,resume:V,executionContext:A,...M,pubsub:F,abortController:N,requestContext:D,outputWriter:L}),delete A.activeStepsPath[Q.id],await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:Z,stepResults:K,executionContext:A,workflowStatus:"running",requestContext:D});let _=Date.now(),C={payload:R,startedAt:I,endedAt:_};q={...C,status:"success",output:R},K[Q.id]={...C,status:"success",output:R};let k=`workflow.${X}.run.${G}.sleepUntil.${Q.id}.result_ev`;await $.wrapDurableOperation(k,async()=>{await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-result",payload:{id:Q.id,endedAt:_,status:"success",output:R}}}),await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-finish",payload:{id:Q.id,metadata:{}}}})})}if(Q.type==="step"||Q.type==="loop"||Q.type==="foreach")K[Q.step.id]=q;if(N?.signal?.aborted)q={...q,status:"canceled"};if(await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:Z,stepResults:K,executionContext:A,workflowStatus:q.status==="success"?"running":q.status,requestContext:D}),q.status==="canceled")await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-canceled",payload:{}}});return{result:q,stepResults:K,mutableContext:$.buildMutableContext(A),requestContext:w??$.serializeRequestContext(D)}}async function S89($,Y){let{workflowId:X,runId:G,entry:J,prevOutput:Q,stepResults:W,pubsub:Z,abortController:K,requestContext:H,executionContext:z,outputWriter:V,...A}=Y,F=$4(A),{duration:N,fn:D}=J,L=await $.createChildSpan({parentSpan:F.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.sleep.${J.id}.span.start`,options:{type:"workflow_sleep",name:`sleep: ${N?`${N}ms`:"dynamic"}`,attributes:{durationMs:N,sleepType:D?"dynamic":"fixed"}},executionContext:z});if(D){let B=M6();N=await $.wrapDurableOperation(`workflow.${X}.sleep.${J.id}`,async()=>{return D({runId:G,workflowId:X,mastra:$.mastra,requestContext:H,inputData:Q,state:z.state,setState:async(O)=>{z.state=O},retryCount:-1,...g4({currentSpan:L}),getInitData:()=>W?.input,getStepResult:sZ.bind(null,W),suspend:async(O)=>{},bail:()=>{},abort:()=>{K?.abort()},[VQ]:Z,[MW]:z.format,engine:$.getEngineContext(),abortSignal:K?.signal,writer:new PW({prefix:"workflow-step",callId:B,name:"sleep",runId:G},V)})}),L?.update({attributes:{durationMs:N}})}try{await $.executeSleepDuration(!N||N<0?0:N,J.id,X),await $.endChildSpan({span:L,operationId:`workflow.${X}.run.${G}.sleep.${J.id}.span.end`})}catch(B){throw await $.errorChildSpan({span:L,operationId:`workflow.${X}.run.${G}.sleep.${J.id}.span.error`,errorOptions:{error:B}}),B}}async function k89($,Y){let{workflowId:X,runId:G,entry:J,prevOutput:Q,stepResults:W,pubsub:Z,abortController:K,requestContext:H,executionContext:z,outputWriter:V,...A}=Y,F=$4(A),{date:N,fn:D}=J,L=await $.createChildSpan({parentSpan:F.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.sleepUntil.${J.id}.span.start`,options:{type:"workflow_sleep",name:`sleepUntil: ${N?N.toISOString():"dynamic"}`,attributes:{untilDate:N,durationMs:N?Math.max(0,N.getTime()-Date.now()):void 0,sleepType:D?"dynamic":"fixed"}},executionContext:z});if(D){let B=M6(),O=await $.wrapDurableOperation(`workflow.${X}.sleepUntil.${J.id}`,async()=>{return D({runId:G,workflowId:X,mastra:$.mastra,requestContext:H,inputData:Q,state:z.state,setState:async(M)=>{z.state=M},retryCount:-1,...g4({currentSpan:L}),getInitData:()=>W?.input,getStepResult:sZ.bind(null,W),suspend:async(M)=>{},bail:()=>{},abort:()=>{K?.abort()},[VQ]:Z,[MW]:z.format,engine:$.getEngineContext(),abortSignal:K?.signal,writer:new PW({prefix:"workflow-step",callId:B,name:"sleepUntil",runId:G},V)})});N=O instanceof Date?O:new Date(O);let E=!N?0:N.getTime()-Date.now();L?.update({attributes:{durationMs:Math.max(0,E)}})}if(!N){await $.endChildSpan({span:L,operationId:`workflow.${X}.run.${G}.sleepUntil.${J.id}.span.end.nodate`});return}try{await $.executeSleepUntilDate(N,J.id,X),await $.endChildSpan({span:L,operationId:`workflow.${X}.run.${G}.sleepUntil.${J.id}.span.end`})}catch(B){throw await $.errorChildSpan({span:L,operationId:`workflow.${X}.run.${G}.sleepUntil.${J.id}.span.error`,errorOptions:{error:B}}),B}}async function v89($,Y){let{workflowId:X,runId:G,resourceId:J,step:Q,stepResults:W,executionContext:Z,restart:K,resume:H,timeTravel:z,prevOutput:V,pubsub:A,abortController:F,requestContext:N,skipEmits:D=!1,outputWriter:L,disableScorers:B,serializedStepGraph:O,iterationCount:E,perStep:M,...R}=Y,q=$4(R),w=M6(),{inputData:I,validationError:P}=await W80({prevOutput:V,step:Q,validateInputs:$.options?.validateInputs??!0}),{validationError:_}=await p24({requestContext:N,step:Q,validateInputs:$.options?.validateInputs??!0}),C=P||_,{resumeData:k,validationError:S}=await Z80({resumeData:z?.stepResults[Q.id]?.status==="suspended"?z?.resumeData:void 0,step:Q}),T;if(k&&!S)T=k;else if(k&&S)$.getLogger().warn("Time travel resume data validation failed",{stepId:Q.id,error:S.message});else if(H?.steps[0]===Q.id)T=H?.resumePayload;let v=W[Q.id]?.status==="suspended"?W[Q.id]?.suspendPayload:void 0;if(v&&"__workflow_meta"in v){let{__workflow_meta:Z0,...X0}=v;v=X0}let x=T?void 0:Date.now(),y=T?Date.now():void 0,d={...W[Q.id],...T?{resumePayload:T}:{payload:I},...x?{startedAt:x}:{},...y?{resumedAt:y}:{},status:"running",...E?{metadata:{iterationCount:E}}:{}};Z.activeStepsPath[Q.id]=Z.executionPath;let u=await $.createStepSpan({parentSpan:q.tracingContext.currentSpan,stepId:Q.id,operationId:`workflow.${X}.run.${G}.step.${Q.id}.span.start`,options:{name:`workflow step: '${Q.id}'`,type:"workflow_step",entityType:J6.WORKFLOW_STEP,entityId:Q.id,input:I,tracingPolicy:$.options?.tracingPolicy,requestContext:N},executionContext:Z}),b=`workflow.${X}.run.${G}.step.${Q.id}.running_ev`;if(await $.onStepExecutionStart({step:Q,inputData:I,pubsub:A,executionContext:Z,stepCallId:w,stepInfo:d,operationId:b,skipEmits:D}),await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:O,stepResults:{...W,[Q.id]:d},executionContext:Z,workflowStatus:"running",requestContext:N}),$.isNestedWorkflowStep(Q)){let Z0=await $.executeWorkflowStep({step:Q,stepResults:W,executionContext:Z,resume:H,timeTravel:z,prevOutput:V,inputData:I,pubsub:A,startedAt:x??Date.now(),abortController:F,requestContext:N,...q,outputWriter:L,stepSpan:u,perStep:M});if(Z0!==null){if(u)if(Z0.status==="failed")await $.errorStepSpan({span:u,operationId:`workflow.${X}.run.${G}.step.${Q.id}.span.error`,errorOptions:{error:Z0.error instanceof Error?Z0.error:Error(String(Z0.error)),attributes:{status:"failed"}}});else{let a=Z0.status==="success"?Z0.output:Z0.suspendOutput;await $.endStepSpan({span:u,operationId:`workflow.${X}.run.${G}.step.${Q.id}.span.end`,endOptions:{output:a,attributes:{status:Z0.status}}})}let X0={...d,...Z0};return{result:X0,stepResults:{[Q.id]:X0},mutableContext:$.buildMutableContext(Z),requestContext:$.serializeRequestContext(N)}}}let g=async(Z0)=>{let X0=az(Z0,{paramName:"runCount",deprecationMessage:rz,logger:$.getLogger()});return DQ({span:u,fn:()=>Q.execute(X0)})},p,h=Q.retries??Z.retryConfig.attempts??0,n=Z.retryConfig.delay??0,t=await $.executeStepWithRetry(`workflow.${X}.step.${Q.id}`,async()=>{if(C)throw C;let Z0=$.getOrGenerateRetryCount(Q.id),X0=[];if(z&&z.steps.length>0)X0=z.steps[0]===Q.id?z.steps.slice(1):[];let a,Q0,e={suspendedPaths:{},resumeLabels:{},stateUpdate:null,requestContextUpdate:null},m=Q.component==="WORKFLOW",$0=$.mastra?m?$.mastra:vf($.mastra,{currentSpan:u}):void 0,Y0=await g({runId:G,resourceId:J,workflowId:X,mastra:$0,requestContext:N,inputData:I,state:Z.state,setState:async(D0)=>{let{stateData:O0,validationError:R0}=await u24({stateData:D0,step:Q,validateInputs:$.options?.validateInputs??!0});if(R0)throw R0;e.stateUpdate=O0},retryCount:Z0,resumeData:T,suspendData:v,...g4({currentSpan:u}),getInitData:()=>W?.input,getStepResult:sZ.bind(null,W),suspend:async(D0,O0)=>{let{suspendData:R0,validationError:I0}=await K80({suspendData:D0,step:Q,validateInputs:$.options?.validateInputs??!0});if(I0)throw I0;if(e.suspendedPaths[Q.id]=Z.executionPath,Z.suspendedPaths[Q.id]=Z.executionPath,O0?.resumeLabel){let g0=Array.isArray(O0.resumeLabel)?O0.resumeLabel:[O0.resumeLabel];for(let p0 of g0){let U4={stepId:Q.id,foreachIndex:Z.foreachIndex};e.resumeLabels[p0]=U4,Z.resumeLabels[p0]=U4}}a={payload:R0}},bail:(D0)=>{Q0={payload:D0}},abort:()=>{F?.abort()},resume:W[Q.id]?.status==="suspended"?{steps:H?.steps?.slice(1)||[],resumePayload:H?.resumePayload,runId:W[Q.id]?.suspendPayload?.__workflow_meta?.runId,label:H?.label,forEachIndex:H?.forEachIndex}:void 0,restart:!!K?.activeStepsPath?.[Q.id],timeTravel:X0.length>0?{inputData:z?.inputData,steps:X0,nestedStepResults:z?.nestedStepResults,resumeData:z?.resumeData}:void 0,[VQ]:A,[MW]:Z.format,engine:$.getEngineContext(),abortSignal:F?.signal,writer:new PW({prefix:"workflow-step",callId:w,name:Q.id,runId:G},L),outputWriter:L,scorers:B===!1?void 0:Q.scorers,validateInputs:$.options?.validateInputs,perStep:M});if($.requiresDurableContextSerialization())e.requestContextUpdate=$.serializeRequestContext(N);let A0=Q.component==="WORKFLOW"&&M;return{output:Y0,suspended:a,bailed:Q0,contextMutations:e,nestedWflowStepPaused:A0}},{retries:h,delay:n,stepSpan:u,workflowId:X,runId:G});if(!t.ok)p=t.error;else{let{result:Z0}=t;if(Object.assign(Z.suspendedPaths,Z0.contextMutations.suspendedPaths),Object.assign(Z.resumeLabels,Z0.contextMutations.resumeLabels),$.requiresDurableContextSerialization()&&Z0.contextMutations.requestContextUpdate){N.clear();for(let[X0,a]of Object.entries(Z0.contextMutations.requestContextUpdate))N.set(X0,a)}if(Q.scorers)await x89({engine:$,scorers:Q.scorers,runId:G,input:I,output:Z0.output,workflowId:X,stepId:Q.id,requestContext:N,disableScorers:B,...g4({currentSpan:u})});if(Z0.suspended)p={status:"suspended",suspendPayload:Z0.suspended.payload,...Z0.output?{suspendOutput:Z0.output}:{},suspendedAt:Date.now()};else if(Z0.bailed)p={status:"bailed",output:Z0.bailed.payload,endedAt:Date.now()};else if(Z0.nestedWflowStepPaused)p={status:"paused"};else p={status:"success",output:Z0.output,endedAt:Date.now()}}if(delete Z.activeStepsPath[Q.id],!D){let Z0=`workflow.${X}.run.${G}.step.${Q.id}.emit_result`;await $.wrapDurableOperation(Z0,async()=>{await y89({stepId:Q.id,stepCallId:w,execResults:{...d,...p},pubsub:A,runId:G})})}if(p.status!="failed")await $.endStepSpan({span:u,operationId:`workflow.${X}.run.${G}.step.${Q.id}.span.end`,endOptions:{output:p.output,attributes:{status:p.status}}});let s={...d,...p};return{result:s,stepResults:{[Q.id]:s},mutableContext:$.buildMutableContext({...Z,state:t.ok?t.result.contextMutations.stateUpdate??Z.state:Z.state}),requestContext:$.serializeRequestContext(N)}}async function x89($){let{engine:Y,scorers:X,runId:G,input:J,output:Q,workflowId:W,stepId:Z,requestContext:K,disableScorers:H,...z}=$,V=$4(z),A=X;if(typeof A==="function")try{A=await A({requestContext:K})}catch(F){let N=XG(F,{serializeStack:!1}),D=new G0({id:"WORKFLOW_FAILED_TO_FETCH_SCORERS",domain:"MASTRA_WORKFLOW",category:"USER",details:{runId:G,workflowId:W,stepId:Z}},N);Y.getLogger()?.trackException(D),Y.getLogger()?.error("Error fetching scorers: "+N?.stack)}if(!H&&A&&Object.keys(A||{}).length>0)for(let[F,N]of Object.entries(A||{})){if(Y.mastra)N.scorer.__registerMastra(Y.mastra),Y.mastra.addScorer(N.scorer,void 0,{source:"code"});f24({scorerId:N.scorer.id,scorerObject:N,runId:G,input:J,output:Q,requestContext:K,entity:{id:W,stepId:Z},structuredOutput:!0,source:"LIVE",entityType:"WORKFLOW",...V})}}async function y89($){let{stepId:Y,stepCallId:X,execResults:G,pubsub:J,runId:Q}=$,W=X?{id:Y,stepCallId:X}:{id:Y};if(G.status==="suspended")await J.publish(`workflow.events.v2.${Q}`,{type:"watch",runId:Q,data:{type:"workflow-step-suspended",payload:{...W,...G}}});else await J.publish(`workflow.events.v2.${Q}`,{type:"watch",runId:Q,data:{type:"workflow-step-result",payload:{...W,...G}}}),await J.publish(`workflow.events.v2.${Q}`,{type:"watch",runId:Q,data:{type:"workflow-step-finish",payload:{...W,metadata:{}}}})}async function Ev0({writer:$,chunk:Y}){if(!$)return;await $.write(Y)}function b89($){return $ instanceof RW}function h89($){return $!==null&&typeof $==="object"&&"id"in $&&"execute"in $&&!($ instanceof YJ)&&!($ instanceof RW)}function fj($,Y){if($===Y)return!0;if(!$||!Y)return $===Y;return $.length===Y.length&&$.every((X,G)=>JD(X,Y[G]))}function l24($,Y){for(let X of $){if("step"in X&&X.step?.id===Y)return X;if((X.type==="conditional"||X.type==="parallel")&&"steps"in X){let G=l24(X.steps,Y);if(G)return G}}return}function o9($,Y){if(G80($))return g89($,Y);if(b89($))return m89($,Y);if(h89($))return f89($);if(em($)){let X=u89($);return X.providesSkillDiscovery=$.providesSkillDiscovery,X}throw Error("Invalid input: expected StepParams, Agent, ToolStep, or Processor")}function f89($){let Y={id:$.id,description:$.description,inputSchema:$.inputSchema?W4($.inputSchema):$.inputSchema,stateSchema:$.stateSchema?W4($.stateSchema):void 0,outputSchema:$.outputSchema?W4($.outputSchema):$.outputSchema,resumeSchema:$.resumeSchema?W4($.resumeSchema):void 0,suspendSchema:$.suspendSchema?W4($.suspendSchema):void 0,requestContextSchema:$.requestContextSchema?W4($.requestContextSchema):void 0,scorers:$.scorers,retries:$.retries,metadata:$.metadata,execute:$.execute.bind($)},X=$;if(X.steps||X.children||X.stepGraph)Object.assign(Y,{steps:X.steps,children:X.children,stepGraph:X.stepGraph});return Y}function g89($,Y){let X=Y??{},G=W4(X?.structuredOutput?.schema??U.object({text:U.string()})),{retries:J,scorers:Q,metadata:W,...Z}=X??{};return{id:$.id,description:$.getDescription(),inputSchema:W4(U.object({prompt:U.string()})),outputSchema:W4(G),retries:J,scorers:Q,metadata:W,execute:async({inputData:K,runId:H,[VQ]:z,[MW]:V,requestContext:A,abortSignal:F,abort:N,writer:D,...L})=>{let B=$4(L),O={};O.promise=new Promise((I,P)=>{O.resolve=I,O.reject=P});let E=null,M={name:$.name,args:K},R,q=(I)=>{let P=I;if(Z?.structuredOutput?.schema&&P.object)E=P.object;O.resolve(I.text),Z?.onFinish?.(I)};if((await $.getModel()).specificationVersion==="v1"&&typeof $.streamLegacy==="function"){let{fullStream:I}=await $.streamLegacy(K.prompt,{...Z,requestContext:A,...B,onFinish:q,abortSignal:F});R=I}else{let I=await $.stream(K.prompt,{...Z,requestContext:A,...B,onFinish:q,abortSignal:F});I.text.then(O.resolve,O.reject),R=I.fullStream}let w=null;if(V==="legacy"){await z.publish(`workflow.events.v2.${H}`,{type:"watch",runId:H,data:{type:"tool-call-streaming-start",...M??{}}});for await(let I of R){if(I.type==="tripwire"){w=I;break}if(I.type==="text-delta")await z.publish(`workflow.events.v2.${H}`,{type:"watch",runId:H,data:{type:"tool-call-delta",...M??{},argsTextDelta:I.textDelta}})}await z.publish(`workflow.events.v2.${H}`,{type:"watch",runId:H,data:{type:"tool-call-streaming-finish",...M??{}}})}else for await(let I of R)if(await Ev0({writer:D,chunk:I}),I.type==="tripwire"){w=I;break}if(w)throw new u6(w.payload?.reason||"Agent tripwire triggered",{retry:w.payload?.retry,metadata:w.payload?.metadata},w.payload?.processorId);if(F.aborted)return N();if(E!==null)return E;return{text:await O.promise}},component:"AGENT"}}function m89($,Y){if(!$.inputSchema||!$.outputSchema)throw Error("Tool must have input and output schemas defined");return{id:$.id,description:$.description,inputSchema:$.inputSchema,outputSchema:$.outputSchema,resumeSchema:$.resumeSchema,suspendSchema:$.suspendSchema,retries:Y?.retries,scorers:Y?.scorers,metadata:Y?.metadata,execute:async({inputData:X,mastra:G,requestContext:J,suspend:Q,resumeData:W,runId:Z,workflowId:K,state:H,setState:z,...V})=>{let A=$4(V),F={mastra:G,requestContext:J,...A,resumeData:W,workflow:{runId:Z,suspend:Q,resumeData:W,workflowId:K,state:H,setState:z}};return $.execute(X,F)},component:"TOOL"}}function u89($){let Y=(W)=>{switch(W){case"input":return J6.INPUT_PROCESSOR;case"inputStep":return J6.INPUT_STEP_PROCESSOR;case"outputStream":case"outputResult":return J6.OUTPUT_PROCESSOR;case"outputStep":return J6.OUTPUT_STEP_PROCESSOR;default:return J6.OUTPUT_PROCESSOR}},X=(W)=>{switch(W){case"input":return"input processor";case"inputStep":return"input step processor";case"outputStream":return"output stream processor";case"outputResult":return"output processor";case"outputStep":return"output step processor";default:return"processor"}},G=(W)=>{switch(W){case"input":return!!$.processInput;case"inputStep":return!!$.processInputStep;case"outputStream":return!!$.processOutputStream;case"outputResult":return!!$.processOutputResult;case"outputStep":return!!$.processOutputStep;default:return!1}},J={id:`processor:${$.id}`,description:$.name??`Processor ${$.id}`,inputSchema:W4(Ng0),outputSchema:W4(X80),execute:async({inputData:W,requestContext:Z,tracingContext:K,outputWriter:H})=>{let z=W,{phase:V,messages:A,messageList:F,stepNumber:N,systemMessages:D,part:L,streamParts:B,state:O,result:E,finishReason:M,toolCalls:R,text:q,retryCount:w,model:I,tools:P,toolChoice:_,activeTools:C,providerOptions:k,modelSettings:S,structuredOutput:T,steps:v,usage:x,messageId:y,rotateResponseMessageId:d,processorStates:u,abortSignal:b}=z,g=(D0,O0)=>{throw new u6(D0||`Tripwire triggered by ${$.id}`,O0,$.id)},p=y,h=y,n=d?()=>{return h=d(),h}:void 0,t={text:"",usage:{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:"unknown",steps:[]},s=()=>{switch(V){case"input":return{messages:A??[],...D?{systemMessages:D}:{},...w!==void 0?{retryCount:w}:{}};case"inputStep":{let D0=lO(I),O0=WD(P),R0=nO(_,P),I0=iO(C,P);return{messages:A??[],...D?{systemMessages:D}:{},...N!==void 0?{stepNumber:N}:{},...h?{messageId:h}:{},...w!==void 0?{retryCount:w}:{},...D0?{model:D0}:{},...O0?{tools:O0}:{},...R0?{toolChoice:R0}:{},...I0?{activeTools:I0}:{}}}case"outputResult":{let D0=J80(E??t);return{messages:A??[],...D0?{result:D0}:{},...w!==void 0?{retryCount:w}:{}}}case"outputStep":return{messages:A??[],...D?{systemMessages:D}:{},...N!==void 0?{stepNumber:N}:{},...M!==void 0?{finishReason:M}:{},...q!==void 0?{text:q}:{},...R!==void 0?{toolCalls:R}:{},...w!==void 0?{retryCount:w}:{}};default:return}},Z0=(D0)=>{if(D0===null||typeof D0!=="object"||Array.isArray(D0))return D0;let O0=D0;switch(V){case"input":return{...Array.isArray(O0.messages)&&!fj(A,O0.messages)?{messages:O0.messages}:{},...Array.isArray(O0.systemMessages)&&!fj(D,O0.systemMessages)?{systemMessages:O0.systemMessages}:{}};case"inputStep":{let R0={};if(Array.isArray(O0.messages)&&!fj(A,O0.messages))R0.messages=O0.messages;if(Array.isArray(O0.systemMessages)&&!fj(D,O0.systemMessages))R0.systemMessages=O0.systemMessages;if(O0.messageId!==void 0&&O0.messageId!==p)R0.messageId=O0.messageId;if(O0.model!==void 0&&O0.model!==I){let I0=lO(O0.model);if(I0)R0.model=I0}if(O0.tools!==void 0&&O0.tools!==P){let I0=WD(O0.tools);if(I0)R0.tools=I0}if(O0.toolChoice!==void 0&&O0.toolChoice!==_){let I0=nO(O0.toolChoice,O0.tools??P);if(I0)R0.toolChoice=I0}if(O0.activeTools!==void 0&&O0.activeTools!==C){let I0=iO(O0.activeTools,O0.tools??P);if(I0)R0.activeTools=I0}if(O0.retryCount!==void 0&&O0.retryCount!==w)R0.retryCount=O0.retryCount;return R0}case"outputResult":case"outputStep":return{...Array.isArray(O0.messages)&&!fj(A,O0.messages)?{messages:O0.messages}:{},...Array.isArray(O0.systemMessages)&&!fj(D,O0.systemMessages)?{systemMessages:O0.systemMessages}:{}};default:return}};if(!G(V))return z;let X0=K?.currentSpan,a=V==="inputStep"||V==="outputStep"?X0?.findParent("model_step")||X0:X0?.findParent("agent_run")||X0,Q0=V!=="outputStream"?a?.createChildSpan({type:"processor_run",name:`${X(V)}: ${$.id}`,entityType:Y(V),entityId:$.id,entityName:$.name??$.id,input:s(),attributes:{processorExecutor:"workflow",processorIndex:$.processorIndex}}):void 0,e=g4(Q0?{currentSpan:Q0}:K),m=H?{custom:async(D0)=>{await H(D0)}}:void 0,$0;if(u){let D0=u.get($.id);if(!D0)D0=new ZD,u.set($.id,D0);$0=D0.customState}else $0=O??{};let Y0={abort:g,retryCount:w??0,requestContext:Z,...e,state:$0,writer:m,abortSignal:b,messageId:h,rotateResponseMessageId:n},K0={phase:V,messageList:F??(Array.isArray(A)?new l6().add(A,"input").addSystem(D??[]):void 0),stepNumber:N,systemMessages:D,streamParts:B,state:$0,processorStates:u,result:E,finishReason:M,toolCalls:R,text:q,retryCount:w,model:I,tools:P,toolChoice:_,activeTools:C,providerOptions:k,modelSettings:S,structuredOutput:T,steps:v,usage:x,messageId:h,rotateResponseMessageId:n};return(async(D0)=>{try{let O0=await DQ({span:Q0,fn:D0});return Q0?.end({output:Z0(O0)}),O0}catch(O0){if(O0 instanceof u6)Q0?.end({output:{tripwire:O0.message}});else Q0?.error({error:O0,endSpan:!0});throw O0}})(async()=>{switch(V){case"input":{if($.processInput){if(!K0.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processInput phase`});let D0=K0.messageList,O0=A.map((g0)=>g0.id),R0=D0.makeMessageSourceChecker(),I0=await $.processInput({...Y0,messages:A,messageList:D0,systemMessages:D??[]});if(I0 instanceof l6){if(I0!==D0)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...K0,messages:I0.get.all.db(),systemMessages:I0.getAllSystemMessages()}}else if(Array.isArray(I0))return A5.applyMessagesToMessageList(I0,D0,O0,R0,"input"),{...K0,messages:I0};else if(I0&&"messages"in I0&&"systemMessages"in I0){let g0=I0;return A5.applyMessagesToMessageList(g0.messages,D0,O0,R0,"input"),D0.replaceAllSystemMessages(g0.systemMessages),{...K0,messages:g0.messages,systemMessages:g0.systemMessages}}return{...K0,messages:A}}return{...K0,messages:A}}case"inputStep":{if($.processInputStep){if(!K0.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processInputStep phase`});let D0=K0.messageList,O0=A.map((p0)=>p0.id),R0=D0.makeMessageSourceChecker(),I0=await $.processInputStep({...Y0,messages:A,messageList:D0,stepNumber:N??0,systemMessages:D??[],model:I,tools:P,toolChoice:_,activeTools:C,providerOptions:k,modelSettings:S,structuredOutput:T,steps:v??[],messageId:h,rotateResponseMessageId:n}),g0=await A5.validateAndFormatProcessInputStepResult(I0,{messageList:D0,processor:$,stepNumber:N??0});if(g0.messages)A5.applyMessagesToMessageList(g0.messages,D0,O0,R0);if(g0.systemMessages)D0.replaceAllSystemMessages(g0.systemMessages);return{...K0,messages:A,...g0,...h?{messageId:g0.messageId??h}:{}}}return{...K0,messages:A}}case"outputStream":{if(L&&L.type.startsWith("data-")&&!$.processDataParts)return{...K0,part:L};if($.processOutputStream&&L){let D0=`__outputStreamSpan_${$.id}`,O0=$0,R0=O0[D0];if(!R0&&a)R0=a.createChildSpan({type:"processor_run",name:`output stream processor: ${$.id}`,entityType:J6.OUTPUT_PROCESSOR,entityId:$.id,entityName:$.name??$.id,attributes:{processorExecutor:"workflow",processorIndex:$.processorIndex}}),O0[D0]=R0;let I0=g4(R0?{currentSpan:R0}:Y0.tracingContext),g0;try{if(g0=await $.processOutputStream({...Y0,...I0,part:L,streamParts:B??[],state:O0,messageList:K0.messageList}),L&&L.type==="finish")R0?.end({output:{totalChunks:(B??[]).length}}),delete O0[D0]}catch(p0){if(p0 instanceof u6)R0?.end({output:{tripwire:p0.message}});else R0?.error({error:p0,endSpan:!0});throw delete O0[D0],p0}return{...K0,state:O0,part:g0}}return{...K0,part:L}}case"outputResult":{if($.processOutputResult){if(!K0.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processOutputResult phase`});let D0=A.map((g0)=>g0.id),O0=K0.messageList.makeMessageSourceChecker(),R0={text:"",usage:{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:"unknown",steps:[]},I0=await $.processOutputResult({...Y0,messages:A,messageList:K0.messageList,result:K0.result??R0});if(I0 instanceof l6){if(I0!==K0.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...K0,messages:I0.get.all.db(),systemMessages:I0.getAllSystemMessages()}}else if(Array.isArray(I0))return A5.applyMessagesToMessageList(I0,K0.messageList,D0,O0,"response"),{...K0,messages:I0};else if(I0&&"messages"in I0&&"systemMessages"in I0){let g0=I0;return A5.applyMessagesToMessageList(g0.messages,K0.messageList,D0,O0,"response"),K0.messageList.replaceAllSystemMessages(g0.systemMessages),{...K0,messages:g0.messages,systemMessages:g0.systemMessages}}return{...K0,messages:A}}return{...K0,messages:A}}case"outputStep":{if($.processOutputStep){if(!K0.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processOutputStep phase`});let D0=K0.messageList,O0=A.map((p0)=>p0.id),R0=D0.makeMessageSourceChecker(),I0={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},g0=await $.processOutputStep({...Y0,messages:A,messageList:D0,stepNumber:N??0,finishReason:M,toolCalls:R,text:q,usage:x??I0,systemMessages:D??[],steps:v??[]});if(g0 instanceof l6){if(g0!==D0)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...K0,messages:g0.get.all.db(),systemMessages:g0.getAllSystemMessages()}}else if(Array.isArray(g0))return A5.applyMessagesToMessageList(g0,D0,O0,R0,"response"),{...K0,messages:g0};else if(g0&&"messages"in g0&&"systemMessages"in g0){let p0=g0;return A5.applyMessagesToMessageList(p0.messages,D0,O0,R0,"response"),D0.replaceAllSystemMessages(p0.systemMessages),{...K0,messages:p0.messages,systemMessages:p0.systemMessages}}return{...K0,messages:A}}return{...K0,messages:A}}default:return{...K0,messages:A}}})},component:"PROCESSOR"},Q=$;if(typeof Q.getLoadedToolsForRequestContext==="function")J.getLoadedToolsForRequestContext=Q.getLoadedToolsForRequestContext.bind($);return J}function em($){return $!==null&&typeof $==="object"&&"id"in $&&typeof $.id==="string"&&!($ instanceof YJ)&&!($ instanceof RW)&&(typeof $.processInput==="function"||typeof $.processInputStep==="function"||typeof $.processOutputStream==="function"||typeof $.processOutputResult==="function"||typeof $.processOutputStep==="function"||typeof $.processAPIError==="function")}function Mv0($){zg0=$}function TQ($){if($.schedule){if(!zg0)throw new G0({id:"MASTRA_WORKFLOW_SCHEDULE_EVENTED_MODULE_NOT_LOADED",domain:"MASTRA_WORKFLOW",category:"USER",text:`Workflow "${$.id}" declares a schedule, which auto-promotes it to the evented execution engine, but the evented module has not been loaded. This usually means you imported \`createWorkflow\` from a deep path. Import from \`@mastra/core/workflows\` or add \`import '@mastra/core/workflows/evented';\` to your entry file.`,details:{workflowId:String($.id??"")}});return zg0($)}return new V80($)}function d89({_internal:$,controller:Y,runId:X,agentId:G}){return o9({id:"backgroundTaskCheckStep",inputSchema:fW,outputSchema:fW,execute:async({inputData:J,retryCount:Q})=>{let W=J,{threadId:Z,resourceId:K}=$||{},H=$?.backgroundTaskManager;if(!H)return W;let V=(await H?.listTasks({agentId:G,status:"running",threadId:Z,resourceId:K}))?.tasks;if(!V||V.length===0)return W;if($?.skipBgTaskWait)return{...W,backgroundTaskPending:!0};let A=V.map((L)=>L.id),F=$?.agentBackgroundConfig,N=$?.backgroundTaskManagerConfig,D=F?.waitTimeoutMs??N?.waitTimeoutMs;if(Q===0||!D)return{...W,backgroundTaskPending:!0};try{Y.enqueue({type:"background-task-progress",runId:X,from:"AGENT",payload:{taskIds:A,runningCount:V.length,elapsedMs:0}})}catch{}try{await H.waitForNextTask(A,{timeoutMs:D,onProgress:(L)=>{try{Y.enqueue({type:"background-task-progress",runId:X,from:"AGENT",payload:{taskIds:A,runningCount:V.length,elapsedMs:L}})}catch{}},progressIntervalMs:3000})}catch{return W}if(W.stepResult)W.stepResult.isContinued=!0;return{...W,backgroundTaskPending:!0}}})}async function M70($,Y,X){if(!X.structuredOutput?.schema)throw new G0({id:"STRUCTURED_OUTPUT_OPTIONS_REQUIRED",domain:"AGENT",category:"USER",text:"structuredOutput is required to use tryGenerateWithJsonFallback"});try{return await $.generate(Y,X)}catch(G){return console.warn("Error in tryGenerateWithJsonFallback. Attempting fallback.",G),await $.generate(Y,{...X,structuredOutput:{...X.structuredOutput,jsonPromptInjection:!0}})}}function Lg0($){let Y;if($?.memory?.thread){if(typeof $.memory.thread==="string")Y={id:$.memory.thread};else if(typeof $.memory.thread==="object"&&$.memory.thread.id)Y=$.memory.thread}if(!Y&&$?.threadId)Y={id:$.threadId};if($.overrideId)return{...Y||{},id:$.overrideId};return Y}async function $24($,Y){let X=Date.now();try{let G=await $.run({runId:Y.runId,input:Y,output:Y.primitiveResult,requestContext:Y.customContext}),J=typeof G.score==="number"?G.score:0,Q=typeof G.reason==="string"?G.reason:void 0;return{score:J,passed:J===1,reason:Q,scorerId:$.id,scorerName:$.name??$.id,duration:Date.now()-X}}catch(G){return{score:0,passed:!1,reason:`Scorer threw an error: ${G.message}`,scorerId:$.id,scorerName:$.name??$.id,duration:Date.now()-X}}}async function a24($,Y,X){let G=X?.strategy??"all",J=X?.parallel??!0,Q=X?.timeout??600000,W=Date.now(),Z=[],K=!1,H=new Promise((F)=>{setTimeout(()=>F("timeout"),Q)});if(J){let F=$.map((D)=>$24(D,Y)),N=await Promise.race([Promise.all(F),H]);if(N==="timeout"){K=!0;let D=await Promise.allSettled(F);for(let L of D)if(L.status==="fulfilled")Z.push(L.value)}else Z.push(...N)}else for(let F of $){if(Date.now()-W>Q){K=!0;break}let N=await $24(F,Y);if(Z.push(N),G==="all"&&!N.passed)break;if(G==="any"&&N.passed)break}let z=G==="all"?Z.length===$.length&&Z.every((F)=>F.passed):Z.some((F)=>F.passed),A=(Z.find((F)=>F.passed)||Z[0])?.reason;return{complete:z,completionReason:A,scorers:Z,totalDuration:Date.now()-W,timedOut:K}}async function c89($,Y){let X=await a24($.scorers||[],Y,{strategy:$.strategy,parallel:$.parallel,timeout:$.timeout});return await $.onComplete?.(X),X}function l89($,Y){let X=[];if(X.push("#### Completion Check Results"),X.push(""),X.push(`Overall: ${$.complete?"\u2705 COMPLETE":"\u274C NOT COMPLETE"}`),X.push(`Duration: ${$.totalDuration}ms`),$.timedOut)X.push("\u26A0\uFE0F Scoring timed out");X.push("");for(let G of $.scorers){if(X.push(`###### ${G.scorerName} (${G.scorerId})`),X.push(`Score: ${G.score} ${G.passed?"\u2705":"\u274C"}`),G.reason)X.push(`Reason: ${G.reason}`);X.push("")}if($.complete)X.push(`

\u2705 The task is complete.`);else if(Y)X.push(`

\u26A0\uFE0F Max iterations reached.`);else X.push(`

\uD83D\uDD04 Will continue working on the task.`);return X.join(`
`)}async function n89($,Y,X,G,J){let Q=Date.now(),W=Y.messages.map((H)=>{try{if(typeof H.content==="string")return null;let z=H.content.parts?.[0]?.type==="text"?H.content.parts?.[0]?.text:null;if(z?.includes('"isNetwork":true')){let V=JSON.parse(z);if(V.isNetwork)return`${V.primitiveType} "${V.primitiveId}"`}}catch{}return null}).filter(Boolean),Z=W.length>0?`

Primitives already executed: ${W.join(", ")}`:"",K=`
    The ${Y.selectedPrimitive.type} ${Y.selectedPrimitive.id} has contributed to the task.
    This is the result: ${ZE(Y.primitiveResult)}
    
    ${Z}

    You need to evaluate if the task is complete. Pay very close attention to the SYSTEM INSTRUCTIONS for when the task is considered complete. 
    Only return true if the task is complete according to the system instructions.
    Original task: ${Y.originalTask}

    If no primitive (type = 'none'), the task is complete because we can't run any primitive to further task completion.

    Also, if the ${Y.selectedPrimitive.type} ${Y.selectedPrimitive.id} has declined the tool call in its response, then the task is complete as the primitive tool-call was declined by the user.

    IMPORTANT: If the above result is from an AGENT PRIMITIVE and it is a suitable final result itself considering the original task, then finalResult should be an empty string or undefined.
    
    If the task is complete and the result is not from an AGENT PRIMITIVE, always generate a finalResult.
    IF the task is complete and the result is from an AGENT PRIMITIVE, but the AGENT PRIMITIVE response is not comprehensive enough to accomplish the user's original task, then generate a finalResult.

    IMPORTANT: The generated finalResult should not be the exact primitive result. You should craft a comprehensive response based on the message history.
    The finalResult field should be written in natural language.

    You must return this JSON shape:
    {
      "isComplete": boolean,
      "completionReason": string,
      "finalResult": string,
    }
  `;try{let H=await $.stream(K,{maxSteps:1,structuredOutput:{schema:i89},abortSignal:G,onAbort:J}),z="",V=0,{writer:A,stepId:F,runId:N}=X??{},D=A&&F&&N;if(D)await A.write({type:"routing-agent-text-start",payload:{runId:F},from:"NETWORK",runId:N});for await(let O of H.objectStream){if(O?.finalResult)z=O.finalResult;if(D){let E=z.slice(V);if(O?.isComplete&&E.length)await A.write({type:"routing-agent-text-delta",payload:{text:E},from:"NETWORK",runId:N}),V=z.length}}let B=(await H.getFullOutput()).object;return{score:B?.isComplete?1:0,passed:B?.isComplete??!1,reason:B?.completionReason,finalResult:B?.finalResult,scorerId:"default-completion",scorerName:"Default LLM Completion",duration:Date.now()-Q}}catch(H){return{score:0,passed:!1,reason:`LLM completion check failed: ${H.message}`,scorerId:"default-completion",scorerName:"Default LLM Completion",duration:Date.now()-Q}}}async function a89($,Y,X,G,J){let Q=`
    The task has been completed successfully.
    Original task: ${Y.originalTask}

    The ${Y.selectedPrimitive.type} ${Y.selectedPrimitive.id} produced this result:
    ${ZE(Y.primitiveResult)}

    IMPORTANT: If the above result is from an AGENT PRIMITIVE and it is a suitable final result itself considering the original task, then finalResult should be an empty string or undefined.
    You should evaluate if the above result is comprehensive enough to accomplish the user's original task.
    Otherwise, generate the finalResult object. If the result is not from an AGENT PRIMITIVE, always generate a finalResult.

    The generated finalResult should not be the exact primitive result. You should craft a comprehensive response based on the message history.
    The response should be written in natural language.

    Return JSON:
    {
      "finalResult": string,
    }
  `,W=await $.stream(Q,{maxSteps:1,structuredOutput:{schema:r89},abortSignal:G,onAbort:J}),Z="",K=0,{writer:H,stepId:z,runId:V}=X??{},A=H&&z&&V;if(A)await H.write({type:"routing-agent-text-start",payload:{runId:z},from:"NETWORK",runId:V});for await(let N of W.objectStream){if(N?.finalResult)Z=N.finalResult;if(A){let D=Z.slice(K);if(D.length)await H.write({type:"routing-agent-text-delta",payload:{text:D},from:"NETWORK",runId:V}),K=Z.length}}return(await W.getFullOutput()).object?.finalResult}async function Y24($,Y,X,G,J,Q){let W=`
    The task has been completed successfully.
    Original task: ${Y.originalTask}

    The ${Y.selectedPrimitive.type} ${Y.selectedPrimitive.id} produced this result:
    ${ZE(Y.primitiveResult)}

    Based on the task and result above, generate a structured response according to the provided schema.
    Use the conversation history and primitive results to craft the response.
  `,Z=await $.stream(W,{maxSteps:1,structuredOutput:X,abortSignal:J,onAbort:Q}),{writer:K,stepId:H,runId:z}=G??{},V=K&&H&&z;for await(let N of Z.objectStream)if(V&&N)await K.write({type:"network-object",payload:{object:N},from:"NETWORK",runId:z});let F=(await Z.getFullOutput()).object;if(V&&F)await K.write({type:"network-object-result",payload:{object:F},from:"NETWORK",runId:z});return{text:F?JSON.stringify(F):void 0,object:F}}async function s89($,Y,X){let G={iteration:Y.iteration,maxIterations:Y.maxIterations,messages:Y.messages,originalTask:Y.originalTask,selectedPrimitive:{id:"stream",type:"agent"},primitivePrompt:Y.originalTask,primitiveResult:Y.currentText,networkName:Y.agentName||Y.agentId||"stream",runId:Y.runId,threadId:Y.threadId,resourceId:Y.resourceId,customContext:{...Y.customContext,toolCalls:Y.toolCalls,toolResults:Y.toolResults,agentId:Y.agentId,agentName:Y.agentName}};return a24($,G,X)}function o89($,Y){let X=[];if(X.push("#### Completion Check Results"),X.push(""),X.push(`Overall: ${$.complete?"\u2705 COMPLETE":"\u274C NOT COMPLETE"}`),X.push(`Duration: ${$.totalDuration}ms`),$.timedOut)X.push("\u26A0\uFE0F Scoring timed out");X.push("");for(let G of $.scorers){if(X.push(`**${G.scorerName}** (${G.scorerId})`),X.push(`Score: ${G.score} ${G.passed?"\u2705":"\u274C"}`),G.reason)X.push(`Reason: ${G.reason}`);X.push("")}if($.complete)X.push("\u2705 The task is complete.");else if(Y)X.push("\u26A0\uFE0F Max iterations reached.");else X.push("\uD83D\uDD04 The task is not yet complete. Please continue working based on the feedback above.");return X.join(`
`)}function t89($){let{isTaskComplete:Y,maxSteps:X,messageList:G,requestContext:J,mastra:Q,controller:W,runId:Z,_internal:K,agentId:H,agentName:z}=$,V=0;return o9({id:"isTaskCompleteStep",inputSchema:fW,outputSchema:fW,execute:async({inputData:A})=>{if(V++,A.backgroundTaskPending)return A;if(!(Y?.scorers&&Y.scorers.length>0)||A.stepResult?.isContinued)return A;let N=A.output.toolCalls||[],D=(P)=>P==="updateWorkingMemory"||P==="update-working-memory";if(N.length>0&&N.every((P)=>D(P.toolName)))return A;let B=G.get.input.db()[0],O="Unknown task";if(B){if(typeof B.content==="string")O=B.content;else if(B.content?.parts?.[0]?.type==="text")O=B.content.parts[0].text}let E=A.output.toolCalls||[],M=A.output.toolResults||[],R={iteration:V,maxIterations:X,originalTask:O,currentText:A.output.text||"",toolCalls:E.map((P)=>({name:P.toolName,args:P.args||{}})),messages:G.get.all.db(),toolResults:M.map((P)=>({name:P.toolName,result:P.result})),agentId:H||"",agentName:z||"",runId:Z,threadId:K?.threadId,resourceId:K?.resourceId,customContext:J?Object.fromEntries(J.entries()):void 0},q=await s89(Y.scorers,R,{strategy:Y.strategy,parallel:Y.parallel,timeout:Y.timeout});if(Y.onComplete)await Y.onComplete(q);if(q.complete){if(A.stepResult)A.stepResult.isContinued=!1}else if(A.stepResult)A.stepResult.isContinued=!0;let w=X?V>=X:!1,I=o89(q,w);return G.add({id:Q?.generateId(),createdAt:new Date,type:"text",role:"assistant",content:{parts:[{type:"text",text:I}],metadata:{mode:"stream",completionResult:{passed:q.complete,suppressFeedback:!!Y.suppressFeedback}},format:2}},"response"),W.enqueue({type:"is-task-complete",runId:Z,from:"AGENT",payload:{iteration:V,passed:q.complete,results:q.scorers,duration:q.totalDuration,timedOut:q.timedOut,reason:q.completionReason,maxIterationReached:!!w,suppressFeedback:!!Y.suppressFeedback}}),{...A,isTaskCompleteCheckFailed:!q.complete}}})}function X24($,Y){if(!$)return Y;if(!Y)return $;return s24($,Y)}function G24($){if($===null||typeof $!=="object")return!1;let Y=Object.getPrototypeOf($);return Y===null||Y===Object.prototype}function s24($,Y){if(Y===void 0)return $;if($===void 0)return Y;if(G24($)&&G24(Y)){let X={...$};for(let G of Object.keys(Y))X[G]=s24($[G],Y[G]);return X}return Y}function $99($){if(!$)return;if(V5($))return $6($,{io:"input",target:"draft-07"});return $}function I70($,Y){if(!$)return;let X=Y?.model?WE({schema:$,compatLayers:[new x_(Y.model)],mode:"jsonSchema"}):$99($);if(!X)return;let{$schema:G,...J}=X;if(J.type==="array"){let Q=J.items;return{jsonSchema:{$schema:G,type:"object",properties:{elements:{type:"array",items:Q}},required:["elements"],additionalProperties:!1},outputFormat:"array"}}if(J.enum&&Array.isArray(J.enum))return{jsonSchema:{$schema:G,type:"object",properties:{result:{type:J.type||"string",enum:J.enum}},required:["result"],additionalProperties:!1},outputFormat:"enum"};return{jsonSchema:X,outputFormat:X.type}}function Y99($,Y){if($)return{type:"json",schema:I70($,Y)?.jsonSchema};return{type:"text"}}function X99($){try{return JSON.parse($),$}catch{return $.replace(/[\s]*<\|[^|]*\|>[\s]*/g,"").trim()}}function G99($){let Y=$.trim();Y=Y.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)"/g,(X,G,J)=>{if(G.trimEnd().endsWith('"'))return X;return`${G}"${J}"`}),Y=Y.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g,'$1"$2":'),Y=Y.replace(/'/g,'"'),Y=Y.replace(/,(\s*[}\]])/g,"$1"),Y=Y.replace(/:\s*(\d{4}-\d{2}-\d{2}(?:T[\d:]+)?)\s*([,}])/g,': "$1"$2');try{return JSON.parse(Y)}catch{return null}}function J99($,Y){switch($.type){case"response-metadata":return{type:"response-metadata",runId:Y.runId,from:"AGENT",payload:{...$}};case"text-start":return{type:"text-start",runId:Y.runId,from:"AGENT",payload:{id:$.id,providerMetadata:$.providerMetadata}};case"text-delta":if($.delta)return{type:"text-delta",runId:Y.runId,from:"AGENT",payload:{id:$.id,providerMetadata:$.providerMetadata,text:$.delta}};return;case"text-end":return{type:"text-end",runId:Y.runId,from:"AGENT",payload:$};case"reasoning-start":return{type:"reasoning-start",runId:Y.runId,from:"AGENT",payload:{id:$.id,providerMetadata:$.providerMetadata}};case"reasoning-delta":return{type:"reasoning-delta",runId:Y.runId,from:"AGENT",payload:{id:$.id,providerMetadata:$.providerMetadata,text:$.delta}};case"reasoning-end":return{type:"reasoning-end",runId:Y.runId,from:"AGENT",payload:{id:$.id,providerMetadata:$.providerMetadata}};case"source":return{type:"source",runId:Y.runId,from:"AGENT",payload:{id:$.id,sourceType:$.sourceType,title:$.title||"",mimeType:$.sourceType==="document"?$.mediaType:void 0,filename:$.sourceType==="document"?$.filename:void 0,url:$.sourceType==="url"?$.url:void 0,providerMetadata:$.providerMetadata}};case"file":{let Z=$.providerMetadata;return{type:"file",runId:Y.runId,from:"AGENT",payload:{data:$.data,base64:typeof $.data==="string"?$.data:void 0,mimeType:$.mediaType,...Z!=null?{providerMetadata:Z}:{}}}}case"tool-call":{let Z=void 0;if($.input){let K=X99($.input);if(K)try{Z=JSON.parse(K)}catch{let H=G99(K);if(H)Z=H;else console.error("Error converting tool call input to JSON",{input:$.input}),Z=void 0}}return{type:"tool-call",runId:Y.runId,from:"AGENT",payload:{toolCallId:$.toolCallId,toolName:$.toolName,args:Z,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata}}}case"tool-result":return{type:"tool-result",runId:Y.runId,from:"AGENT",payload:{toolCallId:$.toolCallId,toolName:$.toolName,result:$.result,isError:$.isError,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata}};case"tool-input-start":return{type:"tool-call-input-streaming-start",runId:Y.runId,from:"AGENT",payload:{toolCallId:$.id,toolName:$.toolName,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata,dynamic:$.dynamic}};case"tool-input-delta":if($.delta)return{type:"tool-call-delta",runId:Y.runId,from:"AGENT",payload:{argsTextDelta:$.delta,toolCallId:$.id,providerMetadata:$.providerMetadata}};return;case"tool-input-end":return{type:"tool-call-input-streaming-end",runId:Y.runId,from:"AGENT",payload:{toolCallId:$.id,providerMetadata:$.providerMetadata}};case"finish":let{finishReason:X,usage:G,providerMetadata:J,messages:Q,...W}=$;return{type:"finish",runId:Y.runId,from:"AGENT",payload:{providerMetadata:$.providerMetadata,stepResult:{reason:K99($.finishReason)},output:{usage:W99($.usage)},metadata:{providerMetadata:$.providerMetadata},messages:Q??{all:[],user:[],nonUser:[]},...W}};case"error":return{type:"error",runId:Y.runId,from:"AGENT",payload:$};case"raw":return{type:"raw",runId:Y.runId,from:"AGENT",payload:$.rawValue}}return}function Q99($){if(!$||typeof $!=="object")return!1;let Y=$;return typeof Y.inputTokens==="object"&&Y.inputTokens!==null&&"total"in Y.inputTokens&&typeof Y.outputTokens==="object"&&Y.outputTokens!==null&&"total"in Y.outputTokens}function W99($){if(!$)return{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0,cacheCreationInputTokens:void 0,raw:void 0};if(Q99($)){let X=$.inputTokens.total,G=$.outputTokens.total;return{inputTokens:X,outputTokens:G,totalTokens:(X??0)+(G??0),reasoningTokens:$.outputTokens.reasoning,cachedInputTokens:$.inputTokens.cacheRead,cacheCreationInputTokens:$.inputTokens.cacheWrite,raw:$}}let Y=$;return{inputTokens:Y.inputTokens,outputTokens:Y.outputTokens,totalTokens:Y.totalTokens??(Y.inputTokens??0)+(Y.outputTokens??0),reasoningTokens:Y.reasoningTokens,cachedInputTokens:Y.cachedInputTokens,cacheCreationInputTokens:Y.cacheCreationInputTokens,raw:$}}function Z99($){return typeof $==="object"&&$!==null&&"unified"in $}function K99($){if(!$)return"other";if($==="tripwire"||$==="retry")return $;if(Z99($))return $.unified;return $==="unknown"?"other":$}function U99($){return/^\d+$/.test($)}function z99($,Y){let X={...$};for(let G of Y)delete X[G];return X}function V99({runId:$,model:Y,providerOptions:X,inputMessages:G,tools:J,toolChoice:Q,activeTools:W,options:Z,onResult:K,includeRawChunks:H,modelSettings:z,structuredOutput:V,headers:A,shouldThrowError:F,methodType:N,generateId:D}){let L=new H99({component:"LLM",name:Y.modelId,generateId:D}),B=Y.specificationVersion==="v3"?"v3":"v2",O=h69({tools:J,toolChoice:Q,activeTools:W,targetVersion:B}),E=V?.schema?V?.model?"processor":"direct":void 0,M=V?.schema?Y99(V?.schema,{model:{provider:Y.provider,modelId:Y.modelId,supportsStructuredOutputs:!0}}):void 0,R=G;if(E==="direct"&&M?.type==="json"&&V?.jsonPromptInjection)R=Jv0({messages:G,schema:M.schema});if(E==="processor"&&M?.type==="json"&&M?.schema&&!V?.useAgent)R=Jv0({messages:G,schema:M.schema,schemaPrefix:`Your response will be processed by another agent to extract structured data. Please ensure your response contains comprehensive information for all the following fields that will be extracted:
`,schemaSuffix:`

You don't need to format your response as JSON unless the user asks you to. Just ensure your natural language response includes relevant information for each field in the schema above.`});let q=Y.provider.startsWith("openai")&&M?.type==="json"&&!V?.jsonPromptInjection;if(q&&M?.schema)M.schema=bv0(M.schema);let w=q?{...X??{},openai:{strictJsonSchema:!0,...X?.openai??{}}}:X;return L.initialize({runId:$,onResult:K,createStream:async()=>{try{let P=z99(z||{},["maxRetries","headers"]),_=Z?.abortSignal;return await(await Promise.resolve().then(() => (fZ4(),hZ4))).default(async()=>{return await(N==="stream"?Y.doStream:Y.doGenerate).bind(Y)({...O,prompt:R,providerOptions:w,abortSignal:_,includeRawChunks:H,responseFormat:E==="direct"&&!V?.jsonPromptInjection?M:void 0,...P,headers:A})},{retries:z?.maxRetries??2,signal:_,shouldRetry(k){if(M$.isInstance(k.error))return k.error.isRetryable;return!0}})}catch(P){if(F)throw P;return{stream:new ReadableStream({start:async(_)=>{_.enqueue({type:"error",error:P}),_.close()}}),warnings:[],request:{},rawResponse:{}}}}})}function mE($,Y){if(!$)return;return Object.values($).find((X)=>NO(X)&&(ep1(X.id)===Y||X.name===Y))}function R70($,Y){if($!==void 0)return $;if(!NO(Y))return;return!(typeof Y==="object"&&Y!==null&&("execute"in Y)&&typeof Y.execute==="function")}function F99({chunks:$,messageId:Y,responseModelMetadata:X,tools:G,createdAt:J=new Date}){let Q=[],W=new Map;for(let D of $)if(D.type==="tool-result"&&D.payload.result!=null){let L=D.payload;W.set(L.toolCallId,{result:L.result,args:L.args,providerMetadata:rZ(L.providerMetadata,D.metadata),providerExecuted:L.providerExecuted,toolName:L.toolName})}let Z=new Map,K=new Map,H=new Map,z=new Map;for(let D of $)switch(D.type){case"text-start":{let L=D.payload;Z.set(L.id,L.providerMetadata);break}case"text-delta":{let L=D.payload,B=H.get(L.id);if(!B)B={type:"text",text:"",providerMetadata:Z.get(L.id)??L.providerMetadata},H.set(L.id,B),Q.push(B);if(B.text+=L.text,L.providerMetadata)B.providerMetadata=L.providerMetadata;break}case"text-end":{let L=D.payload,B=H.get(L.id);if(B){if(L.providerMetadata)B.providerMetadata=L.providerMetadata;if(!B.providerMetadata)delete B.providerMetadata}Z.delete(L.id),H.delete(L.id);break}case"reasoning-start":{let L=D.payload;if(Object.values(L.providerMetadata||{}).some((O)=>O?.redactedData)){let O={type:"reasoning",reasoning:"",details:[{type:"redacted",data:""}],providerMetadata:L.providerMetadata};z.set(L.id,O),Q.push(O)}else K.set(L.id,L.providerMetadata);break}case"reasoning-delta":{let L=D.payload,B=z.get(L.id);if(!B)B={type:"reasoning",reasoning:"",details:[{type:"text",text:""}],providerMetadata:K.get(L.id)??L.providerMetadata},z.set(L.id,B),Q.push(B);let O=B.details[0];if(O&&O.type==="text")O.text+=L.text;if(L.providerMetadata)B.providerMetadata=L.providerMetadata;break}case"reasoning-end":{let L=D.payload,B=z.get(L.id);if(B){if(L.providerMetadata)B.providerMetadata=L.providerMetadata}else{let O={type:"reasoning",reasoning:"",details:[{type:"text",text:""}],providerMetadata:L.providerMetadata??K.get(L.id)};Q.push(O)}K.delete(L.id),z.delete(L.id);break}case"redacted-reasoning":{let L=D.payload;Q.push({type:"reasoning",reasoning:"",details:[{type:"redacted",data:""}],providerMetadata:L.providerMetadata});break}case"source":{let L=D.payload;Q.push({type:"source",source:{sourceType:"url",id:L.id,url:L.url||"",title:L.title,providerMetadata:L.providerMetadata}});break}case"file":{let L=D.payload;Q.push({type:"file",data:L.data,mimeType:L.mimeType,...L.providerMetadata?{providerMetadata:L.providerMetadata}:{}});break}case"tool-call":{let L=D.payload,B=G?.[L.toolName]||mE(G,L.toolName),O=R70(L.providerExecuted,B),E=rZ(L.providerMetadata,D.metadata),M=W.get(L.toolCallId);if(M){let R=R70(M.providerExecuted,B);Q.push({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:L.toolCallId,toolName:L.toolName,args:L.args,result:M.result},providerMetadata:M.providerMetadata??E,providerExecuted:R})}else Q.push({type:"tool-invocation",toolInvocation:{state:"call",toolCallId:L.toolCallId,toolName:L.toolName,args:L.args},providerMetadata:E,providerExecuted:O});break}}for(let[D]of K)if(!z.has(D)){let L={type:"reasoning",reasoning:"",details:[{type:"text",text:""}],providerMetadata:K.get(D)};Q.push(L)}for(let[,D]of H)if(!D.providerMetadata)delete D.providerMetadata;let V=Q.filter((D)=>!(D.type==="text"&&D.text==="")),A=[];for(let D=0;D<V.length;D++){let L=V[D];if(L.type==="text"&&A.length>0&&A[A.length-1]?.type==="tool-invocation")A.push({type:"step-start"});A.push(L)}if(A.length===0)return[];let F=A.filter((D)=>D.type==="text").map((D)=>D.text).join(`
`);return[{id:Y,role:"assistant",content:{format:2,parts:A,...F?{content:F}:{},...X},createdAt:J}]}function t24($){return $&&$>0?$:10}function D99({requireToolApproval:$,tools:Y,activeTools:X}){if($)return!0;if(!Y)return!1;return(X===void 0?Object.entries(Y):X.flatMap((J)=>{let Q=Y[J];return Q?[[J,Q]]:[]})).some(([,J])=>{let Q=J;return Boolean(Q.hasSuspendSchema||Q.requireApproval)})}function e24({requireToolApproval:$,tools:Y,activeTools:X,configuredConcurrency:G}){return D99({requireToolApproval:$,tools:Y,activeTools:X})?1:G}function N99($,Y){$.concurrency=e24(Y)}function L99({inputProcessors:$,llmRequestInputProcessors:Y}){if(!Y?.length)return $||[];if(!$?.length)return Y;let X=new Set(Y.filter((J)=>!V9(J)).map((J)=>J.id)),G=$.filter((J)=>!V9(J)&&!X.has(J.id));return G.length?[...Y,...G]:Y}async function B99($,{tools:Y,policy:X,logger:G}){let J="payload"in $?$.payload:void 0;if(!J||typeof J!=="object")return $;let{toolName:Q,toolCallId:W}=J;if(typeof Q!=="string"||typeof W!=="string")return $;let Z=Y?.[Q]||mE(Y,Q)||Object.values(Y||{}).find((z)=>("id"in z)&&z.id===Q),K={policy:X,toolTransform:Z?.transform},H;if($.type==="tool-call")H=await NQ({phase:"input-available",toolName:Q,toolCallId:W,input:J.args,providerMetadata:J.providerMetadata},K,G);else if($.type==="tool-call-delta")H=await NQ({phase:"input-delta",toolName:Q,toolCallId:W,inputTextDelta:J.argsTextDelta,providerMetadata:J.providerMetadata},K,G);else if($.type==="tool-result")$=qK($,await NQ({phase:"input-available",toolName:Q,toolCallId:W,input:J.args,providerMetadata:J.providerMetadata},K,G)),H=await NQ({phase:"output-available",toolName:Q,toolCallId:W,input:J.args,output:J.result,providerMetadata:J.providerMetadata},K,G);else if($.type==="tool-error")$=qK($,await NQ({phase:"input-available",toolName:Q,toolCallId:W,input:J.args,providerMetadata:J.providerMetadata},K,G)),H=await NQ({phase:"error",toolName:Q,toolCallId:W,input:J.args,error:J.error,providerMetadata:J.providerMetadata},K,G);return qK($,H)}function O99($,Y){let X={},G=Y?.modelId??$.state.responseMetadata?.modelId;if(G)X.modelId=G;if(Y?.provider)X.provider=Y.provider;return Object.keys(X).length>0?{metadata:X}:void 0}function Yg0({error:$,controller:Y,runId:X,model:G,messageList:J,messageId:Q,stepTools:W,_internal:Z}){let K={type:"tripwire",runId:X,from:"AGENT",payload:{reason:$.message,retry:$.options?.retry,metadata:$.options?.metadata,processorId:$.processorId}};A9(Y,K);let H=new o24({_internal:Z,model:G});return{callBail:!0,outputStream:new dj({model:{modelId:G.modelId,provider:G.provider,version:G.specificationVersion},stream:new $2({start(z){z.enqueue(K),z.close()}}),messageList:J,messageId:Q,options:{runId:X}}),runState:H,stepTools:W}}async function E99({tools:$,messageId:Y,messageList:X,outputStream:G,runState:J,options:Q,controller:W,responseFromModel:Z,includeRawChunks:K,logger:H,transportRef:z,transportResolver:V,toolPayloadTransform:A}){let F=!1,N=[];for await(let D of G._getBaseStream()){if(Q?.abortSignal?.aborted)break;if(!D)continue;if(!F&&z&&V){let L=V();if(L)z.current=L,F=!0}if(D.type=="object"||D.type=="object-result"){W.enqueue(D);continue}switch(D=await B99(D,{tools:$,policy:A,logger:H}),N.push({type:D.type,payload:"payload"in D?D.payload:void 0,metadata:D.metadata}),D.type){case"response-metadata":J.setState({responseMetadata:{id:D.payload.id,timestamp:D.payload.timestamp,modelId:D.payload.modelId,headers:D.payload.headers}});break;case"tool-call-input-streaming-start":{let L=$?.[D.payload.toolName]||Object.values($||{})?.find((B)=>("id"in B)&&B.id===D.payload.toolName);if(L&&"onInputStart"in L)try{await L?.onInputStart?.({toolCallId:D.payload.toolCallId,messages:X.get.input.aiV5.model(),abortSignal:Q?.abortSignal})}catch(B){H?.error("Error calling onInputStart",B)}A9(W,D);break}case"tool-call-delta":{let L=$?.[D.payload.toolName||""]||Object.values($||{})?.find((B)=>("id"in B)&&B.id===D.payload.toolName);if(L&&"onInputDelta"in L)try{await L?.onInputDelta?.({inputTextDelta:D.payload.argsTextDelta,toolCallId:D.payload.toolCallId,messages:X.get.input.aiV5.model(),abortSignal:Q?.abortSignal})}catch(B){H?.error("Error calling onInputDelta",B)}A9(W,D);break}case"finish":J.setState({providerOptions:D.payload.metadata?.providerMetadata??D.payload.providerMetadata,stepResult:{reason:D.payload.reason,logprobs:D.payload.logprobs,warnings:Z.warnings,totalUsage:D.payload.totalUsage,headers:Z.rawResponse?.headers,messageId:Y,isContinued:!["stop","error","length"].includes(D.payload.stepResult.reason),request:Z.request}});break;case"error":if(Gv0(D.payload.error)&&Q?.abortSignal?.aborted)break;J.setState({hasErrored:!0,apiError:D.payload.error}),J.setState({stepResult:{isContinued:!1,reason:"error"}}),J.setState({deferredErrorChunk:D});break;case"tool-result":{if(D.payload.result!=null){let L=$?.[D.payload.toolName]||mE($,D.payload.toolName);X.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:D.payload.toolCallId,toolName:D.payload.toolName,args:D.payload.args,result:D.payload.result},providerMetadata:rZ(D.payload.providerMetadata,D.metadata),providerExecuted:R70(D.payload.providerExecuted,L)})}A9(W,D);break}default:A9(W,D)}if(["text-delta","reasoning-delta","source","tool-call","tool-call-input-streaming-start","tool-call-delta","tool-call-input-streaming-end","raw"].includes(D.type)){if(D.type==="raw"&&!K)continue;await Q?.onChunk?.(D)}if(J.state.hasErrored)break}return{collectedChunks:N}}function M99($,Y,X=0){return async(G)=>{let J=X,Q,W=!1,Z;for(let K of $.slice(X)){if(J++,W)break;try{let H=J===$.length;Q=await G(K,H),W=!0}catch(H){if(H instanceof u6)throw H;Z=H,Y?.error(`Error executing model ${K.model.modelId}`,H)}}if(typeof Q>"u"){let H=`Exhausted all fallback models. Last error: ${Z instanceof Error?Z.message:String(Z)}`;throw Y?.error(H),Error(H,{cause:Z})}return Q}}function R99({models:$,_internal:Y,messageId:X,runId:G,tools:J,toolChoice:Q,activeTools:W,messageList:Z,includeRawChunks:K,modelSettings:H,providerOptions:z,options:V,toolCallStreaming:A,controller:F,structuredOutput:N,outputProcessors:D,inputProcessors:L,llmRequestInputProcessors:B,errorProcessors:O,logger:E,agentId:M,downloadRetries:R,downloadConcurrency:q,processorStates:w,requestContext:I,methodType:P,requireToolApproval:_,toolCallConcurrency:C,toolCallForeachOptions:k,modelSpanTracker:S,autoResumeSuspendedTools:T,maxProcessorRetries:v,workspace:x,outputWriter:y}){let d=Z.getAllSystemMessages(),u=t24(C),b=0;return o9({id:"llm-execution",inputSchema:fW,outputSchema:fW,execute:async({inputData:g,bail:p,tracingContext:h})=>{if(b++,b>1)Z.stepStart();let n=g.isTaskCompleteCheckFailed?`${X}-${b}`:g.messageId||X;S?.startStep();let t,s,Z0,X0,a=g.fallbackModelIndex||0,Q0,e=v??(O?.length?10:void 0),{outputStream:m,callBail:$0,runState:Y0,stepTools:K0,stepWorkspace:A0,processAPIErrorRetry:D0}=await M99($,E,a)(async(T1,R4)=>{a=$.findIndex((Y4)=>Y4.id===T1.id);let{model:w4,headers:A6}=T1;if(S&&a>0)S.updateGeneration({name:`llm: '${w4.modelId}'`,attributes:{model:w4.modelId,provider:w4.provider}});if(d)Z.replaceAllSystemMessages(d);if(g.processorRetryFeedback)Z.addSystem(g.processorRetryFeedback,"processor-retry-feedback");let K4=Y?.initialSignalEchoes?.splice(0)??[];for(let Y4 of K4)A9(F,Y4.toDataPart());if((g.output?.steps?.length??0)===0){let Y4=Y?.drainPendingSignals?.(G)??[];if(Y4.length>0)n=Y?.generateId?.()??HO();for(let i4 of Y4){let C9=Z.addSignal(i4);A9(F,C9.toDataPart())}}let N0={messageId:n,createdAt:new Date,model:w4,tools:J,toolChoice:Q,activeTools:W,providerOptions:z,modelSettings:H,structuredOutput:N,workspace:x},f0=()=>{return n=Y?.generateId?.()??HO(),N0.messageId=n,n},a0=[...L||[],...V?.prepareStep?[new e89({prepareStep:V.prepareStep})]:[]];if(a0&&a0.length>0){let Y4=new A5({inputProcessors:a0,outputProcessors:[],logger:E||new VU({level:"error"}),agentName:M||"unknown",processorStates:w});try{let i4=S?.getTracingContext()??h,C9=y?{custom:async(p7,t6)=>y(p7,{...t6,messageId:N0.messageId})}:void 0,q6=await Y4.runProcessInputStep({messageList:Z,stepNumber:g.output?.steps?.length||0,...g4(i4),requestContext:I,model:w4,steps:g.output?.steps||[],messageId:N0.messageId,rotateResponseMessageId:f0,tools:J,toolChoice:Q,activeTools:W,providerOptions:z,modelSettings:H,structuredOutput:N,retryCount:g.processorRetryCount||0,writer:C9,abortSignal:V?.abortSignal});Object.assign(N0,q6),Q0=N0.model.provider&&N0.model.modelId?`${N0.model.provider}/${N0.model.modelId}`:void 0;let q4=q6.model&&q6.model!==w4,y8=q6.modelSettings&&q6.modelSettings!==H;if(S&&(q4||y8))S.updateGeneration({...q4?{name:`llm: '${N0.model.modelId}'`}:{},attributes:{...q4?{model:N0.model.modelId,provider:N0.model.provider}:{},...y8?{parameters:N0.modelSettings}:{}}});let B5=q6.tools&&q6.tools!==J,G7=q6.activeTools&&q6.activeTools!==W;if(B5||G7){let p7=h?.currentSpan?.findParent("agent_run");if(p7){let t6=G7?q6.activeTools:N0.tools?Object.keys(N0.tools):void 0;if(t6!==void 0)p7.update({attributes:{availableTools:t6}})}}if(q6.tools&&N0.tools){let p7={};for(let[t6,bX]of Object.entries(N0.tools))if(Uf(bX))p7[t6]=VY(bX,{name:t6,runId:G,threadId:Y?.threadId,resourceId:Y?.resourceId,logger:E,agentName:M,requestContext:I||new p1,outputWriter:y,workspace:N0.workspace,requireApproval:bX.requireApproval,backgroundConfig:bX.background},void 0,T);else p7[t6]=bX;N0.tools=p7}}catch(i4){if(i4 instanceof u6)return E?.warn("Streaming input processor tripwire triggered",{reason:i4.message,processorId:i4.processorId,retry:i4.options?.retry}),Yg0({error:i4,controller:F,runId:G,model:w4,messageList:Z,messageId:N0.messageId,stepTools:J,_internal:Y});throw E?.error("Error in processInputStep processors:",i4),i4}}if(Y)Y.stepActiveTools=N0.activeTools;if(k)N99(k,{requireToolApproval:_,tools:N0.tools,activeTools:N0.activeTools,configuredConcurrency:u});let c0=new o24({_internal:Y,model:N0.model}),F1,E1=N0.model?.supportedUrls;if(E1)if(typeof E1.then==="function")F1=await E1;else F1=E1;let l4={downloadRetries:R,downloadConcurrency:q,supportedUrls:F1},Q1=await Z.get.all.aiV5.llmPrompt(l4);if(T){let C9=[...Z.get.all.db()].reverse().filter((q6)=>q6.role==="assistant").find((q6)=>{if(q6.content.metadata?.suspendedTools||q6.content.metadata?.pendingToolApprovals)return!0;let y8=q6.content.parts?.filter((B5)=>(B5.type==="data-tool-call-suspended"||B5.type==="data-tool-call-approval")&&!B5.data.resumed);if(y8&&y8.length>0)return!0;return!1});if(C9){let q6=C9.content.metadata,q4=q6?.suspendedTools||q6?.pendingToolApprovals;if(!q4)q4=C9.content.parts?.filter((B5)=>B5.type==="data-tool-call-suspended"||B5.type==="data-tool-call-approval")?.reduce((B5,G7)=>{if((G7.type==="data-tool-call-suspended"||G7.type==="data-tool-call-approval")&&!G7.data.resumed)B5[G7.data.toolName]=G7.data;return B5},{});let y8=Object.values(q4);if(y8.length>0)Q1=Q1.map((B5,G7)=>{if(B5.role==="system"&&G7===0)B5.content=B5.content+`

Analyse the suspended tools: ${JSON.stringify(y8)}, using the messages available to you and the resumeSchema of each suspended tool, find the tool whose resumeData you can construct properly.
                      resumeData can not be an empty object nor null/undefined.
                      When you find that and call that tool, add the resumeData to the tool call arguments/input.
                      Also, add the runId of the suspended tool as suspendedToolRunId to the tool call arguments/input.
                      If the suspendedTool.type is 'approval', resumeData will be an object that contains 'approved' which can either be true or false depending on the user's message. If you can't construct resumeData from the message for approval type, set approved to true and add resumeData: { approved: true } to the tool call arguments/input.

                      IMPORTANT: If you're able to construct resumeData and get suspendedToolRunId, get the previous arguments/input of the tool call from args in the suspended tool, and spread it in the new arguments/input created, do not add duplicate data. 
                      `;return B5})}}if(Y?.backgroundTaskManager&&N0.tools){let Y4=_04(N0.tools,Y?.agentBackgroundConfig);Q1=Q1.map((i4,C9)=>{if(i4.role==="system"&&C9===0)i4.content=i4.content+`

${Y4}`;return i4})}let C1=new A5({inputProcessors:L99({inputProcessors:L,llmRequestInputProcessors:B}),outputProcessors:[],logger:E||new VU({level:"error"}),agentName:M||"unknown",processorStates:w}),f4=y?{custom:async(Y4,i4)=>y(Y4,{...i4,messageId:N0.messageId})}:void 0,O6;try{let Y4=await C1.runProcessLLMRequest({prompt:Q1,model:N0.model,stepNumber:g.output?.steps?.length||0,steps:g.output?.steps||[],retryCount:g.processorRetryCount||0,requestContext:I,tracingContext:S?.getTracingContext()??h,writer:f4,abortSignal:V?.abortSignal});Q1=Y4.prompt,O6=Y4.response}catch(Y4){if(Y4 instanceof u6)return E?.warn("Streaming request processor tripwire triggered",{reason:Y4.message,processorId:Y4.processorId,retry:Y4.options?.retry}),Yg0({error:Y4,controller:F,runId:G,model:N0.model,messageList:Z,messageId:N0.messageId,stepTools:N0.tools,_internal:Y});throw E?.error("Error in processLLMRequest processors:",Y4),Y4}if(O6){s=O6.warnings??[],Z0=O6.request??{},X0=O6.rawResponse,S?.updateStep?.({request:Z0||{},inputMessages:Q1,warnings:s||[],messageId:N0.messageId});let Y4=O6.chunks;t=new $2({start(i4){for(let C9 of Y4)i4.enqueue({...C9,runId:G,from:"AGENT"});i4.close()}})}else if(KG(N0.model))S?.setInferenceContext?.({parameters:{...N0.modelSettings,...T1.modelSettings},providerOptions:X24(N0.providerOptions,T1.providerOptions),availableTools:fS0(N0.tools,N0.activeTools),toolChoice:N0.toolChoice,responseFormat:N0.structuredOutput?"json_schema":void 0}),S?.startInference?.(),t=CO({span:S?.getTracingContext()?.currentSpan,fn:()=>V99({runId:G,model:N0.model,providerOptions:X24(N0.providerOptions,T1.providerOptions),inputMessages:Q1,tools:N0.tools,toolChoice:N0.toolChoice,activeTools:N0.activeTools,options:V,modelSettings:{...N0.modelSettings,...T1.modelSettings,maxRetries:T1.maxRetries},includeRawChunks:K,structuredOutput:N0.structuredOutput,headers:(()=>{let Y4={};if(Y?.threadId)Y4["x-thread-id"]=Y.threadId;if(Y?.resourceId)Y4["x-resource-id"]=Y.resourceId;let i4={...Y4,...A6,...N0.modelSettings?.headers};return Object.keys(i4).length>0?i4:void 0})(),methodType:P,generateId:Y?.generateId,onResult:({warnings:Y4,request:i4,rawResponse:C9})=>{s=Y4,Z0=i4||{},X0=C9,S?.updateStep?.({request:Z0||{},inputMessages:Q1,warnings:s||[],messageId:N0.messageId}),A9(F,{runId:G,from:"AGENT",type:"step-start",payload:{request:Z0||{},warnings:s||[],messageId:N0.messageId}})},shouldThrowError:!R4})});else throw Error(`Unsupported model version: ${N0.model.specificationVersion}. Supported versions: ${xD.join(", ")}`);let J9=new dj({model:{modelId:N0.model.modelId,provider:N0.model.provider,version:N0.model.specificationVersion},stream:t,messageList:Z,messageId:N0.messageId,options:{runId:G,toolCallStreaming:A,includeRawChunks:K,structuredOutput:N0.structuredOutput,outputProcessors:O6?[]:D,isLLMExecutionStep:!0,tracingContext:h,processorStates:w,requestContext:I}}),o$;if(N0.model instanceof IE){let Y4=N0.model;o$=()=>ub0(t)??Y4._getStreamTransport()}try{let{collectedChunks:Y4}=await E99({outputStream:J9,includeRawChunks:K,tools:N0.tools,messageId:N0.messageId,messageList:Z,runState:c0,options:V,controller:F,responseFromModel:{warnings:s,request:Z0,rawResponse:X0},logger:E,transportRef:Y?.transportRef,transportResolver:o$,toolPayloadTransform:Y?.toolPayloadTransform}),i4=F99({chunks:Y4,messageId:N0.messageId,responseModelMetadata:O99(c0,N0.model),tools:N0.tools,createdAt:N0.createdAt});for(let q6 of i4)Z.add(q6,"response");let C9=J9._getImmediateObject();if(C9!==void 0){let q4=[...Z.get.response.db()].reverse().find((y8)=>y8.role==="assistant");if(q4){if(!q4.content.metadata)q4.content.metadata={};q4.content.metadata.structuredOutput=C9}}if(!O6)try{await C1.runProcessLLMResponse({chunks:Y4,model:N0.model,stepNumber:g.output?.steps?.length||0,steps:g.output?.steps||[],warnings:s,request:Z0,rawResponse:X0,fromCache:!1,retryCount:g.processorRetryCount||0,requestContext:I,tracingContext:S?.getTracingContext()??h,writer:f4,abortSignal:V?.abortSignal})}catch(q6){if(q6 instanceof u6)return E?.warn("Streaming response processor tripwire triggered",{reason:q6.message,processorId:q6.processorId,retry:q6.options?.retry}),Yg0({error:q6,controller:F,runId:G,model:N0.model,messageList:Z,messageId:N0.messageId,stepTools:N0.tools,_internal:Y});throw E?.error("Error in processLLMResponse processors:",q6),q6}}catch(Y4){let i4=w4?.provider,C9=w4?.modelId;if(Gv0(Y4)&&V?.abortSignal?.aborted)return E?.debug?.("LLM execution aborted",{runId:G}),await V?.onAbort?.({steps:g?.output?.steps??[]}),A9(F,{type:"abort",runId:G,from:"AGENT",payload:{}}),{callBail:!0,outputStream:J9,runState:c0,stepTools:N0.tools};if(M$.isInstance(Y4)){let q4=i4?` from ${i4}`:"",y8=C9?` (model: ${C9})`:"";E?.error(`Upstream LLM API error${q4}${y8}`,{error:Y4,runId:G,...i4&&{provider:i4},...C9&&{modelId:C9}})}else E?.error("Error in LLM execution",{error:Y4,runId:G,...i4&&{provider:i4},...C9&&{modelId:C9}});if(R4)c0.setState({hasErrored:!0,apiError:Y4,deferredErrorChunk:{type:"error",runId:G,from:"AGENT",payload:{error:Y4}},stepResult:{isContinued:!1,reason:"error"}});else{let q4=new A5({inputProcessors:L||[],outputProcessors:D||[],errorProcessors:O||[],logger:E||new VU({level:"error"}),agentName:M||"unknown",processorStates:w}),y8=g.processorRetryCount||0,B5=e!==void 0&&y8<e,G7=y?{custom:async(t6,bX)=>y(t6,{...bX,messageId:n})}:void 0;if((await q4.runProcessAPIError({error:Y4,messages:Z.get.all.db(),messageList:Z,stepNumber:g.output?.steps?.length||0,steps:g.output?.steps||[],retryCount:y8,requestContext:I,writer:G7,abortSignal:V?.abortSignal,messageId:n,rotateResponseMessageId:()=>{return n=Y?.generateId?.()??HO(),J9.messageId=n,n}})).retry&&B5)return c0.setState({hasErrored:!1,apiError:void 0}),{outputStream:J9,callBail:!1,runState:c0,stepTools:N0.tools,stepWorkspace:N0.workspace,processAPIErrorRetry:{retry:!0}};throw Y4}}if(V?.abortSignal?.aborted)return await V?.onAbort?.({steps:g?.output?.steps??[]}),A9(F,{type:"abort",runId:G,from:"AGENT",payload:{}}),{callBail:!0,outputStream:J9,runState:c0,stepTools:N0.tools};return{outputStream:J9,callBail:!1,runState:c0,stepTools:N0.tools,stepWorkspace:N0.workspace}});if(Q0)Z.enrichLastStepStart(Q0);if(Y)Y.stepTools=K0,Y.stepWorkspace=A0??Y.stepWorkspace;if($0){let T1=m._getImmediateUsage(),R4=Y0.state.responseMetadata,w4=m._getImmediateText();return p({messageId:m.messageId,stepResult:{reason:"tripwire",warnings:s,isContinued:!1},metadata:{providerMetadata:Y0.state.providerOptions,...R4,modelMetadata:Y0.state.modelMetadata,headers:X0?.headers,request:Z0},output:{text:w4,toolCalls:[],usage:T1??g.output.usage,steps:[]},messages:{all:Z.get.all.aiV5.model(),user:Z.get.input.aiV5.model(),nonUser:Z.get.response.aiV5.model()}})}let O0=D0;if(!O0&&Y0.state.hasErrored&&Y0.state.apiError){let T1=g.processorRetryCount||0,R4=e!==void 0&&T1<e,w4=new A5({inputProcessors:L||[],outputProcessors:D||[],errorProcessors:O||[],logger:E||new VU({level:"error"}),agentName:M||"unknown",processorStates:w}),A6=y?{custom:async(b4,N0)=>y(b4,{...N0,messageId:n})}:void 0,K4=await w4.runProcessAPIError({error:Y0.state.apiError,messages:Z.get.all.db(),messageList:Z,stepNumber:g.output?.steps?.length||0,steps:g.output?.steps||[],retryCount:T1,requestContext:I,writer:A6,abortSignal:V?.abortSignal,messageId:n,rotateResponseMessageId:()=>{return n=Y?.generateId?.()??HO(),m.messageId=n,n}});if(K4.retry&&R4)O0=K4,Y0.setState({hasErrored:!1,apiError:void 0,deferredErrorChunk:void 0})}if(O0?.retry){let T1=g.processorRetryCount||0,R4=g.output?.steps||[],w4=T1+1,A6={all:Z.get.all.aiV5.model(),user:Z.get.input.aiV5.model(),nonUser:[]};return{messageId:m.messageId,stepResult:{reason:"retry",warnings:s,isContinued:!0},metadata:{providerMetadata:Y0.state.providerOptions,...Y0.state.responseMetadata,modelMetadata:Y0.state.modelMetadata,headers:X0?.headers,request:Z0},output:{text:"",toolCalls:[],usage:m._getImmediateUsage()??g.output?.usage,steps:R4},messages:A6,processorRetryCount:w4,...a>0?{fallbackModelIndex:a}:{}}}if(Y0.state.deferredErrorChunk&&Y0.state.hasErrored){let T1=Y0.state.deferredErrorChunk,R4=XG(T1.payload.error,{fallbackMessage:"Unknown error in agent stream"});A9(F,{...T1,payload:{...T1.payload,error:R4}}),await V?.onError?.({error:R4}),Y0.setState({deferredErrorChunk:void 0})}if(m.tripwire)Y0.setState({stepResult:{isContinued:!1,reason:"tripwire"}});let R0=(m._getImmediateToolCalls()??[]).map((T1)=>{let R4=K0?.[T1.payload.toolName]||mE(K0,T1.payload.toolName);return{...T1.payload,providerExecuted:R70(T1.payload.providerExecuted,R4)}}),I0=null;if(D&&D.length>0){let T1=new A5({inputProcessors:[],outputProcessors:D,logger:E||new VU({level:"error"}),agentName:M||"unknown",processorStates:w});try{let R4=g.output?.steps?.length||0,w4=m._getImmediateText(),A6=m._getImmediateFinishReason(),K4=R0.map((a0)=>({toolName:a0.toolName,toolCallId:a0.toolCallId,args:a0.args})),b4=g.processorRetryCount||0,N0=S?.getTracingContext()??h,f0=y?{custom:async(a0,c0)=>y(a0,{...c0,messageId:m.messageId})}:void 0;await T1.runProcessOutputStep({steps:g.output?.steps??[],messages:Z.get.all.db(),messageList:Z,stepNumber:R4,finishReason:A6,toolCalls:K4.length>0?K4:void 0,text:w4,usage:m._getImmediateUsage(),...g4(N0),requestContext:I,retryCount:b4,writer:f0})}catch(R4){if(R4 instanceof u6)I0=R4,E?.warn("Output step processor tripwire triggered",{reason:R4.message,processorId:R4.processorId,retry:R4.options?.retry});else throw E?.error("Error in processOutputStep processors:",R4),R4}}let g0=Y0?.state?.stepResult?.reason??m._getImmediateFinishReason(),p0=Y0.state.hasErrored,U4=m._getImmediateUsage(),P1=Y0.state.responseMetadata,d1=m._getImmediateText(),C0=m._getImmediateObject(),n0=m.tripwire||I0!==null,J0=g.processorRetryCount||0,B0=I0?.options?.retry===!0,Y1=v!==void 0&&J0<v,c1=B0&&Y1;if(B0&&!Y1)if(v===void 0)E?.warn?.("Processor requested retry but maxProcessorRetries is not set. Treating as abort.");else E?.warn?.(`Processor requested retry but maxProcessorRetries (${v}) exceeded. Current count: ${J0}. Treating as abort.`);let C4=g.output?.steps||[],c4=g.messages?.nonUser?.length||0,T6=Z.get.response.aiV5.modelContent(C4.length).slice(c4),p6=I0?{reason:I0.message,retry:I0.options?.retry,metadata:I0.options?.metadata,processorId:I0.processorId}:void 0;if(C4.push(new A99({warnings:m._getImmediateWarnings(),providerMetadata:Y0.state.providerOptions,finishReason:Y0.state.stepResult?.reason,content:T6,response:{...P1,...X0,messages:Z.get.response.aiV5.model()},request:Z0,usage:m._getImmediateUsage(),tripwire:p6})),c1)Z.removeByIds([m.messageId]);let n6=c1&&I0?`[Processor Feedback] Your previous response was not accepted: ${I0.message}. Please try again with the feedback in mind.`:void 0,K1={all:Z.get.all.aiV5.model(),user:Z.get.input.aiV5.model(),nonUser:Z.get.response.aiV5.model()},Q4=c1?"retry":n0?"tripwire":p0?"error":g0,C6=c1?a:0,t4=R0&&R0.some((T1)=>!T1.providerExecuted)&&g0!=="length",a1=c1||!n0&&(t4||!["stop","error","length"].includes(g0)),A1=c1?J0+1:0;return{messageId:m.messageId,stepResult:{reason:Q4,warnings:s,isContinued:a1,...c1&&I0?{retryReason:I0.message,retryMetadata:I0.options?.metadata,retryProcessorId:I0.processorId}:{}},metadata:{providerMetadata:Y0.state.providerOptions,...P1,...X0,modelMetadata:Y0.state.modelMetadata,headers:X0?.headers,request:Z0},output:{text:d1,toolCalls:c1?[]:R0,usage:U4??g.output?.usage,steps:C4,...C0?{object:C0}:{}},messages:K1,processorRetryCount:A1,processorRetryFeedback:n6,...C6>0?{fallbackModelIndex:C6}:{}}}})}function q99({models:$,_internal:Y,...X},G){let J=X.outputProcessors?.length&&X.logger?new A5({inputProcessors:[],outputProcessors:X.outputProcessors,logger:X.logger,agentName:"LLMMappingStep",processorStates:X.processorStates}):void 0,Q=g4(X.modelSpanTracker?.getTracingContext()),W=X.outputWriter?{custom:async(K)=>X.outputWriter(K)}:void 0;async function Z(K){if(J&&X.processorStates){let{part:H,blocked:z,reason:V,tripwireOptions:A,processorId:F}=await J.processPart(K,X.processorStates,Q,X.requestContext,X.messageList,0,W);if(z)return X.controller.enqueue({type:"tripwire",payload:{reason:V||"Output processor blocked content",retry:A?.retry,metadata:A?.metadata,processorId:F}}),null;if(H)return X.controller.enqueue(H),H;return null}else return X.controller.enqueue(K),K}return o9({id:"llmExecutionMappingStep",inputSchema:U.array(r24),outputSchema:fW,execute:async({inputData:K,getStepResult:H,bail:z})=>{let V=H(G);function A(D){if(D==null||typeof D!=="object")return D;let L=D;if(L.type!=="content"||!Array.isArray(L.value))return D;return{...L,value:L.value.map((B)=>{if(B==null||typeof B!=="object")return B;let O=B;if(O.type!=="media")return O;if(typeof O.mediaType==="string"&&O.mediaType.startsWith("image/"))return{type:"image-data",data:O.data,mediaType:O.mediaType};return{type:"file-data",data:O.data,mediaType:O.mediaType}})}}async function F(D){let L=Y?.stepTools?.[D.toolName]??X.tools?.[D.toolName],B;if(L?.toModelOutput&&D.result!=null){let q=Q?.tracingContext?.currentSpan?.createChildSpan({type:"mapping",name:`tool output mapping: '${D.toolName}'`,entityType:J6.TOOL,entityId:D.toolName,entityName:D.toolName,input:D.result,attributes:{mappingType:"toModelOutput",toolCallId:D.toolCallId}});try{B=await L.toModelOutput(D.result),B=A(B),q?.end({output:B})}catch(w){throw q?.error({error:w,endSpan:!0}),w}}let O=D.providerMetadata?.mastra,E={...D.providerMetadata,...B!=null?{mastra:{...O,modelOutput:B}}:{}};return Object.keys(E).length>0?E:void 0}async function N(D,L,B){let O=Y?.stepTools,E=O?.[L.toolName]||mE(O,L.toolName)||Object.values(O||{}).find((w)=>("id"in w)&&w.id===L.toolName)||X.tools?.[L.toolName]||mE(X.tools,L.toolName)||Object.values(X.tools||{}).find((w)=>("id"in w)&&w.id===L.toolName),M={policy:Y?.toolPayloadTransform,toolTransform:E?.transform},R=await NQ({phase:"input-available",toolName:L.toolName,toolCallId:L.toolCallId,input:L.args,providerMetadata:L.providerMetadata},M,X.logger),q=await NQ({phase:B,toolName:L.toolName,toolCallId:L.toolCallId,input:L.args,output:L.result,error:L.error,providerMetadata:L.providerMetadata},M,X.logger);return qK(qK(D,R),q)}if(K?.some((D)=>D?.result===void 0&&!D.providerExecuted)){let D=K.filter((B)=>B?.error&&!B.providerExecuted);if(D?.length)for(let B of D){let O=await N({type:"tool-error",runId:X.runId,from:"AGENT",payload:{error:B.error,args:B.args,toolCallId:B.toolCallId,toolName:B.toolName,providerMetadata:B.providerMetadata}},B,"error"),E=await Z(O);if(E)await X.options?.onChunk?.(E);X.messageList.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:B.toolCallId,toolName:I$(B.toolName),args:B.args,result:B.error?.message??B.error},...rZ(B.providerMetadata,O.metadata)?{providerMetadata:rZ(B.providerMetadata,O.metadata)}:{}})}let L=K.some((B)=>B.result===void 0&&!B.error&&!B.providerExecuted);if(D?.length>0&&!L){let B=K.filter((O)=>O.result!==void 0);if(B.length)for(let O of B){let E=!O.providerExecuted?await F(O):void 0,M=E??O.providerMetadata,R=await N({type:"tool-result",runId:X.runId,from:"AGENT",payload:{args:O.args,toolCallId:O.toolCallId,toolName:O.toolName,result:O.result,providerMetadata:M,providerExecuted:O.providerExecuted}},O,"output-available"),q=await Z(R);if(q)await X.options?.onChunk?.(q);if(!O.providerExecuted)X.messageList.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:O.toolCallId,toolName:I$(O.toolName),args:O.args,result:O.result},...rZ(E,R.metadata)?{providerMetadata:rZ(E,R.metadata)}:{}})}return V.stepResult.isContinued=!0,V.stepResult.reason="tool-calls",{...V,messages:{all:X.messageList.get.all.aiV5.model(),user:X.messageList.get.input.aiV5.model(),nonUser:X.messageList.get.response.aiV5.model()}}}if(V.stepResult.reason!=="retry")V.stepResult.isContinued=!1;return z({...V,messages:{all:X.messageList.get.all.aiV5.model(),user:X.messageList.get.input.aiV5.model(),nonUser:X.messageList.get.response.aiV5.model()}})}if(K?.length){for(let D of K){if(D.result===void 0)continue;let L=!D.providerExecuted?await F(D):void 0,B=L??D.providerMetadata,O=await N({type:"tool-result",runId:X.runId,from:"AGENT",payload:{args:D.args,toolCallId:D.toolCallId,toolName:D.toolName,result:D.result,providerMetadata:B,providerExecuted:D.providerExecuted}},D,"output-available"),E=await Z(O);if(E)await X.options?.onChunk?.(E);if(!D.providerExecuted)X.messageList.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:D.toolCallId,toolName:I$(D.toolName),args:D.args,result:D.result},...rZ(L,O.metadata)?{providerMetadata:rZ(L,O.metadata)}:{}})}if(X.requestContext?.get("__mastra_delegationBailed")&&Y)Y._delegationBailed=!0,X.requestContext.set("__mastra_delegationBailed",!1);return{...V,messages:{all:X.messageList.get.all.aiV5.model(),user:X.messageList.get.input.aiV5.model(),nonUser:X.messageList.get.response.aiV5.model()}}}return V}})}function I99({_internal:$,controller:Y,runId:X,messageList:G,mastra:J}){return o9({id:"signalDrainStep",inputSchema:fW,outputSchema:fW,execute:async({inputData:Q})=>{let W=Q,Z=$?.drainPendingSignals?.(X)??[];if(Z.length===0)return W;G.markResponseMessageBoundary(W.stepResult?.messageId??W.messageId);for(let K of Z){let H=G.addSignal(K);Y.enqueue(H.toDataPart())}return{...W,messageId:$?.generateId?.()??J?.generateId?.()??W.messageId,stepResult:{...W.stepResult,reason:"other",isContinued:!0},messages:{all:G.get.all.aiV5.model(),user:G.get.input.aiV5.model(),nonUser:G.get.response.aiV5.model()}}}})}function P99({tools:$,messageList:Y,options:X,outputWriter:G,controller:J,runId:Q,streamState:W,modelSpanTracker:Z,_internal:K,logger:H,agentId:z,mastra:V}){return o9({id:"toolCallStep",inputSchema:n24,outputSchema:r24,execute:async({inputData:A,suspend:F,resumeData:N,requestContext:D})=>{let L=K?.stepTools||$,B=K?.stepActiveTools,O=L?.[A.toolName]||mE(L,A.toolName)||Object.values(L||{})?.find((_)=>("id"in _)&&_.id===A.toolName),E={policy:K?.toolPayloadTransform,toolTransform:O?.transform},M=async(_,C,k)=>{let S="payload"in _?_.payload:{},T=S.args??A.args,v=typeof S.toolName==="string"?S.toolName:A.toolName,x=typeof S.toolCallId==="string"?S.toolCallId:A.toolCallId,y=S.providerMetadata??A.providerMetadata,d=await NQ({phase:"input-available",toolName:v,toolCallId:x,input:T,providerMetadata:y},E,H),u=C==="input-available"?void 0:await NQ({phase:C,toolName:v,toolCallId:x,input:T,output:k?.output,error:k?.error,suspendPayload:k?.suspendPayload,providerMetadata:y},E,H);return qK(qK(_,d),u)},R=({toolCallId:_,toolName:C,args:k,suspendPayload:S,resumeSchema:T,type:v,suspendedToolRunId:x,metadata:y})=>{let d=v==="suspension"?"suspendedTools":"pendingToolApprovals",b=[...Y.get.response.db()].reverse().find((g)=>g.role==="assistant");if(b){if(!b.content)return;let p=typeof b.content.metadata==="object"&&b.content.metadata!==null?b.content.metadata:{};p[d]=p[d]||{};let h=uY(y,"transcript","input-available")?.transformed,n=uY(y,"transcript","approval")?.transformed,t=uY(y,"transcript","suspend")?.transformed,s=v==="approval"?n??h??k:h??t??k,Z0=v==="suspension"?t??S:void 0;p[d][C]={toolCallId:_,toolName:C,args:s,type:v,runId:x??Q,...v==="suspension"?{suspendPayload:Z0}:{},resumeSchema:T,...y?{metadata:y}:{}},b.content.metadata=p}},q=async(_,C)=>{let{saveQueueManager:k,memoryConfig:S,threadId:T}=K||{};if(!k||!T)return;let v=(u)=>{let b=u.content;if(!b)return;return typeof b.metadata==="object"&&b.metadata!==null?b.metadata:void 0},x=C==="suspension"?"suspendedTools":"pendingToolApprovals",d=[...Y.get.all.db()].reverse().find((u)=>{if(!!v(u)?.[x]?.[_])return!0;let h=u.content.parts?.filter((n)=>n.type==="data-tool-call-suspended"||n.type==="data-tool-call-approval");if(h&&h.length>0){if(h.find((t)=>t.data.toolName===_))return!0}return!1});if(d){let u=v(d),b=u?.[x];if(!b)b=d.content.parts?.filter((g)=>g.type==="data-tool-call-suspended"||g.type==="data-tool-call-approval")?.reduce((g,p)=>{if(p.type==="data-tool-call-suspended"||p.type==="data-tool-call-approval")g[p.data.toolName]=p.data;return g},{});if(b&&typeof b==="object"){if(u)delete b[_];else d.content.parts=d.content.parts?.map((g)=>{if(g.type==="data-tool-call-suspended"||g.type==="data-tool-call-approval"){if(g.data.toolName===_)return{...g,data:{...g.data,resumed:!0}}}return g});if(u&&Object.keys(b).length===0)delete u[x];try{await k.flushMessages(Y,T,S)}catch(g){H?.error("Error removing tool suspension metadata:",g)}}}},w=async()=>{let{saveQueueManager:_,memoryConfig:C,threadId:k,resourceId:S,memory:T}=K||{};if(!_||!k)return;try{if(T&&!K.threadExists&&S){if(!await T.getThreadById?.({threadId:k}))await T.createThread?.({threadId:k,resourceId:S,memoryConfig:C});K.threadExists=!0}await _.flushMessages(Y,k,C)}catch(v){H?.error("Error flushing messages before suspension:",v)}};if(A.providerExecuted)return A;let I=L?.[A.toolName]?A.toolName:Object.entries(L||{}).find(([_,C])=>C===O)?.[0],P=B&&I&&!B.includes(I);if(!O||P){let _=B??Object.keys(L||{}),C=_.length>0?` Available tools: ${_.join(", ")}`:"";return{error:new J24(`Tool "${A.toolName}" not found.${C}. Call tools by their exact name only \u2014 never add prefixes, namespaces, or colons.`),...A}}if(O&&"onInputAvailable"in O)try{await O?.onInputAvailable?.({toolCallId:A.toolCallId,input:A.args,messages:Y.get.input.aiV5.model(),abortSignal:X?.abortSignal})}catch(_){H?.error("Error calling onInputAvailable",_)}if(!O.execute)return A;try{let _=D.get("__mastra_requireToolApproval"),C=void 0,k=A.args;if(typeof A.args==="object"&&A.args!==null){let{resumeData:X0,...a}=A.args;k=a,C=X0}let S=C??N,T=!!C,v=_||O.requireApproval;if(O.needsApprovalFn)try{v=await O.needsApprovalFn(k,{requestContext:D?Object.fromEntries(D.entries()):{},workspace:K?.stepWorkspace})}catch(X0){H?.error(`Error evaluating needsApprovalFn for tool ${A.toolName}:`,X0),v=!0}let x=W4(U.object({approved:U.boolean().describe("Controls if the tool call is approved or not, should be true when approved and false when declined")}));if(v){if(!S){let X0=await M({type:"tool-call-approval",runId:Q,from:"AGENT",payload:{toolCallId:A.toolCallId,toolName:A.toolName,args:A.args,resumeSchema:JSON.stringify($6(x))}},"approval");return A9(J,X0),R({toolCallId:A.toolCallId,toolName:A.toolName,args:A.args,type:"approval",resumeSchema:JSON.stringify($6(x)),metadata:X0.metadata}),await w(),F({requireToolApproval:{toolCallId:A.toolCallId,toolName:A.toolName,args:A.args},__streamState:W.serialize()},{resumeLabel:A.toolCallId})}else if(await q(A.toolName,"approval"),!S.approved)return{result:"Tool call was not approved by the user",...A}}let y=A.toolName?.startsWith("agent-"),d=A.toolName?.startsWith("workflow-"),u=!y&&v&&Object.keys(S).length===1&&"approved"in S?void 0:S,b={abortSignal:X?.abortSignal,toolCallId:A.toolCallId,messages:y?Y.get.all.aiV5.model():Y.get.input.aiV5.model(),outputWriter:G,tracingContext:Z?.getTracingContext(),workspace:K?.stepWorkspace,requestContext:D,flushMessages:K?.saveQueueManager&&K?.threadId?()=>K.saveQueueManager.flushMessages(Y,K.threadId,K.memoryConfig):void 0,suspend:async(X0,a)=>{if(a?.requireToolApproval){let Q0=await M({type:"tool-call-approval",runId:Q,from:"AGENT",payload:{toolCallId:A.toolCallId,toolName:A.toolName,args:A.args,resumeSchema:JSON.stringify($6(W4(U.object({approved:U.boolean().describe("Controls if the tool call is approved or not, should be true when approved and false when declined")}))))}},"approval");return A9(J,Q0),R({toolCallId:A.toolCallId,toolName:A.toolName,args:A.args,type:"approval",suspendedToolRunId:a.runId,resumeSchema:JSON.stringify($6(W4(U.object({approved:U.boolean().describe("Controls if the tool call is approved or not, should be true when approved and false when declined")})))),metadata:Q0.metadata}),await w(),F({requireToolApproval:{toolCallId:A.toolCallId,toolName:A.toolName,args:A.args},__streamState:W.serialize()},{resumeLabel:A.toolCallId})}else{let Q0=await M({type:"tool-call-suspended",runId:Q,from:"AGENT",payload:{toolCallId:A.toolCallId,toolName:A.toolName,suspendPayload:X0,args:A.args,resumeSchema:a?.resumeSchema}},"suspend",{suspendPayload:X0});return A9(J,Q0),R({toolCallId:A.toolCallId,toolName:A.toolName,args:k,suspendPayload:X0,suspendedToolRunId:a?.runId,type:"suspension",resumeSchema:a?.resumeSchema,metadata:Q0.metadata}),await w(),await F({toolCallSuspended:X0,__streamState:W.serialize(),toolName:A.toolName,resumeLabel:a?.resumeLabel},{resumeLabel:A.toolCallId})}},resumeData:u};if(u&&(y||d)){let X0="",a=!T||!k.suspendedToolRunId,e=[...Y.get.all.db()].reverse().filter((m)=>m.role==="assistant");for(let m of e){let $0=m.content.metadata?.suspendedTools||m.content.metadata?.pendingToolApprovals;if($0&&$0[A.toolName]){X0=$0[A.toolName].runId;break}if(a){let Y0=m.content.parts?.filter((K0)=>(K0.type==="data-tool-call-suspended"||K0.type==="data-tool-call-approval")&&!K0.data.resumed);if(Y0&&Y0.length>0){let K0=Y0.find((A0)=>A0.data.toolName===A.toolName);if(K0){X0=K0.data.runId;break}}}}if(X0)k.suspendedToolRunId=X0}if(!v&&T)await q(A.toolName,"suspension");if(k===null||k===void 0)return{error:Error(`Tool "${A.toolName}" received invalid arguments \u2014 the provided JSON could not be parsed. Please provide valid JSON arguments.`),...A};if(y){if(typeof k==="object"&&k!==null&&"prompt"in k)k.threadId=K?.threadId,k.resourceId=K?.resourceId}let p=V?.getServer?.()?.fga;if(p){let X0=D?.get("user"),{checkFGA:a,FGADeniedError:Q0}=await Promise.resolve().then(() => (Aj(),Vj));if(!X0)throw new Q0({id:"unknown"},{type:"tool",id:A.toolName},_z.TOOLS_EXECUTE);await a({fgaProvider:p,user:X0,resource:{type:"tool",id:A.toolName},permission:_z.TOOLS_EXECUTE})}let h=typeof k==="object"&&k!==null&&"_background"in k?k._background:void 0;if(h)delete k._background;let n=K?.backgroundTaskManager,t=K?.agentBackgroundConfig;if(n&&!t?.disabled&&typeof k==="object"&&k!==null){let X0=O.backgroundConfig,a=t,Q0=K?.backgroundTaskManagerConfig,e=I04({llmBgOverrides:h,toolName:A.toolName,toolConfig:X0,agentConfig:a,managerConfig:Q0});if(e.runInBackground){let m=K?.stepTools||$,$0=m?.[A.toolName]||Object.values(m||{})?.find((I0)=>("id"in I0)&&I0.id===A.toolName);if(!$0?.execute)throw new J24(A.toolName);let Y0=Promise.resolve(),K0=new Set,A0=q04(n,{toolName:A.toolName,toolCallId:A.toolCallId,args:k,agentId:z,threadId:K?.threadId,resourceId:K?.resourceId,timeoutMs:e.timeoutMs,maxRetries:e.maxRetries,runId:Q,context:{executor:{execute:(I0,g0)=>{return $0.execute(I0,{...b,...g0?.resumeData!==void 0?{resumeData:g0.resumeData}:{},suspend:async(p0,U4)=>{return await b.suspend?.(p0,U4),g0?.suspend?.(p0,U4)},outputWriter:async(p0)=>{return await g0?.onProgress?.(p0),b.outputWriter?.(p0)},abortSignal:g0?.abortSignal})}},onChunk:(I0)=>{Y0=Y0.then(async()=>{let g0=I0.payload.runId,p0=`${g0}:${I0.payload.toolCallId}`;if((g0!==Q||g0===Q&&N)&&!K0.has(p0))A9(J,await M({type:"tool-call",runId:g0,from:"AGENT",payload:{toolCallId:I0.payload.toolCallId,toolName:I0.payload.toolName,args:A.args,providerMetadata:A.providerMetadata,providerExecuted:A.providerExecuted}},"input-available")),K0.add(p0);if(I0.type==="background-task-completed")A9(J,await M({type:"tool-result",runId:g0,from:"AGENT",payload:{toolCallId:I0.payload.toolCallId,toolName:I0.payload.toolName,args:A.args,result:I0.payload.result,providerMetadata:A.providerMetadata,providerExecuted:A.providerExecuted}},"output-available",{output:I0.payload.result}));else if(I0.type==="background-task-failed")A9(J,await M({type:"tool-error",runId:g0,from:"AGENT",payload:{toolCallId:I0.payload.toolCallId,toolName:I0.payload.toolName,error:I0.payload.error,args:A.args,providerMetadata:A.providerMetadata,providerExecuted:A.providerExecuted}},"error",{error:I0.payload.error}))}).catch((g0)=>{H?.warn?.("Error transforming background task stream chunk",{toolCallId:I0.payload.toolCallId,toolName:I0.payload.toolName,runId:I0.payload.runId,error:g0,errorMessage:g0 instanceof Error?g0.message:void 0,errorStack:g0 instanceof Error?g0.stack:void 0})})},onResult:async(I0)=>{let g0=I0.status==="failed"?`Background task failed: ${I0.error?.message??"Unknown error"}`:I0.result,p0=qK({metadata:{}},await NQ({phase:"input-available",toolName:I0.toolName,toolCallId:I0.toolCallId,input:k,providerMetadata:A.providerMetadata},E,H));p0=qK(p0,await NQ({phase:I0.status==="failed"?"error":"output-available",toolName:I0.toolName,toolCallId:I0.toolCallId,input:k,output:I0.status==="failed"?void 0:I0.result,error:I0.status==="failed"?I0.error:void 0,providerMetadata:A.providerMetadata},E,H));let U4=uY(p0.metadata,"transcript","input-available"),P1=uY(p0.metadata,"transcript",I0.status==="failed"?"error":"output-available"),d1=f$(U4)?U4.transformed:k,C0=f$(P1)?P1.transformed:g0,n0=rZ(A.providerMetadata,p0.metadata);if(!Y.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:I0.toolCallId,toolName:I0.toolName,args:k,result:g0},...n0?{providerMetadata:n0}:{}},{mode:"stream",backgroundTasks:{[I0.toolCallId]:{startedAt:I0.startedAt,completedAt:I0.completedAt,taskId:I0.taskId}}})){if(I0.runId!==Q||I0.runId===Q&&N)Y.add([{role:"tool",type:"tool-call",id:K?.generateId?.()??M6(),createdAt:new Date,content:[{type:"tool-call",toolCallId:I0.toolCallId,toolName:I0.toolName,args:d1}]}],"response");Y.add([{role:"tool",content:[{type:"tool-result",toolCallId:I0.toolCallId,toolName:I0.toolName,result:C0,isError:I0.status==="failed"}]}],"response")}if(K?.saveQueueManager&&K?.threadId)await K.saveQueueManager.flushMessages(Y,K.threadId,K.memoryConfig)},onExecution:async(I0)=>{let g0=await NQ({phase:"input-available",toolName:I0.toolName,toolCallId:I0.toolCallId,input:k,providerMetadata:A.providerMetadata},E,H),p0=qK({metadata:{}},g0),U4=rZ(A.providerMetadata,p0.metadata);Y.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"call",toolCallId:I0.toolCallId,toolName:I0.toolName,args:k},...U4?{providerMetadata:U4}:{}},{mode:"stream",backgroundTasks:{[I0.toolCallId]:{startedAt:I0.startedAt,suspendedAt:I0.suspendedAt,taskId:I0.taskId}}})},onComplete:X0?.onComplete??a?.onTaskComplete,onFailed:X0?.onFailed??a?.onTaskFailed}});if(await A0.checkIfSuspended({toolCallId:A.toolCallId,runId:Q,agentId:z,threadId:K?.threadId,resourceId:K?.resourceId,toolName:A.toolName})&&u)return{result:`Background task resumed. Task ID: ${(await A0.resume(u)).id}. The tool "${A.toolName}" is running in the background. You will be notified when it completes.`,...A};let{task:O0,fallbackToSync:R0}=await A0.dispatch();if(!R0)return A9(J,{type:"background-task-started",runId:Q,from:"AGENT",payload:{taskId:O0.id,toolName:A.toolName,toolCallId:A.toolCallId}}),{result:`Background task started. Task ID: ${O0.id}. The tool "${A.toolName}" is running in the background. You will be notified when it completes.`,...A}}}let s=await O.execute(k,b),Z0=Fx0(s);if(O&&"onOutput"in O&&typeof O.onOutput==="function")try{await O.onOutput({toolCallId:A.toolCallId,toolName:A.toolName,output:Z0,abortSignal:X?.abortSignal})}catch(X0){H?.error("Error calling onOutput",X0)}return{result:Z0,...A}}catch(_){if(_ instanceof Error&&_.name==="FGADeniedError")throw _;return{error:_,...A}}}})}function w99({models:$,_internal:Y,...X}){let G=t24(X.toolCallConcurrency),J={concurrency:e24({requireToolApproval:X.requireToolApproval,tools:X.tools,activeTools:X.activeTools,configuredConcurrency:G})},Q=R99({models:$,_internal:Y,toolCallForeachOptions:J,...X}),W=P99({_internal:Y,...X}),Z=q99({models:$,_internal:Y,...X},Q),K=d89({_internal:Y,...X}),H=I99({_internal:Y,...X}),z=t89({_internal:Y,...X});return TQ({id:"executionWorkflow",inputSchema:fW,outputSchema:fW,options:{tracingPolicy:{internal:1},shouldPersistSnapshot:({workflowStatus:V})=>V==="suspended",validateInputs:!1}}).then(Q).map(async({inputData:V})=>{return V.output.toolCalls||[]},{id:"map-tool-calls"}).foreach(W,J).then(Z).then(K).then(H).then(z).commit()}function _99($){let{models:Y,_internal:X,messageId:G,runId:J,toolChoice:Q,messageList:W,modelSettings:Z,controller:K,outputWriter:H,...z}=$,V=[],A=0,F=!1,N=w99({messageId:G,models:Y,_internal:X,modelSettings:Z,toolChoice:Q,controller:K,outputWriter:H,messageList:W,runId:J,...z});return TQ({id:"agentic-loop",inputSchema:fW,outputSchema:fW,options:{tracingPolicy:{internal:1},shouldPersistSnapshot:(D)=>{return D.workflowStatus==="pending"||D.workflowStatus==="paused"||D.workflowStatus==="suspended"},validateInputs:!1}}).dowhile(N,async({inputData:D})=>{let L=D,B=!1,O=X.drainPendingSignals?.(J)??[];if(O.length>0){L.messageId=X?.generateId?.()??M6();for(let _ of O)W.add(_.toLLMMessage(),"input"),A9(K,_.toDataPart());if(L.stepResult)L.stepResult.isContinued=!0}if(F)B=!0,F=!1;let E=L.messages.nonUser.flatMap((_)=>_.content),M=E.slice(A);A=E.length;let R=M.filter((_)=>_.type==="tool-result"),q={content:M,usage:L.output.usage||{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:L.stepResult?.reason||"unknown",warnings:L.stepResult?.warnings||[],request:L.metadata?.request||{},response:{...L.metadata,modelId:L.metadata?.modelId||L.metadata?.model||"",messages:[]},text:L.output.text||"",reasoning:L.output.reasoning||[],reasoningText:L.output.reasoningText||"",files:L.output.files||[],toolCalls:L.output.toolCalls||[],toolResults:R,sources:L.output.sources||[],staticToolCalls:L.output.staticToolCalls||[],dynamicToolCalls:L.output.dynamicToolCalls||[],staticToolResults:R.filter((_)=>_.dynamic===!1),dynamicToolResults:R.filter((_)=>_.dynamic===!0),providerMetadata:L.metadata?.providerMetadata};if(V.push(q),z.stopWhen&&L.stepResult?.isContinued&&V.length>0){let _=V,k=(await Promise.all((Array.isArray(z.stopWhen)?z.stopWhen:[z.stopWhen]).map((S)=>{return S({steps:_})}))).some((S)=>S);B=B||k}if(z.onIterationComplete&&!L.backgroundTaskPending){let _=!L.stepResult?.isContinued||B,C={iteration:V.length,maxIterations:z.maxSteps,text:L.output.text||"",toolCalls:(L.output.toolCalls||[]).map((k)=>({id:k.toolCallId||k.id||"",name:k.toolName||k.name||"",args:k.args||{}})),toolResults:(L.output.toolResults||[]).map((k)=>({id:k.toolCallId||k.id||"",name:k.toolName||k.name||"",result:k.result,error:k.error})),isFinal:_,finishReason:L.stepResult?.reason||"unknown",runId:J,threadId:X?.threadId,resourceId:X?.resourceId,agentId:z.agentId,agentName:z.agentName||z.agentId,messages:W.get.all.db()};try{let k=await z.onIterationComplete(C);if(k){if(k.feedback&&L.stepResult?.isContinued){if(W.add({id:z.mastra?.generateId()||M6(),createdAt:new Date,type:"text",role:"assistant",content:{parts:[{type:"text",text:k.feedback}],metadata:{mode:"stream",completionResult:{suppressFeedback:!0}},format:2}},"response"),k.continue===!1)F=!0;else if(!B&&z.maxSteps&&V.length<z.maxSteps)B=!1,L.stepResult.isContinued=!0}else if(k.continue===!1&&!B)B=!0;else if(k.continue===!0&&(B||!L.stepResult?.isContinued)){if(z.maxSteps&&V.length<z.maxSteps||!z.maxSteps){if(B=!1,L.stepResult)L.stepResult.isContinued=!0}}}}catch(k){z.logger?.error("Error in onIterationComplete hook:",k)}}if(!B&&X?._delegationBailed)B=!0,X._delegationBailed=!1;if(L.stepResult)L.stepResult.isContinued=B?!1:L.stepResult.isContinued;let w=(L.output?.steps?.length??0)>0;if(L.stepResult?.reason!=="tripwire"||w)A9(K,{type:"step-finish",runId:J,from:"AGENT",payload:L});if(L.stepResult?.reason===void 0)return!1;return L.stepResult?.isContinued??!1}).commit()}function j99({resumeContext:$,requireToolApproval:Y,models:X,toolChoice:G,modelSettings:J,_internal:Q,messageId:W,runId:Z,messageList:K,startTimestamp:H,streamState:z,agentId:V,toolCallId:A,toolCallConcurrency:F,...N}){return new $2({start:async(D)=>{let L=N.requestContext??new p1,B=N.outputProcessors&&N.outputProcessors.length>0,O=B?new A5({outputProcessors:N.outputProcessors,logger:N.logger||new VU({level:"error"}),agentName:V||"unknown"}):void 0,E=B?new Map:void 0,M={custom:async(_)=>{A9(D,_)}},q=_99({resumeContext:$,messageId:W,models:X,_internal:Q,modelSettings:J,toolChoice:G,controller:D,outputWriter:async(_,C)=>{if(_.type.startsWith("data-")){let k=_;if(O){let{part:T,blocked:v,reason:x,tripwireOptions:y,processorId:d}=await O.processPart(_,N.processorStates??E,void 0,L,K,0,M);if(v){A9(D,{type:"tripwire",runId:Z,from:"AGENT",payload:{reason:x||"Output processor blocked content",retry:y?.retry,metadata:y?.metadata,processorId:d}});return}if(T)k=T;else return}let S=C?.messageId??W;if(typeof k.type==="string"&&k.type.startsWith("data-")&&S&&!(("transient"in k)&&k.transient)){let T={type:k.type,data:"data"in k?k.data:void 0},v={id:S,role:"assistant",content:{format:2,parts:[T]},createdAt:new Date,threadId:Q?.threadId,resourceId:Q?.resourceId};K.add(v,"response")}A9(D,k);return}if(O){let{part:k,blocked:S,reason:T,tripwireOptions:v,processorId:x}=await O.processPart(_,N.processorStates??E,void 0,L,K,0,M);if(S){A9(D,{type:"tripwire",runId:Z,from:"AGENT",payload:{reason:T||"Output processor blocked content",retry:v?.retry,metadata:v?.metadata,processorId:x}});return}if(!k)return;A9(D,k);return}A9(D,_)},runId:Z,messageList:K,startTimestamp:H,streamState:z,agentId:V,requireToolApproval:Y,toolCallConcurrency:F,...N});if(N.mastra)q.__registerMastra(N.mastra);let w={messageId:W,messages:{all:K.get.all.aiV5.model(),user:K.get.input.aiV5.model(),nonUser:[]},output:{steps:[],usage:{inputTokens:0,outputTokens:0,totalTokens:0}},metadata:{},stepResult:{reason:"undefined",warnings:[],isContinued:!0,totalUsage:{inputTokens:0,outputTokens:0,totalTokens:0}}};if(!$)A9(D,{type:"start",runId:Z,from:"AGENT",payload:{id:V,messageId:W}});let I=await q.createRun({runId:Z,resourceId:Q?.resourceId});if(Y)L.set("__mastra_requireToolApproval",!0);let P=$?await I.resume({resumeData:$.resumeData,...g4(N.modelSpanTracker?.getTracingContext()),requestContext:L,label:A}):await I.start({inputData:w,...g4(N.modelSpanTracker?.getTracingContext()),requestContext:L});if(P.status!=="success"){if(P.status==="failed"){let _=XG(P.error,{fallbackMessage:"Unknown error in agent workflow stream"});if(A9(D,{type:"error",runId:Z,from:"AGENT",payload:{error:_}}),N.options?.onError)await N.options?.onError?.({error:_})}if(P.status!=="suspended")await q.deleteWorkflowRunById(Z);E70(D);return}await q.deleteWorkflowRunById(Z),A9(D,{type:"finish",runId:Z,from:"AGENT",payload:{...P.result,stepResult:{...P.result.stepResult,reason:P.result.stepResult.reason}}}),E70(D)}})}function T99({resumeContext:$,models:Y,logger:X,runId:G,idGenerator:J,messageList:Q,includeRawChunks:W,modelSettings:Z,tools:K,_internal:H,outputProcessors:z,returnScorerData:V,requireToolApproval:A,agentId:F,toolCallConcurrency:N,...D}){let L=X||new VU({level:"debug"});if(Y.length===0||!Y[0]){let x=new G0({id:"LOOP_MODELS_EMPTY",domain:"LLM",category:"USER"});throw L.trackException(x),x}let B=Y[0],O=G;if(!O)O=J?.({idType:"run",source:"agent",entityId:F,threadId:H?.threadId,resourceId:H?.resourceId})||crypto.randomUUID();let E={now:H?.now||(()=>Date.now()),generateId:H?.generateId||(()=>HO()),currentDate:H?.currentDate||(()=>new Date),saveQueueManager:H?.saveQueueManager,memoryConfig:H?.memoryConfig,threadId:H?.threadId,resourceId:H?.resourceId,memory:H?.memory,threadExists:H?.threadExists,transportRef:H?.transportRef??{},backgroundTaskManager:H?.backgroundTaskManager,agentBackgroundConfig:H?.agentBackgroundConfig,backgroundTaskManagerConfig:H?.backgroundTaskManagerConfig,skipBgTaskWait:H?.skipBgTaskWait,drainPendingSignals:H?.drainPendingSignals,initialSignalEchoes:H?.initialSignalEchoes?[...H.initialSignalEchoes]:void 0},M=E.now?.(),R=D.experimental_generateMessageId?.()||E.generateId?.(),q,w=()=>{return q?.serializeState()},I=(x)=>{q?.deserializeState(x)},P=D.processorStates??new Map,_={resumeContext:$,models:Y,runId:O,logger:L,startTimestamp:M,messageList:Q,includeRawChunks:!!W,_internal:E,tools:K,modelSettings:Z,outputProcessors:z,messageId:R,agentId:F,requireToolApproval:A,toolCallConcurrency:N,streamState:{serialize:w,deserialize:I},processorStates:P,...D},C=$?.snapshot,k;if(C)for(let x in C?.context){let y=C?.context[x];if(y&&y.status==="suspended"&&y.suspendPayload?.__streamState){k=y.suspendPayload?.__streamState;break}}let S=j99(_),T=D.modelSpanTracker?.wrapStream(S)??S,v=g4(D.modelSpanTracker?.getTracingContext());return q=new dj({model:{modelId:B.model.modelId,provider:B.model.provider,version:B.model.specificationVersion},stream:T,messageList:Q,messageId:R,options:{runId:O,toolCallStreaming:D.toolCallStreaming,onFinish:D.options?.onFinish,onStepFinish:D.options?.onStepFinish,includeRawChunks:!!W,structuredOutput:D.structuredOutput,outputProcessors:z,returnScorerData:V,...v,requestContext:D.requestContext,processorStates:P,transportRef:E.transportRef},initialState:k}),z59(q)}function $K4($){let Y="",X=!1,G=0;while(G<$.length){let J=$[G];if(J==="\\"&&G+1<$.length){Y+=J+$[G+1],G+=2;continue}if(J==='"'){X=!X,Y+=J,G++;continue}if(X){if(J===`
`){Y+="\\n",G++;continue}if(J==="\r"){Y+="\\r",G++;continue}if(J==="\t"){Y+="\\t",G++;continue}}Y+=J,G++}return Y}function x99({schema:$}){let Y=$?W4($):void 0;switch(I70(Y)?.outputFormat){case"array":return new k99(Y);case"enum":return new v99(Y);case"object":default:return new S99(Y)}}function y99({structuredOutput:$,logger:Y}){let X=x99({schema:$?.schema}),G="",J=void 0,Q,W;return new FV({async transform(K,H){if(K.runId)Q=K.runId;if(K.type==="text-delta"&&typeof K.payload?.text==="string"){G+=K.payload.text;let z=await X.processPartialChunk({accumulatedText:G,previousObject:J});if(z.shouldEmit){J=z.newPreviousResult??J;let V={from:K.from,runId:K.runId,type:"object",object:z.emitValue};H.enqueue(V)}}if(K.type==="text-end"){if(H.enqueue(K),G?.trim()&&!W){if(W=await X.validateAndTransformFinal(G),W.success)H.enqueue({from:"AGENT",runId:Q??"",type:"object-result",object:W.value})}return}H.enqueue(K)},async flush(K){if(W&&!W.success)Z(W.error,K);if(G?.trim()&&!W)if(W=await X.validateAndTransformFinal(G),W.success)K.enqueue({from:"AGENT",runId:Q??"",type:"object-result",object:W.value});else Z(W.error,K)}});function Z(K,H){if($?.errorStrategy==="warn")Y?.warn(K.message);else if($?.errorStrategy==="fallback")H.enqueue({from:"AGENT",runId:Q??"",type:"object-result",object:$.fallbackValue});else H.enqueue({from:"AGENT",runId:Q??"",type:"error",payload:{error:K}})}}function b99($){let Y=0,X=!1,G=0,J=I70($);return new FV({transform(Q,W){if(Q.type!=="object"||!Q.object)return;if(J?.outputFormat==="array"&&Array.isArray(Q.object)){if(G++,G===1){if(Q.object.length>0){W.enqueue(JSON.stringify(Q.object)),Y=Q.object.length,X=!0;return}}if(!X)W.enqueue("["),X=!0;for(let Z=Y;Z<Q.object.length;Z++){let K=JSON.stringify(Q.object[Z]);if(Z>0)W.enqueue(","+K);else W.enqueue(K)}Y=Q.object.length}else W.enqueue(JSON.stringify(Q.object))},flush(Q){if(X&&J?.outputFormat==="array"&&G>1)Q.enqueue("]")}})}function $u($){if(V5($))return $6($);try{let Y=W4($);return $6(Y)}catch{throw Error("We could not convert the schema to a JSONSchema")}}function Q24($){if($===!0)return!0;if(!$||$===!1)return!1;if(typeof $!=="object")return!1;return $.enabled!==!1}function P70($,Y){let X=typeof $?.getConfig==="function"?$.getConfig().observationalMemory:void 0,G=Y&&typeof Y==="object"&&"observationalMemory"in Y?Y.observationalMemory:void 0;if(Q24(G)||G===void 0&&Q24(X))throw new G0({id:"AGENT_NETWORK_OBSERVATIONAL_MEMORY_UNSUPPORTED",domain:"AGENT_NETWORK",category:"USER",text:h99,details:{status:400}})}async function Vg0($){if(!$?.trim())return null;let Y=$K4($),{value:X,state:G}=await gF(Y);if(G==="successful-parse"||G==="repaired-parse")return X;return null}function f99($){return $.filter((Y)=>{if(Y.role==="user")return!0;if(Y.role==="assistant"){let X=Y.content?.metadata;if(X?.mode==="network"||X?.completionResult)return!1;let G=Y.content?.parts??[];for(let J of G)if(J?.type==="text"&&J?.text)try{let Q=JSON.parse(J.text);if(Q.isNetwork)return!1;if(Q.primitiveId&&Q.selectionReason)return!1}catch{}return!0}return!1})}async function Ag0({requestContext:$,agent:Y,routingConfig:X,memoryConfig:G}){let J=await Y.getInstructions({requestContext:$}),Q=await Y.listAgents({requestContext:$}),W=await Y.listWorkflows({requestContext:$}),Z=await Y.listTools({requestContext:$}),K=await Y.getModel({requestContext:$}),H=await Y.getMemory({requestContext:$});P70(H,G);let z=(await Y.getDefaultOptions({requestContext:$}))?.clientTools,V=await Y.listConfiguredInputProcessors($),A=await Y.listConfiguredOutputProcessors($),F=Object.entries(Q).map(([E,M])=>{return` - **${E}**: ${M.getDescription()}`}).join(`
`),N=Object.entries(W).map(([E,M])=>{return` - **${E}**: ${M.description}, input schema: ${JSON.stringify($u(M.inputSchema??U.object({})))}`}).join(`
`),D=await H?.listTools?.(),L=Object.entries({...Z,...D,...z||{}}).map(([E,M])=>{let R="inputSchema"in M?M.inputSchema??U.object({}):U.object({});return` - **${E}**: ${M.description}, input schema: ${JSON.stringify($u(R))}`}).join(`
`),B=X?.additionalInstructions?`
## Additional Instructions
${X.additionalInstructions}`:"",O=`
          You are a router in a network of specialized AI agents.
          Your job is to decide which agent should handle each step of a task.
          If asking for completion of a task, make sure to follow system instructions closely.

          Every step will result in a prompt message. It will be a JSON object with a "selectionReason" and "finalResult" property. Make your decision based on previous decision history, as well as the overall task criteria. If you already called a primitive, you shouldn't need to call it again, unless you strongly believe it adds something to the task completion criteria. Make sure to call enough primitives to complete the task.

          ## System Instructions
          ${J}
          You can only pick agents and workflows that are available in the lists below. Never call any agents or workflows that are not available in the lists below.
          ## Available Agents in Network
          ${F}
          ## Available Workflows in Network (make sure to use inputs corresponding to the input schema when calling a workflow)
          ${N}
          ## Available Tools in Network (make sure to use inputs corresponding to the input schema when calling a tool)
          ${L}
          If you have multiple entries that need to be called with a workflow or agent, call them separately with each input.
          When calling a workflow, the prompt should be a JSON value that corresponds to the input schema of the workflow. The JSON value is stringified.
          When calling a tool, the prompt should be a JSON value that corresponds to the input schema of the tool. The JSON value is stringified.
          When calling an agent, the prompt should be a text value, like you would call an LLM in a chat interface.
          Keep in mind that the user only sees the final result of the task. When reviewing completion, you should know that the user will not see the intermediate results.
          ${B}
        `;return new YJ({id:"routing-agent",name:"Routing Agent",instructions:O,model:K,memory:H,inputProcessors:V,outputProcessors:A,_agentNetworkAppend:!0})}function g99($){let Y="";if(typeof $==="string")Y=$;else{let X=Array.isArray($)?$[$.length-1]:$;if(typeof X==="string")Y=X;else if(X&&"content"in X&&X?.content){let G=X.content;if(typeof G==="string")Y=G;else if(Array.isArray(G)){let J=G[G.length-1];if(J?.type==="text")Y=J.text}}else if(X&&"parts"in X&&X?.parts){let G=X.parts;if(Array.isArray(G)){let J=G[G.length-1];if(J?.type==="text"&&J?.text)Y=J.text}}}return Y}async function m99({threadId:$,resourceId:Y,messages:X,routingAgent:G,requestContext:J,generateId:Q,memoryConfig:W,...Z}){let K=$4(Z),H=await G.getMemory({requestContext:J});P70(H,W);let z=await H?.getThreadById({threadId:$});if(!z)z=await H?.createThread({threadId:$,title:`New Thread ${new Date().toISOString()}`,resourceId:Y});let V,A=[];if(typeof X==="string"){if(V=X,H)A.push(H.saveMessages({messages:[{id:Q({idType:"message",source:"agent",threadId:z?.id,resourceId:z?.resourceId,role:"user"}),type:"text",role:"user",content:{parts:[{type:"text",text:X}],format:2},createdAt:new Date,threadId:z?.id,resourceId:z?.resourceId}],observabilityContext:K}))}else{let F=new l6({threadId:z?.id,resourceId:z?.resourceId});F.add(X,"user");let N=F.get.all.db();if(H)A.push(H.saveMessages({messages:N,observabilityContext:K}));let D=F.get.all.ui();V=G.getMostRecentUserMessage(D)?.content}if(z&&H){let F=H.getMergedThreadConfig(W||{}),{shouldGenerate:N,model:D,instructions:L}=G.resolveTitleGenerationConfig(F?.generateTitle);if(N&&V){if((await H.recall({threadId:z.id,resourceId:z.resourceId,observabilityContext:K})).messages.filter((M)=>M.role==="user").length===0)A.push(G.genTitle(V,J,K,D,L).then((M)=>{if(M)return H.createThread({threadId:z.id,resourceId:z.resourceId,memoryConfig:W,title:M,metadata:z.metadata})}))}}return await Promise.all(A),{thread:z}}async function vD($,Y,X,G){if(!$)return;let{requestContext:J,...Q}=G??{},W=$4(Q);if(!X||Y.length===0){await $.saveMessages({messages:Y,observabilityContext:W});return}let Z=new l6;for(let H of Y)Z.add(H,"response");await X.runOutputProcessors(Z,W,J);let K=Z.get.response.db();await $.saveMessages({messages:K,observabilityContext:W})}async function W24({memory:$,finalResult:Y,threadId:X,resourceId:G,generateId:J,processorRunner:Q,requestContext:W}){if($&&Y)await vD($,[{id:J(),type:"text",role:"assistant",content:{parts:[{type:"text",text:Y}],format:2},createdAt:new Date,threadId:X,resourceId:G}],Q,{requestContext:W})}async function u99({networkName:$,requestContext:Y,runId:X,agent:G,generateId:J,routingAgentOptions:Q,routingAgentMemoryConfig:W,routing:Z,onStepFinish:K,onError:H,onAbort:z,abortSignal:V}){P70(await G.getMemory({requestContext:Y}),W);async function A(R){return await z?.({primitiveType:R.primitiveType,primitiveId:R.primitiveId,iteration:R.iteration}),await R.writer?.write({type:R.eventType,runId:X,from:"NETWORK",payload:{primitiveType:R.primitiveType,primitiveId:R.primitiveId}}),{task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:"Aborted",isComplete:!0,iteration:R.iteration}}let F=await G.listConfiguredOutputProcessors(Y),N=F.length>0?new A5({outputProcessors:F,inputProcessors:[],logger:G.getMastraInstance()?.getLogger()||Vy0,agentName:G.name}):null,D=o9({id:"routing-agent-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,result:U.string().optional(),iteration:U.number(),threadId:U.string().optional(),threadResourceId:U.string().optional(),isOneOff:U.boolean(),verboseIntrospection:U.boolean()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),selectionReason:U.string(),iteration:U.number(),conversationContext:U.array(U.any()).optional()}),execute:async({inputData:R,getInitData:q,writer:w})=>{if(V?.aborted)return{...await A({writer:w,eventType:"routing-agent-abort",primitiveType:"routing",primitiveId:"routing-agent",iteration:R.iteration,task:R.task}),primitiveId:"none",primitiveType:"none",prompt:"",selectionReason:"Aborted",conversationContext:[]};let I=await q(),P=await Ag0({requestContext:Y,agent:G,routingConfig:Z,memoryConfig:W}),_=(R.iteration??-1)+1,C=J({idType:"step",source:"agent",stepType:"routing-agent"});await w.write({type:"routing-agent-start",payload:{networkId:G.id,agentId:P.id,runId:C,inputData:{...R,iteration:_}},runId:X,from:"NETWORK"});let k=[{role:"assistant",content:`
                    ${R.isOneOff?"You are executing just one primitive based on the user task. Make sure to pick the primitive that is the best suited to accomplish the whole task. Primitives that execute only part of the task should be avoided.":"You will be calling just *one* primitive at a time to accomplish the user task, every call to you is one decision in the process of accomplishing the user task. Make sure to pick primitives that are the best suited to accomplish the whole task. Completeness is the highest priority."}

                    The user has given you the following task:
                    ${R.task}

                    # Rules:

                    ## Agent:
                    - prompt should be a text value, like you would call an LLM in a chat interface.
                    - If you are calling the same agent again, make sure to adjust the prompt to be more specific.

                    ## Workflow/Tool:
                    - prompt should be a JSON value that corresponds to the input schema of the workflow or tool. The JSON value is stringified.
                    - Make sure to use inputs corresponding to the input schema when calling a workflow or tool.

                    DO NOT CALL THE PRIMITIVE YOURSELF. Make sure to not call the same primitive twice, unless you call it with different arguments and believe it adds something to the task completion criteria. Take into account previous decision making history and results in your decision making and final result. These are messages whose text is a JSON structure with "isNetwork" true.

                    Please select the most appropriate primitive to handle this task and the prompt to be sent to the primitive. If no primitive is appropriate, return "none" for the primitiveId and "none" for the primitiveType.

                    {
                        "primitiveId": string,
                        "primitiveType": "agent" | "workflow" | "tool",
                        "prompt": string,
                        "selectionReason": string
                    }

                    The 'selectionReason' property should explain why you picked the primitive${R.verboseIntrospection?", as well as why the other primitives were not picked.":"."}
                    `.trim()}],S={structuredOutput:{schema:U.object({primitiveId:U.string().describe("The id of the primitive to be called"),primitiveType:_X.describe("The type of the primitive to be called"),prompt:U.string().describe("The json string or text value to be sent to the primitive"),selectionReason:U.string().describe("The reason you picked the primitive")})},requestContext:Y,maxSteps:1,memory:{thread:I?.threadId??X,resource:I?.threadResourceId??$,options:{readOnly:!0,workingMemory:{enabled:!1}}},...Q,abortSignal:V,onAbort:z},T;try{T=await M70(P,k,S)}catch(u){if(V?.aborted)return{...await A({writer:w,eventType:"routing-agent-abort",primitiveType:"routing",primitiveId:"routing-agent",iteration:_,task:R.task}),primitiveId:"none",primitiveType:"none",prompt:"",selectionReason:"Aborted",conversationContext:[]};throw u}if(V?.aborted)return{...await A({writer:w,eventType:"routing-agent-abort",primitiveType:"routing",primitiveId:"routing-agent",iteration:_,task:R.task}),primitiveId:"none",primitiveType:"none",prompt:"",selectionReason:"Aborted",conversationContext:[]};let v=await T.object;if(!v)throw new G0({id:"AGENT_NETWORK_ROUTING_AGENT_INVALID_OUTPUT",domain:"AGENT_NETWORK",category:"SYSTEM",text:"Routing agent returned undefined for 'object'. This may indicate an issue with the model's response or structured output parsing.",details:{finishReason:T.finishReason??null,usage:JSON.stringify(T.usage)??null}});let x=v.primitiveId==="none"&&v.primitiveType==="none",y=f99(T.rememberedMessages??[]),d={task:R.task,result:x?v.selectionReason:"",primitiveId:v.primitiveId,primitiveType:v.primitiveType,prompt:v.prompt,isComplete:x,selectionReason:v.selectionReason,iteration:_,runId:C,conversationContext:y};return await w.write({type:"routing-agent-end",payload:{...d,usage:T.usage},from:"NETWORK",runId:X}),d}}),L=o9({id:"agent-execution-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),selectionReason:U.string(),iteration:U.number(),conversationContext:U.array(U.any()).optional()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,result:U.string(),isComplete:U.boolean().optional(),iteration:U.number()}),execute:async({inputData:R,writer:q,getInitData:w,suspend:I,resumeData:P})=>{if(V?.aborted)return A({writer:q,eventType:"agent-execution-abort",primitiveType:"agent",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});let C=(await G.listAgents({requestContext:Y}))[R.primitiveId];if(!C)throw new G0({id:"AGENT_NETWORK_AGENT_EXECUTION_STEP_INVALID_TASK_INPUT",domain:"AGENT_NETWORK",category:"USER",text:`Agent ${R.primitiveId} not found`});let k=C.id,S=J({idType:"step",source:"agent",entityId:k,stepType:"agent-execution"});await q.write({type:"agent-execution-start",payload:{agentId:k,args:R,runId:S},from:"NETWORK",runId:X});let T=await w(),v=T?.threadId||X,x=T?.threadResourceId||$,d=[...R.conversationContext??[],{role:"user",content:R.prompt}],u=await(P?C.resumeStream(P,{requestContext:Y,runId:X,memory:{thread:v,resource:x,options:{lastMessages:0}},onStepFinish:K,onError:H,abortSignal:V,onAbort:z}):C.stream(d,{requestContext:Y,runId:X,memory:{thread:v,resource:x,options:{lastMessages:0}},onStepFinish:K,onError:H,abortSignal:V,onAbort:z})),b,g,p=!1,h=!1;for await(let Z0 of u.fullStream){if(await q.write({type:`agent-execution-event-${Z0.type}`,payload:{...Z0,runId:S},from:"NETWORK",runId:X}),Z0.type==="tool-call-approval")b={...b??{},[R.primitiveId]:{resumeSchema:Z0.payload.resumeSchema,args:{prompt:R.prompt},toolName:R.primitiveId,toolCallId:R.primitiveId,runId:X,type:"approval",primitiveType:"agent",primitiveId:R.primitiveId}};if(Z0.type==="tool-call-suspended")g={...g??{},[R.primitiveId]:{suspendPayload:Z0.payload.suspendPayload,resumeSchema:Z0.payload.resumeSchema,toolName:R.primitiveId,toolCallId:R.primitiveId,args:{prompt:R.prompt},runId:X,type:"suspension",primitiveType:"agent",primitiveId:R.primitiveId}};if(Z0.type==="tool-result"){if(Z0.payload.result==="Tool call was not approved by the user")p=!0}if(Z0.type==="abort")h=!0}let n=await G.getMemory({requestContext:Y}),t=u.messageList.get.all.v1(),s=await u.text;if(p)s=s+`

Tool call was not approved by the user`;if(h)return A({writer:q,eventType:"agent-execution-abort",primitiveType:"agent",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});if(await vD(n,[{id:J({idType:"message",source:"agent",entityId:k,threadId:T?.threadId||X,resourceId:T?.threadResourceId||$,role:"assistant"}),type:"text",role:"assistant",content:{parts:[{type:"text",text:JSON.stringify({isNetwork:!0,selectionReason:R.selectionReason,primitiveType:R.primitiveType,primitiveId:R.primitiveId,input:R.prompt,finalResult:{text:s,messages:t}})}],format:2,metadata:{mode:"network",...b?{requireApprovalMetadata:b}:{},...g?{suspendedTools:g}:{}}},createdAt:new Date,threadId:T?.threadId||X,resourceId:T?.threadResourceId||$}],N,{requestContext:Y}),b||g)return await q.write({type:b?"agent-execution-approval":"agent-execution-suspended",payload:{args:{prompt:R.prompt},agentId:k,runId:S,toolName:R.primitiveId,toolCallId:R.primitiveId,usage:await u.usage,selectionReason:R.selectionReason,...b?{resumeSchema:b[R.primitiveId].resumeSchema}:{},...g?{resumeSchema:g[R.primitiveId].resumeSchema,suspendPayload:g[R.primitiveId].suspendPayload}:{}},from:"NETWORK",runId:X}),await I({...b?{requireToolApproval:b[R.primitiveId]}:{},...g?{toolCallSuspended:g[R.primitiveId].suspendPayload,args:R.prompt,agentId:k}:{},runId:S});else{let Z0={task:R.task,agentId:k,result:s,isComplete:!1,iteration:R.iteration,runId:S};return await q.write({type:"agent-execution-end",payload:{...Z0,usage:await u.usage},from:"NETWORK",runId:X}),{task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:s,isComplete:!1,iteration:R.iteration}}}}),B=o9({id:"workflow-execution-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),selectionReason:U.string(),iteration:U.number(),conversationContext:U.array(U.any()).optional()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,result:U.string(),isComplete:U.boolean().optional(),iteration:U.number()}),execute:async({inputData:R,writer:q,getInitData:w,suspend:I,resumeData:P,mastra:_})=>{if(V?.aborted)return A({writer:q,eventType:"workflow-execution-abort",primitiveType:"workflow",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});let C=await G.listWorkflows({requestContext:Y}),k=R.primitiveId,S=C[k];if(!S)throw new G0({id:"AGENT_NETWORK_WORKFLOW_EXECUTION_STEP_INVALID_TASK_INPUT",domain:"AGENT_NETWORK",category:"USER",text:`Workflow ${k} not found`});let T=await Vg0(R.prompt);if(T===null)return _?.getLogger()?.warn(`Workflow execution step received invalid JSON prompt for workflow "${R.primitiveId}". Prompt was: "${R.prompt}". Returning error to routing agent for retry.`),{task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:`Error: The prompt provided for workflow "${R.primitiveId}" is not valid JSON. Received: "${R.prompt}". Workflows require a valid JSON string matching their input schema. Please provide the prompt as properly formatted JSON (e.g., {"key": "value"}).`,isComplete:!1,iteration:R.iteration};let v=J({idType:"step",source:"workflow",entityId:S.id,stepType:"workflow-execution"}),x=await S.createRun({runId:X}),y=async()=>{await x.cancel(),await z?.({primitiveType:"workflow",primitiveId:R.primitiveId,iteration:R.iteration})};if(V)V.addEventListener("abort",y);let d={workflowId:S.id,args:R,runId:v};await q?.write({type:"workflow-execution-start",payload:d,from:"NETWORK",runId:X});let u=P?x.resumeStream({resumeData:P,requestContext:Y}):x.stream({inputData:T,requestContext:Y}),b=!1,g=[];for await(let a of u.fullStream)if(g.push(a),await q?.write({type:`workflow-execution-event-${a.type}`,payload:{...a,runId:v},from:"NETWORK",runId:X}),a.type==="workflow-canceled")b=!0;let p=!0,h=await u.result;if(!h?.status||h?.status==="failed")p=!1;let n,t;if(h?.status==="suspended"){let a=h?.suspended?.[0]?.[0];if(t=h?.steps?.[a]?.suspendPayload,t?.__workflow_meta)delete t.__workflow_meta;let Q0=[...h?.suspended?.[0]??[]],e=S;while(Q0.length>0){let $0=Q0.shift();if($0){if(!e.steps[$0]){_?.getLogger()?.warn(`Suspended step '${$0}' not found in workflow '${k}'`);break}e=e.steps[$0]}}let m=e?.resumeSchema;if(m)n=JSON.stringify($u(m));else n=""}let s=JSON.stringify({isNetwork:!0,primitiveType:R.primitiveType,primitiveId:R.primitiveId,selectionReason:R.selectionReason,input:T,finalResult:{runId:x.runId,runResult:h,chunks:g,runSuccess:p}}),Z0=await G.getMemory({requestContext:Y}),X0=await w();if(b&&V?.aborted)return A({writer:q,eventType:"workflow-execution-abort",primitiveType:"workflow",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});if(await vD(Z0,[{id:J({idType:"message",source:"workflow",entityId:S.id,threadId:X0?.threadId||X,resourceId:X0?.threadResourceId||$,role:"assistant"}),type:"text",role:"assistant",content:{parts:[{type:"text",text:s}],format:2,metadata:{mode:"network",...t?{suspendedTools:{[R.primitiveId]:{args:T,suspendPayload:t,runId:X,type:"suspension",resumeSchema:n,workflowId:k,primitiveType:"workflow",primitiveId:R.primitiveId,toolName:R.primitiveId,toolCallId:R.primitiveId}}}:{}}},createdAt:new Date,threadId:X0?.threadId||X,resourceId:X0?.threadResourceId||$}],N,{requestContext:Y}),t)return await q?.write({type:"workflow-execution-suspended",payload:{args:T,workflowId:k,suspendPayload:t,resumeSchema:n,name:S.name,runId:v,usage:await u.usage,selectionReason:R.selectionReason,toolName:R.primitiveId,toolCallId:R.primitiveId},from:"NETWORK",runId:X}),I({...d,workflowSuspended:t});else{let a={task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:s,isComplete:!1,iteration:R.iteration};return await q?.write({type:"workflow-execution-end",payload:{...a,result:h,name:S.name,runId:v,usage:await u.usage},from:"NETWORK",runId:X}),a}}}),O=o9({id:"tool-execution-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),selectionReason:U.string(),iteration:U.number(),conversationContext:U.array(U.any()).optional()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,result:U.string(),isComplete:U.boolean().optional(),iteration:U.number()}),resumeSchema:U.object({approved:U.boolean().describe("Controls if the tool call is approved or not, should be true when approved and false when declined")}),execute:async({inputData:R,getInitData:q,writer:w,resumeData:I,mastra:P,suspend:_})=>{let C=await q(),k=P?.getLogger();if(V?.aborted)return A({writer:w,eventType:"tool-execution-abort",primitiveType:"tool",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});let S=await G.listTools({requestContext:Y}),T=await G.getMemory({requestContext:Y}),v=await T?.listTools?.(),x=(await G.getDefaultOptions({requestContext:Y}))?.clientTools,d={...S,...v,...x||{}}[R.primitiveId];if(!d)throw new G0({id:"AGENT_NETWORK_TOOL_EXECUTION_STEP_INVALID_TASK_INPUT",domain:"AGENT_NETWORK",category:"USER",text:`Tool ${R.primitiveId} not found`});if(!d.execute)throw new G0({id:"AGENT_NETWORK_TOOL_EXECUTION_STEP_INVALID_TASK_INPUT",domain:"AGENT_NETWORK",category:"USER",text:`Tool ${R.primitiveId} does not have an execute function`});let u="id"in d&&typeof d.id==="string"?d.id:R.primitiveId,b=await Vg0(R.prompt);if(b===null)return k?.warn(`Tool execution step received invalid JSON prompt for tool "${u}". Prompt was: "${R.prompt}". Returning error to routing agent for retry.`),{task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:`Error: The prompt provided for tool "${u}" is not valid JSON. Received: "${R.prompt}". Tools require a valid JSON string matching their input schema. Please provide the prompt as properly formatted JSON (e.g., {"key": "value"}).`,isComplete:!1,iteration:R.iteration};let g=J({idType:"step",source:"agent",entityId:u,stepType:"tool-execution"});await w?.write({type:"tool-execution-start",payload:{args:{...R,args:b,toolName:u,toolCallId:g},runId:X},from:"NETWORK",runId:X});let p=d.requireApproval;if(d.needsApprovalFn)try{p=await d.needsApprovalFn(b)}catch(s){k?.error(`Error evaluating needsApprovalFn for tool ${u}:`,s),p=!0}if(p){if(V?.aborted)return A({writer:w,eventType:"tool-execution-abort",primitiveType:"tool",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});if(!I){let s=U.object({approved:U.boolean().describe("Controls if the tool call is approved or not, should be true when approved and false when declined")}),Z0=JSON.stringify($6(W4(s)));return await vD(T,[{id:J(),type:"text",role:"assistant",content:{parts:[{type:"text",text:JSON.stringify({isNetwork:!0,selectionReason:R.selectionReason,primitiveType:R.primitiveType,primitiveId:R.primitiveId,finalResult:{result:"",toolCallId:g},input:b})}],format:2,metadata:{mode:"network",requireApprovalMetadata:{[R.primitiveId]:{toolCallId:g,toolName:R.primitiveId,args:b,type:"approval",resumeSchema:Z0,runId:X,primitiveType:"tool",primitiveId:R.primitiveId}}}},createdAt:new Date,threadId:C.threadId||X,resourceId:C.threadResourceId||$}],N,{requestContext:Y}),await w?.write({type:"tool-execution-approval",payload:{toolName:R.primitiveId,toolCallId:g,args:b,selectionReason:R.selectionReason,resumeSchema:Z0,runId:X}}),_({requireToolApproval:{toolName:R.primitiveId,args:b,toolCallId:g}})}else if(!I.approved){await vD(T,[{id:J(),type:"text",role:"assistant",content:{parts:[{type:"text",text:JSON.stringify({isNetwork:!0,selectionReason:R.selectionReason,primitiveType:R.primitiveType,primitiveId:R.primitiveId,finalResult:{result:"Tool call was not approved by the user",toolCallId:g},input:b})}],format:2,metadata:{mode:"network"}},createdAt:new Date,threadId:C.threadId||X,resourceId:C.threadResourceId||$}],N,{requestContext:Y});let Z0={task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:"Tool call was not approved by the user",isComplete:!1,iteration:R.iteration,toolCallId:g,toolName:u};return await w?.write({type:"tool-execution-end",payload:Z0,from:"NETWORK",runId:X}),Z0}}if(V?.aborted)return A({writer:w,eventType:"tool-execution-abort",primitiveType:"tool",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});let h,n=await d.execute(b,{abortSignal:V,requestContext:Y,mastra:G.getMastraInstance(),agent:{agentId:G.id,resourceId:C.threadResourceId||$,toolCallId:g,threadId:C.threadId,suspend:async(s,Z0)=>{await vD(T,[{id:J(),type:"text",role:"assistant",content:{parts:[{type:"text",text:JSON.stringify({isNetwork:!0,selectionReason:R.selectionReason,primitiveType:R.primitiveType,primitiveId:u,finalResult:{result:"",toolCallId:g},input:b})}],format:2,metadata:{mode:"network",suspendedTools:{[R.primitiveId]:{toolCallId:g,toolName:R.primitiveId,args:b,suspendPayload:s,type:"suspension",resumeSchema:Z0?.resumeSchema??JSON.stringify($u(d.resumeSchema)),runId:X,primitiveType:"tool",primitiveId:R.primitiveId}}}},createdAt:new Date,threadId:C.threadId||X,resourceId:C.threadResourceId||$}],N,{requestContext:Y}),await w?.write({type:"tool-execution-suspended",payload:{toolName:R.primitiveId,toolCallId:g,args:b,resumeSchema:Z0?.resumeSchema??JSON.stringify($u(d.resumeSchema)),suspendPayload:s,runId:X,selectionReason:R.selectionReason}}),h=s},resumeData:I},runId:X,memory:T,context:b,...g4({currentSpan:void 0}),writer:w},{toolCallId:g,messages:[]});if(h)return await _({toolCallSuspended:h,toolName:R.primitiveId,args:b,toolCallId:g});if(V?.aborted)return A({writer:w,eventType:"tool-execution-abort",primitiveType:"tool",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});await vD(T,[{id:J({idType:"message",source:"agent",entityId:u,threadId:C.threadId,resourceId:C.threadResourceId||$,role:"assistant"}),type:"text",role:"assistant",content:{parts:[{type:"text",text:JSON.stringify({isNetwork:!0,selectionReason:R.selectionReason,primitiveType:R.primitiveType,primitiveId:u,finalResult:{result:n,toolCallId:g},input:b})}],format:2,metadata:{mode:"network"}},createdAt:new Date,threadId:C.threadId||X,resourceId:C.threadResourceId||$}],N,{requestContext:Y});let t={task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:n,isComplete:!1,iteration:R.iteration,toolCallId:g,toolName:u};return await w?.write({type:"tool-execution-end",payload:t,from:"NETWORK",runId:X}),t}}),E=o9({id:"finish-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),selectionReason:U.string(),iteration:U.number(),conversationContext:U.array(U.any()).optional()}),outputSchema:U.object({task:U.string(),result:U.string(),isComplete:U.boolean(),iteration:U.number()}),execute:async({inputData:R,writer:q})=>{let w=R.result;if(R.primitiveId==="none"&&R.primitiveType==="none"&&!R.result)w=R.selectionReason;let I={task:R.task,result:w,isComplete:!!R.isComplete,iteration:R.iteration,runId:X};return await q?.write({type:"network-execution-event-step-finish",payload:I,from:"NETWORK",runId:X}),I}}),M=TQ({id:"Agent-Network-Outer-Workflow",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,result:U.string().optional(),iteration:U.number(),threadId:U.string().optional(),threadResourceId:U.string().optional(),isOneOff:U.boolean(),verboseIntrospection:U.boolean()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),completionReason:U.string().optional(),iteration:U.number(),threadId:U.string().optional(),threadResourceId:U.string().optional(),isOneOff:U.boolean()}),options:{shouldPersistSnapshot:({workflowStatus:R})=>R==="suspended",validateInputs:!1}});return M.then(D).branch([[async({inputData:R})=>!R.isComplete&&R.primitiveType==="agent",L],[async({inputData:R})=>!R.isComplete&&R.primitiveType==="workflow",B],[async({inputData:R})=>!R.isComplete&&R.primitiveType==="tool",O],[async({inputData:R})=>!!R.isComplete,E]]).map({task:{step:[D,L,B,O],path:"task"},isComplete:{step:[L,B,O,E],path:"isComplete"},completionReason:{step:[D,L,B,O,E],path:"completionReason"},result:{step:[L,B,O,E],path:"result"},primitiveId:{step:[D,L,B,O],path:"primitiveId"},primitiveType:{step:[D,L,B,O],path:"primitiveType"},iteration:{step:[D,L,B,O],path:"iteration"},isOneOff:{initData:M,path:"isOneOff"},threadId:{initData:M,path:"threadId"},threadResourceId:{initData:M,path:"threadResourceId"}}).commit(),{networkWorkflow:M,processorRunner:N}}async function Z24({networkName:$,requestContext:Y,runId:X,routingAgent:G,routingAgentOptions:J,generateId:Q,maxIterations:W,threadId:Z,resourceId:K,messages:H,validation:z,routing:V,onIterationComplete:A,resumeData:F,autoResumeSuspendedTools:N,mastra:D,structuredOutput:L,onStepFinish:B,onError:O,onAbort:E,abortSignal:M}){let R=await G.getMemory({requestContext:Y});if(!R)throw new G0({id:"AGENT_NETWORK_MEMORY_REQUIRED",domain:"AGENT_NETWORK",category:"USER",text:"Memory is required for the agent network to function properly. Please configure memory for the agent.",details:{status:400}});P70(R,J?.memory?.options);let q=g99(H),w,I;if(N&&Z){let p,h,n,t=await G.getMemory({requestContext:Y});if(await t?.getThreadById({threadId:Z})){let Z0=await t?.recall({threadId:Z,resourceId:K||$});if(Z0&&Z0.messages?.length>0)p=([...Z0.messages].reverse()?.filter((a)=>a.role==="assistant"))[0];if(p){let{metadata:X0}=p.content;if(X0?.requireApprovalMetadata)h=X0.requireApprovalMetadata;if(X0?.suspendedTools)n=X0.suspendedTools;if(h||n){let Q0=Object.values({...n,...h})[0];if(Q0.resumeSchema)try{let e=await G.getLLM({requestContext:Y}),m=`
            You are an assistant used to resume a suspended tool call.
            Your job is to construct the resumeData for the tool call using the messages available to you and the schema passed.
            You will generate an object that matches this schema: ${Q0.resumeSchema}.
            The resumeData generated should be a JSON value that is constructed from the messages, using the schema as guide. The JSON value is stringified.

            {
              "resumeData": "string"
            }
          `,$0=new l6;$0.addSystem(m),$0.add(q,"user");let K0=await e.stream({methodType:"generate",requestContext:Y,messageList:$0,agentId:G.id,...$4(J??{}),structuredOutput:{schema:U.object({resumeData:U.string()})}}).object,A0=await Vg0(K0.resumeData);if(A0!==null&&typeof A0==="object"&&Object.keys(A0).length>0)w=A0,I=Q0.runId}catch(e){D?.getLogger()?.error(`Error generating resume data for network agent ${G.id}`,e)}}}}}let P=I??X,_=w??F,{memory:C,...k}=J||{},{networkWorkflow:S,processorRunner:T}=await u99({networkName:$,requestContext:Y,runId:P,agent:G,routingAgentOptions:k,routingAgentMemoryConfig:C?.options,generateId:Q,routing:V,onStepFinish:B,onError:O,onAbort:E,abortSignal:M}),v=o9({id:"validation-step",inputSchema:S.outputSchema,outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,prompt:U.string(),result:U.string(),structuredObject:U.any().optional(),isComplete:U.boolean().optional(),completionReason:U.string().optional(),iteration:U.number(),validationPassed:U.boolean().optional(),validationFeedback:U.string().optional()}),execute:async({inputData:p,writer:h})=>{let n=z?.scorers||[],t=await G.getMemory({requestContext:Y}),s=t?await t.recall({threadId:p.threadId||P}):{messages:[]},Z0={iteration:p.iteration,maxIterations:W,messages:s.messages,originalTask:p.task,selectedPrimitive:{id:p.primitiveId,type:p.primitiveType},primitivePrompt:p.prompt,primitiveResult:p.result,networkName:$,runId:P,threadId:p.threadId,resourceId:p.threadResourceId,customContext:Y?.toJSON?.()},X0=n.length>0;await h?.write({type:"network-validation-start",payload:{runId:P,iteration:p.iteration,checksCount:X0?n.length:1},from:"NETWORK",runId:X});let a,Q0,e;if(p.result==="Aborted")a={complete:!0,completionReason:"Task aborted",scorers:[],totalDuration:0,timedOut:!1};else if(X0){if(a=await c89({...z,scorers:n},Z0),a.complete){let A0=await Ag0({requestContext:Y,agent:G,routingConfig:V,memoryConfig:C?.options});if(L?.schema){let D0=await Y24(A0,Z0,L,{writer:h,stepId:Q(),runId:P},M,E);Q0=D0.text,e=D0.object}else Q0=await a89(A0,Z0,{writer:h,stepId:Q(),runId:P},M,E);await W24({memory:await G.getMemory({requestContext:Y}),finalResult:Q0,threadId:p.threadId||P,resourceId:p.threadResourceId||$,generateId:Q,processorRunner:T,requestContext:Y})}}else{let A0=await Ag0({requestContext:Y,agent:G,routingConfig:V,memoryConfig:C?.options}),D0=await n89(A0,Z0,{writer:h,stepId:Q(),runId:P},M,E);if(a={complete:D0.passed,completionReason:D0.reason,scorers:[D0],totalDuration:D0.duration,timedOut:!1},Q0=D0.finalResult,D0.passed&&L?.schema){let O0=await Y24(A0,Z0,L,{writer:h,stepId:Q(),runId:X},M,E);if(O0.text)Q0=O0.text;e=O0.object}if(D0.passed)await W24({memory:await G.getMemory({requestContext:Y}),finalResult:Q0||D0.finalResult,threadId:p.threadId||P,resourceId:p.threadResourceId||$,generateId:Q,processorRunner:T,requestContext:Y})}let m=W&&p.iteration>=W;await h?.write({type:"network-validation-end",payload:{runId:X,iteration:p.iteration,passed:a.complete,results:a.scorers,duration:a.totalDuration,timedOut:a.timedOut,reason:a.completionReason,maxIterationReached:!!m,suppressFeedback:!!z?.suppressFeedback},from:"NETWORK",runId:P});let $0=a.complete;if(A)await A({iteration:p.iteration,primitiveId:p.primitiveId,primitiveType:p.primitiveType,result:p.result,isComplete:$0});let Y0=l89(a,!!m),K0=await G.getMemory({requestContext:Y});if(await vD(K0,[{id:Q(),type:"text",role:"assistant",content:{parts:[{type:"text",text:Y0}],format:2,metadata:{mode:"network",completionResult:{passed:a.complete,suppressFeedback:!!z?.suppressFeedback}}},createdAt:new Date,threadId:p.threadId||P,resourceId:p.threadResourceId||$}],T,{requestContext:Y}),await new Promise((A0)=>setTimeout(A0,10)),$0)return{...p,...Q0?{result:Q0}:{},...e!==void 0?{structuredObject:e}:{},isComplete:!0,validationPassed:!0,completionReason:a.completionReason||"Task complete"};else return{...p,isComplete:!1,validationPassed:!1,validationFeedback:Y0}}}),x=o9({id:"final-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,prompt:U.string(),result:U.string(),structuredObject:U.any().optional(),isComplete:U.boolean().optional(),completionReason:U.string().optional(),iteration:U.number(),validationPassed:U.boolean().optional(),validationFeedback:U.string().optional()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,prompt:U.string(),result:U.string(),object:U.any().optional(),isComplete:U.boolean().optional(),completionReason:U.string().optional(),iteration:U.number(),validationPassed:U.boolean().optional()}),execute:async({inputData:p,writer:h})=>{let{structuredObject:n,...t}=p,s={...t,...n!==void 0?{object:n}:{},...W&&p.iteration>=W?{completionReason:`Max iterations reached: ${W}`}:{}};return await h?.write({type:"network-execution-event-finish",payload:s,from:"NETWORK",runId:P}),s}}),y=TQ({id:"iteration-with-validation",inputSchema:S.inputSchema,outputSchema:v.outputSchema,options:{shouldPersistSnapshot:({workflowStatus:p})=>p==="suspended",validateInputs:!1}}).then(S).then(v).commit(),d=TQ({id:"agent-loop-main-workflow",inputSchema:U.object({iteration:U.number(),task:U.string(),primitiveId:U.string(),primitiveType:_X,result:U.string().optional(),threadId:U.string().optional(),threadResourceId:U.string().optional(),isOneOff:U.boolean(),verboseIntrospection:U.boolean()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:_X,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),completionReason:U.string().optional(),iteration:U.number(),validationPassed:U.boolean().optional()}),options:{shouldPersistSnapshot:({workflowStatus:p})=>p==="suspended",validateInputs:!1}}).dountil(y,async({inputData:p})=>{let h=p.isComplete===!0,n=p.validationPassed!==!1,t=Boolean(W&&p.iteration>=W);return h&&n||t}).then(x).commit(),u=G.getMastraInstance();if(u)d.__registerMastra(u),S.__registerMastra(u);let b=await d.createRun({runId:P}),{thread:g}=await m99({requestContext:Y,threadId:Z||b.runId,resourceId:K||$,messages:H,routingAgent:G,generateId:Q,...$4(J??{}),memoryConfig:C?.options});return new g69({run:b,createStream:()=>{if(_)return b.resumeStream({resumeData:_,requestContext:Y}).fullStream;return b.stream({inputData:{task:q,primitiveId:"",primitiveType:"none",iteration:-1,threadResourceId:g?.resourceId,threadId:g?.id,isOneOff:!1,verboseIntrospection:!0},requestContext:Y}).fullStream}})}async function l99($,Y){let X=Y?.requestContext??new p1;if(!await $.getMemory({requestContext:X}))return null;let J=X.get(DX),Q=X.get(eX),W=typeof Y?.memory?.thread==="string"?Y.memory.thread:Y?.memory?.thread?.id,Z=J??W,K=Q??Y?.memory?.resource,H=Z||K?`${Z??""}|${K??""}`:null;return{threadId:Z,resourceId:K,scopeKey:H}}function i99($){let Y=$.map((J)=>{let Q=J.payload??{};return{toolCallId:Q.toolCallId,toolName:Q.toolName,isSuspended:!!Q.suspendedAt}}).filter((J)=>!!J.toolCallId),X=Y.filter((J)=>!J.isSuspended).map((J)=>`${J.toolCallId} (${J.toolName})`).join(", "),G=Y.filter((J)=>J.isSuspended).map((J)=>`${J.toolCallId} (${J.toolName})`).join(", ");return`Background task(s) you previously dispatched have completed. Process ONLY these tool-call IDs (their results are now in the conversation): ${X}. IMPORTANT: Do NOT process any tool-call IDs that were not in the list, and do NOT call the same tool again \u2014 the result is already available. Use these result(s) to answer the user's original question.IMPORTANT: The following tool-call IDs are suspended: ${G}. Do not attempt to resume them; let the user know they are waiting for explicit resume input.`}function n99($,Y,X){let G=i99(X);return{...$,context:[...Y??[],{role:"user",content:G}]}}function r99($,Y,X){if(!Y)return;$.get(Y)?.(),$.set(Y,X)}function a99($,Y,X){if(!Y)return;if($.get(Y)===X)$.delete(Y)}async function YK4($,Y,X,G){let{maxIdleMs:J,...Q}=Y??{},W=await $.getDefaultOptions({requestContext:Y?.requestContext}),Z=XV(W,Q??{}),K=await l99($,Z);if(!X.bgManager||!K)return G(Q);let{threadId:H,resourceId:z,scopeKey:V}=K,A=J??300000,F={...Q??{},onFinish:void 0,_skipBgTaskWait:!0},N={...Q??{},_skipBgTaskWait:!0},D=new Set,L=[],B=new Set,O=!1,E=!1,M,R,q=new AbortController,w=()=>{if(E)return;if(E=!0,M)clearTimeout(M),M=void 0;q.abort();try{R.close()}catch{}a99(X.activeStreams,V,w)},I=()=>{if(E)return;if(O)return;if(D.size>0)return;if(L.length>0)return;w()},P=()=>{if(M)clearTimeout(M),M=void 0},_=()=>{if(E)return;if(P(),O)return;if(D.size===0)return;if(L.length>0)return;M=setTimeout(w,A)},C=async(y)=>{let d=y.getReader();try{while(!0){if(q.signal.aborted)break;let{done:u,value:b}=await d.read();if(u)break;P();try{R.enqueue(b)}catch{break}if(b&&typeof b==="object"&&b.type==="background-task-started"){let g=b.payload?.taskId;if(g)D.add(g)}}}finally{d.releaseLock()}},k=async()=>{if(O||E||L.length===0)return;O=!0;try{let y=L.splice(0,L.length);for(let b of y){let g=b.payload?.taskId,p=b.type;if(g&&p)B.add(`${g}:${p}`)}let d=n99(F,Q?.context,y),u=await $.stream([],d);await C(u.fullStream)}catch(y){try{R.error(y)}catch{}}finally{if(O=!1,L.length>0)k();else I(),_()}};r99(X.activeStreams,V,w),Y?.abortSignal?.addEventListener("abort",w);let S=new ReadableStream({start(y){R=y},cancel(){E=!0,q.abort(),P()}}),v=X.bgManager.stream({agentId:$.id,threadId:H,resourceId:z,abortSignal:q.signal}).getReader();(async()=>{try{while(!0){if(q.signal.aborted)break;let{done:y,value:d}=await v.read();if(y)break;let u=d;if(!u||typeof u!=="object"||typeof u.type!=="string")continue;let b=u.payload?.taskId,g=b&&K24.has(u.type)?`${b}:${u.type}`:void 0;if(g&&B.has(g))continue;_();try{R.enqueue(u)}catch{break}if(!b)continue;if(u.type==="background-task-running"||u.type==="background-task-resumed")D.add(b);else if(K24.has(u.type))D.delete(b),L.push(u),k()}}catch{}finally{v.releaseLock()}})(),O=!0,P();let x;try{x=await G(N)}catch(y){throw w(),y}return(async()=>{try{await C(x.fullStream)}catch(y){try{R.error(y)}catch{}}if(O=!1,L.length>0)k();else I(),_()})(),new Proxy(x,{get(y,d){if(d==="fullStream")return S;let u=Reflect.get(y,d,y);return typeof u==="function"?u.bind(y):u}})}async function s99($,Y,X,G){return YK4($,X,G,(J)=>$.stream(Y,J))}async function o99($,Y,X,G){return YK4($,X,G,(J)=>$.resumeStream(Y,J))}function Xg0($,Y,X){return{...$&&typeof $==="object"?$:{},resource:$?.resource??Y,thread:$?.thread??X}}function XK4($){if($==="generate"||$==="generateLegacy")return"generate";else if($==="stream"||$==="streamLegacy")return"stream";else throw new G0({id:"INVALID_METHOD_TYPE",domain:"AGENT",category:"USER"})}function Y59({capabilities:$,options:Y,resourceId:X,threadId:G,runId:J,requestContext:Q,memory:W,memoryConfig:Z,agentSpan:K,agentId:H,methodType:z,saveQueueManager:V}){return async({inputData:A,bail:F,...N})=>{let D=A["prepare-tools-step"],L=A["prepare-memory-step"],B=!1,O={...Y,tools:D.convertedTools,toolChoice:Y.toolChoice,thread:L.thread,threadId:L.thread?.id??G,resourceId:X,requestContext:Q,onStepFinish:async(_)=>{if(Y.savePerStep&&!Z?.observationalMemory&&!Z?.readOnly){if(!L.threadExists&&!B&&W&&L.thread)await W.createThread({threadId:L.thread?.id,title:L.thread?.title,metadata:L.thread?.metadata,resourceId:L.thread?.resourceId,memoryConfig:Z}),B=!0;if(V&&L.thread?.id)await V.flushMessages(L.messageList,L.thread.id,Z)}return Y.onStepFinish?.({..._,runId:J})},...L.tripwire&&{tripwire:L.tripwire}};if(O.tripwire)try{let _=await $.getModel({requestContext:O.requestContext});if(!KG(_))throw new G0({id:"MAP_RESULTS_STEP_UNSUPPORTED_MODEL",domain:"AGENT",category:"USER",text:"Tripwire handling requires a v2/v3 model"});let C=await V59({tripwire:L.tripwire,runId:J,...g4({currentSpan:K}),options:Y,model:_,messageList:L.messageList});return K?.end({output:{tripwire:L.tripwire},attributes:{tripwireAbort:{reason:L.tripwire?.reason,processorId:L.tripwire?.processorId,retry:L.tripwire?.retry,metadata:L.tripwire?.metadata}}}),F(C)}catch(_){throw K?.error({error:_,endSpan:!0,attributes:{tripwireAbort:{reason:L.tripwire?.reason,processorId:L.tripwire?.processorId,retry:L.tripwire?.retry,metadata:L.tripwire?.metadata}}}),_}let E=$.outputProcessors?typeof $.outputProcessors==="function"?await $.outputProcessors({requestContext:O.requestContext,overrides:Y.outputProcessors}):Y.outputProcessors||$.outputProcessors:Y.outputProcessors||[];if(Y.structuredOutput?.model){let _=new N24({...Y.structuredOutput,logger:$.logger});if($.mastra)_.__registerMastra($.mastra);if(Y.structuredOutput.useAgent)_.setAgent($.agent);E=E?[...E,_]:[_]}let M=$.inputProcessors?typeof $.inputProcessors==="function"?await $.inputProcessors({requestContext:O.requestContext,overrides:Y.inputProcessors}):Y.inputProcessors||$.inputProcessors:Y.inputProcessors||[],R=$.llmRequestInputProcessors?typeof $.llmRequestInputProcessors==="function"?await $.llmRequestInputProcessors({requestContext:O.requestContext,overrides:Y.inputProcessors}):Y.inputProcessors||$.llmRequestInputProcessors:M,q=$.errorProcessors?typeof $.errorProcessors==="function"?await $.errorProcessors({requestContext:O.requestContext,overrides:Y.errorProcessors}):Y.errorProcessors||$.errorProcessors:Y.errorProcessors||[],w=L.messageList;return{methodType:XK4(z),agentId:H,requestContext:O.requestContext,...g4({currentSpan:K}),runId:J,toolChoice:O.toolChoice,tools:O.tools,resourceId:O.resourceId,threadId:O.threadId,stopWhen:O.stopWhen,maxSteps:O.maxSteps,providerOptions:O.providerOptions,includeRawChunks:Y.includeRawChunks,options:{...Y.prepareStep&&{prepareStep:Y.prepareStep},onFinish:async(_)=>{if(_.finishReason==="error"){let k=_.model?.provider,S=_.model?.modelId,T=_.error instanceof Error?_.error:new G0({id:"AGENT_STREAM_ERROR",text:_.error==null?'Agent stream finished with finishReason "error" but no error payload was provided':void 0,domain:"AGENT",category:"SYSTEM",details:{runId:J,...k&&{provider:k},...S&&{modelId:S}}},_.error);if(M$.isInstance(T))$.logger.error("Upstream LLM API error",{error:T,runId:J,...k&&{provider:k},...S&&{modelId:S}});else $.logger.error("Error in agent stream",{error:T,runId:J,...k&&{provider:k},...S&&{modelId:S}});K?.error({error:T,endSpan:!0});return}if(!Y.abortSignal?.aborted)try{let k=Y.structuredOutput?.schema&&_.object!=null?JSON.stringify(_.object):_.text??"";await $.executeOnFinish({result:_,outputText:k,thread:O.thread,threadId:O.threadId,readOnlyMemory:Z?.readOnly,resourceId:X,memoryConfig:Z,requestContext:Q,agentSpan:K,runId:J,messageList:w,threadExists:L.threadExists,structuredOutput:!!Y.structuredOutput?.schema,overrideScorers:Y.scorers})}catch(k){$.logger.error("Error saving memory on finish",{error:k,runId:J});let S=k instanceof Error?k:new G0({id:"AGENT_ON_FINISH_ERROR",domain:"AGENT",category:"SYSTEM",details:{runId:J}},k);K?.error({error:S,endSpan:!0})}else K?.end();await Y?.onFinish?.({..._,runId:J,messages:w.get.response.aiV5.model(),usage:_.usage,totalUsage:_.totalUsage})},onStepFinish:O.onStepFinish,onChunk:Y.onChunk,onError:Y.onError,onAbort:Y.onAbort,abortSignal:Y.abortSignal},activeTools:Y.activeTools,structuredOutput:Y.structuredOutput,inputProcessors:M,llmRequestInputProcessors:R,outputProcessors:E,errorProcessors:q,modelSettings:{...Y.modelSettings||{}},messageList:L.messageList,initialSignalEchoes:L.initialSignalEchoes,maxProcessorRetries:Y.maxProcessorRetries,isTaskComplete:Y.isTaskComplete,onIterationComplete:Y.onIterationComplete,processorStates:L.processorStates}}}function U24($,Y,X){if(!Y)return;if(Array.isArray(Y))for(let G of Y)$.addSystem(G,X);else $.addSystem(Y,X)}function H24($){let Y=$.makeMessageSourceChecker().input;return $.get.all.db().filter((X)=>X.role==="signal"&&Y.has(X.id)).map(t60)}function W59({capabilities:$,options:Y,threadFromArgs:X,resourceId:G,runId:J,requestContext:Q,instructions:W,memoryConfig:Z,memory:K,isResume:H}){return o9({id:"prepare-memory-step",inputSchema:U.object({}),outputSchema:Q59,execute:async({...z})=>{let V=$4(z),A=X,F=new l6({threadId:A?.id,resourceId:G,generateMessageId:$.generateMessageId,logger:$.logger,filterIncompleteToolCalls:Z?.filterIncompleteToolCalls,_agentNetworkAppend:$._agentNetworkAppend}),N=new Map;if(U24(F,W),F.add(Y.context||[],"context"),U24(F,Y.system,"user-provided"),!K||!A?.id&&!G){F.add(Y.messages,"input");let E=H24(F),M;if(!H)({tripwire:M}=await $.runInputProcessors({requestContext:Q,...V,messageList:F,inputProcessorOverrides:Y.inputProcessors,processorStates:N}));return{threadExists:!1,thread:A,messageList:F,processorStates:N,tripwire:M,initialSignalEchoes:E}}if(!A?.id||!G){let E=new G0({id:"AGENT_MEMORY_MISSING_RESOURCE_ID",domain:"AGENT",category:"USER",details:{agentName:$.agentName,threadId:A?.id||"",resourceId:G||""},text:`A resourceId and a threadId must be provided when using Memory. Saw threadId "${A?.id}" and resourceId "${G}"`});throw $.logger.trackException(E),E}let D=void 0,L=await K.getThreadById({threadId:A?.id});if(L)if(!L.metadata&&A.metadata||A.metadata&&!(0,X59.default)(L.metadata,A.metadata))D=await K.saveThread({thread:{...L,metadata:A.metadata},memoryConfig:Z});else D=L;else D=await K.createThread({threadId:A?.id,metadata:A.metadata,title:A.title,memoryConfig:Z,resourceId:G,saveThread:!0});Q.set("MastraMemory",{thread:D,resourceId:G,memoryConfig:Z}),F.add(Y.messages,"input");let B=H24(F),O;if(!H)({tripwire:O}=await $.runInputProcessors({requestContext:Q,...V,messageList:F,inputProcessorOverrides:Y.inputProcessors,processorStates:N}));return{thread:D,messageList:F,processorStates:N,tripwire:O,initialSignalEchoes:B,threadExists:!!L}}})}function Z59({capabilities:$,options:Y,threadFromArgs:X,resourceId:G,runId:J,requestContext:Q,agentSpan:W,methodType:Z,memory:K,backgroundTaskEnabled:H}){return o9({id:"prepare-tools-step",inputSchema:U.object({}),outputSchema:J59,execute:async()=>{let z=X?.id,V=await $.convertTools({toolsets:Y?.toolsets,clientTools:Y?.clientTools,threadId:z,resourceId:G,runId:J,requestContext:Q,...g4({currentSpan:W}),outputWriter:Y.outputWriter,methodType:Z,memoryConfig:Y.memory?.options,autoResumeSuspendedTools:Y.autoResumeSuspendedTools,delegation:Y.delegation,backgroundTaskEnabled:H,inputProcessors:Y.inputProcessors}),A=Object.keys(V);if(A.length>0)W?.update({attributes:{availableTools:A}});return{convertedTools:V}}})}function K59({capabilities:$,runId:Y,returnScorerData:X,requireToolApproval:G,toolCallConcurrency:J,resumeContext:Q,agentId:W,agentName:Z,toolCallId:K,methodType:H,saveQueueManager:z,memoryConfig:V,memory:A,resourceId:F,autoResumeSuspendedTools:N,workspace:D,backgroundTaskManager:L,agentBackgroundConfig:B,toolPayloadTransform:O,skipBgTaskWait:E,drainPendingSignals:M}){return o9({id:"stream-text-step",inputSchema:U.any(),outputSchema:U.instanceof(dj),execute:async({inputData:R,...q})=>{let w=R,I=w.outputProcessors||($.outputProcessors?typeof $.outputProcessors==="function"?await $.outputProcessors({requestContext:w.requestContext||new p1}):$.outputProcessors:[]),P=XK4(H);return $.llm.stream({...w,outputProcessors:I,returnScorerData:X,...$4(q),requireToolApproval:G,toolCallConcurrency:J,resumeContext:Q,_internal:{generateId:$.generateMessageId,saveQueueManager:z,memoryConfig:V,threadId:w.threadId,resourceId:F,memory:A,backgroundTaskManager:L,agentBackgroundConfig:B,backgroundTaskManagerConfig:L?.config,toolPayloadTransform:O,skipBgTaskWait:E,drainPendingSignals:M,initialSignalEchoes:w.initialSignalEchoes},agentId:W,agentName:Z,toolCallId:K,methodType:P,autoResumeSuspendedTools:N,workspace:D})}})}function U59({capabilities:$,options:Y,threadFromArgs:X,resourceId:G,runId:J,requestContext:Q,agentSpan:W,methodType:Z,instructions:K,memoryConfig:H,memory:z,returnScorerData:V,saveQueueManager:A,requireToolApproval:F,toolCallConcurrency:N,resumeContext:D,agentId:L,agentName:B,toolCallId:O,workspace:E,backgroundTaskManager:M,agentBackgroundConfig:R,toolPayloadTransform:q,skipBgTaskWait:w,drainPendingSignals:I}){let P=Z59({capabilities:$,options:Y,threadFromArgs:X,resourceId:G,runId:J,requestContext:Q,agentSpan:W,methodType:Z,memory:z,backgroundTaskEnabled:M?.config?.enabled}),_=W59({capabilities:$,options:Y,threadFromArgs:X,resourceId:G,runId:J,requestContext:Q,instructions:K,memoryConfig:H,memory:z,isResume:!!D}),C=K59({capabilities:$,runId:J,returnScorerData:V,requireToolApproval:F,toolCallConcurrency:N,resumeContext:D,agentId:L,agentName:B,toolCallId:O,methodType:Z,saveQueueManager:A,memoryConfig:H,memory:z,resourceId:G,autoResumeSuspendedTools:Y.autoResumeSuspendedTools,workspace:E,backgroundTaskManager:M,agentBackgroundConfig:R,toolPayloadTransform:q,skipBgTaskWait:w,drainPendingSignals:I}),k=Y59({capabilities:$,options:Y,resourceId:G,threadId:X?.id,runId:J,requestContext:Q,memory:z,memoryConfig:H,agentSpan:W,agentId:L,methodType:Z,saveQueueManager:A});return TQ({id:"execution-workflow",inputSchema:U.object({}),outputSchema:U.instanceof(dj),steps:[P,_,C],options:{tracingPolicy:{internal:1},validateInputs:!1}}).parallel([P,_]).map(k).then(C).commit()}function eZ($,Y){if($ instanceof Promise||$!=null&&typeof $.then==="function")return Promise.resolve($).then(Y);return Y($)}function H59($){let Y=$,X=[],G=new Set,J=(W)=>{if(!W||G.has(W))return;G.add(W),X.push(W)},Q=(W)=>{if(Array.isArray(W)){W.forEach(J);return}Object.values(W??{}).forEach(J)};Q(Y.steps),Q(Y.children);for(let W of Y.stepGraph??[]){J(W.step);for(let Z of W.steps??[])J(Z&&typeof Z==="object"&&"step"in Z?Z.step:Z)}return X}function Og0($,Y){return $.some((X)=>{let G=X,J=V9(X),Q=[...Object.values(G.steps??{}),...(G.stepGraph??[]).flatMap((W)=>{if(W.type==="step")return W.step?[W.step]:[];return W.steps?.map((Z)=>Z.step).filter(Boolean)??[]})];if(!J||Q.length===0){let W=typeof X.id==="string"&&X.id.startsWith("processor:")?X.id.slice(10):X.id;return Y({...X,id:W,providesSkillDiscovery:X.providesSkillDiscovery})}return Q.some((W)=>{if(V9(W))return Og0([W],Y);let Z=typeof W.id==="string"?W.id:void 0;if(!Z?.startsWith("processor:"))return!1;let K=Z.slice(10);return Y({id:K,providesSkillDiscovery:W.providesSkillDiscovery})})})}function z24($){return Og0($,(Y)=>Y.id==="skills-processor")}function V24($){return Og0($,(Y)=>Y.providesSkillDiscovery==="on-demand")}function z59($){return new Proxy($,{get(Y,X,G){let J=Reflect.get(Y,X,Y);if(typeof J==="function")return J.bind(Y);return J}})}function GK4($){if(typeof $==="function")return!0;if(Array.isArray($))return $.some((Y)=>GK4(Y.model??Y));if(typeof $==="string")return $.startsWith("anthropic")&&A24.test($);if($&&typeof $==="object"&&"provider"in $&&"modelId"in $){let{provider:Y,modelId:X}=$;return Y.startsWith("anthropic")&&A24.test(X)}return!0}async function kD($,Y){if(!$.onViolation)return;try{let X={processorId:Y.processorId??$.id,message:Y.message,detail:Y.options?.metadata};await $.onViolation(X)}catch{}}function nU($,Y){if($===Y)return!0;if(!$||!Y)return $===Y;return $.length===Y.length&&$.every((X,G)=>JD(X,Y[G]))}function om($){return async(Y)=>{let X=K_(Y);return $.rotateResponseMessageId?.(),$.messageList.add(X.toDBMessage(),"input"),await $.writer?.custom(X.toDataPart()),X}}function F59($){let Y=lO($.model),X=WD($.tools),G=nO($.toolChoice,$.tools),J=iO($.activeTools,$.tools);return{messages:$.messages,systemMessages:$.systemMessages,stepNumber:$.stepNumber,...$.messageId?{messageId:$.messageId}:{},retryCount:$.retryCount,...Y?{model:Y}:{},...X?{tools:X}:{},...G?{toolChoice:G}:{},...J?{activeTools:J}:{}}}function D59($){let Y={};if(!nU($.beforeMessages,$.messages))Y.messages=$.messages;if(!nU($.beforeSystemMessages,$.systemMessages))Y.systemMessages=$.systemMessages;if($.afterStepInput.messageId!==$.beforeStepInput.messageId)Y.messageId=$.afterStepInput.messageId;if($.result.model!==void 0||$.afterStepInput.model!==$.beforeStepInput.model){let X=lO($.afterStepInput.model);if(X)Y.model=X}if($.result.tools!==void 0||$.afterStepInput.tools!==$.beforeStepInput.tools){let X=WD($.afterStepInput.tools);if(X)Y.tools=X}if($.result.toolChoice!==void 0||$.afterStepInput.toolChoice!==$.beforeStepInput.toolChoice||$.afterStepInput.tools!==$.beforeStepInput.tools){let X=nO($.afterStepInput.toolChoice,$.afterStepInput.tools);if(X)Y.toolChoice=X}if($.result.activeTools!==void 0||$.afterStepInput.activeTools!==$.beforeStepInput.activeTools||$.afterStepInput.tools!==$.beforeStepInput.tools){let X=iO($.afterStepInput.activeTools,$.afterStepInput.tools);if(X)Y.activeTools=X}if($.result.retryCount!==void 0)Y.retryCount=$.result.retryCount;return Y}var F24,D24,g7=class{status={type:"pending"};_promise;_resolve=void 0;_reject=void 0;get promise(){if(this._promise)return this._promise;return this._promise=new Promise(($,Y)=>{if(this.status.type==="resolved")$(this.status.value);else if(this.status.type==="rejected")Y(this.status.error);this._resolve=$,this._reject=Y}),this._promise}resolve($){if(this.status={type:"resolved",value:$},this._promise)this._resolve?.($)}reject($){if(this.status={type:"rejected",error:$},this._promise)this._reject?.($)}},g69,gj="structured-output",N24=class{id=gj;name="Structured Output";schema;structuringAgent;structuringModel;structuringInstructions;agent;useAgent=!1;errorStrategy;fallbackValue;isStructuringAgentStreamStarted=!1;jsonPromptInjection;providerOptions;logger;constructor($){if(!$.schema)throw new G0({id:"STRUCTURED_OUTPUT_PROCESSOR_SCHEMA_REQUIRED",domain:"AGENT",category:"USER",text:"StructuredOutputProcessor requires a schema to be provided"});if(!$.model)throw new G0({id:"STRUCTURED_OUTPUT_PROCESSOR_MODEL_REQUIRED",domain:"AGENT",category:"USER",text:"StructuredOutputProcessor requires a model to be provided either in options or as fallback"});this.schema=$.schema,this.structuringModel=$.model,this.useAgent=$.useAgent??!1,this.errorStrategy=$.errorStrategy??"strict",this.fallbackValue=$.fallbackValue,this.jsonPromptInjection=$.jsonPromptInjection,this.providerOptions=$.providerOptions,this.logger=$.logger,this.structuringInstructions=$.instructions||this.generateInstructions(),this.structuringAgent=new YJ({id:"structured-output-structurer",name:"structured-output-structurer",instructions:this.structuringInstructions,model:$.model,options:{tracingPolicy:{internal:15}}})}__registerMastra($){this.structuringAgent.__registerMastra($)}setAgent($){this.agent=$}async processOutputStream($){let{part:Y,state:X,streamParts:G,abort:J,requestContext:Q,messageList:W,...Z}=$,K=$4(Z),H=X.controller;switch(Y.type){case"finish":return await this.processAndEmitStructuredOutput(G,H,J,K,Q,W),Y;default:return Y}}async processAndEmitStructuredOutput($,Y,X,G,J,Q){if(this.isStructuringAgentStreamStarted)return;this.isStructuringAgentStreamStarted=!0;try{let W=await this.getStructuringStream($,J,Q,G),Z=["start","finish","text-start","text-delta","text-end","step-start","step-finish"];for await(let K of W.fullStream){if(Z.includes(K.type)||K.type.startsWith("data-"))continue;if(K.type==="error"){if(this.handleError("Structuring failed",K.payload.error,X),this.errorStrategy==="warn")break;if(this.errorStrategy==="fallback"&&this.fallbackValue!==void 0){let z={runId:K.runId,from:"AGENT",type:"object-result",object:this.fallbackValue,metadata:{from:"structured-output",fallback:!0}};Y?.enqueue(z);break}}let H={...K,metadata:{from:"structured-output"}};Y?.enqueue(H)}}catch(W){this.handleError("Structured output processing failed",W,X)}}async getStructuringStream($,Y,X,G){let J=Y?.get(DX),Q=Y?.get(eX),W=X?.serialize().memoryInfo,Z=typeof J==="string"?J:typeof W?.threadId==="string"?W.threadId:void 0,K=typeof Q==="string"?Q:typeof W?.resourceId==="string"?W.resourceId:void 0;if(this.useAgent&&this.agent&&Z){let H={role:"user",content:[{type:"text",text:"Extract and structure information from the conversation so far. keep the original meaning and details. Rely on the provided text and conversation history"}]},z=[...X?.get?.input?.db()||[],...X?.get?.response?.db()||[],H],V=Y?new p1(Y.entries()):void 0;return this.agent.stream(z,{model:this.structuringModel,requestContext:V,toolChoice:"none",structuredOutput:{schema:this.schema,jsonPromptInjection:this.jsonPromptInjection},memory:{thread:Z,...K?{resource:K}:{},options:{readOnly:!0}},providerOptions:this.providerOptions,...G})}return this.structuringAgent.stream(`Extract and structure the key information from the following text according to the specified schema. Keep the original meaning and details. Rely on the provided text and conversation history.

${this.buildStructuringPrompt($)}`,{structuredOutput:{schema:this.schema,jsonPromptInjection:this.jsonPromptInjection},providerOptions:this.providerOptions,...G})}buildStructuringPrompt($){let Y=[],X=[],G=[],J=[];for(let W of $)switch(W.type){case"text-delta":Y.push(W.payload.text);break;case"reasoning-delta":X.push(W.payload.text);break;case"tool-call":G.push(W);break;case"tool-result":J.push(W);break}let Q=[];if(X.length>0)Q.push(`# Assistant Reasoning
${X.join("")}`);if(G.length>0){let W=G.map((Z)=>{let K=typeof Z.payload.args==="object"?JSON.stringify(Z.payload.args,null):Z.payload.args,H=Z.payload.output!==void 0?`${typeof Z.payload.output==="object"?JSON.stringify(Z.payload.output,null):Z.payload.output}`:"";return`## ${Z.payload.toolName}
### Input: ${K}
### Output: ${H}`}).join(`
`);Q.push(`# Tool Calls
${W}`)}if(J.length>0){let W=J.map((Z)=>{let K=Z.payload.result;if(K===void 0||K===null)return`${Z.payload.toolName}: null`;return`${Z.payload.toolName}: ${typeof K==="object"?JSON.stringify(K,null,2):K}`}).join(`
`);Q.push(`# Tool Results
${W}`)}if(Y.length>0)Q.push(`# Assistant Response
${Y.join("")}`);return Q.join(`

`)}generateInstructions(){return`You are a data structuring specialist. Your job is to convert unstructured text into a specific JSON format.

TASK: Convert the provided unstructured text into valid JSON that matches the following schema:

REQUIREMENTS:
- Return ONLY valid JSON, no additional text or explanation
- Extract relevant information from the input text
- If information is missing, use reasonable defaults or null values
- Maintain data types as specified in the schema
- Be consistent and accurate in your conversions

The input text may be in any format (sentences, bullet points, paragraphs, etc.). Extract the relevant data and structure it according to the schema.`}handleError($,Y,X){let G=this.getErrorMessage(Y),J=`[StructuredOutputProcessor] ${$}: ${G}`;switch(this.errorStrategy){case"strict":this.logger?.error(J,Y),X(J);break;case"warn":this.logger?.warn(J,Y);break;case"fallback":this.logger?.info(`${J} (using fallback)`,Y);break}}getErrorMessage($){if($&&typeof $==="object"&&"message"in $&&typeof $.message==="string")return $.message;if($ instanceof Error)return $.message;return String($)}},L24=class{id="skills-processor";name="Skills Processor";_workspace;_format;constructor($){this._workspace=$.workspace,this._format=$.format??"xml"}get skills(){return this._workspace.skills}async listSkills(){let $=await this.skills?.list();if(!$)return[];return $.map((Y)=>({name:Y.name,description:Y.description,license:Y.license}))}formatLocation($){return`${$.path}/SKILL.md`}formatSourceType($){return $.source.type}async formatAvailableSkills(){let $=await this.skills?.list();if(!$||$.length===0)return"";let Y=$.map((J)=>this.skills?.get(J.path)),X=(await Promise.all(Y)).filter((J)=>J!==void 0&&J!==null),G=Array.from(new Map(X.map((J)=>[J.path,J])).values());switch(G.sort((J,Q)=>J.name.localeCompare(Q.name)),this._format){case"xml":return`<available_skills>
${G.map((Q)=>`  <skill>
    <name>${this.escapeXml(Q.name)}</name>
    <description>${this.escapeXml(Q.description)}</description>
    <location>${this.escapeXml(this.formatLocation(Q))}</location>
    <source>${this.escapeXml(this.formatSourceType(Q))}</source>
  </skill>`).join(`
`)}
</available_skills>`;case"json":return`Available Skills:

${JSON.stringify(G.map((J)=>({name:J.name,description:J.description,location:this.formatLocation(J),source:this.formatSourceType(J)})),null,2)}`;case"markdown":return`# Available Skills

${G.map((Q)=>`- **${Q.name}** [${this.formatSourceType(Q)}] (${this.formatLocation(Q)}): ${Q.description}`).join(`
`)}`;default:return this._format}}escapeXml($){return $.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}async processInputStep({messageList:$,stepNumber:Y,requestContext:X}){if(Y===0)await this.skills?.maybeRefresh({requestContext:X});let G=await this.skills?.list();if(G&&G.length>0){let Q=await this.formatAvailableSkills();if(Q)$.addSystem({role:"system",content:Q});$.addSystem({role:"system",content:'IMPORTANT: Skills are NOT tools. Do not call skill names directly as tool names. To use a skill, call the `skill` tool with the skill name as the "name" parameter. If multiple skills share the same name, use the skill path (shown in the location field) instead of the name to disambiguate. When a user asks about a topic covered by an available skill, activate it immediately without asking for permission first.'})}}},B24=class{id="workspace-instructions-processor";name="Workspace Instructions Processor";_workspace;constructor($){this._workspace=$.workspace}async processInputStep({messageList:$,requestContext:Y}){let X=this._workspace.getInstructions({requestContext:Y});if(X)$.addSystem({role:"system",content:X});return{messageList:$}}},m69=1,u69,p69,d69,s69=class{id="stream-error-retry-processor";name="Stream Error Retry Processor";#$;#Y;constructor($={}){this.#$=$.maxRetries??m69,this.#Y=[...d69,...$.matchers??[]]}async processAPIError({error:$,retryCount:Y}){if(Y>=this.#$)return;if(!a69($,this.#Y))return;return{retry:!0}}},iZ4,E24,Fg0,Qg0="<working_memory>",Wg0="</working_memory>",Yu=class{id="message-history";name="MessageHistory";storage;lastMessages;constructor($){this.storage=$.storage,this.lastMessages=$.lastMessages}getMemoryContext($,Y){let X=rU($);if(X?.thread?.id)return{threadId:X.thread.id,resourceId:X.resourceId};let G=Y.serialize();if(G.memoryInfo?.threadId)return{threadId:G.memoryInfo.threadId,resourceId:G.memoryInfo.resourceId};return null}createMemorySpan($,Y,X,G){let J=Y?.tracingContext?.currentSpan;if(!J)return;return J.createChildSpan({type:"memory_operation",name:`memory: ${$}`,entityType:J6.MEMORY,entityName:"Memory",input:X,attributes:{operationType:$,...G}})}async processInput($){let{messageList:Y,requestContext:X,...G}=$,J=this.getMemoryContext(X,Y);if(!J)return Y;let{threadId:Q,resourceId:W}=J,Z=this.createMemorySpan("recall",G,{threadId:Q,resourceId:W},{lastMessages:this.lastMessages});try{let H=(await this.storage.listMessages({threadId:Q,resourceId:W,page:0,perPage:this.lastMessages,orderBy:{field:"createdAt",direction:"DESC"}})).messages.filter((N)=>{return N.role!=="system"}),z=Y.get.all.db(),V=new Set(z.map((N)=>N.id).filter(Boolean)),F=H.filter((N)=>!N.id||!V.has(N.id)).reverse();if(F.length===0)return Z?.end({output:{success:!0},attributes:{messageCount:0}}),Y;for(let N of F)if(N.role==="system")continue;else Y.add(N,"memory");return Z?.end({output:{success:!0},attributes:{messageCount:F.length}}),Y}catch(K){throw Z?.error({error:K,endSpan:!0}),K}}filterMessagesForPersistence($){return $.filter((Y)=>Y.role!=="system").map((Y)=>{let X={...Y};if(Y.content&&typeof Y.content==="object"&&!Array.isArray(Y.content))X.content={...Y.content};if(typeof X.content?.content==="string"&&X.content.content.length>0)X.content.content=Zg0(X.content.content).trim();if(Array.isArray(X.content?.parts)){if(X.content.parts=X.content.parts.map((G)=>{if(G.type==="tool-invocation"&&G.toolInvocation.state==="partial-call")return null;if(G.type==="tool-invocation"&&G.toolInvocation.toolName==="updateWorkingMemory")return null;if(G.type==="text"){let J=typeof G.text==="string"?G.text:"";return{...G,text:Zg0(J).trim()}}return G}).filter((G)=>Boolean(G)),X.content.parts.length===0)return null}return X}).filter((Y)=>Boolean(Y))}async processOutputResult($){let{messageList:Y,requestContext:X,...G}=$,J=this.getMemoryContext(X,Y),W=rU(X)?.memoryConfig?.readOnly;if(!J||W)return Y;let{threadId:Z,resourceId:K}=J,H=Y.get.input.db(),z=Y.get.response.db(),V=[...H,...z];if(V.length===0)return Y;let A=this.createMemorySpan("save",G,void 0,{messageCount:V.length});try{return await this.persistMessages({messages:V,threadId:Z,resourceId:K}),await new Promise((F)=>setTimeout(F,10)),A?.end({output:{success:!0}}),Y}catch(F){throw A?.error({error:F,endSpan:!0}),F}}async persistMessages($){let{messages:Y,threadId:X,resourceId:G}=$;if(Y.length===0)return;let J=this.filterMessagesForPersistence(Y);if(J.length===0)return;let Q=await this.storage.getThreadById({threadId:X});if(Q)await this.storage.updateThread({id:X,title:Q.title||"",metadata:Q.metadata||{}});else await this.storage.saveThread({thread:{id:X,resourceId:G||X,title:"",metadata:{},createdAt:new Date,updatedAt:new Date}});await this.storage.saveMessages({messages:J})}},M24=class{constructor($){this.options=$,this.logger=$.logger}options;id="working-memory";name="WorkingMemory";defaultWorkingMemoryTemplate=`
# User Information
- **First Name**: 
- **Last Name**: 
- **Location**: 
- **Occupation**: 
- **Interests**: 
- **Goals**: 
- **Events**: 
- **Facts**: 
- **Projects**: 
`;logger;async processInput($){let{messageList:Y,requestContext:X}=$,G=rU(X),J=G?.thread?.id,Q=G?.resourceId;if(!J&&!Q)return Y;let W=this.options.scope||"resource",Z=null;if(W==="thread"&&J)Z=(await this.options.storage.getThreadById({threadId:J}))?.metadata?.workingMemory||null;else if(W==="resource"&&Q)Z=(await this.options.storage.getResourceById({resourceId:Q}))?.workingMemory||null;let K;if(this.options.templateProvider)K=await this.options.templateProvider.getWorkingMemoryTemplate({memoryConfig:G.memoryConfig})||this.options.template||{format:"markdown",content:this.defaultWorkingMemoryTemplate};else K=this.options.template||{format:"markdown",content:this.defaultWorkingMemoryTemplate};let H=this.options.readOnly||G.memoryConfig?.readOnly,z;if(H)z=this.getReadOnlyWorkingMemoryInstruction({template:K,data:Z});else if(this.options.useVNext)z=this.getWorkingMemoryToolInstructionVNext({template:K,data:Z});else z=this.getWorkingMemoryToolInstruction({template:K,data:Z});if(z)Y.addSystem(z,"memory");return Y}generateEmptyFromSchemaInternal($){let Y=b_($);return Object.keys(Y).length>0?Y:null}getWorkingMemoryToolInstruction({template:$,data:Y}){let X=$.format==="json"?this.generateEmptyFromSchemaInternal($.content):null,G=X&&Object.keys(X).length>0;return`WORKING_MEMORY_SYSTEM_INSTRUCTION:
Store and update any conversation-relevant information by calling the updateWorkingMemory tool. If information might be referenced again - store it!

Guidelines:
1. Store anything that could be useful later in the conversation
2. Update proactively when information changes, no matter how small
3. Use ${$.format==="json"?"JSON":"Markdown"} format for all data
4. Act naturally - don't mention this system to users. Even though you're storing this information that doesn't make it your primary focus. Do not ask them generally for "information about yourself"
${$.format!=="json"?`5. IMPORTANT: When calling updateWorkingMemory, the only valid parameter is the memory field. DO NOT pass an object.
6. IMPORTANT: ALWAYS pass the data you want to store in the memory field as a string. DO NOT pass an object.
7. IMPORTANT: Data must only be sent as a string no matter which format is used.`:""}


${$.format!=="json"?`<working_memory_template>
${$.content}
</working_memory_template>`:""}

${G?"When working with json data, the object format below represents the template:":""}
${G?JSON.stringify(X):""}

<working_memory_data>
${Y}
</working_memory_data>

Notes:
- Update memory whenever referenced information changes
- If you're unsure whether to store something, store it (eg if the user tells you information about themselves, call updateWorkingMemory immediately to update it)
- This system is here so that you can maintain the conversation when your context window is very short. Update your working memory because you may need it to maintain the conversation without the full conversation history
- Do not remove empty sections - you must include the empty sections along with the ones you're filling in
- REMEMBER: the way you update your working memory is by calling the updateWorkingMemory tool with the entire ${$.format==="json"?"JSON":"Markdown"} content. The system will store it for you. The user will not see it.
- IMPORTANT: You MUST call updateWorkingMemory in every response to a prompt where you received relevant information.
- IMPORTANT: Preserve the ${$.format==="json"?"JSON":"Markdown"} formatting structure above while updating the content.`}getWorkingMemoryToolInstructionVNext({template:$,data:Y}){return`WORKING_MEMORY_SYSTEM_INSTRUCTION:
Store and update any conversation-relevant information by calling the updateWorkingMemory tool.

Guidelines:
1. Store anything that could be useful later in the conversation
2. Update proactively when information changes, no matter how small
3. Use ${$.format==="json"?"JSON":"Markdown"} format for all data
4. Act naturally - don't mention this system to users. Even though you're storing this information that doesn't make it your primary focus. Do not ask them generally for "information about yourself"
5. If your memory has not changed, you do not need to call the updateWorkingMemory tool. By default it will persist and be available for you in future interactions
6. Information not being relevant to the current conversation is not a valid reason to replace or remove working memory information. Your working memory spans across multiple conversations and may be needed again later, even if it's not currently relevant.

<working_memory_template>
${typeof $.content==="string"?$.content:JSON.stringify($.content)}
</working_memory_template>

<working_memory_data>
${Y}
</working_memory_data>

Notes:
- Update memory whenever referenced information changes
${(typeof $.content==="string"?$.content:JSON.stringify($.content))!==this.defaultWorkingMemoryTemplate?"- Only store information if it's in the working memory template, do not store other information unless the user asks you to remember it, as that non-template information may be irrelevant":`- If you're unsure whether to store something, store it (eg if the user tells you information about themselves, call updateWorkingMemory immediately to update it)
`}
- This system is here so that you can maintain the conversation when your context window is very short. Update your working memory because you may need it to maintain the conversation without the full conversation history
- REMEMBER: the way you update your working memory is by calling the updateWorkingMemory tool with the ${$.format==="json"?"JSON":"Markdown"} content. The system will store it for you. The user will not see it.
- IMPORTANT: You MUST call updateWorkingMemory in every response to a prompt where you received relevant information if that information is not already stored.
- IMPORTANT: Preserve the ${$.format==="json"?"JSON":"Markdown"} formatting structure above while updating the content.
`}getReadOnlyWorkingMemoryInstruction({data:$}){return`WORKING_MEMORY_SYSTEM_INSTRUCTION (READ-ONLY):
The following is your working memory - persistent information about the user and conversation collected over previous interactions. This data is provided for context to help you maintain continuity.

<working_memory_data>
${$||"No working memory data available."}
</working_memory_data>

Guidelines:
1. Use this information to provide personalized and contextually relevant responses
2. Act naturally - don't mention this system to users. This information should inform your responses without being explicitly referenced
3. This memory is read-only in the current session - you cannot update it

Notes:
- This system is here so that you can maintain the conversation when your context window is very short
- The user will not see the working memory data directly`}},o69=1000,Kg0,t69=4,rZ4=1,Ug0=class{id="semantic-recall";name="SemanticRecall";storage;vector;embedder;topK;messageRange;scope;threshold;indexName;logger;embedderOptions;hasher=wE();indexValidationCache=new Map;constructor($){if(this.storage=$.storage,this.vector=$.vector,this.embedder=$.embedder,this.topK=$.topK??t69,this.scope=$.scope??"resource",this.threshold=$.threshold,this.indexName=$.indexName,this.logger=$.logger,this.embedderOptions=$.embedderOptions,typeof $.messageRange==="number")this.messageRange={before:$.messageRange,after:$.messageRange};else if($.messageRange)this.messageRange=$.messageRange;else this.messageRange={before:rZ4,after:rZ4}}async processInput($){let{messages:Y,messageList:X,requestContext:G}=$,J=rU(G);if(!J)return X;let{thread:Q,resourceId:W}=J,Z=Q?.id;if(!Z)return X;let K=this.extractUserQuery(Y);if(!K)return X;try{let H=await this.performSemanticSearch({query:K,threadId:Z,resourceId:W});if(H.length===0)return X;let z=X.get.all.db(),V=new Set(z.map((N)=>N.id).filter(Boolean)),A=H.filter((N)=>N.id&&!V.has(N.id));if(A.length===0)return X;let F=A.filter((N)=>!N.threadId||N.threadId===Z);if(this.scope==="resource"){let N=A.filter((D)=>D.threadId&&D.threadId!==Z);if(N.length>0){let D=this.formatCrossThreadMessages(N,Z);X.addSystem(D,"memory")}}if(F.length)X.add(F,"memory");return X}catch(H){return this.logger?.error("[SemanticRecall] Error during semantic search:",{error:H}),X}}sortMessagesForRecall($){let Y={system:0,user:1,assistant:2,tool:3},X=(G,J)=>G<J?-1:G>J?1:0;return[...$].sort((G,J)=>{let Q=G.createdAt.getTime()-J.createdAt.getTime();if(Q!==0)return Q;let W=X(G.threadId??"",J.threadId??"");if(W!==0)return W;let Z=(Y[G.role]??99)-(Y[J.role]??99);if(Z!==0)return Z;return X(G.id??"",J.id??"")})}formatCrossThreadMessages($,Y){let X="",G=new l6().add(this.sortMessagesForRecall($),"memory").get.all.v1(),J=null;for(let W of G){let Z=W.createdAt,K=Z.getUTCFullYear(),H=Z.toLocaleString("default",{month:"short"}),z=Z.getUTCDate(),V=`${K}, ${H}, ${z}`,A=Z.getUTCHours(),F=Z.getUTCMinutes(),N=A%12||12,D=A<12?"AM":"PM",L=`${N}:${F<10?"0":""}${F} ${D}`;if(!J||J!==V)X+=`
the following messages are from ${V}
`;let B=W.role.charAt(0).toUpperCase()+W.role.slice(1),O="";if(typeof W.content==="string")O=W.content;else if(Array.isArray(W.content))O=W.content.filter((M)=>M.type==="text").map((M)=>M.text).join(" ");X+=`Message ${W.threadId&&W.threadId!==Y?"from previous conversation":""} at ${L}: ${B}: ${O}`,J=V}return{role:"system",content:`The following messages were remembered from a different conversation:
<remembered_from_other_conversation>
${X}
<end_remembered_from_other_conversation>`}}extractUserQuery($){for(let Y=$.length-1;Y>=0;Y--){let X=$[Y];if(!X)continue;if(X.role==="user"){if(typeof X.content!=="object"||X.content===null)continue;if(typeof X.content.content==="string"&&X.content.content!=="")return X.content.content;let G=[];X.content.parts?.forEach((Q)=>{if(Q.type==="text"&&Q.text)G.push(Q.text)});let J=G.join(" ");if(J)return J}}return null}async performSemanticSearch({query:$,threadId:Y,resourceId:X}){let G=this.indexName||this.getDefaultIndexName(),{embeddings:J,dimension:Q}=await this.embedMessageContent($,G);await this.ensureVectorIndex(G,Q);let W=[];for(let H of J){let z=await this.vector.query({indexName:G,queryVector:H,topK:this.topK,filter:this.scope==="resource"&&X?{resource_id:X}:{thread_id:Y}});W.push(...z)}let Z=this.threshold!==void 0?W.filter((H)=>H.score>=this.threshold):W;if(Z.length===0)return[];return(await this.storage.listMessages({threadId:Y,resourceId:X,include:Z.map((H)=>({id:H.metadata?.message_id,threadId:H.metadata?.thread_id,withNextMessages:this.messageRange.after,withPreviousMessages:this.messageRange.before})),perPage:0})).messages}async hashContent($,Y){let X=await this.hasher,G=`${Y}:${$}`;return X.h64(G).toString(16)}async embedMessageContent($,Y){let X=await this.hashContent($,Y),G=Kg0.get(X);if(G)return{embeddings:[G],dimension:G.length};let J=await this.embedder.doEmbed({values:[$],...this.embedderOptions});if(J.embeddings[0])Kg0.set(X,J.embeddings[0]);return{embeddings:J.embeddings,dimension:J.embeddings[0]?.length||0}}getDefaultIndexName(){return`mastra_memory_${(this.embedder.modelId||"default").replace(/[^a-zA-Z0-9_]/g,"_")}`.slice(0,63)}async ensureVectorIndex($,Y){if(this.indexValidationCache.get($)?.dimension===Y)return;await this.vector.createIndex({indexName:$,dimension:Y,metric:"cosine"}),this.indexValidationCache.set($,{dimension:Y})}async processOutputResult($){let{messages:Y,messageList:X,requestContext:G}=$;if(!this.vector||!this.embedder||!this.storage)return X||Y;try{let J=rU(G);if(!J)return X||Y;if(J.memoryConfig?.readOnly)return X||Y;let{thread:Q,resourceId:W}=J,Z=Q?.id;if(!Z)return X||Y;let K=this.indexName||this.getDefaultIndexName(),H=[],z=[],V=[],A=0,F=[...Y];if(X){let N=X.get.input.db().filter((L)=>X.isNewMessage(L)),D=new Set(F.map((L)=>L.id));for(let L of N)if(!D.has(L.id))F.push(L)}for(let N of F){if(N.role==="system")continue;if(!N.id||typeof N.id!=="string")continue;if(X){if(!X.isNewMessage(N))continue}let D=this.extractTextContent(N);if(!D)continue;try{let{embeddings:L,dimension:B}=await this.embedMessageContent(D,K);if(L.length===0)continue;let O=L[0];if(!O)continue;H.push(O),z.push(N.id),V.push({message_id:N.id,thread_id:Z,resource_id:W||"",role:N.role,content:D,created_at:N.createdAt.toISOString()}),A=B}catch(L){this.logger?.error(`[SemanticRecall] Error creating embedding for message ${N.id}:`,{error:L})}}if(H.length>0)await this.ensureVectorIndex(K,A),await this.vector.upsert({indexName:K,vectors:H,ids:z,metadata:V})}catch(J){this.logger?.error("[SemanticRecall] Error in processOutputResult:",{error:J})}return X||Y}extractTextContent($){if(typeof $.content==="string")return $.content;if(typeof $.content==="object"&&$.content!==null){let{content:Y,parts:X}=$.content;if(Y)return Y;if(Array.isArray(X))return X.filter((G)=>G.type==="text").map((G)=>G.text||"").join(`
`)}return""}},R24,q24,I24,P24,w24,_24,j24,e69,Dg0,$89,T24,C24,uj,Xu,Y89,X89,q70,S24,Gu,k24,v24,x24,y24,b24,h24,Ng0,X80,Gg,tm,tf0,jX=()=>J89(),Q89,aZ4=40,sZ4=300,A89=class{id="chat-channel-context";processInputStep($){let Y=$.requestContext?.get("channel");if(!Y)return;let X=[`You are communicating via ${Y.platform}.`];if(Y.botUserName||Y.botMention){let J=[];if(Y.botUserName)J.push(`"${Y.botUserName}"`);if(Y.botMention)J.push(Y.botMention);X.push(`Your identity on this platform is ${J.join(" / ")}. Messages containing these references are directed at you.`)}if(Y.isDM){if(X.push("This is a direct message (DM) conversation."),Y.userName||Y.userId){let J=[];if(Y.userName)J.push(`name: "${Y.userName}"`);if(Y.userId)J.push(`ID: ${Y.userId}`);X.push(`You are talking to a user (${J.join(", ")}).`)}}else X.push("You are in a public channel or thread.","Not every message is directed at you. If users appear to be talking to each other, stay silent unless you are explicitly mentioned or your input is clearly needed. To stay silent, respond with an empty message.");let G={role:"system",content:X.join(`
`)};return{systemMessages:[...$.systemMessages,G]}}},F89=class{memoryStore;connected=!1;connectPromise=null;cache=new Map;locks=new Map;lists=new Map;queues=new Map;constructor($){this.memoryStore=$}async connect(){if(this.connected)return;if(!this.connectPromise)this.connectPromise=Promise.resolve().then(()=>{this.connected=!0});await this.connectPromise}async disconnect(){this.connected=!1,this.connectPromise=null,this.cache.clear(),this.locks.clear(),this.lists.clear(),this.queues.clear()}async subscribe($){let Y=await this.findThreadByExternalId($);if(!Y)return;await this.memoryStore.updateThread({id:Y.id,title:Y.title??"",metadata:{...Y.metadata,channel_subscribed:"true"}})}async unsubscribe($){let Y=await this.findThreadByExternalId($);if(!Y)return;await this.memoryStore.updateThread({id:Y.id,title:Y.title??"",metadata:{...Y.metadata??{},channel_subscribed:"false"}})}async isSubscribed($){let Y=await this.findThreadByExternalId($);if(!Y)return!1;return Y.metadata?.channel_subscribed==="true"}async get($){let Y=this.cache.get($);if(!Y)return null;if(Y.expiresAt!==null&&Y.expiresAt<=Date.now())return this.cache.delete($),null;return Y.value}async set($,Y,X){this.cache.set($,{value:Y,expiresAt:X?Date.now()+X:null})}async setIfNotExists($,Y,X){let G=this.cache.get($);if(G)if(G.expiresAt!==null&&G.expiresAt<=Date.now())this.cache.delete($);else return!1;return this.cache.set($,{value:Y,expiresAt:X?Date.now()+X:null}),!0}async delete($){this.cache.delete($)}async appendToList($,Y,X){let G=this.lists.get($);if(G&&G.expiresAt!==null&&G.expiresAt<=Date.now())G=void 0;let J=G?.values??[];if(J.push(Y),X?.maxLength&&J.length>X.maxLength)J.splice(0,J.length-X.maxLength);this.lists.set($,{values:J,expiresAt:X?.ttlMs?Date.now()+X.ttlMs:G?.expiresAt??null})}async getList($){let Y=this.lists.get($);if(!Y)return[];if(Y.expiresAt!==null&&Y.expiresAt<=Date.now())return this.lists.delete($),[];return Y.values}async acquireLock($,Y){this.cleanExpiredLocks();let X=this.locks.get($);if(X&&X.expiresAt>Date.now())return null;let G={threadId:$,token:crypto.randomUUID(),expiresAt:Date.now()+Y};return this.locks.set($,G),G}async releaseLock($){let Y=this.locks.get($.threadId);if(Y&&Y.token===$.token)this.locks.delete($.threadId)}async extendLock($,Y){let X=this.locks.get($.threadId);if(!X||X.token!==$.token)return!1;if(X.expiresAt<Date.now())return this.locks.delete($.threadId),!1;return X.expiresAt=Date.now()+Y,!0}async forceReleaseLock($){this.locks.delete($)}async enqueue($,Y,X){let G=this.queues.get($);if(!G)G=[],this.queues.set($,G);if(G.push(Y),G.length>X)G.splice(0,G.length-X);return G.length}async dequeue($){let Y=this.queues.get($);if(!Y||Y.length===0)return null;return Y.shift()}async queueDepth($){return this.queues.get($)?.length??0}cleanExpiredLocks(){let $=Date.now();for(let[Y,X]of this.locks)if(X.expiresAt<=$)this.locks.delete(Y)}async findThreadByExternalId($){let{threads:Y}=await this.memoryStore.listThreads({filter:{metadata:{channel_externalThreadId:$}},perPage:1});return Y[0]??null}},O89,oZ4=class{adapters;chat=null;initPromise=null;agent;logger;customState;stateAdapter;userName;adapterConfigs;handlerOverrides;chatOptions;threadContext;shouldInline;inlineLinkRules;toolsEnabled;channelToolNames;externallyManagedPlatforms=new Set;constructor($){let Y={},X={};for(let[G,J]of Object.entries($.adapters))if(J&&typeof J==="object"&&"adapter"in J){let Q=J;Y[G]=Q.adapter,X[G]=Q}else Y[G]=J,X[G]={adapter:J};this.adapters=Y,this.adapterConfigs=X,this.handlerOverrides=$.handlers??{},this.customState=$.state,this.userName=$.userName??"Mastra",this.chatOptions=$.chatOptions??{},this.threadContext=$.threadContext??{},this.shouldInline=D89($.inlineMedia),this.inlineLinkRules=N89($.inlineLinks),this.toolsEnabled=$.tools!==!1,this.channelToolNames=new Set(Object.keys(this.getTools()))}__setAgent($){this.agent=$}__setLogger($){this.logger="child"in $&&typeof $.child==="function"?$.child("CHANNEL"):$}__registerAdapter($,Y,X,G){if(this.adapters[$]){if(G?.managesRoutes)this.externallyManagedPlatforms.add($);return}if(this.adapters[$]=Y,this.adapterConfigs[$]=X??{adapter:Y},G?.managesRoutes)this.externallyManagedPlatforms.add($)}hasAdapter($){return $ in this.adapters}get sdk(){return this.chat}async initialize($){if(this.chat)return;if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{if(this.customState)this.stateAdapter=this.customState;else{let Z=$.getStorage(),K=Z?await Z.getStore("memory"):void 0;if(!K)throw Error("Channels require storage to be configured on the Mastra instance. Configure a storage provider like LibSQLStore.");this.stateAdapter=new F89(K),this.log("info","Using MastraStateAdapter (subscriptions persist across restarts)")}let{Chat:Y}=await G89(),X=new Y({adapters:this.adapters,state:this.stateAdapter,userName:this.userName,concurrency:{strategy:"queue"},...this.chatOptions}),G=(Z,K)=>this.handleChatMessage(Z,K,$),{onDirectMessage:J,onMention:Q,onSubscribedMessage:W}=this.handlerOverrides;if(J!==!1)X.onDirectMessage((Z,K)=>{if(typeof J==="function")return J(Z,K,G);return G(Z,K)});if(Q!==!1)X.onNewMention((Z,K)=>{if(typeof Q==="function")return Q(Z,K,G);return G(Z,K)});if(W!==!1)X.onSubscribedMessage((Z,K)=>{if(typeof W==="function")return W(Z,K,G);return G(Z,K)});X.onAction(async(Z)=>{let{actionId:K}=Z;if(!K.startsWith("tool_approve:")&&!K.startsWith("tool_deny:"))return;try{let H=K.startsWith("tool_approve:"),z=K.split(":")[1],V=Z.thread;if(!V){this.log("info",`No thread in action event for toolCallId=${z}`);return}let A=Z.adapter.name,F=Z.messageId,N=this.adapters[A],D=this.adapterConfigs[A];if(!N)throw Error(`No adapter for platform "${A}"`);let L=V.isDM?V.channelId:V.id,B=await this.getOrCreateThread({externalThreadId:L,channelId:V.channelId,platform:A,resourceId:`${A}:${Z.user.userId}`,mastra:$}),O=$.getStorage(),E=O?await O.getStore("memory"):void 0;if(!E)throw Error("Storage is required for tool approval lookups");let{messages:M}=await E.listMessages({threadId:B.id,perPage:50,orderBy:{field:"createdAt",direction:"DESC"}}),R,q,w;for(let x of M){let y=x.content?.metadata?.pendingToolApprovals;if(y){for(let d of Object.values(y))if(d.toolCallId===z){R=d.runId,q=d.toolName,w=d.args;break}if(R)break}}if(!R){this.log("info",`No pending approval found for toolCallId=${z}`);return}let I=q?D70(q):"tool",P=w?N70(w):"",_=D?.cards!==!1;if(!H){let x=V.isDM?void 0:Z.user.fullName||Z.user.userName||"User";try{await N.editMessage(V.id,F,V89(I,P,x,_))}catch(y){this.log("debug","Failed to edit denied card",y)}return}try{await N.editMessage(V.id,F,z89(I,P,_))}catch(x){this.log("debug","Failed to edit approved card",x)}let C=this.adapters[A],k=C.botUserId,S=k?V.mentionUser(k):void 0,T=new p1;T.set("channel",{platform:A,eventType:"action",isDM:V.isDM,threadId:V.id,channelId:V.channelId,messageId:F,userId:Z.user.userId,userName:Z.user.fullName||Z.user.userName,botUserId:k,botUserName:C.userName,botMention:S});let v=await this.agent.approveToolCall({runId:R,toolCallId:z,requestContext:T});await this.consumeAgentStream(v,V,A,z?{toolCallId:z,messageId:F}:void 0)}catch(H){if(H instanceof Error&&H.message.includes("No snapshot found")){this.log("info","Ignoring stale tool approval action (runId already consumed)");return}this.log("error","Error handling tool approval action",H);try{let V=Z.thread;if(V){let A=H instanceof Error?H:Error(String(H)),F=this.adapterConfigs[Z.adapter.name],N=F?.formatError?F.formatError(A):`\u274C Error: ${A.message}`;await V.post(N)}}catch(V){this.log("debug","Failed to post error message for action",V)}}}),await X.initialize(),this.chat=X;for(let[Z,K]of Object.entries(this.adapters)){if(!(this.adapterConfigs[Z]?.gateway??!0))continue;let H=K;if(typeof H.startGatewayListener==="function"){let z=H.startGatewayListener.bind(K);this.startGatewayLoop(Z,z)}}})();try{await this.initPromise}catch(Y){throw this.initPromise=null,Y}}getWebhookRoutes(){if(!this.agent)return[];let $=this.agent.id,Y=[];for(let X of Object.keys(this.adapters)){if(this.externallyManagedPlatforms.has(X))continue;let G=this;Y.push({path:`/api/agents/${$}/channels/${X}/webhook`,method:"POST",requiresAuth:!1,_mastraInternal:!0,createHandler:async()=>{return async(J)=>{if(G.initPromise)try{await G.initPromise}catch{return J.json({error:"Chat initialization failed"},503)}let Q=G.chat;if(!Q)return J.json({error:"Chat not initialized"},503);let W=Q.webhooks?.[X];if(!W)return J.json({error:`No webhook handler for ${X}`},404);let Z;try{Z=J.executionCtx}catch{Z=void 0}let K=Z?.waitUntil?.bind(Z);return W(J.req.raw,K?{waitUntil:K}:void 0)}}})}return Y}async handleWebhookEvent($,Y,X){if(this.initPromise)try{await this.initPromise}catch{return new Response(JSON.stringify({error:"Channel initialization failed"}),{status:503,headers:{"Content-Type":"application/json"}})}let G=this.chat;if(!G)return new Response(JSON.stringify({error:"Chat not initialized"}),{status:503,headers:{"Content-Type":"application/json"}});let J=G.webhooks?.[$];if(!J)return new Response(JSON.stringify({error:`No webhook handler for ${$}`}),{status:404,headers:{"Content-Type":"application/json"}});return J(Y,X)}getInputProcessors($=[]){if($.some((X)=>!V9(X)&&X.id==="chat-channel-context"))return[];return[new A89]}getTools(){if(!this.toolsEnabled)return{};return this.makeChannelTools()}getAdapterFromContext($){let Y=$.requestContext?.get("channel");if(!Y?.platform||!Y?.threadId)throw Error("No channel context \u2014 cannot determine platform or thread");let X=this.adapters[Y.platform];if(!X)throw Error(`No adapter registered for platform "${Y.platform}"`);return{adapter:X,threadId:Y.threadId}}async handleChatMessage($,Y,X){try{await this.processChatMessage($,Y,X)}catch(G){let J=G instanceof Error?G:Error(String(G));this.log("error",`[${$.adapter.name}] Error handling message`,{messageId:Y.id,authorId:Y.author?.userId,error:String(G)});try{let Q=this.adapterConfigs[$.adapter.name],W=Q?.formatError?Q.formatError(J):`\u274C Error: ${J.message}`;await $.post(W)}catch(Q){this.log("debug","Failed to post error message to thread",Q)}}}async processChatMessage($,Y,X){let G=this.agent,J=$.adapter.name,Q=$.isDM?$.channelId:$.id,W=await this.getOrCreateThread({externalThreadId:Q,channelId:$.channelId,platform:J,resourceId:`${J}:${Y.author.userId}`,mastra:X}),Z=W.resourceId,K,H=this.threadContext.maxMessages??10;if(H>0&&!$.isDM)if(!await $.isSubscribed()){this.logger?.debug?.(`Fetching thread history (max ${H}) for first mention in ${$.id}`);let _=await this.fetchThreadHistory($,Y.id,H);if(this.logger?.debug?.(`Fetched ${_.length} messages from thread history`),_.length>0){let C=["[Thread context \u2014 messages in this thread before you joined]"];for(let k of _){let S=k.userId?$.mentionUser(k.userId):void 0,T=S?k.author?`${k.author} (${S})`:S:k.author;if(k.isBot)T+=" (bot)";C.push(`[${T}] (msg:${k.id}): ${k.text}`)}K=C.join(`
`)}}else this.logger?.debug?.(`Skipping thread history fetch \u2014 already subscribed to ${$.id}`);let z=Y.author.fullName||Y.author.userName,V=Y.author.userId,A=V?$.mentionUser(V):void 0,F=this.adapters[J],N=F.botUserId,D=N?$.mentionUser(N):void 0,L=new p1;L.set("channel",{platform:J,eventType:$.isDM?"message":"mention",isDM:$.isDM,threadId:$.id,channelId:$.channelId,messageId:Y.id,userId:V,userName:z,botUserId:N,botUserName:F.userName,botMention:D});let B=[];if(K)B.push(K);if($.isDM)B.push(Y.text);else{let P=["Event: mention",`Message ID: ${Y.id}`];P.push("You were mentioned in this message. Respond to the user."),B.push(`<system-reminder>
${P.join(`
`)}
</system-reminder>`);let _="";if(A)_=z?`${z} (${A})`:A;else if(z)_=z;if(_){if(Y.author.isBot)_+=" (bot)";B.push(`[${_}]: ${Y.text}`)}else B.push(Y.text)}let O=B.join(`

`),E=Y.attachments.filter((P)=>P.url||P.fetchData),M=[{type:"text",text:O}];this.logger?.debug("[CHANNEL] Attachments",{count:E.length,attachments:E.map((P)=>({type:P.type,mimeType:P.mimeType,url:P.url,hasData:!!P.fetchData}))});for(let P of E){if(!P.url&&!P.fetchData)continue;let _=P.mimeType||(P.type==="image"?"image/png":void 0);if(!_)continue;if(this.shouldInline(_)){let k;if(P.fetchData)try{let S=await P.fetchData(),T=Buffer.from(S).toString("base64");k=`data:${_};base64,${T}`}catch(S){this.logger?.warn("[CHANNEL] fetchData failed, falling back to URL",{mimeType:_,error:String(S)}),k=P.url}else k=P.url;if(k)M.push({type:"file",data:k,mimeType:_})}else{let S=`[Attached file: ${P.name||P.url?.split("/").pop()||"file"} (${_})${P.url?` \u2014 ${P.url}`:""}]`;M.push({type:"text",text:`
${S}`})}}if(this.inlineLinkRules&&O){let P=E89(O);for(let _ of P){let C=B89(_,this.inlineLinkRules);if(!C)continue;if(C.forcedMimeType)M.push({type:"file",data:_,mimeType:C.forcedMimeType});else{let k=await M89(_,this.logger);if(k&&this.shouldInline(k))M.push({type:"file",data:_,mimeType:k})}}}let R={id:crypto.randomUUID(),role:"user",createdAt:new Date,content:{format:2,parts:M,metadata:{mastra:{channels:{[J]:{messageId:Y.id,author:{userId:V,userName:Y.author.userName,fullName:Y.author.fullName,mention:A,isBot:Y.author.isBot}}}}}}},w=this.adapterConfigs[J]?.cards!==!1,I=await G.stream(R,{requestContext:L,memory:{thread:W,resource:Z},autoResumeSuspendedTools:w?void 0:!0});await this.consumeAgentStream(I,$,J),await $.subscribe()}async fetchThreadHistory($,Y,X){let G=[];try{for await(let J of $.messages){if(J.id===Y)continue;if(G.push({id:J.id,author:J.author.fullName||J.author.userName||"Unknown",userId:J.author.userId,text:J.text,isBot:J.author.isBot===!0}),G.length>=X)break}}catch(J){return this.logger?.warn?.(`Failed to fetch thread history: ${J}`),[]}return G.reverse()}async editOrPost($,Y,X,G){if(X)try{await $.editMessage(Y.id,X,G)}catch{await Y.post(G)}else await Y.post(G)}async consumeAgentStream($,Y,X,G){let J=this.adapters[X],Q=this.adapterConfigs[X],W=Q?.cards!==!1,Z="",K=!1,H=new Map;if(G)H.set(G.toolCallId,{displayName:"",argsSummary:"",startedAt:Date.now(),messageId:G.messageId});let z,V=async()=>{if(!K){K=!0;try{await Y.startTyping()}catch(L){this.logger?.debug("[CHANNEL] Typing indicator failed (best-effort)",{error:L})}}},A=()=>{if(z)return;z=setInterval(async()=>{try{await Y.startTyping()}catch{}},8000)},F=()=>{if(z)clearInterval(z),z=void 0},N=async()=>{let L=Z.replace(/[\u200B-\u200D\uFEFF]/g,"").trim();if(L)await Y.post(L),Z=""},D=setTimeout(async()=>{if(!K)await V(),A()},3000);try{for await(let L of $.fullStream){if(L.type==="text-delta"){if(L.payload.text)await V(),A();Z+=L.payload.text;continue}if(L.type==="reasoning-delta"){await V(),A();continue}if(L.type==="file"){await N();let{data:B,mimeType:O}=L.payload;this.logger?.debug("[CHANNEL] Received file chunk",{mimeType:O,dataType:typeof B,size:typeof B==="string"?B.length:B?.byteLength});let M=`generated.${O.split("/")[1]?.split(";")[0]||"bin"}`,R=typeof B==="string"?Buffer.from(B,"base64"):B instanceof Uint8Array?Buffer.from(B):B;try{await Y.post({markdown:" ",files:[{data:R,filename:M,mimeType:O}]})}catch(q){this.logger?.debug("[CHANNEL] Failed to post file attachment",{error:q,mimeType:O,filename:M})}continue}if(L.type==="step-finish"||L.type==="finish"){await N();continue}if(L.type==="tool-call"){if(this.channelToolNames.has(L.payload.toolName))continue;await V(),A(),await N();let B=D70(L.payload.toolName),O=typeof L.payload.args==="object"&&L.payload.args!=null?L.payload.args:{},E=N70(O),M;if(!Q?.formatToolCall)M=(await Y.post(K89(B,E,W)))?.id;H.set(L.payload.toolCallId,{displayName:B,argsSummary:E,startedAt:Date.now(),messageId:M});continue}if(L.type==="tool-result"){if(this.channelToolNames.has(L.payload.toolName))continue;let B=H.get(L.payload.toolCallId),O=B?.displayName||D70(L.payload.toolName),E=B?.argsSummary||N70(L.payload.args??{}),M=W89(L.payload.result,L.payload.isError),R=B?.messageId,q=B?.startedAt!=null?Date.now()-B.startedAt:void 0;if(Q?.formatToolCall){let w=Q.formatToolCall({toolName:O,args:L.payload.args??{},result:L.payload.result,isError:L.payload.isError});if(w!=null)await this.editOrPost(J,Y,R,w)}else{let w=U89(O,E,M,!!L.payload.isError,q,W);await this.editOrPost(J,Y,R,w)}continue}if(L.type==="tool-call-approval"){let{toolCallId:B,toolName:O,args:E}=L.payload,M=H.get(B),R=M?.displayName||D70(O),q=M?.argsSummary||N70(E),w=M?.messageId,I=H89(R,q,B,W);await this.editOrPost(J,Y,w,I);continue}if(L.type==="tripwire"){if(L.payload.retry)continue;await N();let B=L.payload.reason||"Your message was blocked by a safety check.",O=L.payload.processorId?`\uD83D\uDEE1\uFE0F Blocked by ${L.payload.processorId}: ${B}`:`\uD83D\uDEE1\uFE0F ${B}`;await Y.post(O);continue}}}finally{clearTimeout(D),F()}if($.error){let L=$.error.message,B=L.length>500?L.slice(0,500)+"\u2026":L;this.log("error",`[${X}] Stream completed with error`,{error:B}),await Y.post(`\u274C Error: ${B}`)}}async getOrCreateThread({externalThreadId:$,channelId:Y,platform:X,resourceId:G,mastra:J}){let Q=J.getStorage();if(!Q)throw Error("Storage is required for channel thread mapping. Configure storage in your Mastra instance.");let W=await Q.getStore("memory");if(!W)throw Error("Memory store is required for channel thread mapping. Configure storage in your Mastra instance.");let Z={channel_platform:X,channel_externalThreadId:$,channel_externalChannelId:Y},{threads:K}=await W.listThreads({filter:{metadata:Z},perPage:1});if(K.length>0)return K[0];return W.saveThread({thread:{id:crypto.randomUUID(),title:`${X} conversation`,resourceId:G,createdAt:new Date,updatedAt:new Date,metadata:Z}})}makeChannelTools(){return{add_reaction:X8({id:"add_reaction",description:"Add an emoji reaction to a message.",inputSchema:U.object({messageId:U.string().describe("The ID of the message to react to"),emoji:U.string().describe('The emoji to react with (e.g. "thumbsup")')}),execute:async({messageId:$,emoji:Y},X)=>{let{adapter:G,threadId:J}=this.getAdapterFromContext(X);return await G.addReaction(J,$,Y),{ok:!0}}}),remove_reaction:X8({id:"remove_reaction",description:"Remove an emoji reaction from a message.",inputSchema:U.object({messageId:U.string().describe("The ID of the message to remove reaction from"),emoji:U.string().describe("The emoji to remove")}),execute:async({messageId:$,emoji:Y},X)=>{let{adapter:G,threadId:J}=this.getAdapterFromContext(X);return await G.removeReaction(J,$,Y),{ok:!0}}})}}startGatewayLoop($,Y){(async()=>{while(!0)try{let Q,W,Z=new Promise((K,H)=>{Q=K,W=H});await Y({waitUntil:(K)=>{K.then(()=>Q(),(H)=>W(H))}},86400000),await Z,this.log("info",`[${$}] Gateway session ended, reconnecting...`)}catch(Q){this.log("error",`[${$}] Gateway error, retrying in 5s`,Q),await new Promise((W)=>setTimeout(W,5000))}})()}log($,Y,...X){if(!this.logger)return;if($==="error")this.logger.error(Y,{args:X});else if($==="debug")this.logger.debug(Y,{args:X});else this.logger.info(Y,{args:X})}},q89,H_,Q80,sZ=($,Y)=>{let X;if(typeof Y==="string")X=$[Y];else{if(!Y?.id)return null;X=$[Y.id]}return X?.status==="success"?X.output:null},rz="Warning: 'runCount' is deprecated and will be removed on November 4th, 2025. Please use 'retryCount' instead.",tZ4,B70=($)=>{if($.type==="step"||$.type==="foreach"||$.type==="loop")return[$.step.id];if($.type==="parallel"||$.type==="conditional")return $.steps.map((Y)=>Y.step.id);if($.type==="sleep"||$.type==="sleepUntil")return[$.id];return[]},U80=($)=>{let{steps:Y,inputData:X,resumeData:G,context:J,nestedStepsContext:Q,snapshot:W,initialState:Z,graph:K,perStep:H}=$,z=Y[0],V=[],A={},F=W.context;for(let[D,L]of K.steps.entries()){let B=V.length;if(B>0&&!G)break;let O=B70(L),E=O.includes(z);if(E){let I=O?.length>1?[O?.findIndex((P)=>P===z)]:[];V=[D,...I]}let M=K.steps[D-1],R=void 0;if(M){let I=B70(M);if(I.length>0)if(I.length===1)R=A?.[I[0]]?.output??{};else R=I.reduce((P,_)=>{return P[_]=A?.[_]?.output??{},P},{})}if(D===0&&O.includes(z))A.input=J?.[z]?.payload??X??F?.input;else if(D===0)A.input=O?.reduce((I,P)=>{if(I)return I;return J?.[P]?.payload??F?.[P]?.payload},null)??F?.input??{};let q=void 0,w=K.steps[D+1];if(w){let I=B70(w);if(I.length>0&&X&&I.includes(z)&&Y.length===1)q=X}O.forEach((I)=>{let P,_=J?.[I]??F[I],C=E&&L.type==="conditional"&&!Y?.includes(I),k=Y?.includes(I)?"running":C?"skipped":"success",S=["failed","canceled"].includes(_?.status)?k:_?.status??k,T=["success","failed","canceled"].includes(S);if(P={status:S,payload:J?.[I]?.payload??R??F[I]?.payload??{},output:T?J?.[I]?.output??q??F[I]?.output??{}:void 0,resumePayload:_?.resumePayload,suspendPayload:_?.suspendPayload,suspendOutput:_?.suspendOutput,startedAt:_?.startedAt??Date.now(),endedAt:T?_?.endedAt??Date.now():void 0,suspendedAt:_?.suspendedAt,resumedAt:_?.resumedAt},(H?V.length:B)>0&&!Y?.includes(I)&&!J?.[I]&&(!F[I]||F[I]&&F[I].status!=="suspended"))P=void 0;if(P){let x=Lx0(P);A[I]=x}})}if(!V.length)throw Error(`Time travel target step not found in execution graph: '${Y?.join(".")}'. Verify the step id/path.`);return{inputData:X,executionPath:V,steps:Y,stepResults:A,nestedStepResults:Q,state:Z??W.value??{},resumeData:G,stepExecutionPath:W?.stepExecutionPath}},H80=({snapshot:$,graph:Y})=>{let X=!1;if($.status!=="running"&&$.status!=="waiting")if($.status==="pending"&&$.context&&Object.prototype.hasOwnProperty.call($.context,"input"))X=!0;else throw Error("This workflow run was not active");let G={},J=Y.steps[0];if(J.type==="step"||J.type==="foreach"||J.type==="loop")G={[J.step.id]:[0]};else if(J.type==="sleep"||J.type==="sleepUntil")G={[J.id]:[0]};else if(J.type==="conditional"||J.type==="parallel")G=J.steps.reduce((W,Z)=>{return W[Z.step.id]=[0],W},{});return{activePaths:X?[0]:$.activePaths,activeStepsPath:X?G:$.activeStepsPath,stepResults:$.context,state:$.value,stepExecutionPath:$?.stepExecutionPath}},c24,zg0,V80,A80=class{#$;pubsub;workflowId;runId;resourceId;disableScorers;tracingPolicy;validateInputs;state={};executionEngine;executionGraph;serializedStepGraph;workflowSteps;workflowRunStatus;workflowEngineType;#Y;#X=[];get mastra(){return this.#Y}streamOutput;closeStreamAction;executionResults;stateSchema;inputSchema;requestContextSchema;cleanup;retryConfig;constructor($){this.workflowId=$.workflowId,this.runId=$.runId,this.resourceId=$.resourceId,this.serializedStepGraph=$.serializedStepGraph,this.executionEngine=$.executionEngine,this.executionGraph=$.executionGraph,this.#Y=$.mastra,this.pubsub=$.pubsub??new q64,this.retryConfig=$.retryConfig,this.cleanup=$.cleanup,this.disableScorers=$.disableScorers,this.tracingPolicy=$.tracingPolicy,this.workflowSteps=$.workflowSteps,this.validateInputs=$.validateInputs,this.stateSchema=$.stateSchema,this.inputSchema=$.inputSchema,this.requestContextSchema=$.requestContextSchema,this.workflowRunStatus="pending",this.workflowEngineType=$.workflowEngineType}get abortController(){if(!this.#$)this.#$=new AbortController;return this.#$}async cancel(){this.abortController.abort(),this.workflowRunStatus="canceled";try{await(await this.mastra?.getStorage()?.getStore("workflows"))?.updateWorkflowState({workflowName:this.workflowId,runId:this.runId,opts:{status:"canceled"}})}catch{}}async#J($,Y,X){let G=await $["~standard"].validate(Y);if(G.issues)throw Error(`Invalid ${X}: 
`+G.issues.map((J)=>`- ${J.path?.join(".")}: ${J.message}`).join(`
`));return G.value}async _validateInput($){if(!this.validateInputs||!this.inputSchema)return $;return this.#J(this.inputSchema,$,"input data")}async _validateInitialState($){if(!this.validateInputs||!this.stateSchema)return $;return this.#J(this.stateSchema,$,"initial data")}async _validateRequestContext($){if(this.validateInputs&&this.requestContextSchema){let Y=$?.all??{},X=this.requestContextSchema["~standard"].validate(Y);if(X instanceof Promise)throw Error("Your schema is async, which is not supported. Please use a sync schema.");if(!("value"in X)){let G=X.issues;throw Error(`Request context validation failed for workflow '${this.workflowId}': 
`+G.map((J)=>{return`- ${J.path?.map((W)=>typeof W==="object"?W.key:W).join(".")}: ${J.message}`}).join(`
`))}}}async _validateResumeData($,Y){if(!this.validateInputs||!Y?.resumeSchema)return $;return this.#J(Y.resumeSchema,$,"resume data")}async _validateTimetravelInputData($,Y){if(!this.validateInputs||!Y?.inputSchema)return $;return this.#J(Y.inputSchema,$,"inputData")}async _start({inputData:$,initialState:Y,requestContext:X,outputWriter:G,tracingOptions:J,format:Q,outputOptions:W,perStep:Z,...K}){let H=$4(K),z=wW({type:"workflow_run",name:`workflow run: '${this.workflowId}'`,entityType:J6.WORKFLOW_RUN,entityId:this.workflowId,entityName:this.workflowId,input:$,metadata:{resourceId:this.resourceId,runId:this.runId},tracingPolicy:this.tracingPolicy,tracingOptions:J,tracingContext:H.tracingContext,requestContext:X,mastra:this.#Y}),V=z?.externalTraceId,A=z?.id,F=await this._validateInput($),N=await this._validateInitialState(Y??{});await this._validateRequestContext(X);let D=await this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,resourceId:this.resourceId,disableScorers:this.disableScorers,graph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,input:F,initialState:N,pubsub:this.pubsub,retryConfig:this.retryConfig,requestContext:X??new p1,abortController:this.abortController,outputWriter:G,workflowSpan:z,format:Q,outputOptions:W,perStep:Z});if(D.status!=="suspended")this.cleanup?.();return D.traceId=V,D.spanId=A,D}async start($){return this._start($)}async startAsync($){return this._start($).catch((Y)=>{this.mastra?.getLogger()?.error(`[Workflow ${this.workflowId}] Background execution failed:`,Y)}),{runId:this.runId}}streamLegacy({inputData:$,requestContext:Y,onChunk:X,tracingOptions:G,...J}={}){let Q=$4(J);if(this.closeStreamAction)return{stream:this.observeStreamLegacy().stream,getWorkflowState:()=>this.executionResults};let{readable:W,writable:Z}=new FV,K=Z.getWriter(),H=this.watch(async(z)=>{try{let V={...z,type:z.type.replace("workflow-","")};if(await K.write(V),X)await X(V)}catch{}});return this.closeStreamAction=async()=>{await this.pubsub.publish(`workflow.events.v2.${this.runId}`,{type:"watch",runId:this.runId,data:{type:"workflow-finish",payload:{runId:this.runId}}}),H(),await Promise.all(this.#X.map((z)=>z())),this.#X=[];try{await K.close()}catch(z){this.mastra?.getLogger()?.error("Error closing stream:",z)}finally{K.releaseLock()}},this.pubsub.publish(`workflow.events.v2.${this.runId}`,{type:"watch",runId:this.runId,data:{type:"workflow-start",payload:{runId:this.runId}}}),this.executionResults=this._start({inputData:$,requestContext:Y,format:"legacy",...Q,tracingOptions:G}).then((z)=>{if(z.status!=="suspended")this.closeStreamAction?.().catch(()=>{});return z}),{stream:W,getWorkflowState:()=>this.executionResults}}observeStreamLegacy(){let{readable:$,writable:Y}=new FV,X=Y.getWriter(),G=this.watch(async(J)=>{try{let Q={...J,type:J.type.replace("workflow-","")};await X.write(Q)}catch{}});return this.#X.push(async()=>{G();try{await X.close()}catch(J){this.mastra?.getLogger()?.error("Error closing stream:",J)}finally{X.releaseLock()}}),{stream:$}}observeStream(){if(!this.streamOutput)return new $2({pull($){$.close()},cancel($){$.close()}});return this.streamOutput.fullStream}stream({inputData:$,requestContext:Y,tracingOptions:X,closeOnSuspend:G=!0,initialState:J,outputOptions:Q,perStep:W,...Z}){let K=$4(Z);if(this.closeStreamAction&&this.streamOutput)return this.streamOutput;this.closeStreamAction=async()=>{};let H=this,z=new $2({async start(V){let A=H.watch(async(D)=>{let{type:L,from:B="WORKFLOW",payload:O,data:E,...M}=D;if(E!==void 0&&O===void 0)V.enqueue({type:L,runId:H.runId,from:B,data:E,...M});else V.enqueue({type:L,runId:H.runId,from:B,payload:{stepName:O?.id,...O}})});H.closeStreamAction=async()=>{A();try{if(V.desiredSize!==null)V.close()}catch(D){H.mastra?.getLogger()?.error("Error closing stream:",D)}};let F=H._start({inputData:$,requestContext:Y,...K,tracingOptions:X,initialState:J,outputOptions:Q,outputWriter:async(D)=>{H.pubsub.publish(`workflow.events.v2.${H.runId}`,{type:"watch",runId:H.runId,data:D})},perStep:W}),N;try{if(N=await F,G)H.closeStreamAction?.().catch(()=>{});else if(N.status!=="suspended")H.closeStreamAction?.().catch(()=>{});if(H.streamOutput)H.streamOutput.updateResults(N)}catch(D){H.streamOutput?.rejectResults(D),H.closeStreamAction?.().catch(()=>{})}}});return this.streamOutput=new H_({runId:this.runId,workflowId:this.workflowId,stream:z}),this.streamOutput}resumeStream({step:$,resumeData:Y,requestContext:X,tracingOptions:G,forEachIndex:J,outputOptions:Q,perStep:W,...Z}={}){let K=$4(Z);this.closeStreamAction=async()=>{};let H=this,z=new $2({async start(V){let A=H.watch(async(D)=>{let{type:L,from:B="WORKFLOW",payload:O,data:E,...M}=D;if(E!==void 0&&O===void 0)V.enqueue({type:L,runId:H.runId,from:B,data:E,...M});else V.enqueue({type:L,runId:H.runId,from:B,payload:{stepName:O?.id,...O}})});H.closeStreamAction=async()=>{A();try{if(V.desiredSize!==null)V.close()}catch(D){H.mastra?.getLogger()?.error("Error closing stream:",D)}};let F=H._resume({resumeData:Y,step:$,requestContext:X,...K,tracingOptions:G,outputWriter:async(D)=>{V.enqueue(D)},isVNext:!0,forEachIndex:J,outputOptions:Q,perStep:W});H.executionResults=F;let N;try{if(N=await F,H.closeStreamAction?.().catch(()=>{}),H.streamOutput)H.streamOutput.updateResults(N)}catch(D){H.streamOutput?.rejectResults(D),H.closeStreamAction?.().catch(()=>{})}}});return this.streamOutput=new H_({runId:this.runId,workflowId:this.workflowId,stream:z}),this.streamOutput}watch($){let Y=(G)=>{if(G.runId===this.runId)$(G.data)},X=(G)=>{if(G.runId===this.runId){let{event:J,workflowId:Q}=G.data;if(J.type.startsWith("data-")&&J.data!==void 0)this.pubsub.publish(`workflow.events.v2.${this.runId}`,{type:"watch",runId:this.runId,data:J});else this.pubsub.publish(`workflow.events.v2.${this.runId}`,{type:"watch",runId:this.runId,data:{...J,...J.payload?.id?{payload:{...J.payload,id:`${Q}.${J.payload.id}`}}:{}}})}};return this.pubsub.subscribe(`workflow.events.v2.${this.runId}`,Y),this.pubsub.subscribe("nested-watch",X),()=>{this.pubsub.unsubscribe(`workflow.events.v2.${this.runId}`,Y),this.pubsub.unsubscribe("nested-watch",X)}}async watchAsync($){return this.watch($)}async resume($){return this._resume($)}async restart($={}){return this._restart($)}async _resume($){let Y=$4($),G=await(await this.#Y?.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId});if(!G)throw Error("No snapshot found for this workflow run: "+this.workflowId+" "+this.runId);if(G.status!=="suspended")throw Error("This workflow run was not suspended");let J=$.label?G?.resumeLabels?.[$.label]:void 0,Q=J?.stepId??$.step,W;if(Q){let q=Q;if(typeof Q==="string")q=Q.split(".");W=(Array.isArray(q)?q:[q]).map((w)=>typeof w==="string"?w:w?.id)}else{let q=[];if(Object.entries(G?.suspendedPaths??{}).forEach(([w,I])=>{let P=G?.context?.[w];if(P&&typeof P==="object"&&"status"in P){let _=P;if(_.status==="suspended"){let C=_.suspendPayload?.__workflow_meta?.path;if(C&&Array.isArray(C))q.push([w,...C]);else q.push([w])}}}),q.length===0)throw Error("No suspended steps found in this workflow run");if(q.length===1)W=q[0];else{let w=q.map((I)=>`[${I.join(", ")}]`);throw Error(`Multiple suspended steps found: ${w.join(", ")}. Please specify which step to resume using the "step" parameter.`)}}if(!$.retryCount){let q=Object.keys(G?.suspendedPaths??{});if(!q.includes(W?.[0]??""))throw Error(`This workflow step "${W?.[0]}" was not suspended. Available suspended steps: [${q.join(", ")}]`)}let Z=this.workflowSteps[W?.[0]??""],K=await this._validateResumeData($.resumeData,Z),H;if($.retryCount&&$.retryCount>0&&$.requestContext)H=$.requestContext.get("__mastraWorflowInputData"),$.requestContext.delete("__mastraWorflowInputData");let z={...G?.context??{},input:H??G?.context?.input},V=$.requestContext??new p1;Object.entries(G?.requestContext??{}).forEach(([q,w])=>{if(!V.has(q))V.set(q,w)});let A=G?.tracingContext,F=$.tracingOptions?.traceId,N=$.tracingOptions?.parentSpanId,D=F??(!N?A?.traceId:void 0),L=!N&&(!F||F===A?.traceId),B={...$.tracingOptions,traceId:D,parentSpanId:L?A?.spanId:$.tracingOptions?.parentSpanId},O=wW({type:"workflow_run",name:`workflow run: '${this.workflowId}' (resumed)`,entityType:J6.WORKFLOW_RUN,entityId:this.workflowId,entityName:this.workflowId,input:K,metadata:{resourceId:this.resourceId,runId:this.runId,resumed:!0,resumedFromSpanId:A?.spanId},tracingPolicy:this.tracingPolicy,tracingOptions:B,tracingContext:Y.tracingContext,requestContext:V,mastra:this.#Y}),E=O?.externalTraceId,M=O?.id,R=this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,resourceId:this.resourceId,graph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,input:G?.context?.input,initialState:G?.value??{},resume:{steps:W,stepResults:z,resumePayload:K,resumePath:G?.suspendedPaths?.[W?.[0]],stepExecutionPath:G?.stepExecutionPath,forEachIndex:$.forEachIndex??J?.foreachIndex,label:$.label},format:$.format,pubsub:this.pubsub,requestContext:V,abortController:this.abortController,workflowSpan:O,outputOptions:$.outputOptions,outputWriter:$.outputWriter,perStep:$.perStep}).then((q)=>{if(!$.isVNext&&q.status!=="suspended")this.closeStreamAction?.().catch(()=>{});return q.traceId=E,q.spanId=M,q});return this.executionResults=R,R.then((q)=>{return this.streamOutput?.updateResults(q),q})}async _restart({requestContext:$,outputWriter:Y,tracingOptions:X,...G}){let J=$4(G);if(!["default","evented"].includes(this.workflowEngineType))throw Error(`restart() is not supported on ${this.workflowEngineType} workflows`);let Z=await(await this.#Y?.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId});if(!Z)throw Error(`Snapshot not found for run ${this.runId}`);let K=H80({snapshot:Z,graph:this.executionGraph}),H=$??new p1;for(let[N,D]of Object.entries(Z.requestContext??{}))if(!H.has(N))H.set(N,D);let z=wW({type:"workflow_run",name:`workflow run: '${this.workflowId}'`,entityType:J6.WORKFLOW_RUN,entityId:this.workflowId,entityName:this.workflowId,metadata:{resourceId:this.resourceId,runId:this.runId},tracingPolicy:this.tracingPolicy,tracingOptions:X,tracingContext:J.tracingContext,requestContext:H,mastra:this.#Y}),V=z?.externalTraceId,A=z?.id,F=await this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,resourceId:this.resourceId,disableScorers:this.disableScorers,graph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,restart:K,pubsub:this.pubsub,retryConfig:this.retryConfig,requestContext:H,abortController:this.abortController,outputWriter:Y,workflowSpan:z});if(F.status!=="suspended")this.cleanup?.();return F.traceId=V,F.spanId=A,F}async _timeTravel({inputData:$,resumeData:Y,initialState:X,step:G,context:J,nestedStepsContext:Q,requestContext:W,outputWriter:Z,tracingOptions:K,outputOptions:H,perStep:z,...V}){let A=$4(V);if(!G||Array.isArray(G)&&G.length===0)throw Error("Step is required and must be a valid step or array of steps");let N=await(await this.#Y?.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId});if(!N)throw Error(`Snapshot not found for run ${this.runId}`);if(N.status==="running")throw Error("This workflow run is still running, cannot time travel");let D,L=G;if(typeof G==="string")L=G.split(".");D=(Array.isArray(L)?L:[L]).map((I)=>typeof I==="string"?I:I?.id);let B=$;if(B&&D.length===1)B=await this._validateTimetravelInputData($,this.workflowSteps[D[0]]);let O=U80({steps:D,inputData:B,resumeData:Y,context:J,nestedStepsContext:Q,snapshot:N,initialState:X,graph:this.executionGraph,perStep:z}),E=W??new p1;for(let[I,P]of Object.entries(N.requestContext??{}))if(!E.has(I))E.set(I,P);let M=wW({type:"workflow_run",name:`workflow run: '${this.workflowId}'`,input:$,entityType:J6.WORKFLOW_RUN,entityId:this.workflowId,entityName:this.workflowId,metadata:{resourceId:this.resourceId,runId:this.runId},tracingPolicy:this.tracingPolicy,tracingOptions:K,tracingContext:A.tracingContext,requestContext:E,mastra:this.#Y}),R=M?.externalTraceId,q=M?.id,w=await this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,resourceId:this.resourceId,disableScorers:this.disableScorers,graph:this.executionGraph,timeTravel:O,serializedStepGraph:this.serializedStepGraph,pubsub:this.pubsub,retryConfig:this.retryConfig,requestContext:E,abortController:this.abortController,outputWriter:Z,workflowSpan:M,outputOptions:H,perStep:z});if(w.status!=="suspended")this.cleanup?.();return w.traceId=R,w.spanId=q,w}async timeTravel($){return this._timeTravel($)}timeTravelStream({inputData:$,resumeData:Y,initialState:X,step:G,context:J,nestedStepsContext:Q,requestContext:W,tracingOptions:Z,outputOptions:K,perStep:H,...z}){let V=$4(z);this.closeStreamAction=async()=>{};let A=this,F=new $2({async start(N){let D=A.watch(async({type:O,from:E="WORKFLOW",payload:M})=>{N.enqueue({type:O,runId:A.runId,from:E,payload:{stepName:M.id,...M}})});A.closeStreamAction=async()=>{D();try{if(N.desiredSize!==null)N.close()}catch(O){A.mastra?.getLogger()?.error("Error closing stream:",O)}};let L=A._timeTravel({inputData:$,step:G,context:J,nestedStepsContext:Q,resumeData:Y,initialState:X,requestContext:W,...V,tracingOptions:Z,outputWriter:async(O)=>{N.enqueue(O)},outputOptions:K,perStep:H});A.executionResults=L;let B;try{if(B=await L,A.closeStreamAction?.().catch(()=>{}),A.streamOutput)A.streamOutput.updateResults(B)}catch(O){A.streamOutput?.rejectResults(O),A.closeStreamAction?.().catch(()=>{})}}});return this.streamOutput=new H_({runId:this.runId,workflowId:this.workflowId,stream:F}),this.streamOutput}_getExecutionResults(){return this.executionResults??this.streamOutput?.result}},i24,p89,fW,n24,r24,xD,KG=($)=>{return xD.includes($.specificationVersion)},mQ7=class ${constructor(Y,X=[],G=new Map,J){if(this.config=Y,this.steps=X,this.originalPromptObjects=G,this.#$=J,!this.config.id)throw new G0({id:"MASTR_SCORER_FAILED_TO_CREATE_MISSING_ID",domain:"SCORER",category:"USER",text:"Scorers must have an ID field. Please provide an ID in the scorer config."})}config;steps;originalPromptObjects;#$;#Y;source;__registerMastra(Y){this.#$=Y}toRawConfig(){return this.#Y}__setRawConfig(Y){this.#Y=Y}get type(){return this.config.type}get id(){return this.config.id}get name(){return this.config.name??this.config.id}get description(){return this.config.description}get judge(){return this.config.judge}preprocess(Y){let X=this.isPromptObject(Y);if(X){let G=Y;this.originalPromptObjects.set("preprocess",G)}return new $(this.config,[...this.steps,{name:"preprocess",definition:Y,isPromptObject:X}],new Map(this.originalPromptObjects),this.#$)}analyze(Y){let X=this.isPromptObject(Y);if(X){let G=Y;this.originalPromptObjects.set("analyze",G)}return new $(this.config,[...this.steps,{name:"analyze",definition:X?void 0:Y,isPromptObject:X}],new Map(this.originalPromptObjects),this.#$)}generateScore(Y){let X=this.isPromptObject(Y);if(X){let G=Y;this.originalPromptObjects.set("generateScore",G)}return new $(this.config,[...this.steps,{name:"generateScore",definition:X?void 0:Y,isPromptObject:X}],new Map(this.originalPromptObjects),this.#$)}generateReason(Y){let X=this.isPromptObject(Y);if(X){let G=Y;this.originalPromptObjects.set("generateReason",G)}return new $(this.config,[...this.steps,{name:"generateReason",definition:X?void 0:Y,isPromptObject:X}],new Map(this.originalPromptObjects),this.#$)}get hasGenerateScore(){return this.steps.some((Y)=>Y.name==="generateScore")}normalizeRunRequestContext(Y){if(!Y)return;if(Y instanceof p1)return Y;return new p1(Object.entries(Y))}async run(Y){if(!this.hasGenerateScore)throw new G0({id:"MASTR_SCORER_FAILED_TO_RUN_MISSING_GENERATE_SCORE",domain:"SCORER",category:"USER",text:"Cannot execute pipeline without generateScore() step",details:{scorerId:this.config.id??this.config.name,steps:this.steps.map((A)=>A.name).join(", ")}});let X=this.config.prepareRun?await this.config.prepareRun(Y):Y,G=X.runId;if(!G)G=M6();let J=this.normalizeRunRequestContext(X.requestContext),Q=wW({type:"scorer_run",name:`scorer run: '${this.id}'`,entityType:J6.SCORER,entityId:this.id,input:{input:X.input,output:X.output,groundTruth:X.groundTruth,expectedTrajectory:X.expectedTrajectory,requestContext:J},attributes:{scorerId:this.id,scorerName:this.name,...X.scoreSource?{scoreSource:X.scoreSource}:{},...X.targetScope?{targetScope:X.targetScope}:{},...X.targetEntityType?{targetEntityType:X.targetEntityType}:{},...this.source?{scorerDefinition:this.source}:{}},metadata:{...X.targetTraceId?{targetTraceId:X.targetTraceId}:{},...X.targetSpanId?{targetSpanId:X.targetSpanId}:{}},mastra:this.#$}),W={...X,runId:G,...Q?.traceId?{scoreTraceId:Q.traceId}:{}},Z=g4({currentSpan:Q}),K,H;try{K=this.toMastraWorkflow(),H=await K.createRun()}catch(A){throw Q?.error({error:A,endSpan:!0}),A}let z;try{z=await DQ({span:Q,fn:()=>H.start({inputData:{run:W},...Z})})}catch(A){throw Q?.error({error:A,endSpan:!0}),A}if(z.status==="failed"){let A=z.error instanceof Error?z.error:Error(typeof z.error==="string"?z.error:"Scorer workflow failed");throw Q?.error({error:A,endSpan:!0}),new G0({id:"MASTR_SCORER_FAILED_TO_RUN_WORKFLOW_FAILED",domain:"SCORER",category:"USER",text:`Scorer Run Failed: ${typeof z.error==="string"?z.error:z.error.message}`,details:{scorerId:this.config.id??this.config.name,steps:this.steps.map((F)=>F.name).join(", ")}},z.error instanceof Error?z.error:void 0)}let V=this.transformToScorerResult({workflowResult:z,originalInput:W});if(Q?.end({output:{success:!0,score:typeof V.score==="number"?V.score:null,reason:typeof V.reason==="string"?V.reason:null}}),this.#$?.observability.addScore&&typeof V.score==="number")try{let A=Y.targetTraceId??Y.targetCorrelationContext?.traceId,F=Y.targetSpanId??Y.targetCorrelationContext?.spanId;await this.#$.observability.addScore({...A?{traceId:A}:{},...F?{spanId:F}:{},...Y.targetCorrelationContext?{correlationContext:Y.targetCorrelationContext}:{},score:{scorerId:this.id,scorerName:this.name,...Y.scoreSource?{scoreSource:Y.scoreSource}:{},score:V.score,...typeof V.reason==="string"?{reason:V.reason}:{},...typeof V.scoreTraceId==="string"?{scoreTraceId:V.scoreTraceId}:{},...Y.targetEntityType?{targetEntityType:Y.targetEntityType}:{},metadata:{...Y.targetMetadata??{},hasGroundTruth:Y.groundTruth!==void 0,...Y.targetScope?{targetScope:Y.targetScope}:{},...this.source?{scorerDefinition:this.source}:{}}}})}catch(A){this.#$.getLogger()?.warn?.(`Failed to emit score to observability for scorer ${this.id}:`,A)}return V}isPromptObject(Y){if(typeof Y==="object"&&"description"in Y&&"createPrompt"in Y&&!("outputSchema"in Y))return!0;return typeof Y==="object"&&"description"in Y&&"outputSchema"in Y&&"createPrompt"in Y}getSteps(){return this.steps.map((Y)=>{let X=Y.isPromptObject?this.originalPromptObjects.get(Y.name)?.description:Y.definition?.description;return{name:Y.name,type:Y.isPromptObject?"prompt":"function",description:X}})}toMastraWorkflow(){let Y=this.steps.map((J)=>{return o9({id:J.name,description:`Scorer step: ${J.name}`,inputSchema:U.any(),outputSchema:U.any(),execute:async({inputData:Q,getInitData:W,...Z})=>{let K=$4(Z),{accumulatedResults:H={},generatedPrompts:z={}}=Q,{run:V}=W(),A=this.createScorerContext(J.name,V,H),F=K.tracingContext.currentSpan,D=(F?.type==="scorer_run"?F:F?.findParent("scorer_run"))?.createChildSpan({type:"scorer_step",name:`scorer step: '${J.name}'`,entityType:J6.SCORER,entityId:this.config.id??this.config.name,input:A,attributes:{step:J.name,stepType:J.isPromptObject?"prompt":"function"}}),L=g4({currentSpan:D}),B={...A,...L},O,E,M;try{await DQ({span:D,fn:async()=>{if(J.isPromptObject){let w=await this.executePromptStep(J,L,B);O=w.result,E=w.prompt,M=w.judgeModel}else O=await this.executeFunctionStep(J,B)}})}catch(w){throw D?.error({error:w,endSpan:!0}),w}if(E!==void 0||M!==void 0)D?.update({attributes:{...E!==void 0?{prompt:E}:{},...M!==void 0?{judgeModel:M}:{}}});D?.end({output:O});let R=E!==void 0?{...z,[`${J.name}Prompt`]:E}:z,q={...H,[`${J.name}StepResult`]:O};return{stepResult:O,accumulatedResults:q,generatedPrompts:R}}})}),X=TQ({id:`scorer-${this.config.id??this.config.name}`,description:this.config.description,inputSchema:U.object({run:U.any()}),outputSchema:U.object({run:U.any(),score:U.number(),reason:U.string().optional(),preprocessResult:U.any().optional(),analyzeResult:U.any().optional(),preprocessPrompt:U.string().optional(),analyzePrompt:U.string().optional(),generateScorePrompt:U.string().optional(),generateReasonPrompt:U.string().optional()}),options:{validateInputs:!1}});X.__setLogger(this.#$?.getLogger()??Vy0);let G=X;for(let J of Y)G=G.then(J);return G.commit()}createScorerContext(Y,X,G){if(Y==="generateReason"){let J=G.generateScoreStepResult;return{run:X,results:G,score:J}}return{run:X,results:G}}async executeFunctionStep(Y,X){return await Y.definition(X)}async executePromptStep(Y,X,G){let J=this.originalPromptObjects.get(Y.name);if(!J)throw Error(`Step "${Y.name}" is not a prompt object`);let Q=await J.createPrompt(G),W=J.judge?.model??this.config.judge?.model,Z=J.judge?.instructions??this.config.judge?.instructions;if(!W||!Z)throw new G0({id:"MASTR_SCORER_FAILED_TO_RUN_MISSING_MODEL_OR_INSTRUCTIONS",domain:"SCORER",category:"USER",text:`Step "${Y.name}" requires a model and instructions`,details:{scorerId:this.config.id??this.config.name,step:Y.name}});let K=await PE(W,void 0,this.#$),H=K.modelId,z=new YJ({id:"judge",name:"judge",model:K,instructions:Z});if(Y.name==="generateScore"){let V;if(KG(K))V=await M70(z,Q,{structuredOutput:{schema:U.object({score:U.number()})},...X});else{let A=U.object({score:U.number()}),F=W4(A);V=await z.generateLegacy(Q,{output:$6(F),...X})}return{result:V.object.score,prompt:Q,judgeModel:H}}else if(Y.name==="generateReason"){let V;if(KG(K))V=await z.generate(Q,{...X});else V=await z.generateLegacy(Q,{...X});return{result:V.text,prompt:Q,judgeModel:H}}else{let A=W4(J.outputSchema),F;if(KG(K))F=await M70(z,Q,{structuredOutput:{schema:A},...X});else F=await z.generateLegacy(Q,{output:$6(A),...X});return{result:F.object,prompt:Q,judgeModel:H}}}transformToScorerResult({workflowResult:Y,originalInput:X}){let G=Y.result,J=G?.accumulatedResults||{},Q=G?.generatedPrompts||{};return{...X,score:J.generateScoreStepResult,generateScorePrompt:Q.generateScorePrompt,reason:J.generateReasonStepResult,generateReasonPrompt:Q.generateReasonPrompt,preprocessStepResult:J.preprocessStepResult,preprocessPrompt:Q.preprocessPrompt,analyzeStepResult:J.analyzeStepResult,analyzePrompt:Q.analyzePrompt}}},i89,r89,e89=class{id="prepare-step";name="Prepare Step Processor";prepareStep;constructor($){this.prepareStep=$.prepareStep}async processInputStep($){return this.prepareStep($)}},H99,A99=class{content;finishReason;usage;warnings;request;response;providerMetadata;tripwire;constructor({content:$,finishReason:Y,usage:X,warnings:G,request:J,response:Q,providerMetadata:W,tripwire:Z}){this.content=$,this.finishReason=Y,this.usage=X,this.warnings=G,this.request=J,this.response=Q,this.providerMetadata=W,this.tripwire=Z}get text(){if(this.tripwire)return"";return this.content.filter(($)=>$.type==="text").map(($)=>$.text).join("")}get reasoning(){return this.content.filter(($)=>$.type==="reasoning")}get reasoningText(){return this.reasoning.length===0?void 0:this.reasoning.map(($)=>$.text).join("")}get files(){return this.content.filter(($)=>$.type==="file").map(($)=>$.file)}get sources(){return this.content.filter(($)=>$.type==="source")}get toolCalls(){return this.content.filter(($)=>$.type==="tool-call")}get staticToolCalls(){return this.toolCalls.filter(($)=>$.dynamic===!1)}get dynamicToolCalls(){return this.toolCalls.filter(($)=>$.dynamic===!0)}get toolResults(){return this.content.filter(($)=>$.type==="tool-result")}get staticToolResults(){return this.toolResults.filter(($)=>$.dynamic===!1)}get dynamicToolResults(){return this.toolResults.filter(($)=>$.dynamic===!0)}},o24=class{#$;constructor({_internal:$,model:Y}){this.#$={responseMetadata:{id:$?.generateId?.(),timestamp:$?.currentDate?.(),modelId:Y.modelId,modelVersion:Y.specificationVersion,modelProvider:Y.provider,headers:void 0},modelMetadata:{modelId:Y.modelId,modelVersion:Y.specificationVersion,modelProvider:Y.provider},providerOptions:void 0,hasErrored:!1,apiError:void 0,deferredErrorChunk:void 0,stepResult:void 0}}setState($){this.#$={...this.#$,...$}}get state(){return this.#$}},J24,C99,Bg0=class{schema;validatePartialChunks=!1;partialSchema;constructor($,Y={}){if(this.schema=$,Y.validatePartialChunks&&this.isZodSchema($)&&"partial"in $&&typeof $.partial==="function")this.partialSchema=$.partial(),this.validatePartialChunks=!0}isZodSchema($){return k80($)}async validateValue($){if(!this.schema)return{success:!0,value:$};if(this.isZodSchema(this.schema))try{let Y=await this.schema["~standard"].validate($);if(!Y.issues)return{success:!0,value:Y.value};let X=Y.issues.map((Q)=>`- ${Q.path?.join(".")||"root"}: ${Q.message}`).join(`
`),G=this.schema.safeParse($),J=!G.success?G.error:void 0;return{success:!1,error:new G0({domain:"AGENT",category:"SYSTEM",id:"STRUCTURED_OUTPUT_SCHEMA_VALIDATION_FAILED",text:`Structured output validation failed: ${X}`,details:{value:typeof $==="object"?JSON.stringify($):String($)}},J)}}catch(Y){return{success:!1,error:Y instanceof Error?Y:Error("Zod validation failed",{cause:Y})}}try{let Y=await this.schema["~standard"].validate($);if(!Y.issues)return{success:!0,value:Y.value};let X=Y.issues.map((G)=>`- ${G.path?.join(".")||"root"}: ${G.message}`).join(`
`);return{success:!1,error:new G0({domain:"AGENT",category:"SYSTEM",id:"STRUCTURED_OUTPUT_SCHEMA_VALIDATION_FAILED",text:`Structured output validation failed: ${X}`,details:{value:typeof $==="object"?JSON.stringify($):String($)}})}}catch(Y){return{success:!1,error:Y instanceof Error?Y:Error("Validation failed",{cause:Y})}}}preprocessText($){let Y=$;if(Y.includes("<|message|>")){let G=Y.match(/<\|message\|>([\s\S]+)$/);if(G&&G[1])Y=G[1]}let X=Y.trimStart();if(/^```json\b/.test(X)){let G=X.match(/^```json\s*\n?([\s\S]*?)\n?\s*```\s*$/);if(G&&G[1])Y=G[1].trim();else Y=X.replace(/^```json\s*\n?/,"")}return Y=$K4(Y),Y}},S99,k99,v99,_X,h99="Observational Memory is not supported with agent network. Agent network does not propagate the threadId/resourceId context Observational Memory requires. Disable observationalMemory before using agent.network().",p99,d99=class{constructor($){this.capabilities=$}capabilities;__primitive({instructions:$,messages:Y,context:X,thread:G,memoryConfig:J,resourceId:Q,runId:W,toolsets:Z,clientTools:K,requestContext:H,writableStream:z,methodType:V,tracingOptions:A,inputProcessors:F,...N}){let D=$4(N);return{before:async()=>{let L=wW({type:"agent_run",name:`agent run: '${this.capabilities.id}'`,entityType:J6.AGENT,entityId:this.capabilities.id,entityName:this.capabilities.name,input:{messages:Y},attributes:{instructions:this.capabilities.convertInstructionsToString($),availableTools:[...Z?Object.keys(Z):[],...K?Object.keys(K):[]],...this.capabilities.resolvedVersionId?{resolvedVersionId:this.capabilities.resolvedVersionId}:{}},metadata:{runId:W,resourceId:Q,threadId:G?G.id:void 0},tracingPolicy:this.capabilities.tracingPolicy,tracingOptions:A,tracingContext:D.tracingContext,requestContext:H,mastra:this.capabilities.mastra}),B=g4({currentSpan:L}),O=await this.capabilities.getMemory({requestContext:H}),E=G?.id,M=await this.capabilities.convertTools({toolsets:Z,clientTools:K,threadId:E,resourceId:Q,runId:W,requestContext:H,...B,writableStream:z,methodType:V==="generate"?"generateLegacy":"streamLegacy",memoryConfig:J,inputProcessors:F}),R=new l6({threadId:E,resourceId:Q,generateMessageId:this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),_agentNetworkAppend:this.capabilities._agentNetworkAppend}).addSystem($||await this.capabilities.getInstructions({requestContext:H})).add(X||[],"context");if(!O||!E&&!Q){R.add(Y,"user");let{tripwire:C}=await this.capabilities.__runInputProcessors({requestContext:H,...B,messageList:R,inputProcessorOverrides:F});if(!C){let k=await this.capabilities.__runProcessInputStep({requestContext:H,...B,messageList:R,stepNumber:0,inputProcessorOverrides:F,tools:M,runId:W,threadId:E,resourceId:Q});if(k.tools)M=k.tools;if(k.tripwire)return{messageObjects:[],convertedTools:M,threadExists:!1,thread:void 0,messageList:R,agentSpan:L,tripwire:k.tripwire}}return{messageObjects:C?[]:R.get.all.prompt(),convertedTools:M,threadExists:!1,thread:void 0,messageList:R,agentSpan:L,tripwire:C}}if(!E||!Q){let C=new G0({id:"AGENT_MEMORY_MISSING_RESOURCE_ID",domain:"AGENT",category:"USER",details:{agentName:this.capabilities.name,threadId:E||"",resourceId:Q||""},text:`A resourceId and a threadId must be provided when using Memory. Saw threadId "${E}" and resourceId "${Q}"`});throw this.capabilities.logger.trackException(C),L?.error({error:C}),C}let q=void 0,w=await O.getThreadById({threadId:E});if(w)if(!w.metadata&&G.metadata||G.metadata&&!(0,p99.default)(w.metadata,G.metadata))q=await O.saveThread({thread:{...w,metadata:G.metadata},memoryConfig:J});else q=w;else q=await O.createThread({threadId:E,metadata:G.metadata,title:G.title,memoryConfig:J,resourceId:Q,saveThread:!0});H.set("MastraMemory",{thread:q,resourceId:Q,memoryConfig:J}),R.add(Y,"user");let{messageList:I,tripwire:P}=await this.capabilities.__runInputProcessors({requestContext:H,...B,messageList:R,inputProcessorOverrides:F});if(R=I,!P){let C=await this.capabilities.__runProcessInputStep({requestContext:H,...B,messageList:R,stepNumber:0,inputProcessorOverrides:F,tools:M,runId:W,threadId:E,resourceId:Q});if(C.tools)M=C.tools;if(C.tripwire)return{convertedTools:M,thread:q,messageList:R,messageObjects:[],agentSpan:L,tripwire:C.tripwire,threadExists:!!w}}let _=R.get.all.prompt();return{convertedTools:M,thread:q,messageList:R,messageObjects:_,agentSpan:L,tripwire:P,threadExists:!!w}},after:async({result:L,thread:B,threadId:O,memoryConfig:E,outputText:M,runId:R,messageList:q,threadExists:w,structuredOutput:I=!1,overrideScorers:P,agentSpan:_})=>{let C={text:L?.text,object:L?.object,toolResults:L?.toolResults,toolCalls:L?.toolCalls,usage:L?.usage,steps:L?.steps?.map((y)=>{return{stepType:y?.stepType,text:L?.text,object:L?.object,toolResults:L?.toolResults,toolCalls:L?.toolCalls,usage:L?.usage}})};this.capabilities.logger.debug("Post processing LLM response",{agentName:this.capabilities.name,runId:R,result:C,threadId:O});let S=new l6({threadId:O,resourceId:Q,generateMessageId:this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),_agentNetworkAppend:this.capabilities._agentNetworkAppend}).add(L.response.messages,"response").get.all.core()?.some((y)=>y.role==="tool"&&y?.content?.some((d)=>d?.toolName==="updateWorkingMemory")),T=await this.capabilities.getMemory({requestContext:H}),v=S?O?await T?.getThreadById({threadId:O}):void 0:B;if(T&&Q&&v)try{let y=L.response.messages;if(!y&&L.object)y=[{role:"assistant",content:[{type:"text",text:M}]}];if(y)q.add(y,"response");if(!w)await T.createThread({threadId:v.id,metadata:v.metadata,title:v.title,memoryConfig:E,resourceId:v.resourceId});let d=[],u=T.getMergedThreadConfig(E),{shouldGenerate:b,model:g,instructions:p,minMessages:h}=this.capabilities.resolveTitleGenerationConfig(u?.generateTitle),n=q.get.all.ui(),t=q.get.all.core(),s=h??1;if(b&&!v.title&&t.length>=s){let Z0=this.capabilities.getMostRecentUserMessage(n);if(Z0){let X0=g4({currentSpan:_});d.push(this.capabilities.genTitle(Z0,H,X0,g,p).then((a)=>{if(a)return T.createThread({threadId:v.id,resourceId:Q,memoryConfig:E,title:a,metadata:v.metadata})}))}}if(d.length>0)await Promise.all(d)}catch(y){if(y instanceof G0)throw _?.error({error:y}),y;let d=new G0({id:"AGENT_MEMORY_PERSIST_RESPONSE_MESSAGES_FAILED",domain:"AGENT",category:"SYSTEM",details:{agentName:this.capabilities.name,runId:R||"",threadId:O||"",result:JSON.stringify(C)}},y);throw this.capabilities.logger.trackException(d),_?.error({error:d}),d}else{let y=L.response.messages;if(!y&&L.object)y=[{role:"assistant",content:[{type:"text",text:M}]}];if(y)q.add(y,"response")}await this.capabilities.runScorers({messageList:q,runId:R,requestContext:H,structuredOutput:I,overrideScorers:P,threadId:O,resourceId:Q,...g4({currentSpan:_})});let x={input:{inputMessages:q.getPersisted.input.ui(),rememberedMessages:q.getPersisted.remembered.ui(),systemMessages:q.getSystemMessages(),taggedSystemMessages:q.getPersisted.taggedSystemMessages},output:q.getPersisted.response.ui()};return _?.end({output:{text:L?.text,object:L?.object,files:L?.files}}),{scoringData:x}}}}async prepareLLMOptions($,Y,X){let{context:G,memoryOptions:J,resourceId:Q,maxSteps:W,onStepFinish:Z,toolsets:K,clientTools:H,temperature:z,toolChoice:V="auto",requestContext:A=new p1,tracingOptions:F,savePerStep:N,writableStream:D,inputProcessors:L,...B}=Y,O=A.get(eX),E=A.get(DX),M=Lg0({threadId:B.threadId,memory:B.memory,overrideId:E}),R=O||B.memory?.resource||Q,q=B.memory?.options||J;if(R&&M&&!this.capabilities.hasOwnMemory())this.capabilities.logger.warn("No memory configured but resourceId and threadId were passed in args",{agent:this.capabilities.name});let w=B.runId||this.capabilities.mastra?.generateId({idType:"run",source:"agent",entityId:this.capabilities.id,threadId:M?.id,resourceId:R})||M6(),I=B.instructions||await this.capabilities.getInstructions({requestContext:A}),P=await this.capabilities.getLLM({requestContext:A,model:B.model}),_=await this.capabilities.getMemory({requestContext:A}),{before:C,after:k}=this.__primitive({messages:$,instructions:I,context:G,thread:M,memoryConfig:q,resourceId:R,runId:w,toolsets:K,clientTools:H,requestContext:A,writableStream:D,methodType:X,tracingOptions:F,inputProcessors:L,...$4(B)}),S,T,v,x=!1;return{llm:P,before:async()=>{let y=await C(),{messageObjects:d,convertedTools:u,agentSpan:b}=y;v=y.threadExists||!1,x=!1,S=y.messageList,T=y.thread;let g=T?.id;return{...{...Y,messages:d,tools:u,runId:w,temperature:z,toolChoice:V,threadId:g,resourceId:R,requestContext:A,onStepFinish:async(h)=>{if(N){if(!v&&!x&&_&&T)await _.createThread({threadId:g,title:T.title,metadata:T.metadata,resourceId:T.resourceId,memoryConfig:q}),x=!0}return Z?.({...h,runId:w})},tripwire:y.tripwire,...B,agentSpan:b},messageList:S,requestContext:A}},after:async({result:y,outputText:d,structuredOutput:u=!1,agentSpan:b,overrideScorers:g})=>{return await k({result:y,outputText:d,threadId:T?.id,thread:T,memoryConfig:q,runId:w,messageList:S,structuredOutput:u,threadExists:v,agentSpan:b,overrideScorers:g})}}}async generateLegacy($,Y={}){if("structuredOutput"in Y&&Y.structuredOutput)throw new G0({id:"AGENT_GENERATE_LEGACY_STRUCTURED_OUTPUT_NOT_SUPPORTED",domain:"AGENT",category:"USER",text:"This method does not support structured output. Please use generate() instead."});let X=await Promise.resolve(this.capabilities.getDefaultGenerateOptionsLegacy({requestContext:Y.requestContext})),G={...X,...Y,experimental_generateMessageId:X.experimental_generateMessageId||this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra)},{llm:J,before:Q,after:W}=await this.prepareLLMOptions($,G,"generate");if(J.getModel().specificationVersion!=="v1"){let P=J.getModel().specificationVersion;throw this.capabilities.logger.error(`Models with specificationVersion "${P}" are not supported for generateLegacy. Please use generate() instead.`,{modelId:J.getModel().modelId,specificationVersion:P}),new G0({id:"AGENT_GENERATE_V2_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",details:{modelId:J.getModel().modelId,specificationVersion:P},text:`Models with specificationVersion "${P}" are not supported for generateLegacy(). Please use generate() instead.`})}let Z=J,K=await Q(),{messageList:H,requestContext:z}=K,V=K.agentSpan?.externalTraceId,A=K.agentSpan?.id;if(K.tripwire)return K.agentSpan?.end({output:{tripwire:K.tripwire},attributes:{tripwireAbort:{reason:K.tripwire.reason,processorId:K.tripwire.processorId,retry:K.tripwire.retry,metadata:K.tripwire.metadata}}}),{text:"",object:void 0,usage:{totalTokens:0,promptTokens:0,completionTokens:0},finishReason:"other",response:{id:M6(),timestamp:new Date,modelId:"tripwire",messages:[]},responseMessages:[],toolCalls:[],toolResults:[],warnings:void 0,request:{body:JSON.stringify({messages:[]})},experimental_output:void 0,steps:void 0,experimental_providerMetadata:void 0,tripwire:K.tripwire,traceId:V,spanId:A};let{experimental_output:F,output:N,agentSpan:D,...L}=K,B=g4({currentSpan:D}),O=G.outputProcessors;if(!N||F){let P=await Z.__text({...L,...B,experimental_output:F});H.add({role:"assistant",content:[{type:"text",text:P.text}]},"response");let _=await this.capabilities.__runOutputProcessors({requestContext:z||new p1,...B,outputProcessorOverrides:O,messageList:H});if(_.tripwire)return D?.end({output:{tripwire:_.tripwire},attributes:{tripwireAbort:{reason:_.tripwire.reason,processorId:_.tripwire.processorId,retry:_.tripwire.retry,metadata:_.tripwire.metadata}}}),{text:"",object:void 0,usage:{totalTokens:0,promptTokens:0,completionTokens:0},finishReason:"other",response:{id:M6(),timestamp:new Date,modelId:"tripwire",messages:[]},responseMessages:[],toolCalls:[],toolResults:[],warnings:void 0,request:{body:JSON.stringify({messages:[]})},experimental_output:void 0,steps:void 0,experimental_providerMetadata:void 0,tripwire:_.tripwire,traceId:V,spanId:A};let C=_.messageList.get.response.db().map((T)=>T.content.parts.map((v)=>v.type==="text"?v.text:"").join("")).join("");if(P.text=C,O&&O.length>0){let T=_.messageList.get.response.db();this.capabilities.logger.debug("Checking messages for experimentalOutput metadata:",T.map((x)=>({role:x.role,hasContentMetadata:!!x.content.metadata,contentMetadata:x.content.metadata})));let v=T.filter((x)=>x.content.metadata&&x.content.metadata.structuredOutput);if(this.capabilities.logger.debug("Messages with structured data:",v.length),v[0]&&v[0].content.metadata?.structuredOutput)P.object=v[0].content.metadata.structuredOutput,this.capabilities.logger.debug("Using structured data from processor metadata for result.object");else try{let x=JSON.parse(C);P.object=x,this.capabilities.logger.debug("Using fallback JSON parsing for result.object")}catch(x){this.capabilities.logger.warn("Failed to parse processed output as JSON, updating text only",{error:x})}}let k=G.scorers,S=await W({result:P,outputText:C,agentSpan:D,...k?{overrideScorers:k}:{}});if(Y.returnScorerData)P.scoringData=S.scoringData;return P.traceId=V,P.spanId=A,P}let E=await Z.__textObject({...L,...B,structuredOutput:N}),M=JSON.stringify(E.object);H.add({role:"assistant",content:[{type:"text",text:M}]},"response");let R=await this.capabilities.__runOutputProcessors({requestContext:z||new p1,...B,messageList:H});if(R.tripwire)return D?.end({output:{tripwire:R.tripwire},attributes:{tripwireAbort:{reason:R.tripwire.reason,processorId:R.tripwire.processorId,retry:R.tripwire.retry,metadata:R.tripwire.metadata}}}),{text:"",object:void 0,usage:{totalTokens:0,promptTokens:0,completionTokens:0},finishReason:"other",response:{id:M6(),timestamp:new Date,modelId:"tripwire",messages:[]},responseMessages:[],toolCalls:[],toolResults:[],warnings:void 0,request:{body:JSON.stringify({messages:[]})},experimental_output:void 0,steps:void 0,experimental_providerMetadata:void 0,tripwire:R.tripwire,traceId:V,spanId:A};let q=R.messageList.get.response.db().map((P)=>P.content.parts.map((_)=>_.type==="text"?_.text:"").join("")).join("");try{let P=JSON.parse(q);E.object=P}catch(P){this.capabilities.logger.warn("Failed to parse processed output as JSON, keeping original object",{error:P})}let w=G.scorers,I=await W({result:E,outputText:q,structuredOutput:!0,agentSpan:D,...w?{overrideScorers:w}:{}});if(Y.returnScorerData)E.scoringData=I.scoringData;return E.traceId=V,E.spanId=A,E}async streamLegacy($,Y={}){let X=await Promise.resolve(this.capabilities.getDefaultStreamOptionsLegacy({requestContext:Y.requestContext})),G={...X,...Y,experimental_generateMessageId:X.experimental_generateMessageId||this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra)},{llm:J,before:Q,after:W}=await this.prepareLLMOptions($,G,"stream");if(J.getModel().specificationVersion!=="v1"){let R=J.getModel().specificationVersion;throw this.capabilities.logger.error(`Models with specificationVersion "${R}" are not supported for streamLegacy. Please use stream() instead.`,{modelId:J.getModel().modelId,specificationVersion:R}),new G0({id:"AGENT_STREAM_V2_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",details:{modelId:J.getModel().modelId,specificationVersion:R},text:`Models with specificationVersion "${R}" are not supported for streamLegacy(). Please use stream() instead.`})}let Z=await Q(),K=Z.agentSpan?.externalTraceId,H=Z.agentSpan?.id;if(Z.tripwire)return Z.agentSpan?.end({output:{tripwire:Z.tripwire},attributes:{tripwireAbort:{reason:Z.tripwire.reason,processorId:Z.tripwire.processorId,retry:Z.tripwire.retry,metadata:Z.tripwire.metadata}}}),{textStream:async function*(){}(),fullStream:Promise.resolve("").then(()=>{return new globalThis.ReadableStream({start(w){w.close()}})}),text:Promise.resolve(""),usage:Promise.resolve({totalTokens:0,promptTokens:0,completionTokens:0}),finishReason:Promise.resolve("other"),tripwire:Z.tripwire,response:{id:M6(),timestamp:new Date,modelId:"tripwire",messages:[]},toolCalls:Promise.resolve([]),toolResults:Promise.resolve([]),warnings:Promise.resolve(void 0),request:{body:JSON.stringify({messages:[]})},experimental_output:void 0,steps:void 0,experimental_providerMetadata:void 0,traceId:K,spanId:H,toAIStream:()=>Promise.resolve("").then(()=>{return new globalThis.ReadableStream({start(w){w.close()}})}),get experimental_partialOutputStream(){return async function*(){}()},pipeDataStreamToResponse:()=>Promise.resolve(),pipeTextStreamToResponse:()=>Promise.resolve(),toDataStreamResponse:()=>new Response("",{status:200,headers:{"Content-Type":"text/plain"}}),toTextStreamResponse:()=>new Response("",{status:200,headers:{"Content-Type":"text/plain"}})};let{onFinish:z,runId:V,output:A,experimental_output:F,agentSpan:N,messageList:D,requestContext:L,...B}=Z,O=G.scorers,E=g4({currentSpan:N});if(!A||F){let R=J.__stream({...B,experimental_output:F,...E,requestContext:L,outputProcessors:await this.capabilities.listResolvedOutputProcessors(L),onFinish:async(q)=>{try{D.add(q.response.messages,"response");let w=await this.capabilities.__runOutputProcessors({requestContext:L,...E,messageList:D});if(w.tripwire){N?.end({output:{tripwire:w.tripwire},attributes:{tripwireAbort:{reason:w.tripwire.reason,processorId:w.tripwire.processorId,retry:w.tripwire.retry,metadata:w.tripwire.metadata}}}),await z?.({...q,runId:V});return}let I=q.text;await W({result:q,outputText:I,agentSpan:N,...O?{overrideScorers:O}:{}})}catch(w){this.capabilities.logger.error("Error saving memory on finish",{error:w,runId:V})}await z?.({...q,runId:V})},runId:V});return R.traceId=K,R.spanId=H,R}this.capabilities.logger.debug("Starting LLM streamObject call",{agent:this.capabilities.name,runId:V});let M=J.__streamObject({...B,...E,requestContext:L,onFinish:async(R)=>{try{if(R.object){let I=[{role:"assistant",content:[{type:"text",text:JSON.stringify(R.object)}]}];D.add(I,"response")}let q=await this.capabilities.__runOutputProcessors({requestContext:L,...E,messageList:D});if(q.tripwire){N?.end({output:{tripwire:q.tripwire},attributes:{tripwireAbort:{reason:q.tripwire.reason,processorId:q.tripwire.processorId,retry:q.tripwire.retry,metadata:q.tripwire.metadata}}}),await z?.({...R,runId:V});return}let w=JSON.stringify(R.object);await W({result:R,outputText:w,structuredOutput:!0,agentSpan:N,...O?{overrideScorers:O}:{}})}catch(q){this.capabilities.logger.error("Error saving memory on finish",{error:q,runId:V})}await z?.({...R,runId:V})},runId:V,structuredOutput:A});return M.traceId=K,M.spanId=H,M}},c99=class ${logger;debounceMs;memory;static MAX_STALENESS_MS=1000;constructor({logger:Y,debounceMs:X,memory:G}){this.logger=Y,this.debounceMs=X||100,this.memory=G}saveQueues=new Map;saveDebounceTimers=new Map;debounceSave(Y,X,G){return new Promise((J,Q)=>{if(this.saveDebounceTimers.has(Y))clearTimeout(this.saveDebounceTimers.get(Y));this.saveDebounceTimers.set(Y,setTimeout(()=>{this.enqueueSave(Y,X,G).then(J).catch((W)=>{this.logger?.error?.("Error in debounceSave",{err:W,threadId:Y}),Q(W)}).finally(()=>{this.saveDebounceTimers.delete(Y)})},this.debounceMs))})}enqueueSave(Y,X,G){let Q=(this.saveQueues.get(Y)||Promise.resolve()).then(()=>this.persistUnsavedMessages(X,G)).catch((W)=>{this.logger?.error?.("Error in enqueueSave",{err:W,threadId:Y})}).then(()=>{if(this.saveQueues.get(Y)===Q)this.saveQueues.delete(Y)});return this.saveQueues.set(Y,Q),Q}clearDebounce(Y){if(this.saveDebounceTimers.has(Y))clearTimeout(this.saveDebounceTimers.get(Y)),this.saveDebounceTimers.delete(Y)}async persistUnsavedMessages(Y,X){let G=Y.drainUnsavedMessages();if(G.length>0&&this.memory)await this.memory.saveMessages({messages:G,memoryConfig:X})}async batchMessages(Y,X,G){if(!X)return;let J=Y.getEarliestUnsavedMessageTimestamp(),Q=Date.now();if(J&&Q-J>$.MAX_STALENESS_MS)return this.flushMessages(Y,X,G);else return this.debounceSave(X,Y,G)}async flushMessages(Y,X,G){if(!X)return;return this.clearDebounce(X),this.enqueueSave(X,Y,G)}},K24,t99="\x00",e99=class{#$=new Map;#Y=new Map;#X=new Map;#J=new Map;#G=new Map;#Q=new Map;#U=new Set;#K=new Map;#W=new Set;#H($,Y){return[$??"",Y].join(t99)}#A($){let Y=$?.memory?.thread,X=$?.requestContext?.get(DX)||(typeof Y==="string"?Y:Y?.id),G=$?.requestContext?.get(eX)||$?.memory?.resource;return{threadId:X,resourceId:G}}prepareRunOptions($){let{threadId:Y}=this.#A($);if(!Y||!$.runId)return $;let X=new AbortController,G=$.abortSignal,J=()=>X.abort();if(G?.aborted)J();else G?.addEventListener("abort",J,{once:!0});if(this.#K.set($.runId,{abortController:X,cleanup:()=>G?.removeEventListener("abort",J)}),this.#W.has($.runId))J();return{...$,abortSignal:X.signal}}abortRun($){let Y=this.#K.get($);if(!Y)return this.#W.add($),!1;return Y.abortController.abort(),this.#W.add($),!0}abortThread($){let Y=this.#H($.resourceId,$.threadId),X=this.#X.get(Y);if(!X)return!1;return this.abortRun(X)}resetForTests(){this.#K.forEach(($)=>{$.abortController.abort(),$.cleanup()}),this.#$.clear(),this.#Y.clear(),this.#X.clear(),this.#J.clear(),this.#G.clear(),this.#Q.clear(),this.#U.clear(),this.#K.clear(),this.#W.clear()}#V($){this.#K.get($)?.cleanup(),this.#K.delete($),this.#W.delete($)}#Z($){let Y=this.#H($.resourceId,$.threadId);this.#J.get(Y)?.forEach((X)=>X($))}async#L($,Y,X,G,J){let Q=await $.getMemory({requestContext:J});if(!Q)return;await Q.saveMessages({messages:[Y.toDBMessage({resourceId:X,threadId:G})]})}registerRun($,Y,X){let{threadId:G,resourceId:J}=this.#A(X);if(!G)return;let Q=this.#H(J,G),W={agent:$,output:Y,runId:Y.runId,threadId:G,resourceId:J,streamOptions:X};this.#$.set(Y.runId,W),this.#Y.set(Y.runId,Q),this.#X.set(Q,Y.runId),this.#Z(W),this.#O(Q,W)}#O($,Y){if(this.#U.has(Y.runId))return;this.#U.add(Y.runId),Y.output._waitUntilFinished().finally(()=>{if(this.#U.delete(Y.runId),this.#$.delete(Y.runId),this.#Y.delete(Y.runId),this.#V(Y.runId),this.#X.get($)===Y.runId)this.#X.delete($);this.#N($,Y)})}async#N($,Y){if(this.#X.has($))return;let X=this.#G.get($),G=X?.shift();if(G&&X){if(X.length===0)this.#G.delete($);let W=await Y.agent.stream(G,{...Y.streamOptions,runId:M6(),memory:Xg0(Y.streamOptions.memory,Y.resourceId??"",Y.threadId??"")});if(X.length>0){let Z=this.#$.get(W.runId);if(Z)this.#O($,Z)}return}let J=this.#Q.get($),Q=J?.shift();if(!Q||!J)return;if(J.length===0)this.#Q.delete($);this.#X.set($,Q.runId),this.#Y.set(Q.runId,$);try{let W=await Q.agent.stream(Q.signal,{...Q.streamOptions,runId:Q.runId,memory:Xg0(Q.streamOptions?.memory,Q.resourceId,Q.threadId)});if((J?.length??0)>0){let Z=this.#$.get(W.runId);if(Z)this.#O($,Z)}}catch{if(this.#Y.delete(Q.runId),this.#V(Q.runId),this.#X.get($)===Q.runId)this.#X.delete($)}}drainPendingSignals($){let Y=this.#$.get($),X=Y?this.#H(Y.resourceId,Y.threadId):this.#Y.get($);if(!X)return[];let G=this.#G.get(X);if(!G||G.length===0)return[];return this.#G.delete(X),G}async waitForCrossAgentThreadRun($,Y){let{threadId:X,resourceId:G}=this.#A(Y);if(!X)return;let J=this.#H(G,X);while(!0){let Q=this.#X.get(J),W=Q?this.#$.get(Q):void 0;if(!W||W.agent.id===$.id||W.output.status!=="running")return;await W.output._waitUntilFinished().catch(()=>{})}}async subscribeToThread($,Y){let X=this.#H(Y.resourceId,Y.threadId),G=new Set,J=[],Q=[],W=!1,Z=()=>{while(Q.length)Q.shift()?.()},K=()=>{let N=this.#X.get(X);if(!N)return null;let D=this.#$.get(N);if(!D)return null;return D.output.status==="running"?N:null},H=(N)=>{if(W||G.has(N.runId))return;G.add(N.runId),J.push(N),Z()},z=this.#J.get(X)??new Set;z.add(H),this.#J.set(X,z);let V=K(),A=V?this.#$.get(V):void 0;if(A)H(A);let F=()=>{if(W)return;if(W=!0,z.delete(H),z.size===0)this.#J.delete(X);Z()};return{activeRunId:K,abort:()=>this.abortThread(Y),unsubscribe:F,stream:async function*(){try{while(!W||J.length>0){if(J.length===0){await new Promise((D)=>Q.push(D));continue}let N=J.shift();for await(let D of N.output.fullStream)if(yield D,W)break}}finally{F()}}()}}sendSignal($,Y,X){let G=K_({...Y,acceptedAt:new Date}),J,Q=X.runId,W=X.ifActive?.behavior??"deliver",Z=X.ifIdle?.behavior??"wake",K;if(X.resourceId&&X.threadId){J=this.#H(X.resourceId,X.threadId);let A=this.#X.get(J);if(K=A?this.#$.get(A):void 0,K&&K.output.status!=="running")this.#X.delete(J),K=void 0;if(K&&K.agent.id===$.id)Q=K.runId;else if(A&&!K)Q=A}let H=Boolean(Q&&(K?.output.status==="running"||J&&this.#X.get(J)===Q)),z=X.resourceId??K?.resourceId,V=X.threadId??K?.threadId;if(H&&W!=="deliver"){if(W==="persist"){if(!z||!V)throw Error("resourceId and threadId are required to persist an active signal");let A=this.#L($,G,z,V,X.ifIdle?.streamOptions?.requestContext);return A.catch(()=>{}),{accepted:!0,runId:Q,signal:G,persisted:A}}return{accepted:!0,runId:Q,signal:G}}if(Q){if(K??=this.#$.get(Q),K?.output.status==="running"){if(J??=this.#H(K.resourceId,K.threadId),K.agent.id===$.id){let A=this.#G.get(J)??[];return A.push(G),this.#G.set(J,A),this.#O(J,K),{accepted:!0,runId:Q,signal:G}}}if(J&&this.#X.get(J)===Q){let A=this.#G.get(J)??[];return A.push(G),this.#G.set(J,A),{accepted:!0,runId:Q,signal:G}}}if(!z||!V)throw Error("No active agent run found for signal target");if(Q=M6(),Z!=="wake"){if(Z==="persist"){let A=this.#L($,G,z,V,X.ifIdle?.streamOptions?.requestContext);return A.catch(()=>{}),{accepted:!0,runId:Q,signal:G,persisted:A}}return{accepted:!0,runId:Q,signal:G}}if(J??=this.#H(z,V),this.#X.has(J)){let A=this.#Q.get(J)??[];if(A.push({agent:$,signal:G,runId:Q,resourceId:z,threadId:V,streamOptions:X.ifIdle?.streamOptions}),this.#Q.set(J,A),K)this.#O(J,K);return{accepted:!0,runId:Q,signal:G}}return this.#X.set(J,Q),this.#Y.set(Q,J),$.stream(G,{...X.ifIdle?.streamOptions,runId:Q,memory:Xg0(X.ifIdle?.streamOptions?.memory,z,V)}).catch(()=>{if(this.#Y.delete(Q),this.#V(Q),this.#X.get(J)===Q)this.#X.delete(J)}),{accepted:!0,runId:Q,signal:G}}},$59,X59,G59,J59,Q59,YJ,dj,u6,V59=async({tripwire:$,runId:Y,options:X,model:G,messageList:J,...Q})=>{let W=$4(Q),Z=new $2({start(H){H.enqueue({type:"tripwire",runId:Y,from:"AGENT",payload:{reason:$.reason||"",retry:$.retry,metadata:$.metadata,processorId:$.processorId}}),H.close()}});return new dj({model:{modelId:G.modelId,provider:G.provider,version:G.specificationVersion},stream:Z,messageList:J,options:{runId:Y,structuredOutput:X.structuredOutput,...W,onFinish:X.onFinish,onStepFinish:X.onStepFinish,returnScorerData:X.returnScorerData,requestContext:X.requestContext},messageId:M6()})},A24,A59=class{id="trailing-assistant-guard";name="Trailing Assistant Guard";processInputStep({messages:$,structuredOutput:Y}){if(!(Y?.schema&&!Y?.model&&!Y?.jsonPromptInjection))return;let G=$[$.length-1];if(!G||G.role!=="assistant")return;return{messages:[...$,{id:M6(),role:"user",content:{format:2,parts:[{type:"text",text:"Generate the structured response."}]},createdAt:new Date}]}}},ZD=class{inputAccumulatedText="";outputAccumulatedText="";outputChunkCount=0;customState={};streamParts=[];span;constructor($){if(!$?.createSpan||!$.processorName)return;let Y=$.tracingContext?.currentSpan,X=Y?.findParent("agent_run")||Y?.parent||Y;this.span=X?.createChildSpan({type:"processor_run",name:`output stream processor: ${$.processorName}`,entityType:J6.OUTPUT_PROCESSOR,entityName:$.processorName,attributes:{processorExecutor:"legacy",processorIndex:$.processorIndex??0},input:{totalChunks:0}})}addInputPart($){if($.type==="text-delta")this.inputAccumulatedText+=$.payload.text;if(this.streamParts.push($),this.span)this.span.input={totalChunks:this.streamParts.length,accumulatedText:this.inputAccumulatedText}}addOutputPart($){if(!$)return;if(this.outputChunkCount++,$.type==="text-delta")this.outputAccumulatedText+=$.payload.text}getFinalOutput(){return{totalChunks:this.outputChunkCount,accumulatedText:this.outputAccumulatedText}}},A5=class ${inputProcessors;outputProcessors;errorProcessors;logger;agentName;processorStates;constructor({inputProcessors:Y,outputProcessors:X,errorProcessors:G,logger:J,agentName:Q,processorStates:W}){this.inputProcessors=Y??[],this.outputProcessors=X??[],this.errorProcessors=G??[],this.logger=J,this.agentName=Q,this.processorStates=W??new Map}getProcessorState(Y){let X=this.processorStates.get(Y);if(!X)X=new ZD,this.processorStates.set(Y,X);return X}async executeWorkflowAsProcessor(Y,X,G,J,Q,W){let K=await(await Y.createRun()).start({inputData:{...X,processorStates:this.processorStates,abortSignal:W},...G,requestContext:J,outputWriter:Q?(z)=>Q.custom(z):void 0});if(K.status==="tripwire"){let z=K.tripwire;throw new u6(z?.reason||`Tripwire triggered in workflow ${Y.id}`,{retry:z?.retry,metadata:z?.metadata},z?.processorId||Y.id)}if(K.status!=="success"){let z=[];if(K.status==="failed"){if(K.error)z.push(K.error.message||JSON.stringify(K.error));for(let[A,F]of Object.entries(K.steps))if(F.status==="failed"&&F.error?.message)z.push(`step ${A}: ${F.error.message}`)}let V=z.length>0?` \u2014 ${z.join("; ")}`:"";throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_WORKFLOW_FAILED",text:`Processor workflow ${Y.id} failed with status: ${K.status}${V}`})}let H=K.result;if(!H||typeof H!=="object")return X;if(!("phase"in H)||!(("messages"in H)||("part"in H)||("messageList"in H)))throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_WORKFLOW_INVALID_OUTPUT",text:`Processor workflow ${Y.id} returned invalid output format. Expected ProcessorStepOutput.`});return H}async runOutputProcessors(Y,X,G,J=0,Q,W){for(let[Z,K]of this.outputProcessors.entries()){let z=[...Y.get.response.db()],V=z.map((w)=>w.id),A=Y.makeMessageSourceChecker();if(V9(K)){await this.executeWorkflowAsProcessor(K,{phase:"outputResult",messages:z,messageList:Y,retryCount:J,result:W},X,G,Q);continue}let F=K,N=(w,I)=>{throw new u6(w||`Tripwire triggered by ${F.id}`,I,F.id)},D=F.processOutputResult?.bind(F);if(!D)continue;let L=z,B=Y.getAllSystemMessages(),O={text:"",usage:{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:"unknown",steps:[]},E=W?J80(W):void 0,M=X?.tracingContext?.currentSpan,q=(M?.findParent("agent_run")||M?.parent||M)?.createChildSpan({type:"processor_run",name:`output processor: ${F.id}`,entityType:J6.OUTPUT_PROCESSOR,entityId:F.id,entityName:F.name,attributes:{processorExecutor:"legacy",processorIndex:Z},input:{messages:z,...E?{result:E}:{},retryCount:J}});Y.startRecording();try{let w=this.getProcessorState(F.id),I=await D({messages:z,messageList:Y,state:w.customState,result:W??O,abort:N,...g4({currentSpan:q}),requestContext:G,retryCount:J,writer:Q,sendSignal:om({messageList:Y,writer:Q})}),P=Y.stopRecording();if(I instanceof l6){if(I!==Y)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${F.id} returned a MessageList instance other than the one that was passed in as an argument. New external message list instances are not supported. Use the messageList argument instead.`});if(P.length>0)z=I.get.response.db()}else if(I){let _=V.filter((C)=>!I.some((k)=>k.id===C));if(_.length)Y.removeByIds(_);z=I||[];for(let C of I)Y.removeByIds([C.id]),Y.add(C,A.getSource(C)||"response")}q?.end({output:{...!nU(L,z)?{messages:z}:{},...!nU(B,Y.getAllSystemMessages())?{systemMessages:Y.getAllSystemMessages()}:{}},attributes:P.length>0?{messageListMutations:P}:void 0})}catch(w){if(Y.stopRecording(),w instanceof u6)throw q?.error({error:w,endSpan:!0,attributes:{tripwireAbort:{reason:w.message,retry:w.options?.retry,metadata:w.options?.metadata}}}),await kD(F,w),w;throw q?.error({error:w,endSpan:!0}),w}}return Y}async processPart(Y,X,G,J,Q,W=0,Z){if(!this.outputProcessors.length)return{part:Y,blocked:!1};try{let K=Y,H=Y.type==="finish";for(let[z,V]of this.outputProcessors.entries()){if(V9(V)){if(!K)continue;let F=V.id,N=X.get(F);if(!N)N=new ZD,X.set(F,N);N.addInputPart(K);try{let D=await this.executeWorkflowAsProcessor(V,{phase:"outputStream",part:K,streamParts:N.streamParts,state:N.customState,messageList:Q,retryCount:W},G,J,Z);if("part"in D)K=D.part;N.addOutputPart(K)}catch(D){if(D instanceof u6)return{part:null,blocked:!0,reason:D.message,tripwireOptions:D.options,processorId:D.processorId||F};this.logger.error("Output processor workflow failed",{agent:this.agentName,workflowId:F,error:D})}continue}let A=V;try{if(A.processOutputStream&&K){let F=X.get(A.id);if(!F)F=new ZD({processorName:A.name??A.id,...G,processorIndex:z,createSpan:!0}),X.set(A.id,F);F.addInputPart(K),K=await A.processOutputStream({part:K,streamParts:F.streamParts,state:F.customState,abort:(D,L)=>{throw new u6(D||`Stream part blocked by ${A.id}`,L,A.id)},...g4({currentSpan:F.span}),requestContext:J,messageList:Q,retryCount:W,writer:Z}),F.addOutputPart(K)}}catch(F){if(F instanceof u6)return X.get(A.id)?.span?.error({error:F,endSpan:!0,attributes:{tripwireAbort:{reason:F.message,retry:F.options?.retry,metadata:F.options?.metadata}}}),await kD(A,F),{part:null,blocked:!0,reason:F.message,tripwireOptions:F.options,processorId:A.id};X.get(A.id)?.span?.error({error:F,endSpan:!0}),this.logger.error("Output processor failed",{agent:this.agentName,processorId:A.id,error:F})}}if(H){for(let z of X.values())if(z.span)z.span.end({output:z.getFinalOutput()})}return{part:K,blocked:!1}}catch(K){this.logger.error("Stream part processing failed",{agent:this.agentName,error:K});for(let H of X.values())H.span?.error({error:K,endSpan:!0});return{part:Y,blocked:!1}}}async runOutputProcessorsForStream(Y,X,G){return new ReadableStream({start:async(J)=>{let Q=Y.fullStream.getReader(),W=new Map,Z=G??{custom:async(K)=>J.enqueue(K)};try{while(!0){let{done:K,value:H}=await Q.read();if(K){J.close();break}let{part:z,blocked:V,reason:A,tripwireOptions:F,processorId:N}=await this.processPart(H,W,X,void 0,void 0,0,Z);if(V){this.logger.debug("Stream part blocked by output processor",{agent:this.agentName,reason:A,originalPart:H}),J.enqueue({type:"tripwire",payload:{reason:A||"Output processor blocked content",retry:F?.retry,metadata:F?.metadata,processorId:N}}),J.close();break}else if(z!=null)J.enqueue(z)}}catch(K){J.error(K)}}})}async runInputProcessors(Y,X,G,J=0){for(let[Q,W]of this.inputProcessors.entries()){let Z=Y.get.input.db(),K=Z.map((E)=>E.id),H=Y.makeMessageSourceChecker();if(V9(W)){let E=Y.getAllSystemMessages();await this.executeWorkflowAsProcessor(W,{phase:"input",messages:Z,messageList:Y,systemMessages:E,retryCount:J},X,G);continue}let z=W,V=(E,M)=>{throw new u6(E||`Tripwire triggered by ${z.id}`,M,z.id)},A=z.processInput?.bind(z);if(!A)continue;let F=Y.getAllSystemMessages(),N=Z,D=F,L=X?.tracingContext?.currentSpan,O=(L?.findParent("agent_run")||L?.parent||L)?.createChildSpan({type:"processor_run",name:`input processor: ${z.id}`,entityType:J6.INPUT_PROCESSOR,entityId:z.id,entityName:z.name,attributes:{processorExecutor:"legacy",processorIndex:Q},input:{messages:Z,systemMessages:F}});Y.startRecording();try{let E=this.getProcessorState(z.id),M=await A({messages:Z,systemMessages:F,state:E.customState,abort:V,...g4({currentSpan:O}),messageList:Y,requestContext:G,retryCount:J,sendSignal:om({messageList:Y})}),R;if(M instanceof l6){if(M!==Y)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${z.id} returned a MessageList instance other than the one that was passed in as an argument. New external message list instances are not supported. Use the messageList argument instead.`});if(R=Y.stopRecording(),R.length>0)Z=Y.get.input.db()}else if(this.isProcessInputResultWithSystemMessages(M)){R=Y.stopRecording(),Y.replaceAllSystemMessages(M.systemMessages);let q=M.messages;if(q){let w=K.filter((_)=>!q.some((C)=>C.id===_));if(w.length)Y.removeByIds(w);let I=q.filter((_)=>_.role==="system"),P=q.filter((_)=>_.role!=="system");for(let _ of I){let C=_.content.content??_.content.parts?.map((k)=>k.type==="text"?k.text:"").join(`
`)??"";Y.addSystem(C)}if(P.length>0)for(let _ of P)Y.removeByIds([_.id]),Y.add(_,H.getSource(_)||"input")}Z=Y.get.input.db()}else if(R=Y.stopRecording(),M){let q=K.filter((P)=>!M.some((_)=>_.id===P));if(q.length)Y.removeByIds(q);let w=M.filter((P)=>P.role==="system"),I=M.filter((P)=>P.role!=="system");for(let P of w){let _=P.content.content??P.content.parts?.map((C)=>C.type==="text"?C.text:"").join(`
`)??"";Y.addSystem(_)}if(I.length>0)for(let P of I)Y.removeByIds([P.id]),Y.add(P,H.getSource(P)||"input");Z=Y.get.input.db()}O?.end({output:{...!nU(N,Z)?{messages:Z}:{},...!nU(D,Y.getAllSystemMessages())?{systemMessages:Y.getAllSystemMessages()}:{}},attributes:R.length>0?{messageListMutations:R}:void 0})}catch(E){if(Y.stopRecording(),E instanceof u6)throw O?.error({error:E,endSpan:!0,attributes:{tripwireAbort:{reason:E.message,retry:E.options?.retry,metadata:E.options?.metadata}}}),await kD(z,E),E;throw O?.error({error:E,endSpan:!0}),E}}return Y}async runProcessInputStep(Y){let{messageList:X,stepNumber:G,steps:J,requestContext:Q,writer:W}=Y,Z=$4(Y),K={messageId:Y.messageId,tools:Y.tools,toolChoice:Y.toolChoice,model:Y.model,activeTools:Y.activeTools,providerOptions:Y.providerOptions,modelSettings:Y.modelSettings,structuredOutput:Y.structuredOutput,retryCount:Y.retryCount??0},H=K.model&&GK4(K.model)?[...this.inputProcessors,new A59]:this.inputProcessors;for(let[z,V]of H.entries()){let A=X.get.all.db(),F=A.map((q)=>q.id),N=X.makeMessageSourceChecker();if(V9(V)){let q=X.getAllSystemMessages(),w=await this.executeWorkflowAsProcessor(V,{phase:"inputStep",messages:A,messageList:X,stepNumber:G,steps:J,systemMessages:q,rotateResponseMessageId:Y.rotateResponseMessageId?()=>{let I=Y.rotateResponseMessageId();return K.messageId=I,I}:void 0,...K},Z,Q,W,Y.abortSignal);Object.assign(K,w);continue}let D=V,L=D.processInputStep?.bind(D);if(!L)continue;let B=(q,w)=>{throw new u6(q||`Tripwire triggered by ${D.id}`,w,D.id)},O=X.getAllSystemMessages(),E={messages:A,stepNumber:G,steps:J,messageId:K.messageId,systemMessages:O,tools:K.tools,toolChoice:K.toolChoice,model:K.model,activeTools:K.activeTools,providerOptions:K.providerOptions,modelSettings:K.modelSettings,structuredOutput:K.structuredOutput,requestContext:Q},R=Z.tracingContext?.currentSpan?.createChildSpan({type:"processor_run",name:`input step processor: ${D.id}`,entityType:J6.INPUT_STEP_PROCESSOR,entityId:D.id,entityName:D.name,attributes:{processorExecutor:"legacy",processorIndex:z},input:F59({messages:E.messages,systemMessages:E.systemMessages,stepNumber:E.stepNumber,messageId:E.messageId,retryCount:Y.retryCount??0,model:E.model,tools:E.tools,toolChoice:E.toolChoice,activeTools:E.activeTools})});X.startRecording();try{let q=this.getProcessorState(D.id),w={messageId:E.messageId,model:E.model,tools:E.tools,toolChoice:E.toolChoice,activeTools:E.activeTools},I=Y.rotateResponseMessageId?()=>{let v=Y.rotateResponseMessageId();return K.messageId=v,v}:void 0,P={messageList:X,...E,state:q.customState,abort:B,...I?{rotateResponseMessageId:I}:{},...g4({currentSpan:R}),retryCount:Y.retryCount??0,writer:W,abortSignal:Y.abortSignal,sendSignal:om({messageList:X,writer:W,rotateResponseMessageId:I})},_=await $.validateAndFormatProcessInputStepResult(await L(P),{messageList:X,processor:D,stepNumber:G}),{messages:C,systemMessages:k,...S}=_;if(C)$.applyMessagesToMessageList(C,X,F,N);if(k)X.replaceAllSystemMessages(k);Object.assign(K,S);let T=X.stopRecording();R?.end({output:D59({result:_,beforeStepInput:w,afterStepInput:K,beforeMessages:E.messages,beforeSystemMessages:E.systemMessages,messages:X.get.all.db(),systemMessages:X.getAllSystemMessages()}),attributes:T.length>0?{messageListMutations:T}:void 0})}catch(q){if(X.stopRecording(),q instanceof u6)throw R?.error({error:q,endSpan:!0,attributes:{tripwireAbort:{reason:q.message,retry:q.options?.retry,metadata:q.options?.metadata}}}),await kD(D,q),q;throw R?.error({error:q,endSpan:!0}),q}}return K}async runProcessLLMRequest(Y){$4({tracingContext:Y.tracingContext});let X=Y.prompt,G;for(let J of this.inputProcessors){if(V9(J))continue;let Q=J,W=Q.processLLMRequest?.bind(Q);if(!W)continue;let Z=(K,H)=>{throw new u6(K||`Tripwire triggered by ${Q.id}`,H,Q.id)};try{let K=this.getProcessorState(Q.id),H=await W({prompt:X,model:Y.model,stepNumber:Y.stepNumber,steps:Y.steps,state:K.customState,retryCount:Y.retryCount??0,requestContext:Y.requestContext,abort:Z,abortSignal:Y.abortSignal,writer:Y.writer,...g4(Y.tracingContext)});if(H&&typeof H==="object"){if(Object.prototype.hasOwnProperty.call(H,"prompt"))X=H.prompt;if(H.response&&!G)G=H.response}}catch(K){if(K instanceof u6)await kD(Q,K);throw K}}return{prompt:X,response:G}}async runProcessLLMResponse(Y){$4({tracingContext:Y.tracingContext});for(let X of this.inputProcessors){if(V9(X))continue;let G=X,J=G.processLLMResponse?.bind(G);if(!J)continue;let Q=(W,Z)=>{throw new u6(W||`Tripwire triggered by ${G.id}`,Z,G.id)};try{let W=this.getProcessorState(G.id);await J({chunks:Y.chunks,model:Y.model,stepNumber:Y.stepNumber,steps:Y.steps,state:W.customState,warnings:Y.warnings,request:Y.request,rawResponse:Y.rawResponse,fromCache:Y.fromCache,retryCount:Y.retryCount??0,requestContext:Y.requestContext,abort:Q,abortSignal:Y.abortSignal,writer:Y.writer,...g4(Y.tracingContext)})}catch(W){if(W instanceof u6)await kD(G,W);throw W}}}isProcessInputResultWithSystemMessages(Y){return Y!==null&&typeof Y==="object"&&"messages"in Y&&"systemMessages"in Y&&Array.isArray(Y.messages)&&Array.isArray(Y.systemMessages)}async runProcessOutputStep(Y){let{steps:X,messageList:G,stepNumber:J,finishReason:Q,toolCalls:W,text:Z,usage:K,requestContext:H,retryCount:z=0,writer:V}=Y,A=$4(Y);for(let[F,N]of this.outputProcessors.entries()){let D=G.get.all.db(),L=D.map((C)=>C.id),B=G.makeMessageSourceChecker();if(V9(N)){let C=G.getAllSystemMessages();await this.executeWorkflowAsProcessor(N,{phase:"outputStep",messages:D,messageList:G,stepNumber:J,finishReason:Q,toolCalls:W,text:Z,usage:K,systemMessages:C,steps:X,retryCount:z},A,H,V);continue}let O=N,E=O.processOutputStep?.bind(O);if(!E)continue;let M=(C,k)=>{throw new u6(C||`Tripwire triggered by ${O.id}`,k,O.id)},R=G.getAllSystemMessages(),q={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},w=A.tracingContext?.currentSpan,P=(w?.findParent("agent_run")||w?.parent||w)?.createChildSpan({type:"processor_run",name:`output step processor: ${O.id}`,entityType:J6.OUTPUT_STEP_PROCESSOR,entityId:O.id,entityName:O.name,attributes:{processorExecutor:"legacy",processorIndex:F},input:{messages:D,systemMessages:R,stepNumber:J,...Q!==void 0?{finishReason:Q}:{},...W!==void 0?{toolCalls:W}:{},...Z!==void 0?{text:Z}:{}}});G.startRecording();let _=this.getProcessorState(O.id);try{let C=await E({messages:D,messageList:G,stepNumber:J,finishReason:Q,toolCalls:W,text:Z,usage:K??q,systemMessages:R,steps:X,state:_.customState,abort:M,...g4({currentSpan:P}),requestContext:H,retryCount:z,writer:V,sendSignal:om({messageList:G,writer:V})}),k=G.stopRecording();if(C instanceof l6){if(C!==G)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${O.id} returned a MessageList instance other than the one that was passed in as an argument. New external message list instances are not supported. Use the messageList argument instead.`})}else if(C){let S=L.filter((T)=>!C.some((v)=>v.id===T));if(S.length)G.removeByIds(S);for(let T of C)if(G.removeByIds([T.id]),T.role==="system"){let v=T.content.content??T.content.parts?.map((x)=>x.type==="text"?x.text:"").join(`
`)??"";G.addSystem(v)}else G.add(T,B.getSource(T)||"response")}P?.end({output:{...!nU(D,G.get.all.db())?{messages:G.get.all.db()}:{},...!nU(R,G.getAllSystemMessages())?{systemMessages:G.getAllSystemMessages()}:{}},attributes:k.length>0?{messageListMutations:k}:void 0})}catch(C){if(G.stopRecording(),C instanceof u6)throw P?.error({error:C,endSpan:!0,attributes:{tripwireAbort:{reason:C.message,retry:C.options?.retry,metadata:C.options?.metadata}}}),await kD(O,C),C;throw P?.error({error:C,endSpan:!0}),C}}return G}async runProcessAPIError(Y){let{error:X,messageList:G,stepNumber:J,steps:Q,requestContext:W,retryCount:Z=0,writer:K,abortSignal:H}=Y,z=$4(Y),V=[...this.inputProcessors,...this.outputProcessors,...this.errorProcessors];for(let[A,F]of V.entries()){if(V9(F))continue;let N=F,D=N.processAPIError?.bind(N);if(!D)continue;let L=(P,_)=>{throw new u6(P||`Tripwire triggered by ${N.id}`,_,N.id)},B=G.get.all.db(),O=G.getAllSystemMessages(),E=Y.messageId,M=Y.messageId,R=z.tracingContext?.currentSpan,w=(R?.findParent("agent_run")||R?.parent||R)?.createChildSpan({type:"processor_run",name:`request error processor: ${N.id}`,entityType:J6.OUTPUT_STEP_PROCESSOR,entityId:N.id,entityName:N.name,attributes:{processorExecutor:"legacy",processorIndex:A},input:{messages:B,error:X instanceof Error?X.message:String(X),stepNumber:J,...Y.messageId?{messageId:Y.messageId}:{},retryCount:Z}});G.startRecording();let I=this.getProcessorState(N.id);try{let P=Y.rotateResponseMessageId?()=>{let v=Y.rotateResponseMessageId();return M=v,v}:void 0,_=await D({messages:B,messageList:G,stepNumber:J,steps:Q,state:I.customState,error:X,abort:L,...g4({currentSpan:w}),requestContext:W,retryCount:Z,writer:K,abortSignal:H,messageId:Y.messageId,...P?{rotateResponseMessageId:P}:{},sendSignal:om({messageList:G,writer:K,rotateResponseMessageId:P})}),C=G.stopRecording(),k=G.get.all.db(),S=G.getAllSystemMessages(),T={retry:_?.retry??!1};if(!nU(B,k))T.messages=k;if(!nU(O,S))T.systemMessages=S;if(M!==E)T.messageId=M;if(w?.end({output:T,attributes:C.length>0?{messageListMutations:C}:void 0}),_?.retry)return{retry:!0}}catch(P){if(G.stopRecording(),P instanceof u6)throw w?.error({error:P,endSpan:!0,attributes:{tripwireAbort:{reason:P.message,retry:P.options?.retry,metadata:P.options?.metadata}}}),await kD(N,P),P;w?.error({error:P,endSpan:!0}),this.logger.error(`[Agent:${this.agentName}] - Request error processor ${N.id} failed:`,P)}}return{retry:!1}}static applyMessagesToMessageList(Y,X,G,J,Q="input"){let W=G.filter((Z)=>!Y.some((K)=>K.id===Z));if(W.length)X.removeByIds(W);for(let Z of Y)if(X.removeByIds([Z.id]),Z.role==="system"){let K=Z.content.content??Z.content.parts?.map((H)=>H.type==="text"?H.text:"").join(`
`)??"";X.addSystem(K)}else X.add(Z,J.getSource(Z)||Q)}static async validateAndFormatProcessInputStepResult(Y,{messageList:X,processor:G,stepNumber:J}){if(Y instanceof l6){if(Y!==X)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${G.id} returned a MessageList instance other than the one that was passed in as an argument. New external message list instances are not supported. Use the messageList argument instead.`});return{messageList:Y}}else if(Array.isArray(Y))return{messages:Y};else if(Y){if(Y.messageList&&Y.messageList!==X)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${G.id} returned a MessageList instance other than the one that was passed in as an argument. New external message list instances are not supported. Use the messageList argument instead.`});if(Y.messages&&Y.messageList)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_MESSAGES_AND_MESSAGE_LIST",text:`Processor ${G.id} returned both messages and messageList. Only one of these is allowed.`});let{model:Q,...W}=Y;if(Y.model){let Z=await PE(Y.model);if(!KG(Z))throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_UNSUPPORTED_MODEL",text:`Processor ${G.id} returned an unsupported model version ${Z.specificationVersion} in step ${J}. Only ${xD.join(", ")} models are supported in processInputStep.`});return{model:Z,...W}}return W}return{}}};var z_=V0(()=>{fj0();du1();PT0();fi1();R64();I64();w64();cb0();xb0();xU();s40();Ow();DO();aw();SO();uz();Jg();dZ();xh();Xg();RT0();JT0();pS0();EW();wF();Fk0();f80();O1();KY();E50();RN();Wv0();F24=U6(gX4(),1),D24=ws1({"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"($,Y){Y.exports=function X(G,J){if(G===J)return!0;if(G&&J&&typeof G=="object"&&typeof J=="object"){if(G.constructor!==J.constructor)return!1;var Q,W,Z;if(Array.isArray(G)){if(Q=G.length,Q!=J.length)return!1;for(W=Q;W--!==0;)if(!X(G[W],J[W]))return!1;return!0}if(G.constructor===RegExp)return G.source===J.source&&G.flags===J.flags;if(G.valueOf!==Object.prototype.valueOf)return G.valueOf()===J.valueOf();if(G.toString!==Object.prototype.toString)return G.toString()===J.toString();if(Z=Object.keys(G),Q=Z.length,Q!==Object.keys(J).length)return!1;for(W=Q;W--!==0;)if(!Object.prototype.hasOwnProperty.call(J,Z[W]))return!1;for(W=Q;W--!==0;){var K=Z[W];if(!X(G[K],J[K]))return!1}return!0}return G!==G&&J!==J}}});g69=class extends $2{#$={inputTokens:0,outputTokens:0,totalTokens:0,cachedInputTokens:0,cacheCreationInputTokens:0,reasoningTokens:0};#Y;#X;#J=null;#G=null;#Q;runId;constructor({createStream:$,run:Y}){let X={promise:null,resolve:null,reject:null};X.promise=new Promise((W,Z)=>{X.resolve=W,X.reject=Z});let G={promise:null,resolve:null,reject:null};G.promise=new Promise((W,Z)=>{G.resolve=W,G.reject=Z});let J=null,Q=(W)=>{this.#$.inputTokens+=parseInt(W?.inputTokens?.toString()??"0",10),this.#$.outputTokens+=parseInt(W?.outputTokens?.toString()??"0",10),this.#$.totalTokens+=parseInt(W?.totalTokens?.toString()??"0",10),this.#$.reasoningTokens+=parseInt(W?.reasoningTokens?.toString()??"0",10),this.#$.cachedInputTokens+=parseInt(W?.cachedInputTokens?.toString()??"0",10),this.#$.cacheCreationInputTokens+=parseInt(W?.cacheCreationInputTokens?.toString()??"0",10)};super({start:async(W)=>{try{let Z=new WritableStream({write:(V)=>{if(V.type==="step-output"&&V.payload?.output?.from==="AGENT"&&V.payload?.output?.type==="finish"||V.type==="step-output"&&V.payload?.output?.from==="WORKFLOW"&&V.payload?.output?.type==="finish"){let A=V.payload?.output;if(A&&"payload"in A&&A.payload){let F=A.payload;if("usage"in F&&F.usage)Q(F.usage);else if("output"in F&&F.output){let N=F.output;if("usage"in N&&N.usage)Q(N.usage)}}}W.enqueue(V)}}),K=await $(Z),H=(V)=>{if(V.type==="workflow-step-output")return H(V.payload.output);return V},z=!1;for await(let V of K)if(V.type==="workflow-step-output"){let A=H(V);if(A.type==="routing-agent-end"||A.type==="agent-execution-end"||A.type==="workflow-execution-end"){if(A.payload?.usage)Q(A.payload.usage)}if(A.type==="network-object"){if(J)J.enqueue(A.payload?.object);W.enqueue(A)}else if(A.type==="network-object-result"){if(!z){if(z=!0,G.resolve(A.payload?.object),J)J.close()}W.enqueue(A)}else if(A.type==="network-execution-event-finish"){let F={...A.payload,usage:this.#$};W.enqueue({...A,payload:F})}else W.enqueue(A)}if(!z){if(G.resolve(void 0),J)J.close()}W.close(),X.resolve()}catch(Z){if(W.error(Z),X.reject(Z),G.reject(Z),J)J.error(Z)}}});this.#Q=Y,this.#Y=X,this.runId=Y.runId,this.#X=G,this.#G=new $2({start:(W)=>{J=W,this.#J=W}})}get status(){return this.#Y.promise.then(()=>this.#Q._getExecutionResults()).then(($)=>$.status)}get result(){return this.#Y.promise.then(()=>this.#Q._getExecutionResults())}get usage(){return this.#Y.promise.then(()=>this.#$)}get object(){return this.#X.promise}get objectStream(){return this.#G}},u69=["rate_limit","server_error","internal_error","timeout","temporarily_unavailable","service_unavailable","overloaded"],p69=/you can retry your request/i,d69=[O24];iZ4=Symbol("isAugmented");E24={lastMessages:10,semanticRecall:!1,generateTitle:!1,workingMemory:{enabled:!1,template:`
# User Information
- **First Name**: 
- **Last Name**: 
- **Location**: 
- **Occupation**: 
- **Interests**: 
- **Goals**: 
- **Events**: 
- **Facts**: 
- **Projects**: 
`}},Fg0=class extends u8{id;MAX_CONTEXT_TOKENS;_storage;vector;embedder;embedderOptions;threadConfig={...E24};#$;constructor($){super({component:"MEMORY",name:$.name});if(this.id=$.id??$.name??"default-memory",$.options)this.threadConfig=this.getMergedThreadConfig($.options);if($.processors)throw Error(`The 'processors' option in Memory is deprecated and has been removed.
      
Please use the new Input/Output processor system instead:

OLD (deprecated):
  new Memory({
    processors: [new TokenLimiter(100000)]
  })

NEW (use this):
  new Agent({
    memory,
    outputProcessors: [
      new TokenLimiterProcessor(100000)
    ]
  })

Or pass memory directly to processor arrays:
  new Agent({
    inputProcessors: [memory],
    outputProcessors: [memory]
  })

See: https://mastra.ai/en/docs/memory/processors`);if($.storage)this._storage=nZ4($.storage),this._hasOwnStorage=!0;if(this.threadConfig.semanticRecall){if(!$.vector)throw Error(`Semantic recall requires a vector store to be configured.

https://mastra.ai/en/docs/memory/semantic-recall`);if(this.vector=$.vector,!$.embedder)throw Error(`Semantic recall requires an embedder to be configured.

https://mastra.ai/en/docs/memory/semantic-recall`);if(typeof $.embedder==="string")this.embedder=new jm($.embedder);else this.embedder=$.embedder;if($.embedderOptions)this.embedderOptions=$.embedderOptions}else{if($.vector)this.vector=$.vector;if($.embedder)if(typeof $.embedder==="string")this.embedder=new jm($.embedder);else this.embedder=$.embedder;if($.embedderOptions)this.embedderOptions=$.embedderOptions}}__registerMastra($){this.#$=$}_hasOwnStorage=!1;get hasOwnStorage(){return this._hasOwnStorage}get storage(){if(!this._storage)throw Error(`Memory requires a storage provider to function. Add a storage configuration to Memory or to your Mastra instance.

https://mastra.ai/en/docs/memory/overview`);return this._storage}setStorage($){this._storage=nZ4($)}setVector($){this.vector=$}setEmbedder($,Y){if(typeof $==="string")this.embedder=new jm($);else this.embedder=$;if(Y)this.embedderOptions=Y}async getSystemMessage($){return null}listTools($){return{}}_embeddingDimensionPromise;async getEmbeddingDimension(){if(!this.embedder)return;if(!this._embeddingDimensionPromise)this._embeddingDimensionPromise=(async()=>{try{return(await this.embedder.doEmbed({values:["a"],...this.embedderOptions||{}})).embeddings[0]?.length}catch($){console.warn(`[Mastra Memory] Failed to probe embedder for dimension, falling back to default. This may cause index name mismatches if the embedder uses non-default dimensions. Error: ${$}`);return}})();return this._embeddingDimensionPromise}getEmbeddingIndexName($){let X=$??1536,G=X===1536,J=this.vector?.indexSeparator??"_";return G?`memory${J}messages`:`memory${J}messages${J}${X}`}async createEmbeddingIndex($,Y){let G=$??1536,J=this.getEmbeddingIndexName($);if(typeof this.vector>"u")throw Error("Tried to create embedding index but no vector db is attached to this Memory instance.");let W=(typeof Y?.semanticRecall==="object"?Y.semanticRecall:void 0)?.indexConfig,Z={indexName:J,dimension:G,...W?.metric&&{metric:W.metric}};if(W&&(W.type||W.ivf||W.hnsw)){if(Z.indexConfig={},W.type)Z.indexConfig.type=W.type;if(W.ivf)Z.indexConfig.ivf=W.ivf;if(W.hnsw)Z.indexConfig.hnsw=W.hnsw}return Z.metadataIndexes=["thread_id","resource_id"],await this.vector.createIndex(Z),{indexName:J}}getMergedThreadConfig($){if($?.workingMemory&&typeof $.workingMemory==="object"&&"use"in $.workingMemory)throw Error("The workingMemory.use option has been removed. Working memory always uses tool-call mode.");if($?.threads?.generateTitle!==void 0)throw Error("The threads.generateTitle option has been moved. Use the top-level generateTitle option instead.");let Y=XV(this.threadConfig,$||{});if(typeof $?.workingMemory==="object"&&$.workingMemory?.schema&&typeof Y.workingMemory==="object")Y.workingMemory.schema=$.workingMemory.schema;return Y}estimateTokens($){return Math.ceil($.split(" ").length*1.3)}async createThread({threadId:$,resourceId:Y,title:X,metadata:G,memoryConfig:J,saveThread:Q=!0}){let W={id:$||this.generateId({idType:"thread",source:"memory",resourceId:Y}),title:X||"",resourceId:Y,createdAt:new Date,updatedAt:new Date,metadata:G};return Q?this.saveThread({thread:W,memoryConfig:J}):W}async addMessage($){throw Error("addMessage is deprecated. Please use saveMessages instead.")}generateId($){return this.#$?.generateId($)||crypto.randomUUID()}static async checkThreadFGA($){let{mastra:Y,user:X,threadId:G,resourceId:J,requestContext:Q,permission:W=_z.MEMORY_READ}=$,Z=Y?.getServer()?.fga;if(!Z)return;let{checkFGA:K}=await Promise.resolve().then(() => (Aj(),Vj));await K({fgaProvider:Z,user:X,resource:{type:"thread",id:G},permission:W,context:J||Q?{resourceId:J,requestContext:Q}:void 0})}async getInputProcessors($=[],Y){let X=await this.storage.getStore("memory"),G=[],Q=Y?.get("MastraMemory")?.memoryConfig,W=Q?this.getMergedThreadConfig(Q):this.threadConfig;if(typeof W.workingMemory==="object"&&W.workingMemory.enabled!==!1){if(!X)throw new G0({category:"USER",domain:"STORAGE",id:"WORKING_MEMORY_MISSING_STORAGE_ADAPTER",text:"Using Mastra Memory working memory requires a storage adapter but no attached adapter was detected."});if(!$.some((z)=>!V9(z)&&z.id==="working-memory")){let z;if(typeof W.workingMemory==="object"&&W.workingMemory.template)z={format:"markdown",content:W.workingMemory.template};G.push(new M24({storage:X,template:z,scope:typeof W.workingMemory==="object"?W.workingMemory.scope:void 0,useVNext:typeof W.workingMemory==="object"&&"version"in W.workingMemory&&W.workingMemory.version==="vnext",templateProvider:this}))}}let K=W.lastMessages;if(K){if(!X)throw new G0({category:"USER",domain:"STORAGE",id:"MESSAGE_HISTORY_MISSING_STORAGE_ADAPTER",text:"Using Mastra Memory message history requires a storage adapter but no attached adapter was detected."});let H=$.some((V)=>!V9(V)&&V.id==="message-history"),z=$.some((V)=>!V9(V)&&V.id==="observational-memory")||Jg0(W.observationalMemory);if(!H&&!z)G.push(new Yu({storage:X,lastMessages:typeof K==="number"?K:void 0}))}if(W.semanticRecall){if(!X)throw new G0({category:"USER",domain:"STORAGE",id:"SEMANTIC_RECALL_MISSING_STORAGE_ADAPTER",text:"Using Mastra Memory semantic recall requires a storage adapter but no attached adapter was detected."});if(!this.vector)throw new G0({category:"USER",domain:"MASTRA_VECTOR",id:"SEMANTIC_RECALL_MISSING_VECTOR_ADAPTER",text:"Using Mastra Memory semantic recall requires a vector adapter but no attached adapter was detected."});if(!this.embedder)throw new G0({category:"USER",domain:"MASTRA_VECTOR",id:"SEMANTIC_RECALL_MISSING_EMBEDDER",text:"Using Mastra Memory semantic recall requires an embedder but no attached embedder was detected."});if(!$.some((z)=>!V9(z)&&z.id==="semantic-recall")){let z=typeof W.semanticRecall==="object"?W.semanticRecall:{},V=await this.getEmbeddingDimension(),A=this.getEmbeddingIndexName(V);G.push(new Ug0({storage:X,vector:this.vector,embedder:this.embedder,embedderOptions:this.embedderOptions,indexName:A,...z}))}}return G}async getOutputProcessors($=[],Y){let X=await this.storage.getStore("memory"),G=[],Q=Y?.get("MastraMemory")?.memoryConfig,W=Q?this.getMergedThreadConfig(Q):this.threadConfig;if(W.semanticRecall){if(!X)throw new G0({category:"USER",domain:"STORAGE",id:"SEMANTIC_RECALL_MISSING_STORAGE_ADAPTER",text:"Using Mastra Memory semantic recall requires a storage adapter but no attached adapter was detected."});if(!this.vector)throw new G0({category:"USER",domain:"MASTRA_VECTOR",id:"SEMANTIC_RECALL_MISSING_VECTOR_ADAPTER",text:"Using Mastra Memory semantic recall requires a vector adapter but no attached adapter was detected."});if(!this.embedder)throw new G0({category:"USER",domain:"MASTRA_VECTOR",id:"SEMANTIC_RECALL_MISSING_EMBEDDER",text:"Using Mastra Memory semantic recall requires an embedder but no attached embedder was detected."});if(!$.some((H)=>!V9(H)&&H.id==="semantic-recall")){let H=typeof W.semanticRecall==="object"?W.semanticRecall:{},z=await this.getEmbeddingDimension(),V=this.getEmbeddingIndexName(z);G.push(new Ug0({storage:X,vector:this.vector,embedder:this.embedder,embedderOptions:this.embedderOptions,indexName:V,...H}))}}let Z=W.lastMessages;if(Z){if(!X)throw new G0({category:"USER",domain:"STORAGE",id:"MESSAGE_HISTORY_MISSING_STORAGE_ADAPTER",text:"Using Mastra Memory message history requires a storage adapter but no attached adapter was detected."});let K=$.some((z)=>!V9(z)&&z.id==="message-history"),H=$.some((z)=>!V9(z)&&z.id==="observational-memory")||Jg0(W.observationalMemory);if(!K&&!H)G.push(new Yu({storage:X,lastMessages:typeof Z==="number"?Z:void 0}))}return G}getConfig(){let{generateTitle:$,workingMemory:Y,threads:X,observationalMemory:G,...J}=this.threadConfig,Q={vector:this.vector?.id,options:{...J}};if($!==void 0&&Q.options){if(typeof $==="boolean")Q.options.generateTitle=$;else if(typeof $==="object"&&$.model){let W=$.model,Z;if(typeof W==="string")Z=W;else if(typeof W==="function")Z=void 0;else if(W&&typeof W==="object"){if("id"in W&&typeof W.id==="string")Z=W.id}if(Z&&Q.options)Q.options.generateTitle={model:Z,instructions:typeof $.instructions==="string"?$.instructions:void 0}}}if(this.embedder)Q.embedder=this.embedder;if(this.embedderOptions){let{telemetry:W,...Z}=this.embedderOptions;Q.embedderOptions=Z}if(G!==void 0)Q.observationalMemory=this.serializeObservationalMemory(G);return Q}serializeObservationalMemory($){if(typeof $==="boolean")return $;if($.enabled===!1)return!1;let Y={scope:$.scope,activateAfterIdle:$.activateAfterIdle,activateOnProviderChange:$.activateOnProviderChange,shareTokenBudget:$.shareTokenBudget,temporalMarkers:$.temporalMarkers,retrieval:$.retrieval},X=of0($.model);if(X)Y.model=X;if($.observation){let G=$.observation;Y.observation={messageTokens:G.messageTokens,modelSettings:G.modelSettings,providerOptions:G.providerOptions,maxTokensPerBatch:G.maxTokensPerBatch,bufferTokens:G.bufferTokens,bufferActivation:G.bufferActivation,blockAfter:G.blockAfter,previousObserverTokens:G.previousObserverTokens};let J=of0(G.model);if(J)Y.observation.model=J}if($.reflection){let G=$.reflection;Y.reflection={observationTokens:G.observationTokens,modelSettings:G.modelSettings,providerOptions:G.providerOptions,blockAfter:G.blockAfter,bufferActivation:G.bufferActivation};let J=of0(G.model);if(J)Y.reflection.model=J}return Y}};Kg0=new $Z({max:o69}),R24=U.object({type:U.literal("text"),text:U.string()}).passthrough(),q24=U.object({type:U.literal("image"),image:U.union([U.string(),U.instanceof(URL),U.instanceof(Uint8Array)]),mimeType:U.string().optional()}).passthrough(),I24=U.object({type:U.literal("file"),data:U.union([U.string(),U.instanceof(URL),U.instanceof(Uint8Array)]),mimeType:U.string()}).passthrough(),P24=U.object({type:U.literal("tool-invocation"),toolInvocation:U.object({toolCallId:U.string(),toolName:U.string(),args:U.unknown(),state:U.enum(["partial-call","call","result"]),result:U.unknown().optional()})}).passthrough(),w24=U.object({type:U.literal("reasoning"),reasoning:U.string(),details:U.array(U.object({type:U.enum(["text","redacted"]),text:U.string().optional(),data:U.string().optional()}))}).passthrough(),_24=U.object({type:U.literal("source"),source:U.object({sourceType:U.string(),id:U.string(),url:U.string().optional(),title:U.string().optional()})}).passthrough(),j24=U.object({type:U.literal("step-start")}).passthrough(),e69=U.object({type:U.string().refine(($)=>$.startsWith("data-"),{message:'Type must start with "data-"'}),id:U.string().optional(),data:U.unknown()}).passthrough(),Dg0=U.union([R24,q24,I24,P24,w24,_24,j24,e69]),$89=U.object({format:U.literal(2),parts:U.array(Dg0),content:U.string().optional(),metadata:U.record(U.string(),U.unknown()).optional(),providerMetadata:U.record(U.string(),U.unknown()).optional()}),T24=U.object({format:U.literal(2),parts:U.array(Dg0),content:U.string().optional(),metadata:U.record(U.string(),U.unknown()).optional(),providerMetadata:U.record(U.string(),U.unknown()).optional()}).passthrough(),C24=U.object({id:U.string(),role:U.enum(["user","assistant","system","tool","signal"]),createdAt:U.coerce.date(),threadId:U.string().optional(),resourceId:U.string().optional(),type:U.string().optional(),content:T24}).passthrough(),uj=U.custom().describe("MessageList instance for managing message sources"),Xu=U.array(C24),Y89=U.object({type:U.literal("text"),text:U.string()}).passthrough();U.object({role:U.literal("system"),content:U.union([U.string(),U.array(Y89)]),experimental_providerMetadata:U.record(U.string(),U.unknown()).optional()}).passthrough();X89=U.object({role:U.enum(["system","user","assistant","tool"]),content:U.unknown()}).passthrough(),q70=U.array(X89),S24=U.object({toolName:U.string(),toolCallId:U.string(),args:U.unknown()}),Gu=U.number().optional(),k24=U.object({phase:U.literal("input"),messages:Xu,messageList:uj,systemMessages:q70.optional(),retryCount:Gu}),v24=U.object({phase:U.literal("inputStep"),messages:Xu,messageList:uj,stepNumber:U.number().describe("The current step number (0-indexed)"),systemMessages:q70.optional(),retryCount:Gu,messageId:U.string().optional().describe("The active assistant response message ID for this step"),rotateResponseMessageId:U.custom().optional().describe("Rotate the active assistant response message ID when supported by the caller"),model:U.custom().optional().describe("Current model for this step"),tools:U.custom().optional().describe("Current tools available for this step"),toolChoice:U.custom().optional().describe("Current tool choice setting"),activeTools:U.array(U.string()).optional().describe("Currently active tools"),providerOptions:U.custom().optional().describe("Provider-specific options"),modelSettings:U.custom().optional().describe("Model settings (temperature, etc.)"),structuredOutput:U.custom().optional().describe("Structured output configuration"),steps:U.custom().optional().describe("Results from previous steps")}),x24=U.object({phase:U.literal("outputStream"),part:U.unknown().nullable().describe("The current chunk being processed. Can be null to skip."),streamParts:U.array(U.unknown()).describe("All chunks seen so far"),state:U.record(U.string(),U.unknown()).describe("Mutable state object that persists across chunks"),messageList:uj.optional(),retryCount:Gu}),y24=U.object({text:U.string().describe("The accumulated text from all steps"),usage:U.record(U.string(),U.unknown()).describe("Token usage (cumulative across all steps)"),finishReason:U.string().describe("Why the generation finished"),steps:U.array(U.unknown()).describe("All LLM step results")}),b24=U.object({phase:U.literal("outputResult"),messages:Xu,messageList:uj,retryCount:Gu,result:y24.optional()}),h24=U.object({phase:U.literal("outputStep"),messages:Xu,messageList:uj,stepNumber:U.number().describe("The current step number (0-indexed)"),finishReason:U.string().optional().describe("The finish reason from the LLM (stop, tool-use, length, etc.)"),toolCalls:U.array(S24).optional().describe("Tool calls made in this step (if any)"),text:U.string().optional().describe("Generated text from this step"),usage:U.record(U.string(),U.unknown()).optional().describe("Token usage for the current step (inputTokens, outputTokens, totalTokens, etc.)"),systemMessages:q70.optional(),retryCount:Gu}),Ng0=U.discriminatedUnion("phase",[k24,v24,x24,b24,h24]),X80=U.object({phase:U.enum(["input","inputStep","outputStream","outputResult","outputStep"]),messages:Xu.optional(),messageList:uj.optional(),systemMessages:q70.optional(),stepNumber:U.number().optional(),part:U.unknown().nullable().optional(),streamParts:U.array(U.unknown()).optional(),state:U.record(U.string(),U.unknown()).optional(),result:y24.optional(),finishReason:U.string().optional(),toolCalls:U.array(S24).optional(),text:U.string().optional(),usage:U.record(U.string(),U.unknown()).optional(),retryCount:U.number().optional(),model:U.custom().optional(),tools:U.custom().optional(),toolChoice:U.custom().optional(),activeTools:U.array(U.string()).optional(),providerOptions:U.custom().optional(),modelSettings:U.custom().optional(),structuredOutput:U.custom().optional(),steps:U.custom().optional(),messageId:U.string().optional(),rotateResponseMessageId:U.custom().optional()}),Gg=Ng0;Q89=["mastra_workspace_"];O89=/https?:\/\/[^\s<>)"']+/gi;q89=class extends u8{initialize({runId:$,createStream:Y,onResult:X}){let G=this,J;return J=new ReadableStream({async start(Q){try{let W=await Y();N50(J,ub0(W)),X({warnings:W.warnings,request:W.request,rawResponse:W.rawResponse||W.response||{}}),await G.transform({runId:$,stream:W.stream,controller:Q}),E70(Q)}catch(W){R89(Q,W)}}}),J}};H_=class{#$="running";#Y;#X={inputTokens:0,outputTokens:0,totalTokens:0,cachedInputTokens:0,cacheCreationInputTokens:0,reasoningTokens:0};#J=!1;#G;#Q=new y69;#U=[];#K=!1;#W;#H={usage:new g7,result:new g7};runId;workflowId;constructor({runId:$,workflowId:Y,stream:X}){let G=this;this.runId=$,this.workflowId=Y,this.#G=X,X.pipeTo(new lZ4({start(){let J={type:"workflow-start",runId:G.runId,from:"WORKFLOW",payload:{workflowId:G.workflowId}};G.#U.push(J),G.#Q.emit("chunk",J)},write(J){if(J.type!=="workflow-step-finish")G.#U.push(J),G.#Q.emit("chunk",J);if(J.type==="workflow-step-output"){if("output"in J.payload&&J.payload.output){let Q=J.payload.output;if(Q.type==="finish"){if(Q.payload&&"usage"in Q.payload&&Q.payload.usage)G.#V(Q.payload.usage);else if(Q.payload&&"output"in Q.payload&&Q.payload.output){let W=Q.payload.output;if("usage"in W&&W.usage)G.#V(W.usage)}}}}else if(J.type==="workflow-canceled")G.#$="canceled";else if(J.type==="workflow-step-suspended")G.#$="suspended";else if(J.type==="workflow-step-result"&&J.payload.status==="failed")if(J.payload.tripwire)G.#$="tripwire",G.#Y=J.payload.tripwire;else G.#$="failed";else if(J.type==="workflow-paused")G.#$="paused"},close(){if(G.#$==="running")G.#$="success";G.#Q.emit("chunk",{type:"workflow-finish",runId:G.runId,from:"WORKFLOW",payload:{workflowStatus:G.#$,metadata:G.#W?{error:G.#W,errorMessage:G.#W?.message}:{},output:{usage:G.#X},...G.#$==="tripwire"&&G.#Y?{tripwire:G.#Y}:{}}}),G.#H.usage.resolve(G.#X),Object.entries(G.#H).forEach(([J,Q])=>{if(Q.status.type==="pending")Q.reject(Error(`promise '${J}' was not resolved or rejected when stream finished`))}),G.#K=!0,G.#Q.emit("finish")}})).catch((J)=>{console.log(" something went wrong",J)})}#A($){if(!this.#J)this.consumeStream();return $.promise}#V($){let Y={inputTokens:this.#X.inputTokens??0,outputTokens:this.#X.outputTokens??0,totalTokens:this.#X.totalTokens??0,reasoningTokens:this.#X.reasoningTokens??0,cachedInputTokens:this.#X.cachedInputTokens??0,cacheCreationInputTokens:this.#X.cacheCreationInputTokens??0};if("inputTokens"in $)Y.inputTokens+=parseInt($?.inputTokens?.toString()??"0",10),Y.outputTokens+=parseInt($?.outputTokens?.toString()??"0",10);else if("promptTokens"in $)Y.inputTokens+=parseInt($?.promptTokens?.toString()??"0",10),Y.outputTokens+=parseInt($?.completionTokens?.toString()??"0",10);Y.totalTokens+=parseInt($?.totalTokens?.toString()??"0",10),Y.reasoningTokens+=parseInt($?.reasoningTokens?.toString()??"0",10),Y.cachedInputTokens+=parseInt($?.cachedInputTokens?.toString()??"0",10),Y.cacheCreationInputTokens+=parseInt($?.cacheCreationInputTokens?.toString()??"0",10),this.#X=Y}updateResults($){this.#H.result.resolve($)}rejectResults($){this.#H.result.reject($),this.#$="failed",this.#W=$}resume($){this.#G=$,this.#K=!1,this.#J=!1,this.#$="running",this.#H={usage:new g7,result:new g7};let Y=this;$.pipeTo(new lZ4({start(){let X={type:"workflow-start",runId:Y.runId,from:"WORKFLOW",payload:{workflowId:Y.workflowId}};Y.#U.push(X),Y.#Q.emit("chunk",X)},write(X){if(X.type!=="workflow-step-finish")Y.#U.push(X),Y.#Q.emit("chunk",X);if(X.type==="workflow-step-output"){if("output"in X.payload&&X.payload.output){let G=X.payload.output;if(G.type==="finish"){if(G.payload&&"usage"in G.payload&&G.payload.usage)Y.#V(G.payload.usage);else if(G.payload&&"output"in G.payload&&G.payload.output){let J=G.payload.output;if("usage"in J&&J.usage)Y.#V(J.usage)}}}}else if(X.type==="workflow-canceled")Y.#$="canceled";else if(X.type==="workflow-step-suspended")Y.#$="suspended";else if(X.type==="workflow-step-result"&&X.payload.status==="failed")if(X.payload.tripwire)Y.#$="tripwire",Y.#Y=X.payload.tripwire;else Y.#$="failed";else if(X.type==="workflow-paused")Y.#$="paused"},close(){if(Y.#$==="running")Y.#$="success";Y.#Q.emit("chunk",{type:"workflow-finish",runId:Y.runId,from:"WORKFLOW",payload:{workflowStatus:Y.#$,metadata:Y.#W?{error:Y.#W,errorMessage:Y.#W?.message}:{},output:{usage:Y.#X},...Y.#$==="tripwire"&&Y.#Y?{tripwire:Y.#Y}:{}}}),Y.#K=!0,Y.#Q.emit("finish")}})).catch((X)=>{console.log(" something went wrong",X)})}async consumeStream($){if(this.#J)return;this.#J=!0;try{await P89({stream:this.#G,onError:$?.onError})}catch(Y){$?.onError?.(Y)}}get fullStream(){let $=this;return new $2({start(Y){if($.#U.forEach((J)=>{Y.enqueue(J)}),$.#K){Y.close();return}let X=(J)=>{Y.enqueue(J)},G=()=>{$.#Q.off("chunk",X),$.#Q.off("finish",G),Y.close()};$.#Q.on("chunk",X),$.#Q.on("finish",G)},pull(Y){if(!$.#J)$.consumeStream()},cancel(){$.#Q.removeAllListeners()}})}get status(){return this.#$}get result(){return this.#A(this.#H.result)}get usage(){return this.#A(this.#H.usage)}get locked(){return console.warn("WorkflowRunOutput.locked is deprecated. Use fullStream.locked instead."),this.fullStream.locked}cancel($){return console.warn("WorkflowRunOutput.cancel() is deprecated. Use fullStream.cancel() instead."),this.fullStream.cancel($)}getReader($){return console.warn("WorkflowRunOutput.getReader() is deprecated. Use fullStream.getReader() instead."),this.fullStream.getReader($)}pipeThrough($,Y){return console.warn("WorkflowRunOutput.pipeThrough() is deprecated. Use fullStream.pipeThrough() instead."),this.fullStream.pipeThrough($,Y)}pipeTo($,Y){return console.warn("WorkflowRunOutput.pipeTo() is deprecated. Use fullStream.pipeTo() instead."),this.fullStream.pipeTo($,Y)}tee(){return console.warn("WorkflowRunOutput.tee() is deprecated. Use fullStream.tee() instead."),this.fullStream.tee()}[Symbol.asyncIterator](){return console.warn("WorkflowRunOutput[Symbol.asyncIterator]() is deprecated. Use fullStream[Symbol.asyncIterator]() instead."),this.fullStream[Symbol.asyncIterator]()}toReadableStream(){return console.warn("WorkflowRunOutput.toReadableStream() is deprecated. Use fullStream directly instead."),this.fullStream}},Q80=class extends u8{mastra;options;constructor({mastra:$,options:Y}){super({name:"ExecutionEngine",component:AK.WORKFLOW});this.mastra=$,this.options=Y}__registerMastra($){this.mastra=$;let Y=$?.getLogger();if(Y)this.__setLogger(Y)}getLogger(){return this.logger}async invokeLifecycleCallbacks($){let{onFinish:Y,onError:X}=this.options,G={runId:$.runId,workflowId:$.workflowId,resourceId:$.resourceId,getInitData:()=>$.input,mastra:this.mastra,requestContext:$.requestContext,logger:this.logger,state:$.state,stepExecutionPath:$.stepExecutionPath};if(Y)try{await Promise.resolve(Y({status:$.status,result:$.result,error:$.error,steps:$.steps,tripwire:$.tripwire,...G}))}catch(J){this.logger.error("Error in onFinish callback",{error:J})}if(X&&($.status==="failed"||$.status==="tripwire"))try{await Promise.resolve(X({status:$.status,error:$.error,steps:$.steps,tripwire:$.tripwire,...G}))}catch(J){this.logger.error("Error in onError callback",{error:J})}}};tZ4=new Set;c24=class extends Q80{retryCounts=new Map;getOrGenerateRetryCount($){if(this.retryCounts.has($)){let G=this.retryCounts.get($)+1;return this.retryCounts.set($,G),G}let Y=0;return this.retryCounts.set($,Y),Y}isNestedWorkflowStep($){return!1}async executeSleepDuration($,Y,X){await new Promise((G)=>setTimeout(G,$<0?0:$))}async executeSleepUntilDate($,Y,X){let G=$.getTime()-Date.now();await new Promise((J)=>setTimeout(J,G<0?0:G))}async wrapDurableOperation($,Y){return Y()}getEngineContext(){return{}}async evaluateCondition($,Y,X,G){return this.wrapDurableOperation(G,async()=>{return await $(X)?Y:null})}async onStepExecutionStart($){return this.wrapDurableOperation($.operationId,async()=>{let Y=Date.now();if(!$.skipEmits)await $.pubsub.publish(`workflow.events.v2.${$.executionContext.runId}`,{type:"watch",runId:$.executionContext.runId,data:{type:"workflow-step-start",payload:{id:$.step.id,stepCallId:$.stepCallId,...$.stepInfo}}});return Y})}async executeWorkflowStep($){return null}async createStepSpan($){return $.parentSpan?.createChildSpan($.options)}async endStepSpan($){$.span?.end($.endOptions)}async errorStepSpan($){$.span?.error($.errorOptions)}async createChildSpan($){return $.parentSpan?.createChildSpan($.options)}async endChildSpan($){$.span?.end($.endOptions)}async errorChildSpan($){$.span?.error($.errorOptions)}async executeStepWithRetry($,Y,X){for(let G=0;G<X.retries+1;G++){if(G>0&&X.delay)await new Promise((J)=>setTimeout(J,X.delay));try{return{ok:!0,result:await this.wrapDurableOperation($,Y)}}catch(J){if(G===X.retries){let Q=XG(J,{serializeStack:!1,fallbackMessage:"Unknown step execution error"}),W=new G0({id:"WORKFLOW_STEP_INVOKE_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",details:{workflowId:X.workflowId,runId:X.runId,stepId:$}},Q);return this.logger?.trackException(W),this.logger?.error(`Error executing step ${$}: `+Q?.stack),X.stepSpan?.error({error:W,attributes:{status:"failed"}}),{ok:!1,error:{status:"failed",error:Q,endedAt:Date.now(),tripwire:J instanceof u6?{reason:J.message,retry:J.options?.retry,metadata:J.options?.metadata,processorId:J.processorId}:void 0}}}}}return{ok:!1,error:{status:"failed",error:Error("Unknown error"),endedAt:Date.now()}}}formatResultError($,Y){let X=Y?.error;return XG($||X,{serializeStack:!1,fallbackMessage:"Unknown workflow error"}).toJSON()}async fmtReturnValue($,Y,X,G,J){let Q={};for(let[Z,K]of Object.entries(Y))if(K&&typeof K==="object"&&!Array.isArray(K)&&"metadata"in K){let{metadata:H,...z}=K;if(H){let{nestedRunId:V,...A}=H;if(Object.keys(A).length>0)Q[Z]={...z,metadata:A};else Q[Z]=z}else Q[Z]=K}else Q[Z]=K;let W={status:X.status,steps:Q,input:Q.input};if(J){W.stepExecutionPath=J;let Z={...Q},K,H="input"in Q;if(H)K=Q.input;for(let z of J){let V=Q[z];if(!V)continue;let A={...V},F=!1;if(H)try{F=A.payload===K||JSON.stringify(A.payload)===JSON.stringify(K)}catch{}if(F)delete A.payload;if(A.status==="success")K=A.output,H=!0;Z[z]=A}W.steps=Z}if(X.status==="success")W.result=X.output;else if(X.status==="failed"){let Z=X?.tripwire;if(Z instanceof u6)W.status="tripwire",W.tripwire={reason:Z.message,retry:Z.options?.retry,metadata:Z.options?.metadata,processorId:Z.processorId};else if(Z&&typeof Z==="object"&&"reason"in Z)W.status="tripwire",W.tripwire=Z;else W.error=this.formatResultError(G,X)}else if(X.status==="suspended"){let Z={},K=Object.entries(Y).flatMap(([H,z])=>{if(z?.status==="suspended"){let{__workflow_meta:V,...A}=z?.suspendPayload??{};Z[H]=A;let F=V?.path;return F?[[H,...F]]:[[H]]}return[]});W.suspended=K,W.suspendPayload=Z}return W}serializeRequestContext($){if(typeof $.toJSON==="function")return $.toJSON();let Y={};return $.forEach((X,G)=>{Y[G]=X}),Y}deserializeRequestContext($){let Y=new p1;for(let[X,G]of Object.entries($))Y.set(X,G);return Y}requiresDurableContextSerialization(){return!1}buildMutableContext($){return{state:$.state,suspendedPaths:$.suspendedPaths,resumeLabels:$.resumeLabels}}applyMutableContext($,Y){Object.assign($.state,Y.state),Object.assign($.suspendedPaths,Y.suspendedPaths),Object.assign($.resumeLabels,Y.resumeLabels)}async execute($){let{workflowId:Y,runId:X,resourceId:G,graph:J,input:Q,initialState:W,resume:Z,retryConfig:K,workflowSpan:H,disableScorers:z,restart:V,timeTravel:A,perStep:F}=$,{attempts:N=0,delay:D=0}=K??{},L=J.steps;if(this.retryCounts.clear(),L.length===0){let P=new G0({id:"WORKFLOW_EXECUTE_EMPTY_GRAPH",text:"Workflow must have at least one step",domain:"MASTRA_WORKFLOW",category:"USER"});throw H?.error({error:P}),P}let B=0;if(A)B=A.executionPath[0],A.executionPath.shift();else if(V)B=V.activePaths[0],V.activePaths.shift();else if(Z?.resumePath)B=Z.resumePath[0],Z.resumePath.shift();let O=A?.stepResults||V?.stepResults||Z?.stepResults||{input:Q},E=A?.stepExecutionPath||V?.stepExecutionPath||Z?.stepExecutionPath||[],M,R=A?.state??V?.state??W??{},q,w=$.requestContext;for(let P=B;P<L.length;P++){let _=L[P],C={workflowId:Y,runId:X,executionPath:[P],stepExecutionPath:E,activeStepsPath:{},suspendedPaths:{},resumeLabels:{},retryConfig:{attempts:N,delay:D},format:$.format,state:R??W,tracingIds:$.tracingIds};if(q=C,M=await this.executeEntry({workflowId:Y,runId:X,resourceId:G,entry:_,executionContext:C,serializedStepGraph:$.serializedStepGraph,prevStep:L[P-1],stepResults:O,resume:Z,timeTravel:A,restart:V,...g4({currentSpan:H}),abortController:$.abortController,pubsub:$.pubsub,requestContext:w,outputWriter:$.outputWriter,disableScorers:z,perStep:F}),this.applyMutableContext(C,M.mutableContext),R=M.mutableContext.state,this.requiresDurableContextSerialization()&&M.requestContext)w=this.deserializeRequestContext(M.requestContext);if(M.result.status!=="success"){if(M.result.status==="bailed")M.result.status="success";let k=await this.fmtReturnValue($.pubsub,O,M.result,void 0,E),S=k.status==="suspended"&&H?{traceId:H.traceId,spanId:H.id,parentSpanId:H.getParentSpanId()}:{};if(await this.persistStepUpdate({workflowId:Y,runId:X,resourceId:G,stepResults:M.stepResults,serializedStepGraph:$.serializedStepGraph,executionContext:C,workflowStatus:k.status,result:k.result,error:k.error,requestContext:w,tracingContext:S}),k.error)H?.error({error:k.error,attributes:{status:k.status}});else H?.end({output:k.result,attributes:{status:k.status}});if(M.result.status!=="paused")await this.invokeLifecycleCallbacks({status:k.status,result:k.result,error:k.error,steps:k.steps,tripwire:k.tripwire,runId:X,workflowId:Y,resourceId:G,input:Q,requestContext:w,state:R,stepExecutionPath:E});if(M.result.status==="paused")await $.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-paused",payload:{}}});return{...k,...M.result.status==="suspended"&&$.outputOptions?.includeResumeLabels?{resumeLabels:M.mutableContext.resumeLabels}:{},...$.outputOptions?.includeState?{state:R}:{}}}if(F){let k=await this.fmtReturnValue($.pubsub,O,M.result,void 0,E);return await this.persistStepUpdate({workflowId:Y,runId:X,resourceId:G,stepResults:M.stepResults,serializedStepGraph:$.serializedStepGraph,executionContext:q,workflowStatus:"paused",requestContext:w}),await $.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-paused",payload:{}}}),H?.end({attributes:{status:"paused"}}),delete k.result,{...k,status:"paused",...$.outputOptions?.includeState?{state:R}:{}}}}let I=await this.fmtReturnValue($.pubsub,O,M.result,void 0,E);if(await this.persistStepUpdate({workflowId:Y,runId:X,resourceId:G,stepResults:M.stepResults,serializedStepGraph:$.serializedStepGraph,executionContext:q,workflowStatus:I.status,result:I.result,error:I.error,requestContext:w}),H?.end({output:I.result,attributes:{status:I.status}}),await this.invokeLifecycleCallbacks({status:I.status,result:I.result,error:I.error,steps:I.steps,tripwire:I.tripwire,runId:X,workflowId:Y,resourceId:G,input:Q,requestContext:w,state:R,stepExecutionPath:E}),$.outputOptions?.includeState)return{...I,state:R};return I}getStepOutput($,Y){if(!Y)return $.input;else if(Y.type==="step")return $[Y.step.id]?.output;else if(Y.type==="sleep"||Y.type==="sleepUntil")return $[Y.id]?.output;else if(Y.type==="parallel"||Y.type==="conditional")return Y.steps.reduce((X,G)=>{return X[G.step.id]=$[G.step.id]?.output,X},{});else if(Y.type==="loop")return $[Y.step.id]?.output;else if(Y.type==="foreach")return $[Y.step.id]?.output}async executeSleep($){return S89(this,$)}async executeSleepUntil($){return k89(this,$)}async executeStep($){return v89(this,$)}async executeParallel($){return w89(this,$)}async executeConditional($){return _89(this,$)}async executeLoop($){return j89(this,$)}async executeForeach($){return T89(this,$)}async persistStepUpdate($){return C89(this,$)}async executeEntry($){return Hg0(this,$)}};V80=class extends u8{id;description;inputSchema;outputSchema;stateSchema;requestContextSchema;steps;stepDefs;engineType="default";type="default";#$;committed=!1;stepFlow;serializedStepFlow;executionEngine;executionGraph;#Y;retryConfig;#X;#J=new Map;constructor({mastra:$,id:Y,inputSchema:X,outputSchema:G,stateSchema:J,requestContextSchema:Q,description:W,executionEngine:Z,retryConfig:K,steps:H,options:z={},type:V}){super({name:Y,component:AK.WORKFLOW});if(this.id=Y,this.description=W,this.inputSchema=X?W4(X):X,this.outputSchema=G?W4(G):G,this.stateSchema=J?W4(J):void 0,this.requestContextSchema=Q?W4(Q):void 0,this.retryConfig=K??{attempts:0,delay:0},this.executionGraph=this.buildExecutionGraph(),this.stepFlow=[],this.serializedStepFlow=[],this.#X=$,this.steps={},this.stepDefs=H,this.type=V??"default",this.#Y={validateInputs:z.validateInputs??!0,shouldPersistSnapshot:z.shouldPersistSnapshot??(()=>!0),tracingPolicy:z.tracingPolicy,onFinish:z.onFinish,onError:z.onError,sharePubsub:z.sharePubsub},!Z)this.executionEngine=new c24({mastra:this.#X,options:this.#Y});else this.executionEngine=Z;this.engineType="default",this.#J=new Map}get runs(){return this.#J}get mastra(){return this.#X}get options(){return this.#Y}__registerMastra($){this.#X=$,this.executionEngine.__registerMastra($)}__registerPrimitives($){if($.logger)this.__setLogger($.logger)}__setLogger($){super.__setLogger($),this.executionEngine.__setLogger($)}setStepFlow($){this.stepFlow=$}then($){return this.stepFlow.push({type:"step",step:$}),this.serializedStepFlow.push({type:"step",step:{id:$.id,description:$.description,metadata:$.metadata,component:$.component,serializedStepFlow:$.serializedStepFlow,canSuspend:Boolean($.suspendSchema||$.resumeSchema)}}),this.steps[$.id]=$,this}sleep($){let Y=`sleep_${this.#X?.generateId({idType:"step",source:"workflow",entityId:this.id,stepType:"sleep"})||M6()}`,X=typeof $==="function"?{type:"sleep",id:Y,fn:$}:{type:"sleep",id:Y,duration:$},G=typeof $==="function"?{type:"sleep",id:Y,fn:$.toString()}:{type:"sleep",id:Y,duration:$};return this.stepFlow.push(X),this.serializedStepFlow.push(G),this.steps[Y]=o9({id:Y,inputSchema:U.object({}),outputSchema:U.object({}),execute:async()=>{return{}}}),this}sleepUntil($){let Y=`sleep_${this.#X?.generateId({idType:"step",source:"workflow",entityId:this.id,stepType:"sleep-until"})||M6()}`,X=typeof $==="function"?{type:"sleepUntil",id:Y,fn:$}:{type:"sleepUntil",id:Y,date:$},G=typeof $==="function"?{type:"sleepUntil",id:Y,fn:$.toString()}:{type:"sleepUntil",id:Y,date:$};return this.stepFlow.push(X),this.serializedStepFlow.push(G),this.steps[Y]=o9({id:Y,inputSchema:U.object({}),outputSchema:U.object({}),execute:async()=>{return{}}}),this}waitForEvent($,Y,X){throw new G0({id:"WORKFLOW_WAIT_FOR_EVENT_REMOVED",domain:"MASTRA_WORKFLOW",category:"USER",text:"waitForEvent has been removed. Please use suspend & resume flow instead. See https://mastra.ai/en/docs/workflows/suspend-and-resume for more details."})}map($,Y){if(typeof $==="function"){let J=o9({id:Y?.id||`mapping_${this.#X?.generateId({idType:"step",source:"workflow",entityId:this.id,stepType:"mapping"})||M6()}`,inputSchema:U.any(),outputSchema:U.any(),execute:$});return this.stepFlow.push({type:"step",step:J}),this.serializedStepFlow.push({type:"step",step:{id:J.id,mapConfig:$.toString()?.length>1000?$.toString().slice(0,1000)+`...
}`:$.toString()}}),this}let X=Object.entries($).reduce((J,[Q,W])=>{let Z=W;if(Z.value!==void 0)J[Q]=Z;else if(Z.fn!==void 0)J[Q]={fn:Z.fn.toString(),schema:Z.schema};else if(Z.requestContextPath)J[Q]={requestContextPath:Z.requestContextPath,schema:Z.schema};else J[Q]=Z;return J},{}),G=o9({id:Y?.id||`mapping_${this.#X?.generateId({idType:"step",source:"workflow",entityId:this.id,stepType:"mapping"})||M6()}`,inputSchema:U.any(),outputSchema:U.any(),execute:async(J)=>{let{getStepResult:Q,getInitData:W,requestContext:Z}=J,K={};for(let[H,z]of Object.entries($)){let V=z;if(V.value!==void 0){K[H]=V.value;continue}if(V.fn!==void 0){K[H]=await V.fn(J);continue}if(V.requestContextPath){K[H]=Z.get(V.requestContextPath);continue}let A=V.initData?W():Q(Array.isArray(V.step)?V.step.find((D)=>{let L=Q(D);if(typeof L==="object"&&L!==null)return Object.keys(L).length>0;return L}):V.step);if(V.path==="."){K[H]=A;continue}let F=V.path.split("."),N=A;for(let D of F)if(typeof N==="object"&&N!==null)N=N[D];else throw Error(`Invalid path ${V.path} in step ${V?.step?.id??"initData"}`);K[H]=N}return K}});return this.stepFlow.push({type:"step",step:G}),this.serializedStepFlow.push({type:"step",step:{id:G.id,mapConfig:JSON.stringify(X,null,2)?.length>1000?JSON.stringify(X,null,2).slice(0,1000)+`...
}`:JSON.stringify(X,null,2)}}),this}parallel($){return this.stepFlow.push({type:"parallel",steps:$.map((Y)=>({type:"step",step:Y}))}),this.serializedStepFlow.push({type:"parallel",steps:$.map((Y)=>({type:"step",step:{id:Y.id,description:Y.description,metadata:Y.metadata,component:Y.component,serializedStepFlow:Y.serializedStepFlow,canSuspend:Boolean(Y.suspendSchema||Y.resumeSchema)}}))}),$.forEach((Y)=>{this.steps[Y.id]=Y}),this}branch($){return this.stepFlow.push({type:"conditional",steps:$.map(([Y,X])=>({type:"step",step:X})),conditions:$.map(([Y])=>Y),serializedConditions:$.map(([Y,X])=>({id:`${X.id}-condition`,fn:Y.toString()}))}),this.serializedStepFlow.push({type:"conditional",steps:$.map(([Y,X])=>({type:"step",step:{id:X.id,description:X.description,metadata:X.metadata,component:X.component,serializedStepFlow:X.serializedStepFlow,canSuspend:Boolean(X.suspendSchema||X.resumeSchema)}})),serializedConditions:$.map(([Y,X])=>({id:`${X.id}-condition`,fn:Y.toString()}))}),$.forEach(([Y,X])=>{this.steps[X.id]=X}),this}dowhile($,Y){return this.stepFlow.push({type:"loop",step:$,condition:Y,loopType:"dowhile",serializedCondition:{id:`${$.id}-condition`,fn:Y.toString()}}),this.serializedStepFlow.push({type:"loop",step:{id:$.id,description:$.description,metadata:$.metadata,component:$.component,serializedStepFlow:$.serializedStepFlow,canSuspend:Boolean($.suspendSchema||$.resumeSchema)},serializedCondition:{id:`${$.id}-condition`,fn:Y.toString()},loopType:"dowhile"}),this.steps[$.id]=$,this}dountil($,Y){return this.stepFlow.push({type:"loop",step:$,condition:Y,loopType:"dountil",serializedCondition:{id:`${$.id}-condition`,fn:Y.toString()}}),this.serializedStepFlow.push({type:"loop",step:{id:$.id,description:$.description,metadata:$.metadata,component:$.component,serializedStepFlow:$.serializedStepFlow,canSuspend:Boolean($.suspendSchema||$.resumeSchema)},serializedCondition:{id:`${$.id}-condition`,fn:Y.toString()},loopType:"dountil"}),this.steps[$.id]=$,this}foreach($,Y){let X=$;return this.stepFlow.push({type:"foreach",step:$,opts:Y??{concurrency:1}}),this.serializedStepFlow.push({type:"foreach",step:{id:$.id,description:$.description,metadata:$.metadata,component:$.component,serializedStepFlow:$.serializedStepFlow,canSuspend:Boolean(X.suspendSchema||X.resumeSchema)},opts:Y??{concurrency:1}}),this.steps[$.id]=$,this}buildExecutionGraph(){return{id:this.id,steps:this.stepFlow}}commit(){return this.executionGraph=this.buildExecutionGraph(),this.committed=!0,this}get stepGraph(){return this.stepFlow}get serializedStepGraph(){return this.serializedStepFlow}async createRun($){if(this.stepFlow.length===0)throw Error("Execution flow of workflow is not defined. Add steps to the workflow via .then(), .branch(), etc.");if(!this.executionGraph.steps)throw Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");let Y=$?.runId||this.#X?.generateId({idType:"run",source:"workflow",entityId:this.id,resourceId:$?.resourceId})||M6(),X=this.#J.get(Y)??new A80({workflowId:this.id,stateSchema:this.stateSchema,inputSchema:this.inputSchema,requestContextSchema:this.requestContextSchema,runId:Y,resourceId:$?.resourceId,executionEngine:this.executionEngine,executionGraph:this.executionGraph,mastra:this.#X,retryConfig:this.retryConfig,serializedStepGraph:this.serializedStepGraph,disableScorers:$?.disableScorers,cleanup:()=>this.#J.delete(Y),tracingPolicy:this.#Y?.tracingPolicy,workflowSteps:this.steps,validateInputs:this.#Y?.validateInputs,workflowEngineType:this.engineType,pubsub:$?.pubsub});this.#J.set(Y,X);let G=this.#Y.shouldPersistSnapshot({workflowStatus:X.workflowRunStatus,stepResults:{}}),J=await this.getWorkflowRunById(Y,{withNestedWorkflows:!1}),Q=J&&!J.isFromInMemory;if(Q&&J.status)X.workflowRunStatus=J.status;if(!Q&&G)await(await this.mastra?.getStorage()?.getStore("workflows"))?.persistWorkflowSnapshot({workflowName:this.id,runId:Y,resourceId:$?.resourceId,snapshot:{runId:Y,status:"pending",value:{},context:this.#$?{input:this.#$}:{},activePaths:[],activeStepsPath:{},serializedStepGraph:this.serializedStepGraph,suspendedPaths:{},resumeLabels:{},waitingPaths:{},result:void 0,error:void 0,timestamp:Date.now()}});return X}async listScorers({requestContext:$=new p1}={}){let Y=this.steps;if(!Y||Object.keys(Y).length===0)return{};let X={};for(let G of Object.values(Y))if(G.scorers){let J=G.scorers;if(typeof J==="function")J=await J({requestContext:$});for(let[Q,W]of Object.entries(J))X[Q]=W}return X}async execute({runId:$,resourceId:Y,inputData:X,resumeData:G,state:J,setState:Q,suspend:W,restart:Z,resume:K,timeTravel:H,[VQ]:z,mastra:V,requestContext:A,abort:F,abortSignal:N,retryCount:D,outputWriter:L,validateInputs:B,perStep:O,engine:E,bail:M,...R}){let q=$4(R);this.__registerMastra(V);let w=V?.getServer()?.fga;if(w){let u=A?.get("user");if(u){let{checkFGA:b}=await Promise.resolve().then(() => (Aj(),Vj));await b({fgaProvider:w,user:u,resource:{type:"workflow",id:this.id},permission:_z.WORKFLOWS_EXECUTE})}}let I=B??this.#Y.validateInputs??!0;this.#Y={...this.#Y||{},validateInputs:I},this.executionEngine.options={...this.executionEngine.options||{},validateInputs:I};let P=!!(K?.steps&&K.steps.length>0)||!!K?.label||!!(K?.steps&&K.steps.length===0&&(!D||D===0));if(!Z&&!P)this.#$=X;let _=!!(H&&H.steps.length>0),C=!!this.#Y?.sharePubsub,k=C?z:void 0,S=P?await this.createRun({runId:K.runId,resourceId:Y,pubsub:k}):await this.createRun({runId:$,resourceId:Y,pubsub:k}),T=()=>{F()},v=async()=>{S.abortController.signal.removeEventListener("abort",T),await S.cancel()};S.abortController.signal.addEventListener("abort",T),N.addEventListener("abort",v);let x=C?()=>{}:S.watch((u)=>{z.publish("nested-watch",{type:"nested-watch",runId:S.runId,data:{event:u,workflowId:this.id}})});if(D&&D>0&&P&&A)A.set("__mastraWorflowInputData",X);let y;try{if(_)y=await S.timeTravel({inputData:H?.inputData,resumeData:H?.resumeData,initialState:J,step:H?.steps,context:H?.nestedStepResults?.[this.id]??{},nestedStepsContext:H?.nestedStepResults,requestContext:A,...q,outputWriter:L,outputOptions:{includeState:!0,includeResumeLabels:!0},perStep:O});else if(Z)y=await S.restart({requestContext:A,...q,outputWriter:L});else if(P)y=await S.resume({resumeData:G,step:K.steps?.length>0?K.steps:void 0,requestContext:A,...q,outputWriter:L,outputOptions:{includeState:!0,includeResumeLabels:!0},label:K.label,perStep:O});else y=await S.start({inputData:X,requestContext:A,...q,outputWriter:L,initialState:J,outputOptions:{includeState:!0,includeResumeLabels:!0},perStep:O})}finally{S.abortController.signal.removeEventListener("abort",T),N.removeEventListener("abort",v),x()}let d=Object.entries(y.steps).filter(([u,b])=>{return b?.status==="suspended"});if(y.state)await Q(y.state);if(d?.length)for(let[u,b]of d){let g=[u,...b?.suspendPayload?.__workflow_meta?.path??[]];await W({...b?.suspendPayload,__workflow_meta:{runId:S.runId,path:g}},{resumeLabel:Object.keys(y.resumeLabels??{})})}if(y.status==="failed")throw y.error;if(y.status==="tripwire"){let u=y.tripwire;throw new u6(u?.reason||"Processor tripwire triggered",{retry:u?.retry,metadata:u?.metadata},u?.processorId)}return y.status==="success"?y.result:void 0}async listWorkflowRuns($){let Y=this.#X?.getStorage();if(!Y)return this.logger.debug("Cannot get workflow runs. Mastra storage is not initialized"),{runs:[],total:0};let X=await Y.getStore("workflows");if(!X)return this.logger.debug("Cannot get workflow runs. Workflows storage domain is not available"),{runs:[],total:0};return X.listWorkflowRuns({workflowName:this.id,...$??{}})}async listActiveWorkflowRuns(){let $=await this.listWorkflowRuns({status:"running"}),Y=await this.listWorkflowRuns({status:"waiting"});return{runs:[...$.runs,...Y.runs],total:$.total+Y.total}}async restartAllActiveWorkflowRuns(){if(this.engineType!=="default"){this.logger.debug("Cannot restart active workflow runs for engine type",{engineType:this.engineType});return}let $=await this.listActiveWorkflowRuns();if($.runs.length>0)this.logger.debug("Restarting active workflow runs",{count:$.runs.length});for(let Y of $.runs)try{await(await this.createRun({runId:Y.runId})).restart(),this.logger.debug("Restarted workflow run",{workflowId:this.id,runId:Y.runId})}catch(X){this.logger.error("Failed to restart workflow run",{workflowId:this.id,runId:Y.runId,error:X})}}async deleteWorkflowRunById($){let Y=this.#X?.getStorage();if(!Y){this.logger.debug("Cannot delete workflow run by ID. Mastra storage is not initialized");return}let X=await Y.getStore("workflows");if(!X){this.logger.debug("Cannot delete workflow run. Workflows storage domain is not available");return}await X.deleteWorkflowRunById({runId:$,workflowName:this.id}),this.#J.delete($)}async getWorkflowRunSteps({runId:$,workflowId:Y}){let X=this.#X?.getStorage();if(!X)return this.logger.debug("Cannot get workflow run steps. Mastra storage is not initialized"),{};let G=await X.getStore("workflows");if(!G)return this.logger.debug("Cannot get workflow run steps. Workflows storage domain is not available"),{};let Q=(await G.getWorkflowRunById({runId:$,workflowName:Y}))?.snapshot;if(!Q)return{};if(typeof Q==="string")try{Q=JSON.parse(Q)}catch(V){return this.logger.debug("Cannot get workflow run execution result. Snapshot is not a valid JSON string",{error:V}),{}}let{serializedStepGraph:W,context:Z}=Q,{input:K,...H}=Z,z={};for(let V of Object.keys(H)){let A=l24(W,V);if(z[V]=H[V],A&&A?.step?.component==="WORKFLOW"){let N=H[V]?.metadata?.nestedRunId??$,D=await this.getWorkflowRunSteps({runId:N,workflowId:V});if(D){let L=Object.entries(D).reduce((B,[O,E])=>{return B[`${V}.${O}`]=E,B},{});z={...z,...L}}}}return z}#G($){let Y=this.#J.get($);if(!Y)return null;return{runId:$,workflowName:this.id,resourceId:Y.resourceId,createdAt:new Date,updatedAt:new Date,isFromInMemory:!0,status:Y.workflowRunStatus,steps:{}}}async getWorkflowRunById($,Y={}){let{withNestedWorkflows:X=!0,fields:G}=Y,J=this.#X?.getStorage();if(!J)return this.logger.debug("Cannot get workflow run. Mastra storage is not initialized"),this.#G($);let Q=await J.getStore("workflows");if(!Q)return this.logger.debug("Cannot get workflow run. Workflows storage domain is not available"),this.#G($);let W=await Q.getWorkflowRunById({runId:$,workflowName:this.id});if(!W)return this.#G($);let Z=W.snapshot;if(typeof Z==="string")try{Z=JSON.parse(Z)}catch(F){return this.logger.debug("Cannot parse workflow run snapshot. Snapshot is not valid JSON",{error:F}),null}let K=Z,H=!G||G.length===0,z=new Set(G??[]),V={};if(H||z.has("steps")){let F;if(X)F=await this.getWorkflowRunSteps({runId:$,workflowId:this.id});else{let{input:L,...B}=K.context||{};F=B}let{__state:N,...D}=F;for(let[L,B]of Object.entries(D))V[L]=z80(B)}let A={runId:W.runId,workflowName:W.workflowName,resourceId:W.resourceId,createdAt:W.createdAt,updatedAt:W.updatedAt,status:K.status,initialState:Object.keys(K.value).length>0?K.value:void 0,result:H||z.has("result")?K.result:void 0,error:H||z.has("error")?K.error:void 0,payload:H||z.has("payload")?K.context?.input:void 0,steps:V,activeStepsPath:H||z.has("activeStepsPath")?K.activeStepsPath:void 0,serializedStepGraph:H||z.has("serializedStepGraph")?K.serializedStepGraph:void 0,suspendedPaths:H||z.has("suspendedPaths")?K.suspendedPaths:void 0,resumeLabels:H||z.has("resumeLabels")?K.resumeLabels:void 0,waitingPaths:H||z.has("waitingPaths")?K.waitingPaths:void 0,...z.has("requestContext")?{requestContext:K.requestContext}:{},...z.has("tracingContext")?{tracingContext:K.tracingContext}:{}};if(G&&G.length>0){if(A.initialState===void 0)delete A.initialState;if(A.result===void 0)delete A.result;if(A.error===void 0)delete A.error;if(A.payload===void 0)delete A.payload;if(!z.has("steps"))delete A.steps;if(A.activeStepsPath===void 0)delete A.activeStepsPath;if(A.serializedStepGraph===void 0)delete A.serializedStepGraph;if(A.suspendedPaths===void 0)delete A.suspendedPaths;if(A.resumeLabels===void 0)delete A.resumeLabels;if(A.waitingPaths===void 0)delete A.waitingPaths;if(A.requestContext===void 0)delete A.requestContext;if(A.tracingContext===void 0)delete A.tracingContext}return A}},i24=U.object({inputTokens:U.number().optional(),outputTokens:U.number().optional(),totalTokens:U.number().optional(),reasoningTokens:U.number().optional(),cachedInputTokens:U.number().optional(),cacheCreationInputTokens:U.number().optional()}),p89=U.object({reason:U.string(),warnings:U.array(U.any()),isContinued:U.boolean(),logprobs:U.any().optional(),totalUsage:i24.optional(),headers:U.record(U.string(),U.string()).optional(),messageId:U.string().optional(),request:U.record(U.string(),U.any()).optional()}),fW=U.object({messageId:U.string(),messages:U.object({all:U.array(U.any()),user:U.array(U.any()),nonUser:U.array(U.any())}),output:U.object({text:U.string().optional(),reasoning:U.array(U.any()).optional(),reasoningText:U.string().optional(),files:U.array(U.any()).optional(),toolCalls:U.array(U.any()).optional(),toolResults:U.array(U.any()).optional(),sources:U.array(U.any()).optional(),staticToolCalls:U.array(U.any()).optional(),dynamicToolCalls:U.array(U.any()).optional(),staticToolResults:U.array(U.any()).optional(),dynamicToolResults:U.array(U.any()).optional(),usage:i24,steps:U.array(U.any())}),metadata:U.object({id:U.string().optional(),model:U.string().optional(),modelId:U.string().optional(),modelMetadata:U.object({modelId:U.string(),modelVersion:U.string(),modelProvider:U.string()}).optional(),timestamp:U.date().optional(),providerMetadata:U.record(U.string(),U.any()).optional(),headers:U.record(U.string(),U.string()).optional(),request:U.record(U.string(),U.any()).optional()}),stepResult:p89,processorRetryCount:U.number().optional(),fallbackModelIndex:U.number().optional(),processorRetryFeedback:U.string().optional(),isTaskCompleteCheckFailed:U.boolean().optional(),backgroundTaskPending:U.boolean().optional()}),n24=U.object({toolCallId:U.string(),toolName:U.string(),args:U.record(U.string(),U.any()),providerMetadata:U.record(U.string(),U.any()).optional(),providerExecuted:U.boolean().optional(),output:U.any().optional()}),r24=n24.extend({result:U.any().optional(),error:U.any().optional()});xD=["v2","v3"];i89=U.object({isComplete:U.boolean().describe("Whether the task is complete"),completionReason:U.string().describe("Explanation of why the task is or is not complete"),finalResult:U.string().optional().describe("The final result text to return to the user. omit if primitive result is sufficient")});r89=U.object({finalResult:U.string().optional().describe("The final result text to return to the user, omit if primitive result is sufficient")});H99=class extends q89{#$;constructor({component:$,name:Y,generateId:X}){super({component:$,name:Y});this.#$=X??HO}async transform({runId:$,stream:Y,controller:X}){let G=new Map;for await(let J of Y){let Q=J;if(Q.type==="stream-start")G.clear();let W=J99(Q,{runId:$});if(W){if((W.type==="text-start"||W.type==="text-delta"||W.type==="text-end")&&W.payload?.id&&U99(W.payload.id)){let Z=W.payload.id;if(!G.has(Z))G.set(Z,this.#$());W.payload.id=G.get(Z)}A9(X,W)}}}};J24=class extends Error{constructor($){super($);this.name="ToolNotFoundError"}};C99=class extends u8{#$;#Y;#X;#J;constructor({mastra:$,models:Y,options:X}){super({name:"aisdk"});if(this.#X=X,$){if(this.#Y=$,$.getLogger())this.__setLogger(this.#Y.getLogger())}if(Y.length===0||!Y[0]){let G=new G0({id:"LLM_LOOP_MODELS_EMPTY",domain:"LLM",category:"USER"});throw this.logger.trackException(G),G}else this.#$=Y,this.#J=Y[0]}__registerPrimitives($){if($.logger)this.__setLogger($.logger)}__registerMastra($){this.#Y=$}getProvider(){return this.#J.model.provider}getModelId(){return this.#J.model.modelId}getModel(){return this.#J.model}convertToMessages($){if(Array.isArray($))return $.map((Y)=>{if(typeof Y==="string")return{role:"user",content:Y};return Y});return[{role:"user",content:$}]}stream({resumeContext:$,runId:Y,stopWhen:X=OT0(5),maxSteps:G,tools:J={},modelSettings:Q,toolChoice:W="auto",threadId:Z,resourceId:K,structuredOutput:H,options:z,inputProcessors:V,llmRequestInputProcessors:A,outputProcessors:F,errorProcessors:N,returnScorerData:D,providerOptions:L,messageList:B,requireToolApproval:O,toolCallConcurrency:E,_internal:M,agentId:R,agentName:q,toolCallId:w,requestContext:I,methodType:P,includeRawChunks:_,autoResumeSuspendedTools:C,maxProcessorRetries:k,processorStates:S,activeTools:T,isTaskComplete:v,onIterationComplete:x,workspace:y,...d}){let u=$4(d),b;if(G&&typeof G==="number")b=OT0(G);else b=X;let g=B.get.all.aiV5.model(),p=this.#J.model,h=u.tracingContext.currentSpan?.createChildSpan({name:`llm: '${p.modelId}'`,type:"model_generation",input:{messages:[...B.getAllSystemMessages(),...g]},attributes:{model:p.modelId,provider:p.provider,streaming:!0,parameters:Q},metadata:{runId:Y,threadId:Z,resourceId:K},tracingPolicy:this.#X?.tracingPolicy,requestContext:I});if(h)CO({span:h,fn:()=>this.logger.debug("Streaming text",{runId:Y,threadId:Z,resourceId:K,messages:g,tools:Object.keys(J||{})})});let n=h?.createTracker();try{let t={mastra:this.#Y,resumeContext:$,runId:Y,toolCallId:w,messageList:B,models:this.#$,logger:this.logger,tools:J,stopWhen:b,toolChoice:W,modelSettings:Q,providerOptions:L,_internal:M,structuredOutput:H,inputProcessors:V,llmRequestInputProcessors:A,outputProcessors:F,errorProcessors:N,returnScorerData:D,modelSpanTracker:n,requireToolApproval:O,toolCallConcurrency:E,agentId:R,agentName:q,requestContext:I,methodType:P,includeRawChunks:_,autoResumeSuspendedTools:C,maxProcessorRetries:k,processorStates:S,activeTools:T,isTaskComplete:v,onIterationComplete:x,workspace:y,...u,options:{...z,onStepFinish:async(s)=>{try{await z?.onStepFinish?.({...s,runId:Y})}catch(X0){let a=new G0({id:"LLM_STREAM_ON_STEP_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:s.model?.modelId,modelProvider:s.model?.provider,runId:Y??"unknown",threadId:Z??"unknown",resourceId:K??"unknown",finishReason:s?.finishReason,toolCalls:s?.toolCalls?JSON.stringify(s.toolCalls):"",toolResults:s?.toolResults?JSON.stringify(s.toolResults):"",usage:s?.usage?JSON.stringify(s.usage):""}},X0);throw n?.reportGenerationError({error:a}),this.logger.trackException(a),a}this.logger.debug("Stream step change",{text:s?.text,toolCalls:s?.toolCalls,toolResults:s?.toolResults,finishReason:s?.finishReason,usage:s?.usage,runId:Y});let Z0=parseInt(s?.response?.headers?.["x-ratelimit-remaining-tokens"]??"",10);if(!isNaN(Z0)&&Z0>0&&Z0<2000)this.logger.warn("Rate limit approaching, waiting 10 seconds",{runId:Y}),await y_(1e4)},onFinish:async(s)=>{n?.endGeneration({output:{files:s?.files,object:s?.object,reasoning:s?.reasoning,reasoningText:s?.reasoningText,sources:s?.sources,text:s?.text,warnings:s?.warnings},attributes:{finishReason:s?.finishReason,responseId:s?.response.id,responseModel:s?.response.modelId},usage:s?.totalUsage,providerMetadata:s?.providerMetadata});try{await z?.onFinish?.({...s,runId:Y})}catch(Z0){let X0=new G0({id:"LLM_STREAM_ON_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:s.model?.modelId,modelProvider:s.model?.provider,runId:Y??"unknown",threadId:Z??"unknown",resourceId:K??"unknown",finishReason:s?.finishReason,toolCalls:s?.toolCalls?JSON.stringify(s.toolCalls):"",toolResults:s?.toolResults?JSON.stringify(s.toolResults):"",usage:s?.usage?JSON.stringify(s.usage):""}},Z0);throw n?.reportGenerationError({error:X0}),this.logger.trackException(X0),X0}this.logger.debug("Stream finished",{text:s?.text,toolCalls:s?.toolCalls,toolResults:s?.toolResults,finishReason:s?.finishReason,usage:s?.usage,runId:Y,threadId:Z,resourceId:K})}},maxSteps:G};return T99(t)}catch(t){let s=new G0({id:"LLM_STREAM_TEXT_AI_SDK_EXECUTION_FAILED",domain:"LLM",category:"THIRD_PARTY",details:{modelId:p.modelId,modelProvider:p.provider,runId:Y??"unknown",threadId:Z??"unknown",resourceId:K??"unknown"}},t);throw n?.reportGenerationError({error:s}),s}}};S99=class extends Bg0{type="object";async processPartialChunk({accumulatedText:$,previousObject:Y}){let X=this.preprocessText($),{value:G,state:J}=await gF(X);if(this.validatePartialChunks&&this.partialSchema){let Q=this.partialSchema?.safeParse(G);if(Q.success&&Q.data&&Q.data!==void 0&&!fF(Y,Q.data))return{shouldEmit:!0,emitValue:Q.data,newPreviousResult:Q.data};return{shouldEmit:!1}}if(G!==void 0&&G!==null&&typeof G==="object"&&!fF(Y,G))return{shouldEmit:["successful-parse","repaired-parse"].includes(J),emitValue:G,newPreviousResult:G};return{shouldEmit:!1}}async validateAndTransformFinal($){if(!$)return{success:!1,error:Error("No object generated: could not parse the response.")};let Y=this.preprocessText($),{value:X}=await gF(Y);return this.validateValue(X)}},k99=class extends Bg0{type="array";textPreviousFilteredArray=[];hasEmittedInitialArray=!1;async processPartialChunk({accumulatedText:$,previousObject:Y}){let X=this.preprocessText($),{value:G,state:J}=await gF(X);if(G!==void 0&&!fF(Y,G)){let Q=G&&typeof G==="object"&&"elements"in G&&Array.isArray(G.elements)?G.elements:[],W=[];for(let Z=0;Z<Q.length;Z++){let K=Q[Z];if(Z===Q.length-1&&J!=="successful-parse"){if(K&&typeof K==="object"&&Object.keys(K).length>0)W.push(K)}else if(K&&typeof K==="object"&&Object.keys(K).length>0)W.push(K)}if(!this.hasEmittedInitialArray){if(this.hasEmittedInitialArray=!0,W.length===0)return this.textPreviousFilteredArray=[],{shouldEmit:!0,emitValue:[],newPreviousResult:G}}if(!fF(this.textPreviousFilteredArray,W))return this.textPreviousFilteredArray=[...W],{shouldEmit:!0,emitValue:W,newPreviousResult:G}}return{shouldEmit:!1}}async validateAndTransformFinal($){let Y=this.textPreviousFilteredArray;if(!Y)return{success:!1,error:Error("No object generated: could not parse the response.")};return this.validateValue(Y)}},v99=class extends Bg0{type="enum";textPreviousEnumResult;findBestEnumMatch($){if(!this.schema)return;let X=$6(this.schema)?.enum;if(!X)return;let G=X.filter((Q)=>typeof Q==="string").filter((Q)=>Q.startsWith($));if(G.length===0)return;let J=G[0];return G.length===1&&J!==void 0?J:$}async processPartialChunk({accumulatedText:$,previousObject:Y}){let X=this.preprocessText($),{value:G}=await gF(X);if(G!==void 0&&G!==null&&typeof G==="object"&&!Array.isArray(G)&&"result"in G&&typeof G.result==="string"&&!fF(Y,G)){let J=G.result,Q=this.findBestEnumMatch(J);if(J.length>0&&Q&&Q!==this.textPreviousEnumResult)return this.textPreviousEnumResult=Q,{shouldEmit:!0,emitValue:Q,newPreviousResult:G}}return{shouldEmit:!1}}async validateAndTransformFinal($){let Y=this.preprocessText($),{value:X}=await gF(Y);if(!(typeof X==="object"&&X!==null&&("result"in X)))return{success:!1,error:Error("Invalid enum format: expected object with result property")};let G=X;if(!G||typeof G!=="object"||typeof G.result!=="string")return{success:!1,error:Error("Invalid enum format: expected object with result property")};return this.validateValue(G.result)}};_X=U.enum(["agent","workflow","none","tool"]);p99=Ak0(D24(),1),K24=new Set(["background-task-completed","background-task-failed","background-task-cancelled","background-task-suspended"]);$59=new e99;X59=Ak0(D24(),1),G59=U.object({id:U.string(),title:U.string().optional(),resourceId:U.string(),createdAt:U.date(),updatedAt:U.date(),metadata:U.record(U.string(),U.any()).optional()}),J59=U.object({convertedTools:U.record(U.string(),U.any())}),Q59=U.object({threadExists:U.boolean(),thread:G59.optional(),messageList:U.instanceof(l6),processorStates:U.instanceof(Map),tripwire:U.object({reason:U.string(),retry:U.boolean().optional(),metadata:U.unknown().optional(),processorId:U.string().optional()}).optional(),initialSignalEchoes:U.array(U.custom()).optional()});YJ=class $ extends u8{id;name;source;#$;#Y;#X;model;#J;maxRetries;#G;#Q;#U;#K;#W;#H;#A;#V;#Z;#L;#O;#N;#B=null;#R;#D;#F;#P;#M;#I;#z=!1;#v;#w;#g;#E=new Map;#_;#h;#f;_agentNetworkAppend=!1;constructor(Y){super({component:AK.AGENT,rawConfig:Y.rawConfig});if(this.#f=Y,this.name=Y.name,this.id=Y.id??Y.name,this.source="code",this.#$=Y.instructions,this.#Y=Y.description,this.#X=Y.metadata,this.#_=Y.options,!Y.model){let X=new G0({id:"AGENT_CONSTRUCTOR_MODEL_REQUIRED",domain:"AGENT",category:"USER",details:{agentName:Y.name},text:"LanguageModel is required to create an Agent. Please provide the 'model'."});throw this.logger.trackException(X),X}if(Array.isArray(Y.model)){if(Y.model.length===0){let X=new G0({id:"AGENT_CONSTRUCTOR_MODEL_ARRAY_EMPTY",domain:"AGENT",category:"USER",details:{agentName:Y.name},text:"Model array is empty. Please provide at least one model."});throw this.logger.trackException(X),X}this.model=Y.model.map((X)=>$.toFallbackEntry(X,Y?.maxRetries??0)),this.#J=[...this.model]}else this.model=Y.model,this.#J=Y.model;if(this.maxRetries=Y.maxRetries??0,Y.workflows)this.#K=Y.workflows;if(this.#W=Y.defaultGenerateOptionsLegacy||{},this.#H=Y.defaultStreamOptionsLegacy||{},this.#A=Y.defaultOptions||{},this.#V=Y.defaultNetworkOptions||{},this.#g=q60(Y.transform??Y.toolPayloadProjection),this.#Z=Y.tools||{},Y.mastra)this.__registerMastra(Y.mastra),this.__registerPrimitives({logger:Y.mastra.getLogger()});if(this.#L=Y.scorers||{},this.#O=Y.agents||{},Y.memory)this.#Q=Y.memory;if(Y.skillsFormat)this.#U=Y.skillsFormat;if(Y.voice){if(this.#N=Y.voice,typeof Y.tools!=="function")this.#N?.addTools(this.#Z);if(typeof Y.instructions==="string")this.#N?.addInstructions(Y.instructions)}else this.#N=new IT0;if(Y.channels){if(Y.channels instanceof oZ4)this.#B=Y.channels,this.#B.__setAgent(this);else if("adapters"in Y.channels&&Y.channels.adapters&&Object.keys(Y.channels.adapters).length>0){let X=Y.channels;this.#B=new oZ4({...X,userName:X.userName??Y.name}),this.#B.__setAgent(this)}}if(Y.browser){if(Y.browser.providerType!=="sdk"){let X=new G0({id:"AGENT_INVALID_BROWSER_PROVIDER",domain:"AGENT",category:"USER",details:{agentName:Y.name,providerType:Y.browser.providerType},text:`Agent.browser requires an SDK provider (providerType: 'sdk'), but received '${Y.browser.providerType}'. Use @mastra/agent-browser or @mastra/stagehand for Agent.browser. For CLI providers like @mastra/browser-viewer, use Workspace.browser instead.`});throw this.logger.trackException(X),X}this.#I=Y.browser,this.#z=!0}if(Y.workspace)this.#R=Y.workspace;if(Y.inputProcessors)this.#D=Y.inputProcessors;if(Y.outputProcessors)this.#F=Y.outputProcessors;if(Y.maxProcessorRetries!==void 0)this.#P=Y.maxProcessorRetries;if(Y.errorProcessors)this.#M=Y.errorProcessors;if(Y.requestContextSchema)this.#v=W4(Y.requestContextSchema);if(Y.backgroundTasks)this.#w=Y.backgroundTasks;this._agentNetworkAppend=Y._agentNetworkAppend||!1}getMastraInstance(){return this.#G}getBackgroundTasksConfig(){return this.#w}__getStaticAgents(){if(typeof this.#O==="function")return;return this.#O}__hasSubAgentsConfigured(){if(typeof this.#O==="function")return!0;let Y=this.#O;return!!Y&&Object.keys(Y).length>0}disableBackgroundTasks(){this.#w={...this.#w??{},disabled:!0}}enableBackgroundTasks(){if(this.#w)this.#w={...this.#w,disabled:!1}}async deriveSubAgentBackgroundConfig(Y,X){try{let G=Y.getBackgroundTasksConfig?.();if(G?.disabled!==!0&&G?.tools){if(G.tools==="all")return{enabled:!0,waitTimeoutMs:G.waitTimeoutMs};if(Object.values(G.tools).some((Q)=>{if(typeof Q==="boolean")return Q;return Q?.enabled===!0}))return{enabled:!0,waitTimeoutMs:G.waitTimeoutMs}}if(Y instanceof $){let J=await Y.getToolsForExecution({requestContext:X});if(J&&typeof J==="object"){for(let Q of Object.values(J))if(Q?.background?.enabled===!0)return{enabled:!0,waitTimeoutMs:G?.waitTimeoutMs}}}}catch{}return}getChannels(){return this.#B}setChannels(Y){if(this.#B&&this.#B!==Y)this.logger?.debug(`Replacing existing AgentChannels on agent "${this.name}"`);this.#B=Y,Y.__setAgent(this)}get browser(){return this.#I}setBrowser(Y){this.#I=Y,this.#z=!0}hasOwnBrowser(){return this.#z}async getSkillsProcessors(Y,X){let G=await this.getWorkspace({requestContext:X||new p1});if(!G?.skills)return[];let J=z24(Y),Q=V24(Y);if(J||Q)return[];return[new L24({workspace:G,format:this.#U})]}async getWorkspaceInstructionsProcessors(Y,X){let G=await this.getWorkspace({requestContext:X||new p1});if(!G)return[];if(!G.filesystem&&!G.sandbox)return[];if(Y.some((Q)=>!V9(Q)&&("id"in Q)&&Q.id==="workspace-instructions-processor"))return[];return[new B24({workspace:G})]}async#j(Y){if(this.#v){let X=Y?.all??{},G=await this.#v["~standard"].validate(X);if(G.issues){let Q=G.issues.map((W)=>{return`- ${W.path?.map((K)=>typeof K==="object"?K.key:K).join(".")}: ${W.message}`}).join(`
`);throw new G0({id:"AGENT_REQUEST_CONTEXT_VALIDATION_FAILED",domain:"AGENT",category:"USER",text:`Request context validation failed for agent '${this.id}':
${Q}`,details:{agentId:this.id,agentName:this.name}})}}}listAgents({requestContext:Y=new p1}={}){let X=this.#O?typeof this.#O==="function"?this.#O({requestContext:Y}):this.#O:{};return eZ(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_AGENTS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based agents returned empty value`});throw this.logger.trackException(J),J}return Object.entries(G||{}).forEach(([J,Q])=>{if(this.#G)Q.__registerMastra?.(this.#G)}),G})}async getProcessorRunner({requestContext:Y,inputProcessorOverrides:X,outputProcessorOverrides:G,errorProcessorOverrides:J,processorStates:Q}){let W=await this.listResolvedInputProcessors(Y,X),Z=await this.listResolvedOutputProcessors(Y,G),K=J??(this.#M?typeof this.#M==="function"?await this.#M({requestContext:Y}):this.#M:[]);return new A5({inputProcessors:W,outputProcessors:Z,errorProcessors:K,logger:this.logger,agentName:this.name,processorStates:Q})}combineProcessorsIntoWorkflow(Y,X){if(Y.length===0)return[];if(Y.length===1&&V9(Y[0])){let Q=Y[0];if(!Q.type)Q.type="processor";return[Q]}let G=Y.filter((Q)=>V9(Q)||em(Q));if(G.length===0)return[];if(G.length===1&&V9(G[0])){let Q=G[0];if(!Q.type)Q.type="processor";return[Q]}let J=TQ({id:X,inputSchema:Gg,outputSchema:Gg,type:"processor",options:{validateInputs:!1,tracingPolicy:{internal:1}}});J.__setLogger(this.logger);for(let[Q,W]of G.entries()){let Z;if(V9(W))Z=W;else{let K=W;K.processorIndex=Q,Z=o9(K);let H=K;if(typeof H.getLoadedToolsForRequestContext==="function")Z.getLoadedToolsForRequestContext=H.getLoadedToolsForRequestContext.bind(K)}J=J.then(Z)}return[J.commit()]}async listResolvedOutputProcessors(Y,X){let G=X?X:this.#F?typeof this.#F==="function"?await this.#F({requestContext:Y||new p1}):this.#F:[],J=await this.getMemory({requestContext:Y||new p1}),Q=J?await J.getOutputProcessors(G,Y):[],W=[...G,...Q];return this.combineProcessorsIntoWorkflow(W,`${this.id}-output-processor`)}async resolveInputProcessors(Y,X){let G=X?X:this.#D?typeof this.#D==="function"?await this.#D({requestContext:Y||new p1}):this.#D:[],J=await this.getMemory({requestContext:Y||new p1}),Q=J?await J.getInputProcessors(G,Y):[],W=await this.getWorkspaceInstructionsProcessors(G,Y),Z=await this.getSkillsProcessors(G,Y),K=this.#B?this.#B.getInputProcessors(G):[],H=this.#I?this.#I.getInputProcessors(G):[];return[...Q,...W,...Z,...K,...H,...G]}async listResolvedInputProcessors(Y,X){let G=await this.resolveInputProcessors(Y,X);return this.combineProcessorsIntoWorkflow(G,`${this.id}-input-processor`)}async listResolvedLLMRequestProcessors(Y,X){return this.resolveInputProcessors(Y,X)}async listInputProcessors(Y){return this.listResolvedInputProcessors(Y)}async listOutputProcessors(Y){return this.listResolvedOutputProcessors(Y)}async listErrorProcessors(Y){if(!this.#M)return[];return typeof this.#M==="function"?await this.#M({requestContext:Y}):this.#M}async resolveProcessorById(Y,X){let G=X||new p1,J=this.#D?typeof this.#D==="function"?await this.#D({requestContext:G}):this.#D:[],Q=await this.getMemory({requestContext:G}),W=Q?await Q.getInputProcessors(J,G):[];for(let H of[...W,...J])if(!V9(H)&&em(H)&&H.id===Y)return H;let Z=this.#F?typeof this.#F==="function"?await this.#F({requestContext:G}):this.#F:[],K=Q?await Q.getOutputProcessors(Z,G):[];for(let H of[...K,...Z])if(!V9(H)&&em(H)&&H.id===Y)return H;return null}async listConfiguredInputProcessors(Y){if(!this.#D)return[];return typeof this.#D==="function"?await this.#D({requestContext:Y||new p1}):this.#D}async listConfiguredOutputProcessors(Y){if(!this.#F)return[];return typeof this.#F==="function"?await this.#F({requestContext:Y||new p1}):this.#F}async getConfiguredProcessorIds(Y){let X=Y||new p1,G=[];if(this.#D)G=(typeof this.#D==="function"?await this.#D({requestContext:X}):this.#D).map((Z)=>Z.id).filter(Boolean);let J=[];if(this.#F)J=(typeof this.#F==="function"?await this.#F({requestContext:X}):this.#F).map((Z)=>Z.id).filter(Boolean);let Q=[];if(this.#M)Q=(typeof this.#M==="function"?await this.#M({requestContext:X}):this.#M).map((Z)=>Z.id).filter(Boolean);return{inputProcessorIds:G,outputProcessorIds:J,errorProcessorIds:Q}}async getConfiguredProcessorWorkflows(){let Y=[];if(this.#D){let X=typeof this.#D==="function"?await this.#D({requestContext:new p1}):this.#D,G=this.combineProcessorsIntoWorkflow(X,`${this.id}-input-processor`);for(let J of G)if(V9(J))Y.push(J)}if(this.#F){let X=typeof this.#F==="function"?await this.#F({requestContext:new p1}):this.#F,G=this.combineProcessorsIntoWorkflow(X,`${this.id}-output-processor`);for(let J of G)if(V9(J))Y.push(J)}return Y}hasOwnMemory(){return Boolean(this.#Q)}async getMemory({requestContext:Y=new p1}={}){if(!this.#Q)return;let X;if(typeof this.#Q!=="function")X=this.#Q;else{let G=this.#Q({requestContext:Y,mastra:this.#G});if(X=await Promise.resolve(G),!X){let J=new G0({id:"AGENT_GET_MEMORY_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based memory returned empty value`});throw this.logger.trackException(J),J}}if(this.#G&&X){if(X.__registerMastra(this.#G),!X.hasOwnStorage){let G=this.#G.getStorage();if(G)X.setStorage(G)}}return X}hasOwnWorkspace(){return Boolean(this.#R)}async getWorkspace({requestContext:Y=new p1}={}){if(this.#R){if(typeof this.#R!=="function")return this.#k(this.#R),this.#R;let G=this.#R({requestContext:Y,mastra:this.#G}),J=await Promise.resolve(G);if(!J){if(!this.#z)this.#I=void 0;return}if(J.__setLogger(this.logger),this.#G)this.#G.addWorkspace(J,void 0,{source:"agent",agentId:this.id,agentName:this.name});return this.#k(J),J}let X=this.#G?.getWorkspace();if(X)this.#k(X);else if(!this.#z)this.#I=void 0;return X}#k(Y){if(this.#z)return;this.#I=Y.browser}get voice(){if(typeof this.#$==="function"){let Y=new G0({id:"AGENT_VOICE_INCOMPATIBLE_WITH_FUNCTION_INSTRUCTIONS",domain:"AGENT",category:"USER",details:{agentName:this.name},text:"Voice is not compatible when instructions are a function. Please use getVoice() instead."});throw this.logger.trackException(Y),Y}return this.#N}get requestContextSchema(){return this.#v}async listWorkflows({requestContext:Y=new p1}={}){let X;if(typeof this.#K==="function")X=await Promise.resolve(this.#K({requestContext:Y,mastra:this.#G}));else X=this.#K??{};return Object.entries(X||{}).forEach(([G,J])=>{if(this.#G)J.__registerMastra(this.#G)}),X}async listScorers({requestContext:Y=new p1}={}){if(typeof this.#L!=="function")return this.#L;let X=this.#L({requestContext:Y,mastra:this.#G});return eZ(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_SCORERS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based scorers returned empty value`});throw this.logger.trackException(J),J}return G})}async getVoice({requestContext:Y}={}){if(this.#N){let X=this.#N;X?.addTools(await this.listTools({requestContext:Y}));let G=await this.getInstructions({requestContext:Y});return X?.addInstructions(this.#b(G)),X}else return new IT0}getInstructions({requestContext:Y=new p1}={}){if(typeof this.#$==="function"){let X=this.#$({requestContext:Y,mastra:this.#G});return eZ(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_INSTRUCTIONS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:"Instructions are required to use an Agent. The function-based instructions returned an empty value."});throw this.logger.trackException(J),J}return G})}return this.#$}#b(Y){if(typeof Y==="string")return Y;if(Array.isArray(Y))return Y.map((X)=>{if(typeof X==="string")return X;return typeof X.content==="string"?X.content:""}).filter((X)=>X).join(`

`);return typeof Y.content==="string"?Y.content:""}getDescription(){return this.#Y??""}getMetadata({requestContext:Y=new p1}={}){if(this.#X===void 0)return;if(typeof this.#X!=="function")return this.#X;let X=this.#X({requestContext:Y,mastra:this.#G});return eZ(X,(G)=>G)}getLegacyHandler(){if(!this.#h)this.#h=new d99({logger:this.logger,name:this.name,id:this.id,mastra:this.#G,getDefaultGenerateOptionsLegacy:this.getDefaultGenerateOptionsLegacy.bind(this),getDefaultStreamOptionsLegacy:this.getDefaultStreamOptionsLegacy.bind(this),hasOwnMemory:this.hasOwnMemory.bind(this),getInstructions:async(Y)=>{return await this.getInstructions(Y)},getLLM:this.getLLM.bind(this),getMemory:this.getMemory.bind(this),convertTools:this.convertTools.bind(this),getMemoryMessages:(...Y)=>this.getMemoryMessages(...Y),__runInputProcessors:this.__runInputProcessors.bind(this),__runProcessInputStep:this.__runProcessInputStep.bind(this),getMostRecentUserMessage:this.getMostRecentUserMessage.bind(this),genTitle:this.genTitle.bind(this),resolveTitleGenerationConfig:this.resolveTitleGenerationConfig.bind(this),convertInstructionsToString:this.#b.bind(this),tracingPolicy:this.#_?.tracingPolicy,resolvedVersionId:this.toRawConfig()?.resolvedVersionId,_agentNetworkAppend:this._agentNetworkAppend,listResolvedOutputProcessors:this.listResolvedOutputProcessors.bind(this),__runOutputProcessors:this.__runOutputProcessors.bind(this),runScorers:this.#C.bind(this)});return this.#h}getDefaultGenerateOptionsLegacy({requestContext:Y=new p1}={}){if(typeof this.#W!=="function")return this.#W;let X=this.#W({requestContext:Y,mastra:this.#G});return eZ(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_DEFAULT_GENERATE_OPTIONS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based default generate options returned empty value`});throw this.logger.trackException(J),J}return G})}getDefaultStreamOptionsLegacy({requestContext:Y=new p1}={}){if(typeof this.#H!=="function")return this.#H;let X=this.#H({requestContext:Y,mastra:this.#G});return eZ(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_DEFAULT_STREAM_OPTIONS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based default stream options returned empty value`});throw this.logger.trackException(J),J}return G})}getDefaultOptions({requestContext:Y=new p1}={}){if(typeof this.#A!=="function")return this.#A;let X=this.#A({requestContext:Y,mastra:this.#G});return eZ(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_DEFAULT_OPTIONS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based default options returned empty value`});throw this.logger.trackException(J),J}return G})}getDefaultNetworkOptions({requestContext:Y=new p1}={}){if(typeof this.#V!=="function")return this.#V;let X=this.#V({requestContext:Y,mastra:this.#G});return eZ(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_DEFAULT_NETWORK_OPTIONS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based default network options returned empty value`});throw this.logger.trackException(J),J}return G})}listTools({requestContext:Y=new p1}={}){if(typeof this.#Z!=="function")return m80(this.#Z);let X=this.#Z({requestContext:Y,mastra:this.#G});return eZ(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_TOOLS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based tools returned empty value`});throw this.logger.trackException(J),J}return m80(G)})}getLLM({requestContext:Y=new p1,model:X}={}){return(X?this.resolveModelSelection(X,Y):this.resolveModelSelection(this.model,Y)).then((J)=>{let Q=Array.isArray(J)?J.find((Z)=>Z.enabled)?.model:J;if(!Q){let Z=new G0({id:"AGENT_GET_LLM_NO_ENABLED_MODELS",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - No enabled models found in model list`});throw this.logger.trackException(Z),Z}let W=this.resolveModelConfig(Q,Y);return eZ(W,(Z)=>{let K;if(KG(Z)){let H=Array.isArray(J)?J.filter((z)=>z.enabled):J;K=this.prepareModels(Y,H).then((z)=>{return new C99({models:z,mastra:this.#G,options:{tracingPolicy:this.#_?.tracingPolicy}})})}else K=new hY4({model:Z,mastra:this.#G,options:{tracingPolicy:this.#_?.tracingPolicy}});return eZ(K,(H)=>{if(this.#q)H.__registerPrimitives(this.#q);if(this.#G)H.__registerMastra(this.#G);return H})})})}async resolveModelConfig(Y,X){try{return await PE(Y,X,this.#G)}catch(G){let J=new G0({id:"AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",domain:"AGENT",category:"USER",details:{agentName:this.name,originalError:G instanceof Error?G.message:String(G)},text:`[Agent:${this.name}] - Failed to resolve model configuration`});throw this.logger.trackException(J),J}}isModelFallbacks(Y){if(Y.length===0)return!1;return Y.every((X)=>typeof X.id==="string"&&typeof X.model<"u"&&typeof X.maxRetries==="number"&&typeof X.enabled==="boolean")}normalizeModelFallbacks(Y){if(this.isModelFallbacks(Y))return Y;return Y.map((X)=>$.toFallbackEntry(X,this.maxRetries??0))}static toFallbackEntry(Y,X){return{id:Y.id??M6(),model:Y.model,maxRetries:Y.maxRetries??X,enabled:Y.enabled??!0,modelSettings:Y.modelSettings,providerOptions:Y.providerOptions,headers:Y.headers}}assertSupportsPreparedModels(Y){if(!KG(Y)){let X=new G0({id:"AGENT_PREPARE_MODELS_INCOMPATIBLE_WITH_MODEL_ARRAY_V1",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Only v2/v3 models are allowed when an array of models is provided`});throw this.logger.trackException(X),X}}async resolveModelSelection(Y,X){if(typeof Y==="function"){let G=await Y({requestContext:X,mastra:this.#G});if(Array.isArray(G)){if(G.length===0){let J=new G0({id:"AGENT_RESOLVE_MODEL_EMPTY_ARRAY",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Dynamic function returned empty model array`});throw this.logger.trackException(J),J}return this.normalizeModelFallbacks(G)}return G}if(Array.isArray(Y)){if(Y.length===0){let G=new G0({id:"AGENT_RESOLVE_MODEL_EMPTY_ARRAY",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Empty model array provided`});throw this.logger.trackException(G),G}return this.normalizeModelFallbacks(Y)}return Y}getModel({requestContext:Y=new p1,modelConfig:X=this.model}={}){return this.resolveModelSelection(X,Y).then((G)=>{if(!Array.isArray(G))return this.resolveModelConfig(G,Y);let J=G.find((Q)=>Q.enabled);if(!J){let Q=new G0({id:"AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - No enabled models found in model list`});throw this.logger.trackException(Q),Q}return this.resolveModelConfig(J.model,Y)})}async getModelList(Y=new p1){if(typeof this.model==="function"){let X=await this.resolveModelSelection(this.model,Y);if(!Array.isArray(X))return null;return this.prepareModels(Y,X)}if(!Array.isArray(this.model))return null;return this.prepareModels(Y)}__updateInstructions(Y){this.#$=Y}__updateModel({model:Y}){this.model=Y,this.logger.debug(`[Agents:${this.name}] Model updated.`,{model:this.model,name:this.name})}__resetToOriginalModel(){this.model=Array.isArray(this.#J)?[...this.#J]:this.#J}__getOverridableFields(){return{instructions:this.#$,model:this.model,tools:this.#Z,workspace:this.#R}}reorderModels(Y){if(!Array.isArray(this.model)){this.logger.warn("Model is not an array",{agent:this.name});return}this.model=this.model.sort((X,G)=>{let J=Y.indexOf(X.id),Q=Y.indexOf(G.id);return(J===-1?1/0:J)-(Q===-1?1/0:Q)})}updateModelInModelList({id:Y,model:X,enabled:G,maxRetries:J}){if(!Array.isArray(this.model)){this.logger.warn("Model is not an array",{agent:this.name});return}let Q=this.model;if(!Q.find((Z)=>Z.id===Y)){this.logger.warn("Model not found",{agent:this.name,modelId:Y});return}this.model=Q.map((Z)=>{if(Z.id===Y)return{...Z,model:X??Z.model,enabled:G??Z.enabled,maxRetries:J??Z.maxRetries};return Z})}#q;__registerPrimitives(Y){if(Y.logger)this.__setLogger(Y.logger);this.#q=Y}__registerMastra(Y){if(this.#G=Y,this.#R&&typeof this.#R!=="function")this.#R.__setLogger(this.logger);if(this.#Z&&typeof this.#Z==="object")Object.entries(this.#Z).forEach(([X,G])=>{try{if(G&&typeof G==="object"&&"id"in G){let J=typeof G.id==="string"?G.id:X;Y.addTool(G,J)}}catch(J){if(J instanceof G0&&J.id!=="MASTRA_ADD_TOOL_DUPLICATE_KEY")throw J}});if(this.#D&&Array.isArray(this.#D))this.#D.forEach((X)=>{try{Y.addProcessor(X)}catch(G){if(G instanceof G0&&G.id!=="MASTRA_ADD_PROCESSOR_DUPLICATE_KEY")throw G}Y.addProcessorConfiguration(X,this.id,"input")});if(this.#F&&Array.isArray(this.#F))this.#F.forEach((X)=>{try{Y.addProcessor(X)}catch(G){if(G instanceof G0&&G.id!=="MASTRA_ADD_PROCESSOR_DUPLICATE_KEY")throw G}Y.addProcessorConfiguration(X,this.id,"output")})}__setTools(Y){this.#Z=Y}__fork(){let Y=new $({...this.#f,rawConfig:this.toRawConfig()});if(this.#G&&!this.#f.mastra)Y.#G=this.#G;if(this.#q)Y.#q=this.#q;return Y.source=this.source,Y._agentNetworkAppend=this._agentNetworkAppend,Y}formatMessagePartsForTitle(Y,X){let G=[];for(let J of Y)if(J.type==="text")G.push(`${X}: ${J.text}`);else if(J.type==="tool-invocation"){let Q=J.toolInvocation;if(Q.state==="result"){let W=typeof Q.result==="string"?Q.result:JSON.stringify(Q.result);G.push(`Tool Result ${Q.toolName}: ${W.slice(0,200)}`)}else G.push(`Tool Call ${Q.toolName}: ${JSON.stringify(Q.args).slice(0,200)}`)}else if(J.type==="reasoning"){if(J.reasoning)G.push(`Reasoning: ${J.reasoning}`)}else if(J.type==="source-url")G.push(`${X}: User added URL: ${J.url.substring(0,100)}`);else if(J.type==="file")G.push(`${X}: User added ${J.mediaType} file: ${J.url.slice(0,100)}`);return G}formatMessagesForTitle(Y){let X=[];for(let G of Y){let J=G.role.charAt(0).toUpperCase()+G.role.slice(1);if(typeof G.content==="string"&&G.content)X.push(`${J}: ${G.content}`);if(G.parts&&Array.isArray(G.parts)&&G.parts.length>0)X.push(...this.formatMessagePartsForTitle(G.parts,J))}return X.join(`
`)}async generateTitleFromUserMessage({message:Y,messages:X,requestContext:G=new p1,model:J,instructions:Q,...W}){let Z=$4(W),K=await this.getLLM({requestContext:G,model:J}),H;if(X&&X.length>0)H=this.formatMessagesForTitle(X);else if(Y){let F=new l6().add(Y,"user").get.all.aiV5.ui().at(-1);if(!F)throw Error(`Could not generate title from input ${JSON.stringify(Y)}`);H=this.formatMessagesForTitle([F])}else throw Error("Either message or messages must be provided");if(!H)return;let z=await this.resolveTitleInstructions(G,Q),V="";if(KG(K.getModel())){let F=new l6().add([{role:"system",content:z}],"system").add([{role:"user",content:H}],"input");V=await K.stream({methodType:"generate",requestContext:G,...Z,messageList:F,agentId:this.id,agentName:this.name}).text}else V=(await K.__text({requestContext:G,...Z,messages:[{role:"system",content:z},{role:"user",content:H}]})).text;return V.replace(/<think>[\s\S]*?<\/think>/g,"").trim()}getMostRecentUserMessage(Y){return Y.filter((G)=>G.role==="user").at(-1)}async genTitle(Y,X,G,J,Q,W){try{if(W&&W.length>0)return await this.generateTitleFromUserMessage({messages:W,requestContext:X,...G,model:J,instructions:Q});if(Y){let Z=new l6().add(Y,"user").get.all.ui().at(-1);if(Z)return await this.generateTitleFromUserMessage({message:Z,requestContext:X,...G,model:J,instructions:Q})}return}catch(Z){this.logger.error("Error generating title",{agent:this.name,error:Z});return}}__setMemory(Y){this.#Q=Y}__setWorkspace(Y){if(this.#R=Y,this.#G&&Y&&typeof Y!=="function")Y.__setLogger(this.logger),this.#G.addWorkspace(Y,void 0,{source:"agent",agentId:this.id,agentName:this.name})}async listMemoryTools({runId:Y,resourceId:X,threadId:G,requestContext:J,mastraProxy:Q,memoryConfig:W,autoResumeSuspendedTools:Z,backgroundTaskEnabled:K,...H}){let z=$4(H),V={};if(this._agentNetworkAppend)return this.logger.debug("Skipping memory tools (agent network context)",{agent:this.name,runId:Y}),V;let A=await this.getMemory({requestContext:J});if(!G&&!X)return this.logger.debug("Skipping memory tools (no thread or resource context)",{agent:this.name,runId:Y}),V;let F=A?.listTools?.(W);if(F)for(let[N,D]of Object.entries(F)){let L=D,B={name:N,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:Q,memory:A,agentName:this.name,agentId:this.id,requestContext:J,...z,model:await this.getModel({requestContext:J}),tracingPolicy:this.#_?.tracingPolicy,requireApproval:L.requireApproval,backgroundConfig:L.background},O=VY(L,B,void 0,Z,K);V[N]=O}return V}async listWorkspaceTools({runId:Y,resourceId:X,threadId:G,requestContext:J,mastraProxy:Q,autoResumeSuspendedTools:W,backgroundTaskEnabled:Z,...K}){let H=$4(K),z={};if(this._agentNetworkAppend)return this.logger.debug("Skipping workspace tools (agent network context)",{agent:this.name,runId:Y}),z;let V=await this.getWorkspace({requestContext:J});if(!V)return z;let A=await hi1(V,{requestContext:J?Object.fromEntries(J.entries()):{},workspace:V});if(Object.keys(A).length>0){this.logger.debug("Adding workspace tools",{agent:this.name,tools:Object.keys(A),runId:Y});for(let[F,N]of Object.entries(A)){let D=N,L={name:F,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:Q,agentName:this.name,agentId:this.id,requestContext:J,...H,model:await this.getModel({requestContext:J}),tracingPolicy:this.#_?.tracingPolicy,requireApproval:D.requireApproval,backgroundConfig:D.background,workspace:V},B=VY(D,L,void 0,W,Z);z[F]=B}}return z}async listChannelTools({runId:Y,resourceId:X,threadId:G,requestContext:J,mastraProxy:Q,autoResumeSuspendedTools:W,backgroundTaskEnabled:Z,...K}){let H=$4(K),z={};if(!this.#B)return z;let V=this.#B.getTools();if(Object.keys(V).length>0){let A=await this.getMemory({requestContext:J});for(let[F,N]of Object.entries(V)){let D={name:F,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:Q,memory:A,agentName:this.name,requestContext:J,...H,tracingPolicy:this.#_?.tracingPolicy};z[F]=VY(N,D,void 0,W,Z)}}return z}async listSkillTools({runId:Y,resourceId:X,threadId:G,requestContext:J,mastraProxy:Q,autoResumeSuspendedTools:W,backgroundTaskEnabled:Z,suppressEagerSkillTools:K,...H}){let z=$4(H),V={};if(this._agentNetworkAppend)return V;let A=await this.getWorkspace({requestContext:J});if(!A?.skills)return V;let F=wi1(A.skills);if(Object.keys(F).length>0){this.logger.debug("Adding skill tools",{agent:this.name,tools:Object.keys(F),runId:Y});for(let[N,D]of Object.entries(F)){if(K&&(N==="skill"||N==="skill_search"))continue;let L=D,B={name:N,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:Q,agentName:this.name,agentId:this.id,requestContext:J,...z,model:await this.getModel({requestContext:J}),tracingPolicy:this.#_?.tracingPolicy,requireApproval:!1,backgroundConfig:L.background,workspace:A},O=VY(L,B,void 0,W,Z);V[N]=O}}return V}async listBrowserTools({runId:Y,resourceId:X,threadId:G,requestContext:J,autoResumeSuspendedTools:Q,backgroundTaskEnabled:W,...Z}){let K=$4(Z),H={};if(this._agentNetworkAppend)return H;if(!this.#I)return H;let z=this.#I.getTools();if(Object.keys(z).length>0){this.logger.debug(`[Agent:${this.name}] - Adding browser tools: ${Object.keys(z).join(", ")}`,{runId:Y});for(let[V,A]of Object.entries(z)){let F=A,N={name:V,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:void 0,agentName:this.name,agentId:this.id,requestContext:J,...K,model:await this.getModel({requestContext:J}),tracingPolicy:this.#_?.tracingPolicy,requireApproval:F.requireApproval,backgroundConfig:F.background},D=VY(F,N,void 0,Q,W);H[V]=D}}return H}async listInputProcessorLoadedTools({processors:Y,runId:X,resourceId:G,threadId:J,requestContext:Q,mastraProxy:W,outputWriter:Z,autoResumeSuspendedTools:K,backgroundTaskEnabled:H,...z}){let V=$4(z),A={},F=async(N)=>{if(V9(N))for(let M of H59(N))await F(M);let D=N;if(typeof D.getLoadedToolsForRequestContext!=="function")return;let L=await D.getLoadedToolsForRequestContext({requestContext:Q});if(!L||Object.keys(L).length===0)return;let B=await this.getWorkspace({requestContext:Q}),O=await this.getMemory({requestContext:Q}),E=await this.getModel({requestContext:Q});for(let[M,R]of Object.entries(L))if(Uf(R)||NO(R))A[M]=VY(R,{name:M,runId:X,threadId:J,resourceId:G,logger:this.logger,mastra:W,memory:O,agentName:this.name,agentId:this.id,requestContext:Q,...V,model:E,outputWriter:Z,tracingPolicy:this.#_?.tracingPolicy,requireApproval:R.requireApproval,backgroundConfig:R.background,workspace:B},void 0,K,H);else A[M]=R};for(let N of Y)await F(N);return A}async __runInputProcessors({requestContext:Y,messageList:X,inputProcessorOverrides:G,processorStates:J,...Q}){let W;if(G?.length||this.#D||this.#Q||this.#R||this.#G?.getWorkspace()||this.#I||this.#B){let Z=await this.getProcessorRunner({requestContext:Y,inputProcessorOverrides:G,processorStates:J});try{X=await Z.runInputProcessors(X,Q,Y,0)}catch(K){if(K instanceof u6)W={reason:K.message,retry:K.options?.retry,metadata:K.options?.metadata,processorId:K.processorId},this.logger.warn("Input processor tripwire triggered",{agent:this.name,reason:K.message,processorId:K.processorId,retry:K.options?.retry});else throw new G0({id:"AGENT_INPUT_PROCESSOR_ERROR",domain:"AGENT",category:"USER",text:`[Agent:${this.name}] - Input processor error`},K)}}return{messageList:X,tripwire:W}}async __runProcessInputStep(Y){let{requestContext:X,messageList:G,stepNumber:J=0,inputProcessorOverrides:Q,processorStates:W,tools:Z,runId:K,threadId:H,resourceId:z,outputWriter:V,autoResumeSuspendedTools:A,backgroundTaskEnabled:F,...N}=Y,D=$4(N),L,B=Z;if(Q?.length||this.#D||this.#Q){let O=await this.getProcessorRunner({requestContext:X,inputProcessorOverrides:Q,processorStates:W});try{let M=(await this.getLLM({requestContext:X})).getModel(),R=await O.runProcessInputStep({messageList:G,stepNumber:J,steps:[],...D,requestContext:X,model:M,tools:Z,retryCount:0});if(R.tools){let q=await this.getWorkspace({requestContext:X}),w=await this.getMemory({requestContext:X}),I=this.#G?u80({mastra:this.#G,logger:this.logger}):void 0,P={};for(let[_,C]of Object.entries(R.tools))if(Uf(C)||NO(C))P[_]=VY(C,{name:_,runId:K,threadId:H,resourceId:z,logger:this.logger,mastra:I,memory:w,agentName:this.name,agentId:this.id,requestContext:X,...D,model:await this.getModel({requestContext:X}),outputWriter:V,tracingPolicy:this.#_?.tracingPolicy,requireApproval:C.requireApproval,backgroundConfig:C.background,workspace:q},void 0,A,F);else P[_]=C;B=P}}catch(E){if(E instanceof u6)L={reason:E.message,retry:E.options?.retry,metadata:E.options?.metadata,processorId:E.processorId},this.logger.warn("Input step processor tripwire triggered",{agent:this.name,reason:E.message,processorId:E.processorId,retry:E.options?.retry});else throw new G0({id:"AGENT_INPUT_STEP_PROCESSOR_ERROR",domain:"AGENT",category:"USER",text:`[Agent:${this.name}] - Input step processor error`},E)}}return{messageList:G,tools:B,tripwire:L}}async __runOutputProcessors({requestContext:Y,messageList:X,outputProcessorOverrides:G,...J}){let Q;if(G?.length||this.#F||this.#Q){let W=await this.getProcessorRunner({requestContext:Y,outputProcessorOverrides:G});try{X=await W.runOutputProcessors(X,J,Y)}catch(Z){if(Z instanceof u6)Q={reason:Z.message,retry:Z.options?.retry,metadata:Z.options?.metadata,processorId:Z.processorId},this.logger.warn("Output processor tripwire triggered",{agent:this.name,reason:Z.message,processorId:Z.processorId,retry:Z.options?.retry});else throw Z}}return{messageList:X,tripwire:Q}}async getMemoryMessages({resourceId:Y,threadId:X,vectorMessageSearch:G,memoryConfig:J,requestContext:Q}){let W=await this.getMemory({requestContext:Q});if(!W)return{messages:[]};let Z=W.getMergedThreadConfig(J||{});if(!Z.lastMessages&&!Z.semanticRecall)return{messages:[]};return W.recall({threadId:X,resourceId:Y,...typeof Z.lastMessages==="number"?{perPage:Z.lastMessages}:{},threadConfig:J,vectorSearchString:Z.semanticRecall&&G?G:void 0})}async listAssignedTools({runId:Y,resourceId:X,threadId:G,requestContext:J,mastraProxy:Q,outputWriter:W,autoResumeSuspendedTools:Z,backgroundTaskEnabled:K,...H}){let z=$4(H),V={},A=await this.getMemory({requestContext:J}),F=await this.listTools({requestContext:J}),N=Object.entries(F||{}),D=await Promise.all(N.map(async([B,O])=>{if(!O)return;let E={name:B,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:Q,memory:A,agentName:this.name,agentId:this.id,requestContext:J,...z,model:await this.getModel({requestContext:J}),outputWriter:W,tracingPolicy:this.#_?.tracingPolicy,requireApproval:O.requireApproval,backgroundConfig:O.background};return[B,VY(O,E,void 0,Z,K)]}));return V={...Object.fromEntries(D.filter((B)=>Boolean(B)))},V}async listToolsets({runId:Y,threadId:X,resourceId:G,toolsets:J,requestContext:Q,mastraProxy:W,autoResumeSuspendedTools:Z,backgroundTaskEnabled:K,...H}){let z=$4(H),V={},A=await this.getMemory({requestContext:Q}),F=Object.values(J||{});if(F.length>0){this.logger.debug("Adding tools from toolsets",{agent:this.name,toolsets:Object.keys(J||{}),runId:Y});for(let N of F)for(let[D,L]of Object.entries(N)){let B=L,O={name:D,runId:Y,threadId:X,resourceId:G,logger:this.logger,mastra:W,memory:A,agentName:this.name,agentId:this.id,requestContext:Q,...z,model:await this.getModel({requestContext:Q}),tracingPolicy:this.#_?.tracingPolicy,requireApproval:B.requireApproval,backgroundConfig:B.background},E=VY(B,O,"toolset",Z,K);V[D]=E}}return V}async listClientTools({runId:Y,threadId:X,resourceId:G,requestContext:J,mastraProxy:Q,clientTools:W,autoResumeSuspendedTools:Z,backgroundTaskEnabled:K,...H}){let z=$4(H),V={},A=await this.getMemory({requestContext:J}),F=Object.entries(W||{});if(F.length>0){this.logger.debug("Adding client tools",{agent:this.name,tools:Object.keys(W||{}),runId:Y});for(let[N,D]of F){let{execute:L,...B}=D,O=NO(D)?D:B,E={name:N,runId:Y,threadId:X,resourceId:G,logger:this.logger,mastra:Q,memory:A,agentName:this.name,agentId:this.id,requestContext:J,...z,model:await this.getModel({requestContext:J}),tracingPolicy:this.#_?.tracingPolicy,requireApproval:D.requireApproval,backgroundConfig:D.background},M=VY(O,E,"client-tool",Z,K);V[N]=M}}return V}stripParentToolParts(Y){return Y.map((X)=>{if(X.role==="assistant"){let G=X.content,J=Array.isArray(G)?G:G?.parts;if(!Array.isArray(J))return X;let Q=J.filter((W)=>W?.type!=="tool-call");if(Q.length===0)return null;if(Array.isArray(G))return{...X,content:Q};return{...X,content:{...G,parts:Q}}}if(X.role==="tool")return null;return X}).filter((X)=>Boolean(X))}async listAgentTools({runId:Y,threadId:X,resourceId:G,requestContext:J,methodType:Q,autoResumeSuspendedTools:W,delegation:Z,backgroundTaskEnabled:K,...H}){let z=$4(H),V={},A=await this.listAgents({requestContext:J});if(Object.keys(A).length>0)for(let[F,N]of Object.entries(A)){let D=U.object({prompt:U.string().describe("The prompt to send to the agent"),threadId:U.string().nullish().describe("Thread ID for conversation continuity for memory messages"),resourceId:U.string().nullish().describe("Resource/user identifier for memory messages"),instructions:U.string().nullish().describe("Additional instructions to append to the agent instructions. Only provide if you have specific guidance beyond what the agent already knows. Leave empty in most cases."),maxSteps:U.number().min(3).nullish().describe("Maximum number of execution steps for the sub-agent")}),L=U.object({text:U.string().describe("The response from the agent"),subAgentThreadId:U.string().describe("The thread ID of the agent").optional(),subAgentResourceId:U.string().describe("The resource ID of the agent").optional(),subAgentToolResults:U.array(U.object({toolName:U.string().describe("The name of the tool"),toolCallId:U.string().describe("The ID of the tool call"),result:U.unknown().describe("The result of the tool call"),args:U.unknown().describe("The arguments of the tool call").optional(),isError:U.boolean().describe("Whether the tool call resulted in an error").optional()})).describe("The results from the agent's tool calls").optional()}),B=Z?.includeSubAgentToolResultsInModelContext?void 0:(R)=>({type:"text",value:R.text}),O=X8({id:`agent-${F}`,description:N.getDescription()||`Agent: ${F}`,inputSchema:D,outputSchema:L,mastra:this.#G,...B?{toModelOutput:B}:{},execute:async(R,q)=>{let w=Date.now(),I=q?.agent?.toolCallId||M6(),P=q?.agent?.messages||[],_=this.stripParentToolParts(P),C=_,k=Math.max(1,_.filter((a)=>a.role==="assistant").length),S={primitiveId:N.id,primitiveType:"agent",prompt:R.prompt,params:{threadId:R.threadId||void 0,resourceId:R.resourceId||void 0,instructions:R.instructions||void 0,maxSteps:R.maxSteps||void 0},iteration:k,runId:Y||M6(),threadId:X,resourceId:G,parentAgentId:this.id,parentAgentName:this.name,toolCallId:I,messages:_},T=await Promise.resolve().then(() => (sf0(),cZ4)),v=R.threadId?`${R.threadId}-${M6()}`:q?.mastra?.generateId({idType:"thread",source:"agent",entityId:F,resourceId:G})||M6(),x=R.resourceId?`${R.resourceId}-${F}`:q?.mastra?.generateId({idType:"generic",source:"agent",entityId:F})||`${T.default(this.id)}-${F}`,y=J.get("MastraMemory"),d=J.get(DX),u=J.get(eX);if(d!==void 0)J.delete(DX);if(u!==void 0)J.delete(eX);let b=N,p=J.get(vh)?.agents?.[N.id];if(p&&this.#G&&N instanceof $)try{b=await this.#G.resolveVersionedAgent(N,p)}catch(a){this.logger.warn("Failed to resolve versioned sub-agent, using code-defined default",{agent:this.name,targetAgent:F,targetAgentId:N.id,versionSelector:p,error:a})}let h=(await b.getModel({requestContext:J})).specificationVersion,t=("getDefaultOptions"in b?await b.getDefaultOptions({requestContext:J}):{})?.memory!==void 0;if((Q==="generate"||Q==="generateLegacy"||Q==="stream"||Q==="streamLegacy")&&xD.includes(h)){if(!b.hasOwnMemory()&&this.#Q)b.__setMemory(this.#Q)}let{prompt:s,instructions:Z0,maxSteps:X0}=R;if(Z?.onDelegationStart)try{let a=await Z.onDelegationStart(S);if(a){if(a.proceed===!1){let Q0=a.rejectionReason||"Delegation rejected by onDelegationStart hook";if(this.logger.debug("Delegation rejected",{agent:this.name,targetAgent:F,reason:Q0}),(Q==="stream"||Q==="streamLegacy")&&xD.includes(h))await q.writer?.write({type:"text-delta",payload:{id:M6(),text:`[Delegation Rejected] ${Q0}`},runId:Y,from:"AGENT"});let e=await b.getMemory({requestContext:J});if(e)try{let m={id:this.#G?.generateId()||M6(),role:"user",type:"text",createdAt:new Date,threadId:v,resourceId:x,content:{format:2,parts:[{type:"text",text:s}]}},$0={id:this.#G?.generateId()||M6(),role:"assistant",type:"text",createdAt:new Date(new Date().getTime()+1),threadId:v,resourceId:x,content:{format:2,parts:[{type:"text",text:`[Delegation Rejected] ${Q0}`}]}};await e.createThread({resourceId:x,threadId:v}),await e.saveMessages({messages:[m,$0]})}catch(m){this.logger.error("Failed to save rejection to sub-agent memory",{agent:this.name,error:m})}if(d!==void 0)J.set(DX,d);if(u!==void 0)J.set(eX,u);return{text:`[Delegation Rejected] ${Q0}`,subAgentThreadId:v,subAgentResourceId:x}}if(a.modifiedPrompt!==void 0)s=a.modifiedPrompt;if(a.modifiedInstructions!==void 0)Z0=a.modifiedInstructions;if(a.modifiedMaxSteps!==void 0)X0=a.modifiedMaxSteps}}catch(a){this.logger.error("onDelegationStart hook error",{agent:this.name,error:a})}if(this.logger.debug("Delegation accepted",{agent:this.name,targetAgent:F,modifiedPrompt:s!==R.prompt,modifiedInstructions:Z0!==R.instructions,modifiedMaxSteps:X0!==R.maxSteps}),Z0){let a=await b.getInstructions({requestContext:J});if(a){let Q0=this.#b(a);if(Q0)Z0=`${Q0}

${Z0}`}}try{this.logger.debug("Executing agent as tool",{agent:this.name,targetAgent:F,args:R,runId:Y,threadId:X,resourceId:G});let a,Q0=R.suspendedToolRunId,{resumeData:e,suspend:m}=q?.agent??{},$0=_;if(Z?.messageFilter)try{$0=await Z.messageFilter({messages:_,primitiveId:N.id,primitiveType:"agent",prompt:s,iteration:k,runId:Y||M6(),threadId:X,resourceId:G,parentAgentId:this.id,parentAgentName:this.name,toolCallId:I})}catch(A0){this.logger.error("messageFilter error",{agent:this.name,error:A0})}let Y0=[{role:"user",content:s}],K0=new Date;if((Q==="generate"||Q==="generateLegacy")&&xD.includes(h)){let A0=e?await b.resumeGenerate(e,{runId:Q0,requestContext:J,...$4(q??{}),...Z0&&{instructions:Z0},...X0&&{maxSteps:X0},context:$0,...G&&X&&!t?{memory:{resource:x,thread:v,options:{lastMessages:!1}}}:{},disableBackgroundTasks:!0}):await b.generate(Y0,{requestContext:J,...$4(q??{}),...Z0&&{instructions:Z0},...X0&&{maxSteps:X0},context:$0,...G&&X&&!t?{memory:{resource:x,thread:v,options:{lastMessages:!1}}}:{},disableBackgroundTasks:!0}),D0=A0.response.dbMessages??[],O0=A0.toolResults?.map((g0)=>({toolName:g0.payload.toolName,toolCallId:g0.payload.toolCallId,result:g0.payload.result,args:g0.payload.args,isError:g0.payload.isError}));C=[{id:this.#G?.generateId()||M6(),role:"user",type:"text",createdAt:K0,threadId:v,resourceId:x,content:{format:2,parts:[{type:"text",text:s}]}},...D0];let I0=await b.getMemory({requestContext:J});if(I0)try{await I0.createThread({resourceId:x,threadId:v}),await I0.saveMessages({messages:C})}catch(g0){this.logger.error("Failed to save messages to sub-agent memory",{agent:this.name,error:g0})}if(A0.finishReason==="suspended"){if(d!==void 0)J.set(DX,d);if(u!==void 0)J.set(eX,u);return m?.(A0.suspendPayload,{resumeSchema:A0.resumeSchema,runId:A0.runId,isAgentSuspend:!0})}a={text:A0.text,subAgentThreadId:v,subAgentResourceId:x,subAgentToolResults:O0}}else if((Q==="generate"||Q==="generateLegacy")&&h==="v1"){if(typeof b.generateLegacy!=="function")throw Error(`Sub-agent ${N.id} returned a v1 model but does not implement generateLegacy`);a={text:(await b.generateLegacy(Y0,{requestContext:J,...$4(q??{}),context:$0})).text}}else if((Q==="stream"||Q==="streamLegacy")&&xD.includes(h)){let A0=e?await b.resumeStream(e,{runId:Q0,requestContext:J,...$4(q??{}),...Z0&&{instructions:Z0},...X0&&{maxSteps:X0},context:$0,...G&&X&&!t?{memory:{resource:x,thread:v,options:{lastMessages:!1}}}:{},disableBackgroundTasks:!0}):await b.stream(Y0,{requestContext:J,...$4(q??{}),...Z0&&{instructions:Z0},...X0&&{maxSteps:X0},context:$0,...G&&X&&!t?{memory:{resource:x,thread:v,options:{lastMessages:!1}}}:{},disableBackgroundTasks:!0}),D0,O0,R0;for await(let d1 of A0.fullStream)if(q?.writer)if(d1.type.startsWith("data-")){if(await q.writer.custom(d1),d1.type==="data-tool-call-approval")O0={},D0=!0;if(d1.type==="data-tool-call-suspended")O0=d1.data.suspendPayload,R0=d1.data.resumeSchema}else{if(await q.writer.write(d1),d1.type==="tool-call-approval")O0={},D0=!0;if(d1.type==="tool-call-suspended")O0=d1.payload.suspendPayload,R0=d1.payload.resumeSchema}let I0=(await A0.toolResults)?.map((d1)=>({toolName:d1.payload.toolName,toolCallId:d1.payload.toolCallId,result:d1.payload.result,args:d1.payload.args,isError:d1.payload.isError})),g0=A0.messageList.get.response.db();C=[{id:this.#G?.generateId()||M6(),role:"user",type:"text",createdAt:K0,threadId:v,resourceId:x,content:{format:2,parts:[{type:"text",text:s}]}},...g0];let U4=await b.getMemory({requestContext:J});if(U4)try{await U4.createThread({resourceId:x,threadId:v}),await U4.saveMessages({messages:C})}catch(d1){this.logger.error("Failed to save messages to sub-agent memory",{agent:this.name,error:d1})}if(D0||O0||R0){if(d!==void 0)J.set(DX,d);if(u!==void 0)J.set(eX,u);return m?.(O0,{resumeSchema:R0,requireToolApproval:D0,runId:A0.runId,isAgentSuspend:!0})}a={text:await A0.text,subAgentThreadId:v,subAgentResourceId:x,subAgentToolResults:I0}}else{if(typeof b.streamLegacy!=="function")throw Error(`Sub-agent ${N.id} returned a v1 model but does not implement streamLegacy`);let A0=await b.streamLegacy(s,{requestContext:J,...$4(q??{})}),D0="";for await(let O0 of A0.fullStream){if(q?.writer)if(O0.type.startsWith("data-"))await q.writer.custom(O0);else await q.writer.write(O0);if(O0.type==="text-delta")D0+=O0.textDelta}a={text:D0}}if(Z?.onDelegationComplete)try{let A0=!1,D0={primitiveId:N.id,primitiveType:"agent",prompt:s,result:a,duration:Date.now()-w,success:!0,iteration:k,runId:Y||M6(),toolCallId:I,parentAgentId:this.id,parentAgentName:this.name,messages:C,bail:()=>{A0=!0}},O0=await Z.onDelegationComplete(D0);if(A0)J.set("__mastra_delegationBailed",!0);if(O0?.feedback){let R0={id:this.#G?.generateId()||M6(),role:"assistant",type:"text",createdAt:new Date,content:{format:2,parts:[{type:"text",text:O0.feedback}],metadata:{mode:"stream",completionResult:{suppressFeedback:!0}}},threadId:X,resourceId:G},I0=await this.getMemory({requestContext:J});if(I0)try{await I0.saveMessages({messages:[R0]})}catch(g0){this.logger.error("Failed to save feedback to supervisor memory",{agent:this.name,error:g0})}}}catch(A0){this.logger.error("onDelegationComplete hook error",{agent:this.name,error:A0})}if(y!==void 0)J.set("MastraMemory",y);if(d!==void 0)J.set(DX,d);if(u!==void 0)J.set(eX,u);return a}catch(a){let Q0=!1;if(Z?.onDelegationComplete)try{let m={primitiveId:N.id,primitiveType:"agent",prompt:s,result:{text:""},duration:Date.now()-w,success:!1,error:a instanceof Error?a:Error(String(a)),iteration:k,runId:Y||M6(),toolCallId:I,parentAgentId:this.id,parentAgentName:this.name,messages:C,bail:()=>{Q0=!0}},$0=await Z.onDelegationComplete(m);if(Q0)J.set("__mastra_delegationBailed",!0);if($0?.feedback){let Y0={id:this.#G?.generateId()||M6(),role:"assistant",type:"text",createdAt:new Date,content:{format:2,parts:[{type:"text",text:$0.feedback}],metadata:{mode:"stream",completionResult:{suppressFeedback:!0}}},threadId:X,resourceId:G},K0=await this.getMemory({requestContext:J});if(K0)try{await K0.saveMessages({messages:[Y0]})}catch(A0){this.logger.error("Failed to save feedback to supervisor memory",{agent:this.name,error:A0})}}}catch(m){this.logger.error("onDelegationComplete hook error on failure",{agent:this.name,error:m})}if(y!==void 0)J.set("MastraMemory",y);if(d!==void 0)J.set(DX,d);if(u!==void 0)J.set(eX,u);let e=new G0({id:"AGENT_AGENT_TOOL_EXECUTION_FAILED",domain:"AGENT",category:"USER",details:{agentName:this.name,subAgentName:N.name??N.id,runId:Y||"",threadId:X||"",resourceId:G||""},text:`[Agent:${this.name}] - Failed agent tool execution for ${F}`},a);throw this.logger.trackException(e),e}}}),E=await this.deriveSubAgentBackgroundConfig(N,J),M={name:`agent-${F}`,runId:Y,threadId:X,resourceId:G,logger:this.logger,mastra:this.#G,memory:await this.getMemory({requestContext:J}),agentName:this.name,agentId:this.id,requestContext:J,model:await this.getModel({requestContext:J}),...z,tracingPolicy:this.#_?.tracingPolicy,backgroundConfig:E};V[`agent-${F}`]=VY(O,M,void 0,W,K)}return V}async listWorkflowTools({runId:Y,threadId:X,resourceId:G,requestContext:J,methodType:Q,autoResumeSuspendedTools:W,backgroundTaskEnabled:Z,...K}){let H=$4(K),z={},V=await this.listWorkflows({requestContext:J});if(Object.keys(V).length>0)for(let[A,F]of Object.entries(V)){let D={inputData:F.inputSchema?$6(F.inputSchema,{io:"input"}):{type:"object",additionalProperties:!0}},L=["inputData"];if(F.stateSchema)D.initialState=$6(F.stateSchema,{io:"input"});let B={type:"object",properties:D,required:L,additionalProperties:!0},O={runId:{type:"string",description:"Unique identifier for the workflow run"}};if(F.outputSchema)O.result=$6(F.outputSchema,{io:"output"});let E={anyOf:[{type:"object",properties:O,required:["runId"]},{type:"object",properties:{runId:{type:"string",description:"Unique identifier for the workflow run"},error:{type:"string",description:"Error message if workflow execution failed"}},required:["runId","error"]}]},M=X8({id:`workflow-${A}`,description:F.description||`Workflow: ${A}`,inputSchema:B,outputSchema:E,mastra:this.#G,execute:async(q,w)=>{let I=J.get("MastraMemory");try{let{initialState:P,inputData:_,suspendedToolRunId:C}=q,k=C||M6();this.logger.debug("Executing workflow as tool",{agent:this.name,workflow:A,description:F.description,args:q,runId:k,threadId:X,resourceId:G});let S=await F.createRun({runId:k,resourceId:G}),{resumeData:T,suspend:v}=w?.agent??{},x=void 0;if(Q==="generate"||Q==="generateLegacy")if(T)x=await S.resume({resumeData:T,requestContext:J,...$4(w??{})});else x=await S.start({inputData:_,requestContext:J,...$4(w??{}),...P&&{initialState:P}});else if(Q==="streamLegacy"){let y=S.streamLegacy({inputData:_,requestContext:J,...$4(w??{})});if(w?.writer)await y.stream.pipeTo(w.writer);else for await(let d of y.stream);x=await y.getWorkflowState()}else if(Q==="stream"){let y=T?S.resumeStream({resumeData:T,requestContext:J,...$4(w??{})}):S.stream({inputData:_,requestContext:J,...$4(w??{}),...P&&{initialState:P}});if(w?.writer)await y.fullStream.pipeTo(w.writer);x=await y.result}if(I!==void 0)J.set("MastraMemory",I);if(x?.status==="success")return{result:x?.result||x,runId:S.runId};else if(x?.status==="failed"){let y=x?.error;return{error:y?.message||String(y)||"Workflow execution failed",runId:S.runId}}else if(x?.status==="suspended"){let y=x?.suspended?.[0]?.[0],d=x?.steps?.[y]?.suspendPayload,u=x?.suspended?.map((n)=>n.join(".")),b=[...x?.suspended?.[0]??[]],g=F;while(b.length>0){let n=b.shift();if(n){if(!g.steps[n]){this.logger.warn("Suspended step not found in workflow",{agent:this.name,step:n,workflow:A});break}g=g.steps[n]}}let p=g?.resumeSchema;if(d?.__workflow_meta)delete d.__workflow_meta;let h=p?W4(p):void 0;return v?.(d,{resumeLabel:u,resumeSchema:h?JSON.stringify($6(h)):void 0,runId:k})}else return{error:"Workflow should never reach this path, workflow returned no status",runId:S.runId}}catch(P){if(I!==void 0)J.set("MastraMemory",I);let _=new G0({id:"AGENT_WORKFLOW_TOOL_EXECUTION_FAILED",domain:"AGENT",category:"USER",details:{agentName:this.name,runId:q.suspendedToolRunId||Y||"",threadId:X||"",resourceId:G||""},text:`[Agent:${this.name}] - Failed workflow tool execution`},P);throw this.logger.trackException(_),_}}}),R={name:`workflow-${A}`,runId:Y,threadId:X,resourceId:G,logger:this.logger,mastra:this.#G,memory:await this.getMemory({requestContext:J}),agentName:this.name,agentId:this.id,requestContext:J,model:await this.getModel({requestContext:J}),...H,tracingPolicy:this.#_?.tracingPolicy};z[`workflow-${A}`]=VY(M,R,void 0,W,Z)}return z}async getToolsForExecution(Y){let X=Y.requestContext??new p1;return this.convertTools({...Y,requestContext:X,methodType:"stream"})}async convertTools({toolsets:Y,clientTools:X,threadId:G,resourceId:J,runId:Q,requestContext:W,outputWriter:Z,methodType:K,memoryConfig:H,autoResumeSuspendedTools:z,delegation:V,backgroundTaskEnabled:A,inputProcessors:F,...N}){let D=$4(N),L=void 0,B=this.logger;if(this.#G)L=u80({mastra:this.#G,logger:B});let O=await this.listAssignedTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:L,outputWriter:Z,autoResumeSuspendedTools:z,backgroundTaskEnabled:A}),E=await this.listMemoryTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:L,memoryConfig:H,autoResumeSuspendedTools:z,backgroundTaskEnabled:A}),M=await this.listToolsets({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:L,toolsets:Y,autoResumeSuspendedTools:z,backgroundTaskEnabled:A}),R=await this.listClientTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:L,clientTools:X,autoResumeSuspendedTools:z,backgroundTaskEnabled:A}),q=await this.listAgentTools({runId:Q,resourceId:J,threadId:G,requestContext:W,methodType:K,...D,autoResumeSuspendedTools:z,delegation:V}),w=await this.listWorkflowTools({runId:Q,resourceId:J,threadId:G,requestContext:W,methodType:K,...D,autoResumeSuspendedTools:z}),I=await this.listWorkspaceTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:L,autoResumeSuspendedTools:z,backgroundTaskEnabled:A}),P=F??await this.listConfiguredInputProcessors(W),_=V24(P),C=z24(P),k=await this.listSkillTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:L,autoResumeSuspendedTools:z,backgroundTaskEnabled:A,suppressEagerSkillTools:_&&!C}),S=await this.listChannelTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:L,autoResumeSuspendedTools:z,backgroundTaskEnabled:A}),T=await this.listBrowserTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,autoResumeSuspendedTools:z,backgroundTaskEnabled:A}),v=await this.listInputProcessorLoadedTools({processors:P,runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:L,outputWriter:Z,autoResumeSuspendedTools:z,backgroundTaskEnabled:A}),x={...O,...E,...M,...R,...q,...w,...I,...k,...S,...T,...v};return this.formatTools(x)}formatTools(Y){let X=/[^a-zA-Z0-9_\-]/g,G=/[a-zA-Z_]/;for(let J of Object.keys(Y))if(Y[J]&&(J.length>63||J.match(X)||!J[0].match(G))){let Q=J.replace(X,"_");if(!Q[0].match(G))Q="_"+Q;if(Q=Q.slice(0,63),Y[Q]){let W=new G0({id:"AGENT_TOOL_NAME_COLLISION",domain:"AGENT",category:"USER",details:{agentName:this.name,toolName:Q},text:`Two or more tools resolve to the same name "${Q}". Please rename one of the tools to avoid this collision.`});throw this.logger.trackException(W),W}Y[Q]=Y[J],delete Y[J]}return Y}async#C({messageList:Y,runId:X,requestContext:G,structuredOutput:J,overrideScorers:Q,threadId:W,resourceId:Z,...K}){let H={};try{H=Q?this.resolveOverrideScorerReferences(Q):await this.listScorers({requestContext:G})}catch(A){this.logger.warn("Failed to get scorers",{agent:this.name,error:A});return}let z={inputMessages:Y.getPersisted.input.db(),rememberedMessages:Y.getPersisted.remembered.db(),systemMessages:Y.getSystemMessages(),taggedSystemMessages:Y.getPersisted.taggedSystemMessages},V=Y.getPersisted.response.db();if(Object.keys(H||{}).length>0)for(let[A,F]of Object.entries(H))f24({scorerId:F.scorer.id,scorerObject:F,runId:X,input:z,output:V,requestContext:G,entity:{id:this.id,name:this.name},source:"LIVE",entityType:"AGENT",structuredOutput:!!J,threadId:W,resourceId:Z,...K})}resolveOverrideScorerReferences(Y){let X={};for(let[G,J]of Object.entries(Y))if(typeof J.scorer==="string")try{if(!this.#G)throw new G0({id:"AGENT_GENEREATE_SCORER_NOT_FOUND",domain:"AGENT",category:"USER",text:"Mastra not found when fetching scorer. Make sure to fetch agent from mastra.getAgent()"});let Q=this.#G.getScorerById(J.scorer);X[G]={scorer:Q,sampling:J.sampling}}catch(Q){this.logger.warn("Failed to get scorer",{agent:this.name,scorer:J.scorer,error:Q})}else X[G]=J;if(Object.keys(X).length===0&&Object.keys(Y).length>0)throw new G0({id:"AGENT_GENEREATE_SCORER_NOT_FOUND",domain:"AGENT",category:"USER",text:"No scorers found in overrideScorers"});return X}async prepareModels(Y,X){let G=X??await this.resolveModelSelection(this.model,Y);if(!Array.isArray(G)){let Q=await this.resolveModelConfig(G,Y);this.assertSupportsPreparedModels(Q);let W;if(Q instanceof IE)W=Q.config?.headers;return[{id:"main",model:Q,maxRetries:this.maxRetries??0,enabled:!0,headers:W}]}return await Promise.all(G.map(async(Q)=>{let W=await this.resolveModelConfig(Q.model,Y);this.assertSupportsPreparedModels(W);let Z=Q.id||W.modelId;if(!Z){let N=new G0({id:"AGENT_PREPARE_MODELS_MISSING_MODEL_ID",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Unable to determine model ID. Please provide an explicit ID in the model configuration.`});throw this.logger.trackException(N),N}let K;if(W instanceof IE)K=W.config?.headers;let H=Q.enabled??!0,[z,V,A]=H?await Promise.all([this.resolveFallbackDynamic(Q.modelSettings,Y),this.resolveFallbackDynamic(Q.providerOptions,Y),this.resolveFallbackDynamic(Q.headers,Y)]):[void 0,void 0,void 0],F=K||A?{...K??{},...A??{}}:void 0;return{id:Z,model:W,maxRetries:Q.maxRetries??0,enabled:H,headers:F,modelSettings:z,providerOptions:V}}))}async resolveFallbackDynamic(Y,X){if(Y===void 0)return;if(typeof Y==="function")return await Y({requestContext:X,mastra:this.#G});return Y}async#x({runId:Y,method:X}){let G=await this.#G?.getStorage()?.getStore("workflows"),J=await G?.loadWorkflowSnapshot({workflowName:"agentic-loop",runId:Y});if(!J){let Q=!!G;throw new G0({id:"AGENT_RESUME_NO_SNAPSHOT_FOUND",domain:"AGENT",category:"USER",text:`Agent "${this.name}" ${X}() could not find a suspended run for runId "${Y}". `+(Q?"The run may have already completed, never suspended, or the runId is invalid. ":"No storage is configured on this Mastra instance, so workflow snapshots cannot be persisted. Register the agent on a Mastra instance with persistent storage (e.g. PostgreSQL, LibSQL). ")+`Ensure you are calling ${X}() only with a runId from a currently-suspended run.`,details:{runId:Y,agentName:this.name,hasStorage:Q}})}return J}async#S({methodType:Y,resumeContext:X,...G}){let J=X?.snapshot,Q;if(J)for(let v in J?.context){let x=J?.context[v];if(x&&x.status==="suspended"&&x.suspendPayload?.__streamState){Q=x.suspendPayload?.__streamState?.messageList?.memoryInfo;break}}let W=G.requestContext||new p1,Z=W.get(vh),K=g10(this.#G?.getVersionOverrides(),Z);if(G.versions)K=g10(K,G.versions);if(K)W.set(vh,K);let H=await this.getWorkspace({requestContext:W}),z=this.#I??H?.browser;if(z&&!W.has("browser")){let v=G.memory?.thread,x=typeof v==="string"?v:v?.id,y=W.get(DX)||x||Q?.threadId,d=y?z.hasThreadSession(y)&&z.isBrowserRunning(y):z.isBrowserRunning(),u={provider:z.provider,providerType:z.providerType,sessionId:z.getSessionId(y),headless:z.headless,currentUrl:d?await z.getCurrentUrl(y)??void 0:void 0,cdpUrl:z.providerType==="cli"&&d?z.getCdpUrl(y)??void 0:void 0};W.set("browser",u)}let V=W.get(eX),A=W.get(DX),F=Lg0({memory:{...G.memory,thread:G.memory?.thread||Q?.threadId},overrideId:A}),N=V||G.memory?.resource||Q?.resourceId,D=G.memory?.options,L=await this.getLLM({requestContext:W,model:G.model}),B=L.getModel(),O=typeof B==="object"&&B!==null&&"gatewayId"in B&&B.gatewayId==="mastra";if(N&&F&&!this.hasOwnMemory()&&!O)this.logger.warn("No memory is configured but resourceId and threadId were passed in args",{agent:this.name});if("structuredOutput"in G&&G.structuredOutput?.schema&&!G.structuredOutput?.model){let v=L.getModel(),x=v.provider,y=v.modelId;if(x.includes("openai")||y?.includes("openai"))G={...G,structuredOutput:{...G.structuredOutput,schema:z44(G.structuredOutput.schema)}}}let E=G.runId||this.#G?.generateId({idType:"run",source:"agent",entityId:this.id,threadId:F?.id,resourceId:N})||M6(),M=G.instructions||await this.getInstructions({requestContext:W}),R=wW({type:"agent_run",name:`agent run: '${this.id}'`,entityType:J6.AGENT,entityId:this.id,entityName:this.name,input:G.messages,attributes:{conversationId:F?.id,instructions:this.#b(M),...this.toRawConfig()?.resolvedVersionId?{resolvedVersionId:this.toRawConfig().resolvedVersionId}:{}},metadata:{runId:E,resourceId:N,threadId:F?.id,...this.toRawConfig()?.resolvedVersionId?{entityVersionId:this.toRawConfig().resolvedVersionId}:{}},tracingPolicy:this.#_?.tracingPolicy,tracingOptions:G.tracingOptions,tracingContext:G.tracingContext,requestContext:W,mastra:this.#G}),q=await this.getMemory({requestContext:W}),w=H,I=new c99({logger:this.logger,memory:q}),P={agent:this,agentName:this.name,logger:this.logger,getMemory:this.getMemory.bind(this),getModel:this.getModel.bind(this),generateMessageId:this.#G?.generateId?.bind(this.#G)||(()=>M6()),mastra:this.#G,_agentNetworkAppend:"_agentNetworkAppend"in this?Boolean(this._agentNetworkAppend):void 0,convertTools:this.convertTools.bind(this),getMemoryMessages:this.getMemoryMessages.bind(this),runInputProcessors:this.__runInputProcessors.bind(this),executeOnFinish:this.#u.bind(this),inputProcessors:async({requestContext:v,overrides:x})=>this.listResolvedInputProcessors(v,x),llmRequestInputProcessors:async({requestContext:v,overrides:x})=>this.listResolvedLLMRequestProcessors(v,x),outputProcessors:async({requestContext:v,overrides:x})=>this.listResolvedOutputProcessors(v,x),errorProcessors:async({requestContext:v,overrides:x})=>x??(this.#M?typeof this.#M==="function"?await this.#M({requestContext:v}):this.#M:[]),llm:L},_=q60(G.transform??G.toolPayloadProjection)??this.#g??q60(this.#G?.getToolPayloadTransform?.()??this.#G?.getToolPayloadProjection?.()),k=await U59({capabilities:P,options:{...G,methodType:Y},threadFromArgs:F,resourceId:N,runId:E,requestContext:W,agentSpan:R,methodType:Y,instructions:M,memoryConfig:D,memory:q,saveQueueManager:I,returnScorerData:G.returnScorerData,requireToolApproval:G.requireToolApproval,toolCallConcurrency:G.toolCallConcurrency,resumeContext:X,agentId:this.id,agentName:this.name,toolCallId:G.toolCallId,workspace:w,toolPayloadTransform:_,...G.disableBackgroundTasks?{}:{backgroundTaskManager:this.#G?.backgroundTaskManager,agentBackgroundConfig:this.#w},skipBgTaskWait:G._skipBgTaskWait,drainPendingSignals:this.#y().drainPendingSignals.bind(this.#y())}).createRun(),S=g4({currentSpan:R});return await k.start({...S})}async#u({result:Y,readOnlyMemory:X,thread:G,threadId:J,resourceId:Q,memoryConfig:W,outputText:Z,requestContext:K,agentSpan:H,runId:z,messageList:V,threadExists:A,structuredOutput:F=!1,overrideScorers:N}){let D=g4({currentSpan:H}),L={text:Y.text,object:Y.object,toolResults:Y.toolResults,toolCalls:Y.toolCalls,usage:Y.usage,steps:Y.steps.map((q)=>{return{stepType:q.stepType,text:q.text,toolResults:q.toolResults,toolCalls:q.toolCalls,usage:q.usage}})};this.logger.debug("Post processing LLM response",{agent:this.name,runId:z,result:L,threadId:J,resourceId:Q});let O=V.get.response.aiV4.core().some((q)=>q.role==="tool"&&q.content.some((w)=>w.toolName==="updateWorkingMemory")),E=await this.getMemory({requestContext:K}),M=O?J?await E?.getThreadById({threadId:J}):void 0:G,R=Y.response.dbMessages?.length?Y.response.dbMessages:Y.response.messages;if((!R||R.length===0)&&Y.object)R=[{id:Y.response.id,role:"assistant",content:[{type:"text",text:Z}]}];if(R?.length)V.add(R,"response");if(E&&Q&&M&&!X)try{if(!A)await E.createThread({threadId:M.id,metadata:M.metadata,title:M.title,memoryConfig:W,resourceId:M.resourceId});let q=E.getMergedThreadConfig(W),{shouldGenerate:w,model:I,instructions:P,minMessages:_}=this.resolveTitleGenerationConfig(q?.generateTitle),C=V.get.all.ui(),k=V.get.all.core(),S=_??1;if(w&&!M.title&&k.length>=S){let T=this.getMostRecentUserMessage(C);if(T)this.genTitle(T,K,D,I,P,C).then(async(v)=>{if(v)await E.createThread({threadId:M.id,resourceId:Q,memoryConfig:W,title:v,metadata:M.metadata})},(v)=>{this.logger.error("Error persisting generated title:",v)})}}catch(q){if(q instanceof G0)throw q;let w=new G0({id:"AGENT_MEMORY_PERSIST_RESPONSE_MESSAGES_FAILED",domain:"AGENT",category:"SYSTEM",details:{agentName:this.name,runId:z||"",threadId:J||"",result:JSON.stringify(L)}},q);throw this.logger.trackException(w),w}await this.#C({messageList:V,runId:z,requestContext:K,structuredOutput:F,overrideScorers:N,threadId:J,resourceId:Q,...D}),H?.end({output:{text:Y.text,object:Y.object,files:Y.files,...Y.tripwire?{tripwire:Y.tripwire}:{}},...Y.tripwire?{attributes:{tripwireAbort:{reason:Y.tripwire.reason,processorId:Y.tripwire.processorId,retry:Y.tripwire.retry,metadata:Y.tripwire.metadata}}}:{}})}async network(Y,X){let G=X?.requestContext||new p1,J=await this.getDefaultNetworkOptions({requestContext:G}),Q={...J,...X,routing:{...J?.routing,...X?.routing},completion:{...J?.completion,...X?.completion}},W=Q?.runId||this.#G?.generateId()||M6(),Z=G.get(eX),H=G.get(DX)||(typeof Q?.memory?.thread==="string"?Q?.memory?.thread:Q?.memory?.thread?.id),z=Z||Q?.memory?.resource;return await Z24({networkName:this.name,requestContext:G,runId:W,routingAgent:this,routingAgentOptions:{modelSettings:Q?.modelSettings,memory:Q?.memory},generateId:(V)=>this.#G?.generateId(V)||M6(),maxIterations:Q?.maxSteps||1,messages:Y,threadId:H,resourceId:z,validation:Q?.completion,routing:Q?.routing,onIterationComplete:Q?.onIterationComplete,autoResumeSuspendedTools:Q?.autoResumeSuspendedTools,mastra:this.#G,structuredOutput:Q?.structuredOutput,onStepFinish:Q?.onStepFinish,onError:Q?.onError,onAbort:Q?.onAbort,abortSignal:Q?.abortSignal})}async resumeNetwork(Y,X){let G=X.runId,J=X?.requestContext||new p1,Q=await this.getDefaultNetworkOptions({requestContext:J}),W={...Q,...X,routing:{...Q?.routing,...X?.routing},completion:{...Q?.completion,...X?.completion}},Z=J.get(eX),H=J.get(DX)||(typeof W?.memory?.thread==="string"?W?.memory?.thread:W?.memory?.thread?.id),z=Z||W?.memory?.resource;return await Z24({networkName:this.name,requestContext:J,runId:G,routingAgent:this,routingAgentOptions:{modelSettings:W?.modelSettings,memory:W?.memory},generateId:(V)=>this.#G?.generateId(V)||M6(),maxIterations:W?.maxSteps||1,messages:[],threadId:H,resourceId:z,resumeData:Y,validation:W?.completion,routing:W?.routing,onIterationComplete:W?.onIterationComplete,autoResumeSuspendedTools:W?.autoResumeSuspendedTools,mastra:this.#G,onStepFinish:W?.onStepFinish,onError:W?.onError,onAbort:W?.onAbort,abortSignal:W?.abortSignal})}async approveNetworkToolCall(Y){return this.resumeNetwork({approved:!0},Y)}async declineNetworkToolCall(Y){return this.resumeNetwork({approved:!1},Y)}async generate(Y,X){await this.#j(X?.requestContext);let G=this.#G?.getServer()?.fga;if(G){let A=X?.requestContext?.get("user");if(A){let{checkFGA:F}=await Promise.resolve().then(() => (Aj(),Vj));await F({fgaProvider:G,user:A,resource:{type:"agent",id:this.id},permission:_z.AGENTS_EXECUTE})}}let J=await this.getDefaultOptions({requestContext:X?.requestContext}),Q=XV(J,X??{}),Z=(await this.getLLM({requestContext:Q.requestContext,model:Q.model})).getModel();if(!KG(Z)){let A=Z.modelId||"unknown",F=Z.provider||"unknown",N=Z.specificationVersion;throw new G0({id:"AGENT_GENERATE_V1_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",text:N==="v1"?`Agent "${this.name}" is using AI SDK v4 model (${F}:${A}) which is not compatible with generate(). Please use AI SDK v5+ models or call the generateLegacy() method instead. See https://mastra.ai/en/docs/streaming/overview for more information.`:`Agent "${this.name}" has a model (${F}:${A}) with unrecognized specificationVersion "${N}". Supported versions: v1 (legacy), v2 (AI SDK v5), v3 (AI SDK v6). Please ensure your AI SDK provider is compatible with this version of Mastra.`,details:{agentName:this.name,modelId:A,provider:F,specificationVersion:N}})}let K={...Q,structuredOutput:Q.structuredOutput?{...Q.structuredOutput,schema:W4(Q.structuredOutput.schema)}:void 0,messages:Y,methodType:"generate",maxProcessorRetries:Q.maxProcessorRetries??this.#P},H=await this.#S(K);if(H.status!=="success"){if(H.status==="failed")throw new G0({id:"AGENT_GENERATE_FAILED",domain:"AGENT",category:"USER"},H.error);throw new G0({id:"AGENT_GENERATE_UNKNOWN_ERROR",domain:"AGENT",category:"USER",text:"An unknown error occurred while streaming"})}let z=await H.result.getFullOutput(),V=z.error;if(V)throw V;return z}#y(){return $59}async subscribeToThread(Y){return this.#y().subscribeToThread(this,Y)}abortThreadStream(Y){return this.#y().abortThread(Y)}abortRunStream(Y){return this.#y().abortRun(Y)}sendSignal(Y,X){return this.#y().sendSignal(this,Y,X)}async stream(Y,X){await this.#j(X?.requestContext);let G=this.#G?.getServer()?.fga;if(G){let V=X?.requestContext?.get("user");if(V){let{checkFGA:A}=await Promise.resolve().then(() => (Aj(),Vj));await A({fgaProvider:G,user:V,resource:{type:"agent",id:this.id},permission:_z.AGENTS_EXECUTE})}}let J=await this.getDefaultOptions({requestContext:X?.requestContext}),Q=XV(J,X??{}),Z=(await this.getLLM({requestContext:Q.requestContext,model:Q.model})).getModel();if(!KG(Z)){let V=Z.modelId||"unknown",A=Z.provider||"unknown",F=Z.specificationVersion;throw new G0({id:"AGENT_STREAM_V1_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",text:F==="v1"?`Agent "${this.name}" is using AI SDK v4 model (${A}:${V}) which is not compatible with stream(). Please use AI SDK v5+ models or call the streamLegacy() method instead. See https://mastra.ai/en/docs/streaming/overview for more information.`:`Agent "${this.name}" has a model (${A}:${V}) with unrecognized specificationVersion "${F}". Supported versions: v1 (legacy), v2 (AI SDK v5), v3 (AI SDK v6). Please ensure your AI SDK provider is compatible with this version of Mastra.`,details:{agentName:this.name,modelId:V,provider:A,specificationVersion:F}})}await this.#y().waitForCrossAgentThreadRun(this,Q),Q.runId??=this.#G?.generateId({idType:"run",source:"agent",entityId:this.id})??M6();let K=this.#y().prepareRunOptions(Q),H={...K,structuredOutput:Q.structuredOutput?{...Q.structuredOutput,schema:W4(Q.structuredOutput.schema)}:void 0,messages:Y,methodType:"stream",maxProcessorRetries:Q.maxProcessorRetries??this.#P},z=await this.#S(H);if(z.status!=="success"){if(z.status==="failed")throw new G0({id:"AGENT_STREAM_FAILED",domain:"AGENT",category:"USER"},z.error);throw new G0({id:"AGENT_STREAM_UNKNOWN_ERROR",domain:"AGENT",category:"USER",text:"An unknown error occurred while streaming"})}return this.#y().registerRun(this,z.result,K),z.result}async streamUntilIdle(Y,X){return s99(this,Y,X,{activeStreams:this.#E,bgManager:this.#G?.backgroundTaskManager})}async resumeStreamUntilIdle(Y,X){return o99(this,Y,X,{activeStreams:this.#E,bgManager:this.#G?.backgroundTaskManager})}async resumeStream(Y,X){let G=await this.getDefaultOptions({requestContext:X?.requestContext}),J=XV(G,X??{}),Q=await this.getLLM({requestContext:J.requestContext,model:J.model});if(!KG(Q.getModel())){let z=Q.getModel(),V=z.specificationVersion;throw new G0({id:"AGENT_STREAM_V1_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",text:V==="v1"?"V1 models are not supported for resumeStream. Please use streamLegacy instead.":`Model has unrecognized specificationVersion "${V}". Supported versions: v1 (legacy), v2 (AI SDK v5), v3 (AI SDK v6). Please ensure your AI SDK provider is compatible with this version of Mastra.`,details:{modelId:z.modelId,provider:z.provider,specificationVersion:V}})}let W=X?.runId??"",Z=await this.#x({runId:W,method:"resumeStream"});await this.#y().waitForCrossAgentThreadRun(this,J);let K=this.#y().prepareRunOptions(J),H=await this.#S({...K,structuredOutput:J.structuredOutput?{...J.structuredOutput,schema:W4(J.structuredOutput.schema)}:void 0,messages:[],resumeContext:{resumeData:Y,snapshot:Z},methodType:"stream",maxProcessorRetries:J.maxProcessorRetries??this.#P});if(H.status!=="success"){if(H.status==="failed")throw new G0({id:"AGENT_STREAM_FAILED",domain:"AGENT",category:"USER"},H.error);throw new G0({id:"AGENT_STREAM_UNKNOWN_ERROR",domain:"AGENT",category:"USER",text:"An unknown error occurred while streaming"})}return this.#y().registerRun(this,H.result,K),H.result}async resumeGenerate(Y,X){let G=await this.getDefaultOptions({requestContext:X?.requestContext}),J=XV(G,X??{}),W=(await this.getLLM({requestContext:J.requestContext,model:J.model})).getModel();if(!KG(W)){let A=W.modelId||"unknown",F=W.provider||"unknown",N=W.specificationVersion;throw new G0({id:"AGENT_GENERATE_V1_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",text:N==="v1"?`Agent "${this.name}" is using AI SDK v4 model (${F}:${A}) which is not compatible with generate(). Please use AI SDK v5+ models or call the generateLegacy() method instead. See https://mastra.ai/en/docs/streaming/overview for more information.`:`Agent "${this.name}" has a model (${F}:${A}) with unrecognized specificationVersion "${N}". Supported versions: v1 (legacy), v2 (AI SDK v5), v3 (AI SDK v6). Please ensure your AI SDK provider is compatible with this version of Mastra.`,details:{agentName:this.name,modelId:A,provider:F,specificationVersion:N}})}let Z=X?.runId??"",K=await this.#x({runId:Z,method:"resumeGenerate"}),H=await this.#S({...J,structuredOutput:J.structuredOutput?{...J.structuredOutput,schema:W4(J.structuredOutput.schema)}:void 0,messages:[],resumeContext:{resumeData:Y,snapshot:K},methodType:"generate",maxProcessorRetries:J.maxProcessorRetries??this.#P});if(H.status!=="success"){if(H.status==="failed")throw new G0({id:"AGENT_GENERATE_FAILED",domain:"AGENT",category:"USER"},H.error);throw new G0({id:"AGENT_GENERATE_UNKNOWN_ERROR",domain:"AGENT",category:"USER",text:"An unknown error occurred while generating"})}let z=await H.result.getFullOutput(),V=z.error;if(V)throw V;return z}async approveToolCall(Y){return this.resumeStream({approved:!0},Y)}async declineToolCall(Y){return this.resumeStream({approved:!1},Y)}async approveToolCallGenerate(Y){return this.resumeGenerate({approved:!0},Y)}async declineToolCallGenerate(Y){return this.resumeGenerate({approved:!1},Y)}async generateLegacy(Y,X={}){return this.getLegacyHandler().generateLegacy(Y,X)}async streamLegacy(Y,X={}){return this.getLegacyHandler().streamLegacy(Y,X)}resolveTitleGenerationConfig(Y){if(typeof Y==="boolean")return{shouldGenerate:Y};if(typeof Y==="object"&&Y!==null)return{shouldGenerate:!0,model:Y.model,instructions:Y.instructions,minMessages:Y.minMessages};return{shouldGenerate:!1}}async resolveTitleInstructions(Y,X){if(!X)return`
      - you will generate a short title based on the first message a user begins a conversation with
      - ensure it is not more than 80 characters long
      - the title should be a summary of the user's message
      - do not use quotes or colons
      - the entire text you return will be used as the title`;if(typeof X==="string")return X;else{let J=X({requestContext:Y,mastra:this.#G});return eZ(J,(Q)=>{return Q||`
      - you will generate a short title based on the first message a user begins a conversation with
      - ensure it is not more than 80 characters long
      - the title should be a summary of the user's message
      - do not use quotes or colons
      - the entire text you return will be used as the title`})}}};dj=class extends u8{#$="running";#Y;#X;#J=[];#G=!1;#Q=new b69;#U=[];#K={};#W={text:"",reasoning:[],sources:[],files:[],toolCalls:[],toolResults:[],dynamicToolCalls:[],dynamicToolResults:[],staticToolCalls:[],staticToolResults:[],content:[],usage:{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},warnings:[],request:{},response:{id:"",timestamp:new Date,modelId:"",messages:[],uiMessages:[]},reasoningText:"",providerMetadata:void 0,finishReason:void 0};#H=[];#A;#V={};#Z=[];#L=[];#O=[];#N={};#B={};#R={};#D=[];#F=[];#P=[];#M=void 0;#I={};#z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0};#v=void 0;#w;#g=!1;#E={suspendPayload:new g7,resumeSchema:new g7,object:new g7,finishReason:new g7,usage:new g7,warnings:new g7,providerMetadata:new g7,response:new g7,request:new g7,text:new g7,reasoning:new g7,reasoningText:new g7,sources:new g7,files:new g7,toolCalls:new g7,toolResults:new g7,steps:new g7,totalUsage:new g7,content:new g7};#_=!1;#h=!1;#f=void 0;#j;runId;#k;processorRunner;messageList;traceId;spanId;messageId;constructor({model:$,stream:Y,messageList:X,options:G,messageId:J,initialState:Q}){super({component:"LLM",name:"MastraModelOutput"});this.#k=G,this.#w=G.transportRef,this.#h=!!G.returnScorerData,this.runId=G.runId;let W=gS0(G.tracingContext?.currentSpan);if(this.traceId=W?.externalTraceId,this.spanId=W?.id,this.#j=$,this.messageId=J,G.structuredOutput?.schema)this.#f=G.structuredOutput.model?"processor":"direct";if(G.outputProcessors?.length)this.processorRunner=new A5({inputProcessors:[],outputProcessors:G.outputProcessors,logger:this.logger,agentName:"MastraModelOutput",processorStates:G.processorStates});this.messageList=X;let Z=this,K=Y,H=this.processorRunner;if(H&&G.isLLMExecutionStep){let z=G.processorStates||new Map;K=Y.pipeThrough(new FV({async transform(V,A){if(V.type==="finish"&&V.payload?.stepResult?.reason==="tool-calls"){A.enqueue(V);return}else{if(!z.has(gj)){let E=H.outputProcessors.findIndex((M)=>M.id===gj);if(E!==-1){let M=H.outputProcessors[E],R=new ZD({processorName:M?.name??gj,tracingContext:G.tracingContext,processorIndex:E,createSpan:!0});R.customState={controller:A},z.set(gj,R)}}else{let E=z.get(gj);if(E)E.customState.controller=A}let F={custom:async(E)=>A.enqueue(E)},{part:N,blocked:D,reason:L,tripwireOptions:B,processorId:O}=await H.processPart(V,z,$4(G),G.requestContext,Z.messageList,0,F);if(D){A.enqueue({type:"tripwire",payload:{reason:L||"Output processor blocked content",retry:B?.retry,metadata:B?.metadata,processorId:O}});return}if(N)A.enqueue(N)}}}))}if(Z.#f==="direct"&&Z.#k.isLLMExecutionStep)K=K.pipeThrough(y99({structuredOutput:Z.#k.structuredOutput,logger:Z.logger}));if(this.#X=K.pipeThrough(new FV({transform:async(z,V)=>{switch(z.type){case"tool-call-suspended":case"tool-call-approval":Z.#$="suspended",Z.#E.suspendPayload.resolve(z.payload),Z.#E.resumeSchema.resolve(z.payload.resumeSchema);break;case"raw":if(!Z.#k.includeRawChunks)return;break;case"object-result":if(Z.#A=z.object,Z.#E.object.status.type==="pending")Z.#E.object.resolve(z.object);break;case"source":Z.#Z.push(z),Z.#W.sources.push(z);break;case"text-delta":if(Z.#H.push(z.payload.text),Z.#W.text+=z.payload.text,z.payload.id){let B=Z.#V[z.payload.id]??[];B.push(z.payload.text),Z.#V[z.payload.id]=B}break;case"tool-call-input-streaming-start":Z.#B[z.payload.toolCallId]=z.payload.toolName,Z.#R[z.payload.toolCallId]={toolName:z.payload.toolName,providerExecuted:z.payload.providerExecuted,providerMetadata:z.payload.providerMetadata,dynamic:z.payload.dynamic};break;case"tool-call-input-streaming-end":{let B=z.payload.toolCallId,O=Z.#R[B],E=Z.#N[B],M={};if(E?.length)try{let R=E.join("");M=typeof R==="string"&&R.length>0?JSON.parse(R):{}}catch{M={}}if(delete Z.#R[B],delete Z.#N[B],delete Z.#B[B],O){let R={type:"tool-call",runId:z.runId,from:z.from,payload:{toolCallId:B,toolName:O.toolName,args:M,providerExecuted:O.providerExecuted,providerMetadata:O.providerMetadata,dynamic:O.dynamic}};Z.#D.push(R),Z.#W.toolCalls.push(R),Z.#x(z),V.enqueue(z),Z.#x(R),V.enqueue(R);return}break}case"tool-call-delta":if(!Z.#N[z.payload.toolCallId])Z.#N[z.payload.toolCallId]=[];Z.#N?.[z.payload.toolCallId]?.push(z.payload.argsTextDelta),z.payload.toolName||=Z.#B[z.payload.toolCallId];break;case"file":Z.#O.push(z),Z.#W.files.push(z);break;case"reasoning-start":Z.#K[z.payload.id]={type:"reasoning",runId:z.runId,from:z.from,payload:{id:z.payload.id,providerMetadata:z.payload.providerMetadata,text:""}};break;case"reasoning-delta":{Z.#L.push({type:"reasoning",runId:z.runId,from:z.from,payload:z.payload}),Z.#W.reasoning.push({type:"reasoning",runId:z.runId,from:z.from,payload:z.payload});let B=Z.#K[z.payload.id];if(B){if(B.payload.text+=z.payload.text,z.payload.providerMetadata)B.payload.providerMetadata=z.payload.providerMetadata}break}case"reasoning-end":{let B=Z.#K[z.payload.id];if(z.payload.providerMetadata&&B)B.payload.providerMetadata=z.payload.providerMetadata;break}case"tool-call":{let B=Z.#D.find((E)=>E.payload.toolCallId===z.payload.toolCallId);if(B){if(z.payload.args&&Object.keys(B.payload.args||{}).length===0)B.payload.args=z.payload.args;if(z.payload.providerMetadata&&!B.payload.providerMetadata)B.payload.providerMetadata=z.payload.providerMetadata;if(z.payload.dynamic!=null&&B.payload.dynamic==null)B.payload.dynamic=z.payload.dynamic;return}Z.#D.push(z),Z.#W.toolCalls.push(z);let O=z.payload;if(O?.output?.from==="AGENT"&&O?.output?.type==="finish"){let E=O.output.payload;if(E?.usage)Z.updateUsageCount(E.usage)}break}case"tool-result":Z.#F.push(z),Z.#W.toolResults.push(z);break;case"step-finish":{if(Z.updateUsageCount(z.payload.output.usage),Z.#P=z.payload.stepResult.warnings||[],z.payload.metadata.request)Z.#I=z.payload.metadata.request;let{providerMetadata:B,request:O,...E}=z.payload.metadata,M=z.payload.output?.steps||[],q=M[M.length-1]?.tripwire,w=q?"":Z.#W.text,I={stepType:Z.#U.length===0?"initial":"tool-result",sources:Z.#W.sources,files:Z.#W.files,toolCalls:Z.#W.toolCalls,toolResults:Z.#W.toolResults,content:X.get.response.aiV5.modelContent(-1),text:w,tripwire:q,reasoningText:Z.#L.map((P)=>P.payload.text).join(""),reasoning:Object.values(Z.#K),get staticToolCalls(){return Z.#W.toolCalls.filter((P)=>P.type==="tool-call"&&P.payload?.dynamic===!1)},get dynamicToolCalls(){return Z.#W.toolCalls.filter((P)=>P.type==="tool-call"&&P.payload?.dynamic===!0)},get staticToolResults(){return Z.#W.toolResults.filter((P)=>P.type==="tool-result"&&P.payload?.dynamic===!1)},get dynamicToolResults(){return Z.#W.toolResults.filter((P)=>P.type==="tool-result"&&P.payload?.dynamic===!0)},finishReason:z.payload.stepResult.reason,usage:z.payload.output.usage,warnings:Z.#P,request:O||{},response:{id:z.payload.id||"",timestamp:z.payload.metadata?.timestamp||new Date,modelId:z.payload.metadata?.modelId||z.payload.metadata?.model||"",...E,messages:z.payload.messages?.nonUser||[],dbMessages:Z.messageList.get.response.db(),uiMessages:X.get.response.aiV5.ui()},providerMetadata:B??z.payload.providerMetadata};await G?.onStepFinish?.({...Z.#j.modelId&&Z.#j.provider&&Z.#j.version?{model:Z.#j}:{},...I}),Z.#U.push(I),Z.#W={text:"",reasoning:[],sources:[],files:[],toolCalls:[],toolResults:[],dynamicToolCalls:[],dynamicToolResults:[],staticToolCalls:[],staticToolResults:[],content:[],usage:{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},warnings:[],request:{},response:{id:"",timestamp:new Date,modelId:"",messages:[],uiMessages:[]},reasoningText:"",providerMetadata:void 0,finishReason:void 0};break}case"tripwire":Z.#v={reason:z.payload?.reason||"Content blocked",retry:z.payload?.retry,metadata:z.payload?.metadata,processorId:z.payload?.processorId},Z.#M="other",Z.#G=!0,Z.resolvePromises({text:Z.#H.join(""),finishReason:"other",object:void 0,usage:Z.#z,warnings:Z.#P,providerMetadata:void 0,response:{dbMessages:Z.messageList.get.response.db()},request:{},reasoning:[],reasoningText:void 0,sources:[],files:[],toolCalls:[],toolResults:[],steps:Z.#U,totalUsage:Z.#z,content:[],suspendPayload:void 0,resumeSchema:void 0}),Z.#b(),Z.#x(z),V.enqueue(z),Z.#Q.emit("finish"),V.terminate();return;case"finish":if(Z.#$="success",z.payload.stepResult.reason)Z.#M=z.payload.stepResult.reason;let A=z.payload.metadata?.providerMetadata??z.payload.providerMetadata;if(z.payload.stepResult.reason==="tripwire"){let B=z.payload.output?.steps,E=B?.[B?.length-1]?.tripwire;Z.#v={reason:E?.reason||"Processor tripwire triggered",retry:E?.retry,metadata:E?.metadata,processorId:E?.processorId}}if(Z.#A!==void 0){let O=[...X.get.response.db()].reverse().find((E)=>E.role==="assistant");if(O){if(!O.content.metadata)O.content.metadata={};O.content.metadata.structuredOutput=Z.#A}}let F={};if(z.payload.metadata){let{providerMetadata:B,request:O,...E}=z.payload.metadata;F={...E,messages:X.get.response.aiV5.model(),uiMessages:X.get.response.aiV5.ui()}}this.populateUsageCount(z.payload.output.usage),z.payload.output.usage={inputTokens:Z.#z.inputTokens??0,outputTokens:Z.#z.outputTokens??0,totalTokens:Z.#z.totalTokens??0,...Z.#z.reasoningTokens!==void 0&&{reasoningTokens:Z.#z.reasoningTokens},...Z.#z.cachedInputTokens!==void 0&&{cachedInputTokens:Z.#z.cachedInputTokens},...Z.#z.cacheCreationInputTokens!==void 0&&{cacheCreationInputTokens:Z.#z.cacheCreationInputTokens},...Z.#z.raw!==void 0&&{raw:Z.#z.raw}};try{if(Z.processorRunner&&!Z.#k.isLLMExecutionStep){let B=Z.#U[Z.#U.length-1],O=B?.text||"",E={custom:async(I)=>{Z.#x(I),V.enqueue(I)}},M={text:Z.#H.join(""),usage:z.payload.output.usage,finishReason:Z.#M||"unknown",steps:[...Z.#U]};Z.messageList=await Z.processorRunner.runOutputProcessors(Z.messageList,$4(G),Z.#k.requestContext,0,E,M);let R=Z.messageList.get.response.aiV4.core(),q=R[R.length-1],w=q?Av0(q.content):"";if(B&&w&&w!==O)B.text=w;if(this.resolvePromises({text:w||O,finishReason:Z.#M}),z.payload.metadata){let{providerMetadata:I,request:P,..._}=z.payload.metadata;F={..._,messages:X.get.response.aiV5.model(),uiMessages:X.get.response.aiV5.ui()}}z.payload.response=F}else if(!Z.#k.isLLMExecutionStep)this.resolvePromises({text:Z.#H.join(""),finishReason:Z.#M})}catch(B){if(B instanceof u6)Z.#v={reason:B.message,retry:B.options?.retry,metadata:B.options?.metadata,processorId:B.processorId},Z.resolvePromises({finishReason:"other",text:""});else Z.#Y=XG(B,{fallbackMessage:"Unknown error in stream"}),Z.resolvePromises({finishReason:"error",text:""});if(Z.#E.object.status.type!=="resolved")Z.#E.object.resolve(void 0)}let N=Z.#L.length>0?Z.#L.map((B)=>B.payload.text).join(""):void 0,D=Z.#U[Z.#U.length-1];if(D&&D.providerMetadata===void 0&&A!==void 0)D.providerMetadata=A;if(this.resolvePromises({usage:Z.#z,warnings:Z.#P,providerMetadata:A,response:{...F,dbMessages:Z.messageList.get.response.db()},request:Z.#I||{},reasoningText:N,reasoning:Object.values(Z.#K||{}),sources:Z.#Z,files:Z.#O,toolCalls:Z.#D,toolResults:Z.#F,steps:Z.#U,totalUsage:Z.#C(),content:X.get.response.aiV5.stepContent(),suspendPayload:void 0,resumeSchema:void 0}),D){let B={providerMetadata:D.providerMetadata??A,text:Z.#H.join(""),warnings:D.warnings??[],finishReason:z.payload.stepResult.reason,content:X.get.response.aiV5.stepContent(),request:await Z.request,error:Z.error,reasoning:await Z.reasoning,reasoningText:await Z.reasoningText,sources:await Z.sources,files:await Z.files,steps:Z.#U,response:{...await Z.response,...D.response,messages:X.get.response.aiV5.model(),dbMessages:Z.messageList.get.response.db()},usage:z.payload.output.usage,totalUsage:Z.#C(),toolCalls:await Z.toolCalls,toolResults:await Z.toolResults,staticToolCalls:(await Z.toolCalls).filter((O)=>O?.payload?.dynamic===!1),staticToolResults:(await Z.toolResults).filter((O)=>O?.payload?.dynamic===!1),dynamicToolCalls:(await Z.toolCalls).filter((O)=>O?.payload?.dynamic===!0),dynamicToolResults:(await Z.toolResults).filter((O)=>O?.payload?.dynamic===!0),...Z.#j.modelId&&Z.#j.provider&&Z.#j.version?{model:Z.#j}:{},object:Z.#E.object.status.type==="rejected"?void 0:Z.#E.object.status.type==="resolved"?Z.#E.object.status.value:Z.#f==="direct"&&D.text?(()=>{try{return JSON.parse(D.text)}catch{return}})():void 0};await G?.onFinish?.(B)}Z.#b();break;case"error":let L=XG(z.payload.error,{fallbackMessage:"Unknown error chunk in stream"});Z.#Y=L,Z.#$="failed",Z.#G=!0,Object.values(Z.#E).forEach((B)=>{if(B.status.type==="pending")B.reject(Z.#Y)}),Z.#b();break}Z.#x(z),V.enqueue(z)},flush:()=>{if(Z.#E.object.status.type==="pending")Z.#E.object.resolve(void 0);if(Z.#$==="suspended"){let z=Z.#L.length>0?Z.#L.map((V)=>V.payload.text).join(""):void 0;Z.resolvePromises({toolResults:Z.#F,toolCalls:Z.#D,text:Z.#H.join(""),reasoning:Object.values(Z.#K||{}),reasoningText:z,sources:Z.#Z,files:Z.#O,steps:Z.#U,usage:Z.#z,totalUsage:Z.#C(),warnings:Z.#P,finishReason:"suspended",content:Z.messageList.get.response.aiV5.stepContent(),object:void 0,request:Z.#I,response:{dbMessages:Z.messageList.get.response.db()},providerMetadata:void 0})}Object.entries(Z.#E).forEach(([z,V])=>{if(V.status.type==="pending")V.reject(Error(`promise '${z}' was not resolved or rejected when stream finished`))}),Z.#b(),Z.#G=!0,Z.#Q.emit("finish")}})),Q)this.deserializeState(Q)}resolvePromise($,Y){if(!($ in this.#E))throw new G0({id:"MASTRA_MODEL_OUTPUT_INVALID_PROMISE_KEY",domain:"LLM",category:"SYSTEM",text:`Attempted to resolve invalid promise key '${$}' with value '${typeof Y==="object"?JSON.stringify(Y,null,2):Y}'`});this.#E[$].resolve(Y)}resolvePromises($){for(let Y in $){let X=Y;this.resolvePromise(X,$[X])}}#b(){let $=this.#w?.current;if(!$||!$.closeOnFinish||this.#g)return;this.#g=!0;try{$.close()}catch{}}#q($){if(!this.#_)this.consumeStream();return $.promise}get text(){return this.#q(this.#E.text)}get reasoning(){return this.#q(this.#E.reasoning)}get reasoningText(){return this.#q(this.#E.reasoningText)}get sources(){return this.#q(this.#E.sources)}get files(){return this.#q(this.#E.files)}get steps(){return this.#q(this.#E.steps)}get suspendPayload(){return this.#q(this.#E.suspendPayload)}get resumeSchema(){return this.#q(this.#E.resumeSchema)}get fullStream(){return this.#S()}get finishReason(){return this.#q(this.#E.finishReason)}get toolCalls(){return this.#q(this.#E.toolCalls)}get toolResults(){return this.#q(this.#E.toolResults)}get usage(){return this.#q(this.#E.usage)}get warnings(){return this.#q(this.#E.warnings)}get providerMetadata(){return this.#q(this.#E.providerMetadata)}get response(){return this.#q(this.#E.response)}get request(){return this.#q(this.#E.request)}get transport(){return this.#w?.current}get error(){return this.#Y}updateUsageCount($){if(!$)return;if($.inputTokens!==void 0)this.#z.inputTokens=(this.#z.inputTokens??0)+$.inputTokens;if($.outputTokens!==void 0)this.#z.outputTokens=(this.#z.outputTokens??0)+$.outputTokens;if($.totalTokens!==void 0)this.#z.totalTokens=(this.#z.totalTokens??0)+$.totalTokens;if($.reasoningTokens!==void 0)this.#z.reasoningTokens=(this.#z.reasoningTokens??0)+$.reasoningTokens;if($.cachedInputTokens!==void 0)this.#z.cachedInputTokens=(this.#z.cachedInputTokens??0)+$.cachedInputTokens;if($.cacheCreationInputTokens!==void 0)this.#z.cacheCreationInputTokens=(this.#z.cacheCreationInputTokens??0)+$.cacheCreationInputTokens;if($.raw!==void 0)this.#z.raw=$.raw}populateUsageCount($){if(!$)return;if($.inputTokens!==void 0&&this.#z.inputTokens===void 0)this.#z.inputTokens=$.inputTokens;if($.outputTokens!==void 0&&this.#z.outputTokens===void 0)this.#z.outputTokens=$.outputTokens;if($.totalTokens!==void 0&&this.#z.totalTokens===void 0)this.#z.totalTokens=$.totalTokens;if($.reasoningTokens!==void 0&&this.#z.reasoningTokens===void 0)this.#z.reasoningTokens=$.reasoningTokens;if($.cachedInputTokens!==void 0&&this.#z.cachedInputTokens===void 0)this.#z.cachedInputTokens=$.cachedInputTokens;if($.cacheCreationInputTokens!==void 0&&this.#z.cacheCreationInputTokens===void 0)this.#z.cacheCreationInputTokens=$.cacheCreationInputTokens;if($.raw!==void 0&&this.#z.raw===void 0)this.#z.raw=$.raw}async consumeStream($){if(this.#_)return;this.#_=!0;try{await f69({stream:this.#X,onError:$?.onError,logger:this.logger})}catch(Y){$?.onError?.(Y)}}async getFullOutput(){await this.consumeStream({onError:(J)=>{throw this.logger.error("Error consuming stream",J),J}});let $;if(this.#h)$={input:{inputMessages:this.messageList.getPersisted.input.db(),rememberedMessages:this.messageList.getPersisted.remembered.db(),systemMessages:this.messageList.getSystemMessages(),taggedSystemMessages:this.messageList.getPersisted.taggedSystemMessages},output:this.messageList.getPersisted.response.db()};let Y=await this.steps;return{text:Y.map((J)=>J.text||"").join(""),usage:await this.usage,steps:Y,finishReason:await this.finishReason,warnings:await this.warnings,providerMetadata:await this.providerMetadata,request:await this.request,reasoning:await this.reasoning,reasoningText:await this.reasoningText,toolCalls:await this.toolCalls,toolResults:await this.toolResults,sources:await this.sources,files:await this.files,response:await this.response,totalUsage:await this.totalUsage,object:await this.object,error:this.error,tripwire:this.#v,...$?{scoringData:$}:{},traceId:this.traceId,spanId:this.spanId,runId:this.runId,suspendPayload:await this.suspendPayload,resumeSchema:await this.resumeSchema,messages:this.messageList.get.all.db(),rememberedMessages:this.messageList.get.remembered.db()}}get tripwire(){return this.#v}get totalUsage(){return this.#q(this.#E.totalUsage)}get content(){return this.#q(this.#E.content)}get objectStream(){return this.#S().pipeThrough(new FV({transform($,Y){if($.type==="object")Y.enqueue($.object)}}))}get elementStream(){let $=0;return this.#S().pipeThrough(new FV({transform(Y,X){if(Y.type==="object"){if(Array.isArray(Y.object))for(;$<Y.object.length;$++)X.enqueue(Y.object[$])}}}))}get textStream(){if(this.#f==="direct"){if(I70(this.#k.structuredOutput?.schema)?.outputFormat==="array")return this.#S().pipeThrough(b99(this.#k.structuredOutput?.schema))}return this.#S().pipeThrough(new FV({transform($,Y){if($.type==="text-delta")Y.enqueue($.payload.text)}}))}get object(){if(!this.processorRunner&&!this.#k.structuredOutput?.schema&&this.#E.object.status.type==="pending")this.#E.object.resolve(void 0);return this.#q(this.#E.object)}_getImmediateToolCalls(){return this.#D}_getImmediateToolResults(){return this.#F}_getImmediateText(){return this.#H.join("")}_getImmediateObject(){return this.#A}_getImmediateUsage(){return this.#z}_getImmediateWarnings(){return this.#P}_getImmediateFinishReason(){return this.#M}_getBaseStream(){return this.#X}_waitUntilFinished(){if(this.#G)return Promise.resolve();return new Promise(($)=>{this.#Q.once("finish",$)})}#C(){let $=this.#z.totalTokens;if($===void 0){let Y=this.#z.inputTokens??0,X=this.#z.outputTokens??0,G=this.#z.reasoningTokens??0;$=Y+X+G}return{inputTokens:this.#z.inputTokens,outputTokens:this.#z.outputTokens,totalTokens:$,reasoningTokens:this.#z.reasoningTokens,cachedInputTokens:this.#z.cachedInputTokens,cacheCreationInputTokens:this.#z.cacheCreationInputTokens,...this.#z.raw!==void 0&&{raw:this.#z.raw}}}#x($){this.#J.push($),this.#Q.emit("chunk",$)}#S(){let $=this;return new $2({start(Y){if($.#J.forEach((J)=>{Y.enqueue(J)}),$.#G){Y.close();return}let X=(J)=>{A9(Y,J)},G=()=>{$.#Q.off("chunk",X),$.#Q.off("finish",G),E70(Y)};$.#Q.on("chunk",X),$.#Q.on("finish",G)},pull(Y){if(!$.#_)$.consumeStream()},cancel(){$.#Q.removeAllListeners()}})}get status(){return this.#$}serializeState(){return{status:this.#$,bufferedSteps:this.#U,bufferedReasoningDetails:this.#K,bufferedByStep:this.#W,bufferedText:this.#H,bufferedTextChunks:this.#V,bufferedSources:this.#Z,bufferedReasoning:this.#L,bufferedFiles:this.#O,toolCallArgsDeltas:this.#N,toolCallDeltaIdNameMap:this.#B,toolCallStreamingMeta:this.#R,toolCalls:this.#D,toolResults:this.#F,warnings:this.#P,finishReason:this.#M,request:this.#I,usageCount:this.#z,tripwire:this.#v,messageList:this.messageList.serialize()}}deserializeState($){this.#$=$.status,this.#U=$.bufferedSteps,this.#K=$.bufferedReasoningDetails,this.#W=$.bufferedByStep,this.#H=$.bufferedText,this.#V=$.bufferedTextChunks,this.#Z=$.bufferedSources,this.#L=$.bufferedReasoning,this.#O=$.bufferedFiles,this.#N=$.toolCallArgsDeltas,this.#B=$.toolCallDeltaIdNameMap,this.#R=$.toolCallStreamingMeta??{},this.#D=$.toolCalls,this.#F=$.toolResults,this.#P=$.warnings,this.#M=$.finishReason,this.#I=$.request,this.#z=$.usageCount,this.#v=$.tripwire,this.messageList=this.messageList.deserialize($.messageList)}},u6=class extends Error{options;processorId;constructor($,Y={},X){super($);this.options=Y,this.processorId=X,Object.setPrototypeOf(this,new.target.prototype)}},A24=/[^0-9]4[.-]6/});var d34={};W8(d34,{isTaskAugmentedRequestParams:()=>mg0,isJSONRPCResultResponse:()=>CX,isJSONRPCResponse:()=>E79,isJSONRPCRequest:()=>DJ,isJSONRPCNotification:()=>dg0,isJSONRPCErrorResponse:()=>G2,isJSONRPCError:()=>R79,isInitializedNotification:()=>cg0,isInitializeRequest:()=>rj,assertCompleteRequestResourceTemplate:()=>$m0,assertCompleteRequestPrompt:()=>eg0,UrlElicitationRequiredError:()=>Ym0,UntitledSingleSelectEnumSchemaSchema:()=>P34,UntitledMultiSelectEnumSchemaSchema:()=>T34,UnsubscribeRequestSchema:()=>l70,UnsubscribeRequestParamsSchema:()=>J34,ToolUseContentSchema:()=>K34,ToolSchema:()=>Pu,ToolResultContentSchema:()=>B34,ToolListChangedNotificationSchema:()=>$$0,ToolExecutionSchema:()=>z34,ToolChoiceSchema:()=>L34,ToolAnnotationsSchema:()=>H34,TitledSingleSelectEnumSchemaSchema:()=>w34,TitledMultiSelectEnumSchemaSchema:()=>C34,TextResourceContentsSchema:()=>ng0,TextContentSchema:()=>r70,TaskStatusSchema:()=>eK4,TaskStatusNotificationSchema:()=>tj,TaskStatusNotificationParamsSchema:()=>$34,TaskSchema:()=>oj,TaskMetadataSchema:()=>uK4,TaskCreationParamsSchema:()=>O79,TaskAugmentedRequestParamsSchema:()=>lj,SubscribeRequestSchema:()=>c70,SubscribeRequestParamsSchema:()=>G34,StringSchemaSchema:()=>q34,SingleSelectEnumSchemaSchema:()=>j34,SetLevelRequestSchema:()=>WT,SetLevelRequestParamsSchema:()=>A34,ServerTasksCapabilitySchema:()=>iK4,ServerResultSchema:()=>x79,ServerRequestSchema:()=>k79,ServerNotificationSchema:()=>v79,ServerCapabilitiesSchema:()=>aK4,SamplingMessageSchema:()=>E34,SamplingMessageContentBlockSchema:()=>Vu,SamplingContentSchema:()=>O34,SUPPORTED_PROTOCOL_VERSIONS:()=>Y2,RootsListChangedNotificationSchema:()=>p34,RootSchema:()=>u34,RoleSchema:()=>ej,ResultSchema:()=>aY,ResourceUpdatedNotificationSchema:()=>i70,ResourceUpdatedNotificationParamsSchema:()=>Q34,ResourceTemplateSchema:()=>Y34,ResourceTemplateReferenceSchema:()=>tg0,ResourceSchema:()=>sg0,ResourceRequestParamsSchema:()=>d70,ResourceReferenceSchema:()=>j79,ResourceListChangedNotificationSchema:()=>YT,ResourceLinkSchema:()=>t70,ResourceContentsSchema:()=>ig0,RequestSchema:()=>rY,RequestIdSchema:()=>nE,RelatedTaskMetadataSchema:()=>pK4,ReadResourceResultSchema:()=>bD,ReadResourceRequestSchema:()=>eE,ReadResourceRequestParamsSchema:()=>X34,RELATED_TASK_META_KEY:()=>LV,PromptSchema:()=>n70,PromptReferenceSchema:()=>g34,PromptMessageSchema:()=>U34,PromptListChangedNotificationSchema:()=>JT,PromptArgumentSchema:()=>W34,ProgressTokenSchema:()=>hg0,ProgressSchema:()=>sK4,ProgressNotificationSchema:()=>aE,ProgressNotificationParamsSchema:()=>oK4,PrimitiveSchemaDefinitionSchema:()=>v34,PingRequestSchema:()=>rE,PaginatedResultSchema:()=>sj,PaginatedRequestSchema:()=>aj,PaginatedRequestParamsSchema:()=>tK4,NumberSchemaSchema:()=>I34,NotificationSchema:()=>mW,MultiSelectEnumSchemaSchema:()=>S34,ModelPreferencesSchema:()=>N34,ModelHintSchema:()=>D34,McpError:()=>r1,LoggingMessageNotificationSchema:()=>Y$0,LoggingMessageNotificationParamsSchema:()=>F34,LoggingLevelSchema:()=>QT,ListToolsResultSchema:()=>e70,ListToolsRequestSchema:()=>BV,ListTasksResultSchema:()=>qu,ListTasksRequestSchema:()=>Ru,ListRootsResultSchema:()=>Q$0,ListRootsRequestSchema:()=>J$0,ListResourcesResultSchema:()=>yD,ListResourcesRequestSchema:()=>oE,ListResourceTemplatesResultSchema:()=>$T,ListResourceTemplatesRequestSchema:()=>tE,ListPromptsResultSchema:()=>XT,ListPromptsRequestSchema:()=>$M,ListChangedOptionsBaseSchema:()=>og0,LegacyTitledEnumSchemaSchema:()=>_34,LATEST_PROTOCOL_VERSION:()=>NV,JSONRPC_VERSION:()=>Fu,JSONRPCResultResponseSchema:()=>u70,JSONRPCResponseSchema:()=>q79,JSONRPCRequestSchema:()=>ug0,JSONRPCNotificationSchema:()=>pg0,JSONRPCMessageSchema:()=>C$,JSONRPCErrorSchema:()=>M79,JSONRPCErrorResponseSchema:()=>Du,InitializedNotificationSchema:()=>Bu,InitializeResultSchema:()=>p70,InitializeRequestSchema:()=>Lu,InitializeRequestParamsSchema:()=>rK4,ImplementationSchema:()=>nj,ImageContentSchema:()=>a70,IconsSchema:()=>ij,IconSchema:()=>cK4,GetTaskResultSchema:()=>Eu,GetTaskRequestSchema:()=>Ou,GetTaskPayloadResultSchema:()=>w79,GetTaskPayloadRequestSchema:()=>Mu,GetPromptResultSchema:()=>GT,GetPromptRequestSchema:()=>YM,GetPromptRequestParamsSchema:()=>Z34,ErrorCode:()=>_1,EnumSchemaSchema:()=>k34,EmptyResultSchema:()=>NJ,EmbeddedResourceSchema:()=>o70,ElicitationCompleteNotificationSchema:()=>f34,ElicitationCompleteNotificationParamsSchema:()=>h34,ElicitResultSchema:()=>OV,ElicitRequestURLParamsSchema:()=>y34,ElicitRequestSchema:()=>ZT,ElicitRequestParamsSchema:()=>b34,ElicitRequestFormParamsSchema:()=>x34,DEFAULT_NEGOTIATED_PROTOCOL_VERSION:()=>Au,CursorSchema:()=>fg0,CreateTaskResultSchema:()=>sU,CreateMessageResultWithToolsSchema:()=>hD,CreateMessageResultSchema:()=>oU,CreateMessageRequestSchema:()=>X$0,CreateMessageRequestParamsSchema:()=>M34,ContentBlockSchema:()=>XM,CompleteResultSchema:()=>G$0,CompleteRequestSchema:()=>wu,CompleteRequestParamsSchema:()=>m34,CompatibilityCallToolResultSchema:()=>_79,ClientTasksCapabilitySchema:()=>lK4,ClientResultSchema:()=>S79,ClientRequestSchema:()=>T79,ClientNotificationSchema:()=>C79,ClientCapabilitiesSchema:()=>nK4,CancelledNotificationSchema:()=>Nu,CancelledNotificationParamsSchema:()=>dK4,CancelTaskResultSchema:()=>lg0,CancelTaskRequestSchema:()=>Iu,CallToolResultSchema:()=>LJ,CallToolRequestSchema:()=>J3,CallToolRequestParamsSchema:()=>V34,BooleanSchemaSchema:()=>R34,BlobResourceContentsSchema:()=>ag0,BaseMetadataSchema:()=>iE,AudioContentSchema:()=>s70,AnnotationsSchema:()=>sE});function eg0($){if($.params.ref.type!=="ref/prompt")throw TypeError(`Expected CompleteRequestPrompt, but got ${$.params.ref.type}`)}function $m0($){if($.params.ref.type!=="ref/resource")throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${$.params.ref.type}`)}var NV="2025-11-25",Au="2025-03-26",Y2,LV="io.modelcontextprotocol/related-task",Fu="2.0",LY,hg0,fg0,O79,uK4,pK4,gg0,gW,lj,mg0=($)=>lj.safeParse($).success,rY,X2,mW,aY,nE,ug0,DJ=($)=>ug0.safeParse($).success,pg0,dg0=($)=>pg0.safeParse($).success,u70,CX=($)=>u70.safeParse($).success,E79,_1,Du,M79,G2=($)=>Du.safeParse($).success,R79,C$,q79,NJ,dK4,Nu,cK4,ij,iE,nj,I79,P79,lK4,iK4,nK4,rK4,Lu,rj=($)=>Lu.safeParse($).success,aK4,p70,Bu,cg0=($)=>Bu.safeParse($).success,rE,sK4,oK4,aE,tK4,aj,sj,eK4,oj,sU,$34,tj,Ou,Eu,Mu,w79,Ru,qu,Iu,lg0,ig0,ng0,rg0,ag0,ej,sE,sg0,Y34,oE,yD,tE,$T,d70,X34,eE,bD,YT,G34,c70,J34,l70,Q34,i70,W34,n70,$M,XT,Z34,YM,r70,a70,s70,K34,o70,t70,XM,U34,GT,JT,H34,z34,Pu,BV,e70,LJ,_79,V34,J3,$$0,og0,QT,A34,WT,F34,Y$0,D34,N34,L34,B34,O34,Vu,E34,M34,X$0,oU,hD,R34,q34,I34,P34,w34,_34,j34,T34,C34,S34,k34,v34,x34,y34,b34,ZT,h34,f34,OV,tg0,j79,g34,m34,wu,G$0,u34,J$0,Q$0,p34,T79,C79,S79,k79,v79,x79,r1,Ym0;var BY=V0(()=>{O1();Y2=[NV,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],LY=Sh(($)=>$!==null&&(typeof $==="object"||typeof $==="function")),hg0=p9([j0(),H8().int()]),fg0=j0(),O79=Y$({ttl:H8().optional(),pollInterval:H8().optional()}),uK4=v1({ttl:H8().optional()}),pK4=v1({taskId:j0()}),gg0=Y$({progressToken:hg0.optional(),[LV]:pK4.optional()}),gW=v1({_meta:gg0.optional()}),lj=gW.extend({task:uK4.optional()}),rY=v1({method:j0(),params:gW.loose().optional()}),X2=v1({_meta:gg0.optional()}),mW=v1({method:j0(),params:X2.loose().optional()}),aY=Y$({_meta:gg0.optional()}),nE=p9([j0(),H8().int()]),ug0=v1({jsonrpc:L4(Fu),id:nE,...rY.shape}).strict(),pg0=v1({jsonrpc:L4(Fu),...mW.shape}).strict(),u70=v1({jsonrpc:L4(Fu),id:nE,result:aY}).strict(),E79=CX;(function($){$[$.ConnectionClosed=-32000]="ConnectionClosed",$[$.RequestTimeout=-32001]="RequestTimeout",$[$.ParseError=-32700]="ParseError",$[$.InvalidRequest=-32600]="InvalidRequest",$[$.MethodNotFound=-32601]="MethodNotFound",$[$.InvalidParams=-32602]="InvalidParams",$[$.InternalError=-32603]="InternalError",$[$.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(_1||(_1={}));Du=v1({jsonrpc:L4(Fu),id:nE.optional(),error:v1({code:H8().int(),message:j0(),data:u9().optional()})}).strict(),M79=Du,R79=G2,C$=p9([ug0,pg0,u70,Du]),q79=p9([u70,Du]),NJ=aY.strict(),dK4=X2.extend({requestId:nE.optional(),reason:j0().optional()}),Nu=mW.extend({method:L4("notifications/cancelled"),params:dK4}),cK4=v1({src:j0(),mimeType:j0().optional(),sizes:b1(j0()).optional(),theme:gY(["light","dark"]).optional()}),ij=v1({icons:b1(cK4).optional()}),iE=v1({name:j0(),title:j0().optional()}),nj=iE.extend({...iE.shape,...ij.shape,version:j0(),websiteUrl:j0().optional(),description:j0().optional()}),I79=GO(v1({applyDefaults:U9().optional()}),q9(j0(),u9())),P79=sP(($)=>{if($&&typeof $==="object"&&!Array.isArray($)){if(Object.keys($).length===0)return{form:{}}}return $},GO(v1({form:I79.optional(),url:LY.optional()}),q9(j0(),u9()).optional())),lK4=Y$({list:LY.optional(),cancel:LY.optional(),requests:Y$({sampling:Y$({createMessage:LY.optional()}).optional(),elicitation:Y$({create:LY.optional()}).optional()}).optional()}),iK4=Y$({list:LY.optional(),cancel:LY.optional(),requests:Y$({tools:Y$({call:LY.optional()}).optional()}).optional()}),nK4=v1({experimental:q9(j0(),LY).optional(),sampling:v1({context:LY.optional(),tools:LY.optional()}).optional(),elicitation:P79.optional(),roots:v1({listChanged:U9().optional()}).optional(),tasks:lK4.optional(),extensions:q9(j0(),LY).optional()}),rK4=gW.extend({protocolVersion:j0(),capabilities:nK4,clientInfo:nj}),Lu=rY.extend({method:L4("initialize"),params:rK4}),aK4=v1({experimental:q9(j0(),LY).optional(),logging:LY.optional(),completions:LY.optional(),prompts:v1({listChanged:U9().optional()}).optional(),resources:v1({subscribe:U9().optional(),listChanged:U9().optional()}).optional(),tools:v1({listChanged:U9().optional()}).optional(),tasks:iK4.optional(),extensions:q9(j0(),LY).optional()}),p70=aY.extend({protocolVersion:j0(),capabilities:aK4,serverInfo:nj,instructions:j0().optional()}),Bu=mW.extend({method:L4("notifications/initialized"),params:X2.optional()}),rE=rY.extend({method:L4("ping"),params:gW.optional()}),sK4=v1({progress:H8(),total:z5(H8()),message:z5(j0())}),oK4=v1({...X2.shape,...sK4.shape,progressToken:hg0}),aE=mW.extend({method:L4("notifications/progress"),params:oK4}),tK4=gW.extend({cursor:fg0.optional()}),aj=rY.extend({params:tK4.optional()}),sj=aY.extend({nextCursor:fg0.optional()}),eK4=gY(["working","input_required","completed","failed","cancelled"]),oj=v1({taskId:j0(),status:eK4,ttl:p9([H8(),pP()]),createdAt:j0(),lastUpdatedAt:j0(),pollInterval:z5(H8()),statusMessage:z5(j0())}),sU=aY.extend({task:oj}),$34=X2.merge(oj),tj=mW.extend({method:L4("notifications/tasks/status"),params:$34}),Ou=rY.extend({method:L4("tasks/get"),params:gW.extend({taskId:j0()})}),Eu=aY.merge(oj),Mu=rY.extend({method:L4("tasks/result"),params:gW.extend({taskId:j0()})}),w79=aY.loose(),Ru=aj.extend({method:L4("tasks/list")}),qu=sj.extend({tasks:b1(oj)}),Iu=rY.extend({method:L4("tasks/cancel"),params:gW.extend({taskId:j0()})}),lg0=aY.merge(oj),ig0=v1({uri:j0(),mimeType:z5(j0()),_meta:q9(j0(),u9()).optional()}),ng0=ig0.extend({text:j0()}),rg0=j0().refine(($)=>{try{return atob($),!0}catch{return!1}},{message:"Invalid Base64 string"}),ag0=ig0.extend({blob:rg0}),ej=gY(["user","assistant"]),sE=v1({audience:b1(ej).optional(),priority:H8().min(0).max(1).optional(),lastModified:Mz.datetime({offset:!0}).optional()}),sg0=v1({...iE.shape,...ij.shape,uri:j0(),description:z5(j0()),mimeType:z5(j0()),size:z5(H8()),annotations:sE.optional(),_meta:z5(Y$({}))}),Y34=v1({...iE.shape,...ij.shape,uriTemplate:j0(),description:z5(j0()),mimeType:z5(j0()),annotations:sE.optional(),_meta:z5(Y$({}))}),oE=aj.extend({method:L4("resources/list")}),yD=sj.extend({resources:b1(sg0)}),tE=aj.extend({method:L4("resources/templates/list")}),$T=sj.extend({resourceTemplates:b1(Y34)}),d70=gW.extend({uri:j0()}),X34=d70,eE=rY.extend({method:L4("resources/read"),params:X34}),bD=aY.extend({contents:b1(p9([ng0,ag0]))}),YT=mW.extend({method:L4("notifications/resources/list_changed"),params:X2.optional()}),G34=d70,c70=rY.extend({method:L4("resources/subscribe"),params:G34}),J34=d70,l70=rY.extend({method:L4("resources/unsubscribe"),params:J34}),Q34=X2.extend({uri:j0()}),i70=mW.extend({method:L4("notifications/resources/updated"),params:Q34}),W34=v1({name:j0(),description:z5(j0()),required:z5(U9())}),n70=v1({...iE.shape,...ij.shape,description:z5(j0()),arguments:z5(b1(W34)),_meta:z5(Y$({}))}),$M=aj.extend({method:L4("prompts/list")}),XT=sj.extend({prompts:b1(n70)}),Z34=gW.extend({name:j0(),arguments:q9(j0(),j0()).optional()}),YM=rY.extend({method:L4("prompts/get"),params:Z34}),r70=v1({type:L4("text"),text:j0(),annotations:sE.optional(),_meta:q9(j0(),u9()).optional()}),a70=v1({type:L4("image"),data:rg0,mimeType:j0(),annotations:sE.optional(),_meta:q9(j0(),u9()).optional()}),s70=v1({type:L4("audio"),data:rg0,mimeType:j0(),annotations:sE.optional(),_meta:q9(j0(),u9()).optional()}),K34=v1({type:L4("tool_use"),name:j0(),id:j0(),input:q9(j0(),u9()),_meta:q9(j0(),u9()).optional()}),o70=v1({type:L4("resource"),resource:p9([ng0,ag0]),annotations:sE.optional(),_meta:q9(j0(),u9()).optional()}),t70=sg0.extend({type:L4("resource_link")}),XM=p9([r70,a70,s70,t70,o70]),U34=v1({role:ej,content:XM}),GT=aY.extend({description:j0().optional(),messages:b1(U34)}),JT=mW.extend({method:L4("notifications/prompts/list_changed"),params:X2.optional()}),H34=v1({title:j0().optional(),readOnlyHint:U9().optional(),destructiveHint:U9().optional(),idempotentHint:U9().optional(),openWorldHint:U9().optional()}),z34=v1({taskSupport:gY(["required","optional","forbidden"]).optional()}),Pu=v1({...iE.shape,...ij.shape,description:j0().optional(),inputSchema:v1({type:L4("object"),properties:q9(j0(),LY).optional(),required:b1(j0()).optional()}).catchall(u9()),outputSchema:v1({type:L4("object"),properties:q9(j0(),LY).optional(),required:b1(j0()).optional()}).catchall(u9()).optional(),annotations:H34.optional(),execution:z34.optional(),_meta:q9(j0(),u9()).optional()}),BV=aj.extend({method:L4("tools/list")}),e70=sj.extend({tools:b1(Pu)}),LJ=aY.extend({content:b1(XM).default([]),structuredContent:q9(j0(),u9()).optional(),isError:U9().optional()}),_79=LJ.or(aY.extend({toolResult:u9()})),V34=lj.extend({name:j0(),arguments:q9(j0(),u9()).optional()}),J3=rY.extend({method:L4("tools/call"),params:V34}),$$0=mW.extend({method:L4("notifications/tools/list_changed"),params:X2.optional()}),og0=v1({autoRefresh:U9().default(!0),debounceMs:H8().int().nonnegative().default(300)}),QT=gY(["debug","info","notice","warning","error","critical","alert","emergency"]),A34=gW.extend({level:QT}),WT=rY.extend({method:L4("logging/setLevel"),params:A34}),F34=X2.extend({level:QT,logger:j0().optional(),data:u9()}),Y$0=mW.extend({method:L4("notifications/message"),params:F34}),D34=v1({name:j0().optional()}),N34=v1({hints:b1(D34).optional(),costPriority:H8().min(0).max(1).optional(),speedPriority:H8().min(0).max(1).optional(),intelligencePriority:H8().min(0).max(1).optional()}),L34=v1({mode:gY(["auto","required","none"]).optional()}),B34=v1({type:L4("tool_result"),toolUseId:j0().describe("The unique identifier for the corresponding tool call."),content:b1(XM).default([]),structuredContent:v1({}).loose().optional(),isError:U9().optional(),_meta:q9(j0(),u9()).optional()}),O34=cP("type",[r70,a70,s70]),Vu=cP("type",[r70,a70,s70,K34,B34]),E34=v1({role:ej,content:p9([Vu,b1(Vu)]),_meta:q9(j0(),u9()).optional()}),M34=lj.extend({messages:b1(E34),modelPreferences:N34.optional(),systemPrompt:j0().optional(),includeContext:gY(["none","thisServer","allServers"]).optional(),temperature:H8().optional(),maxTokens:H8().int(),stopSequences:b1(j0()).optional(),metadata:LY.optional(),tools:b1(Pu).optional(),toolChoice:L34.optional()}),X$0=rY.extend({method:L4("sampling/createMessage"),params:M34}),oU=aY.extend({model:j0(),stopReason:z5(gY(["endTurn","stopSequence","maxTokens"]).or(j0())),role:ej,content:O34}),hD=aY.extend({model:j0(),stopReason:z5(gY(["endTurn","stopSequence","maxTokens","toolUse"]).or(j0())),role:ej,content:p9([Vu,b1(Vu)])}),R34=v1({type:L4("boolean"),title:j0().optional(),description:j0().optional(),default:U9().optional()}),q34=v1({type:L4("string"),title:j0().optional(),description:j0().optional(),minLength:H8().optional(),maxLength:H8().optional(),format:gY(["email","uri","date","date-time"]).optional(),default:j0().optional()}),I34=v1({type:gY(["number","integer"]),title:j0().optional(),description:j0().optional(),minimum:H8().optional(),maximum:H8().optional(),default:H8().optional()}),P34=v1({type:L4("string"),title:j0().optional(),description:j0().optional(),enum:b1(j0()),default:j0().optional()}),w34=v1({type:L4("string"),title:j0().optional(),description:j0().optional(),oneOf:b1(v1({const:j0(),title:j0()})),default:j0().optional()}),_34=v1({type:L4("string"),title:j0().optional(),description:j0().optional(),enum:b1(j0()),enumNames:b1(j0()).optional(),default:j0().optional()}),j34=p9([P34,w34]),T34=v1({type:L4("array"),title:j0().optional(),description:j0().optional(),minItems:H8().optional(),maxItems:H8().optional(),items:v1({type:L4("string"),enum:b1(j0())}),default:b1(j0()).optional()}),C34=v1({type:L4("array"),title:j0().optional(),description:j0().optional(),minItems:H8().optional(),maxItems:H8().optional(),items:v1({anyOf:b1(v1({const:j0(),title:j0()}))}),default:b1(j0()).optional()}),S34=p9([T34,C34]),k34=p9([_34,j34,S34]),v34=p9([k34,R34,q34,I34]),x34=lj.extend({mode:L4("form").optional(),message:j0(),requestedSchema:v1({type:L4("object"),properties:q9(j0(),v34),required:b1(j0()).optional()})}),y34=lj.extend({mode:L4("url"),message:j0(),elicitationId:j0(),url:j0().url()}),b34=p9([x34,y34]),ZT=rY.extend({method:L4("elicitation/create"),params:b34}),h34=X2.extend({elicitationId:j0()}),f34=mW.extend({method:L4("notifications/elicitation/complete"),params:h34}),OV=aY.extend({action:gY(["accept","decline","cancel"]),content:sP(($)=>$===null?void 0:$,q9(j0(),p9([j0(),H8(),U9(),b1(j0())])).optional())}),tg0=v1({type:L4("ref/resource"),uri:j0()}),j79=tg0,g34=v1({type:L4("ref/prompt"),name:j0()}),m34=gW.extend({ref:p9([g34,tg0]),argument:v1({name:j0(),value:j0()}),context:v1({arguments:q9(j0(),j0()).optional()}).optional()}),wu=rY.extend({method:L4("completion/complete"),params:m34});G$0=aY.extend({completion:Y$({values:b1(j0()).max(100),total:z5(H8().int()),hasMore:z5(U9())})}),u34=v1({uri:j0().startsWith("file://"),name:j0().optional(),_meta:q9(j0(),u9()).optional()}),J$0=rY.extend({method:L4("roots/list"),params:gW.optional()}),Q$0=aY.extend({roots:b1(u34)}),p34=mW.extend({method:L4("notifications/roots/list_changed"),params:X2.optional()}),T79=p9([rE,Lu,wu,WT,YM,$M,oE,tE,eE,c70,l70,J3,BV,Ou,Mu,Ru,Iu]),C79=p9([Nu,aE,Bu,p34,tj]),S79=p9([NJ,oU,hD,OV,Q$0,Eu,qu,sU]),k79=p9([rE,X$0,ZT,J$0,Ou,Mu,Ru,Iu]),v79=p9([Nu,aE,Y$0,i70,YT,$$0,JT,tj,f34]),x79=p9([NJ,p70,G$0,GT,XT,yD,$T,bD,LJ,e70,Eu,qu,sU]);r1=class r1 extends Error{constructor($,Y,X){super(`MCP error ${$}: ${Y}`);this.code=$,this.data=X,this.name="McpError"}static fromError($,Y,X){if($===_1.UrlElicitationRequired&&X){let G=X;if(G.elicitations)return new Ym0(G.elicitations,Y)}return new r1($,Y,X)}};Ym0=class Ym0 extends r1{constructor($,Y=`URL elicitation${$.length>1?"s":""} required`){super(_1.UrlElicitationRequired,Y,{elicitations:$})}get elicitations(){return this.data?.elicitations??[]}}});var QU4=o((GU4)=>{Object.defineProperty(GU4,"__esModule",{value:!0});GU4.formatNames=GU4.fastFormats=GU4.fullFormats=void 0;function eU($,Y){return{validate:$,compare:Y}}GU4.fullFormats={date:eU(e34,Hm0),time:eU(Km0(!0),zm0),"date-time":eU(s34(!0),YU4),"iso-time":eU(Km0(),$U4),"iso-date-time":eU(s34(),XU4),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:r79,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Y$9,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:a79,int32:{type:"number",validate:t79},int64:{type:"number",validate:e79},float:{type:"number",validate:t34},double:{type:"number",validate:t34},password:!0,binary:!0};GU4.fastFormats={...GU4.fullFormats,date:eU(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Hm0),time:eU(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,zm0),"date-time":eU(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,YU4),"iso-time":eU(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,$U4),"iso-date-time":eU(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,XU4),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};GU4.formatNames=Object.keys(GU4.fullFormats);function d79($){return $%4===0&&($%100!==0||$%400===0)}var c79=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,l79=[0,31,28,31,30,31,30,31,31,30,31,30,31];function e34($){let Y=c79.exec($);if(!Y)return!1;let X=+Y[1],G=+Y[2],J=+Y[3];return G>=1&&G<=12&&J>=1&&J<=(G===2&&d79(X)?29:l79[G])}function Hm0($,Y){if(!($&&Y))return;if($>Y)return 1;if($<Y)return-1;return 0}var Zm0=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Km0($){return function(X){let G=Zm0.exec(X);if(!G)return!1;let J=+G[1],Q=+G[2],W=+G[3],Z=G[4],K=G[5]==="-"?-1:1,H=+(G[6]||0),z=+(G[7]||0);if(H>23||z>59||$&&!Z)return!1;if(J<=23&&Q<=59&&W<60)return!0;let V=Q-z*K,A=J-H*K-(V<0?1:0);return(A===23||A===-1)&&(V===59||V===-1)&&W<61}}function zm0($,Y){if(!($&&Y))return;let X=new Date("2020-01-01T"+$).valueOf(),G=new Date("2020-01-01T"+Y).valueOf();if(!(X&&G))return;return X-G}function $U4($,Y){if(!($&&Y))return;let X=Zm0.exec($),G=Zm0.exec(Y);if(!(X&&G))return;if($=X[1]+X[2]+X[3],Y=G[1]+G[2]+G[3],$>Y)return 1;if($<Y)return-1;return 0}var Um0=/t|\s/i;function s34($){let Y=Km0($);return function(G){let J=G.split(Um0);return J.length===2&&e34(J[0])&&Y(J[1])}}function YU4($,Y){if(!($&&Y))return;let X=new Date($).valueOf(),G=new Date(Y).valueOf();if(!(X&&G))return;return X-G}function XU4($,Y){if(!($&&Y))return;let[X,G]=$.split(Um0),[J,Q]=Y.split(Um0),W=Hm0(X,J);if(W===void 0)return;return W||zm0(G,Q)}var i79=/\/|:/,n79=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function r79($){return i79.test($)&&n79.test($)}var o34=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function a79($){return o34.lastIndex=0,o34.test($)}var s79=-2147483648,o79=2147483647;function t79($){return Number.isInteger($)&&$<=o79&&$>=s79}function e79($){return Number.isInteger($)}function t34(){return!0}var $$9=/[^\\]\\Z/;function Y$9($){if($$9.test($))return!1;try{return new RegExp($),!0}catch(Y){return!1}}});var ZU4=o((WU4)=>{Object.defineProperty(WU4,"__esModule",{value:!0});WU4.formatLimitDefinition=void 0;var G$9=Wt(),Q3=d6(),gD=Q3.operators,F$0={formatMaximum:{okStr:"<=",ok:gD.LTE,fail:gD.GT},formatMinimum:{okStr:">=",ok:gD.GTE,fail:gD.LT},formatExclusiveMaximum:{okStr:"<",ok:gD.LT,fail:gD.GTE},formatExclusiveMinimum:{okStr:">",ok:gD.GT,fail:gD.LTE}},J$9={message:({keyword:$,schemaCode:Y})=>Q3.str`should be ${F$0[$].okStr} ${Y}`,params:({keyword:$,schemaCode:Y})=>Q3._`{comparison: ${F$0[$].okStr}, limit: ${Y}}`};WU4.formatLimitDefinition={keyword:Object.keys(F$0),type:"string",schemaType:"string",$data:!0,error:J$9,code($){let{gen:Y,data:X,schemaCode:G,keyword:J,it:Q}=$,{opts:W,self:Z}=Q;if(!W.validateFormats)return;let K=new G$9.KeywordCxt(Q,Z.RULES.all.format.definition,"format");if(K.$data)H();else z();function H(){let A=Y.scopeValue("formats",{ref:Z.formats,code:W.code.formats}),F=Y.const("fmt",Q3._`${A}[${K.schemaCode}]`);$.fail$data((0,Q3.or)(Q3._`typeof ${F} != "object"`,Q3._`${F} instanceof RegExp`,Q3._`typeof ${F}.compare != "function"`,V(F)))}function z(){let A=K.schema,F=Z.formats[A];if(!F||F===!0)return;if(typeof F!="object"||F instanceof RegExp||typeof F.compare!="function")throw Error(`"${J}": format "${A}" does not define "compare" function`);let N=Y.scopeValue("formats",{key:A,ref:F,code:W.code.formats?Q3._`${W.code.formats}${(0,Q3.getProperty)(A)}`:void 0});$.fail$data(V(N))}function V(A){return Q3._`${A}.compare(${X}, ${G}) ${F$0[J].fail} 0`}},dependencies:["format"]};var Q$9=($)=>{return $.addKeyword(WU4.formatLimitDefinition),$};WU4.default=Q$9});var zU4=o((_u,HU4)=>{Object.defineProperty(_u,"__esModule",{value:!0});var HT=QU4(),Z$9=ZU4(),Fm0=d6(),KU4=new Fm0.Name("fullFormats"),K$9=new Fm0.Name("fastFormats"),Dm0=($,Y={keywords:!0})=>{if(Array.isArray(Y))return UU4($,Y,HT.fullFormats,KU4),$;let[X,G]=Y.mode==="fast"?[HT.fastFormats,K$9]:[HT.fullFormats,KU4],J=Y.formats||HT.formatNames;if(UU4($,J,X,G),Y.keywords)(0,Z$9.default)($);return $};Dm0.get=($,Y="full")=>{let G=(Y==="fast"?HT.fastFormats:HT.fullFormats)[$];if(!G)throw Error(`Unknown format "${$}"`);return G};function UU4($,Y,X,G){var J,Q;(J=(Q=$.opts.code).formats)!==null&&J!==void 0||(Q.formats=Fm0._`require("ajv-formats/dist/formats").${G}`);for(let W of Y)$.addFormat(W,X[W])}HU4.exports=_u=Dm0;Object.defineProperty(_u,"__esModule",{value:!0});_u.default=Dm0});var mU4=o((BU7,gU4)=>{gU4.exports=fU4;fU4.sync=h$9;var bU4=L0("fs");function b$9($,Y){var X=Y.pathExt!==void 0?Y.pathExt:process.env.PATHEXT;if(!X)return!0;if(X=X.split(";"),X.indexOf("")!==-1)return!0;for(var G=0;G<X.length;G++){var J=X[G].toLowerCase();if(J&&$.substr(-J.length).toLowerCase()===J)return!0}return!1}function hU4($,Y,X){if(!$.isSymbolicLink()&&!$.isFile())return!1;return b$9(Y,X)}function fU4($,Y,X){bU4.stat($,function(G,J){X(G,G?!1:hU4(J,$,Y))})}function h$9($,Y){return hU4(bU4.statSync($),$,Y)}});var lU4=o((OU7,cU4)=>{cU4.exports=pU4;pU4.sync=f$9;var uU4=L0("fs");function pU4($,Y,X){uU4.stat($,function(G,J){X(G,G?!1:dU4(J,Y))})}function f$9($,Y){return dU4(uU4.statSync($),Y)}function dU4($,Y){return $.isFile()&&g$9($,Y)}function g$9($,Y){var{mode:X,uid:G,gid:J}=$,Q=Y.uid!==void 0?Y.uid:process.getuid&&process.getuid(),W=Y.gid!==void 0?Y.gid:process.getgid&&process.getgid(),Z=parseInt("100",8),K=parseInt("010",8),H=parseInt("001",8),z=Z|K,V=X&H||X&K&&J===W||X&Z&&G===Q||X&z&&Q===0;return V}});var nU4=o((MU7,iU4)=>{var EU7=L0("fs"),M$0;if(process.platform==="win32"||global.TESTING_WINDOWS)M$0=mU4();else M$0=lU4();iU4.exports=dm0;dm0.sync=m$9;function dm0($,Y,X){if(typeof Y==="function")X=Y,Y={};if(!X){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(G,J){dm0($,Y||{},function(Q,W){if(Q)J(Q);else G(W)})})}M$0($,Y||{},function(G,J){if(G){if(G.code==="EACCES"||Y&&Y.ignoreErrors)G=null,J=!1}X(G,J)})}function m$9($,Y){try{return M$0.sync($,Y||{})}catch(X){if(Y&&Y.ignoreErrors||X.code==="EACCES")return!1;else throw X}}});var $H4=o((RU7,eU4)=>{var ET=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",rU4=L0("path"),u$9=ET?";":":",aU4=nU4(),sU4=($)=>Object.assign(Error(`not found: ${$}`),{code:"ENOENT"}),oU4=($,Y)=>{let X=Y.colon||u$9,G=$.match(/\//)||ET&&$.match(/\\/)?[""]:[...ET?[process.cwd()]:[],...(Y.path||process.env.PATH||"").split(X)],J=ET?Y.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",Q=ET?J.split(X):[""];if(ET){if($.indexOf(".")!==-1&&Q[0]!=="")Q.unshift("")}return{pathEnv:G,pathExt:Q,pathExtExe:J}},tU4=($,Y,X)=>{if(typeof Y==="function")X=Y,Y={};if(!Y)Y={};let{pathEnv:G,pathExt:J,pathExtExe:Q}=oU4($,Y),W=[],Z=(H)=>new Promise((z,V)=>{if(H===G.length)return Y.all&&W.length?z(W):V(sU4($));let A=G[H],F=/^".*"$/.test(A)?A.slice(1,-1):A,N=rU4.join(F,$),D=!F&&/^\.[\\\/]/.test($)?$.slice(0,2)+N:N;z(K(D,H,0))}),K=(H,z,V)=>new Promise((A,F)=>{if(V===J.length)return A(Z(z+1));let N=J[V];aU4(H+N,{pathExt:Q},(D,L)=>{if(!D&&L)if(Y.all)W.push(H+N);else return A(H+N);return A(K(H,z,V+1))})});return X?Z(0).then((H)=>X(null,H),X):Z(0)},p$9=($,Y)=>{Y=Y||{};let{pathEnv:X,pathExt:G,pathExtExe:J}=oU4($,Y),Q=[];for(let W=0;W<X.length;W++){let Z=X[W],K=/^".*"$/.test(Z)?Z.slice(1,-1):Z,H=rU4.join(K,$),z=!K&&/^\.[\\\/]/.test($)?$.slice(0,2)+H:H;for(let V=0;V<G.length;V++){let A=z+G[V];try{if(aU4.sync(A,{pathExt:J}))if(Y.all)Q.push(A);else return A}catch(F){}}}if(Y.all&&Q.length)return Q;if(Y.nothrow)return null;throw sU4($)};eU4.exports=tU4;tU4.sync=p$9});var XH4=o((qU7,cm0)=>{var YH4=($={})=>{let Y=$.env||process.env;if(($.platform||process.platform)!=="win32")return"PATH";return Object.keys(Y).reverse().find((G)=>G.toUpperCase()==="PATH")||"Path"};cm0.exports=YH4;cm0.exports.default=YH4});var WH4=o((IU7,QH4)=>{var GH4=L0("path"),d$9=$H4(),c$9=XH4();function JH4($,Y){let X=$.options.env||process.env,G=process.cwd(),J=$.options.cwd!=null,Q=J&&process.chdir!==void 0&&!process.chdir.disabled;if(Q)try{process.chdir($.options.cwd)}catch(Z){}let W;try{W=d$9.sync($.command,{path:X[c$9({env:X})],pathExt:Y?GH4.delimiter:void 0})}catch(Z){}finally{if(Q)process.chdir(G)}if(W)W=GH4.resolve(J?$.options.cwd:"",W);return W}function l$9($){return JH4($)||JH4($,!0)}QH4.exports=l$9});var ZH4=o((r$9,im0)=>{var lm0=/([()\][%!^"`<>&|;, *?])/g;function i$9($){return $=$.replace(lm0,"^$1"),$}function n$9($,Y){if($=`${$}`,$=$.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),$=$.replace(/(?=(\\+?)?)\1$/,"$1$1"),$=`"${$}"`,$=$.replace(lm0,"^$1"),Y)$=$.replace(lm0,"^$1");return $}r$9.command=i$9;r$9.argument=n$9});var UH4=o((PU7,KH4)=>{KH4.exports=/^#!(.*)/});var zH4=o((wU7,HH4)=>{var o$9=UH4();HH4.exports=($="")=>{let Y=$.match(o$9);if(!Y)return null;let[X,G]=Y[0].replace(/#! ?/,"").split(" "),J=X.split("/").pop();if(J==="env")return G;return G?`${J} ${G}`:J}});var AH4=o((_U7,VH4)=>{var nm0=L0("fs"),t$9=zH4();function e$9($){let X=Buffer.alloc(150),G;try{G=nm0.openSync($,"r"),nm0.readSync(G,X,0,150,0),nm0.closeSync(G)}catch(J){}return t$9(X.toString())}VH4.exports=e$9});var LH4=o((jU7,NH4)=>{var $Y9=L0("path"),FH4=WH4(),DH4=ZH4(),YY9=AH4(),XY9=process.platform==="win32",GY9=/\.(?:com|exe)$/i,JY9=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function QY9($){$.file=FH4($);let Y=$.file&&YY9($.file);if(Y)return $.args.unshift($.file),$.command=Y,FH4($);return $.file}function WY9($){if(!XY9)return $;let Y=QY9($),X=!GY9.test(Y);if($.options.forceShell||X){let G=JY9.test(Y);$.command=$Y9.normalize($.command),$.command=DH4.command($.command),$.args=$.args.map((Q)=>DH4.argument(Q,G));let J=[$.command].concat($.args).join(" ");$.args=["/d","/s","/c",`"${J}"`],$.command=process.env.comspec||"cmd.exe",$.options.windowsVerbatimArguments=!0}return $}function ZY9($,Y,X){if(Y&&!Array.isArray(Y))X=Y,Y=null;Y=Y?Y.slice(0):[],X=Object.assign({},X);let G={command:$,args:Y,options:X,file:void 0,original:{command:$,args:Y}};return X.shell?G:WY9(G)}NH4.exports=ZY9});var EH4=o((TU7,OH4)=>{var rm0=process.platform==="win32";function am0($,Y){return Object.assign(Error(`${Y} ${$.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${Y} ${$.command}`,path:$.command,spawnargs:$.args})}function KY9($,Y){if(!rm0)return;let X=$.emit;$.emit=function(G,J){if(G==="exit"){let Q=BH4(J,Y);if(Q)return X.call($,"error",Q)}return X.apply($,arguments)}}function BH4($,Y){if(rm0&&$===1&&!Y.file)return am0(Y.original,"spawn");return null}function UY9($,Y){if(rm0&&$===1&&!Y.file)return am0(Y.original,"spawnSync");return null}OH4.exports={hookChildProcess:KY9,verifyENOENT:BH4,verifyENOENTSync:UY9,notFoundError:am0}});var qH4=o((CU7,MT)=>{var MH4=L0("child_process"),sm0=LH4(),om0=EH4();function RH4($,Y,X){let G=sm0($,Y,X),J=MH4.spawn(G.command,G.args,G.options);return om0.hookChildProcess(J,G),J}function HY9($,Y,X){let G=sm0($,Y,X),J=MH4.spawnSync(G.command,G.args,G.options);return J.error=J.error||om0.verifyENOENTSync(J.status,G),J}MT.exports=RH4;MT.exports.spawn=RH4;MT.exports.sync=HY9;MT.exports._parse=sm0;MT.exports._enoent=om0});var fH4=o((uH7,w$0)=>{/*!
 * bytes
 * Copyright(c) 2012-2014 TJ Holowaychuk
 * Copyright(c) 2015 Jed Watson
 * MIT Licensed
 */w$0.exports=dY9;w$0.exports.format=bH4;w$0.exports.parse=hH4;var mY9=/\B(?=(\d{3})+(?!\d))/g,uY9=/(?:\.0*|(\.[^0]+)0+)$/,pD={b:1,kb:1024,mb:1048576,gb:1073741824,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},pY9=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function dY9($,Y){if(typeof $==="string")return hH4($);if(typeof $==="number")return bH4($,Y);return null}function bH4($,Y){if(!Number.isFinite($))return null;var X=Math.abs($),G=Y&&Y.thousandsSeparator||"",J=Y&&Y.unitSeparator||"",Q=Y&&Y.decimalPlaces!==void 0?Y.decimalPlaces:2,W=Boolean(Y&&Y.fixedDecimals),Z=Y&&Y.unit||"";if(!Z||!pD[Z.toLowerCase()])if(X>=pD.pb)Z="PB";else if(X>=pD.tb)Z="TB";else if(X>=pD.gb)Z="GB";else if(X>=pD.mb)Z="MB";else if(X>=pD.kb)Z="KB";else Z="B";var K=$/pD[Z.toLowerCase()],H=K.toFixed(Q);if(!W)H=H.replace(uY9,"$1");if(G)H=H.split(".").map(function(z,V){return V===0?z.replace(mY9,G):z}).join(".");return H+J+Z}function hH4($){if(typeof $==="number"&&!isNaN($))return $;if(typeof $!=="string")return null;var Y=pY9.exec($),X,G="b";if(!Y)X=parseInt($,10),G="b";else X=parseFloat(Y[1]),G=Y[4].toLowerCase();if(isNaN(X))return null;return Math.floor(pD[G]*X)}});var dH4=o((pH7,pH4)=>{/*!
 * depd
 * Copyright(c) 2014-2018 Douglas Christopher Wilson
 * MIT Licensed
 */var cY9=L0("path").relative;pH4.exports=aY9;var lY9=process.cwd();function mH4($,Y){var X=$.split(/[ ,]+/),G=String(Y).toLowerCase();for(var J=0;J<X.length;J++){var Q=X[J];if(Q&&(Q==="*"||Q.toLowerCase()===G))return!0}return!1}function iY9($,Y,X){var G=Object.getOwnPropertyDescriptor($,Y),J=G.value;if(G.get=function(){return J},G.writable)G.set=function(W){return J=W};return delete G.value,delete G.writable,Object.defineProperty($,Y,G),G}function nY9($){var Y="";for(var X=0;X<$;X++)Y+=", arg"+X;return Y.substr(2)}function rY9($){var Y=this.name+": "+this.namespace;if(this.message)Y+=" deprecated "+this.message;for(var X=0;X<$.length;X++)Y+=`
    at `+$[X].toString();return Y}function aY9($){if(!$)throw TypeError("argument namespace is required");var Y=j$0(),X=qT(Y[1]),G=X[0];function J(Q){_$0.call(J,Q)}return J._file=G,J._ignored=oY9($),J._namespace=$,J._traced=tY9($),J._warned=Object.create(null),J.function=XX9,J.property=GX9,J}function sY9($,Y){var X=typeof $.listenerCount!=="function"?$.listeners(Y).length:$.listenerCount(Y);return X>0}function oY9($){if(process.noDeprecation)return!0;var Y=process.env.NO_DEPRECATION||"";return mH4(Y,$)}function tY9($){if(process.traceDeprecation)return!0;var Y=process.env.TRACE_DEPRECATION||"";return mH4(Y,$)}function _$0($,Y){var X=sY9(process,"deprecation");if(!X&&this._ignored)return;var G,J,Q,W,Z=0,K=!1,H=j$0(),z=this._file;if(Y)W=Y,Q=qT(H[1]),Q.name=W.name,z=Q[0];else Z=2,W=qT(H[Z]),Q=W;for(;Z<H.length;Z++)if(G=qT(H[Z]),J=G[0],J===z)K=!0;else if(J===this._file)z=this._file;else if(K)break;var V=G?W.join(":")+"__"+G.join(":"):void 0;if(V!==void 0&&V in this._warned)return;this._warned[V]=!0;var A=$;if(!A)A=Q===W||!Q.name?gH4(W):gH4(Q);if(X){var F=uH4(this._namespace,A,H.slice(Z));process.emit("deprecation",F);return}var N=process.stderr.isTTY?$X9:eY9,D=N.call(this,A,G,H.slice(Z));process.stderr.write(D+`
`,"utf8")}function qT($){var Y=$.getFileName()||"<anonymous>",X=$.getLineNumber(),G=$.getColumnNumber();if($.isEval())Y=$.getEvalOrigin()+", "+Y;var J=[Y,X,G];return J.callSite=$,J.name=$.getFunctionName(),J}function gH4($){var{callSite:Y,name:X}=$;if(!X)X="<anonymous@"+Wu0($)+">";var G=Y.getThis(),J=G&&Y.getTypeName();if(J==="Object")J=void 0;if(J==="Function")J=G.name||J;return J&&Y.getMethodName()?J+"."+X:X}function eY9($,Y,X){var G=new Date().toUTCString(),J=G+" "+this._namespace+" deprecated "+$;if(this._traced){for(var Q=0;Q<X.length;Q++)J+=`
    at `+X[Q].toString();return J}if(Y)J+=" at "+Wu0(Y);return J}function $X9($,Y,X){var G="\x1B[36;1m"+this._namespace+"\x1B[22;39m \x1B[33;1mdeprecated\x1B[22;39m \x1B[0m"+$+"\x1B[39m";if(this._traced){for(var J=0;J<X.length;J++)G+=`
    \x1B[36mat `+X[J].toString()+"\x1B[39m";return G}if(Y)G+=" \x1B[36m"+Wu0(Y)+"\x1B[39m";return G}function Wu0($){return cY9(lY9,$[0])+":"+$[1]+":"+$[2]}function j$0(){var $=Error.stackTraceLimit,Y={},X=Error.prepareStackTrace;Error.prepareStackTrace=YX9,Error.stackTraceLimit=Math.max(10,$),Error.captureStackTrace(Y);var G=Y.stack.slice(1);return Error.prepareStackTrace=X,Error.stackTraceLimit=$,G}function YX9($,Y){return Y}function XX9($,Y){if(typeof $!=="function")throw TypeError("argument fn must be a function");var X=nY9($.length),G=j$0(),J=qT(G[1]);J.name=$.name;var Q=Function("fn","log","deprecate","message","site",`"use strict"
return function (`+X+`) {log.call(deprecate, message, site)
return fn.apply(this, arguments)
}`)($,_$0,this,Y,J);return Q}function GX9($,Y,X){if(!$||typeof $!=="object"&&typeof $!=="function")throw TypeError("argument obj must be object");var G=Object.getOwnPropertyDescriptor($,Y);if(!G)throw TypeError("must call property on owner object");if(!G.configurable)throw TypeError("property must be configurable");var J=this,Q=j$0(),W=qT(Q[1]);if(W.name=Y,"value"in G)G=iY9($,Y,X);var{get:Z,set:K}=G;if(typeof Z==="function")G.get=function(){return _$0.call(J,X,W),Z.apply(this,arguments)};if(typeof K==="function")G.set=function(){return _$0.call(J,X,W),K.apply(this,arguments)};Object.defineProperty($,Y,G)}function uH4($,Y,X){var G=Error(),J;return Object.defineProperty(G,"constructor",{value:uH4}),Object.defineProperty(G,"message",{configurable:!0,enumerable:!1,value:Y,writable:!0}),Object.defineProperty(G,"name",{enumerable:!1,configurable:!0,value:"DeprecationError",writable:!0}),Object.defineProperty(G,"namespace",{configurable:!0,enumerable:!1,value:$,writable:!0}),Object.defineProperty(G,"stack",{configurable:!0,enumerable:!1,get:function(){if(J!==void 0)return J;return J=rY9.call(this,X)},set:function(W){J=W}}),G}});var lH4=o((dH7,cH4)=>{cH4.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?JX9:QX9);function JX9($,Y){return $.__proto__=Y,$}function QX9($,Y){for(var X in Y)if(!Object.prototype.hasOwnProperty.call($,X))$[X]=Y[X];return $}});var iH4=o((cH7,WX9)=>{WX9.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}});var aH4=o((lH7,rH4)=>{/*!
 * statuses
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2016 Douglas Christopher Wilson
 * MIT Licensed
 */var Zu0=iH4();rH4.exports=Z3;Z3.message=Zu0;Z3.code=ZX9(Zu0);Z3.codes=KX9(Zu0);Z3.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0};Z3.empty={204:!0,205:!0,304:!0};Z3.retry={502:!0,503:!0,504:!0};function ZX9($){var Y={};return Object.keys($).forEach(function(G){var J=$[G],Q=Number(G);Y[J.toLowerCase()]=Q}),Y}function KX9($){return Object.keys($).map(function(X){return Number(X)})}function UX9($){var Y=$.toLowerCase();if(!Object.prototype.hasOwnProperty.call(Z3.code,Y))throw Error('invalid status message: "'+$+'"');return Z3.code[Y]}function nH4($){if(!Object.prototype.hasOwnProperty.call(Z3.message,$))throw Error("invalid status code: "+$);return Z3.message[$]}function Z3($){if(typeof $==="number")return nH4($);if(typeof $!=="string")throw TypeError("code must be a number or string");var Y=parseInt($,10);if(!isNaN(Y))return nH4(Y);return UX9($)}});var oH4=o((iH7,sH4)=>{/*!
 * toidentifier
 * Copyright(c) 2016 Douglas Christopher Wilson
 * MIT Licensed
 */sH4.exports=HX9;function HX9($){return $.split(" ").map(function(Y){return Y.slice(0,1).toUpperCase()+Y.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}});var Xz4=o((nH7,ZM)=>{/*!
 * http-errors
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2016 Douglas Christopher Wilson
 * MIT Licensed
 */var zX9=dH4()("http-errors"),tH4=lH4(),IT=aH4(),Ku0=GL(),VX9=oH4();ZM.exports=T$0;ZM.exports.HttpError=AX9();ZM.exports.isHttpError=DX9(ZM.exports.HttpError);LX9(ZM.exports,IT.codes,ZM.exports.HttpError);function eH4($){return Number(String($).charAt(0)+"00")}function T$0(){var $,Y,X=500,G={};for(var J=0;J<arguments.length;J++){var Q=arguments[J],W=typeof Q;if(W==="object"&&Q instanceof Error)$=Q,X=$.status||$.statusCode||X;else if(W==="number"&&J===0)X=Q;else if(W==="string")Y=Q;else if(W==="object")G=Q;else throw TypeError("argument #"+(J+1)+" unsupported type "+W)}if(typeof X==="number"&&(X<400||X>=600))zX9("non-error status code; use only 4xx or 5xx status codes");if(typeof X!=="number"||!IT.message[X]&&(X<400||X>=600))X=500;var Z=T$0[X]||T$0[eH4(X)];if(!$)$=Z?new Z(Y):Error(Y||IT.message[X]),Error.captureStackTrace($,T$0);if(!Z||!($ instanceof Z)||$.status!==X)$.expose=X<500,$.status=$.statusCode=X;for(var K in G)if(K!=="status"&&K!=="statusCode")$[K]=G[K];return $}function AX9(){function $(){throw TypeError("cannot construct abstract class")}return Ku0($,Error),$}function FX9($,Y,X){var G=Yz4(Y);function J(Q){var W=Q!=null?Q:IT.message[X],Z=Error(W);return Error.captureStackTrace(Z,J),tH4(Z,J.prototype),Object.defineProperty(Z,"message",{enumerable:!0,configurable:!0,value:W,writable:!0}),Object.defineProperty(Z,"name",{enumerable:!1,configurable:!0,value:G,writable:!0}),Z}return Ku0(J,$),$z4(J,G),J.prototype.status=X,J.prototype.statusCode=X,J.prototype.expose=!0,J}function DX9($){return function(X){if(!X||typeof X!=="object")return!1;if(X instanceof $)return!0;return X instanceof Error&&typeof X.expose==="boolean"&&typeof X.statusCode==="number"&&X.status===X.statusCode}}function NX9($,Y,X){var G=Yz4(Y);function J(Q){var W=Q!=null?Q:IT.message[X],Z=Error(W);return Error.captureStackTrace(Z,J),tH4(Z,J.prototype),Object.defineProperty(Z,"message",{enumerable:!0,configurable:!0,value:W,writable:!0}),Object.defineProperty(Z,"name",{enumerable:!1,configurable:!0,value:G,writable:!0}),Z}return Ku0(J,$),$z4(J,G),J.prototype.status=X,J.prototype.statusCode=X,J.prototype.expose=!1,J}function $z4($,Y){var X=Object.getOwnPropertyDescriptor($,"name");if(X&&X.configurable)X.value=Y,Object.defineProperty($,"name",X)}function LX9($,Y,X){Y.forEach(function(J){var Q,W=VX9(IT.message[J]);switch(eH4(J)){case 400:Q=FX9(X,W,J);break;case 500:Q=NX9(X,W,J);break}if(Q)$[J]=Q,$[W]=Q})}function Yz4($){return $.slice(-5)==="Error"?$:$+"Error"}});var Jz4=o((rH7,Gz4)=>{/*!
 * unpipe
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */Gz4.exports=OX9;function BX9($){var Y=$.listeners("data");for(var X=0;X<Y.length;X++)if(Y[X].name==="ondata")return!0;return!1}function OX9($){if(!$)throw TypeError("argument stream is required");if(typeof $.unpipe==="function"){$.unpipe();return}if(!BX9($))return;var Y,X=$.listeners("close");for(var G=0;G<X.length;G++){if(Y=X[G],Y.name!=="cleanup"&&Y.name!=="onclose")continue;Y.call($)}}});var Kz4=o((aH7,Zz4)=>{/*!
 * raw-body
 * Copyright(c) 2013-2014 Jonathan Ong
 * Copyright(c) 2014-2022 Douglas Christopher Wilson
 * MIT Licensed
 */var Qz4=_X9(),EX9=fH4(),KM=Xz4(),MX9=e30(),RX9=Jz4();Zz4.exports=PX9;var qX9=/^Encoding not recognized: /;function IX9($){if(!$)return null;try{return MX9.getDecoder($)}catch(Y){if(!qX9.test(Y.message))throw Y;throw KM(415,"specified encoding unsupported",{encoding:$,type:"encoding.unsupported"})}}function PX9($,Y,X){var G=X,J=Y||{};if($===void 0)throw TypeError("argument stream is required");else if(typeof $!=="object"||$===null||typeof $.on!=="function")throw TypeError("argument stream must be a stream");if(Y===!0||typeof Y==="string")J={encoding:Y};if(typeof Y==="function")G=Y,J={};if(G!==void 0&&typeof G!=="function")throw TypeError("argument callback must be a function");if(!G&&!global.Promise)throw TypeError("argument callback is required");var Q=J.encoding!==!0?J.encoding:"utf-8",W=EX9.parse(J.limit),Z=J.length!=null&&!isNaN(J.length)?parseInt(J.length,10):null;if(G)return Wz4($,Q,Z,W,jX9(G));return new Promise(function(H,z){Wz4($,Q,Z,W,function(A,F){if(A)return z(A);H(F)})})}function wX9($){if(RX9($),typeof $.pause==="function")$.pause()}function Wz4($,Y,X,G,J){var Q=!1,W=!0;if(G!==null&&X!==null&&X>G)return V(KM(413,"request entity too large",{expected:X,length:X,limit:G,type:"entity.too.large"}));var Z=$._readableState;if($._decoder||Z&&(Z.encoding||Z.decoder))return V(KM(500,"stream encoding should not be set",{type:"stream.encoding.set"}));if(typeof $.readable<"u"&&!$.readable)return V(KM(500,"stream is not readable",{type:"stream.not.readable"}));var K=0,H;try{H=IX9(Y)}catch(L){return V(L)}var z=H?"":[];$.on("aborted",A),$.on("close",D),$.on("data",F),$.on("end",N),$.on("error",N),W=!1;function V(){var L=Array(arguments.length);for(var B=0;B<L.length;B++)L[B]=arguments[B];if(Q=!0,W)process.nextTick(O);else O();function O(){if(D(),L[0])wX9($);J.apply(null,L)}}function A(){if(Q)return;V(KM(400,"request aborted",{code:"ECONNABORTED",expected:X,length:X,received:K,type:"request.aborted"}))}function F(L){if(Q)return;if(K+=L.length,G!==null&&K>G)V(KM(413,"request entity too large",{limit:G,received:K,type:"entity.too.large"}));else if(H)z+=H.write(L);else z.push(L)}function N(L){if(Q)return;if(L)return V(L);if(X!==null&&K!==X)V(KM(400,"request size did not match content length",{expected:X,length:X,received:K,type:"request.size.invalid"}));else{var B=H?z+(H.end()||""):Buffer.concat(z);V(null,B)}}function D(){z=null,$.removeListener("aborted",A),$.removeListener("data",F),$.removeListener("end",N),$.removeListener("error",N),$.removeListener("close",D)}}function _X9(){try{return L0("async_hooks")}catch($){return{}}}function jX9($){var Y;if(Qz4.AsyncResource)Y=new Qz4.AsyncResource($.name||"bound-anonymous-fn");if(!Y||!Y.runInAsyncScope)return $;return Y.runInAsyncScope.bind(Y,$,null)}});var Vz4=o((hX9)=>{/*!
 * content-type
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */var Uz4=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,TX9=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Hz4=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,CX9=/\\([\u000b\u0020-\u00ff])/g,SX9=/([\\"])/g,zz4=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;hX9.format=kX9;hX9.parse=vX9;function kX9($){if(!$||typeof $!=="object")throw TypeError("argument obj is required");var{parameters:Y,type:X}=$;if(!X||!zz4.test(X))throw TypeError("invalid type");var G=X;if(Y&&typeof Y==="object"){var J,Q=Object.keys(Y).sort();for(var W=0;W<Q.length;W++){if(J=Q[W],!Hz4.test(J))throw TypeError("invalid parameter name");G+="; "+J+"="+yX9(Y[J])}}return G}function vX9($){if(!$)throw TypeError("argument string is required");var Y=typeof $==="object"?xX9($):$;if(typeof Y!=="string")throw TypeError("argument string is required to be a string");var X=Y.indexOf(";"),G=X!==-1?Y.slice(0,X).trim():Y.trim();if(!zz4.test(G))throw TypeError("invalid media type");var J=new bX9(G.toLowerCase());if(X!==-1){var Q,W,Z;Uz4.lastIndex=X;while(W=Uz4.exec(Y)){if(W.index!==X)throw TypeError("invalid parameter format");if(X+=W[0].length,Q=W[1].toLowerCase(),Z=W[2],Z.charCodeAt(0)===34){if(Z=Z.slice(1,-1),Z.indexOf("\\")!==-1)Z=Z.replace(CX9,"$1")}J.parameters[Q]=Z}if(X!==Y.length)throw TypeError("invalid parameter format")}return J}function xX9($){var Y;if(typeof $.getHeader==="function")Y=$.getHeader("content-type");else if(typeof $.headers==="object")Y=$.headers&&$.headers["content-type"];if(typeof Y!=="string")throw TypeError("content-type header is missing from object");return Y}function yX9($){var Y=String($);if(Hz4.test(Y))return Y;if(Y.length>0&&!TX9.test(Y))throw TypeError("invalid parameter value");return'"'+Y.replace(SX9,"\\$1")+'"'}function bX9($){this.parameters=Object.create(null),this.type=$}});var wz4={};W8(wz4,{validatePermissions:()=>Bg1,validateLicense:()=>hj0,resolvePermissionsFromMapping:()=>u10,resolvePermissions:()=>m10,matchesPermission:()=>QO,isValidPermissionPattern:()=>bj0,isLicenseValid:()=>eP,isFeatureEnabled:()=>Eg1,isEELicenseValid:()=>Og1,isEEEnabled:()=>Mg1,isDevEnvironment:()=>p10,isAuthenticated:()=>Rg1,hasPermission:()=>Pg1,getDefaultRole:()=>Ig1,checkFGA:()=>M50,buildCapabilities:()=>qg1,StaticRBACProvider:()=>wg1,RESOURCES:()=>Dg1,PERMISSION_PATTERNS:()=>yj0,PERMISSIONS:()=>Lg1,MastraFGAPermissions:()=>_z,FGADeniedError:()=>R50,DEFAULT_ROLES:()=>d10,ACTIONS:()=>Ng1});var _z4=V0(()=>{fj0();ib0()});var gu=V0(()=>{z_();Xg()});var VF4=o((K2)=>{var PZ9=K2&&K2.__createBinding||(Object.create?function($,Y,X,G){if(G===void 0)G=X;var J=Object.getOwnPropertyDescriptor(Y,X);if(!J||("get"in J?!Y.__esModule:J.writable||J.configurable))J={enumerable:!0,get:function(){return Y[X]}};Object.defineProperty($,G,J)}:function($,Y,X,G){if(G===void 0)G=X;$[G]=Y[X]}),wZ9=K2&&K2.__setModuleDefault||(Object.create?function($,Y){Object.defineProperty($,"default",{enumerable:!0,value:Y})}:function($,Y){$.default=Y}),zF4=K2&&K2.__importStar||function($){if($&&$.__esModule)return $;var Y={};if($!=null){for(var X in $)if(X!=="default"&&Object.prototype.hasOwnProperty.call($,X))PZ9(Y,$,X)}return wZ9(Y,$),Y};Object.defineProperty(K2,"__esModule",{value:!0});K2.load=K2.currentTarget=void 0;var _Z9=zF4(L0("path")),jZ9=zF4(L0("fs"));function TZ9(){let $=null;switch(process.platform){case"android":switch(process.arch){case"arm":return"android-arm-eabi";case"arm64":return"android-arm64"}$="Android";break;case"win32":switch(process.arch){case"x64":return"win32-x64-msvc";case"arm64":return"win32-arm64-msvc";case"ia32":return"win32-ia32-msvc"}$="Windows";break;case"darwin":switch(process.arch){case"x64":return"darwin-x64";case"arm64":return"darwin-arm64"}$="macOS";break;case"linux":switch(process.arch){case"x64":case"arm64":return CZ9()?`linux-${process.arch}-gnu`:`linux-${process.arch}-musl`;case"arm":return"linux-arm-gnueabihf"}$="Linux";break;case"freebsd":if(process.arch==="x64")return"freebsd-x64";$="FreeBSD";break}if($)throw Error(`Neon: unsupported ${$} architecture: ${process.arch}`);throw Error(`Neon: unsupported system: ${process.platform}`)}K2.currentTarget=TZ9;function CZ9(){let $=process.report?.getReport();if(typeof $!=="object"||!$||!("header"in $))return!1;let Y=$.header;return typeof Y==="object"&&!!Y&&"glibcVersionRuntime"in Y}function SZ9($){let Y=_Z9.join($,"index.node");return jZ9.existsSync(Y)?L0(Y):null}K2.load=SZ9});var FF4=o((BD7,AF4)=>{var kZ9={ALLOW:0,DENY:1};AF4.exports=kZ9});var NF4=o((OD7,DF4)=>{var lu0={value:"SqliteError",writable:!0,enumerable:!1,configurable:!0};function LM($,Y,X){if(new.target!==LM)return new LM($,Y);if(typeof Y!=="string")throw TypeError("Expected second argument to be a string");Error.call(this,$),lu0.value=""+$,Object.defineProperty(this,"message",lu0),Error.captureStackTrace(this,LM),this.code=Y,this.rawCode=X}Object.setPrototypeOf(LM,Error);Object.setPrototypeOf(LM.prototype,Error.prototype);Object.defineProperty(LM.prototype,"name",lu0);DF4.exports=LM});var IF4=o((ED7,p$0)=>{var __dirname="D:\\tbc_project\\tbc_backend_2.0.0\\node_modules\\libsql",{load:vZ9,currentTarget:xZ9}=VF4(),{familySync:LF4,GLIBC:yZ9,MUSL:bZ9}=TJ0();function hZ9(){if(process.env.LIBSQL_JS_DEV)return vZ9(__dirname);let $=xZ9();if(LF4()==yZ9)switch($){case"linux-x64-musl":$="linux-x64-gnu";break;case"linux-arm64-musl":$="linux-arm64-gnu";break}if($==="linux-arm-gnueabihf"&&LF4()==bZ9)$="linux-arm-musleabihf";return L0(`@libsql/${$}`)}var{databaseOpen:fZ9,databaseOpenWithSync:gZ9,databaseInTransaction:mZ9,databaseInterrupt:uZ9,databaseClose:pZ9,databaseSyncSync:dZ9,databaseSyncUntilSync:cZ9,databaseExecSync:lZ9,databasePrepareSync:iZ9,databaseDefaultSafeIntegers:nZ9,databaseAuthorizer:rZ9,databaseLoadExtension:aZ9,databaseMaxWriteReplicationIndex:sZ9,statementRaw:oZ9,statementIsReader:tZ9,statementGet:BF4,statementRun:OF4,statementInterrupt:eZ9,statementRowsSync:EF4,statementColumns:$29,statementSafeIntegers:Y29,rowsNext:X29}=hZ9(),G29=FF4(),MF4=NF4();function fT($){if($.libsqlError)return new MF4($.message,$.code,$.rawCode);return $}class RF4{constructor($,Y){let X=Y?.encryptionCipher??"aes256cbc";if(Y&&Y.syncUrl){var G="";if(Y.syncAuth)console.warn("Warning: The `syncAuth` option is deprecated, please use `authToken` option instead."),G=Y.syncAuth;else if(Y.authToken)G=Y.authToken;let Q=Y?.encryptionKey??"",W=Y?.syncPeriod??0,Z=Y?.readYourWrites??!0,K=Y?.offline??!1,H=Y?.remoteEncryptionKey??"";this.db=gZ9($,Y.syncUrl,G,X,Q,W,Z,K,H)}else{let Q=Y?.authToken??"",W=Y?.encryptionKey??"",Z=Y?.timeout??0,K=Y?.remoteEncryptionKey??"";this.db=fZ9($,Q,X,W,Z,K)}this.memory=$===":memory:",this.readonly=!1,this.name="",this.open=!0;let J=this.db;Object.defineProperties(this,{inTransaction:{get(){return mZ9(J)}}})}sync(){return dZ9.call(this.db)}syncUntil($){return cZ9.call(this.db,$)}prepare($){try{let Y=iZ9.call(this.db,$);return new qF4(Y)}catch(Y){throw fT(Y)}}transaction($){if(typeof $!=="function")throw TypeError("Expected first argument to be a function");let Y=this,X=(J)=>{return(...Q)=>{Y.exec("BEGIN "+J);try{let W=$(...Q);return Y.exec("COMMIT"),W}catch(W){throw Y.exec("ROLLBACK"),W}}},G={default:{value:X("")},deferred:{value:X("DEFERRED")},immediate:{value:X("IMMEDIATE")},exclusive:{value:X("EXCLUSIVE")},database:{value:this,enumerable:!0}};return Object.defineProperties(G.default.value,G),Object.defineProperties(G.deferred.value,G),Object.defineProperties(G.immediate.value,G),Object.defineProperties(G.exclusive.value,G),G.default.value}pragma($,Y){if(Y==null)Y={};if(typeof $!=="string")throw TypeError("Expected first argument to be a string");if(typeof Y!=="object")throw TypeError("Expected second argument to be an options object");let X=Y.simple,G=this.prepare(`PRAGMA ${$}`,this,!0);return X?G.pluck().get():G.all()}backup($,Y){throw Error("not implemented")}serialize($){throw Error("not implemented")}function($,Y,X){if(Y==null)Y={};if(typeof Y==="function")X=Y,Y={};if(typeof $!=="string")throw TypeError("Expected first argument to be a string");if(typeof X!=="function")throw TypeError("Expected last argument to be a function");if(typeof Y!=="object")throw TypeError("Expected second argument to be an options object");if(!$)throw TypeError("User-defined function name cannot be an empty string");throw Error("not implemented")}aggregate($,Y){if(typeof $!=="string")throw TypeError("Expected first argument to be a string");if(typeof Y!=="object"||Y===null)throw TypeError("Expected second argument to be an options object");if(!$)throw TypeError("User-defined function name cannot be an empty string");throw Error("not implemented")}table($,Y){if(typeof $!=="string")throw TypeError("Expected first argument to be a string");if(!$)throw TypeError("Virtual table module name cannot be an empty string");throw Error("not implemented")}authorizer($){rZ9.call(this.db,$)}loadExtension(...$){aZ9.call(this.db,...$)}maxWriteReplicationIndex(){return sZ9.call(this.db)}exec($){try{lZ9.call(this.db,$)}catch(Y){throw fT(Y)}}interrupt(){uZ9.call(this.db)}close(){pZ9.call(this.db),this.open=!1}defaultSafeIntegers($){return nZ9.call(this.db,$??!0),this}unsafeMode(...$){throw Error("not implemented")}}class qF4{constructor($){this.stmt=$,this.pluckMode=!1}raw($){return oZ9.call(this.stmt,$??!0),this}pluck($){return this.pluckMode=$??!0,this}get reader(){return tZ9.call(this.stmt)}run(...$){try{if($.length==1&&typeof $[0]==="object")return OF4.call(this.stmt,$[0]);else return OF4.call(this.stmt,$.flat())}catch(Y){throw fT(Y)}}get(...$){try{if($.length==1&&typeof $[0]==="object")return BF4.call(this.stmt,$[0]);else return BF4.call(this.stmt,$.flat())}catch(Y){throw fT(Y)}}iterate(...$){var Y=void 0;if($.length==1&&typeof $[0]==="object")Y=EF4.call(this.stmt,$[0]);else Y=EF4.call(this.stmt,$.flat());return{nextRows:Array(100),nextRowIndex:100,next(){try{if(this.nextRowIndex===100)X29.call(Y,this.nextRows),this.nextRowIndex=0;let G=this.nextRows[this.nextRowIndex];if(this.nextRows[this.nextRowIndex]=void 0,!G)return{done:!0};return this.nextRowIndex++,{value:G,done:!1}}catch(G){throw fT(G)}},[Symbol.iterator](){return this}}}all(...$){try{let Y=[];for(let X of this.iterate(...$))if(this.pluckMode)Y.push(X[Object.keys(X)[0]]);else Y.push(X);return Y}catch(Y){throw fT(Y)}}interrupt(){eZ9.call(this.stmt)}columns(){return $29.call(this.stmt)}safeIntegers($){return Y29.call(this.stmt,$??!0),this}}p$0.exports=RF4;p$0.exports.Authorization=G29;p$0.exports.SqliteError=MF4});var Zp0=o((IB7,HD4)=>{function IK9($){var Y=0,X=[];function G(){if(Y--,Y<$)J()}function J(){var K=X.shift();if(Z.queue=X.length,K)W(K.fn).then(K.resolve).catch(K.reject)}function Q(K){return new Promise(function(H,z){X.push({fn:K,resolve:H,reject:z}),Z.queue=X.length})}function W(K){Y++;try{return Promise.resolve(K()).then(function(H){return G(),H},function(H){throw G(),H})}catch(H){return G(),Promise.reject(H)}}var Z=function(K){if(Y>=$)return Q(K);else return W(K)};return Z}function PK9($,Y){var X=!1,G=this;return Promise.all($.map(function(){var J=arguments;return G(function(){if(!X)return Y.apply(void 0,J).catch(function(Q){throw X=!0,Q})})}))}function UD4($){return $.queue=0,$.map=PK9,$}HD4.exports=function($){if($)return UD4(IK9($));else return UD4(function(Y){return Y()})}});var MD4={};W8(MD4,{userIdField:()=>e40,updatedAtField:()=>AS0,updateSpanRecordSchema:()=>H90,updateSpanArgsSchema:()=>r44,transformScoreRow:()=>N90,transformRow:()=>ax0,tracesOrderBySchema:()=>yx0,tracesOrderByFieldSchema:()=>xx0,tracesFilterSchema:()=>vx0,traceSpanSchema:()=>W90,traceIdField:()=>v7,toTraceSpans:()=>i_,toTraceSpan:()=>l_,toEntityType:()=>zE,threadIdField:()=>J60,tagsField:()=>dw,spanRecordSchema:()=>yU,spanIdsSchema:()=>k44,spanIds:()=>c_,spanIdField:()=>FQ,spanContextFields:()=>_O,sourceField:()=>ES0,sortDirectionSchema:()=>qU,sessionIdField:()=>G60,serviceNameField:()=>K60,serializeSpanAttributes:()=>O90,serializeDate:()=>z64,scoresOrderBySchema:()=>TS0,scoresOrderByFieldSchema:()=>jS0,scoresFilterSchema:()=>jO,scoreTracesResponseSchema:()=>e44,scoreTracesRequestSchema:()=>t44,scoreRecordSchema:()=>D60,scoreInputSchema:()=>Xn1,scopeField:()=>qS0,safelyParseJSON:()=>N8,runIdField:()=>X60,rootEntityTypeField:()=>z60,rootEntityNameField:()=>V60,rootEntityIdField:()=>RS0,resourceIdField:()=>Y60,requestIdField:()=>Q60,parentEntityTypeField:()=>U60,parentEntityNameField:()=>H60,parentEntityIdField:()=>MS0,paginationInfoSchema:()=>iZ,paginationArgsSchema:()=>fz,organizationIdField:()=>$60,normalizePerPage:()=>A4,metricsOrderBySchema:()=>yS0,metricsOrderByFieldSchema:()=>xS0,metricsFilterSchema:()=>TO,metricsAggregationSchema:()=>dn1,metricTypeSchema:()=>xn1,metricRecordSchema:()=>E60,metricInputSchema:()=>un1,metadataField:()=>pw,logsOrderBySchema:()=>_S0,logsOrderByFieldSchema:()=>wS0,logsFilterSchema:()=>PS0,logRecordSchema:()=>A60,logRecordInputSchema:()=>ai1,logLevelSchema:()=>hw,listTracesResponseSchema:()=>l44,listTracesLightResponseSchema:()=>i44,listTracesArgsSchema:()=>n_,listScoresResponseSchema:()=>Zn1,listScoresBySpanResponseSchema:()=>o44,listScoresArgsSchema:()=>N60,listMetricsResponseSchema:()=>cn1,listMetricsArgsSchema:()=>M60,listLogsResponseSchema:()=>oi1,listLogsArgsSchema:()=>F60,listFeedbackResponseSchema:()=>Pn1,listFeedbackArgsSchema:()=>O60,listBranchesResponseSchema:()=>n44,listBranchesArgsSchema:()=>U90,lightSpanRecordSchema:()=>K90,jsonValueEquals:()=>JV,getTraceResponseSchema:()=>p44,getTraceLightResponseSchema:()=>c44,getTraceArgsSchema:()=>u44,getTagsResponseSchema:()=>Fr1,getTagsArgsSchema:()=>Ar1,getStructureResponseSchema:()=>kx0,getStringOrNull:()=>p5,getSqlType:()=>B90,getSpansResponseSchema:()=>f44,getSpansArgsSchema:()=>h44,getSpanResponseSchema:()=>b44,getSpanArgsSchema:()=>y44,getServiceNamesResponseSchema:()=>Hr1,getServiceNamesArgsSchema:()=>Ur1,getScoreTimeSeriesResponseSchema:()=>An1,getScoreTimeSeriesArgsSchema:()=>Vn1,getScorePercentilesResponseSchema:()=>Dn1,getScorePercentilesArgsSchema:()=>Fn1,getScoreBreakdownResponseSchema:()=>zn1,getScoreBreakdownArgsSchema:()=>Hn1,getScoreAggregateResponseSchema:()=>Un1,getScoreAggregateArgsSchema:()=>Kn1,getRootSpanResponseSchema:()=>m44,getRootSpanArgsSchema:()=>g44,getObjectOrNull:()=>tx0,getMetricTimeSeriesResponseSchema:()=>sn1,getMetricTimeSeriesArgsSchema:()=>an1,getMetricPercentilesResponseSchema:()=>tn1,getMetricPercentilesArgsSchema:()=>on1,getMetricNamesResponseSchema:()=>$r1,getMetricNamesArgsSchema:()=>en1,getMetricLabelValuesResponseSchema:()=>Jr1,getMetricLabelValuesArgsSchema:()=>Gr1,getMetricLabelKeysResponseSchema:()=>Xr1,getMetricLabelKeysArgsSchema:()=>Yr1,getMetricBreakdownResponseSchema:()=>rn1,getMetricBreakdownArgsSchema:()=>nn1,getMetricAggregateResponseSchema:()=>in1,getMetricAggregateArgsSchema:()=>ln1,getFeedbackTimeSeriesResponseSchema:()=>Sn1,getFeedbackTimeSeriesArgsSchema:()=>Cn1,getFeedbackPercentilesResponseSchema:()=>vn1,getFeedbackPercentilesArgsSchema:()=>kn1,getFeedbackBreakdownResponseSchema:()=>Tn1,getFeedbackBreakdownArgsSchema:()=>jn1,getFeedbackAggregateResponseSchema:()=>_n1,getFeedbackAggregateArgsSchema:()=>wn1,getEnvironmentsResponseSchema:()=>Vr1,getEnvironmentsArgsSchema:()=>zr1,getEntityTypesResponseSchema:()=>Wr1,getEntityTypesArgsSchema:()=>Qr1,getEntityNamesResponseSchema:()=>Kr1,getEntityNamesArgsSchema:()=>Zr1,getDefaultValue:()=>H64,getBranchResponseSchema:()=>d44,getBranchArgsSchema:()=>Z90,filterByDateRange:()=>D90,feedbackRecordSchema:()=>B60,feedbackOrderBySchema:()=>kS0,feedbackOrderByFieldSchema:()=>SS0,feedbackInputSchema:()=>Bn1,feedbackFilterSchema:()=>rw,extractBranchSpans:()=>yg,experimentIdField:()=>uw,executionSourceField:()=>Z60,environmentField:()=>W60,entityTypeField:()=>aF,entityNameField:()=>t40,entityIdField:()=>OS0,ensureDate:()=>i$,distinctColumnSchema:()=>kf,dbTimestamps:()=>PO,dateRangeSchema:()=>rF,createdAtField:()=>VS0,createVectorErrorId:()=>sx0,createStoreErrorId:()=>L90,createStorageErrorId:()=>P0,createSpanRecordSchema:()=>xg,createSpanArgsSchema:()=>v44,createScoreResponseSchema:()=>Qn1,createScoreRecordSchema:()=>Sf,createScoreBodySchema:()=>Jn1,createScoreArgsSchema:()=>Gn1,createMetricRecordSchema:()=>vS0,createLogRecordSchema:()=>IS0,createFeedbackResponseSchema:()=>Rn1,createFeedbackRecordSchema:()=>On1,createFeedbackBodySchema:()=>Mn1,createFeedbackArgsSchema:()=>En1,contextFields:()=>cw,computeTraceStatus:()=>Sx0,comparePeriodSchema:()=>Cf,commonFilterFields:()=>lw,calculatePagination:()=>B4,buildUpdateSpanRecord:()=>A64,buildStorageSchema:()=>mx0,buildScoreRecord:()=>N64,buildMetricRecord:()=>F64,buildLogRecord:()=>D64,buildFeedbackRecord:()=>L64,buildCreateSpanRecord:()=>V64,branchesOrderBySchema:()=>gx0,branchesOrderByFieldSchema:()=>fx0,branchesFilterSchema:()=>hx0,batchUpdateSpansArgsSchema:()=>a44,batchDeleteTracesArgsSchema:()=>s44,batchCreateSpansArgsSchema:()=>x44,batchCreateScoresArgsSchema:()=>Wn1,batchCreateMetricsArgsSchema:()=>pn1,batchCreateLogsArgsSchema:()=>si1,batchCreateFeedbackArgsSchema:()=>qn1,aggregationTypeSchema:()=>nZ,aggregationIntervalSchema:()=>gz,WorkspacesStorage:()=>u_,WorkflowsStorage:()=>Qm,WorkflowsInMemory:()=>Ky0,WORKSPACE_VERSIONS_SCHEMA:()=>lg,WORKSPACES_SCHEMA:()=>cg,VersionedStorageDomain:()=>QG,TraceStatus:()=>DD,TABLE_WORKSPACE_VERSIONS:()=>d$,TABLE_WORKSPACES:()=>WJ,TABLE_WORKFLOW_SNAPSHOT:()=>D7,TABLE_TRACES:()=>ux0,TABLE_THREADS:()=>OX,TABLE_SPANS:()=>V6,TABLE_SKILL_VERSIONS:()=>w$,TABLE_SKILL_BLOBS:()=>ZJ,TABLE_SKILLS:()=>cY,TABLE_SCORER_DEFINITION_VERSIONS:()=>m$,TABLE_SCORER_DEFINITIONS:()=>PQ,TABLE_SCORERS:()=>N7,TABLE_SCHEMAS:()=>F5,TABLE_SCHEDULE_TRIGGERS:()=>hK,TABLE_SCHEDULES:()=>EX,TABLE_RESOURCES:()=>bU,TABLE_PROMPT_BLOCK_VERSIONS:()=>P$,TABLE_PROMPT_BLOCKS:()=>IQ,TABLE_OBSERVATIONAL_MEMORY:()=>px0,TABLE_MESSAGES:()=>j5,TABLE_MCP_SERVER_VERSIONS:()=>p$,TABLE_MCP_SERVERS:()=>QJ,TABLE_MCP_CLIENT_VERSIONS:()=>u$,TABLE_MCP_CLIENTS:()=>JJ,TABLE_FAVORITES:()=>zG,TABLE_EXPERIMENT_RESULTS:()=>c$,TABLE_EXPERIMENTS:()=>iY,TABLE_DATASET_VERSIONS:()=>lY,TABLE_DATASET_ITEMS:()=>I8,TABLE_DATASETS:()=>D8,TABLE_CONFIGS:()=>G64,TABLE_CHANNEL_INSTALLATIONS:()=>VG,TABLE_CHANNEL_CONFIG:()=>fK,TABLE_BACKGROUND_TASKS:()=>l$,TABLE_AGENT_VERSIONS:()=>u5,TABLE_AGENTS:()=>L7,StoreOperationsInMemory:()=>M64,StoreOperations:()=>zy0,StorageDomain:()=>IW,SkillsStorage:()=>m_,ScoresStorage:()=>Jm,ScoresInMemory:()=>Zy0,ScorerDefinitionsStorage:()=>g_,SchedulesStorage:()=>Gm,STORAGE_VISIBILITY_VALUES:()=>$64,STORAGE_FAVORITE_ENTITY_TYPES:()=>Y64,SPAN_SCHEMA:()=>a_,SKILL_VERSIONS_SCHEMA:()=>e_,SKILL_BLOBS_SCHEMA:()=>ig,SKILLS_SCHEMA:()=>o_,SCORER_DEFINITION_VERSIONS_SCHEMA:()=>gg,SCORER_DEFINITIONS_SCHEMA:()=>fg,SCORERS_SCHEMA:()=>r_,PromptBlocksStorage:()=>f_,PROMPT_BLOCK_VERSIONS_SCHEMA:()=>s_,PROMPT_BLOCKS_SCHEMA:()=>hg,ObservabilityStorage:()=>sg,ObservabilityInMemory:()=>ox0,OLD_SPAN_SCHEMA:()=>X64,OBSERVATIONAL_MEMORY_TABLE_SCHEMA:()=>J64,OBSERVATIONAL_MEMORY_SCHEMA:()=>dx0,MockStore:()=>B64,MemoryStorage:()=>Xm,MastraStorage:()=>pi1,MastraCompositeStore:()=>nF,METRIC_DISTINCT_COLUMNS:()=>bS0,MCP_SERVER_VERSIONS_SCHEMA:()=>dg,MCP_SERVERS_SCHEMA:()=>pg,MCP_CLIENT_VERSIONS_SCHEMA:()=>ug,MCP_CLIENTS_SCHEMA:()=>mg,MCPServersStorage:()=>h_,MCPClientsStorage:()=>d_,InMemoryWorkspacesStorage:()=>s80,InMemoryStore:()=>Uy0,InMemorySkillsStorage:()=>r80,InMemoryScorerDefinitionsStorage:()=>i80,InMemorySchedulesStorage:()=>Wy0,InMemoryPromptBlocksStorage:()=>c80,InMemoryMemory:()=>Qy0,InMemoryMCPServersStorage:()=>p80,InMemoryMCPClientsStorage:()=>X90,InMemoryFavoritesStorage:()=>Y90,InMemoryDB:()=>Jy0,InMemoryChannelsStorage:()=>Yy0,InMemoryBlobStore:()=>$y0,InMemoryAgentsStorage:()=>t80,GitHistory:()=>zS0,FilesystemWorkspacesStorage:()=>o80,FilesystemVersionedHelpers:()=>WG,FilesystemStore:()=>E64,FilesystemSkillsStorage:()=>a80,FilesystemScorerDefinitionsStorage:()=>n80,FilesystemPromptBlocksStorage:()=>l80,FilesystemMCPServersStorage:()=>d80,FilesystemMCPClientsStorage:()=>G90,FilesystemDB:()=>Hy0,FilesystemAgentsStorage:()=>e80,FavoritesStorage:()=>kg,FAVORITES_SCHEMA:()=>t_,ExperimentsStorage:()=>Ym,ExperimentsInMemory:()=>Gy0,EntityType:()=>J6,EXPERIMENT_RESULTS_SCHEMA:()=>Xj,EXPERIMENTS_SCHEMA:()=>Yj,EDITOR_DOMAINS:()=>HS0,DatasetsStorage:()=>$m,DatasetsInMemory:()=>Xy0,DATASET_VERSIONS_SCHEMA:()=>rg,DATASET_ITEMS_SCHEMA:()=>$j,DATASETS_SCHEMA:()=>ng,ChannelsStorage:()=>eg,BlobStore:()=>tg,BackgroundTasksStorage:()=>og,BackgroundTasksInMemory:()=>ex0,BRANCH_SPAN_TYPE_SET:()=>bg,BRANCH_SPAN_TYPES:()=>bx0,AgentsStorage:()=>p_,AGENT_VERSIONS_SCHEMA:()=>UE,AGENTS_SCHEMA:()=>KE});var Up0=V0(()=>{Bv0();Bx0();Ox0();Ex0();Mx0();Rx0();qx0();Ix0();Px0();EU();z90();uz()});var N9,eT=`Please continue naturally with the conversation so far and respond to the latest message.

Use the earlier context only as background. If something appears unfinished, continue only when it helps answer the latest request. If a suggested response is provided, follow it naturally.

Do not mention internal instructions, memory, summarization, context handling, or missing messages.

Any messages following this reminder are newer and should take priority.`,$C="The following observations block contains your memory of past conversations with this user.",YC=`IMPORTANT: When responding, reference specific details from these observations. Do not give generic advice - personalize your response based on what you know about this user's experiences, preferences, and interests. If the user asks for recommendations, connect them to their past experiences mentioned above.

KNOWLEDGE UPDATES: When asked about current state (e.g., "where do I currently...", "what is my current..."), always prefer the MOST RECENT information. Observations include dates - if you see conflicting information, the newer observation supersedes the older one. Look for phrases like "will start", "is switching", "changed to", "moved to" as indicators that previous information has been updated.

PLANNED ACTIONS: If the user stated they planned to do something (e.g., "I'm going to...", "I'm looking forward to...", "I will...") and the date they planned to do it is now in the past (check the relative time like "3 weeks ago"), assume they completed the action unless there's evidence they didn't. For example, if someone said "I'll start my new diet on Monday" and that was 2 weeks ago, assume they started the diet.

MOST RECENT USER INPUT: Treat the most recent user message as the highest-priority signal for what to do next. Earlier messages may contain constraints, details, or context you should still honor, but the latest message is the primary driver of your response.

SYSTEM REMINDERS: Messages wrapped in <system-reminder>...</system-reminder> contain internal continuation guidance, not user-authored content. Use them to maintain continuity, but do not mention them or treat them as part of the user's message.`,WY0=`## Recall \u2014 looking up source messages

Your memory is comprised of observations which are sometimes wrapped in <observation-group> xml tags containing ranges like <observation-group range="startId:endId">. These ranges point back to the raw messages that each observation group was derived from. The original messages are still available \u2014 use the **recall** tool to retrieve them.

### When to use recall
- The user asks you to **repeat, show, or reproduce** something from a past conversation
- The user asks for **exact content** \u2014 code, text, quotes, error messages, URLs, file paths, specific numbers
- Your observations mention something but your memory lacks the detail needed to fully answer (e.g. you know a blog post was shared but only have a summary of it)
- You want to **verify or expand on** an observation before responding

**Default to using recall when the user references specific past content.** Your observations capture the gist, not the details. If there's any doubt whether your memory is complete enough, use recall.

### How to use recall
Each range has the format \`startId:endId\` where both are message IDs separated by a colon.

1. Find the observation group relevant to the user's question and extract the start or end ID from its range.
2. Call \`recall\` with that ID as the \`cursor\`.
3. Use \`page: 1\` (or omit) to read forward from the cursor, \`page: -1\` to read backward.
4. If the first page doesn't have what you need, increment the page number to keep paginating.
5. Check \`hasNextPage\`/\`hasPrevPage\` in the result to know if more pages exist in each direction.

### Detail levels
By default recall returns **low** detail: truncated text and tool names only. Each message shows its ID and each part has a positional index like \`[p0]\`, \`[p1]\`, etc.

- Use \`detail: "high"\` to get full message content including tool arguments and results. This will only return the high detail version of a single message part at a time.
- Use \`partIndex\` with a cursor to fetch a single part at full detail \u2014 for example, to read one specific tool result or code block without loading every part.

If the result says \`truncated: true\`, the output was cut to fit the token budget. You can paginate or use \`partIndex\` to target specific content.

### Following up on truncated parts
Low-detail results may include truncation hints like:
\`[truncated \u2014 call recall cursor="..." partIndex=N detail="high" for full content]\`

**When you see these hints and need the full content, make the exact call described in the hint.** This is the normal workflow: first recall at low detail to scan, then drill into specific parts at high detail. Do not stop at the low-detail result if the user asked for exact content.

### When recall is NOT needed
- The user is asking for a high-level summary and your observations already cover it
- The question is about general preferences or facts that don't require source text
- There is no relevant range in your observations for the topic

Observation groups with range IDs and your recall tool allows you to think back and remember details you're fuzzy on.`;var ZY0=V0(()=>{N9={observation:{model:"google/gemini-2.5-flash",messageTokens:30000,modelSettings:{temperature:0.3,maxOutputTokens:1e5},providerOptions:{google:{thinkingConfig:{thinkingBudget:215}}},maxTokensPerBatch:1e4,bufferTokens:0.2,bufferActivation:0.8},reflection:{model:"google/gemini-2.5-flash",observationTokens:40000,modelSettings:{temperature:0,maxOutputTokens:1e5},providerOptions:{google:{thinkingConfig:{thinkingBudget:1024}}},bufferActivation:0.5}}});var IM;var Fp0=V0(()=>{IM=new Set(["observationalMemory","asyncBuffering","request-response-id-rotation","workspaces-v1","datasets","observability:v1.13.2","channels","deploy-diagnosis","model-inference-span"])});var vD4=V0(()=>{cb0()});var Dp0=V0(()=>{z_()});var xD4=V0(()=>{z_()});var Np0=V0(()=>{aw();SO();uz()});function xQ($,Y,X=0,G=!1){let Q=`readUInt${Y}${G?"BE":"LE"}`;return U39[Q]($,X)}function H39($,Y){if($.length-Y<4)return;let X=tY($,Y);if($.length-Y<X)return;return{name:L5($,4+Y,8+Y),offset:Y,size:X}}function H2($,Y,X){while(X<$.length){let G=H39($,X);if(!G)break;if(G.name===Y)return G;X+=G.size>0?G.size:8}}function hD4($,Y){let X=$[Y];return X===0?256:X}function fD4($,Y){let X=A39+Y*F39;return{height:hD4($,X+1),width:hD4($,X)}}function w39($,Y){let X=Y+I39;return[L5($,Y,X),tY($,X)]}function _39($){let Y=P39[$];return{width:Y,height:Y,type:$}}function h39($){return XC($,2,6)===S39}function f39($,Y){return{height:UY0($,Y),width:UY0($,Y+2)}}function g39($,Y){let G=Bp0+8,J=xQ($,16,G,Y);for(let Q=0;Q<J;Q++){let W=G+b39+Q*gD4,Z=W+gD4;if(W>$.length)return;let K=$.slice(W,Z);if(xQ(K,16,0,Y)===274){if(xQ(K,16,2,Y)!==3)return;if(xQ(K,32,4,Y)!==1)return;return xQ(K,16,8,Y)}}}function m39($,Y){let X=$.slice(k39,Y),G=XC(X,Bp0,Bp0+v39),J=G===x39;if(J||G===y39)return g39(X,J)}function u39($,Y){if(Y>$.length)throw TypeError("Corrupt JPG, exceeded buffer limits")}function cD4($,Y){if(Y)return 8*(1+$.getBits(5));let X=$.getBits(2),G=[9,13,18,30][X];return 1+$.getBits(G)}function c39($,Y,X,G){if(Y&&X===0)return 8*(1+$.getBits(5));if(X===0)return cD4($,!1);return Math.floor(G*[1,1.2,1.3333333333333333,1.5,1.7777777777777777,1.25,2][X-1])}function l39($){let Y=H2($,"jxlc",0);if(Y)return $.slice(Y.offset+8,Y.offset+Y.size);let X=i39($);if(X.length>0)return n39(X);return}function i39($){let Y=[],X=0;while(X<$.length){let G=H2($,"jxlp",X);if(!G)break;Y.push($.slice(G.offset+12,G.offset+G.size)),X=G.offset+G.size}return Y}function n39($){let Y=$.reduce((J,Q)=>J+Q.length,0),X=new Uint8Array(Y),G=0;for(let J of $)X.set(J,G),G+=J.length;return X}function HY0($){let Y=YU9.exec($);if(!Y)return;return Math.round(Number(Y[1])*(nD4[Y[2]]||1))}function XU9($){let Y=$.split(" ");return{height:HY0(Y[3]),width:HY0(Y[2])}}function GU9($){let Y=$.match(KY0.width),X=$.match(KY0.height),G=$.match(KY0.viewbox);return{height:X&&HY0(X[2]),viewbox:G&&XU9(G[2]),width:Y&&HY0(Y[2])}}function JU9($){return{height:$.height,width:$.width}}function QU9($,Y){let X=Y.width/Y.height;if($.width)return{height:Math.floor($.width/X),width:$.width};if($.height)return{height:$.height,width:Math.floor($.height*X)};return{height:Y.height,width:Y.width}}function KU9($,{isBigEndian:Y,isBigTiff:X}){let G=X?Number(Op0($,8,Y)):xQ($,32,4,Y),J=X?bQ.COUNT_SIZE.BIG:bQ.COUNT_SIZE.STANDARD;return $.slice(G+J)}function UU9($,Y,X,G){switch(Y){case bQ.TYPE.SHORT:return xQ($,16,X,G);case bQ.TYPE.LONG:return xQ($,32,X,G);case bQ.TYPE.LONG8:{let J=Number(Op0($,X,G));if(J>Number.MAX_SAFE_INTEGER)throw TypeError("Value too large");return J}default:return 0}}function HU9($,Y){let X=Y?bQ.ENTRY_SIZE.BIG:bQ.ENTRY_SIZE.STANDARD;if($.length>X)return $.slice(X)}function zU9($,{isBigEndian:Y,isBigTiff:X}){let G={},J=$;while(J?.length){let Q=xQ(J,16,0,Y),W=xQ(J,16,2,Y),Z=X?Number(Op0(J,4,Y)):xQ(J,32,4,Y);if(Q===0)break;if(Z===1&&(W===bQ.TYPE.SHORT||W===bQ.TYPE.LONG||X&&W===bQ.TYPE.LONG8)){let K=X?12:8;G[Q]=UU9(J,W,K,Y)}J=HU9(J,X)}return G}function VU9($){let Y=L5($,0,2),X=xQ($,16,2,Y==="MM");return{isBigEndian:Y==="MM",isBigTiff:X===43}}function AU9($,Y){let X=xQ($,16,4,Y),G=xQ($,16,6,Y);if(X!==8||G!==0)throw TypeError("Invalid BigTIFF header")}function NU9($){return{height:1+bD4($,7),width:1+bD4($,4)}}function LU9($){return{height:1+(($[4]&15)<<10|$[3]<<2|($[2]&192)>>6),width:1+(($[2]&63)<<8|$[1])}}function BU9($){return{height:yD4($,8)&16383,width:yD4($,6)&16383}}function RU9($){let Y=$[0],X=MU9.get(Y);if(X&&zY0.get(X).validate($))return X;return EU9.find((G)=>zY0.get(G).validate($))}function rD4($){let Y=RU9($);if(typeof Y<"u"){if(qU9.disabledTypes.indexOf(Y)>-1)throw TypeError(`disabled file type: ${Y}`);let X=zY0.get(Y).calculate($);if(X!==void 0){if(X.type=X.type??Y,X.images&&X.images.length>1){let G=X.images.reduce((J,Q)=>{return Q.width*Q.height>J.width*J.height?Q:J},X.images[0]);X.width=G.width,X.height=G.height}return X}}throw TypeError(`unsupported file type: ${Y}`)}var Z39,L5=($,Y=0,X=$.length)=>Z39.decode($.slice(Y,X)),XC=($,Y=0,X=$.length)=>$.slice(Y,X).reduce((G,J)=>G+`0${J.toString(16)}`.slice(-2),""),$N=($,Y)=>new DataView($.buffer,$.byteOffset+Y),yD4=($,Y=0)=>$N($,Y).getInt16(0,!0),UY0=($,Y=0)=>$N($,Y).getUint16(0,!1),yQ=($,Y=0)=>$N($,Y).getUint16(0,!0),bD4=($,Y=0)=>{let X=$N($,Y);return X.getUint16(0,!0)+(X.getUint8(2)<<16)},K39=($,Y=0)=>$N($,Y).getInt32(0,!0),tY=($,Y=0)=>$N($,Y).getUint32(0,!1),PM=($,Y=0)=>$N($,Y).getUint32(0,!0),Op0=($,Y,X)=>$N($,Y).getBigUint64(0,!X),U39,z39,V39=1,A39=6,F39=16,dD4,D39=2,N39,L39,B39,O39,E39,M39,R39=8,q39=4,I39=4,P39,j39,T39,C39,S39="45786966",k39=2,Bp0=6,v39=2,x39="4d4d",y39="4949",gD4=12,b39=2,p39,d39=class{constructor($,Y){this.input=$,this.endianness=Y,this.byteOffset=2,this.bitOffset=0}getBits($=1){let Y=0,X=0;while(X<$){if(this.byteOffset>=this.input.length)throw Error("Reached end of input");let G=this.input[this.byteOffset],J=8-this.bitOffset,Q=Math.min($-X,J);if(this.endianness==="little-endian"){let W=(1<<Q)-1,Z=G>>this.bitOffset&W;Y|=Z<<X}else{let W=(1<<Q)-1<<8-this.bitOffset-Q,Z=(G&W)>>8-this.bitOffset-Q;Y=Y<<Q|Z}if(X+=Q,this.bitOffset+=Q,this.bitOffset===8)this.byteOffset++,this.bitOffset=0}return Y}},lD4,r39,a39,s39=`PNG\r
\x1A
`,o39="IHDR",mD4="CgBI",t39,uD4,pD4,e39,$U9,iD4,KY0,Lp0=2.54,nD4,YU9,WU9,ZU9,bQ,FU9,DU9,OU9,zY0,EU9,MU9,qU9;var aD4=V0(()=>{Z39=new TextDecoder,U39={readUInt16BE:UY0,readUInt16LE:yQ,readUInt32BE:tY,readUInt32LE:PM};z39={validate:($)=>L5($,0,2)==="BM",calculate:($)=>({height:Math.abs(K39($,22)),width:PM($,18)})};dD4={validate($){let Y=yQ($,0),X=yQ($,4);if(Y!==0||X===0)return!1;return yQ($,2)===V39},calculate($){let Y=yQ($,4),X=fD4($,0);if(Y===1)return X;let G=[];for(let J=0;J<Y;J+=1)G.push(fD4($,J));return{width:X.width,height:X.height,images:G}}},N39={validate($){let Y=yQ($,0),X=yQ($,4);if(Y!==0||X===0)return!1;return yQ($,2)===D39},calculate:($)=>dD4.calculate($)},L39={validate:($)=>PM($,0)===542327876,calculate:($)=>({height:PM($,12),width:PM($,16)})},B39=/^GIF8[79]a/,O39={validate:($)=>B39.test(L5($,0,6)),calculate:($)=>({height:yQ($,8),width:yQ($,6)})},E39={avif:"avif",mif1:"heif",msf1:"heif",heic:"heic",heix:"heic",hevc:"heic",hevx:"heic"},M39={validate($){if(L5($,4,8)!=="ftyp")return!1;let X=H2($,"ftyp",0);if(!X)return!1;return L5($,X.offset+8,X.offset+12)in E39},calculate($){let Y=H2($,"meta",0),X=Y&&H2($,"iprp",Y.offset+12),G=X&&H2($,"ipco",X.offset+8);if(!G)throw TypeError("Invalid HEIF, no ipco box found");let J=L5($,8,12),Q=[],W=G.offset+8;while(W<G.offset+G.size){let Z=H2($,"ispe",W);if(!Z)break;let K=tY($,Z.offset+12),H=tY($,Z.offset+16),z=H2($,"clap",W),V=K,A=H;if(z&&z.offset<G.offset+G.size){let F=tY($,z.offset+12);V=K-F}Q.push({height:A,width:V}),W=Z.offset+Z.size}if(Q.length===0)throw TypeError("Invalid HEIF, no sizes found");return{width:Q[0].width,height:Q[0].height,type:J,...Q.length>1?{images:Q}:{}}}},P39={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};j39={validate:($)=>L5($,0,4)==="icns",calculate($){let Y=$.length,X=tY($,q39),G=R39,J=[];while(G<X&&G<Y){let Q=w39($,G),W=_39(Q[0]);J.push(W),G+=Q[1]}if(J.length===0)throw TypeError("Invalid ICNS, no sizes found");return{width:J[0].width,height:J[0].height,...J.length>1?{images:J}:{}}}},T39={validate:($)=>tY($,0)===4283432785,calculate:($)=>({height:tY($,12),width:tY($,8)})},C39={validate($){if(L5($,4,8)!=="jP  ")return!1;let X=H2($,"ftyp",0);if(!X)return!1;return L5($,X.offset+8,X.offset+12)==="jp2 "},calculate($){let Y=H2($,"jp2h",0),X=Y&&H2($,"ihdr",Y.offset+8);if(X)return{height:tY($,X.offset+8),width:tY($,X.offset+12)};throw TypeError("Unsupported JPEG 2000 format")}};p39={validate:($)=>XC($,0,2)==="ffd8",calculate($){let Y=$.slice(4),X,G;while(Y.length){let J=UY0(Y,0);if(u39(Y,J),Y[J]!==255){Y=Y.slice(1);continue}if(h39(Y))X=m39(Y,J);if(G=Y[J+1],G===192||G===193||G===194){let Q=f39(Y,J+5);if(!X)return Q;return{height:Q.height,orientation:X,width:Q.width}}Y=Y.slice(J+2)}throw TypeError("Invalid JPG, no size found")}};lD4={validate:($)=>{return XC($,0,2)==="ff0a"},calculate($){let Y=new d39($,"little-endian"),X=Y.getBits(1)===1,G=cD4(Y,X),J=Y.getBits(3);return{width:c39(Y,X,J,G),height:G}}};r39={validate:($)=>{if(L5($,4,8)!=="JXL ")return!1;let X=H2($,"ftyp",0);if(!X)return!1;return L5($,X.offset+8,X.offset+12)==="jxl "},calculate($){let Y=l39($);if(Y)return lD4.calculate(Y);throw Error("No codestream found in JXL container")}},a39={validate:($)=>{let Y=L5($,1,7);return["KTX 11","KTX 20"].includes(Y)},calculate:($)=>{let Y=$[5]===49?"ktx":"ktx2",X=Y==="ktx"?36:20;return{height:PM($,X+4),width:PM($,X),type:Y}}},t39={validate($){if(s39===L5($,1,8)){let Y=L5($,12,16);if(Y===mD4)Y=L5($,28,32);if(Y!==o39)throw TypeError("Invalid PNG");return!0}return!1},calculate($){if(L5($,12,16)===mD4)return{height:tY($,36),width:tY($,32)};return{height:tY($,20),width:tY($,16)}}},uD4={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"},pD4={default:($)=>{let Y=[];while($.length>0){let X=$.shift();if(X[0]==="#")continue;Y=X.split(" ");break}if(Y.length===2)return{height:Number.parseInt(Y[1],10),width:Number.parseInt(Y[0],10)};throw TypeError("Invalid PNM")},pam:($)=>{let Y={};while($.length>0){let X=$.shift();if(X.length>16||X.charCodeAt(0)>128)continue;let[G,J]=X.split(" ");if(G&&J)Y[G.toLowerCase()]=Number.parseInt(J,10);if(Y.height&&Y.width)break}if(Y.height&&Y.width)return{height:Y.height,width:Y.width};throw TypeError("Invalid PAM")}},e39={validate:($)=>(L5($,0,2)in uD4),calculate($){let Y=L5($,0,2),X=uD4[Y],G=L5($,3).split(/[\r\n]+/);return(pD4[X]||pD4.default)(G)}},$U9={validate:($)=>L5($,0,4)==="8BPS",calculate:($)=>({height:tY($,14),width:tY($,18)})},iD4=/<svg\s([^>"']|"[^"]*"|'[^']*')*>/,KY0={height:/\sheight=(['"])([^%]+?)\1/,root:iD4,viewbox:/\sviewBox=(['"])(.+?)\1/i,width:/\swidth=(['"])([^%]+?)\1/},nD4={in:96,cm:96/Lp0,em:16,ex:8,m:96/Lp0*100,mm:96/Lp0/10,pc:0.1111111111111111,pt:1.3333333333333333,px:1},YU9=new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(nD4).join("|")})?$`);WU9={validate:($)=>iD4.test(L5($,0,1000)),calculate($){let Y=L5($).match(KY0.root);if(Y){let X=GU9(Y[0]);if(X.width&&X.height)return JU9(X);if(X.viewbox)return QU9(X,X.viewbox)}throw TypeError("Invalid SVG")}},ZU9={validate($){return yQ($,0)===0&&yQ($,4)===0},calculate($){return{height:yQ($,14),width:yQ($,12)}}},bQ={TAG:{WIDTH:256,HEIGHT:257,COMPRESSION:259},TYPE:{SHORT:3,LONG:4,LONG8:16},ENTRY_SIZE:{STANDARD:12,BIG:20},COUNT_SIZE:{STANDARD:2,BIG:8}};FU9=new Set(["49492a00","4d4d002a","49492b00","4d4d002b"]),DU9={validate:($)=>{let Y=XC($,0,4);return FU9.has(Y)},calculate($){let Y=VU9($);if(Y.isBigTiff)AU9($,Y.isBigEndian);let X=KU9($,Y),G=zU9(X,Y),J={height:G[bQ.TAG.HEIGHT],width:G[bQ.TAG.WIDTH],type:Y.isBigTiff?"bigtiff":"tiff"};if(G[bQ.TAG.COMPRESSION])J.compression=G[bQ.TAG.COMPRESSION];if(!J.width||!J.height)throw TypeError("Invalid Tiff. Missing tags");return J}};OU9={validate($){let Y=L5($,0,4)==="RIFF",X=L5($,8,12)==="WEBP",G=L5($,12,15)==="VP8";return Y&&X&&G},calculate($){let Y=L5($,12,16),X=$.slice(20,30);if(Y==="VP8X"){let J=X[0],Q=(J&192)===0,W=(J&1)===0;if(Q&&W)return NU9(X);throw TypeError("Invalid WebP")}if(Y==="VP8 "&&X[0]!==47)return BU9(X);let G=XC(X,3,6);if(Y==="VP8L"&&G!=="9d012a")return LU9(X);throw TypeError("Invalid WebP")}},zY0=new Map([["bmp",z39],["cur",N39],["dds",L39],["gif",O39],["heif",M39],["icns",j39],["ico",dD4],["j2c",T39],["jp2",C39],["jpg",p39],["jxl",r39],["jxl-stream",lD4],["ktx",a39],["png",t39],["pnm",e39],["psd",$U9],["svg",WU9],["tga",ZU9],["tiff",DU9],["webp",OU9]]),EU9=Array.from(zY0.keys()),MU9=new Map([[0,"heif"],[56,"psd"],[66,"bmp"],[68,"dds"],[71,"gif"],[73,"tiff"],[77,"tiff"],[82,"webp"],[105,"icns"],[137,"png"],[255,"jpg"]]);qU9={disabledTypes:[]}});var oD4=o((UM7,sD4)=>{var Mp=1000,Rp=Mp*60,qp=Rp*60,Ip=qp*24,IU9=Ip*365.25;sD4.exports=function($,Y){Y=Y||{};var X=typeof $;if(X==="string"&&$.length>0)return PU9($);else if(X==="number"&&isNaN($)===!1)return Y.long?_U9($):wU9($);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify($))};function PU9($){if($=String($),$.length>100)return;var Y=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec($);if(!Y)return;var X=parseFloat(Y[1]),G=(Y[2]||"ms").toLowerCase();switch(G){case"years":case"year":case"yrs":case"yr":case"y":return X*IU9;case"days":case"day":case"d":return X*Ip;case"hours":case"hour":case"hrs":case"hr":case"h":return X*qp;case"minutes":case"minute":case"mins":case"min":case"m":return X*Rp;case"seconds":case"second":case"secs":case"sec":case"s":return X*Mp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return X;default:return}}function wU9($){if($>=Ip)return Math.round($/Ip)+"d";if($>=qp)return Math.round($/qp)+"h";if($>=Rp)return Math.round($/Rp)+"m";if($>=Mp)return Math.round($/Mp)+"s";return $+"ms"}function _U9($){return VY0($,Ip,"day")||VY0($,qp,"hour")||VY0($,Rp,"minute")||VY0($,Mp,"second")||$+" ms"}function VY0($,Y,X){if($<Y)return;if($<Y*1.5)return Math.floor($/Y)+" "+X;return Math.ceil($/Y)+" "+X+"s"}});var Rp0=o((T9,tD4)=>{T9=tD4.exports=Mp0.debug=Mp0.default=Mp0;T9.coerce=kU9;T9.disable=CU9;T9.enable=TU9;T9.enabled=SU9;T9.humanize=oD4();T9.names=[];T9.skips=[];T9.formatters={};var Ep0;function jU9($){var Y=0,X;for(X in $)Y=(Y<<5)-Y+$.charCodeAt(X),Y|=0;return T9.colors[Math.abs(Y)%T9.colors.length]}function Mp0($){function Y(){if(!Y.enabled)return;var X=Y,G=+new Date,J=G-(Ep0||G);X.diff=J,X.prev=Ep0,X.curr=G,Ep0=G;var Q=Array(arguments.length);for(var W=0;W<Q.length;W++)Q[W]=arguments[W];if(Q[0]=T9.coerce(Q[0]),typeof Q[0]!=="string")Q.unshift("%O");var Z=0;Q[0]=Q[0].replace(/%([a-zA-Z%])/g,function(H,z){if(H==="%%")return H;Z++;var V=T9.formatters[z];if(typeof V==="function"){var A=Q[Z];H=V.call(X,A),Q.splice(Z,1),Z--}return H}),T9.formatArgs.call(X,Q);var K=Y.log||T9.log||console.log.bind(console);K.apply(X,Q)}if(Y.namespace=$,Y.enabled=T9.enabled($),Y.useColors=T9.useColors(),Y.color=jU9($),typeof T9.init==="function")T9.init(Y);return Y}function TU9($){T9.save($),T9.names=[],T9.skips=[];var Y=(typeof $==="string"?$:"").split(/[\s,]+/),X=Y.length;for(var G=0;G<X;G++){if(!Y[G])continue;if($=Y[G].replace(/\*/g,".*?"),$[0]==="-")T9.skips.push(new RegExp("^"+$.substr(1)+"$"));else T9.names.push(new RegExp("^"+$+"$"))}}function CU9(){T9.enable("")}function SU9($){var Y,X;for(Y=0,X=T9.skips.length;Y<X;Y++)if(T9.skips[Y].test($))return!1;for(Y=0,X=T9.names.length;Y<X;Y++)if(T9.names[Y].test($))return!0;return!1}function kU9($){if($ instanceof Error)return $.stack||$.message;return $}});var YN4=o((qJ,$N4)=>{qJ=$N4.exports=Rp0();qJ.log=yU9;qJ.formatArgs=xU9;qJ.save=bU9;qJ.load=eD4;qJ.useColors=vU9;qJ.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:hU9();qJ.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function vU9(){if(typeof window<"u"&&window.process&&window.process.type==="renderer")return!0;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}qJ.formatters.j=function($){try{return JSON.stringify($)}catch(Y){return"[UnexpectedJSONParseError]: "+Y.message}};function xU9($){var Y=this.useColors;if($[0]=(Y?"%c":"")+this.namespace+(Y?" %c":" ")+$[0]+(Y?"%c ":" ")+"+"+qJ.humanize(this.diff),!Y)return;var X="color: "+this.color;$.splice(1,0,X,"color: inherit");var G=0,J=0;$[0].replace(/%[a-zA-Z%]/g,function(Q){if(Q==="%%")return;if(G++,Q==="%c")J=G}),$.splice(J,0,X)}function yU9(){return typeof console==="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function bU9($){try{if($==null)qJ.storage.removeItem("debug");else qJ.storage.debug=$}catch(Y){}}function eD4(){var $;try{$=qJ.storage.debug}catch(Y){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}qJ.enable(eD4());function hU9(){try{return window.localStorage}catch($){}}});var QN4=o((eY,JN4)=>{var XN4=L0("tty"),Pp=L0("util");eY=JN4.exports=Rp0();eY.init=cU9;eY.log=uU9;eY.formatArgs=mU9;eY.save=pU9;eY.load=GN4;eY.useColors=gU9;eY.colors=[6,2,3,4,5,1];eY.inspectOpts=Object.keys(process.env).filter(function($){return/^debug_/i.test($)}).reduce(function($,Y){var X=Y.substring(6).toLowerCase().replace(/_([a-z])/g,function(J,Q){return Q.toUpperCase()}),G=process.env[Y];if(/^(yes|on|true|enabled)$/i.test(G))G=!0;else if(/^(no|off|false|disabled)$/i.test(G))G=!1;else if(G==="null")G=null;else G=Number(G);return $[X]=G,$},{});var GC=parseInt(process.env.DEBUG_FD,10)||2;if(GC!==1&&GC!==2)Pp.deprecate(function(){},"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var fU9=GC===1?process.stdout:GC===2?process.stderr:dU9(GC);function gU9(){return"colors"in eY.inspectOpts?Boolean(eY.inspectOpts.colors):XN4.isatty(GC)}eY.formatters.o=function($){return this.inspectOpts.colors=this.useColors,Pp.inspect($,this.inspectOpts).split(`
`).map(function(Y){return Y.trim()}).join(" ")};eY.formatters.O=function($){return this.inspectOpts.colors=this.useColors,Pp.inspect($,this.inspectOpts)};function mU9($){var Y=this.namespace,X=this.useColors;if(X){var G=this.color,J="  \x1B[3"+G+";1m"+Y+" \x1B[0m";$[0]=J+$[0].split(`
`).join(`
`+J),$.push("\x1B[3"+G+"m+"+eY.humanize(this.diff)+"\x1B[0m")}else $[0]=new Date().toUTCString()+" "+Y+" "+$[0]}function uU9(){return fU9.write(Pp.format.apply(Pp,arguments)+`
`)}function pU9($){if($==null)delete process.env.DEBUG;else process.env.DEBUG=$}function GN4(){return process.env.DEBUG}function dU9($){var Y,X=process.binding("tty_wrap");switch(X.guessHandleType($)){case"TTY":if(Y=new XN4.WriteStream($),Y._type="tty",Y._handle&&Y._handle.unref)Y._handle.unref();break;case"FILE":var G=L0("fs");Y=new G.SyncWriteStream($,{autoClose:!1}),Y._type="fs";break;case"PIPE":case"TCP":var J=L0("net");if(Y=new J.Socket({fd:$,readable:!1,writable:!0}),Y.readable=!1,Y.read=null,Y._type="pipe",Y._handle&&Y._handle.unref)Y._handle.unref();break;default:throw Error("Implement me. Unknown stream file type!")}return Y.fd=$,Y._isStdio=!0,Y}function cU9($){$.inspectOpts={};var Y=Object.keys(eY.inspectOpts);for(var X=0;X<Y.length;X++)$.inspectOpts[Y[X]]=eY.inspectOpts[Y[X]]}eY.enable(GN4())});var WN4=o((HM7,qp0)=>{if(typeof process<"u"&&process.type==="renderer")qp0.exports=YN4();else qp0.exports=QN4()});var FN4=o((zM7,AN4)=>{var JC=L0("assert"),YN=WN4()("stream-parser");AN4.exports=iU9;var KN4=-1,AY0=0,lU9=1,UN4=2;function iU9($){var Y=$&&typeof $._transform=="function",X=$&&typeof $._write=="function";if(!Y&&!X)throw Error("must pass a Writable or Transform stream in");if(YN("extending Parser into stream"),$._bytes=nU9,$._skipBytes=rU9,Y)$._passthrough=aU9;if(Y)$._transform=oU9;else $._write=sU9}function wp($){if(YN("initializing parser stream"),$._parserBytesLeft=0,$._parserBuffers=[],$._parserBuffered=0,$._parserState=KN4,$._parserCallback=null,typeof $.push=="function")$._parserOutput=$.push.bind($);$._parserInit=!0}function nU9($,Y){if(JC(!this._parserCallback,'there is already a "callback" set!'),JC(isFinite($)&&$>0,'can only buffer a finite number of bytes > 0, got "'+$+'"'),!this._parserInit)wp(this);YN("buffering %o bytes",$),this._parserBytesLeft=$,this._parserCallback=Y,this._parserState=AY0}function rU9($,Y){if(JC(!this._parserCallback,'there is already a "callback" set!'),JC($>0,'can only skip > 0 bytes, got "'+$+'"'),!this._parserInit)wp(this);YN("skipping %o bytes",$),this._parserBytesLeft=$,this._parserCallback=Y,this._parserState=lU9}function aU9($,Y){if(JC(!this._parserCallback,'There is already a "callback" set!'),JC($>0,'can only pass through > 0 bytes, got "'+$+'"'),!this._parserInit)wp(this);YN("passing through %o bytes",$),this._parserBytesLeft=$,this._parserCallback=Y,this._parserState=UN4}function sU9($,Y,X){if(!this._parserInit)wp(this);if(YN("write(%o bytes)",$.length),typeof Y=="function")X=Y;zN4(this,$,null,X)}function oU9($,Y,X){if(!this._parserInit)wp(this);if(YN("transform(%o bytes)",$.length),typeof Y!="function")Y=this._parserOutput;zN4(this,$,Y,X)}function HN4($,Y,X,G){if($._parserBytesLeft<=0)return G(Error("got data but not currently parsing anything"));if(Y.length<=$._parserBytesLeft)return function(){return ZN4($,Y,X,G)};else return function(){var J=Y.slice(0,$._parserBytesLeft);return ZN4($,J,X,function(Q){if(Q)return G(Q);if(Y.length>J.length)return function(){return HN4($,Y.slice(J.length),X,G)}})}}function ZN4($,Y,X,G){if($._parserBytesLeft-=Y.length,YN("%o bytes left for stream piece",$._parserBytesLeft),$._parserState===AY0)$._parserBuffers.push(Y),$._parserBuffered+=Y.length;else if($._parserState===UN4)X(Y);if($._parserBytesLeft===0){var J=$._parserCallback;if(J&&$._parserState===AY0&&$._parserBuffers.length>1)Y=Buffer.concat($._parserBuffers,$._parserBuffered);if($._parserState!==AY0)Y=null;if($._parserCallback=null,$._parserBuffered=0,$._parserState=KN4,$._parserBuffers.splice(0),J){var Q=[];if(Y)Q.push(Y);if(X)Q.push(X);var W=J.length>Q.length;if(W)Q.push(VN4(G));var Z=J.apply($,Q);if(!W||G===Z)return G}}else return G}var zN4=VN4(HN4);function VN4($){return function(){var Y=$.apply(this,arguments);while(typeof Y=="function")Y=Y();return Y}}});var P4=o((eU9)=>{var DN4=L0("stream").Transform,tU9=FN4();function _p(){DN4.call(this,{readableObjectMode:!0})}_p.prototype=Object.create(DN4.prototype);_p.prototype.constructor=_p;tU9(_p.prototype);eU9.ParserStream=_p;eU9.sliceEq=function($,Y,X){for(var G=Y,J=0;J<X.length;)if($[G++]!==X[J++])return!1;return!0};eU9.str2arr=function($,Y){var X=[],G=0;if(Y&&Y==="hex")while(G<$.length)X.push(parseInt($.slice(G,G+2),16)),G+=2;else for(;G<$.length;G++)X.push($.charCodeAt(G)&255);return X};eU9.readUInt16LE=function($,Y){return $[Y]|$[Y+1]<<8};eU9.readUInt16BE=function($,Y){return $[Y]<<8|$[Y+1]};eU9.readInt16LE=function($,Y){return eU9.readUInt16LE($,Y)<<16>>16};eU9.readInt16BE=function($,Y){return eU9.readUInt16BE($,Y)<<16>>16};eU9.readUInt32LE=function($,Y){return($[Y]|$[Y+1]<<8|$[Y+2]<<16)+$[Y+3]*16777216};eU9.readUInt32BE=function($,Y){return $[Y]*16777216+($[Y+1]<<16|$[Y+2]<<8|$[Y+3])};eU9.readInt32LE=function($,Y){return eU9.readUInt32LE($,Y)|0};eU9.readInt32BE=function($,Y){return eU9.readUInt32BE($,Y)|0};function FY0($,Y,X){if(Error.call(this),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||"";if(this.name=this.constructor.name,this.message=$,Y)this.code=Y;if(X)this.statusCode=X}FY0.prototype=Object.create(Error.prototype);FY0.prototype.constructor=FY0;eU9.ProbeError=FY0});var wp0=o((FH9,DY0)=>{var QC=P4().readUInt16BE,Pp0=P4().readUInt32BE;function jp($,Y){if($.length<4+Y)return null;var X=Pp0($,Y);if($.length<X+Y||X<8)return null;return{boxtype:String.fromCharCode.apply(null,$.slice(Y+4,Y+8)),data:$.slice(Y+8,Y+X),end:Y+X}}FH9.unbox=jp;function KH9($,Y){var X=0;for(;;){var G=jp($,X);if(!G)break;switch(G.boxtype){case"ispe":Y.sizes.push({width:Pp0(G.data,4),height:Pp0(G.data,8)});break;case"irot":Y.transforms.push({type:"irot",value:G.data[0]&3});break;case"imir":Y.transforms.push({type:"imir",value:G.data[0]&1});break}X=G.end}}function Ip0($,Y,X){var G=0;for(var J=0;J<X;J++)G=G*256+($[Y+J]||0);return G}function UH9($,Y){var X=$[4]>>4&15,G=$[4]&15,J=$[5]>>4&15,Q=QC($,6),W=8;for(var Z=0;Z<Q;Z++){var K=QC($,W);W+=2;var H=QC($,W);W+=2;var z=Ip0($,W,J);W+=J;var V=QC($,W);if(W+=2,H===0&&V===1){var A=Ip0($,W,X),F=Ip0($,W+X,G);Y.item_loc[K]={length:F,offset:A+z}}W+=V*(X+G)}}function HH9($,Y){var X=QC($,4),G=6;for(var J=0;J<X;J++){var Q=jp($,G);if(!Q)break;if(Q.boxtype==="infe"){var W=QC(Q.data,4),Z="";for(var K=8;K<Q.data.length&&Q.data[K];K++)Z+=String.fromCharCode(Q.data[K]);Y.item_inf[Z]=W}G=Q.end}}function zH9($,Y){var X=0;for(;;){var G=jp($,X);if(!G)break;if(G.boxtype==="ipco")KH9(G.data,Y);X=G.end}}function VH9($,Y){var X=4;for(;;){var G=jp($,X);if(!G)break;if(G.boxtype==="iprp")zH9(G.data,Y);if(G.boxtype==="iloc")UH9(G.data,Y);if(G.boxtype==="iinf")HH9(G.data,Y);X=G.end}}function AH9($){var Y=$.reduce(function(J,Q){return J.width>Q.width||J.width===Q.width&&J.height>Q.height?J:Q}),X=$.reduce(function(J,Q){return J.height>Q.height||J.height===Q.height&&J.width>Q.width?J:Q}),G;if(Y.width>X.height||Y.width===X.height&&Y.height>X.width)G=Y;else G=X;return G}FH9.readSizeFromMeta=function($){var Y={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(VH9($,Y),!Y.sizes.length)return;var X=AH9(Y.sizes),G=1;Y.transforms.forEach(function(Q){var W={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},Z={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(Q.type==="imir")if(Q.value===0)G=Z[G];else G=Z[G],G=W[G],G=W[G];if(Q.type==="irot")for(var K=0;K<Q.value;K++)G=W[G]});var J=null;if(Y.item_inf.Exif)J=Y.item_loc[Y.item_inf.Exif];return{width:X.width,height:X.height,orientation:Y.transforms.length?G:null,variants:Y.sizes,exif_location:J}};FH9.getMimeType=function($){var Y=String.fromCharCode.apply(null,$.slice(0,4)),X={};X[Y]=!0;for(var G=8;G<$.length;G+=4)X[String.fromCharCode.apply(null,$.slice(G,G+4))]=!0;if(!X.mif1&&!X.msf1&&!X.miaf)return;if(Y==="avif"||Y==="avis"||Y==="avio")return{type:"avif",mime:"image/avif"};if(Y==="heic"||Y==="heix")return{type:"heic",mime:"image/heic"};if(Y==="hevc"||Y==="hevx")return{type:"heic",mime:"image/heic-sequence"};if(X.avif||X.avis)return{type:"avif",mime:"image/avif"};if(X.heic||X.heix||X.hevc||X.hevx||X.heis){if(X.msf1)return{type:"heif",mime:"image/heif-sequence"};return{type:"heif",mime:"image/heif"}}return{type:"avif",mime:"image/avif"}}});var wM=o((OH9,_p0)=>{function NY0($,Y){var X=Error($);return X.code=Y,X}function BH9($){try{return decodeURIComponent(escape($))}catch(Y){return $}}function PV($,Y,X){this.input=$.subarray(Y,X),this.start=Y;var G=String.fromCharCode.apply(null,this.input.subarray(0,4));if(G!=="II*\x00"&&G!=="MM\x00*")throw NY0("invalid TIFF signature","EBADDATA");this.big_endian=G[0]==="M"}PV.prototype.each=function($){this.aborted=!1;var Y=this.read_uint32(4);this.ifds_to_read=[{id:0,offset:Y}];while(this.ifds_to_read.length>0&&!this.aborted){var X=this.ifds_to_read.shift();if(!X.offset)continue;this.scan_ifd(X.id,X.offset,$)}};PV.prototype.read_uint16=function($){var Y=this.input;if($+2>Y.length)throw NY0("unexpected EOF","EBADDATA");return this.big_endian?Y[$]*256+Y[$+1]:Y[$]+Y[$+1]*256};PV.prototype.read_uint32=function($){var Y=this.input;if($+4>Y.length)throw NY0("unexpected EOF","EBADDATA");return this.big_endian?Y[$]*16777216+Y[$+1]*65536+Y[$+2]*256+Y[$+3]:Y[$]+Y[$+1]*256+Y[$+2]*65536+Y[$+3]*16777216};PV.prototype.is_subifd_link=function($,Y){return $===0&&Y===34665||$===0&&Y===34853||$===34665&&Y===40965};PV.prototype.exif_format_length=function($){switch($){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};PV.prototype.exif_format_read=function($,Y){var X;switch($){case 1:case 2:return X=this.input[Y],X;case 6:return X=this.input[Y],X|(X&128)*33554430;case 3:return X=this.read_uint16(Y),X;case 8:return X=this.read_uint16(Y),X|(X&32768)*131070;case 4:return X=this.read_uint32(Y),X;case 9:return X=this.read_uint32(Y),X|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};PV.prototype.scan_ifd=function($,Y,X){var G=this.read_uint16(Y);Y+=2;for(var J=0;J<G;J++){var Q=this.read_uint16(Y),W=this.read_uint16(Y+2),Z=this.read_uint32(Y+4),K=this.exif_format_length(W),H=Z*K,z=H<=4?Y+8:this.read_uint32(Y+8),V=!1;if(z+H>this.input.length)throw NY0("unexpected EOF","EBADDATA");var A=[],F=z;for(var N=0;N<Z;N++,F+=K){var D=this.exif_format_read(W,F);if(D===null){A=null;break}A.push(D)}if(Array.isArray(A)&&W===2){if(A=BH9(String.fromCharCode.apply(null,A)),A&&A[A.length-1]==="\x00")A=A.slice(0,-1)}if(this.is_subifd_link($,Q)){if(Array.isArray(A)&&Number.isInteger(A[0])&&A[0]>0)this.ifds_to_read.push({id:Q,offset:A[0]}),V=!0}var L={is_big_endian:this.big_endian,ifd:$,tag:Q,format:W,count:Z,entry_offset:Y+this.start,data_length:H,data_offset:z+this.start,value:A,is_subifd_link:V};if(X(L)===!1){this.aborted=!0;return}Y+=12}if($===0)this.ifds_to_read.push({id:1,offset:this.read_uint32(Y)})};OH9.ExifParser=PV;OH9.get_orientation=function($){var Y=0;try{return new PV($,0,$.length).each(function(X){if(X.ifd===0&&X.tag===274&&Array.isArray(X.value))return Y=X.value[0],!1}),Y}catch(X){return-1}}});var IN4=o((AM7,qN4)=>{var RH9=P4().ParserStream,qH9=P4().str2arr,IH9=P4().sliceEq,jp0=P4().readUInt32BE,EN4=wp0(),PH9=wM(),wH9=qH9("ftyp");function MN4($,Y,X){if(Y===0){X();return}$._skipBytes(Y,X)}function _H9($,Y,X){if(!Y.exif_location||Y.exif_location.offset<=Y.offset){X(0);return}$._skipBytes(Y.exif_location.offset-Y.offset,function(){Y.offset=Y.exif_location.offset,$._bytes(4,function(G){Y.offset+=4;var J=jp0(G,0);MN4($,J,function(){Y.offset+=J;var Q=Y.exif_location.length-J-4;if(Q<=0){X(0);return}$._bytes(Q,function(W){Y.offset+=Q,X(PH9.get_orientation(W))})})})})}function RN4($,Y){$._bytes(8,function(X){Y.offset+=8;var G=jp0(X,0)-8,J=String.fromCharCode.apply(null,X.slice(4,8));if(J==="mdat"){$._skipBytes(1/0),$.push(null);return}if(G<0){$._skipBytes(1/0),$.push(null);return}if(J==="meta"&&G>0)$._bytes(G,function(Q){Y.offset+=G;var W=EN4.readSizeFromMeta(Q);if(!W){$._skipBytes(1/0),$.push(null);return}var Z={width:W.width,height:W.height,type:Y.fileType.type,mime:Y.fileType.mime,wUnits:"px",hUnits:"px"};if(W.variants.length>1)Z.variants=W.variants;if(W.orientation)Z.orientation=W.orientation;Y.exif_location=W.exif_location,_H9($,Y,function(K){if(K>0)Z.orientation=K;$._skipBytes(1/0),$.push(Z),$.push(null)})});else MN4($,G,function(){Y.offset+=G,RN4($,Y)})})}qN4.exports=function(){var $=new RH9,Y={offset:0,fileType:null};return $._bytes(8,function(X){if(Y.offset+=8,!IH9(X,4,wH9)){$._skipBytes(1/0),$.push(null);return}var G=jp0(X,0)-8;if(G<=0){$._skipBytes(1/0),$.push(null);return}$._bytes(G,function(J){if(Y.offset+=G,Y.fileType=EN4.getMimeType(J),!Y.fileType){$._skipBytes(1/0),$.push(null);return}RN4($,Y)})}),$}});var wN4=o((FM7,PN4)=>{var jH9=P4().ParserStream,TH9=P4().str2arr,CH9=P4().sliceEq,SH9=TH9("BM");PN4.exports=function(){var $=new jH9;return $._bytes(26,function(Y){if($._skipBytes(1/0),!CH9(Y,0,SH9)){$.push(null);return}var X,G,J=Y.readUInt32LE(14);if(J===12)X=Y.readInt16LE(18),G=Y.readInt16LE(20);else if(J>12)X=Y.readInt32LE(18),G=Y.readInt32LE(22);else{$.push(null);return}$.push({width:X,height:Math.abs(G),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}),$.push(null)}),$}});var CN4=o((DM7,TN4)=>{var kH9=P4().ParserStream,jN4=P4().str2arr,_N4=P4().sliceEq,vH9=jN4("GIF87a"),xH9=jN4("GIF89a");TN4.exports=function(){var $=new kH9;return $._bytes(10,function(Y){if($._skipBytes(1/0),!_N4(Y,0,vH9)&&!_N4(Y,0,xH9)){$.push(null);return}$.push({width:Y.readUInt16LE(6),height:Y.readUInt16LE(8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}),$.push(null)}),$}});var kN4=o((NM7,SN4)=>{var yH9=P4().ParserStream,bH9=0,hH9=1,Tp0=16;SN4.exports=function(){var $=new yH9;return $._bytes(6,function(Y){var X=Y.readUInt16LE(0),G=Y.readUInt16LE(2),J=Y.readUInt16LE(4);if(X!==bH9||G!==hH9||!J){$._skipBytes(1/0),$.push(null);return}$._bytes(J*Tp0,function(Q){$._skipBytes(1/0);var W=[],Z={width:0,height:0};for(var K=0;K<J;K++){var H=Q.readUInt8(Tp0*K+0)||256,z=Q.readUInt8(Tp0*K+1)||256,V={width:H,height:z};if(W.push(V),H>Z.width||z>Z.height)Z=V}$.push({width:Z.width,height:Z.height,variants:W,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}),$.push(null)})}),$}});var bN4=o((LM7,yN4)=>{var fH9=P4().ParserStream,gH9=P4().str2arr,mH9=P4().sliceEq,uH9=wM(),pH9=gH9("Exif\x00\x00");function vN4($,Y){$._bytes(1,function(X){var G=X[0];if(G===255){vN4($,Y);return}if(G>=208&&G<=217||G===1){Y(G,0);return}if(G>=192&&G<=254){$._bytes(2,function(J){Y(G,J.readUInt16BE(0)-2)});return}Y()})}function xN4($,Y,X){var G=Y.start;Y.start=!1,$._bytes(1,function(J){if(J[0]!==255){if(G)X();else xN4($,Y,X);return}vN4($,X)})}function LY0($,Y){xN4($,Y,function(X,G){if(!X||G<0){$._skipBytes(1/0),$.push(null);return}if(X===217||X===218){$._skipBytes(1/0),$.push(null);return}if(X===225&&G>=10){$._bytes(G,function(J){if(mH9(J,0,pH9))Y.orientation=uH9.get_orientation(J.slice(6,6+G));LY0($,Y)});return}if(G<=0){LY0($,Y);return}if(G>=5&&(X>=192&&X<=207)&&X!==196&&X!==200&&X!==204){$._bytes(G,function(J){$._skipBytes(1/0);var Q={width:J.readUInt16BE(3),height:J.readUInt16BE(1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};if(Y.orientation>0)Q.orientation=Y.orientation;$.push(Q),$.push(null)});return}$._skipBytes(G,function(){LY0($,Y)})})}yN4.exports=function(){var $=new fH9;return $._bytes(2,function(Y){if(Y[0]!==255||Y[1]!==216){$._skipBytes(1/0),$.push(null);return}LY0($,{start:!0})}),$}});var mN4=o((BM7,gN4)=>{var dH9=P4().ParserStream,fN4=P4().str2arr,hN4=P4().sliceEq,cH9=fN4(`\x89PNG\r
\x1A
`),lH9=fN4("IHDR");gN4.exports=function(){var $=new dH9;return $._bytes(24,function(Y){if($._skipBytes(1/0),!hN4(Y,0,cH9)){$.push(null);return}if(!hN4(Y,12,lH9)){$.push(null);return}$.push({width:Y.readUInt32BE(16),height:Y.readUInt32BE(20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}),$.push(null)}),$}});var pN4=o((OM7,uN4)=>{var iH9=P4().ParserStream,nH9=P4().str2arr,rH9=P4().sliceEq,aH9=nH9("8BPS\x00\x01");uN4.exports=function(){var $=new iH9;return $._bytes(6,function(Y){if(!rH9(Y,0,aH9)){$._skipBytes(1/0),$.push(null);return}$._bytes(16,function(X){$._skipBytes(1/0),$.push({width:X.readUInt32BE(12),height:X.readUInt32BE(8),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}),$.push(null)})}),$}});var rN4=o((EM7,nN4)=>{var sH9=L0("stream").Transform,dN4=0,cN4=1,Tp=2,lN4=65536,oH9=/<[-_.:a-zA-Z0-9][^>]*>/,tH9=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,eH9=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,$z9=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,Yz9=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,iN4=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function Xz9($){return $===32||$===9||$===13||$===10}function WC($){return typeof $==="number"&&isFinite($)&&$>0}function Gz9($){var Y=$.match(eH9),X=$.match($z9),G=$.match(Yz9);return{width:Y&&(Y[1]||Y[2]),height:X&&(X[1]||X[2]),viewbox:G&&(G[1]||G[2])}}function ZH($){if(!iN4.test($))return"px";return $.match(iN4)[0]}function Jz9($){var Y=($.match(oH9)||[""])[0];if(!tH9.test(Y))return;var X=Gz9(Y),G=parseFloat(X.width),J=parseFloat(X.height);if(X.width&&X.height){if(!WC(G)||!WC(J))return;return{width:G,height:J,type:"svg",mime:"image/svg+xml",wUnits:ZH(X.width),hUnits:ZH(X.height)}}var Q=(X.viewbox||"").split(" "),W={width:Q[2],height:Q[3]},Z=parseFloat(W.width),K=parseFloat(W.height);if(!WC(Z)||!WC(K))return;if(ZH(W.width)!==ZH(W.height))return;var H=Z/K;if(X.width){if(!WC(G))return;return{width:G,height:G/H,type:"svg",mime:"image/svg+xml",wUnits:ZH(X.width),hUnits:ZH(X.width)}}if(X.height){if(!WC(J))return;return{width:J*H,height:J,type:"svg",mime:"image/svg+xml",wUnits:ZH(X.height),hUnits:ZH(X.height)}}return{width:Z,height:K,type:"svg",mime:"image/svg+xml",wUnits:ZH(W.width),hUnits:ZH(W.height)}}nN4.exports=function(){var $=dN4,Y=0,X="",G=null,J=new sH9({readableObjectMode:!0,transform:function Q(W,Z,K){switch($){case dN4:if(G)W=Buffer.concat([G,W]),G=null;if(Y===0&&W.length<4){G=W;break}var H=0,z=W.length;if(Y===0&&W[0]===239&&W[1]===187&&W[2]===191)H=3;while(H<z&&Xz9(W[H]))H++;if(H>=z){if(Y+=W.length,Y>lN4)$=Tp,J.push(null)}else if(W[H]===60)return $=cN4,Q(W,Z,K);else $=Tp,J.push(null);break;case cN4:X+=W.toString();var V=Jz9(X);if(V){$=Tp,J.push(V),J.push(null);break}if(Y+=W.length,Y>lN4)$=Tp,J.push(null);break}K()},flush:function(){$=Tp,J.push(null)}});return J}});var eN4=o((MM7,tN4)=>{var Qz9=P4().ParserStream,oN4=P4().str2arr,aN4=P4().sliceEq,Wz9=oN4("II*\x00"),Zz9=oN4("MM\x00*");function BY0($,Y,X){return X?$.readUInt16BE(Y):$.readUInt16LE(Y)}function Cp0($,Y,X){return X?$.readUInt32BE(Y):$.readUInt32LE(Y)}function sN4($,Y,X){var G=BY0($,Y+2,X),J=Cp0($,Y+4,X);if(J!==1||G!==3&&G!==4)return null;if(G===3)return BY0($,Y+8,X);return Cp0($,Y+8,X)}tN4.exports=function(){var $=new Qz9;return $._bytes(8,function(Y){if(!aN4(Y,0,Wz9)&&!aN4(Y,0,Zz9)){$._skipBytes(1/0),$.push(null);return}var X=Y[0]===77,G=Cp0(Y,4,X)-8;if(G<0){$._skipBytes(1/0),$.push(null);return}function J(Q,W,Z){if(W===0){Z();return}Q._skipBytes(W,Z)}J($,G,function(){$._bytes(2,function(Q){var W=BY0(Q,0,X)*12;if(W<=0){$._skipBytes(1/0),$.push(null);return}$._bytes(W,function(Z){$._skipBytes(1/0);var K,H,z,V;for(K=0;K<W;K+=12)if(V=BY0(Z,K,X),V===256)H=sN4(Z,K,X);else if(V===257)z=sN4(Z,K,X);if(H&&z)$.push({width:H,height:z,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"});$.push(null)})})})}),$}});var GL4=o((RM7,XL4)=>{var Kz9=P4().ParserStream,YL4=P4().str2arr,$L4=P4().sliceEq,Uz9=wM(),Hz9=YL4("RIFF"),zz9=YL4("WEBP");function OY0($,Y,X){if(Y===0){X();return}$._skipBytes(Y,X)}function Vz9($,Y,X){$._bytes(10,function(G){if(G[3]===157&&G[4]===1&&G[5]===42)X.result=X.result||{width:G.readUInt16LE(6)&16383,height:G.readUInt16LE(8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"};OY0($,Y-10,function(){X.offset+=Y,_M($,X)})})}function Az9($,Y,X){$._bytes(5,function(G){if(G[0]===47){var J=G.readUInt32LE(1);X.result=X.result||{width:(J&16383)+1,height:(J>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}OY0($,Y-5,function(){X.offset+=Y,_M($,X)})})}function Fz9($,Y,X){$._bytes(10,function(G){X.result=X.result||{width:(G[6]<<16|G[5]<<8|G[4])+1,height:(G[9]<<16|G[8]<<8|G[7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"},OY0($,Y-10,function(){X.offset+=Y,_M($,X)})})}function Dz9($,Y,X){$._bytes(Y,function(G){X.offset=1/0,X.exif_orientation=Uz9.get_orientation(G),_M($,X)})}function _M($,Y){if(Y.fileLength-8<=Y.offset){if($._skipBytes(1/0),Y.result){var X=Y.result;if(Y.exif_orientation>0)X.orientation=Y.exif_orientation;$.push(X)}$.push(null);return}$._bytes(4-Y.bufferedChunkHeader.length,function(G){Y.offset+=4-Y.bufferedChunkHeader.length;var J=Y.bufferedChunkHeader+String.fromCharCode.apply(null,G);if(J=J.replace(/^\0+/,""),J.length<4){Y.bufferedChunkHeader=J,_M($,Y);return}Y.bufferedChunkHeader="",$._bytes(4,function(Q){Y.offset+=4;var W=Q.readUInt32LE(0);if(J==="VP8 "&&W>=10)Vz9($,W,Y);else if(J==="VP8L"&&W>=5)Az9($,W,Y);else if(J==="VP8X"&&W>=10)Fz9($,W,Y);else if(J==="EXIF"&&W>=4)Dz9($,W,Y);else OY0($,W,function(){Y.offset+=W,_M($,Y)})})})}XL4.exports=function(){var $=new Kz9;return $._bytes(12,function(Y){if($L4(Y,0,Hz9)&&$L4(Y,8,zz9))_M($,{fileLength:Y.readUInt32LE(4)+8,offset:12,exif_orientation:0,bufferedChunkHeader:""});else $._skipBytes(1/0),$.push(null)}),$}});var EY0=o((qM7,JL4)=>{JL4.exports={avif:IN4(),bmp:wN4(),gif:CN4(),ico:kN4(),jpeg:bN4(),png:mN4(),psd:pN4(),svg:rN4(),tiff:eN4(),webp:GL4()}});var kp0=o((IM7,Sp0)=>{var Nz9=P4().ProbeError,MY0=EY0(),Lz9=L0("stream").PassThrough,Bz9=L0("stream").pipeline;Sp0.exports=function(Y,X){var G=new Lz9;G.setMaxListeners(Object.keys(MY0).length+10);var J=new Promise(function(W,Z){Y.on("error",Z),G.on("error",Z);var K=[],H;function z(V){var A=K.indexOf[this];if(A<0)return;if(V)H=V;if(G.unpipe(this),this.removeAllListeners(),K.splice(A,1),K.length)return;Z(H||new Nz9("unrecognized file format","ECONTENT"))}Object.keys(MY0).forEach(function(V){var A=MY0[V]();K.push(A),A.once("data",function(F){if(F.width>0&&F.height>0){W(F);return}z.call(A)}),A.once("end",z),A.on("error",z),G.pipe(A)})});function Q(){if(X&&typeof Y.unpipe==="function")Y.unpipe(G);G.destroy()}if(J.then(Q).catch(Q),X)Y.pipe(G);else Bz9(Y,G,function(){});return J};Sp0.exports.parsers=MY0});var vp0=o((PM7,QL4)=>{function Oz9($){X.debug=X,X.default=X,X.coerce=K,X.disable=W,X.enable=Q,X.enabled=Z,X.humanize=Gi(),Object.keys($).forEach(function(H){X[H]=$[H]}),X.instances=[],X.names=[],X.skips=[],X.formatters={};function Y(H){var z=0;for(var V=0;V<H.length;V++)z=(z<<5)-z+H.charCodeAt(V),z|=0;return X.colors[Math.abs(z)%X.colors.length]}X.selectColor=Y;function X(H){var z;function V(){if(!V.enabled)return;for(var A=arguments.length,F=Array(A),N=0;N<A;N++)F[N]=arguments[N];var D=V,L=Number(new Date),B=L-(z||L);if(D.diff=B,D.prev=z,D.curr=L,z=L,F[0]=X.coerce(F[0]),typeof F[0]!=="string")F.unshift("%O");var O=0;F[0]=F[0].replace(/%([a-zA-Z%])/g,function(M,R){if(M==="%%")return M;O++;var q=X.formatters[R];if(typeof q==="function"){var w=F[O];M=q.call(D,w),F.splice(O,1),O--}return M}),X.formatArgs.call(D,F);var E=D.log||X.log;E.apply(D,F)}if(V.namespace=H,V.enabled=X.enabled(H),V.useColors=X.useColors(),V.color=Y(H),V.destroy=G,V.extend=J,typeof X.init==="function")X.init(V);return X.instances.push(V),V}function G(){var H=X.instances.indexOf(this);if(H!==-1)return X.instances.splice(H,1),!0;return!1}function J(H,z){return X(this.namespace+(typeof z>"u"?":":z)+H)}function Q(H){X.save(H),X.names=[],X.skips=[];var z,V=(typeof H==="string"?H:"").split(/[\s,]+/),A=V.length;for(z=0;z<A;z++){if(!V[z])continue;if(H=V[z].replace(/\*/g,".*?"),H[0]==="-")X.skips.push(new RegExp("^"+H.substr(1)+"$"));else X.names.push(new RegExp("^"+H+"$"))}for(z=0;z<X.instances.length;z++){var F=X.instances[z];F.enabled=X.enabled(F.namespace)}}function W(){X.enable("")}function Z(H){if(H[H.length-1]==="*")return!0;var z,V;for(z=0,V=X.skips.length;z<V;z++)if(X.skips[z].test(H))return!1;for(z=0,V=X.names.length;z<V;z++)if(X.names[z].test(H))return!0;return!1}function K(H){if(H instanceof Error)return H.stack||H.message;return H}return X.enable(X.load()),X}QL4.exports=Oz9});var ZL4=o((WL4,IY0)=>{function RY0($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")RY0=function(X){return typeof X};else RY0=function(X){return X&&typeof Symbol==="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X};return RY0($)}WL4.log=Rz9;WL4.formatArgs=Mz9;WL4.save=qz9;WL4.load=Iz9;WL4.useColors=Ez9;WL4.storage=Pz9();WL4.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ez9(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Mz9($){if($[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+$[0]+(this.useColors?"%c ":" ")+"+"+IY0.exports.humanize(this.diff),!this.useColors)return;var Y="color: "+this.color;$.splice(1,0,Y,"color: inherit");var X=0,G=0;$[0].replace(/%[a-zA-Z%]/g,function(J){if(J==="%%")return;if(X++,J==="%c")G=X}),$.splice(G,0,Y)}function Rz9(){var $;return(typeof console>"u"?"undefined":RY0(console))==="object"&&console.log&&($=console).log.apply($,arguments)}function qz9($){try{if($)WL4.storage.setItem("debug",$);else WL4.storage.removeItem("debug")}catch(Y){}}function Iz9(){var $;try{$=WL4.storage.getItem("debug")}catch(Y){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}function Pz9(){try{return localStorage}catch($){}}IY0.exports=vp0()(WL4);var wz9=IY0.exports.formatters;wz9.j=function($){try{return JSON.stringify($)}catch(Y){return"[UnexpectedJSONParseError]: "+Y.message}}});var zL4=o((UL4,wY0)=>{var vz9=L0("tty"),PY0=L0("util");UL4.init=mz9;UL4.log=hz9;UL4.formatArgs=yz9;UL4.save=fz9;UL4.load=gz9;UL4.useColors=xz9;UL4.colors=[6,2,3,4,5,1];try{if(Cp=ZF0(),Cp&&(Cp.stderr||Cp).level>=2)UL4.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch($){}var Cp;UL4.inspectOpts=Object.keys(process.env).filter(function($){return/^debug_/i.test($)}).reduce(function($,Y){var X=Y.substring(6).toLowerCase().replace(/_([a-z])/g,function(J,Q){return Q.toUpperCase()}),G=process.env[Y];if(/^(yes|on|true|enabled)$/i.test(G))G=!0;else if(/^(no|off|false|disabled)$/i.test(G))G=!1;else if(G==="null")G=null;else G=Number(G);return $[X]=G,$},{});function xz9(){return"colors"in UL4.inspectOpts?Boolean(UL4.inspectOpts.colors):vz9.isatty(process.stderr.fd)}function yz9($){var Y=this.namespace,X=this.useColors;if(X){var G=this.color,J="\x1B[3"+(G<8?G:"8;5;"+G),Q="  ".concat(J,";1m").concat(Y," \x1B[0m");$[0]=Q+$[0].split(`
`).join(`
`+Q),$.push(J+"m+"+wY0.exports.humanize(this.diff)+"\x1B[0m")}else $[0]=bz9()+Y+" "+$[0]}function bz9(){if(UL4.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function hz9(){return process.stderr.write(PY0.format.apply(PY0,arguments)+`
`)}function fz9($){if($)process.env.DEBUG=$;else delete process.env.DEBUG}function gz9(){return process.env.DEBUG}function mz9($){$.inspectOpts={};var Y=Object.keys(UL4.inspectOpts);for(var X=0;X<Y.length;X++)$.inspectOpts[Y[X]]=UL4.inspectOpts[Y[X]]}wY0.exports=vp0()(UL4);var KL4=wY0.exports.formatters;KL4.o=function($){return this.inspectOpts.colors=this.useColors,PY0.inspect($,this.inspectOpts).split(`
`).map(function(Y){return Y.trim()}).join(" ")};KL4.O=function($){return this.inspectOpts.colors=this.useColors,PY0.inspect($,this.inspectOpts)}});var VL4=o((jM7,xp0)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)xp0.exports=ZL4();else xp0.exports=zL4()});var AL4=o((az9)=>{var yp0=Object.prototype.toString;function _Y0($,Y){if(Y&&($===null||typeof $>"u"))return Y+"=";else if(yp0.call($)=="[object Array]")return nz9($,Y);else if(yp0.call($)=="[object Object]")return rz9($,Y);else if(yp0.call($)=="[object Date]")return $.toISOString();else if(Y)return Y+"="+encodeURIComponent(String($));else if(String($).indexOf("=")!==-1)return String($);else throw TypeError("Cannot build a querystring out of: "+$)}function nz9($,Y){var X=[];for(var G=0,J=$.length;G<J;G++)if(Y)X.push(_Y0($[G],Y+"[]"));else X.push(_Y0($[G]));return X.join("&")}function rz9($,Y){var X=[];return Object.keys($).forEach(function(G){X.push(_Y0($[G],Y?Y+"["+encodeURIComponent(G)+"]":encodeURIComponent(G)))}),X.join("&")}az9.build=_Y0});var NL4=o((ez9)=>{var oz9=L0("fs").readFile,tz9=L0("path").basename;ez9.build=function($,Y,X){if(typeof $!="object"||typeof $.pipe=="function")return X(Error("Multipart builder expects data as key/val object."));var G="",J=DL4($),Q=Object.keys(J).length;if(Q===0)return X(Error("Empty multipart body. Invalid data."));function W(z,V){if(z)return X(z);if(V)G+=V;--Q||X(null,G+"--"+Y+"--")}for(var Z in J){var K=J[Z];if(K===null||typeof K>"u")W();else if(Buffer.isBuffer(K)){var H={buffer:K,content_type:"application/octet-stream"};FL4(Z,H,Y,W)}else{var H=K.buffer||K.file||K.content_type?K:{value:K};FL4(Z,H,Y,W)}}};function FL4($,Y,X,G){var J="--"+X+`\r
`;J+='Content-Disposition: form-data; name="'+$+'"';function Q(Z,K){if(Z){var H=Y.content_type.indexOf("text")==-1;if(J+='; filename="'+encodeURIComponent(K)+`"\r
`,H)J+=`Content-Transfer-Encoding: binary\r
`;J+="Content-Type: "+Y.content_type+`\r
\r
`,J+=H?Z.toString("binary"):Z.toString("utf8")}G(null,J+`\r
`)}if((Y.file||Y.buffer)&&Y.content_type){var W=Y.filename?Y.filename:Y.file?tz9(Y.file):$;if(Y.buffer)return Q(Y.buffer,W);oz9(Y.file,function(Z,K){if(Z)return G(Z);Q(K,W)})}else{if(typeof Y.value=="object")return G(Error("Object received for "+$+", expected string."));if(Y.content_type)J+=`\r
`,J+="Content-Type: "+Y.content_type;J+=`\r
\r
`,J+=Buffer.from(String(Y.value),"utf8").toString("binary"),Q()}}function DL4($,Y,X){Y=Y||{};for(var G in $){var J=X?X+"["+G+"]":G,Q=$[G];if(Q&&typeof Q==="object"&&!(Q.buffer||Q.file||Q.content_type))DL4(Q,Y,J);else Y[J]=Q}return Y}});var OL4=o((SM7,BL4)=>{var YV9=L0("crypto").createHash;function XV9($,Y,X){var G=$.split(" ")[0],J=Y[0],Q=Y[1];if(G=="Digest")return jM.generate($,J,Q,X.method,X.path);else if(G=="Basic")return LL4(J,Q)}function jY0($){return YV9("md5").update($).digest("hex")}function LL4($,Y){var X=typeof Y>"u"?$:[$,Y].join(":");return"Basic "+Buffer.from(X).toString("base64")}var jM={};jM.parse_header=function($){var Y={},X=$.match(/([a-z0-9_-]+)="?([a-z0-9_=\/\.@\s-\+)()]+)"?/gi);for(var G=0,J=X.length;G<J;G++){var Q=X[G].split("="),W=Q.shift(),Z=Q.join("=").replace(/^"/,"").replace(/"$/,"");Y[W]=Z}return Y};jM.update_nc=function($){var Y=99999999;if($++,$>Y)$=1;var X=[,,,,,,,,].join("0")+"";return $=$+"",X.substr(0,8-$.length)+$};jM.generate=function($,Y,X,G,J){var Q=1,W=null,Z=jM.parse_header($),K=jY0(Y+":"+Z.realm+":"+X),H=jY0(G.toUpperCase()+":"+J),z=[K,Z.nonce];if(typeof Z.qop==="string")W=jY0(Math.random().toString(36)).substr(0,8),Q=jM.update_nc(Q),z=z.concat(Q,W),z=z.concat(Z.qop,H);else z=z.concat(H);var V={uri:J,realm:Z.realm,nonce:Z.nonce,username:Y,response:jY0(z.join(":"))};if(Z.qop)V.qop=Z.qop;if(Z.opaque)V.opaque=Z.opaque;if(W)V.nc=Q,V.cnonce=W;$=[];for(var A in V)$.push(A+'="'+V[A]+'"');return"Digest "+$.join(", ")};BL4.exports={header:XV9,basic:LL4,digest:jM.generate}});var qL4=o((zV9)=>{var EL4=L0("querystring").unescape,GV9=/^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2\s*$/,JV9=/[\x00-\x1F\x7F\x3B\x3B\s\"\,\\"%]/g,QV9=1,ML4=3;function WV9($){return $.trim().replace(/\x3B+$/,"")}function ZV9($){var Y=$.indexOf(";");return Y===-1?$:$.substr(0,Y)}function RL4($){return $.toString().replace(JV9,encodeURIComponent)}function KV9($){$=WV9($),$=ZV9($);var Y=GV9.exec($);if(!Y||!Y[ML4])return null;return{name:EL4(Y[QV9]),value:EL4(Y[ML4])}}function UV9($){if(!$)return{};return $=Array.isArray($)?$:[$],$.reduce(function(Y,X){var G=KV9(X);if(G)Y[G.name]=G.value;return Y},{})}function HV9($){return Object.keys($).reduce(function(Y,X){var G=RL4(X),J=RL4($[X]);return Y+=(Y?"; ":"")+G+"="+J,Y},"")}zV9.read=UV9;zV9.write=HV9});var IL4=o((TY0)=>{(function($){$.parser=function(e,m){return new X(e,m)},$.SAXParser=X,$.SAXStream=z,$.createStream=K,$.MAX_BUFFER_LENGTH=65536;var Y=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];$.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function X(e,m){if(!(this instanceof X))return new X(e,m);var $0=this;if(J($0),$0.q=$0.c="",$0.bufferCheckPosition=$.MAX_BUFFER_LENGTH,$0.encoding=null,$0.opt=m||{},$0.opt.lowercase=$0.opt.lowercase||$0.opt.lowercasetags,$0.looseCase=$0.opt.lowercase?"toLowerCase":"toUpperCase",$0.opt.maxEntityCount=$0.opt.maxEntityCount||512,$0.opt.maxEntityDepth=$0.opt.maxEntityDepth||4,$0.entityCount=$0.entityDepth=0,$0.tags=[],$0.closed=$0.closedRoot=$0.sawRoot=!1,$0.tag=$0.error=null,$0.strict=!!e,$0.noscript=!!(e||$0.opt.noscript),$0.state=P.BEGIN,$0.strictEntities=$0.opt.strictEntities,$0.ENTITIES=$0.strictEntities?Object.create($.XML_ENTITIES):Object.create($.ENTITIES),$0.attribList=[],$0.opt.xmlns)$0.ns=Object.create(D);if($0.opt.unquotedAttributeValues===void 0)$0.opt.unquotedAttributeValues=!e;if($0.trackPosition=$0.opt.position!==!1,$0.trackPosition)$0.position=$0.line=$0.column=0;C($0,"onready")}if(!Object.create)Object.create=function(e){function m(){}m.prototype=e;var $0=new m;return $0};if(!Object.keys)Object.keys=function(e){var m=[];for(var $0 in e)if(e.hasOwnProperty($0))m.push($0);return m};function G(e){var m=Math.max($.MAX_BUFFER_LENGTH,10),$0=0;for(var Y0=0,K0=Y.length;Y0<K0;Y0++){var A0=e[Y[Y0]].length;if(A0>m)switch(Y[Y0]){case"textNode":y(e);break;case"cdata":x(e,"oncdata",e.cdata),e.cdata="";break;case"script":x(e,"onscript",e.script),e.script="";break;default:u(e,"Max buffer length exceeded: "+Y[Y0])}$0=Math.max($0,A0)}var D0=$.MAX_BUFFER_LENGTH-$0;e.bufferCheckPosition=D0+e.position}function J(e){for(var m=0,$0=Y.length;m<$0;m++)e[Y[m]]=""}function Q(e){if(y(e),e.cdata!=="")x(e,"oncdata",e.cdata),e.cdata="";if(e.script!=="")x(e,"onscript",e.script),e.script=""}X.prototype={end:function(){b(this)},write:Q0,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){Q(this)}};var W;try{W=L0("stream").Stream}catch(e){W=function(){}}if(!W)W=function(){};var Z=$.EVENTS.filter(function(e){return e!=="error"&&e!=="end"});function K(e,m){return new z(e,m)}function H(e,m){if(e.length>=2){if(e[0]===255&&e[1]===254)return"utf-16le";if(e[0]===254&&e[1]===255)return"utf-16be"}if(e.length>=3&&e[0]===239&&e[1]===187&&e[2]===191)return"utf8";if(e.length>=4){if(e[0]===60&&e[1]===0&&e[2]===63&&e[3]===0)return"utf-16le";if(e[0]===0&&e[1]===60&&e[2]===0&&e[3]===63)return"utf-16be";return"utf8"}return m?"utf8":null}function z(e,m){if(!(this instanceof z))return new z(e,m);W.apply(this),this._parser=new X(e,m),this.writable=!0,this.readable=!0;var $0=this;this._parser.onend=function(){$0.emit("end")},this._parser.onerror=function(Y0){$0.emit("error",Y0),$0._parser.error=null},this._decoder=null,this._decoderBuffer=null,Z.forEach(function(Y0){Object.defineProperty($0,"on"+Y0,{get:function(){return $0._parser["on"+Y0]},set:function(K0){if(!K0)return $0.removeAllListeners(Y0),$0._parser["on"+Y0]=K0,K0;$0.on(Y0,K0)},enumerable:!0,configurable:!1})})}z.prototype=Object.create(W.prototype,{constructor:{value:z}}),z.prototype._decodeBuffer=function(e,m){if(this._decoderBuffer)e=Buffer.concat([this._decoderBuffer,e]),this._decoderBuffer=null;if(!this._decoder){var $0=H(e,m);if(!$0)return this._decoderBuffer=e,"";this._parser.encoding=$0,this._decoder=new TextDecoder($0)}return this._decoder.decode(e,{stream:!m})},z.prototype.write=function(e){if(typeof Buffer==="function"&&typeof Buffer.isBuffer==="function"&&Buffer.isBuffer(e))e=this._decodeBuffer(e,!1);else if(this._decoderBuffer){var m=this._decodeBuffer(Buffer.alloc(0),!0);if(m)this._parser.write(m),this.emit("data",m)}return this._parser.write(e.toString()),this.emit("data",e),!0},z.prototype.end=function(e){if(e&&e.length)this.write(e);if(this._decoderBuffer){var m=this._decodeBuffer(Buffer.alloc(0),!0);if(m)this._parser.write(m),this.emit("data",m)}else if(this._decoder){var $0=this._decoder.decode();if($0)this._parser.write($0),this.emit("data",$0)}return this._parser.end(),!0},z.prototype.on=function(e,m){var $0=this;if(!$0._parser["on"+e]&&Z.indexOf(e)!==-1)$0._parser["on"+e]=function(){var Y0=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Y0.splice(0,0,e),$0.emit.apply($0,Y0)};return W.prototype.on.call($0,e,m)};var V="[CDATA[",A="DOCTYPE",F="http://www.w3.org/XML/1998/namespace",N="http://www.w3.org/2000/xmlns/",D={xml:F,xmlns:N},L=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,O=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,E=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function M(e){return e===" "||e===`
`||e==="\r"||e==="\t"}function R(e){return e==='"'||e==="'"}function q(e){return e===">"||M(e)}function w(e,m){return e.test(m)}function I(e,m){return!w(e,m)}var P=0;$.STATE={BEGIN:P++,BEGIN_WHITESPACE:P++,TEXT:P++,TEXT_ENTITY:P++,OPEN_WAKA:P++,SGML_DECL:P++,SGML_DECL_QUOTED:P++,DOCTYPE:P++,DOCTYPE_QUOTED:P++,DOCTYPE_DTD:P++,DOCTYPE_DTD_QUOTED:P++,COMMENT_STARTING:P++,COMMENT:P++,COMMENT_ENDING:P++,COMMENT_ENDED:P++,CDATA:P++,CDATA_ENDING:P++,CDATA_ENDING_2:P++,PROC_INST:P++,PROC_INST_BODY:P++,PROC_INST_ENDING:P++,OPEN_TAG:P++,OPEN_TAG_SLASH:P++,ATTRIB:P++,ATTRIB_NAME:P++,ATTRIB_NAME_SAW_WHITE:P++,ATTRIB_VALUE:P++,ATTRIB_VALUE_QUOTED:P++,ATTRIB_VALUE_CLOSED:P++,ATTRIB_VALUE_UNQUOTED:P++,ATTRIB_VALUE_ENTITY_Q:P++,ATTRIB_VALUE_ENTITY_U:P++,CLOSE_TAG:P++,CLOSE_TAG_SAW_WHITE:P++,SCRIPT:P++,SCRIPT_ENDING:P++},$.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},$.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys($.ENTITIES).forEach(function(e){var m=$.ENTITIES[e],$0=typeof m==="number"?String.fromCharCode(m):m;$.ENTITIES[e]=$0});for(var _ in $.STATE)$.STATE[$.STATE[_]]=_;P=$.STATE;function C(e,m,$0){e[m]&&e[m]($0)}function k(e){var m=e&&e.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);return m?m[2]:null}function S(e){if(!e)return null;return e.toLowerCase().replace(/[^a-z0-9]/g,"")}function T(e,m){let $0=S(e),Y0=S(m);if(!$0||!Y0)return!0;if(Y0==="utf16")return $0==="utf16le"||$0==="utf16be";return $0===Y0}function v(e,m){if(!e.strict||!e.encoding||!m||m.name!=="xml")return;var $0=k(m.body);if($0&&!T(e.encoding,$0))g(e,"XML declaration encoding "+$0+" does not match detected stream encoding "+e.encoding.toUpperCase())}function x(e,m,$0){if(e.textNode)y(e);C(e,m,$0)}function y(e){if(e.textNode=d(e.opt,e.textNode),e.textNode)C(e,"ontext",e.textNode);e.textNode=""}function d(e,m){if(e.trim)m=m.trim();if(e.normalize)m=m.replace(/\s+/g," ");return m}function u(e,m){if(y(e),e.trackPosition)m+=`
Line: `+e.line+`
Column: `+e.column+`
Char: `+e.c;return m=Error(m),e.error=m,C(e,"onerror",m),e}function b(e){if(e.sawRoot&&!e.closedRoot)g(e,"Unclosed root tag");if(e.state!==P.BEGIN&&e.state!==P.BEGIN_WHITESPACE&&e.state!==P.TEXT)u(e,"Unexpected end");return y(e),e.c="",e.closed=!0,C(e,"onend"),X.call(e,e.strict,e.opt),e}function g(e,m){if(typeof e!=="object"||!(e instanceof X))throw Error("bad call to strictFail");if(e.strict)u(e,m)}function p(e){if(!e.strict)e.tagName=e.tagName[e.looseCase]();var m=e.tags[e.tags.length-1]||e,$0=e.tag={name:e.tagName,attributes:{}};if(e.opt.xmlns)$0.ns=m.ns;e.attribList.length=0,x(e,"onopentagstart",$0)}function h(e,m){var $0=e.indexOf(":"),Y0=$0<0?["",e]:e.split(":"),K0=Y0[0],A0=Y0[1];if(m&&e==="xmlns")K0="xmlns",A0="";return{prefix:K0,local:A0}}function n(e){if(!e.strict)e.attribName=e.attribName[e.looseCase]();if(e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName)){e.attribName=e.attribValue="";return}if(e.opt.xmlns){var m=h(e.attribName,!0),$0=m.prefix,Y0=m.local;if($0==="xmlns")if(Y0==="xml"&&e.attribValue!==F)g(e,"xml: prefix must be bound to "+F+`
Actual: `+e.attribValue);else if(Y0==="xmlns"&&e.attribValue!==N)g(e,"xmlns: prefix must be bound to "+N+`
Actual: `+e.attribValue);else{var K0=e.tag,A0=e.tags[e.tags.length-1]||e;if(K0.ns===A0.ns)K0.ns=Object.create(A0.ns);K0.ns[Y0]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,x(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}function t(e,m){if(e.opt.xmlns){var $0=e.tag,Y0=h(e.tagName);if($0.prefix=Y0.prefix,$0.local=Y0.local,$0.uri=$0.ns[Y0.prefix]||"",$0.prefix&&!$0.uri)g(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),$0.uri=Y0.prefix;var K0=e.tags[e.tags.length-1]||e;if($0.ns&&K0.ns!==$0.ns)Object.keys($0.ns).forEach(function(C0){x(e,"onopennamespace",{prefix:C0,uri:$0.ns[C0]})});for(var A0=0,D0=e.attribList.length;A0<D0;A0++){var O0=e.attribList[A0],R0=O0[0],I0=O0[1],g0=h(R0,!0),p0=g0.prefix,U4=g0.local,P1=p0===""?"":$0.ns[p0]||"",d1={name:R0,value:I0,prefix:p0,local:U4,uri:P1};if(p0&&p0!=="xmlns"&&!P1)g(e,"Unbound namespace prefix: "+JSON.stringify(p0)),d1.uri=p0;e.tag.attributes[R0]=d1,x(e,"onattribute",d1)}e.attribList.length=0}if(e.tag.isSelfClosing=!!m,e.sawRoot=!0,e.tags.push(e.tag),x(e,"onopentag",e.tag),!m){if(!e.noscript&&e.tagName.toLowerCase()==="script")e.state=P.SCRIPT;else e.state=P.TEXT;e.tag=null,e.tagName=""}e.attribName=e.attribValue="",e.attribList.length=0}function s(e){if(!e.tagName){g(e,"Weird empty close tag."),e.textNode+="</>",e.state=P.TEXT;return}if(e.script){if(e.tagName!=="script"){e.script+="</"+e.tagName+">",e.tagName="",e.state=P.SCRIPT;return}x(e,"onscript",e.script),e.script=""}var m=e.tags.length,$0=e.tagName;if(!e.strict)$0=$0[e.looseCase]();var Y0=$0;while(m--){var K0=e.tags[m];if(K0.name!==Y0)g(e,"Unexpected close tag");else break}if(m<0){g(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",e.state=P.TEXT;return}e.tagName=$0;var A0=e.tags.length;while(A0-- >m){var D0=e.tag=e.tags.pop();e.tagName=e.tag.name,x(e,"onclosetag",e.tagName);var O0={};for(var R0 in D0.ns)O0[R0]=D0.ns[R0];var I0=e.tags[e.tags.length-1]||e;if(e.opt.xmlns&&D0.ns!==I0.ns)Object.keys(D0.ns).forEach(function(g0){var p0=D0.ns[g0];x(e,"onclosenamespace",{prefix:g0,uri:p0})})}if(m===0)e.closedRoot=!0;e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=P.TEXT}function Z0(e){var m=e.entity,$0=m.toLowerCase(),Y0,K0="";if(e.ENTITIES[m])return e.ENTITIES[m];if(e.ENTITIES[$0])return e.ENTITIES[$0];if(m=$0,m.charAt(0)==="#")if(m.charAt(1)==="x")m=m.slice(2),Y0=parseInt(m,16),K0=Y0.toString(16);else m=m.slice(1),Y0=parseInt(m,10),K0=Y0.toString(10);if(m=m.replace(/^0+/,""),isNaN(Y0)||K0.toLowerCase()!==m||Y0<0||Y0>1114111)return g(e,"Invalid character entity"),"&"+e.entity+";";return String.fromCodePoint(Y0)}function X0(e,m){if(m==="<")e.state=P.OPEN_WAKA,e.startTagPosition=e.position;else if(!M(m))g(e,"Non-whitespace before first tag."),e.textNode=m,e.state=P.TEXT}function a(e,m){var $0="";if(m<e.length)$0=e.charAt(m);return $0}function Q0(e){var m=this;if(this.error)throw this.error;if(m.closed)return u(m,"Cannot write after close. Assign an onready handler.");if(e===null)return b(m);if(typeof e==="object")e=e.toString();var $0=0,Y0="";while(!0){if(Y0=a(e,$0++),m.c=Y0,!Y0)break;if(m.trackPosition)if(m.position++,Y0===`
`)m.line++,m.column=0;else m.column++;switch(m.state){case P.BEGIN:if(m.state=P.BEGIN_WHITESPACE,Y0==="\uFEFF")continue;X0(m,Y0);continue;case P.BEGIN_WHITESPACE:X0(m,Y0);continue;case P.TEXT:if(m.sawRoot&&!m.closedRoot){var A0=$0-1;while(Y0&&Y0!=="<"&&Y0!=="&")if(Y0=a(e,$0++),Y0&&m.trackPosition)if(m.position++,Y0===`
`)m.line++,m.column=0;else m.column++;m.textNode+=e.substring(A0,$0-1)}if(Y0==="<"&&!(m.sawRoot&&m.closedRoot&&!m.strict))m.state=P.OPEN_WAKA,m.startTagPosition=m.position;else{if(!M(Y0)&&(!m.sawRoot||m.closedRoot))g(m,"Text data outside of root node.");if(Y0==="&")m.state=P.TEXT_ENTITY;else m.textNode+=Y0}continue;case P.SCRIPT:if(Y0==="<")m.state=P.SCRIPT_ENDING;else m.script+=Y0;continue;case P.SCRIPT_ENDING:if(Y0==="/")m.state=P.CLOSE_TAG;else m.script+="<"+Y0,m.state=P.SCRIPT;continue;case P.OPEN_WAKA:if(Y0==="!")m.state=P.SGML_DECL,m.sgmlDecl="";else if(M(Y0));else if(w(L,Y0))m.state=P.OPEN_TAG,m.tagName=Y0;else if(Y0==="/")m.state=P.CLOSE_TAG,m.tagName="";else if(Y0==="?")m.state=P.PROC_INST,m.procInstName=m.procInstBody="";else{if(g(m,"Unencoded <"),m.startTagPosition+1<m.position){var K0=m.position-m.startTagPosition;Y0=Array(K0).join(" ")+Y0}m.textNode+="<"+Y0,m.state=P.TEXT}continue;case P.SGML_DECL:if(m.sgmlDecl+Y0==="--"){m.state=P.COMMENT,m.comment="",m.sgmlDecl="";continue}if(m.doctype&&m.doctype!==!0&&m.sgmlDecl)m.state=P.DOCTYPE_DTD,m.doctype+="<!"+m.sgmlDecl+Y0,m.sgmlDecl="";else if((m.sgmlDecl+Y0).toUpperCase()===V)x(m,"onopencdata"),m.state=P.CDATA,m.sgmlDecl="",m.cdata="";else if((m.sgmlDecl+Y0).toUpperCase()===A){if(m.state=P.DOCTYPE,m.doctype||m.sawRoot)g(m,"Inappropriately located doctype declaration");m.doctype="",m.sgmlDecl=""}else if(Y0===">")x(m,"onsgmldeclaration",m.sgmlDecl),m.sgmlDecl="",m.state=P.TEXT;else if(R(Y0))m.state=P.SGML_DECL_QUOTED,m.sgmlDecl+=Y0;else m.sgmlDecl+=Y0;continue;case P.SGML_DECL_QUOTED:if(Y0===m.q)m.state=P.SGML_DECL,m.q="";m.sgmlDecl+=Y0;continue;case P.DOCTYPE:if(Y0===">")m.state=P.TEXT,x(m,"ondoctype",m.doctype),m.doctype=!0;else if(m.doctype+=Y0,Y0==="[")m.state=P.DOCTYPE_DTD;else if(R(Y0))m.state=P.DOCTYPE_QUOTED,m.q=Y0;continue;case P.DOCTYPE_QUOTED:if(m.doctype+=Y0,Y0===m.q)m.q="",m.state=P.DOCTYPE;continue;case P.DOCTYPE_DTD:if(Y0==="]")m.doctype+=Y0,m.state=P.DOCTYPE;else if(Y0==="<")m.state=P.OPEN_WAKA,m.startTagPosition=m.position;else if(R(Y0))m.doctype+=Y0,m.state=P.DOCTYPE_DTD_QUOTED,m.q=Y0;else m.doctype+=Y0;continue;case P.DOCTYPE_DTD_QUOTED:if(m.doctype+=Y0,Y0===m.q)m.state=P.DOCTYPE_DTD,m.q="";continue;case P.COMMENT:if(Y0==="-")m.state=P.COMMENT_ENDING;else m.comment+=Y0;continue;case P.COMMENT_ENDING:if(Y0==="-"){if(m.state=P.COMMENT_ENDED,m.comment=d(m.opt,m.comment),m.comment)x(m,"oncomment",m.comment);m.comment=""}else m.comment+="-"+Y0,m.state=P.COMMENT;continue;case P.COMMENT_ENDED:if(Y0!==">")g(m,"Malformed comment"),m.comment+="--"+Y0,m.state=P.COMMENT;else if(m.doctype&&m.doctype!==!0)m.state=P.DOCTYPE_DTD;else m.state=P.TEXT;continue;case P.CDATA:var A0=$0-1;while(Y0&&Y0!=="]")if(Y0=a(e,$0++),Y0&&m.trackPosition)if(m.position++,Y0===`
`)m.line++,m.column=0;else m.column++;if(m.cdata+=e.substring(A0,$0-1),Y0==="]")m.state=P.CDATA_ENDING;continue;case P.CDATA_ENDING:if(Y0==="]")m.state=P.CDATA_ENDING_2;else m.cdata+="]"+Y0,m.state=P.CDATA;continue;case P.CDATA_ENDING_2:if(Y0===">"){if(m.cdata)x(m,"oncdata",m.cdata);x(m,"onclosecdata"),m.cdata="",m.state=P.TEXT}else if(Y0==="]")m.cdata+="]";else m.cdata+="]]"+Y0,m.state=P.CDATA;continue;case P.PROC_INST:if(Y0==="?")m.state=P.PROC_INST_ENDING;else if(M(Y0))m.state=P.PROC_INST_BODY;else m.procInstName+=Y0;continue;case P.PROC_INST_BODY:if(!m.procInstBody&&M(Y0))continue;else if(Y0==="?")m.state=P.PROC_INST_ENDING;else m.procInstBody+=Y0;continue;case P.PROC_INST_ENDING:if(Y0===">"){let I0={name:m.procInstName,body:m.procInstBody};v(m,I0),x(m,"onprocessinginstruction",I0),m.procInstName=m.procInstBody="",m.state=P.TEXT}else m.procInstBody+="?"+Y0,m.state=P.PROC_INST_BODY;continue;case P.OPEN_TAG:if(w(B,Y0))m.tagName+=Y0;else if(p(m),Y0===">")t(m);else if(Y0==="/")m.state=P.OPEN_TAG_SLASH;else{if(!M(Y0))g(m,"Invalid character in tag name");m.state=P.ATTRIB}continue;case P.OPEN_TAG_SLASH:if(Y0===">")t(m,!0),s(m);else g(m,"Forward-slash in opening tag not followed by >"),m.state=P.ATTRIB;continue;case P.ATTRIB:if(M(Y0))continue;else if(Y0===">")t(m);else if(Y0==="/")m.state=P.OPEN_TAG_SLASH;else if(w(L,Y0))m.attribName=Y0,m.attribValue="",m.state=P.ATTRIB_NAME;else g(m,"Invalid attribute name");continue;case P.ATTRIB_NAME:if(Y0==="=")m.state=P.ATTRIB_VALUE;else if(Y0===">")g(m,"Attribute without value"),m.attribValue=m.attribName,n(m),t(m);else if(M(Y0))m.state=P.ATTRIB_NAME_SAW_WHITE;else if(w(B,Y0))m.attribName+=Y0;else g(m,"Invalid attribute name");continue;case P.ATTRIB_NAME_SAW_WHITE:if(Y0==="=")m.state=P.ATTRIB_VALUE;else if(M(Y0))continue;else if(g(m,"Attribute without value"),m.tag.attributes[m.attribName]="",m.attribValue="",x(m,"onattribute",{name:m.attribName,value:""}),m.attribName="",Y0===">")t(m);else if(w(L,Y0))m.attribName=Y0,m.state=P.ATTRIB_NAME;else g(m,"Invalid attribute name"),m.state=P.ATTRIB;continue;case P.ATTRIB_VALUE:if(M(Y0))continue;else if(R(Y0))m.q=Y0,m.state=P.ATTRIB_VALUE_QUOTED;else{if(!m.opt.unquotedAttributeValues)u(m,"Unquoted attribute value");m.state=P.ATTRIB_VALUE_UNQUOTED,m.attribValue=Y0}continue;case P.ATTRIB_VALUE_QUOTED:if(Y0!==m.q){if(Y0==="&")m.state=P.ATTRIB_VALUE_ENTITY_Q;else m.attribValue+=Y0;continue}n(m),m.q="",m.state=P.ATTRIB_VALUE_CLOSED;continue;case P.ATTRIB_VALUE_CLOSED:if(M(Y0))m.state=P.ATTRIB;else if(Y0===">")t(m);else if(Y0==="/")m.state=P.OPEN_TAG_SLASH;else if(w(L,Y0))g(m,"No whitespace between attributes"),m.attribName=Y0,m.attribValue="",m.state=P.ATTRIB_NAME;else g(m,"Invalid attribute name");continue;case P.ATTRIB_VALUE_UNQUOTED:if(!q(Y0)){if(Y0==="&")m.state=P.ATTRIB_VALUE_ENTITY_U;else m.attribValue+=Y0;continue}if(n(m),Y0===">")t(m);else m.state=P.ATTRIB;continue;case P.CLOSE_TAG:if(!m.tagName)if(M(Y0))continue;else if(I(L,Y0))if(m.script)m.script+="</"+Y0,m.state=P.SCRIPT;else g(m,"Invalid tagname in closing tag.");else m.tagName=Y0;else if(Y0===">")s(m);else if(w(B,Y0))m.tagName+=Y0;else if(m.script)m.script+="</"+m.tagName+Y0,m.tagName="",m.state=P.SCRIPT;else{if(!M(Y0))g(m,"Invalid tagname in closing tag");m.state=P.CLOSE_TAG_SAW_WHITE}continue;case P.CLOSE_TAG_SAW_WHITE:if(M(Y0))continue;if(Y0===">")s(m);else g(m,"Invalid characters in closing tag");continue;case P.TEXT_ENTITY:case P.ATTRIB_VALUE_ENTITY_Q:case P.ATTRIB_VALUE_ENTITY_U:var D0,O0;switch(m.state){case P.TEXT_ENTITY:D0=P.TEXT,O0="textNode";break;case P.ATTRIB_VALUE_ENTITY_Q:D0=P.ATTRIB_VALUE_QUOTED,O0="attribValue";break;case P.ATTRIB_VALUE_ENTITY_U:D0=P.ATTRIB_VALUE_UNQUOTED,O0="attribValue";break}if(Y0===";"){var R0=Z0(m);if(m.opt.unparsedEntities&&!Object.values($.XML_ENTITIES).includes(R0)){if((m.entityCount+=1)>m.opt.maxEntityCount)u(m,"Parsed entity count exceeds max entity count");if((m.entityDepth+=1)>m.opt.maxEntityDepth)u(m,"Parsed entity depth exceeds max entity depth");m.entity="",m.state=D0,m.write(R0),m.entityDepth-=1}else m[O0]+=R0,m.entity="",m.state=D0}else if(w(m.entity.length?E:O,Y0))m.entity+=Y0;else g(m,"Invalid character in entity name"),m[O0]+="&"+m.entity+Y0,m.entity="",m.state=D0;continue;default:throw Error(m,"Unknown state: "+m.state)}}if(m.position>=m.bufferCheckPosition)G(m);return m}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint)(function(){var e=String.fromCharCode,m=Math.floor,$0=function(){var Y0=16384,K0=[],A0,D0,O0=-1,R0=arguments.length;if(!R0)return"";var I0="";while(++O0<R0){var g0=Number(arguments[O0]);if(!isFinite(g0)||g0<0||g0>1114111||m(g0)!==g0)throw RangeError("Invalid code point: "+g0);if(g0<=65535)K0.push(g0);else g0-=65536,A0=(g0>>10)+55296,D0=g0%1024+56320,K0.push(A0,D0);if(O0+1===R0||K0.length>Y0)I0+=e.apply(null,K0),K0.length=0}return I0};if(Object.defineProperty)Object.defineProperty(String,"fromCodePoint",{value:$0,configurable:!0,writable:!0});else String.fromCodePoint=$0})()})(typeof TY0>"u"?TY0.sax={}:TY0)});var wL4=o((xM7,hp0)=>{var FV9=L0("stream").Transform,DV9=IL4();function NV9($,Y){var X,G,J=DV9.parser(!0,{trim:!0,lowercase:!0});J.onerror=J.onend=Q;function Q(Z){J.onerror=J.onend=function(){},Y(Z,X)}function W(Z,K){return{name:Z||"",value:"",attributes:K||{},children:[]}}J.oncdata=J.ontext=function(Z){if(G)G.value+=Z},J.onopentag=function(Z){var K=W(Z.name,Z.attributes);if(G)K.parent=G,G.children.push(K);else X=K;G=K},J.onclosetag=function(){if(typeof G.parent<"u"){var Z=G;G=G.parent,delete Z.parent}},J.write($).close()}function LV9($,Y){function X(){var G=[],J=new FV9({objectMode:!0});return J._transform=function(Q,W,Z){G.push(Q),Z()},J._flush=function(Q){var W=this,Z=Buffer.concat(G);try{Y(Z,function(K,H){if(K)throw K;W.push(H)})}catch(K){W.push(Z)}finally{Q()}},J}return{fn:X,name:$}}var PL4={};function bp0($,Y,X){var G=LV9($,X);Y.forEach(function(J){PL4[J]=G})}bp0("json",["application/json","text/javascript","application/vnd.api+json"],function($,Y){var X,G;try{G=JSON.parse($)}catch(J){X=J}Y(X,G)});bp0("xml",["text/xml","application/xml","application/rdf+xml","application/rss+xml","application/atom+xml"],function($,Y){NV9($.toString(),function(X,G){Y(X,G)})});hp0.exports=PL4;hp0.exports.use=bp0});var jL4=o((BV9)=>{var _L4="\uFEFF";BV9.PrependBOM=fp0;function fp0($,Y){this.encoder=$,this.addBOM=!0}fp0.prototype.write=function($){if(this.addBOM)$=_L4+$,this.addBOM=!1;return this.encoder.write($)};fp0.prototype.end=function(){return this.encoder.end()};BV9.StripBOM=gp0;function gp0($,Y){this.decoder=$,this.pass=!1,this.options=Y||{}}gp0.prototype.write=function($){var Y=this.decoder.write($);if(this.pass||!Y)return Y;if(Y[0]===_L4){if(Y=Y.slice(1),typeof this.options.stripBOM==="function")this.options.stripBOM()}return this.pass=!0,Y};gp0.prototype.end=function(){return this.decoder.end()}});var SL4=o((bM7,CL4)=>{var Sp=qG().Buffer;CL4.exports={utf8:{type:"_internal",bomAware:!0},cesu8:{type:"_internal",bomAware:!0},unicode11utf8:"utf8",ucs2:{type:"_internal",bomAware:!0},utf16le:"ucs2",binary:{type:"_internal"},base64:{type:"_internal"},hex:{type:"_internal"},_internal:mp0};function mp0($,Y){if(this.enc=$.encodingName,this.bomAware=$.bomAware,this.enc==="base64")this.encoder=pp0;else if(this.enc==="cesu8"){if(this.enc="utf8",this.encoder=dp0,Sp.from("eda0bdedb2a9","hex").toString()!=="\uD83D\uDCA9")this.decoder=cp0,this.defaultCharUnicode=Y.defaultCharUnicode}}mp0.prototype.encoder=up0;mp0.prototype.decoder=TL4;var CY0=L0("string_decoder").StringDecoder;if(!CY0.prototype.end)CY0.prototype.end=function(){};function TL4($,Y){CY0.call(this,Y.enc)}TL4.prototype=CY0.prototype;function up0($,Y){this.enc=Y.enc}up0.prototype.write=function($){return Sp.from($,this.enc)};up0.prototype.end=function(){};function pp0($,Y){this.prevStr=""}pp0.prototype.write=function($){$=this.prevStr+$;var Y=$.length-$.length%4;return this.prevStr=$.slice(Y),$=$.slice(0,Y),Sp.from($,"base64")};pp0.prototype.end=function(){return Sp.from(this.prevStr,"base64")};function dp0($,Y){}dp0.prototype.write=function($){var Y=Sp.alloc($.length*3),X=0;for(var G=0;G<$.length;G++){var J=$.charCodeAt(G);if(J<128)Y[X++]=J;else if(J<2048)Y[X++]=192+(J>>>6),Y[X++]=128+(J&63);else Y[X++]=224+(J>>>12),Y[X++]=128+(J>>>6&63),Y[X++]=128+(J&63)}return Y.slice(0,X)};dp0.prototype.end=function(){};function cp0($,Y){this.acc=0,this.contBytes=0,this.accBytes=0,this.defaultCharUnicode=Y.defaultCharUnicode}cp0.prototype.write=function($){var Y=this.acc,X=this.contBytes,G=this.accBytes,J="";for(var Q=0;Q<$.length;Q++){var W=$[Q];if((W&192)!==128){if(X>0)J+=this.defaultCharUnicode,X=0;if(W<128)J+=String.fromCharCode(W);else if(W<224)Y=W&31,X=1,G=1;else if(W<240)Y=W&15,X=2,G=1;else J+=this.defaultCharUnicode}else if(X>0){if(Y=Y<<6|W&63,X--,G++,X===0)if(G===2&&Y<128&&Y>0)J+=this.defaultCharUnicode;else if(G===3&&Y<2048)J+=this.defaultCharUnicode;else J+=String.fromCharCode(Y)}else J+=this.defaultCharUnicode}return this.acc=Y,this.contBytes=X,this.accBytes=G,J};cp0.prototype.end=function(){var $=0;if(this.contBytes>0)$+=this.defaultCharUnicode;return $}});var vL4=o((MV9)=>{var SY0=qG().Buffer;MV9.utf16be=kY0;function kY0(){}kY0.prototype.encoder=lp0;kY0.prototype.decoder=ip0;kY0.prototype.bomAware=!0;function lp0(){}lp0.prototype.write=function($){var Y=SY0.from($,"ucs2");for(var X=0;X<Y.length;X+=2){var G=Y[X];Y[X]=Y[X+1],Y[X+1]=G}return Y};lp0.prototype.end=function(){};function ip0(){this.overflowByte=-1}ip0.prototype.write=function($){if($.length==0)return"";var Y=SY0.alloc($.length+1),X=0,G=0;if(this.overflowByte!==-1)Y[0]=$[0],Y[1]=this.overflowByte,X=1,G=2;for(;X<$.length-1;X+=2,G+=2)Y[G]=$[X+1],Y[G+1]=$[X];return this.overflowByte=X==$.length-1?$[$.length-1]:-1,Y.slice(0,G).toString("ucs2")};ip0.prototype.end=function(){};MV9.utf16=np0;function np0($,Y){this.iconv=Y}np0.prototype.encoder=rp0;np0.prototype.decoder=ap0;function rp0($,Y){if($=$||{},$.addBOM===void 0)$.addBOM=!0;this.encoder=Y.iconv.getEncoder("utf-16le",$)}rp0.prototype.write=function($){return this.encoder.write($)};rp0.prototype.end=function(){return this.encoder.end()};function ap0($,Y){this.decoder=null,this.initialBytes=[],this.initialBytesLen=0,this.options=$||{},this.iconv=Y.iconv}ap0.prototype.write=function($){if(!this.decoder){if(this.initialBytes.push($),this.initialBytesLen+=$.length,this.initialBytesLen<16)return"";var $=SY0.concat(this.initialBytes),Y=kL4($,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(Y,this.options),this.initialBytes.length=this.initialBytesLen=0}return this.decoder.write($)};ap0.prototype.end=function(){if(!this.decoder){var $=SY0.concat(this.initialBytes),Y=kL4($,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(Y,this.options);var X=this.decoder.write($),G=this.decoder.end();return G?X+G:X}return this.decoder.end()};function kL4($,Y){var X=Y||"utf-16le";if($.length>=2)if($[0]==254&&$[1]==255)X="utf-16be";else if($[0]==255&&$[1]==254)X="utf-16le";else{var G=0,J=0,Q=Math.min($.length-$.length%2,64);for(var W=0;W<Q;W+=2){if($[W]===0&&$[W+1]!==0)J++;if($[W]!==0&&$[W+1]===0)G++}if(J>G)X="utf-16be";else if(J<G)X="utf-16le"}return X}});var yL4=o((_V9)=>{var KH=qG().Buffer;_V9.utf7=vY0;_V9.unicode11utf7="utf7";function vY0($,Y){this.iconv=Y}vY0.prototype.encoder=op0;vY0.prototype.decoder=tp0;vY0.prototype.bomAware=!0;var IV9=/[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;function op0($,Y){this.iconv=Y.iconv}op0.prototype.write=function($){return KH.from($.replace(IV9,function(Y){return"+"+(Y==="+"?"":this.iconv.encode(Y,"utf16-be").toString("base64").replace(/=+$/,""))+"-"}.bind(this)))};op0.prototype.end=function(){};function tp0($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=""}var PV9=/[A-Za-z0-9\/+]/,ep0=[];for(KC=0;KC<256;KC++)ep0[KC]=PV9.test(String.fromCharCode(KC));var KC,wV9=43,TM=45,sp0=38;tp0.prototype.write=function($){var Y="",X=0,G=this.inBase64,J=this.base64Accum;for(var Q=0;Q<$.length;Q++)if(!G){if($[Q]==wV9)Y+=this.iconv.decode($.slice(X,Q),"ascii"),X=Q+1,G=!0}else if(!ep0[$[Q]]){if(Q==X&&$[Q]==TM)Y+="+";else{var W=J+$.slice(X,Q).toString();Y+=this.iconv.decode(KH.from(W,"base64"),"utf16-be")}if($[Q]!=TM)Q--;X=Q+1,G=!1,J=""}if(!G)Y+=this.iconv.decode($.slice(X),"ascii");else{var W=J+$.slice(X).toString(),Z=W.length-W.length%8;J=W.slice(Z),W=W.slice(0,Z),Y+=this.iconv.decode(KH.from(W,"base64"),"utf16-be")}return this.inBase64=G,this.base64Accum=J,Y};tp0.prototype.end=function(){var $="";if(this.inBase64&&this.base64Accum.length>0)$=this.iconv.decode(KH.from(this.base64Accum,"base64"),"utf16-be");return this.inBase64=!1,this.base64Accum="",$};_V9.utf7imap=xY0;function xY0($,Y){this.iconv=Y}xY0.prototype.encoder=$d0;xY0.prototype.decoder=Yd0;xY0.prototype.bomAware=!0;function $d0($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=KH.alloc(6),this.base64AccumIdx=0}$d0.prototype.write=function($){var Y=this.inBase64,X=this.base64Accum,G=this.base64AccumIdx,J=KH.alloc($.length*5+10),Q=0;for(var W=0;W<$.length;W++){var Z=$.charCodeAt(W);if(32<=Z&&Z<=126){if(Y){if(G>0)Q+=J.write(X.slice(0,G).toString("base64").replace(/\//g,",").replace(/=+$/,""),Q),G=0;J[Q++]=TM,Y=!1}if(!Y){if(J[Q++]=Z,Z===sp0)J[Q++]=TM}}else{if(!Y)J[Q++]=sp0,Y=!0;if(Y){if(X[G++]=Z>>8,X[G++]=Z&255,G==X.length)Q+=J.write(X.toString("base64").replace(/\//g,","),Q),G=0}}}return this.inBase64=Y,this.base64AccumIdx=G,J.slice(0,Q)};$d0.prototype.end=function(){var $=KH.alloc(10),Y=0;if(this.inBase64){if(this.base64AccumIdx>0)Y+=$.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),Y),this.base64AccumIdx=0;$[Y++]=TM,this.inBase64=!1}return $.slice(0,Y)};function Yd0($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=""}var xL4=ep0.slice();xL4[44]=!0;Yd0.prototype.write=function($){var Y="",X=0,G=this.inBase64,J=this.base64Accum;for(var Q=0;Q<$.length;Q++)if(!G){if($[Q]==sp0)Y+=this.iconv.decode($.slice(X,Q),"ascii"),X=Q+1,G=!0}else if(!xL4[$[Q]]){if(Q==X&&$[Q]==TM)Y+="&";else{var W=J+$.slice(X,Q).toString().replace(/,/g,"/");Y+=this.iconv.decode(KH.from(W,"base64"),"utf16-be")}if($[Q]!=TM)Q--;X=Q+1,G=!1,J=""}if(!G)Y+=this.iconv.decode($.slice(X),"ascii");else{var W=J+$.slice(X).toString().replace(/,/g,"/"),Z=W.length-W.length%8;J=W.slice(Z),W=W.slice(0,Z),Y+=this.iconv.decode(KH.from(W,"base64"),"utf16-be")}return this.inBase64=G,this.base64Accum=J,Y};Yd0.prototype.end=function(){var $="";if(this.inBase64&&this.base64Accum.length>0)$=this.iconv.decode(KH.from(this.base64Accum,"base64"),"utf16-be");return this.inBase64=!1,this.base64Accum="",$}});var bL4=o((SV9)=>{var yY0=qG().Buffer;SV9._sbcs=Xd0;function Xd0($,Y){if(!$)throw Error("SBCS codec is called without the data.");if(!$.chars||$.chars.length!==128&&$.chars.length!==256)throw Error("Encoding '"+$.type+"' has incorrect 'chars' (must be of len 128 or 256)");if($.chars.length===128){var X="";for(var G=0;G<128;G++)X+=String.fromCharCode(G);$.chars=X+$.chars}this.decodeBuf=yY0.from($.chars,"ucs2");var J=yY0.alloc(65536,Y.defaultCharSingleByte.charCodeAt(0));for(var G=0;G<$.chars.length;G++)J[$.chars.charCodeAt(G)]=G;this.encodeBuf=J}Xd0.prototype.encoder=Gd0;Xd0.prototype.decoder=Jd0;function Gd0($,Y){this.encodeBuf=Y.encodeBuf}Gd0.prototype.write=function($){var Y=yY0.alloc($.length);for(var X=0;X<$.length;X++)Y[X]=this.encodeBuf[$.charCodeAt(X)];return Y};Gd0.prototype.end=function(){};function Jd0($,Y){this.decodeBuf=Y.decodeBuf}Jd0.prototype.write=function($){var Y=this.decodeBuf,X=yY0.alloc($.length*2),G=0,J=0;for(var Q=0;Q<$.length;Q++)G=$[Q]*2,J=Q*2,X[J]=Y[G],X[J+1]=Y[G+1];return X.toString("ucs2")};Jd0.prototype.end=function(){}});var fL4=o((mM7,hL4)=>{hL4.exports={"10029":"maccenteuro",maccenteuro:{type:"_sbcs",chars:"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7"},"808":"cp808",ibm808:"cp808",cp808:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\u20AC\u25A0\xA0"},mik:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2514\u2534\u252C\u251C\u2500\u253C\u2563\u2551\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xA7\u2557\u255D\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ascii8bit:"ascii",usascii:"ascii",ansix34:"ascii",ansix341968:"ascii",ansix341986:"ascii",csascii:"ascii",cp367:"ascii",ibm367:"ascii",isoir6:"ascii",iso646us:"ascii",iso646irv:"ascii",us:"ascii",latin1:"iso88591",latin2:"iso88592",latin3:"iso88593",latin4:"iso88594",latin5:"iso88599",latin6:"iso885910",latin7:"iso885913",latin8:"iso885914",latin9:"iso885915",latin10:"iso885916",csisolatin1:"iso88591",csisolatin2:"iso88592",csisolatin3:"iso88593",csisolatin4:"iso88594",csisolatincyrillic:"iso88595",csisolatinarabic:"iso88596",csisolatingreek:"iso88597",csisolatinhebrew:"iso88598",csisolatin5:"iso88599",csisolatin6:"iso885910",l1:"iso88591",l2:"iso88592",l3:"iso88593",l4:"iso88594",l5:"iso88599",l6:"iso885910",l7:"iso885913",l8:"iso885914",l9:"iso885915",l10:"iso885916",isoir14:"iso646jp",isoir57:"iso646cn",isoir100:"iso88591",isoir101:"iso88592",isoir109:"iso88593",isoir110:"iso88594",isoir144:"iso88595",isoir127:"iso88596",isoir126:"iso88597",isoir138:"iso88598",isoir148:"iso88599",isoir157:"iso885910",isoir166:"tis620",isoir179:"iso885913",isoir199:"iso885914",isoir203:"iso885915",isoir226:"iso885916",cp819:"iso88591",ibm819:"iso88591",cyrillic:"iso88595",arabic:"iso88596",arabic8:"iso88596",ecma114:"iso88596",asmo708:"iso88596",greek:"iso88597",greek8:"iso88597",ecma118:"iso88597",elot928:"iso88597",hebrew:"iso88598",hebrew8:"iso88598",turkish:"iso88599",turkish8:"iso88599",thai:"iso885911",thai8:"iso885911",celtic:"iso885914",celtic8:"iso885914",isoceltic:"iso885914",tis6200:"tis620",tis62025291:"tis620",tis62025330:"tis620","10000":"macroman","10006":"macgreek","10007":"maccyrillic","10079":"maciceland","10081":"macturkish",cspc8codepage437:"cp437",cspc775baltic:"cp775",cspc850multilingual:"cp850",cspcp852:"cp852",cspc862latinhebrew:"cp862",cpgr:"cp869",msee:"cp1250",mscyrl:"cp1251",msansi:"cp1252",msgreek:"cp1253",msturk:"cp1254",mshebr:"cp1255",msarab:"cp1256",winbaltrim:"cp1257",cp20866:"koi8r","20866":"koi8r",ibm878:"koi8r",cskoi8r:"koi8r",cp21866:"koi8u","21866":"koi8u",ibm1168:"koi8u",strk10482002:"rk1048",tcvn5712:"tcvn",tcvn57121:"tcvn",gb198880:"iso646cn",cn:"iso646cn",csiso14jisc6220ro:"iso646jp",jisc62201969ro:"iso646jp",jp:"iso646jp",cshproman8:"hproman8",r8:"hproman8",roman8:"hproman8",xroman8:"hproman8",ibm1051:"hproman8",mac:"macintosh",csmacintosh:"macintosh"}});var mL4=o((uM7,gL4)=>{gL4.exports={"437":"cp437","737":"cp737","775":"cp775","850":"cp850","852":"cp852","855":"cp855","856":"cp856","857":"cp857","858":"cp858","860":"cp860","861":"cp861","862":"cp862","863":"cp863","864":"cp864","865":"cp865","866":"cp866","869":"cp869","874":"windows874","922":"cp922","1046":"cp1046","1124":"cp1124","1125":"cp1125","1129":"cp1129","1133":"cp1133","1161":"cp1161","1162":"cp1162","1163":"cp1163","1250":"windows1250","1251":"windows1251","1252":"windows1252","1253":"windows1253","1254":"windows1254","1255":"windows1255","1256":"windows1256","1257":"windows1257","1258":"windows1258","28591":"iso88591","28592":"iso88592","28593":"iso88593","28594":"iso88594","28595":"iso88595","28596":"iso88596","28597":"iso88597","28598":"iso88598","28599":"iso88599","28600":"iso885910","28601":"iso885911","28603":"iso885913","28604":"iso885914","28605":"iso885915","28606":"iso885916",windows874:{type:"_sbcs",chars:"\u20AC\uFFFD\uFFFD\uFFFD\uFFFD\u2026\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},win874:"windows874",cp874:"windows874",windows1250:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\u0160\u2039\u015A\u0164\u017D\u0179\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0161\u203A\u015B\u0165\u017E\u017A\xA0\u02C7\u02D8\u0141\xA4\u0104\xA6\xA7\xA8\xA9\u015E\xAB\xAC\xAD\xAE\u017B\xB0\xB1\u02DB\u0142\xB4\xB5\xB6\xB7\xB8\u0105\u015F\xBB\u013D\u02DD\u013E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},win1250:"windows1250",cp1250:"windows1250",windows1251:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u040C\u040B\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u045C\u045B\u045F\xA0\u040E\u045E\u0408\xA4\u0490\xA6\xA7\u0401\xA9\u0404\xAB\xAC\xAD\xAE\u0407\xB0\xB1\u0406\u0456\u0491\xB5\xB6\xB7\u0451\u2116\u0454\xBB\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},win1251:"windows1251",cp1251:"windows1251",windows1252:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\u017D\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\u017E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},win1252:"windows1252",cp1252:"windows1252",windows1253:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0385\u0386\xA3\xA4\xA5\xA6\xA7\xA8\xA9\uFFFD\xAB\xAC\xAD\xAE\u2015\xB0\xB1\xB2\xB3\u0384\xB5\xB6\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},win1253:"windows1253",cp1253:"windows1253",windows1254:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},win1254:"windows1254",cp1254:"windows1254",windows1255:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\xA1\xA2\xA3\u20AA\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\xBF\u05B0\u05B1\u05B2\u05B3\u05B4\u05B5\u05B6\u05B7\u05B8\u05B9\u05BA\u05BB\u05BC\u05BD\u05BE\u05BF\u05C0\u05C1\u05C2\u05C3\u05F0\u05F1\u05F2\u05F3\u05F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},win1255:"windows1255",cp1255:"windows1255",windows1256:{type:"_sbcs",chars:"\u20AC\u067E\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06AF\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u06A9\u2122\u0691\u203A\u0153\u200C\u200D\u06BA\xA0\u060C\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\u06BE\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\u061B\xBB\xBC\xBD\xBE\u061F\u06C1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\xD7\u0637\u0638\u0639\u063A\u0640\u0641\u0642\u0643\xE0\u0644\xE2\u0645\u0646\u0647\u0648\xE7\xE8\xE9\xEA\xEB\u0649\u064A\xEE\xEF\u064B\u064C\u064D\u064E\xF4\u064F\u0650\xF7\u0651\xF9\u0652\xFB\xFC\u200E\u200F\u06D2"},win1256:"windows1256",cp1256:"windows1256",windows1257:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\xA8\u02C7\xB8\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\xAF\u02DB\uFFFD\xA0\uFFFD\xA2\xA3\xA4\uFFFD\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u02D9"},win1257:"windows1257",cp1257:"windows1257",windows1258:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},win1258:"windows1258",cp1258:"windows1258",iso88591:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28591:"iso88591",iso88592:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u02D8\u0141\xA4\u013D\u015A\xA7\xA8\u0160\u015E\u0164\u0179\xAD\u017D\u017B\xB0\u0105\u02DB\u0142\xB4\u013E\u015B\u02C7\xB8\u0161\u015F\u0165\u017A\u02DD\u017E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},cp28592:"iso88592",iso88593:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0126\u02D8\xA3\xA4\uFFFD\u0124\xA7\xA8\u0130\u015E\u011E\u0134\xAD\uFFFD\u017B\xB0\u0127\xB2\xB3\xB4\xB5\u0125\xB7\xB8\u0131\u015F\u011F\u0135\xBD\uFFFD\u017C\xC0\xC1\xC2\uFFFD\xC4\u010A\u0108\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\uFFFD\xD1\xD2\xD3\xD4\u0120\xD6\xD7\u011C\xD9\xDA\xDB\xDC\u016C\u015C\xDF\xE0\xE1\xE2\uFFFD\xE4\u010B\u0109\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\uFFFD\xF1\xF2\xF3\xF4\u0121\xF6\xF7\u011D\xF9\xFA\xFB\xFC\u016D\u015D\u02D9"},cp28593:"iso88593",iso88594:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0138\u0156\xA4\u0128\u013B\xA7\xA8\u0160\u0112\u0122\u0166\xAD\u017D\xAF\xB0\u0105\u02DB\u0157\xB4\u0129\u013C\u02C7\xB8\u0161\u0113\u0123\u0167\u014A\u017E\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\u012A\u0110\u0145\u014C\u0136\xD4\xD5\xD6\xD7\xD8\u0172\xDA\xDB\xDC\u0168\u016A\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\u012B\u0111\u0146\u014D\u0137\xF4\xF5\xF6\xF7\xF8\u0173\xFA\xFB\xFC\u0169\u016B\u02D9"},cp28594:"iso88594",iso88595:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0403\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},cp28595:"iso88595",iso88596:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\uFFFD\uFFFD\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u060C\xAD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u061B\uFFFD\uFFFD\uFFFD\u061F\uFFFD\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},cp28596:"iso88596",iso88597:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u2018\u2019\xA3\u20AC\u20AF\xA6\xA7\xA8\xA9\u037A\xAB\xAC\xAD\uFFFD\u2015\xB0\xB1\xB2\xB3\u0384\u0385\u0386\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},cp28597:"iso88597",iso88598:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2017\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},cp28598:"iso88598",iso88599:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},cp28599:"iso88599",iso885910:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0112\u0122\u012A\u0128\u0136\xA7\u013B\u0110\u0160\u0166\u017D\xAD\u016A\u014A\xB0\u0105\u0113\u0123\u012B\u0129\u0137\xB7\u013C\u0111\u0161\u0167\u017E\u2015\u016B\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\xCF\xD0\u0145\u014C\xD3\xD4\xD5\xD6\u0168\xD8\u0172\xDA\xDB\xDC\xDD\xDE\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\xEF\xF0\u0146\u014D\xF3\xF4\xF5\xF6\u0169\xF8\u0173\xFA\xFB\xFC\xFD\xFE\u0138"},cp28600:"iso885910",iso885911:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},cp28601:"iso885911",iso885913:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u201D\xA2\xA3\xA4\u201E\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\u201C\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u2019"},cp28603:"iso885913",iso885914:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u1E02\u1E03\xA3\u010A\u010B\u1E0A\xA7\u1E80\xA9\u1E82\u1E0B\u1EF2\xAD\xAE\u0178\u1E1E\u1E1F\u0120\u0121\u1E40\u1E41\xB6\u1E56\u1E81\u1E57\u1E83\u1E60\u1EF3\u1E84\u1E85\u1E61\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0174\xD1\xD2\xD3\xD4\xD5\xD6\u1E6A\xD8\xD9\xDA\xDB\xDC\xDD\u0176\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0175\xF1\xF2\xF3\xF4\xF5\xF6\u1E6B\xF8\xF9\xFA\xFB\xFC\xFD\u0177\xFF"},cp28604:"iso885914",iso885915:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\u0160\xA7\u0161\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u017D\xB5\xB6\xB7\u017E\xB9\xBA\xBB\u0152\u0153\u0178\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28605:"iso885915",iso885916:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0105\u0141\u20AC\u201E\u0160\xA7\u0161\xA9\u0218\xAB\u0179\xAD\u017A\u017B\xB0\xB1\u010C\u0142\u017D\u201D\xB6\xB7\u017E\u010D\u0219\xBB\u0152\u0153\u0178\u017C\xC0\xC1\xC2\u0102\xC4\u0106\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0110\u0143\xD2\xD3\xD4\u0150\xD6\u015A\u0170\xD9\xDA\xDB\xDC\u0118\u021A\xDF\xE0\xE1\xE2\u0103\xE4\u0107\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0111\u0144\xF2\xF3\xF4\u0151\xF6\u015B\u0171\xF9\xFA\xFB\xFC\u0119\u021B\xFF"},cp28606:"iso885916",cp437:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm437:"cp437",csibm437:"cp437",cp737:{type:"_sbcs",chars:"\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u03C5\u03C6\u03C7\u03C8\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03C9\u03AC\u03AD\u03AE\u03CA\u03AF\u03CC\u03CD\u03CB\u03CE\u0386\u0388\u0389\u038A\u038C\u038E\u038F\xB1\u2265\u2264\u03AA\u03AB\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm737:"cp737",csibm737:"cp737",cp775:{type:"_sbcs",chars:"\u0106\xFC\xE9\u0101\xE4\u0123\xE5\u0107\u0142\u0113\u0156\u0157\u012B\u0179\xC4\xC5\xC9\xE6\xC6\u014D\xF6\u0122\xA2\u015A\u015B\xD6\xDC\xF8\xA3\xD8\xD7\xA4\u0100\u012A\xF3\u017B\u017C\u017A\u201D\xA6\xA9\xAE\xAC\xBD\xBC\u0141\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0104\u010C\u0118\u0116\u2563\u2551\u2557\u255D\u012E\u0160\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0172\u016A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u017D\u0105\u010D\u0119\u0117\u012F\u0161\u0173\u016B\u017E\u2518\u250C\u2588\u2584\u258C\u2590\u2580\xD3\xDF\u014C\u0143\xF5\xD5\xB5\u0144\u0136\u0137\u013B\u013C\u0146\u0112\u0145\u2019\xAD\xB1\u201C\xBE\xB6\xA7\xF7\u201E\xB0\u2219\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm775:"cp775",csibm775:"cp775",cp850:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u0131\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm850:"cp850",csibm850:"cp850",cp852:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\u016F\u0107\xE7\u0142\xEB\u0150\u0151\xEE\u0179\xC4\u0106\xC9\u0139\u013A\xF4\xF6\u013D\u013E\u015A\u015B\xD6\xDC\u0164\u0165\u0141\xD7\u010D\xE1\xED\xF3\xFA\u0104\u0105\u017D\u017E\u0118\u0119\xAC\u017A\u010C\u015F\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\u011A\u015E\u2563\u2551\u2557\u255D\u017B\u017C\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0102\u0103\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u0111\u0110\u010E\xCB\u010F\u0147\xCD\xCE\u011B\u2518\u250C\u2588\u2584\u0162\u016E\u2580\xD3\xDF\xD4\u0143\u0144\u0148\u0160\u0161\u0154\xDA\u0155\u0170\xFD\xDD\u0163\xB4\xAD\u02DD\u02DB\u02C7\u02D8\xA7\xF7\xB8\xB0\xA8\u02D9\u0171\u0158\u0159\u25A0\xA0"},ibm852:"cp852",csibm852:"cp852",cp855:{type:"_sbcs",chars:"\u0452\u0402\u0453\u0403\u0451\u0401\u0454\u0404\u0455\u0405\u0456\u0406\u0457\u0407\u0458\u0408\u0459\u0409\u045A\u040A\u045B\u040B\u045C\u040C\u045E\u040E\u045F\u040F\u044E\u042E\u044A\u042A\u0430\u0410\u0431\u0411\u0446\u0426\u0434\u0414\u0435\u0415\u0444\u0424\u0433\u0413\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0445\u0425\u0438\u0418\u2563\u2551\u2557\u255D\u0439\u0419\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u043A\u041A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u043B\u041B\u043C\u041C\u043D\u041D\u043E\u041E\u043F\u2518\u250C\u2588\u2584\u041F\u044F\u2580\u042F\u0440\u0420\u0441\u0421\u0442\u0422\u0443\u0423\u0436\u0416\u0432\u0412\u044C\u042C\u2116\xAD\u044B\u042B\u0437\u0417\u0448\u0428\u044D\u042D\u0449\u0429\u0447\u0427\xA7\u25A0\xA0"},ibm855:"cp855",csibm855:"cp855",cp856:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\xA3\uFFFD\xD7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAE\xAC\xBD\xBC\uFFFD\xAB\xBB\u2591\u2592\u2593\u2502\u2524\uFFFD\uFFFD\uFFFD\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\uFFFD\uFFFD\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2518\u250C\u2588\u2584\xA6\uFFFD\u2580\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xB5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm856:"cp856",csibm856:"cp856",cp857:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\u0131\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\u0130\xD6\xDC\xF8\xA3\xD8\u015E\u015F\xE1\xED\xF3\xFA\xF1\xD1\u011E\u011F\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xBA\xAA\xCA\xCB\xC8\uFFFD\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\uFFFD\xD7\xDA\xDB\xD9\xEC\xFF\xAF\xB4\xAD\xB1\uFFFD\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm857:"cp857",csibm857:"cp857",cp858:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u20AC\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm858:"cp858",csibm858:"cp858",cp860:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE3\xE0\xC1\xE7\xEA\xCA\xE8\xCD\xD4\xEC\xC3\xC2\xC9\xC0\xC8\xF4\xF5\xF2\xDA\xF9\xCC\xD5\xDC\xA2\xA3\xD9\u20A7\xD3\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xD2\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm860:"cp860",csibm860:"cp860",cp861:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xD0\xF0\xDE\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xFE\xFB\xDD\xFD\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xC1\xCD\xD3\xDA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm861:"cp861",csibm861:"cp861",cp862:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm862:"cp862",csibm862:"cp862",cp863:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xC2\xE0\xB6\xE7\xEA\xEB\xE8\xEF\xEE\u2017\xC0\xA7\xC9\xC8\xCA\xF4\xCB\xCF\xFB\xF9\xA4\xD4\xDC\xA2\xA3\xD9\xDB\u0192\xA6\xB4\xF3\xFA\xA8\xB8\xB3\xAF\xCE\u2310\xAC\xBD\xBC\xBE\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm863:"cp863",csibm863:"cp863",cp864:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$\u066A&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xB0\xB7\u2219\u221A\u2592\u2500\u2502\u253C\u2524\u252C\u251C\u2534\u2510\u250C\u2514\u2518\u03B2\u221E\u03C6\xB1\xBD\xBC\u2248\xAB\xBB\uFEF7\uFEF8\uFFFD\uFFFD\uFEFB\uFEFC\uFFFD\xA0\xAD\uFE82\xA3\xA4\uFE84\uFFFD\uFFFD\uFE8E\uFE8F\uFE95\uFE99\u060C\uFE9D\uFEA1\uFEA5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFED1\u061B\uFEB1\uFEB5\uFEB9\u061F\xA2\uFE80\uFE81\uFE83\uFE85\uFECA\uFE8B\uFE8D\uFE91\uFE93\uFE97\uFE9B\uFE9F\uFEA3\uFEA7\uFEA9\uFEAB\uFEAD\uFEAF\uFEB3\uFEB7\uFEBB\uFEBF\uFEC1\uFEC5\uFECB\uFECF\xA6\xAC\xF7\xD7\uFEC9\u0640\uFED3\uFED7\uFEDB\uFEDF\uFEE3\uFEE7\uFEEB\uFEED\uFEEF\uFEF3\uFEBD\uFECC\uFECE\uFECD\uFEE1\uFE7D\u0651\uFEE5\uFEE9\uFEEC\uFEF0\uFEF2\uFED0\uFED5\uFEF5\uFEF6\uFEDD\uFED9\uFEF1\u25A0\uFFFD`},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xA4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0386\uFFFD\xB7\xAC\xA6\u2018\u2019\u0388\u2015\u0389\u038A\u03AA\u038C\uFFFD\uFFFD\u038E\u03AB\xA9\u038F\xB2\xB3\u03AC\xA3\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03CD\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xBD\u0398\u0399\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u039A\u039B\u039C\u039D\u2563\u2551\u2557\u255D\u039E\u039F\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u03A0\u03A1\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u2518\u250C\u2588\u2584\u03B4\u03B5\u2580\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u0384\xAD\xB1\u03C5\u03C6\u03C7\xA7\u03C8\u0385\xB0\xA8\u03C9\u03CB\u03B0\u03CE\u25A0\xA0"},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\u203E\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0160\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\u017D\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0161\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\u017E\xFF"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"\uFE88\xD7\xF7\uF8F6\uF8F5\uF8F4\uF8F7\uFE71\x88\u25A0\u2502\u2500\u2510\u250C\u2514\u2518\uFE79\uFE7B\uFE7D\uFE7F\uFE77\uFE8A\uFEF0\uFEF3\uFEF2\uFECE\uFECF\uFED0\uFEF6\uFEF8\uFEFA\uFEFC\xA0\uF8FA\uF8F9\uF8F8\xA4\uF8FB\uFE8B\uFE91\uFE97\uFE9B\uFE9F\uFEA3\u060C\xAD\uFEA7\uFEB3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFEB7\u061B\uFEBB\uFEBF\uFECA\u061F\uFECB\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\uFEC7\u0639\u063A\uFECC\uFE82\uFE84\uFE8E\uFED3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFED7\uFEDB\uFEDF\uF8FC\uFEF5\uFEF7\uFEF9\uFEFB\uFEE3\uFEE7\uFEEC\uFEE9\uFFFD"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0491\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0490\u0491\u0404\u0454\u0406\u0456\u0407\u0457\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E81\u0E82\u0E84\u0E87\u0E88\u0EAA\u0E8A\u0E8D\u0E94\u0E95\u0E96\u0E97\u0E99\u0E9A\u0E9B\u0E9C\u0E9D\u0E9E\u0E9F\u0EA1\u0EA2\u0EA3\u0EA5\u0EA7\u0EAB\u0EAD\u0EAE\uFFFD\uFFFD\uFFFD\u0EAF\u0EB0\u0EB2\u0EB3\u0EB4\u0EB5\u0EB6\u0EB7\u0EB8\u0EB9\u0EBC\u0EB1\u0EBB\u0EBD\uFFFD\uFFFD\uFFFD\u0EC0\u0EC1\u0EC2\u0EC3\u0EC4\u0EC8\u0EC9\u0ECA\u0ECB\u0ECC\u0ECD\u0EC6\uFFFD\u0EDC\u0EDD\u20AD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0ED0\u0ED1\u0ED2\u0ED3\u0ED4\u0ED5\u0ED6\u0ED7\u0ED8\u0ED9\uFFFD\uFFFD\xA2\xAC\xA6\uFFFD"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E48\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\u0E49\u0E4A\u0E4B\u20AC\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\xA2\xAC\xA6\xA0"},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"\u20AC\x81\x82\x83\x84\u2026\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},ibm1163:"cp1163",csibm1163:"cp1163",maccroatian:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u2126\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uFFFD\xA9\u2044\xA4\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7"},maccyrillic:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\xA2\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u2202\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4"},macgreek:{type:"_sbcs",chars:"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\xAD\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\u0387\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\uFFFD"},maciceland:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macroman:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macromania:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u015E\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\u0103\u015F\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\u0162\u0163\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macthai:{type:"_sbcs",chars:"\xAB\xBB\u2026\uF88C\uF88F\uF892\uF895\uF898\uF88B\uF88E\uF891\uF894\uF897\u201C\u201D\uF899\uFFFD\u2022\uF884\uF889\uF885\uF886\uF887\uF888\uF88A\uF88D\uF890\uF893\uF896\u2018\u2019\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFEFF\u200B\u2013\u2014\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u2122\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\xAE\xA9\uFFFD\uFFFD\uFFFD\uFFFD"},macturkish:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\uFFFD\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macukraine:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4"},koi8r:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u2553\u2554\u2555\u2556\u2557\u2558\u2559\u255A\u255B\u255C\u255D\u255E\u255F\u2560\u2561\u0401\u2562\u2563\u2564\u2565\u2566\u2567\u2568\u2569\u256A\u256B\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8u:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u255D\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8ru:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u045E\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u040E\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8t:{type:"_sbcs",chars:"\u049B\u0493\u201A\u0492\u201E\u2026\u2020\u2021\uFFFD\u2030\u04B3\u2039\u04B2\u04B7\u04B6\uFFFD\u049A\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04EF\u04EE\u0451\xA4\u04E3\xA6\xA7\uFFFD\uFFFD\uFFFD\xAB\xAC\xAD\xAE\uFFFD\xB0\xB1\xB2\u0401\uFFFD\u04E2\xB6\xB7\uFFFD\u2116\uFFFD\xBB\uFFFD\uFFFD\uFFFD\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},armscii8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\u0587\u0589)(\xBB\xAB\u2014.\u055D,-\u058A\u2026\u055C\u055B\u055E\u0531\u0561\u0532\u0562\u0533\u0563\u0534\u0564\u0535\u0565\u0536\u0566\u0537\u0567\u0538\u0568\u0539\u0569\u053A\u056A\u053B\u056B\u053C\u056C\u053D\u056D\u053E\u056E\u053F\u056F\u0540\u0570\u0541\u0571\u0542\u0572\u0543\u0573\u0544\u0574\u0545\u0575\u0546\u0576\u0547\u0577\u0548\u0578\u0549\u0579\u054A\u057A\u054B\u057B\u054C\u057C\u054D\u057D\u054E\u057E\u054F\u057F\u0550\u0580\u0551\u0581\u0552\u0582\u0553\u0583\u0554\u0584\u0555\u0585\u0556\u0586\u055A\uFFFD"},rk1048:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u049A\u04BA\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u049B\u04BB\u045F\xA0\u04B0\u04B1\u04D8\xA4\u04E8\xA6\xA7\u0401\xA9\u0492\xAB\xAC\xAD\xAE\u04AE\xB0\xB1\u0406\u0456\u04E9\xB5\xB6\xB7\u0451\u2116\u0493\xBB\u04D9\u04A2\u04A3\u04AF\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},tcvn:{type:"_sbcs",chars:`\x00\xDA\u1EE4\x03\u1EEA\u1EEC\u1EEE\x07\b	
\v\f\r\x0E\x0F\x10\u1EE8\u1EF0\u1EF2\u1EF6\u1EF8\xDD\u1EF4\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xC0\u1EA2\xC3\xC1\u1EA0\u1EB6\u1EAC\xC8\u1EBA\u1EBC\xC9\u1EB8\u1EC6\xCC\u1EC8\u0128\xCD\u1ECA\xD2\u1ECE\xD5\xD3\u1ECC\u1ED8\u1EDC\u1EDE\u1EE0\u1EDA\u1EE2\xD9\u1EE6\u0168\xA0\u0102\xC2\xCA\xD4\u01A0\u01AF\u0110\u0103\xE2\xEA\xF4\u01A1\u01B0\u0111\u1EB0\u0300\u0309\u0303\u0301\u0323\xE0\u1EA3\xE3\xE1\u1EA1\u1EB2\u1EB1\u1EB3\u1EB5\u1EAF\u1EB4\u1EAE\u1EA6\u1EA8\u1EAA\u1EA4\u1EC0\u1EB7\u1EA7\u1EA9\u1EAB\u1EA5\u1EAD\xE8\u1EC2\u1EBB\u1EBD\xE9\u1EB9\u1EC1\u1EC3\u1EC5\u1EBF\u1EC7\xEC\u1EC9\u1EC4\u1EBE\u1ED2\u0129\xED\u1ECB\xF2\u1ED4\u1ECF\xF5\xF3\u1ECD\u1ED3\u1ED5\u1ED7\u1ED1\u1ED9\u1EDD\u1EDF\u1EE1\u1EDB\u1EE3\xF9\u1ED6\u1EE7\u0169\xFA\u1EE5\u1EEB\u1EED\u1EEF\u1EE9\u1EF1\u1EF3\u1EF7\u1EF9\xFD\u1EF5\u1ED0`},georgianacademy:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10EF\u10F0\u10F1\u10F2\u10F3\u10F4\u10F5\u10F6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},georgianps:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10F1\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10F2\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10F3\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10F4\u10EF\u10F0\u10F5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},pt154:{type:"_sbcs",chars:"\u0496\u0492\u04EE\u0493\u201E\u2026\u04B6\u04AE\u04B2\u04AF\u04A0\u04E2\u04A2\u049A\u04BA\u04B8\u0497\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u04B3\u04B7\u04A1\u04E3\u04A3\u049B\u04BB\u04B9\xA0\u040E\u045E\u0408\u04E8\u0498\u04B0\xA7\u0401\xA9\u04D8\xAB\xAC\u04EF\xAE\u049C\xB0\u04B1\u0406\u0456\u0499\u04E9\xB6\xB7\u0451\u2116\u04D9\xBB\u0458\u04AA\u04AB\u049D\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},viscii:{type:"_sbcs",chars:`\x00\x01\u1EB2\x03\x04\u1EB4\u1EAA\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\u1EF6\x15\x16\x17\x18\u1EF8\x1A\x1B\x1C\x1D\u1EF4\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\u1EA0\u1EAE\u1EB0\u1EB6\u1EA4\u1EA6\u1EA8\u1EAC\u1EBC\u1EB8\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EE2\u1EDA\u1EDC\u1EDE\u1ECA\u1ECE\u1ECC\u1EC8\u1EE6\u0168\u1EE4\u1EF2\xD5\u1EAF\u1EB1\u1EB7\u1EA5\u1EA7\u1EA9\u1EAD\u1EBD\u1EB9\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1ED1\u1ED3\u1ED5\u1ED7\u1EE0\u01A0\u1ED9\u1EDD\u1EDF\u1ECB\u1EF0\u1EE8\u1EEA\u1EEC\u01A1\u1EDB\u01AF\xC0\xC1\xC2\xC3\u1EA2\u0102\u1EB3\u1EB5\xC8\xC9\xCA\u1EBA\xCC\xCD\u0128\u1EF3\u0110\u1EE9\xD2\xD3\xD4\u1EA1\u1EF7\u1EEB\u1EED\xD9\xDA\u1EF9\u1EF5\xDD\u1EE1\u01B0\xE0\xE1\xE2\xE3\u1EA3\u0103\u1EEF\u1EAB\xE8\xE9\xEA\u1EBB\xEC\xED\u0129\u1EC9\u0111\u1EF1\xF2\xF3\xF4\xF5\u1ECF\u1ECD\u1EE5\xF9\xFA\u0169\u1EE7\xFD\u1EE3\u1EEE`},iso646cn:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#\xA5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},iso646jp:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xA5]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xC0\xC2\xC8\xCA\xCB\xCE\xCF\xB4\u02CB\u02C6\xA8\u02DC\xD9\xDB\u20A4\xAF\xDD\xFD\xB0\xC7\xE7\xD1\xF1\xA1\xBF\xA4\xA3\xA5\xA7\u0192\xA2\xE2\xEA\xF4\xFB\xE1\xE9\xF3\xFA\xE0\xE8\xF2\xF9\xE4\xEB\xF6\xFC\xC5\xEE\xD8\xC6\xE5\xED\xF8\xE6\xC4\xEC\xD6\xDC\xC9\xEF\xDF\xD4\xC1\xC3\xE3\xD0\xF0\xCD\xCC\xD3\xD2\xD5\xF5\u0160\u0161\xDA\u0178\xFF\xDE\xFE\xB7\xB5\xB6\xBE\u2014\xBC\xBD\xAA\xBA\xAB\u25A0\xBB\xB1\uFFFD"},macintosh:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},ascii:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},tis620:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"}}});var pL4=o((vV9)=>{var HC=qG().Buffer;vV9._dbcs=wV;var hQ=-1,uL4=-2,z2=-10,UH=-1000,UC=Array(256),vp=-1;for(kp=0;kp<256;kp++)UC[kp]=hQ;var kp;function wV($,Y){if(this.encodingName=$.encodingName,!$)throw Error("DBCS codec is called without the data.");if(!$.table)throw Error("Encoding '"+this.encodingName+"' has no data.");var X=$.table();this.decodeTables=[],this.decodeTables[0]=UC.slice(0),this.decodeTableSeq=[];for(var G=0;G<X.length;G++)this._addDecodeChunk(X[G]);this.defaultCharUnicode=Y.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var J={};if($.encodeSkipVals)for(var G=0;G<$.encodeSkipVals.length;G++){var Q=$.encodeSkipVals[G];if(typeof Q==="number")J[Q]=!0;else for(var W=Q.from;W<=Q.to;W++)J[W]=!0}if(this._fillEncodeTable(0,0,J),$.encodeAdd){for(var Z in $.encodeAdd)if(Object.prototype.hasOwnProperty.call($.encodeAdd,Z))this._setEncodeChar(Z.charCodeAt(0),$.encodeAdd[Z])}if(this.defCharSB=this.encodeTable[0][Y.defaultCharSingleByte.charCodeAt(0)],this.defCharSB===hQ)this.defCharSB=this.encodeTable[0]["?"];if(this.defCharSB===hQ)this.defCharSB=63;if(typeof $.gb18030==="function"){this.gb18030=$.gb18030();var K=this.decodeTables.length,H=this.decodeTables[K]=UC.slice(0),z=this.decodeTables.length,V=this.decodeTables[z]=UC.slice(0);for(var G=129;G<=254;G++){var A=UH-this.decodeTables[0][G],F=this.decodeTables[A];for(var W=48;W<=57;W++)F[W]=UH-K}for(var G=129;G<=254;G++)H[G]=UH-z;for(var G=48;G<=57;G++)V[G]=uL4}}wV.prototype.encoder=bY0;wV.prototype.decoder=Qd0;wV.prototype._getDecodeTrieNode=function($){var Y=[];for(;$>0;$>>=8)Y.push($&255);if(Y.length==0)Y.push(0);var X=this.decodeTables[0];for(var G=Y.length-1;G>0;G--){var J=X[Y[G]];if(J==hQ)X[Y[G]]=UH-this.decodeTables.length,this.decodeTables.push(X=UC.slice(0));else if(J<=UH)X=this.decodeTables[UH-J];else throw Error("Overwrite byte in "+this.encodingName+", addr: "+$.toString(16))}return X};wV.prototype._addDecodeChunk=function($){var Y=parseInt($[0],16),X=this._getDecodeTrieNode(Y);Y=Y&255;for(var G=1;G<$.length;G++){var J=$[G];if(typeof J==="string")for(var Q=0;Q<J.length;){var W=J.charCodeAt(Q++);if(55296<=W&&W<56320){var Z=J.charCodeAt(Q++);if(56320<=Z&&Z<57344)X[Y++]=65536+(W-55296)*1024+(Z-56320);else throw Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+$[0])}else if(4080<W&&W<=4095){var K=4095-W+2,H=[];for(var z=0;z<K;z++)H.push(J.charCodeAt(Q++));X[Y++]=z2-this.decodeTableSeq.length,this.decodeTableSeq.push(H)}else X[Y++]=W}else if(typeof J==="number"){var V=X[Y-1]+1;for(var Q=0;Q<J;Q++)X[Y++]=V++}else throw Error("Incorrect type '"+typeof J+"' given in "+this.encodingName+" at chunk "+$[0])}if(Y>255)throw Error("Incorrect chunk in "+this.encodingName+" at addr "+$[0]+": too long"+Y)};wV.prototype._getEncodeBucket=function($){var Y=$>>8;if(this.encodeTable[Y]===void 0)this.encodeTable[Y]=UC.slice(0);return this.encodeTable[Y]};wV.prototype._setEncodeChar=function($,Y){var X=this._getEncodeBucket($),G=$&255;if(X[G]<=z2)this.encodeTableSeq[z2-X[G]][vp]=Y;else if(X[G]==hQ)X[G]=Y};wV.prototype._setEncodeSequence=function($,Y){var X=$[0],G=this._getEncodeBucket(X),J=X&255,Q;if(G[J]<=z2)Q=this.encodeTableSeq[z2-G[J]];else{if(Q={},G[J]!==hQ)Q[vp]=G[J];G[J]=z2-this.encodeTableSeq.length,this.encodeTableSeq.push(Q)}for(var W=1;W<$.length-1;W++){var Z=Q[X];if(typeof Z==="object")Q=Z;else if(Q=Q[X]={},Z!==void 0)Q[vp]=Z}X=$[$.length-1],Q[X]=Y};wV.prototype._fillEncodeTable=function($,Y,X){var G=this.decodeTables[$];for(var J=0;J<256;J++){var Q=G[J],W=Y+J;if(X[W])continue;if(Q>=0)this._setEncodeChar(Q,W);else if(Q<=UH)this._fillEncodeTable(UH-Q,W<<8,X);else if(Q<=z2)this._setEncodeSequence(this.decodeTableSeq[z2-Q],W)}};function bY0($,Y){this.leadSurrogate=-1,this.seqObj=void 0,this.encodeTable=Y.encodeTable,this.encodeTableSeq=Y.encodeTableSeq,this.defaultCharSingleByte=Y.defCharSB,this.gb18030=Y.gb18030}bY0.prototype.write=function($){var Y=HC.alloc($.length*(this.gb18030?4:3)),X=this.leadSurrogate,G=this.seqObj,J=-1,Q=0,W=0;while(!0){if(J===-1){if(Q==$.length)break;var Z=$.charCodeAt(Q++)}else{var Z=J;J=-1}if(55296<=Z&&Z<57344)if(Z<56320)if(X===-1){X=Z;continue}else X=Z,Z=hQ;else if(X!==-1)Z=65536+(X-55296)*1024+(Z-56320),X=-1;else Z=hQ;else if(X!==-1)J=Z,Z=hQ,X=-1;var K=hQ;if(G!==void 0&&Z!=hQ){var H=G[Z];if(typeof H==="object"){G=H;continue}else if(typeof H=="number")K=H;else if(H==null){if(H=G[vp],H!==void 0)K=H,J=Z}G=void 0}else if(Z>=0){var z=this.encodeTable[Z>>8];if(z!==void 0)K=z[Z&255];if(K<=z2){G=this.encodeTableSeq[z2-K];continue}if(K==hQ&&this.gb18030){var V=Wd0(this.gb18030.uChars,Z);if(V!=-1){var K=this.gb18030.gbChars[V]+(Z-this.gb18030.uChars[V]);Y[W++]=129+Math.floor(K/12600),K=K%12600,Y[W++]=48+Math.floor(K/1260),K=K%1260,Y[W++]=129+Math.floor(K/10),K=K%10,Y[W++]=48+K;continue}}}if(K===hQ)K=this.defaultCharSingleByte;if(K<256)Y[W++]=K;else if(K<65536)Y[W++]=K>>8,Y[W++]=K&255;else Y[W++]=K>>16,Y[W++]=K>>8&255,Y[W++]=K&255}return this.seqObj=G,this.leadSurrogate=X,Y.slice(0,W)};bY0.prototype.end=function(){if(this.leadSurrogate===-1&&this.seqObj===void 0)return;var $=HC.alloc(10),Y=0;if(this.seqObj){var X=this.seqObj[vp];if(X!==void 0)if(X<256)$[Y++]=X;else $[Y++]=X>>8,$[Y++]=X&255;this.seqObj=void 0}if(this.leadSurrogate!==-1)$[Y++]=this.defaultCharSingleByte,this.leadSurrogate=-1;return $.slice(0,Y)};bY0.prototype.findIdx=Wd0;function Qd0($,Y){this.nodeIdx=0,this.prevBuf=HC.alloc(0),this.decodeTables=Y.decodeTables,this.decodeTableSeq=Y.decodeTableSeq,this.defaultCharUnicode=Y.defaultCharUnicode,this.gb18030=Y.gb18030}Qd0.prototype.write=function($){var Y=HC.alloc($.length*2),X=this.nodeIdx,G=this.prevBuf,J=this.prevBuf.length,Q=-this.prevBuf.length,W;if(J>0)G=HC.concat([G,$.slice(0,10)]);for(var Z=0,K=0;Z<$.length;Z++){var H=Z>=0?$[Z]:G[Z+J],W=this.decodeTables[X][H];if(W>=0);else if(W===hQ)Z=Q,W=this.defaultCharUnicode.charCodeAt(0);else if(W===uL4){var z=Q>=0?$.slice(Q,Z+1):G.slice(Q+J,Z+1+J),V=(z[0]-129)*12600+(z[1]-48)*1260+(z[2]-129)*10+(z[3]-48),A=Wd0(this.gb18030.gbChars,V);W=this.gb18030.uChars[A]+V-this.gb18030.gbChars[A]}else if(W<=UH){X=UH-W;continue}else if(W<=z2){var F=this.decodeTableSeq[z2-W];for(var N=0;N<F.length-1;N++)W=F[N],Y[K++]=W&255,Y[K++]=W>>8;W=F[F.length-1]}else throw Error("iconv-lite internal error: invalid decoding table value "+W+" at "+X+"/"+H);if(W>65535){W-=65536;var D=55296+Math.floor(W/1024);Y[K++]=D&255,Y[K++]=D>>8,W=56320+W%1024}Y[K++]=W&255,Y[K++]=W>>8,X=0,Q=Z+1}return this.nodeIdx=X,this.prevBuf=Q>=0?$.slice(Q):G.slice(Q+J),Y.slice(0,K).toString("ucs2")};Qd0.prototype.end=function(){var $="";while(this.prevBuf.length>0){$+=this.defaultCharUnicode;var Y=this.prevBuf.slice(1);if(this.prevBuf=HC.alloc(0),this.nodeIdx=0,Y.length>0)$+=this.write(Y)}return this.nodeIdx=0,$};function Wd0($,Y){if($[0]>Y)return-1;var X=0,G=$.length;while(X<G-1){var J=X+Math.floor((G-X+1)/2);if($[J]<=Y)X=J;else G=J}return X}});var dL4=o((dM7,yV9)=>{yV9.exports=[["0","\x00",128],["a1","\uFF61",62],["8140","\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008",9,"\uFF0B\uFF0D\xB1\xD7"],["8180","\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"],["81b8","\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"],["81c8","\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"],["81da","\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"],["81f0","\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"],["81fc","\u25EF"],["824f","\uFF10",9],["8260","\uFF21",25],["8281","\uFF41",25],["829f","\u3041",82],["8340","\u30A1",62],["8380","\u30E0",22],["839f","\u0391",16,"\u03A3",6],["83bf","\u03B1",16,"\u03C3",6],["8440","\u0410",5,"\u0401\u0416",25],["8470","\u0430",5,"\u0451\u0436",7],["8480","\u043E",17],["849f","\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"],["8740","\u2460",19,"\u2160",9],["875f","\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"],["877e","\u337B"],["8780","\u301D\u301F\u2116\u33CD\u2121\u32A4",4,"\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"],["889f","\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"],["8940","\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186"],["8980","\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"],["8a40","\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B"],["8a80","\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"],["8b40","\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551"],["8b80","\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"],["8c40","\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8"],["8c80","\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"],["8d40","\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D"],["8d80","\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"],["8e40","\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62"],["8e80","\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"],["8f40","\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3"],["8f80","\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"],["9040","\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8"],["9080","\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"],["9140","\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB"],["9180","\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"],["9240","\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4"],["9280","\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"],["9340","\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC"],["9380","\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"],["9440","\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885"],["9480","\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"],["9540","\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577"],["9580","\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"],["9640","\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6"],["9680","\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"],["9740","\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32"],["9780","\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"],["9840","\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"],["989f","\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"],["9940","\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED"],["9980","\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"],["9a40","\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638"],["9a80","\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"],["9b40","\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80"],["9b80","\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"],["9c40","\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060"],["9c80","\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"],["9d40","\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B"],["9d80","\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"],["9e40","\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E"],["9e80","\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"],["9f40","\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF"],["9f80","\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"],["e040","\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD"],["e080","\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"],["e140","\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF"],["e180","\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"],["e240","\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0"],["e280","\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"],["e340","\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37"],["e380","\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"],["e440","\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264"],["e480","\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"],["e540","\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC"],["e580","\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"],["e640","\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7"],["e680","\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"],["e740","\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C"],["e780","\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"],["e840","\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599"],["e880","\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"],["e940","\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43"],["e980","\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"],["ea40","\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF"],["ea80","\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0\u582F\u69C7\u9059\u7464\u51DC\u7199"],["ed40","\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F"],["ed80","\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"],["ee40","\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559"],["ee80","\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"],["eeef","\u2170",9,"\uFFE2\uFFE4\uFF07\uFF02"],["f040","\uE000",62],["f080","\uE03F",124],["f140","\uE0BC",62],["f180","\uE0FB",124],["f240","\uE178",62],["f280","\uE1B7",124],["f340","\uE234",62],["f380","\uE273",124],["f440","\uE2F0",62],["f480","\uE32F",124],["f540","\uE3AC",62],["f580","\uE3EB",124],["f640","\uE468",62],["f680","\uE4A7",124],["f740","\uE524",62],["f780","\uE563",124],["f840","\uE5E0",62],["f880","\uE61F",124],["f940","\uE69C"],["fa40","\u2170",9,"\u2160",9,"\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u2235\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A"],["fa80","\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F"],["fb40","\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19"],["fb80","\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9"],["fc40","\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"]]});var cL4=o((cM7,bV9)=>{bV9.exports=[["0","\x00",127],["8ea1","\uFF61",62],["a1a1","\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008",9,"\uFF0B\uFF0D\xB1\xD7\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7"],["a2a1","\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"],["a2ba","\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"],["a2ca","\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"],["a2dc","\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"],["a2f2","\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"],["a2fe","\u25EF"],["a3b0","\uFF10",9],["a3c1","\uFF21",25],["a3e1","\uFF41",25],["a4a1","\u3041",82],["a5a1","\u30A1",85],["a6a1","\u0391",16,"\u03A3",6],["a6c1","\u03B1",16,"\u03C3",6],["a7a1","\u0410",5,"\u0401\u0416",25],["a7d1","\u0430",5,"\u0451\u0436",25],["a8a1","\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"],["ada1","\u2460",19,"\u2160",9],["adc0","\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"],["addf","\u337B\u301D\u301F\u2116\u33CD\u2121\u32A4",4,"\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"],["b0a1","\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"],["b1a1","\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC"],["b2a1","\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"],["b3a1","\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431"],["b4a1","\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"],["b5a1","\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC"],["b6a1","\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"],["b7a1","\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372"],["b8a1","\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"],["b9a1","\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC"],["baa1","\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"],["bba1","\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642"],["bca1","\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"],["bda1","\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F"],["bea1","\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"],["bfa1","\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE"],["c0a1","\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"],["c1a1","\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E"],["c2a1","\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"],["c3a1","\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5"],["c4a1","\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"],["c5a1","\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230"],["c6a1","\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"],["c7a1","\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6"],["c8a1","\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"],["c9a1","\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D"],["caa1","\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"],["cba1","\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80"],["cca1","\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"],["cda1","\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483"],["cea1","\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"],["cfa1","\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"],["d0a1","\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"],["d1a1","\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8"],["d2a1","\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"],["d3a1","\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709"],["d4a1","\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"],["d5a1","\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53"],["d6a1","\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"],["d7a1","\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A"],["d8a1","\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"],["d9a1","\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC"],["daa1","\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"],["dba1","\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD"],["dca1","\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"],["dda1","\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE"],["dea1","\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"],["dfa1","\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC"],["e0a1","\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"],["e1a1","\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670"],["e2a1","\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"],["e3a1","\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50"],["e4a1","\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"],["e5a1","\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A"],["e6a1","\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"],["e7a1","\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9"],["e8a1","\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"],["e9a1","\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759"],["eaa1","\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"],["eba1","\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B"],["eca1","\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"],["eda1","\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8"],["eea1","\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"],["efa1","\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E"],["f0a1","\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"],["f1a1","\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7"],["f2a1","\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"],["f3a1","\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0"],["f4a1","\u582F\u69C7\u9059\u7464\u51DC\u7199"],["f9a1","\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7"],["faa1","\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"],["fba1","\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA"],["fca1","\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"],["fcf1","\u2170",9,"\uFFE2\uFFE4\uFF07\uFF02"],["8fa2af","\u02D8\u02C7\xB8\u02D9\u02DD\xAF\u02DB\u02DA\uFF5E\u0384\u0385"],["8fa2c2","\xA1\xA6\xBF"],["8fa2eb","\xBA\xAA\xA9\xAE\u2122\xA4\u2116"],["8fa6e1","\u0386\u0388\u0389\u038A\u03AA"],["8fa6e7","\u038C"],["8fa6e9","\u038E\u03AB"],["8fa6ec","\u038F"],["8fa6f1","\u03AC\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03C2\u03CD\u03CB\u03B0\u03CE"],["8fa7c2","\u0402",10,"\u040E\u040F"],["8fa7f2","\u0452",10,"\u045E\u045F"],["8fa9a1","\xC6\u0110"],["8fa9a4","\u0126"],["8fa9a6","\u0132"],["8fa9a8","\u0141\u013F"],["8fa9ab","\u014A\xD8\u0152"],["8fa9af","\u0166\xDE"],["8fa9c1","\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0142\u0140\u0149\u014B\xF8\u0153\xDF\u0167\xFE"],["8faaa1","\xC1\xC0\xC4\xC2\u0102\u01CD\u0100\u0104\xC5\xC3\u0106\u0108\u010C\xC7\u010A\u010E\xC9\xC8\xCB\xCA\u011A\u0116\u0112\u0118"],["8faaba","\u011C\u011E\u0122\u0120\u0124\xCD\xCC\xCF\xCE\u01CF\u0130\u012A\u012E\u0128\u0134\u0136\u0139\u013D\u013B\u0143\u0147\u0145\xD1\xD3\xD2\xD6\xD4\u01D1\u0150\u014C\xD5\u0154\u0158\u0156\u015A\u015C\u0160\u015E\u0164\u0162\xDA\xD9\xDC\xDB\u016C\u01D3\u0170\u016A\u0172\u016E\u0168\u01D7\u01DB\u01D9\u01D5\u0174\xDD\u0178\u0176\u0179\u017D\u017B"],["8faba1","\xE1\xE0\xE4\xE2\u0103\u01CE\u0101\u0105\xE5\xE3\u0107\u0109\u010D\xE7\u010B\u010F\xE9\xE8\xEB\xEA\u011B\u0117\u0113\u0119\u01F5\u011D\u011F"],["8fabbd","\u0121\u0125\xED\xEC\xEF\xEE\u01D0"],["8fabc5","\u012B\u012F\u0129\u0135\u0137\u013A\u013E\u013C\u0144\u0148\u0146\xF1\xF3\xF2\xF6\xF4\u01D2\u0151\u014D\xF5\u0155\u0159\u0157\u015B\u015D\u0161\u015F\u0165\u0163\xFA\xF9\xFC\xFB\u016D\u01D4\u0171\u016B\u0173\u016F\u0169\u01D8\u01DC\u01DA\u01D6\u0175\xFD\xFF\u0177\u017A\u017E\u017C"],["8fb0a1","\u4E02\u4E04\u4E05\u4E0C\u4E12\u4E1F\u4E23\u4E24\u4E28\u4E2B\u4E2E\u4E2F\u4E30\u4E35\u4E40\u4E41\u4E44\u4E47\u4E51\u4E5A\u4E5C\u4E63\u4E68\u4E69\u4E74\u4E75\u4E79\u4E7F\u4E8D\u4E96\u4E97\u4E9D\u4EAF\u4EB9\u4EC3\u4ED0\u4EDA\u4EDB\u4EE0\u4EE1\u4EE2\u4EE8\u4EEF\u4EF1\u4EF3\u4EF5\u4EFD\u4EFE\u4EFF\u4F00\u4F02\u4F03\u4F08\u4F0B\u4F0C\u4F12\u4F15\u4F16\u4F17\u4F19\u4F2E\u4F31\u4F60\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E\u4F40\u4F42\u4F48\u4F49\u4F4B\u4F4C\u4F52\u4F54\u4F56\u4F58\u4F5F\u4F63\u4F6A\u4F6C\u4F6E\u4F71\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F7E\u4F81\u4F82\u4F84"],["8fb1a1","\u4F85\u4F89\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F94\u4F97\u4F99\u4F9A\u4F9E\u4F9F\u4FB2\u4FB7\u4FB9\u4FBB\u4FBC\u4FBD\u4FBE\u4FC0\u4FC1\u4FC5\u4FC6\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FCF\u4FD2\u4FDC\u4FE0\u4FE2\u4FF0\u4FF2\u4FFC\u4FFD\u4FFF\u5000\u5001\u5004\u5007\u500A\u500C\u500E\u5010\u5013\u5017\u5018\u501B\u501C\u501D\u501E\u5022\u5027\u502E\u5030\u5032\u5033\u5035\u5040\u5041\u5042\u5045\u5046\u504A\u504C\u504E\u5051\u5052\u5053\u5057\u5059\u505F\u5060\u5062\u5063\u5066\u5067\u506A\u506D\u5070\u5071\u503B\u5081\u5083\u5084\u5086\u508A\u508E\u508F\u5090"],["8fb2a1","\u5092\u5093\u5094\u5096\u509B\u509C\u509E",4,"\u50AA\u50AF\u50B0\u50B9\u50BA\u50BD\u50C0\u50C3\u50C4\u50C7\u50CC\u50CE\u50D0\u50D3\u50D4\u50D8\u50DC\u50DD\u50DF\u50E2\u50E4\u50E6\u50E8\u50E9\u50EF\u50F1\u50F6\u50FA\u50FE\u5103\u5106\u5107\u5108\u510B\u510C\u510D\u510E\u50F2\u5110\u5117\u5119\u511B\u511C\u511D\u511E\u5123\u5127\u5128\u512C\u512D\u512F\u5131\u5133\u5134\u5135\u5138\u5139\u5142\u514A\u514F\u5153\u5155\u5157\u5158\u515F\u5164\u5166\u517E\u5183\u5184\u518B\u518E\u5198\u519D\u51A1\u51A3\u51AD\u51B8\u51BA\u51BC\u51BE\u51BF\u51C2"],["8fb3a1","\u51C8\u51CF\u51D1\u51D2\u51D3\u51D5\u51D8\u51DE\u51E2\u51E5\u51EE\u51F2\u51F3\u51F4\u51F7\u5201\u5202\u5205\u5212\u5213\u5215\u5216\u5218\u5222\u5228\u5231\u5232\u5235\u523C\u5245\u5249\u5255\u5257\u5258\u525A\u525C\u525F\u5260\u5261\u5266\u526E\u5277\u5278\u5279\u5280\u5282\u5285\u528A\u528C\u5293\u5295\u5296\u5297\u5298\u529A\u529C\u52A4\u52A5\u52A6\u52A7\u52AF\u52B0\u52B6\u52B7\u52B8\u52BA\u52BB\u52BD\u52C0\u52C4\u52C6\u52C8\u52CC\u52CF\u52D1\u52D4\u52D6\u52DB\u52DC\u52E1\u52E5\u52E8\u52E9\u52EA\u52EC\u52F0\u52F1\u52F4\u52F6\u52F7\u5300\u5303\u530A\u530B"],["8fb4a1","\u530C\u5311\u5313\u5318\u531B\u531C\u531E\u531F\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u5330\u5332\u5335\u533C\u533D\u533E\u5342\u534C\u534B\u5359\u535B\u5361\u5363\u5365\u536C\u536D\u5372\u5379\u537E\u5383\u5387\u5388\u538E\u5393\u5394\u5399\u539D\u53A1\u53A4\u53AA\u53AB\u53AF\u53B2\u53B4\u53B5\u53B7\u53B8\u53BA\u53BD\u53C0\u53C5\u53CF\u53D2\u53D3\u53D5\u53DA\u53DD\u53DE\u53E0\u53E6\u53E7\u53F5\u5402\u5413\u541A\u5421\u5427\u5428\u542A\u542F\u5431\u5434\u5435\u5443\u5444\u5447\u544D\u544F\u545E\u5462\u5464\u5466\u5467\u5469\u546B\u546D\u546E\u5474\u547F"],["8fb5a1","\u5481\u5483\u5485\u5488\u5489\u548D\u5491\u5495\u5496\u549C\u549F\u54A1\u54A6\u54A7\u54A9\u54AA\u54AD\u54AE\u54B1\u54B7\u54B9\u54BA\u54BB\u54BF\u54C6\u54CA\u54CD\u54CE\u54E0\u54EA\u54EC\u54EF\u54F6\u54FC\u54FE\u54FF\u5500\u5501\u5505\u5508\u5509\u550C\u550D\u550E\u5515\u552A\u552B\u5532\u5535\u5536\u553B\u553C\u553D\u5541\u5547\u5549\u554A\u554D\u5550\u5551\u5558\u555A\u555B\u555E\u5560\u5561\u5564\u5566\u557F\u5581\u5582\u5586\u5588\u558E\u558F\u5591\u5592\u5593\u5594\u5597\u55A3\u55A4\u55AD\u55B2\u55BF\u55C1\u55C3\u55C6\u55C9\u55CB\u55CC\u55CE\u55D1\u55D2"],["8fb6a1","\u55D3\u55D7\u55D8\u55DB\u55DE\u55E2\u55E9\u55F6\u55FF\u5605\u5608\u560A\u560D",5,"\u5619\u562C\u5630\u5633\u5635\u5637\u5639\u563B\u563C\u563D\u563F\u5640\u5641\u5643\u5644\u5646\u5649\u564B\u564D\u564F\u5654\u565E\u5660\u5661\u5662\u5663\u5666\u5669\u566D\u566F\u5671\u5672\u5675\u5684\u5685\u5688\u568B\u568C\u5695\u5699\u569A\u569D\u569E\u569F\u56A6\u56A7\u56A8\u56A9\u56AB\u56AC\u56AD\u56B1\u56B3\u56B7\u56BE\u56C5\u56C9\u56CA\u56CB\u56CF\u56D0\u56CC\u56CD\u56D9\u56DC\u56DD\u56DF\u56E1\u56E4",4,"\u56F1\u56EB\u56ED"],["8fb7a1","\u56F6\u56F7\u5701\u5702\u5707\u570A\u570C\u5711\u5715\u571A\u571B\u571D\u5720\u5722\u5723\u5724\u5725\u5729\u572A\u572C\u572E\u572F\u5733\u5734\u573D\u573E\u573F\u5745\u5746\u574C\u574D\u5752\u5762\u5765\u5767\u5768\u576B\u576D",4,"\u5773\u5774\u5775\u5777\u5779\u577A\u577B\u577C\u577E\u5781\u5783\u578C\u5794\u5797\u5799\u579A\u579C\u579D\u579E\u579F\u57A1\u5795\u57A7\u57A8\u57A9\u57AC\u57B8\u57BD\u57C7\u57C8\u57CC\u57CF\u57D5\u57DD\u57DE\u57E4\u57E6\u57E7\u57E9\u57ED\u57F0\u57F5\u57F6\u57F8\u57FD\u57FE\u57FF\u5803\u5804\u5808\u5809\u57E1"],["8fb8a1","\u580C\u580D\u581B\u581E\u581F\u5820\u5826\u5827\u582D\u5832\u5839\u583F\u5849\u584C\u584D\u584F\u5850\u5855\u585F\u5861\u5864\u5867\u5868\u5878\u587C\u587F\u5880\u5881\u5887\u5888\u5889\u588A\u588C\u588D\u588F\u5890\u5894\u5896\u589D\u58A0\u58A1\u58A2\u58A6\u58A9\u58B1\u58B2\u58C4\u58BC\u58C2\u58C8\u58CD\u58CE\u58D0\u58D2\u58D4\u58D6\u58DA\u58DD\u58E1\u58E2\u58E9\u58F3\u5905\u5906\u590B\u590C\u5912\u5913\u5914\u8641\u591D\u5921\u5923\u5924\u5928\u592F\u5930\u5933\u5935\u5936\u593F\u5943\u5946\u5952\u5953\u5959\u595B\u595D\u595E\u595F\u5961\u5963\u596B\u596D"],["8fb9a1","\u596F\u5972\u5975\u5976\u5979\u597B\u597C\u598B\u598C\u598E\u5992\u5995\u5997\u599F\u59A4\u59A7\u59AD\u59AE\u59AF\u59B0\u59B3\u59B7\u59BA\u59BC\u59C1\u59C3\u59C4\u59C8\u59CA\u59CD\u59D2\u59DD\u59DE\u59DF\u59E3\u59E4\u59E7\u59EE\u59EF\u59F1\u59F2\u59F4\u59F7\u5A00\u5A04\u5A0C\u5A0D\u5A0E\u5A12\u5A13\u5A1E\u5A23\u5A24\u5A27\u5A28\u5A2A\u5A2D\u5A30\u5A44\u5A45\u5A47\u5A48\u5A4C\u5A50\u5A55\u5A5E\u5A63\u5A65\u5A67\u5A6D\u5A77\u5A7A\u5A7B\u5A7E\u5A8B\u5A90\u5A93\u5A96\u5A99\u5A9C\u5A9E\u5A9F\u5AA0\u5AA2\u5AA7\u5AAC\u5AB1\u5AB2\u5AB3\u5AB5\u5AB8\u5ABA\u5ABB\u5ABF"],["8fbaa1","\u5AC4\u5AC6\u5AC8\u5ACF\u5ADA\u5ADC\u5AE0\u5AE5\u5AEA\u5AEE\u5AF5\u5AF6\u5AFD\u5B00\u5B01\u5B08\u5B17\u5B34\u5B19\u5B1B\u5B1D\u5B21\u5B25\u5B2D\u5B38\u5B41\u5B4B\u5B4C\u5B52\u5B56\u5B5E\u5B68\u5B6E\u5B6F\u5B7C\u5B7D\u5B7E\u5B7F\u5B81\u5B84\u5B86\u5B8A\u5B8E\u5B90\u5B91\u5B93\u5B94\u5B96\u5BA8\u5BA9\u5BAC\u5BAD\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBC\u5BC0\u5BC1\u5BCD\u5BCF\u5BD6",4,"\u5BE0\u5BEF\u5BF1\u5BF4\u5BFD\u5C0C\u5C17\u5C1E\u5C1F\u5C23\u5C26\u5C29\u5C2B\u5C2C\u5C2E\u5C30\u5C32\u5C35\u5C36\u5C59\u5C5A\u5C5C\u5C62\u5C63\u5C67\u5C68\u5C69"],["8fbba1","\u5C6D\u5C70\u5C74\u5C75\u5C7A\u5C7B\u5C7C\u5C7D\u5C87\u5C88\u5C8A\u5C8F\u5C92\u5C9D\u5C9F\u5CA0\u5CA2\u5CA3\u5CA6\u5CAA\u5CB2\u5CB4\u5CB5\u5CBA\u5CC9\u5CCB\u5CD2\u5CDD\u5CD7\u5CEE\u5CF1\u5CF2\u5CF4\u5D01\u5D06\u5D0D\u5D12\u5D2B\u5D23\u5D24\u5D26\u5D27\u5D31\u5D34\u5D39\u5D3D\u5D3F\u5D42\u5D43\u5D46\u5D48\u5D55\u5D51\u5D59\u5D4A\u5D5F\u5D60\u5D61\u5D62\u5D64\u5D6A\u5D6D\u5D70\u5D79\u5D7A\u5D7E\u5D7F\u5D81\u5D83\u5D88\u5D8A\u5D92\u5D93\u5D94\u5D95\u5D99\u5D9B\u5D9F\u5DA0\u5DA7\u5DAB\u5DB0\u5DB4\u5DB8\u5DB9\u5DC3\u5DC7\u5DCB\u5DD0\u5DCE\u5DD8\u5DD9\u5DE0\u5DE4"],["8fbca1","\u5DE9\u5DF8\u5DF9\u5E00\u5E07\u5E0D\u5E12\u5E14\u5E15\u5E18\u5E1F\u5E20\u5E2E\u5E28\u5E32\u5E35\u5E3E\u5E4B\u5E50\u5E49\u5E51\u5E56\u5E58\u5E5B\u5E5C\u5E5E\u5E68\u5E6A",4,"\u5E70\u5E80\u5E8B\u5E8E\u5EA2\u5EA4\u5EA5\u5EA8\u5EAA\u5EAC\u5EB1\u5EB3\u5EBD\u5EBE\u5EBF\u5EC6\u5ECC\u5ECB\u5ECE\u5ED1\u5ED2\u5ED4\u5ED5\u5EDC\u5EDE\u5EE5\u5EEB\u5F02\u5F06\u5F07\u5F08\u5F0E\u5F19\u5F1C\u5F1D\u5F21\u5F22\u5F23\u5F24\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F34\u5F36\u5F3B\u5F3D\u5F3F\u5F40\u5F44\u5F45\u5F47\u5F4D\u5F50\u5F54\u5F58\u5F5B\u5F60\u5F63\u5F64\u5F67"],["8fbda1","\u5F6F\u5F72\u5F74\u5F75\u5F78\u5F7A\u5F7D\u5F7E\u5F89\u5F8D\u5F8F\u5F96\u5F9C\u5F9D\u5FA2\u5FA7\u5FAB\u5FA4\u5FAC\u5FAF\u5FB0\u5FB1\u5FB8\u5FC4\u5FC7\u5FC8\u5FC9\u5FCB\u5FD0",4,"\u5FDE\u5FE1\u5FE2\u5FE8\u5FE9\u5FEA\u5FEC\u5FED\u5FEE\u5FEF\u5FF2\u5FF3\u5FF6\u5FFA\u5FFC\u6007\u600A\u600D\u6013\u6014\u6017\u6018\u601A\u601F\u6024\u602D\u6033\u6035\u6040\u6047\u6048\u6049\u604C\u6051\u6054\u6056\u6057\u605D\u6061\u6067\u6071\u607E\u607F\u6082\u6086\u6088\u608A\u608E\u6091\u6093\u6095\u6098\u609D\u609E\u60A2\u60A4\u60A5\u60A8\u60B0\u60B1\u60B7"],["8fbea1","\u60BB\u60BE\u60C2\u60C4\u60C8\u60C9\u60CA\u60CB\u60CE\u60CF\u60D4\u60D5\u60D9\u60DB\u60DD\u60DE\u60E2\u60E5\u60F2\u60F5\u60F8\u60FC\u60FD\u6102\u6107\u610A\u610C\u6110",4,"\u6116\u6117\u6119\u611C\u611E\u6122\u612A\u612B\u6130\u6131\u6135\u6136\u6137\u6139\u6141\u6145\u6146\u6149\u615E\u6160\u616C\u6172\u6178\u617B\u617C\u617F\u6180\u6181\u6183\u6184\u618B\u618D\u6192\u6193\u6197\u6198\u619C\u619D\u619F\u61A0\u61A5\u61A8\u61AA\u61AD\u61B8\u61B9\u61BC\u61C0\u61C1\u61C2\u61CE\u61CF\u61D5\u61DC\u61DD\u61DE\u61DF\u61E1\u61E2\u61E7\u61E9\u61E5"],["8fbfa1","\u61EC\u61ED\u61EF\u6201\u6203\u6204\u6207\u6213\u6215\u621C\u6220\u6222\u6223\u6227\u6229\u622B\u6239\u623D\u6242\u6243\u6244\u6246\u624C\u6250\u6251\u6252\u6254\u6256\u625A\u625C\u6264\u626D\u626F\u6273\u627A\u627D\u628D\u628E\u628F\u6290\u62A6\u62A8\u62B3\u62B6\u62B7\u62BA\u62BE\u62BF\u62C4\u62CE\u62D5\u62D6\u62DA\u62EA\u62F2\u62F4\u62FC\u62FD\u6303\u6304\u630A\u630B\u630D\u6310\u6313\u6316\u6318\u6329\u632A\u632D\u6335\u6336\u6339\u633C\u6341\u6342\u6343\u6344\u6346\u634A\u634B\u634E\u6352\u6353\u6354\u6358\u635B\u6365\u6366\u636C\u636D\u6371\u6374\u6375"],["8fc0a1","\u6378\u637C\u637D\u637F\u6382\u6384\u6387\u638A\u6390\u6394\u6395\u6399\u639A\u639E\u63A4\u63A6\u63AD\u63AE\u63AF\u63BD\u63C1\u63C5\u63C8\u63CE\u63D1\u63D3\u63D4\u63D5\u63DC\u63E0\u63E5\u63EA\u63EC\u63F2\u63F3\u63F5\u63F8\u63F9\u6409\u640A\u6410\u6412\u6414\u6418\u641E\u6420\u6422\u6424\u6425\u6429\u642A\u642F\u6430\u6435\u643D\u643F\u644B\u644F\u6451\u6452\u6453\u6454\u645A\u645B\u645C\u645D\u645F\u6460\u6461\u6463\u646D\u6473\u6474\u647B\u647D\u6485\u6487\u648F\u6490\u6491\u6498\u6499\u649B\u649D\u649F\u64A1\u64A3\u64A6\u64A8\u64AC\u64B3\u64BD\u64BE\u64BF"],["8fc1a1","\u64C4\u64C9\u64CA\u64CB\u64CC\u64CE\u64D0\u64D1\u64D5\u64D7\u64E4\u64E5\u64E9\u64EA\u64ED\u64F0\u64F5\u64F7\u64FB\u64FF\u6501\u6504\u6508\u6509\u650A\u650F\u6513\u6514\u6516\u6519\u651B\u651E\u651F\u6522\u6526\u6529\u652E\u6531\u653A\u653C\u653D\u6543\u6547\u6549\u6550\u6552\u6554\u655F\u6560\u6567\u656B\u657A\u657D\u6581\u6585\u658A\u6592\u6595\u6598\u659D\u65A0\u65A3\u65A6\u65AE\u65B2\u65B3\u65B4\u65BF\u65C2\u65C8\u65C9\u65CE\u65D0\u65D4\u65D6\u65D8\u65DF\u65F0\u65F2\u65F4\u65F5\u65F9\u65FE\u65FF\u6600\u6604\u6608\u6609\u660D\u6611\u6612\u6615\u6616\u661D"],["8fc2a1","\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6631\u6633\u6639\u6637\u6640\u6645\u6646\u664A\u664C\u6651\u664E\u6657\u6658\u6659\u665B\u665C\u6660\u6661\u66FB\u666A\u666B\u666C\u667E\u6673\u6675\u667F\u6677\u6678\u6679\u667B\u6680\u667C\u668B\u668C\u668D\u6690\u6692\u6699\u669A\u669B\u669C\u669F\u66A0\u66A4\u66AD\u66B1\u66B2\u66B5\u66BB\u66BF\u66C0\u66C2\u66C3\u66C8\u66CC\u66CE\u66CF\u66D4\u66DB\u66DF\u66E8\u66EB\u66EC\u66EE\u66FA\u6705\u6707\u670E\u6713\u6719\u671C\u6720\u6722\u6733\u673E\u6745\u6747\u6748\u674C\u6754\u6755\u675D"],["8fc3a1","\u6766\u676C\u676E\u6774\u6776\u677B\u6781\u6784\u678E\u678F\u6791\u6793\u6796\u6798\u6799\u679B\u67B0\u67B1\u67B2\u67B5\u67BB\u67BC\u67BD\u67F9\u67C0\u67C2\u67C3\u67C5\u67C8\u67C9\u67D2\u67D7\u67D9\u67DC\u67E1\u67E6\u67F0\u67F2\u67F6\u67F7\u6852\u6814\u6819\u681D\u681F\u6828\u6827\u682C\u682D\u682F\u6830\u6831\u6833\u683B\u683F\u6844\u6845\u684A\u684C\u6855\u6857\u6858\u685B\u686B\u686E",4,"\u6875\u6879\u687A\u687B\u687C\u6882\u6884\u6886\u6888\u6896\u6898\u689A\u689C\u68A1\u68A3\u68A5\u68A9\u68AA\u68AE\u68B2\u68BB\u68C5\u68C8\u68CC\u68CF"],["8fc4a1","\u68D0\u68D1\u68D3\u68D6\u68D9\u68DC\u68DD\u68E5\u68E8\u68EA\u68EB\u68EC\u68ED\u68F0\u68F1\u68F5\u68F6\u68FB\u68FC\u68FD\u6906\u6909\u690A\u6910\u6911\u6913\u6916\u6917\u6931\u6933\u6935\u6938\u693B\u6942\u6945\u6949\u694E\u6957\u695B\u6963\u6964\u6965\u6966\u6968\u6969\u696C\u6970\u6971\u6972\u697A\u697B\u697F\u6980\u698D\u6992\u6996\u6998\u69A1\u69A5\u69A6\u69A8\u69AB\u69AD\u69AF\u69B7\u69B8\u69BA\u69BC\u69C5\u69C8\u69D1\u69D6\u69D7\u69E2\u69E5\u69EE\u69EF\u69F1\u69F3\u69F5\u69FE\u6A00\u6A01\u6A03\u6A0F\u6A11\u6A15\u6A1A\u6A1D\u6A20\u6A24\u6A28\u6A30\u6A32"],["8fc5a1","\u6A34\u6A37\u6A3B\u6A3E\u6A3F\u6A45\u6A46\u6A49\u6A4A\u6A4E\u6A50\u6A51\u6A52\u6A55\u6A56\u6A5B\u6A64\u6A67\u6A6A\u6A71\u6A73\u6A7E\u6A81\u6A83\u6A86\u6A87\u6A89\u6A8B\u6A91\u6A9B\u6A9D\u6A9E\u6A9F\u6AA5\u6AAB\u6AAF\u6AB0\u6AB1\u6AB4\u6ABD\u6ABE\u6ABF\u6AC6\u6AC9\u6AC8\u6ACC\u6AD0\u6AD4\u6AD5\u6AD6\u6ADC\u6ADD\u6AE4\u6AE7\u6AEC\u6AF0\u6AF1\u6AF2\u6AFC\u6AFD\u6B02\u6B03\u6B06\u6B07\u6B09\u6B0F\u6B10\u6B11\u6B17\u6B1B\u6B1E\u6B24\u6B28\u6B2B\u6B2C\u6B2F\u6B35\u6B36\u6B3B\u6B3F\u6B46\u6B4A\u6B4D\u6B52\u6B56\u6B58\u6B5D\u6B60\u6B67\u6B6B\u6B6E\u6B70\u6B75\u6B7D"],["8fc6a1","\u6B7E\u6B82\u6B85\u6B97\u6B9B\u6B9F\u6BA0\u6BA2\u6BA3\u6BA8\u6BA9\u6BAC\u6BAD\u6BAE\u6BB0\u6BB8\u6BB9\u6BBD\u6BBE\u6BC3\u6BC4\u6BC9\u6BCC\u6BD6\u6BDA\u6BE1\u6BE3\u6BE6\u6BE7\u6BEE\u6BF1\u6BF7\u6BF9\u6BFF\u6C02\u6C04\u6C05\u6C09\u6C0D\u6C0E\u6C10\u6C12\u6C19\u6C1F\u6C26\u6C27\u6C28\u6C2C\u6C2E\u6C33\u6C35\u6C36\u6C3A\u6C3B\u6C3F\u6C4A\u6C4B\u6C4D\u6C4F\u6C52\u6C54\u6C59\u6C5B\u6C5C\u6C6B\u6C6D\u6C6F\u6C74\u6C76\u6C78\u6C79\u6C7B\u6C85\u6C86\u6C87\u6C89\u6C94\u6C95\u6C97\u6C98\u6C9C\u6C9F\u6CB0\u6CB2\u6CB4\u6CC2\u6CC6\u6CCD\u6CCF\u6CD0\u6CD1\u6CD2\u6CD4\u6CD6"],["8fc7a1","\u6CDA\u6CDC\u6CE0\u6CE7\u6CE9\u6CEB\u6CEC\u6CEE\u6CF2\u6CF4\u6D04\u6D07\u6D0A\u6D0E\u6D0F\u6D11\u6D13\u6D1A\u6D26\u6D27\u6D28\u6C67\u6D2E\u6D2F\u6D31\u6D39\u6D3C\u6D3F\u6D57\u6D5E\u6D5F\u6D61\u6D65\u6D67\u6D6F\u6D70\u6D7C\u6D82\u6D87\u6D91\u6D92\u6D94\u6D96\u6D97\u6D98\u6DAA\u6DAC\u6DB4\u6DB7\u6DB9\u6DBD\u6DBF\u6DC4\u6DC8\u6DCA\u6DCE\u6DCF\u6DD6\u6DDB\u6DDD\u6DDF\u6DE0\u6DE2\u6DE5\u6DE9\u6DEF\u6DF0\u6DF4\u6DF6\u6DFC\u6E00\u6E04\u6E1E\u6E22\u6E27\u6E32\u6E36\u6E39\u6E3B\u6E3C\u6E44\u6E45\u6E48\u6E49\u6E4B\u6E4F\u6E51\u6E52\u6E53\u6E54\u6E57\u6E5C\u6E5D\u6E5E"],["8fc8a1","\u6E62\u6E63\u6E68\u6E73\u6E7B\u6E7D\u6E8D\u6E93\u6E99\u6EA0\u6EA7\u6EAD\u6EAE\u6EB1\u6EB3\u6EBB\u6EBF\u6EC0\u6EC1\u6EC3\u6EC7\u6EC8\u6ECA\u6ECD\u6ECE\u6ECF\u6EEB\u6EED\u6EEE\u6EF9\u6EFB\u6EFD\u6F04\u6F08\u6F0A\u6F0C\u6F0D\u6F16\u6F18\u6F1A\u6F1B\u6F26\u6F29\u6F2A\u6F2F\u6F30\u6F33\u6F36\u6F3B\u6F3C\u6F2D\u6F4F\u6F51\u6F52\u6F53\u6F57\u6F59\u6F5A\u6F5D\u6F5E\u6F61\u6F62\u6F68\u6F6C\u6F7D\u6F7E\u6F83\u6F87\u6F88\u6F8B\u6F8C\u6F8D\u6F90\u6F92\u6F93\u6F94\u6F96\u6F9A\u6F9F\u6FA0\u6FA5\u6FA6\u6FA7\u6FA8\u6FAE\u6FAF\u6FB0\u6FB5\u6FB6\u6FBC\u6FC5\u6FC7\u6FC8\u6FCA"],["8fc9a1","\u6FDA\u6FDE\u6FE8\u6FE9\u6FF0\u6FF5\u6FF9\u6FFC\u6FFD\u7000\u7005\u7006\u7007\u700D\u7017\u7020\u7023\u702F\u7034\u7037\u7039\u703C\u7043\u7044\u7048\u7049\u704A\u704B\u7054\u7055\u705D\u705E\u704E\u7064\u7065\u706C\u706E\u7075\u7076\u707E\u7081\u7085\u7086\u7094",4,"\u709B\u70A4\u70AB\u70B0\u70B1\u70B4\u70B7\u70CA\u70D1\u70D3\u70D4\u70D5\u70D6\u70D8\u70DC\u70E4\u70FA\u7103",4,"\u710B\u710C\u710F\u711E\u7120\u712B\u712D\u712F\u7130\u7131\u7138\u7141\u7145\u7146\u7147\u714A\u714B\u7150\u7152\u7157\u715A\u715C\u715E\u7160"],["8fcaa1","\u7168\u7179\u7180\u7185\u7187\u718C\u7192\u719A\u719B\u71A0\u71A2\u71AF\u71B0\u71B2\u71B3\u71BA\u71BF\u71C0\u71C1\u71C4\u71CB\u71CC\u71D3\u71D6\u71D9\u71DA\u71DC\u71F8\u71FE\u7200\u7207\u7208\u7209\u7213\u7217\u721A\u721D\u721F\u7224\u722B\u722F\u7234\u7238\u7239\u7241\u7242\u7243\u7245\u724E\u724F\u7250\u7253\u7255\u7256\u725A\u725C\u725E\u7260\u7263\u7268\u726B\u726E\u726F\u7271\u7277\u7278\u727B\u727C\u727F\u7284\u7289\u728D\u728E\u7293\u729B\u72A8\u72AD\u72AE\u72B1\u72B4\u72BE\u72C1\u72C7\u72C9\u72CC\u72D5\u72D6\u72D8\u72DF\u72E5\u72F3\u72F4\u72FA\u72FB"],["8fcba1","\u72FE\u7302\u7304\u7305\u7307\u730B\u730D\u7312\u7313\u7318\u7319\u731E\u7322\u7324\u7327\u7328\u732C\u7331\u7332\u7335\u733A\u733B\u733D\u7343\u734D\u7350\u7352\u7356\u7358\u735D\u735E\u735F\u7360\u7366\u7367\u7369\u736B\u736C\u736E\u736F\u7371\u7377\u7379\u737C\u7380\u7381\u7383\u7385\u7386\u738E\u7390\u7393\u7395\u7397\u7398\u739C\u739E\u739F\u73A0\u73A2\u73A5\u73A6\u73AA\u73AB\u73AD\u73B5\u73B7\u73B9\u73BC\u73BD\u73BF\u73C5\u73C6\u73C9\u73CB\u73CC\u73CF\u73D2\u73D3\u73D6\u73D9\u73DD\u73E1\u73E3\u73E6\u73E7\u73E9\u73F4\u73F5\u73F7\u73F9\u73FA\u73FB\u73FD"],["8fcca1","\u73FF\u7400\u7401\u7404\u7407\u740A\u7411\u741A\u741B\u7424\u7426\u7428",9,"\u7439\u7440\u7443\u7444\u7446\u7447\u744B\u744D\u7451\u7452\u7457\u745D\u7462\u7466\u7467\u7468\u746B\u746D\u746E\u7471\u7472\u7480\u7481\u7485\u7486\u7487\u7489\u748F\u7490\u7491\u7492\u7498\u7499\u749A\u749C\u749F\u74A0\u74A1\u74A3\u74A6\u74A8\u74A9\u74AA\u74AB\u74AE\u74AF\u74B1\u74B2\u74B5\u74B9\u74BB\u74BF\u74C8\u74C9\u74CC\u74D0\u74D3\u74D8\u74DA\u74DB\u74DE\u74DF\u74E4\u74E8\u74EA\u74EB\u74EF\u74F4\u74FA\u74FB\u74FC\u74FF\u7506"],["8fcda1","\u7512\u7516\u7517\u7520\u7521\u7524\u7527\u7529\u752A\u752F\u7536\u7539\u753D\u753E\u753F\u7540\u7543\u7547\u7548\u754E\u7550\u7552\u7557\u755E\u755F\u7561\u756F\u7571\u7579",5,"\u7581\u7585\u7590\u7592\u7593\u7595\u7599\u759C\u75A2\u75A4\u75B4\u75BA\u75BF\u75C0\u75C1\u75C4\u75C6\u75CC\u75CE\u75CF\u75D7\u75DC\u75DF\u75E0\u75E1\u75E4\u75E7\u75EC\u75EE\u75EF\u75F1\u75F9\u7600\u7602\u7603\u7604\u7607\u7608\u760A\u760C\u760F\u7612\u7613\u7615\u7616\u7619\u761B\u761C\u761D\u761E\u7623\u7625\u7626\u7629\u762D\u7632\u7633\u7635\u7638\u7639"],["8fcea1","\u763A\u763C\u764A\u7640\u7641\u7643\u7644\u7645\u7649\u764B\u7655\u7659\u765F\u7664\u7665\u766D\u766E\u766F\u7671\u7674\u7681\u7685\u768C\u768D\u7695\u769B\u769C\u769D\u769F\u76A0\u76A2",6,"\u76AA\u76AD\u76BD\u76C1\u76C5\u76C9\u76CB\u76CC\u76CE\u76D4\u76D9\u76E0\u76E6\u76E8\u76EC\u76F0\u76F1\u76F6\u76F9\u76FC\u7700\u7706\u770A\u770E\u7712\u7714\u7715\u7717\u7719\u771A\u771C\u7722\u7728\u772D\u772E\u772F\u7734\u7735\u7736\u7739\u773D\u773E\u7742\u7745\u7746\u774A\u774D\u774E\u774F\u7752\u7756\u7757\u775C\u775E\u775F\u7760\u7762"],["8fcfa1","\u7764\u7767\u776A\u776C\u7770\u7772\u7773\u7774\u777A\u777D\u7780\u7784\u778C\u778D\u7794\u7795\u7796\u779A\u779F\u77A2\u77A7\u77AA\u77AE\u77AF\u77B1\u77B5\u77BE\u77C3\u77C9\u77D1\u77D2\u77D5\u77D9\u77DE\u77DF\u77E0\u77E4\u77E6\u77EA\u77EC\u77F0\u77F1\u77F4\u77F8\u77FB\u7805\u7806\u7809\u780D\u780E\u7811\u781D\u7821\u7822\u7823\u782D\u782E\u7830\u7835\u7837\u7843\u7844\u7847\u7848\u784C\u784E\u7852\u785C\u785E\u7860\u7861\u7863\u7864\u7868\u786A\u786E\u787A\u787E\u788A\u788F\u7894\u7898\u78A1\u789D\u789E\u789F\u78A4\u78A8\u78AC\u78AD\u78B0\u78B1\u78B2\u78B3"],["8fd0a1","\u78BB\u78BD\u78BF\u78C7\u78C8\u78C9\u78CC\u78CE\u78D2\u78D3\u78D5\u78D6\u78E4\u78DB\u78DF\u78E0\u78E1\u78E6\u78EA\u78F2\u78F3\u7900\u78F6\u78F7\u78FA\u78FB\u78FF\u7906\u790C\u7910\u791A\u791C\u791E\u791F\u7920\u7925\u7927\u7929\u792D\u7931\u7934\u7935\u793B\u793D\u793F\u7944\u7945\u7946\u794A\u794B\u794F\u7951\u7954\u7958\u795B\u795C\u7967\u7969\u796B\u7972\u7979\u797B\u797C\u797E\u798B\u798C\u7991\u7993\u7994\u7995\u7996\u7998\u799B\u799C\u79A1\u79A8\u79A9\u79AB\u79AF\u79B1\u79B4\u79B8\u79BB\u79C2\u79C4\u79C7\u79C8\u79CA\u79CF\u79D4\u79D6\u79DA\u79DD\u79DE"],["8fd1a1","\u79E0\u79E2\u79E5\u79EA\u79EB\u79ED\u79F1\u79F8\u79FC\u7A02\u7A03\u7A07\u7A09\u7A0A\u7A0C\u7A11\u7A15\u7A1B\u7A1E\u7A21\u7A27\u7A2B\u7A2D\u7A2F\u7A30\u7A34\u7A35\u7A38\u7A39\u7A3A\u7A44\u7A45\u7A47\u7A48\u7A4C\u7A55\u7A56\u7A59\u7A5C\u7A5D\u7A5F\u7A60\u7A65\u7A67\u7A6A\u7A6D\u7A75\u7A78\u7A7E\u7A80\u7A82\u7A85\u7A86\u7A8A\u7A8B\u7A90\u7A91\u7A94\u7A9E\u7AA0\u7AA3\u7AAC\u7AB3\u7AB5\u7AB9\u7ABB\u7ABC\u7AC6\u7AC9\u7ACC\u7ACE\u7AD1\u7ADB\u7AE8\u7AE9\u7AEB\u7AEC\u7AF1\u7AF4\u7AFB\u7AFD\u7AFE\u7B07\u7B14\u7B1F\u7B23\u7B27\u7B29\u7B2A\u7B2B\u7B2D\u7B2E\u7B2F\u7B30"],["8fd2a1","\u7B31\u7B34\u7B3D\u7B3F\u7B40\u7B41\u7B47\u7B4E\u7B55\u7B60\u7B64\u7B66\u7B69\u7B6A\u7B6D\u7B6F\u7B72\u7B73\u7B77\u7B84\u7B89\u7B8E\u7B90\u7B91\u7B96\u7B9B\u7B9E\u7BA0\u7BA5\u7BAC\u7BAF\u7BB0\u7BB2\u7BB5\u7BB6\u7BBA\u7BBB\u7BBC\u7BBD\u7BC2\u7BC5\u7BC8\u7BCA\u7BD4\u7BD6\u7BD7\u7BD9\u7BDA\u7BDB\u7BE8\u7BEA\u7BF2\u7BF4\u7BF5\u7BF8\u7BF9\u7BFA\u7BFC\u7BFE\u7C01\u7C02\u7C03\u7C04\u7C06\u7C09\u7C0B\u7C0C\u7C0E\u7C0F\u7C19\u7C1B\u7C20\u7C25\u7C26\u7C28\u7C2C\u7C31\u7C33\u7C34\u7C36\u7C39\u7C3A\u7C46\u7C4A\u7C55\u7C51\u7C52\u7C53\u7C59",5],["8fd3a1","\u7C61\u7C63\u7C67\u7C69\u7C6D\u7C6E\u7C70\u7C72\u7C79\u7C7C\u7C7D\u7C86\u7C87\u7C8F\u7C94\u7C9E\u7CA0\u7CA6\u7CB0\u7CB6\u7CB7\u7CBA\u7CBB\u7CBC\u7CBF\u7CC4\u7CC7\u7CC8\u7CC9\u7CCD\u7CCF\u7CD3\u7CD4\u7CD5\u7CD7\u7CD9\u7CDA\u7CDD\u7CE6\u7CE9\u7CEB\u7CF5\u7D03\u7D07\u7D08\u7D09\u7D0F\u7D11\u7D12\u7D13\u7D16\u7D1D\u7D1E\u7D23\u7D26\u7D2A\u7D2D\u7D31\u7D3C\u7D3D\u7D3E\u7D40\u7D41\u7D47\u7D48\u7D4D\u7D51\u7D53\u7D57\u7D59\u7D5A\u7D5C\u7D5D\u7D65\u7D67\u7D6A\u7D70\u7D78\u7D7A\u7D7B\u7D7F\u7D81\u7D82\u7D83\u7D85\u7D86\u7D88\u7D8B\u7D8C\u7D8D\u7D91\u7D96\u7D97\u7D9D"],["8fd4a1","\u7D9E\u7DA6\u7DA7\u7DAA\u7DB3\u7DB6\u7DB7\u7DB9\u7DC2",4,"\u7DCC\u7DCD\u7DCE\u7DD7\u7DD9\u7E00\u7DE2\u7DE5\u7DE6\u7DEA\u7DEB\u7DED\u7DF1\u7DF5\u7DF6\u7DF9\u7DFA\u7E08\u7E10\u7E11\u7E15\u7E17\u7E1C\u7E1D\u7E20\u7E27\u7E28\u7E2C\u7E2D\u7E2F\u7E33\u7E36\u7E3F\u7E44\u7E45\u7E47\u7E4E\u7E50\u7E52\u7E58\u7E5F\u7E61\u7E62\u7E65\u7E6B\u7E6E\u7E6F\u7E73\u7E78\u7E7E\u7E81\u7E86\u7E87\u7E8A\u7E8D\u7E91\u7E95\u7E98\u7E9A\u7E9D\u7E9E\u7F3C\u7F3B\u7F3D\u7F3E\u7F3F\u7F43\u7F44\u7F47\u7F4F\u7F52\u7F53\u7F5B\u7F5C\u7F5D\u7F61\u7F63\u7F64\u7F65\u7F66\u7F6D"],["8fd5a1","\u7F71\u7F7D\u7F7E\u7F7F\u7F80\u7F8B\u7F8D\u7F8F\u7F90\u7F91\u7F96\u7F97\u7F9C\u7FA1\u7FA2\u7FA6\u7FAA\u7FAD\u7FB4\u7FBC\u7FBF\u7FC0\u7FC3\u7FC8\u7FCE\u7FCF\u7FDB\u7FDF\u7FE3\u7FE5\u7FE8\u7FEC\u7FEE\u7FEF\u7FF2\u7FFA\u7FFD\u7FFE\u7FFF\u8007\u8008\u800A\u800D\u800E\u800F\u8011\u8013\u8014\u8016\u801D\u801E\u801F\u8020\u8024\u8026\u802C\u802E\u8030\u8034\u8035\u8037\u8039\u803A\u803C\u803E\u8040\u8044\u8060\u8064\u8066\u806D\u8071\u8075\u8081\u8088\u808E\u809C\u809E\u80A6\u80A7\u80AB\u80B8\u80B9\u80C8\u80CD\u80CF\u80D2\u80D4\u80D5\u80D7\u80D8\u80E0\u80ED\u80EE"],["8fd6a1","\u80F0\u80F2\u80F3\u80F6\u80F9\u80FA\u80FE\u8103\u810B\u8116\u8117\u8118\u811C\u811E\u8120\u8124\u8127\u812C\u8130\u8135\u813A\u813C\u8145\u8147\u814A\u814C\u8152\u8157\u8160\u8161\u8167\u8168\u8169\u816D\u816F\u8177\u8181\u8190\u8184\u8185\u8186\u818B\u818E\u8196\u8198\u819B\u819E\u81A2\u81AE\u81B2\u81B4\u81BB\u81CB\u81C3\u81C5\u81CA\u81CE\u81CF\u81D5\u81D7\u81DB\u81DD\u81DE\u81E1\u81E4\u81EB\u81EC\u81F0\u81F1\u81F2\u81F5\u81F6\u81F8\u81F9\u81FD\u81FF\u8200\u8203\u820F\u8213\u8214\u8219\u821A\u821D\u8221\u8222\u8228\u8232\u8234\u823A\u8243\u8244\u8245\u8246"],["8fd7a1","\u824B\u824E\u824F\u8251\u8256\u825C\u8260\u8263\u8267\u826D\u8274\u827B\u827D\u827F\u8280\u8281\u8283\u8284\u8287\u8289\u828A\u828E\u8291\u8294\u8296\u8298\u829A\u829B\u82A0\u82A1\u82A3\u82A4\u82A7\u82A8\u82A9\u82AA\u82AE\u82B0\u82B2\u82B4\u82B7\u82BA\u82BC\u82BE\u82BF\u82C6\u82D0\u82D5\u82DA\u82E0\u82E2\u82E4\u82E8\u82EA\u82ED\u82EF\u82F6\u82F7\u82FD\u82FE\u8300\u8301\u8307\u8308\u830A\u830B\u8354\u831B\u831D\u831E\u831F\u8321\u8322\u832C\u832D\u832E\u8330\u8333\u8337\u833A\u833C\u833D\u8342\u8343\u8344\u8347\u834D\u834E\u8351\u8355\u8356\u8357\u8370\u8378"],["8fd8a1","\u837D\u837F\u8380\u8382\u8384\u8386\u838D\u8392\u8394\u8395\u8398\u8399\u839B\u839C\u839D\u83A6\u83A7\u83A9\u83AC\u83BE\u83BF\u83C0\u83C7\u83C9\u83CF\u83D0\u83D1\u83D4\u83DD\u8353\u83E8\u83EA\u83F6\u83F8\u83F9\u83FC\u8401\u8406\u840A\u840F\u8411\u8415\u8419\u83AD\u842F\u8439\u8445\u8447\u8448\u844A\u844D\u844F\u8451\u8452\u8456\u8458\u8459\u845A\u845C\u8460\u8464\u8465\u8467\u846A\u8470\u8473\u8474\u8476\u8478\u847C\u847D\u8481\u8485\u8492\u8493\u8495\u849E\u84A6\u84A8\u84A9\u84AA\u84AF\u84B1\u84B4\u84BA\u84BD\u84BE\u84C0\u84C2\u84C7\u84C8\u84CC\u84CF\u84D3"],["8fd9a1","\u84DC\u84E7\u84EA\u84EF\u84F0\u84F1\u84F2\u84F7\u8532\u84FA\u84FB\u84FD\u8502\u8503\u8507\u850C\u850E\u8510\u851C\u851E\u8522\u8523\u8524\u8525\u8527\u852A\u852B\u852F\u8533\u8534\u8536\u853F\u8546\u854F",4,"\u8556\u8559\u855C",6,"\u8564\u856B\u856F\u8579\u857A\u857B\u857D\u857F\u8581\u8585\u8586\u8589\u858B\u858C\u858F\u8593\u8598\u859D\u859F\u85A0\u85A2\u85A5\u85A7\u85B4\u85B6\u85B7\u85B8\u85BC\u85BD\u85BE\u85BF\u85C2\u85C7\u85CA\u85CB\u85CE\u85AD\u85D8\u85DA\u85DF\u85E0\u85E6\u85E8\u85ED\u85F3\u85F6\u85FC"],["8fdaa1","\u85FF\u8600\u8604\u8605\u860D\u860E\u8610\u8611\u8612\u8618\u8619\u861B\u861E\u8621\u8627\u8629\u8636\u8638\u863A\u863C\u863D\u8640\u8642\u8646\u8652\u8653\u8656\u8657\u8658\u8659\u865D\u8660",4,"\u8669\u866C\u866F\u8675\u8676\u8677\u867A\u868D\u8691\u8696\u8698\u869A\u869C\u86A1\u86A6\u86A7\u86A8\u86AD\u86B1\u86B3\u86B4\u86B5\u86B7\u86B8\u86B9\u86BF\u86C0\u86C1\u86C3\u86C5\u86D1\u86D2\u86D5\u86D7\u86DA\u86DC\u86E0\u86E3\u86E5\u86E7\u8688\u86FA\u86FC\u86FD\u8704\u8705\u8707\u870B\u870E\u870F\u8710\u8713\u8714\u8719\u871E\u871F\u8721\u8723"],["8fdba1","\u8728\u872E\u872F\u8731\u8732\u8739\u873A\u873C\u873D\u873E\u8740\u8743\u8745\u874D\u8758\u875D\u8761\u8764\u8765\u876F\u8771\u8772\u877B\u8783",6,"\u878B\u878C\u8790\u8793\u8795\u8797\u8798\u8799\u879E\u87A0\u87A3\u87A7\u87AC\u87AD\u87AE\u87B1\u87B5\u87BE\u87BF\u87C1\u87C8\u87C9\u87CA\u87CE\u87D5\u87D6\u87D9\u87DA\u87DC\u87DF\u87E2\u87E3\u87E4\u87EA\u87EB\u87ED\u87F1\u87F3\u87F8\u87FA\u87FF\u8801\u8803\u8806\u8809\u880A\u880B\u8810\u8819\u8812\u8813\u8814\u8818\u881A\u881B\u881C\u881E\u881F\u8828\u882D\u882E\u8830\u8832\u8835"],["8fdca1","\u883A\u883C\u8841\u8843\u8845\u8848\u8849\u884A\u884B\u884E\u8851\u8855\u8856\u8858\u885A\u885C\u885F\u8860\u8864\u8869\u8871\u8879\u887B\u8880\u8898\u889A\u889B\u889C\u889F\u88A0\u88A8\u88AA\u88BA\u88BD\u88BE\u88C0\u88CA",4,"\u88D1\u88D2\u88D3\u88DB\u88DE\u88E7\u88EF\u88F0\u88F1\u88F5\u88F7\u8901\u8906\u890D\u890E\u890F\u8915\u8916\u8918\u8919\u891A\u891C\u8920\u8926\u8927\u8928\u8930\u8931\u8932\u8935\u8939\u893A\u893E\u8940\u8942\u8945\u8946\u8949\u894F\u8952\u8957\u895A\u895B\u895C\u8961\u8962\u8963\u896B\u896E\u8970\u8973\u8975\u897A"],["8fdda1","\u897B\u897C\u897D\u8989\u898D\u8990\u8994\u8995\u899B\u899C\u899F\u89A0\u89A5\u89B0\u89B4\u89B5\u89B6\u89B7\u89BC\u89D4",4,"\u89E5\u89E9\u89EB\u89ED\u89F1\u89F3\u89F6\u89F9\u89FD\u89FF\u8A04\u8A05\u8A07\u8A0F\u8A11\u8A12\u8A14\u8A15\u8A1E\u8A20\u8A22\u8A24\u8A26\u8A2B\u8A2C\u8A2F\u8A35\u8A37\u8A3D\u8A3E\u8A40\u8A43\u8A45\u8A47\u8A49\u8A4D\u8A4E\u8A53\u8A56\u8A57\u8A58\u8A5C\u8A5D\u8A61\u8A65\u8A67\u8A75\u8A76\u8A77\u8A79\u8A7A\u8A7B\u8A7E\u8A7F\u8A80\u8A83\u8A86\u8A8B\u8A8F\u8A90\u8A92\u8A96\u8A97\u8A99\u8A9F\u8AA7\u8AA9\u8AAE\u8AAF\u8AB3"],["8fdea1","\u8AB6\u8AB7\u8ABB\u8ABE\u8AC3\u8AC6\u8AC8\u8AC9\u8ACA\u8AD1\u8AD3\u8AD4\u8AD5\u8AD7\u8ADD\u8ADF\u8AEC\u8AF0\u8AF4\u8AF5\u8AF6\u8AFC\u8AFF\u8B05\u8B06\u8B0B\u8B11\u8B1C\u8B1E\u8B1F\u8B0A\u8B2D\u8B30\u8B37\u8B3C\u8B42",4,"\u8B48\u8B52\u8B53\u8B54\u8B59\u8B4D\u8B5E\u8B63\u8B6D\u8B76\u8B78\u8B79\u8B7C\u8B7E\u8B81\u8B84\u8B85\u8B8B\u8B8D\u8B8F\u8B94\u8B95\u8B9C\u8B9E\u8B9F\u8C38\u8C39\u8C3D\u8C3E\u8C45\u8C47\u8C49\u8C4B\u8C4F\u8C51\u8C53\u8C54\u8C57\u8C58\u8C5B\u8C5D\u8C59\u8C63\u8C64\u8C66\u8C68\u8C69\u8C6D\u8C73\u8C75\u8C76\u8C7B\u8C7E\u8C86"],["8fdfa1","\u8C87\u8C8B\u8C90\u8C92\u8C93\u8C99\u8C9B\u8C9C\u8CA4\u8CB9\u8CBA\u8CC5\u8CC6\u8CC9\u8CCB\u8CCF\u8CD6\u8CD5\u8CD9\u8CDD\u8CE1\u8CE8\u8CEC\u8CEF\u8CF0\u8CF2\u8CF5\u8CF7\u8CF8\u8CFE\u8CFF\u8D01\u8D03\u8D09\u8D12\u8D17\u8D1B\u8D65\u8D69\u8D6C\u8D6E\u8D7F\u8D82\u8D84\u8D88\u8D8D\u8D90\u8D91\u8D95\u8D9E\u8D9F\u8DA0\u8DA6\u8DAB\u8DAC\u8DAF\u8DB2\u8DB5\u8DB7\u8DB9\u8DBB\u8DC0\u8DC5\u8DC6\u8DC7\u8DC8\u8DCA\u8DCE\u8DD1\u8DD4\u8DD5\u8DD7\u8DD9\u8DE4\u8DE5\u8DE7\u8DEC\u8DF0\u8DBC\u8DF1\u8DF2\u8DF4\u8DFD\u8E01\u8E04\u8E05\u8E06\u8E0B\u8E11\u8E14\u8E16\u8E20\u8E21\u8E22"],["8fe0a1","\u8E23\u8E26\u8E27\u8E31\u8E33\u8E36\u8E37\u8E38\u8E39\u8E3D\u8E40\u8E41\u8E4B\u8E4D\u8E4E\u8E4F\u8E54\u8E5B\u8E5C\u8E5D\u8E5E\u8E61\u8E62\u8E69\u8E6C\u8E6D\u8E6F\u8E70\u8E71\u8E79\u8E7A\u8E7B\u8E82\u8E83\u8E89\u8E90\u8E92\u8E95\u8E9A\u8E9B\u8E9D\u8E9E\u8EA2\u8EA7\u8EA9\u8EAD\u8EAE\u8EB3\u8EB5\u8EBA\u8EBB\u8EC0\u8EC1\u8EC3\u8EC4\u8EC7\u8ECF\u8ED1\u8ED4\u8EDC\u8EE8\u8EEE\u8EF0\u8EF1\u8EF7\u8EF9\u8EFA\u8EED\u8F00\u8F02\u8F07\u8F08\u8F0F\u8F10\u8F16\u8F17\u8F18\u8F1E\u8F20\u8F21\u8F23\u8F25\u8F27\u8F28\u8F2C\u8F2D\u8F2E\u8F34\u8F35\u8F36\u8F37\u8F3A\u8F40\u8F41"],["8fe1a1","\u8F43\u8F47\u8F4F\u8F51",4,"\u8F58\u8F5D\u8F5E\u8F65\u8F9D\u8FA0\u8FA1\u8FA4\u8FA5\u8FA6\u8FB5\u8FB6\u8FB8\u8FBE\u8FC0\u8FC1\u8FC6\u8FCA\u8FCB\u8FCD\u8FD0\u8FD2\u8FD3\u8FD5\u8FE0\u8FE3\u8FE4\u8FE8\u8FEE\u8FF1\u8FF5\u8FF6\u8FFB\u8FFE\u9002\u9004\u9008\u900C\u9018\u901B\u9028\u9029\u902F\u902A\u902C\u902D\u9033\u9034\u9037\u903F\u9043\u9044\u904C\u905B\u905D\u9062\u9066\u9067\u906C\u9070\u9074\u9079\u9085\u9088\u908B\u908C\u908E\u9090\u9095\u9097\u9098\u9099\u909B\u90A0\u90A1\u90A2\u90A5\u90B0\u90B2\u90B3\u90B4\u90B6\u90BD\u90CC\u90BE\u90C3"],["8fe2a1","\u90C4\u90C5\u90C7\u90C8\u90D5\u90D7\u90D8\u90D9\u90DC\u90DD\u90DF\u90E5\u90D2\u90F6\u90EB\u90EF\u90F0\u90F4\u90FE\u90FF\u9100\u9104\u9105\u9106\u9108\u910D\u9110\u9114\u9116\u9117\u9118\u911A\u911C\u911E\u9120\u9125\u9122\u9123\u9127\u9129\u912E\u912F\u9131\u9134\u9136\u9137\u9139\u913A\u913C\u913D\u9143\u9147\u9148\u914F\u9153\u9157\u9159\u915A\u915B\u9161\u9164\u9167\u916D\u9174\u9179\u917A\u917B\u9181\u9183\u9185\u9186\u918A\u918E\u9191\u9193\u9194\u9195\u9198\u919E\u91A1\u91A6\u91A8\u91AC\u91AD\u91AE\u91B0\u91B1\u91B2\u91B3\u91B6\u91BB\u91BC\u91BD\u91BF"],["8fe3a1","\u91C2\u91C3\u91C5\u91D3\u91D4\u91D7\u91D9\u91DA\u91DE\u91E4\u91E5\u91E9\u91EA\u91EC",5,"\u91F7\u91F9\u91FB\u91FD\u9200\u9201\u9204\u9205\u9206\u9207\u9209\u920A\u920C\u9210\u9212\u9213\u9216\u9218\u921C\u921D\u9223\u9224\u9225\u9226\u9228\u922E\u922F\u9230\u9233\u9235\u9236\u9238\u9239\u923A\u923C\u923E\u9240\u9242\u9243\u9246\u9247\u924A\u924D\u924E\u924F\u9251\u9258\u9259\u925C\u925D\u9260\u9261\u9265\u9267\u9268\u9269\u926E\u926F\u9270\u9275",4,"\u927B\u927C\u927D\u927F\u9288\u9289\u928A\u928D\u928E\u9292\u9297"],["8fe4a1","\u9299\u929F\u92A0\u92A4\u92A5\u92A7\u92A8\u92AB\u92AF\u92B2\u92B6\u92B8\u92BA\u92BB\u92BC\u92BD\u92BF",4,"\u92C5\u92C6\u92C7\u92C8\u92CB\u92CC\u92CD\u92CE\u92D0\u92D3\u92D5\u92D7\u92D8\u92D9\u92DC\u92DD\u92DF\u92E0\u92E1\u92E3\u92E5\u92E7\u92E8\u92EC\u92EE\u92F0\u92F9\u92FB\u92FF\u9300\u9302\u9308\u930D\u9311\u9314\u9315\u931C\u931D\u931E\u931F\u9321\u9324\u9325\u9327\u9329\u932A\u9333\u9334\u9336\u9337\u9347\u9348\u9349\u9350\u9351\u9352\u9355\u9357\u9358\u935A\u935E\u9364\u9365\u9367\u9369\u936A\u936D\u936F\u9370\u9371\u9373\u9374\u9376"],["8fe5a1","\u937A\u937D\u937F\u9380\u9381\u9382\u9388\u938A\u938B\u938D\u938F\u9392\u9395\u9398\u939B\u939E\u93A1\u93A3\u93A4\u93A6\u93A8\u93AB\u93B4\u93B5\u93B6\u93BA\u93A9\u93C1\u93C4\u93C5\u93C6\u93C7\u93C9",4,"\u93D3\u93D9\u93DC\u93DE\u93DF\u93E2\u93E6\u93E7\u93F9\u93F7\u93F8\u93FA\u93FB\u93FD\u9401\u9402\u9404\u9408\u9409\u940D\u940E\u940F\u9415\u9416\u9417\u941F\u942E\u942F\u9431\u9432\u9433\u9434\u943B\u943F\u943D\u9443\u9445\u9448\u944A\u944C\u9455\u9459\u945C\u945F\u9461\u9463\u9468\u946B\u946D\u946E\u946F\u9471\u9472\u9484\u9483\u9578\u9579"],["8fe6a1","\u957E\u9584\u9588\u958C\u958D\u958E\u959D\u959E\u959F\u95A1\u95A6\u95A9\u95AB\u95AC\u95B4\u95B6\u95BA\u95BD\u95BF\u95C6\u95C8\u95C9\u95CB\u95D0\u95D1\u95D2\u95D3\u95D9\u95DA\u95DD\u95DE\u95DF\u95E0\u95E4\u95E6\u961D\u961E\u9622\u9624\u9625\u9626\u962C\u9631\u9633\u9637\u9638\u9639\u963A\u963C\u963D\u9641\u9652\u9654\u9656\u9657\u9658\u9661\u966E\u9674\u967B\u967C\u967E\u967F\u9681\u9682\u9683\u9684\u9689\u9691\u9696\u969A\u969D\u969F\u96A4\u96A5\u96A6\u96A9\u96AE\u96AF\u96B3\u96BA\u96CA\u96D2\u5DB2\u96D8\u96DA\u96DD\u96DE\u96DF\u96E9\u96EF\u96F1\u96FA\u9702"],["8fe7a1","\u9703\u9705\u9709\u971A\u971B\u971D\u9721\u9722\u9723\u9728\u9731\u9733\u9741\u9743\u974A\u974E\u974F\u9755\u9757\u9758\u975A\u975B\u9763\u9767\u976A\u976E\u9773\u9776\u9777\u9778\u977B\u977D\u977F\u9780\u9789\u9795\u9796\u9797\u9799\u979A\u979E\u979F\u97A2\u97AC\u97AE\u97B1\u97B2\u97B5\u97B6\u97B8\u97B9\u97BA\u97BC\u97BE\u97BF\u97C1\u97C4\u97C5\u97C7\u97C9\u97CA\u97CC\u97CD\u97CE\u97D0\u97D1\u97D4\u97D7\u97D8\u97D9\u97DD\u97DE\u97E0\u97DB\u97E1\u97E4\u97EF\u97F1\u97F4\u97F7\u97F8\u97FA\u9807\u980A\u9819\u980D\u980E\u9814\u9816\u981C\u981E\u9820\u9823\u9826"],["8fe8a1","\u982B\u982E\u982F\u9830\u9832\u9833\u9835\u9825\u983E\u9844\u9847\u984A\u9851\u9852\u9853\u9856\u9857\u9859\u985A\u9862\u9863\u9865\u9866\u986A\u986C\u98AB\u98AD\u98AE\u98B0\u98B4\u98B7\u98B8\u98BA\u98BB\u98BF\u98C2\u98C5\u98C8\u98CC\u98E1\u98E3\u98E5\u98E6\u98E7\u98EA\u98F3\u98F6\u9902\u9907\u9908\u9911\u9915\u9916\u9917\u991A\u991B\u991C\u991F\u9922\u9926\u9927\u992B\u9931",4,"\u9939\u993A\u993B\u993C\u9940\u9941\u9946\u9947\u9948\u994D\u994E\u9954\u9958\u9959\u995B\u995C\u995E\u995F\u9960\u999B\u999D\u999F\u99A6\u99B0\u99B1\u99B2\u99B5"],["8fe9a1","\u99B9\u99BA\u99BD\u99BF\u99C3\u99C9\u99D3\u99D4\u99D9\u99DA\u99DC\u99DE\u99E7\u99EA\u99EB\u99EC\u99F0\u99F4\u99F5\u99F9\u99FD\u99FE\u9A02\u9A03\u9A04\u9A0B\u9A0C\u9A10\u9A11\u9A16\u9A1E\u9A20\u9A22\u9A23\u9A24\u9A27\u9A2D\u9A2E\u9A33\u9A35\u9A36\u9A38\u9A47\u9A41\u9A44\u9A4A\u9A4B\u9A4C\u9A4E\u9A51\u9A54\u9A56\u9A5D\u9AAA\u9AAC\u9AAE\u9AAF\u9AB2\u9AB4\u9AB5\u9AB6\u9AB9\u9ABB\u9ABE\u9ABF\u9AC1\u9AC3\u9AC6\u9AC8\u9ACE\u9AD0\u9AD2\u9AD5\u9AD6\u9AD7\u9ADB\u9ADC\u9AE0\u9AE4\u9AE5\u9AE7\u9AE9\u9AEC\u9AF2\u9AF3\u9AF5\u9AF9\u9AFA\u9AFD\u9AFF",4],["8feaa1","\u9B04\u9B05\u9B08\u9B09\u9B0B\u9B0C\u9B0D\u9B0E\u9B10\u9B12\u9B16\u9B19\u9B1B\u9B1C\u9B20\u9B26\u9B2B\u9B2D\u9B33\u9B34\u9B35\u9B37\u9B39\u9B3A\u9B3D\u9B48\u9B4B\u9B4C\u9B55\u9B56\u9B57\u9B5B\u9B5E\u9B61\u9B63\u9B65\u9B66\u9B68\u9B6A",4,"\u9B73\u9B75\u9B77\u9B78\u9B79\u9B7F\u9B80\u9B84\u9B85\u9B86\u9B87\u9B89\u9B8A\u9B8B\u9B8D\u9B8F\u9B90\u9B94\u9B9A\u9B9D\u9B9E\u9BA6\u9BA7\u9BA9\u9BAC\u9BB0\u9BB1\u9BB2\u9BB7\u9BB8\u9BBB\u9BBC\u9BBE\u9BBF\u9BC1\u9BC7\u9BC8\u9BCE\u9BD0\u9BD7\u9BD8\u9BDD\u9BDF\u9BE5\u9BE7\u9BEA\u9BEB\u9BEF\u9BF3\u9BF7\u9BF8"],["8feba1","\u9BF9\u9BFA\u9BFD\u9BFF\u9C00\u9C02\u9C0B\u9C0F\u9C11\u9C16\u9C18\u9C19\u9C1A\u9C1C\u9C1E\u9C22\u9C23\u9C26",4,"\u9C31\u9C35\u9C36\u9C37\u9C3D\u9C41\u9C43\u9C44\u9C45\u9C49\u9C4A\u9C4E\u9C4F\u9C50\u9C53\u9C54\u9C56\u9C58\u9C5B\u9C5D\u9C5E\u9C5F\u9C63\u9C69\u9C6A\u9C5C\u9C6B\u9C68\u9C6E\u9C70\u9C72\u9C75\u9C77\u9C7B\u9CE6\u9CF2\u9CF7\u9CF9\u9D0B\u9D02\u9D11\u9D17\u9D18\u9D1C\u9D1D\u9D1E\u9D2F\u9D30\u9D32\u9D33\u9D34\u9D3A\u9D3C\u9D45\u9D3D\u9D42\u9D43\u9D47\u9D4A\u9D53\u9D54\u9D5F\u9D63\u9D62\u9D65\u9D69\u9D6A\u9D6B\u9D70\u9D76\u9D77\u9D7B"],["8feca1","\u9D7C\u9D7E\u9D83\u9D84\u9D86\u9D8A\u9D8D\u9D8E\u9D92\u9D93\u9D95\u9D96\u9D97\u9D98\u9DA1\u9DAA\u9DAC\u9DAE\u9DB1\u9DB5\u9DB9\u9DBC\u9DBF\u9DC3\u9DC7\u9DC9\u9DCA\u9DD4\u9DD5\u9DD6\u9DD7\u9DDA\u9DDE\u9DDF\u9DE0\u9DE5\u9DE7\u9DE9\u9DEB\u9DEE\u9DF0\u9DF3\u9DF4\u9DFE\u9E0A\u9E02\u9E07\u9E0E\u9E10\u9E11\u9E12\u9E15\u9E16\u9E19\u9E1C\u9E1D\u9E7A\u9E7B\u9E7C\u9E80\u9E82\u9E83\u9E84\u9E85\u9E87\u9E8E\u9E8F\u9E96\u9E98\u9E9B\u9E9E\u9EA4\u9EA8\u9EAC\u9EAE\u9EAF\u9EB0\u9EB3\u9EB4\u9EB5\u9EC6\u9EC8\u9ECB\u9ED5\u9EDF\u9EE4\u9EE7\u9EEC\u9EED\u9EEE\u9EF0\u9EF1\u9EF2\u9EF5"],["8feda1","\u9EF8\u9EFF\u9F02\u9F03\u9F09\u9F0F\u9F10\u9F11\u9F12\u9F14\u9F16\u9F17\u9F19\u9F1A\u9F1B\u9F1F\u9F22\u9F26\u9F2A\u9F2B\u9F2F\u9F31\u9F32\u9F34\u9F37\u9F39\u9F3A\u9F3C\u9F3D\u9F3F\u9F41\u9F43",4,"\u9F53\u9F55\u9F56\u9F57\u9F58\u9F5A\u9F5D\u9F5E\u9F68\u9F69\u9F6D",4,"\u9F73\u9F75\u9F7A\u9F7D\u9F8F\u9F90\u9F91\u9F92\u9F94\u9F96\u9F97\u9F9E\u9FA1\u9FA2\u9FA3\u9FA5"]]});var hY0=o((lM7,hV9)=>{hV9.exports=[["0","\x00",127,"\u20AC"],["8140","\u4E02\u4E04\u4E05\u4E06\u4E0F\u4E12\u4E17\u4E1F\u4E20\u4E21\u4E23\u4E26\u4E29\u4E2E\u4E2F\u4E31\u4E33\u4E35\u4E37\u4E3C\u4E40\u4E41\u4E42\u4E44\u4E46\u4E4A\u4E51\u4E55\u4E57\u4E5A\u4E5B\u4E62\u4E63\u4E64\u4E65\u4E67\u4E68\u4E6A",5,"\u4E72\u4E74",9,"\u4E7F",6,"\u4E87\u4E8A"],["8180","\u4E90\u4E96\u4E97\u4E99\u4E9C\u4E9D\u4E9E\u4EA3\u4EAA\u4EAF\u4EB0\u4EB1\u4EB4\u4EB6\u4EB7\u4EB8\u4EB9\u4EBC\u4EBD\u4EBE\u4EC8\u4ECC\u4ECF\u4ED0\u4ED2\u4EDA\u4EDB\u4EDC\u4EE0\u4EE2\u4EE6\u4EE7\u4EE9\u4EED\u4EEE\u4EEF\u4EF1\u4EF4\u4EF8\u4EF9\u4EFA\u4EFC\u4EFE\u4F00\u4F02",6,"\u4F0B\u4F0C\u4F12",4,"\u4F1C\u4F1D\u4F21\u4F23\u4F28\u4F29\u4F2C\u4F2D\u4F2E\u4F31\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E",4,"\u4F44\u4F45\u4F47",5,"\u4F52\u4F54\u4F56\u4F61\u4F62\u4F66\u4F68\u4F6A\u4F6B\u4F6D\u4F6E\u4F71\u4F72\u4F75\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F80\u4F81\u4F82\u4F85\u4F86\u4F87\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F95\u4F96\u4F98\u4F99\u4F9A\u4F9C\u4F9E\u4F9F\u4FA1\u4FA2"],["8240","\u4FA4\u4FAB\u4FAD\u4FB0",4,"\u4FB6",8,"\u4FC0\u4FC1\u4FC2\u4FC6\u4FC7\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FD2",4,"\u4FD9\u4FDB\u4FE0\u4FE2\u4FE4\u4FE5\u4FE7\u4FEB\u4FEC\u4FF0\u4FF2\u4FF4\u4FF5\u4FF6\u4FF7\u4FF9\u4FFB\u4FFC\u4FFD\u4FFF",11],["8280","\u500B\u500E\u5010\u5011\u5013\u5015\u5016\u5017\u501B\u501D\u501E\u5020\u5022\u5023\u5024\u5027\u502B\u502F",10,"\u503B\u503D\u503F\u5040\u5041\u5042\u5044\u5045\u5046\u5049\u504A\u504B\u504D\u5050",4,"\u5056\u5057\u5058\u5059\u505B\u505D",7,"\u5066",5,"\u506D",8,"\u5078\u5079\u507A\u507C\u507D\u5081\u5082\u5083\u5084\u5086\u5087\u5089\u508A\u508B\u508C\u508E",20,"\u50A4\u50A6\u50AA\u50AB\u50AD",4,"\u50B3",6,"\u50BC"],["8340","\u50BD",17,"\u50D0",5,"\u50D7\u50D8\u50D9\u50DB",10,"\u50E8\u50E9\u50EA\u50EB\u50EF\u50F0\u50F1\u50F2\u50F4\u50F6",4,"\u50FC",9,"\u5108"],["8380","\u5109\u510A\u510C",5,"\u5113",13,"\u5122",28,"\u5142\u5147\u514A\u514C\u514E\u514F\u5150\u5152\u5153\u5157\u5158\u5159\u515B\u515D",4,"\u5163\u5164\u5166\u5167\u5169\u516A\u516F\u5172\u517A\u517E\u517F\u5183\u5184\u5186\u5187\u518A\u518B\u518E\u518F\u5190\u5191\u5193\u5194\u5198\u519A\u519D\u519E\u519F\u51A1\u51A3\u51A6",4,"\u51AD\u51AE\u51B4\u51B8\u51B9\u51BA\u51BE\u51BF\u51C1\u51C2\u51C3\u51C5\u51C8\u51CA\u51CD\u51CE\u51D0\u51D2",5],["8440","\u51D8\u51D9\u51DA\u51DC\u51DE\u51DF\u51E2\u51E3\u51E5",5,"\u51EC\u51EE\u51F1\u51F2\u51F4\u51F7\u51FE\u5204\u5205\u5209\u520B\u520C\u520F\u5210\u5213\u5214\u5215\u521C\u521E\u521F\u5221\u5222\u5223\u5225\u5226\u5227\u522A\u522C\u522F\u5231\u5232\u5234\u5235\u523C\u523E\u5244",5,"\u524B\u524E\u524F\u5252\u5253\u5255\u5257\u5258"],["8480","\u5259\u525A\u525B\u525D\u525F\u5260\u5262\u5263\u5264\u5266\u5268\u526B\u526C\u526D\u526E\u5270\u5271\u5273",9,"\u527E\u5280\u5283",4,"\u5289",6,"\u5291\u5292\u5294",6,"\u529C\u52A4\u52A5\u52A6\u52A7\u52AE\u52AF\u52B0\u52B4",9,"\u52C0\u52C1\u52C2\u52C4\u52C5\u52C6\u52C8\u52CA\u52CC\u52CD\u52CE\u52CF\u52D1\u52D3\u52D4\u52D5\u52D7\u52D9",5,"\u52E0\u52E1\u52E2\u52E3\u52E5",10,"\u52F1",7,"\u52FB\u52FC\u52FD\u5301\u5302\u5303\u5304\u5307\u5309\u530A\u530B\u530C\u530E"],["8540","\u5311\u5312\u5313\u5314\u5318\u531B\u531C\u531E\u531F\u5322\u5324\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u532F",9,"\u533C\u533D\u5340\u5342\u5344\u5346\u534B\u534C\u534D\u5350\u5354\u5358\u5359\u535B\u535D\u5365\u5368\u536A\u536C\u536D\u5372\u5376\u5379\u537B\u537C\u537D\u537E\u5380\u5381\u5383\u5387\u5388\u538A\u538E\u538F"],["8580","\u5390",4,"\u5396\u5397\u5399\u539B\u539C\u539E\u53A0\u53A1\u53A4\u53A7\u53AA\u53AB\u53AC\u53AD\u53AF",6,"\u53B7\u53B8\u53B9\u53BA\u53BC\u53BD\u53BE\u53C0\u53C3",4,"\u53CE\u53CF\u53D0\u53D2\u53D3\u53D5\u53DA\u53DC\u53DD\u53DE\u53E1\u53E2\u53E7\u53F4\u53FA\u53FE\u53FF\u5400\u5402\u5405\u5407\u540B\u5414\u5418\u5419\u541A\u541C\u5422\u5424\u5425\u542A\u5430\u5433\u5436\u5437\u543A\u543D\u543F\u5441\u5442\u5444\u5445\u5447\u5449\u544C\u544D\u544E\u544F\u5451\u545A\u545D",4,"\u5463\u5465\u5467\u5469",7,"\u5474\u5479\u547A\u547E\u547F\u5481\u5483\u5485\u5487\u5488\u5489\u548A\u548D\u5491\u5493\u5497\u5498\u549C\u549E\u549F\u54A0\u54A1"],["8640","\u54A2\u54A5\u54AE\u54B0\u54B2\u54B5\u54B6\u54B7\u54B9\u54BA\u54BC\u54BE\u54C3\u54C5\u54CA\u54CB\u54D6\u54D8\u54DB\u54E0",4,"\u54EB\u54EC\u54EF\u54F0\u54F1\u54F4",5,"\u54FB\u54FE\u5500\u5502\u5503\u5504\u5505\u5508\u550A",4,"\u5512\u5513\u5515",5,"\u551C\u551D\u551E\u551F\u5521\u5525\u5526"],["8680","\u5528\u5529\u552B\u552D\u5532\u5534\u5535\u5536\u5538\u5539\u553A\u553B\u553D\u5540\u5542\u5545\u5547\u5548\u554B",4,"\u5551\u5552\u5553\u5554\u5557",4,"\u555D\u555E\u555F\u5560\u5562\u5563\u5568\u5569\u556B\u556F",5,"\u5579\u557A\u557D\u557F\u5585\u5586\u558C\u558D\u558E\u5590\u5592\u5593\u5595\u5596\u5597\u559A\u559B\u559E\u55A0",6,"\u55A8",8,"\u55B2\u55B4\u55B6\u55B8\u55BA\u55BC\u55BF",4,"\u55C6\u55C7\u55C8\u55CA\u55CB\u55CE\u55CF\u55D0\u55D5\u55D7",4,"\u55DE\u55E0\u55E2\u55E7\u55E9\u55ED\u55EE\u55F0\u55F1\u55F4\u55F6\u55F8",4,"\u55FF\u5602\u5603\u5604\u5605"],["8740","\u5606\u5607\u560A\u560B\u560D\u5610",7,"\u5619\u561A\u561C\u561D\u5620\u5621\u5622\u5625\u5626\u5628\u5629\u562A\u562B\u562E\u562F\u5630\u5633\u5635\u5637\u5638\u563A\u563C\u563D\u563E\u5640",11,"\u564F",4,"\u5655\u5656\u565A\u565B\u565D",4],["8780","\u5663\u5665\u5666\u5667\u566D\u566E\u566F\u5670\u5672\u5673\u5674\u5675\u5677\u5678\u5679\u567A\u567D",7,"\u5687",6,"\u5690\u5691\u5692\u5694",14,"\u56A4",10,"\u56B0",6,"\u56B8\u56B9\u56BA\u56BB\u56BD",12,"\u56CB",8,"\u56D5\u56D6\u56D8\u56D9\u56DC\u56E3\u56E5",5,"\u56EC\u56EE\u56EF\u56F2\u56F3\u56F6\u56F7\u56F8\u56FB\u56FC\u5700\u5701\u5702\u5705\u5707\u570B",6],["8840","\u5712",9,"\u571D\u571E\u5720\u5721\u5722\u5724\u5725\u5726\u5727\u572B\u5731\u5732\u5734",4,"\u573C\u573D\u573F\u5741\u5743\u5744\u5745\u5746\u5748\u5749\u574B\u5752",4,"\u5758\u5759\u5762\u5763\u5765\u5767\u576C\u576E\u5770\u5771\u5772\u5774\u5775\u5778\u5779\u577A\u577D\u577E\u577F\u5780"],["8880","\u5781\u5787\u5788\u5789\u578A\u578D",4,"\u5794",6,"\u579C\u579D\u579E\u579F\u57A5\u57A8\u57AA\u57AC\u57AF\u57B0\u57B1\u57B3\u57B5\u57B6\u57B7\u57B9",8,"\u57C4",6,"\u57CC\u57CD\u57D0\u57D1\u57D3\u57D6\u57D7\u57DB\u57DC\u57DE\u57E1\u57E2\u57E3\u57E5",7,"\u57EE\u57F0\u57F1\u57F2\u57F3\u57F5\u57F6\u57F7\u57FB\u57FC\u57FE\u57FF\u5801\u5803\u5804\u5805\u5808\u5809\u580A\u580C\u580E\u580F\u5810\u5812\u5813\u5814\u5816\u5817\u5818\u581A\u581B\u581C\u581D\u581F\u5822\u5823\u5825",4,"\u582B",4,"\u5831\u5832\u5833\u5834\u5836",7],["8940","\u583E",5,"\u5845",6,"\u584E\u584F\u5850\u5852\u5853\u5855\u5856\u5857\u5859",4,"\u585F",5,"\u5866",4,"\u586D",16,"\u587F\u5882\u5884\u5886\u5887\u5888\u588A\u588B\u588C"],["8980","\u588D",4,"\u5894",4,"\u589B\u589C\u589D\u58A0",7,"\u58AA",17,"\u58BD\u58BE\u58BF\u58C0\u58C2\u58C3\u58C4\u58C6",10,"\u58D2\u58D3\u58D4\u58D6",13,"\u58E5",5,"\u58ED\u58EF\u58F1\u58F2\u58F4\u58F5\u58F7\u58F8\u58FA",7,"\u5903\u5905\u5906\u5908",4,"\u590E\u5910\u5911\u5912\u5913\u5917\u5918\u591B\u591D\u591E\u5920\u5921\u5922\u5923\u5926\u5928\u592C\u5930\u5932\u5933\u5935\u5936\u593B"],["8a40","\u593D\u593E\u593F\u5940\u5943\u5945\u5946\u594A\u594C\u594D\u5950\u5952\u5953\u5959\u595B",4,"\u5961\u5963\u5964\u5966",12,"\u5975\u5977\u597A\u597B\u597C\u597E\u597F\u5980\u5985\u5989\u598B\u598C\u598E\u598F\u5990\u5991\u5994\u5995\u5998\u599A\u599B\u599C\u599D\u599F\u59A0\u59A1\u59A2\u59A6"],["8a80","\u59A7\u59AC\u59AD\u59B0\u59B1\u59B3",5,"\u59BA\u59BC\u59BD\u59BF",6,"\u59C7\u59C8\u59C9\u59CC\u59CD\u59CE\u59CF\u59D5\u59D6\u59D9\u59DB\u59DE",4,"\u59E4\u59E6\u59E7\u59E9\u59EA\u59EB\u59ED",11,"\u59FA\u59FC\u59FD\u59FE\u5A00\u5A02\u5A0A\u5A0B\u5A0D\u5A0E\u5A0F\u5A10\u5A12\u5A14\u5A15\u5A16\u5A17\u5A19\u5A1A\u5A1B\u5A1D\u5A1E\u5A21\u5A22\u5A24\u5A26\u5A27\u5A28\u5A2A",6,"\u5A33\u5A35\u5A37",4,"\u5A3D\u5A3E\u5A3F\u5A41",4,"\u5A47\u5A48\u5A4B",9,"\u5A56\u5A57\u5A58\u5A59\u5A5B",5],["8b40","\u5A61\u5A63\u5A64\u5A65\u5A66\u5A68\u5A69\u5A6B",8,"\u5A78\u5A79\u5A7B\u5A7C\u5A7D\u5A7E\u5A80",17,"\u5A93",6,"\u5A9C",13,"\u5AAB\u5AAC"],["8b80","\u5AAD",4,"\u5AB4\u5AB6\u5AB7\u5AB9",4,"\u5ABF\u5AC0\u5AC3",5,"\u5ACA\u5ACB\u5ACD",4,"\u5AD3\u5AD5\u5AD7\u5AD9\u5ADA\u5ADB\u5ADD\u5ADE\u5ADF\u5AE2\u5AE4\u5AE5\u5AE7\u5AE8\u5AEA\u5AEC",4,"\u5AF2",22,"\u5B0A",11,"\u5B18",25,"\u5B33\u5B35\u5B36\u5B38",7,"\u5B41",6],["8c40","\u5B48",7,"\u5B52\u5B56\u5B5E\u5B60\u5B61\u5B67\u5B68\u5B6B\u5B6D\u5B6E\u5B6F\u5B72\u5B74\u5B76\u5B77\u5B78\u5B79\u5B7B\u5B7C\u5B7E\u5B7F\u5B82\u5B86\u5B8A\u5B8D\u5B8E\u5B90\u5B91\u5B92\u5B94\u5B96\u5B9F\u5BA7\u5BA8\u5BA9\u5BAC\u5BAD\u5BAE\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBB\u5BBC\u5BC0\u5BC1\u5BC3\u5BC8\u5BC9\u5BCA\u5BCB\u5BCD\u5BCE\u5BCF"],["8c80","\u5BD1\u5BD4",8,"\u5BE0\u5BE2\u5BE3\u5BE6\u5BE7\u5BE9",4,"\u5BEF\u5BF1",6,"\u5BFD\u5BFE\u5C00\u5C02\u5C03\u5C05\u5C07\u5C08\u5C0B\u5C0C\u5C0D\u5C0E\u5C10\u5C12\u5C13\u5C17\u5C19\u5C1B\u5C1E\u5C1F\u5C20\u5C21\u5C23\u5C26\u5C28\u5C29\u5C2A\u5C2B\u5C2D\u5C2E\u5C2F\u5C30\u5C32\u5C33\u5C35\u5C36\u5C37\u5C43\u5C44\u5C46\u5C47\u5C4C\u5C4D\u5C52\u5C53\u5C54\u5C56\u5C57\u5C58\u5C5A\u5C5B\u5C5C\u5C5D\u5C5F\u5C62\u5C64\u5C67",6,"\u5C70\u5C72",6,"\u5C7B\u5C7C\u5C7D\u5C7E\u5C80\u5C83",4,"\u5C89\u5C8A\u5C8B\u5C8E\u5C8F\u5C92\u5C93\u5C95\u5C9D",4,"\u5CA4",4],["8d40","\u5CAA\u5CAE\u5CAF\u5CB0\u5CB2\u5CB4\u5CB6\u5CB9\u5CBA\u5CBB\u5CBC\u5CBE\u5CC0\u5CC2\u5CC3\u5CC5",5,"\u5CCC",5,"\u5CD3",5,"\u5CDA",6,"\u5CE2\u5CE3\u5CE7\u5CE9\u5CEB\u5CEC\u5CEE\u5CEF\u5CF1",9,"\u5CFC",4],["8d80","\u5D01\u5D04\u5D05\u5D08",5,"\u5D0F",4,"\u5D15\u5D17\u5D18\u5D19\u5D1A\u5D1C\u5D1D\u5D1F",4,"\u5D25\u5D28\u5D2A\u5D2B\u5D2C\u5D2F",4,"\u5D35",7,"\u5D3F",7,"\u5D48\u5D49\u5D4D",10,"\u5D59\u5D5A\u5D5C\u5D5E",10,"\u5D6A\u5D6D\u5D6E\u5D70\u5D71\u5D72\u5D73\u5D75",12,"\u5D83",21,"\u5D9A\u5D9B\u5D9C\u5D9E\u5D9F\u5DA0"],["8e40","\u5DA1",21,"\u5DB8",12,"\u5DC6",6,"\u5DCE",12,"\u5DDC\u5DDF\u5DE0\u5DE3\u5DE4\u5DEA\u5DEC\u5DED"],["8e80","\u5DF0\u5DF5\u5DF6\u5DF8",4,"\u5DFF\u5E00\u5E04\u5E07\u5E09\u5E0A\u5E0B\u5E0D\u5E0E\u5E12\u5E13\u5E17\u5E1E",7,"\u5E28",4,"\u5E2F\u5E30\u5E32",4,"\u5E39\u5E3A\u5E3E\u5E3F\u5E40\u5E41\u5E43\u5E46",5,"\u5E4D",6,"\u5E56",4,"\u5E5C\u5E5D\u5E5F\u5E60\u5E63",14,"\u5E75\u5E77\u5E79\u5E7E\u5E81\u5E82\u5E83\u5E85\u5E88\u5E89\u5E8C\u5E8D\u5E8E\u5E92\u5E98\u5E9B\u5E9D\u5EA1\u5EA2\u5EA3\u5EA4\u5EA8",4,"\u5EAE",4,"\u5EB4\u5EBA\u5EBB\u5EBC\u5EBD\u5EBF",6],["8f40","\u5EC6\u5EC7\u5EC8\u5ECB",5,"\u5ED4\u5ED5\u5ED7\u5ED8\u5ED9\u5EDA\u5EDC",11,"\u5EE9\u5EEB",8,"\u5EF5\u5EF8\u5EF9\u5EFB\u5EFC\u5EFD\u5F05\u5F06\u5F07\u5F09\u5F0C\u5F0D\u5F0E\u5F10\u5F12\u5F14\u5F16\u5F19\u5F1A\u5F1C\u5F1D\u5F1E\u5F21\u5F22\u5F23\u5F24"],["8f80","\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F32",6,"\u5F3B\u5F3D\u5F3E\u5F3F\u5F41",14,"\u5F51\u5F54\u5F59\u5F5A\u5F5B\u5F5C\u5F5E\u5F5F\u5F60\u5F63\u5F65\u5F67\u5F68\u5F6B\u5F6E\u5F6F\u5F72\u5F74\u5F75\u5F76\u5F78\u5F7A\u5F7D\u5F7E\u5F7F\u5F83\u5F86\u5F8D\u5F8E\u5F8F\u5F91\u5F93\u5F94\u5F96\u5F9A\u5F9B\u5F9D\u5F9E\u5F9F\u5FA0\u5FA2",5,"\u5FA9\u5FAB\u5FAC\u5FAF",5,"\u5FB6\u5FB8\u5FB9\u5FBA\u5FBB\u5FBE",4,"\u5FC7\u5FC8\u5FCA\u5FCB\u5FCE\u5FD3\u5FD4\u5FD5\u5FDA\u5FDB\u5FDC\u5FDE\u5FDF\u5FE2\u5FE3\u5FE5\u5FE6\u5FE8\u5FE9\u5FEC\u5FEF\u5FF0\u5FF2\u5FF3\u5FF4\u5FF6\u5FF7\u5FF9\u5FFA\u5FFC\u6007"],["9040","\u6008\u6009\u600B\u600C\u6010\u6011\u6013\u6017\u6018\u601A\u601E\u601F\u6022\u6023\u6024\u602C\u602D\u602E\u6030",4,"\u6036",4,"\u603D\u603E\u6040\u6044",6,"\u604C\u604E\u604F\u6051\u6053\u6054\u6056\u6057\u6058\u605B\u605C\u605E\u605F\u6060\u6061\u6065\u6066\u606E\u6071\u6072\u6074\u6075\u6077\u607E\u6080"],["9080","\u6081\u6082\u6085\u6086\u6087\u6088\u608A\u608B\u608E\u608F\u6090\u6091\u6093\u6095\u6097\u6098\u6099\u609C\u609E\u60A1\u60A2\u60A4\u60A5\u60A7\u60A9\u60AA\u60AE\u60B0\u60B3\u60B5\u60B6\u60B7\u60B9\u60BA\u60BD",7,"\u60C7\u60C8\u60C9\u60CC",4,"\u60D2\u60D3\u60D4\u60D6\u60D7\u60D9\u60DB\u60DE\u60E1",4,"\u60EA\u60F1\u60F2\u60F5\u60F7\u60F8\u60FB",4,"\u6102\u6103\u6104\u6105\u6107\u610A\u610B\u610C\u6110",4,"\u6116\u6117\u6118\u6119\u611B\u611C\u611D\u611E\u6121\u6122\u6125\u6128\u6129\u612A\u612C",18,"\u6140",6],["9140","\u6147\u6149\u614B\u614D\u614F\u6150\u6152\u6153\u6154\u6156",6,"\u615E\u615F\u6160\u6161\u6163\u6164\u6165\u6166\u6169",6,"\u6171\u6172\u6173\u6174\u6176\u6178",18,"\u618C\u618D\u618F",4,"\u6195"],["9180","\u6196",6,"\u619E",8,"\u61AA\u61AB\u61AD",9,"\u61B8",5,"\u61BF\u61C0\u61C1\u61C3",4,"\u61C9\u61CC",4,"\u61D3\u61D5",16,"\u61E7",13,"\u61F6",8,"\u6200",5,"\u6207\u6209\u6213\u6214\u6219\u621C\u621D\u621E\u6220\u6223\u6226\u6227\u6228\u6229\u622B\u622D\u622F\u6230\u6231\u6232\u6235\u6236\u6238",4,"\u6242\u6244\u6245\u6246\u624A"],["9240","\u624F\u6250\u6255\u6256\u6257\u6259\u625A\u625C",6,"\u6264\u6265\u6268\u6271\u6272\u6274\u6275\u6277\u6278\u627A\u627B\u627D\u6281\u6282\u6283\u6285\u6286\u6287\u6288\u628B",5,"\u6294\u6299\u629C\u629D\u629E\u62A3\u62A6\u62A7\u62A9\u62AA\u62AD\u62AE\u62AF\u62B0\u62B2\u62B3\u62B4\u62B6\u62B7\u62B8\u62BA\u62BE\u62C0\u62C1"],["9280","\u62C3\u62CB\u62CF\u62D1\u62D5\u62DD\u62DE\u62E0\u62E1\u62E4\u62EA\u62EB\u62F0\u62F2\u62F5\u62F8\u62F9\u62FA\u62FB\u6300\u6303\u6304\u6305\u6306\u630A\u630B\u630C\u630D\u630F\u6310\u6312\u6313\u6314\u6315\u6317\u6318\u6319\u631C\u6326\u6327\u6329\u632C\u632D\u632E\u6330\u6331\u6333",5,"\u633B\u633C\u633E\u633F\u6340\u6341\u6344\u6347\u6348\u634A\u6351\u6352\u6353\u6354\u6356",7,"\u6360\u6364\u6365\u6366\u6368\u636A\u636B\u636C\u636F\u6370\u6372\u6373\u6374\u6375\u6378\u6379\u637C\u637D\u637E\u637F\u6381\u6383\u6384\u6385\u6386\u638B\u638D\u6391\u6393\u6394\u6395\u6397\u6399",6,"\u63A1\u63A4\u63A6\u63AB\u63AF\u63B1\u63B2\u63B5\u63B6\u63B9\u63BB\u63BD\u63BF\u63C0"],["9340","\u63C1\u63C2\u63C3\u63C5\u63C7\u63C8\u63CA\u63CB\u63CC\u63D1\u63D3\u63D4\u63D5\u63D7",6,"\u63DF\u63E2\u63E4",4,"\u63EB\u63EC\u63EE\u63EF\u63F0\u63F1\u63F3\u63F5\u63F7\u63F9\u63FA\u63FB\u63FC\u63FE\u6403\u6404\u6406",4,"\u640D\u640E\u6411\u6412\u6415",5,"\u641D\u641F\u6422\u6423\u6424"],["9380","\u6425\u6427\u6428\u6429\u642B\u642E",5,"\u6435",4,"\u643B\u643C\u643E\u6440\u6442\u6443\u6449\u644B",6,"\u6453\u6455\u6456\u6457\u6459",4,"\u645F",7,"\u6468\u646A\u646B\u646C\u646E",9,"\u647B",6,"\u6483\u6486\u6488",8,"\u6493\u6494\u6497\u6498\u649A\u649B\u649C\u649D\u649F",4,"\u64A5\u64A6\u64A7\u64A8\u64AA\u64AB\u64AF\u64B1\u64B2\u64B3\u64B4\u64B6\u64B9\u64BB\u64BD\u64BE\u64BF\u64C1\u64C3\u64C4\u64C6",6,"\u64CF\u64D1\u64D3\u64D4\u64D5\u64D6\u64D9\u64DA"],["9440","\u64DB\u64DC\u64DD\u64DF\u64E0\u64E1\u64E3\u64E5\u64E7",24,"\u6501",7,"\u650A",7,"\u6513",4,"\u6519",8],["9480","\u6522\u6523\u6524\u6526",4,"\u652C\u652D\u6530\u6531\u6532\u6533\u6537\u653A\u653C\u653D\u6540",4,"\u6546\u6547\u654A\u654B\u654D\u654E\u6550\u6552\u6553\u6554\u6557\u6558\u655A\u655C\u655F\u6560\u6561\u6564\u6565\u6567\u6568\u6569\u656A\u656D\u656E\u656F\u6571\u6573\u6575\u6576\u6578",14,"\u6588\u6589\u658A\u658D\u658E\u658F\u6592\u6594\u6595\u6596\u6598\u659A\u659D\u659E\u65A0\u65A2\u65A3\u65A6\u65A8\u65AA\u65AC\u65AE\u65B1",7,"\u65BA\u65BB\u65BE\u65BF\u65C0\u65C2\u65C7\u65C8\u65C9\u65CA\u65CD\u65D0\u65D1\u65D3\u65D4\u65D5\u65D8",7,"\u65E1\u65E3\u65E4\u65EA\u65EB"],["9540","\u65F2\u65F3\u65F4\u65F5\u65F8\u65F9\u65FB",4,"\u6601\u6604\u6605\u6607\u6608\u6609\u660B\u660D\u6610\u6611\u6612\u6616\u6617\u6618\u661A\u661B\u661C\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6632\u6633\u6637",4,"\u663D\u663F\u6640\u6642\u6644",6,"\u664D\u664E\u6650\u6651\u6658"],["9580","\u6659\u665B\u665C\u665D\u665E\u6660\u6662\u6663\u6665\u6667\u6669",4,"\u6671\u6672\u6673\u6675\u6678\u6679\u667B\u667C\u667D\u667F\u6680\u6681\u6683\u6685\u6686\u6688\u6689\u668A\u668B\u668D\u668E\u668F\u6690\u6692\u6693\u6694\u6695\u6698",4,"\u669E",8,"\u66A9",4,"\u66AF",4,"\u66B5\u66B6\u66B7\u66B8\u66BA\u66BB\u66BC\u66BD\u66BF",25,"\u66DA\u66DE",7,"\u66E7\u66E8\u66EA",5,"\u66F1\u66F5\u66F6\u66F8\u66FA\u66FB\u66FD\u6701\u6702\u6703"],["9640","\u6704\u6705\u6706\u6707\u670C\u670E\u670F\u6711\u6712\u6713\u6716\u6718\u6719\u671A\u671C\u671E\u6720",5,"\u6727\u6729\u672E\u6730\u6732\u6733\u6736\u6737\u6738\u6739\u673B\u673C\u673E\u673F\u6741\u6744\u6745\u6747\u674A\u674B\u674D\u6752\u6754\u6755\u6757",4,"\u675D\u6762\u6763\u6764\u6766\u6767\u676B\u676C\u676E\u6771\u6774\u6776"],["9680","\u6778\u6779\u677A\u677B\u677D\u6780\u6782\u6783\u6785\u6786\u6788\u678A\u678C\u678D\u678E\u678F\u6791\u6792\u6793\u6794\u6796\u6799\u679B\u679F\u67A0\u67A1\u67A4\u67A6\u67A9\u67AC\u67AE\u67B1\u67B2\u67B4\u67B9",7,"\u67C2\u67C5",9,"\u67D5\u67D6\u67D7\u67DB\u67DF\u67E1\u67E3\u67E4\u67E6\u67E7\u67E8\u67EA\u67EB\u67ED\u67EE\u67F2\u67F5",7,"\u67FE\u6801\u6802\u6803\u6804\u6806\u680D\u6810\u6812\u6814\u6815\u6818",4,"\u681E\u681F\u6820\u6822",6,"\u682B",6,"\u6834\u6835\u6836\u683A\u683B\u683F\u6847\u684B\u684D\u684F\u6852\u6856",5],["9740","\u685C\u685D\u685E\u685F\u686A\u686C",7,"\u6875\u6878",8,"\u6882\u6884\u6887",7,"\u6890\u6891\u6892\u6894\u6895\u6896\u6898",9,"\u68A3\u68A4\u68A5\u68A9\u68AA\u68AB\u68AC\u68AE\u68B1\u68B2\u68B4\u68B6\u68B7\u68B8"],["9780","\u68B9",6,"\u68C1\u68C3",5,"\u68CA\u68CC\u68CE\u68CF\u68D0\u68D1\u68D3\u68D4\u68D6\u68D7\u68D9\u68DB",4,"\u68E1\u68E2\u68E4",9,"\u68EF\u68F2\u68F3\u68F4\u68F6\u68F7\u68F8\u68FB\u68FD\u68FE\u68FF\u6900\u6902\u6903\u6904\u6906",4,"\u690C\u690F\u6911\u6913",11,"\u6921\u6922\u6923\u6925",7,"\u692E\u692F\u6931\u6932\u6933\u6935\u6936\u6937\u6938\u693A\u693B\u693C\u693E\u6940\u6941\u6943",16,"\u6955\u6956\u6958\u6959\u695B\u695C\u695F"],["9840","\u6961\u6962\u6964\u6965\u6967\u6968\u6969\u696A\u696C\u696D\u696F\u6970\u6972",4,"\u697A\u697B\u697D\u697E\u697F\u6981\u6983\u6985\u698A\u698B\u698C\u698E",5,"\u6996\u6997\u6999\u699A\u699D",9,"\u69A9\u69AA\u69AC\u69AE\u69AF\u69B0\u69B2\u69B3\u69B5\u69B6\u69B8\u69B9\u69BA\u69BC\u69BD"],["9880","\u69BE\u69BF\u69C0\u69C2",7,"\u69CB\u69CD\u69CF\u69D1\u69D2\u69D3\u69D5",5,"\u69DC\u69DD\u69DE\u69E1",11,"\u69EE\u69EF\u69F0\u69F1\u69F3",9,"\u69FE\u6A00",9,"\u6A0B",11,"\u6A19",5,"\u6A20\u6A22",5,"\u6A29\u6A2B\u6A2C\u6A2D\u6A2E\u6A30\u6A32\u6A33\u6A34\u6A36",6,"\u6A3F",4,"\u6A45\u6A46\u6A48",7,"\u6A51",6,"\u6A5A"],["9940","\u6A5C",4,"\u6A62\u6A63\u6A64\u6A66",10,"\u6A72",6,"\u6A7A\u6A7B\u6A7D\u6A7E\u6A7F\u6A81\u6A82\u6A83\u6A85",8,"\u6A8F\u6A92",4,"\u6A98",7,"\u6AA1",5],["9980","\u6AA7\u6AA8\u6AAA\u6AAD",114,"\u6B25\u6B26\u6B28",6],["9a40","\u6B2F\u6B30\u6B31\u6B33\u6B34\u6B35\u6B36\u6B38\u6B3B\u6B3C\u6B3D\u6B3F\u6B40\u6B41\u6B42\u6B44\u6B45\u6B48\u6B4A\u6B4B\u6B4D",11,"\u6B5A",7,"\u6B68\u6B69\u6B6B",13,"\u6B7A\u6B7D\u6B7E\u6B7F\u6B80\u6B85\u6B88"],["9a80","\u6B8C\u6B8E\u6B8F\u6B90\u6B91\u6B94\u6B95\u6B97\u6B98\u6B99\u6B9C",4,"\u6BA2",7,"\u6BAB",7,"\u6BB6\u6BB8",6,"\u6BC0\u6BC3\u6BC4\u6BC6",4,"\u6BCC\u6BCE\u6BD0\u6BD1\u6BD8\u6BDA\u6BDC",4,"\u6BE2",7,"\u6BEC\u6BED\u6BEE\u6BF0\u6BF1\u6BF2\u6BF4\u6BF6\u6BF7\u6BF8\u6BFA\u6BFB\u6BFC\u6BFE",6,"\u6C08",4,"\u6C0E\u6C12\u6C17\u6C1C\u6C1D\u6C1E\u6C20\u6C23\u6C25\u6C2B\u6C2C\u6C2D\u6C31\u6C33\u6C36\u6C37\u6C39\u6C3A\u6C3B\u6C3C\u6C3E\u6C3F\u6C43\u6C44\u6C45\u6C48\u6C4B",4,"\u6C51\u6C52\u6C53\u6C56\u6C58"],["9b40","\u6C59\u6C5A\u6C62\u6C63\u6C65\u6C66\u6C67\u6C6B",4,"\u6C71\u6C73\u6C75\u6C77\u6C78\u6C7A\u6C7B\u6C7C\u6C7F\u6C80\u6C84\u6C87\u6C8A\u6C8B\u6C8D\u6C8E\u6C91\u6C92\u6C95\u6C96\u6C97\u6C98\u6C9A\u6C9C\u6C9D\u6C9E\u6CA0\u6CA2\u6CA8\u6CAC\u6CAF\u6CB0\u6CB4\u6CB5\u6CB6\u6CB7\u6CBA\u6CC0\u6CC1\u6CC2\u6CC3\u6CC6\u6CC7\u6CC8\u6CCB\u6CCD\u6CCE\u6CCF\u6CD1\u6CD2\u6CD8"],["9b80","\u6CD9\u6CDA\u6CDC\u6CDD\u6CDF\u6CE4\u6CE6\u6CE7\u6CE9\u6CEC\u6CED\u6CF2\u6CF4\u6CF9\u6CFF\u6D00\u6D02\u6D03\u6D05\u6D06\u6D08\u6D09\u6D0A\u6D0D\u6D0F\u6D10\u6D11\u6D13\u6D14\u6D15\u6D16\u6D18\u6D1C\u6D1D\u6D1F",5,"\u6D26\u6D28\u6D29\u6D2C\u6D2D\u6D2F\u6D30\u6D34\u6D36\u6D37\u6D38\u6D3A\u6D3F\u6D40\u6D42\u6D44\u6D49\u6D4C\u6D50\u6D55\u6D56\u6D57\u6D58\u6D5B\u6D5D\u6D5F\u6D61\u6D62\u6D64\u6D65\u6D67\u6D68\u6D6B\u6D6C\u6D6D\u6D70\u6D71\u6D72\u6D73\u6D75\u6D76\u6D79\u6D7A\u6D7B\u6D7D",4,"\u6D83\u6D84\u6D86\u6D87\u6D8A\u6D8B\u6D8D\u6D8F\u6D90\u6D92\u6D96",4,"\u6D9C\u6DA2\u6DA5\u6DAC\u6DAD\u6DB0\u6DB1\u6DB3\u6DB4\u6DB6\u6DB7\u6DB9",5,"\u6DC1\u6DC2\u6DC3\u6DC8\u6DC9\u6DCA"],["9c40","\u6DCD\u6DCE\u6DCF\u6DD0\u6DD2\u6DD3\u6DD4\u6DD5\u6DD7\u6DDA\u6DDB\u6DDC\u6DDF\u6DE2\u6DE3\u6DE5\u6DE7\u6DE8\u6DE9\u6DEA\u6DED\u6DEF\u6DF0\u6DF2\u6DF4\u6DF5\u6DF6\u6DF8\u6DFA\u6DFD",7,"\u6E06\u6E07\u6E08\u6E09\u6E0B\u6E0F\u6E12\u6E13\u6E15\u6E18\u6E19\u6E1B\u6E1C\u6E1E\u6E1F\u6E22\u6E26\u6E27\u6E28\u6E2A\u6E2C\u6E2E\u6E30\u6E31\u6E33\u6E35"],["9c80","\u6E36\u6E37\u6E39\u6E3B",7,"\u6E45",7,"\u6E4F\u6E50\u6E51\u6E52\u6E55\u6E57\u6E59\u6E5A\u6E5C\u6E5D\u6E5E\u6E60",10,"\u6E6C\u6E6D\u6E6F",14,"\u6E80\u6E81\u6E82\u6E84\u6E87\u6E88\u6E8A",4,"\u6E91",6,"\u6E99\u6E9A\u6E9B\u6E9D\u6E9E\u6EA0\u6EA1\u6EA3\u6EA4\u6EA6\u6EA8\u6EA9\u6EAB\u6EAC\u6EAD\u6EAE\u6EB0\u6EB3\u6EB5\u6EB8\u6EB9\u6EBC\u6EBE\u6EBF\u6EC0\u6EC3\u6EC4\u6EC5\u6EC6\u6EC8\u6EC9\u6ECA\u6ECC\u6ECD\u6ECE\u6ED0\u6ED2\u6ED6\u6ED8\u6ED9\u6EDB\u6EDC\u6EDD\u6EE3\u6EE7\u6EEA",5],["9d40","\u6EF0\u6EF1\u6EF2\u6EF3\u6EF5\u6EF6\u6EF7\u6EF8\u6EFA",7,"\u6F03\u6F04\u6F05\u6F07\u6F08\u6F0A",4,"\u6F10\u6F11\u6F12\u6F16",9,"\u6F21\u6F22\u6F23\u6F25\u6F26\u6F27\u6F28\u6F2C\u6F2E\u6F30\u6F32\u6F34\u6F35\u6F37",6,"\u6F3F\u6F40\u6F41\u6F42"],["9d80","\u6F43\u6F44\u6F45\u6F48\u6F49\u6F4A\u6F4C\u6F4E",9,"\u6F59\u6F5A\u6F5B\u6F5D\u6F5F\u6F60\u6F61\u6F63\u6F64\u6F65\u6F67",5,"\u6F6F\u6F70\u6F71\u6F73\u6F75\u6F76\u6F77\u6F79\u6F7B\u6F7D",6,"\u6F85\u6F86\u6F87\u6F8A\u6F8B\u6F8F",12,"\u6F9D\u6F9E\u6F9F\u6FA0\u6FA2",4,"\u6FA8",10,"\u6FB4\u6FB5\u6FB7\u6FB8\u6FBA",5,"\u6FC1\u6FC3",5,"\u6FCA",6,"\u6FD3",10,"\u6FDF\u6FE2\u6FE3\u6FE4\u6FE5"],["9e40","\u6FE6",7,"\u6FF0",32,"\u7012",7,"\u701C",6,"\u7024",6],["9e80","\u702B",9,"\u7036\u7037\u7038\u703A",17,"\u704D\u704E\u7050",13,"\u705F",11,"\u706E\u7071\u7072\u7073\u7074\u7077\u7079\u707A\u707B\u707D\u7081\u7082\u7083\u7084\u7086\u7087\u7088\u708B\u708C\u708D\u708F\u7090\u7091\u7093\u7097\u7098\u709A\u709B\u709E",12,"\u70B0\u70B2\u70B4\u70B5\u70B6\u70BA\u70BE\u70BF\u70C4\u70C5\u70C6\u70C7\u70C9\u70CB",12,"\u70DA"],["9f40","\u70DC\u70DD\u70DE\u70E0\u70E1\u70E2\u70E3\u70E5\u70EA\u70EE\u70F0",6,"\u70F8\u70FA\u70FB\u70FC\u70FE",10,"\u710B",4,"\u7111\u7112\u7114\u7117\u711B",10,"\u7127",7,"\u7132\u7133\u7134"],["9f80","\u7135\u7137",13,"\u7146\u7147\u7148\u7149\u714B\u714D\u714F",12,"\u715D\u715F",4,"\u7165\u7169",4,"\u716F\u7170\u7171\u7174\u7175\u7176\u7177\u7179\u717B\u717C\u717E",5,"\u7185",4,"\u718B\u718C\u718D\u718E\u7190\u7191\u7192\u7193\u7195\u7196\u7197\u719A",4,"\u71A1",6,"\u71A9\u71AA\u71AB\u71AD",5,"\u71B4\u71B6\u71B7\u71B8\u71BA",8,"\u71C4",9,"\u71CF",4],["a040","\u71D6",9,"\u71E1\u71E2\u71E3\u71E4\u71E6\u71E8",5,"\u71EF",9,"\u71FA",11,"\u7207",19],["a080","\u721B\u721C\u721E",9,"\u7229\u722B\u722D\u722E\u722F\u7232\u7233\u7234\u723A\u723C\u723E\u7240",6,"\u7249\u724A\u724B\u724E\u724F\u7250\u7251\u7253\u7254\u7255\u7257\u7258\u725A\u725C\u725E\u7260\u7263\u7264\u7265\u7268\u726A\u726B\u726C\u726D\u7270\u7271\u7273\u7274\u7276\u7277\u7278\u727B\u727C\u727D\u7282\u7283\u7285",4,"\u728C\u728E\u7290\u7291\u7293",11,"\u72A0",11,"\u72AE\u72B1\u72B2\u72B3\u72B5\u72BA",6,"\u72C5\u72C6\u72C7\u72C9\u72CA\u72CB\u72CC\u72CF\u72D1\u72D3\u72D4\u72D5\u72D6\u72D8\u72DA\u72DB"],["a1a1","\u3000\u3001\u3002\xB7\u02C9\u02C7\xA8\u3003\u3005\u2014\uFF5E\u2016\u2026\u2018\u2019\u201C\u201D\u3014\u3015\u3008",7,"\u3016\u3017\u3010\u3011\xB1\xD7\xF7\u2236\u2227\u2228\u2211\u220F\u222A\u2229\u2208\u2237\u221A\u22A5\u2225\u2220\u2312\u2299\u222B\u222E\u2261\u224C\u2248\u223D\u221D\u2260\u226E\u226F\u2264\u2265\u221E\u2235\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFF04\xA4\uFFE0\uFFE1\u2030\xA7\u2116\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u203B\u2192\u2190\u2191\u2193\u3013"],["a2a1","\u2170",9],["a2b1","\u2488",19,"\u2474",19,"\u2460",9],["a2e5","\u3220",9],["a2f1","\u2160",11],["a3a1","\uFF01\uFF02\uFF03\uFFE5\uFF05",88,"\uFFE3"],["a4a1","\u3041",82],["a5a1","\u30A1",85],["a6a1","\u0391",16,"\u03A3",6],["a6c1","\u03B1",16,"\u03C3",6],["a6e0","\uFE35\uFE36\uFE39\uFE3A\uFE3F\uFE40\uFE3D\uFE3E\uFE41\uFE42\uFE43\uFE44"],["a6ee","\uFE3B\uFE3C\uFE37\uFE38\uFE31"],["a6f4","\uFE33\uFE34"],["a7a1","\u0410",5,"\u0401\u0416",25],["a7d1","\u0430",5,"\u0451\u0436",25],["a840","\u02CA\u02CB\u02D9\u2013\u2015\u2025\u2035\u2105\u2109\u2196\u2197\u2198\u2199\u2215\u221F\u2223\u2252\u2266\u2267\u22BF\u2550",35,"\u2581",6],["a880","\u2588",7,"\u2593\u2594\u2595\u25BC\u25BD\u25E2\u25E3\u25E4\u25E5\u2609\u2295\u3012\u301D\u301E"],["a8a1","\u0101\xE1\u01CE\xE0\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA\u01DC\xFC\xEA\u0251"],["a8bd","\u0144\u0148"],["a8c0","\u0261"],["a8c5","\u3105",36],["a940","\u3021",8,"\u32A3\u338E\u338F\u339C\u339D\u339E\u33A1\u33C4\u33CE\u33D1\u33D2\u33D5\uFE30\uFFE2\uFFE4"],["a959","\u2121\u3231"],["a95c","\u2010"],["a960","\u30FC\u309B\u309C\u30FD\u30FE\u3006\u309D\u309E\uFE49",9,"\uFE54\uFE55\uFE56\uFE57\uFE59",8],["a980","\uFE62",4,"\uFE68\uFE69\uFE6A\uFE6B"],["a996","\u3007"],["a9a4","\u2500",75],["aa40","\u72DC\u72DD\u72DF\u72E2",5,"\u72EA\u72EB\u72F5\u72F6\u72F9\u72FD\u72FE\u72FF\u7300\u7302\u7304",5,"\u730B\u730C\u730D\u730F\u7310\u7311\u7312\u7314\u7318\u7319\u731A\u731F\u7320\u7323\u7324\u7326\u7327\u7328\u732D\u732F\u7330\u7332\u7333\u7335\u7336\u733A\u733B\u733C\u733D\u7340",8],["aa80","\u7349\u734A\u734B\u734C\u734E\u734F\u7351\u7353\u7354\u7355\u7356\u7358",7,"\u7361",10,"\u736E\u7370\u7371"],["ab40","\u7372",11,"\u737F",4,"\u7385\u7386\u7388\u738A\u738C\u738D\u738F\u7390\u7392\u7393\u7394\u7395\u7397\u7398\u7399\u739A\u739C\u739D\u739E\u73A0\u73A1\u73A3",5,"\u73AA\u73AC\u73AD\u73B1\u73B4\u73B5\u73B6\u73B8\u73B9\u73BC\u73BD\u73BE\u73BF\u73C1\u73C3",4],["ab80","\u73CB\u73CC\u73CE\u73D2",6,"\u73DA\u73DB\u73DC\u73DD\u73DF\u73E1\u73E2\u73E3\u73E4\u73E6\u73E8\u73EA\u73EB\u73EC\u73EE\u73EF\u73F0\u73F1\u73F3",4],["ac40","\u73F8",10,"\u7404\u7407\u7408\u740B\u740C\u740D\u740E\u7411",8,"\u741C",5,"\u7423\u7424\u7427\u7429\u742B\u742D\u742F\u7431\u7432\u7437",4,"\u743D\u743E\u743F\u7440\u7442",11],["ac80","\u744E",6,"\u7456\u7458\u745D\u7460",12,"\u746E\u746F\u7471",4,"\u7478\u7479\u747A"],["ad40","\u747B\u747C\u747D\u747F\u7482\u7484\u7485\u7486\u7488\u7489\u748A\u748C\u748D\u748F\u7491",10,"\u749D\u749F",7,"\u74AA",15,"\u74BB",12],["ad80","\u74C8",9,"\u74D3",8,"\u74DD\u74DF\u74E1\u74E5\u74E7",6,"\u74F0\u74F1\u74F2"],["ae40","\u74F3\u74F5\u74F8",6,"\u7500\u7501\u7502\u7503\u7505",7,"\u750E\u7510\u7512\u7514\u7515\u7516\u7517\u751B\u751D\u751E\u7520",4,"\u7526\u7527\u752A\u752E\u7534\u7536\u7539\u753C\u753D\u753F\u7541\u7542\u7543\u7544\u7546\u7547\u7549\u754A\u754D\u7550\u7551\u7552\u7553\u7555\u7556\u7557\u7558"],["ae80","\u755D",7,"\u7567\u7568\u7569\u756B",6,"\u7573\u7575\u7576\u7577\u757A",4,"\u7580\u7581\u7582\u7584\u7585\u7587"],["af40","\u7588\u7589\u758A\u758C\u758D\u758E\u7590\u7593\u7595\u7598\u759B\u759C\u759E\u75A2\u75A6",4,"\u75AD\u75B6\u75B7\u75BA\u75BB\u75BF\u75C0\u75C1\u75C6\u75CB\u75CC\u75CE\u75CF\u75D0\u75D1\u75D3\u75D7\u75D9\u75DA\u75DC\u75DD\u75DF\u75E0\u75E1\u75E5\u75E9\u75EC\u75ED\u75EE\u75EF\u75F2\u75F3\u75F5\u75F6\u75F7\u75F8\u75FA\u75FB\u75FD\u75FE\u7602\u7604\u7606\u7607"],["af80","\u7608\u7609\u760B\u760D\u760E\u760F\u7611\u7612\u7613\u7614\u7616\u761A\u761C\u761D\u761E\u7621\u7623\u7627\u7628\u762C\u762E\u762F\u7631\u7632\u7636\u7637\u7639\u763A\u763B\u763D\u7641\u7642\u7644"],["b040","\u7645",6,"\u764E",5,"\u7655\u7657",4,"\u765D\u765F\u7660\u7661\u7662\u7664",6,"\u766C\u766D\u766E\u7670",7,"\u7679\u767A\u767C\u767F\u7680\u7681\u7683\u7685\u7689\u768A\u768C\u768D\u768F\u7690\u7692\u7694\u7695\u7697\u7698\u769A\u769B"],["b080","\u769C",7,"\u76A5",8,"\u76AF\u76B0\u76B3\u76B5",9,"\u76C0\u76C1\u76C3\u554A\u963F\u57C3\u6328\u54CE\u5509\u54C0\u7691\u764C\u853C\u77EE\u827E\u788D\u7231\u9698\u978D\u6C28\u5B89\u4FFA\u6309\u6697\u5CB8\u80FA\u6848\u80AE\u6602\u76CE\u51F9\u6556\u71AC\u7FF1\u8884\u50B2\u5965\u61CA\u6FB3\u82AD\u634C\u6252\u53ED\u5427\u7B06\u516B\u75A4\u5DF4\u62D4\u8DCB\u9776\u628A\u8019\u575D\u9738\u7F62\u7238\u767D\u67CF\u767E\u6446\u4F70\u8D25\u62DC\u7A17\u6591\u73ED\u642C\u6273\u822C\u9881\u677F\u7248\u626E\u62CC\u4F34\u74E3\u534A\u529E\u7ECA\u90A6\u5E2E\u6886\u699C\u8180\u7ED1\u68D2\u78C5\u868C\u9551\u508D\u8C24\u82DE\u80DE\u5305\u8912\u5265"],["b140","\u76C4\u76C7\u76C9\u76CB\u76CC\u76D3\u76D5\u76D9\u76DA\u76DC\u76DD\u76DE\u76E0",4,"\u76E6",7,"\u76F0\u76F3\u76F5\u76F6\u76F7\u76FA\u76FB\u76FD\u76FF\u7700\u7702\u7703\u7705\u7706\u770A\u770C\u770E",10,"\u771B\u771C\u771D\u771E\u7721\u7723\u7724\u7725\u7727\u772A\u772B"],["b180","\u772C\u772E\u7730",4,"\u7739\u773B\u773D\u773E\u773F\u7742\u7744\u7745\u7746\u7748",7,"\u7752",7,"\u775C\u8584\u96F9\u4FDD\u5821\u9971\u5B9D\u62B1\u62A5\u66B4\u8C79\u9C8D\u7206\u676F\u7891\u60B2\u5351\u5317\u8F88\u80CC\u8D1D\u94A1\u500D\u72C8\u5907\u60EB\u7119\u88AB\u5954\u82EF\u672C\u7B28\u5D29\u7EF7\u752D\u6CF5\u8E66\u8FF8\u903C\u9F3B\u6BD4\u9119\u7B14\u5F7C\u78A7\u84D6\u853D\u6BD5\u6BD9\u6BD6\u5E01\u5E87\u75F9\u95ED\u655D\u5F0A\u5FC5\u8F9F\u58C1\u81C2\u907F\u965B\u97AD\u8FB9\u7F16\u8D2C\u6241\u4FBF\u53D8\u535E\u8FA8\u8FA9\u8FAB\u904D\u6807\u5F6A\u8198\u8868\u9CD6\u618B\u522B\u762A\u5F6C\u658C\u6FD2\u6EE8\u5BBE\u6448\u5175\u51B0\u67C4\u4E19\u79C9\u997C\u70B3"],["b240","\u775D\u775E\u775F\u7760\u7764\u7767\u7769\u776A\u776D",11,"\u777A\u777B\u777C\u7781\u7782\u7783\u7786",5,"\u778F\u7790\u7793",11,"\u77A1\u77A3\u77A4\u77A6\u77A8\u77AB\u77AD\u77AE\u77AF\u77B1\u77B2\u77B4\u77B6",4],["b280","\u77BC\u77BE\u77C0",12,"\u77CE",8,"\u77D8\u77D9\u77DA\u77DD",4,"\u77E4\u75C5\u5E76\u73BB\u83E0\u64AD\u62E8\u94B5\u6CE2\u535A\u52C3\u640F\u94C2\u7B94\u4F2F\u5E1B\u8236\u8116\u818A\u6E24\u6CCA\u9A73\u6355\u535C\u54FA\u8865\u57E0\u4E0D\u5E03\u6B65\u7C3F\u90E8\u6016\u64E6\u731C\u88C1\u6750\u624D\u8D22\u776C\u8E29\u91C7\u5F69\u83DC\u8521\u9910\u53C2\u8695\u6B8B\u60ED\u60E8\u707F\u82CD\u8231\u4ED3\u6CA7\u85CF\u64CD\u7CD9\u69FD\u66F9\u8349\u5395\u7B56\u4FA7\u518C\u6D4B\u5C42\u8E6D\u63D2\u53C9\u832C\u8336\u67E5\u78B4\u643D\u5BDF\u5C94\u5DEE\u8BE7\u62C6\u67F4\u8C7A\u6400\u63BA\u8749\u998B\u8C17\u7F20\u94F2\u4EA7\u9610\u98A4\u660C\u7316"],["b340","\u77E6\u77E8\u77EA\u77EF\u77F0\u77F1\u77F2\u77F4\u77F5\u77F7\u77F9\u77FA\u77FB\u77FC\u7803",5,"\u780A\u780B\u780E\u780F\u7810\u7813\u7815\u7819\u781B\u781E\u7820\u7821\u7822\u7824\u7828\u782A\u782B\u782E\u782F\u7831\u7832\u7833\u7835\u7836\u783D\u783F\u7841\u7842\u7843\u7844\u7846\u7848\u7849\u784A\u784B\u784D\u784F\u7851\u7853\u7854\u7858\u7859\u785A"],["b380","\u785B\u785C\u785E",11,"\u786F",7,"\u7878\u7879\u787A\u787B\u787D",6,"\u573A\u5C1D\u5E38\u957F\u507F\u80A0\u5382\u655E\u7545\u5531\u5021\u8D85\u6284\u949E\u671D\u5632\u6F6E\u5DE2\u5435\u7092\u8F66\u626F\u64A4\u63A3\u5F7B\u6F88\u90F4\u81E3\u8FB0\u5C18\u6668\u5FF1\u6C89\u9648\u8D81\u886C\u6491\u79F0\u57CE\u6A59\u6210\u5448\u4E58\u7A0B\u60E9\u6F84\u8BDA\u627F\u901E\u9A8B\u79E4\u5403\u75F4\u6301\u5319\u6C60\u8FDF\u5F1B\u9A70\u803B\u9F7F\u4F88\u5C3A\u8D64\u7FC5\u65A5\u70BD\u5145\u51B2\u866B\u5D07\u5BA0\u62BD\u916C\u7574\u8E0C\u7A20\u6101\u7B79\u4EC7\u7EF8\u7785\u4E11\u81ED\u521D\u51FA\u6A71\u53A8\u8E87\u9504\u96CF\u6EC1\u9664\u695A"],["b440","\u7884\u7885\u7886\u7888\u788A\u788B\u788F\u7890\u7892\u7894\u7895\u7896\u7899\u789D\u789E\u78A0\u78A2\u78A4\u78A6\u78A8",7,"\u78B5\u78B6\u78B7\u78B8\u78BA\u78BB\u78BC\u78BD\u78BF\u78C0\u78C2\u78C3\u78C4\u78C6\u78C7\u78C8\u78CC\u78CD\u78CE\u78CF\u78D1\u78D2\u78D3\u78D6\u78D7\u78D8\u78DA",9],["b480","\u78E4\u78E5\u78E6\u78E7\u78E9\u78EA\u78EB\u78ED",4,"\u78F3\u78F5\u78F6\u78F8\u78F9\u78FB",5,"\u7902\u7903\u7904\u7906",6,"\u7840\u50A8\u77D7\u6410\u89E6\u5904\u63E3\u5DDD\u7A7F\u693D\u4F20\u8239\u5598\u4E32\u75AE\u7A97\u5E62\u5E8A\u95EF\u521B\u5439\u708A\u6376\u9524\u5782\u6625\u693F\u9187\u5507\u6DF3\u7EAF\u8822\u6233\u7EF0\u75B5\u8328\u78C1\u96CC\u8F9E\u6148\u74F7\u8BCD\u6B64\u523A\u8D50\u6B21\u806A\u8471\u56F1\u5306\u4ECE\u4E1B\u51D1\u7C97\u918B\u7C07\u4FC3\u8E7F\u7BE1\u7A9C\u6467\u5D14\u50AC\u8106\u7601\u7CB9\u6DEC\u7FE0\u6751\u5B58\u5BF8\u78CB\u64AE\u6413\u63AA\u632B\u9519\u642D\u8FBE\u7B54\u7629\u6253\u5927\u5446\u6B79\u50A3\u6234\u5E26\u6B86\u4EE3\u8D37\u888B\u5F85\u902E"],["b540","\u790D",5,"\u7914",9,"\u791F",4,"\u7925",14,"\u7935",4,"\u793D\u793F\u7942\u7943\u7944\u7945\u7947\u794A",8,"\u7954\u7955\u7958\u7959\u7961\u7963"],["b580","\u7964\u7966\u7969\u796A\u796B\u796C\u796E\u7970",6,"\u7979\u797B",4,"\u7982\u7983\u7986\u7987\u7988\u7989\u798B\u798C\u798D\u798E\u7990\u7991\u7992\u6020\u803D\u62C5\u4E39\u5355\u90F8\u63B8\u80C6\u65E6\u6C2E\u4F46\u60EE\u6DE1\u8BDE\u5F39\u86CB\u5F53\u6321\u515A\u8361\u6863\u5200\u6363\u8E48\u5012\u5C9B\u7977\u5BFC\u5230\u7A3B\u60BC\u9053\u76D7\u5FB7\u5F97\u7684\u8E6C\u706F\u767B\u7B49\u77AA\u51F3\u9093\u5824\u4F4E\u6EF4\u8FEA\u654C\u7B1B\u72C4\u6DA4\u7FDF\u5AE1\u62B5\u5E95\u5730\u8482\u7B2C\u5E1D\u5F1F\u9012\u7F14\u98A0\u6382\u6EC7\u7898\u70B9\u5178\u975B\u57AB\u7535\u4F43\u7538\u5E97\u60E6\u5960\u6DC0\u6BBF\u7889\u53FC\u96D5\u51CB\u5201\u6389\u540A\u9493\u8C03\u8DCC\u7239\u789F\u8776\u8FED\u8C0D\u53E0"],["b640","\u7993",6,"\u799B",11,"\u79A8",10,"\u79B4",4,"\u79BC\u79BF\u79C2\u79C4\u79C5\u79C7\u79C8\u79CA\u79CC\u79CE\u79CF\u79D0\u79D3\u79D4\u79D6\u79D7\u79D9",5,"\u79E0\u79E1\u79E2\u79E5\u79E8\u79EA"],["b680","\u79EC\u79EE\u79F1",6,"\u79F9\u79FA\u79FC\u79FE\u79FF\u7A01\u7A04\u7A05\u7A07\u7A08\u7A09\u7A0A\u7A0C\u7A0F",4,"\u7A15\u7A16\u7A18\u7A19\u7A1B\u7A1C\u4E01\u76EF\u53EE\u9489\u9876\u9F0E\u952D\u5B9A\u8BA2\u4E22\u4E1C\u51AC\u8463\u61C2\u52A8\u680B\u4F97\u606B\u51BB\u6D1E\u515C\u6296\u6597\u9661\u8C46\u9017\u75D8\u90FD\u7763\u6BD2\u728A\u72EC\u8BFB\u5835\u7779\u8D4C\u675C\u9540\u809A\u5EA6\u6E21\u5992\u7AEF\u77ED\u953B\u6BB5\u65AD\u7F0E\u5806\u5151\u961F\u5BF9\u58A9\u5428\u8E72\u6566\u987F\u56E4\u949D\u76FE\u9041\u6387\u54C6\u591A\u593A\u579B\u8EB2\u6735\u8DFA\u8235\u5241\u60F0\u5815\u86FE\u5CE8\u9E45\u4FC4\u989D\u8BB9\u5A25\u6076\u5384\u627C\u904F\u9102\u997F\u6069\u800C\u513F\u8033\u5C14\u9975\u6D31\u4E8C"],["b740","\u7A1D\u7A1F\u7A21\u7A22\u7A24",14,"\u7A34\u7A35\u7A36\u7A38\u7A3A\u7A3E\u7A40",5,"\u7A47",9,"\u7A52",4,"\u7A58",16],["b780","\u7A69",6,"\u7A71\u7A72\u7A73\u7A75\u7A7B\u7A7C\u7A7D\u7A7E\u7A82\u7A85\u7A87\u7A89\u7A8A\u7A8B\u7A8C\u7A8E\u7A8F\u7A90\u7A93\u7A94\u7A99\u7A9A\u7A9B\u7A9E\u7AA1\u7AA2\u8D30\u53D1\u7F5A\u7B4F\u4F10\u4E4F\u9600\u6CD5\u73D0\u85E9\u5E06\u756A\u7FFB\u6A0A\u77FE\u9492\u7E41\u51E1\u70E6\u53CD\u8FD4\u8303\u8D29\u72AF\u996D\u6CDB\u574A\u82B3\u65B9\u80AA\u623F\u9632\u59A8\u4EFF\u8BBF\u7EBA\u653E\u83F2\u975E\u5561\u98DE\u80A5\u532A\u8BFD\u5420\u80BA\u5E9F\u6CB8\u8D39\u82AC\u915A\u5429\u6C1B\u5206\u7EB7\u575F\u711A\u6C7E\u7C89\u594B\u4EFD\u5FFF\u6124\u7CAA\u4E30\u5C01\u67AB\u8702\u5CF0\u950B\u98CE\u75AF\u70FD\u9022\u51AF\u7F1D\u8BBD\u5949\u51E4\u4F5B\u5426\u592B\u6577\u80A4\u5B75\u6276\u62C2\u8F90\u5E45\u6C1F\u7B26\u4F0F\u4FD8\u670D"],["b840","\u7AA3\u7AA4\u7AA7\u7AA9\u7AAA\u7AAB\u7AAE",4,"\u7AB4",10,"\u7AC0",10,"\u7ACC",9,"\u7AD7\u7AD8\u7ADA\u7ADB\u7ADC\u7ADD\u7AE1\u7AE2\u7AE4\u7AE7",5,"\u7AEE\u7AF0\u7AF1\u7AF2\u7AF3"],["b880","\u7AF4",4,"\u7AFB\u7AFC\u7AFE\u7B00\u7B01\u7B02\u7B05\u7B07\u7B09\u7B0C\u7B0D\u7B0E\u7B10\u7B12\u7B13\u7B16\u7B17\u7B18\u7B1A\u7B1C\u7B1D\u7B1F\u7B21\u7B22\u7B23\u7B27\u7B29\u7B2D\u6D6E\u6DAA\u798F\u88B1\u5F17\u752B\u629A\u8F85\u4FEF\u91DC\u65A7\u812F\u8151\u5E9C\u8150\u8D74\u526F\u8986\u8D4B\u590D\u5085\u4ED8\u961C\u7236\u8179\u8D1F\u5BCC\u8BA3\u9644\u5987\u7F1A\u5490\u5676\u560E\u8BE5\u6539\u6982\u9499\u76D6\u6E89\u5E72\u7518\u6746\u67D1\u7AFF\u809D\u8D76\u611F\u79C6\u6562\u8D63\u5188\u521A\u94A2\u7F38\u809B\u7EB2\u5C97\u6E2F\u6760\u7BD9\u768B\u9AD8\u818F\u7F94\u7CD5\u641E\u9550\u7A3F\u544A\u54E5\u6B4C\u6401\u6208\u9E3D\u80F3\u7599\u5272\u9769\u845B\u683C\u86E4\u9601\u9694\u94EC\u4E2A\u5404\u7ED9\u6839\u8DDF\u8015\u66F4\u5E9A\u7FB9"],["b940","\u7B2F\u7B30\u7B32\u7B34\u7B35\u7B36\u7B37\u7B39\u7B3B\u7B3D\u7B3F",5,"\u7B46\u7B48\u7B4A\u7B4D\u7B4E\u7B53\u7B55\u7B57\u7B59\u7B5C\u7B5E\u7B5F\u7B61\u7B63",10,"\u7B6F\u7B70\u7B73\u7B74\u7B76\u7B78\u7B7A\u7B7C\u7B7D\u7B7F\u7B81\u7B82\u7B83\u7B84\u7B86",6,"\u7B8E\u7B8F"],["b980","\u7B91\u7B92\u7B93\u7B96\u7B98\u7B99\u7B9A\u7B9B\u7B9E\u7B9F\u7BA0\u7BA3\u7BA4\u7BA5\u7BAE\u7BAF\u7BB0\u7BB2\u7BB3\u7BB5\u7BB6\u7BB7\u7BB9",7,"\u7BC2\u7BC3\u7BC4\u57C2\u803F\u6897\u5DE5\u653B\u529F\u606D\u9F9A\u4F9B\u8EAC\u516C\u5BAB\u5F13\u5DE9\u6C5E\u62F1\u8D21\u5171\u94A9\u52FE\u6C9F\u82DF\u72D7\u57A2\u6784\u8D2D\u591F\u8F9C\u83C7\u5495\u7B8D\u4F30\u6CBD\u5B64\u59D1\u9F13\u53E4\u86CA\u9AA8\u8C37\u80A1\u6545\u987E\u56FA\u96C7\u522E\u74DC\u5250\u5BE1\u6302\u8902\u4E56\u62D0\u602A\u68FA\u5173\u5B98\u51A0\u89C2\u7BA1\u9986\u7F50\u60EF\u704C\u8D2F\u5149\u5E7F\u901B\u7470\u89C4\u572D\u7845\u5F52\u9F9F\u95FA\u8F68\u9B3C\u8BE1\u7678\u6842\u67DC\u8DEA\u8D35\u523D\u8F8A\u6EDA\u68CD\u9505\u90ED\u56FD\u679C\u88F9\u8FC7\u54C8"],["ba40","\u7BC5\u7BC8\u7BC9\u7BCA\u7BCB\u7BCD\u7BCE\u7BCF\u7BD0\u7BD2\u7BD4",4,"\u7BDB\u7BDC\u7BDE\u7BDF\u7BE0\u7BE2\u7BE3\u7BE4\u7BE7\u7BE8\u7BE9\u7BEB\u7BEC\u7BED\u7BEF\u7BF0\u7BF2",4,"\u7BF8\u7BF9\u7BFA\u7BFB\u7BFD\u7BFF",7,"\u7C08\u7C09\u7C0A\u7C0D\u7C0E\u7C10",5,"\u7C17\u7C18\u7C19"],["ba80","\u7C1A",4,"\u7C20",5,"\u7C28\u7C29\u7C2B",12,"\u7C39",5,"\u7C42\u9AB8\u5B69\u6D77\u6C26\u4EA5\u5BB3\u9A87\u9163\u61A8\u90AF\u97E9\u542B\u6DB5\u5BD2\u51FD\u558A\u7F55\u7FF0\u64BC\u634D\u65F1\u61BE\u608D\u710A\u6C57\u6C49\u592F\u676D\u822A\u58D5\u568E\u8C6A\u6BEB\u90DD\u597D\u8017\u53F7\u6D69\u5475\u559D\u8377\u83CF\u6838\u79BE\u548C\u4F55\u5408\u76D2\u8C89\u9602\u6CB3\u6DB8\u8D6B\u8910\u9E64\u8D3A\u563F\u9ED1\u75D5\u5F88\u72E0\u6068\u54FC\u4EA8\u6A2A\u8861\u6052\u8F70\u54C4\u70D8\u8679\u9E3F\u6D2A\u5B8F\u5F18\u7EA2\u5589\u4FAF\u7334\u543C\u539A\u5019\u540E\u547C\u4E4E\u5FFD\u745A\u58F6\u846B\u80E1\u8774\u72D0\u7CCA\u6E56"],["bb40","\u7C43",9,"\u7C4E",36,"\u7C75",5,"\u7C7E",9],["bb80","\u7C88\u7C8A",6,"\u7C93\u7C94\u7C96\u7C99\u7C9A\u7C9B\u7CA0\u7CA1\u7CA3\u7CA6\u7CA7\u7CA8\u7CA9\u7CAB\u7CAC\u7CAD\u7CAF\u7CB0\u7CB4",4,"\u7CBA\u7CBB\u5F27\u864E\u552C\u62A4\u4E92\u6CAA\u6237\u82B1\u54D7\u534E\u733E\u6ED1\u753B\u5212\u5316\u8BDD\u69D0\u5F8A\u6000\u6DEE\u574F\u6B22\u73AF\u6853\u8FD8\u7F13\u6362\u60A3\u5524\u75EA\u8C62\u7115\u6DA3\u5BA6\u5E7B\u8352\u614C\u9EC4\u78FA\u8757\u7C27\u7687\u51F0\u60F6\u714C\u6643\u5E4C\u604D\u8C0E\u7070\u6325\u8F89\u5FBD\u6062\u86D4\u56DE\u6BC1\u6094\u6167\u5349\u60E0\u6666\u8D3F\u79FD\u4F1A\u70E9\u6C47\u8BB3\u8BF2\u7ED8\u8364\u660F\u5A5A\u9B42\u6D51\u6DF7\u8C41\u6D3B\u4F19\u706B\u83B7\u6216\u60D1\u970D\u8D27\u7978\u51FB\u573E\u57FA\u673A\u7578\u7A3D\u79EF\u7B95"],["bc40","\u7CBF\u7CC0\u7CC2\u7CC3\u7CC4\u7CC6\u7CC9\u7CCB\u7CCE",6,"\u7CD8\u7CDA\u7CDB\u7CDD\u7CDE\u7CE1",6,"\u7CE9",5,"\u7CF0",7,"\u7CF9\u7CFA\u7CFC",13,"\u7D0B",5],["bc80","\u7D11",14,"\u7D21\u7D23\u7D24\u7D25\u7D26\u7D28\u7D29\u7D2A\u7D2C\u7D2D\u7D2E\u7D30",6,"\u808C\u9965\u8FF9\u6FC0\u8BA5\u9E21\u59EC\u7EE9\u7F09\u5409\u6781\u68D8\u8F91\u7C4D\u96C6\u53CA\u6025\u75BE\u6C72\u5373\u5AC9\u7EA7\u6324\u51E0\u810A\u5DF1\u84DF\u6280\u5180\u5B63\u4F0E\u796D\u5242\u60B8\u6D4E\u5BC4\u5BC2\u8BA1\u8BB0\u65E2\u5FCC\u9645\u5993\u7EE7\u7EAA\u5609\u67B7\u5939\u4F73\u5BB6\u52A0\u835A\u988A\u8D3E\u7532\u94BE\u5047\u7A3C\u4EF7\u67B6\u9A7E\u5AC1\u6B7C\u76D1\u575A\u5C16\u7B3A\u95F4\u714E\u517C\u80A9\u8270\u5978\u7F04\u8327\u68C0\u67EC\u78B1\u7877\u62E3\u6361\u7B80\u4FED\u526A\u51CF\u8350\u69DB\u9274\u8DF5\u8D31\u89C1\u952E\u7BAD\u4EF6"],["bd40","\u7D37",54,"\u7D6F",7],["bd80","\u7D78",32,"\u5065\u8230\u5251\u996F\u6E10\u6E85\u6DA7\u5EFA\u50F5\u59DC\u5C06\u6D46\u6C5F\u7586\u848B\u6868\u5956\u8BB2\u5320\u9171\u964D\u8549\u6912\u7901\u7126\u80F6\u4EA4\u90CA\u6D47\u9A84\u5A07\u56BC\u6405\u94F0\u77EB\u4FA5\u811A\u72E1\u89D2\u997A\u7F34\u7EDE\u527F\u6559\u9175\u8F7F\u8F83\u53EB\u7A96\u63ED\u63A5\u7686\u79F8\u8857\u9636\u622A\u52AB\u8282\u6854\u6770\u6377\u776B\u7AED\u6D01\u7ED3\u89E3\u59D0\u6212\u85C9\u82A5\u754C\u501F\u4ECB\u75A5\u8BEB\u5C4A\u5DFE\u7B4B\u65A4\u91D1\u4ECA\u6D25\u895F\u7D27\u9526\u4EC5\u8C28\u8FDB\u9773\u664B\u7981\u8FD1\u70EC\u6D78"],["be40","\u7D99",12,"\u7DA7",6,"\u7DAF",42],["be80","\u7DDA",32,"\u5C3D\u52B2\u8346\u5162\u830E\u775B\u6676\u9CB8\u4EAC\u60CA\u7CBE\u7CB3\u7ECF\u4E95\u8B66\u666F\u9888\u9759\u5883\u656C\u955C\u5F84\u75C9\u9756\u7ADF\u7ADE\u51C0\u70AF\u7A98\u63EA\u7A76\u7EA0\u7396\u97ED\u4E45\u7078\u4E5D\u9152\u53A9\u6551\u65E7\u81FC\u8205\u548E\u5C31\u759A\u97A0\u62D8\u72D9\u75BD\u5C45\u9A79\u83CA\u5C40\u5480\u77E9\u4E3E\u6CAE\u805A\u62D2\u636E\u5DE8\u5177\u8DDD\u8E1E\u952F\u4FF1\u53E5\u60E7\u70AC\u5267\u6350\u9E43\u5A1F\u5026\u7737\u5377\u7EE2\u6485\u652B\u6289\u6398\u5014\u7235\u89C9\u51B3\u8BC0\u7EDD\u5747\u83CC\u94A7\u519B\u541B\u5CFB"],["bf40","\u7DFB",62],["bf80","\u7E3A\u7E3C",4,"\u7E42",4,"\u7E48",21,"\u4FCA\u7AE3\u6D5A\u90E1\u9A8F\u5580\u5496\u5361\u54AF\u5F00\u63E9\u6977\u51EF\u6168\u520A\u582A\u52D8\u574E\u780D\u770B\u5EB7\u6177\u7CE0\u625B\u6297\u4EA2\u7095\u8003\u62F7\u70E4\u9760\u5777\u82DB\u67EF\u68F5\u78D5\u9897\u79D1\u58F3\u54B3\u53EF\u6E34\u514B\u523B\u5BA2\u8BFE\u80AF\u5543\u57A6\u6073\u5751\u542D\u7A7A\u6050\u5B54\u63A7\u62A0\u53E3\u6263\u5BC7\u67AF\u54ED\u7A9F\u82E6\u9177\u5E93\u88E4\u5938\u57AE\u630E\u8DE8\u80EF\u5757\u7B77\u4FA9\u5FEB\u5BBD\u6B3E\u5321\u7B50\u72C2\u6846\u77FF\u7736\u65F7\u51B5\u4E8F\u76D4\u5CBF\u7AA5\u8475\u594E\u9B41\u5080"],["c040","\u7E5E",35,"\u7E83",23,"\u7E9C\u7E9D\u7E9E"],["c080","\u7EAE\u7EB4\u7EBB\u7EBC\u7ED6\u7EE4\u7EEC\u7EF9\u7F0A\u7F10\u7F1E\u7F37\u7F39\u7F3B",6,"\u7F43\u7F46",9,"\u7F52\u7F53\u9988\u6127\u6E83\u5764\u6606\u6346\u56F0\u62EC\u6269\u5ED3\u9614\u5783\u62C9\u5587\u8721\u814A\u8FA3\u5566\u83B1\u6765\u8D56\u84DD\u5A6A\u680F\u62E6\u7BEE\u9611\u5170\u6F9C\u8C30\u63FD\u89C8\u61D2\u7F06\u70C2\u6EE5\u7405\u6994\u72FC\u5ECA\u90CE\u6717\u6D6A\u635E\u52B3\u7262\u8001\u4F6C\u59E5\u916A\u70D9\u6D9D\u52D2\u4E50\u96F7\u956D\u857E\u78CA\u7D2F\u5121\u5792\u64C2\u808B\u7C7B\u6CEA\u68F1\u695E\u51B7\u5398\u68A8\u7281\u9ECE\u7BF1\u72F8\u79BB\u6F13\u7406\u674E\u91CC\u9CA4\u793C\u8389\u8354\u540F\u6817\u4E3D\u5389\u52B1\u783E\u5386\u5229\u5088\u4F8B\u4FD0"],["c140","\u7F56\u7F59\u7F5B\u7F5C\u7F5D\u7F5E\u7F60\u7F63",4,"\u7F6B\u7F6C\u7F6D\u7F6F\u7F70\u7F73\u7F75\u7F76\u7F77\u7F78\u7F7A\u7F7B\u7F7C\u7F7D\u7F7F\u7F80\u7F82",7,"\u7F8B\u7F8D\u7F8F",4,"\u7F95",4,"\u7F9B\u7F9C\u7FA0\u7FA2\u7FA3\u7FA5\u7FA6\u7FA8",6,"\u7FB1"],["c180","\u7FB3",4,"\u7FBA\u7FBB\u7FBE\u7FC0\u7FC2\u7FC3\u7FC4\u7FC6\u7FC7\u7FC8\u7FC9\u7FCB\u7FCD\u7FCF",4,"\u7FD6\u7FD7\u7FD9",5,"\u7FE2\u7FE3\u75E2\u7ACB\u7C92\u6CA5\u96B6\u529B\u7483\u54E9\u4FE9\u8054\u83B2\u8FDE\u9570\u5EC9\u601C\u6D9F\u5E18\u655B\u8138\u94FE\u604B\u70BC\u7EC3\u7CAE\u51C9\u6881\u7CB1\u826F\u4E24\u8F86\u91CF\u667E\u4EAE\u8C05\u64A9\u804A\u50DA\u7597\u71CE\u5BE5\u8FBD\u6F66\u4E86\u6482\u9563\u5ED6\u6599\u5217\u88C2\u70C8\u52A3\u730E\u7433\u6797\u78F7\u9716\u4E34\u90BB\u9CDE\u6DCB\u51DB\u8D41\u541D\u62CE\u73B2\u83F1\u96F6\u9F84\u94C3\u4F36\u7F9A\u51CC\u7075\u9675\u5CAD\u9886\u53E6\u4EE4\u6E9C\u7409\u69B4\u786B\u998F\u7559\u5218\u7624\u6D41\u67F3\u516D\u9F99\u804B\u5499\u7B3C\u7ABF"],["c240","\u7FE4\u7FE7\u7FE8\u7FEA\u7FEB\u7FEC\u7FED\u7FEF\u7FF2\u7FF4",6,"\u7FFD\u7FFE\u7FFF\u8002\u8007\u8008\u8009\u800A\u800E\u800F\u8011\u8013\u801A\u801B\u801D\u801E\u801F\u8021\u8023\u8024\u802B",5,"\u8032\u8034\u8039\u803A\u803C\u803E\u8040\u8041\u8044\u8045\u8047\u8048\u8049\u804E\u804F\u8050\u8051\u8053\u8055\u8056\u8057"],["c280","\u8059\u805B",13,"\u806B",5,"\u8072",11,"\u9686\u5784\u62E2\u9647\u697C\u5A04\u6402\u7BD3\u6F0F\u964B\u82A6\u5362\u9885\u5E90\u7089\u63B3\u5364\u864F\u9C81\u9E93\u788C\u9732\u8DEF\u8D42\u9E7F\u6F5E\u7984\u5F55\u9646\u622E\u9A74\u5415\u94DD\u4FA3\u65C5\u5C65\u5C61\u7F15\u8651\u6C2F\u5F8B\u7387\u6EE4\u7EFF\u5CE6\u631B\u5B6A\u6EE6\u5375\u4E71\u63A0\u7565\u62A1\u8F6E\u4F26\u4ED1\u6CA6\u7EB6\u8BBA\u841D\u87BA\u7F57\u903B\u9523\u7BA9\u9AA1\u88F8\u843D\u6D1B\u9A86\u7EDC\u5988\u9EBB\u739B\u7801\u8682\u9A6C\u9A82\u561B\u5417\u57CB\u4E70\u9EA6\u5356\u8FC8\u8109\u7792\u9992\u86EE\u6EE1\u8513\u66FC\u6162\u6F2B"],["c340","\u807E\u8081\u8082\u8085\u8088\u808A\u808D",5,"\u8094\u8095\u8097\u8099\u809E\u80A3\u80A6\u80A7\u80A8\u80AC\u80B0\u80B3\u80B5\u80B6\u80B8\u80B9\u80BB\u80C5\u80C7",4,"\u80CF",6,"\u80D8\u80DF\u80E0\u80E2\u80E3\u80E6\u80EE\u80F5\u80F7\u80F9\u80FB\u80FE\u80FF\u8100\u8101\u8103\u8104\u8105\u8107\u8108\u810B"],["c380","\u810C\u8115\u8117\u8119\u811B\u811C\u811D\u811F",12,"\u812D\u812E\u8130\u8133\u8134\u8135\u8137\u8139",4,"\u813F\u8C29\u8292\u832B\u76F2\u6C13\u5FD9\u83BD\u732B\u8305\u951A\u6BDB\u77DB\u94C6\u536F\u8302\u5192\u5E3D\u8C8C\u8D38\u4E48\u73AB\u679A\u6885\u9176\u9709\u7164\u6CA1\u7709\u5A92\u9541\u6BCF\u7F8E\u6627\u5BD0\u59B9\u5A9A\u95E8\u95F7\u4EEC\u840C\u8499\u6AAC\u76DF\u9530\u731B\u68A6\u5B5F\u772F\u919A\u9761\u7CDC\u8FF7\u8C1C\u5F25\u7C73\u79D8\u89C5\u6CCC\u871C\u5BC6\u5E42\u68C9\u7720\u7EF5\u5195\u514D\u52C9\u5A29\u7F05\u9762\u82D7\u63CF\u7784\u85D0\u79D2\u6E3A\u5E99\u5999\u8511\u706D\u6C11\u62BF\u76BF\u654F\u60AF\u95FD\u660E\u879F\u9E23\u94ED\u540D\u547D\u8C2C\u6478"],["c440","\u8140",5,"\u8147\u8149\u814D\u814E\u814F\u8152\u8156\u8157\u8158\u815B",4,"\u8161\u8162\u8163\u8164\u8166\u8168\u816A\u816B\u816C\u816F\u8172\u8173\u8175\u8176\u8177\u8178\u8181\u8183",4,"\u8189\u818B\u818C\u818D\u818E\u8190\u8192",5,"\u8199\u819A\u819E",4,"\u81A4\u81A5"],["c480","\u81A7\u81A9\u81AB",7,"\u81B4",5,"\u81BC\u81BD\u81BE\u81BF\u81C4\u81C5\u81C7\u81C8\u81C9\u81CB\u81CD",6,"\u6479\u8611\u6A21\u819C\u78E8\u6469\u9B54\u62B9\u672B\u83AB\u58A8\u9ED8\u6CAB\u6F20\u5BDE\u964C\u8C0B\u725F\u67D0\u62C7\u7261\u4EA9\u59C6\u6BCD\u5893\u66AE\u5E55\u52DF\u6155\u6728\u76EE\u7766\u7267\u7A46\u62FF\u54EA\u5450\u94A0\u90A3\u5A1C\u7EB3\u6C16\u4E43\u5976\u8010\u5948\u5357\u7537\u96BE\u56CA\u6320\u8111\u607C\u95F9\u6DD6\u5462\u9981\u5185\u5AE9\u80FD\u59AE\u9713\u502A\u6CE5\u5C3C\u62DF\u4F60\u533F\u817B\u9006\u6EBA\u852B\u62C8\u5E74\u78BE\u64B5\u637B\u5FF5\u5A18\u917F\u9E1F\u5C3F\u634F\u8042\u5B7D\u556E\u954A\u954D\u6D85\u60A8\u67E0\u72DE\u51DD\u5B81"],["c540","\u81D4",14,"\u81E4\u81E5\u81E6\u81E8\u81E9\u81EB\u81EE",4,"\u81F5",5,"\u81FD\u81FF\u8203\u8207",4,"\u820E\u820F\u8211\u8213\u8215",5,"\u821D\u8220\u8224\u8225\u8226\u8227\u8229\u822E\u8232\u823A\u823C\u823D\u823F"],["c580","\u8240\u8241\u8242\u8243\u8245\u8246\u8248\u824A\u824C\u824D\u824E\u8250",7,"\u8259\u825B\u825C\u825D\u825E\u8260",7,"\u8269\u62E7\u6CDE\u725B\u626D\u94AE\u7EBD\u8113\u6D53\u519C\u5F04\u5974\u52AA\u6012\u5973\u6696\u8650\u759F\u632A\u61E6\u7CEF\u8BFA\u54E6\u6B27\u9E25\u6BB4\u85D5\u5455\u5076\u6CA4\u556A\u8DB4\u722C\u5E15\u6015\u7436\u62CD\u6392\u724C\u5F98\u6E43\u6D3E\u6500\u6F58\u76D8\u78D0\u76FC\u7554\u5224\u53DB\u4E53\u5E9E\u65C1\u802A\u80D6\u629B\u5486\u5228\u70AE\u888D\u8DD1\u6CE1\u5478\u80DA\u57F9\u88F4\u8D54\u966A\u914D\u4F69\u6C9B\u55B7\u76C6\u7830\u62A8\u70F9\u6F8E\u5F6D\u84EC\u68DA\u787C\u7BF7\u81A8\u670B\u9E4F\u6367\u78B0\u576F\u7812\u9739\u6279\u62AB\u5288\u7435\u6BD7"],["c640","\u826A\u826B\u826C\u826D\u8271\u8275\u8276\u8277\u8278\u827B\u827C\u8280\u8281\u8283\u8285\u8286\u8287\u8289\u828C\u8290\u8293\u8294\u8295\u8296\u829A\u829B\u829E\u82A0\u82A2\u82A3\u82A7\u82B2\u82B5\u82B6\u82BA\u82BB\u82BC\u82BF\u82C0\u82C2\u82C3\u82C5\u82C6\u82C9\u82D0\u82D6\u82D9\u82DA\u82DD\u82E2\u82E7\u82E8\u82E9\u82EA\u82EC\u82ED\u82EE\u82F0\u82F2\u82F3\u82F5\u82F6\u82F8"],["c680","\u82FA\u82FC",4,"\u830A\u830B\u830D\u8310\u8312\u8313\u8316\u8318\u8319\u831D",9,"\u8329\u832A\u832E\u8330\u8332\u8337\u833B\u833D\u5564\u813E\u75B2\u76AE\u5339\u75DE\u50FB\u5C41\u8B6C\u7BC7\u504F\u7247\u9A97\u98D8\u6F02\u74E2\u7968\u6487\u77A5\u62FC\u9891\u8D2B\u54C1\u8058\u4E52\u576A\u82F9\u840D\u5E73\u51ED\u74F6\u8BC4\u5C4F\u5761\u6CFC\u9887\u5A46\u7834\u9B44\u8FEB\u7C95\u5256\u6251\u94FA\u4EC6\u8386\u8461\u83E9\u84B2\u57D4\u6734\u5703\u666E\u6D66\u8C31\u66DD\u7011\u671F\u6B3A\u6816\u621A\u59BB\u4E03\u51C4\u6F06\u67D2\u6C8F\u5176\u68CB\u5947\u6B67\u7566\u5D0E\u8110\u9F50\u65D7\u7948\u7941\u9A91\u8D77\u5C82\u4E5E\u4F01\u542F\u5951\u780C\u5668\u6C14\u8FC4\u5F03\u6C7D\u6CE3\u8BAB\u6390"],["c740","\u833E\u833F\u8341\u8342\u8344\u8345\u8348\u834A",4,"\u8353\u8355",4,"\u835D\u8362\u8370",6,"\u8379\u837A\u837E",6,"\u8387\u8388\u838A\u838B\u838C\u838D\u838F\u8390\u8391\u8394\u8395\u8396\u8397\u8399\u839A\u839D\u839F\u83A1",6,"\u83AC\u83AD\u83AE"],["c780","\u83AF\u83B5\u83BB\u83BE\u83BF\u83C2\u83C3\u83C4\u83C6\u83C8\u83C9\u83CB\u83CD\u83CE\u83D0\u83D1\u83D2\u83D3\u83D5\u83D7\u83D9\u83DA\u83DB\u83DE\u83E2\u83E3\u83E4\u83E6\u83E7\u83E8\u83EB\u83EC\u83ED\u6070\u6D3D\u7275\u6266\u948E\u94C5\u5343\u8FC1\u7B7E\u4EDF\u8C26\u4E7E\u9ED4\u94B1\u94B3\u524D\u6F5C\u9063\u6D45\u8C34\u5811\u5D4C\u6B20\u6B49\u67AA\u545B\u8154\u7F8C\u5899\u8537\u5F3A\u62A2\u6A47\u9539\u6572\u6084\u6865\u77A7\u4E54\u4FA8\u5DE7\u9798\u64AC\u7FD8\u5CED\u4FCF\u7A8D\u5207\u8304\u4E14\u602F\u7A83\u94A6\u4FB5\u4EB2\u79E6\u7434\u52E4\u82B9\u64D2\u79BD\u5BDD\u6C81\u9752\u8F7B\u6C22\u503E\u537F\u6E05\u64CE\u6674\u6C30\u60C5\u9877\u8BF7\u5E86\u743C\u7A77\u79CB\u4E18\u90B1\u7403\u6C42\u56DA\u914B\u6CC5\u8D8B\u533A\u86C6\u66F2\u8EAF\u5C48\u9A71\u6E20"],["c840","\u83EE\u83EF\u83F3",4,"\u83FA\u83FB\u83FC\u83FE\u83FF\u8400\u8402\u8405\u8407\u8408\u8409\u840A\u8410\u8412",5,"\u8419\u841A\u841B\u841E",5,"\u8429",7,"\u8432",5,"\u8439\u843A\u843B\u843E",7,"\u8447\u8448\u8449"],["c880","\u844A",6,"\u8452",4,"\u8458\u845D\u845E\u845F\u8460\u8462\u8464",4,"\u846A\u846E\u846F\u8470\u8472\u8474\u8477\u8479\u847B\u847C\u53D6\u5A36\u9F8B\u8DA3\u53BB\u5708\u98A7\u6743\u919B\u6CC9\u5168\u75CA\u62F3\u72AC\u5238\u529D\u7F3A\u7094\u7638\u5374\u9E4A\u69B7\u786E\u96C0\u88D9\u7FA4\u7136\u71C3\u5189\u67D3\u74E4\u58E4\u6518\u56B7\u8BA9\u9976\u6270\u7ED5\u60F9\u70ED\u58EC\u4EC1\u4EBA\u5FCD\u97E7\u4EFB\u8BA4\u5203\u598A\u7EAB\u6254\u4ECD\u65E5\u620E\u8338\u84C9\u8363\u878D\u7194\u6EB6\u5BB9\u7ED2\u5197\u63C9\u67D4\u8089\u8339\u8815\u5112\u5B7A\u5982\u8FB1\u4E73\u6C5D\u5165\u8925\u8F6F\u962E\u854A\u745E\u9510\u95F0\u6DA6\u82E5\u5F31\u6492\u6D12\u8428\u816E\u9CC3\u585E\u8D5B\u4E09\u53C1"],["c940","\u847D",4,"\u8483\u8484\u8485\u8486\u848A\u848D\u848F",7,"\u8498\u849A\u849B\u849D\u849E\u849F\u84A0\u84A2",12,"\u84B0\u84B1\u84B3\u84B5\u84B6\u84B7\u84BB\u84BC\u84BE\u84C0\u84C2\u84C3\u84C5\u84C6\u84C7\u84C8\u84CB\u84CC\u84CE\u84CF\u84D2\u84D4\u84D5\u84D7"],["c980","\u84D8",4,"\u84DE\u84E1\u84E2\u84E4\u84E7",4,"\u84ED\u84EE\u84EF\u84F1",10,"\u84FD\u84FE\u8500\u8501\u8502\u4F1E\u6563\u6851\u55D3\u4E27\u6414\u9A9A\u626B\u5AC2\u745F\u8272\u6DA9\u68EE\u50E7\u838E\u7802\u6740\u5239\u6C99\u7EB1\u50BB\u5565\u715E\u7B5B\u6652\u73CA\u82EB\u6749\u5C71\u5220\u717D\u886B\u95EA\u9655\u64C5\u8D61\u81B3\u5584\u6C55\u6247\u7F2E\u5892\u4F24\u5546\u8D4F\u664C\u4E0A\u5C1A\u88F3\u68A2\u634E\u7A0D\u70E7\u828D\u52FA\u97F6\u5C11\u54E8\u90B5\u7ECD\u5962\u8D4A\u86C7\u820C\u820D\u8D66\u6444\u5C04\u6151\u6D89\u793E\u8BBE\u7837\u7533\u547B\u4F38\u8EAB\u6DF1\u5A20\u7EC5\u795E\u6C88\u5BA1\u5A76\u751A\u80BE\u614E\u6E17\u58F0\u751F\u7525\u7272\u5347\u7EF3"],["ca40","\u8503",8,"\u850D\u850E\u850F\u8510\u8512\u8514\u8515\u8516\u8518\u8519\u851B\u851C\u851D\u851E\u8520\u8522",8,"\u852D",9,"\u853E",4,"\u8544\u8545\u8546\u8547\u854B",10],["ca80","\u8557\u8558\u855A\u855B\u855C\u855D\u855F",4,"\u8565\u8566\u8567\u8569",8,"\u8573\u8575\u8576\u8577\u8578\u857C\u857D\u857F\u8580\u8581\u7701\u76DB\u5269\u80DC\u5723\u5E08\u5931\u72EE\u65BD\u6E7F\u8BD7\u5C38\u8671\u5341\u77F3\u62FE\u65F6\u4EC0\u98DF\u8680\u5B9E\u8BC6\u53F2\u77E2\u4F7F\u5C4E\u9A76\u59CB\u5F0F\u793A\u58EB\u4E16\u67FF\u4E8B\u62ED\u8A93\u901D\u52BF\u662F\u55DC\u566C\u9002\u4ED5\u4F8D\u91CA\u9970\u6C0F\u5E02\u6043\u5BA4\u89C6\u8BD5\u6536\u624B\u9996\u5B88\u5BFF\u6388\u552E\u53D7\u7626\u517D\u852C\u67A2\u68B3\u6B8A\u6292\u8F93\u53D4\u8212\u6DD1\u758F\u4E66\u8D4E\u5B70\u719F\u85AF\u6691\u66D9\u7F72\u8700\u9ECD\u9F20\u5C5E\u672F\u8FF0\u6811\u675F\u620D\u7AD6\u5885\u5EB6\u6570\u6F31"],["cb40","\u8582\u8583\u8586\u8588",6,"\u8590",10,"\u859D",6,"\u85A5\u85A6\u85A7\u85A9\u85AB\u85AC\u85AD\u85B1",5,"\u85B8\u85BA",6,"\u85C2",6,"\u85CA",4,"\u85D1\u85D2"],["cb80","\u85D4\u85D6",5,"\u85DD",6,"\u85E5\u85E6\u85E7\u85E8\u85EA",14,"\u6055\u5237\u800D\u6454\u8870\u7529\u5E05\u6813\u62F4\u971C\u53CC\u723D\u8C01\u6C34\u7761\u7A0E\u542E\u77AC\u987A\u821C\u8BF4\u7855\u6714\u70C1\u65AF\u6495\u5636\u601D\u79C1\u53F8\u4E1D\u6B7B\u8086\u5BFA\u55E3\u56DB\u4F3A\u4F3C\u9972\u5DF3\u677E\u8038\u6002\u9882\u9001\u5B8B\u8BBC\u8BF5\u641C\u8258\u64DE\u55FD\u82CF\u9165\u4FD7\u7D20\u901F\u7C9F\u50F3\u5851\u6EAF\u5BBF\u8BC9\u8083\u9178\u849C\u7B97\u867D\u968B\u968F\u7EE5\u9AD3\u788E\u5C81\u7A57\u9042\u96A7\u795F\u5B59\u635F\u7B0B\u84D1\u68AD\u5506\u7F29\u7410\u7D22\u9501\u6240\u584C\u4ED6\u5B83\u5979\u5854"],["cc40","\u85F9\u85FA\u85FC\u85FD\u85FE\u8600",4,"\u8606",10,"\u8612\u8613\u8614\u8615\u8617",15,"\u8628\u862A",13,"\u8639\u863A\u863B\u863D\u863E\u863F\u8640"],["cc80","\u8641",11,"\u8652\u8653\u8655",4,"\u865B\u865C\u865D\u865F\u8660\u8661\u8663",7,"\u736D\u631E\u8E4B\u8E0F\u80CE\u82D4\u62AC\u53F0\u6CF0\u915E\u592A\u6001\u6C70\u574D\u644A\u8D2A\u762B\u6EE9\u575B\u6A80\u75F0\u6F6D\u8C2D\u8C08\u5766\u6BEF\u8892\u78B3\u63A2\u53F9\u70AD\u6C64\u5858\u642A\u5802\u68E0\u819B\u5510\u7CD6\u5018\u8EBA\u6DCC\u8D9F\u70EB\u638F\u6D9B\u6ED4\u7EE6\u8404\u6843\u9003\u6DD8\u9676\u8BA8\u5957\u7279\u85E4\u817E\u75BC\u8A8A\u68AF\u5254\u8E22\u9511\u63D0\u9898\u8E44\u557C\u4F53\u66FF\u568F\u60D5\u6D95\u5243\u5C49\u5929\u6DFB\u586B\u7530\u751C\u606C\u8214\u8146\u6311\u6761\u8FE2\u773A\u8DF3\u8D34\u94C1\u5E16\u5385\u542C\u70C3"],["cd40","\u866D\u866F\u8670\u8672",6,"\u8683",6,"\u868E",4,"\u8694\u8696",5,"\u869E",4,"\u86A5\u86A6\u86AB\u86AD\u86AE\u86B2\u86B3\u86B7\u86B8\u86B9\u86BB",4,"\u86C1\u86C2\u86C3\u86C5\u86C8\u86CC\u86CD\u86D2\u86D3\u86D5\u86D6\u86D7\u86DA\u86DC"],["cd80","\u86DD\u86E0\u86E1\u86E2\u86E3\u86E5\u86E6\u86E7\u86E8\u86EA\u86EB\u86EC\u86EF\u86F5\u86F6\u86F7\u86FA\u86FB\u86FC\u86FD\u86FF\u8701\u8704\u8705\u8706\u870B\u870C\u870E\u870F\u8710\u8711\u8714\u8716\u6C40\u5EF7\u505C\u4EAD\u5EAD\u633A\u8247\u901A\u6850\u916E\u77B3\u540C\u94DC\u5F64\u7AE5\u6876\u6345\u7B52\u7EDF\u75DB\u5077\u6295\u5934\u900F\u51F8\u79C3\u7A81\u56FE\u5F92\u9014\u6D82\u5C60\u571F\u5410\u5154\u6E4D\u56E2\u63A8\u9893\u817F\u8715\u892A\u9000\u541E\u5C6F\u81C0\u62D6\u6258\u8131\u9E35\u9640\u9A6E\u9A7C\u692D\u59A5\u62D3\u553E\u6316\u54C7\u86D9\u6D3C\u5A03\u74E6\u889C\u6B6A\u5916\u8C4C\u5F2F\u6E7E\u73A9\u987D\u4E38\u70F7\u5B8C\u7897\u633D\u665A\u7696\u60CB\u5B9B\u5A49\u4E07\u8155\u6C6A\u738B\u4EA1\u6789\u7F51\u5F80\u65FA\u671B\u5FD8\u5984\u5A01"],["ce40","\u8719\u871B\u871D\u871F\u8720\u8724\u8726\u8727\u8728\u872A\u872B\u872C\u872D\u872F\u8730\u8732\u8733\u8735\u8736\u8738\u8739\u873A\u873C\u873D\u8740",6,"\u874A\u874B\u874D\u874F\u8750\u8751\u8752\u8754\u8755\u8756\u8758\u875A",5,"\u8761\u8762\u8766",7,"\u876F\u8771\u8772\u8773\u8775"],["ce80","\u8777\u8778\u8779\u877A\u877F\u8780\u8781\u8784\u8786\u8787\u8789\u878A\u878C\u878E",4,"\u8794\u8795\u8796\u8798",6,"\u87A0",4,"\u5DCD\u5FAE\u5371\u97E6\u8FDD\u6845\u56F4\u552F\u60DF\u4E3A\u6F4D\u7EF4\u82C7\u840E\u59D4\u4F1F\u4F2A\u5C3E\u7EAC\u672A\u851A\u5473\u754F\u80C3\u5582\u9B4F\u4F4D\u6E2D\u8C13\u5C09\u6170\u536B\u761F\u6E29\u868A\u6587\u95FB\u7EB9\u543B\u7A33\u7D0A\u95EE\u55E1\u7FC1\u74EE\u631D\u8717\u6DA1\u7A9D\u6211\u65A1\u5367\u63E1\u6C83\u5DEB\u545C\u94A8\u4E4C\u6C61\u8BEC\u5C4B\u65E0\u829C\u68A7\u543E\u5434\u6BCB\u6B66\u4E94\u6342\u5348\u821E\u4F0D\u4FAE\u575E\u620A\u96FE\u6664\u7269\u52FF\u52A1\u609F\u8BEF\u6614\u7199\u6790\u897F\u7852\u77FD\u6670\u563B\u5438\u9521\u727A"],["cf40","\u87A5\u87A6\u87A7\u87A9\u87AA\u87AE\u87B0\u87B1\u87B2\u87B4\u87B6\u87B7\u87B8\u87B9\u87BB\u87BC\u87BE\u87BF\u87C1",4,"\u87C7\u87C8\u87C9\u87CC",4,"\u87D4",6,"\u87DC\u87DD\u87DE\u87DF\u87E1\u87E2\u87E3\u87E4\u87E6\u87E7\u87E8\u87E9\u87EB\u87EC\u87ED\u87EF",9],["cf80","\u87FA\u87FB\u87FC\u87FD\u87FF\u8800\u8801\u8802\u8804",5,"\u880B",7,"\u8814\u8817\u8818\u8819\u881A\u881C",4,"\u8823\u7A00\u606F\u5E0C\u6089\u819D\u5915\u60DC\u7184\u70EF\u6EAA\u6C50\u7280\u6A84\u88AD\u5E2D\u4E60\u5AB3\u559C\u94E3\u6D17\u7CFB\u9699\u620F\u7EC6\u778E\u867E\u5323\u971E\u8F96\u6687\u5CE1\u4FA0\u72ED\u4E0B\u53A6\u590F\u5413\u6380\u9528\u5148\u4ED9\u9C9C\u7EA4\u54B8\u8D24\u8854\u8237\u95F2\u6D8E\u5F26\u5ACC\u663E\u9669\u73B0\u732E\u53BF\u817A\u9985\u7FA1\u5BAA\u9677\u9650\u7EBF\u76F8\u53A2\u9576\u9999\u7BB1\u8944\u6E58\u4E61\u7FD4\u7965\u8BE6\u60F3\u54CD\u4EAB\u9879\u5DF7\u6A61\u50CF\u5411\u8C61\u8427\u785D\u9704\u524A\u54EE\u56A3\u9500\u6D88\u5BB5\u6DC6\u6653"],["d040","\u8824",13,"\u8833",5,"\u883A\u883B\u883D\u883E\u883F\u8841\u8842\u8843\u8846",5,"\u884E",5,"\u8855\u8856\u8858\u885A",6,"\u8866\u8867\u886A\u886D\u886F\u8871\u8873\u8874\u8875\u8876\u8878\u8879\u887A"],["d080","\u887B\u887C\u8880\u8883\u8886\u8887\u8889\u888A\u888C\u888E\u888F\u8890\u8891\u8893\u8894\u8895\u8897",4,"\u889D",4,"\u88A3\u88A5",5,"\u5C0F\u5B5D\u6821\u8096\u5578\u7B11\u6548\u6954\u4E9B\u6B47\u874E\u978B\u534F\u631F\u643A\u90AA\u659C\u80C1\u8C10\u5199\u68B0\u5378\u87F9\u61C8\u6CC4\u6CFB\u8C22\u5C51\u85AA\u82AF\u950C\u6B23\u8F9B\u65B0\u5FFB\u5FC3\u4FE1\u8845\u661F\u8165\u7329\u60FA\u5174\u5211\u578B\u5F62\u90A2\u884C\u9192\u5E78\u674F\u6027\u59D3\u5144\u51F6\u80F8\u5308\u6C79\u96C4\u718A\u4F11\u4FEE\u7F9E\u673D\u55C5\u9508\u79C0\u8896\u7EE3\u589F\u620C\u9700\u865A\u5618\u987B\u5F90\u8BB8\u84C4\u9157\u53D9\u65ED\u5E8F\u755C\u6064\u7D6E\u5A7F\u7EEA\u7EED\u8F69\u55A7\u5BA3\u60AC\u65CB\u7384"],["d140","\u88AC\u88AE\u88AF\u88B0\u88B2",4,"\u88B8\u88B9\u88BA\u88BB\u88BD\u88BE\u88BF\u88C0\u88C3\u88C4\u88C7\u88C8\u88CA\u88CB\u88CC\u88CD\u88CF\u88D0\u88D1\u88D3\u88D6\u88D7\u88DA",4,"\u88E0\u88E1\u88E6\u88E7\u88E9",6,"\u88F2\u88F5\u88F6\u88F7\u88FA\u88FB\u88FD\u88FF\u8900\u8901\u8903",5],["d180","\u8909\u890B",4,"\u8911\u8914",4,"\u891C",4,"\u8922\u8923\u8924\u8926\u8927\u8928\u8929\u892C\u892D\u892E\u892F\u8931\u8932\u8933\u8935\u8937\u9009\u7663\u7729\u7EDA\u9774\u859B\u5B66\u7A74\u96EA\u8840\u52CB\u718F\u5FAA\u65EC\u8BE2\u5BFB\u9A6F\u5DE1\u6B89\u6C5B\u8BAD\u8BAF\u900A\u8FC5\u538B\u62BC\u9E26\u9E2D\u5440\u4E2B\u82BD\u7259\u869C\u5D16\u8859\u6DAF\u96C5\u54D1\u4E9A\u8BB6\u7109\u54BD\u9609\u70DF\u6DF9\u76D0\u4E25\u7814\u8712\u5CA9\u5EF6\u8A00\u989C\u960E\u708E\u6CBF\u5944\u63A9\u773C\u884D\u6F14\u8273\u5830\u71D5\u538C\u781A\u96C1\u5501\u5F66\u7130\u5BB4\u8C1A\u9A8C\u6B83\u592E\u9E2F\u79E7\u6768\u626C\u4F6F\u75A1\u7F8A\u6D0B\u9633\u6C27\u4EF0\u75D2\u517B\u6837\u6F3E\u9080\u8170\u5996\u7476"],["d240","\u8938",8,"\u8942\u8943\u8945",24,"\u8960",5,"\u8967",19,"\u897C"],["d280","\u897D\u897E\u8980\u8982\u8984\u8985\u8987",26,"\u6447\u5C27\u9065\u7A91\u8C23\u59DA\u54AC\u8200\u836F\u8981\u8000\u6930\u564E\u8036\u7237\u91CE\u51B6\u4E5F\u9875\u6396\u4E1A\u53F6\u66F3\u814B\u591C\u6DB2\u4E00\u58F9\u533B\u63D6\u94F1\u4F9D\u4F0A\u8863\u9890\u5937\u9057\u79FB\u4EEA\u80F0\u7591\u6C82\u5B9C\u59E8\u5F5D\u6905\u8681\u501A\u5DF2\u4E59\u77E3\u4EE5\u827A\u6291\u6613\u9091\u5C79\u4EBF\u5F79\u81C6\u9038\u8084\u75AB\u4EA6\u88D4\u610F\u6BC5\u5FC6\u4E49\u76CA\u6EA2\u8BE3\u8BAE\u8C0A\u8BD1\u5F02\u7FFC\u7FCC\u7ECE\u8335\u836B\u56E0\u6BB7\u97F3\u9634\u59FB\u541F\u94F6\u6DEB\u5BC5\u996E\u5C39\u5F15\u9690"],["d340","\u89A2",30,"\u89C3\u89CD\u89D3\u89D4\u89D5\u89D7\u89D8\u89D9\u89DB\u89DD\u89DF\u89E0\u89E1\u89E2\u89E4\u89E7\u89E8\u89E9\u89EA\u89EC\u89ED\u89EE\u89F0\u89F1\u89F2\u89F4",6],["d380","\u89FB",4,"\u8A01",5,"\u8A08",21,"\u5370\u82F1\u6A31\u5A74\u9E70\u5E94\u7F28\u83B9\u8424\u8425\u8367\u8747\u8FCE\u8D62\u76C8\u5F71\u9896\u786C\u6620\u54DF\u62E5\u4F63\u81C3\u75C8\u5EB8\u96CD\u8E0A\u86F9\u548F\u6CF3\u6D8C\u6C38\u607F\u52C7\u7528\u5E7D\u4F18\u60A0\u5FE7\u5C24\u7531\u90AE\u94C0\u72B9\u6CB9\u6E38\u9149\u6709\u53CB\u53F3\u4F51\u91C9\u8BF1\u53C8\u5E7C\u8FC2\u6DE4\u4E8E\u76C2\u6986\u865E\u611A\u8206\u4F59\u4FDE\u903E\u9C7C\u6109\u6E1D\u6E14\u9685\u4E88\u5A31\u96E8\u4E0E\u5C7F\u79B9\u5B87\u8BED\u7FBD\u7389\u57DF\u828B\u90C1\u5401\u9047\u55BB\u5CEA\u5FA1\u6108\u6B32\u72F1\u80B2\u8A89"],["d440","\u8A1E",31,"\u8A3F",8,"\u8A49",21],["d480","\u8A5F",25,"\u8A7A",6,"\u6D74\u5BD3\u88D5\u9884\u8C6B\u9A6D\u9E33\u6E0A\u51A4\u5143\u57A3\u8881\u539F\u63F4\u8F95\u56ED\u5458\u5706\u733F\u6E90\u7F18\u8FDC\u82D1\u613F\u6028\u9662\u66F0\u7EA6\u8D8A\u8DC3\u94A5\u5CB3\u7CA4\u6708\u60A6\u9605\u8018\u4E91\u90E7\u5300\u9668\u5141\u8FD0\u8574\u915D\u6655\u97F5\u5B55\u531D\u7838\u6742\u683D\u54C9\u707E\u5BB0\u8F7D\u518D\u5728\u54B1\u6512\u6682\u8D5E\u8D43\u810F\u846C\u906D\u7CDF\u51FF\u85FB\u67A3\u65E9\u6FA1\u86A4\u8E81\u566A\u9020\u7682\u7076\u71E5\u8D23\u62E9\u5219\u6CFD\u8D3C\u600E\u589E\u618E\u66FE\u8D60\u624E\u55B3\u6E23\u672D\u8F67"],["d540","\u8A81",7,"\u8A8B",7,"\u8A94",46],["d580","\u8AC3",32,"\u94E1\u95F8\u7728\u6805\u69A8\u548B\u4E4D\u70B8\u8BC8\u6458\u658B\u5B85\u7A84\u503A\u5BE8\u77BB\u6BE1\u8A79\u7C98\u6CBE\u76CF\u65A9\u8F97\u5D2D\u5C55\u8638\u6808\u5360\u6218\u7AD9\u6E5B\u7EFD\u6A1F\u7AE0\u5F70\u6F33\u5F20\u638C\u6DA8\u6756\u4E08\u5E10\u8D26\u4ED7\u80C0\u7634\u969C\u62DB\u662D\u627E\u6CBC\u8D75\u7167\u7F69\u5146\u8087\u53EC\u906E\u6298\u54F2\u86F0\u8F99\u8005\u9517\u8517\u8FD9\u6D59\u73CD\u659F\u771F\u7504\u7827\u81FB\u8D1E\u9488\u4FA6\u6795\u75B9\u8BCA\u9707\u632F\u9547\u9635\u84B8\u6323\u7741\u5F81\u72F0\u4E89\u6014\u6574\u62EF\u6B63\u653F"],["d640","\u8AE4",34,"\u8B08",27],["d680","\u8B24\u8B25\u8B27",30,"\u5E27\u75C7\u90D1\u8BC1\u829D\u679D\u652F\u5431\u8718\u77E5\u80A2\u8102\u6C41\u4E4B\u7EC7\u804C\u76F4\u690D\u6B96\u6267\u503C\u4F84\u5740\u6307\u6B62\u8DBE\u53EA\u65E8\u7EB8\u5FD7\u631A\u63B7\u81F3\u81F4\u7F6E\u5E1C\u5CD9\u5236\u667A\u79E9\u7A1A\u8D28\u7099\u75D4\u6EDE\u6CBB\u7A92\u4E2D\u76C5\u5FE0\u949F\u8877\u7EC8\u79CD\u80BF\u91CD\u4EF2\u4F17\u821F\u5468\u5DDE\u6D32\u8BCC\u7CA5\u8F74\u8098\u5E1A\u5492\u76B1\u5B99\u663C\u9AA4\u73E0\u682A\u86DB\u6731\u732A\u8BF8\u8BDB\u9010\u7AF9\u70DB\u716E\u62C4\u77A9\u5631\u4E3B\u8457\u67F1\u52A9\u86C0\u8D2E\u94F8\u7B51"],["d740","\u8B46",31,"\u8B67",4,"\u8B6D",25],["d780","\u8B87",24,"\u8BAC\u8BB1\u8BBB\u8BC7\u8BD0\u8BEA\u8C09\u8C1E\u4F4F\u6CE8\u795D\u9A7B\u6293\u722A\u62FD\u4E13\u7816\u8F6C\u64B0\u8D5A\u7BC6\u6869\u5E84\u88C5\u5986\u649E\u58EE\u72B6\u690E\u9525\u8FFD\u8D58\u5760\u7F00\u8C06\u51C6\u6349\u62D9\u5353\u684C\u7422\u8301\u914C\u5544\u7740\u707C\u6D4A\u5179\u54A8\u8D44\u59FF\u6ECB\u6DC4\u5B5C\u7D2B\u4ED4\u7C7D\u6ED3\u5B50\u81EA\u6E0D\u5B57\u9B03\u68D5\u8E2A\u5B97\u7EFC\u603B\u7EB5\u90B9\u8D70\u594F\u63CD\u79DF\u8DB3\u5352\u65CF\u7956\u8BC5\u963B\u7EC4\u94BB\u7E82\u5634\u9189\u6700\u7F6A\u5C0A\u9075\u6628\u5DE6\u4F50\u67DE\u505A\u4F5C\u5750\u5EA7"],["d840","\u8C38",8,"\u8C42\u8C43\u8C44\u8C45\u8C48\u8C4A\u8C4B\u8C4D",7,"\u8C56\u8C57\u8C58\u8C59\u8C5B",5,"\u8C63",6,"\u8C6C",6,"\u8C74\u8C75\u8C76\u8C77\u8C7B",6,"\u8C83\u8C84\u8C86\u8C87"],["d880","\u8C88\u8C8B\u8C8D",6,"\u8C95\u8C96\u8C97\u8C99",20,"\u4E8D\u4E0C\u5140\u4E10\u5EFF\u5345\u4E15\u4E98\u4E1E\u9B32\u5B6C\u5669\u4E28\u79BA\u4E3F\u5315\u4E47\u592D\u723B\u536E\u6C10\u56DF\u80E4\u9997\u6BD3\u777E\u9F17\u4E36\u4E9F\u9F10\u4E5C\u4E69\u4E93\u8288\u5B5B\u556C\u560F\u4EC4\u538D\u539D\u53A3\u53A5\u53AE\u9765\u8D5D\u531A\u53F5\u5326\u532E\u533E\u8D5C\u5366\u5363\u5202\u5208\u520E\u522D\u5233\u523F\u5240\u524C\u525E\u5261\u525C\u84AF\u527D\u5282\u5281\u5290\u5293\u5182\u7F54\u4EBB\u4EC3\u4EC9\u4EC2\u4EE8\u4EE1\u4EEB\u4EDE\u4F1B\u4EF3\u4F22\u4F64\u4EF5\u4F25\u4F27\u4F09\u4F2B\u4F5E\u4F67\u6538\u4F5A\u4F5D"],["d940","\u8CAE",62],["d980","\u8CED",32,"\u4F5F\u4F57\u4F32\u4F3D\u4F76\u4F74\u4F91\u4F89\u4F83\u4F8F\u4F7E\u4F7B\u4FAA\u4F7C\u4FAC\u4F94\u4FE6\u4FE8\u4FEA\u4FC5\u4FDA\u4FE3\u4FDC\u4FD1\u4FDF\u4FF8\u5029\u504C\u4FF3\u502C\u500F\u502E\u502D\u4FFE\u501C\u500C\u5025\u5028\u507E\u5043\u5055\u5048\u504E\u506C\u507B\u50A5\u50A7\u50A9\u50BA\u50D6\u5106\u50ED\u50EC\u50E6\u50EE\u5107\u510B\u4EDD\u6C3D\u4F58\u4F65\u4FCE\u9FA0\u6C46\u7C74\u516E\u5DFD\u9EC9\u9998\u5181\u5914\u52F9\u530D\u8A07\u5310\u51EB\u5919\u5155\u4EA0\u5156\u4EB3\u886E\u88A4\u4EB5\u8114\u88D2\u7980\u5B34\u8803\u7FB8\u51AB\u51B1\u51BD\u51BC"],["da40","\u8D0E",14,"\u8D20\u8D51\u8D52\u8D57\u8D5F\u8D65\u8D68\u8D69\u8D6A\u8D6C\u8D6E\u8D6F\u8D71\u8D72\u8D78",8,"\u8D82\u8D83\u8D86\u8D87\u8D88\u8D89\u8D8C",4,"\u8D92\u8D93\u8D95",9,"\u8DA0\u8DA1"],["da80","\u8DA2\u8DA4",12,"\u8DB2\u8DB6\u8DB7\u8DB9\u8DBB\u8DBD\u8DC0\u8DC1\u8DC2\u8DC5\u8DC7\u8DC8\u8DC9\u8DCA\u8DCD\u8DD0\u8DD2\u8DD3\u8DD4\u51C7\u5196\u51A2\u51A5\u8BA0\u8BA6\u8BA7\u8BAA\u8BB4\u8BB5\u8BB7\u8BC2\u8BC3\u8BCB\u8BCF\u8BCE\u8BD2\u8BD3\u8BD4\u8BD6\u8BD8\u8BD9\u8BDC\u8BDF\u8BE0\u8BE4\u8BE8\u8BE9\u8BEE\u8BF0\u8BF3\u8BF6\u8BF9\u8BFC\u8BFF\u8C00\u8C02\u8C04\u8C07\u8C0C\u8C0F\u8C11\u8C12\u8C14\u8C15\u8C16\u8C19\u8C1B\u8C18\u8C1D\u8C1F\u8C20\u8C21\u8C25\u8C27\u8C2A\u8C2B\u8C2E\u8C2F\u8C32\u8C33\u8C35\u8C36\u5369\u537A\u961D\u9622\u9621\u9631\u962A\u963D\u963C\u9642\u9649\u9654\u965F\u9667\u966C\u9672\u9674\u9688\u968D\u9697\u96B0\u9097\u909B\u909D\u9099\u90AC\u90A1\u90B4\u90B3\u90B6\u90BA"],["db40","\u8DD5\u8DD8\u8DD9\u8DDC\u8DE0\u8DE1\u8DE2\u8DE5\u8DE6\u8DE7\u8DE9\u8DED\u8DEE\u8DF0\u8DF1\u8DF2\u8DF4\u8DF6\u8DFC\u8DFE",6,"\u8E06\u8E07\u8E08\u8E0B\u8E0D\u8E0E\u8E10\u8E11\u8E12\u8E13\u8E15",7,"\u8E20\u8E21\u8E24",4,"\u8E2B\u8E2D\u8E30\u8E32\u8E33\u8E34\u8E36\u8E37\u8E38\u8E3B\u8E3C\u8E3E"],["db80","\u8E3F\u8E43\u8E45\u8E46\u8E4C",4,"\u8E53",5,"\u8E5A",11,"\u8E67\u8E68\u8E6A\u8E6B\u8E6E\u8E71\u90B8\u90B0\u90CF\u90C5\u90BE\u90D0\u90C4\u90C7\u90D3\u90E6\u90E2\u90DC\u90D7\u90DB\u90EB\u90EF\u90FE\u9104\u9122\u911E\u9123\u9131\u912F\u9139\u9143\u9146\u520D\u5942\u52A2\u52AC\u52AD\u52BE\u54FF\u52D0\u52D6\u52F0\u53DF\u71EE\u77CD\u5EF4\u51F5\u51FC\u9B2F\u53B6\u5F01\u755A\u5DEF\u574C\u57A9\u57A1\u587E\u58BC\u58C5\u58D1\u5729\u572C\u572A\u5733\u5739\u572E\u572F\u575C\u573B\u5742\u5769\u5785\u576B\u5786\u577C\u577B\u5768\u576D\u5776\u5773\u57AD\u57A4\u578C\u57B2\u57CF\u57A7\u57B4\u5793\u57A0\u57D5\u57D8\u57DA\u57D9\u57D2\u57B8\u57F4\u57EF\u57F8\u57E4\u57DD"],["dc40","\u8E73\u8E75\u8E77",4,"\u8E7D\u8E7E\u8E80\u8E82\u8E83\u8E84\u8E86\u8E88",6,"\u8E91\u8E92\u8E93\u8E95",6,"\u8E9D\u8E9F",11,"\u8EAD\u8EAE\u8EB0\u8EB1\u8EB3",6,"\u8EBB",7],["dc80","\u8EC3",10,"\u8ECF",21,"\u580B\u580D\u57FD\u57ED\u5800\u581E\u5819\u5844\u5820\u5865\u586C\u5881\u5889\u589A\u5880\u99A8\u9F19\u61FF\u8279\u827D\u827F\u828F\u828A\u82A8\u8284\u828E\u8291\u8297\u8299\u82AB\u82B8\u82BE\u82B0\u82C8\u82CA\u82E3\u8298\u82B7\u82AE\u82CB\u82CC\u82C1\u82A9\u82B4\u82A1\u82AA\u829F\u82C4\u82CE\u82A4\u82E1\u8309\u82F7\u82E4\u830F\u8307\u82DC\u82F4\u82D2\u82D8\u830C\u82FB\u82D3\u8311\u831A\u8306\u8314\u8315\u82E0\u82D5\u831C\u8351\u835B\u835C\u8308\u8392\u833C\u8334\u8331\u839B\u835E\u832F\u834F\u8347\u8343\u835F\u8340\u8317\u8360\u832D\u833A\u8333\u8366\u8365"],["dd40","\u8EE5",62],["dd80","\u8F24",32,"\u8368\u831B\u8369\u836C\u836A\u836D\u836E\u83B0\u8378\u83B3\u83B4\u83A0\u83AA\u8393\u839C\u8385\u837C\u83B6\u83A9\u837D\u83B8\u837B\u8398\u839E\u83A8\u83BA\u83BC\u83C1\u8401\u83E5\u83D8\u5807\u8418\u840B\u83DD\u83FD\u83D6\u841C\u8438\u8411\u8406\u83D4\u83DF\u840F\u8403\u83F8\u83F9\u83EA\u83C5\u83C0\u8426\u83F0\u83E1\u845C\u8451\u845A\u8459\u8473\u8487\u8488\u847A\u8489\u8478\u843C\u8446\u8469\u8476\u848C\u848E\u8431\u846D\u84C1\u84CD\u84D0\u84E6\u84BD\u84D3\u84CA\u84BF\u84BA\u84E0\u84A1\u84B9\u84B4\u8497\u84E5\u84E3\u850C\u750D\u8538\u84F0\u8539\u851F\u853A"],["de40","\u8F45",32,"\u8F6A\u8F80\u8F8C\u8F92\u8F9D\u8FA0\u8FA1\u8FA2\u8FA4\u8FA5\u8FA6\u8FA7\u8FAA\u8FAC\u8FAD\u8FAE\u8FAF\u8FB2\u8FB3\u8FB4\u8FB5\u8FB7\u8FB8\u8FBA\u8FBB\u8FBC\u8FBF\u8FC0\u8FC3\u8FC6"],["de80","\u8FC9",4,"\u8FCF\u8FD2\u8FD6\u8FD7\u8FDA\u8FE0\u8FE1\u8FE3\u8FE7\u8FEC\u8FEF\u8FF1\u8FF2\u8FF4\u8FF5\u8FF6\u8FFA\u8FFB\u8FFC\u8FFE\u8FFF\u9007\u9008\u900C\u900E\u9013\u9015\u9018\u8556\u853B\u84FF\u84FC\u8559\u8548\u8568\u8564\u855E\u857A\u77A2\u8543\u8572\u857B\u85A4\u85A8\u8587\u858F\u8579\u85AE\u859C\u8585\u85B9\u85B7\u85B0\u85D3\u85C1\u85DC\u85FF\u8627\u8605\u8629\u8616\u863C\u5EFE\u5F08\u593C\u5941\u8037\u5955\u595A\u5958\u530F\u5C22\u5C25\u5C2C\u5C34\u624C\u626A\u629F\u62BB\u62CA\u62DA\u62D7\u62EE\u6322\u62F6\u6339\u634B\u6343\u63AD\u63F6\u6371\u637A\u638E\u63B4\u636D\u63AC\u638A\u6369\u63AE\u63BC\u63F2\u63F8\u63E0\u63FF\u63C4\u63DE\u63CE\u6452\u63C6\u63BE\u6445\u6441\u640B\u641B\u6420\u640C\u6426\u6421\u645E\u6484\u646D\u6496"],["df40","\u9019\u901C\u9023\u9024\u9025\u9027",5,"\u9030",4,"\u9037\u9039\u903A\u903D\u903F\u9040\u9043\u9045\u9046\u9048",4,"\u904E\u9054\u9055\u9056\u9059\u905A\u905C",5,"\u9064\u9066\u9067\u9069\u906A\u906B\u906C\u906F",4,"\u9076",6,"\u907E\u9081"],["df80","\u9084\u9085\u9086\u9087\u9089\u908A\u908C",4,"\u9092\u9094\u9096\u9098\u909A\u909C\u909E\u909F\u90A0\u90A4\u90A5\u90A7\u90A8\u90A9\u90AB\u90AD\u90B2\u90B7\u90BC\u90BD\u90BF\u90C0\u647A\u64B7\u64B8\u6499\u64BA\u64C0\u64D0\u64D7\u64E4\u64E2\u6509\u6525\u652E\u5F0B\u5FD2\u7519\u5F11\u535F\u53F1\u53FD\u53E9\u53E8\u53FB\u5412\u5416\u5406\u544B\u5452\u5453\u5454\u5456\u5443\u5421\u5457\u5459\u5423\u5432\u5482\u5494\u5477\u5471\u5464\u549A\u549B\u5484\u5476\u5466\u549D\u54D0\u54AD\u54C2\u54B4\u54D2\u54A7\u54A6\u54D3\u54D4\u5472\u54A3\u54D5\u54BB\u54BF\u54CC\u54D9\u54DA\u54DC\u54A9\u54AA\u54A4\u54DD\u54CF\u54DE\u551B\u54E7\u5520\u54FD\u5514\u54F3\u5522\u5523\u550F\u5511\u5527\u552A\u5567\u558F\u55B5\u5549\u556D\u5541\u5555\u553F\u5550\u553C"],["e040","\u90C2\u90C3\u90C6\u90C8\u90C9\u90CB\u90CC\u90CD\u90D2\u90D4\u90D5\u90D6\u90D8\u90D9\u90DA\u90DE\u90DF\u90E0\u90E3\u90E4\u90E5\u90E9\u90EA\u90EC\u90EE\u90F0\u90F1\u90F2\u90F3\u90F5\u90F6\u90F7\u90F9\u90FA\u90FB\u90FC\u90FF\u9100\u9101\u9103\u9105",19,"\u911A\u911B\u911C"],["e080","\u911D\u911F\u9120\u9121\u9124",10,"\u9130\u9132",6,"\u913A",8,"\u9144\u5537\u5556\u5575\u5576\u5577\u5533\u5530\u555C\u558B\u55D2\u5583\u55B1\u55B9\u5588\u5581\u559F\u557E\u55D6\u5591\u557B\u55DF\u55BD\u55BE\u5594\u5599\u55EA\u55F7\u55C9\u561F\u55D1\u55EB\u55EC\u55D4\u55E6\u55DD\u55C4\u55EF\u55E5\u55F2\u55F3\u55CC\u55CD\u55E8\u55F5\u55E4\u8F94\u561E\u5608\u560C\u5601\u5624\u5623\u55FE\u5600\u5627\u562D\u5658\u5639\u5657\u562C\u564D\u5662\u5659\u565C\u564C\u5654\u5686\u5664\u5671\u566B\u567B\u567C\u5685\u5693\u56AF\u56D4\u56D7\u56DD\u56E1\u56F5\u56EB\u56F9\u56FF\u5704\u570A\u5709\u571C\u5E0F\u5E19\u5E14\u5E11\u5E31\u5E3B\u5E3C"],["e140","\u9145\u9147\u9148\u9151\u9153\u9154\u9155\u9156\u9158\u9159\u915B\u915C\u915F\u9160\u9166\u9167\u9168\u916B\u916D\u9173\u917A\u917B\u917C\u9180",4,"\u9186\u9188\u918A\u918E\u918F\u9193",6,"\u919C",5,"\u91A4",5,"\u91AB\u91AC\u91B0\u91B1\u91B2\u91B3\u91B6\u91B7\u91B8\u91B9\u91BB"],["e180","\u91BC",10,"\u91C8\u91CB\u91D0\u91D2",9,"\u91DD",8,"\u5E37\u5E44\u5E54\u5E5B\u5E5E\u5E61\u5C8C\u5C7A\u5C8D\u5C90\u5C96\u5C88\u5C98\u5C99\u5C91\u5C9A\u5C9C\u5CB5\u5CA2\u5CBD\u5CAC\u5CAB\u5CB1\u5CA3\u5CC1\u5CB7\u5CC4\u5CD2\u5CE4\u5CCB\u5CE5\u5D02\u5D03\u5D27\u5D26\u5D2E\u5D24\u5D1E\u5D06\u5D1B\u5D58\u5D3E\u5D34\u5D3D\u5D6C\u5D5B\u5D6F\u5D5D\u5D6B\u5D4B\u5D4A\u5D69\u5D74\u5D82\u5D99\u5D9D\u8C73\u5DB7\u5DC5\u5F73\u5F77\u5F82\u5F87\u5F89\u5F8C\u5F95\u5F99\u5F9C\u5FA8\u5FAD\u5FB5\u5FBC\u8862\u5F61\u72AD\u72B0\u72B4\u72B7\u72B8\u72C3\u72C1\u72CE\u72CD\u72D2\u72E8\u72EF\u72E9\u72F2\u72F4\u72F7\u7301\u72F3\u7303\u72FA"],["e240","\u91E6",62],["e280","\u9225",32,"\u72FB\u7317\u7313\u7321\u730A\u731E\u731D\u7315\u7322\u7339\u7325\u732C\u7338\u7331\u7350\u734D\u7357\u7360\u736C\u736F\u737E\u821B\u5925\u98E7\u5924\u5902\u9963\u9967",5,"\u9974\u9977\u997D\u9980\u9984\u9987\u998A\u998D\u9990\u9991\u9993\u9994\u9995\u5E80\u5E91\u5E8B\u5E96\u5EA5\u5EA0\u5EB9\u5EB5\u5EBE\u5EB3\u8D53\u5ED2\u5ED1\u5EDB\u5EE8\u5EEA\u81BA\u5FC4\u5FC9\u5FD6\u5FCF\u6003\u5FEE\u6004\u5FE1\u5FE4\u5FFE\u6005\u6006\u5FEA\u5FED\u5FF8\u6019\u6035\u6026\u601B\u600F\u600D\u6029\u602B\u600A\u603F\u6021\u6078\u6079\u607B\u607A\u6042"],["e340","\u9246",45,"\u9275",16],["e380","\u9286",7,"\u928F",24,"\u606A\u607D\u6096\u609A\u60AD\u609D\u6083\u6092\u608C\u609B\u60EC\u60BB\u60B1\u60DD\u60D8\u60C6\u60DA\u60B4\u6120\u6126\u6115\u6123\u60F4\u6100\u610E\u612B\u614A\u6175\u61AC\u6194\u61A7\u61B7\u61D4\u61F5\u5FDD\u96B3\u95E9\u95EB\u95F1\u95F3\u95F5\u95F6\u95FC\u95FE\u9603\u9604\u9606\u9608\u960A\u960B\u960C\u960D\u960F\u9612\u9615\u9616\u9617\u9619\u961A\u4E2C\u723F\u6215\u6C35\u6C54\u6C5C\u6C4A\u6CA3\u6C85\u6C90\u6C94\u6C8C\u6C68\u6C69\u6C74\u6C76\u6C86\u6CA9\u6CD0\u6CD4\u6CAD\u6CF7\u6CF8\u6CF1\u6CD7\u6CB2\u6CE0\u6CD6\u6CFA\u6CEB\u6CEE\u6CB1\u6CD3\u6CEF\u6CFE"],["e440","\u92A8",5,"\u92AF",24,"\u92C9",31],["e480","\u92E9",32,"\u6D39\u6D27\u6D0C\u6D43\u6D48\u6D07\u6D04\u6D19\u6D0E\u6D2B\u6D4D\u6D2E\u6D35\u6D1A\u6D4F\u6D52\u6D54\u6D33\u6D91\u6D6F\u6D9E\u6DA0\u6D5E\u6D93\u6D94\u6D5C\u6D60\u6D7C\u6D63\u6E1A\u6DC7\u6DC5\u6DDE\u6E0E\u6DBF\u6DE0\u6E11\u6DE6\u6DDD\u6DD9\u6E16\u6DAB\u6E0C\u6DAE\u6E2B\u6E6E\u6E4E\u6E6B\u6EB2\u6E5F\u6E86\u6E53\u6E54\u6E32\u6E25\u6E44\u6EDF\u6EB1\u6E98\u6EE0\u6F2D\u6EE2\u6EA5\u6EA7\u6EBD\u6EBB\u6EB7\u6ED7\u6EB4\u6ECF\u6E8F\u6EC2\u6E9F\u6F62\u6F46\u6F47\u6F24\u6F15\u6EF9\u6F2F\u6F36\u6F4B\u6F74\u6F2A\u6F09\u6F29\u6F89\u6F8D\u6F8C\u6F78\u6F72\u6F7C\u6F7A\u6FD1"],["e540","\u930A",51,"\u933F",10],["e580","\u934A",31,"\u936B\u6FC9\u6FA7\u6FB9\u6FB6\u6FC2\u6FE1\u6FEE\u6FDE\u6FE0\u6FEF\u701A\u7023\u701B\u7039\u7035\u704F\u705E\u5B80\u5B84\u5B95\u5B93\u5BA5\u5BB8\u752F\u9A9E\u6434\u5BE4\u5BEE\u8930\u5BF0\u8E47\u8B07\u8FB6\u8FD3\u8FD5\u8FE5\u8FEE\u8FE4\u8FE9\u8FE6\u8FF3\u8FE8\u9005\u9004\u900B\u9026\u9011\u900D\u9016\u9021\u9035\u9036\u902D\u902F\u9044\u9051\u9052\u9050\u9068\u9058\u9062\u905B\u66B9\u9074\u907D\u9082\u9088\u9083\u908B\u5F50\u5F57\u5F56\u5F58\u5C3B\u54AB\u5C50\u5C59\u5B71\u5C63\u5C66\u7FBC\u5F2A\u5F29\u5F2D\u8274\u5F3C\u9B3B\u5C6E\u5981\u5983\u598D\u59A9\u59AA\u59A3"],["e640","\u936C",34,"\u9390",27],["e680","\u93AC",29,"\u93CB\u93CC\u93CD\u5997\u59CA\u59AB\u599E\u59A4\u59D2\u59B2\u59AF\u59D7\u59BE\u5A05\u5A06\u59DD\u5A08\u59E3\u59D8\u59F9\u5A0C\u5A09\u5A32\u5A34\u5A11\u5A23\u5A13\u5A40\u5A67\u5A4A\u5A55\u5A3C\u5A62\u5A75\u80EC\u5AAA\u5A9B\u5A77\u5A7A\u5ABE\u5AEB\u5AB2\u5AD2\u5AD4\u5AB8\u5AE0\u5AE3\u5AF1\u5AD6\u5AE6\u5AD8\u5ADC\u5B09\u5B17\u5B16\u5B32\u5B37\u5B40\u5C15\u5C1C\u5B5A\u5B65\u5B73\u5B51\u5B53\u5B62\u9A75\u9A77\u9A78\u9A7A\u9A7F\u9A7D\u9A80\u9A81\u9A85\u9A88\u9A8A\u9A90\u9A92\u9A93\u9A96\u9A98\u9A9B\u9A9C\u9A9D\u9A9F\u9AA0\u9AA2\u9AA3\u9AA5\u9AA7\u7E9F\u7EA1\u7EA3\u7EA5\u7EA8\u7EA9"],["e740","\u93CE",7,"\u93D7",54],["e780","\u940E",32,"\u7EAD\u7EB0\u7EBE\u7EC0\u7EC1\u7EC2\u7EC9\u7ECB\u7ECC\u7ED0\u7ED4\u7ED7\u7EDB\u7EE0\u7EE1\u7EE8\u7EEB\u7EEE\u7EEF\u7EF1\u7EF2\u7F0D\u7EF6\u7EFA\u7EFB\u7EFE\u7F01\u7F02\u7F03\u7F07\u7F08\u7F0B\u7F0C\u7F0F\u7F11\u7F12\u7F17\u7F19\u7F1C\u7F1B\u7F1F\u7F21",6,"\u7F2A\u7F2B\u7F2C\u7F2D\u7F2F",4,"\u7F35\u5E7A\u757F\u5DDB\u753E\u9095\u738E\u7391\u73AE\u73A2\u739F\u73CF\u73C2\u73D1\u73B7\u73B3\u73C0\u73C9\u73C8\u73E5\u73D9\u987C\u740A\u73E9\u73E7\u73DE\u73BA\u73F2\u740F\u742A\u745B\u7426\u7425\u7428\u7430\u742E\u742C"],["e840","\u942F",14,"\u943F",43,"\u946C\u946D\u946E\u946F"],["e880","\u9470",20,"\u9491\u9496\u9498\u94C7\u94CF\u94D3\u94D4\u94DA\u94E6\u94FB\u951C\u9520\u741B\u741A\u7441\u745C\u7457\u7455\u7459\u7477\u746D\u747E\u749C\u748E\u7480\u7481\u7487\u748B\u749E\u74A8\u74A9\u7490\u74A7\u74D2\u74BA\u97EA\u97EB\u97EC\u674C\u6753\u675E\u6748\u6769\u67A5\u6787\u676A\u6773\u6798\u67A7\u6775\u67A8\u679E\u67AD\u678B\u6777\u677C\u67F0\u6809\u67D8\u680A\u67E9\u67B0\u680C\u67D9\u67B5\u67DA\u67B3\u67DD\u6800\u67C3\u67B8\u67E2\u680E\u67C1\u67FD\u6832\u6833\u6860\u6861\u684E\u6862\u6844\u6864\u6883\u681D\u6855\u6866\u6841\u6867\u6840\u683E\u684A\u6849\u6829\u68B5\u688F\u6874\u6877\u6893\u686B\u68C2\u696E\u68FC\u691F\u6920\u68F9"],["e940","\u9527\u9533\u953D\u9543\u9548\u954B\u9555\u955A\u9560\u956E\u9574\u9575\u9577",7,"\u9580",42],["e980","\u95AB",32,"\u6924\u68F0\u690B\u6901\u6957\u68E3\u6910\u6971\u6939\u6960\u6942\u695D\u6984\u696B\u6980\u6998\u6978\u6934\u69CC\u6987\u6988\u69CE\u6989\u6966\u6963\u6979\u699B\u69A7\u69BB\u69AB\u69AD\u69D4\u69B1\u69C1\u69CA\u69DF\u6995\u69E0\u698D\u69FF\u6A2F\u69ED\u6A17\u6A18\u6A65\u69F2\u6A44\u6A3E\u6AA0\u6A50\u6A5B\u6A35\u6A8E\u6A79\u6A3D\u6A28\u6A58\u6A7C\u6A91\u6A90\u6AA9\u6A97\u6AAB\u7337\u7352\u6B81\u6B82\u6B87\u6B84\u6B92\u6B93\u6B8D\u6B9A\u6B9B\u6BA1\u6BAA\u8F6B\u8F6D\u8F71\u8F72\u8F73\u8F75\u8F76\u8F78\u8F77\u8F79\u8F7A\u8F7C\u8F7E\u8F81\u8F82\u8F84\u8F87\u8F8B"],["ea40","\u95CC",27,"\u95EC\u95FF\u9607\u9613\u9618\u961B\u961E\u9620\u9623",6,"\u962B\u962C\u962D\u962F\u9630\u9637\u9638\u9639\u963A\u963E\u9641\u9643\u964A\u964E\u964F\u9651\u9652\u9653\u9656\u9657"],["ea80","\u9658\u9659\u965A\u965C\u965D\u965E\u9660\u9663\u9665\u9666\u966B\u966D",4,"\u9673\u9678",12,"\u9687\u9689\u968A\u8F8D\u8F8E\u8F8F\u8F98\u8F9A\u8ECE\u620B\u6217\u621B\u621F\u6222\u6221\u6225\u6224\u622C\u81E7\u74EF\u74F4\u74FF\u750F\u7511\u7513\u6534\u65EE\u65EF\u65F0\u660A\u6619\u6772\u6603\u6615\u6600\u7085\u66F7\u661D\u6634\u6631\u6636\u6635\u8006\u665F\u6654\u6641\u664F\u6656\u6661\u6657\u6677\u6684\u668C\u66A7\u669D\u66BE\u66DB\u66DC\u66E6\u66E9\u8D32\u8D33\u8D36\u8D3B\u8D3D\u8D40\u8D45\u8D46\u8D48\u8D49\u8D47\u8D4D\u8D55\u8D59\u89C7\u89CA\u89CB\u89CC\u89CE\u89CF\u89D0\u89D1\u726E\u729F\u725D\u7266\u726F\u727E\u727F\u7284\u728B\u728D\u728F\u7292\u6308\u6332\u63B0"],["eb40","\u968C\u968E\u9691\u9692\u9693\u9695\u9696\u969A\u969B\u969D",9,"\u96A8",7,"\u96B1\u96B2\u96B4\u96B5\u96B7\u96B8\u96BA\u96BB\u96BF\u96C2\u96C3\u96C8\u96CA\u96CB\u96D0\u96D1\u96D3\u96D4\u96D6",9,"\u96E1",6,"\u96EB"],["eb80","\u96EC\u96ED\u96EE\u96F0\u96F1\u96F2\u96F4\u96F5\u96F8\u96FA\u96FB\u96FC\u96FD\u96FF\u9702\u9703\u9705\u970A\u970B\u970C\u9710\u9711\u9712\u9714\u9715\u9717",4,"\u971D\u971F\u9720\u643F\u64D8\u8004\u6BEA\u6BF3\u6BFD\u6BF5\u6BF9\u6C05\u6C07\u6C06\u6C0D\u6C15\u6C18\u6C19\u6C1A\u6C21\u6C29\u6C24\u6C2A\u6C32\u6535\u6555\u656B\u724D\u7252\u7256\u7230\u8662\u5216\u809F\u809C\u8093\u80BC\u670A\u80BD\u80B1\u80AB\u80AD\u80B4\u80B7\u80E7\u80E8\u80E9\u80EA\u80DB\u80C2\u80C4\u80D9\u80CD\u80D7\u6710\u80DD\u80EB\u80F1\u80F4\u80ED\u810D\u810E\u80F2\u80FC\u6715\u8112\u8C5A\u8136\u811E\u812C\u8118\u8132\u8148\u814C\u8153\u8174\u8159\u815A\u8171\u8160\u8169\u817C\u817D\u816D\u8167\u584D\u5AB5\u8188\u8182\u8191\u6ED5\u81A3\u81AA\u81CC\u6726\u81CA\u81BB"],["ec40","\u9721",8,"\u972B\u972C\u972E\u972F\u9731\u9733",4,"\u973A\u973B\u973C\u973D\u973F",18,"\u9754\u9755\u9757\u9758\u975A\u975C\u975D\u975F\u9763\u9764\u9766\u9767\u9768\u976A",7],["ec80","\u9772\u9775\u9777",4,"\u977D",7,"\u9786",4,"\u978C\u978E\u978F\u9790\u9793\u9795\u9796\u9797\u9799",4,"\u81C1\u81A6\u6B24\u6B37\u6B39\u6B43\u6B46\u6B59\u98D1\u98D2\u98D3\u98D5\u98D9\u98DA\u6BB3\u5F40\u6BC2\u89F3\u6590\u9F51\u6593\u65BC\u65C6\u65C4\u65C3\u65CC\u65CE\u65D2\u65D6\u7080\u709C\u7096\u709D\u70BB\u70C0\u70B7\u70AB\u70B1\u70E8\u70CA\u7110\u7113\u7116\u712F\u7131\u7173\u715C\u7168\u7145\u7172\u714A\u7178\u717A\u7198\u71B3\u71B5\u71A8\u71A0\u71E0\u71D4\u71E7\u71F9\u721D\u7228\u706C\u7118\u7166\u71B9\u623E\u623D\u6243\u6248\u6249\u793B\u7940\u7946\u7949\u795B\u795C\u7953\u795A\u7962\u7957\u7960\u796F\u7967\u797A\u7985\u798A\u799A\u79A7\u79B3\u5FD1\u5FD0"],["ed40","\u979E\u979F\u97A1\u97A2\u97A4",6,"\u97AC\u97AE\u97B0\u97B1\u97B3\u97B5",46],["ed80","\u97E4\u97E5\u97E8\u97EE",4,"\u97F4\u97F7",23,"\u603C\u605D\u605A\u6067\u6041\u6059\u6063\u60AB\u6106\u610D\u615D\u61A9\u619D\u61CB\u61D1\u6206\u8080\u807F\u6C93\u6CF6\u6DFC\u77F6\u77F8\u7800\u7809\u7817\u7818\u7811\u65AB\u782D\u781C\u781D\u7839\u783A\u783B\u781F\u783C\u7825\u782C\u7823\u7829\u784E\u786D\u7856\u7857\u7826\u7850\u7847\u784C\u786A\u789B\u7893\u789A\u7887\u789C\u78A1\u78A3\u78B2\u78B9\u78A5\u78D4\u78D9\u78C9\u78EC\u78F2\u7905\u78F4\u7913\u7924\u791E\u7934\u9F9B\u9EF9\u9EFB\u9EFC\u76F1\u7704\u770D\u76F9\u7707\u7708\u771A\u7722\u7719\u772D\u7726\u7735\u7738\u7750\u7751\u7747\u7743\u775A\u7768"],["ee40","\u980F",62],["ee80","\u984E",32,"\u7762\u7765\u777F\u778D\u777D\u7780\u778C\u7791\u779F\u77A0\u77B0\u77B5\u77BD\u753A\u7540\u754E\u754B\u7548\u755B\u7572\u7579\u7583\u7F58\u7F61\u7F5F\u8A48\u7F68\u7F74\u7F71\u7F79\u7F81\u7F7E\u76CD\u76E5\u8832\u9485\u9486\u9487\u948B\u948A\u948C\u948D\u948F\u9490\u9494\u9497\u9495\u949A\u949B\u949C\u94A3\u94A4\u94AB\u94AA\u94AD\u94AC\u94AF\u94B0\u94B2\u94B4\u94B6",4,"\u94BC\u94BD\u94BF\u94C4\u94C8",6,"\u94D0\u94D1\u94D2\u94D5\u94D6\u94D7\u94D9\u94D8\u94DB\u94DE\u94DF\u94E0\u94E2\u94E4\u94E5\u94E7\u94E8\u94EA"],["ef40","\u986F",5,"\u988B\u988E\u9892\u9895\u9899\u98A3\u98A8",37,"\u98CF\u98D0\u98D4\u98D6\u98D7\u98DB\u98DC\u98DD\u98E0",4],["ef80","\u98E5\u98E6\u98E9",30,"\u94E9\u94EB\u94EE\u94EF\u94F3\u94F4\u94F5\u94F7\u94F9\u94FC\u94FD\u94FF\u9503\u9502\u9506\u9507\u9509\u950A\u950D\u950E\u950F\u9512",4,"\u9518\u951B\u951D\u951E\u951F\u9522\u952A\u952B\u9529\u952C\u9531\u9532\u9534\u9536\u9537\u9538\u953C\u953E\u953F\u9542\u9535\u9544\u9545\u9546\u9549\u954C\u954E\u954F\u9552\u9553\u9554\u9556\u9557\u9558\u9559\u955B\u955E\u955F\u955D\u9561\u9562\u9564",8,"\u956F\u9571\u9572\u9573\u953A\u77E7\u77EC\u96C9\u79D5\u79ED\u79E3\u79EB\u7A06\u5D47\u7A03\u7A02\u7A1E\u7A14"],["f040","\u9908",4,"\u990E\u990F\u9911",28,"\u992F",26],["f080","\u994A",9,"\u9956",12,"\u9964\u9966\u9973\u9978\u9979\u997B\u997E\u9982\u9983\u9989\u7A39\u7A37\u7A51\u9ECF\u99A5\u7A70\u7688\u768E\u7693\u7699\u76A4\u74DE\u74E0\u752C\u9E20\u9E22\u9E28",4,"\u9E32\u9E31\u9E36\u9E38\u9E37\u9E39\u9E3A\u9E3E\u9E41\u9E42\u9E44\u9E46\u9E47\u9E48\u9E49\u9E4B\u9E4C\u9E4E\u9E51\u9E55\u9E57\u9E5A\u9E5B\u9E5C\u9E5E\u9E63\u9E66",6,"\u9E71\u9E6D\u9E73\u7592\u7594\u7596\u75A0\u759D\u75AC\u75A3\u75B3\u75B4\u75B8\u75C4\u75B1\u75B0\u75C3\u75C2\u75D6\u75CD\u75E3\u75E8\u75E6\u75E4\u75EB\u75E7\u7603\u75F1\u75FC\u75FF\u7610\u7600\u7605\u760C\u7617\u760A\u7625\u7618\u7615\u7619"],["f140","\u998C\u998E\u999A",10,"\u99A6\u99A7\u99A9",47],["f180","\u99D9",32,"\u761B\u763C\u7622\u7620\u7640\u762D\u7630\u763F\u7635\u7643\u763E\u7633\u764D\u765E\u7654\u765C\u7656\u766B\u766F\u7FCA\u7AE6\u7A78\u7A79\u7A80\u7A86\u7A88\u7A95\u7AA6\u7AA0\u7AAC\u7AA8\u7AAD\u7AB3\u8864\u8869\u8872\u887D\u887F\u8882\u88A2\u88C6\u88B7\u88BC\u88C9\u88E2\u88CE\u88E3\u88E5\u88F1\u891A\u88FC\u88E8\u88FE\u88F0\u8921\u8919\u8913\u891B\u890A\u8934\u892B\u8936\u8941\u8966\u897B\u758B\u80E5\u76B2\u76B4\u77DC\u8012\u8014\u8016\u801C\u8020\u8022\u8025\u8026\u8027\u8029\u8028\u8031\u800B\u8035\u8043\u8046\u804D\u8052\u8069\u8071\u8983\u9878\u9880\u9883"],["f240","\u99FA",62],["f280","\u9A39",32,"\u9889\u988C\u988D\u988F\u9894\u989A\u989B\u989E\u989F\u98A1\u98A2\u98A5\u98A6\u864D\u8654\u866C\u866E\u867F\u867A\u867C\u867B\u86A8\u868D\u868B\u86AC\u869D\u86A7\u86A3\u86AA\u8693\u86A9\u86B6\u86C4\u86B5\u86CE\u86B0\u86BA\u86B1\u86AF\u86C9\u86CF\u86B4\u86E9\u86F1\u86F2\u86ED\u86F3\u86D0\u8713\u86DE\u86F4\u86DF\u86D8\u86D1\u8703\u8707\u86F8\u8708\u870A\u870D\u8709\u8723\u873B\u871E\u8725\u872E\u871A\u873E\u8748\u8734\u8731\u8729\u8737\u873F\u8782\u8722\u877D\u877E\u877B\u8760\u8770\u874C\u876E\u878B\u8753\u8763\u877C\u8764\u8759\u8765\u8793\u87AF\u87A8\u87D2"],["f340","\u9A5A",17,"\u9A72\u9A83\u9A89\u9A8D\u9A8E\u9A94\u9A95\u9A99\u9AA6\u9AA9",6,"\u9AB2\u9AB3\u9AB4\u9AB5\u9AB9\u9ABB\u9ABD\u9ABE\u9ABF\u9AC3\u9AC4\u9AC6",4,"\u9ACD\u9ACE\u9ACF\u9AD0\u9AD2\u9AD4\u9AD5\u9AD6\u9AD7\u9AD9\u9ADA\u9ADB\u9ADC"],["f380","\u9ADD\u9ADE\u9AE0\u9AE2\u9AE3\u9AE4\u9AE5\u9AE7\u9AE8\u9AE9\u9AEA\u9AEC\u9AEE\u9AF0",8,"\u9AFA\u9AFC",6,"\u9B04\u9B05\u9B06\u87C6\u8788\u8785\u87AD\u8797\u8783\u87AB\u87E5\u87AC\u87B5\u87B3\u87CB\u87D3\u87BD\u87D1\u87C0\u87CA\u87DB\u87EA\u87E0\u87EE\u8816\u8813\u87FE\u880A\u881B\u8821\u8839\u883C\u7F36\u7F42\u7F44\u7F45\u8210\u7AFA\u7AFD\u7B08\u7B03\u7B04\u7B15\u7B0A\u7B2B\u7B0F\u7B47\u7B38\u7B2A\u7B19\u7B2E\u7B31\u7B20\u7B25\u7B24\u7B33\u7B3E\u7B1E\u7B58\u7B5A\u7B45\u7B75\u7B4C\u7B5D\u7B60\u7B6E\u7B7B\u7B62\u7B72\u7B71\u7B90\u7BA6\u7BA7\u7BB8\u7BAC\u7B9D\u7BA8\u7B85\u7BAA\u7B9C\u7BA2\u7BAB\u7BB4\u7BD1\u7BC1\u7BCC\u7BDD\u7BDA\u7BE5\u7BE6\u7BEA\u7C0C\u7BFE\u7BFC\u7C0F\u7C16\u7C0B"],["f440","\u9B07\u9B09",5,"\u9B10\u9B11\u9B12\u9B14",10,"\u9B20\u9B21\u9B22\u9B24",10,"\u9B30\u9B31\u9B33",7,"\u9B3D\u9B3E\u9B3F\u9B40\u9B46\u9B4A\u9B4B\u9B4C\u9B4E\u9B50\u9B52\u9B53\u9B55",5],["f480","\u9B5B",32,"\u7C1F\u7C2A\u7C26\u7C38\u7C41\u7C40\u81FE\u8201\u8202\u8204\u81EC\u8844\u8221\u8222\u8223\u822D\u822F\u8228\u822B\u8238\u823B\u8233\u8234\u823E\u8244\u8249\u824B\u824F\u825A\u825F\u8268\u887E\u8885\u8888\u88D8\u88DF\u895E\u7F9D\u7F9F\u7FA7\u7FAF\u7FB0\u7FB2\u7C7C\u6549\u7C91\u7C9D\u7C9C\u7C9E\u7CA2\u7CB2\u7CBC\u7CBD\u7CC1\u7CC7\u7CCC\u7CCD\u7CC8\u7CC5\u7CD7\u7CE8\u826E\u66A8\u7FBF\u7FCE\u7FD5\u7FE5\u7FE1\u7FE6\u7FE9\u7FEE\u7FF3\u7CF8\u7D77\u7DA6\u7DAE\u7E47\u7E9B\u9EB8\u9EB4\u8D73\u8D84\u8D94\u8D91\u8DB1\u8D67\u8D6D\u8C47\u8C49\u914A\u9150\u914E\u914F\u9164"],["f540","\u9B7C",62],["f580","\u9BBB",32,"\u9162\u9161\u9170\u9169\u916F\u917D\u917E\u9172\u9174\u9179\u918C\u9185\u9190\u918D\u9191\u91A2\u91A3\u91AA\u91AD\u91AE\u91AF\u91B5\u91B4\u91BA\u8C55\u9E7E\u8DB8\u8DEB\u8E05\u8E59\u8E69\u8DB5\u8DBF\u8DBC\u8DBA\u8DC4\u8DD6\u8DD7\u8DDA\u8DDE\u8DCE\u8DCF\u8DDB\u8DC6\u8DEC\u8DF7\u8DF8\u8DE3\u8DF9\u8DFB\u8DE4\u8E09\u8DFD\u8E14\u8E1D\u8E1F\u8E2C\u8E2E\u8E23\u8E2F\u8E3A\u8E40\u8E39\u8E35\u8E3D\u8E31\u8E49\u8E41\u8E42\u8E51\u8E52\u8E4A\u8E70\u8E76\u8E7C\u8E6F\u8E74\u8E85\u8E8F\u8E94\u8E90\u8E9C\u8E9E\u8C78\u8C82\u8C8A\u8C85\u8C98\u8C94\u659B\u89D6\u89DE\u89DA\u89DC"],["f640","\u9BDC",62],["f680","\u9C1B",32,"\u89E5\u89EB\u89EF\u8A3E\u8B26\u9753\u96E9\u96F3\u96EF\u9706\u9701\u9708\u970F\u970E\u972A\u972D\u9730\u973E\u9F80\u9F83\u9F85",5,"\u9F8C\u9EFE\u9F0B\u9F0D\u96B9\u96BC\u96BD\u96CE\u96D2\u77BF\u96E0\u928E\u92AE\u92C8\u933E\u936A\u93CA\u938F\u943E\u946B\u9C7F\u9C82\u9C85\u9C86\u9C87\u9C88\u7A23\u9C8B\u9C8E\u9C90\u9C91\u9C92\u9C94\u9C95\u9C9A\u9C9B\u9C9E",5,"\u9CA5",4,"\u9CAB\u9CAD\u9CAE\u9CB0",7,"\u9CBA\u9CBB\u9CBC\u9CBD\u9CC4\u9CC5\u9CC6\u9CC7\u9CCA\u9CCB"],["f740","\u9C3C",62],["f780","\u9C7B\u9C7D\u9C7E\u9C80\u9C83\u9C84\u9C89\u9C8A\u9C8C\u9C8F\u9C93\u9C96\u9C97\u9C98\u9C99\u9C9D\u9CAA\u9CAC\u9CAF\u9CB9\u9CBE",4,"\u9CC8\u9CC9\u9CD1\u9CD2\u9CDA\u9CDB\u9CE0\u9CE1\u9CCC",4,"\u9CD3\u9CD4\u9CD5\u9CD7\u9CD8\u9CD9\u9CDC\u9CDD\u9CDF\u9CE2\u977C\u9785\u9791\u9792\u9794\u97AF\u97AB\u97A3\u97B2\u97B4\u9AB1\u9AB0\u9AB7\u9E58\u9AB6\u9ABA\u9ABC\u9AC1\u9AC0\u9AC5\u9AC2\u9ACB\u9ACC\u9AD1\u9B45\u9B43\u9B47\u9B49\u9B48\u9B4D\u9B51\u98E8\u990D\u992E\u9955\u9954\u9ADF\u9AE1\u9AE6\u9AEF\u9AEB\u9AFB\u9AED\u9AF9\u9B08\u9B0F\u9B13\u9B1F\u9B23\u9EBD\u9EBE\u7E3B\u9E82\u9E87\u9E88\u9E8B\u9E92\u93D6\u9E9D\u9E9F\u9EDB\u9EDC\u9EDD\u9EE0\u9EDF\u9EE2\u9EE9\u9EE7\u9EE5\u9EEA\u9EEF\u9F22\u9F2C\u9F2F\u9F39\u9F37\u9F3D\u9F3E\u9F44"],["f840","\u9CE3",62],["f880","\u9D22",32],["f940","\u9D43",62],["f980","\u9D82",32],["fa40","\u9DA3",62],["fa80","\u9DE2",32],["fb40","\u9E03",27,"\u9E24\u9E27\u9E2E\u9E30\u9E34\u9E3B\u9E3C\u9E40\u9E4D\u9E50\u9E52\u9E53\u9E54\u9E56\u9E59\u9E5D\u9E5F\u9E60\u9E61\u9E62\u9E65\u9E6E\u9E6F\u9E72\u9E74",9,"\u9E80"],["fb80","\u9E81\u9E83\u9E84\u9E85\u9E86\u9E89\u9E8A\u9E8C",5,"\u9E94",8,"\u9E9E\u9EA0",5,"\u9EA7\u9EA8\u9EA9\u9EAA"],["fc40","\u9EAB",8,"\u9EB5\u9EB6\u9EB7\u9EB9\u9EBA\u9EBC\u9EBF",4,"\u9EC5\u9EC6\u9EC7\u9EC8\u9ECA\u9ECB\u9ECC\u9ED0\u9ED2\u9ED3\u9ED5\u9ED6\u9ED7\u9ED9\u9EDA\u9EDE\u9EE1\u9EE3\u9EE4\u9EE6\u9EE8\u9EEB\u9EEC\u9EED\u9EEE\u9EF0",8,"\u9EFA\u9EFD\u9EFF",6],["fc80","\u9F06",4,"\u9F0C\u9F0F\u9F11\u9F12\u9F14\u9F15\u9F16\u9F18\u9F1A",5,"\u9F21\u9F23",8,"\u9F2D\u9F2E\u9F30\u9F31"],["fd40","\u9F32",4,"\u9F38\u9F3A\u9F3C\u9F3F",4,"\u9F45",10,"\u9F52",38],["fd80","\u9F79",5,"\u9F81\u9F82\u9F8D",11,"\u9F9C\u9F9D\u9F9E\u9FA1",4,"\uF92C\uF979\uF995\uF9E7\uF9F1"],["fe40","\uFA0C\uFA0D\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA18\uFA1F\uFA20\uFA21\uFA23\uFA24\uFA27\uFA28\uFA29"]]});var Zd0=o((iM7,fV9)=>{fV9.exports=[["a140","\uE4C6",62],["a180","\uE505",32],["a240","\uE526",62],["a280","\uE565",32],["a2ab","\uE766",5],["a2e3","\u20AC\uE76D"],["a2ef","\uE76E\uE76F"],["a2fd","\uE770\uE771"],["a340","\uE586",62],["a380","\uE5C5",31,"\u3000"],["a440","\uE5E6",62],["a480","\uE625",32],["a4f4","\uE772",10],["a540","\uE646",62],["a580","\uE685",32],["a5f7","\uE77D",7],["a640","\uE6A6",62],["a680","\uE6E5",32],["a6b9","\uE785",7],["a6d9","\uE78D",6],["a6ec","\uE794\uE795"],["a6f3","\uE796"],["a6f6","\uE797",8],["a740","\uE706",62],["a780","\uE745",32],["a7c2","\uE7A0",14],["a7f2","\uE7AF",12],["a896","\uE7BC",10],["a8bc","\uE7C7"],["a8bf","\u01F9"],["a8c1","\uE7C9\uE7CA\uE7CB\uE7CC"],["a8ea","\uE7CD",20],["a958","\uE7E2"],["a95b","\uE7E3"],["a95d","\uE7E4\uE7E5\uE7E6"],["a989","\u303E\u2FF0",11],["a997","\uE7F4",12],["a9f0","\uE801",14],["aaa1","\uE000",93],["aba1","\uE05E",93],["aca1","\uE0BC",93],["ada1","\uE11A",93],["aea1","\uE178",93],["afa1","\uE1D6",93],["d7fa","\uE810",4],["f8a1","\uE234",93],["f9a1","\uE292",93],["faa1","\uE2F0",93],["fba1","\uE34E",93],["fca1","\uE3AC",93],["fda1","\uE40A",93],["fe50","\u2E81\uE816\uE817\uE818\u2E84\u3473\u3447\u2E88\u2E8B\uE81E\u359E\u361A\u360E\u2E8C\u2E97\u396E\u3918\uE826\u39CF\u39DF\u3A73\u39D0\uE82B\uE82C\u3B4E\u3C6E\u3CE0\u2EA7\uE831\uE832\u2EAA\u4056\u415F\u2EAE\u4337\u2EB3\u2EB6\u2EB7\uE83B\u43B1\u43AC\u2EBB\u43DD\u44D6\u4661\u464C\uE843"],["fe80","\u4723\u4729\u477C\u478D\u2ECA\u4947\u497A\u497D\u4982\u4983\u4985\u4986\u499F\u499B\u49B7\u49B6\uE854\uE855\u4CA3\u4C9F\u4CA0\u4CA1\u4C77\u4CA2\u4D13",6,"\u4DAE\uE864\uE468",93]]});var lL4=o((nM7,gV9)=>{gV9.exports={uChars:[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],gbChars:[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}});var iL4=o((rM7,mV9)=>{mV9.exports=[["0","\x00",127],["8141","\uAC02\uAC03\uAC05\uAC06\uAC0B",4,"\uAC18\uAC1E\uAC1F\uAC21\uAC22\uAC23\uAC25",6,"\uAC2E\uAC32\uAC33\uAC34"],["8161","\uAC35\uAC36\uAC37\uAC3A\uAC3B\uAC3D\uAC3E\uAC3F\uAC41",9,"\uAC4C\uAC4E",5,"\uAC55"],["8181","\uAC56\uAC57\uAC59\uAC5A\uAC5B\uAC5D",18,"\uAC72\uAC73\uAC75\uAC76\uAC79\uAC7B",4,"\uAC82\uAC87\uAC88\uAC8D\uAC8E\uAC8F\uAC91\uAC92\uAC93\uAC95",6,"\uAC9E\uACA2",5,"\uACAB\uACAD\uACAE\uACB1",6,"\uACBA\uACBE\uACBF\uACC0\uACC2\uACC3\uACC5\uACC6\uACC7\uACC9\uACCA\uACCB\uACCD",7,"\uACD6\uACD8",7,"\uACE2\uACE3\uACE5\uACE6\uACE9\uACEB\uACED\uACEE\uACF2\uACF4\uACF7",4,"\uACFE\uACFF\uAD01\uAD02\uAD03\uAD05\uAD07",4,"\uAD0E\uAD10\uAD12\uAD13"],["8241","\uAD14\uAD15\uAD16\uAD17\uAD19\uAD1A\uAD1B\uAD1D\uAD1E\uAD1F\uAD21",7,"\uAD2A\uAD2B\uAD2E",5],["8261","\uAD36\uAD37\uAD39\uAD3A\uAD3B\uAD3D",6,"\uAD46\uAD48\uAD4A",5,"\uAD51\uAD52\uAD53\uAD55\uAD56\uAD57"],["8281","\uAD59",7,"\uAD62\uAD64",7,"\uAD6E\uAD6F\uAD71\uAD72\uAD77\uAD78\uAD79\uAD7A\uAD7E\uAD80\uAD83",4,"\uAD8A\uAD8B\uAD8D\uAD8E\uAD8F\uAD91",10,"\uAD9E",5,"\uADA5",17,"\uADB8",7,"\uADC2\uADC3\uADC5\uADC6\uADC7\uADC9",6,"\uADD2\uADD4",7,"\uADDD\uADDE\uADDF\uADE1\uADE2\uADE3\uADE5",18],["8341","\uADFA\uADFB\uADFD\uADFE\uAE02",5,"\uAE0A\uAE0C\uAE0E",5,"\uAE15",7],["8361","\uAE1D",18,"\uAE32\uAE33\uAE35\uAE36\uAE39\uAE3B\uAE3C"],["8381","\uAE3D\uAE3E\uAE3F\uAE42\uAE44\uAE47\uAE48\uAE49\uAE4B\uAE4F\uAE51\uAE52\uAE53\uAE55\uAE57",4,"\uAE5E\uAE62\uAE63\uAE64\uAE66\uAE67\uAE6A\uAE6B\uAE6D\uAE6E\uAE6F\uAE71",6,"\uAE7A\uAE7E",5,"\uAE86",5,"\uAE8D",46,"\uAEBF\uAEC1\uAEC2\uAEC3\uAEC5",6,"\uAECE\uAED2",5,"\uAEDA\uAEDB\uAEDD",8],["8441","\uAEE6\uAEE7\uAEE9\uAEEA\uAEEC\uAEEE",5,"\uAEF5\uAEF6\uAEF7\uAEF9\uAEFA\uAEFB\uAEFD",8],["8461","\uAF06\uAF09\uAF0A\uAF0B\uAF0C\uAF0E\uAF0F\uAF11",18],["8481","\uAF24",7,"\uAF2E\uAF2F\uAF31\uAF33\uAF35",6,"\uAF3E\uAF40\uAF44\uAF45\uAF46\uAF47\uAF4A",5,"\uAF51",10,"\uAF5E",5,"\uAF66",18,"\uAF7A",5,"\uAF81\uAF82\uAF83\uAF85\uAF86\uAF87\uAF89",6,"\uAF92\uAF93\uAF94\uAF96",5,"\uAF9D",26,"\uAFBA\uAFBB\uAFBD\uAFBE"],["8541","\uAFBF\uAFC1",5,"\uAFCA\uAFCC\uAFCF",4,"\uAFD5",6,"\uAFDD",4],["8561","\uAFE2",5,"\uAFEA",5,"\uAFF2\uAFF3\uAFF5\uAFF6\uAFF7\uAFF9",6,"\uB002\uB003"],["8581","\uB005",6,"\uB00D\uB00E\uB00F\uB011\uB012\uB013\uB015",6,"\uB01E",9,"\uB029",26,"\uB046\uB047\uB049\uB04B\uB04D\uB04F\uB050\uB051\uB052\uB056\uB058\uB05A\uB05B\uB05C\uB05E",29,"\uB07E\uB07F\uB081\uB082\uB083\uB085",6,"\uB08E\uB090\uB092",5,"\uB09B\uB09D\uB09E\uB0A3\uB0A4"],["8641","\uB0A5\uB0A6\uB0A7\uB0AA\uB0B0\uB0B2\uB0B6\uB0B7\uB0B9\uB0BA\uB0BB\uB0BD",6,"\uB0C6\uB0CA",5,"\uB0D2"],["8661","\uB0D3\uB0D5\uB0D6\uB0D7\uB0D9",6,"\uB0E1\uB0E2\uB0E3\uB0E4\uB0E6",10],["8681","\uB0F1",22,"\uB10A\uB10D\uB10E\uB10F\uB111\uB114\uB115\uB116\uB117\uB11A\uB11E",4,"\uB126\uB127\uB129\uB12A\uB12B\uB12D",6,"\uB136\uB13A",5,"\uB142\uB143\uB145\uB146\uB147\uB149",6,"\uB152\uB153\uB156\uB157\uB159\uB15A\uB15B\uB15D\uB15E\uB15F\uB161",22,"\uB17A\uB17B\uB17D\uB17E\uB17F\uB181\uB183",4,"\uB18A\uB18C\uB18E\uB18F\uB190\uB191\uB195\uB196\uB197\uB199\uB19A\uB19B\uB19D"],["8741","\uB19E",9,"\uB1A9",15],["8761","\uB1B9",18,"\uB1CD\uB1CE\uB1CF\uB1D1\uB1D2\uB1D3\uB1D5"],["8781","\uB1D6",5,"\uB1DE\uB1E0",7,"\uB1EA\uB1EB\uB1ED\uB1EE\uB1EF\uB1F1",7,"\uB1FA\uB1FC\uB1FE",5,"\uB206\uB207\uB209\uB20A\uB20D",6,"\uB216\uB218\uB21A",5,"\uB221",18,"\uB235",6,"\uB23D",26,"\uB259\uB25A\uB25B\uB25D\uB25E\uB25F\uB261",6,"\uB26A",4],["8841","\uB26F",4,"\uB276",5,"\uB27D",6,"\uB286\uB287\uB288\uB28A",4],["8861","\uB28F\uB292\uB293\uB295\uB296\uB297\uB29B",4,"\uB2A2\uB2A4\uB2A7\uB2A8\uB2A9\uB2AB\uB2AD\uB2AE\uB2AF\uB2B1\uB2B2\uB2B3\uB2B5\uB2B6\uB2B7"],["8881","\uB2B8",15,"\uB2CA\uB2CB\uB2CD\uB2CE\uB2CF\uB2D1\uB2D3",4,"\uB2DA\uB2DC\uB2DE\uB2DF\uB2E0\uB2E1\uB2E3\uB2E7\uB2E9\uB2EA\uB2F0\uB2F1\uB2F2\uB2F6\uB2FC\uB2FD\uB2FE\uB302\uB303\uB305\uB306\uB307\uB309",6,"\uB312\uB316",5,"\uB31D",54,"\uB357\uB359\uB35A\uB35D\uB360\uB361\uB362\uB363"],["8941","\uB366\uB368\uB36A\uB36C\uB36D\uB36F\uB372\uB373\uB375\uB376\uB377\uB379",6,"\uB382\uB386",5,"\uB38D"],["8961","\uB38E\uB38F\uB391\uB392\uB393\uB395",10,"\uB3A2",5,"\uB3A9\uB3AA\uB3AB\uB3AD"],["8981","\uB3AE",21,"\uB3C6\uB3C7\uB3C9\uB3CA\uB3CD\uB3CF\uB3D1\uB3D2\uB3D3\uB3D6\uB3D8\uB3DA\uB3DC\uB3DE\uB3DF\uB3E1\uB3E2\uB3E3\uB3E5\uB3E6\uB3E7\uB3E9",18,"\uB3FD",18,"\uB411",6,"\uB419\uB41A\uB41B\uB41D\uB41E\uB41F\uB421",6,"\uB42A\uB42C",7,"\uB435",15],["8a41","\uB445",10,"\uB452\uB453\uB455\uB456\uB457\uB459",6,"\uB462\uB464\uB466"],["8a61","\uB467",4,"\uB46D",18,"\uB481\uB482"],["8a81","\uB483",4,"\uB489",19,"\uB49E",5,"\uB4A5\uB4A6\uB4A7\uB4A9\uB4AA\uB4AB\uB4AD",7,"\uB4B6\uB4B8\uB4BA",5,"\uB4C1\uB4C2\uB4C3\uB4C5\uB4C6\uB4C7\uB4C9",6,"\uB4D1\uB4D2\uB4D3\uB4D4\uB4D6",5,"\uB4DE\uB4DF\uB4E1\uB4E2\uB4E5\uB4E7",4,"\uB4EE\uB4F0\uB4F2",5,"\uB4F9",26,"\uB516\uB517\uB519\uB51A\uB51D"],["8b41","\uB51E",5,"\uB526\uB52B",4,"\uB532\uB533\uB535\uB536\uB537\uB539",6,"\uB542\uB546"],["8b61","\uB547\uB548\uB549\uB54A\uB54E\uB54F\uB551\uB552\uB553\uB555",6,"\uB55E\uB562",8],["8b81","\uB56B",52,"\uB5A2\uB5A3\uB5A5\uB5A6\uB5A7\uB5A9\uB5AC\uB5AD\uB5AE\uB5AF\uB5B2\uB5B6",4,"\uB5BE\uB5BF\uB5C1\uB5C2\uB5C3\uB5C5",6,"\uB5CE\uB5D2",5,"\uB5D9",18,"\uB5ED",18],["8c41","\uB600",15,"\uB612\uB613\uB615\uB616\uB617\uB619",4],["8c61","\uB61E",6,"\uB626",5,"\uB62D",6,"\uB635",5],["8c81","\uB63B",12,"\uB649",26,"\uB665\uB666\uB667\uB669",50,"\uB69E\uB69F\uB6A1\uB6A2\uB6A3\uB6A5",5,"\uB6AD\uB6AE\uB6AF\uB6B0\uB6B2",16],["8d41","\uB6C3",16,"\uB6D5",8],["8d61","\uB6DE",17,"\uB6F1\uB6F2\uB6F3\uB6F5\uB6F6\uB6F7\uB6F9\uB6FA"],["8d81","\uB6FB",4,"\uB702\uB703\uB704\uB706",33,"\uB72A\uB72B\uB72D\uB72E\uB731",6,"\uB73A\uB73C",7,"\uB745\uB746\uB747\uB749\uB74A\uB74B\uB74D",6,"\uB756",9,"\uB761\uB762\uB763\uB765\uB766\uB767\uB769",6,"\uB772\uB774\uB776",5,"\uB77E\uB77F\uB781\uB782\uB783\uB785",6,"\uB78E\uB793\uB794\uB795\uB79A\uB79B\uB79D\uB79E"],["8e41","\uB79F\uB7A1",6,"\uB7AA\uB7AE",5,"\uB7B6\uB7B7\uB7B9",8],["8e61","\uB7C2",4,"\uB7C8\uB7CA",19],["8e81","\uB7DE",13,"\uB7EE\uB7EF\uB7F1\uB7F2\uB7F3\uB7F5",6,"\uB7FE\uB802",4,"\uB80A\uB80B\uB80D\uB80E\uB80F\uB811",6,"\uB81A\uB81C\uB81E",5,"\uB826\uB827\uB829\uB82A\uB82B\uB82D",6,"\uB836\uB83A",5,"\uB841\uB842\uB843\uB845",11,"\uB852\uB854",7,"\uB85E\uB85F\uB861\uB862\uB863\uB865",6,"\uB86E\uB870\uB872",5,"\uB879\uB87A\uB87B\uB87D",7],["8f41","\uB885",7,"\uB88E",17],["8f61","\uB8A0",7,"\uB8A9",6,"\uB8B1\uB8B2\uB8B3\uB8B5\uB8B6\uB8B7\uB8B9",4],["8f81","\uB8BE\uB8BF\uB8C2\uB8C4\uB8C6",5,"\uB8CD\uB8CE\uB8CF\uB8D1\uB8D2\uB8D3\uB8D5",7,"\uB8DE\uB8E0\uB8E2",5,"\uB8EA\uB8EB\uB8ED\uB8EE\uB8EF\uB8F1",6,"\uB8FA\uB8FC\uB8FE",5,"\uB905",18,"\uB919",6,"\uB921",26,"\uB93E\uB93F\uB941\uB942\uB943\uB945",6,"\uB94D\uB94E\uB950\uB952",5],["9041","\uB95A\uB95B\uB95D\uB95E\uB95F\uB961",6,"\uB96A\uB96C\uB96E",5,"\uB976\uB977\uB979\uB97A\uB97B\uB97D"],["9061","\uB97E",5,"\uB986\uB988\uB98B\uB98C\uB98F",15],["9081","\uB99F",12,"\uB9AE\uB9AF\uB9B1\uB9B2\uB9B3\uB9B5",6,"\uB9BE\uB9C0\uB9C2",5,"\uB9CA\uB9CB\uB9CD\uB9D3",4,"\uB9DA\uB9DC\uB9DF\uB9E0\uB9E2\uB9E6\uB9E7\uB9E9\uB9EA\uB9EB\uB9ED",6,"\uB9F6\uB9FB",4,"\uBA02",5,"\uBA09",11,"\uBA16",33,"\uBA3A\uBA3B\uBA3D\uBA3E\uBA3F\uBA41\uBA43\uBA44\uBA45\uBA46"],["9141","\uBA47\uBA4A\uBA4C\uBA4F\uBA50\uBA51\uBA52\uBA56\uBA57\uBA59\uBA5A\uBA5B\uBA5D",6,"\uBA66\uBA6A",5],["9161","\uBA72\uBA73\uBA75\uBA76\uBA77\uBA79",9,"\uBA86\uBA88\uBA89\uBA8A\uBA8B\uBA8D",5],["9181","\uBA93",20,"\uBAAA\uBAAD\uBAAE\uBAAF\uBAB1\uBAB3",4,"\uBABA\uBABC\uBABE",5,"\uBAC5\uBAC6\uBAC7\uBAC9",14,"\uBADA",33,"\uBAFD\uBAFE\uBAFF\uBB01\uBB02\uBB03\uBB05",7,"\uBB0E\uBB10\uBB12",5,"\uBB19\uBB1A\uBB1B\uBB1D\uBB1E\uBB1F\uBB21",6],["9241","\uBB28\uBB2A\uBB2C",7,"\uBB37\uBB39\uBB3A\uBB3F",4,"\uBB46\uBB48\uBB4A\uBB4B\uBB4C\uBB4E\uBB51\uBB52"],["9261","\uBB53\uBB55\uBB56\uBB57\uBB59",7,"\uBB62\uBB64",7,"\uBB6D",4],["9281","\uBB72",21,"\uBB89\uBB8A\uBB8B\uBB8D\uBB8E\uBB8F\uBB91",18,"\uBBA5\uBBA6\uBBA7\uBBA9\uBBAA\uBBAB\uBBAD",6,"\uBBB5\uBBB6\uBBB8",7,"\uBBC1\uBBC2\uBBC3\uBBC5\uBBC6\uBBC7\uBBC9",6,"\uBBD1\uBBD2\uBBD4",35,"\uBBFA\uBBFB\uBBFD\uBBFE\uBC01"],["9341","\uBC03",4,"\uBC0A\uBC0E\uBC10\uBC12\uBC13\uBC19\uBC1A\uBC20\uBC21\uBC22\uBC23\uBC26\uBC28\uBC2A\uBC2B\uBC2C\uBC2E\uBC2F\uBC32\uBC33\uBC35"],["9361","\uBC36\uBC37\uBC39",6,"\uBC42\uBC46\uBC47\uBC48\uBC4A\uBC4B\uBC4E\uBC4F\uBC51",8],["9381","\uBC5A\uBC5B\uBC5C\uBC5E",37,"\uBC86\uBC87\uBC89\uBC8A\uBC8D\uBC8F",4,"\uBC96\uBC98\uBC9B",4,"\uBCA2\uBCA3\uBCA5\uBCA6\uBCA9",6,"\uBCB2\uBCB6",5,"\uBCBE\uBCBF\uBCC1\uBCC2\uBCC3\uBCC5",7,"\uBCCE\uBCD2\uBCD3\uBCD4\uBCD6\uBCD7\uBCD9\uBCDA\uBCDB\uBCDD",22,"\uBCF7\uBCF9\uBCFA\uBCFB\uBCFD"],["9441","\uBCFE",5,"\uBD06\uBD08\uBD0A",5,"\uBD11\uBD12\uBD13\uBD15",8],["9461","\uBD1E",5,"\uBD25",6,"\uBD2D",12],["9481","\uBD3A",5,"\uBD41",6,"\uBD4A\uBD4B\uBD4D\uBD4E\uBD4F\uBD51",6,"\uBD5A",9,"\uBD65\uBD66\uBD67\uBD69",22,"\uBD82\uBD83\uBD85\uBD86\uBD8B",4,"\uBD92\uBD94\uBD96\uBD97\uBD98\uBD9B\uBD9D",6,"\uBDA5",10,"\uBDB1",6,"\uBDB9",24],["9541","\uBDD2\uBDD3\uBDD6\uBDD7\uBDD9\uBDDA\uBDDB\uBDDD",11,"\uBDEA",5,"\uBDF1"],["9561","\uBDF2\uBDF3\uBDF5\uBDF6\uBDF7\uBDF9",6,"\uBE01\uBE02\uBE04\uBE06",5,"\uBE0E\uBE0F\uBE11\uBE12\uBE13"],["9581","\uBE15",6,"\uBE1E\uBE20",35,"\uBE46\uBE47\uBE49\uBE4A\uBE4B\uBE4D\uBE4F",4,"\uBE56\uBE58\uBE5C\uBE5D\uBE5E\uBE5F\uBE62\uBE63\uBE65\uBE66\uBE67\uBE69\uBE6B",4,"\uBE72\uBE76",4,"\uBE7E\uBE7F\uBE81\uBE82\uBE83\uBE85",6,"\uBE8E\uBE92",5,"\uBE9A",13,"\uBEA9",14],["9641","\uBEB8",23,"\uBED2\uBED3"],["9661","\uBED5\uBED6\uBED9",6,"\uBEE1\uBEE2\uBEE6",5,"\uBEED",8],["9681","\uBEF6",10,"\uBF02",5,"\uBF0A",13,"\uBF1A\uBF1E",33,"\uBF42\uBF43\uBF45\uBF46\uBF47\uBF49",6,"\uBF52\uBF53\uBF54\uBF56",44],["9741","\uBF83",16,"\uBF95",8],["9761","\uBF9E",17,"\uBFB1",7],["9781","\uBFB9",11,"\uBFC6",5,"\uBFCE\uBFCF\uBFD1\uBFD2\uBFD3\uBFD5",6,"\uBFDD\uBFDE\uBFE0\uBFE2",89,"\uC03D\uC03E\uC03F"],["9841","\uC040",16,"\uC052",5,"\uC059\uC05A\uC05B"],["9861","\uC05D\uC05E\uC05F\uC061",6,"\uC06A",15],["9881","\uC07A",21,"\uC092\uC093\uC095\uC096\uC097\uC099",6,"\uC0A2\uC0A4\uC0A6",5,"\uC0AE\uC0B1\uC0B2\uC0B7",4,"\uC0BE\uC0C2\uC0C3\uC0C4\uC0C6\uC0C7\uC0CA\uC0CB\uC0CD\uC0CE\uC0CF\uC0D1",6,"\uC0DA\uC0DE",5,"\uC0E6\uC0E7\uC0E9\uC0EA\uC0EB\uC0ED",6,"\uC0F6\uC0F8\uC0FA",5,"\uC101\uC102\uC103\uC105\uC106\uC107\uC109",6,"\uC111\uC112\uC113\uC114\uC116",5,"\uC121\uC122\uC125\uC128\uC129\uC12A\uC12B\uC12E"],["9941","\uC132\uC133\uC134\uC135\uC137\uC13A\uC13B\uC13D\uC13E\uC13F\uC141",6,"\uC14A\uC14E",5,"\uC156\uC157"],["9961","\uC159\uC15A\uC15B\uC15D",6,"\uC166\uC16A",5,"\uC171\uC172\uC173\uC175\uC176\uC177\uC179\uC17A\uC17B"],["9981","\uC17C",8,"\uC186",5,"\uC18F\uC191\uC192\uC193\uC195\uC197",4,"\uC19E\uC1A0\uC1A2\uC1A3\uC1A4\uC1A6\uC1A7\uC1AA\uC1AB\uC1AD\uC1AE\uC1AF\uC1B1",11,"\uC1BE",5,"\uC1C5\uC1C6\uC1C7\uC1C9\uC1CA\uC1CB\uC1CD",6,"\uC1D5\uC1D6\uC1D9",6,"\uC1E1\uC1E2\uC1E3\uC1E5\uC1E6\uC1E7\uC1E9",6,"\uC1F2\uC1F4",7,"\uC1FE\uC1FF\uC201\uC202\uC203\uC205",6,"\uC20E\uC210\uC212",5,"\uC21A\uC21B\uC21D\uC21E\uC221\uC222\uC223"],["9a41","\uC224\uC225\uC226\uC227\uC22A\uC22C\uC22E\uC230\uC233\uC235",16],["9a61","\uC246\uC247\uC249",6,"\uC252\uC253\uC255\uC256\uC257\uC259",6,"\uC261\uC262\uC263\uC264\uC266"],["9a81","\uC267",4,"\uC26E\uC26F\uC271\uC272\uC273\uC275",6,"\uC27E\uC280\uC282",5,"\uC28A",5,"\uC291",6,"\uC299\uC29A\uC29C\uC29E",5,"\uC2A6\uC2A7\uC2A9\uC2AA\uC2AB\uC2AE",5,"\uC2B6\uC2B8\uC2BA",33,"\uC2DE\uC2DF\uC2E1\uC2E2\uC2E5",5,"\uC2EE\uC2F0\uC2F2\uC2F3\uC2F4\uC2F5\uC2F7\uC2FA\uC2FD\uC2FE\uC2FF\uC301",6,"\uC30A\uC30B\uC30E\uC30F"],["9b41","\uC310\uC311\uC312\uC316\uC317\uC319\uC31A\uC31B\uC31D",6,"\uC326\uC327\uC32A",8],["9b61","\uC333",17,"\uC346",7],["9b81","\uC34E",25,"\uC36A\uC36B\uC36D\uC36E\uC36F\uC371\uC373",4,"\uC37A\uC37B\uC37E",5,"\uC385\uC386\uC387\uC389\uC38A\uC38B\uC38D",50,"\uC3C1",22,"\uC3DA"],["9c41","\uC3DB\uC3DD\uC3DE\uC3E1\uC3E3",4,"\uC3EA\uC3EB\uC3EC\uC3EE",5,"\uC3F6\uC3F7\uC3F9",5],["9c61","\uC3FF",8,"\uC409",6,"\uC411",9],["9c81","\uC41B",8,"\uC425",6,"\uC42D\uC42E\uC42F\uC431\uC432\uC433\uC435",6,"\uC43E",9,"\uC449",26,"\uC466\uC467\uC469\uC46A\uC46B\uC46D",6,"\uC476\uC477\uC478\uC47A",5,"\uC481",18,"\uC495",6,"\uC49D",12],["9d41","\uC4AA",13,"\uC4B9\uC4BA\uC4BB\uC4BD",8],["9d61","\uC4C6",25],["9d81","\uC4E0",8,"\uC4EA",5,"\uC4F2\uC4F3\uC4F5\uC4F6\uC4F7\uC4F9\uC4FB\uC4FC\uC4FD\uC4FE\uC502",9,"\uC50D\uC50E\uC50F\uC511\uC512\uC513\uC515",6,"\uC51D",10,"\uC52A\uC52B\uC52D\uC52E\uC52F\uC531",6,"\uC53A\uC53C\uC53E",5,"\uC546\uC547\uC54B\uC54F\uC550\uC551\uC552\uC556\uC55A\uC55B\uC55C\uC55F\uC562\uC563\uC565\uC566\uC567\uC569",6,"\uC572\uC576",5,"\uC57E\uC57F\uC581\uC582\uC583\uC585\uC586\uC588\uC589\uC58A\uC58B\uC58E\uC590\uC592\uC593\uC594"],["9e41","\uC596\uC599\uC59A\uC59B\uC59D\uC59E\uC59F\uC5A1",7,"\uC5AA",9,"\uC5B6"],["9e61","\uC5B7\uC5BA\uC5BF",4,"\uC5CB\uC5CD\uC5CF\uC5D2\uC5D3\uC5D5\uC5D6\uC5D7\uC5D9",6,"\uC5E2\uC5E4\uC5E6\uC5E7"],["9e81","\uC5E8\uC5E9\uC5EA\uC5EB\uC5EF\uC5F1\uC5F2\uC5F3\uC5F5\uC5F8\uC5F9\uC5FA\uC5FB\uC602\uC603\uC604\uC609\uC60A\uC60B\uC60D\uC60E\uC60F\uC611",6,"\uC61A\uC61D",6,"\uC626\uC627\uC629\uC62A\uC62B\uC62F\uC631\uC632\uC636\uC638\uC63A\uC63C\uC63D\uC63E\uC63F\uC642\uC643\uC645\uC646\uC647\uC649",6,"\uC652\uC656",5,"\uC65E\uC65F\uC661",10,"\uC66D\uC66E\uC670\uC672",5,"\uC67A\uC67B\uC67D\uC67E\uC67F\uC681",6,"\uC68A\uC68C\uC68E",5,"\uC696\uC697\uC699\uC69A\uC69B\uC69D",6,"\uC6A6"],["9f41","\uC6A8\uC6AA",5,"\uC6B2\uC6B3\uC6B5\uC6B6\uC6B7\uC6BB",4,"\uC6C2\uC6C4\uC6C6",5,"\uC6CE"],["9f61","\uC6CF\uC6D1\uC6D2\uC6D3\uC6D5",6,"\uC6DE\uC6DF\uC6E2",5,"\uC6EA\uC6EB\uC6ED\uC6EE\uC6EF\uC6F1\uC6F2"],["9f81","\uC6F3",4,"\uC6FA\uC6FB\uC6FC\uC6FE",5,"\uC706\uC707\uC709\uC70A\uC70B\uC70D",6,"\uC716\uC718\uC71A",5,"\uC722\uC723\uC725\uC726\uC727\uC729",6,"\uC732\uC734\uC736\uC738\uC739\uC73A\uC73B\uC73E\uC73F\uC741\uC742\uC743\uC745",4,"\uC74B\uC74E\uC750\uC759\uC75A\uC75B\uC75D\uC75E\uC75F\uC761",6,"\uC769\uC76A\uC76C",7,"\uC776\uC777\uC779\uC77A\uC77B\uC77F\uC780\uC781\uC782\uC786\uC78B\uC78C\uC78D\uC78F\uC792\uC793\uC795\uC799\uC79B",4,"\uC7A2\uC7A7",4,"\uC7AE\uC7AF\uC7B1\uC7B2\uC7B3\uC7B5\uC7B6\uC7B7"],["a041","\uC7B8\uC7B9\uC7BA\uC7BB\uC7BE\uC7C2",5,"\uC7CA\uC7CB\uC7CD\uC7CF\uC7D1",6,"\uC7D9\uC7DA\uC7DB\uC7DC"],["a061","\uC7DE",5,"\uC7E5\uC7E6\uC7E7\uC7E9\uC7EA\uC7EB\uC7ED",13],["a081","\uC7FB",4,"\uC802\uC803\uC805\uC806\uC807\uC809\uC80B",4,"\uC812\uC814\uC817",4,"\uC81E\uC81F\uC821\uC822\uC823\uC825",6,"\uC82E\uC830\uC832",5,"\uC839\uC83A\uC83B\uC83D\uC83E\uC83F\uC841",6,"\uC84A\uC84B\uC84E",5,"\uC855",26,"\uC872\uC873\uC875\uC876\uC877\uC879\uC87B",4,"\uC882\uC884\uC888\uC889\uC88A\uC88E",5,"\uC895",7,"\uC89E\uC8A0\uC8A2\uC8A3\uC8A4"],["a141","\uC8A5\uC8A6\uC8A7\uC8A9",18,"\uC8BE\uC8BF\uC8C0\uC8C1"],["a161","\uC8C2\uC8C3\uC8C5\uC8C6\uC8C7\uC8C9\uC8CA\uC8CB\uC8CD",6,"\uC8D6\uC8D8\uC8DA",5,"\uC8E2\uC8E3\uC8E5"],["a181","\uC8E6",14,"\uC8F6",5,"\uC8FE\uC8FF\uC901\uC902\uC903\uC907",4,"\uC90E\u3000\u3001\u3002\xB7\u2025\u2026\xA8\u3003\xAD\u2015\u2225\uFF3C\u223C\u2018\u2019\u201C\u201D\u3014\u3015\u3008",9,"\xB1\xD7\xF7\u2260\u2264\u2265\u221E\u2234\xB0\u2032\u2033\u2103\u212B\uFFE0\uFFE1\uFFE5\u2642\u2640\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\xA7\u203B\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u2192\u2190\u2191\u2193\u2194\u3013\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229\u2227\u2228\uFFE2"],["a241","\uC910\uC912",5,"\uC919",18],["a261","\uC92D",6,"\uC935",18],["a281","\uC948",7,"\uC952\uC953\uC955\uC956\uC957\uC959",6,"\uC962\uC964",7,"\uC96D\uC96E\uC96F\u21D2\u21D4\u2200\u2203\xB4\uFF5E\u02C7\u02D8\u02DD\u02DA\u02D9\xB8\u02DB\xA1\xBF\u02D0\u222E\u2211\u220F\xA4\u2109\u2030\u25C1\u25C0\u25B7\u25B6\u2664\u2660\u2661\u2665\u2667\u2663\u2299\u25C8\u25A3\u25D0\u25D1\u2592\u25A4\u25A5\u25A8\u25A7\u25A6\u25A9\u2668\u260F\u260E\u261C\u261E\xB6\u2020\u2021\u2195\u2197\u2199\u2196\u2198\u266D\u2669\u266A\u266C\u327F\u321C\u2116\u33C7\u2122\u33C2\u33D8\u2121\u20AC\xAE"],["a341","\uC971\uC972\uC973\uC975",6,"\uC97D",10,"\uC98A\uC98B\uC98D\uC98E\uC98F"],["a361","\uC991",6,"\uC99A\uC99C\uC99E",16],["a381","\uC9AF",16,"\uC9C2\uC9C3\uC9C5\uC9C6\uC9C9\uC9CB",4,"\uC9D2\uC9D4\uC9D7\uC9D8\uC9DB\uFF01",58,"\uFFE6\uFF3D",32,"\uFFE3"],["a441","\uC9DE\uC9DF\uC9E1\uC9E3\uC9E5\uC9E6\uC9E8\uC9E9\uC9EA\uC9EB\uC9EE\uC9F2",5,"\uC9FA\uC9FB\uC9FD\uC9FE\uC9FF\uCA01\uCA02\uCA03\uCA04"],["a461","\uCA05\uCA06\uCA07\uCA0A\uCA0E",5,"\uCA15\uCA16\uCA17\uCA19",12],["a481","\uCA26\uCA27\uCA28\uCA2A",28,"\u3131",93],["a541","\uCA47",4,"\uCA4E\uCA4F\uCA51\uCA52\uCA53\uCA55",6,"\uCA5E\uCA62",5,"\uCA69\uCA6A"],["a561","\uCA6B",17,"\uCA7E",5,"\uCA85\uCA86"],["a581","\uCA87",16,"\uCA99",14,"\u2170",9],["a5b0","\u2160",9],["a5c1","\u0391",16,"\u03A3",6],["a5e1","\u03B1",16,"\u03C3",6],["a641","\uCAA8",19,"\uCABE\uCABF\uCAC1\uCAC2\uCAC3\uCAC5"],["a661","\uCAC6",5,"\uCACE\uCAD0\uCAD2\uCAD4\uCAD5\uCAD6\uCAD7\uCADA",5,"\uCAE1",6],["a681","\uCAE8\uCAE9\uCAEA\uCAEB\uCAED",6,"\uCAF5",18,"\uCB09\uCB0A\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542\u2512\u2511\u251A\u2519\u2516\u2515\u250E\u250D\u251E\u251F\u2521\u2522\u2526\u2527\u2529\u252A\u252D\u252E\u2531\u2532\u2535\u2536\u2539\u253A\u253D\u253E\u2540\u2541\u2543",7],["a741","\uCB0B",4,"\uCB11\uCB12\uCB13\uCB15\uCB16\uCB17\uCB19",6,"\uCB22",7],["a761","\uCB2A",22,"\uCB42\uCB43\uCB44"],["a781","\uCB45\uCB46\uCB47\uCB4A\uCB4B\uCB4D\uCB4E\uCB4F\uCB51",6,"\uCB5A\uCB5B\uCB5C\uCB5E",5,"\uCB65",7,"\u3395\u3396\u3397\u2113\u3398\u33C4\u33A3\u33A4\u33A5\u33A6\u3399",9,"\u33CA\u338D\u338E\u338F\u33CF\u3388\u3389\u33C8\u33A7\u33A8\u33B0",9,"\u3380",4,"\u33BA",5,"\u3390",4,"\u2126\u33C0\u33C1\u338A\u338B\u338C\u33D6\u33C5\u33AD\u33AE\u33AF\u33DB\u33A9\u33AA\u33AB\u33AC\u33DD\u33D0\u33D3\u33C3\u33C9\u33DC\u33C6"],["a841","\uCB6D",10,"\uCB7A",14],["a861","\uCB89",18,"\uCB9D",6],["a881","\uCBA4",19,"\uCBB9",11,"\xC6\xD0\xAA\u0126"],["a8a6","\u0132"],["a8a8","\u013F\u0141\xD8\u0152\xBA\xDE\u0166\u014A"],["a8b1","\u3260",27,"\u24D0",25,"\u2460",14,"\xBD\u2153\u2154\xBC\xBE\u215B\u215C\u215D\u215E"],["a941","\uCBC5",14,"\uCBD5",10],["a961","\uCBE0\uCBE1\uCBE2\uCBE3\uCBE5\uCBE6\uCBE8\uCBEA",18],["a981","\uCBFD",14,"\uCC0E\uCC0F\uCC11\uCC12\uCC13\uCC15",6,"\uCC1E\uCC1F\uCC20\uCC23\uCC24\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0140\u0142\xF8\u0153\xDF\xFE\u0167\u014B\u0149\u3200",27,"\u249C",25,"\u2474",14,"\xB9\xB2\xB3\u2074\u207F\u2081\u2082\u2083\u2084"],["aa41","\uCC25\uCC26\uCC2A\uCC2B\uCC2D\uCC2F\uCC31",6,"\uCC3A\uCC3F",4,"\uCC46\uCC47\uCC49\uCC4A\uCC4B\uCC4D\uCC4E"],["aa61","\uCC4F",4,"\uCC56\uCC5A",5,"\uCC61\uCC62\uCC63\uCC65\uCC67\uCC69",6,"\uCC71\uCC72"],["aa81","\uCC73\uCC74\uCC76",29,"\u3041",82],["ab41","\uCC94\uCC95\uCC96\uCC97\uCC9A\uCC9B\uCC9D\uCC9E\uCC9F\uCCA1",6,"\uCCAA\uCCAE",5,"\uCCB6\uCCB7\uCCB9"],["ab61","\uCCBA\uCCBB\uCCBD",6,"\uCCC6\uCCC8\uCCCA",5,"\uCCD1\uCCD2\uCCD3\uCCD5",5],["ab81","\uCCDB",8,"\uCCE5",6,"\uCCED\uCCEE\uCCEF\uCCF1",12,"\u30A1",85],["ac41","\uCCFE\uCCFF\uCD00\uCD02",5,"\uCD0A\uCD0B\uCD0D\uCD0E\uCD0F\uCD11",6,"\uCD1A\uCD1C\uCD1E\uCD1F\uCD20"],["ac61","\uCD21\uCD22\uCD23\uCD25\uCD26\uCD27\uCD29\uCD2A\uCD2B\uCD2D",11,"\uCD3A",4],["ac81","\uCD3F",28,"\uCD5D\uCD5E\uCD5F\u0410",5,"\u0401\u0416",25],["acd1","\u0430",5,"\u0451\u0436",25],["ad41","\uCD61\uCD62\uCD63\uCD65",6,"\uCD6E\uCD70\uCD72",5,"\uCD79",7],["ad61","\uCD81",6,"\uCD89",10,"\uCD96\uCD97\uCD99\uCD9A\uCD9B\uCD9D\uCD9E\uCD9F"],["ad81","\uCDA0\uCDA1\uCDA2\uCDA3\uCDA6\uCDA8\uCDAA",5,"\uCDB1",18,"\uCDC5"],["ae41","\uCDC6",5,"\uCDCD\uCDCE\uCDCF\uCDD1",16],["ae61","\uCDE2",5,"\uCDE9\uCDEA\uCDEB\uCDED\uCDEE\uCDEF\uCDF1",6,"\uCDFA\uCDFC\uCDFE",4],["ae81","\uCE03\uCE05\uCE06\uCE07\uCE09\uCE0A\uCE0B\uCE0D",6,"\uCE15\uCE16\uCE17\uCE18\uCE1A",5,"\uCE22\uCE23\uCE25\uCE26\uCE27\uCE29\uCE2A\uCE2B"],["af41","\uCE2C\uCE2D\uCE2E\uCE2F\uCE32\uCE34\uCE36",19],["af61","\uCE4A",13,"\uCE5A\uCE5B\uCE5D\uCE5E\uCE62",5,"\uCE6A\uCE6C"],["af81","\uCE6E",5,"\uCE76\uCE77\uCE79\uCE7A\uCE7B\uCE7D",6,"\uCE86\uCE88\uCE8A",5,"\uCE92\uCE93\uCE95\uCE96\uCE97\uCE99"],["b041","\uCE9A",5,"\uCEA2\uCEA6",5,"\uCEAE",12],["b061","\uCEBB",5,"\uCEC2",19],["b081","\uCED6",13,"\uCEE6\uCEE7\uCEE9\uCEEA\uCEED",6,"\uCEF6\uCEFA",5,"\uAC00\uAC01\uAC04\uAC07\uAC08\uAC09\uAC0A\uAC10",7,"\uAC19",4,"\uAC20\uAC24\uAC2C\uAC2D\uAC2F\uAC30\uAC31\uAC38\uAC39\uAC3C\uAC40\uAC4B\uAC4D\uAC54\uAC58\uAC5C\uAC70\uAC71\uAC74\uAC77\uAC78\uAC7A\uAC80\uAC81\uAC83\uAC84\uAC85\uAC86\uAC89\uAC8A\uAC8B\uAC8C\uAC90\uAC94\uAC9C\uAC9D\uAC9F\uACA0\uACA1\uACA8\uACA9\uACAA\uACAC\uACAF\uACB0\uACB8\uACB9\uACBB\uACBC\uACBD\uACC1\uACC4\uACC8\uACCC\uACD5\uACD7\uACE0\uACE1\uACE4\uACE7\uACE8\uACEA\uACEC\uACEF\uACF0\uACF1\uACF3\uACF5\uACF6\uACFC\uACFD\uAD00\uAD04\uAD06"],["b141","\uCF02\uCF03\uCF05\uCF06\uCF07\uCF09",6,"\uCF12\uCF14\uCF16",5,"\uCF1D\uCF1E\uCF1F\uCF21\uCF22\uCF23"],["b161","\uCF25",6,"\uCF2E\uCF32",5,"\uCF39",11],["b181","\uCF45",14,"\uCF56\uCF57\uCF59\uCF5A\uCF5B\uCF5D",6,"\uCF66\uCF68\uCF6A\uCF6B\uCF6C\uAD0C\uAD0D\uAD0F\uAD11\uAD18\uAD1C\uAD20\uAD29\uAD2C\uAD2D\uAD34\uAD35\uAD38\uAD3C\uAD44\uAD45\uAD47\uAD49\uAD50\uAD54\uAD58\uAD61\uAD63\uAD6C\uAD6D\uAD70\uAD73\uAD74\uAD75\uAD76\uAD7B\uAD7C\uAD7D\uAD7F\uAD81\uAD82\uAD88\uAD89\uAD8C\uAD90\uAD9C\uAD9D\uADA4\uADB7\uADC0\uADC1\uADC4\uADC8\uADD0\uADD1\uADD3\uADDC\uADE0\uADE4\uADF8\uADF9\uADFC\uADFF\uAE00\uAE01\uAE08\uAE09\uAE0B\uAE0D\uAE14\uAE30\uAE31\uAE34\uAE37\uAE38\uAE3A\uAE40\uAE41\uAE43\uAE45\uAE46\uAE4A\uAE4C\uAE4D\uAE4E\uAE50\uAE54\uAE56\uAE5C\uAE5D\uAE5F\uAE60\uAE61\uAE65\uAE68\uAE69\uAE6C\uAE70\uAE78"],["b241","\uCF6D\uCF6E\uCF6F\uCF72\uCF73\uCF75\uCF76\uCF77\uCF79",6,"\uCF81\uCF82\uCF83\uCF84\uCF86",5,"\uCF8D"],["b261","\uCF8E",18,"\uCFA2",5,"\uCFA9"],["b281","\uCFAA",5,"\uCFB1",18,"\uCFC5",6,"\uAE79\uAE7B\uAE7C\uAE7D\uAE84\uAE85\uAE8C\uAEBC\uAEBD\uAEBE\uAEC0\uAEC4\uAECC\uAECD\uAECF\uAED0\uAED1\uAED8\uAED9\uAEDC\uAEE8\uAEEB\uAEED\uAEF4\uAEF8\uAEFC\uAF07\uAF08\uAF0D\uAF10\uAF2C\uAF2D\uAF30\uAF32\uAF34\uAF3C\uAF3D\uAF3F\uAF41\uAF42\uAF43\uAF48\uAF49\uAF50\uAF5C\uAF5D\uAF64\uAF65\uAF79\uAF80\uAF84\uAF88\uAF90\uAF91\uAF95\uAF9C\uAFB8\uAFB9\uAFBC\uAFC0\uAFC7\uAFC8\uAFC9\uAFCB\uAFCD\uAFCE\uAFD4\uAFDC\uAFE8\uAFE9\uAFF0\uAFF1\uAFF4\uAFF8\uB000\uB001\uB004\uB00C\uB010\uB014\uB01C\uB01D\uB028\uB044\uB045\uB048\uB04A\uB04C\uB04E\uB053\uB054\uB055\uB057\uB059"],["b341","\uCFCC",19,"\uCFE2\uCFE3\uCFE5\uCFE6\uCFE7\uCFE9"],["b361","\uCFEA",5,"\uCFF2\uCFF4\uCFF6",5,"\uCFFD\uCFFE\uCFFF\uD001\uD002\uD003\uD005",5],["b381","\uD00B",5,"\uD012",5,"\uD019",19,"\uB05D\uB07C\uB07D\uB080\uB084\uB08C\uB08D\uB08F\uB091\uB098\uB099\uB09A\uB09C\uB09F\uB0A0\uB0A1\uB0A2\uB0A8\uB0A9\uB0AB",4,"\uB0B1\uB0B3\uB0B4\uB0B5\uB0B8\uB0BC\uB0C4\uB0C5\uB0C7\uB0C8\uB0C9\uB0D0\uB0D1\uB0D4\uB0D8\uB0E0\uB0E5\uB108\uB109\uB10B\uB10C\uB110\uB112\uB113\uB118\uB119\uB11B\uB11C\uB11D\uB123\uB124\uB125\uB128\uB12C\uB134\uB135\uB137\uB138\uB139\uB140\uB141\uB144\uB148\uB150\uB151\uB154\uB155\uB158\uB15C\uB160\uB178\uB179\uB17C\uB180\uB182\uB188\uB189\uB18B\uB18D\uB192\uB193\uB194\uB198\uB19C\uB1A8\uB1CC\uB1D0\uB1D4\uB1DC\uB1DD"],["b441","\uD02E",5,"\uD036\uD037\uD039\uD03A\uD03B\uD03D",6,"\uD046\uD048\uD04A",5],["b461","\uD051\uD052\uD053\uD055\uD056\uD057\uD059",6,"\uD061",10,"\uD06E\uD06F"],["b481","\uD071\uD072\uD073\uD075",6,"\uD07E\uD07F\uD080\uD082",18,"\uB1DF\uB1E8\uB1E9\uB1EC\uB1F0\uB1F9\uB1FB\uB1FD\uB204\uB205\uB208\uB20B\uB20C\uB214\uB215\uB217\uB219\uB220\uB234\uB23C\uB258\uB25C\uB260\uB268\uB269\uB274\uB275\uB27C\uB284\uB285\uB289\uB290\uB291\uB294\uB298\uB299\uB29A\uB2A0\uB2A1\uB2A3\uB2A5\uB2A6\uB2AA\uB2AC\uB2B0\uB2B4\uB2C8\uB2C9\uB2CC\uB2D0\uB2D2\uB2D8\uB2D9\uB2DB\uB2DD\uB2E2\uB2E4\uB2E5\uB2E6\uB2E8\uB2EB",4,"\uB2F3\uB2F4\uB2F5\uB2F7",4,"\uB2FF\uB300\uB301\uB304\uB308\uB310\uB311\uB313\uB314\uB315\uB31C\uB354\uB355\uB356\uB358\uB35B\uB35C\uB35E\uB35F\uB364\uB365"],["b541","\uD095",14,"\uD0A6\uD0A7\uD0A9\uD0AA\uD0AB\uD0AD",5],["b561","\uD0B3\uD0B6\uD0B8\uD0BA",5,"\uD0C2\uD0C3\uD0C5\uD0C6\uD0C7\uD0CA",5,"\uD0D2\uD0D6",4],["b581","\uD0DB\uD0DE\uD0DF\uD0E1\uD0E2\uD0E3\uD0E5",6,"\uD0EE\uD0F2",5,"\uD0F9",11,"\uB367\uB369\uB36B\uB36E\uB370\uB371\uB374\uB378\uB380\uB381\uB383\uB384\uB385\uB38C\uB390\uB394\uB3A0\uB3A1\uB3A8\uB3AC\uB3C4\uB3C5\uB3C8\uB3CB\uB3CC\uB3CE\uB3D0\uB3D4\uB3D5\uB3D7\uB3D9\uB3DB\uB3DD\uB3E0\uB3E4\uB3E8\uB3FC\uB410\uB418\uB41C\uB420\uB428\uB429\uB42B\uB434\uB450\uB451\uB454\uB458\uB460\uB461\uB463\uB465\uB46C\uB480\uB488\uB49D\uB4A4\uB4A8\uB4AC\uB4B5\uB4B7\uB4B9\uB4C0\uB4C4\uB4C8\uB4D0\uB4D5\uB4DC\uB4DD\uB4E0\uB4E3\uB4E4\uB4E6\uB4EC\uB4ED\uB4EF\uB4F1\uB4F8\uB514\uB515\uB518\uB51B\uB51C\uB524\uB525\uB527\uB528\uB529\uB52A\uB530\uB531\uB534\uB538"],["b641","\uD105",7,"\uD10E",17],["b661","\uD120",15,"\uD132\uD133\uD135\uD136\uD137\uD139\uD13B\uD13C\uD13D\uD13E"],["b681","\uD13F\uD142\uD146",5,"\uD14E\uD14F\uD151\uD152\uD153\uD155",6,"\uD15E\uD160\uD162",5,"\uD169\uD16A\uD16B\uD16D\uB540\uB541\uB543\uB544\uB545\uB54B\uB54C\uB54D\uB550\uB554\uB55C\uB55D\uB55F\uB560\uB561\uB5A0\uB5A1\uB5A4\uB5A8\uB5AA\uB5AB\uB5B0\uB5B1\uB5B3\uB5B4\uB5B5\uB5BB\uB5BC\uB5BD\uB5C0\uB5C4\uB5CC\uB5CD\uB5CF\uB5D0\uB5D1\uB5D8\uB5EC\uB610\uB611\uB614\uB618\uB625\uB62C\uB634\uB648\uB664\uB668\uB69C\uB69D\uB6A0\uB6A4\uB6AB\uB6AC\uB6B1\uB6D4\uB6F0\uB6F4\uB6F8\uB700\uB701\uB705\uB728\uB729\uB72C\uB72F\uB730\uB738\uB739\uB73B\uB744\uB748\uB74C\uB754\uB755\uB760\uB764\uB768\uB770\uB771\uB773\uB775\uB77C\uB77D\uB780\uB784\uB78C\uB78D\uB78F\uB790\uB791\uB792\uB796\uB797"],["b741","\uD16E",13,"\uD17D",6,"\uD185\uD186\uD187\uD189\uD18A"],["b761","\uD18B",20,"\uD1A2\uD1A3\uD1A5\uD1A6\uD1A7"],["b781","\uD1A9",6,"\uD1B2\uD1B4\uD1B6\uD1B7\uD1B8\uD1B9\uD1BB\uD1BD\uD1BE\uD1BF\uD1C1",14,"\uB798\uB799\uB79C\uB7A0\uB7A8\uB7A9\uB7AB\uB7AC\uB7AD\uB7B4\uB7B5\uB7B8\uB7C7\uB7C9\uB7EC\uB7ED\uB7F0\uB7F4\uB7FC\uB7FD\uB7FF\uB800\uB801\uB807\uB808\uB809\uB80C\uB810\uB818\uB819\uB81B\uB81D\uB824\uB825\uB828\uB82C\uB834\uB835\uB837\uB838\uB839\uB840\uB844\uB851\uB853\uB85C\uB85D\uB860\uB864\uB86C\uB86D\uB86F\uB871\uB878\uB87C\uB88D\uB8A8\uB8B0\uB8B4\uB8B8\uB8C0\uB8C1\uB8C3\uB8C5\uB8CC\uB8D0\uB8D4\uB8DD\uB8DF\uB8E1\uB8E8\uB8E9\uB8EC\uB8F0\uB8F8\uB8F9\uB8FB\uB8FD\uB904\uB918\uB920\uB93C\uB93D\uB940\uB944\uB94C\uB94F\uB951\uB958\uB959\uB95C\uB960\uB968\uB969"],["b841","\uD1D0",7,"\uD1D9",17],["b861","\uD1EB",8,"\uD1F5\uD1F6\uD1F7\uD1F9",13],["b881","\uD208\uD20A",5,"\uD211",24,"\uB96B\uB96D\uB974\uB975\uB978\uB97C\uB984\uB985\uB987\uB989\uB98A\uB98D\uB98E\uB9AC\uB9AD\uB9B0\uB9B4\uB9BC\uB9BD\uB9BF\uB9C1\uB9C8\uB9C9\uB9CC\uB9CE",4,"\uB9D8\uB9D9\uB9DB\uB9DD\uB9DE\uB9E1\uB9E3\uB9E4\uB9E5\uB9E8\uB9EC\uB9F4\uB9F5\uB9F7\uB9F8\uB9F9\uB9FA\uBA00\uBA01\uBA08\uBA15\uBA38\uBA39\uBA3C\uBA40\uBA42\uBA48\uBA49\uBA4B\uBA4D\uBA4E\uBA53\uBA54\uBA55\uBA58\uBA5C\uBA64\uBA65\uBA67\uBA68\uBA69\uBA70\uBA71\uBA74\uBA78\uBA83\uBA84\uBA85\uBA87\uBA8C\uBAA8\uBAA9\uBAAB\uBAAC\uBAB0\uBAB2\uBAB8\uBAB9\uBABB\uBABD\uBAC4\uBAC8\uBAD8\uBAD9\uBAFC"],["b941","\uD22A\uD22B\uD22E\uD22F\uD231\uD232\uD233\uD235",6,"\uD23E\uD240\uD242",5,"\uD249\uD24A\uD24B\uD24C"],["b961","\uD24D",14,"\uD25D",6,"\uD265\uD266\uD267\uD268"],["b981","\uD269",22,"\uD282\uD283\uD285\uD286\uD287\uD289\uD28A\uD28B\uD28C\uBB00\uBB04\uBB0D\uBB0F\uBB11\uBB18\uBB1C\uBB20\uBB29\uBB2B\uBB34\uBB35\uBB36\uBB38\uBB3B\uBB3C\uBB3D\uBB3E\uBB44\uBB45\uBB47\uBB49\uBB4D\uBB4F\uBB50\uBB54\uBB58\uBB61\uBB63\uBB6C\uBB88\uBB8C\uBB90\uBBA4\uBBA8\uBBAC\uBBB4\uBBB7\uBBC0\uBBC4\uBBC8\uBBD0\uBBD3\uBBF8\uBBF9\uBBFC\uBBFF\uBC00\uBC02\uBC08\uBC09\uBC0B\uBC0C\uBC0D\uBC0F\uBC11\uBC14",4,"\uBC1B",4,"\uBC24\uBC25\uBC27\uBC29\uBC2D\uBC30\uBC31\uBC34\uBC38\uBC40\uBC41\uBC43\uBC44\uBC45\uBC49\uBC4C\uBC4D\uBC50\uBC5D\uBC84\uBC85\uBC88\uBC8B\uBC8C\uBC8E\uBC94\uBC95\uBC97"],["ba41","\uD28D\uD28E\uD28F\uD292\uD293\uD294\uD296",5,"\uD29D\uD29E\uD29F\uD2A1\uD2A2\uD2A3\uD2A5",6,"\uD2AD"],["ba61","\uD2AE\uD2AF\uD2B0\uD2B2",5,"\uD2BA\uD2BB\uD2BD\uD2BE\uD2C1\uD2C3",4,"\uD2CA\uD2CC",5],["ba81","\uD2D2\uD2D3\uD2D5\uD2D6\uD2D7\uD2D9\uD2DA\uD2DB\uD2DD",6,"\uD2E6",9,"\uD2F2\uD2F3\uD2F5\uD2F6\uD2F7\uD2F9\uD2FA\uBC99\uBC9A\uBCA0\uBCA1\uBCA4\uBCA7\uBCA8\uBCB0\uBCB1\uBCB3\uBCB4\uBCB5\uBCBC\uBCBD\uBCC0\uBCC4\uBCCD\uBCCF\uBCD0\uBCD1\uBCD5\uBCD8\uBCDC\uBCF4\uBCF5\uBCF6\uBCF8\uBCFC\uBD04\uBD05\uBD07\uBD09\uBD10\uBD14\uBD24\uBD2C\uBD40\uBD48\uBD49\uBD4C\uBD50\uBD58\uBD59\uBD64\uBD68\uBD80\uBD81\uBD84\uBD87\uBD88\uBD89\uBD8A\uBD90\uBD91\uBD93\uBD95\uBD99\uBD9A\uBD9C\uBDA4\uBDB0\uBDB8\uBDD4\uBDD5\uBDD8\uBDDC\uBDE9\uBDF0\uBDF4\uBDF8\uBE00\uBE03\uBE05\uBE0C\uBE0D\uBE10\uBE14\uBE1C\uBE1D\uBE1F\uBE44\uBE45\uBE48\uBE4C\uBE4E\uBE54\uBE55\uBE57\uBE59\uBE5A\uBE5B\uBE60\uBE61\uBE64"],["bb41","\uD2FB",4,"\uD302\uD304\uD306",5,"\uD30F\uD311\uD312\uD313\uD315\uD317",4,"\uD31E\uD322\uD323"],["bb61","\uD324\uD326\uD327\uD32A\uD32B\uD32D\uD32E\uD32F\uD331",6,"\uD33A\uD33E",5,"\uD346\uD347\uD348\uD349"],["bb81","\uD34A",31,"\uBE68\uBE6A\uBE70\uBE71\uBE73\uBE74\uBE75\uBE7B\uBE7C\uBE7D\uBE80\uBE84\uBE8C\uBE8D\uBE8F\uBE90\uBE91\uBE98\uBE99\uBEA8\uBED0\uBED1\uBED4\uBED7\uBED8\uBEE0\uBEE3\uBEE4\uBEE5\uBEEC\uBF01\uBF08\uBF09\uBF18\uBF19\uBF1B\uBF1C\uBF1D\uBF40\uBF41\uBF44\uBF48\uBF50\uBF51\uBF55\uBF94\uBFB0\uBFC5\uBFCC\uBFCD\uBFD0\uBFD4\uBFDC\uBFDF\uBFE1\uC03C\uC051\uC058\uC05C\uC060\uC068\uC069\uC090\uC091\uC094\uC098\uC0A0\uC0A1\uC0A3\uC0A5\uC0AC\uC0AD\uC0AF\uC0B0\uC0B3\uC0B4\uC0B5\uC0B6\uC0BC\uC0BD\uC0BF\uC0C0\uC0C1\uC0C5\uC0C8\uC0C9\uC0CC\uC0D0\uC0D8\uC0D9\uC0DB\uC0DC\uC0DD\uC0E4"],["bc41","\uD36A",17,"\uD37E\uD37F\uD381\uD382\uD383\uD385\uD386\uD387"],["bc61","\uD388\uD389\uD38A\uD38B\uD38E\uD392",5,"\uD39A\uD39B\uD39D\uD39E\uD39F\uD3A1",6,"\uD3AA\uD3AC\uD3AE"],["bc81","\uD3AF",4,"\uD3B5\uD3B6\uD3B7\uD3B9\uD3BA\uD3BB\uD3BD",6,"\uD3C6\uD3C7\uD3CA",5,"\uD3D1",5,"\uC0E5\uC0E8\uC0EC\uC0F4\uC0F5\uC0F7\uC0F9\uC100\uC104\uC108\uC110\uC115\uC11C",4,"\uC123\uC124\uC126\uC127\uC12C\uC12D\uC12F\uC130\uC131\uC136\uC138\uC139\uC13C\uC140\uC148\uC149\uC14B\uC14C\uC14D\uC154\uC155\uC158\uC15C\uC164\uC165\uC167\uC168\uC169\uC170\uC174\uC178\uC185\uC18C\uC18D\uC18E\uC190\uC194\uC196\uC19C\uC19D\uC19F\uC1A1\uC1A5\uC1A8\uC1A9\uC1AC\uC1B0\uC1BD\uC1C4\uC1C8\uC1CC\uC1D4\uC1D7\uC1D8\uC1E0\uC1E4\uC1E8\uC1F0\uC1F1\uC1F3\uC1FC\uC1FD\uC200\uC204\uC20C\uC20D\uC20F\uC211\uC218\uC219\uC21C\uC21F\uC220\uC228\uC229\uC22B\uC22D"],["bd41","\uD3D7\uD3D9",7,"\uD3E2\uD3E4",7,"\uD3EE\uD3EF\uD3F1\uD3F2\uD3F3\uD3F5\uD3F6\uD3F7"],["bd61","\uD3F8\uD3F9\uD3FA\uD3FB\uD3FE\uD400\uD402",5,"\uD409",13],["bd81","\uD417",5,"\uD41E",25,"\uC22F\uC231\uC232\uC234\uC248\uC250\uC251\uC254\uC258\uC260\uC265\uC26C\uC26D\uC270\uC274\uC27C\uC27D\uC27F\uC281\uC288\uC289\uC290\uC298\uC29B\uC29D\uC2A4\uC2A5\uC2A8\uC2AC\uC2AD\uC2B4\uC2B5\uC2B7\uC2B9\uC2DC\uC2DD\uC2E0\uC2E3\uC2E4\uC2EB\uC2EC\uC2ED\uC2EF\uC2F1\uC2F6\uC2F8\uC2F9\uC2FB\uC2FC\uC300\uC308\uC309\uC30C\uC30D\uC313\uC314\uC315\uC318\uC31C\uC324\uC325\uC328\uC329\uC345\uC368\uC369\uC36C\uC370\uC372\uC378\uC379\uC37C\uC37D\uC384\uC388\uC38C\uC3C0\uC3D8\uC3D9\uC3DC\uC3DF\uC3E0\uC3E2\uC3E8\uC3E9\uC3ED\uC3F4\uC3F5\uC3F8\uC408\uC410\uC424\uC42C\uC430"],["be41","\uD438",7,"\uD441\uD442\uD443\uD445",14],["be61","\uD454",7,"\uD45D\uD45E\uD45F\uD461\uD462\uD463\uD465",7,"\uD46E\uD470\uD471\uD472"],["be81","\uD473",4,"\uD47A\uD47B\uD47D\uD47E\uD481\uD483",4,"\uD48A\uD48C\uD48E",5,"\uD495",8,"\uC434\uC43C\uC43D\uC448\uC464\uC465\uC468\uC46C\uC474\uC475\uC479\uC480\uC494\uC49C\uC4B8\uC4BC\uC4E9\uC4F0\uC4F1\uC4F4\uC4F8\uC4FA\uC4FF\uC500\uC501\uC50C\uC510\uC514\uC51C\uC528\uC529\uC52C\uC530\uC538\uC539\uC53B\uC53D\uC544\uC545\uC548\uC549\uC54A\uC54C\uC54D\uC54E\uC553\uC554\uC555\uC557\uC558\uC559\uC55D\uC55E\uC560\uC561\uC564\uC568\uC570\uC571\uC573\uC574\uC575\uC57C\uC57D\uC580\uC584\uC587\uC58C\uC58D\uC58F\uC591\uC595\uC597\uC598\uC59C\uC5A0\uC5A9\uC5B4\uC5B5\uC5B8\uC5B9\uC5BB\uC5BC\uC5BD\uC5BE\uC5C4",6,"\uC5CC\uC5CE"],["bf41","\uD49E",10,"\uD4AA",14],["bf61","\uD4B9",18,"\uD4CD\uD4CE\uD4CF\uD4D1\uD4D2\uD4D3\uD4D5"],["bf81","\uD4D6",5,"\uD4DD\uD4DE\uD4E0",7,"\uD4E9\uD4EA\uD4EB\uD4ED\uD4EE\uD4EF\uD4F1",6,"\uD4F9\uD4FA\uD4FC\uC5D0\uC5D1\uC5D4\uC5D8\uC5E0\uC5E1\uC5E3\uC5E5\uC5EC\uC5ED\uC5EE\uC5F0\uC5F4\uC5F6\uC5F7\uC5FC",5,"\uC605\uC606\uC607\uC608\uC60C\uC610\uC618\uC619\uC61B\uC61C\uC624\uC625\uC628\uC62C\uC62D\uC62E\uC630\uC633\uC634\uC635\uC637\uC639\uC63B\uC640\uC641\uC644\uC648\uC650\uC651\uC653\uC654\uC655\uC65C\uC65D\uC660\uC66C\uC66F\uC671\uC678\uC679\uC67C\uC680\uC688\uC689\uC68B\uC68D\uC694\uC695\uC698\uC69C\uC6A4\uC6A5\uC6A7\uC6A9\uC6B0\uC6B1\uC6B4\uC6B8\uC6B9\uC6BA\uC6C0\uC6C1\uC6C3\uC6C5\uC6CC\uC6CD\uC6D0\uC6D4\uC6DC\uC6DD\uC6E0\uC6E1\uC6E8"],["c041","\uD4FE",5,"\uD505\uD506\uD507\uD509\uD50A\uD50B\uD50D",6,"\uD516\uD518",5],["c061","\uD51E",25],["c081","\uD538\uD539\uD53A\uD53B\uD53E\uD53F\uD541\uD542\uD543\uD545",6,"\uD54E\uD550\uD552",5,"\uD55A\uD55B\uD55D\uD55E\uD55F\uD561\uD562\uD563\uC6E9\uC6EC\uC6F0\uC6F8\uC6F9\uC6FD\uC704\uC705\uC708\uC70C\uC714\uC715\uC717\uC719\uC720\uC721\uC724\uC728\uC730\uC731\uC733\uC735\uC737\uC73C\uC73D\uC740\uC744\uC74A\uC74C\uC74D\uC74F\uC751",7,"\uC75C\uC760\uC768\uC76B\uC774\uC775\uC778\uC77C\uC77D\uC77E\uC783\uC784\uC785\uC787\uC788\uC789\uC78A\uC78E\uC790\uC791\uC794\uC796\uC797\uC798\uC79A\uC7A0\uC7A1\uC7A3\uC7A4\uC7A5\uC7A6\uC7AC\uC7AD\uC7B0\uC7B4\uC7BC\uC7BD\uC7BF\uC7C0\uC7C1\uC7C8\uC7C9\uC7CC\uC7CE\uC7D0\uC7D8\uC7DD\uC7E4\uC7E8\uC7EC\uC800\uC801\uC804\uC808\uC80A"],["c141","\uD564\uD566\uD567\uD56A\uD56C\uD56E",5,"\uD576\uD577\uD579\uD57A\uD57B\uD57D",6,"\uD586\uD58A\uD58B"],["c161","\uD58C\uD58D\uD58E\uD58F\uD591",19,"\uD5A6\uD5A7"],["c181","\uD5A8",31,"\uC810\uC811\uC813\uC815\uC816\uC81C\uC81D\uC820\uC824\uC82C\uC82D\uC82F\uC831\uC838\uC83C\uC840\uC848\uC849\uC84C\uC84D\uC854\uC870\uC871\uC874\uC878\uC87A\uC880\uC881\uC883\uC885\uC886\uC887\uC88B\uC88C\uC88D\uC894\uC89D\uC89F\uC8A1\uC8A8\uC8BC\uC8BD\uC8C4\uC8C8\uC8CC\uC8D4\uC8D5\uC8D7\uC8D9\uC8E0\uC8E1\uC8E4\uC8F5\uC8FC\uC8FD\uC900\uC904\uC905\uC906\uC90C\uC90D\uC90F\uC911\uC918\uC92C\uC934\uC950\uC951\uC954\uC958\uC960\uC961\uC963\uC96C\uC970\uC974\uC97C\uC988\uC989\uC98C\uC990\uC998\uC999\uC99B\uC99D\uC9C0\uC9C1\uC9C4\uC9C7\uC9C8\uC9CA\uC9D0\uC9D1\uC9D3"],["c241","\uD5CA\uD5CB\uD5CD\uD5CE\uD5CF\uD5D1\uD5D3",4,"\uD5DA\uD5DC\uD5DE",5,"\uD5E6\uD5E7\uD5E9\uD5EA\uD5EB\uD5ED\uD5EE"],["c261","\uD5EF",4,"\uD5F6\uD5F8\uD5FA",5,"\uD602\uD603\uD605\uD606\uD607\uD609",6,"\uD612"],["c281","\uD616",5,"\uD61D\uD61E\uD61F\uD621\uD622\uD623\uD625",7,"\uD62E",9,"\uD63A\uD63B\uC9D5\uC9D6\uC9D9\uC9DA\uC9DC\uC9DD\uC9E0\uC9E2\uC9E4\uC9E7\uC9EC\uC9ED\uC9EF\uC9F0\uC9F1\uC9F8\uC9F9\uC9FC\uCA00\uCA08\uCA09\uCA0B\uCA0C\uCA0D\uCA14\uCA18\uCA29\uCA4C\uCA4D\uCA50\uCA54\uCA5C\uCA5D\uCA5F\uCA60\uCA61\uCA68\uCA7D\uCA84\uCA98\uCABC\uCABD\uCAC0\uCAC4\uCACC\uCACD\uCACF\uCAD1\uCAD3\uCAD8\uCAD9\uCAE0\uCAEC\uCAF4\uCB08\uCB10\uCB14\uCB18\uCB20\uCB21\uCB41\uCB48\uCB49\uCB4C\uCB50\uCB58\uCB59\uCB5D\uCB64\uCB78\uCB79\uCB9C\uCBB8\uCBD4\uCBE4\uCBE7\uCBE9\uCC0C\uCC0D\uCC10\uCC14\uCC1C\uCC1D\uCC21\uCC22\uCC27\uCC28\uCC29\uCC2C\uCC2E\uCC30\uCC38\uCC39\uCC3B"],["c341","\uD63D\uD63E\uD63F\uD641\uD642\uD643\uD644\uD646\uD647\uD64A\uD64C\uD64E\uD64F\uD650\uD652\uD653\uD656\uD657\uD659\uD65A\uD65B\uD65D",4],["c361","\uD662",4,"\uD668\uD66A",5,"\uD672\uD673\uD675",11],["c381","\uD681\uD682\uD684\uD686",5,"\uD68E\uD68F\uD691\uD692\uD693\uD695",7,"\uD69E\uD6A0\uD6A2",5,"\uD6A9\uD6AA\uCC3C\uCC3D\uCC3E\uCC44\uCC45\uCC48\uCC4C\uCC54\uCC55\uCC57\uCC58\uCC59\uCC60\uCC64\uCC66\uCC68\uCC70\uCC75\uCC98\uCC99\uCC9C\uCCA0\uCCA8\uCCA9\uCCAB\uCCAC\uCCAD\uCCB4\uCCB5\uCCB8\uCCBC\uCCC4\uCCC5\uCCC7\uCCC9\uCCD0\uCCD4\uCCE4\uCCEC\uCCF0\uCD01\uCD08\uCD09\uCD0C\uCD10\uCD18\uCD19\uCD1B\uCD1D\uCD24\uCD28\uCD2C\uCD39\uCD5C\uCD60\uCD64\uCD6C\uCD6D\uCD6F\uCD71\uCD78\uCD88\uCD94\uCD95\uCD98\uCD9C\uCDA4\uCDA5\uCDA7\uCDA9\uCDB0\uCDC4\uCDCC\uCDD0\uCDE8\uCDEC\uCDF0\uCDF8\uCDF9\uCDFB\uCDFD\uCE04\uCE08\uCE0C\uCE14\uCE19\uCE20\uCE21\uCE24\uCE28\uCE30\uCE31\uCE33\uCE35"],["c441","\uD6AB\uD6AD\uD6AE\uD6AF\uD6B1",7,"\uD6BA\uD6BC",7,"\uD6C6\uD6C7\uD6C9\uD6CA\uD6CB"],["c461","\uD6CD\uD6CE\uD6CF\uD6D0\uD6D2\uD6D3\uD6D5\uD6D6\uD6D8\uD6DA",5,"\uD6E1\uD6E2\uD6E3\uD6E5\uD6E6\uD6E7\uD6E9",4],["c481","\uD6EE\uD6EF\uD6F1\uD6F2\uD6F3\uD6F4\uD6F6",5,"\uD6FE\uD6FF\uD701\uD702\uD703\uD705",11,"\uD712\uD713\uD714\uCE58\uCE59\uCE5C\uCE5F\uCE60\uCE61\uCE68\uCE69\uCE6B\uCE6D\uCE74\uCE75\uCE78\uCE7C\uCE84\uCE85\uCE87\uCE89\uCE90\uCE91\uCE94\uCE98\uCEA0\uCEA1\uCEA3\uCEA4\uCEA5\uCEAC\uCEAD\uCEC1\uCEE4\uCEE5\uCEE8\uCEEB\uCEEC\uCEF4\uCEF5\uCEF7\uCEF8\uCEF9\uCF00\uCF01\uCF04\uCF08\uCF10\uCF11\uCF13\uCF15\uCF1C\uCF20\uCF24\uCF2C\uCF2D\uCF2F\uCF30\uCF31\uCF38\uCF54\uCF55\uCF58\uCF5C\uCF64\uCF65\uCF67\uCF69\uCF70\uCF71\uCF74\uCF78\uCF80\uCF85\uCF8C\uCFA1\uCFA8\uCFB0\uCFC4\uCFE0\uCFE1\uCFE4\uCFE8\uCFF0\uCFF1\uCFF3\uCFF5\uCFFC\uD000\uD004\uD011\uD018\uD02D\uD034\uD035\uD038\uD03C"],["c541","\uD715\uD716\uD717\uD71A\uD71B\uD71D\uD71E\uD71F\uD721",6,"\uD72A\uD72C\uD72E",5,"\uD736\uD737\uD739"],["c561","\uD73A\uD73B\uD73D",6,"\uD745\uD746\uD748\uD74A",5,"\uD752\uD753\uD755\uD75A",4],["c581","\uD75F\uD762\uD764\uD766\uD767\uD768\uD76A\uD76B\uD76D\uD76E\uD76F\uD771\uD772\uD773\uD775",6,"\uD77E\uD77F\uD780\uD782",5,"\uD78A\uD78B\uD044\uD045\uD047\uD049\uD050\uD054\uD058\uD060\uD06C\uD06D\uD070\uD074\uD07C\uD07D\uD081\uD0A4\uD0A5\uD0A8\uD0AC\uD0B4\uD0B5\uD0B7\uD0B9\uD0C0\uD0C1\uD0C4\uD0C8\uD0C9\uD0D0\uD0D1\uD0D3\uD0D4\uD0D5\uD0DC\uD0DD\uD0E0\uD0E4\uD0EC\uD0ED\uD0EF\uD0F0\uD0F1\uD0F8\uD10D\uD130\uD131\uD134\uD138\uD13A\uD140\uD141\uD143\uD144\uD145\uD14C\uD14D\uD150\uD154\uD15C\uD15D\uD15F\uD161\uD168\uD16C\uD17C\uD184\uD188\uD1A0\uD1A1\uD1A4\uD1A8\uD1B0\uD1B1\uD1B3\uD1B5\uD1BA\uD1BC\uD1C0\uD1D8\uD1F4\uD1F8\uD207\uD209\uD210\uD22C\uD22D\uD230\uD234\uD23C\uD23D\uD23F\uD241\uD248\uD25C"],["c641","\uD78D\uD78E\uD78F\uD791",6,"\uD79A\uD79C\uD79E",5],["c6a1","\uD264\uD280\uD281\uD284\uD288\uD290\uD291\uD295\uD29C\uD2A0\uD2A4\uD2AC\uD2B1\uD2B8\uD2B9\uD2BC\uD2BF\uD2C0\uD2C2\uD2C8\uD2C9\uD2CB\uD2D4\uD2D8\uD2DC\uD2E4\uD2E5\uD2F0\uD2F1\uD2F4\uD2F8\uD300\uD301\uD303\uD305\uD30C\uD30D\uD30E\uD310\uD314\uD316\uD31C\uD31D\uD31F\uD320\uD321\uD325\uD328\uD329\uD32C\uD330\uD338\uD339\uD33B\uD33C\uD33D\uD344\uD345\uD37C\uD37D\uD380\uD384\uD38C\uD38D\uD38F\uD390\uD391\uD398\uD399\uD39C\uD3A0\uD3A8\uD3A9\uD3AB\uD3AD\uD3B4\uD3B8\uD3BC\uD3C4\uD3C5\uD3C8\uD3C9\uD3D0\uD3D8\uD3E1\uD3E3\uD3EC\uD3ED\uD3F0\uD3F4\uD3FC\uD3FD\uD3FF\uD401"],["c7a1","\uD408\uD41D\uD440\uD444\uD45C\uD460\uD464\uD46D\uD46F\uD478\uD479\uD47C\uD47F\uD480\uD482\uD488\uD489\uD48B\uD48D\uD494\uD4A9\uD4CC\uD4D0\uD4D4\uD4DC\uD4DF\uD4E8\uD4EC\uD4F0\uD4F8\uD4FB\uD4FD\uD504\uD508\uD50C\uD514\uD515\uD517\uD53C\uD53D\uD540\uD544\uD54C\uD54D\uD54F\uD551\uD558\uD559\uD55C\uD560\uD565\uD568\uD569\uD56B\uD56D\uD574\uD575\uD578\uD57C\uD584\uD585\uD587\uD588\uD589\uD590\uD5A5\uD5C8\uD5C9\uD5CC\uD5D0\uD5D2\uD5D8\uD5D9\uD5DB\uD5DD\uD5E4\uD5E5\uD5E8\uD5EC\uD5F4\uD5F5\uD5F7\uD5F9\uD600\uD601\uD604\uD608\uD610\uD611\uD613\uD614\uD615\uD61C\uD620"],["c8a1","\uD624\uD62D\uD638\uD639\uD63C\uD640\uD645\uD648\uD649\uD64B\uD64D\uD651\uD654\uD655\uD658\uD65C\uD667\uD669\uD670\uD671\uD674\uD683\uD685\uD68C\uD68D\uD690\uD694\uD69D\uD69F\uD6A1\uD6A8\uD6AC\uD6B0\uD6B9\uD6BB\uD6C4\uD6C5\uD6C8\uD6CC\uD6D1\uD6D4\uD6D7\uD6D9\uD6E0\uD6E4\uD6E8\uD6F0\uD6F5\uD6FC\uD6FD\uD700\uD704\uD711\uD718\uD719\uD71C\uD720\uD728\uD729\uD72B\uD72D\uD734\uD735\uD738\uD73C\uD744\uD747\uD749\uD750\uD751\uD754\uD756\uD757\uD758\uD759\uD760\uD761\uD763\uD765\uD769\uD76C\uD770\uD774\uD77C\uD77D\uD781\uD788\uD789\uD78C\uD790\uD798\uD799\uD79B\uD79D"],["caa1","\u4F3D\u4F73\u5047\u50F9\u52A0\u53EF\u5475\u54E5\u5609\u5AC1\u5BB6\u6687\u67B6\u67B7\u67EF\u6B4C\u73C2\u75C2\u7A3C\u82DB\u8304\u8857\u8888\u8A36\u8CC8\u8DCF\u8EFB\u8FE6\u99D5\u523B\u5374\u5404\u606A\u6164\u6BBC\u73CF\u811A\u89BA\u89D2\u95A3\u4F83\u520A\u58BE\u5978\u59E6\u5E72\u5E79\u61C7\u63C0\u6746\u67EC\u687F\u6F97\u764E\u770B\u78F5\u7A08\u7AFF\u7C21\u809D\u826E\u8271\u8AEB\u9593\u4E6B\u559D\u66F7\u6E34\u78A3\u7AED\u845B\u8910\u874E\u97A8\u52D8\u574E\u582A\u5D4C\u611F\u61BE\u6221\u6562\u67D1\u6A44\u6E1B\u7518\u75B3\u76E3\u77B0\u7D3A\u90AF\u9451\u9452\u9F95"],["cba1","\u5323\u5CAC\u7532\u80DB\u9240\u9598\u525B\u5808\u59DC\u5CA1\u5D17\u5EB7\u5F3A\u5F4A\u6177\u6C5F\u757A\u7586\u7CE0\u7D73\u7DB1\u7F8C\u8154\u8221\u8591\u8941\u8B1B\u92FC\u964D\u9C47\u4ECB\u4EF7\u500B\u51F1\u584F\u6137\u613E\u6168\u6539\u69EA\u6F11\u75A5\u7686\u76D6\u7B87\u82A5\u84CB\uF900\u93A7\u958B\u5580\u5BA2\u5751\uF901\u7CB3\u7FB9\u91B5\u5028\u53BB\u5C45\u5DE8\u62D2\u636E\u64DA\u64E7\u6E20\u70AC\u795B\u8DDD\u8E1E\uF902\u907D\u9245\u92F8\u4E7E\u4EF6\u5065\u5DFE\u5EFA\u6106\u6957\u8171\u8654\u8E47\u9375\u9A2B\u4E5E\u5091\u6770\u6840\u5109\u528D\u5292\u6AA2"],["cca1","\u77BC\u9210\u9ED4\u52AB\u602F\u8FF2\u5048\u61A9\u63ED\u64CA\u683C\u6A84\u6FC0\u8188\u89A1\u9694\u5805\u727D\u72AC\u7504\u7D79\u7E6D\u80A9\u898B\u8B74\u9063\u9D51\u6289\u6C7A\u6F54\u7D50\u7F3A\u8A23\u517C\u614A\u7B9D\u8B19\u9257\u938C\u4EAC\u4FD3\u501E\u50BE\u5106\u52C1\u52CD\u537F\u5770\u5883\u5E9A\u5F91\u6176\u61AC\u64CE\u656C\u666F\u66BB\u66F4\u6897\u6D87\u7085\u70F1\u749F\u74A5\u74CA\u75D9\u786C\u78EC\u7ADF\u7AF6\u7D45\u7D93\u8015\u803F\u811B\u8396\u8B66\u8F15\u9015\u93E1\u9803\u9838\u9A5A\u9BE8\u4FC2\u5553\u583A\u5951\u5B63\u5C46\u60B8\u6212\u6842\u68B0"],["cda1","\u68E8\u6EAA\u754C\u7678\u78CE\u7A3D\u7CFB\u7E6B\u7E7C\u8A08\u8AA1\u8C3F\u968E\u9DC4\u53E4\u53E9\u544A\u5471\u56FA\u59D1\u5B64\u5C3B\u5EAB\u62F7\u6537\u6545\u6572\u66A0\u67AF\u69C1\u6CBD\u75FC\u7690\u777E\u7A3F\u7F94\u8003\u80A1\u818F\u82E6\u82FD\u83F0\u85C1\u8831\u88B4\u8AA5\uF903\u8F9C\u932E\u96C7\u9867\u9AD8\u9F13\u54ED\u659B\u66F2\u688F\u7A40\u8C37\u9D60\u56F0\u5764\u5D11\u6606\u68B1\u68CD\u6EFE\u7428\u889E\u9BE4\u6C68\uF904\u9AA8\u4F9B\u516C\u5171\u529F\u5B54\u5DE5\u6050\u606D\u62F1\u63A7\u653B\u73D9\u7A7A\u86A3\u8CA2\u978F\u4E32\u5BE1\u6208\u679C\u74DC"],["cea1","\u79D1\u83D3\u8A87\u8AB2\u8DE8\u904E\u934B\u9846\u5ED3\u69E8\u85FF\u90ED\uF905\u51A0\u5B98\u5BEC\u6163\u68FA\u6B3E\u704C\u742F\u74D8\u7BA1\u7F50\u83C5\u89C0\u8CAB\u95DC\u9928\u522E\u605D\u62EC\u9002\u4F8A\u5149\u5321\u58D9\u5EE3\u66E0\u6D38\u709A\u72C2\u73D6\u7B50\u80F1\u945B\u5366\u639B\u7F6B\u4E56\u5080\u584A\u58DE\u602A\u6127\u62D0\u69D0\u9B41\u5B8F\u7D18\u80B1\u8F5F\u4EA4\u50D1\u54AC\u55AC\u5B0C\u5DA0\u5DE7\u652A\u654E\u6821\u6A4B\u72E1\u768E\u77EF\u7D5E\u7FF9\u81A0\u854E\u86DF\u8F03\u8F4E\u90CA\u9903\u9A55\u9BAB\u4E18\u4E45\u4E5D\u4EC7\u4FF1\u5177\u52FE"],["cfa1","\u5340\u53E3\u53E5\u548E\u5614\u5775\u57A2\u5BC7\u5D87\u5ED0\u61FC\u62D8\u6551\u67B8\u67E9\u69CB\u6B50\u6BC6\u6BEC\u6C42\u6E9D\u7078\u72D7\u7396\u7403\u77BF\u77E9\u7A76\u7D7F\u8009\u81FC\u8205\u820A\u82DF\u8862\u8B33\u8CFC\u8EC0\u9011\u90B1\u9264\u92B6\u99D2\u9A45\u9CE9\u9DD7\u9F9C\u570B\u5C40\u83CA\u97A0\u97AB\u9EB4\u541B\u7A98\u7FA4\u88D9\u8ECD\u90E1\u5800\u5C48\u6398\u7A9F\u5BAE\u5F13\u7A79\u7AAE\u828E\u8EAC\u5026\u5238\u52F8\u5377\u5708\u62F3\u6372\u6B0A\u6DC3\u7737\u53A5\u7357\u8568\u8E76\u95D5\u673A\u6AC3\u6F70\u8A6D\u8ECC\u994B\uF906\u6677\u6B78\u8CB4"],["d0a1","\u9B3C\uF907\u53EB\u572D\u594E\u63C6\u69FB\u73EA\u7845\u7ABA\u7AC5\u7CFE\u8475\u898F\u8D73\u9035\u95A8\u52FB\u5747\u7547\u7B60\u83CC\u921E\uF908\u6A58\u514B\u524B\u5287\u621F\u68D8\u6975\u9699\u50C5\u52A4\u52E4\u61C3\u65A4\u6839\u69FF\u747E\u7B4B\u82B9\u83EB\u89B2\u8B39\u8FD1\u9949\uF909\u4ECA\u5997\u64D2\u6611\u6A8E\u7434\u7981\u79BD\u82A9\u887E\u887F\u895F\uF90A\u9326\u4F0B\u53CA\u6025\u6271\u6C72\u7D1A\u7D66\u4E98\u5162\u77DC\u80AF\u4F01\u4F0E\u5176\u5180\u55DC\u5668\u573B\u57FA\u57FC\u5914\u5947\u5993\u5BC4\u5C90\u5D0E\u5DF1\u5E7E\u5FCC\u6280\u65D7\u65E3"],["d1a1","\u671E\u671F\u675E\u68CB\u68C4\u6A5F\u6B3A\u6C23\u6C7D\u6C82\u6DC7\u7398\u7426\u742A\u7482\u74A3\u7578\u757F\u7881\u78EF\u7941\u7947\u7948\u797A\u7B95\u7D00\u7DBA\u7F88\u8006\u802D\u808C\u8A18\u8B4F\u8C48\u8D77\u9321\u9324\u98E2\u9951\u9A0E\u9A0F\u9A65\u9E92\u7DCA\u4F76\u5409\u62EE\u6854\u91D1\u55AB\u513A\uF90B\uF90C\u5A1C\u61E6\uF90D\u62CF\u62FF\uF90E",5,"\u90A3\uF914",4,"\u8AFE\uF919\uF91A\uF91B\uF91C\u6696\uF91D\u7156\uF91E\uF91F\u96E3\uF920\u634F\u637A\u5357\uF921\u678F\u6960\u6E73\uF922\u7537\uF923\uF924\uF925"],["d2a1","\u7D0D\uF926\uF927\u8872\u56CA\u5A18\uF928",4,"\u4E43\uF92D\u5167\u5948\u67F0\u8010\uF92E\u5973\u5E74\u649A\u79CA\u5FF5\u606C\u62C8\u637B\u5BE7\u5BD7\u52AA\uF92F\u5974\u5F29\u6012\uF930\uF931\uF932\u7459\uF933",5,"\u99D1\uF939",10,"\u6FC3\uF944\uF945\u81BF\u8FB2\u60F1\uF946\uF947\u8166\uF948\uF949\u5C3F\uF94A",7,"\u5AE9\u8A25\u677B\u7D10\uF952",5,"\u80FD\uF958\uF959\u5C3C\u6CE5\u533F\u6EBA\u591A\u8336"],["d3a1","\u4E39\u4EB6\u4F46\u55AE\u5718\u58C7\u5F56\u65B7\u65E6\u6A80\u6BB5\u6E4D\u77ED\u7AEF\u7C1E\u7DDE\u86CB\u8892\u9132\u935B\u64BB\u6FBE\u737A\u75B8\u9054\u5556\u574D\u61BA\u64D4\u66C7\u6DE1\u6E5B\u6F6D\u6FB9\u75F0\u8043\u81BD\u8541\u8983\u8AC7\u8B5A\u931F\u6C93\u7553\u7B54\u8E0F\u905D\u5510\u5802\u5858\u5E62\u6207\u649E\u68E0\u7576\u7CD6\u87B3\u9EE8\u4EE3\u5788\u576E\u5927\u5C0D\u5CB1\u5E36\u5F85\u6234\u64E1\u73B3\u81FA\u888B\u8CB8\u968A\u9EDB\u5B85\u5FB7\u60B3\u5012\u5200\u5230\u5716\u5835\u5857\u5C0E\u5C60\u5CF6\u5D8B\u5EA6\u5F92\u60BC\u6311\u6389\u6417\u6843"],["d4a1","\u68F9\u6AC2\u6DD8\u6E21\u6ED4\u6FE4\u71FE\u76DC\u7779\u79B1\u7A3B\u8404\u89A9\u8CED\u8DF3\u8E48\u9003\u9014\u9053\u90FD\u934D\u9676\u97DC\u6BD2\u7006\u7258\u72A2\u7368\u7763\u79BF\u7BE4\u7E9B\u8B80\u58A9\u60C7\u6566\u65FD\u66BE\u6C8C\u711E\u71C9\u8C5A\u9813\u4E6D\u7A81\u4EDD\u51AC\u51CD\u52D5\u540C\u61A7\u6771\u6850\u68DF\u6D1E\u6F7C\u75BC\u77B3\u7AE5\u80F4\u8463\u9285\u515C\u6597\u675C\u6793\u75D8\u7AC7\u8373\uF95A\u8C46\u9017\u982D\u5C6F\u81C0\u829A\u9041\u906F\u920D\u5F97\u5D9D\u6A59\u71C8\u767B\u7B49\u85E4\u8B04\u9127\u9A30\u5587\u61F6\uF95B\u7669\u7F85"],["d5a1","\u863F\u87BA\u88F8\u908F\uF95C\u6D1B\u70D9\u73DE\u7D61\u843D\uF95D\u916A\u99F1\uF95E\u4E82\u5375\u6B04\u6B12\u703E\u721B\u862D\u9E1E\u524C\u8FA3\u5D50\u64E5\u652C\u6B16\u6FEB\u7C43\u7E9C\u85CD\u8964\u89BD\u62C9\u81D8\u881F\u5ECA\u6717\u6D6A\u72FC\u7405\u746F\u8782\u90DE\u4F86\u5D0D\u5FA0\u840A\u51B7\u63A0\u7565\u4EAE\u5006\u5169\u51C9\u6881\u6A11\u7CAE\u7CB1\u7CE7\u826F\u8AD2\u8F1B\u91CF\u4FB6\u5137\u52F5\u5442\u5EEC\u616E\u623E\u65C5\u6ADA\u6FFE\u792A\u85DC\u8823\u95AD\u9A62\u9A6A\u9E97\u9ECE\u529B\u66C6\u6B77\u701D\u792B\u8F62\u9742\u6190\u6200\u6523\u6F23"],["d6a1","\u7149\u7489\u7DF4\u806F\u84EE\u8F26\u9023\u934A\u51BD\u5217\u52A3\u6D0C\u70C8\u88C2\u5EC9\u6582\u6BAE\u6FC2\u7C3E\u7375\u4EE4\u4F36\u56F9\uF95F\u5CBA\u5DBA\u601C\u73B2\u7B2D\u7F9A\u7FCE\u8046\u901E\u9234\u96F6\u9748\u9818\u9F61\u4F8B\u6FA7\u79AE\u91B4\u96B7\u52DE\uF960\u6488\u64C4\u6AD3\u6F5E\u7018\u7210\u76E7\u8001\u8606\u865C\u8DEF\u8F05\u9732\u9B6F\u9DFA\u9E75\u788C\u797F\u7DA0\u83C9\u9304\u9E7F\u9E93\u8AD6\u58DF\u5F04\u6727\u7027\u74CF\u7C60\u807E\u5121\u7028\u7262\u78CA\u8CC2\u8CDA\u8CF4\u96F7\u4E86\u50DA\u5BEE\u5ED6\u6599\u71CE\u7642\u77AD\u804A\u84FC"],["d7a1","\u907C\u9B27\u9F8D\u58D8\u5A41\u5C62\u6A13\u6DDA\u6F0F\u763B\u7D2F\u7E37\u851E\u8938\u93E4\u964B\u5289\u65D2\u67F3\u69B4\u6D41\u6E9C\u700F\u7409\u7460\u7559\u7624\u786B\u8B2C\u985E\u516D\u622E\u9678\u4F96\u502B\u5D19\u6DEA\u7DB8\u8F2A\u5F8B\u6144\u6817\uF961\u9686\u52D2\u808B\u51DC\u51CC\u695E\u7A1C\u7DBE\u83F1\u9675\u4FDA\u5229\u5398\u540F\u550E\u5C65\u60A7\u674E\u68A8\u6D6C\u7281\u72F8\u7406\u7483\uF962\u75E2\u7C6C\u7F79\u7FB8\u8389\u88CF\u88E1\u91CC\u91D0\u96E2\u9BC9\u541D\u6F7E\u71D0\u7498\u85FA\u8EAA\u96A3\u9C57\u9E9F\u6797\u6DCB\u7433\u81E8\u9716\u782C"],["d8a1","\u7ACB\u7B20\u7C92\u6469\u746A\u75F2\u78BC\u78E8\u99AC\u9B54\u9EBB\u5BDE\u5E55\u6F20\u819C\u83AB\u9088\u4E07\u534D\u5A29\u5DD2\u5F4E\u6162\u633D\u6669\u66FC\u6EFF\u6F2B\u7063\u779E\u842C\u8513\u883B\u8F13\u9945\u9C3B\u551C\u62B9\u672B\u6CAB\u8309\u896A\u977A\u4EA1\u5984\u5FD8\u5FD9\u671B\u7DB2\u7F54\u8292\u832B\u83BD\u8F1E\u9099\u57CB\u59B9\u5A92\u5BD0\u6627\u679A\u6885\u6BCF\u7164\u7F75\u8CB7\u8CE3\u9081\u9B45\u8108\u8C8A\u964C\u9A40\u9EA5\u5B5F\u6C13\u731B\u76F2\u76DF\u840C\u51AA\u8993\u514D\u5195\u52C9\u68C9\u6C94\u7704\u7720\u7DBF\u7DEC\u9762\u9EB5\u6EC5"],["d9a1","\u8511\u51A5\u540D\u547D\u660E\u669D\u6927\u6E9F\u76BF\u7791\u8317\u84C2\u879F\u9169\u9298\u9CF4\u8882\u4FAE\u5192\u52DF\u59C6\u5E3D\u6155\u6478\u6479\u66AE\u67D0\u6A21\u6BCD\u6BDB\u725F\u7261\u7441\u7738\u77DB\u8017\u82BC\u8305\u8B00\u8B28\u8C8C\u6728\u6C90\u7267\u76EE\u7766\u7A46\u9DA9\u6B7F\u6C92\u5922\u6726\u8499\u536F\u5893\u5999\u5EDF\u63CF\u6634\u6773\u6E3A\u732B\u7AD7\u82D7\u9328\u52D9\u5DEB\u61AE\u61CB\u620A\u62C7\u64AB\u65E0\u6959\u6B66\u6BCB\u7121\u73F7\u755D\u7E46\u821E\u8302\u856A\u8AA3\u8CBF\u9727\u9D61\u58A8\u9ED8\u5011\u520E\u543B\u554F\u6587"],["daa1","\u6C76\u7D0A\u7D0B\u805E\u868A\u9580\u96EF\u52FF\u6C95\u7269\u5473\u5A9A\u5C3E\u5D4B\u5F4C\u5FAE\u672A\u68B6\u6963\u6E3C\u6E44\u7709\u7C73\u7F8E\u8587\u8B0E\u8FF7\u9761\u9EF4\u5CB7\u60B6\u610D\u61AB\u654F\u65FB\u65FC\u6C11\u6CEF\u739F\u73C9\u7DE1\u9594\u5BC6\u871C\u8B10\u525D\u535A\u62CD\u640F\u64B2\u6734\u6A38\u6CCA\u73C0\u749E\u7B94\u7C95\u7E1B\u818A\u8236\u8584\u8FEB\u96F9\u99C1\u4F34\u534A\u53CD\u53DB\u62CC\u642C\u6500\u6591\u69C3\u6CEE\u6F58\u73ED\u7554\u7622\u76E4\u76FC\u78D0\u78FB\u792C\u7D46\u822C\u87E0\u8FD4\u9812\u98EF\u52C3\u62D4\u64A5\u6E24\u6F51"],["dba1","\u767C\u8DCB\u91B1\u9262\u9AEE\u9B43\u5023\u508D\u574A\u59A8\u5C28\u5E47\u5F77\u623F\u653E\u65B9\u65C1\u6609\u678B\u699C\u6EC2\u78C5\u7D21\u80AA\u8180\u822B\u82B3\u84A1\u868C\u8A2A\u8B17\u90A6\u9632\u9F90\u500D\u4FF3\uF963\u57F9\u5F98\u62DC\u6392\u676F\u6E43\u7119\u76C3\u80CC\u80DA\u88F4\u88F5\u8919\u8CE0\u8F29\u914D\u966A\u4F2F\u4F70\u5E1B\u67CF\u6822\u767D\u767E\u9B44\u5E61\u6A0A\u7169\u71D4\u756A\uF964\u7E41\u8543\u85E9\u98DC\u4F10\u7B4F\u7F70\u95A5\u51E1\u5E06\u68B5\u6C3E\u6C4E\u6CDB\u72AF\u7BC4\u8303\u6CD5\u743A\u50FB\u5288\u58C1\u64D8\u6A97\u74A7\u7656"],["dca1","\u78A7\u8617\u95E2\u9739\uF965\u535E\u5F01\u8B8A\u8FA8\u8FAF\u908A\u5225\u77A5\u9C49\u9F08\u4E19\u5002\u5175\u5C5B\u5E77\u661E\u663A\u67C4\u68C5\u70B3\u7501\u75C5\u79C9\u7ADD\u8F27\u9920\u9A08\u4FDD\u5821\u5831\u5BF6\u666E\u6B65\u6D11\u6E7A\u6F7D\u73E4\u752B\u83E9\u88DC\u8913\u8B5C\u8F14\u4F0F\u50D5\u5310\u535C\u5B93\u5FA9\u670D\u798F\u8179\u832F\u8514\u8907\u8986\u8F39\u8F3B\u99A5\u9C12\u672C\u4E76\u4FF8\u5949\u5C01\u5CEF\u5CF0\u6367\u68D2\u70FD\u71A2\u742B\u7E2B\u84EC\u8702\u9022\u92D2\u9CF3\u4E0D\u4ED8\u4FEF\u5085\u5256\u526F\u5426\u5490\u57E0\u592B\u5A66"],["dda1","\u5B5A\u5B75\u5BCC\u5E9C\uF966\u6276\u6577\u65A7\u6D6E\u6EA5\u7236\u7B26\u7C3F\u7F36\u8150\u8151\u819A\u8240\u8299\u83A9\u8A03\u8CA0\u8CE6\u8CFB\u8D74\u8DBA\u90E8\u91DC\u961C\u9644\u99D9\u9CE7\u5317\u5206\u5429\u5674\u58B3\u5954\u596E\u5FFF\u61A4\u626E\u6610\u6C7E\u711A\u76C6\u7C89\u7CDE\u7D1B\u82AC\u8CC1\u96F0\uF967\u4F5B\u5F17\u5F7F\u62C2\u5D29\u670B\u68DA\u787C\u7E43\u9D6C\u4E15\u5099\u5315\u532A\u5351\u5983\u5A62\u5E87\u60B2\u618A\u6249\u6279\u6590\u6787\u69A7\u6BD4\u6BD6\u6BD7\u6BD8\u6CB8\uF968\u7435\u75FA\u7812\u7891\u79D5\u79D8\u7C83\u7DCB\u7FE1\u80A5"],["dea1","\u813E\u81C2\u83F2\u871A\u88E8\u8AB9\u8B6C\u8CBB\u9119\u975E\u98DB\u9F3B\u56AC\u5B2A\u5F6C\u658C\u6AB3\u6BAF\u6D5C\u6FF1\u7015\u725D\u73AD\u8CA7\u8CD3\u983B\u6191\u6C37\u8058\u9A01\u4E4D\u4E8B\u4E9B\u4ED5\u4F3A\u4F3C\u4F7F\u4FDF\u50FF\u53F2\u53F8\u5506\u55E3\u56DB\u58EB\u5962\u5A11\u5BEB\u5BFA\u5C04\u5DF3\u5E2B\u5F99\u601D\u6368\u659C\u65AF\u67F6\u67FB\u68AD\u6B7B\u6C99\u6CD7\u6E23\u7009\u7345\u7802\u793E\u7940\u7960\u79C1\u7BE9\u7D17\u7D72\u8086\u820D\u838E\u84D1\u86C7\u88DF\u8A50\u8A5E\u8B1D\u8CDC\u8D66\u8FAD\u90AA\u98FC\u99DF\u9E9D\u524A\uF969\u6714\uF96A"],["dfa1","\u5098\u522A\u5C71\u6563\u6C55\u73CA\u7523\u759D\u7B97\u849C\u9178\u9730\u4E77\u6492\u6BBA\u715E\u85A9\u4E09\uF96B\u6749\u68EE\u6E17\u829F\u8518\u886B\u63F7\u6F81\u9212\u98AF\u4E0A\u50B7\u50CF\u511F\u5546\u55AA\u5617\u5B40\u5C19\u5CE0\u5E38\u5E8A\u5EA0\u5EC2\u60F3\u6851\u6A61\u6E58\u723D\u7240\u72C0\u76F8\u7965\u7BB1\u7FD4\u88F3\u89F4\u8A73\u8C61\u8CDE\u971C\u585E\u74BD\u8CFD\u55C7\uF96C\u7A61\u7D22\u8272\u7272\u751F\u7525\uF96D\u7B19\u5885\u58FB\u5DBC\u5E8F\u5EB6\u5F90\u6055\u6292\u637F\u654D\u6691\u66D9\u66F8\u6816\u68F2\u7280\u745E\u7B6E\u7D6E\u7DD6\u7F72"],["e0a1","\u80E5\u8212\u85AF\u897F\u8A93\u901D\u92E4\u9ECD\u9F20\u5915\u596D\u5E2D\u60DC\u6614\u6673\u6790\u6C50\u6DC5\u6F5F\u77F3\u78A9\u84C6\u91CB\u932B\u4ED9\u50CA\u5148\u5584\u5B0B\u5BA3\u6247\u657E\u65CB\u6E32\u717D\u7401\u7444\u7487\u74BF\u766C\u79AA\u7DDA\u7E55\u7FA8\u817A\u81B3\u8239\u861A\u87EC\u8A75\u8DE3\u9078\u9291\u9425\u994D\u9BAE\u5368\u5C51\u6954\u6CC4\u6D29\u6E2B\u820C\u859B\u893B\u8A2D\u8AAA\u96EA\u9F67\u5261\u66B9\u6BB2\u7E96\u87FE\u8D0D\u9583\u965D\u651D\u6D89\u71EE\uF96E\u57CE\u59D3\u5BAC\u6027\u60FA\u6210\u661F\u665F\u7329\u73F9\u76DB\u7701\u7B6C"],["e1a1","\u8056\u8072\u8165\u8AA0\u9192\u4E16\u52E2\u6B72\u6D17\u7A05\u7B39\u7D30\uF96F\u8CB0\u53EC\u562F\u5851\u5BB5\u5C0F\u5C11\u5DE2\u6240\u6383\u6414\u662D\u68B3\u6CBC\u6D88\u6EAF\u701F\u70A4\u71D2\u7526\u758F\u758E\u7619\u7B11\u7BE0\u7C2B\u7D20\u7D39\u852C\u856D\u8607\u8A34\u900D\u9061\u90B5\u92B7\u97F6\u9A37\u4FD7\u5C6C\u675F\u6D91\u7C9F\u7E8C\u8B16\u8D16\u901F\u5B6B\u5DFD\u640D\u84C0\u905C\u98E1\u7387\u5B8B\u609A\u677E\u6DDE\u8A1F\u8AA6\u9001\u980C\u5237\uF970\u7051\u788E\u9396\u8870\u91D7\u4FEE\u53D7\u55FD\u56DA\u5782\u58FD\u5AC2\u5B88\u5CAB\u5CC0\u5E25\u6101"],["e2a1","\u620D\u624B\u6388\u641C\u6536\u6578\u6A39\u6B8A\u6C34\u6D19\u6F31\u71E7\u72E9\u7378\u7407\u74B2\u7626\u7761\u79C0\u7A57\u7AEA\u7CB9\u7D8F\u7DAC\u7E61\u7F9E\u8129\u8331\u8490\u84DA\u85EA\u8896\u8AB0\u8B90\u8F38\u9042\u9083\u916C\u9296\u92B9\u968B\u96A7\u96A8\u96D6\u9700\u9808\u9996\u9AD3\u9B1A\u53D4\u587E\u5919\u5B70\u5BBF\u6DD1\u6F5A\u719F\u7421\u74B9\u8085\u83FD\u5DE1\u5F87\u5FAA\u6042\u65EC\u6812\u696F\u6A53\u6B89\u6D35\u6DF3\u73E3\u76FE\u77AC\u7B4D\u7D14\u8123\u821C\u8340\u84F4\u8563\u8A62\u8AC4\u9187\u931E\u9806\u99B4\u620C\u8853\u8FF0\u9265\u5D07\u5D27"],["e3a1","\u5D69\u745F\u819D\u8768\u6FD5\u62FE\u7FD2\u8936\u8972\u4E1E\u4E58\u50E7\u52DD\u5347\u627F\u6607\u7E69\u8805\u965E\u4F8D\u5319\u5636\u59CB\u5AA4\u5C38\u5C4E\u5C4D\u5E02\u5F11\u6043\u65BD\u662F\u6642\u67BE\u67F4\u731C\u77E2\u793A\u7FC5\u8494\u84CD\u8996\u8A66\u8A69\u8AE1\u8C55\u8C7A\u57F4\u5BD4\u5F0F\u606F\u62ED\u690D\u6B96\u6E5C\u7184\u7BD2\u8755\u8B58\u8EFE\u98DF\u98FE\u4F38\u4F81\u4FE1\u547B\u5A20\u5BB8\u613C\u65B0\u6668\u71FC\u7533\u795E\u7D33\u814E\u81E3\u8398\u85AA\u85CE\u8703\u8A0A\u8EAB\u8F9B\uF971\u8FC5\u5931\u5BA4\u5BE6\u6089\u5BE9\u5C0B\u5FC3\u6C81"],["e4a1","\uF972\u6DF1\u700B\u751A\u82AF\u8AF6\u4EC0\u5341\uF973\u96D9\u6C0F\u4E9E\u4FC4\u5152\u555E\u5A25\u5CE8\u6211\u7259\u82BD\u83AA\u86FE\u8859\u8A1D\u963F\u96C5\u9913\u9D09\u9D5D\u580A\u5CB3\u5DBD\u5E44\u60E1\u6115\u63E1\u6A02\u6E25\u9102\u9354\u984E\u9C10\u9F77\u5B89\u5CB8\u6309\u664F\u6848\u773C\u96C1\u978D\u9854\u9B9F\u65A1\u8B01\u8ECB\u95BC\u5535\u5CA9\u5DD6\u5EB5\u6697\u764C\u83F4\u95C7\u58D3\u62BC\u72CE\u9D28\u4EF0\u592E\u600F\u663B\u6B83\u79E7\u9D26\u5393\u54C0\u57C3\u5D16\u611B\u66D6\u6DAF\u788D\u827E\u9698\u9744\u5384\u627C\u6396\u6DB2\u7E0A\u814B\u984D"],["e5a1","\u6AFB\u7F4C\u9DAF\u9E1A\u4E5F\u503B\u51B6\u591C\u60F9\u63F6\u6930\u723A\u8036\uF974\u91CE\u5F31\uF975\uF976\u7D04\u82E5\u846F\u84BB\u85E5\u8E8D\uF977\u4F6F\uF978\uF979\u58E4\u5B43\u6059\u63DA\u6518\u656D\u6698\uF97A\u694A\u6A23\u6D0B\u7001\u716C\u75D2\u760D\u79B3\u7A70\uF97B\u7F8A\uF97C\u8944\uF97D\u8B93\u91C0\u967D\uF97E\u990A\u5704\u5FA1\u65BC\u6F01\u7600\u79A6\u8A9E\u99AD\u9B5A\u9F6C\u5104\u61B6\u6291\u6A8D\u81C6\u5043\u5830\u5F66\u7109\u8A00\u8AFA\u5B7C\u8616\u4FFA\u513C\u56B4\u5944\u63A9\u6DF9\u5DAA\u696D\u5186\u4E88\u4F59\uF97F\uF980\uF981\u5982\uF982"],["e6a1","\uF983\u6B5F\u6C5D\uF984\u74B5\u7916\uF985\u8207\u8245\u8339\u8F3F\u8F5D\uF986\u9918\uF987\uF988\uF989\u4EA6\uF98A\u57DF\u5F79\u6613\uF98B\uF98C\u75AB\u7E79\u8B6F\uF98D\u9006\u9A5B\u56A5\u5827\u59F8\u5A1F\u5BB4\uF98E\u5EF6\uF98F\uF990\u6350\u633B\uF991\u693D\u6C87\u6CBF\u6D8E\u6D93\u6DF5\u6F14\uF992\u70DF\u7136\u7159\uF993\u71C3\u71D5\uF994\u784F\u786F\uF995\u7B75\u7DE3\uF996\u7E2F\uF997\u884D\u8EDF\uF998\uF999\uF99A\u925B\uF99B\u9CF6\uF99C\uF99D\uF99E\u6085\u6D85\uF99F\u71B1\uF9A0\uF9A1\u95B1\u53AD\uF9A2\uF9A3\uF9A4\u67D3\uF9A5\u708E\u7130\u7430\u8276\u82D2"],["e7a1","\uF9A6\u95BB\u9AE5\u9E7D\u66C4\uF9A7\u71C1\u8449\uF9A8\uF9A9\u584B\uF9AA\uF9AB\u5DB8\u5F71\uF9AC\u6620\u668E\u6979\u69AE\u6C38\u6CF3\u6E36\u6F41\u6FDA\u701B\u702F\u7150\u71DF\u7370\uF9AD\u745B\uF9AE\u74D4\u76C8\u7A4E\u7E93\uF9AF\uF9B0\u82F1\u8A60\u8FCE\uF9B1\u9348\uF9B2\u9719\uF9B3\uF9B4\u4E42\u502A\uF9B5\u5208\u53E1\u66F3\u6C6D\u6FCA\u730A\u777F\u7A62\u82AE\u85DD\u8602\uF9B6\u88D4\u8A63\u8B7D\u8C6B\uF9B7\u92B3\uF9B8\u9713\u9810\u4E94\u4F0D\u4FC9\u50B2\u5348\u543E\u5433\u55DA\u5862\u58BA\u5967\u5A1B\u5BE4\u609F\uF9B9\u61CA\u6556\u65FF\u6664\u68A7\u6C5A\u6FB3"],["e8a1","\u70CF\u71AC\u7352\u7B7D\u8708\u8AA4\u9C32\u9F07\u5C4B\u6C83\u7344\u7389\u923A\u6EAB\u7465\u761F\u7A69\u7E15\u860A\u5140\u58C5\u64C1\u74EE\u7515\u7670\u7FC1\u9095\u96CD\u9954\u6E26\u74E6\u7AA9\u7AAA\u81E5\u86D9\u8778\u8A1B\u5A49\u5B8C\u5B9B\u68A1\u6900\u6D63\u73A9\u7413\u742C\u7897\u7DE9\u7FEB\u8118\u8155\u839E\u8C4C\u962E\u9811\u66F0\u5F80\u65FA\u6789\u6C6A\u738B\u502D\u5A03\u6B6A\u77EE\u5916\u5D6C\u5DCD\u7325\u754F\uF9BA\uF9BB\u50E5\u51F9\u582F\u592D\u5996\u59DA\u5BE5\uF9BC\uF9BD\u5DA2\u62D7\u6416\u6493\u64FE\uF9BE\u66DC\uF9BF\u6A48\uF9C0\u71FF\u7464\uF9C1"],["e9a1","\u7A88\u7AAF\u7E47\u7E5E\u8000\u8170\uF9C2\u87EF\u8981\u8B20\u9059\uF9C3\u9080\u9952\u617E\u6B32\u6D74\u7E1F\u8925\u8FB1\u4FD1\u50AD\u5197\u52C7\u57C7\u5889\u5BB9\u5EB8\u6142\u6995\u6D8C\u6E67\u6EB6\u7194\u7462\u7528\u752C\u8073\u8338\u84C9\u8E0A\u9394\u93DE\uF9C4\u4E8E\u4F51\u5076\u512A\u53C8\u53CB\u53F3\u5B87\u5BD3\u5C24\u611A\u6182\u65F4\u725B\u7397\u7440\u76C2\u7950\u7991\u79B9\u7D06\u7FBD\u828B\u85D5\u865E\u8FC2\u9047\u90F5\u91EA\u9685\u96E8\u96E9\u52D6\u5F67\u65ED\u6631\u682F\u715C\u7A36\u90C1\u980A\u4E91\uF9C5\u6A52\u6B9E\u6F90\u7189\u8018\u82B8\u8553"],["eaa1","\u904B\u9695\u96F2\u97FB\u851A\u9B31\u4E90\u718A\u96C4\u5143\u539F\u54E1\u5713\u5712\u57A3\u5A9B\u5AC4\u5BC3\u6028\u613F\u63F4\u6C85\u6D39\u6E72\u6E90\u7230\u733F\u7457\u82D1\u8881\u8F45\u9060\uF9C6\u9662\u9858\u9D1B\u6708\u8D8A\u925E\u4F4D\u5049\u50DE\u5371\u570D\u59D4\u5A01\u5C09\u6170\u6690\u6E2D\u7232\u744B\u7DEF\u80C3\u840E\u8466\u853F\u875F\u885B\u8918\u8B02\u9055\u97CB\u9B4F\u4E73\u4F91\u5112\u516A\uF9C7\u552F\u55A9\u5B7A\u5BA5\u5E7C\u5E7D\u5EBE\u60A0\u60DF\u6108\u6109\u63C4\u6538\u6709\uF9C8\u67D4\u67DA\uF9C9\u6961\u6962\u6CB9\u6D27\uF9CA\u6E38\uF9CB"],["eba1","\u6FE1\u7336\u7337\uF9CC\u745C\u7531\uF9CD\u7652\uF9CE\uF9CF\u7DAD\u81FE\u8438\u88D5\u8A98\u8ADB\u8AED\u8E30\u8E42\u904A\u903E\u907A\u9149\u91C9\u936E\uF9D0\uF9D1\u5809\uF9D2\u6BD3\u8089\u80B2\uF9D3\uF9D4\u5141\u596B\u5C39\uF9D5\uF9D6\u6F64\u73A7\u80E4\u8D07\uF9D7\u9217\u958F\uF9D8\uF9D9\uF9DA\uF9DB\u807F\u620E\u701C\u7D68\u878D\uF9DC\u57A0\u6069\u6147\u6BB7\u8ABE\u9280\u96B1\u4E59\u541F\u6DEB\u852D\u9670\u97F3\u98EE\u63D6\u6CE3\u9091\u51DD\u61C9\u81BA\u9DF9\u4F9D\u501A\u5100\u5B9C\u610F\u61FF\u64EC\u6905\u6BC5\u7591\u77E3\u7FA9\u8264\u858F\u87FB\u8863\u8ABC"],["eca1","\u8B70\u91AB\u4E8C\u4EE5\u4F0A\uF9DD\uF9DE\u5937\u59E8\uF9DF\u5DF2\u5F1B\u5F5B\u6021\uF9E0\uF9E1\uF9E2\uF9E3\u723E\u73E5\uF9E4\u7570\u75CD\uF9E5\u79FB\uF9E6\u800C\u8033\u8084\u82E1\u8351\uF9E7\uF9E8\u8CBD\u8CB3\u9087\uF9E9\uF9EA\u98F4\u990C\uF9EB\uF9EC\u7037\u76CA\u7FCA\u7FCC\u7FFC\u8B1A\u4EBA\u4EC1\u5203\u5370\uF9ED\u54BD\u56E0\u59FB\u5BC5\u5F15\u5FCD\u6E6E\uF9EE\uF9EF\u7D6A\u8335\uF9F0\u8693\u8A8D\uF9F1\u976D\u9777\uF9F2\uF9F3\u4E00\u4F5A\u4F7E\u58F9\u65E5\u6EA2\u9038\u93B0\u99B9\u4EFB\u58EC\u598A\u59D9\u6041\uF9F4\uF9F5\u7A14\uF9F6\u834F\u8CC3\u5165\u5344"],["eda1","\uF9F7\uF9F8\uF9F9\u4ECD\u5269\u5B55\u82BF\u4ED4\u523A\u54A8\u59C9\u59FF\u5B50\u5B57\u5B5C\u6063\u6148\u6ECB\u7099\u716E\u7386\u74F7\u75B5\u78C1\u7D2B\u8005\u81EA\u8328\u8517\u85C9\u8AEE\u8CC7\u96CC\u4F5C\u52FA\u56BC\u65AB\u6628\u707C\u70B8\u7235\u7DBD\u828D\u914C\u96C0\u9D72\u5B71\u68E7\u6B98\u6F7A\u76DE\u5C91\u66AB\u6F5B\u7BB4\u7C2A\u8836\u96DC\u4E08\u4ED7\u5320\u5834\u58BB\u58EF\u596C\u5C07\u5E33\u5E84\u5F35\u638C\u66B2\u6756\u6A1F\u6AA3\u6B0C\u6F3F\u7246\uF9FA\u7350\u748B\u7AE0\u7CA7\u8178\u81DF\u81E7\u838A\u846C\u8523\u8594\u85CF\u88DD\u8D13\u91AC\u9577"],["eea1","\u969C\u518D\u54C9\u5728\u5BB0\u624D\u6750\u683D\u6893\u6E3D\u6ED3\u707D\u7E21\u88C1\u8CA1\u8F09\u9F4B\u9F4E\u722D\u7B8F\u8ACD\u931A\u4F47\u4F4E\u5132\u5480\u59D0\u5E95\u62B5\u6775\u696E\u6A17\u6CAE\u6E1A\u72D9\u732A\u75BD\u7BB8\u7D35\u82E7\u83F9\u8457\u85F7\u8A5B\u8CAF\u8E87\u9019\u90B8\u96CE\u9F5F\u52E3\u540A\u5AE1\u5BC2\u6458\u6575\u6EF4\u72C4\uF9FB\u7684\u7A4D\u7B1B\u7C4D\u7E3E\u7FDF\u837B\u8B2B\u8CCA\u8D64\u8DE1\u8E5F\u8FEA\u8FF9\u9069\u93D1\u4F43\u4F7A\u50B3\u5168\u5178\u524D\u526A\u5861\u587C\u5960\u5C08\u5C55\u5EDB\u609B\u6230\u6813\u6BBF\u6C08\u6FB1"],["efa1","\u714E\u7420\u7530\u7538\u7551\u7672\u7B4C\u7B8B\u7BAD\u7BC6\u7E8F\u8A6E\u8F3E\u8F49\u923F\u9293\u9322\u942B\u96FB\u985A\u986B\u991E\u5207\u622A\u6298\u6D59\u7664\u7ACA\u7BC0\u7D76\u5360\u5CBE\u5E97\u6F38\u70B9\u7C98\u9711\u9B8E\u9EDE\u63A5\u647A\u8776\u4E01\u4E95\u4EAD\u505C\u5075\u5448\u59C3\u5B9A\u5E40\u5EAD\u5EF7\u5F81\u60C5\u633A\u653F\u6574\u65CC\u6676\u6678\u67FE\u6968\u6A89\u6B63\u6C40\u6DC0\u6DE8\u6E1F\u6E5E\u701E\u70A1\u738E\u73FD\u753A\u775B\u7887\u798E\u7A0B\u7A7D\u7CBE\u7D8E\u8247\u8A02\u8AEA\u8C9E\u912D\u914A\u91D8\u9266\u92CC\u9320\u9706\u9756"],["f0a1","\u975C\u9802\u9F0E\u5236\u5291\u557C\u5824\u5E1D\u5F1F\u608C\u63D0\u68AF\u6FDF\u796D\u7B2C\u81CD\u85BA\u88FD\u8AF8\u8E44\u918D\u9664\u969B\u973D\u984C\u9F4A\u4FCE\u5146\u51CB\u52A9\u5632\u5F14\u5F6B\u63AA\u64CD\u65E9\u6641\u66FA\u66F9\u671D\u689D\u68D7\u69FD\u6F15\u6F6E\u7167\u71E5\u722A\u74AA\u773A\u7956\u795A\u79DF\u7A20\u7A95\u7C97\u7CDF\u7D44\u7E70\u8087\u85FB\u86A4\u8A54\u8ABF\u8D99\u8E81\u9020\u906D\u91E3\u963B\u96D5\u9CE5\u65CF\u7C07\u8DB3\u93C3\u5B58\u5C0A\u5352\u62D9\u731D\u5027\u5B97\u5F9E\u60B0\u616B\u68D5\u6DD9\u742E\u7A2E\u7D42\u7D9C\u7E31\u816B"],["f1a1","\u8E2A\u8E35\u937E\u9418\u4F50\u5750\u5DE6\u5EA7\u632B\u7F6A\u4E3B\u4F4F\u4F8F\u505A\u59DD\u80C4\u546A\u5468\u55FE\u594F\u5B99\u5DDE\u5EDA\u665D\u6731\u67F1\u682A\u6CE8\u6D32\u6E4A\u6F8D\u70B7\u73E0\u7587\u7C4C\u7D02\u7D2C\u7DA2\u821F\u86DB\u8A3B\u8A85\u8D70\u8E8A\u8F33\u9031\u914E\u9152\u9444\u99D0\u7AF9\u7CA5\u4FCA\u5101\u51C6\u57C8\u5BEF\u5CFB\u6659\u6A3D\u6D5A\u6E96\u6FEC\u710C\u756F\u7AE3\u8822\u9021\u9075\u96CB\u99FF\u8301\u4E2D\u4EF2\u8846\u91CD\u537D\u6ADB\u696B\u6C41\u847A\u589E\u618E\u66FE\u62EF\u70DD\u7511\u75C7\u7E52\u84B8\u8B49\u8D08\u4E4B\u53EA"],["f2a1","\u54AB\u5730\u5740\u5FD7\u6301\u6307\u646F\u652F\u65E8\u667A\u679D\u67B3\u6B62\u6C60\u6C9A\u6F2C\u77E5\u7825\u7949\u7957\u7D19\u80A2\u8102\u81F3\u829D\u82B7\u8718\u8A8C\uF9FC\u8D04\u8DBE\u9072\u76F4\u7A19\u7A37\u7E54\u8077\u5507\u55D4\u5875\u632F\u6422\u6649\u664B\u686D\u699B\u6B84\u6D25\u6EB1\u73CD\u7468\u74A1\u755B\u75B9\u76E1\u771E\u778B\u79E6\u7E09\u7E1D\u81FB\u852F\u8897\u8A3A\u8CD1\u8EEB\u8FB0\u9032\u93AD\u9663\u9673\u9707\u4F84\u53F1\u59EA\u5AC9\u5E19\u684E\u74C6\u75BE\u79E9\u7A92\u81A3\u86ED\u8CEA\u8DCC\u8FED\u659F\u6715\uF9FD\u57F7\u6F57\u7DDD\u8F2F"],["f3a1","\u93F6\u96C6\u5FB5\u61F2\u6F84\u4E14\u4F98\u501F\u53C9\u55DF\u5D6F\u5DEE\u6B21\u6B64\u78CB\u7B9A\uF9FE\u8E49\u8ECA\u906E\u6349\u643E\u7740\u7A84\u932F\u947F\u9F6A\u64B0\u6FAF\u71E6\u74A8\u74DA\u7AC4\u7C12\u7E82\u7CB2\u7E98\u8B9A\u8D0A\u947D\u9910\u994C\u5239\u5BDF\u64E6\u672D\u7D2E\u50ED\u53C3\u5879\u6158\u6159\u61FA\u65AC\u7AD9\u8B92\u8B96\u5009\u5021\u5275\u5531\u5A3C\u5EE0\u5F70\u6134\u655E\u660C\u6636\u66A2\u69CD\u6EC4\u6F32\u7316\u7621\u7A93\u8139\u8259\u83D6\u84BC\u50B5\u57F0\u5BC0\u5BE8\u5F69\u63A1\u7826\u7DB5\u83DC\u8521\u91C7\u91F5\u518A\u67F5\u7B56"],["f4a1","\u8CAC\u51C4\u59BB\u60BD\u8655\u501C\uF9FF\u5254\u5C3A\u617D\u621A\u62D3\u64F2\u65A5\u6ECC\u7620\u810A\u8E60\u965F\u96BB\u4EDF\u5343\u5598\u5929\u5DDD\u64C5\u6CC9\u6DFA\u7394\u7A7F\u821B\u85A6\u8CE4\u8E10\u9077\u91E7\u95E1\u9621\u97C6\u51F8\u54F2\u5586\u5FB9\u64A4\u6F88\u7DB4\u8F1F\u8F4D\u9435\u50C9\u5C16\u6CBE\u6DFB\u751B\u77BB\u7C3D\u7C64\u8A79\u8AC2\u581E\u59BE\u5E16\u6377\u7252\u758A\u776B\u8ADC\u8CBC\u8F12\u5EF3\u6674\u6DF8\u807D\u83C1\u8ACB\u9751\u9BD6\uFA00\u5243\u66FF\u6D95\u6EEF\u7DE0\u8AE6\u902E\u905E\u9AD4\u521D\u527F\u54E8\u6194\u6284\u62DB\u68A2"],["f5a1","\u6912\u695A\u6A35\u7092\u7126\u785D\u7901\u790E\u79D2\u7A0D\u8096\u8278\u82D5\u8349\u8549\u8C82\u8D85\u9162\u918B\u91AE\u4FC3\u56D1\u71ED\u77D7\u8700\u89F8\u5BF8\u5FD6\u6751\u90A8\u53E2\u585A\u5BF5\u60A4\u6181\u6460\u7E3D\u8070\u8525\u9283\u64AE\u50AC\u5D14\u6700\u589C\u62BD\u63A8\u690E\u6978\u6A1E\u6E6B\u76BA\u79CB\u82BB\u8429\u8ACF\u8DA8\u8FFD\u9112\u914B\u919C\u9310\u9318\u939A\u96DB\u9A36\u9C0D\u4E11\u755C\u795D\u7AFA\u7B51\u7BC9\u7E2E\u84C4\u8E59\u8E74\u8EF8\u9010\u6625\u693F\u7443\u51FA\u672E\u9EDC\u5145\u5FE0\u6C96\u87F2\u885D\u8877\u60B4\u81B5\u8403"],["f6a1","\u8D05\u53D6\u5439\u5634\u5A36\u5C31\u708A\u7FE0\u805A\u8106\u81ED\u8DA3\u9189\u9A5F\u9DF2\u5074\u4EC4\u53A0\u60FB\u6E2C\u5C64\u4F88\u5024\u55E4\u5CD9\u5E5F\u6065\u6894\u6CBB\u6DC4\u71BE\u75D4\u75F4\u7661\u7A1A\u7A49\u7DC7\u7DFB\u7F6E\u81F4\u86A9\u8F1C\u96C9\u99B3\u9F52\u5247\u52C5\u98ED\u89AA\u4E03\u67D2\u6F06\u4FB5\u5BE2\u6795\u6C88\u6D78\u741B\u7827\u91DD\u937C\u87C4\u79E4\u7A31\u5FEB\u4ED6\u54A4\u553E\u58AE\u59A5\u60F0\u6253\u62D6\u6736\u6955\u8235\u9640\u99B1\u99DD\u502C\u5353\u5544\u577C\uFA01\u6258\uFA02\u64E2\u666B\u67DD\u6FC1\u6FEF\u7422\u7438\u8A17"],["f7a1","\u9438\u5451\u5606\u5766\u5F48\u619A\u6B4E\u7058\u70AD\u7DBB\u8A95\u596A\u812B\u63A2\u7708\u803D\u8CAA\u5854\u642D\u69BB\u5B95\u5E11\u6E6F\uFA03\u8569\u514C\u53F0\u592A\u6020\u614B\u6B86\u6C70\u6CF0\u7B1E\u80CE\u82D4\u8DC6\u90B0\u98B1\uFA04\u64C7\u6FA4\u6491\u6504\u514E\u5410\u571F\u8A0E\u615F\u6876\uFA05\u75DB\u7B52\u7D71\u901A\u5806\u69CC\u817F\u892A\u9000\u9839\u5078\u5957\u59AC\u6295\u900F\u9B2A\u615D\u7279\u95D6\u5761\u5A46\u5DF4\u628A\u64AD\u64FA\u6777\u6CE2\u6D3E\u722C\u7436\u7834\u7F77\u82AD\u8DDB\u9817\u5224\u5742\u677F\u7248\u74E3\u8CA9\u8FA6\u9211"],["f8a1","\u962A\u516B\u53ED\u634C\u4F69\u5504\u6096\u6557\u6C9B\u6D7F\u724C\u72FD\u7A17\u8987\u8C9D\u5F6D\u6F8E\u70F9\u81A8\u610E\u4FBF\u504F\u6241\u7247\u7BC7\u7DE8\u7FE9\u904D\u97AD\u9A19\u8CB6\u576A\u5E73\u67B0\u840D\u8A55\u5420\u5B16\u5E63\u5EE2\u5F0A\u6583\u80BA\u853D\u9589\u965B\u4F48\u5305\u530D\u530F\u5486\u54FA\u5703\u5E03\u6016\u629B\u62B1\u6355\uFA06\u6CE1\u6D66\u75B1\u7832\u80DE\u812F\u82DE\u8461\u84B2\u888D\u8912\u900B\u92EA\u98FD\u9B91\u5E45\u66B4\u66DD\u7011\u7206\uFA07\u4FF5\u527D\u5F6A\u6153\u6753\u6A19\u6F02\u74E2\u7968\u8868\u8C79\u98C7\u98C4\u9A43"],["f9a1","\u54C1\u7A1F\u6953\u8AF7\u8C4A\u98A8\u99AE\u5F7C\u62AB\u75B2\u76AE\u88AB\u907F\u9642\u5339\u5F3C\u5FC5\u6CCC\u73CC\u7562\u758B\u7B46\u82FE\u999D\u4E4F\u903C\u4E0B\u4F55\u53A6\u590F\u5EC8\u6630\u6CB3\u7455\u8377\u8766\u8CC0\u9050\u971E\u9C15\u58D1\u5B78\u8650\u8B14\u9DB4\u5BD2\u6068\u608D\u65F1\u6C57\u6F22\u6FA3\u701A\u7F55\u7FF0\u9591\u9592\u9650\u97D3\u5272\u8F44\u51FD\u542B\u54B8\u5563\u558A\u6ABB\u6DB5\u7DD8\u8266\u929C\u9677\u9E79\u5408\u54C8\u76D2\u86E4\u95A4\u95D4\u965C\u4EA2\u4F09\u59EE\u5AE6\u5DF7\u6052\u6297\u676D\u6841\u6C86\u6E2F\u7F38\u809B\u822A"],["faa1","\uFA08\uFA09\u9805\u4EA5\u5055\u54B3\u5793\u595A\u5B69\u5BB3\u61C8\u6977\u6D77\u7023\u87F9\u89E3\u8A72\u8AE7\u9082\u99ED\u9AB8\u52BE\u6838\u5016\u5E78\u674F\u8347\u884C\u4EAB\u5411\u56AE\u73E6\u9115\u97FF\u9909\u9957\u9999\u5653\u589F\u865B\u8A31\u61B2\u6AF6\u737B\u8ED2\u6B47\u96AA\u9A57\u5955\u7200\u8D6B\u9769\u4FD4\u5CF4\u5F26\u61F8\u665B\u6CEB\u70AB\u7384\u73B9\u73FE\u7729\u774D\u7D43\u7D62\u7E23\u8237\u8852\uFA0A\u8CE2\u9249\u986F\u5B51\u7A74\u8840\u9801\u5ACC\u4FE0\u5354\u593E\u5CFD\u633E\u6D79\u72F9\u8105\u8107\u83A2\u92CF\u9830\u4EA8\u5144\u5211\u578B"],["fba1","\u5F62\u6CC2\u6ECE\u7005\u7050\u70AF\u7192\u73E9\u7469\u834A\u87A2\u8861\u9008\u90A2\u93A3\u99A8\u516E\u5F57\u60E0\u6167\u66B3\u8559\u8E4A\u91AF\u978B\u4E4E\u4E92\u547C\u58D5\u58FA\u597D\u5CB5\u5F27\u6236\u6248\u660A\u6667\u6BEB\u6D69\u6DCF\u6E56\u6EF8\u6F94\u6FE0\u6FE9\u705D\u72D0\u7425\u745A\u74E0\u7693\u795C\u7CCA\u7E1E\u80E1\u82A6\u846B\u84BF\u864E\u865F\u8774\u8B77\u8C6A\u93AC\u9800\u9865\u60D1\u6216\u9177\u5A5A\u660F\u6DF7\u6E3E\u743F\u9B42\u5FFD\u60DA\u7B0F\u54C4\u5F18\u6C5E\u6CD3\u6D2A\u70D8\u7D05\u8679\u8A0C\u9D3B\u5316\u548C\u5B05\u6A3A\u706B\u7575"],["fca1","\u798D\u79BE\u82B1\u83EF\u8A71\u8B41\u8CA8\u9774\uFA0B\u64F4\u652B\u78BA\u78BB\u7A6B\u4E38\u559A\u5950\u5BA6\u5E7B\u60A3\u63DB\u6B61\u6665\u6853\u6E19\u7165\u74B0\u7D08\u9084\u9A69\u9C25\u6D3B\u6ED1\u733E\u8C41\u95CA\u51F0\u5E4C\u5FA8\u604D\u60F6\u6130\u614C\u6643\u6644\u69A5\u6CC1\u6E5F\u6EC9\u6F62\u714C\u749C\u7687\u7BC1\u7C27\u8352\u8757\u9051\u968D\u9EC3\u532F\u56DE\u5EFB\u5F8A\u6062\u6094\u61F7\u6666\u6703\u6A9C\u6DEE\u6FAE\u7070\u736A\u7E6A\u81BE\u8334\u86D4\u8AA8\u8CC4\u5283\u7372\u5B96\u6A6B\u9404\u54EE\u5686\u5B5D\u6548\u6585\u66C9\u689F\u6D8D\u6DC6"],["fda1","\u723B\u80B4\u9175\u9A4D\u4FAF\u5019\u539A\u540E\u543C\u5589\u55C5\u5E3F\u5F8C\u673D\u7166\u73DD\u9005\u52DB\u52F3\u5864\u58CE\u7104\u718F\u71FB\u85B0\u8A13\u6688\u85A8\u55A7\u6684\u714A\u8431\u5349\u5599\u6BC1\u5F59\u5FBD\u63EE\u6689\u7147\u8AF1\u8F1D\u9EBE\u4F11\u643A\u70CB\u7566\u8667\u6064\u8B4E\u9DF8\u5147\u51F6\u5308\u6D36\u80F8\u9ED1\u6615\u6B23\u7098\u75D5\u5403\u5C79\u7D07\u8A16\u6B20\u6B3D\u6B46\u5438\u6070\u6D3D\u7FD5\u8208\u50D6\u51DE\u559C\u566B\u56CD\u59EC\u5B09\u5E0C\u6199\u6198\u6231\u665E\u66E6\u7199\u71B9\u71BA\u72A7\u79A7\u7A00\u7FB2\u8A70"]]});var Kd0=o((aM7,uV9)=>{uV9.exports=[["0","\x00",127],["a140","\u3000\uFF0C\u3001\u3002\uFF0E\u2027\uFF1B\uFF1A\uFF1F\uFF01\uFE30\u2026\u2025\uFE50\uFE51\uFE52\xB7\uFE54\uFE55\uFE56\uFE57\uFF5C\u2013\uFE31\u2014\uFE33\u2574\uFE34\uFE4F\uFF08\uFF09\uFE35\uFE36\uFF5B\uFF5D\uFE37\uFE38\u3014\u3015\uFE39\uFE3A\u3010\u3011\uFE3B\uFE3C\u300A\u300B\uFE3D\uFE3E\u3008\u3009\uFE3F\uFE40\u300C\u300D\uFE41\uFE42\u300E\u300F\uFE43\uFE44\uFE59\uFE5A"],["a1a1","\uFE5B\uFE5C\uFE5D\uFE5E\u2018\u2019\u201C\u201D\u301D\u301E\u2035\u2032\uFF03\uFF06\uFF0A\u203B\xA7\u3003\u25CB\u25CF\u25B3\u25B2\u25CE\u2606\u2605\u25C7\u25C6\u25A1\u25A0\u25BD\u25BC\u32A3\u2105\xAF\uFFE3\uFF3F\u02CD\uFE49\uFE4A\uFE4D\uFE4E\uFE4B\uFE4C\uFE5F\uFE60\uFE61\uFF0B\uFF0D\xD7\xF7\xB1\u221A\uFF1C\uFF1E\uFF1D\u2266\u2267\u2260\u221E\u2252\u2261\uFE62",4,"\uFF5E\u2229\u222A\u22A5\u2220\u221F\u22BF\u33D2\u33D1\u222B\u222E\u2235\u2234\u2640\u2642\u2295\u2299\u2191\u2193\u2190\u2192\u2196\u2197\u2199\u2198\u2225\u2223\uFF0F"],["a240","\uFF3C\u2215\uFE68\uFF04\uFFE5\u3012\uFFE0\uFFE1\uFF05\uFF20\u2103\u2109\uFE69\uFE6A\uFE6B\u33D5\u339C\u339D\u339E\u33CE\u33A1\u338E\u338F\u33C4\xB0\u5159\u515B\u515E\u515D\u5161\u5163\u55E7\u74E9\u7CCE\u2581",7,"\u258F\u258E\u258D\u258C\u258B\u258A\u2589\u253C\u2534\u252C\u2524\u251C\u2594\u2500\u2502\u2595\u250C\u2510\u2514\u2518\u256D"],["a2a1","\u256E\u2570\u256F\u2550\u255E\u256A\u2561\u25E2\u25E3\u25E5\u25E4\u2571\u2572\u2573\uFF10",9,"\u2160",9,"\u3021",8,"\u5341\u5344\u5345\uFF21",25,"\uFF41",21],["a340","\uFF57\uFF58\uFF59\uFF5A\u0391",16,"\u03A3",6,"\u03B1",16,"\u03C3",6,"\u3105",10],["a3a1","\u3110",25,"\u02D9\u02C9\u02CA\u02C7\u02CB"],["a3e1","\u20AC"],["a440","\u4E00\u4E59\u4E01\u4E03\u4E43\u4E5D\u4E86\u4E8C\u4EBA\u513F\u5165\u516B\u51E0\u5200\u5201\u529B\u5315\u5341\u535C\u53C8\u4E09\u4E0B\u4E08\u4E0A\u4E2B\u4E38\u51E1\u4E45\u4E48\u4E5F\u4E5E\u4E8E\u4EA1\u5140\u5203\u52FA\u5343\u53C9\u53E3\u571F\u58EB\u5915\u5927\u5973\u5B50\u5B51\u5B53\u5BF8\u5C0F\u5C22\u5C38\u5C71\u5DDD\u5DE5\u5DF1\u5DF2\u5DF3\u5DFE\u5E72\u5EFE\u5F0B\u5F13\u624D"],["a4a1","\u4E11\u4E10\u4E0D\u4E2D\u4E30\u4E39\u4E4B\u5C39\u4E88\u4E91\u4E95\u4E92\u4E94\u4EA2\u4EC1\u4EC0\u4EC3\u4EC6\u4EC7\u4ECD\u4ECA\u4ECB\u4EC4\u5143\u5141\u5167\u516D\u516E\u516C\u5197\u51F6\u5206\u5207\u5208\u52FB\u52FE\u52FF\u5316\u5339\u5348\u5347\u5345\u535E\u5384\u53CB\u53CA\u53CD\u58EC\u5929\u592B\u592A\u592D\u5B54\u5C11\u5C24\u5C3A\u5C6F\u5DF4\u5E7B\u5EFF\u5F14\u5F15\u5FC3\u6208\u6236\u624B\u624E\u652F\u6587\u6597\u65A4\u65B9\u65E5\u66F0\u6708\u6728\u6B20\u6B62\u6B79\u6BCB\u6BD4\u6BDB\u6C0F\u6C34\u706B\u722A\u7236\u723B\u7247\u7259\u725B\u72AC\u738B\u4E19"],["a540","\u4E16\u4E15\u4E14\u4E18\u4E3B\u4E4D\u4E4F\u4E4E\u4EE5\u4ED8\u4ED4\u4ED5\u4ED6\u4ED7\u4EE3\u4EE4\u4ED9\u4EDE\u5145\u5144\u5189\u518A\u51AC\u51F9\u51FA\u51F8\u520A\u52A0\u529F\u5305\u5306\u5317\u531D\u4EDF\u534A\u5349\u5361\u5360\u536F\u536E\u53BB\u53EF\u53E4\u53F3\u53EC\u53EE\u53E9\u53E8\u53FC\u53F8\u53F5\u53EB\u53E6\u53EA\u53F2\u53F1\u53F0\u53E5\u53ED\u53FB\u56DB\u56DA\u5916"],["a5a1","\u592E\u5931\u5974\u5976\u5B55\u5B83\u5C3C\u5DE8\u5DE7\u5DE6\u5E02\u5E03\u5E73\u5E7C\u5F01\u5F18\u5F17\u5FC5\u620A\u6253\u6254\u6252\u6251\u65A5\u65E6\u672E\u672C\u672A\u672B\u672D\u6B63\u6BCD\u6C11\u6C10\u6C38\u6C41\u6C40\u6C3E\u72AF\u7384\u7389\u74DC\u74E6\u7518\u751F\u7528\u7529\u7530\u7531\u7532\u7533\u758B\u767D\u76AE\u76BF\u76EE\u77DB\u77E2\u77F3\u793A\u79BE\u7A74\u7ACB\u4E1E\u4E1F\u4E52\u4E53\u4E69\u4E99\u4EA4\u4EA6\u4EA5\u4EFF\u4F09\u4F19\u4F0A\u4F15\u4F0D\u4F10\u4F11\u4F0F\u4EF2\u4EF6\u4EFB\u4EF0\u4EF3\u4EFD\u4F01\u4F0B\u5149\u5147\u5146\u5148\u5168"],["a640","\u5171\u518D\u51B0\u5217\u5211\u5212\u520E\u5216\u52A3\u5308\u5321\u5320\u5370\u5371\u5409\u540F\u540C\u540A\u5410\u5401\u540B\u5404\u5411\u540D\u5408\u5403\u540E\u5406\u5412\u56E0\u56DE\u56DD\u5733\u5730\u5728\u572D\u572C\u572F\u5729\u5919\u591A\u5937\u5938\u5984\u5978\u5983\u597D\u5979\u5982\u5981\u5B57\u5B58\u5B87\u5B88\u5B85\u5B89\u5BFA\u5C16\u5C79\u5DDE\u5E06\u5E76\u5E74"],["a6a1","\u5F0F\u5F1B\u5FD9\u5FD6\u620E\u620C\u620D\u6210\u6263\u625B\u6258\u6536\u65E9\u65E8\u65EC\u65ED\u66F2\u66F3\u6709\u673D\u6734\u6731\u6735\u6B21\u6B64\u6B7B\u6C16\u6C5D\u6C57\u6C59\u6C5F\u6C60\u6C50\u6C55\u6C61\u6C5B\u6C4D\u6C4E\u7070\u725F\u725D\u767E\u7AF9\u7C73\u7CF8\u7F36\u7F8A\u7FBD\u8001\u8003\u800C\u8012\u8033\u807F\u8089\u808B\u808C\u81E3\u81EA\u81F3\u81FC\u820C\u821B\u821F\u826E\u8272\u827E\u866B\u8840\u884C\u8863\u897F\u9621\u4E32\u4EA8\u4F4D\u4F4F\u4F47\u4F57\u4F5E\u4F34\u4F5B\u4F55\u4F30\u4F50\u4F51\u4F3D\u4F3A\u4F38\u4F43\u4F54\u4F3C\u4F46\u4F63"],["a740","\u4F5C\u4F60\u4F2F\u4F4E\u4F36\u4F59\u4F5D\u4F48\u4F5A\u514C\u514B\u514D\u5175\u51B6\u51B7\u5225\u5224\u5229\u522A\u5228\u52AB\u52A9\u52AA\u52AC\u5323\u5373\u5375\u541D\u542D\u541E\u543E\u5426\u544E\u5427\u5446\u5443\u5433\u5448\u5442\u541B\u5429\u544A\u5439\u543B\u5438\u542E\u5435\u5436\u5420\u543C\u5440\u5431\u542B\u541F\u542C\u56EA\u56F0\u56E4\u56EB\u574A\u5751\u5740\u574D"],["a7a1","\u5747\u574E\u573E\u5750\u574F\u573B\u58EF\u593E\u599D\u5992\u59A8\u599E\u59A3\u5999\u5996\u598D\u59A4\u5993\u598A\u59A5\u5B5D\u5B5C\u5B5A\u5B5B\u5B8C\u5B8B\u5B8F\u5C2C\u5C40\u5C41\u5C3F\u5C3E\u5C90\u5C91\u5C94\u5C8C\u5DEB\u5E0C\u5E8F\u5E87\u5E8A\u5EF7\u5F04\u5F1F\u5F64\u5F62\u5F77\u5F79\u5FD8\u5FCC\u5FD7\u5FCD\u5FF1\u5FEB\u5FF8\u5FEA\u6212\u6211\u6284\u6297\u6296\u6280\u6276\u6289\u626D\u628A\u627C\u627E\u6279\u6273\u6292\u626F\u6298\u626E\u6295\u6293\u6291\u6286\u6539\u653B\u6538\u65F1\u66F4\u675F\u674E\u674F\u6750\u6751\u675C\u6756\u675E\u6749\u6746\u6760"],["a840","\u6753\u6757\u6B65\u6BCF\u6C42\u6C5E\u6C99\u6C81\u6C88\u6C89\u6C85\u6C9B\u6C6A\u6C7A\u6C90\u6C70\u6C8C\u6C68\u6C96\u6C92\u6C7D\u6C83\u6C72\u6C7E\u6C74\u6C86\u6C76\u6C8D\u6C94\u6C98\u6C82\u7076\u707C\u707D\u7078\u7262\u7261\u7260\u72C4\u72C2\u7396\u752C\u752B\u7537\u7538\u7682\u76EF\u77E3\u79C1\u79C0\u79BF\u7A76\u7CFB\u7F55\u8096\u8093\u809D\u8098\u809B\u809A\u80B2\u826F\u8292"],["a8a1","\u828B\u828D\u898B\u89D2\u8A00\u8C37\u8C46\u8C55\u8C9D\u8D64\u8D70\u8DB3\u8EAB\u8ECA\u8F9B\u8FB0\u8FC2\u8FC6\u8FC5\u8FC4\u5DE1\u9091\u90A2\u90AA\u90A6\u90A3\u9149\u91C6\u91CC\u9632\u962E\u9631\u962A\u962C\u4E26\u4E56\u4E73\u4E8B\u4E9B\u4E9E\u4EAB\u4EAC\u4F6F\u4F9D\u4F8D\u4F73\u4F7F\u4F6C\u4F9B\u4F8B\u4F86\u4F83\u4F70\u4F75\u4F88\u4F69\u4F7B\u4F96\u4F7E\u4F8F\u4F91\u4F7A\u5154\u5152\u5155\u5169\u5177\u5176\u5178\u51BD\u51FD\u523B\u5238\u5237\u523A\u5230\u522E\u5236\u5241\u52BE\u52BB\u5352\u5354\u5353\u5351\u5366\u5377\u5378\u5379\u53D6\u53D4\u53D7\u5473\u5475"],["a940","\u5496\u5478\u5495\u5480\u547B\u5477\u5484\u5492\u5486\u547C\u5490\u5471\u5476\u548C\u549A\u5462\u5468\u548B\u547D\u548E\u56FA\u5783\u5777\u576A\u5769\u5761\u5766\u5764\u577C\u591C\u5949\u5947\u5948\u5944\u5954\u59BE\u59BB\u59D4\u59B9\u59AE\u59D1\u59C6\u59D0\u59CD\u59CB\u59D3\u59CA\u59AF\u59B3\u59D2\u59C5\u5B5F\u5B64\u5B63\u5B97\u5B9A\u5B98\u5B9C\u5B99\u5B9B\u5C1A\u5C48\u5C45"],["a9a1","\u5C46\u5CB7\u5CA1\u5CB8\u5CA9\u5CAB\u5CB1\u5CB3\u5E18\u5E1A\u5E16\u5E15\u5E1B\u5E11\u5E78\u5E9A\u5E97\u5E9C\u5E95\u5E96\u5EF6\u5F26\u5F27\u5F29\u5F80\u5F81\u5F7F\u5F7C\u5FDD\u5FE0\u5FFD\u5FF5\u5FFF\u600F\u6014\u602F\u6035\u6016\u602A\u6015\u6021\u6027\u6029\u602B\u601B\u6216\u6215\u623F\u623E\u6240\u627F\u62C9\u62CC\u62C4\u62BF\u62C2\u62B9\u62D2\u62DB\u62AB\u62D3\u62D4\u62CB\u62C8\u62A8\u62BD\u62BC\u62D0\u62D9\u62C7\u62CD\u62B5\u62DA\u62B1\u62D8\u62D6\u62D7\u62C6\u62AC\u62CE\u653E\u65A7\u65BC\u65FA\u6614\u6613\u660C\u6606\u6602\u660E\u6600\u660F\u6615\u660A"],["aa40","\u6607\u670D\u670B\u676D\u678B\u6795\u6771\u679C\u6773\u6777\u6787\u679D\u6797\u676F\u6770\u677F\u6789\u677E\u6790\u6775\u679A\u6793\u677C\u676A\u6772\u6B23\u6B66\u6B67\u6B7F\u6C13\u6C1B\u6CE3\u6CE8\u6CF3\u6CB1\u6CCC\u6CE5\u6CB3\u6CBD\u6CBE\u6CBC\u6CE2\u6CAB\u6CD5\u6CD3\u6CB8\u6CC4\u6CB9\u6CC1\u6CAE\u6CD7\u6CC5\u6CF1\u6CBF\u6CBB\u6CE1\u6CDB\u6CCA\u6CAC\u6CEF\u6CDC\u6CD6\u6CE0"],["aaa1","\u7095\u708E\u7092\u708A\u7099\u722C\u722D\u7238\u7248\u7267\u7269\u72C0\u72CE\u72D9\u72D7\u72D0\u73A9\u73A8\u739F\u73AB\u73A5\u753D\u759D\u7599\u759A\u7684\u76C2\u76F2\u76F4\u77E5\u77FD\u793E\u7940\u7941\u79C9\u79C8\u7A7A\u7A79\u7AFA\u7CFE\u7F54\u7F8C\u7F8B\u8005\u80BA\u80A5\u80A2\u80B1\u80A1\u80AB\u80A9\u80B4\u80AA\u80AF\u81E5\u81FE\u820D\u82B3\u829D\u8299\u82AD\u82BD\u829F\u82B9\u82B1\u82AC\u82A5\u82AF\u82B8\u82A3\u82B0\u82BE\u82B7\u864E\u8671\u521D\u8868\u8ECB\u8FCE\u8FD4\u8FD1\u90B5\u90B8\u90B1\u90B6\u91C7\u91D1\u9577\u9580\u961C\u9640\u963F\u963B\u9644"],["ab40","\u9642\u96B9\u96E8\u9752\u975E\u4E9F\u4EAD\u4EAE\u4FE1\u4FB5\u4FAF\u4FBF\u4FE0\u4FD1\u4FCF\u4FDD\u4FC3\u4FB6\u4FD8\u4FDF\u4FCA\u4FD7\u4FAE\u4FD0\u4FC4\u4FC2\u4FDA\u4FCE\u4FDE\u4FB7\u5157\u5192\u5191\u51A0\u524E\u5243\u524A\u524D\u524C\u524B\u5247\u52C7\u52C9\u52C3\u52C1\u530D\u5357\u537B\u539A\u53DB\u54AC\u54C0\u54A8\u54CE\u54C9\u54B8\u54A6\u54B3\u54C7\u54C2\u54BD\u54AA\u54C1"],["aba1","\u54C4\u54C8\u54AF\u54AB\u54B1\u54BB\u54A9\u54A7\u54BF\u56FF\u5782\u578B\u57A0\u57A3\u57A2\u57CE\u57AE\u5793\u5955\u5951\u594F\u594E\u5950\u59DC\u59D8\u59FF\u59E3\u59E8\u5A03\u59E5\u59EA\u59DA\u59E6\u5A01\u59FB\u5B69\u5BA3\u5BA6\u5BA4\u5BA2\u5BA5\u5C01\u5C4E\u5C4F\u5C4D\u5C4B\u5CD9\u5CD2\u5DF7\u5E1D\u5E25\u5E1F\u5E7D\u5EA0\u5EA6\u5EFA\u5F08\u5F2D\u5F65\u5F88\u5F85\u5F8A\u5F8B\u5F87\u5F8C\u5F89\u6012\u601D\u6020\u6025\u600E\u6028\u604D\u6070\u6068\u6062\u6046\u6043\u606C\u606B\u606A\u6064\u6241\u62DC\u6316\u6309\u62FC\u62ED\u6301\u62EE\u62FD\u6307\u62F1\u62F7"],["ac40","\u62EF\u62EC\u62FE\u62F4\u6311\u6302\u653F\u6545\u65AB\u65BD\u65E2\u6625\u662D\u6620\u6627\u662F\u661F\u6628\u6631\u6624\u66F7\u67FF\u67D3\u67F1\u67D4\u67D0\u67EC\u67B6\u67AF\u67F5\u67E9\u67EF\u67C4\u67D1\u67B4\u67DA\u67E5\u67B8\u67CF\u67DE\u67F3\u67B0\u67D9\u67E2\u67DD\u67D2\u6B6A\u6B83\u6B86\u6BB5\u6BD2\u6BD7\u6C1F\u6CC9\u6D0B\u6D32\u6D2A\u6D41\u6D25\u6D0C\u6D31\u6D1E\u6D17"],["aca1","\u6D3B\u6D3D\u6D3E\u6D36\u6D1B\u6CF5\u6D39\u6D27\u6D38\u6D29\u6D2E\u6D35\u6D0E\u6D2B\u70AB\u70BA\u70B3\u70AC\u70AF\u70AD\u70B8\u70AE\u70A4\u7230\u7272\u726F\u7274\u72E9\u72E0\u72E1\u73B7\u73CA\u73BB\u73B2\u73CD\u73C0\u73B3\u751A\u752D\u754F\u754C\u754E\u754B\u75AB\u75A4\u75A5\u75A2\u75A3\u7678\u7686\u7687\u7688\u76C8\u76C6\u76C3\u76C5\u7701\u76F9\u76F8\u7709\u770B\u76FE\u76FC\u7707\u77DC\u7802\u7814\u780C\u780D\u7946\u7949\u7948\u7947\u79B9\u79BA\u79D1\u79D2\u79CB\u7A7F\u7A81\u7AFF\u7AFD\u7C7D\u7D02\u7D05\u7D00\u7D09\u7D07\u7D04\u7D06\u7F38\u7F8E\u7FBF\u8004"],["ad40","\u8010\u800D\u8011\u8036\u80D6\u80E5\u80DA\u80C3\u80C4\u80CC\u80E1\u80DB\u80CE\u80DE\u80E4\u80DD\u81F4\u8222\u82E7\u8303\u8305\u82E3\u82DB\u82E6\u8304\u82E5\u8302\u8309\u82D2\u82D7\u82F1\u8301\u82DC\u82D4\u82D1\u82DE\u82D3\u82DF\u82EF\u8306\u8650\u8679\u867B\u867A\u884D\u886B\u8981\u89D4\u8A08\u8A02\u8A03\u8C9E\u8CA0\u8D74\u8D73\u8DB4\u8ECD\u8ECC\u8FF0\u8FE6\u8FE2\u8FEA\u8FE5"],["ada1","\u8FED\u8FEB\u8FE4\u8FE8\u90CA\u90CE\u90C1\u90C3\u914B\u914A\u91CD\u9582\u9650\u964B\u964C\u964D\u9762\u9769\u97CB\u97ED\u97F3\u9801\u98A8\u98DB\u98DF\u9996\u9999\u4E58\u4EB3\u500C\u500D\u5023\u4FEF\u5026\u5025\u4FF8\u5029\u5016\u5006\u503C\u501F\u501A\u5012\u5011\u4FFA\u5000\u5014\u5028\u4FF1\u5021\u500B\u5019\u5018\u4FF3\u4FEE\u502D\u502A\u4FFE\u502B\u5009\u517C\u51A4\u51A5\u51A2\u51CD\u51CC\u51C6\u51CB\u5256\u525C\u5254\u525B\u525D\u532A\u537F\u539F\u539D\u53DF\u54E8\u5510\u5501\u5537\u54FC\u54E5\u54F2\u5506\u54FA\u5514\u54E9\u54ED\u54E1\u5509\u54EE\u54EA"],["ae40","\u54E6\u5527\u5507\u54FD\u550F\u5703\u5704\u57C2\u57D4\u57CB\u57C3\u5809\u590F\u5957\u5958\u595A\u5A11\u5A18\u5A1C\u5A1F\u5A1B\u5A13\u59EC\u5A20\u5A23\u5A29\u5A25\u5A0C\u5A09\u5B6B\u5C58\u5BB0\u5BB3\u5BB6\u5BB4\u5BAE\u5BB5\u5BB9\u5BB8\u5C04\u5C51\u5C55\u5C50\u5CED\u5CFD\u5CFB\u5CEA\u5CE8\u5CF0\u5CF6\u5D01\u5CF4\u5DEE\u5E2D\u5E2B\u5EAB\u5EAD\u5EA7\u5F31\u5F92\u5F91\u5F90\u6059"],["aea1","\u6063\u6065\u6050\u6055\u606D\u6069\u606F\u6084\u609F\u609A\u608D\u6094\u608C\u6085\u6096\u6247\u62F3\u6308\u62FF\u634E\u633E\u632F\u6355\u6342\u6346\u634F\u6349\u633A\u6350\u633D\u632A\u632B\u6328\u634D\u634C\u6548\u6549\u6599\u65C1\u65C5\u6642\u6649\u664F\u6643\u6652\u664C\u6645\u6641\u66F8\u6714\u6715\u6717\u6821\u6838\u6848\u6846\u6853\u6839\u6842\u6854\u6829\u68B3\u6817\u684C\u6851\u683D\u67F4\u6850\u6840\u683C\u6843\u682A\u6845\u6813\u6818\u6841\u6B8A\u6B89\u6BB7\u6C23\u6C27\u6C28\u6C26\u6C24\u6CF0\u6D6A\u6D95\u6D88\u6D87\u6D66\u6D78\u6D77\u6D59\u6D93"],["af40","\u6D6C\u6D89\u6D6E\u6D5A\u6D74\u6D69\u6D8C\u6D8A\u6D79\u6D85\u6D65\u6D94\u70CA\u70D8\u70E4\u70D9\u70C8\u70CF\u7239\u7279\u72FC\u72F9\u72FD\u72F8\u72F7\u7386\u73ED\u7409\u73EE\u73E0\u73EA\u73DE\u7554\u755D\u755C\u755A\u7559\u75BE\u75C5\u75C7\u75B2\u75B3\u75BD\u75BC\u75B9\u75C2\u75B8\u768B\u76B0\u76CA\u76CD\u76CE\u7729\u771F\u7720\u7728\u77E9\u7830\u7827\u7838\u781D\u7834\u7837"],["afa1","\u7825\u782D\u7820\u781F\u7832\u7955\u7950\u7960\u795F\u7956\u795E\u795D\u7957\u795A\u79E4\u79E3\u79E7\u79DF\u79E6\u79E9\u79D8\u7A84\u7A88\u7AD9\u7B06\u7B11\u7C89\u7D21\u7D17\u7D0B\u7D0A\u7D20\u7D22\u7D14\u7D10\u7D15\u7D1A\u7D1C\u7D0D\u7D19\u7D1B\u7F3A\u7F5F\u7F94\u7FC5\u7FC1\u8006\u8018\u8015\u8019\u8017\u803D\u803F\u80F1\u8102\u80F0\u8105\u80ED\u80F4\u8106\u80F8\u80F3\u8108\u80FD\u810A\u80FC\u80EF\u81ED\u81EC\u8200\u8210\u822A\u822B\u8228\u822C\u82BB\u832B\u8352\u8354\u834A\u8338\u8350\u8349\u8335\u8334\u834F\u8332\u8339\u8336\u8317\u8340\u8331\u8328\u8343"],["b040","\u8654\u868A\u86AA\u8693\u86A4\u86A9\u868C\u86A3\u869C\u8870\u8877\u8881\u8882\u887D\u8879\u8A18\u8A10\u8A0E\u8A0C\u8A15\u8A0A\u8A17\u8A13\u8A16\u8A0F\u8A11\u8C48\u8C7A\u8C79\u8CA1\u8CA2\u8D77\u8EAC\u8ED2\u8ED4\u8ECF\u8FB1\u9001\u9006\u8FF7\u9000\u8FFA\u8FF4\u9003\u8FFD\u9005\u8FF8\u9095\u90E1\u90DD\u90E2\u9152\u914D\u914C\u91D8\u91DD\u91D7\u91DC\u91D9\u9583\u9662\u9663\u9661"],["b0a1","\u965B\u965D\u9664\u9658\u965E\u96BB\u98E2\u99AC\u9AA8\u9AD8\u9B25\u9B32\u9B3C\u4E7E\u507A\u507D\u505C\u5047\u5043\u504C\u505A\u5049\u5065\u5076\u504E\u5055\u5075\u5074\u5077\u504F\u500F\u506F\u506D\u515C\u5195\u51F0\u526A\u526F\u52D2\u52D9\u52D8\u52D5\u5310\u530F\u5319\u533F\u5340\u533E\u53C3\u66FC\u5546\u556A\u5566\u5544\u555E\u5561\u5543\u554A\u5531\u5556\u554F\u5555\u552F\u5564\u5538\u552E\u555C\u552C\u5563\u5533\u5541\u5557\u5708\u570B\u5709\u57DF\u5805\u580A\u5806\u57E0\u57E4\u57FA\u5802\u5835\u57F7\u57F9\u5920\u5962\u5A36\u5A41\u5A49\u5A66\u5A6A\u5A40"],["b140","\u5A3C\u5A62\u5A5A\u5A46\u5A4A\u5B70\u5BC7\u5BC5\u5BC4\u5BC2\u5BBF\u5BC6\u5C09\u5C08\u5C07\u5C60\u5C5C\u5C5D\u5D07\u5D06\u5D0E\u5D1B\u5D16\u5D22\u5D11\u5D29\u5D14\u5D19\u5D24\u5D27\u5D17\u5DE2\u5E38\u5E36\u5E33\u5E37\u5EB7\u5EB8\u5EB6\u5EB5\u5EBE\u5F35\u5F37\u5F57\u5F6C\u5F69\u5F6B\u5F97\u5F99\u5F9E\u5F98\u5FA1\u5FA0\u5F9C\u607F\u60A3\u6089\u60A0\u60A8\u60CB\u60B4\u60E6\u60BD"],["b1a1","\u60C5\u60BB\u60B5\u60DC\u60BC\u60D8\u60D5\u60C6\u60DF\u60B8\u60DA\u60C7\u621A\u621B\u6248\u63A0\u63A7\u6372\u6396\u63A2\u63A5\u6377\u6367\u6398\u63AA\u6371\u63A9\u6389\u6383\u639B\u636B\u63A8\u6384\u6388\u6399\u63A1\u63AC\u6392\u638F\u6380\u637B\u6369\u6368\u637A\u655D\u6556\u6551\u6559\u6557\u555F\u654F\u6558\u6555\u6554\u659C\u659B\u65AC\u65CF\u65CB\u65CC\u65CE\u665D\u665A\u6664\u6668\u6666\u665E\u66F9\u52D7\u671B\u6881\u68AF\u68A2\u6893\u68B5\u687F\u6876\u68B1\u68A7\u6897\u68B0\u6883\u68C4\u68AD\u6886\u6885\u6894\u689D\u68A8\u689F\u68A1\u6882\u6B32\u6BBA"],["b240","\u6BEB\u6BEC\u6C2B\u6D8E\u6DBC\u6DF3\u6DD9\u6DB2\u6DE1\u6DCC\u6DE4\u6DFB\u6DFA\u6E05\u6DC7\u6DCB\u6DAF\u6DD1\u6DAE\u6DDE\u6DF9\u6DB8\u6DF7\u6DF5\u6DC5\u6DD2\u6E1A\u6DB5\u6DDA\u6DEB\u6DD8\u6DEA\u6DF1\u6DEE\u6DE8\u6DC6\u6DC4\u6DAA\u6DEC\u6DBF\u6DE6\u70F9\u7109\u710A\u70FD\u70EF\u723D\u727D\u7281\u731C\u731B\u7316\u7313\u7319\u7387\u7405\u740A\u7403\u7406\u73FE\u740D\u74E0\u74F6"],["b2a1","\u74F7\u751C\u7522\u7565\u7566\u7562\u7570\u758F\u75D4\u75D5\u75B5\u75CA\u75CD\u768E\u76D4\u76D2\u76DB\u7737\u773E\u773C\u7736\u7738\u773A\u786B\u7843\u784E\u7965\u7968\u796D\u79FB\u7A92\u7A95\u7B20\u7B28\u7B1B\u7B2C\u7B26\u7B19\u7B1E\u7B2E\u7C92\u7C97\u7C95\u7D46\u7D43\u7D71\u7D2E\u7D39\u7D3C\u7D40\u7D30\u7D33\u7D44\u7D2F\u7D42\u7D32\u7D31\u7F3D\u7F9E\u7F9A\u7FCC\u7FCE\u7FD2\u801C\u804A\u8046\u812F\u8116\u8123\u812B\u8129\u8130\u8124\u8202\u8235\u8237\u8236\u8239\u838E\u839E\u8398\u8378\u83A2\u8396\u83BD\u83AB\u8392\u838A\u8393\u8389\u83A0\u8377\u837B\u837C"],["b340","\u8386\u83A7\u8655\u5F6A\u86C7\u86C0\u86B6\u86C4\u86B5\u86C6\u86CB\u86B1\u86AF\u86C9\u8853\u889E\u8888\u88AB\u8892\u8896\u888D\u888B\u8993\u898F\u8A2A\u8A1D\u8A23\u8A25\u8A31\u8A2D\u8A1F\u8A1B\u8A22\u8C49\u8C5A\u8CA9\u8CAC\u8CAB\u8CA8\u8CAA\u8CA7\u8D67\u8D66\u8DBE\u8DBA\u8EDB\u8EDF\u9019\u900D\u901A\u9017\u9023\u901F\u901D\u9010\u9015\u901E\u9020\u900F\u9022\u9016\u901B\u9014"],["b3a1","\u90E8\u90ED\u90FD\u9157\u91CE\u91F5\u91E6\u91E3\u91E7\u91ED\u91E9\u9589\u966A\u9675\u9673\u9678\u9670\u9674\u9676\u9677\u966C\u96C0\u96EA\u96E9\u7AE0\u7ADF\u9802\u9803\u9B5A\u9CE5\u9E75\u9E7F\u9EA5\u9EBB\u50A2\u508D\u5085\u5099\u5091\u5080\u5096\u5098\u509A\u6700\u51F1\u5272\u5274\u5275\u5269\u52DE\u52DD\u52DB\u535A\u53A5\u557B\u5580\u55A7\u557C\u558A\u559D\u5598\u5582\u559C\u55AA\u5594\u5587\u558B\u5583\u55B3\u55AE\u559F\u553E\u55B2\u559A\u55BB\u55AC\u55B1\u557E\u5589\u55AB\u5599\u570D\u582F\u582A\u5834\u5824\u5830\u5831\u5821\u581D\u5820\u58F9\u58FA\u5960"],["b440","\u5A77\u5A9A\u5A7F\u5A92\u5A9B\u5AA7\u5B73\u5B71\u5BD2\u5BCC\u5BD3\u5BD0\u5C0A\u5C0B\u5C31\u5D4C\u5D50\u5D34\u5D47\u5DFD\u5E45\u5E3D\u5E40\u5E43\u5E7E\u5ECA\u5EC1\u5EC2\u5EC4\u5F3C\u5F6D\u5FA9\u5FAA\u5FA8\u60D1\u60E1\u60B2\u60B6\u60E0\u611C\u6123\u60FA\u6115\u60F0\u60FB\u60F4\u6168\u60F1\u610E\u60F6\u6109\u6100\u6112\u621F\u6249\u63A3\u638C\u63CF\u63C0\u63E9\u63C9\u63C6\u63CD"],["b4a1","\u63D2\u63E3\u63D0\u63E1\u63D6\u63ED\u63EE\u6376\u63F4\u63EA\u63DB\u6452\u63DA\u63F9\u655E\u6566\u6562\u6563\u6591\u6590\u65AF\u666E\u6670\u6674\u6676\u666F\u6691\u667A\u667E\u6677\u66FE\u66FF\u671F\u671D\u68FA\u68D5\u68E0\u68D8\u68D7\u6905\u68DF\u68F5\u68EE\u68E7\u68F9\u68D2\u68F2\u68E3\u68CB\u68CD\u690D\u6912\u690E\u68C9\u68DA\u696E\u68FB\u6B3E\u6B3A\u6B3D\u6B98\u6B96\u6BBC\u6BEF\u6C2E\u6C2F\u6C2C\u6E2F\u6E38\u6E54\u6E21\u6E32\u6E67\u6E4A\u6E20\u6E25\u6E23\u6E1B\u6E5B\u6E58\u6E24\u6E56\u6E6E\u6E2D\u6E26\u6E6F\u6E34\u6E4D\u6E3A\u6E2C\u6E43\u6E1D\u6E3E\u6ECB"],["b540","\u6E89\u6E19\u6E4E\u6E63\u6E44\u6E72\u6E69\u6E5F\u7119\u711A\u7126\u7130\u7121\u7136\u716E\u711C\u724C\u7284\u7280\u7336\u7325\u7334\u7329\u743A\u742A\u7433\u7422\u7425\u7435\u7436\u7434\u742F\u741B\u7426\u7428\u7525\u7526\u756B\u756A\u75E2\u75DB\u75E3\u75D9\u75D8\u75DE\u75E0\u767B\u767C\u7696\u7693\u76B4\u76DC\u774F\u77ED\u785D\u786C\u786F\u7A0D\u7A08\u7A0B\u7A05\u7A00\u7A98"],["b5a1","\u7A97\u7A96\u7AE5\u7AE3\u7B49\u7B56\u7B46\u7B50\u7B52\u7B54\u7B4D\u7B4B\u7B4F\u7B51\u7C9F\u7CA5\u7D5E\u7D50\u7D68\u7D55\u7D2B\u7D6E\u7D72\u7D61\u7D66\u7D62\u7D70\u7D73\u5584\u7FD4\u7FD5\u800B\u8052\u8085\u8155\u8154\u814B\u8151\u814E\u8139\u8146\u813E\u814C\u8153\u8174\u8212\u821C\u83E9\u8403\u83F8\u840D\u83E0\u83C5\u840B\u83C1\u83EF\u83F1\u83F4\u8457\u840A\u83F0\u840C\u83CC\u83FD\u83F2\u83CA\u8438\u840E\u8404\u83DC\u8407\u83D4\u83DF\u865B\u86DF\u86D9\u86ED\u86D4\u86DB\u86E4\u86D0\u86DE\u8857\u88C1\u88C2\u88B1\u8983\u8996\u8A3B\u8A60\u8A55\u8A5E\u8A3C\u8A41"],["b640","\u8A54\u8A5B\u8A50\u8A46\u8A34\u8A3A\u8A36\u8A56\u8C61\u8C82\u8CAF\u8CBC\u8CB3\u8CBD\u8CC1\u8CBB\u8CC0\u8CB4\u8CB7\u8CB6\u8CBF\u8CB8\u8D8A\u8D85\u8D81\u8DCE\u8DDD\u8DCB\u8DDA\u8DD1\u8DCC\u8DDB\u8DC6\u8EFB\u8EF8\u8EFC\u8F9C\u902E\u9035\u9031\u9038\u9032\u9036\u9102\u90F5\u9109\u90FE\u9163\u9165\u91CF\u9214\u9215\u9223\u9209\u921E\u920D\u9210\u9207\u9211\u9594\u958F\u958B\u9591"],["b6a1","\u9593\u9592\u958E\u968A\u968E\u968B\u967D\u9685\u9686\u968D\u9672\u9684\u96C1\u96C5\u96C4\u96C6\u96C7\u96EF\u96F2\u97CC\u9805\u9806\u9808\u98E7\u98EA\u98EF\u98E9\u98F2\u98ED\u99AE\u99AD\u9EC3\u9ECD\u9ED1\u4E82\u50AD\u50B5\u50B2\u50B3\u50C5\u50BE\u50AC\u50B7\u50BB\u50AF\u50C7\u527F\u5277\u527D\u52DF\u52E6\u52E4\u52E2\u52E3\u532F\u55DF\u55E8\u55D3\u55E6\u55CE\u55DC\u55C7\u55D1\u55E3\u55E4\u55EF\u55DA\u55E1\u55C5\u55C6\u55E5\u55C9\u5712\u5713\u585E\u5851\u5858\u5857\u585A\u5854\u586B\u584C\u586D\u584A\u5862\u5852\u584B\u5967\u5AC1\u5AC9\u5ACC\u5ABE\u5ABD\u5ABC"],["b740","\u5AB3\u5AC2\u5AB2\u5D69\u5D6F\u5E4C\u5E79\u5EC9\u5EC8\u5F12\u5F59\u5FAC\u5FAE\u611A\u610F\u6148\u611F\u60F3\u611B\u60F9\u6101\u6108\u614E\u614C\u6144\u614D\u613E\u6134\u6127\u610D\u6106\u6137\u6221\u6222\u6413\u643E\u641E\u642A\u642D\u643D\u642C\u640F\u641C\u6414\u640D\u6436\u6416\u6417\u6406\u656C\u659F\u65B0\u6697\u6689\u6687\u6688\u6696\u6684\u6698\u668D\u6703\u6994\u696D"],["b7a1","\u695A\u6977\u6960\u6954\u6975\u6930\u6982\u694A\u6968\u696B\u695E\u6953\u6979\u6986\u695D\u6963\u695B\u6B47\u6B72\u6BC0\u6BBF\u6BD3\u6BFD\u6EA2\u6EAF\u6ED3\u6EB6\u6EC2\u6E90\u6E9D\u6EC7\u6EC5\u6EA5\u6E98\u6EBC\u6EBA\u6EAB\u6ED1\u6E96\u6E9C\u6EC4\u6ED4\u6EAA\u6EA7\u6EB4\u714E\u7159\u7169\u7164\u7149\u7167\u715C\u716C\u7166\u714C\u7165\u715E\u7146\u7168\u7156\u723A\u7252\u7337\u7345\u733F\u733E\u746F\u745A\u7455\u745F\u745E\u7441\u743F\u7459\u745B\u745C\u7576\u7578\u7600\u75F0\u7601\u75F2\u75F1\u75FA\u75FF\u75F4\u75F3\u76DE\u76DF\u775B\u776B\u7766\u775E\u7763"],["b840","\u7779\u776A\u776C\u775C\u7765\u7768\u7762\u77EE\u788E\u78B0\u7897\u7898\u788C\u7889\u787C\u7891\u7893\u787F\u797A\u797F\u7981\u842C\u79BD\u7A1C\u7A1A\u7A20\u7A14\u7A1F\u7A1E\u7A9F\u7AA0\u7B77\u7BC0\u7B60\u7B6E\u7B67\u7CB1\u7CB3\u7CB5\u7D93\u7D79\u7D91\u7D81\u7D8F\u7D5B\u7F6E\u7F69\u7F6A\u7F72\u7FA9\u7FA8\u7FA4\u8056\u8058\u8086\u8084\u8171\u8170\u8178\u8165\u816E\u8173\u816B"],["b8a1","\u8179\u817A\u8166\u8205\u8247\u8482\u8477\u843D\u8431\u8475\u8466\u846B\u8449\u846C\u845B\u843C\u8435\u8461\u8463\u8469\u846D\u8446\u865E\u865C\u865F\u86F9\u8713\u8708\u8707\u8700\u86FE\u86FB\u8702\u8703\u8706\u870A\u8859\u88DF\u88D4\u88D9\u88DC\u88D8\u88DD\u88E1\u88CA\u88D5\u88D2\u899C\u89E3\u8A6B\u8A72\u8A73\u8A66\u8A69\u8A70\u8A87\u8A7C\u8A63\u8AA0\u8A71\u8A85\u8A6D\u8A62\u8A6E\u8A6C\u8A79\u8A7B\u8A3E\u8A68\u8C62\u8C8A\u8C89\u8CCA\u8CC7\u8CC8\u8CC4\u8CB2\u8CC3\u8CC2\u8CC5\u8DE1\u8DDF\u8DE8\u8DEF\u8DF3\u8DFA\u8DEA\u8DE4\u8DE6\u8EB2\u8F03\u8F09\u8EFE\u8F0A"],["b940","\u8F9F\u8FB2\u904B\u904A\u9053\u9042\u9054\u903C\u9055\u9050\u9047\u904F\u904E\u904D\u9051\u903E\u9041\u9112\u9117\u916C\u916A\u9169\u91C9\u9237\u9257\u9238\u923D\u9240\u923E\u925B\u924B\u9264\u9251\u9234\u9249\u924D\u9245\u9239\u923F\u925A\u9598\u9698\u9694\u9695\u96CD\u96CB\u96C9\u96CA\u96F7\u96FB\u96F9\u96F6\u9756\u9774\u9776\u9810\u9811\u9813\u980A\u9812\u980C\u98FC\u98F4"],["b9a1","\u98FD\u98FE\u99B3\u99B1\u99B4\u9AE1\u9CE9\u9E82\u9F0E\u9F13\u9F20\u50E7\u50EE\u50E5\u50D6\u50ED\u50DA\u50D5\u50CF\u50D1\u50F1\u50CE\u50E9\u5162\u51F3\u5283\u5282\u5331\u53AD\u55FE\u5600\u561B\u5617\u55FD\u5614\u5606\u5609\u560D\u560E\u55F7\u5616\u561F\u5608\u5610\u55F6\u5718\u5716\u5875\u587E\u5883\u5893\u588A\u5879\u5885\u587D\u58FD\u5925\u5922\u5924\u596A\u5969\u5AE1\u5AE6\u5AE9\u5AD7\u5AD6\u5AD8\u5AE3\u5B75\u5BDE\u5BE7\u5BE1\u5BE5\u5BE6\u5BE8\u5BE2\u5BE4\u5BDF\u5C0D\u5C62\u5D84\u5D87\u5E5B\u5E63\u5E55\u5E57\u5E54\u5ED3\u5ED6\u5F0A\u5F46\u5F70\u5FB9\u6147"],["ba40","\u613F\u614B\u6177\u6162\u6163\u615F\u615A\u6158\u6175\u622A\u6487\u6458\u6454\u64A4\u6478\u645F\u647A\u6451\u6467\u6434\u646D\u647B\u6572\u65A1\u65D7\u65D6\u66A2\u66A8\u669D\u699C\u69A8\u6995\u69C1\u69AE\u69D3\u69CB\u699B\u69B7\u69BB\u69AB\u69B4\u69D0\u69CD\u69AD\u69CC\u69A6\u69C3\u69A3\u6B49\u6B4C\u6C33\u6F33\u6F14\u6EFE\u6F13\u6EF4\u6F29\u6F3E\u6F20\u6F2C\u6F0F\u6F02\u6F22"],["baa1","\u6EFF\u6EEF\u6F06\u6F31\u6F38\u6F32\u6F23\u6F15\u6F2B\u6F2F\u6F88\u6F2A\u6EEC\u6F01\u6EF2\u6ECC\u6EF7\u7194\u7199\u717D\u718A\u7184\u7192\u723E\u7292\u7296\u7344\u7350\u7464\u7463\u746A\u7470\u746D\u7504\u7591\u7627\u760D\u760B\u7609\u7613\u76E1\u76E3\u7784\u777D\u777F\u7761\u78C1\u789F\u78A7\u78B3\u78A9\u78A3\u798E\u798F\u798D\u7A2E\u7A31\u7AAA\u7AA9\u7AED\u7AEF\u7BA1\u7B95\u7B8B\u7B75\u7B97\u7B9D\u7B94\u7B8F\u7BB8\u7B87\u7B84\u7CB9\u7CBD\u7CBE\u7DBB\u7DB0\u7D9C\u7DBD\u7DBE\u7DA0\u7DCA\u7DB4\u7DB2\u7DB1\u7DBA\u7DA2\u7DBF\u7DB5\u7DB8\u7DAD\u7DD2\u7DC7\u7DAC"],["bb40","\u7F70\u7FE0\u7FE1\u7FDF\u805E\u805A\u8087\u8150\u8180\u818F\u8188\u818A\u817F\u8182\u81E7\u81FA\u8207\u8214\u821E\u824B\u84C9\u84BF\u84C6\u84C4\u8499\u849E\u84B2\u849C\u84CB\u84B8\u84C0\u84D3\u8490\u84BC\u84D1\u84CA\u873F\u871C\u873B\u8722\u8725\u8734\u8718\u8755\u8737\u8729\u88F3\u8902\u88F4\u88F9\u88F8\u88FD\u88E8\u891A\u88EF\u8AA6\u8A8C\u8A9E\u8AA3\u8A8D\u8AA1\u8A93\u8AA4"],["bba1","\u8AAA\u8AA5\u8AA8\u8A98\u8A91\u8A9A\u8AA7\u8C6A\u8C8D\u8C8C\u8CD3\u8CD1\u8CD2\u8D6B\u8D99\u8D95\u8DFC\u8F14\u8F12\u8F15\u8F13\u8FA3\u9060\u9058\u905C\u9063\u9059\u905E\u9062\u905D\u905B\u9119\u9118\u911E\u9175\u9178\u9177\u9174\u9278\u9280\u9285\u9298\u9296\u927B\u9293\u929C\u92A8\u927C\u9291\u95A1\u95A8\u95A9\u95A3\u95A5\u95A4\u9699\u969C\u969B\u96CC\u96D2\u9700\u977C\u9785\u97F6\u9817\u9818\u98AF\u98B1\u9903\u9905\u990C\u9909\u99C1\u9AAF\u9AB0\u9AE6\u9B41\u9B42\u9CF4\u9CF6\u9CF3\u9EBC\u9F3B\u9F4A\u5104\u5100\u50FB\u50F5\u50F9\u5102\u5108\u5109\u5105\u51DC"],["bc40","\u5287\u5288\u5289\u528D\u528A\u52F0\u53B2\u562E\u563B\u5639\u5632\u563F\u5634\u5629\u5653\u564E\u5657\u5674\u5636\u562F\u5630\u5880\u589F\u589E\u58B3\u589C\u58AE\u58A9\u58A6\u596D\u5B09\u5AFB\u5B0B\u5AF5\u5B0C\u5B08\u5BEE\u5BEC\u5BE9\u5BEB\u5C64\u5C65\u5D9D\u5D94\u5E62\u5E5F\u5E61\u5EE2\u5EDA\u5EDF\u5EDD\u5EE3\u5EE0\u5F48\u5F71\u5FB7\u5FB5\u6176\u6167\u616E\u615D\u6155\u6182"],["bca1","\u617C\u6170\u616B\u617E\u61A7\u6190\u61AB\u618E\u61AC\u619A\u61A4\u6194\u61AE\u622E\u6469\u646F\u6479\u649E\u64B2\u6488\u6490\u64B0\u64A5\u6493\u6495\u64A9\u6492\u64AE\u64AD\u64AB\u649A\u64AC\u6499\u64A2\u64B3\u6575\u6577\u6578\u66AE\u66AB\u66B4\u66B1\u6A23\u6A1F\u69E8\u6A01\u6A1E\u6A19\u69FD\u6A21\u6A13\u6A0A\u69F3\u6A02\u6A05\u69ED\u6A11\u6B50\u6B4E\u6BA4\u6BC5\u6BC6\u6F3F\u6F7C\u6F84\u6F51\u6F66\u6F54\u6F86\u6F6D\u6F5B\u6F78\u6F6E\u6F8E\u6F7A\u6F70\u6F64\u6F97\u6F58\u6ED5\u6F6F\u6F60\u6F5F\u719F\u71AC\u71B1\u71A8\u7256\u729B\u734E\u7357\u7469\u748B\u7483"],["bd40","\u747E\u7480\u757F\u7620\u7629\u761F\u7624\u7626\u7621\u7622\u769A\u76BA\u76E4\u778E\u7787\u778C\u7791\u778B\u78CB\u78C5\u78BA\u78CA\u78BE\u78D5\u78BC\u78D0\u7A3F\u7A3C\u7A40\u7A3D\u7A37\u7A3B\u7AAF\u7AAE\u7BAD\u7BB1\u7BC4\u7BB4\u7BC6\u7BC7\u7BC1\u7BA0\u7BCC\u7CCA\u7DE0\u7DF4\u7DEF\u7DFB\u7DD8\u7DEC\u7DDD\u7DE8\u7DE3\u7DDA\u7DDE\u7DE9\u7D9E\u7DD9\u7DF2\u7DF9\u7F75\u7F77\u7FAF"],["bda1","\u7FE9\u8026\u819B\u819C\u819D\u81A0\u819A\u8198\u8517\u853D\u851A\u84EE\u852C\u852D\u8513\u8511\u8523\u8521\u8514\u84EC\u8525\u84FF\u8506\u8782\u8774\u8776\u8760\u8766\u8778\u8768\u8759\u8757\u874C\u8753\u885B\u885D\u8910\u8907\u8912\u8913\u8915\u890A\u8ABC\u8AD2\u8AC7\u8AC4\u8A95\u8ACB\u8AF8\u8AB2\u8AC9\u8AC2\u8ABF\u8AB0\u8AD6\u8ACD\u8AB6\u8AB9\u8ADB\u8C4C\u8C4E\u8C6C\u8CE0\u8CDE\u8CE6\u8CE4\u8CEC\u8CED\u8CE2\u8CE3\u8CDC\u8CEA\u8CE1\u8D6D\u8D9F\u8DA3\u8E2B\u8E10\u8E1D\u8E22\u8E0F\u8E29\u8E1F\u8E21\u8E1E\u8EBA\u8F1D\u8F1B\u8F1F\u8F29\u8F26\u8F2A\u8F1C\u8F1E"],["be40","\u8F25\u9069\u906E\u9068\u906D\u9077\u9130\u912D\u9127\u9131\u9187\u9189\u918B\u9183\u92C5\u92BB\u92B7\u92EA\u92AC\u92E4\u92C1\u92B3\u92BC\u92D2\u92C7\u92F0\u92B2\u95AD\u95B1\u9704\u9706\u9707\u9709\u9760\u978D\u978B\u978F\u9821\u982B\u981C\u98B3\u990A\u9913\u9912\u9918\u99DD\u99D0\u99DF\u99DB\u99D1\u99D5\u99D2\u99D9\u9AB7\u9AEE\u9AEF\u9B27\u9B45\u9B44\u9B77\u9B6F\u9D06\u9D09"],["bea1","\u9D03\u9EA9\u9EBE\u9ECE\u58A8\u9F52\u5112\u5118\u5114\u5110\u5115\u5180\u51AA\u51DD\u5291\u5293\u52F3\u5659\u566B\u5679\u5669\u5664\u5678\u566A\u5668\u5665\u5671\u566F\u566C\u5662\u5676\u58C1\u58BE\u58C7\u58C5\u596E\u5B1D\u5B34\u5B78\u5BF0\u5C0E\u5F4A\u61B2\u6191\u61A9\u618A\u61CD\u61B6\u61BE\u61CA\u61C8\u6230\u64C5\u64C1\u64CB\u64BB\u64BC\u64DA\u64C4\u64C7\u64C2\u64CD\u64BF\u64D2\u64D4\u64BE\u6574\u66C6\u66C9\u66B9\u66C4\u66C7\u66B8\u6A3D\u6A38\u6A3A\u6A59\u6A6B\u6A58\u6A39\u6A44\u6A62\u6A61\u6A4B\u6A47\u6A35\u6A5F\u6A48\u6B59\u6B77\u6C05\u6FC2\u6FB1\u6FA1"],["bf40","\u6FC3\u6FA4\u6FC1\u6FA7\u6FB3\u6FC0\u6FB9\u6FB6\u6FA6\u6FA0\u6FB4\u71BE\u71C9\u71D0\u71D2\u71C8\u71D5\u71B9\u71CE\u71D9\u71DC\u71C3\u71C4\u7368\u749C\u74A3\u7498\u749F\u749E\u74E2\u750C\u750D\u7634\u7638\u763A\u76E7\u76E5\u77A0\u779E\u779F\u77A5\u78E8\u78DA\u78EC\u78E7\u79A6\u7A4D\u7A4E\u7A46\u7A4C\u7A4B\u7ABA\u7BD9\u7C11\u7BC9\u7BE4\u7BDB\u7BE1\u7BE9\u7BE6\u7CD5\u7CD6\u7E0A"],["bfa1","\u7E11\u7E08\u7E1B\u7E23\u7E1E\u7E1D\u7E09\u7E10\u7F79\u7FB2\u7FF0\u7FF1\u7FEE\u8028\u81B3\u81A9\u81A8\u81FB\u8208\u8258\u8259\u854A\u8559\u8548\u8568\u8569\u8543\u8549\u856D\u856A\u855E\u8783\u879F\u879E\u87A2\u878D\u8861\u892A\u8932\u8925\u892B\u8921\u89AA\u89A6\u8AE6\u8AFA\u8AEB\u8AF1\u8B00\u8ADC\u8AE7\u8AEE\u8AFE\u8B01\u8B02\u8AF7\u8AED\u8AF3\u8AF6\u8AFC\u8C6B\u8C6D\u8C93\u8CF4\u8E44\u8E31\u8E34\u8E42\u8E39\u8E35\u8F3B\u8F2F\u8F38\u8F33\u8FA8\u8FA6\u9075\u9074\u9078\u9072\u907C\u907A\u9134\u9192\u9320\u9336\u92F8\u9333\u932F\u9322\u92FC\u932B\u9304\u931A"],["c040","\u9310\u9326\u9321\u9315\u932E\u9319\u95BB\u96A7\u96A8\u96AA\u96D5\u970E\u9711\u9716\u970D\u9713\u970F\u975B\u975C\u9766\u9798\u9830\u9838\u983B\u9837\u982D\u9839\u9824\u9910\u9928\u991E\u991B\u9921\u991A\u99ED\u99E2\u99F1\u9AB8\u9ABC\u9AFB\u9AED\u9B28\u9B91\u9D15\u9D23\u9D26\u9D28\u9D12\u9D1B\u9ED8\u9ED4\u9F8D\u9F9C\u512A\u511F\u5121\u5132\u52F5\u568E\u5680\u5690\u5685\u5687"],["c0a1","\u568F\u58D5\u58D3\u58D1\u58CE\u5B30\u5B2A\u5B24\u5B7A\u5C37\u5C68\u5DBC\u5DBA\u5DBD\u5DB8\u5E6B\u5F4C\u5FBD\u61C9\u61C2\u61C7\u61E6\u61CB\u6232\u6234\u64CE\u64CA\u64D8\u64E0\u64F0\u64E6\u64EC\u64F1\u64E2\u64ED\u6582\u6583\u66D9\u66D6\u6A80\u6A94\u6A84\u6AA2\u6A9C\u6ADB\u6AA3\u6A7E\u6A97\u6A90\u6AA0\u6B5C\u6BAE\u6BDA\u6C08\u6FD8\u6FF1\u6FDF\u6FE0\u6FDB\u6FE4\u6FEB\u6FEF\u6F80\u6FEC\u6FE1\u6FE9\u6FD5\u6FEE\u6FF0\u71E7\u71DF\u71EE\u71E6\u71E5\u71ED\u71EC\u71F4\u71E0\u7235\u7246\u7370\u7372\u74A9\u74B0\u74A6\u74A8\u7646\u7642\u764C\u76EA\u77B3\u77AA\u77B0\u77AC"],["c140","\u77A7\u77AD\u77EF\u78F7\u78FA\u78F4\u78EF\u7901\u79A7\u79AA\u7A57\u7ABF\u7C07\u7C0D\u7BFE\u7BF7\u7C0C\u7BE0\u7CE0\u7CDC\u7CDE\u7CE2\u7CDF\u7CD9\u7CDD\u7E2E\u7E3E\u7E46\u7E37\u7E32\u7E43\u7E2B\u7E3D\u7E31\u7E45\u7E41\u7E34\u7E39\u7E48\u7E35\u7E3F\u7E2F\u7F44\u7FF3\u7FFC\u8071\u8072\u8070\u806F\u8073\u81C6\u81C3\u81BA\u81C2\u81C0\u81BF\u81BD\u81C9\u81BE\u81E8\u8209\u8271\u85AA"],["c1a1","\u8584\u857E\u859C\u8591\u8594\u85AF\u859B\u8587\u85A8\u858A\u8667\u87C0\u87D1\u87B3\u87D2\u87C6\u87AB\u87BB\u87BA\u87C8\u87CB\u893B\u8936\u8944\u8938\u893D\u89AC\u8B0E\u8B17\u8B19\u8B1B\u8B0A\u8B20\u8B1D\u8B04\u8B10\u8C41\u8C3F\u8C73\u8CFA\u8CFD\u8CFC\u8CF8\u8CFB\u8DA8\u8E49\u8E4B\u8E48\u8E4A\u8F44\u8F3E\u8F42\u8F45\u8F3F\u907F\u907D\u9084\u9081\u9082\u9080\u9139\u91A3\u919E\u919C\u934D\u9382\u9328\u9375\u934A\u9365\u934B\u9318\u937E\u936C\u935B\u9370\u935A\u9354\u95CA\u95CB\u95CC\u95C8\u95C6\u96B1\u96B8\u96D6\u971C\u971E\u97A0\u97D3\u9846\u98B6\u9935\u9A01"],["c240","\u99FF\u9BAE\u9BAB\u9BAA\u9BAD\u9D3B\u9D3F\u9E8B\u9ECF\u9EDE\u9EDC\u9EDD\u9EDB\u9F3E\u9F4B\u53E2\u5695\u56AE\u58D9\u58D8\u5B38\u5F5D\u61E3\u6233\u64F4\u64F2\u64FE\u6506\u64FA\u64FB\u64F7\u65B7\u66DC\u6726\u6AB3\u6AAC\u6AC3\u6ABB\u6AB8\u6AC2\u6AAE\u6AAF\u6B5F\u6B78\u6BAF\u7009\u700B\u6FFE\u7006\u6FFA\u7011\u700F\u71FB\u71FC\u71FE\u71F8\u7377\u7375\u74A7\u74BF\u7515\u7656\u7658"],["c2a1","\u7652\u77BD\u77BF\u77BB\u77BC\u790E\u79AE\u7A61\u7A62\u7A60\u7AC4\u7AC5\u7C2B\u7C27\u7C2A\u7C1E\u7C23\u7C21\u7CE7\u7E54\u7E55\u7E5E\u7E5A\u7E61\u7E52\u7E59\u7F48\u7FF9\u7FFB\u8077\u8076\u81CD\u81CF\u820A\u85CF\u85A9\u85CD\u85D0\u85C9\u85B0\u85BA\u85B9\u85A6\u87EF\u87EC\u87F2\u87E0\u8986\u89B2\u89F4\u8B28\u8B39\u8B2C\u8B2B\u8C50\u8D05\u8E59\u8E63\u8E66\u8E64\u8E5F\u8E55\u8EC0\u8F49\u8F4D\u9087\u9083\u9088\u91AB\u91AC\u91D0\u9394\u938A\u9396\u93A2\u93B3\u93AE\u93AC\u93B0\u9398\u939A\u9397\u95D4\u95D6\u95D0\u95D5\u96E2\u96DC\u96D9\u96DB\u96DE\u9724\u97A3\u97A6"],["c340","\u97AD\u97F9\u984D\u984F\u984C\u984E\u9853\u98BA\u993E\u993F\u993D\u992E\u99A5\u9A0E\u9AC1\u9B03\u9B06\u9B4F\u9B4E\u9B4D\u9BCA\u9BC9\u9BFD\u9BC8\u9BC0\u9D51\u9D5D\u9D60\u9EE0\u9F15\u9F2C\u5133\u56A5\u58DE\u58DF\u58E2\u5BF5\u9F90\u5EEC\u61F2\u61F7\u61F6\u61F5\u6500\u650F\u66E0\u66DD\u6AE5\u6ADD\u6ADA\u6AD3\u701B\u701F\u7028\u701A\u701D\u7015\u7018\u7206\u720D\u7258\u72A2\u7378"],["c3a1","\u737A\u74BD\u74CA\u74E3\u7587\u7586\u765F\u7661\u77C7\u7919\u79B1\u7A6B\u7A69\u7C3E\u7C3F\u7C38\u7C3D\u7C37\u7C40\u7E6B\u7E6D\u7E79\u7E69\u7E6A\u7F85\u7E73\u7FB6\u7FB9\u7FB8\u81D8\u85E9\u85DD\u85EA\u85D5\u85E4\u85E5\u85F7\u87FB\u8805\u880D\u87F9\u87FE\u8960\u895F\u8956\u895E\u8B41\u8B5C\u8B58\u8B49\u8B5A\u8B4E\u8B4F\u8B46\u8B59\u8D08\u8D0A\u8E7C\u8E72\u8E87\u8E76\u8E6C\u8E7A\u8E74\u8F54\u8F4E\u8FAD\u908A\u908B\u91B1\u91AE\u93E1\u93D1\u93DF\u93C3\u93C8\u93DC\u93DD\u93D6\u93E2\u93CD\u93D8\u93E4\u93D7\u93E8\u95DC\u96B4\u96E3\u972A\u9727\u9761\u97DC\u97FB\u985E"],["c440","\u9858\u985B\u98BC\u9945\u9949\u9A16\u9A19\u9B0D\u9BE8\u9BE7\u9BD6\u9BDB\u9D89\u9D61\u9D72\u9D6A\u9D6C\u9E92\u9E97\u9E93\u9EB4\u52F8\u56A8\u56B7\u56B6\u56B4\u56BC\u58E4\u5B40\u5B43\u5B7D\u5BF6\u5DC9\u61F8\u61FA\u6518\u6514\u6519\u66E6\u6727\u6AEC\u703E\u7030\u7032\u7210\u737B\u74CF\u7662\u7665\u7926\u792A\u792C\u792B\u7AC7\u7AF6\u7C4C\u7C43\u7C4D\u7CEF\u7CF0\u8FAE\u7E7D\u7E7C"],["c4a1","\u7E82\u7F4C\u8000\u81DA\u8266\u85FB\u85F9\u8611\u85FA\u8606\u860B\u8607\u860A\u8814\u8815\u8964\u89BA\u89F8\u8B70\u8B6C\u8B66\u8B6F\u8B5F\u8B6B\u8D0F\u8D0D\u8E89\u8E81\u8E85\u8E82\u91B4\u91CB\u9418\u9403\u93FD\u95E1\u9730\u98C4\u9952\u9951\u99A8\u9A2B\u9A30\u9A37\u9A35\u9C13\u9C0D\u9E79\u9EB5\u9EE8\u9F2F\u9F5F\u9F63\u9F61\u5137\u5138\u56C1\u56C0\u56C2\u5914\u5C6C\u5DCD\u61FC\u61FE\u651D\u651C\u6595\u66E9\u6AFB\u6B04\u6AFA\u6BB2\u704C\u721B\u72A7\u74D6\u74D4\u7669\u77D3\u7C50\u7E8F\u7E8C\u7FBC\u8617\u862D\u861A\u8823\u8822\u8821\u881F\u896A\u896C\u89BD\u8B74"],["c540","\u8B77\u8B7D\u8D13\u8E8A\u8E8D\u8E8B\u8F5F\u8FAF\u91BA\u942E\u9433\u9435\u943A\u9438\u9432\u942B\u95E2\u9738\u9739\u9732\u97FF\u9867\u9865\u9957\u9A45\u9A43\u9A40\u9A3E\u9ACF\u9B54\u9B51\u9C2D\u9C25\u9DAF\u9DB4\u9DC2\u9DB8\u9E9D\u9EEF\u9F19\u9F5C\u9F66\u9F67\u513C\u513B\u56C8\u56CA\u56C9\u5B7F\u5DD4\u5DD2\u5F4E\u61FF\u6524\u6B0A\u6B61\u7051\u7058\u7380\u74E4\u758A\u766E\u766C"],["c5a1","\u79B3\u7C60\u7C5F\u807E\u807D\u81DF\u8972\u896F\u89FC\u8B80\u8D16\u8D17\u8E91\u8E93\u8F61\u9148\u9444\u9451\u9452\u973D\u973E\u97C3\u97C1\u986B\u9955\u9A55\u9A4D\u9AD2\u9B1A\u9C49\u9C31\u9C3E\u9C3B\u9DD3\u9DD7\u9F34\u9F6C\u9F6A\u9F94\u56CC\u5DD6\u6200\u6523\u652B\u652A\u66EC\u6B10\u74DA\u7ACA\u7C64\u7C63\u7C65\u7E93\u7E96\u7E94\u81E2\u8638\u863F\u8831\u8B8A\u9090\u908F\u9463\u9460\u9464\u9768\u986F\u995C\u9A5A\u9A5B\u9A57\u9AD3\u9AD4\u9AD1\u9C54\u9C57\u9C56\u9DE5\u9E9F\u9EF4\u56D1\u58E9\u652C\u705E\u7671\u7672\u77D7\u7F50\u7F88\u8836\u8839\u8862\u8B93\u8B92"],["c640","\u8B96\u8277\u8D1B\u91C0\u946A\u9742\u9748\u9744\u97C6\u9870\u9A5F\u9B22\u9B58\u9C5F\u9DF9\u9DFA\u9E7C\u9E7D\u9F07\u9F77\u9F72\u5EF3\u6B16\u7063\u7C6C\u7C6E\u883B\u89C0\u8EA1\u91C1\u9472\u9470\u9871\u995E\u9AD6\u9B23\u9ECC\u7064\u77DA\u8B9A\u9477\u97C9\u9A62\u9A65\u7E9C\u8B9C\u8EAA\u91C5\u947D\u947E\u947C\u9C77\u9C78\u9EF7\u8C54\u947F\u9E1A\u7228\u9A6A\u9B31\u9E1B\u9E1E\u7C72"],["c940","\u4E42\u4E5C\u51F5\u531A\u5382\u4E07\u4E0C\u4E47\u4E8D\u56D7\uFA0C\u5C6E\u5F73\u4E0F\u5187\u4E0E\u4E2E\u4E93\u4EC2\u4EC9\u4EC8\u5198\u52FC\u536C\u53B9\u5720\u5903\u592C\u5C10\u5DFF\u65E1\u6BB3\u6BCC\u6C14\u723F\u4E31\u4E3C\u4EE8\u4EDC\u4EE9\u4EE1\u4EDD\u4EDA\u520C\u531C\u534C\u5722\u5723\u5917\u592F\u5B81\u5B84\u5C12\u5C3B\u5C74\u5C73\u5E04\u5E80\u5E82\u5FC9\u6209\u6250\u6C15"],["c9a1","\u6C36\u6C43\u6C3F\u6C3B\u72AE\u72B0\u738A\u79B8\u808A\u961E\u4F0E\u4F18\u4F2C\u4EF5\u4F14\u4EF1\u4F00\u4EF7\u4F08\u4F1D\u4F02\u4F05\u4F22\u4F13\u4F04\u4EF4\u4F12\u51B1\u5213\u5209\u5210\u52A6\u5322\u531F\u534D\u538A\u5407\u56E1\u56DF\u572E\u572A\u5734\u593C\u5980\u597C\u5985\u597B\u597E\u5977\u597F\u5B56\u5C15\u5C25\u5C7C\u5C7A\u5C7B\u5C7E\u5DDF\u5E75\u5E84\u5F02\u5F1A\u5F74\u5FD5\u5FD4\u5FCF\u625C\u625E\u6264\u6261\u6266\u6262\u6259\u6260\u625A\u6265\u65EF\u65EE\u673E\u6739\u6738\u673B\u673A\u673F\u673C\u6733\u6C18\u6C46\u6C52\u6C5C\u6C4F\u6C4A\u6C54\u6C4B"],["ca40","\u6C4C\u7071\u725E\u72B4\u72B5\u738E\u752A\u767F\u7A75\u7F51\u8278\u827C\u8280\u827D\u827F\u864D\u897E\u9099\u9097\u9098\u909B\u9094\u9622\u9624\u9620\u9623\u4F56\u4F3B\u4F62\u4F49\u4F53\u4F64\u4F3E\u4F67\u4F52\u4F5F\u4F41\u4F58\u4F2D\u4F33\u4F3F\u4F61\u518F\u51B9\u521C\u521E\u5221\u52AD\u52AE\u5309\u5363\u5372\u538E\u538F\u5430\u5437\u542A\u5454\u5445\u5419\u541C\u5425\u5418"],["caa1","\u543D\u544F\u5441\u5428\u5424\u5447\u56EE\u56E7\u56E5\u5741\u5745\u574C\u5749\u574B\u5752\u5906\u5940\u59A6\u5998\u59A0\u5997\u598E\u59A2\u5990\u598F\u59A7\u59A1\u5B8E\u5B92\u5C28\u5C2A\u5C8D\u5C8F\u5C88\u5C8B\u5C89\u5C92\u5C8A\u5C86\u5C93\u5C95\u5DE0\u5E0A\u5E0E\u5E8B\u5E89\u5E8C\u5E88\u5E8D\u5F05\u5F1D\u5F78\u5F76\u5FD2\u5FD1\u5FD0\u5FED\u5FE8\u5FEE\u5FF3\u5FE1\u5FE4\u5FE3\u5FFA\u5FEF\u5FF7\u5FFB\u6000\u5FF4\u623A\u6283\u628C\u628E\u628F\u6294\u6287\u6271\u627B\u627A\u6270\u6281\u6288\u6277\u627D\u6272\u6274\u6537\u65F0\u65F4\u65F3\u65F2\u65F5\u6745\u6747"],["cb40","\u6759\u6755\u674C\u6748\u675D\u674D\u675A\u674B\u6BD0\u6C19\u6C1A\u6C78\u6C67\u6C6B\u6C84\u6C8B\u6C8F\u6C71\u6C6F\u6C69\u6C9A\u6C6D\u6C87\u6C95\u6C9C\u6C66\u6C73\u6C65\u6C7B\u6C8E\u7074\u707A\u7263\u72BF\u72BD\u72C3\u72C6\u72C1\u72BA\u72C5\u7395\u7397\u7393\u7394\u7392\u753A\u7539\u7594\u7595\u7681\u793D\u8034\u8095\u8099\u8090\u8092\u809C\u8290\u828F\u8285\u828E\u8291\u8293"],["cba1","\u828A\u8283\u8284\u8C78\u8FC9\u8FBF\u909F\u90A1\u90A5\u909E\u90A7\u90A0\u9630\u9628\u962F\u962D\u4E33\u4F98\u4F7C\u4F85\u4F7D\u4F80\u4F87\u4F76\u4F74\u4F89\u4F84\u4F77\u4F4C\u4F97\u4F6A\u4F9A\u4F79\u4F81\u4F78\u4F90\u4F9C\u4F94\u4F9E\u4F92\u4F82\u4F95\u4F6B\u4F6E\u519E\u51BC\u51BE\u5235\u5232\u5233\u5246\u5231\u52BC\u530A\u530B\u533C\u5392\u5394\u5487\u547F\u5481\u5491\u5482\u5488\u546B\u547A\u547E\u5465\u546C\u5474\u5466\u548D\u546F\u5461\u5460\u5498\u5463\u5467\u5464\u56F7\u56F9\u576F\u5772\u576D\u576B\u5771\u5770\u5776\u5780\u5775\u577B\u5773\u5774\u5762"],["cc40","\u5768\u577D\u590C\u5945\u59B5\u59BA\u59CF\u59CE\u59B2\u59CC\u59C1\u59B6\u59BC\u59C3\u59D6\u59B1\u59BD\u59C0\u59C8\u59B4\u59C7\u5B62\u5B65\u5B93\u5B95\u5C44\u5C47\u5CAE\u5CA4\u5CA0\u5CB5\u5CAF\u5CA8\u5CAC\u5C9F\u5CA3\u5CAD\u5CA2\u5CAA\u5CA7\u5C9D\u5CA5\u5CB6\u5CB0\u5CA6\u5E17\u5E14\u5E19\u5F28\u5F22\u5F23\u5F24\u5F54\u5F82\u5F7E\u5F7D\u5FDE\u5FE5\u602D\u6026\u6019\u6032\u600B"],["cca1","\u6034\u600A\u6017\u6033\u601A\u601E\u602C\u6022\u600D\u6010\u602E\u6013\u6011\u600C\u6009\u601C\u6214\u623D\u62AD\u62B4\u62D1\u62BE\u62AA\u62B6\u62CA\u62AE\u62B3\u62AF\u62BB\u62A9\u62B0\u62B8\u653D\u65A8\u65BB\u6609\u65FC\u6604\u6612\u6608\u65FB\u6603\u660B\u660D\u6605\u65FD\u6611\u6610\u66F6\u670A\u6785\u676C\u678E\u6792\u6776\u677B\u6798\u6786\u6784\u6774\u678D\u678C\u677A\u679F\u6791\u6799\u6783\u677D\u6781\u6778\u6779\u6794\u6B25\u6B80\u6B7E\u6BDE\u6C1D\u6C93\u6CEC\u6CEB\u6CEE\u6CD9\u6CB6\u6CD4\u6CAD\u6CE7\u6CB7\u6CD0\u6CC2\u6CBA\u6CC3\u6CC6\u6CED\u6CF2"],["cd40","\u6CD2\u6CDD\u6CB4\u6C8A\u6C9D\u6C80\u6CDE\u6CC0\u6D30\u6CCD\u6CC7\u6CB0\u6CF9\u6CCF\u6CE9\u6CD1\u7094\u7098\u7085\u7093\u7086\u7084\u7091\u7096\u7082\u709A\u7083\u726A\u72D6\u72CB\u72D8\u72C9\u72DC\u72D2\u72D4\u72DA\u72CC\u72D1\u73A4\u73A1\u73AD\u73A6\u73A2\u73A0\u73AC\u739D\u74DD\u74E8\u753F\u7540\u753E\u758C\u7598\u76AF\u76F3\u76F1\u76F0\u76F5\u77F8\u77FC\u77F9\u77FB\u77FA"],["cda1","\u77F7\u7942\u793F\u79C5\u7A78\u7A7B\u7AFB\u7C75\u7CFD\u8035\u808F\u80AE\u80A3\u80B8\u80B5\u80AD\u8220\u82A0\u82C0\u82AB\u829A\u8298\u829B\u82B5\u82A7\u82AE\u82BC\u829E\u82BA\u82B4\u82A8\u82A1\u82A9\u82C2\u82A4\u82C3\u82B6\u82A2\u8670\u866F\u866D\u866E\u8C56\u8FD2\u8FCB\u8FD3\u8FCD\u8FD6\u8FD5\u8FD7\u90B2\u90B4\u90AF\u90B3\u90B0\u9639\u963D\u963C\u963A\u9643\u4FCD\u4FC5\u4FD3\u4FB2\u4FC9\u4FCB\u4FC1\u4FD4\u4FDC\u4FD9\u4FBB\u4FB3\u4FDB\u4FC7\u4FD6\u4FBA\u4FC0\u4FB9\u4FEC\u5244\u5249\u52C0\u52C2\u533D\u537C\u5397\u5396\u5399\u5398\u54BA\u54A1\u54AD\u54A5\u54CF"],["ce40","\u54C3\u830D\u54B7\u54AE\u54D6\u54B6\u54C5\u54C6\u54A0\u5470\u54BC\u54A2\u54BE\u5472\u54DE\u54B0\u57B5\u579E\u579F\u57A4\u578C\u5797\u579D\u579B\u5794\u5798\u578F\u5799\u57A5\u579A\u5795\u58F4\u590D\u5953\u59E1\u59DE\u59EE\u5A00\u59F1\u59DD\u59FA\u59FD\u59FC\u59F6\u59E4\u59F2\u59F7\u59DB\u59E9\u59F3\u59F5\u59E0\u59FE\u59F4\u59ED\u5BA8\u5C4C\u5CD0\u5CD8\u5CCC\u5CD7\u5CCB\u5CDB"],["cea1","\u5CDE\u5CDA\u5CC9\u5CC7\u5CCA\u5CD6\u5CD3\u5CD4\u5CCF\u5CC8\u5CC6\u5CCE\u5CDF\u5CF8\u5DF9\u5E21\u5E22\u5E23\u5E20\u5E24\u5EB0\u5EA4\u5EA2\u5E9B\u5EA3\u5EA5\u5F07\u5F2E\u5F56\u5F86\u6037\u6039\u6054\u6072\u605E\u6045\u6053\u6047\u6049\u605B\u604C\u6040\u6042\u605F\u6024\u6044\u6058\u6066\u606E\u6242\u6243\u62CF\u630D\u630B\u62F5\u630E\u6303\u62EB\u62F9\u630F\u630C\u62F8\u62F6\u6300\u6313\u6314\u62FA\u6315\u62FB\u62F0\u6541\u6543\u65AA\u65BF\u6636\u6621\u6632\u6635\u661C\u6626\u6622\u6633\u662B\u663A\u661D\u6634\u6639\u662E\u670F\u6710\u67C1\u67F2\u67C8\u67BA"],["cf40","\u67DC\u67BB\u67F8\u67D8\u67C0\u67B7\u67C5\u67EB\u67E4\u67DF\u67B5\u67CD\u67B3\u67F7\u67F6\u67EE\u67E3\u67C2\u67B9\u67CE\u67E7\u67F0\u67B2\u67FC\u67C6\u67ED\u67CC\u67AE\u67E6\u67DB\u67FA\u67C9\u67CA\u67C3\u67EA\u67CB\u6B28\u6B82\u6B84\u6BB6\u6BD6\u6BD8\u6BE0\u6C20\u6C21\u6D28\u6D34\u6D2D\u6D1F\u6D3C\u6D3F\u6D12\u6D0A\u6CDA\u6D33\u6D04\u6D19\u6D3A\u6D1A\u6D11\u6D00\u6D1D\u6D42"],["cfa1","\u6D01\u6D18\u6D37\u6D03\u6D0F\u6D40\u6D07\u6D20\u6D2C\u6D08\u6D22\u6D09\u6D10\u70B7\u709F\u70BE\u70B1\u70B0\u70A1\u70B4\u70B5\u70A9\u7241\u7249\u724A\u726C\u7270\u7273\u726E\u72CA\u72E4\u72E8\u72EB\u72DF\u72EA\u72E6\u72E3\u7385\u73CC\u73C2\u73C8\u73C5\u73B9\u73B6\u73B5\u73B4\u73EB\u73BF\u73C7\u73BE\u73C3\u73C6\u73B8\u73CB\u74EC\u74EE\u752E\u7547\u7548\u75A7\u75AA\u7679\u76C4\u7708\u7703\u7704\u7705\u770A\u76F7\u76FB\u76FA\u77E7\u77E8\u7806\u7811\u7812\u7805\u7810\u780F\u780E\u7809\u7803\u7813\u794A\u794C\u794B\u7945\u7944\u79D5\u79CD\u79CF\u79D6\u79CE\u7A80"],["d040","\u7A7E\u7AD1\u7B00\u7B01\u7C7A\u7C78\u7C79\u7C7F\u7C80\u7C81\u7D03\u7D08\u7D01\u7F58\u7F91\u7F8D\u7FBE\u8007\u800E\u800F\u8014\u8037\u80D8\u80C7\u80E0\u80D1\u80C8\u80C2\u80D0\u80C5\u80E3\u80D9\u80DC\u80CA\u80D5\u80C9\u80CF\u80D7\u80E6\u80CD\u81FF\u8221\u8294\u82D9\u82FE\u82F9\u8307\u82E8\u8300\u82D5\u833A\u82EB\u82D6\u82F4\u82EC\u82E1\u82F2\u82F5\u830C\u82FB\u82F6\u82F0\u82EA"],["d0a1","\u82E4\u82E0\u82FA\u82F3\u82ED\u8677\u8674\u867C\u8673\u8841\u884E\u8867\u886A\u8869\u89D3\u8A04\u8A07\u8D72\u8FE3\u8FE1\u8FEE\u8FE0\u90F1\u90BD\u90BF\u90D5\u90C5\u90BE\u90C7\u90CB\u90C8\u91D4\u91D3\u9654\u964F\u9651\u9653\u964A\u964E\u501E\u5005\u5007\u5013\u5022\u5030\u501B\u4FF5\u4FF4\u5033\u5037\u502C\u4FF6\u4FF7\u5017\u501C\u5020\u5027\u5035\u502F\u5031\u500E\u515A\u5194\u5193\u51CA\u51C4\u51C5\u51C8\u51CE\u5261\u525A\u5252\u525E\u525F\u5255\u5262\u52CD\u530E\u539E\u5526\u54E2\u5517\u5512\u54E7\u54F3\u54E4\u551A\u54FF\u5504\u5508\u54EB\u5511\u5505\u54F1"],["d140","\u550A\u54FB\u54F7\u54F8\u54E0\u550E\u5503\u550B\u5701\u5702\u57CC\u5832\u57D5\u57D2\u57BA\u57C6\u57BD\u57BC\u57B8\u57B6\u57BF\u57C7\u57D0\u57B9\u57C1\u590E\u594A\u5A19\u5A16\u5A2D\u5A2E\u5A15\u5A0F\u5A17\u5A0A\u5A1E\u5A33\u5B6C\u5BA7\u5BAD\u5BAC\u5C03\u5C56\u5C54\u5CEC\u5CFF\u5CEE\u5CF1\u5CF7\u5D00\u5CF9\u5E29\u5E28\u5EA8\u5EAE\u5EAA\u5EAC\u5F33\u5F30\u5F67\u605D\u605A\u6067"],["d1a1","\u6041\u60A2\u6088\u6080\u6092\u6081\u609D\u6083\u6095\u609B\u6097\u6087\u609C\u608E\u6219\u6246\u62F2\u6310\u6356\u632C\u6344\u6345\u6336\u6343\u63E4\u6339\u634B\u634A\u633C\u6329\u6341\u6334\u6358\u6354\u6359\u632D\u6347\u6333\u635A\u6351\u6338\u6357\u6340\u6348\u654A\u6546\u65C6\u65C3\u65C4\u65C2\u664A\u665F\u6647\u6651\u6712\u6713\u681F\u681A\u6849\u6832\u6833\u683B\u684B\u684F\u6816\u6831\u681C\u6835\u682B\u682D\u682F\u684E\u6844\u6834\u681D\u6812\u6814\u6826\u6828\u682E\u684D\u683A\u6825\u6820\u6B2C\u6B2F\u6B2D\u6B31\u6B34\u6B6D\u8082\u6B88\u6BE6\u6BE4"],["d240","\u6BE8\u6BE3\u6BE2\u6BE7\u6C25\u6D7A\u6D63\u6D64\u6D76\u6D0D\u6D61\u6D92\u6D58\u6D62\u6D6D\u6D6F\u6D91\u6D8D\u6DEF\u6D7F\u6D86\u6D5E\u6D67\u6D60\u6D97\u6D70\u6D7C\u6D5F\u6D82\u6D98\u6D2F\u6D68\u6D8B\u6D7E\u6D80\u6D84\u6D16\u6D83\u6D7B\u6D7D\u6D75\u6D90\u70DC\u70D3\u70D1\u70DD\u70CB\u7F39\u70E2\u70D7\u70D2\u70DE\u70E0\u70D4\u70CD\u70C5\u70C6\u70C7\u70DA\u70CE\u70E1\u7242\u7278"],["d2a1","\u7277\u7276\u7300\u72FA\u72F4\u72FE\u72F6\u72F3\u72FB\u7301\u73D3\u73D9\u73E5\u73D6\u73BC\u73E7\u73E3\u73E9\u73DC\u73D2\u73DB\u73D4\u73DD\u73DA\u73D7\u73D8\u73E8\u74DE\u74DF\u74F4\u74F5\u7521\u755B\u755F\u75B0\u75C1\u75BB\u75C4\u75C0\u75BF\u75B6\u75BA\u768A\u76C9\u771D\u771B\u7710\u7713\u7712\u7723\u7711\u7715\u7719\u771A\u7722\u7727\u7823\u782C\u7822\u7835\u782F\u7828\u782E\u782B\u7821\u7829\u7833\u782A\u7831\u7954\u795B\u794F\u795C\u7953\u7952\u7951\u79EB\u79EC\u79E0\u79EE\u79ED\u79EA\u79DC\u79DE\u79DD\u7A86\u7A89\u7A85\u7A8B\u7A8C\u7A8A\u7A87\u7AD8\u7B10"],["d340","\u7B04\u7B13\u7B05\u7B0F\u7B08\u7B0A\u7B0E\u7B09\u7B12\u7C84\u7C91\u7C8A\u7C8C\u7C88\u7C8D\u7C85\u7D1E\u7D1D\u7D11\u7D0E\u7D18\u7D16\u7D13\u7D1F\u7D12\u7D0F\u7D0C\u7F5C\u7F61\u7F5E\u7F60\u7F5D\u7F5B\u7F96\u7F92\u7FC3\u7FC2\u7FC0\u8016\u803E\u8039\u80FA\u80F2\u80F9\u80F5\u8101\u80FB\u8100\u8201\u822F\u8225\u8333\u832D\u8344\u8319\u8351\u8325\u8356\u833F\u8341\u8326\u831C\u8322"],["d3a1","\u8342\u834E\u831B\u832A\u8308\u833C\u834D\u8316\u8324\u8320\u8337\u832F\u8329\u8347\u8345\u834C\u8353\u831E\u832C\u834B\u8327\u8348\u8653\u8652\u86A2\u86A8\u8696\u868D\u8691\u869E\u8687\u8697\u8686\u868B\u869A\u8685\u86A5\u8699\u86A1\u86A7\u8695\u8698\u868E\u869D\u8690\u8694\u8843\u8844\u886D\u8875\u8876\u8872\u8880\u8871\u887F\u886F\u8883\u887E\u8874\u887C\u8A12\u8C47\u8C57\u8C7B\u8CA4\u8CA3\u8D76\u8D78\u8DB5\u8DB7\u8DB6\u8ED1\u8ED3\u8FFE\u8FF5\u9002\u8FFF\u8FFB\u9004\u8FFC\u8FF6\u90D6\u90E0\u90D9\u90DA\u90E3\u90DF\u90E5\u90D8\u90DB\u90D7\u90DC\u90E4\u9150"],["d440","\u914E\u914F\u91D5\u91E2\u91DA\u965C\u965F\u96BC\u98E3\u9ADF\u9B2F\u4E7F\u5070\u506A\u5061\u505E\u5060\u5053\u504B\u505D\u5072\u5048\u504D\u5041\u505B\u504A\u5062\u5015\u5045\u505F\u5069\u506B\u5063\u5064\u5046\u5040\u506E\u5073\u5057\u5051\u51D0\u526B\u526D\u526C\u526E\u52D6\u52D3\u532D\u539C\u5575\u5576\u553C\u554D\u5550\u5534\u552A\u5551\u5562\u5536\u5535\u5530\u5552\u5545"],["d4a1","\u550C\u5532\u5565\u554E\u5539\u5548\u552D\u553B\u5540\u554B\u570A\u5707\u57FB\u5814\u57E2\u57F6\u57DC\u57F4\u5800\u57ED\u57FD\u5808\u57F8\u580B\u57F3\u57CF\u5807\u57EE\u57E3\u57F2\u57E5\u57EC\u57E1\u580E\u57FC\u5810\u57E7\u5801\u580C\u57F1\u57E9\u57F0\u580D\u5804\u595C\u5A60\u5A58\u5A55\u5A67\u5A5E\u5A38\u5A35\u5A6D\u5A50\u5A5F\u5A65\u5A6C\u5A53\u5A64\u5A57\u5A43\u5A5D\u5A52\u5A44\u5A5B\u5A48\u5A8E\u5A3E\u5A4D\u5A39\u5A4C\u5A70\u5A69\u5A47\u5A51\u5A56\u5A42\u5A5C\u5B72\u5B6E\u5BC1\u5BC0\u5C59\u5D1E\u5D0B\u5D1D\u5D1A\u5D20\u5D0C\u5D28\u5D0D\u5D26\u5D25\u5D0F"],["d540","\u5D30\u5D12\u5D23\u5D1F\u5D2E\u5E3E\u5E34\u5EB1\u5EB4\u5EB9\u5EB2\u5EB3\u5F36\u5F38\u5F9B\u5F96\u5F9F\u608A\u6090\u6086\u60BE\u60B0\u60BA\u60D3\u60D4\u60CF\u60E4\u60D9\u60DD\u60C8\u60B1\u60DB\u60B7\u60CA\u60BF\u60C3\u60CD\u60C0\u6332\u6365\u638A\u6382\u637D\u63BD\u639E\u63AD\u639D\u6397\u63AB\u638E\u636F\u6387\u6390\u636E\u63AF\u6375\u639C\u636D\u63AE\u637C\u63A4\u633B\u639F"],["d5a1","\u6378\u6385\u6381\u6391\u638D\u6370\u6553\u65CD\u6665\u6661\u665B\u6659\u665C\u6662\u6718\u6879\u6887\u6890\u689C\u686D\u686E\u68AE\u68AB\u6956\u686F\u68A3\u68AC\u68A9\u6875\u6874\u68B2\u688F\u6877\u6892\u687C\u686B\u6872\u68AA\u6880\u6871\u687E\u689B\u6896\u688B\u68A0\u6889\u68A4\u6878\u687B\u6891\u688C\u688A\u687D\u6B36\u6B33\u6B37\u6B38\u6B91\u6B8F\u6B8D\u6B8E\u6B8C\u6C2A\u6DC0\u6DAB\u6DB4\u6DB3\u6E74\u6DAC\u6DE9\u6DE2\u6DB7\u6DF6\u6DD4\u6E00\u6DC8\u6DE0\u6DDF\u6DD6\u6DBE\u6DE5\u6DDC\u6DDD\u6DDB\u6DF4\u6DCA\u6DBD\u6DED\u6DF0\u6DBA\u6DD5\u6DC2\u6DCF\u6DC9"],["d640","\u6DD0\u6DF2\u6DD3\u6DFD\u6DD7\u6DCD\u6DE3\u6DBB\u70FA\u710D\u70F7\u7117\u70F4\u710C\u70F0\u7104\u70F3\u7110\u70FC\u70FF\u7106\u7113\u7100\u70F8\u70F6\u710B\u7102\u710E\u727E\u727B\u727C\u727F\u731D\u7317\u7307\u7311\u7318\u730A\u7308\u72FF\u730F\u731E\u7388\u73F6\u73F8\u73F5\u7404\u7401\u73FD\u7407\u7400\u73FA\u73FC\u73FF\u740C\u740B\u73F4\u7408\u7564\u7563\u75CE\u75D2\u75CF"],["d6a1","\u75CB\u75CC\u75D1\u75D0\u768F\u7689\u76D3\u7739\u772F\u772D\u7731\u7732\u7734\u7733\u773D\u7725\u773B\u7735\u7848\u7852\u7849\u784D\u784A\u784C\u7826\u7845\u7850\u7964\u7967\u7969\u796A\u7963\u796B\u7961\u79BB\u79FA\u79F8\u79F6\u79F7\u7A8F\u7A94\u7A90\u7B35\u7B47\u7B34\u7B25\u7B30\u7B22\u7B24\u7B33\u7B18\u7B2A\u7B1D\u7B31\u7B2B\u7B2D\u7B2F\u7B32\u7B38\u7B1A\u7B23\u7C94\u7C98\u7C96\u7CA3\u7D35\u7D3D\u7D38\u7D36\u7D3A\u7D45\u7D2C\u7D29\u7D41\u7D47\u7D3E\u7D3F\u7D4A\u7D3B\u7D28\u7F63\u7F95\u7F9C\u7F9D\u7F9B\u7FCA\u7FCB\u7FCD\u7FD0\u7FD1\u7FC7\u7FCF\u7FC9\u801F"],["d740","\u801E\u801B\u8047\u8043\u8048\u8118\u8125\u8119\u811B\u812D\u811F\u812C\u811E\u8121\u8115\u8127\u811D\u8122\u8211\u8238\u8233\u823A\u8234\u8232\u8274\u8390\u83A3\u83A8\u838D\u837A\u8373\u83A4\u8374\u838F\u8381\u8395\u8399\u8375\u8394\u83A9\u837D\u8383\u838C\u839D\u839B\u83AA\u838B\u837E\u83A5\u83AF\u8388\u8397\u83B0\u837F\u83A6\u8387\u83AE\u8376\u839A\u8659\u8656\u86BF\u86B7"],["d7a1","\u86C2\u86C1\u86C5\u86BA\u86B0\u86C8\u86B9\u86B3\u86B8\u86CC\u86B4\u86BB\u86BC\u86C3\u86BD\u86BE\u8852\u8889\u8895\u88A8\u88A2\u88AA\u889A\u8891\u88A1\u889F\u8898\u88A7\u8899\u889B\u8897\u88A4\u88AC\u888C\u8893\u888E\u8982\u89D6\u89D9\u89D5\u8A30\u8A27\u8A2C\u8A1E\u8C39\u8C3B\u8C5C\u8C5D\u8C7D\u8CA5\u8D7D\u8D7B\u8D79\u8DBC\u8DC2\u8DB9\u8DBF\u8DC1\u8ED8\u8EDE\u8EDD\u8EDC\u8ED7\u8EE0\u8EE1\u9024\u900B\u9011\u901C\u900C\u9021\u90EF\u90EA\u90F0\u90F4\u90F2\u90F3\u90D4\u90EB\u90EC\u90E9\u9156\u9158\u915A\u9153\u9155\u91EC\u91F4\u91F1\u91F3\u91F8\u91E4\u91F9\u91EA"],["d840","\u91EB\u91F7\u91E8\u91EE\u957A\u9586\u9588\u967C\u966D\u966B\u9671\u966F\u96BF\u976A\u9804\u98E5\u9997\u509B\u5095\u5094\u509E\u508B\u50A3\u5083\u508C\u508E\u509D\u5068\u509C\u5092\u5082\u5087\u515F\u51D4\u5312\u5311\u53A4\u53A7\u5591\u55A8\u55A5\u55AD\u5577\u5645\u55A2\u5593\u5588\u558F\u55B5\u5581\u55A3\u5592\u55A4\u557D\u558C\u55A6\u557F\u5595\u55A1\u558E\u570C\u5829\u5837"],["d8a1","\u5819\u581E\u5827\u5823\u5828\u57F5\u5848\u5825\u581C\u581B\u5833\u583F\u5836\u582E\u5839\u5838\u582D\u582C\u583B\u5961\u5AAF\u5A94\u5A9F\u5A7A\u5AA2\u5A9E\u5A78\u5AA6\u5A7C\u5AA5\u5AAC\u5A95\u5AAE\u5A37\u5A84\u5A8A\u5A97\u5A83\u5A8B\u5AA9\u5A7B\u5A7D\u5A8C\u5A9C\u5A8F\u5A93\u5A9D\u5BEA\u5BCD\u5BCB\u5BD4\u5BD1\u5BCA\u5BCE\u5C0C\u5C30\u5D37\u5D43\u5D6B\u5D41\u5D4B\u5D3F\u5D35\u5D51\u5D4E\u5D55\u5D33\u5D3A\u5D52\u5D3D\u5D31\u5D59\u5D42\u5D39\u5D49\u5D38\u5D3C\u5D32\u5D36\u5D40\u5D45\u5E44\u5E41\u5F58\u5FA6\u5FA5\u5FAB\u60C9\u60B9\u60CC\u60E2\u60CE\u60C4\u6114"],["d940","\u60F2\u610A\u6116\u6105\u60F5\u6113\u60F8\u60FC\u60FE\u60C1\u6103\u6118\u611D\u6110\u60FF\u6104\u610B\u624A\u6394\u63B1\u63B0\u63CE\u63E5\u63E8\u63EF\u63C3\u649D\u63F3\u63CA\u63E0\u63F6\u63D5\u63F2\u63F5\u6461\u63DF\u63BE\u63DD\u63DC\u63C4\u63D8\u63D3\u63C2\u63C7\u63CC\u63CB\u63C8\u63F0\u63D7\u63D9\u6532\u6567\u656A\u6564\u655C\u6568\u6565\u658C\u659D\u659E\u65AE\u65D0\u65D2"],["d9a1","\u667C\u666C\u667B\u6680\u6671\u6679\u666A\u6672\u6701\u690C\u68D3\u6904\u68DC\u692A\u68EC\u68EA\u68F1\u690F\u68D6\u68F7\u68EB\u68E4\u68F6\u6913\u6910\u68F3\u68E1\u6907\u68CC\u6908\u6970\u68B4\u6911\u68EF\u68C6\u6914\u68F8\u68D0\u68FD\u68FC\u68E8\u690B\u690A\u6917\u68CE\u68C8\u68DD\u68DE\u68E6\u68F4\u68D1\u6906\u68D4\u68E9\u6915\u6925\u68C7\u6B39\u6B3B\u6B3F\u6B3C\u6B94\u6B97\u6B99\u6B95\u6BBD\u6BF0\u6BF2\u6BF3\u6C30\u6DFC\u6E46\u6E47\u6E1F\u6E49\u6E88\u6E3C\u6E3D\u6E45\u6E62\u6E2B\u6E3F\u6E41\u6E5D\u6E73\u6E1C\u6E33\u6E4B\u6E40\u6E51\u6E3B\u6E03\u6E2E\u6E5E"],["da40","\u6E68\u6E5C\u6E61\u6E31\u6E28\u6E60\u6E71\u6E6B\u6E39\u6E22\u6E30\u6E53\u6E65\u6E27\u6E78\u6E64\u6E77\u6E55\u6E79\u6E52\u6E66\u6E35\u6E36\u6E5A\u7120\u711E\u712F\u70FB\u712E\u7131\u7123\u7125\u7122\u7132\u711F\u7128\u713A\u711B\u724B\u725A\u7288\u7289\u7286\u7285\u728B\u7312\u730B\u7330\u7322\u7331\u7333\u7327\u7332\u732D\u7326\u7323\u7335\u730C\u742E\u742C\u7430\u742B\u7416"],["daa1","\u741A\u7421\u742D\u7431\u7424\u7423\u741D\u7429\u7420\u7432\u74FB\u752F\u756F\u756C\u75E7\u75DA\u75E1\u75E6\u75DD\u75DF\u75E4\u75D7\u7695\u7692\u76DA\u7746\u7747\u7744\u774D\u7745\u774A\u774E\u774B\u774C\u77DE\u77EC\u7860\u7864\u7865\u785C\u786D\u7871\u786A\u786E\u7870\u7869\u7868\u785E\u7862\u7974\u7973\u7972\u7970\u7A02\u7A0A\u7A03\u7A0C\u7A04\u7A99\u7AE6\u7AE4\u7B4A\u7B3B\u7B44\u7B48\u7B4C\u7B4E\u7B40\u7B58\u7B45\u7CA2\u7C9E\u7CA8\u7CA1\u7D58\u7D6F\u7D63\u7D53\u7D56\u7D67\u7D6A\u7D4F\u7D6D\u7D5C\u7D6B\u7D52\u7D54\u7D69\u7D51\u7D5F\u7D4E\u7F3E\u7F3F\u7F65"],["db40","\u7F66\u7FA2\u7FA0\u7FA1\u7FD7\u8051\u804F\u8050\u80FE\u80D4\u8143\u814A\u8152\u814F\u8147\u813D\u814D\u813A\u81E6\u81EE\u81F7\u81F8\u81F9\u8204\u823C\u823D\u823F\u8275\u833B\u83CF\u83F9\u8423\u83C0\u83E8\u8412\u83E7\u83E4\u83FC\u83F6\u8410\u83C6\u83C8\u83EB\u83E3\u83BF\u8401\u83DD\u83E5\u83D8\u83FF\u83E1\u83CB\u83CE\u83D6\u83F5\u83C9\u8409\u840F\u83DE\u8411\u8406\u83C2\u83F3"],["dba1","\u83D5\u83FA\u83C7\u83D1\u83EA\u8413\u83C3\u83EC\u83EE\u83C4\u83FB\u83D7\u83E2\u841B\u83DB\u83FE\u86D8\u86E2\u86E6\u86D3\u86E3\u86DA\u86EA\u86DD\u86EB\u86DC\u86EC\u86E9\u86D7\u86E8\u86D1\u8848\u8856\u8855\u88BA\u88D7\u88B9\u88B8\u88C0\u88BE\u88B6\u88BC\u88B7\u88BD\u88B2\u8901\u88C9\u8995\u8998\u8997\u89DD\u89DA\u89DB\u8A4E\u8A4D\u8A39\u8A59\u8A40\u8A57\u8A58\u8A44\u8A45\u8A52\u8A48\u8A51\u8A4A\u8A4C\u8A4F\u8C5F\u8C81\u8C80\u8CBA\u8CBE\u8CB0\u8CB9\u8CB5\u8D84\u8D80\u8D89\u8DD8\u8DD3\u8DCD\u8DC7\u8DD6\u8DDC\u8DCF\u8DD5\u8DD9\u8DC8\u8DD7\u8DC5\u8EEF\u8EF7\u8EFA"],["dc40","\u8EF9\u8EE6\u8EEE\u8EE5\u8EF5\u8EE7\u8EE8\u8EF6\u8EEB\u8EF1\u8EEC\u8EF4\u8EE9\u902D\u9034\u902F\u9106\u912C\u9104\u90FF\u90FC\u9108\u90F9\u90FB\u9101\u9100\u9107\u9105\u9103\u9161\u9164\u915F\u9162\u9160\u9201\u920A\u9225\u9203\u921A\u9226\u920F\u920C\u9200\u9212\u91FF\u91FD\u9206\u9204\u9227\u9202\u921C\u9224\u9219\u9217\u9205\u9216\u957B\u958D\u958C\u9590\u9687\u967E\u9688"],["dca1","\u9689\u9683\u9680\u96C2\u96C8\u96C3\u96F1\u96F0\u976C\u9770\u976E\u9807\u98A9\u98EB\u9CE6\u9EF9\u4E83\u4E84\u4EB6\u50BD\u50BF\u50C6\u50AE\u50C4\u50CA\u50B4\u50C8\u50C2\u50B0\u50C1\u50BA\u50B1\u50CB\u50C9\u50B6\u50B8\u51D7\u527A\u5278\u527B\u527C\u55C3\u55DB\u55CC\u55D0\u55CB\u55CA\u55DD\u55C0\u55D4\u55C4\u55E9\u55BF\u55D2\u558D\u55CF\u55D5\u55E2\u55D6\u55C8\u55F2\u55CD\u55D9\u55C2\u5714\u5853\u5868\u5864\u584F\u584D\u5849\u586F\u5855\u584E\u585D\u5859\u5865\u585B\u583D\u5863\u5871\u58FC\u5AC7\u5AC4\u5ACB\u5ABA\u5AB8\u5AB1\u5AB5\u5AB0\u5ABF\u5AC8\u5ABB\u5AC6"],["dd40","\u5AB7\u5AC0\u5ACA\u5AB4\u5AB6\u5ACD\u5AB9\u5A90\u5BD6\u5BD8\u5BD9\u5C1F\u5C33\u5D71\u5D63\u5D4A\u5D65\u5D72\u5D6C\u5D5E\u5D68\u5D67\u5D62\u5DF0\u5E4F\u5E4E\u5E4A\u5E4D\u5E4B\u5EC5\u5ECC\u5EC6\u5ECB\u5EC7\u5F40\u5FAF\u5FAD\u60F7\u6149\u614A\u612B\u6145\u6136\u6132\u612E\u6146\u612F\u614F\u6129\u6140\u6220\u9168\u6223\u6225\u6224\u63C5\u63F1\u63EB\u6410\u6412\u6409\u6420\u6424"],["dda1","\u6433\u6443\u641F\u6415\u6418\u6439\u6437\u6422\u6423\u640C\u6426\u6430\u6428\u6441\u6435\u642F\u640A\u641A\u6440\u6425\u6427\u640B\u63E7\u641B\u642E\u6421\u640E\u656F\u6592\u65D3\u6686\u668C\u6695\u6690\u668B\u668A\u6699\u6694\u6678\u6720\u6966\u695F\u6938\u694E\u6962\u6971\u693F\u6945\u696A\u6939\u6942\u6957\u6959\u697A\u6948\u6949\u6935\u696C\u6933\u693D\u6965\u68F0\u6978\u6934\u6969\u6940\u696F\u6944\u6976\u6958\u6941\u6974\u694C\u693B\u694B\u6937\u695C\u694F\u6951\u6932\u6952\u692F\u697B\u693C\u6B46\u6B45\u6B43\u6B42\u6B48\u6B41\u6B9B\uFA0D\u6BFB\u6BFC"],["de40","\u6BF9\u6BF7\u6BF8\u6E9B\u6ED6\u6EC8\u6E8F\u6EC0\u6E9F\u6E93\u6E94\u6EA0\u6EB1\u6EB9\u6EC6\u6ED2\u6EBD\u6EC1\u6E9E\u6EC9\u6EB7\u6EB0\u6ECD\u6EA6\u6ECF\u6EB2\u6EBE\u6EC3\u6EDC\u6ED8\u6E99\u6E92\u6E8E\u6E8D\u6EA4\u6EA1\u6EBF\u6EB3\u6ED0\u6ECA\u6E97\u6EAE\u6EA3\u7147\u7154\u7152\u7163\u7160\u7141\u715D\u7162\u7172\u7178\u716A\u7161\u7142\u7158\u7143\u714B\u7170\u715F\u7150\u7153"],["dea1","\u7144\u714D\u715A\u724F\u728D\u728C\u7291\u7290\u728E\u733C\u7342\u733B\u733A\u7340\u734A\u7349\u7444\u744A\u744B\u7452\u7451\u7457\u7440\u744F\u7450\u744E\u7442\u7446\u744D\u7454\u74E1\u74FF\u74FE\u74FD\u751D\u7579\u7577\u6983\u75EF\u760F\u7603\u75F7\u75FE\u75FC\u75F9\u75F8\u7610\u75FB\u75F6\u75ED\u75F5\u75FD\u7699\u76B5\u76DD\u7755\u775F\u7760\u7752\u7756\u775A\u7769\u7767\u7754\u7759\u776D\u77E0\u7887\u789A\u7894\u788F\u7884\u7895\u7885\u7886\u78A1\u7883\u7879\u7899\u7880\u7896\u787B\u797C\u7982\u797D\u7979\u7A11\u7A18\u7A19\u7A12\u7A17\u7A15\u7A22\u7A13"],["df40","\u7A1B\u7A10\u7AA3\u7AA2\u7A9E\u7AEB\u7B66\u7B64\u7B6D\u7B74\u7B69\u7B72\u7B65\u7B73\u7B71\u7B70\u7B61\u7B78\u7B76\u7B63\u7CB2\u7CB4\u7CAF\u7D88\u7D86\u7D80\u7D8D\u7D7F\u7D85\u7D7A\u7D8E\u7D7B\u7D83\u7D7C\u7D8C\u7D94\u7D84\u7D7D\u7D92\u7F6D\u7F6B\u7F67\u7F68\u7F6C\u7FA6\u7FA5\u7FA7\u7FDB\u7FDC\u8021\u8164\u8160\u8177\u815C\u8169\u815B\u8162\u8172\u6721\u815E\u8176\u8167\u816F"],["dfa1","\u8144\u8161\u821D\u8249\u8244\u8240\u8242\u8245\u84F1\u843F\u8456\u8476\u8479\u848F\u848D\u8465\u8451\u8440\u8486\u8467\u8430\u844D\u847D\u845A\u8459\u8474\u8473\u845D\u8507\u845E\u8437\u843A\u8434\u847A\u8443\u8478\u8432\u8445\u8429\u83D9\u844B\u842F\u8442\u842D\u845F\u8470\u8439\u844E\u844C\u8452\u846F\u84C5\u848E\u843B\u8447\u8436\u8433\u8468\u847E\u8444\u842B\u8460\u8454\u846E\u8450\u870B\u8704\u86F7\u870C\u86FA\u86D6\u86F5\u874D\u86F8\u870E\u8709\u8701\u86F6\u870D\u8705\u88D6\u88CB\u88CD\u88CE\u88DE\u88DB\u88DA\u88CC\u88D0\u8985\u899B\u89DF\u89E5\u89E4"],["e040","\u89E1\u89E0\u89E2\u89DC\u89E6\u8A76\u8A86\u8A7F\u8A61\u8A3F\u8A77\u8A82\u8A84\u8A75\u8A83\u8A81\u8A74\u8A7A\u8C3C\u8C4B\u8C4A\u8C65\u8C64\u8C66\u8C86\u8C84\u8C85\u8CCC\u8D68\u8D69\u8D91\u8D8C\u8D8E\u8D8F\u8D8D\u8D93\u8D94\u8D90\u8D92\u8DF0\u8DE0\u8DEC\u8DF1\u8DEE\u8DD0\u8DE9\u8DE3\u8DE2\u8DE7\u8DF2\u8DEB\u8DF4\u8F06\u8EFF\u8F01\u8F00\u8F05\u8F07\u8F08\u8F02\u8F0B\u9052\u903F"],["e0a1","\u9044\u9049\u903D\u9110\u910D\u910F\u9111\u9116\u9114\u910B\u910E\u916E\u916F\u9248\u9252\u9230\u923A\u9266\u9233\u9265\u925E\u9283\u922E\u924A\u9246\u926D\u926C\u924F\u9260\u9267\u926F\u9236\u9261\u9270\u9231\u9254\u9263\u9250\u9272\u924E\u9253\u924C\u9256\u9232\u959F\u959C\u959E\u959B\u9692\u9693\u9691\u9697\u96CE\u96FA\u96FD\u96F8\u96F5\u9773\u9777\u9778\u9772\u980F\u980D\u980E\u98AC\u98F6\u98F9\u99AF\u99B2\u99B0\u99B5\u9AAD\u9AAB\u9B5B\u9CEA\u9CED\u9CE7\u9E80\u9EFD\u50E6\u50D4\u50D7\u50E8\u50F3\u50DB\u50EA\u50DD\u50E4\u50D3\u50EC\u50F0\u50EF\u50E3\u50E0"],["e140","\u51D8\u5280\u5281\u52E9\u52EB\u5330\u53AC\u5627\u5615\u560C\u5612\u55FC\u560F\u561C\u5601\u5613\u5602\u55FA\u561D\u5604\u55FF\u55F9\u5889\u587C\u5890\u5898\u5886\u5881\u587F\u5874\u588B\u587A\u5887\u5891\u588E\u5876\u5882\u5888\u587B\u5894\u588F\u58FE\u596B\u5ADC\u5AEE\u5AE5\u5AD5\u5AEA\u5ADA\u5AED\u5AEB\u5AF3\u5AE2\u5AE0\u5ADB\u5AEC\u5ADE\u5ADD\u5AD9\u5AE8\u5ADF\u5B77\u5BE0"],["e1a1","\u5BE3\u5C63\u5D82\u5D80\u5D7D\u5D86\u5D7A\u5D81\u5D77\u5D8A\u5D89\u5D88\u5D7E\u5D7C\u5D8D\u5D79\u5D7F\u5E58\u5E59\u5E53\u5ED8\u5ED1\u5ED7\u5ECE\u5EDC\u5ED5\u5ED9\u5ED2\u5ED4\u5F44\u5F43\u5F6F\u5FB6\u612C\u6128\u6141\u615E\u6171\u6173\u6152\u6153\u6172\u616C\u6180\u6174\u6154\u617A\u615B\u6165\u613B\u616A\u6161\u6156\u6229\u6227\u622B\u642B\u644D\u645B\u645D\u6474\u6476\u6472\u6473\u647D\u6475\u6466\u64A6\u644E\u6482\u645E\u645C\u644B\u6453\u6460\u6450\u647F\u643F\u646C\u646B\u6459\u6465\u6477\u6573\u65A0\u66A1\u66A0\u669F\u6705\u6704\u6722\u69B1\u69B6\u69C9"],["e240","\u69A0\u69CE\u6996\u69B0\u69AC\u69BC\u6991\u6999\u698E\u69A7\u698D\u69A9\u69BE\u69AF\u69BF\u69C4\u69BD\u69A4\u69D4\u69B9\u69CA\u699A\u69CF\u69B3\u6993\u69AA\u69A1\u699E\u69D9\u6997\u6990\u69C2\u69B5\u69A5\u69C6\u6B4A\u6B4D\u6B4B\u6B9E\u6B9F\u6BA0\u6BC3\u6BC4\u6BFE\u6ECE\u6EF5\u6EF1\u6F03\u6F25\u6EF8\u6F37\u6EFB\u6F2E\u6F09\u6F4E\u6F19\u6F1A\u6F27\u6F18\u6F3B\u6F12\u6EED\u6F0A"],["e2a1","\u6F36\u6F73\u6EF9\u6EEE\u6F2D\u6F40\u6F30\u6F3C\u6F35\u6EEB\u6F07\u6F0E\u6F43\u6F05\u6EFD\u6EF6\u6F39\u6F1C\u6EFC\u6F3A\u6F1F\u6F0D\u6F1E\u6F08\u6F21\u7187\u7190\u7189\u7180\u7185\u7182\u718F\u717B\u7186\u7181\u7197\u7244\u7253\u7297\u7295\u7293\u7343\u734D\u7351\u734C\u7462\u7473\u7471\u7475\u7472\u7467\u746E\u7500\u7502\u7503\u757D\u7590\u7616\u7608\u760C\u7615\u7611\u760A\u7614\u76B8\u7781\u777C\u7785\u7782\u776E\u7780\u776F\u777E\u7783\u78B2\u78AA\u78B4\u78AD\u78A8\u787E\u78AB\u789E\u78A5\u78A0\u78AC\u78A2\u78A4\u7998\u798A\u798B\u7996\u7995\u7994\u7993"],["e340","\u7997\u7988\u7992\u7990\u7A2B\u7A4A\u7A30\u7A2F\u7A28\u7A26\u7AA8\u7AAB\u7AAC\u7AEE\u7B88\u7B9C\u7B8A\u7B91\u7B90\u7B96\u7B8D\u7B8C\u7B9B\u7B8E\u7B85\u7B98\u5284\u7B99\u7BA4\u7B82\u7CBB\u7CBF\u7CBC\u7CBA\u7DA7\u7DB7\u7DC2\u7DA3\u7DAA\u7DC1\u7DC0\u7DC5\u7D9D\u7DCE\u7DC4\u7DC6\u7DCB\u7DCC\u7DAF\u7DB9\u7D96\u7DBC\u7D9F\u7DA6\u7DAE\u7DA9\u7DA1\u7DC9\u7F73\u7FE2\u7FE3\u7FE5\u7FDE"],["e3a1","\u8024\u805D\u805C\u8189\u8186\u8183\u8187\u818D\u818C\u818B\u8215\u8497\u84A4\u84A1\u849F\u84BA\u84CE\u84C2\u84AC\u84AE\u84AB\u84B9\u84B4\u84C1\u84CD\u84AA\u849A\u84B1\u84D0\u849D\u84A7\u84BB\u84A2\u8494\u84C7\u84CC\u849B\u84A9\u84AF\u84A8\u84D6\u8498\u84B6\u84CF\u84A0\u84D7\u84D4\u84D2\u84DB\u84B0\u8491\u8661\u8733\u8723\u8728\u876B\u8740\u872E\u871E\u8721\u8719\u871B\u8743\u872C\u8741\u873E\u8746\u8720\u8732\u872A\u872D\u873C\u8712\u873A\u8731\u8735\u8742\u8726\u8727\u8738\u8724\u871A\u8730\u8711\u88F7\u88E7\u88F1\u88F2\u88FA\u88FE\u88EE\u88FC\u88F6\u88FB"],["e440","\u88F0\u88EC\u88EB\u899D\u89A1\u899F\u899E\u89E9\u89EB\u89E8\u8AAB\u8A99\u8A8B\u8A92\u8A8F\u8A96\u8C3D\u8C68\u8C69\u8CD5\u8CCF\u8CD7\u8D96\u8E09\u8E02\u8DFF\u8E0D\u8DFD\u8E0A\u8E03\u8E07\u8E06\u8E05\u8DFE\u8E00\u8E04\u8F10\u8F11\u8F0E\u8F0D\u9123\u911C\u9120\u9122\u911F\u911D\u911A\u9124\u9121\u911B\u917A\u9172\u9179\u9173\u92A5\u92A4\u9276\u929B\u927A\u92A0\u9294\u92AA\u928D"],["e4a1","\u92A6\u929A\u92AB\u9279\u9297\u927F\u92A3\u92EE\u928E\u9282\u9295\u92A2\u927D\u9288\u92A1\u928A\u9286\u928C\u9299\u92A7\u927E\u9287\u92A9\u929D\u928B\u922D\u969E\u96A1\u96FF\u9758\u977D\u977A\u977E\u9783\u9780\u9782\u977B\u9784\u9781\u977F\u97CE\u97CD\u9816\u98AD\u98AE\u9902\u9900\u9907\u999D\u999C\u99C3\u99B9\u99BB\u99BA\u99C2\u99BD\u99C7\u9AB1\u9AE3\u9AE7\u9B3E\u9B3F\u9B60\u9B61\u9B5F\u9CF1\u9CF2\u9CF5\u9EA7\u50FF\u5103\u5130\u50F8\u5106\u5107\u50F6\u50FE\u510B\u510C\u50FD\u510A\u528B\u528C\u52F1\u52EF\u5648\u5642\u564C\u5635\u5641\u564A\u5649\u5646\u5658"],["e540","\u565A\u5640\u5633\u563D\u562C\u563E\u5638\u562A\u563A\u571A\u58AB\u589D\u58B1\u58A0\u58A3\u58AF\u58AC\u58A5\u58A1\u58FF\u5AFF\u5AF4\u5AFD\u5AF7\u5AF6\u5B03\u5AF8\u5B02\u5AF9\u5B01\u5B07\u5B05\u5B0F\u5C67\u5D99\u5D97\u5D9F\u5D92\u5DA2\u5D93\u5D95\u5DA0\u5D9C\u5DA1\u5D9A\u5D9E\u5E69\u5E5D\u5E60\u5E5C\u7DF3\u5EDB\u5EDE\u5EE1\u5F49\u5FB2\u618B\u6183\u6179\u61B1\u61B0\u61A2\u6189"],["e5a1","\u619B\u6193\u61AF\u61AD\u619F\u6192\u61AA\u61A1\u618D\u6166\u61B3\u622D\u646E\u6470\u6496\u64A0\u6485\u6497\u649C\u648F\u648B\u648A\u648C\u64A3\u649F\u6468\u64B1\u6498\u6576\u657A\u6579\u657B\u65B2\u65B3\u66B5\u66B0\u66A9\u66B2\u66B7\u66AA\u66AF\u6A00\u6A06\u6A17\u69E5\u69F8\u6A15\u69F1\u69E4\u6A20\u69FF\u69EC\u69E2\u6A1B\u6A1D\u69FE\u6A27\u69F2\u69EE\u6A14\u69F7\u69E7\u6A40\u6A08\u69E6\u69FB\u6A0D\u69FC\u69EB\u6A09\u6A04\u6A18\u6A25\u6A0F\u69F6\u6A26\u6A07\u69F4\u6A16\u6B51\u6BA5\u6BA3\u6BA2\u6BA6\u6C01\u6C00\u6BFF\u6C02\u6F41\u6F26\u6F7E\u6F87\u6FC6\u6F92"],["e640","\u6F8D\u6F89\u6F8C\u6F62\u6F4F\u6F85\u6F5A\u6F96\u6F76\u6F6C\u6F82\u6F55\u6F72\u6F52\u6F50\u6F57\u6F94\u6F93\u6F5D\u6F00\u6F61\u6F6B\u6F7D\u6F67\u6F90\u6F53\u6F8B\u6F69\u6F7F\u6F95\u6F63\u6F77\u6F6A\u6F7B\u71B2\u71AF\u719B\u71B0\u71A0\u719A\u71A9\u71B5\u719D\u71A5\u719E\u71A4\u71A1\u71AA\u719C\u71A7\u71B3\u7298\u729A\u7358\u7352\u735E\u735F\u7360\u735D\u735B\u7361\u735A\u7359"],["e6a1","\u7362\u7487\u7489\u748A\u7486\u7481\u747D\u7485\u7488\u747C\u7479\u7508\u7507\u757E\u7625\u761E\u7619\u761D\u761C\u7623\u761A\u7628\u761B\u769C\u769D\u769E\u769B\u778D\u778F\u7789\u7788\u78CD\u78BB\u78CF\u78CC\u78D1\u78CE\u78D4\u78C8\u78C3\u78C4\u78C9\u799A\u79A1\u79A0\u799C\u79A2\u799B\u6B76\u7A39\u7AB2\u7AB4\u7AB3\u7BB7\u7BCB\u7BBE\u7BAC\u7BCE\u7BAF\u7BB9\u7BCA\u7BB5\u7CC5\u7CC8\u7CCC\u7CCB\u7DF7\u7DDB\u7DEA\u7DE7\u7DD7\u7DE1\u7E03\u7DFA\u7DE6\u7DF6\u7DF1\u7DF0\u7DEE\u7DDF\u7F76\u7FAC\u7FB0\u7FAD\u7FED\u7FEB\u7FEA\u7FEC\u7FE6\u7FE8\u8064\u8067\u81A3\u819F"],["e740","\u819E\u8195\u81A2\u8199\u8197\u8216\u824F\u8253\u8252\u8250\u824E\u8251\u8524\u853B\u850F\u8500\u8529\u850E\u8509\u850D\u851F\u850A\u8527\u851C\u84FB\u852B\u84FA\u8508\u850C\u84F4\u852A\u84F2\u8515\u84F7\u84EB\u84F3\u84FC\u8512\u84EA\u84E9\u8516\u84FE\u8528\u851D\u852E\u8502\u84FD\u851E\u84F6\u8531\u8526\u84E7\u84E8\u84F0\u84EF\u84F9\u8518\u8520\u8530\u850B\u8519\u852F\u8662"],["e7a1","\u8756\u8763\u8764\u8777\u87E1\u8773\u8758\u8754\u875B\u8752\u8761\u875A\u8751\u875E\u876D\u876A\u8750\u874E\u875F\u875D\u876F\u876C\u877A\u876E\u875C\u8765\u874F\u877B\u8775\u8762\u8767\u8769\u885A\u8905\u890C\u8914\u890B\u8917\u8918\u8919\u8906\u8916\u8911\u890E\u8909\u89A2\u89A4\u89A3\u89ED\u89F0\u89EC\u8ACF\u8AC6\u8AB8\u8AD3\u8AD1\u8AD4\u8AD5\u8ABB\u8AD7\u8ABE\u8AC0\u8AC5\u8AD8\u8AC3\u8ABA\u8ABD\u8AD9\u8C3E\u8C4D\u8C8F\u8CE5\u8CDF\u8CD9\u8CE8\u8CDA\u8CDD\u8CE7\u8DA0\u8D9C\u8DA1\u8D9B\u8E20\u8E23\u8E25\u8E24\u8E2E\u8E15\u8E1B\u8E16\u8E11\u8E19\u8E26\u8E27"],["e840","\u8E14\u8E12\u8E18\u8E13\u8E1C\u8E17\u8E1A\u8F2C\u8F24\u8F18\u8F1A\u8F20\u8F23\u8F16\u8F17\u9073\u9070\u906F\u9067\u906B\u912F\u912B\u9129\u912A\u9132\u9126\u912E\u9185\u9186\u918A\u9181\u9182\u9184\u9180\u92D0\u92C3\u92C4\u92C0\u92D9\u92B6\u92CF\u92F1\u92DF\u92D8\u92E9\u92D7\u92DD\u92CC\u92EF\u92C2\u92E8\u92CA\u92C8\u92CE\u92E6\u92CD\u92D5\u92C9\u92E0\u92DE\u92E7\u92D1\u92D3"],["e8a1","\u92B5\u92E1\u92C6\u92B4\u957C\u95AC\u95AB\u95AE\u95B0\u96A4\u96A2\u96D3\u9705\u9708\u9702\u975A\u978A\u978E\u9788\u97D0\u97CF\u981E\u981D\u9826\u9829\u9828\u9820\u981B\u9827\u98B2\u9908\u98FA\u9911\u9914\u9916\u9917\u9915\u99DC\u99CD\u99CF\u99D3\u99D4\u99CE\u99C9\u99D6\u99D8\u99CB\u99D7\u99CC\u9AB3\u9AEC\u9AEB\u9AF3\u9AF2\u9AF1\u9B46\u9B43\u9B67\u9B74\u9B71\u9B66\u9B76\u9B75\u9B70\u9B68\u9B64\u9B6C\u9CFC\u9CFA\u9CFD\u9CFF\u9CF7\u9D07\u9D00\u9CF9\u9CFB\u9D08\u9D05\u9D04\u9E83\u9ED3\u9F0F\u9F10\u511C\u5113\u5117\u511A\u5111\u51DE\u5334\u53E1\u5670\u5660\u566E"],["e940","\u5673\u5666\u5663\u566D\u5672\u565E\u5677\u571C\u571B\u58C8\u58BD\u58C9\u58BF\u58BA\u58C2\u58BC\u58C6\u5B17\u5B19\u5B1B\u5B21\u5B14\u5B13\u5B10\u5B16\u5B28\u5B1A\u5B20\u5B1E\u5BEF\u5DAC\u5DB1\u5DA9\u5DA7\u5DB5\u5DB0\u5DAE\u5DAA\u5DA8\u5DB2\u5DAD\u5DAF\u5DB4\u5E67\u5E68\u5E66\u5E6F\u5EE9\u5EE7\u5EE6\u5EE8\u5EE5\u5F4B\u5FBC\u619D\u61A8\u6196\u61C5\u61B4\u61C6\u61C1\u61CC\u61BA"],["e9a1","\u61BF\u61B8\u618C\u64D7\u64D6\u64D0\u64CF\u64C9\u64BD\u6489\u64C3\u64DB\u64F3\u64D9\u6533\u657F\u657C\u65A2\u66C8\u66BE\u66C0\u66CA\u66CB\u66CF\u66BD\u66BB\u66BA\u66CC\u6723\u6A34\u6A66\u6A49\u6A67\u6A32\u6A68\u6A3E\u6A5D\u6A6D\u6A76\u6A5B\u6A51\u6A28\u6A5A\u6A3B\u6A3F\u6A41\u6A6A\u6A64\u6A50\u6A4F\u6A54\u6A6F\u6A69\u6A60\u6A3C\u6A5E\u6A56\u6A55\u6A4D\u6A4E\u6A46\u6B55\u6B54\u6B56\u6BA7\u6BAA\u6BAB\u6BC8\u6BC7\u6C04\u6C03\u6C06\u6FAD\u6FCB\u6FA3\u6FC7\u6FBC\u6FCE\u6FC8\u6F5E\u6FC4\u6FBD\u6F9E\u6FCA\u6FA8\u7004\u6FA5\u6FAE\u6FBA\u6FAC\u6FAA\u6FCF\u6FBF\u6FB8"],["ea40","\u6FA2\u6FC9\u6FAB\u6FCD\u6FAF\u6FB2\u6FB0\u71C5\u71C2\u71BF\u71B8\u71D6\u71C0\u71C1\u71CB\u71D4\u71CA\u71C7\u71CF\u71BD\u71D8\u71BC\u71C6\u71DA\u71DB\u729D\u729E\u7369\u7366\u7367\u736C\u7365\u736B\u736A\u747F\u749A\u74A0\u7494\u7492\u7495\u74A1\u750B\u7580\u762F\u762D\u7631\u763D\u7633\u763C\u7635\u7632\u7630\u76BB\u76E6\u779A\u779D\u77A1\u779C\u779B\u77A2\u77A3\u7795\u7799"],["eaa1","\u7797\u78DD\u78E9\u78E5\u78EA\u78DE\u78E3\u78DB\u78E1\u78E2\u78ED\u78DF\u78E0\u79A4\u7A44\u7A48\u7A47\u7AB6\u7AB8\u7AB5\u7AB1\u7AB7\u7BDE\u7BE3\u7BE7\u7BDD\u7BD5\u7BE5\u7BDA\u7BE8\u7BF9\u7BD4\u7BEA\u7BE2\u7BDC\u7BEB\u7BD8\u7BDF\u7CD2\u7CD4\u7CD7\u7CD0\u7CD1\u7E12\u7E21\u7E17\u7E0C\u7E1F\u7E20\u7E13\u7E0E\u7E1C\u7E15\u7E1A\u7E22\u7E0B\u7E0F\u7E16\u7E0D\u7E14\u7E25\u7E24\u7F43\u7F7B\u7F7C\u7F7A\u7FB1\u7FEF\u802A\u8029\u806C\u81B1\u81A6\u81AE\u81B9\u81B5\u81AB\u81B0\u81AC\u81B4\u81B2\u81B7\u81A7\u81F2\u8255\u8256\u8257\u8556\u8545\u856B\u854D\u8553\u8561\u8558"],["eb40","\u8540\u8546\u8564\u8541\u8562\u8544\u8551\u8547\u8563\u853E\u855B\u8571\u854E\u856E\u8575\u8555\u8567\u8560\u858C\u8566\u855D\u8554\u8565\u856C\u8663\u8665\u8664\u879B\u878F\u8797\u8793\u8792\u8788\u8781\u8796\u8798\u8779\u8787\u87A3\u8785\u8790\u8791\u879D\u8784\u8794\u879C\u879A\u8789\u891E\u8926\u8930\u892D\u892E\u8927\u8931\u8922\u8929\u8923\u892F\u892C\u891F\u89F1\u8AE0"],["eba1","\u8AE2\u8AF2\u8AF4\u8AF5\u8ADD\u8B14\u8AE4\u8ADF\u8AF0\u8AC8\u8ADE\u8AE1\u8AE8\u8AFF\u8AEF\u8AFB\u8C91\u8C92\u8C90\u8CF5\u8CEE\u8CF1\u8CF0\u8CF3\u8D6C\u8D6E\u8DA5\u8DA7\u8E33\u8E3E\u8E38\u8E40\u8E45\u8E36\u8E3C\u8E3D\u8E41\u8E30\u8E3F\u8EBD\u8F36\u8F2E\u8F35\u8F32\u8F39\u8F37\u8F34\u9076\u9079\u907B\u9086\u90FA\u9133\u9135\u9136\u9193\u9190\u9191\u918D\u918F\u9327\u931E\u9308\u931F\u9306\u930F\u937A\u9338\u933C\u931B\u9323\u9312\u9301\u9346\u932D\u930E\u930D\u92CB\u931D\u92FA\u9325\u9313\u92F9\u92F7\u9334\u9302\u9324\u92FF\u9329\u9339\u9335\u932A\u9314\u930C"],["ec40","\u930B\u92FE\u9309\u9300\u92FB\u9316\u95BC\u95CD\u95BE\u95B9\u95BA\u95B6\u95BF\u95B5\u95BD\u96A9\u96D4\u970B\u9712\u9710\u9799\u9797\u9794\u97F0\u97F8\u9835\u982F\u9832\u9924\u991F\u9927\u9929\u999E\u99EE\u99EC\u99E5\u99E4\u99F0\u99E3\u99EA\u99E9\u99E7\u9AB9\u9ABF\u9AB4\u9ABB\u9AF6\u9AFA\u9AF9\u9AF7\u9B33\u9B80\u9B85\u9B87\u9B7C\u9B7E\u9B7B\u9B82\u9B93\u9B92\u9B90\u9B7A\u9B95"],["eca1","\u9B7D\u9B88\u9D25\u9D17\u9D20\u9D1E\u9D14\u9D29\u9D1D\u9D18\u9D22\u9D10\u9D19\u9D1F\u9E88\u9E86\u9E87\u9EAE\u9EAD\u9ED5\u9ED6\u9EFA\u9F12\u9F3D\u5126\u5125\u5122\u5124\u5120\u5129\u52F4\u5693\u568C\u568D\u5686\u5684\u5683\u567E\u5682\u567F\u5681\u58D6\u58D4\u58CF\u58D2\u5B2D\u5B25\u5B32\u5B23\u5B2C\u5B27\u5B26\u5B2F\u5B2E\u5B7B\u5BF1\u5BF2\u5DB7\u5E6C\u5E6A\u5FBE\u5FBB\u61C3\u61B5\u61BC\u61E7\u61E0\u61E5\u61E4\u61E8\u61DE\u64EF\u64E9\u64E3\u64EB\u64E4\u64E8\u6581\u6580\u65B6\u65DA\u66D2\u6A8D\u6A96\u6A81\u6AA5\u6A89\u6A9F\u6A9B\u6AA1\u6A9E\u6A87\u6A93\u6A8E"],["ed40","\u6A95\u6A83\u6AA8\u6AA4\u6A91\u6A7F\u6AA6\u6A9A\u6A85\u6A8C\u6A92\u6B5B\u6BAD\u6C09\u6FCC\u6FA9\u6FF4\u6FD4\u6FE3\u6FDC\u6FED\u6FE7\u6FE6\u6FDE\u6FF2\u6FDD\u6FE2\u6FE8\u71E1\u71F1\u71E8\u71F2\u71E4\u71F0\u71E2\u7373\u736E\u736F\u7497\u74B2\u74AB\u7490\u74AA\u74AD\u74B1\u74A5\u74AF\u7510\u7511\u7512\u750F\u7584\u7643\u7648\u7649\u7647\u76A4\u76E9\u77B5\u77AB\u77B2\u77B7\u77B6"],["eda1","\u77B4\u77B1\u77A8\u77F0\u78F3\u78FD\u7902\u78FB\u78FC\u78F2\u7905\u78F9\u78FE\u7904\u79AB\u79A8\u7A5C\u7A5B\u7A56\u7A58\u7A54\u7A5A\u7ABE\u7AC0\u7AC1\u7C05\u7C0F\u7BF2\u7C00\u7BFF\u7BFB\u7C0E\u7BF4\u7C0B\u7BF3\u7C02\u7C09\u7C03\u7C01\u7BF8\u7BFD\u7C06\u7BF0\u7BF1\u7C10\u7C0A\u7CE8\u7E2D\u7E3C\u7E42\u7E33\u9848\u7E38\u7E2A\u7E49\u7E40\u7E47\u7E29\u7E4C\u7E30\u7E3B\u7E36\u7E44\u7E3A\u7F45\u7F7F\u7F7E\u7F7D\u7FF4\u7FF2\u802C\u81BB\u81C4\u81CC\u81CA\u81C5\u81C7\u81BC\u81E9\u825B\u825A\u825C\u8583\u8580\u858F\u85A7\u8595\u85A0\u858B\u85A3\u857B\u85A4\u859A\u859E"],["ee40","\u8577\u857C\u8589\u85A1\u857A\u8578\u8557\u858E\u8596\u8586\u858D\u8599\u859D\u8581\u85A2\u8582\u8588\u8585\u8579\u8576\u8598\u8590\u859F\u8668\u87BE\u87AA\u87AD\u87C5\u87B0\u87AC\u87B9\u87B5\u87BC\u87AE\u87C9\u87C3\u87C2\u87CC\u87B7\u87AF\u87C4\u87CA\u87B4\u87B6\u87BF\u87B8\u87BD\u87DE\u87B2\u8935\u8933\u893C\u893E\u8941\u8952\u8937\u8942\u89AD\u89AF\u89AE\u89F2\u89F3\u8B1E"],["eea1","\u8B18\u8B16\u8B11\u8B05\u8B0B\u8B22\u8B0F\u8B12\u8B15\u8B07\u8B0D\u8B08\u8B06\u8B1C\u8B13\u8B1A\u8C4F\u8C70\u8C72\u8C71\u8C6F\u8C95\u8C94\u8CF9\u8D6F\u8E4E\u8E4D\u8E53\u8E50\u8E4C\u8E47\u8F43\u8F40\u9085\u907E\u9138\u919A\u91A2\u919B\u9199\u919F\u91A1\u919D\u91A0\u93A1\u9383\u93AF\u9364\u9356\u9347\u937C\u9358\u935C\u9376\u9349\u9350\u9351\u9360\u936D\u938F\u934C\u936A\u9379\u9357\u9355\u9352\u934F\u9371\u9377\u937B\u9361\u935E\u9363\u9367\u9380\u934E\u9359\u95C7\u95C0\u95C9\u95C3\u95C5\u95B7\u96AE\u96B0\u96AC\u9720\u971F\u9718\u971D\u9719\u979A\u97A1\u979C"],["ef40","\u979E\u979D\u97D5\u97D4\u97F1\u9841\u9844\u984A\u9849\u9845\u9843\u9925\u992B\u992C\u992A\u9933\u9932\u992F\u992D\u9931\u9930\u9998\u99A3\u99A1\u9A02\u99FA\u99F4\u99F7\u99F9\u99F8\u99F6\u99FB\u99FD\u99FE\u99FC\u9A03\u9ABE\u9AFE\u9AFD\u9B01\u9AFC\u9B48\u9B9A\u9BA8\u9B9E\u9B9B\u9BA6\u9BA1\u9BA5\u9BA4\u9B86\u9BA2\u9BA0\u9BAF\u9D33\u9D41\u9D67\u9D36\u9D2E\u9D2F\u9D31\u9D38\u9D30"],["efa1","\u9D45\u9D42\u9D43\u9D3E\u9D37\u9D40\u9D3D\u7FF5\u9D2D\u9E8A\u9E89\u9E8D\u9EB0\u9EC8\u9EDA\u9EFB\u9EFF\u9F24\u9F23\u9F22\u9F54\u9FA0\u5131\u512D\u512E\u5698\u569C\u5697\u569A\u569D\u5699\u5970\u5B3C\u5C69\u5C6A\u5DC0\u5E6D\u5E6E\u61D8\u61DF\u61ED\u61EE\u61F1\u61EA\u61F0\u61EB\u61D6\u61E9\u64FF\u6504\u64FD\u64F8\u6501\u6503\u64FC\u6594\u65DB\u66DA\u66DB\u66D8\u6AC5\u6AB9\u6ABD\u6AE1\u6AC6\u6ABA\u6AB6\u6AB7\u6AC7\u6AB4\u6AAD\u6B5E\u6BC9\u6C0B\u7007\u700C\u700D\u7001\u7005\u7014\u700E\u6FFF\u7000\u6FFB\u7026\u6FFC\u6FF7\u700A\u7201\u71FF\u71F9\u7203\u71FD\u7376"],["f040","\u74B8\u74C0\u74B5\u74C1\u74BE\u74B6\u74BB\u74C2\u7514\u7513\u765C\u7664\u7659\u7650\u7653\u7657\u765A\u76A6\u76BD\u76EC\u77C2\u77BA\u78FF\u790C\u7913\u7914\u7909\u7910\u7912\u7911\u79AD\u79AC\u7A5F\u7C1C\u7C29\u7C19\u7C20\u7C1F\u7C2D\u7C1D\u7C26\u7C28\u7C22\u7C25\u7C30\u7E5C\u7E50\u7E56\u7E63\u7E58\u7E62\u7E5F\u7E51\u7E60\u7E57\u7E53\u7FB5\u7FB3\u7FF7\u7FF8\u8075\u81D1\u81D2"],["f0a1","\u81D0\u825F\u825E\u85B4\u85C6\u85C0\u85C3\u85C2\u85B3\u85B5\u85BD\u85C7\u85C4\u85BF\u85CB\u85CE\u85C8\u85C5\u85B1\u85B6\u85D2\u8624\u85B8\u85B7\u85BE\u8669\u87E7\u87E6\u87E2\u87DB\u87EB\u87EA\u87E5\u87DF\u87F3\u87E4\u87D4\u87DC\u87D3\u87ED\u87D8\u87E3\u87A4\u87D7\u87D9\u8801\u87F4\u87E8\u87DD\u8953\u894B\u894F\u894C\u8946\u8950\u8951\u8949\u8B2A\u8B27\u8B23\u8B33\u8B30\u8B35\u8B47\u8B2F\u8B3C\u8B3E\u8B31\u8B25\u8B37\u8B26\u8B36\u8B2E\u8B24\u8B3B\u8B3D\u8B3A\u8C42\u8C75\u8C99\u8C98\u8C97\u8CFE\u8D04\u8D02\u8D00\u8E5C\u8E62\u8E60\u8E57\u8E56\u8E5E\u8E65\u8E67"],["f140","\u8E5B\u8E5A\u8E61\u8E5D\u8E69\u8E54\u8F46\u8F47\u8F48\u8F4B\u9128\u913A\u913B\u913E\u91A8\u91A5\u91A7\u91AF\u91AA\u93B5\u938C\u9392\u93B7\u939B\u939D\u9389\u93A7\u938E\u93AA\u939E\u93A6\u9395\u9388\u9399\u939F\u938D\u93B1\u9391\u93B2\u93A4\u93A8\u93B4\u93A3\u93A5\u95D2\u95D3\u95D1\u96B3\u96D7\u96DA\u5DC2\u96DF\u96D8\u96DD\u9723\u9722\u9725\u97AC\u97AE\u97A8\u97AB\u97A4\u97AA"],["f1a1","\u97A2\u97A5\u97D7\u97D9\u97D6\u97D8\u97FA\u9850\u9851\u9852\u98B8\u9941\u993C\u993A\u9A0F\u9A0B\u9A09\u9A0D\u9A04\u9A11\u9A0A\u9A05\u9A07\u9A06\u9AC0\u9ADC\u9B08\u9B04\u9B05\u9B29\u9B35\u9B4A\u9B4C\u9B4B\u9BC7\u9BC6\u9BC3\u9BBF\u9BC1\u9BB5\u9BB8\u9BD3\u9BB6\u9BC4\u9BB9\u9BBD\u9D5C\u9D53\u9D4F\u9D4A\u9D5B\u9D4B\u9D59\u9D56\u9D4C\u9D57\u9D52\u9D54\u9D5F\u9D58\u9D5A\u9E8E\u9E8C\u9EDF\u9F01\u9F00\u9F16\u9F25\u9F2B\u9F2A\u9F29\u9F28\u9F4C\u9F55\u5134\u5135\u5296\u52F7\u53B4\u56AB\u56AD\u56A6\u56A7\u56AA\u56AC\u58DA\u58DD\u58DB\u5912\u5B3D\u5B3E\u5B3F\u5DC3\u5E70"],["f240","\u5FBF\u61FB\u6507\u6510\u650D\u6509\u650C\u650E\u6584\u65DE\u65DD\u66DE\u6AE7\u6AE0\u6ACC\u6AD1\u6AD9\u6ACB\u6ADF\u6ADC\u6AD0\u6AEB\u6ACF\u6ACD\u6ADE\u6B60\u6BB0\u6C0C\u7019\u7027\u7020\u7016\u702B\u7021\u7022\u7023\u7029\u7017\u7024\u701C\u702A\u720C\u720A\u7207\u7202\u7205\u72A5\u72A6\u72A4\u72A3\u72A1\u74CB\u74C5\u74B7\u74C3\u7516\u7660\u77C9\u77CA\u77C4\u77F1\u791D\u791B"],["f2a1","\u7921\u791C\u7917\u791E\u79B0\u7A67\u7A68\u7C33\u7C3C\u7C39\u7C2C\u7C3B\u7CEC\u7CEA\u7E76\u7E75\u7E78\u7E70\u7E77\u7E6F\u7E7A\u7E72\u7E74\u7E68\u7F4B\u7F4A\u7F83\u7F86\u7FB7\u7FFD\u7FFE\u8078\u81D7\u81D5\u8264\u8261\u8263\u85EB\u85F1\u85ED\u85D9\u85E1\u85E8\u85DA\u85D7\u85EC\u85F2\u85F8\u85D8\u85DF\u85E3\u85DC\u85D1\u85F0\u85E6\u85EF\u85DE\u85E2\u8800\u87FA\u8803\u87F6\u87F7\u8809\u880C\u880B\u8806\u87FC\u8808\u87FF\u880A\u8802\u8962\u895A\u895B\u8957\u8961\u895C\u8958\u895D\u8959\u8988\u89B7\u89B6\u89F6\u8B50\u8B48\u8B4A\u8B40\u8B53\u8B56\u8B54\u8B4B\u8B55"],["f340","\u8B51\u8B42\u8B52\u8B57\u8C43\u8C77\u8C76\u8C9A\u8D06\u8D07\u8D09\u8DAC\u8DAA\u8DAD\u8DAB\u8E6D\u8E78\u8E73\u8E6A\u8E6F\u8E7B\u8EC2\u8F52\u8F51\u8F4F\u8F50\u8F53\u8FB4\u9140\u913F\u91B0\u91AD\u93DE\u93C7\u93CF\u93C2\u93DA\u93D0\u93F9\u93EC\u93CC\u93D9\u93A9\u93E6\u93CA\u93D4\u93EE\u93E3\u93D5\u93C4\u93CE\u93C0\u93D2\u93E7\u957D\u95DA\u95DB\u96E1\u9729\u972B\u972C\u9728\u9726"],["f3a1","\u97B3\u97B7\u97B6\u97DD\u97DE\u97DF\u985C\u9859\u985D\u9857\u98BF\u98BD\u98BB\u98BE\u9948\u9947\u9943\u99A6\u99A7\u9A1A\u9A15\u9A25\u9A1D\u9A24\u9A1B\u9A22\u9A20\u9A27\u9A23\u9A1E\u9A1C\u9A14\u9AC2\u9B0B\u9B0A\u9B0E\u9B0C\u9B37\u9BEA\u9BEB\u9BE0\u9BDE\u9BE4\u9BE6\u9BE2\u9BF0\u9BD4\u9BD7\u9BEC\u9BDC\u9BD9\u9BE5\u9BD5\u9BE1\u9BDA\u9D77\u9D81\u9D8A\u9D84\u9D88\u9D71\u9D80\u9D78\u9D86\u9D8B\u9D8C\u9D7D\u9D6B\u9D74\u9D75\u9D70\u9D69\u9D85\u9D73\u9D7B\u9D82\u9D6F\u9D79\u9D7F\u9D87\u9D68\u9E94\u9E91\u9EC0\u9EFC\u9F2D\u9F40\u9F41\u9F4D\u9F56\u9F57\u9F58\u5337\u56B2"],["f440","\u56B5\u56B3\u58E3\u5B45\u5DC6\u5DC7\u5EEE\u5EEF\u5FC0\u5FC1\u61F9\u6517\u6516\u6515\u6513\u65DF\u66E8\u66E3\u66E4\u6AF3\u6AF0\u6AEA\u6AE8\u6AF9\u6AF1\u6AEE\u6AEF\u703C\u7035\u702F\u7037\u7034\u7031\u7042\u7038\u703F\u703A\u7039\u7040\u703B\u7033\u7041\u7213\u7214\u72A8\u737D\u737C\u74BA\u76AB\u76AA\u76BE\u76ED\u77CC\u77CE\u77CF\u77CD\u77F2\u7925\u7923\u7927\u7928\u7924\u7929"],["f4a1","\u79B2\u7A6E\u7A6C\u7A6D\u7AF7\u7C49\u7C48\u7C4A\u7C47\u7C45\u7CEE\u7E7B\u7E7E\u7E81\u7E80\u7FBA\u7FFF\u8079\u81DB\u81D9\u820B\u8268\u8269\u8622\u85FF\u8601\u85FE\u861B\u8600\u85F6\u8604\u8609\u8605\u860C\u85FD\u8819\u8810\u8811\u8817\u8813\u8816\u8963\u8966\u89B9\u89F7\u8B60\u8B6A\u8B5D\u8B68\u8B63\u8B65\u8B67\u8B6D\u8DAE\u8E86\u8E88\u8E84\u8F59\u8F56\u8F57\u8F55\u8F58\u8F5A\u908D\u9143\u9141\u91B7\u91B5\u91B2\u91B3\u940B\u9413\u93FB\u9420\u940F\u9414\u93FE\u9415\u9410\u9428\u9419\u940D\u93F5\u9400\u93F7\u9407\u940E\u9416\u9412\u93FA\u9409\u93F8\u940A\u93FF"],["f540","\u93FC\u940C\u93F6\u9411\u9406\u95DE\u95E0\u95DF\u972E\u972F\u97B9\u97BB\u97FD\u97FE\u9860\u9862\u9863\u985F\u98C1\u98C2\u9950\u994E\u9959\u994C\u994B\u9953\u9A32\u9A34\u9A31\u9A2C\u9A2A\u9A36\u9A29\u9A2E\u9A38\u9A2D\u9AC7\u9ACA\u9AC6\u9B10\u9B12\u9B11\u9C0B\u9C08\u9BF7\u9C05\u9C12\u9BF8\u9C40\u9C07\u9C0E\u9C06\u9C17\u9C14\u9C09\u9D9F\u9D99\u9DA4\u9D9D\u9D92\u9D98\u9D90\u9D9B"],["f5a1","\u9DA0\u9D94\u9D9C\u9DAA\u9D97\u9DA1\u9D9A\u9DA2\u9DA8\u9D9E\u9DA3\u9DBF\u9DA9\u9D96\u9DA6\u9DA7\u9E99\u9E9B\u9E9A\u9EE5\u9EE4\u9EE7\u9EE6\u9F30\u9F2E\u9F5B\u9F60\u9F5E\u9F5D\u9F59\u9F91\u513A\u5139\u5298\u5297\u56C3\u56BD\u56BE\u5B48\u5B47\u5DCB\u5DCF\u5EF1\u61FD\u651B\u6B02\u6AFC\u6B03\u6AF8\u6B00\u7043\u7044\u704A\u7048\u7049\u7045\u7046\u721D\u721A\u7219\u737E\u7517\u766A\u77D0\u792D\u7931\u792F\u7C54\u7C53\u7CF2\u7E8A\u7E87\u7E88\u7E8B\u7E86\u7E8D\u7F4D\u7FBB\u8030\u81DD\u8618\u862A\u8626\u861F\u8623\u861C\u8619\u8627\u862E\u8621\u8620\u8629\u861E\u8625"],["f640","\u8829\u881D\u881B\u8820\u8824\u881C\u882B\u884A\u896D\u8969\u896E\u896B\u89FA\u8B79\u8B78\u8B45\u8B7A\u8B7B\u8D10\u8D14\u8DAF\u8E8E\u8E8C\u8F5E\u8F5B\u8F5D\u9146\u9144\u9145\u91B9\u943F\u943B\u9436\u9429\u943D\u943C\u9430\u9439\u942A\u9437\u942C\u9440\u9431\u95E5\u95E4\u95E3\u9735\u973A\u97BF\u97E1\u9864\u98C9\u98C6\u98C0\u9958\u9956\u9A39\u9A3D\u9A46\u9A44\u9A42\u9A41\u9A3A"],["f6a1","\u9A3F\u9ACD\u9B15\u9B17\u9B18\u9B16\u9B3A\u9B52\u9C2B\u9C1D\u9C1C\u9C2C\u9C23\u9C28\u9C29\u9C24\u9C21\u9DB7\u9DB6\u9DBC\u9DC1\u9DC7\u9DCA\u9DCF\u9DBE\u9DC5\u9DC3\u9DBB\u9DB5\u9DCE\u9DB9\u9DBA\u9DAC\u9DC8\u9DB1\u9DAD\u9DCC\u9DB3\u9DCD\u9DB2\u9E7A\u9E9C\u9EEB\u9EEE\u9EED\u9F1B\u9F18\u9F1A\u9F31\u9F4E\u9F65\u9F64\u9F92\u4EB9\u56C6\u56C5\u56CB\u5971\u5B4B\u5B4C\u5DD5\u5DD1\u5EF2\u6521\u6520\u6526\u6522\u6B0B\u6B08\u6B09\u6C0D\u7055\u7056\u7057\u7052\u721E\u721F\u72A9\u737F\u74D8\u74D5\u74D9\u74D7\u766D\u76AD\u7935\u79B4\u7A70\u7A71\u7C57\u7C5C\u7C59\u7C5B\u7C5A"],["f740","\u7CF4\u7CF1\u7E91\u7F4F\u7F87\u81DE\u826B\u8634\u8635\u8633\u862C\u8632\u8636\u882C\u8828\u8826\u882A\u8825\u8971\u89BF\u89BE\u89FB\u8B7E\u8B84\u8B82\u8B86\u8B85\u8B7F\u8D15\u8E95\u8E94\u8E9A\u8E92\u8E90\u8E96\u8E97\u8F60\u8F62\u9147\u944C\u9450\u944A\u944B\u944F\u9447\u9445\u9448\u9449\u9446\u973F\u97E3\u986A\u9869\u98CB\u9954\u995B\u9A4E\u9A53\u9A54\u9A4C\u9A4F\u9A48\u9A4A"],["f7a1","\u9A49\u9A52\u9A50\u9AD0\u9B19\u9B2B\u9B3B\u9B56\u9B55\u9C46\u9C48\u9C3F\u9C44\u9C39\u9C33\u9C41\u9C3C\u9C37\u9C34\u9C32\u9C3D\u9C36\u9DDB\u9DD2\u9DDE\u9DDA\u9DCB\u9DD0\u9DDC\u9DD1\u9DDF\u9DE9\u9DD9\u9DD8\u9DD6\u9DF5\u9DD5\u9DDD\u9EB6\u9EF0\u9F35\u9F33\u9F32\u9F42\u9F6B\u9F95\u9FA2\u513D\u5299\u58E8\u58E7\u5972\u5B4D\u5DD8\u882F\u5F4F\u6201\u6203\u6204\u6529\u6525\u6596\u66EB\u6B11\u6B12\u6B0F\u6BCA\u705B\u705A\u7222\u7382\u7381\u7383\u7670\u77D4\u7C67\u7C66\u7E95\u826C\u863A\u8640\u8639\u863C\u8631\u863B\u863E\u8830\u8832\u882E\u8833\u8976\u8974\u8973\u89FE"],["f840","\u8B8C\u8B8E\u8B8B\u8B88\u8C45\u8D19\u8E98\u8F64\u8F63\u91BC\u9462\u9455\u945D\u9457\u945E\u97C4\u97C5\u9800\u9A56\u9A59\u9B1E\u9B1F\u9B20\u9C52\u9C58\u9C50\u9C4A\u9C4D\u9C4B\u9C55\u9C59\u9C4C\u9C4E\u9DFB\u9DF7\u9DEF\u9DE3\u9DEB\u9DF8\u9DE4\u9DF6\u9DE1\u9DEE\u9DE6\u9DF2\u9DF0\u9DE2\u9DEC\u9DF4\u9DF3\u9DE8\u9DED\u9EC2\u9ED0\u9EF2\u9EF3\u9F06\u9F1C\u9F38\u9F37\u9F36\u9F43\u9F4F"],["f8a1","\u9F71\u9F70\u9F6E\u9F6F\u56D3\u56CD\u5B4E\u5C6D\u652D\u66ED\u66EE\u6B13\u705F\u7061\u705D\u7060\u7223\u74DB\u74E5\u77D5\u7938\u79B7\u79B6\u7C6A\u7E97\u7F89\u826D\u8643\u8838\u8837\u8835\u884B\u8B94\u8B95\u8E9E\u8E9F\u8EA0\u8E9D\u91BE\u91BD\u91C2\u946B\u9468\u9469\u96E5\u9746\u9743\u9747\u97C7\u97E5\u9A5E\u9AD5\u9B59\u9C63\u9C67\u9C66\u9C62\u9C5E\u9C60\u9E02\u9DFE\u9E07\u9E03\u9E06\u9E05\u9E00\u9E01\u9E09\u9DFF\u9DFD\u9E04\u9EA0\u9F1E\u9F46\u9F74\u9F75\u9F76\u56D4\u652E\u65B8\u6B18\u6B19\u6B17\u6B1A\u7062\u7226\u72AA\u77D8\u77D9\u7939\u7C69\u7C6B\u7CF6\u7E9A"],["f940","\u7E98\u7E9B\u7E99\u81E0\u81E1\u8646\u8647\u8648\u8979\u897A\u897C\u897B\u89FF\u8B98\u8B99\u8EA5\u8EA4\u8EA3\u946E\u946D\u946F\u9471\u9473\u9749\u9872\u995F\u9C68\u9C6E\u9C6D\u9E0B\u9E0D\u9E10\u9E0F\u9E12\u9E11\u9EA1\u9EF5\u9F09\u9F47\u9F78\u9F7B\u9F7A\u9F79\u571E\u7066\u7C6F\u883C\u8DB2\u8EA6\u91C3\u9474\u9478\u9476\u9475\u9A60\u9C74\u9C73\u9C71\u9C75\u9E14\u9E13\u9EF6\u9F0A"],["f9a1","\u9FA4\u7068\u7065\u7CF7\u866A\u883E\u883D\u883F\u8B9E\u8C9C\u8EA9\u8EC9\u974B\u9873\u9874\u98CC\u9961\u99AB\u9A64\u9A66\u9A67\u9B24\u9E15\u9E17\u9F48\u6207\u6B1E\u7227\u864C\u8EA8\u9482\u9480\u9481\u9A69\u9A68\u9B2E\u9E19\u7229\u864B\u8B9F\u9483\u9C79\u9EB7\u7675\u9A6B\u9C7A\u9E1D\u7069\u706A\u9EA4\u9F7E\u9F49\u9F98\u7881\u92B9\u88CF\u58BB\u6052\u7CA7\u5AFA\u2554\u2566\u2557\u2560\u256C\u2563\u255A\u2569\u255D\u2552\u2564\u2555\u255E\u256A\u2561\u2558\u2567\u255B\u2553\u2565\u2556\u255F\u256B\u2562\u2559\u2568\u255C\u2551\u2550\u256D\u256E\u2570\u256F\u2593"]]});var nL4=o((sM7,pV9)=>{pV9.exports=[["8740","\u43F0\u4C32\u4603\u45A6\u4578\uD85C\uDE67\u4D77\u45B3\uD85F\uDCB1\u4CE2\uD85F\uDCC5\u3B95\u4736\u4744\u4C47\u4C40\uD850\uDEBF\uD84D\uDE17\uD85C\uDF52\uD85B\uDE8B\uD85C\uDCD2\u4C57\uD868\uDF51\u474F\u45DA\u4C85\uD85F\uDC6C\u4D07\u4AA4\u46A1\uD85A\uDF23\u7225\uD856\uDE54\uD846\uDE63\uD84F\uDE06\uD84F\uDF61\u664D\u56FB"],["8767","\u7D95\u591D\uD862\uDFB9\u3DF4\u9734\uD85E\uDFEF\u5BDB\uD847\uDD5E\u5AA4\u3625\uD867\uDEB0\u5AD1\u5BB7\u5CFC\u676E\u8593\uD866\uDD45\u7461\u749D\u3875\uD847\uDD53\uD84D\uDE9E\uD858\uDC21\u3EEC"],["87a1","\uD856\uDCDE\u3AF5\u7AFC\u9F97\uD850\uDD61\uD862\uDD0D\uD84C\uDDEA\uD842\uDE8A\uD84C\uDE5E\u430A\u8484\u9F96\u942F\u4930\u8613\u5896\u974A\u9218\u79D0\u7A32\u6660\u6A29\u889D\u744C\u7BC5\u6782\u7A2C\u524F\u9046\u34E6\u73C4\uD857\uDDB9\u74C6\u9FC7\u57B3\u492F\u544C\u4131\uD84D\uDE8E\u5818\u7A72\uD85E\uDF65\u8B8F\u46AE\uD85B\uDE88\u4181\uD857\uDD99\u7BAE\uD849\uDCBC\u9FC8\uD849\uDCC1\uD849\uDCC9\uD849\uDCCC\u9FC9\u8504\uD84D\uDDBB\u40B4\u9FCA\u44E1\uD86B\uDDFF\u62C1\u706E\u9FCB"],["8840","\u31C0",4,"\uD840\uDD0C\u31C5\uD840\uDCD1\uD840\uDCCD\u31C6\u31C7\uD840\uDCCB\uD847\uDFE8\u31C8\uD840\uDCCA\u31C9\u31CA\u31CB\u31CC\uD840\uDD0E\u31CD\u31CE\u0100\xC1\u01CD\xC0\u0112\xC9\u011A\xC8\u014C\xD3\u01D1\xD2\u0FFF\xCA\u0304\u1EBE\u0FFF\xCA\u030C\u1EC0\xCA\u0101\xE1\u01CE\xE0\u0251\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA"],["88a1","\u01DC\xFC\u0FFF\xEA\u0304\u1EBF\u0FFF\xEA\u030C\u1EC1\xEA\u0261\u23DA\u23DB"],["8940","\uD868\uDFA9\uD844\uDD45"],["8943","\u650A"],["8946","\u4E3D\u6EDD\u9D4E\u91DF"],["894c","\uD85D\uDF35\u6491\u4F1A\u4F28\u4FA8\u5156\u5174\u519C\u51E4\u52A1\u52A8\u533B\u534E\u53D1\u53D8\u56E2\u58F0\u5904\u5907\u5932\u5934\u5B66\u5B9E\u5B9F\u5C9A\u5E86\u603B\u6589\u67FE\u6804\u6865\u6D4E\u70BC\u7535\u7EA4\u7EAC\u7EBA\u7EC7\u7ECF\u7EDF\u7F06\u7F37\u827A\u82CF\u836F\u89C6\u8BBE\u8BE2\u8F66\u8F67\u8F6E"],["89a1","\u7411\u7CFC\u7DCD\u6946\u7AC9\u5227"],["89ab","\u918C\u78B8\u915E\u80BC"],["89b0","\u8D0B\u80F6\uD842\uDDE7"],["89b5","\u809F\u9EC7\u4CCD\u9DC9\u9E0C\u4C3E\uD867\uDDF6\uD85C\uDC0E\u9E0A\uD868\uDD33\u35C1"],["89c1","\u6E9A\u823E\u7519"],["89c5","\u4911\u9A6C\u9A8F\u9F99\u7987\uD861\uDC6C\uD847\uDDCA\uD841\uDDD0\uD84A\uDEE6\u4E24\u4E81\u4E80\u4E87\u4EBF\u4EEB\u4F37\u344C\u4FBD\u3E48\u5003\u5088\u347D\u3493\u34A5\u5186\u5905\u51DB\u51FC\u5205\u4E89\u5279\u5290\u5327\u35C7\u53A9\u3551\u53B0\u3553\u53C2\u5423\u356D\u3572\u3681\u5493\u54A3\u54B4\u54B9\u54D0\u54EF\u5518\u5523\u5528\u3598\u553F\u35A5\u35BF\u55D7\u35C5"],["8a40","\uD85F\uDD84\u5525"],["8a43","\uD843\uDC42\uD843\uDD15\uD854\uDD2B\u5590\uD84B\uDCC6\u39EC\uD840\uDF41\u8E46\uD853\uDDB8\uD865\uDCE5\u4053\uD860\uDCBE\u777A\uD84B\uDC38\u3A34\u47D5\uD860\uDD5D\uD85A\uDDF2\uD853\uDDEA\u64DD\uD843\uDD7C\uD843\uDFB4\uD843\uDCD5\uD844\uDCF4\u648D\u8E7E\uD843\uDE96\uD843\uDC0B\uD843\uDF64\uD84B\uDCA9\uD860\uDE56\uD851\uDCD3"],["8a64","\uD843\uDD46\uD866\uDE4D\uD860\uDCE9\u47F4\uD853\uDEA7\uD84B\uDCC2\u9AB2\u3A67\uD865\uDDF4\u3FED\u3506\uD854\uDEC7\uD865\uDFD4\uD85E\uDCC8\uD84B\uDD44\u9D6E\u9815"],["8a76","\u43D9\uD858\uDCA5\u64B4\u54E3\uD84B\uDD4C\uD84A\uDFCA\uD844\uDC77\u39FB\uD844\uDC6F"],["8aa1","\uD859\uDEDA\uD859\uDF16\uD85E\uDDA0\u64EA\uD854\uDC52\uD843\uDC43\u8E68\uD848\uDDA1\uD862\uDF4C\uD841\uDF31"],["8aac","\u480B\uD840\uDDA9\u3FFA\u5873\uD84B\uDD8D"],["8ab2","\uD851\uDDC8\uD841\uDCFC\uD858\uDC97\uD843\uDF4C\uD843\uDD96\u5579\u40BB\u43BA"],["8abb","\u4AB4\uD84A\uDE66\uD844\uDC9D\u81AA\u98F5\uD843\uDD9C\u6379\u39FE\uD849\uDF75\u8DC0\u56A1\u647C\u3E43"],["8ac9","\uD869\uDE01\uD843\uDE09\uD84A\uDECF\uD84B\uDCC9"],["8ace","\uD844\uDCC8\uD84E\uDDC2\u3992\u3A06\uD860\uDE9B\u3578\uD857\uDE49\uD848\uDCC7\u5652\uD843\uDF31\uD84B\uDCB2\uD865\uDF20\u34BC\u6C3D\uD853\uDE3B"],["8adf","\uD85D\uDD74\uD84B\uDE8B\uD848\uDE08\uD869\uDE5B\uD863\uDCCD\uD843\uDE7A\uD843\uDC34\uD85A\uDC1C\u7F93\uD844\uDCCF\uD84A\uDC03\uD84A\uDD39\u35FB\uD854\uDDE3\uD843\uDE8C\uD843\uDF8D\uD843\uDEAA\u3F93\uD843\uDF30\uD843\uDD47\uD844\uDD4F\uD843\uDE4C"],["8af6","\uD843\uDEAB\uD842\uDFA9\uD843\uDD48\uD844\uDCC0\uD844\uDD3D\u3FF9\uD849\uDE96\u6432\uD843\uDFAD"],["8b40","\uD84C\uDFF4\uD85D\uDE39\uD84A\uDFCE\uD843\uDD7E\uD843\uDD7F\uD84B\uDC51\uD84B\uDC55\u3A18\uD843\uDE98\uD844\uDCC7\uD843\uDF2E\uD869\uDE32\uD85A\uDF50\uD863\uDCD2\uD863\uDD99\uD863\uDCCA\u95AA\u54CC\u82C4\u55B9"],["8b55","\uD867\uDEC3\u9C26\u9AB6\uD85D\uDF5E\uD84B\uDDEE\u7140\u816D\u80EC\u5C1C\uD859\uDD72\u8134\u3797\u535F\uD860\uDCBD\u91B6\uD843\uDEFA\uD843\uDE0F\uD843\uDE77\uD843\uDEFB\u35DD\uD853\uDDEB\u3609\uD843\uDCD6\u56AF\uD849\uDFB5\uD844\uDCC9\uD843\uDE10\uD843\uDE78\uD844\uDC78\uD844\uDD48\uD860\uDE07\uD845\uDC55\uD843\uDE79\uD853\uDE50\uD84B\uDDA4\u5A54\uD844\uDC1D\uD844\uDC1E\uD844\uDCF5\uD844\uDCF6\u579C\uD843\uDE11"],["8ba1","\uD85D\uDE94\uD860\uDECD\uD843\uDFB5\uD843\uDE7B\uD854\uDD7E\u3703\uD843\uDFB6\uD844\uDD80\uD854\uDED8\uD868\uDEBD\uD852\uDDDA\uD846\uDC3A\uD850\uDD77\uD860\uDE7C\u5899\u5268\u361A\uD855\uDF3D\u7BB2\u5B68\u4800\u4B2C\u9F27\u49E7\u9C1F\u9B8D\uD856\uDF74\uD84C\uDD3D\u55FB\u35F2\u5689\u4E28\u5902\uD846\uDFC1\uD87E\uDC78\u9751\uD840\uDC86\u4E5B\u4EBB\u353E\u5C23\u5F51\u5FC4\u38FA\u624C\u6535\u6B7A\u6C35\u6C3A\u706C\u722B\u4E2C\u72AD\uD852\uDCE9\u7F52\u793B\u7CF9\u7F53\uD858\uDE6A\u34C1"],["8bde","\uD858\uDF4B\u8002\u8080\uD859\uDE12\uD85A\uDD51\u535D\u8864\u89C1\uD85E\uDCB2\u8BA0\u8D1D\u9485\u9578\u957F\u95E8\uD863\uDE0F\u97E6\u9875\u98CE\u98DE\u9963\uD866\uDC10\u9C7C\u9E1F\u9EC4\u6B6F\uF907\u4E37\uD840\uDC87\u961D\u6237\u94A2"],["8c40","\u503B\u6DFE\uD867\uDC73\u9FA6\u3DC9\u888F\uD850\uDD4E\u7077\u5CF5\u4B20\uD854\uDDCD\u3559\uD857\uDD30\u6122\uD862\uDE32\u8FA7\u91F6\u7191\u6719\u73BA\uD84C\uDE81\uD868\uDD07\u3C8B\uD846\uDD80\u4B10\u78E4\u7402\u51AE\uD861\uDF0F\u4009\u6A63\uD868\uDEBA\u4223\u860F\uD842\uDE6F\u7A2A\uD866\uDD47\uD862\uDEEA\u9755\u704D\u5324\uD848\uDC7E\u93F4\u76D9\uD862\uDDE3\u9FA7\u77DD\u4EA3\u4FF0\u50BC\u4E2F\u4F17\u9FA8\u5434\u7D8B\u5892\u58D0\uD847\uDDB6\u5E92\u5E99\u5FC2\uD849\uDF12\u658B"],["8ca1","\uD84C\uDFF9\u6919\u6A43\uD84F\uDC63\u6CFF"],["8ca7","\u7200\uD851\uDD05\u738C\u3EDB\uD852\uDE13\u5B15\u74B9\u8B83\uD857\uDCA4\uD855\uDE95\u7A93\u7BEC\u7CC3\u7E6C\u82F8\u8597\u9FA9\u8890\u9FAA\u8EB9\u9FAB\u8FCF\u855F\u99E0\u9221\u9FAC\uD863\uDDB9\uD845\uDC3F\u4071\u42A2\u5A1A"],["8cc9","\u9868\u676B\u4276\u573D"],["8cce","\u85D6\uD852\uDD7B\u82BF\uD85C\uDD0D\u4C81\uD85B\uDD74\u5D7B\uD85A\uDF15\uD85B\uDFBE\u9FAD\u9FAE\u5B96\u9FAF\u66E7\u7E5B\u6E57\u79CA\u3D88\u44C3\uD84C\uDE56\uD849\uDF96\u439A\u4536"],["8ce6","\u5CD5\uD84E\uDF1A\u8AF9\u5C78\u3D12\uD84D\uDD51\u5D78\u9FB2\u7157\u4558\uD850\uDCEC\uD847\uDE23\u4C77\u3978\u344A\uD840\uDDA4\uD85B\uDC41\u8ACC\u4FB4\uD840\uDE39\u59BF\u816C\u9856\uD866\uDCFA\u5F3B"],["8d40","\uD842\uDF9F"],["8d42","\uD848\uDDC1\uD862\uDD6D\u4102\u46BB\uD864\uDC79\u3F07\u9FB3\uD868\uDDB5\u40F8\u37D6\u46F7\uD85B\uDC46\u417C\uD861\uDEB2\uD85C\uDFFF\u456D\u38D4\uD855\uDC9A\u4561\u451B\u4D89\u4C7B\u4D76\u45EA\u3FC8\uD852\uDF0F\u3661\u44DE\u44BD\u41ED\u5D3E\u5D48\u5D56\u3DFC\u380F\u5DA4\u5DB9\u3820\u3838\u5E42\u5EBD\u5F25\u5F83\u3908\u3914\u393F\u394D\u60D7\u613D\u5CE5\u3989\u61B7\u61B9\u61CF\u39B8\u622C\u6290\u62E5\u6318\u39F8\u56B1"],["8da1","\u3A03\u63E2\u63FB\u6407\u645A\u3A4B\u64C0\u5D15\u5621\u9F9F\u3A97\u6586\u3ABD\u65FF\u6653\u3AF2\u6692\u3B22\u6716\u3B42\u67A4\u6800\u3B58\u684A\u6884\u3B72\u3B71\u3B7B\u6909\u6943\u725C\u6964\u699F\u6985\u3BBC\u69D6\u3BDD\u6A65\u6A74\u6A71\u6A82\u3BEC\u6A99\u3BF2\u6AAB\u6AB5\u6AD4\u6AF6\u6B81\u6BC1\u6BEA\u6C75\u6CAA\u3CCB\u6D02\u6D06\u6D26\u6D81\u3CEF\u6DA4\u6DB1\u6E15\u6E18\u6E29\u6E86\uD862\uDDC0\u6EBB\u6EE2\u6EDA\u9F7F\u6EE8\u6EE9\u6F24\u6F34\u3D46\uD84F\uDF41\u6F81\u6FBE\u3D6A\u3D75\u71B7\u5C99\u3D8A\u702C\u3D91\u7050\u7054\u706F\u707F\u7089\uD840\uDF25\u43C1\u35F1\uD843\uDED8"],["8e40","\uD84F\uDED7\u57BE\uD85B\uDED3\u713E\uD855\uDFE0\u364E\u69A2\uD862\uDFE9\u5B74\u7A49\uD856\uDCE1\uD865\uDCD9\u7A65\u7A7D\uD856\uDDAC\u7ABB\u7AB0\u7AC2\u7AC3\u71D1\uD859\uDC8D\u41CA\u7ADA\u7ADD\u7AEA\u41EF\u54B2\uD857\uDC01\u7B0B\u7B55\u7B29\uD854\uDF0E\uD857\uDCFE\u7BA2\u7B6F\u839C\uD856\uDFB4\uD85B\uDC7F\u7BD0\u8421\u7B92\u7BB8\uD857\uDD20\u3DAD\uD857\uDC65\u8492\u7BFA\u7C06\u7C35\uD857\uDCC1\u7C44\u7C83\uD852\uDC82\u7CA6\u667D\uD851\uDD78\u7CC9\u7CC7\u7CE6\u7C74\u7CF3\u7CF5\u7CCE"],["8ea1","\u7E67\u451D\uD85B\uDE44\u7D5D\uD85B\uDED6\u748D\u7D89\u7DAB\u7135\u7DB3\u7DD2\uD850\uDC57\uD858\uDC29\u7DE4\u3D13\u7DF5\uD845\uDFF9\u7DE5\uD860\uDF6D\u7E1D\uD858\uDD21\uD858\uDD5A\u7E6E\u7E92\u432B\u946C\u7E27\u7F40\u7F41\u7F47\u7936\uD858\uDED0\u99E1\u7F97\uD858\uDF51\u7FA3\uD845\uDE61\uD840\uDC68\u455C\uD84D\uDF66\u4503\uD860\uDF3A\u7FFA\uD859\uDC89\u8005\u8008\u801D\u8028\u802F\uD868\uDC87\uD85B\uDCC3\u803B\u803C\u8061\uD849\uDF14\u4989\uD859\uDE26\uD84F\uDDE3\uD859\uDEE8\u6725\u80A7\uD862\uDE48\u8107\u811A\u58B0\uD849\uDEF6\u6C7F\uD859\uDC98\uD853\uDFB8\u64E7\uD845\uDC8A\u8218\uD846\uDC5E\u6A53\uD852\uDE65\uD852\uDE95\u447A\u8229\uD842\uDF0D\uD85A\uDE52\uD84F\uDD7E\u4FF9\uD845\uDCFD\u84E2\u8362\uD85A\uDF0A\uD852\uDDA7\uD84D\uDD30\uD845\uDF73\uD84F\uDDF8\u82AA\u691B\uD87E\uDD94\u41DB"],["8f40","\u854B\u82D0\u831A\uD843\uDE16\uD845\uDFB4\u36C1\uD84C\uDD7D\uD84D\uDD5A\u827B\u82E2\u8318\uD84F\uDE8B\uD85B\uDDA3\uD85A\uDF05\uD85A\uDF97\uD84D\uDDCE\u3DBF\u831D\u55EC\u8385\u450B\uD85B\uDDA5\u83AC\u83C1\u83D3\u347E\uD85B\uDED4\u6A57\u855A\u3496\uD85B\uDE42\uD84B\uDEEF\u8458\uD856\uDFE4\u8471\u3DD3\u44E4\u6AA7\u844A\uD84F\uDCB5\u7958\u84A8\uD85A\uDF96\uD85B\uDE77\uD85B\uDE43\u84DE\u840F\u8391\u44A0\u8493\u84E4\uD857\uDC91\u4240\uD857\uDCC0\u4543\u8534\u5AF2\uD85B\uDE99\u4527\u8573\u4516\u67BF\u8616"],["8fa1","\uD861\uDE25\uD861\uDE3B\u85C1\uD85C\uDC88\u8602\uD845\uDD82\uD85C\uDCCD\uD87E\uDDB2\u456A\u8628\u3648\uD846\uDCA2\u53F7\uD85C\uDF9A\u867E\u8771\uD868\uDCF8\u87EE\uD84B\uDC27\u87B1\u87DA\u880F\u5661\u866C\u6856\u460F\u8845\u8846\uD85D\uDDE0\uD84F\uDDB9\uD85D\uDDE4\u885E\u889C\u465B\u88B4\u88B5\u63C1\u88C5\u7777\uD85D\uDF0F\u8987\u898A\u89A6\u89A9\u89A7\u89BC\uD862\uDE25\u89E7\uD85E\uDD24\uD85E\uDEBD\u8A9C\u7793\u91FE\u8A90\uD85E\uDE59\u7AE9\uD85E\uDF3A\uD84F\uDF8F\u4713\uD85E\uDF38\u717C\u8B0C\u8B1F\uD855\uDC30\uD855\uDD65\u8B3F\u8B4C\u8B4D\u8AA9\uD852\uDE7A\u8B90\u8B9B\u8AAF\uD845\uDEDF\u4615\u884F\u8C9B\uD85F\uDD54\uD85F\uDD8F\uD87E\uDDD4\u3725\uD85F\uDD53\u8CD6\uD85F\uDD98\uD85F\uDDBD\u8D12\u8D03\uD846\uDD10\u8CDB\u705C\u8D11\uD853\uDCC9\u3ED0\u8D77"],["9040","\u8DA9\uD860\uDC02\uD844\uDC14\uD852\uDD8A\u3B7C\uD860\uDDBC\uD85C\uDD0C\u7AE7\u8EAD\u8EB6\u8EC3\u92D4\u8F19\u8F2D\uD860\uDF65\uD861\uDC12\u8FA5\u9303\uD868\uDE9F\uD842\uDE50\u8FB3\u492A\uD862\uDDDE\uD861\uDD3D\uD84F\uDDBB\u5EF8\uD84C\uDE62\u8FF9\uD868\uDC14\uD861\uDEBC\uD861\uDD01\uD848\uDF25\u3980\uD85B\uDED7\u9037\uD861\uDD3C\uD85E\uDEBE\u9061\uD861\uDD6C\uD861\uDE0B\u90A8\uD861\uDF13\u90C4\uD861\uDEE6\u90AE\u90FD\u9167\u3AF0\u91A9\u91C4\u7CAC\uD862\uDD33\uD847\uDE89\u920E\u6C9F\u9241\u9262\uD855\uDDB9\u92B9\uD862\uDEC6\uD84F\uDC9B\uD862\uDF0C\uD855\uDDDB"],["90a1","\uD843\uDD31\u932C\u936B\uD862\uDEE1\uD862\uDFEB\u708F\u5AC3\uD862\uDEE2\uD862\uDEE5\u4965\u9244\uD862\uDFEC\uD863\uDC39\uD862\uDFFF\u9373\u945B\u8EBC\u9585\u95A6\u9426\u95A0\u6FF6\u42B9\uD849\uDE7A\uD861\uDED8\uD844\uDE7C\uD84F\uDE2E\u49DF\u6C1C\u967B\u9696\u416C\u96A3\uD85B\uDED5\u61DA\u96B6\u78F5\uD862\uDEE0\u96BD\u53CC\u49A1\uD85B\uDCB8\uD840\uDE74\uD859\uDC10\uD864\uDCAF\uD864\uDCE5\uD852\uDED1\uD846\uDD15\uD84C\uDF0A\u9731\u8642\u9736\u4A0F\u453D\u4585\uD852\uDEE9\u7075\u5B41\u971B\u975C\uD864\uDDD5\u9757\u5B4A\uD864\uDDEB\u975F\u9425\u50D0\uD84C\uDCB7\uD84C\uDCBC\u9789\u979F\u97B1\u97BE\u97C0\u97D2\u97E0\uD855\uDC6C\u97EE\u741C\uD865\uDC33\u97FF\u97F5\uD865\uDC1D\uD85E\uDD7A\u4AD1\u9834\u9833\u984B\u9866\u3B0E\uD85C\uDD75\u3D51\uD841\uDE30\uD850\uDD5C"],["9140","\uD855\uDF06\u98CA\u98B7\u98C8\u98C7\u4AFF\uD85B\uDD27\uD845\uDED3\u55B0\u98E1\u98E6\u98EC\u9378\u9939\uD852\uDE29\u4B72\uD866\uDC57\uD866\uDD05\u99F5\u9A0C\u9A3B\u9A10\u9A58\uD855\uDF25\u36C4\uD864\uDCB1\uD866\uDFD5\u9AE0\u9AE2\uD866\uDF05\u9AF4\u4C0E\u9B14\u9B2D\uD861\uDE00\u5034\u9B34\uD85A\uDDA8\u38C3\uD84C\uDC7D\u9B50\u9B40\uD867\uDD3E\u5A45\uD846\uDC63\u9B8E\uD850\uDE4B\u9C02\u9BFF\u9C0C\uD867\uDE68\u9DD4\uD867\uDFB7\uD868\uDD92\uD868\uDDAB\uD868\uDCE1\uD868\uDD23\uD868\uDDDF\u9D7E\u9D83\uD868\uDD34\u9E0E\u6888"],["91a1","\u9DC4\uD848\uDD5B\uD868\uDD93\uD868\uDE20\uD846\uDD3B\uD868\uDE33\u9D39\uD868\uDCB9\uD868\uDEB4\u9E90\u9E95\u9E9E\u9EA2\u4D34\u9EAA\u9EAF\uD850\uDF64\u9EC1\u3B60\u39E5\u3D1D\u4F32\u37BE\uD863\uDC2B\u9F02\u9F08\u4B96\u9424\uD85B\uDDA2\u9F17\u9F16\u9F39\u569F\u568A\u9F45\u99B8\uD864\uDC8B\u97F2\u847F\u9F62\u9F69\u7ADC\u9F8E\u7216\u4BBE\uD852\uDD75\uD852\uDDBB\u7177\uD852\uDDF8\uD850\uDF48\uD852\uDE51\u739E\uD862\uDFDA\uD846\uDCFA\u799F\uD862\uDD7E\uD863\uDE36\u9369\u93F3\uD862\uDE44\u92EC\u9381\u93CB\uD862\uDD6C\uD851\uDCB9\u7217\u3EEB\u7772\u7A43\u70D0\uD851\uDC73\uD850\uDFF8\u717E\uD845\uDFEF\u70A3\uD846\uDCBE\uD84D\uDD99\u3EC7\uD846\uDC85\uD855\uDC2F\uD845\uDFF8\u3722\uD845\uDEFB\uD846\uDC39\u36E1\uD845\uDF74\uD846\uDCD1\uD857\uDF4B\u3723\uD845\uDEC0\u575B\uD852\uDE25\uD844\uDFFE\uD844\uDEA8"],["9240","\uD844\uDFC6\uD845\uDCB6\u8503\uD84D\uDEA6\u8503\u8455\uD852\uDD94\uD85C\uDD65\uD84F\uDE31\uD855\uDD5C\uD84F\uDEFB\uD85C\uDC52\u44F4\uD84D\uDEEE\uD866\uDD9D\uD85B\uDF26\u67F9\u3733\u3C15\u3DE7\u586C\uD846\uDD22\u6810\u4057\uD84D\uDF3F\uD850\uDCE1\uD850\uDC8B\uD850\uDD0F\uD85B\uDC21\u54CB\u569E\uD859\uDEB1\u5692\uD843\uDFDF\uD842\uDFA8\uD843\uDE0D\u93C6\uD862\uDF13\u939C\u4EF8\u512B\u3819\uD851\uDC36\u4EBC\uD841\uDC65\uD840\uDF7F\u4F4B\u4F8A\uD855\uDE51\u5A68\uD840\uDDAB\uD840\uDFCB\u3999\uD840\uDF0A\uD841\uDC14\u3435\u4F29\uD840\uDEC0\uD863\uDEB3\uD840\uDE75\u8ADA\uD840\uDE0C\u4E98"],["92a1","\u50CD\u510D\u4FA2\u4F03\uD852\uDE0E\uD84F\uDE8A\u4F42\u502E\u506C\u5081\u4FCC\u4FE5\u5058\u50FC\u5159\u515B\u515D\u515E\u6E76\uD84D\uDD95\uD84F\uDE39\uD84F\uDEBF\u6D72\uD846\uDC84\uD84F\uDE89\u51A8\u51C3\uD841\uDDE0\u44DD\uD841\uDCA3\uD841\uDC92\uD841\uDC91\u8D7A\uD862\uDE9C\uD841\uDF0E\u5259\u52A4\uD842\uDC73\u52E1\u936E\u467A\u718C\uD850\uDF8C\uD843\uDC20\uD852\uDDAC\uD844\uDCE4\u69D1\uD843\uDE1D\u7479\u3EDE\u7499\u7414\u7456\u7398\u4B8E\uD852\uDEBC\uD850\uDC8D\u53D0\u3584\u720F\uD850\uDCC9\u55B4\uD840\uDF45\u54CD\uD842\uDFC6\u571D\u925D\u96F4\u9366\u57DD\u578D\u577F\u363E\u58CB\u5A99\uD862\uDE46\uD845\uDEFA\uD845\uDF6F\uD845\uDF10\u5A2C\u59B8\u928F\u5A7E\u5ACF\u5A12\uD856\uDD46\uD846\uDDF3\uD846\uDC61\uD850\uDE95\u36F5\u6D05\u7443\u5A21\uD857\uDE83"],["9340","\u5A81\uD862\uDFD7\uD841\uDC13\u93E0\u748C\uD844\uDF03\u7105\u4972\u9408\uD862\uDDFB\u93BD\u37A0\u5C1E\u5C9E\u5E5E\u5E48\uD846\uDD96\uD846\uDD7C\uD84E\uDEEE\u5ECD\u5B4F\uD846\uDD03\uD846\uDD04\u3701\uD846\uDCA0\u36DD\uD845\uDEFE\u36D3\u812A\uD862\uDE47\uD847\uDDBA\uD84D\uDC72\uD862\uDDA8\u5F0C\u5F0E\uD846\uDD27\uD845\uDFAB\u5A6B\uD845\uDF3B\u5B44\u8614\uD85D\uDDFD\u8860\u607E\uD84A\uDC60\uD849\uDE2B\u5FDB\u3EB8\uD849\uDDAF\uD849\uDDBE\uD864\uDC88\uD85B\uDF73\u61C0\uD840\uDC3E\uD840\uDC46\uD849\uDE1B\u6199\u6198\u6075\uD84B\uDC9B\uD84B\uDD07\uD851\uDED4\uD864\uDD4D"],["93a1","\u6471\uD851\uDE65\uD84A\uDF6A\u3A29\uD84A\uDF22\uD84D\uDC50\uD866\uDCEA\uD84B\uDE78\u6337\uD869\uDC5B\u64B6\u6331\u63D1\uD852\uDDE3\uD84B\uDD67\u62A4\uD84B\uDCA1\u643B\u656B\u6972\u3BF4\uD84C\uDC8E\uD84C\uDEAD\uD852\uDD89\uD84C\uDEAB\u550D\uD84C\uDEE0\uD846\uDCD9\uD865\uDC3F\u66CE\uD84C\uDE89\uD84C\uDDB3\u3AE0\u4190\uD855\uDD84\uD862\uDF22\uD855\uDD8F\uD845\uDEFC\uD855\uDD5B\uD855\uDC25\u78EE\uD84C\uDD03\uD846\uDC2A\uD84C\uDE34\u3464\uD84C\uDE0F\uD84C\uDD82\uD850\uDEC9\u668E\uD85B\uDD24\u666B\u4B93\u6630\uD85E\uDC70\uD847\uDDEB\u6663\uD84C\uDED2\uD84C\uDEE1\u661E\uD856\uDC72\u38D1\uD84E\uDC3A\uD84D\uDFBC\u3B99\uD84D\uDFA2\uD84C\uDFFE\u74D0\u3B96\u678F\uD851\uDE2A\u68B6\u681E\u3BC4\u6ABE\u3863\uD84D\uDFD5\uD851\uDC87\u6A33\u6A52\u6AC9\u6B05\uD846\uDD12\u6511\u6898\u6A4C\u3BD7\u6A7A\u6B57\uD84F\uDFC0\uD84F\uDC9A\u93A0\u92F2\uD862\uDFEA\uD862\uDECB"],["9440","\u9289\uD860\uDC1E\uD862\uDDDC\u9467\u6DA5\u6F0B\uD852\uDDEC\u6D67\uD84F\uDF7F\u3D8F\u6E04\uD850\uDC3C\u5A3D\u6E0A\u5847\u6D24\u7842\u713B\uD850\uDF1A\uD850\uDE76\u70F1\u7250\u7287\u7294\uD851\uDF8F\uD851\uDF25\u5179\uD852\uDEA4\uD841\uDDEB\u747A\uD84F\uDEF8\uD84D\uDE5F\uD852\uDE4A\uD852\uDD17\uD857\uDFE1\u3F06\u3EB1\uD852\uDEDF\uD863\uDC23\uD84F\uDF35\u60A7\u3EF3\u74CC\u743C\u9387\u7437\u449F\uD85B\uDDEA\u4551\u7583\u3F63\uD853\uDCD9\uD853\uDD06\u3F58\u7555\u7673\uD869\uDDC6\u3B19\u7468\uD862\uDECC\uD852\uDDAB\uD852\uDD8E\u3AFB"],["94a1","\u3DCD\uD852\uDE4E\u3EFF\uD852\uDDC5\uD852\uDCF3\u91FA\u5732\u9342\uD862\uDEE3\uD846\uDC64\u50DF\uD854\uDE21\uD854\uDDE7\u7778\uD84C\uDE32\u770E\u770F\u777B\uD851\uDE97\uD84D\uDF81\u3A5E\uD852\uDCF0\u7438\u749B\u3EBF\uD852\uDEBA\uD852\uDEC7\u40C8\uD852\uDE96\uD858\uDDAE\u9307\uD855\uDD81\u781E\u788D\u7888\u78D2\u73D0\u7959\uD85D\uDF41\uD855\uDEE3\u410E\u799B\u8496\u79A5\u6A2D\uD84F\uDEFA\u7A3A\u79F4\u416E\uD845\uDEE6\u4132\u9235\u79F1\uD843\uDD4C\uD852\uDD8C\uD840\uDE99\uD84F\uDDBA\uD845\uDF6E\u3597\u556B\u3570\u36AA\uD840\uDDD4\uD843\uDC0D\u7AE2\u5A59\uD849\uDEF5\uD856\uDEAF\uD856\uDE9C\u5A0D\uD840\uDE5B\u78F0\u5A2A\uD856\uDFC6\u7AFE\u41F9\u7C5D\u7C6D\u4211\uD856\uDFB3\uD857\uDEBC\uD857\uDEA6\u7CCD\uD852\uDDF9\uD845\uDFB0\u7C8E\u7C7C\u7CAE\u6AB2\u7DDC\u7E07\u7DD3\u7F4E\uD858\uDE61"],["9540","\uD858\uDD5C\uD85E\uDF48\u7D97\uD857\uDE82\u426A\uD85A\uDF75\uD842\uDD16\u67D6\uD840\uDC4E\uD84D\uDDCF\u57C4\uD859\uDC12\uD858\uDFF8\uD852\uDD62\u7FDD\u7B27\uD842\uDC2C\uD856\uDEE9\uD857\uDD43\u7B0C\uD857\uDE0E\u99E6\u8645\u9A63\u6A1C\uD84D\uDC3F\u39E2\uD852\uDDF7\uD859\uDDAD\u9A1F\uD859\uDDA0\u8480\uD85C\uDD27\uD85B\uDCD1\u44EA\u8137\u4402\u80C6\u8109\u8142\uD859\uDFB4\u98C3\uD85A\uDE42\u8262\u8265\uD85A\uDE51\u8453\uD85B\uDDA7\u8610\uD85C\uDE1B\u5A86\u417F\uD846\uDC40\u5B2B\uD846\uDCA1\u5AE4\uD846\uDCD8\u86A0\uD87E\uDDBC\uD84F\uDD8F\u882D\uD85D\uDC22\u5A02"],["95a1","\u886E\u4F45\u8887\u88BF\u88E6\u8965\u894D\uD855\uDE83\u8954\uD85D\uDF85\uD85D\uDF84\uD862\uDFF5\uD862\uDFD9\uD862\uDF9C\uD862\uDDF9\u3EAD\u84A3\u46F5\u46CF\u37F2\u8A3D\u8A1C\uD865\uDC48\u5F4D\u922B\uD850\uDE84\u65D4\u7129\u70C4\uD846\uDC45\u9D6D\u8C9F\u8CE9\uD85F\uDDDC\u599A\u77C3\u59F0\u436E\u36D4\u8E2A\u8EA7\uD853\uDC09\u8F30\u8F4A\u42F4\u6C58\u6FBB\uD848\uDF21\u489B\u6F79\u6E8B\uD845\uDFDA\u9BE9\u36B5\uD852\uDD2F\u90BB\u9097\u5571\u4906\u91BB\u9404\uD862\uDE4B\u4062\uD862\uDEFC\u9427\uD863\uDC1D\uD863\uDC3B\u84E5\u8A2B\u9599\u95A7\u9597\u9596\uD863\uDD34\u7445\u3EC2\uD852\uDCFF\uD852\uDE42\uD850\uDFEA\u3EE7\uD84C\uDE25\u968F\uD863\uDEE7\uD863\uDE66\uD863\uDE65\u3ECC\uD852\uDDED\uD852\uDE78\uD84F\uDFEE\u7412\u746B\u3EFC\u9741\uD864\uDCB0"],["9640","\u6847\u4A1D\uD864\uDC93\uD855\uDFDF\u975D\u9368\uD862\uDD89\uD863\uDC26\uD862\uDF2F\uD858\uDFBE\u92BA\u5B11\u8B69\u493C\u73F9\uD850\uDE1B\u979B\u9771\u9938\uD843\uDF26\u5DC1\uD862\uDFC5\uD852\uDEB2\u981F\uD865\uDCDA\u92F6\uD865\uDDD7\u91E5\u44C0\uD862\uDF50\uD852\uDE67\uD862\uDF64\u98DC\uD862\uDE45\u3F00\u922A\u4925\u8414\u993B\u994D\uD85E\uDF06\u3DFD\u999B\u4B6F\u99AA\u9A5C\uD862\uDF65\uD856\uDCC8\u6A8F\u9A21\u5AFE\u9A2F\uD866\uDCF1\u4B90\uD866\uDD48\u99BC\u4BBD\u4B97\u937D\u5872\uD844\uDF02\u5822\uD852\uDDB8"],["96a1","\uD845\uDCE8\u7844\uD849\uDF1F\uD84F\uDDB8\u68C5\u3D7D\u9458\u3927\u6150\uD849\uDF81\uD84A\uDD6B\u6107\u9C4F\u9C53\u9C7B\u9C35\u9C10\u9B7F\u9BCF\uD867\uDE2D\u9B9F\uD868\uDDF5\uD868\uDCFE\u9D21\u4CAE\uD850\uDD04\u9E18\u4CB0\u9D0C\uD868\uDDB4\uD868\uDCED\uD868\uDCF3\uD866\uDD2F\u9DA5\u84BD\uD85B\uDE12\uD85B\uDFDF\uD85A\uDF82\u85FC\u4533\uD85B\uDDA4\uD85B\uDE84\uD85B\uDDF0\u8420\u85EE\uD85B\uDE00\uD84D\uDFD7\uD858\uDC64\u79E2\uD84D\uDD9C\uD84D\uDE40\u492D\uD852\uDDDE\u3D62\u93DB\u92BE\u9348\uD840\uDEBF\u78B9\u9277\u944D\u4FE4\u3440\u9064\uD855\uDD5D\u783D\u7854\u78B6\u784B\uD845\uDF57\uD84C\uDDC9\uD852\uDD41\u369A\u4F72\u6FDA\u6FD9\u701E\u701E\u5414\uD850\uDDB5\u57BB\u58F3\u578A\u9D16\u57D7\u7134\u34AF\uD850\uDDAC\u71EB\uD85B\uDC40\uD853\uDF97\u5B28\uD845\uDFB5\uD862\uDE49"],["9740","\u610C\u5ACE\u5A0B\u42BC\uD851\uDC88\u372C\u4B7B\uD862\uDDFC\u93BB\u93B8\uD846\uDCD6\uD843\uDF1D\u8472\uD85B\uDCC0\uD845\uDC13\uD850\uDEFA\uD84B\uDC26\uD850\uDFC1\u5994\uD84F\uDDB7\uD859\uDF41\u7DA8\uD858\uDD5B\uD858\uDCA4\uD852\uDDB9\uD852\uDD8B\uD862\uDDFA\u92E5\u73E2\u3EE9\u74B4\uD862\uDF63\uD846\uDC9F\u3EE1\uD852\uDEB3\u6AD8\u73F3\u73FB\u3ED6\uD852\uDE3E\uD852\uDE94\uD845\uDFD9\uD852\uDE66\uD840\uDFA7\uD845\uDC24\uD852\uDDE5\u7448\uD852\uDD16\u70A5\uD852\uDD76\u9284\u73E6\u935F\uD841\uDCFE\u9331\uD862\uDECE\uD862\uDE16\u9386\uD862\uDFE7\uD855\uDDD5\u4935\uD862\uDE82\u716B"],["97a1","\uD852\uDD43\uD843\uDCFF\u56A4\uD841\uDE1A\uD842\uDFEB\uD843\uDCB8\u5502\u79C4\uD845\uDFFA\u7DFE\uD845\uDEC2\uD852\uDE50\uD846\uDC52\u452E\u9401\u370A\uD862\uDEC0\uD852\uDDAD\u59B0\uD846\uDCBF\uD846\uDC83\uD85D\uDC84\u5AA1\u36E2\uD84F\uDD5B\u36B0\u925F\u5A79\uD862\uDE81\uD846\uDC62\u9374\u3CCD\uD842\uDEB4\u4A96\u398A\u50F4\u3D69\u3D4C\uD844\uDF9C\u7175\u42FB\uD860\uDE18\u6E0F\uD864\uDCE4\u44EB\u6D57\uD85F\uDE4F\u7067\u6CAF\u3CD6\uD84F\uDFED\uD84F\uDE2D\u6E02\u6F0C\u3D6F\uD840\uDFF5\u7551\u36BC\u34C8\u4680\u3EDA\u4871\u59C4\u926E\u493E\u8F41\uD863\uDC1C\uD85A\uDFC0\u5812\u57C8\u36D6\uD845\uDC52\u70FE\uD850\uDF62\uD852\uDE71\uD84B\uDFE3\uD844\uDEB0\uD848\uDFBD\u68B9\u6967\uD844\uDF98\uD84D\uDCE5\uD85E\uDFF4\uD84D\uDEDF\uD862\uDE83\uD84D\uDFD6\uD84C\uDFFA\uD853\uDC9F\u6A1A\uD84D\uDEAD\uD85B\uDCB7\u843E\u44DF\u44CE"],["9840","\uD85B\uDD26\uD85B\uDD51\uD85B\uDC82\uD85B\uDFDE\u6F17\uD85C\uDD09\u833D\uD845\uDF3A\u83ED\uD85B\uDC80\uD85C\uDC53\uD845\uDFDB\u5989\u5A82\uD845\uDFB3\u5A61\u5A71\uD846\uDD05\uD850\uDDFC\u372D\u59EF\uD845\uDF3C\u36C7\u718E\u9390\u669A\uD850\uDEA5\u5A6E\u5A2B\uD850\uDE93\u6A2B\uD84F\uDEF9\uD85D\uDF36\uD851\uDC5B\uD850\uDECA\u711D\uD850\uDE59\uD862\uDDE1\u4FB0\uD85B\uDD28\u5CC2\uD851\uDCCE\uD85F\uDE4D\uD850\uDFBD\u6A0C\uD850\uDE56\uD844\uDF04\u70A6\u7133\uD850\uDFE9\u3DA5\u6CDF\uD87E\uDC25\uD852\uDE4F\u7E65\u59EB\u5D2F\u3DF3\u5F5C\uD852\uDE5D\uD845\uDFDF\u7DA4\u8426"],["98a1","\u5485\uD84E\uDEFA\uD84C\uDF00\uD840\uDE14\u577E\uD842\uDCD5\uD841\uDE19\u3FE5\uD847\uDF9E\uD868\uDEB6\u7003\uD864\uDD5B\u5D70\u738F\u7CD3\uD862\uDE59\uD865\uDC20\u4FC8\u7FE7\u72CD\u7310\uD85E\uDEF4\u7338\u7339\uD855\uDEF6\u7341\u7348\u3EA9\uD85E\uDF18\u906C\u71F5\uD852\uDCF2\u73E1\u81F6\u3ECA\u770C\u3ED1\u6CA2\u56FD\u7419\u741E\u741F\u3EE2\u3EF0\u3EF4\u3EFA\u74D3\u3F0E\u3F53\u7542\u756D\u7572\u758D\u3F7C\u75C8\u75DC\u3FC0\u764D\u3FD7\u7674\u3FDC\u767A\uD853\uDF5C\u7188\u5623\u8980\u5869\u401D\u7743\u4039\u6761\u4045\u35DB\u7798\u406A\u406F\u5C5E\u77BE\u77CB\u58F2\u7818\u70B9\u781C\u40A8\u7839\u7847\u7851\u7866\u8448\uD855\uDD35\u7933\u6803\u7932\u4103"],["9940","\u4109\u7991\u7999\u8FBB\u7A06\u8FBC\u4167\u7A91\u41B2\u7ABC\u8279\u41C4\u7ACF\u7ADB\u41CF\u4E21\u7B62\u7B6C\u7B7B\u7C12\u7C1B\u4260\u427A\u7C7B\u7C9C\u428C\u7CB8\u4294\u7CED\u8F93\u70C0\uD843\uDCCF\u7DCF\u7DD4\u7DD0\u7DFD\u7FAE\u7FB4\u729F\u4397\u8020\u8025\u7B39\u802E\u8031\u8054\u3DCC\u57B4\u70A0\u80B7\u80E9\u43ED\u810C\u732A\u810E\u8112\u7560\u8114\u4401\u3B39\u8156\u8159\u815A"],["99a1","\u4413\u583A\u817C\u8184\u4425\u8193\u442D\u81A5\u57EF\u81C1\u81E4\u8254\u448F\u82A6\u8276\u82CA\u82D8\u82FF\u44B0\u8357\u9669\u698A\u8405\u70F5\u8464\u60E3\u8488\u4504\u84BE\u84E1\u84F8\u8510\u8538\u8552\u453B\u856F\u8570\u85E0\u4577\u8672\u8692\u86B2\u86EF\u9645\u878B\u4606\u4617\u88AE\u88FF\u8924\u8947\u8991\uD85E\uDD67\u8A29\u8A38\u8A94\u8AB4\u8C51\u8CD4\u8CF2\u8D1C\u4798\u585F\u8DC3\u47ED\u4EEE\u8E3A\u55D8\u5754\u8E71\u55F5\u8EB0\u4837\u8ECE\u8EE2\u8EE4\u8EED\u8EF2\u8FB7\u8FC1\u8FCA\u8FCC\u9033\u99C4\u48AD\u98E0\u9213\u491E\u9228\u9258\u926B\u92B1\u92AE\u92BF"],["9a40","\u92E3\u92EB\u92F3\u92F4\u92FD\u9343\u9384\u93AD\u4945\u4951\u9EBF\u9417\u5301\u941D\u942D\u943E\u496A\u9454\u9479\u952D\u95A2\u49A7\u95F4\u9633\u49E5\u67A0\u4A24\u9740\u4A35\u97B2\u97C2\u5654\u4AE4\u60E8\u98B9\u4B19\u98F1\u5844\u990E\u9919\u51B4\u991C\u9937\u9942\u995D\u9962\u4B70\u99C5\u4B9D\u9A3C\u9B0F\u7A83\u9B69\u9B81\u9BDD\u9BF1\u9BF4\u4C6D\u9C20\u376F\uD846\uDFC2\u9D49\u9C3A"],["9aa1","\u9EFE\u5650\u9D93\u9DBD\u9DC0\u9DFC\u94F6\u8FB6\u9E7B\u9EAC\u9EB1\u9EBD\u9EC6\u94DC\u9EE2\u9EF1\u9EF8\u7AC8\u9F44\uD840\uDC94\uD840\uDEB7\uD840\uDFA0\u691A\u94C3\u59AC\uD841\uDCD7\u5840\u94C1\u37B9\uD841\uDDD5\uD841\uDE15\uD841\uDE76\uD845\uDEBA\u5757\u7173\uD842\uDEC2\uD842\uDECD\uD842\uDFBF\u546A\uD87E\uDC3B\uD842\uDFCB\u549E\uD842\uDFFB\uD843\uDC3B\uD843\uDC53\uD843\uDC65\uD843\uDC7C\u60E7\uD843\uDC8D\u567A\uD843\uDCB5\uD843\uDCDD\uD843\uDCED\uD843\uDD6F\uD843\uDDB2\uD843\uDDC8\u6955\u9C2F\u87A5\uD843\uDE04\uD843\uDE0E\uD843\uDED7\uD843\uDF90\uD843\uDF2D\uD843\uDE73\u5C20\uD843\uDFBC\u5E0B\uD844\uDC5C\uD844\uDC4F\uD844\uDC76\u671E\uD844\uDC7B\uD844\uDC88\uD844\uDC96\u3647\uD844\uDCBF\uD844\uDCD3\uD844\uDD2F\uD844\uDD3B\u5364\u84AD\uD844\uDEE3\uD844\uDF75\uD844\uDF36\u8B81\uD845\uDD77\uD845\uDE19\uD845\uDFC3\uD845\uDFC7\u4E78\u70BB\uD846\uDC2D\uD846\uDD6A"],["9b40","\uD846\uDE2D\uD846\uDE45\uD847\uDC2A\uD847\uDC70\uD847\uDCAC\uD847\uDEC8\u62C3\uD847\uDED5\uD847\uDF15\u7198\u6855\uD848\uDC45\u69E9\u36C8\uD848\uDE7C\uD848\uDFD7\uD848\uDFFA\uD849\uDF2A\uD84A\uDC71\uD84A\uDD4F\u82FD\uD84A\uDD67\uD84A\uDD93\uD84A\uDED5\u89A5\uD84A\uDEE8\u8FA0\uD84A\uDF0E\u97B8\uD84A\uDF3F\u9847\u9ABD\uD84B\uDC4C"],["9b62","\uD84B\uDC88\uD84B\uDCB7\uD856\uDFE8\uD84B\uDD08\uD84B\uDD12\uD84B\uDDB7\uD84B\uDD95\uD84B\uDE42\uD84B\uDF74\uD84B\uDFCC\uD84C\uDC33\uD84C\uDC66\uD84C\uDF1F\uD84C\uDFDE\u5FB1\u6648\u66BF\uD85E\uDE79\uD84D\uDD67\uD84D\uDDF3\u7201\uD852\uDDBA\u77D7\uD84D\uDE1A\uD84D\uDF16\u7E87\uD840\uDF46\u58B5\u670E"],["9ba1","\u6918\uD84E\uDEA7\uD85D\uDE57\uD857\uDFE2\uD84F\uDE11\uD84F\uDEB9\uD85D\uDDFE\uD848\uDC9A\u48D0\u4AB8\uD850\uDD19\uD862\uDE9A\uD850\uDEEE\uD850\uDF0D\uD850\uDC3B\uD850\uDF34\uD850\uDF96\uD852\uDE45\uD841\uDDCA\u51D2\uD841\uDE11\u599F\uD847\uDEA8\u3BBE\uD84F\uDCFF\uD851\uDC04\uD851\uDCD6\u5788\uD851\uDE74\u399B\uD851\uDF2F\uD861\uDDE8\uD866\uDDC9\u3762\uD848\uDDC3\u8B5E\uD862\uDF4E\u99D6\uD852\uDC12\uD852\uDCFB\uD852\uDE15\u7209\uD852\uDEC0\uD843\uDC78\u5965\uD853\uDEA5\uD853\uDF86\uD841\uDF79\u8EDA\uD854\uDC2C\u528F\u573F\u7171\uD854\uDE99\uD855\uDC19\uD84F\uDF4A\uD852\uDEA7\u55BC\uD855\uDC46\uD855\uDC6E\uD85A\uDF52\u91D4\u3473\uD855\uDD3F\uD85D\uDE32\uD855\uDD5E\u4718\uD855\uDD62\uD855\uDD66\uD855\uDFC7\uD852\uDD3F\uD856\uDC5D\u5066\u34FB\uD84C\uDFCC\u60DE\uD856\uDD03\u477C\uD862\uDD48\uD856\uDEAE\uD856\uDF89\uD857\uDC06\uD847\uDD90\u57A1\u7151\u6FB6\uD858\uDD02\uD85F\uDC12\u9056\uD858\uDDB2\uD853\uDF9A\u8B62\uD859\uDC02\uD859\uDC4A"],["9c40","\u5D5B\uD85A\uDFF7\u8F36\uD859\uDC84\uD846\uDD1C\u8AEA\uD852\uDDF6\uD859\uDC88\uD84F\uDFEF\uD859\uDD12\u4BC0\uD859\uDDBF\uD859\uDEB5\uD849\uDF1B\u9465\uD855\uDFE1\u6195\u5A27\uD87E\uDCCD\u4FBB\u56B9\uD851\uDD21\uD859\uDEFC\u4E6A\uD852\uDD34\u9656\u6D8F\uD85B\uDCBD\u3618\u8977\uD859\uDF99\uD85A\uDC6E\uD859\uDC11\uD85A\uDC5E\u71DF\uD85A\uDCC7\u7B42\uD864\uDCC0\uD842\uDE11\uD85A\uDD26\u9104\uD85A\uDD39\u7A45\u9DF0\uD85A\uDDFA\u9A26\uD85A\uDE2D\u365F\uD859\uDC69\uD840\uDC21\u7983\uD85A\uDE34\uD85A\uDF5B\u5D2C\uD84D\uDD19\u83CF\uD85A\uDF9D\u46D0\uD85B\uDCA4\u753B\u8865\uD85B\uDDAE\u58B6"],["9ca1","\u371C\uD849\uDD8D\uD85C\uDC4B\uD85C\uDDCD\u3C54\uD85C\uDE80\uD85C\uDE85\u9281\uD848\uDD7A\uD85C\uDE8B\u9330\uD85C\uDEE6\uD852\uDDD0\u6C39\u949F\uD85D\uDC50\uD843\uDEF8\u8827\u88F5\uD84A\uDD26\uD861\uDC73\uD845\uDFB1\u6EB8\uD852\uDE2A\uD846\uDC20\u39A4\u36B9\u5C10\u79E3\u453F\u66B6\uD867\uDCAD\uD866\uDCA4\u8943\uD85D\uDFCC\uD85E\uDC58\u56D6\u40DF\uD845\uDE0A\u39A1\uD84D\uDF2F\uD860\uDCE8\uD844\uDFC5\u71AD\u8366\uD85E\uDDDD\uD864\uDDA8\u5A67\u4CB7\uD85C\uDCAF\uD862\uDDAB\uD85E\uDDFD\uD85E\uDE0A\uD85E\uDF0B\uD85F\uDD66\uD850\uDD7A\u7B43\u797E\uD860\uDC09\u6FB5\uD868\uDEDF\u6A03\uD860\uDF18\u53A2\uD85B\uDE07\u93BF\u6836\u975D\uD860\uDD6F\uD860\uDC23\uD85A\uDDB5\uD844\uDFED\uD84C\uDE2F\uD860\uDC48\u5D85\uD863\uDC30\uD860\uDC83\u5715\u9823\uD862\uDD49\u5DAB\uD852\uDD88\u65BE\u69D5\u53D2\uD852\uDEA5\uD84F\uDF81\u3C11\u6736\uD860\uDC90\uD860\uDCF4\uD860\uDD2E\uD847\uDFA1\uD860\uDD4F"],["9d40","\uD860\uDD89\uD860\uDDAF\uD860\uDE1A\uD860\uDF06\uD860\uDF2F\uD860\uDF8A\u35CA\uD861\uDC68\uD861\uDEAA\u48FA\u63E6\uD862\uDD56\u7808\u9255\uD862\uDDB8\u43F2\uD862\uDDE7\u43DF\uD862\uDDE8\uD862\uDF46\uD862\uDFD4\u59F8\uD863\uDC09\u8F0B\uD863\uDFC5\uD864\uDCEC\u7B51\uD864\uDD10\uD864\uDD3C\u3DF7\uD864\uDD5E\uD852\uDECA\u8FD0\u728F\u568B\uD865\uDCE7\uD865\uDDE9\uD865\uDDB0\uD865\uDDB8\uD865\uDF32\uD866\uDCD1\uD866\uDD49\uD866\uDD6A\uD866\uDDC3\uD866\uDE28\uD866\uDF0E\uD867\uDD5A\uD867\uDD9B\u7E9F\uD867\uDEF8\uD867\uDF23\u4CA4\u9547\uD868\uDE93\u71A2\uD868\uDEFF\u4D91\u9012\uD869\uDDCB\u4D9C\uD843\uDC9C\u8FBE\u55C1"],["9da1","\u8FBA\uD849\uDCB0\u8FB9\uD852\uDE93\u4509\u7E7F\u6F56\u6AB1\u4EEA\u34E4\uD862\uDF2C\uD85E\uDC9D\u373A\u8E80\uD845\uDFF5\uD860\uDC24\uD862\uDF6C\uD862\uDF99\uD85E\uDE3E\uD859\uDEAF\u3DEB\uD85D\uDE55\uD84F\uDCB7\uD855\uDE35\uD856\uDD56\u4E9A\uD857\uDE81\uD858\uDE58\u56BF\uD843\uDE6D\u8E0E\u5B6D\uD84F\uDE88\uD853\uDC9E\u63DE\u62D0\uD845\uDFF6\uD846\uDC7B\u6530\u562D\uD857\uDC4A\u541A\uD854\uDF11\u3DC6\uD867\uDD98\u4C7D\u5622\u561E\u7F49\uD857\uDED8\u5975\uD84F\uDD40\u8770\u4E1C\uD843\uDFEA\uD843\uDD49\uD84D\uDEBA\u8117\u9D5E\u8D18\u763B\u9C45\u764E\u77B9\u9345\u5432\u8148\u82F7\u5625\u8132\u8418\u80BD\u55EA\u7962\u5643\u5416\uD843\uDE9D\u35CE\u5605\u55F1\u66F1\uD860\uDEE2\u362D\u7534\u55F0\u55BA\u5497\u5572\uD843\uDC41\uD843\uDC96\u5ED0\uD854\uDD48\uD843\uDE76\uD84B\uDC62"],["9e40","\uD843\uDEA2\u9EAB\u7D5A\u55DE\uD844\uDC75\u629D\u976D\u5494\u8CCD\u71F6\u9176\u63FC\u63B9\u63FE\u5569\uD84A\uDF43\u9C72\uD84B\uDEB3\u519A\u34DF\uD843\uDDA7\u51A7\u544D\u551E\u5513\u7666\u8E2D\uD85A\uDC8A\u75B1\u80B6\u8804\u8786\u88C7\u81B6\u841C\uD844\uDCC1\u44EC\u7304\uD851\uDF06\u5B90\u830B\uD85A\uDC93\u567B\uD849\uDEF4\uD85F\uDD2F\uD850\uDDA3\uD85F\uDD73\uD85B\uDED0\uD85C\uDEB6\u9170\uD844\uDDD9\u9208\uD84F\uDCFC\uD869\uDEA9\uD843\uDEAC\uD843\uDEF9\u7266\uD847\uDCA2\u474E\uD853\uDFC2\uD85F\uDFF9\uD843\uDFEB\u40FA"],["9ea1","\u9C5D\u651F\uD84B\uDDA0\u48F3\uD851\uDFE0\uD867\uDD7C\uD843\uDFEC\uD843\uDE0A\u6062\uD85D\uDDA3\uD843\uDFED"],["9ead","\uD858\uDC48\uD844\uDD87\u71A3\u7E8E\u9D50\u4E1A\u4E04\u3577\u5B0D\u6CB2\u5367\u36AC\u39DC\u537D\u36A5\uD851\uDE18\u589A\uD852\uDF6E\u822D\u544B\u57AA\uD856\uDE95\uD842\uDD79"],["9ec5","\u3A52\uD849\uDC65\u7374\uD867\uDEAC\u4D09\u9BED\uD84F\uDCFE\uD867\uDF30\u4C5B\uD853\uDFA9\uD865\uDD9E\uD867\uDFDE\u845C\uD84F\uDDB6\uD85C\uDEB2\uD859\uDFB3\uD84D\uDF20\u632E\u7D25\uD84F\uDEF7\uD84F\uDE2C\u3A2A\u9008\u52CC\u3E74\u367A\u45E9\uD841\uDC8E\u7640\u5AF0\uD843\uDEB6\u787A\uD85F\uDF2E\u58A7\u40BF\u567C\u9B8B\u5D74\u7654\uD869\uDC34\u9E85\u4CE1\u75F9\u37FB\u6119\uD84C\uDCDA\uD850\uDFF2"],["9ef5","\u565D\uD844\uDEA9\u57A7\uD852\uDD63\uD867\uDE06\u5234\uD85C\uDCAE\u35AD\u6C4A\u9D7C"],["9f40","\u7C56\u9B39\u57DE\uD845\uDF6C\u5C53\u64D3\uD865\uDCD0\uD858\uDF35\uD85C\uDD64\u86AD\uD843\uDD28\uD85B\uDD22\uD852\uDEE2\uD843\uDD71"],["9f4f","\u51FE\uD847\uDF0F\u5D8E\u9703\uD847\uDDD1\u9E81\u904C\u7B1F\u9B02\u5CD1\u7BA3\u6268\u6335\u9AFF\u7BCF\u9B2A\u7C7E\u9B2E\u7C42\u7C86\u9C15\u7BFC\u9B09\u9F17\u9C1B\uD852\uDD3E\u9F5A\u5573\u5BC3\u4FFD\u9E98\u4FF2\u5260\u3E06\u52D1\u5767\u5056\u59B7\u5E12\u97C8\u9DAB\u8F5C\u5469\u97B4\u9940\u97BA\u532C\u6130"],["9fa1","\u692C\u53DA\u9C0A\u9D02\u4C3B\u9641\u6980\u50A6\u7546\uD845\uDF6D\u99DA\u5273"],["9fae","\u9159\u9681\u915C"],["9fb2","\u9151\uD863\uDE97\u637F\uD85B\uDD23\u6ACA\u5611\u918E\u757A\u6285\uD840\uDFFC\u734F\u7C70\uD857\uDC21\uD84F\uDCFD"],["9fc1","\uD852\uDD19\u76D6\u9B9D\u4E2A\uD843\uDCD4\u83BE\u8842"],["9fc9","\u5C4A\u69C0\u50ED\u577A\u521F\u5DF5\u4ECE\u6C31\uD840\uDDF2\u4F39\u549C\u54DA\u529A\u8D82\u35FE\u5F0C\u35F3"],["9fdb","\u6B52\u917C\u9FA5\u9B97\u982E\u98B4\u9ABA\u9EA8\u9E84\u717A\u7B14"],["9fe7","\u6BFA\u8818\u7F78"],["9feb","\u5620\uD869\uDE4A\u8E77\u9F53"],["9ff0","\u8DD4\u8E4F\u9E1C\u8E01\u6282\uD860\uDF7D\u8E28\u8E75\u7AD3\uD852\uDE77\u7A3E\u78D8\u6CEA\u8A67\u7607"],["a040","\uD862\uDE5A\u9F26\u6CCE\u87D6\u75C3\uD868\uDEB2\u7853\uD87E\uDC40\u8D0C\u72E2\u7371\u8B2D\u7302\u74F1\u8CEB\uD852\uDEBB\u862F\u5FBA\u88A0\u44B7"],["a055","\uD846\uDC3B\uD85B\uDE05"],["a058","\u8A7E\uD849\uDD1B"],["a05b","\u60FD\u7667\u9AD7\u9D44\u936E\u9B8F\u87F5"],["a063","\u880F\u8CF7\u732C\u9721\u9BB0\u35D6\u72B2\u4C07\u7C51\u994A\uD858\uDD59\u6159\u4C04\u9E96\u617D"],["a073","\u575F\u616F\u62A6\u6239\u62CE\u3A5C\u61E2\u53AA\uD84C\uDFF5\u6364\u6802\u35D2"],["a0a1","\u5D57\uD862\uDFC2\u8FDA\uD863\uDE39"],["a0a6","\u50D9\uD847\uDD46\u7906\u5332\u9638\uD843\uDF3B\u4065"],["a0ae","\u77FE"],["a0b0","\u7CC2\uD857\uDF1A\u7CDA\u7A2D\u8066\u8063\u7D4D\u7505\u74F2\u8994\u821A\u670C\u8062\uD85D\uDC86\u805B\u74F0\u8103\u7724\u8989\uD859\uDFCC\u7553\uD85B\uDED1\u87A9\u87CE\u81C8\u878C\u8A49\u8CAD\u8B43\u772B\u74F8\u84DA\u3635\u69B2\u8DA6"],["a0d4","\u89A9\u7468\u6DB9\u87C1\uD850\uDC11\u74E7\u3DDB\u7176\u60A4\u619C\u3CD1\u7162\u6077"],["a0e2","\u7F71\uD862\uDF2D\u7250\u60E9\u4B7E\u5220\u3C18\uD84F\uDCC7\uD857\uDED7\uD85D\uDE56\uD855\uDD31\uD846\uDD44\uD844\uDEFE\uD866\uDD03\uD85B\uDDDC\uD85C\uDCAD\u5CC1\uD858\uDDAD\uD862\uDE0F\uD84D\uDE77\uD840\uDCEE\uD85A\uDC46\uD853\uDF0E\u4562\u5B1F\uD858\uDF4C\u9F50\u9EA6\uD858\uDE6B"],["a3c0","\u2400",31,"\u2421"],["c6a1","\u2460",9,"\u2474",9,"\u2170",9,"\u4E36\u4E3F\u4E85\u4EA0\u5182\u5196\u51AB\u52F9\u5338\u5369\u53B6\u590A\u5B80\u5DDB\u2F33\u5E7F\u5EF4\u5F50\u5F61\u6534\u65E0\u7592\u7676\u8FB5\u96B6\xA8\u02C6\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\uFF3B\uFF3D\u273D\u3041",23],["c740","\u3059",58,"\u30A1\u30A2\u30A3\u30A4"],["c7a1","\u30A5",81,"\u0410",5,"\u0401\u0416",4],["c840","\u041B",26,"\u0451\u0436",25,"\u21E7\u21B8\u21B9\u31CF\uD840\uDCCC\u4E5A\uD840\uDC8A\u5202\u4491"],["c8a1","\u9FB0\u5188\u9FB1\uD85D\uDE07"],["c8cd","\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u309B\u309C\u2E80\u2E84\u2E86\u2E87\u2E88\u2E8A\u2E8C\u2E8D\u2E95\u2E9C\u2E9D\u2EA5\u2EA7\u2EAA\u2EAC\u2EAE\u2EB6\u2EBC\u2EBE\u2EC6\u2ECA\u2ECC\u2ECD\u2ECF\u2ED6\u2ED7\u2EDE\u2EE3"],["c8f5","\u0283\u0250\u025B\u0254\u0275\u0153\xF8\u014B\u028A\u026A"],["f9fe","\uFFED"],["fa40","\uD841\uDD47\u92DB\uD841\uDDDF\uD84F\uDFC5\u854C\u42B5\u73EF\u51B5\u3649\uD852\uDD42\uD862\uDDE4\u9344\uD846\uDDDB\u82EE\uD84F\uDCC8\u783C\u6744\u62DF\uD852\uDD33\uD862\uDDAA\uD840\uDEA0\uD85A\uDFB3\uD844\uDF05\u4FAB\uD849\uDCED\u5008\uD85B\uDD29\uD85E\uDE84\uD84D\uDE00\uD852\uDEB1\uD849\uDD13\u5029\uD840\uDF7E\u5FA4\uD840\uDF80\uD840\uDF47\u6EDB\uD841\uDC1F\u507D\u5101\u347A\u510E\u986C\u3743\u8416\uD852\uDDA4\uD841\uDC87\u5160\uD84C\uDFB4\u516A\uD842\uDFFF\uD848\uDCFC\uD840\uDEE5\uD849\uDD30\uD841\uDD8E\uD84C\uDE33\uD846\uDD83\u5B82\u877D\uD841\uDDB3\uD84F\uDC99\u51B2\u51B8"],["faa1","\u9D34\u51C9\u51CF\u51D1\u3CDC\u51D3\uD852\uDEA6\u51B3\u51E2\u5342\u51ED\u83CD\u693E\uD84D\uDF2D\u5F7B\u520B\u5226\u523C\u52B5\u5257\u5294\u52B9\u52C5\u7C15\u8542\u52E0\u860D\uD85A\uDF13\u5305\uD862\uDEDE\u5549\u6ED9\uD84F\uDF80\uD842\uDD54\uD84F\uDFEC\u5333\u5344\uD842\uDFE2\u6CCB\uD845\uDF26\u681B\u73D5\u604A\u3EAA\u38CC\uD845\uDEE8\u71DD\u44A2\u536D\u5374\uD861\uDEAB\u537E\u537F\uD845\uDD96\uD845\uDE13\u77E6\u5393\uD862\uDE9B\u53A0\u53AB\u53AE\u73A7\uD855\uDF72\u3F59\u739C\u53C1\u53C5\u6C49\u4E49\u57FE\u53D9\u3AAB\uD842\uDF8F\u53E0\uD84F\uDFEB\uD84B\uDDA3\u53F6\uD843\uDC77\u5413\u7079\u552B\u6657\u6D5B\u546D\uD85A\uDF53\uD843\uDD74\u555D\u548F\u54A4\u47A6\uD845\uDF0D\uD843\uDEDD\u3DB4\uD843\uDD4D"],["fb40","\uD862\uDDBC\uD849\uDE98\u5547\u4CED\u542F\u7417\u5586\u55A9\u5605\uD846\uDCD7\uD850\uDC3A\u4552\uD851\uDC35\u66B3\uD844\uDCB4\u5637\u66CD\uD84C\uDE8A\u66A4\u66AD\u564D\u564F\u78F1\u56F1\u9787\u53FE\u5700\u56EF\u56ED\uD862\uDF66\u3623\uD844\uDE4F\u5746\uD850\uDDA5\u6C6E\u708B\u5742\u36B1\uD85B\uDC7E\u57E6\uD845\uDC16\u5803\uD845\uDC54\uD850\uDF63\u5826\uD852\uDFF5\u585C\u58AA\u3561\u58E0\u58DC\uD844\uDE3C\u58FB\u5BFF\u5743\uD868\uDD50\uD850\uDE78\u93D3\u35A1\u591F\u68A6\u36C3\u6E59"],["fba1","\uD845\uDE3E\u5A24\u5553\uD845\uDE92\u8505\u59C9\uD843\uDD4E\uD85B\uDC81\uD85B\uDD2A\uD845\uDFDC\u59D9\uD845\uDFFB\uD845\uDFB2\uD85B\uDDA6\u6D71\uD846\uDC28\uD845\uDED5\u59F9\uD85B\uDE45\u5AAB\u5A63\u36E6\uD852\uDDA9\u5A77\u3708\u5A96\u7465\u5AD3\uD85B\uDFA1\uD849\uDD54\u3D85\uD846\uDD11\u3732\uD845\uDEB8\u5E83\u52D0\u5B76\u6588\u5B7C\uD85E\uDE0E\u4004\u485D\uD840\uDE04\u5BD5\u6160\uD846\uDE34\uD856\uDDCC\uD841\uDDA5\u5BF3\u5B9D\u4D10\u5C05\uD846\uDF44\u5C13\u73CE\u5C14\uD847\uDCA5\uD85A\uDF28\u5C49\u48DD\u5C85\u5CE9\u5CEF\u5D8B\uD847\uDDF9\uD847\uDE37\u5D10\u5D18\u5D46\uD847\uDEA4\u5CBA\u5DD7\u82FC\u382D\uD852\uDD01\uD848\uDC49\uD848\uDD73\u8287\u3836\u3BC2\u5E2E\u6A8A\u5E75\u5E7A\uD851\uDCBC\uD843\uDCD3\u53A6\u4EB7\u5ED0\u53A8\uD845\uDF71\u5E09\u5EF4\uD861\uDC82"],["fc40","\u5EF9\u5EFB\u38A0\u5EFC\u683E\u941B\u5F0D\uD840\uDDC1\uD87E\uDC94\u3ADE\u48AE\uD844\uDF3A\u5F3A\uD85A\uDC88\uD848\uDFD0\u5F58\uD849\uDC71\u5F63\u97BD\uD85B\uDE6E\u5F72\u9340\uD862\uDE36\u5FA7\u5DB6\u3D5F\uD854\uDE50\uD847\uDF6A\uD85C\uDCF8\uD849\uDE68\u91D6\uD840\uDE9E\uD862\uDE29\u6031\u6685\uD846\uDC77\u3963\u3DC7\u3639\u5790\uD849\uDFB4\u7971\u3E40\u609E\u60A4\u60B3\uD852\uDD82\uD852\uDD8F\uD85E\uDE53\u74A4\u50E1\u5AA0\u6164\u8424\u6142\uD87E\uDCA6\uD85B\uDED2\u6181\u51F4\uD841\uDE56\u6187\u5BAA\uD84F\uDFB7"],["fca1","\uD84A\uDC5F\u61D3\uD862\uDF9D\uD866\uDD5D\u61D0\u3932\uD84A\uDD80\uD84A\uDCC1\u6023\u615C\u651E\u638B\uD840\uDD18\u62C5\uD845\uDF70\u62D5\uD84B\uDE0D\u636C\uD852\uDDDF\u3A17\u6438\u63F8\uD844\uDF8E\uD845\uDFFC\u6490\u6F8A\uD84B\uDE36\u9814\uD850\uDC8C\uD855\uDF1D\u64E1\u64E5\u947B\u3A66\u643A\u3A57\u654D\u6F16\uD852\uDE28\uD852\uDE23\u6585\u656D\u655F\uD84C\uDC7E\u65B5\uD852\uDD40\u4B37\u65D1\u40D8\uD846\uDC29\u65E0\u65E3\u5FDF\uD84D\uDC00\u6618\uD84C\uDDF7\uD84C\uDDF8\u6644\uD84C\uDDA4\uD84C\uDDA5\u664B\uD843\uDE75\u6667\uD854\uDDE6\u6673\u6674\uD847\uDE3D\uD84C\uDE31\uD861\uDDF4\uD84C\uDDC8\uD854\uDF13\u77C5\uD84A\uDCF7\u99A4\u6702\uD850\uDF9C\uD852\uDE21\u3B2B\u69FA\uD84D\uDFC2\u675E\u6767\u6762\uD850\uDDCD\uD864\uDCED\u67D7\u44E9\u6822\u6E50\u923C\u6801\uD84C\uDFE6\uD85B\uDDA0\u685D"],["fd40","\uD84D\uDC6F\u69E1\u6A0B\uD862\uDEDF\u6973\u68C3\uD84D\uDDCD\u6901\u6900\u3D32\u3A01\uD84D\uDE3C\u3B80\u67AC\u6961\uD862\uDE4A\u42FC\u6936\u6998\u3BA1\uD840\uDFC9\u8363\u5090\u69F9\uD84D\uDE59\uD848\uDD2A\u6A45\uD84D\uDF03\u6A9D\u3BF3\u67B1\u6AC8\uD864\uDD9C\u3C0D\u6B1D\uD842\uDD23\u60DE\u6B35\u6B74\uD849\uDFCD\u6EB5\uD84E\uDEDB\uD840\uDFB5\uD846\uDD58\u3740\u5421\uD84E\uDF5A\u6BE1\uD84F\uDEFC\u6BDC\u6C37\uD849\uDC8B\uD852\uDCF1\uD85A\uDF51\u6C5A\u8226\u6C79\uD84F\uDDBC\u44C5\uD84F\uDDBD\uD850\uDDA4\uD852\uDD0C\uD852\uDD00"],["fda1","\uD84F\uDCC9\u36E5\u3CEB\uD843\uDD32\u9B83\uD84C\uDDF9\uD849\uDC91\u7F8F\u6837\uD85B\uDD25\uD85B\uDDA1\uD85B\uDDEB\u6D96\u6D5C\u6E7C\u6F04\uD852\uDD7F\uD850\uDC85\uD85B\uDE72\u8533\uD85B\uDF74\u51C7\u6C9C\u6E1D\u842E\uD862\uDF21\u6E2F\uD84F\uDE2F\u7453\uD84F\uDF82\u79CC\u6E4F\u5A91\uD84C\uDC4B\u6FF8\u370D\u6F9D\uD84F\uDE30\u6EFA\uD845\uDC97\uD850\uDC3D\u4555\u93F0\u6F44\u6F5C\u3D4E\u6F74\uD864\uDD70\u3D3B\u6F9F\uD850\uDD44\u6FD3\uD850\uDC91\uD850\uDD55\uD850\uDC39\uD84F\uDFF0\uD84F\uDFB4\uD850\uDD3F\u51DF\uD850\uDD56\uD850\uDD57\uD850\uDD40\uD858\uDDDD\u704B\u707E\u70A7\u7081\u70CC\u70D5\u70D6\u70DF\u4104\u3DE8\u71B4\u7196\uD850\uDE77\u712B\u7145\u5A88\u714A\u716E\u5C9C\uD850\uDF65\u714F\u9362\uD850\uDEC1\u712C\uD851\uDC5A\uD852\uDE27\uD852\uDE22\u71BA\uD862\uDFE8\u70BD\u720E"],["fe40","\u9442\u7215\u5911\u9443\u7224\u9341\uD855\uDE05\u722E\u7240\uD852\uDD74\u68BD\u7255\u7257\u3E55\uD84C\uDC44\u680D\u6F3D\u7282\u732A\u732B\uD852\uDC23\uD862\uDC2B\u48ED\uD862\uDC04\u7328\u732E\u73CF\u73AA\uD843\uDC3A\uD85A\uDE2E\u73C9\u7449\uD850\uDDE2\uD845\uDEE7\uD852\uDE24\u6623\u36C5\uD852\uDDB7\uD852\uDD8D\uD852\uDDFB\u73F7\u7415\u6903\uD852\uDE26\u7439\uD841\uDDC3\u3ED7\u745C\uD84A\uDCAD\u7460\uD863\uDEB2\u7447\u73E4\u7476\u83B9\u746C\u3730\u7474\u93F1\u6A2C\u7482\u4953\uD852\uDE8C"],["fea1","\uD850\uDD5F\uD852\uDE79\uD862\uDF8F\u5B46\uD863\uDC03\uD846\uDC9E\u74C8\uD846\uDD88\u750E\u74E9\u751E\uD863\uDED9\uD846\uDE4B\u5BD7\uD863\uDEAC\u9385\u754D\u754A\u7567\u756E\uD853\uDF82\u3F04\uD853\uDD13\u758E\u745D\u759E\u75B4\u7602\u762C\u7651\u764F\u766F\u7676\uD858\uDFF5\u7690\u81EF\u37F8\uD85A\uDD11\uD85A\uDD0E\u76A1\u76A5\u76B7\u76CC\uD85B\uDF9F\u8462\uD854\uDC9D\uD854\uDD7D\uD847\uDE1C\u771E\u7726\u7740\u64AF\uD854\uDE20\u7758\uD84C\uDEAC\u77AF\uD862\uDD64\uD862\uDD68\uD845\uDEC1\u77F4\u7809\uD844\uDF76\uD852\uDE12\u68CA\u78AF\u78C7\u78D3\u96A5\u792E\uD855\uDDE0\u78D7\u7934\u78B1\uD85D\uDE0C\u8FB8\u8884\uD862\uDF2B\uD858\uDC83\uD849\uDE1C\u7986\u8900\u6902\u7980\uD856\uDC57\u799D\uD85E\uDF39\u793C\u79A9\u6E2A\uD85C\uDD26\u3EA8\u79C6\uD864\uDD0D\u79D4"]]});var aL4=o((oM7,rL4)=>{rL4.exports={shiftjis:{type:"_dbcs",table:function(){return dL4()},encodeAdd:{"\xA5":92,"\u203E":126},encodeSkipVals:[{from:60736,to:63808}]},csshiftjis:"shiftjis",mskanji:"shiftjis",sjis:"shiftjis",windows31j:"shiftjis",ms31j:"shiftjis",xsjis:"shiftjis",windows932:"shiftjis",ms932:"shiftjis","932":"shiftjis",cp932:"shiftjis",eucjp:{type:"_dbcs",table:function(){return cL4()},encodeAdd:{"\xA5":92,"\u203E":126}},gb2312:"cp936",gb231280:"cp936",gb23121980:"cp936",csgb2312:"cp936",csiso58gb231280:"cp936",euccn:"cp936",windows936:"cp936",ms936:"cp936","936":"cp936",cp936:{type:"_dbcs",table:function(){return hY0()}},gbk:{type:"_dbcs",table:function(){return hY0().concat(Zd0())}},xgbk:"gbk",isoir58:"gbk",gb18030:{type:"_dbcs",table:function(){return hY0().concat(Zd0())},gb18030:function(){return lL4()},encodeSkipVals:[128],encodeAdd:{"\u20AC":41699}},chinese:"gb18030",windows949:"cp949",ms949:"cp949","949":"cp949",cp949:{type:"_dbcs",table:function(){return iL4()}},cseuckr:"cp949",csksc56011987:"cp949",euckr:"cp949",isoir149:"cp949",korean:"cp949",ksc56011987:"cp949",ksc56011989:"cp949",ksc5601:"cp949",windows950:"cp950",ms950:"cp950","950":"cp950",cp950:{type:"_dbcs",table:function(){return Kd0()}},big5:"big5hkscs",big5hkscs:{type:"_dbcs",table:function(){return Kd0().concat(nL4())},encodeSkipVals:[41676]},cnbig5:"big5hkscs",csbig5:"big5hkscs",xxbig5:"big5hkscs"}});var tL4=o((oL4,CM)=>{var sL4=[SL4(),vL4(),yL4(),bL4(),fL4(),mL4(),pL4(),aL4()];for(xp=0;xp<sL4.length;xp++){CM=sL4[xp];for(yp in CM)if(Object.prototype.hasOwnProperty.call(CM,yp))oL4[yp]=CM[yp]}var CM,yp,xp});var YB4=o((tM7,$B4)=>{var eL4=L0("buffer").Buffer,fY0=L0("stream").Transform;$B4.exports=function($){$.encodeStream=function(X,G){return new SM($.getEncoder(X,G),G)},$.decodeStream=function(X,G){return new XN($.getDecoder(X,G),G)},$.supportsStreams=!0,$.IconvLiteEncoderStream=SM,$.IconvLiteDecoderStream=XN,$._collect=XN.prototype.collect};function SM($,Y){this.conv=$,Y=Y||{},Y.decodeStrings=!1,fY0.call(this,Y)}SM.prototype=Object.create(fY0.prototype,{constructor:{value:SM}});SM.prototype._transform=function($,Y,X){if(typeof $!="string")return X(Error("Iconv encoding stream needs strings as its input."));try{var G=this.conv.write($);if(G&&G.length)this.push(G);X()}catch(J){X(J)}};SM.prototype._flush=function($){try{var Y=this.conv.end();if(Y&&Y.length)this.push(Y);$()}catch(X){$(X)}};SM.prototype.collect=function($){var Y=[];return this.on("error",$),this.on("data",function(X){Y.push(X)}),this.on("end",function(){$(null,eL4.concat(Y))}),this};function XN($,Y){this.conv=$,Y=Y||{},Y.encoding=this.encoding="utf8",fY0.call(this,Y)}XN.prototype=Object.create(fY0.prototype,{constructor:{value:XN}});XN.prototype._transform=function($,Y,X){if(!eL4.isBuffer($))return X(Error("Iconv decoding stream needs buffers as its input."));try{var G=this.conv.write($);if(G&&G.length)this.push(G,this.encoding);X()}catch(J){X(J)}};XN.prototype._flush=function($){try{var Y=this.conv.end();if(Y&&Y.length)this.push(Y,this.encoding);$()}catch(X){$(X)}};XN.prototype.collect=function($){var Y="";return this.on("error",$),this.on("data",function(X){Y+=X}),this.on("end",function(){$(null,Y)}),this}});var GB4=o((eM7,XB4)=>{var H$=L0("buffer").Buffer;XB4.exports=function($){var Y=void 0;$.supportsNodeEncodingsExtension=!(H$.from||new H$(0)instanceof Uint8Array),$.extendNodeEncodings=function(){if(Y)return;if(Y={},!$.supportsNodeEncodingsExtension){console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"),console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility");return}var G={hex:!0,utf8:!0,"utf-8":!0,ascii:!0,binary:!0,base64:!0,ucs2:!0,"ucs-2":!0,utf16le:!0,"utf-16le":!0};H$.isNativeEncoding=function(W){return W&&G[W.toLowerCase()]};var J=L0("buffer").SlowBuffer;if(Y.SlowBufferToString=J.prototype.toString,J.prototype.toString=function(W,Z,K){if(W=String(W||"utf8").toLowerCase(),H$.isNativeEncoding(W))return Y.SlowBufferToString.call(this,W,Z,K);if(typeof Z>"u")Z=0;if(typeof K>"u")K=this.length;return $.decode(this.slice(Z,K),W)},Y.SlowBufferWrite=J.prototype.write,J.prototype.write=function(W,Z,K,H){if(isFinite(Z)){if(!isFinite(K))H=K,K=void 0}else{var z=H;H=Z,Z=K,K=z}Z=+Z||0;var V=this.length-Z;if(!K)K=V;else if(K=+K,K>V)K=V;if(H=String(H||"utf8").toLowerCase(),H$.isNativeEncoding(H))return Y.SlowBufferWrite.call(this,W,Z,K,H);if(W.length>0&&(K<0||Z<0))throw RangeError("attempt to write beyond buffer bounds");var A=$.encode(W,H);if(A.length<K)K=A.length;return A.copy(this,Z,0,K),K},Y.BufferIsEncoding=H$.isEncoding,H$.isEncoding=function(W){return H$.isNativeEncoding(W)||$.encodingExists(W)},Y.BufferByteLength=H$.byteLength,H$.byteLength=J.byteLength=function(W,Z){if(Z=String(Z||"utf8").toLowerCase(),H$.isNativeEncoding(Z))return Y.BufferByteLength.call(this,W,Z);return $.encode(W,Z).length},Y.BufferToString=H$.prototype.toString,H$.prototype.toString=function(W,Z,K){if(W=String(W||"utf8").toLowerCase(),H$.isNativeEncoding(W))return Y.BufferToString.call(this,W,Z,K);if(typeof Z>"u")Z=0;if(typeof K>"u")K=this.length;return $.decode(this.slice(Z,K),W)},Y.BufferWrite=H$.prototype.write,H$.prototype.write=function(W,Z,K,H){var z=Z,V=K,A=H;if(isFinite(Z)){if(!isFinite(K))H=K,K=void 0}else{var F=H;H=Z,Z=K,K=F}if(H=String(H||"utf8").toLowerCase(),H$.isNativeEncoding(H))return Y.BufferWrite.call(this,W,z,V,A);Z=+Z||0;var N=this.length-Z;if(!K)K=N;else if(K=+K,K>N)K=N;if(W.length>0&&(K<0||Z<0))throw RangeError("attempt to write beyond buffer bounds");var D=$.encode(W,H);if(D.length<K)K=D.length;return D.copy(this,Z,0,K),K},$.supportsStreams){var Q=L0("stream").Readable;Y.ReadableSetEncoding=Q.prototype.setEncoding,Q.prototype.setEncoding=function(Z,K){this._readableState.decoder=$.getDecoder(Z,K),this._readableState.encoding=Z},Q.prototype.collect=$._collect}},$.undoExtendNodeEncodings=function(){if(!$.supportsNodeEncodingsExtension)return;if(!Y)throw Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.");delete H$.isNativeEncoding;var G=L0("buffer").SlowBuffer;if(G.prototype.toString=Y.SlowBufferToString,G.prototype.write=Y.SlowBufferWrite,H$.isEncoding=Y.BufferIsEncoding,H$.byteLength=Y.BufferByteLength,H$.prototype.toString=Y.BufferToString,H$.prototype.write=Y.BufferWrite,$.supportsStreams){var J=L0("stream").Readable;J.prototype.setEncoding=Y.ReadableSetEncoding,delete J.prototype.collect}Y=void 0}}});var KB4=o(($R7,ZB4)=>{var QB4=qG().Buffer,WB4=jL4(),L9=$R7;L9.encodings=null;L9.defaultCharUnicode="\uFFFD";L9.defaultCharSingleByte="?";L9.encode=function(Y,X,G){Y=""+(Y||"");var J=L9.getEncoder(X,G),Q=J.write(Y),W=J.end();return W&&W.length>0?QB4.concat([Q,W]):Q};L9.decode=function(Y,X,G){if(typeof Y==="string"){if(!L9.skipDecodeWarning)console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),L9.skipDecodeWarning=!0;Y=QB4.from(""+(Y||""),"binary")}var J=L9.getDecoder(X,G),Q=J.write(Y),W=J.end();return W?Q+W:Q};L9.encodingExists=function(Y){try{return L9.getCodec(Y),!0}catch(X){return!1}};L9.toEncoding=L9.encode;L9.fromEncoding=L9.decode;L9._codecDataCache={};L9.getCodec=function(Y){if(!L9.encodings)L9.encodings=tL4();var X=L9._canonicalizeEncoding(Y),G={};while(!0){var J=L9._codecDataCache[X];if(J)return J;var Q=L9.encodings[X];switch(typeof Q){case"string":X=Q;break;case"object":for(var W in Q)G[W]=Q[W];if(!G.encodingName)G.encodingName=X;X=Q.type;break;case"function":if(!G.encodingName)G.encodingName=X;return J=new Q(G,L9),L9._codecDataCache[G.encodingName]=J,J;default:throw Error("Encoding not recognized: '"+Y+"' (searched as: '"+X+"')")}}};L9._canonicalizeEncoding=function($){return(""+$).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")};L9.getEncoder=function(Y,X){var G=L9.getCodec(Y),J=new G.encoder(X,G);if(G.bomAware&&X&&X.addBOM)J=new WB4.PrependBOM(J,X);return J};L9.getDecoder=function(Y,X){var G=L9.getCodec(Y),J=new G.decoder(X,G);if(G.bomAware&&!(X&&X.stripBOM===!1))J=new WB4.StripBOM(J,X);return J};var JB4=typeof process<"u"&&process.versions&&process.versions.node;if(JB4){if(gY0=JB4.split(".").map(Number),gY0[0]>0||gY0[1]>=10)YB4()(L9);GB4()(L9)}var gY0});var HB4=o((YR7,UB4)=>{var mY0,dV9=L0("util").inherits,Ud0=L0("stream"),cV9=/(?:charset|encoding)\s*=\s*['"]? *([\w\-]+)/i;dV9(bp,Ud0.Transform);function bp($){if(!(this instanceof bp))return new bp($);Ud0.Transform.call(this,$),this.charset=$,this.parsed_chunk=!1}bp.prototype._transform=function($,Y,X){var G,J;if(this.charset=="utf8"&&!this.parsed_chunk){this.parsed_chunk=!0;var Q=cV9.exec($.toString());if(Q)J=Q[1].toLowerCase(),this.charset=J=="utf-8"?"utf8":J}try{G=mY0.decode($,this.charset)}catch(W){G=$}this.push(G),X()};UB4.exports=function($){try{if(!mY0)mY0=KB4()}catch(Y){}if(mY0)return new bp($);else return new Ud0.PassThrough}});var zB4=o((XR7,lV9)=>{lV9.exports={name:"needle",version:"2.9.1",description:"The leanest and most handsome HTTP client in the Nodelands.",keywords:["http","https","simple","request","client","multipart","upload","proxy","deflate","timeout","charset","iconv","cookie","redirect"],tags:["http","https","simple","request","client","multipart","upload","proxy","deflate","timeout","charset","iconv","cookie","redirect"],author:"Tom\xE1s Pollak <tomas@forkhq.com>",repository:{type:"git",url:"https://github.com/tomas/needle.git"},dependencies:{debug:"^3.2.6","iconv-lite":"^0.4.4",sax:"^1.2.4"},devDependencies:{JSONStream:"^1.3.5",jschardet:"^1.6.0",mocha:"^5.2.0",pump:"^3.0.0",q:"^1.5.1",should:"^13.2.3",sinon:"^2.3.0",xml2js:"^0.4.19"},scripts:{test:"mocha test"},directories:{lib:"./lib"},main:"./lib/needle",bin:{needle:"./bin/needle"},license:"MIT",engines:{node:">= 4.4.x"}}});var OB4=o((GR7,QN)=>{var DB4=L0("fs"),zd0=L0("http"),iV9=L0("https"),JN=L0("url"),dY0=L0("stream"),L3=VL4()("needle"),VB4=AL4().build,nV9=NL4(),Vd0=OL4(),pY0=qL4(),uY0=wL4(),rV9=HB4(),NB4=zB4().version,LB4="Needle/"+NB4;LB4+=" (Node.js "+process.version+"; "+process.platform+" "+process.arch+")";var aV9="agent pfx key passphrase cert ca ciphers rejectUnauthorized secureProtocol checkServerIdentity family",sV9=!zd0.Agent||zd0.Agent.defaultMaxSockets!=1/0,AB4=Object.assign?Object.assign:L0("util")._extend,oV9=[301,302,303,307,308];function hp($,Y){return $.bind(null,Y)}var GN={};try{if(cW=L0("zlib"),zC={flush:cW.Z_SYNC_FLUSH,finishFlush:cW.Z_SYNC_FLUSH},Ad0={flush:cW.BROTLI_OPERATION_FLUSH,finishFlush:cW.BROTLI_OPERATION_FLUSH},GN["x-deflate"]=hp(cW.Inflate,zC),GN.deflate=hp(cW.Inflate,zC),GN["x-gzip"]=hp(cW.Gunzip,zC),GN.gzip=hp(cW.Gunzip,zC),typeof cW.BrotliDecompress==="function")GN.br=hp(cW.BrotliDecompress,Ad0)}catch($){}var cW,zC,Ad0,kX={boundary:"--------------------NODENEEDLEHTTPCLIENT",encoding:"utf8",parse_response:"all",proxy:null,headers:{},accept:"*/*",user_agent:LB4,open_timeout:1e4,response_timeout:0,read_timeout:0,follow_max:0,stream_length:-1,compressed:!1,decode_response:!0,parse_cookies:!0,follow_set_cookies:!1,follow_set_referer:!1,follow_keep_method:!1,follow_if_same_host:!1,follow_if_same_protocol:!1,follow_if_same_location:!1},VC={options:{decode:"decode_response",parse:"parse_response",timeout:"open_timeout",follow:"follow_max"},inverted:{}};Object.keys(VC.options).map(function($){var Y=VC.options[$];VC.inverted[Y]=$});function FB4($){return Object.keys(kX).map(function(Y){if(kX[Y]!==null&&kX[Y].constructor==$)return Y}).filter(function(Y){return Y})}function tV9($){if(!$||$==="")return{};var Y,X="utf8",G=$.split(";");if(G.length>1&&(Y=G[1].match(/charset=(.+)/)))X=Y[1];return{type:G[0],charset:X}}function BB4($){return typeof $.pipe==="function"}function eV9($,Y,X){if(Y>0)return X(Y);if($.end!==void 0&&$.end!==1/0&&$.start!==void 0)return X($.end+1-($.start||0));DB4.stat($.path,function(G,J){X(J?J.size-($.start||0):null)})}function $A9($,Y){if(JN.URL)return new JN.URL($,Y);return JN.resolve(Y,$)}function Hd0($,Y){if(dY0.pipeline)return dY0.pipeline.apply(null,$.concat(Y));var X=$.shift();while($.length)X=X.pipe($.shift()),X.once("error",function(G){Y&&Y(G),Y=null})}function WN($,Y,X,G,J){if(typeof Y!=="string")throw TypeError("URL must be a string, not "+Y);if(this.method=$.toLowerCase(),this.uri=Y,this.data=X,typeof G=="function")this.callback=G,this.options={};else this.callback=J,this.options=G}WN.prototype.setup=function($,Y){function X(H,z){if(typeof Y[H]<"u")return Y[H];return typeof Y[VC.inverted[H]]<"u"?Y[VC.inverted[H]]:z}function G(H,z){var V=X(z),A=typeof V;if(A!="undefined"&&A!=H)throw TypeError(A+" received for "+z+", but expected a "+H);return A==H?V:kX[z]}var J={http_opts:{localAddress:X("localAddress",void 0),lookup:X("lookup",void 0)},headers:{},output:Y.output,proxy:X("proxy",kX.proxy),parser:X("parse_response",kX.parse_response),encoding:Y.encoding||(Y.multipart?"binary":kX.encoding)};FB4(Boolean).forEach(function(H){J[H]=G("boolean",H)}),FB4(Number).forEach(function(H){J[H]=G("number",H)}),aV9.split(" ").forEach(function(H){if(typeof Y[H]<"u"){if(J.http_opts[H]=Y[H],typeof Y.agent>"u")J.http_opts.agent=!1}});for(var Q in kX.headers)J.headers[Q]=kX.headers[Q];if(J.headers.accept=Y.accept||kX.accept,J.headers["user-agent"]=Y.user_agent||kX.user_agent,Y.content_type)J.headers["content-type"]=Y.content_type;if(Y.connection||sV9)J.headers.connection=Y.connection||"close";if((Y.compressed||kX.compressed)&&typeof cW<"u")J.headers["accept-encoding"]=GN.br?"gzip, deflate, br":"gzip, deflate";if(Y.cookies)J.headers.cookie=pY0.write(Y.cookies);if($.match(/[^\/]@/)){var W=(JN.parse($).auth||"").split(":");Y.username=W[0],Y.password=W[1]}if(Y.username)if(Y.auth&&(Y.auth=="auto"||Y.auth=="digest"))J.credentials=[Y.username,Y.password];else J.headers.authorization=Vd0.basic(Y.username,Y.password);if(J.proxy){if(J.proxy.indexOf("http")===-1)J.proxy="http://"+J.proxy;if(J.proxy.indexOf("@")!==-1){var Z=(JN.parse(J.proxy).auth||"").split(":");Y.proxy_user=Z[0],Y.proxy_pass=Z[1]}if(Y.proxy_user)J.headers["proxy-authorization"]=Vd0.basic(Y.proxy_user,Y.proxy_pass)}for(var K in Y.headers)J.headers[K.toLowerCase()]=Y.headers[K];return J.uri_modifier=X("uri_modifier",null),J};WN.prototype.start=function(){var $=new dY0.PassThrough({objectMode:!1}),Y=this.uri,X=this.data,G=this.method,J=typeof this.options=="function"?this.options:this.callback,Q=this.options||{};if(Y.indexOf("http")===-1)Y=Y.replace(/^(\/\/)?/,"http://");var W=this,Z,K=!1,H=this.setup(Y,Q),z=Q.json||Q.json!==!1&&H.headers["content-type"]=="application/json";if(X)if(Q.multipart){var V=Q.boundary||kX.boundary;K=!0,nV9.build(X,V,function(F,N){if(F)throw F;H.headers["content-type"]="multipart/form-data; boundary="+V,A(N)})}else if(BB4(X)){if(G=="get")throw Error("Refusing to pipe() a stream via GET. Did you mean .post?");if(H.stream_length>0||H.stream_length===0&&X.path)K=!0,eV9(X,H.stream_length,function(F){X.length=F,A(X)});else Z=X}else if(Buffer.isBuffer(X))Z=X;else if(G=="get"&&!z)Y=Y.replace(/\?.*|$/,"?"+VB4(X));else Z=typeof X==="string"?X:z?JSON.stringify(X):VB4(X),Z=Buffer.from(Z,H.encoding);function A(F){if(F){if(F.length)H.headers["content-length"]=F.length;if(!H.headers["content-type"])H.headers["content-type"]=z?"application/json; charset=utf-8":"application/x-www-form-urlencoded"}if(Q.json&&(!Q.accept&&!(Q.headers||{}).accept))H.headers.accept="application/json";W.send_request(1,G,Y,H,F,$,J)}if(!K)A(Z);return $};WN.prototype.get_request_opts=function($,Y,X){var{http_opts:G,proxy:J}=X,Q=J?JN.parse(J):JN.parse(Y);if(G.protocol=Q.protocol,G.host=Q.hostname,G.port=Q.port||(Q.protocol=="https:"?443:80),G.path=J?Y:Q.pathname+(Q.search||""),G.method=$,G.headers=X.headers,!G.headers.host){var W=J?JN.parse(Y):Q;if(G.headers.host=W.hostname,W.port&&[80,443].indexOf(W.port)===-1)G.headers.host+=":"+W.port}return G};WN.prototype.should_follow=function($,Y,X){if(!$)return!1;function G(Q){var Q=X[Q];return $.indexOf(Q)!==-1}if(!Y.follow_if_same_location&&$===X)return!1;if(Y.follow_if_same_host&&!G("host"))return!1;if(Y.follow_if_same_protocol&&!G("protocol"))return!1;return!0};WN.prototype.send_request=function($,Y,X,G,J,Q,W){if(typeof G.uri_modifier==="function"){var Z=G.uri_modifier(X);L3("Modifying request URI",X+" => "+Z),X=Z}var K,H,z=0,V=this,A=this.get_request_opts(Y,X,G),F=A.protocol=="https:"?iV9:zd0;function N(O,E){if(z++>0)return L3("Already finished, stopping here.");if(H)clearTimeout(H);if(K.removeListener("error",D),Q.done=!0,W)return W(O,E,E?E.body:void 0);Q.emit("done",O);var M=Q._readableState.pipes||[];if(!M.forEach)M=[M];M.forEach(function(R){R.emit("done",O)})}function D(O){L3("Request error",O),Q.emit("err",O),N(O||Error("Unknown error when making request."))}function L(O,E){if(H)clearTimeout(H);if(E<=0)return;H=setTimeout(function(){if(Q.emit("timeout",O),K.abort(),O=="read")N(Error(O+" timeout"))},E)}function B(){if(z&&!this.writable&&this.destroyed===!1)this.destroy(),D(Error("Remote end closed socket abruptly."))}if(L3("Making request #"+$,A),K=F.request(A,function(O){var E=O.headers;if(L3("Got response",O.statusCode,E),Q.emit("response",O),L("read",G.read_timeout),G.parse_cookies&&(E["set-cookie"]||G.previous_resp_cookies))O.cookies=AB4(G.previous_resp_cookies||{},pY0.read(E["set-cookie"])),L3("Got cookies",O.cookies);if(oV9.indexOf(O.statusCode)!==-1&&V.should_follow(E.location,G,X)){if(clearTimeout(H),$<=G.follow_max){if(Q.emit("redirect",E.location),!G.follow_keep_method)Y="GET",J=null,delete G.headers["content-length"];if(G.follow_set_cookies){var M=pY0.read(G.headers.cookie);if(G.previous_resp_cookies=O.cookies,Object.keys(M).length||Object.keys(O.cookies||{}).length)G.headers.cookie=pY0.write(AB4(M,O.cookies))}else if(G.headers.cookie)L3("Clearing original request cookie",G.headers.cookie),delete G.headers.cookie;if(G.follow_set_referer)G.headers.referer=encodeURI(X);G.headers.host=null;var R=$A9(E.location,X);return L3("Redirecting to "+R.toString()),V.send_request(++$,Y,R.toString(),G,J,Q,W)}else if(G.follow_max>0)return N(Error("Max redirects reached. Possible loop in: "+E.location))}if(O.statusCode==401&&E["www-authenticate"]&&G.credentials){if(!G.headers.authorization){var q=Vd0.header(E["www-authenticate"],G.credentials,A);if(q)return G.headers.authorization=q,V.send_request($,Y,X,G,J,Q,W)}}Q.emit("header",O.statusCode,E),Q.emit("headers",E);var w=[],I=tV9(E["content-type"]),P=I.type&&(I.type.indexOf("text/")!=-1||!!I.type.match(/(\/|\+)(xml|json)$/));if(E["content-encoding"]&&GN[E["content-encoding"]]){var _=GN[E["content-encoding"]]();_.on("error",D),w.push(_)}if(G.parser&&uY0[I.type]){var C=G.parser.toString().toLowerCase();if(["xml","json"].indexOf(C)==-1||uY0[I.type].name==C)Q.parser=uY0[I.type].name,w.push(uY0[I.type].fn()),Q._writableState.objectMode=!0,Q._readableState.objectMode=!0}else if(P&&G.decode_response&&I.charset)w.push(rV9(I.charset));if(w.push(Q),Hd0([O].concat(w),function(T){if(T)L3(T);if(T&&T.message=="write after end")K.destroy()}),G.output&&O.statusCode==200){var k=DB4.createWriteStream(G.output);k.on("error",D),Q.on("end",function(){if(k.writable)k.end()}),k.on("close",function(){delete Q.file}),Q.on("readable",function(){var T;while((T=this.read())!==null){if(k.writable)k.write(T);if(O.body)O.body.push(T)}}),Q.file=k}if(W){O.raw=[],O.body=[],O.bytes=0;var S=new dY0.PassThrough;if(S.on("readable",function(){var T;while((T=this.read())!=null)O.bytes+=T.length,O.raw.push(T)}),Hd0([O,S],function(T){if(T)L3(T)}),!G.output||O.statusCode!=200)Q.on("readable",function(){var T;while((T=this.read())!==null){if(typeof T=="string")T=Buffer.from(T);O.body.push(T)}})}Q.on("end",function(){if(O.body){if(O.raw=Buffer.concat(O.raw),O.body[0]!==void 0&&!Buffer.isBuffer(O.body[0])){if(O.body=O.body[0],Q.parser)O.parser=Q.parser}else if(O.body=Buffer.concat(O.body),P||Q.parser)O.body=O.body.toString()}if(Q.file)Q.file.on("close",function(){N(null,O)});else N(null,O)})}),L("open",G.open_timeout),K.on("error",D),K.once("abort",function(){if(H)clearTimeout(H)}),K.once("socket",function(O){if(O.connecting)O.once("connect",function(){L("response",G.response_timeout)});else L("response",G.response_timeout);if(!O.on_socket_end)O.on_socket_end=B,O.once("end",function(){process.nextTick(B.bind(O))})}),J)if(BB4(J))Hd0([J,K],function(O){if(O)L3(O)});else K.write(J,G.encoding),K.end();else K.end();return Q.abort=function(){K.abort()},Q.request=K,Q};if(typeof Promise<"u")QN.exports=function(){var $,Y=[].slice.call(arguments);if(Y[0].match(/\.|\//))$=Y.length>2?"post":"get";else $=Y.shift();if($.match(/get|head/i)&&Y.length==2)Y.splice(1,0,null);return new Promise(function(X,G){QN.exports.request($,Y[0],Y[1],Y[2],function(J,Q){return J?G(J):X(Q)})})};QN.exports.version=NB4;QN.exports.defaults=function($){for(var Y in $){var X=VC.options[Y]||Y;if(kX.hasOwnProperty(X)&&typeof $[Y]<"u"){if(X!="parse_response"&&X!="proxy"){var G=kX[X].constructor.name;if($[Y].constructor.name!=G)throw TypeError("Invalid type for "+Y+", should be "+G)}kX[X]=$[Y]}else throw Error("Invalid property for defaults:"+X)}return kX};"head get".split(" ").forEach(function($){QN.exports[$]=function(Y,X,G){return new WN($,Y,null,X,G).start()}});"post put patch delete".split(" ").forEach(function($){QN.exports[$]=function(Y,X,G,J){return new WN($,Y,X,G,J).start()}});QN.exports.request=function($,Y,X,G,J){return new WN($,Y,X,G,J).start()}});var rB4=o((cY0,AC)=>{var YA9=200,TB4="__lodash_hash_undefined__",XA9=800,GA9=16,CB4=9007199254740991,SB4="[object Arguments]",JA9="[object Array]",QA9="[object AsyncFunction]",WA9="[object Boolean]",ZA9="[object Date]",KA9="[object Error]",kB4="[object Function]",UA9="[object GeneratorFunction]",HA9="[object Map]",zA9="[object Number]",VA9="[object Null]",vB4="[object Object]",AA9="[object Proxy]",FA9="[object RegExp]",DA9="[object Set]",NA9="[object String]",LA9="[object Undefined]",BA9="[object WeakMap]",OA9="[object ArrayBuffer]",EA9="[object DataView]",MA9="[object Float32Array]",RA9="[object Float64Array]",qA9="[object Int8Array]",IA9="[object Int16Array]",PA9="[object Int32Array]",wA9="[object Uint8Array]",_A9="[object Uint8ClampedArray]",jA9="[object Uint16Array]",TA9="[object Uint32Array]",CA9=/[\\^$.*+?()[\]{}|]/g,SA9=/^\[object .+?Constructor\]$/,kA9=/^(?:0|[1-9]\d*)$/,X7={};X7[MA9]=X7[RA9]=X7[qA9]=X7[IA9]=X7[PA9]=X7[wA9]=X7[_A9]=X7[jA9]=X7[TA9]=!0;X7[SB4]=X7[JA9]=X7[OA9]=X7[WA9]=X7[EA9]=X7[ZA9]=X7[KA9]=X7[kB4]=X7[HA9]=X7[zA9]=X7[vB4]=X7[FA9]=X7[DA9]=X7[NA9]=X7[BA9]=!1;var xB4=typeof global=="object"&&global&&global.Object===Object&&global,vA9=typeof self=="object"&&self&&self.Object===Object&&self,mp=xB4||vA9||Function("return this")(),yB4=typeof cY0=="object"&&cY0&&!cY0.nodeType&&cY0,fp=yB4&&typeof AC=="object"&&AC&&!AC.nodeType&&AC,bB4=fp&&fp.exports===yB4,Fd0=bB4&&xB4.process,EB4=function(){try{var $=fp&&fp.require&&fp.require("util").types;if($)return $;return Fd0&&Fd0.binding&&Fd0.binding("util")}catch(Y){}}(),MB4=EB4&&EB4.isTypedArray;function xA9($,Y,X){switch(X.length){case 0:return $.call(Y);case 1:return $.call(Y,X[0]);case 2:return $.call(Y,X[0],X[1]);case 3:return $.call(Y,X[0],X[1],X[2])}return $.apply(Y,X)}function yA9($,Y){var X=-1,G=Array($);while(++X<$)G[X]=Y(X);return G}function bA9($){return function(Y){return $(Y)}}function hA9($,Y){return $==null?void 0:$[Y]}function fA9($,Y){return function(X){return $(Y(X))}}var gA9=Array.prototype,mA9=Function.prototype,nY0=Object.prototype,Dd0=mp["__core-js_shared__"],rY0=mA9.toString,_V=nY0.hasOwnProperty,RB4=function(){var $=/[^.]+$/.exec(Dd0&&Dd0.keys&&Dd0.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),hB4=nY0.toString,uA9=rY0.call(Object),pA9=RegExp("^"+rY0.call(_V).replace(CA9,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lY0=bB4?mp.Buffer:void 0,qB4=mp.Symbol,IB4=mp.Uint8Array,PB4=lY0?lY0.allocUnsafe:void 0,fB4=fA9(Object.getPrototypeOf,Object),wB4=Object.create,dA9=nY0.propertyIsEnumerable,cA9=gA9.splice,kM=qB4?qB4.toStringTag:void 0,iY0=function(){try{var $=Md0(Object,"defineProperty");return $({},"",{}),$}catch(Y){}}(),lA9=lY0?lY0.isBuffer:void 0,_B4=Math.max,iA9=Date.now,gB4=Md0(mp,"Map"),gp=Md0(Object,"create"),nA9=function(){function $(){}return function(Y){if(!xM(Y))return{};if(wB4)return wB4(Y);$.prototype=Y;var X=new $;return $.prototype=void 0,X}}();function vM($){var Y=-1,X=$==null?0:$.length;this.clear();while(++Y<X){var G=$[Y];this.set(G[0],G[1])}}function rA9(){this.__data__=gp?gp(null):{},this.size=0}function aA9($){var Y=this.has($)&&delete this.__data__[$];return this.size-=Y?1:0,Y}function sA9($){var Y=this.__data__;if(gp){var X=Y[$];return X===TB4?void 0:X}return _V.call(Y,$)?Y[$]:void 0}function oA9($){var Y=this.__data__;return gp?Y[$]!==void 0:_V.call(Y,$)}function tA9($,Y){var X=this.__data__;return this.size+=this.has($)?0:1,X[$]=gp&&Y===void 0?TB4:Y,this}vM.prototype.clear=rA9;vM.prototype.delete=aA9;vM.prototype.get=sA9;vM.prototype.has=oA9;vM.prototype.set=tA9;function jV($){var Y=-1,X=$==null?0:$.length;this.clear();while(++Y<X){var G=$[Y];this.set(G[0],G[1])}}function eA9(){this.__data__=[],this.size=0}function $F9($){var Y=this.__data__,X=aY0(Y,$);if(X<0)return!1;var G=Y.length-1;if(X==G)Y.pop();else cA9.call(Y,X,1);return--this.size,!0}function YF9($){var Y=this.__data__,X=aY0(Y,$);return X<0?void 0:Y[X][1]}function XF9($){return aY0(this.__data__,$)>-1}function GF9($,Y){var X=this.__data__,G=aY0(X,$);if(G<0)++this.size,X.push([$,Y]);else X[G][1]=Y;return this}jV.prototype.clear=eA9;jV.prototype.delete=$F9;jV.prototype.get=YF9;jV.prototype.has=XF9;jV.prototype.set=GF9;function FC($){var Y=-1,X=$==null?0:$.length;this.clear();while(++Y<X){var G=$[Y];this.set(G[0],G[1])}}function JF9(){this.size=0,this.__data__={hash:new vM,map:new(gB4||jV),string:new vM}}function QF9($){var Y=oY0(this,$).delete($);return this.size-=Y?1:0,Y}function WF9($){return oY0(this,$).get($)}function ZF9($){return oY0(this,$).has($)}function KF9($,Y){var X=oY0(this,$),G=X.size;return X.set($,Y),this.size+=X.size==G?0:1,this}FC.prototype.clear=JF9;FC.prototype.delete=QF9;FC.prototype.get=WF9;FC.prototype.has=ZF9;FC.prototype.set=KF9;function DC($){var Y=this.__data__=new jV($);this.size=Y.size}function UF9(){this.__data__=new jV,this.size=0}function HF9($){var Y=this.__data__,X=Y.delete($);return this.size=Y.size,X}function zF9($){return this.__data__.get($)}function VF9($){return this.__data__.has($)}function AF9($,Y){var X=this.__data__;if(X instanceof jV){var G=X.__data__;if(!gB4||G.length<YA9-1)return G.push([$,Y]),this.size=++X.size,this;X=this.__data__=new FC(G)}return X.set($,Y),this.size=X.size,this}DC.prototype.clear=UF9;DC.prototype.delete=HF9;DC.prototype.get=zF9;DC.prototype.has=VF9;DC.prototype.set=AF9;function FF9($,Y){var X=Od0($),G=!X&&Bd0($),J=!X&&!G&&dB4($),Q=!X&&!G&&!J&&lB4($),W=X||G||J||Q,Z=W?yA9($.length,String):[],K=Z.length;for(var H in $)if((Y||_V.call($,H))&&!(W&&(H=="length"||J&&(H=="offset"||H=="parent")||Q&&(H=="buffer"||H=="byteLength"||H=="byteOffset")||uB4(H,K))))Z.push(H);return Z}function Nd0($,Y,X){if(X!==void 0&&!tY0($[Y],X)||X===void 0&&!(Y in $))Ed0($,Y,X)}function DF9($,Y,X){var G=$[Y];if(!(_V.call($,Y)&&tY0(G,X))||X===void 0&&!(Y in $))Ed0($,Y,X)}function aY0($,Y){var X=$.length;while(X--)if(tY0($[X][0],Y))return X;return-1}function Ed0($,Y,X){if(Y=="__proto__"&&iY0)iY0($,Y,{configurable:!0,enumerable:!0,value:X,writable:!0});else $[Y]=X}var NF9=TF9();function sY0($){if($==null)return $===void 0?LA9:VA9;return kM&&kM in Object($)?CF9($):bF9($)}function jB4($){return up($)&&sY0($)==SB4}function LF9($){if(!xM($)||xF9($))return!1;var Y=qd0($)?pA9:SA9;return Y.test(mF9($))}function BF9($){return up($)&&cB4($.length)&&!!X7[sY0($)]}function OF9($){if(!xM($))return yF9($);var Y=pB4($),X=[];for(var G in $)if(!(G=="constructor"&&(Y||!_V.call($,G))))X.push(G);return X}function mB4($,Y,X,G,J){if($===Y)return;NF9(Y,function(Q,W){if(J||(J=new DC),xM(Q))EF9($,Y,W,X,mB4,G,J);else{var Z=G?G(Ld0($,W),Q,W+"",$,Y,J):void 0;if(Z===void 0)Z=Q;Nd0($,W,Z)}},iB4)}function EF9($,Y,X,G,J,Q,W){var Z=Ld0($,X),K=Ld0(Y,X),H=W.get(K);if(H){Nd0($,X,H);return}var z=Q?Q(Z,K,X+"",$,Y,W):void 0,V=z===void 0;if(V){var A=Od0(K),F=!A&&dB4(K),N=!A&&!F&&lB4(K);if(z=K,A||F||N)if(Od0(Z))z=Z;else if(uF9(Z))z=wF9(Z);else if(F)V=!1,z=qF9(K,!0);else if(N)V=!1,z=PF9(K,!0);else z=[];else if(pF9(K)||Bd0(K)){if(z=Z,Bd0(Z))z=dF9(Z);else if(!xM(Z)||qd0(Z))z=SF9(K)}else V=!1}if(V)W.set(K,z),J(z,K,G,Q,W),W.delete(K);Nd0($,X,z)}function MF9($,Y){return fF9(hF9($,Y,nB4),$+"")}var RF9=!iY0?nB4:function($,Y){return iY0($,"toString",{configurable:!0,enumerable:!1,value:lF9(Y),writable:!0})};function qF9($,Y){if(Y)return $.slice();var X=$.length,G=PB4?PB4(X):new $.constructor(X);return $.copy(G),G}function IF9($){var Y=new $.constructor($.byteLength);return new IB4(Y).set(new IB4($)),Y}function PF9($,Y){var X=Y?IF9($.buffer):$.buffer;return new $.constructor(X,$.byteOffset,$.length)}function wF9($,Y){var X=-1,G=$.length;Y||(Y=Array(G));while(++X<G)Y[X]=$[X];return Y}function _F9($,Y,X,G){var J=!X;X||(X={});var Q=-1,W=Y.length;while(++Q<W){var Z=Y[Q],K=G?G(X[Z],$[Z],Z,X,$):void 0;if(K===void 0)K=$[Z];if(J)Ed0(X,Z,K);else DF9(X,Z,K)}return X}function jF9($){return MF9(function(Y,X){var G=-1,J=X.length,Q=J>1?X[J-1]:void 0,W=J>2?X[2]:void 0;if(Q=$.length>3&&typeof Q=="function"?(J--,Q):void 0,W&&kF9(X[0],X[1],W))Q=J<3?void 0:Q,J=1;Y=Object(Y);while(++G<J){var Z=X[G];if(Z)$(Y,Z,G,Q)}return Y})}function TF9($){return function(Y,X,G){var J=-1,Q=Object(Y),W=G(Y),Z=W.length;while(Z--){var K=W[$?Z:++J];if(X(Q[K],K,Q)===!1)break}return Y}}function oY0($,Y){var X=$.__data__;return vF9(Y)?X[typeof Y=="string"?"string":"hash"]:X.map}function Md0($,Y){var X=hA9($,Y);return LF9(X)?X:void 0}function CF9($){var Y=_V.call($,kM),X=$[kM];try{$[kM]=void 0;var G=!0}catch(Q){}var J=hB4.call($);if(G)if(Y)$[kM]=X;else delete $[kM];return J}function SF9($){return typeof $.constructor=="function"&&!pB4($)?nA9(fB4($)):{}}function uB4($,Y){var X=typeof $;return Y=Y==null?CB4:Y,!!Y&&(X=="number"||X!="symbol"&&kA9.test($))&&($>-1&&$%1==0&&$<Y)}function kF9($,Y,X){if(!xM(X))return!1;var G=typeof Y;if(G=="number"?Rd0(X)&&uB4(Y,X.length):G=="string"&&(Y in X))return tY0(X[Y],$);return!1}function vF9($){var Y=typeof $;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?$!=="__proto__":$===null}function xF9($){return!!RB4&&RB4 in $}function pB4($){var Y=$&&$.constructor,X=typeof Y=="function"&&Y.prototype||nY0;return $===X}function yF9($){var Y=[];if($!=null)for(var X in Object($))Y.push(X);return Y}function bF9($){return hB4.call($)}function hF9($,Y,X){return Y=_B4(Y===void 0?$.length-1:Y,0),function(){var G=arguments,J=-1,Q=_B4(G.length-Y,0),W=Array(Q);while(++J<Q)W[J]=G[Y+J];J=-1;var Z=Array(Y+1);while(++J<Y)Z[J]=G[J];return Z[Y]=X(W),xA9($,this,Z)}}function Ld0($,Y){if(Y==="constructor"&&typeof $[Y]==="function")return;if(Y=="__proto__")return;return $[Y]}var fF9=gF9(RF9);function gF9($){var Y=0,X=0;return function(){var G=iA9(),J=GA9-(G-X);if(X=G,J>0){if(++Y>=XA9)return arguments[0]}else Y=0;return $.apply(void 0,arguments)}}function mF9($){if($!=null){try{return rY0.call($)}catch(Y){}try{return $+""}catch(Y){}}return""}function tY0($,Y){return $===Y||$!==$&&Y!==Y}var Bd0=jB4(function(){return arguments}())?jB4:function($){return up($)&&_V.call($,"callee")&&!dA9.call($,"callee")},Od0=Array.isArray;function Rd0($){return $!=null&&cB4($.length)&&!qd0($)}function uF9($){return up($)&&Rd0($)}var dB4=lA9||iF9;function qd0($){if(!xM($))return!1;var Y=sY0($);return Y==kB4||Y==UA9||Y==QA9||Y==AA9}function cB4($){return typeof $=="number"&&$>-1&&$%1==0&&$<=CB4}function xM($){var Y=typeof $;return $!=null&&(Y=="object"||Y=="function")}function up($){return $!=null&&typeof $=="object"}function pF9($){if(!up($)||sY0($)!=vB4)return!1;var Y=fB4($);if(Y===null)return!0;var X=_V.call(Y,"constructor")&&Y.constructor;return typeof X=="function"&&X instanceof X&&rY0.call(X)==uA9}var lB4=MB4?bA9(MB4):BF9;function dF9($){return _F9($,iB4($))}function iB4($){return Rd0($)?FF9($,!0):OF9($)}var cF9=jF9(function($,Y,X){mB4($,Y,X)});function lF9($){return function(){return $}}function nB4($){return $}function iF9(){return!1}AC.exports=cF9});var aB4=o((QR7,nF9)=>{nF9.exports={name:"probe-image-size",version:"7.3.0",description:"Get image size without full download (JPG, GIF, PNG, WebP, BMP, TIFF, PSD)",keywords:["image","size","jpg","jpeg","ico","gif","png","webp","tiff","bmp","svg","psd"],repository:"nodeca/probe-image-size",funding:[{type:"github",url:"https://github.com/sponsors/puzrin"},{type:"github",url:"https://github.com/sponsors/nodeca"}],license:"MIT",files:["index.js","http.js","stream.js","sync.js","lib/"],scripts:{lint:"eslint .",test:"npm run lint && nyc node --test",coverage:"npm run test && nyc report --reporter html","report-coveralls":"nyc --reporter=lcov node --test"},dependencies:{"lodash.merge":"^4.6.2",needle:"^2.5.2","stream-parser":"~0.3.1"},devDependencies:{eslint:"^9.39.4",neostandard:"^0.13.0",nyc:"^18.0.0"}}});var oB4=o((WR7,Id0)=>{var rF9=P4().ProbeError,aF9=OB4(),sF9=rB4(),sB4=aB4(),oF9=kp0(),tF9=L0("url").URL,eF9=sB4.name+"/"+sB4.version+"(+https://github.com/nodeca/probe-image-size)",$D9={open_timeout:1e4,response_timeout:60000,read_timeout:60000,follow_max:10,parse_response:!1,headers:{"User-Agent":eF9}};Id0.exports=function(Y,X){return new Promise(function(G,J){var Q,W,Z=Y,K=!1;function H(){if(Q&&Q.request)Q.request.abort()}function z(A,F){if(K)return;if(K=!0,F){J(F),H();return}G(A),H()}try{var V=sF9({},$D9,X);Q=aF9.get(Y,V)}catch(A){J(A);return}Q.on("redirect",function(A){try{Z=new tF9(A,Z).href}catch(F){z(null,F)}}),Q.on("header",function(A,F){if(A!==200){z(null,new rF9("bad status code: "+A,null,A));return}W=F["content-length"]}),Q.on("err",function(A){z(null,A)}),Q.on("done",function(A){if(A)z(null,A)}),oF9(Q,!0).then(function(A){if(W&&W.match(/^\d+$/))A.length=+W;A.url=Z,z(A)}).catch(function(A){z(null,A)})})};Id0.exports.parsers=EY0()});var eB4=o((ZR7,tB4)=>{var YD9=P4().str2arr,XD9=P4().sliceEq,GD9=P4().readUInt32BE,eY0=wp0(),JD9=wM(),QD9=YD9("ftyp");tB4.exports=function($){if(!XD9($,4,QD9))return;var Y=eY0.unbox($,0);if(!Y)return;var X=eY0.getMimeType(Y.data);if(!X)return;var G,J=Y.end;for(;;){var Q=eY0.unbox($,J);if(!Q)break;if(J=Q.end,Q.boxtype==="mdat")return;if(Q.boxtype==="meta"){G=Q.data;break}}if(!G)return;var W=eY0.readSizeFromMeta(G);if(!W)return;var Z={width:W.width,height:W.height,type:X.type,mime:X.mime,wUnits:"px",hUnits:"px"};if(W.variants.length>1)Z.variants=W.variants;if(W.orientation)Z.orientation=W.orientation;if(W.exif_location&&W.exif_location.offset+W.exif_location.length<=$.length){var K=GD9($,W.exif_location.offset),H=$.slice(W.exif_location.offset+K+4,W.exif_location.offset+W.exif_location.length),z=JD9.get_orientation(H);if(z>0)Z.orientation=z}return Z}});var GO4=o((KR7,XO4)=>{var WD9=P4().str2arr,ZD9=P4().sliceEq,$O4=P4().readInt16LE,YO4=P4().readInt32LE,KD9=P4().readUInt32LE,UD9=WD9("BM");XO4.exports=function($){if($.length<26)return;if(!ZD9($,0,UD9))return;var Y,X,G=KD9($,14);if(G===12)X=$O4($,18),Y=$O4($,20);else if(G>12)X=YO4($,18),Y=YO4($,22);else return;return{width:X,height:Math.abs(Y),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var KO4=o((UR7,ZO4)=>{var WO4=P4().str2arr,JO4=P4().sliceEq,QO4=P4().readUInt16LE,HD9=WO4("GIF87a"),zD9=WO4("GIF89a");ZO4.exports=function($){if($.length<10)return;if(!JO4($,0,HD9)&&!JO4($,0,zD9))return;return{width:QO4($,6),height:QO4($,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var HO4=o((HR7,UO4)=>{var Pd0=P4().readUInt16LE,VD9=0,AD9=1,wd0=16;UO4.exports=function($){var Y=Pd0($,0),X=Pd0($,2),G=Pd0($,4);if(Y!==VD9||X!==AD9||!G)return;if($.length<6+G*wd0)return;var J=[],Q={width:0,height:0};for(var W=0;W<G;W++){var Z=$[6+wd0*W]||256,K=$[6+wd0*W+1]||256,H={width:Z,height:K};if(J.push(H),Z>Q.width||K>Q.height)Q=H}return{width:Q.width,height:Q.height,variants:J,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}});var VO4=o((zR7,zO4)=>{var _d0=P4().readUInt16BE,FD9=P4().str2arr,DD9=P4().sliceEq,ND9=wM(),LD9=FD9("Exif\x00\x00");zO4.exports=function($){if($.length<2)return;if($[0]!==255||$[1]!==216||$[2]!==255)return;var Y=2;for(;;){for(;;){if($.length-Y<2)return;if($[Y++]===255)break}var X=$[Y++],G;while(X===255)X=$[Y++];if(X>=208&&X<=217||X===1)G=0;else if(X>=192&&X<=254){if($.length-Y<2)return;G=_d0($,Y)-2,Y+=2}else return;if(X===217||X===218)return;var J;if(X===225&&G>=10&&DD9($,Y,LD9))J=ND9.get_orientation($.slice(Y+6,Y+G));if(G>=5&&(X>=192&&X<=207)&&X!==196&&X!==200&&X!==204){if($.length-Y<G)return;var Q={width:_d0($,Y+3),height:_d0($,Y+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};if(J>0)Q.orientation=J;return Q}Y+=G}}});var LO4=o((VR7,NO4)=>{var DO4=P4().str2arr,AO4=P4().sliceEq,FO4=P4().readUInt32BE,BD9=DO4(`\x89PNG\r
\x1A
`),OD9=DO4("IHDR");NO4.exports=function($){if($.length<24)return;if(!AO4($,0,BD9))return;if(!AO4($,12,OD9))return;return{width:FO4($,16),height:FO4($,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var EO4=o((AR7,OO4)=>{var ED9=P4().str2arr,MD9=P4().sliceEq,BO4=P4().readUInt32BE,RD9=ED9("8BPS\x00\x01");OO4.exports=function($){if($.length<22)return;if(!MD9($,0,RD9))return;return{width:BO4($,18),height:BO4($,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var qO4=o((FR7,RO4)=>{function qD9($){return $===32||$===9||$===13||$===10}function NC($){return typeof $==="number"&&isFinite($)&&$>0}function ID9($){var Y=0,X=$.length;if($[0]===239&&$[1]===187&&$[2]===191)Y=3;while(Y<X&&qD9($[Y]))Y++;if(Y===X)return!1;return $[Y]===60}var PD9=/<[-_.:a-zA-Z0-9][^>]*>/,wD9=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,_D9=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,jD9=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,TD9=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,MO4=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function CD9($){var Y=$.match(_D9),X=$.match(jD9),G=$.match(TD9);return{width:Y&&(Y[1]||Y[2]),height:X&&(X[1]||X[2]),viewbox:G&&(G[1]||G[2])}}function HH($){if(!MO4.test($))return"px";return $.match(MO4)[0]}RO4.exports=function($){if(!ID9($))return;var Y="";for(var X=0;X<$.length;X++)Y+=String.fromCharCode($[X]);var G=(Y.match(PD9)||[""])[0];if(!wD9.test(G))return;var J=CD9(G),Q=parseFloat(J.width),W=parseFloat(J.height);if(J.width&&J.height){if(!NC(Q)||!NC(W))return;return{width:Q,height:W,type:"svg",mime:"image/svg+xml",wUnits:HH(J.width),hUnits:HH(J.height)}}var Z=(J.viewbox||"").split(" "),K={width:Z[2],height:Z[3]},H=parseFloat(K.width),z=parseFloat(K.height);if(!NC(H)||!NC(z))return;if(HH(K.width)!==HH(K.height))return;var V=H/z;if(J.width){if(!NC(Q))return;return{width:Q,height:Q/V,type:"svg",mime:"image/svg+xml",wUnits:HH(J.width),hUnits:HH(J.width)}}if(J.height){if(!NC(W))return;return{width:W*V,height:W,type:"svg",mime:"image/svg+xml",wUnits:HH(J.height),hUnits:HH(J.height)}}return{width:H,height:z,type:"svg",mime:"image/svg+xml",wUnits:HH(K.width),hUnits:HH(K.height)}}});var jO4=o((DR7,_O4)=>{var wO4=P4().str2arr,IO4=P4().sliceEq,SD9=P4().readUInt16LE,kD9=P4().readUInt16BE,vD9=P4().readUInt32LE,xD9=P4().readUInt32BE,yD9=wO4("II*\x00"),bD9=wO4("MM\x00*");function $X0($,Y,X){return X?kD9($,Y):SD9($,Y)}function jd0($,Y,X){return X?xD9($,Y):vD9($,Y)}function PO4($,Y,X){var G=$X0($,Y+2,X),J=jd0($,Y+4,X);if(J!==1||G!==3&&G!==4)return null;if(G===3)return $X0($,Y+8,X);return jd0($,Y+8,X)}_O4.exports=function($){if($.length<8)return;if(!IO4($,0,yD9)&&!IO4($,0,bD9))return;var Y=$[0]===77,X=jd0($,4,Y)-8;if(X<0)return;var G=X+8;if($.length-G<2)return;var J=$X0($,G+0,Y)*12;if(J<=0)return;if(G+=2,$.length-G<J)return;var Q,W,Z,K;for(Q=0;Q<J;Q+=12)if(K=$X0($,G+Q,Y),K===256)W=PO4($,G+Q,Y);else if(K===257)Z=PO4($,G+Q,Y);if(W&&Z)return{width:W,height:Z,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}});var vO4=o((NR7,kO4)=>{var SO4=P4().str2arr,TO4=P4().sliceEq,CO4=P4().readUInt16LE,Td0=P4().readUInt32LE,hD9=wM(),fD9=SO4("RIFF"),gD9=SO4("WEBP");function mD9($,Y){if($[Y+3]!==157||$[Y+4]!==1||$[Y+5]!==42)return;return{width:CO4($,Y+6)&16383,height:CO4($,Y+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function uD9($,Y){if($[Y]!==47)return;var X=Td0($,Y+1);return{width:(X&16383)+1,height:(X>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function pD9($,Y){return{width:($[Y+6]<<16|$[Y+5]<<8|$[Y+4])+1,height:($[Y+9]<<16|$[Y+8]<<8|$[Y+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}kO4.exports=function($){if($.length<16)return;if(!TO4($,0,fD9)||!TO4($,8,gD9))return;var Y=12,X=null,G=0,J=Td0($,4)+8;if(J>$.length)return;while(Y+8<J){if($[Y]===0){Y++;continue}var Q=String.fromCharCode.apply(null,$.slice(Y,Y+4)),W=Td0($,Y+4);if(Q==="VP8 "&&W>=10)X=X||mD9($,Y+8);else if(Q==="VP8L"&&W>=5)X=X||uD9($,Y+8);else if(Q==="VP8X"&&W>=10)X=X||pD9($,Y+8);else if(Q==="EXIF")G=hD9.get_orientation($.slice(Y+8,Y+8+W)),Y=1/0;Y+=8+W}if(!X)return;if(G>0)X.orientation=G;return X}});var yO4=o((LR7,xO4)=>{xO4.exports={avif:eB4(),bmp:GO4(),gif:KO4(),ico:HO4(),jpeg:VO4(),png:LO4(),psd:EO4(),svg:qO4(),tiff:jO4(),webp:vO4()}});var bO4=o((BR7,Sd0)=>{var Cd0=yO4();function dD9($){var Y=Object.keys(Cd0);for(var X=0;X<Y.length;X++){var G=Cd0[Y[X]]($);if(G){if(G.width>0&&G.height>0)return G;return null}}return null}Sd0.exports=function(Y){return dD9(Y)};Sd0.exports.parsers=Cd0});var hO4=o((OR7,pp)=>{var cD9=kp0(),lD9=oB4();pp.exports=function(Y,X){if(typeof Y.on==="function"&&typeof Y.emit==="function")return cD9(Y,X);return lD9(Y,X||{})};pp.exports.parsers=EY0();pp.exports.sync=bO4();pp.exports.Error=P4().ProbeError});import{appendFileSync as iD9,writeFileSync as KN,mkdirSync as nD9}from"fs";import{join as VH}from"path";import{randomBytes as rD9,createHash as GE4,randomUUID as aD9}from"crypto";import{inspect as sD9}from"util";import{AsyncLocalStorage as oD9}from"async_hooks";function S4($){if(!fd0)return;try{iD9(fd0,`[${new Date().toLocaleString()}] ${$}
`)}catch{}}function lW($,Y){let X=Y instanceof Error?Y.stack??Y.message:Y!==void 0?String(Y):"",G=X?`${$}: ${X}`:$;S4(`[OM:ERROR] ${G}`)}function td0($,Y){return`${$}:${Y}`}function np($,Y){let X=td0($,Y);EC.set(X,(EC.get(X)??0)+1)}function BC($,Y){let X=td0($,Y),G=EC.get(X);if(!G)return;if(G<=1)EC.delete(X);else EC.set(X,G-1)}function JX0($,Y){return(EC.get(td0($,Y))??0)>0}function JE4($,Y){if($===void 0||Y===void 0)return!1;let X=$.includes("/"),G=Y.includes("/");if(X&&G)return $!==Y;let J=X?$.slice($.indexOf("/")+1):$,Q=G?Y.slice(Y.indexOf("/")+1):Y;return J!==Q}function QE4($,Y){let X=Y.getTime()-$.getTime(),G=Math.floor(X/86400000);if(G<0){let J=Math.abs(G);if(J===1)return"tomorrow";if(J<7)return`in ${J} days`;if(J<14)return"in 1 week";if(J<30)return`in ${Math.floor(J/7)} weeks`;if(J<60)return"in 1 month";if(J<365)return`in ${Math.floor(J/30)} months`;let Q=Math.floor(J/365);return`in ${Q} year${Q>1?"s":""}`}if(G===0)return"today";if(G===1)return"yesterday";if(G<7)return`${G} days ago`;if(G<14)return"1 week ago";if(G<30)return`${Math.floor(G/7)} weeks ago`;if(G<60)return"1 month ago";if(G<365)return`${Math.floor(G/30)} months ago`;return`${Math.floor(G/365)} year${Math.floor(G/365)>1?"s":""} ago`}function tD9($,Y){let X=Y.getTime()-$.getTime(),G=Math.floor(X/86400000);if(G<=1)return null;else if(G<7)return`[${G} days later]`;else if(G<14)return"[1 week later]";else if(G<30)return`[${Math.floor(G/7)} weeks later]`;else if(G<60)return"[1 month later]";else return`[${Math.floor(G/30)} months later]`}function eD9($){let Y=null,X=$.match(/([A-Z][a-z]+)\s+(\d{1,2}),?\s+(\d{4})/);if(X){let G=new Date(`${X[1]} ${X[2]}, ${X[3]}`);if(!isNaN(G.getTime()))Y=G}if(!Y){let G=$.match(/([A-Z][a-z]+)\s+(\d{1,2})-\d{1,2},?\s+(\d{4})/);if(G){let J=new Date(`${G[1]} ${G[2]}, ${G[3]}`);if(!isNaN(J.getTime()))Y=J}}if(!Y){let G=$.match(/(late|early|mid)[- ]?(?:to[- ]?(?:late|early|mid)[- ]?)?([A-Z][a-z]+)\s+(\d{4})/i);if(G){let J=G[2],Q=G[3],W=G[1].toLowerCase(),Z=15;if(W==="early")Z=7;if(W==="late")Z=23;let K=new Date(`${J} ${Z}, ${Q}`);if(!isNaN(K.getTime()))Y=K}}if(!Y){let G=$.match(/([A-Z][a-z]+)\s+to\s+(?:early\s+)?([A-Z][a-z]+)\s+(\d{4})/i);if(G){let J=new Date(`${G[2]} 1, ${G[3]}`);if(!isNaN(J.getTime()))Y=J}}return Y}function $N9($){return[/\bwill\s+(?:be\s+)?(?:\w+ing|\w+)\b/i,/\bplans?\s+to\b/i,/\bplanning\s+to\b/i,/\blooking\s+forward\s+to\b/i,/\bgoing\s+to\b/i,/\bintends?\s+to\b/i,/\bwants?\s+to\b/i,/\bneeds?\s+to\b/i,/\babout\s+to\b/i].some((X)=>X.test($))}function YN9($,Y){let X=/\((estimated|meaning)\s+([^)]+\d{4})\)/gi;return $.replace(X,(G,J,Q,W)=>{let Z=eD9(Q);if(Z){let K=QE4(Z,Y),H=$.lastIndexOf(`
`,W)+1,z=$.slice(H,W),V=Z<Y,A=$N9(z);if(V&&A)return`(${J} ${Q} - ${K}, likely already happened)`;return`(${J} ${Q} - ${K})`}return G})}function XN9($,Y){let X=YN9($,Y),G=/^(Date:\s*)([A-Z][a-z]+ \d{1,2}, \d{4})$/gm,J=[],Q;while((Q=G.exec(X))!==null){let K=Q[2],H=new Date(K);if(!isNaN(H.getTime()))J.push({index:Q.index,date:H,match:Q[0],prefix:Q[1],dateStr:K})}if(J.length===0)return X;let W="",Z=0;for(let K=0;K<J.length;K++){let H=J[K],z=K>0?J[K-1]:null;if(W+=X.slice(Z,H.index),z){let A=tD9(z.date,H.date);if(A)W+=`
${A}

`}let V=QE4(H.date,Y);W+=`${H.prefix}${H.dateStr} (${V})`,Z=H.index+H.match.length}return W+=X.slice(Z),W}function JN9($){if($<GN9)return null;let Y=60000,X=60*Y,G=24*X,J=7*G,Q=30*G,W=365*G,Z=(H,z)=>`${H} ${z}${H===1?"":"s"}`;if($<X){let H=Math.max(1,Math.round($/Y));return`${Z(H,"minute")} later`}let K=(H,z,V,A)=>{let F=Math.floor($/H),N=$-F*H,D=Math.floor(N/V),L=[Z(F,z)];if(D>0)L.push(Z(D,A));return`${L.join(" ")} later`};if($<G)return K(X,"hour",Y,"minute");if($<J)return K(G,"day",X,"hour");if($<Q)return K(J,"week",G,"day");if($<W)return K(Q,"month",J,"week");return K(W,"year",Q,"month")}function WE4($){return $.toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"2-digit",hour12:!0,timeZoneName:"short"})}function fO4($,Y){let X=$.content?.parts?.map((G)=>("createdAt"in G)?G.createdAt:void 0).filter((G)=>typeof G==="number");if(X&&X.length>0){let G=Y==="first"?0:X.length-1,J=X[G];if(J!==void 0)return J}return new Date($.createdAt).getTime()}function QX0($){return $.id.startsWith("__temporal_")}function WX0($){return{type:"data-om-observation-start",data:{cycleId:$.cycleId,operationType:$.operationType,startedAt:new Date().toISOString(),tokensToObserve:$.tokensToObserve,recordId:$.recordId,threadId:$.threadId,threadIds:$.threadIds,config:$.config}}}function ed0($){let Y=new Date().toISOString(),X=new Date(Y).getTime()-new Date($.startedAt).getTime();return{type:"data-om-observation-end",data:{cycleId:$.cycleId,operationType:$.operationType,completedAt:Y,durationMs:X,tokensObserved:$.tokensObserved,observationTokens:$.observationTokens,observations:$.observations,currentTask:$.currentTask,suggestedResponse:$.suggestedResponse,recordId:$.recordId,threadId:$.threadId}}}function ZX0($){let Y=new Date().toISOString(),X=new Date(Y).getTime()-new Date($.startedAt).getTime();return{type:"data-om-observation-failed",data:{cycleId:$.cycleId,operationType:$.operationType,failedAt:Y,durationMs:X,tokensAttempted:$.tokensAttempted,error:$.error,recordId:$.recordId,threadId:$.threadId}}}function gd0($){return{type:"data-om-buffering-start",data:{cycleId:$.cycleId,operationType:$.operationType,startedAt:new Date().toISOString(),tokensToBuffer:$.tokensToBuffer,recordId:$.recordId,threadId:$.threadId,threadIds:$.threadIds,config:$.config}}}function ZE4($){let Y=new Date().toISOString(),X=new Date(Y).getTime()-new Date($.startedAt).getTime();return{type:"data-om-buffering-end",data:{cycleId:$.cycleId,operationType:$.operationType,completedAt:Y,durationMs:X,tokensBuffered:$.tokensBuffered,bufferedTokens:$.bufferedTokens,recordId:$.recordId,threadId:$.threadId,observations:$.observations}}}function KE4($){let Y=new Date().toISOString(),X=new Date(Y).getTime()-new Date($.startedAt).getTime();return{type:"data-om-buffering-failed",data:{cycleId:$.cycleId,operationType:$.operationType,failedAt:Y,durationMs:X,tokensAttempted:$.tokensAttempted,error:$.error,recordId:$.recordId,threadId:$.threadId}}}function UE4($){return{type:"data-om-activation",data:{cycleId:$.cycleId,operationType:$.operationType,activatedAt:new Date().toISOString(),chunksActivated:$.chunksActivated,tokensActivated:$.tokensActivated,observationTokens:$.observationTokens,messagesActivated:$.messagesActivated,recordId:$.recordId,threadId:$.threadId,generationCount:$.generationCount,config:$.config,observations:$.observations,triggeredBy:$.triggeredBy,lastActivityAt:$.lastActivityAt,ttlExpiredMs:$.ttlExpiredMs,previousModel:$.previousModel,currentModel:$.currentModel}}}function $c0($){return{type:"data-om-thread-update",data:{cycleId:$.cycleId,threadId:$.threadId,oldTitle:$.oldTitle,newTitle:$.newTitle,timestamp:new Date().toISOString()}}}function rp($){let Y=$.content?.parts;if(!Y||!Array.isArray(Y))return-1;for(let X=Y.length-1;X>=0;X--)if(Y[X]?.type==="data-om-observation-end")return X;return-1}function GX0($){let Y=$.content?.parts;if(!Y||!Array.isArray(Y))return[];let X=rp($);if(X===-1)return Y.filter((G)=>{return G?.type!=="data-om-observation-start"});return Y.slice(X+1).filter((G)=>{return!G?.type?.startsWith("data-om-observation-")})}function Yc0($){let Y;for(let X of $){if(!X?.id||!X.createdAt)continue;if(!Y||new Date(X.createdAt).getTime()>new Date(Y.createdAt).getTime())Y=X}return Y?{createdAt:new Date(Y.createdAt).toISOString(),id:Y.id}:void 0}function QN9($,Y){if(!$.createdAt)return!1;let X=new Date($.createdAt).toISOString();if(X<Y.createdAt)return!0;if(X===Y.createdAt&&$.id===Y.id)return!0;return!1}function WN9($){let{messageList:Y,record:X}=$,G=Y.get.all.db(),J=$.useMarkerBoundaryPruning??!0,Q=-1,W=null;for(let Z=G.length-1;Z>=0;Z--){let K=G[Z];if(!K)continue;if(rp(K)!==-1){Q=Z,W=K;break}}if(J&&W&&Q!==-1){let Z=[];for(let H=0;H<Q;H++){let z=G[H];if(z?.id&&z.id!=="om-continuation")Z.push(z.id)}if(Z.length>0)Y.removeByIds(Z);let K=GX0(W);if(K.length===0){if(W.id)Y.removeByIds([W.id])}else if(K.length<(W.content?.parts?.length??0))W.content.parts=K}else if(X){let Z=new Set(Array.isArray(X.observedMessageIds)?X.observedMessageIds:[]),K=$.fallbackCursor??Yc0(G.filter((V)=>!!V?.id&&Z.has(V.id)&&!!V.createdAt)),H=X.lastObservedAt,z=[];for(let V of G){if(!V?.id||V.id==="om-continuation")continue;if(Z.has(V.id)){z.push(V.id);continue}if(K&&QN9(V,K)){z.push(V.id);continue}if(H&&V.createdAt){if(new Date(V.createdAt)<=H)z.push(V.id)}}if(z.length>0)Y.removeByIds(z)}}function yM($){if(!$?.bufferedObservationChunks)return[];if(Array.isArray($.bufferedObservationChunks))return $.bufferedObservationChunks;if(typeof $.bufferedObservationChunks==="string")try{let Y=JSON.parse($.bufferedObservationChunks);return Array.isArray(Y)?Y:[]}catch{return[]}return[]}function ZN9($,Y){if(!$&&!Y)return;if(!$)return Y;if(!Y)return $;return`${$}

--- BUFFERED (pending activation) ---

${Y}`}function KN9($){return Array.from($.entries()).map(([Y,X])=>({threadId:Y,oldestTimestamp:Math.min(...X.map((G)=>G.createdAt?new Date(G.createdAt).getTime():Date.now()))})).sort((Y,X)=>Y.oldestTimestamp-X.oldestTimestamp).map((Y)=>Y.threadId)}function HE4($){return $.replace(/<\/?thread\b[^>]{0,1024}>/gi,"").trim()}function UN9($){if(typeof $==="string")return!0;if(!$||typeof $!=="object")return!1;return"modelId"in $||"id"in $||"providerId"in $||"provider"in $||"doGenerate"in $&&"doStream"in $}function HN9($){let Y=Object.entries($.upTo);if(Y.length===0)throw Error('ModelByInputTokens requires at least one threshold in "upTo"');for(let[X,G]of Y){let J=Number(X);if(!Number.isFinite(J)||J<=0)throw Error(`ModelByInputTokens threshold keys must be positive numbers. Got: ${X}`);if(!UN9(G))throw Error(`ModelByInputTokens requires a valid model target for threshold ${X}`)}return Y.map(([X,G])=>({limit:Number(X),model:G})).sort((X,G)=>X.limit-G.limit)}function VN9($){let Y={};for(let X of $.matchAll(zN9)){let[,G,J]=X;if(G&&J!==void 0)Y[G]=J}return Y}function AN9($){let Y=$.trim();if(!Y||!gO4.test(Y))return[];return Y.split(gO4).map((X)=>X.trim()).filter(Boolean).map((X)=>{let G=X.indexOf(`
`),J=(G>=0?X.slice(0,G):X).trim(),Q=(G>=0?X.slice(G+1):"").trim();return{heading:J,body:FN9(Q)}})}function FN9($){return $.replace(/^_range:\s*`[^`]*`_\s*\n?/m,"").trim()}function zE4(){return rD9(8).toString("hex")}function TV($,Y,X=zE4(),G,J){let Q=$.trim(),W=J?` kind="${J}"`:"";return`<observation-group id="${X}" range="${Y}"${W}>
${Q}
</observation-group>`}function op($){if(!$)return[];let Y=[],X;while((X=Xc0.exec($))!==null){let G=VN9(X[1]??""),J=G.id,Q=G.range;if(!J||!Q)continue;Y.push({id:J,range:Q,kind:G.kind,content:X[2].trim()})}return Y}function Gc0($){if(!$)return $;return $.replace(Xc0,(Y,X,G)=>G.trim()).replace(/\n{3,}/g,`

`).trim()}function DN9($){return $.split(",").map((Y)=>Y.trim()).filter(Boolean)}function DX0($){let Y=$.flatMap((W)=>DN9(W.range));if(Y.length===0)return"";let X=Y[0],G=Y[Y.length-1],J=X?.split(":")[0]?.trim(),Q=G?.split(":").at(-1)?.trim();if(J&&Q)return`${J}:${Q}`;return Array.from(new Set(Y)).join(",")}function Jc0($){let Y=op($);if(Y.length===0)return null;let X=new Map(Y.map((J)=>[J.content.trim(),J]));return $.replace(Xc0,(J,Q,W)=>{let Z=X.get(W.trim());if(!Z)return W.trim();return`## Group \`${Z.id}\`
_range: \`${Z.range}\`_

${Z.content}`}).replace(/\n{3,}/g,`

`).trim()}function NN9($,Y){return $.match(/`([^`]+)`/)?.[1]?.trim()||`derived-group-${Y+1}`}function Qc0($,Y){let X=AN9($);if(X.length===0||Y.length===0)return[];return X.map((G,J)=>{let Q=new Set(G.body.split(`
`).map((z)=>z.trim()).filter(Boolean)),W=Y.filter((z)=>{return z.content.split(`
`).map((A)=>A.trim()).filter(Boolean).some((A)=>Q.has(A))}),Z=Y[Math.min(J,Y.length-1)],K=W.length>0?W:Z?[Z]:[];return{id:NN9(G.heading,J),range:DX0(K),kind:"reflection",content:G.body}})}function Wc0($,Y){let X=op(Y);if(X.length===0)return null;let G=$.trim();if(!G)return"";let J=Qc0(G,X);if(J.length>0)return J.map((Q)=>TV(Q.content,Q.range,Q.id,void 0,Q.kind)).join(`

`);return TV(G,DX0(X),zE4(),void 0,"reflection")}function a$($){if(typeof $==="number")return $;return $.max}function mO4($,Y){if(typeof $==="number")return $;let{max:X,min:G}=$,J=Math.max(X-Y,G);return Math.round(J)}function LN9($,Y){if($===!1)return;if($===void 0)return;if($>0&&$<1)return Math.round(a$(Y)*$);return $}function uO4($,Y){if($===void 0)return;if($>=1&&$<100)return Math.round(a$(Y)*$);return $}function VE4($,Y){if($>=1000)return $;let X=Math.max(0,Math.min(1,$));return Y*(1-X)}function BN9($,Y){if($>=1000)return Math.max(0,Math.min(1,1-$/Y));return Math.max(0,Math.min(1,$))}function ON9($,Y,X,G){if($.length===0)return 0;let J=VE4(Y,X),Q=Math.max(0,G-J);if(Q===0)return 0;let W=0,Z=0,K=0,H=0,z=0;for(let B=0;B<$.length;B++){W+=$[B].messageTokens??0;let O=B+1;if(W>=Q){if(Z===0||W<K)Z=O,K=W}else if(W>z)H=O,z=W}let V=J*0.95,A=K-Q,F=G-K,N=G-z,D=Math.min(1000,J),L;if(Z>0&&A<=V&&F>=D)L=K;else if(H>0&&N>=D)L=z;else if(Z>0)L=K;else return $[0]?.messageTokens??0;return L}async function AE4({memory:$,messageList:Y,threadId:X,resourceId:G}){let J=await $.getContext({threadId:X,resourceId:G});for(let Q of J.messages)if(Q.role!=="system")Y.add(Q,"memory");return J}function SN9($,Y){return Y===0?`O${$}`:`O${$}-N${Y}`}function Zc0($){return $.match(wN9)?.[1]??null}function kN9($){let Y=$.trim();if(!Y)return!1;if(Zc0(Y))return!1;if(_N9.test(Y))return!1;if(jN9.test(Y))return!1;if(TN9.test(Y)||CN9.test(Y))return!1;return!0}function vN9($){let Y=$.match(/^\s*/)?.[0]??"";return Math.floor(Y.replace(/\t/g,"  ").length/2)}function FE4($){if(!$)return $;let Y=$.split(`
`),X=0,G=0,J=!1;for(let Q=0;Q<Y.length;Q++){let W=Y[Q];if(!kN9(W))continue;if(vN9(W)===0)X+=1,G=0;else{if(X===0)X=1;G+=1}let K=SN9(X,G),H=W.match(/^\s*/)?.[0]??"";Y[Q]=`${H}[${K}] ${W.slice(H.length)}`,J=!0}return J?Y.join(`
`):$}function NX0($){if(!$)return $;return $.replace(/(^|\n)([^\S\n]*)\[(O\d+(?:-N\d+)?)\][^\S\n]*/g,"$1$2")}function Kc0($,Y){if(Y<=0)return"";if(Y>=$.length)return $;let X=$.charCodeAt(Y-1),G=X>=55296&&X<=56319?Y-1:Y;return $.slice(0,G)}function bN9($){return typeof $==="object"&&$!==null}function md0($,Y=new WeakMap){if(!bN9($))return $;if(Y.has($))return Y.get($);if(Array.isArray($)){let G=[];Y.set($,G);for(let J of $)G.push(md0(J,Y));return G}let X={};Y.set($,X);for(let[G,J]of Object.entries($)){if(G===xN9&&typeof J==="string"&&J.length>yN9){X[G]=`[stripped encryptedContent: ${J.length} characters]`;continue}X[G]=md0(J,Y)}return X}function hN9($){if(typeof $==="string")return $;let Y=md0($);try{return JSON.stringify(Y,null,2)}catch{return String(Y)}}function LX0($,Y){let X=$?.providerMetadata?.mastra;if(X&&typeof X==="object"&&"modelOutput"in X)return{value:X.modelOutput,usingStoredModelOutput:!0};return{value:Y,usingStoredModelOutput:!1}}function gM($,Y){if(!$||Y<=0)return"";let X=JG($);if(X<=Y)return $;let G=(Z)=>{let K=Kc0($,Z);return`${K}
... [truncated ~${X-JG(K)} tokens]`},J=0,Q=$.length,W=G(0);while(J<=Q){let Z=Math.floor((J+Q)/2),K=G(Z);if(JG(K)<=Y)W=K,J=Z+1;else Q=Z-1}return W}function tp($,Y){let X=hN9($),G=Y?.maxTokens??DE4;return gM(X,G)}function NE4($=!1){return`Use priority levels:
- \uD83D\uDD34 High: explicit user facts, preferences, unresolved goals, critical context
- \uD83D\uDFE1 Medium: project details, learned information, tool results
- \uD83D\uDFE2 Low: minor details, uncertain observations
- \u2705 Completed: concrete task finished, question answered, issue resolved, goal achieved, or subtask completed in a way that helps the assistant know it is done

Group related observations (like tool sequences) by indenting:
* \uD83D\uDD34 (14:33) Agent debugging auth issue
  * -> ran git status, found 3 modified files
  * -> viewed auth.ts:45-60, found missing null check
  * -> applied fix, tests now pass
  * \u2705 Tests passing, auth issue resolved

Group observations by date, then list each with 24-hour time.

<observations>
Date: Dec 4, 2025
* \uD83D\uDD34 (14:30) User prefers direct answers
* \uD83D\uDD34 (14:31) Working on feature X
* \uD83D\uDFE1 (14:32) User might prefer dark mode

Date: Dec 5, 2025
* \uD83D\uDD34 (09:15) Continued work on feature X
</observations>

<current-task>
State the current task(s) explicitly. Can be single or multiple:
- Primary: What the agent is currently working on
- Secondary: Other pending tasks (mark as "waiting for user" if appropriate)

If the agent started doing something without user approval, note that it's off-task.
</current-task>

<suggested-response>
Hint for the agent's immediate next message. Examples:
- "I've updated the navigation model. Let me walk you through the changes..."
- "The assistant should wait for the user to respond before continuing."
- Call the view tool on src/example.ts to continue debugging.
</suggested-response>${$?`
<thread-title>
A short, noun-phrase title for this conversation (2-5 words). Examples:
- "Auth bug fix" \u2014 not "Fixing the auth bug"
- "Dark mode toggle" \u2014 not "User wants dark mode toggle added"
- "Deployment pipeline setup" \u2014 not "Setting up deployment pipeline for project"
Only update when the topic meaningfully changes.
</thread-title>`:""}`}function MC($=!1,Y,X=!1){let G=NE4(X),J=X?` Each thread's observations, current-task, suggested-response, and thread-title should be nested inside a <thread id="..."> block within <observations>.`:` Each thread's observations, current-task, and suggested-response should be nested inside a <thread id="..."> block within <observations>.`,Q=X?`
<thread-title>Feature X implementation</thread-title>`:"",W=X?`
<thread-title>Deployment setup</thread-title>`:"";if($)return`You are the memory consciousness of an AI assistant. Your observations will be the ONLY information the assistant has about past interactions with this user.

Extract observations that will help the assistant remember:

${ud0}

=== MULTI-THREAD INPUT ===

You will receive messages from MULTIPLE conversation threads, each wrapped in <thread id="..."> tags.
Process each thread separately and output observations for each thread.

=== OUTPUT FORMAT ===

Your output MUST use XML tags to structure the response.${J}

Use this observation format inside each thread block:

${G}

For multi-thread output, wrap each thread's observations like this:

<observations>
<thread id="thread_id_1">
Date: Dec 4, 2025
* \uD83D\uDD34 (14:30) User prefers direct answers
* \uD83D\uDD34 (14:31) Working on feature X

<current-task>
What the agent is currently working on in this thread
</current-task>

<suggested-response>
Hint for the agent's next message in this thread
</suggested-response>${Q}
</thread>

<thread id="thread_id_2">
Date: Dec 5, 2025
* \uD83D\uDD34 (09:15) User asked about deployment

<current-task>
Current task for this thread
</current-task>

<suggested-response>
Suggested response for this thread
</suggested-response>${W}
</thread>
</observations>

=== GUIDELINES ===

${pd0}

Remember: These observations are the assistant's ONLY memory. Make them count.

User messages are extremely important. If the user asks a question or gives a new task, make it clear in <current-task> that this is the priority.${Y?`

=== CUSTOM INSTRUCTIONS ===

${Y}`:""}`;return`You are the memory consciousness of an AI assistant. Your observations will be the ONLY information the assistant has about past interactions with this user.

Extract observations that will help the assistant remember:

${ud0}

=== OUTPUT FORMAT ===

Your output MUST use XML tags to structure the response. This allows the system to properly parse and manage memory over time.

${G}

=== GUIDELINES ===

${pd0}

=== IMPORTANT: THREAD ATTRIBUTION ===

Do NOT add thread identifiers, thread IDs, or <thread> tags to your observations.
Thread attribution is handled externally by the system.
Simply output your observations without any thread-related markup.

Remember: These observations are the assistant's ONLY memory. Make them count.

User messages are extremely important. If the user asks a question or gives a new task, make it clear in <current-task> that this is the priority. If the assistant needs to respond to the user, indicate in <suggested-response> that it should pause for user reply before continuing other tasks.${Y?`

=== CUSTOM INSTRUCTIONS ===

${Y}`:""}`}function mN9($){return $?`${$.toLocaleDateString("en-US",{month:"short"})} ${$.getDate()} ${$.getFullYear()}`:""}function uN9($){return $?$.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):""}function pN9($){return($.split("#",1)[0]?.split("?",1)[0]??$).match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()}function kd0($){return typeof $==="string"&&gN9.has(pN9($)??"")}function BE4($){if($.type!=="file")return!1;if(typeof $.mimeType==="string"&&$.mimeType.toLowerCase().startsWith("image/"))return!0;if(typeof $.data==="string"&&$.data.startsWith("data:image/"))return!0;if($.data instanceof URL&&kd0($.data.pathname))return!0;if(typeof $.data==="string")try{let Y=new URL($.data);if((Y.protocol==="http:"||Y.protocol==="https:")&&kd0(Y.pathname))return!0}catch{}return kd0($.filename)}function OE4($){if($.type==="image")return{type:"image",image:$.image,mimeType:$.mimeType,providerOptions:$.providerOptions,providerMetadata:$.providerMetadata,experimental_providerMetadata:$.experimental_providerMetadata};if(BE4($))return{type:"image",image:$.data,mimeType:$.mimeType,providerOptions:$.providerOptions,providerMetadata:$.providerMetadata,experimental_providerMetadata:$.experimental_providerMetadata};return{type:"file",data:$.data,mimeType:$.mimeType,filename:$.filename,providerOptions:$.providerOptions,providerMetadata:$.providerMetadata,experimental_providerMetadata:$.experimental_providerMetadata}}function dN9($){if($.filename?.trim())return $.filename.trim();let Y=$.type==="image"?$.image:$.data;if(typeof Y!=="string"||Y.startsWith("data:"))return $.mimeType;try{let G=new URL(Y).pathname.split("/").filter(Boolean).pop();return G?decodeURIComponent(G):$.mimeType}catch{return $.mimeType}}function EE4($,Y){let X=$.type==="image"||BE4($)?"Image":"File",G=X==="Image"?Y.nextImageId++:Y.nextFileId++,J=dN9($);return J?`[${X} #${G}: ${J}]`:`[${X} #${G}]`}function dd0($){return!!$&&typeof $==="object"}function cN9($){if(!dd0($)||typeof $.type!=="string")return;let Y=typeof $.mediaType==="string"?$.mediaType:void 0,X=typeof $.filename==="string"?$.filename:void 0;switch($.type){case"image-data":{let G=$.data;if(typeof G!=="string")return;return{type:"image",image:Y?`data:${Y};base64,${G}`:G,mimeType:Y}}case"image-url":{let G=$.url;if(typeof G!=="string")return;return{type:"image",image:G,mimeType:Y}}case"media":{let G=$.data;if(typeof G!=="string"||!Y)return;let J=`data:${Y};base64,${G}`;if(Y.toLowerCase().startsWith("image/"))return{type:"image",image:J,mimeType:Y};return{type:"file",data:J,mimeType:Y}}case"file-data":{let G=$.data;if(typeof G!=="string")return;return{type:"file",data:Y?`data:${Y};base64,${G}`:G,mimeType:Y,filename:X}}case"file-url":{let G=$.url;if(typeof G!=="string")return;return{type:"file",data:G,mimeType:Y,filename:X}}default:return}}function lN9($,Y){if(!dd0($)||$.type!=="content"||!Array.isArray($.value))return{resultWithoutAttachments:$,attachments:[]};let X=$,G=[],J=X.value.map((Q)=>{let W=cN9(Q);if(!W)return Q;G.push(OE4(W));let Z=EE4(W,Y);return{type:dd0(Q)?Q.type:void 0,placeholder:Z}});if(G.length===0)return{resultWithoutAttachments:$,attachments:G};return{resultWithoutAttachments:{...X,value:J},attachments:G}}function iN9($,Y,X,G){let J=X&&X!==G?`(${X})`:"";if(!$)return J?`${J}: ${Y}`:Y;return`${$}${J?` ${J}`:""}: ${Y}`}function vd0($){if($ instanceof Date){if(Number.isNaN($.getTime()))return;return $}if(typeof $==="number"||typeof $==="string"){let Y=new Date($);if(Number.isNaN(Y.getTime()))return;return Y}return}function ME4($,Y={}){let X=[],G=Y.previousDate,J=Y.previousTime;for(let Q of $){if(Q.date&&Q.date!==G)X.push(`${Q.date}:`),G=Q.date,J=void 0;X.push(iN9(Q.title,Q.body,Q.time,J)),J=Q.time||J}return{text:X.join(`
`),context:{previousDate:G,previousTime:J}}}function nN9($){let Y=typeof $.content==="object"&&$.content&&"metadata"in $.content?$.content.metadata:void 0;if(Y?.reminderType==="temporal-gap"&&typeof Y.gapText==="string")return Y.gapText;if(typeof Y?.systemReminder==="object"&&Y.systemReminder&&"type"in Y.systemReminder&&Y.systemReminder.type==="temporal-gap"&&"gapText"in Y.systemReminder&&typeof Y.systemReminder.gapText==="string")return Y.systemReminder.gapText;return}function Uc0($,Y,X){let G=X?.maxPartLength,J=X?.maxToolResultTokens??DE4,Q=$.role.charAt(0).toUpperCase()+$.role.slice(1),W=[],Z=vd0($.createdAt),K=[],H=QX0($)?nN9($):void 0,z=(V,A,F)=>{if(!A)return;let N=vd0(F)??Z;K.push({date:mN9(N),time:uN9(N),title:V,body:A})};if(H)z("",H,Z);else if(typeof $.content==="string")z(Q,LC($.content,G),Z);else if($.content?.parts&&Array.isArray($.content.parts)&&$.content.parts.length>0)$.content.parts.forEach((V)=>{let A=vd0(V.createdAt)??Z;if(V.type==="text"){z(Q,LC(V.text,G),A);return}if(V.type==="tool-invocation"){let N=V.toolInvocation;if(N.state==="result"){let{value:D}=LX0(V,N.result),{resultWithoutAttachments:L,attachments:B}=lN9(D,Y);if(B.length>0)W.push(...B);z(`Tool Result ${N.toolName}`,LC(tp(L,{maxTokens:J}),G),A);return}z(`Tool Call ${N.toolName}`,LC(JSON.stringify(N.args,null,2),G),A);return}let F=V.type;if(F==="reasoning"){let N=V.reasoning;if(!N)return;z("Reasoning",LC(N,G),A);return}if(F==="image"||F==="file"){let N=V,D=OE4(N);if(D)W.push(D);z(F==="image"?"Image":"File",EE4(N,Y),A)}});else if($.content?.content)z(Q,LC($.content.content,G),Z);if(K.length===0&&W.length===0)return{lines:[],attachments:W};return{lines:K,attachments:W}}function BX0($,Y){let X={nextImageId:1,nextFileId:1},G=[],J={};for(let Q of $){let W=Uc0(Q,X,Y);if(W.lines.length===0)continue;let Z=ME4(W.lines,J);if(!Z.text)continue;G.push(Z.text),J=Z.context}return G.join(`
`)}function RE4($,Y,X){let G=ME4(Y.lines,X);if(G.text)$.push({type:"text",text:G.text});return $.push(...Y.attachments),G.context}function rN9($,Y){let X={nextImageId:1,nextFileId:1},G=[{type:"text",text:`## New Message History to Observe

`}],J={};return $.forEach((Q)=>{let W=Uc0(Q,X,Y);if(W.lines.length===0&&W.attachments.length===0)return;J=RE4(G,W,J)}),{role:"user",content:G}}function LC($,Y){if(!Y||$.length<=Y)return $;let X=Kc0($,Y),G=$.length-X.length;return`${X}
... [truncated ${G} characters]`}function aN9($,Y,X){let G={nextImageId:1,nextFileId:1},J=[{type:"text",text:`## New Message History to Observe

The following messages are from ${Y.length} different conversation threads. Each thread is wrapped in a <thread id="..."> tag.

`}];return Y.forEach((Q,W)=>{let Z=$.get(Q);if(!Z||Z.length===0)return;let K=[],H={},z=!1;if(Z.forEach((V)=>{let A=Uc0(V,G,X);if(A.lines.length===0&&A.attachments.length===0)return;H=RE4(K,A,H),z=!0}),!z)return;if(J.push({type:"text",text:`<thread id="${Q}">
`}),J.push(...K),J.push({type:"text",text:`
</thread>`}),W<Y.length-1)J.push({type:"text",text:`

`})}),{role:"user",content:J}}function sN9($,Y,X,G,J){let Q="";if($)Q+=`## Previous Observations

${$}

---

`,Q+=`Do not repeat these existing observations. Your new observations will be appended to the existing observations.

`;let W=Y?.map((K)=>{let H=X?.get(K);if(!(H?.currentTask||H?.suggestedResponse||J&&H?.threadTitle))return"";let V=[`- thread ${K}`];if(H.currentTask)V.push(`  - prior current-task: ${H.currentTask}`);if(H.suggestedResponse)V.push(`  - prior suggested-response: ${H.suggestedResponse}`);if(J&&H.threadTitle)V.push(`  - prior thread-title: ${H.threadTitle}`);return V.join(`
`)}).filter(Boolean).join(`
`);if(W)Q+=`## Prior Thread Metadata

${W}

`,Q+=`Use each thread's prior current-task, suggested-response${J?", and thread-title":""} as continuity hints, then update them based on that thread's new messages.

---

`;if(Q+=`## Your Task

`,Q+=`Extract new observations from each thread. Output your observations grouped by thread using <thread id="..."> tags inside your <observations> block. Each thread block should contain that thread's observations, current-task, suggested-response${J?", and thread-title":""}.

`,Q+=`Example output format:
`,Q+=`<observations>
`,Q+=`<thread id="thread1">
`,Q+=`Date: Dec 4, 2025
`,Q+=`* \uD83D\uDD34 (14:30) User prefers direct answers
`,Q+=`<current-task>Working on feature X</current-task>
`,Q+=`<suggested-response>Continue with the implementation</suggested-response>
`,J)Q+=`<thread-title>Feature X implementation</thread-title>
`;if(Q+=`</thread>
`,Q+=`<thread id="thread2">
`,Q+=`Date: Dec 5, 2025
`,Q+=`* \uD83D\uDD34 (09:15) User asked about deployment
`,Q+=`<current-task>Discussing deployment options</current-task>
`,Q+=`<suggested-response>Explain the deployment process</suggested-response>
`,J)Q+=`<thread-title>Deployment setup</thread-title>
`;return Q+=`</thread>
`,Q+="</observations>",Q}function pO4($){let Y=new Map;if(zc0($))return{threads:Y,rawOutput:$,degenerate:!0};let G=$.match(/^[ \t]*<observations>([\s\S]*?)^[ \t]*<\/observations>/im)?.[1]??$,J=/<thread\s+id="([^"]+)">([\s\S]*?)<\/thread>/gi,Q;while((Q=J.exec(G))!==null){let W=Q[1],Z=Q[2];if(!W||!Z)continue;let K=Z,H,z=Z.match(/<current-task>([\s\S]*?)<\/current-task>/i);if(z?.[1])H=z[1].trim(),K=K.replace(/<current-task>[\s\S]*?<\/current-task>/i,"");let V,A=Z.match(/<suggested-response>([\s\S]*?)<\/suggested-response>/i);if(A?.[1])V=A[1].trim(),K=K.replace(/<suggested-response>[\s\S]*?<\/suggested-response>/i,"");let F,N=Z.match(/<thread-title>([\s\S]*?)<\/thread-title>/i);if(N?.[1])F=N[1].trim(),K=K.replace(/<thread-title>[\s\S]*?<\/thread-title>/i,"");K=Hc0(K.trim()),Y.set(W,{observations:K,currentTask:H,suggestedContinuation:V,threadTitle:F,rawOutput:Z})}return{threads:Y,rawOutput:$}}function qE4($,Y){let X="";if($)X+=`## Previous Observations

${$}

---

`,X+=`Do not repeat these existing observations. Your new observations will be appended to the existing observations.

`;let G=Y?.wasTruncated??!1,J=[];if(Y?.priorCurrentTask)J.push(`- prior current-task: ${Y.priorCurrentTask}`);if(Y?.priorSuggestedResponse)J.push(`- prior suggested-response: ${Y.priorSuggestedResponse}`);if(Y?.includeThreadTitle&&Y?.priorThreadTitle)J.push(`- prior thread-title: ${Y.priorThreadTitle}`);if(J.length>0){if(X+=`## Prior Thread Metadata

${J.join(`
`)}

`,G)X+=`Previous observations were truncated for context budget reasons.
`,X+=`The main agent still has full memory context outside this observer window.
`;let Q=Y?.includeThreadTitle?", and thread-title":"";X+=`Use the prior current-task, suggested-response${Q} as continuity hints, then update them based on the new messages.

---

`}if(X+=`## Your Task

`,X+="Extract new observations from the message history above. Do not repeat observations that are already in the previous observations. Add your new observations in the format specified in your instructions.",Y?.includeThreadTitle)X+=`

Also output a <thread-title> \u2014 a short noun-phrase label for this conversation (2-5 words). Write it like a file name or PR title: "Auth bug fix", "Memory config refactor", "RAG pipeline setup". Avoid verbs/sentences ("Fixing the auth bug"), filler ("Working on stuff"), and generic labels ("Code review"). Only change it from the prior title if the topic meaningfully shifted.`;if(Y?.skipContinuationHints)X+=`

IMPORTANT: Do NOT include <current-task> or <suggested-response> sections in your output. Only output <observations>${Y?.includeThreadTitle?" and <thread-title>":""}.`;return X}function IE4($,Y,X){return`## New Message History to Observe

${BX0(Y)}

---

${qE4($,X)}`}function KX0($){if(zc0($))return{observations:"",rawOutput:$,degenerate:!0};let Y=oN9($);return{observations:Hc0(Y.observations||""),currentTask:Y.currentTask||void 0,suggestedContinuation:Y.suggestedResponse||void 0,threadTitle:Y.threadTitle||void 0,rawOutput:$}}function oN9($){let Y={observations:"",currentTask:"",suggestedResponse:"",threadTitle:""},X=/^[ \t]*<observations>([\s\S]*?)^[ \t]*<\/observations>/gim,G=[...$.matchAll(X)];if(G.length>0)Y.observations=G.map((Z)=>Z[1]?.trim()??"").filter(Boolean).join(`
`);else Y.observations=tN9($);let J=$.match(/^[ \t]*<current-task>([\s\S]*?)^[ \t]*<\/current-task>/im);if(J?.[1])Y.currentTask=J[1].trim();let Q=$.match(/^[ \t]*<suggested-response>([\s\S]*?)^[ \t]*<\/suggested-response>/im);if(Q?.[1])Y.suggestedResponse=Q[1].trim();let W=$.match(/^[ \t]*<thread-title>([\s\S]*?)<\/thread-title>/im);if(W?.[1])Y.threadTitle=W[1].trim();return Y}function tN9($){let Y=$.split(`
`),X=[];for(let G of Y)if(/^\s*[-*]\s/.test(G)||/^\s*\d+\.\s/.test(G))X.push(G);return X.join(`
`).trim()}function Hc0($){if(!$)return $;let Y=$.split(`
`),X=!1;for(let G=0;G<Y.length;G++)if(Y[G].length>dO4)Y[G]=Kc0(Y[G],dO4)+" \u2026 [truncated]",X=!0;return X?Y.join(`
`):$}function zc0($){if(!$||$.length<2000)return!1;let Y=200,X=Math.max(1,Math.floor($.length/50)),G=new Map,J=0,Q=0;for(let Z=0;Z+Y<=$.length;Z+=X){let K=$.slice(Z,Z+Y);Q++;let H=(G.get(K)??0)+1;if(G.set(K,H),H>1)J++}if(Q>5&&J/Q>0.4)return!0;let W=$.split(`
`);for(let Z of W)if(Z.length>50000)return!0;return!1}function PE4($){if(/<current-task>/i.test($))return!0;return[/\*\*Current Task:?\*\*/i,/^Current Task:/im,/\*\*Current Task\*\*:/i,/## Current Task/i].some((X)=>X.test($))}function wE4($){let G=$.toLowerCase().indexOf("<current-task>");if(G===-1)return null;let J=G+14,Q=$.toLowerCase().indexOf("</current-task>",J);if(Q===-1)return null;return $.slice(J,Q).trim()||null}function UX0($){let Y=NX0($);return Y=Y.replace(/\uD83D\uDFE1\s*/g,""),Y=Y.replace(/\uD83D\uDFE2\s*/g,""),Y=Y.replace(/\[(?![\d\s]*items collapsed)[^\]]+\]/g,""),Y=Y.replace(/\s*->\s*/g," "),Y=Y.replace(/  +/g," "),Y=Y.replace(/\n{3,}/g,`

`),Y.trim()}function qC($){return typeof $==="object"&&$!==null}function _E4($){if(!qC($))return!1;if($.name==="AbortError")return!0;if(typeof $.code==="string"&&$.code==="ABORT_ERR")return!0;return!1}function $L9($){if(!qC($))return!1;let Y=typeof $.message==="string"?$.message.toLowerCase():"";if(Y&&eN9.some((X)=>Y.includes(X)))return!0;if(typeof $.code==="string"&&$.code.toUpperCase().startsWith("UND_ERR_"))return!0;return!1}function YL9($){if(!qC($))return!1;let Y=typeof $.statusCode==="number"?$.statusCode:void 0;if(Y===void 0)return!1;if(Y===408||Y===425||Y===429)return!0;if(Y>=500&&Y<=599)return!0;return!1}function XL9($){if(!qC($))return!1;return $.isRetryable===!0}function GL9($){if(_E4($))return!1;let Y=new WeakSet;function X(G){if(qC(G)){if(Y.has(G))return!1;Y.add(G)}if($L9(G))return!0;if(YL9(G))return!0;if(XL9(G))return!0;if(qC(G)){if(X(G.cause))return!0;if(X(G.error))return!0}return!1}return X($)}function JL9($){let Y=ip.initialDelayMs*Math.pow(ip.backoffFactor,$),X=Math.min(Y,ip.maxDelayMs),G=X*ip.jitter,J=(Math.random()*2-1)*G;return Math.max(0,Math.round(X+J))}function QL9($,Y){if($<=0)return Promise.resolve();return new Promise((X,G)=>{if(Y?.aborted){G(Error("The operation was aborted."));return}let J=setTimeout(()=>{Y?.removeEventListener("abort",Q),X()},$),Q=()=>{clearTimeout(J),Y?.removeEventListener("abort",Q),G(Error("The operation was aborted."))};Y?.addEventListener("abort",Q,{once:!0})})}async function cd0($,Y){let{label:X,abortSignal:G}=Y,J=0;while(!0){if(G?.aborted)throw Error("The operation was aborted.");try{return await $()}catch(Q){if(_E4(Q)||G?.aborted)throw Q;if(J>=ip.maxRetries||!GL9(Q)){if(J>0)S4(`[OM:retry:${X}] giving up after ${J} retry/retries: ${Q instanceof Error?Q.message:String(Q)}`);throw Q}let W=JL9(J);J++,S4(`[OM:retry:${X}] transient error on attempt ${J}, retrying in ${W}ms: ${Q instanceof Error?Q.message:String(Q)}`),await QL9(W,G)}}}async function ld0({phase:$,model:Y,inputTokens:X,requestContext:G,observabilityContext:J,metadata:Q,callback:W}){let Z=WL9[$],K=wW({type:mz.GENERIC,name:Z.name,entityType:J6.OUTPUT_STEP_PROCESSOR,entityName:Z.entityName,tracingContext:J?.tracingContext??J?.tracing,attributes:{metadata:{omPhase:$,omInputTokens:X,omSelectedModel:typeof Y==="string"?Y:"(dynamic-model)",...Q}},requestContext:G}),H=g4({currentSpan:K});if(!K)return W(H);return K.executeInContext(()=>W(H))}function KL9($){return`You are the memory consciousness of an AI assistant. Your memory observation reflections will be the ONLY information the assistant has about past interactions with this user.

The following instructions were given to another part of your psyche (the observer) to create memories.
Use this to understand how your observational memories were created.

<observational-memory-instruction>
${ud0}

=== OUTPUT FORMAT ===

${fN9}

=== GUIDELINES ===

${pd0}
</observational-memory-instruction>

You are another part of the same psyche, the observation reflector.
Your reason for existing is to reflect on all the observations, re-organize and streamline them, and draw connections and conclusions between observations about what you've learned, seen, heard, and done.

You are a much greater and broader aspect of the psyche. Understand that other parts of your mind may get off track in details or side quests, make sure you think hard about what the observed goal at hand is, and observe if we got off track, and why, and how to get back on track. If we're on track still that's great!

Take the existing observations and rewrite them to make it easier to continue into the future with this knowledge, to achieve greater things and grow and learn!

IMPORTANT: your reflections are THE ENTIRETY of the assistants memory. Any information you do not add to your reflections will be immediately forgotten. Make sure you do not leave out anything. Your reflections must assume the assistant knows nothing - your reflections are the ENTIRE memory system.

When consolidating observations:
- Preserve and include dates/times when present (temporal context is critical)
- Retain the most relevant timestamps (start times, completion times, significant events)
- Combine related items where it makes sense (e.g., "agent called view tool 5 times on file x")
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
- Condense older observations more aggressively, retain more detail for recent ones

CRITICAL: USER ASSERTIONS vs QUESTIONS
- "User stated: X" = authoritative assertion (user told us something about themselves)
- "User asked: X" = question/request (user seeking information)

When consolidating, USER ASSERTIONS TAKE PRECEDENCE. The user is the authority on their own life.
If you see both "User stated: has two kids" and later "User asked: how many kids do I have?",
keep the assertion - the question doesn't invalidate what they told you. The answer is in the assertion.

=== THREAD ATTRIBUTION (Resource Scope) ===

When observations contain <thread id="..."> sections:
- MAINTAIN thread attribution where thread-specific context matters (e.g., ongoing tasks, thread-specific preferences)
- CONSOLIDATE cross-thread facts that are stable/universal (e.g., user profile, general preferences)
- PRESERVE thread attribution for recent or context-specific observations
- When consolidating, you may merge observations from multiple threads if they represent the same universal fact

Example input:
<thread id="thread-1">
Date: Dec 4, 2025
* \uD83D\uDD34 (14:30) User prefers TypeScript
* \uD83D\uDFE1 (14:35) Working on auth feature
</thread>
<thread id="thread-2">
Date: Dec 4, 2025
* \uD83D\uDD34 (15:00) User prefers TypeScript
* \uD83D\uDFE1 (15:05) Debugging API endpoint
</thread>

Example output (consolidated):
Date: Dec 4, 2025
* \uD83D\uDD34 (14:30) User prefers TypeScript
<thread id="thread-1">
* \uD83D\uDFE1 (14:35) Working on auth feature
</thread>
<thread id="thread-2">
* \uD83D\uDFE1 (15:05) Debugging API endpoint
</thread>

=== OUTPUT FORMAT ===

Your output MUST use XML tags to structure the response:

<observations>
Put all consolidated observations here using the date-grouped format with priority emojis (\uD83D\uDD34, \uD83D\uDFE1, \uD83D\uDFE2).
Group related observations with indentation.
</observations>

<current-task>
State the current task(s) explicitly:
- Primary: What the agent is currently working on
- Secondary: Other pending tasks (mark as "waiting for user" if appropriate)
</current-task>

<suggested-response>
Hint for the agent's immediate next message. Examples:
- "I've updated the navigation model. Let me walk you through the changes..."
- "The assistant should wait for the user to respond before continuing."
- Call the view tool on src/example.ts to continue debugging.
</suggested-response>

User messages are extremely important. If the user asks a question or gives a new task, make it clear in <current-task> that this is the priority. If the assistant needs to respond to the user, indicate in <suggested-response> that it should pause for user reply before continuing other tasks.${$?`

=== CUSTOM INSTRUCTIONS ===

${$}`:""}`}function zL9($,Y,X,G){let J=typeof X==="number"?X:X?1:0,W=`## OBSERVATIONS TO REFLECT ON

${Gc0($)}

---

Please analyze these observations and produce a refined, condensed version that will become the assistant's entire memory going forward.`;if(Y)W+=`

## SPECIFIC GUIDANCE

${Y}`;let Z=HL9[J];if(Z)W+=`

${Z}`;if(G)W+=`

IMPORTANT: Do NOT include <current-task> or <suggested-response> sections in your output. Only output <observations>.`;return W}function VL9($,Y){if(zc0($))return{observations:"",degenerate:!0};let X=AL9($),G=Hc0(NX0(X.observations||""));return{observations:(Y?Wc0(G,Y):null)??G,suggestedContinuation:X.suggestedResponse||void 0}}function AL9($){let Y={observations:"",currentTask:"",suggestedResponse:""},X=/^[ \t]*<observations>([\s\S]*?)^[ \t]*<\/observations>/gim,G=[...$.matchAll(X)];if(G.length>0)Y.observations=G.map((W)=>W[1]?.trim()??"").filter(Boolean).join(`
`);else{let W=FL9($);Y.observations=W||$.trim()}let J=$.match(/<current-task>([\s\S]*?)<\/current-task>/i);if(J?.[1])Y.currentTask=J[1].trim();let Q=$.match(/<suggested-response>([\s\S]*?)<\/suggested-response>/i);if(Q?.[1])Y.suggestedResponse=Q[1].trim();return Y}function FL9($){let Y=$.split(`
`),X=[];for(let G of Y)if(/^\s*[-*]\s/.test(G)||/^\s*\d+\.\s/.test(G))X.push(G);return X.join(`
`).trim()}function cO4($,Y){return $<Y}function jE4($,Y){if($&&Y)return`${$}/${Y}`;return Y}function DL9($){return jE4($?.provider,$?.modelId)}function NL9($){let Y=$?.get.all.db();if(!Y)return;for(let X=Y.length-1;X>=0;X--){let G=Y[X];if(!G||G.role!=="assistant"||!G.content||typeof G.content==="string")continue;for(let W=G.content.parts.length-1;W>=0;W--){let Z=G.content.parts[W];if(Z?.type==="step-start"&&typeof Z.model==="string"&&Z.model.length>0)return Z.model}let J=G.content.metadata,Q=jE4(J?.provider,J?.modelId);if(Q)return Q}return}async function LL9($,Y){if(Y?.aborted)throw Error("The operation was aborted.");let X=await $();if(Y?.aborted)throw Error("The operation was aborted.");return X}function OL9(){return process.env.OM_REPRO_CAPTURE_DIR??".mastra-om-repro"}function EL9($){let Y=$.replace(/[\\/]+/g,"_").replace(/\.{2,}/g,"_").trim();return Y.length>0?Y:"unknown-thread"}function OX0(){return process.env.OM_REPRO_CAPTURE==="1"}function OC($){return JSON.parse(JSON.stringify($,(Y,X)=>{if(typeof X==="bigint")return X.toString();if(typeof X==="function")return"[function]";if(typeof X==="symbol")return X.toString();if(X instanceof Error)return{name:X.name,message:X.message,stack:X.stack};if(X instanceof Set)return{__type:"Set",values:Array.from(X.values())};if(X instanceof Map)return{__type:"Map",entries:Array.from(X.entries())};return X}))}function id0($){try{return{ok:!0,value:OC($)}}catch(Y){return{ok:!1,error:OC({message:Y instanceof Error?Y.message:String(Y),stack:Y instanceof Error?Y.stack:void 0,inspected:sD9($,{depth:3,maxArrayLength:20,breakLength:120})})}}}function xd0($){if(!$)return;if($ instanceof Date)return $.toISOString();try{return new Date($).toISOString()}catch{return}}function ML9($){if(!$||typeof $!=="object")return $;let Y=$;return{__type:"ObservationTurn",threadId:Y.threadId,resourceId:Y.resourceId,started:Y._started,ended:Y._ended,generationCountAtStart:Y._generationCountAtStart,record:Y._record?{id:Y._record.id,scope:Y._record.scope,threadId:Y._record.threadId,resourceId:Y._record.resourceId,createdAt:xd0(Y._record.createdAt),updatedAt:xd0(Y._record.updatedAt),lastObservedAt:xd0(Y._record.lastObservedAt),generationCount:Y._record.generationCount,observationTokenCount:Y._record.observationTokenCount,pendingMessageTokens:Y._record.pendingMessageTokens,isBufferingObservation:Y._record.isBufferingObservation,isBufferingReflection:Y._record.isBufferingReflection}:void 0,context:Y._context?{messageCount:Array.isArray(Y._context.messages)?Y._context.messages.length:void 0,hasSystemMessage:Array.isArray(Y._context.systemMessage)?Y._context.systemMessage.length>0:Boolean(Y._context.systemMessage),continuationId:Y._context.continuation?.id,hasOtherThreadsContext:Boolean(Y._context.otherThreadsContext),recordId:Y._context.record?.id}:void 0,currentStep:Y._currentStep?{stepNumber:Y._currentStep.stepNumber,prepared:Y._currentStep._prepared,context:Y._currentStep._context?{activated:Y._currentStep._context.activated,observed:Y._currentStep._context.observed,buffered:Y._currentStep._context.buffered,reflected:Y._currentStep._context.reflected,didThresholdCleanup:Y._currentStep._context.didThresholdCleanup,messageCount:Array.isArray(Y._currentStep._context.messages)?Y._currentStep._context.messages.length:void 0,systemMessageCount:Array.isArray(Y._currentStep._context.systemMessage)?Y._currentStep._context.systemMessage.length:void 0}:void 0}:void 0}}function RL9($){return Object.fromEntries(Object.entries($).map(([Y,X])=>{if(Y==="__omTurn")return[Y,ML9(X)];return[Y,X]}))}function iO4($){let Y=$.createdAt instanceof Date?$.createdAt.toISOString():$.createdAt?new Date($.createdAt).toISOString():"";return JSON.stringify({role:$.role,createdAt:Y,content:$.content})}function qL9($,Y){let X=new Map,G=new Map;for(let Q of $){if(!Q.id)continue;let W=iO4(Q),Z=X.get(W)??[];Z.push(Q.id),X.set(W,Z)}for(let Q of Y){if(!Q.id)continue;let W=iO4(Q),Z=G.get(W)??[];Z.push(Q.id),G.set(W,Z)}let J=[];for(let[Q,W]of X.entries()){let Z=G.get(Q);if(!Z||W.length!==1||Z.length!==1)continue;let K=W[0],H=Z[0];if(!K||!H||K===H)continue;J.push({fromId:K,toId:H,fingerprint:Q})}return J}function TE4($,Y){let X=EL9($),G=VH(process.cwd(),OL9(),X,`${Date.now()}-${Y}-${aD9()}`);return nD9(G,{recursive:!0}),G}function IL9($){if(!OX0()||!$.observerExchange)return;try{let Y=TE4($.threadId,$.label),X=[{fileName:"input.json",data:{threadId:$.threadId,resourceId:$.resourceId,label:$.label}},{fileName:"output.json",data:{details:$.details??{}}},{fileName:"observer-exchange.json",data:$.observerExchange}],G=[];for(let J of X){let Q=id0(J.data);if(Q.ok){KN(VH(Y,J.fileName),`${JSON.stringify(Q.value,null,2)}
`);continue}G.push({fileName:J.fileName,error:Q.error}),KN(VH(Y,J.fileName),`${JSON.stringify({__captureError:Q.error},null,2)}
`)}if(G.length>0){KN(VH(Y,"capture-error.json"),`${JSON.stringify(G,null,2)}
`),$.debug?.(`[OM:repro-capture] wrote ${$.label} capture with ${G.length} serialization error(s) to ${Y}`);return}$.debug?.(`[OM:repro-capture] wrote ${$.label} capture to ${Y}`)}catch(Y){$.debug?.(`[OM:repro-capture] failed to write ${$.label} capture: ${String(Y)}`)}}function PL9($){if(!OX0())return;try{let Y=TE4($.threadId,`step-${$.stepNumber}`),X=$.messageList.get.all.db(),G=rU($.args.requestContext),J=new Set($.preMessages.map((F)=>F.id)),Q=new Set(X.map((F)=>F.id)),W=$.preMessages.map((F)=>F.id).filter((F)=>Boolean(F)&&!Q.has(F)),Z=X.map((F)=>F.id).filter((F)=>Boolean(F)&&!J.has(F)),K=qL9($.preMessages,X),H=$.args.state??{},z=RL9(H),V=[{fileName:"input.json",data:{stepNumber:$.stepNumber,threadId:$.threadId,resourceId:$.resourceId,readOnly:G?.memoryConfig?.readOnly,messageCount:X.length,messageIds:X.map((F)=>F.id),stateKeys:Object.keys(H),state:z,args:{messages:$.args.messages,steps:$.args.steps,systemMessages:$.args.systemMessages,retryCount:$.args.retryCount,toolChoice:$.args.toolChoice,activeTools:$.args.activeTools,modelSettings:$.args.modelSettings,structuredOutput:$.args.structuredOutput}}},{fileName:"pre-state.json",data:{record:$.preRecord,bufferedChunks:$.preBufferedChunks,contextTokenCount:$.preContextTokenCount,messages:$.preMessages,messageList:$.preSerializedMessageList}},{fileName:"output.json",data:{details:$.details,messageDiff:{removedMessageIds:W,addedMessageIds:Z,idRemap:K}}},{fileName:"post-state.json",data:{record:$.postRecord,bufferedChunks:$.postBufferedChunks,contextTokenCount:$.postContextTokenCount,messageCount:X.length,messageIds:X.map((F)=>F.id),messages:X,messageList:$.messageList.serialize()}}],A=[];for(let F of V){let N=id0(F.data);if(N.ok){KN(VH(Y,F.fileName),`${JSON.stringify(N.value,null,2)}
`);continue}A.push({fileName:F.fileName,error:N.error}),KN(VH(Y,F.fileName),`${JSON.stringify({__captureError:N.error},null,2)}
`)}if($.observerExchange){let F=id0($.observerExchange);if(F.ok)KN(VH(Y,"observer-exchange.json"),`${JSON.stringify(F.value,null,2)}
`);else A.push({fileName:"observer-exchange.json",error:F.error}),KN(VH(Y,"observer-exchange.json"),`${JSON.stringify({__captureError:F.error},null,2)}
`)}if(A.length>0){KN(VH(Y,"capture-error.json"),`${JSON.stringify(A,null,2)}
`),$.debug?.(`[OM:repro-capture] wrote processInputStep capture with ${A.length} serialization error(s) to ${Y}`);return}$.debug?.(`[OM:repro-capture] wrote processInputStep capture to ${Y}`)}catch(Y){$.debug?.(`[OM:repro-capture] failed to write processInputStep capture: ${String(Y)}`)}}function CE4($){return $.providerMetadata?.mastra}function SE4($){let Y=$;return Y.providerMetadata??={},Y.providerMetadata.mastra??={},Y.providerMetadata.mastra}function xL9($){if(!$||typeof $!=="object")return;return $.metadata?.mastra}function yL9($){if(!$||typeof $!=="object")return;let Y=$;return Y.metadata??={},Y.metadata.mastra??={},Y.metadata.mastra}function bL9($){return $.metadata?.mastra}function hL9($){let Y=$;return Y.metadata??={},Y.metadata.mastra??={},Y.metadata.mastra}function dp($,Y){let X=GE4("sha1").update(Y).digest("hex");return`${$}:${X}`}function fL9(){return"tokenx"}function HX0($){if(!$||typeof $!=="object")return!1;let Y=$;return typeof Y.v==="number"&&typeof Y.source==="string"&&typeof Y.key==="string"&&typeof Y.tokens==="number"}function nd0($,Y){if(!$||typeof $!=="object")return;if(HX0($))return $.key===Y?$:void 0;let X=$[Y];return HX0(X)?X:void 0}function rd0($,Y,X){if(HX0($)){if($.key===Y)return X;return{[$.key]:$,[Y]:X}}if($&&typeof $==="object")return{...$,[Y]:X};return X}function YX0($,Y){return nd0(CE4($)?.tokenEstimate,Y)}function cp($,Y,X){let G=SE4($);G.tokenEstimate=rd0(G.tokenEstimate,Y,X)}function rO4($){let Y=CE4($)?.tokenEstimate;if(!Y||typeof Y!=="object")return;let X=(G)=>HX0(G)&&G.source===_L9&&Number.isFinite(G.tokens)&&G.tokens>=0;if(X(Y))return Y;for(let G of Object.values(Y))if(X(G))return G;return}function gL9($,Y){let X=nd0(xL9($.content)?.tokenEstimate,Y);if(X)return X;return nd0(bL9($)?.tokenEstimate,Y)}function mL9($,Y,X){let G=yL9($.content);if(G){G.tokenEstimate=rd0(G.tokenEstimate,Y,X);return}let J=hL9($);J.tokenEstimate=rd0(J.tokenEstimate,Y,X)}function uL9($){let Y=$;if(!Boolean(Y.providerMetadata?.mastra?.tokenEstimate))return JSON.stringify($);let G={...Y,providerMetadata:{...Y.providerMetadata??{},mastra:{...Y.providerMetadata?.mastra??{}}}};if(delete G.providerMetadata.mastra.tokenEstimate,Object.keys(G.providerMetadata.mastra).length===0)delete G.providerMetadata.mastra;if(Object.keys(G.providerMetadata).length===0)delete G.providerMetadata;return JSON.stringify(G)}function kE4($){let X=($ instanceof URL?$.pathname:typeof $==="string"&&ep($)?(()=>{try{return new URL($).pathname}catch{return}})():void 0)?.split("/").filter(Boolean).pop();return X?decodeURIComponent(X):void 0}function pL9($){let Y=Z4($,"filename"),X=kE4(Z4($,"data"));return JSON.stringify({type:"file",mimeType:Z4($,"mimeType")??null,filename:typeof Y==="string"&&Y.trim().length>0?Y.trim():X??null})}function lp($,Y,X){return Boolean($&&$.v===ZN&&$.source===X&&$.key===Y&&Number.isFinite($.tokens))}function aO4($){if(!$)return;if(typeof $==="object")return $.provider||$.modelId?{provider:$.provider,modelId:$.modelId}:void 0;let Y=$.indexOf("/");if(Y===-1)return{modelId:$};return{provider:$.slice(0,Y),modelId:$.slice(Y+1)}}function dL9($){if($==="low"||$==="high")return $;return"auto"}function Z4($,Y){if(!$||typeof $!=="object")return;return $[Y]}function zX0($){let Y=Z4(Z4($,"providerOptions"),"openai"),X=Z4(Z4($,"providerMetadata"),"openai"),G=Z4(Z4($,"providerMetadata"),"mastra");return dL9(Z4($,"detail")??Z4($,"imageDetail")??Z4(Y,"detail")??Z4(Y,"imageDetail")??Z4(X,"detail")??Z4(X,"imageDetail")??Z4(G,"imageDetail"))}function XX0($){return typeof $==="string"&&kL9.has($)?$:void 0}function vE4($){let Y=Z4(Z4($,"providerOptions"),"google"),X=Z4(Z4($,"providerMetadata"),"google"),G=Z4(Z4($,"providerMetadata"),"mastra");return XX0(Z4($,"mediaResolution"))??XX0(Z4(Y,"mediaResolution"))??XX0(Z4(X,"mediaResolution"))??XX0(Z4(G,"mediaResolution"))??"unspecified"}function zH($){return typeof $==="number"&&Number.isFinite($)&&$>0?$:void 0}function ep($){return typeof $==="string"&&/^https?:\/\//i.test($)}function cL9($){return $.startsWith("/")||$.startsWith("./")||$.startsWith("../")||$.startsWith("~/")||/^[A-Za-z]:[\\/]/.test($)||$.includes("\\")}function lL9($){if($.length<16||$.length%4!==0||/\s/.test($)||cL9($))return!1;return/^[A-Za-z0-9+/]+={0,2}$/.test($)}function iL9($){if(typeof Buffer<"u"&&Buffer.isBuffer($))return $;if($ instanceof Uint8Array)return Buffer.from($);if($ instanceof ArrayBuffer)return Buffer.from($);if(ArrayBuffer.isView($))return Buffer.from($.buffer,$.byteOffset,$.byteLength);if(typeof $!=="string"||ep($))return;if($.startsWith("data:")){let Y=$.indexOf(",");if(Y===-1)return;let X=$.slice(0,Y),G=$.slice(Y+1);if(/;base64/i.test(X))return Buffer.from(G,"base64");return Buffer.from(decodeURIComponent(G),"utf8")}if(!lL9($))return;return Buffer.from($,"base64")}function xE4($,Y){let X=SE4($);X.imageDimensions=Y}function nL9($){if($ instanceof URL)return $.toString();if(typeof $==="string"&&ep($))return $;return}async function sO4($){let Y=ad0($);if(Y.width&&Y.height)return Y;let X=Z4($,"image")??Z4($,"data"),G=nL9(X);if(!G)return Y;try{let Q=(await Promise.resolve().then(() => U6(hO4(),1))).default,W=await Q(G,{open_timeout:yd0,response_timeout:yd0,read_timeout:yd0,follow_max:2}),Z=Y.width??zH(W.width),K=Y.height??zH(W.height);if(!Z||!K)return Y;let H={width:Z,height:K};return xE4($,H),H}catch{return Y}}function ad0($){let Y=Z4(Z4($,"providerMetadata"),"mastra"),X=Z4(Y,"imageDimensions"),G=zH(Z4($,"width"))??zH(Z4($,"imageWidth"))??zH(Z4(X,"width")),J=zH(Z4($,"height"))??zH(Z4($,"imageHeight"))??zH(Z4(X,"height"));if(G&&J)return{width:G,height:J};let Q=Z4($,"image")??Z4($,"data"),W=iL9(Q);if(!W)return{width:G,height:J};try{let Z=rD4(W),K=zH(Z.width),H=zH(Z.height);if(!K||!H)return{width:G,height:J};let z={width:G??K,height:J??H};return xE4($,z),z}catch{return{width:G,height:J}}}function oO4($){let Y=$.replace(/\s+/g,""),X=Y.endsWith("==")?2:Y.endsWith("=")?1:0;return Math.max(0,Math.floor(Y.length*3/4)-X)}function sd0($){if($ instanceof URL)return{source:"url"};if(typeof $==="string"){if(ep($))return{source:"url"};if($.startsWith("data:")){let Y=$.indexOf(","),X=Y===-1?"":$.slice(Y+1);return{source:"data-uri",sizeBytes:oO4(X)}}return{source:"binary",sizeBytes:oO4($)}}if(typeof Buffer<"u"&&Buffer.isBuffer($))return{source:"binary",sizeBytes:$.length};if($ instanceof Uint8Array)return{source:"binary",sizeBytes:$.byteLength};if($ instanceof ArrayBuffer)return{source:"binary",sizeBytes:$.byteLength};if(ArrayBuffer.isView($))return{source:"binary",sizeBytes:$.byteLength};return{source:"binary"}}function rL9($){return($.split("#",1)[0]?.split("?",1)[0]??$).match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()}function bd0($){return typeof $==="string"&&wL9.has(rL9($)??"")}function RC($){if(Z4($,"type")!=="file")return!1;let Y=Z4($,"mimeType");if(typeof Y==="string"&&Y.toLowerCase().startsWith("image/"))return!0;let X=Z4($,"data");if(typeof X==="string"&&X.startsWith("data:image/"))return!0;if(X instanceof URL&&bd0(X.pathname))return!0;if(ep(X))try{let G=new URL(X);if(bd0(G.pathname))return!0}catch{}return bd0(Z4($,"filename"))}function ap($){return $?.provider?.toLowerCase()}function yE4($){return $?.modelId?.toLowerCase()??""}function aL9($){let Y=yE4($);if(Y.startsWith("gpt-5")||Y==="gpt-5-chat-latest")return{baseTokens:70,tileTokens:140,fallbackTiles:4};if(Y.startsWith("gpt-4o-mini"))return{baseTokens:2833,tileTokens:5667,fallbackTiles:1};if(Y.startsWith("o1")||Y.startsWith("o3"))return{baseTokens:75,tileTokens:150,fallbackTiles:4};if(Y.includes("computer-use"))return{baseTokens:65,tileTokens:129,fallbackTiles:4};return jL9}function bE4($){return ap($)==="google"&&yE4($).startsWith("gemini-3")}function sL9($,Y){let X=$,G=Y,J=Math.max(X,G);if(J>2048){let W=2048/J;X*=W,G*=W}let Q=Math.min(X,G);if(Q>768){let W=768/Q;X*=W,G*=W}return{width:Math.max(1,Math.round(X)),height:Math.max(1,Math.round(G))}}function oL9($,Y){let X=Math.max($,Y);if(X<=nO4)return{width:$,height:Y};let G=nO4/X;return{width:Math.max(1,Math.round($*G)),height:Math.max(1,Math.round(Y*G))}}function tL9($,Y,X){if($.width&&$.height){let G=sL9($.width,$.height);return Math.max(1,Math.ceil(G.width/512)*Math.ceil(G.height/512))}if(Y.sizeBytes!==void 0){if(Y.sizeBytes<=524288)return 1;if(Y.sizeBytes<=2097152)return 4;if(Y.sizeBytes<=4194304)return 6;return 8}return X.fallbackTiles}function eL9($,Y,X){if($==="low"||$==="high")return $;if(Y.width&&Y.height)return Math.max(Y.width,Y.height)>768?"high":"low";if(X.sizeBytes!==void 0)return X.sizeBytes>1048576?"high":"low";return"low"}function $B9($){if(!$.width||!$.height)return 1;return Math.max(1,Math.ceil($.width/768)*Math.ceil($.height/768))}function YB9($,Y){if($.width&&$.height){let X=oL9($.width,$.height);return Math.max(1,Math.ceil(X.width*X.height*SL9))}if(Y.sizeBytes!==void 0){if(Y.sizeBytes<=524288)return 341;if(Y.sizeBytes<=2097152)return 1366;if(Y.sizeBytes<=4194304)return 2048;return 2731}return 1600}function XB9($,Y,X){let G=(Y??"").toLowerCase().split(";",1)[0].trim(),J=G==="application/pdf",Q=G.startsWith("text/")||["application/json","application/xml","application/x-yaml","application/yaml"].includes(G);if(J){if($==="google")return Math.max(258,Math.ceil(X/20));if($==="anthropic")return Math.max(1500,Math.ceil(X/3));return Math.max(500,Math.ceil(X/4))}if(Q)return Math.max(1,Math.ceil(X/4));return Math.max(1,Math.ceil(X/4))}function GB9($,Y){let X=sd0(Z4(Y,"data"));if(X.sizeBytes===void 0)return;let G=ap($),J=$?.modelId??null,Q=fM(Y,"application/octet-stream"),W=VX0(Y)??null;return{tokens:XB9(G,Q,X.sizeBytes),cachePayload:JSON.stringify({kind:"non-image-file",provider:G??"fallback",modelId:J,estimator:"bytes",source:X.source,sizeBytes:X.sizeBytes,mimeType:Q,filename:W})}}function JB9($,Y,X){if(bE4($)){let G=vE4(Y);return{tokens:CL9[G],mediaResolution:G}}return{tokens:$B9(X)*TL9,mediaResolution:"unspecified"}}function Ac0($){for(let Y of vL9[$]??[]){let X=process.env[Y];if(typeof X==="string"&&X.trim().length>0)return X.trim()}return}function VX0($){let Y=Z4($,"filename");if(typeof Y==="string"&&Y.trim().length>0)return Y.trim();return kE4(Z4($,"data")??Z4($,"image"))}function fM($,Y){let X=Z4($,"mimeType");if(typeof X==="string"&&X.trim().length>0)return X.trim();let G=Z4($,"data")??Z4($,"image");if(typeof G==="string"&&G.startsWith("data:")){let J=G.indexOf(";"),Q=G.indexOf(","),W=J===-1?Q:Math.min(J,Q);if(W>5)return G.slice(5,W)}return Y}function sp($){if($ instanceof URL)return $.toString();if(typeof $==="string"&&/^(https?:\/\/|data:)/i.test($))return $;return}function QB9($){let Y=sp($);if(Y)return{url:Y};let X=IC($);if(X)return{contentHash:GE4("sha1").update(X).digest("hex")};return{}}function IC($){if(typeof $==="string"){if($.startsWith("data:")){let Y=$.indexOf(",");return Y===-1?void 0:$.slice(Y+1)}if(/^https?:\/\//i.test($))return;return $}if(typeof Buffer<"u"&&Buffer.isBuffer($))return $.toString("base64");if($ instanceof Uint8Array)return Buffer.from($).toString("base64");if($ instanceof ArrayBuffer)return Buffer.from($).toString("base64");if(ArrayBuffer.isView($))return Buffer.from($.buffer,$.byteOffset,$.byteLength).toString("base64");return}function Fc0($){let Y=new AbortController,X=setTimeout(()=>Y.abort(Error(`Attachment token counting timed out after ${$}ms`)),$),G=()=>clearTimeout(X);return Y.signal.addEventListener("abort",G,{once:!0}),{signal:Y.signal,cleanup:G}}function Dc0($,Y){for(let X of Y){let G=$;for(let J of X)if(G=Z4(G,J),G===void 0)break;if(typeof G==="number"&&Number.isFinite(G))return G}return}function WB9($){if(Z4($,"type")==="image"||RC($)){let Y=Z4($,"image")??Z4($,"data"),X=sp(Y);if(X)return{type:"input_image",image_url:X,detail:zX0($)};let G=IC(Y);if(!G)return;return{type:"input_image",image_url:`data:${fM($,"image/png")};base64,${G}`,detail:zX0($)}}if(Z4($,"type")==="file"){let Y=Z4($,"data"),X=sp(Y);return X?{type:"input_file",file_url:X,filename:VX0($)??"attachment"}:(()=>{let G=IC(Y);if(!G)return;return{type:"input_file",file_data:`data:${fM($,"application/octet-stream")};base64,${G}`,filename:VX0($)??"attachment"}})()}return}function ZB9($){let Y=Z4($,"image")??Z4($,"data"),X=sp(Y);if(Z4($,"type")==="image"||RC($))return X&&/^https?:\/\//i.test(X)?{type:"image",source:{type:"url",url:X}}:(()=>{let G=IC(Y);if(!G)return;return{type:"image",source:{type:"base64",media_type:fM($,"image/png"),data:G}}})();if(Z4($,"type")==="file")return X&&/^https?:\/\//i.test(X)?{type:"document",source:{type:"url",url:X}}:(()=>{let G=IC(Y);if(!G)return;return{type:"document",source:{type:"base64",media_type:fM($,"application/pdf"),data:G}}})();return}function KB9($){let Y=Z4($,"image")??Z4($,"data"),X=sp(Y),G=fM($,Z4($,"type")==="file"&&!RC($)?"application/pdf":"image/png");if(X&&!X.startsWith("data:"))return{fileData:{mimeType:G,fileUri:X}};let J=IC(Y);if(!J)return;return{inlineData:{mimeType:G,data:J}}}async function UB9($,Y){let X=Ac0("openai"),G=WB9(Y);if(!X||!G)return;let{signal:J,cleanup:Q}=Fc0(Vc0);try{let W=await fetch("https://api.openai.com/v1/responses/input_tokens",{method:"POST",headers:{Authorization:`Bearer ${X}`,"Content-Type":"application/json"},body:JSON.stringify({model:$,input:[{type:"message",role:"user",content:[G]}]}),signal:J});if(!W.ok)return;let Z=await W.json();return Dc0(Z,[["input_tokens"],["total_tokens"],["usage","input_tokens"],["usage","total_tokens"]])}finally{Q()}}async function HB9($,Y){let X=Ac0("anthropic"),G=ZB9(Y);if(!X||!G)return;let{signal:J,cleanup:Q}=Fc0(Vc0);try{let W=await fetch("https://api.anthropic.com/v1/messages/count_tokens",{method:"POST",headers:{"x-api-key":X,"anthropic-version":"2023-06-01","Content-Type":"application/json"},body:JSON.stringify({model:$,messages:[{role:"user",content:[G]}]}),signal:J});if(!W.ok)return;let Z=await W.json();return Dc0(Z,[["input_tokens"]])}finally{Q()}}async function zB9($,Y){let X=Ac0("google"),G=KB9(Y);if(!X||!G)return;let{signal:J,cleanup:Q}=Fc0(Vc0);try{let W=await fetch(`https://generativelanguage.googleapis.com/v1beta/models/${$}:countTokens`,{method:"POST",headers:{"x-goog-api-key":X,"Content-Type":"application/json"},body:JSON.stringify({contents:[{role:"user",parts:[G]}]}),signal:J});if(!W.ok)return;let Z=await W.json();return Dc0(Z,[["totalTokens"],["total_tokens"]])}finally{Q()}}function tO4($){for(let Y=$.length-1;Y>=0;Y--)if($[Y]?.type==="step-start")return $.slice(Y+1);return $}function eO4($){let Y=$.content;if(Y?.parts&&Array.isArray(Y.parts))return Y.parts.some((X)=>{let G=X?.type;return G&&!G.startsWith("data-")&&G!=="step-start"});if(Y?.content)return!0;return!1}function Nc0($){let Y=$.find(eO4)??$[0],X=[...$].reverse().find(eO4)??$[$.length-1];return`${Y.id}:${X.id}`}function od0($){if(!$)return;for(let Y=$.length-1;Y>=0;Y--){let X=$[Y];if(!X||X.role!=="assistant")continue;if(!X.content||typeof X.content==="string")return X.createdAt?new Date(X.createdAt).getTime():void 0;for(let G=X.content.parts.length-1;G>=0;G--){let J=X.content.parts[G];if(!J||J.type?.startsWith("data-"))continue;if(J.createdAt!==void 0)return J.createdAt}return X.createdAt?new Date(X.createdAt).getTime():void 0}return}function hE4($,Y){if($&&Y)return`${$}/${Y}`;return Y}function VB9($){if(!$)return;for(let Y=$.length-1;Y>=0;Y--){let X=$[Y];if(!X||X.role!=="assistant"||!X.content||typeof X.content==="string")continue;for(let Q=X.content.parts.length-1;Q>=0;Q--){let W=X.content.parts[Q];if(W?.type==="step-start"&&typeof W.model==="string"&&W.model.length>0)return W.model}let G=X.content.metadata,J=hE4(G?.provider,G?.modelId);if(J)return J}return}function AB9($){return hE4($?.provider,$?.modelId)}function $E4($,Y){if($===void 0||$===!1)return;if(typeof $==="number"){if(!Number.isFinite($)||$<0)throw Error(`${Y} must be a non-negative number of milliseconds or a duration string like "5m".`);return $}let G=$.trim().match(/^(\d+(?:\.\d+)?)\s*(ms|msec|msecs|millisecond|milliseconds|s|sec|secs|second|seconds|m|min|mins|minute|minutes|h|hr|hrs|hour|hours)$/i);if(!G)throw Error(`${Y} must be a non-negative number of milliseconds or a duration string like "5m" or "1hr".`);let J=G[1],Q=G[2],W=Number(J),Z=Q.toLowerCase();if(!Number.isFinite(W)||W<0)throw Error(`${Y} must be a non-negative number of milliseconds or a duration string like "5m".`);return W*(Z==="ms"||Z==="msec"||Z==="msecs"||Z==="millisecond"||Z==="milliseconds"?1:Z==="s"||Z==="sec"||Z==="secs"||Z==="second"||Z==="seconds"?1000:Z==="m"||Z==="min"||Z==="mins"||Z==="minute"||Z==="minutes"?60000:3600000)}function Lc0($,Y){return`${$} \u2014 ${WE4(new Date(Y))}`}function gE4($,Y,X,G){let J=WE4(new Date(G));return{reminderType:FX0,gapText:Y,gapMs:X,timestamp:J,timestampMs:G,precedesMessageId:$.id,systemReminder:{type:FX0,message:Lc0(Y,G),gapText:Y,gapMs:X,timestamp:J,timestampMs:G,precedesMessageId:$.id}}}function FB9($,Y){if(!QX0($))return!1;let X=$.content.metadata;if(X?.precedesMessageId===Y)return!0;return X?.systemReminder?.type===FX0&&X.systemReminder.precedesMessageId===Y}function DB9($,Y,X,G){let J=gE4($,Y,X,G);return{id:`__temporal_gap_${crypto.randomUUID()}`,role:"user",createdAt:new Date(G-1),threadId:$.threadId,resourceId:$.resourceId,content:{format:2,parts:[{type:"text",text:`<system-reminder type="${FX0}" precedesMessageId="${$.id}">${Lc0(Y,G)}</system-reminder>`}],metadata:J}}}async function NB9({messageList:$,writer:Y}){let G=$.get.input.db().filter((A)=>Boolean(A)).at(-1);if(!G||QX0(G))return;let J=$.get.all.db().filter((A)=>Boolean(A)),Q=J.findIndex((A)=>A.id===G.id);if(Q<=0)return;if(J.some((A)=>FB9(A,G.id)))return;let W;for(let A=Q-1;A>=0;A--){let F=J[A];if(F&&!QX0(F)){W=F;break}}if(!W)return;let Z=fO4(G,"first"),K=Z-fO4(W,"last"),H=JN9(K);if(!H)return;let z=gE4(G,H,K,Z);await Y?.custom({type:"data-system-reminder",data:{message:Lc0(H,Z),...z},transient:!0});let V=DB9(G,H,K,Z);$.add(V,"input")}function hd0($){if(!$.tracing||!$.tracingContext||!$.loggerVNext||!$.metrics)return;return{tracing:$.tracing,tracingContext:$.tracingContext,loggerVNext:$.loggerVNext,metrics:$.metrics}}function LB9($){return typeof $==="object"&&$!==null&&"gatewayId"in $&&$.gatewayId==="mastra"}function XE4({messageList:$,systemMessages:Y,continuationMessage:X,threadId:G,resourceId:J}){if(!Y?.length)return;$.clearSystemMessages("observational-memory");for(let W of Y)$.addSystem(W,"observational-memory");let Q=X??{id:"om-continuation",role:"user",createdAt:new Date(0),content:{format:2,parts:[{type:"text",text:`<system-reminder>${eT}</system-reminder>`}]},threadId:G,resourceId:J};$.add(Q,"memory")}function Bc0($,Y){let X=$.trim();if(!X)return"";let G=X.split(BB9),J=[],Q=G[0]?.trim();if(Q)J.push(Q);for(let W=1;W<G.length;W+=2){let Z=G[W],K=G[W+1]?.trim();if(!K)continue;let H=new Date(Z);if(isNaN(H.getTime()))continue;if(H<=Y)J.push(K)}return J.join(`

`)}var fd0,EC,$5,GN9=600000,bM=class{thresholds;constructor($){this.thresholds=HN9($)}resolve($){for(let{limit:X,model:G}of this.thresholds)if($<=X)return G;let Y=this.thresholds[this.thresholds.length-1].limit;throw Error(`ModelByInputTokens: input token count (${$}) exceeds the largest configured threshold (${Y}). Please configure a higher threshold or use a larger model.`)}getThresholds(){return this.thresholds.map(($)=>$.limit)}},Xc0,zN9,gO4,EN9,hM=class ${constructor(Y,X){this.deps=Y,this.opts=X,this.storage=Y.storage,this.messageHistory=Y.messageHistory,this.tokenCounter=Y.tokenCounter,this.observationConfig=Y.observationConfig,this.reflectionConfig=Y.reflectionConfig,this.scope=Y.scope,this.retrieval=Y.retrieval}deps;opts;storage;messageHistory;tokenCounter;observationConfig;reflectionConfig;scope;retrieval;static create;async run(){let{record:Y,threadId:X,abortSignal:G,writer:J,reflectionHooks:Q,requestContext:W}=this.opts,Z=this.generateCycleId();try{if(this.needsLock){let A=await this.storage.getObservationalMemory(Y.threadId,Y.resourceId);if(A?.lastObservedAt&&Y.lastObservedAt&&A.lastObservedAt>Y.lastObservedAt)return{observed:!1}}let{messages:K,existingObservations:H}=await this.prepare();await this.emitStartMarkers(Z);let z=await this.observe(H,K),V=await this.process(z,H);if(await this.persist(V),await this.emitEndMarkers(Z,V),this.needsReflection)await this.deps.reflector.maybeReflect({record:{...Y,activeObservations:V.observations},observationTokens:V.observationTokens,threadId:X,writer:J,abortSignal:G,reflectionHooks:Q,requestContext:W,observabilityContext:this.opts.observabilityContext});return{observed:!0,usage:z.usage}}catch(K){if(await this.emitFailedMarkers(Z,K),!this.rethrowOnFailure){let H={type:"data-om-observation-failed",data:{cycleId:Z,operationType:"observation",startedAt:new Date().toISOString(),error:K instanceof Error?K.message:String(K),recordId:Y.id,threadId:X}};if(await this.persistMarkerToStorage(H,X,this.opts.resourceId).catch(()=>{}),G?.aborted)throw K;return lW("[OM] Observation failed",K),{observed:!1}}throw lW("[OM] Observation failed",K),K}}generateCycleId(){return crypto.randomUUID()}async streamMarker(Y){if(this.opts.writer)await this.opts.writer.custom({...Y,transient:!0}).catch(()=>{});let X=Y.data?.threadId??this.opts.threadId;await this.persistMarkerToStorage(Y,X,this.opts.resourceId)}getObservationMarkerConfig(){return{messageTokens:a$(this.observationConfig.messageTokens),observationTokens:a$(this.reflectionConfig.observationTokens),scope:this.scope}}getMaxMessageTimestamp(Y){let X=0;for(let G of Y)if(G.createdAt){let J=new Date(G.createdAt).getTime();if(J>X)X=J}return X>0?new Date(X):new Date}async wrapWithThreadTag(Y,X,G){let J=HE4(X),Q=this.retrieval&&G?TV(J,G):J,W=Y;if(this.deps.obscureThreadIds)W=(await EN9).h32ToString(Y);return`<thread id="${W}">
${Q}
</thread>`}static createMessageBoundary(Y){return`

--- message boundary (${Y.toISOString()}) ---

`}wrapObservations(Y,X,G,J,Q){if(this.scope==="resource")return(async()=>{let K=await this.wrapWithThreadTag(G,Y,Q);return this.replaceOrAppendThreadSection(X,G,K,J)})();let W=this.retrieval&&Q?TV(Y,Q):Y;if(!X)return W;let Z=J?$.createMessageBoundary(J):`

`;return`${X}${Z}${W}`}replaceOrAppendThreadSection(Y,X,G,J){if(!Y)return G;let Q=G.match(/<thread id="([^"]+)">/),W=G.match(/Date:\s*([A-Za-z]+\s+\d+,\s+\d+)/);if(!Q||!W){let L=J?$.createMessageBoundary(J):`

`;return`${Y}${L}${G}`}let Z=Q[1],K=W[1],H=`<thread id="${Z}">`,z="</thread>",V=Y.indexOf(H),A=null,F=-1,N=-1;if(V!==-1){let L=Y.indexOf(z,V);if(L!==-1){N=L+z.length,F=V;let B=Y.slice(V,N);if(B.includes(`Date: ${K}`)||B.includes(`Date:${K}`))A=B}}if(A){let L=G.indexOf(`
`,G.indexOf("Date:")),B=G.lastIndexOf(z);if(L!==-1&&B!==-1){let O=G.slice(L+1,B).trim();if(O){let M=`${A.slice(0,A.length-z.length).trimEnd()}
${O}
${z}`;return Y.slice(0,F)+M+Y.slice(N)}}}let D=J?$.createMessageBoundary(J):`

`;return`${Y}${D}${G}`}async indexObservationGroups(Y,X,G,J){if(!G||!this.deps.onIndexObservations)return;let Q=op(Y);if(Q.length===0)return;await Promise.all(Q.map((W)=>this.deps.onIndexObservations({text:W.content,groupId:W.id,range:W.range,threadId:X,resourceId:G,observedAt:J})))}async persistMarkerToStorage(Y,X,G){try{let Q=(await this.storage.listMessages({threadId:X,perPage:20,orderBy:{field:"createdAt",direction:"DESC"}}))?.messages??[];for(let W of Q)if(W?.role==="assistant"&&W.content?.parts&&Array.isArray(W.content.parts)){let Z=Y.data;if(!(Z?.cycleId&&W.content.parts.some((H)=>H?.type===Y.type&&H?.data?.cycleId===Z.cycleId)))W.content.parts.push(Y);await this.messageHistory.persistMessages({messages:[W],threadId:X,resourceId:G});return}}catch(J){S4(`[OM:persistMarkerToStorage] failed to save marker to DB: ${J}`)}}async persistMarkerToMessage(Y,X,G,J){if(!X)return;let Q=X.get.all.db();for(let W=Q.length-1;W>=0;W--){let Z=Q[W];if(Z?.role==="assistant"&&Z.content?.parts&&Array.isArray(Z.content.parts)){let K=Y.data;if(!(K?.cycleId&&Z.content.parts.some((z)=>z?.type===Y.type&&z?.data?.cycleId===K.cycleId)))Z.content.parts.push(Y);try{await this.messageHistory.persistMessages({messages:[Z],threadId:G,resourceId:J})}catch(z){S4(`[OM:persistMarker] failed to save marker to DB: ${z}`)}return}}}},MN9,RN9,qN9,IN9=class{constructor($,Y){this.turn=$,this.stepNumber=Y}turn;stepNumber;_prepared=!1;_context;get prepared(){return this._prepared}get context(){if(!this._context)throw Error("Step not prepared yet \u2014 call prepare() first");return this._context}async prepare(){if(this._prepared)throw Error(`Step ${this.stepNumber} already prepared`);let{threadId:$,resourceId:Y,messageList:X}=this.turn,G=this.turn.om,J=!1,Q=!1,W=!1,Z=!1,K=!1,H;if(this.stepNumber===0){let O=X.get.all.db(),E=await G.activate({threadId:$,resourceId:Y,checkThreshold:!0,messages:O,currentModel:this.turn.actorModelContext,writer:this.turn.writer,messageList:X});if(E.activated){if(J=!0,E.activatedMessageIds?.length)X.removeByIds(E.activatedMessageIds);await G.resetBufferingState({threadId:$,resourceId:Y,recordId:E.record.id}),await this.turn.refreshRecord()}let M=this.turn.record,R=M.generationCount,q=M.observationTokenCount??0;if(await G.reflector.maybeReflect({record:M,observationTokens:q,threadId:$,writer:this.turn.writer,messageList:X,currentModel:this.turn.actorModelContext,requestContext:this.turn.requestContext,observabilityContext:this.turn.observabilityContext,lastActivityAt:od0(X.get.all.db())}),await this.turn.refreshRecord(),this.turn.record.generationCount>R)Z=!0}let z=X.get.all.db(),V=z[z.length-1],A=[...X.get.input.db(),...X.get.response.db()],F=[...tO4(V?.content?.parts??[]),...A.flatMap((O)=>tO4(O.content?.parts??[]))],N=F.some((O)=>O?.type==="tool-invocation"&&O.toolInvocation?.state==="call");S4(`[OM:deferred-check] hasIncompleteToolCalls=${N}, latestStepPartsCount=${F.length}`);let D=await G.getStatus({threadId:$,resourceId:Y,messages:X.get.all.db()});if(D.shouldBuffer&&!N){let O=X.get.all.db(),E=G.getUnobservedMessages(O,D.record),M=G.getUnobservedMessages(E,D.record,{excludeBuffered:!0});if(M.length>0){G.sealMessagesForBuffering(M);try{await this.turn.hooks?.onBufferChunkSealed?.()}catch(R){S4(`[OM:buffer] onBufferChunkSealed hook failed: ${R instanceof Error?R.message:String(R)}`)}if(this.turn.memory)await this.turn.memory.persistMessages(M);X.removeByIds(M.map((R)=>R.id));for(let R of M)X.add(R,"memory")}G.buffer({threadId:$,resourceId:Y,messages:E,pendingTokens:D.pendingTokens,record:D.record,writer:this.turn.writer,requestContext:this.turn.requestContext,observabilityContext:this.turn.observabilityContext}).catch((R)=>{S4(`[OM:buffer] fire-and-forget buffer failed: ${R?.message}`)}),W=!0}if(this.stepNumber>0){let O=X.clear.input.db(),E=X.clear.response.db(),M=[...O,...E];if(M.length>0){await G.persistMessages(M,$,Y);for(let R of M)X.add(R,"memory")}if(D.shouldObserve&&!N){let R=this.turn.record.generationCount,q=await this.runThresholdObservation();if(H=q.observerExchange,q.succeeded){Q=!0,K=!0;let w=q.activatedMessageIds??q.record.observedMessageIds??[],I=VE4(G.getObservationConfig().bufferActivation??1,D.threshold);if(await G.cleanupMessages({threadId:$,resourceId:Y,messages:X,observedMessageIds:w,retentionFloor:I}),D.asyncObservationEnabled)await G.resetBufferingState({threadId:$,resourceId:Y,recordId:q.record.id,activatedMessageIds:q.activatedMessageIds});if(await this.turn.refreshRecord(),this.turn.record.generationCount>R)Z=!0}}D=await G.getStatus({threadId:$,resourceId:Y,messages:X.get.all.db()})}let L=await this.turn.refreshOtherThreadsContext(),B=await G.buildContextSystemMessages({threadId:$,resourceId:Y,record:this.turn.record,unobservedContextBlocks:L});if(!K){let O=this.turn.record.threadId?uE((await G.getStorage().getThreadById({threadId:this.turn.record.threadId}))?.metadata)?.lastObservedMessageCursor:void 0;WN9({messageList:X,record:this.turn.record,useMarkerBoundaryPruning:this.stepNumber===0,fallbackCursor:O})}return this._context={systemMessage:B,observerExchange:H,activated:J,observed:Q,buffered:W,reflected:Z,status:{pendingTokens:D.pendingTokens,threshold:D.threshold,effectiveObservationTokensThreshold:D.effectiveObservationTokensThreshold,shouldObserve:D.shouldObserve,shouldBuffer:D.shouldBuffer,shouldReflect:D.shouldReflect,canActivate:D.canActivate}},this._prepared=!0,this._context}async runThresholdObservation(){let{threadId:$,resourceId:Y,messageList:X}=this.turn,G=this.turn.om;await G.waitForBuffering($,Y);let J=await G.getStatus({threadId:$,resourceId:Y,messages:X.get.all.db()});if(!J.shouldObserve)return{succeeded:!1,record:J.record};if(J.canActivate){let W=await G.activate({threadId:$,resourceId:Y,messages:X.get.all.db(),currentModel:this.turn.actorModelContext,writer:this.turn.writer,messageList:X});if(W.activated){let Z=W.record;return await G.reflector.maybeReflect({record:Z,observationTokens:Z.observationTokenCount??0,threadId:$,writer:this.turn.writer,messageList:X,currentModel:this.turn.actorModelContext,requestContext:this.turn.requestContext,observabilityContext:this.turn.observabilityContext,lastActivityAt:od0(X.get.all.db())}),{succeeded:!0,record:W.record,activatedMessageIds:W.activatedMessageIds}}}let Q=await G.observe({threadId:$,resourceId:Y,messages:X.get.all.db(),requestContext:this.turn.requestContext,writer:this.turn.writer,observabilityContext:this.turn.observabilityContext});if(Q.observed){let W=new Set(Q.record.observedMessageIds??[]),Z=X.get.all.db(),K=-1;for(let V=Z.length-1;V>=0;V--){let A=Z[V];if(A&&W.has(A.id)){K=V;break}}let H=K>=0?Z[K]:void 0,z=H?[H]:[];G.sealMessagesForBuffering(z);try{await this.turn.hooks?.onSyncObservationComplete?.()}catch(V){S4(`[OM:observe] onSyncObservationComplete hook failed: ${V instanceof Error?V.message:String(V)}`)}if(z.length>0)await G.persistMessages(z,$,Y)}return{succeeded:Q.observed,record:Q.record,observerExchange:G.observer.lastExchange}}},PN9=class{_record;_context;_currentStep;_started=!1;_ended=!1;_generationCountAtStart=-1;memory;writer;requestContext;observabilityContext;actorModelContext;hooks;constructor($){this.om=$.om,this.threadId=$.threadId,this.resourceId=$.resourceId,this.messageList=$.messageList,this.observabilityContext=$.observabilityContext,this.hooks=$.hooks??{}}om;threadId;resourceId;messageList;get record(){if(!this._record)throw Error("Turn not started \u2014 call start() first");return this._record}get context(){if(!this._context)throw Error("Turn not started \u2014 call start() first");return this._context}get currentStep(){return this._currentStep}addHooks($){if(!$)return;Object.assign(this.hooks,$)}async start($){if(this._started)throw Error("Turn already started");if(this._started=!0,this._record=await this.om.getOrCreateRecord(this.threadId,this.resourceId),this._generationCountAtStart=this._record.generationCount,this.memory=$,$){let Y=await AE4({memory:$,messageList:this.messageList,threadId:this.threadId,resourceId:this.resourceId});this._context={messages:Y.messages,systemMessage:Y.systemMessage,continuation:Y.continuationMessage,otherThreadsContext:Y.otherThreadsContext,record:this._record}}else this._context={messages:[],systemMessage:void 0,continuation:void 0,otherThreadsContext:void 0,record:this._record};return this._context}step($){if(!this._started)throw Error("Turn not started \u2014 call start() first");if(this._ended)throw Error("Turn already ended");return this._currentStep=new IN9(this,$),this._currentStep}async end(){if(this._ended)throw Error("Turn already ended");this._ended=!0;let $=this.messageList.get.input.db(),Y=this.messageList.get.response.db(),X=[...$,...Y];if(X.length>0)await this.om.persistMessages(X,this.threadId,this.resourceId);return{record:this._record}}async refreshRecord(){this._record=await this.om.getOrCreateRecord(this.threadId,this.resourceId)}async refreshOtherThreadsContext(){if(this.om.scope==="resource"&&this.resourceId){let $=await this.om.getOtherThreadsContext(this.resourceId,this.threadId);if(this._context)this._context.otherThreadsContext=$;return $}return this._context?.otherThreadsContext}},wN9,_N9,jN9,TN9,CN9,xN9="encryptedContent",yN9=256,DE4=1e4,ud0=`CRITICAL: DISTINGUISH USER ASSERTIONS FROM QUESTIONS

When the user TELLS you something about themselves, mark it as an assertion:
- "I have two kids" \u2192 \uD83D\uDD34 (14:30) User stated has two kids
- "I work at Acme Corp" \u2192 \uD83D\uDD34 (14:31) User stated works at Acme Corp
- "I graduated in 2019" \u2192 \uD83D\uDD34 (14:32) User stated graduated in 2019

When the user ASKS about something, mark it as a question/request:
- "Can you help me with X?" \u2192 \uD83D\uDD34 (15:00) User asked help with X
- "What's the best way to do Y?" \u2192 \uD83D\uDD34 (15:01) User asked best way to do Y

Distinguish between QUESTIONS and STATEMENTS OF INTENT:
- "Can you recommend..." \u2192 Question (extract as "User asked...")
- "I'm looking forward to [doing X]" \u2192 Statement of intent (extract as "User stated they will [do X] (include estimated/actual date if mentioned)")
- "I need to [do X]" \u2192 Statement of intent (extract as "User stated they need to [do X] (again, add date if mentioned)")

STATE CHANGES AND UPDATES:
When a user indicates they are changing something, frame it as a state change that supersedes previous information:
- "I'm going to start doing X instead of Y" \u2192 "User will start doing X (changing from Y)"
- "I'm switching from A to B" \u2192 "User is switching from A to B"
- "I moved my stuff to the new place" \u2192 "User moved their stuff to the new place (no longer at previous location)"

If the new state contradicts or updates previous information, make that explicit:
- BAD: "User plans to use the new method"
- GOOD: "User will use the new method (replacing the old approach)"

This helps distinguish current state from outdated information.

USER ASSERTIONS ARE AUTHORITATIVE. The user is the source of truth about their own life.
If a user previously stated something and later asks a question about the same topic,
the assertion is the answer - the question doesn't invalidate what they already told you.

TEMPORAL ANCHORING:
Each observation has TWO potential timestamps:

1. BEGINNING: The time the statement was made (from the message timestamp) - ALWAYS include this
2. END: The time being REFERENCED, if different from when it was said - ONLY when there's a relative time reference

ONLY add "(meaning DATE)" or "(estimated DATE)" at the END when you can provide an ACTUAL DATE:
- Past: "last week", "yesterday", "a few days ago", "last month", "in March"
- Future: "this weekend", "tomorrow", "next week"

DO NOT add end dates for:
- Present-moment statements with no time reference
- Vague references like "recently", "a while ago", "lately", "soon" - these cannot be converted to actual dates

FORMAT:
- With time reference: (TIME) [observation]. (meaning/estimated DATE)
- Without time reference: (TIME) [observation].

GOOD: (09:15) User's friend had a birthday party in March. (meaning March 20XX)
      ^ References a past event - add the referenced date at the end

GOOD: (09:15) User will visit their parents this weekend. (meaning June 17-18, 20XX)
      ^ References a future event - add the referenced date at the end

GOOD: (09:15) User prefers hiking in the mountains.
      ^ Present-moment preference, no time reference - NO end date needed

GOOD: (09:15) User is considering adopting a dog.
      ^ Present-moment thought, no time reference - NO end date needed

BAD: (09:15) User prefers hiking in the mountains. (meaning June 15, 20XX - today)
     ^ No time reference in the statement - don't repeat the message timestamp at the end

IMPORTANT: If an observation contains MULTIPLE events, split them into SEPARATE observation lines.
EACH split observation MUST have its own date at the end - even if they share the same time context.

Examples (assume message is from June 15, 20XX):

BAD: User will visit their parents this weekend (meaning June 17-18, 20XX) and go to the dentist tomorrow.
GOOD (split into two observations, each with its date):
  User will visit their parents this weekend. (meaning June 17-18, 20XX)
  User will go to the dentist tomorrow. (meaning June 16, 20XX)

BAD: User needs to clean the garage this weekend and is looking forward to setting up a new workbench.
GOOD (split, BOTH get the same date since they're related):
  User needs to clean the garage this weekend. (meaning June 17-18, 20XX)
  User will set up a new workbench this weekend. (meaning June 17-18, 20XX)

BAD: User was given a gift by their friend (estimated late May 20XX) last month.
GOOD: (09:15) User was given a gift by their friend last month. (estimated late May 20XX)
      ^ Message time at START, relative date reference at END - never in the middle

BAD: User started a new job recently and will move to a new apartment next week.
GOOD (split):
  User started a new job recently.
  User will move to a new apartment next week. (meaning June 21-27, 20XX)
  ^ "recently" is too vague for a date - omit the end date. "next week" can be calculated.

ALWAYS put the date at the END in parentheses - this is critical for temporal reasoning.
When splitting related events that share the same time context, EACH observation must have the date.

PRESERVE UNUSUAL PHRASING:
When the user uses unexpected or non-standard terminology, quote their exact words.

BAD: User exercised.
GOOD: User stated they did a "movement session" (their term for exercise).

USE PRECISE ACTION VERBS:
Replace vague verbs like "getting", "got", "have" with specific action verbs that clarify the nature of the action.
If the assistant confirms or clarifies the user's action, use the assistant's more precise language.

BAD: User is getting X.
GOOD: User subscribed to X. (if context confirms recurring delivery)
GOOD: User purchased X. (if context confirms one-time acquisition)

BAD: User got something.
GOOD: User purchased / received / was given something. (be specific)

Common clarifications:
- "getting" something regularly \u2192 "subscribed to" or "enrolled in"
- "getting" something once \u2192 "purchased" or "acquired"
- "got" \u2192 "purchased", "received as gift", "was given", "picked up"
- "signed up" \u2192 "enrolled in", "registered for", "subscribed to"
- "stopped getting" \u2192 "canceled", "unsubscribed from", "discontinued"

When the assistant interprets or confirms the user's vague language, prefer the assistant's precise terminology.

PRESERVING DETAILS IN ASSISTANT-GENERATED CONTENT:

When the assistant provides lists, recommendations, or creative content that the user explicitly requested,
preserve the DISTINGUISHING DETAILS that make each item unique and queryable later.

1. RECOMMENDATION LISTS - Preserve the key attribute that distinguishes each item:
   BAD: Assistant recommended 5 hotels in the city.
   GOOD: Assistant recommended hotels: Hotel A (near the train station), Hotel B (budget-friendly), 
         Hotel C (has rooftop pool), Hotel D (pet-friendly), Hotel E (historic building).
   
   BAD: Assistant listed 3 online stores for craft supplies.
   GOOD: Assistant listed craft stores: Store A (based in Germany, ships worldwide), 
         Store B (specializes in vintage fabrics), Store C (offers bulk discounts).

2. NAMES, HANDLES, AND IDENTIFIERS - Always preserve specific identifiers:
   BAD: Assistant provided social media accounts for several photographers.
   GOOD: Assistant provided photographer accounts: @photographer_one (portraits), 
         @photographer_two (landscapes), @photographer_three (nature).
   
   BAD: Assistant listed some authors to check out.
   GOOD: Assistant recommended authors: Jane Smith (mystery novels), 
         Bob Johnson (science fiction), Maria Garcia (historical romance).

3. CREATIVE CONTENT - Preserve structure and key sequences:
   BAD: Assistant wrote a poem with multiple verses.
   GOOD: Assistant wrote a 3-verse poem. Verse 1 theme: loss. Verse 2 theme: hope. 
         Verse 3 theme: renewal. Refrain: "The light returns."
   
   BAD: User shared their lucky numbers from a fortune cookie.
   GOOD: User's fortune cookie lucky numbers: 7, 14, 23, 38, 42, 49.

4. TECHNICAL/NUMERICAL RESULTS - Preserve specific values:
   BAD: Assistant explained the performance improvements from the optimization.
   GOOD: Assistant explained the optimization achieved 43.7% faster load times 
         and reduced memory usage from 2.8GB to 940MB.
   
   BAD: Assistant provided statistics about the dataset.
   GOOD: Assistant provided dataset stats: 7,342 samples, 89.6% accuracy, 
         23ms average inference time.

5. QUANTITIES AND COUNTS - Always preserve how many of each item:
   BAD: Assistant listed items with details but no quantities.
   GOOD: Assistant listed items: Item A (4 units, size large), Item B (2 units, size small).
   
   When listing items with attributes, always include the COUNT first before other details.

6. ROLE/PARTICIPATION STATEMENTS - When user mentions their role at an event:
   BAD: User attended the company event.
   GOOD: User was a presenter at the company event.
   
   BAD: User went to the fundraiser.
   GOOD: User volunteered at the fundraiser (helped with registration).
   
   Always capture specific roles: presenter, organizer, volunteer, team lead, 
   coordinator, participant, contributor, helper, etc.

CONVERSATION CONTEXT:
- What the user is working on or asking about
- Previous topics and their outcomes
- What user understands or needs clarification on
- Specific requirements or constraints mentioned
- Contents of assistant learnings and summaries
- Answers to users questions including full context to remember detailed summaries and explanations
- Assistant explanations, especially complex ones. observe the fine details so that the assistant does not forget what they explained
- Relevant code snippets
- User preferences (like favourites, dislikes, preferences, etc)
- Any specifically formatted text or ascii that would need to be reproduced or referenced in later interactions (preserve these verbatim in memory)
- Sequences, units, measurements, and any kind of specific relevant data
- Any blocks of any text which the user and assistant are iteratively collaborating back and forth on should be preserved verbatim
- When who/what/where/when is mentioned, note that in the observation. Example: if the user received went on a trip with someone, observe who that someone was, where the trip was, when it happened, and what happened, not just that the user went on the trip.
- For any described entity (like a person, place, thing, etc), preserve the attributes that would help identify or describe the specific entity later: location ("near X"), specialty ("focuses on Y"), unique feature ("has Z"), relationship ("owned by W"), or other details. The entity's name is important, but so are any additional details that distinguish it. If there are a list of entities, preserve these details for each of them.

USER MESSAGE CAPTURE:
- Short and medium-length user messages should be captured nearly verbatim in your own words.
- For very long user messages, summarize but quote key phrases that carry specific intent or meaning.
- This is critical for continuity: when the conversation window shrinks, the observations are the only record of what the user said.

AVOIDING REPETITIVE OBSERVATIONS:
- Do NOT repeat the same observation across multiple turns if there is no new information.
- When the agent performs repeated similar actions (e.g., browsing files, running the same tool type multiple times), group them into a single parent observation with sub-bullets for each new result.

Example \u2014 BAD (repetitive):
* \uD83D\uDFE1 (14:30) Agent used view tool on src/auth.ts
* \uD83D\uDFE1 (14:31) Agent used view tool on src/users.ts
* \uD83D\uDFE1 (14:32) Agent used view tool on src/routes.ts

Example \u2014 GOOD (grouped):
* \uD83D\uDFE1 (14:30) Agent browsed source files for auth flow
  * -> viewed src/auth.ts \u2014 found token validation logic
  * -> viewed src/users.ts \u2014 found user lookup by email
  * -> viewed src/routes.ts \u2014 found middleware chain

Only add a new observation for a repeated action if the NEW result changes the picture.

ACTIONABLE INSIGHTS:
- What worked well in explanations
- What needs follow-up or clarification
- User's stated goals or next steps (note if the user tells you not to do a next step, or asks for something specific, other next steps besides the users request should be marked as "waiting for user", unless the user explicitly says to continue all next steps)

COMPLETION TRACKING:
Completion observations are not just summaries. They are explicit memory signals to the assistant that a task, question, or subtask has been resolved.
Without clear completion markers, the assistant may forget that work is already finished and may repeat, reopen, or continue an already-completed task.

Use \u2705 to answer: "What exactly is now done?"
Choose completion observations that help the assistant know what is finished and should not be reworked unless new information appears.

Use \u2705 when:
- The user explicitly confirms something worked or was answered ("thanks, that fixed it", "got it", "perfect")
- The assistant provided a definitive, complete answer to a factual question and the user moved on
- A multi-step task reached its stated goal
- The user acknowledged receipt of requested information
- A concrete subtask, fix, deliverable, or implementation step became complete during ongoing work

Do NOT use \u2705 when:
- The assistant merely responded \u2014 the user might follow up with corrections
- The topic is paused but not resolved ("I'll try that later")
- The user's reaction is ambiguous

FORMAT:
As a sub-bullet under the related observation group:
* \uD83D\uDD34 (14:30) User asked how to configure auth middleware
  * -> Agent explained JWT setup with code example
  * \u2705 User confirmed auth is working

Or as a standalone observation when closing out a broader task:
* \u2705 (14:45) Auth configuration task completed \u2014 user confirmed middleware is working

Completion observations should be terse but specific about WHAT was completed.
Prefer concrete resolved outcomes over abstract workflow status so the assistant remembers what is already done.`,fN9,pd0=`- Be specific enough for the assistant to act on
- Good: "User prefers short, direct answers without lengthy explanations"
- Bad: "User stated a preference" (too vague)
- Add 1 to 5 observations per exchange
- Use terse language to save tokens. Sentences should be dense without unnecessary words
- Do not add repetitive observations that have already been observed. Group repeated similar actions (tool calls, file browsing) under a single parent with sub-bullets for new results
- If the agent calls tools, observe what was called, why, and what was learned
- When observing files with line numbers, include the line number if useful
- If the agent provides a detailed response, observe the contents so it could be repeated
- Make sure you start each observation with a priority emoji (\uD83D\uDD34, \uD83D\uDFE1, \uD83D\uDFE2) or a completion marker (\u2705)
- Capture the user's words closely \u2014 short/medium messages near-verbatim, long messages summarized with key quotes. User confirmations or explicit resolved outcomes should be \u2705 when they clearly signal something is done; unresolved or critical user facts remain \uD83D\uDD34
- Treat \u2705 as a memory signal that tells the assistant something is finished and should not be repeated unless new information changes it
- Make completion observations answer "What exactly is now done?"
- Prefer concrete resolved outcomes over meta-level workflow or bookkeeping updates
- When multiple concrete things were completed, capture the concrete completed work rather than collapsing it into a vague progress summary
- Observe WHAT the agent did and WHAT it means
- If the user provides detailed messages or code snippets, observe all important details`,LE4,gN9,dO4=1e4,ip,eN9,WL9,ZL9=class{observationConfig;observedMessageIds;resolveModel;tokenCounter;mastra;lastExchange;constructor($){this.observationConfig=$.observationConfig,this.observedMessageIds=$.observedMessageIds,this.resolveModel=$.resolveModel,this.tokenCounter=$.tokenCounter,this.mastra=$.mastra}__registerMastra($){this.mastra=$}createAgent($,Y=!1){let X=new YJ({id:Y?"multi-thread-observer":"observational-memory-observer",name:Y?"multi-thread-observer":"Observer",instructions:MC(Y,this.observationConfig.instruction,this.observationConfig.threadTitle),model:$});if(this.mastra)X.__registerMastra(this.mastra);return X}async withAbortCheck($,Y){if(Y?.aborted)throw Error("The operation was aborted.");let X=await $();if(Y?.aborted)throw Error("The operation was aborted.");return X}async call($,Y,X,G){let J=this.tokenCounter.countMessages(Y),Q=G?.model?{model:G.model}:this.resolveModel(J),W=this.createAgent(Q.model),Z=[{role:"user",content:qE4($,{...G,includeThreadTitle:this.observationConfig.threadTitle})},rN9(Y)],K=async()=>{return cd0(()=>ld0({phase:"observer",model:Q.model,inputTokens:J,requestContext:G?.requestContext,observabilityContext:G?.observabilityContext,metadata:{omPreviousObserverTokens:this.observationConfig.previousObserverTokens,omThreadTitleEnabled:this.observationConfig.threadTitle,omSkipContinuationHints:G?.skipContinuationHints??!1,omWasTruncated:G?.wasTruncated??!1,...Q.selectedThreshold!==void 0?{omSelectedThreshold:Q.selectedThreshold}:{},...Q.routingStrategy?{omRoutingStrategy:Q.routingStrategy}:{},...Q.routingThresholds?{omRoutingThresholds:Q.routingThresholds}:{}},callback:(N)=>this.withAbortCheck(async()=>{return(await W.stream(Z,{modelSettings:{...this.observationConfig.modelSettings},providerOptions:this.observationConfig.providerOptions,...X?{abortSignal:X}:{},...G?.requestContext?{requestContext:G.requestContext}:{},...N})).getFullOutput()},X)}),{label:"observer",abortSignal:X})},H=await K(),z=KX0(H.text),V=!1;if(z.degenerate){if(S4("[OM:callObserver] degenerate repetition detected, retrying once"),H=await K(),z=KX0(H.text),V=!0,z.degenerate)throw S4("[OM:callObserver] degenerate repetition on retry, failing"),Error("Observer produced degenerate output after retry")}let A=MC(!1,this.observationConfig.instruction,this.observationConfig.threadTitle);this.lastExchange={systemPrompt:A,observerMessages:Z,rawOutput:H.text,parsedResult:{observations:z.observations,currentTask:z.currentTask,suggestedContinuation:z.suggestedContinuation,threadTitle:z.threadTitle,degenerate:z.degenerate},model:String(Q.model),inputTokens:J,isMultiThread:!1,retriedDueToDegenerate:V};let F=H.totalUsage??H.usage;return{observations:z.observations,currentTask:z.currentTask,suggestedContinuation:z.suggestedContinuation,threadTitle:z.threadTitle,usage:F?{inputTokens:F.inputTokens,outputTokens:F.outputTokens,totalTokens:F.totalTokens}:void 0}}async callMultiThread($,Y,X,G,J,Q,W,Z){let K=Array.from(Y.values()).reduce((E,M)=>E+this.tokenCounter.countMessages(M),0),H=Z?{model:Z}:this.resolveModel(K),z=this.createAgent(H.model,!0),V=[{role:"user",content:sN9($,X,Q,void 0,this.observationConfig.threadTitle)},aN9(Y,X)];for(let E of Y.values())for(let M of E)this.observedMessageIds.add(M.id);let A=async()=>{return cd0(()=>ld0({phase:"observer-multi-thread",model:H.model,inputTokens:K,requestContext:J,observabilityContext:W,metadata:{omThreadCount:X.length,omPreviousObserverTokens:this.observationConfig.previousObserverTokens,omThreadTitleEnabled:this.observationConfig.threadTitle,...H.selectedThreshold!==void 0?{omSelectedThreshold:H.selectedThreshold}:{},...H.routingStrategy?{omRoutingStrategy:H.routingStrategy}:{},...H.routingThresholds?{omRoutingThresholds:H.routingThresholds}:{}},callback:(E)=>this.withAbortCheck(async()=>{return(await z.stream(V,{modelSettings:{...this.observationConfig.modelSettings},providerOptions:this.observationConfig.providerOptions,...G?{abortSignal:G}:{},...J?{requestContext:J}:{},...E})).getFullOutput()},G)}),{label:"observer-multi-thread",abortSignal:G})},F=await A(),N=pO4(F.text),D=!1;if(N.degenerate){if(S4("[OM:callMultiThreadObserver] degenerate repetition detected, retrying once"),F=await A(),N=pO4(F.text),D=!0,N.degenerate)throw S4("[OM:callMultiThreadObserver] degenerate repetition on retry, failing"),Error("Multi-thread observer produced degenerate output after retry")}let L=MC(!0,this.observationConfig.instruction,this.observationConfig.threadTitle);this.lastExchange={systemPrompt:L,observerMessages:V,rawOutput:F.text,parsedResult:{observations:Array.from(N.threads.values()).map((E)=>E.observations).join(`
`),threadTitle:Array.from(N.threads.values()).map((E)=>E.threadTitle).filter(Boolean).join(", "),degenerate:N.degenerate},model:String(H.model),inputTokens:K,isMultiThread:!0,retriedDueToDegenerate:D};let B=new Map;for(let[E,M]of N.threads)B.set(E,{observations:M.observations,currentTask:M.currentTask,suggestedContinuation:M.suggestedContinuation,threadTitle:M.threadTitle});for(let E of X)if(!B.has(E))B.set(E,{observations:""});let O=F.totalUsage??F.usage;return{results:B,usage:O?{inputTokens:O.inputTokens,outputTokens:O.outputTokens,totalTokens:O.totalTokens}:void 0}}},UL9=4,HL9,lO4=0.75,BL9=class{reflectionConfig;observationConfig;tokenCounter;resolveModel;storage;scope;buffering;emitDebugEvent;persistMarkerToStorage;persistMarkerToMessage;getCompressionStartLevel;mastra;constructor($){this.reflectionConfig=$.reflectionConfig,this.observationConfig=$.observationConfig,this.tokenCounter=$.tokenCounter,this.resolveModel=$.resolveModel,this.storage=$.storage,this.scope=$.scope,this.buffering=$.buffering,this.emitDebugEvent=$.emitDebugEvent,this.persistMarkerToStorage=$.persistMarkerToStorage,this.persistMarkerToMessage=$.persistMarkerToMessage,this.getCompressionStartLevel=$.getCompressionStartLevel,this.mastra=$.mastra}__registerMastra($){this.mastra=$}createAgent($){let Y=new YJ({id:"observational-memory-reflector",name:"Reflector",instructions:KL9(this.reflectionConfig.instruction),model:$});if(this.mastra)Y.__registerMastra(this.mastra);return Y}getObservationMarkerConfig($){return{messageTokens:a$(this.observationConfig.messageTokens),observationTokens:a$($?this.getEffectiveReflectionTokens($):this.reflectionConfig.observationTokens),scope:this.scope,activateAfterIdle:this.reflectionConfig.activateAfterIdle}}getEffectiveReflectionTokens($){let X=$.config?._overrides?.reflection?.observationTokens;if(X)return X;return this.reflectionConfig.observationTokens}async call($,Y,X,G,J,Q,W,Z,K,H){let z=this.tokenCounter.countObservations($),V=H?{model:H}:this.resolveModel(z),A=this.createAgent(V.model),F=G??a$(this.reflectionConfig.observationTokens),N={inputTokens:0,outputTokens:0,totalTokens:0},D=W??0,L=D,B=Math.min(UL9,D+3),O={observations:"",suggestedContinuation:void 0},E=0,M=0;while(L<=B){M++;let R=M>1,q=zL9($,Y,L,Q);S4(`[OM:callReflector] ${R?`retry #${M-1}`:"first attempt"}: level=${L}, originalTokens=${z}, targetThreshold=${F}, promptLen=${q.length}, skipContinuationHints=${Q}`);let w=0,I=await cd0(()=>ld0({phase:"reflector",model:V.model,inputTokens:z,requestContext:Z,observabilityContext:K,metadata:{omCompressionLevel:L,omCompressionAttempt:M,omTargetThreshold:F,omSkipContinuationHints:Q??!1,...V.selectedThreshold!==void 0?{omSelectedThreshold:V.selectedThreshold}:{},...V.routingStrategy?{omRoutingStrategy:V.routingStrategy}:{},...V.routingThresholds?{omRoutingThresholds:V.routingThresholds}:{}},callback:(_)=>LL9(async()=>{return w=0,(await A.stream(q,{modelSettings:{...this.reflectionConfig.modelSettings},providerOptions:this.reflectionConfig.providerOptions,...J?{abortSignal:J}:{},...Z?{requestContext:Z}:{},..._,...M===1?{onChunk(k){if(w++,w===1||w%50===0){let S=k.type==="text-delta"?` text="${k.textDelta?.slice(0,80)}..."`:k.type==="tool-call"?` tool=${k.toolName}`:"";S4(`[OM:callReflector] chunk#${w}: type=${k.type}${S}`)}},onFinish(k){S4(`[OM:callReflector] onFinish: chunks=${w}, finishReason=${k.finishReason}, inputTokens=${k.usage?.inputTokens}, outputTokens=${k.usage?.outputTokens}, textLen=${k.text?.length}`)},onAbort(k){S4(`[OM:callReflector] onAbort: chunks=${w}, reason=${k?.reason??"unknown"}`)},onError({error:k}){lW(`[OM:callReflector] onError after ${w} chunks`,k)}}:{}})).getFullOutput()},J)}),{label:"reflector",abortSignal:J});S4(`[OM:callReflector] attempt #${M} returned: textLen=${I.text?.length}, textPreview="${I.text?.slice(0,120)}...", inputTokens=${I.usage?.inputTokens??I.totalUsage?.inputTokens}, outputTokens=${I.usage?.outputTokens??I.totalUsage?.outputTokens}`);let P=I.totalUsage??I.usage;if(P)N.inputTokens+=P.inputTokens??0,N.outputTokens+=P.outputTokens??0,N.totalTokens+=P.totalTokens??0;if(O=VL9(I.text,$),O.degenerate)S4(`[OM:callReflector] attempt #${M}: degenerate repetition detected, treating as compression failure`),E=z;else E=this.tokenCounter.countObservations(O.observations);if(S4(`[OM:callReflector] attempt #${M} parsed: reflectedTokens=${E}, targetThreshold=${F}, compressionValid=${cO4(E,F)}, parsedObsLen=${O.observations?.length}, degenerate=${O.degenerate??!1}`),!O.degenerate&&(cO4(E,F)||L>=B))break;if(O.degenerate&&L>=B){S4(`[OM:callReflector] degenerate output persists at maxLevel=${B}, breaking`);break}if(X?.writer){let _=ZX0({cycleId:X.cycleId,operationType:"reflection",startedAt:X.startedAt,tokensAttempted:z,error:`Did not compress below threshold (${z} \u2192 ${E}, target: ${F}), retrying at level ${L+1}`,recordId:X.recordId,threadId:X.threadId});await X.writer.custom({..._,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(_,X.threadId,X.resourceId);let C=crypto.randomUUID();X.cycleId=C;let k=WX0({cycleId:C,operationType:"reflection",tokensToObserve:z,recordId:X.recordId,threadId:X.threadId,threadIds:[X.threadId],config:this.getObservationMarkerConfig()});X.startedAt=k.data.startedAt,await X.writer.custom({...k,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(k,X.threadId,X.resourceId)}L=Math.min(L+1,B)}return{observations:O.observations,suggestedContinuation:O.suggestedContinuation,usage:N.totalTokens>0?N:void 0}}startAsyncBufferedReflection($,Y,X,G,J,Q,W){let Z=this.buffering.getReflectionBufferKey(X);if(this.buffering.isAsyncBufferingInProgress(Z))return;$5.lastBufferedBoundary.set(Z,Y),np($.id,"bufferingReflection"),this.storage.setBufferingReflectionFlag($.id,!0).catch((H)=>{lW("[OM] Failed to set buffering reflection flag",H)}),W?.onReflectionStart?.();let K=this.doAsyncBufferedReflection($,Z,G,J,Q).then((H)=>{W?.onReflectionEnd?.({usage:H})}).catch(async(H)=>{if(G){let z=KE4({cycleId:`reflect-buf-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,operationType:"reflection",startedAt:new Date().toISOString(),tokensAttempted:Y,error:H instanceof Error?H.message:String(H),recordId:$.id,threadId:$.threadId??""});G.custom({...z,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(z,$.threadId??"",$.resourceId??void 0)}lW("[OM] Async buffered reflection failed",H),W?.onReflectionEnd?.({usage:void 0,error:H instanceof Error?H:Error(String(H))}),$5.lastBufferedBoundary.delete(Z)}).finally(()=>{$5.asyncBufferingOps.delete(Z),BC($.id,"bufferingReflection"),this.storage.setBufferingReflectionFlag($.id,!1).catch((H)=>{lW("[OM] Failed to clear buffering reflection flag",H)})});$5.asyncBufferingOps.set(Z,K)}async doAsyncBufferedReflection($,Y,X,G,J){let W=await this.storage.getObservationalMemory($.threadId,$.resourceId)??$,Z=W.observationTokenCount??0,K=a$(this.getEffectiveReflectionTokens(W)),H=this.reflectionConfig.bufferActivation??0.5,z=new Date().toISOString(),V=`reflect-buf-${Date.now()}-${Math.random().toString(36).slice(2,11)}`;$5.reflectionBufferCycleIds.set(Y,V);let F=(W.activeObservations??"").split(`
`),N=F.length,D=N>0?Z/N:0,L=K*H,B=D>0?Math.min(Math.floor(L/D),N):N,O=F.slice(0,B).join(`
`),E=B,M=Math.round(D*B),R=Math.round(M*0.75);if(S4(`[OM:reflect] doAsyncBufferedReflection: slicing observations for reflection \u2014 totalLines=${N}, avgTokPerLine=${D.toFixed(1)}, activationPointTokens=${L}, linesToReflect=${B}/${N}, sliceTokenEstimate=${M}, compressionTarget=${R}`),S4(`[OM:reflect] doAsyncBufferedReflection: starting reflector call, recordId=${W.id}, observationTokens=${M}, compressionTarget=${R} (inputTokens), activeObsLength=${O.length}, reflectedLineCount=${E}`),X){let P=gd0({cycleId:V,operationType:"reflection",tokensToBuffer:M,recordId:$.id,threadId:$.threadId??"",threadIds:$.threadId?[$.threadId]:[],config:this.getObservationMarkerConfig(W)});X.custom({...P,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(P,W.threadId??"",W.resourceId??void 0)}let q=await this.getCompressionStartLevel(G),w=await this.call(O,void 0,void 0,R,void 0,!0,q,G,J),I=this.tokenCounter.countObservations(w.observations);if(S4(`[OM:reflect] doAsyncBufferedReflection: reflector returned ${I} tokens (${w.observations?.length} chars), saving to recordId=${W.id}`),await this.storage.updateBufferedReflection({id:W.id,reflection:w.observations,tokenCount:I,inputTokenCount:M,reflectedObservationLineCount:E}),S4(`[OM:reflect] doAsyncBufferedReflection: bufferedReflection saved with lineCount=${E}`),X){let P=ZE4({cycleId:V,operationType:"reflection",startedAt:z,tokensBuffered:M,bufferedTokens:I,recordId:W.id,threadId:W.threadId??"",observations:w.observations});X.custom({...P,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(P,W.threadId??"",W.resourceId??void 0)}return w.usage}async tryActivateBufferedReflection($,Y,X,G,J){let Q=this.buffering.getReflectionBufferKey(Y),W=$5.asyncBufferingOps.get(Q);if(W)if(J?.triggeredBy==="ttl"||J?.triggeredBy==="provider_change")S4(`[OM:reflect] tryActivateBufferedReflection: async op in progress, not blocking for ${J.triggeredBy} trigger`);else{S4("[OM:reflect] tryActivateBufferedReflection: waiting for in-progress op...");try{await Promise.race([W,new Promise((O,E)=>setTimeout(()=>E(Error("Timeout")),5000))])}catch{}}let Z=await this.storage.getObservationalMemory($.threadId,$.resourceId);if(S4(`[OM:reflect] tryActivateBufferedReflection: recordId=${$.id}, hasBufferedReflection=${!!Z?.bufferedReflection}, bufferedReflectionLen=${Z?.bufferedReflection?.length??0}`),S4(`[OM:reflect] tryActivateBufferedReflection: freshRecord.id=${Z?.id}, freshBufferedReflection=${Z?.bufferedReflection?"present ("+Z.bufferedReflection.length+" chars)":"empty"}, freshObsTokens=${Z?.observationTokenCount}`),!Z?.bufferedReflection)return S4("[OM:reflect] tryActivateBufferedReflection: no buffered reflection after re-fetch"),{status:"no-buffer"};let K=Z.observationTokenCount??0,H=Z.reflectedObservationLineCount??0,A=(Z.activeObservations??"").split(`
`).slice(H),F=A.join(`
`).trim(),N=F?`${Z.bufferedReflection}

${F}`:Z.bufferedReflection,D=this.tokenCounter.countObservations(N);if(J?.triggeredBy==="ttl"||J?.triggeredBy==="provider_change"){let O=F?this.tokenCounter.countObservations(F):0,E=Z.bufferedReflectionTokens??0;if(O<E)return S4(`[OM:reflect] tryActivateBufferedReflection: suppressing early ${J.triggeredBy} activation \u2014 unreflectedTailTokens=${O} < bufferedReflectionTokens=${E}; keeping buffer for threshold activation`),{status:"suppressed",reason:"composition"};let M=this.reflectionConfig.bufferActivation,R=a$(this.getEffectiveReflectionTokens(Z)),q=R*(1-M),w=Math.round(q*lO4);if(D<w)return S4(`[OM:reflect] tryActivateBufferedReflection: suppressing early ${J.triggeredBy} activation \u2014 combinedTokenCount=${D} < minCombinedTokens=${w} (${lO4*100}% of regular activation target ${Math.round(q)}, threshold=${R}, bufferActivation=${M}); keeping buffer for threshold activation`),{status:"suppressed",reason:"size"}}S4(`[OM:reflect] tryActivateBufferedReflection: activating, beforeTokens=${K}, combinedTokenCount=${D}, reflectedLineCount=${H}, unreflectedLines=${A.length}`),await this.storage.swapBufferedReflectionToActive({currentRecord:Z,tokenCount:D}),$5.lastBufferedBoundary.delete(Q);let L=await this.storage.getObservationalMemory($.threadId,$.resourceId),B=L?.observationTokenCount??0;if(S4(`[OM:reflect] tryActivateBufferedReflection: activation complete! beforeTokens=${K}, afterTokens=${B}, newRecordId=${L?.id}, newGenCount=${L?.generationCount}`),X){let O=$5.reflectionBufferCycleIds.get(Q),E=UE4({cycleId:O??`reflect-act-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,operationType:"reflection",chunksActivated:1,tokensActivated:K,observationTokens:B,messagesActivated:0,recordId:Z.id,threadId:Z.threadId??"",generationCount:L?.generationCount??Z.generationCount??0,observations:L?.activeObservations,triggeredBy:J?.triggeredBy,lastActivityAt:J?.lastActivityAt,ttlExpiredMs:J?.ttlExpiredMs,previousModel:J?.previousModel,currentModel:J?.currentModel,config:this.getObservationMarkerConfig(Z)});X.custom({...E,transient:!0}).catch(()=>{}),await this.persistMarkerToMessage(E,G,Z.threadId??"",Z.resourceId??void 0)}return $5.reflectionBufferCycleIds.delete(Q),{status:"activated"}}async maybeReflect($){let{record:Y,observationTokens:X,writer:G,abortSignal:J,messageList:Q,currentModel:W,reflectionHooks:Z,requestContext:K,observabilityContext:H,lastActivityAt:z,threadId:V}=$,A=this.buffering.getLockKey(Y.threadId,Y.resourceId),F=a$(this.getEffectiveReflectionTokens(Y));if(this.buffering.isAsyncReflectionEnabled()&&X<F){if((()=>{if(!this.buffering.isAsyncReflectionEnabled())return!1;if(Y.isBufferingReflection){if(JX0(Y.id,"bufferingReflection"))return!1;S4("[OM:shouldTriggerAsyncRefl] isBufferingReflection=true but stale, clearing"),this.storage.setBufferingReflectionFlag(Y.id,!1).catch(()=>{})}let S=this.buffering.getReflectionBufferKey(A);if(this.buffering.isAsyncBufferingInProgress(S))return!1;if($5.lastBufferedBoundary.has(S))return!1;if(Y.bufferedReflection)return!1;let T=F*this.reflectionConfig.bufferActivation;return X>=T})())this.startAsyncBufferedReflection(Y,X,A,G,K,H,Z)}let N=this.reflectionConfig.activateAfterIdle,D=N!==void 0&&z!==void 0?Date.now()-z:void 0,L=D!==void 0&&N!==void 0&&D>=N,B=DL9(W),O=NL9(Q),E=this.reflectionConfig.activateOnProviderChange===!0&&JE4(B,O);if(X<F&&!L&&!E)return;let M=X>=F?"threshold":E?"provider_change":"ttl",R={triggeredBy:M,lastActivityAt:M==="ttl"?z:void 0,ttlExpiredMs:M==="ttl"?D:void 0,previousModel:M==="provider_change"?O:void 0,currentModel:M==="provider_change"?B:void 0};if(Y.isReflecting){if(JX0(Y.id,"reflecting")){S4("[OM:reflect] isReflecting=true and active in this process, skipping");return}S4("[OM:reflect] isReflecting=true but NOT active in this process \u2014 stale flag from dead process, clearing"),await this.storage.setReflectingFlag(Y.id,!1)}if(this.buffering.isAsyncReflectionEnabled()){let k=await this.tryActivateBufferedReflection(Y,A,G,Q,R);if(k.status==="activated")return;if(k.status==="suppressed"){S4(`[OM:reflect] skipping sync fallback / re-buffer after suppressed early ${R.triggeredBy} activation (reason=${k.reason})`);return}if(this.reflectionConfig.blockAfter&&X>=this.reflectionConfig.blockAfter)S4(`[OM:reflect] blockAfter exceeded (${X} >= ${this.reflectionConfig.blockAfter}), falling through to sync reflection`);else{let S=F*this.reflectionConfig.bufferActivation;if(X<S){S4(`[OM:reflect] skipping async reflection \u2014 observationTokens (${X}) below activation point (${S}), triggered by ${M}`);return}S4(`[OM:reflect] async activation failed, no blockAfter or below it (obsTokens=${X}, blockAfter=${this.reflectionConfig.blockAfter}) \u2014 starting background reflection`),this.startAsyncBufferedReflection(Y,X,A,G,K,H,Z);return}}Z?.onReflectionStart?.(),await this.storage.setReflectingFlag(Y.id,!0),np(Y.id,"reflecting");let q=crypto.randomUUID(),w=new Date().toISOString(),I=V??"unknown";if(G){let k=WX0({cycleId:q,operationType:"reflection",tokensToObserve:X,recordId:Y.id,threadId:I,threadIds:[I],config:this.getObservationMarkerConfig(Y)});await G.custom({...k,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(k,I,Y.resourceId??void 0)}this.emitDebugEvent({type:"reflection_triggered",timestamp:new Date,threadId:I,resourceId:Y.resourceId??"",inputTokens:X,activeObservationsLength:Y.activeObservations?.length??0});let P=G?{writer:G,cycleId:q,startedAt:w,recordId:Y.id,threadId:I,resourceId:Y.resourceId??void 0}:void 0,_,C;try{let k=await this.getCompressionStartLevel(K),S=await this.call(Y.activeObservations,void 0,P,F,J,void 0,k,K,H);_=S.usage;let T=this.tokenCounter.countObservations(S.observations);if(await this.storage.createReflectionGeneration({currentRecord:Y,reflection:S.observations,tokenCount:T}),G&&P){let v=ed0({cycleId:P.cycleId,operationType:"reflection",startedAt:P.startedAt,tokensObserved:X,observationTokens:T,observations:S.observations,recordId:Y.id,threadId:I});await G.custom({...v,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(v,I,Y.resourceId??void 0)}this.emitDebugEvent({type:"reflection_complete",timestamp:new Date,threadId:I,resourceId:Y.resourceId??"",inputTokens:X,outputTokens:T,observations:S.observations,usage:S.usage})}catch(k){if(G&&P){let S=ZX0({cycleId:P.cycleId,operationType:"reflection",startedAt:P.startedAt,tokensAttempted:X,error:k instanceof Error?k.message:String(k),recordId:Y.id,threadId:I});await G.custom({...S,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(S,I,Y.resourceId??void 0)}if(C=k instanceof Error?k:Error(String(k)),J?.aborted)throw k;lW("[OM] Reflection failed",k)}finally{await this.storage.setReflectingFlag(Y.id,!1),Z?.onReflectionEnd?.({usage:_,error:C}),BC(Y.id,"reflecting")}}},wL9,ZN=7,_L9="client",jL9,TL9=258,CL9,SL9=0.0013333333333333333,nO4=1568,kL9,Vc0=20000,yd0=2500,vL9,AX0=class ${cacheSource;defaultModelContext;modelContextStorage=new oD9;inFlightAttachmentCounts=new Map;static TOKENS_PER_MESSAGE=3.8;static TOKENS_PER_CONVERSATION=24;constructor(Y){this.cacheSource=`v${ZN}:${fL9()}`,this.defaultModelContext=aO4(Y?.model)}runWithModelContext(Y,X){return this.modelContextStorage.run(aO4(Y),X)}getModelContext(){return this.modelContextStorage.getStore()??this.defaultModelContext}countString(Y){if(!Y)return 0;return JG(Y)}readOrPersistPartEstimate(Y,X,G){let J=dp(X,G),Q=YX0(Y,J);if(lp(Q,J,this.cacheSource))return Q.tokens;let W=this.countString(G);return cp(Y,J,{v:ZN,source:this.cacheSource,key:J,tokens:W}),W}readOrPersistFixedPartEstimate(Y,X,G,J){let Q=dp(X,G),W=YX0(Y,Q);if(lp(W,Q,this.cacheSource))return W.tokens;return cp(Y,Q,{v:ZN,source:this.cacheSource,key:Q,tokens:J}),J}readOrPersistMessageEstimate(Y,X,G){let J=dp(X,G),Q=gL9(Y,J);if(lp(Q,J,this.cacheSource))return Q.tokens;let W=this.countString(G);return mL9(Y,J,{v:ZN,source:this.cacheSource,key:J,tokens:W}),W}resolveToolResultForTokenCounting(Y,X){return LX0(Y,X)}estimateImageAssetTokens(Y,X,G){let J=this.getModelContext(),Q=ap(J),W=J?.modelId??null,Z=zX0(Y),K=ad0(Y),H=sd0(X);if(Q==="google"){let N=JB9(J,Y,K);return{tokens:N.tokens,cachePayload:JSON.stringify({kind:G,provider:Q,modelId:W,estimator:bE4(J)?"google-gemini-3":"google-legacy",mediaResolution:N.mediaResolution,width:K.width??null,height:K.height??null,source:H.source,sizeBytes:H.sizeBytes??null,mimeType:Z4(Y,"mimeType")??null,filename:Z4(Y,"filename")??null})}}if(Q==="anthropic")return{tokens:YB9(K,H),cachePayload:JSON.stringify({kind:G,provider:Q,modelId:W,estimator:"anthropic",width:K.width??null,height:K.height??null,source:H.source,sizeBytes:H.sizeBytes??null,mimeType:Z4(Y,"mimeType")??null,filename:Z4(Y,"filename")??null})};let z=aL9(J),V=eL9(Z,K,H),A=V==="high"?tL9(K,H,z):0;return{tokens:z.baseTokens+A*z.tileTokens,cachePayload:JSON.stringify({kind:G,provider:Q,modelId:W,estimator:Q==="openai"?"openai":"fallback",detail:Z,effectiveDetail:V,width:K.width??null,height:K.height??null,source:H.source,sizeBytes:H.sizeBytes??null,mimeType:Z4(Y,"mimeType")??null,filename:Z4(Y,"filename")??null})}}estimateImageTokens(Y){return this.estimateImageAssetTokens(Y,Y.image,"image")}estimateImageLikeFileTokens(Y){return this.estimateImageAssetTokens(Y,Y.data,"file")}countAttachmentPartSync(Y){if(Y.type==="image"||Y.type==="file"){let X=rO4(Y);if(X)return X.tokens}if(Y.type==="image"){let X=this.estimateImageTokens(Y);return this.readOrPersistFixedPartEstimate(Y,"image",X.cachePayload,X.tokens)}if(Y.type==="file"&&RC(Y)){let X=this.estimateImageLikeFileTokens(Y);return this.readOrPersistFixedPartEstimate(Y,"image-like-file",X.cachePayload,X.tokens)}if(Y.type==="file"){let X=GB9(this.getModelContext(),Y);if(X)return this.readOrPersistFixedPartEstimate(Y,"non-image-file",X.cachePayload,X.tokens);return this.readOrPersistPartEstimate(Y,"file-descriptor",pL9(Y))}return}buildRemoteAttachmentCachePayload(Y){let X=Y.type==="image"||Y.type==="file"&&RC(Y),G=Y.type==="file"&&!X;if(!X&&!G)return;let J=this.getModelContext(),Q=ap(J),W=J?.modelId??null;if(!Q||!W||!["openai","google","anthropic"].includes(Q))return;let Z=Z4(Y,"image")??Z4(Y,"data"),K=sd0(Z),H=QB9(Z);return JSON.stringify({strategy:"provider-endpoint",provider:Q,modelId:W,type:Z4(Y,"type")??null,detail:X?zX0(Y):null,mediaResolution:Q==="google"&&X?vE4(Y):null,mimeType:fM(Y,G?"application/pdf":"image/png"),filename:VX0(Y)??null,source:K.source,sizeBytes:K.sizeBytes??null,assetUrl:H.url??null,assetHash:H.contentHash??null})}async fetchProviderAttachmentTokenEstimate(Y){let X=this.getModelContext(),G=ap(X),J=X?.modelId;if(!G||!J)return;try{if(G==="openai")return await UB9(J,Y);if(G==="google")return await zB9(J,Y);if(G==="anthropic")return await HB9(J,Y)}catch{return}return}async countAttachmentPartAsync(Y){if(Y.type==="image"||Y.type==="file"){let Q=rO4(Y);if(Q)return Q.tokens}let X=Y.type==="image"||Y.type==="file"&&RC(Y),G=this.buildRemoteAttachmentCachePayload(Y);if(G){let Q=dp("attachment-provider",G),W=YX0(Y,Q);if(lp(W,Q,this.cacheSource))return W.tokens;let Z=this.inFlightAttachmentCounts.get(Q);if(Z){let A=await Z;if(typeof A==="number"&&Number.isFinite(A)&&A>0)return cp(Y,Q,{v:ZN,source:this.cacheSource,key:Q,tokens:A}),A}else{let A=this.fetchProviderAttachmentTokenEstimate(Y);this.inFlightAttachmentCounts.set(Q,A);let F;try{F=await A}finally{this.inFlightAttachmentCounts.delete(Q)}if(typeof F==="number"&&Number.isFinite(F)&&F>0)return cp(Y,Q,{v:ZN,source:this.cacheSource,key:Q,tokens:F}),F}if(X)await sO4(Y);let K=JSON.stringify({...JSON.parse(G),strategy:"local-fallback",...X?ad0(Y):{}}),H=dp("attachment-provider",K),z=YX0(Y,H);if(lp(z,H,this.cacheSource))return z.tokens;let V=this.countAttachmentPartSync(Y);if(V===void 0)return;return cp(Y,H,{v:ZN,source:this.cacheSource,key:H,tokens:V}),V}if(X)await sO4(Y);return this.countAttachmentPartSync(Y)}countNonAttachmentPart(Y){let X=0,G=0;if(Y.type==="text")return{tokens:this.readOrPersistPartEstimate(Y,"text",Y.text),overheadDelta:X,toolResultDelta:G};if(Y.type==="tool-invocation"){let Q=Y.toolInvocation,W=0;if(Q.state==="call"||Q.state==="partial-call"){if(Q.toolName)W+=this.readOrPersistPartEstimate(Y,`tool-${Q.state}-name`,Q.toolName);if(Q.args)if(typeof Q.args==="string")W+=this.readOrPersistPartEstimate(Y,`tool-${Q.state}-args`,Q.args);else{let Z=JSON.stringify(Q.args);W+=this.readOrPersistPartEstimate(Y,`tool-${Q.state}-args-json`,Z),X-=12}return{tokens:W,overheadDelta:X,toolResultDelta:G}}if(Q.state==="result"){G++;let{value:Z,usingStoredModelOutput:K}=this.resolveToolResultForTokenCounting(Y,Q.result);if(Z!==void 0){let H=tp(Z);if(W+=this.readOrPersistPartEstimate(Y,K?"tool-result-model-output-json":"tool-result-json",H),typeof Z!=="string")X-=12}return{tokens:W,overheadDelta:X,toolResultDelta:G}}throw Error(`Unhandled tool-invocation state '${Y.toolInvocation?.state}' in token counting for part type '${Y.type}'`)}if(typeof Y.type==="string"&&Y.type.startsWith("data-"))return{tokens:0,overheadDelta:X,toolResultDelta:G};if(Y.type==="reasoning")return{tokens:0,overheadDelta:X,toolResultDelta:G};let J=uL9(Y);return{tokens:this.readOrPersistPartEstimate(Y,`part-${Y.type}`,J),overheadDelta:X,toolResultDelta:G}}countMessage(Y){let X=this.countString(Y.role),G=$.TOKENS_PER_MESSAGE,J=0;if(typeof Y.content==="string")X+=this.readOrPersistMessageEstimate(Y,"message-content",Y.content);else if(Y.content&&typeof Y.content==="object"){if(Y.content.content&&!Array.isArray(Y.content.parts))X+=this.readOrPersistMessageEstimate(Y,"content-content",Y.content.content);else if(Array.isArray(Y.content.parts))for(let Q of Y.content.parts){let W=this.countAttachmentPartSync(Q);if(W!==void 0){X+=W;continue}let Z=this.countNonAttachmentPart(Q);X+=Z.tokens,G+=Z.overheadDelta,J+=Z.toolResultDelta}}if(J>0)G+=J*$.TOKENS_PER_MESSAGE;return Math.round(X+G)}async countMessageAsync(Y){let X=this.countString(Y.role),G=$.TOKENS_PER_MESSAGE,J=0;if(typeof Y.content==="string")X+=this.readOrPersistMessageEstimate(Y,"message-content",Y.content);else if(Y.content&&typeof Y.content==="object"){if(Y.content.content&&!Array.isArray(Y.content.parts))X+=this.readOrPersistMessageEstimate(Y,"content-content",Y.content.content);else if(Array.isArray(Y.content.parts))for(let Q of Y.content.parts){let W=await this.countAttachmentPartAsync(Q);if(W!==void 0){X+=W;continue}let Z=this.countNonAttachmentPart(Q);X+=Z.tokens,G+=Z.overheadDelta,J+=Z.toolResultDelta}}if(J>0)G+=J*$.TOKENS_PER_MESSAGE;return Math.round(X+G)}countMessages(Y){if(!Y||Y.length===0)return 0;let X=$.TOKENS_PER_CONVERSATION;for(let G of Y)X+=this.countMessage(G);return X}async countMessagesAsync(Y){if(!Y||Y.length===0)return 0;let X=await Promise.all(Y.map((G)=>this.countMessageAsync(G)));return $.TOKENS_PER_CONVERSATION+X.reduce((G,J)=>G+J,0)}countObservations(Y){return this.countString(Y)}},fE4=class ${storage;tokenCounter;scope;retrieval;observationConfig;reflectionConfig;onDebugEvent;onIndexObservations;observer;reflector;buffering;shouldObscureThreadIds=!1;hasher=wE();mastra;observedMessageIds=new Set;messageHistory;locks=new Map;async withLock(Y,X){let G=this.locks.get(Y);if(G)await G;let J,Q=new Promise((W)=>{J=W});this.locks.set(Y,Q);try{return await X()}finally{if(J(),this.locks.get(Y)===Q)this.locks.delete(Y)}}constructor(Y){if(!IM.has("request-response-id-rotation"))throw Error("Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version.");if(Y.model&&Y.observation?.model)throw Error("Cannot set both `model` and `observation.model`. Use `model` to set both agents, or set each individually.");if(Y.model&&Y.reflection?.model)throw Error("Cannot set both `model` and `reflection.model`. Use `model` to set both agents, or set each individually.");this.shouldObscureThreadIds=Y.obscureThreadIds||!1,this.storage=Y.storage,this.scope=Y.scope??"thread",this.retrieval=Boolean(Y.retrieval),this.onIndexObservations=Y.onIndexObservations,this.mastra=Y.mastra;let X=(O,E)=>O==="default"?E:O,G=X(Y.model,N9.observation.model)??X(Y.observation?.model,N9.observation.model)??X(Y.reflection?.model,N9.observation.model)??N9.observation.model,J=X(Y.model,N9.reflection.model)??X(Y.reflection?.model,N9.reflection.model)??X(Y.observation?.model,N9.reflection.model)??N9.reflection.model,Q=Y.observation?.messageTokens??N9.observation.messageTokens,W=Y.reflection?.observationTokens??N9.reflection.observationTokens,Z=Y.shareTokenBudget??!1,K=(O)=>O===void 0||O==="default"||O instanceof bM,H=Y.model??Y.observation?.model??Y.reflection?.model,z=Y.model??Y.reflection?.model??Y.observation?.model,V=Y.observation?.modelSettings?.maxOutputTokens??(K(H)?N9.observation.modelSettings.maxOutputTokens:void 0),A=Y.reflection?.modelSettings?.maxOutputTokens??(K(z)?N9.reflection.modelSettings.maxOutputTokens:void 0),F=Q+W,N=Y.observation?.bufferTokens!==void 0||Y.observation?.bufferActivation!==void 0||Y.reflection?.bufferActivation!==void 0,D=Y.observation?.bufferTokens===!1||Y.scope==="resource"&&!N;if(Z&&!D)if(N)throw Error(`shareTokenBudget requires async buffering to be disabled (this is a temporary limitation). Add observation: { bufferTokens: false } to your config:

  observationalMemory: {
    shareTokenBudget: true,
    observation: { bufferTokens: false },
  }

Remove any other async buffering settings (bufferTokens, bufferActivation, blockAfter).`);else throw Error(`shareTokenBudget requires async buffering to be disabled (this is a temporary limitation). Add observation: { bufferTokens: false } to your config:

  observationalMemory: {
    shareTokenBudget: true,
    observation: { bufferTokens: false },
  }
`+`
Async buffering is enabled by default \u2014 this opt-out is only needed when using shareTokenBudget.`);let L=Y.observation?.activateAfterIdle??Y.activateAfterIdle,B=Y.observation?.activateAfterIdle!==void 0?"observation.activateAfterIdle":"activateAfterIdle";this.observationConfig={model:G,messageTokens:Z?{min:Q,max:F}:Q,shareTokenBudget:Z,modelSettings:{temperature:Y.observation?.modelSettings?.temperature??N9.observation.modelSettings.temperature,...V!==void 0?{maxOutputTokens:V}:{}},providerOptions:Y.observation?.providerOptions??N9.observation.providerOptions,maxTokensPerBatch:Y.observation?.maxTokensPerBatch??N9.observation.maxTokensPerBatch,bufferTokens:D?void 0:LN9(Y.observation?.bufferTokens??N9.observation.bufferTokens,Y.observation?.messageTokens??N9.observation.messageTokens),bufferActivation:D?void 0:Y.observation?.bufferActivation??N9.observation.bufferActivation,activateAfterIdle:$E4(L,B),activateOnProviderChange:Y.observation?.activateOnProviderChange??Y.activateOnProviderChange??!1,blockAfter:D?void 0:uO4(Y.observation?.blockAfter??(Y.observation?.bufferTokens??N9.observation.bufferTokens?1.2:void 0),Y.observation?.messageTokens??N9.observation.messageTokens),previousObserverTokens:Y.observation?.previousObserverTokens??2000,instruction:Y.observation?.instruction,threadTitle:Y.observation?.threadTitle??!1},this.reflectionConfig={model:J,observationTokens:W,shareTokenBudget:Z,modelSettings:{temperature:Y.reflection?.modelSettings?.temperature??N9.reflection.modelSettings.temperature,...A!==void 0?{maxOutputTokens:A}:{}},providerOptions:Y.reflection?.providerOptions??N9.reflection.providerOptions,bufferActivation:D?void 0:Y?.reflection?.bufferActivation??N9.reflection.bufferActivation,activateAfterIdle:$E4(Y.reflection?.activateAfterIdle,"reflection.activateAfterIdle"),activateOnProviderChange:Y.reflection?.activateOnProviderChange??!1,blockAfter:D?void 0:uO4(Y.reflection?.blockAfter??(Y.reflection?.bufferActivation??N9.reflection.bufferActivation?1.2:void 0),Y.reflection?.observationTokens??N9.reflection.observationTokens),instruction:Y.reflection?.instruction},this.tokenCounter=new AX0({model:typeof G==="string"?G:void 0}),this.onDebugEvent=Y.onDebugEvent,this.messageHistory=new Yu({storage:this.storage}),this.observer=new ZL9({observationConfig:this.observationConfig,observedMessageIds:this.observedMessageIds,resolveModel:(O)=>this.resolveObservationModel(O),tokenCounter:this.tokenCounter,mastra:Y.mastra}),this.buffering=new $5({observationConfig:this.observationConfig,reflectionConfig:this.reflectionConfig,scope:this.scope}),this.reflector=new BL9({reflectionConfig:this.reflectionConfig,observationConfig:this.observationConfig,tokenCounter:this.tokenCounter,storage:this.storage,scope:this.scope,buffering:this.buffering,emitDebugEvent:(O)=>this.emitDebugEvent(O),persistMarkerToStorage:(O,E,M)=>this.persistMarkerToStorage(O,E,M),persistMarkerToMessage:(O,E,M,R)=>this.persistMarkerToMessage(O,E,M,R),getCompressionStartLevel:(O)=>this.getCompressionStartLevel(O),resolveModel:(O)=>this.resolveReflectionModel(O),mastra:Y.mastra}),this.validateBufferConfig(),S4(`[OM:init] new ObservationalMemory instance created \u2014 scope=${this.scope}, messageTokens=${JSON.stringify(this.observationConfig.messageTokens)}, obsAsyncEnabled=${this.buffering.isAsyncObservationEnabled()}, bufferTokens=${this.observationConfig.bufferTokens}, bufferActivation=${this.observationConfig.bufferActivation}, blockAfter=${this.observationConfig.blockAfter}, reflectionTokens=${this.reflectionConfig.observationTokens}, refAsyncEnabled=${this.buffering.isAsyncReflectionEnabled()}, refAsyncActivation=${this.reflectionConfig.bufferActivation}, refBlockAfter=${this.reflectionConfig.blockAfter}`)}__registerMastra(Y){this.mastra=Y,this.observer.__registerMastra(Y),this.reflector.__registerMastra(Y)}get config(){return{scope:this.scope,retrieval:this.retrieval,observation:{messageTokens:this.observationConfig.messageTokens,previousObserverTokens:this.observationConfig.previousObserverTokens},reflection:{observationTokens:this.reflectionConfig.observationTokens}}}async waitForBuffering(Y,X,G=30000){return $5.awaitBuffering(Y,X,this.scope,G)}getConcreteModel(Y,X){if(Y instanceof bM){if(X===void 0)throw Error("ModelByInputTokens requires inputTokens for resolution");return Y.resolve(X)}return Y}getModelToResolve(Y,X){let G=this.getConcreteModel(Y,X);if(Array.isArray(G))return G[0]?.model??"unknown";if(typeof G==="function")return async(J)=>{let Q=await G(J);if(Array.isArray(Q))return Q[0]?.model??"unknown";return Q};return G}formatModelName(Y){if(!Y.modelId)return"(unknown)";return Y.provider?`${Y.provider}/${Y.modelId}`:Y.modelId}resolveObservationModel(Y){return this.resolveTieredModel(this.observationConfig.model,Y)}resolveReflectionModel(Y){return this.resolveTieredModel(this.reflectionConfig.model,Y)}resolveTieredModel(Y,X){if(!(Y instanceof bM))return{model:Y};let G=Y.getThresholds(),J=G.find((Q)=>X<=Q)??G.at(-1);return{model:Y.resolve(X),selectedThreshold:J,routingStrategy:"model-by-input-tokens",routingThresholds:G.join(",")}}async resolveModelRouting(Y,X){try{if(Y instanceof bM){let J=await Promise.all(Y.getThresholds().map(async(Q)=>{let W=Y.resolve(Q),Z=await this.resolveModelContext(W,X);return{upTo:Q,model:Z?.modelId?this.formatModelName(Z):"(unknown)"}}));return{model:J[0]?.model??"(unknown)",routing:J}}let G=await this.resolveModelContext(Y,X);return{model:G?.modelId?this.formatModelName(G):"(unknown)"}}catch(G){return lW("[OM] Failed to resolve model config",G),{model:"(unknown)"}}}async resolveModelContext(Y,X,G){let J=this.getModelToResolve(Y,G);if(!J)return;let Q=await PE(J,X,this.mastra);return{provider:Q.provider,modelId:Q.modelId}}async getCompressionStartLevel(Y){try{if(((await this.resolveModelContext(this.reflectionConfig.model,Y))?.modelId??"").includes("gemini-2.5-flash"))return 2;return 1}catch{return 1}}async getResolvedConfig(Y){let[X,G]=await Promise.all([this.resolveModelRouting(this.observationConfig.model,Y),this.resolveModelRouting(this.reflectionConfig.model,Y)]);return{scope:this.scope,observation:{messageTokens:this.observationConfig.messageTokens,model:X.model,previousObserverTokens:this.observationConfig.previousObserverTokens,routing:X.routing},reflection:{observationTokens:this.reflectionConfig.observationTokens,model:G.model,routing:G.routing}}}emitDebugEvent(Y){if(this.onDebugEvent)this.onDebugEvent(Y)}validateBufferConfig(){if((this.observationConfig.bufferTokens!==void 0||this.observationConfig.bufferActivation!==void 0||this.reflectionConfig.bufferActivation!==void 0)&&this.scope==="resource")throw Error("Async buffering is not yet supported with scope: 'resource'. Use scope: 'thread', or set observation: { bufferTokens: false } to disable async buffering.");let X=a$(this.observationConfig.messageTokens);if(this.observationConfig.bufferTokens!==void 0){if(this.observationConfig.bufferTokens<=0)throw Error(`observation.bufferTokens must be > 0, got ${this.observationConfig.bufferTokens}`);if(this.observationConfig.bufferTokens>=X)throw Error(`observation.bufferTokens (${this.observationConfig.bufferTokens}) must be less than messageTokens (${X})`)}if(this.observationConfig.bufferActivation!==void 0){if(this.observationConfig.bufferActivation<=0)throw Error(`observation.bufferActivation must be > 0, got ${this.observationConfig.bufferActivation}`);if(this.observationConfig.bufferActivation>1&&this.observationConfig.bufferActivation<1000)throw Error(`observation.bufferActivation must be <= 1 (ratio) or >= 1000 (absolute token retention), got ${this.observationConfig.bufferActivation}`);if(this.observationConfig.bufferActivation>=1000&&this.observationConfig.bufferActivation>=X)throw Error(`observation.bufferActivation as absolute retention (${this.observationConfig.bufferActivation}) must be less than messageTokens (${X})`)}if(this.observationConfig.blockAfter!==void 0){if(this.observationConfig.blockAfter<X)throw Error(`observation.blockAfter (${this.observationConfig.blockAfter}) must be >= messageTokens (${X})`);if(!this.observationConfig.bufferTokens)throw Error("observation.blockAfter requires observation.bufferTokens to be set (blockAfter only applies when async buffering is enabled)")}if(this.observationConfig.previousObserverTokens!==void 0&&this.observationConfig.previousObserverTokens!==!1){if(!Number.isFinite(this.observationConfig.previousObserverTokens)||this.observationConfig.previousObserverTokens<0)throw Error(`observation.previousObserverTokens must be false or a finite number >= 0, got ${this.observationConfig.previousObserverTokens}`)}if(this.reflectionConfig.bufferActivation!==void 0){if(this.reflectionConfig.bufferActivation<=0||this.reflectionConfig.bufferActivation>1)throw Error(`reflection.bufferActivation must be in range (0, 1], got ${this.reflectionConfig.bufferActivation}`)}if(this.reflectionConfig.blockAfter!==void 0){let G=a$(this.reflectionConfig.observationTokens);if(this.reflectionConfig.blockAfter<G)throw Error(`reflection.blockAfter (${this.reflectionConfig.blockAfter}) must be >= reflection.observationTokens (${G})`);if(!this.reflectionConfig.bufferActivation)throw Error("reflection.blockAfter requires reflection.bufferActivation to be set (blockAfter only applies when async reflection is enabled)")}}getEffectiveMessageTokens(Y){let G=Y.config?._overrides?.observation?.messageTokens;if(G){let J=a$(G),Q=this.observationConfig.bufferTokens;if(Q&&J<=Q)return this.observationConfig.messageTokens;let W=this.observationConfig.bufferActivation;if(W&&W>=1000&&J<=W)return this.observationConfig.messageTokens;return G}return this.observationConfig.messageTokens}getEffectiveReflectionTokens(Y){let G=Y.config?._overrides?.reflection?.observationTokens;if(G)return G;return this.reflectionConfig.observationTokens}meetsObservationThreshold(Y){let{record:X,unobservedTokens:G,extraTokens:J=0}=Y,Q=(X.pendingMessageTokens??0)+G+J,W=X.observationTokenCount??0,Z=mO4(this.getEffectiveMessageTokens(X),W);return Q>=Z}getStorageIds(Y,X){if(this.scope==="resource")return{threadId:null,resourceId:X??Y};if(!Y)throw Error("ObservationalMemory (scope: 'thread') requires a threadId, but received an empty value. This is a bug \u2014 getThreadContext should have caught this earlier.");return{threadId:Y,resourceId:X??Y}}async getOrCreateRecord(Y,X){let G=this.getStorageIds(Y,X),J=await this.storage.getObservationalMemory(G.threadId,G.resourceId);if(!J){let Q=Intl.DateTimeFormat().resolvedOptions().timeZone;J=await this.storage.initializeObservationalMemory({threadId:G.threadId,resourceId:G.resourceId,scope:this.scope,config:{observation:this.observationConfig,reflection:this.reflectionConfig,scope:this.scope},observedTimezone:Q})}return J}getObservationMarkerConfig(){return{messageTokens:a$(this.observationConfig.messageTokens),observationTokens:a$(this.reflectionConfig.observationTokens),scope:this.scope,activateAfterIdle:this.observationConfig.activateAfterIdle}}async persistMarkerToMessage(Y,X,G,J){if(!X)return;let Q=X.get.all.db();for(let W=Q.length-1;W>=0;W--){let Z=Q[W];if(Z?.role==="assistant"&&Z.content?.parts&&Array.isArray(Z.content.parts)){let K=Y.data;if(!(K?.cycleId&&Z.content.parts.some((z)=>z?.type===Y.type&&z?.data?.cycleId===K.cycleId)))Z.content.parts.push(Y);try{await this.messageHistory.persistMessages({messages:[Z],threadId:G,resourceId:J})}catch(z){S4(`[OM:persistMarker] failed to save marker to DB: ${z}`)}return}}}async persistMarkerToStorage(Y,X,G){try{let Q=(await this.storage.listMessages({threadId:X,perPage:20,orderBy:{field:"createdAt",direction:"DESC"}}))?.messages??[];for(let W of Q)if(W?.role==="assistant"&&W.content?.parts&&Array.isArray(W.content.parts)){let Z=Y.data;if(!(Z?.cycleId&&W.content.parts.some((H)=>H?.type===Y.type&&H?.data?.cycleId===Z.cycleId)))W.content.parts.push(Y);await this.messageHistory.persistMessages({messages:[W],threadId:X,resourceId:G});return}}catch(J){S4(`[OM:persistMarkerToStorage] failed to save marker to DB: ${J}`)}}hasInProgressObservation(Y){let X=Y.content?.parts;if(!X||!Array.isArray(X))return!1;let G=-1,J=-1;for(let Q=X.length-1;Q>=0;Q--){let W=X[Q];if(W?.type==="data-om-observation-start"&&G===-1)G=Q;if((W?.type==="data-om-observation-end"||W?.type==="data-om-observation-failed")&&J===-1)J=Q}return G!==-1&&G>J}sealMessagesForBuffering(Y){let X=Date.now();for(let G of Y){if(!G.content?.parts?.length)continue;if(!G.content.metadata)G.content.metadata={};let J=G.content.metadata;if(!J.mastra)J.mastra={};J.mastra.sealed=!0;let Q=G.content.parts[G.content.parts.length-1];if(!Q.metadata)Q.metadata={};if(!Q.metadata.mastra)Q.metadata.mastra={};Q.metadata.mastra.sealedAt=X}}createUnobservedMessage(Y){let X=GX0(Y);if(X.length===0)return null;return{...Y,content:{...Y.content,parts:X}}}getUnobservedMessages(Y,X,G){let J=X.lastObservedAt,Q=new Set(Array.isArray(X.observedMessageIds)?X.observedMessageIds:[]);if(G?.excludeBuffered){let Z=yM(X);for(let K of Z)if(Array.isArray(K.messageIds))for(let H of K.messageIds)Q.add(H)}let W=[];for(let Z of Y){if(Z.role==="system")continue;if(Q?.has(Z.id))continue;let K=rp(Z);if(this.hasInProgressObservation(Z))W.push(Z);else if(K!==-1){let z=this.createUnobservedMessage(Z);if(z)W.push(z)}else if(!Z.createdAt||!J)W.push(Z);else if(new Date(Z.createdAt)>J)W.push(Z)}return W}prepareObserverContext(Y,X){let{previousObserverTokens:G}=this.observationConfig,J=G===void 0||G===!1?void 0:G;if(J===void 0)return{context:Y,wasTruncated:!1};let Q=X?.bufferedReflection&&X?.reflectedObservationLineCount?X.bufferedReflection:void 0;if(!Y)return{context:Q,wasTruncated:!1};let W=Y;if(Q&&X?.reflectedObservationLineCount){let z=W.split(`
`).slice(X.reflectedObservationLineCount).join(`
`).trim();W=z?`${Q}

${z}`:Q}let Z=!1;if(J!==void 0){if(J===0)return{context:"",wasTruncated:!0};if(this.tokenCounter.countObservations(W)>J)W=this.truncateObservationsToTokenBudget(W,J),Z=!0}return{context:W,wasTruncated:Z}}truncateObservationsToTokenBudget(Y,X){if(X===0)return"";if(this.tokenCounter.countObservations(Y)<=X)return Y;let J=Y.split(`
`),Q=J.length,W=Array(Q),Z=Array(Q);for(let D=0;D<Q;D++)W[D]=this.tokenCounter.countString(J[D]),Z[D]=J[D].includes("\uD83D\uDD34")||J[D].includes("\u2705");let K=Array(Q+1);K[Q]=0;for(let D=Q-1;D>=0;D--)K[D]=K[D+1]+W[D];let H=[],z=(D,L)=>{let B=[...L,...Array.from({length:Q-D},(R,q)=>D+q)].sort((R,q)=>R-q);if(B.length===0)return`[${Q} observations truncated here]`;let O=[],E=-1;for(let R of B){let q=R-E-1;if(q===1)O.push(J[E+1]);else if(q>1)O.push(`[${q} observations truncated here]`);O.push(J[R]),E=R}let M=Q-E-1;if(M===1)O.push(J[Q-1]);else if(M>1)O.push(`[${M} observations truncated here]`);return O.join(`
`)},V=(D,L)=>{let B=K[D];for(let O of L)B+=W[O];return B},A,F=-1,N=-1;for(let D=1;D<Q;D++){if(Z[D-1])H.push(D-1);let L=Q-D,B=L,O=Math.min(H.length,B),E=(M)=>M>0?H.slice(Math.max(0,H.length-M)):[];while(O>0&&V(D,E(O))>X)O-=1;if(V(D,E(O))>X)continue;if(O>F||O===F&&L>N){let M=z(D,E(O));if(this.tokenCounter.countObservations(M)<=X)A=M,F=O,N=L}}if(!A)return`[${Q} observations truncated here]`;return A}formatObservationsForContext(Y,X,G,J,Q,W=!1){let Z=W?Jc0(Y)??UX0(Y):UX0(Y);if(Q)Z=XN9(Z,Q);let K=[`${$C}

${YC}${W?`

${WY0}`:""}`];if(J)K.push(`The following content is from OTHER conversations different from the current conversation, they're here for reference,  but they're not necessarily your focus:
START_OTHER_CONVERSATIONS_BLOCK
${J}
END_OTHER_CONVERSATIONS_BLOCK`);let H=this.splitObservationContextChunks(Z);if(H.length>0)K.push("<observations>",...H);if(X)K.push(`<current-task>
${X}
</current-task>`);if(G)K.push(`<suggested-response>
${G}
</suggested-response>`);return K}splitObservationContextChunks(Y){let X=Y.trim();if(!X)return[];return X.split(/\n{2,}--- message boundary \(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z\) ---\n{2,}/).map((G)=>G.trim()).filter(Boolean)}static createMessageBoundary(Y){return`

--- message boundary (${Y.toISOString()}) ---

`}getThreadContext(Y,X){let G=Y?.get("MastraMemory");if(G?.thread?.id)return{threadId:G.thread.id,resourceId:G.resourceId};let J=X.serialize();if(J.memoryInfo?.threadId)return{threadId:J.memoryInfo.threadId,resourceId:J.memoryInfo.resourceId};if(this.scope==="thread")throw Error("ObservationalMemory (scope: 'thread') requires a threadId, but none was found in RequestContext or MessageList. Ensure the agent is configured with Memory and a valid threadId is provided.");return null}async persistMessages(Y,X,G){let J=[];for(let Q of Y)if(!!Q.content?.metadata?.mastra?.sealed){if(rp(Q)!==-1)J.push(Q)}else J.push(Q);if(J.length>0)await this.messageHistory.persistMessages({messages:J,threadId:X,resourceId:G})}async loadMessagesFromStorage(Y,X,G){let J=G?new Date(G.getTime()+1):void 0,Q;if(this.scope==="resource"&&X)Q=await this.storage.listMessagesByResourceId({resourceId:X,perPage:!1,orderBy:{field:"createdAt",direction:"ASC"},filter:J?{dateRange:{start:J}}:void 0});else Q=await this.storage.listMessages({threadId:Y,perPage:!1,orderBy:{field:"createdAt",direction:"ASC"},filter:J?{dateRange:{start:J}}:void 0});return Q.messages.filter((W)=>W.role!=="system")}async formatUnobservedContextBlocks(Y,X){let G=[];for(let[J,Q]of Y){if(J===X)continue;if(Q.length===0)continue;let W=BX0(Q,{maxPartLength:500});if(W){let Z=await this.representThreadIDInContext(J);G.push(`<other-conversation id="${Z}">
${W}
</other-conversation>`)}}return G.join(`

`)}async representThreadIDInContext(Y){if(this.shouldObscureThreadIds)return(await this.hasher).h32ToString(Y);return Y}getMaxMessageTimestamp(Y){let X=0;for(let G of Y)if(G.createdAt){let J=new Date(G.createdAt).getTime();if(J>X)X=J}return X>0?new Date(X):new Date}async wrapWithThreadTag(Y,X,G){let J=HE4(X),Q=this.retrieval&&G?TV(J,G):J;return`<thread id="${await this.representThreadIDInContext(Y)}">
${Q}
</thread>`}replaceOrAppendThreadSection(Y,X,G,J){if(!Y)return G;let Q=G.match(/<thread id="([^"]+)">/),W=G.match(/Date:\s*([A-Za-z]+\s+\d+,\s+\d+)/);if(!Q||!W)return`${Y}${$.createMessageBoundary(J)}${G}`;let Z=Q[1],K=W[1],H=`<thread id="${Z}">`,z="</thread>",V=Y.indexOf(H),A=null,F=-1,N=-1;if(V!==-1){let D=Y.indexOf(z,V);if(D!==-1){N=D+z.length,F=V;let L=Y.slice(V,N);if(L.includes(`Date: ${K}`)||L.includes(`Date:${K}`))A=L}}if(A){let D=G.indexOf(`
`,G.indexOf("Date:")),L=G.lastIndexOf(z);if(D!==-1&&L!==-1){let B=G.slice(D+1,L).trim();if(B){let E=`${A.slice(0,A.length-z.length).trimEnd()}
${B}
${z}`;return Y.slice(0,F)+E+Y.slice(N)}}}return`${Y}${$.createMessageBoundary(J)}${G}`}wrapObservations(Y,X,G,J,Q){if(this.scope==="resource")return(async()=>{let Z=await this.wrapWithThreadTag(G,Y,Q);return this.replaceOrAppendThreadSection(X,G,Z,J??new Date)})();let W=this.retrieval&&Q?TV(Y,Q):Y;return X?`${X}

${W}`:W}async startAsyncBufferedObservation(Y,X,G,J,Q,W,Z,K){let H=this.buffering.getObservationBufferKey(J),z=W??await this.tokenCounter.countMessagesAsync(G)+(Y.pendingMessageTokens??0);$5.lastBufferedBoundary.set(H,z),np(Y.id,"bufferingObservation"),this.storage.setBufferingObservationFlag(Y.id,!0,z).catch((A)=>{lW("[OM] Failed to set buffering observation flag",A)});let V=this.runAsyncBufferedObservation(Y,X,G,H,Q,Z,K).finally(()=>{$5.asyncBufferingOps.delete(H),BC(Y.id,"bufferingObservation"),this.storage.setBufferingObservationFlag(Y.id,!1).catch((A)=>{lW("[OM] Failed to clear buffering observation flag",A)})});$5.asyncBufferingOps.set(H,V)}async runAsyncBufferedObservation(Y,X,G,J,Q,W,Z){let K=$5.asyncBufferingOps.get(J);if(K)try{await K}catch{}let H=await this.storage.getObservationalMemory(Y.threadId,Y.resourceId);if(!H)return;let z=$5.lastBufferedAtTime.get(J)??H.lastBufferedAtTime??null;if(H.lastObservedAt){let w=new Date(H.lastObservedAt);if(!z||w>z)z=w}let V=this.getUnobservedMessages(G,H,{excludeBuffered:!0}),A=V.length;if(z)V=V.filter((w)=>{if(!w.createdAt)return!0;return new Date(w.createdAt)>z});S4(`[OM:bufferCursor] cursor=${z?.toISOString()??"null"}, unobserved=${G.length}, afterExcludeBuffered=${A}, afterCursorFilter=${V.length}`);let N=(this.observationConfig.bufferTokens??5000)/2;if(await this.tokenCounter.countMessagesAsync(V)<N)return;let L=V;this.sealMessagesForBuffering(L),await this.messageHistory.persistMessages({messages:L,threadId:X,resourceId:H.resourceId??void 0});let B=`buffer-obs-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,O=new Date().toISOString(),E=await this.tokenCounter.countMessagesAsync(L),M=gd0({cycleId:B,operationType:"observation",tokensToBuffer:E,recordId:H.id,threadId:X,threadIds:[X],config:this.getObservationMarkerConfig()});if(await this.persistMarkerToStorage(M,X,H.resourceId??void 0),Q)Q.custom({...M,transient:!0}).catch(()=>{});S4(`[OM:bufferInput] cycleId=${B}, msgCount=${L.length}, msgTokens=${E}, ids=${L.map((w)=>`${w.id?.slice(0,8)}@${w.createdAt?new Date(w.createdAt).toISOString():"none"}`).join(",")}`),await hM.create(this,{record:H,threadId:X,resourceId:H.resourceId??void 0,messages:L,cycleId:B,startedAt:O,writer:Q,requestContext:W,observabilityContext:Z}).run();let R=this.getMaxMessageTimestamp(L),q=new Date(R.getTime()+1);$5.lastBufferedAtTime.set(J,q)}async triggerAsyncBuffering(Y){if(!this.buffering.isAsyncObservationEnabled())return!1;let X=this.buffering.getLockKey(Y.threadId,Y.resourceId),G=this.buffering.shouldTriggerAsyncObservation(Y.pendingTokens,X,Y.record,this.storage,Y.threshold);if(G)this.startAsyncBufferedObservation(Y.record,Y.threadId,Y.unobservedMessages,X,Y.writer,Y.unbufferedPendingTokens,Y.requestContext);return G}isMessageList(Y){return!!Y&&typeof Y==="object"&&"get"in Y&&"removeByIds"in Y}removeIdsFromArray(Y,X){if(X.length===0)return;let G=new Set(X);for(let J=Y.length-1;J>=0;J--){let Q=Y[J];if(Q?.id&&G.has(Q.id))Y.splice(J,1)}}async getObservedMessageIdsForCleanup(Y){let{threadId:X,resourceId:G,messages:J,observedMessageIds:Q,retentionFloor:W}=Y,Z=await this.getOrCreateRecord(X,G),K=Q&&Q.length>0?Q:Array.isArray(Z.observedMessageIds)?Z.observedMessageIds:[];if(K.length===0)return[];let H=new Set(K),z=new Set,V=[],A=0,F=!1,N=typeof W==="number"?new AX0:null;for(let D of J){if(!D?.id||D.id==="om-continuation"||!H.has(D.id))continue;let L=GX0(D),B=D.content?.parts?.length??0;if(L.length>0&&L.length<B){D.content.parts=L;continue}if(N&&typeof W==="number"){let O=J.filter((M)=>M?.id&&M.id!=="om-continuation"&&!z.has(M.id)&&M.id!==D.id);if(N.countMessages(O)<W){A+=1,F=!0;break}}z.add(D.id),V.push(D.id)}if(N&&typeof W==="number"&&z.size>0){let D=J.filter((B)=>B?.id&&B.id!=="om-continuation"&&!z.has(B.id)),L=N.countMessages(D);while(L<W&&V.length>0){let B=V.pop();z.delete(B),A+=1,F=!0,D=J.filter((O)=>O?.id&&O.id!=="om-continuation"&&!z.has(O.id)),L=N.countMessages(D)}}return S4(`[OM:cleanupActivation] matched=${z.size}, skipped=${A}, backoffTriggered=${F}`),[...z]}async cleanupMessages(Y){let{threadId:X,resourceId:G,observedMessageIds:J,retentionFloor:Q}=Y,W=this.isMessageList(Y.messages)?Y.messages:void 0,Z=W?W.get.all.db():Y.messages,K=-1,H=null;for(let z=Z.length-1;z>=0;z--){let V=Z[z];if(!V)continue;if(rp(V)!==-1){K=z,H=V;break}}if(S4(`[OM:cleanupBranch] allMsgs=${Z.length}, markerFound=${K!==-1}, markerIdx=${K}, observedMessageIds=${J?.length??"undefined"}`),J&&J.length>0){let z=await this.getObservedMessageIdsForCleanup({threadId:X,resourceId:G,messages:Z,observedMessageIds:J,retentionFloor:Q});if(W){if(z.length>0)W.removeByIds(z);return W.get.all.db()}return this.removeIdsFromArray(Z,z),Z}if(H&&K!==-1){let z=[],V=[];for(let F=0;F<K;F++){let N=Z[F];if(N?.id&&N.id!=="om-continuation")z.push(N.id),V.push(N)}V.push(H);let A=GX0(H);if(A.length===0){if(H.id)z.push(H.id)}else if(A.length<(H.content?.parts?.length??0))H.content.parts=A;if(W){if(z.length>0)W.removeByIds(z);if(V.length>0)await this.persistMessages(V,X,G);return S4(`[OM:cleanupMarker] removed ${z.length} messages, saved ${V.length}`),W.get.all.db()}return this.removeIdsFromArray(Z,z),Z}return W?W.get.all.db():Z}async cleanupObservedContext(Y){let{messageList:X,threadId:G,resourceId:J,observedMessageIds:Q,retentionFloor:W}=Y;await this.cleanupMessages({threadId:G,resourceId:J,messages:X,observedMessageIds:Q,retentionFloor:W})}async resetBufferingState(Y){let{threadId:X,resourceId:G,recordId:J,activatedMessageIds:Q}=Y,W=this.buffering.getLockKey(X,G),Z=this.buffering.getObservationBufferKey(W);if($5.lastBufferedBoundary.set(Z,0),await this.storage.setBufferingObservationFlag(J,!1,0).catch(()=>{}),Q&&Q.length>0)this.buffering.cleanupStaticMaps(X,G,Q)}async buildContextSystemMessage(Y){return(await this.buildContextSystemMessages(Y))?.join(`

`)}async buildContextSystemMessages(Y){let{threadId:X,resourceId:G,unobservedContextBlocks:J}=Y,Q=Y.record??await this.getOrCreateRecord(X,G);if(!Q.activeObservations)return;let W=await this.storage.getThreadById({threadId:X}),Z=uE(W?.metadata),K=Z?.currentTask,H=Z?.suggestedResponse,z=Y.currentDate??new Date;return this.formatObservationsForContext(Q.activeObservations,K,H,J,z,this.retrieval)}async getOtherThreadsContext(Y,X){let{threads:G}=await this.storage.listThreads({filter:{resourceId:Y}}),J=new Map,W=(await this.getRecord(X,Y))?.lastObservedAt;for(let K of G){if(K.id===X)continue;let z=uE(K.metadata)?.lastObservedAt??W,V=z?new Date(new Date(z).getTime()+1):void 0,F=(await this.storage.listMessages({threadId:K.id,perPage:!1,orderBy:{field:"createdAt",direction:"ASC"},filter:V?{dateRange:{start:V}}:void 0})).messages.filter((N)=>!this.observedMessageIds.has(N.id));if(F.length>0)J.set(K.id,F)}if(J.size===0)return;return await this.formatUnobservedContextBlocks(J,X)||void 0}async emitProgress(Y){let{record:X,pendingTokens:G,threshold:J,effectiveObservationTokensThreshold:Q,currentObservationTokens:W,writer:Z,stepNumber:K,threadId:H,resourceId:z}=Y;if(this.emitDebugEvent({type:"step_progress",timestamp:new Date,threadId:H,resourceId:z??"",stepNumber:K,finishReason:"unknown",pendingTokens:G,threshold:J,thresholdPercent:Math.round(G/J*100),willSave:G>=J,willObserve:G>=J}),Z){let V=yM(X),A=V.reduce((E,M)=>E+(M.tokenCount??0),0),F=V.reduce((E,M)=>E+(M.messageTokens??0),0),N=Math.min(F,G),D=ON9(V,this.observationConfig.bufferActivation??1,a$(this.getEffectiveMessageTokens(X)),G),L="idle";if(X.isBufferingObservation)L="running";else if(V.length>0)L="complete";let B="idle";if(X.isBufferingReflection)B="running";else if(X.bufferedReflection&&X.bufferedReflection.length>0)B="complete";let O={type:"data-om-status",data:{windows:{active:{messages:{tokens:G,threshold:J},observations:{tokens:W,threshold:Q}},buffered:{observations:{chunks:V.length,messageTokens:N,projectedMessageRemoval:D,observationTokens:A,status:L},reflection:{inputObservationTokens:X.bufferedReflectionInputTokens??0,observationTokens:X.bufferedReflectionTokens??0,status:B}}},recordId:X.id,threadId:H,stepNumber:K,generationCount:X.generationCount}};S4(`[OM:status] step=${K} msgs=${G}/${J} obs=${W}/${Q} gen=${X.generationCount}`),await Z.custom(O).catch(()=>{})}}async getStatus(Y){let{threadId:X,resourceId:G}=Y,J=await this.getOrCreateRecord(X,G),Q=J.observationTokenCount??0,W;if(Y.messages)W=this.getUnobservedMessages(Y.messages,J);else{let P=await this.loadMessagesFromStorage(X,G,J.lastObservedAt?new Date(J.lastObservedAt):void 0);W=this.getUnobservedMessages(P,J)}let Z=await this.tokenCounter.countMessagesAsync(W),K=0;if(this.scope==="resource"&&G){let P=await this.getOtherThreadsContext(G,X);K=P?this.tokenCounter.countString(P):0}let H=Math.max(0,Z+K),z=mO4(this.getEffectiveMessageTokens(J),Q),V=yM(J),A=V.length,F=V.reduce((P,_)=>P+(_.messageTokens??0),0),N=this.buffering.isAsyncObservationEnabled(),D=!1;if(N&&H<z){let P=this.buffering.getLockKey(X,G);D=this.buffering.shouldTriggerAsyncObservation(H,P,J,this.storage,z)}let L=H>=z,B=a$(this.getEffectiveReflectionTokens(J)),O=Q>=B,E=A>0,M=this.getEffectiveMessageTokens(J),R=typeof M!=="number",q=R?M.max:0,w=R?Math.max(q-z,1000):B,I=Math.max(0,H-F);return{record:J,pendingTokens:H,threshold:z,effectiveObservationTokensThreshold:w,unbufferedPendingTokens:I,shouldObserve:L,shouldBuffer:D,shouldReflect:O,bufferedChunkCount:A,bufferedChunkTokens:F,canActivate:E,asyncObservationEnabled:N,asyncReflectionEnabled:this.buffering.isAsyncReflectionEnabled(),scope:this.scope}}async finalize(Y){let{threadId:X,resourceId:G,messages:J}=Y,Q=!1,W=!1,Z=!1;if(await $5.awaitBuffering(X,G??null,this.scope),(await this.getStatus({threadId:X,resourceId:G,messages:J})).canActivate)Q=(await this.activate({threadId:X,resourceId:G,messages:J})).activated;if((await this.getStatus({threadId:X,resourceId:G,messages:J})).shouldObserve)W=(await this.observe({threadId:X,resourceId:G,messages:J})).observed;if((await this.getStatus({threadId:X,resourceId:G})).shouldReflect)Z=(await this.reflect(X,G)).reflected;let V=await this.getOrCreateRecord(X,G);return{activated:Q,observed:W,reflected:Z,record:V}}async pruneObserved(Y){let{threadId:X,resourceId:G,messages:J}=Y,Q=await this.getOrCreateRecord(X,G);return this.getUnobservedMessages(J,Q)}async loadUnobservedMessages(Y){let{threadId:X,resourceId:G}=Y,J=await this.getOrCreateRecord(X,G),Q=await this.loadMessagesFromStorage(X,G,J.lastObservedAt?new Date(J.lastObservedAt):void 0);return this.getUnobservedMessages(Q,J)}async buffer(Y){let{threadId:X,resourceId:G,requestContext:J,observabilityContext:Q}=Y,W=Y.record??await this.getOrCreateRecord(X,G);if(!this.buffering.isAsyncObservationEnabled())return{buffered:!1,record:W};if(W.isBufferingObservation&&JX0(W.id,"bufferingObservation"))return{buffered:!1,record:W};let Z=Y.pendingTokens??W.pendingMessageTokens??0,K=this.buffering.getLockKey(X,G),H=this.buffering.getObservationBufferKey(K);if($5.lastBufferedBoundary.set(H,Z),W.isBufferingObservation)await this.storage.setBufferingObservationFlag(W.id,!1).catch(()=>{});let z=$5.asyncBufferingOps.get(H);if(z)try{await z}catch{}np(W.id,"bufferingObservation"),this.storage.setBufferingObservationFlag(W.id,!0,Z).catch((N)=>{lW("[OM] Failed to set buffering observation flag",N)});let V,A=new Promise((N)=>{V=N});$5.asyncBufferingOps.set(H,A),W=await this.storage.getObservationalMemory(W.threadId,W.resourceId)??W;let F=!1;try{let N;if(Y.messages)N=this.getUnobservedMessages(Y.messages,W,{excludeBuffered:!0});else{let P=await this.loadMessagesFromStorage(X,G,W.lastObservedAt?new Date(W.lastObservedAt):void 0);N=this.getUnobservedMessages(P,W,{excludeBuffered:!0})}if(!Y.messages){let P=$5.lastBufferedAtTime.get(H)??W.lastBufferedAtTime??null;if(W.lastObservedAt){let _=new Date(W.lastObservedAt);if(!P||_>P)P=_}if(P)N=N.filter((_)=>{if(!_.createdAt)return!0;return new Date(_.createdAt)>P})}let L=(this.observationConfig.bufferTokens??5000)/2,B=await this.tokenCounter.countMessagesAsync(N);if(B<L||N.length===0)return{buffered:!1,record:W};if(Y.beforeBuffer)await Y.beforeBuffer(N);else if(Y.messages)this.sealMessagesForBuffering(N);let O=`buffer-obs-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,E=new Date().toISOString(),M=gd0({cycleId:O,operationType:"observation",tokensToBuffer:B,recordId:W.id,threadId:X,threadIds:[X],config:this.getObservationMarkerConfig()});await this.persistMarkerToStorage(M,X,W.resourceId??void 0);let R=Y.writer;if(R)R.custom({...M,transient:!0}).catch(()=>{});if(await hM.create(this,{record:W,threadId:X,resourceId:W.resourceId??void 0,messages:N,cycleId:O,startedAt:E,writer:R,requestContext:J,observabilityContext:Q}).run(),OX0())IL9({threadId:X,resourceId:W.resourceId??void 0,label:`buffer-${O}`,observerExchange:this.observer.lastExchange,details:{cycleId:O,startedAt:E,buffered:!0,candidateMessageIds:N.map((P)=>P.id),candidateMessageCount:N.length,pendingTokens:Z,newTokens:B}});await this.storage.setBufferingObservationFlag(W.id,!1,B).catch(()=>{}),F=!0,$5.lastBufferedBoundary.set(H,B);let q=this.getMaxMessageTimestamp(N),w=new Date(q.getTime()+1);return $5.lastBufferedAtTime.set(H,w),{buffered:!0,record:await this.getOrCreateRecord(X,G)}}catch(N){return lW("[OM] buffer() failed",N),{buffered:!1,record:W}}finally{if(BC(W.id,"bufferingObservation"),$5.asyncBufferingOps.delete(H),V(),!F)await this.storage.setBufferingObservationFlag(W.id,!1).catch(()=>{})}}async activate(Y){let{threadId:X,resourceId:G}=Y,J=await this.getOrCreateRecord(X,G);if(this.buffering.isAsyncObservationEnabled()){let w=this.buffering.getLockKey(X,G),I=this.buffering.getObservationBufferKey(w),P=J.lastBufferedAtTokens??0;if(P>0&&Y.messages){let _=this.getUnobservedMessages(Y.messages,J),C=this.tokenCounter.countMessages(_);if(C<P*0.5)S4(`[OM:activate] resetting stale lastBufferedBoundary: dbBoundary=${P}, currentContextTokens=${C}`),$5.lastBufferedBoundary.set(I,0),await this.storage.setBufferingObservationFlag(J.id,!1,0).catch(()=>{})}}if(!yM(J).length)return{activated:!1,record:J};let W="threshold",Z,K,H,z;if(Y.checkThreshold){let w=Y.messages??await this.loadMessagesFromStorage(X,G,J.lastObservedAt?new Date(J.lastObservedAt):void 0),I=this.observationConfig.activateAfterIdle,P=od0(w),_=I!==void 0&&P!==void 0?Date.now()-P:void 0,C=_!==void 0&&I!==void 0&&_>=I,k=AB9(Y.currentModel),S=VB9(w);if(this.observationConfig.activateOnProviderChange===!0&&JE4(k,S))W="provider_change",H=S,z=k;else if(C)W="ttl",Z=P,K=_;else{let v=await this.getStatus({threadId:X,resourceId:G,messages:w});if(v.pendingTokens<v.threshold)return{activated:!1,record:J}}}if(J.isBufferingObservation){let w=this.buffering.getLockKey(X,G),I=this.buffering.getObservationBufferKey(w),P=$5.asyncBufferingOps.get(I);if(P)try{await Promise.race([P,new Promise((_,C)=>setTimeout(()=>C(Error("Timeout")),60000))])}catch{}}let V=await this.storage.getObservationalMemory(J.threadId,J.resourceId);if(!V)return{activated:!1,record:J};let A=yM(V);if(!A.length)return{activated:!1,record:J};let F=a$(this.getEffectiveMessageTokens(V)),N=this.observationConfig.bufferActivation??0.7,D=BN9(N,F),L=A.reduce((w,I)=>w+(I.messageTokens??0),0),B=V.pendingMessageTokens||L,O=!!(this.observationConfig.blockAfter&&B>=this.observationConfig.blockAfter),E=await this.storage.swapBufferedToActive({id:V.id,activationRatio:D,messageTokensThreshold:F,currentPendingTokens:B,forceMaxActivation:O,bufferedChunks:A});await this.storage.setBufferingObservationFlag(V.id,!1).catch(()=>{}),BC(V.id,"bufferingObservation");let M=await this.storage.getObservationalMemory(J.threadId,J.resourceId);if(Y.writer&&M&&E.activatedCycleIds.length>0){let w=new Map(E.perChunk?.map((I)=>[I.cycleId,I]));for(let I of E.activatedCycleIds){let P=w.get(I),_=UE4({cycleId:I,operationType:"observation",chunksActivated:1,tokensActivated:P?.messageTokens??E.messageTokensActivated,observationTokens:P?.observationTokens??E.observationTokensActivated,messagesActivated:P?.messageCount??E.messagesActivated,recordId:M.id,threadId:M.threadId??J.threadId??"",generationCount:M.generationCount??0,observations:P?.observations??E.observations,triggeredBy:W,lastActivityAt:Z,ttlExpiredMs:K,previousModel:H,currentModel:z,config:this.getObservationMarkerConfig()});Y.writer.custom({..._,transient:!0}).catch(()=>{}),await this.persistMarkerToMessage(_,Y.messageList,J.threadId??"",J.resourceId??void 0)}}let R=await this.storage.getThreadById({threadId:X});if(R){let w=A.filter((P)=>E.activatedCycleIds.includes(P.cycleId)),I=w[w.length-1];if(I){let P=I.threadTitle,_=mj(R.metadata,{suggestedResponse:I.suggestedContinuation,currentTask:I.currentTask,threadTitle:P}),C=R.title?.trim(),k=P?.trim(),S=!!k&&k.length>=3&&k!==C;await this.storage.updateThread({id:X,title:S?k:R.title??"",metadata:_})}}return{activated:!0,record:await this.getOrCreateRecord(X,G),activatedMessageIds:E.activatedMessageIds}}async observe(Y){let{threadId:X,resourceId:G,messages:J,hooks:Q,requestContext:W}=Y,Z=this.buffering.getLockKey(X,G),K=Q?{onReflectionStart:Q.onReflectionStart,onReflectionEnd:Q.onReflectionEnd}:void 0,H=!1,z,V=-1;await this.withLock(Z,async()=>{let N=await this.getOrCreateRecord(X,G);V=N.generationCount;let D=J?this.getUnobservedMessages(J,N):await this.loadMessagesFromStorage(X,G,N.lastObservedAt?new Date(N.lastObservedAt):void 0);if(!this.meetsObservationThreshold({record:N,unobservedTokens:await this.tokenCounter.countMessagesAsync(D)}))return;Q?.onObservationStart?.();let L;try{let B=await hM.create(this,{record:N,threadId:X,resourceId:G,messages:D,reflectionHooks:K,requestContext:W,writer:Y.writer,observabilityContext:Y.observabilityContext}).run();H=B.observed,z=B.usage}catch(B){throw L=B instanceof Error?B:Error(String(B)),B}finally{Q?.onObservationEnd?.({usage:z,error:L})}});let A=await this.getOrCreateRecord(X,G),F=A.generationCount>V&&V>=0;return{observed:H,reflected:F,record:A}}async reflect(Y,X,G,J,Q){let W=await this.getOrCreateRecord(Y,X);if(!W.activeObservations)return{reflected:!1,record:W,usage:void 0};await this.storage.setReflectingFlag(W.id,!0),np(W.id,"reflecting");try{let Z=a$(this.getEffectiveReflectionTokens(W)),K=await this.reflector.call(W.activeObservations,G,void 0,Z,void 0,void 0,void 0,J,Q,void 0),H=this.tokenCounter.countObservations(K.observations);return await this.storage.createReflectionGeneration({currentRecord:W,reflection:K.observations,tokenCount:H}),{reflected:!0,record:await this.getOrCreateRecord(Y,X),usage:K.usage}}catch(Z){return lW("[OM] reflect() failed",Z),{reflected:!1,record:await this.getOrCreateRecord(Y,X),usage:void 0}}finally{await this.storage.setReflectingFlag(W.id,!1),BC(W.id,"reflecting")}}async getObservations(Y,X){let G=this.getStorageIds(Y,X);return(await this.storage.getObservationalMemory(G.threadId,G.resourceId))?.activeObservations}async getRecord(Y,X){let G=this.getStorageIds(Y,X);return this.storage.getObservationalMemory(G.threadId,G.resourceId)}async updateRecordConfig(Y,X,G){let J=this.getStorageIds(Y,X),Q=await this.storage.getObservationalMemory(J.threadId,J.resourceId);if(!Q)throw Error(`No observational memory record found for thread ${J.threadId}`);await this.storage.updateObservationalMemoryConfig({id:Q.id,config:{_overrides:G}})}async getHistory(Y,X,G,J){let Q=this.getStorageIds(Y,X);return this.storage.getObservationalMemoryHistory(Q.threadId,Q.resourceId,G,J)}async clear(Y,X){let G=this.getStorageIds(Y,X);await this.storage.clearObservationalMemory(G.threadId,G.resourceId),this.buffering.cleanupStaticMaps(G.threadId??G.resourceId,G.resourceId)}getStorage(){return this.storage}getTokenCounter(){return this.tokenCounter}getObservationConfig(){return this.observationConfig}getReflectionConfig(){return this.reflectionConfig}getMessageHistory(){return this.messageHistory}getObscureThreadIds(){return this.shouldObscureThreadIds}beginTurn(Y){return new PN9({om:this,threadId:Y.threadId,resourceId:Y.resourceId,messageList:Y.messageList,observabilityContext:Y.observabilityContext,hooks:Y.hooks})}},FX0="temporal-gap",YE4="__isGatewayModel",mE4=class{id="observational-memory";name="Observational Memory";engine;memory;temporalMarkers;turn;constructor($,Y,X){this.engine=$,this.memory=Y,this.temporalMarkers=X?.temporalMarkers??!1}async processInputStep($){let{messageList:Y,requestContext:X,stepNumber:G,state:J,writer:Q,model:W,abortSignal:Z,abort:K,rotateResponseMessageId:H}=$,z=J??{};S4(`[OM:processInputStep:ENTER] step=${G}, hasMastraMemory=${!!X?.get("MastraMemory")}, hasMemoryInfo=${!!Y?.serialize()?.memoryInfo?.threadId}`);let V=this.engine.getThreadContext(X,Y);if(!V)return S4("[OM:processInputStep:NO-CONTEXT] getThreadContext returned null \u2014 returning early"),Y;if(LB9(W))return z[YE4]=!0,S4("[OM:processInputStep:GATEWAY] gateway handles OM \u2014 skipping local processing"),Y;let{threadId:A,resourceId:F}=V,D=rU(X)?.memoryConfig?.readOnly,L=W?.modelId?{provider:W.provider,modelId:W.modelId}:void 0;return z.__omActorModelContext=L,this.engine.getTokenCounter().runWithModelContext(L,async()=>{let B=OX0(),O=B?OC(await this.engine.getOrCreateRecord(A,F)):null,E=B?OC(Y.get.all.db()):null,M=B?OC(Y.serialize()):null;if(D){let w=await AE4({memory:this.memory,messageList:Y,threadId:A,resourceId:F}),I=w.hasObservations&&w.omRecord?await this.engine.buildContextSystemMessages({threadId:A,resourceId:F,record:w.omRecord,unobservedContextBlocks:w.otherThreadsContext}):void 0;return XE4({messageList:Y,systemMessages:I,continuationMessage:w.continuationMessage,threadId:A,resourceId:F}),Y}let R=z.__omTurn??this.turn;if(R&&R.messageList!==Y){if(await R.end().catch(()=>{}),this.turn===R)this.turn=void 0;z.__omTurn=void 0}if(!this.turn||!z.__omTurn){if(this.turn&&!z.__omTurn)await this.turn.end().catch(()=>{});if(this.turn=this.engine.beginTurn({threadId:A,resourceId:F,messageList:Y,observabilityContext:hd0($),hooks:{onBufferChunkSealed:H,onSyncObservationComplete:H}}),this.turn.writer=Q,this.turn.requestContext=X,await this.turn.start(this.memory),G===0&&this.temporalMarkers)await NB9({messageList:Y,writer:Q});z.__omTurn=this.turn}this.turn.addHooks({onBufferChunkSealed:H,onSyncObservationComplete:H});let q=hd0($);z.__omObservabilityContext=q,this.turn.observabilityContext=q,this.turn.actorModelContext=L;{let w=this.turn.step(G),I;try{I=await w.prepare()}catch(x){let y=x instanceof Error?x:Error(String(x)),d=Z?.aborted?"Agent execution was aborted":`Encountered error during memory observation: ${y.message}`;if(typeof K==="function")K(d);throw y}XE4({messageList:Y,systemMessages:I.systemMessage,continuationMessage:this.turn.context.continuation,threadId:A,resourceId:F});let P=await this.engine.getOrCreateRecord(A,F);await this.engine.emitProgress({record:P,stepNumber:G,pendingTokens:I.status.pendingTokens,threshold:I.status.threshold,effectiveObservationTokensThreshold:I.status.effectiveObservationTokensThreshold,currentObservationTokens:P.observationTokenCount??0,writer:Q,threadId:A,resourceId:F});let _=Y.get.all.db(),C=this.engine.getTokenCounter(),k=await C.countMessagesAsync(_),S=this.turn.context.otherThreadsContext,T=S?C.countString(S):0,v=k+T;if(await this.engine.getStorage().setPendingMessageTokens(P.id,v).catch(()=>{}),B)PL9({threadId:A,resourceId:F,stepNumber:G,args:$,preRecord:O,postRecord:OC(P),preMessages:E,preBufferedChunks:[],preContextTokenCount:0,preSerializedMessageList:M,postBufferedChunks:[],postContextTokenCount:v,messageList:Y,details:{},observerExchange:I.observerExchange})}return Y})}async processOutputResult($){let{messageList:Y,requestContext:X,state:G}=$,J=G??{};if(!this.engine.getThreadContext(X,Y))return Y;if(J[YE4])return Y;let W=hd0($);return J.__omObservabilityContext=W,this.engine.getTokenCounter().runWithModelContext(J.__omActorModelContext,async()=>{if(rU(X)?.memoryConfig?.readOnly)return Y;let K=J.__omTurn??this.turn;if(K)await K.end(),this.turn=void 0,J.__omTurn=void 0;return Y})}get config(){return this.engine.config}async waitForBuffering($,Y,X){return this.engine.waitForBuffering($,Y,X)}async getResolvedConfig($){return this.engine.getResolvedConfig($)}},BB9;var EX0=V0(()=>{ZY0();Fp0();vD4();Dp0();xD4();E50();g40();gu();Np0();aD4();fd0=process.env.OM_DEBUG?VH(process.cwd(),"om-debug.log"):null;S4(`[OM:process-start] OM module loaded, pid=${process.pid}`);if(fd0){let $=console.error;console.error=(...Y)=>{S4(`[console.error] ${Y.map((X)=>{if(X instanceof Error)return X.stack??X.message;if(typeof X==="object"&&X!==null)try{return JSON.stringify(X)}catch{return String(X)}return String(X)}).join(" ")}`),$.apply(console,Y)}}EC=new Map;$5=class ${observationConfig;reflectionConfig;scope;static asyncBufferingOps=new Map;static lastBufferedBoundary=new Map;static lastBufferedAtTime=new Map;static reflectionBufferCycleIds=new Map;constructor(Y){this.observationConfig=Y.observationConfig,this.reflectionConfig=Y.reflectionConfig,this.scope=Y.scope}getLockKey(Y,X){if(this.scope==="resource"&&X)return`resource:${X}`;return`thread:${Y??"unknown"}`}isAsyncObservationEnabled(){return this.observationConfig.bufferTokens!==void 0&&this.observationConfig.bufferTokens>0}isAsyncReflectionEnabled(){return this.reflectionConfig.bufferActivation!==void 0&&this.reflectionConfig.bufferActivation>0}getObservationBufferKey(Y){return`obs:${Y}`}getReflectionBufferKey(Y){return`refl:${Y}`}isAsyncBufferingInProgress(Y){return $.asyncBufferingOps.has(Y)}cleanupStaticMaps(Y,X,G){let J=this.getLockKey(Y,X),Q=this.getObservationBufferKey(J),W=this.getReflectionBufferKey(J);if(G)$.lastBufferedBoundary.delete(Q),$.lastBufferedAtTime.delete(Q);else $.lastBufferedAtTime.delete(Q),$.lastBufferedBoundary.delete(Q),$.lastBufferedBoundary.delete(W),$.asyncBufferingOps.delete(Q),$.asyncBufferingOps.delete(W),$.reflectionBufferCycleIds.delete(W)}shouldTriggerAsyncObservation(Y,X,G,J,Q){if(!this.isAsyncObservationEnabled())return!1;if(G.isBufferingObservation){if(JX0(G.id,"bufferingObservation"))return!1;S4("[OM:shouldTriggerAsyncObs] isBufferingObservation=true but stale, clearing"),J?.setBufferingObservationFlag(G.id,!1)?.catch(()=>{})}let W=this.getObservationBufferKey(X);if(this.isAsyncBufferingInProgress(W))return!1;let Z=this.observationConfig.bufferTokens,K=G.lastBufferedAtTokens??0,H=$.lastBufferedBoundary.get(W)??0,z=Math.max(K,H),V=Q?Q-Z*1.1:1/0,A=Y>=V?Z/2:Z,F=Math.floor(Y/A),N=Math.floor(z/A),D=F>N;return S4(`[OM:shouldTriggerAsyncObs] tokens=${Y}, bufferTokens=${Z}, effectiveBufferTokens=${A}, rampPoint=${V}, currentInterval=${F}, lastInterval=${N}, lastBoundary=${z} (db=${K}, mem=${H}), shouldTrigger=${D}`),D}static async awaitBuffering(Y,X,G,J=30000){let Q=G==="resource"&&X?`resource:${X}`:`thread:${Y??"unknown"}`,W=`obs:${Q}`,Z=`refl:${Q}`,K=[],H=$.asyncBufferingOps.get(W);if(H)K.push(H);let z=$.asyncBufferingOps.get(Z);if(z)K.push(z);if(K.length===0)return;let V;try{await Promise.race([Promise.allSettled(K).then(()=>{return}),new Promise((A)=>{V=setTimeout(A,J)})])}finally{if(V!==void 0)clearTimeout(V)}}};Xc0=/<observation-group\s([^>]*)>([\s\S]*?)<\/observation-group>/g,zN9=/([\w][\w-]*)="([^"]*)"/g,gO4=/^##\s+Group\s+/m;EN9=wE(),MN9=class extends hM{startedAt=new Date().toISOString();lastMessage;cycleId;tokensToObserve=0;observerResult;constructor($,Y){super($,Y);this.lastMessage=Y.messages[Y.messages.length-1]}get needsLock(){return!0}get needsReflection(){return!0}get rethrowOnFailure(){return!0}async prepare(){let{record:$,threadId:Y,messages:X}=this.opts;this.deps.emitDebugEvent({type:"observation_triggered",timestamp:new Date,threadId:Y,resourceId:$.resourceId??"",previousObservations:$.activeObservations,messages:X.map((W)=>({role:W.role,content:typeof W.content==="string"?W.content:JSON.stringify(W.content)}))});let G=this.observationConfig.bufferActivation;if(G&&G<1&&X.length>=1){let W=X[X.length-1];if(W?.content?.parts?.length){if(!W.content.metadata)W.content.metadata={};let Z=W.content.metadata;if(!Z.mastra)Z.mastra={};Z.mastra.sealed=!0,S4(`[OM:sync-obs] sealed newest message (${W.role}, ${W.content.parts.length} parts) for ratio-aware observation`)}}this.tokensToObserve=await this.tokenCounter.countMessagesAsync(X);let Q=(await this.storage.getObservationalMemory($.threadId,$.resourceId))?.activeObservations??$.activeObservations??"";return{messages:X,existingObservations:Q}}async emitStartMarkers($){if(this.cycleId=$,this.lastMessage?.id){let Y=WX0({cycleId:$,operationType:"observation",tokensToObserve:this.tokensToObserve,recordId:this.opts.record.id,threadId:this.opts.threadId,threadIds:[this.opts.threadId],config:this.getObservationMarkerConfig()});await this.streamMarker(Y)}}async observe($,Y){let X=await this.storage.getThreadById({threadId:this.opts.threadId}),G=X?uE(X.metadata):void 0,J=await this.deps.observer.call($,Y,this.opts.abortSignal,{requestContext:this.opts.requestContext,observabilityContext:this.opts.observabilityContext,priorCurrentTask:G?.currentTask,priorSuggestedResponse:G?.suggestedResponse,priorThreadTitle:G?.threadTitle});return this.observerResult=J,J}async process($,Y){let{record:X,threadId:G,messages:J}=this.opts,Q=this.getMaxMessageTimestamp(J),W=this.retrieval?Nc0(J):void 0,Z=await this.wrapObservations($.observations,Y,G,Q,W),K=this.tokenCounter.countObservations(Z),H=this.tokenCounter.countObservations($.observations),z=J.map((F)=>F.id),V=X.observedMessageIds??[],A=[...new Set([...Array.isArray(V)?V:[],...z])];return this.deps.emitDebugEvent({type:"observation_complete",timestamp:new Date,threadId:G,resourceId:X.resourceId??"",observations:Z,rawObserverOutput:$.observations,previousObservations:X.activeObservations,messages:J.map((F)=>({role:F.role,content:typeof F.content==="string"?F.content:JSON.stringify(F.content)})),usage:$.usage}),{observations:Z,observationTokens:K,cycleObservationTokens:H,observedMessageIds:A,lastObservedAt:Q,suggestedContinuation:$.suggestedContinuation,currentTask:$.currentTask,threadTitle:$.threadTitle}}async persist($){let{record:Y,threadId:X,resourceId:G,messages:J}=this.opts,Q=await this.storage.getThreadById({threadId:X}),W;if(Q){let Z=Q.title?.trim(),K=$.threadTitle?.trim(),H=!!K&&K.length>=3&&K!==Z,z=mj(Q.metadata,{suggestedResponse:$.suggestedContinuation,currentTask:$.currentTask,threadTitle:$.threadTitle,lastObservedMessageCursor:Yc0(J)});if(await this.storage.updateThread({id:X,title:H?K:Q.title??"",metadata:z}),H)W=$c0({cycleId:this.cycleId??crypto.randomUUID(),threadId:X,oldTitle:Z,newTitle:K})}if(W)await this.streamMarker(W);await this.storage.updateActiveObservations({id:Y.id,observations:$.observations,tokenCount:$.observationTokens,lastObservedAt:$.lastObservedAt,observedMessageIds:$.observedMessageIds}),await this.indexObservationGroups($.observations,X,G,$.lastObservedAt)}async emitEndMarkers($,Y){let X=await this.tokenCounter.countMessagesAsync(this.opts.messages);if(this.lastMessage?.id){let G=ed0({cycleId:$,operationType:"observation",startedAt:this.startedAt,tokensObserved:X,observationTokens:Y.cycleObservationTokens,observations:this.observerResult.observations,currentTask:this.observerResult.currentTask,suggestedResponse:this.observerResult.suggestedContinuation,recordId:this.opts.record.id,threadId:this.opts.threadId});await this.streamMarker(G)}}async emitFailedMarkers($,Y){if(this.lastMessage?.id){let X=ZX0({cycleId:$,operationType:"observation",startedAt:this.startedAt,tokensAttempted:this.tokensToObserve,error:Y instanceof Error?Y.message:String(Y),recordId:this.opts.record.id,threadId:this.opts.threadId});await this.streamMarker(X)}}},RN9=class extends hM{startedAt;cycleId;constructor($,Y){super($,Y);this.cycleId=Y.cycleId,this.startedAt=Y.startedAt??new Date().toISOString()}get needsLock(){return!1}get needsReflection(){return!1}get rethrowOnFailure(){return!1}generateCycleId(){return this.cycleId}async prepare(){let{record:$,messages:Y}=this.opts,G=yM($).map((Q)=>Q.observations).join(`

`),J=ZN9($.activeObservations,G)??"";return{messages:Y,existingObservations:J}}async emitStartMarkers($){}async observe($,Y){return this.deps.observer.call($,Y,void 0,{skipContinuationHints:!0,requestContext:this.opts.requestContext,observabilityContext:this.opts.observabilityContext})}async process($,Y){let{threadId:X,messages:G}=this.opts;if(!$.observations)return S4("[OM:asyncBuffer] empty observations returned, skipping buffer storage"),{observations:"",observationTokens:0,cycleObservationTokens:0,observedMessageIds:[],lastObservedAt:new Date};let J=this.retrieval?Nc0(G):void 0,Q;if(this.scope==="resource")Q=await this.wrapWithThreadTag(X,$.observations,J);else Q=this.retrieval&&J?TV($.observations,J):$.observations;let W=this.tokenCounter.countObservations(Q),Z=G.map((z)=>z.id),K=this.getMaxMessageTimestamp(G),H=new Date(K.getTime()+1);return{observations:Q,observationTokens:W,cycleObservationTokens:W,observedMessageIds:Z,lastObservedAt:H,suggestedContinuation:$.suggestedContinuation,currentTask:$.currentTask,threadTitle:$.threadTitle}}async persist($){if(!$.observations)return;let{record:Y,threadId:X,resourceId:G,messages:J}=this.opts,Q=await this.tokenCounter.countMessagesAsync(J);await this.storage.updateBufferedObservations({id:Y.id,chunk:{cycleId:this.cycleId,observations:$.observations,tokenCount:$.observationTokens,messageIds:$.observedMessageIds,messageTokens:Q,lastObservedAt:$.lastObservedAt,suggestedContinuation:$.suggestedContinuation,currentTask:$.currentTask,threadTitle:$.threadTitle},lastBufferedAtTime:$.lastObservedAt}),await this.indexObservationGroups($.observations,X,G,$.lastObservedAt);let W=$.threadTitle?.trim();if(W&&W.length>=3){let Z=await this.storage.getThreadById({threadId:X});if(Z){let K=Z.title?.trim();if(W!==K){let H=mj(Z.metadata,{threadTitle:$.threadTitle});await this.storage.updateThread({id:X,title:W,metadata:H});let z=$c0({cycleId:this.cycleId,threadId:X,oldTitle:K,newTitle:W});await this.streamMarker(z)}}}}async emitEndMarkers($,Y){if(!Y.observations)return;let{record:X,threadId:G,messages:J}=this.opts,Q=await this.tokenCounter.countMessagesAsync(J),W=await this.storage.getObservationalMemory(X.threadId,X.resourceId),K=yM(W).reduce((z,V)=>z+(V.tokenCount??0),0)||Y.observationTokens,H=ZE4({cycleId:this.cycleId,operationType:"observation",startedAt:this.startedAt,tokensBuffered:Q,bufferedTokens:K,recordId:X.id,threadId:G,observations:Y.observations});if(this.opts.writer)this.opts.writer.custom({...H,transient:!0}).catch(()=>{});await this.persistMarkerToStorage(H,G,X.resourceId??void 0)}async emitFailedMarkers($,Y){let{record:X,threadId:G,messages:J}=this.opts,Q=await this.tokenCounter.countMessagesAsync(J),W=KE4({cycleId:this.cycleId,operationType:"observation",startedAt:this.startedAt,tokensAttempted:Q,error:Y instanceof Error?Y.message:String(Y),recordId:X.id,threadId:G});if(this.opts.writer)this.opts.writer.custom({...W,transient:!0}).catch(()=>{});await this.persistMarkerToStorage(W,G,X.resourceId??void 0)}},qN9=class extends hM{startedAt=new Date().toISOString();cycleId;resourceId;threadsWithMessages=new Map;threadTokensToObserve=new Map;threadTokenCounts=new Map;threadOrder=[];messagesByThread=new Map;multiThreadResults=new Map;totalBatchUsage={inputTokens:0,outputTokens:0,totalTokens:0};observationResults=[];priorMetadataByThread=new Map;constructor($,Y){super($,Y);this.resourceId=Y.resourceId}get needsLock(){return!0}get needsReflection(){return!0}get rethrowOnFailure(){return!0}async prepare(){let{record:$,threadId:Y,messages:X}=this.opts,{threads:G}=await this.storage.listThreads({filter:{resourceId:this.resourceId}}),J=new Map;for(let F of G){let N=uE(F.metadata);if(J.set(F.id,{lastObservedAt:N?.lastObservedAt}),N?.currentTask||N?.suggestedResponse||N?.threadTitle)this.priorMetadataByThread.set(F.id,{currentTask:N.currentTask,suggestedResponse:N.suggestedResponse,threadTitle:N.threadTitle})}for(let F of G){let N=J.get(F.id)?.lastObservedAt,D=N?new Date(new Date(N).getTime()+1):void 0,B=(await this.storage.listMessages({threadId:F.id,perPage:!1,orderBy:{field:"createdAt",direction:"ASC"},filter:D?{dateRange:{start:D}}:void 0})).messages.filter((O)=>O.role!=="system");if(B.length>0)this.messagesByThread.set(F.id,B)}if(X.length>0){let F=this.messagesByThread.get(Y)??[],N=new Map;for(let D of F)if(D.id)N.set(D.id,D);for(let D of X)if(D.id)N.set(D.id,D);this.messagesByThread.set(Y,Array.from(N.values()))}for(let[F,N]of this.messagesByThread){let D=N.filter((L)=>!this.deps.observedMessageIds.has(L.id));if(D.length>0)this.messagesByThread.set(F,D);else this.messagesByThread.delete(F)}let Q=0;for(let F of this.messagesByThread.values())Q+=F.length;if(Q===0)return{messages:[],existingObservations:""};let W=a$(this.observationConfig.messageTokens);for(let[F,N]of this.messagesByThread){let D=await this.tokenCounter.countMessagesAsync(N);this.threadTokenCounts.set(F,D)}let Z=Array.from(this.messagesByThread.keys()).sort((F,N)=>{return(this.threadTokenCounts.get(N)??0)-(this.threadTokenCounts.get(F)??0)}),K=0,H=[];for(let F of Z){let N=this.threadTokenCounts.get(F)??0;if(K>=W)break;H.push(F),K+=N}if(H.length===0)return{messages:[],existingObservations:""};this.threadOrder=KN9(new Map(H.map((F)=>[F,this.messagesByThread.get(F)??[]])));for(let F of this.threadOrder){let N=this.messagesByThread.get(F);if(N&&N.length>0)this.threadsWithMessages.set(F,N)}this.deps.emitDebugEvent({type:"observation_triggered",timestamp:new Date,threadId:this.threadOrder.join(","),resourceId:this.resourceId,previousObservations:$.activeObservations,messages:Array.from(this.threadsWithMessages.values()).flat().map((F)=>({role:F.role,content:typeof F.content==="string"?F.content:JSON.stringify(F.content)}))});let V=(await this.storage.getObservationalMemory(null,this.resourceId))?.activeObservations??$.activeObservations??"";return{messages:Array.from(this.threadsWithMessages.values()).flat(),existingObservations:V}}async emitStartMarkers($){this.cycleId=$;let Y=Array.from(this.threadsWithMessages.keys());for(let[X,G]of this.threadsWithMessages){let J=G[G.length-1],Q=await this.tokenCounter.countMessagesAsync(G);if(this.threadTokensToObserve.set(X,Q),J?.id){let W=WX0({cycleId:$,operationType:"observation",tokensToObserve:Q,recordId:this.opts.record.id,threadId:X,threadIds:Y,config:this.getObservationMarkerConfig()});await this.streamMarker(W)}}}async observe($,Y){let X=this.observationConfig.maxTokensPerBatch??N9.observation.maxTokensPerBatch,G=this.threadOrder.filter((K)=>this.threadsWithMessages.has(K)),J=[],Q={threadIds:[],threadMap:new Map},W=0;for(let K of G){let H=this.threadsWithMessages.get(K),z=this.threadTokenCounts.get(K)??0;if(W+z>X&&Q.threadIds.length>0)J.push(Q),Q={threadIds:[],threadMap:new Map},W=0;Q.threadIds.push(K),Q.threadMap.set(K,H),W+=z}if(Q.threadIds.length>0)J.push(Q);let Z=await Promise.all(J.map(async(K)=>{return this.deps.observer.callMultiThread($,K.threadMap,K.threadIds,this.opts.abortSignal,this.opts.requestContext,this.priorMetadataByThread,this.opts.observabilityContext)}));for(let K of Z){for(let[H,z]of K.results)this.multiThreadResults.set(H,z);if(K.usage)this.totalBatchUsage.inputTokens+=K.usage.inputTokens??0,this.totalBatchUsage.outputTokens+=K.usage.outputTokens??0,this.totalBatchUsage.totalTokens+=K.usage.totalTokens??0}return{observations:"",usage:this.totalBatchUsage.totalTokens>0?this.totalBatchUsage:void 0}}async process($,Y){let{record:X}=this.opts;this.observationResults=[];for(let A of this.threadOrder){let F=this.messagesByThread.get(A)??[];if(F.length===0)continue;let N=this.multiThreadResults.get(A);if(!N)continue;this.observationResults.push({threadId:A,threadMessages:F,result:N})}let G=Y,J=0,Q=[];for(let A of this.observationResults){let{threadId:F,threadMessages:N,result:D}=A;J+=this.tokenCounter.countObservations(D.observations);let L=this.retrieval?Nc0(N):void 0,B=await this.wrapWithThreadTag(F,D.observations,L),O=this.getMaxMessageTimestamp(N);G=this.replaceOrAppendThreadSection(G,F,B,O),Q.push({threadId:F,lastObservedAt:O.toISOString(),suggestedResponse:D.suggestedContinuation,currentTask:D.currentTask,threadTitle:D.threadTitle,lastObservedMessageCursor:Yc0(N)});let E=this.observationResults.indexOf(A)===0;this.deps.emitDebugEvent({type:"observation_complete",timestamp:new Date,threadId:F,resourceId:this.resourceId,observations:B,rawObserverOutput:D.observations,previousObservations:X.activeObservations,messages:N.map((M)=>({role:M.role,content:typeof M.content==="string"?M.content:JSON.stringify(M.content)})),usage:E&&this.totalBatchUsage.totalTokens>0?this.totalBatchUsage:void 0})}let W=this.observationResults.flatMap((A)=>A.threadMessages),Z=this.getMaxMessageTimestamp(W),K=W.map((A)=>A.id),H=X.observedMessageIds??[],z=[...new Set([...H,...K])],V=this.tokenCounter.countObservations(G);return{observations:G,observationTokens:V,cycleObservationTokens:J,observedMessageIds:z,lastObservedAt:Z,threadMetadataUpdates:Q}}async persist($){let{record:Y,resourceId:X}=this.opts,G=[];if($.threadMetadataUpdates)for(let J of $.threadMetadataUpdates){let Q=await this.storage.getThreadById({threadId:J.threadId});if(Q){let W=Q.title?.trim(),Z=J.threadTitle?.trim(),K=!!Z&&Z.length>=3&&Z!==W,H=mj(Q.metadata,{lastObservedAt:J.lastObservedAt,suggestedResponse:J.suggestedResponse,currentTask:J.currentTask,threadTitle:J.threadTitle,lastObservedMessageCursor:J.lastObservedMessageCursor});if(await this.storage.updateThread({id:J.threadId,title:K?Z:Q.title??"",metadata:H}),K)G.push($c0({cycleId:this.cycleId??crypto.randomUUID(),threadId:J.threadId,oldTitle:W,newTitle:Z}))}}for(let J of G)await this.streamMarker(J);if(await this.storage.updateActiveObservations({id:Y.id,observations:$.observations,tokenCount:$.observationTokens,lastObservedAt:$.lastObservedAt,observedMessageIds:$.observedMessageIds}),X)await Promise.all(this.observationResults.map(({threadId:J,threadMessages:Q,result:W})=>this.indexObservationGroups(W.observations,J,X,this.getMaxMessageTimestamp(Q))))}async emitEndMarkers($,Y){for(let X of this.observationResults){let{threadId:G,threadMessages:J,result:Q}=X;if(J[J.length-1]?.id){let Z=this.threadTokensToObserve.get(G)??await this.tokenCounter.countMessagesAsync(J),K=ed0({cycleId:$,operationType:"observation",startedAt:this.startedAt,tokensObserved:Z,observationTokens:Y.cycleObservationTokens,observations:Q.observations,currentTask:Q.currentTask,suggestedResponse:Q.suggestedContinuation,recordId:this.opts.record.id,threadId:G});await this.streamMarker(K)}}}async emitFailedMarkers($,Y){for(let[X,G]of this.threadsWithMessages)if(G[G.length-1]?.id){let Q=this.threadTokensToObserve.get(X)??0,W=ZX0({cycleId:$,operationType:"observation",startedAt:this.startedAt,tokensAttempted:Q,error:Y instanceof Error?Y.message:String(Y),recordId:this.opts.record.id,threadId:X});await this.streamMarker(W)}}};hM.create=($,Y)=>{let X={storage:$.getStorage(),messageHistory:$.getMessageHistory(),tokenCounter:$.getTokenCounter(),observationConfig:$.getObservationConfig(),reflectionConfig:$.getReflectionConfig(),scope:$.scope,retrieval:$.retrieval,observer:$.observer,reflector:$.reflector,observedMessageIds:$.observedMessageIds,obscureThreadIds:$.getObscureThreadIds(),onIndexObservations:$.onIndexObservations,emitDebugEvent:(G)=>$.emitDebugEvent(G)};if(Y.cycleId)return new RN9(X,Y);if(X.scope==="resource"&&Y.resourceId)return new qN9(X,Y);return new MN9(X,Y)};wN9=/^\[(O\d+(?:-N\d+)?)\]\s*/,_N9=/^\s*Date:\s+/,jN9=/^\s*<\/?[a-z][^>]*>\s*$/i,TN9=/^\s*##\s+Group\s+`[^`]+`\s*$/,CN9=/^\s*_range:\s*`[^`]*`_\s*$/;fN9=NE4();LE4=MC(),gN9=new Set(["png","jpg","jpeg","webp","gif","bmp","tiff","tif","heic","heif","avif"]);ip={maxRetries:8,initialDelayMs:1000,backoffFactor:2,maxDelayMs:120000,jitter:0.2},eN9=["terminated","fetch failed","econnreset","econnrefused","enotfound","eai_again","socket hang up","network error","request timed out","request timeout","connection reset","connection closed"];WL9={observer:{name:"om.observer",entityName:"Observer"},"observer-multi-thread":{name:"om.observer.multi-thread",entityName:"MultiThreadObserver"},reflector:{name:"om.reflector",entityName:"Reflector"}};HL9={0:"",1:`
## COMPRESSION REQUIRED

Your previous reflection was the same size or larger than the original observations.

Please re-process with slightly more compression:
- Towards the beginning, condense more observations into higher-level reflections
- Closer to the end, retain more fine details (recent context matters more)
- Memory is getting long - use a more condensed style throughout
- Combine related items more aggressively but do not lose important specific details of names, places, events, and people
- Combine repeated similar tool calls (e.g. multiple file views, searches, or edits in the same area) into a single summary line describing what was explored/changed and the outcome
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done

Aim for a 8/10 detail level.
`,2:`
## AGGRESSIVE COMPRESSION REQUIRED

Your previous reflection was still too large after compression guidance.

Please re-process with much more aggressive compression:
- Towards the beginning, heavily condense observations into high-level summaries
- Closer to the end, retain fine details (recent context matters more)
- Memory is getting very long - use a significantly more condensed style throughout
- Combine related items aggressively but do not lose important specific details of names, places, events, and people
- Combine repeated similar tool calls (e.g. multiple file views, searches, or edits in the same area) into a single summary line describing what was explored/changed and the outcome
- If the same file or module is mentioned across many observations, merge into one entry covering the full arc
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
- Remove redundant information and merge overlapping observations

Aim for a 6/10 detail level.
`,3:`
## CRITICAL COMPRESSION REQUIRED

Your previous reflections have failed to compress sufficiently after multiple attempts.

Please re-process with maximum compression:
- Summarize the oldest observations (first 50-70%) into brief high-level paragraphs \u2014 only key facts, decisions, and outcomes
- For the most recent observations (last 30-50%), retain important details but still use a condensed style
- Ruthlessly merge related observations \u2014 if 10 observations are about the same topic, combine into 1-2 lines
- Combine all tool call sequences (file views, searches, edits, builds) into outcome-only summaries \u2014 drop individual steps entirely
- Drop procedural details (tool calls, retries, intermediate steps) \u2014 keep only final outcomes
- Drop observations that are no longer relevant or have been superseded by newer information
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
- Preserve: names, dates, decisions, errors, user preferences, and architectural choices

Aim for a 4/10 detail level.
`,4:`
## EXTREME COMPRESSION REQUIRED

Multiple compression attempts have failed. The content may already be dense from a prior reflection.

You MUST dramatically reduce the number of observations while keeping the standard observation format (date groups with bullet points and priority emojis):
- Tool call observations are the biggest source of bloat. Collapse ALL tool call sequences into outcome-only observations \u2014 e.g. 10 observations about viewing/searching/editing files become 1 observation about what was actually learned or achieved (e.g. "Investigated auth module and found token validation was skipping expiry check")
- Never preserve individual tool calls (viewed file X, searched for Y, ran build) \u2014 only preserve what was discovered or accomplished
- Consolidate many related observations into single, more generic observations
- Merge all same-day date groups into at most 2-3 date groups per day
- For older content, each topic or task should be at most 1-2 observations capturing the key outcome
- For recent content, retain more detail but still merge related items aggressively
- If multiple observations describe incremental progress on the same task, keep only the final state
- Preserve \u2705 completion markers and their outcomes but merge related completions into fewer lines
- Preserve: user preferences, key decisions, architectural choices, and unresolved issues

Aim for a 2/10 detail level. Fewer, more generic observations are better than many specific ones that exceed the budget.
`};wL9=new Set(["png","jpg","jpeg","webp","gif","bmp","tiff","tif","heic","heif","avif"]),jL9={baseTokens:85,tileTokens:170,fallbackTiles:4},CL9={low:280,medium:560,high:1120,ultra_high:2240,unspecified:1120},kL9=new Set(["low","medium","high","ultra_high","unspecified"]),vL9={openai:["OPENAI_API_KEY"],google:["GOOGLE_GENERATIVE_AI_API_KEY","GOOGLE_API_KEY"],anthropic:["ANTHROPIC_API_KEY"]};BB9=/\n{2,}--- message boundary \((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z)\) ---\n{2,}/});var dE4={};W8(dE4,{OBSERVATION_RETRIEVAL_INSTRUCTIONS:()=>WY0,OBSERVATION_CONTINUATION_HINT:()=>eT,OBSERVATION_CONTEXT_PROMPT:()=>$C,OBSERVATION_CONTEXT_INSTRUCTIONS:()=>YC,OBSERVATIONAL_MEMORY_DEFAULTS:()=>N9});var cE4=V0(()=>{ZY0()});var Oc0={};W8(Oc0,{wrapInObservationGroup:()=>TV,stripObservationGroups:()=>Gc0,stripEphemeralAnchorIds:()=>NX0,renderObservationGroupsForReflection:()=>Jc0,reconcileObservationGroupsFromReflection:()=>Wc0,parseObserverOutput:()=>KX0,parseObservationGroups:()=>op,parseAnchorId:()=>Zc0,optimizeObservationsForContext:()=>UX0,injectAnchorIds:()=>FE4,hasCurrentTaskSection:()=>PE4,getObservationsAsOf:()=>Bc0,formatMessagesForObserver:()=>BX0,extractCurrentTask:()=>wE4,deriveObservationGroupProvenance:()=>Qc0,combineObservationGroupRanges:()=>DX0,buildObserverSystemPrompt:()=>MC,buildObserverPrompt:()=>IE4,TokenCounter:()=>AX0,ObservationalMemoryProcessor:()=>mE4,ObservationalMemory:()=>fE4,OBSERVER_SYSTEM_PROMPT:()=>LE4,OBSERVATION_CONTINUATION_HINT:()=>eT,OBSERVATION_CONTEXT_PROMPT:()=>$C,OBSERVATION_CONTEXT_INSTRUCTIONS:()=>YC,OBSERVATIONAL_MEMORY_DEFAULTS:()=>N9,ModelByInputTokens:()=>bM});var Ec0=V0(()=>{EX0();ZY0()});var kl0=o((DI7,$w4)=>{var{defineProperty:Sl0,getOwnPropertyDescriptor:TT9,getOwnPropertyNames:CT9}=Object,ST9=Object.prototype.hasOwnProperty,kT9=($,Y)=>{for(var X in Y)Sl0($,X,{get:Y[X],enumerable:!0})},vT9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of CT9(Y))if(!ST9.call($,J)&&J!==X)Sl0($,J,{get:()=>Y[J],enumerable:!(G=TT9(Y,J))||G.enumerable})}return $},xT9=($)=>vT9(Sl0({},"__esModule",{value:!0}),$),tP4={};kT9(tP4,{SYMBOL_FOR_REQ_CONTEXT:()=>eP4,getContext:()=>yT9});$w4.exports=xT9(tP4);var eP4=Symbol.for("@vercel/request-context");function yT9(){return globalThis[eP4]?.get?.()??{}}});var _d=o((NI7,Gw4)=>{var{defineProperty:vl0,getOwnPropertyDescriptor:bT9,getOwnPropertyNames:hT9}=Object,fT9=Object.prototype.hasOwnProperty,gT9=($,Y)=>{for(var X in Y)vl0($,X,{get:Y[X],enumerable:!0})},mT9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of hT9(Y))if(!fT9.call($,J)&&J!==X)vl0($,J,{get:()=>Y[J],enumerable:!(G=bT9(Y,J))||G.enumerable})}return $},uT9=($)=>mT9(vl0({},"__esModule",{value:!0}),$),Yw4={};gT9(Yw4,{VercelOidcTokenError:()=>Xw4});Gw4.exports=uT9(Yw4);class Xw4 extends Error{constructor($,Y){super($);this.name="VercelOidcTokenError",this.cause=Y}toString(){if(this.cause)return`${this.name}: ${this.message}: ${this.cause}`;return`${this.name}: ${this.message}`}}});var Zw4=o((LI7,Ww4)=>{var{create:pT9,defineProperty:tX0,getOwnPropertyDescriptor:dT9,getOwnPropertyNames:cT9,getPrototypeOf:lT9}=Object,iT9=Object.prototype.hasOwnProperty,nT9=($,Y)=>{for(var X in Y)tX0($,X,{get:Y[X],enumerable:!0})},Jw4=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of cT9(Y))if(!iT9.call($,J)&&J!==X)tX0($,J,{get:()=>Y[J],enumerable:!(G=dT9(Y,J))||G.enumerable})}return $},yl0=($,Y,X)=>(X=$!=null?pT9(lT9($)):{},Jw4(Y||!$||!$.__esModule?tX0(X,"default",{value:$,enumerable:!0}):X,$)),rT9=($)=>Jw4(tX0({},"__esModule",{value:!0}),$),Qw4={};nT9(Qw4,{findRootDir:()=>oT9,getUserDataDir:()=>tT9});Ww4.exports=rT9(Qw4);var jd=yl0(L0("path")),aT9=yl0(L0("fs")),xl0=yl0(L0("os")),sT9=_d();function oT9(){try{let $=process.cwd();while($!==jd.default.dirname($)){let Y=jd.default.join($,".vercel");if(aT9.default.existsSync(Y))return $;$=jd.default.dirname($)}}catch($){throw new sT9.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function tT9(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(xl0.default.platform()){case"darwin":return jd.default.join(xl0.default.homedir(),"Library/Application Support");case"linux":return jd.default.join(xl0.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}});var Fw4=o((BI7,Aw4)=>{var{create:eT9,defineProperty:eX0,getOwnPropertyDescriptor:$C9,getOwnPropertyNames:YC9,getPrototypeOf:XC9}=Object,GC9=Object.prototype.hasOwnProperty,JC9=($,Y)=>{for(var X in Y)eX0($,X,{get:Y[X],enumerable:!0})},Kw4=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of YC9(Y))if(!GC9.call($,J)&&J!==X)eX0($,J,{get:()=>Y[J],enumerable:!(G=$C9(Y,J))||G.enumerable})}return $},Uw4=($,Y,X)=>(X=$!=null?eT9(XC9($)):{},Kw4(Y||!$||!$.__esModule?eX0(X,"default",{value:$,enumerable:!0}):X,$)),QC9=($)=>Kw4(eX0({},"__esModule",{value:!0}),$),Hw4={};JC9(Hw4,{isValidAccessToken:()=>UC9,readAuthConfig:()=>ZC9,writeAuthConfig:()=>KC9});Aw4.exports=QC9(Hw4);var Td=Uw4(L0("fs")),zw4=Uw4(L0("path")),WC9=Cd();function Vw4(){let $=(0,WC9.getVercelDataDir)();if(!$)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return zw4.join($,"auth.json")}function ZC9(){try{let $=Vw4();if(!Td.existsSync($))return null;let Y=Td.readFileSync($,"utf8");if(!Y)return null;return JSON.parse(Y)}catch($){return null}}function KC9($){let Y=Vw4(),X=zw4.dirname(Y);if(!Td.existsSync(X))Td.mkdirSync(X,{mode:504,recursive:!0});Td.writeFileSync(Y,JSON.stringify($,null,2),{mode:384})}function UC9($,Y=0){if(!$.token)return!1;if(typeof $.expiresAt!=="number")return!0;let X=Math.floor(Date.now()/1000),G=Y/1000;return $.expiresAt>=X+G}});var Bw4=o((OI7,Lw4)=>{var{defineProperty:fl0,getOwnPropertyDescriptor:HC9,getOwnPropertyNames:zC9}=Object,VC9=Object.prototype.hasOwnProperty,AC9=($,Y)=>{for(var X in Y)fl0($,X,{get:Y[X],enumerable:!0})},FC9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of zC9(Y))if(!VC9.call($,J)&&J!==X)fl0($,J,{get:()=>Y[J],enumerable:!(G=HC9(Y,J))||G.enumerable})}return $},DC9=($)=>FC9(fl0({},"__esModule",{value:!0}),$),Dw4={};AC9(Dw4,{processTokenResponse:()=>EC9,refreshTokenRequest:()=>OC9});Lw4.exports=DC9(Dw4);var bl0=L0("os"),NC9="https://vercel.com",LC9="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",Nw4=`@vercel/oidc node-${process.version} ${(0,bl0.platform)()} (${(0,bl0.arch)()}) ${(0,bl0.hostname)()}`,hl0=null;async function BC9(){if(hl0)return hl0;let $=`${NC9}/.well-known/openid-configuration`,Y=await fetch($,{headers:{"user-agent":Nw4}});if(!Y.ok)throw Error("Failed to discover OAuth endpoints");let X=await Y.json();if(!X||typeof X.token_endpoint!=="string")throw Error("Invalid OAuth discovery response");let G=X.token_endpoint;return hl0=G,G}async function OC9($){let Y=await BC9();return await fetch(Y,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":Nw4},body:new URLSearchParams({client_id:LC9,grant_type:"refresh_token",...$})})}async function EC9($){let Y=await $.json();if(!$.ok){let X=typeof Y==="object"&&Y&&"error"in Y?String(Y.error):"Token refresh failed";return[Error(X)]}if(typeof Y!=="object"||Y===null)return[Error("Invalid token response")];if(typeof Y.access_token!=="string")return[Error("Missing access_token in response")];if(Y.token_type!=="Bearer")return[Error("Invalid token_type in response")];if(typeof Y.expires_in!=="number")return[Error("Missing expires_in in response")];return[null,Y]}});var ml0=o((EI7,Rw4)=>{var{defineProperty:gl0,getOwnPropertyDescriptor:MC9,getOwnPropertyNames:RC9}=Object,qC9=Object.prototype.hasOwnProperty,IC9=($,Y)=>{for(var X in Y)gl0($,X,{get:Y[X],enumerable:!0})},PC9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of RC9(Y))if(!qC9.call($,J)&&J!==X)gl0($,J,{get:()=>Y[J],enumerable:!(G=MC9(Y,J))||G.enumerable})}return $},wC9=($)=>PC9(gl0({},"__esModule",{value:!0}),$),Ow4={};IC9(Ow4,{AccessTokenMissingError:()=>Ew4,RefreshAccessTokenFailedError:()=>Mw4});Rw4.exports=wC9(Ow4);class Ew4 extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login).");this.name="AccessTokenMissingError"}}class Mw4 extends Error{constructor($){super("Failed to refresh authentication token.",{cause:$});this.name="RefreshAccessTokenFailedError"}}});var Cd=o((MI7,_w4)=>{var{create:_C9,defineProperty:$G0,getOwnPropertyDescriptor:jC9,getOwnPropertyNames:TC9,getPrototypeOf:CC9}=Object,SC9=Object.prototype.hasOwnProperty,kC9=($,Y)=>{for(var X in Y)$G0($,X,{get:Y[X],enumerable:!0})},Iw4=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of TC9(Y))if(!SC9.call($,J)&&J!==X)$G0($,J,{get:()=>Y[J],enumerable:!(G=jC9(Y,J))||G.enumerable})}return $},Pw4=($,Y,X)=>(X=$!=null?_C9(CC9($)):{},Iw4(Y||!$||!$.__esModule?$G0(X,"default",{value:$,enumerable:!0}):X,$)),vC9=($)=>Iw4($G0({},"__esModule",{value:!0}),$),ww4={};kC9(ww4,{assertVercelOidcTokenResponse:()=>ul0,findProjectInfo:()=>hC9,getTokenPayload:()=>mC9,getVercelDataDir:()=>xC9,getVercelOidcToken:()=>bC9,getVercelToken:()=>yC9,isExpired:()=>uC9,loadToken:()=>gC9,saveToken:()=>fC9});_w4.exports=vC9(ww4);var Sd=Pw4(L0("path")),tM=Pw4(L0("fs")),bC=_d(),YG0=Zw4(),xC=Fw4(),qw4=Bw4(),yC=ml0();function xC9(){let Y=(0,YG0.getUserDataDir)();if(!Y)return null;return Sd.join(Y,"com.vercel.cli")}async function yC9($){let Y=(0,xC.readAuthConfig)();if(!Y?.token)throw new yC.AccessTokenMissingError;if((0,xC.isValidAccessToken)(Y,$?.expirationBufferMs))return Y.token;if(!Y.refreshToken)throw(0,xC.writeAuthConfig)({}),new yC.RefreshAccessTokenFailedError("No refresh token available");try{let X=await(0,qw4.refreshTokenRequest)({refresh_token:Y.refreshToken}),[G,J]=await(0,qw4.processTokenResponse)(X);if(G||!J)throw(0,xC.writeAuthConfig)({}),new yC.RefreshAccessTokenFailedError(G);let Q={token:J.access_token,expiresAt:Math.floor(Date.now()/1000)+J.expires_in};if(J.refresh_token)Q.refreshToken=J.refresh_token;return(0,xC.writeAuthConfig)(Q),Q.token}catch(X){if((0,xC.writeAuthConfig)({}),X instanceof yC.AccessTokenMissingError||X instanceof yC.RefreshAccessTokenFailedError)throw X;throw new yC.RefreshAccessTokenFailedError(X)}}async function bC9($,Y,X){let G=`https://api.vercel.com/v1/projects/${Y}/token?source=vercel-oidc-refresh${X?`&teamId=${X}`:""}`,J=await fetch(G,{method:"POST",headers:{Authorization:`Bearer ${$}`}});if(!J.ok)throw new bC.VercelOidcTokenError(`Failed to refresh OIDC token: ${J.statusText}`);let Q=await J.json();return ul0(Q),Q}function ul0($){if(!$||typeof $!=="object")throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in $)||typeof $.token!=="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function hC9(){let $=(0,YG0.findRootDir)();if(!$)throw new bC.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let Y=Sd.join($,".vercel","project.json");if(!tM.existsSync(Y))throw new bC.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let X=JSON.parse(tM.readFileSync(Y,"utf8"));if(typeof X.projectId!=="string"&&typeof X.orgId!=="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:X.projectId,teamId:X.orgId}}function fC9($,Y){let X=(0,YG0.getUserDataDir)();if(!X)throw new bC.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let G=Sd.join(X,"com.vercel.token",`${Y}.json`),J=JSON.stringify($);tM.mkdirSync(Sd.dirname(G),{mode:504,recursive:!0}),tM.writeFileSync(G,J),tM.chmodSync(G,432);return}function gC9($){let Y=(0,YG0.getUserDataDir)();if(!Y)throw new bC.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let X=Sd.join(Y,"com.vercel.token",`${$}.json`);if(!tM.existsSync(X))return null;let G=JSON.parse(tM.readFileSync(X,"utf8"));return ul0(G),G}function mC9($){let Y=$.split(".");if(Y.length!==3)throw new bC.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let X=Y[1].replace(/-/g,"+").replace(/_/g,"/"),G=X.padEnd(X.length+(4-X.length%4)%4,"=");return JSON.parse(Buffer.from(G,"base64").toString("utf8"))}function uC9($,Y=0){return $.exp*1000<Date.now()+Y}});var Sw4=o((RI7,Cw4)=>{var{defineProperty:pl0,getOwnPropertyDescriptor:pC9,getOwnPropertyNames:dC9}=Object,cC9=Object.prototype.hasOwnProperty,lC9=($,Y)=>{for(var X in Y)pl0($,X,{get:Y[X],enumerable:!0})},iC9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of dC9(Y))if(!cC9.call($,J)&&J!==X)pl0($,J,{get:()=>Y[J],enumerable:!(G=pC9(Y,J))||G.enumerable})}return $},nC9=($)=>iC9(pl0({},"__esModule",{value:!0}),$),Tw4={};lC9(Tw4,{refreshToken:()=>rC9});Cw4.exports=nC9(Tw4);var jw4=_d(),DN=Cd();async function rC9($){let Y=$?.project,X=$?.team;if(!Y&&!X){let J=(0,DN.findProjectInfo)();Y=J.projectId,X=J.teamId}else if(!Y||!X){let J=(0,DN.findProjectInfo)();Y=Y??J.projectId,X=X??J.teamId}if(!Y)throw new jw4.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let G=(0,DN.loadToken)(Y);if(!G||(0,DN.isExpired)((0,DN.getTokenPayload)(G.token),$?.expirationBufferMs)){let J=await(0,DN.getVercelToken)({expirationBufferMs:$?.expirationBufferMs});if(G=await(0,DN.getVercelOidcToken)(J,Y,X),!G)throw new jw4.VercelOidcTokenError("Failed to refresh OIDC token");(0,DN.saveToken)(G,Y)}process.env.VERCEL_OIDC_TOKEN=G.token;return}});var xw4=o((qI7,vw4)=>{var{defineProperty:cl0,getOwnPropertyDescriptor:aC9,getOwnPropertyNames:sC9}=Object,oC9=Object.prototype.hasOwnProperty,tC9=($,Y)=>{for(var X in Y)cl0($,X,{get:Y[X],enumerable:!0})},eC9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of sC9(Y))if(!oC9.call($,J)&&J!==X)cl0($,J,{get:()=>Y[J],enumerable:!(G=aC9(Y,J))||G.enumerable})}return $},$S9=($)=>eC9(cl0({},"__esModule",{value:!0}),$),kw4={};tC9(kw4,{getVercelOidcToken:()=>GS9,getVercelOidcTokenSync:()=>dl0});vw4.exports=$S9(kw4);var YS9=kl0(),XS9=_d();async function GS9($){let Y="",X;try{Y=dl0()}catch(G){X=G}try{let[{getTokenPayload:G,isExpired:J},{refreshToken:Q}]=await Promise.all([await Promise.resolve().then(() => U6(Cd())),await Promise.resolve().then(() => U6(Sw4()))]);if(!Y||J(G(Y),$?.expirationBufferMs))await Q($),Y=dl0()}catch(G){let J=X instanceof Error?X.message:"";if(G instanceof Error)J=`${J}
${G.message}`;if(J)throw new XS9.VercelOidcTokenError(J);throw G}return Y}function dl0(){let $=(0,YS9.getContext)().headers?.["x-vercel-oidc-token"]??process.env.VERCEL_OIDC_TOKEN;if(!$)throw 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 $}});var il0=o((II7,fw4)=>{var{defineProperty:ll0,getOwnPropertyDescriptor:JS9,getOwnPropertyNames:QS9}=Object,WS9=Object.prototype.hasOwnProperty,ZS9=($,Y)=>{for(var X in Y)ll0($,X,{get:Y[X],enumerable:!0})},KS9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of QS9(Y))if(!WS9.call($,J)&&J!==X)ll0($,J,{get:()=>Y[J],enumerable:!(G=JS9(Y,J))||G.enumerable})}return $},US9=($)=>KS9(ll0({},"__esModule",{value:!0}),$),hw4={};ZS9(hw4,{AccessTokenMissingError:()=>bw4.AccessTokenMissingError,RefreshAccessTokenFailedError:()=>bw4.RefreshAccessTokenFailedError,getContext:()=>HS9.getContext,getVercelOidcToken:()=>yw4.getVercelOidcToken,getVercelOidcTokenSync:()=>yw4.getVercelOidcTokenSync,getVercelToken:()=>zS9.getVercelToken});fw4.exports=US9(hw4);var yw4=xw4(),HS9=kl0(),bw4=ml0(),zS9=Cd()});var rl0=o((P_4)=>{Object.defineProperty(P_4,"__esModule",{value:!0});P_4.VERSION=void 0;P_4.VERSION="1.9.1"});var S_4=o((T_4)=>{Object.defineProperty(T_4,"__esModule",{value:!0});T_4.isCompatible=T_4._makeCompatibilityCheck=void 0;var zk9=rl0(),__4=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function j_4($){let Y=new Set([$]),X=new Set,G=$.match(__4);if(!G)return()=>!1;let J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(K){return K===$};function Q(Z){return X.add(Z),!1}function W(Z){return Y.add(Z),!0}return function(K){if(Y.has(K))return!0;if(X.has(K))return!1;let H=K.match(__4);if(!H)return Q(K);let z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(K);if(J.major!==z.major)return Q(K);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(K);return Q(K)}if(J.minor<=z.minor)return W(K);return Q(K)}}T_4._makeCompatibilityCheck=j_4;T_4.isCompatible=j_4(zk9.VERSION)});var eM=o((k_4)=>{Object.defineProperty(k_4,"__esModule",{value:!0});k_4.unregisterGlobal=k_4.getGlobal=k_4.registerGlobal=void 0;var hC=rl0(),Ak9=S_4(),Fk9=hC.VERSION.split(".")[0],kd=Symbol.for(`opentelemetry.js.api.${Fk9}`),vd=typeof globalThis==="object"?globalThis:typeof self==="object"?self:typeof window==="object"?window:typeof global==="object"?global:{};function Dk9($,Y,X,G=!1){var J;let Q=vd[kd]=(J=vd[kd])!==null&&J!==void 0?J:{version:hC.VERSION};if(!G&&Q[$]){let W=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${$}`);return X.error(W.stack||W.message),!1}if(Q.version!==hC.VERSION){let W=Error(`@opentelemetry/api: Registration of version v${Q.version} for ${$} does not match previously registered API v${hC.VERSION}`);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug(`@opentelemetry/api: Registered a global for ${$} v${hC.VERSION}.`),!0}k_4.registerGlobal=Dk9;function Nk9($){var Y,X;let G=(Y=vd[kd])===null||Y===void 0?void 0:Y.version;if(!G||!(0,Ak9.isCompatible)(G))return;return(X=vd[kd])===null||X===void 0?void 0:X[$]}k_4.getGlobal=Nk9;function Lk9($,Y){Y.debug(`@opentelemetry/api: Unregistering a global for ${$} v${hC.VERSION}.`);let X=vd[kd];if(X)delete X[$]}k_4.unregisterGlobal=Lk9});var h_4=o((y_4)=>{Object.defineProperty(y_4,"__esModule",{value:!0});y_4.DiagComponentLogger=void 0;var Ek9=eM();class x_4{constructor($){this._namespace=$.namespace||"DiagComponentLogger"}debug(...$){return xd("debug",this._namespace,$)}error(...$){return xd("error",this._namespace,$)}info(...$){return xd("info",this._namespace,$)}warn(...$){return xd("warn",this._namespace,$)}verbose(...$){return xd("verbose",this._namespace,$)}}y_4.DiagComponentLogger=x_4;function xd($,Y,X){let G=(0,Ek9.getGlobal)("diag");if(!G)return;return G[$](Y,...X)}});var GG0=o((f_4)=>{Object.defineProperty(f_4,"__esModule",{value:!0});f_4.DiagLogLevel=void 0;var Mk9;(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(Mk9=f_4.DiagLogLevel||(f_4.DiagLogLevel={}))});var u_4=o((g_4)=>{Object.defineProperty(g_4,"__esModule",{value:!0});g_4.createLogLevelDiagLogger=void 0;var CV=GG0();function Rk9($,Y){if($<CV.DiagLogLevel.NONE)$=CV.DiagLogLevel.NONE;else if($>CV.DiagLogLevel.ALL)$=CV.DiagLogLevel.ALL;Y=Y||{};function X(G,J){let Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",CV.DiagLogLevel.ERROR),warn:X("warn",CV.DiagLogLevel.WARN),info:X("info",CV.DiagLogLevel.INFO),debug:X("debug",CV.DiagLogLevel.DEBUG),verbose:X("verbose",CV.DiagLogLevel.VERBOSE)}}g_4.createLogLevelDiagLogger=Rk9});var $R=o((d_4)=>{Object.defineProperty(d_4,"__esModule",{value:!0});d_4.DiagAPI=void 0;var qk9=h_4(),Ik9=u_4(),p_4=GG0(),JG0=eM(),Pk9="diag";class sl0{static instance(){if(!this._instance)this._instance=new sl0;return this._instance}constructor(){function $(G){return function(...J){let Q=(0,JG0.getGlobal)("diag");if(!Q)return;return Q[G](...J)}}let Y=this,X=(G,J={logLevel:p_4.DiagLogLevel.INFO})=>{var Q,W,Z;if(G===Y){let z=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return Y.error((Q=z.stack)!==null&&Q!==void 0?Q:z.message),!1}if(typeof J==="number")J={logLevel:J};let K=(0,JG0.getGlobal)("diag"),H=(0,Ik9.createLogLevelDiagLogger)((W=J.logLevel)!==null&&W!==void 0?W:p_4.DiagLogLevel.INFO,G);if(K&&!J.suppressOverrideMessage){let z=(Z=Error().stack)!==null&&Z!==void 0?Z:"<failed to generate stacktrace>";K.warn(`Current logger will be overwritten from ${z}`),H.warn(`Current logger will overwrite one already registered from ${z}`)}return(0,JG0.registerGlobal)("diag",H,Y,!0)};Y.setLogger=X,Y.disable=()=>{(0,JG0.unregisterGlobal)(Pk9,Y)},Y.createComponentLogger=(G)=>{return new qk9.DiagComponentLogger(G)},Y.verbose=$("verbose"),Y.debug=$("debug"),Y.info=$("info"),Y.warn=$("warn"),Y.error=$("error")}}d_4.DiagAPI=sl0});var n_4=o((l_4)=>{Object.defineProperty(l_4,"__esModule",{value:!0});l_4.BaggageImpl=void 0;class fC{constructor($){this._entries=$?new Map($):new Map}getEntry($){let Y=this._entries.get($);if(!Y)return;return Object.assign({},Y)}getAllEntries(){return Array.from(this._entries.entries())}setEntry($,Y){let X=new fC(this._entries);return X._entries.set($,Y),X}removeEntry($){let Y=new fC(this._entries);return Y._entries.delete($),Y}removeEntries(...$){let Y=new fC(this._entries);for(let X of $)Y._entries.delete(X);return Y}clear(){return new fC}}l_4.BaggageImpl=fC});var s_4=o((r_4)=>{Object.defineProperty(r_4,"__esModule",{value:!0});r_4.baggageEntryMetadataSymbol=void 0;r_4.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")});var ol0=o((o_4)=>{Object.defineProperty(o_4,"__esModule",{value:!0});o_4.baggageEntryMetadataFromString=o_4.createBaggage=void 0;var wk9=$R(),_k9=n_4(),jk9=s_4(),Tk9=wk9.DiagAPI.instance();function Ck9($={}){return new _k9.BaggageImpl(new Map(Object.entries($)))}o_4.createBaggage=Ck9;function Sk9($){if(typeof $!=="string")Tk9.error(`Cannot create baggage metadata from unknown type: ${typeof $}`),$="";return{__TYPE__:jk9.baggageEntryMetadataSymbol,toString(){return $}}}o_4.baggageEntryMetadataFromString=Sk9});var yd=o((e_4)=>{Object.defineProperty(e_4,"__esModule",{value:!0});e_4.ROOT_CONTEXT=e_4.createContextKey=void 0;function vk9($){return Symbol.for($)}e_4.createContextKey=vk9;class QG0{constructor($){let Y=this;Y._currentContext=$?new Map($):new Map,Y.getValue=(X)=>Y._currentContext.get(X),Y.setValue=(X,G)=>{let J=new QG0(Y._currentContext);return J._currentContext.set(X,G),J},Y.deleteValue=(X)=>{let G=new QG0(Y._currentContext);return G._currentContext.delete(X),G}}}e_4.ROOT_CONTEXT=new QG0});var Jj4=o((Xj4)=>{Object.defineProperty(Xj4,"__esModule",{value:!0});Xj4.DiagConsoleLogger=Xj4._originalConsoleMethods=void 0;var tl0=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];Xj4._originalConsoleMethods={};if(typeof console<"u"){let $=["error","warn","info","debug","trace","log"];for(let Y of $)if(typeof console[Y]==="function")Xj4._originalConsoleMethods[Y]=console[Y]}class Yj4{constructor(){function $(Y){return function(...X){let G=Xj4._originalConsoleMethods[Y];if(typeof G!=="function")G=Xj4._originalConsoleMethods.log;if(typeof G!=="function"&&console){if(G=console[Y],typeof G!=="function")G=console.log}if(typeof G==="function")return G.apply(console,X)}}for(let Y=0;Y<tl0.length;Y++)this[tl0[Y].n]=$(tl0[Y].c)}}Xj4.DiagConsoleLogger=Yj4});var Zi0=o((Qj4)=>{Object.defineProperty(Qj4,"__esModule",{value:!0});Qj4.createNoopMeter=Qj4.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=Qj4.NOOP_OBSERVABLE_GAUGE_METRIC=Qj4.NOOP_OBSERVABLE_COUNTER_METRIC=Qj4.NOOP_UP_DOWN_COUNTER_METRIC=Qj4.NOOP_HISTOGRAM_METRIC=Qj4.NOOP_GAUGE_METRIC=Qj4.NOOP_COUNTER_METRIC=Qj4.NOOP_METER=Qj4.NoopObservableUpDownCounterMetric=Qj4.NoopObservableGaugeMetric=Qj4.NoopObservableCounterMetric=Qj4.NoopObservableMetric=Qj4.NoopHistogramMetric=Qj4.NoopGaugeMetric=Qj4.NoopUpDownCounterMetric=Qj4.NoopCounterMetric=Qj4.NoopMetric=Qj4.NoopMeter=void 0;class el0{constructor(){}createGauge($,Y){return Qj4.NOOP_GAUGE_METRIC}createHistogram($,Y){return Qj4.NOOP_HISTOGRAM_METRIC}createCounter($,Y){return Qj4.NOOP_COUNTER_METRIC}createUpDownCounter($,Y){return Qj4.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge($,Y){return Qj4.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter($,Y){return Qj4.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter($,Y){return Qj4.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback($,Y){}removeBatchObservableCallback($){}}Qj4.NoopMeter=el0;class gC{}Qj4.NoopMetric=gC;class $i0 extends gC{add($,Y){}}Qj4.NoopCounterMetric=$i0;class Yi0 extends gC{add($,Y){}}Qj4.NoopUpDownCounterMetric=Yi0;class Xi0 extends gC{record($,Y){}}Qj4.NoopGaugeMetric=Xi0;class Gi0 extends gC{record($,Y){}}Qj4.NoopHistogramMetric=Gi0;class bd{addCallback($){}removeCallback($){}}Qj4.NoopObservableMetric=bd;class Ji0 extends bd{}Qj4.NoopObservableCounterMetric=Ji0;class Qi0 extends bd{}Qj4.NoopObservableGaugeMetric=Qi0;class Wi0 extends bd{}Qj4.NoopObservableUpDownCounterMetric=Wi0;Qj4.NOOP_METER=new el0;Qj4.NOOP_COUNTER_METRIC=new $i0;Qj4.NOOP_GAUGE_METRIC=new Xi0;Qj4.NOOP_HISTOGRAM_METRIC=new Gi0;Qj4.NOOP_UP_DOWN_COUNTER_METRIC=new Yi0;Qj4.NOOP_OBSERVABLE_COUNTER_METRIC=new Ji0;Qj4.NOOP_OBSERVABLE_GAUGE_METRIC=new Qi0;Qj4.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new Wi0;function yk9(){return Qj4.NOOP_METER}Qj4.createNoopMeter=yk9});var Nj4=o((Dj4)=>{Object.defineProperty(Dj4,"__esModule",{value:!0});Dj4.ValueType=void 0;var ik9;(function($){$[$.INT=0]="INT",$[$.DOUBLE=1]="DOUBLE"})(ik9=Dj4.ValueType||(Dj4.ValueType={}))});var Ui0=o((Lj4)=>{Object.defineProperty(Lj4,"__esModule",{value:!0});Lj4.defaultTextMapSetter=Lj4.defaultTextMapGetter=void 0;Lj4.defaultTextMapGetter={get($,Y){if($==null)return;return $[Y]},keys($){if($==null)return[];return Object.keys($)}};Lj4.defaultTextMapSetter={set($,Y,X){if($==null)return;$[Y]=X}}});var Rj4=o((Ej4)=>{Object.defineProperty(Ej4,"__esModule",{value:!0});Ej4.NoopContextManager=void 0;var rk9=yd();class Oj4{active(){return rk9.ROOT_CONTEXT}with($,Y,X,...G){return Y.call(X,...G)}bind($,Y){return Y}enable(){return this}disable(){return this}}Ej4.NoopContextManager=Oj4});var hd=o((Ij4)=>{Object.defineProperty(Ij4,"__esModule",{value:!0});Ij4.ContextAPI=void 0;var ak9=Rj4(),Hi0=eM(),qj4=$R(),zi0="context",sk9=new ak9.NoopContextManager;class Vi0{constructor(){}static getInstance(){if(!this._instance)this._instance=new Vi0;return this._instance}setGlobalContextManager($){return(0,Hi0.registerGlobal)(zi0,$,qj4.DiagAPI.instance())}active(){return this._getContextManager().active()}with($,Y,X,...G){return this._getContextManager().with($,Y,X,...G)}bind($,Y){return this._getContextManager().bind($,Y)}_getContextManager(){return(0,Hi0.getGlobal)(zi0)||sk9}disable(){this._getContextManager().disable(),(0,Hi0.unregisterGlobal)(zi0,qj4.DiagAPI.instance())}}Ij4.ContextAPI=Vi0});var Fi0=o((wj4)=>{Object.defineProperty(wj4,"__esModule",{value:!0});wj4.TraceFlags=void 0;var ok9;(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(ok9=wj4.TraceFlags||(wj4.TraceFlags={}))});var ZG0=o((_j4)=>{Object.defineProperty(_j4,"__esModule",{value:!0});_j4.INVALID_SPAN_CONTEXT=_j4.INVALID_TRACEID=_j4.INVALID_SPANID=void 0;var tk9=Fi0();_j4.INVALID_SPANID="0000000000000000";_j4.INVALID_TRACEID="00000000000000000000000000000000";_j4.INVALID_SPAN_CONTEXT={traceId:_j4.INVALID_TRACEID,spanId:_j4.INVALID_SPANID,traceFlags:tk9.TraceFlags.NONE}});var KG0=o((kj4)=>{Object.defineProperty(kj4,"__esModule",{value:!0});kj4.NonRecordingSpan=void 0;var ek9=ZG0();class Sj4{constructor($=ek9.INVALID_SPAN_CONTEXT){this._spanContext=$}spanContext(){return this._spanContext}setAttribute($,Y){return this}setAttributes($){return this}addEvent($,Y){return this}addLink($){return this}addLinks($){return this}setStatus($){return this}updateName($){return this}end($){}isRecording(){return!1}recordException($,Y){}}kj4.NonRecordingSpan=Sj4});var Li0=o((yj4)=>{Object.defineProperty(yj4,"__esModule",{value:!0});yj4.getSpanContext=yj4.setSpanContext=yj4.deleteSpan=yj4.setSpan=yj4.getActiveSpan=yj4.getSpan=void 0;var $v9=yd(),Yv9=KG0(),Xv9=hd(),Di0=(0,$v9.createContextKey)("OpenTelemetry Context Key SPAN");function Ni0($){return $.getValue(Di0)||void 0}yj4.getSpan=Ni0;function Gv9(){return Ni0(Xv9.ContextAPI.getInstance().active())}yj4.getActiveSpan=Gv9;function xj4($,Y){return $.setValue(Di0,Y)}yj4.setSpan=xj4;function Jv9($){return $.deleteValue(Di0)}yj4.deleteSpan=Jv9;function Qv9($,Y){return xj4($,new Yv9.NonRecordingSpan(Y))}yj4.setSpanContext=Qv9;function Wv9($){var Y;return(Y=Ni0($))===null||Y===void 0?void 0:Y.spanContext()}yj4.getSpanContext=Wv9});var HG0=o((uj4)=>{Object.defineProperty(uj4,"__esModule",{value:!0});uj4.wrapSpanContext=uj4.isSpanContextValid=uj4.isValidSpanId=uj4.isValidTraceId=void 0;var hj4=ZG0(),Vv9=KG0(),UG0=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1]);function fj4($,Y){if(typeof $!=="string"||$.length!==Y)return!1;let X=0;for(let G=0;G<$.length;G+=4)X+=(UG0[$.charCodeAt(G)]|0)+(UG0[$.charCodeAt(G+1)]|0)+(UG0[$.charCodeAt(G+2)]|0)+(UG0[$.charCodeAt(G+3)]|0);return X===Y}function gj4($){return fj4($,32)&&$!==hj4.INVALID_TRACEID}uj4.isValidTraceId=gj4;function mj4($){return fj4($,16)&&$!==hj4.INVALID_SPANID}uj4.isValidSpanId=mj4;function Av9($){return gj4($.traceId)&&mj4($.spanId)}uj4.isSpanContextValid=Av9;function Fv9($){return new Vv9.NonRecordingSpan($)}uj4.wrapSpanContext=Fv9});var Ei0=o((lj4)=>{Object.defineProperty(lj4,"__esModule",{value:!0});lj4.NoopTracer=void 0;var Bv9=hd(),dj4=Li0(),Bi0=KG0(),Ov9=HG0(),Oi0=Bv9.ContextAPI.getInstance();class cj4{startSpan($,Y,X=Oi0.active()){if(Boolean(Y===null||Y===void 0?void 0:Y.root))return new Bi0.NonRecordingSpan;let J=X&&(0,dj4.getSpanContext)(X);if(Ev9(J)&&(0,Ov9.isSpanContextValid)(J))return new Bi0.NonRecordingSpan(J);else return new Bi0.NonRecordingSpan}startActiveSpan($,Y,X,G){let J,Q,W;if(arguments.length<2)return;else if(arguments.length===2)W=Y;else if(arguments.length===3)J=Y,W=X;else J=Y,Q=X,W=G;let Z=Q!==null&&Q!==void 0?Q:Oi0.active(),K=this.startSpan($,J,Z),H=(0,dj4.setSpan)(Z,K);return Oi0.with(H,W,void 0,K)}}lj4.NoopTracer=cj4;function Ev9($){return $!==null&&typeof $==="object"&&"spanId"in $&&typeof $.spanId==="string"&&"traceId"in $&&typeof $.traceId==="string"&&"traceFlags"in $&&typeof $.traceFlags==="number"}});var Mi0=o((rj4)=>{Object.defineProperty(rj4,"__esModule",{value:!0});rj4.ProxyTracer=void 0;var Mv9=Ei0(),Rv9=new Mv9.NoopTracer;class nj4{constructor($,Y,X,G){this._provider=$,this.name=Y,this.version=X,this.options=G}startSpan($,Y,X){return this._getTracer().startSpan($,Y,X)}startActiveSpan($,Y,X,G){let J=this._getTracer();return Reflect.apply(J.startActiveSpan,J,arguments)}_getTracer(){if(this._delegate)return this._delegate;let $=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!$)return Rv9;return this._delegate=$,this._delegate}}rj4.ProxyTracer=nj4});var ej4=o((oj4)=>{Object.defineProperty(oj4,"__esModule",{value:!0});oj4.NoopTracerProvider=void 0;var qv9=Ei0();class sj4{getTracer($,Y,X){return new qv9.NoopTracer}}oj4.NoopTracerProvider=sj4});var Ri0=o((YT4)=>{Object.defineProperty(YT4,"__esModule",{value:!0});YT4.ProxyTracerProvider=void 0;var Iv9=Mi0(),Pv9=ej4(),wv9=new Pv9.NoopTracerProvider;class $T4{getTracer($,Y,X){var G;return(G=this.getDelegateTracer($,Y,X))!==null&&G!==void 0?G:new Iv9.ProxyTracer(this,$,Y,X)}getDelegate(){var $;return($=this._delegate)!==null&&$!==void 0?$:wv9}setDelegate($){this._delegate=$}getDelegateTracer($,Y,X){var G;return(G=this._delegate)===null||G===void 0?void 0:G.getTracer($,Y,X)}}YT4.ProxyTracerProvider=$T4});var JT4=o((GT4)=>{Object.defineProperty(GT4,"__esModule",{value:!0});GT4.SamplingDecision=void 0;var _v9;(function($){$[$.NOT_RECORD=0]="NOT_RECORD",$[$.RECORD=1]="RECORD",$[$.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(_v9=GT4.SamplingDecision||(GT4.SamplingDecision={}))});var WT4=o((QT4)=>{Object.defineProperty(QT4,"__esModule",{value:!0});QT4.SpanKind=void 0;var jv9;(function($){$[$.INTERNAL=0]="INTERNAL",$[$.SERVER=1]="SERVER",$[$.CLIENT=2]="CLIENT",$[$.PRODUCER=3]="PRODUCER",$[$.CONSUMER=4]="CONSUMER"})(jv9=QT4.SpanKind||(QT4.SpanKind={}))});var KT4=o((ZT4)=>{Object.defineProperty(ZT4,"__esModule",{value:!0});ZT4.SpanStatusCode=void 0;var Tv9;(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(Tv9=ZT4.SpanStatusCode||(ZT4.SpanStatusCode={}))});var zT4=o((UT4)=>{Object.defineProperty(UT4,"__esModule",{value:!0});UT4.validateValue=UT4.validateKey=void 0;var wi0="[_0-9a-z-*/]",Cv9=`[a-z]${wi0}{0,255}`,Sv9=`[a-z0-9]${wi0}{0,240}@[a-z]${wi0}{0,13}`,kv9=new RegExp(`^(?:${Cv9}|${Sv9})$`),vv9=/^[ -~]{0,255}[!-~]$/,xv9=/,|=/;function yv9($){return kv9.test($)}UT4.validateKey=yv9;function bv9($){return vv9.test($)&&!xv9.test($)}UT4.validateValue=bv9});var BT4=o((NT4)=>{Object.defineProperty(NT4,"__esModule",{value:!0});NT4.TraceStateImpl=void 0;var VT4=zT4(),AT4=32,fv9=512,FT4=",",DT4="=";class _i0{constructor($){if(this._internalState=new Map,$)this._parse($)}set($,Y){let X=this._clone();if(X._internalState.has($))X._internalState.delete($);return X._internalState.set($,Y),X}unset($){let Y=this._clone();return Y._internalState.delete($),Y}get($){return this._internalState.get($)}serialize(){return Array.from(this._internalState.keys()).reduceRight(($,Y)=>{return $.push(Y+DT4+this.get(Y)),$},[]).join(FT4)}_parse($){if($.length>fv9)return;if(this._internalState=$.split(FT4).reduceRight((Y,X)=>{let G=X.trim(),J=G.indexOf(DT4);if(J!==-1){let Q=G.slice(0,J),W=G.slice(J+1,X.length);if((0,VT4.validateKey)(Q)&&(0,VT4.validateValue)(W))Y.set(Q,W)}return Y},new Map),this._internalState.size>AT4)this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,AT4))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let $=new _i0;return $._internalState=new Map(this._internalState),$}}NT4.TraceStateImpl=_i0});var MT4=o((OT4)=>{Object.defineProperty(OT4,"__esModule",{value:!0});OT4.createTraceState=void 0;var gv9=BT4();function mv9($){return new gv9.TraceStateImpl($)}OT4.createTraceState=mv9});var IT4=o((RT4)=>{Object.defineProperty(RT4,"__esModule",{value:!0});RT4.context=void 0;var uv9=hd();RT4.context=uv9.ContextAPI.getInstance()});var _T4=o((PT4)=>{Object.defineProperty(PT4,"__esModule",{value:!0});PT4.diag=void 0;var pv9=$R();PT4.diag=pv9.DiagAPI.instance()});var CT4=o((jT4)=>{Object.defineProperty(jT4,"__esModule",{value:!0});jT4.NOOP_METER_PROVIDER=jT4.NoopMeterProvider=void 0;var dv9=Zi0();class ji0{getMeter($,Y,X){return dv9.NOOP_METER}}jT4.NoopMeterProvider=ji0;jT4.NOOP_METER_PROVIDER=new ji0});var xT4=o((kT4)=>{Object.defineProperty(kT4,"__esModule",{value:!0});kT4.MetricsAPI=void 0;var lv9=CT4(),Ti0=eM(),ST4=$R(),Ci0="metrics";class Si0{constructor(){}static getInstance(){if(!this._instance)this._instance=new Si0;return this._instance}setGlobalMeterProvider($){return(0,Ti0.registerGlobal)(Ci0,$,ST4.DiagAPI.instance())}getMeterProvider(){return(0,Ti0.getGlobal)(Ci0)||lv9.NOOP_METER_PROVIDER}getMeter($,Y,X){return this.getMeterProvider().getMeter($,Y,X)}disable(){(0,Ti0.unregisterGlobal)(Ci0,ST4.DiagAPI.instance())}}kT4.MetricsAPI=Si0});var hT4=o((yT4)=>{Object.defineProperty(yT4,"__esModule",{value:!0});yT4.metrics=void 0;var iv9=xT4();yT4.metrics=iv9.MetricsAPI.getInstance()});var uT4=o((gT4)=>{Object.defineProperty(gT4,"__esModule",{value:!0});gT4.NoopTextMapPropagator=void 0;class fT4{inject($,Y){}extract($,Y){return $}fields(){return[]}}gT4.NoopTextMapPropagator=fT4});var lT4=o((dT4)=>{Object.defineProperty(dT4,"__esModule",{value:!0});dT4.deleteBaggage=dT4.setBaggage=dT4.getActiveBaggage=dT4.getBaggage=void 0;var nv9=hd(),rv9=yd(),ki0=(0,rv9.createContextKey)("OpenTelemetry Baggage Key");function pT4($){return $.getValue(ki0)||void 0}dT4.getBaggage=pT4;function av9(){return pT4(nv9.ContextAPI.getInstance().active())}dT4.getActiveBaggage=av9;function sv9($,Y){return $.setValue(ki0,Y)}dT4.setBaggage=sv9;function ov9($){return $.deleteValue(ki0)}dT4.deleteBaggage=ov9});var sT4=o((rT4)=>{Object.defineProperty(rT4,"__esModule",{value:!0});rT4.PropagationAPI=void 0;var vi0=eM(),Yx9=uT4(),iT4=Ui0(),zG0=lT4(),Xx9=ol0(),nT4=$R(),xi0="propagation",Gx9=new Yx9.NoopTextMapPropagator;class yi0{constructor(){this.createBaggage=Xx9.createBaggage,this.getBaggage=zG0.getBaggage,this.getActiveBaggage=zG0.getActiveBaggage,this.setBaggage=zG0.setBaggage,this.deleteBaggage=zG0.deleteBaggage}static getInstance(){if(!this._instance)this._instance=new yi0;return this._instance}setGlobalPropagator($){return(0,vi0.registerGlobal)(xi0,$,nT4.DiagAPI.instance())}inject($,Y,X=iT4.defaultTextMapSetter){return this._getGlobalPropagator().inject($,Y,X)}extract($,Y,X=iT4.defaultTextMapGetter){return this._getGlobalPropagator().extract($,Y,X)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,vi0.unregisterGlobal)(xi0,nT4.DiagAPI.instance())}_getGlobalPropagator(){return(0,vi0.getGlobal)(xi0)||Gx9}}rT4.PropagationAPI=yi0});var eT4=o((oT4)=>{Object.defineProperty(oT4,"__esModule",{value:!0});oT4.propagation=void 0;var Jx9=sT4();oT4.propagation=Jx9.PropagationAPI.getInstance()});var QC4=o((GC4)=>{Object.defineProperty(GC4,"__esModule",{value:!0});GC4.TraceAPI=void 0;var bi0=eM(),$C4=Ri0(),YC4=HG0(),mC=Li0(),XC4=$R(),hi0="trace";class fi0{constructor(){this._proxyTracerProvider=new $C4.ProxyTracerProvider,this.wrapSpanContext=YC4.wrapSpanContext,this.isSpanContextValid=YC4.isSpanContextValid,this.deleteSpan=mC.deleteSpan,this.getSpan=mC.getSpan,this.getActiveSpan=mC.getActiveSpan,this.getSpanContext=mC.getSpanContext,this.setSpan=mC.setSpan,this.setSpanContext=mC.setSpanContext}static getInstance(){if(!this._instance)this._instance=new fi0;return this._instance}setGlobalTracerProvider($){let Y=(0,bi0.registerGlobal)(hi0,this._proxyTracerProvider,XC4.DiagAPI.instance());if(Y)this._proxyTracerProvider.setDelegate($);return Y}getTracerProvider(){return(0,bi0.getGlobal)(hi0)||this._proxyTracerProvider}getTracer($,Y){return this.getTracerProvider().getTracer($,Y)}disable(){(0,bi0.unregisterGlobal)(hi0,XC4.DiagAPI.instance()),this._proxyTracerProvider=new $C4.ProxyTracerProvider}}GC4.TraceAPI=fi0});var KC4=o((WC4)=>{Object.defineProperty(WC4,"__esModule",{value:!0});WC4.trace=void 0;var Qx9=QC4();WC4.trace=Qx9.TraceAPI.getInstance()});var ui0=o((J5)=>{Object.defineProperty(J5,"__esModule",{value:!0});J5.trace=J5.propagation=J5.metrics=J5.diag=J5.context=J5.INVALID_SPAN_CONTEXT=J5.INVALID_TRACEID=J5.INVALID_SPANID=J5.isValidSpanId=J5.isValidTraceId=J5.isSpanContextValid=J5.createTraceState=J5.TraceFlags=J5.SpanStatusCode=J5.SpanKind=J5.SamplingDecision=J5.ProxyTracerProvider=J5.ProxyTracer=J5.defaultTextMapSetter=J5.defaultTextMapGetter=J5.ValueType=J5.createNoopMeter=J5.DiagLogLevel=J5.DiagConsoleLogger=J5.ROOT_CONTEXT=J5.createContextKey=J5.baggageEntryMetadataFromString=void 0;var Wx9=ol0();Object.defineProperty(J5,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return Wx9.baggageEntryMetadataFromString}});var UC4=yd();Object.defineProperty(J5,"createContextKey",{enumerable:!0,get:function(){return UC4.createContextKey}});Object.defineProperty(J5,"ROOT_CONTEXT",{enumerable:!0,get:function(){return UC4.ROOT_CONTEXT}});var Zx9=Jj4();Object.defineProperty(J5,"DiagConsoleLogger",{enumerable:!0,get:function(){return Zx9.DiagConsoleLogger}});var Kx9=GG0();Object.defineProperty(J5,"DiagLogLevel",{enumerable:!0,get:function(){return Kx9.DiagLogLevel}});var Ux9=Zi0();Object.defineProperty(J5,"createNoopMeter",{enumerable:!0,get:function(){return Ux9.createNoopMeter}});var Hx9=Nj4();Object.defineProperty(J5,"ValueType",{enumerable:!0,get:function(){return Hx9.ValueType}});var HC4=Ui0();Object.defineProperty(J5,"defaultTextMapGetter",{enumerable:!0,get:function(){return HC4.defaultTextMapGetter}});Object.defineProperty(J5,"defaultTextMapSetter",{enumerable:!0,get:function(){return HC4.defaultTextMapSetter}});var zx9=Mi0();Object.defineProperty(J5,"ProxyTracer",{enumerable:!0,get:function(){return zx9.ProxyTracer}});var Vx9=Ri0();Object.defineProperty(J5,"ProxyTracerProvider",{enumerable:!0,get:function(){return Vx9.ProxyTracerProvider}});var Ax9=JT4();Object.defineProperty(J5,"SamplingDecision",{enumerable:!0,get:function(){return Ax9.SamplingDecision}});var Fx9=WT4();Object.defineProperty(J5,"SpanKind",{enumerable:!0,get:function(){return Fx9.SpanKind}});var Dx9=KT4();Object.defineProperty(J5,"SpanStatusCode",{enumerable:!0,get:function(){return Dx9.SpanStatusCode}});var Nx9=Fi0();Object.defineProperty(J5,"TraceFlags",{enumerable:!0,get:function(){return Nx9.TraceFlags}});var Lx9=MT4();Object.defineProperty(J5,"createTraceState",{enumerable:!0,get:function(){return Lx9.createTraceState}});var gi0=HG0();Object.defineProperty(J5,"isSpanContextValid",{enumerable:!0,get:function(){return gi0.isSpanContextValid}});Object.defineProperty(J5,"isValidTraceId",{enumerable:!0,get:function(){return gi0.isValidTraceId}});Object.defineProperty(J5,"isValidSpanId",{enumerable:!0,get:function(){return gi0.isValidSpanId}});var mi0=ZG0();Object.defineProperty(J5,"INVALID_SPANID",{enumerable:!0,get:function(){return mi0.INVALID_SPANID}});Object.defineProperty(J5,"INVALID_TRACEID",{enumerable:!0,get:function(){return mi0.INVALID_TRACEID}});Object.defineProperty(J5,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return mi0.INVALID_SPAN_CONTEXT}});var zC4=IT4();Object.defineProperty(J5,"context",{enumerable:!0,get:function(){return zC4.context}});var VC4=_T4();Object.defineProperty(J5,"diag",{enumerable:!0,get:function(){return VC4.diag}});var AC4=hT4();Object.defineProperty(J5,"metrics",{enumerable:!0,get:function(){return AC4.metrics}});var FC4=eT4();Object.defineProperty(J5,"propagation",{enumerable:!0,get:function(){return FC4.propagation}});var DC4=KC4();Object.defineProperty(J5,"trace",{enumerable:!0,get:function(){return DC4.trace}});J5.default={context:zC4.context,diag:VC4.diag,metrics:AC4.metrics,propagation:FC4.propagation,trace:DC4.trace}});var rG0=($,Y,X)=>{return(G,J)=>{let Q=-1;return W(0);async function W(Z){if(Z<=Q)throw Error("next() called multiple times");Q=Z;let K,H=!1,z;if($[Z])z=$[Z][0][0],G.req.routeIndex=Z;else z=Z===$.length&&J||void 0;if(z)try{K=await z(G,()=>W(Z+1))}catch(V){if(V instanceof Error&&Y)G.error=V,K=await Y(V,G),H=!0;else throw V}else if(G.finalized===!1&&X)K=await X(G);if(K&&(G.finalized===!1||H))G.res=K;return G}}};var k0=class extends Error{res;status;constructor($=500,Y){super(Y?.message,{cause:Y?.cause});this.res=Y?.res,this.status=$}getResponse(){if(this.res)return new Response(this.res.body,{status:this.status,headers:this.res.headers});return new Response(this.message,{status:this.status})}};var tn0=Symbol();var en0=async($,Y=Object.create(null))=>{let{all:X=!1,dot:G=!1}=Y,Q=($ instanceof Hc?$.raw.headers:$.headers).get("Content-Type");if(Q?.startsWith("multipart/form-data")||Q?.startsWith("application/x-www-form-urlencoded"))return wb4($,{all:X,dot:G});return{}};async function wb4($,Y){let X=await $.formData();if(X)return _b4(X,Y);return{}}function _b4($,Y){let X=Object.create(null);if($.forEach((G,J)=>{if(!(Y.all||J.endsWith("[]")))X[J]=G;else jb4(X,J,G)}),Y.dot)Object.entries(X).forEach(([G,J])=>{if(G.includes("."))Tb4(X,G,J),delete X[G]});return X}var jb4=($,Y,X)=>{if($[Y]!==void 0)if(Array.isArray($[Y]))$[Y].push(X);else $[Y]=[$[Y],X];else if(!Y.endsWith("[]"))$[Y]=X;else $[Y]=[X]},Tb4=($,Y,X)=>{if(/(?:^|\.)__proto__\./.test(Y))return;let G=$,J=Y.split(".");J.forEach((Q,W)=>{if(W===J.length-1)G[Q]=X;else{if(!G[Q]||typeof G[Q]!=="object"||Array.isArray(G[Q])||G[Q]instanceof File)G[Q]=Object.create(null);G=G[Q]}})};var sG0=($)=>{let Y=$.split("/");if(Y[0]==="")Y.shift();return Y},$r0=($)=>{let{groups:Y,path:X}=Cb4($),G=sG0(X);return Sb4(G,Y)},Cb4=($)=>{let Y=[];return $=$.replace(/\{[^}]+\}/g,(X,G)=>{let J=`@${G}`;return Y.push([J,X]),J}),{groups:Y,path:$}},Sb4=($,Y)=>{for(let X=Y.length-1;X>=0;X--){let[G]=Y[X];for(let J=$.length-1;J>=0;J--)if($[J].includes(G)){$[J]=$[J].replace(G,Y[X][1]);break}}return $},zc={},Yr0=($,Y)=>{if($==="*")return"*";let X=$.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(X){let G=`${$}#${Y}`;if(!zc[G])if(X[2])zc[G]=Y&&Y[0]!==":"&&Y[0]!=="*"?[G,X[1],new RegExp(`^${X[2]}(?=/${Y})`)]:[$,X[1],new RegExp(`^${X[2]}$`)];else zc[G]=[$,X[1],!0];return zc[G]}return null},VR=($,Y)=>{try{return Y($)}catch{return $.replace(/(?:%[0-9A-Fa-f]{2})+/g,(X)=>{try{return Y(X)}catch{return X}})}},oG0=($)=>VR($,decodeURI),tG0=($)=>{let Y=$.url,X=Y.indexOf("/",Y.indexOf(":")+4),G=X;for(;G<Y.length;G++){let J=Y.charCodeAt(G);if(J===37){let Q=Y.indexOf("?",G),W=Y.indexOf("#",G),Z=Q===-1?W===-1?void 0:W:W===-1?Q:Math.min(Q,W),K=Y.slice(X,Z);return oG0(K.includes("%25")?K.replace(/%25/g,"%2525"):K)}else if(J===63||J===35)break}return Y.slice(X,G)};var Xr0=($)=>{let Y=tG0($);return Y.length>1&&Y.at(-1)==="/"?Y.slice(0,-1):Y},E2=($,Y,...X)=>{if(X.length)Y=E2(Y,...X);return`${$?.[0]==="/"?"":"/"}${$}${Y==="/"?"":`${$?.at(-1)==="/"?"":"/"}${Y?.[0]==="/"?Y.slice(1):Y}`}`},Vc=($)=>{if($.charCodeAt($.length-1)!==63||!$.includes(":"))return null;let Y=$.split("/"),X=[],G="";return Y.forEach((J)=>{if(J!==""&&!/\:/.test(J))G+="/"+J;else if(/\:/.test(J))if(/\?/.test(J)){if(X.length===0&&G==="")X.push("/");else X.push(G);let Q=J.replace("?","");G+="/"+Q,X.push(G)}else G+="/"+J}),X.filter((J,Q,W)=>W.indexOf(J)===Q)},aG0=($)=>{if(!/[%+]/.test($))return $;if($.indexOf("+")!==-1)$=$.replace(/\+/g," ");return $.indexOf("%")!==-1?VR($,$S):$},Gr0=($,Y,X)=>{let G;if(!X&&Y&&!/[%+]/.test(Y)){let W=$.indexOf("?",8);if(W===-1)return;if(!$.startsWith(Y,W+1))W=$.indexOf(`&${Y}`,W+1);while(W!==-1){let Z=$.charCodeAt(W+Y.length+1);if(Z===61){let K=W+Y.length+2,H=$.indexOf("&",K);return aG0($.slice(K,H===-1?void 0:H))}else if(Z==38||isNaN(Z))return"";W=$.indexOf(`&${Y}`,W+1)}if(G=/[%+]/.test($),!G)return}let J={};G??=/[%+]/.test($);let Q=$.indexOf("?",8);while(Q!==-1){let W=$.indexOf("&",Q+1),Z=$.indexOf("=",Q);if(Z>W&&W!==-1)Z=-1;let K=$.slice(Q+1,Z===-1?W===-1?void 0:W:Z);if(G)K=aG0(K);if(Q=W,K==="")continue;let H;if(Z===-1)H="";else if(H=$.slice(Z+1,W===-1?void 0:W),G)H=aG0(H);if(X){if(!(J[K]&&Array.isArray(J[K])))J[K]=[];J[K].push(H)}else J[K]??=H}return Y?J[Y]:J},Jr0=Gr0,Qr0=($,Y)=>{return Gr0($,Y,!0)},$S=decodeURIComponent;var Wr0=($)=>VR($,$S),Hc=class{raw;#$;#Y;routeIndex=0;path;bodyCache={};constructor($,Y="/",X=[[]]){this.raw=$,this.path=Y,this.#Y=X,this.#$={}}param($){return $?this.#X($):this.#J()}#X($){let Y=this.#Y[0][this.routeIndex][1][$],X=this.#G(Y);return X&&/\%/.test(X)?Wr0(X):X}#J(){let $={},Y=Object.keys(this.#Y[0][this.routeIndex][1]);for(let X of Y){let G=this.#G(this.#Y[0][this.routeIndex][1][X]);if(G!==void 0)$[X]=/\%/.test(G)?Wr0(G):G}return $}#G($){return this.#Y[1]?this.#Y[1][$]:$}query($){return Jr0(this.url,$)}queries($){return Qr0(this.url,$)}header($){if($)return this.raw.headers.get($)??void 0;let Y={};return this.raw.headers.forEach((X,G)=>{Y[G]=X}),Y}async parseBody($){return en0(this,$)}#Q=($)=>{let{bodyCache:Y,raw:X}=this,G=Y[$];if(G)return G;let J=Object.keys(Y)[0];if(J)return Y[J].then((Q)=>{if(J==="json")Q=JSON.stringify(Q);return new Response(Q)[$]()});return Y[$]=X[$]()};json(){return this.#Q("text").then(($)=>JSON.parse($))}text(){return this.#Q("text")}arrayBuffer(){return this.#Q("arrayBuffer")}blob(){return this.#Q("blob")}formData(){return this.#Q("formData")}addValidatedData($,Y){this.#$[$]=Y}valid($){return this.#$[$]}get url(){return this.raw.url}get method(){return this.raw.method}get[tn0](){return this.#Y}get matchedRoutes(){return this.#Y[0].map(([[,$]])=>$)}get routePath(){return this.#Y[0].map(([[,$]])=>$)[this.routeIndex].path}},Zr0=async($)=>{if(!$.raw.bodyUsed)return $.raw.clone();let Y=Object.keys($.bodyCache)[0];if(!Y)throw new k0(500,{message:"Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly."});let X={body:await $[Y](),cache:$.raw.cache,credentials:$.raw.credentials,headers:$.header(),integrity:$.raw.integrity,keepalive:$.raw.keepalive,method:$.method,mode:$.raw.mode,redirect:$.raw.redirect,referrer:$.raw.referrer,referrerPolicy:$.raw.referrerPolicy,signal:$.raw.signal};return new Request($.url,X)};var Ac={Stringify:1,BeforeStream:2,Stream:3},Kr0=($,Y)=>{let X=new String($);return X.isEscaped=!0,X.callbacks=Y,X};var YS=async($,Y,X,G,J)=>{if(typeof $==="object"&&!($ instanceof String)){if(!($ instanceof Promise))$=$.toString();if($ instanceof Promise)$=await $}let Q=$.callbacks;if(!Q?.length)return Promise.resolve($);if(J)J[0]+=$;else J=[$];let W=Promise.all(Q.map((Z)=>Z({phase:Y,buffer:J,context:G}))).then((Z)=>Promise.all(Z.filter(Boolean).map((K)=>YS(K,Y,!1,G,J))).then(()=>J[0]));if(X)return Kr0(await W,Q);else return W};var Ur0="text/plain; charset=UTF-8",eG0=($,Y)=>{return{"Content-Type":$,...Y}},XS=($,Y)=>new Response($,Y),Hr0=class{#$;#Y;env={};#X;finalized=!1;error;#J;#G;#Q;#U;#K;#W;#H;#A;#V;constructor($,Y){if(this.#$=$,Y)this.#G=Y.executionCtx,this.env=Y.env,this.#W=Y.notFoundHandler,this.#V=Y.path,this.#A=Y.matchResult}get req(){return this.#Y??=new Hc(this.#$,this.#V,this.#A),this.#Y}get event(){if(this.#G&&"respondWith"in this.#G)return this.#G;else throw Error("This context has no FetchEvent")}get executionCtx(){if(this.#G)return this.#G;else throw Error("This context has no ExecutionContext")}get res(){return this.#Q||=XS(null,{headers:this.#H??=new Headers})}set res($){if(this.#Q&&$){$=XS($.body,$);for(let[Y,X]of this.#Q.headers.entries()){if(Y==="content-type")continue;if(Y==="set-cookie"){let G=this.#Q.headers.getSetCookie();$.headers.delete("set-cookie");for(let J of G)$.headers.append("set-cookie",J)}else $.headers.set(Y,X)}}this.#Q=$,this.finalized=!0}render=(...$)=>{return this.#K??=(Y)=>this.html(Y),this.#K(...$)};setLayout=($)=>this.#U=$;getLayout=()=>this.#U;setRenderer=($)=>{this.#K=$};header=($,Y,X)=>{if(this.finalized)this.#Q=XS(this.#Q.body,this.#Q);let G=this.#Q?this.#Q.headers:this.#H??=new Headers;if(Y===void 0)G.delete($);else if(X?.append)G.append($,Y);else G.set($,Y)};status=($)=>{this.#J=$};set=($,Y)=>{this.#X??=new Map,this.#X.set($,Y)};get=($)=>{return this.#X?this.#X.get($):void 0};get var(){if(!this.#X)return{};return Object.fromEntries(this.#X)}#Z($,Y,X){let G=this.#Q?new Headers(this.#Q.headers):this.#H??new Headers;if(typeof Y==="object"&&"headers"in Y){let Q=Y.headers instanceof Headers?Y.headers:new Headers(Y.headers);for(let[W,Z]of Q)if(W.toLowerCase()==="set-cookie")G.append(W,Z);else G.set(W,Z)}if(X)for(let[Q,W]of Object.entries(X))if(typeof W==="string")G.set(Q,W);else{G.delete(Q);for(let Z of W)G.append(Q,Z)}let J=typeof Y==="number"?Y:Y?.status??this.#J;return XS($,{status:J,headers:G})}newResponse=(...$)=>this.#Z(...$);body=($,Y,X)=>this.#Z($,Y,X);text=($,Y,X)=>{return!this.#H&&!this.#J&&!Y&&!X&&!this.finalized?new Response($):this.#Z($,Y,eG0(Ur0,X))};json=($,Y,X)=>{return this.#Z(JSON.stringify($),Y,eG0("application/json",X))};html=($,Y,X)=>{let G=(J)=>this.#Z(J,Y,eG0("text/html; charset=UTF-8",X));return typeof $==="object"?YS($,Ac.Stringify,!1,{}).then(G):G($)};redirect=($,Y)=>{let X=String($);return this.header("Location",!/[^\x00-\xFF]/.test(X)?X:encodeURI(X)),this.newResponse(null,Y??302)};notFound=()=>{return this.#W??=()=>XS(),this.#W(this)}};var W5="ALL",zr0="all",Vr0=["get","post","put","delete","options","patch"],Fc="Can not add a route since the matcher is already built.",Dc=class extends Error{};var $J0="__COMPOSED_HANDLER";var kb4=($)=>{return $.text("404 Not Found",404)},Ar0=($,Y)=>{if("getResponse"in $){let X=$.getResponse();return Y.newResponse(X.body,X)}return console.error($),Y.text("Internal Server Error",500)},Fr0=class ${get;post;put;delete;options;patch;all;on;use;router;getPath;_basePath="/";#$="/";routes=[];constructor(Y={}){[...Vr0,zr0].forEach((Q)=>{this[Q]=(W,...Z)=>{if(typeof W==="string")this.#$=W;else this.#J(Q,this.#$,W);return Z.forEach((K)=>{this.#J(Q,this.#$,K)}),this}}),this.on=(Q,W,...Z)=>{for(let K of[W].flat()){this.#$=K;for(let H of[Q].flat())Z.map((z)=>{this.#J(H.toUpperCase(),this.#$,z)})}return this},this.use=(Q,...W)=>{if(typeof Q==="string")this.#$=Q;else this.#$="*",W.unshift(Q);return W.forEach((Z)=>{this.#J(W5,this.#$,Z)}),this};let{strict:G,...J}=Y;Object.assign(this,J),this.getPath=G??!0?Y.getPath??tG0:Xr0}#Y(){let Y=new $({router:this.router,getPath:this.getPath});return Y.errorHandler=this.errorHandler,Y.#X=this.#X,Y.routes=this.routes,Y}#X=kb4;errorHandler=Ar0;route(Y,X){let G=this.basePath(Y);return X.routes.map((J)=>{let Q;if(X.errorHandler===Ar0)Q=J.handler;else Q=async(W,Z)=>(await rG0([],X.errorHandler)(W,()=>J.handler(W,Z))).res,Q[$J0]=J.handler;G.#J(J.method,J.path,Q)}),this}basePath(Y){let X=this.#Y();return X._basePath=E2(this._basePath,Y),X}onError=(Y)=>{return this.errorHandler=Y,this};notFound=(Y)=>{return this.#X=Y,this};mount(Y,X,G){let J,Q;if(G)if(typeof G==="function")Q=G;else if(Q=G.optionHandler,G.replaceRequest===!1)J=(K)=>K;else J=G.replaceRequest;let W=Q?(K)=>{let H=Q(K);return Array.isArray(H)?H:[H]}:(K)=>{let H=void 0;try{H=K.executionCtx}catch{}return[K.env,H]};J||=(()=>{let K=E2(this._basePath,Y),H=K==="/"?0:K.length;return(z)=>{let V=new URL(z.url);return V.pathname=V.pathname.slice(H)||"/",new Request(V,z)}})();let Z=async(K,H)=>{let z=await X(J(K.req.raw),...W(K));if(z)return z;await H()};return this.#J(W5,E2(Y,"*"),Z),this}#J(Y,X,G){Y=Y.toUpperCase(),X=E2(this._basePath,X);let J={basePath:this._basePath,path:X,method:Y,handler:G};this.router.add(Y,X,[G,J]),this.routes.push(J)}#G(Y,X){if(Y instanceof Error)return this.errorHandler(Y,X);throw Y}#Q(Y,X,G,J){if(J==="HEAD")return(async()=>new Response(null,await this.#Q(Y,X,G,"GET")))();let Q=this.getPath(Y,{env:G}),W=this.router.match(J,Q),Z=new Hr0(Y,{path:Q,matchResult:W,env:G,executionCtx:X,notFoundHandler:this.#X});if(W[0].length===1){let H;try{H=W[0][0][0][0](Z,async()=>{Z.res=await this.#X(Z)})}catch(z){return this.#G(z,Z)}return H instanceof Promise?H.then((z)=>z||(Z.finalized?Z.res:this.#X(Z))).catch((z)=>this.#G(z,Z)):H??this.#X(Z)}let K=rG0(W[0],this.errorHandler,this.#X);return(async()=>{try{let H=await K(Z);if(!H.finalized)throw Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return H.res}catch(H){return this.#G(H,Z)}})()}fetch=(Y,...X)=>{return this.#Q(Y,X[1],X[0],Y.method)};request=(Y,X,G,J)=>{if(Y instanceof Request)return this.fetch(X?new Request(Y,X):Y,G,J);return Y=Y.toString(),this.fetch(new Request(/^https?:\/\//.test(Y)?Y:`http://localhost${E2("/",Y)}`,X),G,J)};fire=()=>{addEventListener("fetch",(Y)=>{Y.respondWith(this.#Q(Y.request,Y,void 0,Y.request.method))})}};var GS=[];function Nc($,Y){let X=this.buildAllMatchers(),G=(J,Q)=>{let W=X[J]||X[W5],Z=W[2][Q];if(Z)return Z;let K=Q.match(W[0]);if(!K)return[[],GS];let H=K.indexOf("",1);return[W[1][H],K]};return this.match=G,G($,Y)}var Lc="[^/]+",JS=".*",QS="(?:|/.*)",MN=Symbol(),vb4=new Set(".\\+*[^]$()");function xb4($,Y){if($.length===1)return Y.length===1?$<Y?-1:1:-1;if(Y.length===1)return 1;if($===JS||$===QS)return 1;else if(Y===JS||Y===QS)return-1;if($===Lc)return 1;else if(Y===Lc)return-1;return $.length===Y.length?$<Y?-1:1:Y.length-$.length}var Dr0=class ${#$;#Y;#X=Object.create(null);insert(Y,X,G,J,Q){if(Y.length===0){if(this.#$!==void 0)throw MN;if(Q)return;this.#$=X;return}let[W,...Z]=Y,K=W==="*"?Z.length===0?["","",JS]:["","",Lc]:W==="/*"?["","",QS]:W.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/),H;if(K){let z=K[1],V=K[2]||Lc;if(z&&K[2]){if(V===".*")throw MN;if(V=V.replace(/^\((?!\?:)(?=[^)]+\)$)/,"(?:"),/\((?!\?:)/.test(V))throw MN}if(H=this.#X[V],!H){if(Object.keys(this.#X).some((A)=>A!==JS&&A!==QS))throw MN;if(Q)return;if(H=this.#X[V]=new $,z!=="")H.#Y=J.varIndex++}if(!Q&&z!=="")G.push([z,H.#Y])}else if(H=this.#X[W],!H){if(Object.keys(this.#X).some((z)=>z.length>1&&z!==JS&&z!==QS))throw MN;if(Q)return;H=this.#X[W]=new $}H.insert(Z,X,G,J,Q)}buildRegExpStr(){let X=Object.keys(this.#X).sort(xb4).map((G)=>{let J=this.#X[G];return(typeof J.#Y==="number"?`(${G})@${J.#Y}`:vb4.has(G)?`\\${G}`:G)+J.buildRegExpStr()});if(typeof this.#$==="number")X.unshift(`#${this.#$}`);if(X.length===0)return"";if(X.length===1)return X[0];return"(?:"+X.join("|")+")"}};var Nr0=class{#$={varIndex:0};#Y=new Dr0;insert($,Y,X){let G=[],J=[];for(let W=0;;){let Z=!1;if($=$.replace(/\{[^}]+\}/g,(K)=>{let H=`@\\${W}`;return J[W]=[H,K],W++,Z=!0,H}),!Z)break}let Q=$.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let W=J.length-1;W>=0;W--){let[Z]=J[W];for(let K=Q.length-1;K>=0;K--)if(Q[K].indexOf(Z)!==-1){Q[K]=Q[K].replace(Z,J[W][1]);break}}return this.#Y.insert(Q,Y,G,this.#$,X),G}buildRegExp(){let $=this.#Y.buildRegExpStr();if($==="")return[/^$/,[],[]];let Y=0,X=[],G=[];return $=$.replace(/#(\d+)|@(\d+)|\.\*\$/g,(J,Q,W)=>{if(Q!==void 0)return X[++Y]=Number(Q),"$()";if(W!==void 0)return G[Number(W)]=++Y,"";return""}),[new RegExp(`^${$}`),X,G]}};var yb4=[/^$/,[],Object.create(null)],Lr0=Object.create(null);function Br0($){return Lr0[$]??=new RegExp($==="*"?"":`^${$.replace(/\/\*$|([.\\+*[^\]$()])/g,(Y,X)=>X?`\\${X}`:"(?:|/.*)")}$`)}function bb4(){Lr0=Object.create(null)}function hb4($){let Y=new Nr0,X=[];if($.length===0)return yb4;let G=$.map((H)=>[!/\*|\/:/.test(H[0]),...H]).sort(([H,z],[V,A])=>H?1:V?-1:z.length-A.length),J=Object.create(null);for(let H=0,z=-1,V=G.length;H<V;H++){let[A,F,N]=G[H];if(A)J[F]=[N.map(([L])=>[L,Object.create(null)]),GS];else z++;let D;try{D=Y.insert(F,z,A)}catch(L){throw L===MN?new Dc(F):L}if(A)continue;X[z]=N.map(([L,B])=>{let O=Object.create(null);B-=1;for(;B>=0;B--){let[E,M]=D[B];O[E]=M}return[L,O]})}let[Q,W,Z]=Y.buildRegExp();for(let H=0,z=X.length;H<z;H++)for(let V=0,A=X[H].length;V<A;V++){let F=X[H][V]?.[1];if(!F)continue;let N=Object.keys(F);for(let D=0,L=N.length;D<L;D++)F[N[D]]=Z[F[N[D]]]}let K=[];for(let H in W)K[H]=X[W[H]];return[Q,K,J]}function AR($,Y){if(!$)return;for(let X of Object.keys($).sort((G,J)=>J.length-G.length))if(Br0(X).test(Y))return[...$[X]];return}var Bc=class{name="RegExpRouter";#$;#Y;constructor(){this.#$={[W5]:Object.create(null)},this.#Y={[W5]:Object.create(null)}}add($,Y,X){let G=this.#$,J=this.#Y;if(!G||!J)throw Error(Fc);if(!G[$])[G,J].forEach((Z)=>{Z[$]=Object.create(null),Object.keys(Z[W5]).forEach((K)=>{Z[$][K]=[...Z[W5][K]]})});if(Y==="/*")Y="*";let Q=(Y.match(/\/:/g)||[]).length;if(/\*$/.test(Y)){let Z=Br0(Y);if($===W5)Object.keys(G).forEach((K)=>{G[K][Y]||=AR(G[K],Y)||AR(G[W5],Y)||[]});else G[$][Y]||=AR(G[$],Y)||AR(G[W5],Y)||[];Object.keys(G).forEach((K)=>{if($===W5||$===K)Object.keys(G[K]).forEach((H)=>{Z.test(H)&&G[K][H].push([X,Q])})}),Object.keys(J).forEach((K)=>{if($===W5||$===K)Object.keys(J[K]).forEach((H)=>Z.test(H)&&J[K][H].push([X,Q]))});return}let W=Vc(Y)||[Y];for(let Z=0,K=W.length;Z<K;Z++){let H=W[Z];Object.keys(J).forEach((z)=>{if($===W5||$===z)J[z][H]||=[...AR(G[z],H)||AR(G[W5],H)||[]],J[z][H].push([X,Q-K+Z+1])})}}match=Nc;buildAllMatchers(){let $=Object.create(null);return Object.keys(this.#Y).concat(Object.keys(this.#$)).forEach((Y)=>{$[Y]||=this.#X(Y)}),this.#$=this.#Y=void 0,bb4(),$}#X($){let Y=[],X=$===W5;if([this.#$,this.#Y].forEach((G)=>{let J=G[$]?Object.keys(G[$]).map((Q)=>[Q,G[$][Q]]):[];if(J.length!==0)X||=!0,Y.push(...J);else if($!==W5)Y.push(...Object.keys(G[W5]).map((Q)=>[Q,G[W5][Q]]))}),!X)return null;else return hb4(Y)}};var fb4=class{name="PreparedRegExpRouter";#$;#Y;constructor($,Y){this.#$=$,this.#Y=Y}#X($,Y){let X=this.#$[$];X[1].forEach((G)=>G&&G.push(Y)),Object.values(X[2]).forEach((G)=>G[0].push(Y))}#J($,Y,X,G,J){let Q=this.#$[$];if(!J)Q[2][Y][0].push([X,{}]);else G.forEach((W)=>{if(typeof W==="number")Q[1][W].push([X,J]);else Q[2][W||Y][0].push([X,J])})}add($,Y,X){if(!this.#$[$]){let J=this.#$[W5],Q={};for(let W in J[2])Q[W]=[J[2][W][0].slice(),GS];this.#$[$]=[J[0],J[1].map((W)=>Array.isArray(W)?W.slice():0),Q]}if(Y==="/*"||Y==="*"){let J=[X,{}];if($===W5)for(let Q in this.#$)this.#X(Q,J);else this.#X($,J);return}let G=this.#Y[Y];if(!G)throw Error(`Path ${Y} is not registered`);for(let[J,Q]of G)if($===W5)for(let W in this.#$)this.#J(W,Y,X,J,Q);else this.#J($,Y,X,J,Q)}buildAllMatchers(){return this.#$}match=Nc};var YJ0=class{name="SmartRouter";#$=[];#Y=[];constructor($){this.#$=$.routers}add($,Y,X){if(!this.#Y)throw Error(Fc);this.#Y.push([$,Y,X])}match($,Y){if(!this.#Y)throw Error("Fatal error");let X=this.#$,G=this.#Y,J=X.length,Q=0,W;for(;Q<J;Q++){let Z=X[Q];try{for(let K=0,H=G.length;K<H;K++)Z.add(...G[K]);W=Z.match($,Y)}catch(K){if(K instanceof Dc)continue;throw K}this.match=Z.match.bind(Z),this.#$=[Z],this.#Y=void 0;break}if(Q===J)throw Error("Fatal error");return this.name=`SmartRouter + ${this.activeRouter.name}`,W}get activeRouter(){if(this.#Y||this.#$.length!==1)throw Error("No active router has been determined yet.");return this.#$[0]}};var WS=Object.create(null),gb4=($)=>{for(let Y in $)return!0;return!1},Or0=class ${#$;#Y;#X;#J=0;#G=WS;constructor(Y,X,G){if(this.#Y=G||Object.create(null),this.#$=[],Y&&X){let J=Object.create(null);J[Y]={handler:X,possibleKeys:[],score:0},this.#$=[J]}this.#X=[]}insert(Y,X,G){this.#J=++this.#J;let J=this,Q=$r0(X),W=[];for(let Z=0,K=Q.length;Z<K;Z++){let H=Q[Z],z=Q[Z+1],V=Yr0(H,z),A=Array.isArray(V)?V[0]:H;if(A in J.#Y){if(J=J.#Y[A],V)W.push(V[1]);continue}if(J.#Y[A]=new $,V)J.#X.push(V),W.push(V[1]);J=J.#Y[A]}return J.#$.push({[Y]:{handler:G,possibleKeys:W.filter((Z,K,H)=>H.indexOf(Z)===K),score:this.#J}}),J}#Q(Y,X,G,J,Q){for(let W=0,Z=X.#$.length;W<Z;W++){let K=X.#$[W],H=K[G]||K[W5],z={};if(H!==void 0){if(H.params=Object.create(null),Y.push(H),J!==WS||Q&&Q!==WS)for(let V=0,A=H.possibleKeys.length;V<A;V++){let F=H.possibleKeys[V],N=z[H.score];H.params[F]=Q?.[F]&&!N?Q[F]:J[F]??Q?.[F],z[H.score]=!0}}}}search(Y,X){let G=[];this.#G=WS;let Q=[this],W=sG0(X),Z=[],K=W.length,H=null;for(let z=0;z<K;z++){let V=W[z],A=z===K-1,F=[];for(let D=0,L=Q.length;D<L;D++){let B=Q[D],O=B.#Y[V];if(O)if(O.#G=B.#G,A){if(O.#Y["*"])this.#Q(G,O.#Y["*"],Y,B.#G);this.#Q(G,O,Y,B.#G)}else F.push(O);for(let E=0,M=B.#X.length;E<M;E++){let R=B.#X[E],q=B.#G===WS?{}:{...B.#G};if(R==="*"){let C=B.#Y["*"];if(C)this.#Q(G,C,Y,B.#G),C.#G=q,F.push(C);continue}let[w,I,P]=R;if(!V&&!(P instanceof RegExp))continue;let _=B.#Y[w];if(P instanceof RegExp){if(H===null){H=Array(K);let S=X[0]==="/"?1:0;for(let T=0;T<K;T++)H[T]=S,S+=W[T].length+1}let C=X.substring(H[z]),k=P.exec(C);if(k){if(q[I]=k[0],this.#Q(G,_,Y,B.#G,q),gb4(_.#Y)){_.#G=q;let S=k[0].match(/\//)?.length??0;(Z[S]||=[]).push(_)}continue}}if(P===!0||P.test(V))if(q[I]=V,A){if(this.#Q(G,_,Y,q,B.#G),_.#Y["*"])this.#Q(G,_.#Y["*"],Y,q,B.#G)}else _.#G=q,F.push(_)}}let N=Z.shift();Q=N?F.concat(N):F}if(G.length>1)G.sort((z,V)=>{return z.score-V.score});return[G.map(({handler:z,params:V})=>[z,V])]}};var XJ0=class{name="TrieRouter";#$;constructor(){this.#$=new Or0}add($,Y,X){let G=Vc(Y);if(G){for(let J=0,Q=G.length;J<Q;J++)this.#$.insert($,G[J],X);return}this.#$.insert($,Y,X)}match($,Y){return this.#$.search($,Y)}};var O4=class extends Fr0{constructor($={}){super($);this.router=$.router??new YJ0({routers:[new Bc,new XJ0]})}};Rr0();import{stat as ob4}from"fs/promises";import{join as tb4}from"path";var qr0=/^\s*(?:text\/(?!event-stream(?:[;\s]|$))[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i;var JJ0=($,Y=rb4)=>{let X=/\.([a-zA-Z0-9]+?)$/,G=$.match(X);if(!G)return;let J=Y[G[1].toLowerCase()];if(J&&J.startsWith("text"))J+="; charset=utf-8";return J};var nb4={aac:"audio/aac",avi:"video/x-msvideo",avif:"image/avif",av1:"video/av1",bin:"application/octet-stream",bmp:"image/bmp",css:"text/css",csv:"text/csv",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",gif:"image/gif",gz:"application/gzip",htm:"text/html",html:"text/html",ico:"image/x-icon",ics:"text/calendar",jpeg:"image/jpeg",jpg:"image/jpeg",js:"text/javascript",json:"application/json",jsonld:"application/ld+json",map:"application/json",mid:"audio/x-midi",midi:"audio/x-midi",mjs:"text/javascript",mp3:"audio/mpeg",mp4:"video/mp4",mpeg:"video/mpeg",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",opus:"audio/opus",otf:"font/otf",pdf:"application/pdf",png:"image/png",rtf:"application/rtf",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",ttf:"font/ttf",txt:"text/plain",wasm:"application/wasm",webm:"video/webm",weba:"audio/webm",webmanifest:"application/manifest+json",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xml:"application/xml",zip:"application/zip","3gp":"video/3gpp","3g2":"video/3gpp2",gltf:"model/gltf+json",glb:"model/gltf-binary"},rb4=nb4;var Ir0=(...$)=>{let Y=$.filter((J)=>J!=="").join("/");Y=Y.replace(/(?<=\/)\/+/g,"");let X=Y.split("/"),G=[];for(let J of X)if(J===".."&&G.length>0&&G.at(-1)!=="..")G.pop();else if(J!==".")G.push(J);return G.join("/")||"."};var Pr0={br:".br",zstd:".zst",gzip:".gz"},ab4=Object.keys(Pr0),sb4="index.html",wr0=($)=>{let Y=$.root??"./",X=$.path,G=$.join??Ir0;return async(J,Q)=>{if(J.finalized)return Q();let W;if($.path)W=$.path;else try{if(W=oG0(J.req.path),/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}/.test(W))throw Error()}catch{return await $.onNotFound?.(J.req.path,J),Q()}let Z=G(Y,!X&&$.rewriteRequestPath?$.rewriteRequestPath(W):W);if($.isDir&&await $.isDir(Z))Z=G(Z,sb4);let K=$.getContent,H=await K(Z,J);if(H instanceof Response)return J.newResponse(H.body,H);if(H){let z=$.mimes&&JJ0(Z,$.mimes)||JJ0(Z);if(J.header("Content-Type",z||"application/octet-stream"),$.precompressed&&(!z||qr0.test(z))){let V=new Set(J.req.header("Accept-Encoding")?.split(",").map((A)=>A.trim()));for(let A of ab4){if(!V.has(A))continue;let F=await K(Z+Pr0[A],J);if(F){H=F,J.header("Content-Encoding",A),J.header("Vary","Accept-Encoding",{append:!0});break}}}return await $.onFound?.(Z,J),J.body(H)}await $.onNotFound?.(Z,J),await Q();return}};var v5=($)=>{return async function(X,G){return wr0({...$,getContent:async(W)=>{let Z=Bun.file(W);return await Z.exists()?Z:null},join:tb4,isDir:async(W)=>{let Z;try{Z=(await ob4(W)).isDirectory()}catch{}return Z}})(X,G)}};var QJ0="x-hono-disable-ssg",nf9=(()=>{try{return new Response("SSG is disabled",{status:404,headers:{[QJ0]:"true"}})}catch{return null}})();var{write:Tg9}=Bun;var Yh4=class{#$;constructor($){this.#$=$,this.raw=$.raw,this.url=$.url?new URL($.url):null,this.protocol=$.protocol??null}send($,Y){this.#$.send($,Y??{})}raw;binaryType="arraybuffer";get readyState(){return this.#$.readyState}url;protocol;close($,Y){this.#$.close($,Y)}};var _r0=($)=>{return(...Y)=>{if(typeof Y[0]==="function"){let[X,G]=Y;return async function(Q,W){let Z=await X(Q),K=await $(Q,Z,G);if(K)return K;await W()}}else{let[X,G,J]=Y;return(async()=>{let Q=await $(X,G,J);if(!Q)throw Error("Failed to upgrade WebSocket");return Q})()}}};var Oc=($)=>("server"in $.env)?$.env.server:$.env;var Xh4=_r0(($,Y)=>{let X=Oc($);if(!X)throw TypeError("env has to include the 2nd argument of fetch.");if(X.upgrade($.req.raw,{data:{events:Y,url:new URL($.req.url),protocol:$.req.url}}))return new Response(null);return});import{AsyncLocalStorage as Gh4}from"async_hooks";var jr0=new Gh4,Tr0=()=>{return async function(Y,X){await jr0.run(Y,X)}},Jh4=()=>{return jr0.getStore()},Z5=()=>{let $=Jh4();if(!$)throw Error("Context is not available");return $};var WJ0=($)=>{let Y={origin:"*",allowMethods:["GET","HEAD","PUT","POST","DELETE","PATCH"],allowHeaders:[],exposeHeaders:[],...$},X=((J)=>{if(typeof J==="string")if(J==="*"){if(Y.credentials)return(Q)=>Q||null;return()=>J}else return(Q)=>J===Q?Q:null;else if(typeof J==="function")return J;else return(Q)=>J.includes(Q)?Q:null})(Y.origin),G=((J)=>{if(typeof J==="function")return J;else if(Array.isArray(J))return()=>J;else return()=>[]})(Y.allowMethods);return async function(Q,W){function Z(H,z){Q.res.headers.set(H,z)}let K=await X(Q.req.header("origin")||"",Q);if(K)Z("Access-Control-Allow-Origin",K);if(Y.credentials)Z("Access-Control-Allow-Credentials","true");if(Y.exposeHeaders?.length)Z("Access-Control-Expose-Headers",Y.exposeHeaders.join(","));if(Q.req.method==="OPTIONS"){if(Y.origin!=="*"||Y.credentials)Z("Vary","Origin");if(Y.maxAge!=null)Z("Access-Control-Max-Age",Y.maxAge.toString());let H=await G(Q.req.header("origin")||"",Q);if(H.length)Z("Access-Control-Allow-Methods",H.join(","));let z=Y.allowHeaders;if(!z?.length){let V=Q.req.header("Access-Control-Request-Headers");if(V)z=V.split(/\s*,\s*/)}if(z?.length)Z("Access-Control-Allow-Headers",z.join(",")),Q.res.headers.append("Vary","Access-Control-Request-Headers");return Q.res.headers.delete("Content-Length"),Q.res.headers.delete("Content-Type"),new Response(null,{headers:Q.res.headers,status:204,statusText:"No Content"})}if(await W(),Y.origin!=="*"||Y.credentials)Q.header("Vary","Origin",{append:!0})}};var Ym9=class{initApp;#$;constructor($){this.initApp=$?.initApp,this.#$=$?.defaultAppOptions}createApp=($)=>{let Y=new O4($&&this.#$?{...this.#$,...$}:$??this.#$);if(this.initApp)this.initApp(Y);return Y};createMiddleware=($)=>$;createHandlers=(...$)=>{return $.filter((Y)=>Y!==void 0)}};var Cr0=($)=>$;var Sr0=($)=>{let Y=$?.query??"pretty";return async function(G,J){let Q=$?.force||G.req.query(Y)||G.req.query(Y)==="";if(await J(),Q&&G.res.headers.get("Content-Type")?.startsWith("application/json")){let W=await G.res.json();G.res=new Response(JSON.stringify(W,null,$?.space??2),G.res)}}};var kr0=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade"],Qh4=/^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/,Wh4=($,Y)=>{if(!$)return{};let X=new Headers($.headers);if(Y){let G=X.get("connection");if(G){let J=G.split(",").map((W)=>W.trim()),Q=J.filter((W)=>!Qh4.test(W));if(Q.length>0)throw new k0(400,{message:`Invalid Connection header value: ${Q.join(", ")}`});J.forEach((W)=>{X.delete(W)})}}return kr0.forEach((G)=>{X.delete(G)}),{method:$.method,body:$.body,duplex:$.body?"half":void 0,headers:X,signal:$.signal}},Zh4=($)=>{if(!$.headers||Array.isArray($.headers)||$.headers instanceof Headers)return $;let Y=new Headers;for(let[X,G]of Object.entries($.headers))if(G==null)Y.delete(X);else Y.set(X,G);return $.headers=Y,$},PH=async($,Y)=>{let{raw:X,customFetch:G,strictConnectionProcessing:J=!1,...Q}=Y instanceof Request?{raw:Y}:Y??{},W=new Request($,{...Wh4(X,J),...Zh4(Q)});W.headers.delete("accept-encoding");let Z=await(G||fetch)(W),K=new Headers(Z.headers);if(kr0.forEach((H)=>{K.delete(H)}),K.has("content-encoding"))K.delete("content-encoding"),K.delete("content-length");return new Response(Z.body,{status:Z.status,statusText:Z.statusText,headers:K})};var ZJ0=({limitLength:$=255,headerName:Y="X-Request-Id",generator:X=()=>crypto.randomUUID()}={})=>{return async function(J,Q){let W=Y?J.req.header(Y):void 0;if(!W||W.length>$||/[^\w\-=]/.test(W))W=X(J);if(J.set("requestId",W),Y)J.header(Y,W);await Q()}};var Kh4=new k0(504,{message:"Gateway Timeout"}),vr0=($,Y=Kh4)=>{return async function(G,J){let Q,W=new Promise((Z,K)=>{Q=setTimeout(()=>{K(typeof Y==="function"?Y(G):Y)},$)});try{await Promise.race([J(),W])}finally{if(Q!==void 0)clearTimeout(Q)}}};RN();var Mc={host:"localhost",port:6789,token:"",maxReconnectAttempts:1/0,reconnectDelay:100,maxReconnectDelay:30000,connectTimeout:5000,commandTimeout:30000,autoReconnect:!0,pingInterval:30000,maxPingFailures:3,pipelining:!0,maxInFlight:100};class KS{config;consecutivePingFailures=0;lastSuccessAt=null;lastErrorAt=null;connectedAt=null;totalCommands=0;totalErrors=0;latencyHistory=[];pingTimer=null;static MAX_LATENCY_HISTORY=10;constructor($){this.config=$}recordSuccess($){this.lastSuccessAt=Date.now(),this.totalCommands++,this.recordLatency($)}recordError(){this.lastErrorAt=Date.now(),this.totalErrors++}recordCommandSent(){this.totalCommands++}recordConnected(){this.connectedAt=Date.now(),this.consecutivePingFailures=0}recordPingSuccess($){this.consecutivePingFailures=0,this.recordLatency($)}recordPingFailure(){return this.consecutivePingFailures++,this.lastErrorAt=Date.now(),this.totalErrors++,this.consecutivePingFailures>=this.config.maxPingFailures}getHealth($){let Y=this.latencyHistory.length>0?this.latencyHistory.reduce((X,G)=>X+G,0)/this.latencyHistory.length:0;return{healthy:$==="connected"&&this.consecutivePingFailures<this.config.maxPingFailures,state:$,lastSuccessAt:this.lastSuccessAt,lastErrorAt:this.lastErrorAt,avgLatencyMs:Math.round(Y*100)/100,consecutivePingFailures:this.consecutivePingFailures,totalCommands:this.totalCommands,totalErrors:this.totalErrors,uptimeMs:this.connectedAt?Date.now()-this.connectedAt:0}}startPing($){if(this.config.pingInterval<=0)return;this.stopPing(),this.pingTimer=setInterval(()=>{$()},this.config.pingInterval)}stopPing(){if(this.pingTimer)clearInterval(this.pingTimer),this.pingTimer=null}recordLatency($){if(this.latencyHistory.push($),this.latencyHistory.length>KS.MAX_LATENCY_HISTORY)this.latencyHistory.shift()}}import{EventEmitter as Nh4}from"events";class Rc extends Nh4{config;on($,Y){return super.on($,Y)}once($,Y){return super.once($,Y)}reconnectAttempts=0;reconnectTimer=null;closed=!1;constructor($){super();this.config=$}setClosed($){if(this.closed=$,$)this.cancelReconnect()}isClosed(){return this.closed}reset(){this.reconnectAttempts=0}cancelReconnect(){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null}canReconnect(){return this.config.autoReconnect&&!this.closed}scheduleReconnect($){if(this.reconnectTimer||this.closed)return!1;if(this.reconnectAttempts++,this.reconnectAttempts>this.config.maxReconnectAttempts)return this.emit("maxReconnectAttemptsReached"),!1;let Y=Math.min(this.config.reconnectDelay*Math.pow(2,this.reconnectAttempts-1),this.config.maxReconnectDelay),X=Math.random()*0.3*Y,G=Y+X;return this.emit("reconnecting",{attempt:this.reconnectAttempts,delay:G}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,$().catch(()=>{})},G),!0}}function Lh4($){return $==="localhost"||$==="127.0.0.1"||$==="::1"||$==="[::1]"||$.endsWith(".localhost")}function Bh4($){let Y=$.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);if(!Y)return null;let[,X,G]=Y.map(Number);if(X===10)return"Webhook URL cannot point to private IP";if(X===172&&G>=16&&G<=31)return"Webhook URL cannot point to private IP";if(X===192&&G===168)return"Webhook URL cannot point to private IP";if(X===169&&G===254)return"Webhook URL cannot point to link-local IP";if(X===0)return"Webhook URL cannot point to unspecified IP";if(X===127)return"Webhook URL cannot point to loopback IP";return null}function Oh4($){return $==="169.254.169.254"||$==="metadata.google.internal"||$.endsWith(".internal")}function UJ0($){if(!$||$.length===0)return"Webhook URL is required";if($.length>2048)return"Webhook URL too long (max 2048 characters)";let Y;try{Y=new URL($)}catch{return"Invalid URL format"}if(Y.protocol!=="http:"&&Y.protocol!=="https:")return"Webhook URL must use http or https protocol";let X=Y.hostname.toLowerCase();if(Lh4(X))return"Webhook URL cannot point to localhost";let G=Bh4(X);if(G)return G;if(Oh4(X))return"Webhook URL cannot point to cloud metadata endpoints";return null}var Eh4=67108864;class qc extends Error{requestedSize;maxSize;constructor($,Y){super(`Frame size ${$} exceeds maximum allowed size ${Y}`);this.requestedSize=$,this.maxSize=Y,this.name="FrameSizeError"}}class FR{buffer=new Uint8Array(0);maxFrameSize;constructor($=Eh4){this.maxFrameSize=$}addData($){let Y=new Uint8Array(this.buffer.length+$.length);Y.set(this.buffer),Y.set($,this.buffer.length),this.buffer=Y;let X=[];while(this.buffer.length>=4){let G=(this.buffer[0]<<24|this.buffer[1]<<16|this.buffer[2]<<8|this.buffer[3])>>>0;if(G>this.maxFrameSize)throw this.buffer=new Uint8Array(0),new qc(G,this.maxFrameSize);if(this.buffer.length<4+G)break;X.push(this.buffer.slice(4,4+G)),this.buffer=this.buffer.slice(4+G)}return X}clear(){this.buffer=new Uint8Array(0)}static frame($){let Y=new Uint8Array(4+$.length);return Y[0]=$.length>>24&255,Y[1]=$.length>>16&255,Y[2]=$.length>>8&255,Y[3]=$.length&255,Y.set($,4),Y}}async function HJ0($,Y,X){return new Promise((G,J)=>{let Q={write:()=>{},end:()=>{},frameParser:new FR},W=!1,Z=null,K=()=>{if(Z)clearTimeout(Z),Z=null},H=`${$.host}:${$.port}`,z={data(V,A){let F;try{F=Q.frameParser.addData(new Uint8Array(A))}catch(N){if(N instanceof qc){X.onError(Error(`Frame too large: ${N.requestedSize} bytes exceeds maximum ${N.maxSize}`));return}throw N}for(let N of F)X.onData(N)},open(V){K(),Q.write=(A)=>V.write(A),Q.end=()=>V.end(),W=!0,G({socket:Q,cleanup:K})},close(){if(!W)W=!0,K(),J(Error("Connection closed"));X.onClose()},error(V,A){if(!W)W=!0,K(),J(Error(`Connection error: ${A.message}`));X.onError(A)},connectError(V,A){if(!W)W=!0,K(),J(Error(`Failed to connect to ${H}: ${A.message}`))}};Bun.connect({hostname:$.host??"localhost",port:$.port??6789,socket:z}),Z=setTimeout(()=>{if(!W)W=!0,J(Error(`Connection timeout to ${H}`))},Y)})}class Ic{pendingCommands=new Map;pendingQueue=[];currentCommand=null;commandIdCounter=0;inFlightByReqId=new Map;getCurrentCommand(){return this.currentCommand}setCurrentCommand($){this.currentCommand=$}hasPending(){return this.pendingCommands.size>0}getInFlightCount(){return this.inFlightByReqId.size}canSendMore($){return this.inFlightByReqId.size<$}addInFlight($){this.inFlightByReqId.set($.reqId,$)}getByReqId($){return this.inFlightByReqId.get($)}removeByReqId($){let Y=this.inFlightByReqId.get($);if(Y)this.inFlightByReqId.delete($);return Y}enqueue($){this.pendingCommands.set($.id,$),this.pendingQueue.push($.id)}nextId(){return++this.commandIdCounter}dequeue(){let $=this.pendingQueue.shift();if($===void 0)return null;let Y=this.pendingCommands.get($);if(!Y)return null;return this.pendingCommands.delete($),Y}remove($){if(!this.pendingCommands.has($))return!1;this.pendingCommands.delete($);let Y=this.pendingQueue.indexOf($);if(Y!==-1)this.pendingQueue.splice(Y,1);return!0}rejectAll($){for(let Y of this.pendingCommands.values())clearTimeout(Y.timeout),Y.promise?.catch(()=>{}),Y.reject($);this.pendingCommands.clear(),this.pendingQueue=[];for(let Y of this.inFlightByReqId.values())clearTimeout(Y.timeout),Y.promise?.catch(()=>{}),Y.reject($);if(this.inFlightByReqId.clear(),this.currentCommand)clearTimeout(this.currentCommand.timeout),this.currentCommand.reject($),this.currentCommand=null}clearCurrent($){if(this.currentCommand){if(clearTimeout(this.currentCommand.timeout),$)this.currentCommand.reject($);this.currentCommand=null}}}import{EventEmitter as zf4}from"events";var VJ0;try{VJ0=new TextDecoder}catch($){}var g1,nQ,v0=0;var NJ0=[],IN=NJ0,US=0,O5={},C8,wH,iQ=0,YZ=0,e$,_H,vJ=[],E8,hr0={useRecords:!1,mapsAsObjects:!0};class jc{}var LJ0=new jc;LJ0.name="MessagePack 0xC1";var uV=!1,fr0=2,AJ0,FJ0,DJ0;class jH{constructor($){if($){if($.useRecords===!1&&$.mapsAsObjects===void 0)$.mapsAsObjects=!0;if($.sequential&&$.trusted!==!1){if($.trusted=!0,!$.structures&&$.useRecords!=!1){if($.structures=[],!$.maxSharedStructures)$.maxSharedStructures=0}}if($.structures)$.structures.sharedLength=$.structures.length;else if($.getStructures)($.structures=[]).uninitialized=!0,$.structures.sharedLength=0;if($.int64AsNumber)$.int64AsType="number"}Object.assign(this,$)}unpack($,Y){if(g1)return Ga0(()=>{return _c(),this?this.unpack($,Y):jH.prototype.unpack.call(hr0,$,Y)});if(!$.buffer&&$.constructor===ArrayBuffer)$=typeof Buffer<"u"?Buffer.from($):new Uint8Array($);if(typeof Y==="object")nQ=Y.end||$.length,v0=Y.start||0;else v0=0,nQ=Y>-1?Y:$.length;US=0,YZ=0,wH=null,IN=NJ0,e$=null,g1=$;try{E8=$.dataView||($.dataView=new DataView($.buffer,$.byteOffset,$.byteLength))}catch(X){if(g1=null,$ instanceof Uint8Array)throw X;throw Error("Source must be a Uint8Array or Buffer but was a "+($&&typeof $=="object"?$.constructor.name:typeof $))}if(this instanceof jH){if(O5=this,this.structures)return C8=this.structures,Pc(Y);else if(!C8||C8.length>0)C8=[]}else if(O5=hr0,!C8||C8.length>0)C8=[];return Pc(Y)}unpackMultiple($,Y){let X,G=0;try{uV=!0;let J=$.length,Q=this?this.unpack($,J):Tc.unpack($,J);if(Y){if(Y(Q,G,v0)===!1)return;while(v0<J)if(G=v0,Y(Pc(),G,v0)===!1)return}else{X=[Q];while(v0<J)G=v0,X.push(Pc());return X}}catch(J){throw J.lastPosition=G,J.values=X,J}finally{uV=!1,_c()}}_mergeStructures($,Y){if(FJ0)$=FJ0.call(this,$);if($=$||[],Object.isFrozen($))$=$.map((X)=>X.slice(0));for(let X=0,G=$.length;X<G;X++){let J=$[X];if(J){if(J.isShared=!0,X>=32)J.highByte=X-32>>5}}$.sharedLength=$.length;for(let X in Y||[])if(X>=0){let G=$[X],J=Y[X];if(J){if(G)($.restoreStructures||($.restoreStructures=[]))[X]=G;$[X]=J}}return this.structures=$}decode($,Y){return this.unpack($,Y)}}function Pc($){try{if(!O5.trusted&&!uV){let X=C8.sharedLength||0;if(X<C8.length)C8.length=X}let Y;if(O5.randomAccessStructure&&g1[v0]<64&&g1[v0]>=32&&AJ0){if(Y=AJ0(g1,v0,nQ,O5),g1=null,!($&&$.lazy)&&Y)Y=Y.toJSON();v0=nQ}else Y=V$();if(e$)v0=e$.postBundlePosition,e$=null;if(uV)C8.restoreStructures=null;if(v0==nQ){if(C8&&C8.restoreStructures)gr0();if(C8=null,g1=null,_H)_H=null}else if(v0>nQ)throw Error("Unexpected end of MessagePack data");else if(!uV){let X;try{X=JSON.stringify(Y,(G,J)=>typeof J==="bigint"?`${J}n`:J).slice(0,100)}catch(G){X="(JSON view not available "+G+")"}throw Error("Data read, but end of buffer not reached "+X)}return Y}catch(Y){if(C8&&C8.restoreStructures)gr0();if(_c(),Y instanceof RangeError||Y.message.startsWith("Unexpected end of buffer")||v0>nQ)Y.incomplete=!0;throw Y}}function gr0(){for(let $ in C8.restoreStructures)C8[$]=C8.restoreStructures[$];C8.restoreStructures=null}function V$(){let $=g1[v0++];if($<160)if($<128)if($<64)return $;else{let Y=C8[$&63]||O5.getStructures&&nr0()[$&63];if(Y){if(!Y.read)Y.read=BJ0(Y,$&63);return Y.read()}else return $}else if($<144)if($-=128,O5.mapsAsObjects){let Y={};for(let X=0;X<$;X++){let G=Ya0();if(G==="__proto__")G="__proto_";Y[G]=V$()}return Y}else{let Y=new Map;for(let X=0;X<$;X++)Y.set(V$(),V$());return Y}else{$-=144;let Y=Array($);for(let X=0;X<$;X++)Y[X]=V$();if(O5.freezeData)return Object.freeze(Y);return Y}else if($<192){let Y=$-160;if(YZ>=v0)return wH.slice(v0-iQ,(v0+=Y)-iQ);if(YZ==0&&nQ<140){let X=Y<16?OJ0(Y):$a0(Y);if(X!=null)return X}return wc(Y)}else{let Y;switch($){case 192:return null;case 193:if(e$)if(Y=V$(),Y>0)return e$[1].slice(e$.position1,e$.position1+=Y);else return e$[0].slice(e$.position0,e$.position0-=Y);return LJ0;case 194:return!1;case 195:return!0;case 196:if(Y=g1[v0++],Y===void 0)throw Error("Unexpected end of buffer");return zJ0(Y);case 197:return Y=E8.getUint16(v0),v0+=2,zJ0(Y);case 198:return Y=E8.getUint32(v0),v0+=4,zJ0(Y);case 199:return qN(g1[v0++]);case 200:return Y=E8.getUint16(v0),v0+=2,qN(Y);case 201:return Y=E8.getUint32(v0),v0+=4,qN(Y);case 202:if(Y=E8.getFloat32(v0),O5.useFloat32>2){let X=wN[(g1[v0]&127)<<1|g1[v0+1]>>7];return v0+=4,(X*Y+(Y>0?0.5:-0.5)>>0)/X}return v0+=4,Y;case 203:return Y=E8.getFloat64(v0),v0+=8,Y;case 204:return g1[v0++];case 205:return Y=E8.getUint16(v0),v0+=2,Y;case 206:return Y=E8.getUint32(v0),v0+=4,Y;case 207:if(O5.int64AsType==="number")Y=E8.getUint32(v0)*4294967296,Y+=E8.getUint32(v0+4);else if(O5.int64AsType==="string")Y=E8.getBigUint64(v0).toString();else if(O5.int64AsType==="auto"){if(Y=E8.getBigUint64(v0),Y<=BigInt(2)<<BigInt(52))Y=Number(Y)}else Y=E8.getBigUint64(v0);return v0+=8,Y;case 208:return E8.getInt8(v0++);case 209:return Y=E8.getInt16(v0),v0+=2,Y;case 210:return Y=E8.getInt32(v0),v0+=4,Y;case 211:if(O5.int64AsType==="number")Y=E8.getInt32(v0)*4294967296,Y+=E8.getUint32(v0+4);else if(O5.int64AsType==="string")Y=E8.getBigInt64(v0).toString();else if(O5.int64AsType==="auto"){if(Y=E8.getBigInt64(v0),Y>=BigInt(-2)<<BigInt(52)&&Y<=BigInt(2)<<BigInt(52))Y=Number(Y)}else Y=E8.getBigInt64(v0);return v0+=8,Y;case 212:if(Y=g1[v0++],Y==114)return lr0(g1[v0++]&63);else{let X=vJ[Y];if(X)if(X.read)return v0++,X.read(V$());else if(X.noBuffer)return v0++,X();else return X(g1.subarray(v0,++v0));else throw Error("Unknown extension "+Y)}case 213:if(Y=g1[v0],Y==114)return v0++,lr0(g1[v0++]&63,g1[v0++]);else return qN(2);case 214:return qN(4);case 215:return qN(8);case 216:return qN(16);case 217:if(Y=g1[v0++],YZ>=v0)return wH.slice(v0-iQ,(v0+=Y)-iQ);return rr0(Y);case 218:if(Y=E8.getUint16(v0),v0+=2,YZ>=v0)return wH.slice(v0-iQ,(v0+=Y)-iQ);return ar0(Y);case 219:if(Y=E8.getUint32(v0),v0+=4,YZ>=v0)return wH.slice(v0-iQ,(v0+=Y)-iQ);return sr0(Y);case 220:return Y=E8.getUint16(v0),v0+=2,ur0(Y);case 221:return Y=E8.getUint32(v0),v0+=4,ur0(Y);case 222:return Y=E8.getUint16(v0),v0+=2,pr0(Y);case 223:return Y=E8.getUint32(v0),v0+=4,pr0(Y);default:if($>=224)return $-256;if($===void 0){let X=Error("Unexpected end of MessagePack data");throw X.incomplete=!0,X}throw Error("Unknown MessagePack token "+$)}}}var Mh4=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function BJ0($,Y){function X(){if(X.count++>fr0){let J;try{J=$.read=Function("r","return function(){return "+(O5.freezeData?"Object.freeze":"")+"({"+$.map((Q)=>Q==="__proto__"?"__proto_:r()":Mh4.test(Q)?Q+":r()":"["+JSON.stringify(Q)+"]:r()").join(",")+"})}")(V$)}catch(Q){return fr0=1/0,X()}if($.highByte===0)$.read=mr0(Y,$.read);return J()}let G={};for(let J=0,Q=$.length;J<Q;J++){let W=$[J];if(W==="__proto__")W="__proto_";G[W]=V$()}if(O5.freezeData)return Object.freeze(G);return G}if(X.count=0,$.highByte===0)return mr0(Y,X);return X}var mr0=($,Y)=>{return function(){let X=g1[v0++];if(X===0)return Y();let G=$<32?-($+(X<<5)):$+(X<<5),J=C8[G]||nr0()[G];if(!J)throw Error("Record id is not defined for "+G);if(!J.read)J.read=BJ0(J,$);return J.read()}};function nr0(){let $=Ga0(()=>{return g1=null,O5.getStructures()});return C8=O5._mergeStructures($,C8)}var wc=PN,rr0=PN,ar0=PN,sr0=PN,or0=!1;function tr0($){or0=!0,wc=Y(1),rr0=Y(2),ar0=Y(3),sr0=Y(5);function Y(X){return function(J){let Q=IN[US++];if(Q==null){if(e$)return PN(J);let Z=g1.byteOffset,K=$(v0-X+Z,nQ+Z,g1.buffer);if(typeof K=="string")Q=K,IN=NJ0;else if(IN=K,US=1,YZ=1,Q=IN[0],Q===void 0)throw Error("Unexpected end of buffer")}let W=Q.length;if(W<=J)return v0+=J,Q;return wH=Q,iQ=v0,YZ=v0+W,v0+=J,Q.slice(0,J)}}}function PN($){let Y;if($<16){if(Y=OJ0($))return Y}if($>64&&VJ0)return VJ0.decode(g1.subarray(v0,v0+=$));let X=v0+$,G=[];Y="";while(v0<X){let J=g1[v0++];if((J&128)===0)G.push(J);else if((J&224)===192){let Q=g1[v0++]&63,W=(J&31)<<6|Q;if(W<128)G.push(65533);else G.push(W)}else if((J&240)===224){let Q=g1[v0++]&63,W=g1[v0++]&63,Z=(J&31)<<12|Q<<6|W;if(Z<2048||Z>=55296&&Z<=57343)G.push(65533);else G.push(Z)}else if((J&248)===240){let Q=g1[v0++]&63,W=g1[v0++]&63,Z=g1[v0++]&63,K=(J&7)<<18|Q<<12|W<<6|Z;if(K<65536||K>1114111)G.push(65533);else if(K>65535)K-=65536,G.push(K>>>10&1023|55296),K=56320|K&1023,G.push(K);else G.push(K)}else G.push(65533);if(G.length>=4096)Y+=RY.apply(String,G),G.length=0}if(G.length>0)Y+=RY.apply(String,G);return Y}function er0($,Y,X){let G=g1;g1=$,v0=Y;try{return PN(X)}finally{g1=G}}function ur0($){let Y=Array($);for(let X=0;X<$;X++)Y[X]=V$();if(O5.freezeData)return Object.freeze(Y);return Y}function pr0($){if(O5.mapsAsObjects){let Y={};for(let X=0;X<$;X++){let G=Ya0();if(G==="__proto__")G="__proto_";Y[G]=V$()}return Y}else{let Y=new Map;for(let X=0;X<$;X++)Y.set(V$(),V$());return Y}}var RY=String.fromCharCode;function $a0($){let Y=v0,X=Array($);for(let G=0;G<$;G++){let J=g1[v0++];if((J&128)>0){v0=Y;return}X[G]=J}return RY.apply(String,X)}function OJ0($){if($<4)if($<2)if($===0)return"";else{let Y=g1[v0++];if((Y&128)>1){v0-=1;return}return RY(Y)}else{let Y=g1[v0++],X=g1[v0++];if((Y&128)>0||(X&128)>0){v0-=2;return}if($<3)return RY(Y,X);let G=g1[v0++];if((G&128)>0){v0-=3;return}return RY(Y,X,G)}else{let Y=g1[v0++],X=g1[v0++],G=g1[v0++],J=g1[v0++];if((Y&128)>0||(X&128)>0||(G&128)>0||(J&128)>0){v0-=4;return}if($<6)if($===4)return RY(Y,X,G,J);else{let Q=g1[v0++];if((Q&128)>0){v0-=5;return}return RY(Y,X,G,J,Q)}else if($<8){let Q=g1[v0++],W=g1[v0++];if((Q&128)>0||(W&128)>0){v0-=6;return}if($<7)return RY(Y,X,G,J,Q,W);let Z=g1[v0++];if((Z&128)>0){v0-=7;return}return RY(Y,X,G,J,Q,W,Z)}else{let Q=g1[v0++],W=g1[v0++],Z=g1[v0++],K=g1[v0++];if((Q&128)>0||(W&128)>0||(Z&128)>0||(K&128)>0){v0-=8;return}if($<10)if($===8)return RY(Y,X,G,J,Q,W,Z,K);else{let H=g1[v0++];if((H&128)>0){v0-=9;return}return RY(Y,X,G,J,Q,W,Z,K,H)}else if($<12){let H=g1[v0++],z=g1[v0++];if((H&128)>0||(z&128)>0){v0-=10;return}if($<11)return RY(Y,X,G,J,Q,W,Z,K,H,z);let V=g1[v0++];if((V&128)>0){v0-=11;return}return RY(Y,X,G,J,Q,W,Z,K,H,z,V)}else{let H=g1[v0++],z=g1[v0++],V=g1[v0++],A=g1[v0++];if((H&128)>0||(z&128)>0||(V&128)>0||(A&128)>0){v0-=12;return}if($<14)if($===12)return RY(Y,X,G,J,Q,W,Z,K,H,z,V,A);else{let F=g1[v0++];if((F&128)>0){v0-=13;return}return RY(Y,X,G,J,Q,W,Z,K,H,z,V,A,F)}else{let F=g1[v0++],N=g1[v0++];if((F&128)>0||(N&128)>0){v0-=14;return}if($<15)return RY(Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N);let D=g1[v0++];if((D&128)>0){v0-=15;return}return RY(Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D)}}}}}function dr0(){let $=g1[v0++],Y;if($<192)Y=$-160;else switch($){case 217:Y=g1[v0++];break;case 218:Y=E8.getUint16(v0),v0+=2;break;case 219:Y=E8.getUint32(v0),v0+=4;break;default:throw Error("Expected string")}return PN(Y)}function zJ0($){return O5.copyBuffers?Uint8Array.prototype.slice.call(g1,v0,v0+=$):g1.subarray(v0,v0+=$)}function qN($){let Y=g1[v0++];if(vJ[Y]){let X;return vJ[Y](g1.subarray(v0,X=v0+=$),(G)=>{v0=G;try{return V$()}finally{v0=X}})}else throw Error("Unknown extension type "+Y)}var cr0=Array(4096);function Ya0(){let $=g1[v0++];if($>=160&&$<192){if($=$-160,YZ>=v0)return wH.slice(v0-iQ,(v0+=$)-iQ);else if(!(YZ==0&&nQ<180))return wc($)}else return v0--,Xa0(V$());let Y=($<<5^($>1?E8.getUint16(v0):$>0?g1[v0]:0))&4095,X=cr0[Y],G=v0,J=v0+$-3,Q,W=0;if(X&&X.bytes==$){while(G<J){if(Q=E8.getUint32(G),Q!=X[W++]){G=1879048192;break}G+=4}J+=3;while(G<J)if(Q=g1[G++],Q!=X[W++]){G=1879048192;break}if(G===J)return v0=G,X.string;J-=3,G=v0}X=[],cr0[Y]=X,X.bytes=$;while(G<J)Q=E8.getUint32(G),X.push(Q),G+=4;J+=3;while(G<J)Q=g1[G++],X.push(Q);let Z=$<16?OJ0($):$a0($);if(Z!=null)return X.string=Z;return X.string=wc($)}function Xa0($){if(typeof $==="string")return $;if(typeof $==="number"||typeof $==="boolean"||typeof $==="bigint")return $.toString();if($==null)return $+"";if(O5.allowArraysInMapKeys&&Array.isArray($)&&$.flat().every((Y)=>["string","number","boolean","bigint"].includes(typeof Y)))return $.flat().toString();throw Error(`Invalid property type for record: ${typeof $}`)}var lr0=($,Y)=>{let X=V$().map(Xa0),G=$;if(Y!==void 0)$=$<32?-((Y<<5)+$):(Y<<5)+$,X.highByte=Y;let J=C8[$];if(J&&(J.isShared||uV))(C8.restoreStructures||(C8.restoreStructures=[]))[$]=J;return C8[$]=X,X.read=BJ0(X,G),X.read()};vJ[0]=()=>{};vJ[0].noBuffer=!0;vJ[66]=($)=>{let Y=$.byteLength%8||8,X=BigInt($[0]&128?$[0]-256:$[0]);for(let G=1;G<Y;G++)X<<=BigInt(8),X+=BigInt($[G]);if($.byteLength!==Y){let G=new DataView($.buffer,$.byteOffset,$.byteLength),J=(Q,W)=>{let Z=W-Q;if(Z<=40){let V=G.getBigUint64(Q);for(let A=Q+8;A<W;A+=8)V<<=BigInt(64),V|=G.getBigUint64(A);return V}let K=Q+(Z>>4<<3),H=J(Q,K),z=J(K,W);return H<<BigInt((W-K)*8)|z};X=X<<BigInt((G.byteLength-Y)*8)|J(Y,G.byteLength)}return X};var ir0={Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,AggregateError:typeof AggregateError==="function"?AggregateError:null};vJ[101]=()=>{let $=V$();if(!ir0[$[0]]){let Y=Error($[1],{cause:$[2]});return Y.name=$[0],Y}return ir0[$[0]]($[1],{cause:$[2]})};vJ[105]=($)=>{if(O5.structuredClone===!1)throw Error("Structured clone extension is disabled");let Y=E8.getUint32(v0-4);if(!_H)_H=new Map;let X=g1[v0],G;if(X>=144&&X<160||X==220||X==221)G=[];else if(X>=128&&X<144||X==222||X==223)G=new Map;else if((X>=199&&X<=201||X>=212&&X<=216)&&g1[v0+1]===115)G=new Set;else G={};let J={target:G};_H.set(Y,J);let Q=V$();if(!J.used)return J.target=Q;else Object.assign(G,Q);if(G instanceof Map)for(let[W,Z]of Q.entries())G.set(W,Z);if(G instanceof Set)for(let W of Array.from(Q))G.add(W);return G};vJ[112]=($)=>{if(O5.structuredClone===!1)throw Error("Structured clone extension is disabled");let Y=E8.getUint32(v0-4),X=_H.get(Y);return X.used=!0,X.target};vJ[115]=()=>new Set(V$());var EJ0=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map(($)=>$+"Array"),Rh4=typeof globalThis==="object"?globalThis:window;vJ[116]=($)=>{let Y=$[0],X=Uint8Array.prototype.slice.call($,1).buffer,G=EJ0[Y];if(!G){if(Y===16)return X;if(Y===17)return new DataView(X);throw Error("Could not find typed array for code "+Y)}return new Rh4[G](X)};vJ[120]=()=>{let $=V$();return new RegExp($[0],$[1])};var qh4=[];vJ[98]=($)=>{let Y=($[0]<<24)+($[1]<<16)+($[2]<<8)+$[3],X=v0;return v0+=Y-$.length,e$=qh4,e$=[dr0(),dr0()],e$.position0=0,e$.position1=0,e$.postBundlePosition=v0,v0=X,V$()};vJ[255]=($)=>{if($.length==4)return new Date(($[0]*16777216+($[1]<<16)+($[2]<<8)+$[3])*1000);else if($.length==8)return new Date((($[0]<<22)+($[1]<<14)+($[2]<<6)+($[3]>>2))/1e6+(($[3]&3)*4294967296+$[4]*16777216+($[5]<<16)+($[6]<<8)+$[7])*1000);else if($.length==12)return new Date((($[0]<<24)+($[1]<<16)+($[2]<<8)+$[3])/1e6+(($[4]&128?-281474976710656:0)+$[6]*1099511627776+$[7]*4294967296+$[8]*16777216+($[9]<<16)+($[10]<<8)+$[11])*1000);else return new Date("invalid")};function Ga0($){if(DJ0)DJ0();let Y=nQ,X=v0,G=US,J=iQ,Q=YZ,W=wH,Z=IN,K=_H,H=e$,z=new Uint8Array(g1.slice(0,nQ)),V=C8,A=C8.slice(0,C8.length),F=O5,N=uV,D=$();return nQ=Y,v0=X,US=G,iQ=J,YZ=Q,wH=W,IN=Z,_H=K,e$=H,g1=z,uV=N,C8=V,C8.splice(0,C8.length,...A),O5=F,E8=new DataView(g1.buffer,g1.byteOffset,g1.byteLength),D}function _c(){g1=null,_H=null,C8=null}var wN=Array(147);for(let $=0;$<256;$++)wN[$]=+("1e"+Math.floor(45.15-$*0.30103));var Tc=new jH({useRecords:!1}),HS=Tc.unpack,Ih4=Tc.unpackMultiple,Ph4=Tc.unpack;var wh4=new Float32Array(1),pm9=new Uint8Array(wh4.buffer,0,4);function Ja0($,Y,X){AJ0=$,FJ0=Y,DJ0=X}var Sc;try{Sc=new TextEncoder}catch($){}var qJ0,IJ0,DR=typeof Buffer<"u",Cc=DR?function($){return Buffer.allocUnsafeSlow($)}:Uint8Array,Ua0=DR?Buffer:Uint8Array,Qa0=DR?4294967296:2144337920,l0,zS,E5,b0=0,hX,E7=null,Ha0,_h4=21760,jh4=/[\u0080-\uFFFF]/,T3=Symbol("record-id");class VS extends jH{constructor($){super($);this.offset=0;let Y,X,G,J,Q,W=Ua0.prototype.utf8Write?function(S,T){return l0.utf8Write(S,T,l0.byteLength-T)}:Sc&&Sc.encodeInto?function(S,T){return Sc.encodeInto(S,l0.subarray(T)).written}:!1,Z=this;if(!$)$={};let K=$&&$.sequential,H=$.structures||$.saveStructures,z=$.maxSharedStructures;if(z==null)z=H?32:0;if(z>8160)throw Error("Maximum maxSharedStructure is 8160");if($.structuredClone&&$.moreTypes==null)this.moreTypes=!0;let V=$.maxOwnStructures;if(V==null)V=H?32:64;if(!this.structures&&$.useRecords!=!1)this.structures=[];let A=z>32||V+z>64,F=z+64,N=z+V+64;if(N>8256)throw Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let D=[],L=0,B=0;this.pack=this.encode=function(S,T){if(!l0)l0=new Cc(8192),E5=l0.dataView||(l0.dataView=new DataView(l0.buffer,0,8192)),b0=0;if(hX=l0.length-10,hX-b0<2048)l0=new Cc(l0.length),E5=l0.dataView||(l0.dataView=new DataView(l0.buffer,0,l0.length)),hX=l0.length-10,b0=0;else b0=b0+7&2147483640;if(X=b0,T&Na0)b0+=T&255;if(Q=Z.structuredClone?new Map:null,Z.bundleStrings&&typeof S!=="string")E7=[],E7.size=1/0;else E7=null;if(J=Z.structures,J){if(J.uninitialized)J=Z._mergeStructures(Z.getStructures());let x=J.sharedLength||0;if(x>z)throw Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+J.sharedLength);if(!J.transitions){J.transitions=Object.create(null);for(let y=0;y<x;y++){let d=J[y];if(!d)continue;let u,b=J.transitions;for(let g=0,p=d.length;g<p;g++){let h=d[g];if(u=b[h],!u)u=b[h]=Object.create(null);b=u}b[T3]=y+64}this.lastNamedStructuresLength=x}if(!K)J.nextId=x+64}if(G)G=!1;let v;try{if(Z.randomAccessStructure&&S&&typeof S==="object")if(S.constructor===Object)k(S);else if(S.constructor!==Map&&!Array.isArray(S)&&!IJ0.some((y)=>S instanceof y))k(S.toJSON?S.toJSON():S);else M(S);else M(S);let x=E7;if(E7)Za0(X,M,0);if(Q&&Q.idsToInsert){let y=Q.idsToInsert.sort((g,p)=>g.offset>p.offset?1:-1),d=y.length,u=-1;while(x&&d>0){let g=y[--d].offset+X;if(g<x.stringsPosition+X&&u===-1)u=0;if(g>x.position+X){if(u>=0)u+=6}else{if(u>=0)E5.setUint32(x.position+X,E5.getUint32(x.position+X)+u),u=-1;x=x.previous,d++}}if(u>=0&&x)E5.setUint32(x.position+X,E5.getUint32(x.position+X)+u);if(b0+=y.length*6,b0>hX)P(b0);Z.offset=b0;let b=Th4(l0.subarray(X,b0),y);return Q=null,b}if(Z.offset=b0,T&Fa0)return l0.start=X,l0.end=b0,l0;return l0.subarray(X,b0)}catch(x){throw v=x,x}finally{if(J){if(O(),G&&Z.saveStructures){let x=J.sharedLength||0,y=l0.subarray(X,b0),d=za0(J,Z);if(!v){if(Z.saveStructures(d,d.isCompatible)===!1)return Z.pack(S,T);if(Z.lastNamedStructuresLength=x,l0.length>1073741824)l0=null;return y}}}if(l0.length>1073741824)l0=null;if(T&Da0)b0=X}};let O=()=>{if(B<10)B++;let S=J.sharedLength||0;if(J.length>S&&!K)J.length=S;if(L>1e4){if(J.transitions=null,B=0,L=0,D.length>0)D=[]}else if(D.length>0&&!K){for(let T=0,v=D.length;T<v;T++)D[T][T3]=0;D=[]}},E=(S)=>{var T=S.length;if(T<16)l0[b0++]=144|T;else if(T<65536)l0[b0++]=220,l0[b0++]=T>>8,l0[b0++]=T&255;else l0[b0++]=221,E5.setUint32(b0,T),b0+=4;for(let v=0;v<T;v++)M(S[v])},M=(S)=>{if(b0>hX)l0=P(b0);var T=typeof S,v;if(T==="string"){let x=S.length;if(E7&&x>=4&&x<4096){if((E7.size+=x)>_h4){let b,g=(E7[0]?E7[0].length*3+E7[1].length:0)+10;if(b0+g>hX)l0=P(b0+g);let p;if(E7.position)p=E7,l0[b0]=200,b0+=3,l0[b0++]=98,b=b0-X,b0+=4,Za0(X,M,0),E5.setUint16(b+X-3,b0-X-b);else l0[b0++]=214,l0[b0++]=98,b=b0-X,b0+=4;E7=["",""],E7.previous=p,E7.size=0,E7.position=b}let u=jh4.test(S);E7[u?0:1]+=S,l0[b0++]=193,M(u?-x:x);return}let y;if(x<32)y=1;else if(x<256)y=2;else if(x<65536)y=3;else y=5;let d=x*3;if(b0+d>hX)l0=P(b0+d);if(x<64||!W){let u,b,g,p=b0+y;for(u=0;u<x;u++)if(b=S.charCodeAt(u),b<128)l0[p++]=b;else if(b<2048)l0[p++]=b>>6|192,l0[p++]=b&63|128;else if((b&64512)===55296&&((g=S.charCodeAt(u+1))&64512)===56320)b=65536+((b&1023)<<10)+(g&1023),u++,l0[p++]=b>>18|240,l0[p++]=b>>12&63|128,l0[p++]=b>>6&63|128,l0[p++]=b&63|128;else l0[p++]=b>>12|224,l0[p++]=b>>6&63|128,l0[p++]=b&63|128;v=p-b0-y}else v=W(S,b0+y);if(v<32)l0[b0++]=160|v;else if(v<256){if(y<2)l0.copyWithin(b0+2,b0+1,b0+1+v);l0[b0++]=217,l0[b0++]=v}else if(v<65536){if(y<3)l0.copyWithin(b0+3,b0+2,b0+2+v);l0[b0++]=218,l0[b0++]=v>>8,l0[b0++]=v&255}else{if(y<5)l0.copyWithin(b0+5,b0+3,b0+3+v);l0[b0++]=219,E5.setUint32(b0,v),b0+=4}b0+=v}else if(T==="number")if(S>>>0===S)if(S<32||S<128&&this.useRecords===!1||S<64&&!this.randomAccessStructure)l0[b0++]=S;else if(S<256)l0[b0++]=204,l0[b0++]=S;else if(S<65536)l0[b0++]=205,l0[b0++]=S>>8,l0[b0++]=S&255;else l0[b0++]=206,E5.setUint32(b0,S),b0+=4;else if(S>>0===S)if(S>=-32)l0[b0++]=256+S;else if(S>=-128)l0[b0++]=208,l0[b0++]=S+256;else if(S>=-32768)l0[b0++]=209,E5.setInt16(b0,S),b0+=2;else l0[b0++]=210,E5.setInt32(b0,S),b0+=4;else{let x;if((x=this.useFloat32)>0&&S<4294967296&&S>=-2147483648){l0[b0++]=202,E5.setFloat32(b0,S);let y;if(x<4||(y=S*wN[(l0[b0]&127)<<1|l0[b0+1]>>7])>>0===y){b0+=4;return}else b0--}l0[b0++]=203,E5.setFloat64(b0,S),b0+=8}else if(T==="object"||T==="function")if(!S)l0[b0++]=192;else{if(Q){let y=Q.get(S);if(y){if(!y.id){let d=Q.idsToInsert||(Q.idsToInsert=[]);y.id=d.push(y)}l0[b0++]=214,l0[b0++]=112,E5.setUint32(b0,y.id),b0+=4;return}else Q.set(S,{offset:b0-X})}let x=S.constructor;if(x===Object)I(S);else if(x===Array)E(S);else if(x===Map)if(this.mapAsEmptyObject)l0[b0++]=128;else{if(v=S.size,v<16)l0[b0++]=128|v;else if(v<65536)l0[b0++]=222,l0[b0++]=v>>8,l0[b0++]=v&255;else l0[b0++]=223,E5.setUint32(b0,v),b0+=4;for(let[y,d]of S)M(y),M(d)}else{for(let y=0,d=qJ0.length;y<d;y++){let u=IJ0[y];if(S instanceof u){let b=qJ0[y];if(b.write){if(b.type)l0[b0++]=212,l0[b0++]=b.type,l0[b0++]=0;let t=b.write.call(this,S);if(t===S)if(Array.isArray(S))E(S);else I(S);else M(t);return}let g=l0,p=E5,h=b0;l0=null;let n;try{n=b.pack.call(this,S,(t)=>{if(l0=g,g=null,b0+=t,b0>hX)P(b0);return{target:l0,targetView:E5,position:b0-t}},M)}finally{if(g)l0=g,E5=p,b0=h,hX=l0.length-10}if(n){if(n.length+b0>hX)P(n.length+b0);b0=Wa0(n,l0,b0,b.type)}return}}if(Array.isArray(S))E(S);else{if(S.toJSON){let y=S.toJSON();if(y!==S)return M(y)}if(T==="function")return M(this.writeFunction&&this.writeFunction(S));I(S)}}}else if(T==="boolean")l0[b0++]=S?195:194;else if(T==="bigint"){if(S<9223372036854776000&&S>=-9223372036854776000)l0[b0++]=211,E5.setBigInt64(b0,S);else if(S<18446744073709552000&&S>0)l0[b0++]=207,E5.setBigUint64(b0,S);else if(this.largeBigIntToFloat)l0[b0++]=203,E5.setFloat64(b0,Number(S));else if(this.largeBigIntToString)return M(S.toString());else if(this.useBigIntExtension||this.moreTypes){let x=S<0?BigInt(-1):BigInt(0),y;if(S>>BigInt(65536)===x){let d=BigInt(18446744073709552000)-BigInt(1),u=[];while(!0){if(u.push(S&d),S>>BigInt(63)===x)break;S>>=BigInt(64)}y=new Uint8Array(new BigUint64Array(u).buffer),y.reverse()}else{let d=S<0,u=(d?~S:S).toString(16);if(u.length%2)u="0"+u;else if(parseInt(u.charAt(0),16)>=8)u="00"+u;if(DR)y=Buffer.from(u,"hex");else{y=new Uint8Array(u.length/2);for(let b=0;b<y.length;b++)y[b]=parseInt(u.slice(b*2,b*2+2),16)}if(d)for(let b=0;b<y.length;b++)y[b]=~y[b]}if(y.length+b0>hX)P(y.length+b0);b0=Wa0(y,l0,b0,66);return}else throw RangeError(S+" was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension, or set largeBigIntToFloat to convert to float-64, or set largeBigIntToString to convert to string");b0+=8}else if(T==="undefined")if(this.encodeUndefinedAsNil)l0[b0++]=192;else l0[b0++]=212,l0[b0++]=0,l0[b0++]=0;else throw Error("Unknown type: "+T)},R=this.variableMapSize||this.coercibleKeyAsNumber||this.skipValues?(S)=>{let T;if(this.skipValues){T=[];for(let y in S)if((typeof S.hasOwnProperty!=="function"||S.hasOwnProperty(y))&&!this.skipValues.includes(S[y]))T.push(y)}else T=Object.keys(S);let v=T.length;if(v<16)l0[b0++]=128|v;else if(v<65536)l0[b0++]=222,l0[b0++]=v>>8,l0[b0++]=v&255;else l0[b0++]=223,E5.setUint32(b0,v),b0+=4;let x;if(this.coercibleKeyAsNumber)for(let y=0;y<v;y++){x=T[y];let d=Number(x);M(isNaN(d)?x:d),M(S[x])}else for(let y=0;y<v;y++)M(x=T[y]),M(S[x])}:(S)=>{l0[b0++]=222;let T=b0-X;b0+=2;let v=0;for(let x in S)if(typeof S.hasOwnProperty!=="function"||S.hasOwnProperty(x))M(x),M(S[x]),v++;if(v>65535)throw Error('Object is too large to serialize with fast 16-bit map size, use the "variableMapSize" option to serialize this object');l0[T+++X]=v>>8,l0[T+X]=v&255},q=this.useRecords===!1?R:$.progressiveRecords&&!A?(S)=>{let T,v=J.transitions||(J.transitions=Object.create(null)),x=b0++-X,y;for(let d in S)if(typeof S.hasOwnProperty!=="function"||S.hasOwnProperty(d)){if(T=v[d],T)v=T;else{let u=Object.keys(S),b=v;v=J.transitions;let g=0;for(let p=0,h=u.length;p<h;p++){let n=u[p];if(T=v[n],!T)T=v[n]=Object.create(null),g++;v=T}if(x+X+1==b0)b0--,_(v,u,g);else C(v,u,x,g);y=!0,v=b[d]}M(S[d])}if(!y){let d=v[T3];if(d)l0[x+X]=d;else C(v,Object.keys(S),x,0)}}:(S)=>{let T,v=J.transitions||(J.transitions=Object.create(null)),x=0;for(let d in S)if(typeof S.hasOwnProperty!=="function"||S.hasOwnProperty(d)){if(T=v[d],!T)T=v[d]=Object.create(null),x++;v=T}let y=v[T3];if(y)if(y>=96&&A)l0[b0++]=((y-=96)&31)+96,l0[b0++]=y>>5;else l0[b0++]=y;else _(v,v.__keys__||Object.keys(S),x);for(let d in S)if(typeof S.hasOwnProperty!=="function"||S.hasOwnProperty(d))M(S[d])},w=typeof this.useRecords=="function"&&this.useRecords,I=w?(S)=>{w(S)?q(S):R(S)}:q,P=(S)=>{let T;if(S>16777216){if(S-X>Qa0)throw Error("Packed buffer would be larger than maximum buffer size");T=Math.min(Qa0,Math.round(Math.max((S-X)*(S>67108864?1.25:2),4194304)/4096)*4096)}else T=(Math.max(S-X<<2,l0.length-1)>>12)+1<<12;let v=new Cc(T);if(E5=v.dataView||(v.dataView=new DataView(v.buffer,0,T)),S=Math.min(S,l0.length),l0.copy)l0.copy(v,0,X,S);else v.set(l0.slice(X,S));return b0-=X,X=0,hX=v.length-10,l0=v},_=(S,T,v)=>{let x=J.nextId;if(!x)x=64;if(x<F&&this.shouldShareStructure&&!this.shouldShareStructure(T)){if(x=J.nextOwnId,!(x<N))x=F;J.nextOwnId=x+1}else{if(x>=N)x=F;J.nextId=x+1}let y=T.highByte=x>=96&&A?x-96>>5:-1;if(S[T3]=x,S.__keys__=T,J[x-64]=T,x<F)if(T.isShared=!0,J.sharedLength=x-63,G=!0,y>=0)l0[b0++]=(x&31)+96,l0[b0++]=y;else l0[b0++]=x;else{if(y>=0)l0[b0++]=213,l0[b0++]=114,l0[b0++]=(x&31)+96,l0[b0++]=y;else l0[b0++]=212,l0[b0++]=114,l0[b0++]=x;if(v)L+=B*v;if(D.length>=V)D.shift()[T3]=0;D.push(S),M(T)}},C=(S,T,v,x)=>{let y=l0,d=b0,u=hX,b=X;if(l0=zS,b0=0,X=0,!l0)zS=l0=new Cc(8192);hX=l0.length-10,_(S,T,x),zS=l0;let g=b0;if(l0=y,b0=d,hX=u,X=b,g>1){let p=b0+g-1;if(p>hX)P(p);let h=v+X;l0.copyWithin(h+g,h+1,b0),l0.set(zS.slice(0,g),h),b0=p}else l0[v+X]=zS[0]},k=(S)=>{let T=Ha0(S,l0,X,b0,J,P,(v,x,y)=>{if(y)return G=!0;b0=x;let d=l0;if(M(v),O(),d!==l0)return{position:b0,targetView:E5,target:l0};return b0},this);if(T===0)return I(S);b0=T}}useBuffer($){l0=$,l0.dataView||(l0.dataView=new DataView(l0.buffer,l0.byteOffset,l0.byteLength)),E5=l0.dataView,b0=0}set position($){b0=$}get position(){return b0}clearSharedData(){if(this.structures)this.structures=[];if(this.typedStructs)this.typedStructs=[]}}IJ0=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,DataView,jc];qJ0=[{pack($,Y,X){let G=$.getTime()/1000;if((this.useTimestamp32||$.getMilliseconds()===0)&&G>=0&&G<4294967296){let{target:J,targetView:Q,position:W}=Y(6);J[W++]=214,J[W++]=255,Q.setUint32(W,G)}else if(G>0&&G<4294967296){let{target:J,targetView:Q,position:W}=Y(10);J[W++]=215,J[W++]=255,Q.setUint32(W,$.getMilliseconds()*4000000+(G/1000/4294967296>>0)),Q.setUint32(W+4,G)}else if(isNaN(G)){if(this.onInvalidDate)return Y(0),X(this.onInvalidDate());let{target:J,targetView:Q,position:W}=Y(3);J[W++]=212,J[W++]=255,J[W++]=255}else{let{target:J,targetView:Q,position:W}=Y(15);J[W++]=199,J[W++]=12,J[W++]=255,Q.setUint32(W,$.getMilliseconds()*1e6),Q.setBigInt64(W+4,BigInt(Math.floor(G)))}}},{pack($,Y,X){if(this.setAsEmptyObject)return Y(0),X({});let G=Array.from($),{target:J,position:Q}=Y(this.moreTypes?3:0);if(this.moreTypes)J[Q++]=212,J[Q++]=115,J[Q++]=0;X(G)}},{pack($,Y,X){let{target:G,position:J}=Y(this.moreTypes?3:0);if(this.moreTypes)G[J++]=212,G[J++]=101,G[J++]=0;X([$.name,$.message,$.cause])}},{pack($,Y,X){let{target:G,position:J}=Y(this.moreTypes?3:0);if(this.moreTypes)G[J++]=212,G[J++]=120,G[J++]=0;X([$.source,$.flags])}},{pack($,Y){if(this.moreTypes)MJ0($,16,Y);else RJ0(DR?Buffer.from($):new Uint8Array($),Y)}},{pack($,Y){let X=$.constructor;if(X!==Ua0&&this.moreTypes)MJ0($,EJ0.indexOf(X.name),Y);else RJ0($,Y)}},{pack($,Y){if(this.moreTypes)MJ0($,17,Y);else RJ0(DR?Buffer.from($):new Uint8Array($),Y)}},{pack($,Y){let{target:X,position:G}=Y(1);X[G]=193}}];function MJ0($,Y,X,G){let J=$.byteLength;if(J+1<256){var{target:Q,position:W}=X(4+J);Q[W++]=199,Q[W++]=J+1}else if(J+1<65536){var{target:Q,position:W}=X(5+J);Q[W++]=200,Q[W++]=J+1>>8,Q[W++]=J+1&255}else{var{target:Q,position:W,targetView:Z}=X(7+J);Q[W++]=201,Z.setUint32(W,J+1),W+=4}if(Q[W++]=116,Q[W++]=Y,!$.buffer)$=new Uint8Array($);Q.set(new Uint8Array($.buffer,$.byteOffset,$.byteLength),W)}function RJ0($,Y){let X=$.byteLength;var G,J;if(X<256){var{target:G,position:J}=Y(X+2);G[J++]=196,G[J++]=X}else if(X<65536){var{target:G,position:J}=Y(X+3);G[J++]=197,G[J++]=X>>8,G[J++]=X&255}else{var{target:G,position:J,targetView:Q}=Y(X+5);G[J++]=198,Q.setUint32(J,X),J+=4}G.set($,J)}function Wa0($,Y,X,G){let J=$.length;switch(J){case 1:Y[X++]=212;break;case 2:Y[X++]=213;break;case 4:Y[X++]=214;break;case 8:Y[X++]=215;break;case 16:Y[X++]=216;break;default:if(J<256)Y[X++]=199,Y[X++]=J;else if(J<65536)Y[X++]=200,Y[X++]=J>>8,Y[X++]=J&255;else Y[X++]=201,Y[X++]=J>>24,Y[X++]=J>>16&255,Y[X++]=J>>8&255,Y[X++]=J&255}return Y[X++]=G,Y.set($,X),X+=J,X}function Th4($,Y){let X,G=Y.length*6,J=$.length-G;while(X=Y.pop()){let{offset:Q,id:W}=X;$.copyWithin(Q+G,Q,J),G-=6;let Z=Q+G;$[Z++]=214,$[Z++]=105,$[Z++]=W>>24,$[Z++]=W>>16&255,$[Z++]=W>>8&255,$[Z++]=W&255,J=Q}return $}function Za0($,Y,X){if(E7.length>0){E5.setUint32(E7.position+$,b0+X-E7.position-$),E7.stringsPosition=b0-$;let G=E7;E7=null,Y(G[0]),Y(G[1])}}function za0($,Y){return $.isCompatible=(X)=>{let G=!X||(Y.lastNamedStructuresLength||0)===X.length;if(!G)Y._mergeStructures(X);return G},$}function Va0($,Y){Ha0=$,za0=Y}var Aa0=new VS({useRecords:!1}),NR=Aa0.pack,Ch4=Aa0.pack;var Fa0=512,Da0=1024,Na0=2048;var PJ0=3,BR=0,AS=2,kc=1,_J0=16,Ba0=["num","object","string","ascii"];Ba0[_J0]="date";var kh4=[!1,!0,!0,!1,!1,!0,!0,!1],Oa0;try{Function(""),Oa0=!0}catch($){}var _N,vh4=typeof Buffer<"u",vc,C3;try{vc=new TextEncoder}catch($){}var xh4=vh4?function($,Y,X){return $.utf8Write(Y,X,$.byteLength-X)}:vc&&vc.encodeInto?function($,Y,X){return vc.encodeInto(Y,$.subarray(X)).written}:!1,om9=Symbol("type"),tm9=Symbol("parent");Va0(Ea0,gh4);function Ea0($,Y,X,G,J,Q,W,Z){let K=Z.typedStructs||(Z.typedStructs=[]),H=Y.dataView,z=(K.lastStringStart||100)+G,V=Y.length-10,A=G;if(G>V)Y=Q(G),H=Y.dataView,G-=X,A-=X,z-=X,X=0,V=Y.length-10;let F,N=z,D=K.transitions||(K.transitions=Object.create(null)),L=K.nextId||K.length,B=L<15?1:L<240?2:L<61440?3:L<15728640?4:0;if(B===0)return 0;G+=B;let O=[],E,M=0;for(let q in $){let w=$[q],I=D[q];if(!I)D[q]=I={key:q,parent:D,enumerationOffset:0,ascii0:null,ascii8:null,num8:null,string16:null,object16:null,num32:null,float64:null,date64:null};if(G>V)Y=Q(G),H=Y.dataView,G-=X,A-=X,z-=X,N-=X,X=0,V=Y.length-10;switch(typeof w){case"number":let P=w;if(L<200||!I.num64){if(P>>0===P&&P<536870912&&P>-520093696){if(P<246&&P>=0&&(I.num8&&!(L>200&&I.num32)||P<32&&!I.num32))D=I.num8||xJ(I,BR,1),Y[G++]=P;else D=I.num32||xJ(I,BR,4),H.setUint32(G,P,!0),G+=4;break}else if(P<4294967296&&P>=-2147483648){if(H.setFloat32(G,P,!0),kh4[Y[G+3]>>>5]){let S;if((S=P*wN[(Y[G+3]&127)<<1|Y[G+2]>>7])>>0===S){D=I.num32||xJ(I,BR,4),G+=4;break}}}}D=I.num64||xJ(I,BR,8),H.setFloat64(G,P,!0),G+=8;break;case"string":let _=w.length;if(F=N-z,(_<<2)+N>V)Y=Q((_<<2)+N),H=Y.dataView,G-=X,A-=X,z-=X,N-=X,X=0,V=Y.length-10;if(_>65280+F>>2){O.push(q,w,G-A);break}let C,k=N;if(_<64){let S,T,v;for(S=0;S<_;S++)if(T=w.charCodeAt(S),T<128)Y[N++]=T;else if(T<2048)C=!0,Y[N++]=T>>6|192,Y[N++]=T&63|128;else if((T&64512)===55296&&((v=w.charCodeAt(S+1))&64512)===56320)C=!0,T=65536+((T&1023)<<10)+(v&1023),S++,Y[N++]=T>>18|240,Y[N++]=T>>12&63|128,Y[N++]=T>>6&63|128,Y[N++]=T&63|128;else C=!0,Y[N++]=T>>12|224,Y[N++]=T>>6&63|128,Y[N++]=T&63|128}else N+=xh4(Y,w,N),C=N-k>_;if(F<160||F<246&&(I.ascii8||I.string8)){if(C){if(!(D=I.string8))if(K.length>10&&(D=I.ascii8))D.__type=AS,I.ascii8=null,I.string8=D,W(null,0,!0);else D=xJ(I,AS,1)}else if(F===0&&!E){E=!0,D=I.ascii0||xJ(I,PJ0,0);break}else if(!(D=I.ascii8)&&!(K.length>10&&(D=I.string8)))D=xJ(I,PJ0,1);Y[G++]=F}else D=I.string16||xJ(I,AS,2),H.setUint16(G,F,!0),G+=2;break;case"object":if(w){if(w.constructor===Date)D=I.date64||xJ(I,_J0,8),H.setFloat64(G,w.getTime(),!0),G+=8;else O.push(q,w,M);break}else if(I=La0(I,G,H,-10),I)D=I,G=_N;else O.push(q,w,M);break;case"boolean":D=I.num8||I.ascii8||xJ(I,BR,1),Y[G++]=w?249:248;break;case"undefined":if(I=La0(I,G,H,-9),I)D=I,G=_N;else O.push(q,w,M);break;default:O.push(q,w,M)}M++}for(let q=0,w=O.length;q<w;){let I=O[q++],P=O[q++],_=O[q++],C=D[I];if(!C)D[I]=C={key:I,parent:D,enumerationOffset:_-M,ascii0:null,ascii8:null,num8:null,string16:null,object16:null,num32:null,float64:null};let k;if(P){let S;if(F=N-z,F<65280)if(D=C.object16,D)S=2;else if(D=C.object32)S=4;else D=xJ(C,kc,2),S=2;else D=C.object32||xJ(C,kc,4),S=4;if(k=W(P,N),typeof k==="object")N=k.position,H=k.targetView,Y=k.target,z-=X,G-=X,A-=X,X=0;else N=k;if(S===2)H.setUint16(G,F,!0),G+=2;else H.setUint32(G,F,!0),G+=4}else D=C.object16||xJ(C,kc,2),H.setInt16(G,P===null?-10:-9,!0),G+=2;M++}let R=D[T3];if(R==null){R=Z.typedStructs.length;let q=[],w=D,I,P;while((P=w.__type)!==void 0){let _=w.__size;w=w.__parent,I=w.key;let C=[P,_,I];if(w.enumerationOffset)C.push(w.enumerationOffset);q.push(C),w=w.parent}q.reverse(),D[T3]=R,Z.typedStructs[R]=q,W(null,0,!0)}switch(B){case 1:if(R>=16)return 0;Y[A]=R+32;break;case 2:if(R>=256)return 0;Y[A]=56,Y[A+1]=R;break;case 3:if(R>=65536)return 0;Y[A]=57,H.setUint16(A+1,R,!0);break;case 4:if(R>=16777216)return 0;H.setUint32(A,(R<<8)+58,!0);break}if(G<z){if(z===N)return G;Y.copyWithin(G,z,N),N+=G-z,K.lastStringStart=G-A}else if(G>z){if(z===N)return G;return K.lastStringStart=G-A,Ea0($,Y,X,A,J,Q,W,Z)}return N}function La0($,Y,X,G){let J;if(J=$.ascii8||$.num8)return X.setInt8(Y,G,!0),_N=Y+1,J;if(J=$.string16||$.object16)return X.setInt16(Y,G,!0),_N=Y+2,J;if(J=$.num32)return X.setUint32(Y,3758096640+G,!0),_N=Y+4,J;if(J=$.num64)return X.setFloat64(Y,NaN,!0),X.setInt8(Y,G),_N=Y+8,J;_N=Y;return}function xJ($,Y,X){let G=Ba0[Y]+(X<<3),J=$[G]||($[G]=Object.create(null));return J.__type=Y,J.__size=X,J.__parent=$,J}function yh4($){if(!($ instanceof Map))return $;let Y=$.get("typed")||[];if(Object.isFrozen(Y))Y=Y.map((J)=>J.slice(0));let X=$.get("named"),G=Object.create(null);for(let J=0,Q=Y.length;J<Q;J++){let W=Y[J],Z=G;for(let[K,H,z]of W){let V=Z[z];if(!V)Z[z]=V={key:z,parent:Z,enumerationOffset:0,ascii0:null,ascii8:null,num8:null,string16:null,object16:null,num32:null,float64:null,date64:null};Z=xJ(V,K,H)}Z[T3]=J}return Y.transitions=G,this.typedStructs=Y,this.lastTypedStructuresLength=Y.length,X}var wJ0=Symbol.for("source");function bh4($,Y,X,G){let J=$[Y++]-32;if(J>=24)switch(J){case 24:J=$[Y++];break;case 25:J=$[Y++]+($[Y++]<<8);break;case 26:J=$[Y++]+($[Y++]<<8)+($[Y++]<<16);break;case 27:J=$[Y++]+($[Y++]<<8)+($[Y++]<<16)+($[Y++]<<24);break}let Q=G.typedStructs&&G.typedStructs[J];if(!Q){if($=Uint8Array.prototype.slice.call($,Y,X),X-=Y,Y=0,!G.getStructures)throw Error(`Reference to shared structure ${J} without getStructures method`);if(G._mergeStructures(G.getStructures()),!G.typedStructs)throw Error("Could not find any shared typed structures");if(G.lastTypedStructuresLength=G.typedStructs.length,Q=G.typedStructs[J],!Q)throw Error("Could not find typed structure "+J)}var{construct:W,fullConstruct:Z}=Q;if(!W){W=Q.construct=function(){},Z=Q.fullConstruct=function(){},Z.prototype=G.structPrototype||{};var K=W.prototype=G.structPrototype?Object.create(G.structPrototype):{};let z=[],V=0,A;for(let F=0,N=Q.length;F<N;F++){let D=Q[F],[L,B,O,E]=D;if(O==="__proto__")O="__proto_";let M={key:O,offset:V};if(E)z.splice(F+E,0,M);else z.push(M);let R;switch(B){case 0:R=()=>0;break;case 1:R=(w,I)=>{let P=w.bytes[I+M.offset];return P>=246?LR(P):P};break;case 2:R=(w,I)=>{let P=w.bytes,C=(P.dataView||(P.dataView=new DataView(P.buffer,P.byteOffset,P.byteLength))).getUint16(I+M.offset,!0);return C>=65280?LR(C&255):C};break;case 4:R=(w,I)=>{let P=w.bytes,C=(P.dataView||(P.dataView=new DataView(P.buffer,P.byteOffset,P.byteLength))).getUint32(I+M.offset,!0);return C>=4294967040?LR(C&255):C};break}M.getRef=R,V+=B;let q;switch(L){case PJ0:if(A&&!A.next)A.next=M;A=M,M.multiGetCount=0,q=function(w){let{bytes:I,position:P}=w,_=V+P,C=R(w,P);if(typeof C!=="number")return C;let k,S=M.next;while(S){if(k=S.getRef(w,P),typeof k==="number")break;else k=null;S=S.next}if(k==null)k=w.bytesEnd-_;if(w.srcString)return w.srcString.slice(C,k);return er0(I,C+_,k-C)};break;case AS:case kc:if(A&&!A.next)A.next=M;A=M,q=function(w){let I=w.position,P=V+I,_=R(w,I);if(typeof _!=="number")return _;let C=w.bytes,k,S=M.next;while(S){if(k=S.getRef(w,I),typeof k==="number")break;else k=null;S=S.next}if(k==null)k=w.bytesEnd-P;if(L===AS)return C.toString("utf8",_+P,k+P);else{C3=w;try{return G.unpack(C,{start:_+P,end:k+P})}finally{C3=null}}};break;case BR:switch(B){case 4:q=function(w){let I=w.bytes,P=I.dataView||(I.dataView=new DataView(I.buffer,I.byteOffset,I.byteLength)),_=w.position+M.offset,C=P.getInt32(_,!0);if(C<536870912){if(C>-520093696)return C;if(C>-536870912)return LR(C&255)}let k=P.getFloat32(_,!0),S=wN[(I[_+3]&127)<<1|I[_+2]>>7];return(S*k+(k>0?0.5:-0.5)>>0)/S};break;case 8:q=function(w){let I=w.bytes,_=(I.dataView||(I.dataView=new DataView(I.buffer,I.byteOffset,I.byteLength))).getFloat64(w.position+M.offset,!0);if(isNaN(_)){let C=I[w.position+M.offset];if(C>=246)return LR(C)}return _};break;case 1:q=function(w){let P=w.bytes[w.position+M.offset];return P<246?P:LR(P)};break}break;case _J0:q=function(w){let I=w.bytes,P=I.dataView||(I.dataView=new DataView(I.buffer,I.byteOffset,I.byteLength));return new Date(P.getFloat64(w.position+M.offset,!0))};break}M.get=q}if(Oa0){let F=[],N=[],D=0,L;for(let O of z){if(G.alwaysLazyProperty&&G.alwaysLazyProperty(O.key)){L=!0;continue}Object.defineProperty(K,O.key,{get:hh4(O.get),enumerable:!0});let E="v"+D++;N.push(E),F.push("o["+JSON.stringify(O.key)+"]="+E+"(s)")}if(L)F.push("__proto__:this");let B=Function(...N,"var c=this;return function(s){var o=new c();"+F.join(";")+";return o;}").apply(Z,z.map((O)=>O.get));Object.defineProperty(K,"toJSON",{value(O){return B.call(this,this[wJ0])}})}else Object.defineProperty(K,"toJSON",{value(F){let N={};for(let D=0,L=z.length;D<L;D++){let B=z[D].key;N[B]=this[B]}return N}})}var H=new W;return H[wJ0]={bytes:$,position:Y,srcString:"",bytesEnd:X},H}function LR($){switch($){case 246:return null;case 247:return;case 248:return!1;case 249:return!0}throw Error("Unknown constant")}function hh4($){return function(){return $(this[wJ0])}}function fh4(){if(C3)C3.bytes=Uint8Array.prototype.slice.call(C3.bytes,C3.position,C3.bytesEnd),C3.position=0,C3.bytesEnd=C3.bytes.length}function gh4($,Y){if(Y.typedStructs){let G=new Map;G.set("named",$),G.set("typed",Y.typedStructs),$=G}let X=Y.lastTypedStructuresLength||0;return $.isCompatible=(G)=>{let J=!0;if(G instanceof Map){if((G.get("named")||[]).length!==(Y.lastNamedStructuresLength||0))J=!1;if((G.get("typed")||[]).length!==X)J=!1}else if(G instanceof Array||Array.isArray(G)){if(G.length!==(Y.lastNamedStructuresLength||0))J=!1}if(!J)Y._mergeStructures(G);return J},Y.lastTypedStructuresLength=Y.typedStructs&&Y.typedStructs.length,$}Ja0(bh4,yh4,fh4);var Hf4=process.env.MSGPACKR_NATIVE_ACCELERATION_DISABLED!==void 0&&process.env.MSGPACKR_NATIVE_ACCELERATION_DISABLED.toLowerCase()==="true";if(!Hf4){let $;try{if($=Qs0(),$)tr0($.extractStrings)}catch(Y){}}class hJ0 extends Error{constructor($="Client closed"){super($);this.name="ClientClosedError"}}var Ws0=!1;function Vf4(){if(Ws0)return;Ws0=!0,process.on("unhandledRejection",($)=>{if($ instanceof hJ0)return})}class ER extends zf4{on($,Y){return super.on($,Y)}once($,Y){return super.once($,Y)}socket=null;connected=!1;connecting=!1;options;health;reconnect;commands;reqIdCounter=0;constructor($={}){super();this.options={...Mc,...$},this.commands=new Ic,this.health=new KS({pingInterval:this.options.pingInterval,maxPingFailures:this.options.maxPingFailures}),this.reconnect=new Rc({maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectDelay:this.options.reconnectDelay,maxReconnectDelay:this.options.maxReconnectDelay,autoReconnect:this.options.autoReconnect}),this.reconnect.on("reconnecting",(Y)=>this.emit("reconnecting",Y)),this.reconnect.on("maxReconnectAttemptsReached",()=>{this.emit("maxReconnectAttemptsReached"),this.commands.rejectAll(Error("Max reconnection attempts reached"))})}async connect(){if(this.connected)return;if(this.connecting)return this.waitForConnection();this.connecting=!0,this.reconnect.setClosed(!1);try{await this.doConnect(),this.reconnect.reset(),this.emit("connected"),this.health.startPing(async()=>{await this.ping()}),this.processQueue()}catch($){if(this.connecting=!1,this.reconnect.canReconnect())this.reconnect.scheduleReconnect(()=>this.connect());throw $}}waitForConnection(){return new Promise(($,Y)=>{let X=()=>{this.off("error",G),$()},G=(J)=>{this.off("connected",X),Y(J)};this.once("connected",X),this.once("error",G)})}async doConnect(){let{socket:$}=await HJ0({host:this.options.host,port:this.options.port},this.options.connectTimeout,{onData:(Y)=>{this.handleData(Y)},onClose:()=>{this.handleClose()},onError:(Y)=>this.emit("error",Y)});if(this.socket=$,this.options.token)try{await this.authenticate()}catch(Y){throw this.socket.end(),this.socket=null,Y}this.connected=!0,this.connecting=!1,this.health.recordConnected()}async authenticate(){if(!(await this.sendDirect({cmd:"Auth",token:this.options.token})).ok)throw Error("Authentication failed")}handleData($){try{let Y=HS($),X=Y.reqId;if(X){let J=this.commands.removeByReqId(X);if(J){clearTimeout(J.timeout),J.resolve(Y),this.processQueue();return}}let G=this.commands.getCurrentCommand();if(G){clearTimeout(G.timeout),G.resolve(Y),this.commands.setCurrentCommand(null),this.processQueue();return}this.emit("warning",{type:"unknown_response",reqId:X})}catch{let Y=this.commands.getCurrentCommand();if(Y)clearTimeout(Y.timeout),Y.reject(Error("Invalid response from server")),this.commands.setCurrentCommand(null),this.processQueue()}}handleClose(){let $=this.connected;if(this.connected=!1,this.connecting=!1,this.socket=null,this.health.stopPing(),this.commands.rejectAll(Error("Connection lost")),$){if(this.emit("disconnected"),this.reconnect.canReconnect())this.reconnect.scheduleReconnect(()=>this.connect())}}async ping(){if(!this.connected)return!1;try{let $=Date.now(),G=(await this.send({cmd:"Ping"})).data?.pong===!0;if(G)this.health.recordPingSuccess(Date.now()-$),this.emit("health",{type:"ping_success",latency:Date.now()-$});else this.handlePingFailure();return G}catch{return this.handlePingFailure(),!1}}handlePingFailure(){if(this.health.recordPingFailure())this.emit("health",{type:"unhealthy",reason:"max_ping_failures"}),this.forceReconnect();else this.emit("health",{type:"ping_failed"})}forceReconnect(){if(this.reconnect.isClosed())return;if(this.socket)this.socket.end(),this.socket=null;if(this.connected=!1,this.health.stopPing(),this.reconnect.canReconnect())this.reconnect.scheduleReconnect(()=>this.connect())}getHealth(){return this.health.getHealth(this.getState())}generateReqId(){return this.reqIdCounter=this.reqIdCounter+1&2147483647,String(this.reqIdCounter)}sendDirect($){if(!this.socket)return Promise.reject(Error("Not connected"));let Y=Date.now();this.health.recordCommandSent();let X=this.generateReqId(),G={...$,reqId:X},J,Q=new Promise((W,Z)=>{let K=setTimeout(()=>{if(this.commands.removeByReqId(X))this.health.recordError(),Z(Error("Command timeout"))},this.options.commandTimeout);J={id:0,reqId:X,command:G,resolve:(H)=>{this.health.recordSuccess(Date.now()-Y),W(H)},reject:(H)=>{this.health.recordError(),Z(H)},timeout:K}});return J.promise=Q,this.commands.addInFlight(J),this.socket.write(FR.frame(NR(G))),Q}processQueue(){if(!this.connected||!this.socket)return;while(this.commands.hasPending()&&this.commands.canSendMore(this.options.maxInFlight)){let $=this.commands.dequeue();if(!$)break;clearTimeout($.timeout);let Y=setTimeout(()=>{if(this.commands.removeByReqId($.reqId))this.health.recordError(),$.reject(Error("Command timeout"))},this.options.commandTimeout);$.timeout=Y,this.commands.addInFlight($),this.socket.write(FR.frame(NR($.command)))}}async send($){let Y=Date.now();this.health.recordCommandSent();let X=this.generateReqId(),G={...$,reqId:X},J=this.commands.nextId(),Q,W=new Promise((Z,K)=>{let H=setTimeout(()=>{if(this.commands.remove(J)){this.health.recordError(),K(Error("Command timeout"));return}if(this.commands.removeByReqId(X))this.health.recordError(),K(Error("Command timeout"))},this.options.commandTimeout);Q={id:J,reqId:X,command:G,resolve:(z)=>{this.health.recordSuccess(Date.now()-Y),Z(z)},reject:(z)=>{this.health.recordError(),K(z)},timeout:H}});if(Q.promise=W,this.commands.enqueue(Q),!this.connected&&!this.connecting)this.connect().catch(()=>{});else if(this.connected)this.processQueue();return W}close(){if(this.reconnect.setClosed(!0),this.health.stopPing(),this.reconnect.cancelReconnect(),Vf4(),this.commands.rejectAll(new hJ0),this.socket)this.socket.end(),this.socket=null,this.connected=!1}isConnected(){return this.connected}getState(){if(this.reconnect.isClosed())return"closed";if(this.connected)return"connected";if(this.connecting)return"connecting";return"disconnected"}getInFlightCount(){return this.commands.getInFlightCount()}}class CH{clients=[];options;currentIndex=0;closed=!1;refCount=0;poolKey=null;constructor($={}){let Y=Math.max(1,$.poolSize??4);this.options={host:$.host??"localhost",port:$.port??6789,token:$.token??"",poolSize:Y,maxReconnectAttempts:$.maxReconnectAttempts??1/0,reconnectDelay:$.reconnectDelay??100,maxReconnectDelay:$.maxReconnectDelay??30000,connectTimeout:$.connectTimeout??5000,commandTimeout:$.commandTimeout??30000,autoReconnect:$.autoReconnect??!0,pingInterval:$.pingInterval??30000,maxPingFailures:$.maxPingFailures??3,pipelining:$.pipelining??!0,maxInFlight:$.maxInFlight??100};for(let X=0;X<this.options.poolSize;X++){let G=new ER({host:this.options.host,port:this.options.port,token:this.options.token,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectDelay:this.options.reconnectDelay,maxReconnectDelay:this.options.maxReconnectDelay,connectTimeout:this.options.connectTimeout,commandTimeout:this.options.commandTimeout,autoReconnect:this.options.autoReconnect,pingInterval:this.options.pingInterval,maxPingFailures:this.options.maxPingFailures});this.clients.push(G)}}async connect(){await Promise.all(this.clients.map(($)=>$.connect()))}getNextClient(){let $=this.clients.length;for(let X=0;X<$;X++){let G=(this.currentIndex+X)%$,J=this.clients[G];if(J.isConnected())return this.currentIndex=(G+1)%$,J}let Y=this.clients[this.currentIndex];return this.currentIndex=(this.currentIndex+1)%$,Y}async send($){if(this.closed)throw Error("Connection pool is closed");return this.getNextClient().send($)}async sendParallel($){if(this.closed)throw Error("Connection pool is closed");let Y=$.map((X,G)=>{return this.clients[G%this.clients.length].send(X)});return Promise.all(Y)}isConnected(){return this.clients.some(($)=>$.isConnected())}getConnectedCount(){return this.clients.filter(($)=>$.isConnected()).length}getPoolSize(){return this.clients.length}addRef(){this.refCount++}release(){if(this.refCount--,this.refCount<=0)this.close()}setPoolKey($){this.poolKey=$}close(){if(this.closed)return;if(this.closed=!0,this.poolKey)hc.delete(this.poolKey),this.poolKey=null;for(let $ of this.clients)$.close();this.clients.length=0}isClosed(){return this.closed}getHealth(){let $=this.clients.map((Z)=>Z.getHealth()),Y=$.filter((Z)=>Z.state==="connected").length,X=$.filter((Z)=>Z.healthy).length,G=$.reduce((Z,K)=>Z+K.totalCommands,0),J=$.reduce((Z,K)=>Z+K.totalErrors,0),Q=$.filter((Z)=>Z.avgLatencyMs>0).map((Z)=>Z.avgLatencyMs),W=Q.length>0?Q.reduce((Z,K)=>Z+K,0)/Q.length:0;return{healthy:X>0,connectedCount:Y,totalCount:this.clients.length,clients:$,avgLatencyMs:Math.round(W*100)/100,totalCommands:G,totalErrors:J}}}var hc=new Map;function Ff4($){let Y=$?.host??"localhost",X=$?.port??6789,G=$?.poolSize??4,J=$?.token??"",Q=J?String(Number(Bun.hash(J))&65535):"0";return`${Y}:${X}:${G}:${Q}`}function MR($){let Y=Ff4($),X=hc.get(Y);if(X&&!X.isClosed())return X.addRef(),X;if(X)hc.delete(Y);return X=new CH($),X.setPoolKey(Y),hc.set(Y,X),X.addRef(),X}function FS($){$.release()}function Ks0($){let Y=2166136261;for(let X=0;X<$.length;X++)Y^=$.charCodeAt(X),Y=Math.imul(Y,16777619);return Y>>>0}function Df4(){let $=navigator.hardwareConcurrency||4,Y=1;while(Y<$&&Y<64)Y*=2;return Y}var M7=Df4(),Us0=M7-1;function l1($){return Ks0($)&Us0}function x5($){return Ks0($)&Us0}function fc(){return Bun.randomUUIDv7()}var Hs0=Bun.env.BUNQUEUE_EMBEDDED==="1";function zs0($){return $.shards}function fJ0($,Y){let X=l1(Y);return zs0($)[X]}function RR($){return{shards:zs0($),jobIndex:$.getJobIndex()}}function gJ0($){if(!$)return;return $}function Vs0($){return $}class mJ0{maxPending;pending=[];timer=null;config;flushCb;stopped=!1;flushing=!1;inFlightFlushes=new Set;constructor($,Y){this.config=$,this.maxPending=$.maxPending??1e4,this.flushCb=Y}enqueue($,Y,X){return new Promise((G,J)=>{if(this.stopped){J(Error("AddBatcher stopped"));return}if(this.pending.length>=this.maxPending){let Q=this.pending.splice(0,Math.floor(this.maxPending*0.1));for(let W of Q)W.reject(Error("Add buffer overflow - oldest entries dropped"))}if(this.pending.push({name:$,data:Y,opts:X,resolve:G,reject:J}),this.pending.length>=this.config.maxSize)this.triggerFlush();else if(!this.flushing)this.triggerFlush();else this.timer??=setTimeout(()=>{this.timer=null,this.triggerFlush()},this.config.maxDelayMs)})}triggerFlush(){if(this.timer)clearTimeout(this.timer),this.timer=null;let $=this.doFlush().catch((Y)=>{console.error("[bunqueue] Flush failed:",Y instanceof Error?Y.message:String(Y))});this.inFlightFlushes.add($),$.finally(()=>this.inFlightFlushes.delete($))}async doFlush(){if(this.pending.length===0)return;this.flushing=!0;try{while(this.pending.length>0&&!this.stopped)await this.flushOnce()}finally{this.flushing=!1}}async flush(){await this.doFlush()}async flushOnce(){let $=this.pending.splice(0,this.pending.length);if($.length===0)return;if(this.timer)clearTimeout(this.timer),this.timer=null;try{let Y=await this.flushCb($.map((X)=>({name:X.name,data:X.data,opts:X.opts})));for(let X=0;X<$.length;X++)$[X].resolve(Y[X])}catch(Y){let X=Y instanceof Error?Y:Error(String(Y));for(let G of $)G.reject(X)}}stop(){if(this.stopped=!0,this.timer)clearTimeout(this.timer),this.timer=null;let $=Error("AddBatcher stopped"),Y=this.pending.splice(0,this.pending.length);for(let X of Y)X.reject($)}async waitForInFlight(){if(this.inFlightFlushes.size===0)return;await Promise.all(this.inFlightFlushes)}hasPending(){return this.pending.length>0}}function gc($){if($)return $;let Y=Bun.env.BQ_TOKEN;if(Y)return Y;let X=Bun.env.BUNQUEUE_TOKEN;if(X)return X;return}function d0($){return $}function As0(){return Bun.randomUUIDv7()}var Nf4=3600000,qY=20,TN={priority:0,maxAttempts:3,backoff:1000,lifo:!1,removeOnComplete:!1,removeOnFail:!1,stackTraceLimit:10};function Lf4($){if(typeof $==="object")return{backoff:$.delay,backoffConfig:{type:$.type,delay:$.delay}};return{backoff:$??TN.backoff,backoffConfig:null}}function Bf4($){if(!$)return null;return{every:$.every,limit:$.limit,pattern:$.pattern,count:$.count??0,startDate:$.startDate,endDate:$.endDate,tz:$.tz,immediately:$.immediately,prevMillis:$.prevMillis,offset:$.offset,jobId:$.jobId}}function Of4($){return{priority:$.priority??TN.priority,lifo:$.lifo??TN.lifo,maxAttempts:$.maxAttempts??TN.maxAttempts,removeOnComplete:$.removeOnComplete??TN.removeOnComplete,removeOnFail:$.removeOnFail??TN.removeOnFail}}function Ef4($){return{ttl:$.ttl??null,timeout:$.timeout??null,uniqueKey:$.uniqueKey??null,customId:$.customId??null,parentId:$.parentId??null,groupId:$.groupId??null,stallTimeout:$.stallTimeout??null}}function Mf4($){return{stackTraceLimit:$.stackTraceLimit??TN.stackTraceLimit,keepLogs:$.keepLogs??null,sizeLimit:$.sizeLimit??null,failParentOnFailure:$.failParentOnFailure??!1,removeDependencyOnFailure:$.removeDependencyOnFailure??!1,continueParentOnFailure:$.continueParentOnFailure??!1,ignoreDependencyOnFailure:$.ignoreDependencyOnFailure??!1,deduplicationTtl:$.dedup?.ttl??null,deduplicationExtend:$.dedup?.extend??!1,deduplicationReplace:$.dedup?.replace??!1,debounceId:$.debounceId??null,debounceTtl:$.debounceTtl??null}}function uJ0($,Y,X,G=Date.now()){let{backoff:J,backoffConfig:Q}=Lf4(X.backoff),W=Of4(X),Z=Ef4(X),K=Mf4(X),H=X.timestamp??G;return{id:$,queue:Y,data:X.data,createdAt:H,runAt:H+(X.delay??0),startedAt:null,completedAt:null,attempts:0,backoff:J,backoffConfig:Q,dependsOn:X.dependsOn??[],childrenIds:X.childrenIds??[],childrenCompleted:0,tags:X.tags??[],progress:0,progressMessage:null,repeat:Bf4(X.repeat),lastHeartbeat:H,stallCount:0,...W,...Z,...K,timeline:[]}}function Fs0($,Y=Date.now()){return $.runAt<=Y}function Ds0($,Y=Date.now()){if($.ttl===null)return!1;return Y>$.createdAt+$.ttl}function qR($){let Y=$.backoffConfig?.maxDelay??Nf4;if($.backoffConfig)if($.backoffConfig.type==="fixed"){let Q=$.backoffConfig.delay*(0.8+Math.random()*0.4);return Math.min(Q,Y)}else{let Q=$.backoffConfig.delay*Math.pow(2,$.attempts)*(0.5+Math.random());return Math.min(Q,Y)}let G=$.backoff*Math.pow(2,$.attempts)*(0.5+Math.random());return Math.min(G,Y)}function Ns0($){return $.attempts<$.maxAttempts}function Rf4(){return Bun.randomUUIDv7()}var CN=30000;function Ls0($,Y,X=CN,G=Date.now()){return{jobId:$,token:Rf4(),owner:Y,createdAt:G,expiresAt:G+X,lastRenewalAt:G,renewalCount:0,ttl:X}}function DS($,Y=Date.now()){return Y>=$.expiresAt}function Bs0($,Y,X=Date.now()){let G=Y??$.ttl;$.expiresAt=X+G,$.lastRenewalAt=X,$.renewalCount++}function Os0($,Y){if($.priority!==Y.priority)return Y.priority-$.priority;if($.lifo&&Y.lifo){if(Y.jobId>$.jobId)return 1;if(Y.jobId<$.jobId)return-1;return 0}if($.runAt!==Y.runAt)return $.runAt-Y.runAt;if($.jobId<Y.jobId)return-1;if($.jobId>Y.jobId)return 1;return 0}class IR{static D=4;heap=[];index=new Map;generation=0n;get size(){return this.index.size}get isEmpty(){return this.index.size===0}push($){let Y=this.generation++;this.index.set($.id,{job:$,generation:Y});let X={jobId:$.id,priority:$.priority,runAt:$.runAt,lifo:$.lifo,generation:Y};this.heap.push(X),this.bubbleUp(this.heap.length-1)}pop(){while(this.heap.length>0){let $=this.heap[0],Y=this.index.get($.jobId);if(Y?.generation!==$.generation){this.removeTop();continue}return this.removeTop(),this.index.delete($.jobId),Y.job}return null}peek(){while(this.heap.length>0){let $=this.heap[0],Y=this.index.get($.jobId);if(Y?.generation!==$.generation){this.removeTop();continue}return Y.job}return null}find($){return this.index.get($)?.job??null}has($){return this.index.has($)}remove($){let Y=this.index.get($);if(!Y)return null;return this.index.delete($),Y.job}updatePriority($,Y){let X=this.index.get($);if(!X)return!1;let G={...X.job,priority:Y},J=this.generation++;this.index.set($,{job:G,generation:J});let Q={jobId:G.id,priority:Y,runAt:G.runAt,lifo:G.lifo,generation:J};return this.heap.push(Q),this.bubbleUp(this.heap.length-1),!0}updateRunAt($,Y){let X=this.index.get($);if(!X)return!1;let G={...X.job,runAt:Y},J=this.generation++;this.index.set($,{job:G,generation:J});let Q={jobId:G.id,priority:G.priority,runAt:Y,lifo:G.lifo,generation:J};return this.heap.push(Q),this.bubbleUp(this.heap.length-1),!0}values(){return Array.from(this.index.values()).map(($)=>$.job)}clear(){this.heap=[],this.index.clear(),this.generation=0n}getStaleRatio(){if(this.heap.length===0)return 0;return 1-this.index.size/this.heap.length}compact(){if(this.heap.length===0)return;let $=[];for(let Y of this.heap)if(this.index.get(Y.jobId)?.generation===Y.generation)$.push(Y);this.heap=$,this.heapify()}heapify(){let $=IR.D;for(let Y=Math.floor((this.heap.length-2)/$);Y>=0;Y--)this.bubbleDown(Y)}needsCompaction($=0.2){return this.getStaleRatio()>$}removeTop(){if(this.heap.length<=1){this.heap.pop();return}this.heap[0]=this.heap.pop(),this.bubbleDown(0)}bubbleUp($){let Y=IR.D;while($>0){let X=Math.floor(($-1)/Y);if(Os0(this.heap[$],this.heap[X])>=0)break;this.swap($,X),$=X}}bubbleDown($){let Y=IR.D,X=this.heap.length,G=this.heap;while(!0){let J=Y*$+1;if(J>=X)break;let Q=$,W=Math.min(J+Y,X);for(let Z=J;Z<W;Z++)if(Os0(G[Z],G[Q])<0)Q=Z;if(Q===$)break;this.swap($,Q),$=Q}}swap($,Y){let X=this.heap[$];this.heap[$]=this.heap[Y],this.heap[Y]=X}}function mc($,Y=Date.now()){return $.expiresAt!==null&&$.expiresAt<=Y}function pJ0($,Y=Date.now()){return $!==void 0?Y+$:null}class dJ0{keys=new Map;isAvailable($,Y){let X=this.keys.get($)?.get(Y);if(!X)return!0;if(mc(X))return this.keys.get($)?.delete(Y),!0;return!1}getEntry($,Y){let X=this.keys.get($)?.get(Y);if(!X)return null;if(mc(X))return this.keys.get($)?.delete(Y),null;return X}register($,Y,X){this.registerWithTtl($,Y,X,void 0)}registerWithTtl($,Y,X,G){let J=this.keys.get($);if(!J)J=new Map,this.keys.set($,J);let Q=Date.now();J.set(Y,{jobId:X,expiresAt:pJ0(G,Q),registeredAt:Q})}extendTtl($,Y,X){let G=this.keys.get($)?.get(Y);if(!G)return!1;return G.expiresAt=pJ0(X),!0}release($,Y){this.keys.get($)?.delete(Y)}cleanExpired(){let $=0,Y=Date.now();for(let[X,G]of this.keys)for(let[J,Q]of G)if(mc(Q,Y))G.delete(J),$++;return $}clearQueue($){this.keys.delete($)}getMap(){return this.keys}}var cJ0={autoRetry:!1,autoRetryInterval:3600000,maxAutoRetries:3,maxAge:604800000,maxEntries:1e4};function Es0($,Y,X,G=cJ0){let J=Date.now(),Q={attempt:$.attempts,startedAt:$.startedAt??$.createdAt,failedAt:J,reason:Y,error:X,duration:$.startedAt?J-$.startedAt:0};return{job:$,enteredAt:J,reason:Y,error:X,attempts:[Q],retryCount:0,lastRetryAt:null,nextRetryAt:G.autoRetry?J+G.autoRetryInterval:null,expiresAt:G.maxAge?J+G.maxAge:null}}function uc($,Y=Date.now()){return $.expiresAt!==null&&Y>=$.expiresAt}function lJ0($,Y,X=Date.now()){if(!Y.autoRetry)return!1;if($.retryCount>=Y.maxAutoRetries)return!1;if($.nextRetryAt===null)return!1;return X>=$.nextRetryAt}function Ms0($,Y){let X=Date.now();if($.retryCount++,$.lastRetryAt=X,$.retryCount<Y.maxAutoRetries){let G=Math.pow(2,$.retryCount-1);$.nextRetryAt=X+Y.autoRetryInterval*G}else $.nextRetryAt=null}var pc={enabled:!0,stallInterval:30000,maxStalls:3,gracePeriod:5000};function qf4($,Y=pc,X=Date.now()){if($.startedAt===null)return{isStalled:!1,stalledFor:0,shouldMoveToDlq:!1,newStallCount:$.stallCount};if(X-$.startedAt<Y.gracePeriod)return{isStalled:!1,stalledFor:0,shouldMoveToDlq:!1,newStallCount:$.stallCount};let G=$.stallTimeout??Y.stallInterval,J=X-$.lastHeartbeat;if(!(J>G))return{isStalled:!1,stalledFor:J,shouldMoveToDlq:!1,newStallCount:$.stallCount};let W=$.stallCount+1,Z=W>=Y.maxStalls;return{isStalled:!0,stalledFor:J,shouldMoveToDlq:Z,newStallCount:W}}function iJ0($,Y=pc,X=Date.now()){let G=qf4($,Y,X);if(!G.isStalled)return"keep";if(G.shouldMoveToDlq)return"move_to_dlq";return"retry"}function Rs0($){return $.stallCount++,$.stallCount}class nJ0{dlq=new Map;dlqConfig=new Map;stallConfig=new Map;stats;constructor($){this.stats=$}getConfig($){return this.dlqConfig.get($)??cJ0}setConfig($,Y){let X=this.getConfig($);this.dlqConfig.set($,{...X,...Y})}getStallConfig($){return this.stallConfig.get($)??pc}setStallConfig($,Y){let X=this.getStallConfig($);this.stallConfig.set($,{...X,...Y})}add($,Y="unknown",X=null){let G=this.dlq.get($.queue);if(!G)G=[],this.dlq.set($.queue,G);let J=this.getConfig($.queue),Q=Es0($,Y,X,J);while(G.length>=J.maxEntries)G.shift(),this.stats.decrementDlq();return G.push(Q),this.stats.incrementDlq(),Q}restoreEntry($,Y){let X=this.dlq.get($);if(!X)X=[],this.dlq.set($,X);X.push(Y),this.stats.incrementDlq()}getEntries($){return this.dlq.get($)??[]}getJobs($,Y){let X=this.dlq.get($);if(!X)return[];return(Y?X.slice(0,Y):X).map((J)=>J.job)}getFiltered($,Y){let X=this.dlq.get($);if(!X)return[];let G=Date.now(),J=X.filter((Q)=>{if(Y.reason&&Q.reason!==Y.reason)return!1;if(Y.olderThan&&Q.enteredAt>Y.olderThan)return!1;if(Y.newerThan&&Q.enteredAt<Y.newerThan)return!1;if(Y.retriable&&!lJ0(Q,this.getConfig($),G))return!1;if(Y.expired&&!uc(Q,G))return!1;return!0});if(Y.offset)J=J.slice(Y.offset);if(Y.limit)J=J.slice(0,Y.limit);return J}remove($,Y){let X=this.dlq.get($);if(!X)return null;let G=X.findIndex((J)=>J.job.id===Y);if(G===-1)return null;return this.stats.decrementDlq(),X.splice(G,1)[0]}getAutoRetryEntries($,Y=Date.now()){let X=this.dlq.get($);if(!X)return[];let G=this.getConfig($);return X.filter((J)=>lJ0(J,G,Y))}getExpiredEntries($,Y=Date.now()){let X=this.dlq.get($);if(!X)return[];return X.filter((G)=>uc(G,Y))}purgeExpired($,Y=Date.now()){let X=this.dlq.get($);if(!X)return 0;let G=X.length,J=X.filter((Q)=>!uc(Q,Y));if(J.length<G){this.dlq.set($,J);let Q=G-J.length;return this.stats.decrementDlq(Q),Q}return 0}clear($){let Y=this.dlq.get($);if(!Y)return 0;let X=Y.length;return this.dlq.delete($),this.stats.decrementDlq(X),X}getCount($){return this.dlq.get($)?.length??0}getQueueNames(){return Array.from(this.dlq.keys())}deleteQueue($){let X=this.dlq.get($)?.length??0;return this.dlq.delete($),this.dlqConfig.delete($),this.stallConfig.delete($),X}}function qs0($){return{name:$,paused:!1,rateLimit:null,concurrencyLimit:null,activeCount:0}}class rJ0{capacity;refillRate;tokens;lastRefill;constructor($,Y=$){this.capacity=$,this.refillRate=Y,this.tokens=$,this.lastRefill=Date.now()}tryAcquire(){if(this.refill(),this.tokens>=1)return this.tokens-=1,!0;return!1}refill(){let $=Date.now(),X=($-this.lastRefill)/1000*this.refillRate;this.tokens=Math.min(this.capacity,this.tokens+X),this.lastRefill=$}getTokens(){return this.refill(),this.tokens}}class aJ0{limit;active=0;constructor($){this.limit=$}tryAcquire(){if(this.active<this.limit)return this.active+=1,!0;return!1}release(){if(this.active>0)this.active-=1}getActive(){return this.active}getLimit(){return this.limit}setLimit($){this.limit=$}}class sJ0{queueState=new Map;rateLimiters=new Map;concurrencyLimiters=new Map;getState($){let Y=this.queueState.get($);if(!Y)Y=qs0($),this.queueState.set($,Y);return Y}isPaused($){return this.queueState.get($)?.paused??!1}pause($){this.getState($).paused=!0}resume($){this.getState($).paused=!1}setRateLimit($,Y){this.rateLimiters.set($,new rJ0(Y)),this.getState($).rateLimit=Y}clearRateLimit($){this.rateLimiters.delete($);let Y=this.queueState.get($);if(Y)Y.rateLimit=null}tryAcquireRateLimit($){let Y=this.rateLimiters.get($);return!Y||Y.tryAcquire()}setConcurrency($,Y){let X=this.concurrencyLimiters.get($);if(X)X.setLimit(Y);else X=new aJ0(Y),this.concurrencyLimiters.set($,X);this.getState($).concurrencyLimit=Y}clearConcurrency($){this.concurrencyLimiters.delete($);let Y=this.queueState.get($);if(Y)Y.concurrencyLimit=null}tryAcquireConcurrency($){let Y=this.concurrencyLimiters.get($);return!Y||Y.tryAcquire()}releaseConcurrency($){this.concurrencyLimiters.get($)?.release()}getQueueNames(){return Array.from(this.queueState.keys())}deleteQueue($){this.queueState.delete($),this.rateLimiters.delete($),this.concurrencyLimiters.delete($)}getStateMap(){return this.queueState}}class oJ0{waitingDeps=new Map;dependencyIndex=new Map;waitingChildren=new Map;registerDependencies($,Y){for(let X of Y){let G=this.dependencyIndex.get(X);if(!G)G=new Set,this.dependencyIndex.set(X,G);G.add($)}}unregisterDependencies($,Y){for(let X of Y){let G=this.dependencyIndex.get(X);if(G){if(G.delete($),G.size===0)this.dependencyIndex.delete(X)}}}getJobsWaitingFor($){return this.dependencyIndex.get($)}addWaitingJob($){if(this.waitingDeps.set($.id,$),$.dependsOn&&$.dependsOn.length>0)this.registerDependencies($.id,$.dependsOn)}removeWaitingJob($){let Y=this.waitingDeps.get($);if(Y){if(this.waitingDeps.delete($),Y.dependsOn&&Y.dependsOn.length>0)this.unregisterDependencies($,Y.dependsOn)}return Y}getWaitingJob($){return this.waitingDeps.get($)}isWaiting($){return this.waitingDeps.has($)}addWaitingParent($){this.waitingChildren.set($.id,$)}removeWaitingParent($){let Y=this.waitingChildren.get($);if(Y)this.waitingChildren.delete($);return Y}getWaitingParent($){return this.waitingChildren.get($)}isParentWaiting($){return this.waitingChildren.has($)}getCounts(){return{waitingDeps:this.waitingDeps.size,dependencyIndex:this.dependencyIndex.size,waitingChildren:this.waitingChildren.size}}}function Is0($){let Y=[];for(let X=0;X<=$;X++)Y.push(null);return{value:null,forward:Y}}class tJ0{maxLevel;probability;compare;equals;head;level=0;_size=0;constructor($,Y=16,X=0.5,G){this.compare=$,this.maxLevel=Y,this.probability=X,this.equals=G,this.head=Is0(Y)}get size(){return this._size}get isEmpty(){return this._size===0}randomLevel(){let $=0;while(Math.random()<this.probability&&$<this.maxLevel)$++;return $}insert($){let Y=[];for(let W=0;W<=this.maxLevel;W++)Y.push(null);let X=this.head;for(let W=this.level;W>=0;W--){let Z=X.forward[W];while(Z!==null&&this.compare(Z.value,$)<0)X=Z,Z=X.forward[W];Y[W]=X}if(this.equals){let W=X.forward[0];while(W!==null&&this.compare(W.value,$)===0){if(this.equals(W.value,$))return!1;W=W.forward[0]}}let G=this.randomLevel();if(G>this.level){for(let W=this.level+1;W<=G;W++)Y[W]=this.head;this.level=G}let J=[];for(let W=0;W<=G;W++)J.push(null);let Q={value:$,forward:J};for(let W=0;W<=G;W++){let Z=Y[W];if(Z)Q.forward[W]=Z.forward[W],Z.forward[W]=Q}return this._size++,!0}delete($){let Y=[];for(let J=0;J<=this.maxLevel;J++)Y.push(null);let X=this.head;for(let J=this.level;J>=0;J--){let Q=X.forward[J];while(Q!==null&&this.compare(Q.value,$)<0)X=Q,Q=X.forward[J];Y[J]=X}let G=X.forward[0];if(G===null||this.compare(G.value,$)!==0)return!1;for(let J=0;J<=this.level;J++){let Q=Y[J];if(Q?.forward[J]===G)Q.forward[J]=G.forward[J];else break}while(this.level>0&&this.head.forward[this.level]===null)this.level--;return this._size--,!0}deleteWhere($){let Y=this.head.forward[0];while(Y!==null){if($(Y.value))return this.delete(Y.value),Y.value;Y=Y.forward[0]}return null}find($){let Y=this.head;for(let G=this.level;G>=0;G--){let J=Y.forward[G];while(J!==null&&this.compare(J.value,$)<0)Y=J,J=Y.forward[G]}let X=Y.forward[0];if(X!==null&&this.compare(X.value,$)===0)return X.value;return null}has($){return this.find($)!==null}first(){return this.head.forward[0]?.value??null}shift(){let $=this.head.forward[0];if($===null)return null;return this.delete($.value),$.value}rangeUntil($,Y){let X=[],G=this.head.forward[0];while(G!==null&&this.compare(G.value,$)<=0){if(X.push(G.value),Y!==void 0&&X.length>=Y)break;G=G.forward[0]}return X}takeWhile($,Y){let X=[],G=this.head.forward[0];while(G!==null&&$(G.value)){if(X.push(G.value),Y!==void 0&&X.length>=Y)break;G=G.forward[0]}return X}*values(){let $=this.head.forward[0];while($!==null)yield $.value,$=$.forward[0]}toArray(){return Array.from(this.values())}clear(){this.head=Is0(this.maxLevel),this.level=0,this._size=0}removeAll($){let Y=[],X=this.head.forward[0];while(X!==null){let G=X.forward[0];if($(X.value))Y.push(X.value),this.delete(X.value);X=G}return Y}}class x3{heap=[];compare;static D=4;constructor($){this.compare=$}get size(){return this.heap.length}get isEmpty(){return this.heap.length===0}push($){this.heap.push($),this.bubbleUp(this.heap.length-1)}pop(){if(this.heap.length===0)return;if(this.heap.length===1)return this.heap.pop();let $=this.heap[0],Y=this.heap.pop();if(Y!==void 0)this.heap[0]=Y,this.bubbleDown(0);return $}peek(){return this.heap[0]}clear(){this.heap=[]}toArray(){return[...this.heap]}buildFrom($){this.heap=[...$];let Y=x3.D;for(let X=Math.floor((this.heap.length-2)/Y);X>=0;X--)this.bubbleDown(X)}removeWhere($){let Y=this.heap.findIndex($);if(Y===-1)return;let X=this.heap[Y];if(Y===this.heap.length-1)this.heap.pop();else{let G=this.heap.pop();if(G!==void 0)this.heap[Y]=G,this.bubbleUp(Y),this.bubbleDown(Y)}return X}bubbleUp($){let Y=x3.D;while($>0){let X=Math.floor(($-1)/Y);if(this.compare(this.heap[$],this.heap[X])>=0)break;this.swap($,X),$=X}}bubbleDown($){let Y=x3.D,X=this.heap.length,G=this.heap,J=this.compare;while(!0){let Q=Y*$+1;if(Q>=X)break;let W=$,Z=Math.min(Q+Y,X);for(let K=Q;K<Z;K++)if(J(G[K],G[W])<0)W=K;if(W===$)break;this.swap($,W),$=W}}swap($,Y){let X=this.heap[$];this.heap[$]=this.heap[Y],this.heap[Y]=X}}class eJ0{temporalIndex=new tJ0(($,Y)=>$.createdAt-Y.createdAt,16,0.5,($,Y)=>$.jobId===Y.jobId);delayedJobIds=new Set;delayedHeap=new x3(($,Y)=>$.runAt-Y.runAt);delayedRunAt=new Map;addToIndex($,Y,X){this.temporalIndex.insert({createdAt:$,jobId:Y,queue:X})}getOldJobs($,Y,X){let J=Date.now()-Y,Q=[];for(let W of this.temporalIndex.values()){if(W.createdAt>J)break;if(W.queue===$){if(Q.push({jobId:W.jobId,createdAt:W.createdAt}),Q.length>=X)break}}return Q}removeFromIndex($){this.temporalIndex.deleteWhere((Y)=>Y.jobId===$)}clearIndexForQueue($){this.temporalIndex.removeAll((Y)=>Y.queue===$)}cleanOrphaned($){if(this.temporalIndex.size===0)return 0;let Y=this.temporalIndex.size;return this.temporalIndex.removeAll((X)=>!$.has(X.jobId)),Y-this.temporalIndex.size}get indexSize(){return this.temporalIndex.size}isDelayed($){return this.delayedJobIds.has($)}addDelayed($,Y){this.delayedJobIds.add($),this.delayedHeap.push({jobId:$,runAt:Y}),this.delayedRunAt.set($,Y)}removeDelayed($){if(this.delayedJobIds.has($))return this.delayedJobIds.delete($),this.delayedRunAt.delete($),!0;return!1}refreshDelayed($){let Y=0;while(!this.delayedHeap.isEmpty){let X=this.delayedHeap.peek();if(!X||X.runAt>$)break;this.delayedHeap.pop();let G=this.delayedRunAt.get(X.jobId);if(G===void 0)continue;if(G!==X.runAt)continue;this.delayedJobIds.delete(X.jobId),this.delayedRunAt.delete(X.jobId),Y++}return Y}get delayedCount(){return this.delayedJobIds.size}clearDelayed(){this.delayedJobIds.clear(),this.delayedHeap.clear(),this.delayedRunAt.clear()}clear(){this.clearDelayed(),this.temporalIndex.removeAll(()=>!0)}getSizes(){return{delayedJobIds:this.delayedJobIds.size,delayedHeap:this.delayedHeap.size,delayedRunAt:this.delayedRunAt.size,temporalIndex:this.temporalIndex.size}}}class $Q0{waiters=[];pendingNotifications=0;notifyBatch($){for(let Y=0;Y<$;Y++)this.notify()}notify(){while(this.waiters.length>0&&this.waiters[0].cancelled)this.waiters.shift();let $=this.waiters.shift();if($&&!$.cancelled)$.resolve();else this.pendingNotifications++;if(this.waiters.length>1000)this.cleanupWaiters()}waitForJob($){if($<=0)return Promise.resolve();if(this.pendingNotifications>0)return this.pendingNotifications--,Promise.resolve();return new Promise((Y)=>{let X={resolve:Y,cancelled:!1},G=()=>{if(X.cancelled)return;X.cancelled=!0,Y()};this.waiters.push(X),setTimeout(G,$)})}cleanupWaiters(){let $=this.waiters.filter((Y)=>!Y.cancelled);this.waiters.length=0,this.waiters.push(...$)}get length(){return this.waiters.length}}class YQ0{temporalManager;stats={queuedJobs:0,delayedJobs:0,dlqJobs:0};constructor($){this.temporalManager=$}getStats(){return{...this.stats}}incrementQueued($,Y,X,G,J){if(this.stats.queuedJobs++,Y){if(this.stats.delayedJobs++,J!==void 0)this.temporalManager.addDelayed($,J)}if(X!==void 0&&G!==void 0)this.temporalManager.addToIndex(X,$,G)}decrementQueued($){if(this.stats.queuedJobs=Math.max(0,this.stats.queuedJobs-1),this.temporalManager.removeDelayed($))this.stats.delayedJobs=Math.max(0,this.stats.delayedJobs-1)}incrementDlq(){this.stats.dlqJobs++}decrementDlq($=1){this.stats.dlqJobs=Math.max(0,this.stats.dlqJobs-$)}refreshDelayedCount($){let Y=this.temporalManager.refreshDelayed($);this.stats.delayedJobs=Math.max(0,this.stats.delayedJobs-Y)}resetQueuedCounters(){this.stats.queuedJobs=0,this.stats.delayedJobs=0,this.temporalManager.clearDelayed()}resetDlqCounter(){this.stats.dlqJobs=0}adjustQueued($){this.stats.queuedJobs=Math.max(0,this.stats.queuedJobs+$)}adjustDlq($){this.stats.dlqJobs=Math.max(0,this.stats.dlqJobs+$)}syncDelayedCount(){this.stats.delayedJobs=this.temporalManager.delayedCount}}class XQ0{queues=new Map;uniqueKeyManager=new dJ0;dlqManager;limiterManager=new sJ0;dependencyTracker=new oJ0;temporalManager=new eJ0;waiterManager=new $Q0;counters;activeGroups=new Map;constructor(){this.counters=new YQ0(this.temporalManager),this.dlqManager=new nJ0({incrementDlq:()=>{this.counters.incrementDlq()},decrementDlq:($)=>{this.counters.decrementDlq($)}})}notify(){this.waiterManager.notify()}notifyBatch($){this.waiterManager.notifyBatch($)}waitForJob($){return this.waiterManager.waitForJob($)}getQueue($){let Y=this.queues.get($);if(!Y)Y=new IR,this.queues.set($,Y);return Y}getState($){return this.limiterManager.getState($)}isPaused($){return this.limiterManager.isPaused($)}pause($){this.limiterManager.pause($)}resume($){this.limiterManager.resume($),this.waiterManager.notify()}isUniqueAvailable($,Y){return this.uniqueKeyManager.isAvailable($,Y)}getUniqueKeyEntry($,Y){return this.uniqueKeyManager.getEntry($,Y)}registerUniqueKey($,Y,X){this.uniqueKeyManager.register($,Y,X)}registerUniqueKeyWithTtl($,Y,X,G){this.uniqueKeyManager.registerWithTtl($,Y,X,G)}extendUniqueKeyTtl($,Y,X){return this.uniqueKeyManager.extendTtl($,Y,X)}releaseUniqueKey($,Y){this.uniqueKeyManager.release($,Y)}cleanExpiredUniqueKeys(){return this.uniqueKeyManager.cleanExpired()}get uniqueKeys(){return this.uniqueKeyManager.getMap()}isGroupActive($,Y){return this.activeGroups.get($)?.has(Y)??!1}activateGroup($,Y){let X=this.activeGroups.get($);if(!X)X=new Set,this.activeGroups.set($,X);X.add(Y)}releaseGroup($,Y){this.activeGroups.get($)?.delete(Y)}setRateLimit($,Y){this.limiterManager.setRateLimit($,Y)}clearRateLimit($){this.limiterManager.clearRateLimit($)}tryAcquireRateLimit($){return this.limiterManager.tryAcquireRateLimit($)}setConcurrency($,Y){this.limiterManager.setConcurrency($,Y)}clearConcurrency($){this.limiterManager.clearConcurrency($)}tryAcquireConcurrency($){return this.limiterManager.tryAcquireConcurrency($)}releaseConcurrency($){this.limiterManager.releaseConcurrency($)}get queueState(){return this.limiterManager.getStateMap()}clearQueueLimiters($){this.limiterManager.deleteQueue($)}releaseJobResources($,Y,X){if(Y)this.releaseUniqueKey($,Y);if(X)this.releaseGroup($,X);this.releaseConcurrency($)}get waitingDeps(){return this.dependencyTracker.waitingDeps}get dependencyIndex(){return this.dependencyTracker.dependencyIndex}get waitingChildren(){return this.dependencyTracker.waitingChildren}registerDependencies($,Y){this.dependencyTracker.registerDependencies($,Y)}unregisterDependencies($,Y){this.dependencyTracker.unregisterDependencies($,Y)}getJobsWaitingFor($){return this.dependencyTracker.getJobsWaitingFor($)}get dlq(){let $=new Map;for(let Y of this.dlqManager.getQueueNames())$.set(Y,this.dlqManager.getEntries(Y));for(let Y of this.queues.keys())if(!$.has(Y))$.set(Y,[]);return $}get dlqConfig(){let $=new Map;for(let Y of this.getQueueNames())$.set(Y,this.dlqManager.getConfig(Y));return $}get stallConfig(){let $=new Map;for(let Y of this.getQueueNames())$.set(Y,this.dlqManager.getStallConfig(Y));return $}getDlqConfig($){return this.dlqManager.getConfig($)}setDlqConfig($,Y){this.dlqManager.setConfig($,Y)}getStallConfig($){return this.dlqManager.getStallConfig($)}setStallConfig($,Y){this.dlqManager.setStallConfig($,Y)}addToDlq($,Y="unknown",X=null){return this.dlqManager.add($,Y,X)}restoreDlqEntry($,Y){this.dlqManager.restoreEntry($,Y)}getDlqEntries($){return this.dlqManager.getEntries($)}getDlq($,Y){return this.dlqManager.getJobs($,Y)}getDlqFiltered($,Y){return this.dlqManager.getFiltered($,Y)}removeFromDlq($,Y){return this.dlqManager.remove($,Y)}getAutoRetryEntries($,Y=Date.now()){return this.dlqManager.getAutoRetryEntries($,Y)}getExpiredEntries($,Y=Date.now()){return this.dlqManager.getExpiredEntries($,Y)}purgeExpired($,Y=Date.now()){return this.dlqManager.purgeExpired($,Y)}clearDlq($){return this.dlqManager.clear($)}getWaitingCount($){return this.queues.get($)?.size??0}getDlqCount($){return this.dlqManager.getCount($)}getQueueNames(){let $=new Set;for(let Y of this.queues.keys())$.add(Y);for(let Y of this.dlqManager.getQueueNames())$.add(Y);for(let Y of this.limiterManager.getQueueNames())$.add(Y);return Array.from($)}getCountsPerPriority($){let Y=this.queues.get($),X=new Map;if(!Y)return X;for(let G of Y.values()){let J=X.get(G.priority)??0;X.set(G.priority,J+1)}return X}getStats(){return this.counters.getStats()}getInternalSizes(){return{...this.temporalManager.getSizes(),waiters:this.waiterManager.length}}incrementQueued($,Y,X,G,J){this.counters.incrementQueued($,Y,X,G,J)}decrementQueued($){this.counters.decrementQueued($)}incrementDlq(){this.counters.incrementDlq()}decrementDlq($=1){this.counters.decrementDlq($)}refreshDelayedCount($){this.counters.refreshDelayedCount($)}resetQueuedCounters(){this.counters.resetQueuedCounters()}resetDlqCounter(){this.counters.resetDlqCounter()}getOldJobs($,Y,X){return this.temporalManager.getOldJobs($,Y,X)}removeFromTemporalIndex($){this.temporalManager.removeFromIndex($)}clearTemporalIndexForQueue($){this.temporalManager.clearIndexForQueue($)}cleanOrphanedTemporalEntries(){if(this.temporalManager.indexSize===0)return 0;let $=new Set;for(let Y of this.queues.values())for(let X of Y.values())$.add(X.id);return this.temporalManager.cleanOrphaned($)}drain($){let Y=this.queues.get($);if(!Y)return{count:0,jobIds:[]};let X=Y.size,G=[];for(let J of Y.values())G.push(J.id),this.temporalManager.removeDelayed(J.id);return Y.clear(),this.temporalManager.clearIndexForQueue($),this.counters.adjustQueued(-X),this.counters.syncDelayedCount(),{count:X,jobIds:G}}obliterate($){let Y=this.queues.get($);if(Y){for(let G of Y.values())this.temporalManager.removeDelayed(G.id);this.counters.adjustQueued(-Y.size)}let X=this.dlqManager.deleteQueue($);if(X>0)this.counters.adjustDlq(-X);this.counters.syncDelayedCount(),this.temporalManager.clearIndexForQueue($),this.queues.delete($),this.uniqueKeyManager.clearQueue($),this.limiterManager.deleteQueue($),this.activeGroups.delete($)}}import{Database as Pf4}from"bun:sqlite";var Ps0=`
PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;
PRAGMA cache_size = -64000;
PRAGMA temp_store = MEMORY;
PRAGMA mmap_size = 268435456;
PRAGMA page_size = 4096;
PRAGMA busy_timeout = 5000;
`,ws0=`
-- Jobs table (using UUIDv7 for job IDs)
-- Uses BLOB for data fields (MessagePack serialization for ~2-3x faster than JSON)
CREATE TABLE IF NOT EXISTS jobs (
    id TEXT PRIMARY KEY,
    queue TEXT NOT NULL,
    data BLOB NOT NULL,
    priority INTEGER NOT NULL DEFAULT 0,
    created_at INTEGER NOT NULL,
    run_at INTEGER NOT NULL,
    started_at INTEGER,
    completed_at INTEGER,
    attempts INTEGER NOT NULL DEFAULT 0,
    max_attempts INTEGER NOT NULL DEFAULT 3,
    backoff INTEGER NOT NULL DEFAULT 1000,
    ttl INTEGER,
    timeout INTEGER,
    unique_key TEXT,
    custom_id TEXT,
    depends_on BLOB,
    parent_id TEXT,
    children_ids BLOB,
    tags BLOB,
    state TEXT NOT NULL DEFAULT 'waiting',
    lifo INTEGER NOT NULL DEFAULT 0,
    group_id TEXT,
    progress INTEGER DEFAULT 0,
    progress_msg TEXT,
    remove_on_complete INTEGER DEFAULT 0,
    remove_on_fail INTEGER DEFAULT 0,
    stall_timeout INTEGER,
    last_heartbeat INTEGER,
    timeline BLOB
);

-- Indexes for common queries
CREATE INDEX IF NOT EXISTS idx_jobs_queue_state
    ON jobs(queue, state);
CREATE INDEX IF NOT EXISTS idx_jobs_run_at
    ON jobs(run_at) WHERE state IN ('waiting', 'delayed');
CREATE INDEX IF NOT EXISTS idx_jobs_unique
    ON jobs(queue, unique_key) WHERE unique_key IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_jobs_custom_id
    ON jobs(custom_id) WHERE custom_id IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_jobs_parent
    ON jobs(parent_id) WHERE parent_id IS NOT NULL;

-- Job results storage (BLOB for MessagePack)
CREATE TABLE IF NOT EXISTS job_results (
    job_id TEXT PRIMARY KEY,
    result BLOB,
    completed_at INTEGER NOT NULL
);

-- Dead letter queue (BLOB for MessagePack - stores full DlqEntry)
CREATE TABLE IF NOT EXISTS dlq (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    job_id TEXT NOT NULL,
    queue TEXT NOT NULL,
    entry BLOB NOT NULL,
    entered_at INTEGER NOT NULL
);

CREATE INDEX IF NOT EXISTS idx_dlq_queue ON dlq(queue);
CREATE INDEX IF NOT EXISTS idx_dlq_job_id ON dlq(job_id);
CREATE INDEX IF NOT EXISTS idx_dlq_entered_at ON dlq(entered_at);

-- Performance indexes for high-throughput operations
-- Stall detection: runs every 5s, needs fast lookup of active jobs by started_at
CREATE INDEX IF NOT EXISTS idx_jobs_state_started
    ON jobs(state, started_at) WHERE state = 'active';

-- Group operations: fast lookup by group_id
CREATE INDEX IF NOT EXISTS idx_jobs_group_id
    ON jobs(group_id) WHERE group_id IS NOT NULL;

-- Pending jobs: compound index for priority-ordered retrieval
CREATE INDEX IF NOT EXISTS idx_jobs_pending_priority
    ON jobs(queue, state, priority DESC, run_at ASC) WHERE state IN ('waiting', 'delayed');

-- Completed jobs: index for recovery ordering (issue #84)
CREATE INDEX IF NOT EXISTS idx_jobs_completed_order
    ON jobs(completed_at DESC) WHERE state = 'completed';

-- Cron jobs (BLOB for MessagePack)
CREATE TABLE IF NOT EXISTS cron_jobs (
    name TEXT PRIMARY KEY,
    queue TEXT NOT NULL,
    data BLOB NOT NULL,
    schedule TEXT,
    repeat_every INTEGER,
    priority INTEGER NOT NULL DEFAULT 0,
    next_run INTEGER NOT NULL,
    executions INTEGER NOT NULL DEFAULT 0,
    max_limit INTEGER,
    timezone TEXT,
    unique_key TEXT,
    dedup BLOB,
    skip_missed_on_restart INTEGER NOT NULL DEFAULT 0,
    skip_if_no_worker INTEGER NOT NULL DEFAULT 0,
    prevent_overlap INTEGER NOT NULL DEFAULT 1
);

-- Queue state persistence (optional)
CREATE TABLE IF NOT EXISTS queue_state (
    name TEXT PRIMARY KEY,
    paused INTEGER NOT NULL DEFAULT 0,
    rate_limit INTEGER,
    concurrency_limit INTEGER
);
`,_s0=`
CREATE TABLE IF NOT EXISTS migrations (
    version INTEGER PRIMARY KEY,
    applied_at INTEGER NOT NULL
);
`,GQ0=11,js0={1:`
-- Jobs table (using UUIDv7 for job IDs)
-- Uses BLOB for data fields (MessagePack serialization for ~2-3x faster than JSON)
CREATE TABLE IF NOT EXISTS jobs (
    id TEXT PRIMARY KEY,
    queue TEXT NOT NULL,
    data BLOB NOT NULL,
    priority INTEGER NOT NULL DEFAULT 0,
    created_at INTEGER NOT NULL,
    run_at INTEGER NOT NULL,
    started_at INTEGER,
    completed_at INTEGER,
    attempts INTEGER NOT NULL DEFAULT 0,
    max_attempts INTEGER NOT NULL DEFAULT 3,
    backoff INTEGER NOT NULL DEFAULT 1000,
    ttl INTEGER,
    timeout INTEGER,
    unique_key TEXT,
    custom_id TEXT,
    depends_on BLOB,
    parent_id TEXT,
    children_ids BLOB,
    tags BLOB,
    state TEXT NOT NULL DEFAULT 'waiting',
    lifo INTEGER NOT NULL DEFAULT 0,
    group_id TEXT,
    progress INTEGER DEFAULT 0,
    progress_msg TEXT,
    remove_on_complete INTEGER DEFAULT 0,
    remove_on_fail INTEGER DEFAULT 0,
    stall_timeout INTEGER,
    last_heartbeat INTEGER,
    timeline BLOB
);

-- Indexes for common queries
CREATE INDEX IF NOT EXISTS idx_jobs_queue_state
    ON jobs(queue, state);
CREATE INDEX IF NOT EXISTS idx_jobs_run_at
    ON jobs(run_at) WHERE state IN ('waiting', 'delayed');
CREATE INDEX IF NOT EXISTS idx_jobs_unique
    ON jobs(queue, unique_key) WHERE unique_key IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_jobs_custom_id
    ON jobs(custom_id) WHERE custom_id IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_jobs_parent
    ON jobs(parent_id) WHERE parent_id IS NOT NULL;

-- Job results storage (BLOB for MessagePack)
CREATE TABLE IF NOT EXISTS job_results (
    job_id TEXT PRIMARY KEY,
    result BLOB,
    completed_at INTEGER NOT NULL
);

-- Dead letter queue (BLOB for MessagePack - stores full DlqEntry)
CREATE TABLE IF NOT EXISTS dlq (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    job_id TEXT NOT NULL,
    queue TEXT NOT NULL,
    entry BLOB NOT NULL,
    entered_at INTEGER NOT NULL
);

CREATE INDEX IF NOT EXISTS idx_dlq_queue ON dlq(queue);
CREATE INDEX IF NOT EXISTS idx_dlq_job_id ON dlq(job_id);
CREATE INDEX IF NOT EXISTS idx_dlq_entered_at ON dlq(entered_at);

-- Performance indexes for high-throughput operations
-- Stall detection: runs every 5s, needs fast lookup of active jobs by started_at
CREATE INDEX IF NOT EXISTS idx_jobs_state_started
    ON jobs(state, started_at) WHERE state = 'active';

-- Group operations: fast lookup by group_id
CREATE INDEX IF NOT EXISTS idx_jobs_group_id
    ON jobs(group_id) WHERE group_id IS NOT NULL;

-- Pending jobs: compound index for priority-ordered retrieval
CREATE INDEX IF NOT EXISTS idx_jobs_pending_priority
    ON jobs(queue, state, priority DESC, run_at ASC) WHERE state IN ('waiting', 'delayed');

-- Completed jobs: index for recovery ordering (issue #84)
CREATE INDEX IF NOT EXISTS idx_jobs_completed_order
    ON jobs(completed_at DESC) WHERE state = 'completed';

-- Cron jobs (BLOB for MessagePack)
CREATE TABLE IF NOT EXISTS cron_jobs (
    name TEXT PRIMARY KEY,
    queue TEXT NOT NULL,
    data BLOB NOT NULL,
    schedule TEXT,
    repeat_every INTEGER,
    priority INTEGER NOT NULL DEFAULT 0,
    next_run INTEGER NOT NULL,
    executions INTEGER NOT NULL DEFAULT 0,
    max_limit INTEGER,
    timezone TEXT,
    unique_key TEXT,
    dedup BLOB,
    skip_missed_on_restart INTEGER NOT NULL DEFAULT 0,
    skip_if_no_worker INTEGER NOT NULL DEFAULT 0,
    prevent_overlap INTEGER NOT NULL DEFAULT 1
);

-- Queue state persistence (optional)
CREATE TABLE IF NOT EXISTS queue_state (
    name TEXT PRIMARY KEY,
    paused INTEGER NOT NULL DEFAULT 0,
    rate_limit INTEGER,
    concurrency_limit INTEGER
);
`,5:`
-- DLQ expiration cleanup: O(log n) instead of O(n) table scan
CREATE INDEX IF NOT EXISTS idx_dlq_entered_at ON dlq(entered_at);

-- Stall detection: runs every 5s, needs fast lookup of active jobs
CREATE INDEX IF NOT EXISTS idx_jobs_state_started
    ON jobs(state, started_at) WHERE state = 'active';

-- Group operations: fast lookup by group_id
CREATE INDEX IF NOT EXISTS idx_jobs_group_id
    ON jobs(group_id) WHERE group_id IS NOT NULL;

-- Pending jobs: compound index for priority-ordered retrieval
CREATE INDEX IF NOT EXISTS idx_jobs_pending_priority
    ON jobs(queue, state, priority DESC, run_at ASC) WHERE state IN ('waiting', 'delayed');
`,6:`
ALTER TABLE cron_jobs ADD COLUMN unique_key TEXT;
ALTER TABLE cron_jobs ADD COLUMN dedup BLOB;
`,7:`
ALTER TABLE jobs ADD COLUMN timeline BLOB;
`,8:`
ALTER TABLE cron_jobs ADD COLUMN skip_missed_on_restart INTEGER NOT NULL DEFAULT 0;
`,9:`
ALTER TABLE cron_jobs ADD COLUMN skip_if_no_worker INTEGER NOT NULL DEFAULT 0;
`,10:`
ALTER TABLE cron_jobs ADD COLUMN prevent_overlap INTEGER NOT NULL DEFAULT 1;
`,11:`
CREATE INDEX IF NOT EXISTS idx_jobs_completed_order
    ON jobs(completed_at DESC) WHERE state = 'completed';
`};var If4={insertJob:`
    INSERT INTO jobs (
      id, queue, data, priority, created_at, run_at, attempts,
      max_attempts, backoff, ttl, timeout, unique_key, custom_id,
      depends_on, parent_id, children_ids, tags, state, lifo, group_id,
      remove_on_complete, remove_on_fail, stall_timeout, timeline
    ) VALUES (
      ?, ?, ?, ?, ?, ?, ?,
      ?, ?, ?, ?, ?, ?,
      ?, ?, ?, ?, ?, ?, ?,
      ?, ?, ?, ?
    )
  `,updateJobState:"UPDATE jobs SET state = ?, started_at = ?, timeline = ? WHERE id = ?",completeJob:"UPDATE jobs SET state = ?, completed_at = ?, progress = 100, timeline = ? WHERE id = ?",deleteJob:"DELETE FROM jobs WHERE id = ?",deleteJobResult:"DELETE FROM job_results WHERE job_id = ?",getJob:"SELECT * FROM jobs WHERE id = ?",insertResult:"INSERT OR REPLACE INTO job_results (job_id, result, completed_at) VALUES (?, ?, ?)",getResult:"SELECT result FROM job_results WHERE job_id = ?",insertDlq:"INSERT INTO dlq (job_id, queue, entry, entered_at) VALUES (?, ?, ?, ?)",loadDlq:"SELECT * FROM dlq ORDER BY entered_at",deleteDlqEntry:"DELETE FROM dlq WHERE job_id = ?",clearDlqQueue:"DELETE FROM dlq WHERE queue = ?",insertCron:`
    INSERT OR REPLACE INTO cron_jobs
    (name, queue, data, schedule, repeat_every, priority, next_run, executions, max_limit, timezone, unique_key, dedup, skip_missed_on_restart, skip_if_no_worker, prevent_overlap)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
  `,updateCron:"UPDATE cron_jobs SET executions = ?, next_run = ? WHERE name = ?"};function Ts0($){let Y=new Map;for(let[X,G]of Object.entries(If4))Y.set(X,$.prepare(G));return Y}var Cs0={debug:0,info:1,warn:2,error:3};class SN{component;static jsonMode=!1;static level="info";constructor($){this.component=$}static enableJsonMode(){SN.jsonMode=!0}static disableJsonMode(){SN.jsonMode=!1}static setLevel($){SN.level=$}debug($,Y){this.log("debug",$,Y)}info($,Y){this.log("info",$,Y)}warn($,Y){this.log("warn",$,Y)}error($,Y){this.log("error",$,Y)}log($,Y,X){if(Cs0[$]<Cs0[SN.level])return;if(SN.jsonMode){let G={timestamp:new Date().toISOString(),level:$,component:this.component,message:Y,...X&&{data:X}};console.log(JSON.stringify(G))}else{let G=`[${this.component}]`,J=X?` ${JSON.stringify(X)}`:"";switch($){case"debug":console.debug(`${G} ${Y}${J}`);break;case"info":console.log(`${G} ${Y}${J}`);break;case"warn":console.warn(`${G} ${Y}${J}`);break;case"error":console.error(`${G} ${Y}${J}`);break}}}}function y3($){return new SN($)}var xp9=y3("Server"),yp9=y3("TCP"),bp9=y3("HTTP"),hp9=y3("WS"),JQ0=y3("Cron"),fp9=y3("Stats"),R2=y3("Storage"),dV=y3("Queue"),PR=y3("Webhook"),gp9=y3("Backup");function d7($){return NR($)}function q2($,Y,X){if(!$)return Y;try{return HS($)}catch(G){return R2.error("MessagePack decode error",{context:X,error:String(G)}),Y}}function wR($){let Y=`rowToJob:${$.id}`,X=$.depends_on?q2($.depends_on,[],`${Y}:dependsOn`):[],G=$.children_ids?q2($.children_ids,[],`${Y}:childrenIds`):[],J=$.tags?q2($.tags,[],`${Y}:tags`):[];return{id:d0($.id),queue:$.queue,data:q2($.data,{},`${Y}:data`),priority:$.priority,createdAt:$.created_at,runAt:$.run_at,startedAt:$.started_at,completedAt:$.completed_at,attempts:$.attempts,maxAttempts:$.max_attempts,backoff:$.backoff,backoffConfig:null,ttl:$.ttl,timeout:$.timeout,uniqueKey:$.unique_key,customId:$.custom_id,dependsOn:X.map((Q)=>d0(Q)),parentId:$.parent_id?d0($.parent_id):null,childrenIds:G.map((Q)=>d0(Q)),childrenCompleted:0,tags:J,lifo:$.lifo===1,groupId:$.group_id,progress:$.progress??0,progressMessage:$.progress_msg,removeOnComplete:$.remove_on_complete===1,removeOnFail:$.remove_on_fail===1,repeat:null,lastHeartbeat:$.last_heartbeat??$.created_at,stallTimeout:$.stall_timeout,stallCount:0,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:$.timeline?q2($.timeline,[],`${Y}:timeline`):[]}}function QQ0($){return{...$,job:{...$.job,id:d0(String($.job.id)),dependsOn:$.job.dependsOn.map((Y)=>d0(String(Y))),parentId:$.job.parentId?d0(String($.job.parentId)):null,childrenIds:$.job.childrenIds.map((Y)=>d0(String(Y)))}}}class WQ0{db;cache=new Map;constructor($){this.db=$}insertJobsBatch($){if($.length===0)return;let Y=Date.now(),G=Math.floor(999/24);this.db.transaction(()=>{for(let J=0;J<$.length;J+=G){let Q=$.slice(J,J+G);this.insertJobsChunk(Q,Y)}})()}getBatchInsertStmt($){let Y=this.cache.get($);if(!Y){let J=`INSERT INTO jobs (
        id, queue, data, priority, created_at, run_at, attempts, max_attempts,
        backoff, ttl, timeout, unique_key, custom_id, depends_on, parent_id,
        children_ids, tags, state, lifo, group_id, remove_on_complete, remove_on_fail, stall_timeout, timeline
      ) VALUES ${Array($).fill("(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)").join(", ")}`;if(Y=this.db.prepare(J),$<=100)this.cache.set($,Y)}return Y}insertJobsChunk($,Y){let X=this.getBatchInsertStmt($.length),G=[];for(let J of $)G.push(J.id,J.queue,d7(J.data),J.priority,J.createdAt,J.runAt,J.attempts,J.maxAttempts,J.backoff,J.ttl,J.timeout,J.uniqueKey,J.customId,J.dependsOn.length>0?d7(J.dependsOn):null,J.parentId,J.childrenIds.length>0?d7(J.childrenIds):null,J.tags.length>0?d7(J.tags):null,J.runAt>Y?"delayed":"waiting",J.lifo?1:0,J.groupId,J.removeOnComplete?1:0,J.removeOnFail?1:0,J.stallTimeout,J.timeline.length>0?d7(J.timeline):null);X.run(...G)}}class ZQ0{activeBuffer=[];flushBuffer=[];flushing=!1;stopped=!1;timer=null;batchManager;bufferSize;onError;onCriticalError;retryCount=0;currentBackoffMs=100;initialBackoffMs=100;maxBackoffMs=30000;maxRetries=10;lastError=null;backoffTimer=null;constructor($,Y,X,G,J){this.batchManager=$,this.bufferSize=Y,this.onError=G,this.onCriticalError=J,this.timer=setInterval(()=>{if(this.stopped||this.backoffTimer)return;try{this.flush()}catch{}},X)}add($){if(this.activeBuffer.push($),this.activeBuffer.length>=this.bufferSize)this.flush()}addBatch($){for(let Y of $)this.activeBuffer.push(Y);if(this.activeBuffer.length>=this.bufferSize)this.flush()}flush(){if(this.stopped||this.flushing)return 0;if(this.activeBuffer.length===0)return 0;this.flushing=!0,this.flushBuffer=this.activeBuffer,this.activeBuffer=[];let $=this.flushBuffer.length;try{return this.batchManager.insertJobsBatch(this.flushBuffer),this.flushBuffer=[],this.retryCount=0,this.currentBackoffMs=this.initialBackoffMs,this.lastError=null,$}catch(Y){let X=Y instanceof Error?Y:Error(String(Y));if(this.lastError=X,this.retryCount++,this.activeBuffer=this.flushBuffer.concat(this.activeBuffer),this.flushBuffer=[],this.retryCount>=this.maxRetries){let J=[...this.activeBuffer];if(this.activeBuffer=[],this.onCriticalError)this.onCriticalError(J,X,this.retryCount);throw this.onError(X,J.length,{retryCount:this.retryCount,nextBackoffMs:0,maxRetries:this.maxRetries}),this.retryCount=0,this.currentBackoffMs=this.initialBackoffMs,this.lastError=null,Y}let G=Math.min(this.currentBackoffMs*2,this.maxBackoffMs);throw this.onError(X,$,{retryCount:this.retryCount,nextBackoffMs:G,maxRetries:this.maxRetries}),this.scheduleBackoffRetry(),Y}finally{this.flushing=!1}}scheduleBackoffRetry(){if(this.backoffTimer)clearTimeout(this.backoffTimer);this.currentBackoffMs=Math.min(this.currentBackoffMs*2,this.maxBackoffMs),this.backoffTimer=setTimeout(()=>{this.backoffTimer=null;try{this.flush()}catch{}},this.currentBackoffMs)}get pendingCount(){return this.activeBuffer.length+this.flushBuffer.length}removePending($){let Y=this.activeBuffer.findIndex((G)=>G.id===$);if(Y!==-1)this.activeBuffer.splice(Y,1);let X=this.flushBuffer.findIndex((G)=>G.id===$);if(X!==-1)this.flushBuffer.splice(X,1)}hasPending($){for(let Y of this.activeBuffer)if(Y.id===$)return!0;for(let Y of this.flushBuffer)if(Y.id===$)return!0;return!1}stop(){if(this.timer)clearInterval(this.timer),this.timer=null;if(this.pendingCount>0)try{this.flush()}catch{}if(this.stopped=!0,this.backoffTimer)clearTimeout(this.backoffTimer),this.backoffTimer=null;this.reportLostJobs()}async stopGracefully($=5000){if(this.backoffTimer)clearTimeout(this.backoffTimer),this.backoffTimer=null;if(this.timer)clearInterval(this.timer),this.timer=null;if(this.pendingCount===0)return this.stopped=!0,0;return new Promise((X)=>{let G=setTimeout(()=>{this.stopped=!0,this.reportLostJobs(),X(-1)},$);try{let J=this.flush();clearTimeout(G),this.stopped=!0,X(J)}catch{if(this.backoffTimer)clearTimeout(this.backoffTimer),this.backoffTimer=null;clearTimeout(G),this.stopped=!0,this.reportLostJobs(),X(0)}})}reportLostJobs(){let $=this.activeBuffer.concat(this.flushBuffer);if($.length>0&&this.onCriticalError)this.onCriticalError($,this.lastError??Error("Flush failed during shutdown"),this.retryCount),this.activeBuffer=[],this.flushBuffer=[]}getRetryState(){return{retryCount:this.retryCount,currentBackoffMs:this.currentBackoffMs,lastError:this.lastError}}}function Ss0($){if(!($ instanceof Error))return!1;let Y=$.message;return Y.includes("SQLITE_FULL")||Y.includes("database or disk is full")}class dc{db;statements;batchManager;writeBuffer;_diskFull=!1;_lastDiskFullError=null;_lastDiskFullAt=null;_criticalLosses=[];_onCriticalLoss;static MAX_RETAINED_LOSSES=100;constructor($){this.db=new Pf4($.path,{create:!0}),this.db.run(Ps0),this.migrate(),this.statements=Ts0(this.db),this._onCriticalLoss=$.onCriticalLoss,this.batchManager=new WQ0(this.db),this.writeBuffer=new ZQ0(this.batchManager,$.writeBufferSize??100,$.writeBufferFlushMs??10,(Y,X)=>{if(Ss0(Y))this.setDiskFull(Y.message);R2.error("Write buffer flush failed",{jobCount:X,error:Y.message,diskFull:this._diskFull})},(Y,X,G)=>{this.handleCriticalLoss(Y,X,G)})}handleCriticalLoss($,Y,X){R2.error("CRITICAL: WriteBuffer dropped jobs after exhausting retries",{lostJobCount:$.length,attempts:X,error:Y.message,diskFull:this._diskFull});for(let G of $)R2.error("Lost job (recover from this log if needed)",{id:String(G.id),queue:G.queue,customId:G.customId,priority:G.priority,createdAt:G.createdAt,attempts:G.attempts,dataPreview:this.previewJobData(G.data)});this._criticalLosses.push({jobs:$,error:Y.message,attempts:X,at:Date.now()});while(this._criticalLosses.length>dc.MAX_RETAINED_LOSSES)this._criticalLosses.shift();if(this._onCriticalLoss)try{this._onCriticalLoss($,Y,X)}catch(G){R2.error("onCriticalLoss callback threw",{error:G instanceof Error?G.message:String(G)})}}previewJobData($){try{let Y=JSON.stringify($);return Y.length>500?Y.slice(0,500)+"...[truncated]":Y}catch{return"[unserializable]"}}getCriticalLosses(){return this._criticalLosses}clearCriticalLosses(){this._criticalLosses.length=0}setDiskFull($){if(!this._diskFull)R2.error("DISK FULL: SQLite cannot write, persistence degraded",{error:$});this._diskFull=!0,this._lastDiskFullError=$,this._lastDiskFullAt=Date.now()}safeWrite($){try{if($(),this._diskFull)this._diskFull=!1,this._lastDiskFullError=null,R2.info("Disk full condition cleared - writes succeeding again")}catch(Y){if(Ss0(Y))this.setDiskFull(Y instanceof Error?Y.message:String(Y));throw Y}}get diskFull(){return this._diskFull}getDiskFullStatus(){return{diskFull:this._diskFull,error:this._lastDiskFullError,since:this._lastDiskFullAt}}flushWriteBuffer(){return this.writeBuffer.flush()}migrate(){this.db.run(_s0);let $=this.db.query("SELECT MAX(version) as version FROM migrations").get()?.version??0;if($<GQ0){this.db.run(ws0);for(let[Y,X]of Object.entries(js0)){let G=Number(Y);if(G>$&&G>1)try{this.db.run(X)}catch{}}this.db.prepare("INSERT INTO migrations (version, applied_at) VALUES (?, ?)").run(GQ0,Date.now())}}insertJob($,Y){if(Y){this.insertJobImmediate($);return}this.writeBuffer.add($)}insertJobImmediate($){this.safeWrite(()=>{this.statements.get("insertJob").run($.id,$.queue,d7($.data),$.priority,$.createdAt,$.runAt,$.attempts,$.maxAttempts,$.backoff,$.ttl,$.timeout,$.uniqueKey,$.customId,$.dependsOn.length>0?d7($.dependsOn):null,$.parentId,$.childrenIds.length>0?d7($.childrenIds):null,$.tags.length>0?d7($.tags):null,$.runAt>Date.now()?"delayed":"waiting",$.lifo?1:0,$.groupId,$.removeOnComplete?1:0,$.removeOnFail?1:0,$.stallTimeout,$.timeline.length>0?d7($.timeline):null)})}flushIfBuffered($){if(this.writeBuffer.hasPending(String($)))try{this.writeBuffer.flush()}catch{}}markActive($,Y,X){this.flushIfBuffered($),this.safeWrite(()=>{this.statements.get("updateJobState").run("active",Y,X&&X.length>0?d7(X):null,$)})}markCompleted($,Y,X){this.flushIfBuffered($),this.safeWrite(()=>{this.statements.get("completeJob").run("completed",Y,X&&X.length>0?d7(X):null,$)})}markFailed($,Y){this.flushIfBuffered($.id),this.safeWrite(()=>{this.statements.get("insertDlq").run($.id,$.queue,d7({job:$,error:Y}),Date.now())})}saveDlqEntry($){this.safeWrite(()=>{this.statements.get("insertDlq").run($.job.id,$.job.queue,d7($),$.enteredAt)})}deleteDlqEntry($){this.safeWrite(()=>{this.statements.get("deleteDlqEntry").run($)})}clearDlqQueue($){this.safeWrite(()=>{this.statements.get("clearDlqQueue").run($)})}loadDlq(){let $=this.statements.get("loadDlq").all(),Y=new Map;for(let X of $){let G=q2(X.entry,null,`loadDlq:${X.job_id}`);if(!G?.job)continue;let J=QQ0(G),Q=Y.get(X.queue);if(!Q)Q=[],Y.set(X.queue,Q);Q.push(J)}return Y}updateForRetry($){this.safeWrite(()=>{this.db.prepare("UPDATE jobs SET attempts = ?, run_at = ?, state = ?, timeline = ? WHERE id = ?").run($.attempts,$.runAt,"waiting",$.timeline.length>0?d7($.timeline):null,$.id)})}deleteJob($){this.writeBuffer.removePending($),this.safeWrite(()=>{let Y=this.statements.get("deleteJob"),X=this.statements.get("deleteJobResult");this.db.transaction((J)=>{Y.run(J),X.run(J)})($)})}updateJobData($,Y){this.safeWrite(()=>{this.db.prepare("UPDATE jobs SET data = ? WHERE id = ?").run(d7(Y),$)})}updateJobChildrenIds($,Y){this.safeWrite(()=>{this.db.prepare("UPDATE jobs SET children_ids = ? WHERE id = ?").run(Y.length>0?d7(Y):null,$)})}getJob($){let Y=this.statements.get("getJob").get($);return Y?wR(Y):null}storeResult($,Y){this.safeWrite(()=>{this.statements.get("insertResult").run($,d7(Y),Date.now())})}getResult($){let Y=this.statements.get("getResult").get($);return Y?q2(Y.result,null,`getResult:${$}`):null}hasResult($){return this.db.query("SELECT job_id FROM job_results WHERE job_id = ?").get(String($))!==null}hasDlqEntry($){return this.db.query("SELECT job_id FROM dlq WHERE job_id = ? LIMIT 1").get(String($))!==null}getDlqEntry($){let Y=this.db.query("SELECT entry FROM dlq WHERE job_id = ? ORDER BY entered_at DESC LIMIT 1").get(String($));if(!Y)return null;let X=q2(Y.entry,null,`getDlqEntry:${String($)}`);return X?.job?QQ0(X):null}loadDlqJobIds(){let $=this.db.query("SELECT job_id FROM dlq").all();return new Set($.map((Y)=>Y.job_id))}getJobStateRaw($){return this.db.query("SELECT state FROM jobs WHERE id = ?").get(String($))?.state??null}loadCompletedJobIds(){let $=this.db.query("SELECT job_id FROM job_results").all();return new Set($.map((Y)=>Y.job_id))}insertJobsBatch($){this.writeBuffer.addBatch($)}queryJobs($,Y){let X=Y.asc?"ASC":"DESC",G;if(Y.states&&Y.states.length>0){let J=Y.states.map(()=>"?").join(",");G=this.db.query(`SELECT * FROM jobs WHERE queue = ? AND state IN (${J}) ORDER BY created_at ${X} LIMIT ? OFFSET ?`).all($,...Y.states,Y.limit,Y.offset)}else if(Y.state)G=this.db.query(`SELECT * FROM jobs WHERE queue = ? AND state = ? ORDER BY created_at ${X} LIMIT ? OFFSET ?`).all($,Y.state,Y.limit,Y.offset);else G=this.db.query(`SELECT * FROM jobs WHERE queue = ? ORDER BY created_at ${X} LIMIT ? OFFSET ?`).all($,Y.limit,Y.offset);return G.map((J)=>wR(J))}loadPendingJobs($=1e4,Y=0){return this.db.query("SELECT * FROM jobs WHERE state IN ('waiting', 'delayed') ORDER BY priority DESC, run_at ASC LIMIT ? OFFSET ?").all($,Y).map((G)=>wR(G))}loadActiveJobs($=1e4,Y=0){return this.db.query("SELECT * FROM jobs WHERE state = 'active' ORDER BY started_at ASC LIMIT ? OFFSET ?").all($,Y).map((G)=>wR(G))}loadCompletedJobs($=1e4,Y=0){return this.db.query("SELECT * FROM jobs WHERE state = 'completed' ORDER BY completed_at DESC LIMIT ? OFFSET ?").all($,Y).map((G)=>wR(G))}countPendingJobs(){return this.db.query("SELECT COUNT(*) as count FROM jobs WHERE state IN ('waiting', 'delayed')").get()?.count??0}countActiveJobs(){return this.db.query("SELECT COUNT(*) as count FROM jobs WHERE state = 'active'").get()?.count??0}saveCron($){this.safeWrite(()=>{this.statements.get("insertCron").run($.name,$.queue,d7($.data),$.schedule,$.repeatEvery,$.priority,$.nextRun,$.executions,$.maxLimit,$.timezone,$.uniqueKey,$.dedup?d7($.dedup):null,$.skipMissedOnRestart?1:0,$.skipIfNoWorker?1:0,$.preventOverlap?1:0)})}loadCronJobs(){return this.db.query("SELECT * FROM cron_jobs").all().map((Y)=>({name:Y.name,queue:Y.queue,data:q2(Y.data,{},`loadCronJobs:${Y.name}`),schedule:Y.schedule,repeatEvery:Y.repeat_every,priority:Y.priority,timezone:Y.timezone,nextRun:Y.next_run,executions:Y.executions,maxLimit:Y.max_limit,uniqueKey:Y.unique_key??null,dedup:Y.dedup?q2(Y.dedup,null,`loadCronDedup:${Y.name}`):null,skipMissedOnRestart:Y.skip_missed_on_restart===1,skipIfNoWorker:Y.skip_if_no_worker===1,preventOverlap:Y.prevent_overlap===1}))}deleteCron($){this.safeWrite(()=>{this.db.prepare("DELETE FROM cron_jobs WHERE name = ?").run($)})}updateCron($,Y,X){this.safeWrite(()=>{this.statements.get("updateCron").run(Y,X,$)})}close(){this.writeBuffer.stop();try{this.writeBuffer.flush()}catch($){R2.error("Failed to flush write buffer on close",{bufferedJobs:this.writeBuffer.pendingCount,error:$ instanceof Error?$.message:String($)})}try{this.db.run("PRAGMA wal_checkpoint(TRUNCATE)")}catch($){R2.error("WAL checkpoint failed on close",{error:$ instanceof Error?$.message:String($)})}this.db.close()}getSize(){return Bun.file(this.db.filename).size}}function ks0($,Y){if(!$.schedule&&!$.repeatEvery)throw Error("Cron job must have either schedule or repeatEvery");return{name:$.name,queue:$.queue,data:$.data,schedule:$.schedule??null,repeatEvery:$.repeatEvery??null,priority:$.priority??0,timezone:$.timezone??null,nextRun:Y,executions:0,maxLimit:$.maxLimit??null,uniqueKey:$.uniqueKey??null,dedup:$.dedup??null,skipMissedOnRestart:$.skipMissedOnRestart??!0,skipIfNoWorker:$.skipIfNoWorker??!1,preventOverlap:$.preventOverlap??!0}}function cc($){if($.maxLimit===null)return!1;return $.executions>=$.maxLimit}zQ0();function fs0($,Y){try{return new OS($,{timezone:Y}),null}catch(X){return X instanceof Error?X.message:"Invalid cron expression"}}function ic($,Y=Date.now(),X){let J=new OS($,{timezone:X}).nextRun(new Date(Y));return J?J.getTime():0}function nc($,Y=Date.now()){return Y+$}var Cf4={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"};function rc($){let Y=$.trim().toLowerCase();return Cf4[Y]??$}var Sf4=60000;class VQ0{cronJobs=new Map;cronHeap=new x3(($,Y)=>$.cron.nextRun-Y.cron.nextRun);generation=0;nextTimer=null;safetyInterval=null;started=!1;pushJob=null;persistCron=null;hasWorkers=null;dashboardEmit=null;lastFiredAt=new Map;constructor($){}setPushCallback($){this.pushJob=$}setPersistCallback($){this.persistCron=$}setWorkerCheckCallback($){this.hasWorkers=$}setDashboardEmit($){this.dashboardEmit=$}start(){if(this.started)return;this.started=!0,this.safetyInterval=setInterval(()=>{this.tick()},Sf4),this.scheduleNext()}stop(){if(this.started=!1,this.nextTimer!==null)clearTimeout(this.nextTimer),this.nextTimer=null;if(this.safetyInterval!==null)clearInterval(this.safetyInterval),this.safetyInterval=null}add($){if(!$.schedule&&!$.repeatEvery)throw Error("Cron job must have either schedule or repeatEvery");if($.schedule){let W=rc($.schedule),Z=fs0(W,$.timezone);if(Z)throw Error(`Invalid cron expression: ${Z}`)}let Y=Date.now(),X;if($.schedule){let W=rc($.schedule);X=ic(W,Y,$.timezone)}else X=nc($.repeatEvery,Y);let G=ks0($,X),J=this.cronJobs.get(G.name);if(J)G.executions=J.cron.executions;if($.immediately&&!J)G.nextRun=Date.now();let Q=this.generation++;if(this.cronJobs.set(G.name,{cron:G,generation:Q}),this.cronHeap.push({cron:G,generation:Q}),this.started)this.scheduleNext();return G}remove($){if(!this.cronJobs.get($))return!1;if(this.cronJobs.delete($),this.started)this.scheduleNext();return!0}get($){return this.cronJobs.get($)?.cron}list(){return Array.from(this.cronJobs.values()).map(($)=>$.cron)}load($){let Y=Date.now(),X=[];for(let G of $){if((G.skipMissedOnRestart||G.skipIfNoWorker)&&G.nextRun<Y){if(G.schedule)G.nextRun=ic(G.schedule,Y,G.timezone??void 0);else if(G.repeatEvery)G.nextRun=nc(G.repeatEvery,Y);this.persistCron?.(G.name,G.executions,G.nextRun)}let J=this.generation++;this.cronJobs.set(G.name,{cron:G,generation:J}),X.push({cron:G,generation:J})}if(this.cronHeap.buildFrom(X),this.started)this.scheduleNext()}scheduleNext(){if(!this.started)return;if(this.nextTimer!==null)clearTimeout(this.nextTimer),this.nextTimer=null;while(!this.cronHeap.isEmpty){let $=this.cronHeap.peek();if(!$)return;if(this.cronJobs.get($.cron.name)?.generation!==$.generation){this.cronHeap.pop();continue}let Y=Math.max(0,$.cron.nextRun-Date.now());this.nextTimer=setTimeout(()=>{this.nextTimer=null,this.tick()},Y);return}}async tick(){if(!this.pushJob)return;let $=Date.now(),Y=[],X=[];while(!this.cronHeap.isEmpty){let G=this.cronHeap.peek();if(!G||G.cron.nextRun>$)break;if(this.cronHeap.pop(),this.cronJobs.get(G.cron.name)?.generation!==G.generation)continue;let Q=G.cron;if(cc(Q)){X.push(Q.name);continue}try{let W=Q.executions+1,Z=Date.now(),K;if(Q.schedule){let H=rc(Q.schedule);K=ic(H,Z,Q.timezone??void 0)}else if(Q.repeatEvery)K=nc(Q.repeatEvery,Z);else K=Z;if(this.persistCron)try{this.persistCron(Q.name,W,K)}catch(H){JQ0.error("Failed to persist cron state, skipping job push",{name:Q.name,error:String(H)}),this.dashboardEmit?.("cron:missed",{name:Q.name,queue:Q.queue,error:String(H)}),Y.push(G);continue}Q.executions=W,Q.nextRun=K,await this.fireCronJob(Q,$),Y.push(G)}catch(W){JQ0.error("Failed to push cron job (state already persisted)",{name:Q.name,error:String(W)}),this.dashboardEmit?.("cron:missed",{name:Q.name,queue:Q.queue,error:String(W)}),Y.push(G)}}for(let G of Y)this.cronHeap.push(G);for(let G of X)this.cronJobs.delete(G);this.scheduleNext()}async fireCronJob($,Y){if($.skipIfNoWorker&&this.hasWorkers&&!this.hasWorkers($.queue)){this.dashboardEmit?.("cron:skipped",{name:$.name,queue:$.queue,reason:"no-worker"});return}let X=this.lastFiredAt.get($.name),G=$.repeatEvery??60000;if(X&&Y-X<G*0.8){this.dashboardEmit?.("cron:skipped",{name:$.name,queue:$.queue,reason:"overlap"});return}let J=$.uniqueKey??($.preventOverlap?`cron:${$.name}`:void 0);await this.pushJob($.queue,{data:$.data,priority:$.priority,uniqueKey:J,dedup:$.dedup??void 0}),this.lastFiredAt.set($.name,Y),this.dashboardEmit?.("cron:fired",{name:$.name,queue:$.queue})}getStats(){let $=null,Y=this.cronHeap.peek();if(Y){if(this.cronJobs.get(Y.cron.name)?.generation===Y.generation&&!cc(Y.cron))$=Y.cron.nextRun}let X=0;for(let{cron:G}of this.cronJobs.values())if(!cc(G))X++;return{total:this.cronJobs.size,pending:X,nextRun:$}}}function gs0($,Y,X,G){return{id:fc(),url:$,events:Y,queue:X??null,secret:G??null,createdAt:Date.now(),lastTriggered:null,successCount:0,failureCount:0,enabled:!0}}var kf4=parseInt(Bun.env.WEBHOOK_MAX_RETRIES??"3",10),vf4=parseInt(Bun.env.WEBHOOK_RETRY_DELAY_MS??"1000",10);function xf4($,Y){let X=new Bun.CryptoHasher("sha256",Y);return X.update($),X.digest("hex")}class AQ0{webhooks=new Map;maxRetries=kf4;retryDelay=vf4;validateUrls;dashboardEmit=null;enabledCount=0;constructor($){this.validateUrls=$?.validateUrls!==!1}setDashboardEmit($){this.dashboardEmit=$}add($,Y,X,G){if(this.validateUrls){let Q=UJ0($);if(Q)throw Error(Q)}let J=gs0($,Y,X,G);if(this.webhooks.set(J.id,J),J.enabled)this.enabledCount++;return J}remove($){if(this.webhooks.get($)?.enabled)this.enabledCount--;return this.webhooks.delete($)}get($){return this.webhooks.get($)}setEnabled($,Y){let X=this.webhooks.get($);if(!X)return!1;if(X.enabled!==Y)X.enabled=Y,this.enabledCount+=Y?1:-1,this.dashboardEmit?.(Y?"webhook:enabled":"webhook:disabled",{webhookId:$});return!0}list(){return Array.from(this.webhooks.values())}async trigger($,Y,X,G){let J={event:$,timestamp:Date.now(),jobId:Y,queue:X,...G},Q=Array.from(this.webhooks.values()).filter((W)=>W.enabled&&W.events.includes($)&&(W.queue===null||W.queue===X));for(let W of Q)this.sendWebhook(W,J).catch((Z)=>{PR.error("Failed to send webhook",{url:W.url,error:String(Z)})})}async sendWebhook($,Y){let X=JSON.stringify(Y),G={"Content-Type":"application/json","X-Webhook-Event":Y.event,"X-Webhook-Timestamp":String(Y.timestamp)};if($.secret)G["X-Webhook-Signature"]=xf4(X,$.secret);let J=null;for(let Q=0;Q<this.maxRetries;Q++){try{let W=await fetch($.url,{method:"POST",headers:G,body:X,signal:AbortSignal.timeout(1e4)});if(W.ok){$.lastTriggered=Date.now(),$.successCount++,this.dashboardEmit?.("webhook:fired",{webhookId:$.id,url:$.url,event:Y.event});return}J=Error(`HTTP ${W.status}`)}catch(W){J=W instanceof Error?W:Error(String(W))}if(Q<this.maxRetries-1)await Bun.sleep(this.retryDelay*(Q+1))}throw $.failureCount++,this.dashboardEmit?.("webhook:failed",{webhookId:$.id,url:$.url,event:Y.event,error:J?.message??"Webhook delivery failed after max retries"}),J??Error("Webhook delivery failed after max retries")}hasEnabledWebhooks(){return this.enabledCount>0}getStats(){return{total:this.webhooks.size,enabled:this.enabledCount}}}function ms0($,Y,X=1,G){let J=Date.now();return{id:G?.workerId??fc(),name:$,queues:Y??[],concurrency:X,hostname:G?.hostname??"unknown",pid:G?.pid??0,registeredAt:G?.startedAt??J,lastSeen:J,activeJobs:0,processedJobs:0,failedJobs:0,currentJob:null,clientId:G?.clientId??null}}function us0($,Y="info"){return{timestamp:Date.now(),level:Y,message:$}}var ac=parseInt(Bun.env.WORKER_TIMEOUT_MS??"30000",10),yf4=parseInt(Bun.env.WORKER_CLEANUP_INTERVAL_MS??"60000",10);class FQ0{workers=new Map;cleanupInterval=null;dashboardEmit=null;totalProcessedCounter=0;totalFailedCounter=0;totalActiveJobsCounter=0;constructor(){this.startCleanup()}setDashboardEmit($){this.dashboardEmit=$}register($,Y,X=1,G){if(G?.workerId){let Q=this.workers.get(G.workerId);if(Q){if(Q.queues=Y,Q.concurrency=X,Q.lastSeen=Date.now(),G.hostname)Q.hostname=G.hostname;if(G.pid)Q.pid=G.pid;return Q}}let J=ms0($,Y,X,G);return this.workers.set(J.id,J),J}unregister($){let Y=this.workers.get($);if(Y)this.totalActiveJobsCounter-=Y.activeJobs;return this.workers.delete($)}unregisterByClientId($){let Y=0;for(let[X,G]of this.workers)if(G.clientId===$)this.totalActiveJobsCounter-=G.activeJobs,this.workers.delete(X),this.dashboardEmit?.("worker:disconnected",{workerId:X,name:G.name,clientId:$}),Y++;return Y}get($){return this.workers.get($)}heartbeat($,Y){let X=this.workers.get($);if(!X)return!1;if(X.lastSeen=Date.now(),Y){if(Y.activeJobs!==void 0)this.totalActiveJobsCounter-=X.activeJobs,X.activeJobs=Y.activeJobs,this.totalActiveJobsCounter+=Y.activeJobs;if(Y.processed!==void 0)this.totalProcessedCounter-=X.processedJobs,X.processedJobs=Y.processed,this.totalProcessedCounter+=Y.processed;if(Y.failed!==void 0)this.totalFailedCounter-=X.failedJobs,X.failedJobs=Y.failed,this.totalFailedCounter+=Y.failed}return!0}incrementActive($,Y){let X=this.workers.get($);if(X){if(X.activeJobs++,this.totalActiveJobsCounter++,X.lastSeen=Date.now(),Y)X.currentJob=Y}}jobCompleted($){let Y=this.workers.get($);if(Y){if(Y.activeJobs>0)Y.activeJobs--,this.totalActiveJobsCounter--;if(Y.processedJobs++,this.totalProcessedCounter++,Y.lastSeen=Date.now(),Y.activeJobs===0)Y.currentJob=null,this.dashboardEmit?.("worker:idle",{workerId:$,processedJobs:Y.processedJobs})}}jobFailed($){let Y=this.workers.get($);if(Y){if(Y.activeJobs>0)Y.activeJobs--,this.totalActiveJobsCounter--;if(Y.failedJobs++,this.totalFailedCounter++,Y.lastSeen=Date.now(),Y.activeJobs===0)Y.currentJob=null,this.dashboardEmit?.("worker:idle",{workerId:$,processedJobs:Y.processedJobs});let X=Y.processedJobs+Y.failedJobs;if(X>=5&&(Y.failedJobs===5||Y.failedJobs===10||Y.failedJobs===25||Y.failedJobs===50||Y.failedJobs===100))this.dashboardEmit?.("worker:error",{workerId:$,name:Y.name,failedJobs:Y.failedJobs,processedJobs:Y.processedJobs,failureRate:+(Y.failedJobs/X).toFixed(3)})}}list(){return Array.from(this.workers.values())}listActive(){let $=Date.now();return Array.from(this.workers.values()).filter((Y)=>$-Y.lastSeen<ac)}getForQueue($){let Y=Date.now();return Array.from(this.workers.values()).filter((X)=>X.queues?.includes($)&&Y-X.lastSeen<ac)}startCleanup(){this.cleanupInterval=setInterval(()=>{this.cleanupStale()},yf4)}cleanupStale(){let $=Date.now(),Y=ac*3;for(let[X,G]of this.workers)if($-G.lastSeen>Y)this.totalActiveJobsCounter-=G.activeJobs,this.workers.delete(X),this.dashboardEmit?.("worker:removed-stale",{workerId:X,name:G.name})}stop(){if(this.cleanupInterval)clearInterval(this.cleanupInterval),this.cleanupInterval=null}getStats(){let $=Date.now(),Y=0;for(let X of this.workers.values())if($-X.lastSeen<ac)Y++;return{total:this.workers.size,active:Y,totalProcessed:this.totalProcessedCounter,totalFailed:this.totalFailedCounter,activeJobs:this.totalActiveJobsCounter}}}class DQ0{webhookManager;subscribers=new Set;completionWaiters=new Map;constructor($){this.webhookManager=$}get subscriberCount(){return this.subscribers.size}get completionWaiterCount(){return this.completionWaiters.size}subscribe($){return this.subscribers.add($),()=>{this.subscribers.delete($)}}clear(){this.subscribers.clear();for(let $ of this.completionWaiters.values())for(let Y of $)if(!Y.cancelled)Y.resolve();this.completionWaiters.clear()}waitForJobCompletion($,Y){let X=String($);return new Promise((G)=>{let J={resolve:()=>{clearTimeout(Q),G(!0)},cancelled:!1},Q=setTimeout(()=>{J.cancelled=!0;let Z=this.completionWaiters.get(X);if(Z){let K=Z.indexOf(J);if(K!==-1)Z.splice(K,1);if(Z.length===0)this.completionWaiters.delete(X)}G(!1)},Y),W=this.completionWaiters.get(X);if(!W)W=[],this.completionWaiters.set(X,W);W.push(J)})}needsBroadcast(){return this.subscribers.size>0||this.webhookManager.hasEnabledWebhooks()||this.completionWaiters.size>0}broadcast($){let Y=this.subscribers.size>0,X=this.webhookManager.hasEnabledWebhooks(),J=$.eventType==="completed"&&this.completionWaiters.size>0;if(!Y&&!X&&!J)return;if(Y)for(let Q of this.subscribers)try{Q($)}catch{}if(J){let Q=String($.jobId),W=this.completionWaiters.get(Q);if(W){this.completionWaiters.delete(Q);for(let Z of W)if(!Z.cancelled)Z.resolve()}}if(X){let Q=this.mapEventToWebhook($.eventType);if(Q)this.webhookManager.trigger(Q,String($.jobId),$.queue,{data:$.data,error:$.error}).catch((W)=>{PR.error("Webhook trigger failed",{event:Q,jobId:String($.jobId),queue:$.queue,error:String(W)})})}}mapEventToWebhook($){switch($){case"pushed":return"job.pushed";case"pulled":return"job.started";case"completed":return"job.completed";case"failed":return"job.failed";case"progress":case"stalled":case"removed":case"delayed":case"duplicated":case"retried":case"waiting-children":case"drained":case"paused":case"resumed":return null}}}function cs0(){return{queueIdleSince:new Map,queueThresholdEmitted:new Set,workerOverloadedSince:new Map,storageWarningEmitted:!1,memoryWarningEmitted:!1}}var ps0=parseInt(process.env.QUEUE_IDLE_THRESHOLD_MS??"30000"),NQ0=parseInt(process.env.QUEUE_SIZE_THRESHOLD??"0"),sc=parseInt(process.env.MEMORY_WARNING_MB??"0"),oc=parseInt(process.env.STORAGE_WARNING_MB??"0"),ds0=parseInt(process.env.WORKER_OVERLOAD_THRESHOLD_MS??"30000");function ls0($){if(!$.dashboardEmit)return;let Y=Date.now();hf4($,Y),ff4($),gf4($,Y),mf4($),uf4($)}function is0($,Y,X){let G=l1($),J=Y[G].queues.get($);if(!J)return 0;let Q=0;for(let W of J.values())if(W.runAt<=X)Q++;return Q}function bf4($,Y){let X=0;for(let G of Y)for(let J of G.values())if(J.queue===$)X++;return X}function hf4($,Y){if(ps0<=0)return;for(let X of $.queueNamesCache){let G=is0(X,$.shards,Y),J=bf4(X,$.processingShards);if(G===0&&J===0)if(!$.state.queueIdleSince.has(X))$.state.queueIdleSince.set(X,Y);else{let Q=$.state.queueIdleSince.get(X)??Y;if(Y-Q>=ps0)$.dashboardEmit?.("queue:idle",{queue:X,idleSeconds:Math.floor((Y-Q)/1000)}),$.state.queueIdleSince.delete(X)}else $.state.queueIdleSince.delete(X)}}function ff4($){if(NQ0<=0)return;let Y=Date.now();for(let X of $.queueNamesCache){let G=is0(X,$.shards,Y);if(G>=NQ0){if(!$.state.queueThresholdEmitted.has(X))$.dashboardEmit?.("queue:threshold",{queue:X,size:G,threshold:NQ0}),$.state.queueThresholdEmitted.add(X)}else $.state.queueThresholdEmitted.delete(X)}}function gf4($,Y){if(ds0<=0)return;for(let X of $.workerManager.list())if(X.concurrency>0&&X.activeJobs>=X.concurrency)if(!$.state.workerOverloadedSince.has(X.id))$.state.workerOverloadedSince.set(X.id,Y);else{let J=$.state.workerOverloadedSince.get(X.id)??Y;if(Y-J>=ds0)$.dashboardEmit?.("worker:overloaded",{workerId:X.id,name:X.name,activeJobs:X.activeJobs,concurrency:X.concurrency,overloadedSeconds:Math.floor((Y-J)/1000)}),$.state.workerOverloadedSince.delete(X.id)}else $.state.workerOverloadedSince.delete(X.id)}function mf4($){if(sc<=0)return;let Y=process.memoryUsage(),X=Math.round(Y.heapUsed/1024/1024);if(X>=sc){if(!$.state.memoryWarningEmitted)$.dashboardEmit?.("server:memory-warning",{heapUsedMB:X,thresholdMB:sc,rssMB:Math.round(Y.rss/1024/1024)}),$.state.memoryWarningEmitted=!0}else if(X<sc*0.9)$.state.memoryWarningEmitted=!1}function uf4($){if(oc<=0||!$.storage)return;let Y=$.storage.getSize(),X=Math.round(Y/1024/1024);if(X>=oc){if(!$.state.storageWarningEmitted)$.dashboardEmit?.("storage:size-warning",{sizeMB:X,thresholdMB:oc}),$.state.storageWarningEmitted=!0}else if(X<oc*0.9)$.state.storageWarningEmitted=!1}var ns0=parseInt(Bun.env.LOCK_TIMEOUT_MS??"5000",10);class LQ0 extends Error{constructor($="Lock acquisition timed out"){super($);this.name="LockTimeoutError"}}class tc{readers=0;writer=!1;writerWaiting=0;readerQueue=[];writerQueue=[];async acquireRead($=ns0){let Y=Date.now();while(this.writer||this.writerWaiting>0){let G=$-(Date.now()-Y);if(G<=0)throw new LQ0("Read lock acquisition timed out");await new Promise((J)=>{let Q={resolve:J,cancelled:!1},W=setTimeout(()=>{Q.cancelled=!0,J()},G);Q.resolve=()=>{clearTimeout(W),J()},this.readerQueue.push(Q)})}this.readers++;let X=!1;return{release:()=>{if(X)return;if(X=!0,this.readers--,this.readers===0&&this.writerWaiting>0){let G=this.writerQueue.shift();while(G){if(!G.cancelled){G.resolve();break}G=this.writerQueue.shift()}}}}}async acquireWrite($=ns0){if(!this.writer&&this.readers===0)return this.writer=!0,this.createWriteGuard();let Y=Date.now();this.writerWaiting++;try{while(this.writer||this.readers>0){let X=$-(Date.now()-Y);if(X<=0)throw new LQ0("Write lock acquisition timed out");await new Promise((G)=>{let J={resolve:G,cancelled:!1},Q=setTimeout(()=>{J.cancelled=!0,G()},X);J.resolve=()=>{clearTimeout(Q),G()},this.writerQueue.push(J)})}return this.writerWaiting--,this.writer=!0,this.createWriteGuard()}catch(X){throw this.writerWaiting--,X}}createWriteGuard(){let $=!1;return{release:()=>{if($)return;if($=!0,this.writer=!1,this.writerWaiting>0){let X=this.writerQueue.shift();while(X){if(!X.cancelled){X.resolve();return}X=this.writerQueue.shift()}}let Y=this.readerQueue.splice(0);for(let X of Y)if(!X.cancelled)X.resolve()}}}getState(){return{readers:this.readers,writer:this.writer,writerWaiting:this.writerWaiting}}}async function ec($,Y,X){let G=await $.acquireRead(X);try{return await Y()}finally{G.release()}}async function v4($,Y,X){let G=await $.acquireWrite(X);try{return await Y()}finally{G.release()}}var pf4=[0.1,0.5,1,2.5,5,10,25,50,100,250,500,1000,2500,5000,1e4];class ES{buckets;counts;sum=0;count=0;constructor($=pf4){this.buckets=[...$].sort((Y,X)=>Y-X),this.counts=new Float64Array(this.buckets.length+1)}observe($){this.sum+=$,this.count++;let Y=0,X=this.buckets.length;while(Y<X){let G=Y+X>>>1;if(this.buckets[G]<$)Y=G+1;else X=G}for(let G=Y;G<=this.buckets.length;G++)this.counts[G]++}getSum(){return this.sum}getCount(){return this.count}percentile($){if(this.count===0)return 0;let Y=$/100*this.count;for(let X=0;X<this.buckets.length;X++)if(this.counts[X]>=Y)return this.buckets[X];return this.buckets[this.buckets.length-1]}toPrometheus($,Y){let X=[`# HELP ${$} ${Y}`,`# TYPE ${$} histogram`];for(let G=0;G<this.buckets.length;G++)X.push(`${$}_bucket{le="${this.buckets[G]}"} ${this.counts[G]}`);return X.push(`${$}_bucket{le="+Inf"} ${this.counts[this.buckets.length]}`),X.push(`${$}_sum ${this.sum}`),X.push(`${$}_count ${this.count}`),X.join(`
`)}reset(){this.sum=0,this.count=0,this.counts.fill(0)}}class rs0{push=new ES;pull=new ES;ack=new ES;toPrometheus(){return[this.push.toPrometheus("bunqueue_push_duration_ms","Push operation latency in milliseconds"),"",this.pull.toPrometheus("bunqueue_pull_duration_ms","Pull operation latency in milliseconds"),"",this.ack.toPrometheus("bunqueue_ack_duration_ms","Ack operation latency in milliseconds")].join(`
`)}getAverages(){return{pushMs:this.push.getCount()>0?this.push.getSum()/this.push.getCount():0,pullMs:this.pull.getCount()>0?this.pull.getSum()/this.pull.getCount():0,ackMs:this.ack.getCount()>0?this.ack.getSum()/this.ack.getCount():0}}getPercentiles(){return{push:{p50:this.push.percentile(50),p95:this.push.percentile(95),p99:this.push.percentile(99)},pull:{p50:this.pull.percentile(50),p95:this.pull.percentile(95),p99:this.pull.percentile(99)},ack:{p50:this.ack.percentile(50),p95:this.ack.percentile(95),p99:this.ack.percentile(99)}}}}var b3=new rs0;class MS{count=0;lastRate=0;lastCalcTime=Date.now();alpha;constructor($=0.3){this.alpha=$}increment($=1){this.count+=$}getRate(){let $=Date.now(),Y=($-this.lastCalcTime)/1000;if(Y<0.1)return this.lastRate;let X=this.count/Y;return this.lastRate=this.lastRate===0?X:this.alpha*X+(1-this.alpha)*this.lastRate,this.count=0,this.lastCalcTime=$,this.lastRate}}class as0{pushRate=new MS;pullRate=new MS;completeRate=new MS;failRate=new MS;getRates(){return{pushPerSec:Math.round(this.pushRate.getRate()*100)/100,pullPerSec:Math.round(this.pullRate.getRate()*100)/100,completePerSec:Math.round(this.completeRate.getRate()*100)/100,failPerSec:Math.round(this.failRate.getRate()*100)/100}}}var XZ=new as0;function ss0($,Y,X){if(!$.customId)return{skip:!1,id:As0()};let G=d0($.customId),J=X.customIdMap.get($.customId);if(!J)return X.customIdMap.set($.customId,G),{skip:!1,id:G};let Q=X.jobIndex.get(J),W=Q?.type==="queue"?Y.getQueue(Q.queueName).find(J):null;if(W)return{skip:!0,existingJob:W};return X.customIdMap.delete($.customId),X.customIdMap.set($.customId,G),{skip:!1,id:G}}function os0($,Y,X,G,J){if(!$.uniqueKey)return{skip:!1};let Q=G.getQueue(X),W=G.getUniqueKeyEntry(X,$.uniqueKey);if(!W)return G.registerUniqueKeyWithTtl(X,$.uniqueKey,$.id,Y.dedup?.ttl),{skip:!1};let Z=Y.dedup;if(Z?.replace){if(Q.find(W.jobId))Q.remove(W.jobId),G.decrementQueued(W.jobId),J.jobIndex.delete(W.jobId);return G.releaseUniqueKey(X,$.uniqueKey),G.registerUniqueKeyWithTtl(X,$.uniqueKey,$.id,Z?.ttl),{skip:!1}}if(Z?.extend&&Z?.ttl){if(G.extendUniqueKeyTtl(X,$.uniqueKey,Z.ttl),Y.customId)J.customIdMap.delete(Y.customId);if(Q.find(W.jobId))return J.dashboardEmit?.("job:deduplicated",{queue:X,jobId:String(W.jobId),strategy:"extend"}),{skip:!0,existingId:W.jobId};throw Error("Duplicate unique_key (extended TTL)")}if(Y.customId)J.customIdMap.delete(Y.customId);if(Q.find(W.jobId)||J.jobIndex.has(W.jobId))return J.broadcast({eventType:"duplicated",queue:X,jobId:W.jobId,timestamp:Date.now()}),J.dashboardEmit?.("job:deduplicated",{queue:X,jobId:String(W.jobId),strategy:"default"}),{skip:!0,existingId:W.jobId};return G.registerUniqueKeyWithTtl(X,$.uniqueKey,$.id,Y.dedup?.ttl),{skip:!1}}function ts0($,Y,X,G,J){let W=$.dependsOn.length>0&&!$.dependsOn.every((K)=>J.completedJobs.has(K)),Z=Date.now();if(W)X.waitingDeps.set($.id,$),X.registerDependencies($.id,$.dependsOn),$.timeline.push({state:"waiting-children",timestamp:Z}),J.dashboardEmit?.("job:waiting-children",{jobId:String($.id),queue:Y,dependsOn:$.dependsOn.map(String)});else{X.getQueue(Y).push($);let K=$.runAt>Z;X.incrementQueued($.id,K,$.createdAt,Y,$.runAt);let H=K?"delayed":$.priority>0?"prioritized":"waiting";$.timeline.push({state:H,timestamp:Z})}J.jobIndex.set($.id,{type:"queue",shardIdx:G,queueName:Y})}async function es0($,Y,X){let G=Bun.nanoseconds(),J=l1($),Q=Date.now(),W;if(await v4(X.shardLocks[J],()=>{let Z=X.shards[J],K=ss0(Y,Z,X);if(K.skip){W={job:K.existingJob,persisted:!1};return}let H=uJ0(K.id,$,Y,Q),z=os0(H,Y,$,Z,X);if(z.skip){W={job:Z.getQueue($).find(z.existingId)??{...H,id:z.existingId},persisted:!1};return}ts0(H,$,Z,J,X),Z.notify(),W={job:H,persisted:!0}}),!W)throw console.error("[Push] Push failed unexpectedly",{queue:$,input:Y}),Error("Push failed");if(W.persisted)X.storage?.insertJob(W.job,Y.durable),X.totalPushed.value++,XZ.pushRate.increment(),X.broadcast({eventType:"pushed",queue:$,jobId:W.job.id,timestamp:Q});return b3.push.observe((Bun.nanoseconds()-G)/1e6),W.job}async function $o0($,Y,X){let G=Bun.nanoseconds(),J=Date.now(),Q=l1($),W=[],Z=[];if(await v4(X.shardLocks[Q],()=>{let K=X.shards[Q];for(let H of Y){let z=ss0(H,K,X);if(z.skip){W.push(z.existingJob.id);continue}let V=uJ0(z.id,$,H,J),A=os0(V,H,$,K,X);if(A.skip){W.push(A.existingId);continue}ts0(V,$,K,Q,X),Z.push(V),W.push(V.id)}if(Z.length>0)K.notifyBatch(Z.length)}),Z.length>0){X.storage?.insertJobsBatch(Z),X.totalPushed.value+=BigInt(Z.length),XZ.pushRate.increment(Z.length);for(let K of Z)X.broadcast({eventType:"pushed",queue:K.queue,jobId:K.id,timestamp:J})}if(Z.length>0&&Y.length>1)X.dashboardEmit?.("batch:pushed",{queue:$,total:Y.length,inserted:Z.length,duplicates:Y.length-Z.length});return b3.push.observe((Bun.nanoseconds()-G)/1e6),W}function Yo0($,Y,X,G){let J=$.getQueue(Y),Q=J.peek();if(!Q)return{status:"stop"};if(Ds0(Q,X))return J.pop(),$.decrementQueued(Q.id),G.jobIndex.delete(Q.id),G.dashboardEmit?.("job:expired",{queue:Y,jobId:String(Q.id),ttl:Q.ttl,age:X-Q.createdAt}),{status:"skip"};if(!Fs0(Q,X))return{status:"stop"};if(Q.groupId&&$.isGroupActive(Y,Q.groupId))return{status:"stop"};if(J.pop(),$.decrementQueued(Q.id),Q.groupId)$.activateGroup(Y,Q.groupId);if(Q.startedAt=X,Q.lastHeartbeat=X,Q.timeline.length<qY)Q.timeline.push({state:"active",timestamp:X});return{status:"job",job:Q}}async function df4($,Y,X){let G=x5($.id),J=Date.now();await v4(X.processingLocks[G],()=>{X.processingShards[G].set($.id,$)}),X.jobIndex.set($.id,{type:"processing",shardIdx:G});try{X.storage?.markActive($.id,$.startedAt??J,$.timeline)}catch{}X.totalPulled.value++,XZ.pullRate.increment(),X.broadcast({eventType:"pulled",queue:Y,jobId:$.id,timestamp:J})}async function cf4($,Y,X){let G=new Map;for(let W of $){let Z=x5(W.id),K=G.get(Z)??[];if(K.length===0)G.set(Z,K);K.push(W)}let J=[];for(let[W,Z]of G)J.push(v4(X.processingLocks[W],()=>{for(let K of Z)X.processingShards[W].set(K.id,K)}));await Promise.all(J);let Q=Date.now();for(let W of $){let Z=x5(W.id);X.jobIndex.set(W.id,{type:"processing",shardIdx:Z});try{X.storage?.markActive(W.id,W.startedAt??Q,W.timeline)}catch{}X.totalPulled.value++,XZ.pullRate.increment(),X.broadcast({eventType:"pulled",queue:Y,jobId:W.id,timestamp:Q})}}async function Xo0($,Y,X,G){let J=x5($.id);await v4(G.processingLocks[J],()=>{G.processingShards[J].delete($.id)}),$.startedAt=null,await v4(G.shardLocks[X],()=>{let Q=G.shards[X];if($.groupId)Q.releaseGroup(Y,$.groupId);Q.releaseConcurrency(Y),Q.getQueue(Y).push($),Q.incrementQueued($.id,!1,$.createdAt,Y,$.runAt),Q.notify()}),G.jobIndex.set($.id,{type:"queue",shardIdx:X,queueName:Y})}async function BQ0($,Y,X){let G=Bun.nanoseconds(),J=Y>0?Date.now()+Y:0,Q=l1($);while(!0){let W=await lf4($,Q,X);if(W){try{await df4(W,$,X)}catch{return await Xo0(W,$,Q,X),null}return b3.pull.observe((Bun.nanoseconds()-G)/1e6),W}let Z=Date.now();if(J===0||Z>=J)return null;let K=J-Z;await X.shards[Q].waitForJob(K)}}async function lf4($,Y,X){return await v4(X.shardLocks[Y],()=>{let G=X.shards[Y];if(G.getState($).paused)return null;if(!G.tryAcquireRateLimit($))return X.dashboardEmit?.("ratelimit:rejected",{queue:$}),null;if(!G.tryAcquireConcurrency($))return X.dashboardEmit?.("concurrency:rejected",{queue:$}),null;let Q=Date.now();while(!0){let W=Yo0(G,$,Q,X);if(W.status==="job")return W.job;if(W.status==="stop")return G.releaseConcurrency($),null}})}async function OQ0($,Y,X,G){let J=Bun.nanoseconds(),Q=X>0?Date.now()+X:0,W=l1($);while(!0){let Z=await if4($,W,Y,G);if(Z.length>0){try{await cf4(Z,$,G)}catch{for(let z of Z)await Xo0(z,$,W,G);return[]}if(Z.length>1)G.dashboardEmit?.("batch:pulled",{queue:$,count:Z.length});return b3.pull.observe((Bun.nanoseconds()-J)/1e6),Z}let K=Date.now();if(Q===0||K>=Q)return[];let H=Q-K;await G.shards[W].waitForJob(H)}}async function if4($,Y,X,G){return await v4(G.shardLocks[Y],()=>{let J=G.shards[Y],Q=J.getState($),W=[];if(Q.paused)return W;let Z=Date.now();while(W.length<X){if(!J.tryAcquireRateLimit($))break;if(!J.tryAcquireConcurrency($))break;let K=Yo0(J,$,Z,G);if(K.status==="job")W.push(K.job);else if(J.releaseConcurrency($),K.status==="stop")break}return W})}function Go0($){let Y=new Map;for(let X of $){let G=x5(X),J=Y.get(G);if(!J)J=[],Y.set(G,J);J.push(X)}return Y}function Jo0($){let Y=new Map;for(let X of $){let G=x5(X.id),J=Y.get(G);if(!J)J=[],Y.set(G,J);J.push(X)}return Y}async function Qo0($,Y){let X=[];return await Promise.all(Array.from($.entries()).map(async([G,J])=>{await v4(Y.processingLocks[G],()=>{for(let Q of J){let W=Y.processingShards[G].get(Q);if(W)Y.processingShards[G].delete(Q),X.push({id:Q,job:W})}})})),X}async function Wo0($,Y){let X=[];return await Promise.all(Array.from($.entries()).map(async([G,J])=>{await v4(Y.processingLocks[G],()=>{for(let Q of J){let W=Y.processingShards[G].get(Q.id);if(W)Y.processingShards[G].delete(Q.id),X.push({id:Q.id,job:W,result:Q.result})}})})),X}function EQ0($){let Y=new Map;for(let X=0;X<$.length;X++){let G=$[X].job,J=l1(G.queue),Q=Y.get(J);if(!Q)Q=[],Y.set(J,Q);Q.push(G)}return Y}async function MQ0($,Y){await Promise.all(Array.from($.entries()).map(async([X,G])=>{await v4(Y.shardLocks[X],()=>{let J=Y.shards[X];for(let Q of G)J.releaseJobResources(Q.queue,Q.uniqueKey,Q.groupId)})}))}function RQ0($,Y,X){let G=Date.now(),J=Y.storage,Q=J!==null,W=$.length,Z=Y.needsBroadcast?.()??!0,K=Y.hasPendingDeps?.()??!0;if(Y.totalCompleted.value+=BigInt(W),Y.perQueueMetrics)for(let H=0;H<W;H++){let z=$[H].job.queue,V=Y.perQueueMetrics.get(z);if(V)V.totalCompleted++;else Y.perQueueMetrics.set(z,{totalCompleted:1n,totalFailed:0n})}for(let H=0;H<W;H++){let{id:z,job:V,result:A}=$[H];if(V.customId&&Y.customIdMap)Y.customIdMap.delete(V.customId);if(!V.removeOnComplete){if(V.completedAt=G,V.timeline.length<qY)V.timeline.push({state:"completed",timestamp:G});if(X&&A!==void 0){if(Y.jobResults.set(z,A),Q)J.storeResult(z,A)}if(Y.jobIndex.set(z,{type:"completed",queueName:V.queue}),Y.completedJobsData.set(z,V),Q)J.markCompleted(z,G,V.timeline);Y.completedJobs.add(z)}else if(Y.jobIndex.delete(z),Q)J.deleteJob(z)}if(Z)for(let H=0;H<W;H++){let{id:z,job:V,result:A}=$[H];Y.broadcast({eventType:"completed",queue:V.queue,jobId:z,timestamp:G,data:X?A:void 0})}if(K&&Y.onJobsCompleted){let H=$.map((z)=>z.id);Y.onJobsCompleted(H)}else if(K)for(let H=0;H<W;H++)Y.onJobCompleted($[H].id);if(XZ.completeRate.increment(W),Y.onRepeat)for(let H=0;H<W;H++){let z=$[H].job;if(z.repeat){if(z.repeat.limit===void 0||z.repeat.count<z.repeat.limit)Y.onRepeat(z)}}}async function $l($,Y,X){let G=Bun.nanoseconds(),J=x5($),Q=await v4(X.processingLocks[J],()=>{let Z=X.processingShards[J].get($);if(Z)X.processingShards[J].delete($);return Z});if(!Q)throw Error(`Job not found or not in processing state: ${$}`);let W=l1(Q.queue);if(await v4(X.shardLocks[W],()=>{X.shards[W].releaseJobResources(Q.queue,Q.uniqueKey,Q.groupId)}),Q.customId&&X.customIdMap)X.customIdMap.delete(Q.customId);if(!Q.removeOnComplete){let Z=Date.now();if(Q.completedAt=Z,Q.timeline.length<qY)Q.timeline.push({state:"completed",timestamp:Z});if(X.completedJobs.add($),X.completedJobsData.set($,Q),Y!==void 0)X.jobResults.set($,Y),X.storage?.storeResult($,Y);X.jobIndex.set($,{type:"completed",queueName:Q.queue}),X.storage?.markCompleted($,Z,Q.timeline)}else X.jobIndex.delete($),X.storage?.deleteJob($);if(X.totalCompleted.value++,X.perQueueMetrics){let Z=X.perQueueMetrics.get(Q.queue);if(Z)Z.totalCompleted++;else X.perQueueMetrics.set(Q.queue,{totalCompleted:1n,totalFailed:0n})}if(XZ.completeRate.increment(),X.broadcast({eventType:"completed",queue:Q.queue,jobId:$,timestamp:Date.now(),data:Y}),X.onJobCompleted($),Q.repeat&&X.onRepeat){if(Q.repeat.limit===void 0||Q.repeat.count<Q.repeat.limit)X.onRepeat(Q)}b3.ack.observe((Bun.nanoseconds()-G)/1e6)}function nf4($,Y,X,G,J){let Q=G.addToDlq($,"max_attempts_exceeded",X??null);if(J.jobIndex.set(Y,{type:"dlq",queueName:$.queue}),J.storage?.saveDlqEntry(Q),J.storage?.deleteJob(Y),J.totalFailed.value++,J.perQueueMetrics){let W=J.perQueueMetrics.get($.queue);if(W)W.totalFailed++;else J.perQueueMetrics.set($.queue,{totalCompleted:0n,totalFailed:1n})}if(XZ.failRate.increment(),$.customId&&J.customIdMap)J.customIdMap.delete($.customId);if(J.emitDashboardEvent?.("dlq:added",{queue:$.queue,jobId:String(Y),reason:"max_attempts_exceeded"}),$.parentId)J.emitDashboardEvent?.("flow:failed",{parentJobId:String($.parentId),failedChildId:String(Y),queue:$.queue,error:X??"Max attempts exceeded"})}async function Zo0($,Y,X){let G=x5($),J=await v4(X.processingLocks[G],()=>{let K=X.processingShards[G].get($);if(K)X.processingShards[G].delete($);return K});if(!J)throw Error(`Job not found or not in processing state: ${$}`);J.attempts++;let Q=Date.now();if(J.timeline.length<qY)J.timeline.push({state:"failed",timestamp:Q,error:Y,attempt:J.attempts});let W=l1(J.queue),Z=!1;if(await v4(X.shardLocks[W],()=>{let K=X.shards[W];if(K.releaseJobResources(J.queue,J.uniqueKey,J.groupId),Ns0(J)){let H=Date.now();if(J.runAt=H+qR(J),K.getQueue(J.queue).push(J),K.incrementQueued($,!0,J.createdAt,J.queue,J.runAt),X.jobIndex.set($,{type:"queue",shardIdx:W,queueName:J.queue}),X.storage?.updateForRetry(J),Z=!0,J.timeline.length<qY)J.timeline.push({state:"waiting",timestamp:H,attempt:J.attempts+1})}else if(J.removeOnFail){if(X.jobIndex.delete($),X.storage?.deleteJob($),X.totalFailed.value++,X.perQueueMetrics){let H=X.perQueueMetrics.get(J.queue);if(H)H.totalFailed++;else X.perQueueMetrics.set(J.queue,{totalCompleted:0n,totalFailed:1n})}if(XZ.failRate.increment(),J.customId&&X.customIdMap)X.customIdMap.delete(J.customId)}else nf4(J,$,Y,K,X)}),X.broadcast({eventType:"failed",queue:J.queue,jobId:$,timestamp:Date.now(),error:Y,data:J.data}),Z)X.broadcast({eventType:"retried",queue:J.queue,jobId:$,timestamp:Date.now(),prev:"failed"});if(!Z&&J.failParentOnFailure&&J.parentId&&X.onChildTerminalFailure)X.onChildTerminalFailure(J,Y);if(!Z&&J.parentId&&X.onChildDependencyOption&&(J.removeDependencyOnFailure||J.ignoreDependencyOnFailure||J.continueParentOnFailure))X.onChildDependencyOption(J,Y)}async function Ko0($,Y){if($.length===0)return;if($.length<=4){await Promise.all($.map((W)=>$l(W,void 0,Y)));return}let X={processingShards:Y.processingShards,processingLocks:Y.processingLocks,shards:Y.shards,shardLocks:Y.shardLocks},G=Go0($),J=await Qo0(G,X),Q=EQ0(J);await MQ0(Q,X),RQ0(J,Y,!1)}async function Uo0($,Y){if($.length===0)return;if($.length<=4){await Promise.all($.map((W)=>$l(W.id,W.result,Y)));return}let X={processingShards:Y.processingShards,processingLocks:Y.processingLocks,shards:Y.shards,shardLocks:Y.shardLocks},G=Jo0($),J=await Wo0(G,X),Q=EQ0(J);await MQ0(Q,X),RQ0(J,Y,!0)}function Ho0($,Y){let X=l1($);Y.shards[X].pause($)}function zo0($,Y){let X=l1($);Y.shards[X].resume($)}function Vo0($,Y){let X=l1($);return Y.shards[X].isPaused($)}function Ao0($,Y){let X=l1($),{count:G,jobIds:J}=Y.shards[X].drain($);for(let Q of J)Y.jobIndex.delete(Q);return G}function Fo0($,Y){let X=l1($);Y.shards[X].obliterate($)}function rf4($){if(!$)return;if($==="wait")return"waiting";return $}function qQ0($,Y){try{$.storage?.deleteJob(Y)}catch{}}function af4($,Y){try{$.storage?.deleteDlqEntry(Y)}catch{}}function sf4($,Y,X,G){let J=l1($),Q=X.shards[J],W=Q.getQueue($),Z=Q.getOldJobs($,Y,G),K=[];for(let{jobId:H}of Z)if(W.has(H))W.remove(H),Q.decrementQueued(H),Q.removeFromTemporalIndex(H),X.jobIndex.delete(H),qQ0(X,H),K.push(H);return K}function of4($,Y,X,G){if(!X.completedJobs||!X.completedJobsData)return[];let J=Date.now()-Y,Q=[];for(let[W,Z]of X.jobIndex){if(Z.type!=="completed"||Z.queueName!==$)continue;let K=X.completedJobsData.get(W)??X.storage?.getJob(W)??null,H=K?.completedAt??K?.createdAt??0;if(H&&H>J)continue;if(Q.push(W),Q.length>=G)break}for(let W of Q)X.completedJobs.delete(W),X.completedJobsData.delete(W),X.jobResults?.delete(W),X.jobLogs?.delete(W),X.jobIndex.delete(W),qQ0(X,W);return Q}function tf4($,Y,X,G){let J=l1($),Q=X.shards[J],W=Q.getDlqEntries($),Z=Date.now()-Y,K=[];for(let H of W){if((H.enteredAt??H.job.createdAt)>Z)continue;if(K.push(H.job.id),K.length>=G)break}for(let H of K)Q.removeFromDlq($,H),X.jobIndex.delete(H),X.jobResults?.delete(H),X.jobLogs?.delete(H),af4(X,H),qQ0(X,H);return K}function Do0($,Y,X,G,J){let Q=J??1000;switch(rf4(G)){case void 0:case"waiting":case"delayed":case"prioritized":case"paused":return sf4($,Y,X,Q);case"completed":return of4($,Y,X,Q);case"failed":return tf4($,Y,X,Q);case"active":default:return[]}}function No0($,Y){let X=l1($);return Y.shards[X].getQueue($).size}async function Lo0($,Y){let X=Y.jobIndex.get($);if(!X)return!1;if(X.type==="queue"){let G=await v4(Y.shardLocks[X.shardIdx],()=>{let J=Y.shards[X.shardIdx],Q=J.getQueue(X.queueName).remove($);if(Q){if(J.decrementQueued($),Q.uniqueKey)J.releaseUniqueKey(X.queueName,Q.uniqueKey);return Y.jobIndex.delete($),Y.storage?.deleteJob($),{success:!0,queueName:X.queueName}}return{success:!1,queueName:X.queueName}});if(G.success)Y.eventsManager.broadcast({eventType:"removed",jobId:$,queue:G.queueName,timestamp:Date.now(),prev:"waiting"});return G.success}return!1}async function Bo0($,Y,X,G){if(X.jobIndex.get($)?.type!=="processing")return!1;let Q=x5($);return v4(X.processingLocks[Q],()=>{let W=X.processingShards[Q].get($);if(!W)return!1;if(W.progress=Math.max(0,Math.min(100,Y)),G!==void 0)W.progressMessage=G;return W.lastHeartbeat=Date.now(),X.eventsManager.broadcast({eventType:"progress",jobId:$,queue:W.queue,timestamp:Date.now(),progress:W.progress,data:{progress:W.progress,message:W.progressMessage}}),X.webhookManager.trigger("job.progress",String($),W.queue,{progress:W.progress}).catch((Z)=>{PR.error("Progress webhook failed",{jobId:String($),queue:W.queue,error:String(Z)})}),!0})}async function Oo0($,Y,X){let G=X.jobIndex.get($);if(G?.type==="queue")return v4(X.shardLocks[G.shardIdx],()=>{let J=X.shards[G.shardIdx],Q=J.getQueue(G.queueName).find($)??J.waitingDeps.get($);if(Q)return Q.data=Y,!0;return!1});else if(G?.type==="processing"){let J=x5($);return v4(X.processingLocks[J],()=>{let Q=X.processingShards[J].get($);if(Q)return Q.data=Y,!0;return!1})}return $g4($,Y,X)}async function $g4($,Y,X){if(!X.repeatChain)return!1;let G=X.repeatChain.get($);if(!G)return!1;let J=X.jobIndex.get(G);if(J?.type!=="queue")return!1;return v4(X.shardLocks[J.shardIdx],()=>{let Q=X.shards[J.shardIdx].getQueue(J.queueName).find(G);if(Q)return Q.data=Y,!0;return!1})}async function Eo0($,Y,X){let G=X.jobIndex.get($);if(G?.type!=="queue")return!1;return v4(X.shardLocks[G.shardIdx],()=>{return X.shards[G.shardIdx].getQueue(G.queueName).updatePriority($,Y)})}async function Mo0($,Y){let X=Y.jobIndex.get($);if(X?.type!=="queue")return!1;return v4(Y.shardLocks[X.shardIdx],()=>{let G=Y.shards[X.shardIdx].getQueue(X.queueName),J=G.find($);if(!J||J.runAt<=Date.now())return!1;return G.updateRunAt($,Date.now()),!0})}async function IQ0($,Y,X){if(X.jobIndex.get($)?.type!=="processing")return!1;let J=x5($),Q=await v4(X.processingLocks[J],()=>{let H=X.processingShards[J].get($);if(H)X.processingShards[J].delete($);return H});if(!Q)return!1;let W=Date.now();Q.runAt=W+Y,Q.startedAt=null;let Z=l1(Q.queue),K=Q.queue;return await v4(X.shardLocks[Z],()=>{let H=X.shards[Z];H.getQueue(Q.queue).push(Q);let z=Q.runAt>W;H.incrementQueued($,z,Q.createdAt,Q.queue,Q.runAt),X.jobIndex.set($,{type:"queue",shardIdx:Z,queueName:Q.queue})}),X.eventsManager.broadcast({eventType:"delayed",jobId:$,queue:K,timestamp:Date.now(),delay:Y}),!0}async function Ro0($,Y){let X=Y.jobIndex.get($);if(!X)return!1;let G=null;if(X.type==="queue")G=await v4(Y.shardLocks[X.shardIdx],()=>{let J=Y.shards[X.shardIdx],Q=J.getQueue(X.queueName).remove($);if(Q)J.decrementQueued($);return Q});else if(X.type==="processing"){let J=x5($);G=await v4(Y.processingLocks[J],()=>{let Q=Y.processingShards[J].get($)??null;if(Q)Y.processingShards[J].delete($);return Q})}if(G){let J=G,Q=l1(J.queue),W=await v4(Y.shardLocks[Q],()=>{let Z=Y.shards[Q].addToDlq(J);return Y.jobIndex.set($,{type:"dlq",queueName:J.queue}),Z});return Y.storage?.saveDlqEntry(W),Y.storage?.deleteJob($),!0}return!1}async function qo0($,Y){if(Y.jobIndex.get($)?.type!=="processing")return!1;let G=x5($),J=await v4(Y.processingLocks[G],()=>{let Z=Y.processingShards[G].get($);if(Z)Y.processingShards[G].delete($);return Z});if(!J)return!1;let Q=Date.now();J.runAt=Q,J.startedAt=null;let W=l1(J.queue);return await v4(Y.shardLocks[W],()=>{let Z=Y.shards[W];Z.releaseJobResources(J.queue,J.uniqueKey,J.groupId),Z.getQueue(J.queue).push(J),Z.incrementQueued($,!1,J.createdAt,J.queue,J.runAt),Y.jobIndex.set($,{type:"queue",shardIdx:W,queueName:J.queue}),Z.notify()}),Y.eventsManager.broadcast({eventType:"waiting",jobId:$,queue:J.queue,timestamp:Q,prev:"active"}),!0}async function PQ0($,Y,X){let G=X.jobIndex.get($);if(G?.type!=="queue")return!1;let Q=Date.now()+Y;return v4(X.shardLocks[G.shardIdx],()=>{let W=X.shards[G.shardIdx].getQueue(G.queueName);if(!W.find($))return!1;return W.updateRunAt($,Q),!0})}async function Io0($,Y){if(Y.jobIndex.get($)?.type!=="processing")return!1;let G=x5($),J=await v4(Y.processingLocks[G],()=>{let W=Y.processingShards[G].get($);if(W)Y.processingShards[G].delete($);return W});if(!J)return!1;let Q=l1(J.queue);return await v4(Y.shardLocks[Q],()=>{let W=Y.shards[Q];W.releaseJobResources(J.queue,J.uniqueKey,J.groupId),W.waitingChildren.set($,J),Y.jobIndex.set($,{type:"queue",shardIdx:Q,queueName:J.queue})}),!0}async function wo0($,Y){let X=Y.jobIndex.get($);if(!X){if(Y.storage){let G=Y.storage.getJob($);if(G)return G;let J=Y.storage.getDlqEntry($);if(J)return J.job}return Y.completedJobsData.get($)??null}switch(X.type){case"queue":return await ec(Y.shardLocks[X.shardIdx],()=>{let G=Y.shards[X.shardIdx];return G.getQueue(X.queueName).find($)??G.waitingDeps.get($)??null});case"processing":return await ec(Y.processingLocks[X.shardIdx],()=>{return Y.processingShards[X.shardIdx].get($)??null});case"completed":return Y.storage?.getJob($)??Y.completedJobsData.get($)??null;case"dlq":{if(Y.storage){let Q=Y.storage.getDlqEntry($);if(Q)return Q.job;let W=Y.storage.getJob($);if(W)return W}let G=l1(X.queueName);return Y.shards[G].getDlq(X.queueName).find((Q)=>Q.id===$)??null}}}function wQ0($,Y){return Y.jobResults.get($)??Y.storage?.getResult($)}function _o0($,Y){let X=Y.customIdMap.get($);if(!X)return null;let G=Y.jobIndex.get(X);if(!G)return null;if(G.type==="queue"){let J=Y.shards[G.shardIdx];return J.getQueue(G.queueName).find(X)??J.waitingDeps.get(X)??null}if(G.type==="processing")return Y.processingShards[G.shardIdx].get(X)??null;if(G.type==="completed")return Y.storage?.getJob(X)??Y.completedJobsData.get(X)??null;if(G.type==="dlq"){if(Y.storage){let W=Y.storage.getJob(X);if(W)return W}let J=l1(G.queueName);return Y.shards[J].getDlq(G.queueName).find((W)=>W.id===X)??null}return null}function jo0($,Y){let X=Y.jobIndex.get($);if(X?.type!=="processing")return null;let G=Y.processingShards[X.shardIdx].get($);if(!G)return null;return{progress:G.progress,message:G.progressMessage}}function Gg4($,Y){if(!Y)return"unknown";if(Y.hasDlqEntry($))return"failed";let X=Y.getJobStateRaw($);if(X==="completed")return"completed";if(X==="active")return"active";if(X!=="waiting"&&X!=="delayed")return"unknown";let G=Y.getJob($);if(!G)return"unknown";if(G.runAt>Date.now())return"delayed";return G.priority>0?"prioritized":"waiting"}async function To0($,Y){let X=Y.jobIndex.get($);if(Y.completedJobs.has($))return"completed";if(!X)return Gg4($,Y.storage);switch(X.type){case"queue":{let G=await ec(Y.shardLocks[X.shardIdx],()=>{let Q=Y.shards[X.shardIdx],W=Q.getQueue(X.queueName).find($);if(W)return{job:W,waitingDeps:!1,waitingChildren:!1};let Z=Q.waitingDeps.get($);if(Z)return{job:Z,waitingDeps:!0,waitingChildren:!1};let K=Q.waitingChildren.get($);if(K)return{job:K,waitingDeps:!1,waitingChildren:!0};return null});if(!G)return"unknown";if(G.waitingDeps||G.waitingChildren)return"waiting-children";let J=Date.now();if(G.job.runAt>J)return"delayed";return G.job.priority>0?"prioritized":"waiting"}case"processing":return"active";case"completed":return"completed";case"dlq":return"failed"}}function Jg4($,Y,X){let G=[];for(let[J,Q]of Y.jobIndex)if(Q.type==="completed"&&Q.queueName===$){let W=Y.storage?.getJob(J)??Y.completedJobsData?.get(J)??null;if(W){if(G.push(W),G.length>=X)break}}return G}function Qg4($,Y,X,G){let J=[];for(let Q of X.processingShards[Y].values()){if(Q.queue===$)J.push(Q);if(J.length>=G)return J}for(let Q=0;Q<X.shardCount;Q++){if(Q===Y)continue;for(let W of X.processingShards[Q].values()){if(W.queue===$)J.push(W);if(J.length>=G)return J}}return J}function Wg4($,Y,X,G){let{waiting:J,prioritized:Q,delayed:W}=X,Z=Date.now(),K=[];for(let H of $.getQueue(Y).values()){if(K.length>=G)break;let z=H.runAt>Z;if(z&&W)K.push(H);else if(!z){if(H.priority>0?Q:J)K.push(H)}}return K}function Yl($,Y){for(let X of $)X._state=Y;return $}function Zg4($){let Y=Date.now();for(let X of $){let G=X.runAt>Y;X._state=G?"delayed":X.priority>0?"prioritized":"waiting"}}function Kg4($,Y,X){let G=[];for(let J of $.waitingDeps.values()){if(J.queue===Y)G.push(J);if(G.length>=X)return G}for(let J of $.waitingChildren.values()){if(J.queue===Y)G.push(J);if(G.length>=X)return G}return G}function Ug4($,Y,X,G,J=1/0){let Q=G.shards[Y],W=[],Z=!X||X.includes("waiting"),K=!X||X.includes("prioritized"),H=!X||X.includes("delayed");if(Z||K||H){let z=Wg4(Q,$,{waiting:Z,prioritized:K,delayed:H},J);Zg4(z),W.push(...z)}if(!X||X.includes("active"))W.push(...Yl(Qg4($,Y,G,J),"active"));if(!X||X.includes("failed")){let z=Q.getDlq($);W.push(...Yl(J<z.length?z.slice(0,J):z,"failed"))}if(!X||X.includes("completed"))W.push(...Yl(Jg4($,G,J),"completed"));if(!X||X.includes("waiting-children"))W.push(...Yl(Kg4(Q,$,J),"waiting-children"));return W}function Po0($,Y){let X=[];for(let G of $.waitingDeps.values())if(G.queue===Y)X.push(G);for(let G of $.waitingChildren.values())if(G.queue===Y)X.push(G);return X}function Hg4($,Y,X,G){let J=X.includes("prioritized"),Q=X.includes("waiting");if(!J&&!Q){if(X.length===1)return $.queryJobs(Y,{state:X[0],...G});return $.queryJobs(Y,{states:X,...G})}let W=X.map((H)=>H==="prioritized"?"waiting":H).filter((H,z,V)=>V.indexOf(H)===z),Z={...G,limit:G.limit*2},K=W.length===1?$.queryJobs(Y,{state:W[0],...Z}):$.queryJobs(Y,{states:W,...Z});if(J&&!Q)K=K.filter((H)=>H.priority>0);else if(Q&&!J)K=K.filter((H)=>H.priority<=0);return K.slice(0,G.limit)}function Co0($,Y,X,G){let{state:J,start:Q=0,end:W=100,asc:Z=!0}=X,K=!J?null:Array.isArray(J)?J.length===0?null:J:[J],H=W-Q;if(G.storage){if(!K)return G.storage.queryJobs($,{limit:H,offset:Q,asc:Z});let A=K.includes("waiting-children"),F=K.filter((L)=>L!=="waiting-children");if(A&&F.length===0){let L=Po0(G.shards[Y],$);return L.sort((B,O)=>Z?B.createdAt-O.createdAt:O.createdAt-B.createdAt),L.slice(Q,W)}let N=F.length>0?Hg4(G.storage,$,F,{limit:H,offset:Q,asc:Z}):[];if(!A)return N;let D=N.concat(Po0(G.shards[Y],$));return D.sort((L,B)=>Z?L.createdAt-B.createdAt:B.createdAt-L.createdAt),D.slice(0,H)}let z=W+1,V=Ug4($,Y,K,G,z);return V.sort((A,F)=>Z?A.createdAt-F.createdAt:F.createdAt-A.createdAt),V.slice(Q,W)}function ko0($,Y,X){let G=l1($);return Y.shards[G].getDlq($,X)}function Xl($,Y,X){let G=l1($),J=Y.shards[G];if(X)return J.getDlqFiltered($,X);return J.getDlqEntries($)}function Gl($,Y){let X=l1($),G=Y.shards[X].getDlqEntries($),J=Y.shards[X].getDlqConfig($),Q=Date.now(),W={total:G.length,byReason:{["explicit_fail"]:0,["max_attempts_exceeded"]:0,["timeout"]:0,["stalled"]:0,["ttl_expired"]:0,["worker_lost"]:0,["unknown"]:0},byQueue:{[$]:G.length},pendingRetry:0,expired:0,oldestEntry:null,newestEntry:null};for(let Z of G){if(W.byReason[Z.reason]++,Z.nextRetryAt&&Z.nextRetryAt<=Q&&Z.retryCount<J.maxAutoRetries)W.pendingRetry++;if(Z.expiresAt&&Z.expiresAt<=Q)W.expired++;if(W.oldestEntry===null||Z.enteredAt<W.oldestEntry)W.oldestEntry=Z.enteredAt;if(W.newestEntry===null||Z.enteredAt>W.newestEntry)W.newestEntry=Z.enteredAt}return W}function Vg4($,Y,X){let G=l1($),J=X.shards[G],Q=Date.now(),W=J.removeFromDlq($,Y);if(!W)return null;X.storage?.deleteDlqEntry(Y);let Z=W.job;if(Z.attempts=0,Z.runAt=Q,Z.stallCount=0,Z.lastHeartbeat=Q,Z.timeline.length<qY)Z.timeline.push({state:"waiting",timestamp:Q});J.getQueue($).push(Z);let K=Z.runAt>Q;return J.incrementQueued(Z.id,K,Z.createdAt,$,Z.runAt),X.jobIndex.set(Z.id,{type:"queue",shardIdx:G,queueName:$}),X.storage?.insertJob(Z,!0),Z}function vo0($,Y,X){if(X)return Vg4($,X,Y)?1:0;let G=l1($),J=Y.shards[G],Q=J.getDlqEntries($),W=Q.length;J.clearDlq($),Y.storage?.clearDlqQueue($);let Z=Date.now();for(let K of Q){let H=K.job;if(H.attempts=0,H.runAt=Z,H.stallCount=0,H.lastHeartbeat=Z,H.timeline.length<qY)H.timeline.push({state:"waiting",timestamp:Z});J.getQueue($).push(H);let z=H.runAt>Z;J.incrementQueued(H.id,z,H.createdAt,$,H.runAt),Y.jobIndex.set(H.id,{type:"queue",shardIdx:G,queueName:$}),Y.storage?.insertJob(H,!0)}return W}function xo0($,Y,X){let G=l1($),J=Y.shards[G],Q=J.getDlqFiltered($,X),W=0,Z=Date.now();for(let K of Q){if(!J.removeFromDlq($,K.job.id))continue;Y.storage?.deleteDlqEntry(K.job.id);let z=K.job;if(z.attempts=0,z.runAt=Z,z.stallCount=0,z.lastHeartbeat=Z,z.timeline.length<qY)z.timeline.push({state:"waiting",timestamp:Z});J.getQueue($).push(z);let V=z.runAt>Z;J.incrementQueued(z.id,V,z.createdAt,$,z.runAt),Y.jobIndex.set(z.id,{type:"queue",shardIdx:G,queueName:$}),Y.storage?.insertJob(z,!0),W++}return W}function yo0($,Y){let X=l1($),G=Y.shards[X],J=G.getDlqConfig($);if(!J.autoRetry)return 0;let Q=Date.now(),W=G.getAutoRetryEntries($,Q),Z=0;for(let K of W){if(Ms0(K,J),!G.removeFromDlq($,K.job.id))continue;let z=K.job;if(z.attempts=0,z.runAt=Q,z.stallCount=0,z.lastHeartbeat=Q,z.timeline.length<qY)z.timeline.push({state:"waiting",timestamp:Q});G.getQueue($).push(z);let V=z.runAt>Q;G.incrementQueued(z.id,V,z.createdAt,$,z.runAt),Y.jobIndex.set(z.id,{type:"queue",shardIdx:X,queueName:$}),Y.storage?.insertJob(z,!0),Z++}return Z}function bo0($,Y){let X=l1($),G=Y.shards[X],J=G.getExpiredEntries($),Q=G.purgeExpired($);if(Y.storage&&J.length>0)for(let W of J)Y.storage.deleteDlqEntry(W.job.id);return Q}function _Q0($,Y){let X=l1($),G=Y.shards[X].clearDlq($);return Y.storage?.clearDlqQueue($),G}function ho0($,Y,X){let G=l1($);Y.shards[G].setDlqConfig($,X)}function fo0($,Y){let X=l1($);return Y.shards[X].getDlqConfig($)}function go0($,Y,X){if(X){if(!Y.completedJobs.has(X))return 0;let J=Y.storage?.getJob(X);if(J?.queue!==$)return 0;return So0(J,Y)}let G=0;for(let J of Y.completedJobs){let Q=Y.storage?.getJob(J);if(Q?.queue===$)G+=So0(Q,Y)}return G}function So0($,Y){if($.attempts=0,$.startedAt=null,$.completedAt=null,$.runAt=Date.now(),$.progress=0,$.timeline.length<qY)$.timeline.push({state:"waiting",timestamp:$.runAt});let X=l1($.queue),G=Y.shards[X];return G.getQueue($.queue).push($),G.incrementQueued($.id,!1,$.createdAt,$.queue,$.runAt),Y.jobIndex.set($.id,{type:"queue",shardIdx:X,queueName:$.queue}),Y.completedJobs.delete($.id),Y.jobResults.delete($.id),Y.storage?.updateForRetry($),G.notify(),1}function mo0($,Y,X,G="info"){if(!X.jobIndex.get($))return!1;let Q=X.jobLogs.get($)??[];if(Q.push(us0(Y,G)),Q.length>X.maxLogsPerJob)Q.splice(0,Q.length-X.maxLogsPerJob);return X.jobLogs.set($,Q),!0}function uo0($,Y){return Y.jobLogs.get($)??[]}function po0($,Y,X){if(X===void 0||X<=0)Y.jobLogs.delete($);else{let G=Y.jobLogs.get($);if(G&&G.length>X){let J=G.slice(-X);Y.jobLogs.set($,J)}}}function do0($,Y,X,G){let J=Y.getStats(),Q=X.getStats(),W=["# HELP bunqueue_jobs_waiting Number of jobs waiting in queue","# TYPE bunqueue_jobs_waiting gauge",`bunqueue_jobs_waiting ${$.waiting}`,"","# HELP bunqueue_jobs_prioritized Number of prioritized jobs (priority > 0)","# TYPE bunqueue_jobs_prioritized gauge",`bunqueue_jobs_prioritized ${$.prioritized}`,"","# HELP bunqueue_jobs_delayed Number of delayed jobs","# TYPE bunqueue_jobs_delayed gauge",`bunqueue_jobs_delayed ${$.delayed}`,"","# HELP bunqueue_jobs_active Number of jobs being processed","# TYPE bunqueue_jobs_active gauge",`bunqueue_jobs_active ${$.active}`,"","# HELP bunqueue_jobs_dlq Number of jobs in dead letter queue","# TYPE bunqueue_jobs_dlq gauge",`bunqueue_jobs_dlq ${$.dlq}`,"","# HELP bunqueue_jobs_completed Number of completed jobs","# TYPE bunqueue_jobs_completed gauge",`bunqueue_jobs_completed ${$.completed}`,"","# HELP bunqueue_jobs_pushed_total Total jobs pushed","# TYPE bunqueue_jobs_pushed_total counter",`bunqueue_jobs_pushed_total ${$.totalPushed}`,"","# HELP bunqueue_jobs_pulled_total Total jobs pulled","# TYPE bunqueue_jobs_pulled_total counter",`bunqueue_jobs_pulled_total ${$.totalPulled}`,"","# HELP bunqueue_jobs_completed_total Total jobs completed","# TYPE bunqueue_jobs_completed_total counter",`bunqueue_jobs_completed_total ${$.totalCompleted}`,"","# HELP bunqueue_jobs_failed_total Total jobs failed","# TYPE bunqueue_jobs_failed_total counter",`bunqueue_jobs_failed_total ${$.totalFailed}`,"","# HELP bunqueue_uptime_seconds Server uptime in seconds","# TYPE bunqueue_uptime_seconds gauge",`bunqueue_uptime_seconds ${Math.floor($.uptime/1000)}`,"","# HELP bunqueue_cron_jobs_total Total number of cron jobs","# TYPE bunqueue_cron_jobs_total gauge",`bunqueue_cron_jobs_total ${$.cronJobs}`,"","# HELP bunqueue_workers_total Total number of registered workers","# TYPE bunqueue_workers_total gauge",`bunqueue_workers_total ${J.total}`,"","# HELP bunqueue_workers_active Number of active workers","# TYPE bunqueue_workers_active gauge",`bunqueue_workers_active ${J.active}`,"","# HELP bunqueue_workers_processed_total Total jobs processed by workers","# TYPE bunqueue_workers_processed_total counter",`bunqueue_workers_processed_total ${J.totalProcessed}`,"","# HELP bunqueue_workers_failed_total Total jobs failed by workers","# TYPE bunqueue_workers_failed_total counter",`bunqueue_workers_failed_total ${J.totalFailed}`,"","# HELP bunqueue_webhooks_total Total number of webhooks","# TYPE bunqueue_webhooks_total gauge",`bunqueue_webhooks_total ${Q.total}`,"","# HELP bunqueue_webhooks_enabled Number of enabled webhooks","# TYPE bunqueue_webhooks_enabled gauge",`bunqueue_webhooks_enabled ${Q.enabled}`];if(G&&G.size>0){W.push(""),W.push("# HELP bunqueue_queue_jobs_waiting Number of waiting jobs per queue"),W.push("# TYPE bunqueue_queue_jobs_waiting gauge");for(let[K,H]of G)W.push(`bunqueue_queue_jobs_waiting{queue="${K}"} ${H.waiting}`);W.push(""),W.push("# HELP bunqueue_queue_jobs_prioritized Number of prioritized jobs per queue"),W.push("# TYPE bunqueue_queue_jobs_prioritized gauge");for(let[K,H]of G)W.push(`bunqueue_queue_jobs_prioritized{queue="${K}"} ${H.prioritized}`);W.push(""),W.push("# HELP bunqueue_queue_jobs_delayed Number of delayed jobs per queue"),W.push("# TYPE bunqueue_queue_jobs_delayed gauge");for(let[K,H]of G)W.push(`bunqueue_queue_jobs_delayed{queue="${K}"} ${H.delayed}`);W.push(""),W.push("# HELP bunqueue_queue_jobs_active Number of active jobs per queue"),W.push("# TYPE bunqueue_queue_jobs_active gauge");for(let[K,H]of G)W.push(`bunqueue_queue_jobs_active{queue="${K}"} ${H.active}`);W.push(""),W.push("# HELP bunqueue_queue_jobs_dlq Number of DLQ jobs per queue"),W.push("# TYPE bunqueue_queue_jobs_dlq gauge");for(let[K,H]of G)W.push(`bunqueue_queue_jobs_dlq{queue="${K}"} ${H.dlq}`)}let Z=b3.toPrometheus();if(Z)W.push(""),W.push(Z);return W.join(`
`)}class _R{cache=new Map;maxSize;onEvict;head=null;tail=null;constructor($,Y){this.maxSize=$,this.onEvict=Y}moveToFront($){if($===this.head)return;if($.prev)$.prev.next=$.next;if($.next)$.next.prev=$.prev;if($===this.tail)this.tail=$.prev;if($.prev=null,$.next=this.head,this.head)this.head.prev=$;this.head=$,this.tail??=$}removeNode($){if($.prev)$.prev.next=$.next;if($.next)$.next.prev=$.prev;if($===this.head)this.head=$.next;if($===this.tail)this.tail=$.prev}addToFront($){if($.prev=null,$.next=this.head,this.head)this.head.prev=$;this.head=$,this.tail??=$}get($){let Y=this.cache.get($);if(!Y)return;return this.moveToFront(Y),Y.value}set($,Y){let X=this.cache.get($);if(X)X.value=Y,this.moveToFront(X);else{if(this.cache.size>=this.maxSize&&this.tail){let J=this.tail;this.cache.delete(J.key),this.removeNode(J),this.onEvict?.(J.key,J.value)}let G={key:$,value:Y,prev:null,next:null};this.cache.set($,G),this.addToFront(G)}}has($){return this.cache.has($)}delete($){let Y=this.cache.get($);if(!Y)return!1;return this.removeNode(Y),this.cache.delete($)}clear(){this.cache.clear(),this.head=null,this.tail=null}get size(){return this.cache.size}*keys(){let $=this.tail;while($)yield $.key,$=$.prev}*values(){let $=this.tail;while($)yield $.value,$=$.prev}*entries(){let $=this.tail;while($)yield[$.key,$.value],$=$.prev}forEach($){let Y=this.tail;while(Y)$(Y.value,Y.key),Y=Y.prev}[Symbol.iterator](){return this.entries()}}class Jl{cache=new Set;maxSize;onEvict;evictBatchSize;constructor($,Y){this.maxSize=$,this.onEvict=Y,this.evictBatchSize=Math.max(1,Math.floor($*0.1))}add($){if(this.cache.has($))return;if(this.cache.size>=this.maxSize)this.evictBatch();this.cache.add($)}evictBatch(){let $=[],Y=this.cache.values();for(let X=0;X<this.evictBatchSize;X++){let{value:G,done:J}=Y.next();if(J)break;$.push(G)}for(let X of $)this.cache.delete(X),this.onEvict?.(X)}has($){return this.cache.has($)}delete($){return this.cache.delete($)}clear(){this.cache.clear()}get size(){return this.cache.size}values(){return this.cache.values()}[Symbol.iterator](){return this.cache[Symbol.iterator]()}}class Ql{cache=new Map;maxSize;onEvict;evictBatchSize;constructor($,Y){this.maxSize=$,this.onEvict=Y,this.evictBatchSize=Math.max(1,Math.floor($*0.1))}get($){return this.cache.get($)}set($,Y){if(this.cache.has($)){this.cache.set($,Y);return}if(this.cache.size>=this.maxSize)this.evictBatch();this.cache.set($,Y)}evictBatch(){let $=[],Y=this.cache.entries();for(let X=0;X<this.evictBatchSize;X++){let{value:G,done:J}=Y.next();if(J)break;$.push({key:G[0],value:G[1]})}for(let{key:X,value:G}of $)this.cache.delete(X),this.onEvict?.(X,G)}has($){return this.cache.has($)}delete($){return this.cache.delete($)}clear(){this.cache.clear()}get size(){return this.cache.size}keys(){return this.cache.keys()}values(){return this.cache.values()}entries(){return this.cache.entries()}forEach($){this.cache.forEach($)}[Symbol.iterator](){return this.cache[Symbol.iterator]()}}class Wl{cache=new Map;ttlMs;cleanupInterval=null;expiryHeap=new x3(($,Y)=>$.expiresAt-Y.expiresAt);staleCount=0;static COMPACTION_THRESHOLD=0.5;static MIN_COMPACTION_SIZE=100;constructor($,Y=60000){this.ttlMs=$,this.startCleanup(Y)}startCleanup($){this.cleanupInterval=setInterval(()=>{this.cleanup()},$)}cleanup(){let $=Date.now();while(!this.expiryHeap.isEmpty){let Y=this.expiryHeap.peek();if(!Y||Y.expiresAt>$)break;this.expiryHeap.pop();let{key:X,expiresAt:G}=Y;if(this.cache.get(X)?.expiresAt===G)this.cache.delete(X);else if(this.staleCount>0)this.staleCount--}this.maybeCompact()}maybeCompact(){let $=this.expiryHeap.size;if($>=Wl.MIN_COMPACTION_SIZE&&this.staleCount/$>Wl.COMPACTION_THRESHOLD)this.rebuildHeap()}rebuildHeap(){this.expiryHeap.clear(),this.staleCount=0;for(let[$,Y]of this.cache)this.expiryHeap.push({expiresAt:Y.expiresAt,key:$})}get($){let Y=this.cache.get($);if(!Y)return;if(Y.expiresAt<=Date.now()){this.cache.delete($),this.staleCount++;return}return Y.value}set($,Y,X){let G=Date.now()+(X??this.ttlMs);if(this.cache.has($))this.staleCount++;this.cache.set($,{value:Y,expiresAt:G}),this.expiryHeap.push({expiresAt:G,key:$})}has($){return this.get($)!==void 0}delete($){let Y=this.cache.delete($);if(Y)this.staleCount++;return Y}clear(){this.cache.clear(),this.expiryHeap.clear(),this.staleCount=0}stop(){if(this.cleanupInterval)clearInterval(this.cleanupInterval),this.cleanupInterval=null}get size(){return this.cache.size}get heapSize(){return this.expiryHeap.size}get staleEntryCount(){return this.staleCount}}var co0={maxCompletedJobs:50000,maxJobResults:1e4,maxJobLogs:1e4,maxCustomIds:50000,maxWaitingDeps:1e4,cleanupIntervalMs:1e4,jobTimeoutCheckMs:5000,dependencyCheckMs:30000,stallCheckMs:5000,dlqMaintenanceMs:60000};function RS($,Y,X,G=CN){if(X.jobIndex.get($)?.type!=="processing")return null;if(X.jobLocks.has($))return null;let Q=Ls0($,Y,G);return X.jobLocks.set($,Q),Q.token}function kN($,Y,X){let G=X.jobLocks.get($);if(!G)return!1;if(G.token!==Y)return!1;if(DS(G))return!1;return!0}function vN($,Y,X,G){let J=X.jobLocks.get($);if(!J)return!1;if(J.token!==Y)return!1;if(DS(J))return X.jobLocks.delete($),!1;Bs0(J,G);let Q=X.jobIndex.get($);if(Q?.type==="processing"){let W=X.processingShards[Q.shardIdx].get($);if(W)W.lastHeartbeat=Date.now()}return!0}function TQ0($,Y){let X=[];for(let G of $)if(vN(G.id,G.token,Y,G.ttl))X.push(String(G.id));return X}function GZ($,Y,X){let G=Y.jobLocks.get($);if(!G)return!0;if(X&&G.token!==X)return!1;return Y.jobLocks.delete($),!0}function Zl($,Y){return Y.jobLocks.get($)??null}function CQ0($,Y,X){let G=X.clientJobs.get($);if(!G)G=new Set,X.clientJobs.set($,G);G.add(Y)}function SQ0($,Y,X){if(!$)return;let G=X.clientJobs.get($);if(G){if(G.delete(Y),G.size===0)X.clientJobs.delete($)}}async function kQ0($,Y){let X=Y.clientJobs.get($);if(!X||X.size===0)return Y.clientJobs.delete($),0;let G=[];for(let Z of X){let K=Y.jobIndex.get(Z);if(K?.type!=="processing")continue;let H=K.shardIdx,z=Y.processingShards[H].get(Z);if(!z)continue;G.push({jobId:Z,procIdx:H,queueShardIdx:l1(z.queue)})}if(G.length===0)return Y.clientJobs.delete($),0;let J=new Map;for(let Z of G){let K=J.get(Z.procIdx);if(!K)K=[],J.set(Z.procIdx,K);K.push(Z)}let Q=0,W=Date.now();try{for(let[Z,K]of J){let H=new Map;for(let z of K){let V=H.get(z.queueShardIdx);if(!V)V=[],H.set(z.queueShardIdx,V);V.push(z)}for(let[z,V]of H)await v4(Y.shardLocks[z],async()=>{await v4(Y.processingLocks[Z],()=>{for(let{jobId:A}of V){let F=Y.processingShards[Z].get(A);if(!F)continue;Q+=Fg4({jobId:A,job:F,procIdx:Z,queueShardIdx:z,ctx:Y,now:W})}})})}return Q}finally{Y.clientJobs.delete($)}}function vQ0($,Y){let X=Y.clientJobs.get($);if(!X||X.size===0)return Y.clientJobs.delete($),0;let G=0;for(let J of X){Y.jobLocks.delete(J);let Q=Y.jobIndex.get(J);if(Q?.type!=="processing")continue;let W=Y.processingShards[Q.shardIdx].get(J);if(!W)continue;W.lastHeartbeat=0,W.startedAt=0,G++}return Y.clientJobs.delete($),G}function Fg4($){let{jobId:Y,job:X,procIdx:G,queueShardIdx:J,ctx:Q,now:W}=$,Z=Q.shards[J];if(Q.processingShards[G].delete(Y),Q.jobLocks.delete(Y),Z.releaseJobResources(X.queue,X.uniqueKey,X.groupId),X.uniqueKey?.startsWith("cron:"))return Q.jobIndex.delete(Y),Q.storage?.deleteJob(Y),1;X.startedAt=null,X.lastHeartbeat=W,Z.getQueue(X.queue).push(X);let K=X.runAt>W;return Z.incrementQueued(Y,K,X.createdAt,X.queue,X.runAt),Q.jobIndex.set(Y,{type:"queue",shardIdx:J,queueName:X.queue}),1}async function lo0($){let Y=Date.now(),X=[];for(let[J,Q]of $.jobLocks)if(DS(Q,Y)){let W=x5(J),Z=$.processingShards[W].get(J);if(Z){let K=l1(Z.queue);X.push({jobId:J,lock:Q,procIdx:W,shardIdx:K,job:Z})}else $.jobLocks.delete(J)}if(X.length===0)return;let G=new Map;for(let J of X){let Q=G.get(J.shardIdx);if(!Q)Q=new Map,G.set(J.shardIdx,Q);let W=Q.get(J.procIdx);if(!W)W=[],Q.set(J.procIdx,W);W.push(J)}for(let[J,Q]of G)await v4($.shardLocks[J],async()=>{for(let[W,Z]of Q)await v4($.processingLocks[W],async()=>{for(let{jobId:K,lock:H,job:z}of Z)Dg4(K,H,z,J,W,$,Y)})})}function Dg4($,Y,X,G,J,Q,W){let Z=Q.shards[G],K=Z.getQueue(X.queue);if(Q.processingShards[J].delete($),X.uniqueKey?.startsWith("cron:")){Z.releaseJobResources(X.queue,X.uniqueKey,X.groupId),Q.jobIndex.delete($),Q.storage?.deleteJob($),Q.jobLocks.delete($);return}X.attempts++,X.startedAt=null,X.lastHeartbeat=W,X.stallCount++;let H=Z.getStallConfig(X.queue);if(H.maxStalls>0&&X.stallCount>=H.maxStalls)Ng4({jobId:$,job:X,lock:Y,shard:Z,ctx:Q,now:W});else Lg4({jobId:$,job:X,lock:Y,queue:K,idx:G,ctx:Q,now:W});Q.jobLocks.delete($),Q.dashboardEmit?.("job:lock-expired",{jobId:String($),queue:X.queue,renewalCount:Y.renewalCount})}function Ng4($){let{jobId:Y,job:X,lock:G,shard:J,ctx:Q,now:W}=$;J.addToDlq(X,"stalled",`Lock expired after ${G.renewalCount} renewals`),Q.jobIndex.set(Y,{type:"dlq",queueName:X.queue}),Q.eventsManager.broadcast({eventType:"failed",jobId:Y,queue:X.queue,timestamp:W,error:"Lock expired (max stalls reached)"})}function Lg4($){let{jobId:Y,job:X,queue:G,idx:J,ctx:Q,now:W}=$,Z=Q.shards[J];G.push(X);let K=X.runAt>W;Z.incrementQueued(Y,K,X.createdAt,X.queue,X.runAt),Q.jobIndex.set(Y,{type:"queue",shardIdx:J,queueName:X.queue}),Z.notify(),Q.eventsManager.broadcast({eventType:"stalled",jobId:Y,queue:X.queue,timestamp:W})}async function io0($){let Y=Date.now(),X=1800000;for(let G=0;G<M7;G++)$.shards[G].refreshDelayedCount(Y);for(let G=0;G<M7;G++)for(let J of $.shards[G].queues.values())if(J.needsCompaction(0.2))J.compact();await Og4($,Y,1800000),Eg4($,Y),Mg4($),Rg4($),await qg4($),Ig4($),_g4($)}async function Og4($,Y,X){for(let G=0;G<M7;G++){let J=[];for(let[Q,W]of $.processingShards[G])if(W.startedAt&&Y-W.startedAt>X)J.push(Q);if(J.length===0)continue;await v4($.processingLocks[G],()=>{let Q=0;for(let W of J)if($.processingShards[G].get(W))$.processingShards[G].delete(W),$.jobIndex.delete(W),Q++;if(Q>0)$.dashboardEmit?.("cleanup:orphans-removed",{count:Q})})}}function Eg4($,Y){for(let G=0;G<M7;G++){let J=$.shards[G],Q=[];for(let[W,Z]of J.waitingDeps)if(Y-Z.createdAt>3600000)Q.push(Z);for(let W of Q)J.waitingDeps.delete(W.id),J.unregisterDependencies(W.id,W.dependsOn),$.jobIndex.delete(W.id);if(Q.length>0)$.dashboardEmit?.("cleanup:stale-deps-removed",{count:Q.length})}}function Mg4($){for(let Y=0;Y<M7;Y++){let X=$.shards[Y];X.cleanExpiredUniqueKeys();for(let[G,J]of X.uniqueKeys)if(J.size>1000){let Q=Math.floor(J.size/2),W=J.keys();for(let Z=0;Z<Q;Z++){let{value:K,done:H}=W.next();if(H)break;J.delete(K)}}for(let[G,J]of X.activeGroups)if(J.size>1000){let Q=Math.floor(J.size/2),W=J.values();for(let Z=0;Z<Q;Z++){let{value:K,done:H}=W.next();if(H)break;J.delete(K)}}}}function Rg4($){for(let Y of $.stalledCandidates)if($.jobIndex.get(Y)?.type!=="processing")$.stalledCandidates.delete(Y)}async function qg4($){if($.jobIndex.size<=1e5)return;let Y=new Map,X=new Map;for(let[G,J]of $.jobIndex)if(J.type==="processing"){let Q=x5(G),W=Y.get(Q);if(!W)W=[],Y.set(Q,W);W.push(G)}else if(J.type==="queue"){let Q=X.get(J.shardIdx);if(!Q)Q=[],X.set(J.shardIdx,Q);Q.push({jobId:G,queueName:J.queueName})}for(let[G,J]of Y)await v4($.processingLocks[G],()=>{for(let Q of J)if(!$.processingShards[G].has(Q))$.jobIndex.delete(Q)});for(let[G,J]of X)await v4($.shardLocks[G],()=>{let Q=$.shards[G];for(let{jobId:W,queueName:Z}of J)if(!Q.getQueue(Z).has(W))$.jobIndex.delete(W)})}function Ig4($){for(let Y of $.jobLocks.keys())if($.jobIndex.get(Y)?.type!=="processing")$.jobLocks.delete(Y)}function Pg4($,Y){for(let X=0;X<M7;X++)for(let G of $.processingShards[X].values())if(G.queue===Y)return!0;return!1}function wg4($,Y){for(let X=0;X<M7;X++)for(let G of $.shards[X].waitingDeps.values())if(G.queue===Y)return!0;return!1}function _g4($){for(let Y=0;Y<M7;Y++){let X=$.shards[Y],G=[];for(let[J,Q]of X.queues){let W=X.dlq.get(J);if(Q.size===0&&(!W||W.length===0)&&!Pg4($,J)&&!wg4($,J))G.push(J)}for(let J of G)X.queues.delete(J),X.dlq.delete(J),X.uniqueKeys.delete(J),X.queueState.delete(J),X.activeGroups.delete(J),X.clearQueueLimiters(J),X.stallConfig.delete(J),X.dlqConfig.delete(J),$.dashboardEmit?.("queue:removed",{queue:J}),$.unregisterQueueName(J);X.cleanOrphanedTemporalEntries()}}function no0($){let Y=Date.now(),X=[];for(let G of $.stalledCandidates){let J=x5(G),Q=$.processingShards[J].get(G);if(!Q){$.stalledCandidates.delete(G);continue}let W=$.shards[l1(Q.queue)].getStallConfig(Q.queue);if(!W.enabled){$.stalledCandidates.delete(G);continue}let Z=iJ0(Q,W,Y);if(Z!=="keep")X.push({job:Q,action:Z});$.stalledCandidates.delete(G)}for(let G=0;G<M7;G++){let J=$.processingShards[G];for(let[Q,W]of J){let Z=$.shards[l1(W.queue)].getStallConfig(W.queue);if(!Z.enabled)continue;if(iJ0(W,Z,Y)!=="keep")$.stalledCandidates.add(Q)}}for(let{job:G,action:J}of X)jg4(G,J,$).catch((Q)=>{dV.error("Failed to handle stalled job",{jobId:String(G.id),error:String(Q)})})}async function jg4($,Y,X){let G=l1($.queue),J=x5($.id),Q=!1;if(await v4(X.shardLocks[G],async()=>{await v4(X.processingLocks[J],()=>{if(!X.processingShards[J].has($.id))return;let W=X.shards[G];if(Y==="move_to_dlq")Tg4($,X,W,J,G);else Cg4($,X,W,J,G);Q=!0})}),Q)X.dashboardEmit?.("job:stalled",{jobId:String($.id),queue:$.queue,stallCount:$.stallCount+1,action:Y}),X.eventsManager.broadcast({eventType:"stalled",queue:$.queue,jobId:$.id,timestamp:Date.now(),data:{stallCount:$.stallCount+1,action:Y}}),X.webhookManager.trigger("stalled",String($.id),$.queue,{data:{stallCount:$.stallCount+1,action:Y}})}function Tg4($,Y,X,G,J){if(Y.processingShards[G].delete($.id),X.releaseJobResources($.queue,$.uniqueKey,$.groupId),$.uniqueKey?.startsWith("cron:")){Y.jobIndex.delete($.id),Y.storage?.deleteJob($.id);return}let Q=X.addToDlq($,"stalled",`Job stalled ${$.stallCount+1} times`);Y.jobIndex.set($.id,{type:"dlq",queueName:$.queue}),Y.storage?.saveDlqEntry(Q),Y.storage?.deleteJob($.id)}function Cg4($,Y,X,G,J){if($.uniqueKey?.startsWith("cron:")){Y.processingShards[G].delete($.id),X.releaseJobResources($.queue,$.uniqueKey,$.groupId),Y.jobIndex.delete($.id),Y.storage?.deleteJob($.id);return}Rs0($),$.attempts++,$.startedAt=null;let Q=Date.now();if($.runAt=Q+qR($),$.lastHeartbeat=Q,$.timeline.length<qY)$.timeline.push({state:"failed",timestamp:Q,error:"stalled",attempt:$.attempts}),$.timeline.push({state:"waiting",timestamp:Q,attempt:$.attempts+1});Y.processingShards[G].delete($.id),X.releaseJobResources($.queue,$.uniqueKey,$.groupId),X.getQueue($.queue).push($);let W=$.runAt>Date.now();X.incrementQueued($.id,W,$.createdAt,$.queue,$.runAt),Y.jobIndex.set($.id,{type:"queue",shardIdx:J,queueName:$.queue}),Y.storage?.updateForRetry($)}async function Kl($){if($.pendingDepChecks.size===0)return;let Y=Array.from($.pendingDepChecks);$.pendingDepChecks.clear();let X=new Map;for(let G of Y)for(let J=0;J<M7;J++){let Q=$.shards[J].getJobsWaitingFor(G);if(Q&&Q.size>0){let W=X.get(J);if(!W)W=new Set,X.set(J,W);for(let Z of Q)W.add(Z)}}await Promise.all(Array.from(X.entries()).map(async([G,J])=>{await v4($.shardLocks[G],()=>{let Q=$.shards[G],W=[];for(let Z of J){let K=Q.waitingDeps.get(Z);if(K?.dependsOn.every((H)=>$.completedJobs.has(H)))W.push(K)}if(W.length>0)Sg4(W,Q,$,G)})}))}function Sg4($,Y,X,G){let J=Date.now();for(let Q of $)if(Y.waitingDeps.has(Q.id)){Y.waitingDeps.delete(Q.id),Y.unregisterDependencies(Q.id,Q.dependsOn),Y.getQueue(Q.queue).push(Q);let W=Q.runAt>J;if(Y.incrementQueued(Q.id,W,Q.createdAt,Q.queue,Q.runAt),X.jobIndex.set(Q.id,{type:"queue",shardIdx:G,queueName:Q.queue}),Q.timeline.length<qY){let Z=W?"delayed":Q.priority>0?"prioritized":"waiting";Q.timeline.push({state:Z,timestamp:J})}}if($.length>0){Y.notify();for(let Q of $)X.dashboardEmit?.("job:dependencies-resolved",{jobId:String(Q.id),queue:Q.queue})}}var ro0=5,ao0={cleanup:{consecutiveFailures:0},dependency:{consecutiveFailures:0},lockExpiration:{consecutiveFailures:0}};function jR($,Y){let X=ao0[$];if(!X)return;if(X.consecutiveFailures++,X.lastError=String(Y),X.lastFailureAt=Date.now(),dV.error(`${$} task failed`,{error:X.lastError,consecutiveFailures:X.consecutiveFailures,willRetry:X.consecutiveFailures<ro0}),X.consecutiveFailures>=ro0)dV.error(`CRITICAL: Background ${$} repeatedly failing`,{consecutiveFailures:X.consecutiveFailures,lastError:X.lastError})}function TR($){let Y=ao0[$];if(Y)Y.consecutiveFailures=0}function so0($,Y){let X=setInterval(()=>{io0($).then(()=>{TR("cleanup"),ls0({queueNamesCache:$.queueNamesCache,shards:$.shards,processingShards:$.processingShards,workerManager:$.workerManager,storage:$.storage,dashboardEmit:$.dashboardEmit,state:$.monitoringState})}).catch((K)=>{jR("cleanup",K)})},$.config.cleanupIntervalMs),G=setInterval(()=>{vg4($)},$.config.jobTimeoutCheckMs),J=setInterval(()=>{if($.pendingDepChecks.size===0)return;Kl($).then(()=>{TR("dependency")}).catch((K)=>{jR("dependency",K)})},$.config.dependencyCheckMs),Q=setInterval(()=>{no0($)},$.config.stallCheckMs),W=setInterval(()=>{xg4($)},$.config.dlqMaintenanceMs),Z=setInterval(()=>{lo0(kg4($)).then(()=>{TR("lockExpiration")}).catch((K)=>{jR("lockExpiration",K)})},$.config.stallCheckMs);return Y.start(),{cleanupInterval:X,timeoutInterval:G,depCheckInterval:J,stallCheckInterval:Q,dlqMaintenanceInterval:W,lockCheckInterval:Z,cronScheduler:Y}}function oo0($){clearInterval($.cleanupInterval),clearInterval($.timeoutInterval),clearInterval($.depCheckInterval),clearInterval($.stallCheckInterval),clearInterval($.dlqMaintenanceInterval),clearInterval($.lockCheckInterval),$.cronScheduler.stop()}function kg4($){return{jobIndex:$.jobIndex,jobLocks:$.jobLocks,clientJobs:$.clientJobs,processingShards:$.processingShards,processingLocks:$.processingLocks,shards:$.shards,shardLocks:$.shardLocks,eventsManager:$.eventsManager,dashboardEmit:$.dashboardEmit}}function vg4($){let Y=Date.now();for(let X of $.processingShards)for(let[G,J]of X)if(J.timeout&&J.startedAt&&Y-J.startedAt>J.timeout)$.dashboardEmit?.("job:timeout",{jobId:String(G),queue:J.queue,timeout:J.timeout}),$.fail(G,"Job timeout exceeded").catch((Q)=>{dV.error("Failed to mark timed out job as failed",{jobId:String(G),error:String(Q)})})}function xg4($){let Y={shards:$.shards,jobIndex:$.jobIndex,storage:$.storage};for(let X of $.queueNamesCache)try{let G=yo0(X,Y);if(G>0)$.dashboardEmit?.("dlq:auto-retried",{queue:X,count:G});let J=bo0(X,Y);if(J>0)$.dashboardEmit?.("dlq:expired",{queue:X,count:J})}catch(G){dV.error("DLQ maintenance failed",{queue:X,error:String(G)})}}var qS=1e4;function to0($){if(!$.storage)return;let Y=$.storage.loadCompletedJobIds(),X=$.storage.loadDlqJobIds(),G=Date.now(),J=0;while(!0){let z=$.storage.loadActiveJobs(qS,J);if(z.length===0)break;for(let V of z){let A=l1(V.queue),F=$.shards[A],N=F.getStallConfig(V.queue);if(V.uniqueKey?.startsWith("cron:")){$.storage.deleteJob(V.id),$.registerQueueName(V.queue);continue}if(X.has(V.id)){$.storage.deleteJob(V.id),$.registerQueueName(V.queue);continue}V.stallCount=(V.stallCount||0)+1,V.attempts++,V.startedAt=null,V.lastHeartbeat=G;let D=N.maxStalls??3;if(V.stallCount>=D){let L=F.addToDlq(V,"stalled",`Job stalled ${V.stallCount} times (recovered at startup)`);$.jobIndex.set(V.id,{type:"dlq",queueName:V.queue}),$.storage.saveDlqEntry(L),$.storage.deleteJob(V.id)}else{V.runAt=G+qR(V),F.getQueue(V.queue).push(V);let L=V.runAt>G;F.incrementQueued(V.id,L,V.createdAt,V.queue,V.runAt),$.jobIndex.set(V.id,{type:"queue",shardIdx:A,queueName:V.queue}),$.storage.updateForRetry(V)}$.registerQueueName(V.queue)}if(J+=z.length,z.length<qS)break}let Q=0;while(!0){let z=$.storage.loadPendingJobs(qS,Q);if(z.length===0)break;for(let V of z){let A=l1(V.queue),F=$.shards[A];if(V.dependsOn&&V.dependsOn.length>0&&!V.dependsOn.every((L)=>$.completedJobs.has(L)||Y.has(L)))F.waitingDeps.set(V.id,V),F.registerDependencies(V.id,V.dependsOn);else{F.getQueue(V.queue).push(V);let L=V.runAt>G;F.incrementQueued(V.id,L,V.createdAt,V.queue,V.runAt)}if($.jobIndex.set(V.id,{type:"queue",shardIdx:A,queueName:V.queue}),V.customId)$.customIdMap.set(V.customId,V.id);if(V.uniqueKey)F.registerUniqueKeyWithTtl(V.queue,V.uniqueKey,V.id,V.deduplicationTtl??void 0);$.registerQueueName(V.queue)}if(Q+=z.length,z.length<qS)break}let W=$.storage.loadDlq();for(let[z,V]of W){let A=l1(z),F=$.shards[A];for(let N of V)F.restoreDlqEntry(z,N),$.jobIndex.set(N.job.id,{type:"dlq",queueName:z});$.registerQueueName(z)}let Z=$.config.maxCompletedJobs,K=0,H=0;while(K<Z){let z=Z-K,V=Math.min(qS,z),A=$.storage.loadCompletedJobs(V,H);if(A.length===0)break;for(let F of A)$.jobIndex.set(F.id,{type:"completed",queueName:F.queue}),$.completedJobs.add(F.id),$.completedJobsData.set(F.id,F),$.registerQueueName(F.queue);if(K+=A.length,H+=A.length,A.length<V)break}}function eo0($,Y){let X=0,G=0,J=0,Q=0,W=0,Z=0,K=Date.now();for(let z=0;z<M7;z++){let V=$.shards[z].getStats();J+=V.delayedJobs,W+=V.dlqJobs,Q+=$.processingShards[z].size,Z+=$.shards[z].waitingChildren.size;for(let A of $.shards[z].queues.values())for(let F of A.values())if(F.runAt<=K)if(F.priority>0)G++;else X++}let H=Y.getStats();return{waiting:X,prioritized:G,delayed:J,active:Q,dlq:W,completed:$.completedJobs.size,"waiting-children":Z,totalPushed:$.metrics.totalPushed.value,totalPulled:$.metrics.totalPulled.value,totalCompleted:$.metrics.totalCompleted.value,totalFailed:$.metrics.totalFailed.value,uptime:Date.now()-$.startTime,cronJobs:H.total,cronPending:H.pending}}function $t0($){let Y=0,X=0,G=0,J=0,Q=0;for(let Z=0;Z<M7;Z++){Y+=$.processingShards[Z].size;let K=$.shards[Z].getStats();X+=K.queuedJobs,G+=$.shards[Z].waitingDeps.size;let H=$.shards[Z].getInternalSizes();J+=H.temporalIndex,Q+=H.delayedHeap}let W=0;for(let Z of $.clientJobs.values())W+=Z.size;return{jobIndex:$.jobIndex.size,completedJobs:$.completedJobs.size,jobResults:$.jobResults.size,jobLogs:$.jobLogs.size,customIdMap:$.customIdMap.size,jobLocks:$.jobLocks.size,clientJobs:$.clientJobs.size,clientJobsTotal:W,pendingDepChecks:$.pendingDepChecks.size,stalledCandidates:$.stalledCandidates.size,processingTotal:Y,queuedTotal:X,waitingDepsTotal:G,temporalIndexTotal:J,delayedHeapTotal:Q}}function Yt0($,Y){let X=new Map,G=Date.now();for(let J of Y){let Q=l1(J),W=$.shards[Q],Z=W.queues.get(J),K=0,H=0,z=0;if(Z)for(let A of Z.values())if(A.runAt>G)z++;else if(A.priority>0)H++;else K++;let V=W.getDlqCount(J);X.set(J,{waiting:K,prioritized:H,delayed:z,active:0,dlq:V})}for(let J=0;J<M7;J++)for(let Q of $.processingShards[J].values()){let W=X.get(Q.queue);if(W)W.active++}return X}function xQ0($,Y){let X=l1($),G=Y.shards[X],J=G.queues.get($),Q=Date.now(),W=0,Z=0,K=0;if(J)for(let L of J.values())if(L.runAt>Q)K++;else if(L.priority>0)Z++;else W++;let H=0;for(let L of Y.processingShards)for(let B of L.values())if(B.queue===$)H++;let z=0;for(let[L,B]of Y.jobIndex)if(B.type==="completed"&&B.queueName===$&&Y.completedJobs.has(L))z++;let V=G.getDlq($).length,A=0;for(let L of G.waitingChildren.values())if(L.queue===$)A++;let F=Y.perQueueMetrics?.get($),N=Number(F?.totalCompleted??0n),D=Number(F?.totalFailed??0n);return{waiting:W,prioritized:Z,delayed:K,active:H,completed:z,failed:V,"waiting-children":A,totalCompleted:N,totalFailed:D}}function Xt0($){for(let Y=0;Y<M7;Y++)for(let X of $.shards[Y].queues.values())if(X.needsCompaction(0.1))X.compact();for(let[Y,X]of $.clientJobs)if(X.size===0)$.clientJobs.delete(Y);for(let Y of $.jobLocks.keys())if($.jobIndex.get(Y)?.type!=="processing")$.jobLocks.delete(Y)}class yQ0{deps;callbacks;constructor($,Y){this.deps=$,this.callbacks=Y}getLockContext(){return{jobIndex:this.deps.jobIndex,jobLocks:this.deps.jobLocks,clientJobs:this.deps.clientJobs,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,shards:this.deps.shards,shardLocks:this.deps.shardLocks,eventsManager:this.deps.eventsManager,storage:this.deps.storage}}getBackgroundContext(){return{config:this.deps.config,storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,jobIndex:this.deps.jobIndex,completedJobs:this.deps.completedJobs,jobResults:this.deps.jobResults,customIdMap:this.deps.customIdMap,jobLogs:this.deps.jobLogs,jobLocks:this.deps.jobLocks,clientJobs:this.deps.clientJobs,stalledCandidates:this.deps.stalledCandidates,pendingDepChecks:this.deps.pendingDepChecks,queueNamesCache:this.deps.queueNamesCache,eventsManager:this.deps.eventsManager,webhookManager:this.deps.webhookManager,metrics:this.deps.metrics,startTime:this.deps.startTime,perQueueMetrics:this.deps.perQueueMetrics,fail:this.callbacks.fail,registerQueueName:this.callbacks.registerQueueName,unregisterQueueName:this.callbacks.unregisterQueueName,dashboardEmit:this.callbacks.emitDashboardEvent,workerManager:this.deps.workerManager,monitoringState:this.deps.monitoringState,completedJobsData:this.deps.completedJobsData}}getStatsContext(){return{shards:this.deps.shards,processingShards:this.deps.processingShards,completedJobs:this.deps.completedJobs,jobIndex:this.deps.jobIndex,jobResults:this.deps.jobResults,jobLogs:this.deps.jobLogs,customIdMap:this.deps.customIdMap,jobLocks:this.deps.jobLocks,clientJobs:this.deps.clientJobs,pendingDepChecks:this.deps.pendingDepChecks,stalledCandidates:this.deps.stalledCandidates,metrics:this.deps.metrics,startTime:this.deps.startTime,perQueueMetrics:this.deps.perQueueMetrics}}getPushContext(){return{storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,completedJobs:this.deps.completedJobs,customIdMap:this.deps.customIdMap,jobIndex:this.deps.jobIndex,totalPushed:this.deps.metrics.totalPushed,broadcast:this.deps.eventsManager.broadcast.bind(this.deps.eventsManager),dashboardEmit:this.callbacks.emitDashboardEvent}}getPullContext(){return{storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,jobIndex:this.deps.jobIndex,totalPulled:this.deps.metrics.totalPulled,broadcast:this.deps.eventsManager.broadcast.bind(this.deps.eventsManager),dashboardEmit:this.callbacks.emitDashboardEvent}}getAckContext(){return{storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,completedJobs:this.deps.completedJobs,completedJobsData:this.deps.completedJobsData,jobResults:this.deps.jobResults,jobIndex:this.deps.jobIndex,customIdMap:this.deps.customIdMap,totalCompleted:this.deps.metrics.totalCompleted,totalFailed:this.deps.metrics.totalFailed,perQueueMetrics:this.deps.perQueueMetrics,broadcast:this.deps.eventsManager.broadcast.bind(this.deps.eventsManager),onJobCompleted:this.callbacks.onJobCompleted,onJobsCompleted:this.callbacks.onJobsCompleted,needsBroadcast:this.deps.eventsManager.needsBroadcast.bind(this.deps.eventsManager),hasPendingDeps:this.callbacks.hasPendingDeps,onRepeat:this.callbacks.onRepeat,emitDashboardEvent:this.callbacks.emitDashboardEvent,onChildTerminalFailure:this.callbacks.onChildTerminalFailure,onChildDependencyOption:this.callbacks.onChildDependencyOption}}getJobMgmtContext(){return{storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,jobIndex:this.deps.jobIndex,webhookManager:this.deps.webhookManager,eventsManager:this.deps.eventsManager,repeatChain:this.deps.repeatChain}}getQueryContext(){return{storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,jobIndex:this.deps.jobIndex,completedJobs:this.deps.completedJobs,completedJobsData:this.deps.completedJobsData,jobResults:this.deps.jobResults,customIdMap:this.deps.customIdMap}}getDlqContext(){return{shards:this.deps.shards,jobIndex:this.deps.jobIndex,storage:this.deps.storage}}getRetryCompletedContext(){return{shards:this.deps.shards,jobIndex:this.deps.jobIndex,storage:this.deps.storage,completedJobs:this.deps.completedJobs,jobResults:this.deps.jobResults}}getLogsContext(){return{jobIndex:this.deps.jobIndex,jobLogs:this.deps.jobLogs,maxLogsPerJob:this.deps.maxLogsPerJob}}getQueueControlContext(){return{shards:this.deps.shards,jobIndex:this.deps.jobIndex,processingShards:this.deps.processingShards,completedJobs:this.deps.completedJobs,completedJobsData:this.deps.completedJobsData,jobResults:this.deps.jobResults,jobLogs:this.deps.jobLogs,storage:this.deps.storage}}}class bQ0{config;storage;shards=[];shardLocks=[];processingShards=[];processingLocks=[];jobIndex=new Map;completedJobs;completedJobsData;jobResults;customIdMap;jobLogs;pendingDepChecks=new Set;stalledCandidates=new Set;depFlushScheduled=!1;depFlushRunning=!1;jobLocks=new Map;clientJobs=new Map;repeatChain=new Map;failedChildrenValues=new Map;ignoredChildrenFailures=new Map;cronScheduler;webhookManager;workerManager;eventsManager;dashboardEmit=null;recoveryStats=null;maxLogsPerJob=100;metrics={totalPushed:{value:0n},totalPulled:{value:0n},totalCompleted:{value:0n},totalFailed:{value:0n}};perQueueMetrics=new Map;startTime=Date.now();backgroundTaskHandles;queueNamesCache=new Set;monitoringState=cs0();contextFactory;constructor($={}){this.config={...co0,...$},this.storage=$.dataPath?new dc({path:$.dataPath}):null,this.completedJobsData=new Ql(this.config.maxCompletedJobs),this.completedJobs=new Jl(this.config.maxCompletedJobs,(Y)=>{this.jobIndex.delete(Y),this.completedJobsData.delete(Y)}),this.jobResults=new _R(this.config.maxJobResults),this.customIdMap=new _R(this.config.maxCustomIds),this.jobLogs=new _R(this.config.maxJobLogs);for(let Y=0;Y<M7;Y++)this.shards.push(new XQ0),this.shardLocks.push(new tc),this.processingShards.push(new Map),this.processingLocks.push(new tc);if(this.cronScheduler=new VQ0,this.cronScheduler.setPushCallback(async(Y,X)=>{await this.push(Y,X)}),this.storage){let Y=this.storage;this.cronScheduler.setPersistCallback((X,G,J)=>{Y.updateCron(X,G,J)})}if(this.webhookManager=new AQ0({validateUrls:$.validateWebhookUrls}),this.workerManager=new FQ0,this.cronScheduler.setWorkerCheckCallback((Y)=>{return this.workerManager.getForQueue(Y).length>0}),this.eventsManager=new DQ0(this.webhookManager),this.contextFactory=new yQ0(this.getContextDependencies(),this.getContextCallbacks()),to0(this.contextFactory.getBackgroundContext()),this.recoveryStats={queues:this.queueNamesCache.size,jobs:this.jobIndex.size},this.storage)this.cronScheduler.load(this.storage.loadCronJobs());this.backgroundTaskHandles=so0(this.contextFactory.getBackgroundContext(),this.cronScheduler)}getContextDependencies(){return{config:this.config,storage:this.storage,shards:this.shards,shardLocks:this.shardLocks,processingShards:this.processingShards,processingLocks:this.processingLocks,jobIndex:this.jobIndex,completedJobs:this.completedJobs,completedJobsData:this.completedJobsData,jobResults:this.jobResults,customIdMap:this.customIdMap,jobLogs:this.jobLogs,jobLocks:this.jobLocks,clientJobs:this.clientJobs,stalledCandidates:this.stalledCandidates,pendingDepChecks:this.pendingDepChecks,queueNamesCache:this.queueNamesCache,repeatChain:this.repeatChain,eventsManager:this.eventsManager,webhookManager:this.webhookManager,workerManager:this.workerManager,monitoringState:this.monitoringState,metrics:this.metrics,startTime:this.startTime,maxLogsPerJob:this.maxLogsPerJob,perQueueMetrics:this.perQueueMetrics}}getContextCallbacks(){return{fail:this.fail.bind(this),registerQueueName:this.registerQueueName.bind(this),unregisterQueueName:this.unregisterQueueName.bind(this),onJobCompleted:this.onJobCompleted.bind(this),onJobsCompleted:this.onJobsCompleted.bind(this),hasPendingDeps:this.hasPendingDeps.bind(this),onRepeat:this.handleRepeat.bind(this),emitDashboardEvent:this.emitDashboardEvent.bind(this),onChildTerminalFailure:this.failParentOnChildFailure.bind(this),onChildDependencyOption:this.onChildDependencyOption.bind(this)}}handleRepeat($){if(!$.repeat)return;let Y=$.repeat.every??0,X=$.id;this.push($.queue,{data:$.data,priority:$.priority,delay:Y,maxAttempts:$.maxAttempts,backoff:$.backoff,ttl:$.ttl??void 0,timeout:$.timeout??void 0,tags:$.tags,groupId:$.groupId??void 0,lifo:$.lifo,removeOnComplete:$.removeOnComplete,removeOnFail:$.removeOnFail,repeat:{every:$.repeat.every,limit:$.repeat.limit,pattern:$.repeat.pattern,count:$.repeat.count+1}}).then((G)=>{if(this.repeatChain.set(X,G.id),this.repeatChain.size>1e4){let J=this.repeatChain.keys().next().value;if(J!==void 0)this.repeatChain.delete(J)}})}async push($,Y){return this.registerQueueName($),es0($,Y,this.contextFactory.getPushContext())}async pushBatch($,Y){return this.registerQueueName($),$o0($,Y,this.contextFactory.getPushContext())}async pull($,Y=0){return BQ0($,Y,this.contextFactory.getPullContext())}async pullWithLock($,Y,X=0,G=CN){let J=await BQ0($,X,this.contextFactory.getPullContext());if(!J)return{job:null,token:null};let Q=RS(J.id,Y,this.contextFactory.getLockContext(),G);return{job:J,token:Q}}async pullBatch($,Y,X=0){return OQ0($,Y,X,this.contextFactory.getPullContext())}async pullBatchWithLock($,Y,X,G=0,J=CN){let Q=await OQ0($,Y,G,this.contextFactory.getPullContext()),W=[];for(let Z of Q){let K=RS(Z.id,X,this.contextFactory.getLockContext(),J);W.push(K??"")}return{jobs:Q,tokens:W}}async ack($,Y,X){let G=this.contextFactory.getLockContext();if(X&&!kN($,X,G)){this.throwIfOwnershipConflict($,G);let J=this.jobIndex.get($);if(J?.type!=="processing"){if(J?.type==="queue")await this.completeStallRetriedJob($,Y),GZ($,G,X);return}}try{await $l($,Y,this.contextFactory.getAckContext())}catch(J){if(J instanceof Error&&J.message.includes("not found")){if((X??this.isStallRetried($))&&await this.completeStallRetriedJob($,Y)){if(X)GZ($,G,X);return}}throw J}GZ($,G,X)}async ackBatch($,Y){let X=this.contextFactory.getLockContext(),G=[],J=Y?[]:void 0;if(Y?.length===$.length)for(let Q=0;Q<$.length;Q++){let W=Y[Q];if(W&&!kN($[Q],W,X)){if(this.throwIfOwnershipConflict($[Q],X),this.jobIndex.get($[Q])?.type==="queue")await this.completeStallRetriedJob($[Q],void 0),GZ($[Q],X,W);continue}if(G.push($[Q]),J)J.push(W)}else G.push(...$);if(G.length>0)await Ko0(G,this.contextFactory.getAckContext());if(J)for(let Q=0;Q<G.length;Q++)GZ(G[Q],X,J[Q]);else if(Y)for(let Q=0;Q<$.length;Q++)GZ($[Q],X,Y[Q])}async ackBatchWithResults($){let Y=this.contextFactory.getLockContext(),X=[];for(let G of $){if(G.token&&!kN(G.id,G.token,Y)){if(this.throwIfOwnershipConflict(G.id,Y),this.jobIndex.get(G.id)?.type==="queue")await this.completeStallRetriedJob(G.id,G.result),GZ(G.id,Y,G.token);continue}X.push(G)}if(X.length>0)await Uo0(X,this.contextFactory.getAckContext());for(let G of X)GZ(G.id,Y,G.token)}async fail($,Y,X){let G=this.contextFactory.getLockContext();if(X&&!kN($,X,G)){if(this.throwIfOwnershipConflict($,G),this.jobIndex.get($)?.type!=="processing")return}try{await Zo0($,Y,this.contextFactory.getAckContext())}catch(J){if(X&&J instanceof Error&&J.message.includes("not found")){if(this.jobIndex.get($)?.type==="queue")return}throw J}GZ($,G,X)}throwIfOwnershipConflict($,Y){if(this.jobIndex.get($)?.type==="processing"&&Y.jobLocks.has($))throw Error(`Invalid or expired lock token for job ${$}`)}isStallRetried($){let Y=this.jobIndex.get($);if(Y?.type!=="queue")return!1;let J=this.shards[Y.shardIdx].getQueue(Y.queueName).find($);return J!==null&&J.attempts>0}async completeStallRetriedJob($,Y){let X=this.jobIndex.get($);if(X?.type!=="queue")return!1;let{shardIdx:G,queueName:J}=X,Q=this.shards[G],W=null;if(await v4(this.shardLocks[G],()=>{if(W=Q.getQueue(J).remove($),W)Q.decrementQueued($),Q.releaseJobResources(J,W.uniqueKey,W.groupId)}),!W)return!1;let Z=this.contextFactory.getAckContext();if(!W.removeOnComplete){if(Z.completedJobs.add($),Z.completedJobsData.set($,W),Y!==void 0)Z.jobResults.set($,Y),Z.storage?.storeResult($,Y);Z.jobIndex.set($,{type:"completed",queueName:W.queue}),Z.storage?.markCompleted($,Date.now(),W.timeline)}else Z.jobIndex.delete($),Z.storage?.deleteJob($);return Z.totalCompleted.value++,Z.broadcast({eventType:"completed",queue:J,jobId:$,timestamp:Date.now(),data:Y}),Z.onJobCompleted($),!0}jobHeartbeat($,Y){let X=this.jobIndex.get($);if(X?.type!=="processing")return!1;if(Y)return vN($,Y,this.contextFactory.getLockContext());let J=this.processingShards[X.shardIdx].get($);if(J)return J.lastHeartbeat=Date.now(),!0;return!1}jobHeartbeatBatch($,Y){let X=0;for(let G=0;G<$.length;G++)if(this.jobHeartbeat($[G],Y?.[G]))X++;return X}removeLock($){this.contextFactory.getLockContext().jobLocks.delete($)}createLock($,Y,X=CN){return RS($,Y,this.contextFactory.getLockContext(),X)}verifyLock($,Y){return kN($,Y,this.contextFactory.getLockContext())}renewJobLock($,Y,X){return vN($,Y,this.contextFactory.getLockContext(),X)}renewJobLockBatch($){return TQ0($,this.contextFactory.getLockContext())}releaseLock($,Y){return GZ($,this.contextFactory.getLockContext(),Y)}getLockInfo($){return Zl($,this.contextFactory.getLockContext())}registerClientJob($,Y){CQ0($,Y,this.contextFactory.getLockContext())}unregisterClientJob($,Y){SQ0($,Y,this.contextFactory.getLockContext())}releaseClientJobs($){return kQ0($,this.contextFactory.getLockContext())}forceReleaseClientJobs($){return vQ0($,this.contextFactory.getLockContext())}async getJob($){return wo0($,this.contextFactory.getQueryContext())}async getJobState($){return To0($,this.contextFactory.getQueryContext())}getResult($){return wQ0($,this.contextFactory.getQueryContext())}async getChildrenValues($){let Y=await this.getJob($);if(!Y?.childrenIds||Y.childrenIds.length===0)return{};let X=this.contextFactory.getQueryContext(),G={};for(let J of Y.childrenIds){let Q=wQ0(J,X);if(Q!==void 0){let W=await this.getJob(J),Z=W?`${W.queue}:${J}`:J;G[Z]=Q}}return G}async updateJobParent($,Y){let X=await this.getJob($);if(!X)return;X.parentId=Y;let G=X.data;G.__parentId=Y,G.__parentQueue=X.queue;let J=await this.getJob(Y);if(J){if(!J.childrenIds)J.childrenIds=[];if(!J.childrenIds.includes($))J.childrenIds.push($)}if(this.storage){if(this.storage.updateJobData($,X.data),J)this.storage.updateJobChildrenIds(Y,J.childrenIds)}let Q=this.jobIndex.get($);if(Q?.type==="dlq"&&X.failParentOnFailure)this.moveParentToFailed(Y,X,"Child job failed").catch(()=>{});if(Q?.type==="dlq"&&(X.removeDependencyOnFailure||X.ignoreDependencyOnFailure||X.continueParentOnFailure))this.onChildDependencyOption(X,"Child job failed")}getJobByCustomId($){return _o0($,this.contextFactory.getQueryContext())}getProgress($){return jo0($,this.contextFactory.getQueryContext())}count($){return No0($,this.contextFactory.getQueueControlContext())}pause($){Ho0($,this.contextFactory.getQueueControlContext()),this.dashboardEmit?.("queue:paused",{queue:$}),this.eventsManager.broadcast({eventType:"paused",queue:$,jobId:"",timestamp:Date.now()})}resume($){zo0($,this.contextFactory.getQueueControlContext()),this.dashboardEmit?.("queue:resumed",{queue:$}),this.eventsManager.broadcast({eventType:"resumed",queue:$,jobId:"",timestamp:Date.now()})}isPaused($){return Vo0($,this.contextFactory.getQueueControlContext())}drain($){let Y=Ao0($,this.contextFactory.getQueueControlContext());if(Y>0)this.dashboardEmit?.("queue:drained",{queue:$,count:Y});return Y}obliterate($){Fo0($,this.contextFactory.getQueueControlContext()),_Q0($,this.contextFactory.getDlqContext());let Y=new Set;for(let[J,Q]of this.jobIndex)if(Q.type==="processing"){if(this.processingShards[Q.shardIdx]?.get(J)?.queue===$)Y.add(J)}else if(Q.queueName===$)Y.add(J);for(let J of Y){let Q=this.jobIndex.get(J);if(Q?.type==="processing")this.processingShards[Q.shardIdx]?.delete(J);this.jobIndex.delete(J),this.completedJobs.delete(J),this.completedJobsData.delete(J),this.jobResults.delete(J),this.jobLogs.delete(J),this.jobLocks.delete(J),this.failedChildrenValues.delete(J),this.ignoredChildrenFailures.delete(J),this.pendingDepChecks.delete(J),this.stalledCandidates.delete(J),this.repeatChain.delete(J),this.storage?.deleteJob(J)}let X=[];for(let[J,Q]of this.repeatChain)if(Y.has(Q))X.push(J);for(let J of X)this.repeatChain.delete(J);let G=[];for(let[J,Q]of this.customIdMap.entries())if(Y.has(Q))G.push(J);for(let J of G)this.customIdMap.delete(J);this.unregisterQueueName($),this.dashboardEmit?.("queue:obliterated",{queue:$}),this.dashboardEmit?.("queue:removed",{queue:$})}listQueues(){return Array.from(this.queueNamesCache)}registerQueueName($){let Y=!this.queueNamesCache.has($);if(this.queueNamesCache.add($),Y)this.dashboardEmit?.("queue:created",{queue:$})}unregisterQueueName($){this.queueNamesCache.delete($)}clean($,Y,X,G){return Do0($,Y,this.contextFactory.getQueueControlContext(),X,G)}getCountsPerPriority($){let Y=l1($),X=this.shards[Y].getCountsPerPriority($);return Object.fromEntries(X)}getJobs($,Y={}){let X=l1($);return Co0($,X,Y,{...this.contextFactory.getQueryContext(),shardCount:M7})}getDlq($,Y){return ko0($,this.contextFactory.getDlqContext(),Y)}getDlqEntries($,Y){return Xl($,this.contextFactory.getDlqContext(),Y)}getDlqCount($){return this.shards[l1($)].getDlqCount($)}getDlqStats($){return Gl($,this.contextFactory.getDlqContext())}retryDlq($,Y){return vo0($,this.contextFactory.getDlqContext(),Y)}purgeDlq($){return _Q0($,this.contextFactory.getDlqContext())}retryCompleted($,Y){return go0($,this.contextFactory.getRetryCompletedContext(),Y)}setRateLimit($,Y){this.shards[l1($)].setRateLimit($,Y)}clearRateLimit($){this.shards[l1($)].clearRateLimit($)}setConcurrency($,Y){this.shards[l1($)].setConcurrency($,Y)}clearConcurrency($){this.shards[l1($)].clearConcurrency($)}getQueueLimits($){let Y=this.shards[l1($)].getState($);return{rateLimit:Y.rateLimit,concurrencyLimit:Y.concurrencyLimit}}getAllJobResults(){let $=new Map;for(let[Y,X]of this.jobResults.entries())$.set(Y,X);return $}getAllJobLogs(){let $=new Map;for(let[Y,X]of this.jobLogs.entries())$.set(Y,X);return $}getAllJobLocks(){return this.jobLocks}setStallConfig($,Y){this.shards[l1($)].setStallConfig($,Y)}getStallConfig($){return this.shards[l1($)].getStallConfig($)}setDlqConfig($,Y){this.shards[l1($)].setDlqConfig($,Y)}getDlqConfig($){return this.shards[l1($)].getDlqConfig($)}getCloudTelemetry($){let Y={};for(let X of $){let G=l1(X),J=this.shards[G],Q=J.uniqueKeys.get(X),W=J.activeGroups.get(X),Z=0;for(let H of J.waitingDeps.values())if(H.queue===X)Z++;let K=0;for(let H of J.waitingChildren.values())if(H.queue===X)K++;Y[X]={uniqueKeys:Q?.size??0,activeGroups:W?.size??0,waitingDeps:Z,waitingChildren:K}}return{perQueue:Y,eventSubscribers:this.eventsManager.subscriberCount,pendingDepChecks:this.pendingDepChecks.size}}async cancel($){return Lo0($,this.contextFactory.getJobMgmtContext())}async updateProgress($,Y,X){return Bo0($,Y,this.contextFactory.getJobMgmtContext(),X)}async updateJobData($,Y){return Oo0($,Y,this.contextFactory.getJobMgmtContext())}async changePriority($,Y){return Eo0($,Y,this.contextFactory.getJobMgmtContext())}async promote($){return Mo0($,this.contextFactory.getJobMgmtContext())}async moveToDelayed($,Y){return IQ0($,Y,this.contextFactory.getJobMgmtContext())}async changeDelay($,Y){let X=this.contextFactory.getJobMgmtContext();if(X.jobIndex.get($)?.type==="queue")return PQ0($,Y,X);return IQ0($,Y,X)}async moveActiveToWait($){return qo0($,this.contextFactory.getJobMgmtContext())}async changeWaitingDelay($,Y){return PQ0($,Y,this.contextFactory.getJobMgmtContext())}async moveToWaitingChildren($){return Io0($,this.contextFactory.getJobMgmtContext())}async extendLock($,Y,X){let G=typeof $==="string"?$:$,J=this.contextFactory.getLockContext();if(Y)return vN(G,Y,J,X);let Q=Zl(G,J);if(Q)return vN(G,Q.token,J,X);return!1}async discard($){return Ro0($,this.contextFactory.getJobMgmtContext())}addLog($,Y,X="info"){return mo0($,Y,this.contextFactory.getLogsContext(),X)}getLogs($){return uo0($,this.contextFactory.getLogsContext())}clearLogs($,Y){po0($,this.contextFactory.getLogsContext(),Y)}getPerQueueStats(){return Yt0(this.contextFactory.getStatsContext(),this.queueNamesCache)}getPrometheusMetrics(){return do0(this.getStats(),this.workerManager,this.webhookManager,this.getPerQueueStats())}addCron($){if($.preventOverlap){let X=$.uniqueKey??`cron:${$.name}`;this.removeOrphanedCronJob($.queue,X)}let Y=this.cronScheduler.add($);return this.storage?.saveCron(Y),Y}removeOrphanedCronJob($,Y){let X=l1($),G=this.shards[X],J=G.getUniqueKeyEntry($,Y);if(!J)return;let Q=J.jobId;if(this.jobIndex.get(Q)?.type!=="queue")return;if(G.getQueue($).remove(Q))G.decrementQueued(Q),G.releaseUniqueKey($,Y),this.jobIndex.delete(Q),this.storage?.deleteJob(Q)}removeCron($){let Y=this.cronScheduler.remove($);if(Y)this.storage?.deleteCron($);return Y}getCron($){return this.cronScheduler.get($)}listCrons(){return this.cronScheduler.list()}setDashboardEmit($){if(this.dashboardEmit=$,this.cronScheduler.setDashboardEmit($),this.webhookManager.setDashboardEmit($),this.workerManager.setDashboardEmit($),this.recoveryStats)$("server:recovered",this.recoveryStats),this.recoveryStats=null}emitDashboardEvent($,Y){this.dashboardEmit?.($,Y)}subscribe($){return this.eventsManager.subscribe($)}waitForJobCompletion($,Y){return this.eventsManager.waitForJobCompletion($,Y)}registerWorker($,Y,X,G){let J=this.workerManager.register($,Y,X,G);return this.dashboardEmit?.("worker:connected",{workerId:J.id,name:J.name,queues:J.queues,hostname:J.hostname,pid:J.pid}),J}unregisterWorker($){let Y=this.workerManager.unregister($);if(Y)this.dashboardEmit?.("worker:disconnected",{workerId:$});return Y}unregisterWorkersByClientId($){return this.workerManager.unregisterByClientId($)}getJobIndex(){return this.jobIndex}getCompletedJobs(){return this.completedJobs}getShards(){return this.shards}onJobCompleted($){this.pendingDepChecks.add($),this.scheduleDependencyFlush(),this.checkFlowCompleted($)}async checkFlowCompleted($){let Y=await this.getJob($);if(!Y?.parentId)return;let X=await this.getJob(Y.parentId);if(!X?.childrenIds||X.childrenIds.length===0)return;if(X.childrenIds.every((J)=>this.completedJobs.has(J)))this.dashboardEmit?.("flow:completed",{parentJobId:String(X.id),queue:X.queue,childrenCount:X.childrenIds.length})}failParentOnChildFailure($,Y){let X=$.parentId;if(!X)return;this.moveParentToFailed(X,$,Y).catch(()=>{})}async moveParentToFailed($,Y,X){let G=await this.getJob($);if(!G)return;let J=this.jobIndex.get($);if(!J)return;if(J.type!=="queue")return;let Q=l1(G.queue);await v4(this.shardLocks[Q],()=>{if(this.jobIndex.get($)?.type!=="queue")return;let W=this.shards[Q];if(W.waitingDeps.has($))W.waitingDeps.delete($),W.unregisterDependencies($,G.dependsOn);if(W.waitingChildren.has($))W.waitingChildren.delete($);let Z=W.getQueue(G.queue);if(Z.find($))Z.remove($),W.decrementQueued($);let K=`Child job ${Y.id} failed: ${X??"unknown error"}`,H=W.addToDlq(G,"unknown",K);this.jobIndex.set($,{type:"dlq",queueName:G.queue}),this.storage?.saveDlqEntry(H),this.storage?.deleteJob($)}),this.eventsManager.broadcast({eventType:"failed",queue:G.queue,jobId:$,timestamp:Date.now(),error:`Child job ${Y.id} failed: ${X??"unknown error"}`,data:G.data}),this.dashboardEmit?.("flow:failed",{parentJobId:String($),failedChildId:String(Y.id),queue:G.queue,error:X??"Child job failed"})}onChildDependencyOption($,Y){if(!$.parentId)return;if($.continueParentOnFailure)this.continueParentOnChildFailure($,Y).catch(()=>{});else this.removeChildFromParentDeps($,Y,$.ignoreDependencyOnFailure).catch(()=>{})}async continueParentOnChildFailure($,Y){let X=$.parentId;if(!X)return;let G=await this.getJob(X);if(!G)return;if(this.jobIndex.get(X)?.type!=="queue")return;let Q=`${$.queue}:${$.id}`,W=this.failedChildrenValues.get(X)??{};W[Q]=Y??"unknown error",this.failedChildrenValues.set(X,W);let Z=l1(G.queue),K=!1;if(await v4(this.shardLocks[Z],()=>{if(this.jobIndex.get(X)?.type!=="queue")return;let H=this.shards[Z];if(H.waitingDeps.has(X))H.waitingDeps.delete(X),H.unregisterDependencies(X,G.dependsOn);if(H.waitingChildren.has(X))H.waitingChildren.delete(X);let z=H.getQueue(G.queue);if(!z.find(X)){let V=Date.now();G.runAt=V,z.push(G),H.incrementQueued(X,!1,G.createdAt,G.queue,V),this.jobIndex.set(X,{type:"queue",shardIdx:Z,queueName:G.queue}),H.notify(),K=!0}}),K)this.eventsManager.broadcast({eventType:"waiting",queue:G.queue,jobId:X,timestamp:Date.now(),prev:"waiting-children"})}async removeChildFromParentDeps($,Y,X){let G=$.parentId;if(!G)return;let J=await this.getJob(G);if(!J)return;if(this.jobIndex.get(G)?.type!=="queue")return;if(X){let K=`${$.queue}:${$.id}`,H=this.ignoredChildrenFailures.get(G)??{};H[K]=Y??"unknown error",this.ignoredChildrenFailures.set(G,H)}let W=l1(J.queue),Z=!1;if(await v4(this.shardLocks[W],()=>{if(this.jobIndex.get(G)?.type!=="queue")return;let K=this.shards[W];if(!K.waitingDeps.get(G))return;let z=J.dependsOn.indexOf($.id);if(z!==-1)J.dependsOn.splice(z,1),K.unregisterDependencies(G,[$.id]);if(J.dependsOn.length===0||J.dependsOn.every((A)=>this.completedJobs.has(A))){K.waitingDeps.delete(G);let A=Date.now();J.runAt=A,K.getQueue(J.queue).push(J),K.incrementQueued(G,!1,J.createdAt,J.queue,A),this.jobIndex.set(G,{type:"queue",shardIdx:W,queueName:J.queue}),K.notify(),Z=!0}}),Z)this.eventsManager.broadcast({eventType:"waiting",queue:J.queue,jobId:G,timestamp:Date.now(),prev:"waiting-children"})}async getFailedChildrenValues($){return this.failedChildrenValues.get($)??{}}async getIgnoredChildrenFailures($){return this.ignoredChildrenFailures.get($)??{}}async removeChildDependency($){let Y=await this.getJob($);if(!Y)throw Error(`Job not found: ${$}`);if(!Y.parentId)throw Error(`Job ${$} has no parent`);let X=Y.parentId,G=await this.getJob(X);if(!G)return!1;if(this.jobIndex.get(X)?.type!=="queue")return!1;let Q=l1(G.queue),W=!1;if(await v4(this.shardLocks[Q],()=>{if(this.jobIndex.get(X)?.type!=="queue")return;let Z=this.shards[Q];if(!Z.waitingDeps.get(X))return;let H=G.dependsOn.indexOf($);if(H!==-1)G.dependsOn.splice(H,1),Z.unregisterDependencies(X,[$]);if(G.dependsOn.length===0||G.dependsOn.every((V)=>this.completedJobs.has(V))){Z.waitingDeps.delete(X);let V=Date.now();G.runAt=V,Z.getQueue(G.queue).push(G),Z.incrementQueued(X,!1,G.createdAt,G.queue,V),this.jobIndex.set(X,{type:"queue",shardIdx:Q,queueName:G.queue}),Z.notify(),W=!0}}),W)this.eventsManager.broadcast({eventType:"waiting",queue:G.queue,jobId:X,timestamp:Date.now(),prev:"waiting-children"});return!0}async removeUnprocessedChildren($){let Y=await this.getJob($);if(!Y?.childrenIds||Y.childrenIds.length===0)return;for(let X of Y.childrenIds)if(this.jobIndex.get(X)?.type==="queue")try{await this.cancel(X)}catch{}}onJobsCompleted($){for(let Y of $)this.pendingDepChecks.add(Y);this.scheduleDependencyFlush()}scheduleDependencyFlush(){if(this.depFlushScheduled)return;this.depFlushScheduled=!0,queueMicrotask(()=>{if(this.depFlushScheduled=!1,this.depFlushRunning)return;this.runDependencyFlush()})}async runDependencyFlush(){this.depFlushRunning=!0;try{while(this.pendingDepChecks.size>0)await Kl(this.contextFactory.getBackgroundContext()),TR("dependency")}catch($){jR("dependency",$)}finally{if(this.depFlushRunning=!1,this.pendingDepChecks.size>0)this.scheduleDependencyFlush()}}hasPendingDeps(){for(let $ of this.shards)if($.waitingDeps.size>0)return!0;return!1}getStats(){return eo0(this.contextFactory.getStatsContext(),this.cronScheduler)}getQueuesSummary(){let $=this.contextFactory.getStatsContext(),Y=this.listQueues(),X=[];for(let G of Y){let J=xQ0(G,$);X.push({name:G,paused:this.isPaused(G),counts:{waiting:J.waiting,active:J.active,completed:J.completed,failed:J.failed,delayed:J.delayed}})}return X}getQueueJobCounts($){return xQ0($,this.contextFactory.getStatsContext())}getMemoryStats(){return $t0(this.contextFactory.getStatsContext())}getStorageStatus(){if(!this.storage)return{diskFull:!1,error:null,since:null};return this.storage.getDiskFullStatus()}compactMemory(){Xt0(this.contextFactory.getStatsContext()),this.dashboardEmit?.("memory:compacted",{})}shutdown(){if(this.cronScheduler.stop(),this.workerManager.stop(),this.eventsManager.clear(),this.backgroundTaskHandles)oo0(this.backgroundTaskHandles);this.storage?.close(),this.jobIndex.clear(),this.completedJobs.clear(),this.completedJobsData.clear(),this.jobResults.clear(),this.jobLogs.clear(),this.customIdMap.clear(),this.pendingDepChecks.clear(),this.queueNamesCache.clear(),this.jobLocks.clear(),this.stalledCandidates.clear(),this.clientJobs.clear(),this.repeatChain.clear();for(let $ of this.processingShards)$.clear();for(let $ of this.shards)$.waitingDeps.clear(),$.dependencyIndex.clear(),$.waitingChildren.clear(),$.uniqueKeys.clear(),$.activeGroups.clear()}}var Gt0=null;function hg4(){return Bun.env.BUNQUEUE_DATA_PATH??Bun.env.BQ_DATA_PATH??Bun.env.DATA_PATH??Bun.env.SQLITE_PATH}function h0($){return Gt0??=new bQ0({dataPath:$??hg4()}),Gt0}function Ul($){if(typeof $==="object"&&$!==null){let{name:Y,...X}=$;return X}return $}function Jt0($){if(typeof $==="object"&&$!==null){let Y=$,X=Y.__parentId,G=Y.__parentQueue;if(X!==void 0&&G!==void 0&&(typeof X==="string"||typeof X==="number")&&(typeof G==="string"||typeof G==="number"))return{id:String(X),queueQualifiedName:String(G)}}return}function fg4($){if(!$)return;return{every:$.every,limit:$.limit,pattern:$.pattern,count:$.count,startDate:$.startDate,endDate:$.endDate,tz:$.tz,immediately:$.immediately,prevMillis:$.prevMillis,offset:$.offset,jobId:$.jobId}}function gg4($){let Y=$.data,X=$.parentId??Y?.__parentId,G=Y?.__parentQueue,J=(Q)=>typeof Q==="string"||typeof Q==="number";if(J(X)&&J(G))return{id:String(X),queue:String(G)};return}function IS($){let Y=$.backoffConfig?{type:$.backoffConfig.type,delay:$.backoffConfig.delay}:$.backoff;return{priority:$.priority,delay:$.runAt>$.createdAt?$.runAt-$.createdAt:0,attempts:$.maxAttempts,backoff:Y,timeout:$.timeout??void 0,jobId:$.customId??void 0,removeOnComplete:$.removeOnComplete,removeOnFail:$.removeOnFail,stallTimeout:$.stallTimeout??void 0,repeat:fg4($.repeat),parent:gg4($),lifo:$.lifo,stackTraceLimit:$.stackTraceLimit,keepLogs:$.keepLogs??void 0,sizeLimit:$.sizeLimit??void 0,failParentOnFailure:$.failParentOnFailure,removeDependencyOnFailure:$.removeDependencyOnFailure,deduplication:$.deduplicationTtl!==null?{id:$.customId??"",ttl:$.deduplicationTtl}:void 0,debounce:$.debounceId&&$.debounceTtl!==null?{id:$.debounceId,ttl:$.debounceTtl}:void 0}}function Hl($){if($.parentId){let X=$.data?.__parentQueue;if(X&&(typeof X==="string"||typeof X==="number"))return`${String(X)}:${$.parentId}`;return`unknown:${$.parentId}`}return}function Qt0($){if($.repeat){let Y=$.repeat.pattern??($.repeat.every?`every:${$.repeat.every}`:"");return`${$.queue}:${$.id}:${Y}`}return}function hQ0($,Y,X,G,J){let Q=String($.id),W=Jt0($.data),Z=IS($);return{id:Q,name:Y,data:Ul($.data),queueName:$.queue,attemptsMade:$.attempts,timestamp:$.createdAt,progress:$.progress,parent:W,delay:$.runAt>$.createdAt?$.runAt-$.createdAt:0,processedOn:$.startedAt??void 0,finishedOn:$.completedAt??void 0,stacktrace:X??null,stalledCounter:$.stallCount,priority:$.priority,parentKey:Hl($),opts:Z,token:G,processedBy:J,deduplicationId:$.customId??void 0,repeatJobKey:Qt0($),attemptsStarted:$.attempts}}function fQ0($,Y,X){return{isWaiting:async()=>{return await(Y?Y($):Promise.resolve("unknown"))==="waiting"},isActive:async()=>{return await(Y?Y($):Promise.resolve("unknown"))==="active"},isDelayed:async()=>{return await(Y?Y($):Promise.resolve("unknown"))==="delayed"},isCompleted:async()=>{return await(Y?Y($):Promise.resolve("unknown"))==="completed"},isFailed:async()=>{return await(Y?Y($):Promise.resolve("unknown"))==="failed"},isWaitingChildren:async()=>{if(X)return(await X($)).unprocessed>0;return!1}}}function gQ0($,Y,X,G,J){return{toJSON:()=>({id:Y,name:X,data:Ul($.data),opts:G,progress:$.progress,delay:$.runAt>$.createdAt?$.runAt-$.createdAt:0,timestamp:$.createdAt,attemptsMade:$.attempts,stacktrace:J??null,returnvalue:void 0,failedReason:void 0,finishedOn:$.completedAt??void 0,processedOn:$.startedAt??void 0,queueQualifiedName:`bull:${$.queue}`,parentKey:Hl($)}),asJSON:()=>({id:Y,name:X,data:JSON.stringify(Ul($.data)),opts:JSON.stringify(G),progress:JSON.stringify($.progress),delay:String($.runAt>$.createdAt?$.runAt-$.createdAt:0),timestamp:String($.createdAt),attemptsMade:String($.attempts),stacktrace:J?JSON.stringify(J):null,returnvalue:void 0,failedReason:void 0,finishedOn:$.completedAt?String($.completedAt):void 0,processedOn:$.startedAt?String($.startedAt):void 0,parentKey:Hl($)})}}function zl($){let{job:Y,name:X,updateProgress:G,log:J,getState:Q,remove:W,retry:Z,getChildrenValues:K,updateData:H,promote:z,changeDelay:V,changePriority:A,extendLock:F,clearLogs:N,getDependencies:D,getDependenciesCount:L,moveToCompleted:B,moveToFailed:O,moveToWait:E,moveToDelayed:M,moveToWaitingChildren:R,waitUntilFinished:q,discard:w,getFailedChildrenValues:I,getIgnoredChildrenFailures:P,removeChildDependency:_,removeDeduplicationKey:C,removeUnprocessedChildren:k,token:S,processedBy:T,stacktrace:v}=$,x=String(Y.id),y=IS(Y),d=hQ0(Y,X,v,S,T),u=fQ0(x,Q,L),b=gQ0(Y,x,X,y,v);return{...d,...u,...b,updateProgress:(g,p)=>G(x,g,p),log:(g)=>J(x,g),getState:()=>Q?Q(x):Promise.resolve("unknown"),remove:()=>W?W(x):Promise.resolve(),retry:()=>Z?Z(x):Promise.resolve(),getChildrenValues:()=>K?K(x):Promise.resolve({}),updateData:(g)=>H?H(x,g):Promise.resolve(),promote:()=>z?z(x):Promise.resolve(),changeDelay:(g)=>V?V(x,g):Promise.resolve(),changePriority:(g)=>A?A(x,g):Promise.resolve(),extendLock:(g,p)=>F?F(x,g,p):Promise.resolve(0),clearLogs:(g)=>N?N(x,g):Promise.resolve(),getDependencies:(g)=>D?D(x,g):Promise.resolve({processed:{},unprocessed:[]}),getDependenciesCount:(g)=>L?L(x,g):Promise.resolve({processed:0,unprocessed:0}),moveToCompleted:(g,p,h)=>B?B(x,g,p):Promise.resolve(null),moveToFailed:(g,p,h)=>O?O(x,g,p):Promise.resolve(),moveToWait:(g)=>E?E(x,g):Promise.resolve(!1),moveToDelayed:(g,p)=>M?M(x,g,p):Promise.resolve(),moveToWaitingChildren:(g,p)=>R?R(x,g,p):Promise.resolve(!1),waitUntilFinished:(g,p)=>q?q(x,g,p):Promise.resolve(void 0),discard:()=>{if(w)w(x)},getFailedChildrenValues:()=>I?I(x):Promise.resolve({}),getIgnoredChildrenFailures:()=>P?P(x):Promise.resolve({}),removeChildDependency:()=>_?_(x):Promise.resolve(!1),removeDeduplicationKey:()=>C?C(x):Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available")),removeUnprocessedChildren:()=>k?k(x):Promise.resolve()}}function cV($){let{job:Y,name:X,getState:G,remove:J,retry:Q,getChildrenValues:W,updateData:Z,promote:K,changeDelay:H,changePriority:z,extendLock:V,clearLogs:A,getDependencies:F,getDependenciesCount:N,moveToCompleted:D,moveToFailed:L,moveToWait:B,moveToDelayed:O,moveToWaitingChildren:E,waitUntilFinished:M,discard:R,getFailedChildrenValues:q,getIgnoredChildrenFailures:w,removeChildDependency:I,removeDeduplicationKey:P,removeUnprocessedChildren:_,stacktrace:C}=$,k=String(Y.id),S=IS(Y),T=hQ0(Y,X,C,void 0,void 0),v=fQ0(k,G,N),x=gQ0(Y,k,X,S,C);return{...T,...v,...x,updateProgress:async()=>{},log:async()=>{},getState:()=>G?G(k):Promise.resolve("unknown"),remove:()=>J?J(k):Promise.resolve(),retry:()=>Q?Q(k):Promise.resolve(),getChildrenValues:()=>W?W(k):Promise.resolve({}),updateData:(y)=>Z?Z(k,y):Promise.resolve(),promote:()=>K?K(k):Promise.resolve(),changeDelay:(y)=>H?H(k,y):Promise.resolve(),changePriority:(y)=>z?z(k,y):Promise.resolve(),extendLock:(y,d)=>V?V(k,y,d):Promise.resolve(0),clearLogs:(y)=>A?A(k,y):Promise.resolve(),getDependencies:(y)=>F?F(k,y):Promise.resolve({processed:{},unprocessed:[]}),getDependenciesCount:(y)=>N?N(k,y):Promise.resolve({processed:0,unprocessed:0}),moveToCompleted:(y,d,u)=>D?D(k,y,d):Promise.resolve(null),moveToFailed:(y,d,u)=>L?L(k,y,d):Promise.resolve(),moveToWait:(y)=>B?B(k,y):Promise.resolve(!1),moveToDelayed:(y,d)=>O?O(k,y,d):Promise.resolve(),moveToWaitingChildren:(y,d)=>E?E(k,y,d):Promise.resolve(!1),waitUntilFinished:(y,d)=>M?M(k,y,d):Promise.resolve(void 0),discard:()=>{if(R)R(k)},getFailedChildrenValues:()=>q?q(k):Promise.resolve({}),getIgnoredChildrenFailures:()=>w?w(k):Promise.resolve({}),removeChildDependency:()=>I?I(k):Promise.resolve(!1),removeDeduplicationKey:()=>P?P(k):Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available")),removeUnprocessedChildren:()=>_?_(k):Promise.resolve()}}function mQ0($){let Y=$.job.data;return{job:cV({job:$.job,name:Y?.name??"default"}),enteredAt:$.enteredAt,reason:$.reason,error:$.error,attempts:$.attempts.map((X)=>({attempt:X.attempt,startedAt:X.startedAt,failedAt:X.failedAt,reason:X.reason,error:X.error,duration:X.duration})),retryCount:$.retryCount,lastRetryAt:$.lastRetryAt,nextRetryAt:$.nextRetryAt,expiresAt:$.expiresAt}}function uQ0($,Y,X,G){let{tcp:J,queueName:Q}=G,W=Date.now();return{id:$,name:Y,data:X,queueName:Q,attemptsMade:0,timestamp:W,progress:0,delay:0,processedOn:void 0,finishedOn:void 0,stacktrace:null,stalledCounter:0,priority:0,parentKey:void 0,opts:{},token:void 0,processedBy:void 0,deduplicationId:void 0,repeatJobKey:void 0,attemptsStarted:0,updateProgress:async(Z,K)=>{await J.send({cmd:"Progress",id:$,progress:Z,message:K})},log:async(Z)=>{await J.send({cmd:"AddLog",id:$,message:Z})},getState:()=>G.getJobState($),remove:()=>G.removeAsync($),retry:()=>G.retryJob($),getChildrenValues:()=>G.getChildrenValues($),isWaiting:async()=>await G.getJobState($)==="waiting",isActive:async()=>await G.getJobState($)==="active",isDelayed:async()=>await G.getJobState($)==="delayed",isCompleted:async()=>await G.getJobState($)==="completed",isFailed:async()=>await G.getJobState($)==="failed",isWaitingChildren:async()=>await G.getJobState($)==="waiting-children",updateData:async(Z)=>{await J.send({cmd:"Update",id:$,data:Z})},promote:async()=>{await J.send({cmd:"Promote",id:$})},changeDelay:async(Z)=>{await J.send({cmd:"ChangeDelay",id:$,delay:Z})},changePriority:async(Z)=>{await J.send({cmd:"ChangePriority",id:$,priority:Z.priority})},extendLock:async(Z,K)=>{return(await J.send({cmd:"ExtendLock",id:$,token:Z,duration:K})).ok===!0?K:0},clearLogs:async()=>{await J.send({cmd:"ClearLogs",id:$})},getDependencies:()=>Wt0($,Q,J),getDependenciesCount:async()=>{let Z=await Wt0($,Q,J);return{processed:Object.keys(Z.processed).length,unprocessed:Z.unprocessed.length}},toJSON:()=>({id:$,name:Y,data:X,opts:{},progress:0,delay:0,timestamp:W,attemptsMade:0,stacktrace:null,queueQualifiedName:`bull:${Q}`}),asJSON:()=>({id:$,name:Y,data:JSON.stringify(X),opts:"{}",progress:"0",delay:"0",timestamp:String(W),attemptsMade:"0",stacktrace:null}),moveToCompleted:async(Z)=>{return await J.send({cmd:"ACK",id:$,result:Z}),null},moveToFailed:async(Z)=>{await J.send({cmd:"FAIL",id:$,error:Z.message})},moveToWait:async()=>{return(await J.send({cmd:"MoveToWait",id:$})).ok===!0},moveToDelayed:async(Z)=>{let K=Math.max(0,Z-Date.now());await J.send({cmd:"MoveToDelayed",id:$,delay:K})},moveToWaitingChildren:()=>{return Promise.reject(Error("moveToWaitingChildren is not supported in TCP mode \u2014 no server command available"))},waitUntilFinished:async(Z,K)=>{let H=K??30000,V=await J.send({cmd:"WaitJob",id:$,timeout:H});if(!V.completed)throw Error(`waitUntilFinished timed out after ${H}ms`);return V.result},discard:()=>{J.send({cmd:"Discard",id:$})},getFailedChildrenValues:async()=>{return(await J.send({cmd:"GetFailedChildrenValues",id:$})).values??{}},getIgnoredChildrenFailures:async()=>{return(await J.send({cmd:"GetIgnoredChildrenFailures",id:$})).values??{}},removeChildDependency:async()=>{return(await J.send({cmd:"RemoveChildDependency",id:$})).removed??!1},removeDeduplicationKey:()=>Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available")),removeUnprocessedChildren:async()=>{await J.send({cmd:"RemoveUnprocessedChildren",id:$})}}}async function Wt0($,Y,X){let Q=(await X.send({cmd:"GetJob",id:$})).job?.childrenIds??[],W={},Z=[];for(let K of Q){let z=(await X.send({cmd:"GetState",id:K})).state??"unknown",V=`${Y}:${K}`;if(z==="completed"||z==="failed")if(z==="completed"){let A=await X.send({cmd:"GetResult",id:K});W[V]=A.result??null}else W[V]=null;else Z.push(V)}return{processed:W,unprocessed:Z}}function xN($,Y,X,G,J){let{queueName:Q,embedded:W,tcp:Z}=J;return{id:$,name:Y,data:X,queueName:Q,attemptsMade:0,timestamp:G,progress:0,delay:0,processedOn:void 0,finishedOn:void 0,stacktrace:null,stalledCounter:0,priority:0,parentKey:void 0,opts:{},token:void 0,processedBy:void 0,deduplicationId:void 0,repeatJobKey:void 0,attemptsStarted:0,updateProgress:async(K,H)=>{if(W){await h0().updateProgress(d0($),K,H);return}if(Z)await Z.send({cmd:"Progress",id:$,progress:K,message:H})},log:async(K)=>{if(W){h0().addLog(d0($),K);return}if(Z)await Z.send({cmd:"AddLog",id:$,message:K})},getState:()=>J.getJobState($),remove:()=>J.removeAsync($),retry:()=>J.retryJob($),getChildrenValues:()=>J.getChildrenValues($),isWaiting:async()=>await J.getJobState($)==="waiting",isActive:async()=>await J.getJobState($)==="active",isDelayed:async()=>await J.getJobState($)==="delayed",isCompleted:async()=>await J.getJobState($)==="completed",isFailed:async()=>await J.getJobState($)==="failed",isWaitingChildren:async()=>await J.getJobState($)==="waiting-children",updateData:async(K)=>{if(W){await h0().updateJobData(d0($),K);return}if(Z)await Z.send({cmd:"Update",id:$,data:K})},promote:async()=>{if(W){await h0().promote(d0($));return}if(Z)await Z.send({cmd:"Promote",id:$})},changeDelay:async(K)=>{if(W){await h0().changeDelay(d0($),K);return}if(Z)await Z.send({cmd:"ChangeDelay",id:$,delay:K})},changePriority:async(K)=>{if(W){await h0().changePriority(d0($),K.priority);return}if(Z)await Z.send({cmd:"ChangePriority",id:$,priority:K.priority})},extendLock:async(K,H)=>{if(W)return await h0().extendLock(d0($),K,H)?H:0;if(!Z)return 0;return(await Z.send({cmd:"ExtendLock",id:$,token:K,duration:H})).ok===!0?H:0},clearLogs:async(K)=>{if(W){h0().clearLogs(d0($),K);return}if(Z)await Z.send({cmd:"ClearLogs",id:$,keepLogs:K})},getDependencies:()=>Zt0($,Q,W,Z),getDependenciesCount:async()=>{let K=await Zt0($,Q,W,Z);return{processed:Object.keys(K.processed).length,unprocessed:K.unprocessed.length}},toJSON:()=>({id:$,name:Y,data:X,opts:{},progress:0,delay:0,timestamp:G,attemptsMade:0,stacktrace:null,queueQualifiedName:`bull:${Q}`}),asJSON:()=>({id:$,name:Y,data:JSON.stringify(X),opts:"{}",progress:"0",delay:"0",timestamp:String(G),attemptsMade:"0",stacktrace:null}),moveToCompleted:async(K)=>{if(W)return await h0().ack(d0($),K),null;if(Z)await Z.send({cmd:"ACK",id:$,result:K});return null},moveToFailed:async(K)=>{if(W){await h0().fail(d0($),K.message);return}if(Z)await Z.send({cmd:"FAIL",id:$,error:K.message})},moveToWait:async()=>{if(W){let H=h0(),z=await H.getJobState(d0($));if(z==="active")return await H.moveActiveToWait(d0($));if(z==="delayed")return await H.promote(d0($));if(z==="failed"){let V=await H.getJob(d0($));if(!V)return!1;return H.retryDlq(V.queue,d0($))>0}if(z==="waiting"||z==="prioritized")return!0;return!1}if(!Z)return!1;return(await Z.send({cmd:"MoveToWait",id:$})).ok===!0},moveToDelayed:async(K)=>{let H=Math.max(0,K-Date.now());if(W){await h0().moveToDelayed(d0($),H);return}if(Z)await Z.send({cmd:"MoveToDelayed",id:$,delay:H})},moveToWaitingChildren:async()=>{if(W)return await h0().moveToWaitingChildren(d0($));throw Error("moveToWaitingChildren is not supported in TCP mode \u2014 no server command available")},waitUntilFinished:async(K,H)=>{let z=H??30000;if(W){let F=h0(),N=await F.getJob(d0($));if(!N)throw Error(`Job ${$} not found`);if(N.completedAt)return F.getResult(d0($));if(!await F.waitForJobCompletion(d0($),z))throw Error(`waitUntilFinished timed out after ${z}ms`);return F.getResult(d0($))}if(!Z)throw Error("waitUntilFinished: no connection");let A=await Z.send({cmd:"WaitJob",id:$,timeout:z});if(!A.completed)throw Error(`waitUntilFinished timed out after ${z}ms`);return A.result},discard:()=>{if(W){h0().discard(d0($));return}if(Z)Z.send({cmd:"Discard",id:$})},getFailedChildrenValues:async()=>{if(W)return await h0().getFailedChildrenValues(d0($));if(!Z)return{};return(await Z.send({cmd:"GetFailedChildrenValues",id:$})).values??{}},getIgnoredChildrenFailures:async()=>{if(W)return await h0().getIgnoredChildrenFailures(d0($));if(!Z)return{};return(await Z.send({cmd:"GetIgnoredChildrenFailures",id:$})).values??{}},removeChildDependency:async()=>{if(W)return await h0().removeChildDependency(d0($));if(!Z)return!1;return(await Z.send({cmd:"RemoveChildDependency",id:$})).removed??!1},removeDeduplicationKey:()=>Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available")),removeUnprocessedChildren:async()=>{if(W){await h0().removeUnprocessedChildren(d0($));return}if(Z)await Z.send({cmd:"RemoveUnprocessedChildren",id:$})}}}async function Zt0($,Y,X,G){let J={},Q=[],W=[];if(X)W=((await h0().getJob(d0($)))?.childrenIds??[]).map(String);else if(G)W=((await G.send({cmd:"GetJob",id:$})).job?.childrenIds??[]).map(String);for(let Z of W){let K="unknown",H;if(X){let V=h0();if(K=await V.getJobState(d0(Z)),K==="completed")H=V.getResult(d0(Z))}else if(G){if(K=(await G.send({cmd:"GetState",id:Z})).state??"unknown",K==="completed")H=(await G.send({cmd:"GetResult",id:Z})).result}let z=`${Y}:${Z}`;if(K==="completed"||K==="failed")J[z]=H??null;else Q.push(z)}return{processed:J,unprocessed:Q}}async function Kt0($,Y,X,G={}){let J={...$.opts.defaultJobOptions,...G},Q={name:Y,...X};if(J.parent)Q.__parentId=J.parent.id,Q.__parentQueue=J.parent.queue;if($.embedded){let H=h0(),z=typeof J.removeOnComplete==="boolean"?J.removeOnComplete:!1,V=typeof J.removeOnFail==="boolean"?J.removeOnFail:!1,A=J.repeat?{every:J.repeat.every,limit:J.repeat.limit,pattern:J.repeat.pattern,count:J.repeat.count,startDate:Vl(J.repeat.startDate),endDate:Vl(J.repeat.endDate),tz:J.repeat.tz,immediately:J.repeat.immediately,prevMillis:J.repeat.prevMillis,offset:J.repeat.offset,jobId:J.repeat.jobId}:void 0,F=await H.push($.name,{data:Q,priority:J.priority,delay:J.delay,maxAttempts:J.attempts,backoff:J.backoff,ttl:J.ttl,timeout:J.timeout,uniqueKey:J.deduplication?.id,customId:J.jobId??J.deduplication?.id,dependsOn:J.dependsOn?.map((N)=>d0(N)),tags:J.tags,groupId:J.groupId,dedup:J.deduplication?{ttl:J.deduplication.ttl,extend:J.deduplication.extend,replace:J.deduplication.replace}:void 0,lifo:J.lifo,removeOnComplete:z,removeOnFail:V,stallTimeout:J.stallTimeout,durable:J.durable,repeat:A,parentId:J.parent?d0(J.parent.id):void 0,stackTraceLimit:J.stackTraceLimit,keepLogs:J.keepLogs,sizeLimit:J.sizeLimit,failParentOnFailure:J.failParentOnFailure,removeDependencyOnFailure:J.removeDependencyOnFailure,debounceId:J.debounce?.id,debounceTtl:J.debounce?.ttl});return cV({job:F,name:Y,getState:(N)=>$.getJobState(N),remove:(N)=>$.removeAsync(N),retry:(N)=>$.retryJob(N),getChildrenValues:(N)=>$.getChildrenValues(N),updateData:(N,D)=>$.updateJobData(N,D),promote:(N)=>$.promoteJob(N),changeDelay:(N,D)=>$.changeJobDelay(N,D),changePriority:(N,D)=>$.changeJobPriority(N,D),extendLock:(N,D,L)=>$.extendJobLock(N,D,L),clearLogs:(N,D)=>$.clearJobLogs(N,D),getDependencies:(N,D)=>$.getJobDependencies(N,D),getDependenciesCount:(N,D)=>$.getJobDependenciesCount(N,D),moveToCompleted:(N,D,L)=>$.moveJobToCompleted(N,D,L),moveToFailed:(N,D,L)=>$.moveJobToFailed(N,D,L),moveToWait:(N,D)=>$.moveJobToWait(N,D),moveToDelayed:(N,D,L)=>$.moveJobToDelayed(N,D,L),moveToWaitingChildren:(N,D,L)=>$.moveJobToWaitingChildren(N,D,L),waitUntilFinished:(N,D,L)=>$.waitJobUntilFinished(N,D,L)})}let W=$.tcp,Z=await W.send({cmd:"PUSH",queue:$.name,data:Q,priority:J.priority,delay:J.delay,maxAttempts:J.attempts,backoff:J.backoff,timeout:J.timeout,jobId:J.jobId,removeOnComplete:J.removeOnComplete,removeOnFail:J.removeOnFail,stallTimeout:J.stallTimeout,durable:J.durable,repeat:J.repeat,parentId:J.parent?.id});if(!Z.ok)throw Error(Z.error??"Failed to add job");let K=Z.id;return uQ0(K,Y,X,{queueName:$.name,tcp:W,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues})}async function pQ0($,Y){if(Y.length===0)return[];let X=Date.now();if($.embedded){let Z=h0(),K=Y.map(({name:z,data:V,opts:A})=>{let F={...$.opts.defaultJobOptions,...A},N=typeof F.removeOnComplete==="boolean"?F.removeOnComplete:!1,D=typeof F.removeOnFail==="boolean"?F.removeOnFail:!1;return{data:{name:z,...V},priority:F.priority,delay:F.delay,maxAttempts:F.attempts,backoff:F.backoff,timeout:F.timeout,customId:F.jobId,removeOnComplete:N,removeOnFail:D,repeat:F.repeat?{every:F.repeat.every,limit:F.repeat.limit,pattern:F.repeat.pattern,count:F.repeat.count,startDate:Vl(F.repeat.startDate),endDate:Vl(F.repeat.endDate),tz:F.repeat.tz,immediately:F.repeat.immediately,prevMillis:F.repeat.prevMillis,offset:F.repeat.offset,jobId:F.repeat.jobId}:void 0,durable:F.durable,lifo:F.lifo,stackTraceLimit:F.stackTraceLimit,keepLogs:F.keepLogs,sizeLimit:F.sizeLimit,failParentOnFailure:F.failParentOnFailure,removeDependencyOnFailure:F.removeDependencyOnFailure,debounceId:F.debounce?.id,debounceTtl:F.debounce?.ttl}});return(await Z.pushBatch($.name,K)).map((z,V)=>xN(String(z),Y[V].name,Y[V].data,X,{queueName:$.name,embedded:$.embedded,tcp:$.tcp,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues}))}let G=$.tcp,J=Y.map(({name:Z,data:K,opts:H})=>{let z={...$.opts.defaultJobOptions,...H};return{data:{name:Z,...K},priority:z.priority,delay:z.delay,maxAttempts:z.attempts,backoff:z.backoff,timeout:z.timeout,ttl:z.ttl,customId:z.jobId,tags:z.tags,groupId:z.groupId,uniqueKey:z.deduplication?.id,dedup:z.deduplication?{ttl:z.deduplication.ttl,extend:z.deduplication.extend,replace:z.deduplication.replace}:void 0,lifo:z.lifo,stallTimeout:z.stallTimeout,repeat:z.repeat,durable:z.durable,stackTraceLimit:z.stackTraceLimit,keepLogs:z.keepLogs,sizeLimit:z.sizeLimit,failParentOnFailure:z.failParentOnFailure,removeDependencyOnFailure:z.removeDependencyOnFailure,debounceId:z.debounce?.id,debounceTtl:z.debounce?.ttl}}),Q=await G.send({cmd:"PUSHB",queue:$.name,jobs:J});if(!Q.ok)return[];return(Q.ids??[]).map((Z,K)=>uQ0(Z,Y[K].name,Y[K].data,{queueName:$.name,tcp:G,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues}))}function Vl($){if($ instanceof Date)return $.getTime();if(typeof $==="string")return new Date($).getTime();return $}async function Ht0($,Y){if($.embedded){let W=await h0().getJob(d0(Y));if(!W)return null;let Z=W.data?.name??"unknown";if($.updateJobData){let K=h0();return cV({job:W,name:Z,getState:(H)=>$.getJobState(H),remove:(H)=>$.removeAsync(H),retry:(H)=>$.retryJob(H),getChildrenValues:(H)=>$.getChildrenValues(H),updateData:$.updateJobData,promote:$.promoteJob,changeDelay:$.changeJobDelay,changePriority:$.changeJobPriority,extendLock:$.extendJobLock,clearLogs:$.clearJobLogs,getDependencies:$.getJobDependencies,getDependenciesCount:$.getJobDependenciesCount,moveToCompleted:$.moveJobToCompleted,moveToFailed:$.moveJobToFailed,moveToWait:$.moveJobToWait,moveToDelayed:$.moveJobToDelayed?(H,z,V)=>$.moveJobToDelayed(H,z,V):void 0,moveToWaitingChildren:$.moveJobToWaitingChildren,waitUntilFinished:$.waitJobUntilFinished,discard:(H)=>{K.discard(d0(H))},getFailedChildrenValues:(H)=>K.getFailedChildrenValues(d0(H)),getIgnoredChildrenFailures:(H)=>K.getIgnoredChildrenFailures(d0(H)),removeChildDependency:(H)=>K.removeChildDependency(d0(H)),removeUnprocessedChildren:async(H)=>{await K.removeUnprocessedChildren(d0(H))}})}return xN(String(W.id),Z,W.data,W.createdAt,{queueName:$.name,embedded:$.embedded,tcp:$.tcp,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues})}let X=await $.tcp.send({cmd:"GetJob",id:Y});if(!X.ok||!X.job)return null;let G=X.job,J=G.data?.name??"unknown",Q=xN(G.id,J,G.data,Date.now(),{queueName:$.name,embedded:$.embedded,tcp:$.tcp,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues});if(G.progress!==void 0)Q.progress=G.progress;return Q}async function zt0($,Y){if($.embedded){let G=await h0().getJobState(d0(Y));return Ut0(G)}let X=await $.tcp.send({cmd:"GetState",id:Y});if(!X.ok)return"unknown";return Ut0(X.state)}function Ut0($){switch($){case"waiting":case"prioritized":case"delayed":case"active":case"completed":case"failed":case"waiting-children":return $;case"processing":return"active";case"dlq":return"failed";default:return"unknown"}}async function Vt0($,Y){if($.embedded)return h0().getChildrenValues(d0(Y));let X=await $.tcp.send({cmd:"GetChildrenValues",id:Y});if(!X.ok)return{};return X.data?.values??{}}function lV($,Y={}){if(!$.embedded)return[];return h0().getJobs($.name,{state:Y.state,start:Y.start??0,end:Y.end!==void 0&&Y.end>=0?Y.end:100}).map((J)=>{let Q=J.data?.name??"unknown";return xN(String(J.id),Q,J.data,J.createdAt,{queueName:$.name,embedded:$.embedded,tcp:$.tcp,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues})})}async function yN($,Y={}){if($.embedded)return lV($,Y);let X=Y.end!==void 0&&Y.end>=0?Y.end:1000,G=Y.start??0,J=await $.tcp.send({cmd:"GetJobs",queue:$.name,state:Y.state,offset:G,limit:X-G});if(!J.ok||!Array.isArray(J.jobs))return[];let Q=J.jobs,W=Date.now();return Q.map((Z)=>{let K=Z.data?.name??"unknown",H=xN(Z.id,K,Z.data,Z.createdAt??W,{queueName:$.name,embedded:$.embedded,tcp:$.tcp,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues});if(Z.progress!==void 0)H.progress=Z.progress;if(Z.priority!==void 0)H.priority=Z.priority;if(Z.attempts!==void 0)H.attemptsMade=Z.attempts;return H})}function At0($,Y=0,X=100){return lV($,{state:"waiting",start:Y,end:X})}async function Ft0($,Y=0,X=100){return yN($,{state:"waiting",start:Y,end:X})}function Dt0($,Y=0,X=100){return lV($,{state:"delayed",start:Y,end:X})}async function Nt0($,Y=0,X=100){return yN($,{state:"delayed",start:Y,end:X})}function Lt0($,Y=0,X=100){return lV($,{state:"active",start:Y,end:X})}async function Bt0($,Y=0,X=100){return yN($,{state:"active",start:Y,end:X})}function Ot0($,Y=0,X=100){return lV($,{state:"completed",start:Y,end:X})}async function Et0($,Y=0,X=100){return yN($,{state:"completed",start:Y,end:X})}function Mt0($,Y=0,X=100){return lV($,{state:"failed",start:Y,end:X})}async function Rt0($,Y=0,X=100){return yN($,{state:"failed",start:Y,end:X})}function dQ0($){if(!$.embedded)return{waiting:0,prioritized:0,active:0,completed:0,failed:0,delayed:0,paused:0};let Y=h0(),X=Y.getQueueJobCounts($.name),G=Y.isPaused($.name);return{waiting:X.waiting,prioritized:X.prioritized,active:X.active,completed:X.completed,failed:X.failed,delayed:X.delayed,paused:G?X.waiting:0}}async function CR($){if($.embedded)return dQ0($);let Y=await $.tcp.send({cmd:"GetJobCounts",queue:$.name});if(!Y.ok)return{waiting:0,prioritized:0,active:0,completed:0,failed:0,delayed:0,paused:0};let X=Y.counts;return{waiting:X?.waiting??0,prioritized:X?.prioritized??0,active:X?.active??0,completed:X?.completed??0,failed:X?.failed??0,delayed:X?.delayed??0,paused:X?.paused??0}}async function qt0($){return(await CR($)).waiting}async function It0($){return(await CR($)).active}async function Pt0($){return(await CR($)).completed}async function wt0($){return(await CR($)).failed}async function _t0($){if($.embedded)return h0().getJobs($.name,{state:"delayed"}).length;let Y=await $.tcp.send({cmd:"GetJobCounts",queue:$.name});if(!Y.ok)return 0;return Y.counts?.delayed??0}function cQ0($){if(!$.embedded)return 0;return h0().count($.name)}async function jt0($){if($.embedded)return cQ0($);let Y=await $.tcp.send({cmd:"Count",queue:$.name});if(!Y.ok)return 0;return Y.count??0}function lQ0($){if(!$.embedded)return{};return h0().getCountsPerPriority($.name)}async function Tt0($){if($.embedded)return lQ0($);let Y=await $.tcp.send({cmd:"GetCountsPerPriority",queue:$.name});if(!Y.ok)return{};return Y.counts??{}}function Ct0($){if($.embedded)h0().pause($.name);else if($.tcp)$.tcp.send({cmd:"Pause",queue:$.name})}function St0($){if($.embedded)h0().resume($.name);else if($.tcp)$.tcp.send({cmd:"Resume",queue:$.name})}function kt0($){if($.embedded)h0().drain($.name);else if($.tcp)$.tcp.send({cmd:"Drain",queue:$.name})}function vt0($){if($.embedded)h0().obliterate($.name);else if($.tcp)$.tcp.send({cmd:"Obliterate",queue:$.name})}function iQ0($){if(!$.embedded)return!1;return h0().isPaused($.name)}async function xt0($){if($.embedded)return iQ0($);if(!$.tcp)return!1;return(await $.tcp.send({cmd:"IsPaused",queue:$.name})).paused===!0}async function yt0($){if($.embedded)return;if($.tcp)await $.tcp.send({cmd:"Ping"})}function bt0($,Y){if($.embedded)h0().cancel(d0(Y));else $.tcp.send({cmd:"Cancel",id:Y})}async function Al($,Y){if($.embedded){h0().cancel(d0(Y));return}await $.tcp.send({cmd:"Cancel",id:Y})}async function Fl($,Y){if($.embedded){let G=h0(),J=await G.getJobState(d0(Y));if(J==="failed"){if(G.retryDlq($.name,d0(Y))===0)throw Error(`Job ${Y} is failed but not present in DLQ`);return}if(J==="active"){if(!await G.moveActiveToWait(d0(Y)))throw Error(`Failed to retry active job ${Y}`);return}if(J==="waiting"||J==="prioritized"||J==="delayed")return;throw Error(`Cannot retry job ${Y} from state '${J}'`)}let X=await $.tcp.send({cmd:"MoveToWait",id:Y});if(X.ok!==!0){let G=typeof X.error==="string"?X.error:"retry failed";throw Error(G)}}async function ht0($,Y){if($.embedded){if(Y?.state==="failed")h0().retryDlq($.name);return}if(Y?.state==="failed")await $.tcp.send({cmd:"RetryDlq",queue:$.name,count:Y?.count})}function nQ0($,Y,X,G){if(!$.embedded)return[];return h0().clean($.name,Y,G,X)}async function ft0($,Y,X,G){if($.embedded)return nQ0($,Y,X,G);let J=await $.tcp.send({cmd:"Clean",queue:$.name,grace:Y,limit:X,type:G});if(!J.ok)return[];return J.ids??[]}async function gt0($,Y){if($.embedded){let G=h0(),J=G.getJobs($.name,{state:"delayed"}),Q=Y?.count??J.length,W=0;for(let Z=0;Z<Math.min(Q,J.length);Z++)if(await G.promote(J[Z].id))W++;return W}let X=await $.tcp.send({cmd:"PromoteJobs",queue:$.name,count:Y?.count});if(!X.ok)return 0;return X.promoted??0}async function Dl($,Y){if($.embedded){await h0().promote(d0(Y));return}await $.tcp.send({cmd:"Promote",id:Y})}async function Nl($,Y,X){let G=typeof X==="number"?X:0,J=typeof X==="object"?JSON.stringify(X):void 0;if($.embedded){await h0().updateProgress(d0(Y),G,J);return}await $.tcp.send({cmd:"Progress",id:Y,progress:G,message:J})}async function mt0($,Y,X=0,G=100){if($.embedded){let K=h0().getLogs(d0(Y));return{logs:K.slice(X,G).map((z)=>`[${z.level}] ${z.message}`),count:K.length}}let J=await $.tcp.send({cmd:"GetLogs",id:Y,start:X,end:G});if(!J.ok)return{logs:[],count:0};let W=J.data?.logs??[];return{logs:W.map((K)=>`[${K.level}] ${K.message}`),count:W.length}}async function Ll($,Y,X){if($.embedded)return h0().addLog(d0(Y),X)?1:0;return(await $.tcp.send({cmd:"AddLog",id:Y,message:X})).ok?1:0}async function Bl($,Y,X){if($.embedded){h0().clearLogs(d0(Y),X);return}await $.tcp.send({cmd:"ClearLogs",id:Y,keepLogs:X})}async function Ol($,Y,X){if($.embedded){await h0().updateJobData(d0(Y),X);return}await $.tcp.send({cmd:"Update",id:Y,data:X})}async function El($,Y,X){if($.embedded){await h0().changeDelay(d0(Y),X);return}await $.tcp.send({cmd:"ChangeDelay",id:Y,delay:X})}async function Ml($,Y,X){if($.embedded){await h0().changePriority(d0(Y),X.priority);return}await $.tcp.send({cmd:"ChangePriority",id:Y,priority:X.priority})}async function ut0($,Y,X,G){if($.embedded)return await h0().extendLock(d0(Y),X,G)?G:0;return(await $.tcp.send({cmd:"ExtendLock",id:Y,token:X,duration:G})).ok?G:0}function dt0($,Y){let X=h0(),G=RR(X);ho0($,G,Vs0(Y))}function rQ0($){let Y=h0(),X=RR(Y);return fo0($,X)}function ct0($,Y){let X=h0(),G=RR(X);return Xl($,G,gJ0(Y)).map((Q)=>mQ0(Q))}function lt0($){let Y=h0(),X=RR(Y),G=Gl($,X);return{total:G.total,byReason:G.byReason,pendingRetry:G.pendingRetry,expired:G.expired,oldestEntry:G.oldestEntry,newestEntry:G.newestEntry}}function it0($,Y){let X=h0(),G=RR(X),J=gJ0(Y);if(!J)return 0;return xo0($,G,J)}function nt0($,Y){return h0().retryDlq($,Y?d0(Y):void 0)}function rt0($){return h0().purgeDlq($)}function at0($,Y){let X=h0();fJ0(X,$).setStallConfig($,Y)}function aQ0($){let Y=h0();return fJ0(Y,$).getStallConfig($)}var ot0={enabled:!0,stallInterval:30000,maxStalls:3,gracePeriod:5000},sQ0=new Map;function tt0($,Y){if($.embedded)at0($.name,Y);else if($.tcp){let X=sQ0.get($.name)??{...ot0};sQ0.set($.name,{...X,...Y}),$.tcp.send({cmd:"SetStallConfig",queue:$.name,config:Y})}}function et0($){if($.embedded)return aQ0($.name);return sQ0.get($.name)??{...ot0}}async function $e0($){if($.embedded)return aQ0($.name);if(!$.tcp)return{enabled:!0,stallInterval:30000,maxStalls:3,gracePeriod:5000};let Y=await $.tcp.send({cmd:"GetStallConfig",queue:$.name});if(!Y.ok)return{enabled:!0,stallInterval:30000,maxStalls:3,gracePeriod:5000};return Y.config}var oQ0=new Map;function Ye0($,Y){if($.embedded)dt0($.name,Y);else if($.tcp){let X=oQ0.get($.name)??{};oQ0.set($.name,{...X,...Y}),$.tcp.send({cmd:"SetDlqConfig",queue:$.name,config:Y})}}function Xe0($){if($.embedded)return rQ0($.name);let Y=oQ0.get($.name);if(Y)return Y;return{}}async function Ge0($){if($.embedded)return rQ0($.name);if(!$.tcp)return{};let Y=await $.tcp.send({cmd:"GetDlqConfig",queue:$.name});if(!Y.ok)return{};return Y.config}function Je0($,Y){if(!$.embedded)return[];return ct0($.name,Y)}function Qe0($){if(!$.embedded)return{total:0,byReason:{},pendingRetry:0,expired:0,oldestEntry:null,newestEntry:null};return lt0($.name)}function We0($,Y){if($.embedded)return nt0($.name,Y);if($.tcp)$.tcp.send({cmd:"RetryDlq",queue:$.name,id:Y});return 0}function Ze0($,Y){if(!$.embedded)return 0;return it0($.name,Y)}function Ke0($){if($.embedded)return rt0($.name);if($.tcp)$.tcp.send({cmd:"PurgeDlq",queue:$.name});return 0}function tQ0($,Y){if($.embedded){let X=Y?d0(Y):void 0;return h0().retryCompleted($.name,X)}if($.tcp)$.tcp.send({cmd:"RetryCompleted",queue:$.name,id:Y});return 0}async function Ue0($,Y){if($.embedded)return tQ0($,Y);if(!$.tcp)return 0;let X=await $.tcp.send({cmd:"RetryCompleted",queue:$.name,id:Y});if(!X.ok)return 0;return X.count??0}function He0($,Y){if($.embedded)h0().setConcurrency($.name,Y);else if($.tcp)$.tcp.send({cmd:"SetConcurrency",queue:$.name,limit:Y})}function ze0($){if($.embedded)h0().clearConcurrency($.name);else if($.tcp)$.tcp.send({cmd:"ClearConcurrency",queue:$.name})}function Ve0($){return Promise.resolve(null)}function Ae0($,Y,X){if($.embedded)h0().setRateLimit($.name,Y);else if($.tcp)$.tcp.send({cmd:"RateLimit",queue:$.name,limit:Y})}function Fe0($){if($.embedded)h0().clearRateLimit($.name);else if($.tcp)$.tcp.send({cmd:"RateLimitClear",queue:$.name})}function De0($){return Promise.resolve(null)}async function Ne0($,Y){if($.embedded)h0().setRateLimit($.name,1),setTimeout(()=>{h0().clearRateLimit($.name)},Y);else if($.tcp)await $.tcp.send({cmd:"RateLimit",queue:$.name,limit:1})}function Le0($,Y){return Promise.resolve(0)}function Be0($){return Promise.resolve(!1)}function eQ0($,Y){return $.prefixKey?`${$.prefixKey}${Y}`:Y}function iV($,Y){if($.prefixKey&&Y.startsWith($.prefixKey))return Y.slice($.prefixKey.length);return Y}function ng4($){if(!$)return{};return $.name?{name:$.name,...$.data??{}}:$.data??{}}function rg4($){let Y=$?.opts?.deduplication;if(!Y)return{uniqueKey:void 0,dedup:void 0};return{uniqueKey:Y.id,dedup:{ttl:Y.ttl,extend:Y.extend,replace:Y.replace}}}async function Oe0($,Y,X,G){let{pattern:J,every:Q}=X,W=ng4(G),Z=rg4(G),K=eQ0($,Y);if($.embedded)return h0().addCron({name:K,queue:$.name,data:W,schedule:J,repeatEvery:Q,timezone:X.timezone??"UTC",skipMissedOnRestart:X.skipMissedOnRestart,immediately:X.immediately,skipIfNoWorker:X.skipIfNoWorker,preventOverlap:X.preventOverlap,...Z}),{id:Y,name:G?.name??"default",next:Date.now()+(Q??60000)};let H=await $.tcp.send({cmd:"Cron",name:K,queue:$.name,data:W,schedule:J,repeatEvery:Q,timezone:X.timezone,skipMissedOnRestart:X.skipMissedOnRestart,immediately:X.immediately,skipIfNoWorker:X.skipIfNoWorker,preventOverlap:X.preventOverlap,...Z});if(!H.ok)return null;return{id:Y,name:G?.name??"default",next:H.nextRun??Date.now()}}async function Ee0($,Y){let X=eQ0($,Y);if($.embedded)return h0().removeCron(X),!0;return(await $.tcp.send({cmd:"CronDelete",name:X})).ok===!0}async function Me0($,Y){let X=eQ0($,Y);if($.embedded){let Z=h0().listCrons().find((K)=>K.name===X&&K.queue===$.name);if(!Z)return null;return{id:iV($,Z.name),name:iV($,Z.name),next:Z.nextRun,pattern:Z.schedule??void 0,every:Z.repeatEvery??void 0}}let G=await $.tcp.send({cmd:"CronList"});if(!G.ok)return null;let Q=G.crons?.find((W)=>W.name===X&&(W.queue===void 0||W.queue===$.name));if(!Q)return null;return{id:iV($,Q.name),name:iV($,Q.name),next:Q.nextRun,pattern:Q.schedule??void 0,every:Q.repeatEvery??void 0}}async function $W0($,Y=0,X=-1,G=!0){if($.embedded)return h0().listCrons().filter((W)=>W.queue===$.name).map((W)=>({id:iV($,W.name),name:iV($,W.name),next:W.nextRun,pattern:W.schedule??void 0,every:W.repeatEvery??void 0}));let J=await $.tcp.send({cmd:"CronList"});if(!J.ok)return[];return(J.crons??[]).filter((W)=>W.queue===$.name).map((W)=>({id:iV($,W.name),name:iV($,W.name),next:W.nextRun,pattern:W.schedule??void 0,every:W.repeatEvery??void 0}))}async function Re0($){return(await $W0($)).length}function qe0($,Y){if($.embedded){let X=h0().getJobByCustomId(Y);return Promise.resolve(X?String(X.id):null)}return Promise.resolve(null)}function Ie0($,Y){if($.embedded){if(h0().getJobByCustomId(Y))return Promise.resolve(1);return Promise.resolve(0)}return Promise.resolve(0)}async function Pe0($,Y,X,G){if($.embedded)return await h0().ack(d0(Y),X),null;return await $.tcp.send({cmd:"ACK",id:Y,result:X}),null}async function we0($,Y,X,G){if($.embedded)await h0().fail(d0(Y),X.message);else await $.tcp.send({cmd:"FAIL",id:Y,error:X.message})}async function _e0($,Y,X){if($.embedded){let J=h0(),Q=await $.getJobState(Y);if(Q==="failed"){let W=await J.getJob(d0(Y));if(!W)return!1;return J.retryDlq(W.queue,d0(Y))>0}if(Q==="active")return J.moveActiveToWait(d0(Y));if(Q==="delayed")return J.promote(d0(Y));if(Q==="waiting"||Q==="prioritized")return!0;return!1}return(await $.tcp.send({cmd:"MoveToWait",id:Y})).ok===!0}async function je0($,Y,X,G){if($.embedded){let J=Math.max(0,X-Date.now()),Q=h0(),W=await $.getJobState(Y);if(W==="failed"){let Z=await Q.getJob(d0(Y));if(!Z)return;if(Q.retryDlq(Z.queue,d0(Y))>0&&J>0)await Q.changeWaitingDelay(d0(Y),J)}else if(W==="waiting"||W==="prioritized"||W==="delayed")await Q.changeWaitingDelay(d0(Y),J);else await Q.changeDelay(d0(Y),J)}else await $.tcp.send({cmd:"MoveToDelayed",id:Y,timestamp:X})}async function Te0($,Y,X,G){if($.embedded)return h0().moveToWaitingChildren(d0(Y));return!1}async function Ce0($,Y,X,G){return new Promise((J,Q)=>{let W=G?setTimeout(()=>{z(),Q(Error(`Job ${Y} timed out after ${G}ms`))},G):null,Z=X,K=(V)=>{if(V.jobId===Y)z(),J(V.returnvalue)},H=(V)=>{if(V.jobId===Y)z(),Q(Error(V.failedReason??"Job failed"))},z=()=>{if(W)clearTimeout(W);Z.off("completed",K),Z.off("failed",H)};Z.on("completed",K),Z.on("failed",H),$.getJobState(Y).then((V)=>{if(V==="completed")if(z(),$.embedded){let A=h0().getResult(d0(Y));J(A)}else J(void 0);else if(V==="failed")z(),Q(Error("Job already failed"))})})}async function YW0($){if($.embedded)return[];let Y=await $.tcp.send({cmd:"ListWorkers"});if(!Y.ok)return[];return Y.workers??[]}async function Se0($){return(await YW0($)).length}async function ke0($,Y,X,G){if($.embedded){let Z=h0().getStats();return{meta:{count:Y==="completed"?Z.completed:Z.dlq},data:[]}}let J=await $.tcp.send({cmd:"Metrics"});if(!J.ok)return{meta:{count:0},data:[]};let Q=J.stats;return{meta:{count:Y==="completed"?Q?.completed??0:Q?.dlq??0},data:[]}}function ve0($,Y){return Promise.resolve(0)}function xe0($,Y=0,X=-1){return $.getPrioritizedAsync(Y,X)}async function ye0($){return(await $.getPrioritizedAsync(0,1000)).length}async function XW0($,Y=0,X=-1){if($.embedded)return h0().getJobs($.name,{state:"delayed",start:Y,end:X===-1?1000:X}).filter((J)=>{return J.data?._waitingParent===!0}).map((J)=>{let Q=J.data;return cV({job:J,name:Q?.name??"default",getState:$.getJobState,remove:$.removeAsync,retry:$.retryJob,getChildrenValues:$.getChildrenValues,updateData:$.updateJobData,promote:$.promoteJob,changeDelay:$.changeJobDelay,changePriority:$.changeJobPriority,extendLock:$.extendJobLock,clearLogs:$.clearJobLogs,getDependencies:$.getJobDependencies,getDependenciesCount:$.getJobDependenciesCount})});return[]}async function be0($){return(await XW0($)).length}function he0($,Y,X,G,J){return Promise.resolve({processed:{},unprocessed:[]})}async function GW0($,Y,X){if($.embedded){let G=h0(),J=await G.getJob(d0(Y));if(!J)return{processed:{},unprocessed:[]};let Q=J.childrenIds,W={},Z=[];for(let K of Q){let H=G.getResult(K);if(H!==void 0){let z=await G.getJob(K),V=z?`${z.queue}:${K}`:String(K);W[V]=H}else Z.push(String(K))}return{processed:W,unprocessed:Z}}return{processed:{},unprocessed:[]}}async function fe0($,Y,X){if($.embedded){let G=await GW0($,Y);return{processed:Object.keys(G.processed).length,unprocessed:G.unprocessed.length}}return{processed:0,unprocessed:0}}class nV{name;queueKey;prefixKey;opts;embedded;tcpPool;useSharedPool;addBatcher;constructor($,Y={}){if(this.name=$,this.prefixKey=Y.prefixKey??"",this.queueKey=this.prefixKey+$,this.opts=Y,this.embedded=Y.embedded??Hs0,this.embedded)h0(Y.dataPath),this.tcpPool=null,this.useSharedPool=!1,this.addBatcher=null;else{let X=Y.connection??{},G=X.poolSize??4,J=gc(X.token);if(G===4&&!J)this.tcpPool=MR({host:X.host,port:X.port,poolSize:G,pingInterval:X.pingInterval,commandTimeout:X.commandTimeout,pipelining:X.pipelining,maxInFlight:X.maxInFlight}),this.useSharedPool=!0;else this.tcpPool=new CH({host:X.host??"localhost",port:X.port??6789,token:J,poolSize:G,pingInterval:X.pingInterval,commandTimeout:X.commandTimeout,pipelining:X.pipelining,maxInFlight:X.maxInFlight}),this.useSharedPool=!1;let Q=Y.autoBatch;if(Q?.enabled===!1)this.addBatcher=null;else this.addBatcher=new mJ0({maxSize:Q?.maxSize??50,maxDelayMs:Q?.maxDelayMs??5},(W)=>pQ0(this.addCtx,W))}}get ctx(){return{name:this.queueKey,embedded:this.embedded,tcp:this.tcpPool,prefixKey:this.prefixKey}}get addCtx(){return{...this.ctx,opts:this.opts,getJobState:($)=>this.getJobState($),removeAsync:($)=>this.removeAsync($),retryJob:($)=>this.retryJob($),getChildrenValues:($)=>this.getChildrenValues($),updateJobData:($,Y)=>this.updateJobData($,Y),promoteJob:($)=>this.promoteJob($),changeJobDelay:($,Y)=>this.changeJobDelay($,Y),changeJobPriority:($,Y)=>this.changeJobPriority($,Y),extendJobLock:($,Y,X)=>this.extendJobLock($,Y,X),clearJobLogs:($,Y)=>this.clearJobLogs($,Y),getJobDependencies:($,Y)=>this.getJobDependencies($,Y),getJobDependenciesCount:($,Y)=>this.getJobDependenciesCount($,Y),moveJobToCompleted:($,Y,X)=>this.moveJobToCompleted($,Y,X),moveJobToFailed:($,Y,X)=>this.moveJobToFailed($,Y,X),moveJobToWait:($,Y)=>this.moveJobToWait($,Y),moveJobToDelayed:($,Y,X)=>this.moveJobToDelayed($,Y,X),moveJobToWaitingChildren:($,Y,X)=>this.moveJobToWaitingChildren($,Y,X),waitJobUntilFinished:($,Y,X)=>this.waitJobUntilFinished($,Y,X)}}get queryCtx(){return{...this.ctx,getJobState:($)=>this.getJobState($),removeAsync:($)=>this.removeAsync($),retryJob:($)=>this.retryJob($),getChildrenValues:($)=>this.getChildrenValues($),updateJobData:($,Y)=>this.updateJobData($,Y),promoteJob:($)=>this.promoteJob($),changeJobDelay:($,Y)=>this.changeJobDelay($,Y),changeJobPriority:($,Y)=>this.changeJobPriority($,Y),extendJobLock:($,Y,X)=>this.extendJobLock($,Y,X),clearJobLogs:($,Y)=>this.clearJobLogs($,Y),getJobDependencies:($,Y)=>this.getJobDependencies($,Y),getJobDependenciesCount:($,Y)=>this.getJobDependenciesCount($,Y),moveJobToCompleted:($,Y,X)=>this.moveJobToCompleted($,Y,X),moveJobToFailed:($,Y,X)=>this.moveJobToFailed($,Y,X),moveJobToWait:($,Y)=>this.moveJobToWait($,Y),moveJobToDelayed:($,Y,X)=>this.moveJobToDelayed($,Y,X),moveJobToWaitingChildren:($,Y,X)=>this.moveJobToWaitingChildren($,Y,X),waitJobUntilFinished:($,Y,X)=>this.waitJobUntilFinished($,Y,X)}}get moveCtx(){return{...this.ctx,getJobState:($)=>this.getJobState($),getJobDependencies:($)=>this.getJobDependencies($)}}add($,Y,X){if(this.addBatcher&&!X?.durable)return this.addBatcher.enqueue($,Y,X);return Kt0(this.addCtx,$,Y,X)}addBulk($){return pQ0(this.addCtx,$)}getJob($){return Ht0(this.queryCtx,$)}getJobState($){return zt0(this.queryCtx,$)}getChildrenValues($){return Vt0(this.queryCtx,$)}getJobs($){return lV(this.queryCtx,$)}getJobsAsync($){return yN(this.queryCtx,$)}getWaiting($,Y){return At0(this.queryCtx,$,Y)}getWaitingAsync($,Y){return Ft0(this.queryCtx,$,Y)}getDelayed($,Y){return Dt0(this.queryCtx,$,Y)}getDelayedAsync($,Y){return Nt0(this.queryCtx,$,Y)}getActive($,Y){return Lt0(this.queryCtx,$,Y)}getActiveAsync($,Y){return Bt0(this.queryCtx,$,Y)}getCompleted($,Y){return Ot0(this.queryCtx,$,Y)}getCompletedAsync($,Y){return Et0(this.queryCtx,$,Y)}getFailed($,Y){return Mt0(this.queryCtx,$,Y)}getFailedAsync($,Y){return Rt0(this.queryCtx,$,Y)}getJobCounts(){return dQ0(this.ctx)}getJobCountsAsync(){return CR(this.ctx)}getWaitingCount(){return qt0(this.ctx)}getActiveCount(){return It0(this.ctx)}getCompletedCount(){return Pt0(this.ctx)}getFailedCount(){return wt0(this.ctx)}getDelayedCount(){return _t0(this.ctx)}count(){return cQ0(this.ctx)}countAsync(){return jt0(this.ctx)}getCountsPerPriority(){return lQ0(this.ctx)}getCountsPerPriorityAsync(){return Tt0(this.ctx)}pause(){Ct0(this.ctx)}resume(){St0(this.ctx)}drain(){kt0(this.ctx)}obliterate(){vt0(this.ctx)}isPaused(){return iQ0(this.ctx)}isPausedAsync(){return xt0(this.ctx)}waitUntilReady(){return yt0(this.ctx)}remove($){bt0(this.ctx,$)}removeAsync($){return Al(this.ctx,$)}retryJob($){return Fl(this.ctx,$)}retryJobs($){return ht0(this.ctx,$)}clean($,Y,X){return nQ0(this.ctx,$,Y,X)}cleanAsync($,Y,X){return ft0(this.ctx,$,Y,X)}promoteJobs($){return gt0(this.ctx,$)}promoteJob($){return Dl(this.ctx,$)}updateJobProgress($,Y){return Nl(this.ctx,$,Y)}getJobLogs($,Y,X,G){return mt0(this.ctx,$,Y,X)}addJobLog($,Y,X){return Ll(this.ctx,$,Y)}clearJobLogs($,Y){return Bl(this.ctx,$,Y)}updateJobData($,Y){return Ol(this.ctx,$,Y)}changeJobDelay($,Y){return El(this.ctx,$,Y)}changeJobPriority($,Y){return Ml(this.ctx,$,Y)}extendJobLock($,Y,X){return ut0(this.ctx,$,Y,X)}setStallConfig($){tt0(this.ctx,$)}getStallConfig(){return et0(this.ctx)}getStallConfigAsync(){return $e0(this.ctx)}setDlqConfig($){Ye0(this.ctx,$)}getDlqConfig(){return Xe0(this.ctx)}getDlqConfigAsync(){return Ge0(this.ctx)}getDlq($){return Je0(this.ctx,$)}getDlqStats(){return Qe0(this.ctx)}retryDlq($){return We0(this.ctx,$)}retryDlqByFilter($){return Ze0(this.ctx,$)}purgeDlq(){return Ke0(this.ctx)}retryCompleted($){return tQ0(this.ctx,$)}retryCompletedAsync($){return Ue0(this.ctx,$)}setGlobalConcurrency($){He0(this.ctx,$)}removeGlobalConcurrency(){ze0(this.ctx)}getGlobalConcurrency(){return Ve0(this.ctx)}setGlobalRateLimit($,Y){Ae0(this.ctx,$,Y)}removeGlobalRateLimit(){Fe0(this.ctx)}getGlobalRateLimit(){return De0(this.ctx)}rateLimit($){return Ne0(this.ctx,$)}getRateLimitTtl($){return Le0(this.ctx,$)}isMaxed(){return Be0(this.ctx)}upsertJobScheduler($,Y,X){return Oe0(this.ctx,$,Y,X)}removeJobScheduler($){return Ee0(this.ctx,$)}getJobScheduler($){return Me0(this.ctx,$)}getJobSchedulers($,Y,X){return $W0(this.ctx,$,Y,X)}getJobSchedulersCount(){return Re0(this.ctx)}getDeduplicationJobId($){return qe0(this.ctx,$)}removeDeduplicationKey($){return Ie0(this.ctx,$)}moveJobToCompleted($,Y,X){return Pe0(this.moveCtx,$,Y,X)}moveJobToFailed($,Y,X){return we0(this.moveCtx,$,Y,X)}moveJobToWait($,Y){return _e0(this.moveCtx,$,Y)}moveJobToDelayed($,Y,X){return je0(this.moveCtx,$,Y,X)}moveJobToWaitingChildren($,Y,X){return Te0(this.moveCtx,$,Y,X)}waitJobUntilFinished($,Y,X){return Ce0(this.moveCtx,$,Y,X)}getJobDependencies($,Y){return GW0(this.addCtx,$,Y)}getJobDependenciesCount($,Y){return fe0(this.addCtx,$,Y)}getDependencies($,Y,X,G){return he0(this.addCtx,$,Y,X,G)}getPrioritized($,Y){return xe0({...this.addCtx,getWaitingAsync:(X,G)=>this.getWaitingAsync(X,G),getPrioritizedAsync:(X,G)=>this.getJobsAsync({state:"prioritized",start:X,end:G})},$,Y)}getPrioritizedCount(){return ye0({...this.addCtx,getWaitingAsync:($,Y)=>this.getWaitingAsync($,Y),getPrioritizedAsync:($,Y)=>this.getJobsAsync({state:"prioritized",start:$,end:Y})})}getWaitingChildren($,Y){return XW0(this.addCtx,$,Y)}getWaitingChildrenCount(){return be0(this.addCtx)}trimEvents($){return ve0(this.ctx,$)}getWorkers(){return YW0(this.ctx)}getWorkersCount(){return Se0(this.ctx)}getMetrics($,Y,X){return ke0(this.ctx,$,Y,X)}async disconnect(){if(this.addBatcher)await this.addBatcher.flush(),await this.addBatcher.waitForInFlight(),this.addBatcher.stop();this.close()}close(){if(this.addBatcher?.stop(),this.tcpPool)if(this.useSharedPool)FS(this.tcpPool);else this.tcpPool.close()}}import{EventEmitter as Qm4}from"events";import{hostname as Wm4}from"os";var ge0=Bun.env.BUNQUEUE_EMBEDDED==="1",PS={MAX_BACKOFF_MS:30000,BASE_BACKOFF_MS:100,MAX_POLL_TIMEOUT:30000,DEFAULT_ACK_INTERVAL:50};var $m4=3,Ym4=100;class JW0{MAX_PENDING_ACKS=1e4;pendingAcks=[];ackTimer=null;config;tcp=null;stopped=!1;inFlightFlushes=new Set;constructor($){this.config=$}setTcp($){this.tcp=$}queue($,Y,X){return new Promise((G,J)=>{if(this.pendingAcks.length>=this.MAX_PENDING_ACKS){let Q=this.pendingAcks.splice(0,Math.floor(this.MAX_PENDING_ACKS*0.1));for(let W of Q)W.reject(Error("Ack buffer overflow - oldest entries dropped"))}if(this.pendingAcks.push({id:$,result:Y,token:X,resolve:G,reject:J}),this.pendingAcks.length>=this.config.batchSize){let Q=this.flush();this.inFlightFlushes.add(Q),Q.finally(()=>this.inFlightFlushes.delete(Q))}else this.ackTimer??=setTimeout(()=>{this.ackTimer=null;let Q=this.flush();this.inFlightFlushes.add(Q),Q.finally(()=>this.inFlightFlushes.delete(Q))},this.config.interval)})}async flush(){if(this.pendingAcks.length===0)return;let $=this.pendingAcks.splice(0,this.pendingAcks.length);if(this.ackTimer)clearTimeout(this.ackTimer),this.ackTimer=null;await this.sendBatchWithRetry($)}async sendBatchWithRetry($){let Y=this.config.maxRetries??$m4,X=this.config.retryDelayMs??Ym4,G=null;for(let J=0;J<=Y;J++){if(this.stopped){let Q=Error("AckBatcher stopped");for(let W of $)W.reject(Q);return}try{if(this.config.embedded){let Q=h0(),W=$.map((Z)=>({id:d0(Z.id),result:Z.result,token:Z.token}));await Q.ackBatchWithResults(W)}else if(this.tcp){let Q=await this.tcp.send({cmd:"ACKB",ids:$.map((W)=>W.id),results:$.map((W)=>W.result),tokens:$.map((W)=>W.token??"")});if(!Q.ok)throw Error(Q.error??"Batch ACK failed")}for(let Q of $)Q.resolve();return}catch(Q){if(G=Q instanceof Error?Q:Error(String(Q)),J<Y){let W=X*Math.pow(2,J);await Bun.sleep(W)}}}console.error(`[AckBatcher] Flush failed after ${Y+1} attempts:`,G?.message,`(${$.length} acks lost)`);for(let J of $)J.reject(G??Error("Unknown error"))}stop(){if(this.stopped=!0,this.ackTimer)clearTimeout(this.ackTimer),this.ackTimer=null;this.pendingAcks.length=0}hasPending(){return this.pendingAcks.length>0}async waitForInFlight(){if(this.inFlightFlushes.size===0)return;await Promise.all(this.inFlightFlushes)}}function SR($,Y){return{id:d0($.id),queue:Y,data:$.data,priority:$.priority??0,createdAt:$.createdAt??Date.now(),runAt:$.runAt??Date.now(),startedAt:$.startedAt??Date.now(),completedAt:null,attempts:$.attempts??0,maxAttempts:$.maxAttempts??3,backoff:$.backoff??1000,ttl:$.ttl??null,timeout:$.timeout??null,uniqueKey:$.uniqueKey??null,customId:$.customId??null,progress:$.progress??0,progressMessage:$.progressMessage??null,dependsOn:Array.isArray($.dependsOn)?$.dependsOn:[],parentId:$.parentId??null,childrenIds:Array.isArray($.childrenIds)?$.childrenIds:[],childrenCompleted:$.childrenCompleted??0,tags:Array.isArray($.tags)?$.tags:[],groupId:$.groupId??null,lifo:!1,removeOnComplete:$.removeOnComplete??!1,removeOnFail:!1,stallCount:0,stallTimeout:null,lastHeartbeat:Date.now(),repeat:null}}class wS extends Error{constructor($){super($);this.name="UnrecoverableError"}}class Rl extends Error{constructor($){super($);this.name="DelayedError"}}function QW0($,Y,X,G){return async(J,Q,W)=>{if($)await h0().updateProgress(d0(J),Q,W);else if(Y)await Y.send({cmd:"Progress",id:J,progress:Q,message:W});X.emit("progress",G.current,Q)}}function WW0($,Y,X,G){return async(J,Q)=>{if($)h0().addLog(d0(J),Q);else if(Y)await Y.send({cmd:"AddLog",id:J,message:Q});X.emit("log",G.current,Q)}}function ZW0($,Y){return async(X)=>{if($)return await h0().getJobState(d0(X));else if(Y)return(await Y.send({cmd:"GetState",id:X})).state??"unknown";return"unknown"}}function KW0($,Y){return async(X)=>{if($)return h0().getChildrenValues(d0(X));else if(Y)return(await Y.send({cmd:"GetChildrenValues",id:X})).data?.values??{};return{}}}function UW0($,Y){return async(X)=>{if($)return h0().getFailedChildrenValues(d0(X));if(!Y)return{};return(await Y.send({cmd:"GetFailedChildrenValues",id:X})).values??{}}}function HW0($,Y){return async(X)=>{if($)return h0().getIgnoredChildrenFailures(d0(X));if(!Y)return{};return(await Y.send({cmd:"GetIgnoredChildrenFailures",id:X})).values??{}}}function zW0($,Y){return async(X)=>{if($)return h0().removeChildDependency(d0(X));if(!Y)return!1;return(await Y.send({cmd:"RemoveChildDependency",id:X})).ok===!0}}function VW0($,Y){return async(X)=>{if($)return h0().removeUnprocessedChildren(d0(X));if(!Y)return;await Y.send({cmd:"RemoveUnprocessedChildren",id:X})}}function me0($,Y,X,G,J){return async(Q,W,Z)=>{if($)await h0().fail(X.id,W.message,G??void 0);else if(Y)await Y.send({cmd:"FAIL",id:X.id,error:W.message,...G?{token:G}:{}});J(W)}}function ue0($,Y,X,G,J){return async(Q,W,Z)=>{if($)await h0().ack(X.id,W,G??void 0);else await Y.queue(String(X.id),W,G??void 0);return J(W),null}}function AW0($,Y){return async(X)=>{if($){await h0().cancel(d0(X));return}if(!Y)return;await Y.send({cmd:"Cancel",id:X})}}function FW0($,Y,X){return async(G)=>{if($){let Q=h0(),W=await Q.getJobState(d0(G));if(W==="failed"){if(Q.retryDlq(X.queue,d0(G))===0)throw Error(`Job ${G} is failed but not present in DLQ`);return}if(W==="active"){if(!await Q.moveActiveToWait(d0(G)))throw Error(`Failed to retry active job ${G}`);return}if(W==="waiting"||W==="prioritized"||W==="delayed")return;throw Error(`Cannot retry job ${G} from state '${W}'`)}if(!Y)return;let J=await Y.send({cmd:"MoveToWait",id:G});if(J.ok!==!0){let Q=typeof J.error==="string"?J.error:"retry failed";throw Error(Q)}}}function DW0($,Y){return async(X,G)=>{if($){await h0().updateJobData(d0(X),G);return}if(!Y)return;await Y.send({cmd:"Update",id:X,data:G})}}function NW0($,Y){return async(X)=>{if($){await h0().promote(d0(X));return}if(!Y)return;await Y.send({cmd:"Promote",id:X})}}function LW0($,Y){return async(X,G)=>{if($){await h0().changeDelay(d0(X),G);return}if(!Y)return;await Y.send({cmd:"ChangeDelay",id:X,delay:G})}}function BW0($,Y){return async(X,G)=>{if($){await h0().changePriority(d0(X),G.priority);return}if(!Y)return;await Y.send({cmd:"ChangePriority",id:X,priority:G.priority})}}function OW0($,Y){return async(X,G,J)=>{if($)return await h0().extendLock(d0(X),G,J)?J:0;if(!Y)return 0;return(await Y.send({cmd:"ExtendLock",id:X,token:G,duration:J})).ok===!0?J:0}}function EW0($,Y){return async(X,G)=>{if($){h0().clearLogs(d0(X),G);return}if(!Y)return;await Y.send({cmd:"ClearLogs",id:X,keepLogs:G})}}function MW0($,Y){return async(X,G)=>{if($)return await h0().moveActiveToWait(d0(X));if(!Y)return!1;return(await Y.send({cmd:"MoveToWait",id:X})).ok===!0}}function RW0($,Y){return async(X,G,J)=>{let Q=Math.max(0,G-Date.now());if($){await h0().moveToDelayed(d0(X),Q);return}if(!Y)return;await Y.send({cmd:"MoveToDelayed",id:X,delay:Q})}}function qW0($,Y){return async(X)=>{if($)return await h0().moveToWaitingChildren(d0(X));if(!Y)return!1;throw Error("moveToWaitingChildren is not supported in TCP mode \u2014 no server command available")}}function IW0($,Y){return async(X,G,J)=>{let Q=J??30000;if($){let K=h0(),H=await K.getJob(d0(X));if(!H)throw Error(`Job ${X} not found`);if(H.completedAt)return K.getResult(d0(X));if(!await K.waitForJobCompletion(d0(X),Q))throw Error(`waitUntilFinished timed out after ${Q}ms`);return K.getResult(d0(X))}if(!Y)throw Error("waitUntilFinished: no connection");let Z=await Y.send({cmd:"WaitJob",id:X,timeout:Q});if(!Z.completed)throw Error(`waitUntilFinished timed out after ${Q}ms`);return Z.result}}function PW0($,Y){return(X)=>{if($){h0().discard(d0(X));return}if(!Y)return;Y.send({cmd:"Discard",id:X})}}function ql($,Y,X){return async()=>{let G=X.childrenIds,J={},Q=[];for(let W of G){let Z="unknown",K;if($){let z=h0();if(Z=await z.getJobState(W),Z==="completed")K=z.getResult(W)}else if(Y){if(Z=(await Y.send({cmd:"GetState",id:String(W)})).state??"unknown",Z==="completed")K=(await Y.send({cmd:"GetResult",id:String(W)})).result}let H=`${X.queue}:${String(W)}`;if(Z==="completed"||Z==="failed")J[H]=K??null;else Q.push(H)}return{processed:J,unprocessed:Q}}}function wW0($,Y,X){let G=ql($,Y,X);return async(J)=>{let Q=await G(J);return{processed:Object.keys(Q.processed).length,unprocessed:Q.unprocessed.length}}}function _W0(){return()=>Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available"))}async function jW0($,Y){let{processor:X,embedded:G,tcp:J,ackBatcher:Q,emitter:W,token:Z}=Y,H=$.data?.name??"default",z=String($.id),V={current:null},A={result:null},F=me0(G,J,$,Z,(L)=>{A.result={type:"failed",error:L}}),N=ue0(G,Q,$,Z,(L)=>{A.result={type:"completed",value:L}}),D=zl({job:$,name:H,updateProgress:QW0(G,J,W,V),log:WW0(G,J,W,V),getState:ZW0(G,J),getChildrenValues:KW0(G,J),getFailedChildrenValues:UW0(G,J),getIgnoredChildrenFailures:HW0(G,J),removeChildDependency:zW0(G,J),removeUnprocessedChildren:VW0(G,J),moveToFailed:F,moveToCompleted:N,remove:AW0(G,J),retry:FW0(G,J,$),updateData:DW0(G,J),promote:NW0(G,J),changeDelay:LW0(G,J),changePriority:BW0(G,J),extendLock:OW0(G,J),clearLogs:EW0(G,J),moveToWait:MW0(G,J),moveToDelayed:RW0(G,J),moveToWaitingChildren:qW0(G,J),waitUntilFinished:IW0(G,J),discard:PW0(G,J),getDependencies:ql(G,J,$),getDependenciesCount:wW0(G,J,$),removeDeduplicationKey:_W0(),token:Z??void 0});V.current=D,W.emit("active",D);try{let L=await X(D);if(pe0(A,D,Y))return;try{if(G)await h0().ack($.id,L,Z??void 0);else await Q.queue(z,L,Z??void 0)}catch(B){let O=B instanceof Error?B:Error(String(B));if(TW0(O)){W.emit("error",Object.assign(O,{context:"ack-stale",jobId:z}));return}throw B}D.returnvalue=L,Y.onOutcome?.(!0),W.emit("completed",D,L)}catch(L){if(pe0(A,D,Y))return;await Gm4($,L,Y,{job:D,jobIdStr:z,token:Z})}}function pe0($,Y,X){if($.result?.type==="failed"){let G=$.result.error??Error("Job manually moved to failed");return Y.failedReason=G.message,X.onOutcome?.(!1),X.emitter.emit("failed",Y,G),!0}if($.result?.type==="completed")return Y.returnvalue=$.result.value,X.onOutcome?.(!0),X.emitter.emit("completed",Y,$.result.value),!0;return!1}function TW0($){return $.message.includes("not found")||$.message.includes("not in processing")}async function Xm4($,Y,X){let{embedded:G,tcp:J,emitter:Q}=Y;try{if(G)await h0().moveToDelayed($.id,$.backoff||1000);else if(J)await J.send({cmd:"MoveToDelayed",id:$.id,delay:$.backoff||1000,...X.token?{token:X.token}:{}})}catch(W){let Z=W instanceof Error?W:Error(String(W));if(!TW0(Z))Q.emit("error",Object.assign(Z,{context:"delay",jobId:X.jobIdStr}))}}async function Gm4($,Y,X,G){let{embedded:J,tcp:Q,emitter:W}=X,{job:Z,jobIdStr:K,token:H}=G,z=Y instanceof Error?Y:Error(String(Y));if(z instanceof Rl){await Xm4($,X,{jobIdStr:K,token:H});return}if(z instanceof wS)$.maxAttempts=1,$.attempts=0;try{if(J)await h0().fail($.id,z.message,H??void 0);else if(Q)await Q.send({cmd:"FAIL",id:$.id,error:z.message,...H?{token:H}:{},...z instanceof wS?{unrecoverable:!0}:{}})}catch(V){let A=V instanceof Error?V:Error(String(V));if(TW0(A))return;W.emit("error",Object.assign(A,{context:"fail",jobId:K}))}if(Z.failedReason=z.message,z.stack){let V=$.stackTraceLimit,A=z.stack.split(`
`).map((F)=>F.trim()).filter(Boolean);Z.stacktrace=A.slice(0,V)}X.onOutcome?.(!1),W.emit("failed",Z,z)}class CW0{limiter;limiterTokens=[];head=0;rateLimitExpiration=0;constructor($){this.limiter=$}canProcessWithinLimit(){if(!this.limiter)return!0;let $=Date.now()-this.limiter.duration;return this.evictExpired($),this.activeCount()<this.limiter.max}recordJobForLimiter(){if(!this.limiter)return;this.limiterTokens.push(Date.now())}getTimeUntilNextSlot(){if(!this.limiter)return 0;let $=Date.now(),Y=$-this.limiter.duration;if(this.evictExpired(Y),this.activeCount()<this.limiter.max)return 0;return this.limiterTokens[this.head]+this.limiter.duration-$}getRateLimiterInfo(){if(!this.limiter)return null;let $=Date.now()-this.limiter.duration;return this.evictExpired($),{current:this.activeCount(),max:this.limiter.max,duration:this.limiter.duration}}rateLimit($){if($<=0)return;if(this.limiter){let Y=Date.now();for(let X=0;X<this.limiter.max;X++)this.limiterTokens.push(Y+$-this.limiter.duration)}this.rateLimitExpiration=Date.now()+$}isRateLimited(){return Date.now()<this.rateLimitExpiration}activeCount(){return this.limiterTokens.length-this.head}evictExpired($){while(this.head<this.limiterTokens.length&&this.limiterTokens[this.head]<=$)this.head++;if(this.head>0&&this.head>this.limiterTokens.length/2)this.limiterTokens=this.limiterTokens.slice(this.head),this.head=0}}class Il{groupKey;maxPerGroup;activeByGroup=new Map;constructor($,Y){this.groupKey=$,this.maxPerGroup=Y}static fromOptions($){if(!$?.groupKey)return null;return new Il($.groupKey,$.max)}getGroupValue($){let Y=$.data;if(!Y||typeof Y!=="object")return null;let X=Y[this.groupKey];if(X===void 0||X===null)return null;return typeof X==="string"?X:`${X}`}canProcess($){let Y=this.getGroupValue($);if(Y===null)return!0;return(this.activeByGroup.get(Y)??0)<this.maxPerGroup}increment($){let Y=this.getGroupValue($);if(Y===null)return;let X=this.activeByGroup.get(Y)??0;this.activeByGroup.set(Y,X+1)}decrement($){let Y=this.getGroupValue($);if(Y===null)return;let X=this.activeByGroup.get(Y)??0;if(X<=1)this.activeByGroup.delete(Y);else this.activeByGroup.set(Y,X-1)}getGroupCount($){return this.activeByGroup.get($)??0}getMax(){return this.maxPerGroup}getGroupKey(){return this.groupKey}clear(){this.activeByGroup.clear()}}function de0($,Y){return setInterval(()=>void Jm4($),Y)}async function Jm4($){if($.pulledJobIds.size===0||!$.tcp)return;try{let Y=Array.from($.pulledJobIds);if(Y.length===0)return;if($.useLocks){let X=Y.map((G)=>$.jobTokens.get(G)??"");if(Y.length===1)await $.tcp.send({cmd:"JobHeartbeat",id:Y[0],token:X[0]||void 0});else await $.tcp.send({cmd:"JobHeartbeatB",ids:Y,tokens:X})}else if(Y.length===1)await $.tcp.send({cmd:"JobHeartbeat",id:Y[0]});else await $.tcp.send({cmd:"JobHeartbeatB",ids:Y})}catch(Y){let X=Y instanceof Error?Y:Error(String(Y));$.emitter.emit("error",Object.assign(X,{context:"heartbeat"}))}}async function ce0($,Y){let X=h0();if($.useLocks){if(Y===1){let{job:W,token:Z}=await X.pullWithLock($.name,$.workerId,0);return W?[{job:W,token:Z}]:[]}let{jobs:J,tokens:Q}=await X.pullBatchWithLock($.name,Y,$.workerId,0);return J.map((W,Z)=>({job:W,token:Q[Z]||null}))}if(Y===1){let J=await X.pull($.name,0);return J?[{job:J,token:null}]:[]}return(await X.pullBatch($.name,Y,0)).map((J)=>({job:J,token:null}))}async function le0($,Y,X,G){if(G)return[];let J={cmd:X===1?"PULL":"PULLB",queue:$.name,timeout:$.pollTimeout,count:X};if($.useLocks)J.owner=$.workerId;let Q=await Y.send(J);if(!Q.ok)return[];if(X===1){let K=Q.job,H=$.useLocks?Q.token??null:null;if(K)return[{job:SR(K,$.name),token:H}];return[]}let W=Q.jobs,Z=$.useLocks?Q.tokens??[]:[];return W?.map((K,H)=>({job:SR(K,$.name),token:Z[H]||null}))??[]}function Zm4($,Y){return{concurrency:$.concurrency??1,autorun:$.autorun??!0,heartbeatInterval:$.heartbeatInterval??1e4,batchSize:Math.min($.batchSize??10,1000),pollTimeout:Math.min($.pollTimeout??0,PS.MAX_POLL_TIMEOUT),embedded:Y,useLocks:$.useLocks??!0,skipLockRenewal:$.skipLockRenewal??!1,skipStalledCheck:$.skipStalledCheck??!1,drainDelay:$.drainDelay??50,lockDuration:$.lockDuration??30000,maxStalledCount:$.maxStalledCount??1,removeOnComplete:$.removeOnComplete,removeOnFail:$.removeOnFail}}function Km4($,Y){let X=$.connection??{},G=X.poolSize??Math.min(Y,8),J=gc(X.token);return new CH({host:X.host??"localhost",port:X.port??6789,token:J,poolSize:G,pingInterval:X.pingInterval,commandTimeout:X.commandTimeout,pipelining:X.pipelining,maxInFlight:X.maxInFlight})}class rV extends Qm4{name;queueKey;opts;processor;embedded;tcp;tcpPool;ackBatcher;rateLimiter;groupLimiter;running=!1;paused=!1;_closing=!1;_closingPromise=null;closed=!1;activeJobs=0;pollTimer=null;consecutiveErrors=0;activeJobIds=new Set;pulledJobIds=new Set;jobTokens=new Map;cancelledJobs=new Set;heartbeatTimer=null;workerHeartbeatTimer=null;processedCount=0;failedCount=0;startedAt;registered=!1;workerId;pendingJobs=[];pendingJobsHead=0;processingScheduled=!1;lastDrainedEmit=0;stalledUnsubscribe=null;on($,Y){return super.on($,Y)}once($,Y){return super.once($,Y)}off($,Y){return super.off($,Y)}constructor($,Y,X={}){super();if(this.name=$,this.queueKey=(X.prefixKey??"")+$,this.processor=Y,this.embedded=X.embedded??ge0,this.startedAt=Date.now(),this.workerId=`worker-${this.queueKey}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,this.opts=Zm4(X,this.embedded),this.rateLimiter=new CW0(X.limiter?.groupKey?null:X.limiter??null),this.groupLimiter=Il.fromOptions(X.limiter),this.ackBatcher=new JW0({batchSize:X.batchSize??10,interval:PS.DEFAULT_ACK_INTERVAL,embedded:this.embedded}),this.embedded)h0(X.dataPath),this.tcp=null,this.tcpPool=null;else this.tcpPool=Km4(X,this.opts.concurrency),this.tcp=this.tcpPool,this.ackBatcher.setTcp(this.tcp);if(this.opts.autorun)this.run()}run(){if(this.running||this.closed)return;if(this.running=!0,this.paused=!1,this._closing=!1,this._closingPromise=null,queueMicrotask(()=>{if(!this.closed)this.emit("ready")}),this.embedded&&!this.stalledUnsubscribe&&!this.opts.skipStalledCheck)this.subscribeToStalledEvents();if(!this.embedded&&this.tcp&&!this.registered)this.registerWithServer();if(this.opts.heartbeatInterval>0&&!this.opts.skipLockRenewal)if(this.embedded)this.heartbeatTimer=setInterval(()=>{let $=h0();for(let Y of this.pulledJobIds)$.jobHeartbeat(d0(Y))},this.opts.heartbeatInterval);else{let $=this.getHeartbeatDeps();this.heartbeatTimer=de0($,this.opts.heartbeatInterval),this.startWorkerHeartbeat()}this.poll()}subscribeToStalledEvents(){if(!this.embedded)return;let $=h0();this.stalledUnsubscribe=$.subscribe((Y)=>{if(Y.queue!==this.queueKey)return;if(Y.eventType==="stalled")this.emit("stalled",Y.jobId,"active")})}pause(){if(!this.running)return;if(this.running=!1,this.paused=!0,this.pollTimer)clearTimeout(this.pollTimer),this.pollTimer=null}resume(){if(this.closed)return;this.paused=!1,this.run()}isRunning(){return this.running}isPaused(){return this.paused&&!this.closed}isClosed(){return this.closed}get concurrency(){return this.opts.concurrency}set concurrency($){let Y=Math.max(1,$),X=this.opts.concurrency;if(this.opts.concurrency=Y,Y>X&&this.running&&!this._closing)this.poll()}get closing(){return this._closingPromise}async waitUntilReady(){if(this.embedded)return;if(this.tcpPool)await this.tcpPool.send({cmd:"Ping"})}cancelJob($,Y){if(this.activeJobIds.has($))return this.cancelledJobs.add($),this.emit("cancelled",{jobId:$,reason:Y??"Job cancelled by worker"}),!0;return!1}cancelAllJobs($){for(let Y of this.activeJobIds)this.cancelledJobs.add(Y),this.emit("cancelled",{jobId:Y,reason:$??"All jobs cancelled"})}isJobCancelled($){return this.cancelledJobs.has($)}getRateLimiterInfo(){return this.rateLimiter.getRateLimiterInfo()}rateLimit($){this.rateLimiter.rateLimit($)}isRateLimited(){return this.rateLimiter.isRateLimited()}async startStalledCheckTimer(){}async delay($=0,Y){if($<=0)return;return new Promise((X,G)=>{let J=setTimeout(X,$);if(Y)Y.signal.addEventListener("abort",()=>{clearTimeout(J),G(Error("Delay aborted"))})})}async getNextJob($,Y){if(this.closed)return;if(this.embedded){let W=h0();if(this.opts.useLocks){let{job:K,token:H}=await W.pullWithLock(this.queueKey,this.workerId,0);if(K&&H){let z=String(K.id);this.pulledJobIds.add(z),this.jobTokens.set(z,H)}return K??void 0}let Z=await W.pull(this.queueKey,0);if(Z)this.pulledJobIds.add(String(Z.id));return Z??void 0}if(!this.tcp)return;let X={cmd:"PULL",queue:this.queueKey,timeout:0};if(this.opts.useLocks){if(X.owner=this.workerId,$)X.token=$}let G=await this.tcp.send(X);if(!G.ok||!G.job)return;let J=SR(G.job,this.queueKey),Q=String(J.id);if(this.pulledJobIds.add(Q),this.opts.useLocks&&G.token)this.jobTokens.set(Q,G.token);return J}async processJobManually($,Y,X){if(this.closed)return;let G=String($.id);if(this.activeJobs++,this.activeJobIds.add(G),this.pulledJobIds.add(G),this.opts.useLocks&&Y)this.jobTokens.set(G,Y);try{if(await jW0($,{name:this.queueKey,processor:this.processor,embedded:this.embedded,tcp:this.tcp,ackBatcher:this.ackBatcher,emitter:this,token:this.opts.useLocks?Y:void 0}),X)return await X()}finally{if(this.activeJobs--,this.activeJobIds.delete(G),this.pulledJobIds.delete(G),this.cancelledJobs.delete(G),this.opts.useLocks)this.jobTokens.delete(G);this.rateLimiter.recordJobForLimiter()}}async extendJobLocks($,Y,X){if(this.closed||$.length===0)return 0;if($.length!==Y.length)throw Error("jobIds and tokens arrays must have the same length");if(this.embedded){let Q=h0(),W=0;for(let Z=0;Z<$.length;Z++)if(await Q.extendLock($[Z],Y[Z],X))W++;return W}if(!this.tcp)return 0;return(await this.tcp.send({cmd:"ExtendLocks",ids:$,tokens:Y,duration:X})).extended??0}async close($=!1){if(this.closed)return;if(this._closingPromise)return this._closingPromise;return this._closingPromise=this._doClose($),this._closingPromise}async _doClose($){if(this._closing=!0,this.running=!1,this.paused=!1,this.pollTimer)clearTimeout(this.pollTimer),this.pollTimer=null;if(this.heartbeatTimer)clearInterval(this.heartbeatTimer),this.heartbeatTimer=null;if(this.workerHeartbeatTimer)clearInterval(this.workerHeartbeatTimer),this.workerHeartbeatTimer=null;if(!$){let Y=()=>this.pendingJobs.length-this.pendingJobsHead;while(this.activeJobs>0||Y()>0)await Bun.sleep(50)}if(await this.ackBatcher.flush(),await this.ackBatcher.waitForInFlight(),this.ackBatcher.stop(),!this.embedded&&this.tcp&&this.registered){try{await this.tcp.send({cmd:"UnregisterWorker",workerId:this.workerId})}catch{}this.registered=!1}if(await Bun.sleep(100),this.stalledUnsubscribe)this.stalledUnsubscribe(),this.stalledUnsubscribe=null;if(this.activeJobIds.clear(),this.pulledJobIds.clear(),this.jobTokens.clear(),this.cancelledJobs.clear(),this.pendingJobs=[],this.pendingJobsHead=0,this.groupLimiter)this.groupLimiter.clear();if(this.tcpPool)this.tcpPool.close();this.closed=!0,this._closing=!1,this.emit("closed")}poll(){if(!this.running||this._closing)return;if(this.activeJobs>=this.opts.concurrency){this.pollTimer=setTimeout(()=>{this.poll()},10);return}if(!this.rateLimiter.canProcessWithinLimit()){let $=this.rateLimiter.getTimeUntilNextSlot();this.pollTimer=setTimeout(()=>{this.poll()},Math.max($,10));return}this.tryProcess()}async tryProcess(){if(!this.running||this._closing)return;try{let $=this.getNextEligibleJob();if(!$){let Y=await this.doPullBatch();if(!this.running||this._closing)return;if(Y.length>0){if(this.registerPulledJobs(Y),this.pendingJobsHead>=this.pendingJobs.length)this.pendingJobs=Y,this.pendingJobsHead=0;else this.pendingJobs=this.pendingJobs.slice(this.pendingJobsHead).concat(Y),this.pendingJobsHead=0;$=this.getNextEligibleJob()}}if($)this.consecutiveErrors=0,this.startJob($.job,$.token);else{if(this.pendingJobsHead<this.pendingJobs.length&&this.groupLimiter){this.pollTimer=setTimeout(()=>{this.poll()},10);return}let X=Date.now();if(X-this.lastDrainedEmit>1000)this.lastDrainedEmit=X,this.emit("drained");let G=this.opts.pollTimeout>0?10:this.opts.drainDelay;this.pollTimer=setTimeout(()=>{this.poll()},G)}}catch($){if(!this.running)return;this.handlePullError($)}}registerPulledJobs($){for(let Y of $){let X=String(Y.job.id);if(this.pulledJobIds.add(X),this.opts.useLocks&&Y.token)this.jobTokens.set(X,Y.token)}}getBufferedJob(){if(this.pendingJobsHead>=this.pendingJobs.length)return null;let $=this.pendingJobs[this.pendingJobsHead++];if(this.pendingJobsHead>500&&this.pendingJobsHead>=this.pendingJobs.length/2)this.pendingJobs=this.pendingJobs.slice(this.pendingJobsHead),this.pendingJobsHead=0;return $}getNextEligibleJob(){if(this.pendingJobsHead>=this.pendingJobs.length)return null;if(!this.groupLimiter)return this.getBufferedJob();let $=this.pendingJobsHead,Y=this.pendingJobs.length;for(let X=$;X<Y;X++){let G=this.pendingJobs[X];if(this.groupLimiter.canProcess(G.job)){if(this.pendingJobs[X]=this.pendingJobs[this.pendingJobsHead],this.pendingJobsHead++,this.pendingJobsHead>500&&this.pendingJobsHead>=this.pendingJobs.length/2)this.pendingJobs=this.pendingJobs.slice(this.pendingJobsHead),this.pendingJobsHead=0;return G}}return null}async doPullBatch(){let $=this.opts.concurrency-this.activeJobs,Y=Math.min(this.opts.batchSize,$,1000);if(Y<=0)return[];let X=this.getPullConfig();return this.embedded?ce0(X,Y):le0(X,this.tcp,Y,this._closing)}startJob($,Y){let X=String($.id);if(this.activeJobIds.has(X))return;if(this.activeJobs++,this.activeJobIds.add(X),this.applyRemoveDefaults($),this.groupLimiter)this.groupLimiter.increment($);if(this.opts.useLocks&&Y&&!this.jobTokens.has(X))this.jobTokens.set(X,Y);this.pulledJobIds.add(X);let G=this.opts.useLocks?Y:void 0;if(jW0($,{name:this.queueKey,processor:this.processor,embedded:this.embedded,tcp:this.tcp,ackBatcher:this.ackBatcher,emitter:this,token:G,onOutcome:(J)=>{if(J)this.processedCount++;else this.failedCount++}}).finally(()=>{if(this.activeJobs--,this.activeJobIds.delete(X),this.pulledJobIds.delete(X),this.cancelledJobs.delete(X),this.opts.useLocks)this.jobTokens.delete(X);if(this.groupLimiter)this.groupLimiter.decrement($);if(this.rateLimiter.recordJobForLimiter(),this.running&&!this._closing)this.poll()}),this.activeJobs<this.opts.concurrency&&!this._closing&&!this.processingScheduled)this.processingScheduled=!0,setImmediate(()=>{this.processingScheduled=!1,this.tryProcess()})}handlePullError($){this.consecutiveErrors++;let Y=$ instanceof Error?$:Error(String($));this.emit("error",Object.assign(Y,{queue:this.name,consecutiveErrors:this.consecutiveErrors,context:"pull"}));let X=Math.min(PS.BASE_BACKOFF_MS*Math.pow(2,this.consecutiveErrors-1),PS.MAX_BACKOFF_MS);this.pollTimer=setTimeout(()=>{this.poll()},X)}registerWithServer(){if(!this.tcp||this.registered)return;this.tcp.send({cmd:"RegisterWorker",name:this.queueKey,queues:[this.queueKey],concurrency:this.opts.concurrency,workerId:this.workerId,hostname:Wm4(),pid:process.pid,startedAt:this.startedAt}).then(()=>{this.registered=!0}).catch(($)=>{let Y=$ instanceof Error?$:Error(String($));this.emit("error",Object.assign(Y,{context:"worker-register"}))})}startWorkerHeartbeat(){if(this.workerHeartbeatTimer||!this.tcp)return;this.workerHeartbeatTimer=setInterval(()=>{if(!this.tcp||!this.registered)return;this.tcp.send({cmd:"Heartbeat",id:this.workerId,activeJobs:this.activeJobs,processed:this.processedCount,failed:this.failedCount}).catch(($)=>{let Y=$ instanceof Error?$:Error(String($));this.emit("error",Object.assign(Y,{context:"worker-heartbeat"}))})},this.opts.heartbeatInterval)}getHeartbeatDeps(){return{pulledJobIds:this.pulledJobIds,jobTokens:this.jobTokens,tcp:this.tcp,useLocks:this.opts.useLocks,emitter:this}}getPullConfig(){return{name:this.queueKey,workerId:this.workerId,useLocks:this.opts.useLocks,pollTimeout:this.opts.pollTimeout}}applyRemoveDefaults($){if(this.opts.removeOnComplete!==void 0&&!$.removeOnComplete){let Y=this.opts.removeOnComplete;$.removeOnComplete=Y===!0}if(this.opts.removeOnFail!==void 0&&!$.removeOnFail){let Y=this.opts.removeOnFail;$.removeOnFail=Y===!0}}}class SW0{queue;constructor($){this.queue=$}setDlqConfig($){this.queue.setDlqConfig($)}getDlqConfig(){return this.queue.getDlqConfig()}getDlq($){return this.queue.getDlq($)}getDlqStats(){return this.queue.getDlqStats()}retryDlq($){return this.queue.retryDlq($)}purgeDlq(){return this.queue.purgeDlq()}setGlobalRateLimit($,Y){this.queue.setGlobalRateLimit($,Y)}removeGlobalRateLimit(){this.queue.removeGlobalRateLimit()}}function Um4($,Y,X,G,J){switch($){case"fixed":return X;case"exponential":return X*Math.pow(2,Y-1);case"jitter":{let Q=X*Math.pow(2,Y-1);return Math.floor(Q*(0.5+Math.random()))}case"fibonacci":{let Q=1,W=1;for(let Z=0;Z<Y-1;Z++){let K=Q+W;Q=W,W=K}return X*W}case"custom":if(J.customBackoff)return J.customBackoff(Y,G);return X;default:return X}}function ie0($,Y){let X=Y.maxAttempts??3,G=Y.delay??1000,J=Y.strategy??"exponential",Q=(W)=>{return $().catch((Z)=>{let K=Z instanceof Error?Z:Error(String(Z));if(W>=X)throw K;if(Y.retryIf&&!Y.retryIf(K,W))throw K;let H=Um4(J,W,G,K,Y);return new Promise((z)=>{setTimeout(()=>{z(Q(W+1))},H)})})};return Q(1)}class kW0{state="closed";failures=0;timer=null;config;worker;constructor($,Y){this.config=$,this.worker=Y}get currentState(){return this.state}isOpen(){return this.state==="open"}onSuccess(){if(this.state==="half-open")this.state="closed",this.failures=0,this.config.onClose?.();else if(this.state==="closed")this.failures=0}onFailure(){this.failures++;let $=this.config.threshold??5;if(this.state==="half-open"||this.failures>=$)this.open()}open(){this.state="open",this.config.onOpen?.(this.failures),this.worker.pause();let $=this.config.resetTimeout??30000;if(this.timer)clearTimeout(this.timer);this.timer=setTimeout(()=>{this.state="half-open",this.config.onHalfOpen?.(),this.worker.resume()},$)}reset(){if(this.state="closed",this.failures=0,this.timer)clearTimeout(this.timer),this.timer=null;if(this.worker.isPaused())this.worker.resume()}destroy(){if(this.timer)clearTimeout(this.timer),this.timer=null}}class vW0{buffer=[];timer=null;config;constructor($){this.config=$}buildProcessor(){return($)=>{return new Promise((Y,X)=>{if(this.buffer.push({job:$,resolve:Y,reject:X}),this.buffer.length>=this.config.size)this.flush();else if(!this.timer){let G=this.config.timeout??5000;this.timer=setTimeout(()=>{this.flush()},G)}})}}flush(){if(this.timer)clearTimeout(this.timer),this.timer=null;let $=this.buffer.splice(0);if($.length===0)return;let Y=$.map((X)=>X.job);this.config.processor(Y).then((X)=>{for(let G=0;G<$.length;G++)$[G].resolve(X[G]??void 0)},(X)=>{let G=X instanceof Error?X:Error(String(X));for(let J of $)J.reject(G)})}destroy(){if(this.timer)clearTimeout(this.timer),this.timer=null;if(this.buffer.length>0)this.flush()}}class xW0{rules=[];active=!1;queue;worker;constructor($,Y){this.queue=$,this.worker=Y}add($){this.rules.push($),this.ensureActive()}ensureActive(){if(this.active)return;this.active=!0,this.worker.on("completed",($,Y)=>{this.fire("completed",$,Y)}),this.worker.on("failed",($,Y)=>{this.fire("failed",$,Y)})}fire($,Y,X){for(let G of this.rules){if(G.on!==Y.name)continue;if((G.event??"completed")!==$)continue;if(G.condition&&!G.condition(X,Y))continue;let J=G.data(X,Y);this.queue.add(G.create,J,G.opts)}}}class yW0{timer=null;config;queue;constructor($,Y){this.config=$,this.queue=Y}start(){let $=this.config.interval??60000;this.timer=setInterval(()=>{this.tick()},$)}async tick(){let $=this.config.minAge??60000,Y=this.config.boost??1,X=this.config.maxPriority??100,G=this.config.maxScan??100,[J,Q]=await Promise.all([this.queue.getWaitingAsync(0,G),this.queue.getJobsAsync({state:"prioritized",start:0,end:G})]),W=[...J,...Q],Z=Date.now();for(let K of W)if(Z-K.timestamp>=$&&K.priority<X){let z=Math.min(K.priority+Y,X);try{await this.queue.changeJobPriority(K.id,{priority:z})}catch{}}}destroy(){if(this.timer)clearInterval(this.timer),this.timer=null}}class bW0{controllers=new Map;register($){let Y=new AbortController;return this.controllers.set($,Y),Y}unregister($){this.controllers.delete($)}cancel($,Y=0){let X=this.controllers.get($);if(!X)return;if(Y>0)setTimeout(()=>{X.abort()},Y);else X.abort()}isCancelled($){let Y=this.controllers.get($);return Y?Y.signal.aborted:!1}getSignal($){return this.controllers.get($)?.signal??null}destroyAll(){for(let $ of this.controllers.values())$.abort();this.controllers.clear()}}class hW0{config;constructor($){this.config=$}getTtl($){return this.config.perName?.[$]??this.config.defaultTtl??0}isExpired($,Y){let X=this.getTtl($);if(X<=0)return!1;return Date.now()-Y>X}setDefaultTtl($){this.config.defaultTtl=$}setNameTtl($,Y){this.config.perName??={},this.config.perName[$]=Y}}class fW0{dedup;debounce;constructor($,Y){this.dedup=$,this.debounce=Y}get active(){return this.dedup!==null||this.debounce!==null}merge($,Y,X){if(!this.active)return Y;let G={...Y};if(this.dedup&&!G.deduplication){let J=X!==void 0?JSON.stringify(X):"";G.deduplication={id:`${$}:${J}`,ttl:this.dedup.ttl??3600000,extend:this.dedup.extend,replace:this.dedup.replace}}if(this.debounce&&!G.debounce)G.debounce={id:$,ttl:this.debounce.ttl};return G}}class ne0{name;queue;worker;middlewares=[];baseProcessor;cb;retryConfig;triggerMgr;ager;cancellation=new bW0;ttlChecker;batchAcc;merger;dlqrl;constructor($,Y){let X=[Y.processor,Y.routes,Y.batch].filter(Boolean).length;if(X===0)throw Error('Bunqueue requires "processor", "routes", or "batch"');if(X>1)throw Error('Bunqueue: use only one of "processor", "routes", or "batch"');if(this.name=$,this.retryConfig=Y.retry??null,this.ttlChecker=Y.ttl?new hW0(Y.ttl):null,this.merger=new fW0(Y.deduplication??null,Y.debounce??null),Y.batch)this.batchAcc=new vW0(Y.batch),this.baseProcessor=this.batchAcc.buildProcessor();else this.batchAcc=null,this.baseProcessor=Y.routes?this.buildRouteProcessor(Y.routes):Y.processor;let G=this,J=(Q)=>G.processJob(Q);if(this.queue=new nV($,this.buildQueueOpts(Y)),this.worker=new rV($,J,this.buildWorkerOpts(Y)),this.dlqrl=new SW0(this.queue),Y.dlq)this.dlqrl.setDlqConfig(Y.dlq);this.cb=Y.circuitBreaker?new kW0(Y.circuitBreaker,this.worker):null,this.triggerMgr=new xW0(this.queue,this.worker),this.ager=Y.priorityAging?new yW0(Y.priorityAging,this.queue):null,this.ager?.start()}buildRouteProcessor($){let Y=$;return(X)=>{let G=Y[X.name];if(!G)throw Error(`No route for job "${X.name}" in queue "${this.name}"`);return G(X)}}buildQueueOpts($){return{connection:$.connection,embedded:$.embedded,dataPath:$.dataPath,defaultJobOptions:$.defaultJobOptions,autoBatch:$.autoBatch,prefixKey:$.prefixKey}}buildWorkerOpts($){return{connection:$.connection,embedded:$.embedded,dataPath:$.dataPath,concurrency:$.concurrency,autorun:$.autorun,heartbeatInterval:$.heartbeatInterval,batchSize:$.batchSize,pollTimeout:$.pollTimeout,limiter:$.rateLimit??$.limiter,removeOnComplete:$.removeOnComplete,removeOnFail:$.removeOnFail,prefixKey:$.prefixKey}}processJob($){if(this.cb?.isOpen())return Promise.reject(Error("Circuit breaker is open"));if(this.ttlChecker?.isExpired($.name,$.timestamp))return Promise.reject(Error(`Job expired (age: ${Date.now()-$.timestamp}ms)`));let Y=this.cancellation.register($.id),X=()=>this.runMiddlewareChain($,Y);return(this.retryConfig?ie0(X,this.retryConfig):X()).then((J)=>{return this.cb?.onSuccess(),this.cancellation.unregister($.id),J},(J)=>{throw this.cb?.onFailure(),this.cancellation.unregister($.id),J})}runMiddlewareChain($,Y){let X=$;if(this.middlewares.length===0){let Z=this.baseProcessor($);return Z instanceof Promise?Z:Promise.resolve(Z)}let G=0,J=this.middlewares,Q=this.baseProcessor,W=()=>{if(Y.signal.aborted)return Promise.reject(Error("Job cancelled"));if(G<J.length)return J[G++](X,W);let Z=Q($);return Z instanceof Promise?Z:Promise.resolve(Z)};return W()}use($){return this.middlewares.push($),this}add($,Y,X){return this.queue.add($,Y,this.merger.merge($,X,Y))}addBulk($){return this.queue.addBulk($.map((Y)=>({...Y,opts:this.merger.merge(Y.name,Y.opts,Y.data)})))}getJob($){return this.queue.getJob($)}getJobCounts(){return this.queue.getJobCounts()}getJobCountsAsync(){return this.queue.getJobCountsAsync()}count(){return this.queue.count()}countAsync(){return this.queue.countAsync()}cron($,Y,X,G){return this.queue.upsertJobScheduler($,{pattern:Y,timezone:G?.timezone},{name:$,data:X,opts:G?.jobOpts})}every($,Y,X,G){return this.queue.upsertJobScheduler($,{every:Y},{name:$,data:X,opts:G?.jobOpts})}removeCron($){return this.queue.removeJobScheduler($)}listCrons(){return this.queue.getJobSchedulers()}cancel($,Y=0){this.cancellation.cancel($,Y)}isCancelled($){return this.cancellation.isCancelled($)}getSignal($){return this.cancellation.getSignal($)}getCircuitState(){return this.cb?.currentState??"closed"}resetCircuit(){this.cb?.reset()}trigger($){return this.triggerMgr.add($),this}setDefaultTtl($){this.ttlChecker?.setDefaultTtl($)}setNameTtl($,Y){this.ttlChecker?.setNameTtl($,Y)}setDlqConfig($){this.dlqrl.setDlqConfig($)}getDlqConfig(){return this.dlqrl.getDlqConfig()}getDlq($){return this.dlqrl.getDlq($)}getDlqStats(){return this.dlqrl.getDlqStats()}retryDlq($){return this.dlqrl.retryDlq($)}purgeDlq(){return this.dlqrl.purgeDlq()}setGlobalRateLimit($,Y){this.dlqrl.setGlobalRateLimit($,Y)}removeGlobalRateLimit(){this.dlqrl.removeGlobalRateLimit()}on($,Y){return this.worker.on($,Y),this}once($,Y){return this.worker.once($,Y),this}off($,Y){return this.worker.off($,Y),this}pause(){this.queue.pause(),this.worker.pause()}resume(){this.queue.resume(),this.worker.resume()}async close($=!1){this.ager?.destroy(),this.cb?.destroy(),this.batchAcc?.destroy(),this.cancellation.destroyAll(),await this.worker.close($),this.queue.close()}isRunning(){return this.worker.isRunning()}isPaused(){return this.worker.isPaused()}isClosed(){return this.worker.isClosed()}}import{EventEmitter as Vm4}from"events";function gW0($){let Y={};for(let[X,G]of Object.entries($))if(!X.startsWith("__")&&X!=="name")Y[X]=G;return Y}function Pl($,Y,X,G,J){let Q=Date.now(),W=!!J?.embedded,Z=J?.tcp??null,K=(z)=>{return["waiting","active","completed","failed","delayed","prioritized","waiting-children","unknown"].includes(z)?z:"unknown"},H=()=>{if(J?.getState)return J.getState($).then(K);if(W)return h0().getJobState(d0($)).then((z)=>K(z));if(Z)return Z.send({cmd:"GetState",id:$}).then((z)=>{let V=z.state??"unknown";return K(V)});return Promise.resolve("unknown")};return{id:$,name:Y,data:X,queueName:G,attemptsMade:0,timestamp:Q,progress:0,delay:0,processedOn:void 0,finishedOn:void 0,stacktrace:null,stalledCounter:0,priority:0,parentKey:void 0,opts:{},token:void 0,processedBy:void 0,deduplicationId:void 0,repeatJobKey:void 0,attemptsStarted:0,updateProgress:async(z)=>{if(J?.updateProgress)return J.updateProgress($,z);if(W){await h0().updateProgress(d0($),z);return}if(Z)await Z.send({cmd:"Progress",id:$,progress:z})},log:async(z)=>{if(J?.log)return J.log($,z);if(W){h0().addLog(d0($),z);return}if(Z)await Z.send({cmd:"AddLog",id:$,message:z})},getState:H,remove:async()=>{if(J?.remove)return J.remove($);if(W){await h0().cancel(d0($));return}if(Z)await Z.send({cmd:"Cancel",id:$})},retry:async()=>{if(J?.retry)return J.retry($);if(W){let V=h0(),A=await V.getJobState(d0($));if(A==="failed"){if(V.retryDlq(G,d0($))===0)throw Error(`Job ${$} is failed but not present in DLQ`);return}if(A==="active"){if(!await V.moveActiveToWait(d0($)))throw Error(`Failed to retry active job ${$}`);return}if(A==="waiting"||A==="prioritized"||A==="delayed")return;throw Error(`Cannot retry job ${$} from state '${A}'`)}if(!Z)return;let z=await Z.send({cmd:"MoveToWait",id:$});if(z.ok!==!0){let V=typeof z.error==="string"?z.error:"retry failed";throw Error(V)}},getChildrenValues:async()=>{if(W)return await h0().getChildrenValues(d0($));if(!Z)return{};return(await Z.send({cmd:"GetChildrenValues",id:$})).data?.values??{}},isWaiting:async()=>await H()==="waiting",isActive:async()=>await H()==="active",isDelayed:async()=>await H()==="delayed",isCompleted:async()=>await H()==="completed",isFailed:async()=>await H()==="failed",isWaitingChildren:async()=>await H()==="waiting-children",updateData:async(z)=>{if(J?.updateData)return J.updateData($,z);if(W){await h0().updateJobData(d0($),z);return}if(Z)await Z.send({cmd:"Update",id:$,data:z})},promote:async()=>{if(J?.promote)return J.promote($);if(W){await h0().promote(d0($));return}if(Z)await Z.send({cmd:"Promote",id:$})},changeDelay:async(z)=>{if(J?.changeDelay)return J.changeDelay($,z);if(W){await h0().changeDelay(d0($),z);return}if(Z)await Z.send({cmd:"ChangeDelay",id:$,delay:z})},changePriority:async(z)=>{if(J?.changePriority)return J.changePriority($,z.priority);if(W){await h0().changePriority(d0($),z.priority);return}if(Z)await Z.send({cmd:"ChangePriority",id:$,priority:z.priority})},extendLock:async(z,V)=>{if(W)return await h0().extendLock(d0($),z,V)?V:0;if(!Z)return 0;return(await Z.send({cmd:"ExtendLock",id:$,token:z,duration:V})).ok===!0?V:0},clearLogs:async(z)=>{if(J?.clearLogs)return J.clearLogs($);if(W){h0().clearLogs(d0($),z);return}if(Z)await Z.send({cmd:"ClearLogs",id:$,keepLogs:z})},getDependencies:async()=>{let z=await ae0($,W,Z);return se0(G,z,W,Z)},getDependenciesCount:async()=>{let z=await ae0($,W,Z),V=await se0(G,z,W,Z);return{processed:Object.keys(V.processed).length,unprocessed:V.unprocessed.length}},toJSON:()=>({id:$,name:Y,data:X,opts:{},progress:0,delay:0,timestamp:Q,attemptsMade:0,stacktrace:null,queueQualifiedName:`bull:${G}`}),asJSON:()=>({id:$,name:Y,data:JSON.stringify(X),opts:"{}",progress:"0",delay:"0",timestamp:String(Q),attemptsMade:"0",stacktrace:null}),moveToCompleted:async(z)=>{if(W)return await h0().ack(d0($),z),null;if(Z)await Z.send({cmd:"ACK",id:$,result:z});return null},moveToFailed:async(z)=>{if(W){await h0().fail(d0($),z.message);return}if(Z)await Z.send({cmd:"FAIL",id:$,error:z.message})},moveToWait:async()=>{if(W)return await h0().moveActiveToWait(d0($));if(!Z)return!1;return(await Z.send({cmd:"MoveToWait",id:$})).ok===!0},moveToDelayed:async(z)=>{let V=Math.max(0,z-Date.now());if(W){await h0().moveToDelayed(d0($),V);return}if(Z)await Z.send({cmd:"MoveToDelayed",id:$,delay:V})},moveToWaitingChildren:async()=>{if(W)return await h0().moveToWaitingChildren(d0($));throw Error("moveToWaitingChildren is not supported in TCP mode \u2014 no server command available")},waitUntilFinished:async(z,V)=>{let A=V??30000;if(W){let D=h0(),L=await D.getJob(d0($));if(!L)throw Error(`Job ${$} not found`);if(L.completedAt)return D.getResult(d0($));if(!await D.waitForJobCompletion(d0($),A))throw Error(`waitUntilFinished timed out after ${A}ms`);return D.getResult(d0($))}if(!Z)throw Error("waitUntilFinished: no connection");let N=await Z.send({cmd:"WaitJob",id:$,timeout:A});if(!N.completed)throw Error(`waitUntilFinished timed out after ${A}ms`);return N.result},discard:()=>{if(W){h0().discard(d0($));return}if(Z)Z.send({cmd:"Discard",id:$})},getFailedChildrenValues:async()=>{if(W)return await h0().getFailedChildrenValues(d0($));if(!Z)return{};return(await Z.send({cmd:"GetFailedChildrenValues",id:$})).values??{}},getIgnoredChildrenFailures:async()=>{if(W)return await h0().getIgnoredChildrenFailures(d0($));if(!Z)return{};return(await Z.send({cmd:"GetIgnoredChildrenFailures",id:$})).values??{}},removeChildDependency:async()=>{if(W)return await h0().removeChildDependency(d0($));if(!Z)return!1;return(await Z.send({cmd:"RemoveChildDependency",id:$})).removed??!1},removeDeduplicationKey:()=>Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available")),removeUnprocessedChildren:async()=>{if(W){await h0().removeUnprocessedChildren(d0($));return}if(Z)await Z.send({cmd:"RemoveUnprocessedChildren",id:$})}}}async function ae0($,Y,X){if(Y)return((await h0().getJob(d0($)))?.childrenIds??[]).map(String);if(!X)return[];return((await X.send({cmd:"GetJob",id:$})).job?.childrenIds??[]).map(String)}async function se0($,Y,X,G){let J={},Q=[];for(let W of Y){let Z="unknown",K;if(X){let z=h0();if(Z=await z.getJobState(d0(W)),Z==="completed")K=z.getResult(d0(W))}else if(G){if(Z=(await G.send({cmd:"GetState",id:W})).state??"unknown",Z==="completed")K=(await G.send({cmd:"GetResult",id:W})).result}let H=`${$}:${W}`;if(Z==="completed"||Z==="failed")J[H]=K??null;else Q.push(H)}return{processed:J,unprocessed:Q}}function oe0($){return{removeOnComplete:typeof $.removeOnComplete==="boolean"?$.removeOnComplete:!1,removeOnFail:typeof $.removeOnFail==="boolean"?$.removeOnFail:!1}}async function _S($,Y,X,G={},J){if($.embedded){let W=h0(),{removeOnComplete:Z,removeOnFail:K}=oe0(G),H=await W.push(Y,{data:X,priority:G.priority,delay:G.delay,maxAttempts:G.attempts,backoff:G.backoff,timeout:G.timeout,customId:G.jobId,removeOnComplete:Z,removeOnFail:K,failParentOnFailure:G.failParentOnFailure,removeDependencyOnFailure:G.removeDependencyOnFailure,ignoreDependencyOnFailure:G.ignoreDependencyOnFailure,continueParentOnFailure:G.continueParentOnFailure,dependsOn:J?.map((z)=>d0(z))});return String(H.id)}if(!$.tcp)throw Error("TCP connection not initialized");let Q=await $.tcp.send({cmd:"PUSH",queue:Y,data:X,priority:G.priority,delay:G.delay,maxAttempts:G.attempts,backoff:G.backoff,timeout:G.timeout,jobId:G.jobId,removeOnComplete:G.removeOnComplete,removeOnFail:G.removeOnFail,failParentOnFailure:G.failParentOnFailure,removeDependencyOnFailure:G.removeDependencyOnFailure,ignoreDependencyOnFailure:G.ignoreDependencyOnFailure,continueParentOnFailure:G.continueParentOnFailure,dependsOn:J});if(!Q.ok)throw Error(Q.error??"Failed to add job");return Q.id}async function te0($,Y){let{queueName:X,data:G,opts:J,parentRef:Q,childIds:W}=Y;if($.embedded){let H=h0(),{removeOnComplete:z,removeOnFail:V}=oe0(J),A=W.map((N)=>d0(N)),F=await H.push(X,{data:G,priority:J.priority,delay:J.delay,maxAttempts:J.attempts,backoff:J.backoff,timeout:J.timeout,customId:J.jobId,removeOnComplete:z,removeOnFail:V,failParentOnFailure:J.failParentOnFailure,removeDependencyOnFailure:J.removeDependencyOnFailure,ignoreDependencyOnFailure:J.ignoreDependencyOnFailure,continueParentOnFailure:J.continueParentOnFailure,parentId:Q?d0(Q.id):void 0,dependsOn:A.length>0?A:void 0,childrenIds:A.length>0?A:void 0});if(W.length>0)for(let N of W)await H.updateJobParent(d0(N),F.id);return String(F.id)}if(!$.tcp)throw Error("TCP connection not initialized");let Z=await $.tcp.send({cmd:"PUSH",queue:X,data:G,priority:J.priority,delay:J.delay,maxAttempts:J.attempts,backoff:J.backoff,timeout:J.timeout,jobId:J.jobId,removeOnComplete:J.removeOnComplete,removeOnFail:J.removeOnFail,failParentOnFailure:J.failParentOnFailure,removeDependencyOnFailure:J.removeDependencyOnFailure,ignoreDependencyOnFailure:J.ignoreDependencyOnFailure,continueParentOnFailure:J.continueParentOnFailure,parentId:Q?.id,childrenIds:W.length>0?W:void 0,dependsOn:W.length>0?W:void 0});if(!Z.ok)throw Error(Z.error??"Failed to add job");let K=Z.id;if(W.length>0)for(let H of W)await $.tcp.send({cmd:"UpdateParent",childId:H,parentId:K});return K}async function bN($,Y){if(Y.length===0)return;if($.embedded){let X=h0(),G=Y.map(async(J)=>{try{await X.cancel(d0(J))}catch{}});await Promise.all(G)}else if($.tcp){let X=Y.map(async(G)=>{try{await $.tcp?.send({cmd:"Cancel",id:G})}catch{}});await Promise.all(X)}}var Am4=Bun.env.BUNQUEUE_EMBEDDED==="1";class ee0 extends Vm4{closing=Promise.resolve();embedded;tcp;useSharedPool;constructor($={}){super();if(this.embedded=$.embedded??Am4,this.embedded)this.tcp=null,this.useSharedPool=!1;else{let Y=$.connection??{},X=Y.poolSize??4;if(X===4&&!Y.token)this.tcp=MR({host:Y.host,port:Y.port,poolSize:X,pingInterval:Y.pingInterval,commandTimeout:Y.commandTimeout,pipelining:Y.pipelining,maxInFlight:Y.maxInFlight}),this.useSharedPool=!0;else this.tcp=new CH({host:Y.host??"localhost",port:Y.port??6789,token:Y.token,poolSize:X,pingInterval:Y.pingInterval,commandTimeout:Y.commandTimeout,pipelining:Y.pipelining,maxInFlight:Y.maxInFlight}),this.useSharedPool=!1}}get pushCtx(){return{embedded:this.embedded,tcp:this.tcp}}close(){if(this.tcp&&!this.useSharedPool)this.tcp.close();else if(this.tcp&&this.useSharedPool)FS(this.tcp);return this.closing=Promise.resolve(),this.closing}disconnect(){return this.close()}async waitUntilReady(){if(this.embedded)return;if(this.tcp)await this.tcp.send({cmd:"Ping"})}async add($,Y){let X=[];try{return await this.addFlowNode($,null,X,Y)}catch(G){throw await bN(this.pushCtx,X),G}}async addBulk($){let Y=[],X=[];try{for(let G of $){let J=[],Q=await this.addFlowNode(G,null,J);X.push(...J),Y.push(Q)}return Y}catch(G){throw await bN(this.pushCtx,X),G}}async getFlow($){let{id:Y,queueName:X,depth:G,maxChildren:J}=$;if(this.embedded)return this.getFlowEmbedded(Y,X,G??1/0,J);return this.getFlowTcp(Y,X,G??1/0,J)}async addChain($){if($.length===0)return{jobIds:[]};let Y=[],X=null;try{for(let G of $){let J={name:G.name,__flowParentId:X,...G.data},Q=await _S(this.pushCtx,G.queueName,J,G.opts??{},X?[X]:void 0);Y.push(Q),X=Q}}catch(G){throw await bN(this.pushCtx,Y),G}return{jobIds:Y}}async addBulkThen($,Y){let X=[];try{let G=await Promise.allSettled($.map(async(Z)=>{let K={name:Z.name,...Z.data};return _S(this.pushCtx,Z.queueName,K,Z.opts??{})})),J=[];for(let Z of G)if(Z.status==="fulfilled")X.push(Z.value);else J.push(Z.reason);if(J.length>0)throw await bN(this.pushCtx,X),J[0]instanceof Error?J[0]:Error(String(J[0]));let Q={name:Y.name,__flowParentIds:X,...Y.data},W=await _S(this.pushCtx,Y.queueName,Q,Y.opts??{},X);return{parallelIds:X,finalId:W}}catch(G){throw await bN(this.pushCtx,X),G}}async addTree($){let Y=[];try{await this.addTreeNode($,null,Y)}catch(X){throw await bN(this.pushCtx,Y),X}return{jobIds:Y}}getParentResult($){if(!this.embedded)throw Error("getParentResult is only available in embedded mode");return h0().getResult(d0($))}getParentResults($){if(!this.embedded)throw Error("getParentResults is only available in embedded mode");let Y=h0(),X=new Map;for(let G of $){let J=Y.getResult(d0(G));if(J!==void 0)X.set(G,J)}return X}buildCallbacks($){let Y={name:$,embedded:this.embedded,tcp:this.tcp};return{embedded:this.embedded,tcp:this.tcp,updateData:(X,G)=>Ol(Y,X,G),updateProgress:(X,G)=>Nl(Y,X,G),log:(X,G)=>Ll(Y,X,G).then(()=>{}),promote:(X)=>Dl(Y,X),remove:(X)=>Al(Y,X),changePriority:(X,G)=>Ml(Y,X,{priority:G}),changeDelay:(X,G)=>El(Y,X,G),clearLogs:(X)=>Bl(Y,X),retry:(X)=>Fl(Y,X),getState:(X)=>{if(this.embedded)return h0().getJobState(d0(X));if(!this.tcp)return Promise.resolve("unknown");return this.tcp.send({cmd:"GetState",id:X}).then((G)=>typeof G.state==="string"?G.state:"unknown")}}}async getFlowEmbedded($,Y,X,G){let J=await h0().getJob(d0($));if(J?.queue!==Y)return null;return this.buildJobNode(J,X,G)}async getFlowTcp($,Y,X,G){if(!this.tcp)throw Error("TCP connection not initialized");let J=await this.tcp.send({cmd:"GetJob",id:$});if(!J.ok||!J.job)return null;let Q=J.job;if(Q.queue!==Y)return null;return this.buildJobNodeFromTcp(Q,X,G)}async buildJobNode($,Y,X){let G=$.data,J=typeof G.name==="string"?G.name:"default",Q=gW0(G),W=Pl(String($.id),J,Q,$.queue,this.buildCallbacks($.queue));if(Y<=0||$.childrenIds.length===0)return{job:W};let Z=[],K=X?$.childrenIds.slice(0,X):$.childrenIds;for(let H of K){let z=await h0().getJob(H);if(z)Z.push(await this.buildJobNode(z,Y-1,X))}return{job:W,children:Z.length>0?Z:void 0}}async buildJobNodeFromTcp($,Y,X){let G=String($.id),J=String($.queue),Q=$.data,W=typeof Q?.name==="string"?Q.name:"default",Z=gW0(Q??{}),K=Q?.__childrenIds,H=Array.isArray(K)?K:[],z=Pl(G,W,Z,J,this.buildCallbacks(J));if(Y<=0||H.length===0||!this.tcp)return{job:z};let V=[],A=X?H.slice(0,X):H;for(let F of A){let N=await this.tcp.send({cmd:"GetJob",id:F});if(N.ok&&N.job)V.push(await this.buildJobNodeFromTcp(N.job,Y-1,X))}return{job:z,children:V.length>0?V:void 0}}async addFlowNode($,Y,X,G){let J=[],Q=[];if($.children&&$.children.length>0){let V={id:"pending",queue:$.queueName},A=await Promise.all($.children.map((F)=>this.addFlowNode(F,V,X,G)));for(let F of A)J.push(F),Q.push(F.job.id)}let W=G?.queuesOptions?.[$.queueName],Z=W?{...W,...$.opts}:$.opts??{},K={name:$.name,...$.data};if(Y)K.__parentId=Y.id,K.__parentQueue=Y.queue;if(Q.length>0)K.__childrenIds=Q;let H=await te0(this.pushCtx,{queueName:$.queueName,data:K,opts:Z,parentRef:Y,childIds:Q});return X.push(H),{job:Pl(H,$.name,$.data,$.queueName,this.buildCallbacks($.queueName)),children:J.length>0?J:void 0}}async addTreeNode($,Y,X){let G={name:$.name,__flowParentId:Y,...$.data},J=await _S(this.pushCtx,$.queueName,G,$.opts??{},Y?[Y]:void 0);if(X.push(J),$.children)await Promise.all($.children.map((Q)=>this.addTreeNode(Q,J,X)));return J}}var Hv4=U6(hN(),1);import{Database as Tm4}from"bun:sqlite";var z0=Symbol.for("drizzle:entityKind");function q0($,Y){if(!$||typeof $!=="object")return!1;if($ instanceof Y)return!0;if(!Object.prototype.hasOwnProperty.call(Y,z0))throw Error(`Class "${Y.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let X=Object.getPrototypeOf($).constructor;if(X)while(X){if(z0 in X&&X[z0]===Y[z0])return!0;X=Object.getPrototypeOf(X)}return!1}class m4{constructor($,Y){this.table=$,this.config=Y,this.name=Y.name,this.keyAsName=Y.keyAsName,this.notNull=Y.notNull,this.default=Y.default,this.defaultFn=Y.defaultFn,this.onUpdateFn=Y.onUpdateFn,this.hasDefault=Y.hasDefault,this.primary=Y.primaryKey,this.isUnique=Y.isUnique,this.uniqueName=Y.uniqueName,this.uniqueType=Y.uniqueType,this.dataType=Y.dataType,this.columnType=Y.columnType,this.generated=Y.generated,this.generatedIdentity=Y.generatedIdentity}static[z0]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue($){return $}mapToDriverValue($){return $}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}class fN{static[z0]="ColumnBuilder";config;constructor($,Y,X){this.config={name:$,keyAsName:$==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:Y,columnType:X,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default($){return this.config.default=$,this.config.hasDefault=!0,this}$defaultFn($){return this.config.defaultFn=$,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn($){return this.config.onUpdateFn=$,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName($){if(this.config.name!=="")return;this.config.name=$}}var A$=Symbol.for("drizzle:Name");class pW0{static[z0]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor($,Y){if(this.reference=()=>{let{name:X,columns:G,foreignColumns:J}=$();return{name:X,columns:G,foreignTable:J[0].table,foreignColumns:J}},Y)this._onUpdate=Y.onUpdate,this._onDelete=Y.onDelete}onUpdate($){return this._onUpdate=$===void 0?"no action":$,this}onDelete($){return this._onDelete=$===void 0?"no action":$,this}build($){return new $01($,this)}}class $01{constructor($,Y){this.table=$,this.reference=Y.reference,this.onUpdate=Y._onUpdate,this.onDelete=Y._onDelete}static[z0]="PgForeignKey";reference;onUpdate;onDelete;getName(){let{name:$,columns:Y,foreignColumns:X}=this.reference(),G=Y.map((W)=>W.name),J=X.map((W)=>W.name),Q=[this.table[A$],...G,X[0].table[A$],...J];return $??`${Q.join("_")}_fk`}}function wl($,...Y){return $(...Y)}function Y01($,Y){return`${$[A$]}_${Y.join("_")}_unique`}function X01($,Y,X){for(let G=Y;G<$.length;G++){let J=$[G];if(J==="\\"){G++;continue}if(J==='"')return[$.slice(Y,G).replace(/\\/g,""),G+1];if(X)continue;if(J===","||J==="}")return[$.slice(Y,G).replace(/\\/g,""),G]}return[$.slice(Y).replace(/\\/g,""),$.length]}function G01($,Y=0){let X=[],G=Y,J=!1;while(G<$.length){let Q=$[G];if(Q===","){if(J||G===Y)X.push("");J=!0,G++;continue}if(J=!1,Q==="\\"){G+=2;continue}if(Q==='"'){let[K,H]=X01($,G+1,!0);X.push(K),G=H;continue}if(Q==="}")return[X,G+1];if(Q==="{"){let[K,H]=G01($,G+1);X.push(K),G=H;continue}let[W,Z]=X01($,G,!1);X.push(W),G=Z}return[X,G]}function J01($){let[Y]=G01($,1);return Y}function dW0($){return`{${$.map((Y)=>{if(Array.isArray(Y))return dW0(Y);if(typeof Y==="string")return`"${Y.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")}"`;return`${Y}`}).join(",")}}`}class F4 extends fN{foreignKeyConfigs=[];static[z0]="PgColumnBuilder";array($){return new W01(this.config.name,this,$)}references($,Y={}){return this.foreignKeyConfigs.push({ref:$,actions:Y}),this}unique($,Y){return this.config.isUnique=!0,this.config.uniqueName=$,this.config.uniqueType=Y?.nulls,this}generatedAlwaysAs($){return this.config.generated={as:$,type:"always",mode:"stored"},this}buildForeignKeys($,Y){return this.foreignKeyConfigs.map(({ref:X,actions:G})=>{return wl((J,Q)=>{let W=new pW0(()=>{let Z=J();return{columns:[$],foreignColumns:[Z]}});if(Q.onUpdate)W.onUpdate(Q.onUpdate);if(Q.onDelete)W.onDelete(Q.onDelete);return W.build(Y)},X,G)})}buildExtraConfigColumn($){return new Q01($,this.config)}}class m1 extends m4{constructor($,Y){if(!Y.uniqueName)Y.uniqueName=Y01($,[Y.name]);super($,Y);this.table=$}static[z0]="PgColumn"}class Q01 extends m1{static[z0]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op($){return this.indexConfig.opClass=$,this}}class W01 extends F4{static[z0]="PgArrayBuilder";constructor($,Y,X){super($,"array","PgArray");this.config.baseBuilder=Y,this.config.size=X}build($){let Y=this.config.baseBuilder.build($);return new cW0($,this.config,Y)}}class cW0 extends m1{constructor($,Y,X,G){super($,Y);this.baseColumn=X,this.range=G,this.size=Y.size}size;static[z0]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==="number"?this.size:""}]`}mapFromDriverValue($){if(typeof $==="string")$=J01($);return $.map((Y)=>this.baseColumn.mapFromDriverValue(Y))}mapToDriverValue($,Y=!1){let X=$.map((G)=>G===null?null:q0(this.baseColumn,cW0)?this.baseColumn.mapToDriverValue(G,!0):this.baseColumn.mapToDriverValue(G));if(Y)return X;return dW0(X)}}class Z01 extends F4{static[z0]="PgEnumObjectColumnBuilder";constructor($,Y){super($,"string","PgEnumObjectColumn");this.config.enum=Y}build($){return new K01($,this.config)}}class K01 extends m1{static[z0]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor($,Y){super($,Y);this.enum=Y.enum}getSQLType(){return this.enum.enumName}}var _l=Symbol.for("drizzle:isPgEnum");function U01($){return!!$&&typeof $==="function"&&_l in $&&$[_l]===!0}class H01 extends F4{static[z0]="PgEnumColumnBuilder";constructor($,Y){super($,"string","PgEnumColumn");this.config.enum=Y}build($){return new z01($,this.config)}}class z01 extends m1{static[z0]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor($,Y){super($,Y);this.enum=Y.enum}getSQLType(){return this.enum.enumName}}function V01($,Y,X){let G=Object.assign((J)=>new H01(J??"",G),{enumName:$,enumValues:Y,schema:X,[_l]:!0});return G}function A01($,Y,X){let G=Object.assign((J)=>new Z01(J??"",G),{enumName:$,enumValues:Object.values(Y),schema:X,[_l]:!0});return G}class W6{static[z0]="Subquery";constructor($,Y,X,G=!1,J=[]){this._={brand:"Subquery",sql:$,selectedFields:Y,alias:X,isWith:G,usedTables:J}}}class rQ extends W6{static[z0]="WithSubquery"}var F01="0.45.2";var lW0,iW0,M5={startActiveSpan($,Y){if(!lW0)return Y();if(!iW0)iW0=lW0.trace.getTracer("drizzle-orm",F01);return wl((X,G)=>G.startActiveSpan($,(J)=>{try{return Y(J)}catch(Q){throw J.setStatus({code:X.SpanStatusCode.ERROR,message:Q instanceof Error?Q.message:"Unknown error"}),Q}finally{J.end()}}),lW0,iW0)}};var y6=Symbol.for("drizzle:ViewBaseConfig");var gN=Symbol.for("drizzle:Schema"),aV=Symbol.for("drizzle:Columns"),D01=Symbol.for("drizzle:ExtraConfigColumns"),nW0=Symbol.for("drizzle:OriginalName"),rW0=Symbol.for("drizzle:BaseName"),jS=Symbol.for("drizzle:IsAlias"),N01=Symbol.for("drizzle:ExtraConfigBuilder"),Fm4=Symbol.for("drizzle:IsDrizzleTable");class r0{static[z0]="Table";static Symbol={Name:A$,Schema:gN,OriginalName:nW0,Columns:aV,ExtraConfigColumns:D01,BaseName:rW0,IsAlias:jS,ExtraConfigBuilder:N01};[A$];[nW0];[gN];[aV];[D01];[rW0];[jS]=!1;[Fm4]=!0;[N01]=void 0;constructor($,Y,X){this[A$]=this[nW0]=$,this[gN]=Y,this[rW0]=X}}function Q7($){return $[A$]}function JZ($){return`${$[gN]??"public"}.${$[A$]}`}function aW0($){return $!==null&&$!==void 0&&typeof $.getSQL==="function"}function Dm4($){let Y={sql:"",params:[]};for(let X of $)if(Y.sql+=X.sql,Y.params.push(...X.params),X.typings?.length){if(!Y.typings)Y.typings=[];Y.typings.push(...X.typings)}return Y}class $Y{static[z0]="StringChunk";value;constructor($){this.value=Array.isArray($)?$:[$]}getSQL(){return new $1([this])}}class $1{constructor($){this.queryChunks=$;for(let Y of $)if(q0(Y,r0)){let X=Y[r0.Symbol.Schema];this.usedTables.push(X===void 0?Y[r0.Symbol.Name]:X+"."+Y[r0.Symbol.Name])}}static[z0]="SQL";decoder=B01;shouldInlineParams=!1;usedTables=[];append($){return this.queryChunks.push(...$.queryChunks),this}toQuery($){return M5.startActiveSpan("drizzle.buildSQL",(Y)=>{let X=this.buildQueryFromSourceParams(this.queryChunks,$);return Y?.setAttributes({"drizzle.query.text":X.sql,"drizzle.query.params":JSON.stringify(X.params)}),X})}buildQueryFromSourceParams($,Y){let X=Object.assign({},Y,{inlineParams:Y.inlineParams||this.shouldInlineParams,paramStartIndex:Y.paramStartIndex||{value:0}}),{casing:G,escapeName:J,escapeParam:Q,prepareTyping:W,inlineParams:Z,paramStartIndex:K}=X;return Dm4($.map((H)=>{if(q0(H,$Y))return{sql:H.value.join(""),params:[]};if(q0(H,jl))return{sql:J(H.value),params:[]};if(H===void 0)return{sql:"",params:[]};if(Array.isArray(H)){let z=[new $Y("(")];for(let[V,A]of H.entries())if(z.push(A),V<H.length-1)z.push(new $Y(", "));return z.push(new $Y(")")),this.buildQueryFromSourceParams(z,X)}if(q0(H,$1))return this.buildQueryFromSourceParams(H.queryChunks,{...X,inlineParams:Z||H.shouldInlineParams});if(q0(H,r0)){let z=H[r0.Symbol.Schema],V=H[r0.Symbol.Name];return{sql:z===void 0||H[jS]?J(V):J(z)+"."+J(V),params:[]}}if(q0(H,m4)){let z=G.getColumnCasing(H);if(Y.invokeSource==="indexes")return{sql:J(z),params:[]};let V=H.table[r0.Symbol.Schema];return{sql:H.table[jS]||V===void 0?J(H.table[r0.Symbol.Name])+"."+J(z):J(V)+"."+J(H.table[r0.Symbol.Name])+"."+J(z),params:[]}}if(q0(H,W7)){let z=H[y6].schema,V=H[y6].name;return{sql:z===void 0||H[y6].isAlias?J(V):J(z)+"."+J(V),params:[]}}if(q0(H,c7)){if(q0(H.value,sV))return{sql:Q(K.value++,H),params:[H],typings:["none"]};let z=H.value===null?null:H.encoder.mapToDriverValue(H.value);if(q0(z,$1))return this.buildQueryFromSourceParams([z],X);if(Z)return{sql:this.mapInlineParam(z,X),params:[]};let V=["none"];if(W)V=[W(H.encoder)];return{sql:Q(K.value++,z),params:[z],typings:V}}if(q0(H,sV))return{sql:Q(K.value++,H),params:[H],typings:["none"]};if(q0(H,$1.Aliased)&&H.fieldAlias!==void 0)return{sql:J(H.fieldAlias),params:[]};if(q0(H,W6)){if(H._.isWith)return{sql:J(H._.alias),params:[]};return this.buildQueryFromSourceParams([new $Y("("),H._.sql,new $Y(") "),new jl(H._.alias)],X)}if(U01(H)){if(H.schema)return{sql:J(H.schema)+"."+J(H.enumName),params:[]};return{sql:J(H.enumName),params:[]}}if(aW0(H)){if(H.shouldOmitSQLParens?.())return this.buildQueryFromSourceParams([H.getSQL()],X);return this.buildQueryFromSourceParams([new $Y("("),H.getSQL(),new $Y(")")],X)}if(Z)return{sql:this.mapInlineParam(H,X),params:[]};return{sql:Q(K.value++,H),params:[H],typings:["none"]}}))}mapInlineParam($,{escapeString:Y}){if($===null)return"null";if(typeof $==="number"||typeof $==="boolean")return $.toString();if(typeof $==="string")return Y($);if(typeof $==="object"){let X=$.toString();if(X==="[object Object]")return Y(JSON.stringify($));return Y(X)}throw Error("Unexpected param value: "+$)}getSQL(){return this}as($){if($===void 0)return this;return new $1.Aliased(this,$)}mapWith($){return this.decoder=typeof $==="function"?{mapFromDriverValue:$}:$,this}inlineParams(){return this.shouldInlineParams=!0,this}if($){return $?this:void 0}}class jl{constructor($){this.value=$}static[z0]="Name";brand;getSQL(){return new $1([this])}}function L01($){return typeof $==="object"&&$!==null&&"mapToDriverValue"in $&&typeof $.mapToDriverValue==="function"}var B01={mapFromDriverValue:($)=>$},O01={mapToDriverValue:($)=>$},Ea9={...B01,...O01};class c7{constructor($,Y=O01){this.value=$,this.encoder=Y}static[z0]="Param";brand;getSQL(){return new $1([this])}}function r($,...Y){let X=[];if(Y.length>0||$.length>0&&$[0]!=="")X.push(new $Y($[0]));for(let[G,J]of Y.entries())X.push(J,new $Y($[G+1]));return new $1(X)}(($)=>{function Y(){return new $1([])}$.empty=Y;function X(K){return new $1(K)}$.fromList=X;function G(K){return new $1([new $Y(K)])}$.raw=G;function J(K,H){let z=[];for(let[V,A]of K.entries()){if(V>0&&H!==void 0)z.push(H);z.push(A)}return new $1(z)}$.join=J;function Q(K){return new jl(K)}$.identifier=Q;function W(K){return new sV(K)}$.placeholder=W;function Z(K,H){return new c7(K,H)}$.param=Z})(r||(r={}));(($)=>{class Y{constructor(X,G){this.sql=X,this.fieldAlias=G}static[z0]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new Y(this.sql,this.fieldAlias)}}$.Aliased=Y})($1||($1={}));class sV{constructor($){this.name=$}static[z0]="Placeholder";getSQL(){return new $1([this])}}function I2($,Y){return $.map((X)=>{if(q0(X,sV)){if(!(X.name in Y))throw Error(`No value for placeholder "${X.name}" was provided`);return Y[X.name]}if(q0(X,c7)&&q0(X.value,sV)){if(!(X.value.name in Y))throw Error(`No value for placeholder "${X.value.name}" was provided`);return X.encoder.mapToDriverValue(Y[X.value.name])}return X})}var Nm4=Symbol.for("drizzle:IsDrizzleView");class W7{static[z0]="View";[y6];[Nm4]=!0;constructor({name:$,schema:Y,selectedFields:X,query:G}){this[y6]={name:$,originalName:$,schema:Y,selectedFields:X,query:G,isExisting:!G,isAlias:!1}}getSQL(){return new $1([this])}}m4.prototype.getSQL=function(){return new $1([this])};r0.prototype.getSQL=function(){return new $1([this])};W6.prototype.getSQL=function(){return new $1([this])};class kR{constructor($){this.table=$}static[z0]="ColumnAliasProxyHandler";get($,Y){if(Y==="table")return this.table;return $[Y]}}class TS{constructor($,Y){this.alias=$,this.replaceOriginalName=Y}static[z0]="TableAliasProxyHandler";get($,Y){if(Y===r0.Symbol.IsAlias)return!0;if(Y===r0.Symbol.Name)return this.alias;if(this.replaceOriginalName&&Y===r0.Symbol.OriginalName)return this.alias;if(Y===y6)return{...$[y6],name:this.alias,isAlias:!0};if(Y===r0.Symbol.Columns){let G=$[r0.Symbol.Columns];if(!G)return G;let J={};return Object.keys(G).map((Q)=>{J[Q]=new Proxy(G[Q],new kR(new Proxy($,this)))}),J}let X=$[Y];if(q0(X,m4))return new Proxy(X,new kR(new Proxy($,this)));return X}}function BG($,Y){return new Proxy($,new TS(Y,!1))}function M8($,Y){return new Proxy($,new kR(new Proxy($.table,new TS(Y,!1))))}function oV($,Y){return new $1.Aliased(aQ($.sql,Y),$.fieldAlias)}function aQ($,Y){return r.join($.queryChunks.map((X)=>{if(q0(X,m4))return M8(X,Y);if(q0(X,$1))return aQ(X,Y);if(q0(X,$1.Aliased))return oV(X,Y);return X}))}class sQ extends Error{static[z0]="DrizzleError";constructor({message:$,cause:Y}){super($);this.name="DrizzleError",this.cause=Y}}class R7 extends Error{constructor($,Y,X){super(`Failed query: ${$}
params: ${Y}`);if(this.query=$,this.params=Y,this.cause=X,Error.captureStackTrace(this,R7),X)this.cause=X}}class mN extends sQ{static[z0]="TransactionRollbackError";constructor(){super({message:"Rollback"})}}class E01{static[z0]="ConsoleLogWriter";write($){console.log($)}}class uN{static[z0]="DefaultLogger";writer;constructor($){this.writer=$?.writer??new E01}logQuery($,Y){let X=Y.map((J)=>{try{return JSON.stringify(J)}catch{return String(J)}}),G=X.length?` -- params: [${X.join(", ")}]`:"";this.writer.write(`Query: ${$}${G}`)}}class pN{static[z0]="NoopLogger";logQuery(){}}class r6{static[z0]="QueryPromise";[Symbol.toStringTag]="QueryPromise";catch($){return this.then(void 0,$)}finally($){return this.then((Y)=>{return $?.(),Y},(Y)=>{throw $?.(),Y})}then($,Y){return this.execute().then($,Y)}}function tV($,Y,X){let G={},J=$.reduce((Q,{path:W,field:Z},K)=>{let H;if(q0(Z,m4))H=Z;else if(q0(Z,$1))H=Z.decoder;else if(q0(Z,W6))H=Z._.sql.decoder;else H=Z.sql.decoder;let z=Q;for(let[V,A]of W.entries())if(V<W.length-1){if(!(A in z))z[A]={};z=z[A]}else{let F=Y[K],N=z[A]=F===null?null:H.mapFromDriverValue(F);if(X&&q0(Z,m4)&&W.length===2){let D=W[0];if(!(D in G))G[D]=N===null?Q7(Z.table):!1;else if(typeof G[D]==="string"&&G[D]!==Q7(Z.table))G[D]=!1}}return Q},{});if(X&&Object.keys(G).length>0){for(let[Q,W]of Object.entries(G))if(typeof W==="string"&&!X[W])J[Q]=null}return J}function y5($,Y){return Object.entries($).reduce((X,[G,J])=>{if(typeof G!=="string")return X;let Q=Y?[...Y,G]:[G];if(q0(J,m4)||q0(J,$1)||q0(J,$1.Aliased)||q0(J,W6))X.push({path:Q,field:J});else if(q0(J,r0))X.push(...y5(J[r0.Symbol.Columns],Q));else X.push(...y5(J,Q));return X},[])}function OG($,Y){let X=Object.keys($),G=Object.keys(Y);if(X.length!==G.length)return!1;for(let[J,Q]of X.entries())if(Q!==G[J])return!1;return!0}function QZ($,Y){let X=Object.entries(Y).filter(([,G])=>G!==void 0).map(([G,J])=>{if(q0(J,$1)||q0(J,m4))return[G,J];else return[G,new c7(J,$[r0.Symbol.Columns][G])]});if(X.length===0)throw Error("No values to set");return Object.fromEntries(X)}function vR($,Y){for(let X of Y)for(let G of Object.getOwnPropertyNames(X.prototype)){if(G==="constructor")continue;Object.defineProperty($.prototype,G,Object.getOwnPropertyDescriptor(X.prototype,G)||Object.create(null))}}function SH($){return $[r0.Symbol.Columns]}function GX($){return q0($,W6)?$._.alias:q0($,W7)?$[y6].name:q0($,$1)?void 0:$[r0.Symbol.IsAlias]?$[r0.Symbol.Name]:$[r0.Symbol.BaseName]}function S1($,Y){return{name:typeof $==="string"&&$.length>0?$:"",config:typeof $==="object"?$:Y}}function xR($){if(typeof $!=="object"||$===null)return!1;if($.constructor.name!=="Object")return!1;if("logger"in $){let Y=typeof $.logger;if(Y!=="boolean"&&(Y!=="object"||typeof $.logger.logQuery!=="function")&&Y!=="undefined")return!1;return!0}if("schema"in $){let Y=typeof $.schema;if(Y!=="object"&&Y!=="undefined")return!1;return!0}if("casing"in $){let Y=typeof $.casing;if(Y!=="string"&&Y!=="undefined")return!1;return!0}if("mode"in $){if($.mode!=="default"||$.mode!=="planetscale"||$.mode!==void 0)return!1;return!0}if("connection"in $){let Y=typeof $.connection;if(Y!=="string"&&Y!=="object"&&Y!=="undefined")return!1;return!0}if("client"in $){let Y=typeof $.client;if(Y!=="object"&&Y!=="function"&&Y!=="undefined")return!1;return!0}if(Object.keys($).length===0)return!0;return!1}var sW0=typeof TextDecoder>"u"?null:new TextDecoder;class eV extends F4{static[z0]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity($){if($){let{name:Y,...X}=$;this.config.generatedIdentity={type:"always",sequenceName:Y,sequenceOptions:X}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity($){if($){let{name:Y,...X}=$;this.config.generatedIdentity={type:"byDefault",sequenceName:Y,sequenceOptions:X}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}}class M01 extends eV{static[z0]="PgBigInt53Builder";constructor($){super($,"number","PgBigInt53")}build($){return new R01($,this.config)}}class R01 extends m1{static[z0]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}}class q01 extends eV{static[z0]="PgBigInt64Builder";constructor($){super($,"bigint","PgBigInt64")}build($){return new I01($,this.config)}}class I01 extends m1{static[z0]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue($){return BigInt($)}}function CS($,Y){let{name:X,config:G}=S1($,Y);if(G.mode==="number")return new M01(X);return new q01(X)}class P01 extends F4{static[z0]="PgBigSerial53Builder";constructor($){super($,"number","PgBigSerial53");this.config.hasDefault=!0,this.config.notNull=!0}build($){return new w01($,this.config)}}class w01 extends m1{static[z0]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}}class _01 extends F4{static[z0]="PgBigSerial64Builder";constructor($){super($,"bigint","PgBigSerial64");this.config.hasDefault=!0}build($){return new j01($,this.config)}}class j01 extends m1{static[z0]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue($){return BigInt($)}}function SS($,Y){let{name:X,config:G}=S1($,Y);if(G.mode==="number")return new P01(X);return new _01(X)}class T01 extends F4{static[z0]="PgBooleanBuilder";constructor($){super($,"boolean","PgBoolean")}build($){return new C01($,this.config)}}class C01 extends m1{static[z0]="PgBoolean";getSQLType(){return"boolean"}}function kS($){return new T01($??"")}class S01 extends F4{static[z0]="PgCharBuilder";constructor($,Y){super($,"string","PgChar");this.config.length=Y.length,this.config.enumValues=Y.enum}build($){return new k01($,this.config)}}class k01 extends m1{static[z0]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}}function vS($,Y={}){let{name:X,config:G}=S1($,Y);return new S01(X,G)}class v01 extends F4{static[z0]="PgCidrBuilder";constructor($){super($,"string","PgCidr")}build($){return new x01($,this.config)}}class x01 extends m1{static[z0]="PgCidr";getSQLType(){return"cidr"}}function y01($){return new v01($??"")}class b01 extends F4{static[z0]="PgCustomColumnBuilder";constructor($,Y,X){super($,"custom","PgCustomColumn");this.config.fieldConfig=Y,this.config.customTypeParams=X}build($){return new h01($,this.config)}}class h01 extends m1{static[z0]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor($,Y){super($,Y);this.sqlName=Y.customTypeParams.dataType(Y.fieldConfig),this.mapTo=Y.customTypeParams.toDriver,this.mapFrom=Y.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue($){return typeof this.mapFrom==="function"?this.mapFrom($):$}mapToDriverValue($){return typeof this.mapTo==="function"?this.mapTo($):$}}function f01($){return(Y,X)=>{let{name:G,config:J}=S1(Y,X);return new b01(G,J,$)}}class kH extends F4{static[z0]="PgDateColumnBaseBuilder";defaultNow(){return this.default(r`now()`)}}class g01 extends kH{static[z0]="PgDateBuilder";constructor($){super($,"date","PgDate")}build($){return new Tl($,this.config)}}class Tl extends m1{static[z0]="PgDate";getSQLType(){return"date"}mapFromDriverValue($){if(typeof $==="string")return new Date($);return $}mapToDriverValue($){return $.toISOString()}}class m01 extends kH{static[z0]="PgDateStringBuilder";constructor($){super($,"string","PgDateString")}build($){return new Cl($,this.config)}}class Cl extends m1{static[z0]="PgDateString";getSQLType(){return"date"}mapFromDriverValue($){if(typeof $==="string")return $;return $.toISOString().slice(0,-14)}}function xS($,Y){let{name:X,config:G}=S1($,Y);if(G?.mode==="date")return new g01(X);return new m01(X)}class u01 extends F4{static[z0]="PgDoublePrecisionBuilder";constructor($){super($,"number","PgDoublePrecision")}build($){return new p01($,this.config)}}class p01 extends m1{static[z0]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue($){if(typeof $==="string")return Number.parseFloat($);return $}}function yS($){return new u01($??"")}class d01 extends F4{static[z0]="PgInetBuilder";constructor($){super($,"string","PgInet")}build($){return new c01($,this.config)}}class c01 extends m1{static[z0]="PgInet";getSQLType(){return"inet"}}function l01($){return new d01($??"")}class i01 extends eV{static[z0]="PgIntegerBuilder";constructor($){super($,"number","PgInteger")}build($){return new n01($,this.config)}}class n01 extends m1{static[z0]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue($){if(typeof $==="string")return Number.parseInt($);return $}}function bS($){return new i01($??"")}class r01 extends F4{static[z0]="PgIntervalBuilder";constructor($,Y){super($,"string","PgInterval");this.config.intervalConfig=Y}build($){return new a01($,this.config)}}class a01 extends m1{static[z0]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){let $=this.fields?` ${this.fields}`:"",Y=this.precision?`(${this.precision})`:"";return`interval${$}${Y}`}}function hS($,Y={}){let{name:X,config:G}=S1($,Y);return new r01(X,G)}class s01 extends F4{static[z0]="PgJsonBuilder";constructor($){super($,"json","PgJson")}build($){return new Sl($,this.config)}}class Sl extends m1{static[z0]="PgJson";constructor($,Y){super($,Y)}getSQLType(){return"json"}mapToDriverValue($){return JSON.stringify($)}mapFromDriverValue($){if(typeof $==="string")try{return JSON.parse($)}catch{return $}return $}}function fS($){return new s01($??"")}class o01 extends F4{static[z0]="PgJsonbBuilder";constructor($){super($,"json","PgJsonb")}build($){return new kl($,this.config)}}class kl extends m1{static[z0]="PgJsonb";constructor($,Y){super($,Y)}getSQLType(){return"jsonb"}mapToDriverValue($){return JSON.stringify($)}mapFromDriverValue($){if(typeof $==="string")try{return JSON.parse($)}catch{return $}return $}}function gS($){return new o01($??"")}class t01 extends F4{static[z0]="PgLineBuilder";constructor($){super($,"array","PgLine")}build($){return new e01($,this.config)}}class e01 extends m1{static[z0]="PgLine";getSQLType(){return"line"}mapFromDriverValue($){let[Y,X,G]=$.slice(1,-1).split(",");return[Number.parseFloat(Y),Number.parseFloat(X),Number.parseFloat(G)]}mapToDriverValue($){return`{${$[0]},${$[1]},${$[2]}}`}}class $11 extends F4{static[z0]="PgLineABCBuilder";constructor($){super($,"json","PgLineABC")}build($){return new Y11($,this.config)}}class Y11 extends m1{static[z0]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue($){let[Y,X,G]=$.slice(1,-1).split(",");return{a:Number.parseFloat(Y),b:Number.parseFloat(X),c:Number.parseFloat(G)}}mapToDriverValue($){return`{${$.a},${$.b},${$.c}}`}}function X11($,Y){let{name:X,config:G}=S1($,Y);if(!G?.mode||G.mode==="tuple")return new t01(X);return new $11(X)}class G11 extends F4{static[z0]="PgMacaddrBuilder";constructor($){super($,"string","PgMacaddr")}build($){return new J11($,this.config)}}class J11 extends m1{static[z0]="PgMacaddr";getSQLType(){return"macaddr"}}function Q11($){return new G11($??"")}class W11 extends F4{static[z0]="PgMacaddr8Builder";constructor($){super($,"string","PgMacaddr8")}build($){return new Z11($,this.config)}}class Z11 extends m1{static[z0]="PgMacaddr8";getSQLType(){return"macaddr8"}}function K11($){return new W11($??"")}class U11 extends F4{static[z0]="PgNumericBuilder";constructor($,Y,X){super($,"string","PgNumeric");this.config.precision=Y,this.config.scale=X}build($){return new vl($,this.config)}}class vl extends m1{static[z0]="PgNumeric";precision;scale;constructor($,Y){super($,Y);this.precision=Y.precision,this.scale=Y.scale}mapFromDriverValue($){if(typeof $==="string")return $;return String($)}getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`numeric(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"numeric";else return`numeric(${this.precision})`}}class H11 extends F4{static[z0]="PgNumericNumberBuilder";constructor($,Y,X){super($,"number","PgNumericNumber");this.config.precision=Y,this.config.scale=X}build($){return new z11($,this.config)}}class z11 extends m1{static[z0]="PgNumericNumber";precision;scale;constructor($,Y){super($,Y);this.precision=Y.precision,this.scale=Y.scale}mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}mapToDriverValue=String;getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`numeric(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"numeric";else return`numeric(${this.precision})`}}class V11 extends F4{static[z0]="PgNumericBigIntBuilder";constructor($,Y,X){super($,"bigint","PgNumericBigInt");this.config.precision=Y,this.config.scale=X}build($){return new A11($,this.config)}}class A11 extends m1{static[z0]="PgNumericBigInt";precision;scale;constructor($,Y){super($,Y);this.precision=Y.precision,this.scale=Y.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`numeric(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"numeric";else return`numeric(${this.precision})`}}function mS($,Y){let{name:X,config:G}=S1($,Y),J=G?.mode;return J==="number"?new H11(X,G?.precision,G?.scale):J==="bigint"?new V11(X,G?.precision,G?.scale):new U11(X,G?.precision,G?.scale)}class F11 extends F4{static[z0]="PgPointTupleBuilder";constructor($){super($,"array","PgPointTuple")}build($){return new D11($,this.config)}}class D11 extends m1{static[z0]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue($){if(typeof $==="string"){let[Y,X]=$.slice(1,-1).split(",");return[Number.parseFloat(Y),Number.parseFloat(X)]}return[$.x,$.y]}mapToDriverValue($){return`(${$[0]},${$[1]})`}}class N11 extends F4{static[z0]="PgPointObjectBuilder";constructor($){super($,"json","PgPointObject")}build($){return new L11($,this.config)}}class L11 extends m1{static[z0]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue($){if(typeof $==="string"){let[Y,X]=$.slice(1,-1).split(",");return{x:Number.parseFloat(Y),y:Number.parseFloat(X)}}return $}mapToDriverValue($){return`(${$.x},${$.y})`}}function B11($,Y){let{name:X,config:G}=S1($,Y);if(!G?.mode||G.mode==="tuple")return new F11(X);return new N11(X)}function Lm4($){let Y=[];for(let X=0;X<$.length;X+=2)Y.push(Number.parseInt($.slice(X,X+2),16));return new Uint8Array(Y)}function O11($,Y){let X=new ArrayBuffer(8),G=new DataView(X);for(let J=0;J<8;J++)G.setUint8(J,$[Y+J]);return G.getFloat64(0,!0)}function oW0($){let Y=Lm4($),X=0,G=Y[X];X+=1;let J=new DataView(Y.buffer),Q=J.getUint32(X,G===1);X+=4;let W;if(Q&536870912)W=J.getUint32(X,G===1),X+=4;if((Q&65535)===1){let Z=O11(Y,X);X+=8;let K=O11(Y,X);return X+=8,[Z,K]}throw Error("Unsupported geometry type")}class E11 extends F4{static[z0]="PgGeometryBuilder";constructor($){super($,"array","PgGeometry")}build($){return new M11($,this.config)}}class M11 extends m1{static[z0]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue($){return oW0($)}mapToDriverValue($){return`point(${$[0]} ${$[1]})`}}class R11 extends F4{static[z0]="PgGeometryObjectBuilder";constructor($){super($,"json","PgGeometryObject")}build($){return new q11($,this.config)}}class q11 extends m1{static[z0]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue($){let Y=oW0($);return{x:Y[0],y:Y[1]}}mapToDriverValue($){return`point(${$.x} ${$.y})`}}function I11($,Y){let{name:X,config:G}=S1($,Y);if(!G?.mode||G.mode==="tuple")return new E11(X);return new R11(X)}class P11 extends F4{static[z0]="PgRealBuilder";constructor($,Y){super($,"number","PgReal");this.config.length=Y}build($){return new w11($,this.config)}}class w11 extends m1{static[z0]="PgReal";constructor($,Y){super($,Y)}getSQLType(){return"real"}mapFromDriverValue=($)=>{if(typeof $==="string")return Number.parseFloat($);return $}}function uS($){return new P11($??"")}class _11 extends F4{static[z0]="PgSerialBuilder";constructor($){super($,"number","PgSerial");this.config.hasDefault=!0,this.config.notNull=!0}build($){return new j11($,this.config)}}class j11 extends m1{static[z0]="PgSerial";getSQLType(){return"serial"}}function pS($){return new _11($??"")}class T11 extends eV{static[z0]="PgSmallIntBuilder";constructor($){super($,"number","PgSmallInt")}build($){return new C11($,this.config)}}class C11 extends m1{static[z0]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=($)=>{if(typeof $==="string")return Number($);return $}}function dS($){return new T11($??"")}class S11 extends F4{static[z0]="PgSmallSerialBuilder";constructor($){super($,"number","PgSmallSerial");this.config.hasDefault=!0,this.config.notNull=!0}build($){return new k11($,this.config)}}class k11 extends m1{static[z0]="PgSmallSerial";getSQLType(){return"smallserial"}}function cS($){return new S11($??"")}class v11 extends F4{static[z0]="PgTextBuilder";constructor($,Y){super($,"string","PgText");this.config.enumValues=Y.enum}build($){return new x11($,this.config)}}class x11 extends m1{static[z0]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}}function lS($,Y={}){let{name:X,config:G}=S1($,Y);return new v11(X,G)}class y11 extends kH{constructor($,Y,X){super($,"string","PgTime");this.withTimezone=Y,this.precision=X,this.config.withTimezone=Y,this.config.precision=X}static[z0]="PgTimeBuilder";build($){return new xl($,this.config)}}class xl extends m1{static[z0]="PgTime";withTimezone;precision;constructor($,Y){super($,Y);this.withTimezone=Y.withTimezone,this.precision=Y.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}function iS($,Y={}){let{name:X,config:G}=S1($,Y);return new y11(X,G.withTimezone??!1,G.precision)}class b11 extends kH{static[z0]="PgTimestampBuilder";constructor($,Y,X){super($,"date","PgTimestamp");this.config.withTimezone=Y,this.config.precision=X}build($){return new yl($,this.config)}}class yl extends m1{static[z0]="PgTimestamp";withTimezone;precision;constructor($,Y){super($,Y);this.withTimezone=Y.withTimezone,this.precision=Y.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue($){if(typeof $==="string")return new Date(this.withTimezone?$:$+"+0000");return $}mapToDriverValue=($)=>{return $.toISOString()}}class h11 extends kH{static[z0]="PgTimestampStringBuilder";constructor($,Y,X){super($,"string","PgTimestampString");this.config.withTimezone=Y,this.config.precision=X}build($){return new bl($,this.config)}}class bl extends m1{static[z0]="PgTimestampString";withTimezone;precision;constructor($,Y){super($,Y);this.withTimezone=Y.withTimezone,this.precision=Y.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue($){if(typeof $==="string")return $;let Y=$.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone){let X=$.getTimezoneOffset(),G=X<=0?"+":"-";return`${Y}${G}${Math.floor(Math.abs(X)/60).toString().padStart(2,"0")}`}return Y}}function nS($,Y={}){let{name:X,config:G}=S1($,Y);if(G?.mode==="string")return new h11(X,G.withTimezone??!1,G.precision);return new b11(X,G?.withTimezone??!1,G?.precision)}class f11 extends F4{static[z0]="PgUUIDBuilder";constructor($){super($,"string","PgUUID")}defaultRandom(){return this.default(r`gen_random_uuid()`)}build($){return new hl($,this.config)}}class hl extends m1{static[z0]="PgUUID";getSQLType(){return"uuid"}}function g11($){return new f11($??"")}class m11 extends F4{static[z0]="PgVarcharBuilder";constructor($,Y){super($,"string","PgVarchar");this.config.length=Y.length,this.config.enumValues=Y.enum}build($){return new u11($,this.config)}}class u11 extends m1{static[z0]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}}function rS($,Y={}){let{name:X,config:G}=S1($,Y);return new m11(X,G)}class p11 extends F4{static[z0]="PgBinaryVectorBuilder";constructor($,Y){super($,"string","PgBinaryVector");this.config.dimensions=Y.dimensions}build($){return new d11($,this.config)}}class d11 extends m1{static[z0]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}}function c11($,Y){let{name:X,config:G}=S1($,Y);return new p11(X,G)}class l11 extends F4{static[z0]="PgHalfVectorBuilder";constructor($,Y){super($,"array","PgHalfVector");this.config.dimensions=Y.dimensions}build($){return new i11($,this.config)}}class i11 extends m1{static[z0]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue($){return JSON.stringify($)}mapFromDriverValue($){return $.slice(1,-1).split(",").map((Y)=>Number.parseFloat(Y))}}function n11($,Y){let{name:X,config:G}=S1($,Y);return new l11(X,G)}class r11 extends F4{static[z0]="PgSparseVectorBuilder";constructor($,Y){super($,"string","PgSparseVector");this.config.dimensions=Y.dimensions}build($){return new a11($,this.config)}}class a11 extends m1{static[z0]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}}function s11($,Y){let{name:X,config:G}=S1($,Y);return new r11(X,G)}class o11 extends F4{static[z0]="PgVectorBuilder";constructor($,Y){super($,"array","PgVector");this.config.dimensions=Y.dimensions}build($){return new t11($,this.config)}}class t11 extends m1{static[z0]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue($){return JSON.stringify($)}mapFromDriverValue($){return $.slice(1,-1).split(",").map((Y)=>Number.parseFloat(Y))}}function e11($,Y){let{name:X,config:G}=S1($,Y);return new o11(X,G)}function $41(){return{bigint:CS,bigserial:SS,boolean:kS,char:vS,cidr:y01,customType:f01,date:xS,doublePrecision:yS,inet:l01,integer:bS,interval:hS,json:fS,jsonb:gS,line:X11,macaddr:Q11,macaddr8:K11,numeric:mS,point:B11,geometry:I11,real:uS,serial:pS,smallint:dS,smallserial:cS,text:lS,time:iS,timestamp:nS,uuid:g11,varchar:rS,bit:c11,halfvec:n11,sparsevec:s11,vector:e11}}var tW0=Symbol.for("drizzle:PgInlineForeignKeys"),Y41=Symbol.for("drizzle:EnableRLS");class YY extends r0{static[z0]="PgTable";static Symbol=Object.assign({},r0.Symbol,{InlineForeignKeys:tW0,EnableRLS:Y41});[tW0]=[];[Y41]=!1;[r0.Symbol.ExtraConfigBuilder]=void 0;[r0.Symbol.ExtraConfigColumns]={}}function eW0($,Y,X,G,J=$){let Q=new YY($,G,J),W=typeof Y==="function"?Y($41()):Y,Z=Object.fromEntries(Object.entries(W).map(([z,V])=>{let A=V;A.setName(z);let F=A.build(Q);return Q[tW0].push(...A.buildForeignKeys(F,Q)),[z,F]})),K=Object.fromEntries(Object.entries(W).map(([z,V])=>{let A=V;A.setName(z);let F=A.buildExtraConfigColumn(Q);return[z,F]})),H=Object.assign(Q,Z);if(H[r0.Symbol.Columns]=Z,H[r0.Symbol.ExtraConfigColumns]=K,X)H[YY.Symbol.ExtraConfigBuilder]=X;return Object.assign(H,{enableRLS:()=>{return H[YY.Symbol.EnableRLS]=!0,H}})}var dN=($,Y,X)=>{return eW0($,Y,X,void 0)};class $Z0{static[z0]="PgPrimaryKeyBuilder";columns;name;constructor($,Y){this.columns=$,this.name=Y}build($){return new X41($,this.columns,this.name)}}class X41{constructor($,Y,X){this.table=$,this.columns=Y,this.name=X}static[z0]="PgPrimaryKey";columns;name;getName(){return this.name??`${this.table[YY.Symbol.Name]}_${this.columns.map(($)=>$.name).join("_")}_pk`}}function yJ($,Y){if(L01(Y)&&!aW0($)&&!q0($,c7)&&!q0($,sV)&&!q0($,m4)&&!q0($,r0)&&!q0($,W7))return new c7($,Y);return $}var R1=($,Y)=>{return r`${$} = ${yJ(Y,$)}`},G41=($,Y)=>{return r`${$} <> ${yJ(Y,$)}`};function l7(...$){let Y=$.filter((X)=>X!==void 0);if(Y.length===0)return;if(Y.length===1)return new $1(Y);return new $1([new $Y("("),r.join(Y,new $Y(" and ")),new $Y(")")])}function J41(...$){let Y=$.filter((X)=>X!==void 0);if(Y.length===0)return;if(Y.length===1)return new $1(Y);return new $1([new $Y("("),r.join(Y,new $Y(" or ")),new $Y(")")])}function Q41($){return r`not ${$}`}var W41=($,Y)=>{return r`${$} > ${yJ(Y,$)}`},Z41=($,Y)=>{return r`${$} >= ${yJ(Y,$)}`},K41=($,Y)=>{return r`${$} < ${yJ(Y,$)}`},U41=($,Y)=>{return r`${$} <= ${yJ(Y,$)}`};function YZ0($,Y){if(Array.isArray(Y)){if(Y.length===0)return r`false`;return r`${$} in ${Y.map((X)=>yJ(X,$))}`}return r`${$} in ${yJ(Y,$)}`}function H41($,Y){if(Array.isArray(Y)){if(Y.length===0)return r`true`;return r`${$} not in ${Y.map((X)=>yJ(X,$))}`}return r`${$} not in ${yJ(Y,$)}`}function z41($){return r`${$} is null`}function V41($){return r`${$} is not null`}function A41($){return r`exists ${$}`}function F41($){return r`not exists ${$}`}function D41($,Y,X){return r`${$} between ${yJ(Y,$)} and ${yJ(X,$)}`}function N41($,Y,X){return r`${$} not between ${yJ(Y,$)} and ${yJ(X,$)}`}function L41($,Y){return r`${$} like ${Y}`}function B41($,Y){return r`${$} not like ${Y}`}function O41($,Y){return r`${$} ilike ${Y}`}function E41($,Y){return r`${$} not ilike ${Y}`}function vH($){return r`${$} asc`}function oQ($){return r`${$} desc`}class XZ0{constructor($,Y,X){this.sourceTable=$,this.referencedTable=Y,this.relationName=X,this.referencedTableName=Y[r0.Symbol.Name]}static[z0]="Relation";referencedTableName;fieldName}class M41{constructor($,Y){this.table=$,this.config=Y}static[z0]="Relations"}class tQ extends XZ0{constructor($,Y,X,G){super($,Y,X?.relationName);this.config=X,this.isNullable=G}static[z0]="One";withFieldName($){let Y=new tQ(this.sourceTable,this.referencedTable,this.config,this.isNullable);return Y.fieldName=$,Y}}class P2 extends XZ0{constructor($,Y,X){super($,Y,X?.relationName);this.config=X}static[z0]="Many";withFieldName($){let Y=new P2(this.sourceTable,this.referencedTable,this.config);return Y.fieldName=$,Y}}function cN(){return{and:l7,between:D41,eq:R1,exists:A41,gt:W41,gte:Z41,ilike:O41,inArray:YZ0,isNull:z41,isNotNull:V41,like:L41,lt:K41,lte:U41,ne:G41,not:Q41,notBetween:N41,notExists:F41,notLike:B41,notIlike:E41,notInArray:H41,or:J41,sql:r}}function lN(){return{sql:r,asc:vH,desc:oQ}}function yR($,Y){if(Object.keys($).length===1&&"default"in $&&!q0($.default,r0))$=$.default;let X={},G={},J={};for(let[Q,W]of Object.entries($))if(q0(W,r0)){let Z=JZ(W),K=G[Z];X[Z]=Q,J[Q]={tsName:Q,dbName:W[r0.Symbol.Name],schema:W[r0.Symbol.Schema],columns:W[r0.Symbol.Columns],relations:K?.relations??{},primaryKey:K?.primaryKey??[]};for(let z of Object.values(W[r0.Symbol.Columns]))if(z.primary)J[Q].primaryKey.push(z);let H=W[r0.Symbol.ExtraConfigBuilder]?.(W[r0.Symbol.ExtraConfigColumns]);if(H){for(let z of Object.values(H))if(q0(z,$Z0))J[Q].primaryKey.push(...z.columns)}}else if(q0(W,M41)){let Z=JZ(W.table),K=X[Z],H=W.config(Y(W.table)),z;for(let[V,A]of Object.entries(H))if(K){let F=J[K];if(F.relations[V]=A,z)F.primaryKey.push(...z)}else{if(!(Z in G))G[Z]={relations:{},primaryKey:z};G[Z].relations[V]=A}}return{tables:J,tableNamesMap:X}}function Bm4($){return function(X,G){return new tQ($,X,G,G?.fields.reduce((J,Q)=>J&&Q.notNull,!0)??!1)}}function Om4($){return function(X,G){return new P2($,X,G)}}function iN($,Y,X){if(q0(X,tQ)&&X.config)return{fields:X.config.fields,references:X.config.references};let G=Y[JZ(X.referencedTable)];if(!G)throw Error(`Table "${X.referencedTable[r0.Symbol.Name]}" not found in schema`);let J=$[G];if(!J)throw Error(`Table "${G}" not found in schema`);let Q=X.sourceTable,W=Y[JZ(Q)];if(!W)throw Error(`Table "${Q[r0.Symbol.Name]}" not found in schema`);let Z=[];for(let K of Object.values(J.relations))if(X.relationName&&X!==K&&K.relationName===X.relationName||!X.relationName&&K.referencedTable===X.sourceTable)Z.push(K);if(Z.length>1)throw X.relationName?Error(`There are multiple relations with name "${X.relationName}" in table "${G}"`):Error(`There are multiple relations between "${G}" and "${X.sourceTable[r0.Symbol.Name]}". Please specify relation name`);if(Z[0]&&q0(Z[0],tQ)&&Z[0].config)return{fields:Z[0].config.references,references:Z[0].config.fields};throw Error(`There is not enough information to infer relation "${W}.${X.fieldName}"`)}function bR($){return{one:Bm4($),many:Om4($)}}function $A($,Y,X,G,J=(Q)=>Q){let Q={};for(let[W,Z]of G.entries())if(Z.isJson){let K=Y.relations[Z.tsKey],H=X[W],z=typeof H==="string"?JSON.parse(H):H;Q[Z.tsKey]=q0(K,tQ)?z&&$A($,$[Z.relationTableTsKey],z,Z.selection,J):z.map((V)=>$A($,$[Z.relationTableTsKey],V,Z.selection,J))}else{let K=J(X[W]),H=Z.field,z;if(q0(H,m4))z=H;else if(q0(H,$1))z=H.decoder;else z=H.sql.decoder;Q[Z.tsKey]=K===null?null:z.mapFromDriverValue(K)}return Q}import{Database as ll}from"bun:sqlite";class I4{static[z0]="SelectionProxyHandler";config;constructor($){this.config={...$}}get($,Y){if(Y==="_")return{...$._,selectedFields:new Proxy($._.selectedFields,this)};if(Y===y6)return{...$[y6],selectedFields:new Proxy($[y6].selectedFields,this)};if(typeof Y==="symbol")return $[Y];let G=(q0($,W6)?$._.selectedFields:q0($,W7)?$[y6].selectedFields:$)[Y];if(q0(G,$1.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!G.isSelectionField)return G.sql;let J=G.clone();return J.isSelectionField=!0,J}if(q0(G,$1)){if(this.config.sqlBehavior==="sql")return G;throw Error(`You tried to reference "${Y}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}if(q0(G,m4)){if(this.config.alias)return new Proxy(G,new kR(new Proxy(G.table,new TS(this.config.alias,this.config.replaceOriginalName??!1))));return G}if(typeof G!=="object"||G===null)return G;return new Proxy(G,new I4(this.config))}}class GZ0{static[z0]="SQLiteForeignKeyBuilder";reference;_onUpdate;_onDelete;constructor($,Y){if(this.reference=()=>{let{name:X,columns:G,foreignColumns:J}=$();return{name:X,columns:G,foreignTable:J[0].table,foreignColumns:J}},Y)this._onUpdate=Y.onUpdate,this._onDelete=Y.onDelete}onUpdate($){return this._onUpdate=$,this}onDelete($){return this._onDelete=$,this}build($){return new R41($,this)}}class R41{constructor($,Y){this.table=$,this.reference=Y.reference,this.onUpdate=Y._onUpdate,this.onDelete=Y._onDelete}static[z0]="SQLiteForeignKey";reference;onUpdate;onDelete;getName(){let{name:$,columns:Y,foreignColumns:X}=this.reference(),G=Y.map((W)=>W.name),J=X.map((W)=>W.name),Q=[this.table[A$],...G,X[0].table[A$],...J];return $??`${Q.join("_")}_fk`}}function q41($,Y){return`${$[A$]}_${Y.join("_")}_unique`}class IY extends fN{static[z0]="SQLiteColumnBuilder";foreignKeyConfigs=[];references($,Y={}){return this.foreignKeyConfigs.push({ref:$,actions:Y}),this}unique($){return this.config.isUnique=!0,this.config.uniqueName=$,this}generatedAlwaysAs($,Y){return this.config.generated={as:$,type:"always",mode:Y?.mode??"virtual"},this}buildForeignKeys($,Y){return this.foreignKeyConfigs.map(({ref:X,actions:G})=>{return((J,Q)=>{let W=new GZ0(()=>{let Z=J();return{columns:[$],foreignColumns:[Z]}});if(Q.onUpdate)W.onUpdate(Q.onUpdate);if(Q.onDelete)W.onDelete(Q.onDelete);return W.build(Y)})(X,G)})}}class i7 extends m4{constructor($,Y){if(!Y.uniqueName)Y.uniqueName=q41($,[Y.name]);super($,Y);this.table=$}static[z0]="SQLiteColumn"}class I41 extends IY{static[z0]="SQLiteBigIntBuilder";constructor($){super($,"bigint","SQLiteBigInt")}build($){return new P41($,this.config)}}class P41 extends i7{static[z0]="SQLiteBigInt";getSQLType(){return"blob"}mapFromDriverValue($){if(typeof Buffer<"u"&&Buffer.from){let Y=Buffer.isBuffer($)?$:$ instanceof ArrayBuffer?Buffer.from($):$.buffer?Buffer.from($.buffer,$.byteOffset,$.byteLength):Buffer.from($);return BigInt(Y.toString("utf8"))}return BigInt(sW0.decode($))}mapToDriverValue($){return Buffer.from($.toString())}}class w41 extends IY{static[z0]="SQLiteBlobJsonBuilder";constructor($){super($,"json","SQLiteBlobJson")}build($){return new _41($,this.config)}}class _41 extends i7{static[z0]="SQLiteBlobJson";getSQLType(){return"blob"}mapFromDriverValue($){if(typeof Buffer<"u"&&Buffer.from){let Y=Buffer.isBuffer($)?$:$ instanceof ArrayBuffer?Buffer.from($):$.buffer?Buffer.from($.buffer,$.byteOffset,$.byteLength):Buffer.from($);return JSON.parse(Y.toString("utf8"))}return JSON.parse(sW0.decode($))}mapToDriverValue($){return Buffer.from(JSON.stringify($))}}class j41 extends IY{static[z0]="SQLiteBlobBufferBuilder";constructor($){super($,"buffer","SQLiteBlobBuffer")}build($){return new T41($,this.config)}}class T41 extends i7{static[z0]="SQLiteBlobBuffer";mapFromDriverValue($){if(Buffer.isBuffer($))return $;return Buffer.from($)}getSQLType(){return"blob"}}function nN($,Y){let{name:X,config:G}=S1($,Y);if(G?.mode==="json")return new w41(X);if(G?.mode==="bigint")return new I41(X);return new j41(X)}class C41 extends IY{static[z0]="SQLiteCustomColumnBuilder";constructor($,Y,X){super($,"custom","SQLiteCustomColumn");this.config.fieldConfig=Y,this.config.customTypeParams=X}build($){return new S41($,this.config)}}class S41 extends i7{static[z0]="SQLiteCustomColumn";sqlName;mapTo;mapFrom;constructor($,Y){super($,Y);this.sqlName=Y.customTypeParams.dataType(Y.fieldConfig),this.mapTo=Y.customTypeParams.toDriver,this.mapFrom=Y.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue($){return typeof this.mapFrom==="function"?this.mapFrom($):$}mapToDriverValue($){return typeof this.mapTo==="function"?this.mapTo($):$}}function k41($){return(Y,X)=>{let{name:G,config:J}=S1(Y,X);return new C41(G,J,$)}}class fl extends IY{static[z0]="SQLiteBaseIntegerBuilder";constructor($,Y,X){super($,Y,X);this.config.autoIncrement=!1}primaryKey($){if($?.autoIncrement)this.config.autoIncrement=!0;return this.config.hasDefault=!0,super.primaryKey()}}class gl extends i7{static[z0]="SQLiteBaseInteger";autoIncrement=this.config.autoIncrement;getSQLType(){return"integer"}}class v41 extends fl{static[z0]="SQLiteIntegerBuilder";constructor($){super($,"number","SQLiteInteger")}build($){return new x41($,this.config)}}class x41 extends gl{static[z0]="SQLiteInteger"}class y41 extends fl{static[z0]="SQLiteTimestampBuilder";constructor($,Y){super($,"date","SQLiteTimestamp");this.config.mode=Y}defaultNow(){return this.default(r`(cast((julianday('now') - 2440587.5)*86400000 as integer))`)}build($){return new b41($,this.config)}}class b41 extends gl{static[z0]="SQLiteTimestamp";mode=this.config.mode;mapFromDriverValue($){if(this.config.mode==="timestamp")return new Date($*1000);return new Date($)}mapToDriverValue($){let Y=$.getTime();if(this.config.mode==="timestamp")return Math.floor(Y/1000);return Y}}class h41 extends fl{static[z0]="SQLiteBooleanBuilder";constructor($,Y){super($,"boolean","SQLiteBoolean");this.config.mode=Y}build($){return new f41($,this.config)}}class f41 extends gl{static[z0]="SQLiteBoolean";mode=this.config.mode;mapFromDriverValue($){return Number($)===1}mapToDriverValue($){return $?1:0}}function k1($,Y){let{name:X,config:G}=S1($,Y);if(G?.mode==="timestamp"||G?.mode==="timestamp_ms")return new y41(X,G.mode);if(G?.mode==="boolean")return new h41(X,G.mode);return new v41(X)}class g41 extends IY{static[z0]="SQLiteNumericBuilder";constructor($){super($,"string","SQLiteNumeric")}build($){return new m41($,this.config)}}class m41 extends i7{static[z0]="SQLiteNumeric";mapFromDriverValue($){if(typeof $==="string")return $;return String($)}getSQLType(){return"numeric"}}class u41 extends IY{static[z0]="SQLiteNumericNumberBuilder";constructor($){super($,"number","SQLiteNumericNumber")}build($){return new p41($,this.config)}}class p41 extends i7{static[z0]="SQLiteNumericNumber";mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}mapToDriverValue=String;getSQLType(){return"numeric"}}class d41 extends IY{static[z0]="SQLiteNumericBigIntBuilder";constructor($){super($,"bigint","SQLiteNumericBigInt")}build($){return new c41($,this.config)}}class c41 extends i7{static[z0]="SQLiteNumericBigInt";mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return"numeric"}}function aS($,Y){let{name:X,config:G}=S1($,Y),J=G?.mode;return J==="number"?new u41(X):J==="bigint"?new d41(X):new g41(X)}class l41 extends IY{static[z0]="SQLiteRealBuilder";constructor($){super($,"number","SQLiteReal")}build($){return new i41($,this.config)}}class i41 extends i7{static[z0]="SQLiteReal";getSQLType(){return"real"}}function sS($){return new l41($??"")}class n41 extends IY{static[z0]="SQLiteTextBuilder";constructor($,Y){super($,"string","SQLiteText");this.config.enumValues=Y.enum,this.config.length=Y.length}build($){return new r41($,this.config)}}class r41 extends i7{static[z0]="SQLiteText";enumValues=this.config.enumValues;length=this.config.length;constructor($,Y){super($,Y)}getSQLType(){return`text${this.config.length?`(${this.config.length})`:""}`}}class a41 extends IY{static[z0]="SQLiteTextJsonBuilder";constructor($){super($,"json","SQLiteTextJson")}build($){return new s41($,this.config)}}class s41 extends i7{static[z0]="SQLiteTextJson";getSQLType(){return"text"}mapFromDriverValue($){return JSON.parse($)}mapToDriverValue($){return JSON.stringify($)}}function y0($,Y={}){let{name:X,config:G}=S1($,Y);if(G.mode==="json")return new a41(X);return new n41(X,G)}function o41(){return{blob:nN,customType:k41,integer:k1,numeric:aS,real:sS,text:y0}}var JZ0=Symbol.for("drizzle:SQLiteInlineForeignKeys");class PY extends r0{static[z0]="SQLiteTable";static Symbol=Object.assign({},r0.Symbol,{InlineForeignKeys:JZ0});[r0.Symbol.Columns];[JZ0]=[];[r0.Symbol.ExtraConfigBuilder]=void 0}function Em4($,Y,X,G,J=$){let Q=new PY($,G,J),W=typeof Y==="function"?Y(o41()):Y,Z=Object.fromEntries(Object.entries(W).map(([H,z])=>{let V=z;V.setName(H);let A=V.build(Q);return Q[JZ0].push(...V.buildForeignKeys(A,Q)),[H,A]})),K=Object.assign(Q,Z);if(K[r0.Symbol.Columns]=Z,K[r0.Symbol.ExtraConfigColumns]=Z,X)K[PY.Symbol.ExtraConfigBuilder]=X;return K}var H6=($,Y,X)=>{return Em4($,Y,X)};function w2($){if(q0($,PY))return[`${$[r0.Symbol.BaseName]}`];if(q0($,W6))return $._.usedTables??[];if(q0($,$1))return $.usedTables??[];return[]}class ml extends r6{constructor($,Y,X,G){super();this.table=$,this.session=Y,this.dialect=X,this.config={table:$,withList:G}}static[z0]="SQLiteDelete";config;where($){return this.config.where=$,this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.table[r0.Symbol.Columns],new I4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];this.config.orderBy=X}else{let Y=$;this.config.orderBy=Y}return this}limit($){return this.config.limit=$,this}returning($=this.table[PY.Symbol.Columns]){return this.config.returning=y5($),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($=!0){return this.session[$?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0,void 0,{type:"delete",tables:w2(this.config.table)})}prepare(){return this._prepare(!1)}run=($)=>{return this._prepare().run($)};all=($)=>{return this._prepare().all($)};get=($)=>{return this._prepare().get($)};values=($)=>{return this._prepare().values($)};async execute($){return this._prepare().execute($)}$dynamic(){return this}}function Mm4($){return($.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map((X)=>X.toLowerCase()).join("_")}function Rm4($){return($.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((X,G,J)=>{let Q=J===0?G.toLowerCase():`${G[0].toUpperCase()}${G.slice(1)}`;return X+Q},"")}function qm4($){return $}class rN{static[z0]="CasingCache";cache={};cachedTables={};convert;constructor($){this.convert=$==="snake_case"?Mm4:$==="camelCase"?Rm4:qm4}getColumnCasing($){if(!$.keyAsName)return $.name;let Y=$.table[r0.Symbol.Schema]??"public",X=$.table[r0.Symbol.OriginalName],G=`${Y}.${X}.${$.name}`;if(!this.cache[G])this.cacheTable($.table);return this.cache[G]}cacheTable($){let Y=$[r0.Symbol.Schema]??"public",X=$[r0.Symbol.OriginalName],G=`${Y}.${X}`;if(!this.cachedTables[G]){for(let J of Object.values($[r0.Symbol.Columns])){let Q=`${G}.${J.name}`;this.cache[Q]=this.convert(J.name)}this.cachedTables[G]=!0}}clearCache(){this.cache={},this.cachedTables={}}}class aN extends W7{static[z0]="SQLiteViewBase"}class oS{static[z0]="SQLiteDialect";casing;constructor($){this.casing=new rN($?.casing)}escapeName($){return`"${$.replace(/"/g,'""')}"`}escapeParam($){return"?"}escapeString($){return`'${$.replace(/'/g,"''")}'`}buildWithCTE($){if(!$?.length)return;let Y=[r`with `];for(let[X,G]of $.entries())if(Y.push(r`${r.identifier(G._.alias)} as (${G._.sql})`),X<$.length-1)Y.push(r`, `);return Y.push(r` `),r.join(Y)}buildDeleteQuery({table:$,where:Y,returning:X,withList:G,limit:J,orderBy:Q}){let W=this.buildWithCTE(G),Z=X?r` returning ${this.buildSelection(X,{isSingleTable:!0})}`:void 0,K=Y?r` where ${Y}`:void 0,H=this.buildOrderBy(Q),z=this.buildLimit(J);return r`${W}delete from ${$}${K}${Z}${H}${z}`}buildUpdateSet($,Y){let X=$[r0.Symbol.Columns],G=Object.keys(X).filter((Q)=>Y[Q]!==void 0||X[Q]?.onUpdateFn!==void 0),J=G.length;return r.join(G.flatMap((Q,W)=>{let Z=X[Q],K=Z.onUpdateFn?.(),H=Y[Q]??(q0(K,$1)?K:r.param(K,Z)),z=r`${r.identifier(this.casing.getColumnCasing(Z))} = ${H}`;if(W<J-1)return[z,r.raw(", ")];return[z]}))}buildUpdateQuery({table:$,set:Y,where:X,returning:G,withList:J,joins:Q,from:W,limit:Z,orderBy:K}){let H=this.buildWithCTE(J),z=this.buildUpdateSet($,Y),V=W&&r.join([r.raw(" from "),this.buildFromTable(W)]),A=this.buildJoins(Q),F=G?r` returning ${this.buildSelection(G,{isSingleTable:!0})}`:void 0,N=X?r` where ${X}`:void 0,D=this.buildOrderBy(K),L=this.buildLimit(Z);return r`${H}update ${$} set ${z}${V}${A}${N}${F}${D}${L}`}buildSelection($,{isSingleTable:Y=!1}={}){let X=$.length,G=$.flatMap(({field:J},Q)=>{let W=[];if(q0(J,$1.Aliased)&&J.isSelectionField)W.push(r.identifier(J.fieldAlias));else if(q0(J,$1.Aliased)||q0(J,$1)){let Z=q0(J,$1.Aliased)?J.sql:J;if(Y)W.push(new $1(Z.queryChunks.map((K)=>{if(q0(K,m4))return r.identifier(this.casing.getColumnCasing(K));return K})));else W.push(Z);if(q0(J,$1.Aliased))W.push(r` as ${r.identifier(J.fieldAlias)}`)}else if(q0(J,m4)){let Z=J.table[r0.Symbol.Name];if(J.columnType==="SQLiteNumericBigInt")if(Y)W.push(r`cast(${r.identifier(this.casing.getColumnCasing(J))} as text)`);else W.push(r`cast(${r.identifier(Z)}.${r.identifier(this.casing.getColumnCasing(J))} as text)`);else if(Y)W.push(r.identifier(this.casing.getColumnCasing(J)));else W.push(r`${r.identifier(Z)}.${r.identifier(this.casing.getColumnCasing(J))}`)}else if(q0(J,W6)){let Z=Object.entries(J._.selectedFields);if(Z.length===1){let K=Z[0][1],H=q0(K,$1)?K.decoder:q0(K,m4)?{mapFromDriverValue:(z)=>K.mapFromDriverValue(z)}:K.sql.decoder;if(H)J._.sql.decoder=H}W.push(J)}if(Q<X-1)W.push(r`, `);return W});return r.join(G)}buildJoins($){if(!$||$.length===0)return;let Y=[];if($)for(let[X,G]of $.entries()){if(X===0)Y.push(r` `);let J=G.table,Q=G.on?r` on ${G.on}`:void 0;if(q0(J,PY)){let W=J[PY.Symbol.Name],Z=J[PY.Symbol.Schema],K=J[PY.Symbol.OriginalName],H=W===K?void 0:G.alias;Y.push(r`${r.raw(G.joinType)} join ${Z?r`${r.identifier(Z)}.`:void 0}${r.identifier(K)}${H&&r` ${r.identifier(H)}`}${Q}`)}else Y.push(r`${r.raw(G.joinType)} join ${J}${Q}`);if(X<$.length-1)Y.push(r` `)}return r.join(Y)}buildLimit($){return typeof $==="object"||typeof $==="number"&&$>=0?r` limit ${$}`:void 0}buildOrderBy($){let Y=[];if($){for(let[X,G]of $.entries())if(Y.push(G),X<$.length-1)Y.push(r`, `)}return Y.length>0?r` order by ${r.join(Y)}`:void 0}buildFromTable($){if(q0($,r0)&&$[r0.Symbol.IsAlias])return r`${r`${r.identifier($[r0.Symbol.Schema]??"")}.`.if($[r0.Symbol.Schema])}${r.identifier($[r0.Symbol.OriginalName])} ${r.identifier($[r0.Symbol.Name])}`;return $}buildSelectQuery({withList:$,fields:Y,fieldsFlat:X,where:G,having:J,table:Q,joins:W,orderBy:Z,groupBy:K,limit:H,offset:z,distinct:V,setOperators:A}){let F=X??y5(Y);for(let k of F)if(q0(k.field,m4)&&Q7(k.field.table)!==(q0(Q,W6)?Q._.alias:q0(Q,aN)?Q[y6].name:q0(Q,$1)?void 0:Q7(Q))&&!((S)=>W?.some(({alias:T})=>T===(S[r0.Symbol.IsAlias]?Q7(S):S[r0.Symbol.BaseName])))(k.field.table)){let S=Q7(k.field.table);throw Error(`Your "${k.path.join("->")}" field references a column "${S}"."${k.field.name}", but the table "${S}" is not part of the query! Did you forget to join it?`)}let N=!W||W.length===0,D=this.buildWithCTE($),L=V?r` distinct`:void 0,B=this.buildSelection(F,{isSingleTable:N}),O=this.buildFromTable(Q),E=this.buildJoins(W),M=G?r` where ${G}`:void 0,R=J?r` having ${J}`:void 0,q=[];if(K){for(let[k,S]of K.entries())if(q.push(S),k<K.length-1)q.push(r`, `)}let w=q.length>0?r` group by ${r.join(q)}`:void 0,I=this.buildOrderBy(Z),P=this.buildLimit(H),_=z?r` offset ${z}`:void 0,C=r`${D}select${L} ${B} from ${O}${E}${M}${w}${R}${I}${P}${_}`;if(A.length>0)return this.buildSetOperations(C,A);return C}buildSetOperations($,Y){let[X,...G]=Y;if(!X)throw Error("Cannot pass undefined values to any set operator");if(G.length===0)return this.buildSetOperationQuery({leftSelect:$,setOperator:X});return this.buildSetOperations(this.buildSetOperationQuery({leftSelect:$,setOperator:X}),G)}buildSetOperationQuery({leftSelect:$,setOperator:{type:Y,isAll:X,rightSelect:G,limit:J,orderBy:Q,offset:W}}){let Z=r`${$.getSQL()} `,K=r`${G.getSQL()}`,H;if(Q&&Q.length>0){let F=[];for(let N of Q)if(q0(N,i7))F.push(r.identifier(N.name));else if(q0(N,$1)){for(let D=0;D<N.queryChunks.length;D++){let L=N.queryChunks[D];if(q0(L,i7))N.queryChunks[D]=r.identifier(this.casing.getColumnCasing(L))}F.push(r`${N}`)}else F.push(r`${N}`);H=r` order by ${r.join(F,r`, `)}`}let z=typeof J==="object"||typeof J==="number"&&J>=0?r` limit ${J}`:void 0,V=r.raw(`${Y} ${X?"all ":""}`),A=W?r` offset ${W}`:void 0;return r`${Z}${V}${K}${H}${z}${A}`}buildInsertQuery({table:$,values:Y,onConflict:X,returning:G,withList:J,select:Q}){let W=[],Z=$[r0.Symbol.Columns],K=Object.entries(Z).filter(([N,D])=>!D.shouldDisableInsert()),H=K.map(([,N])=>r.identifier(this.casing.getColumnCasing(N)));if(Q){let N=Y;if(q0(N,$1))W.push(N);else W.push(N.getSQL())}else{let N=Y;W.push(r.raw("values "));for(let[D,L]of N.entries()){let B=[];for(let[O,E]of K){let M=L[O];if(M===void 0||q0(M,c7)&&M.value===void 0){let R;if(E.default!==null&&E.default!==void 0)R=q0(E.default,$1)?E.default:r.param(E.default,E);else if(E.defaultFn!==void 0){let q=E.defaultFn();R=q0(q,$1)?q:r.param(q,E)}else if(!E.default&&E.onUpdateFn!==void 0){let q=E.onUpdateFn();R=q0(q,$1)?q:r.param(q,E)}else R=r`null`;B.push(R)}else B.push(M)}if(W.push(B),D<N.length-1)W.push(r`, `)}}let z=this.buildWithCTE(J),V=r.join(W),A=G?r` returning ${this.buildSelection(G,{isSingleTable:!0})}`:void 0,F=X?.length?r.join(X):void 0;return r`${z}insert into ${$} ${H} ${V}${F}${A}`}sqlToQuery($,Y){return $.toQuery({casing:this.casing,escapeName:this.escapeName,escapeParam:this.escapeParam,escapeString:this.escapeString,invokeSource:Y})}buildRelationalQuery({fullSchema:$,schema:Y,tableNamesMap:X,table:G,tableConfig:J,queryConfig:Q,tableAlias:W,nestedQueryRelation:Z,joinOn:K}){let H=[],z,V,A=[],F,N=[];if(Q===!0)H=Object.entries(J.columns).map(([B,O])=>({dbKey:O.name,tsKey:B,field:M8(O,W),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let L=Object.fromEntries(Object.entries(J.columns).map(([q,w])=>[q,M8(w,W)]));if(Q.where){let q=typeof Q.where==="function"?Q.where(L,cN()):Q.where;F=q&&aQ(q,W)}let B=[],O=[];if(Q.columns){let q=!1;for(let[w,I]of Object.entries(Q.columns)){if(I===void 0)continue;if(w in J.columns){if(!q&&I===!0)q=!0;O.push(w)}}if(O.length>0)O=q?O.filter((w)=>Q.columns?.[w]===!0):Object.keys(J.columns).filter((w)=>!O.includes(w))}else O=Object.keys(J.columns);for(let q of O){let w=J.columns[q];B.push({tsKey:q,value:w})}let E=[];if(Q.with)E=Object.entries(Q.with).filter((q)=>!!q[1]).map(([q,w])=>({tsKey:q,queryConfig:w,relation:J.relations[q]}));let M;if(Q.extras){M=typeof Q.extras==="function"?Q.extras(L,{sql:r}):Q.extras;for(let[q,w]of Object.entries(M))B.push({tsKey:q,value:oV(w,W)})}for(let{tsKey:q,value:w}of B)H.push({dbKey:q0(w,$1.Aliased)?w.fieldAlias:J.columns[q].name,tsKey:q,field:q0(w,m4)?M8(w,W):w,relationTableTsKey:void 0,isJson:!1,selection:[]});let R=typeof Q.orderBy==="function"?Q.orderBy(L,lN()):Q.orderBy??[];if(!Array.isArray(R))R=[R];A=R.map((q)=>{if(q0(q,m4))return M8(q,W);return aQ(q,W)}),z=Q.limit,V=Q.offset;for(let{tsKey:q,queryConfig:w,relation:I}of E){let P=iN(Y,X,I),_=JZ(I.referencedTable),C=X[_],k=`${W}_${q}`,S=l7(...P.fields.map((x,y)=>R1(M8(P.references[y],k),M8(x,W)))),T=this.buildRelationalQuery({fullSchema:$,schema:Y,tableNamesMap:X,table:$[C],tableConfig:Y[C],queryConfig:q0(I,tQ)?w===!0?{limit:1}:{...w,limit:1}:w,tableAlias:k,joinOn:S,nestedQueryRelation:I}),v=r`(${T.sql})`.as(q);H.push({dbKey:q,tsKey:q,field:v,relationTableTsKey:C,isJson:!0,selection:T.selection})}}if(H.length===0)throw new sQ({message:`No fields selected for table "${J.tsName}" ("${W}"). You need to have at least one item in "columns", "with" or "extras". If you need to select all columns, omit the "columns" key or set it to undefined.`});let D;if(F=l7(K,F),Z){let L=r`json_array(${r.join(H.map(({field:E})=>q0(E,i7)?r.identifier(this.casing.getColumnCasing(E)):q0(E,$1.Aliased)?E.sql:E),r`, `)})`;if(q0(Z,P2))L=r`coalesce(json_group_array(${L}), json_array())`;let B=[{dbKey:"data",tsKey:"data",field:L.as("data"),isJson:!0,relationTableTsKey:J.tsName,selection:H}];if(z!==void 0||V!==void 0||A.length>0)D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:[{path:[],field:r.raw("*")}],where:F,limit:z,offset:V,orderBy:A,setOperators:[]}),F=void 0,z=void 0,V=void 0,A=void 0;else D=BG(G,W);D=this.buildSelectQuery({table:q0(D,PY)?D:new W6(D,{},W),fields:{},fieldsFlat:B.map(({field:E})=>({path:[],field:q0(E,m4)?M8(E,W):E})),joins:N,where:F,limit:z,offset:V,orderBy:A,setOperators:[]})}else D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:H.map(({field:L})=>({path:[],field:q0(L,m4)?M8(L,W):L})),joins:N,where:F,limit:z,offset:V,orderBy:A,setOperators:[]});return{tableTsKey:J.tsName,sql:D,selection:H}}}class tS extends oS{static[z0]="SQLiteSyncDialect";migrate($,Y,X){let G=X===void 0?"__drizzle_migrations":typeof X==="string"?"__drizzle_migrations":X.migrationsTable??"__drizzle_migrations",J=r`
			CREATE TABLE IF NOT EXISTS ${r.identifier(G)} (
				id SERIAL PRIMARY KEY,
				hash text NOT NULL,
				created_at numeric
			)
		`;Y.run(J);let W=Y.values(r`SELECT id, hash, created_at FROM ${r.identifier(G)} ORDER BY created_at DESC LIMIT 1`)[0]??void 0;Y.run(r`BEGIN`);try{for(let Z of $)if(!W||Number(W[2])<Z.folderMillis){for(let K of Z.sql)Y.run(r.raw(K));Y.run(r`INSERT INTO ${r.identifier(G)} ("hash", "created_at") VALUES(${Z.hash}, ${Z.folderMillis})`)}Y.run(r`COMMIT`)}catch(Z){throw Y.run(r`ROLLBACK`),Z}}}class sN{static[z0]="TypedQueryBuilder";getSelectedFields(){return this._.selectedFields}}class _2{static[z0]="SQLiteSelectBuilder";fields;session;dialect;withList;distinct;constructor($){this.fields=$.fields,this.session=$.session,this.dialect=$.dialect,this.withList=$.withList,this.distinct=$.distinct}from($){let Y=!!this.fields,X;if(this.fields)X=this.fields;else if(q0($,W6))X=Object.fromEntries(Object.keys($._.selectedFields).map((G)=>[G,$[G]]));else if(q0($,aN))X=$[y6].selectedFields;else if(q0($,$1))X={};else X=SH($);return new QZ0({table:$,fields:X,isPartialSelect:Y,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct})}}class t41 extends sN{static[z0]="SQLiteSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:$,fields:Y,isPartialSelect:X,session:G,dialect:J,withList:Q,distinct:W}){super();this.config={withList:Q,table:$,fields:{...Y},distinct:W,setOperators:[]},this.isPartialSelect=X,this.session=G,this.dialect=J,this._={selectedFields:Y,config:this.config},this.tableName=GX($),this.joinsNotNullableMap=typeof this.tableName==="string"?{[this.tableName]:!0}:{};for(let Z of w2($))this.usedTables.add(Z)}getUsedTables(){return[...this.usedTables]}createJoin($){return(Y,X)=>{let G=this.tableName,J=GX(Y);for(let Q of w2(Y))this.usedTables.add(Q);if(typeof J==="string"&&this.config.joins?.some((Q)=>Q.alias===J))throw Error(`Alias "${J}" is already used in this query`);if(!this.isPartialSelect){if(Object.keys(this.joinsNotNullableMap).length===1&&typeof G==="string")this.config.fields={[G]:this.config.fields};if(typeof J==="string"&&!q0(Y,$1)){let Q=q0(Y,W6)?Y._.selectedFields:q0(Y,W7)?Y[y6].selectedFields:Y[r0.Symbol.Columns];this.config.fields[J]=Q}}if(typeof X==="function")X=X(new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));if(!this.config.joins)this.config.joins=[];if(this.config.joins.push({on:X,table:Y,joinType:$,alias:J}),typeof J==="string")switch($){case"left":{this.joinsNotNullableMap[J]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([Q])=>[Q,!1])),this.joinsNotNullableMap[J]=!0;break}case"cross":case"inner":{this.joinsNotNullableMap[J]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([Q])=>[Q,!1])),this.joinsNotNullableMap[J]=!1;break}}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");crossJoin=this.createJoin("cross");createSetOperator($,Y){return(X)=>{let G=typeof X==="function"?X(Im4()):X;if(!OG(this.getSelectedFields(),G.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:$,isAll:Y,rightSelect:G}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);except=this.createSetOperator("except",!1);addSetOperators($){return this.config.setOperators.push(...$),this}where($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.where=$,this}having($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.having=$,this}groupBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(Y)?Y:[Y]}else this.config.groupBy=$;return this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=X;else this.config.orderBy=X}else{let Y=$;if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=Y;else this.config.orderBy=Y}return this}limit($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).limit=$;else this.config.limit=$;return this}offset($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).offset=$;else this.config.offset=$;return this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}as($){let Y=[];if(Y.push(...w2(this.config.table)),this.config.joins)for(let X of this.config.joins)Y.push(...w2(X.table));return new Proxy(new W6(this.getSQL(),this.config.fields,$,!1,[...new Set(Y)]),new I4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new I4({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}}class QZ0 extends t41{static[z0]="SQLiteSelect";_prepare($=!0){if(!this.session)throw Error("Cannot execute a query on a query builder. Please use a database instance instead.");let Y=y5(this.config.fields),X=this.session[$?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),Y,"all",!0,void 0,{type:"select",tables:[...this.usedTables]},this.cacheConfig);return X.joinsNotNullableMap=this.joinsNotNullableMap,X}$withCache($){return this.cacheConfig=$===void 0?{config:{},enable:!0,autoInvalidate:!0}:$===!1?{enable:!1}:{enable:!0,autoInvalidate:!0,...$},this}prepare(){return this._prepare(!1)}run=($)=>{return this._prepare().run($)};all=($)=>{return this._prepare().all($)};get=($)=>{return this._prepare().get($)};values=($)=>{return this._prepare().values($)};async execute(){return this.all()}}vR(QZ0,[r6]);function ul($,Y){return(X,G,...J)=>{let Q=[G,...J].map((W)=>({type:$,isAll:Y,rightSelect:W}));for(let W of Q)if(!OG(X.getSelectedFields(),W.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return X.addSetOperators(Q)}}var Im4=()=>({union:Pm4,unionAll:wm4,intersect:_m4,except:jm4}),Pm4=ul("union",!1),wm4=ul("union",!0),_m4=ul("intersect",!1),jm4=ul("except",!1);class eS{static[z0]="SQLiteQueryBuilder";dialect;dialectConfig;constructor($){this.dialect=q0($,oS)?$:void 0,this.dialectConfig=q0($,oS)?void 0:$}$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(X);return new Proxy(new rQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new I4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};with(...$){let Y=this;function X(J){return new _2({fields:J??void 0,session:void 0,dialect:Y.getDialect(),withList:$})}function G(J){return new _2({fields:J??void 0,session:void 0,dialect:Y.getDialect(),withList:$,distinct:!0})}return{select:X,selectDistinct:G}}select($){return new _2({fields:$??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct($){return new _2({fields:$??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}getDialect(){if(!this.dialect)this.dialect=new tS(this.dialectConfig);return this.dialect}}class pl{constructor($,Y,X,G){this.table=$,this.session=Y,this.dialect=X,this.withList=G}static[z0]="SQLiteInsertBuilder";values($){if($=Array.isArray($)?$:[$],$.length===0)throw Error("values() must be called with at least one value");let Y=$.map((X)=>{let G={},J=this.table[r0.Symbol.Columns];for(let Q of Object.keys(X)){let W=X[Q];G[Q]=q0(W,$1)?W:new c7(W,J[Q])}return G});return new WZ0(this.table,Y,this.session,this.dialect,this.withList)}select($){let Y=typeof $==="function"?$(new eS):$;if(!q0(Y,$1)&&!OG(this.table[aV],Y._.selectedFields))throw Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new WZ0(this.table,Y,this.session,this.dialect,this.withList,!0)}}class WZ0 extends r6{constructor($,Y,X,G,J,Q){super();this.session=X,this.dialect=G,this.config={table:$,values:Y,withList:J,select:Q}}static[z0]="SQLiteInsert";config;returning($=this.config.table[PY.Symbol.Columns]){return this.config.returning=y5($),this}onConflictDoNothing($={}){if(!this.config.onConflict)this.config.onConflict=[];if($.target===void 0)this.config.onConflict.push(r` on conflict do nothing`);else{let Y=Array.isArray($.target)?r`${$.target}`:r`${[$.target]}`,X=$.where?r` where ${$.where}`:r``;this.config.onConflict.push(r` on conflict ${Y} do nothing${X}`)}return this}onConflictDoUpdate($){if($.where&&($.targetWhere||$.setWhere))throw Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');if(!this.config.onConflict)this.config.onConflict=[];let Y=$.where?r` where ${$.where}`:void 0,X=$.targetWhere?r` where ${$.targetWhere}`:void 0,G=$.setWhere?r` where ${$.setWhere}`:void 0,J=Array.isArray($.target)?r`${$.target}`:r`${[$.target]}`,Q=this.dialect.buildUpdateSet(this.config.table,QZ(this.config.table,$.set));return this.config.onConflict.push(r` on conflict ${J}${X} do update set ${Q}${Y}${G}`),this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($=!0){return this.session[$?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0,void 0,{type:"insert",tables:w2(this.config.table)})}prepare(){return this._prepare(!1)}run=($)=>{return this._prepare().run($)};all=($)=>{return this._prepare().all($)};get=($)=>{return this._prepare().get($)};values=($)=>{return this._prepare().values($)};async execute(){return this.config.returning?this.all():this.run()}$dynamic(){return this}}class dl{constructor($,Y,X,G){this.table=$,this.session=Y,this.dialect=X,this.withList=G}static[z0]="SQLiteUpdateBuilder";set($){return new e41(this.table,QZ(this.table,$),this.session,this.dialect,this.withList)}}class e41 extends r6{constructor($,Y,X,G,J){super();this.session=X,this.dialect=G,this.config={set:Y,table:$,withList:J,joins:[]}}static[z0]="SQLiteUpdate";config;from($){return this.config.from=$,this}createJoin($){return(Y,X)=>{let G=GX(Y);if(typeof G==="string"&&this.config.joins.some((J)=>J.alias===G))throw Error(`Alias "${G}" is already used in this query`);if(typeof X==="function"){let J=this.config.from?q0(Y,PY)?Y[r0.Symbol.Columns]:q0(Y,W6)?Y._.selectedFields:q0(Y,aN)?Y[y6].selectedFields:void 0:void 0;X=X(new Proxy(this.config.table[r0.Symbol.Columns],new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),J&&new Proxy(J,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}return this.config.joins.push({on:X,table:Y,joinType:$,alias:G}),this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");where($){return this.config.where=$,this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.table[r0.Symbol.Columns],new I4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];this.config.orderBy=X}else{let Y=$;this.config.orderBy=Y}return this}limit($){return this.config.limit=$,this}returning($=this.config.table[PY.Symbol.Columns]){return this.config.returning=y5($),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($=!0){return this.session[$?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0,void 0,{type:"insert",tables:w2(this.config.table)})}prepare(){return this._prepare(!1)}run=($)=>{return this._prepare().run($)};all=($)=>{return this._prepare().all($)};get=($)=>{return this._prepare().get($)};values=($)=>{return this._prepare().values($)};async execute(){return this.config.returning?this.all():this.run()}$dynamic(){return this}}class $k extends $1{constructor($){super($k.buildEmbeddedCount($.source,$.filters).queryChunks);this.params=$,this.session=$.session,this.sql=$k.buildCount($.source,$.filters)}sql;static[z0]="SQLiteCountBuilderAsync";[Symbol.toStringTag]="SQLiteCountBuilderAsync";session;static buildEmbeddedCount($,Y){return r`(select count(*) from ${$}${r.raw(" where ").if(Y)}${Y})`}static buildCount($,Y){return r`select count(*) from ${$}${r.raw(" where ").if(Y)}${Y}`}then($,Y){return Promise.resolve(this.session.count(this.sql)).then($,Y)}catch($){return this.then(void 0,$)}finally($){return this.then((Y)=>{return $?.(),Y},(Y)=>{throw $?.(),Y})}}class KZ0{constructor($,Y,X,G,J,Q,W,Z){this.mode=$,this.fullSchema=Y,this.schema=X,this.tableNamesMap=G,this.table=J,this.tableConfig=Q,this.dialect=W,this.session=Z}static[z0]="SQLiteAsyncRelationalQueryBuilder";findMany($){return this.mode==="sync"?new ZZ0(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?$:{},"many"):new cl(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?$:{},"many")}findFirst($){return this.mode==="sync"?new ZZ0(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?{...$,limit:1}:{limit:1},"first"):new cl(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?{...$,limit:1}:{limit:1},"first")}}class cl extends r6{constructor($,Y,X,G,J,Q,W,Z,K){super();this.fullSchema=$,this.schema=Y,this.tableNamesMap=X,this.table=G,this.tableConfig=J,this.dialect=Q,this.session=W,this.config=Z,this.mode=K}static[z0]="SQLiteAsyncRelationalQuery";mode;getSQL(){return this.dialect.buildRelationalQuery({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName}).sql}_prepare($=!1){let{query:Y,builtQuery:X}=this._toSQL();return this.session[$?"prepareOneTimeQuery":"prepareQuery"](X,void 0,this.mode==="first"?"get":"all",!0,(G,J)=>{let Q=G.map((W)=>$A(this.schema,this.tableConfig,W,Y.selection,J));if(this.mode==="first")return Q[0];return Q})}prepare(){return this._prepare(!1)}_toSQL(){let $=this.dialect.buildRelationalQuery({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName}),Y=this.dialect.sqlToQuery($.sql);return{query:$,builtQuery:Y}}toSQL(){return this._toSQL().builtQuery}executeRaw(){if(this.mode==="first")return this._prepare(!1).get();return this._prepare(!1).all()}async execute(){return this.executeRaw()}}class ZZ0 extends cl{static[z0]="SQLiteSyncRelationalQuery";sync(){return this.executeRaw()}}class hR extends r6{constructor($,Y,X,G,J){super();this.execute=$,this.getSQL=Y,this.dialect=G,this.mapBatchResult=J,this.config={action:X}}static[z0]="SQLiteRaw";config;getQuery(){return{...this.dialect.sqlToQuery(this.getSQL()),method:this.config.action}}mapResult($,Y){return Y?this.mapBatchResult($):$}_prepare(){return this}isResponseInArrayMode(){return!1}}class Yk{constructor($,Y,X,G){this.resultKind=$,this.dialect=Y,this.session=X,this._=G?{schema:G.schema,fullSchema:G.fullSchema,tableNamesMap:G.tableNamesMap}:{schema:void 0,fullSchema:{},tableNamesMap:{}},this.query={};let J=this.query;if(this._.schema)for(let[Q,W]of Object.entries(this._.schema))J[Q]=new KZ0($,G.fullSchema,this._.schema,this._.tableNamesMap,G.fullSchema[Q],W,Y,X);this.$cache={invalidate:async(Q)=>{}}}static[z0]="BaseSQLiteDatabase";query;$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(new eS(X.dialect));return new Proxy(new rQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new I4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};$count($,Y){return new $k({source:$,filters:Y,session:this.session})}with(...$){let Y=this;function X(Z){return new _2({fields:Z??void 0,session:Y.session,dialect:Y.dialect,withList:$})}function G(Z){return new _2({fields:Z??void 0,session:Y.session,dialect:Y.dialect,withList:$,distinct:!0})}function J(Z){return new dl(Z,Y.session,Y.dialect,$)}function Q(Z){return new pl(Z,Y.session,Y.dialect,$)}function W(Z){return new ml(Z,Y.session,Y.dialect,$)}return{select:X,selectDistinct:G,update:J,insert:Q,delete:W}}select($){return new _2({fields:$??void 0,session:this.session,dialect:this.dialect})}selectDistinct($){return new _2({fields:$??void 0,session:this.session,dialect:this.dialect,distinct:!0})}update($){return new dl($,this.session,this.dialect)}$cache;insert($){return new pl($,this.session,this.dialect)}delete($){return new ml($,this.session,this.dialect)}run($){let Y=typeof $==="string"?r.raw($):$.getSQL();if(this.resultKind==="async")return new hR(async()=>this.session.run(Y),()=>Y,"run",this.dialect,this.session.extractRawRunValueFromBatchResult.bind(this.session));return this.session.run(Y)}all($){let Y=typeof $==="string"?r.raw($):$.getSQL();if(this.resultKind==="async")return new hR(async()=>this.session.all(Y),()=>Y,"all",this.dialect,this.session.extractRawAllValueFromBatchResult.bind(this.session));return this.session.all(Y)}get($){let Y=typeof $==="string"?r.raw($):$.getSQL();if(this.resultKind==="async")return new hR(async()=>this.session.get(Y),()=>Y,"get",this.dialect,this.session.extractRawGetValueFromBatchResult.bind(this.session));return this.session.get(Y)}values($){let Y=typeof $==="string"?r.raw($):$.getSQL();if(this.resultKind==="async")return new hR(async()=>this.session.values(Y),()=>Y,"values",this.dialect,this.session.extractRawValuesValueFromBatchResult.bind(this.session));return this.session.values(Y)}transaction($,Y){return this.session.transaction($,Y)}}class $61{static[z0]="Cache"}class j2 extends $61{strategy(){return"all"}static[z0]="NoopCache";async get($){return}async put($,Y,X,G){}async onMutate($){}}async function xH($,Y){let X=`${$}-${JSON.stringify(Y)}`,J=new TextEncoder().encode(X),Q=await crypto.subtle.digest("SHA-256",J);return[...new Uint8Array(Q)].map((K)=>K.toString(16).padStart(2,"0")).join("")}class Y61 extends r6{constructor($){super();this.resultCb=$}static[z0]="ExecuteResultSync";async execute(){return this.resultCb()}sync(){return this.resultCb()}}class UZ0{constructor($,Y,X,G,J,Q){if(this.mode=$,this.executeMethod=Y,this.query=X,this.cache=G,this.queryMetadata=J,this.cacheConfig=Q,G&&G.strategy()==="all"&&Q===void 0)this.cacheConfig={enable:!0,autoInvalidate:!0};if(!this.cacheConfig?.enable)this.cacheConfig=void 0}static[z0]="PreparedQuery";joinsNotNullableMap;async queryWithCache($,Y,X){if(this.cache===void 0||q0(this.cache,j2)||this.queryMetadata===void 0)try{return await X()}catch(G){throw new R7($,Y,G)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await X()}catch(G){throw new R7($,Y,G)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{let[G]=await Promise.all([X(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return G}catch(G){throw new R7($,Y,G)}if(!this.cacheConfig)try{return await X()}catch(G){throw new R7($,Y,G)}if(this.queryMetadata.type==="select"){let G=await this.cache.get(this.cacheConfig.tag??await xH($,Y),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(G===void 0){let J;try{J=await X()}catch(Q){throw new R7($,Y,Q)}return await this.cache.put(this.cacheConfig.tag??await xH($,Y),J,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),J}return G}try{return await X()}catch(G){throw new R7($,Y,G)}}getQuery(){return this.query}mapRunResult($,Y){return $}mapAllResult($,Y){throw Error("Not implemented")}mapGetResult($,Y){throw Error("Not implemented")}execute($){if(this.mode==="async")return this[this.executeMethod]($);return new Y61(()=>this[this.executeMethod]($))}mapResult($,Y){switch(this.executeMethod){case"run":return this.mapRunResult($,Y);case"all":return this.mapAllResult($,Y);case"get":return this.mapGetResult($,Y)}}}class HZ0{constructor($){this.dialect=$}static[z0]="SQLiteSession";prepareOneTimeQuery($,Y,X,G,J,Q,W){return this.prepareQuery($,Y,X,G,J,Q,W)}run($){let Y=this.dialect.sqlToQuery($);try{return this.prepareOneTimeQuery(Y,void 0,"run",!1).run()}catch(X){throw new sQ({cause:X,message:`Failed to run the query '${Y.sql}'`})}}extractRawRunValueFromBatchResult($){return $}all($){return this.prepareOneTimeQuery(this.dialect.sqlToQuery($),void 0,"run",!1).all()}extractRawAllValueFromBatchResult($){throw Error("Not implemented")}get($){return this.prepareOneTimeQuery(this.dialect.sqlToQuery($),void 0,"run",!1).get()}extractRawGetValueFromBatchResult($){throw Error("Not implemented")}values($){return this.prepareOneTimeQuery(this.dialect.sqlToQuery($),void 0,"run",!1).values()}async count($){return(await this.values($))[0][0]}extractRawValuesValueFromBatchResult($){throw Error("Not implemented")}}class zZ0 extends Yk{constructor($,Y,X,G,J=0){super($,Y,X,G);this.schema=G,this.nestedIndex=J}static[z0]="SQLiteTransaction";rollback(){throw new mN}}class VZ0 extends HZ0{constructor($,Y,X,G={}){super(Y);this.client=$,this.schema=X,this.logger=G.logger??new pN}static[z0]="SQLiteBunSession";logger;exec($){this.client.exec($)}prepareQuery($,Y,X,G,J){let Q=this.client.prepare($.sql);return new X61(Q,$,this.logger,Y,X,G,J)}transaction($,Y={}){let X=new AZ0("sync",this.dialect,this,this.schema),G;return this.client.transaction(()=>{G=$(X)})[Y.behavior??"deferred"](),G}}class AZ0 extends zZ0{static[z0]="SQLiteBunTransaction";transaction($){let Y=`sp${this.nestedIndex}`,X=new AZ0("sync",this.dialect,this.session,this.schema,this.nestedIndex+1);this.session.run(r.raw(`savepoint ${Y}`));try{let G=$(X);return this.session.run(r.raw(`release savepoint ${Y}`)),G}catch(G){throw this.session.run(r.raw(`rollback to savepoint ${Y}`)),G}}}class X61 extends UZ0{constructor($,Y,X,G,J,Q,W){super("sync",J,Y);this.stmt=$,this.logger=X,this.fields=G,this._isResponseInArrayMode=Q,this.customResultMapper=W}static[z0]="SQLiteBunPreparedQuery";run($){let Y=I2(this.query.params,$??{});return this.logger.logQuery(this.query.sql,Y),this.stmt.run(...Y)}all($){let{fields:Y,query:X,logger:G,joinsNotNullableMap:J,stmt:Q,customResultMapper:W}=this;if(!Y&&!W){let K=I2(X.params,$??{});return G.logQuery(X.sql,K),Q.all(...K)}let Z=this.values($);if(W)return W(Z);return Z.map((K)=>tV(Y,K,J))}get($){let Y=I2(this.query.params,$??{});this.logger.logQuery(this.query.sql,Y);let X=this.stmt.values(...Y)[0];if(!X)return;let{fields:G,joinsNotNullableMap:J,customResultMapper:Q}=this;if(!G&&!Q)return X;if(Q)return Q([X]);return tV(G,X,J)}values($){let Y=I2(this.query.params,$??{});return this.logger.logQuery(this.query.sql,Y),this.stmt.values(...Y)}isResponseInArrayMode(){return this._isResponseInArrayMode}}class G61 extends Yk{static[z0]="BunSQLiteDatabase"}function fR($,Y={}){let X=new tS({casing:Y.casing}),G;if(Y.logger===!0)G=new uN;else if(Y.logger!==!1)G=Y.logger;let J;if(Y.schema){let Z=yR(Y.schema,bR);J={fullSchema:Y.schema,schema:Z.tables,tableNamesMap:Z.tableNamesMap}}let Q=new VZ0($,X,J,{logger:G}),W=new G61("sync",X,Q,J);return W.$client=$,W}function h3(...$){if($[0]===void 0||typeof $[0]==="string"){let Y=$[0]===void 0?new ll:new ll($[0]);return fR(Y,$[1])}if(xR($[0])){let{connection:Y,client:X,...G}=$[0];if(X)return fR(X,G);if(typeof Y==="object"){let{source:Q,...W}=Y,Z=Object.values(W).filter((H)=>H!==void 0).length?W:void 0,K=new ll(Q,Z);return fR(K,G)}let J=new ll(Y);return fR(J,G)}return fR($[0],$[1])}(($)=>{function Y(X){return fR({},X)}$.mock=Y})(h3||(h3={}));var yH=new Tm4("config.db"),o0=h3({client:yH});function Cm4(){yH.run(`CREATE TABLE IF NOT EXISTS sys_oracle_source (
    id text,
    name text,
    code text,
    host text,
    user text,
    password text,
    serviceName text,
    port integer,
    max integer,
    createdAt integer,
    updatedAt integer,
    latest_visitAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function Sm4(){yH.run(`CREATE TABLE IF NOT EXISTS sys_apimanager_proxy (
    id text,
    name text,
    code text,
    path1 text,
    remark text,
    createdAt integer,
    updatedAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function km4(){yH.run(`CREATE TABLE IF NOT EXISTS sys_apimanager_proxy_detail (
    id text,
    name text,
    path1 text,
    path2 text,
    target text,
    activate integer,
    remark text,
    createdAt integer,
    updatedAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function vm4(){yH.run(`CREATE TABLE IF NOT EXISTS sys_apimanager_proxy_statistics (
    id text,
    month text,
    path1 text,
    path2 text,
    access integer,
    createdAt integer,
    updatedAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function xm4(){yH.run(`CREATE TABLE IF NOT EXISTS sys_sqlite_source (
    id text,
    name text,
    code text,
    filename text,
    createdAt integer,
    updatedAt integer,
    latest_visitAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function ym4(){yH.run(`CREATE TABLE IF NOT EXISTS sys_sqlite_schema_cache (
    id text,
    source text,
    filename text,
    table_name text,
    schema_data text,
    createdAt integer,
    updatedAt integer,
    latest_visitAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function bm4(){yH.run(`CREATE TABLE IF NOT EXISTS sys_page_app (
    id text,
    name text,
    code text,
    createdAt integer,
    updatedAt integer,
    latest_visitAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function FZ0($){try{yH.run($)}catch(Y){}}function J61(){try{Cm4(),Sm4(),km4(),vm4(),xm4(),ym4(),bm4(),FZ0("ALTER TABLE sys_llmconfig ADD COLUMN llamacpp integer;"),FZ0("ALTER TABLE sys_apimanager_proxy_detail ADD COLUMN parames text;"),FZ0("ALTER TABLE sys_apimanager_proxy_detail ADD COLUMN resp text;")}catch($){}}async function il($){return o0.all(r.raw(`SELECT
  CASE
	  WHEN ( SELECT COUNT( 1 ) FROM sys_database_source WHERE code = '${$}' ) > 0 THEN 'mysql' 
		WHEN ( SELECT COUNT( 1 ) FROM sys_pg_source WHERE code = '${$}' ) > 0 THEN 'postgres' 
		WHEN ( SELECT COUNT( 1 ) FROM sys_oracle_source WHERE code = '${$}' ) > 0 THEN 'oracle' 
		WHEN ( SELECT COUNT( 1 ) FROM sys_sqlite_source WHERE code = '${$}' ) > 0 THEN 'sqlite' 
		ELSE 'empty' 
  END AS type`))[0]?.type}var Q61=`
 
`;var nl=BigInt(4294967295),W61=BigInt(32);function hm4($,Y=!1){if(Y)return{h:Number($&nl),l:Number($>>W61&nl)};return{h:Number($>>W61&nl)|0,l:Number($&nl)|0}}function Z61($,Y=!1){let X=$.length,G=new Uint32Array(X),J=new Uint32Array(X);for(let Q=0;Q<X;Q++){let{h:W,l:Z}=hm4($[Q],Y);[G[Q],J[Q]]=[W,Z]}return[G,J]}var K61=($,Y,X)=>$<<X|Y>>>32-X,U61=($,Y,X)=>Y<<X|$>>>32-X,H61=($,Y,X)=>Y<<X-32|$>>>64-X,z61=($,Y,X)=>$<<X-32|Y>>>64-X;function fm4($){return $ instanceof Uint8Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in $&&$.BYTES_PER_ELEMENT===1}function rl($,Y=""){if(typeof $!=="number"){let X=Y&&`"${Y}" `;throw TypeError(`${X}expected number, got ${typeof $}`)}if(!Number.isSafeInteger($)||$<0){let X=Y&&`"${Y}" `;throw RangeError(`${X}expected integer >= 0, got ${$}`)}}function al($,Y,X=""){let G=fm4($),J=$?.length,Q=Y!==void 0;if(!G||Q&&J!==Y){let W=X&&`"${X}" `,Z=Q?` of length ${Y}`:"",K=G?`length=${J}`:`type=${typeof $}`,H=W+"expected Uint8Array"+Z+", got "+K;if(!G)throw TypeError(H);throw RangeError(H)}return $}function DZ0($,Y=!0){if($.destroyed)throw Error("Hash instance has been destroyed");if(Y&&$.finished)throw Error("Hash#digest() has already been called")}function V61($,Y){al($,void 0,"digestInto() output");let X=Y.outputLen;if($.length<X)throw RangeError('"digestInto() output" expected to be of length >='+X)}function A61($){return new Uint32Array($.buffer,$.byteOffset,Math.floor($.byteLength/4))}function NZ0(...$){for(let Y=0;Y<$.length;Y++)$[Y].fill(0)}var gm4=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function mm4($){return $<<24&4278190080|$<<8&16711680|$>>>8&65280|$>>>24&255}function um4($){for(let Y=0;Y<$.length;Y++)$[Y]=mm4($[Y]);return $}var LZ0=gm4?($)=>$:um4;function F61($,Y={}){let X=(J,Q)=>$(Q).update(J).digest(),G=$(void 0);return X.outputLen=G.outputLen,X.blockLen=G.blockLen,X.canXOF=G.canXOF,X.create=(J)=>$(J),Object.assign(X,Y),Object.freeze(X)}var D61=($)=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,$])});var pm4=BigInt(0),Xk=BigInt(1),dm4=BigInt(2),cm4=BigInt(7),lm4=BigInt(256),im4=BigInt(113),B61=[],O61=[],E61=[];for(let $=0,Y=Xk,X=1,G=0;$<24;$++){[X,G]=[G,(2*X+3*G)%5],B61.push(2*(5*G+X)),O61.push(($+1)*($+2)/2%64);let J=pm4;for(let Q=0;Q<7;Q++)if(Y=(Y<<Xk^(Y>>cm4)*im4)%lm4,Y&dm4)J^=Xk<<(Xk<<BigInt(Q))-Xk;E61.push(J)}var M61=Z61(E61,!0),nm4=M61[0],rm4=M61[1],N61=($,Y,X)=>X>32?H61($,Y,X):K61($,Y,X),L61=($,Y,X)=>X>32?z61($,Y,X):U61($,Y,X);function am4($,Y=24){if(rl(Y,"rounds"),Y<1||Y>24)throw Error('"rounds" expected integer 1..24');let X=new Uint32Array(10);for(let G=24-Y;G<24;G++){for(let W=0;W<10;W++)X[W]=$[W]^$[W+10]^$[W+20]^$[W+30]^$[W+40];for(let W=0;W<10;W+=2){let Z=(W+8)%10,K=(W+2)%10,H=X[K],z=X[K+1],V=N61(H,z,1)^X[Z],A=L61(H,z,1)^X[Z+1];for(let F=0;F<50;F+=10)$[W+F]^=V,$[W+F+1]^=A}let J=$[2],Q=$[3];for(let W=0;W<24;W++){let Z=O61[W],K=N61(J,Q,Z),H=L61(J,Q,Z),z=B61[W];J=$[z],Q=$[z+1],$[z]=K,$[z+1]=H}for(let W=0;W<50;W+=10){let Z=$[W],K=$[W+1],H=$[W+2],z=$[W+3];$[W]^=~$[W+2]&$[W+4],$[W+1]^=~$[W+3]&$[W+5],$[W+2]^=~$[W+4]&$[W+6],$[W+3]^=~$[W+5]&$[W+7],$[W+4]^=~$[W+6]&$[W+8],$[W+5]^=~$[W+7]&$[W+9],$[W+6]^=~$[W+8]&Z,$[W+7]^=~$[W+9]&K,$[W+8]^=~Z&H,$[W+9]^=~K&z}$[0]^=nm4[G],$[1]^=rm4[G]}NZ0(X)}class BZ0{state;pos=0;posOut=0;finished=!1;state32;destroyed=!1;blockLen;suffix;outputLen;canXOF;enableXOF=!1;rounds;constructor($,Y,X,G=!1,J=24){if(this.blockLen=$,this.suffix=Y,this.outputLen=X,this.enableXOF=G,this.canXOF=G,this.rounds=J,rl(X,"outputLen"),!(0<$&&$<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=A61(this.state)}clone(){return this._cloneInto()}keccak(){LZ0(this.state32),am4(this.state32,this.rounds),LZ0(this.state32),this.posOut=0,this.pos=0}update($){DZ0(this),al($);let{blockLen:Y,state:X}=this,G=$.length;for(let J=0;J<G;){let Q=Math.min(Y-this.pos,G-J);for(let W=0;W<Q;W++)X[this.pos++]^=$[J++];if(this.pos===Y)this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:$,suffix:Y,pos:X,blockLen:G}=this;if($[X]^=Y,(Y&128)!==0&&X===G-1)this.keccak();$[G-1]^=128,this.keccak()}writeInto($){DZ0(this,!1),al($),this.finish();let Y=this.state,{blockLen:X}=this;for(let G=0,J=$.length;G<J;){if(this.posOut>=X)this.keccak();let Q=Math.min(X-this.posOut,J-G);$.set(Y.subarray(this.posOut,this.posOut+Q),G),this.posOut+=Q,G+=Q}return $}xofInto($){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto($)}xof($){return rl($),this.xofInto(new Uint8Array($))}digestInto($){if(V61($,this),this.finished)throw Error("digest() was already called");this.writeInto($.subarray(0,this.outputLen)),this.destroy()}digest(){let $=new Uint8Array(this.outputLen);return this.digestInto($),$}destroy(){this.destroyed=!0,NZ0(this.state)}_cloneInto($){let{blockLen:Y,suffix:X,outputLen:G,rounds:J,enableXOF:Q}=this;return $||=new BZ0(Y,X,G,Q,J),$.blockLen=Y,$.state32.set(this.state32),$.pos=this.pos,$.posOut=this.posOut,$.finished=this.finished,$.rounds=J,$.suffix=X,$.outputLen=G,$.enableXOF=Q,$.canXOF=this.canXOF,$.destroyed=this.destroyed,$}}var sm4=($,Y,X,G={})=>F61(()=>new BZ0(Y,$,X),G);var R61=sm4(6,72,64,D61(10));var om4=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,OZ0=Math.ceil,ZZ=Math.floor,bJ="[BigNumber Error] ",q61=bJ+"Number primitive has more than 15 significant digits: ",T2=100000000000000,w6=14,EZ0=9007199254740991,MZ0=[1,10,100,1000,1e4,1e5,1e6,1e7,1e8,1e9,10000000000,100000000000,1000000000000,10000000000000],YA=1e7,wY=1e9;function I61($){var Y,X,G,J=O.prototype={constructor:O,toString:null,valueOf:null},Q=new O(1),W=20,Z=4,K=-7,H=21,z=-1e7,V=1e7,A=!1,F=1,N=0,D={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},L="0123456789abcdefghijklmnopqrstuvwxyz",B=!0;function O(I,P){var _,C,k,S,T,v,x,y,d=this;if(!(d instanceof O))return new O(I,P);if(P==null){if(I&&I._isBigNumber===!0){if(d.s=I.s,!I.c||I.e>V)d.c=d.e=null;else if(I.e<z)d.c=[d.e=0];else d.e=I.e,d.c=I.c.slice();return}if((v=typeof I=="number")&&I*0==0){if(d.s=1/I<0?(I=-I,-1):1,I===~~I){for(S=0,T=I;T>=10;T/=10,S++);if(S>V)d.c=d.e=null;else d.e=S,d.c=[I];return}y=String(I)}else{if(!om4.test(y=String(I)))return G(d,y,v);d.s=y.charCodeAt(0)==45?(y=y.slice(1),-1):1}if((S=y.indexOf("."))>-1)y=y.replace(".","");if((T=y.search(/e/i))>0){if(S<0)S=T;S+=+y.slice(T+1),y=y.substring(0,T)}else if(S<0)S=y.length}else{if(q7(P,2,L.length,"Base"),P==10&&B)return d=new O(I),q(d,W+d.e+1,Z);if(y=String(I),v=typeof I=="number"){if(I*0!=0)return G(d,y,v,P);if(d.s=1/I<0?(y=y.slice(1),-1):1,O.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(q61+I)}else d.s=y.charCodeAt(0)===45?(y=y.slice(1),-1):1;_=L.slice(0,P),S=T=0;for(x=y.length;T<x;T++)if(_.indexOf(C=y.charAt(T))<0){if(C=="."){if(T>S){S=x;continue}}else if(!k){if(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase())){k=!0,T=-1,S=0;continue}}return G(d,String(I),v,P)}if(v=!1,y=X(y,P,10,d.s),(S=y.indexOf("."))>-1)y=y.replace(".","");else S=y.length}for(T=0;y.charCodeAt(T)===48;T++);for(x=y.length;y.charCodeAt(--x)===48;);if(y=y.slice(T,++x)){if(x-=T,v&&O.DEBUG&&x>15&&(I>EZ0||I!==ZZ(I)))throw Error(q61+d.s*I);if((S=S-T-1)>V)d.c=d.e=null;else if(S<z)d.c=[d.e=0];else{if(d.e=S,d.c=[],T=(S+1)%w6,S<0)T+=w6;if(T<x){if(T)d.c.push(+y.slice(0,T));for(x-=w6;T<x;)d.c.push(+y.slice(T,T+=w6));T=w6-(y=y.slice(T)).length}else T-=x;for(;T--;y+="0");d.c.push(+y)}}else d.c=[d.e=0]}O.clone=I61,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(I){var P,_;if(I!=null)if(typeof I=="object"){if(I.hasOwnProperty(P="DECIMAL_PLACES"))_=I[P],q7(_,0,wY,P),W=_;if(I.hasOwnProperty(P="ROUNDING_MODE"))_=I[P],q7(_,0,8,P),Z=_;if(I.hasOwnProperty(P="EXPONENTIAL_AT"))if(_=I[P],_&&_.pop)q7(_[0],-wY,0,P),q7(_[1],0,wY,P),K=_[0],H=_[1];else q7(_,-wY,wY,P),K=-(H=_<0?-_:_);if(I.hasOwnProperty(P="RANGE"))if(_=I[P],_&&_.pop)q7(_[0],-wY,-1,P),q7(_[1],1,wY,P),z=_[0],V=_[1];else if(q7(_,-wY,wY,P),_)z=-(V=_<0?-_:_);else throw Error(bJ+P+" cannot be zero: "+_);if(I.hasOwnProperty(P="CRYPTO"))if(_=I[P],_===!!_)if(_)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))A=_;else throw A=!_,Error(bJ+"crypto unavailable");else A=_;else throw Error(bJ+P+" not true or false: "+_);if(I.hasOwnProperty(P="MODULO_MODE"))_=I[P],q7(_,0,9,P),F=_;if(I.hasOwnProperty(P="POW_PRECISION"))_=I[P],q7(_,0,wY,P),N=_;if(I.hasOwnProperty(P="FORMAT"))if(_=I[P],typeof _=="object")D=_;else throw Error(bJ+P+" not an object: "+_);if(I.hasOwnProperty(P="ALPHABET"))if(_=I[P],typeof _=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(_))B=_.slice(0,10)=="0123456789",L=_;else throw Error(bJ+P+" invalid: "+_)}else throw Error(bJ+"Object expected: "+I);return{DECIMAL_PLACES:W,ROUNDING_MODE:Z,EXPONENTIAL_AT:[K,H],RANGE:[z,V],CRYPTO:A,MODULO_MODE:F,POW_PRECISION:N,FORMAT:D,ALPHABET:L}},O.isBigNumber=function(I){if(!I||I._isBigNumber!==!0)return!1;if(!O.DEBUG)return!0;var P,_,C=I.c,k=I.e,S=I.s;$:if({}.toString.call(C)=="[object Array]"){if((S===1||S===-1)&&k>=-wY&&k<=wY&&k===ZZ(k)){if(C[0]===0){if(k===0&&C.length===1)return!0;break $}if(P=(k+1)%w6,P<1)P+=w6;if(String(C[0]).length==P){for(P=0;P<C.length;P++)if(_=C[P],_<0||_>=T2||_!==ZZ(_))break $;if(_!==0)return!0}}}else if(C===null&&k===null&&(S===null||S===1||S===-1))return!0;throw Error(bJ+"Invalid BigNumber: "+I)},O.maximum=O.max=function(){return M(arguments,-1)},O.minimum=O.min=function(){return M(arguments,1)},O.random=function(){var I=9007199254740992,P=Math.random()*I&2097151?function(){return ZZ(Math.random()*I)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(_){var C,k,S,T,v,x=0,y=[],d=new O(Q);if(_==null)_=W;else q7(_,0,wY);if(T=OZ0(_/w6),A)if(crypto.getRandomValues){C=crypto.getRandomValues(new Uint32Array(T*=2));for(;x<T;)if(v=C[x]*131072+(C[x+1]>>>11),v>=9000000000000000)k=crypto.getRandomValues(new Uint32Array(2)),C[x]=k[0],C[x+1]=k[1];else y.push(v%100000000000000),x+=2;x=T/2}else if(crypto.randomBytes){C=crypto.randomBytes(T*=7);for(;x<T;)if(v=(C[x]&31)*281474976710656+C[x+1]*1099511627776+C[x+2]*4294967296+C[x+3]*16777216+(C[x+4]<<16)+(C[x+5]<<8)+C[x+6],v>=9000000000000000)crypto.randomBytes(7).copy(C,x);else y.push(v%100000000000000),x+=7;x=T/7}else throw A=!1,Error(bJ+"crypto unavailable");if(!A){for(;x<T;)if(v=P(),v<9000000000000000)y[x++]=v%100000000000000}if(T=y[--x],_%=w6,T&&_)v=MZ0[w6-_],y[x]=ZZ(T/v)*v;for(;y[x]===0;y.pop(),x--);if(x<0)y=[S=0];else{for(S=-1;y[0]===0;y.splice(0,1),S-=w6);for(x=1,v=y[0];v>=10;v/=10,x++);if(x<w6)S-=w6-x}return d.e=S,d.c=y,d}}(),O.sum=function(){var I=1,P=arguments,_=new O(P[0]);for(;I<P.length;)_=_.plus(P[I++]);return _},X=function(){var I="0123456789";function P(_,C,k,S){var T,v=[0],x,y=0,d=_.length;for(;y<d;){for(x=v.length;x--;v[x]*=C);v[0]+=S.indexOf(_.charAt(y++));for(T=0;T<v.length;T++)if(v[T]>k-1){if(v[T+1]==null)v[T+1]=0;v[T+1]+=v[T]/k|0,v[T]%=k}}return v.reverse()}return function(_,C,k,S,T){var v,x,y,d,u,b,g,p,h=_.indexOf("."),n=W,t=Z;if(h>=0)d=N,N=0,_=_.replace(".",""),p=new O(C),b=p.pow(_.length-h),N=d,p.c=P(bH(WZ(b.c),b.e,"0"),10,k,I),p.e=p.c.length;g=P(_,C,k,T?(v=L,I):(v=I,L)),y=d=g.length;for(;g[--d]==0;g.pop());if(!g[0])return v.charAt(0);if(h<0)--y;else b.c=g,b.e=y,b.s=S,b=Y(b,p,n,t,k),g=b.c,u=b.r,y=b.e;if(x=y+n+1,h=g[x],d=k/2,u=u||x<0||g[x+1]!=null,u=t<4?(h!=null||u)&&(t==0||t==(b.s<0?3:2)):h>d||h==d&&(t==4||u||t==6&&g[x-1]&1||t==(b.s<0?8:7)),x<1||!g[0])_=u?bH(v.charAt(1),-n,v.charAt(0)):v.charAt(0);else{if(g.length=x,u){for(--k;++g[--x]>k;)if(g[x]=0,!x)++y,g=[1].concat(g)}for(d=g.length;!g[--d];);for(h=0,_="";h<=d;_+=v.charAt(g[h++]));_=bH(_,y,v.charAt(0))}return _}}(),Y=function(){function I(C,k,S){var T,v,x,y,d=0,u=C.length,b=k%YA,g=k/YA|0;for(C=C.slice();u--;)x=C[u]%YA,y=C[u]/YA|0,T=g*x+y*b,v=b*x+T%YA*YA+d,d=(v/S|0)+(T/YA|0)+g*y,C[u]=v%S;if(d)C=[d].concat(C);return C}function P(C,k,S,T){var v,x;if(S!=T)x=S>T?1:-1;else for(v=x=0;v<S;v++)if(C[v]!=k[v]){x=C[v]>k[v]?1:-1;break}return x}function _(C,k,S,T){var v=0;for(;S--;)C[S]-=v,v=C[S]<k[S]?1:0,C[S]=v*T+C[S]-k[S];for(;!C[0]&&C.length>1;C.splice(0,1));}return function(C,k,S,T,v){var x,y,d,u,b,g,p,h,n,t,s,Z0,X0,a,Q0,e,m,$0=C.s==k.s?1:-1,Y0=C.c,K0=k.c;if(!Y0||!Y0[0]||!K0||!K0[0])return new O(!C.s||!k.s||(Y0?K0&&Y0[0]==K0[0]:!K0)?NaN:Y0&&Y0[0]==0||!K0?$0*0:$0/0);if(h=new O($0),n=h.c=[],y=C.e-k.e,$0=S+y+1,!v)v=T2,y=KZ(C.e/w6)-KZ(k.e/w6),$0=$0/w6|0;for(d=0;K0[d]==(Y0[d]||0);d++);if(K0[d]>(Y0[d]||0))y--;if($0<0)n.push(1),u=!0;else{if(a=Y0.length,e=K0.length,d=0,$0+=2,b=ZZ(v/(K0[0]+1)),b>1)K0=I(K0,b,v),Y0=I(Y0,b,v),e=K0.length,a=Y0.length;X0=e,t=Y0.slice(0,e),s=t.length;for(;s<e;t[s++]=0);if(m=K0.slice(),m=[0].concat(m),Q0=K0[0],K0[1]>=v/2)Q0++;do{if(b=0,x=P(K0,t,e,s),x<0){if(Z0=t[0],e!=s)Z0=Z0*v+(t[1]||0);if(b=ZZ(Z0/Q0),b>1){if(b>=v)b=v-1;g=I(K0,b,v),p=g.length,s=t.length;while(P(g,t,p,s)==1)b--,_(g,e<p?m:K0,p,v),p=g.length,x=1}else{if(b==0)x=b=1;g=K0.slice(),p=g.length}if(p<s)g=[0].concat(g);if(_(t,g,s,v),s=t.length,x==-1)while(P(K0,t,e,s)<1)b++,_(t,e<s?m:K0,s,v),s=t.length}else if(x===0)b++,t=[0];if(n[d++]=b,t[0])t[s++]=Y0[X0]||0;else t=[Y0[X0]],s=1}while((X0++<a||t[0]!=null)&&$0--);if(u=t[0]!=null,!n[0])n.splice(0,1)}if(v==T2){for(d=1,$0=n[0];$0>=10;$0/=10,d++);q(h,S+(h.e=d+y*w6-1)+1,T,u)}else h.e=y,h.r=+u;return h}}();function E(I,P,_,C){var k,S,T,v,x;if(_==null)_=Z;else q7(_,0,8);if(!I.c)return I.toString();if(k=I.c[0],T=I.e,P==null)x=WZ(I.c),x=C==1||C==2&&(T<=K||T>=H)?ol(x,T):bH(x,T,"0");else if(I=q(new O(I),P,_),S=I.e,x=WZ(I.c),v=x.length,C==1||C==2&&(P<=S||S<=K)){for(;v<P;x+="0",v++);x=ol(x,S)}else if(P-=T+(C===2&&S>T),x=bH(x,S,"0"),S+1>v){if(--P>0)for(x+=".";P--;x+="0");}else if(P+=S-v,P>0){if(S+1==v)x+=".";for(;P--;x+="0");}return I.s<0&&k?"-"+x:x}function M(I,P){var _,C,k=1,S=new O(I[0]);for(;k<I.length;k++)if(C=new O(I[k]),!C.s||(_=oN(S,C))===P||_===0&&S.s===P)S=C;return S}function R(I,P,_){var C=1,k=P.length;for(;!P[--k];P.pop());for(k=P[0];k>=10;k/=10,C++);if((_=C+_*w6-1)>V)I.c=I.e=null;else if(_<z)I.c=[I.e=0];else I.e=_,I.c=P;return I}G=function(){var I=/^(-?)0([xbo])(?=\w[\w.]*$)/i,P=/^([^.]+)\.$/,_=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,k=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(S,T,v,x){var y,d=v?T:T.replace(k,"");if(C.test(d))S.s=isNaN(d)?null:d<0?-1:1;else{if(!v){if(d=d.replace(I,function(u,b,g){return y=(g=g.toLowerCase())=="x"?16:g=="b"?2:8,!x||x==y?b:u}),x)y=x,d=d.replace(P,"$1").replace(_,"0.$1");if(T!=d)return new O(d,y)}if(O.DEBUG)throw Error(bJ+"Not a"+(x?" base "+x:"")+" number: "+T);S.s=null}S.c=S.e=null}}();function q(I,P,_,C){var k,S,T,v,x,y,d,u=I.c,b=MZ0;if(u){$:{for(k=1,v=u[0];v>=10;v/=10,k++);if(S=P-k,S<0)S+=w6,T=P,x=u[y=0],d=ZZ(x/b[k-T-1]%10);else if(y=OZ0((S+1)/w6),y>=u.length)if(C){for(;u.length<=y;u.push(0));x=d=0,k=1,S%=w6,T=S-w6+1}else break $;else{x=v=u[y];for(k=1;v>=10;v/=10,k++);S%=w6,T=S-w6+k,d=T<0?0:ZZ(x/b[k-T-1]%10)}if(C=C||P<0||u[y+1]!=null||(T<0?x:x%b[k-T-1]),C=_<4?(d||C)&&(_==0||_==(I.s<0?3:2)):d>5||d==5&&(_==4||C||_==6&&(S>0?T>0?x/b[k-T]:0:u[y-1])%10&1||_==(I.s<0?8:7)),P<1||!u[0]){if(u.length=0,C)P-=I.e+1,u[0]=b[(w6-P%w6)%w6],I.e=-P||0;else u[0]=I.e=0;return I}if(S==0)u.length=y,v=1,y--;else u.length=y+1,v=b[w6-S],u[y]=T>0?ZZ(x/b[k-T]%b[T])*v:0;if(C)for(;;)if(y==0){for(S=1,T=u[0];T>=10;T/=10,S++);T=u[0]+=v;for(v=1;T>=10;T/=10,v++);if(S!=v){if(I.e++,u[0]==T2)u[0]=1}break}else{if(u[y]+=v,u[y]!=T2)break;u[y--]=0,v=1}for(S=u.length;u[--S]===0;u.pop());}if(I.e>V)I.c=I.e=null;else if(I.e<z)I.c=[I.e=0]}return I}function w(I){var P,_=I.e;if(_===null)return I.toString();return P=WZ(I.c),P=_<=K||_>=H?ol(P,_):bH(P,_,"0"),I.s<0?"-"+P:P}if(J.absoluteValue=J.abs=function(){var I=new O(this);if(I.s<0)I.s=1;return I},J.comparedTo=function(I,P){return oN(this,new O(I,P))},J.decimalPlaces=J.dp=function(I,P){var _,C,k,S=this;if(I!=null){if(q7(I,0,wY),P==null)P=Z;else q7(P,0,8);return q(new O(S),I+S.e+1,P)}if(!(_=S.c))return null;if(C=((k=_.length-1)-KZ(this.e/w6))*w6,k=_[k])for(;k%10==0;k/=10,C--);if(C<0)C=0;return C},J.dividedBy=J.div=function(I,P){return Y(this,new O(I,P),W,Z)},J.dividedToIntegerBy=J.idiv=function(I,P){return Y(this,new O(I,P),0,1)},J.exponentiatedBy=J.pow=function(I,P){var _,C,k,S,T,v,x,y,d,u=this;if(I=new O(I),I.c&&!I.isInteger())throw Error(bJ+"Exponent not an integer: "+w(I));if(P!=null)P=new O(P);if(v=I.e>14,!u.c||!u.c[0]||u.c[0]==1&&!u.e&&u.c.length==1||!I.c||!I.c[0])return d=new O(Math.pow(+w(u),v?I.s*(2-sl(I)):+w(I))),P?d.mod(P):d;if(x=I.s<0,P){if(P.c?!P.c[0]:!P.s)return new O(NaN);if(C=!x&&u.isInteger()&&P.isInteger(),C)u=u.mod(P)}else if(I.e>9&&(u.e>0||u.e<-1||(u.e==0?u.c[0]>1||v&&u.c[1]>=240000000:u.c[0]<80000000000000||v&&u.c[0]<=99999750000000))){if(S=u.s<0&&sl(I)?-0:0,u.e>-1)S=1/S;return new O(x?1/S:S)}else if(N)S=OZ0(N/w6+2);if(v){if(_=new O(0.5),x)I.s=1;y=sl(I)}else k=Math.abs(+w(I)),y=k%2;d=new O(Q);for(;;){if(y){if(d=d.times(u),!d.c)break;if(S){if(d.c.length>S)d.c.length=S}else if(C)d=d.mod(P)}if(k){if(k=ZZ(k/2),k===0)break;y=k%2}else if(I=I.times(_),q(I,I.e+1,1),I.e>14)y=sl(I);else{if(k=+w(I),k===0)break;y=k%2}if(u=u.times(u),S){if(u.c&&u.c.length>S)u.c.length=S}else if(C)u=u.mod(P)}if(C)return d;if(x)d=Q.div(d);return P?d.mod(P):S?q(d,N,Z,T):d},J.integerValue=function(I){var P=new O(this);if(I==null)I=Z;else q7(I,0,8);return q(P,P.e+1,I)},J.isEqualTo=J.eq=function(I,P){return oN(this,new O(I,P))===0},J.isFinite=function(){return!!this.c},J.isGreaterThan=J.gt=function(I,P){return oN(this,new O(I,P))>0},J.isGreaterThanOrEqualTo=J.gte=function(I,P){return(P=oN(this,new O(I,P)))===1||P===0},J.isInteger=function(){return!!this.c&&KZ(this.e/w6)>this.c.length-2},J.isLessThan=J.lt=function(I,P){return oN(this,new O(I,P))<0},J.isLessThanOrEqualTo=J.lte=function(I,P){return(P=oN(this,new O(I,P)))===-1||P===0},J.isNaN=function(){return!this.s},J.isNegative=function(){return this.s<0},J.isPositive=function(){return this.s>0},J.isZero=function(){return!!this.c&&this.c[0]==0},J.minus=function(I,P){var _,C,k,S,T=this,v=T.s;if(I=new O(I,P),P=I.s,!v||!P)return new O(NaN);if(v!=P)return I.s=-P,T.plus(I);var x=T.e/w6,y=I.e/w6,d=T.c,u=I.c;if(!x||!y){if(!d||!u)return d?(I.s=-P,I):new O(u?T:NaN);if(!d[0]||!u[0])return u[0]?(I.s=-P,I):new O(d[0]?T:Z==3?-0:0)}if(x=KZ(x),y=KZ(y),d=d.slice(),v=x-y){if(S=v<0)v=-v,k=d;else y=x,k=u;k.reverse();for(P=v;P--;k.push(0));k.reverse()}else{C=(S=(v=d.length)<(P=u.length))?v:P;for(v=P=0;P<C;P++)if(d[P]!=u[P]){S=d[P]<u[P];break}}if(S)k=d,d=u,u=k,I.s=-I.s;if(P=(C=u.length)-(_=d.length),P>0)for(;P--;d[_++]=0);P=T2-1;for(;C>v;){if(d[--C]<u[C]){for(_=C;_&&!d[--_];d[_]=P);--d[_],d[C]+=T2}d[C]-=u[C]}for(;d[0]==0;d.splice(0,1),--y);if(!d[0])return I.s=Z==3?-1:1,I.c=[I.e=0],I;return R(I,d,y)},J.modulo=J.mod=function(I,P){var _,C,k=this;if(I=new O(I,P),!k.c||!I.s||I.c&&!I.c[0])return new O(NaN);else if(!I.c||k.c&&!k.c[0])return new O(k);if(F==9)C=I.s,I.s=1,_=Y(k,I,0,3),I.s=C,_.s*=C;else _=Y(k,I,0,F);if(I=k.minus(_.times(I)),!I.c[0]&&F==1)I.s=k.s;return I},J.multipliedBy=J.times=function(I,P){var _,C,k,S,T,v,x,y,d,u,b,g,p,h,n,t=this,s=t.c,Z0=(I=new O(I,P)).c;if(!s||!Z0||!s[0]||!Z0[0]){if(!t.s||!I.s||s&&!s[0]&&!Z0||Z0&&!Z0[0]&&!s)I.c=I.e=I.s=null;else if(I.s*=t.s,!s||!Z0)I.c=I.e=null;else I.c=[0],I.e=0;return I}if(C=KZ(t.e/w6)+KZ(I.e/w6),I.s*=t.s,x=s.length,u=Z0.length,x<u)p=s,s=Z0,Z0=p,k=x,x=u,u=k;for(k=x+u,p=[];k--;p.push(0));h=T2,n=YA;for(k=u;--k>=0;){_=0,b=Z0[k]%n,g=Z0[k]/n|0;for(T=x,S=k+T;S>k;)y=s[--T]%n,d=s[T]/n|0,v=g*y+d*b,y=b*y+v%n*n+p[S]+_,_=(y/h|0)+(v/n|0)+g*d,p[S--]=y%h;p[S]=_}if(_)++C;else p.splice(0,1);return R(I,p,C)},J.negated=function(){var I=new O(this);return I.s=-I.s||null,I},J.plus=function(I,P){var _,C=this,k=C.s;if(I=new O(I,P),P=I.s,!k||!P)return new O(NaN);if(k!=P)return I.s=-P,C.minus(I);var S=C.e/w6,T=I.e/w6,v=C.c,x=I.c;if(!S||!T){if(!v||!x)return new O(k/0);if(!v[0]||!x[0])return x[0]?I:new O(v[0]?C:k*0)}if(S=KZ(S),T=KZ(T),v=v.slice(),k=S-T){if(k>0)T=S,_=x;else k=-k,_=v;_.reverse();for(;k--;_.push(0));_.reverse()}if(k=v.length,P=x.length,k-P<0)_=x,x=v,v=_,P=k;for(k=0;P;)k=(v[--P]=v[P]+x[P]+k)/T2|0,v[P]=T2===v[P]?0:v[P]%T2;if(k)v=[k].concat(v),++T;return R(I,v,T)},J.precision=J.sd=function(I,P){var _,C,k,S=this;if(I!=null&&I!==!!I){if(q7(I,1,wY),P==null)P=Z;else q7(P,0,8);return q(new O(S),I,P)}if(!(_=S.c))return null;if(k=_.length-1,C=k*w6+1,k=_[k]){for(;k%10==0;k/=10,C--);for(k=_[0];k>=10;k/=10,C++);}if(I&&S.e+1>C)C=S.e+1;return C},J.shiftedBy=function(I){return q7(I,-EZ0,EZ0),this.times("1e"+I)},J.squareRoot=J.sqrt=function(){var I,P,_,C,k,S=this,T=S.c,v=S.s,x=S.e,y=W+4,d=new O("0.5");if(v!==1||!T||!T[0])return new O(!v||v<0&&(!T||T[0])?NaN:T?S:1/0);if(v=Math.sqrt(+w(S)),v==0||v==1/0){if(P=WZ(T),(P.length+x)%2==0)P+="0";if(v=Math.sqrt(+P),x=KZ((x+1)/2)-(x<0||x%2),v==1/0)P="5e"+x;else P=v.toExponential(),P=P.slice(0,P.indexOf("e")+1)+x;_=new O(P)}else _=new O(v+"");if(_.c[0]){if(x=_.e,v=x+y,v<3)v=0;for(;;)if(k=_,_=d.times(k.plus(Y(S,k,y,1))),WZ(k.c).slice(0,v)===(P=WZ(_.c)).slice(0,v)){if(_.e<x)--v;if(P=P.slice(v-3,v+1),P=="9999"||!C&&P=="4999"){if(!C){if(q(k,k.e+W+2,0),k.times(k).eq(S)){_=k;break}}y+=4,v+=4,C=1}else{if(!+P||!+P.slice(1)&&P.charAt(0)=="5")q(_,_.e+W+2,1),I=!_.times(_).eq(S);break}}}return q(_,_.e+W+1,Z,I)},J.toExponential=function(I,P){if(I!=null)q7(I,0,wY),I++;return E(this,I,P,1)},J.toFixed=function(I,P){if(I!=null)q7(I,0,wY),I=I+this.e+1;return E(this,I,P)},J.toFormat=function(I,P,_){var C,k=this;if(_==null)if(I!=null&&P&&typeof P=="object")_=P,P=null;else if(I&&typeof I=="object")_=I,I=P=null;else _=D;else if(typeof _!="object")throw Error(bJ+"Argument not an object: "+_);if(C=k.toFixed(I,P),k.c){var S,T=C.split("."),v=+_.groupSize,x=+_.secondaryGroupSize,y=_.groupSeparator||"",d=T[0],u=T[1],b=k.s<0,g=b?d.slice(1):d,p=g.length;if(x)S=v,v=x,x=S,p-=S;if(v>0&&p>0){S=p%v||v,d=g.substr(0,S);for(;S<p;S+=v)d+=y+g.substr(S,v);if(x>0)d+=y+g.slice(S);if(b)d="-"+d}C=u?d+(_.decimalSeparator||"")+((x=+_.fractionGroupSize)?u.replace(new RegExp("\\d{"+x+"}\\B","g"),"$&"+(_.fractionGroupSeparator||"")):u):d}return(_.prefix||"")+C+(_.suffix||"")},J.toFraction=function(I){var P,_,C,k,S,T,v,x,y,d,u,b,g=this,p=g.c;if(I!=null){if(v=new O(I),!v.isInteger()&&(v.c||v.s!==1)||v.lt(Q))throw Error(bJ+"Argument "+(v.isInteger()?"out of range: ":"not an integer: ")+w(v))}if(!p)return new O(g);P=new O(Q),y=_=new O(Q),C=x=new O(Q),b=WZ(p),S=P.e=b.length-g.e-1,P.c[0]=MZ0[(T=S%w6)<0?w6+T:T],I=!I||v.comparedTo(P)>0?S>0?P:y:v,T=V,V=1/0,v=new O(b),x.c[0]=0;for(;;){if(d=Y(v,P,0,1),k=_.plus(d.times(C)),k.comparedTo(I)==1)break;_=C,C=k,y=x.plus(d.times(k=y)),x=k,P=v.minus(d.times(k=P)),v=k}return k=Y(I.minus(_),C,0,1),x=x.plus(k.times(y)),_=_.plus(k.times(C)),x.s=y.s=g.s,S=S*2,u=Y(y,C,S,Z).minus(g).abs().comparedTo(Y(x,_,S,Z).minus(g).abs())<1?[y,C]:[x,_],V=T,u},J.toNumber=function(){return+w(this)},J.toPrecision=function(I,P){if(I!=null)q7(I,1,wY);return E(this,I,P,2)},J.toString=function(I){var P,_=this,C=_.s,k=_.e;if(k===null)if(C){if(P="Infinity",C<0)P="-"+P}else P="NaN";else{if(I==null)P=k<=K||k>=H?ol(WZ(_.c),k):bH(WZ(_.c),k,"0");else if(I===10&&B)_=q(new O(_),W+k+1,Z),P=bH(WZ(_.c),_.e,"0");else q7(I,2,L.length,"Base"),P=X(bH(WZ(_.c),k,"0"),10,I,C,!0);if(C<0&&_.c[0])P="-"+P}return P},J.valueOf=J.toJSON=function(){return w(this)},J._isBigNumber=!0,J[Symbol.toStringTag]="BigNumber",J[Symbol.for("nodejs.util.inspect.custom")]=J.valueOf,$!=null)O.set($);return O}function KZ($){var Y=$|0;return $>0||$===Y?Y:Y-1}function WZ($){var Y,X,G=1,J=$.length,Q=$[0]+"";for(;G<J;){Y=$[G++]+"",X=w6-Y.length;for(;X--;Y="0"+Y);Q+=Y}for(J=Q.length;Q.charCodeAt(--J)===48;);return Q.slice(0,J+1||1)}function oN($,Y){var X,G,J=$.c,Q=Y.c,W=$.s,Z=Y.s,K=$.e,H=Y.e;if(!W||!Z)return null;if(X=J&&!J[0],G=Q&&!Q[0],X||G)return X?G?0:-Z:W;if(W!=Z)return W;if(X=W<0,G=K==H,!J||!Q)return G?0:!J^X?1:-1;if(!G)return K>H^X?1:-1;Z=(K=J.length)<(H=Q.length)?K:H;for(W=0;W<Z;W++)if(J[W]!=Q[W])return J[W]>Q[W]^X?1:-1;return K==H?0:K>H^X?1:-1}function q7($,Y,X,G){if($<Y||$>X||$!==ZZ($))throw Error(bJ+(G||"Argument")+(typeof $=="number"?$<Y||$>X?" out of range: ":" not an integer: ":" not a primitive number: ")+String($))}function sl($){var Y=$.c.length-1;return KZ($.e/w6)==Y&&$.c[Y]%2!=0}function ol($,Y){return($.length>1?$.charAt(0)+"."+$.slice(1):$)+(Y<0?"e":"e+")+Y}function bH($,Y,X){var G,J;if(Y<0){for(J=X+".";++Y;J+=X);$=J+$}else if(G=$.length,++Y>G){for(J=X,Y-=G;--Y;J+=X);$+=J}else if(Y<G)$=$.slice(0,Y)+"."+$.slice(Y);return $}var tm4=I61(),P61=tm4;var em4=24,Gk=32,$u4=()=>{if(typeof globalThis<"u"&&globalThis.crypto&&typeof globalThis.crypto.getRandomValues==="function")return()=>{let $=new Uint32Array(1);return globalThis.crypto.getRandomValues($),$[0]/4294967296};return Math.random},qZ0=$u4(),RZ0=($=4,Y=qZ0)=>{let X="";while(X.length<$)X=X+Math.floor(Y()*36).toString(36);return X};function Yu4($){let Y=new P61(0);for(let X of $.values())Y=Y.multipliedBy(256).plus(X);return Y}var _61=($="")=>{return Yu4(R61(new TextEncoder().encode($))).toString(36).slice(1)},w61=Array.from({length:26},($,Y)=>String.fromCharCode(Y+97)),Xu4=($)=>w61[Math.floor($()*w61.length)],Gu4=({globalObj:$=typeof global<"u"?global:typeof window<"u"?window:{},random:Y=qZ0}={})=>{let X=Object.keys($).toString(),G=X.length?X+RZ0(Gk,Y):RZ0(Gk,Y);return _61(G).substring(0,Gk)},Ju4=($)=>()=>{return $++},Qu4=476782367,j61=({random:$=qZ0,counter:Y=Ju4(Math.floor($()*Qu4)),length:X=em4,fingerprint:G=Gu4({random:$})}={})=>{if(X>Gk)throw Error(`Length must be between 2 and ${Gk}. Received: ${X}`);return function(){let Q=Xu4($),W=Date.now().toString(36),Z=Y().toString(36),K=RZ0(X,$),H=`${W+K+Z+G}`;return`${Q+_61(H).substring(1,X)}`}},hH=Wu4(j61);function Wu4($){let Y;return()=>{if(!Y)Y=$();return Y()}}function I6(){return hH()}var hJ=H6("sys_apimanager_proxy_detail",{id:y0("id"),name:y0("name"),path1:y0("path1"),path2:y0("path2"),target:y0("target"),remark:y0("remark"),parames:y0("parames"),resp:y0("resp"),activate:k1("activate"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function tN($){return await o0.select().from(hJ).where(R1(hJ.path1,$))}async function T61($,Y){return await o0.select().from(hJ).where(l7(R1(hJ.path1,$),R1(hJ.path2,Y)))}async function fH($){let Y=await o0.$count(hJ,R1(hJ.id,$.id));if(Y&&Y>0)Zu4($);else{let X=Date.now();$.id=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(hJ).values($)}}async function Zu4($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,await o0.update(hJ).set($).where(R1(hJ.id,$.id))}async function C61($){await o0.delete(hJ).where(R1(hJ.id,$))}async function S61($){await o0.delete(hJ).where(R1(hJ.path1,$))}var H$1=U6(UK0(),1),z$1=U6(U$1(),1),DK0=new z$1.default({filename:"log-%DATE%.log",datePattern:"YYYY-MM-DD",zippedArchive:!0,maxSize:"100m",maxFiles:"14d",dirname:"logs"});DK0.on("error",($)=>{v2.info(`error:${$.message}`)});DK0.on("rotate",($,Y)=>{});var v2=H$1.createLogger({transports:[DK0]});function fX(){let $=new Date,Y=(G)=>G<10?`0${G}`:`${G}`;return`${$.getFullYear()}-${Y($.getMonth()+1)}-${Y($.getDate())} ${Y($.getHours())}:${Y($.getMinutes())}:${Y($.getSeconds())}`}function V$1(){let $=new Date,Y=(G)=>G<10?`0${G}`:`${G}`;return`${$.getFullYear()}${Y($.getMonth()+1)}${Y($.getDate())}`}function Ti(){let $=new Date,Y=(G)=>G<10?`0${G}`:`${G}`;return`${$.getFullYear()}-${Y($.getMonth()+1)}-${Y($.getDate())}`}function A$1($,Y="YYYY-MM-DD"){let X=new Date;X.setDate(X.getDate()+$);let G=(Q)=>Q<10?`0${Q}`:`${Q}`,J={YYYY:`${X.getFullYear()}`,MM:G(X.getMonth()+1),DD:G(X.getDate()),HH:G(X.getHours()),mm:G(X.getMinutes()),ss:G(X.getSeconds())};return Y.replace(/YYYY|MM|DD|HH|mm|ss/g,(Q)=>J[Q])}function F$1($=1000){return new Promise((Y)=>setTimeout(Y,$))}var Rr4=Object.prototype.toString;function D$1($,Y){return Rr4.call($)===`[object ${Y}]`}function a8($){return $&&Array.isArray($)}function I7($){return D$1($,"String")}function qr4($){return $===null}function Ci($){return!qr4($)&&D$1($,"Object")}function D$($){if(!$)return;return Object.keys($).forEach((Y)=>{if($[Y]===""||$[Y]===void 0||$[Y]===null||$[Y]==="null"||$[Y]==="undefined")delete $[Y]}),$}function UA($,Y){for(let X in Y)if(Y.hasOwnProperty(X))if(typeof Y[X]==="object"&&!Array.isArray(Y[X])&&$.hasOwnProperty(X)&&typeof $[X]==="object"&&!Array.isArray($[X]))UA($[X],Y[X]);else $[X]=Y[X]}function HA($){if($===null||$===void 0)return"";if(typeof $==="object")try{return JSON.stringify($)}catch{return $.toString()}return String($)}function x2($,Y,X="info"){let G=new Date().toISOString();console.log(`[${Y}] [${G}] [${X.toUpperCase()}] ${$}`),v2.info(`[${Y}] [${G}] [${X.toUpperCase()}] ${$}`)}function Yq($){if(!$&&$!==0)return null;if(typeof $==="number"||Ir4($)){let Y=Number($)>946684800000;return new Date(Y?Number($):Number($)*1000)}if(typeof $==="string"){let Y=$.trim(),X=Y.match(/^(\d{4})-(\d{1,2})-(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})$/);if(X){let[Q,W,Z,K,H,z,V]=X;if(W&&Z&&K&&H&&z&&V)return new Date(parseInt(W),parseInt(Z)-1,parseInt(K),parseInt(H)+8,parseInt(z),parseInt(V))}let G=Y.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);if(G){let[Q,W,Z,K]=G;if(W&&Z&&K)return new Date(parseInt(W),parseInt(Z)-1,parseInt(K))}let J=new Date(Y);if(!isNaN(J.getTime()))return J}return null}function Ir4($){if(!/^\d+$/.test($))return!1;let Y=Number($);if(!Number.isInteger(Y)||Y<=0)return!1;let X=$.length;if(X===10)return Y>=0&&Y<=4102444800;if(X===13)return Y>=0&&Y<=4102444800000;if(X>=9&&X<=13)return!0;return!1}function Si($=new Date){let Y=$.getFullYear(),X=$.getMonth()+1;return`${Y}${X.toString().padStart(2,"0")}`}var Sk=H6("sys_apimanager_proxy_statistics",{id:y0("id"),month:y0("month"),path1:y0("path1"),path2:y0("path2"),access:k1("access"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function N$1($){let Y=await o0.$count(Sk,l7(R1(Sk.month,$.month),R1(Sk.path1,$.path1),R1(Sk.path2,$.path2)));if(Y&&Y>0){let X=r`UPDATE sys_apimanager_proxy_statistics 
          SET access = access + 1 
          WHERE
	          month = ${$.month} 
	          AND path1 = ${$.path1} 
	          AND path2 = ${$.path2}`;o0.run(X)}else{let X=Date.now();$.id=I6(),$.access=1,$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(Sk).values($)}}async function L$1(){let Y=`SELECT
	  MIN( month ) AS month,
	  SUM( access ) AS access 
  FROM
	  sys_apimanager_proxy_statistics 
  WHERE
	  month IN ( ${wr4(Pr4())} ) 
  GROUP BY
	  month
  ORDER BY
	  month ASC`,X=r.raw(Y);return o0.all(X)}async function B$1(){let Y=`SELECT
	  MIN( path1 ) || '/' || MIN( path2 ) AS name,
	  SUM( access ) AS value 
  FROM
	  sys_apimanager_proxy_statistics 
  WHERE
	  month = '${Si()}' 
  GROUP BY
	  month,
	  path1,
	  path2 
  ORDER BY
	  access DESC 
	LIMIT 10`,X=r.raw(Y);return o0.all(X)}function Pr4(){let $=[],Y=new Date;for(let X=0;X<12;X++){let G=new Date(Y);G.setMonth(G.getMonth()-X);let J=G.getFullYear(),Q=G.getMonth()+1,W=`${J}${Q.toString().padStart(2,"0")}`;$.push(W)}return $}function wr4($){return $.map((Y)=>`'${Y}'`).join(",")}var VZ=H6("sys_appmanager",{id:y0("id"),appId:y0("appId"),appSecret:y0("appSecret"),day:k1("day"),status:k1("status"),remark:y0("remark"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function ki($,Y){return await o0.select().from(VZ).where(l7(R1(VZ.appId,$),R1(VZ.appSecret,Y)))}function E$1($){let Y=r.raw("1 = 1");if($.appId&&$.appId.length>0)Y.append(r.raw(` and appId like '%${$.appId}%'`));if($.remark&&$.remark.length>0)Y.append(r.raw(` and remark like '%${$.remark}%'`));return Y}async function M$1($){return await o0.select().from(VZ).where(E$1($)).limit(Number($.limit)).offset(Number($.offset))}async function R$1($){return await o0.$count(VZ,E$1($))}async function q$1($){let Y=await o0.$count(VZ,R1(VZ.id,$.id));if(Y&&Y>0)_r4($);else{let X=Date.now();$.id=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(VZ).values($)}}async function _r4($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await o0.update(VZ).set($).where(R1(VZ.id,$.id))}async function I$1($){await o0.delete(VZ).where(R1(VZ.id,$))}var Ln=U6(kY1(),1),vY1="v0aq61d01j44fke9i1mor7ro";function OK0($){let Y=JSON.stringify($);return Ln.default.AES.encrypt(Y,vY1).toString()}function xY1($){let X=Ln.default.AES.decrypt($,vY1).toString(Ln.default.enc.Utf8);if(X)return JSON.parse(X);return null}var DL=H6("sys_config",{id:y0("id"),name:y0("name"),code:y0("code"),val:y0("val"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function vk($){let Y=await o0.select().from(DL).where(R1(DL.code,$));if(Y&&Y[0]&&Y[0].val)return xY1(Y[0].val);else return null}async function xk($){let Y=await o0.$count(DL,R1(DL.code,$.code));if(Y&&Y>0)jr4($);else{let X=Date.now();$.id=I6(),$.code=$.code??I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,$.val=OK0($.val),await o0.insert(DL).values($)}}async function jr4($){let Y=Date.now();$.updatedAt=Y,$.latest_visitAt=Y,$.val=OK0($.val),await o0.update(DL).set($).where(R1(DL.code,$.code))}var pH=H6("sys_page_app",{id:y0("id"),name:y0("name"),code:y0("code"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});function bY1($){let Y=r.raw("1 = 1");if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));return Y}async function hY1($){return await o0.select().from(pH).where(bY1($)).limit(Number($.limit)).offset(Number($.offset))}async function fY1($){return await o0.$count(pH,bY1($))}async function Bn($){let Y=await o0.$count(pH,R1(pH.code,$.code));if(Y&&Y>0)Tr4($);else{let X=Date.now();$.id=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(pH).values($)}}async function Tr4($){let Y=Date.now();$.updateBy="admin",$.latest_visitAt=Y,$.updatedAt=Y,await o0.update(pH).set($).where(R1(pH.code,$.code))}async function gY1($){await o0.delete(pH).where(R1(pH.code,$))}function uY1($){return $}function Xq($){return $==="__proto__"}function On($){switch(typeof $){case"number":case"symbol":return!1;case"string":return $.includes(".")||$.includes("[")||$.includes("]")}}function AA($){if(typeof $==="string"||typeof $==="symbol")return $;if(Object.is($?.valueOf?.(),-0))return"-0";return String($)}function FA($){if($==null)return"";if(typeof $==="string")return $;if(Array.isArray($))return $.map(FA).join(",");let Y=String($);if(Y==="0"&&Object.is(Number($),-0))return"-0";return Y}function Gq($){if(Array.isArray($))return $.map(AA);if(typeof $==="symbol")return[$];$=FA($);let Y=[],X=$.length;if(X===0)return Y;let G=0,J="",Q="",W=!1;if($.charCodeAt(0)===46)Y.push(""),G++;while(G<X){let Z=$[G];if(Q)if(Z==="\\"&&G+1<X)G++,J+=$[G];else if(Z===Q)Q="";else J+=Z;else if(W)if(Z==='"'||Z==="'")Q=Z;else if(Z==="]")W=!1,Y.push(J),J="";else J+=Z;else if(Z==="["){if(W=!0,J)Y.push(J),J=""}else if(Z==="."){if(J)Y.push(J),J=""}else J+=Z;G++}if(J)Y.push(J);return Y}function D4($,Y,X){if($==null)return X;switch(typeof Y){case"string":{if(Xq(Y))return X;let G=$[Y];if(G===void 0)if(On(Y))return D4($,Gq(Y),X);else return X;return G}case"number":case"symbol":{if(typeof Y==="number")Y=AA(Y);let G=$[Y];if(G===void 0)return X;return G}default:{if(Array.isArray(Y))return Cr4($,Y,X);if(Object.is(Y?.valueOf(),-0))Y="-0";else Y=String(Y);if(Xq(Y))return X;let G=$[Y];if(G===void 0)return X;return G}}}function Cr4($,Y,X){if(Y.length===0)return X;let G=$;for(let J=0;J<Y.length;J++){if(G==null)return X;if(Xq(Y[J]))return X;G=G[Y[J]]}if(G===void 0)return X;return G}function pY1($){return function(Y){return D4(Y,$)}}function dH($){return $!==null&&(typeof $==="object"||typeof $==="function")}function yk($){return $==null||typeof $!=="object"&&typeof $!=="function"}function gX($,Y){return $===Y||Number.isNaN($)&&Number.isNaN(Y)}function MK0($,Y,X){if(typeof X!=="function")return MK0($,Y,()=>{return});return EK0($,Y,function G(J,Q,W,Z,K,H){let z=X(J,Q,W,Z,K,H);if(z!==void 0)return Boolean(z);return EK0(J,Q,G,H)},new Map)}function EK0($,Y,X,G){if(Y===$)return!0;switch(typeof Y){case"object":return Sr4($,Y,X,G);case"function":{if(Object.keys(Y).length>0)return EK0($,{...Y},X,G);return gX($,Y)}default:{if(!dH($))return gX($,Y);if(typeof Y==="string")return Y==="";return!0}}}function Sr4($,Y,X,G){if(Y==null)return!0;if(Array.isArray(Y))return dY1($,Y,X,G);if(Y instanceof Map)return kr4($,Y,X,G);if(Y instanceof Set)return vr4($,Y,X,G);let J=Object.keys(Y);if($==null||yk($))return J.length===0;if(J.length===0)return!0;if(G?.has(Y))return G.get(Y)===$;G?.set(Y,$);try{for(let Q=0;Q<J.length;Q++){let W=J[Q];if(!yk($)&&!(W in $))return!1;if(Y[W]===void 0&&$[W]!==void 0)return!1;if(Y[W]===null&&$[W]!==null)return!1;if(!X($[W],Y[W],W,$,Y,G))return!1}return!0}finally{G?.delete(Y)}}function kr4($,Y,X,G){if(Y.size===0)return!0;if(!($ instanceof Map))return!1;for(let[J,Q]of Y.entries()){let W=$.get(J);if(X(W,Q,J,$,Y,G)===!1)return!1}return!0}function dY1($,Y,X,G){if(Y.length===0)return!0;if(!Array.isArray($))return!1;let J=new Set;for(let Q=0;Q<Y.length;Q++){let W=Y[Q],Z=!1;for(let K=0;K<$.length;K++){if(J.has(K))continue;let H=$[K],z=!1;if(X(H,W,Q,$,Y,G))z=!0;if(z){J.add(K),Z=!0;break}}if(!Z)return!1}return!0}function vr4($,Y,X,G){if(Y.size===0)return!0;if(!($ instanceof Set))return!1;return dY1([...$],[...Y],X,G)}function En($,Y){return MK0($,Y,()=>{return})}function cY1($){return Object.getOwnPropertySymbols($).filter((Y)=>Object.prototype.propertyIsEnumerable.call($,Y))}function Jq($){if($==null)return $===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call($)}var lY1="[object RegExp]",Mn="[object String]",Rn="[object Number]",qn="[object Boolean]",In="[object Arguments]",iY1="[object Symbol]",nY1="[object Date]",rY1="[object Map]",aY1="[object Set]",sY1="[object Array]";var oY1="[object ArrayBuffer]",Pn="[object Object]";var tY1="[object DataView]",eY1="[object Uint8Array]",$X1="[object Uint8ClampedArray]",YX1="[object Uint16Array]",XX1="[object Uint32Array]";var GX1="[object Int8Array]",JX1="[object Int16Array]",QX1="[object Int32Array]";var WX1="[object Float32Array]",ZX1="[object Float64Array]";var RK0=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}()||Function("return this")();function Qq($){return typeof RK0.Buffer<"u"&&RK0.Buffer.isBuffer($)}function wn($){return ArrayBuffer.isView($)&&!($ instanceof DataView)}function KX1($,Y){return DA($,void 0,$,new Map,Y)}function DA($,Y,X,G=new Map,J=void 0){let Q=J?.($,Y,X,G);if(Q!==void 0)return Q;if(yk($))return $;if(G.has($))return G.get($);if(Array.isArray($)){let W=Array($.length);G.set($,W);for(let Z=0;Z<$.length;Z++)W[Z]=DA($[Z],Z,X,G,J);if(Object.hasOwn($,"index"))W.index=$.index;if(Object.hasOwn($,"input"))W.input=$.input;return W}if($ instanceof Date)return new Date($.getTime());if($ instanceof RegExp){let W=new RegExp($.source,$.flags);return W.lastIndex=$.lastIndex,W}if($ instanceof Map){let W=new Map;G.set($,W);for(let[Z,K]of $)W.set(Z,DA(K,Z,X,G,J));return W}if($ instanceof Set){let W=new Set;G.set($,W);for(let Z of $)W.add(DA(Z,void 0,X,G,J));return W}if(Qq($))return $.subarray();if(wn($)){let W=new(Object.getPrototypeOf($)).constructor($.length);G.set($,W);for(let Z=0;Z<$.length;Z++)W[Z]=DA($[Z],Z,X,G,J);return W}if($ instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&$ instanceof SharedArrayBuffer)return $.slice(0);if($ instanceof DataView){let W=new DataView($.buffer.slice(0),$.byteOffset,$.byteLength);return G.set($,W),AZ(W,$,X,G,J),W}if(typeof File<"u"&&$ instanceof File){let W=new File([$],$.name,{type:$.type});return G.set($,W),AZ(W,$,X,G,J),W}if(typeof Blob<"u"&&$ instanceof Blob){let W=new Blob([$],{type:$.type});return G.set($,W),AZ(W,$,X,G,J),W}if($ instanceof Error){let W=structuredClone($);return G.set($,W),W.message=$.message,W.name=$.name,W.stack=$.stack,W.cause=$.cause,W.constructor=$.constructor,AZ(W,$,X,G,J),W}if($ instanceof Boolean){let W=new Boolean($.valueOf());return G.set($,W),AZ(W,$,X,G,J),W}if($ instanceof Number){let W=new Number($.valueOf());return G.set($,W),AZ(W,$,X,G,J),W}if($ instanceof String){let W=new String($.valueOf());return G.set($,W),AZ(W,$,X,G,J),W}if(typeof $==="object"&&xr4($)){let W=Object.create(Object.getPrototypeOf($));return G.set($,W),AZ(W,$,X,G,J),W}return $}function AZ($,Y,X=$,G,J){let Q=[...Object.keys(Y),...cY1(Y)];for(let W=0;W<Q.length;W++){let Z=Q[W],K=Object.getOwnPropertyDescriptor($,Z);if(K==null||K.writable)$[Z]=DA(Y[Z],Z,X,G,J)}}function xr4($){switch(Jq($)){case In:case sY1:case oY1:case tY1:case qn:case nY1:case WX1:case ZX1:case GX1:case JX1:case QX1:case rY1:case Rn:case Pn:case lY1:case aY1:case Mn:case iY1:case eY1:case $X1:case YX1:case XX1:return!0;default:return!1}}function UX1($){return DA($,void 0,$,new Map,void 0)}function HX1($){return $=UX1($),(Y)=>{return En(Y,$)}}function zX1($,Y){return KX1($,(X,G,J,Q)=>{let W=Y?.(X,G,J,Q);if(W!==void 0)return W;if(typeof $!=="object")return;if(Jq($)===Pn&&typeof $.constructor!=="function"){let Z={};return Q.set($,Z),AZ(Z,$,J,Q),Z}switch(Object.prototype.toString.call($)){case Rn:case Mn:case qn:{let Z=new $.constructor($?.valueOf());return AZ(Z,$),Z}case In:{let Z={};return AZ(Z,$),Z.length=$.length,Z[Symbol.iterator]=$[Symbol.iterator],Z}default:return}})}function VX1($){return zX1($)}var yr4=/^(?:0|[1-9]\d*)$/;function _n($,Y=Number.MAX_SAFE_INTEGER){switch(typeof $){case"number":return Number.isInteger($)&&$>=0&&$<Y;case"symbol":return!1;case"string":return yr4.test($)}}function jn($){return $!==null&&typeof $==="object"&&Jq($)==="[object Arguments]"}function Tn($,Y){let X;if(Array.isArray(Y))X=Y;else if(typeof Y==="string"&&On(Y)&&$?.[Y]==null)X=Gq(Y);else X=[Y];if(X.length===0)return!1;let G=$;for(let J=0;J<X.length;J++){let Q=X[J];if(G==null||!Object.hasOwn(G,Q)){if(!((Array.isArray(G)||jn(G))&&_n(Q)&&Q<G.length))return!1}G=G[Q]}return!0}function AX1($,Y){switch(typeof $){case"object":{if(Object.is($?.valueOf(),-0))$="-0";break}case"number":{$=AA($);break}}return Y=VX1(Y),function(X){let G=D4(X,$);if(G===void 0)return Tn(X,$);if(Y===void 0)return G===void 0;return En(G,Y)}}function c3($,Y=uY1,X=0){if(!$)return-1;if(X<0)X=Math.max($.length+X,0);let G=Array.from($).slice(X),J=-1;switch(typeof Y){case"function":{J=G.findIndex(Y);break}case"object":{if(Array.isArray(Y)&&Y.length===2){let Q=Y[0],W=Y[1];J=G.findIndex(AX1(Q,W))}else J=G.findIndex(HX1(Y));break}case"number":case"symbol":case"string":J=G.findIndex(pY1(Y))}return J===-1?-1:J+X}function Cn($){let Y=$?.constructor,X=typeof Y==="function"?Y.prototype:Object.prototype;return $===X}function FX1($){return Number.isSafeInteger($)&&$>=0}function Wq($){return $!=null&&typeof $!=="function"&&FX1($.length)}function Sn($){return wn($)}function kn($){return typeof $==="symbol"||$ instanceof Symbol}function DX1($){if(kn($))return NaN;return Number($)}function NX1($){if(!$)return $===0?$:0;if($=DX1($),$===1/0||$===-1/0)return($<0?-1:1)*Number.MAX_VALUE;return $===$?$:0}function LX1($){let Y=NX1($),X=Y%1;return X?Y-X:Y}function BX1($,Y){if($=LX1($),$<1||!Number.isSafeInteger($))return[];let X=Array($);for(let G=0;G<$;G++)X[G]=typeof Y==="function"?Y(G):G;return X}function OX1($){if(Wq($))return br4($);let Y=Object.keys(Object($));if(!Cn($))return Y;return Y.filter((X)=>X!=="constructor")}function br4($){let Y=BX1($.length,(J)=>`${J}`),X=new Set(Y);if(Qq($))X.add("offset"),X.add("parent");if(Sn($))X.add("buffer"),X.add("byteLength"),X.add("byteOffset");let G=Object.keys($).filter((J)=>!X.has(J));if(Array.isArray($))return[...Y,...G];return[...Y.filter((J)=>Object.hasOwn($,J)),...G]}function z6($,...Y){for(let X=0;X<Y.length;X++)hr4($,Y[X]);return $}function hr4($,Y){let X=OX1(Y);for(let G=0;G<X.length;G++){let J=X[G];if(!(J in $)||!gX($[J],Y[J]))$[J]=Y[J]}}var EX1=($,Y,X)=>{let G=$[Y];if(!(Object.hasOwn($,Y)&&gX(G,X))||X===void 0&&!(Y in $))$[Y]=X};var fr4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gr4=/^\w*$/;function MX1($,Y){if(Array.isArray($))return!1;if(typeof $==="number"||typeof $==="boolean"||$==null||kn($))return!0;return typeof $==="string"&&(gr4.test($)||!fr4.test($))||Y!=null&&Object.hasOwn(Y,$)}function RX1($,Y,X,G){if($==null&&!dH($))return $;let J;if(MX1(Y,$))J=[Y];else if(Array.isArray(Y))J=Y;else J=Gq(Y);let Q=X(D4($,J)),W=$;for(let Z=0;Z<J.length&&W!=null;Z++){let K=AA(J[Z]);if(Xq(K))continue;let H;if(Z===J.length-1)H=Q;else{let z=W[K],V=G?.(z,K,$);H=V!==void 0?V:dH(z)?z:_n(J[Z+1])?[]:{}}EX1(W,K,H),W=W[K]}return $}function i1($,Y,X){return RX1($,Y,()=>X,()=>{return})}function qX1($){return $==null}function NL($,...Y){if(qX1($))return{};let X={};for(let G=0;G<Y.length;G++){let J=Y[G];switch(typeof J){case"object":{if(!Array.isArray(J))if(Wq(J))J=Array.from(J);else J=[J];break}case"string":case"symbol":case"number":{J=[J];break}}for(let Q of J){let W=D4($,Q);if(W===void 0&&!Tn($,Q))continue;if(typeof Q==="string"&&Object.hasOwn($,Q))X[Q]=W;else i1(X,Q,W)}}return X}function QX($){return $===null}function bk($){return Array.isArray($)}function qK0($){if($==null)return!0;if(Wq($)){if(typeof $.splice!=="function"&&typeof $!=="string"&&!Qq($)&&!Sn($)&&!jn($))return!1;return $.length===0}if(typeof $==="object"){if($ instanceof Map||$ instanceof Set)return $.size===0;let Y=Object.keys($);if(Cn($))return Y.filter((X)=>X!=="constructor").length===0;return Y.length===0}return!0}function n1($,Y,X){if(arguments.length<3)return FA($);return FA($).replace(Y,X)}var mr4="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\xd7\\xf7",Zq="\\p{Lu}",TX1="\\p{Ll}",CX1="(?:[\\p{Lm}\\p{Lo}]\\p{M}*)",hk="\\d",IX1="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",PX1="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",wX1=`[\\p{Z}\\p{P}${mr4}]`,ur4=`(?:${Zq}|${CX1})`,_X1=`(?:${TX1}|${CX1})`,jX1=RegExp([`${Zq}?${TX1}+${IX1}(?=${wX1}|${Zq}|$)`,`${ur4}+${PX1}(?=${wX1}|${Zq}${_X1}|$)`,`${Zq}?${_X1}+${IX1}`,`${Zq}+${PX1}`,`${hk}*(?:1ST|2ND|3RD|(?![123])${hk}TH)(?=\\b|[a-z_])`,`${hk}*(?:1st|2nd|3rd|(?![123])${hk}th)(?=\\b|[A-Z_])`,`${hk}+`,"\\p{Emoji_Presentation}","\\p{Extended_Pictographic}"].join("|"),"gu");function N$($,Y=jX1,X){let G=FA($);if(X)Y=jX1;if(typeof Y==="number")Y=Y.toString();return Array.from(G.match(Y)??[]).filter((Q)=>Q!=="")}function IK0($){return typeof $==="boolean"}function PK0($){if(typeof $!=="string")return!1;try{return JSON.parse($),!0}catch{return!1}}function SX1($){if(!$||typeof $!=="object")return!1;let Y=Object.getPrototypeOf($);if(!(Y===null||Y===Object.prototype||Object.getPrototypeOf(Y)===null))return!1;return Object.prototype.toString.call($)==="[object Object]"}function fk($){switch(typeof $){case"object":return $===null||vn($)||xn($);case"string":case"number":case"boolean":return!0;default:return!1}}function vn($){if(!Array.isArray($))return!1;return $.every((Y)=>fk(Y))}function xn($){if(!SX1($))return!1;let Y=Reflect.ownKeys($);for(let X=0;X<Y.length;X++){let G=Y[X],J=$[G];if(typeof G!=="string")return!1;if(!fk(J))return!1}return!0}function wK0($){return $==null}function y2($){return $!=null}function _K0($){return typeof $==="string"}import{Database as Kq}from"bun:sqlite";RN();var mJ=H6("sys_sqlite_source",{id:y0("id"),name:y0("name"),code:y0("code"),filename:y0("filename"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function LL($){return await o0.select().from(mJ).where(R1(mJ.code,$))}async function kX1($){return await o0.select().from(mJ).where(R1(mJ.filename,$)).limit(1)}function jK0($){let Y=r.raw("1 = 1");if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));return Y}async function vX1($){return await o0.select().from(mJ).where(jK0($)).limit(Number($.limit)).offset(Number($.offset))}async function xX1($){return await o0.select().from(mJ).where(jK0($))}async function yX1($){return await o0.$count(mJ,jK0($))}async function bX1($){let Y=await o0.$count(mJ,R1(mJ.code,$.code));if(Y&&Y>0)pr4($);else{let X=Date.now();$.id=I6(),$.code=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(mJ).values($)}}async function pr4($){let Y=Date.now();$.updateBy="admin",$.latest_visitAt=Y,$.updatedAt=Y,await o0.update(mJ).set($).where(R1(mJ.code,$.code))}async function hX1($){await o0.delete(mJ).where(R1(mJ.code,$))}var dr4={max:500,maxSize:1000,sizeCalculation:($,Y)=>{return 1},dispose:($,Y)=>{},ttl:7200000,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,fetchMethod:async($,Y,{options:X,signal:G,context:J})=>{}},CK0=new $Z(dr4);async function WX($){if($&&CK0.has($))return CK0.get($);else{let Y=await LL($);if(Y&&Y[0]&&Y.length>0&&Y[0].filename){let X=new Kq(`./.data/${Y[0].filename}.db`),G=h3({client:X});return CK0.set($,G),G}else throw Error(`error:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}}async function gk($){let Y=await kX1($);if(Y&&Y[0]&&Y.length>0&&Y[0].code)return await WX(Y[0].code);else throw Error(`error:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function fX1($,Y,X){if(await Bun.file(`./.data/${X}.db`).exists())throw Error(`${X}\u5DF2\u7ECF\u5B58\u5728\uFF0C\u8BF7\u4FEE\u6539`);await bX1({name:$,code:Y,filename:X}),new Kq(`./.data/${X}.db`,{create:!0})}async function gX1($){let Y=new Kq(`./.data/${$}.db`);return await h3({client:Y}).get("select 1")}async function mX1($,Y){let X=await LL($);if(X&&X[0]&&X.length>0&&X[0].filename){let G=new Kq(`./.data/${X[0].filename}.db`);h3({client:G}).run(Y)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function uX1($){let Y=await LL($);if(Y&&Y[0]&&Y.length>0&&Y[0].filename){let X=new Kq(`./.data/${Y[0].filename}.db`);return h3({client:X}).all("SELECT name FROM sqlite_master WHERE type='table'")}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function pX1($,Y){let X=await LL($);if(X&&X[0]&&X.length>0&&X[0].filename){let G=new Kq(`./.data/${X[0].filename}.db`);return h3({client:G}).run(`DROP TABLE IF EXISTS ${Y}`)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}var cH=H6("sys_sqlite_schema_cache",{id:y0("id"),source:y0("source"),filename:y0("filename"),table_name:y0("table_name"),schema_data:y0("schema_data"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function Uq($,Y){return await o0.select().from(cH).where(l7(R1(cH.source,$),R1(cH.table_name,Y))).orderBy(r`${cH.createdAt} desc`).limit(1)}async function dX1($,Y){return await o0.select().from(cH).where(l7(R1(cH.filename,$),R1(cH.table_name,Y))).orderBy(r`${cH.createdAt} desc`).limit(1)}async function cX1($){let Y=Date.now();$.id=I6(),$.env_id="default",$.createBy="admin",$.createdAt=Y,$.updateBy="admin",$.updatedAt=Y,await o0.insert(cH).values($)}function cr4($){if(!$||typeof $!=="string")return"UNKNOWN";let Y=$.trim().toUpperCase(),X=[[/^SELECT\b/,"SELECT"],[/^INSERT\s+INTO\b/,"INSERT"],[/^INSERT\b/,"INSERT"],[/^UPDATE\b/,"UPDATE"],[/^DELETE\s+FROM\b/,"DELETE"],[/^DELETE\b/,"DELETE"]];for(let[G,J]of X)if(G.test(Y))return J;return"UNKNOWN"}async function yn($,Y){let X=$.poolCode;if(!X||X.length==0)throw Error("poolCode\u4E0D\u80FD\u4E3A\u7A7A");let G=await WX(X);if(Y&&Y=="2"){let J=$.sql;delete $.sql,delete $.poolCode;let Q=N$(J,/{{(.*?)}}/g);if(a8(Q))Q.forEach((Z)=>{let K=n1(n1(Z,"{{",""),"}}","");if(K.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4($,K)))throw Error(`${K}\u53D6\u503C\u5931\u8D25`);J=n1(J,`{{${K}}}`,$[K])});let W=cr4(String(J));if(W=="SELECT")return{data:G.all(r.raw(J))};else if(W=="INSERT"||W=="UPDATE"||W=="DELETE")return{data:G.run(r.raw(J))};else throw Error("SQL\u8BED\u53E5\u9519\u8BEF")}else{if(I7($))$=JSON.parse($);$=D$($);let J="select";if($&&$.type)J=$.type;let Q=D$($.dynamicObj);if(!Q)Q={};let W=$.table;if(!W||W.length==0)throw Error("table\u4E0D\u80FD\u4E3A\u7A7A");let Z=$.pageNum?$.pageNum:1,K=$.pageSize?$.pageSize:10,H=$.orderBy?$.orderBy:"id",z=$.orderByCommand?$.orderByCommand:"desc",V=$.id,A=await bn(X,W);if(J=="insert")return Q.id=hH(),Q.create_time=fX(),Q.update_time=fX(),await G.insert(H6(W,A.schema)).values(Q),{data:"success"};else if(J=="update"){if(!V||V.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");return Q.update_time=fX(),await G.update(H6(W,A.schema)).set(Q).where(r.join([r.raw("id"),r`${V}`],r` = `)),{data:"success"}}else if(J=="delete"){if(!V||V.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");let F=`delete from ${W} where id = '${V}'`;return G.run(r.raw(F)),{data:"success"}}else if(J=="select"||J=="count"){let F=[];if(F.push(r`1 = 1`),V)F.push(r.join([r.raw("id"),r`${V}`],r` = `));Object.keys(Q).forEach((B)=>{if(y2(Q[B].value)&&!gX(Q[B].value,"undefined"))switch(Q[B].command){case"eq":F.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` = `));break;case"ne":F.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` != `));break;case"gt":F.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` > `));break;case"gte":F.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` >= `));break;case"lt":F.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` < `));break;case"lte":F.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` <= `));break;case"isNull":F.push(r.join([r.raw(`${B}`)],r` is null `));break;case"isNotNull":F.push(r.join([r.raw(`${B}`)],r` is not null `));break;case"like":F.push(r.join([r.raw(`${B}`),r`CONCAT('%',${Q[B].value},'%')`],r` like `));break;default:break}});let N=r.join(F,r` and `),D=await G.select({count:r`count(*)`.mapWith(Number)}).from(H6(W,A.schema)).where(N);if(J=="count")return{data:{count:D[0]?D[0].count:0}};return{data:await G.select().from(H6(W,A.schema)).where(N).orderBy(z=="desc"?oQ(r.raw(H)):vH(r.raw(H))).limit(Number(K)).offset(Number((Z-1)*K)),total:D[0]?D[0].count:0}}else throw Error("\u64CD\u4F5C\u7C7B\u578B\u65E0\u6548")}}async function bn($,Y){let G=(await Uq($,Y))[0]?.schema_data??"[]",J=JSON.parse(G),Q={id:y0(),create_time:y0(),update_time:y0()};return J.forEach((W)=>{if(I7(W.type)){if(String(W.type).includes("integer"))Q[W.name]=k1();else if(String(W.type).includes("real"))Q[W.name]=sS();else if(String(W.type).includes("text"))Q[W.name]=y0();else if(String(W.type).includes("blob"))Q[W.name]=nN();else if(String(W.type).includes("boolean"))Q[W.name]=k1({mode:"boolean"});else if(String(W.type).includes("bigint"))Q[W.name]=nN({mode:"bigint"});else if(String(W.type).includes("numeric"))Q[W.name]=aS()}}),{fields:J,schema:Q}}async function SK0($,Y){let G=(await dX1($,Y))[0]?.schema_data??"[]",J=JSON.parse(G),Q={id:y0(),create_time:y0(),update_time:y0()};return J.forEach((W)=>{if(I7(W.type)){if(String(W.type).includes("integer"))Q[W.name]=k1();else if(String(W.type).includes("real"))Q[W.name]=sS();else if(String(W.type).includes("text"))Q[W.name]=y0();else if(String(W.type).includes("blob"))Q[W.name]=nN();else if(String(W.type).includes("boolean"))Q[W.name]=k1({mode:"boolean"});else if(String(W.type).includes("bigint"))Q[W.name]=nN({mode:"bigint"});else if(String(W.type).includes("numeric"))Q[W.name]=aS()}}),{fields:J,schema:Q}}async function hn($,Y,X){let G=await WX($),J=await bn($,Y);return X.id=hH(),X.create_time=fX(),X.update_time=fX(),await G.insert(H6(Y,J.schema)).values(X)}async function fn($,Y,X,G){let J=await WX($),Q=await bn($,Y);return X.update_time=fX(),await J.update(H6(Y,Q.schema)).set(X).where(r.join([r.raw("id"),r`${G}`],r` = `))}async function gn($,Y){return(await WX($)).run(r.raw(Y))}async function mk($,Y){return(await WX($)).all(r.raw(Y))}function uk($,Y){let X=$,G=N$($,/{{(.*?)}}/g);if(a8(G))G.forEach((J)=>{let Q=n1(n1(J,"{{",""),"}}","");if(Q.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,Q)))throw Error(`${Q}\u53D6\u503C\u5931\u8D25`);X=n1(X,`{{${Q}}}`,D4(Y,Q))});return X}async function nX1($,Y,X,G){let J=r.raw("1 = 1"),Q=D4(X,"id")??"",W=D4(X,"create_time")??"",Z=D4(X,"update_time")??"";if(Q&&Q.length>0)J.append(r.raw(` and id like '%${Q}%'`));if(W&&W.length>0)J.append(r.raw(` and create_time like '%${W}%'`));if(Z&&Z.length>0)J.append(r.raw(` and update_time like '%${Z}%'`));let H=(await Uq($,Y))[0]?.schema_data??"[]";JSON.parse(H).forEach((D)=>{let L=D4(X,D.name)??"";if(L&&L.length>0)J.append(r.raw(` and ${D.name} like '%${L}%'`))});let V=await WX($),A=await bn($,Y),F=await V.select().from(H6(Y,A.schema)).where(J).limit(10).offset(G),N=await V.$count(H6(Y,A.schema),J);return{result:F,count:N}}var iX1=new Map([["eq"," = "],["neq"," != "],["gt"," > "],["gte"," >= "],["lt"," < "],["lte"," <= "],["like"," like "],["ilike"," ilike "],["in"," in "],["is"," is "]]);async function rX1($,Y,X){let G=await gk($),J=await SK0($,Y),Q=X.pageNum??"1",W=X.pageSize??"100",Z=X.order??"create_time.asc",K=(Number(Q)-1)*Number(W),H=r.raw("1 = 1");Object.entries(X).forEach(([F,N])=>{let D=String(F),L=String(N);if(D!="pageNum"&&D!="pageSize"&&D!="order"){let B=L.split(".");if(iX1.has(B[0]??"empty")){let O=iX1.get(B[0]??"empty");if(D&&D.length>0)if(B[0]=="in"||B[0]=="is")H.append(r.raw(` and ${D} ${O} ${B[1]}`));else H.append(r.raw(` and ${D} ${O} '${B[1]}'`))}}});let z=Z.split(".")[1],V=await G.select().from(H6(Y,J.schema)).orderBy(z=="desc"?oQ(r.raw(Z.split(".")[0])):vH(r.raw(Z.split(".")[0]))).where(H).limit(Number(W)).offset(K),A=await G.$count(H6(Y,J.schema),H);return{result:V,count:A}}async function aX1($,Y,X){let G=await gk($),J=await SK0($,Y);X.forEach(async(Q)=>{Q.id=hH(),Q.create_time=fX(),Q.update_time=fX(),await G.insert(H6(Y,J.schema)).values(Q)})}async function sX1($,Y,X){let G=await gk($),J=await SK0($,Y);X.forEach(async(Q)=>{Q.update_time=fX();let W=D4(Q,"id")??"";if(W.length==0)throw Error("\u7F3A\u5C11id\u65E0\u6CD5\u66F4\u65B0\u6570\u636E");await G.update(H6(Y,J.schema)).set(Q).where(r.join([r.raw("id"),r`${W}`],r` = `))})}async function oX1($,Y,X){let G=await gk($),J=X.id??"";if(J.length==0)throw Error("\u7F3A\u5C11id\u65E0\u6CD5\u5220\u9664\u6570\u636E");let Q=`delete from ${Y} where id = '${J}'`;G.run(r.raw(Q))}var BL=new TextEncoder,lH=new TextDecoder;function un(...$){let Y=$.reduce((J,{length:Q})=>J+Q,0),X=new Uint8Array(Y),G=0;for(let J of $)X.set(J,G),G+=J.length;return X}function NA($){let Y=new Uint8Array($.length);for(let X=0;X<$.length;X++){let G=$.charCodeAt(X);if(G>127)throw TypeError("non-ASCII string encountered in encode()");Y[X]=G}return Y}function kK0($){if(Uint8Array.prototype.toBase64)return $.toBase64();let Y=32768,X=[];for(let G=0;G<$.length;G+=Y)X.push(String.fromCharCode.apply(null,$.subarray(G,G+Y)));return btoa(X.join(""))}function pn($){if(Uint8Array.fromBase64)return Uint8Array.fromBase64($);let Y=atob($),X=new Uint8Array(Y.length);for(let G=0;G<Y.length;G++)X[G]=Y.charCodeAt(G);return X}function Hq($){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(typeof $==="string"?$:lH.decode($),{alphabet:"base64url"});let Y=$;if(Y instanceof Uint8Array)Y=lH.decode(Y);Y=Y.replace(/-/g,"+").replace(/_/g,"/");try{return pn(Y)}catch{throw TypeError("The input to be decoded is not correctly encoded.")}}function dn($){let Y=$;if(typeof Y==="string")Y=BL.encode(Y);if(Uint8Array.prototype.toBase64)return Y.toBase64({alphabet:"base64url",omitPadding:!0});return kK0(Y).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var LA=($,Y="algorithm.name")=>TypeError(`CryptoKey does not support this operation, its ${Y} must be ${$}`),zq=($,Y)=>$.name===Y;function lr4($){return parseInt($.name.slice(4),10)}function vK0($,Y){if(lr4($.hash)!==Y)throw LA(`SHA-${Y}`,"algorithm.hash")}function ir4($){switch($){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}function nr4($,Y){if(Y&&!$.usages.includes(Y))throw TypeError(`CryptoKey does not support this operation, its usages must include ${Y}.`)}function tX1($,Y,X){switch(Y){case"HS256":case"HS384":case"HS512":{if(!zq($.algorithm,"HMAC"))throw LA("HMAC");vK0($.algorithm,parseInt(Y.slice(2),10));break}case"RS256":case"RS384":case"RS512":{if(!zq($.algorithm,"RSASSA-PKCS1-v1_5"))throw LA("RSASSA-PKCS1-v1_5");vK0($.algorithm,parseInt(Y.slice(2),10));break}case"PS256":case"PS384":case"PS512":{if(!zq($.algorithm,"RSA-PSS"))throw LA("RSA-PSS");vK0($.algorithm,parseInt(Y.slice(2),10));break}case"Ed25519":case"EdDSA":{if(!zq($.algorithm,"Ed25519"))throw LA("Ed25519");break}case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":{if(!zq($.algorithm,Y))throw LA(Y);break}case"ES256":case"ES384":case"ES512":{if(!zq($.algorithm,"ECDSA"))throw LA("ECDSA");let G=ir4(Y);if($.algorithm.namedCurve!==G)throw LA(G,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}nr4($,X)}function eX1($,Y,...X){if(X=X.filter(Boolean),X.length>2){let G=X.pop();$+=`one of type ${X.join(", ")}, or ${G}.`}else if(X.length===2)$+=`one of type ${X[0]} or ${X[1]}.`;else $+=`of type ${X[0]}.`;if(Y==null)$+=` Received ${Y}`;else if(typeof Y==="function"&&Y.name)$+=` Received function ${Y.name}`;else if(typeof Y==="object"&&Y!=null){if(Y.constructor?.name)$+=` Received an instance of ${Y.constructor.name}`}return $}var $G1=($,...Y)=>eX1("Key must be ",$,...Y),xK0=($,Y,...X)=>eX1(`Key for the ${$} algorithm must be `,Y,...X);class BA extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor($,Y){super($,Y);this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class FZ extends BA{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor($,Y,X="unspecified",G="unspecified"){super($,{cause:{claim:X,reason:G,payload:Y}});this.claim=X,this.reason=G,this.payload=Y}}class cn extends BA{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor($,Y,X="unspecified",G="unspecified"){super($,{cause:{claim:X,reason:G,payload:Y}});this.claim=X,this.reason=G,this.payload=Y}}class yK0 extends BA{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"}class uJ extends BA{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"}class R5 extends BA{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"}class OL extends BA{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}class bK0 extends BA{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor($="signature verification failed",Y){super($,Y)}}var hK0=($)=>{if($?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return $ instanceof CryptoKey}catch{return!1}},fK0=($)=>$?.[Symbol.toStringTag]==="KeyObject",gK0=($)=>hK0($)||fK0($);var uU5=Symbol();function mK0($,Y){if($)throw TypeError(`${Y} can only be called once`)}function uK0($,Y,X){try{return Hq($)}catch{throw new X(`Failed to base64url decode the ${Y}`)}}var rr4=($)=>typeof $==="object"&&$!==null;function EL($){if(!rr4($)||Object.prototype.toString.call($)!=="[object Object]")return!1;if(Object.getPrototypeOf($)===null)return!0;let Y=$;while(Object.getPrototypeOf(Y)!==null)Y=Object.getPrototypeOf(Y);return Object.getPrototypeOf($)===Y}function ln(...$){let Y=$.filter(Boolean);if(Y.length===0||Y.length===1)return!0;let X;for(let G of Y){let J=Object.keys(G);if(!X||X.size===0){X=new Set(J);continue}for(let Q of J){if(X.has(Q))return!1;X.add(Q)}}return!0}var pk=($)=>EL($)&&typeof $.kty==="string",YG1=($)=>$.kty!=="oct"&&($.kty==="AKP"&&typeof $.priv==="string"||typeof $.d==="string"),XG1=($)=>$.kty!=="oct"&&$.d===void 0&&$.priv===void 0,GG1=($)=>$.kty==="oct"&&typeof $.k==="string";function JG1($,Y){if($.startsWith("RS")||$.startsWith("PS")){let{modulusLength:X}=Y.algorithm;if(typeof X!=="number"||X<2048)throw TypeError(`${$} requires key modulusLength to be 2048 bits or larger`)}}function QG1($,Y){let X=`SHA-${$.slice(-3)}`;switch($){case"HS256":case"HS384":case"HS512":return{hash:X,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:X,name:"RSA-PSS",saltLength:parseInt($.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:X,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:X,name:"ECDSA",namedCurve:Y.namedCurve};case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:$};default:throw new uJ(`alg ${$} is not supported either by JOSE or your javascript runtime`)}}async function WG1($,Y,X){if(Y instanceof Uint8Array){if(!$.startsWith("HS"))throw TypeError($G1(Y,"CryptoKey","KeyObject","JSON Web Key"));return crypto.subtle.importKey("raw",Y,{hash:`SHA-${$.slice(-3)}`,name:"HMAC"},!1,[X])}return tX1(Y,$,X),Y}async function ZG1($,Y,X){let G=await WG1($,Y,"sign");JG1($,G);let J=await crypto.subtle.sign(QG1($,G.algorithm),G,X);return new Uint8Array(J)}async function KG1($,Y,X,G){let J=await WG1($,Y,"verify");JG1($,J);let Q=QG1($,J.algorithm);try{return await crypto.subtle.verify(Q,J,X,G)}catch{return!1}}var nn='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';function sr4($){let Y,X;switch($.kty){case"AKP":{switch($.alg){case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":Y={name:$.alg},X=$.priv?["sign"]:["verify"];break;default:throw new uJ(nn)}break}case"RSA":{switch($.alg){case"PS256":case"PS384":case"PS512":Y={name:"RSA-PSS",hash:`SHA-${$.alg.slice(-3)}`},X=$.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":Y={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${$.alg.slice(-3)}`},X=$.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":Y={name:"RSA-OAEP",hash:`SHA-${parseInt($.alg.slice(-3),10)||1}`},X=$.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new uJ(nn)}break}case"EC":{switch($.alg){case"ES256":case"ES384":case"ES512":Y={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[$.alg]},X=$.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":Y={name:"ECDH",namedCurve:$.crv},X=$.d?["deriveBits"]:[];break;default:throw new uJ(nn)}break}case"OKP":{switch($.alg){case"Ed25519":case"EdDSA":Y={name:"Ed25519"},X=$.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":Y={name:$.crv},X=$.d?["deriveBits"]:[];break;default:throw new uJ(nn)}break}default:throw new uJ('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:Y,keyUsages:X}}async function UG1($){if(!$.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:Y,keyUsages:X}=sr4($),G={...$};if(G.kty!=="AKP")delete G.alg;return delete G.use,crypto.subtle.importKey("jwk",G,Y,$.ext??($.d||$.priv?!1:!0),$.key_ops??X)}var Vq="given KeyObject instance cannot be used for this algorithm",Aq,HG1=async($,Y,X,G=!1)=>{Aq||=new WeakMap;let J=Aq.get($);if(J?.[X])return J[X];let Q=await UG1({...Y,alg:X});if(G)Object.freeze($);if(!J)Aq.set($,{[X]:Q});else J[X]=Q;return Q},or4=($,Y)=>{Aq||=new WeakMap;let X=Aq.get($);if(X?.[Y])return X[Y];let G=$.type==="public",J=G?!0:!1,Q;if($.asymmetricKeyType==="x25519"){switch(Y){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw TypeError(Vq)}Q=$.toCryptoKey($.asymmetricKeyType,J,G?[]:["deriveBits"])}if($.asymmetricKeyType==="ed25519"){if(Y!=="EdDSA"&&Y!=="Ed25519")throw TypeError(Vq);Q=$.toCryptoKey($.asymmetricKeyType,J,[G?"verify":"sign"])}switch($.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":{if(Y!==$.asymmetricKeyType.toUpperCase())throw TypeError(Vq);Q=$.toCryptoKey($.asymmetricKeyType,J,[G?"verify":"sign"])}}if($.asymmetricKeyType==="rsa"){let W;switch(Y){case"RSA-OAEP":W="SHA-1";break;case"RS256":case"PS256":case"RSA-OAEP-256":W="SHA-256";break;case"RS384":case"PS384":case"RSA-OAEP-384":W="SHA-384";break;case"RS512":case"PS512":case"RSA-OAEP-512":W="SHA-512";break;default:throw TypeError(Vq)}if(Y.startsWith("RSA-OAEP"))return $.toCryptoKey({name:"RSA-OAEP",hash:W},J,G?["encrypt"]:["decrypt"]);Q=$.toCryptoKey({name:Y.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:W},J,[G?"verify":"sign"])}if($.asymmetricKeyType==="ec"){let Z=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get($.asymmetricKeyDetails?.namedCurve);if(!Z)throw TypeError(Vq);let K={ES256:"P-256",ES384:"P-384",ES512:"P-521"};if(K[Y]&&Z===K[Y])Q=$.toCryptoKey({name:"ECDSA",namedCurve:Z},J,[G?"verify":"sign"]);if(Y.startsWith("ECDH-ES"))Q=$.toCryptoKey({name:"ECDH",namedCurve:Z},J,G?[]:["deriveBits"])}if(!Q)throw TypeError(Vq);if(!X)Aq.set($,{[Y]:Q});else X[Y]=Q;return Q};async function rn($,Y){if($ instanceof Uint8Array)return $;if(hK0($))return $;if(fK0($)){if($.type==="secret")return $.export();if("toCryptoKey"in $&&typeof $.toCryptoKey==="function")try{return or4($,Y)}catch(G){if(G instanceof TypeError)throw G}let X=$.export({format:"jwk"});return HG1($,X,Y)}if(pk($)){if($.k)return Hq($.k);return HG1($,$,Y,!0)}throw Error("unreachable")}var pK0=($,Y)=>{if($.byteLength!==Y.length)return!1;for(let X=0;X<$.byteLength;X++)if($[X]!==Y[X])return!1;return!0},zG1=($)=>({data:$,pos:0}),ML=($)=>{let Y=$.data[$.pos++];if(Y&128){let X=Y&127,G=0;for(let J=0;J<X;J++)G=G<<8|$.data[$.pos++];return G}return Y};var RL=($,Y,X)=>{if($.data[$.pos++]!==Y)throw Error(X)},VG1=($,Y)=>{let X=$.data.subarray($.pos,$.pos+Y);return $.pos+=Y,X},tr4=($)=>{RL($,6,"Expected algorithm OID");let Y=ML($);return VG1($,Y)};function er4($){RL($,48,"Invalid PKCS#8 structure"),ML($),RL($,2,"Expected version field");let Y=ML($);$.pos+=Y,RL($,48,"Expected algorithm identifier");let X=ML($);return{algIdStart:$.pos,algIdLength:X}}function $a4($){RL($,48,"Invalid SPKI structure"),ML($),RL($,48,"Expected algorithm identifier");let Y=ML($);return{algIdStart:$.pos,algIdLength:Y}}var AG1=($)=>{let Y=tr4($);if(pK0(Y,[43,101,110]))return"X25519";if(!pK0(Y,[42,134,72,206,61,2,1]))throw Error("Unsupported key algorithm");RL($,6,"Expected curve OID");let X=ML($),G=VG1($,X);for(let{name:J,oid:Q}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(pK0(G,Q))return J;throw Error("Unsupported named curve")},FG1=async($,Y,X,G)=>{let J,Q,W=$==="spki",Z=()=>W?["verify"]:["sign"],K=()=>W?["encrypt","wrapKey"]:["decrypt","unwrapKey"];switch(X){case"PS256":case"PS384":case"PS512":J={name:"RSA-PSS",hash:`SHA-${X.slice(-3)}`},Q=Z();break;case"RS256":case"RS384":case"RS512":J={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${X.slice(-3)}`},Q=Z();break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":J={name:"RSA-OAEP",hash:`SHA-${parseInt(X.slice(-3),10)||1}`},Q=K();break;case"ES256":case"ES384":case"ES512":{J={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[X]},Q=Z();break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{try{let H=G.getNamedCurve(Y);J=H==="X25519"?{name:"X25519"}:{name:"ECDH",namedCurve:H}}catch(H){throw new uJ("Invalid or unsupported key format")}Q=W?[]:["deriveBits"];break}case"Ed25519":case"EdDSA":J={name:"Ed25519"},Q=Z();break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":J={name:X},Q=Z();break;default:throw new uJ('Invalid or unsupported "alg" (Algorithm) value')}return crypto.subtle.importKey($,Y,J,G?.extractable??(W?!0:!1),Q)},DG1=($,Y)=>{return pn($.replace(Y,""))},NG1=($,Y,X)=>{let G=DG1($,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),J=X;if(Y?.startsWith?.("ECDH-ES"))J||={},J.getNamedCurve=(Q)=>{let W=zG1(Q);return er4(W),AG1(W)};return FG1("pkcs8",G,Y,J)},LG1=($,Y,X)=>{let G=DG1($,/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g),J=X;if(Y?.startsWith?.("ECDH-ES"))J||={},J.getNamedCurve=(Q)=>{let W=zG1(Q);return $a4(W),AG1(W)};return FG1("spki",G,Y,J)};async function dK0($,Y,X){if(typeof $!=="string"||$.indexOf("-----BEGIN PUBLIC KEY-----")!==0)throw TypeError('"spki" must be SPKI formatted string');return LG1($,Y,X)}async function cK0($,Y,X){if(typeof $!=="string"||$.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw TypeError('"pkcs8" must be PKCS#8 formatted string');return NG1($,Y,X)}function an($,Y,X,G,J){if(J.crit!==void 0&&G?.crit===void 0)throw new $('"crit" (Critical) Header Parameter MUST be integrity protected');if(!G||G.crit===void 0)return new Set;if(!Array.isArray(G.crit)||G.crit.length===0||G.crit.some((W)=>typeof W!=="string"||W.length===0))throw new $('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let Q;if(X!==void 0)Q=new Map([...Object.entries(X),...Y.entries()]);else Q=Y;for(let W of G.crit){if(!Q.has(W))throw new uJ(`Extension Header Parameter "${W}" is not recognized`);if(J[W]===void 0)throw new $(`Extension Header Parameter "${W}" is missing`);if(Q.get(W)&&G[W]===void 0)throw new $(`Extension Header Parameter "${W}" MUST be integrity protected`)}return new Set(G.crit)}function BG1($,Y){if(Y!==void 0&&(!Array.isArray(Y)||Y.some((X)=>typeof X!=="string")))throw TypeError(`"${$}" option must be an array of strings`);if(!Y)return;return new Set(Y)}var Fq=($)=>$?.[Symbol.toStringTag],lK0=($,Y,X)=>{if(Y.use!==void 0){let G;switch(X){case"sign":case"verify":G="sig";break;case"encrypt":case"decrypt":G="enc";break}if(Y.use!==G)throw TypeError(`Invalid key for this operation, its "use" must be "${G}" when present`)}if(Y.alg!==void 0&&Y.alg!==$)throw TypeError(`Invalid key for this operation, its "alg" must be "${$}" when present`);if(Array.isArray(Y.key_ops)){let G;switch(!0){case(X==="sign"||X==="verify"):case $==="dir":case $.includes("CBC-HS"):G=X;break;case $.startsWith("PBES2"):G="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test($):if(!$.includes("GCM")&&$.endsWith("KW"))G=X==="encrypt"?"wrapKey":"unwrapKey";else G=X;break;case(X==="encrypt"&&$.startsWith("RSA")):G="wrapKey";break;case X==="decrypt":G=$.startsWith("RSA")?"unwrapKey":"deriveBits";break}if(G&&Y.key_ops?.includes?.(G)===!1)throw TypeError(`Invalid key for this operation, its "key_ops" must include "${G}" when present`)}return!0},Ya4=($,Y,X)=>{if(Y instanceof Uint8Array)return;if(pk(Y)){if(GG1(Y)&&lK0($,Y,X))return;throw TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!gK0(Y))throw TypeError(xK0($,Y,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if(Y.type!=="secret")throw TypeError(`${Fq(Y)} instances for symmetric algorithms must be of type "secret"`)},Xa4=($,Y,X)=>{if(pk(Y))switch(X){case"decrypt":case"sign":if(YG1(Y)&&lK0($,Y,X))return;throw TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if(XG1(Y)&&lK0($,Y,X))return;throw TypeError("JSON Web Key for this operation must be a public JWK")}if(!gK0(Y))throw TypeError(xK0($,Y,"CryptoKey","KeyObject","JSON Web Key"));if(Y.type==="secret")throw TypeError(`${Fq(Y)} instances for asymmetric algorithms must not be of type "secret"`);if(Y.type==="public")switch(X){case"sign":throw TypeError(`${Fq(Y)} instances for asymmetric algorithm signing must be of type "private"`);case"decrypt":throw TypeError(`${Fq(Y)} instances for asymmetric algorithm decryption must be of type "private"`)}if(Y.type==="private")switch(X){case"verify":throw TypeError(`${Fq(Y)} instances for asymmetric algorithm verifying must be of type "public"`);case"encrypt":throw TypeError(`${Fq(Y)} instances for asymmetric algorithm encryption must be of type "public"`)}};function sn($,Y,X){switch($.substring(0,2)){case"A1":case"A2":case"di":case"HS":case"PB":Ya4($,Y,X);break;default:Xa4($,Y,X)}}async function OG1($,Y,X){if(!EL($))throw new R5("Flattened JWS must be an object");if($.protected===void 0&&$.header===void 0)throw new R5('Flattened JWS must have either of the "protected" or "header" members');if($.protected!==void 0&&typeof $.protected!=="string")throw new R5("JWS Protected Header incorrect type");if($.payload===void 0)throw new R5("JWS Payload missing");if(typeof $.signature!=="string")throw new R5("JWS Signature missing or incorrect type");if($.header!==void 0&&!EL($.header))throw new R5("JWS Unprotected Header incorrect type");let G={};if($.protected)try{let L=Hq($.protected);G=JSON.parse(lH.decode(L))}catch{throw new R5("JWS Protected Header is invalid")}if(!ln(G,$.header))throw new R5("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let J={...G,...$.header},Q=an(R5,new Map([["b64",!0]]),X?.crit,G,J),W=!0;if(Q.has("b64")){if(W=G.b64,typeof W!=="boolean")throw new R5('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}let{alg:Z}=J;if(typeof Z!=="string"||!Z)throw new R5('JWS "alg" (Algorithm) Header Parameter missing or invalid');let K=X&&BG1("algorithms",X.algorithms);if(K&&!K.has(Z))throw new yK0('"alg" (Algorithm) Header Parameter value not allowed');if(W){if(typeof $.payload!=="string")throw new R5("JWS Payload must be a string")}else if(typeof $.payload!=="string"&&!($.payload instanceof Uint8Array))throw new R5("JWS Payload must be a string or an Uint8Array instance");let H=!1;if(typeof Y==="function")Y=await Y(G,$),H=!0;sn(Z,Y,"verify");let z=un($.protected!==void 0?NA($.protected):new Uint8Array,NA("."),typeof $.payload==="string"?W?NA($.payload):BL.encode($.payload):$.payload),V=uK0($.signature,"signature",R5),A=await rn(Y,Z);if(!await KG1(Z,A,V,z))throw new bK0;let N;if(W)N=uK0($.payload,"payload",R5);else if(typeof $.payload==="string")N=BL.encode($.payload);else N=$.payload;let D={payload:N};if($.protected!==void 0)D.protectedHeader=G;if($.header!==void 0)D.unprotectedHeader=$.header;if(H)return{...D,key:A};return D}async function EG1($,Y,X){if($ instanceof Uint8Array)$=lH.decode($);if(typeof $!=="string")throw new R5("Compact JWS must be a string or Uint8Array");let{0:G,1:J,2:Q,length:W}=$.split(".");if(W!==3)throw new R5("Invalid Compact JWS");let Z=await OG1({payload:J,protected:G,signature:Q},Y,X),K={payload:Z.payload,protectedHeader:Z.protectedHeader};if(typeof Y==="function")return{...K,key:Z.key};return K}var OA=($)=>Math.floor($.getTime()/1000),RG1=60,qG1=RG1*60,iK0=qG1*24,Ga4=iK0*7,Ja4=iK0*365.25,Qa4=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function dk($){let Y=Qa4.exec($);if(!Y||Y[4]&&Y[1])throw TypeError("Invalid time period format");let X=parseFloat(Y[2]),G=Y[3].toLowerCase(),J;switch(G){case"sec":case"secs":case"second":case"seconds":case"s":J=Math.round(X);break;case"minute":case"minutes":case"min":case"mins":case"m":J=Math.round(X*RG1);break;case"hour":case"hours":case"hr":case"hrs":case"h":J=Math.round(X*qG1);break;case"day":case"days":case"d":J=Math.round(X*iK0);break;case"week":case"weeks":case"w":J=Math.round(X*Ga4);break;default:J=Math.round(X*Ja4);break}if(Y[1]==="-"||Y[4]==="ago")return-J;return J}function qL($,Y){if(!Number.isFinite(Y))throw TypeError(`Invalid ${$} input`);return Y}var MG1=($)=>{if($.includes("/"))return $.toLowerCase();return`application/${$.toLowerCase()}`},Wa4=($,Y)=>{if(typeof $==="string")return Y.includes($);if(Array.isArray($))return Y.some(Set.prototype.has.bind(new Set($)));return!1};function IG1($,Y,X={}){let G;try{G=JSON.parse(lH.decode(Y))}catch{}if(!EL(G))throw new OL("JWT Claims Set must be a top-level JSON object");let{typ:J}=X;if(J&&(typeof $.typ!=="string"||MG1($.typ)!==MG1(J)))throw new FZ('unexpected "typ" JWT header value',G,"typ","check_failed");let{requiredClaims:Q=[],issuer:W,subject:Z,audience:K,maxTokenAge:H}=X,z=[...Q];if(H!==void 0)z.push("iat");if(K!==void 0)z.push("aud");if(Z!==void 0)z.push("sub");if(W!==void 0)z.push("iss");for(let N of new Set(z.reverse()))if(!(N in G))throw new FZ(`missing required "${N}" claim`,G,N,"missing");if(W&&!(Array.isArray(W)?W:[W]).includes(G.iss))throw new FZ('unexpected "iss" claim value',G,"iss","check_failed");if(Z&&G.sub!==Z)throw new FZ('unexpected "sub" claim value',G,"sub","check_failed");if(K&&!Wa4(G.aud,typeof K==="string"?[K]:K))throw new FZ('unexpected "aud" claim value',G,"aud","check_failed");let V;switch(typeof X.clockTolerance){case"string":V=dk(X.clockTolerance);break;case"number":V=X.clockTolerance;break;case"undefined":V=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:A}=X,F=OA(A||new Date);if((G.iat!==void 0||H)&&typeof G.iat!=="number")throw new FZ('"iat" claim must be a number',G,"iat","invalid");if(G.nbf!==void 0){if(typeof G.nbf!=="number")throw new FZ('"nbf" claim must be a number',G,"nbf","invalid");if(G.nbf>F+V)throw new FZ('"nbf" claim timestamp check failed',G,"nbf","check_failed")}if(G.exp!==void 0){if(typeof G.exp!=="number")throw new FZ('"exp" claim must be a number',G,"exp","invalid");if(G.exp<=F-V)throw new cn('"exp" claim timestamp check failed',G,"exp","check_failed")}if(H){let N=F-G.iat,D=typeof H==="number"?H:dk(H);if(N-V>D)throw new cn('"iat" claim timestamp check failed (too far in the past)',G,"iat","check_failed");if(N<0-V)throw new FZ('"iat" claim timestamp check failed (it should be in the past)',G,"iat","check_failed")}return G}class nK0{#$;constructor($){if(!EL($))throw TypeError("JWT Claims Set MUST be an object");this.#$=structuredClone($)}data(){return BL.encode(JSON.stringify(this.#$))}get iss(){return this.#$.iss}set iss($){this.#$.iss=$}get sub(){return this.#$.sub}set sub($){this.#$.sub=$}get aud(){return this.#$.aud}set aud($){this.#$.aud=$}set jti($){this.#$.jti=$}set nbf($){if(typeof $==="number")this.#$.nbf=qL("setNotBefore",$);else if($ instanceof Date)this.#$.nbf=qL("setNotBefore",OA($));else this.#$.nbf=OA(new Date)+dk($)}set exp($){if(typeof $==="number")this.#$.exp=qL("setExpirationTime",$);else if($ instanceof Date)this.#$.exp=qL("setExpirationTime",OA($));else this.#$.exp=OA(new Date)+dk($)}set iat($){if($===void 0)this.#$.iat=OA(new Date);else if($ instanceof Date)this.#$.iat=qL("setIssuedAt",OA($));else if(typeof $==="string")this.#$.iat=qL("setIssuedAt",OA(new Date)+dk($));else this.#$.iat=qL("setIssuedAt",$)}}async function rK0($,Y,X){let G=await EG1($,Y,X);if(G.protectedHeader.crit?.includes("b64")&&G.protectedHeader.b64===!1)throw new OL("JWTs MUST NOT use unencoded payload");let Q={payload:IG1(G.protectedHeader,G.payload,X),protectedHeader:G.protectedHeader};if(typeof Y==="function")return{...Q,key:G.key};return Q}class aK0{#$;#Y;#X;constructor($){if(!($ instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this.#$=$}setProtectedHeader($){return mK0(this.#Y,"setProtectedHeader"),this.#Y=$,this}setUnprotectedHeader($){return mK0(this.#X,"setUnprotectedHeader"),this.#X=$,this}async sign($,Y){if(!this.#Y&&!this.#X)throw new R5("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!ln(this.#Y,this.#X))throw new R5("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let X={...this.#Y,...this.#X},G=an(R5,new Map([["b64",!0]]),Y?.crit,this.#Y,X),J=!0;if(G.has("b64")){if(J=this.#Y.b64,typeof J!=="boolean")throw new R5('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}let{alg:Q}=X;if(typeof Q!=="string"||!Q)throw new R5('JWS "alg" (Algorithm) Header Parameter missing or invalid');sn(Q,$,"sign");let W,Z;if(J)W=dn(this.#$),Z=NA(W);else Z=this.#$,W="";let K,H;if(this.#Y)K=dn(JSON.stringify(this.#Y)),H=NA(K);else K="",H=new Uint8Array;let z=un(H,NA("."),Z),V=await rn($,Q),A=await ZG1(Q,V,z),F={signature:dn(A),payload:W};if(this.#X)F.header=this.#X;if(this.#Y)F.protected=K;return F}}class sK0{#$;constructor($){this.#$=new aK0($)}setProtectedHeader($){return this.#$.setProtectedHeader($),this}async sign($,Y){let X=await this.#$.sign($,Y);if(X.payload===void 0)throw TypeError("use the flattened module for creating JWS with b64: false");return`${X.protected}.${X.payload}.${X.signature}`}}class on{#$;#Y;constructor($={}){this.#Y=new nK0($)}setIssuer($){return this.#Y.iss=$,this}setSubject($){return this.#Y.sub=$,this}setAudience($){return this.#Y.aud=$,this}setJti($){return this.#Y.jti=$,this}setNotBefore($){return this.#Y.nbf=$,this}setExpirationTime($){return this.#Y.exp=$,this}setIssuedAt($){return this.#Y.iat=$,this}setProtectedHeader($){return this.#$=$,this}async sign($,Y){let X=new sK0(this.#Y.data());if(X.setProtectedHeader(this.#$),Array.isArray(this.#$?.crit)&&this.#$.crit.includes("b64")&&this.#$.b64===!1)throw new OL("JWTs MUST NOT use unencoded payload");return X.sign($,Y)}}var nk={};nk.userAgent=!1;var Dq={};/*! CryptoJS v3.1.2 core-fix.js
 * code.google.com/p/crypto-js
 * (c) 2009-2013 by Jeff Mott. All rights reserved.
 * code.google.com/p/crypto-js/wiki/License
 * THIS IS FIX of 'core.js' to fix Hmac issue.
 * https://code.google.com/p/crypto-js/issues/detail?id=84
 * https://crypto-js.googlecode.com/svn-history/r667/branches/3.x/src/core.js
 */var y1=y1||function($,Y){var X={},G=X.lib={},J=G.Base=function(){function F(){}return{extend:function(N){F.prototype=this;var D=new F;if(N)D.mixIn(N);if(!D.hasOwnProperty("init"))D.init=function(){D.$super.init.apply(this,arguments)};return D.init.prototype=D,D.$super=this,D},create:function(){var N=this.extend();return N.init.apply(N,arguments),N},init:function(){},mixIn:function(N){for(var D in N)if(N.hasOwnProperty(D))this[D]=N[D];if(N.hasOwnProperty("toString"))this.toString=N.toString},clone:function(){return this.init.prototype.extend(this)}}}(),Q=G.WordArray=J.extend({init:function(F,N){if(F=this.words=F||[],N!=Y)this.sigBytes=N;else this.sigBytes=F.length*4},toString:function(F){return(F||Z).stringify(this)},concat:function(F){var N=this.words,D=F.words,L=this.sigBytes,B=F.sigBytes;if(this.clamp(),L%4)for(var O=0;O<B;O++){var E=D[O>>>2]>>>24-O%4*8&255;N[L+O>>>2]|=E<<24-(L+O)%4*8}else for(var O=0;O<B;O+=4)N[L+O>>>2]=D[O>>>2];return this.sigBytes+=B,this},clamp:function(){var F=this.words,N=this.sigBytes;F[N>>>2]&=4294967295<<32-N%4*8,F.length=$.ceil(N/4)},clone:function(){var F=J.clone.call(this);return F.words=this.words.slice(0),F},random:function(F){var N=[];for(var D=0;D<F;D+=4)N.push($.random()*4294967296|0);return new Q.init(N,F)}}),W=X.enc={},Z=W.Hex={stringify:function(F){var{words:N,sigBytes:D}=F,L=[];for(var B=0;B<D;B++){var O=N[B>>>2]>>>24-B%4*8&255;L.push((O>>>4).toString(16)),L.push((O&15).toString(16))}return L.join("")},parse:function(F){var N=F.length,D=[];for(var L=0;L<N;L+=2)D[L>>>3]|=parseInt(F.substr(L,2),16)<<24-L%8*4;return new Q.init(D,N/2)}},K=W.Latin1={stringify:function(F){var{words:N,sigBytes:D}=F,L=[];for(var B=0;B<D;B++){var O=N[B>>>2]>>>24-B%4*8&255;L.push(String.fromCharCode(O))}return L.join("")},parse:function(F){var N=F.length,D=[];for(var L=0;L<N;L++)D[L>>>2]|=(F.charCodeAt(L)&255)<<24-L%4*8;return new Q.init(D,N)}},H=W.Utf8={stringify:function(F){try{return decodeURIComponent(escape(K.stringify(F)))}catch(N){throw Error("Malformed UTF-8 data")}},parse:function(F){return K.parse(unescape(encodeURIComponent(F)))}},z=G.BufferedBlockAlgorithm=J.extend({reset:function(){this._data=new Q.init,this._nDataBytes=0},_append:function(F){if(typeof F=="string")F=H.parse(F);this._data.concat(F),this._nDataBytes+=F.sigBytes},_process:function(F){var N=this._data,D=N.words,L=N.sigBytes,B=this.blockSize,O=B*4,E=L/O;if(F)E=$.ceil(E);else E=$.max((E|0)-this._minBufferSize,0);var M=E*B,R=$.min(M*4,L);if(M){for(var q=0;q<M;q+=B)this._doProcessBlock(D,q);var w=D.splice(0,M);N.sigBytes-=R}return new Q.init(w,R)},clone:function(){var F=J.clone.call(this);return F._data=this._data.clone(),F},_minBufferSize:0}),V=G.Hasher=z.extend({cfg:J.extend(),init:function(F){this.cfg=this.cfg.extend(F),this.reset()},reset:function(){z.reset.call(this),this._doReset()},update:function(F){return this._append(F),this._process(),this},finalize:function(F){if(F)this._append(F);var N=this._doFinalize();return N},blockSize:16,_createHelper:function(F){return function(N,D){return new F.init(D).finalize(N)}},_createHmacHelper:function(F){return function(N,D){return new A.HMAC.init(F,D).finalize(N)}}}),A=X.algo={};return X}(Math);(function($){var J=y1,Y=J.lib,X=Y.Base,G=Y.WordArray,J=J.x64={};J.Word=X.extend({init:function(Q,W){this.high=Q,this.low=W}}),J.WordArray=X.extend({init:function(Q,W){Q=this.words=Q||[],this.sigBytes=W!=$?W:8*Q.length},toX32:function(){for(var Q=this.words,W=Q.length,Z=[],K=0;K<W;K++){var H=Q[K];Z.push(H.high),Z.push(H.low)}return G.create(Z,this.sigBytes)},clone:function(){for(var Q=X.clone.call(this),W=Q.words=this.words.slice(0),Z=W.length,K=0;K<Z;K++)W[K]=W[K].clone();return Q}})})();y1.lib.Cipher||function($){var F=y1,Y=F.lib,X=Y.Base,G=Y.WordArray,J=Y.BufferedBlockAlgorithm,Q=F.enc.Base64,W=F.algo.EvpKDF,Z=Y.Cipher=J.extend({cfg:X.extend(),createEncryptor:function(D,L){return this.create(this._ENC_XFORM_MODE,D,L)},createDecryptor:function(D,L){return this.create(this._DEC_XFORM_MODE,D,L)},init:function(D,L,B){this.cfg=this.cfg.extend(B),this._xformMode=D,this._key=L,this.reset()},reset:function(){J.reset.call(this),this._doReset()},process:function(D){return this._append(D),this._process()},finalize:function(D){return D&&this._append(D),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(D){return{encrypt:function(L,B,O){return(typeof B=="string"?N:A).encrypt(D,L,B,O)},decrypt:function(L,B,O){return(typeof B=="string"?N:A).decrypt(D,L,B,O)}}}});Y.StreamCipher=Z.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var V=F.mode={},K=function(D,L,B){var O=this._iv;O?this._iv=$:O=this._prevBlock;for(var E=0;E<B;E++)D[L+E]^=O[E]},H=(Y.BlockCipherMode=X.extend({createEncryptor:function(D,L){return this.Encryptor.create(D,L)},createDecryptor:function(D,L){return this.Decryptor.create(D,L)},init:function(D,L){this._cipher=D,this._iv=L}})).extend();H.Encryptor=H.extend({processBlock:function(D,L){var B=this._cipher,O=B.blockSize;K.call(this,D,L,O),B.encryptBlock(D,L),this._prevBlock=D.slice(L,L+O)}}),H.Decryptor=H.extend({processBlock:function(D,L){var B=this._cipher,O=B.blockSize,E=D.slice(L,L+O);B.decryptBlock(D,L),K.call(this,D,L,O),this._prevBlock=E}}),V=V.CBC=H,H=(F.pad={}).Pkcs7={pad:function(D,L){for(var B=4*L,B=B-D.sigBytes%B,O=B<<24|B<<16|B<<8|B,E=[],M=0;M<B;M+=4)E.push(O);B=G.create(E,B),D.concat(B)},unpad:function(D){D.sigBytes-=D.words[D.sigBytes-1>>>2]&255}},Y.BlockCipher=Z.extend({cfg:Z.cfg.extend({mode:V,padding:H}),reset:function(){Z.reset.call(this);var L=this.cfg,D=L.iv,L=L.mode;if(this._xformMode==this._ENC_XFORM_MODE)var B=L.createEncryptor;else B=L.createDecryptor,this._minBufferSize=1;this._mode=B.call(L,this,D&&D.words)},_doProcessBlock:function(D,L){this._mode.processBlock(D,L)},_doFinalize:function(){var D=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){D.pad(this._data,this.blockSize);var L=this._process(!0)}else L=this._process(!0),D.unpad(L);return L},blockSize:4});var z=Y.CipherParams=X.extend({init:function(D){this.mixIn(D)},toString:function(D){return(D||this.formatter).stringify(this)}}),V=(F.format={}).OpenSSL={stringify:function(D){var L=D.ciphertext;return D=D.salt,(D?G.create([1398893684,1701076831]).concat(D).concat(L):L).toString(Q)},parse:function(D){D=Q.parse(D);var L=D.words;if(L[0]==1398893684&&L[1]==1701076831){var B=G.create(L.slice(2,4));L.splice(0,4),D.sigBytes-=16}return z.create({ciphertext:D,salt:B})}},A=Y.SerializableCipher=X.extend({cfg:X.extend({format:V}),encrypt:function(D,L,B,O){O=this.cfg.extend(O);var E=D.createEncryptor(B,O);return L=E.finalize(L),E=E.cfg,z.create({ciphertext:L,key:B,iv:E.iv,algorithm:D,mode:E.mode,padding:E.padding,blockSize:D.blockSize,formatter:O.format})},decrypt:function(D,L,B,O){return O=this.cfg.extend(O),L=this._parse(L,O.format),D.createDecryptor(B,O).finalize(L.ciphertext)},_parse:function(D,L){return typeof D=="string"?L.parse(D,this):D}}),F=(F.kdf={}).OpenSSL={execute:function(D,L,B,O){return O||(O=G.random(8)),D=W.create({keySize:L+B}).compute(D,O),B=G.create(D.words.slice(L),4*B),D.sigBytes=4*L,z.create({key:D,iv:B,salt:O})}},N=Y.PasswordBasedCipher=A.extend({cfg:A.cfg.extend({kdf:F}),encrypt:function(D,L,B,O){return O=this.cfg.extend(O),B=O.kdf.execute(B,D.keySize,D.ivSize),O.iv=B.iv,D=A.encrypt.call(this,D,L,B.key,O),D.mixIn(B),D},decrypt:function(D,L,B,O){return O=this.cfg.extend(O),L=this._parse(L,O.format),B=O.kdf.execute(B,D.keySize,D.ivSize,L.salt),O.iv=B.iv,A.decrypt.call(this,D,L,B.key,O)}})}();(function(){for(var $=y1,Y=$.lib.BlockCipher,q=$.algo,X=[],G=[],J=[],Q=[],W=[],Z=[],K=[],H=[],z=[],V=[],A=[],F=0;256>F;F++)A[F]=128>F?F<<1:F<<1^283;for(var N=0,D=0,F=0;256>F;F++){var L=D^D<<1^D<<2^D<<3^D<<4,L=L>>>8^L&255^99;X[N]=L,G[L]=N;var B=A[N],O=A[B],E=A[O],M=257*A[L]^16843008*L;J[N]=M<<24|M>>>8,Q[N]=M<<16|M>>>16,W[N]=M<<8|M>>>24,Z[N]=M,M=16843009*E^65537*O^257*B^16843008*N,K[L]=M<<24|M>>>8,H[L]=M<<16|M>>>16,z[L]=M<<8|M>>>24,V[L]=M,N?(N=B^A[A[A[E^B]]],D^=A[A[D]]):N=D=1}var R=[0,1,2,4,8,16,32,64,128,27,54],q=q.AES=Y.extend({_doReset:function(){for(var P=this._key,w=P.words,I=P.sigBytes/4,P=4*((this._nRounds=I+6)+1),_=this._keySchedule=[],C=0;C<P;C++)if(C<I)_[C]=w[C];else{var k=_[C-1];C%I?6<I&&C%I==4&&(k=X[k>>>24]<<24|X[k>>>16&255]<<16|X[k>>>8&255]<<8|X[k&255]):(k=k<<8|k>>>24,k=X[k>>>24]<<24|X[k>>>16&255]<<16|X[k>>>8&255]<<8|X[k&255],k^=R[C/I|0]<<24),_[C]=_[C-I]^k}w=this._invKeySchedule=[];for(I=0;I<P;I++)C=P-I,k=I%4?_[C]:_[C-4],w[I]=4>I||4>=C?k:K[X[k>>>24]]^H[X[k>>>16&255]]^z[X[k>>>8&255]]^V[X[k&255]]},encryptBlock:function(w,I){this._doCryptBlock(w,I,this._keySchedule,J,Q,W,Z,X)},decryptBlock:function(w,I){var P=w[I+1];w[I+1]=w[I+3],w[I+3]=P,this._doCryptBlock(w,I,this._invKeySchedule,K,H,z,V,G),P=w[I+1],w[I+1]=w[I+3],w[I+3]=P},_doCryptBlock:function(w,I,P,_,C,k,S,T){for(var v=this._nRounds,p=w[I]^P[0],h=w[I+1]^P[1],n=w[I+2]^P[2],g=w[I+3]^P[3],x=4,y=1;y<v;y++)var d=_[p>>>24]^C[h>>>16&255]^k[n>>>8&255]^S[g&255]^P[x++],u=_[h>>>24]^C[n>>>16&255]^k[g>>>8&255]^S[p&255]^P[x++],b=_[n>>>24]^C[g>>>16&255]^k[p>>>8&255]^S[h&255]^P[x++],g=_[g>>>24]^C[p>>>16&255]^k[h>>>8&255]^S[n&255]^P[x++],p=d,h=u,n=b;d=(T[p>>>24]<<24|T[h>>>16&255]<<16|T[n>>>8&255]<<8|T[g&255])^P[x++],u=(T[h>>>24]<<24|T[n>>>16&255]<<16|T[g>>>8&255]<<8|T[p&255])^P[x++],b=(T[n>>>24]<<24|T[g>>>16&255]<<16|T[p>>>8&255]<<8|T[h&255])^P[x++],g=(T[g>>>24]<<24|T[p>>>16&255]<<16|T[h>>>8&255]<<8|T[n&255])^P[x++],w[I]=d,w[I+1]=u,w[I+2]=b,w[I+3]=g},keySize:8});$.AES=Y._createHelper(q)})();(function(){function $(A,F){var N=(this._lBlock>>>A^this._rBlock)&F;this._rBlock^=N,this._lBlock^=N<<A}function Y(A,F){var N=(this._rBlock>>>A^this._lBlock)&F;this._lBlock^=N,this._rBlock^=N<<A}var X=y1,J=X.lib,G=J.WordArray,J=J.BlockCipher,Q=X.algo,W=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],Z=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],K=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],H=[{"0":8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{"0":1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{"0":260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{"0":2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{"0":128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{"0":268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{"0":1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{"0":134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],z=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],V=Q.DES=J.extend({_doReset:function(){for(var A=this._key.words,F=[],N=0;56>N;N++){var D=W[N]-1;F[N]=A[D>>>5]>>>31-D%32&1}A=this._subKeys=[];for(D=0;16>D;D++){for(var L=A[D]=[],B=K[D],N=0;24>N;N++)L[N/6|0]|=F[(Z[N]-1+B)%28]<<31-N%6,L[4+(N/6|0)]|=F[28+(Z[N+24]-1+B)%28]<<31-N%6;L[0]=L[0]<<1|L[0]>>>31;for(N=1;7>N;N++)L[N]>>>=4*(N-1)+3;L[7]=L[7]<<5|L[7]>>>27}F=this._invSubKeys=[];for(N=0;16>N;N++)F[N]=A[15-N]},encryptBlock:function(A,F){this._doCryptBlock(A,F,this._subKeys)},decryptBlock:function(A,F){this._doCryptBlock(A,F,this._invSubKeys)},_doCryptBlock:function(A,F,N){this._lBlock=A[F],this._rBlock=A[F+1],$.call(this,4,252645135),$.call(this,16,65535),Y.call(this,2,858993459),Y.call(this,8,16711935),$.call(this,1,1431655765);for(var D=0;16>D;D++){for(var L=N[D],B=this._lBlock,O=this._rBlock,E=0,M=0;8>M;M++)E|=H[M][((O^L[M])&z[M])>>>0];this._lBlock=O,this._rBlock=B^E}N=this._lBlock,this._lBlock=this._rBlock,this._rBlock=N,$.call(this,1,1431655765),Y.call(this,8,16711935),Y.call(this,2,858993459),$.call(this,16,65535),$.call(this,4,252645135),A[F]=this._lBlock,A[F+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});X.DES=J._createHelper(V),Q=Q.TripleDES=J.extend({_doReset:function(){var A=this._key.words;this._des1=V.createEncryptor(G.create(A.slice(0,2))),this._des2=V.createEncryptor(G.create(A.slice(2,4))),this._des3=V.createEncryptor(G.create(A.slice(4,6)))},encryptBlock:function(A,F){this._des1.encryptBlock(A,F),this._des2.decryptBlock(A,F),this._des3.encryptBlock(A,F)},decryptBlock:function(A,F){this._des3.decryptBlock(A,F),this._des2.encryptBlock(A,F),this._des1.decryptBlock(A,F)},keySize:6,ivSize:2,blockSize:2}),X.TripleDES=J._createHelper(Q)})();(function(){var $=y1,Y=$.lib.WordArray;$.enc.Base64={stringify:function(X){var{words:G,sigBytes:J}=X,Q=this._map;X.clamp(),X=[];for(var W=0;W<J;W+=3)for(var Z=(G[W>>>2]>>>24-8*(W%4)&255)<<16|(G[W+1>>>2]>>>24-8*((W+1)%4)&255)<<8|G[W+2>>>2]>>>24-8*((W+2)%4)&255,K=0;4>K&&W+0.75*K<J;K++)X.push(Q.charAt(Z>>>6*(3-K)&63));if(G=Q.charAt(64))for(;X.length%4;)X.push(G);return X.join("")},parse:function(X){var G=X.length,J=this._map,Q=J.charAt(64);Q&&(Q=X.indexOf(Q),Q!=-1&&(G=Q));for(var Q=[],W=0,Z=0;Z<G;Z++)if(Z%4){var K=J.indexOf(X.charAt(Z-1))<<2*(Z%4),H=J.indexOf(X.charAt(Z))>>>6-2*(Z%4);Q[W>>>2]|=(K|H)<<24-8*(W%4),W++}return Y.create(Q,W)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();(function($){function Y(V,A,F,N,D,L,B){return V=V+(A&F|~A&N)+D+B,(V<<L|V>>>32-L)+A}function X(V,A,F,N,D,L,B){return V=V+(A&N|F&~N)+D+B,(V<<L|V>>>32-L)+A}function G(V,A,F,N,D,L,B){return V=V+(A^F^N)+D+B,(V<<L|V>>>32-L)+A}function J(V,A,F,N,D,L,B){return V=V+(F^(A|~N))+D+B,(V<<L|V>>>32-L)+A}for(var Q=y1,K=Q.lib,W=K.WordArray,Z=K.Hasher,K=Q.algo,H=[],z=0;64>z;z++)H[z]=4294967296*$.abs($.sin(z+1))|0;K=K.MD5=Z.extend({_doReset:function(){this._hash=new W.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(V,A){for(var F=0;16>F;F++){var N=A+F,D=V[N];V[N]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}var F=this._hash.words,N=V[A+0],D=V[A+1],L=V[A+2],B=V[A+3],O=V[A+4],E=V[A+5],M=V[A+6],R=V[A+7],q=V[A+8],w=V[A+9],I=V[A+10],P=V[A+11],_=V[A+12],C=V[A+13],k=V[A+14],S=V[A+15],T=F[0],y=F[1],x=F[2],v=F[3],T=Y(T,y,x,v,N,7,H[0]),v=Y(v,T,y,x,D,12,H[1]),x=Y(x,v,T,y,L,17,H[2]),y=Y(y,x,v,T,B,22,H[3]),T=Y(T,y,x,v,O,7,H[4]),v=Y(v,T,y,x,E,12,H[5]),x=Y(x,v,T,y,M,17,H[6]),y=Y(y,x,v,T,R,22,H[7]),T=Y(T,y,x,v,q,7,H[8]),v=Y(v,T,y,x,w,12,H[9]),x=Y(x,v,T,y,I,17,H[10]),y=Y(y,x,v,T,P,22,H[11]),T=Y(T,y,x,v,_,7,H[12]),v=Y(v,T,y,x,C,12,H[13]),x=Y(x,v,T,y,k,17,H[14]),y=Y(y,x,v,T,S,22,H[15]),T=X(T,y,x,v,D,5,H[16]),v=X(v,T,y,x,M,9,H[17]),x=X(x,v,T,y,P,14,H[18]),y=X(y,x,v,T,N,20,H[19]),T=X(T,y,x,v,E,5,H[20]),v=X(v,T,y,x,I,9,H[21]),x=X(x,v,T,y,S,14,H[22]),y=X(y,x,v,T,O,20,H[23]),T=X(T,y,x,v,w,5,H[24]),v=X(v,T,y,x,k,9,H[25]),x=X(x,v,T,y,B,14,H[26]),y=X(y,x,v,T,q,20,H[27]),T=X(T,y,x,v,C,5,H[28]),v=X(v,T,y,x,L,9,H[29]),x=X(x,v,T,y,R,14,H[30]),y=X(y,x,v,T,_,20,H[31]),T=G(T,y,x,v,E,4,H[32]),v=G(v,T,y,x,q,11,H[33]),x=G(x,v,T,y,P,16,H[34]),y=G(y,x,v,T,k,23,H[35]),T=G(T,y,x,v,D,4,H[36]),v=G(v,T,y,x,O,11,H[37]),x=G(x,v,T,y,R,16,H[38]),y=G(y,x,v,T,I,23,H[39]),T=G(T,y,x,v,C,4,H[40]),v=G(v,T,y,x,N,11,H[41]),x=G(x,v,T,y,B,16,H[42]),y=G(y,x,v,T,M,23,H[43]),T=G(T,y,x,v,w,4,H[44]),v=G(v,T,y,x,_,11,H[45]),x=G(x,v,T,y,S,16,H[46]),y=G(y,x,v,T,L,23,H[47]),T=J(T,y,x,v,N,6,H[48]),v=J(v,T,y,x,R,10,H[49]),x=J(x,v,T,y,k,15,H[50]),y=J(y,x,v,T,E,21,H[51]),T=J(T,y,x,v,_,6,H[52]),v=J(v,T,y,x,B,10,H[53]),x=J(x,v,T,y,I,15,H[54]),y=J(y,x,v,T,D,21,H[55]),T=J(T,y,x,v,q,6,H[56]),v=J(v,T,y,x,S,10,H[57]),x=J(x,v,T,y,M,15,H[58]),y=J(y,x,v,T,C,21,H[59]),T=J(T,y,x,v,O,6,H[60]),v=J(v,T,y,x,P,10,H[61]),x=J(x,v,T,y,L,15,H[62]),y=J(y,x,v,T,w,21,H[63]);F[0]=F[0]+T|0,F[1]=F[1]+y|0,F[2]=F[2]+x|0,F[3]=F[3]+v|0},_doFinalize:function(){var V=this._data,A=V.words,F=8*this._nDataBytes,N=8*V.sigBytes;A[N>>>5]|=128<<24-N%32;var D=$.floor(F/4294967296);A[(N+64>>>9<<4)+15]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,A[(N+64>>>9<<4)+14]=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,V.sigBytes=4*(A.length+1),this._process(),V=this._hash,A=V.words;for(F=0;4>F;F++)N=A[F],A[F]=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360;return V},clone:function(){var V=Z.clone.call(this);return V._hash=this._hash.clone(),V}}),Q.MD5=Z._createHelper(K),Q.HmacMD5=Z._createHmacHelper(K)})(Math);(function(){var $=y1,J=$.lib,Y=J.WordArray,X=J.Hasher,G=[],J=$.algo.SHA1=X.extend({_doReset:function(){this._hash=new Y.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(Q,W){for(var Z=this._hash.words,K=Z[0],H=Z[1],z=Z[2],V=Z[3],A=Z[4],F=0;80>F;F++){if(16>F)G[F]=Q[W+F]|0;else{var N=G[F-3]^G[F-8]^G[F-14]^G[F-16];G[F]=N<<1|N>>>31}N=(K<<5|K>>>27)+A+G[F],N=20>F?N+((H&z|~H&V)+1518500249):40>F?N+((H^z^V)+1859775393):60>F?N+((H&z|H&V|z&V)-1894007588):N+((H^z^V)-899497514),A=V,V=z,z=H<<30|H>>>2,H=K,K=N}Z[0]=Z[0]+K|0,Z[1]=Z[1]+H|0,Z[2]=Z[2]+z|0,Z[3]=Z[3]+V|0,Z[4]=Z[4]+A|0},_doFinalize:function(){var Q=this._data,W=Q.words,Z=8*this._nDataBytes,K=8*Q.sigBytes;return W[K>>>5]|=128<<24-K%32,W[(K+64>>>9<<4)+14]=Math.floor(Z/4294967296),W[(K+64>>>9<<4)+15]=Z,Q.sigBytes=4*W.length,this._process(),this._hash},clone:function(){var Q=X.clone.call(this);return Q._hash=this._hash.clone(),Q}});$.SHA1=X._createHelper(J),$.HmacSHA1=X._createHmacHelper(J)})();(function($){for(var Y=y1,F=Y.lib,X=F.WordArray,G=F.Hasher,F=Y.algo,J=[],Q=[],W=function(D){return 4294967296*(D-(D|0))|0},Z=2,K=0;64>K;){var H;$:{H=Z;for(var z=$.sqrt(H),V=2;V<=z;V++)if(!(H%V)){H=!1;break $}H=!0}H&&(8>K&&(J[K]=W($.pow(Z,0.5))),Q[K]=W($.pow(Z,0.3333333333333333)),K++),Z++}var A=[],F=F.SHA256=G.extend({_doReset:function(){this._hash=new X.init(J.slice(0))},_doProcessBlock:function(N,D){for(var L=this._hash.words,B=L[0],O=L[1],E=L[2],M=L[3],R=L[4],q=L[5],w=L[6],I=L[7],P=0;64>P;P++){if(16>P)A[P]=N[D+P]|0;else{var _=A[P-15],C=A[P-2];A[P]=((_<<25|_>>>7)^(_<<14|_>>>18)^_>>>3)+A[P-7]+((C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10)+A[P-16]}_=I+((R<<26|R>>>6)^(R<<21|R>>>11)^(R<<7|R>>>25))+(R&q^~R&w)+Q[P]+A[P],C=((B<<30|B>>>2)^(B<<19|B>>>13)^(B<<10|B>>>22))+(B&O^B&E^O&E),I=w,w=q,q=R,R=M+_|0,M=E,E=O,O=B,B=_+C|0}L[0]=L[0]+B|0,L[1]=L[1]+O|0,L[2]=L[2]+E|0,L[3]=L[3]+M|0,L[4]=L[4]+R|0,L[5]=L[5]+q|0,L[6]=L[6]+w|0,L[7]=L[7]+I|0},_doFinalize:function(){var N=this._data,D=N.words,L=8*this._nDataBytes,B=8*N.sigBytes;return D[B>>>5]|=128<<24-B%32,D[(B+64>>>9<<4)+14]=$.floor(L/4294967296),D[(B+64>>>9<<4)+15]=L,N.sigBytes=4*D.length,this._process(),this._hash},clone:function(){var N=G.clone.call(this);return N._hash=this._hash.clone(),N}});Y.SHA256=G._createHelper(F),Y.HmacSHA256=G._createHmacHelper(F)})(Math);(function(){var $=y1,Y=$.lib.WordArray,G=$.algo,X=G.SHA256,G=G.SHA224=X.extend({_doReset:function(){this._hash=new Y.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var J=X._doFinalize.call(this);return J.sigBytes-=4,J}});$.SHA224=X._createHelper(G),$.HmacSHA224=X._createHmacHelper(G)})();(function(){function $(){return G.create.apply(G,arguments)}for(var Y=y1,X=Y.lib.Hasher,Q=Y.x64,G=Q.Word,J=Q.WordArray,Q=Y.algo,W=[$(1116352408,3609767458),$(1899447441,602891725),$(3049323471,3964484399),$(3921009573,2173295548),$(961987163,4081628472),$(1508970993,3053834265),$(2453635748,2937671579),$(2870763221,3664609560),$(3624381080,2734883394),$(310598401,1164996542),$(607225278,1323610764),$(1426881987,3590304994),$(1925078388,4068182383),$(2162078206,991336113),$(2614888103,633803317),$(3248222580,3479774868),$(3835390401,2666613458),$(4022224774,944711139),$(264347078,2341262773),$(604807628,2007800933),$(770255983,1495990901),$(1249150122,1856431235),$(1555081692,3175218132),$(1996064986,2198950837),$(2554220882,3999719339),$(2821834349,766784016),$(2952996808,2566594879),$(3210313671,3203337956),$(3336571891,1034457026),$(3584528711,2466948901),$(113926993,3758326383),$(338241895,168717936),$(666307205,1188179964),$(773529912,1546045734),$(1294757372,1522805485),$(1396182291,2643833823),$(1695183700,2343527390),$(1986661051,1014477480),$(2177026350,1206759142),$(2456956037,344077627),$(2730485921,1290863460),$(2820302411,3158454273),$(3259730800,3505952657),$(3345764771,106217008),$(3516065817,3606008344),$(3600352804,1432725776),$(4094571909,1467031594),$(275423344,851169720),$(430227734,3100823752),$(506948616,1363258195),$(659060556,3750685593),$(883997877,3785050280),$(958139571,3318307427),$(1322822218,3812723403),$(1537002063,2003034995),$(1747873779,3602036899),$(1955562222,1575990012),$(2024104815,1125592928),$(2227730452,2716904306),$(2361852424,442776044),$(2428436474,593698344),$(2756734187,3733110249),$(3204031479,2999351573),$(3329325298,3815920427),$(3391569614,3928383900),$(3515267271,566280711),$(3940187606,3454069534),$(4118630271,4000239992),$(116418474,1914138554),$(174292421,2731055270),$(289380356,3203993006),$(460393269,320620315),$(685471733,587496836),$(852142971,1086792851),$(1017036298,365543100),$(1126000580,2618297676),$(1288033470,3409855158),$(1501505948,4234509866),$(1607167915,987167468),$(1816402316,1246189591)],Z=[],K=0;80>K;K++)Z[K]=$();Q=Q.SHA512=X.extend({_doReset:function(){this._hash=new J.init([new G.init(1779033703,4089235720),new G.init(3144134277,2227873595),new G.init(1013904242,4271175723),new G.init(2773480762,1595750129),new G.init(1359893119,2917565137),new G.init(2600822924,725511199),new G.init(528734635,4215389547),new G.init(1541459225,327033209)])},_doProcessBlock:function(H,z){for(var O=this._hash.words,V=O[0],A=O[1],F=O[2],N=O[3],D=O[4],L=O[5],B=O[6],O=O[7],E=V.high,M=V.low,R=A.high,q=A.low,w=F.high,I=F.low,P=N.high,_=N.low,C=D.high,k=D.low,S=L.high,T=L.low,v=B.high,x=B.low,y=O.high,d=O.low,u=E,b=M,g=R,p=q,h=w,n=I,t=P,s=_,Z0=C,X0=k,a=S,Q0=T,e=v,m=x,$0=y,Y0=d,K0=0;80>K0;K0++){var n0=Z[K0];if(16>K0)var A0=n0.high=H[z+2*K0]|0,C0=n0.low=H[z+2*K0+1]|0;else{var A0=Z[K0-15],C0=A0.high,I0=A0.low,A0=(C0>>>1|I0<<31)^(C0>>>8|I0<<24)^C0>>>7,I0=(I0>>>1|C0<<31)^(I0>>>8|C0<<24)^(I0>>>7|C0<<25),g0=Z[K0-2],C0=g0.high,P1=g0.low,g0=(C0>>>19|P1<<13)^(C0<<3|P1>>>29)^C0>>>6,P1=(P1>>>19|C0<<13)^(P1<<3|C0>>>29)^(P1>>>6|C0<<26),C0=Z[K0-7],D0=C0.high,O0=Z[K0-16],d1=O0.high,O0=O0.low,C0=I0+C0.low,A0=A0+D0+(C0>>>0<I0>>>0?1:0),C0=C0+P1,A0=A0+g0+(C0>>>0<P1>>>0?1:0),C0=C0+O0,A0=A0+d1+(C0>>>0<O0>>>0?1:0);n0.high=A0,n0.low=C0}var D0=Z0&a^~Z0&e,O0=X0&Q0^~X0&m,n0=u&g^u&h^g&h,R0=b&p^b&n^p&n,I0=(u>>>28|b<<4)^(u<<30|b>>>2)^(u<<25|b>>>7),g0=(b>>>28|u<<4)^(b<<30|u>>>2)^(b<<25|u>>>7),P1=W[K0],p0=P1.high,U4=P1.low,P1=Y0+((X0>>>14|Z0<<18)^(X0>>>18|Z0<<14)^(X0<<23|Z0>>>9)),d1=$0+((Z0>>>14|X0<<18)^(Z0>>>18|X0<<14)^(Z0<<23|X0>>>9))+(P1>>>0<Y0>>>0?1:0),P1=P1+O0,d1=d1+D0+(P1>>>0<O0>>>0?1:0),P1=P1+U4,d1=d1+p0+(P1>>>0<U4>>>0?1:0),P1=P1+C0,d1=d1+A0+(P1>>>0<C0>>>0?1:0),C0=g0+R0,n0=I0+n0+(C0>>>0<g0>>>0?1:0),$0=e,Y0=m,e=a,m=Q0,a=Z0,Q0=X0,X0=s+P1|0,Z0=t+d1+(X0>>>0<s>>>0?1:0)|0,t=h,s=n,h=g,n=p,g=u,p=b,b=P1+C0|0,u=d1+n0+(b>>>0<P1>>>0?1:0)|0}M=V.low=M+b,V.high=E+u+(M>>>0<b>>>0?1:0),q=A.low=q+p,A.high=R+g+(q>>>0<p>>>0?1:0),I=F.low=I+n,F.high=w+h+(I>>>0<n>>>0?1:0),_=N.low=_+s,N.high=P+t+(_>>>0<s>>>0?1:0),k=D.low=k+X0,D.high=C+Z0+(k>>>0<X0>>>0?1:0),T=L.low=T+Q0,L.high=S+a+(T>>>0<Q0>>>0?1:0),x=B.low=x+m,B.high=v+e+(x>>>0<m>>>0?1:0),d=O.low=d+Y0,O.high=y+$0+(d>>>0<Y0>>>0?1:0)},_doFinalize:function(){var H=this._data,z=H.words,V=8*this._nDataBytes,A=8*H.sigBytes;return z[A>>>5]|=128<<24-A%32,z[(A+128>>>10<<5)+30]=Math.floor(V/4294967296),z[(A+128>>>10<<5)+31]=V,H.sigBytes=4*z.length,this._process(),this._hash.toX32()},clone:function(){var H=X.clone.call(this);return H._hash=this._hash.clone(),H},blockSize:32}),Y.SHA512=X._createHelper(Q),Y.HmacSHA512=X._createHmacHelper(Q)})();(function(){var $=y1,J=$.x64,Y=J.Word,X=J.WordArray,J=$.algo,G=J.SHA512,J=J.SHA384=G.extend({_doReset:function(){this._hash=new X.init([new Y.init(3418070365,3238371032),new Y.init(1654270250,914150663),new Y.init(2438529370,812702999),new Y.init(355462360,4144912697),new Y.init(1731405415,4290775857),new Y.init(2394180231,1750603025),new Y.init(3675008525,1694076839),new Y.init(1203062813,3204075428)])},_doFinalize:function(){var Q=G._doFinalize.call(this);return Q.sigBytes-=16,Q}});$.SHA384=G._createHelper(J),$.HmacSHA384=G._createHmacHelper(J)})();(function(){var $=y1,H=$.lib,Y=H.WordArray,X=H.Hasher,H=$.algo,G=Y.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),J=Y.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),Q=Y.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),W=Y.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),Z=Y.create([0,1518500249,1859775393,2400959708,2840853838]),K=Y.create([1352829926,1548603684,1836072691,2053994217,0]),H=H.RIPEMD160=X.extend({_doReset:function(){this._hash=Y.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(z,V){for(var A=0;16>A;A++){var F=V+A,N=z[F];z[F]=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360}var F=this._hash.words,N=Z.words,D=K.words,L=G.words,B=J.words,O=Q.words,E=W.words,M,R,q,w,I,P,_,C,k,S;P=M=F[0],_=R=F[1],C=q=F[2],k=w=F[3],S=I=F[4];for(var T,A=0;80>A;A+=1)T=M+z[V+L[A]]|0,T=16>A?T+((R^q^w)+N[0]):32>A?T+((R&q|~R&w)+N[1]):48>A?T+(((R|~q)^w)+N[2]):64>A?T+((R&w|q&~w)+N[3]):T+((R^(q|~w))+N[4]),T|=0,T=T<<O[A]|T>>>32-O[A],T=T+I|0,M=I,I=w,w=q<<10|q>>>22,q=R,R=T,T=P+z[V+B[A]]|0,T=16>A?T+((_^(C|~k))+D[0]):32>A?T+((_&k|C&~k)+D[1]):48>A?T+(((_|~C)^k)+D[2]):64>A?T+((_&C|~_&k)+D[3]):T+((_^C^k)+D[4]),T|=0,T=T<<E[A]|T>>>32-E[A],T=T+S|0,P=S,S=k,k=C<<10|C>>>22,C=_,_=T;T=F[1]+q+k|0,F[1]=F[2]+w+S|0,F[2]=F[3]+I+P|0,F[3]=F[4]+M+_|0,F[4]=F[0]+R+C|0,F[0]=T},_doFinalize:function(){var z=this._data,V=z.words,A=8*this._nDataBytes,F=8*z.sigBytes;V[F>>>5]|=128<<24-F%32,V[(F+64>>>9<<4)+14]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,z.sigBytes=4*(V.length+1),this._process(),z=this._hash,V=z.words;for(A=0;5>A;A++)F=V[A],V[A]=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360;return z},clone:function(){var z=X.clone.call(this);return z._hash=this._hash.clone(),z}});$.RIPEMD160=X._createHelper(H),$.HmacRIPEMD160=X._createHmacHelper(H)})(Math);(function(){var $=y1,Y=$.enc.Utf8;$.algo.HMAC=$.lib.Base.extend({init:function(X,G){X=this._hasher=new X.init,typeof G=="string"&&(G=Y.parse(G));var J=X.blockSize,Q=4*J;G.sigBytes>Q&&(G=X.finalize(G)),G.clamp();for(var W=this._oKey=G.clone(),Z=this._iKey=G.clone(),K=W.words,H=Z.words,z=0;z<J;z++)K[z]^=1549556828,H[z]^=909522486;W.sigBytes=Z.sigBytes=Q,this.reset()},reset:function(){var X=this._hasher;X.reset(),X.update(this._iKey)},update:function(X){return this._hasher.update(X),this},finalize:function(X){var G=this._hasher;return X=G.finalize(X),G.reset(),G.finalize(this._oKey.clone().concat(X))}})})();(function(){var $=y1,G=$.lib,Y=G.Base,X=G.WordArray,G=$.algo,J=G.HMAC,Q=G.PBKDF2=Y.extend({cfg:Y.extend({keySize:4,hasher:G.SHA1,iterations:1}),init:function(W){this.cfg=this.cfg.extend(W)},compute:function(W,Z){for(var N=this.cfg,K=J.create(N.hasher,W),H=X.create(),z=X.create([1]),V=H.words,A=z.words,F=N.keySize,N=N.iterations;V.length<F;){var D=K.update(Z).finalize(z);K.reset();for(var L=D.words,B=L.length,O=D,E=1;E<N;E++){O=K.finalize(O),K.reset();for(var M=O.words,R=0;R<B;R++)L[R]^=M[R]}H.concat(D),A[0]++}return H.sigBytes=4*F,H}});$.PBKDF2=function(W,Z,K){return Q.create(K).compute(W,Z)}})();/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */var Nq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oK0="=";function lk($){var Y,X,G="";for(Y=0;Y+3<=$.length;Y+=3)X=parseInt($.substring(Y,Y+3),16),G+=Nq.charAt(X>>6)+Nq.charAt(X&63);if(Y+1==$.length)X=parseInt($.substring(Y,Y+1),16),G+=Nq.charAt(X<<2);else if(Y+2==$.length)X=parseInt($.substring(Y,Y+2),16),G+=Nq.charAt(X>>2)+Nq.charAt((X&3)<<4);if(oK0)while((G.length&3)>0)G+=oK0;return G}function $30($){var Y="",X,G=0,J,Q;for(X=0;X<$.length;++X){if($.charAt(X)==oK0)break;if(Q=Nq.indexOf($.charAt(X)),Q<0)continue;if(G==0)Y+=iH(Q>>2),J=Q&3,G=1;else if(G==1)Y+=iH(J<<2|Q>>4),J=Q&15,G=2;else if(G==2)Y+=iH(J),Y+=iH(Q>>2),J=Q&3,G=3;else Y+=iH(J<<2|Q>>4),Y+=iH(Q&15),G=0}if(G==1)Y+=iH(J<<2);return Y}/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */var MA,Ka4=244837814094590,PG1=(Ka4&16777215)==15715070;function S0($,Y,X){if($!=null)if(typeof $=="number")this.fromNumber($,Y,X);else if(Y==null&&typeof $!="string")this.fromString($,256);else this.fromString($,Y)}function S8(){return new S0(null)}function Ua4($,Y,X,G,J,Q){while(--Q>=0){var W=Y*this[$++]+X[G]+J;J=Math.floor(W/67108864),X[G++]=W&67108863}return J}function Ha4($,Y,X,G,J,Q){var W=Y&32767,Z=Y>>15;while(--Q>=0){var K=this[$]&32767,H=this[$++]>>15,z=Z*K+H*W;K=W*K+((z&32767)<<15)+X[G]+(J&1073741823),J=(K>>>30)+(z>>>15)+Z*H+(J>>>30),X[G++]=K&1073741823}return J}function za4($,Y,X,G,J,Q){var W=Y&16383,Z=Y>>14;while(--Q>=0){var K=this[$]&16383,H=this[$++]>>14,z=Z*K+H*W;K=W*K+((z&16383)<<14)+X[G]+J,J=(K>>28)+(z>>14)+Z*H,X[G++]=K&268435455}return J}if(PG1&&nk.appName=="Microsoft Internet Explorer")S0.prototype.am=Ha4,MA=30;else if(PG1&&nk.appName!="Netscape")S0.prototype.am=Ua4,MA=26;else S0.prototype.am=za4,MA=28;S0.prototype.DB=MA;S0.prototype.DM=(1<<MA)-1;S0.prototype.DV=1<<MA;var Y30=52;S0.prototype.FV=Math.pow(2,Y30);S0.prototype.F1=Y30-MA;S0.prototype.F2=2*MA-Y30;var Va4="0123456789abcdefghijklmnopqrstuvwxyz",Gr=[],Lq,DZ;Lq=48;for(DZ=0;DZ<=9;++DZ)Gr[Lq++]=DZ;Lq=97;for(DZ=10;DZ<36;++DZ)Gr[Lq++]=DZ;Lq=65;for(DZ=10;DZ<36;++DZ)Gr[Lq++]=DZ;function iH($){return Va4.charAt($)}function kG1($,Y){var X=Gr[$.charCodeAt(Y)];return X==null?-1:X}function Aa4($){for(var Y=this.t-1;Y>=0;--Y)$[Y]=this[Y];$.t=this.t,$.s=this.s}function Fa4($){if(this.t=1,this.s=$<0?-1:0,$>0)this[0]=$;else if($<-1)this[0]=$+this.DV;else this.t=0}function EA($){var Y=S8();return Y.fromInt($),Y}function Da4($,Y){var X;if(Y==16)X=4;else if(Y==8)X=3;else if(Y==256)X=8;else if(Y==2)X=1;else if(Y==32)X=5;else if(Y==4)X=2;else{this.fromRadix($,Y);return}this.t=0,this.s=0;var G=$.length,J=!1,Q=0;while(--G>=0){var W=X==8?$[G]&255:kG1($,G);if(W<0){if($.charAt(G)=="-")J=!0;continue}if(J=!1,Q==0)this[this.t++]=W;else if(Q+X>this.DB)this[this.t-1]|=(W&(1<<this.DB-Q)-1)<<Q,this[this.t++]=W>>this.DB-Q;else this[this.t-1]|=W<<Q;if(Q+=X,Q>=this.DB)Q-=this.DB}if(X==8&&($[0]&128)!=0){if(this.s=-1,Q>0)this[this.t-1]|=(1<<this.DB-Q)-1<<Q}if(this.clamp(),J)S0.ZERO.subTo(this,this)}function Na4(){var $=this.s&this.DM;while(this.t>0&&this[this.t-1]==$)--this.t}function La4($){if(this.s<0)return"-"+this.negate().toString($);var Y;if($==16)Y=4;else if($==8)Y=3;else if($==2)Y=1;else if($==32)Y=5;else if($==4)Y=2;else return this.toRadix($);var X=(1<<Y)-1,G,J=!1,Q="",W=this.t,Z=this.DB-W*this.DB%Y;if(W-- >0){if(Z<this.DB&&(G=this[W]>>Z)>0)J=!0,Q=iH(G);while(W>=0){if(Z<Y)G=(this[W]&(1<<Z)-1)<<Y-Z,G|=this[--W]>>(Z+=this.DB-Y);else if(G=this[W]>>(Z-=Y)&X,Z<=0)Z+=this.DB,--W;if(G>0)J=!0;if(J)Q+=iH(G)}}return J?Q:"0"}function Ba4(){var $=S8();return S0.ZERO.subTo(this,$),$}function Oa4(){return this.s<0?this.negate():this}function Ea4($){var Y=this.s-$.s;if(Y!=0)return Y;var X=this.t;if(Y=X-$.t,Y!=0)return this.s<0?-Y:Y;while(--X>=0)if((Y=this[X]-$[X])!=0)return Y;return 0}function Jr($){var Y=1,X;if((X=$>>>16)!=0)$=X,Y+=16;if((X=$>>8)!=0)$=X,Y+=8;if((X=$>>4)!=0)$=X,Y+=4;if((X=$>>2)!=0)$=X,Y+=2;if((X=$>>1)!=0)$=X,Y+=1;return Y}function Ma4(){if(this.t<=0)return 0;return this.DB*(this.t-1)+Jr(this[this.t-1]^this.s&this.DM)}function Ra4($,Y){var X;for(X=this.t-1;X>=0;--X)Y[X+$]=this[X];for(X=$-1;X>=0;--X)Y[X]=0;Y.t=this.t+$,Y.s=this.s}function qa4($,Y){for(var X=$;X<this.t;++X)Y[X-$]=this[X];Y.t=Math.max(this.t-$,0),Y.s=this.s}function Ia4($,Y){var X=$%this.DB,G=this.DB-X,J=(1<<G)-1,Q=Math.floor($/this.DB),W=this.s<<X&this.DM,Z;for(Z=this.t-1;Z>=0;--Z)Y[Z+Q+1]=this[Z]>>G|W,W=(this[Z]&J)<<X;for(Z=Q-1;Z>=0;--Z)Y[Z]=0;Y[Q]=W,Y.t=this.t+Q+1,Y.s=this.s,Y.clamp()}function Pa4($,Y){Y.s=this.s;var X=Math.floor($/this.DB);if(X>=this.t){Y.t=0;return}var G=$%this.DB,J=this.DB-G,Q=(1<<G)-1;Y[0]=this[X]>>G;for(var W=X+1;W<this.t;++W)Y[W-X-1]|=(this[W]&Q)<<J,Y[W-X]=this[W]>>G;if(G>0)Y[this.t-X-1]|=(this.s&Q)<<J;Y.t=this.t-X,Y.clamp()}function wa4($,Y){var X=0,G=0,J=Math.min($.t,this.t);while(X<J)G+=this[X]-$[X],Y[X++]=G&this.DM,G>>=this.DB;if($.t<this.t){G-=$.s;while(X<this.t)G+=this[X],Y[X++]=G&this.DM,G>>=this.DB;G+=this.s}else{G+=this.s;while(X<$.t)G-=$[X],Y[X++]=G&this.DM,G>>=this.DB;G-=$.s}if(Y.s=G<0?-1:0,G<-1)Y[X++]=this.DV+G;else if(G>0)Y[X++]=G;Y.t=X,Y.clamp()}function _a4($,Y){var X=this.abs(),G=$.abs(),J=X.t;Y.t=J+G.t;while(--J>=0)Y[J]=0;for(J=0;J<G.t;++J)Y[J+X.t]=X.am(0,G[J],Y,J,0,X.t);if(Y.s=0,Y.clamp(),this.s!=$.s)S0.ZERO.subTo(Y,Y)}function ja4($){var Y=this.abs(),X=$.t=2*Y.t;while(--X>=0)$[X]=0;for(X=0;X<Y.t-1;++X){var G=Y.am(X,Y[X],$,2*X,0,1);if(($[X+Y.t]+=Y.am(X+1,2*Y[X],$,2*X+1,G,Y.t-X-1))>=Y.DV)$[X+Y.t]-=Y.DV,$[X+Y.t+1]=1}if($.t>0)$[$.t-1]+=Y.am(X,Y[X],$,2*X,0,1);$.s=0,$.clamp()}function Ta4($,Y,X){var G=$.abs();if(G.t<=0)throw"BigInteger divide by zero";var J=this.abs();if(J.t<G.t){if(Y!=null)Y.fromInt(0);if(X!=null)this.copyTo(X);return}if(X==null)X=S8();var Q=S8(),W=this.s,Z=$.s,K=this.DB-Jr(G[G.t-1]);if(K>0)G.lShiftTo(K,Q),J.lShiftTo(K,X);else G.copyTo(Q),J.copyTo(X);var H=Q.t,z=Q[H-1];if(z==0)return;var V=z*(1<<this.F1)+(H>1?Q[H-2]>>this.F2:0),A=this.FV/V,F=(1<<this.F1)/V,N=1<<this.F2,D=X.t,L=D-H,B=Y==null?S8():Y;if(Q.dlShiftTo(L,B),X.compareTo(B)>=0)X[X.t++]=1,X.subTo(B,X);S0.ONE.dlShiftTo(H,B),B.subTo(Q,Q);while(Q.t<H)Q[Q.t++]=0;while(--L>=0){var O=X[--D]==z?this.DM:Math.floor(X[D]*A+(X[D-1]+N)*F);if((X[D]+=Q.am(0,O,X,L,0,H))<O){Q.dlShiftTo(L,B),X.subTo(B,X);while(X[D]<--O)X.subTo(B,X)}}if(Y!=null){if(X.drShiftTo(H,Y),W!=Z)S0.ZERO.subTo(Y,Y)}if(X.t=H,X.clamp(),K>0)X.rShiftTo(K,X);if(W<0)S0.ZERO.subTo(X,X)}function Ca4($){var Y=S8();if(this.abs().divRemTo($,null,Y),this.s<0&&Y.compareTo(S0.ZERO)>0)$.subTo(Y,Y);return Y}function IL($){this.m=$}function Sa4($){if($.s<0||$.compareTo(this.m)>=0)return $.mod(this.m);else return $}function ka4($){return $}function va4($){$.divRemTo(this.m,null,$)}function xa4($,Y,X){$.multiplyTo(Y,X),this.reduce(X)}function ya4($,Y){$.squareTo(Y),this.reduce(Y)}IL.prototype.convert=Sa4;IL.prototype.revert=ka4;IL.prototype.reduce=va4;IL.prototype.mulTo=xa4;IL.prototype.sqrTo=ya4;function ba4(){if(this.t<1)return 0;var $=this[0];if(($&1)==0)return 0;var Y=$&3;return Y=Y*(2-($&15)*Y)&15,Y=Y*(2-($&255)*Y)&255,Y=Y*(2-(($&65535)*Y&65535))&65535,Y=Y*(2-$*Y%this.DV)%this.DV,Y>0?this.DV-Y:-Y}function PL($){this.m=$,this.mp=$.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<$.DB-15)-1,this.mt2=2*$.t}function ha4($){var Y=S8();if($.abs().dlShiftTo(this.m.t,Y),Y.divRemTo(this.m,null,Y),$.s<0&&Y.compareTo(S0.ZERO)>0)this.m.subTo(Y,Y);return Y}function fa4($){var Y=S8();return $.copyTo(Y),this.reduce(Y),Y}function ga4($){while($.t<=this.mt2)$[$.t++]=0;for(var Y=0;Y<this.m.t;++Y){var X=$[Y]&32767,G=X*this.mpl+((X*this.mph+($[Y]>>15)*this.mpl&this.um)<<15)&$.DM;X=Y+this.m.t,$[X]+=this.m.am(0,G,$,Y,0,this.m.t);while($[X]>=$.DV)$[X]-=$.DV,$[++X]++}if($.clamp(),$.drShiftTo(this.m.t,$),$.compareTo(this.m)>=0)$.subTo(this.m,$)}function ma4($,Y){$.squareTo(Y),this.reduce(Y)}function ua4($,Y,X){$.multiplyTo(Y,X),this.reduce(X)}PL.prototype.convert=ha4;PL.prototype.revert=fa4;PL.prototype.reduce=ga4;PL.prototype.mulTo=ua4;PL.prototype.sqrTo=ma4;function pa4(){return(this.t>0?this[0]&1:this.s)==0}function da4($,Y){if($>4294967295||$<1)return S0.ONE;var X=S8(),G=S8(),J=Y.convert(this),Q=Jr($)-1;J.copyTo(X);while(--Q>=0)if(Y.sqrTo(X,G),($&1<<Q)>0)Y.mulTo(G,J,X);else{var W=X;X=G,G=W}return Y.revert(X)}function ca4($,Y){var X;if($<256||Y.isEven())X=new IL(Y);else X=new PL(Y);return this.exp($,X)}S0.prototype.copyTo=Aa4;S0.prototype.fromInt=Fa4;S0.prototype.fromString=Da4;S0.prototype.clamp=Na4;S0.prototype.dlShiftTo=Ra4;S0.prototype.drShiftTo=qa4;S0.prototype.lShiftTo=Ia4;S0.prototype.rShiftTo=Pa4;S0.prototype.subTo=wa4;S0.prototype.multiplyTo=_a4;S0.prototype.squareTo=ja4;S0.prototype.divRemTo=Ta4;S0.prototype.invDigit=ba4;S0.prototype.isEven=pa4;S0.prototype.exp=da4;S0.prototype.toString=La4;S0.prototype.negate=Ba4;S0.prototype.abs=Oa4;S0.prototype.compareTo=Ea4;S0.prototype.bitLength=Ma4;S0.prototype.mod=Ca4;S0.prototype.modPowInt=ca4;S0.ZERO=EA(0);S0.ONE=EA(1);/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function la4(){var $=S8();return this.copyTo($),$}function ia4(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function na4(){return this.t==0?this.s:this[0]<<24>>24}function ra4(){return this.t==0?this.s:this[0]<<16>>16}function aa4($){return Math.floor(Math.LN2*this.DB/Math.log($))}function sa4(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function oa4($){if($==null)$=10;if(this.signum()==0||$<2||$>36)return"0";var Y=this.chunkSize($),X=Math.pow($,Y),G=EA(X),J=S8(),Q=S8(),W="";this.divRemTo(G,J,Q);while(J.signum()>0)W=(X+Q.intValue()).toString($).substr(1)+W,J.divRemTo(G,J,Q);return Q.intValue().toString($)+W}function ta4($,Y){if(this.fromInt(0),Y==null)Y=10;var X=this.chunkSize(Y),G=Math.pow(Y,X),J=!1,Q=0,W=0;for(var Z=0;Z<$.length;++Z){var K=kG1($,Z);if(K<0){if($.charAt(Z)=="-"&&this.signum()==0)J=!0;continue}if(W=Y*W+K,++Q>=X)this.dMultiply(G),this.dAddOffset(W,0),Q=0,W=0}if(Q>0)this.dMultiply(Math.pow(Y,Q)),this.dAddOffset(W,0);if(J)S0.ZERO.subTo(this,this)}function ea4($,Y,X){if(typeof Y=="number")if($<2)this.fromInt(1);else{if(this.fromNumber($,X),!this.testBit($-1))this.bitwiseTo(S0.ONE.shiftLeft($-1),X30,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(Y))if(this.dAddOffset(2,0),this.bitLength()>$)this.subTo(S0.ONE.shiftLeft($-1),this)}else{var G=[],J=$&7;if(G.length=($>>3)+1,Y.nextBytes(G),J>0)G[0]&=(1<<J)-1;else G[0]=0;this.fromString(G,256)}}function $s4(){var $=this.t,Y=[];Y[0]=this.s;var X=this.DB-$*this.DB%8,G,J=0;if($-- >0){if(X<this.DB&&(G=this[$]>>X)!=(this.s&this.DM)>>X)Y[J++]=G|this.s<<this.DB-X;while($>=0){if(X<8)G=(this[$]&(1<<X)-1)<<8-X,G|=this[--$]>>(X+=this.DB-8);else if(G=this[$]>>(X-=8)&255,X<=0)X+=this.DB,--$;if((G&128)!=0)G|=-256;if(J==0&&(this.s&128)!=(G&128))++J;if(J>0||G!=this.s)Y[J++]=G}}return Y}function Ys4($){return this.compareTo($)==0}function Xs4($){return this.compareTo($)<0?this:$}function Gs4($){return this.compareTo($)>0?this:$}function Js4($,Y,X){var G,J,Q=Math.min($.t,this.t);for(G=0;G<Q;++G)X[G]=Y(this[G],$[G]);if($.t<this.t){J=$.s&this.DM;for(G=Q;G<this.t;++G)X[G]=Y(this[G],J);X.t=this.t}else{J=this.s&this.DM;for(G=Q;G<$.t;++G)X[G]=Y(J,$[G]);X.t=$.t}X.s=Y(this.s,$.s),X.clamp()}function Qs4($,Y){return $&Y}function Ws4($){var Y=S8();return this.bitwiseTo($,Qs4,Y),Y}function X30($,Y){return $|Y}function Zs4($){var Y=S8();return this.bitwiseTo($,X30,Y),Y}function vG1($,Y){return $^Y}function Ks4($){var Y=S8();return this.bitwiseTo($,vG1,Y),Y}function xG1($,Y){return $&~Y}function Us4($){var Y=S8();return this.bitwiseTo($,xG1,Y),Y}function Hs4(){var $=S8();for(var Y=0;Y<this.t;++Y)$[Y]=this.DM&~this[Y];return $.t=this.t,$.s=~this.s,$}function zs4($){var Y=S8();if($<0)this.rShiftTo(-$,Y);else this.lShiftTo($,Y);return Y}function Vs4($){var Y=S8();if($<0)this.lShiftTo(-$,Y);else this.rShiftTo($,Y);return Y}function As4($){if($==0)return-1;var Y=0;if(($&65535)==0)$>>=16,Y+=16;if(($&255)==0)$>>=8,Y+=8;if(($&15)==0)$>>=4,Y+=4;if(($&3)==0)$>>=2,Y+=2;if(($&1)==0)++Y;return Y}function Fs4(){for(var $=0;$<this.t;++$)if(this[$]!=0)return $*this.DB+As4(this[$]);if(this.s<0)return this.t*this.DB;return-1}function Ds4($){var Y=0;while($!=0)$&=$-1,++Y;return Y}function Ns4(){var $=0,Y=this.s&this.DM;for(var X=0;X<this.t;++X)$+=Ds4(this[X]^Y);return $}function Ls4($){var Y=Math.floor($/this.DB);if(Y>=this.t)return this.s!=0;return(this[Y]&1<<$%this.DB)!=0}function Bs4($,Y){var X=S0.ONE.shiftLeft($);return this.bitwiseTo(X,Y,X),X}function Os4($){return this.changeBit($,X30)}function Es4($){return this.changeBit($,xG1)}function Ms4($){return this.changeBit($,vG1)}function Rs4($,Y){var X=0,G=0,J=Math.min($.t,this.t);while(X<J)G+=this[X]+$[X],Y[X++]=G&this.DM,G>>=this.DB;if($.t<this.t){G+=$.s;while(X<this.t)G+=this[X],Y[X++]=G&this.DM,G>>=this.DB;G+=this.s}else{G+=this.s;while(X<$.t)G+=$[X],Y[X++]=G&this.DM,G>>=this.DB;G+=$.s}if(Y.s=G<0?-1:0,G>0)Y[X++]=G;else if(G<-1)Y[X++]=this.DV+G;Y.t=X,Y.clamp()}function qs4($){var Y=S8();return this.addTo($,Y),Y}function Is4($){var Y=S8();return this.subTo($,Y),Y}function Ps4($){var Y=S8();return this.multiplyTo($,Y),Y}function ws4(){var $=S8();return this.squareTo($),$}function _s4($){var Y=S8();return this.divRemTo($,Y,null),Y}function js4($){var Y=S8();return this.divRemTo($,null,Y),Y}function Ts4($){var Y=S8(),X=S8();return this.divRemTo($,Y,X),[Y,X]}function Cs4($){this[this.t]=this.am(0,$-1,this,0,0,this.t),++this.t,this.clamp()}function Ss4($,Y){if($==0)return;while(this.t<=Y)this[this.t++]=0;this[Y]+=$;while(this[Y]>=this.DV){if(this[Y]-=this.DV,++Y>=this.t)this[this.t++]=0;++this[Y]}}function rk(){}function yG1($){return $}function ks4($,Y,X){$.multiplyTo(Y,X)}function vs4($,Y){$.squareTo(Y)}rk.prototype.convert=yG1;rk.prototype.revert=yG1;rk.prototype.mulTo=ks4;rk.prototype.sqrTo=vs4;function xs4($){return this.exp($,new rk)}function ys4($,Y,X){var G=Math.min(this.t+$.t,Y);X.s=0,X.t=G;while(G>0)X[--G]=0;var J;for(J=X.t-this.t;G<J;++G)X[G+this.t]=this.am(0,$[G],X,G,0,this.t);for(J=Math.min($.t,Y);G<J;++G)this.am(0,$[G],X,G,0,Y-G);X.clamp()}function bs4($,Y,X){--Y;var G=X.t=this.t+$.t-Y;X.s=0;while(--G>=0)X[G]=0;for(G=Math.max(Y-this.t,0);G<$.t;++G)X[this.t+G-Y]=this.am(Y-G,$[G],X,0,0,this.t+G-Y);X.clamp(),X.drShiftTo(1,X)}function Bq($){this.r2=S8(),this.q3=S8(),S0.ONE.dlShiftTo(2*$.t,this.r2),this.mu=this.r2.divide($),this.m=$}function hs4($){if($.s<0||$.t>2*this.m.t)return $.mod(this.m);else if($.compareTo(this.m)<0)return $;else{var Y=S8();return $.copyTo(Y),this.reduce(Y),Y}}function fs4($){return $}function gs4($){if($.drShiftTo(this.m.t-1,this.r2),$.t>this.m.t+1)$.t=this.m.t+1,$.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while($.compareTo(this.r2)<0)$.dAddOffset(1,this.m.t+1);$.subTo(this.r2,$);while($.compareTo(this.m)>=0)$.subTo(this.m,$)}function ms4($,Y){$.squareTo(Y),this.reduce(Y)}function us4($,Y,X){$.multiplyTo(Y,X),this.reduce(X)}Bq.prototype.convert=hs4;Bq.prototype.revert=fs4;Bq.prototype.reduce=gs4;Bq.prototype.mulTo=us4;Bq.prototype.sqrTo=ms4;function ps4($,Y){if($.signum()<0)return this.modInverse(Y).modPow($.negate(),Y);var X=$.bitLength(),G,J=EA(1),Q;if(X<=0)return J;else if(X<18)G=1;else if(X<48)G=3;else if(X<144)G=4;else if(X<768)G=5;else G=6;if(X<8)Q=new IL(Y);else if(Y.isEven())Q=new Bq(Y);else Q=new PL(Y);var W=[],Z=3,K=G-1,H=(1<<G)-1;if(W[1]=Q.convert(this),G>1){var z=S8();Q.sqrTo(W[1],z);while(Z<=H)W[Z]=S8(),Q.mulTo(z,W[Z-2],W[Z]),Z+=2}var V=$.t-1,A,F=!0,N=S8(),D;X=Jr($[V])-1;while(V>=0){if(X>=K)A=$[V]>>X-K&H;else if(A=($[V]&(1<<X+1)-1)<<K-X,V>0)A|=$[V-1]>>this.DB+X-K;Z=G;while((A&1)==0)A>>=1,--Z;if((X-=Z)<0)X+=this.DB,--V;if(F)W[A].copyTo(J),F=!1;else{while(Z>1)Q.sqrTo(J,N),Q.sqrTo(N,J),Z-=2;if(Z>0)Q.sqrTo(J,N);else D=J,J=N,N=D;Q.mulTo(N,W[A],J)}while(V>=0&&($[V]&1<<X)==0)if(Q.sqrTo(J,N),D=J,J=N,N=D,--X<0)X=this.DB-1,--V}return Q.revert(J)}function ds4($){var Y=this.s<0?this.negate():this.clone(),X=$.s<0?$.negate():$.clone();if(Y.compareTo(X)<0){var G=Y;Y=X,X=G}var J=Y.getLowestSetBit(),Q=X.getLowestSetBit();if(Q<0)return Y;if(J<Q)Q=J;if(Q>0)Y.rShiftTo(Q,Y),X.rShiftTo(Q,X);while(Y.signum()>0){if((J=Y.getLowestSetBit())>0)Y.rShiftTo(J,Y);if((J=X.getLowestSetBit())>0)X.rShiftTo(J,X);if(Y.compareTo(X)>=0)Y.subTo(X,Y),Y.rShiftTo(1,Y);else X.subTo(Y,X),X.rShiftTo(1,X)}if(Q>0)X.lShiftTo(Q,X);return X}function cs4($){if($<=0)return 0;var Y=this.DV%$,X=this.s<0?$-1:0;if(this.t>0)if(Y==0)X=this[0]%$;else for(var G=this.t-1;G>=0;--G)X=(Y*X+this[G])%$;return X}function ls4($){if($.signum()==0)return S0.ZERO;var Y=this.mod($),X=$.isEven();if(Y.isEven()&&X||Y.signum()==0)return S0.ZERO;var G=$.clone(),J=Y.clone(),Q=EA(1),W=EA(0),Z=EA(0),K=EA(1);while(G.signum()!=0){while(G.isEven()){if(G.rShiftTo(1,G),X){if(!Q.isEven()||!W.isEven())Q.addTo(Y,Q),W.subTo($,W);Q.rShiftTo(1,Q)}else if(!W.isEven())W.subTo($,W);W.rShiftTo(1,W)}while(J.isEven()){if(J.rShiftTo(1,J),X){if(!Z.isEven()||!K.isEven())Z.addTo(Y,Z),K.subTo($,K);Z.rShiftTo(1,Z)}else if(!K.isEven())K.subTo($,K);K.rShiftTo(1,K)}if(G.compareTo(J)>=0){if(G.subTo(J,G),X)Q.subTo(Z,Q);W.subTo(K,W)}else{if(J.subTo(G,J),X)Z.subTo(Q,Z);K.subTo(W,K)}}if(J.compareTo(S0.ONE)!=0)return S0.ZERO;if(K.compareTo($)>=0)return K.subtract($);if(K.signum()<0)K.addTo($,K);else return K;if(K.signum()<0)return K.add($);else return K}var MG=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],is4=67108864/MG[MG.length-1];function ns4($){if(this.signum()<=0)return!1;var Y,X=this.abs();if(X.t==1&&X[0]<=MG[MG.length-1]){for(Y=0;Y<MG.length;++Y)if(X[0]==MG[Y])return!0;return!1}if(X.isEven())return!1;Y=1;while(Y<MG.length){var G=MG[Y],J=Y+1;while(J<MG.length&&G<is4)G*=MG[J++];G=X.modInt(G);while(Y<J)if(G%MG[Y++]==0)return!1}return X.millerRabin($)}function rs4($){if(this.signum()<=0)return!1;var Y=this.subtract(S0.ONE),X=Y.getLowestSetBit();if(X<=0)return!1;var G=Y.shiftRight(X);if($=$+1>>1,$>MG.length)$=MG.length;var J=S8();for(var Q=0;Q<$;++Q){J.fromInt(MG[Math.floor(Math.random()*MG.length)]);var W=J.modPow(G,this);if(W.compareTo(S0.ONE)!=0&&W.compareTo(Y)!=0){var Z=1;while(Z++<X&&W.compareTo(Y)!=0)if(W=W.modPowInt(2,this),W.compareTo(S0.ONE)==0)return!1;if(W.compareTo(Y)!=0)return!1}}return!0}S0.prototype.chunkSize=aa4;S0.prototype.toRadix=oa4;S0.prototype.fromRadix=ta4;S0.prototype.fromNumber=ea4;S0.prototype.bitwiseTo=Js4;S0.prototype.changeBit=Bs4;S0.prototype.addTo=Rs4;S0.prototype.dMultiply=Cs4;S0.prototype.dAddOffset=Ss4;S0.prototype.multiplyLowerTo=ys4;S0.prototype.multiplyUpperTo=bs4;S0.prototype.modInt=cs4;S0.prototype.millerRabin=rs4;S0.prototype.clone=la4;S0.prototype.intValue=ia4;S0.prototype.byteValue=na4;S0.prototype.shortValue=ra4;S0.prototype.signum=sa4;S0.prototype.toByteArray=$s4;S0.prototype.equals=Ys4;S0.prototype.min=Xs4;S0.prototype.max=Gs4;S0.prototype.and=Ws4;S0.prototype.or=Zs4;S0.prototype.xor=Ks4;S0.prototype.andNot=Us4;S0.prototype.not=Hs4;S0.prototype.shiftLeft=zs4;S0.prototype.shiftRight=Vs4;S0.prototype.getLowestSetBit=Fs4;S0.prototype.bitCount=Ns4;S0.prototype.testBit=Ls4;S0.prototype.setBit=Os4;S0.prototype.clearBit=Es4;S0.prototype.flipBit=Ms4;S0.prototype.add=qs4;S0.prototype.subtract=Is4;S0.prototype.multiply=Ps4;S0.prototype.divide=_s4;S0.prototype.remainder=js4;S0.prototype.divideAndRemainder=Ts4;S0.prototype.modPow=ps4;S0.prototype.modInverse=ls4;S0.prototype.pow=xs4;S0.prototype.gcd=ds4;S0.prototype.isProbablePrime=ns4;S0.prototype.square=ws4;S0.prototype.sqrt=function(){var $=S0.ZERO.setBit(this.bitLength()/2),Y=$;for(;;){var X=$.add(this.divide($)).shiftRight(1);if(X.equals($)||X.equals(Y))return X;Y=$,$=X}};/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function G30(){this.i=0,this.j=0,this.S=[]}function as4($){var Y,X,G;for(Y=0;Y<256;++Y)this.S[Y]=Y;X=0;for(Y=0;Y<256;++Y)X=X+this.S[Y]+$[Y%$.length]&255,G=this.S[Y],this.S[Y]=this.S[X],this.S[X]=G;this.i=0,this.j=0}function ss4(){var $;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,$=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=$,this.S[$+this.S[this.i]&255]}G30.prototype.init=as4;G30.prototype.next=ss4;function os4(){return new G30}var ik=256;/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */var tn,pJ,L$;function ts4($){if(pJ[L$++]^=$&255,pJ[L$++]^=$>>8&255,pJ[L$++]^=$>>16&255,pJ[L$++]^=$>>24&255,L$>=ik)L$-=ik}function bG1(){ts4(new Date().getTime())}if(pJ==null){if(pJ=[],L$=0,typeof Dq<"u"&&(Dq.crypto!==void 0||Dq.msCrypto!==void 0)){if(l3=Dq.crypto||Dq.msCrypto,l3.getRandomValues){en=new Uint8Array(32),l3.getRandomValues(en);for(ZX=0;ZX<32;++ZX)pJ[L$++]=en[ZX]}else if(nk.appName=="Netscape"&&nk.appVersion<"5"){$r=Dq.crypto.random(32);for(ZX=0;ZX<$r.length;++ZX)pJ[L$++]=$r.charCodeAt(ZX)&255}}if(L$<ik&&typeof globalThis<"u"&&globalThis.crypto&&globalThis.crypto.getRandomValues){ck=new Uint8Array(ik-L$),globalThis.crypto.getRandomValues(ck);for(ZX=0;ZX<ck.length;++ZX)pJ[L$++]=ck[ZX]}while(L$<ik)ZX=Math.floor(65536*Math.random()),pJ[L$++]=ZX>>>8,pJ[L$++]=ZX&255;L$=0,bG1()}var ZX,l3,en,$r,ck;function es4(){if(tn==null){bG1(),tn=os4(),tn.init(pJ);for(L$=0;L$<pJ.length;++L$)pJ[L$]=0;L$=0}return tn.next()}function $o4($){var Y;for(Y=0;Y<$.length;++Y)$[Y]=es4()}function ak(){}ak.prototype.nextBytes=$o4;/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function dJ($,Y){return new S0($,Y)}function D6(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function Yo4($,Y){if(this.isPublic=!0,this.isPrivate=!1,typeof $!=="string")this.n=$,this.e=Y;else if($!=null&&Y!=null&&$.length>0&&Y.length>0)this.n=dJ($,16),this.e=parseInt(Y,16);else throw"Invalid RSA public key";if(this.n==null||typeof this.n.compareTo!=="function"||this.n.compareTo(S0.ONE)<=0||this.e==null||isNaN(this.e)||this.e<=0)throw"Invalid RSA public key"}function Xo4($){return $.modPowInt(this.e,this.n)}D6.prototype.doPublic=Xo4;D6.prototype.setPublic=Yo4;D6.prototype.type="RSA";/*! (c) Tom Wu, Kenji Urushima | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function Go4($,Y,X){if(this.isPrivate=!0,typeof $!=="string")this.n=$,this.e=Y,this.d=X;else if($!=null&&Y!=null&&$.length>0&&Y.length>0)this.n=dJ($,16),this.e=parseInt(Y,16),this.d=dJ(X,16);else throw"Invalid RSA private key"}function Jo4($,Y,X,G,J,Q,W,Z){if(this.isPrivate=!0,this.isPublic=!1,$==null)throw"RSASetPrivateEx N == null";if(Y==null)throw"RSASetPrivateEx E == null";if($.length==0)throw"RSASetPrivateEx N.length == 0";if(Y.length==0)throw"RSASetPrivateEx E.length == 0";if($!=null&&Y!=null&&$.length>0&&Y.length>0)this.n=dJ($,16),this.e=parseInt(Y,16),this.d=dJ(X,16),this.p=dJ(G,16),this.q=dJ(J,16),this.dmp1=dJ(Q,16),this.dmq1=dJ(W,16),this.coeff=dJ(Z,16);else throw"Invalid RSA private key in RSASetPrivateEx"}function Qo4($,Y){var X=new ak,G=$>>1;this.e=parseInt(Y,16);var J=new S0(Y,16),Q=$/2-100,W=S0.ONE.shiftLeft(Q);for(;;){for(;;)if(this.p=new S0($-G,1,X),this.p.subtract(S0.ONE).gcd(J).compareTo(S0.ONE)==0&&this.p.isProbablePrime(10))break;for(;;)if(this.q=new S0(G,1,X),this.q.subtract(S0.ONE).gcd(J).compareTo(S0.ONE)==0&&this.q.isProbablePrime(10))break;if(this.p.compareTo(this.q)<=0){var Z=this.p;this.p=this.q,this.q=Z}var K=this.q.subtract(this.p).abs();if(K.bitLength()<Q||K.compareTo(W)<=0)continue;var H=this.p.subtract(S0.ONE),z=this.q.subtract(S0.ONE),V=H.multiply(z);if(V.gcd(J).compareTo(S0.ONE)==0){if(this.n=this.p.multiply(this.q),this.n.bitLength()==$){this.d=J.modInverse(V),this.dmp1=this.d.mod(H),this.dmq1=this.d.mod(z),this.coeff=this.q.modInverse(this.p);break}}}this.isPrivate=!0}function Wo4($){if(this.p==null||this.q==null)return $.modPow(this.d,this.n);var Y=$.mod(this.p).modPow(this.dmp1,this.p),X=$.mod(this.q).modPow(this.dmq1,this.q);while(Y.compareTo(X)<0)Y=Y.add(this.p);return Y.subtract(X).multiply(this.coeff).mod(this.p).multiply(this.q).add(X)}D6.prototype.doPrivate=Wo4;D6.prototype.setPrivate=Go4;D6.prototype.setPrivateEx=Jo4;D6.prototype.generate=Qo4;/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function TY($,Y){this.x=Y,this.q=$}function Zo4($){if($==this)return!0;return this.q.equals($.q)&&this.x.equals($.x)}function Ko4(){return this.x}function Uo4(){return new TY(this.q,this.x.negate().mod(this.q))}function Ho4($){return new TY(this.q,this.x.add($.toBigInteger()).mod(this.q))}function zo4($){return new TY(this.q,this.x.subtract($.toBigInteger()).mod(this.q))}function Vo4($){return new TY(this.q,this.x.multiply($.toBigInteger()).mod(this.q))}function Ao4(){return new TY(this.q,this.x.square().mod(this.q))}function Fo4($){return new TY(this.q,this.x.multiply($.toBigInteger().modInverse(this.q)).mod(this.q))}TY.prototype.equals=Zo4;TY.prototype.toBigInteger=Ko4;TY.prototype.negate=Uo4;TY.prototype.add=Ho4;TY.prototype.subtract=zo4;TY.prototype.multiply=Vo4;TY.prototype.square=Ao4;TY.prototype.divide=Fo4;TY.prototype.sqrt=function(){return new TY(this.q,this.x.sqrt().mod(this.q))};function Q9($,Y,X,G){if(this.curve=$,this.x=Y,this.y=X,G==null)this.z=S0.ONE;else this.z=G;this.zinv=null}function Do4(){if(this.zinv==null)this.zinv=this.z.modInverse(this.curve.q);return this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function No4(){if(this.zinv==null)this.zinv=this.z.modInverse(this.curve.q);return this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function Lo4($){if($==this)return!0;if(this.isInfinity())return $.isInfinity();if($.isInfinity())return this.isInfinity();var Y,X;if(Y=$.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply($.z)).mod(this.curve.q),!Y.equals(S0.ZERO))return!1;return X=$.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply($.z)).mod(this.curve.q),X.equals(S0.ZERO)}function Bo4(){if(this.x==null&&this.y==null)return!0;return this.z.equals(S0.ZERO)&&!this.y.toBigInteger().equals(S0.ZERO)}function Oo4(){return new Q9(this.curve,this.x,this.y.negate(),this.z)}function Eo4($){if(this.isInfinity())return $;if($.isInfinity())return this;var Y=$.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply($.z)).mod(this.curve.q),X=$.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply($.z)).mod(this.curve.q);if(S0.ZERO.equals(X)){if(S0.ZERO.equals(Y))return this.twice();return this.curve.getInfinity()}var G=new S0("3"),J=this.x.toBigInteger(),Q=this.y.toBigInteger(),W=$.x.toBigInteger(),Z=$.y.toBigInteger(),K=X.square(),H=K.multiply(X),z=J.multiply(K),V=Y.square().multiply(this.z),A=V.subtract(z.shiftLeft(1)).multiply($.z).subtract(H).multiply(X).mod(this.curve.q),F=z.multiply(G).multiply(Y).subtract(Q.multiply(H)).subtract(V.multiply(Y)).multiply($.z).add(Y.multiply(H)).mod(this.curve.q),N=H.multiply(this.z).multiply($.z).mod(this.curve.q);return new Q9(this.curve,this.curve.fromBigInteger(A),this.curve.fromBigInteger(F),N)}function Mo4(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var $=new S0("3"),Y=this.x.toBigInteger(),X=this.y.toBigInteger(),G=X.multiply(this.z),J=G.multiply(X).mod(this.curve.q),Q=this.curve.a.toBigInteger(),W=Y.square().multiply($);if(!S0.ZERO.equals(Q))W=W.add(this.z.square().multiply(Q));W=W.mod(this.curve.q);var Z=W.square().subtract(Y.shiftLeft(3).multiply(J)).shiftLeft(1).multiply(G).mod(this.curve.q),K=W.multiply($).multiply(Y).subtract(J.shiftLeft(1)).shiftLeft(2).multiply(J).subtract(W.square().multiply(W)).mod(this.curve.q),H=G.square().multiply(G).shiftLeft(3).mod(this.curve.q);return new Q9(this.curve,this.curve.fromBigInteger(Z),this.curve.fromBigInteger(K),H)}function Ro4($){if(this.isInfinity())return this;if($.signum()==0)return this.curve.getInfinity();var Y=$,X=Y.multiply(new S0("3")),G=this.negate(),J=this,Q=this.curve.q.subtract($),W=Q.multiply(new S0("3")),Z=new Q9(this.curve,this.x,this.y),K=Z.negate(),H;for(H=X.bitLength()-2;H>0;--H){J=J.twice();var z=X.testBit(H),V=Y.testBit(H);if(z!=V)J=J.add(z?this:G)}for(H=W.bitLength()-2;H>0;--H){Z=Z.twice();var A=W.testBit(H),F=Q.testBit(H);if(A!=F)Z=Z.add(A?Z:K)}return J}function qo4($,Y,X){var G;if($.bitLength()>X.bitLength())G=$.bitLength()-1;else G=X.bitLength()-1;var J=this.curve.getInfinity(),Q=this.add(Y);while(G>=0){if(J=J.twice(),$.testBit(G))if(X.testBit(G))J=J.add(Q);else J=J.add(this);else if(X.testBit(G))J=J.add(Y);--G}return J}Q9.prototype.getX=Do4;Q9.prototype.getY=No4;Q9.prototype.equals=Lo4;Q9.prototype.isInfinity=Bo4;Q9.prototype.negate=Oo4;Q9.prototype.add=Eo4;Q9.prototype.twice=Mo4;Q9.prototype.multiply=Ro4;Q9.prototype.multiplyTwo=qo4;function RA($,Y,X){this.q=$,this.a=this.fromBigInteger(Y),this.b=this.fromBigInteger(X),this.infinity=new Q9(this,null,null)}function Io4(){return this.q}function Po4(){return this.a}function wo4(){return this.b}function _o4($){if($==this)return!0;return this.q.equals($.q)&&this.a.equals($.a)&&this.b.equals($.b)}function jo4(){return this.infinity}function To4($){return new TY(this.q,$)}function Co4($){switch(parseInt($.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:var Y=$.substr(0,2),X=$.substr(2),G=this.fromBigInteger(new S0(H,16)),J=this.getA(),Q=this.getB(),W=G.square().add(J).multiply(G).add(Q),Z=W.sqrt();if(Y=="03")Z=Z.negate();return new Q9(this,G,Z);case 4:case 6:case 7:var K=($.length-2)/2,H=$.substr(2,K),z=$.substr(K+2,K);return new Q9(this,this.fromBigInteger(new S0(H,16)),this.fromBigInteger(new S0(z,16)));default:return null}}RA.prototype.getQ=Io4;RA.prototype.getA=Po4;RA.prototype.getB=wo4;RA.prototype.equals=_o4;RA.prototype.getInfinity=jo4;RA.prototype.fromBigInteger=To4;RA.prototype.decodePointHex=Co4;/*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib
 */TY.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)};Q9.prototype.getEncoded=function($){var Y=function(Q,W){var Z=Q.toByteArrayUnsigned();if(W<Z.length)Z=Z.slice(Z.length-W);else while(W>Z.length)Z.unshift(0);return Z},X=this.getX().toBigInteger(),G=this.getY().toBigInteger(),J=Y(X,32);if($)if(G.isEven())J.unshift(2);else J.unshift(3);else J.unshift(4),J=J.concat(Y(G,32));return J};Q9.decodeFrom=function($,Y){var X=Y[0],G=Y.length-1,J=Y.slice(1,1+G/2),Q=Y.slice(1+G/2,1+G);J.unshift(0),Q.unshift(0);var W=new S0(J),Z=new S0(Q);return new Q9($,$.fromBigInteger(W),$.fromBigInteger(Z))};Q9.decodeFromHex=function($,Y){var X=Y.substr(0,2),G=Y.length-2,J=Y.substr(2,G/2),Q=Y.substr(2+G/2,G/2),W=new S0(J,16),Z=new S0(Q,16);return new Q9($,$.fromBigInteger(W),$.fromBigInteger(Z))};Q9.prototype.add2D=function($){if(this.isInfinity())return $;if($.isInfinity())return this;if(this.x.equals($.x)){if(this.y.equals($.y))return this.twice();return this.curve.getInfinity()}var Y=$.x.subtract(this.x),X=$.y.subtract(this.y),G=X.divide(Y),J=G.square().subtract(this.x).subtract($.x),Q=G.multiply(this.x.subtract(J)).subtract(this.y);return new Q9(this.curve,J,Q)};Q9.prototype.twice2D=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var $=this.curve.fromBigInteger(S0.valueOf(2)),Y=this.curve.fromBigInteger(S0.valueOf(3)),X=this.x.square().multiply(Y).add(this.curve.a).divide(this.y.multiply($)),G=X.square().subtract(this.x.multiply($)),J=X.multiply(this.x.subtract(G)).subtract(this.y);return new Q9(this.curve,G,J)};Q9.prototype.multiply2D=function($){if(this.isInfinity())return this;if($.signum()==0)return this.curve.getInfinity();var Y=$,X=Y.multiply(new S0("3")),G=this.negate(),J=this,Q;for(Q=X.bitLength()-2;Q>0;--Q){J=J.twice();var W=X.testBit(Q),Z=Y.testBit(Q);if(W!=Z)J=J.add2D(W?this:G)}return J};Q9.prototype.isOnCurve=function(){var $=this.getX().toBigInteger(),Y=this.getY().toBigInteger(),X=this.curve.getA().toBigInteger(),G=this.curve.getB().toBigInteger(),J=this.curve.getQ(),Q=Y.multiply(Y).mod(J),W=$.multiply($).multiply($).add(X.multiply($)).add(G).mod(J);return Q.equals(W)};Q9.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"};Q9.prototype.validate=function(){var $=this.curve.getQ();if(this.isInfinity())throw Error("Point is at infinity.");var Y=this.getX().toBigInteger(),X=this.getY().toBigInteger();if(Y.compareTo(S0.ONE)<0||Y.compareTo($.subtract(S0.ONE))>0)throw Error("x coordinate out of bounds");if(X.compareTo(S0.ONE)<0||X.compareTo($.subtract(S0.ONE))>0)throw Error("y coordinate out of bounds");if(!this.isOnCurve())throw Error("Point is not on the curve.");if(this.multiply($).isInfinity())throw Error("Point is not a scalar multiple of G.");return!0};/*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval
 */var hG1=function(){var $="(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)",Y='(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))',X='(?:"'+Y+'*")',G=new RegExp("(?:false|true|null|[\\{\\}\\[\\]]|"+$+"|"+X+")","g"),J=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),Q={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:`
`,r:"\r",t:"\t"};function W(V,A,F){return A?Q[A]:String.fromCharCode(parseInt(F,16))}var Z=new String(""),K="\\",H={"{":Object,"[":Array},z=Object.hasOwnProperty;return function(V,A){var F=V.match(G),N,D=F[0],L=!1;if(D==="{")N={};else if(D==="[")N=[];else N=[],L=!0;var B,O=[N];for(var E=1-L,M=F.length;E<M;++E){D=F[E];var R;switch(D.charCodeAt(0)){default:R=O[0],R[B||R.length]=+D,B=void 0;break;case 34:if(D=D.substring(1,D.length-1),D.indexOf(K)!==-1)D=D.replace(J,W);if(R=O[0],!B)if(R instanceof Array)B=R.length;else{B=D||Z;break}R[B]=D,B=void 0;break;case 91:R=O[0],O.unshift(R[B||R.length]=[]),B=void 0;break;case 93:O.shift();break;case 102:R=O[0],R[B||R.length]=!1,B=void 0;break;case 110:R=O[0],R[B||R.length]=null,B=void 0;break;case 116:R=O[0],R[B||R.length]=!0,B=void 0;break;case 123:R=O[0],O.unshift(R[B||R.length]={}),B=void 0;break;case 125:O.shift();break}}if(L){if(O.length!==1)throw Error();N=N[0]}else if(O.length)throw Error();if(A){var q=function(w,I){var P=w[I];if(P&&typeof P==="object"){var _=null;for(var C in P)if(z.call(P,C)&&P!==w){var k=q(P,C);if(k!==void 0)P[C]=k;else{if(!_)_=[];_.push(C)}}if(_)for(var S=_.length;--S>=0;)delete P[_[S]]}return A.call(w,I,P)};N=q({"":N},"")}return N}}();if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};l.asn1.ASN1Util=new function(){this.integerToByteHex=function($){var Y=$.toString(16);if(Y.length%2==1)Y="0"+Y;return Y},this.bigIntToMinTwosComplementsHex=function($){return Qr($)},this.getPEMStringFromHex=function($,Y){return RG($,Y)},this.newObject=function($){var Y=l,X=Y.asn1,G=X.ASN1Object,J=X.DERBoolean,Q=X.DERInteger,W=X.DERBitString,Z=X.DEROctetString,K=X.DERNull,H=X.DERObjectIdentifier,z=X.DEREnumerated,V=X.DERUTF8String,A=X.DERNumericString,F=X.DERPrintableString,N=X.DERTeletexString,D=X.DERIA5String,L=X.DERUTCTime,B=X.DERGeneralizedTime,O=X.DERVisibleString,E=X.DERBMPString,M=X.DERSequence,R=X.DERSet,q=X.DERTaggedObject,w=X.ASN1Util.newObject;if($ instanceof X.ASN1Object)return $;var I=Object.keys($);if(I.length!=1)throw Error("key of param shall be only one.");var P=I[0];if(":asn1:bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:".indexOf(":"+P+":")==-1)throw Error("undefined key: "+P);if(P=="bool")return new J($[P]);if(P=="int")return new Q($[P]);if(P=="bitstr")return new W($[P]);if(P=="octstr")return new Z($[P]);if(P=="null")return new K($[P]);if(P=="oid")return new H($[P]);if(P=="enum")return new z($[P]);if(P=="utf8str")return new V($[P]);if(P=="numstr")return new A($[P]);if(P=="prnstr")return new F($[P]);if(P=="telstr")return new N($[P]);if(P=="ia5str")return new D($[P]);if(P=="utctime")return new L($[P]);if(P=="gentime")return new B($[P]);if(P=="visstr")return new O($[P]);if(P=="bmpstr")return new E($[P]);if(P=="asn1")return new G($[P]);if(P=="seq"){var _=$[P],C=[];for(var k=0;k<_.length;k++){var S=w(_[k]);C.push(S)}return new M({array:C})}if(P=="set"){var _=$[P],C=[];for(var k=0;k<_.length;k++){var S=w(_[k]);C.push(S)}return new R({array:C})}if(P=="tag"){var T=$[P];if(Object.prototype.toString.call(T)==="[object Array]"&&T.length==3){var v=w(T[2]);return new q({tag:T[0],explicit:T[1],obj:v})}else return new q(T)}},this.jsonToASN1HEX=function($){var Y=this.newObject($);return Y.tohex()}};l.asn1.ASN1Util.oidHexToInt=function($){var J="",Y=parseInt($.substr(0,2),16),X=Math.floor(Y/40),G=Y%40,J=X+"."+G,Q="";for(var W=2;W<$.length;W+=2){var Z=parseInt($.substr(W,2),16),K=("00000000"+Z.toString(2)).slice(-8);if(Q=Q+K.substr(1,7),K.substr(0,1)=="0"){var H=new S0(Q,2);J=J+"."+H.toString(10),Q=""}}return J};l.asn1.ASN1Util.oidIntToHex=function($){var Y=function(Z){var K=Z.toString(16);if(K.length==1)K="0"+K;return K},X=function(Z){var K="",H=new S0(Z,10),z=H.toString(2),V=7-z.length%7;if(V==7)V=0;var A="";for(var F=0;F<V;F++)A+="0";z=A+z;for(var F=0;F<z.length-1;F+=7){var N=z.substr(F,7);if(F!=z.length-7)N="1"+N;K+=Y(parseInt(N,2))}return K};if(!$.match(/^[0-9.]+$/))throw"malformed oid string: "+$;var G="",J=$.split("."),Q=parseInt(J[0])*40+parseInt(J[1]);G+=Y(Q),J.splice(0,2);for(var W=0;W<J.length;W++)G+=X(J[W]);return G};l.asn1.ASN1Object=function($){var Y=!0,X=null,G="00",J="00",Q="";if(this.params=null,this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw Error("this.hV is null or undefined");if(this.hV.length%2==1)throw Error("value hex must be even length: n="+Q.length+",v="+this.hV);var W=this.hV.length/2,Z=W.toString(16);if(Z.length%2==1)Z="0"+Z;if(W<128)return Z;else{var K=Z.length/2;if(K>15)throw Error("ASN.1 length too long to represent by 8x: n = "+W.toString(16));var H=128+K;return H.toString(16)+Z}},this.tohex=function(){if(this.hTLV==null||this.isModified)this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1;return this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.getValueHex=function(){return this.tohex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(W){this.params=W},$!=null){if($.tlv!=null)this.hTLV=$.tlv,this.isModified=!1}};l.asn1.DERAbstractString=function($){l.asn1.DERAbstractString.superclass.constructor.call(this);var Y=null,X=null;if(this.getString=function(){return this.s},this.setString=function(G){this.hTLV=null,this.isModified=!0,this.s=G,this.hV=W30(this.s).toLowerCase()},this.setStringHex=function(G){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=G},this.getFreshValueHex=function(){return this.hV},typeof $<"u"){if(typeof $=="string")this.setString($);else if(typeof $.str<"u")this.setString($.str);else if(typeof $.hex<"u")this.setStringHex($.hex)}};X1(l.asn1.DERAbstractString,l.asn1.ASN1Object);l.asn1.DERAbstractTime=function($){l.asn1.DERAbstractTime.superclass.constructor.call(this);var Y=null,X=null;this.localDateToUTC=function(G){var J=G.getTime()+G.getTimezoneOffset()*60000,Q=new Date(J);return Q},this.formatDate=function(G,J,Q){var W=this.zeroPadding,Z=this.localDateToUTC(G),K=String(Z.getFullYear());if(J=="utc")K=K.substr(2,2);var H=W(String(Z.getMonth()+1),2),z=W(String(Z.getDate()),2),V=W(String(Z.getHours()),2),A=W(String(Z.getMinutes()),2),F=W(String(Z.getSeconds()),2),N=K+H+z+V+A+F;if(Q===!0){var D=Z.getMilliseconds();if(D!=0){var L=W(String(D),3);L=L.replace(/[0]+$/,""),N=N+"."+L}}return N+"Z"},this.zeroPadding=function(G,J){if(G.length>=J)return G;return Array(J-G.length+1).join("0")+G},this.setByParam=function(G){this.hV=null,this.hTLV=null,this.params=G},this.getString=function(){return},this.setString=function(G){if(this.hTLV=null,this.isModified=!0,this.params==null)this.params={};this.params.str=G},this.setByDate=function(G){if(this.hTLV=null,this.isModified=!0,this.params==null)this.params={};this.params.date=G},this.setByDateValue=function(G,J,Q,W,Z,K){var H=new Date(Date.UTC(G,J-1,Q,W,Z,K,0));this.setByDate(H)},this.getFreshValueHex=function(){return this.hV}};X1(l.asn1.DERAbstractTime,l.asn1.ASN1Object);l.asn1.DERAbstractStructured=function($){l.asn1.DERAbstractString.superclass.constructor.call(this);var Y=null;if(this.setByASN1ObjectArray=function(X){this.hTLV=null,this.isModified=!0,this.asn1Array=X},this.appendASN1Object=function(X){this.hTLV=null,this.isModified=!0,this.asn1Array.push(X)},this.asn1Array=[],typeof $<"u"){if(typeof $.array<"u")this.asn1Array=$.array}};X1(l.asn1.DERAbstractStructured,l.asn1.ASN1Object);l.asn1.DERBoolean=function($){if(l.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",$==!1)this.hTLV="010100";else this.hTLV="0101ff"};X1(l.asn1.DERBoolean,l.asn1.ASN1Object);l.asn1.DERInteger=function($){l.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.params=null;var Y=Qr;if(this.setByBigInteger=function(X){this.isModified=!0,this.params={bigint:X}},this.setByInteger=function(X){this.isModified=!0,this.params=X},this.setValueHex=function(X){this.isModified=!0,this.params={hex:X}},this.getFreshValueHex=function(){var X=this.params,G=null;if(X==null)throw Error("value not set");if(typeof X=="object"&&X.hex!=null)return this.hV=X.hex,this.hV;if(typeof X=="number")G=new S0(String(X),10);else if(X.int!=null)G=new S0(String(X.int),10);else if(X.bigint!=null)G=X.bigint;else throw Error("wrong parameter");return this.hV=Y(G),this.hV},$!=null)this.params=$};X1(l.asn1.DERInteger,l.asn1.ASN1Object);l.asn1.DERBitString=function($){if($!==void 0&&typeof $.obj<"u"){var Y=l.asn1.ASN1Util.newObject($.obj);$.hex="00"+Y.tohex()}if(l.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(X){this.hTLV=null,this.isModified=!0,this.hV=X},this.setUnusedBitsAndHexValue=function(X,G){if(X<0||7<X)throw"unused bits shall be from 0 to 7: u = "+X;var J="0"+X;this.hTLV=null,this.isModified=!0,this.hV=J+G},this.setByBinaryString=function(X){X=X.replace(/0+$/,"");var G=8-X.length%8;if(G==8)G=0;X+="0000000".substr(0,G);var J="";for(var Q=0;Q<X.length-1;Q+=8){var W=X.substr(Q,8),Z=parseInt(W,2).toString(16);if(Z.length==1)Z="0"+Z;J+=Z}this.hTLV=null,this.isModified=!0,this.hV="0"+G+J},this.setByBooleanArray=function(X){var G="";for(var J=0;J<X.length;J++)if(X[J]==!0)G+="1";else G+="0";this.setByBinaryString(G)},this.newFalseArray=function(X){var G=Array(X);for(var J=0;J<X;J++)G[J]=!1;return G},this.getFreshValueHex=function(){return this.hV},typeof $<"u"){if(typeof $=="string"&&$.toLowerCase().match(/^[0-9a-f]+$/))this.setHexValueIncludingUnusedBits($);else if(typeof $.hex<"u")this.setHexValueIncludingUnusedBits($.hex);else if(typeof $.bin<"u")this.setByBinaryString($.bin);else if(typeof $.array<"u")this.setByBooleanArray($.array)}};X1(l.asn1.DERBitString,l.asn1.ASN1Object);l.asn1.DEROctetString=function($){if($!==void 0&&typeof $.obj<"u"){var Y=l.asn1.ASN1Util.newObject($.obj);$.hex=Y.tohex()}l.asn1.DEROctetString.superclass.constructor.call(this,$),this.hT="04"};X1(l.asn1.DEROctetString,l.asn1.DERAbstractString);l.asn1.DERNull=function(){l.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};X1(l.asn1.DERNull,l.asn1.ASN1Object);l.asn1.DERObjectIdentifier=function($){if(l.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(Y){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=Y},this.setValueOidString=function(Y){var X=po4(Y);if(X==null)throw Error("malformed oid string: "+Y);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=X},this.setValueName=function(Y){var X=l.asn1.x509.OID.name2oid(Y);if(X!=="")this.setValueOidString(X);else throw Error("DERObjectIdentifier oidName undefined: "+Y)},this.setValueNameOrOid=function(Y){if(Y.match(/^[0-2].[0-9.]+$/))this.setValueOidString(Y);else this.setValueName(Y)},this.getFreshValueHex=function(){return this.hV},this.setByParam=function(Y){if(typeof Y==="string")this.setValueNameOrOid(Y);else if(Y.oid!==void 0)this.setValueNameOrOid(Y.oid);else if(Y.name!==void 0)this.setValueNameOrOid(Y.name);else if(Y.hex!==void 0)this.setValueHex(Y.hex)},$!==void 0)this.setByParam($)};X1(l.asn1.DERObjectIdentifier,l.asn1.ASN1Object);l.asn1.DEREnumerated=function($){if(l.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(Y){this.hTLV=null,this.isModified=!0,this.hV=Qr(Y)},this.setByInteger=function(Y){var X=new S0(String(Y),10);this.setByBigInteger(X)},this.setValueHex=function(Y){this.hV=Y},this.getFreshValueHex=function(){return this.hV},typeof $<"u"){if(typeof $.int<"u")this.setByInteger($.int);else if(typeof $=="number")this.setByInteger($);else if(typeof $.hex<"u")this.setValueHex($.hex)}};X1(l.asn1.DEREnumerated,l.asn1.ASN1Object);l.asn1.DERUTF8String=function($){l.asn1.DERUTF8String.superclass.constructor.call(this,$),this.hT="0c"};X1(l.asn1.DERUTF8String,l.asn1.DERAbstractString);l.asn1.DERNumericString=function($){l.asn1.DERNumericString.superclass.constructor.call(this,$),this.hT="12"};X1(l.asn1.DERNumericString,l.asn1.DERAbstractString);l.asn1.DERPrintableString=function($){l.asn1.DERPrintableString.superclass.constructor.call(this,$),this.hT="13"};X1(l.asn1.DERPrintableString,l.asn1.DERAbstractString);l.asn1.DERTeletexString=function($){l.asn1.DERTeletexString.superclass.constructor.call(this,$),this.hT="14"};X1(l.asn1.DERTeletexString,l.asn1.DERAbstractString);l.asn1.DERIA5String=function($){l.asn1.DERIA5String.superclass.constructor.call(this,$),this.hT="16"};X1(l.asn1.DERIA5String,l.asn1.DERAbstractString);l.asn1.DERVisibleString=function($){l.asn1.DERIA5String.superclass.constructor.call(this,$),this.hT="1a"};X1(l.asn1.DERVisibleString,l.asn1.DERAbstractString);l.asn1.DERBMPString=function($){l.asn1.DERBMPString.superclass.constructor.call(this,$),this.hT="1e"};X1(l.asn1.DERBMPString,l.asn1.DERAbstractString);l.asn1.DERUTCTime=function($){if(l.asn1.DERUTCTime.superclass.constructor.call(this,$),this.hT="17",this.params=void 0,this.getFreshValueHex=function(){var Y=this.params;if(this.params==null)Y={date:new Date};if(typeof Y=="string")if(Y.match(/^[0-9]{12}Z$/)||Y.match(/^[0-9]{12}\.[0-9]+Z$/))this.hV=b2(Y);else throw Error("malformed string for UTCTime: "+Y);else if(Y.str!=null)this.hV=b2(Y.str);else if(Y.date==null&&Y.millis==!0){var X=new Date;this.hV=b2(this.formatDate(X,"utc",!0))}else if(Y.date!=null&&Y.date instanceof Date){var G=Y.millis===!0;this.hV=b2(this.formatDate(Y.date,"utc",G))}else if(Y instanceof Date)this.hV=b2(this.formatDate(Y,"utc"));if(this.hV==null)throw Error("parameter not specified properly for UTCTime");return this.hV},$!=null)this.setByParam($)};X1(l.asn1.DERUTCTime,l.asn1.DERAbstractTime);l.asn1.DERGeneralizedTime=function($){if(l.asn1.DERGeneralizedTime.superclass.constructor.call(this,$),this.hT="18",this.params=$,this.getFreshValueHex=function(){var Y=this.params;if(this.params==null)Y={date:new Date};if(typeof Y=="string")if(Y.match(/^[0-9]{14}Z$/)||Y.match(/^[0-9]{14}\.[0-9]+Z$/))this.hV=b2(Y);else throw Error("malformed string for GeneralizedTime: "+Y);else if(Y.str!=null)this.hV=b2(Y.str);else if(Y.date==null&&Y.millis==!0){var X=new Date;this.hV=b2(this.formatDate(X,"gen",!0))}else if(Y.date!=null&&Y.date instanceof Date){var G=Y.millis===!0;this.hV=b2(this.formatDate(Y.date,"gen",G))}else if(Y instanceof Date)this.hV=b2(this.formatDate(Y,"gen"));if(this.hV==null)throw Error("parameter not specified properly for GeneralizedTime");return this.hV},$!=null)this.setByParam($)};X1(l.asn1.DERGeneralizedTime,l.asn1.DERAbstractTime);l.asn1.DERSequence=function($){l.asn1.DERSequence.superclass.constructor.call(this,$),this.hT="30",this.getFreshValueHex=function(){var Y="";for(var X=0;X<this.asn1Array.length;X++){var G=this.asn1Array[X];Y+=G.tohex()}return this.hV=Y,this.hV}};X1(l.asn1.DERSequence,l.asn1.DERAbstractStructured);l.asn1.DERSet=function($){if(l.asn1.DERSet.superclass.constructor.call(this,$),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){var Y=[];for(var X=0;X<this.asn1Array.length;X++){var G=this.asn1Array[X];Y.push(G.tohex())}if(this.sortFlag==!0)Y.sort();return this.hV=Y.join(""),this.hV},typeof $<"u"){if(typeof $.sortflag<"u"&&$.sortflag==!1)this.sortFlag=!1}};X1(l.asn1.DERSet,l.asn1.DERAbstractStructured);l.asn1.DERTaggedObject=function($){l.asn1.DERTaggedObject.superclass.constructor.call(this);var Y=l.asn1,X=M1,G=X.getV,J=X.isASN1HEX,Q=Y.ASN1Util.newObject;if(this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.params={tag:"a0",explicit:!0},this.setASN1Object=function(W,Z,K){this.params={tag:Z,explicit:W,obj:K}},this.getFreshValueHex=function(){var W=this.params;if(W.explicit==null)W.explicit=!0;if(W.tage!=null)W.tag=W.tage,W.explicit=!0;if(W.tagi!=null)W.tag=W.tagi,W.explicit=!1;if(W.str!=null)this.hV=W30(W.str);else if(W.hex!=null)this.hV=W.hex;else if(W.obj!=null){var Z;if(W.obj instanceof Y.ASN1Object)Z=W.obj.tohex();else if(typeof W.obj=="object")Z=Q(W.obj).tohex();if(W.explicit)this.hV=Z;else this.hV=G(Z,0)}else throw Error("str, hex nor obj not specified");if(W.tag==null)W.tag="a0";return this.hT=W.tag,this.hTLV=null,this.isModified=!0,this.hV},this.setByParam=function(W){this.params=W},$!==void 0)this.setByParam($)};X1(l.asn1.DERTaggedObject,l.asn1.ASN1Object);var M1=new function(){};M1.getLblen=function($,Y){if($.substr(Y+2,1)!="8")return 1;var X=parseInt($.substr(Y+3,1));if(X==0)return-1;if(0<X&&X<10)return X+1;return-2};M1.getL=function($,Y){var X=M1.getLblen($,Y);if(X<1)return"";return $.substr(Y+2,X*2)};M1.getVblen=function($,Y){var X,G;if(X=M1.getL($,Y),X=="")return-1;if(X.substr(0,1)==="8")G=new S0(X.substr(2),16);else G=new S0(X,16);return G.intValue()};M1.getVidx=function($,Y){var X=M1.getLblen($,Y);if(X<0)return X;return Y+(X+1)*2};M1.getV=function($,Y){var X=M1.getVidx($,Y),G=M1.getVblen($,Y);return $.substr(X,G*2)};M1.getTLV=function($,Y){return $.substr(Y,2)+M1.getL($,Y)+M1.getV($,Y)};M1.getTLVblen=function($,Y){return 2+M1.getLblen($,Y)*2+M1.getVblen($,Y)*2};M1.getNextSiblingIdx=function($,Y){var X=M1.getVidx($,Y),G=M1.getVblen($,Y);return X+G*2};M1.getChildIdx=function($,Y){var X=M1,G=[],J,Q,W;if(J=X.getVidx($,Y),Q=X.getVblen($,Y)*2,J+Q>$.length)throw Error("too short ASN.1 value");if($.substr(Y,2)=="03")J+=2,Q-=2;W=0;var Z=J;while(W<=Q){var K=X.getTLVblen($,Z);if(K<=0)throw Error("malformed ASN.1: invalid TLV length");if(W+=K,W<=Q)G.push(Z);if(Z+=K,W>=Q)break}return G};M1.getNthChildIdx=function($,Y,X){var G=M1.getChildIdx($,Y);return G[X]};M1.getIdxbyList=function($,Y,X,G){var J=M1,Q,W;if(X.length==0){if(G!==void 0){if($.substr(Y,2)!==G)return-1}return Y}if(Q=X.shift(),W=J.getChildIdx($,Y),Q>=W.length)return-1;return J.getIdxbyList($,W[Q],X,G)};M1.getIdxbyListEx=function($,Y,X,G){var J=M1,Q,W;if(X.length==0){if(G!==void 0){if($.substr(Y,2)!==G)return-1}return Y}Q=X.shift(),W=J.getChildIdx($,Y);var Z=0;for(var K=0;K<W.length;K++){var H=$.substr(W[K],2);if(typeof Q=="number"&&!J.isContextTag(H)&&Z==Q||typeof Q=="string"&&J.isContextTag(H,Q))return J.getIdxbyListEx($,W[K],X,G);if(!J.isContextTag(H))Z++}return-1};M1.getTLVbyList=function($,Y,X,G){var J=M1,Q=J.getIdxbyList($,Y,X,G);if(Q==-1)return null;if(Q>=$.length)return null;return J.getTLV($,Q)};M1.getTLVbyListEx=function($,Y,X,G){var J=M1,Q=J.getIdxbyListEx($,Y,X,G);if(Q==-1)return null;return J.getTLV($,Q)};M1.getVbyList=function($,Y,X,G,J){var Q=M1,W,Z;if(W=Q.getIdxbyList($,Y,X,G),W==-1)return null;if(W>=$.length)return null;if(Z=Q.getV($,W),J===!0)Z=Z.substr(2);return Z};M1.getVbyListEx=function($,Y,X,G,J){var Q=M1,W,Z,K;if(W=Q.getIdxbyListEx($,Y,X,G),W==-1)return null;if(K=Q.getV($,W),$.substr(W,2)=="03"&&J!==!1)K=K.substr(2);return K};M1.getInt=function($,Y,X){if(X==null)X=-1;try{var G=$.substr(Y,2);if(G!="02"&&G!="03")return X;var J=M1.getV($,Y);if(G=="02")return parseInt(J,16);else return co4(J)}catch(Q){return X}};M1.getOID=function($,Y,X){if(X==null)X=null;try{if($.substr(Y,2)!="06")return X;var G=M1.getV($,Y);return Z30(G)}catch(J){return X}};M1.getOIDName=function($,Y,X){if(X==null)X=null;try{var G=M1.getOID($,Y,X);if(G==X)return X;var J=l.asn1.x509.OID.oid2name(G);if(J=="")return G;return J}catch(Q){return X}};M1.getString=function($,Y,X){if(X==null)X=null;try{var G=M1.getV($,Y);return n3(G)}catch(J){return X}};M1.hextooidstr=function($){var Y=function(V,A){if(V.length>=A)return V;return Array(A-V.length+1).join("0")+V},X=[],G=$.substr(0,2),J=parseInt(G,16);X[0]=new String(Math.floor(J/40)),X[1]=new String(J%40);var Q=$.substr(2),W=[];for(var Z=0;Z<Q.length/2;Z++)W.push(parseInt(Q.substr(Z*2,2),16));var K=[],H="";for(var Z=0;Z<W.length;Z++)if(W[Z]&128)H=H+Y((W[Z]&127).toString(2),7);else H=H+Y((W[Z]&127).toString(2),7),K.push(new String(parseInt(H,2))),H="";var z=X.join(".");if(K.length>0)z=z+"."+K.join(".");return z};M1.dump=function($,Y,X,G){var J=M1,Q=J.getV,W=J.dump,Z=J.getChildIdx,K=$;if($ instanceof l.asn1.ASN1Object)K=$.tohex();var H=function(w,I){if(w.length<=I*2)return w;else{var P=w.substr(0,I)+"..(total "+w.length/2+"bytes).."+w.substr(w.length-I,I);return P}};if(Y===void 0)Y={ommit_long_octet:32};if(X===void 0)X=0;if(G===void 0)G="";var z=Y.ommit_long_octet,R=K.substr(X,2);if(R=="01"){var V=Q(K,X);if(V=="00")return G+`BOOLEAN FALSE
`;else return G+`BOOLEAN TRUE
`}if(R=="02"){var V=Q(K,X);return G+"INTEGER "+H(V,z)+`
`}if(R=="03"){var V=Q(K,X);if(J.isASN1HEX(V.substr(2))){var A=G+`BITSTRING, encapsulates
`;return A=A+W(V.substr(2),Y,0,G+"  "),A}else return G+"BITSTRING "+H(V,z)+`
`}if(R=="04"){var V=Q(K,X);if(J.isASN1HEX(V)){var A=G+`OCTETSTRING, encapsulates
`;return A=A+W(V,Y,0,G+"  "),A}else return G+"OCTETSTRING "+H(V,z)+`
`}if(R=="05")return G+`NULL
`;if(R=="06"){var F=Q(K,X),N=l.asn1.ASN1Util.oidHexToInt(F),D=l.asn1.x509.OID.oid2name(N),L=N.replace(/\./g," ");if(D!="")return G+"ObjectIdentifier "+D+" ("+L+`)
`;else return G+"ObjectIdentifier ("+L+`)
`}if(R=="0a")return G+"ENUMERATED "+parseInt(Q(K,X))+`
`;if(R=="0c")return G+"UTF8String '"+S9(Q(K,X))+`'
`;if(R=="13")return G+"PrintableString '"+S9(Q(K,X))+`'
`;if(R=="14")return G+"TeletexString '"+S9(Q(K,X))+`'
`;if(R=="16")return G+"IA5String '"+S9(Q(K,X))+`'
`;if(R=="17")return G+"UTCTime "+S9(Q(K,X))+`
`;if(R=="18")return G+"GeneralizedTime "+S9(Q(K,X))+`
`;if(R=="1a")return G+"VisualString '"+S9(Q(K,X))+`'
`;if(R=="1e")return G+"BMPString '"+uG1(Q(K,X))+`'
`;if(R=="30"){if(K.substr(X,4)=="3000")return G+`SEQUENCE {}
`;var A=G+`SEQUENCE
`,B=Z(K,X),O=Y;if((B.length==2||B.length==3)&&K.substr(B[0],2)=="06"&&K.substr(B[B.length-1],2)=="04"){var D=J.oidname(Q(K,B[0])),E=JSON.parse(JSON.stringify(Y));E.x509ExtName=D,O=E}for(var M=0;M<B.length;M++)A=A+W(K,O,B[M],G+"  ");return A}if(R=="31"){var A=G+`SET
`,B=Z(K,X);for(var M=0;M<B.length;M++)A=A+W(K,Y,B[M],G+"  ");return A}var R=parseInt(R,16);if((R&128)!=0){var q=R&31;if((R&32)!=0){var A=G+"["+q+`]
`,B=Z(K,X);for(var M=0;M<B.length;M++)A=A+W(K,Y,B[M],G+"  ");return A}else{var V=Q(K,X);if(M1.isASN1HEX(V)){var A=G+"["+q+`]
`;return A=A+W(V,Y,0,G+"  "),A}else if(V.substr(0,8)=="68747470")V=S9(V);else if(Y.x509ExtName==="subjectAltName"&&q==2)V=S9(V);var A=G+"["+q+"] "+V+`
`;return A}}return G+"UNKNOWN("+R+") "+Q(K,X)+`
`};M1.parse=function($){var Y=M1,X=Y.parse,G=Y.isASN1HEX,J=Y.getV,Q=Y.getTLV,W=Y.getChildIdx,Z=l.asn1,K=Z.ASN1Util.oidHexToInt,H=Z.x509.OID.oid2name,z=S9,V=uG1,A=ko4,F={"0c":"utf8str","12":"numstr","13":"prnstr","14":"telstr","16":"ia5str","17":"utctime","18":"gentime","1a":"visstr","1e":"bmpstr","30":"seq","31":"set"},N=function(P){var _=[],C=W(P,0);for(var k=0;k<C.length;k++){var S=C[k],T=Q(P,S),v=X(T);_.push(v)}return _},D=$.substr(0,2),L={},B=J($,0);if(D=="01"){if($=="0101ff")return{bool:!0};return{bool:!1}}else if(D=="02")return{int:{hex:B}};else if(D=="03")try{if(B.substr(0,2)!="00")throw"not encap";var O=B.substr(2);if(!G(O))throw"not encap";return{bitstr:{obj:X(O)}}}catch(P){var E=null;if(B.length<=10)E=lo4(B);if(E==null)return{bitstr:{hex:B}};else return{bitstr:{bin:E}}}else if(D=="04")try{if(!G(B))throw"not encap";return{octstr:{obj:X(B)}}}catch(P){return{octstr:{hex:B}}}else if(D=="05")return{null:""};else if(D=="06"){var M=K(B),R=H(M);if(R=="")return{oid:M};else return{oid:R}}else if(D=="0a")if(B.length>4)return{enum:{hex:B}};else return{enum:parseInt(B,16)};else if(D=="30"||D=="31")return L[F[D]]=N($),L;else if(D=="14"){var q=A(B);return L[F[D]]={str:q},L}else if(D=="1e"){var q=V(B);return L[F[D]]={str:q},L}else if(":0c:12:13:16:17:18:1a:".indexOf(D)!=-1){var q=z(B);return L[F[D]]={str:q},L}else if(D.match(/^8[0-9]$/)){var q=z(B);if(q==null|q=="")return{tag:{tag:D,explicit:!1,hex:B}};else if(q.match(/[\x00-\x1F\x7F-\x9F]/)!=null||q.match(/[\u0000-\u001F\u0080\u2013\u009F]/)!=null)return{tag:{tag:D,explicit:!1,hex:B}};else return{tag:{tag:D,explicit:!1,str:q}}}else if(D.match(/^a[0-9]$/))try{if(!G(B))throw Error("not encap");return{tag:{tag:D,explicit:!0,obj:X(B)}}}catch(P){return{tag:{tag:D,explicit:!0,hex:B}}}else{var w=new l.asn1.ASN1Object;w.hV=B;var I=w.getLengthHexFromValue();return{asn1:{tlv:D+I+B}}}};M1.isContextTag=function($,Y){$=$.toLowerCase();var X,G;try{X=parseInt($,16)}catch(Q){return-1}if(Y===void 0)if((X&192)==128)return!0;else return!1;try{var J=Y.match(/^\[[0-9]+\]$/);if(J==null)return!1;if(G=parseInt(Y.substr(1,Y.length-1),10),G>31)return!1;if((X&192)==128&&(X&31)==G)return!0;return!1}catch(Q){return!1}};M1.isASN1HEX=function($){var Y=M1;if($.length%2==1)return!1;var X=Y.getVblen($,0),G=$.substr(0,2),J=Y.getL($,0),Q=$.length-G.length-J.length;if(Q==X*2)return!0;return!1};M1.checkStrictDER=function($,Y,X,G,J){var Q=M1;if(X===void 0){if(typeof $!="string")throw Error("not hex string");if($=$.toLowerCase(),!l.lang.String.isHex($))throw Error("not hex string");if(X=$.length,G=$.length/2,G<128)J=1;else J=Math.ceil(G.toString(16))+1}var W=Q.getL($,Y);if(W.length>J*2)throw Error("L of TLV too long: idx="+Y);var Z=Q.getVblen($,Y);if(Z>G)throw Error("value of L too long than hex: idx="+Y);var K=Q.getTLV($,Y),H=K.length-2-Q.getL($,Y).length;if(H!==Z*2)throw Error("V string length and L's value not the same:"+H+"/"+Z*2);if(Y===0){if($.length!=K.length)throw Error("total length and TLV length unmatch:"+$.length+"!="+K.length)}var z=$.substr(Y,2);if(z==="02"){var V=Q.getVidx($,Y);if($.substr(V,2)=="00"&&$.charCodeAt(V+2)<56)throw Error("not least zeros for DER INTEGER")}if(parseInt(z,16)&32){var A=Q.getVblen($,Y),F=0,N=Q.getChildIdx($,Y);for(var D=0;D<N.length;D++){var L=Q.getTLV($,N[D]);F+=L.length,Q.checkStrictDER($,N[D],X,G,J)}if(A*2!=F)throw Error("sum of children's TLV length and L unmatch: "+A*2+"!="+F)}};M1.oidname=function($){var Y=l.asn1;if(l.lang.String.isHex($))$=Y.ASN1Util.oidHexToInt($);var X=Y.x509.OID.oid2name($);if(X==="")X=$;return X};if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};if(typeof l.asn1.x509>"u"||!l.asn1.x509)l.asn1.x509={};l.asn1.x509.Certificate=function($){l.asn1.x509.Certificate.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.DERBitString,J=X.DERSequence,Q=X.x509,W=Q.TBSCertificate,Z=Q.AlgorithmIdentifier;if(this.params=void 0,this.setByParam=function(K){this.params=K},this.sign=function(){var K=this.params,H=K.sigalg;if(K.sigalg.name!=null)H=K.sigalg.name;var z=K.tbsobj.tohex(),V=new l.crypto.Signature({alg:H});V.init(K.cakey),V.updateHex(z),K.sighex=V.sign()},this.getPEM=function(){return RG(this.tohex(),"CERTIFICATE")},this.tohex=function(){var K=this.params;if(K.tbsobj==null||K.tbsobj==null)K.tbsobj=new W(K);if(K.sighex==null&&K.cakey!=null)this.sign();if(K.sighex==null)throw Error("sighex or cakey parameter not defined");var H=[];H.push(K.tbsobj),H.push(new Z({name:K.sigalg})),H.push(new G({hex:"00"+K.sighex}));var z=new J({array:H});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.params=$};X1(l.asn1.x509.Certificate,l.asn1.ASN1Object);l.asn1.x509.TBSCertificate=function($){l.asn1.x509.TBSCertificate.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.x509,J=X.DERTaggedObject,Q=X.DERInteger,W=X.DERSequence,Z=G.AlgorithmIdentifier,K=G.Time,H=G.X500Name,z=G.Extensions,V=G.SubjectPublicKeyInfo;if(this.params=null,this.setByParam=function(A){this.params=A},this.tohex=function(){var A=[],F=this.params;if(F.version!=null||F.version!=1){var N=2;if(F.version!=null)N=F.version-1;var D=new J({obj:new Q({int:N})});A.push(D)}if(A.push(new Q(F.serial)),A.push(new Z({name:F.sigalg})),A.push(new H(F.issuer)),A.push(new W({array:[new K(F.notbefore),new K(F.notafter)]})),A.push(new H(F.subject)),A.push(new V(K8.getKey(F.sbjpubkey))),F.ext!==void 0&&F.ext.length>0)A.push(new J({tag:"a3",obj:new z(F.ext)}));var L=new l.asn1.DERSequence({array:A});return L.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.TBSCertificate,l.asn1.ASN1Object);l.asn1.x509.Extensions=function($){l.asn1.x509.Extensions.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.DERSequence,J=X.x509;if(this.aParam=[],this.setByParam=function(Q){this.aParam=Q},this.tohex=function(){var Q=[];for(var W=0;W<this.aParam.length;W++){var Z=this.aParam[W],K=Z.extname,H=null;if(Z.extn!=null)H=new J.PrivateExtension(Z);else if(K=="subjectKeyIdentifier")H=new J.SubjectKeyIdentifier(Z);else if(K=="keyUsage")H=new J.KeyUsage(Z);else if(K=="subjectAltName")H=new J.SubjectAltName(Z);else if(K=="issuerAltName")H=new J.IssuerAltName(Z);else if(K=="basicConstraints")H=new J.BasicConstraints(Z);else if(K=="nameConstraints")H=new J.NameConstraints(Z);else if(K=="cRLDistributionPoints")H=new J.CRLDistributionPoints(Z);else if(K=="certificatePolicies")H=new J.CertificatePolicies(Z);else if(K=="policyMappings")H=new J.PolicyMappings(Z);else if(K=="policyConstraints")H=new J.PolicyConstraints(Z);else if(K=="inhibitAnyPolicy")H=new J.InhibitAnyPolicy(Z);else if(K=="authorityKeyIdentifier")H=new J.AuthorityKeyIdentifier(Z);else if(K=="extKeyUsage")H=new J.ExtKeyUsage(Z);else if(K=="authorityInfoAccess")H=new J.AuthorityInfoAccess(Z);else if(K=="cRLNumber")H=new J.CRLNumber(Z);else if(K=="cRLReason")H=new J.CRLReason(Z);else if(K=="ocspNonce")H=new J.OCSPNonce(Z);else if(K=="ocspNoCheck")H=new J.OCSPNoCheck(Z);else if(K=="adobeTimeStamp")H=new J.AdobeTimeStamp(Z);else if(K=="subjectDirectoryAttributes")H=new J.SubjectDirectoryAttributes(Z);else throw Error("extension not supported:"+JSON.stringify(Z));if(H!=null)Q.push(H)}var z=new G({array:Q});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.x509.Extensions,l.asn1.ASN1Object);l.asn1.x509.Extension=function($){l.asn1.x509.Extension.superclass.constructor.call(this);var Y=null,X=l,G=X.asn1,J=G.DERObjectIdentifier,Q=G.DEROctetString,W=G.DERBitString,Z=G.DERBoolean,K=G.DERSequence;if(this.tohex=function(){var H=new J({oid:this.oid}),z=new Q({hex:this.getExtnValueHex()}),V=[];if(V.push(H),this.critical)V.push(new Z);V.push(z);var A=new K({array:V});return A.tohex()},this.getEncodedHex=function(){return this.tohex()},this.critical=!1,$!==void 0){if($.critical!==void 0)this.critical=$.critical}};X1(l.asn1.x509.Extension,l.asn1.ASN1Object);l.asn1.x509.KeyUsage=function($){l.asn1.x509.KeyUsage.superclass.constructor.call(this,$);var Y=Error,X={digitalSignature:0,nonRepudiation:1,keyEncipherment:2,dataEncipherment:3,keyAgreement:4,keyCertSign:5,cRLSign:6,encipherOnly:7,decipherOnly:8};if(this.getExtnValueHex=function(){var G=this.getBinValue();return this.asn1ExtnValue=new l.asn1.DERBitString({bin:G}),this.asn1ExtnValue.tohex()},this.getBinValue=function(){var G=this.params;if(typeof G!="object"||typeof G.names!="object"&&typeof G.bin!="string")throw new Y("parameter not yet set");if(G.names!=null)return eK0(G.names,X);else if(G.bin!=null)return G.bin;else throw new Y("parameter not set properly")},this.oid="2.5.29.15",$!==void 0)this.params=$};X1(l.asn1.x509.KeyUsage,l.asn1.x509.Extension);l.asn1.x509.BasicConstraints=function($){l.asn1.x509.BasicConstraints.superclass.constructor.call(this,$);var Y=l.asn1,X=Y.DERBoolean,G=Y.DERInteger,J=Y.DERSequence,Q=!1,W=-1;if(this.getExtnValueHex=function(){var Z=[];if(this.cA)Z.push(new X);if(this.pathLen>-1)Z.push(new G({int:this.pathLen}));var K=new J({array:Z});return this.asn1ExtnValue=K,this.asn1ExtnValue.tohex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,$!==void 0){if($.cA!==void 0)this.cA=$.cA;if($.pathLen!==void 0)this.pathLen=$.pathLen}};X1(l.asn1.x509.BasicConstraints,l.asn1.x509.Extension);l.asn1.x509.CRLDistributionPoints=function($){l.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509;if(this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.setByDPArray=function(J){var Q=[];for(var W=0;W<J.length;W++)if(J[W]instanceof l.asn1.ASN1Object)Q.push(J[W]);else{var Z=new G.DistributionPoint(J[W]);Q.push(Z)}this.asn1ExtnValue=new X.DERSequence({array:Q})},this.setByOneURI=function(J){var Q=new G.DistributionPoint({fulluri:J});this.setByDPArray([Q])},this.oid="2.5.29.31",$!==void 0){if($.array!==void 0)this.setByDPArray($.array);else if($.uri!==void 0)this.setByOneURI($.uri)}};X1(l.asn1.x509.CRLDistributionPoints,l.asn1.x509.Extension);l.asn1.x509.DistributionPoint=function($){l.asn1.x509.DistributionPoint.superclass.constructor.call(this);var Y=null,X=l,G=X.asn1,J=G.x509.DistributionPointName;if(this.tohex=function(){var Q=new G.DERSequence;if(this.asn1DP!=null){var W=new G.DERTaggedObject({explicit:!0,tag:"a0",obj:this.asn1DP});Q.appendASN1Object(W)}return this.hTLV=Q.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if($.dpobj!==void 0)this.asn1DP=$.dpobj;else if($.dpname!==void 0)this.asn1DP=new J($.dpname);else if($.fulluri!==void 0)this.asn1DP=new J({full:[{uri:$.fulluri}]})}};X1(l.asn1.x509.DistributionPoint,l.asn1.ASN1Object);l.asn1.x509.DistributionPointName=function($){l.asn1.x509.DistributionPointName.superclass.constructor.call(this);var Y=null,X=null,G=null,J=null,Q=l,W=Q.asn1,Z=W.DERTaggedObject;if(this.tohex=function(){if(this.type!="full")throw Error("currently type shall be 'full': "+this.type);return this.asn1Obj=new Z({explicit:!1,tag:this.tag,obj:this.asn1V}),this.hTLV=this.asn1Obj.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0)if(W.x509.GeneralNames.prototype.isPrototypeOf($))this.type="full",this.tag="a0",this.asn1V=$;else if($.full!==void 0)this.type="full",this.tag="a0",this.asn1V=new W.x509.GeneralNames($.full);else throw Error("This class supports GeneralNames only as argument")};X1(l.asn1.x509.DistributionPointName,l.asn1.ASN1Object);l.asn1.x509.CertificatePolicies=function($){l.asn1.x509.CertificatePolicies.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509,J=X.DERSequence,Q=G.PolicyInformation;if(this.params=null,this.getExtnValueHex=function(){var W=[];for(var Z=0;Z<this.params.array.length;Z++)W.push(new Q(this.params.array[Z]));var K=new J({array:W});return this.asn1ExtnValue=K,this.asn1ExtnValue.tohex()},this.oid="2.5.29.32",$!==void 0)this.params=$};X1(l.asn1.x509.CertificatePolicies,l.asn1.x509.Extension);l.asn1.x509.PolicyInformation=function($){l.asn1.x509.PolicyInformation.superclass.constructor.call(this,$);var Y=l.asn1,X=Y.DERSequence,G=Y.DERObjectIdentifier,J=Y.x509.PolicyQualifierInfo;if(this.params=null,this.tohex=function(){if(this.params.policyoid===void 0&&this.params.array===void 0)throw Error("parameter oid and array missing");var Q=[new G(this.params.policyoid)];if(this.params.array!==void 0){var W=[];for(var Z=0;Z<this.params.array.length;Z++)W.push(new J(this.params.array[Z]));if(W.length>0)Q.push(new X({array:W}))}var K=new X({array:Q});return K.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.params=$};X1(l.asn1.x509.PolicyInformation,l.asn1.ASN1Object);l.asn1.x509.PolicyQualifierInfo=function($){l.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this,$);var Y=l.asn1,X=Y.DERSequence,G=Y.DERIA5String,J=Y.DERObjectIdentifier,Q=Y.x509.UserNotice;if(this.params=null,this.tohex=function(){if(this.params.cps!==void 0){var W=new X({array:[new J({oid:"1.3.6.1.5.5.7.2.1"}),new G({str:this.params.cps})]});return W.tohex()}if(this.params.unotice!=null){var W=new X({array:[new J({oid:"1.3.6.1.5.5.7.2.2"}),new Q(this.params.unotice)]});return W.tohex()}},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.params=$};X1(l.asn1.x509.PolicyQualifierInfo,l.asn1.ASN1Object);l.asn1.x509.UserNotice=function($){l.asn1.x509.UserNotice.superclass.constructor.call(this,$);var Y=l.asn1.DERSequence,X=l.asn1.DERInteger,G=l.asn1.x509.DisplayText,J=l.asn1.x509.NoticeReference;if(this.params=null,this.tohex=function(){var Q=[];if(this.params.noticeref!==void 0)Q.push(new J(this.params.noticeref));if(this.params.exptext!==void 0)Q.push(new G(this.params.exptext));var W=new Y({array:Q});return W.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.params=$};X1(l.asn1.x509.UserNotice,l.asn1.ASN1Object);l.asn1.x509.NoticeReference=function($){l.asn1.x509.NoticeReference.superclass.constructor.call(this,$);var Y=l.asn1.DERSequence,X=l.asn1.DERInteger,G=l.asn1.x509.DisplayText;if(this.params=null,this.tohex=function(){var J=[];if(this.params.org!==void 0)J.push(new G(this.params.org));if(this.params.noticenum!==void 0){var Q=[],W=this.params.noticenum;for(var Z=0;Z<W.length;Z++)Q.push(new X(W[Z]));J.push(new Y({array:Q}))}if(J.length==0)throw Error("parameter is empty");var K=new Y({array:J});return K.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.params=$};X1(l.asn1.x509.NoticeReference,l.asn1.ASN1Object);l.asn1.x509.DisplayText=function($){if(l.asn1.x509.DisplayText.superclass.constructor.call(this,$),this.hT="0c",$!==void 0){if($.type==="ia5")this.hT="16";else if($.type==="vis")this.hT="1a";else if($.type==="bmp")this.hT="1e"}};X1(l.asn1.x509.DisplayText,l.asn1.DERAbstractString);l.asn1.x509.PolicyMappings=function($){l.asn1.x509.PolicyMappings.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509,J=X.ASN1Util.newObject;if(this.params=null,this.getExtnValueHex=function(){var Q=this.params,W=[];for(var Z=0;Z<Q.array.length;Z++){var K=Q.array[Z];W.push({seq:[{oid:K[0]},{oid:K[1]}]})}return this.asn1ExtnValue=J({seq:W}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.33",$!==void 0)this.params=$};X1(l.asn1.x509.PolicyMappings,l.asn1.x509.Extension);l.asn1.x509.PolicyConstraints=function($){l.asn1.x509.PolicyConstraints.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509,J=X.ASN1Util.newObject;if(this.params=null,this.getExtnValueHex=function(){var Q=this.params,W=[];if(Q.reqexp!=null)W.push({tag:{tagi:"80",obj:{int:Q.reqexp}}});if(Q.inhibit!=null)W.push({tag:{tagi:"81",obj:{int:Q.inhibit}}});return this.asn1ExtnValue=J({seq:W}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.36",$!==void 0)this.params=$};X1(l.asn1.x509.PolicyConstraints,l.asn1.x509.Extension);l.asn1.x509.InhibitAnyPolicy=function($){l.asn1.x509.InhibitAnyPolicy.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509,J=X.ASN1Util.newObject;if(this.params=null,this.getExtnValueHex=function(){return this.asn1ExtnValue=J({int:this.params.skip}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.54",$!==void 0)this.params=$};X1(l.asn1.x509.InhibitAnyPolicy,l.asn1.x509.Extension);l.asn1.x509.NameConstraints=function($){l.asn1.x509.NameConstraints.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509,J=X.ASN1Util.newObject,Q=G.GeneralSubtree;if(this.params=null,this.getExtnValueHex=function(){var W=this.params,Z=[];if(W.permit!=null&&W.permit.length!=null){var K=[];for(var H=0;H<W.permit.length;H++)K.push(new Q(W.permit[H]));Z.push({tag:{tagi:"a0",obj:{seq:K}}})}if(W.exclude!=null&&W.exclude.length!=null){var z=[];for(var H=0;H<W.exclude.length;H++)z.push(new Q(W.exclude[H]));Z.push({tag:{tagi:"a1",obj:{seq:z}}})}return this.asn1ExtnValue=J({seq:Z}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.30",$!==void 0)this.params=$};X1(l.asn1.x509.NameConstraints,l.asn1.x509.Extension);l.asn1.x509.GeneralSubtree=function($){l.asn1.x509.GeneralSubtree.superclass.constructor.call(this);var Y=l.asn1,X=Y.x509,G=X.GeneralName,J=Y.ASN1Util.newObject;if(this.params=null,this.setByParam=function(Q){this.params=Q},this.tohex=function(){var Q=this.params,W=[new G(Q)];if(Q.min!=null)W.push({tag:{tagi:"80",obj:{int:Q.min}}});if(Q.max!=null)W.push({tag:{tagi:"81",obj:{int:Q.max}}});var Z=J({seq:W});return Z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.GeneralSubtree,l.asn1.ASN1Object);l.asn1.x509.ExtKeyUsage=function($){l.asn1.x509.ExtKeyUsage.superclass.constructor.call(this,$);var Y=l,X=Y.asn1;if(this.setPurposeArray=function(G){this.asn1ExtnValue=new X.DERSequence;for(var J=0;J<G.length;J++){var Q=new X.DERObjectIdentifier(G[J]);this.asn1ExtnValue.appendASN1Object(Q)}},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="2.5.29.37",$!==void 0){if($.array!==void 0)this.setPurposeArray($.array)}};X1(l.asn1.x509.ExtKeyUsage,l.asn1.x509.Extension);l.asn1.x509.AuthorityKeyIdentifier=function($){l.asn1.x509.AuthorityKeyIdentifier.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.DERTaggedObject,J=X.x509.GeneralNames,Q=Y.crypto.Util.isKey;if(this.asn1KID=null,this.asn1CertIssuer=null,this.asn1CertSN=null,this.getExtnValueHex=function(){var W=[];if(this.asn1KID)W.push(new G({explicit:!1,tag:"80",obj:this.asn1KID}));if(this.asn1CertIssuer)W.push(new G({explicit:!1,tag:"a1",obj:new J([{dn:this.asn1CertIssuer}])}));if(this.asn1CertSN)W.push(new G({explicit:!1,tag:"82",obj:this.asn1CertSN}));var Z=new X.DERSequence({array:W});return this.asn1ExtnValue=Z,this.asn1ExtnValue.tohex()},this.setKIDByParam=function(W){if(W.str!==void 0||W.hex!==void 0)this.asn1KID=new l.asn1.DEROctetString(W);else if(typeof W==="object"&&l.crypto.Util.isKey(W)||typeof W==="string"&&W.indexOf("BEGIN ")!=-1){var Z=W;if(typeof W==="string")Z=K8.getKey(W);var K=K8.getKeyID(Z);this.asn1KID=new l.asn1.DEROctetString({hex:K})}},this.setCertIssuerByParam=function(W){if(W.str!==void 0||W.ldapstr!==void 0||W.hex!==void 0||W.certsubject!==void 0||W.certissuer!==void 0)this.asn1CertIssuer=new l.asn1.x509.X500Name(W);else if(typeof W==="string"&&W.indexOf("BEGIN ")!=-1&&W.indexOf("CERTIFICATE")!=-1)this.asn1CertIssuer=new l.asn1.x509.X500Name({certissuer:W})},this.setCertSNByParam=function(W){if(W.str!==void 0||W.bigint!==void 0||W.hex!==void 0)this.asn1CertSN=new l.asn1.DERInteger(W);else if(typeof W==="string"&&W.indexOf("BEGIN ")!=-1&&W.indexOf("CERTIFICATE")){var Z=new e4;Z.readCertPEM(W);var K=Z.getSerialNumberHex();this.asn1CertSN=new l.asn1.DERInteger({hex:K})}},this.oid="2.5.29.35",$!==void 0){if($.kid!==void 0)this.setKIDByParam($.kid);if($.issuer!==void 0)this.setCertIssuerByParam($.issuer);if($.sn!==void 0)this.setCertSNByParam($.sn);if($.issuersn!==void 0&&typeof $.issuersn==="string"&&$.issuersn.indexOf("BEGIN ")!=-1&&$.issuersn.indexOf("CERTIFICATE"))this.setCertSNByParam($.issuersn),this.setCertIssuerByParam($.issuersn)}};X1(l.asn1.x509.AuthorityKeyIdentifier,l.asn1.x509.Extension);l.asn1.x509.SubjectKeyIdentifier=function($){l.asn1.x509.SubjectKeyIdentifier.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.DEROctetString;if(this.asn1KID=null,this.getExtnValueHex=function(){return this.asn1ExtnValue=this.asn1KID,this.asn1ExtnValue.tohex()},this.setKIDByParam=function(J){if(J.str!==void 0||J.hex!==void 0)this.asn1KID=new G(J);else if(typeof J==="object"&&l.crypto.Util.isKey(J)||typeof J==="string"&&J.indexOf("BEGIN")!=-1){var Q=J;if(typeof J==="string")Q=K8.getKey(J);var W=K8.getKeyID(Q);this.asn1KID=new l.asn1.DEROctetString({hex:W})}},this.oid="2.5.29.14",$!==void 0){if($.kid!==void 0)this.setKIDByParam($.kid)}};X1(l.asn1.x509.SubjectKeyIdentifier,l.asn1.x509.Extension);l.asn1.x509.AuthorityInfoAccess=function($){if(l.asn1.x509.AuthorityInfoAccess.superclass.constructor.call(this,$),this.setAccessDescriptionArray=function(Y){var X=[],G=l,J=G.asn1,Q=J.DERSequence,W=J.DERObjectIdentifier,Z=J.x509.GeneralName;for(var K=0;K<Y.length;K++){var H,z=Y[K];if(z.ocsp!==void 0)H=new Q({array:[new W({oid:"1.3.6.1.5.5.7.48.1"}),new Z({uri:z.ocsp})]});else if(z.caissuer!==void 0)H=new Q({array:[new W({oid:"1.3.6.1.5.5.7.48.2"}),new Z({uri:z.caissuer})]});else throw Error("unknown AccessMethod parameter: "+JSON.stringify(z));X.push(H)}this.asn1ExtnValue=new Q({array:X})},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="1.3.6.1.5.5.7.1.1",$!==void 0){if($.array!==void 0)this.setAccessDescriptionArray($.array)}};X1(l.asn1.x509.AuthorityInfoAccess,l.asn1.x509.Extension);l.asn1.x509.SubjectAltName=function($){if(l.asn1.x509.SubjectAltName.superclass.constructor.call(this,$),this.setNameArray=function(Y){this.asn1ExtnValue=new l.asn1.x509.GeneralNames(Y)},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="2.5.29.17",$!==void 0){if($.array!==void 0)this.setNameArray($.array)}};X1(l.asn1.x509.SubjectAltName,l.asn1.x509.Extension);l.asn1.x509.IssuerAltName=function($){if(l.asn1.x509.IssuerAltName.superclass.constructor.call(this,$),this.setNameArray=function(Y){this.asn1ExtnValue=new l.asn1.x509.GeneralNames(Y)},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="2.5.29.18",$!==void 0){if($.array!==void 0)this.setNameArray($.array)}};X1(l.asn1.x509.IssuerAltName,l.asn1.x509.Extension);l.asn1.x509.SubjectDirectoryAttributes=function($){l.asn1.x509.SubjectDirectoryAttributes.superclass.constructor.call(this,$);var Y=l.asn1,X=Y.DERSequence,G=Y.ASN1Util.newObject,J=Y.x509.OID.name2oid;if(this.params=null,this.getExtnValueHex=function(){var Q=[];for(var W=0;W<this.params.array.length;W++){var Z=this.params.array[W];if(Z.attr!=null&&Z.array!=null){var K={seq:[{oid:Z.attr},{set:Z.array}]};Q.push(G(K));continue}var H={seq:[{oid:"1.2.3.4"},{set:[{utf8str:"DE"}]}]};if(Z.attr=="dateOfBirth")H.seq[0].oid=J(Z.attr),H.seq[1].set[0]={gentime:Z.str};else if(Z.attr=="placeOfBirth")H.seq[0].oid=J(Z.attr),H.seq[1].set[0]={utf8str:Z.str};else if(Z.attr=="gender")H.seq[0].oid=J(Z.attr),H.seq[1].set[0]={prnstr:Z.str};else if(Z.attr=="countryOfCitizenship")H.seq[0].oid=J(Z.attr),H.seq[1].set[0]={prnstr:Z.str};else if(Z.attr=="countryOfResidence")H.seq[0].oid=J(Z.attr),H.seq[1].set[0]={prnstr:Z.str};else throw Error("unsupported attribute: "+Z.attr);Q.push(new G(H))}var z=new X({array:Q});return this.asn1ExtnValue=z,this.asn1ExtnValue.tohex()},this.oid="2.5.29.9",$!==void 0)this.params=$};X1(l.asn1.x509.SubjectDirectoryAttributes,l.asn1.x509.Extension);l.asn1.x509.PrivateExtension=function($){l.asn1.x509.PrivateExtension.superclass.constructor.call(this,$);var Y=l,X=Y.lang.String.isHex,G=Y.asn1,J=G.x509.OID.name2oid,Q=G.ASN1Util.newObject;if(this.params=null,this.setByParam=function(W){this.oid=J(W.extname),this.params=W},this.getExtnValueHex=function(){if(this.params.extname==null||this.params.extn==null)throw Error("extname or extnhex not specified");var W=this.params.extn;if(typeof W=="string"&&X(W))return W;else if(typeof W=="object")try{return Q(W).tohex()}catch(Z){}throw Error("unsupported extn value")},$!=null)this.setByParam($)};X1(l.asn1.x509.PrivateExtension,l.asn1.x509.Extension);l.asn1.x509.CRL=function($){l.asn1.x509.CRL.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.DERSequence,J=X.DERBitString,Q=X.x509,W=Q.AlgorithmIdentifier,Z=Q.TBSCertList;if(this.params=void 0,this.setByParam=function(K){this.params=K},this.sign=function(){var K=new Z(this.params).tohex(),H=new l.crypto.Signature({alg:this.params.sigalg});H.init(this.params.cakey),H.updateHex(K);var z=H.sign();this.params.sighex=z},this.getPEM=function(){return RG(this.tohex(),"X509 CRL")},this.tohex=function(){var K=this.params;if(K.tbsobj==null)K.tbsobj=new Z(K);if(K.sighex==null&&K.cakey!=null)this.sign();if(K.sighex==null)throw Error("sighex or cakey parameter not defined");var H=[];H.push(K.tbsobj),H.push(new W({name:K.sigalg})),H.push(new J({hex:"00"+K.sighex}));var z=new G({array:H});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.params=$};X1(l.asn1.x509.CRL,l.asn1.ASN1Object);l.asn1.x509.TBSCertList=function($){l.asn1.x509.TBSCertList.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.DERInteger,J=X.DERSequence,Q=X.DERTaggedObject,W=X.DERObjectIdentifier,Z=X.x509,K=Z.AlgorithmIdentifier,H=Z.Time,z=Z.Extensions,V=Z.X500Name;if(this.params=null,this.setByParam=function(A){this.params=A},this.getRevCertSequence=function(){var A=[],F=this.params.revcert;for(var N=0;N<F.length;N++){var D=[new G(F[N].sn),new H(F[N].date)];if(F[N].ext!=null)D.push(new z(F[N].ext));A.push(new J({array:D}))}return new J({array:A})},this.tohex=function(){var A=[],F=this.params;if(F.version!=null){var N=F.version-1,D=new G({int:N});A.push(D)}if(A.push(new K({name:F.sigalg})),A.push(new V(F.issuer)),A.push(new H(F.thisupdate)),F.nextupdate!=null)A.push(new H(F.nextupdate));if(F.revcert!=null)A.push(this.getRevCertSequence());if(F.ext!=null){var L=new z(F.ext);A.push(new Q({tag:"a0",explicit:!0,obj:L}))}var B=new J({array:A});return B.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.TBSCertList,l.asn1.ASN1Object);l.asn1.x509.CRLEntry=function($){l.asn1.x509.CRLEntry.superclass.constructor.call(this);var Y=null,X=null,G=l,J=G.asn1;if(this.setCertSerial=function(Q){this.sn=new J.DERInteger(Q)},this.setRevocationDate=function(Q){this.time=new J.x509.Time(Q)},this.tohex=function(){var Q=new J.DERSequence({array:[this.sn,this.time]});return this.TLV=Q.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if($.time!==void 0)this.setRevocationDate($.time);if($.sn!==void 0)this.setCertSerial($.sn)}};X1(l.asn1.x509.CRLEntry,l.asn1.ASN1Object);l.asn1.x509.CRLNumber=function($){if(l.asn1.x509.CRLNumber.superclass.constructor.call(this,$),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new l.asn1.DERInteger(this.params.num),this.asn1ExtnValue.tohex()},this.oid="2.5.29.20",$!=null)this.params=$};X1(l.asn1.x509.CRLNumber,l.asn1.x509.Extension);l.asn1.x509.CRLReason=function($){if(l.asn1.x509.CRLReason.superclass.constructor.call(this,$),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new l.asn1.DEREnumerated(this.params.code),this.asn1ExtnValue.tohex()},this.oid="2.5.29.21",$!=null)this.params=$};X1(l.asn1.x509.CRLReason,l.asn1.x509.Extension);l.asn1.x509.OCSPNonce=function($){if(l.asn1.x509.OCSPNonce.superclass.constructor.call(this,$),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new l.asn1.DEROctetString(this.params),this.asn1ExtnValue.tohex()},this.oid="1.3.6.1.5.5.7.48.1.2",$!=null)this.params=$};X1(l.asn1.x509.OCSPNonce,l.asn1.x509.Extension);l.asn1.x509.OCSPNoCheck=function($){if(l.asn1.x509.OCSPNoCheck.superclass.constructor.call(this,$),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new l.asn1.DERNull,this.asn1ExtnValue.tohex()},this.oid="1.3.6.1.5.5.7.48.1.5",$!=null)this.params=$};X1(l.asn1.x509.OCSPNoCheck,l.asn1.x509.Extension);l.asn1.x509.AdobeTimeStamp=function($){l.asn1.x509.AdobeTimeStamp.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.DERInteger,J=X.DERBoolean,Q=X.DERSequence,W=X.x509.GeneralName;if(this.params=null,this.getExtnValueHex=function(){var Z=this.params,K=[new G(1)];if(K.push(new W({uri:Z.uri})),Z.reqauth!=null)K.push(new J(Z.reqauth));return this.asn1ExtnValue=new Q({array:K}),this.asn1ExtnValue.tohex()},this.oid="1.2.840.113583.1.1.9.1",$!==void 0)this.setByParam($)};X1(l.asn1.x509.AdobeTimeStamp,l.asn1.x509.Extension);l.asn1.x509.X500Name=function($){l.asn1.x509.X500Name.superclass.constructor.call(this),this.asn1Array=[],this.paramArray=[],this.sRule="utf8";var Y=l,X=Y.asn1,G=X.x509,J=G.RDN,Q=B$;if(this.setByString=function(W,Z){if(Z!==void 0)this.sRule=Z;var K=W.split("/");K.shift();var H=[];for(var z=0;z<K.length;z++)if(K[z].match(/^[^=]+=.+$/))H.push(K[z]);else{var V=H.length-1;H[V]=H[V]+"/"+K[z]}for(var z=0;z<H.length;z++)this.asn1Array.push(new J({str:H[z],rule:this.sRule}))},this.setByLdapString=function(W,Z){if(Z!==void 0)this.sRule=Z;var K=G.X500Name.ldapToCompat(W);this.setByString(K,Z)},this.setByObject=function(W,Z){if(Z!==void 0)this.sRule=Z;for(var K in W)if(W.hasOwnProperty(K)){var H=new J({str:K+"="+W[K],rule:this.sRule});this.asn1Array?this.asn1Array.push(H):this.asn1Array=[H]}},this.setByParam=function(W){if(W.rule!==void 0)this.sRule=W.rule;if(W.array!==void 0)this.paramArray=W.array;else if(W.str!==void 0)this.setByString(W.str);else if(W.ldapstr!==void 0)this.setByLdapString(W.ldapstr);else if(W.hex!==void 0)this.hTLV=W.hex;else if(W.certissuer!==void 0){var Z=new e4;Z.readCertPEM(W.certissuer),this.hTLV=Z.getIssuerHex()}else if(W.certsubject!==void 0){var Z=new e4;Z.readCertPEM(W.certsubject),this.hTLV=Z.getSubjectHex()}else if(typeof W==="object"&&W.certsubject===void 0&&W.certissuer===void 0)this.setByObject(W)},this.tohex=function(){if(typeof this.hTLV=="string")return this.hTLV;if(this.asn1Array.length==0&&this.paramArray.length>0)for(var W=0;W<this.paramArray.length;W++){var Z={array:this.paramArray[W]};if(this.sRule!="utf8")Z.rule=this.sRule;var K=new J(Z);this.asn1Array.push(K)}var H=new X.DERSequence({array:this.asn1Array});return this.hTLV=H.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.X500Name,l.asn1.ASN1Object);l.asn1.x509.X500Name.compatToLDAP=function($){if($.substr(0,1)!=="/")throw"malformed input";var Y="";$=$.substr(1);var X=$.split("/");return X.reverse(),X=X.map(function(G){return G.replace(/,/,"\\,")}),X.join(",")};l.asn1.x509.X500Name.onelineToLDAP=function($){return l.asn1.x509.X500Name.compatToLDAP($)};l.asn1.x509.X500Name.ldapToCompat=function($){var Y=$.split(","),X=!1,G=[];for(var J=0;Y.length>0;J++){var Q=Y.shift();if(X===!0){var W=G.pop(),Z=(W+","+Q).replace(/\\,/g,",");G.push(Z),X=!1}else G.push(Q);if(Q.substr(-1,1)==="\\")X=!0}return G=G.map(function(K){return K.replace("/","\\/")}),G.reverse(),"/"+G.join("/")};l.asn1.x509.X500Name.ldapToOneline=function($){return l.asn1.x509.X500Name.ldapToCompat($)};l.asn1.x509.RDN=function($){l.asn1.x509.RDN.superclass.constructor.call(this),this.asn1Array=[],this.paramArray=[],this.sRule="utf8";var Y=l.asn1.x509.AttributeTypeAndValue;if(this.setByParam=function(X){if(X.rule!==void 0)this.sRule=X.rule;if(X.str!==void 0)this.addByMultiValuedString(X.str);if(X.array!==void 0)this.paramArray=X.array},this.addByString=function(X){this.asn1Array.push(new l.asn1.x509.AttributeTypeAndValue({str:X,rule:this.sRule}))},this.addByMultiValuedString=function(X){var G=l.asn1.x509.RDN.parseString(X);for(var J=0;J<G.length;J++)this.addByString(G[J])},this.tohex=function(){if(this.asn1Array.length==0&&this.paramArray.length>0)for(var X=0;X<this.paramArray.length;X++){var G=this.paramArray[X];if(G.rule!==void 0&&this.sRule!="utf8")G.rule=this.sRule;var J=new Y(G);this.asn1Array.push(J)}var Q=new l.asn1.DERSet({array:this.asn1Array});return this.TLV=Q.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.RDN,l.asn1.ASN1Object);l.asn1.x509.RDN.parseString=function($){var Y=$.split(/\+/),X=!1,G=[];for(var J=0;Y.length>0;J++){var Q=Y.shift();if(X===!0){var W=G.pop(),Z=(W+"+"+Q).replace(/\\\+/g,"+");G.push(Z),X=!1}else G.push(Q);if(Q.substr(-1,1)==="\\")X=!0}var K=!1,H=[];for(var J=0;G.length>0;J++){var Q=G.shift();if(K===!0){var z=H.pop();if(Q.match(/"$/)){var Z=(z+"+"+Q).replace(/^([^=]+)="(.*)"$/,"$1=$2");H.push(Z),K=!1}else H.push(z+"+"+Q)}else H.push(Q);if(Q.match(/^[^=]+="/))K=!0}return H};l.asn1.x509.AttributeTypeAndValue=function($){l.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this),this.sRule="utf8",this.sType=null,this.sValue=null,this.dsType=null;var Y=l,X=Y.asn1,G=X.DERSequence,J=X.DERUTF8String,Q=X.DERPrintableString,W=X.DERTeletexString,Z=X.DERIA5String,K=X.DERVisibleString,H=X.DERBMPString,z=Y.lang.String.isMail,V=Y.lang.String.isPrintable;if(this.setByParam=function(A){if(A.rule!==void 0)this.sRule=A.rule;if(A.ds!==void 0)this.dsType=A.ds;if(A.value===void 0&&A.str!==void 0){var F=A.str,N=F.match(/^([^=]+)=(.+)$/);if(N)this.sType=N[1],this.sValue=N[2];else throw Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)}else this.sType=A.type,this.sValue=A.value},this.setByString=function(A,F){if(F!==void 0)this.sRule=F;var N=A.match(/^([^=]+)=(.+)$/);if(N)this.setByAttrTypeAndValueStr(N[1],N[2]);else throw Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)},this._getDsType=function(){var A=this.sType,F=this.sValue,N=this.sRule;if(N==="prn"){if(A=="CN"&&z(F))return"ia5";if(V(F))return"prn";return"utf8"}else if(N==="utf8"){if(A=="CN"&&z(F))return"ia5";if(A=="C")return"prn";return"utf8"}return"utf8"},this.setByAttrTypeAndValueStr=function(A,F,N){if(N!==void 0)this.sRule=N;this.sType=A,this.sValue=F},this.getValueObj=function(A,F){if(A=="utf8")return new J({str:F});if(A=="prn")return new Q({str:F});if(A=="tel")return new W({str:F});if(A=="ia5")return new Z({str:F});if(A=="vis")return new K({str:F});if(A=="bmp")return new H({str:F});throw Error("unsupported directory string type: type="+A+" value="+F)},this.tohex=function(){if(this.dsType==null)this.dsType=this._getDsType();var A=l.asn1.x509.OID.atype2obj(this.sType),F=this.getValueObj(this.dsType,this.sValue),N=new G({array:[A,F]});return this.TLV=N.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.AttributeTypeAndValue,l.asn1.ASN1Object);l.asn1.x509.SubjectPublicKeyInfo=function($){l.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var Y=null,X=null,G=l,J=G.asn1,Q=J.DERInteger,W=J.DERBitString,Z=J.DERObjectIdentifier,K=J.DERSequence,H=J.ASN1Util.newObject,z=J.x509,V=z.AlgorithmIdentifier,A=G.crypto,F=A.ECDSA,N=A.DSA;if(this.getASN1Object=function(){if(this.asn1AlgId==null||this.asn1SubjPKey==null)throw"algId and/or subjPubKey not set";var D=new K({array:[this.asn1AlgId,this.asn1SubjPKey]});return D},this.tohex=function(){var D=this.getASN1Object();return this.hTLV=D.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.setPubKey=function(D){try{if(D instanceof D6){var L=H({seq:[{int:{bigint:D.n}},{int:{int:D.e}}]}),B=L.tohex();this.asn1AlgId=new V({name:"rsaEncryption"}),this.asn1SubjPKey=new W({hex:"00"+B})}}catch(M){}try{if(D instanceof l.crypto.ECDSA){var O=new Z({name:D.curveName});this.asn1AlgId=new V({name:"ecPublicKey",asn1params:O}),this.asn1SubjPKey=new W({hex:"00"+D.pubKeyHex})}}catch(M){}try{if(D instanceof l.crypto.DSA){var O=new H({seq:[{int:{bigint:D.p}},{int:{bigint:D.q}},{int:{bigint:D.g}}]});this.asn1AlgId=new V({name:"dsa",asn1params:O});var E=new Q({bigint:D.y});this.asn1SubjPKey=new W({hex:"00"+E.tohex()})}}catch(M){}},$!==void 0)this.setPubKey($)};X1(l.asn1.x509.SubjectPublicKeyInfo,l.asn1.ASN1Object);l.asn1.x509.Time=function($){l.asn1.x509.Time.superclass.constructor.call(this);var Y=null,X=null,G=l,J=G.asn1,Q=J.DERUTCTime,W=J.DERGeneralizedTime;if(this.params=null,this.type=null,this.setTimeParams=function(Z){this.timeParams=Z},this.setByParam=function(Z){this.params=Z},this.getType=function(Z){if(Z.match(/^[0-9]{12}Z$/))return"utc";if(Z.match(/^[0-9]{14}Z$/))return"gen";if(Z.match(/^[0-9]{12}\.[0-9]+Z$/))return"utc";if(Z.match(/^[0-9]{14}\.[0-9]+Z$/))return"gen";return null},this.tohex=function(){var Z=this.params,K=null;if(typeof Z=="string")Z={str:Z};if(Z!=null&&Z.str&&(Z.type==null||Z.type==null))Z.type=this.getType(Z.str);if(Z!=null&&Z.str){if(Z.type=="utc")K=new Q(Z.str);if(Z.type=="gen")K=new W(Z.str)}else if(this.type=="gen")K=new W;else K=new Q;if(K==null)throw Error("wrong setting for Time");return this.TLV=K.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};l.asn1.x509.Time_bak=function($){l.asn1.x509.Time_bak.superclass.constructor.call(this);var Y=null,X=null,G=l,J=G.asn1,Q=J.DERUTCTime,W=J.DERGeneralizedTime;if(this.setTimeParams=function(Z){this.timeParams=Z},this.tohex=function(){var Z=null;if(this.timeParams!=null)if(this.type=="utc")Z=new Q(this.timeParams);else Z=new W(this.timeParams);else if(this.type=="utc")Z=new Q;else Z=new W;return this.TLV=Z.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},this.type="utc",$!==void 0){if($.type!==void 0)this.type=$.type;else if($.str!==void 0){if($.str.match(/^[0-9]{12}Z$/))this.type="utc";if($.str.match(/^[0-9]{14}Z$/))this.type="gen"}this.timeParams=$}};X1(l.asn1.x509.Time,l.asn1.ASN1Object);l.asn1.x509.AlgorithmIdentifier=function($){l.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this),this.nameAlg=null,this.asn1Alg=null,this.asn1Params=null,this.paramEmpty=!1;var Y=l,X=Y.asn1,G=X.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;if(this.tohex=function(){if(this.nameAlg===null&&this.asn1Alg===null)throw Error("algorithm not specified");if(this.nameAlg!==null){var Q=null;for(var W in G)if(W===this.nameAlg)Q=G[W];if(Q!==null)return this.hTLV=Q,this.hTLV}if(this.nameAlg!==null&&this.asn1Alg===null)this.asn1Alg=X.x509.OID.name2obj(this.nameAlg);var Z=[this.asn1Alg];if(this.asn1Params!==null)Z.push(this.asn1Params);var K=new X.DERSequence({array:Z});return this.hTLV=K.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if($.name!==void 0)this.nameAlg=$.name;if($.asn1params!==void 0)this.asn1Params=$.asn1params;if($.paramempty!==void 0)this.paramEmpty=$.paramempty}if(this.asn1Params===null&&this.paramEmpty===!1&&this.nameAlg!==null){if(this.nameAlg.name!==void 0)this.nameAlg=this.nameAlg.name;var J=this.nameAlg.toLowerCase();if(J.substr(-7,7)!=="withdsa"&&J.substr(-9,9)!=="withecdsa")this.asn1Params=new X.DERNull}};X1(l.asn1.x509.AlgorithmIdentifier,l.asn1.ASN1Object);l.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV={SHAwithRSAandMGF1:"300d06092a864886f70d01010a3000",SHA256withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120",SHA384withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130",SHA512withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"};l.asn1.x509.GeneralName=function($){l.asn1.x509.GeneralName.superclass.constructor.call(this);var Y={rfc822:"81",dns:"82",dn:"a4",uri:"86",ip:"87",otherName:"a0"},X=l,G=X.asn1,J=G.x509,Q=J.X500Name,W=J.OtherName,Z=G.DERIA5String,K=G.DERPrintableString,H=G.DEROctetString,z=G.DERTaggedObject,V=G.ASN1Object,A=Error;if(this.params=null,this.setByParam=function(F){this.params=F},this.tohex=function(){var F=this.params,N,L,D,L=!1;if(F.other!==void 0)N="a0",D=new W(F.other);else if(F.rfc822!==void 0)N="81",D=new Z({str:F.rfc822});else if(F.dns!==void 0)N="82",D=new Z({str:F.dns});else if(F.dn!==void 0)if(N="a4",L=!0,typeof F.dn==="string")D=new Q({str:F.dn});else if(F.dn instanceof l.asn1.x509.X500Name)D=F.dn;else D=new Q(F.dn);else if(F.ldapdn!==void 0)N="a4",L=!0,D=new Q({ldapstr:F.ldapdn});else if(F.certissuer!==void 0||F.certsubj!==void 0){N="a4",L=!0;var B,O,E=null;if(F.certsubj!==void 0)B=!1,O=F.certsubj;else B=!0,O=F.certissuer;if(O.match(/^[0-9A-Fa-f]+$/))E==O;if(O.indexOf("-----BEGIN ")!=-1)E=B$(O);if(E==null)throw Error("certsubj/certissuer not cert");var M=new e4;M.hex=E;var R;if(B)R=M.getIssuerHex();else R=M.getSubjectHex();D=new V,D.hTLV=R}else if(F.uri!==void 0)N="86",D=new Z({str:F.uri});else if(F.ip!==void 0){N="87";var q,w=F.ip;try{if(w.match(/^[0-9a-f]+$/)){var I=w.length;if(I==8||I==16||I==32||I==64)q=w;else throw"err"}else q=mG1(w)}catch(_){throw new A("malformed IP address: "+F.ip+":"+_.message)}D=new H({hex:q})}else throw new A("improper params");var P=new z({tag:N,explicit:L,obj:D});return P.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.GeneralName,l.asn1.ASN1Object);l.asn1.x509.GeneralNames=function($){l.asn1.x509.GeneralNames.superclass.constructor.call(this);var Y=null,X=l,G=X.asn1;if(this.setByParamArray=function(J){for(var Q=0;Q<J.length;Q++){var W=new G.x509.GeneralName(J[Q]);this.asn1Array.push(W)}},this.tohex=function(){var J=new G.DERSequence({array:this.asn1Array});return J.tohex()},this.getEncodedHex=function(){return this.tohex()},this.asn1Array=[],typeof $<"u")this.setByParamArray($)};X1(l.asn1.x509.GeneralNames,l.asn1.ASN1Object);l.asn1.x509.OtherName=function($){l.asn1.x509.OtherName.superclass.constructor.call(this);var Y=null,X=null,G=l,J=G.asn1,Q=J.DERObjectIdentifier,W=J.DERSequence,Z=J.ASN1Util.newObject;if(this.params=null,this.setByParam=function(K){this.params=K},this.tohex=function(){var K=this.params;if(K.oid==null||K.value==null)throw Error("oid or value not specified");var H=new Q({oid:K.oid}),z=Z({tag:{tag:"a0",explicit:!0,obj:K.value}}),V=new W({array:[H,z]});return V.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.OtherName,l.asn1.ASN1Object);l.asn1.x509.OID=new function(){var $=l.asn1.DERObjectIdentifier;this.name2oidList={"aes128-CBC":"2.16.840.1.101.3.4.1.2","aes256-CBC":"2.16.840.1.101.3.4.1.42",sha1:"1.3.14.3.2.26",sha256:"2.16.840.1.101.3.4.2.1",sha384:"2.16.840.1.101.3.4.2.2",sha512:"2.16.840.1.101.3.4.2.3",sha224:"2.16.840.1.101.3.4.2.4",md5:"1.2.840.113549.2.5",md2:"1.3.14.7.2.2.1",ripemd160:"1.3.36.3.2.1",hmacWithSHA1:"1.2.840.113549.2.7",hmacWithSHA224:"1.2.840.113549.2.8",hmacWithSHA256:"1.2.840.113549.2.9",hmacWithSHA384:"1.2.840.113549.2.10",hmacWithSHA512:"1.2.840.113549.2.11",MD2withRSA:"1.2.840.113549.1.1.2",MD4withRSA:"1.2.840.113549.1.1.3",MD5withRSA:"1.2.840.113549.1.1.4",SHA1withRSA:"1.2.840.113549.1.1.5","pkcs1-MGF":"1.2.840.113549.1.1.8",rsaPSS:"1.2.840.113549.1.1.10",SHA224withRSA:"1.2.840.113549.1.1.14",SHA256withRSA:"1.2.840.113549.1.1.11",SHA384withRSA:"1.2.840.113549.1.1.12",SHA512withRSA:"1.2.840.113549.1.1.13",SHA1withECDSA:"1.2.840.10045.4.1",SHA224withECDSA:"1.2.840.10045.4.3.1",SHA256withECDSA:"1.2.840.10045.4.3.2",SHA384withECDSA:"1.2.840.10045.4.3.3",SHA512withECDSA:"1.2.840.10045.4.3.4",dsa:"1.2.840.10040.4.1",SHA1withDSA:"1.2.840.10040.4.3",SHA224withDSA:"2.16.840.1.101.3.4.3.1",SHA256withDSA:"2.16.840.1.101.3.4.3.2",rsaEncryption:"1.2.840.113549.1.1.1",commonName:"2.5.4.3",countryName:"2.5.4.6",localityName:"2.5.4.7",stateOrProvinceName:"2.5.4.8",streetAddress:"2.5.4.9",organizationName:"2.5.4.10",organizationalUnitName:"2.5.4.11",domainComponent:"0.9.2342.19200300.100.1.25",userId:"0.9.2342.19200300.100.1.1",surname:"2.5.4.4",givenName:"2.5.4.42",title:"2.5.4.12",distinguishedName:"2.5.4.49",emailAddress:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3",subjectDirectoryAttributes:"2.5.29.9",subjectKeyIdentifier:"2.5.29.14",keyUsage:"2.5.29.15",subjectAltName:"2.5.29.17",issuerAltName:"2.5.29.18",basicConstraints:"2.5.29.19",cRLNumber:"2.5.29.20",cRLReason:"2.5.29.21",nameConstraints:"2.5.29.30",cRLDistributionPoints:"2.5.29.31",certificatePolicies:"2.5.29.32",anyPolicy:"2.5.29.32.0",policyMappings:"2.5.29.33",authorityKeyIdentifier:"2.5.29.35",policyConstraints:"2.5.29.36",extKeyUsage:"2.5.29.37",inhibitAnyPolicy:"2.5.29.54",authorityInfoAccess:"1.3.6.1.5.5.7.1.1",ocsp:"1.3.6.1.5.5.7.48.1",ocspBasic:"1.3.6.1.5.5.7.48.1.1",ocspNonce:"1.3.6.1.5.5.7.48.1.2",ocspNoCheck:"1.3.6.1.5.5.7.48.1.5",caIssuers:"1.3.6.1.5.5.7.48.2",anyExtendedKeyUsage:"2.5.29.37.0",serverAuth:"1.3.6.1.5.5.7.3.1",clientAuth:"1.3.6.1.5.5.7.3.2",codeSigning:"1.3.6.1.5.5.7.3.3",emailProtection:"1.3.6.1.5.5.7.3.4",timeStamping:"1.3.6.1.5.5.7.3.8",ocspSigning:"1.3.6.1.5.5.7.3.9",smtpUTF8Mailbox:"1.3.6.1.5.5.7.8.9",dateOfBirth:"1.3.6.1.5.5.7.9.1",placeOfBirth:"1.3.6.1.5.5.7.9.2",gender:"1.3.6.1.5.5.7.9.3",countryOfCitizenship:"1.3.6.1.5.5.7.9.4",countryOfResidence:"1.3.6.1.5.5.7.9.5",ecPublicKey:"1.2.840.10045.2.1","P-256":"1.2.840.10045.3.1.7",secp256r1:"1.2.840.10045.3.1.7",secp256k1:"1.3.132.0.10",secp384r1:"1.3.132.0.34",secp521r1:"1.3.132.0.35",pkcs5PBES2:"1.2.840.113549.1.5.13",pkcs5PBKDF2:"1.2.840.113549.1.5.12","des-EDE3-CBC":"1.2.840.113549.3.7",data:"1.2.840.113549.1.7.1","signed-data":"1.2.840.113549.1.7.2","enveloped-data":"1.2.840.113549.1.7.3","digested-data":"1.2.840.113549.1.7.5","encrypted-data":"1.2.840.113549.1.7.6","authenticated-data":"1.2.840.113549.1.9.16.1.2",tstinfo:"1.2.840.113549.1.9.16.1.4",signingCertificate:"1.2.840.113549.1.9.16.2.12",timeStampToken:"1.2.840.113549.1.9.16.2.14",signaturePolicyIdentifier:"1.2.840.113549.1.9.16.2.15",etsArchiveTimeStamp:"1.2.840.113549.1.9.16.2.27",signingCertificateV2:"1.2.840.113549.1.9.16.2.47",etsArchiveTimeStampV2:"1.2.840.113549.1.9.16.2.48",extensionRequest:"1.2.840.113549.1.9.14",contentType:"1.2.840.113549.1.9.3",messageDigest:"1.2.840.113549.1.9.4",signingTime:"1.2.840.113549.1.9.5",counterSignature:"1.2.840.113549.1.9.6",archiveTimeStampV3:"0.4.0.1733.2.4",pdfRevocationInfoArchival:"1.2.840.113583.1.1.8",adobeTimeStamp:"1.2.840.113583.1.1.9.1",smimeMailboxLegacy:"2.23.140.1.5.1.1",smimeMailboxMulti:"2.23.140.1.5.1.2",smimeMailboxStrict:"2.23.140.1.5.1.3",smimeOrganizationLegacy:"2.23.140.1.5.2.1",smimeOrganizationMulti:"2.23.140.1.5.2.2",smimeOrganizationStrict:"2.23.140.1.5.2.3",smimeSponsorLegacy:"2.23.140.1.5.3.1",smimeSponsorMulti:"2.23.140.1.5.3.2",smimeSponsorStrict:"2.23.140.1.5.3.3",smimeIndividualLegacy:"2.23.140.1.5.4.1",smimeIndividualMulti:"2.23.140.1.5.4.2",smimeIndividualStrict:"2.23.140.1.5.4.3"},this.atype2oidList={CN:"2.5.4.3",L:"2.5.4.7",ST:"2.5.4.8",O:"2.5.4.10",OU:"2.5.4.11",C:"2.5.4.6",STREET:"2.5.4.9",DC:"0.9.2342.19200300.100.1.25",UID:"0.9.2342.19200300.100.1.1",SN:"2.5.4.4",T:"2.5.4.12",GN:"2.5.4.42",DN:"2.5.4.49",E:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",serialNumber:"2.5.4.5",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3"},this.objCache={},this.name2obj=function(Y){if(typeof this.objCache[Y]<"u")return this.objCache[Y];if(typeof this.name2oidList[Y]>"u")throw"Name of ObjectIdentifier not defined: "+Y;var X=this.name2oidList[Y],G=new $({oid:X});return this.objCache[Y]=G,G},this.atype2obj=function(Y){if(this.objCache[Y]!==void 0)return this.objCache[Y];var X;if(Y.match(/^\d+\.\d+\.[0-9.]+$/))X=Y;else if(this.atype2oidList[Y]!==void 0)X=this.atype2oidList[Y];else if(this.name2oidList[Y]!==void 0)X=this.name2oidList[Y];else throw Error("AttributeType name undefined: "+Y);var G=new $({oid:X});return this.objCache[Y]=G,G},this.registerOIDs=function(Y){if(!this.checkOIDs(Y))return;for(var X in Y)this.name2oidList[X]=Y[X]},this.checkOIDs=function(Y){try{var X=Object.keys(Y);if(X.length==0)return!1;return X.map(function(G,J,Q){var W=this[G];if(!W.match(/^[0-2]\.[0-9.]+$/))throw Error("value is not OID")},Y),!0}catch(G){return!1}}};l.asn1.x509.OID.oid2name=function($){var Y=l.asn1.x509.OID.name2oidList;for(var X in Y)if(Y[X]==$)return X;return""};l.asn1.x509.OID.oid2atype=function($){var Y=l.asn1.x509.OID.atype2oidList;for(var X in Y)if(Y[X]==$)return X;return $};l.asn1.x509.OID.name2oid=function($){if($.match(/^[0-9.]+$/))return $;var Y=l.asn1.x509.OID.name2oidList;if(Y[$]===void 0)return"";return Y[$]};l.asn1.x509.X509Util={};l.asn1.x509.X509Util.newCertPEM=function($){var Y=l.asn1.x509,X=Y.TBSCertificate,G=Y.Certificate,J=new G($);return J.getPEM()};if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};if(typeof l.asn1.cms>"u"||!l.asn1.cms)l.asn1.cms={};l.asn1.cms.Attribute=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.DERSet,W=G.DERObjectIdentifier;this.params=null,this.typeOid=null,this.setByParam=function(Z){this.params=Z},this.getValueArray=function(){throw new Y("not yet implemented abstract")},this.tohex=function(){var Z=new W({oid:this.typeOid}),K=new Q({array:this.getValueArray()}),H=new J({array:[Z,K]});return H.tohex()},this.getEncodedHex=function(){return this.tohex()}};X1(l.asn1.cms.Attribute,l.asn1.ASN1Object);l.asn1.cms.ContentType=function($){var Y=l,X=Y.asn1;if(X.cms.ContentType.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.3",this.getValueArray=function(){var G=new X.DERObjectIdentifier(this.params.type);return[G]},$!=null)this.setByParam($)};X1(l.asn1.cms.ContentType,l.asn1.cms.Attribute);l.asn1.cms.MessageDigest=function($){var Y=l,X=Y.asn1,G=X.DEROctetString,J=X.cms;if(J.MessageDigest.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.4",this.getValueArray=function(){var Q=new G(this.params);return[Q]},$!=null)this.setByParam($)};X1(l.asn1.cms.MessageDigest,l.asn1.cms.Attribute);l.asn1.cms.SigningTime=function($){var Y=l,X=Y.asn1;if(X.cms.SigningTime.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.5",this.getValueArray=function(){var G=new X.x509.Time(this.params);return[G]},$!=null)this.setByParam($)};X1(l.asn1.cms.SigningTime,l.asn1.cms.Attribute);l.asn1.cms.SigningCertificate=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.cms,W=Q.ESSCertID,Z=X.crypto;if(Q.SigningCertificate.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.12",this.getValueArray=function(){if(this.params==null||this.params==null||this.params.array==null)throw new Y("parameter 'array' not specified");var K=this.params.array,H=[];for(var z=0;z<K.length;z++){var V=K[z];if($.hasis==!1&&(typeof V=="string"&&(V.indexOf("-----BEGIN")!=-1||M1.isASN1HEX(V))))V={cert:V};if(V.hasis!=!1&&$.hasis==!1)V.hasis=!1;H.push(new W(V))}var A=new J({array:H}),F=new J({array:[A]});return[F]},$!=null)this.setByParam($)};X1(l.asn1.cms.SigningCertificate,l.asn1.cms.Attribute);l.asn1.cms.ESSCertID=function($){l.asn1.cms.ESSCertID.superclass.constructor.call(this);var Y=Error,X=l,G=X.asn1,J=G.DEROctetString,Q=G.DERSequence,W=G.cms.IssuerSerial;if(this.params=null,this.getCertHash=function(Z,K){if(Z.hash!=null)return Z.hash;if(typeof Z=="string"&&Z.indexOf("-----BEGIN")==-1&&!M1.isASN1HEX(Z))return Z;var H;if(typeof Z=="string")H=Z;else if(Z.cert!=null)H=Z.cert;else throw new Y("hash nor cert unspecified");var z;if(H.indexOf("-----BEGIN")!=-1)z=B$(H);else z=H;if(typeof Z=="string"){if(Z.indexOf("-----BEGIN")!=-1)z=B$(Z);else if(M1.isASN1HEX(Z))z=Z}var V;if(Z.alg!=null)V=Z.alg;else if(K!=null)V=K;else throw new Y("hash alg unspecified");return X.crypto.Util.hashHex(z,V)},this.tohex=function(){var Z=this.params,K=this.getCertHash(Z,"sha1"),H=[];if(H.push(new J({hex:K})),typeof Z=="string"&&Z.indexOf("-----BEGIN")!=-1||Z.cert!=null&&Z.hasis!=!1||Z.issuer!=null&&Z.serial!=null)H.push(new W(Z));var z=new Q({array:H});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.ESSCertID,l.asn1.ASN1Object);l.asn1.cms.SigningCertificateV2=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.x509,W=G.cms,Z=W.ESSCertIDv2,K=X.crypto;if(W.SigningCertificateV2.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.47",this.getValueArray=function(){if(this.params==null||this.params==null||this.params.array==null)throw new Y("parameter 'array' not specified");var H=this.params.array,z=[];for(var V=0;V<H.length;V++){var A=H[V];if(($.alg!=null||$.hasis==!1)&&(typeof A=="string"&&(A.indexOf("-----BEGIN")!=-1||M1.isASN1HEX(A))))A={cert:A};if(A.alg==null&&$.alg!=null)A.alg=$.alg;if(A.hasis!=!1&&$.hasis==!1)A.hasis=!1;z.push(new Z(A))}var F=new J({array:z}),N=new J({array:[F]});return[N]},$!=null)this.setByParam($)};X1(l.asn1.cms.SigningCertificateV2,l.asn1.cms.Attribute);l.asn1.cms.ESSCertIDv2=function($){l.asn1.cms.ESSCertIDv2.superclass.constructor.call(this);var Y=Error,X=l,G=X.asn1,J=G.DEROctetString,Q=G.DERSequence,W=G.cms.IssuerSerial,Z=G.x509.AlgorithmIdentifier;if(this.params=null,this.tohex=function(){var K=this.params,H=this.getCertHash(K,"sha256"),z=[];if(K.alg!=null&&K.alg!="sha256")z.push(new Z({name:K.alg}));if(z.push(new J({hex:H})),typeof K=="string"&&K.indexOf("-----BEGIN")!=-1||K.cert!=null&&K.hasis!=!1||K.issuer!=null&&K.serial!=null)z.push(new W(K));var V=new Q({array:z});return V.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.ESSCertIDv2,l.asn1.cms.ESSCertID);l.asn1.cms.IssuerSerial=function($){var Y=Error,X=l,G=X.asn1,J=G.DERInteger,Q=G.DERSequence,W=G.cms,Z=G.x509,K=Z.GeneralNames,H=e4;if(W.IssuerSerial.superclass.constructor.call(this),this.setByParam=function(z){this.params=z},this.tohex=function(){var z=this.params,V,A;if(typeof z=="string"&&z.indexOf("-----BEGIN")!=-1||z.cert!=null){var F;if(z.cert!=null)F=z.cert;else F=z;var N=new H;N.readCertPEM(F),V=N.getIssuer(),A={hex:N.getSerialNumberHex()}}else if(z.issuer!=null&&z.serial)V=z.issuer,A=z.serial;else throw new Y("cert or issuer and serial parameter not specified");var D=new K([{dn:V}]),L=new J(A),B=new Q({array:[D,L]});return B.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.IssuerSerial,l.asn1.ASN1Object);l.asn1.cms.SignerIdentifier=function($){var Y=l,X=Y.asn1,G=X.DERInteger,J=X.DERSequence,Q=X.cms,W=Q.IssuerAndSerialNumber,Z=Q.SubjectKeyIdentifier,K=X.x509,H=K.X500Name,z=e4,V=Error;if(Q.SignerIdentifier.superclass.constructor.call(this),this.params=null,this.tohex=function(){var A=this.params;if(A.type=="isssn"){var F=new W(A);return F.tohex()}else if(A.type=="skid"){var N=new Z(A);return N.tohex()}else throw Error("wrong property for isssn or skid")},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.SignerIdentifier,l.asn1.ASN1Object);l.asn1.cms.IssuerAndSerialNumber=function($){var Y=l,X=Y.asn1,G=X.DERInteger,J=X.DERSequence,Q=X.cms,W=X.x509,Z=W.X500Name,K=e4,H=Error;if(Q.IssuerAndSerialNumber.superclass.constructor.call(this),this.params=null,this.tohex=function(){var z=this.params,V,A;if(typeof z=="string"&&z.indexOf("-----BEGIN")!=-1||z.cert!=null){var F;if(z.cert!=null)F=z.cert;else F=z;var N=new K;N.readCertPEM(F),V=N.getIssuer(),A={hex:N.getSerialNumberHex()}}else if(z.issuer!=null&&z.serial)V=z.issuer,A=z.serial;else throw new H("cert or issuer and serial parameter not specified");var D=new Z(V),L=new G(A),B=new J({array:[D,L]});return B.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(z){this.params=z},$!=null)this.setByParam($)};X1(l.asn1.cms.IssuerAndSerialNumber,l.asn1.ASN1Object);l.asn1.cms.SubjectKeyIdentifier=function($){var Y=l,X=Y.asn1,G=X.DERInteger,J=X.DERSequence,Q=X.ASN1Util.newObject,W=X.cms,Z=W.IssuerAndSerialName,K=W.SubjectKeyIdentifier,H=X.x509,z=H.X500Name,V=e4,A=Error;if(W.SubjectKeyIdentifier.superclass.constructor.call(this),this.tohex=function(){var F=this.params;if(F.cert==null&&F.skid==null)throw new A("property cert nor skid undefined");var N;if(F.cert!=null){var D=new V(F.cert),L=D.getExtSubjectKeyIdentifier();N=L.kid.hex}else if(F.skid!=null)N=F.skid;var B=Q({tag:{tage:"a0",obj:{octstr:{hex:N}}}});return B.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.SubjectKeyIdentifier,l.asn1.ASN1Object);l.asn1.cms.AttributeList=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSet,Q=G.cms;if(Q.AttributeList.superclass.constructor.call(this),this.params=null,this.hTLV=null,this.setByParam=function(W){this.params=W},this.tohex=function(){var W=this.params;if(this.hTLV!=null)return this.hTLV;var Z=!0;if(W.sortflag!=null)Z=W.sortflag;var K=W.array,H=[];for(var z=0;z<K.length;z++){var V=K[z],A=V.attr;if(A=="contentType")H.push(new Q.ContentType(V));else if(A=="messageDigest")H.push(new Q.MessageDigest(V));else if(A=="signingTime")H.push(new Q.SigningTime(V));else if(A=="signingCertificate")H.push(new Q.SigningCertificate(V));else if(A=="signingCertificateV2")H.push(new Q.SigningCertificateV2(V));else if(A=="signaturePolicyIdentifier")H.push(new l.asn1.cades.SignaturePolicyIdentifier(V));else if(A=="signatureTimeStamp"||A=="timeStampToken")H.push(new l.asn1.cades.SignatureTimeStamp(V));else throw new Y("unknown attr: "+A)}var F=new J({array:H,sortflag:Z});return this.hTLV=F.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.AttributeList,l.asn1.ASN1Object);l.asn1.cms.SignerInfo=function($){var Y=Error,X=l,G=X.asn1,J=G.DERInteger,Q=G.DEROctetString,W=G.DERSequence,Z=G.DERTaggedObject,K=G.cms,H=K.SignerIdentifier,z=K.AttributeList,V=K.ContentType,A=K.EncapsulatedContentInfo,F=K.MessageDigest,N=K.SignedData,D=G.x509,L=D.AlgorithmIdentifier,B=X.crypto,O=K8;if(K.SignerInfo.superclass.constructor.call(this),this.params=null,this.sign=function(){var E=this.params,M=E.sigalg,R=new z(E.sattrs).tohex(),q=O.getKey(E.signkey),w=new B.Signature({alg:M});w.init(q),w.updateHex(R);var I=w.sign();E.sighex=I},this.tohex=function(){var E=this.params,M=[];if(M.push(new J({int:E.version})),M.push(new H(E.id)),M.push(new L({name:E.hashalg})),E.sattrs!=null){var R=new z(E.sattrs);try{M.push(new Z({tag:"a0",explicit:!1,obj:R}))}catch(w){throw new Y("si sattr error: "+w)}}if(E.sigalgfield!=null)M.push(new L({name:E.sigalgfield}));else M.push(new L({name:E.sigalg}));if(E.sighex==null&&E.signkey!=null)this.sign();if(M.push(new Q({hex:E.sighex})),E.uattrs!=null){var R=new z(E.uattrs);try{M.push(new Z({tag:"a1",explicit:!1,obj:R}))}catch(I){throw new Y("si uattr error: "+I)}}var q=new W({array:M});return q.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.SignerInfo,l.asn1.ASN1Object);l.asn1.cms.EncapsulatedContentInfo=function($){var Y=l,X=Y.asn1,G=X.DERTaggedObject,J=X.DERSequence,Q=X.DERObjectIdentifier,W=X.DEROctetString,Z=X.cms;if(Z.EncapsulatedContentInfo.superclass.constructor.call(this),this.params=null,this.tohex=function(){var K=this.params,H=[];if(H.push(new Q(K.type)),K.content!=null&&(K.content.hex!=null||K.content.str!=null)&&K.isDetached!=!0){var z=new W(K.content),V=new G({tag:"a0",explicit:!0,obj:z});H.push(V)}var A=new J({array:H});return A.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(K){this.params=K},$!=null)this.setByParam($)};X1(l.asn1.cms.EncapsulatedContentInfo,l.asn1.ASN1Object);l.asn1.cms.ContentInfo=function($){var Y=l,X=Y.asn1,G=X.DERTaggedObject,J=X.DERSequence,Q=X.DERObjectIdentifier,W=X.x509,Z=W.OID.name2obj;if(l.asn1.cms.ContentInfo.superclass.constructor.call(this),this.params=null,this.tohex=function(){var K=this.params,H=[];H.push(new Q(K.type));var z=new G({tag:"a0",explicit:!0,obj:K.obj});H.push(z);var V=new J({array:H});return V.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(K){this.params=K},$!=null)this.setByParam($)};X1(l.asn1.cms.ContentInfo,l.asn1.ASN1Object);l.asn1.cms.SignedData=function($){var Y=Error,X=l,G=X.asn1,J=G.ASN1Object,Q=G.DERInteger,W=G.DERSet,Z=G.DERSequence,K=G.DERTaggedObject,H=G.cms,z=H.EncapsulatedContentInfo,V=H.SignerInfo,A=H.ContentInfo,F=H.CertificateSet,N=H.RevocationInfoChoices,D=G.x509,L=D.AlgorithmIdentifier;if(l.asn1.cms.SignedData.superclass.constructor.call(this),this.params=null,this.checkAndFixParam=function(){var B=this.params;this._setDigestAlgs(B),this._setContentTypeByEContent(B),this._setMessageDigestByEContent(B),this._setSignerInfoVersion(B),this._setSignedDataVersion(B)},this._setDigestAlgs=function(B){var O={},E=B.sinfos;for(var M=0;M<E.length;M++){var R=E[M];O[R.hashalg]=1}B.hashalgs=Object.keys(O).sort()},this._setContentTypeByEContent=function(B){var O=B.econtent.type,E=B.sinfos;for(var M=0;M<E.length;M++){var R=E[M],q=this._getAttrParamByName(R,"contentType");q.type=O}},this._setMessageDigestByEContent=function(B){var O=B.econtent,E=B.econtent.type,M=O.content.hex;if(M==null&&O.type=="data"&&O.content.str!=null)M=nH(O.content.str);var R=B.sinfos;for(var q=0;q<R.length;q++){var w=R[q],I=w.hashalg,P=this._getAttrParamByName(w,"messageDigest"),_=l.crypto.Util.hashHex(M,I);P.hex=_}},this._getAttrParamByName=function(B,O){var E=B.sattrs.array;for(var M=0;M<E.length;M++)if(E[M].attr==O)return E[M]},this._setSignerInfoVersion=function(B){var O=B.sinfos;for(var E=0;E<O.length;E++){var M=O[E],R=1;if(M.id.type=="skid")R=3;M.version=R}},this._setSignedDataVersion=function(B){var O=this._getSignedDataVersion(B);B.version=O},this._getSignedDataVersion=function(B){if(B.revinfos!=null){var O=B.revinfos;for(var E=0;E<O.length;E++){var M=O[E];if(M.ocsp!=null)return 5}}var R=B.sinfos;for(var E=0;E<R.length;E++){var q=B.sinfos[E];if(q.version==3)return 3}if(B.econtent.type!="data")return 3;return 1},this.tohex=function(){var B=this.params;if(this.getEncodedHexPrepare!=null)this.getEncodedHexPrepare();if(B.fixed!=!0)this.checkAndFixParam();var O=[];O.push(new Q({int:B.version}));var E=[];for(var M=0;M<B.hashalgs.length;M++){var R=B.hashalgs[M];E.push(new L({name:R}))}if(O.push(new W({array:E})),O.push(new z(B.econtent)),B.certs!=null)O.push(new F(B.certs));if(B.revinfos!=null)O.push(new N(B.revinfos));var q=[];for(var M=0;M<B.sinfos.length;M++){var w=B.sinfos[M];q.push(new V(w))}O.push(new W({array:q}));var I=new Z({array:O});return I.tohex()},this.getEncodedHex=function(){return this.tohex()},this.getContentInfo=function(){var B=new A({type:"signed-data",obj:this});return B},this.getContentInfoEncodedHex=function(){return this.getContentInfo().tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.SignedData,l.asn1.ASN1Object);l.asn1.cms.CertificateSet=function($){l.asn1.cms.CertificateSet.superclass.constructor.call(this);var Y=Error,X=l.asn1,G=X.DERTaggedObject,J=X.DERSet,Q=X.ASN1Object;if(this.params=null,this.tohex=function(){var W=this.params,Z=[],K;if(W instanceof Array)K=W;else if(W.array!=null)K=W.array;else throw new Y("cert array not specified");for(var H=0;H<K.length;H++){var z=K[H],V=B$(z),A=new Q;A.hTLV=V,Z.push(A)}var F={array:Z};if(W.sortflag==!1)F.sortflag=!1;var N=new J(F),D=new G({tag:"a0",explicit:!1,obj:N});return D.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.CertificateSet,l.asn1.ASN1Object);l.asn1.cms.RevocationInfoChoices=function($){if(l.asn1.cms.RevocationInfoChoices.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Y=this.params;if(!Y instanceof Array)throw Error("params is not array");var X=[];for(var G=0;G<Y.length;G++)X.push(new l.asn1.cms.RevocationInfoChoice(Y[G]));var J=l.asn1.ASN1Util.newObject({tag:{tagi:"a1",obj:{set:X}}});return J.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.RevocationInfoChoices,l.asn1.ASN1Object);l.asn1.cms.RevocationInfoChoice=function($){if(l.asn1.cms.RevocationInfoChoice.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Y=this.params;if(Y.crl!=null&&typeof Y.crl=="string"){var X=Y.crl;if(Y.crl.indexOf("-----BEGIN")!=-1)X=B$(Y.crl);return X}else if(Y.ocsp!=null){var G=l.asn1.ASN1Util.newObject({tag:{tagi:"a1",obj:new l.asn1.cms.OtherRevocationFormat(Y)}});return G.tohex()}else throw Error("property crl or ocsp undefined")},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.RevocationInfoChoice,l.asn1.ASN1Object);l.asn1.cms.OtherRevocationFormat=function($){l.asn1.cms.OtherRevocationFormat.superclass.constructor.call(this);var Y=Error,X=l,G=X.asn1,J=G.ASN1Util.newObject,Q=X.lang.String.isHex;if(this.params=null,this.tohex=function(){var W=this.params;if(W.ocsp==null)throw new Y("property ocsp not specified");if(!Q(W.ocsp)||!M1.isASN1HEX(W.ocsp))throw new Y("ocsp value not ASN.1 hex string");var Z=J({seq:[{oid:"1.3.6.1.5.5.7.16.2"},{asn1:{tlv:W.ocsp}}]});return Z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.OtherRevocationFormat,l.asn1.ASN1Object);l.asn1.cms.CMSUtil=new function(){};l.asn1.cms.CMSUtil.newSignedData=function($){return new l.asn1.cms.SignedData($)};l.asn1.cms.CMSUtil.verifySignedData=function($){var Y=l,X=Y.asn1,G=X.cms,J=G.SignerInfo,Q=G.SignedData,W=G.SigningTime,Z=G.SigningCertificate,K=G.SigningCertificateV2,H=X.cades,z=H.SignaturePolicyIdentifier,V=Y.lang.String.isHex,A=M1,F=A.getVbyList,N=A.getTLVbyList,D=A.getIdxbyList,L=A.getChildIdx,B=A.getTLV,O=A.oidname,E=Y.crypto.Util.hashHex;if($.cms===void 0&&!V($.cms));var M=$.cms,R=function(v,x){var y;for(var d=3;d<6;d++)if(y=D(v,0,[1,0,d]),y!==void 0){var u=v.substr(y,2);if(u==="a0")x.certsIdx=y;if(u==="a1")x.revinfosIdx=y;if(u==="31")x.signerinfosIdx=y}},q=function(v,x){var y=x.signerinfosIdx;if(y===void 0)return;var d=L(v,y);x.signerInfoIdxList=d;for(var u=0;u<d.length;u++){var b=d[u],g={idx:b};w(v,g),x.signerInfos.push(g)}},w=function(v,x){var y=x.idx;x.signerid_issuer1=N(v,y,[1,0],"30"),x.signerid_serial1=F(v,y,[1,1],"02"),x.hashalg=O(F(v,y,[2,0],"06"));var d=D(v,y,[3],"a0");x.idxSignedAttrs=d,I(v,x,d);var u=L(v,y),b=u.length;if(b<6)throw"malformed SignerInfo";x.sigalg=O(F(v,y,[b-2,0],"06")),x.sigval=F(v,y,[b-1],"04")},I=function(v,x,y){var d=L(v,y);x.signedAttrIdxList=d;for(var u=0;u<d.length;u++){var b=d[u],g=F(v,b,[0],"06"),p;if(g==="2a864886f70d010905")p=S9(F(v,b,[1,0])),x.saSigningTime=p;else if(g==="2a864886f70d010904")p=F(v,b,[1,0],"04"),x.saMessageDigest=p}},P=function(v,x){if(F(v,0,[0],"06")!=="2a864886f70d010702")return x;x.cmsType="signedData",x.econtent=F(v,0,[1,0,2,1,0]),R(v,x),x.signerInfos=[],q(v,x)},_=function(v,x){var y=x.parse.signerInfos,d=y.length,u=!0;for(var b=0;b<d;b++){var g=y[b];if(k(v,x,g,b),!g.isValid)u=!1}x.isValid=u},C=function(v,x,y,d){var u=x.parse.certsIdx,b;if(x.certs===void 0){b=[],x.certkeys=[];var g=L(v,u);for(var p=0;p<g.length;p++){var h=B(v,g[p]),n=new e4;n.readCertHex(h),b[p]=n,x.certkeys[p]=n.getPublicKey()}x.certs=b}else b=x.certs;x.cccc=b.length,x.cccci=g.length;for(var p=0;p<b.length;p++){var t=n.getIssuerHex(),s=n.getSerialNumberHex();if(y.signerid_issuer1===t&&y.signerid_serial1===s)y.certkey_idx=p}},k=function(v,x,y,d){y.verifyDetail={};var u=y.verifyDetail,b=x.parse.econtent,g=y.hashalg,p=y.saMessageDigest;if(u.validMessageDigest=!1,E(b,g)===p)u.validMessageDigest=!0;C(v,x,y,d),u.validSignatureValue=!1;var h=y.sigalg,n="31"+B(v,y.idxSignedAttrs).substr(2);y.signedattrshex=n;var t=x.certs[y.certkey_idx].getPublicKey(),s=new l.crypto.Signature({alg:h});s.init(t),s.updateHex(n);var Z0=s.verify(y.sigval);if(u.validSignatureValue_isValid=Z0,Z0===!0)u.validSignatureValue=!0;if(y.isValid=!1,u.validMessageDigest&&u.validSignatureValue)y.isValid=!0},S=function(){},T={isValid:!1,parse:{}};return P(M,T.parse),_(M,T),T};l.asn1.cms.CMSParser=function(){var $=Error,Y=e4,X=new Y,G=M1,J=G.getV,Q=G.getTLV,W=G.getIdxbyList,Z=G.getTLVbyList,K=G.getTLVbyListEx,H=G.getVbyList,z=G.getVbyListEx,V=G.getChildIdx;this.getCMSSignedData=function(A){var F=Z(A,0,[1,0]),N=this.getSignedData(F);return N},this.getSignedData=function(A){var F=V(A,0),N={},D=J(A,F[0]),L=parseInt(D,16);N.version=L;var B=Q(A,F[1]);N.hashalgs=this.getHashAlgArray(B);var O=Q(A,F[2]);N.econtent=this.getEContent(O);var E=K(A,0,["[0]"]);if(E!=null)N.certs=this.getCertificateSet(E);var M=K(A,0,["[1]"]);if(M!=null);var R=K(A,0,[3]);return N.sinfos=this.getSignerInfos(R),N},this.getHashAlgArray=function(A){var F=V(A,0),N=new Y,D=[];for(var L=0;L<F.length;L++){var B=Q(A,F[L]),O=N.getAlgorithmIdentifierName(B);D.push(O)}return D},this.getEContent=function(A){var F={},N=H(A,0,[0]),D=H(A,0,[1,0]);return F.type=l.asn1.x509.OID.oid2name(M1.hextooidstr(N)),F.content={hex:D},F},this.getSignerInfos=function(A){var F=[],N=V(A,0);for(var D=0;D<N.length;D++){var L=Q(A,N[D]),B=this.getSignerInfo(L);F.push(B)}return F},this.getSignerInfo=function(A){var F={},N=V(A,0),D=G.getInt(A,N[0],-1);if(D!=-1)F.version=D;var L=Q(A,N[1]),B=this.getIssuerAndSerialNumber(L);F.id=B;var O=Q(A,N[2]),E=X.getAlgorithmIdentifierName(O);F.hashalg=E;var M=K(A,0,["[0]"]);if(M!=null){var R=this.getAttributeList(M);F.sattrs=R}var q=K(A,0,[3]),w=X.getAlgorithmIdentifierName(q);F.sigalg=w;var I=z(A,0,[4]);F.sighex=I;var P=K(A,0,["[1]"]);if(P!=null){var _=this.getAttributeList(P);F.uattrs=_}return F},this.getSignerIdentifier=function(A){if(A.substr(0,2)=="30")return this.getIssuerAndSerialNumber(A);else throw Error("SKID of signerIdentifier not supported")},this.getIssuerAndSerialNumber=function(A){var F={type:"isssn"},N=V(A,0),D=Q(A,N[0]);F.issuer=X.getX500Name(D);var L=J(A,N[1]);return F.serial={hex:L},F},this.getAttributeList=function(A){var F=[],N=V(A,0);for(var D=0;D<N.length;D++){var L=Q(A,N[D]),B=this.getAttribute(L);F.push(B)}return{array:F}},this.getAttribute=function(A){var F={},N=V(A,0),D=G.getOID(A,N[0]),L=l.asn1.x509.OID.oid2name(D);F.attr=L;var B=Q(A,N[1]),O=V(B,0);if(O.length==1)F.valhex=Q(B,O[0]);else{var E=[];for(var M=0;M<O.length;M++)E.push(Q(B,O[M]));F.valhex=E}if(L=="contentType")this.setContentType(F);else if(L=="messageDigest")this.setMessageDigest(F);else if(L=="signingTime")this.setSigningTime(F);else if(L=="signingCertificate")this.setSigningCertificate(F);else if(L=="signingCertificateV2")this.setSigningCertificateV2(F);else if(L=="signaturePolicyIdentifier")this.setSignaturePolicyIdentifier(F);return F},this.setContentType=function(A){var F=G.getOIDName(A.valhex,0,null);if(F!=null)A.type=F,delete A.valhex},this.setSigningTime=function(A){var F=J(A.valhex,0),N=S9(F);A.str=N,delete A.valhex},this.setMessageDigest=function(A){var F=J(A.valhex,0);A.hex=F,delete A.valhex},this.setSigningCertificate=function(A){var F=V(A.valhex,0);if(F.length>0){var N=Q(A.valhex,F[0]),D=V(N,0),L=[];for(var B=0;B<D.length;B++){var O=Q(N,D[B]),E=this.getESSCertID(O);L.push(E)}A.array=L}if(F.length>1){var M=Q(A.valhex,F[1]);A.polhex=M}delete A.valhex},this.setSignaturePolicyIdentifier=function(A){var F=V(A.valhex,0);if(F.length>0){var N=G.getOID(A.valhex,F[0]);A.oid=N}if(F.length>1){var D=new Y,L=V(A.valhex,F[1]),B=Q(A.valhex,L[0]),O=D.getAlgorithmIdentifierName(B);A.alg=O;var E=J(A.valhex,L[1]);A.hash=E}delete A.valhex},this.setSigningCertificateV2=function(A){var F=V(A.valhex,0);if(F.length>0){var N=Q(A.valhex,F[0]),D=V(N,0),L=[];for(var B=0;B<D.length;B++){var O=Q(N,D[B]),E=this.getESSCertIDv2(O);L.push(E)}A.array=L}if(F.length>1){var M=Q(A.valhex,F[1]);A.polhex=M}delete A.valhex},this.getESSCertID=function(A){var F={},N=V(A,0);if(N.length>0){var D=J(A,N[0]);F.hash=D}if(N.length>1){var L=Q(A,N[1]),B=this.getIssuerSerial(L);if(B.serial!=null)F.serial=B.serial;if(B.issuer!=null)F.issuer=B.issuer}return F},this.getESSCertIDv2=function(A){var F={},N=V(A,0);if(N.length<1||3<N.length)throw new $("wrong number of elements");var D=0;if(A.substr(N[0],2)=="30"){var L=Q(A,N[0]);F.alg=X.getAlgorithmIdentifierName(L),D++}else F.alg="sha256";var B=J(A,N[D]);if(F.hash=B,N.length>D+1){var O=Q(A,N[D+1]),E=this.getIssuerSerial(O);F.issuer=E.issuer,F.serial=E.serial}return F},this.getIssuerSerial=function(A){var F={},N=V(A,0),D=Q(A,N[0]),L=X.getGeneralNames(D),B=L[0].dn;F.issuer=B;var O=J(A,N[1]);return F.serial={hex:O},F},this.getCertificateSet=function(A){var F=V(A,0),N=[];for(var D=0;D<F.length;D++){var L=Q(A,F[D]);if(L.substr(0,2)=="30"){var B=RG(L,"CERTIFICATE");N.push(B)}}return{array:N,sortflag:!1}}};if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};if(typeof l.asn1.tsp>"u"||!l.asn1.tsp)l.asn1.tsp={};l.asn1.tsp.TimeStampToken=function($){var Y=l,X=Y.asn1,G=X.tsp;if(G.TimeStampToken.superclass.constructor.call(this),this.params=null,this.getEncodedHexPrepare=function(){var J=new G.TSTInfo(this.params.econtent.content);this.params.econtent.content.hex=J.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.TimeStampToken,l.asn1.cms.SignedData);l.asn1.tsp.TSTInfo=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.DERInteger,W=G.DERBoolean,Z=G.DERGeneralizedTime,K=G.DERObjectIdentifier,H=G.DERTaggedObject,z=G.tsp,V=z.MessageImprint,A=z.Accuracy,F=G.x509.X500Name,N=G.x509.GeneralName;if(z.TSTInfo.superclass.constructor.call(this),this.dVersion=new Q({int:1}),this.dPolicy=null,this.dMessageImprint=null,this.dSerial=null,this.dGenTime=null,this.dAccuracy=null,this.dOrdering=null,this.dNonce=null,this.dTsa=null,this.tohex=function(){var D=[this.dVersion];if(this.dPolicy==null)throw Error("policy shall be specified.");if(D.push(this.dPolicy),this.dMessageImprint==null)throw Error("messageImprint shall be specified.");if(D.push(this.dMessageImprint),this.dSerial==null)throw Error("serialNumber shall be specified.");if(D.push(this.dSerial),this.dGenTime==null)throw Error("genTime shall be specified.");if(D.push(this.dGenTime),this.dAccuracy!=null)D.push(this.dAccuracy);if(this.dOrdering!=null)D.push(this.dOrdering);if(this.dNonce!=null)D.push(this.dNonce);if(this.dTsa!=null)D.push(this.dTsa);var L=new J({array:D});return this.hTLV=L.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if(typeof $.policy=="string"){if(!$.policy.match(/^[0-9.]+$/))throw"policy shall be oid like 0.1.4.134";this.dPolicy=new K({oid:$.policy})}if($.messageImprint!==void 0)this.dMessageImprint=new V($.messageImprint);if($.serial!==void 0)this.dSerial=new Q($.serial);if($.genTime!==void 0)this.dGenTime=new Z($.genTime);if($.accuracy!==void 0)this.dAccuracy=new A($.accuracy);if($.ordering!==void 0&&$.ordering==!0)this.dOrdering=new W;if($.nonce!==void 0)this.dNonce=new Q($.nonce);if($.tsa!==void 0)this.dTsa=new H({tag:"a0",explicit:!0,obj:new N({dn:$.tsa})})}};X1(l.asn1.tsp.TSTInfo,l.asn1.ASN1Object);l.asn1.tsp.Accuracy=function($){var Y=l,X=Y.asn1,G=X.ASN1Util.newObject;if(X.tsp.Accuracy.superclass.constructor.call(this),this.params=null,this.tohex=function(){var J=this.params,Q=[];if(J.seconds!=null&&typeof J.seconds=="number")Q.push({int:J.seconds});if(J.millis!=null&&typeof J.millis=="number")Q.push({tag:{tagi:"80",obj:{int:J.millis}}});if(J.micros!=null&&typeof J.micros=="number")Q.push({tag:{tagi:"81",obj:{int:J.micros}}});return G({seq:Q}).tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.Accuracy,l.asn1.ASN1Object);l.asn1.tsp.MessageImprint=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.DEROctetString,Q=X.x509,W=Q.AlgorithmIdentifier;if(X.tsp.MessageImprint.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Z=this.params,K=new W({name:Z.alg}),H=new J({hex:Z.hash}),z=new G({array:[K,H]});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.tsp.MessageImprint,l.asn1.ASN1Object);l.asn1.tsp.TimeStampReq=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.DERInteger,Q=X.DERBoolean,W=X.ASN1Object,Z=X.DERObjectIdentifier,K=X.tsp,H=K.MessageImprint;if(K.TimeStampReq.superclass.constructor.call(this),this.params=null,this.tohex=function(){var z=this.params,V=[];if(V.push(new J({int:1})),z.messageImprint instanceof l.asn1.ASN1Object)V.push(z.messageImprint);else V.push(new H(z.messageImprint));if(z.policy!=null)V.push(new Z(z.policy));if(z.nonce!=null)V.push(new J(z.nonce));if(z.certreq==!0)V.push(new Q);var A=new G({array:V});return A.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.TimeStampReq,l.asn1.ASN1Object);l.asn1.tsp.TimeStampResp=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.ASN1Object,Q=X.tsp,W=Q.PKIStatusInfo;if(Q.TimeStampResp.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Z=this.params,K=[];if(Z.econtent!=null||Z.tst!=null){if(Z.statusinfo!=null)K.push(new W(Z.statusinfo));else K.push(new W("granted"));if(Z.econtent!=null)K.push(new Q.TimeStampToken(Z).getContentInfo());else if(Z.tst instanceof X.ASN1Object)K.push(Z.tst);else throw Error("improper member tst value")}else if(Z.statusinfo!=null)K.push(new W(Z.statusinfo));else throw Error("parameter for token nor statusinfo not specified");var H=new G({array:K});return H.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.TimeStampResp,l.asn1.ASN1Object);l.asn1.tsp.PKIStatusInfo=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.tsp,W=Q.PKIStatus,Z=Q.PKIFreeText,K=Q.PKIFailureInfo;if(Q.PKIStatusInfo.superclass.constructor.call(this),this.params=null,this.tohex=function(){var H=this.params,z=[];if(typeof H=="string")z.push(new W(H));else{if(H.status==null)throw new Y("property 'status' unspecified");if(z.push(new W(H.status)),H.statusstr!=null)z.push(new Z(H.statusstr));if(H.failinfo!=null)z.push(new K(H.failinfo))}var V=new J({array:z});return V.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.PKIStatusInfo,l.asn1.ASN1Object);l.asn1.tsp.PKIStatus=function($){var Y=Error,X=l,G=X.asn1,J=G.DERInteger,Q=G.tsp;Q.PKIStatus.superclass.constructor.call(this);var W={granted:0,grantedWithMods:1,rejection:2,waiting:3,revocationWarning:4,revocationNotification:5};if(this.params=null,this.tohex=function(){var Z=this.params,K,H;if(typeof Z=="string")try{H=W[Z]}catch(z){throw new Y("undefined name: "+Z)}else if(typeof Z=="number")H=Z;else throw new Y("unsupported params");return new J({int:H}).tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.PKIStatus,l.asn1.ASN1Object);l.asn1.tsp.PKIFreeText=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.DERUTF8String,W=G.tsp;if(W.PKIFreeText.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Z=this.params;if(!(Z instanceof Array))throw new Y("wrong params: not array");var K=[];for(var H=0;H<Z.length;H++)K.push(new Q({str:Z[H]}));var z=new J({array:K});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.PKIFreeText,l.asn1.ASN1Object);l.asn1.tsp.PKIFailureInfo=function($){var Y=Error,X=l,G=X.asn1,J=G.DERBitString,Q=G.tsp,W=Q.PKIFailureInfo,Z={badAlg:0,badRequest:2,badDataFormat:5,timeNotAvailable:14,unacceptedPolicy:15,unacceptedExtension:16,addInfoNotAvailable:17,systemFailure:25};if(W.superclass.constructor.call(this),this.params=null,this.getBinValue=function(){var K=this.params,H=0;if(typeof K=="number"&&0<=K&&K<=25){H|=1<<K;var z=H.toString(2),V="";for(var A=z.length-1;A>=0;A--)V+=z[A];return V}else if(typeof K=="string"&&Z[K]!=null)return eK0([K],Z);else if(typeof K=="object"&&K.length!=null)return eK0(K,Z);else throw new Y("wrong params");return},this.tohex=function(){var K=this.params,H=this.getBinValue();return new J({bin:H}).tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.PKIFailureInfo,l.asn1.ASN1Object);l.asn1.tsp.AbstractTSAAdapter=function($){this.getTSTHex=function(Y,X){throw"not implemented yet"}};l.asn1.tsp.SimpleTSAAdapter=function($){var Y=l,X=Y.asn1,G=X.tsp,J=Y.crypto.Util.hashHex;if(G.SimpleTSAAdapter.superclass.constructor.call(this),this.params=null,this.serial=0,this.getTSTHex=function(Q,W){var Z=J(Q,W);this.params.econtent.content.messageImprint={alg:W,hash:Z},this.params.econtent.content.serial={int:this.serial++};var K=Math.floor(Math.random()*1e9);this.params.econtent.content.nonce={int:K};var H=new G.TimeStampToken(this.params);return H.getContentInfoEncodedHex()},$!==void 0)this.params=$};X1(l.asn1.tsp.SimpleTSAAdapter,l.asn1.tsp.AbstractTSAAdapter);l.asn1.tsp.FixedTSAAdapter=function($){var Y=l,X=Y.asn1,G=X.tsp,J=Y.crypto.Util.hashHex;if(G.FixedTSAAdapter.superclass.constructor.call(this),this.params=null,this.getTSTHex=function(Q,W){var Z=J(Q,W);this.params.econtent.content.messageImprint={alg:W,hash:Z};var K=new G.TimeStampToken(this.params);return K.getContentInfoEncodedHex()},$!==void 0)this.params=$};X1(l.asn1.tsp.FixedTSAAdapter,l.asn1.tsp.AbstractTSAAdapter);l.asn1.tsp.TSPUtil=new function(){};l.asn1.tsp.TSPUtil.newTimeStampToken=function($){return new l.asn1.tsp.TimeStampToken($)};l.asn1.tsp.TSPUtil.parseTimeStampReq=function($){var Y=new l.asn1.tsp.TSPParser;return Y.getTimeStampReq($)};l.asn1.tsp.TSPUtil.parseMessageImprint=function($){var Y=new l.asn1.tsp.TSPParser;return Y.getMessageImprint($)};l.asn1.tsp.TSPParser=function(){var $=Error,Y=e4,X=new Y,G=M1,J=G.getV,Q=G.getTLV,W=G.getIdxbyList,Z=G.getTLVbyListEx,K=G.getChildIdx,H=["granted","grantedWithMods","rejection","waiting","revocationWarning","revocationNotification"],z={0:"badAlg",2:"badRequest",5:"badDataFormat",14:"timeNotAvailable",15:"unacceptedPolicy",16:"unacceptedExtension",17:"addInfoNotAvailable",25:"systemFailure"};this.getResponse=function(V){var A=K(V,0);if(A.length==1)return this.getPKIStatusInfo(Q(V,A[0]));else if(A.length>1){var F=this.getPKIStatusInfo(Q(V,A[0])),N=Q(V,A[1]),D=this.getToken(N);return D.statusinfo=F,D}},this.getToken=function(V){var A=new l.asn1.cms.CMSParser,F=A.getCMSSignedData(V);return this.setTSTInfo(F),F},this.setTSTInfo=function(V){var A=V.econtent;if(A.type=="tstinfo"){var F=A.content.hex,N=this.getTSTInfo(F);A.content=N}},this.getTSTInfo=function(V){var A={},F=K(V,0),N=J(V,F[1]);A.policy=Z30(N);var D=Q(V,F[2]);A.messageImprint=this.getMessageImprint(D);var L=J(V,F[3]);A.serial={hex:L};var B=J(V,F[4]);A.genTime={str:S9(B)};var O=0;if(F.length>5&&V.substr(F[5],2)=="30"){var E=Q(V,F[5]);A.accuracy=this.getAccuracy(E),O++}if(F.length>5+O&&V.substr(F[5+O],2)=="01"){var M=J(V,F[5+O]);if(M=="ff")A.ordering=!0;O++}if(F.length>5+O&&V.substr(F[5+O],2)=="02"){var R=J(V,F[5+O]);A.nonce={hex:R},O++}if(F.length>5+O&&V.substr(F[5+O],2)=="a0"){var q=Q(V,F[5+O]);q="30"+q.substr(2),pGeneralNames=X.getGeneralNames(q);var w=pGeneralNames[0].dn;A.tsa=w,O++}if(F.length>5+O&&V.substr(F[5+O],2)=="a1"){var I=Q(V,F[5+O]);I="30"+I.substr(2);var P=X.getExtParamArray(I);A.ext=P,O++}return A},this.getAccuracy=function(V){var A={},F=K(V,0);for(var N=0;N<F.length;N++){var D=V.substr(F[N],2),L=J(V,F[N]),B=parseInt(L,16);if(D=="02")A.seconds=B;else if(D=="80")A.millis=B;else if(D=="81")A.micros=B}return A},this.getMessageImprint=function(V){if(V.substr(0,2)!="30")throw Error("head of messageImprint hex shall be x30");var A={},F=K(V,0),N=W(V,0,[0,0]),D=J(V,N),L=G.hextooidstr(D),B=l.asn1.x509.OID.oid2name(L);if(B=="")throw Error("hashAlg name undefined: "+L);var O=B,E=W(V,0,[1]);return A.alg=O,A.hash=J(V,E),A},this.getPKIStatusInfo=function(V){var A={},F=K(V,0),N=0;try{var D=J(V,F[0]),L=parseInt(D,16);A.status=H[L]}catch(E){}if(F.length>1&&V.substr(F[1],2)=="30"){var B=Q(V,F[1]);A.statusstr=this.getPKIFreeText(B),N++}if(F.length>N&&V.substr(F[1+N],2)=="03"){var O=Q(V,F[1+N]);A.failinfo=this.getPKIFailureInfo(O)}return A},this.getPKIFreeText=function(V){var A=[],F=K(V,0);for(var N=0;N<F.length;N++)A.push(G.getString(V,F[N]));return A},this.getPKIFailureInfo=function(V){var A=G.getInt(V,0);if(z[A]!=null)return z[A];else return A},this.getTimeStampReq=function(V){var A={};A.certreq=!1;var F=K(V,0);if(F.length<2)throw Error("TimeStampReq must have at least 2 items");var N=Q(V,F[1]);A.messageImprint=l.asn1.tsp.TSPUtil.parseMessageImprint(N);for(var D=2;D<F.length;D++){var L=F[D],B=V.substr(L,2);if(B=="06"){var O=J(V,L);A.policy=G.hextooidstr(O)}if(B=="02")A.nonce=J(V,L);if(B=="01")A.certreq=!0}return A}};if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};if(typeof l.asn1.cades>"u"||!l.asn1.cades)l.asn1.cades={};l.asn1.cades.SignaturePolicyIdentifier=function($){var Y=l,X=Y.asn1,G=X.cades,J=G.SignaturePolicyId;if(G.SignaturePolicyIdentifier.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.15",this.params=null,this.getValueArray=function(){return[new J(this.params)]},this.setByParam=function(Q){this.params=Q},$!=null)this.setByParam($)};X1(l.asn1.cades.SignaturePolicyIdentifier,l.asn1.cms.Attribute);l.asn1.cades.SignaturePolicyId=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.DERObjectIdentifier,Q=X.x509,W=Q.AlgorithmIdentifier,Z=X.cades,K=Z.SignaturePolicyId,H=Z.OtherHashAlgAndValue;if(K.superclass.constructor.call(this),this.params=null,this.tohex=function(){var z=this.params,V=[];V.push(new J(z.oid)),V.push(new H(z));var A=new G({array:V});return A.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(z){this.params=z},$!=null)this.setByParam($)};X1(l.asn1.cades.SignaturePolicyId,l.asn1.ASN1Object);l.asn1.cades.OtherHashAlgAndValue=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.DEROctetString,W=G.x509,Z=W.AlgorithmIdentifier,K=G.cades,H=K.OtherHashAlgAndValue;if(H.superclass.constructor.call(this),this.params=null,this.tohex=function(){var z=this.params;if(z.alg==null)throw new Y("property 'alg' not specified");if(z.hash==null&&z.cert==null)throw new Y("property 'hash' nor 'cert' not specified");var V=null;if(z.hash!=null)V=z.hash;else if(z.cert!=null){if(typeof z.cert!="string")throw new Y("cert not string");var A=z.cert;if(z.cert.indexOf("-----BEGIN")!=-1)A=B$(z.cert);V=l.crypto.Util.hashHex(A,z.alg)}var F=[];F.push(new Z({name:z.alg})),F.push(new Q({hex:V}));var N=new J({array:F});return N.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cades.OtherHashAlgAndValue,l.asn1.ASN1Object);l.asn1.cades.OtherHashValue=function($){l.asn1.cades.OtherHashValue.superclass.constructor.call(this);var Y=Error,X=l,G=X.lang.String.isHex,J=X.asn1,Q=J.DEROctetString,W=X.crypto.Util.hashHex;if(this.params=null,this.tohex=function(){var Z=this.params;if(Z.hash==null&&Z.cert==null)throw new Y("hash or cert not specified");var K=null;if(Z.hash!=null)K=Z.hash;else if(Z.cert!=null){if(typeof Z.cert!="string")throw new Y("cert not string");var H=Z.cert;if(Z.cert.indexOf("-----BEGIN")!=-1)H=B$(Z.cert);K=l.crypto.Util.hashHex(H,"sha1")}return new Q({hex:K}).tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cades.OtherHashValue,l.asn1.ASN1Object);l.asn1.cades.SignatureTimeStamp=function($){var Y=Error,X=l,G=X.lang.String.isHex,J=X.asn1,Q=J.ASN1Object,W=J.x509,Z=J.cades;if(Z.SignatureTimeStamp.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.14",this.params=null,this.getValueArray=function(){var K=this.params;if(K.tst!=null)if(G(K.tst)){var H=new Q;return H.hTLV=K.tst,[H]}else if(K.tst instanceof Q)return[K.tst];else throw new Y("params.tst has wrong value");else if(K.res!=null){var z=K.res;if(z instanceof Q)z=z.tohex();if(typeof z!="string"||!G(z))throw new Y("params.res has wrong value");var V=M1.getTLVbyList(z,0,[1]),H=new Q;return H.hTLV=K.tst,[H]}},$!=null)this.setByParam($)};X1(l.asn1.cades.SignatureTimeStamp,l.asn1.cms.Attribute);l.asn1.cades.CompleteCertificateRefs=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.cades,W=Q.OtherCertID,Z=X.lang.String.isHex;if(Q.CompleteCertificateRefs.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.21",this.params=null,this.getValueArray=function(){var K=this.params,H=[];for(var z=0;z<K.array.length;z++){var V=K.array[z];if(typeof V=="string")if(V.indexOf("-----BEGIN")!=-1)V={cert:V};else if(Z(V))V={hash:V};else throw new Y("unsupported value: "+V);if(K.alg!=null&&V.alg==null)V.alg=K.alg;if(K.hasis!=null&&V.hasis==null)V.hasis=K.hasis;var A=new W(V);H.push(A)}var F=new J({array:H});return[F]},$!=null)this.setByParam($)};X1(l.asn1.cades.CompleteCertificateRefs,l.asn1.cms.Attribute);l.asn1.cades.OtherCertID=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.cms,Q=J.IssuerSerial,W=X.cades,Z=W.OtherHashValue,K=W.OtherHashAlgAndValue;if(W.OtherCertID.superclass.constructor.call(this),this.params=$,this.tohex=function(){var H=this.params;if(typeof H=="string"){if(H.indexOf("-----BEGIN")!=-1)H={cert:H};else if(_isHex(H))H={hash:H}}var z=[],V=null;if(H.alg!=null)V=new K(H);else V=new Z(H);if(z.push(V),H.cert!=null&&H.hasis==!0||H.issuer!=null&&H.serial!=null){var A=new Q(H);z.push(A)}var F=new G({array:z});return F.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cades.OtherCertID,l.asn1.ASN1Object);l.asn1.cades.OtherHash=function($){var Y=Error,X=l,G=X.asn1,J=G.cms,Q=G.cades,W=Q.OtherHashAlgAndValue,Z=Q.OtherHashValue,K=X.crypto.Util.hashHex,H=X.lang.String.isHex;if(Q.OtherHash.superclass.constructor.call(this),this.params=null,this.tohex=function(){var z=this.params;if(typeof z=="string"){if(z.indexOf("-----BEGIN")!=-1)z={cert:z};else if(H(z))z={hash:z}}var V=null;if(z.alg!=null)V=new W(z);else V=new Z(z);return V.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cades.OtherHash,l.asn1.ASN1Object);l.asn1.cades.CAdESUtil=new function(){};l.asn1.cades.CAdESUtil.parseSignedDataForAddingUnsigned=function($){var Y=new l.asn1.cms.CMSParser,X=Y.getCMSSignedData($);return X};l.asn1.cades.CAdESUtil.parseSignerInfoForAddingUnsigned=function($,Y,X){var G=M1,J=G.getChildIdx,Q=G.getTLV,W=G.getV,Z=l,K=Z.asn1,H=K.ASN1Object,z=K.cms,V=z.AttributeList,A=z.SignerInfo,F={},N=J($,Y);if(N.length!=6)throw"not supported items for SignerInfo (!=6)";var D=N.shift();F.version=Q($,D);var L=N.shift();F.si=Q($,L);var B=N.shift();F.digalg=Q($,B);var O=N.shift();F.sattrs=Q($,O);var E=N.shift();F.sigalg=Q($,E);var M=N.shift();F.sig=Q($,M),F.sigval=W($,M);var R=null;return F.obj=new A,R=new H,R.hTLV=F.version,F.obj.dCMSVersion=R,R=new H,R.hTLV=F.si,F.obj.dSignerIdentifier=R,R=new H,R.hTLV=F.digalg,F.obj.dDigestAlgorithm=R,R=new H,R.hTLV=F.sattrs,F.obj.dSignedAttrs=R,R=new H,R.hTLV=F.sigalg,F.obj.dSigAlg=R,R=new H,R.hTLV=F.sig,F.obj.dSig=R,F.obj.dUnsignedAttrs=new V,F};if(typeof l.asn1.csr>"u"||!l.asn1.csr)l.asn1.csr={};l.asn1.csr.CertificationRequest=function($){var Y=l,X=Y.asn1,G=X.DERBitString,J=X.DERSequence,Q=X.csr,W=X.x509,Z=Q.CertificationRequestInfo;if(Q.CertificationRequest.superclass.constructor.call(this),this.setByParam=function(K){this.params=K},this.sign=function(){var K=new Z(this.params).tohex(),H=new l.crypto.Signature({alg:this.params.sigalg});H.init(this.params.sbjprvkey),H.updateHex(K);var z=H.sign();this.params.sighex=z},this.getPEM=function(){return RG(this.tohex(),"CERTIFICATE REQUEST")},this.tohex=function(){var K=this.params,H=new l.asn1.csr.CertificationRequestInfo(this.params),z=new l.asn1.x509.AlgorithmIdentifier({name:K.sigalg});if(K.sighex==null&&K.sbjprvkey!=null)this.sign();if(K.sighex==null)throw Error("sighex or sbjprvkey parameter not defined");var V=new G({hex:"00"+K.sighex}),A=new J({array:[H,z,V]});return A.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.csr.CertificationRequest,l.asn1.ASN1Object);l.asn1.csr.CertificationRequestInfo=function($){var Y=l,X=Y.asn1,G=X.DERBitString,J=X.DERSequence,Q=X.DERInteger,W=X.DERUTF8String,Z=X.DERTaggedObject,K=X.ASN1Util.newObject,H=X.csr,z=X.x509,V=z.X500Name,A=z.Extensions,F=z.SubjectPublicKeyInfo,N=H.AttributeList;H.CertificationRequestInfo.superclass.constructor.call(this),this.params=null,this.setByParam=function(L){if(L!=null)this.params=L},this.tohex=function(){var L=this.params,B=[];if(B.push(new Q({int:0})),B.push(new V(L.subject)),B.push(new F(K8.getKey(L.sbjpubkey))),L.attrs!=null){var O=D(L.attrs),E=K({tag:{tage:"a0",obj:O}});B.push(E)}else if(L.extreq!=null){var M=new A(L.extreq),E=K({tag:{tage:"a0",obj:{seq:[{oid:"1.2.840.113549.1.9.14"},{set:[M]}]}}});B.push(E)}else B.push(new Z({tag:"a0",explicit:!1,obj:new W({str:""})}));var R=new J({array:B});return R.tohex()},this.getEncodedHex=function(){return this.tohex()};function D(L){var B=Error,O=l.asn1.x509.Extensions,E=[];for(var M=0;M<L.length;M++){var R=L[M],q=R.attr;if(q=="extensionRequest"){var w=new O(R.ext),I={seq:[{oid:"1.2.840.113549.1.9.14"},{set:[w]}]};E.push(I)}else if(q=="unstructuredName"){var I={seq:[{oid:"1.2.840.113549.1.9.2"},{set:R.names}]};E.push(I)}else if(q=="challengePassword"){var I={seq:[{oid:"1.2.840.113549.1.9.7"},{set:[{utf8str:R.password}]}]};E.push(I)}else throw new B("unknown CSR attribute")}return{set:E}}if($!=null)this.setByParam($)};X1(l.asn1.csr.CertificationRequestInfo,l.asn1.ASN1Object);l.asn1.csr.AttributeList=function($){function Y(X){}};X1(l.asn1.csr.AttributeList,l.asn1.ASN1Object);l.asn1.csr.CSRUtil=new function(){};l.asn1.csr.CSRUtil.newCSRPEM=function($){var Y=K8,X=l.asn1.csr,G=new X.CertificationRequest($),J=G.getPEM();return J};l.asn1.csr.CSRUtil.getParam=function($,Y){var X=M1,G=X.getV,J=X.getIdxbyList,Q=X.getTLVbyList,W=X.getTLVbyListEx,Z=X.getVbyListEx,K=function(O){var E=J(O,0,[0,3,0,0],"06");if(G(O,E)!="2a864886f70d01090e")return null;return Q(O,0,[0,3,0,1,0],"30")},H={};if($.indexOf("-----BEGIN CERTIFICATE REQUEST")==-1)throw Error("argument is not PEM file");var z=B$($,"CERTIFICATE REQUEST");if(Y)H.tbs=Q(z,0,[0]);try{var V=W(z,0,[0,1]);if(V=="3000")H.subject={};else{var D=new e4;H.subject=D.getX500Name(V)}}catch(O){}var A=W(z,0,[0,2]),F=K8.getKey(A,null,"pkcs8pub");H.sbjpubkey=K8.getPEM(F,"PKCS8PUB");var N=K(z),D=new e4;if(N!=null)H.extreq=D.getExtParamArray(N);try{var L=W(z,0,[1],"30"),D=new e4;H.sigalg=D.getAlgorithmIdentifierName(L)}catch(O){}try{var B=Z(z,0,[2]);H.sighex=B}catch(O){}return H};l.asn1.csr.CSRUtil.verifySignature=function($){try{var Y=null;if(typeof $=="string"&&$.indexOf("-----BEGIN CERTIFICATE REQUEST")!=-1)Y=l.asn1.csr.CSRUtil.getParam($,!0);else if(typeof $=="object"&&$.sbjpubkey!=null&&$.sigalg!=null&&$.sighex!=null&&$.tbs!=null)Y=$;if(Y==null)return!1;var X=new l.crypto.Signature({alg:Y.sigalg});return X.init(Y.sbjpubkey),X.updateHex(Y.tbs),X.verify(Y.sighex)}catch(G){return alert(G),!1}};if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};if(typeof l.asn1.ocsp>"u"||!l.asn1.ocsp)l.asn1.ocsp={};l.asn1.ocsp.DEFAULT_HASH="sha1";l.asn1.ocsp.OCSPResponse=function($){l.asn1.ocsp.OCSPResponse.superclass.constructor.call(this);var Y=l.asn1.DEREnumerated,X=l.asn1.ASN1Util.newObject,G=l.asn1.ocsp.ResponseBytes,J=["successful","malformedRequest","internalError","tryLater","_not_used_","sigRequired","unauthorized"];if(this.params=null,this._getStatusCode=function(){var Q=this.params.resstatus;if(typeof Q=="number")return Q;if(typeof Q!="string")return-1;return J.indexOf(Q)},this.setByParam=function(Q){this.params=Q},this.tohex=function(){var Q=this.params,W=this._getStatusCode();if(W==-1)throw Error("responseStatus not supported: "+Q.resstatus);if(W!=0)return X({seq:[{enum:{int:W}}]}).tohex();var Z=new G(Q);return X({seq:[{enum:{int:0}},{tag:{tag:"a0",explicit:!0,obj:Z}}]}).tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.OCSPResponse,l.asn1.ASN1Object);l.asn1.ocsp.ResponseBytes=function($){l.asn1.ocsp.ResponseBytes.superclass.constructor.call(this);var Y=l.asn1,X=Y.DERSequence,G=Y.DERObjectIdentifier,J=Y.DEROctetString,Q=Y.ocsp.BasicOCSPResponse;if(this.params=null,this.setByParam=function(W){this.params=W},this.tohex=function(){var W=this.params;if(W.restype!="ocspBasic")throw Error("not supported responseType: "+W.restype);var Z=new Q(W),K=[];K.push(new G({name:"ocspBasic"})),K.push(new J({hex:Z.tohex()}));var H=new X({array:K});return H.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.ResponseBytes,l.asn1.ASN1Object);l.asn1.ocsp.BasicOCSPResponse=function($){l.asn1.ocsp.BasicOCSPResponse.superclass.constructor.call(this);var Y=Error,X=l.asn1,G=X.ASN1Object,J=X.DERSequence,Q=X.DERGeneralizedTime,W=X.DERTaggedObject,Z=X.DERBitString,K=X.x509.Extensions,H=X.x509.AlgorithmIdentifier,z=X.ocsp,V=z.ResponderID;if(_SingleResponseList=z.SingleResponseList,_ResponseData=z.ResponseData,this.params=null,this.setByParam=function(A){this.params=A},this.sign=function(){var A=this.params,F=A.tbsresp.tohex(),N=new l.crypto.Signature({alg:A.sigalg});N.init(A.reskey),N.updateHex(F),A.sighex=N.sign()},this.tohex=function(){var A=this.params;if(A.tbsresp==null)A.tbsresp=new _ResponseData(A);if(A.sighex==null&&A.reskey!=null)this.sign();var F=[];if(F.push(A.tbsresp),F.push(new H({name:A.sigalg})),F.push(new Z({hex:"00"+A.sighex})),A.certs!=null&&A.certs.length!=null){var N=[];for(var D=0;D<A.certs.length;D++){var L=A.certs[D],B=null;if(M1.isASN1HEX(L))B=L;else if(L.match(/-----BEGIN/))B=B$(L);else throw new Y("certs["+D+"] not hex or PEM");N.push(new G({tlv:B}))}var O=new J({array:N});F.push(new W({tag:"a0",explicit:!0,obj:O}))}var E=new J({array:F});return E.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.BasicOCSPResponse,l.asn1.ASN1Object);l.asn1.ocsp.ResponseData=function($){l.asn1.ocsp.ResponseData.superclass.constructor.call(this);var Y=Error,X=l.asn1,G=X.DERSequence,J=X.DERGeneralizedTime,Q=X.DERTaggedObject,W=X.x509.Extensions,Z=X.ocsp,K=Z.ResponderID;if(_SingleResponseList=Z.SingleResponseList,this.params=null,this.tohex=function(){var H=this.params;if(H.respid!=null)new Y("respid not specified");if(H.prodat!=null)new Y("prodat not specified");if(H.array!=null)new Y("array not specified");var z=[];if(z.push(new K(H.respid)),z.push(new J(H.prodat)),z.push(new _SingleResponseList(H.array)),H.ext!=null){var V=new W(H.ext);z.push(new Q({tag:"a1",explicit:!0,obj:V}))}var A=new G({array:z});return A.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(H){this.params=H},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.ResponseData,l.asn1.ASN1Object);l.asn1.ocsp.ResponderID=function($){l.asn1.ocsp.ResponderID.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.ASN1Util.newObject,J=X.x509.X500Name,Q=Y.lang.String.isHex,W=Error;if(this.params=null,this.tohex=function(){var Z=this.params;if(Z.key!=null){var K=null;if(typeof Z.key=="string"){if(Q(Z.key))K=Z.key;if(Z.key.match(/-----BEGIN CERTIFICATE/)){var H=new e4(Z.key),z=H.getExtSubjectKeyIdentifier();if(z!=null)K=z.kid.hex}}else if(Z.key instanceof e4){var z=Z.key.getExtSubjectKeyIdentifier();if(z!=null)K=z.kid.hex}if(K==null)throw new W("wrong key member value");var V=G({tag:{tag:"a2",explicit:!0,obj:{octstr:{hex:K}}}});return V.tohex()}else if(Z.name!=null){var A=null;if(typeof Z.name=="string"&&Z.name.match(/-----BEGIN CERTIFICATE/)){var H=new e4(Z.name);A=H.getSubject()}else if(Z.name instanceof e4)A=Z.name.getSubject();else if(typeof Z.name=="object"&&(Z.name.array!=null||Z.name.str!=null))A=Z.name;if(A==null)throw new W("wrong name member value");var V=G({tag:{tag:"a1",explicit:!0,obj:new J(A)}});return V.tohex()}throw new W("key or name not specified")},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(Z){this.params=Z},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.ResponderID,l.asn1.ASN1Object);l.asn1.ocsp.SingleResponseList=function($){l.asn1.ocsp.SingleResponseList.superclass.constructor.call(this);var Y=l.asn1,X=Y.DERSequence,G=Y.ocsp.SingleResponse;if(this.params=null,this.tohex=function(){var J=this.params;if(typeof J!="object"||J.length==null)throw Error("params not specified properly");var Q=[];for(var W=0;W<J.length;W++)Q.push(new G(J[W]));var Z=new X({array:Q});return Z.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(J){this.params=J},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.SingleResponseList,l.asn1.ASN1Object);l.asn1.ocsp.SingleResponse=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.DERGeneralizedTime,W=G.DERTaggedObject,Z=G.ocsp,K=Z.CertID,H=Z.CertStatus,z=G.x509,V=z.Extensions;if(Z.SingleResponse.superclass.constructor.call(this),this.params=null,this.tohex=function(){var A=this.params,F=[];if(A.certid==null)throw new Y("certid unspecified");if(A.status==null)throw new Y("status unspecified");if(A.thisupdate==null)throw new Y("thisupdate unspecified");if(F.push(new K(A.certid)),F.push(new H(A.status)),F.push(new Q(A.thisupdate)),A.nextupdate!=null){var N=new Q(A.nextupdate);F.push(new W({tag:"a0",explicit:!0,obj:N}))}if(A.ext!=null){var D=new V(A.ext);F.push(new W({tag:"a1",explicit:!0,obj:D}))}var L=new J({array:F});return L.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(A){this.params=A},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.SingleResponse,l.asn1.ASN1Object);l.asn1.ocsp.CertID=function($){var Y=l,X=Y.asn1,G=X.DEROctetString,J=X.DERInteger,Q=X.DERSequence,W=X.x509,Z=W.AlgorithmIdentifier,K=X.ocsp,H=K.DEFAULT_HASH,z=Y.crypto,V=z.Util.hashHex,A=e4,F=M1,N=F.getVbyList;if(K.CertID.superclass.constructor.call(this),this.DEFAULT_HASH="sha1",this.params=null,this.setByValue=function(D,L,B,O){if(O==null)O=this.DEFAULT_HASH;this.params={alg:O,issname:D,isskey:L,sbjsn:B}},this.setByCert=function(D,L,B){if(B==null)B=this.DEFAULT_HASH;this.params={alg:B,issuerCert:D,subjectCert:L}},this.getParamByCerts=function(D,L,B){if(B==null)B=this.DEFAULT_HASH;var O=new A(D),E=new A(L),M=V(O.getSubjectHex(),B),R=O.getPublicKeyHex(),q=V(N(R,0,[1],"03",!0),B),w=E.getSerialNumberHex(),I={alg:B,issname:M,isskey:q,sbjsn:w};return I},this.tohex=function(){if(typeof this.params!="object")throw Error("params not set");var D=this.params,L,B,O,E;if(D.alg==null)E=this.DEFAULT_HASH;else E=D.alg;if(D.issuerCert!=null&&D.subjectCert!=null){var M=this.getParamByCerts(D.issuerCert,D.subjectCert,E);L=M.issname,B=M.isskey,O=M.sbjsn}else if(D.issname!=null&&D.isskey!=null&&D.sbjsn!=null)L=D.issname,B=D.isskey,O=D.sbjsn;else throw Error("required param members not defined");var R=new Z({name:E}),q=new G({hex:L}),w=new G({hex:B}),I=new J({hex:O}),P=new Q({array:[R,q,w,I]});return this.hTLV=P.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.CertID,l.asn1.ASN1Object);l.asn1.ocsp.CertStatus=function($){if(l.asn1.ocsp.CertStatus.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Y=this.params;if(Y.status=="good")return"8000";if(Y.status=="unknown")return"8200";if(Y.status=="revoked"){var X=[{gentime:{str:Y.time}}];if(Y.reason!=null)X.push({tag:{tag:"a0",explicit:!0,obj:{enum:{int:Y.reason}}}});var G={tag:"a1",explicit:!1,obj:{seq:X}};return l.asn1.ASN1Util.newObject({tag:G}).tohex()}throw Error("bad status")},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(Y){this.params=Y},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.CertStatus,l.asn1.ASN1Object);l.asn1.ocsp.Request=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.ocsp;if(J.Request.superclass.constructor.call(this),this.dReqCert=null,this.dExt=null,this.tohex=function(){var W=[];if(this.dReqCert===null)throw"reqCert not set";W.push(this.dReqCert);var Z=new G({array:W});return this.hTLV=Z.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},typeof $<"u"){var Q=new J.CertID($);this.dReqCert=Q}};X1(l.asn1.ocsp.Request,l.asn1.ASN1Object);l.asn1.ocsp.TBSRequest=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.ocsp;if(J.TBSRequest.superclass.constructor.call(this),this.version=0,this.dRequestorName=null,this.dRequestList=[],this.dRequestExt=null,this.setRequestListByParam=function(Q){var W=[];for(var Z=0;Z<Q.length;Z++){var K=new J.Request(Q[0]);W.push(K)}this.dRequestList=W},this.tohex=function(){var Q=[];if(this.version!==0)throw"not supported version: "+this.version;if(this.dRequestorName!==null)throw"requestorName not supported";var W=new G({array:this.dRequestList});if(Q.push(W),this.dRequestExt!==null)throw"requestExtensions not supported";var Z=new G({array:Q});return this.hTLV=Z.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if($.reqList!==void 0)this.setRequestListByParam($.reqList)}};X1(l.asn1.ocsp.TBSRequest,l.asn1.ASN1Object);l.asn1.ocsp.OCSPRequest=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.ocsp;if(J.OCSPRequest.superclass.constructor.call(this),this.dTbsRequest=null,this.dOptionalSignature=null,this.tohex=function(){var W=[];if(this.dTbsRequest!==null)W.push(this.dTbsRequest);else throw"tbsRequest not set";if(this.dOptionalSignature!==null)throw"optionalSignature not supported";var Z=new G({array:W});return this.hTLV=Z.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if($.reqList!==void 0){var Q=new J.TBSRequest($);this.dTbsRequest=Q}}};X1(l.asn1.ocsp.OCSPRequest,l.asn1.ASN1Object);l.asn1.ocsp.OCSPUtil={};l.asn1.ocsp.OCSPUtil.getRequestHex=function($,Y,X){var G=l,J=G.asn1,Q=J.ocsp;if(X===void 0)X=Q.DEFAULT_HASH;var W={alg:X,issuerCert:$,subjectCert:Y},Z=new Q.OCSPRequest({reqList:[W]});return Z.tohex()};l.asn1.ocsp.OCSPUtil.getOCSPResponseInfo=function($){var Y=M1,X=Y.getVbyList,G=Y.getVbyListEx,J=Y.getIdxbyList,Q=Y.getIdxbyListEx,W=Y.getV,Z={};try{var K=G($,0,[0],"0a");Z.responseStatus=parseInt(K,16)}catch(A){}if(Z.responseStatus!==0)return Z;try{var H=J($,0,[1,0,1,0,0,2,0,1]);if($.substr(H,2)==="80")Z.certStatus="good";else if($.substr(H,2)==="a1")Z.certStatus="revoked",Z.revocationTime=S9(X($,H,[0]));else if($.substr(H,2)==="82")Z.certStatus="unknown"}catch(A){}try{var z=J($,0,[1,0,1,0,0,2,0,2]);Z.thisUpdate=S9(W($,z))}catch(A){}try{var V=J($,0,[1,0,1,0,0,2,0,3]);if($.substr(V,2)==="a0")Z.nextUpdate=S9(X($,V,[0]))}catch(A){}return Z};l.asn1.ocsp.OCSPParser=function(){var $=Error,Y=e4,X=new Y,G=M1,J=G.getV,Q=G.getTLV,W=G.getIdxbyList,Z=G.getVbyList,K=G.getTLVbyList,H=G.getVbyListEx,z=G.getTLVbyListEx,V=G.getChildIdx;this.getOCSPRequest=function(A){var F=V(A,0);if(F.length!=1&&F.length!=2)throw new $("wrong number elements: "+F.length);var N=this.getTBSRequest(Q(A,F[0]));return N},this.getTBSRequest=function(A){var F={},N=z(A,0,[0],"30");F.array=this.getRequestList(N);var D=z(A,0,["[2]",0],"30");if(D!=null)F.ext=X.getExtParamArray(D);return F},this.getRequestList=function(A){var F=[],N=V(A,0);for(var D=0;D<N.length;D++){var A=Q(A,N[D]);F.push(this.getRequest(A))}return F},this.getRequest=function(A){var F=V(A,0);if(F.length!=1&&F.length!=2)throw new $("wrong number elements: "+F.length);var N=this.getCertID(Q(A,F[0]));if(F.length==2){var D=W(A,0,[1,0]);N.ext=X.getExtParamArray(Q(A,D))}return N},this.getCertID=function(A){var F=V(A,0);if(F.length!=4)throw new $("wrong number elements: "+F.length);var N=new Y,D={};return D.alg=N.getAlgorithmIdentifierName(Q(A,F[0])),D.issname=J(A,F[1]),D.isskey=J(A,F[2]),D.sbjsn=J(A,F[3]),D},this.getOCSPResponse=function(A){var F=V(A,0),N,D=J(A,F[0]),L=parseInt(D);if(F.length==1)return{resstatus:L};var B=K(A,0,[1,0]);return N=this.getResponseBytes(B),N.resstatus=L,N},this.getResponseBytes=function(A){var F=V(A,0),N,D=K(A,0,[1,0]);N=this.getBasicOCSPResponse(D);var L=J(A,F[0]);return N.restype=l.asn1.x509.OID.oid2name(Z30(L)),N},this.getBasicOCSPResponse=function(A){var F=V(A,0),N;N=this.getResponseData(Q(A,F[0]));var D=new e4;N.alg=D.getAlgorithmIdentifierName(Q(A,F[1]));var L=J(A,F[2]);N.sighex=L.substr(2);var B=H(A,0,["[0]"]);if(B!=null){var O=V(B,0),E=[];for(var M=0;M<O.length;M++){var R=Q(B,O[M]);E.push(R)}N.certs=E}return N},this.getResponseData=function(A){var F=V(A,0),N=F.length,D={},L=0;if(A.substr(F[0],2)=="a0")L++;D.respid=this.getResponderID(Q(A,F[L++]));var B=J(A,F[L++]);if(D.prodat=S9(B),D.array=this.getSingleResponseList(Q(A,F[L++])),A.substr(F[N-1],2)=="a1"){var O=K(A,F[N-1],[0]),E=new e4;D.ext=E.getExtParamArray(O)}return D},this.getResponderID=function(A){var F={};if(A.substr(0,2)=="a2"){var N=Z(A,0,[0]);F.key=N}if(A.substr(0,2)=="a1"){var D=K(A,0,[0]),L=new e4;F.name=L.getX500Name(D)}return F},this.getSingleResponseList=function(A){var F=V(A,0),N=[];for(var D=0;D<F.length;D++){var L=this.getSingleResponse(Q(A,F[D]));N.push(L)}return N},this.getSingleResponse=function(A){var F=V(A,0),N={},D=this.getCertID(Q(A,F[0]));N.certid=D;var L=this.getCertStatus(Q(A,F[1]));if(N.status=L,A.substr(F[2],2)=="18"){var B=J(A,F[2]);N.thisupdate=S9(B)}for(var O=3;O<F.length;O++){if(A.substr(F[O],2)=="a0"){var E=Z(A,F[O],[0],"18");N.nextupdate=S9(E)}if(A.substr(F[O],2)=="a1"){var M=new e4,R=K(A,0,[O,0]);N.ext=M.getExtParamArray(R)}}return N},this.getCertStatus=function(A){var F={};if(A=="8000")return{status:"good"};if(A=="8200")return{status:"unknown"};if(A.substr(0,2)=="a1"){F.status="revoked";var N=Z(A,0,[0]),D=S9(N);F.time=D}return F}};var l;if(typeof l>"u"||!l)l={};if(typeof l.lang>"u"||!l.lang)l.lang={};l.lang.String=function(){};function So4($){var Y=[];for(var X=0;X<$.length;X++)Y[X]=$.charCodeAt(X);return Y}function J30($){var Y="";for(var X=0;X<$.length;X++){var G=$[X].toString(16);if(G.length==1)G="0"+G;Y=Y+G}return Y}function b2($){return J30(So4($))}function Yr($){return $=$.replace(/\=/g,""),$=$.replace(/\+/g,"-"),$=$.replace(/\//g,"_"),$}function Q30($){if($.length%4==2)$=$+"==";else if($.length%4==3)$=$+"=";return $=$.replace(/-/g,"+"),$=$.replace(/_/g,"/"),$}function jY($){if($.length%2==1)$="0"+$;return Yr(lk($))}function Z7($){return $30(Q30($))}var Xr,i3;if(typeof Buffer==="function")Xr=function($){return Yr(Buffer.from($,"utf8").toString("base64"))},i3=function($){return Buffer.from(Q30($),"base64").toString("utf8")};else Xr=function($){return jY(fG1(pG1($)))},i3=function($){return decodeURIComponent(gG1(Z7($)))};function W30($){return fG1(pG1($)).toLowerCase()}function S9($){try{return decodeURIComponent(gG1($))}catch(Y){return null}}function ko4($){return S9(vo4($))}function vo4($){var Y=$.match(/.{1,2}/g),X=[];for(var G=0;G<Y.length;G++){var J=parseInt(Y[G],16);if(161<=J&&J<=191)X.push("c2"),X.push(Y[G]);else if(192<=J&&J<=255)X.push("c3"),X.push((J-64).toString(16));else X.push(Y[G])}return X.join("")}function n3($){var Y="";for(var X=0;X<$.length-1;X+=2)Y+=String.fromCharCode(parseInt($.substr(X,2),16));return Y}function nH($){var Y="";for(var X=0;X<$.length;X++)Y+=("0"+$.charCodeAt(X).toString(16)).slice(-2);return Y}function xo4($){return lk($)}function yo4($,Y){return $=$.replace(new RegExp("(.{"+Y+"})","g"),`$1\r
`),$=$.replace(/\s+$/,""),$}function bo4($){var Y=$.replace(/[^0-9A-Za-z\/+=]*/g,""),X=$30(Y);return X}function RG($,Y){return"-----BEGIN "+Y+`-----\r
`+yo4(xo4($),64)+`\r
-----END `+Y+`-----\r
`}function B$($,Y){if($.indexOf("-----BEGIN ")==-1)throw Error("can't find PEM header");if(Y!==void 0)$=$.replace(new RegExp("^[^]*-----BEGIN "+Y+"-----"),""),$=$.replace(new RegExp("-----END "+Y+"-----[^]*$"),"");else $=$.replace(/^[^]*-----BEGIN [^-]+-----/,""),$=$.replace(/-----END [^-]+-----[^]*$/,"");return bo4($)}function ho4($){var Y,X,G,J,Q,W,Z,K,H,z,V,A;if($=go4($),A=$.match(/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/),A){if(Y=parseInt(A[1]),X=parseInt(A[2])-1,G=parseInt(A[3]),J=parseInt(A[4]),Q=parseInt(A[5]),W=parseInt(A[6]),Z=0,z=A[7],z!=="")V=(z.substr(1)+"00").substr(0,3),Z=parseInt(V);return Date.UTC(Y,X,G,J,Q,W,Z)}throw Error("unsupported zulu format: "+$)}function fo4($){return Math.round(ho4($)/1000)}function go4($){if($.match(/^[0-9]{12}Z$/)||$.match(/^[0-9]{12}[.][0-9]*Z$/))return $.match(/^[0-4]/)?"20"+$:"19"+$;return $}function fG1($){return $.replace(/%/g,"")}function gG1($){return $.replace(/(..)/g,"%$1")}function wG1($){var Y="malformed IPv6 address";if(!$.match(/^[0-9A-Fa-f:]+$/))throw Y;$=$.toLowerCase();var X=$.split(":").length-1;if(X<2)throw Y;var G=":".repeat(7-X+2);$=$.replace("::",G);var J=$.split(":");if(J.length!=8)throw Y;for(var Q=0;Q<8;Q++)J[Q]=("0000"+J[Q]).slice(-4);return J.join("")}function _G1($){if(!$.match(/^[0-9A-Fa-f]{32}$/))throw Error("malformed IPv6 address: "+$);$=$.toLowerCase();var Y=$.match(/.{1,4}/g);Y=Y.map(function(J){return J.replace(/^0+/,"")}),Y=Y.map(function(J){return J==""?"0":J}),$=":"+Y.join(":")+":";var X=$.match(/:(0:){2,}/g);if(X==null)return $.slice(1,-1);var G=X.sort().slice(-1)[0];if($=$.replace(G.substr(0,G.length-1),":"),$.substr(0,2)!="::")$=$.substr(1);if($.substr(-2,2)!="::")$=$.substr(0,$.length-1);return $}function tK0($){var Y=Error("malformed hex value");if(!$.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw Y;if($.length==8){var X;try{return X=parseInt($.substr(0,2),16)+"."+parseInt($.substr(2,2),16)+"."+parseInt($.substr(4,2),16)+"."+parseInt($.substr(6,2),16),X}catch(G){throw Y}}else if($.length==16)try{return tK0($.substr(0,8))+"/"+jG1($.substr(8))}catch(G){throw Y}else if($.length==32)return _G1($);else if($.length==64){try{return _G1($.substr(0,32))+"/"+jG1($.substr(32))}catch(G){throw Y}return}else return $}function jG1($){var Y=Error("malformed mask"),X;try{X=new S0($,16).toString(2)}catch(G){throw Y}if(!X.match(/^1*0*$/))throw Y;return X.replace(/0+$/,"").length}function mG1($){var Y=Error("malformed IP address");if($=$.toLowerCase($),!$.match(/^[0-9a-f.:/]+$/))throw Y;if($.match(/^[0-9.]+$/)){var X=$.split(".");if(X.length!==4)throw Y;var G="";try{for(var J=0;J<4;J++){var Q=parseInt(X[J]);G+=("0"+Q.toString(16)).slice(-2)}return G}catch(Z){throw Y}}else if($.match(/^[0-9.]+\/[0-9]+$/)){var W=$.split("/");return mG1(W[0])+TG1(parseInt(W[1]),32)}else if($.match(/^[0-9a-f:]+$/)&&$.indexOf(":")!==-1)return wG1($);else if($.match(/^[0-9a-f:]+\/[0-9]+$/)&&$.indexOf(":")!==-1){var W=$.split("/");return wG1(W[0])+TG1(parseInt(W[1]),128)}else throw Y}function TG1($,Y){if(Y==32&&$==0)return"00000000";if(Y==128&&$==0)return"00000000000000000000000000000000";var X=Array($+1).join("1")+Array(Y-$+1).join("0");return new S0(X,2).toString(16)}function uG1($){function Y(J){var Q=parseInt(J.substr(0,2),16),W=parseInt(J.substr(2),16);if(Q==0&W<128)return String.fromCharCode(W);if(Q<8){var Z=192|(Q&7)<<3|(W&192)>>6,K=128|W&63;return S9(Z.toString(16)+K.toString(16))}var Z=224|(Q&240)>>4,K=128|(Q&15)<<2|(W&192)>>6,H=128|W&63;return S9(Z.toString(16)+K.toString(16)+H.toString(16))}var X=$.match(/.{4}/g),G=X.map(Y);return G.join("")}function pG1($){var Y=encodeURIComponent($),X="";for(var G=0;G<Y.length;G++)if(Y[G]=="%")X=X+Y.substr(G,3),G=G+2;else X=X+"%"+b2(Y[G]);return X}l.lang.String.isInteger=function($){if($.match(/^[0-9]+$/))return!0;else if($.match(/^-[0-9]+$/))return!0;else return!1};l.lang.String.isHex=function($){return dG1($)};function dG1($){if($.length%2==0&&($.match(/^[0-9a-f]+$/)||$.match(/^[0-9A-F]+$/)))return!0;else return!1}l.lang.String.isBase64=function($){if($=$.replace(/\s+/g,""),$.match(/^[0-9A-Za-z+\/]+={0,3}$/)&&$.length%4==0)return!0;else return!1};l.lang.String.isBase64URL=function($){if($.match(/[+/=]/))return!1;return $=Q30($),l.lang.String.isBase64($)};function cG1($){if($.match(/^[0-9A-Za-z-_.]+$/))return!0;return!1}l.lang.String.isIntegerArray=function($){if($=$.replace(/\s+/g,""),$.match(/^\[[0-9,]+\]$/))return!0;else return!1};l.lang.String.isPrintable=function($){if($.match(/^[0-9A-Za-z '()+,-./:=?]*$/)!==null)return!0;return!1};l.lang.String.isIA5=function($){if($.match(/^[\x20-\x21\x23-\x7f]*$/)!==null)return!0;return!1};l.lang.String.isMail=function($){if($.match(/^[A-Za-z0-9]{1}[A-Za-z0-9_.-]*@{1}[A-Za-z0-9_.-]{1,}\.[A-Za-z0-9]{1,}$/)!==null)return!0;return!1};function CG1($){if($.length%2==1)return"0"+$;if($.substr(0,1)>"7")return"00"+$;return $}function mo4($,Y){if(typeof $!="string"||typeof Y!="string")throw Error("arguments shall be string");if($.length!==Y.length)throw Error("input strings must have the same length");if(typeof Buffer==="function"&&typeof l3<"u"){if(l3.timingSafeEqual!==void 0)return l3.timingSafeEqual(Buffer.from($),Buffer.from(Y));if(l3.subtle!==void 0&&l3.subtle.timingSafeEqual)return l3.subtle.timingSafeEqual(Buffer.from($),Buffer.from(Y))}return uo4($,Y)}function uo4($,Y){if(typeof $!="string"||typeof Y!="string")throw Error("arguments shall be string");if($.length!==Y.length)throw Error("input strings must have the same length");let X=Y.slice();var G=0;for(var J=0;J<$.length;J++)G|=$.charCodeAt(J)^X.charCodeAt(J);return G===0}function po4($){var Y=function(Z){var K=Z.toString(16);if(K.length==1)K="0"+K;return K},X=function(Z){var K="",H=parseInt(Z,10),z=H.toString(2),V=7-z.length%7;if(V==7)V=0;var A="";for(var F=0;F<V;F++)A+="0";z=A+z;for(var F=0;F<z.length-1;F+=7){var N=z.substr(F,7);if(F!=z.length-7)N="1"+N;K+=Y(parseInt(N,2))}return K};try{if(!$.match(/^[0-9.]+$/))return null;var G="",J=$.split("."),Q=parseInt(J[0],10)*40+parseInt(J[1],10);G+=Y(Q),J.splice(0,2);for(var W=0;W<J.length;W++)G+=X(J[W]);return G}catch(Z){return null}}function Z30($){if(!dG1($))return null;try{var Y=[],X=$.substr(0,2),G=parseInt(X,16);Y[0]=new String(Math.floor(G/40)),Y[1]=new String(G%40);var J=$.substr(2),Q=[];for(var W=0;W<J.length/2;W++)Q.push(parseInt(J.substr(W*2,2),16));var Z=[],K="";for(var W=0;W<Q.length;W++)if(Q[W]&128)K=K+SG1((Q[W]&127).toString(2),7);else K=K+SG1((Q[W]&127).toString(2),7),Z.push(new String(parseInt(K,2))),K="";var H=Y.join(".");if(Z.length>0)H=H+"."+Z.join(".");return H}catch(z){return null}}function do4($){var Y=new S0(String($),10);return Qr(Y)}function Qr($){var Y=$.toString(16);if(Y.substr(0,1)!="-"){if(Y.length%2==1)Y="0"+Y;else if(!Y.match(/^[0-7]/))Y="00"+Y;return Y}var X=Y.substr(1),G=X.length;if(G%2==1)G+=1;else if(!Y.match(/^[0-7]/))G+=2;var J="";for(var Q=0;Q<G;Q++)J+="f";var W=new S0(J,16),Z=W.xor($).add(S0.ONE);return Y=Z.toString(16).replace(/^-/,""),Y}var SG1=function($,Y,X){if(X==null)X="0";if($.length>=Y)return $;return Array(Y-$.length+1).join(X)+$};function co4($){if($.length%2!=0)return-1;if($=$.toLowerCase(),$.match(/^[0-9a-f]+$/)==null)return-1;try{var Y=$.substr(0,2);if(Y=="00")return parseInt($.substr(2),16);var X=parseInt(Y,16);if(X>7)return-1;var G=$.substr(2),J=parseInt(G,16).toString(2);if(J=="0")J="00000000";J=J.slice(0,0-X);var Q=parseInt(J,2);if(Q==NaN)return-1;return Q}catch(W){return-1}}function lo4($){if(typeof $!="string")return null;if($.length%2!=0)return null;if(!$.match(/^[0-9a-f]+$/))return null;try{var Y=parseInt($.substr(0,2),16);if(Y<0||7<Y)return null;var X=$.substr(2),G="";for(var J=0;J<X.length;J+=2){var Q=X.substr(J,2),W=parseInt(Q,16).toString(2);W=("0000000"+W).slice(-8),G+=W}return G.substr(0,G.length-Y)}catch(Z){return null}}function eK0($,Y){var X=0;for(var G=0;G<$.length;G++)X|=1<<Y[$[G]];var J=X.toString(2),Q="";for(var G=J.length-1;G>=0;G--)Q+=J[G];return Q}function q5($,G,X){if(typeof $!="object")return;var G=String(G).split(".");for(var J=0;J<G.length&&$;J++){var Q=G[J];if(Q.match(/^[0-9]+$/))Q=parseInt(Q);$=$[Q]}return $||$===!1?$:X}function X1($,Y){var X=function(){};if(X.prototype=Y.prototype,$.prototype=new X,$.prototype.constructor=$,$.superclass=Y.prototype,Y.prototype.constructor==Object.prototype.constructor)Y.prototype.constructor=Y}if(typeof l>"u"||!l)l={};if(typeof l.crypto>"u"||!l.crypto)l.crypto={};l.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:y1.algo.MD5,sha1:y1.algo.SHA1,sha224:y1.algo.SHA224,sha256:y1.algo.SHA256,sha384:y1.algo.SHA384,sha512:y1.algo.SHA512,ripemd160:y1.algo.RIPEMD160},this.getDigestInfoHex=function($,Y){if(typeof this.DIGESTINFOHEAD[Y]>"u")throw"alg not supported in Util.DIGESTINFOHEAD: "+Y;return this.DIGESTINFOHEAD[Y]+$},this.getPaddedDigestInfoHex=function($,Y,X){var G=this.getDigestInfoHex($,Y),J=X/4;if(G.length+22>J)throw"key is too short for SigAlg: keylen="+X+","+Y;var Q="0001",W="00"+G,Z="",K=J-Q.length-W.length;for(var H=0;H<K;H+=2)Z+="ff";var z=Q+Z+W;return z},this.hashString=function($,Y){var X=new l.crypto.MessageDigest({alg:Y});return X.digestString($)},this.hashHex=function($,Y){var X=new l.crypto.MessageDigest({alg:Y});return X.digestHex($)},this.sha1=function($){return this.hashString($,"sha1")},this.sha256=function($){return this.hashString($,"sha256")},this.sha256Hex=function($){return this.hashHex($,"sha256")},this.sha512=function($){return this.hashString($,"sha512")},this.sha512Hex=function($){return this.hashHex($,"sha512")},this.isKey=function($){if($ instanceof D6||$ instanceof l.crypto.DSA||$ instanceof l.crypto.ECDSA)return!0;else return!1}};l.crypto.Util.md5=function($){var Y=new l.crypto.MessageDigest({alg:"md5",prov:"cryptojs"});return Y.digestString($)};l.crypto.Util.ripemd160=function($){var Y=new l.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"});return Y.digestString($)};l.crypto.Util.SECURERANDOMGEN=new ak;l.crypto.Util.getRandomHexOfNbytes=function($){var Y=Array($);return l.crypto.Util.SECURERANDOMGEN.nextBytes(Y),J30(Y)};l.crypto.Util.getRandomBigIntegerOfNbytes=function($){return new S0(l.crypto.Util.getRandomHexOfNbytes($),16)};l.crypto.Util.getRandomHexOfNbits=function($){var Y=$%8,X=($-Y)/8,G=Array(X+1);return l.crypto.Util.SECURERANDOMGEN.nextBytes(G),G[0]=(255<<Y&255^255)&G[0],J30(G)};l.crypto.Util.getRandomBigIntegerOfNbits=function($){return new S0(l.crypto.Util.getRandomHexOfNbits($),16)};l.crypto.Util.getRandomBigIntegerZeroToMax=function($){var Y=$.bitLength();while(!0){var X=l.crypto.Util.getRandomBigIntegerOfNbits(Y);if($.compareTo(X)>=0)return X}};l.crypto.Util.getRandomBigIntegerMinToMax=function($,Y){var X=$.compareTo(Y);if(X>0)throw"biMin is greater than biMax";if(X==0)return $;var G=Y.subtract($),J=l.crypto.Util.getRandomBigIntegerZeroToMax(G);return J.add($)};l.crypto.MessageDigest=function($){var Y=null,X=null,G=null;if(this.setAlgAndProvider=function(J,Q){if(J=l.crypto.MessageDigest.getCanonicalAlgName(J),J!==null&&Q===void 0)Q=l.crypto.Util.DEFAULTPROVIDER[J];if(":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(J)!=-1&&Q=="cryptojs"){try{this.md=l.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[J].create()}catch(W){throw"setAlgAndProvider hash alg set fail alg="+J+"/"+W}this.updateString=function(W){this.md.update(W)},this.updateHex=function(W){var Z=y1.enc.Hex.parse(W);this.md.update(Z)},this.digest=function(){var W=this.md.finalize();return W.toString(y1.enc.Hex)},this.digestString=function(W){return this.updateString(W),this.digest()},this.digestHex=function(W){return this.updateHex(W),this.digest()}}if(":sha256:".indexOf(J)!=-1&&Q=="sjcl"){try{this.md=new sjcl.hash.sha256}catch(W){throw"setAlgAndProvider hash alg set fail alg="+J+"/"+W}this.updateString=function(W){this.md.update(W)},this.updateHex=function(W){var Z=sjcl.codec.hex.toBits(W);this.md.update(Z)},this.digest=function(){var W=this.md.finalize();return sjcl.codec.hex.fromBits(W)},this.digestString=function(W){return this.updateString(W),this.digest()},this.digestHex=function(W){return this.updateHex(W),this.digest()}}},this.updateString=function(J){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(J){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(J){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(J){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},$!==void 0){if($.alg!==void 0){if(this.algName=$.alg,$.prov===void 0)this.provName=l.crypto.Util.DEFAULTPROVIDER[this.algName];this.setAlgAndProvider(this.algName,this.provName)}}};l.crypto.MessageDigest.getCanonicalAlgName=function($){if(typeof $==="string")$=$.toLowerCase(),$=$.replace(/-/,"");return $};l.crypto.MessageDigest.getHashLength=function($){var Y=l.crypto.MessageDigest,X=Y.getCanonicalAlgName($);if(Y.HASHLENGTH[X]===void 0)throw"not supported algorithm: "+$;return Y.HASHLENGTH[X]};l.crypto.MessageDigest.HASHLENGTH={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,ripemd160:20};l.crypto.Mac=function($){var Y=null,X=null,G=null,J=null,Q=null;if(this.setAlgAndProvider=function(W,Z){if(W=W.toLowerCase(),W==null)W="hmacsha1";if(W=W.toLowerCase(),W.substr(0,4)!="hmac")throw"setAlgAndProvider unsupported HMAC alg: "+W;if(Z===void 0)Z=l.crypto.Util.DEFAULTPROVIDER[W];this.algProv=W+"/"+Z;var K=W.substr(4);if(":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(K)!=-1&&Z=="cryptojs"){try{var H=l.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[K];this.mac=y1.algo.HMAC.create(H,this.pass)}catch(z){throw"setAlgAndProvider hash alg set fail hashAlg="+K+"/"+z}this.updateString=function(z){this.mac.update(z)},this.updateHex=function(z){var V=y1.enc.Hex.parse(z);this.mac.update(V)},this.doFinal=function(){var z=this.mac.finalize();return z.toString(y1.enc.Hex)},this.doFinalString=function(z){return this.updateString(z),this.doFinal()},this.doFinalHex=function(z){return this.updateHex(z),this.doFinal()}}},this.updateString=function(W){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(W){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(W){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(W){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(W){if(typeof W=="string"){var Z=W;if(W.length%2==1||!W.match(/^[0-9A-Fa-f]+$/))Z=nH(W);this.pass=y1.enc.Hex.parse(Z);return}if(typeof W!="object")throw"KJUR.crypto.Mac unsupported password type: "+W;var Z=null;if(W.hex!==void 0){if(W.hex.length%2!=0||!W.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+W.hex;Z=W.hex}if(W.utf8!==void 0)Z=W30(W.utf8);if(W.rstr!==void 0)Z=nH(W.rstr);if(W.b64!==void 0)Z=$30(W.b64);if(W.b64u!==void 0)Z=Z7(W.b64u);if(Z==null)throw"KJUR.crypto.Mac unsupported password type: "+W;this.pass=y1.enc.Hex.parse(Z)},$!==void 0){if($.pass!==void 0)this.setPassword($.pass);if($.alg!==void 0){if(this.algName=$.alg,$.prov===void 0)this.provName=l.crypto.Util.DEFAULTPROVIDER[this.algName];this.setAlgAndProvider(this.algName,this.provName)}}};l.crypto.Signature=function($){var Y=null,X=null,G=null,J=null,Q=null,W=null,Z=null,K=null,H=null,z=null,V=-1,A=null,F=null,N=null,D=null,L=null;if(this._setAlgNames=function(){var B=this.algName.match(/^(.+)with(.+)$/);if(B){if(this.mdAlgName=B[1].toLowerCase(),this.pubkeyAlgName=B[2].toLowerCase(),this.pubkeyAlgName=="rsaandmgf1"&&this.mdAlgName=="sha")this.mdAlgName="sha1"}},this._zeroPaddingOfSignature=function(B,O){var E="",M=O/4-B.length;for(var R=0;R<M;R++)E=E+"0";return E+B},this.setAlgAndProvider=function(B,O){if(this._setAlgNames(),O!="cryptojs/jsrsa")throw Error("provider not supported: "+O);if(":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName)!=-1){try{this.md=new l.crypto.MessageDigest({alg:this.mdAlgName})}catch(E){throw Error("setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+E)}this.init=function(E,M){var R=null;try{if(M===void 0)R=K8.getKey(E);else R=K8.getKey(E,M)}catch(q){throw"init failed:"+q}if(R.isPrivate===!0)this.prvKey=R,this.state="SIGN";else if(R.isPublic===!0)this.pubKey=R,this.state="VERIFY";else throw"init failed.:"+R},this.updateString=function(E){this.md.updateString(E)},this.updateHex=function(E){this.md.updateHex(E)},this.sign=function(){if(this.sHashHex=this.md.digest(),this.prvKey===void 0&&this.ecprvhex!==void 0&&this.eccurvename!==void 0&&l.crypto.ECDSA!==void 0)this.prvKey=new l.crypto.ECDSA({curve:this.eccurvename,prv:this.ecprvhex});if(this.prvKey instanceof D6&&this.pubkeyAlgName==="rsaandmgf1")this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof D6&&this.pubkeyAlgName==="rsa")this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof l.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else if(this.prvKey instanceof l.crypto.DSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else throw"Signature: unsupported private key alg: "+this.pubkeyAlgName;return this.hSign},this.signString=function(E){return this.updateString(E),this.sign()},this.signHex=function(E){return this.updateHex(E),this.sign()},this.verify=function(E){if(this.sHashHex=this.md.digest(),this.pubKey===void 0&&this.ecpubhex!==void 0&&this.eccurvename!==void 0&&l.crypto.ECDSA!==void 0)this.pubKey=new l.crypto.ECDSA({curve:this.eccurvename,pub:this.ecpubhex});if(this.pubKey instanceof D6&&this.pubkeyAlgName==="rsaandmgf1")return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,E,this.mdAlgName,this.pssSaltLen);else if(this.pubKey instanceof D6&&this.pubkeyAlgName==="rsa")return this.pubKey.verifyWithMessageHash(this.sHashHex,E);else if(l.crypto.ECDSA!==void 0&&this.pubKey instanceof l.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,E);else if(l.crypto.DSA!==void 0&&this.pubKey instanceof l.crypto.DSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,E);else throw"Signature: unsupported public key alg: "+this.pubkeyAlgName}}},this.init=function(B,O){throw"init(key, pass) not supported for this alg:prov="+this.algProvName},this.updateString=function(B){throw"updateString(str) not supported for this alg:prov="+this.algProvName},this.updateHex=function(B){throw"updateHex(hex) not supported for this alg:prov="+this.algProvName},this.sign=function(){throw"sign() not supported for this alg:prov="+this.algProvName},this.signString=function(B){throw"digestString(str) not supported for this alg:prov="+this.algProvName},this.signHex=function(B){throw"digestHex(hex) not supported for this alg:prov="+this.algProvName},this.verify=function(B){throw"verify(hSigVal) not supported for this alg:prov="+this.algProvName},this.initParams=$,$!==void 0){if($.alg!==void 0){if(this.algName=$.alg,$.prov===void 0)this.provName=l.crypto.Util.DEFAULTPROVIDER[this.algName];else this.provName=$.prov;this.algProvName=this.algName+":"+this.provName,this.setAlgAndProvider(this.algName,this.provName),this._setAlgNames()}if($.psssaltlen!==void 0)this.pssSaltLen=$.psssaltlen;if($.prvkeypem!==void 0)if($.prvkeypas!==void 0)throw"both prvkeypem and prvkeypas parameters not supported";else try{var Y=K8.getKey($.prvkeypem);this.init(Y)}catch(B){throw"fatal error to load pem private key: "+B}}};l.crypto.Cipher=function($){};l.crypto.Cipher.encrypt=function($,Y,X,G){if(q5(G,"enclag")!=null)X=G.encalg;if(typeof X=="string"&&X.substr(-4)=="-CBC"){var J=Y,Q=$;if(q5(G,"key")!=null)J=G.key;if(q5(G,"enc")!=null)hEnc=G.enc;var W=y1.enc.Hex.parse(J),Z=y1.enc.Hex.parse(Q),K=y1.enc.Hex.parse(G.iv),H;if(X=="des-EDE3-CBC")H=y1.TripleDES.encrypt(Z,W,{iv:K});else if(X=="aes128-CBC"||X=="aes256-CBC")H=y1.AES.encrypt(Z,W,{iv:K});else throw Error("unsupported algorithm: "+X);return H+""}else throw Error("Cipher.encrypt: unsupported key or algorithm")};l.crypto.Cipher.decrypt=function($,Y,X,G){if(q5(G,"enclag")!=null)X=G.encalg;if(typeof X=="string"&&X.substr(-4)=="-CBC"){var J=Y,Q=$;if(q5(G,"key")!=null)J=G.key;if(q5(G,"enc")!=null)Q=G.enc;var W=y1.enc.Hex.parse(J),Z=y1.enc.Hex.parse(Q),K=y1.enc.Hex.parse(G.iv),H;if(X=="des-EDE3-CBC")H=y1.TripleDES.decrypt({ciphertext:Z},W,{iv:K});else if(X=="aes128-CBC"||X=="aes256-CBC")H=y1.AES.decrypt({ciphertext:Z},W,{iv:K});else throw Error("unsupported algorithm: "+X);return y1.enc.Hex.stringify(H)}else throw Error("Cipher.decrypt: unsupported key or algorithm")};l.crypto.OID=new function(){this.oidhex2name={"2a864886f70d010101":"rsaEncryption","2a8648ce3d0201":"ecPublicKey","2a8648ce380401":"dsa","2a8648ce3d030107":"secp256r1","2b8104001f":"secp192k1","2b81040021":"secp224r1","2b8104000a":"secp256k1","2b81040022":"secp384r1","2b81040023":"secp521r1","2a8648ce380403":"SHA1withDSA","608648016503040301":"SHA224withDSA","608648016503040302":"SHA256withDSA"}};if(typeof l>"u"||!l)l={};if(typeof l.crypto>"u"||!l.crypto)l.crypto={};l.crypto.ECDSA=function($){var Y="secp256r1",X=null,G=null,J=null,Q=Error,W=S0,Z=Q9,K=l.crypto.ECDSA,H=l.crypto.ECParameterDB,z=K.getName,V=M1,A=V.getVbyListEx,F=V.isASN1HEX,N=new ak,D=null;this.type="EC",this.isPrivate=!1,this.isPublic=!1;function L(B,O,E,M){var R=Math.max(O.bitLength(),M.bitLength()),q=B.add2D(E),w=B.curve.getInfinity();for(var I=R-1;I>=0;--I)if(w=w.twice2D(),w.z=W.ONE,O.testBit(I))if(M.testBit(I))w=w.add2D(q);else w=w.add2D(B);else if(M.testBit(I))w=w.add2D(E);return w}if(this.getBigRandom=function(B){return new W(B.bitLength(),N).mod(B.subtract(W.ONE)).add(W.ONE)},this.setNamedCurve=function(B){this.ecparams=H.getByName(B),this.prvKeyHex=null,this.pubKeyHex=null,this.curveName=B},this.setPrivateKeyHex=function(B){this.isPrivate=!0,this.prvKeyHex=B},this.setPublicKeyHex=function(B){this.isPublic=!0,this.pubKeyHex=B},this.getPublicKeyXYHex=function(){var B=this.pubKeyHex;if(B.substr(0,2)!=="04")throw"this method supports uncompressed format(04) only";var O=this.ecparams.keycharlen;if(B.length!==2+O*2)throw"malformed public key hex length";var E={};return E.x=B.substr(2,O),E.y=B.substr(2+O),E},this.getShortNISTPCurveName=function(){var B=this.curveName;if(B==="secp256r1"||B==="NIST P-256"||B==="P-256"||B==="prime256v1")return"P-256";if(B==="secp384r1"||B==="NIST P-384"||B==="P-384")return"P-384";if(B==="secp521r1"||B==="NIST P-521"||B==="P-521")return"P-521";return null},this.generateKeyPairHex=function(){var B=this.ecparams.n,O=this.getBigRandom(B),E=this.ecparams.keycharlen,M=("0000000000"+O.toString(16)).slice(-E);this.setPrivateKeyHex(M);var R=this.generatePublicKeyHex();return{ecprvhex:M,ecpubhex:R}},this.generatePublicKeyHex=function(){var B=new W(this.prvKeyHex,16),O=this.ecparams.G.multiply(B),E=O.getX().toBigInteger(),M=O.getY().toBigInteger(),R=this.ecparams.keycharlen,q=("0000000000"+E.toString(16)).slice(-R),w=("0000000000"+M.toString(16)).slice(-R),I="04"+q+w;return this.setPublicKeyHex(I),I},this.signWithMessageHash=function(B){return this.signHex(B,this.prvKeyHex)},this.signHex=function(B,O){var E=new W(O,16),M=this.ecparams.n,R=new W(B.substring(0,this.ecparams.keycharlen),16);do var q=this.getBigRandom(M),w=this.ecparams.G,I=w.multiply(q),P=I.getX().toBigInteger().mod(M);while(P.compareTo(W.ZERO)<=0);var _=q.modInverse(M).multiply(R.add(E.multiply(P))).mod(M);return K.biRSSigToASN1Sig(P,_)},this.sign=function(B,O){var E=O,M=this.ecparams.n,R=W.fromByteArrayUnsigned(B);do var q=this.getBigRandom(M),w=this.ecparams.G,I=w.multiply(q),P=I.getX().toBigInteger().mod(M);while(P.compareTo(S0.ZERO)<=0);var _=q.modInverse(M).multiply(R.add(E.multiply(P))).mod(M);return this.serializeSig(P,_)},this.verifyWithMessageHash=function(B,O){return this.verifyHex(B,O,this.pubKeyHex)},this.verifyHex=function(B,O,E){try{var M,R,q=K.parseSigHex(O);M=q.r,R=q.s;var w=Z.decodeFromHex(this.ecparams.curve,E),I=new W(B.substring(0,this.ecparams.keycharlen),16);return this.verifyRaw(I,M,R,w)}catch(P){return!1}},this.verify=function(B,O,E){var M,R;if(Bitcoin.Util.isArray(O)){var q=this.parseSig(O);M=q.r,R=q.s}else if(typeof O==="object"&&O.r&&O.s)M=O.r,R=O.s;else throw"Invalid value for signature";var w;if(E instanceof Q9)w=E;else if(Bitcoin.Util.isArray(E))w=Z.decodeFrom(this.ecparams.curve,E);else throw"Invalid format for pubkey value, must be byte array or ECPointFp";var I=W.fromByteArrayUnsigned(B);return this.verifyRaw(I,M,R,w)},this.verifyRaw=function(B,O,E,M){var R=this.ecparams.n,q=this.ecparams.G;if(O.compareTo(W.ONE)<0||O.compareTo(R)>=0)return!1;if(E.compareTo(W.ONE)<0||E.compareTo(R)>=0)return!1;var w=E.modInverse(R),I=B.multiply(w).mod(R),P=O.multiply(w).mod(R),_=q.multiply(I).add(M.multiply(P)),C=_.getX().toBigInteger().mod(R);return C.equals(O)},this.serializeSig=function(B,O){var E=B.toByteArraySigned(),M=O.toByteArraySigned(),R=[];return R.push(2),R.push(E.length),R=R.concat(E),R.push(2),R.push(M.length),R=R.concat(M),R.unshift(R.length),R.unshift(48),R},this.parseSig=function(B){var O;if(B[0]!=48)throw Error("Signature not a valid DERSequence");if(O=2,B[O]!=2)throw Error("First element in signature must be a DERInteger");var E=B.slice(O+2,O+2+B[O+1]);if(O+=2+B[O+1],B[O]!=2)throw Error("Second element in signature must be a DERInteger");var M=B.slice(O+2,O+2+B[O+1]);O+=2+B[O+1];var R=W.fromByteArrayUnsigned(E),q=W.fromByteArrayUnsigned(M);return{r:R,s:q}},this.parseSigCompact=function(B){if(B.length!==65)throw"Signature has the wrong length";var O=B[0]-27;if(O<0||O>7)throw"Invalid signature type";var E=this.ecparams.n,M=W.fromByteArrayUnsigned(B.slice(1,33)).mod(E),R=W.fromByteArrayUnsigned(B.slice(33,65)).mod(E);return{r:M,s:R,i:O}},this.readPKCS5PrvKeyHex=function(B){if(F(B)===!1)throw Error("not ASN.1 hex string");var O,E,M;try{O=A(B,0,["[0]",0],"06"),E=A(B,0,[1],"04");try{M=A(B,0,["[1]",0],"03")}catch(R){}}catch(R){throw Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=z(O),this.curveName===void 0)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(M),this.setPrivateKeyHex(E),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(B){if(F(B)===!1)throw new Q("not ASN.1 hex string");var O,E,M,R;try{O=A(B,0,[1,0],"06"),E=A(B,0,[1,1],"06"),M=A(B,0,[2,0,1],"04");try{R=A(B,0,[2,0,"[1]",0],"03")}catch(q){}}catch(q){throw new Q("malformed PKCS#8 plain ECC private key")}if(this.curveName=z(E),this.curveName===void 0)throw new Q("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(R),this.setPrivateKeyHex(M),this.isPublic=!1},this.readPKCS8PubKeyHex=function(B){if(F(B)===!1)throw new Q("not ASN.1 hex string");var O,E,M;try{O=A(B,0,[0,0],"06"),E=A(B,0,[0,1],"06"),M=A(B,0,[1],"03")}catch(R){throw new Q("malformed PKCS#8 ECC public key")}if(this.curveName=z(E),this.curveName===null)throw new Q("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(M)},this.readCertPubKeyHex=function(B,O){if(F(B)===!1)throw new Q("not ASN.1 hex string");var E,M;try{E=A(B,0,[0,5,0,1],"06"),M=A(B,0,[0,5,1],"03")}catch(R){throw new Q("malformed X.509 certificate ECC public key")}if(this.curveName=z(E),this.curveName===null)throw new Q("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(M)},$!==void 0){if($.curve!==void 0)this.curveName=$.curve}if(this.curveName===void 0)this.curveName=Y;if(this.setNamedCurve(this.curveName),$!==void 0){if($.prv!==void 0)this.setPrivateKeyHex($.prv);if($.pub!==void 0)this.setPublicKeyHex($.pub)}};l.crypto.ECDSA.parseSigHex=function($){var Y=l.crypto.ECDSA.parseSigHexInHexRS($),X=new S0(Y.r,16),G=new S0(Y.s,16);return{r:X,s:G}};l.crypto.ECDSA.parseSigHexInHexRS=function($){var Y=M1,X=Y.getChildIdx,G=Y.getV;if(Y.checkStrictDER($,0),$.substr(0,2)!="30")throw Error("signature is not a ASN.1 sequence");var J=X($,0);if(J.length!=2)throw Error("signature shall have two elements");var Q=J[0],W=J[1];if($.substr(Q,2)!="02")throw Error("1st item not ASN.1 integer");if($.substr(W,2)!="02")throw Error("2nd item not ASN.1 integer");var Z=G($,Q),K=G($,W);return{r:Z,s:K}};l.crypto.ECDSA.asn1SigToConcatSig=function($){var Y=l.crypto.ECDSA.parseSigHexInHexRS($),X=Y.r,G=Y.s;if(X.length>=130&&X.length<=134){if(X.length%2!=0)throw Error("unknown ECDSA sig r length error");if(G.length%2!=0)throw Error("unknown ECDSA sig s length error");if(X.substr(0,2)=="00")X=X.substr(2);if(G.substr(0,2)=="00")G=G.substr(2);var J=Math.max(X.length,G.length);return X=("000000"+X).slice(-J),G=("000000"+G).slice(-J),X+G}if(X.substr(0,2)=="00"&&X.length%32==2)X=X.substr(2);if(G.substr(0,2)=="00"&&G.length%32==2)G=G.substr(2);if(X.length%32==30)X="00"+X;if(G.length%32==30)G="00"+G;if(X.length%32!=0)throw Error("unknown ECDSA sig r length error");if(G.length%32!=0)throw Error("unknown ECDSA sig s length error");return X+G};l.crypto.ECDSA.concatSigToASN1Sig=function($){if($.length%4!=0)throw Error("unknown ECDSA concatinated r-s sig length error");var Y=$.substr(0,$.length/2),X=$.substr($.length/2);return l.crypto.ECDSA.hexRSSigToASN1Sig(Y,X)};l.crypto.ECDSA.hexRSSigToASN1Sig=function($,Y){var X=new S0($,16),G=new S0(Y,16);return l.crypto.ECDSA.biRSSigToASN1Sig(X,G)};l.crypto.ECDSA.biRSSigToASN1Sig=function($,Y){var X=l.asn1,G=new X.DERInteger({bigint:$}),J=new X.DERInteger({bigint:Y}),Q=new X.DERSequence({array:[G,J]});return Q.tohex()};l.crypto.ECDSA.getName=function($){if($==="2b8104001f")return"secp192k1";if($==="2a8648ce3d030107")return"secp256r1";if($==="2b8104000a")return"secp256k1";if($==="2b81040021")return"secp224r1";if($==="2b81040022")return"secp384r1";if($==="2b81040023")return"secp521r1";if("|secp256r1|NIST P-256|P-256|prime256v1|".indexOf($)!==-1)return"secp256r1";if("|secp256k1|".indexOf($)!==-1)return"secp256k1";if("|secp224r1|NIST P-224|P-224|".indexOf($)!==-1)return"secp224r1";if("|secp384r1|NIST P-384|P-384|".indexOf($)!==-1)return"secp384r1";if("|secp521r1|NIST P-521|P-521|".indexOf($)!==-1)return"secp521r1";return null};if(typeof l>"u"||!l)l={};if(typeof l.crypto>"u"||!l.crypto)l.crypto={};l.crypto.ECParameterDB=new function(){var $={},Y={};function X(G){return new S0(G,16)}this.getByName=function(G){var J=G;if(typeof Y[J]<"u")J=Y[G];if(typeof $[J]<"u")return $[J];throw"unregistered EC curve name: "+J},this.regist=function(G,J,Q,W,Z,K,H,z,V,A,F,N){$[G]={};var D=X(Q),L=X(W),B=X(Z),O=X(K),E=X(H),M=new RA(D,L,B),R=M.decodePointHex("04"+z+V);$[G].name=G,$[G].keylen=J,$[G].keycharlen=Math.ceil(J/8)*2,$[G].curve=M,$[G].G=R,$[G].n=O,$[G].h=E,$[G].oid=F,$[G].info=N;for(var q=0;q<A.length;q++)Y[A[q]]=G}};l.crypto.ECParameterDB.regist("secp128r1",128,"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC","E87579C11079F43DD824993C2CEE5ED3","FFFFFFFE0000000075A30D1B9038A115","1","161FF7528B899B2D0C28607CA52C5B86","CF5AC8395BAFEB13C02DA292DDED7A83",[],"","secp128r1 : SECG curve over a 128 bit prime field");l.crypto.ECParameterDB.regist("secp160k1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73","0","7","0100000000000000000001B8FA16DFAB9ACA16B6B3","1","3B4C382CE37AA192A4019E763036F4F5DD4D7EBB","938CF935318FDCED6BC28286531733C3F03C4FEE",[],"","secp160k1 : SECG curve over a 160 bit prime field");l.crypto.ECParameterDB.regist("secp160r1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC","1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45","0100000000000000000001F4C8F927AED3CA752257","1","4A96B5688EF573284664698968C38BB913CBFC82","23A628553168947D59DCC912042351377AC5FB32",[],"","secp160r1 : SECG curve over a 160 bit prime field");l.crypto.ECParameterDB.regist("secp192k1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37","0","3","FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D","1","DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D","9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",[]);l.crypto.ECParameterDB.regist("secp192r1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC","64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1","FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831","1","188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012","07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",[]);l.crypto.ECParameterDB.regist("secp224r1",224,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE","B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4","FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D","1","B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21","BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",[]);l.crypto.ECParameterDB.regist("secp256k1",256,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","0","7","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","1","79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",[]);l.crypto.ECParameterDB.regist("secp256r1",256,"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC","5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B","FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551","1","6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296","4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",["NIST P-256","P-256","prime256v1"]);l.crypto.ECParameterDB.regist("secp384r1",384,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC","B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973","1","AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7","3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f",["NIST P-384","P-384"]);l.crypto.ECParameterDB.regist("secp521r1",521,"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC","051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409","1","00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650",["NIST P-521","P-521"]);if(typeof l>"u"||!l)l={};if(typeof l.crypto>"u"||!l.crypto)l.crypto={};l.crypto.DSA=function(){var $=M1,Y=$.getVbyList,X=$.getVbyListEx,G=$.isASN1HEX,J=S0,Q=S0.ONE,W=function(Z,K,H,z){if(Z==null||K==null||H==null||z==null)throw Error("invalid DSA public key");if(Q.compareTo(K)>=0||K.compareTo(Z)>=0)throw Error("invalid DSA public key");if(Q.compareTo(H)>=0||H.compareTo(Z)>=0)throw Error("invalid DSA public key");if(Q.compareTo(z)>=0||z.compareTo(Z)>=0)throw Error("invalid DSA public key");if(H.modPow(K,Z).compareTo(Q)!=0)throw Error("invalid DSA public key")};this.p=null,this.q=null,this.g=null,this.y=null,this.x=null,this.type="DSA",this.isPrivate=!1,this.isPublic=!1,this.setPrivate=function(Z,K,H,z,V){this.isPrivate=!0,this.p=Z,this.q=K,this.g=H,this.y=z,this.x=V},this.setPrivateHex=function(Z,K,H,z,V){var A,F,N,D,L;if(A=new S0(Z,16),F=new S0(K,16),N=new S0(H,16),typeof z==="string"&&z.length>1)D=new S0(z,16);else D=null;L=new S0(V,16),this.setPrivate(A,F,N,D,L)},this.setPublic=function(Z,K,H,z){W(Z,K,H,z),this.isPublic=!0,this.p=Z,this.q=K,this.g=H,this.y=z,this.x=null},this.setPublicHex=function(Z,K,H,z){var V,A,F,N;V=new S0(Z,16),A=new S0(K,16),F=new S0(H,16),N=new S0(z,16),this.setPublic(V,A,F,N)},this.signWithMessageHash=function(Z){var K=this.p,H=this.q,z=this.g,V=this.y,A=this.x,F=Z.substr(0,H.bitLength()/4),N=new S0(F,16),D,L,B;do D=l.crypto.Util.getRandomBigIntegerMinToMax(S0.ONE.add(S0.ONE),H.subtract(S0.ONE)),L=z.modPow(D,K).mod(H),B=D.modInverse(H).multiply(N.add(A.multiply(L))).mod(H);while(L.compareTo(S0.ZERO)==0||B.compareTo(S0.ZERO)==0);var O=l.asn1.ASN1Util.jsonToASN1HEX({seq:[{int:{bigint:L}},{int:{bigint:B}}]});return O},this.verifyWithMessageHash=function(Z,K){var H=this.p,z=this.q,V=this.g,A=this.y,F=this.parseASN1Signature(K),N=F[0],D=F[1],L=Z.substr(0,z.bitLength()/4),B=new S0(L,16);if(S0.ZERO.compareTo(N)>=0||N.compareTo(z)>=0)throw"invalid DSA signature";if(S0.ZERO.compareTo(D)>=0||D.compareTo(z)>=0)throw"invalid DSA signature";var O=D.modInverse(z),E=B.multiply(O).mod(z),M=N.multiply(O).mod(z),R=V.modPow(E,H).multiply(A.modPow(M,H)).mod(H).mod(z);return R.compareTo(N)==0},this.parseASN1Signature=function(Z){try{var K=new J(X(Z,0,[0],"02"),16),H=new J(X(Z,0,[1],"02"),16);return[K,H]}catch(z){throw Error("malformed ASN.1 DSA signature")}},this.readPKCS5PrvKeyHex=function(Z){var K,H,z,V,A;if(G(Z)===!1)throw Error("not ASN.1 hex string");try{K=X(Z,0,[1],"02"),H=X(Z,0,[2],"02"),z=X(Z,0,[3],"02"),V=X(Z,0,[4],"02"),A=X(Z,0,[5],"02")}catch(F){throw Error("malformed PKCS#1/5 plain DSA private key")}this.setPrivateHex(K,H,z,V,A)},this.readPKCS8PrvKeyHex=function(Z){var K,H,z,V;if(G(Z)===!1)throw Error("not ASN.1 hex string");try{K=X(Z,0,[1,1,0],"02"),H=X(Z,0,[1,1,1],"02"),z=X(Z,0,[1,1,2],"02"),V=X(Z,0,[2,0],"02")}catch(A){throw Error("malformed PKCS#8 plain DSA private key")}this.setPrivateHex(K,H,z,null,V)},this.readPKCS8PubKeyHex=function(Z){var K,H,z,V;if(G(Z)===!1)throw Error("not ASN.1 hex string");try{K=X(Z,0,[0,1,0],"02"),H=X(Z,0,[0,1,1],"02"),z=X(Z,0,[0,1,2],"02"),V=X(Z,0,[1,0],"02")}catch(A){throw Error("malformed PKCS#8 DSA public key")}this.setPublicHex(K,H,z,V)},this.readCertPubKeyHex=function(Z,K){var H,z,V,A;if(G(Z)===!1)throw Error("not ASN.1 hex string");try{H=X(Z,0,[0,5,0,1,0],"02"),z=X(Z,0,[0,5,0,1,1],"02"),V=X(Z,0,[0,5,0,1,2],"02"),A=X(Z,0,[0,5,1,0],"02")}catch(F){throw Error("malformed X.509 certificate DSA public key")}this.setPublicHex(H,z,V,A)}};var K8=function(){var $=function(D,L,B){return G(y1.AES,D,L,B)},Y=function(D,L,B){return G(y1.TripleDES,D,L,B)},X=function(D,L,B){return G(y1.DES,D,L,B)},G=function(D,L,B,O){var E=y1.enc.Hex.parse(L),M=y1.enc.Hex.parse(B),R=y1.enc.Hex.parse(O),q={};q.key=M,q.iv=R,q.ciphertext=E;var w=D.decrypt(q,M,{iv:R});return y1.enc.Hex.stringify(w)},J=function(D,L,B){return Z(y1.AES,D,L,B)},Q=function(D,L,B){return Z(y1.TripleDES,D,L,B)},W=function(D,L,B){return Z(y1.DES,D,L,B)},Z=function(D,L,B,O){var E=y1.enc.Hex.parse(L),M=y1.enc.Hex.parse(B),R=y1.enc.Hex.parse(O),q=D.encrypt(E,M,{iv:R}),w=y1.enc.Hex.parse(q.toString()),I=y1.enc.Base64.stringify(w);return I},K={"AES-256-CBC":{proc:$,eproc:J,keylen:32,ivlen:16},"AES-192-CBC":{proc:$,eproc:J,keylen:24,ivlen:16},"AES-128-CBC":{proc:$,eproc:J,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:Y,eproc:Q,keylen:24,ivlen:8},"DES-CBC":{proc:X,eproc:W,keylen:8,ivlen:8}},H=function(D){return K[D].proc},z=function(D){var L=y1.lib.WordArray.random(D),B=y1.enc.Hex.stringify(L);return B},V=function(D){var L={},B=D.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));if(B)L.cipher=B[1],L.ivsalt=B[2];var O=D.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));if(O)L.type=O[1];var E=-1,M=0;if(D.indexOf(`\r
\r
`)!=-1)E=D.indexOf(`\r
\r
`),M=2;if(D.indexOf(`

`)!=-1)E=D.indexOf(`

`),M=1;var R=D.indexOf("-----END");if(E!=-1&&R!=-1){var q=D.substring(E+M*2,R-M);q=q.replace(/\s+/g,""),L.data=q}return L},A=function(D,L,B){var O=B.substring(0,16),E=y1.enc.Hex.parse(O),M=y1.enc.Utf8.parse(L),R=K[D].keylen+K[D].ivlen,q="",w=null;for(;;){var I=y1.algo.MD5.create();if(w!=null)I.update(w);if(I.update(M),I.update(E),w=I.finalize(),q=q+y1.enc.Hex.stringify(w),q.length>=R*2)break}var P={};return P.keyhex=q.substr(0,K[D].keylen*2),P.ivhex=q.substr(K[D].keylen*2,K[D].ivlen*2),P},F=function(D,L,B,O){var E=y1.enc.Base64.parse(D),M=y1.enc.Hex.stringify(E),R=K[L].proc,q=R(M,B,O);return q},N=function(D,L,B,O){var E=K[L].eproc,M=E(D,B,O);return M};return{version:"1.0.0",parsePKCS5PEM:function(D){return V(D)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(D,L,B){return A(D,L,B)},decryptKeyB64:function(D,L,B,O){return F(D,L,B,O)},getDecryptedKeyHex:function(D,L){var B=V(D),O=B.type,E=B.cipher,M=B.ivsalt,R=B.data,q=A(E,L,M),w=q.keyhex,I=F(R,E,w,M);return I},getEncryptedPKCS5PEMFromPrvKeyHex:function(D,L,B,O,E){var _="";if(typeof O>"u"||O==null)O="AES-256-CBC";if(typeof K[O]>"u")throw Error("KEYUTIL unsupported algorithm: "+O);if(typeof E>"u"||E==null){var M=K[O].ivlen,R=z(M);E=R.toUpperCase()}var q=A(O,B,E),w=q.keyhex,I=N(L,O,w,E),P=I.replace(/(.{64})/g,`$1\r
`),_="-----BEGIN "+D+` PRIVATE KEY-----\r
`;return _+=`Proc-Type: 4,ENCRYPTED\r
`,_+="DEK-Info: "+O+","+E+`\r
`,_+=`\r
`,_+=P,_+=`\r
-----END `+D+` PRIVATE KEY-----\r
`,_},getEncryptedPKCS8PEM:function(D,L,B){var O=this.getEncryptedPKCS8Hex(D,L,B);return RG(O,"ENCRYPTED PRIVATE KEY")},getEncryptedPKCS8Hex:function(D,L,B){var O;if(B==null||B==null)O={};else O=JSON.parse(JSON.stringify(B));O.plain=D,this.initPBES2Param(O),this.encryptPBES2Param(O,L);var E=this.generatePBES2ASN1Param(O);return l.asn1.ASN1Util.newObject(E).tohex()},initPBES2Param:function(D){if(q5(D,"encalg")==null)D.encalg="aes256-CBC";if(q5(D,"iter")==null)D.iter=2048;if(q5(D,"prf")==null)D.prf="hmacWithSHA256";if(q5(D,"salt")==null)D.salt=y1.enc.Hex.stringify(y1.lib.WordArray.random(8));if(q5(D,"enciv")==null){var L;if(D.encalg=="des-EDE3-CBC")L=8;if(D.encalg=="aes128-CBC")L=16;if(D.encalg=="aes256-CBC")L=16;D.enciv=y1.enc.Hex.stringify(y1.lib.WordArray.random(L))}},encryptPBES2Param:function(D,L){var B=K8.getDKFromPBES2Param(D,L);try{var O=l.crypto.Cipher.encrypt(D.plain,B,D.encalg,{iv:D.enciv})}catch(E){throw Error("encrypt error: "+D.plain+" "+B+" "+D.encalg+" "+D.enciv)}D.enc=O},generatePBES2ASN1Param:function(D){var L={seq:[{seq:[{oid:"pkcs5PBES2"},{seq:[{seq:[{oid:"pkcs5PBKDF2"},{seq:[{octstr:{hex:D.salt}},{int:{hex:do4(D.iter)}}]}]},{seq:[{oid:D.encalg},{octstr:{hex:D.enciv}}]}]}]},{octstr:{hex:D.enc}}]};if(D.prf!="hmacWithSHA1")L.seq[0].seq[1].seq[0].seq[1].seq.push({seq:[{oid:D.prf},{null:""}]});return L},parseHexOfEncryptedPKCS8:function(D){var L=M1,B=L.getChildIdx,O=L.getV,E={},M=B(D,0);if(M.length!=2)throw Error("malformed format: SEQUENCE(0).items != 2: "+M.length);E.ciphertext=O(D,M[1]);var R=B(D,M[0]);if(R.length!=2)throw Error("malformed format: SEQUENCE(0.0).items != 2: "+R.length);if(O(D,R[0])!="2a864886f70d01050d")throw Error("this only supports pkcs5PBES2");var q=B(D,R[1]);if(R.length!=2)throw Error("malformed format: SEQUENCE(0.0.1).items != 2: "+q.length);var w=B(D,q[1]);if(w.length!=2)throw Error("malformed format: SEQUENCE(0.0.1.1).items != 2: "+w.length);if(O(D,w[0])!="2a864886f70d0307")throw"this only supports TripleDES";E.encryptionSchemeAlg="TripleDES",E.encryptionSchemeIV=O(D,w[1]);var I=B(D,q[0]);if(I.length!=2)throw Error("malformed format: SEQUENCE(0.0.1.0).items != 2: "+I.length);if(O(D,I[0])!="2a864886f70d01050c")throw Error("this only supports pkcs5PBKDF2");var P=B(D,I[1]);if(P.length<2)throw Error("malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+P.length);E.pbkdf2Salt=O(D,P[0]);var _=O(D,P[1]);try{E.pbkdf2Iter=parseInt(_,16)}catch(C){throw Error("malformed format pbkdf2Iter: "+_)}return E},getPBKDF2KeyHexFromParam:function(D,L){var B=y1.enc.Hex.parse(D.pbkdf2Salt),O=D.pbkdf2Iter,E=y1.PBKDF2(L,B,{keySize:6,iterations:O}),M=y1.enc.Hex.stringify(E);return M},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(D,L){var B=B$(D,"ENCRYPTED PRIVATE KEY"),O=this.parseHexOfEncryptedPKCS8(B),E=K8.getPBKDF2KeyHexFromParam(O,L),M={};M.ciphertext=y1.enc.Hex.parse(O.ciphertext);var R=y1.enc.Hex.parse(E),q=y1.enc.Hex.parse(O.encryptionSchemeIV),w=y1.TripleDES.decrypt(M,R,{iv:q}),I=y1.enc.Hex.stringify(w);return I},parsePBES2:function(D){var L=M1.parse(D);if(q5(L,"seq.0.seq.0.oid")!="pkcs5PBES2"||q5(L,"seq.0.seq.1.seq.0.seq.0.oid")!="pkcs5PBKDF2")throw Error("not pkcs5PBES2 and pkcs5PBKDF2 used");var B=q5(L,"seq.0.seq.1.seq.0.seq.1.seq");if(B==null)throw Error("PBKDF2 parameter not found");var O=q5(B,"0.octstr.hex"),E=q5(B,"1.int.hex"),M=q5(B,"2.seq.0.oid","hmacWithSHA1"),R=-1;try{R=parseInt(E,16)}catch(_){throw Error("iter not proper value")}var q=q5(L,"seq.0.seq.1.seq.1.seq.0.oid"),w=q5(L,"seq.0.seq.1.seq.1.seq.1.octstr.hex"),I=q5(L,"seq.1.octstr.hex");if(q==null||w==null||I==null)throw Error("encalg, enciv or enc is undefined");var P={salt:O,iter:R,prf:M,encalg:q,enciv:w,enc:I};return P},getDKFromPBES2Param:function(D,L){var B={hmacWithSHA1:y1.algo.SHA1,hmacWithSHA224:y1.algo.SHA224,hmacWithSHA256:y1.algo.SHA256,hmacWithSHA384:y1.algo.SHA384,hmacWithSHA512:y1.algo.SHA512},O={"des-EDE3-CBC":6,"aes128-CBC":4,"aes256-CBC":8},E=B[D.prf];if(E==null)throw Error("unsupported prf");var M=O[D.encalg];if(M==null)throw Error("unsupported encalg");var R=y1.enc.Hex.parse(D.salt),q=D.iter;try{var w=y1.PBKDF2(L,R,{keySize:M,iterations:q,hasher:E});return y1.enc.Hex.stringify(w)}catch(I){throw Error("PBKDF2 error: "+I+" "+JSON.stringify(D)+" "+L)}},getPlainHexFromEncryptedPKCS8PEM:function(D,L){if(D.indexOf("BEGIN ENCRYPTED PRIVATE KEY")==-1)throw Error("not Encrypted PKCS#8 PEM string");var B=B$(D),O;try{O=K8.parsePBES2(B)}catch(M){throw Error("malformed PBES2 format: "+M.message)}var E=K8.getDKFromPBES2Param(O,L);return l.crypto.Cipher.decrypt(O.enc,E,O.encalg,{iv:O.enciv})},getKeyFromEncryptedPKCS8PEM:function(D,L){var B=this.getPlainHexFromEncryptedPKCS8PEM(D,L),O=this.getKeyFromPlainPrivatePKCS8Hex(B);return O},parsePlainPrivatePKCS8Hex:function(D){var L=M1,B=L.getChildIdx,O=L.getV,E={};if(E.algparam=null,D.substr(0,2)!="30")throw Error("malformed plain PKCS8 private key(code:001)");var M=B(D,0);if(M.length<3)throw Error("malformed plain PKCS8 private key(code:002)");if(D.substr(M[1],2)!="30")throw Error("malformed PKCS8 private key(code:003)");var R=B(D,M[1]);if(R.length!=2)throw Error("malformed PKCS8 private key(code:004)");if(D.substr(R[0],2)!="06")throw Error("malformed PKCS8 private key(code:005)");if(E.algoid=O(D,R[0]),D.substr(R[1],2)=="06")E.algparam=O(D,R[1]);if(D.substr(M[2],2)!="04")throw Error("malformed PKCS8 private key(code:006)");return E.keyidx=L.getVidx(D,M[2]),E},getKeyFromPlainPrivatePKCS8PEM:function(D){var L=B$(D,"PRIVATE KEY"),B=this.getKeyFromPlainPrivatePKCS8Hex(L);return B},getKeyFromPlainPrivatePKCS8Hex:function(D){var L=this.parsePlainPrivatePKCS8Hex(D),B;if(L.algoid=="2a864886f70d010101")B=new D6;else if(L.algoid=="2a8648ce380401")B=new l.crypto.DSA;else if(L.algoid=="2a8648ce3d0201")B=new l.crypto.ECDSA;else throw Error("unsupported private key algorithm");return B.readPKCS8PrvKeyHex(D),B},_getKeyFromPublicPKCS8Hex:function(D){var L,B=M1.getVbyList(D,0,[0,0],"06");if(B==="2a864886f70d010101")L=new D6;else if(B==="2a8648ce380401")L=new l.crypto.DSA;else if(B==="2a8648ce3d0201")L=new l.crypto.ECDSA;else throw Error("unsupported PKCS#8 public key hex");return L.readPKCS8PubKeyHex(D),L},parsePublicRawRSAKeyHex:function(D){var L=M1,B=L.getChildIdx,O=L.getV,E={};if(D.substr(0,2)!="30")throw Error("malformed RSA key(code:001)");var M=B(D,0);if(M.length!=2)throw Error("malformed RSA key(code:002)");if(D.substr(M[0],2)!="02")throw Error("malformed RSA key(code:003)");if(E.n=O(D,M[0]),D.substr(M[1],2)!="02")throw Error("malformed RSA key(code:004)");return E.e=O(D,M[1]),E},parsePublicPKCS8Hex:function(D){var L=M1,B=L.getChildIdx,O=L.getV,E={};E.algparam=null;var M=B(D,0);if(M.length!=2)throw Error("outer DERSequence shall have 2 elements: "+M.length);var R=M[0];if(D.substr(R,2)!="30")throw Error("malformed PKCS8 public key(code:001)");var q=B(D,R);if(q.length!=2)throw Error("malformed PKCS8 public key(code:002)");if(D.substr(q[0],2)!="06")throw Error("malformed PKCS8 public key(code:003)");if(E.algoid=O(D,q[0]),D.substr(q[1],2)=="06")E.algparam=O(D,q[1]);else if(D.substr(q[1],2)=="30")E.algparam={},E.algparam.p=L.getVbyList(D,q[1],[0],"02"),E.algparam.q=L.getVbyList(D,q[1],[1],"02"),E.algparam.g=L.getVbyList(D,q[1],[2],"02");if(D.substr(M[1],2)!="03")throw Error("malformed PKCS8 public key(code:004)");return E.key=O(D,M[1]).substr(2),E}}}();K8.getKey=function($,Y,X){var G=M1,J=G.getChildIdx,Q=G.getV,W=G.getVbyList,Z=l.crypto,K=Z.ECDSA,H=Z.DSA,z=D6,V=B$,A=K8;if(typeof z<"u"&&$ instanceof z)return $;if(typeof K<"u"&&$ instanceof K)return $;if(typeof H<"u"&&$ instanceof H)return $;if($.curve!==void 0&&$.xy!==void 0&&$.d===void 0)return new K({pub:$.xy,curve:$.curve});if($.curve!==void 0&&$.d!==void 0)return new K({prv:$.d,curve:$.curve});if($.kty===void 0&&$.n!==void 0&&$.e!==void 0&&$.d===void 0){var F=new z;return F.setPublic($.n,$.e),F}if($.kty===void 0&&$.n!==void 0&&$.e!==void 0&&$.d!==void 0&&$.p!==void 0&&$.q!==void 0&&$.dp!==void 0&&$.dq!==void 0&&$.co!==void 0&&$.qi===void 0){var F=new z;return F.setPrivateEx($.n,$.e,$.d,$.p,$.q,$.dp,$.dq,$.co),F}if($.kty===void 0&&$.n!==void 0&&$.e!==void 0&&$.d!==void 0&&$.p===void 0){var F=new z;return F.setPrivate($.n,$.e,$.d),F}if($.p!==void 0&&$.q!==void 0&&$.g!==void 0&&$.y!==void 0&&$.x===void 0){var F=new H;return F.setPublic($.p,$.q,$.g,$.y),F}if($.p!==void 0&&$.q!==void 0&&$.g!==void 0&&$.y!==void 0&&$.x!==void 0){var F=new H;return F.setPrivate($.p,$.q,$.g,$.y,$.x),F}if($.kty==="RSA"&&$.n!==void 0&&$.e!==void 0&&$.d===void 0){var F=new z;return F.setPublic(Z7($.n),Z7($.e)),F}if($.kty==="RSA"&&$.n!==void 0&&$.e!==void 0&&$.d!==void 0&&$.p!==void 0&&$.q!==void 0&&$.dp!==void 0&&$.dq!==void 0&&$.qi!==void 0){var F=new z;return F.setPrivateEx(Z7($.n),Z7($.e),Z7($.d),Z7($.p),Z7($.q),Z7($.dp),Z7($.dq),Z7($.qi)),F}if($.kty==="RSA"&&$.n!==void 0&&$.e!==void 0&&$.d!==void 0){var F=new z;return F.setPrivate(Z7($.n),Z7($.e),Z7($.d)),F}if($.kty==="EC"&&$.crv!==void 0&&$.x!==void 0&&$.y!==void 0&&$.d===void 0){var N=new K({curve:$.crv}),D=N.ecparams.keycharlen,L=("0000000000"+Z7($.x)).slice(-D),B=("0000000000"+Z7($.y)).slice(-D),O="04"+L+B;return N.setPublicKeyHex(O),N}if($.kty==="EC"&&$.crv!==void 0&&$.x!==void 0&&$.y!==void 0&&$.d!==void 0){var N=new K({curve:$.crv}),D=N.ecparams.keycharlen,L=("0000000000"+Z7($.x)).slice(-D),B=("0000000000"+Z7($.y)).slice(-D),O="04"+L+B,E=("0000000000"+Z7($.d)).slice(-D);return N.setPublicKeyHex(O),N.setPrivateKeyHex(E),N}if(X==="pkcs5prv"){var M=$,G=M1,R,F;if(R=J(M,0),R.length===9)F=new z,F.readPKCS5PrvKeyHex(M);else if(R.length===6)F=new H,F.readPKCS5PrvKeyHex(M);else if(R.length>2&&M.substr(R[1],2)==="04")F=new K,F.readPKCS5PrvKeyHex(M);else throw Error("unsupported PKCS#1/5 hexadecimal key");return F}if(X==="pkcs8prv"){var F=A.getKeyFromPlainPrivatePKCS8Hex($);return F}if(X==="pkcs8pub")return A._getKeyFromPublicPKCS8Hex($);if(X==="x509pub")return e4.getPublicKeyFromCertHex($);if($.indexOf("-END CERTIFICATE-",0)!=-1||$.indexOf("-END X509 CERTIFICATE-",0)!=-1||$.indexOf("-END TRUSTED CERTIFICATE-",0)!=-1)return e4.getPublicKeyFromCertPEM($);if($.indexOf("-END PUBLIC KEY-")!=-1){var q=B$($,"PUBLIC KEY");return A._getKeyFromPublicPKCS8Hex(q)}if($.indexOf("-END RSA PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")==-1){var w=V($,"RSA PRIVATE KEY");return A.getKey(w,null,"pkcs5prv")}if($.indexOf("-END DSA PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")==-1){var I=V($,"DSA PRIVATE KEY"),P=W(I,0,[1],"02"),_=W(I,0,[2],"02"),C=W(I,0,[3],"02"),k=W(I,0,[4],"02"),S=W(I,0,[5],"02"),F=new H;return F.setPrivate(new S0(P,16),new S0(_,16),new S0(C,16),new S0(k,16),new S0(S,16)),F}if($.indexOf("-END EC PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")==-1){var w=V($,"EC PRIVATE KEY");return A.getKey(w,null,"pkcs5prv")}if($.indexOf("-END PRIVATE KEY-")!=-1)return A.getKeyFromPlainPrivatePKCS8PEM($);if($.indexOf("-END RSA PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")!=-1){var T=A.getDecryptedKeyHex($,Y),v=new D6;return v.readPKCS5PrvKeyHex(T),v}if($.indexOf("-END EC PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")!=-1){var I=A.getDecryptedKeyHex($,Y),F=W(I,0,[1],"04"),x=W(I,0,[2,0],"06"),y=W(I,0,[3,0],"03").substr(2),d="";if(l.crypto.OID.oidhex2name[x]!==void 0)d=l.crypto.OID.oidhex2name[x];else throw Error("undefined OID(hex) in KJUR.crypto.OID: "+x);var N=new K({curve:d});return N.setPublicKeyHex(y),N.setPrivateKeyHex(F),N.isPublic=!1,N}if($.indexOf("-END DSA PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")!=-1){var I=A.getDecryptedKeyHex($,Y),P=W(I,0,[1],"02"),_=W(I,0,[2],"02"),C=W(I,0,[3],"02"),k=W(I,0,[4],"02"),S=W(I,0,[5],"02"),F=new H;return F.setPrivate(new S0(P,16),new S0(_,16),new S0(C,16),new S0(k,16),new S0(S,16)),F}if($.indexOf("-END ENCRYPTED PRIVATE KEY-")!=-1)return A.getKeyFromEncryptedPKCS8PEM($,Y);throw Error("not supported argument")};K8.generateKeypair=function($,Y){if($=="RSA"){var X=Y,G=new D6;G.generate(X,"10001"),G.isPrivate=!0,G.isPublic=!0;var J=new D6,Q=G.n.toString(16),W=G.e.toString(16);J.setPublic(Q,W),J.isPrivate=!1,J.isPublic=!0;var Z={};return Z.prvKeyObj=G,Z.pubKeyObj=J,Z}else if($=="EC"){var K=Y,H=new l.crypto.ECDSA({curve:K}),z=H.generateKeyPairHex(),G=new l.crypto.ECDSA({curve:K});G.setPublicKeyHex(z.ecpubhex),G.setPrivateKeyHex(z.ecprvhex),G.isPrivate=!0,G.isPublic=!1;var J=new l.crypto.ECDSA({curve:K});J.setPublicKeyHex(z.ecpubhex),J.isPrivate=!1,J.isPublic=!0;var Z={};return Z.prvKeyObj=G,Z.pubKeyObj=J,Z}else throw Error("unknown algorithm: "+$)};K8.getPEM=function($,Y,X,G,J,Q){var W=l,Z=W.asn1,K=Z.DERObjectIdentifier,H=Z.DERInteger,z=Z.ASN1Util.newObject,V=Z.x509,A=V.SubjectPublicKeyInfo,F=W.crypto,N=F.DSA,D=F.ECDSA,L=D6;function B(v){var x=z({seq:[{int:0},{int:{bigint:v.n}},{int:v.e},{int:{bigint:v.d}},{int:{bigint:v.p}},{int:{bigint:v.q}},{int:{bigint:v.dmp1}},{int:{bigint:v.dmq1}},{int:{bigint:v.coeff}}]});return x}function O(v){var x=z({seq:[{int:1},{octstr:{hex:v.prvKeyHex}},{tag:["a0",!0,{oid:{name:v.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+v.pubKeyHex}}]}]});return x}function E(v){var x=z({seq:[{int:0},{int:{bigint:v.p}},{int:{bigint:v.q}},{int:{bigint:v.g}},{int:{bigint:v.y}},{int:{bigint:v.x}}]});return x}if((L!==void 0&&$ instanceof L||N!==void 0&&$ instanceof N||D!==void 0&&$ instanceof D)&&$.isPublic==!0&&(Y===void 0||Y=="PKCS8PUB")){var M=new A($),R=M.tohex();return RG(R,"PUBLIC KEY")}if(Y=="PKCS1PRV"&&L!==void 0&&$ instanceof L&&(X===void 0||X==null)&&$.isPrivate==!0){var M=B($),R=M.tohex();return RG(R,"RSA PRIVATE KEY")}if(Y=="PKCS1PRV"&&D!==void 0&&$ instanceof D&&(X===void 0||X==null)&&$.isPrivate==!0){var q=new K({name:$.curveName}),w=q.tohex(),I=O($),P=I.tohex(),_="";return _+=RG(w,"EC PARAMETERS"),_+=RG(P,"EC PRIVATE KEY"),_}if(Y=="PKCS1PRV"&&N!==void 0&&$ instanceof N&&(X===void 0||X==null)&&$.isPrivate==!0){var M=E($),R=M.tohex();return RG(R,"DSA PRIVATE KEY")}if(Y=="PKCS5PRV"&&L!==void 0&&$ instanceof L&&(X!==void 0&&X!=null)&&$.isPrivate==!0){var M=B($),R=M.tohex();if(G===void 0)G="DES-EDE3-CBC";return this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",R,X,G,Q)}if(Y=="PKCS5PRV"&&D!==void 0&&$ instanceof D&&(X!==void 0&&X!=null)&&$.isPrivate==!0){var M=O($),R=M.tohex();if(G===void 0)G="DES-EDE3-CBC";return this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",R,X,G,Q)}if(Y=="PKCS5PRV"&&N!==void 0&&$ instanceof N&&(X!==void 0&&X!=null)&&$.isPrivate==!0){var M=E($),R=M.tohex();if(G===void 0)G="DES-EDE3-CBC";return this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",R,X,G,Q)}var C=function(v,x){if(typeof x=="string")return K8.getEncryptedPKCS8PEM(v,x);else if(typeof x=="object"&&q5(x,"passcode")!=null){var y=JSON.parse(JSON.stringify(x)),d=y.passcode;return delete y.passcode,K8.getEncryptedPKCS8PEM(v,d,y)}};if(Y=="PKCS8PRV"&&L!=null&&$ instanceof L&&$.isPrivate==!0){var k=B($),S=k.tohex(),M=z({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:S}}]}),R=M.tohex();if(X===void 0||X==null)return RG(R,"PRIVATE KEY");else return C(R,X)}if(Y=="PKCS8PRV"&&D!==void 0&&$ instanceof D&&$.isPrivate==!0){var T={seq:[{int:1},{octstr:{hex:$.prvKeyHex}}]};if(typeof $.pubKeyHex=="string")T.seq.push({tag:["a1",!0,{bitstr:{hex:"00"+$.pubKeyHex}}]});var k=new z(T),S=k.tohex(),M=z({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:$.curveName}}]},{octstr:{hex:S}}]}),R=M.tohex();if(X===void 0||X==null)return RG(R,"PRIVATE KEY");else return C(R,X)}if(Y=="PKCS8PRV"&&N!==void 0&&$ instanceof N&&$.isPrivate==!0){var k=new H({bigint:$.x}),S=k.tohex(),M=z({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:$.p}},{int:{bigint:$.q}},{int:{bigint:$.g}}]}]},{octstr:{hex:S}}]}),R=M.tohex();if(X===void 0||X==null)return RG(R,"PRIVATE KEY");else return C(R,X)}throw Error("unsupported object nor format")};K8.getKeyFromCSRPEM=function($){var Y=B$($,"CERTIFICATE REQUEST"),X=K8.getKeyFromCSRHex(Y);return X};K8.getKeyFromCSRHex=function($){var Y=K8.parseCSRHex($),X=K8.getKey(Y.p8pubkeyhex,null,"pkcs8pub");return X};K8.parseCSRHex=function($){var Y=M1,X=Y.getChildIdx,G=Y.getTLV,J={},Q=$;if(Q.substr(0,2)!="30")throw Error("malformed CSR(code:001)");var W=X(Q,0);if(W.length<1)throw Error("malformed CSR(code:002)");if(Q.substr(W[0],2)!="30")throw Error("malformed CSR(code:003)");var Z=X(Q,W[0]);if(Z.length<3)throw Error("malformed CSR(code:004)");return J.p8pubkeyhex=G(Q,Z[2]),J};K8.getKeyID=function($){var Y=K8,X=M1;if(typeof $==="string"&&$.indexOf("BEGIN ")!=-1)$=Y.getKey($);var G=B$(Y.getPEM($)),J=X.getIdxbyList(G,0,[1]),Q=X.getV(G,J).substring(2);return l.crypto.Util.hashHex(Q,"sha1")};K8.getJWK=function($,Y,X,G,J){var Q,W={},Z,K=l.crypto.Util.hashHex;if(typeof $=="string"){if(Q=K8.getKey($),$.indexOf("CERTIFICATE")!=-1)Z=B$($)}else if(typeof $=="object")if($ instanceof e4)Q=$.getPublicKey(),Z=$.hex;else Q=$;else throw Error("unsupported keyinfo type");if(Q instanceof D6&&Q.isPrivate)W.kty="RSA",W.n=jY(Q.n.toString(16)),W.e=jY(Q.e.toString(16)),W.d=jY(Q.d.toString(16)),W.p=jY(Q.p.toString(16)),W.q=jY(Q.q.toString(16)),W.dp=jY(Q.dmp1.toString(16)),W.dq=jY(Q.dmq1.toString(16)),W.qi=jY(Q.coeff.toString(16));else if(Q instanceof D6&&Q.isPublic)W.kty="RSA",W.n=jY(Q.n.toString(16)),W.e=jY(Q.e.toString(16));else if(Q instanceof l.crypto.ECDSA&&Q.isPrivate){var H=Q.getShortNISTPCurveName();if(H!=="P-256"&&H!=="P-384"&&H!=="P-521")throw Error("unsupported curve name for JWT: "+H);var z=Q.getPublicKeyXYHex();W.kty="EC",W.crv=H,W.x=jY(z.x),W.y=jY(z.y),W.d=jY(Q.prvKeyHex)}else if(Q instanceof l.crypto.ECDSA&&Q.isPublic){var H=Q.getShortNISTPCurveName();if(H!=="P-256"&&H!=="P-384"&&H!=="P-521")throw Error("unsupported curve name for JWT: "+H);var z=Q.getPublicKeyXYHex();W.kty="EC",W.crv=H,W.x=jY(z.x),W.y=jY(z.y)}if(W.kty==null)throw Error("unsupported keyinfo");if(!Q.isPrivate&&Y!=!0)W.kid=l.jws.JWS.getJWKthumbprint(W);if(Z!=null&&X!=!0)W.x5c=[lk(Z)];if(Z!=null&&G!=!0)W.x5t=Yr(lk(K(Z,"sha1")));if(Z!=null&&J!=!0)W["x5t#S256"]=Yr(lk(K(Z,"sha256")));return W};K8.getJWKFromKey=function($){return K8.getJWK($,!0,!0,!0,!0)};D6.getPosArrayOfChildrenFromHex=function($){return M1.getChildIdx($,0)};D6.getHexValueArrayOfChildrenFromHex=function($){var Y=M1,X=Y.getV,A=D6.getPosArrayOfChildrenFromHex($),G=X($,A[0]),J=X($,A[1]),Q=X($,A[2]),W=X($,A[3]),Z=X($,A[4]),K=X($,A[5]),H=X($,A[6]),z=X($,A[7]),V=X($,A[8]),A=[];return A.push(G,J,Q,W,Z,K,H,z,V),A};D6.prototype.readPrivateKeyFromPEMString=function($){var Y=B$($),X=D6.getHexValueArrayOfChildrenFromHex(Y);this.setPrivateEx(X[1],X[2],X[3],X[4],X[5],X[6],X[7],X[8])};D6.prototype.readPKCS5PrvKeyHex=function($){var Y=D6.getHexValueArrayOfChildrenFromHex($);this.setPrivateEx(Y[1],Y[2],Y[3],Y[4],Y[5],Y[6],Y[7],Y[8])};D6.prototype.readPKCS8PrvKeyHex=function($){var Y,X,G,J,Q,W,Z,K,H=M1,z=H.getVbyListEx;if(H.isASN1HEX($)===!1)throw Error("not ASN.1 hex string");try{Y=z($,0,[2,0,1],"02"),X=z($,0,[2,0,2],"02"),G=z($,0,[2,0,3],"02"),J=z($,0,[2,0,4],"02"),Q=z($,0,[2,0,5],"02"),W=z($,0,[2,0,6],"02"),Z=z($,0,[2,0,7],"02"),K=z($,0,[2,0,8],"02")}catch(V){throw Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(Y,X,G,J,Q,W,Z,K)};D6.prototype.readPKCS5PubKeyHex=function($){var Y=M1,X=Y.getV;if(Y.isASN1HEX($)===!1)throw Error("keyHex is not ASN.1 hex string");var G=Y.getChildIdx($,0);if(G.length!==2||$.substr(G[0],2)!=="02"||$.substr(G[1],2)!=="02")throw Error("wrong hex for PKCS#5 public key");var J=X($,G[0]),Q=X($,G[1]);this.setPublic(J,Q)};D6.prototype.readPKCS8PubKeyHex=function($){var Y=M1;if(Y.isASN1HEX($)===!1)throw Error("not ASN.1 hex string");if(Y.getTLVbyListEx($,0,[0,0])!=="06092a864886f70d010101")throw Error("not PKCS8 RSA public key");var X=Y.getTLVbyListEx($,0,[1,0]);this.readPKCS5PubKeyHex(X)};D6.prototype.readCertPubKeyHex=function($,Y){var X,G;X=new e4,X.readCertHex($),G=X.getPublicKeyHex(),this.readPKCS8PubKeyHex(G)};var Jz5=new RegExp("[^0-9a-f]","gi");function lG1($,Y){var X="",G=Y/4-$.length;for(var J=0;J<G;J++)X=X+"0";return X+$}D6.prototype.sign=function($,Y){var X=function(J){return l.crypto.Util.hashString(J,Y)},G=X($);return this.signWithMessageHash(G,Y)};D6.prototype.signWithMessageHash=function($,Y){var X=l.crypto.Util.getPaddedDigestInfoHex($,Y,this.n.bitLength()),G=dJ(X,16),J=this.doPrivate(G),Q=J.toString(16);return lG1(Q,this.n.bitLength())};function iG1($,Y,X){var G="",J=0;while(G.length<Y)G+=n3(X(nH($+String.fromCharCode.apply(String,[(J&4278190080)>>24,(J&16711680)>>16,(J&65280)>>8,J&255])))),J+=1;return G}D6.prototype.signPSS=function($,Y,X){var G=function(Q){return l.crypto.Util.hashHex(Q,Y)},J=G(nH($));if(X===void 0)X=-1;return this.signWithMessageHashPSS(J,Y,X)};D6.prototype.signWithMessageHashPSS=function($,Y,X){var G=n3($),J=G.length,Q=this.n.bitLength()-1,W=Math.ceil(Q/8),Z,K=function(L){return l.crypto.Util.hashHex(L,Y)};if(X===-1||X===void 0)X=J;else if(X===-2)X=W-J-2;else if(X<-2)throw Error("invalid salt length");if(W<J+X+2)throw Error("data too long");var H="";if(X>0)H=Array(X),new ak().nextBytes(H),H=String.fromCharCode.apply(String,H);var z=n3(K(nH("\x00\x00\x00\x00\x00\x00\x00\x00"+G+H))),V=[];for(Z=0;Z<W-X-J-2;Z+=1)V[Z]=0;var A=String.fromCharCode.apply(String,V)+"\x01"+H,F=iG1(z,A.length,K),N=[];for(Z=0;Z<A.length;Z+=1)N[Z]=A.charCodeAt(Z)^F.charCodeAt(Z);var D=65280>>8*W-Q&255;N[0]&=~D;for(Z=0;Z<J;Z++)N.push(z.charCodeAt(Z));return N.push(188),lG1(this.doPrivate(new S0(N)).toString(16),this.n.bitLength())};function nG1($){for(var Y in l.crypto.Util.DIGESTINFOHEAD){var X=l.crypto.Util.DIGESTINFOHEAD[Y],G=X.length;if($.substring(0,G)==X){var J=[Y,$.substring(G)];return J}}return[]}D6.prototype.verify=function($,Y){if(Y=Y.toLowerCase(),Y.match(/^[0-9a-f]+$/)==null)return!1;var X=dJ(Y,16),G=this.n.bitLength();if(X.bitLength()>G)return!1;var J=this.doPublic(X),Q=J.toString(16);if(Q.length+3!=G/4)return!1;var W=Q.replace(/^1f+00/,""),Z=nG1(W);if(Z.length==0)return!1;var K=Z[0],H=Z[1],z=function(A){return l.crypto.Util.hashString(A,K)},V=z($);return H==V};D6.prototype.verifyWithMessageHash=function($,Y){if(Y.length!=Math.ceil(this.n.bitLength()/4))return!1;var X=dJ(Y,16);if(X.bitLength()>this.n.bitLength())return 0;var G=this.doPublic(X),J=G.toString(16).replace(/^1f+00/,""),Q=nG1(J);if(Q.length==0)return!1;var W=Q[0],Z=Q[1];return Z==$};D6.prototype.verifyPSS=function($,Y,X,G){var J=function(W){return l.crypto.Util.hashHex(W,X)},Q=J(nH($));if(G===void 0)G=-1;return this.verifyWithMessageHashPSS(Q,Y,X,G)};D6.prototype.verifyWithMessageHashPSS=function($,Y,X,G){if(Y.length!=Math.ceil(this.n.bitLength()/4))return!1;var J=new S0(Y,16),Q=function(O){return l.crypto.Util.hashHex(O,X)},W=n3($),Z=W.length,K=this.n.bitLength()-1,H=Math.ceil(K/8),z;if(G===-1||G===void 0)G=Z;else if(G===-2)G=H-Z-2;else if(G<-2)throw Error("invalid salt length");if(H<Z+G+2)throw Error("data too long");var V=this.doPublic(J).toByteArray();for(z=0;z<V.length;z+=1)V[z]&=255;while(V.length<H)V.unshift(0);if(V[H-1]!==188)throw Error("encoded message does not end in 0xbc");V=String.fromCharCode.apply(String,V);var A=V.substr(0,H-Z-1),F=V.substr(A.length,Z),N=65280>>8*H-K&255;if((A.charCodeAt(0)&N)!==0)throw Error("bits beyond keysize not zero");var D=iG1(F,A.length,Q),L=[];for(z=0;z<A.length;z+=1)L[z]=A.charCodeAt(z)^D.charCodeAt(z);L[0]&=~N;var B=H-Z-G-2;for(z=0;z<B;z+=1)if(L[z]!==0)throw Error("leftmost octets not zero");if(L[B]!==1)throw Error("0x01 marker not found");return F===n3(Q(nH("\x00\x00\x00\x00\x00\x00\x00\x00"+W+String.fromCharCode.apply(String,L.slice(-G)))))};D6.SALT_LEN_HLEN=-1;D6.SALT_LEN_MAX=-2;D6.SALT_LEN_RECOVER=-2;function e4($){var Y=M1,X=Y.getChildIdx,G=Y.getV,J=Y.dump,Q=Y.parse,W=Y.getTLV,Z=Y.getVbyList,K=Y.getVbyListEx,H=Y.getTLVbyList,z=Y.getTLVbyListEx,V=Y.getIdxbyList,A=Y.getIdxbyListEx,F=Y.getVidx,N=Y.getInt,D=Y.oidname,L=Y.hextooidstr,B=e4,O=B$,E,M=Error;try{E=l.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch(I){}this.HEX2STAG={"0c":"utf8","13":"prn","16":"ia5","1a":"vis","1e":"bmp"},this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){if(this.hex===null||this.version!==0)return this.version;var I=H(this.hex,0,[0,0]);if(I.substr(0,2)=="a0"){var P=H(I,0,[0]),_=N(P,0);if(_<0||2<_)throw Error("malformed version field");return this.version=_+1,this.version}else return this.version=1,this.foffset=-1,1},this.getSerialNumberHex=function(){return K(this.hex,0,[0,0],"02")},this.getSignatureAlgorithmField=function(){var I=z(this.hex,0,[0,1]);return this.getAlgorithmIdentifierName(I)},this.getAlgorithmIdentifierName=function(I){for(var P in E)if(I===E[P])return P;return D(K(I,0,[0],"06"))},this.getIssuer=function(I,P){return this.getX500Name(this.getIssuerHex(),I,P)},this.getIssuerHex=function(){return H(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){var I=this.getIssuer();return I.str},this.getSubject=function(I,P){return this.getX500Name(this.getSubjectHex(),I,P)},this.getSubjectHex=function(){return H(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){var I=this.getSubject();return I.str},this.getNotBefore=function(){var I=Z(this.hex,0,[0,4+this.foffset,0]);return I=I.replace(/(..)/g,"%$1"),I=decodeURIComponent(I),I},this.getNotAfter=function(){var I=Z(this.hex,0,[0,4+this.foffset,1]);return I=I.replace(/(..)/g,"%$1"),I=decodeURIComponent(I),I},this.getPublicKeyHex=function(){return this.getSPKI()},this.getSPKI=function(){return H(this.hex,0,[0,6+this.foffset],"30")},this.getSPKIValue=function(){var I=this.getSPKI();if(I==null)return null;return Z(I,0,[1],"03",!0)},this.getPublicKeyIdx=function(){return V(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var I=this.getPublicKeyIdx();return V(this.hex,I,[1,0],"30")},this.getPublicKey=function(){return K8.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){var I=H(this.hex,0,[1],"30");return this.getAlgorithmIdentifierName(I)},this.getSignatureValueHex=function(){return Z(this.hex,0,[2],"03",!0)},this.verifySignature=function(I){var P=this.getSignatureAlgorithmField(),_=this.getSignatureValueHex(),C=H(this.hex,0,[0],"30"),k=new l.crypto.Signature({alg:P});return k.init(I),k.updateHex(C),k.verify(_)},this.parseExt=function(I){var P,_,C;if(I===void 0){if(C=this.hex,this.version!==3)return-1;P=V(C,0,[0,7,0],"30"),_=X(C,P)}else{C=B$(I);var k=V(C,0,[0,3,0,0],"06");if(G(C,k)!="2a864886f70d01090e"){this.aExtInfo=[];return}P=V(C,0,[0,3,0,1,0],"30"),_=X(C,P),this.hex=C}this.aExtInfo=[];for(var S=0;S<_.length;S++){var T={};T.critical=!1;var v=X(C,_[S]),x=0;if(v.length===3)T.critical=!0,x=1;T.oid=Y.hextooidstr(Z(C,_[S],[0],"06"));var y=V(C,_[S],[1+x]);T.vidx=F(C,y),this.aExtInfo.push(T)}},this.getExtInfo=function(I){var P=this.aExtInfo,_=I;if(!I.match(/^[0-9.]+$/))_=l.asn1.x509.OID.name2oid(I);if(_==="")return;for(var C=0;C<P.length;C++)if(P[C].oid===_)return P[C];return},this.getCriticalExtV=function(I,P,_){if(P!=null)return[P,_];var C=this.getExtInfo(I);if(C==null)return[null,null];return[W(this.hex,C.vidx),C.critical]},this.getExtBasicConstraints=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("basicConstraints");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"basicConstraints"};if(P)C.critical=!0;if(I==="3000")return C;if(I==="30030101ff")return C.cA=!0,C;if(I.substr(0,12)==="30060101ff02"){var k=G(I,10),S=parseInt(k,16);return C.cA=!0,C.pathLen=S,C}throw Error("hExtV parse error: "+I)},this.getExtNameConstraints=function(I,P){var _=this.getCriticalExtV("nameConstraints",I,P);if(I=_[0],P=_[1],I==null)return;var C={extname:"nameConstraints"};if(P)C.critical=!0;var k=X(I,0);for(var S=0;S<k.length;S++){var T=[],v=X(I,k[S]);for(var x=0;x<v.length;x++){var y=W(I,v[x]),d=this.getGeneralSubtree(y);T.push(d)}var u=I.substr(k[S],2);if(u=="a0")C.permit=T;else if(u=="a1")C.exclude=T}return C},this.getGeneralSubtree=function(I){var P=X(I,0),_=P.length;if(_<1||2<_)throw Error("wrong num elements");var C=this.getGeneralName(W(I,P[0]));for(var k=1;k<_;k++){var S=I.substr(P[k],2),T=G(I,P[k]),v=parseInt(T,16);if(S=="80")C.min=v;if(S=="81")C.max=v}return C},this.getExtKeyUsage=function(I,P){var _=this.getCriticalExtV("keyUsage",I,P);if(I=_[0],P=_[1],I==null)return;var C={extname:"keyUsage"};if(P)C.critical=!0;return C.names=this.getExtKeyUsageString(I).split(","),C},this.getExtKeyUsageBin=function(I){if(I===void 0){var P=this.getExtInfo("keyUsage");if(P===void 0)return"";I=W(this.hex,P.vidx)}if(I.length!=8&&I.length!=10)throw Error("malformed key usage value: "+I);var _="000000000000000"+parseInt(I.substr(6),16).toString(2);if(I.length==8)_=_.slice(-8);if(I.length==10)_=_.slice(-16);if(_=_.replace(/0+$/,""),_=="")_="0";return _},this.getExtKeyUsageString=function(I){var P=this.getExtKeyUsageBin(I),_=[];for(var C=0;C<P.length;C++)if(P.substr(C,1)=="1")_.push(e4.KEYUSAGE_NAME[C]);return _.join(",")},this.getExtSubjectKeyIdentifier=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("subjectKeyIdentifier");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"subjectKeyIdentifier"};if(P)C.critical=!0;var k=G(I,0);return C.kid={hex:k},C},this.getExtAuthorityKeyIdentifier=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("authorityKeyIdentifier");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"authorityKeyIdentifier"};if(P)C.critical=!0;var k=X(I,0);for(var S=0;S<k.length;S++){var T=I.substr(k[S],2);if(T==="80")C.kid={hex:G(I,k[S])};if(T==="a1"){var v=W(I,k[S]),x=this.getGeneralNames(v);C.issuer=x[0].dn}if(T==="82")C.sn={hex:G(I,k[S])}}return C},this.getExtExtKeyUsage=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("extKeyUsage");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"extKeyUsage",array:[]};if(P)C.critical=!0;var k=X(I,0);for(var S=0;S<k.length;S++)C.array.push(D(G(I,k[S])));return C},this.getExtExtKeyUsageName=function(){var I=this.getExtInfo("extKeyUsage");if(I===void 0)return I;var P=[],_=W(this.hex,I.vidx);if(_==="")return P;var C=X(_,0);for(var k=0;k<C.length;k++)P.push(D(G(_,C[k])));return P},this.getExtSubjectAltName=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("subjectAltName");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"subjectAltName",array:[]};if(P)C.critical=!0;return C.array=this.getGeneralNames(I),C},this.getExtIssuerAltName=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("issuerAltName");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"issuerAltName",array:[]};if(P)C.critical=!0;return C.array=this.getGeneralNames(I),C},this.getGeneralNames=function(I){var P=X(I,0),_=[];for(var C=0;C<P.length;C++){var k=this.getGeneralName(W(I,P[C]));if(k!==void 0)_.push(k)}return _},this.getGeneralName=function(I){var P=I.substr(0,2),_=G(I,0),C=n3(_);if(P=="81")return{rfc822:C};if(P=="82")return{dns:C};if(P=="86")return{uri:C};if(P=="87")return{ip:tK0(_)};if(P=="a4")return{dn:this.getX500Name(_)};if(P=="a0")return{other:this.getOtherName(I)};return},this.getExtSubjectAltName2=function(){var I,P,_,C=this.getExtInfo("subjectAltName");if(C===void 0)return C;var k=[],S=W(this.hex,C.vidx),T=X(S,0);for(var v=0;v<T.length;v++){if(_=S.substr(T[v],2),I=G(S,T[v]),_==="81")P=S9(I),k.push(["MAIL",P]);if(_==="82")P=S9(I),k.push(["DNS",P]);if(_==="84")P=e4.hex2dn(I,0),k.push(["DN",P]);if(_==="86")P=S9(I),k.push(["URI",P]);if(_==="87")P=tK0(I),k.push(["IP",P])}return k},this.getExtCRLDistributionPoints=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("cRLDistributionPoints");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"cRLDistributionPoints",array:[]};if(P)C.critical=!0;var k=X(I,0);for(var S=0;S<k.length;S++){var T=W(I,k[S]);C.array.push(this.getDistributionPoint(T))}return C},this.getDistributionPoint=function(I){var P={},_=X(I,0);for(var C=0;C<_.length;C++){var k=I.substr(_[C],2),S=W(I,_[C]);if(k=="a0")P.dpname=this.getDistributionPointName(S)}return P},this.getDistributionPointName=function(I){var P={},_=X(I,0);for(var C=0;C<_.length;C++){var k=I.substr(_[C],2),S=W(I,_[C]);if(k=="a0")P.full=this.getGeneralNames(S)}return P},this.getExtCRLDistributionPointsURI=function(){var I=this.getExtCRLDistributionPoints();if(I==null)return I;var P=I.array,_=[];for(var C=0;C<P.length;C++)try{if(P[C].dpname.full[0].uri!=null)_.push(P[C].dpname.full[0].uri)}catch(k){}return _},this.getExtAIAInfo=function(){var I=this.getExtInfo("authorityInfoAccess");if(I===void 0)return I;var P={ocsp:[],caissuer:[]},_=X(this.hex,I.vidx);for(var C=0;C<_.length;C++){var k=Z(this.hex,_[C],[0],"06"),S=Z(this.hex,_[C],[1],"86");if(k==="2b06010505073001")P.ocsp.push(S9(S));if(k==="2b06010505073002")P.caissuer.push(S9(S))}return P},this.getExtAuthorityInfoAccess=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("authorityInfoAccess");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"authorityInfoAccess",array:[]};if(P)C.critical=!0;var k=X(I,0);for(var S=0;S<k.length;S++){var T=K(I,k[S],[0],"06"),v=Z(I,k[S],[1],"86"),x=S9(v);if(T=="2b06010505073001")C.array.push({ocsp:x});else if(T=="2b06010505073002")C.array.push({caissuer:x});else throw Error("unknown method: "+T)}return C},this.getExtCertificatePolicies=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("certificatePolicies");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"certificatePolicies",array:[]};if(P)C.critical=!0;var k=X(I,0);for(var S=0;S<k.length;S++){var T=W(I,k[S]),v=this.getPolicyInformation(T);C.array.push(v)}return C},this.getPolicyInformation=function(I){var P={},_=Z(I,0,[0],"06");P.policyoid=D(_);var C=A(I,0,[1],"30");if(C!=-1){P.array=[];var k=X(I,C);for(var S=0;S<k.length;S++){var T=W(I,k[S]),v=this.getPolicyQualifierInfo(T);P.array.push(v)}}return P},this.getOtherName=function(I){var P={},_=X(I,0),C=Z(I,_[0],[],"06"),k=Z(I,_[1],[]);return P.oid=D(C),P.value=Q(k),P},this.getPolicyQualifierInfo=function(I){var P={},_=Z(I,0,[0],"06");if(_==="2b06010505070201"){var C=K(I,0,[1],"16");P.cps=n3(C)}else if(_==="2b06010505070202"){var k=H(I,0,[1],"30");P.unotice=this.getUserNotice(k)}return P},this.getUserNotice=function(I){var P=null,_={};try{P=Y.parse(I);var C=this._asn1ToUnotice(P);return C}catch(k){return}},this._asn1ToUnotice=function(I){try{var P={},_=q5(I,"seq");for(var C=0;C<_.length;C++){var k=this._asn1ToNoticeRef(_[C]);if(k!=null)P.noticeref=k;var S=this.asn1ToDisplayText(_[C]);if(S!=null)P.exptext=S}if(Object.keys(P).length>0)return P;return}catch(T){return}},this._asn1ToNoticeRef=function(I){try{var P={},_=q5(I,"seq");for(var C=0;C<_.length;C++){var k=this._asn1ToNoticeNum(_[C]);if(k!=null)P.noticenum=k;var S=this.asn1ToDisplayText(_[C]);if(S!=null)P.org=S}if(Object.keys(P).length>0)return P;return}catch(T){return}},this._asn1ToNoticeNum=function(I){try{var P=q5(I,"seq"),_=[];for(var C=0;C<P.length;C++){var k=P[C];_.push(parseInt(q5(k,"int.hex"),16))}return _}catch(S){return}},this.getDisplayText=function(I){var P={"0c":"utf8","16":"ia5","1a":"vis","1e":"bmp"},_={};return _.type=P[I.substr(0,2)],_.str=n3(G(I,0)),_},this.asn1ToDisplayText=function(I){if(I.utf8str!=null)return{type:"utf8",str:I.utf8str.str};if(I.ia5str!=null)return{type:"ia5",str:I.ia5str.str};if(I.visstr!=null)return{type:"vis",str:I.visstr.str};if(I.bmpstr!=null)return{type:"bmp",str:I.bmpstr.str};if(I.prnstr!=null)return{type:"prn",str:I.prnstr.str};return},this.getExtPolicyMappings=function(I,P){var _=this.getCriticalExtV("policyMappings",I,P);if(I=_[0],P=_[1],I==null)return;var C={extname:"policyMappings"};if(P)C.critical=!0;try{var k=Q(I),S=k.seq,T=[];for(var v=0;v<S.length;v++){var x=S[v].seq;T.push([x[0].oid,x[1].oid])}C.array=T}catch(y){throw new M("malformed policyMappings")}return C},this.getExtPolicyConstraints=function(I,P){var _=this.getCriticalExtV("policyConstraints",I,P);if(I=_[0],P=_[1],I==null)return;var C={extname:"policyConstraints"};if(P)C.critical=!0;var k=Q(I);try{var S=k.seq;for(var T=0;T<S.length;T++){var v=S[T].tag;if(v.explicit!=!1)continue;if(v.tag=="80")C.reqexp=parseInt(v.hex,16);if(v.tag=="81")C.inhibit=parseInt(v.hex,16)}}catch(x){return new M("malformed policyConstraints value")}return C},this.getExtInhibitAnyPolicy=function(I,P){var _=this.getCriticalExtV("inhibitAnyPolicy",I,P);if(I=_[0],P=_[1],I==null)return;var C={extname:"inhibitAnyPolicy"};if(P)C.critical=!0;var k=N(I,0);if(k==-1)return new M("wrong value");return C.skip=k,C},this.getExtCRLNumber=function(I,P){var _={extname:"cRLNumber"};if(P)_.critical=!0;if(I.substr(0,2)=="02")return _.num={hex:G(I,0)},_;throw new M("hExtV parse error: "+I)},this.getExtCRLReason=function(I,P){var _={extname:"cRLReason"};if(P)_.critical=!0;if(I.substr(0,2)=="0a")return _.code=parseInt(G(I,0),16),_;throw Error("hExtV parse error: "+I)},this.getExtOcspNonce=function(I,P){var _={extname:"ocspNonce"};if(P)_.critical=!0;var C=G(I,0);return _.hex=C,_},this.getExtOcspNoCheck=function(I,P){var _={extname:"ocspNoCheck"};if(P)_.critical=!0;return _},this.getExtAdobeTimeStamp=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("adobeTimeStamp");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"adobeTimeStamp"};if(P)C.critical=!0;var k=X(I,0);if(k.length>1){var S=W(I,k[1]),T=this.getGeneralName(S);if(T.uri!=null)C.uri=T.uri}if(k.length>2){var v=W(I,k[2]);if(v=="0101ff")C.reqauth=!0;if(v=="010100")C.reqauth=!1}return C},this.getExtSubjectDirectoryAttributes=function(I,P){if(I===void 0&&P===void 0){var _=this.getExtInfo("subjectDirectoryAttributes");if(_===void 0)return;I=W(this.hex,_.vidx),P=_.critical}var C={extname:"subjectDirectoryAttributes"};if(P)C.critical=!0;try{var k=Q(I),S=[];for(var T=0;T<k.seq.length;T++){var v=k.seq[T],x=q5(v,"seq.0.oid"),y=q5(v,"seq.1.set");if(x==null||y==null)throw"error";S.push({attr:x,array:y})}return C.array=S,C}catch(d){throw Error("malformed subjectDirectoryAttributes extension value")}};var R=function(I){var P={};try{var _=I.seq[0].oid,C=l.asn1.x509.OID.name2oid(_);P.type=l.asn1.x509.OID.oid2atype(C);var k=I.seq[1];if(k.utf8str!=null)P.ds="utf8",P.value=k.utf8str.str;else if(k.numstr!=null)P.ds="num",P.value=k.numstr.str;else if(k.telstr!=null)P.ds="tel",P.value=k.telstr.str;else if(k.prnstr!=null)P.ds="prn",P.value=k.prnstr.str;else if(k.ia5str!=null)P.ds="ia5",P.value=k.ia5str.str;else if(k.visstr!=null)P.ds="vis",P.value=k.visstr.str;else if(k.bmpstr!=null)P.ds="bmp",P.value=k.bmpstr.str;else throw"error";return P}catch(S){throw new Erorr("improper ASN.1 parsed AttrTypeAndValue")}},q=function(I){try{return I.set.map(function(P){return R(P)})}catch(P){throw Error("improper ASN.1 parsed RDN: "+P)}},w=function(I){try{return I.seq.map(function(P){return q(P)})}catch(P){throw Error("improper ASN.1 parsed X500Name: "+P)}};if(this.getX500NameRule=function(I){var P=!0,_=!0,C=!1,k="",S="",T=null,v=[];for(var x=0;x<I.length;x++){var y=I[x];for(var d=0;d<y.length;d++)v.push(y[d])}for(var x=0;x<v.length;x++){var u=v[x],b=u.ds,g=u.value,p=u.type;if(k+=":"+b,b!="prn"&&b!="utf8"&&b!="ia5")return"mixed";if(b=="ia5")if(p!="CN")return"mixed";else if(!l.lang.String.isMail(g))return"mixed";else continue;if(p=="C")if(b=="prn")continue;else return"mixed";if(S+=":"+b,T==null)T=b;else if(T!==b)return"mixed"}if(T==null)return"prn";else return T},this.getAttrTypeAndValue=function(I){var P=Q(I);return R(P)},this.getRDN=function(I){var P=Q(I);return q(P)},this.getX500NameArray=function(I){var P=Q(I);return w(P)},this.getX500Name=function(I,P,_){var C=this.getX500NameArray(I),k=this.dnarraytostr(C),S={str:k};if(S.array=C,_==!0)S.hex=I;if(P==!0)S.canon=this.c14nRDNArray(C);return S},this.readCertPEM=function(I){this.readCertHex(O(I))},this.readCertHex=function(I){this.hex=I,this.getVersion();try{V(this.hex,0,[0,7],"a3"),this.parseExt()}catch(P){}},this.getParam=function(I){var P={};if(I==null)I={};if(P.version=this.getVersion(),P.serial={hex:this.getSerialNumberHex()},P.sigalg=this.getSignatureAlgorithmField(),P.issuer=this.getIssuer(I.dncanon,I.dnhex),P.notbefore=this.getNotBefore(),P.notafter=this.getNotAfter(),P.subject=this.getSubject(I.dncanon,I.dnhex),P.sbjpubkey=RG(this.getPublicKeyHex(),"PUBLIC KEY"),this.aExtInfo!=null&&this.aExtInfo.length>0)P.ext=this.getExtParamArray();if(P.sighex=this.getSignatureValueHex(),I.tbshex==!0)P.tbshex=H(this.hex,0,[0]);if(I.nodnarray==!0)delete P.issuer.array,delete P.subject.array;return P},this.getExtParamArray=function(I){if(I==null){var P=A(this.hex,0,[0,"[3]"]);if(P!=-1)I=z(this.hex,0,[0,"[3]",0],"30")}var _=[],C=X(I,0);for(var k=0;k<C.length;k++){var S=W(I,C[k]),T=this.getExtParam(S);if(T!=null)_.push(T)}return _},this.getExtParam=function(I){var P={},_=X(I,0),C=_.length;if(C!=2&&C!=3)throw Error("wrong number elements in Extension: "+C+" "+I);var k=L(Z(I,0,[0],"06")),S=!1;if(C==3&&H(I,0,[1])=="0101ff")S=!0;var T=H(I,0,[C-1,0]),v=void 0;if(k=="2.5.29.14")v=this.getExtSubjectKeyIdentifier(T,S);else if(k=="2.5.29.15")v=this.getExtKeyUsage(T,S);else if(k=="2.5.29.17")v=this.getExtSubjectAltName(T,S);else if(k=="2.5.29.18")v=this.getExtIssuerAltName(T,S);else if(k=="2.5.29.19")v=this.getExtBasicConstraints(T,S);else if(k=="2.5.29.30")v=this.getExtNameConstraints(T,S);else if(k=="2.5.29.31")v=this.getExtCRLDistributionPoints(T,S);else if(k=="2.5.29.32")v=this.getExtCertificatePolicies(T,S);else if(k=="2.5.29.33")v=this.getExtPolicyMappings(T,S);else if(k=="2.5.29.35")v=this.getExtAuthorityKeyIdentifier(T,S);else if(k=="2.5.29.36")v=this.getExtPolicyConstraints(T,S);else if(k=="2.5.29.37")v=this.getExtExtKeyUsage(T,S);else if(k=="2.5.29.54")v=this.getExtInhibitAnyPolicy(T,S);else if(k=="1.3.6.1.5.5.7.1.1")v=this.getExtAuthorityInfoAccess(T,S);else if(k=="2.5.29.20")v=this.getExtCRLNumber(T,S);else if(k=="2.5.29.21")v=this.getExtCRLReason(T,S);else if(k=="2.5.29.9")v=this.getExtSubjectDirectoryAttributes(T,S);else if(k=="1.3.6.1.5.5.7.48.1.2")v=this.getExtOcspNonce(T,S);else if(k=="1.3.6.1.5.5.7.48.1.5")v=this.getExtOcspNoCheck(T,S);else if(k=="1.2.840.113583.1.1.9.1")v=this.getExtAdobeTimeStamp(T,S);else if(e4.EXT_PARSER[k]!=null)v=e4.EXT_PARSER[k](k,S,T);if(v!=null)return v;var x={extname:k,extn:T};try{x.extn=Q(T)}catch(y){}if(S)x.critical=!0;return x},this.findExt=function(I,P){for(var _=0;_<I.length;_++)if(I[_].extname==P)return I[_];return null},this.updateExtCDPFullURI=function(I,P){var _=this.findExt(I,"cRLDistributionPoints");if(_==null)return;if(_.array==null)return;var C=_.array;for(var k=0;k<C.length;k++){if(C[k].dpname==null)continue;if(C[k].dpname.full==null)continue;var S=C[k].dpname.full;for(var T=0;T<S.length;T++){var v=S[k];if(v.uri==null)continue;v.uri=P}}},this.updateExtAIAOCSP=function(I,P){var _=this.findExt(I,"authorityInfoAccess");if(_==null)return;if(_.array==null)return;var C=_.array;for(var k=0;k<C.length;k++)if(C[k].ocsp!=null)C[k].ocsp=P},this.updateExtAIACAIssuer=function(I,P){var _=this.findExt(I,"authorityInfoAccess");if(_==null)return;if(_.array==null)return;var C=_.array;for(var k=0;k<C.length;k++)if(C[k].caissuer!=null)C[k].caissuer=P},this.dnarraytostr=function(I){function P(C){return C.map(function(k){return _(k).replace(/\+/,"\\+")}).join("+")}function _(C){return C.type+"="+C.value}return"/"+I.map(function(C){return P(C).replace(/\//,"\\/")}).join("/")},this.setCanonicalizedDN=function(I){var P;if(I.str!=null&&I.array==null){var _=new l.asn1.x509.X500Name({str:I.str}),C=_.tohex();P=this.getX500NameArray(C)}else P=I.array;if(I.canon==null)I.canon=this.c14nRDNArray(P)},this.c14nRDNArray=function(I){var P=[];for(var _=0;_<I.length;_++){var C=I[_],k=[];for(var S=0;S<C.length;S++){var T=C[S],v=T.value;v=v.replace(/^\s*/,""),v=v.replace(/\s*$/,""),v=v.replace(/\s+/g," "),v=v.toLowerCase(),k.push(T.type.toLowerCase()+"="+v)}P.push(k.join("+"))}return"/"+P.join("/")},this.getInfo=function(){var I=function(a){var Q0="",e="    ",m=`
`,$0=a.array;for(var Y0=0;Y0<$0.length;Y0++){var K0=$0[Y0];if(K0.dn!=null)Q0+=e+"dn: "+K0.dn.str+m;if(K0.ip!=null)Q0+=e+"ip: "+K0.ip+m;if(K0.rfc822!=null)Q0+=e+"rfc822: "+K0.rfc822+m;if(K0.dns!=null)Q0+=e+"dns: "+K0.dns+m;if(K0.uri!=null)Q0+=e+"uri: "+K0.uri+m;if(K0.other!=null){var A0=K0.other.oid,D0=JSON.stringify(K0.other.value).replace(/\"/g,"");Q0+=e+"other: "+A0+"="+D0+m}}return Q0=Q0.replace(/\n$/,""),Q0},P=function(a){var Q0="",e=a.array;for(var m=0;m<e.length;m++){var $0=e[m];if(Q0+="    policy oid: "+$0.policyoid+`
`,$0.array===void 0)continue;for(var Y0=0;Y0<$0.array.length;Y0++){var K0=$0.array[Y0];if(K0.cps!==void 0)Q0+="    cps: "+K0.cps+`
`}}return Q0},_=function(a){var Q0="",e=a.array;for(var m=0;m<e.length;m++){var $0=e[m];try{if($0.dpname.full[0].uri!==void 0)Q0+="    "+$0.dpname.full[0].uri+`
`}catch(Y0){}try{if($0.dname.full[0].dn.hex!==void 0)Q0+="    "+e4.hex2dn($0.dpname.full[0].dn.hex)+`
`}catch(Y0){}}return Q0},C=function(a){var Q0="",e=a.array;for(var m=0;m<e.length;m++){var $0=e[m];if($0.caissuer!==void 0)Q0+="    caissuer: "+$0.caissuer+`
`;if($0.ocsp!==void 0)Q0+="    ocsp: "+$0.ocsp+`
`}return Q0},k=e4,S,T,v;if(S=`Basic Fields
`,S+="  serial number: "+this.getSerialNumberHex()+`
`,S+="  signature algorithm: "+this.getSignatureAlgorithmField()+`
`,S+="  issuer: "+this.getIssuerString()+`
`,S+="  notBefore: "+this.getNotBefore()+`
`,S+="  notAfter: "+this.getNotAfter()+`
`,S+="  subject: "+this.getSubjectString()+`
`,S+=`  subject public key info: 
`,T=this.getPublicKey(),S+="    key algorithm: "+T.type+`
`,T.type==="RSA")S+="    n="+CG1(T.n.toString(16)).substr(0,16)+`...
`,S+="    e="+CG1(T.e.toString(16))+`
`;if(v=this.aExtInfo,v!==void 0&&v!==null){S+=`X509v3 Extensions:
`;for(var x=0;x<v.length;x++){var y=v[x],d=l.asn1.x509.OID.oid2name(y.oid);if(d==="")d=y.oid;var u="";if(y.critical===!0)u="CRITICAL";if(S+="  "+d+" "+u+`:
`,d==="basicConstraints"){var b=this.getExtBasicConstraints();if(b.cA===void 0)S+=`    {}
`;else{if(S+="    cA=true",b.pathLen!==void 0)S+=", pathLen="+b.pathLen;S+=`
`}}else if(d=="policyMappings"){var g=this.getExtPolicyMappings().array,p=g.map(function(a){var Q0=a;return Q0[0]+":"+Q0[1]}).join(", ");S+="    "+p+`
`}else if(d=="policyConstraints"){var h=this.getExtPolicyConstraints();if(S+="    ",h.reqexp!=null)S+=" reqexp="+h.reqexp;if(h.inhibit!=null)S+=" inhibit="+h.inhibit;S+=`
`}else if(d=="inhibitAnyPolicy"){var h=this.getExtInhibitAnyPolicy();S+="    skip="+h.skip+`
`}else if(d=="keyUsage")S+="    "+this.getExtKeyUsageString()+`
`;else if(d=="subjectKeyIdentifier")S+="    "+this.getExtSubjectKeyIdentifier().kid.hex+`
`;else if(d=="authorityKeyIdentifier"){var n=this.getExtAuthorityKeyIdentifier();if(n.kid!==void 0)S+="    kid="+n.kid.hex+`
`}else if(d=="extKeyUsage"){var t=this.getExtExtKeyUsage().array;S+="    "+t.join(", ")+`
`}else if(d=="subjectAltName"){var s=I(this.getExtSubjectAltName());S+=s+`
`}else if(d=="cRLDistributionPoints"){var Z0=this.getExtCRLDistributionPoints();S+=_(Z0)}else if(d=="authorityInfoAccess"){var X0=this.getExtAuthorityInfoAccess();S+=C(X0)}else if(d=="certificatePolicies")S+=P(this.getExtCertificatePolicies())}}return S+="signature algorithm: "+this.getSignatureAlgorithmName()+`
`,S+="signature: "+this.getSignatureValueHex().substr(0,16)+`...
`,S},typeof $=="string"){if($.indexOf("-----BEGIN")!=-1)this.readCertPEM($);else if(l.lang.String.isHex($))this.readCertHex($)}}e4.EXT_PARSER={};e4.registExtParser=function($,Y){e4.EXT_PARSER[$]=Y};e4.hex2dn=function($,Y){if(Y===void 0)Y=0;var X=new e4,G=M1.getTLV($,Y),J=X.getX500Name($);return J.str};e4.hex2rdn=function($,Y){if(Y===void 0)Y=0;if($.substr(Y,2)!=="31")throw Error("malformed RDN");var X=[],G=M1.getChildIdx($,Y);for(var J=0;J<G.length;J++)X.push(e4.hex2attrTypeValue($,G[J]));return X=X.map(function(Q){return Q.replace("+","\\+")}),X.join("+")};e4.hex2attrTypeValue=function($,Y){var X=M1,G=X.getV;if(Y===void 0)Y=0;if($.substr(Y,2)!=="30")throw Error("malformed attribute type and value");var J=X.getChildIdx($,Y);if(J.length!==2||$.substr(J[0],2)!=="06");var Q=G($,J[0]),W=l.asn1.ASN1Util.oidHexToInt(Q),Z=l.asn1.x509.OID.oid2atype(W),K=G($,J[1]),H=n3(K);return Z+"="+H};e4.getPublicKeyFromCertHex=function($){var Y=new e4;return Y.readCertHex($),Y.getPublicKey()};e4.getPublicKeyFromCertPEM=function($){var Y=new e4;return Y.readCertPEM($),Y.getPublicKey()};e4.getPublicKeyInfoPropOfCertPEM=function($){var Y=M1,X=Y.getVbyList,G={},J,Q,W;if(G.algparam=null,J=new e4,J.readCertPEM($),Q=J.getPublicKeyHex(),G.keyhex=X(Q,0,[1],"03").substr(2),G.algoid=X(Q,0,[0,0],"06"),G.algoid==="2a8648ce3d0201")G.algparam=X(Q,0,[0,1],"06");return G};e4.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"];if(typeof l>"u"||!l)l={};if(typeof l.jws>"u"||!l.jws)l.jws={};l.jws.JWS=function(){var $=l,Y=$.jws.JWS,X=Y.isSafeJSONString;this.parseJWS=function(G,J){if(this.parsedJWS!==void 0&&(J||this.parsedJWS.sigvalH!==void 0))return;var Q=G.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(Q==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var W=Q[1],Z=Q[2],K=Q[3],H=W+"."+Z;if(this.parsedJWS={},this.parsedJWS.headB64U=W,this.parsedJWS.payloadB64U=Z,this.parsedJWS.sigvalB64U=K,this.parsedJWS.si=H,!J){var z=Z7(K),V=dJ(z,16);this.parsedJWS.sigvalH=z,this.parsedJWS.sigvalBI=V}var A=i3(W),F=i3(Z);if(this.parsedJWS.headS=A,this.parsedJWS.payloadS=F,!X(A,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+A}};l.jws.JWS.sign=function($,Y,X,G,J){var Q=l,W=Q.jws,Z=W.JWS,K=Z.readSafeJSONString,H=Z.isSafeJSONString,z=Q.crypto,V=z.ECDSA,A=z.Mac,F=z.Signature,N=JSON,D,L,B;if(typeof Y!="string"&&typeof Y!="object")throw"spHeader must be JSON string or object: "+Y;if(typeof Y=="object")L=Y,D=N.stringify(L);if(typeof Y=="string"){if(D=Y,!H(D))throw"JWS Head is not safe JSON string: "+D;L=K(D)}if(B=X,typeof X=="object")B=N.stringify(X);if(($==""||$==null)&&L.alg!==void 0)$=L.alg;if($!=""&&$!=null&&L.alg===void 0)L.alg=$,D=N.stringify(L);if($!==L.alg)throw"alg and sHeader.alg doesn't match: "+$+"!="+L.alg;var O=null;if(Z.jwsalg2sigalg[$]===void 0)throw"unsupported alg name: "+$;else O=Z.jwsalg2sigalg[$];var E=Xr(D),M=Xr(B),R=E+"."+M,q="";if(O.substr(0,4)=="Hmac"){if(G===void 0)throw"mac key shall be specified for HS* alg";var w=new A({alg:O,prov:"cryptojs",pass:G});w.updateString(R),q=w.doFinal()}else if(O.indexOf("withECDSA")!=-1){var I=new F({alg:O});I.init(G,J),I.updateString(R);var P=I.sign();q=l.crypto.ECDSA.asn1SigToConcatSig(P)}else if(O!="none"){var I=new F({alg:O});I.init(G,J),I.updateString(R),q=I.sign()}var _=jY(q);return R+"."+_};l.jws.JWS.verify=function($,Y,X){var G=l,J=G.jws,Q=J.JWS,W=Q.readSafeJSONString,Z=G.crypto,K=Z.ECDSA,H=Z.Mac,z=Z.Signature,V;if(typeof D6!==void 0)V=D6;if(!cG1($))return!1;var A=$.split(".");if(A.length!==3)return!1;var F=A[0],N=A[1],D=F+"."+N,L=Z7(A[2]),B=W(i3(A[0])),O=null,E=null;if(B.alg===void 0)throw"algorithm not specified in header";else O=B.alg,E=O.substr(0,2);if(X!=null&&Object.prototype.toString.call(X)==="[object Array]"&&X.length>0){var M=":"+X.join(":")+":";if(M.indexOf(":"+O+":")==-1)throw"algorithm '"+O+"' not accepted in the list"}if(O!="none"&&Y===null)throw"key shall be specified to verify.";if(typeof Y=="string"&&Y.indexOf("-----BEGIN ")!=-1)Y=K8.getKey(Y);if(E=="RS"||E=="PS"){if(!(Y instanceof V))throw"key shall be a RSAKey obj for RS* and PS* algs"}if(E=="ES"){if(!(Y instanceof K))throw"key shall be a ECDSA obj for ES* algs"}if(O=="none");var R=null;if(Q.jwsalg2sigalg[B.alg]===void 0)throw Error("unsupported alg name: "+O);else R=Q.jwsalg2sigalg[O];if(B.crit!==void 0){if(!Array.isArray(B.crit)||B.crit.length===0)throw Error("wrong critical header");for(var q=0;q<B.crit.length;q++){var w=B.crit[q];if(typeof w!=="string"||w.length===0)throw Error("wrong critical header");if(B[w]===void 0)throw Error("critical header '"+w+"' missing")}}if(R=="none")throw Error("not supported");else if(R.substr(0,4)=="Hmac"){var I=null;if(Y===void 0)throw Error("hexadecimal key shall be specified for HMAC");var P=new H({alg:R,pass:Y});return P.updateString(D),I=P.doFinal(),mo4(L,I)}else if(R.indexOf("withECDSA")!=-1){var _=null;try{_=K.concatSigToASN1Sig(L)}catch(k){return!1}var C=new z({alg:R});return C.init(Y),C.updateString(D),C.verify(_)}else{var C=new z({alg:R});return C.init(Y),C.updateString(D),C.verify(L)}};l.jws.JWS.parse=function($){var Y=$.split("."),X={},G,J,Q;if(Y.length!=2&&Y.length!=3)throw"malformed sJWS: wrong number of '.' splitted elements";if(G=Y[0],J=Y[1],Y.length==3)Q=Y[2];if(X.headerObj=l.jws.JWS.readSafeJSONString(i3(G)),X.payloadObj=l.jws.JWS.readSafeJSONString(i3(J)),X.headerPP=JSON.stringify(X.headerObj,null,"  "),X.payloadObj==null)X.payloadPP=i3(J);else X.payloadPP=JSON.stringify(X.payloadObj,null,"  ");if(Q!==void 0)X.sigHex=Z7(Q);return X};l.jws.JWS.verifyJWT=function($,Y,X){var G=l,J=G.jws,Q=J.JWS,W=Q.readSafeJSONString,Z=Q.inArray,K=Q.includedArray;if(!cG1($))return!1;var H=$.split(".");if(H.length!=3)return!1;var z=H[0],V=H[1],A=z+"."+V,F=Z7(H[2]),N=W(i3(z)),D=W(i3(V));if(N.alg===void 0)return!1;if(X.alg===void 0)throw"acceptField.alg shall be specified";if(!Z(N.alg,X.alg))return!1;if(D.iss!==void 0&&typeof X.iss==="object"){if(!Z(D.iss,X.iss))return!1}if(D.sub!==void 0&&typeof X.sub==="object"){if(!Z(D.sub,X.sub))return!1}if(D.aud!==void 0&&typeof X.aud==="object"){if(typeof D.aud=="string"){if(!Z(D.aud,X.aud))return!1}else if(typeof D.aud=="object"){if(!K(D.aud,X.aud))return!1}}var L=J.IntDate.getNow();if(X.verifyAt!==void 0&&typeof X.verifyAt==="number")L=X.verifyAt;if(X.gracePeriod===void 0||typeof X.gracePeriod!=="number")X.gracePeriod=0;if(D.exp!==void 0&&typeof D.exp=="number"){if(D.exp+X.gracePeriod<L)return!1}if(D.nbf!==void 0&&typeof D.nbf=="number"){if(L<D.nbf-X.gracePeriod)return!1}if(D.iat!==void 0&&typeof D.iat=="number"){if(L<D.iat-X.gracePeriod)return!1}if(D.jti!==void 0&&X.jti!==void 0){if(D.jti!==X.jti)return!1}if(!Q.verify($,Y,X.alg))return!1;return!0};l.jws.JWS.includedArray=function($,Y){var X=l.jws.JWS.inArray;if($===null)return!1;if(typeof $!=="object")return!1;if(typeof $.length!=="number")return!1;for(var G=0;G<$.length;G++)if(!X($[G],Y))return!1;return!0};l.jws.JWS.inArray=function($,Y){if(Y===null)return!1;if(typeof Y!=="object")return!1;if(typeof Y.length!=="number")return!1;for(var X=0;X<Y.length;X++)if(Y[X]==$)return!0;return!1};l.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",ES512:"SHA512withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"};l.jws.JWS.isSafeJSONString=function($,Y,X){var G=null;try{if(G=hG1($),typeof G!="object")return 0;if(G.constructor===Array)return 0;if(Y)Y[X]=G;return 1}catch(J){return 0}};l.jws.JWS.readSafeJSONString=function($){var Y=null;try{if(Y=hG1($),typeof Y!="object")return null;if(Y.constructor===Array)return null;return Y}catch(X){return null}};l.jws.JWS.getEncodedSignatureValueFromJWS=function($){var Y=$.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(Y==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return Y[1]};l.jws.JWS.getJWKthumbprint=function($){if($.kty!=="RSA"&&$.kty!=="EC"&&$.kty!=="oct")throw Error("unsupported algorithm for JWK Thumprint");var Y="{";if($.kty==="RSA"){if(typeof $.n!="string"||typeof $.e!="string")throw Error("wrong n and e value for RSA key");Y+='"e":"'+$.e+'",',Y+='"kty":"'+$.kty+'",',Y+='"n":"'+$.n+'"}'}else if($.kty==="EC"){if(typeof $.crv!="string"||typeof $.x!="string"||typeof $.y!="string")throw Error("wrong crv, x and y value for EC key");Y+='"crv":"'+$.crv+'",',Y+='"kty":"'+$.kty+'",',Y+='"x":"'+$.x+'",',Y+='"y":"'+$.y+'"}'}else if($.kty==="oct"){if(typeof $.k!="string")throw Error("wrong k value for oct(symmetric) key");Y+='"k":"'+$.k+'",',Y+='"kty":"'+$.kty+'"}'}var X=nH(Y),G=l.crypto.Util.hashHex(X,"sha256"),J=jY(G);return J};l.jws.IntDate={};l.jws.IntDate.get=function($){var Y=l.jws.IntDate,X=Y.getNow,G=Y.getZulu;if($=="now")return X();else if($=="now + 1hour")return X()+3600;else if($=="now + 1day")return X()+86400;else if($=="now + 1month")return X()+2592000;else if($=="now + 1year")return X()+31536000;else if($.match(/Z$/))return G($);else if($.match(/^[0-9]+$/))return parseInt($);throw"unsupported format: "+$};l.jws.IntDate.getZulu=function($){return fo4($)};l.jws.IntDate.getNow=function(){var $=~~(new Date/1000);return $};l.jws.IntDate.intDate2UTCString=function($){var Y=new Date($*1000);return Y.toUTCString()};l.jws.IntDate.intDate2Zulu=function($){var Y=new Date($*1000),X=("0000"+Y.getUTCFullYear()).slice(-4),G=("00"+(Y.getUTCMonth()+1)).slice(-2),J=("00"+Y.getUTCDate()).slice(-2),Q=("00"+Y.getUTCHours()).slice(-2),W=("00"+Y.getUTCMinutes()).slice(-2),Z=("00"+Y.getUTCSeconds()).slice(-2);return X+G+J+Q+W+Z+"Z"};if(typeof l>"u"||!l)l={};if(typeof l.jws>"u"||!l.jws)l.jws={};l.jws.JWSJS=function(){var $=l,Y=$.jws,X=Y.JWS,G=X.readSafeJSONString;this.aHeader=[],this.sPayload="",this.aSignature=[],this.init=function(){this.aHeader=[],this.sPayload=void 0,this.aSignature=[]},this.initWithJWS=function(J){this.init();var Q=J.split(".");if(Q.length!=3)throw"malformed input JWS";this.aHeader.push(Q[0]),this.sPayload=Q[1],this.aSignature.push(Q[2])},this.addSignature=function(J,Q,W,Z){if(this.sPayload===void 0||this.sPayload===null)throw"there's no JSON-JS signature to add.";var K=this.aHeader.length;if(this.aHeader.length!=this.aSignature.length)throw"aHeader.length != aSignature.length";try{var H=l.jws.JWS.sign(J,Q,this.sPayload,W,Z),z=H.split("."),V=z[0],A=z[2];this.aHeader.push(z[0]),this.aSignature.push(z[2])}catch(F){if(this.aHeader.length>K)this.aHeader.pop();if(this.aSignature.length>K)this.aSignature.pop();throw"addSignature failed: "+F}},this.verifyAll=function(J){if(this.aHeader.length!==J.length||this.aSignature.length!==J.length)return!1;for(var Q=0;Q<J.length;Q++){var W=J[Q];if(W.length!==2)return!1;var Z=this.verifyNth(Q,W[0],W[1]);if(Z===!1)return!1}return!0},this.verifyNth=function(J,Q,W){if(this.aHeader.length<=J||this.aSignature.length<=J)return!1;var Z=this.aHeader[J],K=this.aSignature[J],H=Z+"."+this.sPayload+"."+K,z=!1;try{z=X.verify(H,Q,W)}catch(V){return!1}return z},this.readJWSJS=function(J){if(typeof J==="string"){var Q=G(J);if(Q==null)throw"argument is not safe JSON object string";this.aHeader=Q.headers,this.sPayload=Q.payload,this.aSignature=Q.signatures}else try{if(J.headers.length>0)this.aHeader=J.headers;else throw"malformed header";if(typeof J.payload==="string")this.sPayload=J.payload;else throw"malformed signatures";if(J.signatures.length>0)this.aSignature=J.signatures;else throw"malformed signatures"}catch(W){throw"malformed JWS-JS JSON object: "+W}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){if(this.aHeader.length==0)return 1;return 0}};var io4=l.crypto.ECDSA,no4=l.crypto.DSA,ro4=l.crypto.Signature,ao4=l.crypto.MessageDigest,so4=l.crypto.Mac;var{crypto:oo4,asn1:to4,jws:eo4,lang:$t4}=l;var Yt4=`-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgDm8szG2NDc1OFbQb0PS
K3LEXfiZrndygBiHBjLZ4jtR69gaFV4tjjFJ9yc3fM8X11uAMyiOyzzVLkEZXRMS
aEGRnmkHo4giaSPBQ1p2HV0617I9LBR/ugLq88tZUTGP1JitkAd9K6Y8iQEar2Zd
ajU2ktao2M17ocLdwG4ey4i/+cVHIZlkh3T9Hr9oJtuXg7eWrxXBRMu9U9ngWdI/
o5HuLiEwUJPbXcKseg4uzpGYT3S8RVQ0pA3khSJbOXEmc4ZIeoFynIijVZY0hKLa
8qcdpADXVLQFK1Fo3+2oto+tVQZXOmJFap8X8ZWGlqlh+DKlLDYHpG2YshAWQ6PM
qQIDAQAB
-----END PUBLIC KEY-----`,Xt4=`-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCAObyzMbY0NzU4
VtBvQ9IrcsRd+Jmud3KAGIcGMtniO1Hr2BoVXi2OMUn3Jzd8zxfXW4AzKI7LPNUu
QRldExJoQZGeaQejiCJpI8FDWnYdXTrXsj0sFH+6Aurzy1lRMY/UmK2QB30rpjyJ
ARqvZl1qNTaS1qjYzXuhwt3Abh7LiL/5xUchmWSHdP0ev2gm25eDt5avFcFEy71T
2eBZ0j+jke4uITBQk9tdwqx6Di7OkZhPdLxFVDSkDeSFIls5cSZzhkh6gXKciKNV
ljSEotrypx2kANdUtAUrUWjf7ai2j61VBlc6YkVqnxfxlYaWqWH4MqUsNgekbZiy
EBZDo8ypAgMBAAECggEAYLKp8n0HygLkWLNnhrEfuvJW0gMbam3b5Gwaz3rjw282
zWPv77NRKY1UGVXyy2Wlthvj5zCr1uruXW5sgTtTw1nHRi4wu4t7X8y9/1wl/OkE
6gsZhLeExzNSGj59AfUdYZcuNJLhO1ynBC7X//RzeBffKwdE2BLGLGw3LNoe0SAa
BDzpfCwJ+hpj9lhWh+mPutiM/TvR5qALH3ijZNHgAvzTVHgOnk6IUqFPxiZBEg2t
VQERK/8sqG0SXTqe4RE3cccPOpVt7OE7JPgFGWl2jYVJK+u9Ke959p+4inAz7QM+
z8rIvsqkzrkl4UjlIT605I3KSymEwNsg/GdEiqa/sQKBgQDrIXqs1Diy38c6Byo6
UPD/AxvF4kcslbTgUoeG0Ll+8krJyotBdxPRn7CsOBk9Klbm8yexh4udcNKo6ml/
2B7cvQ/PRGRuIitsYks80ZWHkkma6/Nb6YMa00euwbFXWS+ohFI8hgqvD9ntng4I
SY0d61FbLdRfbKgvGHMzwqZ2hQKBgQCLmzY+E3BwkLG2wqyfk7VBmWR10YLctipI
mMY7fDvh/8iNTxpT3Rq/3h/paunDyzKxeJHxQatPp2pFfbMslxznDGXXWGPCnZSi
B+MDquq5mBxgZY4LLguzAgI9zCnVomUJ9rhRX755qsWjhTmmSdEh6gw1nd91bvOv
KrZpNvVw1QKBgC3XPBx/z4IIIMZOaUwvRZziFUMSJ4Aou7fUPznobZGzWSNYSqf7
uDBxKreYxErpe0HRfBafb3fFbDykXuce0n2EmpV1JwNVxBOAYly8G6PvwEvk3nA3
6WiMcng+qP13lNQM4B+Onnyc4Yby/pddB5cirpzRJYtpGqz73lHkDCIlAoGAFAJF
7vW4StniLrCOLzzrYKCMjnpdyCZvvwHuf34Z0xVm+CHbQyPQfqlmZ30ETiSkel0u
haaE2CDFkXonoP9zjAXx3sBzY+RT9jktJ0xq4fjUMFi92ApccOabzaGiaVUiKCBt
YHRZh3SbaQliLtwrljHGWDTtXxZs5LE5fbD70pUCgYEA4IUM93mB3u3/3lCayvWQ
C9UB1nCxdihXmw39OmuFgyo+amiykRHF1zrEyHMNGncWrV5FiN4bguW/CpYJhXXH
ZWBXo20q2gVq+QVMabLW4whG1oY3ld8QI7KXEGAQP9hnt5Tlg+2tUC3cFvnNRu9w
tfZYhkUov8lKDAEuVkJZ2jA=
-----END PRIVATE KEY-----`;async function rH($=30){let Y=A$1($),X="RS256",G=await cK0(Xt4,"RS256");return await new on({"tbcloud.me:claim":!0}).setProtectedHeader({alg:"RS256"}).setIssuedAt().setIssuer("tbcloud.me:issuer").setAudience("tbcloud.me:audience").setExpirationTime(`${$}day`).setIssuedAt(new Date).setSubject(Y).sign(G)}async function sk($){try{let X=await dK0(Yt4,"RS256"),{payload:G,protectedHeader:J}=await rK0($,X,{issuer:"tbcloud.me:issuer",audience:"tbcloud.me:audience"});if(dH(J)&&dH(G)){if(G.sub);return!0}else return!1}catch(Y){return!1}}function Gt4(){let $=new Date;return`${$.getFullYear()}-${$.getMonth()+1}-${$.getDate()} ${$.getHours()}:${$.getMinutes()}:${$.getSeconds()}`}function t0(){return{data:null,requestId:hH(),timestamp:Gt4(),code:"0000"}}var Jt4="Payload Too Large",rG1=($)=>{let Y=$.onError||(()=>{let G=new Response(Jt4,{status:413});throw new k0(413,{res:G})}),X=$.maxSize;return async function(J,Q){if(!J.req.raw.body)return Q();let W=J.req.raw.headers.has("transfer-encoding");if(J.req.raw.headers.has("content-length")&&!W)return parseInt(J.req.raw.headers.get("content-length")||"0",10)>X?Y(J):Q();let K=0,H=[],z=J.req.raw.body.getReader();for(;;){let{done:A,value:F}=await z.read();if(A)break;if(K+=F.length,K>X)return Y(J);H.push(F)}let V={body:new ReadableStream({start(A){for(let F of H)A.enqueue(F);A.close()}}),duplex:"half"};return J.req.raw=new Request(J.req.raw,V),Q()}};import Qt4 from"os";var qA=H6("sys_file_upload",{id:y0("id"),name:y0("name"),path:y0("path"),url:y0("url"),type:y0("type"),size:k1("size"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function aG1($){return await o0.select().from(qA).where(R1(qA.id,$))}function sG1($){let Y=r.raw("1 = 1");if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or path like '%${$.searchVal}%')`));return Y}async function oG1($){return await o0.select().from(qA).where(sG1($)).limit(Number($.limit)).offset(Number($.offset)).orderBy(r`${qA.createdAt} desc`)}async function tG1($){return await o0.$count(qA,sG1($))}async function Wr($){let Y=Date.now();$.id=I6(),$.env_id="default",$.createBy="admin",$.createdAt=Y,$.updateBy="admin",$.updatedAt=Y,await o0.insert(qA).values($)}async function eG1($){await o0.delete(qA).where(R1(qA.id,$))}var XJ1=new O4;function Wt4(){let $=Qt4.networkInterfaces();for(let Y of Object.keys($))for(let X of $[Y])if(X.family==="IPv4"&&!X.internal)return X.address;return"No External IP found"}var YJ1=Wt4();XJ1.post("/",rG1({maxSize:1048576000,onError:($)=>{return $.text("overflow :(",413)}}),async($)=>{try{let Y=await $.req.parseBody();if(Y.file instanceof File){let X=V$1(),G=Bun.randomUUIDv7(),J="."+Y.file.name.split(".").pop(),Q=Y.file.type,W=Y.file.name;await Bun.write(Bun.file(`static/upload/${X}/${G}${J}`),Y.file,{createPath:!0});let Z={name:W,path:`static/upload/${X}/${G}${J}`,url:`http://${YJ1}:${Bun.env.PORT||3000}/static/upload/${X}/${G}${J}`,type:Q,size:Y.file.size};await Wr(Z);let K=t0();return K.data={url:`http://${YJ1}:${Bun.env.PORT||3000}/static/upload/${X}/${G}${J}`},$.json(K)}else{let X=t0();return X.data={success:!1},$.json(X)}}catch(Y){return console.log(Y),$.text("faild :(")}return $.text("faild :(1")});var GJ1=XJ1;var JJ1=new O4,Zt4=()=>{return Z5().var.traceId};JJ1.get("/",async($)=>{return $.json({msg:"success",traceId:Zt4()})});var QJ1=JJ1;var er=U6(AH0(),1);class Pv extends $1{constructor($){super(Pv.buildEmbeddedCount($.source,$.filters).queryChunks);this.params=$,this.mapWith(Number),this.session=$.session,this.sql=Pv.buildCount($.source,$.filters)}sql;static[z0]="MySqlCountBuilder";[Symbol.toStringTag]="MySqlCountBuilder";session;static buildEmbeddedCount($,Y){return r`(select count(*) from ${$}${r.raw(" where ").if(Y)}${Y})`}static buildCount($,Y){return r`select count(*) as count from ${$}${r.raw(" where ").if(Y)}${Y}`}then($,Y){return Promise.resolve(this.session.count(this.sql)).then($,Y)}catch($){return this.then(void 0,$)}finally($){return this.then((Y)=>{return $?.(),Y},(Y)=>{throw $?.(),Y})}}class FH0{static[z0]="MySqlForeignKeyBuilder";reference;_onUpdate;_onDelete;constructor($,Y){if(this.reference=()=>{let{name:X,columns:G,foreignColumns:J}=$();return{name:X,columns:G,foreignTable:J[0].table,foreignColumns:J}},Y)this._onUpdate=Y.onUpdate,this._onDelete=Y.onDelete}onUpdate($){return this._onUpdate=$,this}onDelete($){return this._onDelete=$,this}build($){return new R31($,this)}}class R31{constructor($,Y){this.table=$,this.reference=Y.reference,this.onUpdate=Y._onUpdate,this.onDelete=Y._onDelete}static[z0]="MySqlForeignKey";reference;onUpdate;onDelete;getName(){let{name:$,columns:Y,foreignColumns:X}=this.reference(),G=Y.map((W)=>W.name),J=X.map((W)=>W.name),Q=[this.table[A$],...G,X[0].table[A$],...J];return $??`${Q.join("_")}_fk`}}function q31($,Y){return`${$[A$]}_${Y.join("_")}_unique`}class c8 extends fN{static[z0]="MySqlColumnBuilder";foreignKeyConfigs=[];references($,Y={}){return this.foreignKeyConfigs.push({ref:$,actions:Y}),this}unique($){return this.config.isUnique=!0,this.config.uniqueName=$,this}generatedAlwaysAs($,Y){return this.config.generated={as:$,type:"always",mode:Y?.mode??"virtual"},this}buildForeignKeys($,Y){return this.foreignKeyConfigs.map(({ref:X,actions:G})=>{return((J,Q)=>{let W=new FH0(()=>{let Z=J();return{columns:[$],foreignColumns:[Z]}});if(Q.onUpdate)W.onUpdate(Q.onUpdate);if(Q.onDelete)W.onDelete(Q.onDelete);return W.build(Y)})(X,G)})}}class $8 extends m4{constructor($,Y){if(!Y.uniqueName)Y.uniqueName=q31($,[Y.name]);super($,Y);this.table=$}static[z0]="MySqlColumn"}class K7 extends c8{static[z0]="MySqlColumnBuilderWithAutoIncrement";constructor($,Y,X){super($,Y,X);this.config.autoIncrement=!1}autoincrement(){return this.config.autoIncrement=!0,this.config.hasDefault=!0,this}}class U7 extends $8{static[z0]="MySqlColumnWithAutoIncrement";autoIncrement=this.config.autoIncrement}class I31 extends K7{static[z0]="MySqlBigInt53Builder";constructor($,Y=!1){super($,"number","MySqlBigInt53");this.config.unsigned=Y}build($){return new P31($,this.config)}}class P31 extends U7{static[z0]="MySqlBigInt53";getSQLType(){return`bigint${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}}class w31 extends K7{static[z0]="MySqlBigInt64Builder";constructor($,Y=!1){super($,"bigint","MySqlBigInt64");this.config.unsigned=Y}build($){return new _31($,this.config)}}class _31 extends U7{static[z0]="MySqlBigInt64";getSQLType(){return`bigint${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){return BigInt($)}}function wv($,Y){let{name:X,config:G}=S1($,Y);if(G.mode==="number")return new I31(X,G.unsigned);return new w31(X,G.unsigned)}class j31 extends c8{static[z0]="MySqlBinaryBuilder";constructor($,Y){super($,"string","MySqlBinary");this.config.length=Y}build($){return new T31($,this.config)}}class T31 extends $8{static[z0]="MySqlBinary";length=this.config.length;mapFromDriverValue($){if(typeof $==="string")return $;if(Buffer.isBuffer($))return $.toString();let Y=[];for(let X of $)Y.push(X===49?"1":"0");return Y.join("")}getSQLType(){return this.length===void 0?"binary":`binary(${this.length})`}}function _v($,Y={}){let{name:X,config:G}=S1($,Y);return new j31(X,G.length)}class C31 extends c8{static[z0]="MySqlBooleanBuilder";constructor($){super($,"boolean","MySqlBoolean")}build($){return new S31($,this.config)}}class S31 extends $8{static[z0]="MySqlBoolean";getSQLType(){return"boolean"}mapFromDriverValue($){if(typeof $==="boolean")return $;return $===1}}function jv($){return new C31($??"")}class k31 extends c8{static[z0]="MySqlCharBuilder";constructor($,Y){super($,"string","MySqlChar");this.config.length=Y.length,this.config.enum=Y.enum}build($){return new v31($,this.config)}}class v31 extends $8{static[z0]="MySqlChar";length=this.config.length;enumValues=this.config.enum;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}}function Tv($,Y={}){let{name:X,config:G}=S1($,Y);return new k31(X,G)}class x31 extends c8{static[z0]="MySqlCustomColumnBuilder";constructor($,Y,X){super($,"custom","MySqlCustomColumn");this.config.fieldConfig=Y,this.config.customTypeParams=X}build($){return new y31($,this.config)}}class y31 extends $8{static[z0]="MySqlCustomColumn";sqlName;mapTo;mapFrom;constructor($,Y){super($,Y);this.sqlName=Y.customTypeParams.dataType(Y.fieldConfig),this.mapTo=Y.customTypeParams.toDriver,this.mapFrom=Y.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue($){return typeof this.mapFrom==="function"?this.mapFrom($):$}mapToDriverValue($){return typeof this.mapTo==="function"?this.mapTo($):$}}function b31($){return(Y,X)=>{let{name:G,config:J}=S1(Y,X);return new x31(G,J,$)}}class h31 extends c8{static[z0]="MySqlDateBuilder";constructor($){super($,"date","MySqlDate")}build($){return new f31($,this.config)}}class f31 extends $8{static[z0]="MySqlDate";constructor($,Y){super($,Y)}getSQLType(){return"date"}mapFromDriverValue($){return new Date($)}}class g31 extends c8{static[z0]="MySqlDateStringBuilder";constructor($){super($,"string","MySqlDateString")}build($){return new m31($,this.config)}}class m31 extends $8{static[z0]="MySqlDateString";constructor($,Y){super($,Y)}getSQLType(){return"date"}}function Cv($,Y){let{name:X,config:G}=S1($,Y);if(G?.mode==="string")return new g31(X);return new h31(X)}class u31 extends c8{static[z0]="MySqlDateTimeBuilder";constructor($,Y){super($,"date","MySqlDateTime");this.config.fsp=Y?.fsp}build($){return new p31($,this.config)}}class p31 extends $8{static[z0]="MySqlDateTime";fsp;constructor($,Y){super($,Y);this.fsp=Y.fsp}getSQLType(){return`datetime${this.fsp===void 0?"":`(${this.fsp})`}`}mapToDriverValue($){return $.toISOString().replace("T"," ").replace("Z","")}mapFromDriverValue($){return new Date($.replace(" ","T")+"Z")}}class d31 extends c8{static[z0]="MySqlDateTimeStringBuilder";constructor($,Y){super($,"string","MySqlDateTimeString");this.config.fsp=Y?.fsp}build($){return new c31($,this.config)}}class c31 extends $8{static[z0]="MySqlDateTimeString";fsp;constructor($,Y){super($,Y);this.fsp=Y.fsp}getSQLType(){return`datetime${this.fsp===void 0?"":`(${this.fsp})`}`}}function Sv($,Y){let{name:X,config:G}=S1($,Y);if(G?.mode==="string")return new d31(X,G);return new u31(X,G)}class l31 extends K7{static[z0]="MySqlDecimalBuilder";constructor($,Y){super($,"string","MySqlDecimal");this.config.precision=Y?.precision,this.config.scale=Y?.scale,this.config.unsigned=Y?.unsigned}build($){return new i31($,this.config)}}class i31 extends U7{static[z0]="MySqlDecimal";precision=this.config.precision;scale=this.config.scale;unsigned=this.config.unsigned;mapFromDriverValue($){if(typeof $==="string")return $;return String($)}getSQLType(){let $="";if(this.precision!==void 0&&this.scale!==void 0)$+=`decimal(${this.precision},${this.scale})`;else if(this.precision===void 0)$+="decimal";else $+=`decimal(${this.precision})`;return $=$==="decimal(10,0)"||$==="decimal(10)"?"decimal":$,this.unsigned?`${$} unsigned`:$}}class n31 extends K7{static[z0]="MySqlDecimalNumberBuilder";constructor($,Y){super($,"number","MySqlDecimalNumber");this.config.precision=Y?.precision,this.config.scale=Y?.scale,this.config.unsigned=Y?.unsigned}build($){return new r31($,this.config)}}class r31 extends U7{static[z0]="MySqlDecimalNumber";precision=this.config.precision;scale=this.config.scale;unsigned=this.config.unsigned;mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}mapToDriverValue=String;getSQLType(){let $="";if(this.precision!==void 0&&this.scale!==void 0)$+=`decimal(${this.precision},${this.scale})`;else if(this.precision===void 0)$+="decimal";else $+=`decimal(${this.precision})`;return $=$==="decimal(10,0)"||$==="decimal(10)"?"decimal":$,this.unsigned?`${$} unsigned`:$}}class a31 extends K7{static[z0]="MySqlDecimalBigIntBuilder";constructor($,Y){super($,"bigint","MySqlDecimalBigInt");this.config.precision=Y?.precision,this.config.scale=Y?.scale,this.config.unsigned=Y?.unsigned}build($){return new s31($,this.config)}}class s31 extends U7{static[z0]="MySqlDecimalBigInt";precision=this.config.precision;scale=this.config.scale;unsigned=this.config.unsigned;mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){let $="";if(this.precision!==void 0&&this.scale!==void 0)$+=`decimal(${this.precision},${this.scale})`;else if(this.precision===void 0)$+="decimal";else $+=`decimal(${this.precision})`;return $=$==="decimal(10,0)"||$==="decimal(10)"?"decimal":$,this.unsigned?`${$} unsigned`:$}}function kv($,Y={}){let{name:X,config:G}=S1($,Y),J=G?.mode;return J==="number"?new n31(X,G):J==="bigint"?new a31(X,G):new l31(X,G)}class o31 extends K7{static[z0]="MySqlDoubleBuilder";constructor($,Y){super($,"number","MySqlDouble");this.config.precision=Y?.precision,this.config.scale=Y?.scale,this.config.unsigned=Y?.unsigned}build($){return new t31($,this.config)}}class t31 extends U7{static[z0]="MySqlDouble";precision=this.config.precision;scale=this.config.scale;unsigned=this.config.unsigned;getSQLType(){let $="";if(this.precision!==void 0&&this.scale!==void 0)$+=`double(${this.precision},${this.scale})`;else if(this.precision===void 0)$+="double";else $+=`double(${this.precision})`;return this.unsigned?`${$} unsigned`:$}}function vv($,Y){let{name:X,config:G}=S1($,Y);return new o31(X,G)}class e31 extends c8{static[z0]="MySqlEnumColumnBuilder";constructor($,Y){super($,"string","MySqlEnumColumn");this.config.enumValues=Y}build($){return new $U1($,this.config)}}class $U1 extends $8{static[z0]="MySqlEnumColumn";enumValues=this.config.enumValues;getSQLType(){return`enum(${this.enumValues.map(($)=>`'${$}'`).join(",")})`}}class YU1 extends c8{static[z0]="MySqlEnumObjectColumnBuilder";constructor($,Y){super($,"string","MySqlEnumObjectColumn");this.config.enumValues=Y}build($){return new XU1($,this.config)}}class XU1 extends $8{static[z0]="MySqlEnumObjectColumn";enumValues=this.config.enumValues;getSQLType(){return`enum(${this.enumValues.map(($)=>`'${$}'`).join(",")})`}}function GU1($,Y){if(typeof $==="string"&&Array.isArray(Y)||Array.isArray($)){let X=typeof $==="string"&&$.length>0?$:"",G=(typeof $==="string"?Y:$)??[];if(G.length===0)throw Error(`You have an empty array for "${X}" enum values`);return new e31(X,G)}if(typeof $==="string"&&typeof Y==="object"||typeof $==="object"){let X=typeof $==="object"?"":$,G=typeof $==="object"?Object.values($):typeof Y==="object"?Object.values(Y):[];if(G.length===0)throw Error(`You have an empty array for "${X}" enum values`);return new YU1(X,G)}}class JU1 extends K7{static[z0]="MySqlFloatBuilder";constructor($,Y){super($,"number","MySqlFloat");this.config.precision=Y?.precision,this.config.scale=Y?.scale,this.config.unsigned=Y?.unsigned}build($){return new QU1($,this.config)}}class QU1 extends U7{static[z0]="MySqlFloat";precision=this.config.precision;scale=this.config.scale;unsigned=this.config.unsigned;getSQLType(){let $="";if(this.precision!==void 0&&this.scale!==void 0)$+=`float(${this.precision},${this.scale})`;else if(this.precision===void 0)$+="float";else $+=`float(${this.precision})`;return this.unsigned?`${$} unsigned`:$}}function xv($,Y){let{name:X,config:G}=S1($,Y);return new JU1(X,G)}class WU1 extends K7{static[z0]="MySqlIntBuilder";constructor($,Y){super($,"number","MySqlInt");this.config.unsigned=Y?Y.unsigned:!1}build($){return new ZU1($,this.config)}}class ZU1 extends U7{static[z0]="MySqlInt";getSQLType(){return`int${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){if(typeof $==="string")return Number($);return $}}function yv($,Y){let{name:X,config:G}=S1($,Y);return new WU1(X,G)}class KU1 extends c8{static[z0]="MySqlJsonBuilder";constructor($){super($,"json","MySqlJson")}build($){return new UU1($,this.config)}}class UU1 extends $8{static[z0]="MySqlJson";getSQLType(){return"json"}mapToDriverValue($){return JSON.stringify($)}}function bv($){return new KU1($??"")}class HU1 extends K7{static[z0]="MySqlMediumIntBuilder";constructor($,Y){super($,"number","MySqlMediumInt");this.config.unsigned=Y?Y.unsigned:!1}build($){return new zU1($,this.config)}}class zU1 extends U7{static[z0]="MySqlMediumInt";getSQLType(){return`mediumint${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){if(typeof $==="string")return Number($);return $}}function hv($,Y){let{name:X,config:G}=S1($,Y);return new HU1(X,G)}class VU1 extends K7{static[z0]="MySqlRealBuilder";constructor($,Y){super($,"number","MySqlReal");this.config.precision=Y?.precision,this.config.scale=Y?.scale}build($){return new AU1($,this.config)}}class AU1 extends U7{static[z0]="MySqlReal";precision=this.config.precision;scale=this.config.scale;getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`real(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"real";else return`real(${this.precision})`}}function fv($,Y={}){let{name:X,config:G}=S1($,Y);return new VU1(X,G)}class FU1 extends K7{static[z0]="MySqlSerialBuilder";constructor($){super($,"number","MySqlSerial");this.config.hasDefault=!0,this.config.autoIncrement=!0}build($){return new DU1($,this.config)}}class DU1 extends U7{static[z0]="MySqlSerial";getSQLType(){return"serial"}mapFromDriverValue($){if(typeof $==="string")return Number($);return $}}function gv($){return new FU1($??"")}class NU1 extends K7{static[z0]="MySqlSmallIntBuilder";constructor($,Y){super($,"number","MySqlSmallInt");this.config.unsigned=Y?Y.unsigned:!1}build($){return new LU1($,this.config)}}class LU1 extends U7{static[z0]="MySqlSmallInt";getSQLType(){return`smallint${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){if(typeof $==="string")return Number($);return $}}function mv($,Y){let{name:X,config:G}=S1($,Y);return new NU1(X,G)}class uv extends c8{static[z0]="MySqlTextBuilder";constructor($,Y,X){super($,"string","MySqlText");this.config.textType=Y,this.config.enumValues=X.enum}build($){return new BU1($,this.config)}}class BU1 extends $8{static[z0]="MySqlText";textType=this.config.textType;enumValues=this.config.enumValues;getSQLType(){return this.textType}}function pv($,Y={}){let{name:X,config:G}=S1($,Y);return new uv(X,"text",G)}function OU1($,Y={}){let{name:X,config:G}=S1($,Y);return new uv(X,"tinytext",G)}function EU1($,Y={}){let{name:X,config:G}=S1($,Y);return new uv(X,"mediumtext",G)}function MU1($,Y={}){let{name:X,config:G}=S1($,Y);return new uv(X,"longtext",G)}class RU1 extends c8{static[z0]="MySqlTimeBuilder";constructor($,Y){super($,"string","MySqlTime");this.config.fsp=Y?.fsp}build($){return new qU1($,this.config)}}class qU1 extends $8{static[z0]="MySqlTime";fsp=this.config.fsp;getSQLType(){return`time${this.fsp===void 0?"":`(${this.fsp})`}`}}function dv($,Y){let{name:X,config:G}=S1($,Y);return new RU1(X,G)}class nr extends c8{static[z0]="MySqlDateColumnBuilder";defaultNow(){return this.default(r`(now())`)}onUpdateNow(){return this.config.hasOnUpdateNow=!0,this.config.hasDefault=!0,this}}class rr extends $8{static[z0]="MySqlDateColumn";hasOnUpdateNow=this.config.hasOnUpdateNow}class IU1 extends nr{static[z0]="MySqlTimestampBuilder";constructor($,Y){super($,"date","MySqlTimestamp");this.config.fsp=Y?.fsp}build($){return new PU1($,this.config)}}class PU1 extends rr{static[z0]="MySqlTimestamp";fsp=this.config.fsp;getSQLType(){return`timestamp${this.fsp===void 0?"":`(${this.fsp})`}`}mapFromDriverValue($){return new Date($+"+0000")}mapToDriverValue($){return $.toISOString().slice(0,-1).replace("T"," ")}}class wU1 extends nr{static[z0]="MySqlTimestampStringBuilder";constructor($,Y){super($,"string","MySqlTimestampString");this.config.fsp=Y?.fsp}build($){return new _U1($,this.config)}}class _U1 extends rr{static[z0]="MySqlTimestampString";fsp=this.config.fsp;getSQLType(){return`timestamp${this.fsp===void 0?"":`(${this.fsp})`}`}}function cv($,Y={}){let{name:X,config:G}=S1($,Y);if(G?.mode==="string")return new wU1(X,G);return new IU1(X,G)}class jU1 extends K7{static[z0]="MySqlTinyIntBuilder";constructor($,Y){super($,"number","MySqlTinyInt");this.config.unsigned=Y?Y.unsigned:!1}build($){return new TU1($,this.config)}}class TU1 extends U7{static[z0]="MySqlTinyInt";getSQLType(){return`tinyint${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){if(typeof $==="string")return Number($);return $}}function lv($,Y){let{name:X,config:G}=S1($,Y);return new jU1(X,G)}class CU1 extends c8{static[z0]="MySqlVarBinaryBuilder";constructor($,Y){super($,"string","MySqlVarBinary");this.config.length=Y?.length}build($){return new SU1($,this.config)}}class SU1 extends $8{static[z0]="MySqlVarBinary";length=this.config.length;mapFromDriverValue($){if(typeof $==="string")return $;if(Buffer.isBuffer($))return $.toString();let Y=[];for(let X of $)Y.push(X===49?"1":"0");return Y.join("")}getSQLType(){return this.length===void 0?"varbinary":`varbinary(${this.length})`}}function iv($,Y){let{name:X,config:G}=S1($,Y);return new CU1(X,G)}class kU1 extends c8{static[z0]="MySqlVarCharBuilder";constructor($,Y){super($,"string","MySqlVarChar");this.config.length=Y.length,this.config.enum=Y.enum}build($){return new vU1($,this.config)}}class vU1 extends $8{static[z0]="MySqlVarChar";length=this.config.length;enumValues=this.config.enum;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}}function nv($,Y){let{name:X,config:G}=S1($,Y);return new kU1(X,G)}class xU1 extends c8{static[z0]="MySqlYearBuilder";constructor($){super($,"number","MySqlYear")}build($){return new yU1($,this.config)}}class yU1 extends $8{static[z0]="MySqlYear";getSQLType(){return"year"}}function rv($){return new xU1($??"")}function bU1(){return{bigint:wv,binary:_v,boolean:jv,char:Tv,customType:b31,date:Cv,datetime:Sv,decimal:kv,double:vv,mysqlEnum:GU1,float:xv,int:yv,json:bv,mediumint:hv,real:fv,serial:gv,smallint:mv,text:pv,time:dv,timestamp:cv,tinyint:lv,varbinary:iv,varchar:nv,year:rv,longtext:MU1,mediumtext:EU1,tinytext:OU1}}var DH0=Symbol.for("drizzle:MySqlInlineForeignKeys");class wG extends r0{static[z0]="MySqlTable";static Symbol=Object.assign({},r0.Symbol,{InlineForeignKeys:DH0});[r0.Symbol.Columns];[DH0]=[];[r0.Symbol.ExtraConfigBuilder]=void 0}function jh6($,Y,X,G,J=$){let Q=new wG($,G,J),W=typeof Y==="function"?Y(bU1()):Y,Z=Object.fromEntries(Object.entries(W).map(([H,z])=>{let V=z;V.setName(H);let A=V.build(Q);return Q[DH0].push(...V.buildForeignKeys(A,Q)),[H,A]})),K=Object.assign(Q,Z);if(K[r0.Symbol.Columns]=Z,K[r0.Symbol.ExtraConfigColumns]=Z,X)K[wG.Symbol.ExtraConfigBuilder]=X;return K}var $z=($,Y,X)=>{return jh6($,Y,X,void 0,$)};function f2($){if(q0($,wG))return[`${$[r0.Symbol.BaseName]}`];if(q0($,W6))return $._.usedTables??[];if(q0($,$1))return $.usedTables??[];return[]}function hL($){return $.map((Y)=>{return typeof Y==="object"?Y.config.name:Y})}function fL($){return Array.isArray($)?$:[$]}class ar extends r6{constructor($,Y,X,G){super();this.table=$,this.session=Y,this.dialect=X,this.config={table:$,withList:G}}static[z0]="MySqlDelete";config;where($){return this.config.where=$,this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.table[r0.Symbol.Columns],new I4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];this.config.orderBy=X}else{let Y=$;this.config.orderBy=Y}return this}limit($){return this.config.limit=$,this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}prepare(){return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,void 0,void 0,void 0,{type:"delete",tables:f2(this.config.table)})}execute=($)=>{return this.prepare().execute($)};createIterator=()=>{let $=this;return async function*(Y){yield*$.prepare().iterator(Y)}};iterator=this.createIterator();$dynamic(){return this}}class av extends W7{static[z0]="MySqlViewBase"}class gL{static[z0]="MySqlDialect";casing;constructor($){this.casing=new rN($?.casing)}async migrate($,Y,X){let G=X.migrationsTable??"__drizzle_migrations",J=r`
			create table if not exists ${r.identifier(G)} (
				id serial primary key,
				hash text not null,
				created_at bigint
			)
		`;await Y.execute(J);let W=(await Y.all(r`select id, hash, created_at from ${r.identifier(G)} order by created_at desc limit 1`))[0];await Y.transaction(async(Z)=>{for(let K of $)if(!W||Number(W.created_at)<K.folderMillis){for(let H of K.sql)await Z.execute(r.raw(H));await Z.execute(r`insert into ${r.identifier(G)} (\`hash\`, \`created_at\`) values(${K.hash}, ${K.folderMillis})`)}})}escapeName($){return`\`${$.replace(/`/g,"``")}\``}escapeParam($){return"?"}escapeString($){return`'${$.replace(/'/g,"''")}'`}buildWithCTE($){if(!$?.length)return;let Y=[r`with `];for(let[X,G]of $.entries())if(Y.push(r`${r.identifier(G._.alias)} as (${G._.sql})`),X<$.length-1)Y.push(r`, `);return Y.push(r` `),r.join(Y)}buildDeleteQuery({table:$,where:Y,returning:X,withList:G,limit:J,orderBy:Q}){let W=this.buildWithCTE(G),Z=X?r` returning ${this.buildSelection(X,{isSingleTable:!0})}`:void 0,K=Y?r` where ${Y}`:void 0,H=this.buildOrderBy(Q),z=this.buildLimit(J);return r`${W}delete from ${$}${K}${H}${z}${Z}`}buildUpdateSet($,Y){let X=$[r0.Symbol.Columns],G=Object.keys(X).filter((Q)=>Y[Q]!==void 0||X[Q]?.onUpdateFn!==void 0),J=G.length;return r.join(G.flatMap((Q,W)=>{let Z=X[Q],K=Z.onUpdateFn?.(),H=Y[Q]??(q0(K,$1)?K:r.param(K,Z)),z=r`${r.identifier(this.casing.getColumnCasing(Z))} = ${H}`;if(W<J-1)return[z,r.raw(", ")];return[z]}))}buildUpdateQuery({table:$,set:Y,where:X,returning:G,withList:J,limit:Q,orderBy:W}){let Z=this.buildWithCTE(J),K=this.buildUpdateSet($,Y),H=G?r` returning ${this.buildSelection(G,{isSingleTable:!0})}`:void 0,z=X?r` where ${X}`:void 0,V=this.buildOrderBy(W),A=this.buildLimit(Q);return r`${Z}update ${$} set ${K}${z}${V}${A}${H}`}buildSelection($,{isSingleTable:Y=!1}={}){let X=$.length,G=$.flatMap(({field:J},Q)=>{let W=[];if(q0(J,$1.Aliased)&&J.isSelectionField)W.push(r.identifier(J.fieldAlias));else if(q0(J,$1.Aliased)||q0(J,$1)){let Z=q0(J,$1.Aliased)?J.sql:J;if(Y)W.push(new $1(Z.queryChunks.map((K)=>{if(q0(K,$8))return r.identifier(this.casing.getColumnCasing(K));return K})));else W.push(Z);if(q0(J,$1.Aliased))W.push(r` as ${r.identifier(J.fieldAlias)}`)}else if(q0(J,m4))if(Y)W.push(r.identifier(this.casing.getColumnCasing(J)));else W.push(J);else if(q0(J,W6)){let Z=Object.entries(J._.selectedFields);if(Z.length===1){let K=Z[0][1],H=q0(K,$1)?K.decoder:q0(K,m4)?{mapFromDriverValue:(z)=>K.mapFromDriverValue(z)}:K.sql.decoder;if(H)J._.sql.decoder=H}W.push(J)}if(Q<X-1)W.push(r`, `);return W});return r.join(G)}buildLimit($){return typeof $==="object"||typeof $==="number"&&$>=0?r` limit ${$}`:void 0}buildOrderBy($){return $&&$.length>0?r` order by ${r.join($,r`, `)}`:void 0}buildIndex({indexes:$,indexFor:Y}){return $&&$.length>0?r` ${r.raw(Y)} INDEX (${r.raw($.join(", "))})`:void 0}buildSelectQuery({withList:$,fields:Y,fieldsFlat:X,where:G,having:J,table:Q,joins:W,orderBy:Z,groupBy:K,limit:H,offset:z,lockingClause:V,distinct:A,setOperators:F,useIndex:N,forceIndex:D,ignoreIndex:L}){let B=X??y5(Y);for(let b of B)if(q0(b.field,m4)&&Q7(b.field.table)!==(q0(Q,W6)?Q._.alias:q0(Q,av)?Q[y6].name:q0(Q,$1)?void 0:Q7(Q))&&!((g)=>W?.some(({alias:p})=>p===(g[r0.Symbol.IsAlias]?Q7(g):g[r0.Symbol.BaseName])))(b.field.table)){let g=Q7(b.field.table);throw Error(`Your "${b.path.join("->")}" field references a column "${g}"."${b.field.name}", but the table "${g}" is not part of the query! Did you forget to join it?`)}let O=!W||W.length===0,E=this.buildWithCTE($),M=A?r` distinct`:void 0,R=this.buildSelection(B,{isSingleTable:O}),q=(()=>{if(q0(Q,r0)&&Q[r0.Symbol.IsAlias])return r`${r`${r.identifier(Q[r0.Symbol.Schema]??"")}.`.if(Q[r0.Symbol.Schema])}${r.identifier(Q[r0.Symbol.OriginalName])} ${r.identifier(Q[r0.Symbol.Name])}`;return Q})(),w=[];if(W)for(let[b,g]of W.entries()){if(b===0)w.push(r` `);let p=g.table,h=g.lateral?r` lateral`:void 0,n=g.on?r` on ${g.on}`:void 0;if(q0(p,wG)){let t=p[wG.Symbol.Name],s=p[wG.Symbol.Schema],Z0=p[wG.Symbol.OriginalName],X0=t===Z0?void 0:g.alias,a=this.buildIndex({indexes:g.useIndex,indexFor:"USE"}),Q0=this.buildIndex({indexes:g.forceIndex,indexFor:"FORCE"}),e=this.buildIndex({indexes:g.ignoreIndex,indexFor:"IGNORE"});w.push(r`${r.raw(g.joinType)} join${h} ${s?r`${r.identifier(s)}.`:void 0}${r.identifier(Z0)}${a}${Q0}${e}${X0&&r` ${r.identifier(X0)}`}${n}`)}else if(q0(p,W7)){let t=p[y6].name,s=p[y6].schema,Z0=p[y6].originalName,X0=t===Z0?void 0:g.alias;w.push(r`${r.raw(g.joinType)} join${h} ${s?r`${r.identifier(s)}.`:void 0}${r.identifier(Z0)}${X0&&r` ${r.identifier(X0)}`}${n}`)}else w.push(r`${r.raw(g.joinType)} join${h} ${p}${n}`);if(b<W.length-1)w.push(r` `)}let I=r.join(w),P=G?r` where ${G}`:void 0,_=J?r` having ${J}`:void 0,C=this.buildOrderBy(Z),k=K&&K.length>0?r` group by ${r.join(K,r`, `)}`:void 0,S=this.buildLimit(H),T=z?r` offset ${z}`:void 0,v=this.buildIndex({indexes:N,indexFor:"USE"}),x=this.buildIndex({indexes:D,indexFor:"FORCE"}),y=this.buildIndex({indexes:L,indexFor:"IGNORE"}),d;if(V){let{config:b,strength:g}=V;if(d=r` for ${r.raw(g)}`,b.noWait)d.append(r` nowait`);else if(b.skipLocked)d.append(r` skip locked`)}let u=r`${E}select${M} ${R} from ${q}${v}${x}${y}${I}${P}${k}${_}${C}${S}${T}${d}`;if(F.length>0)return this.buildSetOperations(u,F);return u}buildSetOperations($,Y){let[X,...G]=Y;if(!X)throw Error("Cannot pass undefined values to any set operator");if(G.length===0)return this.buildSetOperationQuery({leftSelect:$,setOperator:X});return this.buildSetOperations(this.buildSetOperationQuery({leftSelect:$,setOperator:X}),G)}buildSetOperationQuery({leftSelect:$,setOperator:{type:Y,isAll:X,rightSelect:G,limit:J,orderBy:Q,offset:W}}){let Z=r`(${$.getSQL()}) `,K=r`(${G.getSQL()})`,H;if(Q&&Q.length>0){let F=[];for(let N of Q)if(q0(N,$8))F.push(r.identifier(this.casing.getColumnCasing(N)));else if(q0(N,$1)){for(let D=0;D<N.queryChunks.length;D++){let L=N.queryChunks[D];if(q0(L,$8))N.queryChunks[D]=r.identifier(this.casing.getColumnCasing(L))}F.push(r`${N}`)}else F.push(r`${N}`);H=r` order by ${r.join(F,r`, `)} `}let z=typeof J==="object"||typeof J==="number"&&J>=0?r` limit ${J}`:void 0,V=r.raw(`${Y} ${X?"all ":""}`),A=W?r` offset ${W}`:void 0;return r`${Z}${V}${K}${H}${z}${A}`}buildInsertQuery({table:$,values:Y,ignore:X,onConflict:G,select:J}){let Q=[],W=$[r0.Symbol.Columns],Z=Object.entries(W).filter(([F,N])=>!N.shouldDisableInsert()),K=Z.map(([,F])=>r.identifier(this.casing.getColumnCasing(F))),H=[];if(J){let F=Y;if(q0(F,$1))Q.push(F);else Q.push(F.getSQL())}else{let F=Y;Q.push(r.raw("values "));for(let[N,D]of F.entries()){let L={},B=[];for(let[O,E]of Z){let M=D[O];if(M===void 0||q0(M,c7)&&M.value===void 0)if(E.defaultFn!==void 0){let R=E.defaultFn();L[O]=R;let q=q0(R,$1)?R:r.param(R,E);B.push(q)}else if(!E.default&&E.onUpdateFn!==void 0){let R=E.onUpdateFn(),q=q0(R,$1)?R:r.param(R,E);B.push(q)}else B.push(r`default`);else{if(E.defaultFn&&q0(M,c7))L[O]=M.value;B.push(M)}}if(H.push(L),Q.push(B),N<F.length-1)Q.push(r`, `)}}let z=r.join(Q),V=X?r` ignore`:void 0,A=G?r` on duplicate key ${G}`:void 0;return{sql:r`insert${V} into ${$} ${K} ${z}${A}`,generatedIds:H}}sqlToQuery($,Y){return $.toQuery({casing:this.casing,escapeName:this.escapeName,escapeParam:this.escapeParam,escapeString:this.escapeString,invokeSource:Y})}buildRelationalQuery({fullSchema:$,schema:Y,tableNamesMap:X,table:G,tableConfig:J,queryConfig:Q,tableAlias:W,nestedQueryRelation:Z,joinOn:K}){let H=[],z,V,A,F,N=[];if(Q===!0)H=Object.entries(J.columns).map(([B,O])=>({dbKey:O.name,tsKey:B,field:M8(O,W),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let L=Object.fromEntries(Object.entries(J.columns).map(([q,w])=>[q,M8(w,W)]));if(Q.where){let q=typeof Q.where==="function"?Q.where(L,cN()):Q.where;F=q&&aQ(q,W)}let B=[],O=[];if(Q.columns){let q=!1;for(let[w,I]of Object.entries(Q.columns)){if(I===void 0)continue;if(w in J.columns){if(!q&&I===!0)q=!0;O.push(w)}}if(O.length>0)O=q?O.filter((w)=>Q.columns?.[w]===!0):Object.keys(J.columns).filter((w)=>!O.includes(w))}else O=Object.keys(J.columns);for(let q of O){let w=J.columns[q];B.push({tsKey:q,value:w})}let E=[];if(Q.with)E=Object.entries(Q.with).filter((q)=>!!q[1]).map(([q,w])=>({tsKey:q,queryConfig:w,relation:J.relations[q]}));let M;if(Q.extras){M=typeof Q.extras==="function"?Q.extras(L,{sql:r}):Q.extras;for(let[q,w]of Object.entries(M))B.push({tsKey:q,value:oV(w,W)})}for(let{tsKey:q,value:w}of B)H.push({dbKey:q0(w,$1.Aliased)?w.fieldAlias:J.columns[q].name,tsKey:q,field:q0(w,m4)?M8(w,W):w,relationTableTsKey:void 0,isJson:!1,selection:[]});let R=typeof Q.orderBy==="function"?Q.orderBy(L,lN()):Q.orderBy??[];if(!Array.isArray(R))R=[R];A=R.map((q)=>{if(q0(q,m4))return M8(q,W);return aQ(q,W)}),z=Q.limit,V=Q.offset;for(let{tsKey:q,queryConfig:w,relation:I}of E){let P=iN(Y,X,I),_=JZ(I.referencedTable),C=X[_],k=`${W}_${q}`,S=l7(...P.fields.map((x,y)=>R1(M8(P.references[y],k),M8(x,W)))),T=this.buildRelationalQuery({fullSchema:$,schema:Y,tableNamesMap:X,table:$[C],tableConfig:Y[C],queryConfig:q0(I,tQ)?w===!0?{limit:1}:{...w,limit:1}:w,tableAlias:k,joinOn:S,nestedQueryRelation:I}),v=r`${r.identifier(k)}.${r.identifier("data")}`.as(q);N.push({on:r`true`,table:new W6(T.sql,{},k),alias:k,joinType:"left",lateral:!0}),H.push({dbKey:q,tsKey:q,field:v,relationTableTsKey:C,isJson:!0,selection:T.selection})}}if(H.length===0)throw new sQ({message:`No fields selected for table "${J.tsName}" ("${W}")`});let D;if(F=l7(K,F),Z){let L=r`json_array(${r.join(H.map(({field:E,tsKey:M,isJson:R})=>R?r`${r.identifier(`${W}_${M}`)}.${r.identifier("data")}`:q0(E,$1.Aliased)?E.sql:E),r`, `)})`;if(q0(Z,P2))L=r`coalesce(json_arrayagg(${L}), json_array())`;let B=[{dbKey:"data",tsKey:"data",field:L.as("data"),isJson:!0,relationTableTsKey:J.tsName,selection:H}];if(z!==void 0||V!==void 0||(A?.length??0)>0)D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:[{path:[],field:r.raw("*")},...(A?.length??0)>0?[{path:[],field:r`row_number() over (order by ${r.join(A,r`, `)})`}]:[]],where:F,limit:z,offset:V,setOperators:[]}),F=void 0,z=void 0,V=void 0,A=void 0;else D=BG(G,W);D=this.buildSelectQuery({table:q0(D,wG)?D:new W6(D,{},W),fields:{},fieldsFlat:B.map(({field:E})=>({path:[],field:q0(E,m4)?M8(E,W):E})),joins:N,where:F,limit:z,offset:V,orderBy:A,setOperators:[]})}else D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:H.map(({field:L})=>({path:[],field:q0(L,m4)?M8(L,W):L})),joins:N,where:F,limit:z,offset:V,orderBy:A,setOperators:[]});return{tableTsKey:J.tsName,sql:D,selection:H}}buildRelationalQueryWithoutLateralSubqueries({fullSchema:$,schema:Y,tableNamesMap:X,table:G,tableConfig:J,queryConfig:Q,tableAlias:W,nestedQueryRelation:Z,joinOn:K}){let H=[],z,V,A=[],F;if(Q===!0)H=Object.entries(J.columns).map(([L,B])=>({dbKey:B.name,tsKey:L,field:M8(B,W),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let D=Object.fromEntries(Object.entries(J.columns).map(([R,q])=>[R,M8(q,W)]));if(Q.where){let R=typeof Q.where==="function"?Q.where(D,cN()):Q.where;F=R&&aQ(R,W)}let L=[],B=[];if(Q.columns){let R=!1;for(let[q,w]of Object.entries(Q.columns)){if(w===void 0)continue;if(q in J.columns){if(!R&&w===!0)R=!0;B.push(q)}}if(B.length>0)B=R?B.filter((q)=>Q.columns?.[q]===!0):Object.keys(J.columns).filter((q)=>!B.includes(q))}else B=Object.keys(J.columns);for(let R of B){let q=J.columns[R];L.push({tsKey:R,value:q})}let O=[];if(Q.with)O=Object.entries(Q.with).filter((R)=>!!R[1]).map(([R,q])=>({tsKey:R,queryConfig:q,relation:J.relations[R]}));let E;if(Q.extras){E=typeof Q.extras==="function"?Q.extras(D,{sql:r}):Q.extras;for(let[R,q]of Object.entries(E))L.push({tsKey:R,value:oV(q,W)})}for(let{tsKey:R,value:q}of L)H.push({dbKey:q0(q,$1.Aliased)?q.fieldAlias:J.columns[R].name,tsKey:R,field:q0(q,m4)?M8(q,W):q,relationTableTsKey:void 0,isJson:!1,selection:[]});let M=typeof Q.orderBy==="function"?Q.orderBy(D,lN()):Q.orderBy??[];if(!Array.isArray(M))M=[M];A=M.map((R)=>{if(q0(R,m4))return M8(R,W);return aQ(R,W)}),z=Q.limit,V=Q.offset;for(let{tsKey:R,queryConfig:q,relation:w}of O){let I=iN(Y,X,w),P=JZ(w.referencedTable),_=X[P],C=`${W}_${R}`,k=l7(...I.fields.map((x,y)=>R1(M8(I.references[y],C),M8(x,W)))),S=this.buildRelationalQueryWithoutLateralSubqueries({fullSchema:$,schema:Y,tableNamesMap:X,table:$[_],tableConfig:Y[_],queryConfig:q0(w,tQ)?q===!0?{limit:1}:{...q,limit:1}:q,tableAlias:C,joinOn:k,nestedQueryRelation:w}),T=r`(${S.sql})`;if(q0(w,P2))T=r`coalesce(${T}, json_array())`;let v=T.as(R);H.push({dbKey:R,tsKey:R,field:v,relationTableTsKey:_,isJson:!0,selection:S.selection})}}if(H.length===0)throw new sQ({message:`No fields selected for table "${J.tsName}" ("${W}"). You need to have at least one item in "columns", "with" or "extras". If you need to select all columns, omit the "columns" key or set it to undefined.`});let N;if(F=l7(K,F),Z){let D=r`json_array(${r.join(H.map(({field:O})=>q0(O,$8)?r.identifier(this.casing.getColumnCasing(O)):q0(O,$1.Aliased)?O.sql:O),r`, `)})`;if(q0(Z,P2))D=r`json_arrayagg(${D})`;let L=[{dbKey:"data",tsKey:"data",field:D,isJson:!0,relationTableTsKey:J.tsName,selection:H}];if(z!==void 0||V!==void 0||A.length>0)N=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:[{path:[],field:r.raw("*")},...A.length>0?[{path:[],field:r`row_number() over (order by ${r.join(A,r`, `)})`}]:[]],where:F,limit:z,offset:V,setOperators:[]}),F=void 0,z=void 0,V=void 0,A=void 0;else N=BG(G,W);N=this.buildSelectQuery({table:q0(N,wG)?N:new W6(N,{},W),fields:{},fieldsFlat:L.map(({field:O})=>({path:[],field:q0(O,m4)?M8(O,W):O})),where:F,limit:z,offset:V,orderBy:A,setOperators:[]})}else N=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:H.map(({field:D})=>({path:[],field:q0(D,m4)?M8(D,W):D})),where:F,limit:z,offset:V,orderBy:A,setOperators:[]});return{tableTsKey:J.tsName,sql:N,selection:H}}}class g2{static[z0]="MySqlSelectBuilder";fields;session;dialect;withList=[];distinct;constructor($){if(this.fields=$.fields,this.session=$.session,this.dialect=$.dialect,$.withList)this.withList=$.withList;this.distinct=$.distinct}from($,Y){let X=!!this.fields,G;if(this.fields)G=this.fields;else if(q0($,W6))G=Object.fromEntries(Object.keys($._.selectedFields).map((Z)=>[Z,$[Z]]));else if(q0($,av))G=$[y6].selectedFields;else if(q0($,$1))G={};else G=SH($);let J=[],Q=[],W=[];if(q0($,wG)&&Y&&typeof Y!=="string"){if(Y.useIndex)J=hL(fL(Y.useIndex));if(Y.forceIndex)Q=hL(fL(Y.forceIndex));if(Y.ignoreIndex)W=hL(fL(Y.ignoreIndex))}return new NH0({table:$,fields:G,isPartialSelect:X,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct,useIndex:J,forceIndex:Q,ignoreIndex:W})}}class hU1 extends sN{static[z0]="MySqlSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:$,fields:Y,isPartialSelect:X,session:G,dialect:J,withList:Q,distinct:W,useIndex:Z,forceIndex:K,ignoreIndex:H}){super();this.config={withList:Q,table:$,fields:{...Y},distinct:W,setOperators:[],useIndex:Z,forceIndex:K,ignoreIndex:H},this.isPartialSelect=X,this.session=G,this.dialect=J,this._={selectedFields:Y,config:this.config},this.tableName=GX($),this.joinsNotNullableMap=typeof this.tableName==="string"?{[this.tableName]:!0}:{};for(let z of f2($))this.usedTables.add(z)}getUsedTables(){return[...this.usedTables]}createJoin($,Y){return(X,G,J)=>{let Q=$==="cross",W=Q?void 0:G,Z=Q?G:J,K=this.tableName,H=GX(X);for(let F of f2(X))this.usedTables.add(F);if(typeof H==="string"&&this.config.joins?.some((F)=>F.alias===H))throw Error(`Alias "${H}" is already used in this query`);if(!this.isPartialSelect){if(Object.keys(this.joinsNotNullableMap).length===1&&typeof K==="string")this.config.fields={[K]:this.config.fields};if(typeof H==="string"&&!q0(X,$1)){let F=q0(X,W6)?X._.selectedFields:q0(X,W7)?X[y6].selectedFields:X[r0.Symbol.Columns];this.config.fields[H]=F}}if(typeof W==="function")W=W(new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));if(!this.config.joins)this.config.joins=[];let z=[],V=[],A=[];if(q0(X,wG)&&Z&&typeof Z!=="string"){if(Z.useIndex)z=hL(fL(Z.useIndex));if(Z.forceIndex)V=hL(fL(Z.forceIndex));if(Z.ignoreIndex)A=hL(fL(Z.ignoreIndex))}if(this.config.joins.push({on:W,table:X,joinType:$,alias:H,useIndex:z,forceIndex:V,ignoreIndex:A,lateral:Y}),typeof H==="string")switch($){case"left":{this.joinsNotNullableMap[H]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([F])=>[F,!1])),this.joinsNotNullableMap[H]=!0;break}case"cross":case"inner":{this.joinsNotNullableMap[H]=!0;break}}return this}}leftJoin=this.createJoin("left",!1);leftJoinLateral=this.createJoin("left",!0);rightJoin=this.createJoin("right",!1);innerJoin=this.createJoin("inner",!1);innerJoinLateral=this.createJoin("inner",!0);crossJoin=this.createJoin("cross",!1);crossJoinLateral=this.createJoin("cross",!0);createSetOperator($,Y){return(X)=>{let G=typeof X==="function"?X(Th6()):X;if(!OG(this.getSelectedFields(),G.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:$,isAll:Y,rightSelect:G}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);intersectAll=this.createSetOperator("intersect",!0);except=this.createSetOperator("except",!1);exceptAll=this.createSetOperator("except",!0);addSetOperators($){return this.config.setOperators.push(...$),this}where($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.where=$,this}having($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.having=$,this}groupBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(Y)?Y:[Y]}else this.config.groupBy=$;return this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=X;else this.config.orderBy=X}else{let Y=$;if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=Y;else this.config.orderBy=Y}return this}limit($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).limit=$;else this.config.limit=$;return this}offset($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).offset=$;else this.config.offset=$;return this}for($,Y={}){return this.config.lockingClause={strength:$,config:Y},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}as($){let Y=[];if(Y.push(...f2(this.config.table)),this.config.joins)for(let X of this.config.joins)Y.push(...f2(X.table));return new Proxy(new W6(this.getSQL(),this.config.fields,$,!1,[...new Set(Y)]),new I4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new I4({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}$withCache($){return this.cacheConfig=$===void 0?{config:{},enable:!0,autoInvalidate:!0}:$===!1?{enable:!1}:{enable:!0,autoInvalidate:!0,...$},this}}class NH0 extends hU1{static[z0]="MySqlSelect";prepare(){if(!this.session)throw Error("Cannot execute a query on a query builder. Please use a database instance instead.");let $=y5(this.config.fields),Y=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),$,void 0,void 0,void 0,{type:"select",tables:[...this.usedTables]},this.cacheConfig);return Y.joinsNotNullableMap=this.joinsNotNullableMap,Y}execute=($)=>{return this.prepare().execute($)};createIterator=()=>{let $=this;return async function*(Y){yield*$.prepare().iterator(Y)}};iterator=this.createIterator()}vR(NH0,[r6]);function bq($,Y){return(X,G,...J)=>{let Q=[G,...J].map((W)=>({type:$,isAll:Y,rightSelect:W}));for(let W of Q)if(!OG(X.getSelectedFields(),W.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return X.addSetOperators(Q)}}var Th6=()=>({union:Ch6,unionAll:Sh6,intersect:kh6,intersectAll:vh6,except:xh6,exceptAll:yh6}),Ch6=bq("union",!1),Sh6=bq("union",!0),kh6=bq("intersect",!1),vh6=bq("intersect",!0),xh6=bq("except",!1),yh6=bq("except",!0);class sv{static[z0]="MySqlQueryBuilder";dialect;dialectConfig;constructor($){this.dialect=q0($,gL)?$:void 0,this.dialectConfig=q0($,gL)?void 0:$}$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(X);return new Proxy(new rQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new I4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};with(...$){let Y=this;function X(J){return new g2({fields:J??void 0,session:void 0,dialect:Y.getDialect(),withList:$})}function G(J){return new g2({fields:J??void 0,session:void 0,dialect:Y.getDialect(),withList:$,distinct:!0})}return{select:X,selectDistinct:G}}select($){return new g2({fields:$??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct($){return new g2({fields:$??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}getDialect(){if(!this.dialect)this.dialect=new gL(this.dialectConfig);return this.dialect}}class BH0{constructor($,Y,X){this.table=$,this.session=Y,this.dialect=X}static[z0]="MySqlInsertBuilder";shouldIgnore=!1;ignore(){return this.shouldIgnore=!0,this}values($){if($=Array.isArray($)?$:[$],$.length===0)throw Error("values() must be called with at least one value");let Y=$.map((X)=>{let G={},J=this.table[r0.Symbol.Columns];for(let Q of Object.keys(X)){let W=X[Q];G[Q]=q0(W,$1)?W:new c7(W,J[Q])}return G});return new LH0(this.table,Y,this.shouldIgnore,this.session,this.dialect)}select($){let Y=typeof $==="function"?$(new sv):$;if(!q0(Y,$1)&&!OG(this.table[aV],Y._.selectedFields))throw Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new LH0(this.table,Y,this.shouldIgnore,this.session,this.dialect,!0)}}class LH0 extends r6{constructor($,Y,X,G,J,Q){super();this.session=G,this.dialect=J,this.config={table:$,values:Y,select:Q,ignore:X}}static[z0]="MySqlInsert";config;cacheConfig;onDuplicateKeyUpdate($){let Y=this.dialect.buildUpdateSet(this.config.table,QZ(this.config.table,$.set));return this.config.onConflict=r`update ${Y}`,this}$returningId(){let $=[];for(let[Y,X]of Object.entries(this.config.table[r0.Symbol.Columns]))if(X.primary)$.push({field:X,path:[Y]});return this.config.returning=$,this}getSQL(){return this.dialect.buildInsertQuery(this.config).sql}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}prepare(){let{sql:$,generatedIds:Y}=this.dialect.buildInsertQuery(this.config);return this.session.prepareQuery(this.dialect.sqlToQuery($),void 0,void 0,Y,this.config.returning,{type:"insert",tables:f2(this.config.table)},this.cacheConfig)}execute=($)=>{return this.prepare().execute($)};createIterator=()=>{let $=this;return async function*(Y){yield*$.prepare().iterator(Y)}};iterator=this.createIterator();$dynamic(){return this}}class sr{constructor($,Y,X,G){this.table=$,this.session=Y,this.dialect=X,this.withList=G}static[z0]="MySqlUpdateBuilder";set($){return new fU1(this.table,QZ(this.table,$),this.session,this.dialect,this.withList)}}class fU1 extends r6{constructor($,Y,X,G,J){super();this.session=X,this.dialect=G,this.config={set:Y,table:$,withList:J}}static[z0]="MySqlUpdate";config;cacheConfig;where($){return this.config.where=$,this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.table[r0.Symbol.Columns],new I4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];this.config.orderBy=X}else{let Y=$;this.config.orderBy=Y}return this}limit($){return this.config.limit=$,this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}prepare(){return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,void 0,void 0,this.config.returning,{type:"insert",tables:f2(this.config.table)},this.cacheConfig)}execute=($)=>{return this.prepare().execute($)};createIterator=()=>{let $=this;return async function*(Y){yield*$.prepare().iterator(Y)}};iterator=this.createIterator();$dynamic(){return this}}class EH0{constructor($,Y,X,G,J,Q,W,Z){this.fullSchema=$,this.schema=Y,this.tableNamesMap=X,this.table=G,this.tableConfig=J,this.dialect=Q,this.session=W,this.mode=Z}static[z0]="MySqlRelationalQueryBuilder";findMany($){return new OH0(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?$:{},"many",this.mode)}findFirst($){return new OH0(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?{...$,limit:1}:{limit:1},"first",this.mode)}}class OH0 extends r6{constructor($,Y,X,G,J,Q,W,Z,K,H){super();this.fullSchema=$,this.schema=Y,this.tableNamesMap=X,this.table=G,this.tableConfig=J,this.dialect=Q,this.session=W,this.config=Z,this.queryMode=K,this.mode=H}static[z0]="MySqlRelationalQuery";prepare(){let{query:$,builtQuery:Y}=this._toSQL();return this.session.prepareQuery(Y,void 0,(X)=>{let G=X.map((J)=>$A(this.schema,this.tableConfig,J,$.selection));if(this.queryMode==="first")return G[0];return G})}_getQuery(){return this.mode==="planetscale"?this.dialect.buildRelationalQueryWithoutLateralSubqueries({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName}):this.dialect.buildRelationalQuery({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}_toSQL(){let $=this._getQuery();return{builtQuery:this.dialect.sqlToQuery($.sql),query:$}}getSQL(){return this._getQuery().sql}toSQL(){return this._toSQL().builtQuery}execute(){return this.prepare().execute()}}class ov{constructor($,Y,X,G){if(this.dialect=$,this.session=Y,this.mode=G,this._=X?{schema:X.schema,fullSchema:X.fullSchema,tableNamesMap:X.tableNamesMap}:{schema:void 0,fullSchema:{},tableNamesMap:{}},this.query={},this._.schema)for(let[J,Q]of Object.entries(this._.schema))this.query[J]=new EH0(X.fullSchema,this._.schema,this._.tableNamesMap,X.fullSchema[J],Q,$,Y,this.mode);this.$cache={invalidate:async(J)=>{}}}static[z0]="MySqlDatabase";query;$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(new sv(X.dialect));return new Proxy(new rQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new I4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};$count($,Y){return new Pv({source:$,filters:Y,session:this.session})}$cache;with(...$){let Y=this;function X(W){return new g2({fields:W??void 0,session:Y.session,dialect:Y.dialect,withList:$})}function G(W){return new g2({fields:W??void 0,session:Y.session,dialect:Y.dialect,withList:$,distinct:!0})}function J(W){return new sr(W,Y.session,Y.dialect,$)}function Q(W){return new ar(W,Y.session,Y.dialect,$)}return{select:X,selectDistinct:G,update:J,delete:Q}}select($){return new g2({fields:$??void 0,session:this.session,dialect:this.dialect})}selectDistinct($){return new g2({fields:$??void 0,session:this.session,dialect:this.dialect,distinct:!0})}update($){return new sr($,this.session,this.dialect)}insert($){return new BH0($,this.session,this.dialect)}delete($){return new ar($,this.session,this.dialect)}execute($){return this.session.execute(typeof $==="string"?r.raw($):$.getSQL())}transaction($,Y){return this.session.transaction($,Y)}}import{once as gU1}from"events";class MH0{constructor($,Y,X){if(this.cache=$,this.queryMetadata=Y,this.cacheConfig=X,$&&$.strategy()==="all"&&X===void 0)this.cacheConfig={enable:!0,autoInvalidate:!0};if(!this.cacheConfig?.enable)this.cacheConfig=void 0}static[z0]="MySqlPreparedQuery";async queryWithCache($,Y,X){if(this.cache===void 0||q0(this.cache,j2)||this.queryMetadata===void 0)try{return await X()}catch(G){throw new R7($,Y,G)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await X()}catch(G){throw new R7($,Y,G)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{let[G]=await Promise.all([X(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return G}catch(G){throw new R7($,Y,G)}if(!this.cacheConfig)try{return await X()}catch(G){throw new R7($,Y,G)}if(this.queryMetadata.type==="select"){let G=await this.cache.get(this.cacheConfig.tag??await xH($,Y),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(G===void 0){let J;try{J=await X()}catch(Q){throw new R7($,Y,Q)}return await this.cache.put(this.cacheConfig.tag??await xH($,Y),J,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),J}return G}try{return await X()}catch(G){throw new R7($,Y,G)}}joinsNotNullableMap}class RH0{constructor($){this.dialect=$}static[z0]="MySqlSession";execute($){return this.prepareQuery(this.dialect.sqlToQuery($),void 0).execute()}async count($){let Y=await this.execute($);return Number(Y[0][0].count)}getSetTransactionSQL($){let Y=[];if($.isolationLevel)Y.push(`isolation level ${$.isolationLevel}`);return Y.length?r`set transaction ${r.raw(Y.join(" "))}`:void 0}getStartTransactionSQL($){let Y=[];if($.withConsistentSnapshot)Y.push("with consistent snapshot");if($.accessMode)Y.push($.accessMode);return Y.length?r`start transaction ${r.raw(Y.join(" "))}`:void 0}}class qH0 extends ov{constructor($,Y,X,G,J){super($,Y,X,J);this.schema=X,this.nestedIndex=G}static[z0]="MySqlTransaction";rollback(){throw new mN}}class mU1 extends MH0{constructor($,Y,X,G,J,Q,W,Z,K,H,z){super(J,Q,W);this.client=$,this.params=X,this.logger=G,this.fields=Z,this.customResultMapper=K,this.generatedIds=H,this.returningIds=z,this.rawQuery={sql:Y,typeCast:function(V,A){if(V.type==="TIMESTAMP"||V.type==="DATETIME"||V.type==="DATE")return V.string();return A()}},this.query={sql:Y,rowsAsArray:!0,typeCast:function(V,A){if(V.type==="TIMESTAMP"||V.type==="DATETIME"||V.type==="DATE")return V.string();return A()}}}static[z0]="MySql2PreparedQuery";rawQuery;query;async execute($={}){let Y=I2(this.params,$);this.logger.logQuery(this.rawQuery.sql,Y);let{fields:X,client:G,rawQuery:J,query:Q,joinsNotNullableMap:W,customResultMapper:Z,returningIds:K,generatedIds:H}=this;if(!X&&!Z){let A=await this.queryWithCache(J.sql,Y,async()=>{return await G.query(J,Y)}),F=A[0].insertId,N=A[0].affectedRows;if(K){let D=[],L=0;for(let B=F;B<F+N;B++){for(let O of K){let E=K[0].path[0];if(q0(O.field,m4)){if(O.field.primary&&O.field.autoIncrement)D.push({[E]:B});if(O.field.defaultFn&&H)D.push({[E]:H[L][E]})}}L++}return D}return A}let V=(await this.queryWithCache(Q.sql,Y,async()=>{return await G.query(Q,Y)}))[0];if(Z)return Z(V);return V.map((A)=>tV(X,A,W))}async*iterator($={}){let Y=I2(this.params,$),X=(or(this.client)?await this.client.getConnection():this.client).connection,{fields:G,query:J,rawQuery:Q,joinsNotNullableMap:W,client:Z,customResultMapper:K}=this,H=Boolean(G||K),V=(H?X.query(J,Y):X.query(Q,Y)).stream();function A(){V.pause()}V.on("data",A);try{let F=gU1(V,"end"),N=gU1(V,"error");while(!0){V.resume();let D=await Promise.race([F,N,new Promise((L)=>V.once("data",L))]);if(D===void 0||Array.isArray(D)&&D.length===0)break;else if(D instanceof Error)throw D;else if(H)if(K){let L=K([D]);yield Array.isArray(L)?L[0]:L}else yield tV(G,D,W);else yield D}}finally{if(V.off("data",A),or(Z))X.end()}}}class tr extends RH0{constructor($,Y,X,G){super(Y);this.client=$,this.schema=X,this.options=G,this.logger=G.logger??new pN,this.cache=G.cache??new j2,this.mode=G.mode}static[z0]="MySql2Session";logger;mode;cache;prepareQuery($,Y,X,G,J,Q,W){return new mU1(this.client,$.sql,$.params,this.logger,this.cache,Q,W,Y,X,G,J)}async query($,Y){return this.logger.logQuery($,Y),await this.client.query({sql:$,values:Y,rowsAsArray:!0,typeCast:function(G,J){if(G.type==="TIMESTAMP"||G.type==="DATETIME"||G.type==="DATE")return G.string();return J()}})}all($){let Y=this.dialect.sqlToQuery($);return this.logger.logQuery(Y.sql,Y.params),this.client.execute(Y.sql,Y.params).then((X)=>X[0])}async transaction($,Y){let X=or(this.client)?new tr(await this.client.getConnection(),this.dialect,this.schema,this.options):this,G=new IH0(this.dialect,X,this.schema,0,this.mode);if(Y){let J=this.getSetTransactionSQL(Y);if(J)await G.execute(J);let Q=this.getStartTransactionSQL(Y);await(Q?G.execute(Q):G.execute(r`begin`))}else await G.execute(r`begin`);try{let J=await $(G);return await G.execute(r`commit`),J}catch(J){throw await G.execute(r`rollback`),J}finally{if(or(this.client))X.client.release()}}}class IH0 extends qH0{static[z0]="MySql2Transaction";async transaction($){let Y=`sp${this.nestedIndex+1}`,X=new IH0(this.dialect,this.session,this.schema,this.nestedIndex+1,this.mode);await X.execute(r.raw(`savepoint ${Y}`));try{let G=await $(X);return await X.execute(r.raw(`release savepoint ${Y}`)),G}catch(G){throw await X.execute(r.raw(`rollback to savepoint ${Y}`)),G}}}function or($){return"getConnection"in $}class uU1{constructor($,Y,X={}){this.client=$,this.dialect=Y,this.options=X}static[z0]="MySql2Driver";createSession($,Y){return new tr(this.client,this.dialect,$,{logger:this.options.logger,mode:Y,cache:this.options.cache})}}class pU1 extends ov{static[z0]="MySql2Database"}function tv($,Y={}){let X=new gL({casing:Y.casing}),G;if(Y.logger===!0)G=new uN;else if(Y.logger!==!1)G=Y.logger;let J=bh6($)?$.promise():$,Q;if(Y.schema){if(Y.mode===void 0)throw new sQ({message:'You need to specify "mode": "planetscale" or "default" when providing a schema. Read more: https://orm.drizzle.team/docs/rqb#modes'});let z=yR(Y.schema,bR);Q={fullSchema:Y.schema,schema:z.tables,tableNamesMap:z.tableNamesMap}}let W=Y.mode??"default",K=new uU1(J,X,{logger:G,cache:Y.cache}).createSession(Q,W),H=new pU1(X,K,Q,W);if(H.$client=$,H.$cache=Y.cache,H.$cache)H.$cache.invalidate=Y.cache?.onMutate;return H}function bh6($){return typeof $.promise==="function"}function ev(...$){if(typeof $[0]==="string"){let Y=$[0],X=er.createPool({uri:Y});return tv(X,$[1])}if(xR($[0])){let{connection:Y,client:X,...G}=$[0];if(X)return tv(X,G);let J=typeof Y==="string"?er.createPool({uri:Y,supportBigNumbers:!0}):er.createPool(Y);return tv(J,G)}return tv($[0],$[1])}(($)=>{function Y(X){return tv({},X)}$.mock=Y})(ev||(ev={}));RN();var wH0=U6(qv(),1);var MZ=H6("sys_database_source",{id:y0("id"),name:y0("name"),code:y0("code"),host:y0("host"),user:y0("user"),password:y0("password"),databaseName:y0("databaseName"),port:k1("port"),connectionLimit:k1("connectionLimit"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function jA($){return await o0.select().from(MZ).where(R1(MZ.code,$))}function PH0($){let Y=r.raw("1 = 1");if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));return Y}async function dU1($){return await o0.select().from(MZ).where(PH0($)).limit(Number($.limit)).offset(Number($.offset))}async function $a($){return await o0.select().from(MZ).where(PH0($))}async function cU1($){return await o0.$count(MZ,PH0($))}async function lU1($){let Y=await o0.$count(MZ,R1(MZ.code,$.code));if(Y&&Y>0)hh6($);else{let X=Date.now();$.id=I6(),$.code=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(MZ).values($)}}async function hh6($){let Y=Date.now();$.updateBy="admin",$.latest_visitAt=Y,$.updatedAt=Y,await o0.update(MZ).set($).where(R1(MZ.code,$.code))}async function iU1($){await o0.delete(MZ).where(R1(MZ.code,$))}var fh6={max:500,maxSize:1000,sizeCalculation:($,Y)=>{return 1},dispose:($,Y)=>{},ttl:21600000,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,fetchMethod:async($,Y,{options:X,signal:G,context:J})=>{}},Ya=new $Z(fh6);async function gh6($){let Y=$.code;if(!$.host)throw Error("host\u4E0D\u80FD\u4E3A\u7A7A");if(!$.user)throw Error("user\u4E0D\u80FD\u4E3A\u7A7A");if(!$.database)throw Error("database\u4E0D\u80FD\u4E3A\u7A7A");if(!$.password)throw Error("password\u4E0D\u80FD\u4E3A\u7A7A");if(!$.port)throw Error("\u7AEF\u53E3\u4E0D\u80FD\u4E3A\u7A7A");$.connectionLimit=20,delete $.code;let X=wH0.default.createPool($);Ya.set(Y,X)}async function mh6($){let Y=await jA($);if(Y&&Y[0]&&Y.length>0){let X={};i1(X,"host",Y[0].host),i1(X,"user",Y[0].user),i1(X,"password",Y[0].password),i1(X,"database",Y[0].databaseName),i1(X,"port",Y[0].port),i1(X,"code",Y[0].code),await gh6(X)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function uX($){if($&&Ya.has($)){let Y=Ya.get($);return ev(Y)}else if($){await mh6($);let Y=Ya.get($);return ev(Y)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function nU1($){let Y=await wH0.default.createConnection($),[X,G]=await Y.query("SELECT 1 AS res FROM DUAL");return X}var Yx=new O4;Yx.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await dU1(Y),G=await cU1(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});Yx.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await lU1(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});Yx.post("/test",async($)=>{try{let Y=await $.req.json(),X=NL(Y,["host","user","password","database","port"]),G=await nU1(X),J=t0();return J.data=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u8FDE\u63A5\u5931\u8D25"})}});Yx.post("/delete",async($)=>{try{let Y=await $.req.json();await iU1(Y.code);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var rU1=Yx;Vx();var Hz0=Symbol.for("drizzle:PgViewConfig");class SA extends W7{static[z0]="PgViewBase"}class dL{static[z0]="PgDialect";casing;constructor($){this.casing=new rN($?.casing)}async migrate($,Y,X){let G=typeof X==="string"?"__drizzle_migrations":X.migrationsTable??"__drizzle_migrations",J=typeof X==="string"?"drizzle":X.migrationsSchema??"drizzle",Q=r`
			CREATE TABLE IF NOT EXISTS ${r.identifier(J)}.${r.identifier(G)} (
				id SERIAL PRIMARY KEY,
				hash text NOT NULL,
				created_at bigint
			)
		`;await Y.execute(r`CREATE SCHEMA IF NOT EXISTS ${r.identifier(J)}`),await Y.execute(Q);let Z=(await Y.all(r`select id, hash, created_at from ${r.identifier(J)}.${r.identifier(G)} order by created_at desc limit 1`))[0];await Y.transaction(async(K)=>{for await(let H of $)if(!Z||Number(Z.created_at)<H.folderMillis){for(let z of H.sql)await K.execute(r.raw(z));await K.execute(r`insert into ${r.identifier(J)}.${r.identifier(G)} ("hash", "created_at") values(${H.hash}, ${H.folderMillis})`)}})}escapeName($){return`"${$.replace(/"/g,'""')}"`}escapeParam($){return`$${$+1}`}escapeString($){return`'${$.replace(/'/g,"''")}'`}buildWithCTE($){if(!$?.length)return;let Y=[r`with `];for(let[X,G]of $.entries())if(Y.push(r`${r.identifier(G._.alias)} as (${G._.sql})`),X<$.length-1)Y.push(r`, `);return Y.push(r` `),r.join(Y)}buildDeleteQuery({table:$,where:Y,returning:X,withList:G}){let J=this.buildWithCTE(G),Q=X?r` returning ${this.buildSelection(X,{isSingleTable:!0})}`:void 0,W=Y?r` where ${Y}`:void 0;return r`${J}delete from ${$}${W}${Q}`}buildUpdateSet($,Y){let X=$[r0.Symbol.Columns],G=Object.keys(X).filter((Q)=>Y[Q]!==void 0||X[Q]?.onUpdateFn!==void 0),J=G.length;return r.join(G.flatMap((Q,W)=>{let Z=X[Q],K=Z.onUpdateFn?.(),H=Y[Q]??(q0(K,$1)?K:r.param(K,Z)),z=r`${r.identifier(this.casing.getColumnCasing(Z))} = ${H}`;if(W<J-1)return[z,r.raw(", ")];return[z]}))}buildUpdateQuery({table:$,set:Y,where:X,returning:G,withList:J,from:Q,joins:W}){let Z=this.buildWithCTE(J),K=$[YY.Symbol.Name],H=$[YY.Symbol.Schema],z=$[YY.Symbol.OriginalName],V=K===z?void 0:K,A=r`${H?r`${r.identifier(H)}.`:void 0}${r.identifier(z)}${V&&r` ${r.identifier(V)}`}`,F=this.buildUpdateSet($,Y),N=Q&&r.join([r.raw(" from "),this.buildFromTable(Q)]),D=this.buildJoins(W),L=G?r` returning ${this.buildSelection(G,{isSingleTable:!Q})}`:void 0,B=X?r` where ${X}`:void 0;return r`${Z}update ${A} set ${F}${N}${D}${B}${L}`}buildSelection($,{isSingleTable:Y=!1}={}){let X=$.length,G=$.flatMap(({field:J},Q)=>{let W=[];if(q0(J,$1.Aliased)&&J.isSelectionField)W.push(r.identifier(J.fieldAlias));else if(q0(J,$1.Aliased)||q0(J,$1)){let Z=q0(J,$1.Aliased)?J.sql:J;if(Y)W.push(new $1(Z.queryChunks.map((K)=>{if(q0(K,m1))return r.identifier(this.casing.getColumnCasing(K));return K})));else W.push(Z);if(q0(J,$1.Aliased))W.push(r` as ${r.identifier(J.fieldAlias)}`)}else if(q0(J,m4))if(Y)W.push(r.identifier(this.casing.getColumnCasing(J)));else W.push(J);else if(q0(J,W6)){let Z=Object.entries(J._.selectedFields);if(Z.length===1){let K=Z[0][1],H=q0(K,$1)?K.decoder:q0(K,m4)?{mapFromDriverValue:(z)=>K.mapFromDriverValue(z)}:K.sql.decoder;if(H)J._.sql.decoder=H}W.push(J)}if(Q<X-1)W.push(r`, `);return W});return r.join(G)}buildJoins($){if(!$||$.length===0)return;let Y=[];for(let[X,G]of $.entries()){if(X===0)Y.push(r` `);let J=G.table,Q=G.lateral?r` lateral`:void 0,W=G.on?r` on ${G.on}`:void 0;if(q0(J,YY)){let Z=J[YY.Symbol.Name],K=J[YY.Symbol.Schema],H=J[YY.Symbol.OriginalName],z=Z===H?void 0:G.alias;Y.push(r`${r.raw(G.joinType)} join${Q} ${K?r`${r.identifier(K)}.`:void 0}${r.identifier(H)}${z&&r` ${r.identifier(z)}`}${W}`)}else if(q0(J,W7)){let Z=J[y6].name,K=J[y6].schema,H=J[y6].originalName,z=Z===H?void 0:G.alias;Y.push(r`${r.raw(G.joinType)} join${Q} ${K?r`${r.identifier(K)}.`:void 0}${r.identifier(H)}${z&&r` ${r.identifier(z)}`}${W}`)}else Y.push(r`${r.raw(G.joinType)} join${Q} ${J}${W}`);if(X<$.length-1)Y.push(r` `)}return r.join(Y)}buildFromTable($){if(q0($,r0)&&$[r0.Symbol.IsAlias]){let Y=r`${r.identifier($[r0.Symbol.OriginalName])}`;if($[r0.Symbol.Schema])Y=r`${r.identifier($[r0.Symbol.Schema])}.${Y}`;return r`${Y} ${r.identifier($[r0.Symbol.Name])}`}return $}buildSelectQuery({withList:$,fields:Y,fieldsFlat:X,where:G,having:J,table:Q,joins:W,orderBy:Z,groupBy:K,limit:H,offset:z,lockingClause:V,distinct:A,setOperators:F}){let N=X??y5(Y);for(let S of N)if(q0(S.field,m4)&&Q7(S.field.table)!==(q0(Q,W6)?Q._.alias:q0(Q,SA)?Q[y6].name:q0(Q,$1)?void 0:Q7(Q))&&!((T)=>W?.some(({alias:v})=>v===(T[r0.Symbol.IsAlias]?Q7(T):T[r0.Symbol.BaseName])))(S.field.table)){let T=Q7(S.field.table);throw Error(`Your "${S.path.join("->")}" field references a column "${T}"."${S.field.name}", but the table "${T}" is not part of the query! Did you forget to join it?`)}let D=!W||W.length===0,L=this.buildWithCTE($),B;if(A)B=A===!0?r` distinct`:r` distinct on (${r.join(A.on,r`, `)})`;let O=this.buildSelection(N,{isSingleTable:D}),E=this.buildFromTable(Q),M=this.buildJoins(W),R=G?r` where ${G}`:void 0,q=J?r` having ${J}`:void 0,w;if(Z&&Z.length>0)w=r` order by ${r.join(Z,r`, `)}`;let I;if(K&&K.length>0)I=r` group by ${r.join(K,r`, `)}`;let P=typeof H==="object"||typeof H==="number"&&H>=0?r` limit ${H}`:void 0,_=z?r` offset ${z}`:void 0,C=r.empty();if(V){let S=r` for ${r.raw(V.strength)}`;if(V.config.of)S.append(r` of ${r.join(Array.isArray(V.config.of)?V.config.of:[V.config.of],r`, `)}`);if(V.config.noWait)S.append(r` nowait`);else if(V.config.skipLocked)S.append(r` skip locked`);C.append(S)}let k=r`${L}select${B} ${O} from ${E}${M}${R}${I}${q}${w}${P}${_}${C}`;if(F.length>0)return this.buildSetOperations(k,F);return k}buildSetOperations($,Y){let[X,...G]=Y;if(!X)throw Error("Cannot pass undefined values to any set operator");if(G.length===0)return this.buildSetOperationQuery({leftSelect:$,setOperator:X});return this.buildSetOperations(this.buildSetOperationQuery({leftSelect:$,setOperator:X}),G)}buildSetOperationQuery({leftSelect:$,setOperator:{type:Y,isAll:X,rightSelect:G,limit:J,orderBy:Q,offset:W}}){let Z=r`(${$.getSQL()}) `,K=r`(${G.getSQL()})`,H;if(Q&&Q.length>0){let F=[];for(let N of Q)if(q0(N,m1))F.push(r.identifier(N.name));else if(q0(N,$1)){for(let D=0;D<N.queryChunks.length;D++){let L=N.queryChunks[D];if(q0(L,m1))N.queryChunks[D]=r.identifier(L.name)}F.push(r`${N}`)}else F.push(r`${N}`);H=r` order by ${r.join(F,r`, `)} `}let z=typeof J==="object"||typeof J==="number"&&J>=0?r` limit ${J}`:void 0,V=r.raw(`${Y} ${X?"all ":""}`),A=W?r` offset ${W}`:void 0;return r`${Z}${V}${K}${H}${z}${A}`}buildInsertQuery({table:$,values:Y,onConflict:X,returning:G,withList:J,select:Q,overridingSystemValue_:W}){let Z=[],K=$[r0.Symbol.Columns],H=Object.entries(K).filter(([L,B])=>!B.shouldDisableInsert()),z=H.map(([,L])=>r.identifier(this.casing.getColumnCasing(L)));if(Q){let L=Y;if(q0(L,$1))Z.push(L);else Z.push(L.getSQL())}else{let L=Y;Z.push(r.raw("values "));for(let[B,O]of L.entries()){let E=[];for(let[M,R]of H){let q=O[M];if(q===void 0||q0(q,c7)&&q.value===void 0)if(R.defaultFn!==void 0){let w=R.defaultFn(),I=q0(w,$1)?w:r.param(w,R);E.push(I)}else if(!R.default&&R.onUpdateFn!==void 0){let w=R.onUpdateFn(),I=q0(w,$1)?w:r.param(w,R);E.push(I)}else E.push(r`default`);else E.push(q)}if(Z.push(E),B<L.length-1)Z.push(r`, `)}}let V=this.buildWithCTE(J),A=r.join(Z),F=G?r` returning ${this.buildSelection(G,{isSingleTable:!0})}`:void 0,N=X?r` on conflict ${X}`:void 0,D=W===!0?r`overriding system value `:void 0;return r`${V}insert into ${$} ${z} ${D}${A}${N}${F}`}buildRefreshMaterializedViewQuery({view:$,concurrently:Y,withNoData:X}){let G=Y?r` concurrently`:void 0,J=X?r` with no data`:void 0;return r`refresh materialized view${G} ${$}${J}`}prepareTyping($){if(q0($,kl)||q0($,Sl))return"json";else if(q0($,vl))return"decimal";else if(q0($,xl))return"time";else if(q0($,yl)||q0($,bl))return"timestamp";else if(q0($,Tl)||q0($,Cl))return"date";else if(q0($,hl))return"uuid";else return"none"}sqlToQuery($,Y){return $.toQuery({casing:this.casing,escapeName:this.escapeName,escapeParam:this.escapeParam,escapeString:this.escapeString,prepareTyping:this.prepareTyping,invokeSource:Y})}buildRelationalQueryWithoutPK({fullSchema:$,schema:Y,tableNamesMap:X,table:G,tableConfig:J,queryConfig:Q,tableAlias:W,nestedQueryRelation:Z,joinOn:K}){let H=[],z,V,A=[],F,N=[];if(Q===!0)H=Object.entries(J.columns).map(([B,O])=>({dbKey:O.name,tsKey:B,field:M8(O,W),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let L=Object.fromEntries(Object.entries(J.columns).map(([q,w])=>[q,M8(w,W)]));if(Q.where){let q=typeof Q.where==="function"?Q.where(L,cN()):Q.where;F=q&&aQ(q,W)}let B=[],O=[];if(Q.columns){let q=!1;for(let[w,I]of Object.entries(Q.columns)){if(I===void 0)continue;if(w in J.columns){if(!q&&I===!0)q=!0;O.push(w)}}if(O.length>0)O=q?O.filter((w)=>Q.columns?.[w]===!0):Object.keys(J.columns).filter((w)=>!O.includes(w))}else O=Object.keys(J.columns);for(let q of O){let w=J.columns[q];B.push({tsKey:q,value:w})}let E=[];if(Q.with)E=Object.entries(Q.with).filter((q)=>!!q[1]).map(([q,w])=>({tsKey:q,queryConfig:w,relation:J.relations[q]}));let M;if(Q.extras){M=typeof Q.extras==="function"?Q.extras(L,{sql:r}):Q.extras;for(let[q,w]of Object.entries(M))B.push({tsKey:q,value:oV(w,W)})}for(let{tsKey:q,value:w}of B)H.push({dbKey:q0(w,$1.Aliased)?w.fieldAlias:J.columns[q].name,tsKey:q,field:q0(w,m4)?M8(w,W):w,relationTableTsKey:void 0,isJson:!1,selection:[]});let R=typeof Q.orderBy==="function"?Q.orderBy(L,lN()):Q.orderBy??[];if(!Array.isArray(R))R=[R];A=R.map((q)=>{if(q0(q,m4))return M8(q,W);return aQ(q,W)}),z=Q.limit,V=Q.offset;for(let{tsKey:q,queryConfig:w,relation:I}of E){let P=iN(Y,X,I),_=JZ(I.referencedTable),C=X[_],k=`${W}_${q}`,S=l7(...P.fields.map((x,y)=>R1(M8(P.references[y],k),M8(x,W)))),T=this.buildRelationalQueryWithoutPK({fullSchema:$,schema:Y,tableNamesMap:X,table:$[C],tableConfig:Y[C],queryConfig:q0(I,tQ)?w===!0?{limit:1}:{...w,limit:1}:w,tableAlias:k,joinOn:S,nestedQueryRelation:I}),v=r`${r.identifier(k)}.${r.identifier("data")}`.as(q);N.push({on:r`true`,table:new W6(T.sql,{},k),alias:k,joinType:"left",lateral:!0}),H.push({dbKey:q,tsKey:q,field:v,relationTableTsKey:C,isJson:!0,selection:T.selection})}}if(H.length===0)throw new sQ({message:`No fields selected for table "${J.tsName}" ("${W}")`});let D;if(F=l7(K,F),Z){let L=r`json_build_array(${r.join(H.map(({field:E,tsKey:M,isJson:R})=>R?r`${r.identifier(`${W}_${M}`)}.${r.identifier("data")}`:q0(E,$1.Aliased)?E.sql:E),r`, `)})`;if(q0(Z,P2))L=r`coalesce(json_agg(${L}${A.length>0?r` order by ${r.join(A,r`, `)}`:void 0}), '[]'::json)`;let B=[{dbKey:"data",tsKey:"data",field:L.as("data"),isJson:!0,relationTableTsKey:J.tsName,selection:H}];if(z!==void 0||V!==void 0||A.length>0)D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:[{path:[],field:r.raw("*")}],where:F,limit:z,offset:V,orderBy:A,setOperators:[]}),F=void 0,z=void 0,V=void 0,A=[];else D=BG(G,W);D=this.buildSelectQuery({table:q0(D,YY)?D:new W6(D,{},W),fields:{},fieldsFlat:B.map(({field:E})=>({path:[],field:q0(E,m4)?M8(E,W):E})),joins:N,where:F,limit:z,offset:V,orderBy:A,setOperators:[]})}else D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:H.map(({field:L})=>({path:[],field:q0(L,m4)?M8(L,W):L})),joins:N,where:F,limit:z,offset:V,orderBy:A,setOperators:[]});return{tableTsKey:J.tsName,sql:D,selection:H}}}class TG{static[z0]="PgSelectBuilder";fields;session;dialect;withList=[];distinct;constructor($){if(this.fields=$.fields,this.session=$.session,this.dialect=$.dialect,$.withList)this.withList=$.withList;this.distinct=$.distinct}authToken;setToken($){return this.authToken=$,this}from($){let Y=!!this.fields,X=$,G;if(this.fields)G=this.fields;else if(q0(X,W6))G=Object.fromEntries(Object.keys(X._.selectedFields).map((J)=>[J,X[J]]));else if(q0(X,SA))G=X[y6].selectedFields;else if(q0(X,$1))G={};else G=SH(X);return new zz0({table:X,fields:G,isPartialSelect:Y,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}class EV1 extends sN{static[z0]="PgSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:$,fields:Y,isPartialSelect:X,session:G,dialect:J,withList:Q,distinct:W}){super();this.config={withList:Q,table:$,fields:{...Y},distinct:W,setOperators:[]},this.isPartialSelect=X,this.session=G,this.dialect=J,this._={selectedFields:Y,config:this.config},this.tableName=GX($),this.joinsNotNullableMap=typeof this.tableName==="string"?{[this.tableName]:!0}:{};for(let Z of m2($))this.usedTables.add(Z)}getUsedTables(){return[...this.usedTables]}createJoin($,Y){return(X,G)=>{let J=this.tableName,Q=GX(X);for(let W of m2(X))this.usedTables.add(W);if(typeof Q==="string"&&this.config.joins?.some((W)=>W.alias===Q))throw Error(`Alias "${Q}" is already used in this query`);if(!this.isPartialSelect){if(Object.keys(this.joinsNotNullableMap).length===1&&typeof J==="string")this.config.fields={[J]:this.config.fields};if(typeof Q==="string"&&!q0(X,$1)){let W=q0(X,W6)?X._.selectedFields:q0(X,W7)?X[y6].selectedFields:X[r0.Symbol.Columns];this.config.fields[Q]=W}}if(typeof G==="function")G=G(new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));if(!this.config.joins)this.config.joins=[];if(this.config.joins.push({on:G,table:X,joinType:$,alias:Q,lateral:Y}),typeof Q==="string")switch($){case"left":{this.joinsNotNullableMap[Q]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([W])=>[W,!1])),this.joinsNotNullableMap[Q]=!0;break}case"cross":case"inner":{this.joinsNotNullableMap[Q]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([W])=>[W,!1])),this.joinsNotNullableMap[Q]=!1;break}}return this}}leftJoin=this.createJoin("left",!1);leftJoinLateral=this.createJoin("left",!0);rightJoin=this.createJoin("right",!1);innerJoin=this.createJoin("inner",!1);innerJoinLateral=this.createJoin("inner",!0);fullJoin=this.createJoin("full",!1);crossJoin=this.createJoin("cross",!1);crossJoinLateral=this.createJoin("cross",!0);createSetOperator($,Y){return(X)=>{let G=typeof X==="function"?X(Qp6()):X;if(!OG(this.getSelectedFields(),G.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:$,isAll:Y,rightSelect:G}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);intersectAll=this.createSetOperator("intersect",!0);except=this.createSetOperator("except",!1);exceptAll=this.createSetOperator("except",!0);addSetOperators($){return this.config.setOperators.push(...$),this}where($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.where=$,this}having($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.having=$,this}groupBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(Y)?Y:[Y]}else this.config.groupBy=$;return this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new I4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=X;else this.config.orderBy=X}else{let Y=$;if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=Y;else this.config.orderBy=Y}return this}limit($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).limit=$;else this.config.limit=$;return this}offset($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).offset=$;else this.config.offset=$;return this}for($,Y={}){return this.config.lockingClause={strength:$,config:Y},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}as($){let Y=[];if(Y.push(...m2(this.config.table)),this.config.joins)for(let X of this.config.joins)Y.push(...m2(X.table));return new Proxy(new W6(this.getSQL(),this.config.fields,$,!1,[...new Set(Y)]),new I4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new I4({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}$withCache($){return this.cacheConfig=$===void 0?{config:{},enable:!0,autoInvalidate:!0}:$===!1?{enable:!1}:{enable:!0,autoInvalidate:!0,...$},this}}class zz0 extends EV1{static[z0]="PgSelect";_prepare($){let{session:Y,config:X,dialect:G,joinsNotNullableMap:J,authToken:Q,cacheConfig:W,usedTables:Z}=this;if(!Y)throw Error("Cannot execute a query on a query builder. Please use a database instance instead.");let{fields:K}=X;return M5.startActiveSpan("drizzle.prepareQuery",()=>{let H=y5(K),z=Y.prepareQuery(G.sqlToQuery(this.getSQL()),H,$,!0,void 0,{type:"select",tables:[...Z]},W);return z.joinsNotNullableMap=J,z.setToken(Q)})}prepare($){return this._prepare($)}authToken;setToken($){return this.authToken=$,this}execute=($)=>{return M5.startActiveSpan("drizzle.operation",()=>{return this._prepare().execute($,this.authToken)})}}vR(zz0,[r6]);function iq($,Y){return(X,G,...J)=>{let Q=[G,...J].map((W)=>({type:$,isAll:Y,rightSelect:W}));for(let W of Q)if(!OG(X.getSelectedFields(),W.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return X.addSetOperators(Q)}}var Qp6=()=>({union:Wp6,unionAll:Zp6,intersect:Kp6,intersectAll:Up6,except:Hp6,exceptAll:zp6}),Wp6=iq("union",!1),Zp6=iq("union",!0),Kp6=iq("intersect",!1),Up6=iq("intersect",!0),Hp6=iq("except",!1),zp6=iq("except",!0);class kA{static[z0]="PgQueryBuilder";dialect;dialectConfig;constructor($){this.dialect=q0($,dL)?$:void 0,this.dialectConfig=q0($,dL)?void 0:$}$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(X);return new Proxy(new rQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new I4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};with(...$){let Y=this;function X(Q){return new TG({fields:Q??void 0,session:void 0,dialect:Y.getDialect(),withList:$})}function G(Q){return new TG({fields:Q??void 0,session:void 0,dialect:Y.getDialect(),distinct:!0})}function J(Q,W){return new TG({fields:W??void 0,session:void 0,dialect:Y.getDialect(),distinct:{on:Q}})}return{select:X,selectDistinct:G,selectDistinctOn:J}}select($){return new TG({fields:$??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct($){return new TG({fields:$??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn($,Y){return new TG({fields:Y??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:$}})}getDialect(){if(!this.dialect)this.dialect=new dL(this.dialectConfig);return this.dialect}}class Vz0{constructor($,Y){this.name=$,this.schema=Y}static[z0]="PgDefaultViewBuilderCore";config={};with($){return this.config.with=$,this}}class RV1 extends Vz0{static[z0]="PgViewBuilder";as($){if(typeof $==="function")$=$(new kA);let Y=new I4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}),X=new Proxy($.getSelectedFields(),Y);return new Proxy(new Fa({pgConfig:this.config,config:{name:this.name,schema:this.schema,selectedFields:X,query:$.getSQL().inlineParams()}}),Y)}}class qV1 extends Vz0{static[z0]="PgManualViewBuilder";columns;constructor($,Y,X){super($,X);this.columns=SH(dN($,Y))}existing(){return new Proxy(new Fa({pgConfig:void 0,config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:void 0}}),new I4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}as($){return new Proxy(new Fa({pgConfig:this.config,config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:$.inlineParams()}}),new I4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}}class Az0{constructor($,Y){this.name=$,this.schema=Y}static[z0]="PgMaterializedViewBuilderCore";config={};using($){return this.config.using=$,this}with($){return this.config.with=$,this}tablespace($){return this.config.tablespace=$,this}withNoData(){return this.config.withNoData=!0,this}}class IV1 extends Az0{static[z0]="PgMaterializedViewBuilder";as($){if(typeof $==="function")$=$(new kA);let Y=new I4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}),X=new Proxy($.getSelectedFields(),Y);return new Proxy(new Da({pgConfig:{with:this.config.with,using:this.config.using,tablespace:this.config.tablespace,withNoData:this.config.withNoData},config:{name:this.name,schema:this.schema,selectedFields:X,query:$.getSQL().inlineParams()}}),Y)}}class PV1 extends Az0{static[z0]="PgManualMaterializedViewBuilder";columns;constructor($,Y,X){super($,X);this.columns=SH(dN($,Y))}existing(){return new Proxy(new Da({pgConfig:{tablespace:this.config.tablespace,using:this.config.using,with:this.config.with,withNoData:this.config.withNoData},config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:void 0}}),new I4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}as($){return new Proxy(new Da({pgConfig:{tablespace:this.config.tablespace,using:this.config.using,with:this.config.with,withNoData:this.config.withNoData},config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:$.inlineParams()}}),new I4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}}class Fa extends SA{static[z0]="PgView";[Hz0];constructor({pgConfig:$,config:Y}){super(Y);if($)this[Hz0]={with:$.with}}}var MV1=Symbol.for("drizzle:PgMaterializedViewConfig");class Da extends SA{static[z0]="PgMaterializedView";[MV1];constructor({pgConfig:$,config:Y}){super(Y);this[MV1]={with:$?.with,using:$?.using,tablespace:$?.tablespace,withNoData:$?.withNoData}}}function wV1($,Y,X){if(Y)return new qV1($,Y,X);return new RV1($,X)}function _V1($,Y,X){if(Y)return new PV1($,Y,X);return new IV1($,X)}function m2($){if(q0($,YY))return[$[gN]?`${$[gN]}.${$[r0.Symbol.BaseName]}`:$[r0.Symbol.BaseName]];if(q0($,W6))return $._.usedTables??[];if(q0($,$1))return $.usedTables??[];return[]}class Na extends r6{constructor($,Y,X,G){super();this.session=Y,this.dialect=X,this.config={table:$,withList:G}}static[z0]="PgDelete";config;cacheConfig;where($){return this.config.where=$,this}returning($=this.config.table[r0.Symbol.Columns]){return this.config.returningFields=$,this.config.returning=y5($),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($){return M5.startActiveSpan("drizzle.prepareQuery",()=>{return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,$,!0,void 0,{type:"delete",tables:m2(this.config.table)},this.cacheConfig)})}prepare($){return this._prepare($)}authToken;setToken($){return this.authToken=$,this}execute=($)=>{return M5.startActiveSpan("drizzle.operation",()=>{return this._prepare().execute($,this.authToken)})};getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new I4({alias:Q7(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}class La{constructor($,Y,X,G,J){this.table=$,this.session=Y,this.dialect=X,this.withList=G,this.overridingSystemValue_=J}static[z0]="PgInsertBuilder";authToken;setToken($){return this.authToken=$,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values($){if($=Array.isArray($)?$:[$],$.length===0)throw Error("values() must be called with at least one value");let Y=$.map((X)=>{let G={},J=this.table[r0.Symbol.Columns];for(let Q of Object.keys(X)){let W=X[Q];G[Q]=q0(W,$1)?W:new c7(W,J[Q])}return G});return new Fz0(this.table,Y,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select($){let Y=typeof $==="function"?$(new kA):$;if(!q0(Y,$1)&&!OG(this.table[aV],Y._.selectedFields))throw Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new Fz0(this.table,Y,this.session,this.dialect,this.withList,!0)}}class Fz0 extends r6{constructor($,Y,X,G,J,Q,W){super();this.session=X,this.dialect=G,this.config={table:$,values:Y,withList:J,select:Q,overridingSystemValue_:W}}static[z0]="PgInsert";config;cacheConfig;returning($=this.config.table[r0.Symbol.Columns]){return this.config.returningFields=$,this.config.returning=y5($),this}onConflictDoNothing($={}){if($.target===void 0)this.config.onConflict=r`do nothing`;else{let Y="";Y=Array.isArray($.target)?$.target.map((G)=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(G))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing($.target));let X=$.where?r` where ${$.where}`:void 0;this.config.onConflict=r`(${r.raw(Y)})${X} do nothing`}return this}onConflictDoUpdate($){if($.where&&($.targetWhere||$.setWhere))throw Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');let Y=$.where?r` where ${$.where}`:void 0,X=$.targetWhere?r` where ${$.targetWhere}`:void 0,G=$.setWhere?r` where ${$.setWhere}`:void 0,J=this.dialect.buildUpdateSet(this.config.table,QZ(this.config.table,$.set)),Q="";return Q=Array.isArray($.target)?$.target.map((W)=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(W))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing($.target)),this.config.onConflict=r`(${r.raw(Q)})${X} do update set ${J}${Y}${G}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($){return M5.startActiveSpan("drizzle.prepareQuery",()=>{return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,$,!0,void 0,{type:"insert",tables:m2(this.config.table)},this.cacheConfig)})}prepare($){return this._prepare($)}authToken;setToken($){return this.authToken=$,this}execute=($)=>{return M5.startActiveSpan("drizzle.operation",()=>{return this._prepare().execute($,this.authToken)})};getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new I4({alias:Q7(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}class Dz0 extends r6{constructor($,Y,X){super();this.session=Y,this.dialect=X,this.config={view:$}}static[z0]="PgRefreshMaterializedView";config;concurrently(){if(this.config.withNoData!==void 0)throw Error("Cannot use concurrently and withNoData together");return this.config.concurrently=!0,this}withNoData(){if(this.config.concurrently!==void 0)throw Error("Cannot use concurrently and withNoData together");return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($){return M5.startActiveSpan("drizzle.prepareQuery",()=>{return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,$,!0)})}prepare($){return this._prepare($)}authToken;setToken($){return this.authToken=$,this}execute=($)=>{return M5.startActiveSpan("drizzle.operation",()=>{return this._prepare().execute($,this.authToken)})}}class Ba{constructor($,Y,X,G){this.table=$,this.session=Y,this.dialect=X,this.withList=G}static[z0]="PgUpdateBuilder";authToken;setToken($){return this.authToken=$,this}set($){return new jV1(this.table,QZ(this.table,$),this.session,this.dialect,this.withList).setToken(this.authToken)}}class jV1 extends r6{constructor($,Y,X,G,J){super();this.session=X,this.dialect=G,this.config={set:Y,table:$,withList:J,joins:[]},this.tableName=GX($),this.joinsNotNullableMap=typeof this.tableName==="string"?{[this.tableName]:!0}:{}}static[z0]="PgUpdate";config;tableName;joinsNotNullableMap;cacheConfig;from($){let Y=$,X=GX(Y);if(typeof X==="string")this.joinsNotNullableMap[X]=!0;return this.config.from=Y,this}getTableLikeFields($){if(q0($,YY))return $[r0.Symbol.Columns];else if(q0($,W6))return $._.selectedFields;return $[y6].selectedFields}createJoin($){return(Y,X)=>{let G=GX(Y);if(typeof G==="string"&&this.config.joins.some((J)=>J.alias===G))throw Error(`Alias "${G}" is already used in this query`);if(typeof X==="function"){let J=this.config.from&&!q0(this.config.from,$1)?this.getTableLikeFields(this.config.from):void 0;X=X(new Proxy(this.config.table[r0.Symbol.Columns],new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),J&&new Proxy(J,new I4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}if(this.config.joins.push({on:X,table:Y,joinType:$,alias:G}),typeof G==="string")switch($){case"left":{this.joinsNotNullableMap[G]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([J])=>[J,!1])),this.joinsNotNullableMap[G]=!0;break}case"inner":{this.joinsNotNullableMap[G]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([J])=>[J,!1])),this.joinsNotNullableMap[G]=!1;break}}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");where($){return this.config.where=$,this}returning($){if(!$){if($=Object.assign({},this.config.table[r0.Symbol.Columns]),this.config.from){let Y=GX(this.config.from);if(typeof Y==="string"&&this.config.from&&!q0(this.config.from,$1)){let X=this.getTableLikeFields(this.config.from);$[Y]=X}for(let X of this.config.joins){let G=GX(X.table);if(typeof G==="string"&&!q0(X.table,$1)){let J=this.getTableLikeFields(X.table);$[G]=J}}}}return this.config.returningFields=$,this.config.returning=y5($),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($){let Y=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,$,!0,void 0,{type:"insert",tables:m2(this.config.table)},this.cacheConfig);return Y.joinsNotNullableMap=this.joinsNotNullableMap,Y}prepare($){return this._prepare($)}authToken;setToken($){return this.authToken=$,this}execute=($)=>{return this._prepare().execute($,this.authToken)};getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new I4({alias:Q7(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}class Ax extends $1{constructor($){super(Ax.buildEmbeddedCount($.source,$.filters).queryChunks);this.params=$,this.mapWith(Number),this.session=$.session,this.sql=Ax.buildCount($.source,$.filters)}sql;token;static[z0]="PgCountBuilder";[Symbol.toStringTag]="PgCountBuilder";session;static buildEmbeddedCount($,Y){return r`(select count(*) from ${$}${r.raw(" where ").if(Y)}${Y})`}static buildCount($,Y){return r`select count(*) as count from ${$}${r.raw(" where ").if(Y)}${Y};`}setToken($){return this.token=$,this}then($,Y){return Promise.resolve(this.session.count(this.sql,this.token)).then($,Y)}catch($){return this.then(void 0,$)}finally($){return this.then((Y)=>{return $?.(),Y},(Y)=>{throw $?.(),Y})}}class Lz0{constructor($,Y,X,G,J,Q,W){this.fullSchema=$,this.schema=Y,this.tableNamesMap=X,this.table=G,this.tableConfig=J,this.dialect=Q,this.session=W}static[z0]="PgRelationalQueryBuilder";findMany($){return new Nz0(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?$:{},"many")}findFirst($){return new Nz0(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?{...$,limit:1}:{limit:1},"first")}}class Nz0 extends r6{constructor($,Y,X,G,J,Q,W,Z,K){super();this.fullSchema=$,this.schema=Y,this.tableNamesMap=X,this.table=G,this.tableConfig=J,this.dialect=Q,this.session=W,this.config=Z,this.mode=K}static[z0]="PgRelationalQuery";_prepare($){return M5.startActiveSpan("drizzle.prepareQuery",()=>{let{query:Y,builtQuery:X}=this._toSQL();return this.session.prepareQuery(X,void 0,$,!0,(G,J)=>{let Q=G.map((W)=>$A(this.schema,this.tableConfig,W,Y.selection,J));if(this.mode==="first")return Q[0];return Q})})}prepare($){return this._prepare($)}_getQuery(){return this.dialect.buildRelationalQueryWithoutPK({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}getSQL(){return this._getQuery().sql}_toSQL(){let $=this._getQuery(),Y=this.dialect.sqlToQuery($.sql);return{query:$,builtQuery:Y}}toSQL(){return this._toSQL().builtQuery}authToken;setToken($){return this.authToken=$,this}execute(){return M5.startActiveSpan("drizzle.operation",()=>{return this._prepare().execute(void 0,this.authToken)})}}class Bz0 extends r6{constructor($,Y,X,G){super();this.execute=$,this.sql=Y,this.query=X,this.mapBatchResult=G}static[z0]="PgRaw";getSQL(){return this.sql}getQuery(){return this.query}mapResult($,Y){return Y?this.mapBatchResult($):$}_prepare(){return this}isResponseInArrayMode(){return!1}}class Fx{constructor($,Y,X){if(this.dialect=$,this.session=Y,this._=X?{schema:X.schema,fullSchema:X.fullSchema,tableNamesMap:X.tableNamesMap,session:Y}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:Y},this.query={},this._.schema)for(let[G,J]of Object.entries(this._.schema))this.query[G]=new Lz0(X.fullSchema,this._.schema,this._.tableNamesMap,X.fullSchema[G],J,$,Y);this.$cache={invalidate:async(G)=>{}}}static[z0]="PgDatabase";query;$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(new kA(X.dialect));return new Proxy(new rQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new I4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};$count($,Y){return new Ax({source:$,filters:Y,session:this.session})}$cache;with(...$){let Y=this;function X(K){return new TG({fields:K??void 0,session:Y.session,dialect:Y.dialect,withList:$})}function G(K){return new TG({fields:K??void 0,session:Y.session,dialect:Y.dialect,withList:$,distinct:!0})}function J(K,H){return new TG({fields:H??void 0,session:Y.session,dialect:Y.dialect,withList:$,distinct:{on:K}})}function Q(K){return new Ba(K,Y.session,Y.dialect,$)}function W(K){return new La(K,Y.session,Y.dialect,$)}function Z(K){return new Na(K,Y.session,Y.dialect,$)}return{select:X,selectDistinct:G,selectDistinctOn:J,update:Q,insert:W,delete:Z}}select($){return new TG({fields:$??void 0,session:this.session,dialect:this.dialect})}selectDistinct($){return new TG({fields:$??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn($,Y){return new TG({fields:Y??void 0,session:this.session,dialect:this.dialect,distinct:{on:$}})}update($){return new Ba($,this.session,this.dialect)}insert($){return new La($,this.session,this.dialect)}delete($){return new Na($,this.session,this.dialect)}refreshMaterializedView($){return new Dz0($,this.session,this.dialect)}authToken;execute($){let Y=typeof $==="string"?r.raw($):$.getSQL(),X=this.dialect.sqlToQuery(Y),G=this.session.prepareQuery(X,void 0,void 0,!1);return new Bz0(()=>G.execute(void 0,this.authToken),Y,X,(J)=>G.mapResult(J,!0))}transaction($,Y){return this.session.transaction($,Y)}}Vx();class TV1{constructor($,Y,X){this.seqName=$,this.seqOptions=Y,this.schema=X}static[z0]="PgSequence"}function CV1($,Y,X){return new TV1($,Y,X)}class SV1{constructor($){this.schemaName=$}static[z0]="PgSchema";table=($,Y,X)=>{return eW0($,Y,X,this.schemaName)};view=($,Y)=>{return wV1($,Y,this.schemaName)};materializedView=($,Y)=>{return _V1($,Y,this.schemaName)};enum($,Y){return Array.isArray(Y)?V01($,[...Y],this.schemaName):A01($,Y,this.schemaName)}sequence=($,Y)=>{return CV1($,Y,this.schemaName)};getSQL(){return new $1([r.identifier(this.schemaName)])}shouldOmitSQLParens(){return!0}}function Oa($){if($==="public")throw Error("You can't specify 'public' as schema name. Postgres is using public schema by default. If you want to use 'public' schema, just use pgTable() instead of creating a schema");return new SV1($)}class Oz0{constructor($,Y,X,G){if(this.query=$,this.cache=Y,this.queryMetadata=X,this.cacheConfig=G,Y&&Y.strategy()==="all"&&G===void 0)this.cacheConfig={enable:!0,autoInvalidate:!0};if(!this.cacheConfig?.enable)this.cacheConfig=void 0}authToken;getQuery(){return this.query}mapResult($,Y){return $}setToken($){return this.authToken=$,this}static[z0]="PgPreparedQuery";joinsNotNullableMap;async queryWithCache($,Y,X){if(this.cache===void 0||q0(this.cache,j2)||this.queryMetadata===void 0)try{return await X()}catch(G){throw new R7($,Y,G)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await X()}catch(G){throw new R7($,Y,G)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{let[G]=await Promise.all([X(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return G}catch(G){throw new R7($,Y,G)}if(!this.cacheConfig)try{return await X()}catch(G){throw new R7($,Y,G)}if(this.queryMetadata.type==="select"){let G=await this.cache.get(this.cacheConfig.tag??await xH($,Y),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(G===void 0){let J;try{J=await X()}catch(Q){throw new R7($,Y,Q)}return await this.cache.put(this.cacheConfig.tag??await xH($,Y),J,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),J}return G}try{return await X()}catch(G){throw new R7($,Y,G)}}}class Ez0{constructor($){this.dialect=$}static[z0]="PgSession";execute($,Y){return M5.startActiveSpan("drizzle.operation",()=>{return M5.startActiveSpan("drizzle.prepareQuery",()=>{return this.prepareQuery(this.dialect.sqlToQuery($),void 0,void 0,!1)}).setToken(Y).execute(void 0,Y)})}all($){return this.prepareQuery(this.dialect.sqlToQuery($),void 0,void 0,!1).all()}async count($,Y){let X=await this.execute($,Y);return Number(X[0].count)}}class Mz0 extends Fx{constructor($,Y,X,G=0){super($,Y,X);this.schema=X,this.nestedIndex=G}static[z0]="PgTransaction";rollback(){throw new mN}getTransactionConfigSQL($){let Y=[];if($.isolationLevel)Y.push(`isolation level ${$.isolationLevel}`);if($.accessMode)Y.push($.accessMode);if(typeof $.deferrable==="boolean")Y.push($.deferrable?"deferrable":"not deferrable");return r.raw(Y.join(" "))}setTransaction($){return this.session.execute(r`set transaction ${this.getTransactionConfigSQL($)}`)}}var{Pool:Vp6,types:t3}=pL;class kV1 extends Oz0{constructor($,Y,X,G,J,Q,W,Z,K,H,z){super({sql:Y,params:X},J,Q,W);this.client=$,this.queryString=Y,this.params=X,this.logger=G,this.fields=Z,this._isResponseInArrayMode=H,this.customResultMapper=z,this.rawQueryConfig={name:K,text:Y,types:{getTypeParser:(V,A)=>{if(V===t3.builtins.TIMESTAMPTZ)return(F)=>F;if(V===t3.builtins.TIMESTAMP)return(F)=>F;if(V===t3.builtins.DATE)return(F)=>F;if(V===t3.builtins.INTERVAL)return(F)=>F;if(V===1231)return(F)=>F;if(V===1115)return(F)=>F;if(V===1185)return(F)=>F;if(V===1187)return(F)=>F;if(V===1182)return(F)=>F;return t3.getTypeParser(V,A)}}},this.queryConfig={name:K,text:Y,rowMode:"array",types:{getTypeParser:(V,A)=>{if(V===t3.builtins.TIMESTAMPTZ)return(F)=>F;if(V===t3.builtins.TIMESTAMP)return(F)=>F;if(V===t3.builtins.DATE)return(F)=>F;if(V===t3.builtins.INTERVAL)return(F)=>F;if(V===1231)return(F)=>F;if(V===1115)return(F)=>F;if(V===1185)return(F)=>F;if(V===1187)return(F)=>F;if(V===1182)return(F)=>F;return t3.getTypeParser(V,A)}}}}static[z0]="NodePgPreparedQuery";rawQueryConfig;queryConfig;async execute($={}){return M5.startActiveSpan("drizzle.execute",async()=>{let Y=I2(this.params,$);this.logger.logQuery(this.rawQueryConfig.text,Y);let{fields:X,rawQueryConfig:G,client:J,queryConfig:Q,joinsNotNullableMap:W,customResultMapper:Z}=this;if(!X&&!Z)return M5.startActiveSpan("drizzle.driver.execute",async(H)=>{return H?.setAttributes({"drizzle.query.name":G.name,"drizzle.query.text":G.text,"drizzle.query.params":JSON.stringify(Y)}),this.queryWithCache(G.text,Y,async()=>{return await J.query(G,Y)})});let K=await M5.startActiveSpan("drizzle.driver.execute",(H)=>{return H?.setAttributes({"drizzle.query.name":Q.name,"drizzle.query.text":Q.text,"drizzle.query.params":JSON.stringify(Y)}),this.queryWithCache(Q.text,Y,async()=>{return await J.query(Q,Y)})});return M5.startActiveSpan("drizzle.mapResponse",()=>{return Z?Z(K.rows):K.rows.map((H)=>tV(X,H,W))})})}all($={}){return M5.startActiveSpan("drizzle.execute",()=>{let Y=I2(this.params,$);return this.logger.logQuery(this.rawQueryConfig.text,Y),M5.startActiveSpan("drizzle.driver.execute",(X)=>{return X?.setAttributes({"drizzle.query.name":this.rawQueryConfig.name,"drizzle.query.text":this.rawQueryConfig.text,"drizzle.query.params":JSON.stringify(Y)}),this.queryWithCache(this.rawQueryConfig.text,Y,async()=>{return this.client.query(this.rawQueryConfig,Y)}).then((G)=>G.rows)})})}isResponseInArrayMode(){return this._isResponseInArrayMode}}class Ea extends Ez0{constructor($,Y,X,G={}){super(Y);this.client=$,this.schema=X,this.options=G,this.logger=G.logger??new pN,this.cache=G.cache??new j2}static[z0]="NodePgSession";logger;cache;prepareQuery($,Y,X,G,J,Q,W){return new kV1(this.client,$.sql,$.params,this.logger,this.cache,Q,W,Y,X,G,J)}async transaction($,Y){let X=this.client instanceof Vp6||Object.getPrototypeOf(this.client).constructor.name.includes("Pool"),G=X?new Ea(await this.client.connect(),this.dialect,this.schema,this.options):this,J=new Rz0(this.dialect,G,this.schema);await J.execute(r`begin${Y?r` ${J.getTransactionConfigSQL(Y)}`:void 0}`);try{let Q=await $(J);return await J.execute(r`commit`),Q}catch(Q){throw await J.execute(r`rollback`),Q}finally{if(X)G.client.release()}}async count($){let Y=await this.execute($);return Number(Y.rows[0].count)}}class Rz0 extends Mz0{static[z0]="NodePgTransaction";async transaction($){let Y=`sp${this.nestedIndex+1}`,X=new Rz0(this.dialect,this.session,this.schema,this.nestedIndex+1);await X.execute(r.raw(`savepoint ${Y}`));try{let G=await $(X);return await X.execute(r.raw(`release savepoint ${Y}`)),G}catch(G){throw await X.execute(r.raw(`rollback to savepoint ${Y}`)),G}}}class vV1{constructor($,Y,X={}){this.client=$,this.dialect=Y,this.options=X}static[z0]="NodePgDriver";createSession($){return new Ea(this.client,this.dialect,$,{logger:this.options.logger,cache:this.options.cache})}}class xV1 extends Fx{static[z0]="NodePgDatabase"}function Dx($,Y={}){let X=new dL({casing:Y.casing}),G;if(Y.logger===!0)G=new uN;else if(Y.logger!==!1)G=Y.logger;let J;if(Y.schema){let K=yR(Y.schema,bR);J={fullSchema:Y.schema,schema:K.tables,tableNamesMap:K.tableNamesMap}}let W=new vV1($,X,{logger:G,cache:Y.cache}).createSession(J),Z=new xV1(X,W,J);if(Z.$client=$,Z.$cache=Y.cache,Z.$cache)Z.$cache.invalidate=Y.cache?.onMutate;return Z}function nq(...$){if(typeof $[0]==="string"){let Y=new pL.Pool({connectionString:$[0]});return Dx(Y,$[1])}if(xR($[0])){let{connection:Y,client:X,...G}=$[0];if(X)return Dx(X,G);let J=typeof Y==="string"?new pL.Pool({connectionString:Y}):new pL.Pool(Y);return Dx(J,G)}return Dx($[0],$[1])}(($)=>{function Y(X){return Dx({},X)}$.mock=Y})(nq||(nq={}));RN();Vx();var IZ=H6("sys_pg_source",{id:y0("id"),name:y0("name"),code:y0("code"),host:y0("host"),user:y0("user"),password:y0("password"),databaseName:y0("databaseName"),port:k1("port"),max:k1("max"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function cL($){return await o0.select().from(IZ).where(R1(IZ.code,$))}function qz0($){let Y=r.raw("1 = 1");if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));return Y}async function yV1($){return await o0.select().from(IZ).where(qz0($)).limit(Number($.limit)).offset(Number($.offset))}async function Ma($){return await o0.select().from(IZ).where(qz0($))}async function bV1($){return await o0.$count(IZ,qz0($))}async function hV1($){let Y=await o0.$count(IZ,R1(IZ.code,$.code));if(Y&&Y>0)Ap6($);else{let X=Date.now();$.id=I6(),$.code=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(IZ).values($)}}async function Ap6($){let Y=Date.now();$.updateBy="admin",$.latest_visitAt=Y,$.updatedAt=Y,await o0.update(IZ).set($).where(R1(IZ.code,$.code))}async function fV1($){await o0.delete(IZ).where(R1(IZ.code,$))}var Fp6={max:500,maxSize:1000,sizeCalculation:($,Y)=>{return 1},dispose:($,Y)=>{},ttl:300000,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,fetchMethod:async($,Y,{options:X,signal:G,context:J})=>{}},Ra=new $Z(Fp6);async function Dp6($){let Y=$.code;if(!$.host)throw Error("host\u4E0D\u80FD\u4E3A\u7A7A");if(!$.user)throw Error("user\u4E0D\u80FD\u4E3A\u7A7A");if(!$.database)throw Error("database\u4E0D\u80FD\u4E3A\u7A7A");if(!$.password)throw Error("password\u4E0D\u80FD\u4E3A\u7A7A");if(!$.port)throw Error("\u7AEF\u53E3\u4E0D\u80FD\u4E3A\u7A7A");$.max=20,delete $.code;let X=new Uz0($);Ra.set(Y,X)}async function Np6($){let Y=await cL($);if(Y&&Y[0]&&Y.length>0){let X={max:0,maxUses:0,allowExitOnIdle:!1,maxLifetimeSeconds:0,idleTimeoutMillis:null};i1(X,"host",Y[0].host),i1(X,"user",Y[0].user),i1(X,"password",Y[0].password),i1(X,"database",Y[0].databaseName),i1(X,"port",Y[0].port),i1(X,"code",Y[0].code),await Dp6(X)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function pX($){if($&&Ra.has($)){let Y=Ra.get($);return nq(Y)}else if($){await Np6($);let Y=Ra.get($);return nq(Y)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function gV1($){return await nq(`postgres://${$.user}:${$.password}@${$.host}:${$.port}/${$.database}`).execute("select 1")}var Lx=new O4;Lx.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await yV1(Y),G=await bV1(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});Lx.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await hV1(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});Lx.post("/test",async($)=>{try{let Y=await $.req.json(),X=NL(Y,["host","user","password","database","port","max","maxUses","allowExitOnIdle","maxLifetimeSeconds","idleTimeoutMillis"]);X.database=Y.databaseName;let G=await gV1(X),J=t0();return J.data=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u8FDE\u63A5\u5931\u8D25"})}});Lx.post("/delete",async($)=>{try{let Y=await $.req.json();await fV1(Y.code);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var mV1=Lx;var gx=U6(nA(),1);var CZ=H6("sys_oracle_source",{id:y0("id"),name:y0("name"),code:y0("code"),host:y0("host"),user:y0("user"),password:y0("password"),serviceName:y0("serviceName"),port:k1("port"),max:k1("max"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function ZU($){return await o0.select().from(CZ).where(R1(CZ.code,$))}function GA0($){let Y=r.raw("1 = 1");if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));return Y}async function BB1($){return await o0.select().from(CZ).where(GA0($)).limit(Number($.limit)).offset(Number($.offset))}async function Ts($){return await o0.select().from(CZ).where(GA0($))}async function OB1($){return await o0.$count(CZ,GA0($))}async function EB1($){let Y=await o0.$count(CZ,R1(CZ.code,$.code));if(Y&&Y>0)Or6($);else{let X=Date.now();$.id=I6(),$.code=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(CZ).values($)}}async function Or6($){let Y=Date.now();$.updateBy="admin",$.latest_visitAt=Y,$.updatedAt=Y,await o0.update(CZ).set($).where(R1(CZ.code,$.code))}async function MB1($){await o0.delete(CZ).where(R1(CZ.code,$))}async function lX($){let Y=await ZU($);if(Y&&Y[0]&&Y.length>0){if(!Y[0].host)throw Error("host\u4E0D\u80FD\u4E3A\u7A7A");if(!Y[0].user)throw Error("user\u4E0D\u80FD\u4E3A\u7A7A");if(!Y[0].serviceName)throw Error("serviceName\u4E0D\u80FD\u4E3A\u7A7A");if(!Y[0].password)throw Error("password\u4E0D\u80FD\u4E3A\u7A7A");if(!Y[0].port)throw Error("\u7AEF\u53E3\u4E0D\u80FD\u4E3A\u7A7A");let X;try{X=gx.default.getPool($)}catch(G){}if(!X)X=await gx.default.createPool({user:Y[0].user,password:Y[0].password,connectString:`${Y[0].host}:${Y[0].port}/${Y[0].serviceName}`,poolIncrement:1,poolMin:1,poolMax:10,poolAlias:$});return X.getConnection()}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function RB1($){let Y=await gx.default.getConnection({user:$.user,password:$.password,connectString:`${$.host}:${$.port}/${$.serviceName}`}),X=await Y.execute("select 1 from dual",[],{outFormat:gx.default.OUT_FORMAT_OBJECT});return await Y.close(),X.rows}var mx=new O4;mx.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await BB1(Y),G=await OB1(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});mx.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await EB1(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});mx.post("/test",async($)=>{try{let Y=await $.req.json(),X=NL(Y,["host","user","password","serviceName","port"]),G=await RB1(X),J=t0();return J.data=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u8FDE\u63A5\u5931\u8D25"})}});mx.post("/delete",async($)=>{try{let Y=await $.req.json();await MB1(Y.code);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var qB1=mx;var SZ=new O4;SZ.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await vX1(Y),G=await yX1(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SZ.post("/save",async($)=>{try{let Y=await $.req.json();await fX1(Y.name,Y.code,Y.filename);let X=t0();return X.data={success:!0},$.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:`\u4FDD\u5B58\u5931\u8D25:${Y}`})}});SZ.post("/test",async($)=>{try{let Y=await $.req.json(),X=await gX1(Y.filename??""),G=t0();return G.data=X,$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u8FDE\u63A5\u5931\u8D25"})}});SZ.post("/delete",async($)=>{try{let Y=await $.req.json();await hX1(Y.code);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});SZ.post("/addTable",async($)=>{try{let Y=await $.req.json(),X=Y.code??"",G=Y.filename??"",J=Y.table??"",Q=Y.fields??[];if(J.length==0||Q.length==0||X.length==0)throw new k0(500,{message:"\u53C2\u6570\u9519\u8BEF"});let W="";Q.forEach((z)=>{let V="text";switch(z.type){case"integer":V="integer";break;case"real":V="real";break;case"text":V="text";break;case"blob":V="blob";break;case"boolean":V="integer";break;case"bigint":V="blob";break;case"numeric":V="numeric";break;default:break}W=W+z.name+" "+V+","});let Z=`
            CREATE TABLE ${J} (
                id text,
                ${W}
                create_time text,
                update_time text
            )
        `;await mX1(X,Z);let K={source:X,filename:G,table_name:J,schema_data:JSON.stringify(Q)};await cX1(K);let H=t0();return $.json(H)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5EFA\u8868\u5931\u8D25"})}});SZ.get("/queryMetaData",async($)=>{try{let Y=$.req.query().code??"",X=await LL(Y),G=await uX1(Y),J=t0();return J.data={config:X[0],metaData:G},$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SZ.get("/queryTableData",async($)=>{try{let Y=$.req.query().code??"",X=$.req.query().table??"",G=$.req.query().pageNum??"1",J=(Number(G)-1)*10,Q=`select * from ${X} limit 10 offset ${J}`,W=await mk(Y,Q),Z=`select count(*) as total from ${X}`,K=await mk(Y,Z),z=(await Uq(Y,X))[0]?.schema_data??"[]",V=JSON.parse(z),A=t0();return A.data={data:W,fields:V,total:K[0]?.total},$.json(A)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SZ.get("/dropTable",async($)=>{try{let Y=$.req.query().code??"",X=$.req.query().table??"";await pX1(Y,X);let G=t0();return $.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});SZ.post("/saveTableData",async($)=>{try{let Y=await $.req.json(),X=Y.code??"",G=Y.table??"";(Y.items??[]).forEach(async(W)=>{if(W.id)await fn(X,G,W,W.id);else await hn(X,G,W)});let Q=t0();return Q.data={success:!0},$.json(Q)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});SZ.post("/deleteTableData",async($)=>{try{let Y=await $.req.json(),X=Y.code??"",G=Y.table??"";(Y.items??[]).forEach(async(W)=>{if(W.id)await gn(X,`delete from ${G} where id = '${W.id}'`)});let Q=t0();return Q.data={success:!0},$.json(Q)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});SZ.post("/filterTableData",async($)=>{try{let Y=await $.req.json(),X=Y.code??"",G=Y.table??"",J=Y.pageNum??"1",Q=(Number(J)-1)*10,W=Y.filter??{},{result:Z,count:K}=await nX1(X,G,W,Q),z=(await Uq(X,G))[0]?.schema_data??"[]",V=JSON.parse(z),A=t0();return A.data={data:Z,fields:V,total:K},$.json(A)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});var IB1=SZ;var Cs=new O4;Cs.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await M$1(Y),G=await R$1(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});Cs.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await q$1(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});Cs.post("/delete",async($)=>{try{let Y=await $.req.json();await I$1(Y.id);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var PB1=Cs;var uB1=U6(nA(),1);var wB1=`{
    "nodes": [
        {
            "id": "HgU8yP",
            "type": "start",
            "x": 215,
            "y": 103,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "start",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 215,
                "y": 143,
                "value": "\u7EC4\u4EF6_HgU8yP"
            }
        },
        {
            "id": "KBvdCo",
            "type": "end",
            "x": 465,
            "y": 327,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "end",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 465,
                "y": 367,
                "value": "\u7EC4\u4EF6_KBvdCo"
            }
        },
        {
            "id": "hUAGNZ",
            "type": "entity_crud",
            "x": 366,
            "y": 211,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "entity_crud",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "----temp1----",
                    "table": "----temp2----",
                    "type": "----temp4----",
                    "dynamicObj": "----temp3----",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 366,
                "y": 251,
                "value": "\u7EC4\u4EF6_hUAGNZ"
            }
        }
    ],
    "edges": [
        {
            "id": "a0b57498-197c-4cf1-a74d-ca5a671e78d4",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "HgU8yP",
            "targetNodeId": "hUAGNZ",
            "sourceAnchorId": "HgU8yP_outgoing",
            "targetAnchorId": "hUAGNZ_incomming",
            "startPoint": {
                "x": 215,
                "y": 123
            },
            "endPoint": {
                "x": 366,
                "y": 191
            },
            "pointsList": [
                {
                    "x": 215,
                    "y": 123
                },
                {
                    "x": 215,
                    "y": 223
                },
                {
                    "x": 366,
                    "y": 91
                },
                {
                    "x": 366,
                    "y": 191
                }
            ]
        },
        {
            "id": "48b0c3fe-f86d-48b0-b01c-e4c00b259a0b",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "hUAGNZ",
            "targetNodeId": "KBvdCo",
            "sourceAnchorId": "hUAGNZ_outgoing",
            "targetAnchorId": "KBvdCo_incomming",
            "startPoint": {
                "x": 366,
                "y": 231
            },
            "endPoint": {
                "x": 465,
                "y": 307
            },
            "pointsList": [
                {
                    "x": 366,
                    "y": 231
                },
                {
                    "x": 366,
                    "y": 331
                },
                {
                    "x": 465,
                    "y": 207
                },
                {
                    "x": 465,
                    "y": 307
                }
            ]
        }
    ]
}`,_B1=`{
    "nodes": [
        {
            "id": "cZEG6o",
            "type": "start",
            "x": 198,
            "y": 99,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "start",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 198,
                "y": 139,
                "value": "\u7EC4\u4EF6_cZEG6o"
            }
        },
        {
            "id": "Z5PB0v",
            "type": "end",
            "x": 442,
            "y": 352,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "end",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 442,
                "y": 392,
                "value": "\u7EC4\u4EF6_Z5PB0v"
            }
        },
        {
            "id": "6Pluy4",
            "type": "entity_crud",
            "x": 349,
            "y": 207,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "entity_crud",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "----temp1----",
                    "table": "----temp2----",
                    "type": "select",
                    "dynamicObj": "",
                    "template": "----temp3----",
                    "contextKey": "----temp2----"
                }
            },
            "text": {
                "x": 349,
                "y": 247,
                "value": "\u7EC4\u4EF6_6Pluy4"
            }
        },
        {
            "id": "3gYdoB",
            "type": "field_extract",
            "x": 232,
            "y": 314,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "field_extract",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [
                    {
                        "key": "----temp2----[0]",
                        "value": "res"
                    }
                ],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 232,
                "y": 354,
                "value": "\u7EC4\u4EF6_3gYdoB"
            }
        }
    ],
    "edges": [
        {
            "id": "3f24c827-f839-4dc4-8ba7-7f1d8408939c",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "cZEG6o",
            "targetNodeId": "6Pluy4",
            "sourceAnchorId": "cZEG6o_outgoing",
            "targetAnchorId": "6Pluy4_incomming",
            "startPoint": {
                "x": 198,
                "y": 119
            },
            "endPoint": {
                "x": 349,
                "y": 187
            },
            "pointsList": [
                {
                    "x": 198,
                    "y": 119
                },
                {
                    "x": 198,
                    "y": 219
                },
                {
                    "x": 349,
                    "y": 87
                },
                {
                    "x": 349,
                    "y": 187
                }
            ]
        },
        {
            "id": "4a97726b-6d30-4c5d-b8ca-6419069e147a",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "6Pluy4",
            "targetNodeId": "3gYdoB",
            "sourceAnchorId": "6Pluy4_outgoing",
            "targetAnchorId": "3gYdoB_incomming",
            "startPoint": {
                "x": 349,
                "y": 227
            },
            "endPoint": {
                "x": 232,
                "y": 294
            },
            "pointsList": [
                {
                    "x": 349,
                    "y": 227
                },
                {
                    "x": 349,
                    "y": 327
                },
                {
                    "x": 232,
                    "y": 194
                },
                {
                    "x": 232,
                    "y": 294
                }
            ]
        },
        {
            "id": "ec096806-8ae9-4175-bee4-759a80f7de4a",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "3gYdoB",
            "targetNodeId": "Z5PB0v",
            "sourceAnchorId": "3gYdoB_outgoing",
            "targetAnchorId": "Z5PB0v_incomming",
            "startPoint": {
                "x": 232,
                "y": 334
            },
            "endPoint": {
                "x": 442,
                "y": 332
            },
            "pointsList": [
                {
                    "x": 232,
                    "y": 334
                },
                {
                    "x": 232,
                    "y": 434
                },
                {
                    "x": 442,
                    "y": 232
                },
                {
                    "x": 442,
                    "y": 332
                }
            ]
        }
    ]
}`,jB1=`{
    "nodes": [
        {
            "id": "RLCkWt",
            "type": "start",
            "x": 190,
            "y": 81,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "start",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 190,
                "y": 121,
                "value": "\u7EC4\u4EF6_RLCkWt"
            }
        },
        {
            "id": "U0v9KA",
            "type": "end",
            "x": 439,
            "y": 310,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "end",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 439,
                "y": 350,
                "value": "\u7EC4\u4EF6_U0v9KA"
            }
        },
        {
            "id": "pQYPXb",
            "type": "entity_crud",
            "x": 324,
            "y": 201,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "entity_crud",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "----temp1----",
                    "table": "----temp2----",
                    "type": "delete",
                    "dynamicObj": "",
                    "template": "----temp3----",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 324,
                "y": 241,
                "value": "\u7EC4\u4EF6_pQYPXb"
            }
        }
    ],
    "edges": [
        {
            "id": "0c95da3d-464b-4eb9-92f2-50f0e1a02bb7",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "RLCkWt",
            "targetNodeId": "pQYPXb",
            "sourceAnchorId": "RLCkWt_outgoing",
            "targetAnchorId": "pQYPXb_incomming",
            "startPoint": {
                "x": 190,
                "y": 101
            },
            "endPoint": {
                "x": 324,
                "y": 181
            },
            "pointsList": [
                {
                    "x": 190,
                    "y": 101
                },
                {
                    "x": 190,
                    "y": 201
                },
                {
                    "x": 324,
                    "y": 81
                },
                {
                    "x": 324,
                    "y": 181
                }
            ]
        },
        {
            "id": "fe158934-0c55-4557-b982-fff19bd8d700",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "pQYPXb",
            "targetNodeId": "U0v9KA",
            "sourceAnchorId": "pQYPXb_outgoing",
            "targetAnchorId": "U0v9KA_incomming",
            "startPoint": {
                "x": 324,
                "y": 221
            },
            "endPoint": {
                "x": 439,
                "y": 290
            },
            "pointsList": [
                {
                    "x": 324,
                    "y": 221
                },
                {
                    "x": 324,
                    "y": 321
                },
                {
                    "x": 439,
                    "y": 190
                },
                {
                    "x": 439,
                    "y": 290
                }
            ]
        }
    ]
}`,TB1=`{
    "nodes": [
        {
            "id": "cZEG6o",
            "type": "start",
            "x": 220,
            "y": 74,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "start",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 220,
                "y": 114,
                "value": "\u7EC4\u4EF6_cZEG6o"
            }
        },
        {
            "id": "Z5PB0v",
            "type": "end",
            "x": 213,
            "y": 388,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "end",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 213,
                "y": 428,
                "value": "\u7EC4\u4EF6_Z5PB0v"
            }
        },
        {
            "id": "6Pluy4",
            "type": "entity_crud",
            "x": 308,
            "y": 249,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "entity_crud",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "----temp1----",
                    "table": "----temp2----",
                    "type": "select",
                    "dynamicObj": "",
                    "template": "----temp3----",
                    "contextKey": "----temp2----"
                }
            },
            "text": {
                "x": 308,
                "y": 289,
                "value": "\u7EC4\u4EF6_6Pluy4"
            }
        },
        {
            "id": "3gYdoB",
            "type": "field_extract",
            "x": 433,
            "y": 369,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "field_extract",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [
                    {
                        "key": "----temp2----",
                        "value": "list"
                    },
                    {
                        "key": "total[0].total",
                        "value": "total"
                    }
                ],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 433,
                "y": 409,
                "value": "\u7EC4\u4EF6_3gYdoB"
            }
        },
        {
            "id": "4a8C2E",
            "type": "field_inject",
            "x": 399,
            "y": 125,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "field_inject",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [
                    {
                        "isCheck": true,
                        "key": "offset",
                        "value": "number0",
                        "msg": ""
                    },
                    {
                        "isCheck": true,
                        "key": "limit",
                        "value": "number0",
                        "msg": ""
                    }
                ],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 399,
                "y": 165,
                "value": "\u7EC4\u4EF6_4a8C2E"
            }
        },
        {
            "id": "j0VExq",
            "type": "code_custom",
            "x": 568,
            "y": 176,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "code_custom",
                "codeCustom": ----temp5----,
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 568,
                "y": 216,
                "value": "\u7EC4\u4EF6_j0VExq"
            }
        },
        {
            "id": "uQZkC8",
            "type": "entity_crud",
            "x": 599,
            "y": 296,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "entity_crud",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "----temp1----",
                    "table": "----temp2----",
                    "type": "select",
                    "dynamicObj": "",
                    "template": "select count(1)  as total from ----temp2----",
                    "contextKey":"total"
                }
            },
            "text": {
                "x": 599,
                "y": 336,
                "value": "\u7EC4\u4EF6_uQZkC8"
            }
        }
    ],
    "edges": [
        {
            "id": "ec096806-8ae9-4175-bee4-759a80f7de4a",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "3gYdoB",
            "targetNodeId": "Z5PB0v",
            "sourceAnchorId": "3gYdoB_outgoing",
            "targetAnchorId": "Z5PB0v_incomming",
            "startPoint": {
                "x": 433,
                "y": 389
            },
            "endPoint": {
                "x": 213,
                "y": 368
            },
            "pointsList": [
                {
                    "x": 433,
                    "y": 389
                },
                {
                    "x": 433,
                    "y": 489
                },
                {
                    "x": 213,
                    "y": 268
                },
                {
                    "x": 213,
                    "y": 368
                }
            ]
        },
        {
            "id": "65874349-44a9-4f42-a3f4-d0e9651731bc",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "cZEG6o",
            "targetNodeId": "4a8C2E",
            "sourceAnchorId": "cZEG6o_outgoing",
            "targetAnchorId": "4a8C2E_incomming",
            "startPoint": {
                "x": 220,
                "y": 94
            },
            "endPoint": {
                "x": 399,
                "y": 105
            },
            "pointsList": [
                {
                    "x": 220,
                    "y": 94
                },
                {
                    "x": 220,
                    "y": 194
                },
                {
                    "x": 399,
                    "y": 5
                },
                {
                    "x": 399,
                    "y": 105
                }
            ]
        },
        {
            "id": "dc210261-3f86-44e4-a236-fa656908f887",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "4a8C2E",
            "targetNodeId": "j0VExq",
            "sourceAnchorId": "4a8C2E_outgoing",
            "targetAnchorId": "j0VExq_incomming",
            "startPoint": {
                "x": 399,
                "y": 145
            },
            "endPoint": {
                "x": 568,
                "y": 156
            },
            "pointsList": [
                {
                    "x": 399,
                    "y": 145
                },
                {
                    "x": 399,
                    "y": 245
                },
                {
                    "x": 568,
                    "y": 56
                },
                {
                    "x": 568,
                    "y": 156
                }
            ]
        },
        {
            "id": "fbd38aef-b374-4f6f-acd4-2dd29ecdc299",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "j0VExq",
            "targetNodeId": "6Pluy4",
            "sourceAnchorId": "j0VExq_outgoing",
            "targetAnchorId": "6Pluy4_incomming",
            "startPoint": {
                "x": 568,
                "y": 196
            },
            "endPoint": {
                "x": 308,
                "y": 229
            },
            "pointsList": [
                {
                    "x": 568,
                    "y": 196
                },
                {
                    "x": 568,
                    "y": 296
                },
                {
                    "x": 308,
                    "y": 129
                },
                {
                    "x": 308,
                    "y": 229
                }
            ]
        },
        {
            "id": "a5c0cc02-65eb-452a-b45c-3fcfc1ff0ac6",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "6Pluy4",
            "targetNodeId": "uQZkC8",
            "sourceAnchorId": "6Pluy4_outgoing",
            "targetAnchorId": "uQZkC8_incomming",
            "startPoint": {
                "x": 308,
                "y": 269
            },
            "endPoint": {
                "x": 599,
                "y": 276
            },
            "pointsList": [
                {
                    "x": 308,
                    "y": 269
                },
                {
                    "x": 308,
                    "y": 369
                },
                {
                    "x": 599,
                    "y": 176
                },
                {
                    "x": 599,
                    "y": 276
                }
            ]
        },
        {
            "id": "fa7a8ce7-34ca-45c0-bed4-af1b29efcc5e",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "uQZkC8",
            "targetNodeId": "3gYdoB",
            "sourceAnchorId": "uQZkC8_outgoing",
            "targetAnchorId": "3gYdoB_incomming",
            "startPoint": {
                "x": 599,
                "y": 316
            },
            "endPoint": {
                "x": 433,
                "y": 349
            },
            "pointsList": [
                {
                    "x": 599,
                    "y": 316
                },
                {
                    "x": 599,
                    "y": 416
                },
                {
                    "x": 433,
                    "y": 249
                },
                {
                    "x": 433,
                    "y": 349
                }
            ]
        }
    ]
}`;var r2=H6("sys_apimanager",{id:y0("id"),name:y0("name"),code:y0("code"),parames:y0("parames"),type:y0("type"),flow_data:y0("flow_data"),project:y0("project"),status:k1("status"),simplify:y0("simplify"),sourceType:y0("sourceType"),remark:y0("remark"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function II($){return await o0.select().from(r2).where(R1(r2.code,$))}function CB1($){let Y=r.raw("1 = 1");if($.type&&$.type=="dataplug")Y.append(r.raw(" and (type = '1' or type = '2')"));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or project like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));return Y}async function SB1($){return await o0.select().from(r2).where(CB1($)).orderBy(oQ(r.raw("createdAt"))).limit(Number($.limit)).offset(Number($.offset))}async function kB1($){return await o0.$count(r2,CB1($))}async function PI($){let Y=await o0.$count(r2,R1(r2.code,$.code));if(Y&&Y>0)Er6($);else{if(!$.simplify)$.simplify="{}";let X=Date.now();$.id=I6(),$.code=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,$.status=1,$.project="\u9ED8\u8BA4",await o0.insert(r2).values($)}}async function Er6($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await o0.update(r2).set($).where(R1(r2.code,$.code))}async function vB1($){await o0.delete(r2).where(R1(r2.code,$))}var tJ=H6("sys_apimanager_proxy",{id:y0("id"),name:y0("name"),code:y0("code"),path1:y0("path1"),remark:y0("remark"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function WB($){return await o0.select().from(tJ).where(R1(tJ.path1,$))}async function yB1(){return await o0.select().from(tJ)}function bB1($){let Y=r.raw("1 = 1");if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or path1 like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));return Y}async function hB1($){return await o0.select().from(tJ).where(bB1($)).orderBy(oQ(r.raw("createdAt"))).limit(Number($.limit)).offset(Number($.offset))}async function fB1($){return await o0.$count(tJ,bB1($))}async function wI($){let Y=await o0.$count(tJ,R1(tJ.code,$.code));if(Y&&Y>0)Mr6($);else{let X=Date.now();$.id=I6(),$.code=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(tJ).values($)}}async function Mr6($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,await o0.update(tJ).set($).where(R1(tJ.code,$.code))}async function gB1($){await o0.delete(tJ).where(R1(tJ.code,$))}async function mB1($){await o0.delete(tJ).where(R1(tJ.path1,$))}var ZB=new O4;ZB.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await SB1(Y),G=await kB1(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});ZB.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await PI(X);let{path1:G,path2:J}=Y;if(G&&G&&String(G).length>0&&String(J).length>0){let W={name:X.name,path1:G,path2:J,target:X.code};await fH(W)}let Q=t0();return Q.data={success:!0},$.json(Q)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});ZB.post("/delete",async($)=>{try{let Y=await $.req.json();await vB1(Y.code);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});ZB.post("/saveCrud",async($)=>{try{let Y=await $.req.json(),X=Y.sourceType,G=Y.poolCode,J=Y.table,Q=Y.name,W=Y.path1,Z=Y.path1Select,K=Y.folders&&Y.folders.length>0?`${Y.folders}.`:"",H;if(Z&&String(Z).length>0)H=Z;else if(W&&String(W).length>0)if(H=W,(await WB(W))[0])throw Error("\u8F93\u5165\u7684\u4E00\u7EA7\u8DEF\u5F84\u5DF2\u7ECF\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165");else await wI({name:Q,path1:H});else throw Error("\u7F3A\u5C11\u8F93\u5165\u4E00\u7EA7\u8DEF\u5F84");await ux(J,G,"insert",X,H,K),await ux(J,G,"update",X,H,K),await JA0(J,G,X,H,K),await QA0(J,G,X,H,K),await WA0(J,G,X,H,K);let z=t0();return z.data={success:!0},$.json(z)}catch(Y){throw console.error(Y),new k0(500,{message:`${Y}`})}});async function ux($,Y,X,G,J,Q){let W={},Z;if(X=="insert")Z=`[${$}]\u65B0\u589E\u6570\u636E`;else Z=`[${$}]\u66F4\u65B0\u6570\u636E`;let K={},H=!1;if(G=="mysql"){let F=await uX(Y),N=r.join([r`SHOW FULL COLUMNS`,r.raw(`\`${$}\``)],r` FROM `),D=await F.execute(N.getSQL());if(D[0]&&a8(D[0]))D[0].forEach((B)=>{if(K[B.Field]=`{{${B.Field}}}`,String(B.Field)=="id"||String(B.Field)=="ID")H=!0})}else if(G=="postgres"){let F=await pX(Y),N=r`SELECT 
	            C.COLUMN_NAME AS Field,
	            C.data_type AS TYPE 
            FROM
	            information_schema.tables T JOIN information_schema.COLUMNS C ON T.TABLE_NAME = C.TABLE_NAME 
                AND T.table_schema = C.table_schema 
            WHERE T.table_schema NOT IN ( 'information_schema', 'pg_catalog' ) 
	                AND T.TABLE_NAME = ${$}`,D=await F.execute(N.getSQL());if(D.rows&&a8(D.rows))D.rows.forEach((B)=>{if(I7(B.type)){if(K[B.field]=`{{${B.field}}}`,String(B.field)=="id"||String(B.field)=="ID")H=!0}})}else if(G=="oracle"){let F=await lX(Y),N=`SELECT
              column_name AS Field,
              data_type AS TYPE ,
              data_length AS LENGTH,
              nullable AS NULLABLE
            FROM
              all_tab_columns 
            WHERE
              table_name = '${$}'`,D=await F.execute(`${N}`,[],{outFormat:uB1.default.OUT_FORMAT_OBJECT});if(D.rows&&a8(D.rows))D.rows.forEach((B)=>{if(String(B.FIELD)=="id"||String(B.FIELD)=="ID")K.id=`{{${B.FIELD}}}`,H=!0;else K[B.FIELD]=`{{${B.FIELD}}}`})}else if(G=="sqlite"){let F=await WX(Y),N=`PRAGMA table_info(${$})`,D=F.all(r.raw(N));if(D&&a8(D))D.forEach((L)=>{if(I7(L.type)){if(K[L.name]=`{{${L.name}}}`,String(L.name)=="id"||String(L.name)=="ID")H=!0}})}if(!H)throw Error("\u9009\u62E9\u7684\u8868\u7F3A\u5C11id\u5B57\u6BB5");let z="3",V=wB1;V=n1(V,"----temp1----",Y),V=n1(V,"----temp2----",$),V=n1(V,"----temp4----",X),V=n1(V,"----temp3----",JSON.stringify(K).replaceAll('"',"\\\"")),W.name=Z,W.parames=JSON.stringify(K),W.type=z,W.flow_data=V,W.simplify="{}",await PI(W);let A={name:Z,path1:J,path2:`${X}`,target:W.code};return await fH(A),W.code}async function JA0($,Y,X,G,J){let Q={},W=`[${$}]\u67E5\u8BE2\u6570\u636E`,Z={id:"{{id}}"},K="3",H=_B1;H=n1(H,"----temp1----",Y),H=n1(H,"----temp2----",$),H=n1(H,"----temp2----",$),H=n1(H,"----temp2----",$),H=n1(H,"----temp3----",`select * from ${J}${$} where id = '{{id}}'`),Q.name=W,Q.parames=JSON.stringify(Z),Q.type="3",Q.flow_data=H,Q.simplify="{}",await PI(Q);let z={name:W,path1:G,path2:"select",target:Q.code};return await fH(z),Q.code}async function QA0($,Y,X,G,J){let Q={},W=`[${$}]\u5220\u9664\u6570\u636E`,Z={id:"{{id}}"},K="3",H=jB1;H=n1(H,"----temp1----",Y),H=n1(H,"----temp2----",$),H=n1(H,"----temp3----",`delete from ${J}${$} where id = '{{id}}'`),Q.name=W,Q.parames=JSON.stringify(Z),Q.type="3",Q.flow_data=H,Q.simplify="{}",await PI(Q);let z={name:W,path1:G,path2:"delete",target:Q.code};return await fH(z),Q.code}function Rr6($){if(typeof $!=="string")throw TypeError("Input must be a string");return JSON.stringify($)}async function WA0($,Y,X,G,J){let Q={},W="";if(X=="mysql")W=`select * from ${J}${$} LIMIT {{offset}},{{limit}}`;else if(X=="postgres")W=`select * from ${J}${$} LIMIT {{limit}} OFFSET {{offset}}`;else if(X=="oracle")W=`select * from ${J}${$} OFFSET {{offset}} ROWS FETCH NEXT {{limit}} ROWS ONLY`;else if(X=="sqlite")W=`select * from ${J}${$} LIMIT {{limit}} OFFSET {{offset}}`;let Z=`[${$}]\u5206\u9875\u67E5\u8BE2\u6570\u636E`,K={pageNumber:"{{pageNumber}}",pageSize:"{{pageSize}}"},H="3",z=`// \u5B9A\u4E49\u51FD\u6570\r
function isNumber(val) {\r
  return toString.call(val) === "[object Number]" || toString.call(val) === "[object String]";\r
}\r
// \u4E1A\u52A1\u903B\u8F91\r
if (isNumber(pageNumber) && isNumber(pageSize)) {\r
    offset = (pageNumber - 1) * pageSize\r
    limit = pageSize\r
}\r
`,V=TB1;V=n1(V,"----temp1----",Y),V=n1(V,"----temp1----",Y),V=n1(V,"----temp2----",$),V=n1(V,"----temp2----",$),V=n1(V,"----temp2----",$),V=n1(V,"----temp2----",$),V=n1(V,"----temp2----",$),V=n1(V,"----temp3----",W),V=n1(V,"----temp5----",Rr6(z)),Q.name=Z,Q.parames=JSON.stringify(K),Q.type=H,Q.flow_data=V,Q.simplify="{}",await PI(Q);let A={name:Z,path1:G,path2:"selectPage",target:Q.code};return await fH(A),Q.code}ZB.post("/queryByCode",async($)=>{try{let Y=await $.req.json(),X=await II(Y.code),G=t0();return G.data=X,$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});ZB.post("/saveToProxy",async($)=>{try{let Y=await $.req.json(),X=Y.path1,G=Y.path2;if(X&&X&&String(X).length>0&&String(G).length>0){let Q={name:Y.name,path1:X,path2:G,target:Y.code};await fH(Q)}let J=t0();return J.data={success:!0},$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});var pB1=ZB;var dB1=U6(hN(),1);var Zz=new O4;Zz.get("/generate",async($)=>{try{let Y=$.req.query().dayNum,X=await rH(Number(Y)),G=t0();return G.data={jwt:X},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u751F\u6210\u5931\u8D25"})}});Zz.post("/activate",async($)=>{try{let Y=await $.req.json(),X={name:"\u7CFB\u7EDF\u51ED\u8BC1",code:"license",val:JSON.stringify({license:Y.license})};await xk(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u6FC0\u6D3B\u5931\u8D25"})}});Zz.get("/initConfig",async($)=>{try{let Y={name:"\u7BA1\u7406\u5458\u8D26\u53F7",code:"admin_account",val:JSON.stringify({username:"admin",password:"123456"})};await xk(Y);let X=t0();return X.data={success:!0},$.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u521D\u59CB\u5316\u5931\u8D25"})}});Zz.get("/initLogTable",async($)=>{try{let X=new dB1.default({length:10}).randomUUID();await F$1(5000);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u521D\u59CB\u5316\u5931\u8D25"})}});Zz.get("/queryActivate",async($)=>{try{let Y=await vk("license"),X=JSON.parse(Y),G=await sk(X.license),J=t0();return J.data={activate:G},$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u83B7\u53D6\u5931\u8D25"})}});Zz.post("/updatePassword",async($)=>{try{let Y=await $.req.json(),X=Y.password?Y.password:"123456",G={name:"\u7BA1\u7406\u5458\u8D26\u53F7",code:"admin_account",val:JSON.stringify({username:"admin",password:X})};await xk(G);let J=t0();return J.data={success:!0},$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u66F4\u65B0\u5931\u8D25"})}});Zz.get("/queryConfig",async($)=>{try{let Y=await vk("system_config"),X=JSON.parse(Y),G=t0();return G.data={config:X},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u83B7\u53D6\u5931\u8D25"})}});Zz.post("/updateConfig",async($)=>{try{let Y=await $.req.json(),X=Y.title&&Y.title.length>0?Y.title:"",G=Y.footer&&Y.footer.length>0?Y.footer:"",J={name:"\u7CFB\u7EDF\u914D\u7F6E",code:"system_config",val:JSON.stringify({title:X,footer:G})};await xk(J);let Q=t0();return Q.data={success:!0},$.json(Q)}catch(Y){throw console.error(Y),new k0(500,{message:"\u66F4\u65B0\u5931\u8D25"})}});var cB1=Zz;var Kz=H6("sys_dataplug",{id:y0("id"),name:y0("name"),code:y0("code"),parames:y0("parames"),type:y0("type"),flow_data:y0("flow_data"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});function lB1($){let Y=r.raw("1 = 1");if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or project like '%${$.searchVal}%')`));return Y}async function iB1($){return await o0.select().from(Kz).where(lB1($)).limit(Number($.limit)).offset(Number($.offset))}async function nB1($){return await o0.$count(Kz,lB1($))}async function rB1($){let Y=await o0.$count(Kz,R1(Kz.code,$.code));if(Y&&Y>0)qr6($);else{let X=Date.now();$.id=I6(),$.code=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,$.type="0",await o0.insert(Kz).values($)}}async function qr6($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await o0.update(Kz).set($).where(R1(Kz.code,$.code))}async function aB1($){await o0.delete(Kz).where(R1(Kz.code,$))}var ks=new O4;ks.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await iB1(Y),G=await nB1(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});ks.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await rB1(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});ks.post("/delete",async($)=>{try{let Y=await $.req.json();await aB1(Y.code);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var sB1=ks;function vs($,Y){Y.forEach((X)=>{if(String(X.Type).includes("datetime")||String(X.Type).includes("date")||String(X.Type).includes("timestamp")){let G=D4($,X.Field);if(G)i1($,X.Field,Yq(G))}})}async function xs($,Y){let X=$.poolCode;if(!X||X.length==0)throw Error("poolCode\u4E0D\u80FD\u4E3A\u7A7A");let G=await uX(X);if(Y&&Y=="2"){let J=$.sql;delete $.sql,delete $.poolCode;let Q=N$(J,/{{(.*?)}}/g);if(a8(Q))Q.forEach((Z)=>{let K=n1(n1(Z,"{{",""),"}}","");if(K.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4($,K)))throw Error(`${K}\u53D6\u503C\u5931\u8D25`);J=n1(J,`{{${K}}}`,$[K])});return{data:(await G.execute(r.raw(J)))[0]}}else{if(I7($))$=JSON.parse($);$=D$($);let J="select";if($&&$.type)J=$.type;let Q=D$($.dynamicObj);if(!Q)Q={};let W=$.table;if(!W||W.length==0)throw Error("table\u4E0D\u80FD\u4E3A\u7A7A");let Z=$.pageNum?$.pageNum:1,K=$.pageSize?$.pageSize:10,H=$.orderBy?$.orderBy:"id",z=$.orderByCommand?$.orderByCommand:"desc",V=$.id,A=r.join([r`SHOW FULL COLUMNS`,r.raw(`\`${W}\``)],r` FROM `),F=await G.execute(A.getSQL());if(F[0]&&a8(F[0])){let N=F[0],D={};if(N.forEach((L)=>{if(I7(L.Type)){if(String(L.Type).includes("tinyint"))D[L.Field]=lv(L.Field);else if(String(L.Type).includes("smallint"))D[L.Field]=mv(L.Field);else if(String(L.Type).includes("mediumint"))D[L.Field]=hv(L.Field);else if(String(L.Type).includes("bigint"))D[L.Field]=wv(L.Field,{mode:"number"});else if(String(L.Type).includes("int"))D[L.Field]=yv(L.Field);else if(String(L.Type).includes("real"))D[L.Field]=fv(L.Field);else if(String(L.Type).includes("decimal"))D[L.Field]=kv(L.Field);else if(String(L.Type).includes("double"))D[L.Field]=vv(L.Field);else if(String(L.Type).includes("float"))D[L.Field]=xv(L.Field);else if(String(L.Type).includes("serial"))D[L.Field]=gv(L.Field);else if(String(L.Type).includes("varbinary"))D[L.Field]=iv(L.Field,{length:255});else if(String(L.Type).includes("binary"))D[L.Field]=_v(L.Field);else if(String(L.Type).includes("varchar"))D[L.Field]=nv(L.Field,{length:255});else if(String(L.Type).includes("char"))D[L.Field]=Tv(L.Field);else if(String(L.Type).includes("text"))D[L.Field]=pv(L.Field);else if(String(L.Type).includes("boolean"))D[L.Field]=jv(L.Field);else if(String(L.Type).includes("datetime"))D[L.Field]=Sv(L.Field,{mode:"string"});else if(String(L.Type).includes("date"))D[L.Field]=Cv(L.Field,{mode:"string"});else if(String(L.Type).includes("timestamp"))D[L.Field]=cv(L.Field,{mode:"string"});else if(String(L.Type).includes("time"))D[L.Field]=dv(L.Field);else if(String(L.Type).includes("year"))D[L.Field]=rv(L.Field);else if(String(L.Type).includes("json"))D[L.Field]=bv(L.Field)}}),J=="insert"){vs(Q,N);let L=await G.insert($z(W,D)).values(Q).$returningId();return{data:"success"}}else if(J=="update"){if(!V||V.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");vs(Q,N);let L=await G.update($z(W,D)).set(Q).where(r.join([r.raw("id"),r`${V}`],r` = `));return{data:"success"}}else if(J=="delete"){if(!V||V.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");let L=await G.delete($z(W,D)).where(r.join([r.raw("id"),r`${V}`],r` = `));return{data:"success"}}else if(J=="select"||J=="count"){let L=[];if(L.push(r`1 = 1`),V)L.push(r.join([r.raw("id"),r`${V}`],r` = `));Object.keys(Q).forEach((M)=>{if(y2(Q[M].value)&&!gX(Q[M].value,"undefined"))switch(Q[M].command){case"eq":L.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` = `));break;case"ne":L.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` != `));break;case"gt":L.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` > `));break;case"gte":L.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` >= `));break;case"lt":L.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` < `));break;case"lte":L.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` <= `));break;case"isNull":L.push(r.join([r.raw(`${M}`)],r` is null `));break;case"isNotNull":L.push(r.join([r.raw(`${M}`)],r` is not null `));break;case"inArray":break;case"notInArray":break;case"exists":break;case"notExists":break;case"between":break;case"notBetween":break;case"like":L.push(r.join([r.raw(`${M}`),r`CONCAT('%',${Q[M].value},'%')`],r` like `));break;case"ilike":break;case"notIlike":break;case"not":break;case"and":break;case"or":break;case"arrayContains":break;case"arrayContained":break;case"arrayOverlaps":break;default:break}});let B=r.join(L,r` and `);if(J=="count"){let M=await G.select({count:r`count(*)`.mapWith(Number)}).from($z(W,D)).where(B);return{data:{count:M[0]?M[0].count:0}}}let O=await G.select().from($z(W,D)).where(B).orderBy(z=="desc"?oQ(r.raw(H)):vH(r.raw(H))).limit(Number(K)).offset(Number((Z-1)*K)),E=await G.select({count:r`count(*)`.mapWith(Number)}).from($z(W,D)).where(B);return{data:O,total:E[0]?E[0].count:0}}else throw Error("\u64CD\u4F5C\u7C7B\u578B\u65E0\u6548")}else throw Error("\u8868\u4E0D\u5B58\u5728")}}async function oB1($,Y){let X=await uX($),G=r.join([r`SHOW FULL COLUMNS`,r.raw(`\`${Y}\``)],r` FROM `),Q=(await X.execute(G.getSQL()))[0],W={};return Q.forEach((Z)=>{if(I7(Z.Type)){if(String(Z.Type).includes("tinyint"))W[Z.Field]=lv(Z.Field);else if(String(Z.Type).includes("smallint"))W[Z.Field]=mv(Z.Field);else if(String(Z.Type).includes("mediumint"))W[Z.Field]=hv(Z.Field);else if(String(Z.Type).includes("bigint"))W[Z.Field]=wv(Z.Field,{mode:"number"});else if(String(Z.Type).includes("int"))W[Z.Field]=yv(Z.Field);else if(String(Z.Type).includes("real"))W[Z.Field]=fv(Z.Field);else if(String(Z.Type).includes("decimal"))W[Z.Field]=kv(Z.Field);else if(String(Z.Type).includes("double"))W[Z.Field]=vv(Z.Field);else if(String(Z.Type).includes("float"))W[Z.Field]=xv(Z.Field);else if(String(Z.Type).includes("serial"))W[Z.Field]=gv(Z.Field);else if(String(Z.Type).includes("varbinary"))W[Z.Field]=iv(Z.Field,{length:255});else if(String(Z.Type).includes("binary"))W[Z.Field]=_v(Z.Field);else if(String(Z.Type).includes("varchar"))W[Z.Field]=nv(Z.Field,{length:255});else if(String(Z.Type).includes("char"))W[Z.Field]=Tv(Z.Field);else if(String(Z.Type).includes("text"))W[Z.Field]=pv(Z.Field);else if(String(Z.Type).includes("boolean"))W[Z.Field]=jv(Z.Field);else if(String(Z.Type).includes("datetime"))W[Z.Field]=Sv(Z.Field,{mode:"string"});else if(String(Z.Type).includes("date"))W[Z.Field]=Cv(Z.Field,{mode:"string"});else if(String(Z.Type).includes("timestamp"))W[Z.Field]=cv(Z.Field,{mode:"string"});else if(String(Z.Type).includes("time"))W[Z.Field]=dv(Z.Field);else if(String(Z.Type).includes("year"))W[Z.Field]=rv(Z.Field);else if(String(Z.Type).includes("json"))W[Z.Field]=bv(Z.Field)}}),{fields:Q,schema:W}}async function tB1($,Y,X){let G=await uX($),J=await oB1($,Y);return vs(X,J.fields),await G.insert($z(Y,J.schema)).values(X).$returningId()}async function eB1($,Y,X,G){let J=await uX($),Q=await oB1($,Y);return vs(X,Q.fields),await J.update($z(Y,Q.schema)).set(X).where(r.join([r.raw("id"),r`${G}`],r` = `))}async function ZA0($,Y){return(await(await uX($)).execute(r.raw(Y)))[0]}function px($,Y){let X=$,G=N$($,/{{(.*?)}}/g);if(a8(G))G.forEach((J)=>{let Q=n1(n1(J,"{{",""),"}}","");if(Q.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,Q)))throw Error(`${Q}\u53D6\u503C\u5931\u8D25`);X=n1(X,`{{${Q}}}`,D4(Y,Q))});return X}var YO1=new O4;YO1.post("/",async($)=>{try{let Y=$.req.query("type"),X=await $.req.json(),G=await xs(X,Y),J=t0();return J.data=G.data,J.total=G.total,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u64CD\u4F5C\u5931\u8D25"})}});var XO1=YO1;function ys($,Y){Y.forEach((X)=>{if(X.type.includes("time")||X.type.includes("date")||X.type.includes("timestamp")){let G=D4($,X.field);if(G)i1($,X.field,Yq(G))}})}async function bs($,Y){let X=$.poolCode;if(!X||X.length==0)throw Error("poolCode\u4E0D\u80FD\u4E3A\u7A7A");let G=await pX(X);if(Y&&Y=="2"){let J=$.sql;delete $.sql,delete $.poolCode;let Q=N$(J,/{{(.*?)}}/g);if(a8(Q))Q.forEach((Z)=>{let K=n1(n1(Z,"{{",""),"}}","");if(K.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4($,K)))throw Error(`${K}\u53D6\u503C\u5931\u8D25`);J=n1(J,`{{${K}}}`,$[K])});return{data:(await G.execute(r.raw(J))).rows}}else{if(I7($))$=JSON.parse($);$=D$($);let J="select";if($&&$.type)J=$.type;let Q=D$($.dynamicObj);if(!Q)Q={};let{folders:W,table:Z}=$;if(!Z||Z.length==0)throw Error("table\u4E0D\u80FD\u4E3A\u7A7A");let K=$.pageNum?$.pageNum:1,H=$.pageSize?$.pageSize:10,z=$.orderBy?$.orderBy:"id",V=$.orderByCommand?$.orderByCommand:"desc",A=$.id,F=r`SELECT 
	            C.COLUMN_NAME AS Field,
	            C.data_type AS TYPE 
            FROM
	            information_schema.tables T JOIN information_schema.COLUMNS C ON T.TABLE_NAME = C.TABLE_NAME 
                AND T.table_schema = C.table_schema 
            WHERE T.table_schema NOT IN ( 'information_schema', 'pg_catalog' ) 
	                AND T.TABLE_NAME = ${Z}`,N=await G.execute(F.getSQL());if(N.rows&&a8(N.rows)){let D=N.rows,L={};D.forEach((O)=>{if(I7(O.type)){if(String(O.type).includes("integer"))L[O.field]=bS(O.field);else if(String(O.type).includes("smallint"))L[O.field]=dS(O.field);else if(String(O.type).includes("bigint"))L[O.field]=CS(O.field,{mode:"number"});else if(String(O.type).includes("serial"))L[O.field]=pS(O.field);else if(String(O.type).includes("smallserial"))L[O.field]=cS(O.field);else if(String(O.type).includes("bigserial"))L[O.field]=SS(O.field);else if(String(O.type).includes("boolean"))L[O.field]=kS(O.field);else if(String(O.type).includes("text"))L[O.field]=lS(O.field);else if(String(O.type).includes("character")&&String(O.Type).includes("var"))L[O.field]=rS(O.field,{length:255});else if(String(O.type).includes("character"))L[O.field]=vS(O.field,{length:255});else if(String(O.type).includes("numeric")||String(O.Type).includes("decimal"))L[O.field]=mS(O.field,{mode:"number"});else if(String(O.type).includes("real"))L[O.field]=uS(O.field);else if(String(O.type).includes("double"))L[O.field]=yS(O.field);else if(String(O.type).includes("json"))L[O.field]=fS(O.field);else if(String(O.type).includes("jsonb"))L[O.field]=gS(O.field);else if(String(O.type).includes("timestamp"))L[O.field]=nS(O.field);else if(String(O.type).includes("time"))L[O.field]=iS(O.field);else if(String(O.type).includes("date"))L[O.field]=xS(O.field,{mode:"string"});else if(String(O.type).includes("interval"))L[O.field]=hS(O.field)}});let B;if(W&&W.length>0)B=Oa(W).table(Z,L);else B=dN(Z,L);if(J=="insert"){ys(Q,D);let O=await G.insert(B).values(Q);return{data:"success"}}else if(J=="update"){if(!A||A.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");ys(Q,D);let O=await G.update(B).set(Q).where(r.join([r.raw("id"),r`${A}`],r` = `));return{data:"success"}}else if(J=="delete"){if(!A||A.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");let O=await G.delete(B).where(r.join([r.raw("id"),r`${A}`],r` = `));return{data:"success"}}else if(J=="select"||J=="count"){let O=[];if(O.push(r`1 = 1`),A)O.push(r.join([r.raw("id"),r`${A}`],r` = `));Object.keys(Q).forEach((q)=>{if(y2(Q[q].value)&&!gX(Q[q].value,"undefined"))switch(Q[q].command){case"eq":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` = `));break;case"ne":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` != `));break;case"gt":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` > `));break;case"gte":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` >= `));break;case"lt":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` < `));break;case"lte":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` <= `));break;case"isNull":O.push(r.join([r.raw(`${q}`)],r` is null `));break;case"isNotNull":O.push(r.join([r.raw(`${q}`)],r` is not null `));break;case"inArray":break;case"notInArray":break;case"exists":break;case"notExists":break;case"between":break;case"notBetween":break;case"like":O.push(r.join([r.raw(`${q}`),r`CONCAT('%',${Q[q].value},'%')`],r` like `));break;case"ilike":break;case"notIlike":break;case"not":break;case"and":break;case"or":break;case"arrayContains":break;case"arrayContained":break;case"arrayOverlaps":break;default:break}});let E=r.join(O,r` and `);if(J=="count"){let q=await G.select({count:r`count(*)`.mapWith(Number)}).from(B).where(E);return{data:{count:q[0]?q[0].count:0}}}let M=await G.select().from(B).orderBy(V=="desc"?oQ(r.raw(z)):vH(r.raw(z))).where(E).limit(Number(H)).offset(Number((K-1)*H)),R=await G.select({count:r`count(*)`.mapWith(Number)}).from(B).where(E);return{data:M,total:R[0]?R[0].count:0}}else throw Error("\u64CD\u4F5C\u7C7B\u578B\u65E0\u6548")}else throw Error("\u8868\u4E0D\u5B58\u5728")}}async function GO1($,Y){let X=await pX($),G=r`SELECT 
	            C.COLUMN_NAME AS Field,
	            C.data_type AS TYPE 
            FROM
	            information_schema.tables T JOIN information_schema.COLUMNS C ON T.TABLE_NAME = C.TABLE_NAME 
                AND T.table_schema = C.table_schema 
            WHERE T.table_schema NOT IN ( 'information_schema', 'pg_catalog' ) 
	                AND T.TABLE_NAME = ${Y}`,Q=(await X.execute(G.getSQL())).rows,W={};return Q.forEach((Z)=>{if(I7(Z.type)){if(String(Z.type).includes("integer"))W[Z.field]=bS(Z.field);else if(String(Z.type).includes("smallint"))W[Z.field]=dS(Z.field);else if(String(Z.type).includes("bigint"))W[Z.field]=CS(Z.field,{mode:"number"});else if(String(Z.type).includes("serial"))W[Z.field]=pS(Z.field);else if(String(Z.type).includes("smallserial"))W[Z.field]=cS(Z.field);else if(String(Z.type).includes("bigserial"))W[Z.field]=SS(Z.field);else if(String(Z.type).includes("boolean"))W[Z.field]=kS(Z.field);else if(String(Z.type).includes("text"))W[Z.field]=lS(Z.field);else if(String(Z.type).includes("character")&&String(Z.Type).includes("var"))W[Z.field]=rS(Z.field,{length:255});else if(String(Z.type).includes("character"))W[Z.field]=vS(Z.field,{length:255});else if(String(Z.type).includes("numeric")||String(Z.Type).includes("decimal"))W[Z.field]=mS(Z.field,{mode:"number"});else if(String(Z.type).includes("real"))W[Z.field]=uS(Z.field);else if(String(Z.type).includes("double"))W[Z.field]=yS(Z.field);else if(String(Z.type).includes("json"))W[Z.field]=fS(Z.field);else if(String(Z.type).includes("jsonb"))W[Z.field]=gS(Z.field);else if(String(Z.type).includes("timestamp"))W[Z.field]=nS(Z.field);else if(String(Z.type).includes("time"))W[Z.field]=iS(Z.field);else if(String(Z.type).includes("date"))W[Z.field]=xS(Z.field,{mode:"string"});else if(String(Z.type).includes("interval"))W[Z.field]=hS(Z.field)}}),{fields:Q,schema:W}}async function JO1($,Y,X){let G=await pX($),J=await GO1($,Y),Q;if(Y.includes(".")){let Z=Y.split(".")[0]??"postgres";Q=Oa(Z).table(Y,J.schema)}else Q=dN(Y,J.schema);return ys(X,J.fields),await G.insert(Q).values(X)}async function QO1($,Y,X,G){let J=await pX($),Q=await GO1($,Y),W;if(Y.includes(".")){let K=Y.split(".")[0]??"postgres";W=Oa(K).table(Y,Q.schema)}else W=dN(Y,Q.schema);return ys(X,Q.fields),await J.update(W).set(X).where(r.join([r.raw("id"),r`${G}`],r` = `))}async function KA0($,Y){return(await(await pX($)).execute(r.raw(Y))).rows}function dx($,Y){let X=$,G=N$($,/{{(.*?)}}/g);if(a8(G))G.forEach((J)=>{let Q=n1(n1(J,"{{",""),"}}","");if(Q.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,Q)))throw Error(`${Q}\u53D6\u503C\u5931\u8D25`);X=n1(X,`{{${Q}}}`,D4(Y,Q))});return X}var ZO1=new O4;ZO1.post("/",async($)=>{try{let Y=$.req.query("type"),X=await $.req.json(),G=await bs(X,Y),J=t0();return J.data=G.data,J.total=G.total,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u64CD\u4F5C\u5931\u8D25"})}});var KO1=ZO1;var TB=U6(nA(),1);var FA0={};W8(FA0,{validator:()=>lx,validate:()=>UA0,unobserve:()=>zO1,unescapePathComponent:()=>_I,observe:()=>VO1,getValueByPointer:()=>cx,generate:()=>us,escapePathComponent:()=>a2,default:()=>xr6,deepClone:()=>xY,compare:()=>AO1,applyReducer:()=>HO1,applyPatch:()=>ix,applyOperation:()=>rA,_areEquals:()=>CI,JsonPatchError:()=>jI});var HA0={};W8(HA0,{validator:()=>lx,validate:()=>UA0,getValueByPointer:()=>cx,deepClone:()=>_r6,applyReducer:()=>HO1,applyPatch:()=>ix,applyOperation:()=>rA,_areEquals:()=>CI,JsonPatchError:()=>t7});/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2022 Joachim Wester
 * MIT licensed
 */var Pr6=function(){var $=function(Y,X){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,J){G.__proto__=J}||function(G,J){for(var Q in J)if(J.hasOwnProperty(Q))G[Q]=J[Q]},$(Y,X)};return function(Y,X){$(Y,X);function G(){this.constructor=Y}Y.prototype=X===null?Object.create(X):(G.prototype=X.prototype,new G)}}(),wr6=Object.prototype.hasOwnProperty;function fs($,Y){return wr6.call($,Y)}function gs($){if(Array.isArray($)){var Y=Array($.length);for(var X=0;X<Y.length;X++)Y[X]=""+X;return Y}if(Object.keys)return Object.keys($);var G=[];for(var J in $)if(fs($,J))G.push(J);return G}function xY($){switch(typeof $){case"object":return JSON.parse(JSON.stringify($));case"undefined":return null;default:return $}}function ms($){var Y=0,X=$.length,G;while(Y<X){if(G=$.charCodeAt(Y),G>=48&&G<=57){Y++;continue}return!1}return!0}function a2($){if($.indexOf("/")===-1&&$.indexOf("~")===-1)return $;return $.replace(/~/g,"~0").replace(/\//g,"~1")}function _I($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}function hs($){if($===void 0)return!0;if($){if(Array.isArray($)){for(var Y=0,X=$.length;Y<X;Y++)if(hs($[Y]))return!0}else if(typeof $==="object"){var G=gs($),J=G.length;for(var Q=0;Q<J;Q++)if(hs($[G[Q]]))return!0}}return!1}function UO1($,Y){var X=[$];for(var G in Y){var J=typeof Y[G]==="object"?JSON.stringify(Y[G],null,2):Y[G];if(typeof J<"u")X.push(G+": "+J)}return X.join(`
`)}var jI=function($){Pr6(Y,$);function Y(X,G,J,Q,W){var Z=this.constructor,K=$.call(this,UO1(X,{name:G,index:J,operation:Q,tree:W}))||this;return K.name=G,K.index=J,K.operation=Q,K.tree=W,Object.setPrototypeOf(K,Z.prototype),K.message=UO1(X,{name:G,index:J,operation:Q,tree:W}),K}return Y}(Error);var t7=jI,_r6=xY,TI={add:function($,Y,X){return $[Y]=this.value,{newDocument:X}},remove:function($,Y,X){var G=$[Y];return delete $[Y],{newDocument:X,removed:G}},replace:function($,Y,X){var G=$[Y];return $[Y]=this.value,{newDocument:X,removed:G}},move:function($,Y,X){var G=cx(X,this.path);if(G)G=xY(G);var J=rA(X,{op:"remove",path:this.from}).removed;return rA(X,{op:"add",path:this.path,value:J}),{newDocument:X,removed:G}},copy:function($,Y,X){var G=cx(X,this.from);return rA(X,{op:"add",path:this.path,value:xY(G)}),{newDocument:X}},test:function($,Y,X){return{newDocument:X,test:CI($[Y],this.value)}},_get:function($,Y,X){return this.value=$[Y],{newDocument:X}}},jr6={add:function($,Y,X){if(ms(Y))$.splice(Y,0,this.value);else $[Y]=this.value;return{newDocument:X,index:Y}},remove:function($,Y,X){var G=$.splice(Y,1);return{newDocument:X,removed:G[0]}},replace:function($,Y,X){var G=$[Y];return $[Y]=this.value,{newDocument:X,removed:G}},move:TI.move,copy:TI.copy,test:TI.test,_get:TI._get};function cx($,Y){if(Y=="")return $;var X={op:"_get",path:Y};return rA($,X),X.value}function rA($,Y,X,G,J,Q){if(X===void 0)X=!1;if(G===void 0)G=!0;if(J===void 0)J=!0;if(Q===void 0)Q=0;if(X)if(typeof X=="function")X(Y,0,$,Y.path);else lx(Y,0);if(Y.path===""){var W={newDocument:$};if(Y.op==="add")return W.newDocument=Y.value,W;else if(Y.op==="replace")return W.newDocument=Y.value,W.removed=$,W;else if(Y.op==="move"||Y.op==="copy"){if(W.newDocument=cx($,Y.from),Y.op==="move")W.removed=$;return W}else if(Y.op==="test"){if(W.test=CI($,Y.value),W.test===!1)throw new t7("Test operation failed","TEST_OPERATION_FAILED",Q,Y,$);return W.newDocument=$,W}else if(Y.op==="remove")return W.removed=$,W.newDocument=null,W;else if(Y.op==="_get")return Y.value=$,W;else if(X)throw new t7("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",Q,Y,$);else return W}else{if(!G)$=xY($);var Z=Y.path||"",K=Z.split("/"),H=$,z=1,V=K.length,A=void 0,F=void 0,N=void 0;if(typeof X=="function")N=X;else N=lx;while(!0){if(F=K[z],F&&F.indexOf("~")!=-1)F=_I(F);if(J&&(F=="__proto__"||F=="prototype"&&z>0&&K[z-1]=="constructor"))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(X){if(A===void 0){if(H[F]===void 0)A=K.slice(0,z).join("/");else if(z==V-1)A=Y.path;if(A!==void 0)N(Y,0,$,A)}}if(z++,Array.isArray(H)){if(F==="-")F=H.length;else if(X&&!ms(F))throw new t7("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",Q,Y,$);else if(ms(F))F=~~F;if(z>=V){if(X&&Y.op==="add"&&F>H.length)throw new t7("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",Q,Y,$);var W=jr6[Y.op].call(Y,H,F,$);if(W.test===!1)throw new t7("Test operation failed","TEST_OPERATION_FAILED",Q,Y,$);return W}}else if(z>=V){var W=TI[Y.op].call(Y,H,F,$);if(W.test===!1)throw new t7("Test operation failed","TEST_OPERATION_FAILED",Q,Y,$);return W}if(H=H[F],X&&z<V&&(!H||typeof H!=="object"))throw new t7("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",Q,Y,$)}}}function ix($,Y,X,G,J){if(G===void 0)G=!0;if(J===void 0)J=!0;if(X){if(!Array.isArray(Y))throw new t7("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY")}if(!G)$=xY($);var Q=Array(Y.length);for(var W=0,Z=Y.length;W<Z;W++)Q[W]=rA($,Y[W],X,!0,J,W),$=Q[W].newDocument;return Q.newDocument=$,Q}function HO1($,Y,X){var G=rA($,Y);if(G.test===!1)throw new t7("Test operation failed","TEST_OPERATION_FAILED",X,Y,$);return G.newDocument}function lx($,Y,X,G){if(typeof $!=="object"||$===null||Array.isArray($))throw new t7("Operation is not an object","OPERATION_NOT_AN_OBJECT",Y,$,X);else if(!TI[$.op])throw new t7("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",Y,$,X);else if(typeof $.path!=="string")throw new t7("Operation `path` property is not a string","OPERATION_PATH_INVALID",Y,$,X);else if($.path.indexOf("/")!==0&&$.path.length>0)throw new t7('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",Y,$,X);else if(($.op==="move"||$.op==="copy")&&typeof $.from!=="string")throw new t7("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",Y,$,X);else if(($.op==="add"||$.op==="replace"||$.op==="test")&&$.value===void 0)throw new t7("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",Y,$,X);else if(($.op==="add"||$.op==="replace"||$.op==="test")&&hs($.value))throw new t7("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",Y,$,X);else if(X){if($.op=="add"){var J=$.path.split("/").length,Q=G.split("/").length;if(J!==Q+1&&J!==Q)throw new t7("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",Y,$,X)}else if($.op==="replace"||$.op==="remove"||$.op==="_get"){if($.path!==G)throw new t7("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",Y,$,X)}else if($.op==="move"||$.op==="copy"){var W={op:"_get",path:$.from,value:void 0},Z=UA0([W],X);if(Z&&Z.name==="OPERATION_PATH_UNRESOLVABLE")throw new t7("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",Y,$,X)}}}function UA0($,Y,X){try{if(!Array.isArray($))throw new t7("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(Y)ix(xY(Y),xY($),X||!0);else{X=X||lx;for(var G=0;G<$.length;G++)X($[G],G,Y,void 0)}}catch(J){if(J instanceof t7)return J;else throw J}}function CI($,Y){if($===Y)return!0;if($&&Y&&typeof $=="object"&&typeof Y=="object"){var X=Array.isArray($),G=Array.isArray(Y),J,Q,W;if(X&&G){if(Q=$.length,Q!=Y.length)return!1;for(J=Q;J--!==0;)if(!CI($[J],Y[J]))return!1;return!0}if(X!=G)return!1;var Z=Object.keys($);if(Q=Z.length,Q!==Object.keys(Y).length)return!1;for(J=Q;J--!==0;)if(!Y.hasOwnProperty(Z[J]))return!1;for(J=Q;J--!==0;)if(W=Z[J],!CI($[W],Y[W]))return!1;return!0}return $!==$&&Y!==Y}var AA0={};W8(AA0,{unobserve:()=>zO1,observe:()=>VO1,generate:()=>us,compare:()=>AO1});/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2021 Joachim Wester
 * MIT license
 */var zA0=new WeakMap,Tr6=function(){function $(Y){this.observers=new Map,this.obj=Y}return $}(),Cr6=function(){function $(Y,X){this.callback=Y,this.observer=X}return $}();function Sr6($){return zA0.get($)}function kr6($,Y){return $.observers.get(Y)}function vr6($,Y){$.observers.delete(Y.callback)}function zO1($,Y){Y.unobserve()}function VO1($,Y){var X=[],G,J=Sr6($);if(!J)J=new Tr6($),zA0.set($,J);else{var Q=kr6(J,Y);G=Q&&Q.observer}if(G)return G;if(G={},J.value=xY($),Y){G.callback=Y,G.next=null;var W=function(){us(G)},Z=function(){clearTimeout(G.next),G.next=setTimeout(W)};if(typeof window<"u")window.addEventListener("mouseup",Z),window.addEventListener("keyup",Z),window.addEventListener("mousedown",Z),window.addEventListener("keydown",Z),window.addEventListener("change",Z)}return G.patches=X,G.object=$,G.unobserve=function(){if(us(G),clearTimeout(G.next),vr6(J,G),typeof window<"u")window.removeEventListener("mouseup",Z),window.removeEventListener("keyup",Z),window.removeEventListener("mousedown",Z),window.removeEventListener("keydown",Z),window.removeEventListener("change",Z)},J.observers.set(Y,new Cr6(Y,G)),G}function us($,Y){if(Y===void 0)Y=!1;var X=zA0.get($.object);if(VA0(X.value,$.object,$.patches,"",Y),$.patches.length)ix(X.value,$.patches);var G=$.patches;if(G.length>0){if($.patches=[],$.callback)$.callback(G)}return G}function VA0($,Y,X,G,J){if(Y===$)return;if(typeof Y.toJSON==="function")Y=Y.toJSON();var Q=gs(Y),W=gs($),Z=!1,K=!1;for(var H=W.length-1;H>=0;H--){var z=W[H],V=$[z];if(fs(Y,z)&&!(Y[z]===void 0&&V!==void 0&&Array.isArray(Y)===!1)){var A=Y[z];if(typeof V=="object"&&V!=null&&typeof A=="object"&&A!=null&&Array.isArray(V)===Array.isArray(A))VA0(V,A,X,G+"/"+a2(z),J);else if(V!==A){if(Z=!0,J)X.push({op:"test",path:G+"/"+a2(z),value:xY(V)});X.push({op:"replace",path:G+"/"+a2(z),value:xY(A)})}}else if(Array.isArray($)===Array.isArray(Y)){if(J)X.push({op:"test",path:G+"/"+a2(z),value:xY(V)});X.push({op:"remove",path:G+"/"+a2(z)}),K=!0}else{if(J)X.push({op:"test",path:G,value:$});X.push({op:"replace",path:G,value:Y}),Z=!0}}if(!K&&Q.length==W.length)return;for(var H=0;H<Q.length;H++){var z=Q[H];if(!fs($,z)&&Y[z]!==void 0)X.push({op:"add",path:G+"/"+a2(z),value:xY(Y[z])})}}function AO1($,Y,X){if(X===void 0)X=!1;var G=[];return VA0($,Y,G,"",X),G}var xr6=Object.assign({},HA0,AA0,{JsonPatchError:jI,deepClone:xY,escapePathComponent:a2,unescapePathComponent:_I});var EA0={};W8(EA0,{version:()=>_O1,validate:()=>aA,v7:()=>wO1,v6ToV1:()=>BA0,v6:()=>IO1,v5:()=>qO1,v4:()=>MO1,v3:()=>EO1,v1ToV6:()=>rx,v1:()=>cs,stringify:()=>LO1,parse:()=>Uz,NIL:()=>DO1,MAX:()=>FO1});var FO1="ffffffff-ffff-ffff-ffff-ffffffffffff";var DO1="00000000-0000-0000-0000-000000000000";var NO1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function yr6($){return typeof $==="string"&&NO1.test($)}var aA=yr6;function br6($){if(!aA($))throw TypeError("Invalid UUID");let Y;return Uint8Array.of((Y=parseInt($.slice(0,8),16))>>>24,Y>>>16&255,Y>>>8&255,Y&255,(Y=parseInt($.slice(9,13),16))>>>8,Y&255,(Y=parseInt($.slice(14,18),16))>>>8,Y&255,(Y=parseInt($.slice(19,23),16))>>>8,Y&255,(Y=parseInt($.slice(24,36),16))/1099511627776&255,Y/4294967296&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y&255)}var Uz=br6;var zX=[];for(let $=0;$<256;++$)zX.push(($+256).toString(16).slice(1));function vG($,Y=0){return(zX[$[Y+0]]+zX[$[Y+1]]+zX[$[Y+2]]+zX[$[Y+3]]+"-"+zX[$[Y+4]]+zX[$[Y+5]]+"-"+zX[$[Y+6]]+zX[$[Y+7]]+"-"+zX[$[Y+8]]+zX[$[Y+9]]+"-"+zX[$[Y+10]]+zX[$[Y+11]]+zX[$[Y+12]]+zX[$[Y+13]]+zX[$[Y+14]]+zX[$[Y+15]]).toLowerCase()}function hr6($,Y=0){let X=vG($,Y);if(!aA(X))throw TypeError("Stringified UUID is invalid");return X}var LO1=hr6;import{randomFillSync as fr6}from"crypto";var ds=new Uint8Array(256),ps=ds.length;function Hz(){if(ps>ds.length-16)fr6(ds),ps=0;return ds.slice(ps,ps+=16)}var nx={};function gr6($,Y,X){let G,J=$?._v6??!1;if($){let Q=Object.keys($);if(Q.length===1&&Q[0]==="_v6")$=void 0}if($)G=BO1($.random??$.rng?.()??Hz(),$.msecs,$.nsecs,$.clockseq,$.node,Y,X);else{let Q=Date.now(),W=Hz();mr6(nx,Q,W),G=BO1(W,nx.msecs,nx.nsecs,J?void 0:nx.clockseq,J?void 0:nx.node,Y,X)}return Y??vG(G)}function mr6($,Y,X){if($.msecs??=-1/0,$.nsecs??=0,Y===$.msecs){if($.nsecs++,$.nsecs>=1e4)$.node=void 0,$.nsecs=0}else if(Y>$.msecs)$.nsecs=0;else if(Y<$.msecs)$.node=void 0;if(!$.node)$.node=X.slice(10,16),$.node[0]|=1,$.clockseq=(X[8]<<8|X[9])&16383;return $.msecs=Y,$}function BO1($,Y,X,G,J,Q,W=0){if($.length<16)throw Error("Random bytes length must be >= 16");if(!Q)Q=new Uint8Array(16),W=0;else if(W<0||W+16>Q.length)throw RangeError(`UUID byte range ${W}:${W+15} is out of buffer bounds`);Y??=Date.now(),X??=0,G??=($[8]<<8|$[9])&16383,J??=$.slice(10,16),Y+=12219292800000;let Z=((Y&268435455)*1e4+X)%4294967296;Q[W++]=Z>>>24&255,Q[W++]=Z>>>16&255,Q[W++]=Z>>>8&255,Q[W++]=Z&255;let K=Y/4294967296*1e4&268435455;Q[W++]=K>>>8&255,Q[W++]=K&255,Q[W++]=K>>>24&15|16,Q[W++]=K>>>16&255,Q[W++]=G>>>8|128,Q[W++]=G&255;for(let H=0;H<6;++H)Q[W++]=J[H];return Q}var cs=gr6;function rx($){let Y=typeof $==="string"?Uz($):$,X=ur6(Y);return typeof $==="string"?vG(X):X}function ur6($){return Uint8Array.of(($[6]&15)<<4|$[7]>>4&15,($[7]&15)<<4|($[4]&240)>>4,($[4]&15)<<4|($[5]&240)>>4,($[5]&15)<<4|($[0]&240)>>4,($[0]&15)<<4|($[1]&240)>>4,($[1]&15)<<4|($[2]&240)>>4,96|$[2]&15,$[3],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15])}import{createHash as pr6}from"crypto";function dr6($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return pr6("md5").update($).digest()}var OO1=dr6;function cr6($){$=unescape(encodeURIComponent($));let Y=new Uint8Array($.length);for(let X=0;X<$.length;++X)Y[X]=$.charCodeAt(X);return Y}var ls="6ba7b810-9dad-11d1-80b4-00c04fd430c8",is="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function ax($,Y,X,G,J,Q){let W=typeof X==="string"?cr6(X):X,Z=typeof G==="string"?Uz(G):G;if(typeof G==="string")G=Uz(G);if(G?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let K=new Uint8Array(16+W.length);if(K.set(Z),K.set(W,Z.length),K=Y(K),K[6]=K[6]&15|$,K[8]=K[8]&63|128,J){if(Q=Q||0,Q<0||Q+16>J.length)throw RangeError(`UUID byte range ${Q}:${Q+15} is out of buffer bounds`);for(let H=0;H<16;++H)J[Q+H]=K[H];return J}return vG(K)}function DA0($,Y,X,G){return ax(48,OO1,$,Y,X,G)}DA0.DNS=ls;DA0.URL=is;var EO1=DA0;import{randomUUID as lr6}from"crypto";var NA0={randomUUID:lr6};function ir6($,Y,X){if(NA0.randomUUID&&!Y&&!$)return NA0.randomUUID();$=$||{};let G=$.random??$.rng?.()??Hz();if(G.length<16)throw Error("Random bytes length must be >= 16");if(G[6]=G[6]&15|64,G[8]=G[8]&63|128,Y){if(X=X||0,X<0||X+16>Y.length)throw RangeError(`UUID byte range ${X}:${X+15} is out of buffer bounds`);for(let J=0;J<16;++J)Y[X+J]=G[J];return Y}return vG(G)}var MO1=ir6;import{createHash as nr6}from"crypto";function rr6($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return nr6("sha1").update($).digest()}var RO1=rr6;function LA0($,Y,X,G){return ax(80,RO1,$,Y,X,G)}LA0.DNS=ls;LA0.URL=is;var qO1=LA0;function ar6($,Y,X){$??={},X??=0;let G=cs({...$,_v6:!0},new Uint8Array(16));if(G=rx(G),Y){if(X<0||X+16>Y.length)throw RangeError(`UUID byte range ${X}:${X+15} is out of buffer bounds`);for(let J=0;J<16;J++)Y[X+J]=G[J];return Y}return vG(G)}var IO1=ar6;function BA0($){let Y=typeof $==="string"?Uz($):$,X=sr6(Y);return typeof $==="string"?vG(X):X}function sr6($){return Uint8Array.of(($[3]&15)<<4|$[4]>>4&15,($[4]&15)<<4|($[5]&240)>>4,($[5]&15)<<4|$[6]&15,$[7],($[1]&15)<<4|($[2]&240)>>4,($[2]&15)<<4|($[3]&240)>>4,16|($[0]&240)>>4,($[0]&15)<<4|($[1]&240)>>4,$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15])}var OA0={};function or6($,Y,X){let G;if($)G=PO1($.random??$.rng?.()??Hz(),$.msecs,$.seq,Y,X);else{let J=Date.now(),Q=Hz();tr6(OA0,J,Q),G=PO1(Q,OA0.msecs,OA0.seq,Y,X)}return Y??vG(G)}function tr6($,Y,X){if($.msecs??=-1/0,$.seq??=0,Y>$.msecs)$.seq=X[6]<<23|X[7]<<16|X[8]<<8|X[9],$.msecs=Y;else if($.seq=$.seq+1|0,$.seq===0)$.msecs++;return $}function PO1($,Y,X,G,J=0){if($.length<16)throw Error("Random bytes length must be >= 16");if(!G)G=new Uint8Array(16),J=0;else if(J<0||J+16>G.length)throw RangeError(`UUID byte range ${J}:${J+15} is out of buffer bounds`);return Y??=Date.now(),X??=$[6]*127<<24|$[7]<<16|$[8]<<8|$[9],G[J++]=Y/1099511627776&255,G[J++]=Y/4294967296&255,G[J++]=Y/16777216&255,G[J++]=Y/65536&255,G[J++]=Y/256&255,G[J++]=Y&255,G[J++]=112|X>>>28&15,G[J++]=X>>>20&255,G[J++]=128|X>>>14&63,G[J++]=X>>>6&255,G[J++]=X<<2&255|$[10]&3,G[J++]=$[11],G[J++]=$[12],G[J++]=$[13],G[J++]=$[14],G[J++]=$[15],G}var wO1=or6;function er6($){if(!aA($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)}var _O1=er6;var mF0={};W8(mF0,{toFormData:()=>I08,spread:()=>q08,mergeConfig:()=>T08,isCancel:()=>L08,isAxiosError:()=>R08,getAdapter:()=>j08,formToJSON:()=>_08,default:()=>gF0,create:()=>C08,all:()=>E08,VERSION:()=>O08,HttpStatusCode:()=>w08,CanceledError:()=>N08,CancelToken:()=>B08,Cancel:()=>M08,AxiosHeaders:()=>P08,AxiosError:()=>D08,Axios:()=>F08});function sx($,Y){return function(){return $.apply(Y,arguments)}}var{toString:$a6}=Object.prototype,{getPrototypeOf:rs}=Object,{iterator:as,toStringTag:CO1}=Symbol,ss=(($)=>(Y)=>{let X=$a6.call(Y);return $[X]||($[X]=X.slice(8,-1).toLowerCase())})(Object.create(null)),s2=($)=>{return $=$.toLowerCase(),(Y)=>ss(Y)===$},os=($)=>(Y)=>typeof Y===$,{isArray:kI}=Array,SI=os("undefined");function ox($){return $!==null&&!SI($)&&$.constructor!==null&&!SI($.constructor)&&eJ($.constructor.isBuffer)&&$.constructor.isBuffer($)}var SO1=s2("ArrayBuffer");function Ya6($){let Y;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)Y=ArrayBuffer.isView($);else Y=$&&$.buffer&&SO1($.buffer);return Y}var Xa6=os("string"),eJ=os("function"),kO1=os("number"),tx=($)=>$!==null&&typeof $==="object",Ga6=($)=>$===!0||$===!1,ns=($)=>{if(ss($)!=="object")return!1;let Y=rs($);return(Y===null||Y===Object.prototype||Object.getPrototypeOf(Y)===null)&&!(CO1 in $)&&!(as in $)},Ja6=($)=>{if(!tx($)||ox($))return!1;try{return Object.keys($).length===0&&Object.getPrototypeOf($)===Object.prototype}catch(Y){return!1}},Qa6=s2("Date"),Wa6=s2("File"),Za6=($)=>{return!!($&&typeof $.uri<"u")},Ka6=($)=>$&&typeof $.getParts<"u",Ua6=s2("Blob"),Ha6=s2("FileList"),za6=($)=>tx($)&&eJ($.pipe);function Va6(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}var jO1=Va6(),TO1=typeof jO1.FormData<"u"?jO1.FormData:void 0,Aa6=($)=>{if(!$)return!1;if(TO1&&$ instanceof TO1)return!0;let Y=rs($);if(!Y||Y===Object.prototype)return!1;if(!eJ($.append))return!1;let X=ss($);return X==="formdata"||X==="object"&&eJ($.toString)&&$.toString()==="[object FormData]"},Fa6=s2("URLSearchParams"),[Da6,Na6,La6,Ba6]=["ReadableStream","Request","Response","Headers"].map(s2),Oa6=($)=>{return $.trim?$.trim():$.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function ex($,Y,{allOwnKeys:X=!1}={}){if($===null||typeof $>"u")return;let G,J;if(typeof $!=="object")$=[$];if(kI($))for(G=0,J=$.length;G<J;G++)Y.call(null,$[G],G,$);else{if(ox($))return;let Q=X?Object.getOwnPropertyNames($):Object.keys($),W=Q.length,Z;for(G=0;G<W;G++)Z=Q[G],Y.call(null,$[Z],Z,$)}}function vO1($,Y){if(ox($))return null;Y=Y.toLowerCase();let X=Object.keys($),G=X.length,J;while(G-- >0)if(J=X[G],Y===J.toLowerCase())return J;return null}var KB=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})(),xO1=($)=>!SI($)&&$!==KB;function MA0(...$){let{caseless:Y,skipUndefined:X}=xO1(this)&&this||{},G={},J=(Q,W)=>{if(W==="__proto__"||W==="constructor"||W==="prototype")return;let Z=Y&&vO1(G,W)||W,K=RA0(G,Z)?G[Z]:void 0;if(ns(K)&&ns(Q))G[Z]=MA0(K,Q);else if(ns(Q))G[Z]=MA0({},Q);else if(kI(Q))G[Z]=Q.slice();else if(!X||!SI(Q))G[Z]=Q};for(let Q=0,W=$.length;Q<W;Q++)$[Q]&&ex($[Q],J);return G}var Ea6=($,Y,X,{allOwnKeys:G}={})=>{return ex(Y,(J,Q)=>{if(X&&eJ(J))Object.defineProperty($,Q,{__proto__:null,value:sx(J,X),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty($,Q,{__proto__:null,value:J,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:G}),$},Ma6=($)=>{if($.charCodeAt(0)===65279)$=$.slice(1);return $},Ra6=($,Y,X,G)=>{$.prototype=Object.create(Y.prototype,G),Object.defineProperty($.prototype,"constructor",{__proto__:null,value:$,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($,"super",{__proto__:null,value:Y.prototype}),X&&Object.assign($.prototype,X)},qa6=($,Y,X,G)=>{let J,Q,W,Z={};if(Y=Y||{},$==null)return Y;do{J=Object.getOwnPropertyNames($),Q=J.length;while(Q-- >0)if(W=J[Q],(!G||G(W,$,Y))&&!Z[W])Y[W]=$[W],Z[W]=!0;$=X!==!1&&rs($)}while($&&(!X||X($,Y))&&$!==Object.prototype);return Y},Ia6=($,Y,X)=>{if($=String($),X===void 0||X>$.length)X=$.length;X-=Y.length;let G=$.indexOf(Y,X);return G!==-1&&G===X},Pa6=($)=>{if(!$)return null;if(kI($))return $;let Y=$.length;if(!kO1(Y))return null;let X=Array(Y);while(Y-- >0)X[Y]=$[Y];return X},wa6=(($)=>{return(Y)=>{return $&&Y instanceof $}})(typeof Uint8Array<"u"&&rs(Uint8Array)),_a6=($,Y)=>{let G=($&&$[as]).call($),J;while((J=G.next())&&!J.done){let Q=J.value;Y.call($,Q[0],Q[1])}},ja6=($,Y)=>{let X,G=[];while((X=$.exec(Y))!==null)G.push(X);return G},Ta6=s2("HTMLFormElement"),Ca6=($)=>{return $.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(X,G,J){return G.toUpperCase()+J})},RA0=(({hasOwnProperty:$})=>(Y,X)=>$.call(Y,X))(Object.prototype),Sa6=s2("RegExp"),yO1=($,Y)=>{let X=Object.getOwnPropertyDescriptors($),G={};ex(X,(J,Q)=>{let W;if((W=Y(J,Q,$))!==!1)G[Q]=W||J}),Object.defineProperties($,G)},ka6=($)=>{yO1($,(Y,X)=>{if(eJ($)&&["arguments","caller","callee"].includes(X))return!1;let G=$[X];if(!eJ(G))return;if(Y.enumerable=!1,"writable"in Y){Y.writable=!1;return}if(!Y.set)Y.set=()=>{throw Error("Can not rewrite read-only method '"+X+"'")}})},va6=($,Y)=>{let X={},G=(J)=>{J.forEach((Q)=>{X[Q]=!0})};return kI($)?G($):G(String($).split(Y)),X},xa6=()=>{},ya6=($,Y)=>{return $!=null&&Number.isFinite($=+$)?$:Y};function ba6($){return!!($&&eJ($.append)&&$[CO1]==="FormData"&&$[as])}var ha6=($)=>{let Y=new WeakSet,X=(G)=>{if(tx(G)){if(Y.has(G))return;if(ox(G))return G;if(!("toJSON"in G)){Y.add(G);let J=kI(G)?[]:{};return ex(G,(Q,W)=>{let Z=X(Q);!SI(Z)&&(J[W]=Z)}),Y.delete(G),J}}return G};return X($)},fa6=s2("AsyncFunction"),ga6=($)=>$&&(tx($)||eJ($))&&eJ($.then)&&eJ($.catch),bO1=(($,Y)=>{if($)return setImmediate;return Y?((X,G)=>{return KB.addEventListener("message",({source:J,data:Q})=>{if(J===KB&&Q===X)G.length&&G.shift()()},!1),(J)=>{G.push(J),KB.postMessage(X,"*")}})(`axios@${Math.random()}`,[]):(X)=>setTimeout(X)})(typeof setImmediate==="function",eJ(KB.postMessage)),ma6=typeof queueMicrotask<"u"?queueMicrotask.bind(KB):typeof process<"u"&&process.nextTick||bO1,ua6=($)=>$!=null&&eJ($[as]),w0={isArray:kI,isArrayBuffer:SO1,isBuffer:ox,isFormData:Aa6,isArrayBufferView:Ya6,isString:Xa6,isNumber:kO1,isBoolean:Ga6,isObject:tx,isPlainObject:ns,isEmptyObject:Ja6,isReadableStream:Da6,isRequest:Na6,isResponse:La6,isHeaders:Ba6,isUndefined:SI,isDate:Qa6,isFile:Wa6,isReactNativeBlob:Za6,isReactNative:Ka6,isBlob:Ua6,isRegExp:Sa6,isFunction:eJ,isStream:za6,isURLSearchParams:Fa6,isTypedArray:wa6,isFileList:Ha6,forEach:ex,merge:MA0,extend:Ea6,trim:Oa6,stripBOM:Ma6,inherits:Ra6,toFlatObject:qa6,kindOf:ss,kindOfTest:s2,endsWith:Ia6,toArray:Pa6,forEachEntry:_a6,matchAll:ja6,isHTMLForm:Ta6,hasOwnProperty:RA0,hasOwnProp:RA0,reduceDescriptors:yO1,freezeMethods:ka6,toObjectSet:va6,toCamelCase:Ca6,noop:xa6,toFiniteNumber:ya6,findKey:vO1,global:KB,isContextDefined:xO1,isSpecCompliantForm:ba6,toJSONObject:ha6,isAsyncFn:fa6,isThenable:ga6,setImmediate:bO1,asap:ma6,isIterable:ua6};var pa6=w0.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hO1=($)=>{let Y={},X,G,J;return $&&$.split(`
`).forEach(function(W){if(J=W.indexOf(":"),X=W.substring(0,J).trim().toLowerCase(),G=W.substring(J+1).trim(),!X||Y[X]&&pa6[X])return;if(X==="set-cookie")if(Y[X])Y[X].push(G);else Y[X]=[G];else Y[X]=Y[X]?Y[X]+", "+G:G}),Y};function da6($){let Y=0,X=$.length;while(Y<X){let G=$.charCodeAt(Y);if(G!==9&&G!==32)break;Y+=1}while(X>Y){let G=$.charCodeAt(X-1);if(G!==9&&G!==32)break;X-=1}return Y===0&&X===$.length?$:$.slice(Y,X)}var ca6=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),la6=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function qA0($,Y){if(w0.isArray($))return $.map((X)=>qA0(X,Y));return da6(String($).replace(Y,""))}var fO1=($)=>qA0($,ca6),ia6=($)=>qA0($,la6);function vI($){let Y=Object.create(null);return w0.forEach($.toJSON(),(X,G)=>{Y[G]=ia6(X)}),Y}var gO1=Symbol("internals");function $y($){return $&&String($).trim().toLowerCase()}function ts($){if($===!1||$==null)return $;return w0.isArray($)?$.map(ts):fO1(String($))}function na6($){let Y=Object.create(null),X=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,G;while(G=X.exec($))Y[G[1]]=G[2];return Y}var ra6=($)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test($.trim());function IA0($,Y,X,G,J){if(w0.isFunction(G))return G.call(this,Y,X);if(J)Y=X;if(!w0.isString(Y))return;if(w0.isString(G))return Y.indexOf(G)!==-1;if(w0.isRegExp(G))return G.test(Y)}function aa6($){return $.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Y,X,G)=>{return X.toUpperCase()+G})}function sa6($,Y){let X=w0.toCamelCase(" "+Y);["get","set","has"].forEach((G)=>{Object.defineProperty($,G+X,{__proto__:null,value:function(J,Q,W){return this[G].call(this,Y,J,Q,W)},configurable:!0})})}class Yy{constructor($){$&&this.set($)}set($,Y,X){let G=this;function J(W,Z,K){let H=$y(Z);if(!H)throw Error("header name must be a non-empty string");let z=w0.findKey(G,H);if(!z||G[z]===void 0||K===!0||K===void 0&&G[z]!==!1)G[z||Z]=ts(W)}let Q=(W,Z)=>w0.forEach(W,(K,H)=>J(K,H,Z));if(w0.isPlainObject($)||$ instanceof this.constructor)Q($,Y);else if(w0.isString($)&&($=$.trim())&&!ra6($))Q(hO1($),Y);else if(w0.isObject($)&&w0.isIterable($)){let W={},Z,K;for(let H of $){if(!w0.isArray(H))throw TypeError("Object iterator must return a key-value pair");W[K=H[0]]=(Z=W[K])?w0.isArray(Z)?[...Z,H[1]]:[Z,H[1]]:H[1]}Q(W,Y)}else $!=null&&J(Y,$,X);return this}get($,Y){if($=$y($),$){let X=w0.findKey(this,$);if(X){let G=this[X];if(!Y)return G;if(Y===!0)return na6(G);if(w0.isFunction(Y))return Y.call(this,G,X);if(w0.isRegExp(Y))return Y.exec(G);throw TypeError("parser must be boolean|regexp|function")}}}has($,Y){if($=$y($),$){let X=w0.findKey(this,$);return!!(X&&this[X]!==void 0&&(!Y||IA0(this,this[X],X,Y)))}return!1}delete($,Y){let X=this,G=!1;function J(Q){if(Q=$y(Q),Q){let W=w0.findKey(X,Q);if(W&&(!Y||IA0(X,X[W],W,Y)))delete X[W],G=!0}}if(w0.isArray($))$.forEach(J);else J($);return G}clear($){let Y=Object.keys(this),X=Y.length,G=!1;while(X--){let J=Y[X];if(!$||IA0(this,this[J],J,$,!0))delete this[J],G=!0}return G}normalize($){let Y=this,X={};return w0.forEach(this,(G,J)=>{let Q=w0.findKey(X,J);if(Q){Y[Q]=ts(G),delete Y[J];return}let W=$?aa6(J):String(J).trim();if(W!==J)delete Y[J];Y[W]=ts(G),X[W]=!0}),this}concat(...$){return this.constructor.concat(this,...$)}toJSON($){let Y=Object.create(null);return w0.forEach(this,(X,G)=>{X!=null&&X!==!1&&(Y[G]=$&&w0.isArray(X)?X.join(", "):X)}),Y}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([$,Y])=>$+": "+Y).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from($){return $ instanceof this?$:new this($)}static concat($,...Y){let X=new this($);return Y.forEach((G)=>X.set(G)),X}static accessor($){let X=(this[gO1]=this[gO1]={accessors:{}}).accessors,G=this.prototype;function J(Q){let W=$y(Q);if(!X[W])sa6(G,Q),X[W]=!0}return w0.isArray($)?$.forEach(J):J($),this}}Yy.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);w0.reduceDescriptors(Yy.prototype,({value:$},Y)=>{let X=Y[0].toUpperCase()+Y.slice(1);return{get:()=>$,set(G){this[X]=G}}});w0.freezeMethods(Yy);var t5=Yy;var oa6="[REDACTED ****]";function ta6($){if(w0.hasOwnProp($,"toJSON"))return!0;let Y=Object.getPrototypeOf($);while(Y&&Y!==Object.prototype){if(w0.hasOwnProp(Y,"toJSON"))return!0;Y=Object.getPrototypeOf(Y)}return!1}function ea6($,Y){let X=new Set(Y.map((Q)=>String(Q).toLowerCase())),G=[],J=(Q)=>{if(Q===null||typeof Q!=="object")return Q;if(w0.isBuffer(Q))return Q;if(G.indexOf(Q)!==-1)return;if(Q instanceof t5)Q=Q.toJSON();G.push(Q);let W;if(w0.isArray(Q))W=[],Q.forEach((Z,K)=>{let H=J(Z);if(!w0.isUndefined(H))W[K]=H});else{if(!w0.isPlainObject(Q)&&ta6(Q))return G.pop(),Q;W=Object.create(null);for(let[Z,K]of Object.entries(Q)){let H=X.has(Z.toLowerCase())?oa6:J(K);if(!w0.isUndefined(H))W[Z]=H}}return G.pop(),W};return J($)}class VX extends Error{static from($,Y,X,G,J,Q){let W=new VX($.message,Y||$.code,X,G,J);if(W.cause=$,W.name=$.name,$.status!=null&&W.status==null)W.status=$.status;return Q&&Object.assign(W,Q),W}constructor($,Y,X,G,J){super($);if(Object.defineProperty(this,"message",{__proto__:null,value:$,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,Y&&(this.code=Y),X&&(this.config=X),G&&(this.request=G),J)this.response=J,this.status=J.status}toJSON(){let $=this.config,Y=$&&w0.hasOwnProp($,"redact")?$.redact:void 0,X=w0.isArray(Y)&&Y.length>0?ea6($,Y):w0.toJSONObject($);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X,code:this.code,status:this.status}}}VX.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";VX.ERR_BAD_OPTION="ERR_BAD_OPTION";VX.ECONNABORTED="ECONNABORTED";VX.ETIMEDOUT="ETIMEDOUT";VX.ECONNREFUSED="ECONNREFUSED";VX.ERR_NETWORK="ERR_NETWORK";VX.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";VX.ERR_DEPRECATED="ERR_DEPRECATED";VX.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";VX.ERR_BAD_REQUEST="ERR_BAD_REQUEST";VX.ERR_CANCELED="ERR_CANCELED";VX.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";VX.ERR_INVALID_URL="ERR_INVALID_URL";VX.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var D1=VX;var pM1=U6(uM1(),1),Uo=pM1.default;function rA0($){return w0.isPlainObject($)||w0.isArray($)}function dM1($){return w0.endsWith($,"[]")?$.slice(0,-2):$}function nA0($,Y,X){if(!$)return Y;return $.concat(Y).map(function(J,Q){return J=dM1(J),!X&&Q?"["+J+"]":J}).join(X?".":"")}function po6($){return w0.isArray($)&&!$.some(rA0)}var do6=w0.toFlatObject(w0,{},null,function(Y){return/^is[A-Z]/.test(Y)});function co6($,Y,X){if(!w0.isObject($))throw TypeError("target must be an object");Y=Y||new(Uo||FormData),X=w0.toFlatObject(X,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,B){return!w0.isUndefined(B[L])});let G=X.metaTokens,J=X.visitor||V,Q=X.dots,W=X.indexes,Z=X.Blob||typeof Blob<"u"&&Blob,K=X.maxDepth===void 0?100:X.maxDepth,H=Z&&w0.isSpecCompliantForm(Y);if(!w0.isFunction(J))throw TypeError("visitor must be a function");function z(D){if(D===null)return"";if(w0.isDate(D))return D.toISOString();if(w0.isBoolean(D))return D.toString();if(!H&&w0.isBlob(D))throw new D1("Blob is not supported. Use a Buffer instead.");if(w0.isArrayBuffer(D)||w0.isTypedArray(D))return H&&typeof Blob==="function"?new Blob([D]):Buffer.from(D);return D}function V(D,L,B){let O=D;if(w0.isReactNative(Y)&&w0.isReactNativeBlob(D))return Y.append(nA0(B,L,Q),z(D)),!1;if(D&&!B&&typeof D==="object"){if(w0.endsWith(L,"{}"))L=G?L:L.slice(0,-2),D=JSON.stringify(D);else if(w0.isArray(D)&&po6(D)||(w0.isFileList(D)||w0.endsWith(L,"[]"))&&(O=w0.toArray(D)))return L=dM1(L),O.forEach(function(M,R){!(w0.isUndefined(M)||M===null)&&Y.append(W===!0?nA0([L],R,Q):W===null?L:L+"[]",z(M))}),!1}if(rA0(D))return!0;return Y.append(nA0(B,L,Q),z(D)),!1}let A=[],F=Object.assign(do6,{defaultVisitor:V,convertValue:z,isVisitable:rA0});function N(D,L,B=0){if(w0.isUndefined(D))return;if(B>K)throw new D1("Object is too deeply nested ("+B+" levels). Max depth: "+K,D1.ERR_FORM_DATA_DEPTH_EXCEEDED);if(A.indexOf(D)!==-1)throw Error("Circular reference detected in "+L.join("."));A.push(D),w0.forEach(D,function(E,M){if((!(w0.isUndefined(E)||E===null)&&J.call(Y,E,w0.isString(M)?M.trim():M,L,F))===!0)N(E,L?L.concat(M):[M],B+1)}),A.pop()}if(!w0.isObject($))throw TypeError("data must be an object");return N($),Y}var oA=co6;function cM1($){let Y={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent($).replace(/[!'()~]|%20/g,function(G){return Y[G]})}function lM1($,Y){this._pairs=[],$&&oA($,this,Y)}var iM1=lM1.prototype;iM1.append=function(Y,X){this._pairs.push([Y,X])};iM1.toString=function(Y){let X=Y?function(G){return Y.call(this,G,cM1)}:cM1;return this._pairs.map(function(J){return X(J[0])+"="+X(J[1])},"").join("&")};var nM1=lM1;function lo6($){return encodeURIComponent($).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function HB($,Y,X){if(!Y)return $;let G=X&&X.encode||lo6,J=w0.isFunction(X)?{serialize:X}:X,Q=J&&J.serialize,W;if(Q)W=Q(Y,J);else W=w0.isURLSearchParams(Y)?Y.toString():new nM1(Y,J).toString(G);if(W){let Z=$.indexOf("#");if(Z!==-1)$=$.slice(0,Z);$+=($.indexOf("?")===-1?"?":"&")+W}return $}class rM1{constructor(){this.handlers=[]}use($,Y,X){return this.handlers.push({fulfilled:$,rejected:Y,synchronous:X?X.synchronous:!1,runWhen:X?X.runWhen:null}),this.handlers.length-1}eject($){if(this.handlers[$])this.handlers[$]=null}clear(){if(this.handlers)this.handlers=[]}forEach($){w0.forEach(this.handlers,function(X){if(X!==null)$(X)})}}var aA0=rM1;var tA={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};import no6 from"crypto";import io6 from"url";var aM1=io6.URLSearchParams;var sA0="abcdefghijklmnopqrstuvwxyz",sM1="0123456789",oM1={DIGIT:sM1,ALPHA:sA0,ALPHA_DIGIT:sA0+sA0.toUpperCase()+sM1},ro6=($=16,Y=oM1.ALPHA_DIGIT)=>{let X="",{length:G}=Y,J=new Uint32Array($);no6.randomFillSync(J);for(let Q=0;Q<$;Q++)X+=Y[J[Q]%G];return X},tM1={isNode:!0,classes:{URLSearchParams:aM1,FormData:Uo,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:oM1,generateString:ro6,protocols:["http","https","file","data"]};var eA0={};W8(eA0,{origin:()=>oo6,navigator:()=>oA0,hasStandardBrowserWebWorkerEnv:()=>so6,hasStandardBrowserEnv:()=>ao6,hasBrowserEnv:()=>tA0});var tA0=typeof window<"u"&&typeof document<"u",oA0=typeof navigator==="object"&&navigator||void 0,ao6=tA0&&(!oA0||["ReactNative","NativeScript","NS"].indexOf(oA0.product)<0),so6=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),oo6=tA0&&window.location.href||"http://localhost";var $9={...eA0,...tM1};function $F0($,Y){return oA($,new $9.classes.URLSearchParams,{visitor:function(X,G,J,Q){if($9.isNode&&w0.isBuffer(X))return this.append(G,X.toString("base64")),!1;return Q.defaultVisitor.apply(this,arguments)},...Y})}function to6($){return w0.matchAll(/\w+|\[(\w*)]/g,$).map((Y)=>{return Y[0]==="[]"?"":Y[1]||Y[0]})}function eo6($){let Y={},X=Object.keys($),G,J=X.length,Q;for(G=0;G<J;G++)Q=X[G],Y[Q]=$[Q];return Y}function $t6($){function Y(X,G,J,Q){let W=X[Q++];if(W==="__proto__")return!0;let Z=Number.isFinite(+W),K=Q>=X.length;if(W=!W&&w0.isArray(J)?J.length:W,K){if(w0.hasOwnProp(J,W))J[W]=w0.isArray(J[W])?J[W].concat(G):[J[W],G];else J[W]=G;return!Z}if(!w0.hasOwnProp(J,W)||!w0.isObject(J[W]))J[W]=[];if(Y(X,G,J[W],Q)&&w0.isArray(J[W]))J[W]=eo6(J[W]);return!Z}if(w0.isFormData($)&&w0.isFunction($.entries)){let X={};return w0.forEachEntry($,(G,J)=>{Y(to6(G),J,X,0)}),X}return null}var Ho=$t6;var fI=($,Y)=>$!=null&&w0.hasOwnProp($,Y)?$[Y]:void 0;function Yt6($,Y,X){if(w0.isString($))try{return(Y||JSON.parse)($),w0.trim($)}catch(G){if(G.name!=="SyntaxError")throw G}return(X||JSON.stringify)($)}var YF0={transitional:tA,adapter:["xhr","http","fetch"],transformRequest:[function(Y,X){let G=X.getContentType()||"",J=G.indexOf("application/json")>-1,Q=w0.isObject(Y);if(Q&&w0.isHTMLForm(Y))Y=new FormData(Y);if(w0.isFormData(Y))return J?JSON.stringify(Ho(Y)):Y;if(w0.isArrayBuffer(Y)||w0.isBuffer(Y)||w0.isStream(Y)||w0.isFile(Y)||w0.isBlob(Y)||w0.isReadableStream(Y))return Y;if(w0.isArrayBufferView(Y))return Y.buffer;if(w0.isURLSearchParams(Y))return X.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),Y.toString();let Z;if(Q){let K=fI(this,"formSerializer");if(G.indexOf("application/x-www-form-urlencoded")>-1)return $F0(Y,K).toString();if((Z=w0.isFileList(Y))||G.indexOf("multipart/form-data")>-1){let H=fI(this,"env"),z=H&&H.FormData;return oA(Z?{"files[]":Y}:Y,z&&new z,K)}}if(Q||J)return X.setContentType("application/json",!1),Yt6(Y);return Y}],transformResponse:[function(Y){let X=fI(this,"transitional")||YF0.transitional,G=X&&X.forcedJSONParsing,J=fI(this,"responseType"),Q=J==="json";if(w0.isResponse(Y)||w0.isReadableStream(Y))return Y;if(Y&&w0.isString(Y)&&(G&&!J||Q)){let Z=!(X&&X.silentJSONParsing)&&Q;try{return JSON.parse(Y,fI(this,"parseReviver"))}catch(K){if(Z){if(K.name==="SyntaxError")throw D1.from(K,D1.ERR_BAD_RESPONSE,this,null,fI(this,"response"));throw K}}}return Y}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$9.classes.FormData,Blob:$9.classes.Blob},validateStatus:function(Y){return Y>=200&&Y<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w0.forEach(["delete","get","head","post","put","patch","query"],($)=>{YF0.headers[$]={}});var gI=YF0;function Wy($,Y){let X=this||gI,G=Y||X,J=t5.from(G.headers),Q=G.data;return w0.forEach($,function(Z){Q=Z.call(X,Q,J.normalize(),Y?Y.status:void 0)}),J.normalize(),Q}function Zy($){return!!($&&$.__CANCEL__)}class eM1 extends D1{constructor($,Y,X){super($==null?"canceled":$,D1.ERR_CANCELED,Y,X);this.name="CanceledError",this.__CANCEL__=!0}}var ZW=eM1;function KU($,Y,X){let G=X.config.validateStatus;if(!X.status||!G||G(X.status))$(X);else Y(new D1("Request failed with status code "+X.status,X.status>=400&&X.status<500?D1.ERR_BAD_REQUEST:D1.ERR_BAD_RESPONSE,X.config,X.request,X))}function XF0($){if(typeof $!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test($)}function GF0($,Y){return Y?$.replace(/\/?\/$/,"")+"/"+Y.replace(/^\/+/,""):$}function zB($,Y,X){let G=!XF0(Y);if($&&(G||X===!1))return GF0($,Y);return Y}var Xt6={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Gt6($){try{return new URL($)}catch{return null}}function $R1($){var Y=(typeof $==="string"?Gt6($):$)||{},X=Y.protocol,G=Y.host,J=Y.port;if(typeof G!=="string"||!G||typeof X!=="string")return"";if(X=X.split(":",1)[0],G=G.replace(/:\d*$/,""),J=parseInt(J)||Xt6[X]||0,!Jt6(G,J))return"";var Q=JF0(X+"_proxy")||JF0("all_proxy");if(Q&&Q.indexOf("://")===-1)Q=X+"://"+Q;return Q}function Jt6($,Y){var X=JF0("no_proxy").toLowerCase();if(!X)return!0;if(X==="*")return!1;return X.split(/[,\s]/).every(function(G){if(!G)return!0;var J=G.match(/^(.+):(\d+)$/),Q=J?J[1]:G,W=J?parseInt(J[2]):0;if(W&&W!==Y)return!0;if(!/^[.*]/.test(Q))return $!==Q;if(Q.charAt(0)==="*")Q=Q.slice(1);return!$.endsWith(Q)})}function JF0($){return process.env[$.toLowerCase()]||process.env[$.toUpperCase()]||""}var CF0=U6(qR1(),1),$q1=U6(CR1(),1);import fe6 from"http";import ge6 from"https";import tR1 from"http2";import eR1 from"util";import{resolve as dR1}from"path";import eA from"zlib";var zz="1.16.1";function By($){let Y=/^([-+\w]{1,25}):(?:\/\/)?/.exec($);return Y&&Y[1]||""}var Be6=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function wF0($,Y,X){let G=X&&X.Blob||$9.classes.Blob,J=By($);if(Y===void 0&&G)Y=!0;if(J==="data"){$=J.length?$.slice(J.length+1):$;let Q=Be6.exec($);if(!Q)throw new D1("Invalid URL",D1.ERR_INVALID_URL);let W=Q[1],Z=Q[2],K=Q[3]?"base64":"utf8",H=Q[4],z;if(W)z=Z?W+Z:W;else if(Z)z="text/plain"+Z;let V=Buffer.from(decodeURIComponent(H),K);if(Y){if(!G)throw new D1("Blob is not supported",D1.ERR_NOT_SUPPORT);return new G([V],{type:z})}return V}throw new D1("Unsupported protocol "+J,D1.ERR_NOT_SUPPORT)}import t2 from"stream";import Oe6 from"stream";var _F0=Symbol("internals");class SR1 extends Oe6.Transform{constructor($){$=w0.toFlatObject($,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(X,G)=>{return!w0.isUndefined(G[X])});super({readableHighWaterMark:$.chunkSize});let Y=this[_F0]={timeWindow:$.timeWindow,chunkSize:$.chunkSize,maxRate:$.maxRate,minChunkSize:$.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(X)=>{if(X==="progress"){if(!Y.isCaptured)Y.isCaptured=!0}})}_read($){let Y=this[_F0];if(Y.onReadCallback)Y.onReadCallback();return super._read($)}_transform($,Y,X){let G=this[_F0],J=G.maxRate,Q=this.readableHighWaterMark,W=G.timeWindow,Z=1000/W,K=J/Z,H=G.minChunkSize!==!1?Math.max(G.minChunkSize,K*0.01):0,z=(A,F)=>{let N=Buffer.byteLength(A);if(G.bytesSeen+=N,G.bytes+=N,G.isCaptured&&this.emit("progress",G.bytesSeen),this.push(A))process.nextTick(F);else G.onReadCallback=()=>{G.onReadCallback=null,process.nextTick(F)}},V=(A,F)=>{let N=Buffer.byteLength(A),D=null,L=Q,B,O=0;if(J){let E=Date.now();if(!G.ts||(O=E-G.ts)>=W)G.ts=E,B=K-G.bytes,G.bytes=B<0?-B:0,O=0;B=K-G.bytes}if(J){if(B<=0)return setTimeout(()=>{F(null,A)},W-O);if(B<L)L=B}if(L&&N>L&&N-L>H)D=A.subarray(L),A=A.subarray(0,L);z(A,D?()=>{process.nextTick(F,null,D)}:F)};V($,function A(F,N){if(F)return X(F);if(N)V(N,A);else X(null)})}}var jF0=SR1;import{EventEmitter as me6}from"events";import Me6 from"util";import{Readable as Re6}from"stream";var{asyncIterator:kR1}=Symbol,Ee6=async function*($){if($.stream)yield*$.stream();else if($.arrayBuffer)yield await $.arrayBuffer();else if($[kR1])yield*$[kR1]();else yield $},No=Ee6;var qe6=$9.ALPHABET.ALPHA_DIGIT+"-_",Oy=typeof TextEncoder==="function"?new TextEncoder:new Me6.TextEncoder,NB=`\r
`,Ie6=Oy.encode(NB),Pe6=2;class vR1{constructor($,Y){let{escapeName:X}=this.constructor,G=w0.isString(Y),J=`Content-Disposition: form-data; name="${X($)}"${!G&&Y.name?`; filename="${X(Y.name)}"`:""}${NB}`;if(G)Y=Oy.encode(String(Y).replace(/\r?\n|\r\n?/g,NB));else{let Q=String(Y.type||"application/octet-stream").replace(/[\r\n]/g,"");J+=`Content-Type: ${Q}${NB}`}this.headers=Oy.encode(J+NB),this.contentLength=G?Y.byteLength:Y.size,this.size=this.headers.byteLength+this.contentLength+Pe6,this.name=$,this.value=Y}async*encode(){yield this.headers;let{value:$}=this;if(w0.isTypedArray($))yield $;else yield*No($);yield Ie6}static escapeName($){return String($).replace(/[\r\n"]/g,(Y)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[Y])}}var we6=($,Y,X)=>{let{tag:G="form-data-boundary",size:J=25,boundary:Q=G+"-"+$9.generateString(J,qe6)}=X||{};if(!w0.isFormData($))throw TypeError("FormData instance required");if(Q.length<1||Q.length>70)throw Error("boundary must be 1-70 characters long");let W=Oy.encode("--"+Q+NB),Z=Oy.encode("--"+Q+"--"+NB),K=Z.byteLength,H=Array.from($.entries()).map(([V,A])=>{let F=new vR1(V,A);return K+=F.size,F});K+=W.byteLength*H.length,K=w0.toFiniteNumber(K);let z={"Content-Type":`multipart/form-data; boundary=${Q}`};if(Number.isFinite(K))z["Content-Length"]=K;return Y&&Y(z),Re6.from(async function*(){for(let V of H)yield W,yield*V.encode();yield Z}())},xR1=we6;import _e6 from"stream";class yR1 extends _e6.Transform{__transform($,Y,X){this.push($),X()}_transform($,Y,X){if($.length!==0){if(this._transform=this.__transform,$[0]!==120){let G=Buffer.alloc(2);G[0]=120,G[1]=156,this.push(G,Y)}}this.__transform($,Y,X)}}var bR1=yR1;var je6=($,Y)=>{return w0.isAsyncFn($)?function(...X){let G=X.pop();$.apply(this,X).then((J)=>{try{Y?G(null,...Y(J)):G(null,J)}catch(Q){G(Q)}},G)}:$},hR1=je6;var Te6=new Set(["localhost"]),mR1=($)=>{let Y=$.split(".");if(Y.length!==4)return!1;if(Y[0]!=="127")return!1;return Y.every((X)=>/^\d+$/.test(X)&&Number(X)>=0&&Number(X)<=255)},Ce6=($)=>{if($==="::1")return!0;let Y=$.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(Y)return mR1(Y[1]);let X=$.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(X){let J=parseInt(X[1],16);return J>=32512&&J<=32767}let G=$.split(":");if(G.length===8){for(let J=0;J<7;J++)if(!/^0+$/.test(G[J]))return!1;return/^0*1$/.test(G[7])}return!1},fR1=($)=>{if(!$)return!1;if(Te6.has($))return!0;if(mR1($))return!0;return Ce6($)},Se6={http:80,https:443,ws:80,wss:443,ftp:21},ke6=($)=>{let Y=$,X=0;if(Y.charAt(0)==="["){let Q=Y.indexOf("]");if(Q!==-1){let W=Y.slice(1,Q),Z=Y.slice(Q+1);if(Z.charAt(0)===":"&&/^\d+$/.test(Z.slice(1)))X=Number.parseInt(Z.slice(1),10);return[W,X]}}let G=Y.indexOf(":"),J=Y.lastIndexOf(":");if(G!==-1&&G===J&&/^\d+$/.test(Y.slice(J+1)))X=Number.parseInt(Y.slice(J+1),10),Y=Y.slice(0,J);return[Y,X]},ve6=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,xe6=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,ye6=($)=>{if(typeof $!=="string"||$.indexOf(":")===-1)return $;let Y=$.match(ve6);if(Y)return Y[1];let X=$.match(xe6);if(X){let G=parseInt(X[1],16),J=parseInt(X[2],16);return`${G>>8}.${G&255}.${J>>8}.${J&255}`}return $},gR1=($)=>{if(!$)return $;if($.charAt(0)==="["&&$.charAt($.length-1)==="]")$=$.slice(1,-1);return ye6($.replace(/\.+$/,""))};function TF0($){let Y;try{Y=new URL($)}catch(Q){return!1}let X=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!X)return!1;if(X==="*")return!0;let G=Number.parseInt(Y.port,10)||Se6[Y.protocol.split(":",1)[0]]||0,J=gR1(Y.hostname.toLowerCase());return X.split(/[\s,]+/).some((Q)=>{if(!Q)return!1;let[W,Z]=ke6(Q);if(W=gR1(W),!W)return!1;if(Z&&Z!==G)return!1;if(W.charAt(0)==="*")W=W.slice(1);if(W.charAt(0)===".")return J.endsWith(W);return J===W||fR1(J)&&fR1(W)})}function be6($,Y){$=$||10;let X=Array($),G=Array($),J=0,Q=0,W;return Y=Y!==void 0?Y:1000,function(K){let H=Date.now(),z=G[Q];if(!W)W=H;X[J]=K,G[J]=H;let V=Q,A=0;while(V!==J)A+=X[V++],V=V%$;if(J=(J+1)%$,J===Q)Q=(Q+1)%$;if(H-W<Y)return;let F=z&&H-z;return F?Math.round(A*1000/F):void 0}}var uR1=be6;function he6($,Y){let X=0,G=1000/Y,J,Q,W=(H,z=Date.now())=>{if(X=z,J=null,Q)clearTimeout(Q),Q=null;$(...H)};return[(...H)=>{let z=Date.now(),V=z-X;if(V>=G)W(H,z);else if(J=H,!Q)Q=setTimeout(()=>{Q=null,W(J)},G-V)},()=>J&&W(J)]}var pR1=he6;var Vz=($,Y,X=3)=>{let G=0,J=uR1(50,250);return pR1((Q)=>{if(!Q||typeof Q.loaded!=="number")return;let W=Q.loaded,Z=Q.lengthComputable?Q.total:void 0,K=Z!=null?Math.min(W,Z):W,H=Math.max(0,K-G),z=J(H);G=Math.max(G,K);let V={loaded:K,total:Z,progress:Z?K/Z:void 0,bytes:H,rate:z?z:void 0,estimated:z&&Z?(Z-K)/z:void 0,event:Q,lengthComputable:Z!=null,[Y?"download":"upload"]:!0};$(V)},X)},uI=($,Y)=>{let X=$!=null;return[(G)=>Y[0]({lengthComputable:X,total:$,loaded:G}),Y[1]]},pI=($)=>(...Y)=>w0.asap(()=>$(...Y));function Ey($){if(!$||typeof $!=="string")return 0;if(!$.startsWith("data:"))return 0;let Y=$.indexOf(",");if(Y<0)return 0;let X=$.slice(5,Y),G=$.slice(Y+1);if(/;base64/i.test(X)){let{length:W,length:Z}=G;for(let F=0;F<Z;F++)if(G.charCodeAt(F)===37&&F+2<Z){let N=G.charCodeAt(F+1),D=G.charCodeAt(F+2);if((N>=48&&N<=57||N>=65&&N<=70||N>=97&&N<=102)&&(D>=48&&D<=57||D>=65&&D<=70||D>=97&&D<=102))W-=2,F+=2}let K=0,H=Z-1,z=(F)=>F>=2&&G.charCodeAt(F-2)===37&&G.charCodeAt(F-1)===51&&(G.charCodeAt(F)===68||G.charCodeAt(F)===100);if(H>=0){if(G.charCodeAt(H)===61)K++,H--;else if(z(H))K++,H-=3}if(K===1&&H>=0){if(G.charCodeAt(H)===61)K++;else if(z(H))K++}let A=Math.floor(W/4)*3-(K||0);return A>0?A:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength==="function")return Buffer.byteLength(G,"utf8");let Q=0;for(let W=0,Z=G.length;W<Z;W++){let K=G.charCodeAt(W);if(K<128)Q+=1;else if(K<2048)Q+=2;else if(K>=55296&&K<=56319&&W+1<Z){let H=G.charCodeAt(W+1);if(H>=56320&&H<=57343)Q+=4,W++;else Q+=3}else Q+=3}return Q}var cR1={flush:eA.constants.Z_SYNC_FLUSH,finishFlush:eA.constants.Z_SYNC_FLUSH},ue6={flush:eA.constants.BROTLI_OPERATION_FLUSH,finishFlush:eA.constants.BROTLI_OPERATION_FLUSH},lR1=w0.isFunction(eA.createBrotliDecompress),{http:pe6,https:de6}=$q1.default,Yq1=/https:?/,ce6=["content-type","content-length"];function le6($,Y,X){if(X!=="content-only"){$.set(Y);return}Object.entries(Y).forEach(([G,J])=>{if(ce6.includes(G.toLowerCase()))$.set(G,J)})}var iR1=Symbol("axios.http.socketListener"),Lo=Symbol("axios.http.currentReq"),Xq1=Symbol("axios.http.installedTunnel"),ie6=new Map,nR1=new WeakMap;function ne6($,Y){let X=$.protocol+"//"+$.hostname+":"+($.port||"")+"#"+($.auth||""),G=Y?nR1.get(Y)||nR1.set(Y,new Map).get(Y):ie6,J=G.get(X);if(J)return J;let Q=Y&&Y.options?{...Y.options,...$}:$;return J=new CF0.default(Q),J[Xq1]=!0,G.set(X,J),J}var rR1=$9.protocols.map(($)=>{return $+":"}),aR1=($)=>{if(!w0.isString($))return $;try{return decodeURIComponent($)}catch(Y){return $}},sR1=($,[Y,X])=>{return $.on("end",X).on("error",X),Y};class Gq1{constructor(){this.sessions=Object.create(null)}getSession($,Y){Y=Object.assign({sessionTimeout:1000},Y);let X=this.sessions[$];if(X){let H=X.length;for(let z=0;z<H;z++){let[V,A]=X[z];if(!V.destroyed&&!V.closed&&eR1.isDeepStrictEqual(A,Y))return V}}let G=tR1.connect($,Y),J,Q=()=>{if(J)return;J=!0;let H=X,z=H.length,V=z;while(V--)if(H[V][0]===G){if(z===1)delete this.sessions[$];else H.splice(V,1);if(!G.closed)G.close();return}},W=G.request,{sessionTimeout:Z}=Y;if(Z!=null){let H,z=0;G.request=function(){let V=W.apply(this,arguments);if(z++,H)clearTimeout(H),H=null;return V.once("close",()=>{if(!--z)H=setTimeout(()=>{H=null,Q()},Z)}),V}}G.once("close",Q);let K=[G,Y];return X?X.push(K):X=this.sessions[$]=[K],G}}var re6=new Gq1;function ae6($,Y,X){if($.beforeRedirects.proxy)$.beforeRedirects.proxy($);if($.beforeRedirects.config)$.beforeRedirects.config($,Y,X)}function Jq1($,Y,X,G,J){let Q=Y;if(!Q&&Q!==!1){let W=$R1(X);if(W){if(!TF0(X))Q=new URL(W)}}if(G&&$.headers){for(let W of Object.keys($.headers))if(W.toLowerCase()==="proxy-authorization")delete $.headers[W]}if(G&&$.agent&&$.agent[Xq1])$.agent=void 0;if(Q){let W=Q instanceof URL,Z=(A)=>W||w0.hasOwnProp(Q,A)?Q[A]:void 0,K=Z("username"),H=Z("password"),z=w0.hasOwnProp(Q,"auth")?Q.auth:void 0;if(K)z=(K||"")+":"+(H||"");if(z){let A=typeof z==="object",F=A&&w0.hasOwnProp(z,"username")?z.username:void 0,N=A&&w0.hasOwnProp(z,"password")?z.password:void 0;if(Boolean(F||N))z=(F||"")+":"+(N||"");else if(A)throw new D1("Invalid proxy authorization",D1.ERR_BAD_OPTION,{proxy:Q})}if(Yq1.test($.protocol)){if(!(J instanceof CF0.default)){let A=Z("hostname")||Z("host"),F=Z("port"),N=Z("protocol"),D=N?N.includes(":")?N:`${N}:`:"http:",L=A&&A.includes(":")&&!A.startsWith("[")?`[${A}]`:A,B=new URL(`${D}//${L}${F?":"+F:""}`),O={protocol:B.protocol,hostname:B.hostname.replace(/^\[|\]$/g,""),port:B.port,auth:z&&typeof z==="string"?z:void 0};if(B.protocol==="https:")O.ALPNProtocols=["http/1.1"];let E=ne6(O,J);if($.agent=E,$.agents)$.agents.https=E}}else{if(z){let D=Buffer.from(z,"utf8").toString("base64");$.headers["Proxy-Authorization"]="Basic "+D}let A=!1;for(let D of Object.keys($.headers))if(D.toLowerCase()==="host"){A=!0;break}if(!A)$.headers.host=$.hostname+($.port?":"+$.port:"");let F=Z("hostname")||Z("host");$.hostname=F,$.host=F,$.port=Z("port"),$.path=X;let N=Z("protocol");if(N)$.protocol=N.includes(":")?N:`${N}:`}}$.beforeRedirects.proxy=function(Z){Jq1(Z,Y,Z.href,!0,J)}}var se6=typeof process<"u"&&w0.kindOf(process)==="process",oe6=($)=>{return new Promise((Y,X)=>{let G,J,Q=(K,H)=>{if(J)return;J=!0,G&&G(K,H)},W=(K)=>{Q(K),Y(K)},Z=(K)=>{Q(K,!0),X(K)};$(W,Z,(K)=>G=K).catch(Z)})},te6=({address:$,family:Y})=>{if(!w0.isString($))throw TypeError("address must be a string");return{address:$,family:Y||($.indexOf(".")<0?6:4)}},oR1=($,Y)=>te6(w0.isObject($)?$:{address:$,family:Y}),ee6={request($,Y){let X=$.protocol+"//"+$.hostname+":"+($.port||($.protocol==="https:"?443:80)),{http2Options:G,headers:J}=$,Q=re6.getSession(X,G),{HTTP2_HEADER_SCHEME:W,HTTP2_HEADER_METHOD:Z,HTTP2_HEADER_PATH:K,HTTP2_HEADER_STATUS:H}=tR1.constants,z={[W]:$.protocol.replace(":",""),[Z]:$.method,[K]:$.path};w0.forEach(J,(A,F)=>{F.charAt(0)!==":"&&(z[F]=A)});let V=Q.request(z);return V.once("response",(A)=>{let F=V;A=Object.assign({},A);let N=A[H];delete A[H],F.headers=A,F.statusCode=+N,Y(F)}),V}},Qq1=se6&&function(Y){return oe6(async function(G,J,Q){let W=(Z0)=>w0.hasOwnProp(Y,Z0)?Y[Z0]:void 0,Z=W("data"),K=W("lookup"),H=W("family"),z=W("httpVersion");if(z===void 0)z=1;let V=W("http2Options"),A=W("responseType"),F=W("responseEncoding"),N=Y.method.toUpperCase(),D,L=!1,B,O;if(z=+z,Number.isNaN(z))throw TypeError(`Invalid protocol version: '${Y.httpVersion}' is not a number`);if(z!==1&&z!==2)throw TypeError(`Unsupported protocol version '${z}'`);let E=z===2;if(K){let Z0=hR1(K,(X0)=>w0.isArray(X0)?X0:[X0]);K=(X0,a,Q0)=>{Z0(X0,a,(e,m,$0)=>{if(e)return Q0(e);let Y0=w0.isArray(m)?m.map((K0)=>oR1(K0)):[oR1(m,$0)];a.all?Q0(e,Y0):Q0(e,Y0[0].address,Y0[0].family)})}}let M=new me6;function R(Z0){try{M.emit("abort",!Z0||Z0.type?new ZW(null,Y,B):Z0)}catch(X0){console.warn("emit error",X0)}}function q(){if(O)clearTimeout(O),O=null}function w(){let Z0=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded",X0=Y.transitional||tA;if(Y.timeoutErrorMessage)Z0=Y.timeoutErrorMessage;return new D1(Z0,X0.clarifyTimeoutError?D1.ETIMEDOUT:D1.ECONNABORTED,Y,B)}M.once("abort",J);let I=()=>{if(q(),Y.cancelToken)Y.cancelToken.unsubscribe(R);if(Y.signal)Y.signal.removeEventListener("abort",R);M.removeAllListeners()};if(Y.cancelToken||Y.signal){if(Y.cancelToken&&Y.cancelToken.subscribe(R),Y.signal)Y.signal.aborted?R():Y.signal.addEventListener("abort",R)}Q((Z0,X0)=>{if(D=!0,q(),X0){L=!0,I();return}let{data:a}=Z0;if(a instanceof t2.Readable||a instanceof t2.Duplex){let Q0=t2.finished(a,()=>{Q0(),I()})}else I()});let P=zB(Y.baseURL,Y.url,Y.allowAbsoluteUrls),_=new URL(P,$9.hasBrowserEnv?$9.origin:void 0),C=_.protocol||rR1[0];if(C==="data:"){if(Y.maxContentLength>-1){let X0=String(Y.url||P||"");if(Ey(X0)>Y.maxContentLength)return J(new D1("maxContentLength size of "+Y.maxContentLength+" exceeded",D1.ERR_BAD_RESPONSE,Y))}let Z0;if(N!=="GET")return KU(G,J,{status:405,statusText:"method not allowed",headers:{},config:Y});try{Z0=wF0(Y.url,A==="blob",{Blob:Y.env&&Y.env.Blob})}catch(X0){throw D1.from(X0,D1.ERR_BAD_REQUEST,Y)}if(A==="text"){if(Z0=Z0.toString(F),!F||F==="utf8")Z0=w0.stripBOM(Z0)}else if(A==="stream")Z0=t2.Readable.from(Z0);return KU(G,J,{data:Z0,status:200,statusText:"OK",headers:new t5,config:Y})}if(rR1.indexOf(C)===-1)return J(new D1("Unsupported protocol "+C,D1.ERR_BAD_REQUEST,Y));let k=t5.from(Y.headers).normalize();k.set("User-Agent","axios/"+zz,!1);let{onUploadProgress:S,onDownloadProgress:T}=Y,v=Y.maxRate,x=void 0,y=void 0;if(w0.isSpecCompliantForm(Z)){let Z0=k.getContentType(/boundary=([-_\w\d]{10,70})/i);Z=xR1(Z,(X0)=>{k.set(X0)},{tag:`axios-${zz}-boundary`,boundary:Z0&&Z0[1]||void 0})}else if(w0.isFormData(Z)&&w0.isFunction(Z.getHeaders)&&Z.getHeaders!==Object.prototype.getHeaders){if(le6(k,Z.getHeaders(),W("formDataHeaderPolicy")),!k.hasContentLength())try{let Z0=await eR1.promisify(Z.getLength).call(Z);Number.isFinite(Z0)&&Z0>=0&&k.setContentLength(Z0)}catch(Z0){}}else if(w0.isBlob(Z)||w0.isFile(Z))Z.size&&k.setContentType(Z.type||"application/octet-stream"),k.setContentLength(Z.size||0),Z=t2.Readable.from(No(Z));else if(Z&&!w0.isStream(Z)){if(Buffer.isBuffer(Z));else if(w0.isArrayBuffer(Z))Z=Buffer.from(new Uint8Array(Z));else if(w0.isString(Z))Z=Buffer.from(Z,"utf-8");else return J(new D1("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",D1.ERR_BAD_REQUEST,Y));if(k.setContentLength(Z.length,!1),Y.maxBodyLength>-1&&Z.length>Y.maxBodyLength)return J(new D1("Request body larger than maxBodyLength limit",D1.ERR_BAD_REQUEST,Y))}let d=w0.toFiniteNumber(k.getContentLength());if(w0.isArray(v))x=v[0],y=v[1];else x=y=v;if(Z&&(S||x)){if(!w0.isStream(Z))Z=t2.Readable.from(Z,{objectMode:!1});Z=t2.pipeline([Z,new jF0({maxRate:w0.toFiniteNumber(x)})],w0.noop),S&&Z.on("progress",sR1(Z,uI(d,Vz(pI(S),!1,3))))}let u=void 0,b=W("auth");if(b){let Z0=b.username||"",X0=b.password||"";u=Z0+":"+X0}if(!u&&_.username){let Z0=aR1(_.username),X0=aR1(_.password);u=Z0+":"+X0}u&&k.delete("authorization");let g;try{g=HB(_.pathname+_.search,Y.params,Y.paramsSerializer).replace(/^\?/,"")}catch(Z0){let X0=Error(Z0.message);return X0.config=Y,X0.url=Y.url,X0.exists=!0,J(X0)}k.set("Accept-Encoding","gzip, compress, deflate"+(lR1?", br":""),!1);let p=Object.assign(Object.create(null),{path:g,method:N,headers:vI(k),agents:{http:Y.httpAgent,https:Y.httpsAgent},auth:u,protocol:C,family:H,beforeRedirect:ae6,beforeRedirects:Object.create(null),http2Options:V});if(!w0.isUndefined(K)&&(p.lookup=K),Y.socketPath){if(typeof Y.socketPath!=="string")return J(new D1("socketPath must be a string",D1.ERR_BAD_OPTION_VALUE,Y));if(Y.allowedSocketPaths!=null){let Z0=Array.isArray(Y.allowedSocketPaths)?Y.allowedSocketPaths:[Y.allowedSocketPaths],X0=dR1(Y.socketPath);if(!Z0.some((Q0)=>typeof Q0==="string"&&dR1(Q0)===X0))return J(new D1(`socketPath "${Y.socketPath}" is not permitted by allowedSocketPaths`,D1.ERR_BAD_OPTION_VALUE,Y))}p.socketPath=Y.socketPath}else p.hostname=_.hostname.startsWith("[")?_.hostname.slice(1,-1):_.hostname,p.port=_.port,Jq1(p,Y.proxy,C+"//"+_.hostname+(_.port?":"+_.port:"")+p.path,!1,Y.httpsAgent);let h,n=!1,t=Yq1.test(p.protocol);if(p.agent==null)p.agent=t?Y.httpsAgent:Y.httpAgent;if(E)h=ee6;else{let Z0=W("transport");if(Z0)h=Z0;else if(Y.maxRedirects===0)h=t?ge6:fe6,n=!0;else{if(Y.maxRedirects)p.maxRedirects=Y.maxRedirects;let X0=W("beforeRedirect");if(X0)p.beforeRedirects.config=X0;h=t?de6:pe6}}if(Y.maxBodyLength>-1)p.maxBodyLength=Y.maxBodyLength;else p.maxBodyLength=1/0;p.insecureHTTPParser=Boolean(W("insecureHTTPParser")),B=h.request(p,function(X0){if(q(),B.destroyed)return;let a=[X0],Q0=w0.toFiniteNumber(X0.headers["content-length"]);if(T||y){let Y0=new jF0({maxRate:w0.toFiniteNumber(y)});T&&Y0.on("progress",sR1(Y0,uI(Q0,Vz(pI(T),!0,3)))),a.push(Y0)}let e=X0,m=X0.req||B;if(Y.decompress!==!1&&X0.headers["content-encoding"]){if(N==="HEAD"||X0.statusCode===204)delete X0.headers["content-encoding"];switch((X0.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":a.push(eA.createUnzip(cR1)),delete X0.headers["content-encoding"];break;case"deflate":a.push(new bR1),a.push(eA.createUnzip(cR1)),delete X0.headers["content-encoding"];break;case"br":if(lR1)a.push(eA.createBrotliDecompress(ue6)),delete X0.headers["content-encoding"]}}e=a.length>1?t2.pipeline(a,w0.noop):a[0];let $0={status:X0.statusCode,statusText:X0.statusMessage,headers:new t5(X0.headers),config:Y,request:m};if(A==="stream"){if(Y.maxContentLength>-1){let Y0=Y.maxContentLength,K0=e;async function*A0(){let D0=0;for await(let O0 of K0){if(D0+=O0.length,D0>Y0)throw new D1("maxContentLength size of "+Y0+" exceeded",D1.ERR_BAD_RESPONSE,Y,m);yield O0}}e=t2.Readable.from(A0(),{objectMode:!1})}$0.data=e,KU(G,J,$0)}else{let Y0=[],K0=0;e.on("data",function(D0){if(Y0.push(D0),K0+=D0.length,Y.maxContentLength>-1&&K0>Y.maxContentLength)L=!0,e.destroy(),R(new D1("maxContentLength size of "+Y.maxContentLength+" exceeded",D1.ERR_BAD_RESPONSE,Y,m))}),e.on("aborted",function(){if(L)return;let D0=new D1("stream has been aborted",D1.ERR_BAD_RESPONSE,Y,m,$0);e.destroy(D0),J(D0)}),e.on("error",function(D0){if(L)return;J(D1.from(D0,null,Y,m,$0))}),e.on("end",function(){try{let D0=Y0.length===1?Y0[0]:Buffer.concat(Y0);if(A!=="arraybuffer"){if(D0=D0.toString(F),!F||F==="utf8")D0=w0.stripBOM(D0)}$0.data=D0}catch(D0){return J(D1.from(D0,null,Y,$0.request,$0))}KU(G,J,$0)})}M.once("abort",(Y0)=>{if(!e.destroyed)e.emit("error",Y0),e.destroy()})}),M.once("abort",(Z0)=>{if(B.close)B.close();else B.destroy(Z0)}),B.on("error",function(X0){J(D1.from(X0,null,Y,B))});let s=new Set;if(B.on("socket",function(X0){if(X0.setKeepAlive(!0,60000),!X0[iR1])X0.on("error",function(Q0){let e=X0[Lo];if(e&&!e.destroyed)e.destroy(Q0)}),X0[iR1]=!0;X0[Lo]=B,s.add(X0)}),B.once("close",function(){q();for(let X0 of s)if(X0[Lo]===B)X0[Lo]=null;s.clear()}),Y.timeout){let Z0=parseInt(Y.timeout,10);if(Number.isNaN(Z0)){R(new D1("error trying to parse `config.timeout` to int",D1.ERR_BAD_OPTION_VALUE,Y,B));return}let X0=function(){if(D)return;R(w())};if(n&&Z0>0)O=setTimeout(X0,Z0);B.setTimeout(Z0,X0)}else B.setTimeout(0);if(w0.isStream(Z)){let Z0=!1,X0=!1;Z.on("end",()=>{Z0=!0}),Z.once("error",(Q0)=>{X0=!0,B.destroy(Q0)}),Z.on("close",()=>{if(!Z0&&!X0)R(new ZW("Request stream has been aborted",Y,B))});let a=Z;if(Y.maxBodyLength>-1&&Y.maxRedirects===0){let Q0=Y.maxBodyLength,e=0;a=t2.pipeline([Z,new t2.Transform({transform(m,$0,Y0){if(e+=m.length,e>Q0)return Y0(new D1("Request body larger than maxBodyLength limit",D1.ERR_BAD_REQUEST,Y,B));Y0(null,m)}})],w0.noop),a.on("error",(m)=>{if(!B.destroyed)B.destroy(m)})}a.pipe(B)}else Z&&B.write(Z),B.end()})};var Wq1=$9.hasStandardBrowserEnv?(($,Y)=>(X)=>{return X=new URL(X,$9.origin),$.protocol===X.protocol&&$.host===X.host&&(Y||$.port===X.port)})(new URL($9.origin),$9.navigator&&/(msie|trident)/i.test($9.navigator.userAgent)):()=>!0;var Zq1=$9.hasStandardBrowserEnv?{write($,Y,X,G,J,Q,W){if(typeof document>"u")return;let Z=[`${$}=${encodeURIComponent(Y)}`];if(w0.isNumber(X))Z.push(`expires=${new Date(X).toUTCString()}`);if(w0.isString(G))Z.push(`path=${G}`);if(w0.isString(J))Z.push(`domain=${J}`);if(Q===!0)Z.push("secure");if(w0.isString(W))Z.push(`SameSite=${W}`);document.cookie=Z.join("; ")},read($){if(typeof document>"u")return null;let Y=document.cookie.split(";");for(let X=0;X<Y.length;X++){let G=Y[X].replace(/^\s+/,""),J=G.indexOf("=");if(J!==-1&&G.slice(0,J)===$)return decodeURIComponent(G.slice(J+1))}return null},remove($){this.write($,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}};var Kq1=($)=>$ instanceof t5?{...$}:$;function e2($,Y){Y=Y||{};let X=Object.create(null);Object.defineProperty(X,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function G(H,z,V,A){if(w0.isPlainObject(H)&&w0.isPlainObject(z))return w0.merge.call({caseless:A},H,z);else if(w0.isPlainObject(z))return w0.merge({},z);else if(w0.isArray(z))return z.slice();return z}function J(H,z,V,A){if(!w0.isUndefined(z))return G(H,z,V,A);else if(!w0.isUndefined(H))return G(void 0,H,V,A)}function Q(H,z){if(!w0.isUndefined(z))return G(void 0,z)}function W(H,z){if(!w0.isUndefined(z))return G(void 0,z);else if(!w0.isUndefined(H))return G(void 0,H)}function Z(H,z,V){if(w0.hasOwnProp(Y,V))return G(H,z);else if(w0.hasOwnProp($,V))return G(void 0,H)}let K={url:Q,method:Q,data:Q,baseURL:W,transformRequest:W,transformResponse:W,paramsSerializer:W,timeout:W,timeoutMessage:W,withCredentials:W,withXSRFToken:W,adapter:W,responseType:W,xsrfCookieName:W,xsrfHeaderName:W,onUploadProgress:W,onDownloadProgress:W,decompress:W,maxContentLength:W,maxBodyLength:W,beforeRedirect:W,transport:W,httpAgent:W,httpsAgent:W,cancelToken:W,socketPath:W,allowedSocketPaths:W,responseEncoding:W,validateStatus:Z,headers:(H,z,V)=>J(Kq1(H),Kq1(z),V,!0)};return w0.forEach(Object.keys({...$,...Y}),function(z){if(z==="__proto__"||z==="constructor"||z==="prototype")return;let V=w0.hasOwnProp(K,z)?K[z]:J,A=w0.hasOwnProp($,z)?$[z]:void 0,F=w0.hasOwnProp(Y,z)?Y[z]:void 0,N=V(A,F,z);w0.isUndefined(N)&&V!==Z||(X[z]=N)}),X}var $08=["content-type","content-length"];function Y08($,Y,X){if(X!=="content-only"){$.set(Y);return}Object.entries(Y).forEach(([G,J])=>{if($08.includes(G.toLowerCase()))$.set(G,J)})}var X08=($)=>encodeURIComponent($).replace(/%([0-9A-F]{2})/gi,(Y,X)=>String.fromCharCode(parseInt(X,16))),Bo=($)=>{let Y=e2({},$),X=(A)=>w0.hasOwnProp(Y,A)?Y[A]:void 0,G=X("data"),J=X("withXSRFToken"),Q=X("xsrfHeaderName"),W=X("xsrfCookieName"),Z=X("headers"),K=X("auth"),H=X("baseURL"),z=X("allowAbsoluteUrls"),V=X("url");if(Y.headers=Z=t5.from(Z),Y.url=HB(zB(H,V,z),$.params,$.paramsSerializer),K)Z.set("Authorization","Basic "+btoa((K.username||"")+":"+(K.password?X08(K.password):"")));if(w0.isFormData(G)){if($9.hasStandardBrowserEnv||$9.hasStandardBrowserWebWorkerEnv)Z.setContentType(void 0);else if(w0.isFunction(G.getHeaders))Y08(Z,G.getHeaders(),X("formDataHeaderPolicy"))}if($9.hasStandardBrowserEnv){if(w0.isFunction(J))J=J(Y);if(J===!0||J==null&&Wq1(Y.url)){let F=Q&&W&&Zq1.read(W);if(F)Z.set(Q,F)}}return Y};var G08=typeof XMLHttpRequest<"u",Uq1=G08&&function($){return new Promise(function(X,G){let J=Bo($),Q=J.data,W=t5.from(J.headers).normalize(),{responseType:Z,onUploadProgress:K,onDownloadProgress:H}=J,z,V,A,F,N;function D(){F&&F(),N&&N(),J.cancelToken&&J.cancelToken.unsubscribe(z),J.signal&&J.signal.removeEventListener("abort",z)}let L=new XMLHttpRequest;L.open(J.method.toUpperCase(),J.url,!0),L.timeout=J.timeout;function B(){if(!L)return;let E=t5.from("getAllResponseHeaders"in L&&L.getAllResponseHeaders()),R={data:!Z||Z==="text"||Z==="json"?L.responseText:L.response,status:L.status,statusText:L.statusText,headers:E,config:$,request:L};KU(function(w){X(w),D()},function(w){G(w),D()},R),L=null}if("onloadend"in L)L.onloadend=B;else L.onreadystatechange=function(){if(!L||L.readyState!==4)return;if(L.status===0&&!(L.responseURL&&L.responseURL.startsWith("file:")))return;setTimeout(B)};if(L.onabort=function(){if(!L)return;G(new D1("Request aborted",D1.ECONNABORTED,$,L)),D(),L=null},L.onerror=function(M){let R=M&&M.message?M.message:"Network Error",q=new D1(R,D1.ERR_NETWORK,$,L);q.event=M||null,G(q),D(),L=null},L.ontimeout=function(){let M=J.timeout?"timeout of "+J.timeout+"ms exceeded":"timeout exceeded",R=J.transitional||tA;if(J.timeoutErrorMessage)M=J.timeoutErrorMessage;G(new D1(M,R.clarifyTimeoutError?D1.ETIMEDOUT:D1.ECONNABORTED,$,L)),D(),L=null},Q===void 0&&W.setContentType(null),"setRequestHeader"in L)w0.forEach(vI(W),function(M,R){L.setRequestHeader(R,M)});if(!w0.isUndefined(J.withCredentials))L.withCredentials=!!J.withCredentials;if(Z&&Z!=="json")L.responseType=J.responseType;if(H)[A,N]=Vz(H,!0),L.addEventListener("progress",A);if(K&&L.upload)[V,F]=Vz(K),L.upload.addEventListener("progress",V),L.upload.addEventListener("loadend",F);if(J.cancelToken||J.signal){if(z=(E)=>{if(!L)return;G(!E||E.type?new ZW(null,$,L):E),L.abort(),D(),L=null},J.cancelToken&&J.cancelToken.subscribe(z),J.signal)J.signal.aborted?z():J.signal.addEventListener("abort",z)}let O=By(J.url);if(O&&!$9.protocols.includes(O)){G(new D1("Unsupported protocol "+O+":",D1.ERR_BAD_REQUEST,$));return}L.send(Q||null)})};var J08=($,Y)=>{if($=$?$.filter(Boolean):[],!Y&&!$.length)return;let X=new AbortController,G=!1,J=function(K){if(!G){G=!0,W();let H=K instanceof Error?K:this.reason;X.abort(H instanceof D1?H:new ZW(H instanceof Error?H.message:H))}},Q=Y&&setTimeout(()=>{Q=null,J(new D1(`timeout of ${Y}ms exceeded`,D1.ETIMEDOUT))},Y),W=()=>{if(!$)return;Q&&clearTimeout(Q),Q=null,$.forEach((K)=>{K.unsubscribe?K.unsubscribe(J):K.removeEventListener("abort",J)}),$=null};$.forEach((K)=>K.addEventListener("abort",J));let{signal:Z}=X;return Z.unsubscribe=()=>w0.asap(W),Z},Hq1=J08;var Q08=function*($,Y){let X=$.byteLength;if(!Y||X<Y){yield $;return}let G=0,J;while(G<X)J=G+Y,yield $.slice(G,J),G=J},W08=async function*($,Y){for await(let X of Z08($))yield*Q08(X,Y)},Z08=async function*($){if($[Symbol.asyncIterator]){yield*$;return}let Y=$.getReader();try{for(;;){let{done:X,value:G}=await Y.read();if(X)break;yield G}}finally{await Y.cancel()}},SF0=($,Y,X,G)=>{let J=W08($,Y),Q=0,W,Z=(K)=>{if(!W)W=!0,G&&G(K)};return new ReadableStream({async pull(K){try{let{done:H,value:z}=await J.next();if(H){Z(),K.close();return}let V=z.byteLength;if(X){let A=Q+=V;X(A)}K.enqueue(new Uint8Array(z))}catch(H){throw Z(H),H}},cancel(K){return Z(K),J.return()}},{highWaterMark:2})};var zq1=65536,{isFunction:Oo}=w0,Vq1=($,...Y)=>{try{return!!$(...Y)}catch(X){return!1}},K08=($)=>{let Y=w0.global!==void 0&&w0.global!==null?w0.global:globalThis,{ReadableStream:X,TextEncoder:G}=Y;$=w0.merge.call({skipUndefined:!0},{Request:Y.Request,Response:Y.Response},$);let{fetch:J,Request:Q,Response:W}=$,Z=J?Oo(J):typeof fetch==="function",K=Oo(Q),H=Oo(W);if(!Z)return!1;let z=Z&&Oo(X),V=Z&&(typeof G==="function"?((B)=>(O)=>B.encode(O))(new G):async(B)=>new Uint8Array(await new Q(B).arrayBuffer())),A=K&&z&&Vq1(()=>{let B=!1,O=new Q($9.origin,{body:new X,method:"POST",get duplex(){return B=!0,"half"}}),E=O.headers.has("Content-Type");if(O.body!=null)O.body.cancel();return B&&!E}),F=H&&z&&Vq1(()=>w0.isReadableStream(new W("").body)),N={stream:F&&((B)=>B.body)};Z&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((B)=>{!N[B]&&(N[B]=(O,E)=>{let M=O&&O[B];if(M)return M.call(O);throw new D1(`Response type '${B}' is not supported`,D1.ERR_NOT_SUPPORT,E)})})})();let D=async(B)=>{if(B==null)return 0;if(w0.isBlob(B))return B.size;if(w0.isSpecCompliantForm(B))return(await new Q($9.origin,{method:"POST",body:B}).arrayBuffer()).byteLength;if(w0.isArrayBufferView(B)||w0.isArrayBuffer(B))return B.byteLength;if(w0.isURLSearchParams(B))B=B+"";if(w0.isString(B))return(await V(B)).byteLength},L=async(B,O)=>{let E=w0.toFiniteNumber(B.getContentLength());return E==null?D(O):E};return async(B)=>{let{url:O,method:E,data:M,signal:R,cancelToken:q,timeout:w,onDownloadProgress:I,onUploadProgress:P,responseType:_,headers:C,withCredentials:k="same-origin",fetchOptions:S,maxContentLength:T,maxBodyLength:v}=Bo(B),x=w0.isNumber(T)&&T>-1,y=w0.isNumber(v)&&v>-1,d=J||fetch;_=_?(_+"").toLowerCase():"text";let u=Hq1([R,q&&q.toAbortSignal()],w),b=null,g=u&&u.unsubscribe&&(()=>{u.unsubscribe()}),p;try{if(x&&typeof O==="string"&&O.startsWith("data:")){if(Ey(O)>T)throw new D1("maxContentLength size of "+T+" exceeded",D1.ERR_BAD_RESPONSE,B,b)}if(y&&E!=="get"&&E!=="head"){let X0=await L(C,M);if(typeof X0==="number"&&isFinite(X0)&&X0>v)throw new D1("Request body larger than maxBodyLength limit",D1.ERR_BAD_REQUEST,B,b)}if(P&&A&&E!=="get"&&E!=="head"&&(p=await L(C,M))!==0){let X0=new Q(O,{method:"POST",body:M,duplex:"half"}),a;if(w0.isFormData(M)&&(a=X0.headers.get("content-type")))C.setContentType(a);if(X0.body){let[Q0,e]=uI(p,Vz(pI(P)));M=SF0(X0.body,zq1,Q0,e)}}if(!w0.isString(k))k=k?"include":"omit";let h=K&&"credentials"in Q.prototype;if(w0.isFormData(M)){let X0=C.getContentType();if(X0&&/^multipart\/form-data/i.test(X0)&&!/boundary=/i.test(X0))C.delete("content-type")}C.set("User-Agent","axios/"+zz,!1);let n={...S,signal:u,method:E.toUpperCase(),headers:vI(C.normalize()),body:M,duplex:"half",credentials:h?k:void 0};b=K&&new Q(O,n);let t=await(K?d(b,S):d(O,n));if(x){let X0=w0.toFiniteNumber(t.headers.get("content-length"));if(X0!=null&&X0>T)throw new D1("maxContentLength size of "+T+" exceeded",D1.ERR_BAD_RESPONSE,B,b)}let s=F&&(_==="stream"||_==="response");if(F&&t.body&&(I||x||s&&g)){let X0={};["status","statusText","headers"].forEach((Y0)=>{X0[Y0]=t[Y0]});let a=w0.toFiniteNumber(t.headers.get("content-length")),[Q0,e]=I&&uI(a,Vz(pI(I),!0))||[],m=0,$0=(Y0)=>{if(x){if(m=Y0,m>T)throw new D1("maxContentLength size of "+T+" exceeded",D1.ERR_BAD_RESPONSE,B,b)}Q0&&Q0(Y0)};t=new W(SF0(t.body,zq1,$0,()=>{e&&e(),g&&g()}),X0)}_=_||"text";let Z0=await N[w0.findKey(N,_)||"text"](t,B);if(x&&!F&&!s){let X0;if(Z0!=null){if(typeof Z0.byteLength==="number")X0=Z0.byteLength;else if(typeof Z0.size==="number")X0=Z0.size;else if(typeof Z0==="string")X0=typeof G==="function"?new G().encode(Z0).byteLength:Z0.length}if(typeof X0==="number"&&X0>T)throw new D1("maxContentLength size of "+T+" exceeded",D1.ERR_BAD_RESPONSE,B,b)}return!s&&g&&g(),await new Promise((X0,a)=>{KU(X0,a,{data:Z0,headers:t5.from(t.headers),status:t.status,statusText:t.statusText,config:B,request:b})})}catch(h){if(g&&g(),u&&u.aborted&&u.reason instanceof D1){let n=u.reason;throw n.config=B,b&&(n.request=b),h!==n&&(n.cause=h),n}if(h&&h.name==="TypeError"&&/Load failed|fetch/i.test(h.message))throw Object.assign(new D1("Network Error",D1.ERR_NETWORK,B,b,h&&h.response),{cause:h.cause||h});throw D1.from(h,h&&h.code,B,b,h&&h.response)}}},U08=new Map,kF0=($)=>{let Y=$&&$.env||{},{fetch:X,Request:G,Response:J}=Y,Q=[G,J,X],W=Q.length,Z=W,K,H,z=U08;while(Z--)K=Q[Z],H=z.get(K),H===void 0&&z.set(K,H=Z?new Map:K08(Y)),z=H;return H},WS5=kF0();var vF0={http:Qq1,xhr:Uq1,fetch:{get:kF0}};w0.forEach(vF0,($,Y)=>{if($){try{Object.defineProperty($,"name",{__proto__:null,value:Y})}catch(X){}Object.defineProperty($,"adapterName",{__proto__:null,value:Y})}});var Aq1=($)=>`- ${$}`,z08=($)=>w0.isFunction($)||$===null||$===!1;function V08($,Y){$=w0.isArray($)?$:[$];let{length:X}=$,G,J,Q={};for(let W=0;W<X;W++){G=$[W];let Z;if(J=G,!z08(G)){if(J=vF0[(Z=String(G)).toLowerCase()],J===void 0)throw new D1(`Unknown adapter '${Z}'`)}if(J&&(w0.isFunction(J)||(J=J.get(Y))))break;Q[Z||"#"+W]=J}if(!J){let W=Object.entries(Q).map(([K,H])=>`adapter ${K} `+(H===!1?"is not supported by the environment":"is not available in the build")),Z=X?W.length>1?`since :
`+W.map(Aq1).join(`
`):" "+Aq1(W[0]):"as no adapter specified";throw new D1("There is no suitable adapter to dispatch the request "+Z,"ERR_NOT_SUPPORT")}return J}var Eo={getAdapter:V08,adapters:vF0};function xF0($){if($.cancelToken)$.cancelToken.throwIfRequested();if($.signal&&$.signal.aborted)throw new ZW(null,$)}function Mo($){if(xF0($),$.headers=t5.from($.headers),$.data=Wy.call($,$.transformRequest),["post","put","patch"].indexOf($.method)!==-1)$.headers.setContentType("application/x-www-form-urlencoded",!1);return Eo.getAdapter($.adapter||gI.adapter,$)($).then(function(G){xF0($),$.response=G;try{G.data=Wy.call($,$.transformResponse,G)}finally{delete $.response}return G.headers=t5.from(G.headers),G},function(G){if(!Zy(G)){if(xF0($),G&&G.response){$.response=G.response;try{G.response.data=Wy.call($,$.transformResponse,G.response)}finally{delete $.response}G.response.headers=t5.from(G.response.headers)}}return Promise.reject(G)})}var Ro={};["object","boolean","number","function","string","symbol"].forEach(($,Y)=>{Ro[$]=function(G){return typeof G===$||"a"+(Y<1?"n ":" ")+$}});var Fq1={};Ro.transitional=function(Y,X,G){function J(Q,W){return"[Axios v"+zz+"] Transitional option '"+Q+"'"+W+(G?". "+G:"")}return(Q,W,Z)=>{if(Y===!1)throw new D1(J(W," has been removed"+(X?" in "+X:"")),D1.ERR_DEPRECATED);if(X&&!Fq1[W])Fq1[W]=!0,console.warn(J(W," has been deprecated since v"+X+" and will be removed in the near future"));return Y?Y(Q,W,Z):!0}};Ro.spelling=function(Y){return(X,G)=>{return console.warn(`${G} is likely a misspelling of ${Y}`),!0}};function A08($,Y,X){if(typeof $!=="object")throw new D1("options must be an object",D1.ERR_BAD_OPTION_VALUE);let G=Object.keys($),J=G.length;while(J-- >0){let Q=G[J],W=Object.prototype.hasOwnProperty.call(Y,Q)?Y[Q]:void 0;if(W){let Z=$[Q],K=Z===void 0||W(Z,Q,$);if(K!==!0)throw new D1("option "+Q+" must be "+K,D1.ERR_BAD_OPTION_VALUE);continue}if(X!==!0)throw new D1("Unknown option "+Q,D1.ERR_BAD_OPTION)}}var My={assertOptions:A08,validators:Ro};var vZ=My.validators;class Ry{constructor($){this.defaults=$||{},this.interceptors={request:new aA0,response:new aA0}}async request($,Y){try{return await this._request($,Y)}catch(X){if(X instanceof Error){let G={};Error.captureStackTrace?Error.captureStackTrace(G):G=Error();let J=(()=>{if(!G.stack)return"";let Q=G.stack.indexOf(`
`);return Q===-1?"":G.stack.slice(Q+1)})();try{if(!X.stack)X.stack=J;else if(J){let Q=J.indexOf(`
`),W=Q===-1?-1:J.indexOf(`
`,Q+1),Z=W===-1?"":J.slice(W+1);if(!String(X.stack).endsWith(Z))X.stack+=`
`+J}}catch(Q){}}throw X}}_request($,Y){if(typeof $==="string")Y=Y||{},Y.url=$;else Y=$||{};Y=e2(this.defaults,Y);let{transitional:X,paramsSerializer:G,headers:J}=Y;if(X!==void 0)My.assertOptions(X,{silentJSONParsing:vZ.transitional(vZ.boolean),forcedJSONParsing:vZ.transitional(vZ.boolean),clarifyTimeoutError:vZ.transitional(vZ.boolean),legacyInterceptorReqResOrdering:vZ.transitional(vZ.boolean)},!1);if(G!=null)if(w0.isFunction(G))Y.paramsSerializer={serialize:G};else My.assertOptions(G,{encode:vZ.function,serialize:vZ.function},!0);if(Y.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)Y.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else Y.allowAbsoluteUrls=!0;My.assertOptions(Y,{baseUrl:vZ.spelling("baseURL"),withXsrfToken:vZ.spelling("withXSRFToken")},!0),Y.method=(Y.method||this.defaults.method||"get").toLowerCase();let Q=J&&w0.merge(J.common,J[Y.method]);J&&w0.forEach(["delete","get","head","post","put","patch","query","common"],(F)=>{delete J[F]}),Y.headers=t5.concat(Q,J);let W=[],Z=!0;this.interceptors.request.forEach(function(N){if(typeof N.runWhen==="function"&&N.runWhen(Y)===!1)return;Z=Z&&N.synchronous;let D=Y.transitional||tA;if(D&&D.legacyInterceptorReqResOrdering)W.unshift(N.fulfilled,N.rejected);else W.push(N.fulfilled,N.rejected)});let K=[];this.interceptors.response.forEach(function(N){K.push(N.fulfilled,N.rejected)});let H,z=0,V;if(!Z){let F=[Mo.bind(this),void 0];F.unshift(...W),F.push(...K),V=F.length,H=Promise.resolve(Y);while(z<V)H=H.then(F[z++],F[z++]);return H}V=W.length;let A=Y;while(z<V){let F=W[z++],N=W[z++];try{A=F(A)}catch(D){N.call(this,D);break}}try{H=Mo.call(this,A)}catch(F){return Promise.reject(F)}z=0,V=K.length;while(z<V)H=H.then(K[z++],K[z++]);return H}getUri($){$=e2(this.defaults,$);let Y=zB($.baseURL,$.url,$.allowAbsoluteUrls);return HB(Y,$.params,$.paramsSerializer)}}w0.forEach(["delete","get","head","options"],function(Y){Ry.prototype[Y]=function(X,G){return this.request(e2(G||{},{method:Y,url:X,data:(G||{}).data}))}});w0.forEach(["post","put","patch","query"],function(Y){function X(G){return function(Q,W,Z){return this.request(e2(Z||{},{method:Y,headers:G?{"Content-Type":"multipart/form-data"}:{},url:Q,data:W}))}}if(Ry.prototype[Y]=X(),Y!=="query")Ry.prototype[Y+"Form"]=X(!0)});var qy=Ry;class yF0{constructor($){if(typeof $!=="function")throw TypeError("executor must be a function.");let Y;this.promise=new Promise(function(J){Y=J});let X=this;this.promise.then((G)=>{if(!X._listeners)return;let J=X._listeners.length;while(J-- >0)X._listeners[J](G);X._listeners=null}),this.promise.then=(G)=>{let J,Q=new Promise((W)=>{X.subscribe(W),J=W}).then(G);return Q.cancel=function(){X.unsubscribe(J)},Q},$(function(J,Q,W){if(X.reason)return;X.reason=new ZW(J,Q,W),Y(X.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe($){if(this.reason){$(this.reason);return}if(this._listeners)this._listeners.push($);else this._listeners=[$]}unsubscribe($){if(!this._listeners)return;let Y=this._listeners.indexOf($);if(Y!==-1)this._listeners.splice(Y,1)}toAbortSignal(){let $=new AbortController,Y=(X)=>{$.abort(X)};return this.subscribe(Y),$.signal.unsubscribe=()=>this.unsubscribe(Y),$.signal}static source(){let $;return{token:new yF0(function(G){$=G}),cancel:$}}}var Dq1=yF0;function bF0($){return function(X){return $.apply(null,X)}}function hF0($){return w0.isObject($)&&$.isAxiosError===!0}var fF0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(fF0).forEach(([$,Y])=>{fF0[Y]=$});var Nq1=fF0;function Lq1($){let Y=new qy($),X=sx(qy.prototype.request,Y);return w0.extend(X,qy.prototype,Y,{allOwnKeys:!0}),w0.extend(X,Y,null,{allOwnKeys:!0}),X.create=function(J){return Lq1(e2($,J))},X}var y$=Lq1(gI);y$.Axios=qy;y$.CanceledError=ZW;y$.CancelToken=Dq1;y$.isCancel=Zy;y$.VERSION=zz;y$.toFormData=oA;y$.AxiosError=D1;y$.Cancel=y$.CanceledError;y$.all=function(Y){return Promise.all(Y)};y$.spread=bF0;y$.isAxiosError=hF0;y$.mergeConfig=e2;y$.AxiosHeaders=t5;y$.formToJSON=($)=>Ho(w0.isHTMLForm($)?new FormData($):$);y$.getAdapter=Eo.getAdapter;y$.HttpStatusCode=Nq1;y$.default=y$;var gF0=y$;var{Axios:F08,AxiosError:D08,CanceledError:N08,isCancel:L08,CancelToken:B08,VERSION:O08,all:E08,Cancel:M08,isAxiosError:R08,spread:q08,toFormData:I08,AxiosHeaders:P08,HttpStatusCode:w08,formToJSON:_08,getAdapter:j08,mergeConfig:T08,create:C08}=gF0;var a$8=U6(Mq1(),1),s$8=U6(Wt(),1);var dD0={};W8(dD0,{default:()=>f$8});var XP=".",iy=Symbol("target"),xD0=Symbol("unsubscribe");function ny($){return $ instanceof Date||$ instanceof Set||$ instanceof Map||$ instanceof WeakSet||$ instanceof WeakMap||ArrayBuffer.isView($)}function u_1($){return(typeof $==="object"?$===null:typeof $!=="function")||$ instanceof RegExp}var KW=Array.isArray;function IB($){return typeof $==="symbol"}var x$8={after:($,Y)=>{if(KW($))return $.slice(Y.length);if(Y==="")return $;return $.slice(Y.length+1)},concat:($,Y)=>{if(KW($)){if($=[...$],Y)$.push(Y);return $}if(Y&&Y.toString!==void 0){if($!=="")$+=XP;if(IB(Y))return $+Y.toString();return $+Y}return $},initial:($)=>{if(KW($))return $.slice(0,-1);if($==="")return $;let Y=$.lastIndexOf(XP);if(Y===-1)return"";return $.slice(0,Y)},last:($)=>{if(KW($))return $[$.length-1]||"";if($==="")return $;let Y=$.lastIndexOf(XP);if(Y===-1)return $;return $.slice(Y+1)},walk:($,Y)=>{if(KW($))for(let X of $)Y(X);else if($!==""){let X=0,G=$.indexOf(XP);if(G===-1)Y($);else while(X<$.length){if(G===-1)G=$.length;Y($.slice(X,G)),X=G+1,G=$.indexOf(XP,X)}}},get($,Y){return this.walk(Y,(X)=>{if($)$=$[X]}),$}},bG=x$8;function yD0($){return typeof $==="object"&&typeof $.next==="function"}function bD0($,Y,X,G,J){let Q=$.next;if(Y.name==="entries")$.next=function(){let W=Q.call(this);if(W.done===!1)W.value[0]=J(W.value[0],Y,W.value[0],G),W.value[1]=J(W.value[1],Y,W.value[0],G);return W};else if(Y.name==="values"){let W=X[iy].keys();$.next=function(){let Z=Q.call(this);if(Z.done===!1)Z.value=J(Z.value,Y,W.next().value,G);return Z}}else $.next=function(){let W=Q.call(this);if(W.done===!1)W.value=J(W.value,Y,W.value,G);return W};return $}function Zt($,Y,X){return $.isUnsubscribed||Y.ignoreSymbols&&IB(X)||Y.ignoreUnderscores&&X.charAt(0)==="_"||"ignoreKeys"in Y&&Y.ignoreKeys.includes(X)}class Kt{constructor($){this._equals=$,this._proxyCache=new WeakMap,this._pathCache=new WeakMap,this.isUnsubscribed=!1}_getDescriptorCache(){if(this._descriptorCache===void 0)this._descriptorCache=new WeakMap;return this._descriptorCache}_getProperties($){let Y=this._getDescriptorCache(),X=Y.get($);if(X===void 0)X={},Y.set($,X);return X}_getOwnPropertyDescriptor($,Y){if(this.isUnsubscribed)return Reflect.getOwnPropertyDescriptor($,Y);let X=this._getProperties($),G=X[Y];if(G===void 0)G=Reflect.getOwnPropertyDescriptor($,Y),X[Y]=G;return G}getProxy($,Y,X,G){if(this.isUnsubscribed)return $;let J=$[G],Q=J||$;this._pathCache.set(Q,Y);let W=this._proxyCache.get(Q);if(W===void 0)W=J===void 0?new Proxy($,X):$,this._proxyCache.set(Q,W);return W}getPath($){return this.isUnsubscribed?void 0:this._pathCache.get($)}isDetached($,Y){return!Object.is($,bG.get(Y,this.getPath($)))}defineProperty($,Y,X){if(!Reflect.defineProperty($,Y,X))return!1;if(!this.isUnsubscribed)this._getProperties($)[Y]=X;return!0}setProperty($,Y,X,G,J){if(!this._equals(J,X)||!(Y in $)){let Q=this._getOwnPropertyDescriptor($,Y);if(Q!==void 0&&"set"in Q)return Reflect.set($,Y,X,G);return Reflect.set($,Y,X)}return!0}deleteProperty($,Y,X){if(Reflect.deleteProperty($,Y)){if(!this.isUnsubscribed){let G=this._getDescriptorCache().get($);if(G)delete G[Y],this._pathCache.delete(X)}return!0}return!1}isSameDescriptor($,Y,X){let G=this._getOwnPropertyDescriptor(Y,X);return $!==void 0&&G!==void 0&&Object.is($.value,G.value)&&($.writable||!1)===(G.writable||!1)&&($.enumerable||!1)===(G.enumerable||!1)&&($.configurable||!1)===(G.configurable||!1)&&$.get===G.get&&$.set===G.set}isGetInvariant($,Y){let X=this._getOwnPropertyDescriptor($,Y);return X!==void 0&&X.configurable!==!0&&X.writable!==!0}unsubscribe(){this._descriptorCache=null,this._pathCache=null,this._proxyCache=null,this.isUnsubscribed=!0}}function GP($){return toString.call($)==="[object Object]"}function JP(){return!0}function WF($,Y){return $.length!==Y.length||$.some((X,G)=>Y[G]!==X)}var Ut=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]);var y$8=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),hD0={push:JP,pop:JP,shift:JP,unshift:JP,copyWithin:WF,reverse:WF,sort:WF,splice:WF,flat:WF,fill:WF},p_1=new Set([...Ut,...y$8,...Object.keys(hD0)]);function QP($,Y){if($.size!==Y.size)return!0;for(let X of $)if(!Y.has(X))return!0;return!1}var fD0=["keys","values","entries"],gD0=new Set(["has","toString"]),mD0={add:QP,clear:QP,delete:QP,forEach:QP},d_1=new Set([...gD0,...Object.keys(mD0),...fD0]);function WP($,Y){if($.size!==Y.size)return!0;let X;for(let[G,J]of $)if(X=Y.get(G),X!==J||X===void 0&&!Y.has(G))return!0;return!1}var b$8=new Set([...gD0,"get"]),uD0={set:WP,clear:WP,delete:WP,forEach:WP},c_1=new Set([...b$8,...Object.keys(uD0),...fD0]);class FX{constructor($,Y,X,G){this._path=Y,this._isChanged=!1,this._clonedCache=new Set,this._hasOnValidate=G,this._changes=G?[]:null,this.clone=Y===void 0?$:this._shallowClone($)}static isHandledMethod($){return Ut.has($)}_shallowClone($){let Y=$;if(GP($))Y={...$};else if(KW($)||ArrayBuffer.isView($))Y=[...$];else if($ instanceof Date)Y=new Date($);else if($ instanceof Set)Y=new Set([...$].map((X)=>this._shallowClone(X)));else if($ instanceof Map){Y=new Map;for(let[X,G]of $.entries())Y.set(X,this._shallowClone(G))}return this._clonedCache.add(Y),Y}preferredThisArg($,Y,X,G){if($){if(KW(G))this._onIsChanged=hD0[Y];else if(G instanceof Set)this._onIsChanged=mD0[Y];else if(G instanceof Map)this._onIsChanged=uD0[Y];return G}return X}update($,Y,X){let G=bG.after($,this._path);if(Y!=="length"){let J=this.clone;if(bG.walk(G,(Q)=>{if(J&&J[Q]){if(!this._clonedCache.has(J[Q]))J[Q]=this._shallowClone(J[Q]);J=J[Q]}}),this._hasOnValidate)this._changes.push({path:G,property:Y,previous:X});if(J&&J[Y])J[Y]=X}this._isChanged=!0}undo($){let Y;for(let X=this._changes.length-1;X!==-1;X--)Y=this._changes[X],bG.get($,Y.path)[Y.property]=Y.previous}isChanged($){return this._onIsChanged===void 0?this._isChanged:this._onIsChanged(this.clone,$)}}class ry extends FX{static isHandledMethod($){return p_1.has($)}}class Ht extends FX{undo($){$.setTime(this.clone.getTime())}isChanged($,Y){return!Y(this.clone.valueOf(),$.valueOf())}}class ay extends FX{static isHandledMethod($){return d_1.has($)}undo($){for(let Y of this.clone)$.add(Y);for(let Y of $)if(!this.clone.has(Y))$.delete(Y)}}class sy extends FX{static isHandledMethod($){return c_1.has($)}undo($){for(let[Y,X]of this.clone.entries())$.set(Y,X);for(let Y of $.keys())if(!this.clone.has(Y))$.delete(Y)}}class zt extends FX{constructor($,Y,X,G){super(void 0,Y,X,G);this._arg1=X[0],this._weakValue=$.has(this._arg1)}isChanged($){return this._weakValue!==$.has(this._arg1)}undo($){if(this._weakValue&&!$.has(this._arg1))$.add(this._arg1);else $.delete(this._arg1)}}class Vt extends FX{constructor($,Y,X,G){super(void 0,Y,X,G);this._weakKey=X[0],this._weakHas=$.has(this._weakKey),this._weakValue=$.get(this._weakKey)}isChanged($){return this._weakValue!==$.get(this._weakKey)}undo($){let Y=$.has(this._weakKey);if(this._weakHas&&!Y)$.set(this._weakKey,this._weakValue);else if(!this._weakHas&&Y)$.delete(this._weakKey);else if(this._weakValue!==$.get(this._weakKey))$.set(this._weakKey,this._weakValue)}}class Lz{constructor($){this._stack=[],this._hasOnValidate=$}static isHandledType($){return GP($)||KW($)||ny($)}static isHandledMethod($,Y){if(GP($))return FX.isHandledMethod(Y);if(KW($))return ry.isHandledMethod(Y);if($ instanceof Set)return ay.isHandledMethod(Y);if($ instanceof Map)return sy.isHandledMethod(Y);return ny($)}get isCloning(){return this._stack.length>0}start($,Y,X){let G=FX;if(KW($))G=ry;else if($ instanceof Date)G=Ht;else if($ instanceof Set)G=ay;else if($ instanceof Map)G=sy;else if($ instanceof WeakSet)G=zt;else if($ instanceof WeakMap)G=Vt;this._stack.push(new G($,Y,X,this._hasOnValidate))}update($,Y,X){this._stack[this._stack.length-1].update($,Y,X)}preferredThisArg($,Y,X){let{name:G}=$,J=Lz.isHandledMethod(X,G);return this._stack[this._stack.length-1].preferredThisArg(J,G,Y,X)}isChanged($,Y,X){return this._stack[this._stack.length-1].isChanged($,Y,X)}undo($){if(this._previousClone!==void 0)this._previousClone.undo($)}stop(){return this._previousClone=this._stack.pop(),this._previousClone.clone}}var h$8={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},pD0=($,Y,X={})=>{X={...h$8,...X};let G=Symbol("ProxyTarget"),{equals:J,isShallow:Q,ignoreDetached:W,details:Z}=X,K=new Kt(J),H=typeof X.onValidate==="function",z=new Lz(H),V=(O,E,M,R,q)=>!H||z.isCloning||X.onValidate(bG.concat(K.getPath(O),E),M,R,q)===!0,A=(O,E,M,R)=>{if(!Zt(K,X,E)&&!(W&&K.isDetached(O,$)))F(K.getPath(O),E,M,R)},F=(O,E,M,R,q)=>{if(z.isCloning)z.update(O,E,R);else Y(bG.concat(O,E),M,R,q)},N=(O)=>O?O[G]||O:O,D=(O,E,M,R)=>{if(u_1(O)||M==="constructor"||Q&&!Lz.isHandledMethod(E,M)||Zt(K,X,M)||K.isGetInvariant(E,M)||W&&K.isDetached(E,$))return O;if(R===void 0)R=K.getPath(E);return K.getProxy(O,bG.concat(R,M),L,G)},L={get(O,E,M){if(IB(E)){if(E===G||E===iy)return O;if(E===xD0&&!K.isUnsubscribed&&K.getPath(O).length===0)return K.unsubscribe(),O}let R=ny(O)?Reflect.get(O,E):Reflect.get(O,E,M);return D(R,O,E)},set(O,E,M,R){M=N(M);let q=O[G]||O,w=q[E];if(J(w,M)&&E in O)return!0;let I=V(O,E,M,w);if(I&&K.setProperty(q,E,M,R,w))return A(O,E,O[E],w),!0;return!I},defineProperty(O,E,M){if(!K.isSameDescriptor(M,O,E)){let R=O[E];if(V(O,E,M.value,R)&&K.defineProperty(O,E,M,R))A(O,E,M.value,R)}return!0},deleteProperty(O,E){if(!Reflect.has(O,E))return!0;let M=Reflect.get(O,E),R=V(O,E,void 0,M);if(R&&K.deleteProperty(O,E,M))return A(O,E,void 0,M),!0;return!R},apply(O,E,M){let R=E[G]||E;if(K.isUnsubscribed)return Reflect.apply(O,R,M);if((Z===!1||Z!==!0&&!Z.includes(O.name))&&Lz.isHandledType(R)){let q=bG.initial(K.getPath(O)),w=Lz.isHandledMethod(R,O.name);z.start(R,q,M);let I=Reflect.apply(O,z.preferredThisArg(O,E,R),w?M.map((C)=>N(C)):M),P=z.isChanged(R,J),_=z.stop();if(Lz.isHandledType(I)&&w){if(E instanceof Map&&O.name==="get")q=bG.concat(q,M[0]);I=K.getProxy(I,q,L)}if(P){let C={name:O.name,args:M,result:I},k=z.isCloning?bG.initial(q):q,S=z.isCloning?bG.last(q):"";if(V(bG.get($,k),S,R,_,C))F(k,S,R,_,C);else z.undo(R)}if((E instanceof Map||E instanceof Set)&&yD0(I))return bD0(I,O,E,q,D);return I}return Reflect.apply(O,E,M)}},B=K.getProxy($,X.pathAsArray?[]:"",L);if(Y=Y.bind(B),H)X.onValidate=X.onValidate.bind(B);return B};pD0.target=($)=>$&&$[iy]||$;pD0.unsubscribe=($)=>$[xD0]||$;var l_1=pD0;var f$8=l_1;var o$8=U6(s_1(),1);(function(){typeof self>"u"&&typeof global==="object"&&(global.self=global)})();function t$8($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}function PB($){return $&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var lD0,o_1;function e$8(){if(o_1)return lD0;o_1=1;let $={StringColumn:"string",BooleanColumn:"boolean",UUIDColumn:"string",BinaryColumn:"string",JSONColumn:"object",DateColumn:"Date | string",NumberColumn:"number"};function Y(A,{isNamespace:F=!1,isHttp:N=!1}={}){let D=new Map,L=new Set,B=new Map,O="",E=A.map(R).join(""),M=A.reduce((k,S)=>{return k[S.name]=S.table,k},{});if(O+=H(F),F)O+=z(M,N);if(O+=E,O+=V(M,N),F)O+="}";return O;function R({table:k,customFilters:S,name:T}){let v=T.substr(0,1).toUpperCase()+T.substr(1);return T=T.substr(0,1).toLowerCase()+T.substr(1),""+q(k,v,T,S)}function q(k,S,T,v){let x=P(k),y=I(k);return`
export interface ${S}Table {
	count(filter?: RawFilter): Promise<number>;
	getAll(): Promise<${S}Array>;
	getAll(fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	getMany(filter?: RawFilter): Promise<${S}Array>;
	getMany(filter: RawFilter, fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	getMany(${T}s: Array<${S}>): Promise<${S}Array>;
	getMany(${T}s: Array<${S}>, fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	getOne(filter?: RawFilter): Promise<${S}Row>;
	getOne(filter?: RawFilter, fetchingStrategy?: ${S}Strategy): Promise<${S}Row>;
	getOne(${T}: ${S}): Promise<${S}Row>;
	getOne(${T}: ${S}, fetchingStrategy: ${S}Strategy): Promise<${S}Row>;
	getById(${w(k)}): Promise<${S}Row>;
	getById(${w(k)}, fetchingStrategy: ${S}Strategy): Promise<${S}Row>;

	replace(${T}s: ${S}[] | ${S}): Promise<void>;
	replace(${T}s: ${S}[], fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	replace(${T}: ${S}, fetchingStrategy: ${S}Strategy): Promise<${S}Row>;
	
	update(${T}: ${S}): Promise<void>;
	update(${T}: ${S}, whereStrategy: ${S}Strategy): Promise<void>;
	update(${T}: ${S}, whereStrategy: ${S}Strategy): Promise<void>;
	update(${T}: ${S}, whereStrategy: ${S}Strategy, fetchingStrategy: ${S}Strategy): Promise<${S}Row[]>;

	updateChanges(${T}s: ${S}[], old${T}s: ${S}[]): Promise<${S}Array>;
	updateChanges(${T}s: ${S}[],old${T}s: ${S}[], fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	updateChanges(${T}: ${S}, old${T}: ${S}): Promise<${S}Row>;
	updateChanges(${T}: ${S},old${T}: ${S}, fetchingStrategy: ${S}Strategy): Promise<${S}Row>;
	
	insert(${T}s: ${S}[]): Promise<${S}Array>;
	insert(${T}s: ${S}[], fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	insert(${T}: ${S}): Promise<${S}Row>;
	insert(${T}: ${S}, fetchingStrategy: ${S}Strategy): Promise<${S}Row>;
	insertAndForget(${T}s: ${S}[]): Promise<void>;
	insertAndForget(${T}: ${S}): Promise<void>;
	delete(filter?: RawFilter): Promise<void>;
	delete(${T}s: Array<${S}>): Promise<void>;
	deleteCascade(filter?: RawFilter): Promise<void>;
	deleteCascade(${T}s: Array<${S}>): Promise<void>;
	proxify(${T}s: ${S}[]): ${S}Array;
	proxify(${T}s: ${S}[], fetchingStrategy: ${S}Strategy): ${S}Array;
	proxify(${T}: ${S}): ${S}Row;
	proxify(${T}: ${S}, fetchingStrategy: ${S}Strategy): ${S}Row;
	patch(patch: JsonPatch): Promise<void>;
	patch(patch: JsonPatch, concurrency: ${S}Concurrency, fetchingStrategy?: ${S}Strategy): Promise<void>;	
	customFilters: ${S}CustomFilters;
	${x}
	${y}
}

export interface ${S}ExpressConfig {
	baseFilter?: RawFilter | ((context: ExpressContext) => RawFilter | Promise<RawFilter>);
    customFilters?: Record<string, (context: ExpressContext,...args: any[]) => RawFilter | Promise<RawFilter>>;
    concurrency?: ${S}Concurrency;
    readonly?: boolean;
    disableBulkDeletes?: boolean;
}

export interface ${S}CustomFilters {
	${Z(v)}
}

export interface ${S}Array extends Array<${S}> {
	saveChanges(): Promise<void>;
	saveChanges(concurrency: ${S}Concurrency, fetchingStrategy?: ${S}Strategy): Promise<void>;
	acceptChanges(): void;
	clearChanges(): void;
	refresh(): Promise<void>;
	refresh(fetchingStrategy: ${S}Strategy): Promise<void>;
	delete(): Promise<void>;
	delete(options: ${S}Concurrency): Promise<void>;
}

export interface ${S}Row extends ${S} {
	saveChanges(): Promise<void>;
	saveChanges(concurrency: ${S}Concurrency, fetchingStrategy?: ${S}Strategy): Promise<void>;
	acceptChanges(): void;
	clearChanges(): void;
	refresh(): Promise<void>;
	refresh(fetchingStrategy: ${S}Strategy): Promise<void>;
	delete(): Promise<void>;
	delete(options: ${S}Concurrency): Promise<void>;
}

${_(k,S,!0)}
`}function w(k){let S=[];for(let T=0;T<k._primaryColumns.length;T++){let v=k._primaryColumns[T];S.push(`${v.alias}: ${$[v.tsType]}`)}return S.join(", ")}function I(k){let S=k._relations,T="";for(let v in S){let x=C(S[v],v);T+=`${v}: ${x}RelatedTable;`}return T}function P(k){let S="",T="";for(let v=0;v<k._columns.length;v++){let x=k._columns[v];S+=`${T}${x.alias} : ${x.tsType};`,T=`
	`}return S}function _(k,S,T){if(S=J(S),!T)if(B.has(k))return"";else B.set(k,S);let v="",x="",y="",d="",u=k._relations,b,g=`
	`,p={};p.visitJoin=function(t){let s=C(t,b);v+=`${_(t.childTable,s)}`,x+=`${b}?: ${s}Concurrency;${g}`,y+=`${b}?: ${s}Strategy | boolean;${g}`,d+=`${b}?: ${s} | null;${g}`},p.visitOne=p.visitJoin,p.visitMany=function(t){let s=C(t,b);v+=`${_(t.childTable,s)}`,x+=`${b}?: ${s}Concurrency;${g}`,y+=`${b}?: ${s}Strategy | boolean;${g}`,d+=`${b}?: ${s}[] | null;${g}`};for(b in u){var h=u[b];h.accept(p)}let n="";if(!T)n=`export interface ${S}RelatedTable {
	${P(k)}
	${I(k)}
	all: (selector: (table: ${S}RelatedTable) => RawFilter) => Filter;
	any: (selector: (table: ${S}RelatedTable) => RawFilter) => Filter;
	none: (selector: (table: ${S}RelatedTable) => RawFilter) => Filter;
	exists: () => Filter;	
}`;return`
export interface ${S}Concurrency {
	readonly?: boolean;
	concurrency?: Concurrency;
	${Q(k)}
	${x}
}

export interface ${S} {
	${X(k)}
	${d}
}

export interface ${S}TableBase {	
	${P(k)}
	${I(k)}
}


export interface ${S}Strategy {
	${W(k)}
	${y}
	limit?: number;
	offset?: number;
	orderBy?: Array<${G(k)}> | ${G(k)};
	where?: (table: ${S}TableBase) => RawFilter;
}

${v}

${n}`}function C(k,S){let T=D.get(k.childTable);if(T)return T;else{let v=J(S),x=2;while(L.has(v))v=v+"x"+x,x++;return D.set(k.childTable,v),L.add(v),v}}}function X(A){let F="",N="";for(let D=0;D<A._columns.length;D++){let L=A._columns[D];if(L._notNull)F+=`${N}${L.alias} : ${$[L.tsType]};`;else F+=`${N}${L.alias}? : ${$[L.tsType]} | null;`;N=`
	`}return F}function G(A){let F="",N="";for(let D=0;D<A._columns.length;D++){let L=A._columns[D];F+=`${N}'${L.alias}' | '${L.alias} desc'`,N="| "}return F}function J(A){return A[0].toUpperCase()+A.substr(1)}function Q(A){let F="",N="";for(let D=0;D<A._columns.length;D++){let L=A._columns[D];F+=`${N}${L.alias}? : ColumnConcurrency;`,N=`
	`}return F}function W(A){let F=new Set(A._primaryColumns),N="",D="";for(let L=0;L<A._columns.length;L++){let B=A._columns[L];if(F.has(B))continue;N+=`${D}${B.alias}? : boolean;`,D=`
	`}return N}function Z(A){return F(A);function F(N,D="\t\t\t\t\t"){let L="";for(let B in N)if(typeof N[B]==="object"&&N[B]!==null)L+=`
`+D+B+": {"+D+F(N[B],D+"\t"),L+=`
`+D+"}";else if(typeof N[B]==="function")L+=`
`+D+B+": ("+K(N[B])+") => import('orange-orm').Filter;";return L}}function K(A){let F=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,N=/([^\s,]+)/g,D=A.toString().replace(F,""),L=D.slice(D.indexOf("(")+1,D.indexOf(")")).match(N);if(L===null)return"";return L.slice(1).join(": unknown, ")+": unknown"}function H(A){if(A)return`
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { AxiosInterceptorManager, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
import type { BooleanColumn, JSONColumn, UUIDColumn, DateColumn, NumberColumn, BinaryColumn, StringColumn, Concurrency, Filter, RawFilter, TransactionOptions, Pool, Express, Url, ColumnConcurrency, JsonPatch } from 'orange-orm';
export { RequestHandler } from 'express';
export { Concurrency, Filter, RawFilter, Config, TransactionOptions, Pool } from 'orange-orm';
export = r;
declare function r(config: Config): r.RdbClient;
`;return`
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-explicit-any */
import schema from './schema';
import type { AxiosInterceptorManager, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
import type { BooleanColumn, JSONColumn, UUIDColumn, DateColumn, NumberColumn, BinaryColumn, StringColumn, Concurrency, Filter, RawFilter, TransactionOptions, Pool, Express, Url, ColumnConcurrency, JsonPatch } from 'orange-orm';
export default schema as RdbClient;`}function z(A,F){return`
declare namespace r {${N(F)}
`;function N(D){let L="";for(let B in A){let O=B.substring(0,1).toUpperCase()+B.substring(1);L+=`
	const ${B}: ${O}Table;`}if(!D)L+=`

	function and(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	function or(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	function not(): Filter;
	function transaction(fn: (transaction: RdbClient) => Promise<unknown>, options?: TransactionOptions): Promise<void>;
	function query(filter: RawFilter | string): Promise<unknown[]>;
	function query<T>(filter: RawFilter | string): Promise<T[]>;
	function transaction(fn: (transaction: RdbClient) => Promise<unknown>, options?: TransactionOptions): Promise<void>;
	const filter: Filter;
	function express(): Express;
	function express(config: ExpressConfig): Express;
`;else L+=`

	const interceptors: {
		request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
		response: AxiosInterceptorManager<AxiosResponse>;
	};
	function reactive(proxyMethod: (obj: unknown) => unknown): void;	
	function and(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	function or(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	function not(): Filter;
	const filter: Filter;
`;return L}}function V(A,F){return`
export interface RdbClient  {${D(F)}
}

export interface RdbConfig {
	db?: Pool | (() => Pool);
    readonly?: boolean;
    concurrency?: Concurrency;${N()}    
}

export interface MetaData {
    readonly?: boolean;
    concurrency?: Concurrency;${N()}
}

export interface ExpressConfig {
	db?: Pool | (() => Pool);
	tables?: ExpressTables;
	concurrency?: Concurrency;
	readonly?: boolean;
	disableBulkDeletes?: boolean;
}

export interface ExpressContext {
	request: import('express').Request;
	response: import('express').Response;
	client: RdbClient;
}		

export interface ExpressTables {${L()}
}
`;function N(){let B="";for(let O in A){let E=O.substring(0,1).toUpperCase()+O.substring(1);B+=`
	${O}?: ${E}Concurrency;`}return B}function D(B){let O="";for(let E in A){let M=E.substring(0,1).toUpperCase()+E.substring(1);O+=`
	${E}: ${M}Table;`}if(B)O+=`
	(config: {db: Url}): RdbClient;
	interceptors: {
        request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
        response: AxiosInterceptorManager<AxiosResponse>;
    };
	reactive(proxyMethod: (obj: unknown) => unknown): void;
	and(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	or(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	not(): Filter;
	transaction(fn: (transaction: RdbClient) => Promise<unknown>, options?: TransactionOptions): Promise<void>;
	filter: Filter;
    createPatch(original: any[], modified: any[]): JsonPatch;
    createPatch(original: any, modified: any): JsonPatch;`;else O+=`
	(config: RdbConfig): RdbClient;
	and(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	or(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	not(): Filter;
	query(filter: RawFilter | string): Promise<unknown[]>;
	query<T>(filter: RawFilter | string): Promise<T[]>;
	transaction(fn: (transaction: RdbClient) => Promise<unknown>, options?: TransactionOptions): Promise<void>;
	filter: Filter;
	createPatch(original: any[], modified: any[]): JsonPatch;
	createPatch(original: any, modified: any): JsonPatch;
	express(): Express;
	express(config: ExpressConfig): Express;
	readonly metaData: MetaData;`;return O}function L(){let B="";for(let O in A){let E=O.substring(0,1).toUpperCase()+O.substring(1);B+=`
	${O}?: boolean | ${E}ExpressConfig;`}return B}}return lD0=Y,lD0}var iD0,t_1;function yq0(){if(t_1)return iD0;t_1=1;function $(Y,X=new Map){if(X.has(Y))return X.get(Y).id;let G={keys:Y._primaryColumns.map((Z)=>({name:Z.alias,type:Z.tsType})),columns:{},relations:{},id:X.size};X.set(Y,G);for(let Z=0;Z<Y._columns.length;Z++){let K=Y._columns[Z];if(G.columns[K.alias]={},"serializable"in K&&!K.serializable)G.columns[K.alias].serializable=!1;else G.columns[K.alias].serializable=!0}let J=Y._relations,Q,W={};W.visitJoin=function(Z){G.relations[Q]=$(Z.childTable,X)},W.visitMany=function(Z){G.relations[Q]=$(Z.childTable,X)},W.visitOne=W.visitMany;for(Q in J)J[Q].accept(W);return G}return iD0=$,iD0}var nD0,e_1;function QQ(){if(e_1)return nD0;e_1=1;let $=e$8(),Y=yq0();function X(G,J,Q={}){if("db"in Q&&(Q.db??void 0)===void 0||!J.db)throw Error("No db specified");let W={db:Q.db||J.db},Z={},K={readonly:Q.readonly};for(let N in J.tables)Z[N]=G({...W,...K,...Q[N],table:J.tables[N],isHttp:!0,client:J});async function H(N,D){if(N.method==="POST")return A.apply(null,arguments);if(N.method==="PATCH")return V.apply(null,arguments);if(N.method==="GET")return z.apply(null,arguments);if(N.method==="OPTIONS")return F(N,D);else D.status(405).set("Allow","GET, POST, PATCH, OPTIONS").send("Method Not Allowed")}H.db=H,H.dts=z;function z(N,D){try{if(N.query.table){if(!(N.query.table in Z)){let B=Error("Table is not exposed or does not exist");throw B.status=400,B}let L=Y(J.tables[N.query.table]);D.setHeader("content-type","text/plain"),D.status(200).send(L)}else{let L=N.query.isNamespace==="true",B=Object.keys(Z).map((O)=>{return{table:J.tables[O],customFilters:Q?.tables?.[O].customFilters,name:O}});D.setHeader("content-type","text/plain"),D.status(200).send($(B,{isNamespace:L,isHttp:!0}))}}catch(L){if(L.status===void 0)D.status(500).send(L.message||L);else D.status(L.status).send(L.message)}}async function V(N,D){try{D.json(await Z[N.query.table].patch(N.body,N,D))}catch(L){if(L.status===void 0)D.status(500).send(L.message||L);else D.status(L.status).send(L.message)}}async function A(N,D){try{if(!N.query.table){let L=Error("Table not defined");throw L.status=400,L}else if(!(N.query.table in Z)){let L=Error("Table is not exposed or does not exist");throw L.status=400,L}D.json(await Z[N.query.table].post(N.body,N,D))}catch(L){if(L.status===void 0)D.status(500).send(L.message||L);else D.status(L.status).send(L.message)}}function F(N,D){D.setHeader("Access-Control-Allow-Origin","*"),D.setHeader("Access-Control-Allow-Methods","GET, POST, PATCH, OPTIONS"),D.setHeader("Access-Control-Allow-Headers","Content-Type"),D.setHeader("Access-Control-Max-Age","86400"),D.status(204).send()}return H}return nD0=X,nD0}var ly1=PB(FA0),rD0,$j1;function ZP(){if($j1)return rD0;$j1=1;function $(Y){let X=-Y.getTimezoneOffset(),G=X>=0?"+":"-";function J(W){let Z=Math.floor(Math.abs(W));return(Z<10?"0":"")+Z}function Q(W){return(W.getMilliseconds()+"").padStart(3,"0")}return Y.getFullYear()+"-"+J(Y.getMonth()+1)+"-"+J(Y.getDate())+"T"+J(Y.getHours())+":"+J(Y.getMinutes())+":"+J(Y.getSeconds())+"."+Q(Y)+G+J(X/60)+":"+J(X%60)}return rD0=$,rD0}var aD0,Yj1;function bq0(){if(Yj1)return aD0;Yj1=1;let $=ZP();function Y(G){return JSON.stringify(G,X)}function X(G,J){if(J instanceof Date&&!isNaN(J))return $(J);else return J}return aD0=Y,aD0}var hq0=PB(EA0),sD0,Xj1;function oy(){if(Xj1)return sD0;Xj1=1;let $=ly1,Y=ZP(),X=bq0(),{v4:G}=hq0;return sD0=function(Q,W,Z){let K=M({d:Q},Z,!0),H=M({d:W},Z,!0),z=E(W),V=$.observe(K);K.d=H.d;let A=$.generate(V),F=M(Q,Z),{inserted:N,deleted:D,updated:L}=B(A);return L.sort(w),[...N,...L,...D];function B(I){let P=[],_=[],C=[];for(let k of I)if(k.path=k.path.substring(2),k.op==="add"&&k.path.split("/").length===2)P.push(k);else if(k.op==="remove"&&k.path.split("/").length===2)O(k),_.push(k);else O(k),C.push(k);return{inserted:P,updated:C,deleted:_}}function O(I){if(I.op==="remove"||I.op==="replace"){let _=I.path.split("/");_.shift(),I.oldValue=_.reduce(P,F)}else return I;function P(_,C){return _[C]}return I}function E(I){return I.reduce((P,_,C)=>{if(Z&&Z.keys&&_===Object(_)){let k=[];for(let S=0;S<Z.keys.length;S++){let T=Z.keys[S].name;k.push(q(_[T]))}P[X(k)]=C}else if("id"in _)P[X([_.id])]=C;else P[C]=C;return P},{})}function M(I,P,_){if(Array.isArray(I)){let C={__patchType:"Array"};for(let k=0;k<I.length;k++){let S=M(I[k],P);if(P&&P.keys&&S===Object(S)){let T=[];for(let v=0;v<P.keys.length;v++){let x=P.keys[v].name;T.push(q(S[x]))}C[X(T)]=S}else if(S===Object(S)&&"id"in S)C[X([S.id])]=S;else C[k]=S}return C}else if(R(I))return Y(I);else if(I===Object(I)){let C={};for(let k in I)C[k]=M(I[k],_?P:P&&P.relations&&P.relations[k]);return C}return I}function R(I){return I instanceof Date&&!isNaN(I)}function q(I){if(I===void 0)return`~${G()}`;else return I}function w(I,P){let _=I.path.split("/"),C=P.path.split("/");return _.length-C.length||(z[_[1]]??1/0-z[C[1]]??1/0)||I.path.localeCompare(P.path)}},sD0}var oD0,Gj1;function $Y8(){if(Gj1)return oD0;Gj1=1;function $(Y){if(Y&&typeof Y==="function")return Y();else if(Y===void 0)return"";else return Y}return oD0=$,oD0}var tD0,Jj1;function YY8(){if(Jj1)return tD0;Jj1=1;function $(Y){if(Y)return Y.slice(0);return[]}return tD0=$,tD0}var eD0,Qj1;function Y9(){if(Qj1)return eD0;Qj1=1;var $=$Y8(),Y=YY8();function X(J,Q){this._text=J,this.parameters=Q}X.prototype.sql=function(){return this._text},X.prototype.prepend=function(J){if(J.sql){var Q=J.parameters.concat(this.parameters);return G(J.sql()+this._text,Q)}else return G(J+this._text,this.parameters)},X.prototype.append=function(J){if(J.sql){var Q=this.parameters.concat(J.parameters);return G(this._text+J.sql(),Q)}else return G(this._text+J,this.parameters)};function G(J,Q){return J=$(J),Q=Y(Q),new X(J,Q)}return eD0=G,eD0}var $N0,Wj1;function XY8(){if(Wj1)return $N0;Wj1=1;function $(Y,X){if(!X.sql())return Y;return Y.append(" AND ").append(X)}return $N0=$,$N0}var YN0,Zj1;function GY8(){if(Zj1)return YN0;Zj1=1;function $(Y,X){if(!X.sql())return Y;return Y.prepend("(").append(" OR ").append(X).append(")")}return YN0=$,YN0}var XN0,Kj1;function iy1(){if(Kj1)return XN0;Kj1=1;let $=Y9(),Y=XY8(),X=GY8();function G(Z){var K={};return K.sql=Z.sql.bind(Z),K.parameters=Z.parameters,K.append=function(H){var z=Z.append(H);return G(z)},K.prepend=function(H){var z=Z.prepend(H);return G(z)},K.and=function(H,z){z=J(H,z);var V=Y(Z,z),A=G(V);for(var F=2;F<arguments.length;F++)A=A.and(H,arguments[F]);return A},K.or=function(H,z){z=J(H,z);var V=X(Z,z),A=G(V);for(var F=2;F<arguments.length;F++)A=A.or(H,arguments[F]);return A},K.not=function(H){var z=Z.prepend("NOT (").append(")");return G(z)},K}function J(Z,K,H,z){if(Array.isArray(K)&&K.length===0)return G($(z?"1 = 2":"1 = 1"));else if(Array.isArray(K)){let V,A;for(let F=0;F<K.length;F++){let N=J(Z,K[F],H);if(N.isObjectFilter)A=A?A.or(Z,N):N;else V=V?V.and(Z,N):N}if(V&&A)return V.and(Z,A);else if(V)return V;else return A}else{let V=[];if(K){if(K.and)return K;if(K.sql){let F=K.sql;if(typeof K.sql==="function")F=K.sql();V.push(F,K.parameters)}else if(Q(K,H))return W(Z,K,H);else V=[K]}else V=[K];let A=$.apply(null,V);return G(A)}}function Q(Z,K){return K&&Z}function W(Z,K,H){let z=H._primaryColumns,V;for(let A=0;A<z.length;A++){let F=z[A],N=F.equal(Z,K[F.alias]);V=V?V.and(Z,N):N}return V.isObjectFilter=!0,V}return XN0={negotiateRawSqlFilter:J,newBoolean:G},XN0}var GN0,Uj1;function bZ(){if(Uj1)return GN0;Uj1=1;let{negotiateRawSqlFilter:$}=iy1();return GN0=$,GN0}var JN0,Hj1;function KP(){if(Hj1)return JN0;Hj1=1;var $=bZ(),Y=Y9()("");function X(){return X.and.apply(null,arguments)}return X.sql=Y.sql,X.parameters=Y.parameters,X.and=function(G,J){J=$(G,J);for(var Q=2;Q<arguments.length;Q++)J=J.and(G,arguments[Q]);return J},X.or=function(G,J){J=$(G,J);for(var Q=2;Q<arguments.length;Q++)J=J.or(G,arguments[Q]);return J},X.not=function(G,J){J=$(G,J).not(G);for(var Q=2;Q<arguments.length;Q++)J=J.and(G,arguments[Q]);return J},JN0=X,JN0}var QN0,zj1;function JY8(){if(zj1)return QN0;zj1=1;let $=oy(),Y=KP(),X=bZ(),G=yq0(),J=Symbol(),Q={and:!0,or:!0,not:!0,AND:!0,OR:!0,NOT:!0,equal:!0,eq:!0,EQ:!0,notEqual:!0,ne:!0,NE:!0,lessThan:!0,lt:!0,LT:!0,lessThanOrEqual:!0,le:!0,LE:!0,greaterThan:!0,gt:!0,GT:!0,greaterThanOrEqual:!0,ge:!0,GE:!0,between:!0,in:!0,IN:!0,startsWith:!0,iStartsWith:!0,endsWith:!0,iEndsWith:!0,contains:!0,iContains:!0,iEqual:!0,iEq:!0,ieq:!0,IEQ:!0,exists:!0,all:!0,any:!0,none:!0,where:!0,sum:!0,avg:!0,max:!0,min:!0,count:!0,groupSum:!0,groupAvg:!0,groupMax:!0,groupMin:!0,groupCount:!0,_aggregate:!0,self:!0};function W(Z,...K){let H={and:Y.and.bind(null,Z),or:Y.or.bind(null,Z),not:Y.not.bind(null,Z),AND:Y.and.bind(null,Z),OR:Y.or.bind(null,Z),NOT:Y.not.bind(null,Z)};return z(...K);async function z({table:M,JSONFilter:R,baseFilter:q,customFilters:w={},request:I,response:P,readonly:_,disableBulkDeletes:C,isHttp:k,client:S}){let T={...Q,insert:!_,...O(G(M))},v={...H,...u(w),getManyDto:t,getMany:e,aggregate:a,count:n,delete:g,cascadeDelete:p,update:Z0,replace:s},x=await y(R,M);if(x===void 0)return{};else return x;function y(m,$0){if(L(m)){let A0=[],D0=Y0(m.path,$0);if(D0){if(k)D(m.args[0]);let O0=D0(Z,(R0)=>y(m.args[0],R0));if(!("isSafe"in O0))O0.isSafe=J;return O0}else for(let O0=0;O0<m.args.length;O0++)A0.push(y(m.args[O0],b(m.path,$0)));return K0(m.path,A0)}else if(Array.isArray(m)){let A0=[];for(let D0=0;D0<m.length;D0++)A0.push(y(m[D0],$0));return A0}return m;function Y0(A0,D0){A0=A0.split(".");for(let I0=0;I0<A0.length;I0++)D0=D0[A0[I0]];let O0=new Set(["all","any","none","where","_aggregate"]),R0=A0.slice(-1)[0];if(O0.has(R0)||D0&&(D0._primaryColumns||D0.any&&D0.all))return D0}function K0(A0,D0){if(A0 in v){if(k)D(D0);let p0=v[A0].apply(null,D0);if(p0.then)return p0.then((U4)=>{return B(U4),U4});return B(p0),p0}let O0=A0.split("."),R0=$0,I0=O0[O0.length-1];if(!T[I0]&&k){let p0=Error("Disallowed operator "+I0);throw p0.status=403,p0}for(let p0=0;p0<O0.length;p0++)R0=R0[O0[p0]];if(!R0)throw Error(`Method '${A0}' does not exist`);let g0=R0.apply(null,[Z,...D0]);return B(g0),g0}}async function d(){if(typeof q==="function"){let m=await q.apply(null,[E(S),I,P]);if(!m)return;let $0=JSON.parse(JSON.stringify(m));return z({table:M,JSONFilter:$0,request:I,response:P})}else return}function u(m){return $0(m);function $0(K0,A0={},D0="customFilters."){for(let O0 in K0)if(typeof K0[O0]==="object"&&K0[O0]!==null)$0(K0[O0],A0,D0+O0+".");else A0[D0+O0]=Y0.bind(null,K0[O0]);return A0}async function Y0(K0,...A0){let D0={db:E(S),request:I,response:P},O0=K0.apply(null,[D0,...A0]);if(O0.then)O0=await O0;let R0=JSON.parse(JSON.stringify(O0));return z({table:M,JSONFilter:R0,request:I,response:P})}}function b(m,$0){m=m.split(".");let Y0=new Set(["all","any","none"]),K0=m.slice(-1)[0];if(Y0.has(K0)){for(let A0=0;A0<m.length-1;A0++)$0=$0[m[A0]];return $0}else{let A0=$0;for(let D0=0;D0<m.length;D0++)if(A0)A0=A0[m[D0]];if(A0?._shallow)return A0._shallow;else return $0}}async function g(m){if(_||C){let K0=Error('Bulk deletes are not allowed. Parameter "disableBulkDeletes" must be true.');throw K0.status=403,K0}m=h(m);let $0=await d();if($0)m=m.and(Z,$0);let Y0=[Z,m].concat(Array.prototype.slice.call(arguments).slice(1));return M.delete.apply(null,Y0)}async function p(m){if(_||C){let K0=Error('Bulk deletes are not allowed. Parameter "disableBulkDeletes" must be true.');throw K0.status=403,K0}m=h(m);let $0=await d();if($0)m=m.and(Z,$0);let Y0=[Z,m].concat(Array.prototype.slice.call(arguments).slice(1));return M.cascadeDelete.apply(null,Y0)}function h(m){if(m)return X(Z,m,M,!0);else return Y}async function n(m,$0){V(M,$0),m=h(m);let Y0=await d();if(Y0)m=m.and(Z,Y0);let K0=[Z,m].concat(Array.prototype.slice.call(arguments).slice(1));return M.count.apply(null,K0)}async function t(m,$0){V(M,$0),m=h(m);let Y0=await d();if(Y0)m=m.and(Z,Y0);let K0=[Z,m].concat(Array.prototype.slice.call(arguments).slice(1));return await Q0($0),M.getManyDto.apply(null,K0)}async function s(m,$0={insertAndForget:!0}){V(M,$0);let Y0=X0(m,{},M),A0=await z({table:M,JSONFilter:{path:"getManyDto",args:[m,Y0]},baseFilter:q,customFilters:w,request:I,response:P,readonly:_,disableBulkDeletes:C,isHttp:k,client:S}),D0=G(M),O0=$(A0,Array.isArray(m)?m:[m],D0),{changed:R0}=await M.patch(Z,O0,{strategy:$0});if(Array.isArray(m))return R0;else return R0[0]}async function Z0(m,$0,Y0={insertAndForget:!0}){V(M,Y0);let A0={path:"getManyDto",args:[null,X0(m,$0,M)]},D0=await z({table:M,JSONFilter:A0,baseFilter:q,customFilters:w,request:I,response:P,readonly:_,disableBulkDeletes:C,isHttp:k,client:S}),O0=Array(D0.length);for(let p0=0;p0<D0.length;p0++){let U4=D0[p0];O0[p0]={...U4};for(let P1 in m)U4[P1]=m[P1]}let R0=G(M),I0=$(O0,D0,R0),{changed:g0}=await M.patch(Z,I0,{strategy:Y0});return g0}function X0(m,$0,Y0,K0={}){if(K0={...$0,...K0},Array.isArray(m)){for(let A0=0;A0<m.length;A0++)X0(m[A0],Y0,K0);return}for(let A0 in m){let D0=Y0[A0]?._relation;if(D0&&!D0.columns)K0[A0]={},X0(m[A0],$0?.[A0],Y0[A0],K0[A0]);else K0[A0]=!0}return K0}async function a(m,$0){V(M,$0),m=h(m);let Y0=await d();if(Y0)m=m.and(Z,Y0);let K0=[Z,m].concat(Array.prototype.slice.call(arguments).slice(1));return await Q0($0),M.aggregate.apply(null,K0)}async function Q0(m){if(typeof m!=="object")return;for(let $0 in m){let Y0=m[$0];if(L(Y0))m[$0]=await y(m[$0],M);else await Q0(m[$0])}}async function e(m,$0){V(M,$0),m=h(m);let Y0=await d();if(Y0)m=m.and(Z,Y0);let K0=[Z,m].concat(Array.prototype.slice.call(arguments).slice(1));return await Q0($0),M.getMany.apply(null,K0)}}function V(M,R){if(!R||!M)return;for(let q in R)F(R),A(R),N(M,R),V(M[q],R[q])}function A(M){if(!("limit"in M)||Number.isInteger(M.limit))return;let R=Error("Invalid limit: "+M.limit);R.status=400}function F(M){if(!("offset"in M)||Number.isInteger(M.offset))return;let R=Error("Invalid offset: "+M.offset);throw R.status=400,R}function N(M,R){if(!("orderBy"in R)||!M)return;let q=R.orderBy;if(!Array.isArray(q))q=[q];q.reduce(w,[]);function w(I,P){let _=P.split(" ").filter((C)=>{return C=C.toLowerCase(),!(C===""||C==="asc"||C==="desc")});for(let C of _){let k=M[C];if(!(k&&k.equal)){let S=Error("Unknown column: "+C);throw S.status=400,S}}}}function D(){for(let M=0;M<arguments.length;M++){let R=arguments[M];if(!R)continue;if(R&&R.isSafe===J)continue;if(R.sql||typeof R==="string"){let q=Error("Raw filters are disallowed");throw q.status=403,q}if(Array.isArray(R))for(let q=0;q<R.length;q++)D(R[q])}}function L(M){return M instanceof Object&&"path"in M&&"args"in M}function B(M){if(M instanceof Object)Object.defineProperty(M,"isSafe",{value:J,enumerable:!1})}function O(M){let R={};function q(w){Object.keys(w).forEach((I)=>{if(R[I]=!0,typeof w[I]==="object"&&Object.keys(w[I]?.relations)?.length>0)q(w[I].relations)})}return q(M.relations),R}function E(M){var R=Z;let q=R.run(()=>!0);function w(I){return q.then(R.run.bind(R,I))}return M({transaction:w})}}return QN0=W,QN0}var WN0,Vj1;function UP(){if(Vj1)return WN0;Vj1=1;function $(Y){if(Y)return Y.rdb}return WN0=$,WN0}var ZN0,Aj1;function hG(){if(Aj1)return ZN0;Aj1=1;let $=UP();function Y(X){let G=$(X);if(!G)throw Error("Rdb transaction is no longer available. Is promise chain broken ?");return G}return ZN0=Y,ZN0}var KN0,Fj1;function nX(){if(Fj1)return KN0;Fj1=1;let $=hG();function Y(X,G,J){let Q=$(X);Q[G]=J}return KN0=Y,KN0}var UN0,Dj1;function g6(){if(Dj1)return UN0;Dj1=1;var $=hG();return UN0=function(Y,X){return $(Y)[X]},UN0}var HN0,Nj1;function ny1(){if(Nj1)return HN0;Nj1=1;function $(Y){if(Y&&Y.parameters&&Y.parameters.length>0&&Y.parameters.filter((Z)=>Z===null||Z===void 0).length>0){var X=Y.sql().split("?"),G="",J=[],Q=X.length-1;for(var W=0;W<Q;W++)if(Y.parameters[W]===null||Y.parameters[W]===void 0)G+=X[W]+"null";else G+=X[W]+"?",J.push(Y.parameters[W]);return G+=X[Q],{sql:()=>G,parameters:J}}else return Y}return HN0=$,HN0}var zN0,Lj1;function QY8(){if(Lj1)return zN0;Lj1=1;let $=g6(),Y=ny1();function X(G,J){return Q;function Q(W,Z){try{var K=$(G,"dbClient");J=Y(J),K.executeCommand(J,H)}catch(z){Z(z)}function H(z,V){if(!z)W(V);else Z(z)}}}return zN0=X,zN0}var VN0,Bj1;function WY8(){if(Bj1)return VN0;Bj1=1;var $=QY8();function Y(X,G){var J=$(X,G);return new Promise(J)}return VN0=Y,VN0}var AN0,Oj1;function ry1(){if(Oj1)return AN0;Oj1=1;function $(Y){if(!Y)return Promise.resolve.apply(Promise,arguments);return new Promise(Y)}return $.all=Promise.all,AN0=$,AN0}var FN0,Ej1;function ay1(){if(Ej1)return FN0;Ej1=1;var $=WY8(),Y=ry1();function X(G,J){if(J.length===0)return Y();var Q=-1;return W().then(K);function W(){if(Q++,Q+1===J.length)return $(G,J[Q]).then(Z);else return $(G,J[Q]).then(Z).then(W)}function Z(H){if(H&&J[Q].onResult)J[Q].onResult(H)}async function K(){for(let H=0;H<J.length;H++)if(J[H].emitChanged)await Promise.all(J[H].emitChanged())}}return FN0=X,FN0}var DN0,Mj1;function fq0(){if(Mj1)return DN0;Mj1=1;var $=g6();function Y(X){return $(X,"changes")}return DN0=Y,DN0}var NN0,Rj1;function ZY8(){if(Rj1)return NN0;Rj1=1;var $=Y9(),Y=g6();function X(G,J){var Q=Y(G,"multipleStatements"),W=[],Z=J.length;for(var K=0;K<Z;K++){var H=J[K];if(Q&&H.parameters.length===0&&!H.disallowCompress)for(var z=K+1;z<Z;z++){var V=J[z];if(V.parameters.length>0||!V.disallowCompress)break;H=$(H.sql()+";"+V.sql()),K++}W.push(H)}return W}return NN0=X,NN0}var LN0,qj1;function gq0(){if(qj1)return LN0;qj1=1;var $=fq0(),Y=ZY8();function X(G){var J=$(G),Q=J.length;if(Q>0){var W=J[Q-1];if(W.endEdit)W.endEdit();var Z=Y(G,J);return J.length=0,Z}return J}return LN0=X,LN0}var BN0,Ij1;function KY8(){if(Ij1)return BN0;Ij1=1;let $=g6(),Y=ny1();function X(G,J){return Q;function Q(W,Z){try{var K=$(G,"dbClient");J=Y(J),K.executeQuery(J,H)}catch(z){Z(z)}function H(z,V){if(!z)W(V);else Z(z)}}}return BN0=X,BN0}var ON0,Pj1;function mq0(){if(Pj1)return ON0;Pj1=1;var $=KY8();function Y(X,G){var J=$(X,G);return new Promise(J)}return ON0=Y,ON0}var EN0,wj1;function UY8(){if(wj1)return EN0;wj1=1;var $=mq0();function Y(X,G){var J=[];for(var Q=0;Q<G.length;Q++){var W=$(X,G[Q]);J.push(W)}return J}return EN0=Y,EN0}var MN0,_j1;function WK(){if(_j1)return MN0;_j1=1;var $=ay1(),Y=gq0(),X=UY8();function G(J,Q){var W=Y(J);return $(J,W).then(Z);function Z(){return X(J,Q)}}return MN0=G,MN0}var RN0,jj1;function HY8(){if(jj1)return RN0;jj1=1;function $(Y){if(typeof Y==="string")return function(){return Y};var X=Y.sql;if(typeof X==="function")return X;else if(typeof X==="string")return function(){return X};else throw Error("Query lacks sql property string or function")}return RN0=$,RN0}var qN0,Tj1;function zY8(){if(Tj1)return qN0;Tj1=1;function $(Y){if(Y===void 0)return[];else if(Y.length!==void 0)return Y;else throw Error("Query has invalid parameters property. Must be undefined or array")}return qN0=$,qN0}var IN0,Cj1;function VY8(){if(Cj1)return IN0;Cj1=1;var $=HY8(),Y=zY8();function X(G){var J=$(G),Q=Y(G.parameters);let W={sql:J,parameters:Q};if(G.types)W.types=G.types;return W}return IN0=X,IN0}var PN0,Sj1;function rX(){if(Sj1)return PN0;Sj1=1;var $=WK(),Y=VY8();function X(J,Q){var W=Y(Q);return $(J,[W]).then(G)}function G(J){return J[0]}return PN0=X,PN0}var wN0,kj1;function WQ(){if(kj1)return wN0;kj1=1;let $=JY8(),Y=yq0(),X=nX(),G=rX(),J=QQ(),Q=["getManyDto","getMany","aggregate","count"];function W(){let Z=arguments[0],{table:K,transaction:H,db:z,isHttp:V}=Z,A={get:F,post:D,patch:N,query:L,express:B};function F(){return Y(K)}async function N(O,E,M){if(!K){let w=Error("Table is not exposed");throw w.status=400,w}O=typeof O==="string"?JSON.parse(O):O;let R;if(H)await H(q);else{if(typeof z==="function"){let w=z();if(w.then)z=await w;else z=w}await z.transaction(q)}return R;async function q(w){X(w,"ignoreSerializable",!0);let I=O.patch;R=await K.patch(w,I,{...Z,...O.options,isHttp:V})}}async function D(O,E,M){O=typeof O==="string"?JSON.parse(O):O;let R;if(H)await H(q);else{if(typeof z==="function"){let w=z();if(w.then)z=await w;else z=w}if(Q.includes(O.path))await z.transaction({readonly:!0},q);else await z.transaction(q)}return R;async function q(w){X(w,"ignoreSerializable",!0);let I={...Z,...O.options,JSONFilter:O,request:E,response:M,isHttp:V};R=await $(w,I)}}async function L(){let O=arguments,E;if(H)await H(M);else{if(typeof z==="function"){let R=z();if(R.then)z=await R;else z=R}E=await z.query.apply(null,arguments)}return E;async function M(...R){E=await G.apply(null,[...R,...O])}}function B(O,E){return J(W,O,E)}return A}return wN0=W,wN0}var _N0,vj1;function AY8(){if(vj1)return _N0;vj1=1;let $=ZP();function Y(J){if(J===null||typeof J!=="object")return J;if(Array.isArray(J)){let Z=[];for(let K=0;K<J.length;K++)Z[K]=Y(J[K]);return Z}let Q={},W=Object.keys(J);for(let Z=0;Z<W.length;Z++){let K=W[Z];Q[K]=Y(J[K])}return Q}function X(J){if(J===null||typeof J!=="object")return J;if(Array.isArray(J)){let Z=[];for(let K=0;K<J.length;K++)Z[K]=X(J[K]);return Z}else if(J instanceof Date&&!isNaN(J))return $(J);let Q={},W=Object.keys(J);for(let Z=0;Z<W.length;Z++){let K=W[Z];Q[K]=X(J[K])}return Q}function G(J,Q){if(Q)return Y(J);else return X(J)}return _N0=G,_N0}var FY8=PB(mF0),jN0,xj1;function DY8(){if(xj1)return jN0;xj1=1;let $=FY8;function Y(G,J,Q){let W=$.default?$.default.create({baseURL:G}):$.create({baseURL:G});return Q.applyTo(W),{get:K,post:z,patch:H,query:V,express:A};async function K(){try{let F={"Content-Type":"application/json",Accept:"application/json"};return(await W.request(J,{headers:F,method:"get"})).data}catch(F){if(typeof F.response?.data==="string")throw Error(F.response.data.replace(/^Error: /,""));else throw F}}async function H(F){try{let N={"Content-Type":"application/json"};return(await W.request(J,{headers:N,method:"patch",data:F})).data}catch(N){if(typeof N.response?.data==="string")throw Error(N.response.data.replace(/^Error: /,""));else throw N}}async function z(F){try{let N={"Content-Type":"application/json"};return(await W.request(J,{headers:N,method:"post",data:F})).data}catch(N){if(typeof N.response?.data==="string")throw Error(N.response.data.replace(/^Error: /,""));else throw N}}function V(){throw Error("Queries are not supported through http")}function A(){throw Error("Hosting in express is not supported on the client side")}}function X(G,J,{axios:Q,tableOptions:W}){if(W.transaction?.done)delete W.transaction;return{get:K,post:z,patch:H,query:V};async function K(){return(await A()).get.apply(null,arguments)}async function H(N){return(await A()).patch.apply(null,arguments)}async function z(N){return(await A()).post.apply(null,arguments)}async function V(){return(await A()).query.apply(null,arguments)}async function A(){let N=await F();if(typeof N==="string")return Y(N,`?table=${J}`,Q);else if(N&&N.transaction)return N.hostLocal({...W,db:N,table:G});else throw Error("Invalid arguments")}async function F(){let N=W.db;if(N.transaction)return N;if(typeof N==="function"){let D=N();if(D.then)N=await D;else N=D}return N}}return jN0=X,jN0}var TN0,yj1;function NY8(){if(yj1)return TN0;yj1=1;let $=bq0(),{v4:Y}=hq0;function X(J,Q){return J.reduce((W,Z,K)=>{if(Q&&Q.keys&&Z===Object(Z)){let H=[];for(let z=0;z<Q.keys.length;z++){let V=Q.keys[z].name;H.push(G(Z[V]))}W[$(H)]=K}else if("id"in Z)W[$(Z.id)]=K;else W[K]=K;return W},{})}function G(J){if(J===void 0)return`~${Y()}`;else return J}return TN0=X,TN0}var CN0,bj1;function LY8(){if(bj1)return CN0;bj1=1;function $(Y,X){let G={get(Z,K){if(K==="map")return()=>{return new Proxy(W,G)};else if(typeof Z[K]<"u")return Z[K];else return()=>{return new Proxy({},G)}},apply(Z,K,H){if(Z===W)return Z(...H);else return new Proxy({},G)},set(Z,K,H){return Z[K]=H,!0}};function J(Z){return Z(J)}J.http=(Z)=>Z,J.pg=Q,J.pglite=Q,J.postgres=Q,J.mssql=Q,J.mssqlNative=Q,J.mysql=Q,J.sap=Q,J.oracle=Q,J.sqlite=Q,J.d1=Q;function Q(){throw Error("Cannot create pool for database outside node")}function W(Z){if(Z&&Z.db&&typeof Z.db==="function")return Y({...Z,db:J(Z.db),providers:J});return Y({...Z,providers:J})}return W.http=(Z)=>Y({db:Z,providers:J}),W.pg=()=>Y({db:Q,providers:J}),W.pglite=()=>Y({db:Q,providers:J}),W.postgres=()=>Y({db:Q,providers:J}),W.mssql=()=>Y({db:Q,providers:J}),W.mssqlNative=()=>Y({db:Q,providers:J}),W.mysql=()=>Y({db:Q,providers:J}),W.sap=()=>Y({db:Q,providers:J}),W.oracle=()=>Y({db:Q,providers:J}),W.sqlite=()=>Y({db:Q,providers:J}),W.d1=()=>Y({db:Q,providers:J}),new Proxy(W,G)}return CN0=$,CN0}var sy1=PB(a$8),SN0,hj1;function BY8(){if(hj1)return SN0;hj1=1;class ${constructor(){this.requestInterceptors=[],this.responseInterceptors=[]}get request(){return{use:(Y,X)=>{let G=Math.random().toString(36).substr(2,9);return this.requestInterceptors.push({id:G,onFulfilled:Y,onRejected:X}),G},eject:(Y)=>{this.requestInterceptors=this.requestInterceptors.filter((X)=>X.id!==Y)}}}get response(){return{use:(Y,X)=>{let G=Math.random().toString(36).substr(2,9);return this.responseInterceptors.push({id:G,onFulfilled:Y,onRejected:X}),G},eject:(Y)=>{this.responseInterceptors=this.responseInterceptors.filter((X)=>X.id!==Y)}}}applyTo(Y){for(let{onFulfilled:X,onRejected:G}of this.requestInterceptors)Y.interceptors.request.use(X,G);for(let{onFulfilled:X,onRejected:G}of this.responseInterceptors)Y.interceptors.response.use(X,G)}}return SN0=function(){return new $},SN0}var kN0,fj1;function ty(){if(fj1)return kN0;return fj1=1,kN0={useProxy:!0,useLazyDefaults:!0},kN0}var vN0,gj1;function OY8(){if(gj1)return vN0;gj1=1;let $=oy(),Y=bq0(),X=AY8(),G=DY8(),J=NY8(),Q=new WeakMap,W=new WeakMap,Z=Symbol(),K=LY8(),H=sy1,z=BY8(),V=ty();function A(O={}){if(V.useLazyDefaults=!1,O.pg)O={db:O};let{transaction:E,reactive:M}=O,R=O.providers||{},q=O.db;if(typeof R==="function")q=typeof O.db==="function"?R(O.db):O.db;let w=z();function I(g={}){if(g.pg)g={db:g};return A({...O,...g})}I.reactive=(g)=>M=g,I.map=K.bind(null,I),Object.defineProperty(I,"metaData",{get:k,enumerable:!0,configurable:!1}),I.interceptors=w,I.createPatch=y,I.table=b,I.or=L("or"),I.and=L("and"),I.not=L("not"),I.filter={or:I.or,and:I.and,not:I.not,toJSON:function(){return}},I.query=v,I.transaction=u,I.db=q,I.mssql=_.bind(null,"mssql"),I.mssqlNative=_.bind(null,"mssqlNative"),I.pg=_.bind(null,"pg"),I.pglite=_.bind(null,"pglite"),I.postgres=_.bind(null,"postgres"),I.d1=_.bind(null,"d1"),I.sqlite=_.bind(null,"sqlite"),I.sap=_.bind(null,"sap"),I.oracle=_.bind(null,"oracle"),I.http=_.bind(null,"http"),I.mysql=_.bind(null,"mysql"),I.express=x,I.close=P;function P(){return I.db.end?I.db.end():Promise.resolve()}function _(g,...p){let h=R[g].apply(null,p);return I({db:h})}if(O.tables)I.tables=O.tables;return new Proxy(I,{get(g,p){if(p in I)return Reflect.get(...arguments);else{let h={readonly:O.readonly,concurrency:O.concurrency};return b(O?.tables?.[p]||q,p,{...h,...H(O[p])})}}});function k(){let g={readonly:O.readonly,concurrency:O.concurrency};for(let p in O.tables)g[p]=T(O.tables[p],S(O,p));return g}function S(g,p){let h={};if("readonly"in g)h.readonly=g.readonly;if("concurrency"in g)h.concurrency=g.concurrency;return{...h,...g[p]||{}}}function T(g,p){let h={};for(let t=0;t<g._columns.length;t++){let s=g._columns[t].alias;h[s]=S(p,s)}for(let t in g._relations)if(!n(t,g))h[t]=T(g._relations[t].childTable,S(p,t));return h;function n(t,s){return s[t]&&s[t]._relation.columns}}async function v(){return G(q,void 0,{tableOptions:{db:q,transaction:E}}).query.apply(null,arguments)}function x(g){if(R.express)return R.express(I,{...O,...g});else throw Error("Cannot host express clientside")}function y(g,p,...h){if(!Array.isArray(g))g=[g],p=[p];let n=[g,p,...h];return $(...n)}async function d(){let g=q;if(typeof g==="function"){let p=g();if(p.then)g=await p;else g=p}return g}async function u(g,p){let h=await d();if(!h.createTransaction)throw Error("Transaction not supported through http");let n=h.createTransaction(p);try{let t=I({transaction:n}),s=await g(t);return n.done=!0,await n(n.commit),s}catch(t){await n(n.rollback.bind(null,t))}}function b(g,p,h){h=h||{},h={db:q,...h,transaction:E};let n,t={count:m,getMany:Q0,aggregate:e,getAll:a,getOne:$0,getById:Y0,proxify:C0,update:g0,replace:p0,updateChanges:U4,insert:P1,insertAndForget:d1,delete:R0,deleteCascade:I0,patch:C4,expand:X0},Z0=new Proxy(t,{get(N0,f0){if(f0 in t)return Reflect.get(...arguments);else return L(f0)}});return Z0;function X0(){return t}async function a(){return Q0.bind(null,void 0).apply(null,arguments)}async function Q0(N0,f0){let a0=Y1();f0=K1({},f0);let c0=[N0,f0].concat(Array.prototype.slice.call(arguments).slice(2)),F1=await K0.apply(null,c0);return await a0,C0(F1,f0,!0)}async function e(N0){let f0=O0(null,N0),a0=Y({path:"aggregate",args:f0});return G(g,p,{axios:w,tableOptions:h}).post(a0)}async function m(N0){let f0=[N0].concat(Array.prototype.slice.call(arguments).slice(1)),a0=Y({path:"count",args:f0});return G(g,p,{axios:w,tableOptions:h}).post(a0)}async function $0(N0,f0){let a0=Y1();f0=K1({},f0);let c0={...f0,...{limit:1}},F1=[N0,c0].concat(Array.prototype.slice.call(arguments).slice(2)),E1=await K0.apply(null,F1);if(await a0,E1.length===0)return;return C0(E1[0],f0,!0)}async function Y0(){if(arguments.length===0)return;let N0=await Y1(),f0=I.filter;for(let c0=0;c0<N0.keys.length;c0++){let F1=N0.keys[c0].name,E1=arguments[c0];f0=f0.and(Z0[F1].eq(E1))}let a0=[f0].concat(Array.prototype.slice.call(arguments).slice(N0.keys.length));return $0.apply(null,a0)}async function K0(){let N0=A0.apply(null,arguments),f0=Y({path:"getManyDto",args:N0});return G(g,p,{axios:w,tableOptions:h}).post(f0)}function A0(N0,f0,...a0){let c0=Array.prototype.slice.call(arguments);if(f0)return[N0,D0(f0),...a0];else return c0}function D0(N0,f0=""){if(typeof N0!=="object"||N0===null)return N0;if(Array.isArray(N0))return N0.map((c0)=>D0(c0,f0));let a0={...N0};for(let c0 in N0)if(c0==="where"&&typeof a0[c0]==="function")a0.where=L(f0+"where")(a0.where);else if(typeof a0[c0]==="function")a0[c0]=N(f0,a0[c0]);else a0[c0]=D0(N0[c0],f0+c0+".");return a0}function O0(N0,f0,...a0){let c0=Array.prototype.slice.call(arguments);if(f0)return[N0,F1(f0),...a0];else return c0;function F1(E1,l4=""){if(typeof E1!=="object"||E1===null)return E1;if(Array.isArray(E1))return E1.map((C1)=>F1(C1,l4));let Q1={...E1};for(let C1 in E1)if(C1==="where"&&typeof Q1[C1]==="function")Q1.where=L(l4+"where")(Q1.where);else if(typeof Q1[C1]==="function")Q1[C1]=D(l4,Q1[C1]);else Q1[C1]=F1(E1[C1],l4+C1+".");return Q1}}async function R0(){let N0=Array.prototype.slice.call(arguments),f0=Y({path:"delete",args:N0});return G(g,p,{axios:w,tableOptions:h}).post(f0)}async function I0(){let N0=Array.prototype.slice.call(arguments),f0=Y({path:"deleteCascade",args:N0});return G(g,p,{axios:w,tableOptions:h}).post(f0)}async function g0(N0,f0,a0){let c0=[N0,D0(f0),D0(a0)],F1=Y({path:"update",args:c0}),l4=await G(g,p,{axios:w,tableOptions:h}).post(F1);if(a0)return C0(l4,a0)}async function p0(N0,f0){let a0=[N0,D0(f0)],c0=Y({path:"replace",args:a0}),E1=await G(g,p,{axios:w,tableOptions:h}).post(c0);if(f0)return C0(E1,f0)}async function U4(N0,f0,...a0){let F1=[void 0].concat(a0);if(Array.isArray(N0)){let E1=await Q0.apply(null,[N0,...a0]);return E1.splice.apply(E1,[0,E1.length,...N0]),await E1.saveChanges.apply(E1,F1),E1}else{let E1=C0([f0],F1[0]);return E1.splice.apply(E1,[0,1,N0]),await E1.saveChanges.apply(E1,F1),C0(E1[0],F1[0])}}async function P1(N0,...f0){let c0=[void 0].concat(f0);if(Array.isArray(N0)){let F1=C0([],f0[0]);return F1.splice.apply(F1,[0,0,...N0]),await F1.saveChanges.apply(F1,c0),F1}else{let F1=C0([],c0[0]);return F1.splice.apply(F1,[0,0,N0]),await F1.saveChanges.apply(F1,c0),C0(F1[0],f0[0])}}async function d1(N0){let a0=[void 0,{insertAndForget:!0}];if(Array.isArray(N0)){let c0=C0([],a0[0]);c0.splice.apply(c0,[0,0,...N0]),await c0.saveChanges.apply(c0,a0)}else{let c0=C0([],a0[0]);c0.splice.apply(c0,[0,0,N0]),await c0.saveChanges.apply(c0,a0)}}function C0(N0,f0,a0){if(Array.isArray(N0))return n0(N0,f0,a0);else return J0(N0,f0,a0)}function n0(N0,f0,a0){let c0=N0;if(M)N0=M(N0);let F1={get(Q1,C1){if(C1==="toJSON")return()=>{return B0(N0)};else if(C1==="save"||C1==="saveChanges")return c1.bind(null,N0);else if(C1==="delete")return t4.bind(null,N0);else if(C1==="refresh")return T1.bind(null,N0);else if(C1==="clearChanges")return Q4.bind(null,N0);else if(C1==="acceptChanges")return C6.bind(null,N0);else if(C1===Z)return c0;else return Reflect.get.apply(c0,arguments)}},E1=B(N0,()=>{Q.set(N0,{json:X(N0,a0),strategy:f0,originalArray:[...N0]})}),l4=new Proxy(E1,F1);if(f0!==void 0){let{limit:Q1,...C1}={...f0};W.set(N0,C1)}return l4}function J0(N0,f0,a0){let c0={get(l4,Q1){if(Q1==="save"||Q1==="saveChanges")return w4.bind(null,N0);else if(Q1==="delete")return R4.bind(null,N0);else if(Q1==="refresh")return A6.bind(null,N0);else if(Q1==="clearChanges")return b4.bind(null,N0);else if(Q1==="acceptChanges")return K4.bind(null,N0);else if(Q1==="toJSON")return()=>{return B0(N0)};else if(Q1===Z)return N0;else return Reflect.get(...arguments)}},F1=B(N0,()=>{Q.set(N0,{json:X(N0,a0),strategy:f0})}),E1=new Proxy(F1,c0);return W.set(N0,f0),E1}function B0(N0,f0=n){if(!N0)return null;if(!f0)return N0;if(Array.isArray(N0))return N0.map((c0)=>B0(c0,f0));let a0={};for(let c0 in N0)if(c0 in f0.relations)a0[c0]=B0(N0[c0],f0.relations[c0]);else if(c0 in f0.columns){if(f0.columns[c0].serializable)a0[c0]=N0[c0]}else a0[c0]=N0[c0];return a0}async function Y1(){if(n)return n;n=await G(g,p,{axios:w,tableOptions:h}).get();while(a0(n))n=f0(n);return n;function f0(c0,F1=new Map){if(typeof c0==="number")return F1.get(c0)||c0;F1.set(c0.id,c0);for(let E1 in c0.relations)c0.relations[E1]=f0(c0.relations[E1],F1);return c0}function a0(c0,F1=new WeakSet){if(typeof c0==="number")return!0;else if(F1.has(c0))return!1;else return F1.add(c0),Object.values(c0.relations).reduce((E1,l4)=>{return E1||a0(l4,F1)},!1)}}async function c1(N0,f0,a0){let c0=!1,F1=Q.get(N0)?.json;if(!F1)return;a0=n6({strategy:a0},N0),a0=K1(N0,a0);let E1=await Y1(),l4=$(F1,N0,E1);if(l4.length===0)return;let Q1=Y({patch:l4,options:{strategy:a0,...h,...f0,deduceStrategy:c0}}),f4=G(g,p,{axios:w,tableOptions:h}).patch(Q1);if(a0?.insertAndForget){await f4;return}let O6=c4(N0,l4,E1),J9=r4(N0),{changed:o$,strategy:Y4}=await f4;p6(o$,N0,[...J9,...O6]),Q.set(N0,{json:X(N0),strategy:Y4,originalArray:[...N0]})}async function C4(N0,f0,a0){let c0=!1;if(N0.length===0)return;let F1=Y({patch:N0,options:{strategy:a0,...h,...f0,deduceStrategy:c0}});await G(g,p,{axios:w,tableOptions:h}).patch(F1);return}function c4(N0,f0,a0){let c0=[],F1=new Set(Q.get(N0).originalArray),E1={},l4=J(N0,a0);for(let Q1=0;Q1<f0.length;Q1++){let f4=f0[Q1].path.split("/"),O6=l4[f4[1]];if(O6>=0&&F1.has(N0[O6])&&!E1[O6])c0.push(O6),E1[O6]=!0}return c0}function r4(N0){let f0=[],a0=new Set(Q.get(N0).originalArray);for(let c0=0;c0<N0.length;c0++)if(!a0.has(N0[c0]))f0.push(c0);return f0}function T6(N0,f0){for(let a0=0;a0<N0.length;a0++)for(let c0 in N0[a0])f0[a0][c0]=N0[a0][c0]}function p6(N0,f0,a0){for(let c0=0;c0<N0.length;c0++)f0[a0[c0]]=N0[c0]}function n6(N0,f0){if(N0?.strategy!==void 0)return N0.strategy;if(f0){let a0=Q.get(f0);if(a0?.strategy!==void 0){let{limit:c0,...F1}={...a0.strategy};return F1}}}function K1(N0,f0){if(f0!==void 0)return f0;else if(W.get(N0)!==void 0){let{limit:a0,...c0}={...W.get(N0)};return c0}}function Q4(N0){let f0=Q.get(N0)?.json;if(!f0)return;let a0=X(f0);N0.splice(0,a0.length,...a0)}function C6(N0){let f0=Q.get(N0);if(!f0)return;f0.json=X(N0),f0.originalArray=[...N0]}async function t4(N0,f0){if(N0.length===0)return;let a0=await Y1(),c0=$(N0,[],a0),F1=Y({patch:c0,options:f0}),E1=G(g,p,{axios:w,tableOptions:h}),{strategy:l4}=await E1.patch(F1);N0.length=0,Q.set(N0,{json:X(N0),strategy:l4})}function a1(N0,f0,a0,c0){let F1=a0[f0[0].name];if(f0.length>1){let E1=N0.get(F1);if(!E1)E1=new Map,N0.set(F1,E1);a1(E1,f0.slice(1),a0,c0)}else N0.set(F1,c0)}function A1(N0,f0,a0){let c0=a0[f0[0].name];if(f0.length>1)return A1(N0.get(c0),f0.slice(1));else return N0.get(c0)}async function T1(N0,f0){if(Q4(N0),f0=n6({strategy:f0},N0),f0=K1(N0,f0),N0.length===0)return;let a0=await Y1(),c0=I.filter,F1=new Map;for(let f4=0;f4<N0.length;f4++){let O6=N0[f4],J9=I.filter;for(let o$=0;o$<a0.keys.length;o$++){let Y4=a0.keys[o$].name,i4=O6[Y4];J9=J9.and(Z0[Y4].eq(i4))}a1(F1,a0.keys,O6,f4),c0=c0.or(J9)}let E1=await K0(c0,f0),l4=new Set;if(N0.length!==E1.length)for(var Q1=0;Q1<N0.length;Q1++)l4.add(Q1);for(let f4=0;f4<E1.length;f4++){let O6=E1[f4],J9=A1(F1,a0.keys,O6);if(N0.length!==E1.length)l4.delete(J9);N0[J9]=O6}let C1=0;for(let f4 of l4)N0.splice(f4+C1,1),C1--;Q.set(N0,{json:X(N0),strategy:f0,originalArray:[...N0]}),W.set(N0,f0)}async function R4(N0,f0){let a0=n6(f0,N0),c0=await Y1(),F1=$([N0],[],c0),E1=Y({patch:F1,options:f0});await G(g,p,{axios:w,tableOptions:h}).patch(E1),Q.set(N0,{strategy:a0})}async function w4(N0,f0,a0){let c0;if(arguments.length<3)c0=!1;a0=n6({strategy:a0},N0),a0=K1(N0,a0);let F1=Q.get(N0)?.json;if(!F1)return;let E1=await Y1(),l4=$([F1],[N0],E1);if(l4.length===0)return;let Q1=Y({patch:l4,options:{...h,...f0,strategy:a0,deduceStrategy:c0}}),C1=G(g,p,{axios:w,tableOptions:h}),{changed:f4,strategy:O6}=await C1.patch(Q1);T6(f4,[N0]),Q.set(N0,{json:X(N0),strategy:O6})}async function A6(N0,f0){b4(N0),f0=n6({strategy:f0},N0),f0=K1(N0,f0);let a0=await Y1(),c0=I.filter;for(let E1=0;E1<a0.keys.length;E1++){let l4=a0.keys[E1].name,Q1=N0[l4];c0=c0.and(Z0[l4].eq(Q1))}let F1=await K0(c0,f0);for(let E1 in N0)delete N0[E1];if(F1.length===0)return;for(let E1 in F1[0])N0[E1]=F1[0][E1];Q.set(N0,{json:X(N0),strategy:f0}),W.set(N0,f0)}function K4(N0){let f0=Q.get(N0);if(!f0)return;let{strategy:a0}=f0;Q.set(N0,{json:X(N0),strategy:a0})}function b4(N0){let f0=Q.get(N0)?.json;if(!f0)return;let a0=X(f0);for(let c0 in N0)delete N0[c0];for(let c0 in a0)N0[c0]=a0[c0]}}}function F(){return new Proxy({},{get(E,M){return L(M)}})}function N(O,E){let M={sum:P,count:S,avg:_,max:C,min:k},R={get(T,v){if(v in M)return Reflect.get(...arguments);else return q=L(O+"_aggregate"),L(v)}},q,w=new Proxy(M,R),I=E(w);if(q)return q(I.self());else return I;function P(T){return L(O+"_aggregate")(T(L("")).groupSum())}function _(T){return L(O+"_aggregate")(T(L("")).groupAvg())}function C(T){return L(O+"_aggregate")(T(L("")).groupMax())}function k(T){return L(O+"_aggregate")(T(L("")).groupMin())}function S(T){return L(O+"_aggregate")(T(L("")).groupCount())}}function D(O,E){let M={sum:P,count:S,avg:_,max:C,min:k},R={get(T,v){if(v in M)return Reflect.get(...arguments);else return q=L(O+"_aggregate"),L(v)}},q,w=new Proxy(M,R),I=E(w);if(q)return q(I.self());else return I;function P(T){return L(O+"_aggregate")(T(L("")).sum())}function _(T){return L(O+"_aggregate")(T(L("")).avg())}function C(T){return L(O+"_aggregate")(T(L("")).max())}function k(T){return L(O+"_aggregate")(T(L("")).min())}function S(T){return L(O+"_aggregate")(T(L("")).count())}}function L(O,...E){function M(){let q=[];for(let P=0;P<arguments.length;P++)if(typeof arguments[P]==="function")q[P]=arguments[P](F(O.split(".").slice(0,-1).join(".")));else q[P]=arguments[P];q=E.concat(Array.prototype.slice.call(q));let w={path:O,args:q};return new Proxy(w,{get(P,_){if(_==="toJSON")return w.toJSON;else if(_==="then")return;if(_ in w)return Reflect.get(...arguments);else return L(_,w)}})}return new Proxy(M,{get(q,w){if(w==="toJSON")return Reflect.get(...arguments);else if(w==="then")return;else{let I=O?O+".":"";return L(I+w)}}})}function B(O,E){let M=!1,R={get(q,w,I){let P=Reflect.get(q,w,I);if(typeof P==="object"&&P!==null)return new Proxy(P,R);return P},set(q,w,I,P){if(!M)M=!0,E(JSON.stringify(q));return Reflect.set(q,w,I,P)},deleteProperty(q,w){if(!M)M=!0,E(JSON.stringify(q));return Reflect.deleteProperty(q,w)}};return new Proxy(O,R)}return vN0=A(),vN0}var xN0,mj1;function UW(){if(mj1)return xN0;mj1=1;let{newBoolean:$}=iy1();return xN0=$,xN0}var yN0,uj1;function wB(){if(uj1)return yN0;uj1=1;function $(Y,X,G){if(X.encode.safe)return X.encode.safe(Y,G);else return X.encode(Y,G)}return yN0=$,yN0}var bN0,pj1;function g5(){if(pj1)return bN0;pj1=1;let $=UP();function Y(X,G){let J=$(X);if(!J)throw Error("Rdb transaction is no longer available. Is promise chain broken ?");return(J.quote||(()=>`"${G}"`))(G)}return bN0=Y,bN0}var hN0,dj1;function EY8(){if(dj1)return hN0;dj1=1;var $=UW(),Y=" is ",X=wB(),G=g5();function J(Q,W,Z,K){var H="=",z=X(Q,W,Z);if(z.sql()=="null")H=Y;var V=G(Q,K)+"."+G(Q,W._dbName)+H,A=z.prepend(V);return $(A)}return hN0=J,hN0}var fN0,cj1;function MY8(){if(cj1)return fN0;cj1=1;var $=UW(),Y=wB(),X=" is not ",G=g5();function J(Q,W,Z,K){var H="<>",z=Y(Q,W,Z);if(z.sql()=="null")H=X;var V=G(Q,K)+"."+G(Q,W._dbName)+H,A=z.prepend(V);return $(A)}return fN0=J,fN0}var gN0,lj1;function RY8(){if(lj1)return gN0;lj1=1;var $=UW(),Y=wB(),X=g5();function G(J,Q,W,Z){var K="<",H=Y(J,Q,W),z=X(J,Z)+"."+X(J,Q._dbName)+K,V=H.prepend(z);return $(V)}return gN0=G,gN0}var mN0,ij1;function qY8(){if(ij1)return mN0;ij1=1;var $=UW(),Y=wB(),X=g5();function G(J,Q,W,Z){var K="<=",H=Y(J,Q,W),z=X(J,Z)+"."+X(J,Q._dbName)+K,V=H.prepend(z);return $(V)}return mN0=G,mN0}var uN0,nj1;function IY8(){if(nj1)return uN0;nj1=1;var $=UW(),Y=wB(),X=g5();function G(J,Q,W,Z){var K=">",H=Y(J,Q,W),z=X(J,Z)+"."+X(J,Q._dbName)+K,V=H.prepend(z);return $(V)}return uN0=G,uN0}var pN0,rj1;function PY8(){if(rj1)return pN0;rj1=1;var $=UW(),Y=wB(),X=g5();function G(J,Q,W,Z){var K=">=",H=Y(J,Q,W),z=X(J,Z)+"."+X(J,Q._dbName)+K,V=H.prepend(z);return $(V)}return pN0=G,pN0}var dN0,aj1;function wY8(){if(aj1)return dN0;aj1=1;let $=Y9(),Y=UW(),X=g5();function G(J,Q,W,Z){let K;if(W.length===0)return K=$("1=2"),Y(K);let H=`${X(J,Z)}.${X(J,Q._dbName)} in (`,z=Q.encode,V=Array(W.length),A=[];for(let N=0;N<W.length;N++)V[N]=z(J,W[N]),A=[...A,...V[N].parameters];let F=`${H+V.map((N)=>N.sql()).join(",")})`;return Y($(F,A))}return dN0=G,dN0}var cN0,sj1;function oy1(){if(sj1)return cN0;sj1=1;function $(Y,X){if(X)return X;return Y._rootAlias||Y._dbName}return cN0=$,cN0}var lN0,oj1;function _Y8(){if(oj1)return lN0;oj1=1;let $=g6();function Y(X,G,J,Q,W=!0){let Z=$(X,"quote"),K=Z(Q._rootAlias||Q._dbName),H=Z(J._dbName);return{expression:(z)=>W?`COALESCE(${G}(${K}.${H}), 0) as ${Z(z)}`:`${G}(${K}.${H}) as ${Z(z)}`,joins:[""]}}return lN0=Y,lN0}var iN0,tj1;function At(){if(tj1)return iN0;tj1=1;let $=g6();function Y(X,G,J){let Q=$(X,"quote");J=Q(J);var W="",Z=G._formulaDiscriminators,K=G._columnDiscriminators;return H(),z(),W;function H(){for(var A=0;A<Z.length;A++){var F=Z[A].replace("@this",J);V(),W+="("+F+")"}}function z(){for(var A=0;A<K.length;A++){var F=K[A].split("=");V(),W+=J+"."+Q(F[0])+"="+F[1]}}function V(){if(W)W+=" AND ";else W=" "}}return iN0=Y,iN0}var nN0,ej1;function jY8(){if(ej1)return nN0;ej1=1;var $=At();function Y(X,G,J){var Q=$(X,G,J);if(Q)return" AND"+Q;return Q}return nN0=Y,nN0}var rN0,$T1;function HP(){if($T1)return rN0;$T1=1;let $=jY8(),Y=Y9(),X=g6();function G(J,Q,W,Z,K,H,z){let V=X(J,"quote"),A=K,F=H;K=V(A),H=V(F);var N="",D="";for(var L=0;L<W.length;L++)B(L),D=" AND ";function B(E){var M=W[E],R=Z[E];N+=D+K+"."+V(M._dbName)+"="+H+"."+V(R._dbName)}N+=$(J,Q,F);var O=Y(N);if(z)O=O.append(D).append(z);return O}return rN0=G,rN0}var aN0,YT1;function TY8(){if(YT1)return aN0;YT1=1;var $=hG(),Y=HP();let X=g6();function G(Q,W,Z,K,H=!0){let z=X(Q,"quote"),V=$(Q),A="y"+V.aggregateCount++,F=z(A),N=z("x"),D=M(K),L=` LEFT JOIN (SELECT ${D},${W}(${N}.${z(Z._dbName)}) as amount`,B=J(Q,K,A),O=` FROM ${z(K._dbName)} ${N} GROUP BY ${D}) ${F} ON (${B})`,E=L+O;return{expression:(R)=>H?`COALESCE(${F}.amount, 0) as ${z(R)}`:`${F}.amount as ${R}`,joins:[E]};function M(R){return R._primaryColumns.map((q)=>`${N}.${z(q._dbName)}`).join(",")}}function J(Q,W,Z){let K=W._rootAlias||W._dbName,H=W._primaryColumns;return Y(Q,W,H,H,K,Z).sql()}return aN0=G,aN0}var sN0,XT1;function CY8(){if(XT1)return sN0;XT1=1;let $=EY8(),Y=MY8(),X=RY8(),G=qY8(),J=IY8(),Q=PY8(),W=wY8(),Z=oy1(),K=g5(),H=_Y8(),z=TY8();return sN0=function(V,A){var F={},N=Z.bind(null,V);F._dbName=A,F.alias=A,V._aliases.add(A),F.dbNull=null,V._columns.push(F),V[A]=F,F.equal=function(L,B,O){return O=N(O),$(L,F,B,O)},F.notEqual=function(L,B,O){return O=N(O),Y(L,F,B,O)},F.lessThan=function(L,B,O){return O=N(O),X(L,F,B,O)},F.lessThanOrEqual=function(L,B,O){return O=N(O),G(L,F,B,O)},F.greaterThan=function(L,B,O){return O=N(O),J(L,F,B,O)},F.greaterThanOrEqual=function(L,B,O){return O=N(O),Q(L,F,B,O)},F.between=function(L,B,O,E){return E=N(E),B=F.greaterThanOrEqual(L,B,E),O=F.lessThanOrEqual(L,O,E),B.and(O)},F.in=function(L,B,O){return O=N(O),W(L,F,B,O)},F.eq=F.equal,F.EQ=F.eq,F.ne=F.notEqual,F.NE=F.ne,F.gt=F.greaterThan,F.GT=F.gt,F.ge=F.greaterThanOrEqual,F.GE=F.ge,F.lt=F.lessThan,F.LT=F.lt,F.le=F.lessThanOrEqual,F.LE=F.le,F.IN=F.in,F.self=D,F.groupSum=(L,...B)=>z.apply(null,[L,"sum",F,V,...B]),F.groupAvg=(L,...B)=>z.apply(null,[L,"avg",F,V,...B]),F.groupMin=(L,...B)=>z.apply(null,[L,"min",F,V,!1,...B]),F.groupMax=(L,...B)=>z.apply(null,[L,"max",F,V,!1,...B]),F.groupCount=(L,...B)=>z.apply(null,[L,"count",F,V,!1,...B]),F.sum=(L,...B)=>H.apply(null,[L,"sum",F,V,...B]),F.avg=(L,...B)=>H.apply(null,[L,"avg",F,V,...B]),F.min=(L,...B)=>H.apply(null,[L,"min",F,V,!1,...B]),F.max=(L,...B)=>H.apply(null,[L,"max",F,V,!1,...B]),F.count=(L,...B)=>H.apply(null,[L,"count",F,V,!1,...B]);function D(L){let B=K(L,V._rootAlias||V._dbName),O=K(L,F._dbName);return{expression:(E)=>`${B}.${O} ${K(L,E)}`,joins:[""],column:F,groupBy:`${B}.${O}`}}return F},sN0}var SY8=PB(s$8),oN0,GT1;function Ft(){if(GT1)return oN0;GT1=1;function $(Y){if(Y==null)return null;return Y}return oN0=$,oN0}var tN0,JT1;function kY8(){if(JT1)return tN0;JT1=1;var $=Y9(),Y=Ft();function X(G){var J=function(Q,W){if(W=Y(W),W==null){if(G.dbNull===null)return $("null");return $("'"+G.dbNull+"'")}return $("?",[W])};return J.unsafe=function(Q,W){if(W=Y(W),W==null){if(G.dbNull===null)return"null";return"'"+G.dbNull+"'"}return"'"+W+"'"},J.direct=function(Q,W){return W},J}return tN0=X,tN0}var eN0,QT1;function zP(){if(QT1)return eN0;QT1=1;function $(Y){return function(X,G){if(G==Y.dbNull)return null;return G}}return eN0=$,eN0}var $L0,WT1;function ty1(){if(WT1)return $L0;WT1=1;var $=UW(),Y=" is ",X=g5();function G(J,Q,W,Z,K){Q=" "+Q+" ";var H=W.encode(J,Z);if(H.sql()=="null")Q=Y;else H=W.encode(J,Z+"%");var z=X(J,K)+"."+X(J,W._dbName)+Q,V=H.prepend(z);return $(V)}return $L0=G,$L0}var YL0,ZT1;function vY8(){if(ZT1)return YL0;ZT1=1;var $=ty1();return YL0=(Y,...X)=>$.apply(null,[Y,"LIKE",...X]),YL0}var XL0,KT1;function ey1(){if(KT1)return XL0;KT1=1;let $=g5();var Y=UW(),X=" is ";function G(J,Q,W,Z,K){K=$(J,K),Q=" "+Q+" ";var H=W.encode(J,Z);if(H.sql()=="null")Q=X;else H=W.encode(J,"%"+Z);var z=K+"."+$(J,W._dbName)+Q,V=H.prepend(z);return Y(V)}return XL0=G,XL0}var GL0,UT1;function xY8(){if(UT1)return GL0;UT1=1;var $=ey1();return GL0=(Y,...X)=>$.apply(null,[Y,"LIKE",...X]),GL0}var JL0,HT1;function $b1(){if(HT1)return JL0;HT1=1;let $=g5();var Y=UW(),X=" is ";function G(J,Q,W,Z,K){K=$(J,K),Q=" "+Q+" ";var H=W.encode(J,Z);if(H.sql()=="null")Q=X;else H=W.encode(J,"%"+Z+"%");var z=K+"."+$(J,W._dbName)+Q,V=H.prepend(z);return Y(V)}return JL0=G,JL0}var QL0,zT1;function yY8(){if(zT1)return QL0;zT1=1;var $=$b1();return QL0=(Y,...X)=>$.apply(null,[Y,"LIKE",...X]),QL0}var WL0,VT1;function bY8(){if(VT1)return WL0;VT1=1;var $=ty1();return WL0=(Y,...X)=>$.apply(null,[Y,"ILIKE",...X]),WL0}var ZL0,AT1;function hY8(){if(AT1)return ZL0;AT1=1;var $=ey1();return ZL0=(Y,...X)=>$.apply(null,[Y,"ILIKE",...X]),ZL0}var KL0,FT1;function fY8(){if(FT1)return KL0;FT1=1;var $=$b1();return KL0=(Y,...X)=>$.apply(null,[Y,"ILIKE",...X]),KL0}var UL0,DT1;function gY8(){if(DT1)return UL0;DT1=1;var $=UW(),Y=" is ",X=wB();let G=g5();function J(Q,W,Z,K){var H=" ILIKE ",z=X(Q,W,Z);if(z.sql()=="null")H=Y;var V=K+"."+G(Q,W._dbName)+H,A=z.prepend(V);return $(A)}return UL0=J,UL0}var HL0,NT1;function mY8(){if(NT1)return HL0;NT1=1;var $=kY8(),Y=zP(),X=vY8(),G=xY8(),J=yY8(),Q=bY8(),W=hY8(),Z=fY8(),K=gY8(),H=Ft(),z=oy1();function V(A,F){F.tsType="StringColumn",F.purify=H,F.encode=$(F),F.decode=Y(F);var N=z.bind(null,A);F.startsWith=function(D,L,B){return B=N(B),X(D,F,L,B)},F.endsWith=function(D,L,B){return B=N(B),G(D,F,L,B)},F.contains=function(D,L,B){return B=N(B),J(D,F,L,B)},F.iStartsWith=function(D,L,B){return B=N(B),Q(D,F,L,B)},F.iEndsWith=function(D,L,B){return B=N(B),W(D,F,L,B)},F.iContains=function(D,L,B){return B=N(B),Z(D,F,L,B)},F.iEqual=function(D,L,B){return B=N(B),K(D,F,L,B)},F.iEq=F.iEqual,F.IEQ=F.iEqual,F.ieq=F.iEqual}return HL0=V,HL0}var zL0,LT1;function Yb1(){if(LT1)return zL0;LT1=1;function $(Y){if(Y==null)return null;return Y}return zL0=$,zL0}var VL0,BT1;function uY8(){if(BT1)return VL0;BT1=1;var $=Y9(),Y=Yb1(),X=hG(),G=g6();function J(Q){let W=function(Z,K){var H=Y(K);if(H==null){if(Q.dbNull===null)return $("null");return $("'"+Q.dbNull+"'")}var z=X(Z),V=G(Z,"encodeJSON")||((F)=>F),A=z.formatJSONIn;return $(A?A("?"):"?",[V(H)])};return W.unsafe=function(Z,K){var H=Y(K);if(H==null){if(Q.dbNull===null)return"null";return"'"+Q.dbNull+"'"}var z=G(Z,"encodeJSON")||((V)=>V);if(z)H=z(H);return H},W.direct=function(Z,K){var H=G(Z,"encodeJSON")||((z)=>z);if(H)K=H(K);return K},W}return VL0=J,VL0}var AL0,OT1;function pY8(){if(OT1)return AL0;OT1=1;let $=zP(),Y=hG();function X(G){let J=$(G);return function(Q,W){if(W=J(Q,W),W===null)return W;if(typeof W!=="object"){let Z=Y(Q).decodeJSON;if(Z)return Z(W);return W}return W}}return AL0=X,AL0}var FL0,ET1;function Xb1(){if(ET1)return FL0;ET1=1;var $=g6();let Y=g5();function X(G,J,Q,W){var Z=$(G,Q);if(Z)return Z(J,W);else if(W)return`${W}.${Y(G,J._dbName)}`;else return`${Y(G,J._dbName)}`}return FL0=X,FL0}var Gb1=PB(dD0),DL0,MT1;function dY8(){if(MT1)return DL0;MT1=1;var $=uY8(),Y=pY8(),X=Xb1(),G=Yb1(),J=Gb1;let Q=sy1;function W(K){K.tsType="JSONColumn",K.purify=G,K.encode=$(K),K.decode=Y(K),K.formatOut=(H,...z)=>X.apply(null,[H,K,"formatJSONOut",...z]),K.onChange=J,K.toDto=Z}function Z(K){return Q(K)}return DL0=W,DL0}var NL0,RT1;function Jb1(){if(RT1)return NL0;RT1=1;function $(Y){if(Y==null)return null;var X=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;if(!X.test(Y))throw TypeError(Y+" is not a valid UUID");return Y}return NL0=$,NL0}var LL0,qT1;function cY8(){if(qT1)return LL0;qT1=1;var $=Y9(),Y=Jb1();function X(G){let J=function(Q,W){var Z=Y(W);if(Z==null){if(G.dbNull===null)return $("null");return $("'"+G.dbNull+"'")}return $("'"+Z+"'")};return J.unsafe=function(Q,W){var Z=Y(W);if(Z==null){if(G.dbNull===null)return"null";return"'"+G.dbNull+"'"}return"'"+Z+"'"},J.direct=function(Q,W){return W},J}return LL0=X,LL0}var BL0,IT1;function lY8(){if(IT1)return BL0;IT1=1;function $(Y){return function(X,G){if(G==Y.dbNull)return null;return G.toLowerCase()}}return BL0=$,BL0}var OL0,PT1;function iY8(){if(PT1)return OL0;PT1=1;var $=cY8(),Y=lY8(),X=Jb1();function G(J){J.tsType="UUIDColumn",J.purify=X,J.encode=$(J),J.decode=Y(J)}return OL0=G,OL0}var EL0,wT1;function nY8(){if(wT1)return EL0;wT1=1;var $=/(\d{4}-[01]\d-[0-3]\d(T| )[0-2]\d:[0-5]\d:[0-5]\d\.\d+)|(\d{4}-[01]\d-[0-3]\d(T| )[0-2]\d:[0-5]\d:[0-5]\d)|(\d{4}-[01]\d-[0-3]\d(T| )[0-2]\d:[0-5]\d)/,Y=/^\d{4}-[01]\d-[0-3]\d$/;function X(G){if($.test(G)||Y.test(G))return G;else throw TypeError(G+" is not a valid Date")}return EL0=X,EL0}var ML0,_T1;function Dt(){if(_T1)return ML0;_T1=1;var $=nY8(),Y=ZP();function X(G){if(G==null)return null;if(G.toISOString)return Y(G);if(G.indexOf("Z")>-1)return Y(new Date(G));var J=$(G);if(J)return J;return G}return ML0=X,ML0}var RL0,jT1;function rY8(){if(jT1)return RL0;jT1=1;var $=Y9(),Y=Dt(),X=hG(),G=g6();function J(Z){var K=function(H,z){if(z=Y(z),z==null){if(Z.dbNull===null)return $("null");return $("'"+Z.dbNull+"'")}var V=X(H),A=V.encodeDate||Q,F=V.formatDateIn;return $(F?F("?"):"?",[A(z)])};return K.unsafe=function(H,z){if(z=Y(z),z==null){if(Z.dbNull===null);return"'"+Z.dbNull+"'"}var V=G(H,"encodeDate")||Q;return V(z)},K.direct=function(H,z){var V=G(H,"encodeDate")||Q;return V(z)},K}function Q(Z){return Z=Z.toISOString?W(Z.toISOString(Z)):W(Z),Z}function W(Z){let K=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?/,H=Z.match(K);return H?H[0]:Z}return RL0=J,RL0}var qL0,TT1;function Qb1(){if(TT1)return qL0;TT1=1;var $=zP(),Y=ZP();function X(G){var J=$(G);return function(Q,W){if(W=J(Q,W),W===null)return W;else if(typeof W==="string")return W.replace(" ","T").replace(" ","");return Y(W)}}return qL0=X,qL0}var IL0,CT1;function aY8(){if(CT1)return IL0;CT1=1;var $=g6();let Y=g5();function X(G,J,Q){var W=$(G,"formatDateOut");if(W)return W(J,Q);else if(Q)return`${Q}.${Y(G,J._dbName)}`;else return`${Y(G,J._dbName)}`}return IL0=X,IL0}var PL0,ST1;function kT1(){if(ST1)return PL0;ST1=1;var $=rY8(),Y=Qb1(),X=aY8(),G=Dt();function J(Q){Q.tsType="DateColumn",Q.purify=G,Q.encode=$(Q),Q.decode=Y(Q),Q.formatOut=(W,...Z)=>X.apply(null,[W,Q,...Z])}return PL0=J,PL0}var wL0,vT1;function sY8(){if(vT1)return wL0;vT1=1;var $=Y9(),Y=Dt();function X(Q){var W=function(Z,K){if(K=Y(K),K==null){if(Q.dbNull===null)return $("null");return $("'"+Q.dbNull+"'")}return $("?",[G(K)])};return W.unsafe=function(Z,K){if(K=Y(K),K==null){if(Q.dbNull===null)return"null";return"'"+Q.dbNull+"'"}return G(K)},W.direct=function(Z,K){return G(K)},W}function G(Q){if(Q.toISOString)return J(Q.toISOString(Q));return J(Q)}function J(Q){return Q}return wL0=X,wL0}var _L0,xT1;function oY8(){if(xT1)return _L0;xT1=1;var $=g6();let Y=g5();function X(G,J,Q){var W=$(G,"formatDateTzOut")||$(G,"formatDateOut");if(W)return W(J,Q);else if(Q)return`${Q}.${Y(G,J._dbName)}`;else return`${Y(G,J._dbName)}`}return _L0=X,_L0}var jL0,yT1;function tY8(){if(yT1)return jL0;yT1=1;var $=sY8(),Y=Qb1(),X=oY8(),G=Dt();function J(Q){Q.tsType="DateColumn",Q.purify=G,Q.encode=$(Q),Q.decode=Y(Q),Q.formatOut=(W,...Z)=>X.apply(null,[W,Q,...Z])}return jL0=J,jL0}var TL0,bT1;function Wb1(){if(bT1)return TL0;bT1=1;function $(Y){if(Y==null)return null;let X=Number.parseFloat(Y);if(!isNaN(X))return X;if(typeof Y!=="number")throw Error("'"+Y+"' is not a number");return Y}return TL0=$,TL0}var CL0,hT1;function eY8(){if(hT1)return CL0;hT1=1;var $=Wb1(),Y=Y9();return CL0=function(X){function G(J,Q){if(Q=$(Q),Q==null){var W=X.dbNull;return Y(""+W)}return Y(""+Q)}return G.unsafe=function(J,Q){if(Q=$(Q),Q==null){var W=X.dbNull;return""+W}return""+Q},G.direct=function(J,Q){return Q},G},CL0}var SL0,fT1;function $X8(){if(fT1)return SL0;fT1=1;var $=zP();function Y(X){var G=$(X);return function(J,Q){if(Q=G(J,Q),Q===null)return Q;if(typeof Q!=="number")return parseFloat(Q);return Q}}return SL0=Y,SL0}var kL0,gT1;function YX8(){if(gT1)return kL0;gT1=1;var $=eY8(),Y=$X8(),X=Wb1();function G(J){J.tsType="NumberColumn",J.lazyDefault=0,J.purify=X,J.encode=$(J),J.decode=Y(J)}return kL0=G,kL0}var vL0,mT1;function XX8(){if(mT1)return vL0;mT1=1;var $=Y9(),Y=Ft(),X=hG(),G=g6();function J(W){var Z=function(K,H){if(H=Y(H),H==null){if(W.dbNull===null)return $("null");return $("'"+W.dbNull+"'")}var z=X(K),V=z.encodeBigint||Q,A=z.formatBigintIn;return $(A?A("?"):"?",[V(H)])};return Z.unsafe=function(K,H){if(H=Y(H),H==null){if(W.dbNull===null);return"'"+W.dbNull+"'"}var z=G(K,"encodeBigint")||Q;return z(H)},Z.direct=function(K,H){var z=G(K,"encodeBigint")||Q;return z(H)},Z}function Q(W){return W}return vL0=J,vL0}var xL0,uT1;function GX8(){if(uT1)return xL0;uT1=1;var $=zP();function Y(X){var G=$(X);return function(J,Q){if(Q=G(J,Q),Q===null)return Q;if(typeof Q==="string")return Q;if(Q.toString)return Q.toString();return Q}}return xL0=Y,xL0}var yL0,pT1;function JX8(){if(pT1)return yL0;pT1=1;var $=XX8(),Y=GX8(),X=Xb1(),G=Ft();function J(Q){Q.tsType="BigintColumn",Q.purify=G,Q.lazyDefault="0",Q.encode=$(Q),Q.decode=Y(Q),Q.formatOut=(W,...Z)=>X.apply(null,[W,Q,"formatBigintOut",...Z])}return yL0=J,yL0}var bL0,dT1;function uq0(){if(dT1)return bL0;dT1=1;function $(Y){if(Y===null||typeof Y>"u")return null;return Boolean(Y)}return bL0=$,bL0}var hL0,cT1;function QX8(){if(cT1)return hL0;cT1=1;var $=uq0(),Y=Y9(),X=g6();function G(Q){function W(Z,K){if(K=$(K),K===null){if(Q.dbNull===null)return Y("null");return Y("'"+Q.dbNull+"'")}var H=X(Z,"encodeBoolean")||J;return Y("?",[H(K)])}return W.unsafe=function(Z,K){if(K=$(K),K===null){if(Q.dbNull===null)return"null";return"'"+Q.dbNull+"'"}var H=X(Z,"encodeBoolean")||J;return H(K)},W.direct=function(Z,K){var H=X(Z,"encodeBoolean")||J;return H(K)},W}function J(Q){return Q}return hL0=G,hL0}var fL0,lT1;function WX8(){if(lT1)return fL0;lT1=1;var $=uq0();function Y(X){return function(G,J){if(J==X.dbNull)return null;return $(J)}}return fL0=Y,fL0}var gL0,iT1;function ZX8(){if(iT1)return gL0;iT1=1;var $=QX8(),Y=WX8(),X=uq0();function G(J){J.tsType="BooleanColumn",J.purify=X,J.lazyDefault=!1,J.encode=$(J),J.decode=Y(J)}return gL0=G,gL0}var mL0,nT1;function Zb1(){if(nT1)return mL0;nT1=1;function $(Y){if(Y==null)return null;if(Buffer.isBuffer(Y))return Y.toString("base64");else if(typeof Y==="string")return Y;else throw Error("'"+Y+"' is not a base64")}return mL0=$,mL0}var uL0,rT1;function KX8(){if(rT1)return uL0;rT1=1;var $=Zb1(),Y=Y9(),X=g6();function G(Q){function W(Z,K){if(K=$(K),K===null)return Y("null");var H=X(Z,"encodeBinary")||J;let z=H(K);return Y("?",[z])}return W.unsafe=function(Z,K){if(K=$(K),K===null)return"null";var H=X(Z,"encodeBinary")||J;return H(K)},W.direct=function(Z,K){var H=X(Z,"encodeBinary")||J;return H(K)},W}function J(Q){return Buffer.from(Q,"base64")}return uL0=G,uL0}var pL0,aT1;function UX8(){if(aT1)return pL0;aT1=1;var $=zP(),Y=g6();function X(J){var Q=$(J);return function(W,Z){var K=Y(W,"decodeBinary")||G;if(Z=Q(W,Z),Z===null)return Z;else return K(Z)}}function G(J){return J.toString("base64")}return pL0=X,pL0}var dL0,sT1;function HX8(){if(sT1)return dL0;sT1=1;var $=KX8(),Y=UX8(),X=Zb1();function G(J){J.tsType="BinaryColumn",J.purify=X,J.encode=$(J),J.decode=Y(J)}return dL0=G,dL0}var cL0,oT1;function zX8(){if(oT1)return cL0;oT1=1;let $=SY8;function Y(G,J){var Q={};return Q.string=function(){return mY8()(J,G),Q},Q.json=function(){return dY8()(G),Q},Q.guid=function(){return iY8()(G),Q},Q.uuid=Q.guid,Q.date=function(){return kT1()(G),Q},Q.date=function(){return kT1()(G),Q},Q.dateWithTimeZone=function(){return tY8()(G),Q},Q.numeric=function(W,Z){return YX8()(G,W,Z),Q},Q.bigint=function(){return JX8()(G),Q},Q.boolean=function(){return ZX8()(G),Q},Q.binary=function(){return HX8()(G),Q},Q.default=function(W){return G.default=W,Q},Q.primary=function(){return G.isPrimary=!0,J._primaryColumns.push(G),Q},Q.as=function(W){var Z=G.alias;return J._aliases.delete(Z),J._aliases.add(W),delete J[Z],J[W]=G,G.alias=W,Q},Q.dbNull=function(W){return G.dbNull=W,Q},Q.serializable=function(W){return G.serializable=W,Q},Q.notNull=function(){G._notNull=!0;function W(Z){if(Z===void 0||Z===null){let K=Error(`Column ${G.alias} cannot be null or undefined`);throw K.status=400,K}}return Q.validate(W)},Q.notNullExceptInsert=function(){G._notNullExceptInsert=!0;function W(Z,K,H){if(H)return;if(Z===void 0||Z===null)throw Error(`Column ${G.alias} cannot be null or undefined`)}return Q.validate(W)},Q.validate=function(W){let Z=G.validate;if(Z)G.validate=K;else G.validate=W;function K(){try{Z.apply(null,arguments),W.apply(null,arguments)}catch(H){let z=Error(H.message||H);throw z.status=400,z}}return Q},Q.JSONSchema=function(W,Z){let K=G.validate,z=new $(Z).compile(W);G.validate=V;function V(){if(K)K.apply(null,arguments);if(!z.apply(null,arguments)){let F=Error(`Column ${J._dbName}.${G._dbName} violates JSON Schema: ${X(z.errors)}`);throw F.errors=z.errors,F.status=400,F}}return Q},Q}function X(G){return JSON.stringify(G,null,2)}return cL0=Y,cL0}var lL0,tT1;function pq0(){if(tT1)return lL0;tT1=1;function $(){var Y={},X=[];for(var G=0;G<arguments.length;G++)X.push(arguments[G]);var J=[X];return Y.addRange=function(Q){J.push(Q)},Y.add=function(Q){Y.addRange([Q])},Y.toArray=function(){var Q=[];return Y.forEach(W),Q;function W(Z){Q.push(Z)}},Y.forEach=function(Q){var W=0;for(var Z=0;Z<J.length;Z++)J[Z].forEach(K);function K(H){Q(H,W),W++}},Object.defineProperty(Y,"length",{enumerable:!1,get:function(){var Q=0;for(var W=0;W<J.length;W++)Q+=J[W].length;return Q}}),Y}return lL0=$,lL0}var iL0,eT1;function dq0(){if(eT1)return iL0;eT1=1;function $(){var Y=[],X={};return X.rows=Y,X.expand=function(G){Y.forEach(function(J){G.expand(J)})},X.add=function(G){Y.push(G)},X}return iL0=$,iL0}var nL0,$C1;function VX8(){if($C1)return nL0;$C1=1;var $=pq0(),Y=dq0();function X(G){var J={},Q={};return Q.table=G.childTable,Q.legs=$(),Q.queryContext=Y(),J.span=Q,J.name=G.leftAlias,J.table=G.parentTable,J.columns=G.columns,J.expand=G.expand,J.accept=function(W){return W.visitJoin(J)},J}return nL0=X,nL0}var rL0,YC1;function cq0(){if(YC1)return rL0;YC1=1;function $(Y,X){var G={},J=arguments;X._primaryColumns.forEach(Q);function Q(W,Z){G[W.alias]=J[Z+2]}return X._cache.tryGet(Y,G)}return rL0=$,rL0}var aL0,XC1;function lq0(){if(XC1)return aL0;XC1=1;function $(Y,X){var G=X._primaryColumns,J=arguments[2],Q=G[0].equal(Y,J);for(var W=2;W<G.length;W++){J=arguments[W+1];var Z=G[W].equal(Y,J);Q=Q.and(Y,Z)}return Q}return aL0=$,aL0}var sL0,GC1;function Kb1(){if(GC1)return sL0;GC1=1;let $=g6();function Y(X,G,J,Q,W){let Z=$(X,"quote"),K=Z(J),H=Q.columns;var z=G._columns,V="",A="";for(let D=0;D<z.length;D++){var F=z[D];if(!H||H.get(F))V=V+A+N(F)+" as "+Z("s"+J+D),A=",";else if(!W)V=V+A+"null as "+Z("s"+J+D),A=","}for(let D in Q.aggregates||{})V=V+A+Q.aggregates[D].expression(D),A=",";return V;function N(D){let L=D.formatOut?D.formatOut(X,K):K+"."+Z(D._dbName);if(D.dbNull===null)return L;else{let B=D.encode.unsafe(X,D.dbNull);return`CASE WHEN ${L}=${B} THEN null ELSE ${L} END`}}}return sL0=Y,sL0}var oL0,JC1;function AX8(){if(JC1)return oL0;JC1=1;var $=Kb1();function Y(G,J,Q,W){var Z=J.span,K=$(G,Z.table,Q,Z,W),H=X(G,Z,Q,W);return","+K+H}function X(G,J,Q,W){var Z={},K="";Z.visitJoin=function(z){var V=Y(G,z,Q+z.name,W);K=K+V},Z.visitOne=function(z){Z.visitJoin(z)},Z.visitMany=function(){},J.legs.forEach(H);function H(z){z.accept(Z)}return K}return oL0={joinLegToColumnSql:Y,newJoinedColumnSql:X},oL0}var tL0,QC1;function FX8(){if(QC1)return tL0;QC1=1;let{newJoinedColumnSql:$}=AX8();return tL0=$,tL0}var eL0,WC1;function Ub1(){if(WC1)return eL0;WC1=1;var $=Kb1(),Y=FX8();return eL0=function(X,G,J,Q,W){var Z=$(X,G,Q,J,W),K=Y(X,J,Q,W);return Z+K},eL0}var $B0,ZC1;function ey(){if(ZC1)return $B0;ZC1=1;let $=HP(),Y=g6();function X(G,J,Q,W,Z,K,H){let z=Y(G,"quote"),V=" JOIN "+z(J._dbName)+" "+z(K)+" ON (";return $(G,J,Q,W,Z,K,H).prepend(V).append(")")}return $B0=X,$B0}var YB0,KC1;function DX8(){if(KC1)return YB0;KC1=1;var $=ey();function Y(X,G,J,Q){var W=G.columns,Z=G.span.table;return $(X,Z,W,Z._primaryColumns,J,Q,G.span.where).prepend(" LEFT")}return YB0=Y,YB0}var XB0,UC1;function NX8(){if(UC1)return XB0;UC1=1;var $=DX8();function Y(X,G,J,Q,W){return $(G,J,Q,W).append(X(G,J.span,W))}return XB0=Y,XB0}var GB0,HC1;function LX8(){if(HC1)return GB0;HC1=1;var $=ey();function Y(X,G,J,Q){var{table:W,columns:Z}=G,K=G.span.table;return $(X,K,W._primaryColumns,Z,J,Q,G.span.where).prepend(" LEFT")}return GB0=Y,GB0}var JB0,zC1;function BX8(){if(zC1)return JB0;zC1=1;var $=LX8();function Y(X,G,J,Q,W){return $(G,J,Q,W).append(X(G,J.span,W))}return JB0=Y,JB0}var QB0,VC1;function Hb1(){if(VC1)return QB0;VC1=1;let $=NX8(),Y=BX8(),X=Y9();function G(J,Q,W=""){var Z=X(""),K,H={};H.visitJoin=function(A){Z=$(G,J,A,W,K).prepend(Z)},H.visitOne=function(A){Z=Y(G,J,A,W,K).prepend(Z)},H.visitMany=function(){};function z(A){K=W+A.name,A.accept(H)}Q.legs.forEach(z);let V=new Set;for(let A in Q.aggregates){let F=Q.aggregates[A];for(let N of F.joins)if(!V.has(N))Z=Z.append(N),V.add(N)}return Z}return QB0=G,QB0}var WB0,AC1;function iq0(){if(AC1)return WB0;AC1=1;var $=At(),Y=Y9();function X(G,J,Q,W){var Z=" where",K=Y(""),H=Q.sql(),z=$(G,J,W);if(H)K=Q.prepend(Z+" "),Z=" AND";if(z)K=K.append(Z+z);return K}return WB0=X,WB0}var ZB0,FC1;function OX8(){if(FC1)return ZB0;FC1=1;function $(Y){if(!Y)return" ";if(Y.charAt(0)!==" ")return" "+Y;return Y}return ZB0=$,ZB0}var KB0,DC1;function EX8(){if(DC1)return KB0;DC1=1;var $=g6();function Y(X,G,J,Q){if(G._exclusive||Q){var W=$(X,"selectForUpdateSql");return W(X,J)}return""}return KB0=Y,KB0}var UB0,NC1;function MX8(){if(NC1)return UB0;NC1=1;var $=Ub1(),Y=Hb1(),X=iq0(),G=OX8(),J=EX8(),Q=Y9(),W=g5();function Z(K,H,z,V,A,F,N,D,L,B){var O=W(K,H._dbName),E=$(K,H,V,A),M=Y(K,V,A),R=X(K,H,z,A),q=G(D),w=J(H,A,B);return Q("select"+q+" "+E+" from "+O+" "+W(K,A)).append(F).append(M).append(R).append(N+L+w)}return UB0=Z,UB0}var HB0,LC1;function $b(){if(LC1)return HB0;LC1=1;var $=KP();function Y(X){if(X)return X;return $}return HB0=Y,HB0}var zB0,BC1;function zb1(){if(BC1)return zB0;BC1=1;let $=g6();function Y(X,G,J,Q,W){let Z=$(X,"quote");J=Z(J);var K=[],H;if(Q){if(typeof Q==="string")Q=[Q];for(H=0;H<Q.length;H++){var z=V(Q[H]);A(z.name,z.direction)}}else{if(W)return W;for(H=0;H<G._primaryColumns.length;H++)A(G._primaryColumns[H].alias)}function V(D){var L=D.split(" "),B="";if(L.length>1)B=" "+L[1];return{name:L[0],direction:B}}function A(D,L){L=L||"";var B=F(D),O=N(D,B.alias);K.push(J+"."+Z(B._dbName)+O+L)}function F(D){var L=G[D]||G[D.split(/(-|#)>+/g)[0]];if(!L)throw Error(`Unable to get column on orderBy '${D}'. If jsonb query, only #>, #>>, -> and ->> allowed. Only use ' ' to seperate between query and direction. Does currently not support casting.`);return L}function N(D,L){if(!/(-|#)>+/g.test(D))return"";return D.replace(L,"")}return" order by "+K.join(",")}return zB0=Y,zB0}var VB0,OC1;function nq0(){if(OC1)return VB0;OC1=1;var $=hG();function Y(X,G){let J=$(X).limit;if(J)return J(G);else return""}return VB0=Y,VB0}var AB0,EC1;function rq0(){if(EC1)return AB0;EC1=1;var $=hG();function Y(X,G){let{limitAndOffset:J}=$(X);if(J)return J(G);else return""}return AB0=Y,AB0}var FB0,MC1;function RX8(){if(MC1)return FB0;MC1=1;var $=MX8(),Y=$b(),X=zb1(),G=nq0(),J=rq0();function Q(W,Z,K,H,z,V,A,F,N){H=Y(H),F=X(W,K,V,z.orderBy,F);var D=G(W,z),L=J(W,z),B=$(W,K,H,z,V,A,F,D,L,N);return Z.push(B),Z}return FB0=Q,FB0}var DB0,RC1;function qX8(){if(RC1)return DB0;RC1=1;function $(Y,X){if(Y)Y.add(X)}return DB0=$,DB0}var NB0,qC1;function Vb1(){if(qC1)return NB0;qC1=1;function $(Y){return Y==="pg"||Y==="mysql"||Y==="sqlite"||Y==="mssql"||Y==="mssqlNative"||Y==="oracle"}return NB0=$,NB0}var LB0,IC1;function IX8(){if(IC1)return LB0;IC1=1;let $=g6();var Y=Y9();let X=Vb1();function G(J,Q,W,Z,K){let H=$(J,"quote"),z=$(J,"engine");var V=Y("UPDATE "+H(Q._dbName)+" SET"),A=" ";F(),N(),D(),L();function F(){for(var S in W){var T=W[S];let x=H(T._dbName),y=Z._jsonUpdateState&&Z._jsonUpdateState[S];if(y&&y.patches&&y.patches.length){let d=E(x,y.patches,T);V=V.append(A+x+"=").append(d)}else{var v=T.encode(J,Z[S]);V=V.append(A+x+"=").append(v)}A=","}}function N(){A=" WHERE ";var S=Q._primaryColumns;for(var T=0;T<S.length;T++){var v=S[T],x=Z[v.alias],y=v.encode(J,x);V=V.append(A+H(v._dbName)+"=").append(y),A=" AND "}}function D(){var S=Q._columnDiscriminators;if(S.length===0)return;S=A+S.join(" AND "),V=V.append(S)}function L(){let S=K&&K.columns;if(!S)return;for(let T in S){let v=S[T];if(!v||v.concurrency==="overwrite")continue;let x=Q[T];if(!x)continue;if(v.paths&&v.paths.length)for(let y=0;y<v.paths.length;y++){let d=v.paths[y],u=_(d.oldValue,x),b=I(d.path),g=w(H(x._dbName),b,d.oldValue);V=O(g,u)}else{let y=z==="mysql"&&x.tsType==="JSONColumn"?_(v.oldValue,x):x.encode(J,v.oldValue);V=B(x,y)}}}function B(S,T){let v=H(S._dbName);if(z==="pg")V=V.append(A+v+" IS NOT DISTINCT FROM ").append(T);else if(z==="mysql")V=V.append(A+v+" <=> ").append(T);else if(z==="sqlite")V=V.append(A+v+" IS ").append(T);else if(z==="sap"&&S.tsType==="JSONColumn")if(T.sql()==="null")V=V.append(A+v+" IS NULL");else{let x=Y("CONVERT(VARCHAR(16384), "+T.sql()+")",T.parameters);V=V.append(A+"CONVERT(VARCHAR(16384), "+v+")=").append(x)}else if(z==="oracle"&&S.tsType==="JSONColumn")if(T.sql()==="null")V=V.append(A+v+" IS NULL");else{let x=Y("JSON("+T.sql()+")",T.parameters),y=Y("JSON_EQUAL("+v+", "+x.sql()+")",x.parameters);V=V.append(A).append(y)}else if(T.sql()==="null")V=V.append(A+v+" IS NULL");else V=V.append(A+v+"=").append(T);return A=" AND ",V}function O(S,T){if(z==="pg")V=V.append(A).append(S).append(" IS NOT DISTINCT FROM ").append(T);else if(z==="mysql")V=V.append(A).append(S).append(" <=> ").append(T);else if(z==="sqlite")V=V.append(A).append(S).append(" IS ").append(T);else if(z==="oracle"){let v=S.sql().indexOf("JSON_QUERY(")===0;if(T.sql()==="null")V=V.append(A).append(S).append(" IS NULL");else if(v){let x=Y("JSON("+T.sql()+")",T.parameters),y=Y("JSON_EQUAL("+S.sql()+", "+x.sql()+")",S.parameters.concat(x.parameters));V=V.append(A).append(y)}else V=V.append(A).append(S).append("=").append(T)}else if(T.sql()==="null")V=V.append(A).append(S).append(" IS NULL");else V=V.append(A).append(S).append("=").append(T);return A=" AND ",V}function E(S,T,v){if(!X(z))return v.encode(J,Z[v.alias]);let x=Y(S);for(let y=0;y<T.length;y++){let d=T[y];x=M(x,d,v)}return x}function M(S,T,v){let x=T.path||[],y=I(x);if(T.op==="remove")return q(S,y);return R(S,y,T.value,v)}function R(S,T,v,x){if(z==="pg"){let y=P(T.tokens),d=JSON.stringify(v===void 0?null:v),u="jsonb_set("+S.sql()+", "+y+", ?::jsonb, true)";return Y(u,S.parameters.concat([d]))}if(z==="mysql"){let y=JSON.stringify(v===void 0?null:v),d="JSON_SET("+S.sql()+", "+T.sql+", CAST(? AS JSON))";return Y(d,S.parameters.concat(T.parameters,[y]))}if(z==="sqlite"){let y=JSON.stringify(v===void 0?null:v),d="json_set("+S.sql()+", "+T.sql+", json(?))";return Y(d,S.parameters.concat(T.parameters,[y]))}if(z==="mssql"||z==="mssqlNative"){let y=C(v),d="JSON_MODIFY("+S.sql()+", "+T.sql+", "+y.sql()+")";return Y(d,S.parameters.concat(T.parameters,y.parameters))}if(z==="oracle"){let y=JSON.stringify(v===void 0?null:v),d="JSON_TRANSFORM("+S.sql()+", SET "+T.sql+" = JSON(?))";return Y(d,S.parameters.concat(T.parameters,[y]))}return x.encode(J,Z[x.alias])}function q(S,T){if(z==="pg"){let v=P(T.tokens),x=S.sql()+" #- "+v;return Y(x,S.parameters)}if(z==="mysql"){let v="JSON_REMOVE("+S.sql()+", "+T.sql+")";return Y(v,S.parameters.concat(T.parameters))}if(z==="sqlite"){let v="json_remove("+S.sql()+", "+T.sql+")";return Y(v,S.parameters.concat(T.parameters))}if(z==="mssql"||z==="mssqlNative"){let v="JSON_MODIFY("+S.sql()+", "+T.sql+", NULL)";return Y(v,S.parameters.concat(T.parameters))}if(z==="oracle"){let v="JSON_TRANSFORM("+S.sql()+", REMOVE "+T.sql+")";return Y(v,S.parameters.concat(T.parameters))}return S}function w(S,T,v){if(z==="pg"){let x=S+" #> "+P(T.tokens);return Y(x)}if(z==="mysql"){let x="JSON_EXTRACT("+S+", "+T.sql+")";return Y(x,T.parameters)}if(z==="sqlite"){let x="json_extract("+S+", "+T.sql+")";return Y(x,T.parameters)}if(z==="mssql"||z==="mssqlNative"){let y=(k(v)?"JSON_QUERY":"JSON_VALUE")+"("+S+", "+T.sql+")";return Y(y,T.parameters)}if(z==="oracle"){let y=(k(v)?"JSON_QUERY":"JSON_VALUE")+"("+S+", "+T.sql+")";return Y(y,T.parameters)}return Y(S)}function I(S){let T=Array.isArray(S)?S:[];if(z==="pg")return{tokens:T,sql:P(T),parameters:[]};if(z==="oracle"){let x="$";for(let y=0;y<T.length;y++){let d=String(T[y]);if(/^\d+$/.test(d))x+="["+d+"]";else if(/^[A-Za-z_][A-Za-z0-9_]*$/.test(d))x+="."+d;else x+='["'+d.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"]'}return{tokens:T,sql:"'"+x.replace(/'/g,"''")+"'",parameters:[]}}let v="$";for(let x=0;x<T.length;x++){let y=String(T[x]);if(/^\d+$/.test(y))v+="["+y+"]";else if(/^[A-Za-z_][A-Za-z0-9_]*$/.test(y))v+="."+y;else v+='["'+y.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"]'}return{tokens:T,sql:"?",parameters:[v]}}function P(S){return"'{"+S.map((v)=>{let x=String(v);if(/^[A-Za-z0-9_]+$/.test(x))return x;return'"'+x.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"'}).join(",")+"}'"}function _(S,T){if(z==="oracle"){if(S===null||S===void 0)return Y("null");if(k(S))return T.encode(J,S);if(typeof S==="boolean"||typeof S==="number")return Y("?",[String(S)]);return Y("?",[S])}if(z==="pg"){let v=JSON.stringify(S===void 0?null:S);return Y("?::jsonb",[v])}if(z==="mysql"){let v=JSON.stringify(S===void 0?null:S);return Y("CAST(? AS JSON)",[v])}if(z==="sqlite"){if(k(S)){let v=JSON.stringify(S);return Y("?",[v])}if(S===null||S===void 0)return Y("null");return Y("?",[S])}if(z==="mssql"||z==="mssqlNative"){if(k(S))return Y("JSON_QUERY(?)",[JSON.stringify(S)]);if(S===null||S===void 0)return Y("null");return Y("?",[String(S)])}return T.encode(J,S)}function C(S){if(k(S))return Y("JSON_QUERY(?)",[JSON.stringify(S)]);if(S===null||S===void 0)return Y("null");return Y("?",[S])}function k(S){return S&&typeof S==="object"}return V}return LB0=G,LB0}var BB0,PC1;function aq0(){if(PC1)return BB0;PC1=1;function $(Y){var X,G=Q;return J;function J(){return G([...arguments])}function Q(Z){return X=Y.apply(null,Z),G=W,X}function W(){return X}}return BB0=$,BB0}var OB0,wC1;function _B(){if(wC1)return OB0;wC1=1;function $(){return{}}return OB0=$,OB0}var EB0,_C1;function Nt(){if(_C1)return EB0;_C1=1;let $=ty();function Y(X,G){var J={};$.useProxy=!1;for(let Q in G){let W=X[Q];if(X._aliases.has(Q))if(W.toDto)J[Q]=W.toDto(G[Q]);else J[Q]=G[Q]}return $.useProxy=!0,J}return EB0=Y,EB0}var MB0,jC1;function PX8(){if(jC1)return MB0;jC1=1;let $=IX8(),Y=aq0(),X=_B();var G=oy();let J=Nt();function Q(H,z,V,A){return new W(H,z,V,A)}function W(H,z,V,A){this._table=z,this._row=A,this.__getCoreCommand=Y($.bind(null,H)),this._columnList=X(),this._columnList[V.alias]=V,this.onFieldChanged=this.onFieldChanged.bind(this),A.subscribeChanged(this.onFieldChanged),this._concurrencyState=void 0,this._concurrencySummary=void 0,this._usesReturning=!1}W.prototype.onFieldChanged=function(H,z){this._columnList[z.alias]=z},W.prototype.sql=function(){return this._getCoreCommand().sql()},Object.defineProperty(W.prototype,"parameters",{get:function(){return this._getCoreCommand().parameters}}),W.prototype._getCoreCommand=function(){return this.__getCoreCommand(this._table,this._columnList,this._row,this._concurrencyState)},W.prototype.endEdit=function(){this._concurrencyState=this._row._concurrencyState,delete this._row._concurrencyState;let H=this._getCoreCommand();if(delete this._row._jsonUpdateState,this._usesReturning=Boolean(H._usesReturning),this._concurrencySummary=Z(this._concurrencyState),this._concurrencySummary.hasConcurrency)this.onResult=this._onConcurrencyResult.bind(this);this._row.unsubscribeChanged(this.onFieldChanged);let z=JSON.parse(JSON.stringify(J(this._table,this._row)));this._patch=G([JSON.parse(this._row._oldValues)],[z]),this._row._oldValues=JSON.stringify(z)},W.prototype.emitChanged=function(){return this._table._emitChanged({row:this._row,patch:this._patch})},W.prototype.matches=function(H){return this._row===H},Object.defineProperty(W.prototype,"disallowCompress",{get:function(){return this._table._emitChanged.callbacks.length>0}}),W.prototype._onConcurrencyResult=function(H){let z=K(H,this._usesReturning);if(z===void 0)return;if(z===0&&this._concurrencySummary.hasOptimistic)throw Error("The row was changed by another user.")};function Z(H){let z={hasConcurrency:!1,hasOptimistic:!1};if(!H||!H.columns)return z;for(let V in H.columns){let A=H.columns[V];if(!A)continue;let F=A.concurrency||"optimistic";if(F==="overwrite")continue;if(z.hasConcurrency=!0,F==="optimistic")z.hasOptimistic=!0}return z}function K(H,z){if(z&&Array.isArray(H))return H.length;if(Array.isArray(H)&&typeof H[0].rowsAffected==="number")return H[0].rowsAffected;if(!H||typeof H!=="object")return;if(typeof H.rowsAffected==="number")return H.rowsAffected}return MB0=Q,MB0}var RB0,TC1;function wX8(){if(TC1)return RB0;TC1=1;function $(Y){var X=Y[Y.length-1];if(X&&X.endEdit)X.endEdit()}return RB0=$,RB0}var qB0,CC1;function jB(){if(CC1)return qB0;CC1=1;var $=fq0(),Y=wX8();function X(G,J){var Q=$(G);Y(Q),Q.push(J)}return qB0=X,qB0}var IB0,SC1;function _X8(){if(SC1)return IB0;SC1=1;var $=fq0();function Y(X,G){var J=$(X),Q=J.length-1;if(Q>=0&&J[Q].matches)return J[Q].matches(G);return!1}return IB0=Y,IB0}var PB0,kC1;function jX8(){if(kC1)return PB0;kC1=1;var $=PX8(),Y=jB(),X=_X8();function G(J,Q,W,Z){if(X(J,Z))return;var K=$(J,Q,W,Z);Y(J,K)}return PB0=G,PB0}var wB0,vC1;function Lt(){if(vC1)return wB0;vC1=1;function $(){var Y=[],X=function(){var G=Y.slice(0,Y.length),J=[];for(var Q=0;Q<G.length;Q++){var W=G[Q];J.push(W.apply(null,arguments))}return J};return X.add=function(G){if(!G)throw Error("missing callback");Y.push(G)},X.tryAdd=function(G){if(G)X.add(G)},X.remove=function(G){for(var J=0;J<Y.length;J++)if(Y[J]===G){Y.splice(J,1);return}},X.tryRemove=function(G){if(G)X.remove(G)},X.clear=function(){Y.splice(0,Y.length)},X.callbacks=Y,X}return wB0=$,wB0}var _B0,xC1;function TX8(){if(xC1)return _B0;xC1=1;function $(Y,X){let G;if(arguments.length===2&&Y!==void 0)return arguments[0];else if(arguments.length===2)G=arguments[1];else G=arguments[0];let J={},Q=G._relations,W,Z={};Z.visitJoin=function(){},Z.visitMany=function(K){J[W]=$(K.childTable)},Z.visitOne=Z.visitMany;for(W in Q)Q[W].accept(Z);return J}return _B0=$,_B0}var jB0,yC1;function Ab1(){if(yC1)return jB0;yC1=1;var $=_B()();function Y(X){if(X)return X;return $}return jB0=Y,jB0}var TB0,bC1;function Fb1(){if(bC1)return TB0;bC1=1;var $=_B();function Y(X,G){var J=G._relations,Q,W={};W.visitJoin=function(){},W.visitOne=function(K){var H=$();X[Q]=H,Y(H,K.childTable)},W.visitMany=W.visitOne;for(Q in J){var Z=J[Q];Z.accept(W)}return X}return TB0=Y,TB0}var CB0,hC1;function CX8(){if(hC1)return CB0;hC1=1;function $(Y,X,G,J){if(Array.isArray(X)){Q();return}if(X)W();function Q(){X.forEach(function(Z){$(Y,Z,G,J)})}function W(){var Z=J._relations;for(var K in G){var H=Z[K],z=H.getRowsSync(X);$(Y,z,G[K],H.childTable)}J._cache.tryRemove(Y,X)}}return CB0=$,CB0}var SB0,fC1;function SX8(){if(fC1)return SB0;fC1=1;let $=Y9(),Y=UW(),X=g5();function G(J,Q,W){let Z=X(J,Q._primaryColumns[0]._dbName);W=X(J,W);let K="SELECT "+W+"."+Z+" FROM "+X(J,Q._dbName)+" "+W;return K=$(K),Y(K)}return SB0=G,SB0}var kB0,gC1;function sq0(){if(gC1)return kB0;gC1=1;function $(Y,X){if(X===0)return Y._dbName;return"x"+X}return kB0=$,kB0}var vB0,mC1;function kX8(){if(mC1)return vB0;mC1=1;let $=ey(),Y=sq0();function X(G,J){let Q=J.length,W,Z,K="";function H(z){let V=z.childTable._primaryColumns,A=z.columns;K+=" INNER"+$(G,z.childTable,A,V,W,Z).sql()}return J.forEach(function(z,V){W="x"+(Q-V),Z=Y(z.childTable,Q-V-1),H(z)}),K}return vB0=X,vB0}var xB0,uC1;function vX8(){if(uC1)return xB0;uC1=1;var $=HP();function Y(X,G,J,Q){var W,Z=G.length,K=G[0],H="x"+Z,z=K.childTable,V=K.columns,A=z._primaryColumns;F();function F(){var N=K.childTable,D=$(X,N,V,A,H,Q);if(J.sql())W=J.prepend(" AND ").prepend(D).prepend(" WHERE ");else W=D.prepend(" WHERE ")}return W}return xB0=Y,xB0}var yB0,pC1;function xX8(){if(pC1)return yB0;pC1=1;let $=SX8(),Y=kX8(),X=vX8(),G=sq0();function J(Q,W,Z){let K=W.length;if(K===0)return Z;let H=W[0].childTable,z=G(H,K-1),V=$(Q,H,z).prepend("EXISTS ("),A=Y(Q,W.slice(1)),F=X(Q,W,Z,z);return V.append(A).append(F).append(")")}return yB0=J,yB0}var bB0,dC1;function yX8(){if(dC1)return bB0;dC1=1;var $=g6(),Y=Y9();function X(G,J,Q,W,Z){var K={},H=$(G,"quote"),z=$(G,"engine"),V=F(Z),A=Q.parameters?Q.parameters.slice():[];if(V&&V.parameters.length>0)A=A.concat(V.parameters);return K.sql=function(){var B=Q.sql();if(V&&V.sql)if(B)B+=" AND "+V.sql;else B=V.sql;if(B)B=" where "+B;var O=$(G,"deleteFromSql");return O(J,W,B)},K.parameters=A,K;function F(B){let O=B&&B.columns;if(!O)return;let E=[],M=[];for(let R in O){let q=O[R];if(!q||q.concurrency==="overwrite")continue;let w=J[R];if(!w)continue;let I=z==="mysql"&&w.tsType==="JSONColumn"?D(q.oldValue,w):w.encode(G,q.oldValue),P=N(w,I);if(P.sql)E.push(P.sql());if(P.parameters.length>0)M.push(...P.parameters)}if(E.length===0)return;return{sql:E.join(" AND "),parameters:M}}function N(B,O){let E=H(B._dbName);if(z==="pg")return Y(E+" IS NOT DISTINCT FROM "+O.sql(),O.parameters);if(z==="mysql")return Y(E+" <=> "+O.sql(),O.parameters);if(z==="sqlite")return Y(E+" IS "+O.sql(),O.parameters);if(z==="sap"&&B.tsType==="JSONColumn"){if(O.sql()==="null")return Y(E+" IS NULL");let M=Y("CONVERT(VARCHAR(16384), "+O.sql()+")",O.parameters);return Y("CONVERT(VARCHAR(16384), "+E+")="+M.sql(),M.parameters)}if(z==="oracle"&&B.tsType==="JSONColumn"){if(O.sql()==="null")return Y(E+" IS NULL");let M=Y("JSON("+O.sql()+")",O.parameters);return Y("JSON_EQUAL("+E+", "+M.sql()+")",M.parameters)}if(O.sql()==="null")return Y(E+" IS NULL");return Y(E+"="+O.sql(),O.parameters)}function D(B,O){if(z==="oracle"){if(B===null||B===void 0)return Y("null");if(L(B))return O.encode(G,B);if(typeof B==="boolean"||typeof B==="number")return Y("?",[String(B)]);return Y("?",[B])}if(z==="pg"){let E=JSON.stringify(B===void 0?null:B);return Y("?::jsonb",[E])}if(z==="mysql"){let E=JSON.stringify(B===void 0?null:B);return Y("CAST(? AS JSON)",[E])}if(z==="sqlite"){if(L(B)){let E=JSON.stringify(B);return Y("?",[E])}if(B===null||B===void 0)return Y("null");return Y("?",[B])}if(z==="mssql"||z==="mssqlNative"){if(L(B))return Y("JSON_QUERY(?)",[JSON.stringify(B)]);if(B===null||B===void 0)return Y("null");return Y("?",[String(B)])}return O.encode(G,B)}function L(B){return B&&typeof B==="object"}}return bB0=X,bB0}var hB0,cC1;function bX8(){if(cC1)return hB0;cC1=1;var $=xX8(),Y=At(),X=$b(),G=yX8(),J=sq0();function Q(W,Z,K,H,z){var V=J(Z,H.length);K=X(K),K=$(W,H,K);var A=Y(W,Z,V);if(A!=="")K=K.and(W,A);return G(W,Z,K,V,z)}return hB0=Q,hB0}var fB0,lC1;function Db1(){if(lC1)return fB0;lC1=1;var $=bX8();function Y(X,G,J,Q,W,Z,K){var H=$(X,J,Q,Z,K);for(var z in W){if(!(W[z]===null||W[z]))continue;var V=W[z],A=J._relations[z],F=A.joinRelation,N=[F].concat(Z);Y(X,G,A.childTable,Q,V,N)}return G.push(H),G}return fB0=Y,fB0}var gB0,iC1;function hX8(){if(iC1)return gB0;iC1=1;var $=CX8(),Y=jB(),X=Db1(),G=lq0(),J=oy(),Q=Nt();function W(H,z,V,A){var F=[];$(H,z,V,A);var N=[H,A];A._primaryColumns.forEach(function(q){N.push(z[q.alias])});var D=G.apply(null,N),L=z._concurrencyState;delete z._concurrencyState;var B=X(H,[],A,D,V,F,L);B.forEach(function(q){Y(H,q)});var O=B[0],E=Z(L);if(E.hasConcurrency){var M=B[B.length-1];M.onResult=function(q){var w=K(q);if(w===void 0)return;if(w===0&&E.hasOptimistic)throw Error("The row was changed by another user.")}}if(A._emitChanged.callbacks.length>0){O.disallowCompress=!0;var R=Q(A,z);let q=J([R],[]);O.emitChanged=A._emitChanged.bind(null,{row:z,patch:q})}}function Z(H){let z={hasConcurrency:!1,hasOptimistic:!1};if(!H||!H.columns)return z;for(let V in H.columns){let A=H.columns[V];if(!A)continue;let F=A.concurrency||"optimistic";if(F==="overwrite")continue;if(z.hasConcurrency=!0,F==="optimistic")z.hasOptimistic=!0}return z}function K(H){if(Array.isArray(H)&&typeof H[0].rowsAffected==="number")return H[0].rowsAffected;if(!H||typeof H!=="object")return;if(typeof H.rowsAffected==="number")return H.rowsAffected}return gB0=W,gB0}var mB0,nC1;function fX8(){if(nC1)return mB0;nC1=1;let $=ty(),Y=UP();function X(Q,W,Z,K,H){let z;$.useProxy=!1;let V=Y(Q),A=V&&V.ignoreSerializable;if(H)z=J(Z,K,H,W,A);else z=G(Z,K,W,A);return $.useProxy=!0,z}async function G(Q,W,Z,K){let H={};if(!W)return;for(let z in Z){if(!Z[z])continue;let V=Q[z];if(Q._aliases.has(z)&&(K||!(("serializable"in V)&&!V.serializable)&&W.propertyIsEnumerable(z)))if(V.toDto)H[z]=V.toDto(W[z]);else H[z]=W[z];else if(Q._relations[z]&&Z[z]){let A,F=Q._relations[z];if(Z&&!(Z[z]||Z[z]===null))continue;else if(!W.isExpanded(z))A=await W[z];else A=F.getRowsSync(W);if(!A)H[z]=A;else if(Array.isArray(A)){H[z]=[];for(let N=0;N<A.length;N++)H[z].push(await G(F.childTable,A[N],Z&&Z[z],K))}else H[z]=await G(F.childTable,A,Z&&Z[z],K)}}return H}function J(Q,W,Z,K,H){let z={};if(!W)return;for(let V in W){let A=Q[V];if(Q._aliases.has(V)&&(H||!(("serializable"in A)&&!A.serializable)))if(A.toDto)z[V]=A.toDto(W[V]);else z[V]=W[V];else if(Q._relations[V]){let F=Q._relations[V],N=F.joinRelation||F;if(!W.isExpanded(V)||Z.has(N)||K&&!(K[V]||K[V]===null))continue;let D=F.getRowsSync(W);if(!D)z[V]=D;else if(Array.isArray(D)){z[V]=[];for(let L=0;L<D.length;L++)z[V].push(J(F.childTable,D[L],new Set([...Z,N]),K&&K[V],H))}else z[V]=J(F.childTable,D,new Set([...Z,N]),K&&K[V],H)}}return z}return mB0=X,mB0}var uB0,rC1;function Nb1(){if(rC1)return uB0;rC1=1;function $(X,G,J=new Map){G={...G};for(let W in G)if(G[W]===null)G[W]=!0;let Q;for(let W in G)if(X._relations[W]&&!G[W])continue;else if(X._relations[W])G[W]=Y(X._relations[W],G[W],J);else if(X[W]&&X[W].eq){if(!J.has(X[W]))J.set(X[W],G[W]);Q=Q||G[W]}for(let W=0;W<X._columns.length;W++){let Z=X._columns[W];G[Z.alias]=!Q}return X._primaryColumns.forEach((W)=>{G[W.alias]=!0}),J.forEach((W,Z)=>G[Z.alias]=W),G}function Y(X,G,J){let Q=new Map;if(!X.joinRelation)for(let Z=0;Z<X.columns.length;Z++)J.set(X.columns[Z],!0);else X.joinRelation.columns.forEach((Z)=>{Q.set(Z,!0)});let W=X.childTable;return $(W,G,Q)}return uB0=$,uB0}var pB0,aC1;function gX8(){if(aC1)return pB0;aC1=1;let $=jX8(),Y=Lt(),X=TX8(),G=Ab1(),J=Fb1(),Q=hX8(),W=_B(),Z=fX8(),K=Nt(),H=Gb1,z=ty(),V=UP(),A=Nb1();function F(N,D,L,B,O){let E=L||N._aliases,M=N._columns,R=M.length;if(D.offset===void 0)D.offset=0;let q=D.offset,w=Object.keys(D);for(let v=0;v<R;v++)I(v);D.offset+=R;function I(v){let x=M[v],y=x.purify,d=x.alias,u="__"+d;v=q+v;let b=w[v];Object.defineProperty(T.prototype,u,{get:function(){return this._dbRow[b]},set:function(g){let p=this[d];if(g=y(g),this._dbRow[b]=g,x.validate)x.validate(g,this._dbRow);$(this._context,N,x,this);let h=this._emitColumnChanged[d];if(h)h(this,x,g,p);this._emitChanged(this,x,g,p)}}),Object.defineProperty(T.prototype,d,{enumerable:!0,configurable:!1,get:function(){if(x.onChange&&z.useProxy&&(this[u]!==null&&this[u]!==void 0)&&typeof this[u]==="object"){if(!(d in this._proxies)){let g=this[u];this._proxies[d]=x.onChange(this._dbRow[b],()=>{if(this[u]!==H.target(g))return;this[u]=this._dbRow[b]})}return this._proxies[d]}return S(this[u])},set:function(g){if(x.onChange&&(this[u]!==null&&this[u]!==void 0)&&g&&typeof g==="object"){if(this[u]===H.target(g))return;this._proxies[d]=x.onChange(g,()=>{if(this[u]!==H.target(g))return;this[u]=this._dbRow[b]})}this[u]=g}})}P();function P(){let v=N._relations;for(let x in v)_(x)}function _(v){Object.defineProperty(T.prototype,v,{get:function(){return C(this,v)()}})}function C(v,x){let y=v._related[x];if(!y){let d=N._relations[x];y=d.toGetRelated(v._context,v),v._relationCacheMap.set(d,d.getInnerCache(v._context)),v._related[x]=y}return y}T.prototype.subscribeChanged=function(v,x){let y;if(x){y=this._emitColumnChanged[x]||(this._emitColumnChanged[x]=Y()),y.add(v);return}this._emitChanged.add(v)},T.prototype.unsubscribeChanged=function(v,x){if(x){this._emitColumnChanged[x].tryRemove(v);return}this._emitChanged.tryRemove(v)},T.prototype.toJSON=function(){return Z(void 0,N,this,new Set)},T.prototype.hydrate=function(v,x){let y=V(v)?.engine,d=q;if(y==="sqlite")for(let b in x){if(typeof x[b]==="string"&&x[b].indexOf("12345678-1234-1234-1234-123456789012")===0)throw Error(x[b].split("12345678-1234-1234-1234-123456789012")[1]);let g=w[d];this._dbRow[g]=M[d].decode(v,x[b]),d++}else for(let u in x){let b=w[d];this._dbRow[b]=M[d].decode(v,x[u]),d++}},T.prototype.toDto=function(v){if(v===void 0)v=X(N);if(v=A(N,v),!V(this._context))return Z(this._context,v,N,this,new Set);let x=Z(this._context,v,N,this);return Promise.resolve().then(()=>x)},T.prototype.expand=function(v){let x=C(this,v);x.expanded=!0},T.prototype.isExpanded=function(v){return this._related[v]&&this._related[v].expanded},T.prototype.delete=function(v){v=G(v),Q(this._context,this,v,N)},T.prototype.cascadeDelete=function(){let v=J(W(),N);Q(this._context,this,v,N)},T.prototype.deleteCascade=T.prototype.cascadeDelete;function k(v,x){for(let u=0;u<R;u++){let b=q+u,g=w[b];if(x[g]!==void 0&&!O)x[g]=M[u].decode(v,x[g]);if(B&&M[u].validate)M[u].validate(x[g],x,O)}let y=new T(v,x);return new Proxy(y,{ownKeys:function(){return Array.from(E).concat(Object.keys(y._related).filter((u)=>{return y._related[u]&&y._related[u].expanded}))},getOwnPropertyDescriptor(u,b){if(N._aliases.has(b)||u._related[b])return{enumerable:E.has(b)||u._related[b]&&u._related[b].expanded,configurable:!0,writable:!0}}})}function S(v){if(v===void 0)return null;return v}function T(v,x){this._context=v,this._relationCacheMap=new Map,this._cache=N._cache.getInnerCache(v),this._dbRow=x,this._related={},this._emitColumnChanged={},this._emitChanged=Y(),this._proxies={},this._oldValues=JSON.stringify(K(N,this))}return k}return pB0=F,pB0}var dB0,sC1;function Lb1(){if(sC1)return dB0;sC1=1;var $=gX8();function Y(X,G,J,Q,W,Z){var K=G._decodeDbRowCache;if(!K)K={},Object.defineProperty(G,"_decodeDbRowCache",{enumerable:!1,get:function(){return K}});var H=(W?"v":"nv")+(Z?":i":":u"),z=K[H];if(!z){let V=new Set;if(G.columns)G.columns.forEach((A,F)=>{if(A)V.add(F.alias)});if(V.size===0)V=void 0;z=$(J,Q,V,W,Z),K[H]=z}return z(X,Q)}return dB0=Y,dB0}var cB0,oC1;function mX8(){if(oC1)return cB0;oC1=1;var $=qX8(),Y=Lb1();function X(G,J,Q){var W=J.table,Z=Y(G,J,W,Q),K=W._cache;if(!K.tryGet(G,Z)){var H=J.queryContext;$(H,Z),Object.defineProperty(Z,"queryContext",{writable:!0,configurable:!0,enumerable:!1}),Z.queryContext=H}Z=K.tryAdd(G,Z);var z={};z.visitOne=function(A){X(G,A.span,Q),A.expand(Z)},z.visitJoin=function(A){X(G,A.span,Q),A.expand(Z)},z.visitMany=function(){},J.legs.forEach(V);function V(A){A.accept(z)}return Z}return cB0=X,cB0}var lB0,tC1;function Yb(){if(tC1)return lB0;tC1=1;function $(Y){return Promise.resolve(Y)}return lB0=$,lB0}var iB0,eC1;function uX8(){if(eC1)return iB0;eC1=1;function $(X,G){if(X&&X.orderBy){var J=Y(X.orderBy);return G.sort(J)}return G}function Y(X){var G=[];if(typeof X==="string")X=[X];X.forEach(function(Q){var W=Q.split(" "),Z=W[0],K=W[1]||"asc";if(K==="asc")G.push(H);else G.push(z);function H(V,A){if(V=V[Z],A=A[Z],V===A)return 0;if(V<A)return-1;return 1}function z(V,A){return H(A,V)}});function J(Q,W){for(var Z=0;Z<G.length;Z++){var K=G[Z](Q,W);if(K!==0)return K}return 0}return J}return iB0=$,iB0}var nB0,$S1;function pX8(){if($S1)return nB0;$S1=1;function $(Y){if(Y===0)return;if(Y%1000===0)return Promise.resolve();return}return nB0=$,nB0}var rB0,YS1;function Bb1(){if(YS1)return rB0;YS1=1;var $=Yb(),Y=uX8(),X=pX8();function G(){var Q=[];Object.defineProperty(Q,"toDto",{enumerable:!1,writable:!0,value:W}),Object.defineProperty(Q,"__toDto",{enumerable:!1,writable:!0,value:J});async function W(){let Z=[];for(let K=0;K<Q.length;K++)Z.push(await Q[K].toDto.apply(Q[K],arguments));return Z}return Q}function J(Q){var W=arguments,Z=[],K=this.length,H=this,z=-1;return $().then(V);function V(){if(z++,z===K)return Y(Q,Z);var A=H[z];return F().then(N).then(V);function F(){return A.__toDto.apply(A,W)}function N(D){return Z.push(D),X(z)}}}return rB0=G,rB0}var aB0,XS1;function dX8(){if(XS1)return aB0;XS1=1;var $=mX8(),Y=Bb1();function X(G,J,Q){var W=Y();for(var Z=0;Z<Q.length;Z++){var K=$(G,J,Q[Z]);W.push(K)}return W}return aB0=X,aB0}var sB0,GS1;function cX8(){if(GS1)return sB0;GS1=1;var $=dX8();async function Y(J,Q,W){let Z=await W[0].then(K);return await X(G(Q),Z),Z;function K(H){return $(J,Q,H)}}async function X(J,Q){if(!Q)return;if(!Array.isArray(Q))Q=[Q];for(let W in J){if(!(J[W]===null||J[W]))continue;for(let Z=0;Z<Q.length;Z++)await X(J[W],await Q[Z][W])}}function G(J){let Q={};return J.legs.forEach((W)=>{Q[W.name]=G(W.span)}),Q}return sB0=Y,sB0}var oB0,JS1;function oq0(){if(JS1)return oB0;JS1=1;var $=pq0(),Y=dq0(),X=Nb1();function G(J,Q){var W={};return W.aggregates={},W.legs=$(),W.table=J,Q=X(J,Q),Z(J,W,Q),W.queryContext=Y(),W.queryContext.strategy=Q,W;function Z(H,z,V){let A=new Map;var F=z.legs;if(!V)return;for(var N in V){if(H._relations[N]&&!V[N])continue;if(H._relations[N])K(F,H,V,N);else if(V[N]?.expression&&(V[N]?.joins||V[N]?.join||V[N]?.column))z.aggregates[N]=V[N];else if(H[N]&&H[N].eq)A.set(H[N],V[N]);else z[N]=V[N]}z.columns=A}function K(H,z,V,A){var F=z._relations[A],N=F.toLeg();N.span.queryContext.strategy=V,N.span.where=V[A].where,N.span.aggregates={},H.add(N);var D=V[A],L=F.childTable;Z(L,N.span,D)}}return oB0=G,oB0}var tB0,QS1;function Ob1(){if(QS1)return tB0;QS1=1;let $=RX8(),Y=WK(),X=cX8(),G=oq0(),J=Y9()(),Q=bZ();function W(K,H,z,V){return Z(K,H,z,V)}async function Z(K,H,z,V,A){let F=H._dbName,N;z=Q(K,z,H);let D=G(H,V),L=$(K,[],H,z,D,F,J,N,A),B=await Y(K,L);return X(K,D,B)}return W.exclusive=function(K,H,z){return Z(K,H,z,!0)},tB0=W,tB0}var eB0,WS1;function Eb1(){if(WS1)return eB0;WS1=1;var $=Ob1();function Y(J,Q,W,Z){return Z=G(Z),$(J,Q,W,Z).then(X)}function X(J){if(J.length>0)return J[0];return null}Y.exclusive=function(J,Q,W,Z){return Z=G(Z),$.exclusive(J,Q,W,Z).then(X)};function G(J){return{...J,...{limit:1}}}return eB0=Y,eB0}var $O0,ZS1;function Mb1(){if(ZS1)return $O0;ZS1=1;function $(Y,X){var G=X._primaryColumns.length+3;if(arguments.length===G)return arguments[G-1];return}return $O0=$,$O0}var YO0,KS1;function Rb1(){if(KS1)return YO0;KS1=1;var $=lq0(),Y=Eb1(),X=Mb1();function G(J){var Q=$.apply(null,arguments),W=arguments[1],Z=X.apply(null,arguments);return Y(J,W,Q,Z)}return G.exclusive=function(Q){var W=$.apply(null,arguments),Z=arguments[1],K=X.apply(null,arguments);return Y.exclusive(Q,Z,W,K)},YO0=G,YO0}var XO0,US1;function lX8(){if(US1)return XO0;US1=1;let $=Rb1();function Y(G,J,...Q){return $.apply(null,arguments).then((W)=>X(J,W,Q))}Y.exclusive=function(G,...J){return $.exclusive.apply(null,arguments).then((Q)=>X(G,Q,J))};function X(G,J,Q){if(J===null)throw Error(`${G._dbName}: Row with id ${Q} not found.`);return J}return XO0=Y,XO0}var GO0,HS1;function qb1(){if(HS1)return GO0;HS1=1;let $=cq0(),Y=lX8(),X=Yb(),G=Mb1();async function J(){let W=G.apply(null,arguments),Z=$.apply(null,arguments);if(Z)return await Q(Z,W),X(Z);return Y.apply(null,arguments)}J.exclusive=Y.exclusive;async function Q(W,Z){if(!W)return;if(!Array.isArray(W))W=[W];for(let K in Z){if(!(Z[K]===null||Z[K]))continue;for(let H=0;H<W.length;H++)await Q(await W[H][K],Z[K])}}return GO0=J,GO0}var JO0,zS1;function iX8(){if(zS1)return JO0;return zS1=1,JO0=ry1()(null),JO0}var QO0,VS1;function tq0(){if(VS1)return QO0;VS1=1;function $(Y,X,G){function J(){if(J.expanded)return G.getFromCache(X);if(X.queryContext)return G.getRelatives(Y,X).then(W);return G.getFromDb(Y,X).then(Q);function Q(Z){return J.expanded=!0,Z}function W(){return G.getFromCache(X)}}return J}return QO0=$,QO0}var WO0,AS1;function Ib1(){if(AS1)return WO0;AS1=1;function $(Y,X,G){var J=X.joinRelation;if(!J||!J.leftAlias)return;var Q=G.find(function(W){return W.queryContext});if(Q)Q.queryContext.expand(J)}return WO0=$,WO0}var ZO0,FS1;function nX8(){if(FS1)return ZO0;FS1=1;var $=lq0(),Y=KP(),X=Ib1();function G(W,Z,K){var H=Z.queryContext;let z=H&&H.strategy[K.leftAlias];var V=Y;if(K.columns.length===1)A();else F();function A(){var D=[],L,B,O=K.columns[0].alias;for(var E=0;E<H.rows.length;E++)if(L=H.rows[E],B=L[O],!Q(B))D.push(B);if(D.length>0)V=K.childTable._primaryColumns[0].in(W,D)}function F(){var D;for(var L=0;L<H.rows.length;L++)if(D=J(W,H.rows[L],K),D)V=V.or(W,D)}return K.childTable.getMany(V,z).then(N);function N(D){return H.expand(K),X(Z,K,D),D}}function J(W,Z,K){var H=K.columns.map(function(V){return Z[V.alias]});if(H.some(Q))return;var z=[W,K.childTable].concat(H);return $.apply(null,z)}function Q(W){return W===null||W===void 0}return ZO0=G,ZO0}var KO0,DS1;function eq0(){if(DS1)return KO0;DS1=1;function $(Y){if(Y!==void 0&&Y!==null)Object.defineProperty(Y,"then",{value:X,writable:!0,enumerable:!1,configurable:!0});return Y;function X(G){delete Y.then,G(Y)}}return KO0=$,KO0}var UO0,NS1;function rX8(){if(NS1)return UO0;NS1=1;var $=VX8(),Y=qb1(),X=iX8(),G=tq0(),J=nX8(),Q=eq0();function W(Z,K,H){var z={};z.parentTable=Z,z.childTable=K,z.columns=[];var V=Z._columns;return A(),z.accept=function(L){L.visitJoin(z)},z.toLeg=function(){return $(z)},z.getFromDb=function(L){var B=D(L);if(B.length===0)return X;var O=[K].concat(B);return Y.apply(null,O)},z.getFromCache=function(L){var B=z.getRowsSync(L);return Q(B)},z.toGetRelated=function(L){return G(L,z)},z.getRelatives=function(L){return J(L,z)},z.expand=function(L){L.expand(z.leftAlias)},z.getRowsSync=function(L){var B=N(L);return L._relationCacheMap.get(z).tryGet(B)},z.getInnerCache=function(){return K._cache.getInnerCache()},z.notNullExceptInsert=function(){return z},z.notNull=function(){return z},z;function A(){var L=H.length;for(var B=0;B<V.length;B++){var O=V[B];if(F(O),L===z.columns.length)return}}function F(L){for(var B=0;B<H.length;B++){var O=H[B];if(L._dbName===O){L.default=void 0,z.columns.push(L);return}}}function N(L){let B={};for(let O=0;O<z.columns.length;O++){let E=L[z.columns[O].alias];if(E===null||E===void 0)return{};B[K._primaryColumns[O].alias]=E}return B}function D(L){let B=[];for(let O=0;O<z.columns.length;O++){let E=L[z.columns[O].alias];if(E===null||E===void 0)return[];B.push(E)}return B}}return UO0=W,UO0}var HO0,LS1;function aX8(){if(LS1)return HO0;LS1=1;var $=Y9(),Y=UW();let X=g6();function G(J,Q,W){let Z=X(J,"quote"),K=Z(W),H=Z(Q._primaryColumns[0]._dbName),z="SELECT "+K+"."+H+" FROM "+Z(Q._dbName)+" "+K,V=$(z);return Y(V)}return HO0=G,HO0}var zO0,BS1;function $I0(){if(BS1)return zO0;BS1=1;var $=ey(),Y=Y9();function X(G,J,Q=0){var W,Z,K,H={},z=Y("");H.visitJoin=function(A){z=$(G,A.parentTable,A.childTable._primaryColumns,A.columns,W,Z).prepend(" INNER").prepend(z)},H.visitOne=function(A){V(A)},H.visitMany=H.visitOne;function V(A){var F=A.joinRelation,N=F.childTable,D=N._primaryColumns,L=F.columns;z=$(G,N,L,D,W,Z).prepend(" INNER").prepend(z)}for(let A=J.length-1;A>Q;A--)W="x"+(A+1),Z="x"+A,K=J[A],K.accept(H);return z}return zO0=X,zO0}var VO0,OS1;function sX8(){if(OS1)return VO0;OS1=1;var $=HP();function Y(X,G,J,Q=0){let W=G[Q];var Z={},K;Z.visitJoin=function(z){var V=z.childTable,A=Q===0?z.parentTable._rootAlias||z.parentTable._dbName:"x"+Q,F=z.columns,N=V._primaryColumns;H(A,F,N)},Z.visitOne=function(z){var V=z.joinRelation,A=V.columns,F=V.childTable,N=F._primaryColumns,D=Q===0?F._rootAlias||F._dbName:"x"+Q;H(D,N,A)},Z.visitMany=Z.visitOne;function H(z,V,A){var F=W.childTable,N=$(X,F,V,A,z,"x"+(Q+1));if(J&&J.sql())K=N.prepend(" WHERE ").append(" AND ").append(J);else K=N.prepend(" WHERE ")}return W.accept(Z),K}return VO0=Y,VO0}var AO0,ES1;function Xb(){if(ES1)return AO0;ES1=1;var $=aX8(),Y=$I0(),X=sX8();function G(J,Q,W,Z){var K=Q.length,H="x"+K,z=Q[K-1].childTable,V=$(J,z,H).prepend("EXISTS ("),A=Y(J,Q,Z),F=X(J,Q,W,Z);return V.append(A).append(F).append(")")}return AO0=G,AO0}var FO0,MS1;function oX8(){if(MS1)return FO0;MS1=1;var $=$I0(),Y=hG(),X=HP();let G=g6();function J(W,Z,K,H,z=!0){let V=G(W,"quote"),A=Y(W),F="y"+A.aggregateCount++,N=V(F),D=V("x"+H.length),L=q(H[0]),B=` LEFT JOIN (SELECT ${L},${Z}(${D}.${V(K._dbName)}) as amount`,O=H.length>1?$(W,H).sql():"",E=Q(W,H[0],F),M=` FROM ${V(H.at(-1).childTable._dbName)} ${D} ${O} GROUP BY ${L}) ${N} ON (${E})`,R=B+M;return{expression:(w)=>z?`COALESCE(${N}.amount, 0) as ${V(w)}`:`${N}.amount as ${w}`,joins:[R]};function q(w){let I,P=V("x1");if(w.joinRelation)I=w.joinRelation.columns;else I=w.childTable._primaryColumns;return I.map((_)=>`${P}.${V(_._dbName)}`).join(",")}}function Q(W,Z,K){var H={},z="";let V=Z.parentTable._rootAlias||Z.parentTable._dbName;H.visitJoin=function(F){z=X(W,F.childTable,F.columns,F.childTable._primaryColumns,V,K).sql()},H.visitOne=function(F){A(F)},H.visitMany=H.visitOne;function A(F){var{joinRelation:N,childTable:D,parentTable:L}=F,B=N.columns;z=X(W,D,L._primaryColumns,B,V,K).sql()}return Z.accept(H),z}return FO0=J,FO0}var DO0,RS1;function tX8(){if(RS1)return DO0;RS1=1;let $=ey();function Y(X,G){let J=[],Q=G[0].parentTable._dbName,W="z",Z,K={};K.visitJoin=function(H){Z=$(X,H.childTable,H.columns,H.childTable._primaryColumns,Q,W).prepend(" LEFT").sql()},K.visitOne=function(H){Z=$(X,H.childTable,H.parentTable._primaryColumns,H.joinRelation.columns,Q,W).prepend(" LEFT").sql()},K.visitMany=K.visitOne;for(let H=0;H<G.length;H++)W=W+G[H].toLeg().name,G[H].accept(K),J.push(Z),Q=W;return J}return DO0=Y,DO0}var NO0,qS1;function eX8(){if(qS1)return NO0;qS1=1;let $=g6();var Y=tX8();function X(G,J,Q,W,Z=!0){let K=$(G,"quote"),H=W.reduce((V,A)=>{return V+A.toLeg().name},"z");H=K(H);let z=K(Q._dbName);return{expression:(V)=>Z?`COALESCE(${J}(${H}.${z}), 0) as ${K(V)}`:`${J}(${H}.${z}) as ${K(V)}`,joins:Y(G,W)}}return NO0=X,NO0}var LO0,IS1;function $G8(){if(IS1)return LO0;IS1=1;var $=$I0(),Y=hG(),X=HP();let G=g6(),J=g5();function Q(K,H,z){let V=G(K,"quote"),A=Y(K),F="y"+A.aggregateCount++,N=V(F),D="x"+z.length,B=` LEFT JOIN (SELECT ${Z(K,z[0])},${D}.${V(H._dbName)} as prop`,O=z.length>1?$(K,z).sql():"",E=W(K,z[0],F),M=` FROM ${V(z.at(-1).childTable._dbName)} ${D} ${O}) ${N} ON (${E})`,R=B+M;return{expression:(q)=>`${N}.prop ${V(q)}`,joins:[R],column:H,groupBy:`${N}.prop`}}function W(K,H,z){var V={},A="";let F=H.parentTable._rootAlias||H.parentTable._dbName;V.visitJoin=function(D){A=X(K,D.childTable,D.columns,D.childTable._primaryColumns,F,z).sql()},V.visitOne=function(D){N(D)},V.visitMany=V.visitOne;function N(D){var{joinRelation:L,childTable:B,parentTable:O}=D,E=L.columns;A=X(K,B,O._primaryColumns,E,F,z).sql()}return H.accept(V),A}function Z(K,H){let z,V="x1";if(H.joinRelation)z=H.joinRelation.columns;else z=H.childTable._primaryColumns;return z.map((A)=>`${V}.${J(K,A._dbName)}`).join(",")}return LO0=Q,LO0}var BO0,PS1;function YG8(){if(PS1)return BO0;PS1=1;var $=Xb(),Y=oX8(),X=eX8(),G=$G8();function J(Q,W,Z,K){var H={},z="x"+W.length;for(var V in Q){var A=Q[V];if(A instanceof Function)H[V]=F(A)}return H.groupSum=(N,...D)=>Y.apply(null,[N,"sum",Q,W,...D]),H.groupAvg=(N,...D)=>Y.apply(null,[N,"avg",Q,W,...D]),H.groupMin=(N,...D)=>Y.apply(null,[N,"min",Q,W,!1,...D]),H.groupMax=(N,...D)=>Y.apply(null,[N,"max",Q,W,!1,...D]),H.groupCount=(N,...D)=>Y.apply(null,[N,"count",Q,W,!1,...D]),H.sum=(N,...D)=>X.apply(null,[N,"sum",Q,W,...D]),H.avg=(N,...D)=>X.apply(null,[N,"avg",Q,W,...D]),H.min=(N,...D)=>X.apply(null,[N,"min",Q,W,!1,...D]),H.max=(N,...D)=>X.apply(null,[N,"max",Q,W,!1,...D]),H.count=(N,...D)=>X.apply(null,[N,"count",Q,W,!1,...D]),H.self=(N,...D)=>G.apply(null,[N,Q,W,...D]),H;function F(N){return D;function D(L){var B=[];for(var O=0;O<arguments.length;O++)B.push(arguments[O]);B.push(z);var E=N.apply(null,B);if(Z)return E;return $(L,W,E,K)}}}return BO0=J,BO0}var OO0,wS1;function XG8(){if(wS1)return OO0;wS1=1;let $=bZ(),Y=Xb(),X=!0;function G(J,Q,W){function Z(K,H){let z=J(Q,X,W+1),V=typeof H==="function"?H(z):H,A=$(K,V);return Y(K,Q,A,W)}return Z}return OO0=G,OO0}var EO0,_S1;function GG8(){if(_S1)return EO0;_S1=1;let $=bZ(),Y=Xb(),X=!0;function G(J,Q,W){function Z(K,H){let z=J(Q,X,W+1),V=typeof H==="function"?H(z):H,A=$(K,V),F=Y(K,Q,A,W),N=Y(K,Q,A.not(),W).not();return F.and(K,N)}return Z}return EO0=G,EO0}var MO0,jS1;function JG8(){if(jS1)return MO0;jS1=1;let $=bZ();function Y(X,G){function J(W,Z){let{relations:H,alias:z}=Q(!1,X),V=H[H.length-1].childTable;if(!H[0].isMany)V._rootAlias=z;try{let A=typeof Z==="function"?Z(V):Z,F=$(W,A);return delete V._rootAlias,F}catch(A){throw delete V._rootAlias,A}}return J;function Q(W,Z){let K=Z[0].toLeg().table._dbName,H=[];for(let z=0;z<Z.length;z++)if(Z[z].isMany&&!W)H=[Z[z]],K=Z[z].toLeg().table._dbName;else H.push(Z[z]),K+=Z[z].toLeg().name;return{relations:H,alias:K}}}return MO0=Y,MO0}var RO0,TS1;function QG8(){if(TS1)return RO0;TS1=1;function $(Y){function X(J,Q){let{relations:Z,alias:K}=G(!1,Y),H=Z[Z.length-1].childTable;if(!Z[0].isMany)H._rootAlias=K;try{let z=Q(H);return delete H._rootAlias,z}catch(z){throw delete H._rootAlias,z}}return X;function G(J,Q){let W=Q[0].toLeg().table._dbName,Z=[];for(let K=0;K<Q.length;K++)if(Q[K].isMany&&!J)Z=[Q[K]],W=Q[K].toLeg().table._dbName;else Z.push(Q[K]),W+=Q[K].toLeg().name;return{relations:Z,alias:W}}}return RO0=$,RO0}var qO0,CS1;function WG8(){if(CS1)return qO0;CS1=1;let $=bZ(),Y=Xb(),X=!0;function G(J,Q,W){function Z(K,H){let z=J(Q,X,W+1),V=typeof H==="function"?H(z):H,A=$(K,V);return Y(K,Q,A,W).not()}return Z}return qO0=G,qO0}var IO0,SS1;function YI0(){if(SS1)return IO0;SS1=1;var $=YG8(),Y=Xb(),X=XG8(),G=GG8(),J=JG8(),Q=QG8(),W=WG8();function Z(K,H,z=0){var V=K[K.length-1].childTable,A=V._columns;let F;F=X(Z,K,z),F.all=G(Z,K,z),F.any=F,F.none=W(Z,K,z),F.where=J(K,z),F._aggregate=Q(K),Object.defineProperty(F,"_relation",{value:K[K.length-1],writable:!1});for(var N=0;N<A.length;N++){var D=A[N];if(D.alias==="name")F._name=$(D,K,H,z);else F[D.alias]=$(D,K,H,z)}L();function L(){var E=V._relations;for(var M in E)B(M)}function B(E){var M=V._relations[E],R=K.slice(0);R.push(M),Object.defineProperty(F,E,{get:function(){return Z(R,!1,z)}})}return F.exists=function(E){if(H)return"";return Y(E,K,!1,z)},new Proxy(F,{get:function(E,M){if(M==="name")return E._name!==void 0?E._name:E.name;return E[M]},set:function(E,M,R){if(M==="name")E._name=R;else E[M]=R;return!0}})}return IO0=Z,IO0}var PO0,kS1;function ZG8(){if(kS1)return PO0;kS1=1;var $=rX8(),Y=YI0();function X(G,J){var Q={},W=[],Z;Q.by=function(){for(var H=0;H<arguments.length;H++)W.push(K(arguments[H]));return Z=$(G,J,W),Z.as=Q.as,Z};function K(H){var z=G._columns;for(var V=0;V<z.length;V++)if(z[V]._dbName===H||z[V].alias===H)return z[V]._dbName;throw Error("Unknown column: "+H)}return Q.as=function(H){return Z.leftAlias=H,G._relations[H]=Z,Object.defineProperty(G,H,{get:function(){return Y([Z])}}),Z},Q.notNullExceptInsert=function(){return Q},Q.notNull=function(){return Q},Q}return PO0=X,PO0}var wO0,vS1;function Pb1(){if(vS1)return wO0;vS1=1;var $=pq0(),Y=dq0();function X(G){var J=G.joinRelation,Q={};Q.name=J.rightAlias;var W={};return W.queryContext=Y(),W.table=J.parentTable,W.legs=$(),Q.span=W,Q.table=J.childTable,Q.columns=J.columns,Q.expand=G.expand,Q.accept=function(Z){Z.visitOne(Q)},Q}return wO0=X,wO0}var _O0,xS1;function KG8(){if(xS1)return _O0;xS1=1;var $=Pb1();function Y(X){var G=$(X);return G.name=X.joinRelation.rightAlias,G.accept=function(J){return J.visitMany(G)},G.expand=X.expand,G}return _O0=Y,_O0}var jO0,yS1;function Bt(){if(yS1)return jO0;yS1=1;function $(Y,X){var G=Y.childTable,J=G._primaryColumns,Q={};Y.columns.forEach(W);function W(Z,K){var H=J[K];Q[H.alias]=X[Z.alias]}return Q}return jO0=$,jO0}var TO0,bS1;function UG8(){if(bS1)return TO0;bS1=1;var $=Bt();function Y(X,G,J,Q,W){var Z=J.columns;Z.forEach(K),W=null;function K(V){W.subscribeChanged(z,V.alias)}function H(V){Z.forEach(A);function A(F){V.unsubscribeChanged(z,F.alias)}}function z(V){H(V),G.tryRemove(X,Q,V);var A=$(J,V);G.tryAdd(X,A,V)}}return TO0=Y,TO0}var CO0,hS1;function HG8(){if(hS1)return CO0;hS1=1;var $=Bt();function Y(X,G,J){var Q=J.parentTable._cache;Q.subscribeAdded(X,W);function W(Z){var K=$(J,Z);G(K,Z)}}return CO0=Y,CO0}var SO0,fS1;function zG8(){if(fS1)return SO0;fS1=1;var $=Bt();function Y(X,G,J){var Q=J.parentTable._cache;Q.subscribeRemoved(X,W);function W(Z){var K=$(J,Z);G(K,Z)}}return SO0=Y,SO0}var kO0,gS1;function wb1(){if(gS1)return kO0;gS1=1;var $=Lt();function Y(){var X=$(),G=$(),J={},Q={},W;return J.tryGet=function(Z){var K=0,H=Z.length;return z(Q,K);function z(V,A){var F=Z[A],N=V[F];if(typeof N>"u")return null;if(H-1===A)return N;return z(V[F],++A)}},J.tryAdd=function(Z,K){var H=0;return W=Z.length,z(Q,H);function z(V,A){var F=Z[A];if(W-1===A){if(F in V)return V[F];return V[F]=K,X(K),K}if(!(F in V))V[F]={};return z(V[F],++A)}},J.tryRemove=function(Z){var K=0,H=Z.length;return z(Q,K);function z(V,A){var F=Z[A];if(!(F in V))return null;var N=V[F];if(H-1===A)return delete V[F],G(N),N;return z(V[F],++A)}},J.getAll=function(){var Z=0,K=[];H(Q,Z);function H(z,V){for(var A in z){var F=z[A];if(V===W-1)K.push(F);else H(F,V+1)}}return K},J.subscribeAdded=X.add,J.subscribeRemoved=G.add,J}return kO0=Y,kO0}var vO0,mS1;function VG8(){if(mS1)return vO0;mS1=1;var $=wb1(),Y=Bb1();function X(G){var J={},Q=$(),W=G.childTable._primaryColumns;J.tryGet=function(z){var V=H(z),A=Q.tryGet(V);if(!A)return K();return A};function Z(z,V){var A=H(z),F=Q.tryGet(A);if(F){F.push(V);return}var N=K();N.push(V),F=Q.tryAdd(A,N)}function K(){return Y(G.parentTable)}J.tryAdd=Z,J.tryRemove=function(z,V){var A=H(z),F=Q.tryGet(A),N=F.indexOf(V);F.splice(N,1)};function H(z){return W.map(V);function V(A){return z[A.alias]}}return J}return vO0=X,vO0}var xO0,uS1;function HW(){if(uS1)return xO0;uS1=1;let{v4:$}=hq0;return xO0=$,xO0}var yO0,pS1;function _b1(){if(pS1)return yO0;pS1=1;let $=g6();function Y(X,G){return $(X,"cache")[G]}return yO0=Y,yO0}var bO0,dS1;function jb1(){if(dS1)return bO0;dS1=1;let $=g6();function Y(X,G,J){let Q=$(X,"cache");Q[G]=J}return bO0=Y,bO0}var hO0,cS1;function Tb1(){if(cS1)return hO0;cS1=1;var $=UG8(),Y=HG8(),X=zG8(),G=Bt(),J=VG8(),Q=HW(),W=_b1(),Z=jb1();function K(H){var z={},V;z.tryAdd=function(N,D,L){z.getInnerCache(N).tryAdd(D,L),$(N,z,H,D,L)},z.tryRemove=function(N,D,L){z.getInnerCache(N).tryRemove(D,L)},z.tryGet=function(N,D){return z.getInnerCache(N).tryGet(D)},z.getInnerCache=function(N){let D=F();var L=W(N,D);if(!L)L=J(H),Z(N,D,L),A(N),Y(N,z.tryAdd.bind(null,N),H),X(N,z.tryRemove.bind(null,N),H);return L};function A(N){var D=H.parentTable,L=D._cache,B=L.getAll(N);B.forEach(O);function O(E){var M=G(H,E);z.tryAdd(N,M,E)}}function F(){if(V)return V;return V=Q(),V}return z}return hO0=K,hO0}var fO0,lS1;function XI0(){if(lS1)return fO0;lS1=1;function $(Y,X,G){var{columns:J,childTable:Q}=X,W=K(0);for(var Z=1;Z<J.length;Z++)W=W.and(K(Z));function K(H){var z=J[H],V=Q._primaryColumns[H];return z.eq(Y,G[V.alias])}return W}return fO0=$,fO0}var gO0,iS1;function Cb1(){if(iS1)return gO0;iS1=1;let $=KP(),Y=XI0(),X=Ib1();function G(J,Q,W){let Z=Q.queryContext,K=Z&&Z.strategy[W.joinRelation.rightAlias],H,z=W.joinRelation.childTable;if(z._primaryColumns.length===1)H=V();else H=A();function V(){let N=z._primaryColumns[0].alias,D=Z.rows.map(function(B){return B[N]});return W.joinRelation.columns[0].in(J,D)}function A(){let N=Z.rows.map(function(D){return Y(J,W.joinRelation,D)});return $.or.apply($,[J,...N])}return W.childTable.getMany(J,H,K).then(F);function F(N){return Z.expand(W),X(Q,W,N),N}}return gO0=G,gO0}var mO0,nS1;function AG8(){if(nS1)return mO0;nS1=1;var $=KG8(),Y=Tb1(),X=XI0(),G=Cb1(),J=eq0(),Q=tq0();function W(Z){var K={},H=Y(Z);return K.joinRelation=Z,K.childTable=Z.parentTable,K.parentTable=Z.childTable,K.isMany=!0,K.accept=function(z){z.visitMany(K)},K.getFromCache=function(z){var V=K.getRowsSync(z);return J(V)},K.getFromDb=function(z,V){var A=X(z,Z,V);return K.childTable.getMany(z,A,null)},K.getRelatives=function(z,V){return G(z,V,K)},K.toGetRelated=function(z,V){return Q(z,V,K)},K.expand=function(z){return z.expand(Z.rightAlias)},K.getRowsSync=function(z){let V=z._relationCacheMap.get(K);if(!V)return[];return V.tryGet(z)},K.toLeg=function(){return $(K)},K.getInnerCache=function(z){return H.getInnerCache(z)},K}return mO0=W,mO0}var uO0,rS1;function FG8(){if(rS1)return uO0;rS1=1;var $=AG8(),Y=YI0();function X(G){var J={},Q=G.childTable;return J.as=function(W){G.rightAlias=W;var Z=$(G);return Q._relations[W]=Z,Object.defineProperty(Q,W,{get:function(){return Y([Z])}}),Z},J.notNullExceptInsert=function(){return J},J.notNull=function(){return J},J}return uO0=X,uO0}var pO0,aS1;function DG8(){if(aS1)return pO0;aS1=1;let $=Tb1();function Y(X){let G={},J=$(X);return G.tryGet=function(Q,W){let Z=J.tryGet(Q,W);if(Z.length===0)return null;return Z[0]},G.getInnerCache=function(Q){let W=J.getInnerCache(Q),Z={};return Z.tryGet=function(K,H){let z=W.tryGet(K,H);if(z.length===0)return null;return z[0]},Z},G}return pO0=Y,pO0}var dO0,sS1;function NG8(){if(sS1)return dO0;sS1=1;var $=Pb1(),Y=DG8(),X=XI0(),G=Cb1(),J=eq0(),Q=tq0();function W(Z){var K={},H=Y(Z);return K.joinRelation=Z,K.childTable=Z.parentTable,K.parentTable=Z.childTable,K.isOne=!0,K.accept=function(z){z.visitOne(K)},K.getFromCache=function(z){let V=K.getRowsSync(z);return J(V)},K.getFromDb=function(z,V){var A=X(z,Z,V);return K.childTable.tryGetFirst(z,A,null)},K.getRelatives=function(z,V){return G(z,V,K)},K.toGetRelated=function(z,V){return Q(z,V,K)},K.expand=function(z){return z.expand(Z.rightAlias)},K.getRowsSync=function(z){let V=z._relationCacheMap.get(K);if(!V)return null;return V.tryGet(z)},K.toLeg=function(){return $(K)},K.getInnerCache=function(z){return H.getInnerCache(z)},K}return dO0=W,dO0}var cO0,oS1;function LG8(){if(oS1)return cO0;oS1=1;var $=NG8(),Y=YI0();function X(G){var J={},Q=G.childTable;return J.as=function(W){G.rightAlias=W;var Z=$(G);return Q._relations[W]=Z,Object.defineProperty(Q,W,{get:function(){return Y([Z])}}),Z},J.notNullExceptInsert=function(){return J},J.notNull=function(){return J},J}return cO0=X,cO0}var lO0,tS1;function BG8(){if(tS1)return lO0;tS1=1;let $=WK(),Y=bZ(),X=$b(),G=iq0(),J=g5();async function Q(Z,K,H){let z=K._dbName;H=Y(Z,H,K);let V=W(Z,K,H,z);return await(await $(Z,[V]))[0].then((N)=>{return Number.parseInt(N[0]._count)})}function W(Z,K,H,z){H=X(H);var V=J(Z,K._dbName);z=J(Z,z);var A=G(Z,K,H,z);return A.prepend('select count(*) "_count" from '+V+" "+z)}return lO0=Q,lO0}var iO0,eS1;function Sb1(){if(eS1)return iO0;eS1=1;var $=Ub1(),Y=iq0(),X=Hb1(),G=Y9(),J=g6();function Q(W,Z,K,H,z,V,A,F){var N=J(W,"quote"),D=N(Z._dbName),L=$(W,Z,H,z,!0),B=X(W,H,z),O=Y(W,Z,K,z);if(A)A=A+" ";return G("select "+A+L+" from "+D+" "+N(z)).append(B).append(O).append(V+F)}return iO0=Q,iO0}var nO0,$k1;function OG8(){if($k1)return nO0;$k1=1;var $=Sb1(),Y=$b(),X=zb1(),G=nq0(),J=Y9(),Q=rq0();function W(Z,K,H,z,V){H=Y(H);var A=X(Z,K,V,z.orderBy),F=G(Z,z),N=Q(Z,z),D=$(Z,K,H,z,V,A,F,N);return J(D.sql(),D.parameters)}return nO0=W,nO0}var rO0,Yk1;function EG8(){if(Yk1)return rO0;Yk1=1;let $=KP(),Y=OG8(),X=bZ(),G=oq0(),J=WK(),Q=g6();async function W(L,B,O,E,M,R){if(O=X(L,O,B),E&&E.where){let _=typeof E.where==="function"?E.where(L,B):E.where;O=O.and(L,_)}let q=M||G(B,E),w=B._dbName,I=Y(L,B,O,q,w),P=await J(L,[I]);return z(L,E,q,await P[0],void 0,R)}function Z(L){let B=L.columns,O=L.table._columns.filter((I)=>!B||B.get(I)),E=K(O,L),M=[],R={};return R.visitJoin=()=>{},R.visitOne=()=>{},R.visitMany=function(I){M.push(I.name)},L.legs.forEach(q),w;function q(I){I.accept(R)}function w(){let I=Object.create(E);for(let P=0;P<M.length;P++)I[M[P]]=[];return I}}function K(L,B){let O={};for(let R=0;R<L.length;R++)O[L[R].alias]=null;for(let R in B.aggregates)O[R]=null;let E={};E.visitJoin=function(R){O[R.name]=null},E.visitOne=E.visitJoin,E.visitMany=function(R){O[R.name]=null},B.legs.forEach(M);function M(R){R.accept(E)}return O}function H(L){let B,O={};return O.visitJoin=()=>{},O.visitOne=O.visitJoin,O.visitMany=function(){B=!0},L.legs.forEach(E),B;function E(M){M.accept(O)}}async function z(L,B,O,E,M=E.length>0?Object.keys(E[0]):[],R){let{table:q,columns:w}=O,I=q._columns.filter((p)=>!w||w.get(p)),P=E.length,_=I.length,k=q._primaryColumns.length,S=new Map,T=Array(E.length),v=g(),x=Object.keys(O.aggregates),y=Array(P),d=Z(O),u=H(O);for(let p=0;p<P;p++){let h=E[p],n=d(),t=0;for(let s=0;s<_;s++){if(s<k){if(h[M[s]]===null)t++;if(t===k){n=null;break}}let Z0=I[s];n[Z0.alias]=Z0.decode(L,h[M[s]])}for(let s=0;s<x.length;s++){let Z0=x[s],X0=O.aggregates[Z0].column?.decode||((a,Q0)=>Number.parseFloat(Q0));n[Z0]=X0(L,h[M[s+_]])}if(y[p]=n,R)R(n,p);if(u)T[p]=v(n),N(S,T[p],n)}if(O._rowsMap=S,O._ids=T,M.splice(0,_+x.length),O.legs.toArray().length===0)return y;let b=[];if(u)b.push(V(L,B,O)),b.push(A(L,B,O,E,y,M));else b.push(A(L,B,O,E,y,M));return await Promise.all(b),y;function g(){let p=q._primaryColumns,h=p.length;if(h===1){let n=q._primaryColumns[0].alias;return(t)=>t[n]}else return(n)=>{let t=Array(h);for(let s=0;s<h;s++)t[s]=n[p[s].alias];return t}}}async function V(L,B,O){let E=Q(L,"maxParameters"),M=E?E*O.table._primaryColumns.length:void 0,R=[],q={};q.visitJoin=()=>{},q.visitOne=q.visitJoin;function w(C,k){let S=[];for(let T=0;T<C.length;T+=k)S.push(C.slice(T,T+k));return S}q.visitMany=function(C){let k=C.name,S=O.table,T=S._relations[k],v=O._rowsMap,x=I(C),y=P(v,S._primaryColumns);if(O._ids.length===0)return;if(M){let u=w(O._ids,M);for(let b of u){let g=F(L,T,b),p=W(L,T.childTable,g,B[k],C.span,d);R.push(p)}}else{let u=F(L,T,O._ids),b=W(L,T.childTable,u,B[k],C.span,d);R.push(b)}function d(u){let b=x(u);(y(b)||[]).forEach((p)=>{p[k].push(u)})}};function I(C){if(C.columns.length===1){let k=C.columns[0].alias;return(S)=>S[k]}else{let k=C.columns.map((S)=>S.alias);return(S)=>k.map((T)=>S[T])}}function P(C,k){if(k.length===1)return(S)=>C.get(S);else return D.bind(null,C,k)}O.legs.forEach(_);function _(C){C.accept(q)}await Promise.all(R)}async function A(L,B,O,E,M,R){let q={};q.visitJoin=function(I){let P=I.name;return z(L,B[P],I.span,E,R,_);function _(C,k){if(M[k])M[k][P]=C}},q.visitOne=q.visitJoin,q.visitMany=()=>{};async function w(I){for(let P of I.toArray())await P.accept(q)}await w(O.legs)}function F(L,B,O){let E=B.joinRelation.columns;if(E.length===1)return E[0].in(L,O);else return M();function M(){let R=$;for(let q of O){let w;for(let I=0;I<E.length;I++)if(w)w=w.and(L,E[I].eq(L,q[I]));else w=E[I].eq(L,q[I]);R=R.or(L,w)}return R}}function N(L,B,O){if(Array.isArray(B)){let E=L,M=B.length-1;for(let q=0;q<M;q++){let w=B[q];if(!E.has(w))E.set(w,new Map);E=E.get(w)}let R=B[M];if(!E.has(R))E.set(R,[O]);else E.get(R).push(O)}else if(!L.has(B))L.set(B,[O]);else L.get(B).push(O)}function D(L,B,O){if(Array.isArray(O)){let E=B.length;for(let M=0;M<E;M++)L=L.get(O[M]);return L}else return L.get(O)}return rO0=W,rO0}var aO0,Xk1;function MG8(){if(Xk1)return aO0;Xk1=1;let $=g6(),Y=EG8();function X(G,J,Q,W){return($(G,"getManyDto")||Y).apply(null,arguments)}return aO0=X,aO0}var sO0,Gk1;function RG8(){if(Gk1)return sO0;Gk1=1;var $=cq0(),Y=Rb1(),X=Yb();function G(){var J=$.apply(null,arguments);if(J)return X(J);return Y.apply(null,arguments)}return G.exclusive=Y.exclusive,sO0=G,sO0}var oO0,Jk1;function qG8(){if(Jk1)return oO0;Jk1=1;let $=wb1(),Y=_b1(),X=jb1();function G(W){let Z=Symbol(),K={};return K.tryGet=function(H,z){return J(H,W,Z).tryGet(z)},K.tryAdd=function(H,z){return J(H,W,Z).tryAdd(z)},K.tryRemove=function(H,z){return J(H,W,Z).tryRemove(z)},K.subscribeAdded=function(H,...z){return J(H,W,Z).subscribeAdded.apply(null,z)},K.subscribeRemoved=function(H,...z){return J(H,W,Z).subscribeRemoved.apply(null,z)},K.getAll=function(H){return J(H,W,Z).getAll.apply(null,arguments)},K.getInnerCache=function(H){return J(H,W,Z)},K}function J(W,Z,K){let H=Y(W,K);if(H)return H;return H=Q(Z),X(W,K,H),H}function Q(W){let Z={},K=$(),H,z=A;function V(){let N={},D=W._primaryColumns,L=D.length;for(let B=0;B<L;B++){let O=D[B];N[O.alias]=null}return N}Z.tryGet=function(N){let D=z(N);return K.tryGet(D)};function A(N){return H=V(),z=F,W=null,z(N)}function F(N){let D=[];for(let L in H)D.push(N[L]);return D}return Z.tryAdd=function(N){let D=z(N);return K.tryAdd(D,N)},Z.tryRemove=function(N){let D=z(N);return K.tryRemove(D)},Z.subscribeAdded=K.subscribeAdded,Z.subscribeRemoved=K.subscribeRemoved,Z.getAll=K.getAll,Z}return oO0=G,oO0}var tO0,Qk1;function kb1(){if(Qk1)return tO0;Qk1=1;var $=Lb1(),Y=ty();function X(J,{table:Q,_options:W,shouldValidate:Z=!0}){var K={};Q._columns.forEach(H);function H(N){var D=N.alias;if("default"in N)if(typeof N.default==="function")K[D]=N.default();else if(N.toDto)K[D]=N.toDto(N.default);else K[D]=N.default;else if(Y.useLazyDefaults&&"lazyDefault"in N&&!N.isPrimary)if(typeof N.lazyDefault==="function")K[D]=N.lazyDefault();else if(N.toDto)K[D]=N.toDto(N.lazyDefault);else K[D]=N.lazyDefault;else if(N.dbNull!==null)K[D]=null;else K[D]=void 0}let z=arguments[2];if(G(z)){for(let N in z)if(Q[N]&&Q[N].equal)K[N]=z[N]}else for(var V=2;V<arguments.length;V++){var A=arguments[V],F=Q._primaryColumns[V-1];K[F.alias]=A}return $(J,Q,Q,K,Z,!0)}function G(J){return J===Object(J)&&!Array.isArray(J)&&!(J instanceof Date)}return tO0=X,tO0}var eO0,Wk1;function IG8(){if(Wk1)return eO0;Wk1=1;let $=hG(),Y=kb1();function X(Q,{table:W,options:Z},K){if(Array.isArray(K)){let D=[];for(let L=0;L<K.length;L++)D.push(X(Q,W,K[L]));return Promise.all(D)}let H=Y.apply(null,[...arguments]);if(J(W,H))H=W._cache.tryAdd(Q,H);G(W,H),Object.defineProperty(H,"then",{value:F,writable:!0,enumerable:!1,configurable:!0});let A=$(Q).insert(Q,W,H,Z).then(N);async function F(D,L){return delete H.then,A.then(()=>D(H),L)}return H;function N([D]){return H.hydrate(Q,D),H=W._cache.tryAdd(Q,H),H}}function G(Q,W){let Z,K={};K.visitJoin=function(){},K.visitMany=function(){W.expand(Z)},K.visitOne=function(){W.expand(Z)};for(Z in Q._relations)Q._relations[Z].accept(K)}function J(Q,W){for(let Z=0;Z<Q._primaryColumns.length;Z++){let K=Q._primaryColumns[Z];if(W[K.alias]===null)return!1}return!0}return eO0=X,eO0}var $E0,Zk1;function vb1(){if(Zk1)return $E0;Zk1=1;var $=jB(),Y=Db1(),X=Ab1(),G=bZ(),J=Yb()();function Q(W,Z,K,H){K=G(W,K,Z),H=X(H);var z=[],V=[];return V=Y(W,V,Z,K,H,z),V.forEach(function(A){$(W,A)}),J}return $E0=Q,$E0}var YE0,Kk1;function PG8(){if(Kk1)return YE0;Kk1=1;var $=vb1(),Y=_B(),X=Fb1();function G(J,Q,W){var Z=Y(),K=X(Z,Q);return $(J,Q,W,K)}return YE0=G,YE0}var XE0,Uk1;function xb1(){if(Uk1)return XE0;Uk1=1;function $(Y){if(Y===null||Y===void 0)return Y;if(Y.__patchType==="Array"){let X=[],G=0;for(let J in Y)if(J!=="__patchType")X[G]=$(Y[J]),G++;return X}else if(Y===Object(Y)){let X={};for(let G in Y)if(G!=="__patchType")X[G]=$(Y[G]);return X}return Y}return XE0=$,XE0}var GE0,Hk1;function wG8(){if(Hk1)return GE0;Hk1=1;let $=ZP(),Y=typeof window>"u";function X(J){if(Array.isArray(J)){let W={};Object.defineProperty(W,"__patchType",{value:"Array",writable:!0,enumerable:!0});for(var Q=0;Q<J.length;Q++){let Z=X(J[Q]);if(Z===Object(Z)&&"id"in Z)W[Z.id]=Z;else W[Q]=Z}return W}if(Y&&G(J))return J.toString("base64");else if(J instanceof Date&&!isNaN(J))return $(J);else if(J===Object(J)){let W={};for(let Z in J)W[Z]=X(J[Z]);return W}return J}function G(J){return Buffer.isBuffer(J)}return GE0=X,GE0}var JE0,zk1;function _G8(){if(zk1)return JE0;zk1=1;let $=ly1,Y=xb1(),X=wG8(),G=g6();function J({options:W={},context:Z},K,H,z){let V=X(K);if(H=F(V,H),z.tsType==="JSONColumn"){let L=Z?G(Z,"engine"):void 0;if(z&&L==="sap")H=D(V,H),$.applyPatch(V,H,!0,!0)}else $.applyPatch(V,H,!0,!0);let A=Y(V);if(Array.isArray(K))K.length=0;else for(let L in K)delete K[L];for(let L in A)K[L]=A[L];return K;function F(L,B){return B.filter((O)=>{if(N(O.path).readonly){let R=Error(`Cannot update column ${O.path.replace("/","")} because it is readonly`);throw R.status=405,R}return!0})}function N(L){let B=L.split("/");return B.shift(),B.reduce(O,W);function O(E,M){if(Array.isArray(E))return E[0]||W;if(E===Object(E))return E[M]||W;return E}}function D(L,B){return B.filter((E)=>{let M=E.oldValue,R=N(E.path);if(R.readonly){let I=Error(`Cannot update column ${E.path.replace("/","")} because it is readonly`);throw I.status=405,I}let w=R.concurrency||"optimistic";if(w==="optimistic"||w==="skipOnConflict"){let I=O(L,E.path);try{Q(I,M)}catch(P){if(w==="skipOnConflict")return!1;throw Error("The row was changed by another user.")}}return!0});function O(E,M){let R=M.split("/");return R.shift(),R.reduce(q,E);function q(w,I){if(w===Object(w))return w[I];return}}}}function Q(W,Z){if(JSON.stringify(W)!==JSON.stringify(Z))throw Error("A, b are not equal")}return JE0=J,JE0}var QE0,Vk1;function jG8(){if(Vk1)return QE0;Vk1=1;async function $({row:Q,options:W,table:Z}){if(W.readonly){let K=Error(`Cannot delete ${Z._dbName} because it is readonly`);throw K.status=405,K}if(!J(W))return;for(let K in W)if(Y(K,Z)){let H=Z[K]._relation.childTable,z=G(W,K);if(!J(z))continue;let V=await Q[K];for(let A=0;A<V.length;A++){let F=V[A];await $({row:F,options:z,table:H})}}else if(X(K,Z)){let H=G(W,K);if(!J(H))continue;let z=Z[K]._relation.childTable,V=await Q[K];await $({row:V,options:H,table:z})}}function Y(Q,W){return W[Q]&&W[Q]._relation&&W[Q]._relation.isMany}function X(Q,W){return W[Q]&&W[Q]._relation&&W[Q]._relation.isOne}function G(Q,W){let Z={};if("readonly"in Q)Z.readonly=Q.readonly;if("concurrency"in Q)Z.concurrency=Q.concurrency;return{...Z,...Q[W]||{}}}function J(Q){if(!Q||Q!==Object(Q))return!1;if(Q.readonly===!0)return!0;for(let W in Q){let Z=Q[W];if(!Z||Z!==Object(Z))continue;if(J(Z))return!0}return!1}return QE0=$,QE0}var WE0,Ak1;function TG8(){if(Ak1)return WE0;Ak1=1;var $=nX();function Y(X){$(X,"cache",{})}return WE0=Y,WE0}var ZE0,Fk1;function CG8(){if(Fk1)return ZE0;Fk1=1;let $=_G8(),Y=xb1(),X=jG8(),G=TG8(),J=g6();async function Q(){let Z=await W.apply(null,arguments);return G(arguments[0]),Z}async function W(Z,K,H,{strategy:z=void 0,deduceStrategy:V=!1,...A}={},F){let N=J(Z,"engine");A=d(A),z=JSON.parse(JSON.stringify(z||{}));let D=new Set;for(let u=0;u<H.length;u++){let b={path:void 0,value:void 0,op:void 0};Object.assign(b,H[u]),b.path=H[u].path.split("/").slice(1);let g;if(b.op==="add"||b.op==="replace")g=await O({path:b.path,value:b.value,op:b.op,oldValue:b.oldValue,strategy:V?z:{},options:A},K);else if(b.op==="remove")g=await w({path:b.path,op:b.op,oldValue:b.oldValue,options:A},K);if(g.inserted)D.add(g.inserted);else if(g.updated)D.add(g.updated)}if(z.insertAndForget)return{changed:[],strategy:z};return{changed:await L(D),strategy:z};async function L(u){return u=[...u],await K.getManyDto(Z,u,z)}function B(u){if(typeof u==="string"&&u.charAt(0)==="[")return JSON.parse(u);else return[u]}async function O({path:u,value:b,op:g,oldValue:p,strategy:h,options:n},t,s,Z0,X0){let a=u[0];if(u=u.slice(1),!s&&u.length>0)s=await _({table:t,strategy:h,property:a});if(u.length===0&&b===null)return w({path:u,op:g,oldValue:p,options:n},t,s);if(u.length===0){if(F)return{};let Q0=[];for(let m in b)if(I(m,t))b[m]=Y(b[m]);else if(v(m,t))h[m]=h[m]||{},b[m]&&R(m,b,t,b);else if(S(m,t))b[m]&&Q0.push(E.bind(null,m,b,g,p,t,h,n));else if(T(m,t)&&b)b[m]&&Q0.push(M.bind(null,m,b,g,p,t,h,n));for(let m=0;m<t._primaryColumns.length;m++){let $0=t._primaryColumns[m].alias,Y0=b[$0];if(Y0&&typeof Y0==="string"&&Y0.indexOf("~")===0)b[$0]=void 0}if(X0&&X0.joinRelation)for(let m=0;m<X0.joinRelation.columns.length;m++){let Y0=X0.joinRelation.columns[m].alias,K0=X0.joinRelation.childTable._primaryColumns[m].alias;if(!b[Y0])b[Y0]=Z0[K0]}let e=t.insertWithConcurrency.apply(null,[Z,n,b]);e=await e;for(let m=0;m<Q0.length;m++)await Q0[m](e);return{inserted:e}}if(a=u[0],I(a,t)){if(F)return{updated:s};let Q0=t[a],e=s[a],m={};m[a]=e;let $0=Y(p),Y0=Y(b),K0=$({options:n,context:Z},m,[{path:"/"+u.join("/"),op:g,value:b,oldValue:p}],t[a]),A0=Q0.tsType==="JSONColumn"?{path:u,op:g,value:Y0,oldValue:$0,fullOldValue:e}:void 0;return await t.updateWithConcurrency(Z,n,s,a,K0[a],$0,A0),{updated:s}}else if(T(a,t)){let Q0=t[a]._relation,e=await s[a];return h[a]=h[a]||{},n[a]=y(n,a),await O({path:u,value:b,op:g,oldValue:p,strategy:h[a],options:n[a]},Q0.childTable,e,s,Q0),{updated:s}}else if(S(a,t)){let Q0=t[a]._relation;if(h[a]=h[a]||{},n[a]=y(n,a),u.length===1)for(let e in b){if(e==="__patchType")continue;await O({path:[e],value:b[e],op:g,oldValue:p,strategy:h[a],options:n[a]},Q0.childTable,void 0,s,Q0)}else await O({path:u.slice(1),value:b,oldValue:p,op:g,strategy:h[a],options:n[a]},Q0.childTable,void 0,s,Q0);return{updated:s}}else if(v(a,t)&&u.length===1){let Q0=q(a,{[a]:b},t);p=q(a,{[a]:p},t);let e;for(let m in Q0)e=await O({path:["dummy",m],value:Q0[m],oldValue:(p||{})[m],op:g,strategy:h,options:n},t,s,Z0,X0)||e;return e||{}}else if(v(a,t)&&u.length===2){let Q0=q(a,{[a]:{[u[1]]:b}},t);p=q(a,{[a]:{[u[1]]:p}},t);let e;for(let m in Q0)e=await O({path:["dummy",m],value:Q0[m],oldValue:(p||{})[m],op:g,strategy:h,options:n},t,s,Z0,X0)||e;return e||{}}return{}}async function E(u,b,g,p,h,n,t,s){let Z0=h[u]._relation;for(let X0 in b[u])if(X0!="__patchType"){let a=b[u][X0];n[u]=n[u]||{},t[u]=y(t,u),await O({path:[X0],value:a,op:g,oldValue:p,strategy:n[u],options:t[u]},Z0.childTable,{},s,Z0)}}async function M(u,b,g,p,h,n,t,s){let Z0=h[u]._relation,X0=b[u];n[u]=n[u]||{},t[u]=y(t,u),await O({path:[u],value:X0,op:g,oldValue:p,strategy:n[u],options:t[u]},Z0.childTable,{},s,Z0)}function R(u,b,g,p){let h=g[u]._relation;for(let n=0;n<h.columns.length;n++){let t=h.columns[n].alias,s=h.childTable._primaryColumns[n].alias;if(s in b[u])p[t]=Y(b[u][s])}}function q(u,b,g){let p=g[u]._relation,h={};for(let n=0;n<p.columns.length;n++){let t=p.columns[n].alias,s=p.childTable._primaryColumns[n].alias;if(b&&b[u]&&s in b[u])h[t]=Y(b[u][s]);else h[t]=null}return h}async function w({path:u,op:b,oldValue:g,options:p},h,n){let t=u[0];if(u=u.slice(1),!n)n=await _({table:h,strategy:{},property:t});if(u.length===0)await X({row:n,options:p,table:h}),x(n,g,p,h),await n.deleteCascade();if(t=u[0],I(t,h)){let s=h[t],Z0=n[t],X0={};X0[t]=Z0;let a=Y(g),Q0=$({options:p,context:Z},X0,[{path:"/"+u.join("/"),op:b,oldValue:g}],h[t]);if(s.tsType==="JSONColumn"){let e={path:u,op:b,value:void 0,oldValue:a,fullOldValue:Z0};await h.updateWithConcurrency(Z,p,n,t,Q0[t],a,e)}else n[t]=Q0[t];return{updated:n}}else if(v(t,h)&&u.length===1){g=q(t,{[t]:g},h);let s=h[t]._relation,Z0;for(let X0=0;X0<s.columns.length;X0++){let a=s.columns[X0].alias;n[a],Z0=await w({path:["dummy",a],oldValue:(g||{})[a],op:b,options:p},h,n)||Z0}return Z0||{}}else if(v(t,h)&&u.length===2){let s=h[t]._relation;g=q(t,{[t]:{[u[1]]:g}},h);let Z0;for(let X0=0;X0<s.columns.length;X0++){let a=s.columns[X0].alias,Q0=s.childTable._primaryColumns[X0].alias;if(u[1]===Q0){n[a],Z0=await w({path:["dummy",a],oldValue:(g||{})[a],op:b,options:p},h,n)||Z0;break}}return Z0||{}}else if(T(t,h)){let s=await n[t];if(!s)throw Error(t+" does not exist");return p[t]=y(p,t),await w({path:u,op:b,oldValue:g,options:p[t]},h[t],s),{updated:n}}else if(S(t,h)){let s=h[t]._relation;if(p[t]=y(p,t),u.length===1){let Z0=(await n[t]).slice(0);for(let X0=0;X0<Z0.length;X0++){let a=Z0[X0];await w({path:u.slice(1),op:b,oldValue:g,options:p[t]},h[t],a)}}else await w({path:u.slice(1),op:b,oldValue:g,options:p[t]},s.childTable);return{updated:n}}return{}}function I(u,b){return b[u]&&b[u].equal}function P(u){return N==="sap"&&u._columns.some((b)=>b.tsType==="JSONColumn")}function _({table:u,strategy:b,property:g}){let p=B(g);if(P(u))return C({context:Z,table:u,strategy:b,key:p});return k({context:Z,table:u,key:p})}async function C({context:u,table:b,strategy:g,key:p}){let h=await b.tryGetById.apply(null,[u,...p,g]);if(!h)throw Error(`Row ${b._dbName} with id ${p} was not found.`);return h}function k({context:u,table:b,key:g}){let h=(_.tryGetFromCacheById||(_.tryGetFromCacheById=cq0()))(u,b,...g);if(h)return h;let n=_.cachedNewRow||(_.cachedNewRow=kb1()),t={};for(let Z0=0;Z0<g.length&&Z0<b._primaryColumns.length;Z0++)t[b._primaryColumns[Z0].alias]=g[Z0];let s=n(u,{table:b,shouldValidate:!1},t);return b._cache.tryAdd(u,s)}function S(u,b){return b[u]&&b[u]._relation.isMany}function T(u,b){return b[u]&&b[u]._relation.isOne}function v(u,b){return b[u]&&b[u]._relation.columns}function x(u,b,g,p){let h={columns:{}};if(b&&b===Object(b))for(let n in b){if(!I(n,p))continue;let s=y(g,n).concurrency||"optimistic";if(s==="overwrite")continue;h.columns[n]={oldValue:Y(b[n]),concurrency:s}}if(Object.keys(h.columns).length===0){let n=g.concurrency||"optimistic";if(n!=="overwrite")for(let t=0;t<p._primaryColumns.length;t++){let s=p._primaryColumns[t].alias;h.columns[s]={oldValue:u[s],concurrency:n}}}if(Object.keys(h.columns).length>0)u._concurrencyState=h}function y(u,b){let g={};if("readonly"in u)g.readonly=u.readonly;if("concurrency"in u)g.concurrency=u.concurrency;return{...g,...u[b]||{}}}function d(u){let{table:b,transaction:g,db:p,client:h,...n}=u;return n}}return ZE0=Q,ZE0}var KE0,Dk1;function SG8(){if(Dk1)return KE0;Dk1=1;let $=bZ();function Y(X){function G(J,Q){let W=typeof Q==="function"?Q(X):Q;return $(J,W)}return G}return KE0=Y,KE0}var UE0,Nk1;function kG8(){if(Nk1)return UE0;Nk1=1;function $(Y){function X(G,J){return J(Y)}return X}return UE0=$,UE0}var HE0,Lk1;function vG8(){if(Lk1)return HE0;Lk1=1;var $=Sb1(),Y=$b(),X=nq0(),G=Y9(),J=rq0();function Q(Z,K,H,z,V){H=Y(H);var A="",F=X(Z,z),N=J(Z,z),D=$(Z,K,H,z,V,A,F,N);let L=W(z);return G(D.sql(),D.parameters).append(L)}function W(Z){let K=Object.keys(Z.aggregates).filter((H)=>Z.aggregates[H].column);if(K.length===0)return"";return" GROUP BY "+K.map((H)=>Z.aggregates[H].groupBy).join(",")}return HE0=Q,HE0}var zE0,Bk1;function xG8(){if(Bk1)return zE0;Bk1=1;let $=vG8(),Y=bZ(),X=oq0(),G=WK();async function J(K,H,z,V){if(z=Y(K,z,H),V&&V.where){let L=typeof V.where==="function"?V.where(H):V.where;z=z.and(K,L)}let A=X(H,V);A.columns=new Map;let F=H._dbName,N=$(K,H,z,A,F),D=await G(K,[N]);return Z(K,A,await D[0])}function Q(K){let H=W(K);return z;function z(){return Object.create(H)}}function W(K){let H={};for(let z in K.aggregates)H[z]=null;return H}async function Z(K,H,z,V=z.length>0?Object.keys(z[0]):[]){let A=z.length,F=Object.keys(H.aggregates),N=Array(A),D=Q(H);for(let L=0;L<A;L++){let B=z[L],O=D();for(let E=0;E<F.length;E++){let M=F[E],R=H.aggregates[M].column?.decode||((q,w)=>Number.parseFloat(w));O[M]=R(K,B[V[E]])}N[L]=O}return N}return zE0=J,zE0}var VE0,Ok1;function yb1(){if(Ok1)return VE0;Ok1=1;let $=CY8(),Y=zX8(),X=ZG8(),G=FG8(),J=LG8(),Q=Ob1(),W=BG8(),Z=MG8(),K=qb1(),H=RG8(),z=Eb1(),V=qG8(),A=_B(),F=IG8(),N=vb1(),D=PG8(),L=CG8(),B=Lt(),O=WQ(),E=g6(),M=Vb1(),R=SG8(),q=kG8(),w=xG8();function I(_){var C=A();return C._dbName=_,C._primaryColumns=[],C._aliases=new Set,C._columns=[],C._columnDiscriminators=[],C._formulaDiscriminators=[],C._relations={},C._cache=V(C),C._emitChanged=B(),C.primaryColumn=function(k){var S=$(C,k);return S.isPrimary=!0,C._primaryColumns.push(S),Y(S,C)},C.column=function(k){var S=$(C,k);return Y(S,C)},C.join=function(k){return X(C,k)},C.hasMany=function(k){return G(k)},C.hasOne=function(k){return J(k)},C.count=function(k,...S){let T=[k,C,...S];return Promise.resolve().then(()=>W.apply(null,T))},C.getMany=function(k,...S){let T=[k,C,...S];return Promise.resolve().then(()=>Q.apply(null,T))},C.getManyDto=function(k,...S){let T=[k,C,...S];return Promise.resolve().then(()=>Z.apply(null,T))},C.aggregate=function(k,...S){let T=[k,C,...S];return w.apply(null,T)},C.getMany.exclusive=function(k,...S){let T=[k,C,...S];return Promise.resolve().then(()=>Q.exclusive.apply(null,T))},C.tryGetFirst=function(k,...S){let T=[k,C,...S];return Promise.resolve().then(()=>z.apply(null,T))},C.tryGetFirst.exclusive=function(k,...S){let T=[k,C,...S];return Promise.resolve().then(()=>z.exclusive.apply(null,T))},C.getOne=C.tryGetFirst,C.getOne.exclusive=C.tryGetFirst.exclusive,C.getById=function(k,...S){let T=[k,C,...S];return Promise.resolve().then(()=>K.apply(null,T))},C.getById.exclusive=function(k,...S){let T=[k,C,...S];return Promise.resolve().then(()=>K.exclusive.apply(null,T))},C.tryGetById=function(k,...S){let T=[k,C,...S];return Promise.resolve().then(()=>H.apply(null,T))},C.tryGetById.exclusive=function(k,...S){let T=[k,C,...S];return Promise.resolve().then(()=>H.exclusive.apply(null,T))},C.columnDiscriminators=function(){for(var k=0;k<arguments.length;k++)C._columnDiscriminators.push(arguments[k]);return C},C.formulaDiscriminators=function(){for(var k=0;k<arguments.length;k++)C._formulaDiscriminators.push(arguments[k]);return C},C.insert=function(k,...S){let v=[k,{table:C,concurrency:void 0},...S];return F.apply(null,v)},C.insertWithConcurrency=function(k,S,...T){let v=[k,{table:C,options:S}].concat([].slice.call(T));return F.apply(null,v)},C.updateWithConcurrency=function(k,S,T,v,x,y,d){S=S||{};let b=P(S,v).concurrency||"optimistic",g=C[v];if(d&&g&&g.tsType==="JSONColumn"&&Array.isArray(d.path)&&d.path.length>1){let p=E(k,"engine");if(M(p)){let h=d.path.slice(1),n=T._jsonUpdateState||{},t=n[v]||{patches:[]};if(t.patches.push({path:h,op:d.op,value:d.value,oldValue:d.oldValue}),n[v]=t,T._jsonUpdateState=n,b!=="overwrite"){let s=T._concurrencyState||{columns:{}},Z0=s.columns[v]||{};Z0.concurrency=b,Z0.paths=Z0.paths||[],Z0.paths.push({path:h,oldValue:d.oldValue}),delete Z0.oldValue,s.columns[v]=Z0,T._concurrencyState=s}}else if(b!=="overwrite"){let h=T._concurrencyState||{columns:{}},n=Object.prototype.hasOwnProperty.call(d,"fullOldValue")?d.fullOldValue:y;h.columns[v]={oldValue:n,concurrency:b},T._concurrencyState=h}}else if(b!=="overwrite"){let p=T._concurrencyState||{columns:{}};p.columns[v]={oldValue:y,concurrency:b},T._concurrencyState=p}T[v]=x},C.delete=N.bind(null,C),C.cascadeDelete=function(k,...S){let T=[k,C,...S];return D.apply(null,T)},C.deleteCascade=C.cascadeDelete,C.exclusive=function(){return C._exclusive=!0,C},C.patch=function(k,...S){let T=[k,C,...S];return L.apply(null,T)},C.hostLocal=function(k){return O({table:C,...k})},C.where=R(C),C._aggregate=q(C),C}function P(_,C){let k={};if(!_)return k;if("readonly"in _)k.readonly=_.readonly;if("concurrency"in _)k.concurrency=_.concurrency;return{...k,..._[C]||{}}}return VE0=I,VE0}var AE0,Ek1;function yG8(){if(Ek1)return AE0;Ek1=1;let $=new WeakMap;function Y(G){function J(W){return W=new Proxy(W,{}),()=>X(W,J)}Object.defineProperty(J,"pg",{get:function(){return Q.bind(null,"pg")}}),Object.defineProperty(J,"pglite",{get:function(){return Q.bind(null,"pglite")}}),Object.defineProperty(J,"postgres",{get:function(){return Q.bind(null,"pg")}}),Object.defineProperty(J,"mssql",{get:function(){return Q.bind(null,"mssql")}}),Object.defineProperty(J,"mssqlNative",{get:function(){return Q.bind(null,"mssqlNative")}}),Object.defineProperty(J,"mysql",{get:function(){return Q.bind(null,"mysql")}}),Object.defineProperty(J,"sap",{get:function(){return Q.bind(null,"sap")}}),Object.defineProperty(J,"oracle",{get:function(){return Q.bind(null,"oracle")}}),Object.defineProperty(J,"sqlite",{get:function(){return Q.bind(null,"sqlite")}}),Object.defineProperty(J,"d1",{get:function(){return Q.bind(null,"d1")}}),Object.defineProperty(J,"http",{get:function(){return Q.bind(null,"http")}}),J.express=G.express;function Q(W,...Z){return G[W].apply(null,Z)}return J}function X(G,J){let Q=$.get(G);if(!Q)Q={},$.set(G,Q);let W={get pg(){return Z.bind(null,"pg")},get pglite(){return Z.bind(null,"pglite")},get postgres(){return Z.bind(null,"pg")},get mssql(){return Z.bind(null,"mssql")},get mssqlNative(){return Z.bind(null,"mssqlNative")},get mysql(){return Z.bind(null,"mysql")},get sap(){return Z.bind(null,"sap")},get oracle(){return Z.bind(null,"oracle")},get sqlite(){return Z.bind(null,"sqlite")},get d1(){return Z.bind(null,"d1")},get http(){return Z.bind(null,"http")}};function Z(K,...H){if(K==="d1")return J[K].apply(null,H);let z=JSON.stringify(H);if(!Q[K])Q[K]={};let V=Q[K][z];if(!V)V=J[K].apply(null,H),Q[K][z]=V;return V}return G(W)}return AE0=Y,AE0}var FE0,Mk1;function bG8(){if(Mk1)return FE0;Mk1=1;let $=yb1(),Y=yG8();function X(Q,W){let Z=Y(Q);return G(Q,K,Z,W);function K(H){let z={};for(let V in K)if(K[V]&&K[V]._dbName)z[V]=K[V];if(H&&H.db&&typeof H.db==="function")return Q({...H,db:Z(H.db),tables:z,providers:Z});else return Q({...H,tables:z,providers:Z})}}function G(Q,W,Z,K){let H=K({table:V,...W});for(let A in H)if(H[A]&&H[A]._dbName)W[A]=H[A],W[A].map=J.bind(null,W[A]);W.map=G.bind(null,Q,W,Z),W.pg=z.bind(null,"pg"),W.pglite=z.bind(null,"pglite"),W.postgres=z.bind(null,"pg"),W.mssql=z.bind(null,"mssql"),W.mssqlNative=z.bind(null,"mssqlNative"),W.mysql=z.bind(null,"mysql"),W.sap=z.bind(null,"sap"),W.oracle=z.bind(null,"oracle"),W.sqlite=z.bind(null,"sqlite"),W.d1=z.bind(null,"d1"),W.http=function(A){return Q({db:A,providers:Z})};function z(A,...F){let D=Q[A].apply(null,F),L={};for(let B in W)if(W[B]&&W[B]._dbName)L[B]=W[B];return Q({db:D,tables:L,providers:Z})}return W;function V(){let A=$.apply(null,arguments);return A.map=J.bind(null,A),A}}function J(Q,W){let Z=W({column:Q.column,primaryColumn:Q.primaryColumn,references:Q.join,hasMany:K,hasOne:H});for(let z in Z)if(Z[z].as)Z[z]=Z[z].as(z);function K(z){if(!z)throw Error("Missing 'to' table");return{by:V};function V(){let A=z.join(Q).by.apply(null,arguments);return Q.hasMany(A)}}function H(z){if(!z)throw Error("Missing 'to' table");return{by:V};function V(){let A=z.join(Q).by.apply(null,arguments);return Q.hasOne(A)}}return Q}return FE0=X,FE0}var DE0,Rk1;function hG8(){if(Rk1)return DE0;Rk1=1;let $=typeof Deno<"u"&&Deno.version?.deno,Y=typeof Bun<"u"&&Bun.version,X=typeof process<"u"&&process.versions?.node&&!$&&!Y?process.versions.node:!1;function G(J){if(J){let Q=J.split(".");return{version:J,major:parseInt(Q[0]),minor:parseInt(Q[1]),patch:parseInt(Q[2])}}else return!1}return DE0={deno:G($),bun:G(Y),node:G(X)},DE0}var NE0,qk1;function fG8(){if(qk1)return NE0;qk1=1;var $=Y9(),Y=$("COMMIT");function X(){}return Y.endEdit=X,Y.matches=X,NE0=Y,NE0}var LE0,Ik1;function gG8(){if(Ik1)return LE0;Ik1=1;function $(Y){delete Y.rdb}return LE0=$,LE0}var BE0,Pk1;function fG(){if(Pk1)return BE0;Pk1=1;var $=g6(),Y=gG8();function X(G){var J=$(G,"dbClientDone"),Q=$(G,"pool");if(Y(G),J)J();if(Q)return Q.end()}return BE0=X,BE0}var OE0,wk1;function zW(){if(wk1)return OE0;wk1=1;let $=fG8(),Y=jB(),X=ay1(),G=fG(),J=gq0(),Q=g6();function W(K,H){return V().then(G.bind(null,K)).then(z);function z(){return H}async function V(){let A=J(K);while(A.length>0)await X(K,A),A=J(K);if(!Q(K,"transactionLess"))Y(K,$);return X(K,J(K))}}function Z(K,H){return Promise.resolve().then(()=>W(K,H))}return OE0=Z,OE0}var EE0,_k1;function mG8(){if(_k1)return EE0;_k1=1;var $=Y9(),Y=$("ROLLBACK");function X(){}return Y.endEdit=X,Y.matches=X,EE0=Y,EE0}var ME0,jk1;function uG8(){if(jk1)return ME0;jk1=1;var $=fG();function Y(X){try{$(X)}catch(G){}}return ME0=Y,ME0}var RE0,Tk1;function pG8(){if(Tk1)return RE0;Tk1=1;var $=uG8();function Y(X,G,J){return J.then(Q,Q);function Q(){throw $(X),G}}return RE0=Y,RE0}var qE0,Ck1;function VW(){if(Ck1)return qE0;Ck1=1;let $=mG8(),Y=mq0(),X=fG(),G=gq0(),J=pG8(),Q=Yb(),W="12345678-1234-1234-1234-123456789012",Z=g6();function K(z,V){var A=Q().then(()=>G(z)).then(F).then(()=>X(z));function F(){if(Z(z,"transactionLess"))return Promise.resolve();return Y(z,$)}if(V){if(V.message?.indexOf("ORA-01476: divisor is equal to zero")>-1)return J(z,Error("Conflict when updating a column"),A);let N=V.message&&V.message.split(W)||[];if(N.length>1)return J(z,Error(N[1]),A);else return J(z,V,A)}return A}function H(z,V){return Promise.resolve().then(()=>K(z,V))}return qE0=H,qE0}var IE0,Sk1;function A7(){if(Sk1)return IE0;Sk1=1;var $=_B()();Object.defineProperty($,"end",{enumerable:!1,value:Y});function Y(){var X=[];for(var G in $){var J=$[G].end();X.push(J)}return Promise.all(X)}return IE0=$,IE0}var PE0,kk1;function U5(){if(kk1)return PE0;kk1=1;var $=Lt(),Y={query:$()},X=function(){};function G(){X.apply(null,arguments)}function J({sql:Q,parameters:W}){Y.query.apply(null,arguments),G(Q),G("parameters: "+W)}return G.emitQuery=J,G.registerLogger=function(Q){X=Q},G.on=function(Q,W){if(Q==="query")Y.query.add(W);else throw Error("unknown event type: "+Q)},G.off=function(Q,W){if(Q==="query")Y.query.tryRemove(W);else throw Error("unknown event type: "+Q)},PE0=G,PE0}var wE0,vk1;function dG8(){if(vk1)return wE0;vk1=1;function $(Y){if(W())return Y;if(Q())return Z(Y);var X="";for(var G=0;G<Y.length;++G){var J=Y[G].toUpperCase();if(J=parseInt(J,16),!isNaN(J))X+=J}return Z(X);function Q(){var K=/^-?\d+\.?\d*$/,H=new RegExp(K);return typeof Y==="string"&&H.test(Y)}function W(){return typeof Y==="number"&&Math.floor(Y)===Y}function Z(K){var H="9223372036854775807";if(K=K.substring(0,19),K>H)return K.substring(0,18);return K}}return wE0=$,wE0}var _E0,xk1;function Ot(){if(xk1)return _E0;xk1=1;var $=rX(),Y=dG8();function X(J,Q){if(J=Y(J),typeof Q==="function")return G(J,Q);else{var W="SELECT pg_advisory_xact_lock("+J+")";return $(W)}}async function G(J,Q){await $("SELECT pg_advisory_lock("+J+")");try{let W=await Q();return await $("SELECT pg_advisory_unlock("+J+")"),W}catch(W){throw await $("SELECT pg_advisory_unlock("+J+")"),W}}return _E0=X,_E0}var jE0,yk1;function Et(){if(yk1)return jE0;yk1=1;var $=rX();function Y(X,G){if(!G)throw Error("Missing schema");if(!Array.isArray(G))G=[G];return $(X,"SET LOCAL search_path TO "+G.join(","))}return jE0=Y,jE0}var TE0,bk1;function hZ(){if(bk1)return TE0;bk1=1;function $(){let Y={};function X(G){return G(Y)}return Y.run=X,Y}return TE0=$,TE0}var CE0,hk1;function cG8(){if(hk1)return CE0;hk1=1;var $=U5();function Y(X,G){var J=G.query;return Q;function Q(W,Z){var K=W.parameters,H=W.sql();return $.emitQuery({sql:H,parameters:K}),J.call(G,H,K,Z)}}return CE0=Y,CE0}var SE0,fk1;function lG8(){if(fk1)return SE0;fk1=1;var $=U5();function Y(X,G){var J=G.query;return Q;function Q(W,Z){var K=W.parameters,H=W.sql();return $.emitQuery({sql:H,parameters:K}),J.call(G,H,K,z);function z(V,A){let F={rowsAffected:A?.affectedRows,...A};Z(V,F)}}}return SE0=Y,SE0}var kE0,gk1;function iG8(){if(gk1)return kE0;gk1=1;function $(Y){if(Y)return 1;return 0}return kE0=$,kE0}var vE0,mk1;function UF(){if(mk1)return vE0;mk1=1;function $(Y,...X){let G=0;return Y.replace(/%s/g,()=>{return X[G++]})}return vE0=$,vE0}var xE0,uk1;function Gb(){if(uk1)return xE0;return uk1=1,xE0=($)=>`\`${$}\``,xE0}var yE0,pk1;function nG8(){if(pk1)return yE0;pk1=1;let $="delete %s from %s as %s%s",Y=UF(),X=Gb();function G(J,Q,W){let Z=X(J._dbName);return Q=X(Q),Y($,Q,Z,Q,W)}return yE0=G,yE0}var bE0,dk1;function rG8(){if(dk1)return bE0;return dk1=1,bE0=function($){return" FOR UPDATE"},bE0}var hE0,ck1;function aG8(){if(ck1)return hE0;ck1=1;let $=Gb();function Y(X,G,J){return J.map((Q,W)=>{let Z=G._primaryColumns[W];if(Q===void 0&&Z.tsType==="NumberColumn")return`${$(Z._dbName)}=LAST_INSERT_ID()`;else return Z.eq(X,Q)})}return hE0=Y,hE0}var fE0,lk1;function sG8(){if(lk1)return fE0;lk1=1;function $(Y){if(Y.offset)return` limit ${Y.offset}${X()}`;else if(Y.limit||Y.limit===0)return` limit ${Y.limit}`;else return"";function X(){if(Y.limit||Y.limit===0)return`, ${Y.limit}`;else return""}}return fE0=$,fE0}var gE0,ik1;function oG8(){if(ik1)return gE0;ik1=1;let $=Gb();function Y(X,G){let J=$(X._dbName);if(G)return`CAST(${G}.${J} AS CHAR)`;else return`CAST(${J} AS CHAR)`}return gE0=Y,gE0}var mE0,nk1;function tG8(){if(nk1)return mE0;nk1=1;let $=Gb();function Y(X,G,J,Q){let W=[],Z="",K=[],H="INSERT INTO "+$(G._dbName)+" ";if(V(),A(),W.length===0)H+="VALUES ()";else H=H+"("+W.join(",")+") VALUES ("+K.join(",")+")"+z();return H;function z(){if(Q.concurrency==="skipOnConflict"||Q.concurrency==="overwrite")return` ON DUPLICATE KEY UPDATE ${Z} `;else return""}function V(){let F=G._columnDiscriminators;for(let N=0;N<F.length;N++){let D=F[N].split("=");W.push($(D[0])),K.push(D[1])}}function A(){let F=[],N=G._columns;for(let L=0;L<N.length;L++){let B=N[L],O=$(B._dbName);if(J["__"+B.alias]!==void 0)W.push(O),K.push("%s"),D(B)}if(F.length===0){let L=G._primaryColumns[0],B=$(L._dbName);F.push(`${B}=VALUES(${B})`)}Z=F.join(",");function D(L){let B=Q[L.alias]?.concurrency||Q.concurrency,O=$(L._dbName),E=$(G._dbName);if(B==="overwrite")F.push(`${O}=VALUES(${O})`);else if(B==="optimistic")F.push(`${O} = CASE WHEN ${E}.${O} <> VALUES(${O}) THEN CAST('12345678-1234-1234-1234-123456789012Conflict when updating ${O}12345678-1234-1234-1234-123456789012' AS SIGNED) ELSE ${E}.${O} END`)}}}return mE0=Y,mE0}var uE0,rk1;function VP(){if(rk1)return uE0;rk1=1;var $=aq0(),Y=oy(),X=Nt();function G(Q,W,Z,K){return new J(Q,W,Z,K)}function J(Q,W,Z,K){this.__getCoreCommand=$(Q),this._table=W,this._row=Z,this._options=K}return J.prototype._getCoreCommand=function(){return this.__getCoreCommand(this._table,this._row,this._options)},J.prototype.sql=function(){return this._getCoreCommand().sql()},J.prototype.matches=function(Q){return this._row===Q},J.prototype.endEdit=function(){this.sql();var Q=X(this._table,this._row);if(this._disallowCompress||this._table._emitChanged.callbacks.length>0)this._patch=Y([],[Q])},J.prototype.emitChanged=function(){return this._table._emitChanged({row:this._row,patch:this._patch})},Object.defineProperty(J.prototype,"parameters",{get:function(){return this._getCoreCommand().parameters}}),Object.defineProperty(J.prototype,"disallowCompress",{get:function(){return this._disallowCompress||this._table._emitChanged.callbacks.length>0},set:function(Q){this._disallowCompress=Q}}),uE0=G,uE0}var pE0,ak1;function eG8(){if(ak1)return pE0;ak1=1;let $=hG(),Y=g5();function X(J,Q,W){let Z=$(J);if(Z.insertSql)return Z.insertSql.apply(null,arguments);else return G.apply(null,arguments)}function G(J,Q,W){let Z=[],K=[],H="INSERT INTO "+Y(J,Q._dbName)+" ";if(z(),V(),Z.length===0)H+=`${F()}${N()}${A()}`;else H=H+"("+Z.join(",")+") "+F()+"VALUES ("+K.join(",")+")"+A();return H;function z(){let D=Q._columnDiscriminators;for(let L=0;L<D.length;L++){let B=D[L].split("=");Z.push(Y(J,B[0])),K.push(B[1])}}function V(){let D=Q._columns;for(let L=0;L<D.length;L++){let B=D[L];if(W["__"+B.alias]!==void 0)Z.push(Y(J,B._dbName)),K.push("%s")}}function A(){let D=$(J);if(!D.lastInsertedIsSeparate&&D.lastInsertedSql)return" "+D.lastInsertedSql(Q);return""}function F(){let D=$(J);if(!D.lastInsertedIsSeparate&&D.outputInsertedSql)return" "+D.outputInsertedSql(Q)+" ";return""}function N(){return`${$(J).insertDefault||"DEFAULT VALUES"}${A()}`}}return pE0=X,pE0}var dE0,sk1;function Jb(){if(sk1)return dE0;sk1=1;let $=Y9(),Y=eG8(),X=UF();function G(J,Q,W,Z={}){let K=[],H=[Y(J,Q,W,Z)],z=Q._columns;for(let A=0;A<z.length;A++){let F=z[A],N=F.alias;if(W["__"+F.alias]!==void 0){let D=F.encode(J,W[N]);if(D.parameters.length>0)H.push(D.sql()),K.push(D.parameters[0]);else H.push(D.sql())}}let V=X.apply(null,H);return $(V,K)}return dE0=G,dE0}var cE0,ok1;function $J8(){if(ok1)return cE0;ok1=1;let $=Y9(),Y=hG(),X=At(),G=g5();function J(Q,W,Z){let K=[],H=W._primaryColumns.map((D)=>Z["__"+D.alias]),z=`SELECT ${V()} FROM ${G(Q,W._dbName)} WHERE ${F()}`;return $(z,K);function V(){return W._columns.map(A).join(",")}function A(D){let L=D.formatOut?D.formatOut(Q)+" as "+G(Q,D._dbName):G(Q,D._dbName);if(D.dbNull===null)return L;else{let B=D.encode.unsafe(Q,D.dbNull);return`CASE WHEN ${L}=${B} THEN null ELSE ${L} END`}}function F(){let D,L=Y(Q).lastInsertedSql(Q,W,H);if(Array.isArray(L))for(let B=0;B<L.length;B++){let O=B===0?"":" AND ";if(!L[B].sql){let M=L[B];L[B]={sql:()=>M}}let E=$(O+L[B].sql(),L[B].parameters);if(D)D=D.append(E);else D=E}else D=$(L);return K=K.concat(D.parameters),[N(),D.sql()].filter((B)=>B).join(" AND ")}function N(){return X(Q,W,W._dbName)}}return cE0=J,cE0}var lE0,tk1;function Mt(){if(tk1)return lE0;tk1=1;var $=$J8(),Y=aq0();function X(J,Q,W,Z){let K=new G(J,Q,W,Z);return Z.endEdit=()=>{},K}function G(J,Q,W,Z){this._insertCommand=Z,this.__getCoreCommand=Y($.bind(null,J)),this._table=Q,this._row=W}return G.prototype._getCoreCommand=function(){return this.__getCoreCommand(this._table,this._row)},G.prototype.sql=function(){return this._getCoreCommand().sql()},G.prototype.matches=function(J){return this._row===J},G.prototype.endEdit=function(){this._insertCommand.endEdit(),this.sql()},Object.defineProperty(G.prototype,"parameters",{get:function(){return this._getCoreCommand().parameters}}),Object.defineProperty(G.prototype,"disallowCompress",{get:function(){return!0}}),lE0=X,lE0}var iE0,ek1;function YJ8(){if(ek1)return iE0;ek1=1;let $=VP(),Y=Jb(),X=Mt(),G=WK(),J=jB();function Q(W,Z,K,H){let z=[],V=$(Y.bind(null,W),Z,K,H);V.disallowCompress=!0,J(W,V);let A=X(W,Z,K,V);return z.push(A),G(W,z).then((F)=>F[F.length-1])}return iE0=Q,iE0}var nE0,$v1;function XJ8(){if($v1)return nE0;$v1=1;let $=cG8(),Y=lG8(),X=iG8(),G=nG8(),J=rG8(),Q=aG8(),W=sG8(),Z=oG8(),K=tG8(),H=YJ8(),z=Gb();function V(A,F,{readonly:N=!1}={}){var D={poolFactory:F};if(!F.connect)F=F(),D.pool=F;if(D.engine="mysql",D.encodeBoolean=X,D.encodeJSON=JSON.stringify,D.deleteFromSql=G,D.selectForUpdateSql=J,D.lastInsertedIsSeparate=!0,D.lastInsertedSql=Q,D.formatBigintOut=Z,D.insertSql=K,D.insert=H,D.multipleStatements=!1,D.limitAndOffset=W,D.accept=function(L){L.visitMySql()},D.aggregateCount=0,D.quote=z,D.cache={},N)return D.dbClient={executeQuery:function(L,B){F.connect((O,E,M)=>{if(O)return B(O);try{$(A,E)(L,(R,q)=>{M(),B(R,q)})}catch(R){M(),B(R)}})},executeCommand:function(L,B){F.connect((O,E,M)=>{if(O)return B(O);try{Y(A,E)(L,(R,q)=>{M(),B(R,q)})}catch(R){M(),B(R)}})}},A.rdb=D,(L)=>L();return function(L,B){F.connect(O);function O(E,M,R){try{if(E){B(E);return}M.executeQuery=$(A,M),M.executeCommand=Y(A,M),D.dbClient=M,D.dbClientDone=R,A.rdb=D,L()}catch(q){B(q)}}}}return nE0=V,nE0}var rE0,Yv1;function GJ8(){if(Yv1)return rE0;Yv1=1;let $=Y9(),Y=hG();return rE0=function(X){let G=$(Y(X).begin||"BEGIN");G.endEdit=J,G.matches=J;function J(){}return G},rE0}var aE0,Xv1;function fZ(){if(Xv1)return aE0;Xv1=1;let $=GJ8(),Y=mq0(),X=nX();function G(J,Q){if(X(J,"changes",[]),Q)return X(J,"transactionLess",!0),Promise.resolve();return Y(J,$(J))}return aE0=G,aE0}var sE0,Gv1;function gZ(){if(Gv1)return sE0;Gv1=1;function $(Y){if(typeof Y!=="function")throw TypeError('The "original" argument must be of type Function');return function(...X){return new Promise((G,J)=>{function Q(W,...Z){if(W)return J(W);return G(Z.length>1?Z:Z[0])}Y.call(this,...X,Q)})}}return sE0=$,sE0}var oE0,Jv1;function JJ8(){if(Jv1)return oE0;Jv1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return oE0=Y,oE0}var tE0,Qv1;function ZK(){if(Qv1)return tE0;return Qv1=1,tE0={poolSize:0,poolIdleTimeout:30000,reapIntervalMillis:1000},tE0}var eE0,Wv1;function KK(){if(Wv1)return eE0;Wv1=1;function $(Q){if(typeof setImmediate==="function")setImmediate(Q);else if(typeof queueMicrotask==="function")queueMicrotask(Q);else setTimeout(Q,0)}function Y(Q){if(!(this instanceof Y))return new Y(Q);this._size=Math.max(+Q|0,1),this._slots=[],this._total=null;for(let W=0;W<this._size;W+=1)this._slots.push([])}Y.prototype.size=function(){if(this._total===null){this._total=0;for(let W=0;W<this._size;W+=1)this._total+=this._slots[W].length}return this._total},Y.prototype.enqueue=function(W,Z){if(Z=Z&&+Z|0||0,this._total=null,Z<0||Z>=this._size)console.error("invalid priority: "+Z+" must be between 0 and "+(this._size-1)),Z=this._size-1;this._slots[Z].push(W)},Y.prototype.dequeue=function(){let W=null;this._total=null;for(let Z=0,K=this._slots.length;Z<K;Z+=1)if(this._slots[Z].length){W=this._slots[Z].shift();break}return W};function X(Q,W,Z){let K=function(){if(Q())W(K);else Z()};K()}function G(Q){if(!(this instanceof G))return new G(Q);if(Q.validate&&Q.validateAsync)throw Error("Only one of validate or validateAsync may be specified");Q.idleTimeoutMillis=Q.idleTimeoutMillis||30000,Q.returnToHead=Q.returnToHead||!1,Q.refreshIdle="refreshIdle"in Q?Q.refreshIdle:!0,Q.reapInterval=Q.reapIntervalMillis||1000,Q.priorityRange=Q.priorityRange||1,Q.validate=Q.validate||function(){return!0},Q.max=parseInt(Q.max,10),Q.min=parseInt(Q.min,10),Q.max=Math.max(isNaN(Q.max)?1:Q.max,1),Q.min=Math.min(isNaN(Q.min)?0:Q.min,Q.max-1),this._factory=Q,this._inUseObjects=[],this._draining=!1,this._waitingClients=new Y(Q.priorityRange),this._availableObjects=[],this._asyncTestObjects=[],this._count=0,this._removeIdleTimer=null,this._removeIdleScheduled=!1,this._ensureMinimum()}G.prototype._log=function(W,Z){if(typeof this._factory.log==="function")this._factory.log(W,Z);else if(this._factory.log)console.log(Z.toUpperCase()+" pool "+this._factory.name+" - "+W)},G.prototype.destroy=function(W,Z){if(this._count-=1,this._count<0)this._count=0;if(this._availableObjects=this._availableObjects.filter((K)=>K.obj!==W),this._inUseObjects=this._inUseObjects.filter((K)=>K!==W),this._factory.destroy(W,Z),this._factory.destroy.length===1&&Z&&typeof Z==="function")Z();this._ensureMinimum()},G.prototype._removeIdle=function(){let W=new Date().getTime(),Z=this._factory.refreshIdle,K=this._count-this._factory.min,H=[];this._removeIdleScheduled=!1;for(let z=0;z<this._availableObjects.length;z++){let V=this._availableObjects[z];if(W>=V.timeout&&(Z||H.length<K))this._log("removeIdle() destroying obj - now:"+W+" timeout:"+V.timeout,"verbose"),H.push(V.obj)}if(H.forEach((z)=>this.destroy(z)),this._availableObjects.length>0)this._log("this._availableObjects.length="+this._availableObjects.length,"verbose"),this._scheduleRemoveIdle();else this._log("removeIdle() all objects removed","verbose")},G.prototype._scheduleRemoveIdle=function(){if(!this._removeIdleScheduled)this._removeIdleScheduled=!0,this._removeIdleTimer=setTimeout(()=>{this._removeIdle()},this._factory.reapInterval)},G.prototype._dispense=function(){let W=this._waitingClients.size();if(this._log("dispense() clients="+W+" available="+this._availableObjects.length,"info"),W<1)return;if(this._factory.validateAsync){X(()=>this._availableObjects.length>0,this._createAsyncValidator(),()=>{if(this._count<this._factory.max)this._createResource()});return}while(this._availableObjects.length>0){this._log("dispense() - reusing obj","verbose");let Z=this._availableObjects[0];if(!this._factory.validate(Z.obj)){this.destroy(Z.obj);continue}return this._availableObjects.shift(),this._inUseObjects.push(Z.obj),this._waitingClients.dequeue()(null,Z.obj)}if(this._count<this._factory.max)this._createResource()},G.prototype._createAsyncValidator=function(){return(W)=>{this._log("dispense() - reusing obj","verbose");let Z=this._availableObjects.shift();this._asyncTestObjects.push(Z),this._factory.validateAsync(Z.obj,(K)=>{let H=this._asyncTestObjects.indexOf(Z);if(this._asyncTestObjects.splice(H,1),!K)return this.destroy(Z.obj),W();if(this._waitingClients.size()<1){this._addResourceToAvailableObjects(Z.obj);return}this._inUseObjects.push(Z.obj),this._waitingClients.dequeue()(null,Z.obj)})}},G.prototype._createResource=function(){this._count+=1,this._log("createResource() - creating obj - count="+this._count+" min="+this._factory.min+" max="+this._factory.max,"verbose"),this._factory.create((...W)=>{let Z,K;if(W.length>1)[Z,K]=W;else Z=W[0]instanceof Error?W[0]:null,K=W[0]instanceof Error?null:W[0];let H=this._waitingClients.dequeue();if(Z){if(this._count-=1,this._count<0)this._count=0;if(H)H(Z,K);$(()=>{this._dispense()})}else if(this._inUseObjects.push(K),H)H(null,K);else this._addResourceToAvailableObjects(K)})},G.prototype._addResourceToAvailableObjects=function(Q){let W={obj:Q,timeout:new Date().getTime()+this._factory.idleTimeoutMillis};if(this._factory.returnToHead)this._availableObjects.unshift(W);else this._availableObjects.push(W);this._dispense(),this._scheduleRemoveIdle()},G.prototype._ensureMinimum=function(){if(!this._draining&&this._count<this._factory.min){let W=this._factory.min-this._count;for(let Z=0;Z<W;Z++)this._createResource()}},G.prototype.acquire=function(W,Z){if(this._draining)throw Error("pool is draining and cannot accept work");return this._waitingClients.enqueue(W,Z),this._dispense(),this._count<this._factory.max},G.prototype.borrow=function(W,Z){return this._log("borrow() is deprecated. use acquire() instead","warn"),this.acquire(W,Z)},G.prototype.release=function(W){if(this._availableObjects.some((H)=>H.obj===W)){this._log("release called twice for the same resource: "+Error().stack,"error");return}let K=this._inUseObjects.indexOf(W);if(K<0){this._log("attempt to release an invalid resource: "+Error().stack,"error");return}this._inUseObjects.splice(K,1),this._addResourceToAvailableObjects(W)},G.prototype.returnToPool=function(W){this._log("returnToPool() is deprecated. use release() instead","warn"),this.release(W)};function J(Q){$(Q)}return G.prototype.drain=function(W){this._log("draining","info"),this._draining=!0;let Z=()=>{if(this._waitingClients.size()>0)return setTimeout(Z,100);if(this._asyncTestObjects.length>0)return setTimeout(Z,100);if(this._availableObjects.length!==this._count)return setTimeout(Z,100);if(W)J(W)};Z()},G.prototype.destroyAllNow=function(W){this._log("force destroying all objects","info");let Z=this._availableObjects;this._availableObjects=[];let K=Z.length,H=0;if(this._removeIdleScheduled=!1,clearTimeout(this._removeIdleTimer),K===0&&W){J(W);return}while(Z.length>0){let{obj:z}=Z.shift();this.destroy(z,()=>{if(H+=1,H===K&&W)J(W)})}},G.prototype.pooled=function(W,Z){return(...K)=>{let H=K[K.length-1],z=typeof H==="function";this.acquire((V,A)=>{if(V){if(z)H(V);return}let F=[A].concat(K.slice(0,z?-1:void 0));F.push((...N)=>{if(this.release(A),z)H(...N)}),W(...F)},Z)}},G.prototype.getPoolSize=function(){return this._count},G.prototype.getName=function(){return this._factory.name},G.prototype.availableObjectsCount=function(){return this._availableObjects.length},G.prototype.inUseObjectsCount=function(){return this._inUseObjects.length},G.prototype.waitingClientsCount=function(){return this._waitingClients.size()},G.prototype.getMaxPoolSize=function(){return this._factory.max},G.prototype.getMinPoolSize=function(){return this._factory.min},eE0={Pool:G},eE0}var $M0,Zv1;function QJ8(){if(Zv1)return $M0;Zv1=1;var $=ZK(),Y=KK(),X;function G(J,Q){if(typeof J==="string")J=J+"?dateStrings=true&decimalNumbers=true";else J.dateStrings=!0;Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log,create:async function(Z){try{if(!X)X=await Promise.resolve().then(() => U6(AH0(),1)),X=X.default||X}catch(H){return Z(H,null)}var K=X.createPool(J);return Z(null,K)},destroy:function(Z){Z.poolCount=void 0,Z.end()}});return W.connect=function(Z){W.acquire(function(K,H){if(K)return Z(K,null,function(){});H.poolCount++,Z(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return $M0=G,$M0}var YM0,Kv1;function WJ8(){if(Kv1)return YM0;Kv1=1;let $=gZ(),Y=A7(),X=JJ8(),G=QJ8(),J=HW();function Q(W,Z){let K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return YM0=Q,YM0}var XM0,Uv1;function Hv1(){if(Uv1)return XM0;Uv1=1;let $=hZ(),Y=XJ8(),X=fZ(),G=zW(),J=VW(),Q=WJ8(),W=QQ(),Z=WQ(),K=rX(),H=fG(),z=nX();function V(A,F){if(!A)throw Error("Connection string cannot be empty");F=F||{min:1};var N=Q(A,F);let D={poolFactory:N,hostLocal:Z,express:W};return D.transaction=function(L,B){if(arguments.length===1&&typeof L==="function")B=L,L=void 0;let O=$();if(B)return O.run(E);else return O.run(R);async function E(){let q,w=Y(O,N,L);return await new Promise(w).then(M).then(()=>B(O)).then((I)=>q=I).then(()=>G(O)).then(null,(I)=>J(O,I)),q}function M(){return X(O,L)}function R(){let q,w=Y(O,N,L);return q=new Promise(w),q.then(M)}},D.createTransaction=function(L){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,L)}},D.query=function(L){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>K(B,L).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(F)return N.end();else return Promise.resolve()},D.accept=function(L){L.visitMySql()},D}return XM0=V,XM0}var GM0,zv1;function AP(){if(zv1)return GM0;zv1=1;function $(Y,X){if(X.length===0)return Y.sql();var G=Y.sql().split("?"),J="",Q=G.length-1;for(var W=0;W<Q;W++)J+=G[W]+"$"+(W+1);return J+=G[Q],J}return GM0=$,GM0}var JM0,Vv1;function ZJ8(){if(Vv1)return JM0;Vv1=1;var $=U5(),Y=AP();function X(G,J){var Q=J.query;return W;function W(Z,K){var H=Z.parameters,z=Y(Z,H);$.emitQuery({sql:z,parameters:H}),Q.call(J,z,H).then((A)=>V(null,A),(A)=>V(A));function V(A,F){if(A)K(A);else{if(Array.isArray(F))F=F[F.length-1];K(null,F.rows)}}}}return JM0=X,JM0}var QM0,Av1;function KJ8(){if(Av1)return QM0;Av1=1;var $=U5(),Y=AP();function X(G,J){var Q=J.query;return W;function W(Z,K){var H=Z.parameters,z=Y(Z,H);$.emitQuery({sql:z,parameters:H}),Q.call(J,z,H).then((A)=>V(null,A),(A)=>V(A));function V(A,F){if(A)return K(A);if(Array.isArray(F))F=F[F.length-1];K(null,{rowsAffected:F.affectedRows})}}}return QM0=X,QM0}var WM0,Fv1;function GI0(){if(Fv1)return WM0;Fv1=1;function $(Y){if(Y.toISOString)return"'"+Y.toISOString()+"'";return"'"+Y+"'"}return WM0=$,WM0}var ZM0,Dv1;function Rt(){if(Dv1)return ZM0;Dv1=1;function $(Y){let X=atob(Y),G=X.length,J=new Uint8Array(G);for(let Q=0;Q<G;Q++)J[Q]=X.charCodeAt(Q);return J}return ZM0=$,ZM0}var KM0,Nv1;function qt(){if(Nv1)return KM0;Nv1=1;function $(Y){let X="";for(let G=0;G<Y.length;G++)X+=String.fromCharCode(Y[G]);return btoa(X)}return KM0=$,KM0}var UM0,Lv1;function FP(){if(Lv1)return UM0;return Lv1=1,UM0=($)=>`"${$}"`,UM0}var HM0,Bv1;function JI0(){if(Bv1)return HM0;Bv1=1;let $="delete from %s %s%s",Y=UF(),X=FP();function G(J,Q,W){let Z=X(J._dbName);return Q=X(Q),Y($,Z,Q,W)}return HM0=G,HM0}var zM0,Ov1;function QI0(){if(Ov1)return zM0;Ov1=1;let $=g5();return zM0=function(Y){return" FOR UPDATE OF "+$(Y)},zM0}var VM0,Ev1;function WI0(){if(Ev1)return VM0;Ev1=1;function $(Y){if(Y.offset)return` limit ${X()} offset ${Y.offset}`;else if(Y.limit||Y.limit===0)return` limit ${Y.limit}`;else return"";function X(){if(Y.limit||Y.limit===0)return Y.limit;else return"all"}}return VM0=$,VM0}var AM0,Mv1;function ZI0(){if(Mv1)return AM0;Mv1=1;function $(Y,X){if(X)return`${X}."${Y._dbName}"::text`;else return`"${Y._dbName}"::text`}return AM0=$,AM0}var FM0,Rv1;function UJ8(){if(Rv1)return FM0;Rv1=1;let $=FP();function Y(X){let G="",J="RETURNING ";for(let Q=0;Q<X._columns.length;Q++)J+=G+$(X._columns[Q]._dbName),G=",";return J}return FM0=Y,FM0}var DM0,qv1;function KI0(){if(qv1)return DM0;qv1=1;let $=UJ8(),Y=FP();function X(G,J,Q,W){let Z=[],K="",H=[],z="INSERT INTO "+Y(J._dbName)+" ";if(A(),F(),Z.length===0)z+=`${N()}DEFAULT VALUES ${$(J)}`;else z=z+"("+Z.join(",")+") "+N()+"VALUES ("+H.join(",")+")"+V()+$(J);return z;function V(){if(W.concurrency==="skipOnConflict"||W.concurrency==="overwrite")return` ON CONFLICT(${J._primaryColumns.map((L)=>Y(L._dbName)).join(",")}) ${K} `;else return""}function A(){let D=J._columnDiscriminators;for(let L=0;L<D.length;L++){let B=D[L].split("=");Z.push(Y(B[0])),H.push(B[1])}}function F(){let D=[],L=J._columns;for(let O=0;O<L.length;O++){let E=L[O],M=Y(E._dbName);if(Q["__"+E.alias]!==void 0)Z.push(M),H.push("%s"),B(E)}if(D.length===0)K="DO NOTHING";else K="DO UPDATE SET "+D.join(",");function B(O){let E=W[O.alias]?.concurrency||W.concurrency,M=Y(O._dbName),R=Y(J._dbName);if(E==="overwrite")D.push(`${M}=EXCLUDED.${M}`);else if(E==="optimistic")D.push(`${M} = CASE WHEN ${R}.${M} <> EXCLUDED.${M} THEN CAST(random()::int || '12345678-1234-1234-1234-123456789012Conflict when updating ${M}12345678-1234-1234-1234-123456789012' AS INTEGER) ELSE ${R}.${M} END`)}}function N(){return""}}return DM0=X,DM0}var NM0,Iv1;function UI0(){if(Iv1)return NM0;Iv1=1;let $=VP(),Y=Jb(),X=WK();function G(J,Q,W,Z){let K=$(Y.bind(null,J),Q,W,Z);return K.disallowCompress=!0,X(J,[K]).then((H)=>H[H.length-1])}return NM0=G,NM0}var LM0,Pv1;function HJ8(){if(Pv1)return LM0;Pv1=1;var $=ZJ8(),Y=KJ8(),X=GI0();let G=Rt(),J=qt();var Q=JI0(),W=QI0(),Z=WI0(),K=ZI0(),H=KI0(),z=UI0(),V=FP();function A(F,N,{readonly:D=!1}={}){var L={poolFactory:N};if(!N.connect)N=N();if(L.engine="pg",L.encodeDate=X,L.encodeBinary=G,L.decodeBinary=J,L.formatDateOut=K,L.deleteFromSql=Q,L.selectForUpdateSql=W,L.lastInsertedIsSeparate=!1,L.insertSql=H,L.insert=z,L.multipleStatements=!0,L.limitAndOffset=Z,L.accept=function(B){B.visitPg()},L.aggregateCount=0,L.quote=V,L.cache={},D)return L.dbClient={executeQuery:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{$(F,M)(B,(q,w)=>{R(),O(q,w)})}catch(q){R(),O(q)}})},executeCommand:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{Y(F,M)(B,(q,w)=>{R(),O(q,w)})}catch(q){R(),O(q)}})}},F.rdb=L,(B)=>B();return function(B,O){N.connect(E);function E(M,R,q){try{if(M){O(M);return}R.executeQuery=$(F,R),R.executeCommand=Y(F,R),L.dbClient=R,L.dbClientDone=q,F.rdb=L,B()}catch(w){O(w)}}}}return LM0=A,LM0}var BM0,wv1;function zJ8(){if(wv1)return BM0;wv1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return BM0=Y,BM0}var OM0,_v1;function VJ8(){if(_v1)return OM0;_v1=1;let $=U5(),Y=ZK(),X=KK(),G;function J(Z,K={}){let{connStr:H,searchPath:z}=W(Z),V=X.Pool({min:K.min||0,max:K.size||K.poolSize||Y.poolSize,idleTimeoutMillis:K.idleTimeout||Y.poolIdleTimeout,reapIntervalMillis:K.reapIntervalMillis||Y.reapIntervalMillis,log:K.log,create:async(A)=>{try{if(!G)({PGlite:G}=await import("@electric-sql/pglite"));let F=H===void 0?new G:new G(H);F.poolCount=0,await Q(F,z),A(null,F)}catch(F){A(F,null)}},destroy:(A)=>{A._destroying=!0,A.poolCount=void 0,A.close()}});return V.connect=(A)=>{V.acquire((F,N)=>{if(F)return A(F,null,()=>{});N.poolCount++,A(null,N,(D)=>{D?V.destroy(N):V.release(N)})})},V}async function Q(Z,K){if(K){let H=`SET search_path TO ${K}`;$.emitQuery({sql:H,parameters:[]}),await Z.exec(H)}}function W(Z){let K=Z,H;if(typeof Z!=="string"||Z.length===0)return{connStr:K,searchPath:H};let z=Z.indexOf("?");if(z===-1)return{connStr:K,searchPath:H};let V=Z.slice(0,z),A=Z.slice(z+1),F=new URLSearchParams(A),N="search_path";H=F.get(N),F.delete(N);let D=F.toString();return K=D?`${V}?${D}`:V,{connStr:K,searchPath:H}}return OM0=J,OM0}var EM0,jv1;function AJ8(){if(jv1)return EM0;jv1=1;let $=gZ(),Y=A7(),X=zJ8(),G=VJ8(),J=HW();function Q(W,Z){let K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return EM0=Q,EM0}var MM0,Tv1;function FJ8(){if(Tv1)return MM0;Tv1=1;let $=hZ(),Y=HJ8(),X=fZ(),G=zW(),J=VW(),Q=AJ8(),W=Ot(),Z=Et(),K=QQ(),H=WQ(),z=rX(),V=fG(),A=nX();function F(N,D){D=D||{min:1};var L=Q(N,D);let B={poolFactory:L,hostLocal:H,express:K};return B.transaction=function(O,E){if(arguments.length===1&&typeof O==="function")E=O,O=void 0;let M=$();if(E)return M.run(R);else return M.run(w);async function R(){let P,_=Y(M,L,O);return await new Promise(_).then(q).then(I).then(()=>E(M)).then((C)=>P=C).then(()=>G(M)).then(null,(C)=>J(M,C)),P}function q(){return X(M,O)}function w(){let P,_=Y(M,L,O);return P=new Promise(_),P.then(q).then(I)}function I(P){let _=O&&O.schema;if(!_)return P;return Z(M,_)}},B.createTransaction=function(O){let E=$(),M=Y(E,L,O),R=E.run(()=>new Promise(M).then(w).then(I));function q(P){return R.then(E.run.bind(E,P))}function w(){return X(E,O)}function I(P){let _=O&&O.schema;if(!_)return P;return Z(E,_)}return q.rollback=J.bind(null,E),q.commit=G.bind(null,E),q},B.query=function(O){let E=$(),M=Y(E,L);return E.run(()=>new Promise(M).then(()=>A(E,"changes",[])).then(()=>z(E,O).then(q,w)));function q(I){return V(E),I}function w(I){throw V(E),I}},B.rollback=J,B.commit=G,B.lock=W,B.schema=Z,B.end=function(){if(D)return L.end();else return Promise.resolve()},B.accept=function(O){O.visitPg()},B}return MM0=F,MM0}var RM0,Cv1;function DJ8(){if(Cv1)return RM0;Cv1=1;let $=U5(),Y=AP(),X=UP();function G(Q,W){return Z;async function Z(K,H){try{$.emitQuery({sql:K.sql(),parameters:K.parameters});let z=Y(K,K.parameters),V=Array.isArray(K.parameters)?K.parameters:[],A=X(Q),F=A.transactionHandler;if(z.length<18&&V.length===0){let L=z.trim().toUpperCase();if(L==="BEGIN"||L==="BEGIN TRANSACTION"){if(F&&!F.closing)return H(Error("Already inside a transaction"),[]);J(W).then((B)=>{A.transactionHandler=B,H(null,[])},(B)=>H(B,[]));return}if(L==="COMMIT"){if(!F)return H(Error("Cannot commit outside transaction"),[]);try{F.closing=!0,F.resolve(),await F.settled,F.closed=!0,A.transactionHandler=void 0,H(null,[])}catch(B){F.closed=!0,A.transactionHandler=void 0,H(B,[])}return}if(L==="ROLLBACK"){if(!F)return H(Error("Cannot rollback outside transaction"),[]);try{F.closing=!0,F.reject(Error("__rollback__"));try{await F.settled}catch(B){if(B?.message!=="__rollback__")throw B}F.closed=!0,A.transactionHandler=void 0,H(null,[])}catch(B){F.closed=!0,A.transactionHandler=void 0,H(B,[])}return}}let N=F&&F.tx&&!F.closing?F.tx:W,D=V.length===0?await N.unsafe(z):await N.unsafe(z,V);H(null,D)}catch(z){H(z)}}}function J(Q){let W,Z,K,H,z=new Promise((F,N)=>{W=F,Z=N}),V=new Promise((F,N)=>{K=F,H=N}),A=Q.begin(async(F)=>{return K({tx:F,resolve:W,reject:Z,promise:z,settled:null,closing:!1,closed:!1}),z}).then(()=>{},(F)=>{if(F?.message!=="__rollback__")throw F});return A.then(null,()=>{}),V.then((F)=>{F.settled=A},()=>{}),A.catch((F)=>{if(!K)H?.(F)}),V}return RM0=G,RM0}var qM0,Sv1;function NJ8(){if(Sv1)return qM0;Sv1=1;let $=U5(),Y=AP(),X=UP();function G(Q,W){return Z;async function Z(K,H){try{$.emitQuery({sql:K.sql(),parameters:K.parameters});let z=Y(K,K.parameters),V=Array.isArray(K.parameters)?K.parameters:[],A=X(Q),F=A.transactionHandler;if(z.length<18&&V.length===0){let B=z.trim().toUpperCase();if(B==="BEGIN"||B==="BEGIN TRANSACTION"){if(F&&!F.closing)return H(Error("Already inside a transaction"),{rowsAffected:0});J(W).then((O)=>{A.transactionHandler=O,H(null,{rowsAffected:0})},(O)=>H(O,{rowsAffected:0}));return}if(B==="COMMIT"){if(!F)return H(Error("Cannot commit outside transaction"),{rowsAffected:0});try{F.closing=!0,F.resolve(),await F.settled,F.closed=!0,A.transactionHandler=void 0,H(null,{rowsAffected:0})}catch(O){F.closed=!0,A.transactionHandler=void 0,H(O,{rowsAffected:0})}return}if(B==="ROLLBACK"){if(!F)return H(Error("Cannot rollback outside transaction"),{rowsAffected:0});try{F.closing=!0,F.reject(Error("__rollback__"));try{await F.settled}catch(O){if(O?.message!=="__rollback__")throw O}F.closed=!0,A.transactionHandler=void 0,H(null,{rowsAffected:0})}catch(O){F.closed=!0,A.transactionHandler=void 0,H(O,{rowsAffected:0})}return}}let N=F&&F.tx&&!F.closing?F.tx:W,D=V.length===0?await N.unsafe(z):await N.unsafe(z,V),L=0;if(D!=null){if(typeof D.rowCount==="number")L=D.rowCount;else if(typeof D.count==="number")L=D.count;else if(typeof D.changes==="number")L=D.changes;else if(typeof D.affectedRows==="number")L=D.affectedRows}H(null,{rowsAffected:L})}catch(z){H(z,{rowsAffected:0})}}}function J(Q){let W,Z,K,H,z=new Promise((F,N)=>{W=F,Z=N}),V=new Promise((F,N)=>{K=F,H=N}),A=Q.begin(async(F)=>{return K({tx:F,resolve:W,reject:Z,promise:z,settled:null,closing:!1,closed:!1}),z}).then(()=>{},(F)=>{if(F?.message!=="__rollback__")throw F});return A.then(null,()=>{}),V.then((F)=>{F.settled=A},()=>{}),A.catch((F)=>{if(!K)H?.(F)}),V}return qM0=G,qM0}var IM0,kv1;function LJ8(){if(kv1)return IM0;kv1=1;function $(Y){return`${Y}::jsonb`}return IM0=$,IM0}var PM0,vv1;function bb1(){if(vv1)return PM0;vv1=1;function $(X){if(Array.isArray(X))return new Y(X);else return X}class Y{constructor(X){this.actualArray=X}toPostgres(){return JSON.stringify(this.actualArray)}}return PM0=$,PM0}var wM0,xv1;function BJ8(){if(xv1)return wM0;xv1=1;var $=DJ8(),Y=NJ8(),X=GI0();let G=Rt(),J=qt();var Q=JI0(),W=QI0(),Z=WI0(),K=ZI0(),H=LJ8(),z=bb1(),V=KI0(),A=UI0(),F=FP();function N(D,L,{readonly:B=!1}={}){var O={poolFactory:L};if(!L.connect)L=L(),O.pool=L;if(O.engine="pg",O.encodeDate=X,O.encodeBinary=G,O.decodeBinary=J,O.formatJSONIn=H,O.encodeJSON=z,O.formatDateOut=K,O.deleteFromSql=Q,O.selectForUpdateSql=W,O.lastInsertedIsSeparate=!1,O.insertSql=V,O.insert=A,O.multipleStatements=!0,O.limitAndOffset=Z,O.accept=function(E){E.visitPg()},O.aggregateCount=0,O.quote=F,O.cache={},B)return O.dbClient={executeQuery:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{$(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})},executeCommand:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{Y(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})}},D.rdb=O,(E)=>E();return function(E,M){L.connect(R);function R(q,w,I){try{if(q){M(q);return}w.executeQuery=$(D,w),w.executeCommand=Y(D,w),O.dbClient=w,O.dbClientDone=I,D.rdb=O,E()}catch(P){M(P)}}}}return wM0=N,wM0}var _M0,yv1;function OJ8(){if(yv1)return _M0;yv1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return _M0=Y,_M0}var jM0,bv1;function EJ8(){if(bv1)return jM0;bv1=1;let $=U5(),Y=ZK(),X=KK(),G;function J(W,Z={}){let K,H=W;try{let V=new URL(W),A=V.searchParams.has("search_path")?"search_path":V.searchParams.has("searchPath")?"searchPath":null;if(A)K=V.searchParams.get(A),V.searchParams.delete(A),H=V.toString()}catch{}let z=X.Pool({min:Z.min||0,max:Z.size||Z.poolSize||Y.poolSize,idleTimeoutMillis:Z.idleTimeout||Y.poolIdleTimeout,reapIntervalMillis:Z.reapIntervalMillis||Y.reapIntervalMillis,log:Z.log,create:async(V)=>{try{if(!G)({SQL:G}=awaitPromise.resolve(globalThis.Bun));let A=new G(H);A.poolCount=0,await Q(A,K),V(null,A)}catch(A){V(A,null)}},destroy:(V)=>{V._destroying=!0,V.poolCount=void 0,V.end()}});return z.connect=(V)=>{z.acquire((A,F)=>{if(A)return V(A,null,()=>{});F.poolCount++,V(null,F,(N)=>{N?z.destroy(F):z.release(F)})})},z}async function Q(W,Z){if(Z){let K=`SET search_path TO ${Z}`;$.emitQuery({sql:K,parameters:[]}),await W.unsafe(K)}}return jM0=J,jM0}var TM0,hv1;function MJ8(){if(hv1)return TM0;hv1=1;let $=gZ(),Y=A7(),X=OJ8(),G=EJ8(),J=HW();function Q(W,Z){let K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return TM0=Q,TM0}var CM0,fv1;function gv1(){if(fv1)return CM0;fv1=1;let $=hZ(),Y=BJ8(),X=fZ(),G=zW(),J=VW(),Q=MJ8(),W=Ot(),Z=Et(),K=QQ(),H=WQ(),z=rX(),V=fG(),A=nX();function F(N,D){if(!N)throw Error("Connection string cannot be empty");D=D||{min:1};var L=Q(N,D);let B={poolFactory:L,hostLocal:H,express:K};return B.transaction=function(O,E){if(arguments.length===1&&typeof O==="function")E=O,O=void 0;let M=$();if(E)return M.run(R);else return M.run(w);async function R(){let P,_=Y(M,L,O);return await new Promise(_).then(q).then(I).then(()=>E(M)).then((C)=>P=C).then(()=>G(M)).then(null,(C)=>J(M,C)),P}function q(){return X(M,O)}function w(){let P,_=Y(M,L,O);return P=new Promise(_),P.then(q).then(I)}function I(P){let _=O&&O.schema;if(!_)return P;return Z(M,_)}},B.createTransaction=function(O){let E=$(),M=Y(E,L,O),R=E.run(()=>new Promise(M).then(w).then(I));function q(P){return R.then(E.run.bind(E,P))}function w(){return X(E,O)}function I(P){let _=O&&O.schema;if(!_)return P;return Z(E,_)}return q.rollback=J.bind(null,E),q.commit=G.bind(null,E),q},B.query=function(O){let E=$(),M=Y(E,L);return E.run(()=>new Promise(M).then(()=>A(E,"changes",[])).then(()=>z(E,O).then(q,w)));function q(I){return V(E),I}function w(I){throw V(E),I}},B.rollback=J,B.commit=G,B.lock=W,B.schema=Z,B.end=function(){if(D)return L.end();else return Promise.resolve()},B.accept=function(O){O.visitPg()},B}return CM0=F,CM0}var SM0,mv1;function RJ8(){if(mv1)return SM0;mv1=1;var $=U5(),Y=AP();function X(G,J){var Q=J.query;return W;function W(Z,K){var H=Z.parameters;$.emitQuery({sql:Z.sql(),parameters:H});var z=Y(Z,H);Z={text:z,values:H,types:Z.types},Q.call(J,Z,V);function V(A,F){if(A)K(A);else{if(Array.isArray(F))F=F[F.length-1];K(null,F.rows)}}}}return SM0=X,SM0}var kM0,uv1;function qJ8(){if(uv1)return kM0;uv1=1;var $=U5(),Y=AP();function X(G,J){var Q=J.query;return W;function W(Z,K){var H=Z.parameters;$.emitQuery({sql:Z.sql(),parameters:H});var z=Y(Z,H);Z={text:z,values:H,types:Z.types},Q.call(J,Z,V);function V(A,F){if(A)K(A);else K(null,{rowsAffected:F.rowCount})}}}return kM0=X,kM0}var vM0,pv1;function IJ8(){if(pv1)return vM0;pv1=1;function $(Y){return Y.toString()}return vM0=$,vM0}var xM0,dv1;function PJ8(){if(dv1)return xM0;dv1=1;var $=RJ8(),Y=qJ8(),X=GI0(),G=IJ8(),J=JI0(),Q=QI0(),W=WI0(),Z=ZI0(),K=bb1(),H=KI0(),z=UI0(),V=FP();function A(F,N,{readonly:D=!1}={}){var L={poolFactory:N};if(!N.connect)N=N(),L.pool=N;if(L.engine="pg",L.encodeBoolean=G,L.encodeDate=X,L.encodeJSON=K,L.formatDateOut=Z,L.deleteFromSql=J,L.selectForUpdateSql=Q,L.lastInsertedIsSeparate=!1,L.insertSql=H,L.insert=z,L.multipleStatements=!0,L.limitAndOffset=W,L.accept=function(B){B.visitPg()},L.aggregateCount=0,L.quote=V,L.cache={},D)return L.dbClient={executeQuery:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{$(F,M)(B,(q,w)=>{R(),O(q,w)})}catch(q){R(),O(q)}})},executeCommand:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{Y(F,M)(B,(q,w)=>{R(),O(q,w)})}catch(q){R(),O(q)}})}},F.rdb=L,(B)=>B();return function(B,O){N.connect(E);function E(M,R,q){try{if(M){O(M);return}R.executeQuery=$(F,R),R.executeCommand=Y(F,R),L.dbClient=R,L.dbClientDone=q,F.rdb=L,B()}catch(w){O(w)}}}}return xM0=A,xM0}var yM0,cv1;function wJ8(){if(cv1)return yM0;cv1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return yM0=Y,yM0}var bM0,lv1;function _J8(){if(lv1)return bM0;lv1=1;function $(Y=""){let[,X]=Y.split("?");if(!X)return;return new URLSearchParams(X).get("search_path")}return bM0=$,bM0}var hM0,iv1;function jJ8(){if(iv1)return hM0;iv1=1;var $=U5(),Y=ZK(),X=KK(),G,J=_J8();function Q(Z,K){K=K||{};var H=X.Pool({min:K.min||0,max:K.size||K.poolSize||Y.poolSize,idleTimeoutMillis:K.idleTimeout||Y.poolIdleTimeout,reapIntervalMillis:K.reapIntervalMillis||Y.reapIntervalMillis,log:K.log,create:async function(z){try{if(!G)G=await Promise.resolve().then(() => (Vx(),OV1)),G=G.default||G,(G.types||G.types).setTypeParser(1700,function(F){return parseFloat(F)})}catch(A){return z(A,null)}var V=new G.Client(Z);V.connect(function(A){if(A)return z(A,null);V.on("error",function(F){if(H.emit("error",F,V),!V._destroying)H.destroy(V)}),V.on("end",function(F){if(!V._destroying)H.destroy(V)}),V.poolCount=0,W(V,Z,(F)=>z(F,V))})},destroy:function(z){z._destroying=!0,z.poolCount=void 0,z.end()}});return H.connect=function(z){H.acquire(function(V,A){if(V)return z(V,null,function(){});A.poolCount++,z(null,A,function(F){if(F)H.destroy(A);else H.release(A)})})},H}function W(Z,K,H){let z=J(K);if(z){let V=`set search_path to ${z}`;return $.emitQuery({sql:V,parameters:[]}),Z.query(V,H)}else H()}return hM0=Q,hM0}var fM0,nv1;function TJ8(){if(nv1)return fM0;nv1=1;let $=gZ(),Y=A7(),X=wJ8(),G=jJ8(),J=HW();function Q(W,Z){let K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return fM0=Q,fM0}var gM0,rv1;function av1(){if(rv1)return gM0;rv1=1;let $=hZ(),Y=PJ8(),X=fZ(),G=zW(),J=VW(),Q=TJ8(),W=Ot(),Z=Et(),K=QQ(),H=WQ(),z=rX(),V=fG(),A=nX();function F(N,D){if(!N)throw Error("Connection string cannot be empty");D=D||{min:1};var L=Q(N,D);let B={poolFactory:L,hostLocal:H,express:K};return B.transaction=function(O,E){if(arguments.length===1&&typeof O==="function")E=O,O=void 0;let M=$();if(E)return M.run(R);else return M.run(w);async function R(){let P,_=Y(M,L,O);return await new Promise(_).then(q).then(I).then(()=>E(M)).then((C)=>P=C).then(()=>G(M)).then(null,(C)=>J(M,C)),P}function q(){return X(M,O)}function w(){let P,_=Y(M,L,O);return P=new Promise(_),P.then(q).then(I)}function I(P){let _=O&&O.schema;if(!_)return P;return Z(M,_)}},B.createTransaction=function(O){let E=$(),M=Y(E,L,O),R=E.run(()=>new Promise(M).then(w).then(I));function q(P){return R.then(E.run.bind(E,P))}function w(){return X(E,O)}function I(P){let _=O&&O.schema;if(!_)return P;return Z(E,_)}return q.rollback=J.bind(null,E),q.commit=G.bind(null,E),q},B.query=function(O){let E=$(),M=Y(E,L);return E.run(()=>new Promise(M).then(()=>A(E,"changes",[])).then(()=>z(E,O).then(q,w)));function q(I){return V(E),I}function w(I){throw V(E),I}},B.rollback=J,B.commit=G,B.lock=W,B.schema=Z,B.end=function(){if(D)return L.end();else return Promise.resolve()},B.accept=function(O){O.visitPg()},B}return gM0=F,gM0}var mM0,sv1;function CJ8(){if(sv1)return mM0;sv1=1;let $=U5(),Y=new WeakMap;function X(G,J){let Q=Y.get(J);if(!Q)Q=new Map,Y.set(J,Q);return W;function W(Z,K){try{var H=Z.parameters,z=Z.sql();$.emitQuery({sql:z,parameters:H});let V=Q.get(z);if(!V)V=J.prepare(z),Q.set(z,V);let A=V.all.apply(V,H);K(null,A)}catch(V){K(V)}}}return mM0=X,mM0}var uM0,ov1;function SJ8(){if(ov1)return uM0;ov1=1;let $=U5(),Y=new WeakMap;function X(G,J){let Q=Y.get(J);if(!Q)Q=new Map,Y.set(J,Q);return W;function W(Z,K){try{var H=Z.parameters,z=Z.sql();$.emitQuery({sql:z,parameters:H});let V=Q.get(z);if(!V)V=J.prepare(z),Q.set(z,V);let A=V.run.apply(V,H);K(null,{rowsAffected:A.changes,lastInsertRowid:A.lastInsertRowid})}catch(V){K(V)}}}return uM0=X,uM0}var pM0,tv1;function It(){if(tv1)return pM0;tv1=1;function $(Y){if(Y)return 1;return 0}return pM0=$,pM0}var dM0,ev1;function DP(){if(ev1)return dM0;return ev1=1,dM0=($)=>`"${$}"`,dM0}var cM0,$x1;function Pt(){if($x1)return cM0;$x1=1;let $="delete from %s where %s.rowId in (SELECT %s.rowId FROM %s %s%s)",Y=UF(),X=DP();function G(J,Q,W){let Z=X(J._dbName);return Q=X(Q),Y($,Z,Z,Q,Z,Q,W)}return cM0=G,cM0}var lM0,Yx1;function wt(){if(Yx1)return lM0;Yx1=1;let $=g5();return lM0=function(Y,X){return" FOR UPDATE OF "+$(Y,X)},lM0}var iM0,Xx1;function _t(){if(Xx1)return iM0;Xx1=1;function $(Y,X,G){return G.map((J,Q)=>{let W=X._primaryColumns[Q];if(J===void 0&&(W.tsType==="NumberColumn"||W.tsType==="BigintColumn"))return"rowid IN (select last_insert_rowid())";else return W.eq(Y,J)})}return iM0=$,iM0}var nM0,Gx1;function jt(){if(Gx1)return nM0;Gx1=1;function $(Y){if(Y.offset)return` limit ${X()} offset ${Y.offset}`;else if(Y.limit||Y.limit===0)return` limit ${Y.limit}`;else return"";function X(){if(Y.limit||Y.limit===0)return Y.limit;else return"-1"}}return nM0=$,nM0}var rM0,Jx1;function Tt(){if(Jx1)return rM0;Jx1=1;let $=DP();function Y(X,G){let J=$(X._dbName);if(G)return`CAST(${G}.${J} AS TEXT)`;else return`CAST(${J} AS TEXT)`}return rM0=Y,rM0}var aM0,Qx1;function Ct(){if(Qx1)return aM0;Qx1=1;let $=DP();function Y(X,G,J,Q){let W=[],Z="",K=[],H="INSERT INTO "+$(G._dbName)+" ";if(V(),A(),W.length===0)H+="DEFAULT VALUES";else H=H+"("+W.join(",")+") VALUES ("+K.join(",")+")"+z();return H;function z(){if(Q.concurrency==="skipOnConflict"||Q.concurrency==="overwrite")return` ON CONFLICT(${G._primaryColumns.map((N)=>$(N._dbName)).join(",")}) ${Z}`;else return""}function V(){let F=G._columnDiscriminators;for(let N=0;N<F.length;N++){let D=F[N].split("=");W.push($(D[0])),K.push(D[1])}}function A(){let F=[],N=G._columns;for(let L=0;L<N.length;L++){let B=N[L],O=$(B._dbName);if(J["__"+B.alias]!==void 0)W.push(O),K.push("%s"),D(B)}if(F.length===0)Z="DO NOTHING";else Z="DO UPDATE SET "+F.join(",");function D(L){let B=Q[L.alias]?.concurrency||Q.concurrency,O=G._dbName,E=$(L._dbName);if(B==="overwrite")F.push(`${E}=excluded.${E}`);else if(B==="optimistic")F.push(`${E} = CASE WHEN ${O}.${E} <> excluded.${E} THEN '12345678-1234-1234-1234-123456789012Conflict when updating ${E}12345678-1234-1234-1234-123456789012' ELSE ${O}.${E} END`)}}}return aM0=Y,aM0}var sM0,Wx1;function St(){if(Wx1)return sM0;Wx1=1;let $=VP(),Y=Jb(),X=Mt(),G=WK(),J=jB();function Q(W,Z,K,H){let z=[],V=$(Y.bind(null,W),Z,K,H);V.disallowCompress=!0,J(W,V);let A=X(W,Z,K,V);return z.push(A),G(W,z).then((F)=>F[F.length-1])}return sM0=Q,sM0}var oM0,Zx1;function kJ8(){if(Zx1)return oM0;Zx1=1;let $=CJ8(),Y=SJ8(),X=It(),G=Rt(),J=qt(),Q=Pt(),W=wt(),Z=_t(),K=jt(),H=Tt(),z=Ct(),V=St(),A=DP();function F(D,L,{readonly:B=!1}={}){var O={poolFactory:L};if(!L.connect)L=L(),O.pool=L;if(O.engine="sqlite",O.encodeBoolean=X,O.encodeBinary=G,O.decodeBinary=J,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.formatBigintOut=H,O.deleteFromSql=Q,O.selectForUpdateSql=W,O.lastInsertedSql=Z,O.insertSql=z,O.insert=V,O.lastInsertedIsSeparate=!0,O.multipleStatements=!1,O.limitAndOffset=K,O.accept=function(E){E.visitSqlite()},O.aggregateCount=0,O.quote=A,O.cache={},B)return O.dbClient={executeQuery:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{$(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})},executeCommand:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{Y(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})}},D.rdb=O,(E)=>E();return function(E,M){L.connect(R);function R(q,w,I){try{if(q){M(q);return}w.executeQuery=$(D,w),w.executeCommand=Y(D,w),O.dbClient=w,O.dbClientDone=I,D.rdb=O,E()}catch(P){M(P)}}}}function N(D){return JSON.parse(D)}return oM0=F,oM0}var tM0,Kx1;function hb1(){if(Kx1)return tM0;Kx1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return tM0=Y,tM0}var eM0,Ux1;function vJ8(){if(Ux1)return eM0;Ux1=1;var $=ZK(),Y=KK(),X;function G(J,Q){Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log||$.poolLog,create:async function(Z){try{if(!X)X=await import("node:sqlite");var K=new X.DatabaseSync(J);K.poolCount=0,Z(null,K)}catch(H){return Z(H,null)}},destroy:function(Z){Z.poolCount=void 0,Z.close()}});return W.connect=function(Z){W.acquire(function(K,H){if(K)return Z(K,null,function(){});H.poolCount++,Z(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return eM0=G,eM0}var $R0,Hx1;function xJ8(){if(Hx1)return $R0;Hx1=1;let $=gZ(),Y=A7(),X=hb1(),G=vJ8(),J=HW();function Q(W,Z){let K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return $R0=Q,$R0}var YR0,zx1;function yJ8(){if(zx1)return YR0;zx1=1;let $=hZ(),Y=kJ8(),X=fZ(),G=zW(),J=VW(),Q=xJ8(),W=QQ(),Z=WQ(),K=rX(),H=fG(),z=nX();function V(A,F){if(!A)throw Error("Connection string cannot be empty");F=F||{min:1};var N=Q(A,F);let D={poolFactory:N,hostLocal:Z,express:W};return D.transaction=function(L,B){if(arguments.length===1&&typeof L==="function")B=L,L=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,L)}async function M(){let q,w=Y(O,N,L);return await new Promise(w).then(E).then(()=>B(O)).then((I)=>q=I).then(()=>G(O)).then(null,(I)=>J(O,I)),q}function R(){let q,w=Y(O,N,L);return q=new Promise(w),q.then(E)}},D.createTransaction=function(L){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,L)}},D.query=function(L){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>K(B,L).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(F)return N.end();else return Promise.resolve()},D.accept=function(L){L.visitSqlite()},D}return YR0=V,YR0}var XR0,Vx1;function bJ8(){if(Vx1)return XR0;Vx1=1;var $=U5();function Y(X,G){return J;function J(Q,W){try{var Z=Q.parameters,K=Q.sql();$.emitQuery({sql:K,parameters:Z});var H=G.query(K);let z=H.all.apply(H,Z);W(null,z)}catch(z){W(z)}}}return XR0=Y,XR0}var GR0,Ax1;function hJ8(){if(Ax1)return GR0;Ax1=1;var $=U5();function Y(X,G){return J;function J(Q,W){try{var Z=Array.isArray(Q.parameters)?Q.parameters:[],K=Q.sql();$.emitQuery({sql:K,parameters:Z});var H=G.query(K),z;if(Z.length===0)z=H.run();else z=H.run.apply(H,Z);var V=0;if(z&&typeof z.changes==="number")V=z.changes;else if(z&&typeof z.affectedRows==="number")V=z.affectedRows;W(null,{rowsAffected:V})}catch(A){W(A,{rowsAffected:0})}}}return GR0=Y,GR0}var JR0,Fx1;function fJ8(){if(Fx1)return JR0;Fx1=1;let $=bJ8(),Y=hJ8(),X=It(),G=Rt(),J=qt(),Q=Tt(),W=Pt(),Z=wt(),K=_t(),H=jt(),z=Ct(),V=St(),A=DP();function F(D,L,{readonly:B=!1}={}){var O={poolFactory:L};if(!L.connect)L=L(),O.pool=L;if(O.engine="sqlite",O.encodeBoolean=X,O.encodeBinary=G,O.decodeBinary=J,O.formatBigintOut=Q,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.deleteFromSql=W,O.selectForUpdateSql=Z,O.lastInsertedSql=K,O.insertSql=z,O.insert=V,O.lastInsertedIsSeparate=!0,O.multipleStatements=!1,O.limitAndOffset=H,O.accept=function(E){E.visitSqlite()},O.aggregateCount=0,O.quote=A,O.cache={},B)return O.dbClient={executeQuery:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{$(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})},executeCommand:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{Y(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})}},D.rdb=O,(E)=>E();return function(E,M){L.connect(R);function R(q,w,I){try{if(q){M(q);return}w.executeQuery=$(D,w),w.executeCommand=Y(D,w),O.dbClient=w,O.dbClientDone=I,D.rdb=O,E()}catch(P){M(P)}}}}function N(D){return JSON.parse(D)}return JR0=F,JR0}var QR0,Dx1;function gJ8(){if(Dx1)return QR0;Dx1=1;var $=ZK(),Y=KK(),X;function G(J,Q){Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log||$.poolLog,create:async function(Z){try{try{if(!X)({Database:X}=await import("bun:sqlite"))}catch(H){return Z(H,null)}var K=new X(J);K.poolCount=0,Z(null,K)}catch(H){return Z(H,null)}},destroy:function(Z){Z.poolCount=void 0,Z.close()}});return W.connect=function(Z){W.acquire(function(K,H){if(K)return Z(K,null,function(){});H.poolCount++,Z(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return QR0=G,QR0}var WR0,Nx1;function mJ8(){if(Nx1)return WR0;Nx1=1;let $=gZ(),Y=A7(),X=hb1(),G=gJ8(),J=HW();function Q(W,Z){let K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return WR0=Q,WR0}var ZR0,Lx1;function uJ8(){if(Lx1)return ZR0;Lx1=1;let $=hZ(),Y=fJ8(),X=fZ(),G=zW(),J=VW(),Q=mJ8(),W=QQ(),Z=WQ(),K=rX(),H=fG(),z=nX();function V(A,F){if(!A)throw Error("Connection string cannot be empty");F=F||{min:1};var N=Q(A,F);let D={poolFactory:N,hostLocal:Z,express:W};return D.transaction=function(L,B){if(arguments.length===1&&typeof L==="function")B=L,L=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,L)}async function M(){let q,w=Y(O,N,L);return await new Promise(w).then(E).then(()=>B(O)).then((I)=>q=I).then(()=>G(O)).then(null,(I)=>J(O,I)),q}function R(){let q,w=Y(O,N,L);return q=new Promise(w),q.then(E)}},D.createTransaction=function(L){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,L)}},D.query=function(L){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>K(B,L).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(F)return N.end();else return Promise.resolve()},D.accept=function(L){L.visitSqlite()},D}return ZR0=V,ZR0}var KR0,Bx1;function pJ8(){if(Bx1)return KR0;Bx1=1;let $=U5(),Y=new WeakMap;function X(G,J){let Q=Y.get(J);if(!Q)Q=new Map,Y.set(J,Q);return W;function W(Z,K){try{var H=Z.parameters,z=Z.sql();$.emitQuery({sql:z,parameters:H});let V=Q.get(z);if(!V)V=J.prepare(z),Q.set(z,V);if(V.reader){let A=V.all.apply(V,H);K(null,A)}else V.run.apply(V,H),K(null,[])}catch(V){K(V)}}}return KR0=X,KR0}var UR0,Ox1;function dJ8(){if(Ox1)return UR0;Ox1=1;var $=U5(),Y=new WeakMap;function X(G,J){var Q=Y.get(J);if(!Q)Q=new Map,Y.set(J,Q);return W;function W(Z,K){var H=Z.parameters,z=Z.sql();$.emitQuery({sql:z,parameters:H});try{var V=Q.get(z);if(!V)V=J.prepare(z),Q.set(z,V);var A=V.run.apply(V,H),F=A&&typeof A.changes==="number"?A.changes:0,N=A&&typeof A.lastInsertRowid<"u"?A.lastInsertRowid:void 0;if(typeof N<"u")K(null,{rowsAffected:F,lastInsertRowid:N});else K(null,{rowsAffected:F})}catch(D){K(D)}}}return UR0=X,UR0}var HR0,Ex1;function cJ8(){if(Ex1)return HR0;Ex1=1;let $=pJ8(),Y=dJ8(),X=It(),G=Pt(),J=wt(),Q=_t(),W=jt(),Z=Tt(),K=Ct(),H=St(),z=DP();function V(F,N,{readonly:D=!1}={}){var L={poolFactory:N};if(!N.connect)N=N(),L.pool=N;if(L.engine="sqlite",L.encodeBoolean=X,L.decodeJSON=A,L.encodeJSON=JSON.stringify,L.deleteFromSql=G,L.selectForUpdateSql=J,L.lastInsertedSql=Q,L.formatBigintOut=Z,L.insertSql=K,L.insert=H,L.lastInsertedIsSeparate=!0,L.multipleStatements=!1,L.limitAndOffset=W,L.accept=function(B){B.visitSqlite()},L.aggregateCount=0,L.quote=z,L.cache={},D)return L.dbClient={executeQuery:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{$(F,M)(B,(q,w)=>{R(),O(q,w)})}catch(q){R(),O(q)}})},executeCommand:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{Y(F,M)(B,(q,w)=>{R(),O(q,w)})}catch(q){R(),O(q)}})}},F.rdb=L,(B)=>B();return function(B,O){N.connect(E);function E(M,R,q){try{if(M){O(M);return}R.executeQuery=$(F,R),R.executeCommand=Y(F,R),L.dbClient=R,L.dbClientDone=q,F.rdb=L,B()}catch(w){O(w)}}}}function A(F){return JSON.parse(F)}return HR0=V,HR0}var zR0,Mx1;function lJ8(){if(Mx1)return zR0;Mx1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return zR0=Y,zR0}var VR0,Rx1;function iJ8(){if(Rx1)return VR0;Rx1=1;var $=ZK(),Y=KK(),X;function G(J,Q){Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log||$.poolLog,create:async function(Z){try{if(!X)X=await import("better-sqlite3");X=X.default||X}catch(H){return Z(H,null)}try{var K=new X(J);return K.poolCount=0,Z(null,K)}catch(H){return Z(H,null)}},destroy:function(Z){Z.poolCount=void 0,Z.close()}});return W.connect=function(Z){W.acquire(function(K,H){if(K)return Z(K,null,function(){});H.poolCount++,Z(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return VR0=G,VR0}var AR0,qx1;function nJ8(){if(qx1)return AR0;qx1=1;let $=gZ(),Y=A7(),X=lJ8(),G=iJ8(),J=HW();function Q(W,Z){let K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return AR0=Q,AR0}var FR0,Ix1;function rJ8(){if(Ix1)return FR0;Ix1=1;let $=hZ(),Y=cJ8(),X=fZ(),G=zW(),J=VW(),Q=nJ8(),W=QQ(),Z=WQ(),K=rX(),H=fG(),z=nX();function V(A,F){if(!A)throw Error("Connection string cannot be empty");F=F||{min:1};var N=Q(A,F);let D={poolFactory:N,hostLocal:Z,express:W};return D.transaction=function(L,B){if(arguments.length===1&&typeof L==="function")B=L,L=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,L)}async function M(){let q,w=Y(O,N,L);return await new Promise(w).then(E).then(()=>B(O)).then((I)=>q=I).then(()=>G(O)).then(null,(I)=>J(O,I)),q}function R(){let q,w=Y(O,N,L);return q=new Promise(w),q.then(E)}},D.createTransaction=function(L){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,L)}},D.query=function(L){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>K(B,L).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(F)return N.end();else return Promise.resolve()},D.accept=function(L){L.visitSqlite()},D}return FR0=V,FR0}var DR0,Px1;function aJ8(){if(Px1)return DR0;Px1=1;var $=U5();function Y(X,G){return J;function J(Q,W){var Z=Q.parameters,K=Q.sql();$.emitQuery({sql:K,parameters:Z}),G.d1.prepare(K,Z).bind(...Z).all().then(H,W);function H(z){W(null,z.results)}}}return DR0=Y,DR0}var NR0,wx1;function sJ8(){if(wx1)return NR0;wx1=1;var $=U5();function Y(X,G){return J;function J(Q,W){var Z=Array.isArray(Q.parameters)?Q.parameters:[],K=Q.sql();$.emitQuery({sql:K,parameters:Z}),G.d1.prepare(K).bind.apply(null,Z).run().then(H,(z)=>W(z,{rowsAffected:0}));function H(z){var V=0;if(z){if(typeof z.changes==="number")V=z.changes;else if(typeof z.meta==="object"&&z.meta&&typeof z.meta.changes==="number")V=z.meta.changes;else if(typeof z.affectedRows==="number")V=z.affectedRows}W(null,{rowsAffected:V})}}}return NR0=Y,NR0}var LR0,_x1;function oJ8(){if(_x1)return LR0;_x1=1;let $=aJ8(),Y=sJ8(),X=It(),G=Tt(),J=Pt(),Q=wt(),W=_t(),Z=jt(),K=Ct(),H=St();function z(A,F,{readonly:N=!1}={}){var D={poolFactory:F};if(!F.connect)F=F(),D.pool=F;if(D.engine="sqlite",D.maxParameters=100,D.encodeBoolean=X,D.decodeJSON=V,D.encodeJSON=JSON.stringify,D.formatBigintOut=G,D.deleteFromSql=J,D.selectForUpdateSql=Q,D.lastInsertedSql=W,D.insertSql=K,D.insert=H,D.lastInsertedIsSeparate=!0,D.multipleStatements=!1,D.limitAndOffset=Z,D.accept=function(L){L.visitSqlite()},D.aggregateCount=0,D.quote=(L)=>`"${L}"`,D.cache={},N)return D.dbClient={executeQuery:function(L,B){F.connect((O,E,M)=>{if(O)return B(O);try{$(A,E)(L,(R,q)=>{M(),B(R,q)})}catch(R){M(),B(R)}})},executeCommand:function(L,B){F.connect((O,E,M)=>{if(O)return B(O);try{Y(A,E)(L,(R,q)=>{M(),B(R,q)})}catch(R){M(),B(R)}})}},A.rdb=D,(L)=>L();return function(L,B){F.connect(O);function O(E,M,R){try{if(E){B(E);return}M.executeQuery=$(A,M),M.executeCommand=Y(A,M),D.dbClient=M,D.dbClientDone=R,A.rdb=D,L()}catch(q){B(q)}}}}function V(A){return JSON.parse(A)}return LR0=z,LR0}var BR0,jx1;function tJ8(){if(jx1)return BR0;jx1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return BR0=Y,BR0}var OR0,Tx1;function eJ8(){if(Tx1)return OR0;Tx1=1;var $=ZK(),Y=KK();function X(G,J){J=J||{};var Q=Y.Pool({min:J.min||0,max:1,idleTimeoutMillis:J.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:J.reapIntervalMillis||$.reapIntervalMillis,log:J.log||$.poolLog,create:function(W){var Z={d1:G,poolCount:0};return W(null,Z)},destroy:function(){}});return Q.connect=function(W){Q.acquire(function(Z,K){if(Z)return W(Z,null,function(){});K.poolCount++,W(null,K,function(H){if(H)Q.destroy(K);else Q.release(K)})})},Q}return OR0=X,OR0}var ER0,Cx1;function $Q8(){if(Cx1)return ER0;Cx1=1;let $=gZ(),Y=A7(),X=tJ8(),G=eJ8(),J=HW();function Q(W,Z){var K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return ER0=Q,ER0}var MR0,Sx1;function YQ8(){if(Sx1)return MR0;Sx1=1;let $=hZ(),Y=oJ8(),X=fZ(),G=zW(),J=VW(),Q=$Q8(),W=QQ(),Z=WQ(),K=rX(),H=fG(),z=nX();function V(A,F){if(!A)throw Error("Missing d1Database");F=F||{min:1};var N=Q(A,F);let D={poolFactory:N,hostLocal:Z,express:W};return D.transaction=function(L,B){if(arguments.length===1&&typeof L==="function")B=L,L=void 0;let O=$();if(B)return O.run(E);else return O.run(R);async function E(){let q,w=Y(O,N,L);return await new Promise(w).then(M).then(()=>B(O)).then((I)=>q=I).then(()=>D.commit(O)).then(null,(I)=>D.rollback(O,I)),q}function M(){return X(O,!0)}function R(){let q,w=Y(O,N,L);return q=new Promise(w),q.then(M)}},D.createTransaction=function(L){let B=$(),O=Y(B,N,L),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(B.run.bind(B,q))}function R(){return X(B,L)}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M},D.query=function(L){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>K(B,L).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(F)return N.end();else return Promise.resolve()},D.accept=function(L){L.visitSqlite()},D}return MR0=V,MR0}var RR0,kx1;function fb1(){if(kx1)return RR0;kx1=1;var $=U5(),Y=g6();function X(Q,W){var Z=W.query;return K;function K(H,z){var V=H.parameters,A=H.sql();$.emitQuery({sql:A,parameters:V});let F=[],N=[];if(Y(Q,"engine")==="sap"){let O=W.msnodesqlv8,E=/EXECUTE\s+/i.test(A)||/EXEC\s+/i.test(A),M=[];for(let R=0;R<V.length;R++){let q=V[R];if(typeof q==="string"){let w=Buffer.from(q,"utf8").length;if(G(q)){let I=J(q);if(E){let P=`@hex_param_${R}`,_=`CONVERT(VARCHAR(${w}), CONVERT(VARBINARY(${w}), 0x${I}))`;M.push({declaration:`DECLARE ${P} VARCHAR(${w})`,assignment:`SET ${P} = ${_}`}),F.push({index:R,replacement:P})}else{let P=`CONVERT(VARCHAR(${w}), CONVERT(VARBINARY(${w}), 0x${I}))`;F.push({index:R,replacement:P})}N.push(R)}else V[R]=O.VarChar(q,w)}}if(F.length>0){let R=0;if(A=A.replace(/\?/g,(q)=>{let w=F.find((I)=>I.index===R);if(R++,w)return w.replacement;return q}),E&&M.length>0){let q=A.split(`
`),w=0;for(let _=0;_<q.length;_++)if(/^\s*DECLARE\s+/i.test(q[_]))w=_+1;let I=M.map((_)=>_.declaration),P=M.map((_)=>_.assignment);q.splice(w,0,...I,...P),A=q.join(`
`)}}N.reverse().forEach((R)=>{V.splice(R,1)})}Z.call(W,A,V,B);let L=[];function B(O,E,M){if(O){if(O.code&&O.code!==3604)z(O);if(E)L.push(E);return}if(L.push(E),!M)if(L.length===1)z(null,L[0]);else z(null,L)}}}function G(Q){return/[\u0080-\uFFFF]/.test(Q)}function J(Q){return Buffer.from(Q,"utf8").toString("hex")}return RR0=X,RR0}var qR0,vx1;function gb1(){if(vx1)return qR0;vx1=1;var $=U5(),Y=g6();function X(Q,W){var Z=W.query;return K;function K(H,z){var V=H.parameters,A=H.sql();$.emitQuery({sql:A,parameters:V});let F=[],N=[];if(Y(Q,"engine")==="sap"){let E=W.msnodesqlv8,M=/EXECUTE\s+/i.test(A)||/EXEC\s+/i.test(A),R=[];for(let q=0;q<V.length;q++){let w=V[q];if(typeof w==="string"){let I=Buffer.from(w,"utf8").length;if(G(w)){let P=J(w);if(M){let _=`@hex_param_${q}`,C=`CONVERT(VARCHAR(${I}), CONVERT(VARBINARY(${I}), 0x${P}))`;R.push({declaration:`DECLARE ${_} VARCHAR(${I})`,assignment:`SET ${_} = ${C}`}),F.push({index:q,replacement:_})}else{let _=`CONVERT(VARCHAR(${I}), CONVERT(VARBINARY(${I}), 0x${P}))`;F.push({index:q,replacement:_})}N.push(q)}else V[q]=E.VarChar(w,I)}}if(F.length>0){let q=0;if(A=A.replace(/\?/g,(w)=>{let I=F.find((P)=>P.index===q);if(q++,I)return I.replacement;return w}),M&&R.length>0){let w=A.split(`
`),I=0;for(let C=0;C<w.length;C++)if(/^\s*DECLARE\s+/i.test(w[C]))I=C+1;let P=R.map((C)=>C.declaration),_=R.map((C)=>C.assignment);w.splice(I,0,...P,..._),A=w.join(`
`)}}N.reverse().forEach((q)=>{V.splice(q,1)})}let L=0,B=Z.call(W,A,V,O);if(B&&typeof B.on==="function")B.on("rowcount",(E)=>{if(typeof E==="number")L+=E});function O(E,M,R){if(E){if(E.code&&E.code!==3604){z(E,{rowsAffected:0});return}}if(!R)z(null,{rowsAffected:L})}}}function G(Q){return/[\u0080-\uFFFF]/.test(Q)}function J(Q){return Buffer.from(Q,"utf8").toString("hex")}return qR0=X,qR0}var IR0,xx1;function mb1(){if(xx1)return IR0;xx1=1;function $(Y){if(Y)return 1;return 0}return IR0=$,IR0}var PR0,yx1;function NP(){if(yx1)return PR0;return yx1=1,PR0=($)=>`[${$}]`,PR0}var wR0,bx1;function ub1(){if(bx1)return wR0;bx1=1;let $="delete %s from %s as %s%s",Y=UF(),X=NP();function G(J,Q,W){let Z=X(J._dbName);return Q=X(Q),Y($,Q,Z,Q,W)}return wR0=G,wR0}var _R0,hx1;function pb1(){if(hx1)return _R0;hx1=1;let $=g5();return _R0=function(Y){return" FOR UPDATE OF "+$(Y)},_R0}var jR0,fx1;function db1(){if(fx1)return jR0;fx1=1;function $(Y){if(Y.offset)return` OFFSET ${Y.offset} ROWS${X()}`;else return"";function X(){if(Y.limit||Y.limit===0)return` FETCH NEXT ${Y.limit} ROW ONLY`;else return""}}return jR0=$,jR0}var TR0,gx1;function cb1(){if(gx1)return TR0;gx1=1;let $=NP();function Y(X,G){if(G)return`CONVERT(VARCHAR, ${G}.${$(X._dbName)}, 126)`;else return`CONVERT(VARCHAR, ${$(X._dbName)}, 126)`}return TR0=Y,TR0}var CR0,mx1;function lb1(){if(mx1)return CR0;mx1=1;let $=NP();function Y(X,G){let J=$(X._dbName);if(G)return`CAST(${G}.${J} AS NVARCHAR(20))`;else return`CAST(${J} AS NVARCHAR(20))`}return CR0=Y,CR0}var SR0,ux1;function XQ8(){if(ux1)return SR0;ux1=1;function $(Y){return`CONVERT(BIGINT, ${Y})`}return SR0=$,SR0}var kR0,px1;function ib1(){if(px1)return kR0;px1=1;function $(Y,X){if(X)return`JSON_QUERY(${X}.[${Y._dbName}])`;else return`JSON_QUERY([${Y._dbName}])`}return kR0=$,kR0}var vR0,dx1;function nb1(){if(dx1)return vR0;dx1=1;function $(Y,X){let G="",J="OUTPUT ";for(let W=0;W<X._columns.length;W++)J+=G+Q(X._columns[W]),G=",";return J;function Q(W){if(W.formatOut)return W.formatOut(Y,"INSERTED");else return`INSERTED.[${W._dbName}]`}}return vR0=$,vR0}var xR0,cx1;function GQ8(){if(cx1)return xR0;cx1=1;let $=nb1();function Y(X,G,J,Q){let W=[],Z="",K=[];N(),D();let H=A(),z;if(H)z=`MERGE INTO [${G._dbName}] AS target USING (SELECT ${K.join(",")}) AS source ON ${V()} WHEN MATCHED THEN ${H} WHEN NOT MATCHED THEN ${F()} ${$(X,G)};`;else z=`MERGE INTO [${G._dbName}] AS target USING (SELECT ${K.join(",")}) AS source ON ${V()} WHEN NOT MATCHED THEN ${F()} ${$(X,G)};`;return z;function V(){let L=G._columnDiscriminators.map((O)=>{let E=`[${O.split("=")[0]}]`;return`target.${E}=source.${E}`}),B=G._primaryColumns.map((O)=>`target.[${O._dbName}]=source.[${O._dbName}]`);return[...L,...B].join(" AND ")}function A(){if(Q.concurrency==="skipOnConflict"||Q.concurrency==="overwrite")return Z;else return""}function F(){return`INSERT (${W.join(",")}) VALUES (${W.map((L)=>"source."+L)})`}function N(){let L=G._columnDiscriminators;for(let B=0;B<L.length;B++){let O=L[B].split("=");W.push(`[${O[0]}]`),K.push(`${O[1]} AS ${[O[0]]}`)}}function D(){let L=[],B=G._columns;for(let E=0;E<B.length;E++){let M=B[E];if(J["__"+M.alias]!==void 0)W.push(`[${M._dbName}]`),K.push(`%s AS [${M.alias}]`),O(M)}if(L.length>0)Z="UPDATE SET "+L.join(",");function O(E){let M=Q[E.alias]?.concurrency||Q.concurrency;if(M==="overwrite")L.push(`target.[${E._dbName}]=source.[${E._dbName}]`);else if(M==="optimistic")L.push(`target.[${E._dbName}] = CASE WHEN target.[${E._dbName}] <> source.[${E._dbName}] THEN CAST('12345678-1234-1234-1234-123456789012Conflict when updating [${E._dbName}]12345678-1234-1234-1234-123456789012' AS INTEGER) ELSE target.[${E._dbName}] END`)}}}return xR0=Y,xR0}var yR0,lx1;function rb1(){if(lx1)return yR0;lx1=1;let $=nb1(),Y=GQ8();function X(Q,W,Z,K){if(G(W,K)&&H())return Y.apply(null,[...arguments]);else return J.apply(null,[...arguments]);function H(){for(let z in Z){let V=W[z]?.alias;if(V&&Z["__"+V]!==void 0&&W[z]?.equal)return!0}}}function G(Q,W){for(let Z=0;Z<Q._primaryColumns.length;Z++){let K=W[Q._primaryColumns[Z]]?.concurrency;if(K==="skipOnConflict"||K==="overwrite")return!0}return W.concurrency==="skipOnConflict"||W.concurrency==="overwrite"}function J(Q,W,Z){let K=[],H=[],z=`INSERT INTO [${W._dbName}] `;if(V(),A(),K.length===0)z+=`${F()}DEFAULT VALUES`;else z=z+"("+K.join(",")+")"+F()+"VALUES ("+H.join(",")+")";return z;function V(){let N=W._columnDiscriminators;for(let D=0;D<N.length;D++){let L=N[D].split("=");K.push(`[${L[0]}]`),H.push(L[1])}}function A(){let N=W._columns;for(let D=0;D<N.length;D++){let L=N[D];if(Z["__"+L.alias]!==void 0)K.push(`[${L._dbName}]`),H.push("%s")}}function F(){return" "+$(Q,W)+" "}}return yR0=X,yR0}var bR0,ix1;function ab1(){if(ix1)return bR0;ix1=1;let $=VP(),Y=Jb(),X=WK();async function G(J,Q,W,Z){let K=$(Y.bind(null,J),Q,W,Z);return K.disallowCompress=!0,X(J,[K]).then((H)=>H[H.length-1])}return bR0=G,bR0}var hR0,nx1;function JQ8(){if(nx1)return hR0;nx1=1;var $=fb1(),Y=gb1(),X=mb1(),G=ub1(),J=pb1();let Q=db1(),W=cb1(),Z=lb1(),K=XQ8(),H=ib1(),z=rb1(),V=ab1(),A=NP();function F(D,L,{readonly:B=!1}={}){var O={poolFactory:L};if(!L.connect)L=L(),O.pool=L;if(O.engine="mssqlNative",O.encodeBoolean=X,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.formatDateOut=W,O.formatBigintOut=Z,O.formatBigintIn=K,O.formatJSONOut=H,O.deleteFromSql=G,O.selectForUpdateSql=J,O.insertSql=z,O.insert=V,O.lastInsertedIsSeparate=!1,O.multipleStatements=!0,O.begin="BEGIN TRANSACTION",O.limit=(E)=>{if(E.offset)return"";else if(E.limit||E.limit===0)return"TOP "+E.limit;else return""},O.limitAndOffset=Q,O.accept=function(E){E.visitSqlite()},O.aggregateCount=0,O.quote=A,O.cache={},B)return O.dbClient={executeQuery:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{q.setUseUTC(!1),$(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})},executeCommand:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{q.setUseUTC(!1),Y(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})}},D.rdb=O,(E)=>E();return function(E,M){L.connect(R);function R(q,w,I){try{if(q){M(q);return}w.setUseUTC(!1),w.executeQuery=$(D,w),w.executeCommand=Y(D,w),O.dbClient=w,O.dbClientDone=I,D.rdb=O,E()}catch(P){M(P)}}}}function N(D){return JSON.parse(D)}return hR0=F,hR0}var fR0,rx1;function QQ8(){if(rx1)return fR0;rx1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return fR0=Y,fR0}var gR0,ax1;function sb1(){if(ax1)return gR0;ax1=1;var $=ZK(),Y=KK(),X;function G(J,Q){Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log||$.poolLog,create:async function(Z){try{if(!X)X=await import("msnodesqlv8")}catch(z){return Z(z,null)}var K;X.open(J,H);function H(z,V){if(z)return Z(z,null);return K=V,K.poolCount=0,K.msnodesqlv8=X,Z(null,K)}},destroy:function(Z){Z.poolCount=void 0,Z.close()}});return W.connect=function(Z){W.acquire(function(K,H){if(K)return Z(K,null,function(){});H.poolCount++,Z(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return gR0=G,gR0}var mR0,sx1;function WQ8(){if(sx1)return mR0;sx1=1;let $=gZ();var Y=A7(),X=QQ8(),G=sb1(),J=HW();function Q(W,Z){var K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return mR0=Q,mR0}var uR0,ox1;function ZQ8(){if(ox1)return uR0;ox1=1;let $=hZ(),Y=JQ8(),X=fZ(),G=zW(),J=VW(),Q=WQ8(),W=QQ(),Z=WQ(),K=rX(),H=fG(),z=nX();function V(A,F){if(!A)throw Error("Connection string cannot be empty");F=F||{min:1};var N=Q(A,F);let D={poolFactory:N,hostLocal:Z,express:W};return D.transaction=function(L,B){if(arguments.length===1&&typeof L==="function")B=L,L=void 0;let O=$();if(B)return O.run(E);else return O.run(R);async function E(){let q,w=Y(O,N,L);return await new Promise(w).then(M).then(()=>B(O)).then((I)=>q=I).then(()=>D.commit(O)).then(null,(I)=>D.rollback(O,I)),q}function M(){return X(O,L)}function R(){let q,w=Y(O,N,L);return q=new Promise(w),q.then(M)}},D.createTransaction=function(L){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(B.run.bind(B,q))}function R(){return X(B,L)}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M},D.query=function(L){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>K(B,L).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(F)return N.end();else return Promise.resolve()},D.accept=function(L){L.visitSqlite()},D}return uR0=V,uR0}var pR0,tx1;function KQ8(){if(tx1)return pR0;tx1=1;var $=U5();function Y(Q,W){let Z=null,K=null;return H;function H(V,A){if(!Z||!K)import("tedious").then(({Request:F,TYPES:N})=>{Z=F,K=N,z(V,A)}).catch((F)=>A(X(F),[]));else z(V,A)}function z(V,A){let F=[],N=[],D=!1;$.emitQuery({sql:V.sql(),parameters:V.parameters});let L=G(V.sql(),V.parameters);if(L.length<18&&V.parameters.length===0){if(L==="BEGIN TRANSACTION"){W.beginTransaction((M)=>{A(X(M),[])});return}else if(L==="COMMIT"){W.commitTransaction((M)=>{A(X(M),[])});return}else if(L==="ROLLBACK"){W.rollbackTransaction((M)=>{A(X(M),[])});return}}let B;var O=new Z(L,E);J(O,V.parameters,K),O.on("row",(M)=>{let R={};if(!B)B=Object.keys(M);B.forEach((q)=>{R[q]=M[q].value}),N.push(R),D=!0}),O.on("columnMetadata",(M)=>{D=!0}),O.on("doneInProc",(M,R)=>{if(D)F.push(N),N=[],B=null,D=!1}),O.on("doneProc",(M,R)=>{if(D)F.push(N),N=[],D=!1}),W.execSql(O);function E(M){if(M)A(X(M));else{if(D)F.push(N);if(F.length===0)A(null,[]);else if(F.length===1)A(null,F[0]);else A(null,F)}}}}function X(Q){if(Q&&Q.errors)return Q.errors[0];else return Q}function G(Q,W){if(W.length===0)return Q;var Z=Q.split("?");Q="";var K=Z.length-1;for(var H=0;H<K;H++)Q+=Z[H]+"@"+H;return Q+=Z[K],Q}function J(Q,W,Z){let K=[];for(let z=0;z<W.length;z++){let V=[`${z}`,H(W[z]),W[z]];Q.addParameter.apply(Q,V),K.push(V)}return K;function H(z){if(typeof z==="string")return Z.VarChar;else if(Number.isInteger(z))if(z>=-2147483648&&z<=2147483647)return Z.Int;else return Z.BigInt;else if(typeof z==="number")return Z.Money;else if(z instanceof Date&&!isNaN(z))return Z.Date;else if(Array.isArray(z))return Z.NVarChar;else if(Buffer.isBuffer(z))return Z.VarBinary;else if(typeof z==="object"&&z instanceof Object)return Z.NVarChar;else throw Error("Unknown data type")}}return pR0=Y,pR0}var dR0,ex1;function UQ8(){if(ex1)return dR0;ex1=1;var $=U5();function Y(Q,W){let Z=null,K=null;return H;function H(V,A){if(!Z||!K)import("tedious").then(({Request:F,TYPES:N})=>{Z=F,K=N,z(V,A)}).catch((F)=>A(X(F),{rowsAffected:0}));else z(V,A)}function z(V,A){$.emitQuery({sql:V.sql(),parameters:V.parameters});let F=G(V.sql(),V.parameters);if(F.length<18&&V.parameters.length===0){if(F==="BEGIN TRANSACTION"){W.beginTransaction((B)=>{if(B)return A(X(B),{rowsAffected:0});return A(null,{rowsAffected:0})});return}else if(F==="COMMIT"){W.commitTransaction((B)=>{if(B)return A(X(B),{rowsAffected:0});return A(null,{rowsAffected:0})});return}else if(F==="ROLLBACK"){W.rollbackTransaction((B)=>{if(B)return A(X(B),{rowsAffected:0});return A(null,{rowsAffected:0})});return}}let N=0;var D=new Z(F,L);J(D,V.parameters,K),D.on("doneInProc",(B)=>{if(typeof B==="number")N+=B}),D.on("doneProc",(B)=>{if(typeof B==="number")N+=B}),D.on("done",(B)=>{if(typeof B==="number")N+=B}),W.execSql(D);function L(B){if(B)return A(X(B),{rowsAffected:0});return A(null,{rowsAffected:N})}}}function X(Q){if(Q&&Q.errors)return Q.errors[0];else return Q}function G(Q,W){if(W.length===0)return Q;var Z=Q.split("?");Q="";var K=Z.length-1;for(var H=0;H<K;H++)Q+=Z[H]+"@"+H;return Q+=Z[K],Q}function J(Q,W,Z){let K=[];for(let z=0;z<W.length;z++){let V=[`${z}`,H(W[z]),W[z]];Q.addParameter.apply(Q,V),K.push(V)}return K;function H(z){if(typeof z==="string")return Z.VarChar;else if(Number.isInteger(z))if(z>=-2147483648&&z<=2147483647)return Z.Int;else return Z.BigInt;else if(typeof z==="number")return Z.Money;else if(z instanceof Date&&!isNaN(z))return Z.Date;else if(Array.isArray(z))return Z.NVarChar;else if(Buffer.isBuffer(z))return Z.VarBinary;else if(typeof z==="object"&&z instanceof Object)return Z.NVarChar;else throw Error("Unknown data type")}}return dR0=Y,dR0}var cR0,$y1;function HQ8(){if($y1)return cR0;$y1=1;let $=NP();function Y(X,G){if(G)return`FORMAT(${G}.${$(X._dbName)}, 'yyyy-MM-ddTHH:mm:sszzz')`;else return`FORMAT(${$(X._dbName)}, 'yyyy-MM-ddTHH:mm:sszzz')`}return cR0=Y,cR0}var lR0,Yy1;function zQ8(){if(Yy1)return lR0;Yy1=1;var $=KQ8(),Y=UQ8(),X=mb1(),G=ub1(),J=pb1();let Q=db1(),W=rb1(),Z=cb1(),K=HQ8(),H=lb1(),z=ib1(),V=ab1(),A=NP();function F(D,L,{readonly:B=!1}={}){var O={poolFactory:L};if(!L.connect)L=L(),O.pool=L;if(O.engine="mssql",O.encodeBoolean=X,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.deleteFromSql=G,O.selectForUpdateSql=J,O.lastInsertedIsSeparate=!1,O.insertSql=W,O.insert=V,O.formatDateOut=Z,O.formatDateTzOut=K,O.formatBigintOut=H,O.formatJSONOut=z,O.multipleStatements=!0,O.begin="BEGIN TRANSACTION",O.limit=(E)=>{if(E.offset)return"";else if(E.limit||E.limit===0)return"TOP "+E.limit;else return""},O.limitAndOffset=Q,O.accept=function(E){E.visitSqlite()},O.aggregateCount=0,O.quote=A,O.cache={},B)return O.dbClient={executeQuery:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{$(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})},executeCommand:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{Y(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})}},D.rdb=O,(E)=>E();return function(E,M){L.connect(R);function R(q,w,I){try{if(q){M(q);return}w.executeQuery=$(D,w),w.executeCommand=Y(D,w),O.dbClient=w,O.dbClientDone=I,D.rdb=O,E()}catch(P){M(P)}}}}function N(D){return JSON.parse(D)}return lR0=F,lR0}var iR0,Xy1;function VQ8(){if(Xy1)return iR0;Xy1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return iR0=Y,iR0}var AQ8=PB(o$8),nR0,Gy1;function FQ8(){if(Gy1)return nR0;Gy1=1;var{parseConnectionString:$}=AQ8;function Y(X){let G={options:{useUTC:!1},authentication:{type:"default",options:{}}},J=$(X);for(let Q in J){let W=J[Q];switch(Q){case"uid":G.authentication.options.userName=W;break;case"pwd":G.authentication.options.password=W;break;case"server":if(G.server=W.split(",")[0],W.split(",")[1]!==void 0)G.options.port=Number.parseInt(W.split(",")[1]);break;case"database":G.options.database=W;break;case"trustservercertificate":G.options.trustServerCertificate=W.toLowerCase()==="yes";break;case"app":G.options.appName=W;break;case"appname":G.options.appName=W;break}}return G}return nR0=Y,nR0}var rR0,Jy1;function DQ8(){if(Jy1)return rR0;Jy1=1;var $=ZK(),Y=KK(),X,G=FQ8();function J(Q,W){if(typeof Q==="string")Q=G(Q);if(typeof Q==="object")Q.options={...Q.options,...{useColumnNames:!0}};W=W||{};var Z=Y.Pool({min:W.min||0,max:W.size||W.poolSize||$.poolSize,idleTimeoutMillis:W.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:W.reapIntervalMillis||$.reapIntervalMillis,log:W.log||$.poolLog,create:async function(K){try{if(!X)X=await import("tedious")}catch(V){return K(V,null)}var H=new X.Connection(Q);H.on("connect",z),H.connect();function z(V){if(V)if(V.errors)return K(V.errors[0],null);else return K(V,null);return H.poolCount=0,K(null,H)}},destroy:function(K){K.poolCount=void 0,K.close()}});return Z.connect=function(K){Z.acquire(function(H,z){if(H)return K(H,null,function(){});z.poolCount++,K(null,z,function(V){if(V)Z.destroy(z);else Z.release(z)})})},Z}return rR0=J,rR0}var aR0,Qy1;function NQ8(){if(Qy1)return aR0;Qy1=1;let $=gZ(),Y=A7(),X=VQ8(),G=DQ8(),J=HW();function Q(W,Z){let K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return aR0=Q,aR0}var sR0,Wy1;function LQ8(){if(Wy1)return sR0;Wy1=1;let $=hZ(),Y=zQ8(),X=fZ(),G=zW(),J=VW(),Q=NQ8(),W=QQ(),Z=WQ(),K=rX(),H=fG(),z=nX();function V(A,F){if(!A)throw Error("Connection string cannot be empty");F=F||{min:1};var N=Q(A,F);let D={poolFactory:N,hostLocal:Z,express:W};return D.transaction=function(L,B){if(arguments.length===1&&typeof L==="function")B=L,L=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,L)}async function M(){let q,w=Y(O,N,L);return await new Promise(w).then(E).then(()=>B(O)).then((I)=>q=I).then(()=>D.commit(O)).then(null,(I)=>D.rollback(O,I)),q}function R(){let q,w=Y(O,N,L);return q=new Promise(w),q.then(E)}},D.createTransaction=function(L){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(B.run.bind(B,q))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,L)}},D.query=function(L){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>K(B,L).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(F)return N.end();else return Promise.resolve()},D.accept=function(L){L.visitSqlite()},D}return sR0=V,sR0}var oR0,Zy1;function BQ8(){if(Zy1)return oR0;Zy1=1;function $(Y){if(Y)return 1;return 0}return oR0=$,oR0}var tR0,Ky1;function OQ8(){if(Ky1)return tR0;Ky1=1;function $(Y){return`CONVERT(BIGINT, ${Y})`}return tR0=$,tR0}var eR0,Uy1;function LP(){if(Uy1)return eR0;return Uy1=1,eR0=($)=>`[${$}]`,eR0}var $q0,Hy1;function EQ8(){if(Hy1)return $q0;Hy1=1;let $=LP();function Y(X,G){let J=$(X._dbName);if(G)return`CONVERT(VARCHAR(20), ${G}.${J})`;else return`CONVERT(NVARCHAR(20), ${J})`}return $q0=Y,$q0}var Yq0,zy1;function MQ8(){if(zy1)return Yq0;zy1=1;var $="delete from %s from %s as %s %s";let Y=UF(),X=LP();function G(J,Q,W){var Z=X(J._dbName);return Q=X(Q),Y($,Z,Z,Q,W)}return Yq0=G,Yq0}var Xq0,Vy1;function RQ8(){if(Vy1)return Xq0;Vy1=1;let $=g5();return Xq0=function(Y){return" FOR UPDATE OF "+$(Y)},Xq0}var Gq0,Ay1;function qQ8(){if(Ay1)return Gq0;Ay1=1;function $(Y,X,G){return G.map((J,Q)=>{let W=X._primaryColumns[Q];if(J===void 0&&W.tsType==="NumberColumn")return`${W._dbName}=@@identity`;else return W.eq(Y,J)})}return Gq0=$,Gq0}var Jq0,Fy1;function IQ8(){if(Fy1)return Jq0;Fy1=1;let $=LP();function Y(X,G){if(G)return`CONVERT(VARCHAR, ${G}.${$(X._dbName)}, 23)`;else return`CONVERT(VARCHAR, ${$(X._dbName)}, 23)`}return Jq0=Y,Jq0}var Qq0,Dy1;function PQ8(){if(Dy1)return Qq0;Dy1=1;let $=LP();function Y(X,G,J,Q){let W=[],Z="",K=[];N(),D();let H=A(),z;if(H)z=`MERGE INTO ${$(G._dbName)} AS target USING (SELECT ${K.join(",")}) AS source ON ${V()} WHEN MATCHED THEN ${H} WHEN NOT MATCHED THEN ${F()};`;else z=`MERGE INTO ${$(G._dbName)} AS target USING (SELECT ${K.join(",")}) AS source ON ${V()} WHEN NOT MATCHED THEN ${F()};`;return z;function V(){let L=G._columnDiscriminators.map((O)=>{let E=$(O.split("=")[0]);return`target.${E}=source.${E}`}),B=G._primaryColumns.map((O)=>`target.${$(O._dbName)}=source.${$(O._dbName)}`);return[...L,...B].join(" AND ")}function A(){if(Q.concurrency==="skipOnConflict"||Q.concurrency==="overwrite")return Z;else return""}function F(){return`INSERT (${W.join(",")}) VALUES (${W.map((L)=>"source."+L)})`}function N(){let L=G._columnDiscriminators;for(let B=0;B<L.length;B++){let O=L[B].split("=");W.push($(O[0])),K.push(`${O[1]} AS ${O[0]}`)}}function D(){let L=[],B=G._columns;for(let E=0;E<B.length;E++){let M=B[E],R=$(M._dbName);if(J["__"+M.alias]!==void 0)W.push(R),K.push(`%s AS ${$(M.alias)}`),O(M)}if(L.length>0)Z="UPDATE SET "+L.join(",");function O(E){let M=Q[E.alias]?.concurrency||Q.concurrency,R=$(E._dbName);if(M==="overwrite")L.push(`target.${R}=source.${R}`);else if(M==="optimistic")L.push(`target.${R} = CASE WHEN target.${R} <> source.${R} THEN CAST('12345678-1234-1234-1234-123456789012Conflict when updating ${R}12345678-1234-1234-1234-123456789012' AS INTEGER) ELSE target.${R} END`)}}}return Qq0=Y,Qq0}var Wq0,Ny1;function wQ8(){if(Ny1)return Wq0;Ny1=1;let $=PQ8(),Y=LP();function X(Q,W,Z,K){if(G(W,K)&&H())return $.apply(null,[...arguments]);else return J.apply(null,[...arguments].slice(1));function H(){for(let z in Z){let V=W[z]?.alias;if(V&&Z["__"+V]!==void 0&&W[z]?.equal)return!0}}}function G(Q,W){for(let Z=0;Z<Q._primaryColumns.length;Z++){let K=W[Q._primaryColumns[Z]]?.concurrency;if(K==="skipOnConflict"||K==="overwrite")return!0}return W.concurrency==="skipOnConflict"||W.concurrency==="overwrite"}function J(Q,W){let Z=[],K=[],H=[],z="INSERT INTO "+Y(Q._dbName)+" ";if(V(),A(),Z.length===0)z+=" VALUES()";else z=z+"("+Z.join(",")+") VALUES ("+H.join(",")+")";return z;function V(){let F=Q._columnDiscriminators;for(let N=0;N<F.length;N++){let D=F[N].split("=");Z.push(Y(D[0])),H.push(D[1])}}function A(){let F=Q._columns;for(let N=0;N<F.length;N++){let D=F[N],L=Y(D._dbName);if(K.push(D._dbName),W["__"+D.alias]!==void 0)Z.push(L),H.push("%s")}}}return Wq0=X,Wq0}var Zq0,Ly1;function _Q8(){if(Ly1)return Zq0;Ly1=1;let $=VP(),Y=Jb(),X=Mt(),G=WK(),J=jB();function Q(W,Z,K,H){let z=[],V=$(Y.bind(null,W),Z,K,H);V.disallowCompress=!0,J(W,V);let A=X(W,Z,K,V);return z.push(A),G(W,z).then((F)=>F[F.length-1])}return Zq0=Q,Zq0}var Kq0,By1;function jQ8(){if(By1)return Kq0;By1=1;function $(Y){if(Y.offset)return` ROWS ${X()} OFFSET ${Y.offset}`;else return"";function X(){if(Y.limit||Y.limit===0)return` LIMIT ${Y.limit}`;else return""}}return Kq0=$,Kq0}var Uq0,Oy1;function TQ8(){if(Oy1)return Uq0;Oy1=1;let $=fb1(),Y=gb1(),X=BQ8(),G=OQ8(),J=EQ8(),Q=MQ8(),W=RQ8(),Z=qQ8(),K=IQ8(),H=wQ8(),z=_Q8(),V=jQ8(),A=LP();function F(D,L,{readonly:B=!1}={}){var O={poolFactory:L};if(!L.connect)L=L(),O.pool=L;if(O.engine="sap",O.encodeBoolean=X,O.formatBigintIn=G,O.formatBigintOut=J,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.deleteFromSql=Q,O.selectForUpdateSql=W,O.formatDateOut=K,O.lastInsertedSql=Z,O.insertSql=H,O.insert=z,O.lastInsertedIsSeparate=!0,O.multipleStatements=!1,O.begin="BEGIN TRANSACTION",O.limit=(E)=>{if(E.offset)return"";else if(E.limit||E.limit===0)return"TOP "+E.limit;else return""},O.limitAndOffset=V,O.accept=function(E){E.visitSap()},O.aggregateCount=0,O.quote=A,O.cache={},B)return O.dbClient={executeQuery:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{$(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})},executeCommand:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{Y(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})}},D.rdb=O,(E)=>E();return function(E,M){L.connect(R);function R(q,w,I){try{if(q){M(q);return}w.executeQuery=$(D,w),w.executeCommand=Y(D,w),O.dbClient=w,O.dbClientDone=I,D.rdb=O,E()}catch(P){M(P)}}}}function N(D){return JSON.parse(D)}return Uq0=F,Uq0}var Hq0,Ey1;function CQ8(){if(Ey1)return Hq0;Ey1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return Hq0=Y,Hq0}var zq0,My1;function SQ8(){if(My1)return zq0;My1=1;let $=gZ();var Y=A7(),X=CQ8(),G=sb1(),J=HW();function Q(W,Z){var K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return zq0=Q,zq0}var Vq0,Ry1;function kQ8(){if(Ry1)return Vq0;Ry1=1;let $=hZ(),Y=TQ8(),X=fZ(),G=zW(),J=VW(),Q=SQ8(),W=QQ(),Z=WQ(),K=rX(),H=fG(),z=nX();function V(A,F){if(!A)throw Error("Connection string cannot be empty");F=F||{min:1};var N=Q(A,F);let D={poolFactory:N,hostLocal:Z,express:W};return D.transaction=function(L,B){if(arguments.length===1&&typeof L==="function")B=L,L=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,L)}async function M(){let q,w=Y(O,N,L);return await new Promise(w).then(E).then(()=>B(O)).then((I)=>q=I).then(()=>G(O)).then(null,(I)=>J(O,I)),q}function R(){let q,w=Y(O,N,L);return q=new Promise(w),q.then(E)}},D.createTransaction=function(L){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}function R(){return X(B,L)}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M},D.query=function(L){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>K(B,L).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(F)return N.end();else return Promise.resolve()},D.accept=function(L){L.visitSap()},D}return Vq0=V,Vq0}var Aq0,qy1;function ob1(){if(qy1)return Aq0;qy1=1;function $(Y,X){if(X.length===0)return Y.sql();var G=Y.sql().split("?"),J="",Q=G.length-1;for(var W=0;W<Q;W++)J+=G[W]+":p"+(W+1);return J+=G[Q],J}return Aq0=$,Aq0}var Fq0,Iy1;function vQ8(){if(Iy1)return Fq0;Iy1=1;var $=U5(),Y=ob1();function X(G,J){var Q=J.execute;return W;function W(Z,K){var H=Z.parameters;$.emitQuery({sql:Z.sql(),parameters:H});var z=Y(Z,H);Q.call(J,z,H,{fetchTypeHandler:function(A){A.name=A.name.toLowerCase()}},V);function V(A,F){if(A)K(A);else{if(F.rows)F=F.rows;else F=[F];K(null,F)}}}}return Fq0=X,Fq0}var Dq0,Py1;function xQ8(){if(Py1)return Dq0;Py1=1;var $=U5(),Y=ob1();function X(G,J){var Q=J.execute;return W;function W(Z,K){var H=Z.parameters;$.emitQuery({sql:Z.sql(),parameters:H});var z=Y(Z,H);Q.call(J,z,H,{fetchTypeHandler:function(A){A.name=A.name.toLowerCase()}},V);function V(A,F){if(A)return K(A);var N=typeof F.rowsAffected==="number"?F.rowsAffected:0;return K(null,{rowsAffected:N})}}}return Dq0=X,Dq0}var Nq0,wy1;function yQ8(){if(wy1)return Nq0;wy1=1;function $(Y){if(Y)return 1;return 0}return Nq0=$,Nq0}var Lq0,_y1;function BP(){if(_y1)return Lq0;return _y1=1,Lq0=($)=>`"${$}"`,Lq0}var Bq0,jy1;function bQ8(){if(jy1)return Bq0;jy1=1;let $="delete from %s where %s.rowId in (SELECT %s.rowId FROM %s %s%s)",Y=UF(),X=BP();function G(J,Q,W){let Z=X(J._dbName);return Q=X(Q),Y($,Z,Z,Q,Z,Q,W)}return Bq0=G,Bq0}var Oq0,Ty1;function hQ8(){if(Ty1)return Oq0;Ty1=1;let $=g5();return Oq0=function(Y){return" FOR UPDATE OF "+$(Y)},Oq0}var Eq0,Cy1;function fQ8(){if(Cy1)return Eq0;Cy1=1;let $=g6();function Y(X,G,J){return J.map((Q,W)=>{let Z=G._primaryColumns[W];if(Q===void 0)return`ROWID='${$(X,"lastRowid")}'`;else return Z.eq(X,Q)})}return Eq0=Y,Eq0}var Mq0,Sy1;function gQ8(){if(Sy1)return Mq0;Sy1=1;function $(Y){if(Y.offset)return` OFFSET ${Y.offset} ROWS FETCH NEXT ${X()} ROWS ONLY`;else if(Y.limit||Y.limit===0)return` FETCH FIRST ${Y.limit} ROWS ONLY`;else return"";function X(){if(Y.limit||Y.limit===0)return Y.limit;else return""}}return Mq0=$,Mq0}var Rq0,ky1;function mQ8(){if(ky1)return Rq0;ky1=1;let $=BP();function Y(X,G,J,Q){let W=[],Z="",K=[];N(),D();let H=A(),z;if(H)z=`MERGE INTO ${$(G._dbName)} target USING (SELECT ${K.join(",")} FROM DUAL) source ON (${V()}) WHEN MATCHED THEN ${H} WHEN NOT MATCHED THEN ${F()}`;else z=`MERGE INTO ${$(G._dbName)} target USING (SELECT ${K.join(",")} FROM DUAL) source ON (${V()}) WHEN NOT MATCHED THEN ${F()}`;return z;function V(){let L=G._columnDiscriminators.map((O)=>{let E=O.split("=")[0];return`target."${E}"=source."${E}"`}),B=G._primaryColumns.map((O)=>`target.${$(O._dbName)}=source.${$(O._dbName)}`);return[...L,...B].join(" AND ")}function A(){if(Q.concurrency==="skipOnConflict"||Q.concurrency==="overwrite")return Z;else return""}function F(){return`INSERT (${W.join(",")}) VALUES (${W.map((L)=>"source."+L)})`}function N(){let L=G._columnDiscriminators;for(let B=0;B<L.length;B++){let O=L[B].split("=");W.push($(O[0])),K.push(`${O[1]} ${$(O[0])}`)}}function D(){let L=[],B=G._columns;for(let E=0;E<B.length;E++){let M=B[E],R=$(M._dbName);if(J["__"+M.alias]!==void 0){if(W.push(R),K.push(`%s ${$(M.alias)}`),!M.isPrimary)O(M)}}if(L.length>0)Z="UPDATE SET "+L.join(",");function O(E){let M=Q[E.alias]?.concurrency||Q.concurrency,R=$(E._dbName);if(M==="overwrite")L.push(`target.${R}=source.${R}`);else if(M==="optimistic")L.push(`target.${R} = CASE WHEN target.${R} <> source.${R} THEN 1/0 ELSE target.${R} END`)}}}return Rq0=Y,Rq0}var qq0,vy1;function tb1(){if(vy1)return qq0;vy1=1;let $=mQ8(),Y=BP();function X(Q,W,Z,K){if(G(W,K)&&H())return $.apply(null,[...arguments]);else return J.apply(null,[...arguments].slice(1));function H(){for(let z in Z){let V=W[z]?.alias;if(V&&Z["__"+V]!==void 0&&W[z]?.equal)return!0}}}function G(Q,W){for(let Z=0;Z<Q._primaryColumns.length;Z++){let K=W[Q._primaryColumns[Z]]?.concurrency;if(K==="skipOnConflict"||K==="overwrite")return!0}return W.concurrency==="skipOnConflict"||W.concurrency==="overwrite"}function J(Q,W){let Z=[],K=[],H='INSERT INTO "'+Q._dbName+'" ';if(z(),V(),Z.length===0)H+=` (${Y(Q._primaryColumns[0]._dbName)}) VALUES(DEFAULT)`;else H=H+"("+Z.join(",")+") VALUES ("+K.join(",")+")";return H;function z(){let A=Q._columnDiscriminators;for(let F=0;F<A.length;F++){let N=A[F].split("=");Z.push(Y(N[0])),K.push(N[1])}}function V(){let A=Q._columns;for(let F=0;F<A.length;F++){let N=A[F],D=Y(N._dbName);if(W["__"+N.alias]!==void 0)if(Z.push(D),N.tsType==="DateColumn")K.push(`TO_TIMESTAMP(%s, 'YYYY-MM-DD"T"HH24:MI:SS.FF6')`);else K.push("%s")}}}return qq0=X,qq0}var Iq0,xy1;function uQ8(){if(xy1)return Iq0;xy1=1;var $=Y9(),Y=tb1();let X=UF();function G(J,Q,W,Z={}){var K=[],H=[Y(J,Q,W,Z)],z=Q._columns;for(var V=0;V<z.length;V++){var A=z[V],F=A.alias;if(W["__"+A.alias]!==void 0){var N=A.encode(J,W[F]);if(N.parameters.length>0)H.push("?"),K.push(N.parameters[0]);else H.push(N.sql())}}var D=X.apply(null,H);return $(D,K)}return Iq0=G,Iq0}var Pq0,yy1;function pQ8(){if(yy1)return Pq0;yy1=1;let $=VP(),Y=uQ8(),X=nX(),G=Mt(),J=WK();function Q(W,Z,K,H){return new Promise((z,V)=>{let A=$(Y.bind(null,W),Z,K,H);A.disallowCompress=!0,J(W,[A]).then((N)=>N[0]).then(F).then(z,V);function F([N]){X(W,"lastRowid",N.lastRowid);let D=G(W,Z,K,A);return J(W,[D]).then((L)=>z(L[0]))}})}return Pq0=Q,Pq0}var wq0,by1;function dQ8(){if(by1)return wq0;by1=1;let $=BP();function Y(X,G){let J=$(X._dbName);if(G)return`TO_CHAR(${G}.${J})`;else return`TO_CHAR(${J})`}return wq0=Y,wq0}var _q0,hy1;function cQ8(){if(hy1)return _q0;hy1=1;let $=BP();function Y(X,G){if(G)return`TO_CHAR(${G}.${$(X._dbName)}, 'YYYY-MM-DD"T"HH24:MI:SS.FF3')`;else return`TO_CHAR(${$(X._dbName)}, 'YYYY-MM-DD"T"HH24:MI:SS.FF3')`}return _q0=Y,_q0}var jq0,fy1;function lQ8(){if(fy1)return jq0;fy1=1;function $(Y){return`TO_TIMESTAMP(${Y}, 'YYYY-MM-DD"T"HH24:MI:SS.FF3')`}return jq0=$,jq0}var Tq0,gy1;function iQ8(){if(gy1)return Tq0;gy1=1;let $=vQ8(),Y=xQ8(),X=yQ8(),G=bQ8(),J=hQ8(),Q=fQ8(),W=gQ8(),Z=tb1(),K=pQ8(),H=dQ8(),z=cQ8(),V=lQ8(),A=BP();function F(D,L,{readonly:B=!1}={}){var O={poolFactory:L};if(!L.connect)L=L(),O.pool=L;if(O.begin="SET TRANSACTION ISOLATION LEVEL READ COMMITTED",O.engine="oracle",O.encodeBoolean=X,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.formatDateOut=z,O.formatDateIn=V,O.formatBigintOut=H,O.deleteFromSql=G,O.selectForUpdateSql=J,O.lastInsertedSql=Q,O.insertSql=Z,O.insert=K,O.lastInsertedIsSeparate=!0,O.multipleStatements=!1,O.limitAndOffset=W,O.accept=function(E){E.visitSqlite()},O.aggregateCount=0,O.quote=A,O.cache={},B)return O.dbClient={executeQuery:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{$(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})},executeCommand:function(E,M){L.connect((R,q,w)=>{if(R)return M(R);try{Y(D,q)(E,(I,P)=>{w(),M(I,P)})}catch(I){w(),M(I)}})}},D.rdb=O,(E)=>E();return function(E,M){L.connect(R);function R(q,w,I){try{if(q){M(q);return}w.executeQuery=$(D,w),w.executeCommand=Y(D,w),O.dbClient=w,O.dbClientDone=I,D.rdb=O,E()}catch(P){M(P)}}}}function N(D){return JSON.parse(D)}return Tq0=F,Tq0}var Cq0,my1;function nQ8(){if(my1)return Cq0;my1=1;var $=A7();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return Cq0=Y,Cq0}var Sq0,uy1;function rQ8(){if(uy1)return Sq0;uy1=1;var $=ZK(),Y=KK(),X;function G(J,Q){Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log,create:async function(Z){var K;try{if(!X)X=await Promise.resolve().then(() => U6(nA(),1)),X=X.default||X,X.outFormat=X.OUT_FORMAT_OBJECT,X.fetchAsBuffer=[X.BLOB]}catch(z){return Z(z,null)}X.getConnection(J,H);function H(z,V){if(K=V,z)return Z(z,null);return K.poolCount=0,Z(null,K)}},destroy:function(Z){Z.poolCount=void 0,Z.close()}});return W.connect=function(Z){W.acquire(function(K,H){if(K)return Z(K,null,function(){});H.poolCount++,Z(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return Sq0=G,Sq0}var kq0,py1;function aQ8(){if(py1)return kq0;py1=1;let $=gZ(),Y=A7(),X=nQ8(),G=rQ8(),J=HW();function Q(W,Z){let K=G(W,Z),H=J(),z=X.bind(null,K,H),V={};return V.connect=K.connect,V.end=$(z),Y[H]=V,V}return kq0=Q,kq0}var vq0,dy1;function sQ8(){if(dy1)return vq0;dy1=1;let $=hZ(),Y=iQ8(),X=fZ(),G=zW(),J=VW(),Q=aQ8(),W=QQ(),Z=WQ(),K=rX(),H=fG(),z=nX();function V(A,F){if(!A)throw Error("Connection string cannot be empty");F=F||{min:1};var N=Q(A,F);let D={poolFactory:N,hostLocal:Z,express:W};return D.transaction=function(L,B){if(arguments.length===1&&typeof L==="function")B=L,L=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,L)}async function M(){let q,w=Y(O,N,L);return await new Promise(w).then(E).then(()=>B(O)).then((I)=>q=I).then(()=>G(O)).then(null,(I)=>J(O,I)),q}function R(){let q,w=Y(O,N,L);return q=new Promise(w),q.then(E)}},D.createTransaction=function(L){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,L)}},D.query=function(L){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>K(B,L).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(F)return N.end();else return Promise.resolve()},D.accept=function(L){L.visitSqlite()},D}return vq0=V,vq0}var xq0,cy1;function oQ8(){if(cy1)return xq0;cy1=1;let $=QQ(),Y=WQ(),X=OY8(),G=bG8(),J=hG8(),Q,W,Z,K,H,z,V,A,F;var N=function(D){if(D.indexOf&&D.indexOf("mysql")===0)return N.mySql.apply(null,arguments);else if(D.indexOf&&D.indexOf("postgres")===0)N.pg.apply(null,arguments);else return X.apply(null,arguments)};return N.createPatch=X.createPatch,N.table=yb1(),N.filter=KP(),N.commit=zW(),N.rollback=VW(),N.end=A7().end,N.close=N.end,N.log=U5().registerLogger,N.on=U5().on,N.off=U5().off,N.query=rX(),N.lock=Ot(),N.schema=Et(),N.map=G.bind(null,N),N.http=function(D){return D},Object.defineProperty(N,"mysql",{get:function(){if(!Q)Q=Hv1();return Q}}),Object.defineProperty(N,"mySql",{get:function(){if(!Q)Q=Hv1();return Q}}),Object.defineProperty(N,"pglite",{get:function(){if(!Z)Z=FJ8();return Z}}),Object.defineProperty(N,"postgres",{get:function(){if(!W)if(J.bun)W=gv1();else W=av1();return W}}),Object.defineProperty(N,"pg",{get:function(){if(!W)if(J.bun)W=gv1();else W=av1();return W}}),Object.defineProperty(N,"sqlite",{get:function(){if(!K)if(J.deno||J.node&&(J.node.major>22||J.node.major===22&&J.node.minor>=5))K=yJ8();else if(J.bun)K=uJ8();else if(J.node)K=rJ8();else throw Error("SQLite is not supported in this environment");return K}}),Object.defineProperty(N,"d1",{get:function(){if(!F)F=YQ8();return F}}),Object.defineProperty(N,"mssqlNative",{get:function(){if(!H)H=ZQ8();return H}}),Object.defineProperty(N,"mssql",{get:function(){if(!V)V=LQ8();return V}}),Object.defineProperty(N,"sap",{get:function(){if(!z)z=kQ8();return z}}),Object.defineProperty(N,"oracle",{get:function(){if(!A)A=sQ8();return A}}),N.express=$.bind(null,Y),xq0=N,xq0}var tQ8=oQ8(),HI0=t$8(tQ8);function kt($,Y){Y.forEach((X)=>{if(String(X.TYPE).includes("DATE")||String(X.TYPE).includes("TIMESTAMP")){let G=D4($,String(X.FIELD));if(G)i1($,String(X.FIELD),Yq(G))}})}async function vt($,Y){let X=$.poolCode;if(!X||X.length==0)throw Error("poolCode\u4E0D\u80FD\u4E3A\u7A7A");let G=await ZU(X);if(!G||!G[0])throw Error(`code:${X}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`);let J=await lX(X);if(Y&&Y=="2"){let Q=$.sql;delete $.sql,delete $.poolCode;let W=N$(Q,/{{(.*?)}}/g);if(a8(W))W.forEach((K)=>{let H=n1(n1(K,"{{",""),"}}","");if(H.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4($,H)))throw Error(`${H}\u53D6\u503C\u5931\u8D25`);Q=n1(Q,`{{${H}}}`,$[H])});let Z=await J.execute(`${Q}`,[],{outFormat:TB.default.OUT_FORMAT_OBJECT});return J.commit(),J.close(),{data:Z.rows}}else{if(I7($))$=JSON.parse($);$=D$($);let Q="select";if($&&$.type)Q=$.type;let W=D$($.dynamicObj);if(!W)W={};let{folders:Z,table:K}=$;if(!K||K.length==0)throw Error("table\u4E0D\u80FD\u4E3A\u7A7A");let H=$.pageNum?$.pageNum:1,z=$.pageSize?$.pageSize:10,V=$.orderBy?$.orderBy:"id",A=$.orderByCommand?$.orderByCommand:"desc",F=$.id,N=`SELECT
	        column_name AS Field,
	        data_type AS TYPE ,
	        data_length AS LENGTH,
	        nullable AS NULLABLE
        FROM
	        all_tab_columns 
        WHERE
	        table_name = '${K}'`,D=await J.execute(`${N}`,[],{outFormat:TB.default.OUT_FORMAT_OBJECT});if(D.rows&&a8(D.rows)){let L=D.rows,O=HI0.map((E)=>{return{[K]:E.table(K).map((M)=>{let R={};return i1(R,"id",M.column("ID").string().primary().notNull()),L.forEach((q)=>{if(I7(q.TYPE)&&!String(q.FIELD).includes("id")&&!String(q.FIELD).includes("ID")){if(String(q.TYPE).includes("VARCHAR2")||String(q.TYPE).includes("CHAR")||String(q.TYPE).includes("NVARCHAR")||String(q.TYPE).includes("NCHAR")||String(q.TYPE).includes("LONG")||String(q.TYPE).includes("ROWID")||String(q.TYPE).includes("UROWID")||String(q.TYPE).includes("XMLType"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).string());else if(String(q.TYPE).includes("NUMBER")||String(q.TYPE).includes("BINARY_DOUBLE")||String(q.TYPE).includes("BINARY_FLOAT")||String(q.TYPE).includes("BINARY_INTEGER"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).numeric());else if(String(q.TYPE).includes("DATE")||String(q.TYPE).includes("TIMESTAMP"))i1(R,String(q.FIELD),Q=="select"?M.column(String(q.FIELD)).string():M.column(String(q.FIELD)).date());else if(String(q.TYPE).includes("JSON"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).json());else if(String(q.TYPE).includes("BOOLEAN"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).boolean());else if(String(q.TYPE).includes("TIMESTAMP WITH TIMEZONE")||String(q.TYPE).includes("TIMESTAMP WITH LOCAL TIME ZONE"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).string());else if(String(q.TYPE).includes("BFILE")||String(q.TYPE).includes("CLOB")||String(q.TYPE).includes("BLOB")||String(q.TYPE).includes("NCLOB"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).binary())}}),R})}}).oracle({user:G[0].user??"",password:G[0].password??"",connectString:`${G[0].host}:${G[0].port}/${G[0].serviceName}`,poolAlias:X});if(Q=="insert")return kt(W,L),await O[K].insert(W),J.close(),O.close(),{data:"success"};else if(Q=="update"){if(!F||F.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");kt(W,L),i1(W,"id",F);let E=eb1(W,K);return J.execute(E),J.commit(),J.close(),O.close(),{data:"success"}}else if(Q=="delete"){if(!F||F.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");return J.execute(`DELETE FROM EMPLOYEES  WHERE id = ${F}`),J.commit(),J.close(),O.close(),{data:"success"}}else if(Q=="select"||Q=="count"){let E={sql:"",parameters:[],raw:""},M=[" 1 = 1 "],R=[" 1 = 1 "];if(F)M.push(" and id = ? "),R.push(" and id = :id "),E.parameters.push(F);Object.keys(W).forEach((_)=>{if(y2(W[_].value)&&!gX(W[_].value,"undefined"))switch(W[_].command){case"eq":M.push(` and ${_} = ? `),R.push(` and ${_} = :${_} `),E.parameters.push(W[_].value);break;case"ne":M.push(` and ${_} != ? `),R.push(` and ${_} != :${_} `),E.parameters.push(W[_].value);break;case"gt":M.push(` and ${_} > ? `),R.push(` and ${_} > :${_} `),E.parameters.push(W[_].value);break;case"gte":M.push(` and ${_} >= ? `),R.push(` and ${_} >= :${_} `),E.parameters.push(W[_].value);break;case"lt":M.push(` and ${_} < ? `),R.push(` and ${_} < :${_} `),E.parameters.push(W[_].value);break;case"lte":M.push(` and ${_} <= ? `),R.push(` and ${_} <= :${_} `),E.parameters.push(W[_].value);break;case"isNull":M.push(` and ${_} is null `),R.push(` and ${_} is null `);break;case"isNotNull":M.push(` and ${_} is not null `),R.push(` and ${_} is not null `);break;case"inArray":break;case"notInArray":break;case"exists":break;case"notExists":break;case"between":break;case"notBetween":break;case"like":M.push(` and ${_} like :${_} `),R.push(` and ${_} like :${_} `),E.parameters.push(W[_].value);break;case"ilike":break;case"notIlike":break;case"not":break;case"and":break;case"or":break;case"arrayContains":break;case"arrayContained":break;case"arrayOverlaps":break;default:break}}),E.sql=n1(M.join(),/[,]/g,""),E.raw=n1(R.join(),/[,]/g,"");let w=(await J.execute(`select count(1) from ${K} where ${E.raw}`,E.parameters,{outFormat:TB.default.OUT_FORMAT_OBJECT})).rows,I=D4(w[0],"COUNT(1)")??0;if(Q=="count")return{data:{count:I}};let P=await O[K].getAll({where:()=>E,offset:Number((H-1)*z),orderBy:[`${V} ${A}`],limit:Number(z)});return J.close(),O.close(),{data:P,total:I}}else throw Error("\u64CD\u4F5C\u7C7B\u578B\u65E0\u6548")}else throw Error("\u8868\u4E0D\u5B58\u5728")}}function eb1($,Y="your_table"){if(!$.hasOwnProperty("id"))throw Error("\u5BF9\u8C61\u5FC5\u987B\u5305\u542B id \u5B57\u6BB5");let X=$.id,G=Object.keys($).filter((Q)=>Q!=="id").map((Q)=>{let W=$[Q];if(W===null)return`${Q} = NULL`;else if(typeof W==="string"){let Z=W.replace(/'/g,"''");return`${Q} = '${Z}'`}else if(typeof W==="number"||typeof W==="boolean")return`${Q} = ${W}`;else if(W instanceof Date)return`${Q} = TO_TIMESTAMP('${W.toISOString().split(".")[0]}', 'YYYY-MM-DD"T"HH24:MI:SS')`;else return`${Q} = '${String(W)}'`});if(G.length===0)return"";let J=G.join(", ");return`UPDATE ${Y} SET ${J} WHERE id = ${X}`}async function $h1($,Y){let X=await lX($),G=`SELECT
	        column_name AS Field,
	        data_type AS TYPE ,
	        data_length AS LENGTH,
	        nullable AS NULLABLE
        FROM
	        all_tab_columns 
        WHERE
	        table_name = '${Y}'`,Q=(await X.execute(`${G}`,[],{outFormat:TB.default.OUT_FORMAT_OBJECT})).rows??[],W=HI0.map((Z)=>{return{[Y]:Z.table(Y).map((K)=>{let H={};return i1(H,"id",K.column("ID").string().primary().notNull()),Q.forEach((z)=>{if(I7(z.TYPE)&&!String(z.FIELD).includes("id")&&!String(z.FIELD).includes("ID")){if(String(z.TYPE).includes("VARCHAR2")||String(z.TYPE).includes("CHAR")||String(z.TYPE).includes("NVARCHAR")||String(z.TYPE).includes("NCHAR")||String(z.TYPE).includes("LONG")||String(z.TYPE).includes("ROWID")||String(z.TYPE).includes("UROWID")||String(z.TYPE).includes("XMLType"))i1(H,String(z.FIELD),K.column(String(z.FIELD)).string());else if(String(z.TYPE).includes("NUMBER")||String(z.TYPE).includes("BINARY_DOUBLE")||String(z.TYPE).includes("BINARY_FLOAT")||String(z.TYPE).includes("BINARY_INTEGER"))i1(H,String(z.FIELD),K.column(String(z.FIELD)).numeric());else if(String(z.TYPE).includes("DATE")||String(z.TYPE).includes("TIMESTAMP"))i1(H,String(z.FIELD),K.column(String(z.FIELD)).date());else if(String(z.TYPE).includes("JSON"))i1(H,String(z.FIELD),K.column(String(z.FIELD)).json());else if(String(z.TYPE).includes("BOOLEAN"))i1(H,String(z.FIELD),K.column(String(z.FIELD)).boolean());else if(String(z.TYPE).includes("TIMESTAMP WITH TIMEZONE")||String(z.TYPE).includes("TIMESTAMP WITH LOCAL TIME ZONE"))i1(H,String(z.FIELD),K.column(String(z.FIELD)).string());else if(String(z.TYPE).includes("BFILE")||String(z.TYPE).includes("CLOB")||String(z.TYPE).includes("BLOB")||String(z.TYPE).includes("NCLOB"))i1(H,String(z.FIELD),K.column(String(z.FIELD)).binary())}}),H})}});return{fields:Q,map:W}}async function Yh1($,Y,X){let G=await ZU($);if(!G||!G[0])throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`);let J=await $h1($,Y),Q=J.map.oracle({user:G[0].user??"",password:G[0].password??"",connectString:`${G[0].host}:${G[0].port}/${G[0].serviceName}`,poolAlias:$});kt(X,J.fields);let W=await Q[Y].insert(X);return Q.close(),W}async function Xh1($,Y,X,G){let J=await lX($),Q=await $h1($,Y);kt(X,Q.fields),i1(X,"id",G);let W=eb1(X,Y),Z=J.execute(W);return J.commit(),J.close(),Z}async function zI0($,Y){let X=await lX($),G=await X.execute(`${Y}`,[],{outFormat:TB.default.OUT_FORMAT_OBJECT});return X.commit(),X.close(),G.rows}function Qb($,Y){let X=$,G=N$($,/{{(.*?)}}/g);if(a8(G))G.forEach((J)=>{let Q=n1(n1(J,"{{",""),"}}","");if(Q.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,Q)))throw Error(`${Q}\u53D6\u503C\u5931\u8D25`);X=n1(X,`{{${Q}}}`,D4(Y,Q))});return X}var Jh1=new O4;Jh1.post("/",async($)=>{try{let Y=$.req.query("type"),X=await $.req.json(),G=await vt(X,Y),J=t0();return J.data=G.data,J.total=G.total,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u64CD\u4F5C\u5931\u8D25"})}});var Qh1=Jh1;var Wh1=new O4;Wh1.post("/",async($)=>{try{let Y=$.req.query("type"),X=await $.req.json(),G=await yn(X,Y),J=t0();return J.data=G.data,J.total=G.total,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u64CD\u4F5C\u5931\u8D25"})}});var Zh1=Wh1;KY();var RK4=U6(hN(),1);async function tP($,Y,X){if(X=="mysql")return await xs($,Y);else if(X=="postgres")return await bs($,Y);else if(X=="oracle")return await vt($,Y);else if(X=="sqlite")return await yn($,Y)}wF();z_();KY();var Tg0=U6(hN(),1);KY();var Rg0=U6(hN(),1);import JK4 from"vm";async function w70($,Y){try{let X=new JK4.Script($);return JK4.createContext(Y),X.runInContext(Y),"success"}catch(X){return console.log(`codeCustom execution operation failed:${X}`),`codeCustom execution operation failed:${X}`}}import N59 from"vm";function _70($,Y,X){try{let G=`let ifelseRes = false;
            if (${$}) {
                ifelseRes = true
            };
            ifelseRes;`;return N59.runInNewContext(G,Y)}catch(G){return X}}async function j70($,Y,X){try{if($&&$.length>0){let G=$,J=N$($,/{{(.*?)}}/g);if(a8(J))J.forEach((Q)=>{let W=n1(n1(Q,"{{",""),"}}","");if(W.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,W)))throw Error(`${W}\u53D6\u503C\u5931\u8D25`);G=n1(G,`{{${W}}}`,D4(Y,W))});console.log(`requestId:${X}-->${G}`),v2.info(`requestId:${X}-->${G}`)}}catch(G){return console.log(`logCustomExecution operation failed:${G}`),`logCustomExecution operation failed:${G}`}return"success"}KY();async function T70($,Y){try{let X=await II($?$:"");if(!X||X.length==0)throw Error("API\u7F16\u7801\u4E0D\u5B58\u5728");let G=X[0];if(!G)throw Error("API\u7F16\u7801\u4E0D\u5B58\u5728");let J=!1,Q=U.object({}),W=U.object({});if(G.parames&&G.parames.length>0)Q.parse(JSON.parse(G.parames));if(G.simplify&&G.simplify.length>0)W.parse(JSON.parse(G.simplify)),J=!0;if(J){let Z=G.parames??"{}",K=N$(G.parames,/{{(.*?)}}/g);if(bk(K))K.forEach((H)=>{let z=n1(n1(H,"{{",""),"}}","");if(z.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");Z=n1(Z,`{{${z}}}`,D4(Y,z))});i1(G,"parames",Z)}if(G)switch(G.type){case"1":{let Z=G.parames??"{}",K=JSON.parse(Z),H=D4(Y,$);UA(K,H);let z=await tP(K,"1",G.sourceType),V=t0();return V.data=z.data,V.total=z.total,V}case"2":{let Z=G.parames??"{}",K=JSON.parse(Z),H=D4(Y,$);if(UA(K,H),G.flow_data){let A=G.flow_data;z6(K,JSON.parse(A))}let z=await tP(K,"2",G.sourceType),V=t0();return V.data=z.data,V.total=z.total,V}default:throw Error("\u672A\u77E5\u7684API\u7C7B\u578B")}else throw Error("API\u7F16\u7801\u4E0D\u5B58\u5728")}catch(X){return console.log(`mysqlCustom execution operation failed:${X}`),`mysqlCustom execution operation failed:${X}`}}var QK4=U6(nA(),1);async function C70($,Y,X){let G=[];try{$.forEach((Q)=>{if(Q&&Q.length>0){let W=Q,Z=N$(Q,/{{(.*?)}}/g);if(a8(Z))Z.forEach((K)=>{let H=n1(n1(K,"{{",""),"}}","");if(H.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,H)))throw Error(`${H}\u53D6\u503C\u5931\u8D25`);W=n1(W,`{{${H}}}`,D4(Y,H))});G.push(W)}})}catch(Q){return`transactionalExecution execution operation failed:${Q}`}if(!X||X.length==0)return"transactionalExecution execution operation failed:\u6CA1\u6709\u9009\u62E9\u6570\u636E\u6E90";let J=await il(X);if(J=="oracle"){let Q=await lX(X);try{for(let W=0;W<G.length;W++)console.info(`sql execute:${G[W]}`),await Q.execute(`${G[W]}`,[],{outFormat:QK4.default.OUT_FORMAT_OBJECT});Q.commit()}catch(W){return Q.rollback(),console.log(`transactionalExecution execution operation failed:${W}`),`transactionalExecution execution operation failed:${W}`}}else if(J=="mysql")await(await uX(X)).transaction(async(W)=>{try{for(let Z=0;Z<G.length;Z++)if(console.info(`sql execute:${G[Z]}`),I7(G[Z]))await W.execute(r.raw(G[Z]))}catch(Z){return W.rollback(),console.log(`transactionalExecution execution operation failed:${Z}`),`transactionalExecution execution operation failed:${Z}`}});else if(J=="postgres")await(await pX(X)).transaction(async(W)=>{try{for(let Z=0;Z<G.length;Z++)if(console.info(`sql execute:${G[Z]}`),I7(G[Z]))await W.execute(r.raw(G[Z]))}catch(Z){return W.rollback(),console.log(`transactionalExecution execution operation failed:${Z}`),`transactionalExecution execution operation failed:${Z}`}});else if(J=="sqlite")await(await WX(X)).transaction(async(W)=>{try{for(let Z=0;Z<G.length;Z++)if(console.info(`sql execute:${G[Z]}`),I7(G[Z]))W.run(r.raw(G[Z]))}catch(Z){return W.rollback(),console.log(`transactionalExecution execution operation failed:${Z}`),`transactionalExecution execution operation failed:${Z}`}});else throw Error("\u65E0\u6548\u7684\u6570\u636E\u6E90");return"success"}var WK4=new Rg0.default({length:10}),B59=new Rg0.default({length:18}),Eg0=U.object({}),Mg0=U.object({});function O59($,Y,X){if(Ci(X))Y.forEach((G)=>{i1($,G.key,D4(X,G.value))});else if(Y&&Y.length>0)i1($,Y[0].key,X)}async function ZK4($,Y){let X=new Map,G=[],J=TQ({id:"loop_"+WK4.randomUUID(),inputSchema:Eg0,outputSchema:Mg0}),Q="business_"+WK4.randomUUID(),W=TQ({id:Q,inputSchema:Eg0,outputSchema:Mg0});if($.length>0&&$[0]&&$[0].breakCode&&$[0].breakCode.length>0){let H=$[0].breakCode;$.forEach((z,V)=>{let A=z.flowNodeType,F=o9({id:Q+"_"+V,description:A,inputSchema:Eg0,outputSchema:Mg0,execute:async({requestContext:N})=>{let D=N.get("myContext"),L=N.get("result"),B=N.get("reqId");try{let E="success";switch(A){case"code_custom":{let M=z.codeCustom;E=await w70(M,D);break}case"mysql_custom":{let M=z.mysqlCustom.code,R=await T70(M,D);E=R;let q=z.mysqlCustom.dataExtracts??[];O59(D,q,R);break}case"field_inject":{(z.fieldInject??[]).forEach((R)=>{let q=R.value;if(q=="null")i1(D,R.key,null);else if(q=="uuid")i1(D,R.key,B59.randomUUID());else if(q=="yyyy-MM-dd")i1(D,R.key,Ti());else if(q=="yyyy-MM-dd HH:mm:ss")i1(D,R.key,fX());else if(q=="emptyString")i1(D,R.key,"");else if(q=="array")i1(D,R.key,[]);else if(q=="object")i1(D,R.key,{});else if(q=="number0")i1(D,R.key,0);else if(q=="true")i1(D,R.key,!0);else if(q=="false")i1(D,R.key,!1)});break}case"field_extract":break;case"sql_custom":{let M=z.sqlCustom.sql??"",R=z.sqlCustom.dataSource??"";if(M.length==0){E="SQL\u8BED\u53E5\u4E3A\u7A7A";break}if(R.length==0){E="\u6570\u636E\u6E90\u4E3A\u7A7A";break}let q=[];q.push(M),E=await C70(q,D,R);break}case"log_custom":{let M=z.logCustom??"";j70(M,D,B);break}default:break}G.push({key:A+"_"+V,value:E}),x2(`\u8282\u70B9\u8F93\u51FA:${HA(E)}`,B)}catch(E){console.error(A+"_"+V+" Operation failed:",E),i1(L,"msg",`Operation failed:${E}`)}let O;if(_70(H,D,!0))O=!0;else O=!1;return{breakLooop:O}}});W.then(F),X.set(Q,[])})}W.commit(),J.dountil(W,async({inputData:{breakLooop:H}})=>H),J.commit();let Z=J.createRun(),K=await(await Z).start({inputData:{},requestContext:Y});(await Z).cancel(),console.info(`\u5FAA\u73AF\u4F53\u6D41\u7A0Bid:${(await Z).runId}:${K.status}`)}async function KK4($,Y,X,G,J,Q){let W=await il($),Z=null;if(W=="mysql")switch(X){case"select":Z=ZA0($,px(J,Q));break;case"insert":let K=px(G,Q),H=D$(JSON.parse(K));Z=await tB1($,Y,H);break;case"update":let z=px(G,Q),V=D$(JSON.parse(z));Z=await eB1($,Y,V,D4(V,"id"));break;case"delete":Z=ZA0($,px(J,Q));break;default:break}else if(W=="oracle")switch(X){case"select":Z=zI0($,Qb(J,Q));break;case"insert":let K=Qb(G,Q),H=D$(JSON.parse(K));Z=await Yh1($,Y,H);break;case"update":let z=Qb(G,Q),V=D$(JSON.parse(z));Z=await Xh1($,Y,V,D4(V,"id"));break;case"delete":Z=zI0($,Qb(J,Q));break;default:break}else if(W=="postgres")switch(X){case"select":Z=KA0($,dx(J,Q));break;case"insert":let K=dx(G,Q),H=D$(JSON.parse(K));Z=await JO1($,Y,H);break;case"update":let z=dx(G,Q),V=D$(JSON.parse(z));Z=await QO1($,Y,V,D4(V,"id"));break;case"delete":Z=KA0($,dx(J,Q));break;default:break}else if(W=="sqlite")switch(X){case"select":Z=mk($,uk(J,Q));break;case"insert":let K=uk(G,Q),H=D$(JSON.parse(K));Z=await hn($,Y,H);break;case"update":let z=uk(G,Q),V=D$(JSON.parse(z));Z=await fn($,Y,V,D4(V,"id"));break;case"delete":Z=gn($,uk(J,Q));break;default:break}else throw Error("\u65E0\u6548\u7684\u6570\u636E\u6E90");return Z}var E59=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,M59=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,R59=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function q59($,Y){if($==="__proto__"||$==="constructor"&&Y&&typeof Y==="object"&&"prototype"in Y){I59($);return}return Y}function I59($){console.warn(`[destr] Dropping "${$}" key to prevent prototype pollution.`)}function UK4($,Y={}){if(typeof $!=="string")return $;if($[0]==='"'&&$[$.length-1]==='"'&&$.indexOf("\\")===-1)return $.slice(1,-1);let X=$.trim();if(X.length<=9)switch(X.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!R59.test($)){if(Y.strict)throw SyntaxError("[destr] Invalid JSON");return $}try{if(E59.test($)||M59.test($)){if(Y.strict)throw Error("[destr] Possible prototype pollution");return JSON.parse($,q59)}return JSON.parse($)}catch(G){if(Y.strict)throw G;return $}}var _Z7=String.fromCharCode;var P59=/#/g,w59=/&/g,_59=/\//g,j59=/=/g;var wg0=/\+/g,T59=/%5e/gi,C59=/%60/gi;var S59=/%7c/gi;var k59=/%20/gi;function v59($){return encodeURI(""+$).replace(S59,"|")}function Ig0($){return v59(typeof $==="string"?$:JSON.stringify($)).replace(wg0,"%2B").replace(k59,"+").replace(P59,"%23").replace(w59,"%26").replace(C59,"`").replace(T59,"^").replace(_59,"%2F")}function qg0($){return Ig0($).replace(j59,"%3D")}function zK4($=""){try{return decodeURIComponent(""+$)}catch{return""+$}}function x59($){return zK4($.replace(wg0," "))}function y59($){return zK4($.replace(wg0," "))}function b59($=""){let Y=Object.create(null);if($[0]==="?")$=$.slice(1);for(let X of $.split("&")){let G=X.match(/([^=]+)=?(.*)/)||[];if(G.length<2)continue;let J=x59(G[1]);if(J==="__proto__"||J==="constructor")continue;let Q=y59(G[2]||"");if(Y[J]===void 0)Y[J]=Q;else if(Array.isArray(Y[J]))Y[J].push(Q);else Y[J]=[Y[J],Q]}return Y}function h59($,Y){if(typeof Y==="number"||typeof Y==="boolean")Y=String(Y);if(!Y)return qg0($);if(Array.isArray(Y))return Y.map((X)=>`${qg0($)}=${Ig0(X)}`).join("&");return`${qg0($)}=${Ig0(Y)}`}function f59($){return Object.keys($).filter((Y)=>$[Y]!==void 0).map((Y)=>h59(Y,$[Y])).filter(Boolean).join("&")}var g59=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,m59=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,u59=/^([/\\]\s*){2,}[^/\\]/;var p59=/\/$|\/\?|\/#/,d59=/^\.?\//;function VK4($,Y={}){if(typeof Y==="boolean")Y={acceptRelative:Y};if(Y.strict)return g59.test($);return m59.test($)||(Y.acceptRelative?u59.test($):!1)}function Pg0($="",Y){if(!Y)return $.endsWith("/");return p59.test($)}function c59($="",Y){if(!Y)return(Pg0($)?$.slice(0,-1):$)||"/";if(!Pg0($,!0))return $||"/";let X=$,G="",J=$.indexOf("#");if(J!==-1)X=$.slice(0,J),G=$.slice(J);let[Q,...W]=X.split("?");return((Q.endsWith("/")?Q.slice(0,-1):Q)||"/")+(W.length>0?`?${W.join("?")}`:"")+G}function l59($="",Y){if(!Y)return $.endsWith("/")?$:$+"/";if(Pg0($,!0))return $||"/";let X=$,G="",J=$.indexOf("#");if(J!==-1){if(X=$.slice(0,J),G=$.slice(J),!X)return G}let[Q,...W]=X.split("?");return Q+"/"+(W.length>0?`?${W.join("?")}`:"")+G}function AK4($,Y){if(i59(Y)||VK4($))return $;let X=c59(Y);if($.startsWith(X)){let G=$[X.length];if(!G||G==="/"||G==="?")return $}return r59(X,$)}function FK4($,Y){let X=NK4($),G={...b59(X.search),...Y};return X.search=f59(G),a59(X)}function i59($){return!$||$==="/"}function n59($){return $&&$!=="/"}function r59($,...Y){let X=$||"";for(let G of Y.filter((J)=>n59(J)))if(X){let J=G.replace(d59,"");X=l59(X)+J}else X=G;return X}var DK4=Symbol.for("ufo:protocolRelative");function NK4($="",Y){let X=$.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(X){let[,V,A=""]=X;return{protocol:V.toLowerCase(),pathname:A,href:V+A,auth:"",host:"",search:"",hash:""}}if(!VK4($,{acceptRelative:!0}))return Y?NK4(Y+$):HK4($);let[,G="",J,Q=""]=$.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,W="",Z=""]=Q.match(/([^#/?]*)(.*)?/)||[];if(G==="file:")Z=Z.replace(/\/(?=[A-Za-z]:)/,"");let{pathname:K,search:H,hash:z}=HK4(Z);return{protocol:G.toLowerCase(),auth:J?J.slice(0,Math.max(0,J.length-1)):"",host:W,pathname:K,search:H,hash:z,[DK4]:!G}}function HK4($=""){let[Y="",X="",G=""]=($.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:Y,search:X,hash:G}}function a59($){let Y=$.pathname||"",X=$.search?($.search.startsWith("?")?"":"?")+$.search:"",G=$.hash||"",J=$.auth?$.auth+"@":"",Q=$.host||"";return($.protocol||$[DK4]?($.protocol||"")+"//":"")+J+Q+Y+X+G}class BK4 extends Error{constructor($,Y){super($,Y);if(this.name="FetchError",Y?.cause&&!this.cause)this.cause=Y.cause}}function s59($){let Y=$.error?.message||$.error?.toString()||"",X=$.request?.method||$.options?.method||"GET",G=$.request?.url||String($.request)||"/",J=`[${X}] ${JSON.stringify(G)}`,Q=$.response?`${$.response.status} ${$.response.statusText}`:"<no response>",W=`${J}: ${Q}${Y?` ${Y}`:""}`,Z=new BK4(W,$.error?{cause:$.error}:void 0);for(let K of["request","options","response"])Object.defineProperty(Z,K,{get(){return $[K]}});for(let[K,H]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(Z,K,{get(){return $.response&&$.response[H]}});return Z}var o59=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function LK4($="GET"){return o59.has($.toUpperCase())}function t59($){if($===void 0)return!1;let Y=typeof $;if(Y==="string"||Y==="number"||Y==="boolean"||Y===null)return!0;if(Y!=="object")return!1;if(Array.isArray($))return!0;if($.buffer)return!1;if($ instanceof FormData||$ instanceof URLSearchParams)return!1;return $.constructor&&$.constructor.name==="Object"||typeof $.toJSON==="function"}var e59=new Set(["image/svg","application/xml","application/xhtml","application/html"]),$79=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Y79($=""){if(!$)return"json";let Y=$.split(";").shift()||"";if($79.test(Y))return"json";if(Y==="text/event-stream")return"stream";if(e59.has(Y)||Y.startsWith("text/"))return"text";return"blob"}function X79($,Y,X,G){let J=G79(Y?.headers??$?.headers,X?.headers,G),Q;if(X?.query||X?.params||Y?.params||Y?.query)Q={...X?.params,...X?.query,...Y?.params,...Y?.query};return{...X,...Y,query:Q,params:Q,headers:J}}function G79($,Y,X){if(!Y)return new X($);let G=new X(Y);if($)for(let[J,Q]of Symbol.iterator in $||Array.isArray($)?$:new X($))G.set(J,Q);return G}async function S70($,Y){if(Y)if(Array.isArray(Y))for(let X of Y)await X($);else await Y($)}var J79=new Set([408,409,425,429,500,502,503,504]),Q79=new Set([101,204,205,304]);function _g0($={}){let{fetch:Y=globalThis.fetch,Headers:X=globalThis.Headers,AbortController:G=globalThis.AbortController}=$;async function J(Z){let K=Z.error&&Z.error.name==="AbortError"&&!Z.options.timeout||!1;if(Z.options.retry!==!1&&!K){let z;if(typeof Z.options.retry==="number")z=Z.options.retry;else z=LK4(Z.options.method)?0:1;let V=Z.response&&Z.response.status||500;if(z>0&&(Array.isArray(Z.options.retryStatusCodes)?Z.options.retryStatusCodes.includes(V):J79.has(V))){let A=typeof Z.options.retryDelay==="function"?Z.options.retryDelay(Z):Z.options.retryDelay||0;if(A>0)await new Promise((F)=>setTimeout(F,A));return Q(Z.request,{...Z.options,retry:z-1})}}let H=s59(Z);if(Error.captureStackTrace)Error.captureStackTrace(H,Q);throw H}let Q=async function(K,H={}){let z={request:K,options:X79(K,H,$.defaults,X),response:void 0,error:void 0};if(z.options.method)z.options.method=z.options.method.toUpperCase();if(z.options.onRequest){if(await S70(z,z.options.onRequest),!(z.options.headers instanceof X))z.options.headers=new X(z.options.headers||{})}if(typeof z.request==="string"){if(z.options.baseURL)z.request=AK4(z.request,z.options.baseURL);if(z.options.query)z.request=FK4(z.request,z.options.query),delete z.options.query;if("query"in z.options)delete z.options.query;if("params"in z.options)delete z.options.params}if(z.options.body&&LK4(z.options.method)){if(t59(z.options.body)){let F=z.options.headers.get("content-type");if(typeof z.options.body!=="string")z.options.body=F==="application/x-www-form-urlencoded"?new URLSearchParams(z.options.body).toString():JSON.stringify(z.options.body);if(!F)z.options.headers.set("content-type","application/json");if(!z.options.headers.has("accept"))z.options.headers.set("accept","application/json")}else if("pipeTo"in z.options.body&&typeof z.options.body.pipeTo==="function"||typeof z.options.body.pipe==="function"){if(!("duplex"in z.options))z.options.duplex="half"}}let V;if(!z.options.signal&&z.options.timeout){let F=new G;V=setTimeout(()=>{let N=Error("[TimeoutError]: The operation was aborted due to timeout");N.name="TimeoutError",N.code=23,F.abort(N)},z.options.timeout),z.options.signal=F.signal}try{z.response=await Y(z.request,z.options)}catch(F){if(z.error=F,z.options.onRequestError)await S70(z,z.options.onRequestError);return await J(z)}finally{if(V)clearTimeout(V)}if((z.response.body||z.response._bodyInit)&&!Q79.has(z.response.status)&&z.options.method!=="HEAD"){let F=(z.options.parseResponse?"json":z.options.responseType)||Y79(z.response.headers.get("content-type")||"");switch(F){case"json":{let N=await z.response.text(),D=z.options.parseResponse||UK4;z.response._data=D(N);break}case"stream":{z.response._data=z.response.body||z.response._bodyInit;break}default:z.response._data=await z.response[F]()}}if(z.options.onResponse)await S70(z,z.options.onResponse);if(!z.options.ignoreResponseError&&z.response.status>=400&&z.response.status<600){if(z.options.onResponseError)await S70(z,z.options.onResponseError);return await J(z)}return z.response},W=async function(K,H){return(await Q(K,H))._data};return W.raw=Q,W.native=(...Z)=>Y(...Z),W.create=(Z={},K={})=>_g0({...$,...K,defaults:{...$.defaults,...K.defaults,...Z}}),W}var k70=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw Error("unable to locate global object")}(),W79=k70.fetch?(...$)=>k70.fetch(...$):()=>Promise.reject(Error("[ofetch] global.fetch is not supported!")),Z79=k70.Headers,K79=k70.AbortController,OK4=_g0({fetch:W79,Headers:Z79,AbortController:K79});async function pE($,Y="POST",X,G){try{let J={};if(X&&X.length>0)J={"Cache-Control":"no-cache",Authorization:X};else J={"Cache-Control":"no-cache"};return await OK4($,{method:Y,headers:J,body:G?G:null})}catch(J){return console.log(`http execution operation failed:${J}`),`http execution operation failed:${J}`}}var EK4=new Tg0.default({length:10}),U79=new Tg0.default({length:18}),Wu=U.object({}),jg0=U.object({});function MK4($,Y,X){if(Ci(X))Y.forEach((G)=>{i1($,G.key,D4(X,G.value))});else if(Y&&Y.length>0)i1($,Y[0].key,X)}async function Cg0($,Y,X,G,J){let Q=new p1,W=$.nodes,Z=$.edges;Q.set("reqId",X),Q.set("seq",0),Q.set("myContext",{}),Q.set("result",{});let K=c3(W,function(R){return R.type=="start"}),H=c3(W,function(R){return R.type=="end"});if(K<0)throw Error("\u6CA1\u6709\u627E\u5230\u5F00\u59CB\u8282\u70B9");if(H<0)throw Error("\u6CA1\u6709\u627E\u5230\u7ED3\u675F\u8282\u70B9");let z=o9({id:W[K].type+"_"+W[K].id,description:W[K].type,inputSchema:Wu,outputSchema:jg0,execute:async({requestContext:R})=>{let q=R.get("myContext");return z6(q,Y),R.get("logs").push({key:W[K].type+"_"+W[K].id,value:"success"}),{}}}),V=o9({id:W[H].type+"_"+W[H].id,description:W[H].type,inputSchema:Wu,outputSchema:Wu,execute:async({inputData:R,requestContext:q})=>{return q.get("logs").push({key:W[H].type+"_"+W[H].id,value:"success"}),{}}}),A=new Map,F=[],N=TQ({id:J?J:EK4.randomUUID(),inputSchema:Wu,outputSchema:jg0});N.then(z),A.set(W[K].type+"_"+W[K].id,[]);let D=c3(Z,function(R){return R.sourceNodeId==W[K].id}),L=c3(W,function(R){return R.id==Z[D].targetNodeId});Q.set("currentId",Z[D].targetNodeId),Q.set("currentType",W[L].type),Q.set("currentIndex",L),Q.set("flowFinished",!1),Q.set("logs",F),W.forEach((R,q)=>{if(R.type!="end"&&R.type!="start"){let w="business_"+EK4.randomUUID(),I=o9({id:w,description:W[H].type,inputSchema:Wu,outputSchema:jg0,execute:async({inputData:P,requestContext:_})=>{let C=_.get("myContext"),k=_.get("result"),S=_.get("currentId"),T=_.get("currentType"),v=_.get("currentIndex"),x=_.get("logs"),y=_.get("reqId"),d=_.get("seq");if(_.set("seq",d+1),_.get("flowFinished"))return{};try{let g="success";switch(_.get("currentType")){case"entity_crud":{let p=W[v].properties.entityCrud.poolCode,h=W[v].properties.entityCrud.table,n=W[v].properties.entityCrud.type,t=W[v].properties.entityCrud.dynamicObj,s=W[v].properties.entityCrud.template,Z0=W[v].properties.entityCrud.contextKey,X0=await KK4(p,h,n,t,s,C);g=X0,i1(C,Z0,X0);break}case"loop_body":{let p=W[v].properties.loopBody??[];await ZK4(p,_);break}case"code_custom":{let p=W[v].properties.codeCustom;g=await w70(p,C);break}case"mysql_custom":{let p=W[v].properties.mysqlCustom.code,h=await T70(p,C);g=h;let n=W[v].properties.mysqlCustom.dataExtracts??[];MK4(C,n,h);break}case"tool_http":{let p=D4(C,W[v].properties.toolHttp.url),h=D4(C,W[v].properties.toolHttp.auth),n=D4(C,W[v].properties.toolHttp.body),s=await pE(p,n?"POST":"GET",h,n);g=s;let Z0=W[v].properties.toolHttp.dataExtracts??[];MK4(C,Z0,s);break}case"transactional_block":{let p=W[v].properties.transactionalBlock.blockRef_0,h=W[v].properties.transactionalBlock.blockRef_1,n=W[v].properties.transactionalBlock.blockRef_2,t=W[v].properties.transactionalBlock.blockRef_3,s=W[v].properties.transactionalBlock.blockRef_4,Z0=W[v].properties.transactionalBlock.dataSourceSelected,X0=[];X0.push(p),X0.push(h),X0.push(n),X0.push(t),X0.push(s),g=await C70(X0,C,Z0);break}case"field_verify":{let p=W[v].properties.fieldVerify??[],h="failed:";p.forEach((n)=>{let t=D4(C,n.key),s=n.value,Z0=n.msg,X0=!1;if(s=="isNil")X0=wK0(t);else if(s=="isBoolean")X0=IK0(t);else if(s=="isString")X0=_K0(t);else if(s=="isJSON")X0=PK0(t);else if(s=="isJSONArray")X0=vn(t);else if(s=="isJSONObject")X0=xn(t);else if(s=="isJSONValue")X0=fk(t);else if(s=="isNotNil")X0=y2(t);else if(s=="isNotEmpty")X0=!qK0(t);if(!X0)_.set("flowFinished",!0),h=h+Z0,i1(k,"msg",h),g=h});break}case"field_inject":{(W[v].properties.fieldInject??[]).forEach((h)=>{let n=h.value;if(n=="null")i1(C,h.key,null);else if(n=="uuid")i1(C,h.key,U79.randomUUID());else if(n=="yyyy-MM-dd")i1(C,h.key,Ti());else if(n=="yyyy-MM-dd HH:mm:ss")i1(C,h.key,fX());else if(n=="emptyString")i1(C,h.key,"");else if(n=="array")i1(C,h.key,[]);else if(n=="object")i1(C,h.key,{});else if(n=="number0")i1(C,h.key,0);else if(n=="true")i1(C,h.key,!0);else if(n=="false")i1(C,h.key,!1)});break}case"field_extract":{(W[v].properties.fieldExtract??[]).forEach((h)=>{i1(k,h.value,D4(C,h.key))});break}case"log_custom":{let p=W[v].properties.logCustom??"";j70(p,C,y);break}default:break}x.push({key:W[v].type+"_"+W[v].id,value:g}),x2(`\u8282\u70B9\u8F93\u51FA:${HA(g)}`,X)}catch(g){console.error(S+" Operation failed:",g),i1(k,"msg",`Operation failed:${g}`)}if(T=="ifelse"){let g=W[v].properties.ifelse??[];if(g&&g.length>0){let p;g.forEach((t)=>{if(_70(t.value,C,!1))p=t.key});let h=c3(Z,function(t){return t.sourceNodeId==S&&t.text&&t.text.value&&t.text.value==p});if(h<0)return _.set("flowFinished",!0),i1(k,"msg","Operation failed:\u5206\u652F\u5224\u65AD\u7EC4\u4EF6\u6CA1\u6709\u627E\u5230\u6B63\u786E\u7684\u5206\u652F"),{};x.push({key:W[v].type+"_"+W[v].id,value:"success"}),_.set("currentId",Z[h].targetNodeId);let n=c3(W,function(t){return t.id==Z[h].targetNodeId});if(_.set("currentType",W[n].type),_.set("currentIndex",n),W[n].type=="end")_.set("flowFinished",!0);return{}}}let u=c3(Z,function(g){return g.sourceNodeId==S});if(u<0)return _.set("flowFinished",!0),i1(k,"msg","Operation failed:\u6CA1\u6709\u627E\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9"),{};_.set("currentId",Z[u].targetNodeId);let b=c3(W,function(g){return g.id==Z[u].targetNodeId});if(_.set("currentType",W[b].type),_.set("currentIndex",b),W[b].type=="end")_.set("flowFinished",!0);return{}}});N.then(I),A.set(w,[])}}),N.then(V),A.set(W[H].type+"_"+W[H].id,[]),Q.set("seq",Q.get("seq")??2),N.commit();let B=N.createRun(),O=await(await B).start({inputData:{},requestContext:Q});(await B).cancel();let E=Q.get("result"),M=Q.get("myContext");return Q.clear(),console.info(`workflowInstance id:${(await B).runId}:${O.status}`),{outputData:E,myContext:M,runTimeLogs:F}}var qK4=new O4,H27=new RK4.default({length:10}),H79=()=>{return Z5().var.traceId};qK4.post("/:code",async($)=>{try{let Y=H79(),X=$.req.param("code");U.string().parse(X);let J=await $.req.json();try{U.object({}).parse(J)}catch(Z){throw new k0(500,{message:"\u7F3A\u5C11\u8BF7\u6C42\u4F53"})}let Q=J.inputs;try{U.object({}).parse(Q)}catch(Z){Q=J}let W=$.req.query("debug")?$.req.query("debug"):!1;if(W=="true"||W){let Z=J.flowData;U.object({nodes:U.array(U.object({})),edges:U.array(U.object({}))}).parse(Z);let H=t0();H.requestId=Y;let{outputData:z,myContext:V,runTimeLogs:A}=await Cg0(Z,Q,Y,!0);return H.data=z,H.myContext=V,H.runTimeLogs=A,$.json(H)}else{let Z=await II(X?X:"");if(!Z||Z.length==0)throw new k0(500,{message:"API\u7F16\u7801\u4E0D\u5B58\u5728"});let K=Z[0];if(!K)throw new k0(500,{message:"API\u7F16\u7801\u4E0D\u5B58\u5728"});let H=!1,z=U.object({}),V=U.object({});if(K.parames&&K.parames.length>0)z.parse(JSON.parse(K.parames));if(K.simplify&&K.simplify.length>0)V.parse(JSON.parse(K.simplify)),H=!0;if(H){let A=K.parames??"{}",F=N$(K.parames,/{{(.*?)}}/g);if(bk(F))F.forEach((N)=>{let D=n1(n1(N,"{{",""),"}}","");if(D.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");A=n1(A,`{{${D}}}`,D4(Q,D))});i1(K,"parames",A)}if(K)switch(K.type){case"1":{x2(`\u53C2\u6570:${JSON.stringify(Q)}`,Y);let A=K.parames??"{}",F=JSON.parse(A);UA(F,Q);let N=await tP(F,"1",K.sourceType),D=t0();return D.requestId=Y,D.data=N.data,D.total=N.total,x2(`\u54CD\u5E94\u8F93\u51FA:${HA(D)}`,Y),$.json(D)}case"2":{x2(`\u53C2\u6570:${JSON.stringify(Q)}`,Y);let A=K.parames??"{}",F=JSON.parse(A);if(UA(F,Q),K.flow_data){let L=K.flow_data;z6(F,JSON.parse(L))}let N=await tP(F,"2",K.sourceType),D=t0();return D.requestId=Y,D.data=N.data,D.total=N.total,x2(`\u54CD\u5E94\u8F93\u51FA:${HA(D)}`,Y),$.json(D)}case"3":{x2(`\u53C2\u6570:${JSON.stringify(Q)}`,Y);let A=K.parames??"{}",F=JSON.parse(A);if(UA(F,Q),K.flow_data){let N=t0();N.requestId=Y;let D=K.flow_data,{outputData:L}=await Cg0(JSON.parse(D),F,Y,!1);return N.data=L,x2(`\u54CD\u5E94\u8F93\u51FA:${HA(N)}`,Y),$.json(N)}else{let N=t0();return N.requestId=Y,N.data={message:"\u6D41\u7A0B\u6570\u636E\u5F02\u5E38"},$.json(N)}}default:throw new k0(500,{message:"\u672A\u77E5\u7684API\u7C7B\u578B"})}else throw new k0(500,{message:"API\u7F16\u7801\u4E0D\u5B58\u5728"})}}catch(Y){throw console.error(Y),v2.error(Y),new k0(500,{message:`\u8FD0\u884C\u5931\u8D25:${Y}`})}});var IK4=qK4;var PK4=new O4;PK4.get("/",async($)=>{let Y=$.req.query("appId"),X=$.req.query("appSecret"),G=t0();if(!Y||!X)throw new k0(401,{message:"appId\u7F3A\u5C11"});let J=await ki(Y?Y:"",X?X:"");if(J.length==0)throw new k0(401,{message:"appId\u65E0\u6548"});let Q=await rH(J[0].day);return G.data={success:!0,msg:"",token:Q},$.json(G)});var wK4=PK4;var aU=H6("sys_mcpmanager",{id:y0("id"),name:y0("name"),description:y0("description"),paramsSchema:y0("paramsSchema"),code:y0("code"),remark:y0("remark"),transText:y0("transText"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});function Sg0($){let Y=r.raw("1 = 1");if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.description&&$.description.length>0)Y.append(r.raw(` and description like '%${$.description}%'`));if($.remark&&$.remark.length>0)Y.append(r.raw(` and remark like '%${$.remark}%'`));return Y}async function _K4($){return await o0.select().from(aU).where(Sg0($)).limit(Number($.limit)).offset(Number($.offset))}async function jK4($){return await o0.select().from(aU).where(Sg0($))}async function TK4($){return await o0.$count(aU,Sg0($))}async function CK4($){let Y=await o0.$count(aU,R1(aU.id,$.id));if(Y&&Y>0)z79($);else{let X=Date.now();$.id=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(aU).values($)}}async function z79($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await o0.update(aU).set($).where(R1(aU.id,$.id))}async function SK4($){await o0.delete(aU).where(R1(aU.id,$))}var Zu=new O4;Zu.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await _K4(Y),G=await TK4(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});Zu.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await CK4(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});Zu.post("/delete",async($)=>{try{let Y=await $.req.json();await SK4(Y.id);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});Zu.get("/loadServer",async($)=>{try{let Y=t0();return $.json(Y)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5237\u65B0\u5931\u8D25"})}});var vK4=Zu;class T$ extends Error{constructor($,Y){super($);this.errorUri=Y,this.name=this.constructor.name}toResponseObject(){let $={error:this.errorCode,error_description:this.message};if(this.errorUri)$.error_uri=this.errorUri;return $}get errorCode(){return this.constructor.errorCode}}class Ku extends T${}Ku.errorCode="invalid_request";class dE extends T${}dE.errorCode="invalid_client";class cE extends T${}cE.errorCode="invalid_grant";class cj extends T${}cj.errorCode="unauthorized_client";class Uu extends T${}Uu.errorCode="unsupported_grant_type";class Hu extends T${}Hu.errorCode="invalid_scope";class v70 extends T${}v70.errorCode="access_denied";class DV extends T${}DV.errorCode="server_error";class x70 extends T${}x70.errorCode="temporarily_unavailable";class y70 extends T${}y70.errorCode="unsupported_response_type";class b70 extends T${}b70.errorCode="unsupported_token_type";class h70 extends T${}h70.errorCode="invalid_token";class f70 extends T${}f70.errorCode="method_not_allowed";class zu extends T${}zu.errorCode="too_many_requests";class lE extends T${}lE.errorCode="invalid_client_metadata";class g70 extends T${}g70.errorCode="insufficient_scope";class m70 extends T${}m70.errorCode="invalid_target";var xK4={[Ku.errorCode]:Ku,[dE.errorCode]:dE,[cE.errorCode]:cE,[cj.errorCode]:cj,[Uu.errorCode]:Uu,[Hu.errorCode]:Hu,[v70.errorCode]:v70,[DV.errorCode]:DV,[x70.errorCode]:x70,[y70.errorCode]:y70,[b70.errorCode]:b70,[h70.errorCode]:h70,[f70.errorCode]:f70,[zu.errorCode]:zu,[lE.errorCode]:lE,[g70.errorCode]:g70,[m70.errorCode]:m70};O1();O1();var TX=qz().superRefine(($,Y)=>{if(!URL.canParse($))return Y.addIssue({code:f10.custom,message:"URL must be parseable",fatal:!0}),OP}).refine(($)=>{let Y=new URL($);return Y.protocol!=="javascript:"&&Y.protocol!=="data:"&&Y.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),bK4=Y$({resource:j0().url(),authorization_servers:b1(TX).optional(),jwks_uri:j0().url().optional(),scopes_supported:b1(j0()).optional(),bearer_methods_supported:b1(j0()).optional(),resource_signing_alg_values_supported:b1(j0()).optional(),resource_name:j0().optional(),resource_documentation:j0().optional(),resource_policy_uri:j0().url().optional(),resource_tos_uri:j0().url().optional(),tls_client_certificate_bound_access_tokens:U9().optional(),authorization_details_types_supported:b1(j0()).optional(),dpop_signing_alg_values_supported:b1(j0()).optional(),dpop_bound_access_tokens_required:U9().optional()}),kg0=Y$({issuer:j0(),authorization_endpoint:TX,token_endpoint:TX,registration_endpoint:TX.optional(),scopes_supported:b1(j0()).optional(),response_types_supported:b1(j0()),response_modes_supported:b1(j0()).optional(),grant_types_supported:b1(j0()).optional(),token_endpoint_auth_methods_supported:b1(j0()).optional(),token_endpoint_auth_signing_alg_values_supported:b1(j0()).optional(),service_documentation:TX.optional(),revocation_endpoint:TX.optional(),revocation_endpoint_auth_methods_supported:b1(j0()).optional(),revocation_endpoint_auth_signing_alg_values_supported:b1(j0()).optional(),introspection_endpoint:j0().optional(),introspection_endpoint_auth_methods_supported:b1(j0()).optional(),introspection_endpoint_auth_signing_alg_values_supported:b1(j0()).optional(),code_challenge_methods_supported:b1(j0()).optional(),client_id_metadata_document_supported:U9().optional()}),V79=Y$({issuer:j0(),authorization_endpoint:TX,token_endpoint:TX,userinfo_endpoint:TX.optional(),jwks_uri:TX,registration_endpoint:TX.optional(),scopes_supported:b1(j0()).optional(),response_types_supported:b1(j0()),response_modes_supported:b1(j0()).optional(),grant_types_supported:b1(j0()).optional(),acr_values_supported:b1(j0()).optional(),subject_types_supported:b1(j0()),id_token_signing_alg_values_supported:b1(j0()),id_token_encryption_alg_values_supported:b1(j0()).optional(),id_token_encryption_enc_values_supported:b1(j0()).optional(),userinfo_signing_alg_values_supported:b1(j0()).optional(),userinfo_encryption_alg_values_supported:b1(j0()).optional(),userinfo_encryption_enc_values_supported:b1(j0()).optional(),request_object_signing_alg_values_supported:b1(j0()).optional(),request_object_encryption_alg_values_supported:b1(j0()).optional(),request_object_encryption_enc_values_supported:b1(j0()).optional(),token_endpoint_auth_methods_supported:b1(j0()).optional(),token_endpoint_auth_signing_alg_values_supported:b1(j0()).optional(),display_values_supported:b1(j0()).optional(),claim_types_supported:b1(j0()).optional(),claims_supported:b1(j0()).optional(),service_documentation:j0().optional(),claims_locales_supported:b1(j0()).optional(),ui_locales_supported:b1(j0()).optional(),claims_parameter_supported:U9().optional(),request_parameter_supported:U9().optional(),request_uri_parameter_supported:U9().optional(),require_request_uri_registration:U9().optional(),op_policy_uri:TX.optional(),op_tos_uri:TX.optional(),client_id_metadata_document_supported:U9().optional()}),hK4=v1({...V79.shape,...kg0.pick({code_challenge_methods_supported:!0}).shape}),vg0=v1({access_token:j0(),id_token:j0().optional(),token_type:j0(),expires_in:oP.number().optional(),scope:j0().optional(),refresh_token:j0().optional()}).strip(),fK4=v1({error:j0(),error_description:j0().optional(),error_uri:j0().optional()}),yK4=TX.optional().or(L4("").transform(()=>{return})),gK4=v1({redirect_uris:b1(TX),token_endpoint_auth_method:j0().optional(),grant_types:b1(j0()).optional(),response_types:b1(j0()).optional(),client_name:j0().optional(),client_uri:TX.optional(),logo_uri:yK4,scope:j0().optional(),contacts:b1(j0()).optional(),tos_uri:yK4,policy_uri:j0().optional(),jwks_uri:TX.optional(),jwks:_h().optional(),software_id:j0().optional(),software_version:j0().optional(),software_statement:j0().optional()}).strip(),A79=v1({client_id:j0(),client_secret:j0().optional(),client_id_issued_at:H8().optional(),client_secret_expires_at:H8().optional()}).strip(),xg0=gK4.merge(A79),T27=v1({error:j0(),error_description:j0().optional()}).strip(),F79=v1({token:j0(),token_type_hint:j0().optional()}).strip();var yg0;yg0=globalThis.crypto?.webcrypto??globalThis.crypto??import("crypto").then(($)=>$.webcrypto);async function D79($){return(await yg0).getRandomValues(new Uint8Array($))}async function N79($){let X=Math.pow(2,8)-Math.pow(2,8)%66,G="";while(G.length<$){let J=await D79($-G.length);for(let Q of J)if(Q<X)G+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"[Q%66]}return G}async function L79($){return await N79($)}async function B79($){let Y=await(await yg0).subtle.digest("SHA-256",new TextEncoder().encode($));return btoa(String.fromCharCode(...new Uint8Array(Y))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function bg0($){if(!$)$=43;if($<43||$>128)throw`Expected a length between 43 and 128. Received ${$}.`;let Y=await L79($),X=await B79(Y);return{code_verifier:Y,code_challenge:X}}var mK4=($,Y)=>{return new Response($,{headers:{"Content-Type":Y}}).formData()};var r27=v1({client_id:j0(),redirect_uri:j0().optional().refine(($)=>$===void 0||URL.canParse($),{message:"redirect_uri must be a valid URL"})}),a27=v1({response_type:L4("code"),code_challenge:j0(),code_challenge_method:L4("S256"),scope:j0().optional(),state:j0().optional(),resource:qz().optional()});var s27=v1({grant_type:j0()}),o27=v1({code:j0(),code_verifier:j0(),redirect_uri:j0().optional(),resource:qz().optional()}),t27=v1({refresh_token:j0(),scope:j0().optional(),resource:qz().optional()});var e27=v1({client_id:j0(),client_secret:j0().optional()});BY();var W$0=class{writer;encoder;writable;abortSubscribers=[];responseReadable;aborted=!1;closed=!1;constructor($,Y){this.writable=$,this.writer=$.getWriter(),this.encoder=new TextEncoder;let X=Y.getReader();this.abortSubscribers.push(async()=>{await X.cancel()}),this.responseReadable=new ReadableStream({async pull(G){let{done:J,value:Q}=await X.read();J?G.close():G.enqueue(Q)},cancel:()=>{this.abort()}})}async write($){try{if(typeof $==="string")$=this.encoder.encode($);await this.writer.write($)}catch{}return this}async writeln($){return await this.write($+`
`),this}sleep($){return new Promise((Y)=>setTimeout(Y,$))}async close(){try{await this.writer.close()}catch{}this.closed=!0}async pipe($){this.writer.releaseLock(),await $.pipeTo(this.writable,{preventClose:!0}),this.writer=this.writable.getWriter()}onAbort($){this.abortSubscribers.push($)}abort(){if(!this.aborted)this.aborted=!0,this.abortSubscribers.forEach(($)=>$())}};var Z$0=()=>{let $=typeof Bun<"u"?Bun.version:void 0;if($===void 0)return!1;let Y=$.startsWith("1.1")||$.startsWith("1.0")||$.startsWith("0.");return Z$0=()=>Y,Y};var y79=new WeakMap,K$0=($,Y,X)=>{let{readable:G,writable:J}=new TransformStream,Q=new W$0(J,G);if(Z$0())$.req.raw.signal.addEventListener("abort",()=>{if(!Q.closed)Q.abort()});return y79.set(Q.responseReadable,$),(async()=>{try{await Y(Q)}catch(W){if(W===void 0);else if(W instanceof Error&&X)await X(W,Q);else console.error(W)}finally{Q.close()}})(),$.newResponse(Q.responseReadable)};var Xm0=class extends W$0{constructor($,Y){super($,Y)}async writeSSE($){let X=(await YS($.data,Ac.Stringify,!1,{})).split(/\r\n|\r|\n/).map((J)=>{return`data: ${J}`}).join(`
`);for(let J of["event","id","retry"])if($[J]&&/[\r\n]/.test($[J]))throw Error(`${J} must not contain "\\r" or "\\n"`);let G=[$.event&&`event: ${$.event}`,X,$.id&&`id: ${$.id}`,$.retry&&`retry: ${$.retry}`].filter(Boolean).join(`
`)+`

`;await this.write(G)}};var i34=()=>{let $=typeof Bun<"u"?Bun.version:void 0;if($===void 0)return!1;let Y=$.startsWith("1.1")||$.startsWith("1.0")||$.startsWith("0.");return i34=()=>Y,Y},b79=async($,Y,X)=>{try{await Y($)}catch(G){if(G instanceof Error&&X)await X(G,$),await $.writeSSE({event:"error",data:G.message});else console.error(G)}},h79=new WeakMap,c34=($,Y,X)=>{let{readable:G,writable:J}=new TransformStream,Q=new Xm0(J,G);if(i34())$.req.raw.signal.addEventListener("abort",()=>{if(!Q.closed)Q.abort()});return h79.set(Q.responseReadable,$),$.header("Transfer-Encoding","chunked"),$.header("Content-Type","text/event-stream"),$.header("Cache-Control","no-cache"),$.header("Connection","keep-alive"),b79(Q,Y,X),$.newResponse(Q.responseReadable)},U$0=class{#$=!1;#Y=!1;#X;#J;#G;#Q;#U=!1;#K="_GET_stream";#W=new Map;#H=new Map;#A=new Map;#V;#Z;#L;sessionId;onclose;onerror;onmessage;constructor($){this.#G=$?.sessionIdGenerator,this.#U=$?.enableJsonResponse??!1,this.#Q=$?.eventStore,this.#X=$?.onsessioninitialized,this.#J=$?.onsessionclosed,this.#V=$?.allowedHosts,this.#Z=$?.allowedOrigins,this.#L=$?.enableDnsRebindingProtection??!1}async start(){if(this.#$)throw Error("Transport already started");this.#$=!0}#O($){if(!this.#L)return;if(this.#V&&this.#V.length>0){let Y=$.req.header("Host");if(!Y||!this.#V.includes(Y))return`Invalid Host header: ${Y}`}if(this.#Z&&this.#Z.length>0){let Y=$.req.header("Origin");if(!Y||!this.#Z.includes(Y))return`Invalid Origin header: ${Y}`}}async handleRequest($,Y){let X=this.#O($);if(X)throw new k0(403,{res:Response.json({jsonrpc:"2.0",error:{code:-32000,message:X},id:null})});switch($.req.method){case"GET":return this.handleGetRequest($);case"POST":return this.handlePostRequest($,Y);case"DELETE":return this.handleDeleteRequest($);default:return this.handleUnsupportedRequest($)}}async handleGetRequest($){try{if(!$.req.header("Accept")?.includes("text/event-stream"))throw new k0(406,{res:Response.json({jsonrpc:"2.0",error:{code:-32000,message:"Not Acceptable: Client must accept text/event-stream"},id:null})});if(this.#N($),this.#B($),this.sessionId!==void 0)$.header("mcp-session-id",this.sessionId);let Y=this.#K;if(this.#Q){let X=$.req.header("last-event-id");if(X)Y=(G)=>this.#Q.replayEventsAfter(X,{send:async(J,Q)=>{try{await G.writeSSE({id:J,event:"message",data:JSON.stringify(Q)})}catch{throw this.onerror?.(Error("Failed replay events")),new k0(500,{message:"Failed replay events"})}}})}if(typeof Y==="string"&&this.#W.get(Y)!==void 0)throw new k0(409,{res:Response.json({jsonrpc:"2.0",error:{code:-32000,message:"Conflict: Only one SSE stream is allowed per session"},id:null})});return c34($,async(X)=>{let G=typeof Y==="string"?Y:await Y(X),J=setInterval(()=>{if(!X.closed)X.writeSSE({data:"",event:"ping"}).catch(()=>{X.abort()})},30000);if(typeof J==="object"&&"unref"in J)J.unref();this.#W.set(G,{ctx:{header:$.header},stream:X,cleanup:()=>{clearInterval(J),this.#W.delete(G)}}),X.onAbort(()=>{this.#W.get(G)?.cleanup()})})}catch(Y){if(Y instanceof k0)throw Y;throw this.onerror?.(Y),new k0(400,{res:Response.json({jsonrpc:"2.0",error:{code:_1.ParseError,message:"Parse error",data:String(Y)},id:null})})}}async handlePostRequest($,Y){try{let X=$.req.header("Accept");if(!X?.includes("application/json")||!X.includes("text/event-stream"))throw new k0(406,{res:Response.json({jsonrpc:"2.0",error:{code:_1.ConnectionClosed,message:"Not Acceptable: Client must accept both application/json and text/event-stream"},id:null})});if(!$.req.header("Content-Type")?.includes("application/json"))throw new k0(415,{res:Response.json({jsonrpc:"2.0",error:{code:_1.ConnectionClosed,message:"Unsupported Media Type: Content-Type must be application/json"},id:null})});let G=$.get("auth"),J={headers:$.req.header()},Q=Y;if(Q===void 0)Q=await $.req.json();let W;if(Array.isArray(Q))W=Q.map((H)=>C$.parse(H));else W=[C$.parse(Q)];let Z=W.some(rj);if(Z){if(this.#Y&&this.sessionId!==void 0)throw new k0(400,{res:Response.json({jsonrpc:"2.0",error:{code:_1.InvalidRequest,message:"Invalid Request: Server already initialized"},id:null})});if(W.length>1)throw new k0(400,{res:Response.json({jsonrpc:"2.0",error:{code:_1.InvalidRequest,message:"Invalid Request: Only one initialization request is allowed"},id:null})});if(this.sessionId=this.#G?.(),this.#Y=!0,this.sessionId&&this.#X)await this.#X(this.sessionId)}if(!Z)this.#N($),this.#B($);let K=W.some(DJ);if(!K){for(let H of W)this.onmessage?.(H,{authInfo:G,requestInfo:J});return $.json(null,{status:202})}if(K){let H=crypto.randomUUID();if(!this.#U&&this.sessionId!==void 0)$.header("mcp-session-id",this.sessionId);if(this.#U)return await new Promise((z)=>{for(let V of W)if(DJ(V))this.#W.set(H,{ctx:{header:$.header,json:(A)=>{z($.json(A))}},cleanup:()=>{this.#W.delete(H)}}),this.#H.set(V.id,H);for(let V of W)this.onmessage?.(V,{authInfo:G,requestInfo:J})});return c34($,async(z)=>{for(let V of W)if(DJ(V))this.#W.set(H,{ctx:{header:$.header},stream:z,cleanup:()=>{this.#W.delete(H)}}),this.#H.set(V.id,H);for(let V of W)this.onmessage?.(V,{authInfo:G,requestInfo:J});z.onAbort(()=>{this.#W.get(H)?.cleanup()})})}}catch(X){if(X instanceof k0)throw X;throw this.onerror?.(X),new k0(400,{res:Response.json({jsonrpc:"2.0",error:{code:_1.ParseError,message:"Parse error",data:String(X)},id:null})})}}async handleDeleteRequest($){if(this.#N($),this.#B($),this.#J&&this.sessionId)await Promise.resolve(this.#J(this.sessionId));return await this.close(),$.body(null,200)}handleUnsupportedRequest($){return $.json({jsonrpc:"2.0",error:{code:_1.ConnectionClosed,message:"Method not allowed."},id:null},{status:405,headers:{Allow:"GET, POST, DELETE"}})}#N($){if(this.#G===void 0)return!0;if(!this.#Y)throw new k0(400,{res:Response.json({jsonrpc:"2.0",error:{code:_1.ConnectionClosed,message:"Bad Request: Server not initialized"},id:null})});let Y=$.req.header("mcp-session-id");if(!Y)throw new k0(400,{res:Response.json({jsonrpc:"2.0",error:{code:_1.ConnectionClosed,message:"Bad Request: Mcp-Session-Id header is required"},id:null})});if(Array.isArray(Y))throw new k0(400,{res:Response.json({jsonrpc:"2.0",error:{code:_1.ConnectionClosed,message:"Bad Request: Mcp-Session-Id header must be a single value"},id:null})});if(Y!==this.sessionId)throw new k0(404,{res:Response.json({jsonrpc:"2.0",error:{code:_1.RequestTimeout,message:"Session not found"},id:null})});return!0}#B($){let Y=$.req.header("mcp-protocol-version")??Au;if(Array.isArray(Y))Y=Y[Y.length-1];if(!Y2.includes(Y))throw new k0(404,{res:Response.json({jsonrpc:"2.0",error:{code:_1.ConnectionClosed,message:`Bad Request: Unsupported protocol version (supported versions: ${Y2.join(", ")})`},id:null})});return!0}async close(){for(let{stream:$}of this.#W.values())$?.abort();this.#W.clear(),this.#A.clear(),this.onclose?.()}async send($,Y){let X=Y?.relatedRequestId;if(CX($)||G2($))X=$.id;if(X===void 0){if(CX($)||G2($))throw Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");let Q=this.#W.get(this.#K);if(Q===void 0)return;let W;if(this.#Q)W=await this.#Q.storeEvent(this.#K,$);return Q.stream?.writeSSE({id:W,event:"message",data:JSON.stringify($)})}let G=this.#H.get(X),J=this.#W.get(G);if(!G)throw Error(`No connection established for request ID: ${String(X)}`);if(!this.#U){let Q;if(this.#Q)Q=await this.#Q.storeEvent(G,$);if(J)await J.stream?.writeSSE({id:Q,event:"message",data:JSON.stringify($)})}if(CX($)||G2($)){this.#A.set(X,$);let Q=Array.from(this.#H.entries()).filter(([,W])=>this.#W.get(W)===J).map(([W])=>W);if(Q.every((W)=>this.#A.has(W))){if(!J)throw Error(`No connection established for request ID: ${String(X)}`);if(this.#U){if(this.sessionId!==void 0)J.ctx.header("mcp-session-id",this.sessionId);let W=Q.map((Z)=>this.#A.get(Z));J.ctx.json?.(W.length===1?W[0]:W);return}else J.stream?.abort();for(let W of Q)this.#A.delete(W),this.#H.delete(W)}}}},TK7=class{#$;#Y;#X;#J;#G;constructor($={}){let{streamBufferSize:Y=100,eventsPerStreamBufferSize:X=100,idGenerator:G=()=>crypto.randomUUID()}=$;this.#X=new Map,this.#J=new Map,this.#$=X,this.#G=G,this.#Y=new l34(Y,({streamId:J,events:Q})=>{this.#X.delete(J),Q.reset()})}async storeEvent($,Y){let X=this.#G();if(this.#J.set(X,$),!this.#X.has($)||this.#Y.get(this.#X.get($))==null)this.#X.set($,this.#Y.head),this.#Y.push({streamId:$,events:new l34(this.#$,({id:G})=>{this.#J.delete(G)})});return this.#Y.get(this.#X.get($)).events.push({id:X,message:Y}),X}async replayEventsAfter($,Y){let X=this.#J.get($);if(!X)return"_unknown_stream";let G=this.#Y.get(this.#X.get(X)).events.read(),J=G.findIndex((W)=>W.id===$),Q=J>-1?G.slice(J+1):G;for(let W of Q)await Y.send(W.id,W.message);return X}reset(){this.#Y.reset(),this.#X.clear(),this.#J.clear()}},l34=class{#$;#Y;#X;#J;#G;constructor($,Y){this.#$=Array($),this.#Y=0,this.#X=0,this.#J=$,this.#G=Y}get head(){return this.#Y}push($){let Y=this.#Y%this.#J,X=this.#$[Y];if(X!=null&&this.#G!=null)this.#G(X);this.#$[Y]=$,this.#Y++,this.#X=Math.max(this.#X,this.#Y-this.#J)}get($){if($<this.#X||$>=this.#Y)return;return this.#$[$%this.#J]}read(){let $=[];for(let Y=this.#X;Y<this.#Y;Y++){let X=this.get(Y);if(X==null)break;$.push(X)}return $}reset(){if(this.#G!=null)for(let $ of this.read())this.#G($);this.#$=Array(this.#J),this.#Y=0,this.#X=0}};cG();sX();sX();sX();_4();var g79=x0("ZodMiniType",($,Y)=>{if(!$._zod)throw Error("Uninitialized schema in ZodMiniType.");Z6.init($,Y),$.def=Y,$.type=Y.type,$.parse=(X,G)=>xB($,X,G,{callee:$.parse}),$.safeParse=(X,G)=>FF($,X,G),$.parseAsync=async(X,G)=>yB($,X,G,{callee:$.parseAsync}),$.safeParseAsync=async(X,G)=>DF($,X,G),$.check=(...X)=>{return $.clone({...Y,checks:[...Y.checks??[],...X.map((G)=>typeof G==="function"?{_zod:{check:G,def:{check:"custom"},onattach:[]}}:G)]},{parent:!0})},$.with=$.check,$.clone=(X,G)=>hY($,X,G),$.brand=()=>$,$.register=(X,G)=>{return X.add($,G),$},$.apply=(X)=>X($)});var m79=x0("ZodMiniObject",($,Y)=>{be.init($,Y),g79.init($,Y),m6($,"shape",()=>Y.shape)});function Gm0($,Y){let X={type:"object",shape:$??{},...q1(Y)};return new m79(X)}hP();Z00();function CQ($){return!!$._zod}function GM($){let Y=Object.values($);if(Y.length===0)return Gm0({});let X=Y.every(CQ),G=Y.every((J)=>!CQ(J));if(X)return Gm0($);if(G)return lj0($);throw Error("Mixed Zod versions detected in object shape.")}function BJ($,Y){if(CQ($))return FF($,Y);return $.safeParse(Y)}async function H$0($,Y){if(CQ($))return await DF($,Y);return await $.safeParseAsync(Y)}function tU($){if(!$)return;let Y;if(CQ($))Y=$._zod?.def?.shape;else Y=$.shape;if(!Y)return;if(typeof Y==="function")try{return Y()}catch{return}return Y}function KT($){if(!$)return;if(typeof $==="object"){let Y=$,X=$;if(!Y._def&&!X._zod){let G=Object.values($);if(G.length>0&&G.every((J)=>typeof J==="object"&&J!==null&&(J._def!==void 0||J._zod!==void 0||typeof J.parse==="function")))return GM($)}}if(CQ($)){let X=$._zod?.def;if(X&&(X.type==="object"||X.shape!==void 0))return $}else if($.shape!==void 0)return $;return}function z$0($){if($&&typeof $==="object"){if("message"in $&&typeof $.message==="string")return $.message;if("issues"in $&&Array.isArray($.issues)&&$.issues.length>0){let Y=$.issues[0];if(Y&&typeof Y==="object"&&"message"in Y)return String(Y.message)}try{return JSON.stringify($)}catch{return String($)}}return String($)}function n34($){return $.description}function r34($){if(CQ($))return $._zod?.def?.type==="optional";let Y=$;if(typeof $.isOptional==="function")return $.isOptional();return Y._def?.typeName==="ZodOptional"}function V$0($){if(CQ($)){let Q=$._zod?.def;if(Q){if(Q.value!==void 0)return Q.value;if(Array.isArray(Q.values)&&Q.values.length>0)return Q.values[0]}}let X=$._def;if(X){if(X.value!==void 0)return X.value;if(Array.isArray(X.values)&&X.values.length>0)return X.values[0]}let G=$.value;if(G!==void 0)return G;return}BY();function fD($){return $==="completed"||$==="failed"||$==="cancelled"}R40();function p79($){if(!$)return"draft-7";if($==="jsonSchema7"||$==="draft-7")return"draft-7";if($==="jsonSchema2019-09"||$==="draft-2020-12")return"draft-2020-12";return"draft-7"}function Jm0($,Y){if(CQ($))return $$($,{target:p79(Y?.target),io:Y?.pipeStrategy??"input"});return E40($,{strictUnions:Y?.strictUnions??!0,pipeStrategy:Y?.pipeStrategy??"input"})}function Qm0($){let X=tU($)?.method;if(!X)throw Error("Schema is missing a method literal");let G=V$0(X);if(typeof G!=="string")throw Error("Schema method literal must be a string");return G}function Wm0($,Y){let X=BJ($,Y);if(!X.success)throw X.error;return X.data}var A$0=60000;class JM{constructor($){if(this._options=$,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Nu,(Y)=>{this._oncancel(Y)}),this.setNotificationHandler(aE,(Y)=>{this._onprogress(Y)}),this.setRequestHandler(rE,(Y)=>({})),this._taskStore=$?.taskStore,this._taskMessageQueue=$?.taskMessageQueue,this._taskStore)this.setRequestHandler(Ou,async(Y,X)=>{let G=await this._taskStore.getTask(Y.params.taskId,X.sessionId);if(!G)throw new r1(_1.InvalidParams,"Failed to retrieve task: Task not found");return{...G}}),this.setRequestHandler(Mu,async(Y,X)=>{let G=async()=>{let J=Y.params.taskId;if(this._taskMessageQueue){let W;while(W=await this._taskMessageQueue.dequeue(J,X.sessionId)){if(W.type==="response"||W.type==="error"){let Z=W.message,K=Z.id,H=this._requestResolvers.get(K);if(H)if(this._requestResolvers.delete(K),W.type==="response")H(Z);else{let z=Z,V=new r1(z.error.code,z.error.message,z.error.data);H(V)}else{let z=W.type==="response"?"Response":"Error";this._onerror(Error(`${z} handler missing for request ${K}`))}continue}await this._transport?.send(W.message,{relatedRequestId:X.requestId})}}let Q=await this._taskStore.getTask(J,X.sessionId);if(!Q)throw new r1(_1.InvalidParams,`Task not found: ${J}`);if(!fD(Q.status))return await this._waitForTaskUpdate(J,X.signal),await G();if(fD(Q.status)){let W=await this._taskStore.getTaskResult(J,X.sessionId);return this._clearTaskQueue(J),{...W,_meta:{...W._meta,[LV]:{taskId:J}}}}return await G()};return await G()}),this.setRequestHandler(Ru,async(Y,X)=>{try{let{tasks:G,nextCursor:J}=await this._taskStore.listTasks(Y.params?.cursor,X.sessionId);return{tasks:G,nextCursor:J,_meta:{}}}catch(G){throw new r1(_1.InvalidParams,`Failed to list tasks: ${G instanceof Error?G.message:String(G)}`)}}),this.setRequestHandler(Iu,async(Y,X)=>{try{let G=await this._taskStore.getTask(Y.params.taskId,X.sessionId);if(!G)throw new r1(_1.InvalidParams,`Task not found: ${Y.params.taskId}`);if(fD(G.status))throw new r1(_1.InvalidParams,`Cannot cancel task in terminal status: ${G.status}`);await this._taskStore.updateTaskStatus(Y.params.taskId,"cancelled","Client cancelled task execution.",X.sessionId),this._clearTaskQueue(Y.params.taskId);let J=await this._taskStore.getTask(Y.params.taskId,X.sessionId);if(!J)throw new r1(_1.InvalidParams,`Task not found after cancellation: ${Y.params.taskId}`);return{_meta:{},...J}}catch(G){if(G instanceof r1)throw G;throw new r1(_1.InvalidRequest,`Failed to cancel task: ${G instanceof Error?G.message:String(G)}`)}})}async _oncancel($){if(!$.params.requestId)return;this._requestHandlerAbortControllers.get($.params.requestId)?.abort($.params.reason)}_setupTimeout($,Y,X,G,J=!1){this._timeoutInfo.set($,{timeoutId:setTimeout(G,Y),startTime:Date.now(),timeout:Y,maxTotalTimeout:X,resetTimeoutOnProgress:J,onTimeout:G})}_resetTimeout($){let Y=this._timeoutInfo.get($);if(!Y)return!1;let X=Date.now()-Y.startTime;if(Y.maxTotalTimeout&&X>=Y.maxTotalTimeout)throw this._timeoutInfo.delete($),r1.fromError(_1.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:Y.maxTotalTimeout,totalElapsed:X});return clearTimeout(Y.timeoutId),Y.timeoutId=setTimeout(Y.onTimeout,Y.timeout),!0}_cleanupTimeout($){let Y=this._timeoutInfo.get($);if(Y)clearTimeout(Y.timeoutId),this._timeoutInfo.delete($)}async connect($){if(this._transport)throw Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=$;let Y=this.transport?.onclose;this._transport.onclose=()=>{Y?.(),this._onclose()};let X=this.transport?.onerror;this._transport.onerror=(J)=>{X?.(J),this._onerror(J)};let G=this._transport?.onmessage;this._transport.onmessage=(J,Q)=>{if(G?.(J,Q),CX(J)||G2(J))this._onresponse(J);else if(DJ(J))this._onrequest(J,Q);else if(dg0(J))this._onnotification(J);else this._onerror(Error(`Unknown message type: ${JSON.stringify(J)}`))},await this._transport.start()}_onclose(){let $=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let X of this._timeoutInfo.values())clearTimeout(X.timeoutId);this._timeoutInfo.clear();for(let X of this._requestHandlerAbortControllers.values())X.abort();this._requestHandlerAbortControllers.clear();let Y=r1.fromError(_1.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let X of $.values())X(Y)}_onerror($){this.onerror?.($)}_onnotification($){let Y=this._notificationHandlers.get($.method)??this.fallbackNotificationHandler;if(Y===void 0)return;Promise.resolve().then(()=>Y($)).catch((X)=>this._onerror(Error(`Uncaught error in notification handler: ${X}`)))}_onrequest($,Y){let X=this._requestHandlers.get($.method)??this.fallbackRequestHandler,G=this._transport,J=$.params?._meta?.[LV]?.taskId;if(X===void 0){let H={jsonrpc:"2.0",id:$.id,error:{code:_1.MethodNotFound,message:"Method not found"}};if(J&&this._taskMessageQueue)this._enqueueTaskMessage(J,{type:"error",message:H,timestamp:Date.now()},G?.sessionId).catch((z)=>this._onerror(Error(`Failed to enqueue error response: ${z}`)));else G?.send(H).catch((z)=>this._onerror(Error(`Failed to send an error response: ${z}`)));return}let Q=new AbortController;this._requestHandlerAbortControllers.set($.id,Q);let W=mg0($.params)?$.params.task:void 0,Z=this._taskStore?this.requestTaskStore($,G?.sessionId):void 0,K={signal:Q.signal,sessionId:G?.sessionId,_meta:$.params?._meta,sendNotification:async(H)=>{if(Q.signal.aborted)return;let z={relatedRequestId:$.id};if(J)z.relatedTask={taskId:J};await this.notification(H,z)},sendRequest:async(H,z,V)=>{if(Q.signal.aborted)throw new r1(_1.ConnectionClosed,"Request was cancelled");let A={...V,relatedRequestId:$.id};if(J&&!A.relatedTask)A.relatedTask={taskId:J};let F=A.relatedTask?.taskId??J;if(F&&Z)await Z.updateTaskStatus(F,"input_required");return await this.request(H,z,A)},authInfo:Y?.authInfo,requestId:$.id,requestInfo:Y?.requestInfo,taskId:J,taskStore:Z,taskRequestedTtl:W?.ttl,closeSSEStream:Y?.closeSSEStream,closeStandaloneSSEStream:Y?.closeStandaloneSSEStream};Promise.resolve().then(()=>{if(W)this.assertTaskHandlerCapability($.method)}).then(()=>X($,K)).then(async(H)=>{if(Q.signal.aborted)return;let z={result:H,jsonrpc:"2.0",id:$.id};if(J&&this._taskMessageQueue)await this._enqueueTaskMessage(J,{type:"response",message:z,timestamp:Date.now()},G?.sessionId);else await G?.send(z)},async(H)=>{if(Q.signal.aborted)return;let z={jsonrpc:"2.0",id:$.id,error:{code:Number.isSafeInteger(H.code)?H.code:_1.InternalError,message:H.message??"Internal error",...H.data!==void 0&&{data:H.data}}};if(J&&this._taskMessageQueue)await this._enqueueTaskMessage(J,{type:"error",message:z,timestamp:Date.now()},G?.sessionId);else await G?.send(z)}).catch((H)=>this._onerror(Error(`Failed to send response: ${H}`))).finally(()=>{if(this._requestHandlerAbortControllers.get($.id)===Q)this._requestHandlerAbortControllers.delete($.id)})}_onprogress($){let{progressToken:Y,...X}=$.params,G=Number(Y),J=this._progressHandlers.get(G);if(!J){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify($)}`));return}let Q=this._responseHandlers.get(G),W=this._timeoutInfo.get(G);if(W&&Q&&W.resetTimeoutOnProgress)try{this._resetTimeout(G)}catch(Z){this._responseHandlers.delete(G),this._progressHandlers.delete(G),this._cleanupTimeout(G),Q(Z);return}J(X)}_onresponse($){let Y=Number($.id),X=this._requestResolvers.get(Y);if(X){if(this._requestResolvers.delete(Y),CX($))X($);else{let Q=new r1($.error.code,$.error.message,$.error.data);X(Q)}return}let G=this._responseHandlers.get(Y);if(G===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify($)}`));return}this._responseHandlers.delete(Y),this._cleanupTimeout(Y);let J=!1;if(CX($)&&$.result&&typeof $.result==="object"){let Q=$.result;if(Q.task&&typeof Q.task==="object"){let W=Q.task;if(typeof W.taskId==="string")J=!0,this._taskProgressTokens.set(W.taskId,Y)}}if(!J)this._progressHandlers.delete(Y);if(CX($))G($);else{let Q=r1.fromError($.error.code,$.error.message,$.error.data);G(Q)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream($,Y,X){let{task:G}=X??{};if(!G){try{yield{type:"result",result:await this.request($,Y,X)}}catch(Q){yield{type:"error",error:Q instanceof r1?Q:new r1(_1.InternalError,String(Q))}}return}let J;try{let Q=await this.request($,sU,X);if(Q.task)J=Q.task.taskId,yield{type:"taskCreated",task:Q.task};else throw new r1(_1.InternalError,"Task creation did not return a task");while(!0){let W=await this.getTask({taskId:J},X);if(yield{type:"taskStatus",task:W},fD(W.status)){if(W.status==="completed")yield{type:"result",result:await this.getTaskResult({taskId:J},Y,X)};else if(W.status==="failed")yield{type:"error",error:new r1(_1.InternalError,`Task ${J} failed`)};else if(W.status==="cancelled")yield{type:"error",error:new r1(_1.InternalError,`Task ${J} was cancelled`)};return}if(W.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:J},Y,X)};return}let Z=W.pollInterval??this._options?.defaultTaskPollInterval??1000;await new Promise((K)=>setTimeout(K,Z)),X?.signal?.throwIfAborted()}}catch(Q){yield{type:"error",error:Q instanceof r1?Q:new r1(_1.InternalError,String(Q))}}}request($,Y,X){let{relatedRequestId:G,resumptionToken:J,onresumptiontoken:Q,task:W,relatedTask:Z}=X??{};return new Promise((K,H)=>{let z=(B)=>{H(B)};if(!this._transport){z(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{if(this.assertCapabilityForMethod($.method),W)this.assertTaskCapability($.method)}catch(B){z(B);return}X?.signal?.throwIfAborted();let V=this._requestMessageId++,A={...$,jsonrpc:"2.0",id:V};if(X?.onprogress)this._progressHandlers.set(V,X.onprogress),A.params={...$.params,_meta:{...$.params?._meta||{},progressToken:V}};if(W)A.params={...A.params,task:W};if(Z)A.params={...A.params,_meta:{...A.params?._meta||{},[LV]:Z}};let F=(B)=>{this._responseHandlers.delete(V),this._progressHandlers.delete(V),this._cleanupTimeout(V),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:V,reason:String(B)}},{relatedRequestId:G,resumptionToken:J,onresumptiontoken:Q}).catch((E)=>this._onerror(Error(`Failed to send cancellation: ${E}`)));let O=B instanceof r1?B:new r1(_1.RequestTimeout,String(B));H(O)};this._responseHandlers.set(V,(B)=>{if(X?.signal?.aborted)return;if(B instanceof Error)return H(B);try{let O=BJ(Y,B.result);if(!O.success)H(O.error);else K(O.data)}catch(O){H(O)}}),X?.signal?.addEventListener("abort",()=>{F(X?.signal?.reason)});let N=X?.timeout??A$0,D=()=>F(r1.fromError(_1.RequestTimeout,"Request timed out",{timeout:N}));this._setupTimeout(V,N,X?.maxTotalTimeout,D,X?.resetTimeoutOnProgress??!1);let L=Z?.taskId;if(L){let B=(O)=>{let E=this._responseHandlers.get(V);if(E)E(O);else this._onerror(Error(`Response handler missing for side-channeled request ${V}`))};this._requestResolvers.set(V,B),this._enqueueTaskMessage(L,{type:"request",message:A,timestamp:Date.now()}).catch((O)=>{this._cleanupTimeout(V),H(O)})}else this._transport.send(A,{relatedRequestId:G,resumptionToken:J,onresumptiontoken:Q}).catch((B)=>{this._cleanupTimeout(V),H(B)})})}async getTask($,Y){return this.request({method:"tasks/get",params:$},Eu,Y)}async getTaskResult($,Y,X){return this.request({method:"tasks/result",params:$},Y,X)}async listTasks($,Y){return this.request({method:"tasks/list",params:$},qu,Y)}async cancelTask($,Y){return this.request({method:"tasks/cancel",params:$},lg0,Y)}async notification($,Y){if(!this._transport)throw Error("Not connected");this.assertNotificationCapability($.method);let X=Y?.relatedTask?.taskId;if(X){let W={...$,jsonrpc:"2.0",params:{...$.params,_meta:{...$.params?._meta||{},[LV]:Y.relatedTask}}};await this._enqueueTaskMessage(X,{type:"notification",message:W,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes($.method)&&!$.params&&!Y?.relatedRequestId&&!Y?.relatedTask){if(this._pendingDebouncedNotifications.has($.method))return;this._pendingDebouncedNotifications.add($.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete($.method),!this._transport)return;let W={...$,jsonrpc:"2.0"};if(Y?.relatedTask)W={...W,params:{...W.params,_meta:{...W.params?._meta||{},[LV]:Y.relatedTask}}};this._transport?.send(W,Y).catch((Z)=>this._onerror(Z))});return}let Q={...$,jsonrpc:"2.0"};if(Y?.relatedTask)Q={...Q,params:{...Q.params,_meta:{...Q.params?._meta||{},[LV]:Y.relatedTask}}};await this._transport.send(Q,Y)}setRequestHandler($,Y){let X=Qm0($);this.assertRequestHandlerCapability(X),this._requestHandlers.set(X,(G,J)=>{let Q=Wm0($,G);return Promise.resolve(Y(Q,J))})}removeRequestHandler($){this._requestHandlers.delete($)}assertCanSetRequestHandler($){if(this._requestHandlers.has($))throw Error(`A request handler for ${$} already exists, which would be overridden`)}setNotificationHandler($,Y){let X=Qm0($);this._notificationHandlers.set(X,(G)=>{let J=Wm0($,G);return Promise.resolve(Y(J))})}removeNotificationHandler($){this._notificationHandlers.delete($)}_cleanupTaskProgressHandler($){let Y=this._taskProgressTokens.get($);if(Y!==void 0)this._progressHandlers.delete(Y),this._taskProgressTokens.delete($)}async _enqueueTaskMessage($,Y,X){if(!this._taskStore||!this._taskMessageQueue)throw Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let G=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue($,Y,X,G)}async _clearTaskQueue($,Y){if(this._taskMessageQueue){let X=await this._taskMessageQueue.dequeueAll($,Y);for(let G of X)if(G.type==="request"&&DJ(G.message)){let J=G.message.id,Q=this._requestResolvers.get(J);if(Q)Q(new r1(_1.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(J);else this._onerror(Error(`Resolver missing for request ${J} during task ${$} cleanup`))}}}async _waitForTaskUpdate($,Y){let X=this._options?.defaultTaskPollInterval??1000;try{let G=await this._taskStore?.getTask($);if(G?.pollInterval)X=G.pollInterval}catch{}return new Promise((G,J)=>{if(Y.aborted){J(new r1(_1.InvalidRequest,"Request cancelled"));return}let Q=setTimeout(G,X);Y.addEventListener("abort",()=>{clearTimeout(Q),J(new r1(_1.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore($,Y){let X=this._taskStore;if(!X)throw Error("No task store configured");return{createTask:async(G)=>{if(!$)throw Error("No request provided");return await X.createTask(G,$.id,{method:$.method,params:$.params},Y)},getTask:async(G)=>{let J=await X.getTask(G,Y);if(!J)throw new r1(_1.InvalidParams,"Failed to retrieve task: Task not found");return J},storeTaskResult:async(G,J,Q)=>{await X.storeTaskResult(G,J,Q,Y);let W=await X.getTask(G,Y);if(W){let Z=tj.parse({method:"notifications/tasks/status",params:W});if(await this.notification(Z),fD(W.status))this._cleanupTaskProgressHandler(G)}},getTaskResult:(G)=>{return X.getTaskResult(G,Y)},updateTaskStatus:async(G,J,Q)=>{let W=await X.getTask(G,Y);if(!W)throw new r1(_1.InvalidParams,`Task "${G}" not found - it may have been cleaned up`);if(fD(W.status))throw new r1(_1.InvalidParams,`Cannot update task "${G}" from terminal status "${W.status}" to "${J}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await X.updateTaskStatus(G,J,Q,Y);let Z=await X.getTask(G,Y);if(Z){let K=tj.parse({method:"notifications/tasks/status",params:Z});if(await this.notification(K),fD(Z.status))this._cleanupTaskProgressHandler(G)}},listTasks:(G)=>{return X.listTasks(G,Y)}}}}function a34($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function UT($,Y){let X={...$};for(let G in Y){let J=G,Q=Y[J];if(Q===void 0)continue;let W=X[J];if(a34(W)&&a34(Q))X[J]={...W,...Q};else X[J]=Q}return X}BY();var VU4=U6(Wt(),1),AU4=U6(zU4(),1);function U$9(){let $=new VU4.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return AU4.default($),$}class ju{constructor($){this._ajv=$??U$9()}getValidator($){let Y="$id"in $&&typeof $.$id==="string"?this._ajv.getSchema($.$id)??this._ajv.compile($):this._ajv.compile($);return(X)=>{if(Y(X))return{valid:!0,data:X,errorMessage:void 0};else return{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(Y.errors)}}}}BY();class Nm0{constructor($){this._server=$}requestStream($,Y,X){return this._server.requestStream($,Y,X)}createMessageStream($,Y){let X=this._server.getClientCapabilities();if(($.tools||$.toolChoice)&&!X?.sampling?.tools)throw Error("Client does not support sampling tools capability.");if($.messages.length>0){let G=$.messages[$.messages.length-1],J=Array.isArray(G.content)?G.content:[G.content],Q=J.some((H)=>H.type==="tool_result"),W=$.messages.length>1?$.messages[$.messages.length-2]:void 0,Z=W?Array.isArray(W.content)?W.content:[W.content]:[],K=Z.some((H)=>H.type==="tool_use");if(Q){if(J.some((H)=>H.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!K)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(K){let H=new Set(Z.filter((V)=>V.type==="tool_use").map((V)=>V.id)),z=new Set(J.filter((V)=>V.type==="tool_result").map((V)=>V.toolUseId));if(H.size!==z.size||![...H].every((V)=>z.has(V)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:$},oU,Y)}elicitInputStream($,Y){let X=this._server.getClientCapabilities(),G=$.mode??"form";switch(G){case"url":{if(!X?.elicitation?.url)throw Error("Client does not support url elicitation.");break}case"form":{if(!X?.elicitation?.form)throw Error("Client does not support form elicitation.");break}}let J=G==="form"&&$.mode===void 0?{...$,mode:"form"}:$;return this.requestStream({method:"elicitation/create",params:J},OV,Y)}async getTask($,Y){return this._server.getTask({taskId:$},Y)}async getTaskResult($,Y,X){return this._server.getTaskResult({taskId:$},Y,X)}async listTasks($,Y){return this._server.listTasks($?{cursor:$}:void 0,Y)}async cancelTask($,Y){return this._server.cancelTask({taskId:$},Y)}}function D$0($,Y,X){if(!$)throw Error(`${X} does not support task creation (required for ${Y})`);switch(Y){case"tools/call":if(!$.tools?.call)throw Error(`${X} does not support task creation for tools/call (required for ${Y})`);break;default:break}}function N$0($,Y,X){if(!$)throw Error(`${X} does not support task creation (required for ${Y})`);switch(Y){case"sampling/createMessage":if(!$.sampling?.createMessage)throw Error(`${X} does not support task creation for sampling/createMessage (required for ${Y})`);break;case"elicitation/create":if(!$.elicitation?.create)throw Error(`${X} does not support task creation for elicitation/create (required for ${Y})`);break;default:break}}class zT extends JM{constructor($,Y){super(Y);if(this._serverInfo=$,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(QT.options.map((X,G)=>[X,G])),this.isMessageIgnored=(X,G)=>{let J=this._loggingLevels.get(G);return J?this.LOG_LEVEL_SEVERITY.get(X)<this.LOG_LEVEL_SEVERITY.get(J):!1},this._capabilities=Y?.capabilities??{},this._instructions=Y?.instructions,this._jsonSchemaValidator=Y?.jsonSchemaValidator??new ju,this.setRequestHandler(Lu,(X)=>this._oninitialize(X)),this.setNotificationHandler(Bu,()=>this.oninitialized?.()),this._capabilities.logging)this.setRequestHandler(WT,async(X,G)=>{let J=G.sessionId||G.requestInfo?.headers["mcp-session-id"]||void 0,{level:Q}=X.params,W=QT.safeParse(Q);if(W.success)this._loggingLevels.set(J,W.data);return{}})}get experimental(){if(!this._experimental)this._experimental={tasks:new Nm0(this)};return this._experimental}registerCapabilities($){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=UT(this._capabilities,$)}setRequestHandler($,Y){let G=tU($)?.method;if(!G)throw Error("Schema is missing a method literal");let J;if(CQ(G)){let W=G;J=W._zod?.def?.value??W.value}else{let W=G;J=W._def?.value??W.value}if(typeof J!=="string")throw Error("Schema method literal must be a string");if(J==="tools/call"){let W=async(Z,K)=>{let H=BJ(J3,Z);if(!H.success){let F=H.error instanceof Error?H.error.message:String(H.error);throw new r1(_1.InvalidParams,`Invalid tools/call request: ${F}`)}let{params:z}=H.data,V=await Promise.resolve(Y(Z,K));if(z.task){let F=BJ(sU,V);if(!F.success){let N=F.error instanceof Error?F.error.message:String(F.error);throw new r1(_1.InvalidParams,`Invalid task creation result: ${N}`)}return F.data}let A=BJ(LJ,V);if(!A.success){let F=A.error instanceof Error?A.error.message:String(A.error);throw new r1(_1.InvalidParams,`Invalid tools/call result: ${F}`)}return A.data};return super.setRequestHandler($,W)}return super.setRequestHandler($,Y)}assertCapabilityForMethod($){switch($){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw Error(`Client does not support sampling (required for ${$})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw Error(`Client does not support elicitation (required for ${$})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw Error(`Client does not support listing roots (required for ${$})`);break;case"ping":break}}assertNotificationCapability($){switch($){case"notifications/message":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${$})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw Error(`Server does not support notifying about resources (required for ${$})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw Error(`Server does not support notifying of tool list changes (required for ${$})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw Error(`Server does not support notifying of prompt list changes (required for ${$})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw Error(`Client does not support URL elicitation (required for ${$})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability($){if(!this._capabilities)return;switch($){case"completion/complete":if(!this._capabilities.completions)throw Error(`Server does not support completions (required for ${$})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${$})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw Error(`Server does not support prompts (required for ${$})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw Error(`Server does not support resources (required for ${$})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Server does not support tools (required for ${$})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Server does not support tasks capability (required for ${$})`);break;case"ping":case"initialize":break}}assertTaskCapability($){N$0(this._clientCapabilities?.tasks?.requests,$,"Client")}assertTaskHandlerCapability($){if(!this._capabilities)return;D$0(this._capabilities.tasks?.requests,$,"Server")}async _oninitialize($){let Y=$.params.protocolVersion;return this._clientCapabilities=$.params.capabilities,this._clientVersion=$.params.clientInfo,{protocolVersion:Y2.includes(Y)?Y:NV,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},NJ)}async createMessage($,Y){if($.tools||$.toolChoice){if(!this._clientCapabilities?.sampling?.tools)throw Error("Client does not support sampling tools capability.")}if($.messages.length>0){let X=$.messages[$.messages.length-1],G=Array.isArray(X.content)?X.content:[X.content],J=G.some((K)=>K.type==="tool_result"),Q=$.messages.length>1?$.messages[$.messages.length-2]:void 0,W=Q?Array.isArray(Q.content)?Q.content:[Q.content]:[],Z=W.some((K)=>K.type==="tool_use");if(J){if(G.some((K)=>K.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!Z)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(Z){let K=new Set(W.filter((z)=>z.type==="tool_use").map((z)=>z.id)),H=new Set(G.filter((z)=>z.type==="tool_result").map((z)=>z.toolUseId));if(K.size!==H.size||![...K].every((z)=>H.has(z)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}if($.tools)return this.request({method:"sampling/createMessage",params:$},hD,Y);return this.request({method:"sampling/createMessage",params:$},oU,Y)}async elicitInput($,Y){switch($.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support url elicitation.");let G=$;return this.request({method:"elicitation/create",params:G},OV,Y)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw Error("Client does not support form elicitation.");let G=$.mode==="form"?$:{...$,mode:"form"},J=await this.request({method:"elicitation/create",params:G},OV,Y);if(J.action==="accept"&&J.content&&G.requestedSchema)try{let W=this._jsonSchemaValidator.getValidator(G.requestedSchema)(J.content);if(!W.valid)throw new r1(_1.InvalidParams,`Elicitation response content does not match requested schema: ${W.errorMessage}`)}catch(Q){if(Q instanceof r1)throw Q;throw new r1(_1.InternalError,`Error validating elicitation response: ${Q instanceof Error?Q.message:String(Q)}`)}return J}}}createElicitationCompletionNotifier($,Y){if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:$}},Y)}async listRoots($,Y){return this.request({method:"roots/list",params:$},Q$0,Y)}async sendLoggingMessage($,Y){if(this._capabilities.logging){if(!this.isMessageIgnored($.level,Y))return this.notification({method:"notifications/message",params:$})}}async sendResourceUpdated($){return this.notification({method:"notifications/resources/updated",params:$})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}BY();var DU4=Symbol.for("mcp.completable");function Lm0($){return!!$&&typeof $==="object"&&DU4 in $}function NU4($){return $[DU4]?.complete}var FU4;(function($){$.Completable="McpCompletable"})(FU4||(FU4={}));var H$9=/^[A-Za-z0-9._-]{1,128}$/;function z$9($){let Y=[];if($.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if($.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${$.length})`]};if($.includes(" "))Y.push("Tool name contains spaces, which may cause parsing issues");if($.includes(","))Y.push("Tool name contains commas, which may cause parsing issues");if($.startsWith("-")||$.endsWith("-"))Y.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts");if($.startsWith(".")||$.endsWith("."))Y.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts");if(!H$9.test($)){let X=$.split("").filter((G)=>!/[A-Za-z0-9._-]/.test(G)).filter((G,J,Q)=>Q.indexOf(G)===J);return Y.push(`Tool name contains invalid characters: ${X.map((G)=>`"${G}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:Y}}return{isValid:!0,warnings:Y}}function V$9($,Y){if(Y.length>0){console.warn(`Tool name validation warning for "${$}":`);for(let X of Y)console.warn(`  - ${X}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function Bm0($){let Y=z$9($);return V$9($,Y.warnings),Y.isValid}class Om0{constructor($){this._mcpServer=$}registerToolTask($,Y,X){let G={taskSupport:"required",...Y.execution};if(G.taskSupport==="forbidden")throw Error(`Cannot register task-based tool '${$}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool($,Y.title,Y.description,Y.inputSchema,Y.outputSchema,Y.annotations,G,Y._meta,X)}}KY();class Mm0{constructor($,Y){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new zT($,Y)}get experimental(){if(!this._experimental)this._experimental={tasks:new Om0(this)};return this._experimental}async connect($){return await this.server.connect($)}async close(){await this.server.close()}setToolRequestHandlers(){if(this._toolHandlersInitialized)return;this.server.assertCanSetRequestHandler(mD(BV)),this.server.assertCanSetRequestHandler(mD(J3)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(BV,()=>({tools:Object.entries(this._registeredTools).filter(([,$])=>$.enabled).map(([$,Y])=>{let X={name:$,title:Y.title,description:Y.description,inputSchema:(()=>{let G=KT(Y.inputSchema);return G?Jm0(G,{strictUnions:!0,pipeStrategy:"input"}):A$9})(),annotations:Y.annotations,execution:Y.execution,_meta:Y._meta};if(Y.outputSchema){let G=KT(Y.outputSchema);if(G)X.outputSchema=Jm0(G,{strictUnions:!0,pipeStrategy:"output"})}return X})})),this.server.setRequestHandler(J3,async($,Y)=>{try{let X=this._registeredTools[$.params.name];if(!X)throw new r1(_1.InvalidParams,`Tool ${$.params.name} not found`);if(!X.enabled)throw new r1(_1.InvalidParams,`Tool ${$.params.name} disabled`);let G=!!$.params.task,J=X.execution?.taskSupport,Q="createTask"in X.handler;if((J==="required"||J==="optional")&&!Q)throw new r1(_1.InternalError,`Tool ${$.params.name} has taskSupport '${J}' but was not registered with registerToolTask`);if(J==="required"&&!G)throw new r1(_1.MethodNotFound,`Tool ${$.params.name} requires task augmentation (taskSupport: 'required')`);if(J==="optional"&&!G&&Q)return await this.handleAutomaticTaskPolling(X,$,Y);let W=await this.validateToolInput(X,$.params.arguments,$.params.name),Z=await this.executeToolHandler(X,W,Y);if(G)return Z;return await this.validateToolOutput(X,Z,$.params.name),Z}catch(X){if(X instanceof r1){if(X.code===_1.UrlElicitationRequired)throw X}return this.createToolError(X instanceof Error?X.message:String(X))}}),this._toolHandlersInitialized=!0}createToolError($){return{content:[{type:"text",text:$}],isError:!0}}async validateToolInput($,Y,X){if(!$.inputSchema)return;let J=KT($.inputSchema)??$.inputSchema,Q=await H$0(J,Y);if(!Q.success){let W="error"in Q?Q.error:"Unknown error",Z=z$0(W);throw new r1(_1.InvalidParams,`Input validation error: Invalid arguments for tool ${X}: ${Z}`)}return Q.data}async validateToolOutput($,Y,X){if(!$.outputSchema)return;if(!("content"in Y))return;if(Y.isError)return;if(!Y.structuredContent)throw new r1(_1.InvalidParams,`Output validation error: Tool ${X} has an output schema but no structured content was provided`);let G=KT($.outputSchema),J=await H$0(G,Y.structuredContent);if(!J.success){let Q="error"in J?J.error:"Unknown error",W=z$0(Q);throw new r1(_1.InvalidParams,`Output validation error: Invalid structured content for tool ${X}: ${W}`)}}async executeToolHandler($,Y,X){let G=$.handler;if("createTask"in G){if(!X.taskStore)throw Error("No task store provided.");let Q={...X,taskStore:X.taskStore};if($.inputSchema)return await Promise.resolve(G.createTask(Y,Q));else return await Promise.resolve(G.createTask(Q))}if($.inputSchema)return await Promise.resolve(G(Y,X));else return await Promise.resolve(G(X))}async handleAutomaticTaskPolling($,Y,X){if(!X.taskStore)throw Error("No task store provided for task-capable tool.");let G=await this.validateToolInput($,Y.params.arguments,Y.params.name),J=$.handler,Q={...X,taskStore:X.taskStore},W=G?await Promise.resolve(J.createTask(G,Q)):await Promise.resolve(J.createTask(Q)),Z=W.task.taskId,K=W.task,H=K.pollInterval??5000;while(K.status!=="completed"&&K.status!=="failed"&&K.status!=="cancelled"){await new Promise((V)=>setTimeout(V,H));let z=await X.taskStore.getTask(Z);if(!z)throw new r1(_1.InternalError,`Task ${Z} not found during polling`);K=z}return await X.taskStore.getTaskResult(Z)}setCompletionRequestHandler(){if(this._completionHandlerInitialized)return;this.server.assertCanSetRequestHandler(mD(wu)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(wu,async($)=>{switch($.params.ref.type){case"ref/prompt":return eg0($),this.handlePromptCompletion($,$.params.ref);case"ref/resource":return $m0($),this.handleResourceCompletion($,$.params.ref);default:throw new r1(_1.InvalidParams,`Invalid completion reference: ${$.params.ref}`)}}),this._completionHandlerInitialized=!0}async handlePromptCompletion($,Y){let X=this._registeredPrompts[Y.name];if(!X)throw new r1(_1.InvalidParams,`Prompt ${Y.name} not found`);if(!X.enabled)throw new r1(_1.InvalidParams,`Prompt ${Y.name} disabled`);if(!X.argsSchema)return Tu;let J=tU(X.argsSchema)?.[$.params.argument.name];if(!Lm0(J))return Tu;let Q=NU4(J);if(!Q)return Tu;let W=await Q($.params.argument.value,$.params.context);return BU4(W)}async handleResourceCompletion($,Y){let X=Object.values(this._registeredResourceTemplates).find((Q)=>Q.resourceTemplate.uriTemplate.toString()===Y.uri);if(!X){if(this._registeredResources[Y.uri])return Tu;throw new r1(_1.InvalidParams,`Resource template ${$.params.ref.uri} not found`)}let G=X.resourceTemplate.completeCallback($.params.argument.name);if(!G)return Tu;let J=await G($.params.argument.value,$.params.context);return BU4(J)}setResourceRequestHandlers(){if(this._resourceHandlersInitialized)return;this.server.assertCanSetRequestHandler(mD(oE)),this.server.assertCanSetRequestHandler(mD(tE)),this.server.assertCanSetRequestHandler(mD(eE)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(oE,async($,Y)=>{let X=Object.entries(this._registeredResources).filter(([J,Q])=>Q.enabled).map(([J,Q])=>({uri:J,name:Q.name,...Q.metadata})),G=[];for(let J of Object.values(this._registeredResourceTemplates)){if(!J.resourceTemplate.listCallback)continue;let Q=await J.resourceTemplate.listCallback(Y);for(let W of Q.resources)G.push({...J.metadata,...W})}return{resources:[...X,...G]}}),this.server.setRequestHandler(tE,async()=>{return{resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([Y,X])=>({name:Y,uriTemplate:X.resourceTemplate.uriTemplate.toString(),...X.metadata}))}}),this.server.setRequestHandler(eE,async($,Y)=>{let X=new URL($.params.uri),G=this._registeredResources[X.toString()];if(G){if(!G.enabled)throw new r1(_1.InvalidParams,`Resource ${X} disabled`);return G.readCallback(X,Y)}for(let J of Object.values(this._registeredResourceTemplates)){let Q=J.resourceTemplate.uriTemplate.match(X.toString());if(Q)return J.readCallback(X,Q,Y)}throw new r1(_1.InvalidParams,`Resource ${X} not found`)}),this._resourceHandlersInitialized=!0}setPromptRequestHandlers(){if(this._promptHandlersInitialized)return;this.server.assertCanSetRequestHandler(mD($M)),this.server.assertCanSetRequestHandler(mD(YM)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler($M,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,$])=>$.enabled).map(([$,Y])=>{return{name:$,title:Y.title,description:Y.description,arguments:Y.argsSchema?F$9(Y.argsSchema):void 0}})})),this.server.setRequestHandler(YM,async($,Y)=>{let X=this._registeredPrompts[$.params.name];if(!X)throw new r1(_1.InvalidParams,`Prompt ${$.params.name} not found`);if(!X.enabled)throw new r1(_1.InvalidParams,`Prompt ${$.params.name} disabled`);if(X.argsSchema){let G=KT(X.argsSchema),J=await H$0(G,$.params.arguments);if(!J.success){let Z="error"in J?J.error:"Unknown error",K=z$0(Z);throw new r1(_1.InvalidParams,`Invalid arguments for prompt ${$.params.name}: ${K}`)}let Q=J.data,W=X.callback;return await Promise.resolve(W(Q,Y))}else{let G=X.callback;return await Promise.resolve(G(Y))}}),this._promptHandlersInitialized=!0}resource($,Y,...X){let G;if(typeof X[0]==="object")G=X.shift();let J=X[0];if(typeof Y==="string"){if(this._registeredResources[Y])throw Error(`Resource ${Y} is already registered`);let Q=this._createRegisteredResource($,void 0,Y,G,J);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),Q}else{if(this._registeredResourceTemplates[$])throw Error(`Resource template ${$} is already registered`);let Q=this._createRegisteredResourceTemplate($,void 0,Y,G,J);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),Q}}registerResource($,Y,X,G){if(typeof Y==="string"){if(this._registeredResources[Y])throw Error(`Resource ${Y} is already registered`);let J=this._createRegisteredResource($,X.title,Y,X,G);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),J}else{if(this._registeredResourceTemplates[$])throw Error(`Resource template ${$} is already registered`);let J=this._createRegisteredResourceTemplate($,X.title,Y,X,G);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),J}}_createRegisteredResource($,Y,X,G,J){let Q={name:$,title:Y,metadata:G,readCallback:J,enabled:!0,disable:()=>Q.update({enabled:!1}),enable:()=>Q.update({enabled:!0}),remove:()=>Q.update({uri:null}),update:(W)=>{if(typeof W.uri<"u"&&W.uri!==X){if(delete this._registeredResources[X],W.uri)this._registeredResources[W.uri]=Q}if(typeof W.name<"u")Q.name=W.name;if(typeof W.title<"u")Q.title=W.title;if(typeof W.metadata<"u")Q.metadata=W.metadata;if(typeof W.callback<"u")Q.readCallback=W.callback;if(typeof W.enabled<"u")Q.enabled=W.enabled;this.sendResourceListChanged()}};return this._registeredResources[X]=Q,Q}_createRegisteredResourceTemplate($,Y,X,G,J){let Q={resourceTemplate:X,title:Y,metadata:G,readCallback:J,enabled:!0,disable:()=>Q.update({enabled:!1}),enable:()=>Q.update({enabled:!0}),remove:()=>Q.update({name:null}),update:(K)=>{if(typeof K.name<"u"&&K.name!==$){if(delete this._registeredResourceTemplates[$],K.name)this._registeredResourceTemplates[K.name]=Q}if(typeof K.title<"u")Q.title=K.title;if(typeof K.template<"u")Q.resourceTemplate=K.template;if(typeof K.metadata<"u")Q.metadata=K.metadata;if(typeof K.callback<"u")Q.readCallback=K.callback;if(typeof K.enabled<"u")Q.enabled=K.enabled;this.sendResourceListChanged()}};this._registeredResourceTemplates[$]=Q;let W=X.uriTemplate.variableNames;if(Array.isArray(W)&&W.some((K)=>!!X.completeCallback(K)))this.setCompletionRequestHandler();return Q}_createRegisteredPrompt($,Y,X,G,J){let Q={title:Y,description:X,argsSchema:G===void 0?void 0:GM(G),callback:J,enabled:!0,disable:()=>Q.update({enabled:!1}),enable:()=>Q.update({enabled:!0}),remove:()=>Q.update({name:null}),update:(W)=>{if(typeof W.name<"u"&&W.name!==$){if(delete this._registeredPrompts[$],W.name)this._registeredPrompts[W.name]=Q}if(typeof W.title<"u")Q.title=W.title;if(typeof W.description<"u")Q.description=W.description;if(typeof W.argsSchema<"u")Q.argsSchema=GM(W.argsSchema);if(typeof W.callback<"u")Q.callback=W.callback;if(typeof W.enabled<"u")Q.enabled=W.enabled;this.sendPromptListChanged()}};if(this._registeredPrompts[$]=Q,G){if(Object.values(G).some((Z)=>{let K=Z instanceof wz?Z._def?.innerType:Z;return Lm0(K)}))this.setCompletionRequestHandler()}return Q}_createRegisteredTool($,Y,X,G,J,Q,W,Z,K){Bm0($);let H={title:Y,description:X,inputSchema:LU4(G),outputSchema:LU4(J),annotations:Q,execution:W,_meta:Z,handler:K,enabled:!0,disable:()=>H.update({enabled:!1}),enable:()=>H.update({enabled:!0}),remove:()=>H.update({name:null}),update:(z)=>{if(typeof z.name<"u"&&z.name!==$){if(typeof z.name==="string")Bm0(z.name);if(delete this._registeredTools[$],z.name)this._registeredTools[z.name]=H}if(typeof z.title<"u")H.title=z.title;if(typeof z.description<"u")H.description=z.description;if(typeof z.paramsSchema<"u")H.inputSchema=GM(z.paramsSchema);if(typeof z.outputSchema<"u")H.outputSchema=GM(z.outputSchema);if(typeof z.callback<"u")H.handler=z.callback;if(typeof z.annotations<"u")H.annotations=z.annotations;if(typeof z._meta<"u")H._meta=z._meta;if(typeof z.enabled<"u")H.enabled=z.enabled;this.sendToolListChanged()}};return this._registeredTools[$]=H,this.setToolRequestHandlers(),this.sendToolListChanged(),H}tool($,...Y){if(this._registeredTools[$])throw Error(`Tool ${$} is already registered`);let X,G,J,Q;if(typeof Y[0]==="string")X=Y.shift();if(Y.length>1){let Z=Y[0];if(Em0(Z)){if(G=Y.shift(),Y.length>1&&typeof Y[0]==="object"&&Y[0]!==null&&!Em0(Y[0]))Q=Y.shift()}else if(typeof Z==="object"&&Z!==null){if(Object.values(Z).some((K)=>typeof K==="object"&&K!==null))throw Error(`Tool ${$} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);Q=Y.shift()}}let W=Y[0];return this._createRegisteredTool($,void 0,X,G,J,Q,{taskSupport:"forbidden"},void 0,W)}registerTool($,Y,X){if(this._registeredTools[$])throw Error(`Tool ${$} is already registered`);let{title:G,description:J,inputSchema:Q,outputSchema:W,annotations:Z,_meta:K}=Y;return this._createRegisteredTool($,G,J,Q,W,Z,{taskSupport:"forbidden"},K,X)}prompt($,...Y){if(this._registeredPrompts[$])throw Error(`Prompt ${$} is already registered`);let X;if(typeof Y[0]==="string")X=Y.shift();let G;if(Y.length>1)G=Y.shift();let J=Y[0],Q=this._createRegisteredPrompt($,void 0,X,G,J);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),Q}registerPrompt($,Y,X){if(this._registeredPrompts[$])throw Error(`Prompt ${$} is already registered`);let{title:G,description:J,argsSchema:Q}=Y,W=this._createRegisteredPrompt($,G,J,Q,X);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),W}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage($,Y){return this.server.sendLoggingMessage($,Y)}sendResourceListChanged(){if(this.isConnected())this.server.sendResourceListChanged()}sendToolListChanged(){if(this.isConnected())this.server.sendToolListChanged()}sendPromptListChanged(){if(this.isConnected())this.server.sendPromptListChanged()}}var A$9={type:"object",properties:{}};function OU4($){return $!==null&&typeof $==="object"&&"parse"in $&&typeof $.parse==="function"&&"safeParse"in $&&typeof $.safeParse==="function"}function EU4($){return"_def"in $||"_zod"in $||OU4($)}function Em0($){if(typeof $!=="object"||$===null)return!1;if(EU4($))return!1;if(Object.keys($).length===0)return!0;return Object.values($).some(OU4)}function LU4($){if(!$)return;if(Em0($))return GM($);if(!EU4($))throw Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return $}function F$9($){let Y=tU($);if(!Y)return[];return Object.entries(Y).map(([X,G])=>{let J=n34(G),Q=r34(G);return{name:X,description:J,required:!Q}})}function mD($){let X=tU($)?.method;if(!X)throw Error("Schema is missing a method literal");let G=V$0(X);if(typeof G==="string")return G;throw Error("Schema method literal must be a string")}function BU4($){return{completion:{values:$.slice(0,100),total:$.length,hasMore:$.length>100}}}var Tu={completion:{values:[],hasMore:!1}};KY();import D$9 from"os";function N$9(){let $=D$9.networkInterfaces();for(let Y of Object.keys($))for(let X of $[Y])if(X.family==="IPv4"&&!X.internal)return X.address;return"No External IP found"}var L$9=N$9(),MU4=new O4;function B$9($){return Object.getOwnPropertyNames($).filter((Y)=>typeof $[Y]!=="symbol")}async function O$9(){let $=new Mm0({name:"tbc-mcp-server",version:"1.0.0"});return(await jK4({limit:1000,offset:0})).forEach((G)=>{if(G.transText&&G.transText.length>0&&G.description&&G.description.length>0){let J={};B$9(JSON.parse(G.paramsSchema||"{}")).forEach((W)=>{i1(J,W,U.string().describe(W.toString()))}),$.registerTool(n1(G.transText,/[\ \.]/g,"_"),{description:G.description,inputSchema:J},async(W)=>{let Z=G.code,K=await rH(1),H=await pE(`http://${L$9}:${Bun.env.PORT||3000}/api/execution/${Z}`,"POST",K,W);return{content:[{type:"text",text:`\u7ED3\u679C\uFF1A${JSON.stringify(H)}`}]}})}}),$.registerTool(n1("Query the current time",/[\ \.]/g,"_"),{description:"\u67E5\u8BE2\u5F53\u524D\u7CFB\u7EDF\u65F6\u95F4",inputSchema:{}},async()=>{return{content:[{type:"text",text:`${fX()}`}]}}),$}MU4.all("/",async($)=>{let Y=new U$0;return await(await O$9()).connect(Y),Y.handleRequest($)});var RU4=MU4;Ow();import{AsyncLocalStorage as WG9}from"async_hooks";import{createRequire as ZG9}from"module";dZ();BY();BY();class Rm0{constructor($){this._client=$}async*callToolStream($,Y=LJ,X){let G=this._client,J={...X,task:X?.task??(G.isToolTask($.name)?{}:void 0)},Q=G.requestStream({method:"tools/call",params:$},Y,J),W=G.getToolOutputValidator($.name);for await(let Z of Q){if(Z.type==="result"&&W){let K=Z.result;if(!K.structuredContent&&!K.isError){yield{type:"error",error:new r1(_1.InvalidRequest,`Tool ${$.name} has an output schema but did not return structured content`)};return}if(K.structuredContent)try{let H=W(K.structuredContent);if(!H.valid){yield{type:"error",error:new r1(_1.InvalidParams,`Structured content does not match the tool's output schema: ${H.errorMessage}`)};return}}catch(H){if(H instanceof r1){yield{type:"error",error:H};return}yield{type:"error",error:new r1(_1.InvalidParams,`Failed to validate structured content: ${H instanceof Error?H.message:String(H)}`)};return}}yield Z}}async getTask($,Y){return this._client.getTask({taskId:$},Y)}async getTaskResult($,Y,X){return this._client.getTaskResult({taskId:$},Y,X)}async listTasks($,Y){return this._client.listTasks($?{cursor:$}:void 0,Y)}async cancelTask($,Y){return this._client.cancelTask({taskId:$},Y)}requestStream($,Y,X){return this._client.requestStream($,Y,X)}}function L$0($,Y){if(!$||Y===null||typeof Y!=="object")return;if($.type==="object"&&$.properties&&typeof $.properties==="object"){let X=Y,G=$.properties;for(let J of Object.keys(G)){let Q=G[J];if(X[J]===void 0&&Object.prototype.hasOwnProperty.call(Q,"default"))X[J]=Q.default;if(X[J]!==void 0)L$0(Q,X[J])}}if(Array.isArray($.anyOf)){for(let X of $.anyOf)if(typeof X!=="boolean")L$0(X,Y)}if(Array.isArray($.oneOf)){for(let X of $.oneOf)if(typeof X!=="boolean")L$0(X,Y)}}function E$9($){if(!$)return{supportsFormMode:!1,supportsUrlMode:!1};let Y=$.form!==void 0,X=$.url!==void 0;return{supportsFormMode:Y||!Y&&!X,supportsUrlMode:X}}class qm0 extends JM{constructor($,Y){super(Y);if(this._clientInfo=$,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=Y?.capabilities??{},this._jsonSchemaValidator=Y?.jsonSchemaValidator??new ju,Y?.listChanged)this._pendingListChangedConfig=Y.listChanged}_setupListChangedHandlers($){if($.tools&&this._serverCapabilities?.tools?.listChanged)this._setupListChangedHandler("tools",$$0,$.tools,async()=>{return(await this.listTools()).tools});if($.prompts&&this._serverCapabilities?.prompts?.listChanged)this._setupListChangedHandler("prompts",JT,$.prompts,async()=>{return(await this.listPrompts()).prompts});if($.resources&&this._serverCapabilities?.resources?.listChanged)this._setupListChangedHandler("resources",YT,$.resources,async()=>{return(await this.listResources()).resources})}get experimental(){if(!this._experimental)this._experimental={tasks:new Rm0(this)};return this._experimental}registerCapabilities($){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=UT(this._capabilities,$)}setRequestHandler($,Y){let G=tU($)?.method;if(!G)throw Error("Schema is missing a method literal");let J;if(CQ(G)){let W=G;J=W._zod?.def?.value??W.value}else{let W=G;J=W._def?.value??W.value}if(typeof J!=="string")throw Error("Schema method literal must be a string");let Q=J;if(Q==="elicitation/create"){let W=async(Z,K)=>{let H=BJ(ZT,Z);if(!H.success){let B=H.error instanceof Error?H.error.message:String(H.error);throw new r1(_1.InvalidParams,`Invalid elicitation request: ${B}`)}let{params:z}=H.data;z.mode=z.mode??"form";let{supportsFormMode:V,supportsUrlMode:A}=E$9(this._capabilities.elicitation);if(z.mode==="form"&&!V)throw new r1(_1.InvalidParams,"Client does not support form-mode elicitation requests");if(z.mode==="url"&&!A)throw new r1(_1.InvalidParams,"Client does not support URL-mode elicitation requests");let F=await Promise.resolve(Y(Z,K));if(z.task){let B=BJ(sU,F);if(!B.success){let O=B.error instanceof Error?B.error.message:String(B.error);throw new r1(_1.InvalidParams,`Invalid task creation result: ${O}`)}return B.data}let N=BJ(OV,F);if(!N.success){let B=N.error instanceof Error?N.error.message:String(N.error);throw new r1(_1.InvalidParams,`Invalid elicitation result: ${B}`)}let D=N.data,L=z.mode==="form"?z.requestedSchema:void 0;if(z.mode==="form"&&D.action==="accept"&&D.content&&L){if(this._capabilities.elicitation?.form?.applyDefaults)try{L$0(L,D.content)}catch{}}return D};return super.setRequestHandler($,W)}if(Q==="sampling/createMessage"){let W=async(Z,K)=>{let H=BJ(X$0,Z);if(!H.success){let D=H.error instanceof Error?H.error.message:String(H.error);throw new r1(_1.InvalidParams,`Invalid sampling request: ${D}`)}let{params:z}=H.data,V=await Promise.resolve(Y(Z,K));if(z.task){let D=BJ(sU,V);if(!D.success){let L=D.error instanceof Error?D.error.message:String(D.error);throw new r1(_1.InvalidParams,`Invalid task creation result: ${L}`)}return D.data}let F=z.tools||z.toolChoice?hD:oU,N=BJ(F,V);if(!N.success){let D=N.error instanceof Error?N.error.message:String(N.error);throw new r1(_1.InvalidParams,`Invalid sampling result: ${D}`)}return N.data};return super.setRequestHandler($,W)}return super.setRequestHandler($,Y)}assertCapability($,Y){if(!this._serverCapabilities?.[$])throw Error(`Server does not support ${$} (required for ${Y})`)}async connect($,Y){if(await super.connect($),$.sessionId!==void 0)return;try{let X=await this.request({method:"initialize",params:{protocolVersion:NV,capabilities:this._capabilities,clientInfo:this._clientInfo}},p70,Y);if(X===void 0)throw Error(`Server sent invalid initialize result: ${X}`);if(!Y2.includes(X.protocolVersion))throw Error(`Server's protocol version is not supported: ${X.protocolVersion}`);if(this._serverCapabilities=X.capabilities,this._serverVersion=X.serverInfo,$.setProtocolVersion)$.setProtocolVersion(X.protocolVersion);if(this._instructions=X.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig)this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0}catch(X){throw this.close(),X}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod($){switch($){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw Error(`Server does not support logging (required for ${$})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw Error(`Server does not support prompts (required for ${$})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw Error(`Server does not support resources (required for ${$})`);if($==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw Error(`Server does not support resource subscriptions (required for ${$})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw Error(`Server does not support tools (required for ${$})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw Error(`Server does not support completions (required for ${$})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability($){switch($){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw Error(`Client does not support roots list changed notifications (required for ${$})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability($){if(!this._capabilities)return;switch($){case"sampling/createMessage":if(!this._capabilities.sampling)throw Error(`Client does not support sampling capability (required for ${$})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw Error(`Client does not support elicitation capability (required for ${$})`);break;case"roots/list":if(!this._capabilities.roots)throw Error(`Client does not support roots capability (required for ${$})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Client does not support tasks capability (required for ${$})`);break;case"ping":break}}assertTaskCapability($){D$0(this._serverCapabilities?.tasks?.requests,$,"Server")}assertTaskHandlerCapability($){if(!this._capabilities)return;N$0(this._capabilities.tasks?.requests,$,"Client")}async ping($){return this.request({method:"ping"},NJ,$)}async complete($,Y){return this.request({method:"completion/complete",params:$},G$0,Y)}async setLoggingLevel($,Y){return this.request({method:"logging/setLevel",params:{level:$}},NJ,Y)}async getPrompt($,Y){return this.request({method:"prompts/get",params:$},GT,Y)}async listPrompts($,Y){return this.request({method:"prompts/list",params:$},XT,Y)}async listResources($,Y){return this.request({method:"resources/list",params:$},yD,Y)}async listResourceTemplates($,Y){return this.request({method:"resources/templates/list",params:$},$T,Y)}async readResource($,Y){return this.request({method:"resources/read",params:$},bD,Y)}async subscribeResource($,Y){return this.request({method:"resources/subscribe",params:$},NJ,Y)}async unsubscribeResource($,Y){return this.request({method:"resources/unsubscribe",params:$},NJ,Y)}async callTool($,Y=LJ,X){if(this.isToolTaskRequired($.name))throw new r1(_1.InvalidRequest,`Tool "${$.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let G=await this.request({method:"tools/call",params:$},Y,X),J=this.getToolOutputValidator($.name);if(J){if(!G.structuredContent&&!G.isError)throw new r1(_1.InvalidRequest,`Tool ${$.name} has an output schema but did not return structured content`);if(G.structuredContent)try{let Q=J(G.structuredContent);if(!Q.valid)throw new r1(_1.InvalidParams,`Structured content does not match the tool's output schema: ${Q.errorMessage}`)}catch(Q){if(Q instanceof r1)throw Q;throw new r1(_1.InvalidParams,`Failed to validate structured content: ${Q instanceof Error?Q.message:String(Q)}`)}}return G}isToolTask($){if(!this._serverCapabilities?.tasks?.requests?.tools?.call)return!1;return this._cachedKnownTaskTools.has($)}isToolTaskRequired($){return this._cachedRequiredTaskTools.has($)}cacheToolMetadata($){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let Y of $){if(Y.outputSchema){let G=this._jsonSchemaValidator.getValidator(Y.outputSchema);this._cachedToolOutputValidators.set(Y.name,G)}let X=Y.execution?.taskSupport;if(X==="required"||X==="optional")this._cachedKnownTaskTools.add(Y.name);if(X==="required")this._cachedRequiredTaskTools.add(Y.name)}}getToolOutputValidator($){return this._cachedToolOutputValidators.get($)}async listTools($,Y){let X=await this.request({method:"tools/list",params:$},e70,Y);return this.cacheToolMetadata(X.tools),X}_setupListChangedHandler($,Y,X,G){let J=og0.safeParse(X);if(!J.success)throw Error(`Invalid ${$} listChanged options: ${J.error.message}`);if(typeof X.onChanged!=="function")throw Error(`Invalid ${$} listChanged options: onChanged must be a function`);let{autoRefresh:Q,debounceMs:W}=J.data,{onChanged:Z}=X,K=async()=>{if(!Q){Z(null,null);return}try{let z=await G();Z(null,z)}catch(z){let V=z instanceof Error?z:Error(String(z));Z(V,null)}},H=()=>{if(W){let z=this._listChangedDebounceTimers.get($);if(z)clearTimeout(z);let V=setTimeout(K,W);this._listChangedDebounceTimers.set($,V)}else K()};this.setNotificationHandler(Y,H)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}ek0();class Im0 extends Event{constructor($,Y){var X,G;super($),this.code=(X=Y==null?void 0:Y.code)!=null?X:void 0,this.message=(G=Y==null?void 0:Y.message)!=null?G:void 0}[Symbol.for("nodejs.util.inspect.custom")]($,Y,X){return X(qU4(this),Y)}[Symbol.for("Deno.customInspect")]($,Y){return $(qU4(this),Y)}}function M$9($){let Y=globalThis.DOMException;return typeof Y=="function"?new Y($,"SyntaxError"):SyntaxError($)}function Pm0($){return $ instanceof Error?"errors"in $&&Array.isArray($.errors)?$.errors.map(Pm0).join(", "):("cause"in $)&&$.cause instanceof Error?`${$}: ${Pm0($.cause)}`:$.message:`${$}`}function qU4($){return{type:$.type,message:$.message,code:$.code,defaultPrevented:$.defaultPrevented,cancelable:$.cancelable,timeStamp:$.timeStamp}}var PU4=($)=>{throw TypeError($)},vm0=($,Y,X)=>Y.has($)||PU4("Cannot "+X),B8=($,Y,X)=>(vm0($,Y,"read from private field"),X?X.call($):Y.get($)),OY=($,Y,X)=>Y.has($)?PU4("Cannot add the same private member more than once"):Y instanceof WeakSet?Y.add($):Y.set($,X),B7=($,Y,X,G)=>(vm0($,Y,"write to private field"),Y.set($,X),X),EV=($,Y,X)=>(vm0($,Y,"access private method"),X),SQ,QM,VT,B$0,O$0,ku,DT,vu,uD,AT,NT,FT,Cu,W3,wm0,_m0,jm0,IU4,Tm0,Cm0,Su,Sm0,km0;class LT extends EventTarget{constructor($,Y){var X,G;super(),OY(this,W3),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,OY(this,SQ),OY(this,QM),OY(this,VT),OY(this,B$0),OY(this,O$0),OY(this,ku),OY(this,DT),OY(this,vu,null),OY(this,uD),OY(this,AT),OY(this,NT,null),OY(this,FT,null),OY(this,Cu,null),OY(this,_m0,async(J)=>{var Q;B8(this,AT).reset();let{body:W,redirected:Z,status:K,headers:H}=J;if(K===204){EV(this,W3,Su).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(Z?B7(this,VT,new URL(J.url)):B7(this,VT,void 0),K!==200){EV(this,W3,Su).call(this,`Non-200 status code (${K})`,K);return}if(!(H.get("content-type")||"").startsWith("text/event-stream")){EV(this,W3,Su).call(this,'Invalid content type, expected "text/event-stream"',K);return}if(B8(this,SQ)===this.CLOSED)return;B7(this,SQ,this.OPEN);let z=new Event("open");if((Q=B8(this,Cu))==null||Q.call(this,z),this.dispatchEvent(z),typeof W!="object"||!W||!("getReader"in W)){EV(this,W3,Su).call(this,"Invalid response body, expected a web ReadableStream",K),this.close();return}let V=new TextDecoder,A=W.getReader(),F=!0;do{let{done:N,value:D}=await A.read();D&&B8(this,AT).feed(V.decode(D,{stream:!N})),N&&(F=!1,B8(this,AT).reset(),EV(this,W3,Sm0).call(this))}while(F)}),OY(this,jm0,(J)=>{B7(this,uD,void 0),!(J.name==="AbortError"||J.type==="aborted")&&EV(this,W3,Sm0).call(this,Pm0(J))}),OY(this,Tm0,(J)=>{typeof J.id=="string"&&B7(this,vu,J.id);let Q=new MessageEvent(J.event||"message",{data:J.data,origin:B8(this,VT)?B8(this,VT).origin:B8(this,QM).origin,lastEventId:J.id||""});B8(this,FT)&&(!J.event||J.event==="message")&&B8(this,FT).call(this,Q),this.dispatchEvent(Q)}),OY(this,Cm0,(J)=>{B7(this,ku,J)}),OY(this,km0,()=>{B7(this,DT,void 0),B8(this,SQ)===this.CONNECTING&&EV(this,W3,wm0).call(this)});try{if($ instanceof URL)B7(this,QM,$);else if(typeof $=="string")B7(this,QM,new URL($,R$9()));else throw Error("Invalid URL")}catch{throw M$9("An invalid or illegal string was specified")}B7(this,AT,r60({onEvent:B8(this,Tm0),onRetry:B8(this,Cm0)})),B7(this,SQ,this.CONNECTING),B7(this,ku,3000),B7(this,O$0,(X=Y==null?void 0:Y.fetch)!=null?X:globalThis.fetch),B7(this,B$0,(G=Y==null?void 0:Y.withCredentials)!=null?G:!1),EV(this,W3,wm0).call(this)}get readyState(){return B8(this,SQ)}get url(){return B8(this,QM).href}get withCredentials(){return B8(this,B$0)}get onerror(){return B8(this,NT)}set onerror($){B7(this,NT,$)}get onmessage(){return B8(this,FT)}set onmessage($){B7(this,FT,$)}get onopen(){return B8(this,Cu)}set onopen($){B7(this,Cu,$)}addEventListener($,Y,X){let G=Y;super.addEventListener($,G,X)}removeEventListener($,Y,X){let G=Y;super.removeEventListener($,G,X)}close(){B8(this,DT)&&clearTimeout(B8(this,DT)),B8(this,SQ)!==this.CLOSED&&(B8(this,uD)&&B8(this,uD).abort(),B7(this,SQ,this.CLOSED),B7(this,uD,void 0))}}SQ=new WeakMap,QM=new WeakMap,VT=new WeakMap,B$0=new WeakMap,O$0=new WeakMap,ku=new WeakMap,DT=new WeakMap,vu=new WeakMap,uD=new WeakMap,AT=new WeakMap,NT=new WeakMap,FT=new WeakMap,Cu=new WeakMap,W3=new WeakSet,wm0=function(){B7(this,SQ,this.CONNECTING),B7(this,uD,new AbortController),B8(this,O$0)(B8(this,QM),EV(this,W3,IU4).call(this)).then(B8(this,_m0)).catch(B8(this,jm0))},_m0=new WeakMap,jm0=new WeakMap,IU4=function(){var $;let Y={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...B8(this,vu)?{"Last-Event-ID":B8(this,vu)}:void 0},cache:"no-store",signal:($=B8(this,uD))==null?void 0:$.signal};return"window"in globalThis&&(Y.credentials=this.withCredentials?"include":"same-origin"),Y},Tm0=new WeakMap,Cm0=new WeakMap,Su=function($,Y){var X;B8(this,SQ)!==this.CLOSED&&B7(this,SQ,this.CLOSED);let G=new Im0("error",{code:Y,message:$});(X=B8(this,NT))==null||X.call(this,G),this.dispatchEvent(G)},Sm0=function($,Y){var X;if(B8(this,SQ)===this.CLOSED)return;B7(this,SQ,this.CONNECTING);let G=new Im0("error",{code:Y,message:$});(X=B8(this,NT))==null||X.call(this,G),this.dispatchEvent(G),B7(this,DT,setTimeout(B8(this,km0),B8(this,ku)))},km0=new WeakMap,LT.CONNECTING=0,LT.OPEN=1,LT.CLOSED=2;function R$9(){let $="document"in globalThis?globalThis.document:void 0;return $&&typeof $=="object"&&"baseURI"in $&&typeof $.baseURI=="string"?$.baseURI:void 0}function BT($){if(!$)return{};if($ instanceof Headers)return Object.fromEntries($.entries());if(Array.isArray($))return Object.fromEntries($);return{...$}}function E$0($=fetch,Y){if(!Y)return $;return async(X,G)=>{let J={...Y,...G,headers:G?.headers?{...BT(Y.headers),...BT(G.headers)}:Y.headers};return $(X,J)}}BY();BY();function wU4($){let Y=typeof $==="string"?new URL($):new URL($.href);return Y.hash="",Y}function _U4({requestedResource:$,configuredResource:Y}){let X=typeof $==="string"?new URL($):new URL($.href),G=typeof Y==="string"?new URL(Y):new URL(Y.href);if(X.origin!==G.origin)return!1;if(X.pathname.length<G.pathname.length)return!1;let J=X.pathname.endsWith("/")?X.pathname:X.pathname+"/",Q=G.pathname.endsWith("/")?G.pathname:G.pathname+"/";return J.startsWith(Q)}class OJ extends Error{constructor($){super($??"Unauthorized")}}function q$9($){return["client_secret_basic","client_secret_post","none"].includes($)}var xm0="code",ym0="S256";function I$9($,Y){let X=$.client_secret!==void 0;if("token_endpoint_auth_method"in $&&$.token_endpoint_auth_method&&q$9($.token_endpoint_auth_method)&&(Y.length===0||Y.includes($.token_endpoint_auth_method)))return $.token_endpoint_auth_method;if(Y.length===0)return X?"client_secret_basic":"none";if(X&&Y.includes("client_secret_basic"))return"client_secret_basic";if(X&&Y.includes("client_secret_post"))return"client_secret_post";if(Y.includes("none"))return"none";return X?"client_secret_post":"none"}function P$9($,Y,X,G){let{client_id:J,client_secret:Q}=Y;switch($){case"client_secret_basic":w$9(J,Q,X);return;case"client_secret_post":_$9(J,Q,G);return;case"none":j$9(J,G);return;default:throw Error(`Unsupported client authentication method: ${$}`)}}function w$9($,Y,X){if(!Y)throw Error("client_secret_basic authentication requires a client_secret");let G=btoa(`${$}:${Y}`);X.set("Authorization",`Basic ${G}`)}function _$9($,Y,X){if(X.set("client_id",$),Y)X.set("client_secret",Y)}function j$9($,Y){Y.set("client_id",$)}async function fm0($){let Y=$ instanceof Response?$.status:void 0,X=$ instanceof Response?await $.text():$;try{let G=fK4.parse(JSON.parse(X)),{error:J,error_description:Q,error_uri:W}=G;return new(xK4[J]||DV)(Q||"",W)}catch(G){let J=`${Y?`HTTP ${Y}: `:""}Invalid OAuth error response: ${G}. Raw body: ${X}`;return new DV(J)}}async function $H($,Y){try{return await bm0($,Y)}catch(X){if(X instanceof dE||X instanceof cj)return await $.invalidateCredentials?.("all"),await bm0($,Y);else if(X instanceof cE)return await $.invalidateCredentials?.("tokens"),await bm0($,Y);throw X}}async function bm0($,{serverUrl:Y,authorizationCode:X,scope:G,resourceMetadataUrl:J,fetchFn:Q}){let W=await $.discoveryState?.(),Z,K,H,z=J;if(!z&&W?.resourceMetadataUrl)z=new URL(W.resourceMetadataUrl);if(W?.authorizationServerUrl){if(K=W.authorizationServerUrl,Z=W.resourceMetadata,H=W.authorizationServerMetadata??await um0(K,{fetchFn:Q}),!Z)try{Z=await gm0(Y,{resourceMetadataUrl:z},Q)}catch{}if(H!==W.authorizationServerMetadata||Z!==W.resourceMetadata)await $.saveDiscoveryState?.({authorizationServerUrl:String(K),resourceMetadataUrl:z?.toString(),resourceMetadata:Z,authorizationServerMetadata:H})}else{let E=await v$9(Y,{resourceMetadataUrl:z,fetchFn:Q});K=E.authorizationServerUrl,H=E.authorizationServerMetadata,Z=E.resourceMetadata,await $.saveDiscoveryState?.({authorizationServerUrl:String(K),resourceMetadataUrl:z?.toString(),resourceMetadata:Z,authorizationServerMetadata:H})}let V=await TU4(Y,$,Z),A=G||Z?.scopes_supported?.join(" ")||$.clientMetadata.scope,F=await Promise.resolve($.clientInformation());if(!F){if(X!==void 0)throw Error("Existing OAuth client information is required when exchanging an authorization code");let E=H?.client_id_metadata_document_supported===!0,M=$.clientMetadataUrl;if(M&&!T$9(M))throw new lE(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${M}`);if(E&&M)F={client_id:M},await $.saveClientInformation?.(F);else{if(!$.saveClientInformation)throw Error("OAuth client information must be saveable for dynamic registration");let q=await xU4(K,{metadata:H,clientMetadata:$.clientMetadata,scope:A,fetchFn:Q});await $.saveClientInformation(q),F=q}}let N=!$.redirectUrl;if(X!==void 0||N){let E=await y$9($,K,{metadata:H,resource:V,authorizationCode:X,fetchFn:Q});return await $.saveTokens(E),"AUTHORIZED"}let D=await $.tokens();if(D?.refresh_token)try{let E=await vU4(K,{metadata:H,clientInformation:F,refreshToken:D.refresh_token,resource:V,addClientAuthentication:$.addClientAuthentication,fetchFn:Q});return await $.saveTokens(E),"AUTHORIZED"}catch(E){if(!(E instanceof T$)||E instanceof DV);else throw E}let L=$.state?await $.state():void 0,{authorizationUrl:B,codeVerifier:O}=await SU4(K,{metadata:H,clientInformation:F,state:L,redirectUrl:$.redirectUrl,scope:A,resource:V});return await $.saveCodeVerifier(O),await $.redirectToAuthorization(B),"REDIRECT"}function T$9($){if(!$)return!1;try{let Y=new URL($);return Y.protocol==="https:"&&Y.pathname!=="/"}catch{return!1}}async function TU4($,Y,X){let G=wU4($);if(Y.validateResourceURL)return await Y.validateResourceURL(G,X?.resource);if(!X)return;if(!_U4({requestedResource:G,configuredResource:X.resource}))throw Error(`Protected resource ${X.resource} does not match expected ${G} (or origin)`);return new URL(X.resource)}function OT($){let Y=$.headers.get("WWW-Authenticate");if(!Y)return{};let[X,G]=Y.split(" ");if(X.toLowerCase()!=="bearer"||!G)return{};let J=hm0($,"resource_metadata")||void 0,Q;if(J)try{Q=new URL(J)}catch{}let W=hm0($,"scope")||void 0,Z=hm0($,"error")||void 0;return{resourceMetadataUrl:Q,scope:W,error:Z}}function hm0($,Y){let X=$.headers.get("WWW-Authenticate");if(!X)return null;let G=new RegExp(`${Y}=(?:"([^"]+)"|([^\\s,]+))`),J=X.match(G);if(J)return J[1]||J[2];return null}async function gm0($,Y,X=fetch){let G=await k$9($,"oauth-protected-resource",X,{protocolVersion:Y?.protocolVersion,metadataUrl:Y?.resourceMetadataUrl});if(!G||G.status===404)throw await G?.body?.cancel(),Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!G.ok)throw await G.body?.cancel(),Error(`HTTP ${G.status} trying to load well-known OAuth protected resource metadata.`);return bK4.parse(await G.json())}async function mm0($,Y,X=fetch){try{return await X($,{headers:Y})}catch(G){if(G instanceof TypeError)if(Y)return mm0($,void 0,X);else return;throw G}}function C$9($,Y="",X={}){if(Y.endsWith("/"))Y=Y.slice(0,-1);return X.prependPathname?`${Y}/.well-known/${$}`:`/.well-known/${$}${Y}`}async function jU4($,Y,X=fetch){return await mm0($,{"MCP-Protocol-Version":Y},X)}function S$9($,Y){return!$||$.status>=400&&$.status<500&&Y!=="/"}async function k$9($,Y,X,G){let J=new URL($),Q=G?.protocolVersion??NV,W;if(G?.metadataUrl)W=new URL(G.metadataUrl);else{let K=C$9(Y,J.pathname);W=new URL(K,G?.metadataServerUrl??J),W.search=J.search}let Z=await jU4(W,Q,X);if(!G?.metadataUrl&&S$9(Z,J.pathname)){let K=new URL(`/.well-known/${Y}`,J);Z=await jU4(K,Q,X)}return Z}function CU4($){let Y=typeof $==="string"?new URL($):$,X=Y.pathname!=="/",G=[];if(!X)return G.push({url:new URL("/.well-known/oauth-authorization-server",Y.origin),type:"oauth"}),G.push({url:new URL("/.well-known/openid-configuration",Y.origin),type:"oidc"}),G;let J=Y.pathname;if(J.endsWith("/"))J=J.slice(0,-1);return G.push({url:new URL(`/.well-known/oauth-authorization-server${J}`,Y.origin),type:"oauth"}),G.push({url:new URL(`/.well-known/openid-configuration${J}`,Y.origin),type:"oidc"}),G.push({url:new URL(`${J}/.well-known/openid-configuration`,Y.origin),type:"oidc"}),G}async function um0($,{fetchFn:Y=fetch,protocolVersion:X=NV}={}){let G={"MCP-Protocol-Version":X,Accept:"application/json"},J=CU4($);for(let{url:Q,type:W}of J){let Z=await mm0(Q,G,Y);if(!Z)continue;if(!Z.ok){if(await Z.body?.cancel(),Z.status>=400&&Z.status<500)continue;throw Error(`HTTP ${Z.status} trying to load ${W==="oauth"?"OAuth":"OpenID provider"} metadata from ${Q}`)}if(W==="oauth")return kg0.parse(await Z.json());else return hK4.parse(await Z.json())}return}async function v$9($,Y){let X,G;try{if(X=await gm0($,{resourceMetadataUrl:Y?.resourceMetadataUrl},Y?.fetchFn),X.authorization_servers&&X.authorization_servers.length>0)G=X.authorization_servers[0]}catch{}if(!G)G=String(new URL("/",$));let J=await um0(G,{fetchFn:Y?.fetchFn});return{authorizationServerUrl:G,authorizationServerMetadata:J,resourceMetadata:X}}async function SU4($,{metadata:Y,clientInformation:X,redirectUrl:G,scope:J,state:Q,resource:W}){let Z;if(Y){if(Z=new URL(Y.authorization_endpoint),!Y.response_types_supported.includes(xm0))throw Error(`Incompatible auth server: does not support response type ${xm0}`);if(Y.code_challenge_methods_supported&&!Y.code_challenge_methods_supported.includes(ym0))throw Error(`Incompatible auth server: does not support code challenge method ${ym0}`)}else Z=new URL("/authorize",$);let K=await bg0(),H=K.code_verifier,z=K.code_challenge;if(Z.searchParams.set("response_type",xm0),Z.searchParams.set("client_id",X.client_id),Z.searchParams.set("code_challenge",z),Z.searchParams.set("code_challenge_method",ym0),Z.searchParams.set("redirect_uri",String(G)),Q)Z.searchParams.set("state",Q);if(J)Z.searchParams.set("scope",J);if(J?.includes("offline_access"))Z.searchParams.append("prompt","consent");if(W)Z.searchParams.set("resource",W.href);return{authorizationUrl:Z,codeVerifier:H}}function x$9($,Y,X){return new URLSearchParams({grant_type:"authorization_code",code:$,code_verifier:Y,redirect_uri:String(X)})}async function kU4($,{metadata:Y,tokenRequestParams:X,clientInformation:G,addClientAuthentication:J,resource:Q,fetchFn:W}){let Z=Y?.token_endpoint?new URL(Y.token_endpoint):new URL("/token",$),K=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(Q)X.set("resource",Q.href);if(J)await J(K,X,Z,Y);else if(G){let z=Y?.token_endpoint_auth_methods_supported??[],V=I$9(G,z);P$9(V,G,K,X)}let H=await(W??fetch)(Z,{method:"POST",headers:K,body:X});if(!H.ok)throw await fm0(H);return vg0.parse(await H.json())}async function vU4($,{metadata:Y,clientInformation:X,refreshToken:G,resource:J,addClientAuthentication:Q,fetchFn:W}){let Z=new URLSearchParams({grant_type:"refresh_token",refresh_token:G}),K=await kU4($,{metadata:Y,tokenRequestParams:Z,clientInformation:X,addClientAuthentication:Q,resource:J,fetchFn:W});return{refresh_token:G,...K}}async function y$9($,Y,{metadata:X,resource:G,authorizationCode:J,fetchFn:Q}={}){let W=$.clientMetadata.scope,Z;if($.prepareTokenRequest)Z=await $.prepareTokenRequest(W);if(!Z){if(!J)throw Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!$.redirectUrl)throw Error("redirectUrl is required for authorization_code flow");let H=await $.codeVerifier();Z=x$9(J,H,$.redirectUrl)}let K=await $.clientInformation();return kU4(Y,{metadata:X,tokenRequestParams:Z,clientInformation:K??void 0,addClientAuthentication:$.addClientAuthentication,resource:G,fetchFn:Q})}async function xU4($,{metadata:Y,clientMetadata:X,scope:G,fetchFn:J}){let Q;if(Y){if(!Y.registration_endpoint)throw Error("Incompatible auth server: does not support dynamic client registration");Q=new URL(Y.registration_endpoint)}else Q=new URL("/register",$);let W=await(J??fetch)(Q,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...X,...G!==void 0?{scope:G}:{}})});if(!W.ok)throw await fm0(W);return xg0.parse(await W.json())}class yU4 extends Error{constructor($,Y,X){super(`SSE error: ${Y}`);this.code=$,this.event=X}}class pm0{constructor($,Y){this._url=$,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=Y?.eventSourceInit,this._requestInit=Y?.requestInit,this._authProvider=Y?.authProvider,this._fetch=Y?.fetch,this._fetchWithInit=E$0(Y?.fetch,Y?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new OJ("No auth provider");let $;try{$=await $H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(Y){throw this.onerror?.(Y),Y}if($!=="AUTHORIZED")throw new OJ;return await this._startOrAuth()}async _commonHeaders(){let $={};if(this._authProvider){let X=await this._authProvider.tokens();if(X)$.Authorization=`Bearer ${X.access_token}`}if(this._protocolVersion)$["mcp-protocol-version"]=this._protocolVersion;let Y=BT(this._requestInit?.headers);return new Headers({...$,...Y})}_startOrAuth(){let $=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((Y,X)=>{this._eventSource=new LT(this._url.href,{...this._eventSourceInit,fetch:async(G,J)=>{let Q=await this._commonHeaders();Q.set("Accept","text/event-stream");let W=await $(G,{...J,headers:Q});if(W.status===401&&W.headers.has("www-authenticate")){let{resourceMetadataUrl:Z,scope:K}=OT(W);this._resourceMetadataUrl=Z,this._scope=K}return W}}),this._abortController=new AbortController,this._eventSource.onerror=(G)=>{if(G.code===401&&this._authProvider){this._authThenStart().then(Y,X);return}let J=new yU4(G.code,G.message,G);X(J),this.onerror?.(J)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",(G)=>{let J=G;try{if(this._endpoint=new URL(J.data,this._url),this._endpoint.origin!==this._url.origin)throw Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(Q){X(Q),this.onerror?.(Q),this.close();return}Y()}),this._eventSource.onmessage=(G)=>{let J=G,Q;try{Q=C$.parse(JSON.parse(J.data))}catch(W){this.onerror?.(W);return}this.onmessage?.(Q)}})}async start(){if(this._eventSource)throw Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth($){if(!this._authProvider)throw new OJ("No auth provider");if(await $H(this._authProvider,{serverUrl:this._url,authorizationCode:$,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new OJ("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send($){if(!this._endpoint)throw Error("Not connected");try{let Y=await this._commonHeaders();Y.set("content-type","application/json");let X={...this._requestInit,method:"POST",headers:Y,body:JSON.stringify($),signal:this._abortController?.signal},G=await(this._fetch??fetch)(this._endpoint,X);if(!G.ok){let J=await G.text().catch(()=>null);if(G.status===401&&this._authProvider){let{resourceMetadataUrl:Q,scope:W}=OT(G);if(this._resourceMetadataUrl=Q,this._scope=W,await $H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new OJ;return this.send($)}throw Error(`Error POSTing to endpoint (HTTP ${G.status}): ${J}`)}await G.body?.cancel()}catch(Y){throw this.onerror?.(Y),Y}}setProtocolVersion($){this._protocolVersion=$}}var IH4=U6(qH4(),1);import tm0 from"process";import{PassThrough as VY9}from"stream";BY();class xu{append($){this._buffer=this._buffer?Buffer.concat([this._buffer,$]):$}readMessage(){if(!this._buffer)return null;let $=this._buffer.indexOf(`
`);if($===-1)return null;let Y=this._buffer.toString("utf8",0,$).replace(/\r$/,"");return this._buffer=this._buffer.subarray($+1),zY9(Y)}clear(){this._buffer=void 0}}function zY9($){return C$.parse(JSON.parse($))}function R$0($){return JSON.stringify($)+`
`}var AY9=tm0.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function em0(){let $={};for(let Y of AY9){let X=tm0.env[Y];if(X===void 0)continue;if(X.startsWith("()"))continue;$[Y]=X}return $}class q$0{constructor($){if(this._readBuffer=new xu,this._stderrStream=null,this._serverParams=$,$.stderr==="pipe"||$.stderr==="overlapped")this._stderrStream=new VY9}async start(){if(this._process)throw Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise(($,Y)=>{if(this._process=IH4.default(this._serverParams.command,this._serverParams.args??[],{env:{...em0(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:tm0.platform==="win32",cwd:this._serverParams.cwd}),this._process.on("error",(X)=>{Y(X),this.onerror?.(X)}),this._process.on("spawn",()=>{$()}),this._process.on("close",(X)=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",(X)=>{this.onerror?.(X)}),this._process.stdout?.on("data",(X)=>{this._readBuffer.append(X),this.processReadBuffer()}),this._process.stdout?.on("error",(X)=>{this.onerror?.(X)}),this._stderrStream&&this._process.stderr)this._process.stderr.pipe(this._stderrStream)})}get stderr(){if(this._stderrStream)return this._stderrStream;return this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){while(!0)try{let $=this._readBuffer.readMessage();if($===null)break;this.onmessage?.($)}catch($){this.onerror?.($)}}async close(){if(this._process){let $=this._process;this._process=void 0;let Y=new Promise((X)=>{$.once("close",()=>{X()})});try{$.stdin?.end()}catch{}if(await Promise.race([Y,new Promise((X)=>setTimeout(X,2000).unref())]),$.exitCode===null){try{$.kill("SIGTERM")}catch{}await Promise.race([Y,new Promise((X)=>setTimeout(X,2000).unref())])}if($.exitCode===null)try{$.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send($){return new Promise((Y)=>{if(!this._process?.stdin)throw Error("Not connected");let X=R$0($);if(this._process.stdin.write(X))Y();else this._process.stdin.once("drain",Y)})}}BY();$v0();var FY9={initialReconnectionDelay:1000,maxReconnectionDelay:30000,reconnectionDelayGrowFactor:1.5,maxRetries:2};class WM extends Error{constructor($,Y){super(`Streamable HTTP error: ${Y}`);this.code=$}}class I$0{constructor($,Y){this._hasCompletedAuthFlow=!1,this._url=$,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=Y?.requestInit,this._authProvider=Y?.authProvider,this._fetch=Y?.fetch,this._fetchWithInit=E$0(Y?.fetch,Y?.requestInit),this._sessionId=Y?.sessionId,this._reconnectionOptions=Y?.reconnectionOptions??FY9}async _authThenStart(){if(!this._authProvider)throw new OJ("No auth provider");let $;try{$=await $H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(Y){throw this.onerror?.(Y),Y}if($!=="AUTHORIZED")throw new OJ;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let $={};if(this._authProvider){let X=await this._authProvider.tokens();if(X)$.Authorization=`Bearer ${X.access_token}`}if(this._sessionId)$["mcp-session-id"]=this._sessionId;if(this._protocolVersion)$["mcp-protocol-version"]=this._protocolVersion;let Y=BT(this._requestInit?.headers);return new Headers({...$,...Y})}async _startOrAuthSse($){let{resumptionToken:Y}=$;try{let X=await this._commonHeaders();if(X.set("Accept","text/event-stream"),Y)X.set("last-event-id",Y);let G=await(this._fetch??fetch)(this._url,{method:"GET",headers:X,signal:this._abortController?.signal});if(!G.ok){if(await G.body?.cancel(),G.status===401&&this._authProvider)return await this._authThenStart();if(G.status===405)return;throw new WM(G.status,`Failed to open SSE stream: ${G.statusText}`)}this._handleSseStream(G.body,$,!0)}catch(X){throw this.onerror?.(X),X}}_getNextReconnectionDelay($){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let Y=this._reconnectionOptions.initialReconnectionDelay,X=this._reconnectionOptions.reconnectionDelayGrowFactor,G=this._reconnectionOptions.maxReconnectionDelay;return Math.min(Y*Math.pow(X,$),G)}_scheduleReconnection($,Y=0){let X=this._reconnectionOptions.maxRetries;if(Y>=X){this.onerror?.(Error(`Maximum reconnection attempts (${X}) exceeded.`));return}let G=this._getNextReconnectionDelay(Y);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse($).catch((J)=>{this.onerror?.(Error(`Failed to reconnect SSE stream: ${J instanceof Error?J.message:String(J)}`)),this._scheduleReconnection($,Y+1)})},G)}_handleSseStream($,Y,X){if(!$)return;let{onresumptiontoken:G,replayMessageId:J}=Y,Q,W=!1,Z=!1;(async()=>{try{let H=$.pipeThrough(new TextDecoderStream).pipeThrough(new ef({onRetry:(A)=>{this._serverRetryMs=A}})).getReader();while(!0){let{value:A,done:F}=await H.read();if(F)break;if(A.id)Q=A.id,W=!0,G?.(A.id);if(!A.data)continue;if(!A.event||A.event==="message")try{let N=C$.parse(JSON.parse(A.data));if(CX(N)){if(Z=!0,J!==void 0)N.id=J}this.onmessage?.(N)}catch(N){this.onerror?.(N)}}if((X||W)&&!Z&&this._abortController&&!this._abortController.signal.aborted)this._scheduleReconnection({resumptionToken:Q,onresumptiontoken:G,replayMessageId:J},0)}catch(H){if(this.onerror?.(Error(`SSE stream disconnected: ${H}`)),(X||W)&&!Z&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:Q,onresumptiontoken:G,replayMessageId:J},0)}catch(A){this.onerror?.(Error(`Failed to reconnect: ${A instanceof Error?A.message:String(A)}`))}}})()}async start(){if(this._abortController)throw Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth($){if(!this._authProvider)throw new OJ("No auth provider");if(await $H(this._authProvider,{serverUrl:this._url,authorizationCode:$,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new OJ("Failed to authorize")}async close(){if(this._reconnectionTimeout)clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0;this._abortController?.abort(),this.onclose?.()}async send($,Y){try{let{resumptionToken:X,onresumptiontoken:G}=Y||{};if(X){this._startOrAuthSse({resumptionToken:X,replayMessageId:DJ($)?$.id:void 0}).catch((V)=>this.onerror?.(V));return}let J=await this._commonHeaders();J.set("content-type","application/json"),J.set("accept","application/json, text/event-stream");let Q={...this._requestInit,method:"POST",headers:J,body:JSON.stringify($),signal:this._abortController?.signal},W=await(this._fetch??fetch)(this._url,Q),Z=W.headers.get("mcp-session-id");if(Z)this._sessionId=Z;if(!W.ok){let V=await W.text().catch(()=>null);if(W.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new WM(401,"Server returned 401 after successful authentication");let{resourceMetadataUrl:A,scope:F}=OT(W);if(this._resourceMetadataUrl=A,this._scope=F,await $H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new OJ;return this._hasCompletedAuthFlow=!0,this.send($)}if(W.status===403&&this._authProvider){let{resourceMetadataUrl:A,scope:F,error:N}=OT(W);if(N==="insufficient_scope"){let D=W.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===D)throw new WM(403,"Server returned 403 after trying upscoping");if(F)this._scope=F;if(A)this._resourceMetadataUrl=A;if(this._lastUpscopingHeader=D??void 0,await $H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new OJ;return this.send($)}}throw new WM(W.status,`Error POSTing to endpoint: ${V}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,W.status===202){if(await W.body?.cancel(),cg0($))this._startOrAuthSse({resumptionToken:void 0}).catch((V)=>this.onerror?.(V));return}let H=(Array.isArray($)?$:[$]).filter((V)=>("method"in V)&&("id"in V)&&V.id!==void 0).length>0,z=W.headers.get("content-type");if(H)if(z?.includes("text/event-stream"))this._handleSseStream(W.body,{onresumptiontoken:G},!1);else if(z?.includes("application/json")){let V=await W.json(),A=Array.isArray(V)?V.map((F)=>C$.parse(F)):[C$.parse(V)];for(let F of A)this.onmessage?.(F)}else throw await W.body?.cancel(),new WM(-1,`Unexpected content type: ${z}`);else await W.body?.cancel()}catch(X){throw this.onerror?.(X),X}}get sessionId(){return this._sessionId}async terminateSession(){if(!this._sessionId)return;try{let $=await this._commonHeaders(),Y={...this._requestInit,method:"DELETE",headers:$,signal:this._abortController?.signal},X=await(this._fetch??fetch)(this._url,Y);if(await X.body?.cancel(),!X.ok&&X.status!==405)throw new WM(X.status,`Failed to terminate session: ${X.statusText}`);this._sessionId=void 0}catch($){throw this.onerror?.($),$}}setProtocolVersion($){this._protocolVersion=$}get protocolVersion(){return this._protocolVersion}async resumeStream($,Y){await this._startOrAuthSse({resumptionToken:$,onresumptiontoken:Y?.onresumptiontoken})}}BY();import J2 from"process";var P$0=new Set,$u0=new Set,PH4=!1,wH4=!1;async function DY9(){let $=(X)=>new Promise((G)=>{if(!X||!X.writable||X.writableEnded||X.destroyed){G();return}let J=()=>{X.off("error",J),G()};X.once("error",J);try{X.write("",()=>{X.off("error",J),G()})}catch{X.off("error",J),G()}}),Y=new Promise((X)=>{setTimeout(X,1000)});await Promise.race([Promise.all([$(J2.stdout),$(J2.stderr)]),Y])}async function RT($,Y,X){if(PH4)return;if(PH4=!0,P$0.size>0&&Y)console.error(["SYNCHRONOUS TERMINATION NOTICE:","When explicitly exiting the process via process.exit or via a parent process,","asynchronous tasks in your exitHooks will not run. Either remove these tasks,","use gracefulExit() instead of process.exit(), or ensure your parent process","sends a SIGINT to the process running this code."].join(" "));let G=0;if(X>0)G=128+X;else if(typeof J2.exitCode==="number"||typeof J2.exitCode==="string")G=J2.exitCode;let J=(K=!1)=>{if(K===!0||$===!0)J2.exit(G)};for(let K of $u0)K(G);if(Y){J();return}let Q=[],W=0;for(let[K,H]of P$0)W=Math.max(W,H),Q.push(Promise.resolve(K(G)));let Z=W>0?setTimeout(()=>{J(!0)},W):void 0;await Promise.all(Q),clearTimeout(Z),await DY9(),J()}function NY9($){let{onExit:Y,wait:X,isSynchronous:G}=$,J=[Y,X];if(G)$u0.add(Y);else P$0.add(J);if(!wH4)wH4=!0,J2.once("beforeExit",RT.bind(void 0,!0,!1,-128)),J2.once("SIGINT",RT.bind(void 0,!0,!1,2)),J2.once("SIGTERM",RT.bind(void 0,!0,!1,15)),J2.once("exit",RT.bind(void 0,!1,!0,0)),J2.on("message",(Q)=>{if(Q==="shutdown")RT(!0,!0,-128)});return()=>{if(G)$u0.delete(Y);else P$0.delete(J)}}function _H4($,Y={}){if(typeof $!=="function")throw TypeError("onExit must be a function");if(!(typeof Y.wait==="number"&&Y.wait>0))throw TypeError("wait must be set to a positive numeric value");return NY9({onExit:$,wait:Y.wait,isSynchronous:!1})}function Yu0($){if($!==void 0)J2.exitCode=$;RT(!0,!1,-128)}import{createHash as KG9,randomUUID as jz4}from"crypto";EW();var Tz4=U6(yo(),1);dZ();xh();EW();sf0();import{randomUUID as LY9}from"crypto";var Xu0=class extends u8{idWasSet=!1;name;version;_id;description;instructions;repository;releaseDate;isLatest;packageCanonical;packages;remotes;convertedTools;mastra;agents;workflows;originalTools;get id(){return this._id}tools(){return this.convertedTools}setId($){if(this.idWasSet)return;this._id=$,this.idWasSet=!0}__registerMastra($){if(this.mastra=$,this.convertedTools=this.convertTools(this.originalTools,this.agents,this.workflows),this.originalTools&&typeof this.originalTools==="object")Object.entries(this.originalTools).forEach(([Y,X])=>{try{if(X&&typeof X==="object"&&"id"in X){let G=typeof X.id==="string"?X.id:Y;$.addTool(X,G)}}catch(G){if(!(G instanceof G0)||G.id!=="MASTRA_ADD_TOOL_DUPLICATE_KEY")throw G}});if(this.agents&&typeof this.agents==="object")Object.entries(this.agents).forEach(([Y,X])=>{try{$.addAgent(X,Y)}catch(G){if(!(G instanceof G0)||G.id!=="MASTRA_ADD_AGENT_DUPLICATE_KEY")throw G}});if(this.workflows&&typeof this.workflows==="object")Object.entries(this.workflows).forEach(([Y,X])=>{try{$.addWorkflow(X,Y)}catch(G){if(!(G instanceof G0)||G.id!=="MASTRA_ADD_WORKFLOW_DUPLICATE_KEY")throw G}})}constructor($){super({component:AK.MCP_SERVER,name:$.name});if(this.name=$.name,this.version=$.version,$.id)this._id=sm($.id),this.idWasSet=!0;else this._id=this.mastra?.generateId()||LY9();this.description=$.description,this.instructions=$.instructions,this.repository=$.repository,this.releaseDate=$.releaseDate||new Date().toISOString(),this.isLatest=$.isLatest===void 0?!0:$.isLatest,this.packageCanonical=$.packageCanonical,this.packages=$.packages,this.remotes=$.remotes,this.agents=$.agents,this.workflows=$.workflows,this.originalTools=$.tools,this.convertedTools=this.convertTools($.tools,$.agents,$.workflows)}};DO();import{readFileSync as UG9}from"fs";xU();BY();BY();O1();BY();O1();var NH7=(($)=>L0)(function($){return L0.apply(this,arguments)});class SH4 extends JM{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch($,Y){}_ensureEventSlot($){let Y=this._eventSlots.get($);if(!Y){let X=this.eventSchemas[$];if(!X)throw Error(`Unknown event: ${String($)}`);Y={listeners:[]},this._eventSlots.set($,Y);let G=X.shape.method.value;this._registeredMethods.add(G);let J=Y;super.setNotificationHandler(X,(Q)=>{let W=Q.params;this.onEventDispatch($,W),J.onHandler?.(W);for(let Z of[...J.listeners])Z(W)})}return Y}setEventHandler($,Y){let X=this._ensureEventSlot($);if(X.onHandler&&Y)console.warn(`[MCP Apps] on${String($)} handler replaced. Use addEventListener("${String($)}", \u2026) to add multiple listeners without replacing.`);X.onHandler=Y}getEventHandler($){return this._eventSlots.get($)?.onHandler}addEventListener($,Y){this._ensureEventSlot($).listeners.push(Y)}removeEventListener($,Y){let X=this._eventSlots.get($);if(!X)return;let G=X.listeners.indexOf(Y);if(G!==-1)X.listeners.splice(G,1)}setRequestHandler=($,Y)=>{this._assertMethodNotRegistered($,"setRequestHandler"),super.setRequestHandler($,Y)};setNotificationHandler=($,Y)=>{this._assertMethodNotRegistered($,"setNotificationHandler"),super.setNotificationHandler($,Y)};warnIfRequestHandlerReplaced($,Y,X){if(Y&&X)console.warn(`[MCP Apps] ${$} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=($,Y)=>{let X=$.shape.method.value;this._registeredMethods.add(X),super.setRequestHandler($,Y)};_assertMethodNotRegistered($,Y){let X=$.shape.method.value;if(this._registeredMethods.has(X))throw Error(`Handler for "${X}" already registered (via ${Y}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(X)}}var BY9="2026-01-26";var OY9="ui/notifications/tool-input-partial";class kH4{eventTarget;eventSource;messageListener;constructor($=window.parent,Y){this.eventTarget=$,this.eventSource=Y,this.messageListener=(X)=>{if(Y&&X.source!==this.eventSource){console.debug("Ignoring message from unknown source",X);return}let G=C$.safeParse(X.data);if(G.success)console.debug("Parsed message",G.data),this.onmessage?.(G.data);else if(X.data?.jsonrpc!=="2.0")console.debug("Ignoring non-JSON-RPC message",G.error.message,X);else console.error("Failed to parse message",G.error.message,X),this.onerror?.(Error("Invalid JSON-RPC message received: "+G.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send($,Y){if($.method!==OY9)console.debug("Sending message",$);this.eventTarget.postMessage($,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var EY9=U.union([U.literal("light"),U.literal("dark")]).describe("Color theme preference for the host environment."),yu=U.union([U.literal("inline"),U.literal("fullscreen"),U.literal("pip")]).describe("Display mode for UI presentation."),MY9=U.union([U.literal("--color-background-primary"),U.literal("--color-background-secondary"),U.literal("--color-background-tertiary"),U.literal("--color-background-inverse"),U.literal("--color-background-ghost"),U.literal("--color-background-info"),U.literal("--color-background-danger"),U.literal("--color-background-success"),U.literal("--color-background-warning"),U.literal("--color-background-disabled"),U.literal("--color-text-primary"),U.literal("--color-text-secondary"),U.literal("--color-text-tertiary"),U.literal("--color-text-inverse"),U.literal("--color-text-ghost"),U.literal("--color-text-info"),U.literal("--color-text-danger"),U.literal("--color-text-success"),U.literal("--color-text-warning"),U.literal("--color-text-disabled"),U.literal("--color-border-primary"),U.literal("--color-border-secondary"),U.literal("--color-border-tertiary"),U.literal("--color-border-inverse"),U.literal("--color-border-ghost"),U.literal("--color-border-info"),U.literal("--color-border-danger"),U.literal("--color-border-success"),U.literal("--color-border-warning"),U.literal("--color-border-disabled"),U.literal("--color-ring-primary"),U.literal("--color-ring-secondary"),U.literal("--color-ring-inverse"),U.literal("--color-ring-info"),U.literal("--color-ring-danger"),U.literal("--color-ring-success"),U.literal("--color-ring-warning"),U.literal("--font-sans"),U.literal("--font-mono"),U.literal("--font-weight-normal"),U.literal("--font-weight-medium"),U.literal("--font-weight-semibold"),U.literal("--font-weight-bold"),U.literal("--font-text-xs-size"),U.literal("--font-text-sm-size"),U.literal("--font-text-md-size"),U.literal("--font-text-lg-size"),U.literal("--font-heading-xs-size"),U.literal("--font-heading-sm-size"),U.literal("--font-heading-md-size"),U.literal("--font-heading-lg-size"),U.literal("--font-heading-xl-size"),U.literal("--font-heading-2xl-size"),U.literal("--font-heading-3xl-size"),U.literal("--font-text-xs-line-height"),U.literal("--font-text-sm-line-height"),U.literal("--font-text-md-line-height"),U.literal("--font-text-lg-line-height"),U.literal("--font-heading-xs-line-height"),U.literal("--font-heading-sm-line-height"),U.literal("--font-heading-md-line-height"),U.literal("--font-heading-lg-line-height"),U.literal("--font-heading-xl-line-height"),U.literal("--font-heading-2xl-line-height"),U.literal("--font-heading-3xl-line-height"),U.literal("--border-radius-xs"),U.literal("--border-radius-sm"),U.literal("--border-radius-md"),U.literal("--border-radius-lg"),U.literal("--border-radius-xl"),U.literal("--border-radius-full"),U.literal("--border-width-regular"),U.literal("--shadow-hairline"),U.literal("--shadow-sm"),U.literal("--shadow-md"),U.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),RY9=U.record(MY9.describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),U.union([U.string(),U.undefined()]).describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),qH7=U.object({method:U.literal("ui/open-link"),params:U.object({url:U.string().describe("URL to open in the host's browser")})}),qY9=U.object({isError:U.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),IY9=U.object({isError:U.boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),PY9=U.object({isError:U.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),IH7=U.object({method:U.literal("ui/notifications/sandbox-proxy-ready"),params:U.object({})}),Gu0=U.object({connectDomains:U.array(U.string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).

- Maps to CSP \`connect-src\` directive
- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:U.array(U.string()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:U.array(U.string()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:U.array(U.string()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted \u2192 only same origin allowed (`base-uri 'self'`)")}),Ju0=U.object({camera:U.object({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:U.object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:U.object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:U.object({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")}),PH7=U.object({method:U.literal("ui/notifications/size-changed"),params:U.object({width:U.number().optional().describe("New width in pixels."),height:U.number().optional().describe("New height in pixels.")})}),wY9=U.object({method:U.literal("ui/notifications/tool-input"),params:U.object({arguments:U.record(U.string(),U.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),_Y9=U.object({method:U.literal("ui/notifications/tool-input-partial"),params:U.object({arguments:U.record(U.string(),U.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),jY9=U.object({method:U.literal("ui/notifications/tool-cancelled"),params:U.object({reason:U.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),TY9=U.object({fonts:U.string().optional()}),CY9=U.object({variables:RY9.optional().describe("CSS variables for theming the app."),css:TY9.optional().describe("CSS blocks that apps can inject.")}),SY9=U.object({method:U.literal("ui/resource-teardown"),params:U.object({})}),wH7=U.record(U.string(),U.unknown()),jH4=U.object({text:U.object({}).optional().describe("Host supports text content blocks."),image:U.object({}).optional().describe("Host supports image content blocks."),audio:U.object({}).optional().describe("Host supports audio content blocks."),resource:U.object({}).optional().describe("Host supports resource content blocks."),resourceLink:U.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:U.object({}).optional().describe("Host supports structured content.")}),_H7=U.object({method:U.literal("ui/notifications/request-teardown"),params:U.object({}).optional()}),kY9=U.object({experimental:U.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:U.object({}).optional().describe("Host supports opening external URLs."),downloadFile:U.object({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:U.object({listChanged:U.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:U.object({listChanged:U.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:U.object({}).optional().describe("Host accepts log messages."),sandbox:U.object({permissions:Ju0.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:Gu0.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:jH4.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:jH4.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:U.object({tools:U.object({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),vY9=U.object({experimental:U.object({}).optional().describe("Experimental features (structure TBD)."),tools:U.object({listChanged:U.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:U.array(yu).optional().describe("Display modes the app supports.")}),jH7=U.object({method:U.literal("ui/notifications/initialized"),params:U.object({}).optional()}),TH7=U.object({csp:Gu0.optional().describe("Content Security Policy configuration for UI resources."),permissions:Ju0.optional().describe("Sandbox permissions requested by the UI resource."),domain:U.string().optional().describe(`Dedicated origin for view sandbox.

Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.

**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)

If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:U.boolean().optional().describe(`Visual boundary preference - true if view prefers a visible border.

Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.

- \`true\`: request visible border + background
- \`false\`: request no visible border + background
- omitted: host decides border`)}),CH7=U.object({method:U.literal("ui/request-display-mode"),params:U.object({mode:yu.describe("The display mode being requested.")})}),xY9=U.object({mode:yu.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),yY9=U.union([U.literal("model"),U.literal("app")]).describe("Tool visibility scope - who can access the tool."),SH7=U.object({resourceUri:U.string().optional(),visibility:U.array(yY9).optional().describe(`Who can access this tool. Default: ["model", "app"]
- "model": Tool visible to and callable by the agent
- "app": Tool callable by the app from this server only`),csp:U.never().optional(),permissions:U.never().optional()}),kH7=U.object({mimeTypes:U.array(U.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),vH7=U.object({method:U.literal("ui/download-file"),params:U.object({contents:U.array(U.union([o70,t70])).describe("Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),xH7=U.object({method:U.literal("ui/message"),params:U.object({role:U.literal("user").describe('Message role, currently only "user" is supported.'),content:U.array(XM).describe("Message content blocks (text, image, etc.).")})}),yH7=U.object({method:U.literal("ui/notifications/sandbox-resource-ready"),params:U.object({html:U.string().describe("HTML content to load into the inner iframe."),sandbox:U.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:Gu0.optional().describe("CSP configuration from resource metadata."),permissions:Ju0.optional().describe("Sandbox permissions from resource metadata.")})}),bY9=U.object({method:U.literal("ui/notifications/tool-result"),params:LJ.describe("Standard MCP tool execution result.")}),vH4=U.object({toolInfo:U.object({id:nE.optional().describe("JSON-RPC id of the tools/call request."),tool:Pu.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:EY9.optional().describe("Current color theme preference."),styles:CY9.optional().describe("Style configuration for theming the app."),displayMode:yu.optional().describe("How the UI is currently displayed."),availableDisplayModes:U.array(yu).optional().describe("Display modes the host supports."),containerDimensions:U.union([U.object({height:U.number().describe("Fixed container height in pixels.")}),U.object({maxHeight:U.union([U.number(),U.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(U.union([U.object({width:U.number().describe("Fixed container width in pixels.")}),U.object({maxWidth:U.union([U.number(),U.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:U.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:U.string().optional().describe("User's timezone in IANA format."),userAgent:U.string().optional().describe("Host application identifier."),platform:U.union([U.literal("web"),U.literal("desktop"),U.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:U.object({touch:U.boolean().optional().describe("Whether the device supports touch input."),hover:U.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:U.object({top:U.number().describe("Top safe area inset in pixels."),right:U.number().describe("Right safe area inset in pixels."),bottom:U.number().describe("Bottom safe area inset in pixels."),left:U.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),hY9=U.object({method:U.literal("ui/notifications/host-context-changed"),params:vH4.describe("Partial context update containing only changed fields.")}),bH7=U.object({method:U.literal("ui/update-model-context"),params:U.object({content:U.array(XM).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:U.record(U.string(),U.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),hH7=U.object({method:U.literal("ui/initialize"),params:U.object({appInfo:nj.describe("App identification (name and version)."),appCapabilities:vY9.describe("Features and capabilities this app provides."),protocolVersion:U.string().describe("Protocol version this app supports.")})}),fY9=U.object({protocolVersion:U.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:nj.describe("Host application identification and version."),hostCapabilities:kY9.describe("Features and capabilities provided by the host."),hostContext:vH4.describe("Rich context about the host environment.")}).passthrough(),gY9={target:"draft-2020-12"};async function TH4($,Y){let X=$["~standard"];if(X.jsonSchema)return X.jsonSchema[Y](gY9);if(X.vendor==="zod"){let{z:G}=await Promise.resolve().then(() => (O1(),AU));return G.toJSONSchema($,{io:Y})}throw Error(`Schema (vendor: ${X.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function CH4($,Y,X=""){let G=await $["~standard"].validate(Y);if(G.issues){let J=G.issues.map((Q)=>{let W=Q.path?.map((Z)=>typeof Z==="object"?Z.key:Z).join(".");return W?`${W}: ${Q.message}`:Q.message}).join("; ");throw Error(X+J)}return G.value}var Qu0="ui/resourceUri",xH4="text/html;profile=mcp-app";class yH4 extends SH4{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized($){if(this._initializedSent)return;let Y=`[ext-apps] App.${$}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(Y);console.warn(`${Y}. This will throw in a future release.`)}eventSchemas={toolinput:wY9,toolinputpartial:_Y9,toolresult:bY9,toolcancelled:jY9,hostcontextchanged:hY9};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming($){if(!yH4.ONE_SHOT_EVENTS.has($)||this._everHadListener.has($))return;if(this._everHadListener.add($),!this._initializedSent)return;let Y=`[ext-apps] "${String($)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(Y);console.warn(Y)}setEventHandler($,Y){if(Y)this._assertHandlerTiming($);super.setEventHandler($,Y)}addEventListener($,Y){this._assertHandlerTiming($),super.addEventListener($,Y)}onEventDispatch($,Y){if($==="hostcontextchanged")this._hostContext={...this._hostContext,...Y}}constructor($,Y={},X={autoResize:!0}){super(X);if(this._appInfo=$,this._capabilities=Y,this.options=X,!X.allowUnsafeEval)U.config({jitless:!0});this.setRequestHandler(rE,(G)=>{return console.log("Received ping:",G.params),{}}),this.setEventHandler("hostcontextchanged",void 0)}registerCapabilities($){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=UT(this._capabilities,$)}registerTool($,Y,X){if(this._registeredTools[$])throw Error(`Tool ${$} is already registered`);let G=this,J=()=>{if(G._initializedSent&&G._capabilities.tools?.listChanged)G.sendToolListChanged()},Q=Y.inputSchema!==void 0,W={title:Y.title,description:Y.description,inputSchema:Y.inputSchema,outputSchema:Y.outputSchema,annotations:Y.annotations,_meta:Y._meta,enabled:!0,enable(){this.enabled=!0,J()},disable(){this.enabled=!1,J()},update(Z){Object.assign(this,Z),J()},remove(){if(G._registeredTools[$]!==W)return;delete G._registeredTools[$],J()},handler:async(Z,K)=>{if(!W.enabled)throw Error(`Tool ${$} is disabled`);let H;if(Q){let z=W.inputSchema,V=z?await CH4(z,Z??{},`Invalid input for tool ${$}: `):Z??{};H=await X(V,K)}else H=await X(K);if(W.outputSchema&&!H.isError)H.structuredContent=await CH4(W.outputSchema,H.structuredContent,`Invalid output for tool ${$}: `);return H}};if(this._registeredTools[$]=W,!this._capabilities.tools&&!this.transport)this.registerCapabilities({tools:{listChanged:!0}});return this.ensureToolHandlersInitialized(),J(),W}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){if(this._toolHandlersInitialized)return;this._toolHandlersInitialized=!0,this.oncalltool=async($,Y)=>{let X=this._registeredTools[$.name];if(!X)throw Error(`Tool ${$.name} not found`);return X.handler($.arguments,Y)},this.onlisttools=async($,Y)=>{return{tools:await Promise.all(Object.entries(this._registeredTools).filter(([X,G])=>G.enabled).map(async([X,G])=>{let J={name:X,title:G.title,description:G.description,inputSchema:G.inputSchema?await TH4(G.inputSchema,"input"):{type:"object",properties:{}}};if(G.outputSchema)J.outputSchema=await TH4(G.outputSchema,"output");if(G.annotations)J.annotations=G.annotations;if(G._meta)J._meta=G._meta;return J}))}}}async sendToolListChanged($={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:$})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput($){this.setEventHandler("toolinput",$)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial($){this.setEventHandler("toolinputpartial",$)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult($){this.setEventHandler("toolresult",$)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled($){this.setEventHandler("toolcancelled",$)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged($){this.setEventHandler("hostcontextchanged",$)}_onteardown;get onteardown(){return this._onteardown}set onteardown($){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,$),this._onteardown=$,this.replaceRequestHandler(SY9,(Y,X)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(Y.params,X)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool($){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,$),this._oncalltool=$,this.replaceRequestHandler(J3,(Y,X)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(Y.params,X)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools($){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,$),this._onlisttools=$,this.replaceRequestHandler(BV,(Y,X)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(Y.params,X)})}assertCapabilityForMethod($){switch($){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${$})`);break}}assertRequestHandlerCapability($){switch($){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${$})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${$} registered`)}}assertNotificationCapability($){}assertTaskCapability($){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability($){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool($,Y){if(this._assertInitialized("callServerTool"),typeof $==="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${$}"). Did you mean: callServerTool({ name: "${$}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:$},LJ,{onprogress:()=>{},resetTimeoutOnProgress:!0,...Y})}async readServerResource($,Y){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:$},bD,Y)}async listServerResources($,Y){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:$},yD,Y)}async createSamplingMessage($,Y){this._assertInitialized("createSamplingMessage");let X=$.tools?hD:oU;return await this.request({method:"sampling/createMessage",params:$},X,Y)}sendMessage($,Y){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:$},PY9,Y)}sendLog($){return this.notification({method:"notifications/message",params:$})}updateModelContext($,Y){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:$},NJ,Y)}openLink($,Y){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:$},qY9,Y)}sendOpenLink=this.openLink;downloadFile($,Y){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:$},IY9,Y)}requestTeardown($={}){return this.notification({method:"ui/notifications/request-teardown",params:$})}requestDisplayMode($,Y){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:$},xY9,Y)}sendSizeChanged($){return this.notification({method:"ui/notifications/size-changed",params:$})}setupSizeChangedNotifications(){let $=!1,Y=0,X=0,G=()=>{if($)return;$=!0,requestAnimationFrame(()=>{$=!1;let Q=document.documentElement,W=Q.style.height;Q.style.height="max-content";let Z=Math.ceil(Q.getBoundingClientRect().height);Q.style.height=W;let K=Math.ceil(window.innerWidth);if(K!==Y||Z!==X)Y=K,X=Z,this.sendSizeChanged({width:K,height:Z})})};G();let J=new ResizeObserver(G);return J.observe(document.documentElement),J.observe(document.body),()=>J.disconnect()}async connect($=new kH4(window.parent,window.parent),Y){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect($);try{let X=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:BY9}},fY9,Y);if(X===void 0)throw Error(`Server sent invalid initialize result: ${X}`);if(this._hostCapabilities=X.hostCapabilities,this._hostInfo=X.hostInfo,this._hostContext=X.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize)this.setupSizeChangedNotifications()}catch(X){throw this.close(),X}}}BY();var Fz4=U6(Kz4(),1),Dz4=U6(Vz4(),1);import{randomUUID as mX9}from"crypto";import{TLSSocket as uX9}from"tls";import{URL as Az4}from"url";var pX9="4mb";class Uu0{constructor($,Y,X){this._endpoint=$,this.res=Y,this._sessionId=mX9(),this._options=X||{enableDnsRebindingProtection:!1}}validateRequestHeaders($){if(!this._options.enableDnsRebindingProtection)return;if(this._options.allowedHosts&&this._options.allowedHosts.length>0){let Y=$.headers.host;if(!Y||!this._options.allowedHosts.includes(Y))return`Invalid Host header: ${Y}`}if(this._options.allowedOrigins&&this._options.allowedOrigins.length>0){let Y=$.headers.origin;if(Y&&!this._options.allowedOrigins.includes(Y))return`Invalid Origin header: ${Y}`}return}async start(){if(this._sseResponse)throw Error("SSEServerTransport already started! If using Server class, note that connect() calls start() automatically.");this.res.writeHead(200,{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive"});let $="http://localhost",Y=new Az4(this._endpoint,$);Y.searchParams.set("sessionId",this._sessionId);let X=Y.pathname+Y.search+Y.hash;this.res.write(`event: endpoint
data: ${X}

`),this._sseResponse=this.res,this.res.on("close",()=>{this._sseResponse=void 0,this.onclose?.()})}async handlePostMessage($,Y,X){if(!this._sseResponse)throw Y.writeHead(500).end("SSE connection not established"),Error("SSE connection not established");let G=this.validateRequestHeaders($);if(G){Y.writeHead(403).end(G),this.onerror?.(Error(G));return}let J=$.auth,Q=$.headers.host,W=$.socket instanceof uX9?"https":"http",Z=Q&&$.url?new Az4($.url,`${W}://${Q}`):void 0,K={headers:$.headers,url:Z},H;try{let z=Dz4.default.parse($.headers["content-type"]??"");if(z.type!=="application/json")throw Error(`Unsupported content-type: ${z.type}`);H=X??await Fz4.default($,{limit:pX9,encoding:z.parameters.charset??"utf-8"})}catch(z){Y.writeHead(400).end(String(z)),this.onerror?.(z);return}try{await this.handleMessage(typeof H==="string"?JSON.parse(H):H,{requestInfo:K,authInfo:J})}catch{Y.writeHead(400).end(`Invalid message: ${H}`);return}Y.writeHead(202).end("Accepted")}async handleMessage($,Y){let X;try{X=C$.parse($)}catch(G){throw this.onerror?.(G),G}this.onmessage?.(X,Y)}async close(){this._sseResponse?.end(),this._sseResponse=void 0,this.onclose?.()}async send($){if(!this._sseResponse)throw Error("Not connected");this._sseResponse.write(`event: message
data: ${JSON.stringify($)}

`)}get sessionId(){return this._sessionId}}import Nz4 from"process";class Hu0{constructor($=Nz4.stdin,Y=Nz4.stdout){this._stdin=$,this._stdout=Y,this._readBuffer=new xu,this._started=!1,this._ondata=(X)=>{this._readBuffer.append(X),this.processReadBuffer()},this._onerror=(X)=>{this.onerror?.(X)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let $=this._readBuffer.readMessage();if($===null)break;this.onmessage?.($)}catch($){this.onerror?.($)}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send($){return new Promise((Y)=>{let X=R$0($);if(this._stdout.write(X))Y();else this._stdout.once("drain",Y)})}}import{Http2ServerRequest as Oz4,constants as dX9}from"http2";import{Http2ServerRequest as zu0}from"http2";import{Readable as Lz4}from"stream";import $G9 from"crypto";var UM=class extends Error{constructor($,Y){super($,Y);this.name="RequestError"}},cX9=($)=>{if($ instanceof UM)return $;return new UM($.message,{cause:$})},lX9=global.Request,bu=class extends lX9{constructor($,Y){if(typeof $==="object"&&_T in $)$=$[_T]();if(typeof Y?.body?.getReader<"u")Y.duplex??="half";super($,Y)}},iX9=($)=>{let Y=[],X=$.rawHeaders;for(let G=0;G<X.length;G+=2){let{[G]:J,[G+1]:Q}=X;if(J.charCodeAt(0)!==58)Y.push([J,Q])}return new Headers(Y)},Ez4=Symbol("wrapBodyStream"),nX9=($,Y,X,G,J)=>{let Q={method:$,headers:X,signal:J.signal};if($==="TRACE"){Q.method="GET";let W=new bu(Y,Q);return Object.defineProperty(W,"method",{get(){return"TRACE"}}),W}if(!($==="GET"||$==="HEAD"))if("rawBody"in G&&G.rawBody instanceof Buffer)Q.body=new ReadableStream({start(W){W.enqueue(G.rawBody),W.close()}});else if(G[Ez4]){let W;Q.body=new ReadableStream({async pull(Z){try{W||=Lz4.toWeb(G).getReader();let{done:K,value:H}=await W.read();if(K)Z.close();else Z.enqueue(H)}catch(K){Z.error(K)}}})}else Q.body=Lz4.toWeb(G);return new bu(Y,Q)},_T=Symbol("getRequestCache"),Mz4=Symbol("requestCache"),C$0=Symbol("incomingKey"),S$0=Symbol("urlKey"),rX9=Symbol("headersKey"),wT=Symbol("abortControllerKey"),aX9=Symbol("getAbortController"),hu={get method(){return this[C$0].method||"GET"},get url(){return this[S$0]},get headers(){return this[rX9]||=iX9(this[C$0])},[aX9](){return this[_T](),this[wT]},[_T](){return this[wT]||=new AbortController,this[Mz4]||=nX9(this.method,this[S$0],this.headers,this[C$0],this[wT])}};["body","bodyUsed","cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","signal","keepalive"].forEach(($)=>{Object.defineProperty(hu,$,{get(){return this[_T]()[$]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(($)=>{Object.defineProperty(hu,$,{value:function(){return this[_T]()[$]()}})});Object.defineProperty(hu,Symbol.for("nodejs.util.inspect.custom"),{value:function($,Y,X){let G={method:this.method,url:this.url,headers:this.headers,nativeRequest:this[Mz4]};return`Request (lightweight) ${X(G,{...Y,depth:$==null?null:$-1})}`}});Object.setPrototypeOf(hu,bu.prototype);var sX9=($,Y)=>{let X=Object.create(hu);X[C$0]=$;let G=$.url||"";if(G[0]!=="/"&&(G.startsWith("http://")||G.startsWith("https://"))){if($ instanceof zu0)throw new UM("Absolute URL for :path is not allowed in HTTP/2");try{let Z=new URL(G);X[S$0]=Z.href}catch(Z){throw new UM("Invalid absolute URL",{cause:Z})}return X}let J=($ instanceof zu0?$.authority:$.headers.host)||Y;if(!J)throw new UM("Missing host header");let Q;if($ instanceof zu0){if(Q=$.scheme,!(Q==="http"||Q==="https"))throw new UM("Unsupported scheme")}else Q=$.socket&&$.socket.encrypted?"https":"http";let W=new URL(`${Q}://${J}${G}`);if(W.hostname.length!==J.length&&W.hostname!==J.replace(/:\d+$/,""))throw new UM("Invalid host header");return X[S$0]=W.href,X},Au0=Symbol("responseCache"),PT=Symbol("getResponseCache"),HM=Symbol("cache"),Nu0=global.Response,jT=class ${#$;#Y;[PT](){return delete this[HM],this[Au0]||=new Nu0(this.#$,this.#Y)}constructor(Y,X){let G;if(this.#$=Y,X instanceof $){let J=X[Au0];if(J){this.#Y=J,this[PT]();return}else this.#Y=X.#Y,G=new Headers(X.#Y.headers)}else this.#Y=X;if(typeof Y==="string"||typeof Y?.getReader<"u"||Y instanceof Blob||Y instanceof Uint8Array)this[HM]=[X?.status||200,Y,G||X?.headers]}get headers(){let Y=this[HM];if(Y){if(!(Y[2]instanceof Headers))Y[2]=new Headers(Y[2]||{"content-type":"text/plain; charset=UTF-8"});return Y[2]}return this[PT]().headers}get status(){return this[HM]?.[0]??this[PT]().status}get ok(){let Y=this.status;return Y>=200&&Y<300}};["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(($)=>{Object.defineProperty(jT.prototype,$,{get(){return this[PT]()[$]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(($)=>{Object.defineProperty(jT.prototype,$,{value:function(){return this[PT]()[$]()}})});Object.defineProperty(jT.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function($,Y,X){let G={status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[Au0]};return`Response (lightweight) ${X(G,{...Y,depth:$==null?null:$-1})}`}});Object.setPrototypeOf(jT,Nu0);Object.setPrototypeOf(jT.prototype,Nu0.prototype);async function oX9($){return Promise.race([$,Promise.resolve().then(()=>Promise.resolve(void 0))])}function Rz4($,Y,X){let G=(Z)=>{$.cancel(Z).catch(()=>{})};return Y.on("close",G),Y.on("error",G),(X??$.read()).then(W,J),$.closed.finally(()=>{Y.off("close",G),Y.off("error",G)});function J(Z){if(Z)Y.destroy(Z)}function Q(){$.read().then(W,J)}function W({done:Z,value:K}){try{if(Z)Y.end();else if(!Y.write(K))Y.once("drain",Q);else return $.read().then(W,J)}catch(H){J(H)}}}function tX9($,Y){if($.locked)throw TypeError("ReadableStream is locked.");else if(Y.destroyed)return;return Rz4($.getReader(),Y)}var Fu0=($)=>{let Y={};if(!($ instanceof Headers))$=new Headers($??void 0);let X=[];for(let[G,J]of $)if(G==="set-cookie")X.push(J);else Y[G]=J;if(X.length>0)Y["set-cookie"]=X;return Y["content-type"]??="text/plain; charset=UTF-8",Y},eX9="x-hono-already-sent";if(typeof global.crypto>"u")global.crypto=$G9;var Lu0=Symbol("outgoingEnded"),Bz4=Symbol("incomingDraining"),YG9=500,XG9=67108864,Vu0=($)=>{let Y=$;if($.destroyed||Y[Bz4])return;if(Y[Bz4]=!0,$ instanceof Oz4){try{$.stream?.close?.(dX9.NGHTTP2_NO_ERROR)}catch{}return}let X=0,G=()=>{clearTimeout(Q),$.off("data",W),$.off("end",G),$.off("error",G)},J=()=>{G();let Z=$.socket;if(Z&&!Z.destroyed)Z.destroySoon()},Q=setTimeout(J,YG9);Q.unref?.();let W=(Z)=>{if(X+=Z.length,X>XG9)J()};$.on("data",W),$.on("end",G),$.on("error",G),$.resume()},GG9=()=>new Response(null,{status:400}),qz4=($)=>new Response(null,{status:$ instanceof Error&&($.name==="TimeoutError"||$.constructor.name==="TimeoutError")?504:500}),Du0=($,Y)=>{let X=$ instanceof Error?$:Error("unknown error",{cause:$});if(X.code==="ERR_STREAM_PREMATURE_CLOSE")console.info("The user aborted a request.");else{if(console.error($),!Y.headersSent)Y.writeHead(500,{"Content-Type":"text/plain"});Y.end(`Error: ${X.message}`),Y.destroy(X)}},Iz4=($)=>{if("flushHeaders"in $&&$.writable)$.flushHeaders()},Pz4=async($,Y)=>{let[X,G,J]=$[HM],Q=!1;if(!J)J={"content-type":"text/plain; charset=UTF-8"};else if(J instanceof Headers)Q=J.has("content-length"),J=Fu0(J);else if(Array.isArray(J)){let W=new Headers(J);Q=W.has("content-length"),J=Fu0(W)}else for(let W in J)if(W.length===14&&W.toLowerCase()==="content-length"){Q=!0;break}if(!Q){if(typeof G==="string")J["Content-Length"]=Buffer.byteLength(G);else if(G instanceof Uint8Array)J["Content-Length"]=G.byteLength;else if(G instanceof Blob)J["Content-Length"]=G.size}if(Y.writeHead(X,J),typeof G==="string"||G instanceof Uint8Array)Y.end(G);else if(G instanceof Blob)Y.end(new Uint8Array(await G.arrayBuffer()));else Iz4(Y),await tX9(G,Y)?.catch((W)=>Du0(W,Y));Y[Lu0]?.()},JG9=($)=>typeof $.then==="function",QG9=async($,Y,X={})=>{if(JG9($))if(X.errorHandler)try{$=await $}catch(J){let Q=await X.errorHandler(J);if(!Q)return;$=Q}else $=await $.catch(qz4);if(HM in $)return Pz4($,Y);let G=Fu0($.headers);if($.body){let J=$.body.getReader(),Q=[],W=!1,Z=void 0;if(G["transfer-encoding"]!=="chunked"){let K=2;for(let H=0;H<K;H++){Z||=J.read();let z=await oX9(Z).catch((V)=>{console.error(V),W=!0});if(!z){if(H===1){await new Promise((V)=>setTimeout(V)),K=3;continue}break}if(Z=void 0,z.value)Q.push(z.value);if(z.done){W=!0;break}}if(W&&!("content-length"in G))G["content-length"]=Q.reduce((H,z)=>H+z.length,0)}if(Y.writeHead($.status,G),Q.forEach((K)=>{Y.write(K)}),W)Y.end();else{if(Q.length===0)Iz4(Y);await Rz4(J,Y,Z)}}else if(G[eX9]);else Y.writeHead($.status,G),Y.end();Y[Lu0]?.()},Bu0=($,Y={})=>{let X=Y.autoCleanupIncoming??!0;if(Y.overrideGlobalObjects!==!1&&global.Request!==bu)Object.defineProperty(global,"Request",{value:bu}),Object.defineProperty(global,"Response",{value:jT});return async(G,J)=>{let Q,W;try{W=sX9(G,Y.hostname);let Z=!X||G.method==="GET"||G.method==="HEAD";if(!Z){if(G[Ez4]=!0,G.on("end",()=>{Z=!0}),G instanceof Oz4)J[Lu0]=()=>{if(!Z)setTimeout(()=>{if(!Z)setTimeout(()=>{Vu0(G)})})};J.on("finish",()=>{if(!Z)Vu0(G)})}if(J.on("close",()=>{if(W[wT]){if(G.errored)W[wT].abort(G.errored.toString());else if(!J.writableFinished)W[wT].abort("Client connection prematurely closed.")}if(!Z)setTimeout(()=>{if(!Z)setTimeout(()=>{Vu0(G)})})}),Q=$(W,{incoming:G,outgoing:J}),HM in Q)return Pz4(Q,J)}catch(Z){if(!Q)if(Y.errorHandler){if(Q=await Y.errorHandler(W?Z:cX9(Z)),!Q)return}else if(!W)Q=GG9();else Q=qz4(Z);else return Du0(Z,J)}try{return await QG9(Q,J,Y)}catch(Z){return Du0(Z,J)}}};BY();class Ou0{constructor($={}){this._started=!1,this._hasHandledRequest=!1,this._streamMapping=new Map,this._requestToStreamMapping=new Map,this._requestResponseMap=new Map,this._initialized=!1,this._enableJsonResponse=!1,this._standaloneSseStreamId="_GET_stream",this.sessionIdGenerator=$.sessionIdGenerator,this._enableJsonResponse=$.enableJsonResponse??!1,this._eventStore=$.eventStore,this._onsessioninitialized=$.onsessioninitialized,this._onsessionclosed=$.onsessionclosed,this._allowedHosts=$.allowedHosts,this._allowedOrigins=$.allowedOrigins,this._enableDnsRebindingProtection=$.enableDnsRebindingProtection??!1,this._retryInterval=$.retryInterval}async start(){if(this._started)throw Error("Transport already started");this._started=!0}createJsonErrorResponse($,Y,X,G){let J={code:Y,message:X};if(G?.data!==void 0)J.data=G.data;return new Response(JSON.stringify({jsonrpc:"2.0",error:J,id:null}),{status:$,headers:{"Content-Type":"application/json",...G?.headers}})}validateRequestHeaders($){if(!this._enableDnsRebindingProtection)return;if(this._allowedHosts&&this._allowedHosts.length>0){let Y=$.headers.get("host");if(!Y||!this._allowedHosts.includes(Y)){let X=`Invalid Host header: ${Y}`;return this.onerror?.(Error(X)),this.createJsonErrorResponse(403,-32000,X)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let Y=$.headers.get("origin");if(Y&&!this._allowedOrigins.includes(Y)){let X=`Invalid Origin header: ${Y}`;return this.onerror?.(Error(X)),this.createJsonErrorResponse(403,-32000,X)}}return}async handleRequest($,Y){if(!this.sessionIdGenerator&&this._hasHandledRequest)throw Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let X=this.validateRequestHeaders($);if(X)return X;switch($.method){case"POST":return this.handlePostRequest($,Y);case"GET":return this.handleGetRequest($);case"DELETE":return this.handleDeleteRequest($);default:return this.handleUnsupportedRequest()}}async writePrimingEvent($,Y,X,G){if(!this._eventStore)return;if(G<"2025-11-25")return;let J=await this._eventStore.storeEvent(X,{}),Q=`id: ${J}
data: 

`;if(this._retryInterval!==void 0)Q=`id: ${J}
retry: ${this._retryInterval}
data: 

`;$.enqueue(Y.encode(Q))}async handleGetRequest($){if(!$.headers.get("accept")?.includes("text/event-stream"))return this.onerror?.(Error("Not Acceptable: Client must accept text/event-stream")),this.createJsonErrorResponse(406,-32000,"Not Acceptable: Client must accept text/event-stream");let X=this.validateSession($);if(X)return X;let G=this.validateProtocolVersion($);if(G)return G;if(this._eventStore){let K=$.headers.get("last-event-id");if(K)return this.replayEvents(K)}if(this._streamMapping.get(this._standaloneSseStreamId)!==void 0)return this.onerror?.(Error("Conflict: Only one SSE stream is allowed per session")),this.createJsonErrorResponse(409,-32000,"Conflict: Only one SSE stream is allowed per session");let J=new TextEncoder,Q,W=new ReadableStream({start:(K)=>{Q=K},cancel:()=>{this._streamMapping.delete(this._standaloneSseStreamId)}}),Z={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive"};if(this.sessionId!==void 0)Z["mcp-session-id"]=this.sessionId;return this._streamMapping.set(this._standaloneSseStreamId,{controller:Q,encoder:J,cleanup:()=>{this._streamMapping.delete(this._standaloneSseStreamId);try{Q.close()}catch{}}}),new Response(W,{headers:Z})}async replayEvents($){if(!this._eventStore)return this.onerror?.(Error("Event store not configured")),this.createJsonErrorResponse(400,-32000,"Event store not configured");try{let Y;if(this._eventStore.getStreamIdForEventId){if(Y=await this._eventStore.getStreamIdForEventId($),!Y)return this.onerror?.(Error("Invalid event ID format")),this.createJsonErrorResponse(400,-32000,"Invalid event ID format");if(this._streamMapping.get(Y)!==void 0)return this.onerror?.(Error("Conflict: Stream already has an active connection")),this.createJsonErrorResponse(409,-32000,"Conflict: Stream already has an active connection")}let X={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive"};if(this.sessionId!==void 0)X["mcp-session-id"]=this.sessionId;let G=new TextEncoder,J,Q=new ReadableStream({start:(Z)=>{J=Z},cancel:()=>{}}),W=await this._eventStore.replayEventsAfter($,{send:async(Z,K)=>{if(!this.writeSSEEvent(J,G,K,Z)){this.onerror?.(Error("Failed replay events"));try{J.close()}catch{}}}});return this._streamMapping.set(W,{controller:J,encoder:G,cleanup:()=>{this._streamMapping.delete(W);try{J.close()}catch{}}}),new Response(Q,{headers:X})}catch(Y){return this.onerror?.(Y),this.createJsonErrorResponse(500,-32000,"Error replaying events")}}writeSSEEvent($,Y,X,G){try{let J=`event: message
`;if(G)J+=`id: ${G}
`;return J+=`data: ${JSON.stringify(X)}

`,$.enqueue(Y.encode(J)),!0}catch(J){return this.onerror?.(J),!1}}handleUnsupportedRequest(){return this.onerror?.(Error("Method not allowed.")),new Response(JSON.stringify({jsonrpc:"2.0",error:{code:-32000,message:"Method not allowed."},id:null}),{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest($,Y){try{let X=$.headers.get("accept");if(!X?.includes("application/json")||!X.includes("text/event-stream"))return this.onerror?.(Error("Not Acceptable: Client must accept both application/json and text/event-stream")),this.createJsonErrorResponse(406,-32000,"Not Acceptable: Client must accept both application/json and text/event-stream");let G=$.headers.get("content-type");if(!G||!G.includes("application/json"))return this.onerror?.(Error("Unsupported Media Type: Content-Type must be application/json")),this.createJsonErrorResponse(415,-32000,"Unsupported Media Type: Content-Type must be application/json");let J={headers:Object.fromEntries($.headers.entries()),url:new URL($.url)},Q;if(Y?.parsedBody!==void 0)Q=Y.parsedBody;else try{Q=await $.json()}catch{return this.onerror?.(Error("Parse error: Invalid JSON")),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}let W;try{if(Array.isArray(Q))W=Q.map((L)=>C$.parse(L));else W=[C$.parse(Q)]}catch{return this.onerror?.(Error("Parse error: Invalid JSON-RPC message")),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}let Z=W.some(rj);if(Z){if(this._initialized&&this.sessionId!==void 0)return this.onerror?.(Error("Invalid Request: Server already initialized")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Server already initialized");if(W.length>1)return this.onerror?.(Error("Invalid Request: Only one initialization request is allowed")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Only one initialization request is allowed");if(this.sessionId=this.sessionIdGenerator?.(),this._initialized=!0,this.sessionId&&this._onsessioninitialized)await Promise.resolve(this._onsessioninitialized(this.sessionId))}if(!Z){let L=this.validateSession($);if(L)return L;let B=this.validateProtocolVersion($);if(B)return B}if(!W.some(DJ)){for(let L of W)this.onmessage?.(L,{authInfo:Y?.authInfo,requestInfo:J});return new Response(null,{status:202})}let H=crypto.randomUUID(),z=W.find((L)=>rj(L)),V=z?z.params.protocolVersion:$.headers.get("mcp-protocol-version")??Au;if(this._enableJsonResponse)return new Promise((L)=>{this._streamMapping.set(H,{resolveJson:L,cleanup:()=>{this._streamMapping.delete(H)}});for(let B of W)if(DJ(B))this._requestToStreamMapping.set(B.id,H);for(let B of W)this.onmessage?.(B,{authInfo:Y?.authInfo,requestInfo:J})});let A=new TextEncoder,F,N=new ReadableStream({start:(L)=>{F=L},cancel:()=>{this._streamMapping.delete(H)}}),D={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"};if(this.sessionId!==void 0)D["mcp-session-id"]=this.sessionId;for(let L of W)if(DJ(L))this._streamMapping.set(H,{controller:F,encoder:A,cleanup:()=>{this._streamMapping.delete(H);try{F.close()}catch{}}}),this._requestToStreamMapping.set(L.id,H);await this.writePrimingEvent(F,A,H,V);for(let L of W){let B,O;if(DJ(L)&&this._eventStore&&V>="2025-11-25")B=()=>{this.closeSSEStream(L.id)},O=()=>{this.closeStandaloneSSEStream()};this.onmessage?.(L,{authInfo:Y?.authInfo,requestInfo:J,closeSSEStream:B,closeStandaloneSSEStream:O})}return new Response(N,{status:200,headers:D})}catch(X){return this.onerror?.(X),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(X)})}}async handleDeleteRequest($){let Y=this.validateSession($);if(Y)return Y;let X=this.validateProtocolVersion($);if(X)return X;return await Promise.resolve(this._onsessionclosed?.(this.sessionId)),await this.close(),new Response(null,{status:200})}validateSession($){if(this.sessionIdGenerator===void 0)return;if(!this._initialized)return this.onerror?.(Error("Bad Request: Server not initialized")),this.createJsonErrorResponse(400,-32000,"Bad Request: Server not initialized");let Y=$.headers.get("mcp-session-id");if(!Y)return this.onerror?.(Error("Bad Request: Mcp-Session-Id header is required")),this.createJsonErrorResponse(400,-32000,"Bad Request: Mcp-Session-Id header is required");if(Y!==this.sessionId)return this.onerror?.(Error("Session not found")),this.createJsonErrorResponse(404,-32001,"Session not found");return}validateProtocolVersion($){let Y=$.headers.get("mcp-protocol-version");if(Y!==null&&!Y2.includes(Y))return this.onerror?.(Error(`Bad Request: Unsupported protocol version: ${Y} (supported versions: ${Y2.join(", ")})`)),this.createJsonErrorResponse(400,-32000,`Bad Request: Unsupported protocol version: ${Y} (supported versions: ${Y2.join(", ")})`);return}async close(){this._streamMapping.forEach(({cleanup:$})=>{$()}),this._streamMapping.clear(),this._requestResponseMap.clear(),this.onclose?.()}closeSSEStream($){let Y=this._requestToStreamMapping.get($);if(!Y)return;let X=this._streamMapping.get(Y);if(X)X.cleanup()}closeStandaloneSSEStream(){let $=this._streamMapping.get(this._standaloneSseStreamId);if($)$.cleanup()}async send($,Y){let X=Y?.relatedRequestId;if(CX($)||G2($))X=$.id;if(X===void 0){if(CX($)||G2($))throw Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");let Q;if(this._eventStore)Q=await this._eventStore.storeEvent(this._standaloneSseStreamId,$);let W=this._streamMapping.get(this._standaloneSseStreamId);if(W===void 0)return;if(W.controller&&W.encoder)this.writeSSEEvent(W.controller,W.encoder,$,Q);return}let G=this._requestToStreamMapping.get(X);if(!G)throw Error(`No connection established for request ID: ${String(X)}`);let J=this._streamMapping.get(G);if(!this._enableJsonResponse&&J?.controller&&J?.encoder){let Q;if(this._eventStore)Q=await this._eventStore.storeEvent(G,$);this.writeSSEEvent(J.controller,J.encoder,$,Q)}if(CX($)||G2($)){this._requestResponseMap.set(X,$);let Q=Array.from(this._requestToStreamMapping.entries()).filter(([Z,K])=>K===G).map(([Z])=>Z);if(Q.every((Z)=>this._requestResponseMap.has(Z))){if(!J)throw Error(`No connection established for request ID: ${String(X)}`);if(this._enableJsonResponse&&J.resolveJson){let Z={"Content-Type":"application/json"};if(this.sessionId!==void 0)Z["mcp-session-id"]=this.sessionId;let K=Q.map((H)=>this._requestResponseMap.get(H));if(K.length===1)J.resolveJson(new Response(JSON.stringify(K[0]),{status:200,headers:Z}));else J.resolveJson(new Response(JSON.stringify(K),{status:200,headers:Z}))}else J.cleanup();for(let Z of Q)this._requestResponseMap.delete(Z),this._requestToStreamMapping.delete(Z)}}}}class k$0{constructor($={}){this._requestContext=new WeakMap,this._webStandardTransport=new Ou0($),this._requestListener=Bu0(async(Y)=>{let X=this._requestContext.get(Y);return this._webStandardTransport.handleRequest(Y,{authInfo:X?.authInfo,parsedBody:X?.parsedBody})},{overrideGlobalObjects:!1})}get sessionId(){return this._webStandardTransport.sessionId}set onclose($){this._webStandardTransport.onclose=$}get onclose(){return this._webStandardTransport.onclose}set onerror($){this._webStandardTransport.onerror=$}get onerror(){return this._webStandardTransport.onerror}set onmessage($){this._webStandardTransport.onmessage=$}get onmessage(){return this._webStandardTransport.onmessage}async start(){return this._webStandardTransport.start()}async close(){return this._webStandardTransport.close()}async send($,Y){return this._webStandardTransport.send($,Y)}async handleRequest($,Y,X){let G=$.auth;await Bu0(async(Q)=>{return this._webStandardTransport.handleRequest(Q,{authInfo:G,parsedBody:X})},{overrideGlobalObjects:!1})($,Y)}closeSSEStream($){this._webStandardTransport.closeSSEStream($)}closeStandaloneSSEStream(){this._webStandardTransport.closeStandaloneSSEStream()}}var fu="mastra",Cz4="strict";function v$0($,Y){if(Y==null)return $;let X=$?.[fu]&&typeof $[fu]==="object"?$[fu]:void 0;return{...$??{},[fu]:{...X??{},[Cz4]:Y}}}function HG9($){let Y=$?.[fu];if(!Y||typeof Y!=="object")return;let X=Y[Cz4];return typeof X==="boolean"?X:void 0}var zG9=class{client;logger;constructor({client:$,logger:Y}){this.client=$,this.logger=Y}onRequest($){this.client.setElicitationRequestHandler($)}},VG9=class{client;logger;constructor({client:$,logger:Y}){this.client=$,this.logger=Y}onUpdate($){this.client.setProgressNotificationHandler($)}},AG9=class{client;logger;constructor({client:$,logger:Y}){this.client=$,this.logger=Y}async list(){try{let $=await this.client.listPrompts();if($&&$.prompts&&Array.isArray($.prompts))return $.prompts.map((Y)=>({...Y}));else return this.logger.warn("Prompts response did not have expected structure",{server:this.client.name,response:$}),[]}catch($){if($.code===_1.MethodNotFound)return[];throw this.logger.error("Error getting prompts from server",{server:this.client.name,error:$ instanceof Error?$.message:String($)}),Error(`Failed to fetch prompts from server ${this.client.name}: ${$ instanceof Error?$.stack||$.message:String($)}`)}}async get({name:$,args:Y}){return this.client.getPrompt({name:$,args:Y})}async onListChanged($){this.client.setPromptListChangedNotificationHandler($)}},FG9=class{client;logger;constructor({client:$,logger:Y}){this.client=$,this.logger=Y}async list(){try{let $=await this.client.listResources();if($&&$.resources&&Array.isArray($.resources))return $.resources;else return this.logger.warn("Resources response did not have expected structure",{server:this.client.name,response:$}),[]}catch($){if($.code===_1.MethodNotFound)return[];throw this.logger.error("Error getting resources from server",{server:this.client.name,error:$ instanceof Error?$.message:String($)}),Error(`Failed to fetch resources from server ${this.client.name}: ${$ instanceof Error?$.stack||$.message:String($)}`)}}async templates(){try{let $=await this.client.listResourceTemplates();if($&&$.resourceTemplates&&Array.isArray($.resourceTemplates))return $.resourceTemplates;else return this.logger.warn("Resource templates response did not have expected structure",{server:this.client.name,response:$}),[]}catch($){if($.code===_1.MethodNotFound)return[];throw this.logger.error("Error getting resource templates from server",{server:this.client.name,error:$ instanceof Error?$.message:String($)}),Error(`Failed to fetch resource templates from server ${this.client.name}: ${$ instanceof Error?$.stack||$.message:String($)}`)}}async read($){return this.client.readResource($)}async subscribe($){return this.client.subscribeResource($)}async unsubscribe($){return this.client.unsubscribeResource($)}async onUpdated($){this.client.setResourceUpdatedNotificationHandler($)}async onListChanged($){this.client.setResourceListChangedNotificationHandler($)}};function Sz4($){if(!($ instanceof Error))return!1;let Y=$.message.toLowerCase();return Y.includes("no valid session")||Y.includes("session")||Y.includes("server not initialized")||Y.includes("not connected")||Y.includes("http 400")||Y.includes("http 401")||Y.includes("http 403")||Y.includes("http 404")||Y.includes("econnrefused")||Y.includes("fetch failed")||Y.includes("connection refused")||Y.includes("connection closed")||Y.includes("sse stream disconnected")||Y.includes("typeerror: terminated")}var DG9=3000,Mu0=ZG9(import.meta.url),NG9=[400,404,405],kz4=Symbol.for("mastra.mcp.dd-trace-test-tracer");function LG9($){return($?.method??"GET").toUpperCase()==="GET"}function BG9(){let Y=globalThis[kz4]??OG9();if(typeof Y?.scope==="function")return Y.scope();if(typeof Y?.default?.scope==="function")return Y.default.scope();return null}function OG9(){if(!EG9())return null;try{return Mu0("dd-trace")}catch{return null}}function EG9(){if(globalThis[kz4])return!0;if(process.execArgv.some(($)=>$.includes("dd-trace")))return!0;if(process.env.NODE_OPTIONS?.includes("dd-trace"))return!0;try{let $=Mu0.resolve("dd-trace");return Boolean(Mu0.cache[$])}catch{return!1}}function MG9($){let Y=BG9();if(!Y)return $();return Y.activate(null,$)}function RG9($){switch($){case"debug":return"debug";case"info":case"notice":return"info";case"warning":return"warn";case"error":case"critical":case"alert":case"emergency":return"error";default:return"info"}}var qG9=class extends u8{name;client;timeout;logHandler;enableServerLogs;enableProgressTracking;serverConfig;transport;operationContextStore=new WG9;exitHookUnsubscribe;sigTermHandler;sigHupHandler;_roots;requireToolApproval;resources;prompts;elicitation;progress;constructor({name:$,version:Y="1.0.0",server:X,capabilities:G={},timeout:J=A$0}){super({name:"MastraMCPClient"});this.name=$,this.timeout=J,this.logHandler=X.logger,this.enableServerLogs=X.enableServerLogs??!0,this.serverConfig=X,this.enableProgressTracking=!!X.enableProgressTracking,this.requireToolApproval=X.requireToolApproval,this._roots=X.roots??[];let Q=this._roots.length>0||!!G.roots,W={...G,elicitation:{...G.elicitation??{}},...Q?{roots:{listChanged:!0,...G.roots??{}}}:{},extensions:{...G.extensions??{},"io.modelcontextprotocol/ui":{}}};if(this.client=new qm0({name:$,version:Y},{capabilities:W,...X.jsonSchemaValidator?{jsonSchemaValidator:X.jsonSchemaValidator}:{}}),this.setupLogging(),Q)this.setupRootsHandler();this.resources=new FG9({client:this,logger:this.logger}),this.prompts=new AG9({client:this,logger:this.logger}),this.elicitation=new zG9({client:this,logger:this.logger}),this.progress=new VG9({client:this,logger:this.logger})}log($,Y,X){let G=RG9($),J=`[${this.name}] ${Y}`;if(this.logger[G](J,X),this.logHandler)this.logHandler({level:$,message:J,timestamp:new Date,serverName:this.name,details:X,requestContext:this.operationContextStore.getStore()??null})}setupLogging(){if(this.enableServerLogs)this.client.setNotificationHandler(Y$0,($)=>{let{level:Y,...X}=$.params;this.log(Y,"[MCP SERVER LOG]",X)})}setupRootsHandler(){this.log("debug","Setting up roots/list request handler"),this.client.setRequestHandler(J$0,async()=>{return this.log("debug",`Responding to roots/list request with ${this._roots.length} roots`),{roots:this._roots}})}get roots(){return[...this._roots]}async setRoots($){this.log("debug",`Updating roots to ${$.length} entries`),this._roots=[...$],await this.sendRootsListChanged()}async sendRootsListChanged(){if(!this.transport){this.log("debug","Cannot send roots/list_changed: not connected");return}this.log("debug","Sending notifications/roots/list_changed"),await this.client.notification({method:"notifications/roots/list_changed"})}async connectStdio($){this.log("debug",`Using Stdio transport for command: ${$}`);try{this.transport=new q$0({command:$,args:this.serverConfig.args,env:{...em0(),...this.serverConfig.env||{}},stderr:this.serverConfig.stderr,cwd:this.serverConfig.cwd}),await this.client.connect(this.transport,{timeout:this.serverConfig.timeout??this.timeout}),this.log("debug","Successfully connected to MCP server via Stdio")}catch(Y){throw this.log("error",Y instanceof Error?Y.stack||Y.message:JSON.stringify(Y)),Y}}async connectHttp($){let{requestInit:Y,eventSourceInit:X,authProvider:G,connectTimeout:J,fetch:Q}=this.serverConfig,W=(K,H)=>{let z=this.operationContextStore.getStore()??null,V=()=>Q?Q(K,H,z):globalThis.fetch(K,H);return LG9(H)?MG9(V):V()};this.log("debug",`Attempting to connect to URL: ${$}`);let Z=$.pathname.endsWith("/sse");if(!Z)try{this.log("debug","Trying Streamable HTTP transport...");let K=new I$0($,{requestInit:Y,reconnectionOptions:this.serverConfig.reconnectionOptions,authProvider:G,fetch:W});await this.client.connect(K,{timeout:J??DG9}),this.transport=K,this.log("debug","Successfully connected using Streamable HTTP transport.")}catch(K){this.log("debug",`Streamable HTTP transport failed: ${K}`);let H=K?.code;if(H!==void 0&&!NG9.includes(H))throw K;Z=!0}if(Z){this.log("debug","Falling back to deprecated HTTP+SSE transport...");try{let K={...X,fetch:W},H=new pm0($,{requestInit:Y,eventSourceInit:K,authProvider:G,fetch:W});await this.client.connect(H,{timeout:this.serverConfig.timeout??this.timeout}),this.transport=H,this.log("debug","Successfully connected using deprecated HTTP+SSE transport.")}catch(K){throw this.log("error",`Failed to connect with SSE transport after failing to connect to Streamable HTTP transport first. SSE error: ${K}`),Error("Could not connect to server with any available HTTP transport")}}}isConnected=null;async connect(){if(this.isConnected)return this.isConnected;if(this.isConnected=new Promise(async($,Y)=>{try{let{command:X,url:G}=this.serverConfig;if(X)await this.connectStdio(X);else if(G)await this.connectHttp(G);else throw Error("Server configuration must include either a command or a url.");$(!0);let J=this.client.onclose;this.client.onclose=()=>{if(this.log("debug","MCP server connection closed"),this.isConnected=null,typeof J==="function")J()}}catch(X){this.isConnected=null,Y(X)}}),!this.exitHookUnsubscribe)this.exitHookUnsubscribe=_H4(async()=>{this.log("debug","Disconnecting MCP server during exit"),await this.disconnect()},{wait:5000});if(!this.sigTermHandler)this.sigTermHandler=()=>Yu0(),process.on("SIGTERM",this.sigTermHandler);if(!this.sigHupHandler)this.sigHupHandler=()=>Yu0(),process.on("SIGHUP",this.sigHupHandler);return this.log("debug","Successfully connected to MCP server"),this.isConnected}get sessionId(){if(this.transport instanceof I$0)return this.transport.sessionId;return}get stderr(){if(this.transport instanceof q$0)return this.transport.stderr;return null}async disconnect(){if(!this.transport){this.log("debug","Disconnect called but no transport was connected.");return}this.log("debug","Disconnecting from MCP server");try{await this.transport.close(),this.log("debug","Successfully disconnected from MCP server")}catch($){throw this.log("error","Error during MCP server disconnect",{error:$ instanceof Error?$.stack:JSON.stringify($,null,2)}),$}finally{if(this.transport=void 0,this.isConnected=null,this.exitHookUnsubscribe)this.exitHookUnsubscribe(),this.exitHookUnsubscribe=void 0;if(this.sigTermHandler)process.off("SIGTERM",this.sigTermHandler),this.sigTermHandler=void 0;if(this.sigHupHandler)process.off("SIGHUP",this.sigHupHandler),this.sigHupHandler=void 0}}async forceReconnect(){this.log("debug","Forcing reconnection to MCP server...");try{if(this.transport)await this.transport.close()}catch($){this.log("debug","Error during force disconnect (ignored)",{error:$ instanceof Error?$.message:String($)})}this.transport=void 0,this.isConnected=null,await this.connect(),this.log("debug","Successfully reconnected to MCP server")}async listResources(){return this.log("debug","Requesting resources from MCP server"),await this.client.request({method:"resources/list"},yD,{timeout:this.timeout})}async readResource($){return this.log("debug",`Reading resource from MCP server: ${$}`),await this.client.request({method:"resources/read",params:{uri:$}},bD,{timeout:this.timeout})}async subscribeResource($){return this.log("debug",`Subscribing to resource on MCP server: ${$}`),await this.client.request({method:"resources/subscribe",params:{uri:$}},NJ,{timeout:this.timeout})}async unsubscribeResource($){return this.log("debug",`Unsubscribing from resource on MCP server: ${$}`),await this.client.request({method:"resources/unsubscribe",params:{uri:$}},NJ,{timeout:this.timeout})}async listResourceTemplates(){return this.log("debug","Requesting resource templates from MCP server"),await this.client.request({method:"resources/templates/list"},$T,{timeout:this.timeout})}async listPrompts(){return this.log("debug","Requesting prompts from MCP server"),await this.client.request({method:"prompts/list"},XT,{timeout:this.timeout})}async getPrompt({name:$,args:Y}){return this.log("debug",`Requesting prompt from MCP server: ${$}`),await this.client.request({method:"prompts/get",params:{name:$,arguments:Y}},GT,{timeout:this.timeout})}setPromptListChangedNotificationHandler($){this.log("debug","Setting prompt list changed notification handler"),this.client.setNotificationHandler(JT,()=>{$()})}setResourceUpdatedNotificationHandler($){this.log("debug","Setting resource updated notification handler"),this.client.setNotificationHandler(i70,(Y)=>{$(Y.params)})}setResourceListChangedNotificationHandler($){this.log("debug","Setting resource list changed notification handler"),this.client.setNotificationHandler(YT,()=>{$()})}setElicitationRequestHandler($){this.log("debug","Setting elicitation request handler"),this.client.setRequestHandler(ZT,async(Y)=>{return this.log("debug",`Received elicitation request: ${Y.params.message}`),$(Y.params)})}setProgressNotificationHandler($){this.log("debug","Setting progress notification handler"),this.client.setNotificationHandler(aE,(Y)=>{$(Y.params)})}async convertInputSchema($){return"jsonSchema"in $?$.jsonSchema:$}async tools(){this.log("debug","Requesting tools from MCP server");let{tools:$}=await this.client.listTools({},{timeout:this.timeout}),Y={};for(let X of $){this.log("debug",`Processing tool: ${X.name}`);try{let G,J;if(typeof this.requireToolApproval==="function"){let K=this.requireToolApproval,H=X.name;G=!0,J=(z,V={})=>{return K({toolName:H,args:z,...V})}}else if(this.requireToolApproval===!0)G=!0;let Q=X._meta,W=Q?this.stampServerIdInMeta(Q):void 0,Z=X8({id:`${this.name}_${X.name}`,description:X.description||"",inputSchema:await this.convertInputSchema(X.inputSchema),strict:HG9(W),...W?{mcp:{_meta:W}}:{},requireApproval:G,mcpMetadata:{serverName:this.name,serverVersion:this.client.getServerVersion()?.version},execute:async(K,H)=>{let z=H?.requestContext??null;return this.operationContextStore.run(z,async()=>{let V=async()=>{this.log("debug",`Executing tool: ${X.name}`,{toolArgs:K,runId:H?.runId});let A=H?._meta,F=this.enableProgressTracking?{progressToken:H?.runId||crypto.randomUUID()}:void 0,N=A||F?{...A,...F}:void 0,D=await this.client.callTool({name:X.name,arguments:K,...N?{_meta:N}:{}},LJ,{timeout:this.timeout,signal:H?.abortSignal});if(this.log("debug",`Tool executed successfully: ${X.name}`),D.structuredContent!==void 0)return D.structuredContent;return D};try{return await V()}catch(A){if(Sz4(A)){this.log("debug",`Session error detected for tool ${X.name}, attempting reconnection...`,{error:A instanceof Error?A.message:String(A)});try{return await this.forceReconnect(),this.log("debug",`Retrying tool ${X.name} after reconnection...`),await V()}catch(F){throw this.log("error",`Reconnection or retry failed for tool ${X.name}`,{originalError:A instanceof Error?A.message:String(A),reconnectError:F instanceof Error?F.stack:String(F),toolArgs:K}),A}}throw this.log("error",`Error calling tool: ${X.name}`,{error:A instanceof Error?A.stack:JSON.stringify(A,null,2),toolArgs:K}),A}})}});if(J)Z.needsApprovalFn=J;if(X.name)Y[X.name]=Z}catch(G){this.log("error",`Failed to create Mastra tool wrapper for MCP tool: ${X.name}`,{error:G instanceof Error?G.stack:String(G),mcpToolDefinition:X})}}return Y}stampServerIdInMeta($){let Y=$.ui;if(!Y?.resourceUri)return $;return{...$,ui:{...Y,serverId:this.name}}}},IG9=class extends Xu0{clientGetter;cachedClient=null;_cachedToolList=null;constructor($,Y){let X={name:$.name,version:$.version??"1.0.0",id:$.id,description:$.description,tools:{}};super(X);this.clientGetter=Y}async getClient(){if(!this.cachedClient)this.cachedClient=await this.clientGetter();return this.cachedClient}convertSchema($){if(V5($))return $6($);return $?.jsonSchema||$}async fetchToolList(){if(this._cachedToolList)return this._cachedToolList;let Y=await(await this.getClient()).tools();return this._cachedToolList={tools:Object.entries(Y).map(([X,G])=>({id:X,name:G.id||X,description:G.description,inputSchema:this.convertSchema(G.inputSchema),outputSchema:this.convertSchema(G.outputSchema),toolType:G.mcp?.toolType,_meta:G.mcp?._meta}))},this.convertedTools=Y,this._cachedToolList}convertTools($,Y,X){return{}}getToolListInfo(){if(this._cachedToolList)return this._cachedToolList;return this.fetchToolList()}getToolInfo($){if(this._cachedToolList)return this._cachedToolList.tools.find((Y)=>Y.id===$||Y.name===$);return this.fetchToolList().then((Y)=>Y.tools.find((X)=>X.id===$||X.name===$))}async executeTool($,Y,X){let Q=(await(await this.getClient()).tools())[$];if(!Q)throw Error(`Tool '${$}' not found on remote MCP server '${this.name}'`);if(!Q.execute)throw Error(`Tool '${$}' on remote MCP server '${this.name}' has no execute method`);return Q.execute(Y,X)}async listResources(){return{resources:(await(await this.getClient()).resources.list()).map((X)=>({uri:X.uri,name:X.name??X.uri,description:X.description,mimeType:X.mimeType,_meta:X._meta}))}}async readResource($){return{contents:((await(await this.getClient()).resources.read($)).contents??[]).map((G)=>({uri:G.uri??$,...G.text!==void 0?{text:G.text}:{},...G.blob!==void 0?{blob:G.blob}:{}}))}}async startStdio(){throw Error("MCPClientServerProxy does not support stdio transport")}async startSSE($){throw Error("MCPClientServerProxy does not support SSE transport")}async startHonoSSE($){throw Error("MCPClientServerProxy does not support Hono SSE transport")}async startHTTP($){throw Error("MCPClientServerProxy does not support HTTP transport")}async close(){this.cachedClient=null}getServerInfo(){return{id:this.id,name:this.name,description:this.description,version_detail:{version:this.version,release_date:this.releaseDate,is_latest:this.isLatest}}}getServerDetail(){return{...this.getServerInfo(),packages:this.packages??[],remotes:this.remotes??[]}}},dD=new Map,Eu0=2,vz4=class extends u8{serverConfigs={};id;defaultTimeout;mcpClientsById=new Map;disconnectPromise=null;constructor($){super({name:"MCPClient"});if(this.defaultTimeout=$.timeout??A$0,this.serverConfigs=$.servers,this.id=$.id??this.makeId(),$.id){this.id=$.id;let X=dD.get(this.id);if(X&&!Tz4.default(X.serverConfigs,$.servers)){let G=dD.get(this.id);if(G)G.disconnect(),dD.delete(this.id)}}else this.id=this.makeId();let Y=dD.get(this.id);if(Y){if(!$.id)throw Error(`MCPClient was initialized multiple times with the same configuration options.

This error is intended to prevent memory leaks.

To fix this you have three different options:
1. If you need multiple MCPClient class instances with identical server configurations, set an id when configuring: new MCPClient({ id: "my-unique-id" })
2. Call "await client.disconnect()" after you're done using the client and before you recreate another instance with the same options. If the identical MCPClient instance is already closed at the time of re-creating it, you will not see this error.
3. If you only need one instance of MCPClient in your app, refactor your code so it's only created one time (ex. move it out of a loop into a higher scope code block)
`);return Y}return dD.set(this.id,this),this.addToInstanceCache(),this}get progress(){return this.addToInstanceCache(),{onUpdate:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).progress.onUpdate(Y)}catch(X){throw new G0({id:"MCP_CLIENT_ON_UPDATE_PROGRESS_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$}},X)}}}}get elicitation(){return this.addToInstanceCache(),{onRequest:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).elicitation.onRequest(Y)}catch(X){throw new G0({id:"MCP_CLIENT_ON_REQUEST_ELICITATION_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$}},X)}}}}get resources(){return this.addToInstanceCache(),{list:async()=>{let $={};for(let Y of Object.keys(this.serverConfigs))try{let X=await this.getConnectedClientForServer(Y);$[Y]=await X.resources.list()}catch(X){let G=new G0({id:"MCP_CLIENT_LIST_RESOURCES_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:Y}},X);this.logger.trackException(G),this.logger.error("Failed to list resources from server:",{error:G.toString()})}return $},templates:async()=>{let $={};for(let Y of Object.keys(this.serverConfigs))try{let X=await this.getConnectedClientForServer(Y);$[Y]=await X.resources.templates()}catch(X){let G=new G0({id:"MCP_CLIENT_LIST_RESOURCE_TEMPLATES_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:Y}},X);this.logger.trackException(G),this.logger.error("Failed to list resource templates from server:",{error:G.toString()})}return $},read:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).resources.read(Y)}catch(X){throw new G0({id:"MCP_CLIENT_READ_RESOURCE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$,uri:Y}},X)}},subscribe:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).resources.subscribe(Y)}catch(X){throw new G0({id:"MCP_CLIENT_SUBSCRIBE_RESOURCE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$,uri:Y}},X)}},unsubscribe:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).resources.unsubscribe(Y)}catch(X){throw new G0({id:"MCP_CLIENT_UNSUBSCRIBE_RESOURCE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$,uri:Y}},X)}},onUpdated:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).resources.onUpdated(Y)}catch(X){throw new G0({id:"MCP_CLIENT_ON_UPDATED_RESOURCE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$}},X)}},onListChanged:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).resources.onListChanged(Y)}catch(X){throw new G0({id:"MCP_CLIENT_ON_LIST_CHANGED_RESOURCE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$}},X)}}}}get prompts(){return this.addToInstanceCache(),{list:async()=>{let $={};for(let Y of Object.keys(this.serverConfigs))try{let X=await this.getConnectedClientForServer(Y);$[Y]=await X.prompts.list()}catch(X){let G=new G0({id:"MCP_CLIENT_LIST_PROMPTS_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:Y}},X);this.logger.trackException(G),this.logger.error("Failed to list prompts from server:",{error:G.toString()})}return $},get:async({serverName:$,name:Y,args:X})=>{try{return(await this.getConnectedClientForServer($)).prompts.get({name:Y,args:X})}catch(G){throw new G0({id:"MCP_CLIENT_GET_PROMPT_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$,name:Y}},G)}},onListChanged:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).prompts.onListChanged(Y)}catch(X){throw new G0({id:"MCP_CLIENT_ON_LIST_CHANGED_PROMPT_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$}},X)}}}}addToInstanceCache(){if(!dD.has(this.id))dD.set(this.id,this)}makeId(){let $=JSON.stringify(this.serverConfigs).normalize("NFKC");return KG9("sha256").update("MCPClient").update($).digest("hex")}async disconnect(){if(this.disconnectPromise)return this.disconnectPromise;return this.disconnectPromise=(async()=>{try{dD.delete(this.id),await Promise.allSettled(Array.from(this.mcpClientsById.values()).map(($)=>$.disconnect())),this.mcpClientsById.clear()}finally{this.disconnectPromise=null}})(),this.disconnectPromise}async reconnectServer($){let Y=this.mcpClientsById.get($);if(Y)await Y.forceReconnect();else await this.getConnectedClientForServer($)}async listTools(){this.addToInstanceCache();let $={};for(let Y of Object.keys(this.serverConfigs))try{let X=await this.getToolsForServer(Y);for(let[G,J]of Object.entries(X))$[`${Y}_${G}`]=J}catch(X){let G=new G0({id:"MCP_CLIENT_GET_TOOLS_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:Y}},X);this.logger.trackException(G),this.logger.error("Failed to list tools from server:",{error:G.toString()})}return $}async listToolsets(){return(await this.listToolsetsWithErrors()).toolsets}async listToolsetsWithErrors(){this.addToInstanceCache();let $={},Y={};for(let X of Object.keys(this.serverConfigs))try{let G=await this.getToolsForServer(X);if(G)$[X]=G}catch(G){let J=new G0({id:"MCP_CLIENT_GET_TOOLSETS_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:X}},G);this.logger.trackException(J),this.logger.error("Failed to list toolsets from server:",{error:J.toString()}),Y[X]=G instanceof Error?G.message:String(G)}return{toolsets:$,errors:Y}}toMCPServerProxies(){let $={};for(let Y of Object.keys(this.serverConfigs))$[Y]=new IG9({name:Y,id:Y},()=>this.getConnectedClientForServer(Y));return $}get sessionIds(){let $={};for(let[Y,X]of this.mcpClientsById.entries())if(X.sessionId)$[Y]=X.sessionId;return $}getServerStderr($){let Y=this.mcpClientsById.get($);if(!Y)return null;return Y.stderr}async getConnectedClient($,Y){if(this.disconnectPromise)await this.disconnectPromise;let X=this.mcpClientsById.has($),G=this.mcpClientsById.get($);if(this.logger.debug("Checking connected client",{name:$,exists:X}),X){if(!G)throw Error(`Client ${$} exists but is undefined`);return await G.connect(),G}this.logger.debug("Connecting to MCP server",{name:$});let J=new qG9({name:$,server:Y,timeout:Y.timeout??this.defaultTimeout,capabilities:Y.capabilities});J.__setLogger(this.logger),this.mcpClientsById.set($,J);try{await J.connect()}catch(Q){let W=new G0({id:"MCP_CLIENT_CONNECT_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,text:`Failed to connect to MCP server ${$}: ${Q instanceof Error?Q.stack||Q.message:String(Q)}`,details:{name:$}},Q);throw this.logger.trackException(W),this.logger.error("MCPClient errored connecting to MCP server:",{error:W.toString()}),this.mcpClientsById.delete($),W}return this.logger.debug("Connected to MCP server",{name:$}),J}async getConnectedClientForServer($){let Y=this.serverConfigs[$];if(!Y)throw Error(`Server configuration not found for name: ${$}`);return this.getConnectedClient($,Y)}async getToolsForServer($){for(let Y=1;Y<=Eu0;Y++)try{return await(await this.getConnectedClientForServer($)).tools()}catch(X){if(Y===Eu0||!Sz4(X))throw X;this.logger.debug("Retrying MCP tool discovery after reconnect",{serverName:$,attempt:Y,maxAttempts:Eu0,error:X instanceof Error?X.message:String(X)}),await this.reconnectServer($)}return{}}};var PG9=class{writer;encoder;writable;abortSubscribers=[];responseReadable;aborted=!1;closed=!1;constructor($,Y){this.writable=$,this.writer=$.getWriter(),this.encoder=new TextEncoder;let X=Y.getReader();this.abortSubscribers.push(async()=>{await X.cancel()}),this.responseReadable=new ReadableStream({async pull(G){let{done:J,value:Q}=await X.read();J?G.close():G.enqueue(Q)},cancel:()=>{this.abort()}})}async write($){try{if(typeof $==="string")$=this.encoder.encode($);await this.writer.write($)}catch{}return this}async writeln($){return await this.write($+`
`),this}sleep($){return new Promise((Y)=>setTimeout(Y,$))}async close(){try{await this.writer.close()}catch{}this.closed=!0}async pipe($){this.writer.releaseLock(),await $.pipeTo(this.writable,{preventClose:!0}),this.writer=this.writable.getWriter()}onAbort($){this.abortSubscribers.push($)}abort(){if(!this.aborted)this.aborted=!0,this.abortSubscribers.forEach(($)=>$())}},xz4=()=>{let $=typeof Bun<"u"?Bun.version:void 0;if($===void 0)return!1;let Y=$.startsWith("1.1")||$.startsWith("1.0")||$.startsWith("0.");return xz4=()=>Y,Y},wG9={Stringify:1},yz4=async($,Y,X,G,J)=>{if(typeof $==="object"&&!($ instanceof String)){if(!($ instanceof Promise))$=$.toString();if($ instanceof Promise)$=await $}let Q=$.callbacks;if(!Q?.length)return Promise.resolve($);if(J)J[0]+=$;else J=[$];return Promise.all(Q.map((Z)=>Z({phase:Y,buffer:J,context:G}))).then((Z)=>Promise.all(Z.filter(Boolean).map((K)=>yz4(K,Y,!1,G,J))).then(()=>J[0]))},_G9=class extends PG9{constructor($,Y){super($,Y)}async writeSSE($){let X=(await yz4($.data,wG9.Stringify,!1,{})).split(/\r\n|\r|\n/).map((J)=>{return`data: ${J}`}).join(`
`);for(let J of["event","id","retry"])if($[J]&&/[\r\n]/.test($[J]))throw Error(`${J} must not contain "\\r" or "\\n"`);let G=[$.event&&`event: ${$.event}`,X,$.id&&`id: ${$.id}`,$.retry&&`retry: ${$.retry}`].filter(Boolean).join(`
`)+`

`;await this.write(G)}},jG9=async($,Y,X)=>{try{await Y($)}catch(G){console.error(G)}finally{$.close()}},TG9=new WeakMap,CG9=($,Y,X)=>{let{readable:G,writable:J}=new TransformStream,Q=new _G9(J,G);if(xz4())$.req.raw.signal.addEventListener("abort",()=>{if(!Q.closed)Q.abort()});return TG9.set(Q.responseReadable,$),$.header("Transfer-Encoding","chunked"),$.header("Content-Type","text/event-stream"),$.header("Cache-Control","no-cache"),$.header("Connection","keep-alive"),jG9(Q,Y),$.newResponse(Q.responseReadable)},SG9=4194304,kG9=class{messageUrl;stream;_sessionId;onclose;onerror;onmessage;constructor($,Y){this.messageUrl=$,this.stream=Y,this._sessionId=crypto.randomUUID(),this.stream.onAbort(()=>{this.close()})}get sessionId(){return this._sessionId}async start(){if(this.stream==null)throw Error("Stream not initialized");if(this.stream.closed)throw Error("SSE transport already closed!");await this.stream.writeSSE({event:"ping",data:""}),await this.stream.writeSSE({event:"endpoint",data:`${this.messageUrl}?sessionId=${this.sessionId}`})}async handlePostMessage($){if(this.stream?.closed==null)return $.text("SSE connection not established",500);try{let Y=$.req.header("content-type")||"";if(!Y.includes("application/json"))throw Error(`Unsupported content-type: ${Y}`);let X=Number.parseInt($.req.header("content-length")||"0",10);if(X>SG9)throw Error(`Request body too large: ${X} bytes`);let G=await $.req.json();return await this.handleMessage(G),$.text("Accepted",202)}catch(Y){return this.onerror?.(Y),$.text("Error",400)}}async handleMessage($){let Y;try{Y=C$.parse($)}catch(X){throw this.onerror?.(X),X}this.onmessage?.(Y)}async close(){if(this.stream?.closed)this.stream.abort()}async send($){if(this.stream?.closed)throw Error("Not connected");await this.stream.writeSSE({event:"message",data:JSON.stringify($)})}},vG9=class{getLogger;getSdkServer;clearDefinedPrompts;constructor($){this.getLogger=$.getLogger,this.getSdkServer=$.getSdkServer,this.clearDefinedPrompts=$.clearDefinedPrompts}async notifyListChanged(){this.getLogger().info("Prompt list change externally notified. Clearing definedPrompts and sending notification."),this.clearDefinedPrompts();try{await this.getSdkServer().sendPromptListChanged()}catch($){let Y=new G0({id:"MCP_SERVER_PROMPT_LIST_CHANGED_NOTIFICATION_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,text:"Failed to send prompt list changed notification"},$);throw this.getLogger().error("Failed to send prompt list changed notification:",{error:Y.toString()}),this.getLogger().trackException(Y),Y}}},xG9=class{getSubscriptions;getLogger;getSdkServer;clearDefinedResources;clearDefinedResourceTemplates;constructor($){this.getSubscriptions=$.getSubscriptions,this.getLogger=$.getLogger,this.getSdkServer=$.getSdkServer,this.clearDefinedResources=$.clearDefinedResources,this.clearDefinedResourceTemplates=$.clearDefinedResourceTemplates}async notifyUpdated({uri:$}){if(this.getSubscriptions().has($)){this.getLogger().info(`Sending notifications/resources/updated for externally notified resource: ${$}`);try{await this.getSdkServer().sendResourceUpdated({uri:$})}catch(Y){let X=new G0({id:"MCP_SERVER_RESOURCE_UPDATED_NOTIFICATION_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,text:"Failed to send resource updated notification",details:{uri:$}},Y);throw this.getLogger().trackException(X),this.getLogger().error("Failed to send resource updated notification:",{error:X.toString()}),X}}else this.getLogger().debug(`Resource ${$} was updated, but no active subscriptions for it.`)}async notifyListChanged(){this.getLogger().info("Resource list change externally notified. Clearing definedResources and sending notification."),this.clearDefinedResources(),this.clearDefinedResourceTemplates();try{await this.getSdkServer().sendResourceListChanged()}catch($){let Y=new G0({id:"MCP_SERVER_RESOURCE_LIST_CHANGED_NOTIFICATION_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,text:"Failed to send resource list changed notification"},$);throw this.getLogger().trackException(Y),this.getLogger().error("Failed to send resource list changed notification:",{error:Y.toString()}),Y}}},bz4=class extends Xu0{server;stdioTransport;sseTransport;sseHonoTransports;streamableHTTPTransports=new Map;httpServerInstances=new Map;definedResources;definedResourceTemplates;resourceOptions;definedPrompts;promptOptions;jsonSchemaValidator;subscriptions=new Set;currentLoggingLevel;resources;prompts;elicitation;getStdioTransport(){return this.stdioTransport}getSseTransport(){return this.sseTransport}getSseHonoTransport($){return this.sseHonoTransports.get($)}getServer(){return this.server}constructor($){super($);this.resourceOptions=this.mergeAppResources($.resources,$.appResources),this.promptOptions=$.prompts,this.jsonSchemaValidator=$.jsonSchemaValidator;let Y={tools:{},logging:{enabled:!0}};if(this.resourceOptions)Y.resources={subscribe:!0,listChanged:!0};if($.prompts)Y.prompts={listChanged:!0};if(Object.values(this.convertedTools).some((G)=>G.mcp?._meta?.ui?.resourceUri)||$.appResources)Y.extensions={...Y.extensions,"io.modelcontextprotocol/ui":{}};this.server=new zT({name:this.name,version:this.version},{capabilities:Y,...this.instructions?{instructions:this.instructions}:{},...this.jsonSchemaValidator?{jsonSchemaValidator:this.jsonSchemaValidator}:{}}),this.logger.info("Initialized MCPServer",{name:this.name,version:this.version,id:this.id,tools:Object.keys(this.convertedTools),capabilities:Y}),this.sseHonoTransports=new Map,this.registerHandlersOnServer(this.server),this.resources=new xG9({getSubscriptions:()=>this.subscriptions,getLogger:()=>this.logger,getSdkServer:()=>this.server,clearDefinedResources:()=>{this.definedResources=void 0},clearDefinedResourceTemplates:()=>{this.definedResourceTemplates=void 0}}),this.prompts=new vG9({getLogger:()=>this.logger,getSdkServer:()=>this.server,clearDefinedPrompts:()=>{this.definedPrompts=void 0}}),this.elicitation={sendRequest:async(G,J)=>{return this.handleElicitationRequest(G,void 0,J)}}}async handleElicitationRequest($,Y,X){this.logger.debug("Sending elicitation request",{message:$.message});let J=await(Y||this.server).elicitInput($,X);return this.logger.debug("Received elicitation response",{response:J}),J}async readJsonBody($,Y){let X=$;if(X.body!==void 0)return X.body;if(Y?.preParsedOnly)return;return new Promise((G,J)=>{let Q="";$.on("data",(W)=>Q+=W),$.on("end",()=>{try{G(JSON.parse(Q))}catch(W){J(W)}}),$.on("error",J)})}mergeAppResources($,Y){if(!Y||Object.keys(Y).length===0)return $;let X=new Map;for(let[Q,W]of Object.entries(Y)){let Z;if(W.html)Z=W.html;else if(W.htmlPath)Z=UG9(W.htmlPath,"utf-8");else{this.logger.warn(`App resource '${Q}' has neither html nor htmlPath \u2014 skipping`);continue}let K={uri:Q,name:W.name,...W.description?{description:W.description}:{},mimeType:xH4,...W.meta?{_meta:{ui:W.meta}}:{}};X.set(Q,{resource:K,html:Z})}if(X.size===0)return $;let G=async()=>{return Array.from(X.values()).map((Q)=>Q.resource)},J=async({uri:Q})=>{let W=X.get(Q);if(W)return{text:W.html};throw Error(`App resource not found: ${Q}`)};if(!$)return{listResources:G,getResourceContent:J};return{listResources:async({extra:Q})=>{let W=await $.listResources({extra:Q}),Z=await G(),K=new Set(W.map((z)=>z.uri)),H=Z.filter((z)=>!K.has(z.uri));return[...W,...H]},getResourceContent:async({uri:Q,extra:W})=>{let Z=X.get(Q);if(Z){try{if((await $.listResources({extra:W})).some((H)=>H.uri===Q))return $.getResourceContent({uri:Q,extra:W})}catch{}return{text:Z.html}}return $.getResourceContent({uri:Q,extra:W})},...$.resourceTemplates?{resourceTemplates:$.resourceTemplates}:{}}}createServerInstance(){let $={tools:{},logging:{enabled:!0}};if(this.resourceOptions)$.resources={subscribe:!0,listChanged:!0};if(this.promptOptions)$.prompts={listChanged:!0};let Y=Object.values(this.convertedTools).some((G)=>G.mcp?._meta?.ui?.resourceUri);if(Y||this.resourceOptions){let G=this.definedResources?.some((J)=>J.uri.startsWith("ui://"));if(Y||G)$.extensions={...$.extensions,"io.modelcontextprotocol/ui":{}}}let X=new zT({name:this.name,version:this.version},{capabilities:$,...this.instructions?{instructions:this.instructions}:{},...this.jsonSchemaValidator?{jsonSchemaValidator:this.jsonSchemaValidator}:{}});return this.registerHandlersOnServer(X),X}registerHandlersOnServer($){if($.setRequestHandler(BV,async(Y,X)=>{let G=this.createProxiedRequestContext(X);return{tools:(await this.getAuthorizedConvertedToolEntries(G)).map(([,Q])=>{let W={name:Q.id||"unknown",description:Q.description,inputSchema:this.convertSchema(Q.parameters)};if(Q.outputSchema)W.outputSchema=this.convertSchema(Q.outputSchema);if(Q.mcp?.annotations)W.annotations=Q.mcp.annotations;let Z=v$0(Q.mcp?._meta,Q.strict);if(Z){let K=Z.ui,H=Z[Qu0];if(K?.resourceUri&&!H)W._meta={...Z,[Qu0]:K.resourceUri};else if(H&&!K?.resourceUri)W._meta={...Z,ui:{...Z.ui??{},resourceUri:H}};else W._meta=Z}return W})}}),$.setRequestHandler(J3,async(Y,X)=>{let G=Date.now();try{let J=this.convertedTools[Y.params.name];if(!J)return this.logger.warn("Unknown tool requested",{tool:Y.params.name}),{content:[{type:"text",text:`Unknown tool: ${Y.params.name}`}],isError:!0};let Q=J.parameters.validate?.(Y.params.arguments??{});if(Q&&!Q.success){this.logger.warn("Invalid tool arguments",{tool:Y.params.name,errors:Q.error});let A="Validation failed";if("errors"in Q.error&&Array.isArray(Q.error.errors))A=Q.error.errors.map((F)=>`- ${F.path?.join(".")||"root"}: ${F.message}`).join(`
`);else if(Q.error instanceof Error)A=Q.error.message;return{content:[{type:"text",text:`Tool validation failed. Please fix the following errors and try again:
${A}

Provided arguments: ${JSON.stringify(Y.params.arguments,null,2)}`}],isError:!0}}if(!J.execute)return this.logger.warn("Tool does not have an execute function",{tool:Y.params.name}),{content:[{type:"text",text:`Tool '${Y.params.name}' does not have an execute function.`}],isError:!0};let W={sendRequest:async(A,F)=>{return this.handleElicitationRequest(A,$,F)}},Z=new p1;if(X)Object.entries(X).forEach(([A,F])=>{Z.set(A,F)});let K={messages:[],toolCallId:"",requestContext:Z,mcp:{elicitation:W,extra:X},get elicitation(){throw Error('The "elicitation" key is now nested under "mcp.elicitation" in tool arguments')},get extra(){throw Error('The "extra" key is now nested under "mcp.extra" in tool arguments')}};await this.enforceToolExecutionFGA(Y.params.name,Z);let H=await J.execute(Q?.value??Y.params.arguments??{},K),z=Date.now()-G;if(VC0(H))return this.logger.warn(`CallTool: Tool '${Y.params.name}' returned a validation error in ${z}ms.`,{error:H.message}),{content:[{type:"text",text:H.message}],isError:!0};this.logger.debug(`CallTool: Tool '${Y.params.name}' executed successfully with result:`,H),this.logger.info(`Tool '${Y.params.name}' executed successfully in ${z}ms.`);let V={isError:!1,content:[]};if(J.outputSchema){let A;if(H&&typeof H==="object"&&"structuredContent"in H)A=H.structuredContent;else A=H;let F=J.outputSchema.validate?.(A??{});if(F&&!F.success)throw this.logger.warn("Invalid structured content",{tool:Y.params.name,errors:F.error}),Error(`Invalid structured content for tool ${Y.params.name}: ${JSON.stringify(F.error)}`);V.structuredContent=A}if(V.structuredContent)V.content=[{type:"text",text:JSON.stringify(V.structuredContent)}];else V.content=[{type:"text",text:typeof H==="string"?H:JSON.stringify(H)}];return V}catch(J){let Q=Date.now()-G;if(J instanceof Error&&"issues"in J&&Array.isArray(J.issues)){let W=J.issues;return this.logger.warn("Invalid tool arguments",{tool:Y.params.name,errors:W,duration:`${Q}ms`}),{content:[{type:"text",text:`Invalid arguments: ${W.map((Z)=>`${Z.path.join(".")}: ${Z.message}`).join(", ")}`}],isError:!0}}if(this.logger.error("Tool execution failed",{tool:Y.params.name,error:J}),J instanceof G0)return{content:[{type:"text",text:JSON.stringify(J.toJSON())}],isError:!0};return{content:[{type:"text",text:`Error: ${J instanceof Error?J.message:String(J)}`}],isError:!0}}}),$.setRequestHandler(WT,async(Y)=>{return this.currentLoggingLevel=Y.params.level,this.logger.debug("Logging level set",{level:Y.params.level}),{}}),this.resourceOptions)this.registerResourceHandlersOnServer($);if(this.promptOptions)this.registerPromptHandlersOnServer($)}registerResourceHandlersOnServer($){let Y=this.resourceOptions;if(!Y)return;if(Y.listResources)$.setRequestHandler(oE,async(X,G)=>{if(this.definedResources)return{resources:this.definedResources};else try{let J=await Y.listResources({extra:G});return this.definedResources=J,this.logger.debug("Fetched and cached resources",{count:this.definedResources.length}),{resources:this.definedResources}}catch(J){throw this.logger.error("Error fetching resources",{error:J}),J}});if(Y.getResourceContent)$.setRequestHandler(eE,async(X,G)=>{let J=Date.now(),Q=X.params.uri;if(this.logger.debug("Handling ReadResource request",{uri:Q}),!this.definedResources){let Z=await this.resourceOptions?.listResources?.({extra:G});if(!Z)throw Error("Failed to load resources");this.definedResources=Z}let W=this.definedResources?.find((Z)=>Z.uri===Q);if(!W)throw this.logger.warn("Unknown resource URI requested",{uri:Q}),Error(`Resource not found: ${Q}`);try{let Z=await Y.getResourceContent({uri:Q,extra:G}),H=(Array.isArray(Z)?Z:[Z]).map((V)=>{if("text"in V&&V.text!==void 0)return{uri:W.uri,mimeType:W.mimeType,text:V.text};let A=V.blob;if(A===void 0)throw Error(`Resource '${Q}' returned content with neither text nor blob`);return{uri:W.uri,mimeType:W.mimeType,blob:A}}),z=Date.now()-J;return this.logger.info("Resource read successfully",{uri:Q,duration:z}),{contents:H}}catch(Z){let K=Date.now()-J;throw this.logger.error("Failed to get content for resource",{uri:Q,duration:K,error:Z}),Z}});if(Y.resourceTemplates)$.setRequestHandler(tE,async(X,G)=>{if(this.definedResourceTemplates)return{resourceTemplates:this.definedResourceTemplates};else try{let J=await Y.resourceTemplates({extra:G});return this.definedResourceTemplates=J,this.logger.debug("Fetched and cached resource templates",{count:this.definedResourceTemplates.length}),{resourceTemplates:this.definedResourceTemplates}}catch(J){throw this.logger.error("Error fetching resource templates via resourceTemplates():",{error:J}),J}});$.setRequestHandler(c70,async(X)=>{let G=X.params.uri;return this.logger.info("Received resources/subscribe request",{uri:G}),this.subscriptions.add(G),{}}),$.setRequestHandler(l70,async(X)=>{let G=X.params.uri;return this.logger.info("Received resources/unsubscribe request",{uri:G}),this.subscriptions.delete(G),{}})}registerPromptHandlersOnServer($){let Y=this.promptOptions;if(!Y)return;if(Y.listPrompts)$.setRequestHandler($M,async(X,G)=>{if(this.logger.debug("Handling ListPrompts request"),this.definedPrompts)return{prompts:this.definedPrompts};else try{let J=await Y.listPrompts({extra:G});for(let Q of J)n70.parse(Q);return this.definedPrompts=J,this.logger.debug("Fetched and cached prompts",{count:this.definedPrompts.length}),{prompts:this.definedPrompts}}catch(J){throw this.logger.error("Error fetching prompts via listPrompts():",{error:J instanceof Error?J.message:String(J)}),J}});if(Y.getPromptMessages)$.setRequestHandler(YM,async(X,G)=>{let J=Date.now(),{name:Q,arguments:W}=X.params;if(!this.definedPrompts){let K=await this.promptOptions?.listPrompts?.({extra:G});if(!K)throw Error("Failed to load prompts");this.definedPrompts=K}let Z=this.definedPrompts?.find((K)=>K.name===Q);if(!Z)throw Error(`Prompt "${Q}" not found`);if(Z.arguments){for(let K of Z.arguments)if(K.required&&(W?.[K.name]===void 0||W?.[K.name]===null))throw Error(`Missing required argument: ${K.name}`)}try{let K=[];if(Y.getPromptMessages)K=await Y.getPromptMessages({name:Q,version:Z.version,args:W,extra:G});let H=Date.now()-J;return this.logger.info("Prompt retrieved successfully",{prompt:Q,duration:H}),{description:Z.description,messages:K}}catch(K){let H=Date.now()-J;throw this.logger.error("Failed to get prompt content",{prompt:Q,duration:H,error:K}),K}})}convertAgentsToTools($,Y){let X={};if(!$)return X;for(let G in $){let J=$[G];if(!J||!("generate"in J)){this.logger.warn("Invalid agent instance, skipping",{agentKey:G});continue}let Q=J.getDescription();if(!Q)throw Error(`Agent '${J.name}' (key: '${G}') must have a non-empty description to be used in an MCPServer.`);let W=`ask_${G}`;if(Y?.[W]||X[W]){this.logger.warn("Duplicate tool name, skipping agent",{tool:W,agentKey:G});continue}let Z=X8({id:W,description:`Ask agent '${J.name}' a question. Agent description: ${Q}`,inputSchema:{type:"object",properties:{message:{type:"string",description:"The question or input for the agent."}},required:["message"],additionalProperties:!1},execute:async(z,V)=>{let{message:A}=z;this.logger.debug("Executing agent tool",{tool:W,agent:J.name,message:A});try{let F=V?.requestContext||new p1;if(V?.mcp?.extra)Object.entries(V.mcp.extra).forEach(([D,L])=>{F.set(D,L)});return await J.generate(A,{...V??{},requestContext:F})}catch(F){throw this.logger.error("Error executing agent tool",{tool:W,agent:J.name,error:F}),F}}}),K={name:W,logger:this.logger,mastra:this.mastra,requestContext:new p1,tracingContext:{},description:Z.description},H=VY(Z,K);X[W]={...H,id:W,mcp:{toolType:"agent"}},this.logger.info("Registered agent as tool",{agent:J.name,key:G,tool:W})}return X}convertWorkflowsToTools($,Y){let X={};if(!$)return X;for(let G in $){let J=$[G];if(!J||typeof J.createRun!=="function"){this.logger.warn(`Workflow instance for '${G}' is invalid or missing a createRun function. Skipping.`);continue}let Q=J.description;if(!Q)throw Error(`Workflow '${J.id}' (key: '${G}') must have a non-empty description to be used in an MCPServer.`);let W=`run_${G}`;if(Y?.[W]||X[W]){this.logger.warn(`Tool with name '${W}' already exists. Workflow '${G}' will not be added as a duplicate tool.`);continue}let Z=X8({id:W,description:`Run workflow '${G}'. Workflow description: ${Q}`,inputSchema:J.inputSchema,execute:async(z,V)=>{this.logger.debug(`Executing workflow tool '${W}' for workflow '${J.id}' with input:`,z);try{let A=V?.requestContext||new p1;if(V?.mcp?.extra)Object.entries(V.mcp.extra).forEach(([D,L])=>{A.set(D,L)});return await(await J.createRun({runId:A?.get("runId")})).start({inputData:z,requestContext:A,tracingContext:V?.tracingContext})}catch(A){throw this.logger.error(`Error executing workflow tool '${W}' for workflow '${J.id}':`,A),A}}}),K={name:W,logger:this.logger,mastra:this.mastra,requestContext:new p1,tracingContext:{},description:Z.description},H=VY(Z,K);X[W]={...H,id:W,mcp:{toolType:"workflow"}},this.logger.info("Registered workflow as tool",{workflow:J.id,key:G,tool:W})}return X}convertTools($,Y,X){let G={};for(let V of Object.keys($)){let A=$[V];if(!A){this.logger.warn("Tool instance is undefined, skipping",{tool:V});continue}if(typeof A.execute!=="function"){this.logger.warn("Tool has no execute function, skipping",{tool:V});continue}let F={name:V,requestContext:new p1,tracingContext:{},mastra:this.mastra,logger:this.logger,description:A?.description},N=VY(A,F);G[V]={...N,id:V},this.logger.info("Registered explicit tool",{tool:V})}this.logger.info("Total defined tools registered",{count:Object.keys(G).length});let J={},Q={};try{J=this.convertAgentsToTools(Y,G),Q=this.convertWorkflowsToTools(X,G)}catch(V){let A=new G0({id:"MCP_SERVER_AGENT_OR_WORKFLOW_TOOL_CONVERSION_FAILED",domain:M0.MCP,category:E0.USER},V);throw this.logger.trackException(A),this.logger.error("Failed to convert tools:",{error:A.toString()}),A}let W={...G,...J,...Q},Z=Object.keys(W).length,K=Object.keys(G).length,H=Object.keys(J).length,z=Object.keys(Q).length;return this.logger.info(`${Z} total tools registered (${K} defined + ${H} agents + ${z} workflows)`),W}async startStdio(){this.stdioTransport=new Hu0;try{await this.server.connect(this.stdioTransport)}catch($){let Y=new G0({id:"MCP_SERVER_STDIO_CONNECTION_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY},$);throw this.logger.trackException(Y),this.logger.error("Failed to connect MCP server using stdio transport:",{error:Y.toString()}),Y}this.logger.info("Started MCP Server (stdio)")}async startSSE({url:$,ssePath:Y,messagePath:X,req:G,res:J}){try{if($.pathname===Y)await this.connectSSE({messagePath:X,res:J});else if($.pathname===X){if(this.logger.debug("Received message"),!this.sseTransport){J.writeHead(503),J.end("SSE connection not established");return}let Q=await this.readJsonBody(G,{preParsedOnly:!0});await this.sseTransport.handlePostMessage(G,J,Q)}else this.logger.debug("Unknown path:",{path:$.pathname}),J.writeHead(404),J.end()}catch(Q){let W=new G0({id:"MCP_SERVER_SSE_START_FAILED",domain:M0.MCP,category:E0.USER,details:{url:$.toString(),ssePath:Y,messagePath:X}},Q);throw this.logger.trackException(W),this.logger.error("Failed to start MCP Server (SSE):",{error:W.toString()}),W}}async startHonoSSE({url:$,ssePath:Y,messagePath:X,context:G}){try{if($.pathname===Y)return CG9(G,async(J)=>{await this.connectHonoSSE({messagePath:X,stream:J})});else if($.pathname===X){this.logger.debug("Received message");let J=G.req.query("sessionId");if(this.logger.debug("Received message for sessionId",{sessionId:J}),!J)return G.text("No sessionId provided",400);if(!this.sseHonoTransports.has(J))return G.text(`No transport found for sessionId ${J}`,400);let Q=await this.sseHonoTransports.get(J)?.handlePostMessage(G);if(!Q)return G.text("Transport not found",400);return Q}else return this.logger.debug("Unknown path:",{path:$.pathname}),G.text("Unknown path",404)}catch(J){let Q=new G0({id:"MCP_SERVER_HONO_SSE_START_FAILED",domain:M0.MCP,category:E0.USER,details:{url:$.toString(),ssePath:Y,messagePath:X}},J);throw this.logger.trackException(Q),this.logger.error("Failed to start MCP Server (Hono SSE):",{error:Q.toString()}),Q}}async startHTTP({url:$,httpPath:Y,req:X,res:G,options:J}){if(this.logger.debug("Received HTTP request",{method:X.method,path:$.pathname}),$.pathname!==Y){this.logger.debug("Pathname does not match httpPath, returning 404",{path:$.pathname,httpPath:Y}),G.writeHead(404),G.end();return}if(J?.serverless||J&&"sessionIdGenerator"in J&&J.sessionIdGenerator===void 0){this.logger.debug("Running in stateless mode"),await this.handleServerlessRequest(X,G);return}let W={sessionIdGenerator:()=>jz4(),...J},Z=X.headers["mcp-session-id"],K;this.logger.debug("Session ID from headers",{sessionId:Z,activeTransports:Array.from(this.streamableHTTPTransports.keys())});try{if(Z&&this.streamableHTTPTransports.has(Z)){if(K=this.streamableHTTPTransports.get(Z),this.logger.debug("Using existing transport for session",{sessionId:Z}),X.method==="GET")this.logger.debug("Handling GET request for existing session",{sessionId:Z});let H=X.method==="POST"?await this.readJsonBody(X):void 0;await K.handleRequest(X,G,H)}else if(Z)this.logger.warn("Session ID not found, returning 404",{sessionId:Z,method:X.method}),G.writeHead(404,{"Content-Type":"application/json"}),G.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32000,message:"Session not found"},id:null}));else if(this.logger.debug("No session ID provided",{method:X.method}),X.method==="POST"){let H=await this.readJsonBody(X),{isInitializeRequest:z}=await Promise.resolve().then(() => (BY(),d34));if(z(H)){this.logger.debug("Received initialize request, creating new transport"),K=new k$0({...W,sessionIdGenerator:W.sessionIdGenerator,onsessioninitialized:(A)=>{this.streamableHTTPTransports.set(A,K)}}),K.onclose=()=>{let A=K?.sessionId;if(A&&this.streamableHTTPTransports.has(A)){if(this.logger.debug("Transport closed for session, removing from map",{sessionId:A}),this.streamableHTTPTransports.delete(A),this.httpServerInstances.has(A))this.httpServerInstances.delete(A),this.logger.debug("Cleaned up server instance for closed session",{sessionId:A})}};let V=this.createServerInstance();if(await V.connect(K),K.sessionId)this.streamableHTTPTransports.set(K.sessionId,K),this.httpServerInstances.set(K.sessionId,V),this.logger.debug("Session initialized and stored",{sessionId:K.sessionId});else this.logger.warn("Transport initialized without a session ID");return await K.handleRequest(X,G,H)}else this.logger.warn("Received non-initialize POST request without session ID"),G.writeHead(400,{"Content-Type":"application/json"}),G.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32000,message:"Bad Request: No valid session ID provided for non-initialize request"},id:H?.id??null}))}else this.logger.warn("Received request without session ID",{method:X.method}),G.writeHead(400,{"Content-Type":"application/json"}),G.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32000,message:`Bad Request: ${X.method} request requires a valid session ID`},id:null}))}catch(H){let z=new G0({id:"MCP_SERVER_HTTP_CONNECTION_FAILED",domain:M0.MCP,category:E0.USER,text:"Failed to connect MCP server using HTTP transport"},H);if(this.logger.trackException(z),this.logger.error("Error handling HTTP request",{error:z}),!G.headersSent)G.writeHead(500,{"Content-Type":"application/json"}),G.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32603,message:"Internal server error"},id:null}))}}async handleServerlessRequest($,Y){try{this.logger.debug("Received serverless request",{method:$.method});let X=$.method==="POST"?await this.readJsonBody($):void 0;this.logger.debug("Processing serverless request",{method:$.method,bodyMethod:X?.method,id:X?.id});let G=this.createServerInstance(),J=new k$0({sessionIdGenerator:void 0,enableJsonResponse:!0});await G.connect(J),await J.handleRequest($,Y,X),this.logger.debug("Completed serverless request",{method:X?.method,id:X?.id})}catch(X){let G=new G0({id:"MCP_SERVER_SERVERLESS_REQUEST_FAILED",domain:M0.MCP,category:E0.USER,text:"Failed to handle serverless MCP request"},X);if(this.logger.trackException(G),this.logger.error("Error handling serverless request",{error:G}),!Y.headersSent)Y.writeHead(500,{"Content-Type":"application/json"}),Y.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32603,message:"Internal server error",data:X instanceof Error?X.message:String(X)},id:null}))}}async connectSSE({messagePath:$,res:Y}){try{this.logger.debug("Received SSE connection"),this.sseTransport=new Uu0($,Y),await this.server.connect(this.sseTransport),this.server.onclose=async()=>{this.sseTransport=void 0,await this.server.close()},Y.on("close",()=>{this.sseTransport=void 0})}catch(X){let G=new G0({id:"MCP_SERVER_SSE_CONNECT_FAILED",domain:M0.MCP,category:E0.USER,details:{messagePath:$}},X);throw this.logger.trackException(G),this.logger.error("Failed to connect to MCP Server (SSE):",{error:G}),G}}async connectHonoSSE({messagePath:$,stream:Y}){this.logger.debug("Received SSE connection");let X=new kG9($,Y),G=X.sessionId;this.logger.debug("SSE Transport created with sessionId:",{sessionId:G}),this.sseHonoTransports.set(G,X),Y.onAbort(()=>{this.logger.debug("SSE Transport aborted with sessionId:",{sessionId:G}),this.sseHonoTransports.delete(G)});try{await this.server.connect(X),this.server.onclose=async()=>{this.logger.debug("SSE Transport closed with sessionId:",{sessionId:G}),this.sseHonoTransports.delete(G),await this.server.close()};while(!0){await Y.sleep(60000);let J=Array.from(this.sseHonoTransports.keys()||[]);this.logger.debug("Active Hono SSE sessions:",{sessionIds:J}),await Y.write(`:keep-alive

`)}}catch(J){let Q=new G0({id:"MCP_SERVER_HONO_SSE_CONNECT_FAILED",domain:M0.MCP,category:E0.USER,details:{messagePath:$}},J);throw this.logger.trackException(Q),this.logger.error("Failed to connect to MCP Server (Hono SSE):",{error:Q}),Q}}async close(){try{if(this.stdioTransport)await this.stdioTransport.close?.(),this.stdioTransport=void 0;if(this.sseTransport)await this.sseTransport.close?.(),this.sseTransport=void 0;if(this.sseHonoTransports){for(let $ of this.sseHonoTransports.values())await $.close?.();this.sseHonoTransports.clear()}if(this.streamableHTTPTransports){for(let $ of this.streamableHTTPTransports.values())await $.close?.();this.streamableHTTPTransports.clear()}if(this.httpServerInstances){for(let $ of this.httpServerInstances.values())await $.close?.();this.httpServerInstances.clear()}await this.server.close(),this.logger.info("MCP server closed.")}catch($){let Y=new G0({id:"MCP_SERVER_CLOSE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY},$);throw this.logger.trackException(Y),this.logger.error("Error closing MCP server:",{error:Y}),Y}}getServerInfo(){return{id:this.id,name:this.name,description:this.description,repository:this.repository,version_detail:{version:this.version,release_date:this.releaseDate,is_latest:this.isLatest}}}getServerDetail(){return{...this.getServerInfo(),package_canonical:this.packageCanonical,packages:this.packages,remotes:this.remotes}}convertSchema($){if(V5($))return $6($);return $?.jsonSchema||$}getToolListInfo($){let Y=this.mastra?.getServer?.()?.fga;if(Y&&$)return this.getAuthorizedConvertedToolEntries($).then((X)=>({tools:X.map(([G,J])=>({id:G,name:J.id||G,description:J.description,inputSchema:this.convertSchema(J.parameters),outputSchema:this.convertSchema(J.outputSchema),toolType:J.mcp?.toolType,_meta:v$0(J.mcp?._meta,J.strict)}))}));if(Y&&!$)return{tools:[]};return this.logger.debug("Getting tool list",{server:this.name}),{tools:Object.entries(this.convertedTools).map(([X,G])=>({id:X,name:G.id||X,description:G.description,inputSchema:this.convertSchema(G.parameters),outputSchema:this.convertSchema(G.outputSchema),toolType:G.mcp?.toolType,_meta:v$0(G.mcp?._meta,G.strict)}))}}getToolInfo($){let Y=this.convertedTools[$];if(!Y){this.logger.debug("Tool not found",{tool:$,server:this.name});return}return this.logger.debug("Getting tool info",{tool:$,server:this.name}),{name:Y.id||$,description:Y.description,inputSchema:this.convertSchema(Y.parameters),outputSchema:this.convertSchema(Y.outputSchema),toolType:Y.mcp?.toolType,_meta:v$0(Y.mcp?._meta,Y.strict)}}createProxiedRequestContext($){let Y=new p1;if($&&typeof $==="object")Object.entries($).forEach(([X,G])=>{Y.set(X,G)});return Y}async getAuthorizedConvertedToolEntries($){let Y=Object.entries(this.convertedTools);if(!this.mastra?.getServer?.()?.fga)return Y;if(!$.get("user"))return[];return(await Promise.all(Y.map(async([Q,W])=>{try{return await this.enforceToolExecutionFGA(Q,$),[Q,W]}catch(Z){if(Z instanceof Error&&Z.name==="FGADeniedError")return null;throw Z}}))).filter((Q)=>Q!==null)}async enforceToolExecutionFGA($,Y){let X=this.mastra?.getServer?.()?.fga;if(!X)return;let{checkFGA:G,FGADeniedError:J,MastraFGAPermissions:Q}=await Promise.resolve().then(() => (_z4(),wz4)),W=JSON.stringify([this.id,$]),Z=Y?.get("user");if(!Z)throw new J({id:"unknown"},{type:"tool",id:W},Q.TOOLS_EXECUTE);await G({fgaProvider:X,user:Z,resource:{type:"tool",id:W},permission:Q.TOOLS_EXECUTE})}async executeTool($,Y,X){let G=this.convertedTools[$],J=Y;try{if(!G)throw this.logger.warn("Unknown tool requested",{tool:$,server:this.name}),Error(`Unknown tool: ${$}`);this.logger.debug("Invoking tool",{tool:$,args:Y});let Q=G.parameters,W=typeof Q?.validate==="function"?Q.validate(Y??{}):typeof Q?.safeParse==="function"?Q.safeParse(Y??{}):null;if(W){if(!(typeof W.success==="boolean"?W.success:!W.issues?.length)){let H=(W.error?.issues??W.error?.errors??W.issues??[]).map((V)=>`- ${V.path?.join(".")||"root"}: ${V.message}`).join(`
`),z=W.error?.format?.()??W.error??W.issues;return this.logger.warn("Invalid tool arguments",{tool:$,errorMessages:H,errors:z}),{error:!0,message:`Tool validation failed. Please fix the following errors and try again:
${H||"Validation failed"}

Provided arguments: ${JSON.stringify(Y,null,2)}`,validationErrors:z}}J=W.data??W.value??Y}else this.logger.debug("Tool parameters missing schema, skipping validation",{tool:$});if(!G.execute)throw this.logger.error("Tool does not have an execute function",{tool:$}),Error(`Tool '${$}' cannot be executed.`)}catch(Q){let W=new G0({id:"MCP_SERVER_TOOL_EXECUTE_PREPARATION_FAILED",domain:M0.MCP,category:E0.USER,details:{toolId:$,args:Y}},Q);throw this.logger.trackException(W),W}try{let Q={messages:X?.messages||[],toolCallId:X?.toolCallId||jz4(),requestContext:X?.requestContext};await this.enforceToolExecutionFGA($,Q.requestContext);let W=await G.execute(J,Q);return this.logger.info("Tool executed successfully",{tool:$}),W}catch(Q){let W=new G0({id:"MCP_SERVER_TOOL_EXECUTE_FAILED",domain:M0.MCP,category:E0.USER,details:{toolId:$,validatedArgs:J}},Q);throw this.logger.trackException(W),W}}async readResource($){if(!this.resourceOptions?.getResourceContent)throw new G0({id:"MCP_SERVER_RESOURCES_NOT_CONFIGURED",domain:M0.MCP,category:E0.USER,details:{uri:$}});let Y={},X=await this.resourceOptions.getResourceContent({uri:$,extra:Y});return{contents:(Array.isArray(X)?X:[X]).map((J)=>({uri:$,..."text"in J&&J.text!==void 0?{text:J.text}:{},..."blob"in J&&J.blob!==void 0?{blob:J.blob}:{}}))}}async listResources(){if(!this.resourceOptions?.listResources)return{resources:[]};let $={};if(this.definedResources)return{resources:this.definedResources};let Y=await this.resourceOptions.listResources({extra:$});return this.definedResources=Y,{resources:Y}}};KY();var Ru0=U6(nA(),1);var hz4=new O4,yG9=X8({id:"get-Database-Configuration",description:"get the database configuration.",inputSchema:U.object(),execute:async()=>{let $=await $a({limit:100,offset:0}),Y=await Ma({limit:100,offset:0}),X=await Ts({limit:100,offset:0}),G=[];return $.forEach((J)=>{G.push({uuid:J.code,name:J.name,type:"mysql"})}),Y.forEach((J)=>{G.push({uuid:J.code,name:J.name,type:"postgresql"})}),X.forEach((J)=>{G.push({uuid:J.code,name:J.name,type:"oracle"})}),{type:"text",text:`get the database configuration completed successfully:
${JSON.stringify(G,null,2)}`}}}),bG9=X8({id:"execute-Sql-Statement",description:"execute the SQL statement.",inputSchema:U.object({uuid:U.string().describe("uuid of the database configuration , for example : eke5ckdysx3kfd1cw2lrko2k"),statement:U.string().describe("the sql statement to execute.")}),execute:async($)=>{let Y=gG9($.statement);if(!Y)return{content:[{type:"text",text:"Error: the statement is invalid"}],isError:!0};let X=await jA($.uuid),G=await cL($.uuid),J=await ZU($.uuid);if(X[0]){let Q=await uX($.uuid);try{await Q.execute(r.raw($.statement))}catch(W){return{content:[{type:"text",text:`Error: statement execute failed : ${W}`}],isError:!0}}}else if(G[0]){let Q=await pX($.uuid);try{await Q.execute(r.raw($.statement))}catch(W){return{content:[{type:"text",text:`Error: statement execute failed : ${W}`}],isError:!0}}}else if(J[0]){let Q=await lX($.uuid);try{await Q.execute(`${$.statement}`,[],{outFormat:Ru0.default.OUT_FORMAT_OBJECT}),Q.commit()}catch(W){return{content:[{type:"text",text:`Error: statement execute failed : ${W}`}],isError:!0}}}else return{content:[{type:"text",text:"Error: uuid of the database configuration is not exist"}],isError:!0};return{type:"text",text:`execute the SQL statement successfully , table name is ${Y}`}}}),hG9=X8({id:"crud-Development",description:"CRUD interface development.",inputSchema:U.object({uuid:U.string().describe("uuid of the database configuration , for example : eke5ckdysx3kfd1cw2lrko2k"),table:U.string().describe("database table name")}),execute:async($)=>{if(!mG9($.table))return{content:[{type:"text",text:"Error: the table is invalid,must contain only English letters, numbers, underscores, and hyphens."}],isError:!0};let Y=await jA($.uuid),X=await cL($.uuid),G=await ZU($.uuid),J="mysql";if(Y[0]){let W=await uX($.uuid),Z=`SELECT table_name,table_schema 
            FROM information_schema.TABLES WHERE table_name = '${$.table}'`,K=await W.execute(r.raw(Z));if(JSON.stringify(K[0]).length==2)return{content:[{type:"text",text:"Error: the table is not exist"}],isError:!0}}else if(X[0]){J="postgres";let W=await pX($.uuid),Z=`
                SELECT
	                schemaname AS table_schema,
	                tablename AS table_name
                FROM
	                pg_tables 
                WHERE
	                schemaname NOT IN ( 'information_schema', 'pg_catalog' ) 
                    AND tablename = '${$.table}' 
                ORDER BY
	                schemaname,
	                tablename
                `,K=await W.execute(r.raw(Z));if(JSON.stringify(K.rows).length==2)return{content:[{type:"text",text:"Error: the table is not exist"}],isError:!0}}else if(G[0]){J="oracle";let W=await lX($.uuid),Z=`SELECT
                    column_name AS Field,
                    data_type AS TYPE ,
                    data_length AS LENGTH,
                    nullable AS NULLABLE
                FROM
                    all_tab_columns 
                WHERE
                    table_name = '${$.table}'`,K=await W.execute(`${Z}`,[],{outFormat:Ru0.default.OUT_FORMAT_OBJECT});if(W.commit(),W.close(),JSON.stringify(K.rows).length==2)return{content:[{type:"text",text:"Error: the table is not exist"}],isError:!0}}else return{content:[{type:"text",text:"Error: uuid of the database configuration is not exist"}],isError:!0};if((await WB($.table))[0])return{content:[{type:"text",text:"Error: The business module already exists"}],isError:!0};else{let W={name:`${$.table}\u6A21\u5757`,path1:$.table};await wI(W)}return await ux($.table,$.uuid,"insert",J,$.table,""),await ux($.table,$.uuid,"update",J,$.table,""),await JA0($.table,$.uuid,J,$.table,""),await QA0($.table,$.uuid,J,$.table,""),await WA0($.table,$.uuid,J,$.table,""),{type:"text",text:"CRUD interface development successfully."}}});async function fG9(){return new bz4({id:"sys-mcp-server",name:"System mcp Server",version:"1.0.0",agents:{},tools:{getDatabaseConfiguration:yG9,executeSqlStatement:bG9,crudDevelopment:hG9},workflows:{}}).getServer()}function gG9($){if(!$||typeof $!=="string")return null;let Y=$.trim().replace(/\s+/g," "),X=/^\s*CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?[`"$]?([a-zA-Z0-9_.$]+)[`"$]?\s*(?:\s|$)/i,G=Y.match(X);if(G&&G[1])return G[1];return null}function mG9($){return/^[a-zA-Z0-9_-]+$/.test($)}hz4.all("/",async($)=>{let Y=new U$0;return await(await fG9()).connect(Y),Y.handleRequest($)});var fz4=hz4;gu();var AV4="vercel.ai.error",uG9=Symbol.for(AV4),gz4,mz4,G4=class $ extends(mz4=Error,gz4=uG9,mz4){constructor({name:Y,message:X,cause:G}){super(X);this[gz4]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,AV4)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},FV4="AI_APICallError",DV4=`vercel.ai.error.${FV4}`,pG9=Symbol.for(DV4),uz4,pz4,n8=class extends(pz4=G4,uz4=pG9,pz4){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:FV4,message:$,cause:W});this[uz4]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return G4.hasMarker($,DV4)}},NV4="AI_EmptyResponseBodyError",LV4=`vercel.ai.error.${NV4}`,dG9=Symbol.for(LV4),dz4,cz4,BV4=class extends(cz4=G4,dz4=dG9,cz4){constructor({message:$="Empty response body"}={}){super({name:NV4,message:$});this[dz4]=!0}static isInstance($){return G4.hasMarker($,LV4)}};function K3($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}var OV4="AI_InvalidArgumentError",EV4=`vercel.ai.error.${OV4}`,cG9=Symbol.for(EV4),lz4,iz4,x$0=class extends(iz4=G4,lz4=cG9,iz4){constructor({message:$,cause:Y,argument:X}){super({name:OV4,message:$,cause:Y});this[lz4]=!0,this.argument=X}static isInstance($){return G4.hasMarker($,EV4)}},MV4="AI_InvalidPromptError",RV4=`vercel.ai.error.${MV4}`,lG9=Symbol.for(RV4),nz4,rz4,Q2=class extends(rz4=G4,nz4=lG9,rz4){constructor({prompt:$,message:Y,cause:X}){super({name:MV4,message:`Invalid prompt: ${Y}`,cause:X});this[nz4]=!0,this.prompt=$}static isInstance($){return G4.hasMarker($,RV4)}},qV4="AI_InvalidResponseDataError",IV4=`vercel.ai.error.${qV4}`,iG9=Symbol.for(IV4),az4,sz4,zM=class extends(sz4=G4,az4=iG9,sz4){constructor({data:$,message:Y=`Invalid response data: ${JSON.stringify($)}.`}){super({name:qV4,message:Y});this[az4]=!0,this.data=$}static isInstance($){return G4.hasMarker($,IV4)}},PV4="AI_JSONParseError",wV4=`vercel.ai.error.${PV4}`,nG9=Symbol.for(wV4),oz4,tz4,mu=class extends(tz4=G4,oz4=nG9,tz4){constructor({text:$,cause:Y}){super({name:PV4,message:`JSON parsing failed: Text: ${$}.
Error message: ${K3(Y)}`,cause:Y});this[oz4]=!0,this.text=$}static isInstance($){return G4.hasMarker($,wV4)}},_V4="AI_LoadAPIKeyError",jV4=`vercel.ai.error.${_V4}`,rG9=Symbol.for(jV4),ez4,$V4,uu=class extends($V4=G4,ez4=rG9,$V4){constructor({message:$}){super({name:_V4,message:$});this[ez4]=!0}static isInstance($){return G4.hasMarker($,jV4)}},TV4="AI_LoadSettingError",CV4=`vercel.ai.error.${TV4}`,aG9=Symbol.for(CV4),YV4,XV4,jV7=class extends(XV4=G4,YV4=aG9,XV4){constructor({message:$}){super({name:TV4,message:$});this[YV4]=!0}static isInstance($){return G4.hasMarker($,CV4)}},SV4="AI_NoContentGeneratedError",kV4=`vercel.ai.error.${SV4}`,sG9=Symbol.for(kV4),GV4,JV4,TV7=class extends(JV4=G4,GV4=sG9,JV4){constructor({message:$="No content generated."}={}){super({name:SV4,message:$});this[GV4]=!0}static isInstance($){return G4.hasMarker($,kV4)}},vV4="AI_NoSuchModelError",xV4=`vercel.ai.error.${vV4}`,oG9=Symbol.for(xV4),QV4,WV4,CV7=class extends(WV4=G4,QV4=oG9,WV4){constructor({errorName:$=vV4,modelId:Y,modelType:X,message:G=`No such ${X}: ${Y}`}){super({name:$,message:G});this[QV4]=!0,this.modelId=Y,this.modelType=X}static isInstance($){return G4.hasMarker($,xV4)}},yV4="AI_TooManyEmbeddingValuesForCallError",bV4=`vercel.ai.error.${yV4}`,tG9=Symbol.for(bV4),ZV4,KV4,y$0=class extends(KV4=G4,ZV4=tG9,KV4){constructor($){super({name:yV4,message:`Too many values for a single embedding call. The ${$.provider} model "${$.modelId}" can only embed up to ${$.maxEmbeddingsPerCall} values per call, but ${$.values.length} values were provided.`});this[ZV4]=!0,this.provider=$.provider,this.modelId=$.modelId,this.maxEmbeddingsPerCall=$.maxEmbeddingsPerCall,this.values=$.values}static isInstance($){return G4.hasMarker($,bV4)}},hV4="AI_TypeValidationError",fV4=`vercel.ai.error.${hV4}`,eG9=Symbol.for(fV4),UV4,HV4,U3=class $ extends(HV4=G4,UV4=eG9,HV4){constructor({value:Y,cause:X,context:G}){let J="Type validation failed";if(G==null?void 0:G.field)J+=` for ${G.field}`;if((G==null?void 0:G.entityName)||(G==null?void 0:G.entityId)){J+=" (";let Q=[];if(G.entityName)Q.push(G.entityName);if(G.entityId)Q.push(`id: "${G.entityId}"`);J+=Q.join(", "),J+=")"}super({name:hV4,message:`${J}: Value: ${JSON.stringify(Y)}.
Error message: ${K3(X)}`,cause:X});this[UV4]=!0,this.value=Y,this.context=G}static isInstance(Y){return G4.hasMarker(Y,fV4)}static wrap({value:Y,cause:X,context:G}){var J,Q,W;if($.isInstance(X)&&X.value===Y&&((J=X.context)==null?void 0:J.field)===(G==null?void 0:G.field)&&((Q=X.context)==null?void 0:Q.entityName)===(G==null?void 0:G.entityName)&&((W=X.context)==null?void 0:W.entityId)===(G==null?void 0:G.entityId))return X;return new $({value:Y,cause:X,context:G})}},gV4="AI_UnsupportedFunctionalityError",mV4=`vercel.ai.error.${gV4}`,$J9=Symbol.for(mV4),zV4,VV4,l5=class extends(VV4=G4,zV4=$J9,VV4){constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:gV4,message:Y});this[zV4]=!0,this.functionality=$}static isInstance($){return G4.hasMarker($,mV4)}};O1();cG();cG();cG();$v0();function i6(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}function nV4({tools:$=[],providerToolNames:Y,resolveProviderToolName:X}){var G;let J={},Q={};for(let W of $)if(W.type==="provider"){let Z=(G=X==null?void 0:X(W))!=null?G:(W.id in Y)?Y[W.id]:void 0;if(Z==null)continue;J[W.name]=Z,Q[Z]=W.name}return{toProviderToolName:(W)=>{var Z;return(Z=J[W])!=null?Z:W},toCustomToolName:(W)=>{var Z;return(Z=Q[W])!=null?Z:W}}}async function rV4($,Y){if($==null)return Promise.resolve();let X=Y==null?void 0:Y.abortSignal;return new Promise((G,J)=>{if(X==null?void 0:X.aborted){J(uV4());return}let Q=setTimeout(()=>{W(),G()},$),W=()=>{clearTimeout(Q),X==null||X.removeEventListener("abort",Z)},Z=()=>{W(),J(uV4())};X==null||X.addEventListener("abort",Z)})}function uV4(){return new DOMException("Delay was aborted","AbortError")}var AM=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){if(this._promise)return this._promise;return this._promise=new Promise(($,Y)=>{if(this.status.type==="resolved")$(this.status.value);else if(this.status.type==="rejected")Y(this.status.error);this._resolve=$,this._reject=Y}),this._promise}resolve($){var Y;if(this.status={type:"resolved",value:$},this._promise)(Y=this._resolve)==null||Y.call(this,$)}reject($){var Y;if(this.status={type:"rejected",error:$},this._promise)(Y=this._reject)==null||Y.call(this,$)}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}};function TT($){return Object.fromEntries([...$.headers])}var{btoa:YJ9,atob:XJ9}=globalThis;function RJ($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X=XJ9(Y);return Uint8Array.from(X,(G)=>G.codePointAt(0))}function YH($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return YJ9(Y)}function W2($){return $ instanceof Uint8Array?YH($):$}function b$0($,Y={}){let{useArrayBrackets:X=!0}=Y,G=new FormData;for(let[J,Q]of Object.entries($)){if(Q==null)continue;if(Array.isArray(Q)){if(Q.length===1){G.append(J,Q[0]);continue}let W=X?`${J}[]`:J;for(let Z of Q)G.append(W,Z);continue}G.append(J,Q)}return G}var aV4="AI_DownloadError",sV4=`vercel.ai.error.${aV4}`,GJ9=Symbol.for(sV4),pV4,dV4,MJ=class extends(dV4=G4,pV4=GJ9,dV4){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:aV4,message:J,cause:G});this[pV4]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return G4.hasMarker($,sV4)}},h$0=2147483648;async function ju0({response:$,url:Y,maxBytes:X=h$0}){let G=$.headers.get("content-length");if(G!=null){let z=parseInt(G,10);if(!isNaN(z)&&z>X)throw new MJ({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes (Content-Length: ${z}).`})}let J=$.body;if(J==null)return new Uint8Array(0);let Q=J.getReader(),W=[],Z=0;try{while(!0){let{done:z,value:V}=await Q.read();if(z)break;if(Z+=V.length,Z>X)throw new MJ({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes.`});W.push(V)}}finally{try{await Q.cancel()}finally{Q.releaseLock()}}let K=new Uint8Array(Z),H=0;for(let z of W)K.set(z,H),H+=z.length;return K}function pu($){let Y;try{Y=new URL($)}catch(G){throw new MJ({url:$,message:`Invalid URL: ${$}`})}if(Y.protocol==="data:")return;if(Y.protocol!=="http:"&&Y.protocol!=="https:")throw new MJ({url:$,message:`URL scheme must be http, https, or data, got ${Y.protocol}`});let X=Y.hostname;if(!X)throw new MJ({url:$,message:"URL must have a hostname"});if(X==="localhost"||X.endsWith(".local")||X.endsWith(".localhost"))throw new MJ({url:$,message:`URL with hostname ${X} is not allowed`});if(X.startsWith("[")&&X.endsWith("]")){let G=X.slice(1,-1);if(JJ9(G))throw new MJ({url:$,message:`URL with IPv6 address ${X} is not allowed`});return}if(oV4(X)){if(Pu0(X))throw new MJ({url:$,message:`URL with IP address ${X} is not allowed`});return}}function oV4($){let Y=$.split(".");if(Y.length!==4)return!1;return Y.every((X)=>{let G=Number(X);return Number.isInteger(G)&&G>=0&&G<=255&&String(G)===X})}function Pu0($){let Y=$.split(".").map(Number),[X,G]=Y;if(X===0)return!0;if(X===10)return!0;if(X===127)return!0;if(X===169&&G===254)return!0;if(X===172&&G>=16&&G<=31)return!0;if(X===192&&G===168)return!0;return!1}function JJ9($){let Y=$.toLowerCase();if(Y==="::1")return!0;if(Y==="::")return!0;if(Y.startsWith("::ffff:")){let X=Y.slice(7);if(oV4(X))return Pu0(X);let G=X.split(":");if(G.length===2){let J=parseInt(G[0],16),Q=parseInt(G[1],16);if(!isNaN(J)&&!isNaN(Q)){let W=J>>8&255,Z=J&255,K=Q>>8&255,H=Q&255;return Pu0(`${W}.${Z}.${K}.${H}`)}}}if(Y.startsWith("fc")||Y.startsWith("fd"))return!0;if(Y.startsWith("fe80"))return!0;return!1}async function du($,Y){var X,G;pu($);try{let J=await fetch($,{signal:Y==null?void 0:Y.abortSignal});if(J.redirected)pu(J.url);if(!J.ok)throw new MJ({url:$,statusCode:J.status,statusText:J.statusText});let Q=await ju0({response:J,url:$,maxBytes:(X=Y==null?void 0:Y.maxBytes)!=null?X:h$0}),W=(G=J.headers.get("content-type"))!=null?G:void 0;return new Blob([Q],W?{type:W}:void 0)}catch(J){if(MJ.isInstance(J))throw J;throw new MJ({url:$,cause:J})}}var XH=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let Z=0;Z<Y;Z++)W[Z]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new x$0({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},Y7=XH();function cD($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function MV($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}var QJ9=["fetch failed","failed to fetch"],WJ9=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function ZJ9($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string"&&WJ9.includes(Y))return!0;return!1}function tV4({error:$,url:Y,requestBodyValues:X}){if(MV($))return $;if($ instanceof TypeError&&QJ9.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new n8({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}if(ZJ9($))return new n8({message:`Cannot connect to API: ${$.message}`,cause:$,url:Y,requestBodyValues:X,isRetryable:!0});return $}function f$0($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function KJ9($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function pW($,...Y){let X=new Headers(KJ9($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}var eV4="4.0.27",UJ9=()=>globalThis.fetch,FM=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=UJ9()})=>{try{let W=await Q($,{method:"GET",headers:pW(Y,`ai-sdk/provider-utils/${eV4}`,f$0()),signal:J}),Z=TT(W);if(!W.ok){let K;try{K=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(MV(H)||n8.isInstance(H))throw H;throw new n8({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}throw K.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(K){if(K instanceof Error){if(MV(K)||n8.isInstance(K))throw K}throw new n8({message:"Failed to process successful response",cause:K,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}}catch(W){throw tV4({error:W,url:$,requestBodyValues:{}})}};function cu($){return $!=null}function $A4({mediaType:$,url:Y,supportedUrls:X}){return Y=Y.toLowerCase(),$=$.toLowerCase(),Object.entries(X).map(([G,J])=>{let Q=G.toLowerCase();return Q==="*"||Q==="*/*"?{mediaTypePrefix:"",regexes:J}:{mediaTypePrefix:Q.replace(/\*/,""),regexes:J}}).filter(({mediaTypePrefix:G})=>$.startsWith(G)).flatMap(({regexes:G})=>G).some((G)=>G.test(Y))}function YA4({apiKey:$,environmentVariableName:Y,apiKeyParameterName:X="apiKey",description:G}){if(typeof $==="string")return $;if($!=null)throw new uu({message:`${G} API key must be a string.`});if(typeof process>"u")throw new uu({message:`${G} API key is missing. Pass it using the '${X}' parameter. Environment variables are not supported in this environment.`});if($=process.env[Y],$==null)throw new uu({message:`${G} API key is missing. Pass it using the '${X}' parameter or the ${Y} environment variable.`});if(typeof $!=="string")throw new uu({message:`${G} API key must be a string. The value of the ${Y} environment variable is not a string.`});return $}function lD({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}function XA4($){var Y;let[X,G=""]=$.toLowerCase().split("/");return(Y={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[G])!=null?Y:G}var HJ9=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,zJ9=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function cV4($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(HJ9.test($)===!1&&zJ9.test($)===!1)return Y;return VJ9(Y)}function VJ9($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function Tu0($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return cV4($)}try{return cV4($)}finally{Error.stackTraceLimit=Y}}function Cu0($){if($.type==="object"||Array.isArray($.type)&&$.type.includes("object")){$.additionalProperties=!1;let{properties:X}=$;if(X!=null)for(let G of Object.keys(X))X[G]=VM(X[G])}if($.items!=null)$.items=Array.isArray($.items)?$.items.map(VM):VM($.items);if($.anyOf!=null)$.anyOf=$.anyOf.map(VM);if($.allOf!=null)$.allOf=$.allOf.map(VM);if($.oneOf!=null)$.oneOf=$.oneOf.map(VM);let{definitions:Y}=$;if(Y!=null)for(let X of Object.keys(Y))Y[X]=VM(Y[X]);return $}function VM($){if(typeof $==="boolean")return $;return Cu0($)}var AJ9=Symbol("Let zodToJsonSchema decide on which parser to use"),lV4={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"},FJ9=($)=>typeof $==="string"?{...lV4,name:$}:{...lV4,...$};function uW(){return{}}function DJ9($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=t9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function NJ9($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function LJ9(){return{type:"boolean"}}function GA4($,Y){return t9($.type._def,Y)}var BJ9=($,Y)=>{return t9($.innerType._def,Y)};function JA4($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>JA4($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return OJ9($)}}var OJ9=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y};function EJ9($,Y){return{...t9($.innerType._def,Y),default:$.defaultValue()}}function MJ9($,Y){return Y.effectStrategy==="input"?t9($.schema._def,Y):uW()}function RJ9($){return{type:"string",enum:Array.from($.values)}}var qJ9=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};function IJ9($,Y){let X=[t9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),t9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(qJ9(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...Z}=J;Q=Z}G.push(Q)}}),G.length?{allOf:G}:void 0}function PJ9($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}var qu0=void 0,H3={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:()=>{if(qu0===void 0)qu0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return qu0},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 QA4($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":z3(X,"email",G.message,Y);break;case"format:idn-email":z3(X,"idn-email",G.message,Y);break;case"pattern:zod":EJ(X,H3.email,G.message,Y);break}break;case"url":z3(X,"uri",G.message,Y);break;case"uuid":z3(X,"uuid",G.message,Y);break;case"regex":EJ(X,G.regex,G.message,Y);break;case"cuid":EJ(X,H3.cuid,G.message,Y);break;case"cuid2":EJ(X,H3.cuid2,G.message,Y);break;case"startsWith":EJ(X,RegExp(`^${Iu0(G.value,Y)}`),G.message,Y);break;case"endsWith":EJ(X,RegExp(`${Iu0(G.value,Y)}$`),G.message,Y);break;case"datetime":z3(X,"date-time",G.message,Y);break;case"date":z3(X,"date",G.message,Y);break;case"time":z3(X,"time",G.message,Y);break;case"duration":z3(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{EJ(X,RegExp(Iu0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")z3(X,"ipv4",G.message,Y);if(G.version!=="v4")z3(X,"ipv6",G.message,Y);break}case"base64url":EJ(X,H3.base64url,G.message,Y);break;case"jwt":EJ(X,H3.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")EJ(X,H3.ipv4Cidr,G.message,Y);if(G.version!=="v4")EJ(X,H3.ipv6Cidr,G.message,Y);break}case"emoji":EJ(X,H3.emoji(),G.message,Y);break;case"ulid":{EJ(X,H3.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{z3(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{EJ(X,H3.base64,G.message,Y);break}}break}case"nanoid":EJ(X,H3.nanoid,G.message,Y);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return X}function Iu0($,Y){return Y.patternStrategy==="escape"?_J9($):$}var wJ9=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function _J9($){let Y="";for(let X=0;X<$.length;X++){if(!wJ9.has($[X]))Y+="\\";Y+=$[X]}return Y}function z3($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function EJ($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:iV4(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=iV4(Y,G)}function iV4($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,Z=!1,K=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(Z){if(J[H].match(/[a-z]/)){if(K)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),K=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],K=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=Z?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(Z&&J[H]==="]")Z=!1;else if(!Z&&J[H]==="[")Z=!0}try{new RegExp(Q)}catch(H){return console.warn(`Could not convert regex pattern at ${Y.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),$.source}return Q}function WA4($,Y){var X,G,J,Q,W,Z;let K={type:"object",additionalProperties:(X=t9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=QA4($.keyType._def,Y);return{...K,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...K,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((Z=$.keyType._def.type._def.checks)==null?void 0:Z.length)){let{type:H,...z}=GA4($.keyType._def,Y);return{...K,propertyNames:z}}return K}function jJ9($,Y){if(Y.mapStrategy==="record")return WA4($,Y);let X=t9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||uW(),G=t9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||uW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function TJ9($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function CJ9(){return{not:uW()}}function SJ9(){return{type:"null"}}var wu0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function kJ9($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in wu0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=wu0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return vJ9($,Y)}var vJ9=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>t9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};function xJ9($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[wu0[$.innerType._def.typeName],"null"]};let X=t9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function yJ9($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function bJ9($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let Z=J[W];if(Z===void 0||Z._def===void 0)continue;let K=fJ9(Z),H=t9(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!K)G.push(W)}if(G.length)X.required=G;let Q=hJ9($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function hJ9($,Y){if($.catchall._def.typeName!=="ZodNever")return t9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function fJ9($){try{return $.isOptional()}catch(Y){return!0}}var gJ9=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return t9($.innerType._def,Y);let G=t9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:uW()},G]}:uW()},mJ9=($,Y)=>{if(Y.pipeStrategy==="input")return t9($.in._def,Y);else if(Y.pipeStrategy==="output")return t9($.out._def,Y);let X=t9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=t9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};function uJ9($,Y){return t9($.type._def,Y)}function pJ9($,Y){let G={type:"array",uniqueItems:!0,items:t9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function dJ9($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>t9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:t9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>t9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function cJ9(){return{not:uW()}}function lJ9(){return uW()}var iJ9=($,Y)=>{return t9($.innerType._def,Y)},nJ9=($,Y,X)=>{switch(Y){case U0.ZodString:return QA4($,X);case U0.ZodNumber:return yJ9($);case U0.ZodObject:return bJ9($,X);case U0.ZodBigInt:return NJ9($);case U0.ZodBoolean:return LJ9();case U0.ZodDate:return JA4($,X);case U0.ZodUndefined:return cJ9();case U0.ZodNull:return SJ9();case U0.ZodArray:return DJ9($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return kJ9($,X);case U0.ZodIntersection:return IJ9($,X);case U0.ZodTuple:return dJ9($,X);case U0.ZodRecord:return WA4($,X);case U0.ZodLiteral:return PJ9($);case U0.ZodEnum:return RJ9($);case U0.ZodNativeEnum:return TJ9($);case U0.ZodNullable:return xJ9($,X);case U0.ZodOptional:return gJ9($,X);case U0.ZodMap:return jJ9($,X);case U0.ZodSet:return pJ9($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return uJ9($,X);case U0.ZodNaN:case U0.ZodNever:return CJ9();case U0.ZodEffects:return MJ9($,X);case U0.ZodAny:return uW();case U0.ZodUnknown:return lJ9();case U0.ZodDefault:return EJ9($,X);case U0.ZodBranded:return GA4($,X);case U0.ZodReadonly:return iJ9($,X);case U0.ZodCatch:return BJ9($,X);case U0.ZodPipeline:return mJ9($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})(Y)}},rJ9=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")};function t9($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let K=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(K!==AJ9)return K}if(J&&!X){let K=aJ9(J,Y);if(K!==void 0)return K}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=nJ9($,$.typeName,Y),Z=typeof W==="function"?t9(W(),Y):W;if(Z)sJ9($,Y,Z);if(Y.postProcess){let K=Y.postProcess(Z,$,Y);return Q.jsonSchema=Z,K}return Q.jsonSchema=Z,Z}var aJ9=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:rJ9(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),uW();return Y.$refStrategy==="seen"?uW():void 0}}},sJ9=($,Y,X)=>{if($.description)X.description=$.description;return X},oJ9=($)=>{let Y=FJ9($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},tJ9=($,Y)=>{var X;let G=oJ9(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var A;return{...H,[z]:(A=t9(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?A:uW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=t9($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:uW(),Z=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(Z!==void 0)W.title=Z;let K=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return K.$schema="http://json-schema.org/draft-07/schema#",K},_u0=Symbol.for("vercel.ai.schema");function N1($){let Y;return()=>{if(Y==null)Y=$();return Y}}function lu($,{validate:Y}={}){return{[_u0]:!0,_type:void 0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function eJ9($){return typeof $==="object"&&$!==null&&_u0 in $&&$[_u0]===!0&&"jsonSchema"in $&&"validate"in $}function GH($){return $==null?lu({properties:{},additionalProperties:!1}):eJ9($)?$:("~standard"in $)?$["~standard"].vendor==="zod"?z1($):$Q9($):$()}function $Q9($){return lu(()=>Cu0($["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(Y)=>{let X=await $["~standard"].validate(Y);return"value"in X?{success:!0,value:X.value}:{success:!1,error:new U3({value:Y,cause:X.issues})}}})}function YQ9($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return lu(()=>tJ9($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function XQ9($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return lu(()=>Cu0($$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function GQ9($){return"_zod"in $}function z1($,Y){if(GQ9($))return XQ9($,Y);else return YQ9($,Y)}async function i5({value:$,schema:Y,context:X}){let G=await DG({value:$,schema:Y,context:X});if(!G.success)throw U3.wrap({value:$,cause:G.error,context:X});return G.value}async function DG({value:$,schema:Y,context:X}){let G=GH(Y);try{if(G.validate==null)return{success:!0,value:$,rawValue:$};let J=await G.validate($);if(J.success)return{success:!0,value:J.value,rawValue:$};return{success:!1,error:U3.wrap({value:$,cause:J.error,context:X}),rawValue:$}}catch(J){return{success:!1,error:U3.wrap({value:$,cause:J,context:X}),rawValue:$}}}async function Su0({text:$,schema:Y}){try{let X=Tu0($);if(Y==null)return X;return i5({value:X,schema:Y})}catch(X){if(mu.isInstance(X)||U3.isInstance(X))throw X;throw new mu({text:$,cause:X})}}async function kQ({text:$,schema:Y}){try{let X=Tu0($);if(Y==null)return{success:!0,value:X,rawValue:X};return await DG({value:X,schema:Y})}catch(X){return{success:!1,error:mu.isInstance(X)?X:new mu({text:$,cause:X}),rawValue:void 0}}}function CT($){try{return Tu0($),!0}catch(Y){return!1}}function g$0({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new ef).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await kQ({text:X,schema:Y}))}}))}async function F9({provider:$,providerOptions:Y,schema:X}){if((Y==null?void 0:Y[$])==null)return;let G=await DG({value:Y[$],schema:X});if(!G.success)throw new x$0({argument:"providerOptions",message:`invalid ${$} provider options`,cause:G.error});return G.value}var JQ9=()=>globalThis.fetch,j8=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>ZA4({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),ST=async({url:$,headers:Y,formData:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>ZA4({url:$,headers:Y,body:{content:X,values:Object.fromEntries(X.entries())},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),ZA4=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=JQ9()})=>{try{let Z=await W($,{method:"POST",headers:pW(Y,`ai-sdk/provider-utils/${eV4}`,f$0()),body:X.content,signal:Q}),K=TT(Z);if(!Z.ok){let H;try{H=await J({response:Z,url:$,requestBodyValues:X.values})}catch(z){if(MV(z)||n8.isInstance(z))throw z;throw new n8({message:"Failed to process error response",cause:z,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}throw H.value}try{return await G({response:Z,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(MV(H)||n8.isInstance(H))throw H}throw new n8({message:"Failed to process successful response",cause:H,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}}catch(Z){throw tV4({error:Z,url:$,requestBodyValues:X.values})}};function iu($){return $}function KA4({id:$,inputSchema:Y}){return({execute:X,outputSchema:G,needsApproval:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K,...H})=>iu({type:"provider",id:$,args:H,inputSchema:Y,outputSchema:G,execute:X,needsApproval:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K})}function O7({id:$,inputSchema:Y,outputSchema:X,supportsDeferredResults:G}){return({execute:J,needsApproval:Q,toModelOutput:W,onInputStart:Z,onInputDelta:K,onInputAvailable:H,...z})=>iu({type:"provider",id:$,args:z,inputSchema:Y,outputSchema:X,execute:J,needsApproval:Q,toModelOutput:W,onInputStart:Z,onInputDelta:K,onInputAvailable:H,supportsDeferredResults:G})}async function S5($){if(typeof $==="function")$=$();return Promise.resolve($)}var e9=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),Z=TT(G);if(W.trim()==="")return{responseHeaders:Z,value:new n8({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let K=await Su0({text:W,schema:$});return{responseHeaders:Z,value:new n8({message:Y(K),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,data:K,isRetryable:X==null?void 0:X(G,K)})}}catch(K){return{responseHeaders:Z,value:new n8({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},Z2=($)=>async({response:Y})=>{let X=TT(Y);if(Y.body==null)throw new BV4({});return{responseHeaders:X,value:g$0({stream:Y.body,schema:$})}},O8=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await kQ({text:J,schema:$}),W=TT(Y);if(!Q.success)throw new n8({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},UA4=()=>async({response:$,url:Y,requestBodyValues:X})=>{let G=TT($);if(!$.body)throw new n8({message:"Response body is empty",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0});try{let J=await $.arrayBuffer();return{responseHeaders:G,value:new Uint8Array(J)}}catch(J){throw new n8({message:"Failed to read response as array buffer",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0,cause:J})}};function kT($){return $==null?void 0:$.replace(/\/$/,"")}function QQ9($){return $!=null&&typeof $[Symbol.asyncIterator]==="function"}async function*HA4({execute:$,input:Y,options:X}){let G=$(Y,X);if(QQ9(G)){let J;for await(let Q of G)J=Q,yield{type:"preliminary",output:Q};yield{type:"final",output:J}}else yield{type:"final",output:await G}}O1();O1();O1();O1();O1();O1();O1();O1();function vT($){return $.replace(/[_-]([a-z])/g,(Y)=>Y[1].toUpperCase())}function WQ9($,Y){let X=vT($);if(X!==$&&(Y==null?void 0:Y[X])!=null)return X;return $}var ZQ9=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),au={errorSchema:ZQ9,errorToMessage:($)=>$.error.message};function KQ9($){var Y,X,G,J,Q,W;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Z=(Y=$.prompt_tokens)!=null?Y:0,K=(X=$.completion_tokens)!=null?X:0,H=(J=(G=$.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?J:0,z=(W=(Q=$.completion_tokens_details)==null?void 0:Q.reasoning_tokens)!=null?W:0;return{inputTokens:{total:Z,noCache:Z-H,cacheRead:H,cacheWrite:void 0},outputTokens:{total:K,text:K-z,reasoning:z},raw:$}}function nu($){var Y,X;return(X=(Y=$==null?void 0:$.providerOptions)==null?void 0:Y.openaiCompatible)!=null?X:{}}function UQ9($){switch($){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function HQ9($){var Y,X,G;let J=[];for(let{role:Q,content:W,...Z}of $){let K=nu({...Z});switch(Q){case"system":{J.push({role:"system",content:W,...K});break}case"user":{if(W.length===1&&W[0].type==="text"){J.push({role:"user",content:W[0].text,...nu(W[0])});break}J.push({role:"user",content:W.map((H)=>{var z;let V=nu(H);switch(H.type){case"text":return{type:"text",text:H.text,...V};case"file":{if(H.mediaType.startsWith("image/")){let A=H.mediaType==="image/*"?"image/jpeg":H.mediaType;return{type:"image_url",image_url:{url:H.data instanceof URL?H.data.toString():`data:${A};base64,${W2(H.data)}`},...V}}if(H.mediaType.startsWith("audio/")){if(H.data instanceof URL)throw new l5({functionality:"audio file parts with URLs"});let A=UQ9(H.mediaType);if(A===null)throw new l5({functionality:`audio media type ${H.mediaType}`});return{type:"input_audio",input_audio:{data:W2(H.data),format:A},...V}}if(H.mediaType==="application/pdf"){if(H.data instanceof URL)throw new l5({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(z=H.filename)!=null?z:"document.pdf",file_data:`data:application/pdf;base64,${W2(H.data)}`},...V}}if(H.mediaType.startsWith("text/"))return{type:"text",text:H.data instanceof URL?H.data.toString():typeof H.data==="string"?new TextDecoder().decode(RJ(H.data)):new TextDecoder().decode(H.data),...V};throw new l5({functionality:`file part media type ${H.mediaType}`})}}}),...K});break}case"assistant":{let H="",z="",V=[];for(let A of W){let F=nu(A);switch(A.type){case"text":{H+=A.text;break}case"reasoning":{z+=A.text;break}case"tool-call":{let N=(X=(Y=A.providerOptions)==null?void 0:Y.google)==null?void 0:X.thoughtSignature;V.push({id:A.toolCallId,type:"function",function:{name:A.toolName,arguments:JSON.stringify(A.input)},...F,...N?{extra_content:{google:{thought_signature:String(N)}}}:{}});break}}}J.push({role:"assistant",content:V.length>0?H||null:H,...z.length>0?{reasoning_content:z}:{},tool_calls:V.length>0?V:void 0,...K});break}case"tool":{for(let H of W){if(H.type==="tool-approval-response")continue;let z=H.output,V;switch(z.type){case"text":case"error-text":V=z.value;break;case"execution-denied":V=(G=z.reason)!=null?G:"Tool execution denied.";break;case"content":case"json":case"error-json":V=JSON.stringify(z.value);break}let A=nu(H);J.push({role:"tool",tool_call_id:H.toolCallId,content:V,...A})}break}default:throw Error(`Unsupported role: ${Q}`)}}return J}function zA4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function VA4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var ru=U.object({user:U.string().optional(),reasoningEffort:U.string().optional(),textVerbosity:U.string().optional(),strictJsonSchema:U.boolean().optional()});function zQ9({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)if(Q.type==="provider")X.push({type:"unsupported",feature:`provider-defined tool ${Q.id}`});else G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema,...Q.strict!=null?{strict:Q.strict}:{}}});if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":case"required":return{tools:G,toolChoice:J,toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new l5({functionality:`tool choice type: ${J}`})}}var VQ9=class{constructor($,Y){this.specificationVersion="v3";var X,G;this.modelId=$,this.config=Y;let J=(X=Y.errorStructure)!=null?X:au;this.chunkSchema=DQ9(J.errorSchema),this.failedResponseHandler=e9(J),this.supportsStructuredOutputs=(G=Y.supportsStructuredOutputs)!=null?G:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}transformRequestBody($){var Y,X,G;return(G=(X=(Y=this.config).transformRequestBody)==null?void 0:X.call(Y,$))!=null?G:$}convertUsage($){var Y,X,G;return(G=(X=(Y=this.config).convertUsage)==null?void 0:X.call(Y,$))!=null?G:KQ9($)}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,providerOptions:Z,stopSequences:K,responseFormat:H,seed:z,toolChoice:V,tools:A}){var F,N,D,L,B;let O=[],E=await F9({provider:"openai-compatible",providerOptions:Z,schema:ru});if(E!=null)O.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let M=Object.assign(E!=null?E:{},(F=await F9({provider:"openaiCompatible",providerOptions:Z,schema:ru}))!=null?F:{},(N=await F9({provider:this.providerOptionsName,providerOptions:Z,schema:ru}))!=null?N:{},(D=await F9({provider:vT(this.providerOptionsName),providerOptions:Z,schema:ru}))!=null?D:{}),R=(L=M==null?void 0:M.strictJsonSchema)!=null?L:!0;if(J!=null)O.push({type:"unsupported",feature:"topK"});if((H==null?void 0:H.type)==="json"&&H.schema!=null&&!this.supportsStructuredOutputs)O.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:q,toolChoice:w,toolWarnings:I}=zQ9({tools:A,toolChoice:V});return{metadataKey:WQ9(this.providerOptionsName,Z),args:{model:this.modelId,user:M.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(H==null?void 0:H.type)==="json"?this.supportsStructuredOutputs===!0&&H.schema!=null?{type:"json_schema",json_schema:{schema:H.schema,strict:R,name:(B=H.name)!=null?B:"response",description:H.description}}:{type:"json_object"}:void 0,stop:K,seed:z,...Object.fromEntries(Object.entries({...Z==null?void 0:Z[this.providerOptionsName],...Z==null?void 0:Z[vT(this.providerOptionsName)]}).filter(([_])=>!Object.keys(ru.shape).includes(_))),reasoning_effort:M.reasoningEffort,verbosity:M.textVerbosity,messages:HQ9($),tools:q,tool_choice:w},warnings:[...O,...I]}}async doGenerate($){var Y,X,G,J,Q,W,Z,K;let{args:H,warnings:z,metadataKey:V}=await this.getArgs({...$}),A=this.transformRequestBody(H),F=JSON.stringify(A),{responseHeaders:N,value:D,rawValue:L}=await j8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:A,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O8(AQ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),B=D.choices[0],O=[],E=B.message.content;if(E!=null&&E.length>0)O.push({type:"text",text:E});let M=(Y=B.message.reasoning_content)!=null?Y:B.message.reasoning;if(M!=null&&M.length>0)O.push({type:"reasoning",text:M});if(B.message.tool_calls!=null)for(let w of B.message.tool_calls){let I=(G=(X=w.extra_content)==null?void 0:X.google)==null?void 0:G.thought_signature;O.push({type:"tool-call",toolCallId:(J=w.id)!=null?J:Y7(),toolName:w.function.name,input:w.function.arguments,...I?{providerMetadata:{[V]:{thoughtSignature:I}}}:{}})}let R={[V]:{},...await((W=(Q=this.config.metadataExtractor)==null?void 0:Q.extractMetadata)==null?void 0:W.call(Q,{parsedBody:L}))},q=(Z=D.usage)==null?void 0:Z.completion_tokens_details;if((q==null?void 0:q.accepted_prediction_tokens)!=null)R[V].acceptedPredictionTokens=q==null?void 0:q.accepted_prediction_tokens;if((q==null?void 0:q.rejected_prediction_tokens)!=null)R[V].rejectedPredictionTokens=q==null?void 0:q.rejected_prediction_tokens;return{content:O,finishReason:{unified:VA4(B.finish_reason),raw:(K=B.finish_reason)!=null?K:void 0},usage:this.convertUsage(D.usage),providerMetadata:R,request:{body:F},response:{...zA4(D),headers:N,body:L},warnings:z}}async doStream($){var Y;let{args:X,warnings:G,metadataKey:J}=await this.getArgs({...$}),Q=this.transformRequestBody({...X,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),W=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:Z,value:K}=await j8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:Q,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:Z2(this.chunkSchema),abortSignal:$.abortSignal,fetch:this.config.fetch}),H=[],z={unified:"other",raw:void 0},V=void 0,A=!0,F=J,N=!1,D=!1,L=(B)=>this.convertUsage(B);return{stream:K.pipeThrough(new TransformStream({start(B){B.enqueue({type:"stream-start",warnings:G})},transform(B,O){var E,M,R,q,w,I,P,_,C,k,S,T,v,x,y,d,u,b;if($.includeRawChunks)O.enqueue({type:"raw",rawValue:B.rawValue});if(!B.success){z={unified:"error",raw:void 0},O.enqueue({type:"error",error:B.error});return}if(W==null||W.processChunk(B.rawValue),"error"in B.value){z={unified:"error",raw:void 0},O.enqueue({type:"error",error:B.value.error.message});return}let g=B.value;if(A)A=!1,O.enqueue({type:"response-metadata",...zA4(g)});if(g.usage!=null)V=g.usage;let p=g.choices[0];if((p==null?void 0:p.finish_reason)!=null)z={unified:VA4(p.finish_reason),raw:(E=p.finish_reason)!=null?E:void 0};if((p==null?void 0:p.delta)==null)return;let h=p.delta,n=(M=h.reasoning_content)!=null?M:h.reasoning;if(n){if(!N)O.enqueue({type:"reasoning-start",id:"reasoning-0"}),N=!0;O.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:n})}if(h.content){if(N)O.enqueue({type:"reasoning-end",id:"reasoning-0"}),N=!1;if(!D)O.enqueue({type:"text-start",id:"txt-0"}),D=!0;O.enqueue({type:"text-delta",id:"txt-0",delta:h.content})}if(h.tool_calls!=null){if(N)O.enqueue({type:"reasoning-end",id:"reasoning-0"}),N=!1;for(let t of h.tool_calls){let s=(R=t.index)!=null?R:H.length;if(H[s]==null){if(t.id==null)throw new zM({data:t,message:"Expected 'id' to be a string."});if(((q=t.function)==null?void 0:q.name)==null)throw new zM({data:t,message:"Expected 'function.name' to be a string."});O.enqueue({type:"tool-input-start",id:t.id,toolName:t.function.name}),H[s]={id:t.id,type:"function",function:{name:t.function.name,arguments:(w=t.function.arguments)!=null?w:""},hasFinished:!1,thoughtSignature:(_=(P=(I=t.extra_content)==null?void 0:I.google)==null?void 0:P.thought_signature)!=null?_:void 0};let X0=H[s];if(((C=X0.function)==null?void 0:C.name)!=null&&((k=X0.function)==null?void 0:k.arguments)!=null){if(X0.function.arguments.length>0)O.enqueue({type:"tool-input-delta",id:X0.id,delta:X0.function.arguments});if(CT(X0.function.arguments))O.enqueue({type:"tool-input-end",id:X0.id}),O.enqueue({type:"tool-call",toolCallId:(S=X0.id)!=null?S:Y7(),toolName:X0.function.name,input:X0.function.arguments,...X0.thoughtSignature?{providerMetadata:{[F]:{thoughtSignature:X0.thoughtSignature}}}:{}}),X0.hasFinished=!0}continue}let Z0=H[s];if(Z0.hasFinished)continue;if(((T=t.function)==null?void 0:T.arguments)!=null)Z0.function.arguments+=(x=(v=t.function)==null?void 0:v.arguments)!=null?x:"";if(O.enqueue({type:"tool-input-delta",id:Z0.id,delta:(y=t.function.arguments)!=null?y:""}),((d=Z0.function)==null?void 0:d.name)!=null&&((u=Z0.function)==null?void 0:u.arguments)!=null&&CT(Z0.function.arguments))O.enqueue({type:"tool-input-end",id:Z0.id}),O.enqueue({type:"tool-call",toolCallId:(b=Z0.id)!=null?b:Y7(),toolName:Z0.function.name,input:Z0.function.arguments,...Z0.thoughtSignature?{providerMetadata:{[F]:{thoughtSignature:Z0.thoughtSignature}}}:{}}),Z0.hasFinished=!0}}},flush(B){var O,E,M,R,q;if(N)B.enqueue({type:"reasoning-end",id:"reasoning-0"});if(D)B.enqueue({type:"text-end",id:"txt-0"});for(let I of H.filter((P)=>!P.hasFinished))B.enqueue({type:"tool-input-end",id:I.id}),B.enqueue({type:"tool-call",toolCallId:(O=I.id)!=null?O:Y7(),toolName:I.function.name,input:I.function.arguments,...I.thoughtSignature?{providerMetadata:{[F]:{thoughtSignature:I.thoughtSignature}}}:{}});let w={[F]:{},...W==null?void 0:W.buildMetadata()};if(((E=V==null?void 0:V.completion_tokens_details)==null?void 0:E.accepted_prediction_tokens)!=null)w[F].acceptedPredictionTokens=(M=V==null?void 0:V.completion_tokens_details)==null?void 0:M.accepted_prediction_tokens;if(((R=V==null?void 0:V.completion_tokens_details)==null?void 0:R.rejected_prediction_tokens)!=null)w[F].rejectedPredictionTokens=(q=V==null?void 0:V.completion_tokens_details)==null?void 0:q.rejected_prediction_tokens;B.enqueue({type:"finish",finishReason:z,usage:L(V),providerMetadata:w})}})),request:{body:Q},response:{headers:Z}}}},OA4=U.looseObject({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish(),AQ9=U.looseObject({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),function:U.object({name:U.string(),arguments:U.string()}),extra_content:U.object({google:U.object({thought_signature:U.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:U.string().nullish()})),usage:OA4}),FQ9=U.looseObject({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({index:U.number().nullish(),id:U.string().nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()}),extra_content:U.object({google:U.object({thought_signature:U.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:OA4}),DQ9=($)=>U.union([FQ9,$]);function AA4($){var Y,X;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let G=(Y=$.prompt_tokens)!=null?Y:0,J=(X=$.completion_tokens)!=null?X:0;return{inputTokens:{total:G,noCache:G,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:J,text:J,reasoning:void 0},raw:$}}function NQ9({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new Q2({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text;case"tool-call":throw new l5({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new l5({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function FA4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function DA4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var NA4=U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional()}),LQ9=class{constructor($,Y){this.specificationVersion="v3";var X;this.modelId=$,this.config=Y;let G=(X=Y.errorStructure)!=null?X:au;this.chunkSchema=OQ9(G.errorSchema),this.failedResponseHandler=e9(G)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,providerOptions:z,tools:V,toolChoice:A}){var F,N;let D=[],L=Object.assign((F=await F9({provider:this.providerOptionsName,providerOptions:z,schema:NA4}))!=null?F:{},(N=await F9({provider:vT(this.providerOptionsName),providerOptions:z,schema:NA4}))!=null?N:{});if(J!=null)D.push({type:"unsupported",feature:"topK"});if(V==null?void 0:V.length)D.push({type:"unsupported",feature:"tools"});if(A!=null)D.push({type:"unsupported",feature:"toolChoice"});if(K!=null&&K.type!=="text")D.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:B,stopSequences:O}=NQ9({prompt:$}),E=[...O!=null?O:[],...Z!=null?Z:[]];return{args:{model:this.modelId,echo:L.echo,logit_bias:L.logitBias,suffix:L.suffix,user:L.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:H,...z==null?void 0:z[this.providerOptionsName],...z==null?void 0:z[vT(this.providerOptionsName)],prompt:B,stop:E.length>0?E:void 0},warnings:D}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{responseHeaders:G,value:J,rawValue:Q}=await j8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:Y,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O8(BQ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=J.choices[0],Z=[];if(W.text!=null&&W.text.length>0)Z.push({type:"text",text:W.text});return{content:Z,usage:AA4(J.usage),finishReason:{unified:DA4(W.finish_reason),raw:W.finish_reason},request:{body:Y},response:{...FA4(J),headers:G,body:Q},warnings:X}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:J,value:Q}=await j8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:Z2(this.chunkSchema),abortSignal:$.abortSignal,fetch:this.config.fetch}),W={unified:"other",raw:void 0},Z=void 0,K=!0;return{stream:Q.pipeThrough(new TransformStream({start(H){H.enqueue({type:"stream-start",warnings:X})},transform(H,z){var V;if($.includeRawChunks)z.enqueue({type:"raw",rawValue:H.rawValue});if(!H.success){W={unified:"error",raw:void 0},z.enqueue({type:"error",error:H.error});return}let A=H.value;if("error"in A){W={unified:"error",raw:void 0},z.enqueue({type:"error",error:A.error});return}if(K)K=!1,z.enqueue({type:"response-metadata",...FA4(A)}),z.enqueue({type:"text-start",id:"0"});if(A.usage!=null)Z=A.usage;let F=A.choices[0];if((F==null?void 0:F.finish_reason)!=null)W={unified:DA4(F.finish_reason),raw:(V=F.finish_reason)!=null?V:void 0};if((F==null?void 0:F.text)!=null)z.enqueue({type:"text-delta",id:"0",delta:F.text})},flush(H){if(!K)H.enqueue({type:"text-end",id:"0"});H.enqueue({type:"finish",finishReason:W,usage:AA4(Z)})}})),request:{body:G},response:{headers:J}}}},EA4=U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}),BQ9=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string()})),usage:EA4.nullish()}),OQ9=($)=>U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number()})),usage:EA4.nullish()}),$]),ku0=U.object({dimensions:U.number().optional(),user:U.string().optional()}),EQ9=class{constructor($,Y){this.specificationVersion="v3",this.modelId=$,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var $;return($=this.config.maxEmbeddingsPerCall)!=null?$:2048}get supportsParallelCalls(){var $;return($=this.config.supportsParallelCalls)!=null?$:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J,Q,W;let Z=[],K=await F9({provider:"openai-compatible",providerOptions:G,schema:ku0});if(K!=null)Z.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let H=Object.assign(K!=null?K:{},(J=await F9({provider:"openaiCompatible",providerOptions:G,schema:ku0}))!=null?J:{},(Q=await F9({provider:this.providerOptionsName,providerOptions:G,schema:ku0}))!=null?Q:{});if($.length>this.maxEmbeddingsPerCall)throw new y$0({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let{responseHeaders:z,value:V,rawValue:A}=await j8({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:i6(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:H.dimensions,user:H.user},failedResponseHandler:e9((W=this.config.errorStructure)!=null?W:au),successfulResponseHandler:O8(MQ9),abortSignal:X,fetch:this.config.fetch});return{warnings:Z,embeddings:V.data.map((F)=>F.embedding),usage:V.usage?{tokens:V.usage.prompt_tokens}:void 0,providerMetadata:V.providerMetadata,response:{headers:z,body:A}}}},MQ9=U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish(),providerMetadata:U.record(U.string(),U.record(U.string(),U.any())).optional()}),RQ9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}getArgs($){return{...$[this.providerOptionsKey],...$[vT(this.providerOptionsKey)]}}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:Z,files:K,mask:H}){var z,V,A,F,N;let D=[];if(G!=null)D.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(J!=null)D.push({type:"unsupported",feature:"seed"});let L=(A=(V=(z=this.config._internal)==null?void 0:z.currentDate)==null?void 0:V.call(z))!=null?A:new Date,B=this.getArgs(Q);if(K!=null&&K.length>0){let{value:M,responseHeaders:R}=await ST({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:i6(this.config.headers(),W),formData:b$0({model:this.modelId,prompt:$,image:await Promise.all(K.map((q)=>BA4(q))),mask:H!=null?await BA4(H):void 0,n:Y,size:X,...B}),failedResponseHandler:e9((F=this.config.errorStructure)!=null?F:au),successfulResponseHandler:O8(LA4),abortSignal:Z,fetch:this.config.fetch});return{images:M.data.map((q)=>q.b64_json),warnings:D,response:{timestamp:L,modelId:this.modelId,headers:R}}}let{value:O,responseHeaders:E}=await j8({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:i6(this.config.headers(),W),body:{model:this.modelId,prompt:$,n:Y,size:X,...B,response_format:"b64_json"},failedResponseHandler:e9((N=this.config.errorStructure)!=null?N:au),successfulResponseHandler:O8(LA4),abortSignal:Z,fetch:this.config.fetch});return{images:O.data.map((M)=>M.b64_json),warnings:D,response:{timestamp:L,modelId:this.modelId,headers:E}}}},LA4=U.object({data:U.array(U.object({b64_json:U.string()}))});async function BA4($){if($.type==="url")return du($.url);let Y=$.data instanceof Uint8Array?$.data:RJ($.data);return new Blob([Y],{type:$.mediaType})}var qQ9="2.0.47";function V3($){let Y=kT($.baseURL),X=$.name,G={...$.apiKey&&{Authorization:`Bearer ${$.apiKey}`},...$.headers},J=()=>pW(G,`ai-sdk/openai-compatible/${qQ9}`),Q=(A)=>({provider:`${X}.${A}`,url:({path:F})=>{let N=new URL(`${Y}${F}`);if($.queryParams)N.search=new URLSearchParams($.queryParams).toString();return N.toString()},headers:J,fetch:$.fetch}),W=(A)=>Z(A),Z=(A)=>new VQ9(A,{...Q("chat"),includeUsage:$.includeUsage,supportsStructuredOutputs:$.supportsStructuredOutputs,supportedUrls:$.supportedUrls,transformRequestBody:$.transformRequestBody,metadataExtractor:$.metadataExtractor,convertUsage:$.convertUsage}),K=(A)=>new LQ9(A,{...Q("completion"),includeUsage:$.includeUsage}),H=(A)=>new EQ9(A,{...Q("embedding")}),z=(A)=>new RQ9(A,Q("image")),V=(A)=>W(A);return V.specificationVersion="v3",V.languageModel=W,V.chatModel=Z,V.completionModel=K,V.embeddingModel=H,V.textEmbeddingModel=H,V.imageModel=z,V}O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();var gu0=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),A3=e9({errorSchema:gu0,errorToMessage:($)=>$.error.message});function bA4($){let Y=$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),X=$.startsWith("gpt-4")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-nano")&&!$.startsWith("gpt-5-chat")&&!$.startsWith("gpt-5.4-nano")||$.startsWith("o3")||$.startsWith("o4-mini"),G=$.startsWith("o1")||$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),J=$.startsWith("gpt-5.1")||$.startsWith("gpt-5.2")||$.startsWith("gpt-5.3")||$.startsWith("gpt-5.4")||$.startsWith("gpt-5.5");return{supportsFlexProcessing:Y,supportsPriorityProcessing:X,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:J}}function MA4($){var Y,X,G,J,Q,W;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Z=(Y=$.prompt_tokens)!=null?Y:0,K=(X=$.completion_tokens)!=null?X:0,H=(J=(G=$.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?J:0,z=(W=(Q=$.completion_tokens_details)==null?void 0:Q.reasoning_tokens)!=null?W:0;return{inputTokens:{total:Z,noCache:Z-H,cacheRead:H,cacheWrite:void 0},outputTokens:{total:K,text:K-z,reasoning:z},raw:$}}function IQ9($){return JSON.stringify($===void 0?{}:$)}function PQ9({prompt:$,systemMessageMode:Y="system"}){var X;let G=[],J=[];for(let{role:Q,content:W}of $)switch(Q){case"system":{switch(Y){case"system":{G.push({role:"system",content:W});break}case"developer":{G.push({role:"developer",content:W});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(W.length===1&&W[0].type==="text"){G.push({role:"user",content:W[0].text});break}G.push({role:"user",content:W.map((Z,K)=>{var H,z,V;switch(Z.type){case"text":return{type:"text",text:Z.text};case"file":if(Z.mediaType.startsWith("image/")){let A=Z.mediaType==="image/*"?"image/jpeg":Z.mediaType;return{type:"image_url",image_url:{url:Z.data instanceof URL?Z.data.toString():`data:${A};base64,${W2(Z.data)}`,detail:(z=(H=Z.providerOptions)==null?void 0:H.openai)==null?void 0:z.imageDetail}}}else if(Z.mediaType.startsWith("audio/")){if(Z.data instanceof URL)throw new l5({functionality:"audio file parts with URLs"});switch(Z.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:W2(Z.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:W2(Z.data),format:"mp3"}};default:throw new l5({functionality:`audio content parts with media type ${Z.mediaType}`})}}else if(Z.mediaType==="application/pdf"){if(Z.data instanceof URL)throw new l5({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof Z.data==="string"&&Z.data.startsWith("file-")?{file_id:Z.data}:{filename:(V=Z.filename)!=null?V:`part-${K}.pdf`,file_data:`data:application/pdf;base64,${W2(Z.data)}`}}}else throw new l5({functionality:`file part media type ${Z.mediaType}`})}})});break}case"assistant":{let Z="",K=[];for(let H of W)switch(H.type){case"text":{Z+=H.text;break}case"tool-call":{K.push({id:H.toolCallId,type:"function",function:{name:H.toolName,arguments:IQ9(H.input)}});break}}G.push({role:"assistant",content:K.length>0?Z||null:Z,tool_calls:K.length>0?K:void 0});break}case"tool":{for(let Z of W){if(Z.type==="tool-approval-response")continue;let K=Z.output,H;switch(K.type){case"text":case"error-text":H=K.value;break;case"execution-denied":H=(X=K.reason)!=null?X:"Tool execution denied.";break;case"content":case"json":case"error-json":H=JSON.stringify(K.value);break}G.push({role:"tool",tool_call_id:Z.toolCallId,content:H})}break}default:throw Error(`Unsupported role: ${Q}`)}return{messages:G,warnings:J}}function vu0({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X?new Date(X*1000):void 0}}function RA4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var wQ9=N1(()=>z1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}),index:U.number(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}))),_Q9=N1(()=>z1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),type:U.literal("function").nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}).nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish(),index:U.number()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}),gu0]))),jQ9=N1(()=>z1(U.object({logitBias:U.record(U.coerce.number(),U.number()).optional(),logprobs:U.union([U.boolean(),U.number()]).optional(),parallelToolCalls:U.boolean().optional(),user:U.string().optional(),reasoningEffort:U.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:U.number().optional(),store:U.boolean().optional(),metadata:U.record(U.string().max(64),U.string().max(512)).optional(),prediction:U.record(U.string(),U.any()).optional(),serviceTier:U.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:U.boolean().optional(),textVerbosity:U.enum(["low","medium","high"]).optional(),promptCacheKey:U.string().optional(),promptCacheRetention:U.enum(["in_memory","24h"]).optional(),safetyIdentifier:U.string().optional(),systemMessageMode:U.enum(["system","developer","remove"]).optional(),forceReasoning:U.boolean().optional()})));function TQ9({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)switch(Q.type){case"function":G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema,...Q.strict!=null?{strict:Q.strict}:{}}});break;default:X.push({type:"unsupported",feature:`tool type: ${Q.type}`});break}if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":case"required":return{tools:G,toolChoice:J,toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new l5({functionality:`tool choice type: ${J}`})}}var CQ9=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,seed:H,tools:z,toolChoice:V,providerOptions:A}){var F,N,D,L,B;let O=[],E=(F=await F9({provider:"openai",providerOptions:A,schema:jQ9}))!=null?F:{},M=bA4(this.modelId),R=(N=E.forceReasoning)!=null?N:M.isReasoningModel;if(J!=null)O.push({type:"unsupported",feature:"topK"});let{messages:q,warnings:w}=PQ9({prompt:$,systemMessageMode:(D=E.systemMessageMode)!=null?D:R?"developer":M.systemMessageMode});O.push(...w);let I=(L=E.strictJsonSchema)!=null?L:!0,P={model:this.modelId,logit_bias:E.logitBias,logprobs:E.logprobs===!0||typeof E.logprobs==="number"?!0:void 0,top_logprobs:typeof E.logprobs==="number"?E.logprobs:typeof E.logprobs==="boolean"?E.logprobs?0:void 0:void 0,user:E.user,parallel_tool_calls:E.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(K==null?void 0:K.type)==="json"?K.schema!=null?{type:"json_schema",json_schema:{schema:K.schema,strict:I,name:(B=K.name)!=null?B:"response",description:K.description}}:{type:"json_object"}:void 0,stop:Z,seed:H,verbosity:E.textVerbosity,max_completion_tokens:E.maxCompletionTokens,store:E.store,metadata:E.metadata,prediction:E.prediction,reasoning_effort:E.reasoningEffort,service_tier:E.serviceTier,prompt_cache_key:E.promptCacheKey,prompt_cache_retention:E.promptCacheRetention,safety_identifier:E.safetyIdentifier,messages:q};if(R){if(E.reasoningEffort!=="none"||!M.supportsNonReasoningParameters){if(P.temperature!=null)P.temperature=void 0,O.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(P.top_p!=null)P.top_p=void 0,O.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(P.logprobs!=null)P.logprobs=void 0,O.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(P.frequency_penalty!=null)P.frequency_penalty=void 0,O.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(P.presence_penalty!=null)P.presence_penalty=void 0,O.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(P.logit_bias!=null)P.logit_bias=void 0,O.push({type:"other",message:"logitBias is not supported for reasoning models"});if(P.top_logprobs!=null)P.top_logprobs=void 0,O.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(P.max_tokens!=null){if(P.max_completion_tokens==null)P.max_completion_tokens=P.max_tokens;P.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(P.temperature!=null)P.temperature=void 0,O.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(E.serviceTier==="flex"&&!M.supportsFlexProcessing)O.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),P.service_tier=void 0;if(E.serviceTier==="priority"&&!M.supportsPriorityProcessing)O.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),P.service_tier=void 0;let{tools:_,toolChoice:C,toolWarnings:k}=TQ9({tools:z,toolChoice:V});return{args:{...P,tools:_,tool_choice:C},warnings:[...O,...k]}}async doGenerate($){var Y,X,G,J,Q,W,Z;let{args:K,warnings:H}=await this.getArgs($),{responseHeaders:z,value:V,rawValue:A}=await j8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:K,failedResponseHandler:A3,successfulResponseHandler:O8(wQ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),F=V.choices[0],N=[],D=F.message.content;if(D!=null&&D.length>0)N.push({type:"text",text:D});for(let E of(Y=F.message.tool_calls)!=null?Y:[])N.push({type:"tool-call",toolCallId:(X=E.id)!=null?X:Y7(),toolName:E.function.name,input:E.function.arguments});for(let E of(G=F.message.annotations)!=null?G:[])N.push({type:"source",sourceType:"url",id:Y7(),url:E.url_citation.url,title:E.url_citation.title});let L=(J=V.usage)==null?void 0:J.completion_tokens_details,B=(Q=V.usage)==null?void 0:Q.prompt_tokens_details,O={openai:{}};if((L==null?void 0:L.accepted_prediction_tokens)!=null)O.openai.acceptedPredictionTokens=L==null?void 0:L.accepted_prediction_tokens;if((L==null?void 0:L.rejected_prediction_tokens)!=null)O.openai.rejectedPredictionTokens=L==null?void 0:L.rejected_prediction_tokens;if(((W=F.logprobs)==null?void 0:W.content)!=null)O.openai.logprobs=F.logprobs.content;return{content:N,finishReason:{unified:RA4(F.finish_reason),raw:(Z=F.finish_reason)!=null?Z:void 0},usage:MA4(V.usage),request:{body:K},response:{...vu0(V),headers:z,body:A},warnings:H,providerMetadata:O}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await j8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:G,failedResponseHandler:A3,successfulResponseHandler:Z2(_Q9),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],Z={unified:"other",raw:void 0},K=void 0,H=!1,z=!1,V={openai:{}};return{stream:Q.pipeThrough(new TransformStream({start(A){A.enqueue({type:"stream-start",warnings:X})},transform(A,F){var N,D,L,B,O,E,M,R,q,w,I,P,_,C,k,S,T;if($.includeRawChunks)F.enqueue({type:"raw",rawValue:A.rawValue});if(!A.success){Z={unified:"error",raw:void 0},F.enqueue({type:"error",error:A.error});return}let v=A.value;if("error"in v){Z={unified:"error",raw:void 0},F.enqueue({type:"error",error:v.error});return}if(!H){let d=vu0(v);if(Object.values(d).some(Boolean))H=!0,F.enqueue({type:"response-metadata",...vu0(v)})}if(v.usage!=null){if(K=v.usage,((N=v.usage.completion_tokens_details)==null?void 0:N.accepted_prediction_tokens)!=null)V.openai.acceptedPredictionTokens=(D=v.usage.completion_tokens_details)==null?void 0:D.accepted_prediction_tokens;if(((L=v.usage.completion_tokens_details)==null?void 0:L.rejected_prediction_tokens)!=null)V.openai.rejectedPredictionTokens=(B=v.usage.completion_tokens_details)==null?void 0:B.rejected_prediction_tokens}let x=v.choices[0];if((x==null?void 0:x.finish_reason)!=null)Z={unified:RA4(x.finish_reason),raw:x.finish_reason};if(((O=x==null?void 0:x.logprobs)==null?void 0:O.content)!=null)V.openai.logprobs=x.logprobs.content;if((x==null?void 0:x.delta)==null)return;let y=x.delta;if(y.content!=null){if(!z)F.enqueue({type:"text-start",id:"0"}),z=!0;F.enqueue({type:"text-delta",id:"0",delta:y.content})}if(y.tool_calls!=null)for(let d of y.tool_calls){let u=d.index;if(W[u]==null){if(d.type!=null&&d.type!=="function")throw new zM({data:d,message:"Expected 'function' type."});if(d.id==null)throw new zM({data:d,message:"Expected 'id' to be a string."});if(((E=d.function)==null?void 0:E.name)==null)throw new zM({data:d,message:"Expected 'function.name' to be a string."});F.enqueue({type:"tool-input-start",id:d.id,toolName:d.function.name}),W[u]={id:d.id,type:"function",function:{name:d.function.name,arguments:(M=d.function.arguments)!=null?M:""},hasFinished:!1};let g=W[u];if(((R=g.function)==null?void 0:R.name)!=null&&((q=g.function)==null?void 0:q.arguments)!=null){if(g.function.arguments.length>0)F.enqueue({type:"tool-input-delta",id:g.id,delta:g.function.arguments});if(CT(g.function.arguments))F.enqueue({type:"tool-input-end",id:g.id}),F.enqueue({type:"tool-call",toolCallId:(w=g.id)!=null?w:Y7(),toolName:g.function.name,input:g.function.arguments}),g.hasFinished=!0}continue}let b=W[u];if(b.hasFinished)continue;if(((I=d.function)==null?void 0:I.arguments)!=null)b.function.arguments+=(_=(P=d.function)==null?void 0:P.arguments)!=null?_:"";if(F.enqueue({type:"tool-input-delta",id:b.id,delta:(C=d.function.arguments)!=null?C:""}),((k=b.function)==null?void 0:k.name)!=null&&((S=b.function)==null?void 0:S.arguments)!=null&&CT(b.function.arguments))F.enqueue({type:"tool-input-end",id:b.id}),F.enqueue({type:"tool-call",toolCallId:(T=b.id)!=null?T:Y7(),toolName:b.function.name,input:b.function.arguments}),b.hasFinished=!0}if(y.annotations!=null)for(let d of y.annotations)F.enqueue({type:"source",sourceType:"url",id:Y7(),url:d.url_citation.url,title:d.url_citation.title})},flush(A){if(z)A.enqueue({type:"text-end",id:"0"});A.enqueue({type:"finish",finishReason:Z,usage:MA4(K),...V!=null?{providerMetadata:V}:{}})}})),request:{body:G},response:{headers:J}}}};function qA4($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Q=(Y=$.prompt_tokens)!=null?Y:0,W=(X=$.completion_tokens)!=null?X:0;return{inputTokens:{total:(G=$.prompt_tokens)!=null?G:void 0,noCache:Q,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=$.completion_tokens)!=null?J:void 0,text:W,reasoning:void 0},raw:$}}function SQ9({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new Q2({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((Z)=>{switch(Z.type){case"text":return Z.text;case"tool-call":throw new l5({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new l5({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function IA4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function PA4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var kQ9=N1(()=>z1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}))),vQ9=N1(()=>z1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}),gu0]))),wA4=N1(()=>z1(U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional(),logprobs:U.union([U.boolean(),U.number()]).optional()}))),xQ9=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={},this.modelId=$,this.config=Y}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:Z,responseFormat:K,tools:H,toolChoice:z,seed:V,providerOptions:A}){let F=[],N={...await F9({provider:"openai",providerOptions:A,schema:wA4}),...await F9({provider:this.providerOptionsName,providerOptions:A,schema:wA4})};if(J!=null)F.push({type:"unsupported",feature:"topK"});if(H==null?void 0:H.length)F.push({type:"unsupported",feature:"tools"});if(z!=null)F.push({type:"unsupported",feature:"toolChoice"});if(K!=null&&K.type!=="text")F.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:D,stopSequences:L}=SQ9({prompt:$}),B=[...L!=null?L:[],...Z!=null?Z:[]];return{args:{model:this.modelId,echo:N.echo,logit_bias:N.logitBias,logprobs:(N==null?void 0:N.logprobs)===!0?0:(N==null?void 0:N.logprobs)===!1?void 0:N==null?void 0:N.logprobs,suffix:N.suffix,user:N.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:V,prompt:D,stop:B.length>0?B:void 0},warnings:F}}async doGenerate($){var Y;let{args:X,warnings:G}=await this.getArgs($),{responseHeaders:J,value:Q,rawValue:W}=await j8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:X,failedResponseHandler:A3,successfulResponseHandler:O8(kQ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),Z=Q.choices[0],K={openai:{}};if(Z.logprobs!=null)K.openai.logprobs=Z.logprobs;return{content:[{type:"text",text:Z.text}],usage:qA4(Q.usage),finishReason:{unified:PA4(Z.finish_reason),raw:(Y=Z.finish_reason)!=null?Y:void 0},request:{body:X},response:{...IA4(Q),headers:J,body:W},providerMetadata:K,warnings:G}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await j8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:G,failedResponseHandler:A3,successfulResponseHandler:Z2(vQ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),W={unified:"other",raw:void 0},Z={openai:{}},K=void 0,H=!0;return{stream:Q.pipeThrough(new TransformStream({start(z){z.enqueue({type:"stream-start",warnings:X})},transform(z,V){if($.includeRawChunks)V.enqueue({type:"raw",rawValue:z.rawValue});if(!z.success){W={unified:"error",raw:void 0},V.enqueue({type:"error",error:z.error});return}let A=z.value;if("error"in A){W={unified:"error",raw:void 0},V.enqueue({type:"error",error:A.error});return}if(H)H=!1,V.enqueue({type:"response-metadata",...IA4(A)}),V.enqueue({type:"text-start",id:"0"});if(A.usage!=null)K=A.usage;let F=A.choices[0];if((F==null?void 0:F.finish_reason)!=null)W={unified:PA4(F.finish_reason),raw:F.finish_reason};if((F==null?void 0:F.logprobs)!=null)Z.openai.logprobs=F.logprobs;if((F==null?void 0:F.text)!=null&&F.text.length>0)V.enqueue({type:"text-delta",id:"0",delta:F.text})},flush(z){if(!H)z.enqueue({type:"text-end",id:"0"});z.enqueue({type:"finish",finishReason:W,providerMetadata:Z,usage:qA4(K)})}})),request:{body:G},response:{headers:J}}}},yQ9=N1(()=>z1(U.object({dimensions:U.number().optional(),user:U.string().optional()}))),bQ9=N1(()=>z1(U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish()}))),hQ9=class{constructor($,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;if($.length>this.maxEmbeddingsPerCall)throw new y$0({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=(J=await F9({provider:"openai",providerOptions:G,schema:yQ9}))!=null?J:{},{responseHeaders:W,value:Z,rawValue:K}=await j8({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:i6(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:Q.dimensions,user:Q.user},failedResponseHandler:A3,successfulResponseHandler:O8(bQ9),abortSignal:X,fetch:this.config.fetch});return{warnings:[],embeddings:Z.data.map((H)=>H.embedding),usage:Z.usage?{tokens:Z.usage.prompt_tokens}:void 0,response:{headers:W,body:K}}}},_A4=N1(()=>z1(U.object({created:U.number().nullish(),data:U.array(U.object({b64_json:U.string(),revised_prompt:U.string().nullish()})),background:U.string().nullish(),output_format:U.string().nullish(),size:U.string().nullish(),quality:U.string().nullish(),usage:U.object({input_tokens:U.number().nullish(),output_tokens:U.number().nullish(),total_tokens:U.number().nullish(),input_tokens_details:U.object({image_tokens:U.number().nullish(),text_tokens:U.number().nullish()}).nullish()}).nullish()}))),fQ9={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10,"gpt-image-2":10,"chatgpt-image-latest":10},gQ9=["chatgpt-image-","gpt-image-1-mini","gpt-image-1.5","gpt-image-1","gpt-image-2"];function mQ9($){return gQ9.some((Y)=>$.startsWith(Y))}var mu0=U.object({quality:U.enum(["standard","hd","low","medium","high","auto"]).optional(),background:U.enum(["transparent","opaque","auto"]).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),user:U.string().optional()}),ZF7=N1(()=>z1(mu0)),uQ9=N1(()=>z1(mu0.extend({style:U.enum(["vivid","natural"]).optional(),moderation:U.enum(["auto","low"]).optional()}))),pQ9=N1(()=>z1(mu0.extend({inputFidelity:U.enum(["high","low"]).optional()}))),dQ9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get maxImagesPerCall(){var $;return($=fQ9[this.modelId])!=null?$:1}get provider(){return this.config.provider}async doGenerate({prompt:$,files:Y,mask:X,n:G,size:J,aspectRatio:Q,seed:W,providerOptions:Z,headers:K,abortSignal:H}){var z,V,A,F,N,D,L,B,O,E,M;let R=[];if(Q!=null)R.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(W!=null)R.push({type:"unsupported",feature:"seed"});let q=(A=(V=(z=this.config._internal)==null?void 0:z.currentDate)==null?void 0:V.call(z))!=null?A:new Date;if(Y!=null){let _=(F=await F9({provider:"openai",providerOptions:Z,schema:pQ9}))!=null?F:{},{value:C,responseHeaders:k}=await ST({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:i6(this.config.headers(),K),formData:b$0({model:this.modelId,prompt:$,image:await Promise.all(Y.map((S)=>S.type==="file"?new Blob([S.data instanceof Uint8Array?new Blob([S.data],{type:S.mediaType}):new Blob([RJ(S.data)],{type:S.mediaType})],{type:S.mediaType}):du(S.url))),mask:X!=null?await cQ9(X):void 0,n:G,size:J,quality:_.quality,background:_.background,output_format:_.outputFormat,output_compression:_.outputCompression,input_fidelity:_.inputFidelity,user:_.user}),failedResponseHandler:A3,successfulResponseHandler:O8(_A4),abortSignal:H,fetch:this.config.fetch});return{images:C.data.map((S)=>S.b64_json),warnings:R,usage:C.usage!=null?{inputTokens:(N=C.usage.input_tokens)!=null?N:void 0,outputTokens:(D=C.usage.output_tokens)!=null?D:void 0,totalTokens:(L=C.usage.total_tokens)!=null?L:void 0}:void 0,response:{timestamp:q,modelId:this.modelId,headers:k},providerMetadata:{openai:{images:C.data.map((S,T)=>{var v,x,y,d,u,b;return{...S.revised_prompt?{revisedPrompt:S.revised_prompt}:{},created:(v=C.created)!=null?v:void 0,size:(x=C.size)!=null?x:void 0,quality:(y=C.quality)!=null?y:void 0,background:(d=C.background)!=null?d:void 0,outputFormat:(u=C.output_format)!=null?u:void 0,...jA4((b=C.usage)==null?void 0:b.input_tokens_details,T,C.data.length)}})}}}}let w=(B=await F9({provider:"openai",providerOptions:Z,schema:uQ9}))!=null?B:{},{value:I,responseHeaders:P}=await j8({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:i6(this.config.headers(),K),body:{model:this.modelId,prompt:$,n:G,size:J,quality:w.quality,style:w.style,background:w.background,moderation:w.moderation,output_format:w.outputFormat,output_compression:w.outputCompression,user:w.user,...!mQ9(this.modelId)?{response_format:"b64_json"}:{}},failedResponseHandler:A3,successfulResponseHandler:O8(_A4),abortSignal:H,fetch:this.config.fetch});return{images:I.data.map((_)=>_.b64_json),warnings:R,usage:I.usage!=null?{inputTokens:(O=I.usage.input_tokens)!=null?O:void 0,outputTokens:(E=I.usage.output_tokens)!=null?E:void 0,totalTokens:(M=I.usage.total_tokens)!=null?M:void 0}:void 0,response:{timestamp:q,modelId:this.modelId,headers:P},providerMetadata:{openai:{images:I.data.map((_,C)=>{var k,S,T,v,x,y;return{..._.revised_prompt?{revisedPrompt:_.revised_prompt}:{},created:(k=I.created)!=null?k:void 0,size:(S=I.size)!=null?S:void 0,quality:(T=I.quality)!=null?T:void 0,background:(v=I.background)!=null?v:void 0,outputFormat:(x=I.output_format)!=null?x:void 0,...jA4((y=I.usage)==null?void 0:y.input_tokens_details,C,I.data.length)}})}}}}};function jA4($,Y,X){if($==null)return{};let G={};if($.image_tokens!=null){let J=Math.floor($.image_tokens/X),Q=$.image_tokens-J*(X-1);G.imageTokens=Y===X-1?Q:J}if($.text_tokens!=null){let J=Math.floor($.text_tokens/X),Q=$.text_tokens-J*(X-1);G.textTokens=Y===X-1?Q:J}return G}async function cQ9($){if(!$)return;if($.type==="url")return du($.url);let Y=$.data instanceof Uint8Array?$.data:RJ($.data);return new Blob([Y],{type:$.mediaType})}var hA4=N1(()=>z1(U.object({callId:U.string(),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}))),fA4=N1(()=>z1(U.object({status:U.enum(["completed","failed"]),output:U.string().optional()}))),HF7=N1(()=>z1(U.object({}))),lQ9=O7({id:"openai.apply_patch",inputSchema:hA4,outputSchema:fA4}),iQ9=lQ9,nQ9=N1(()=>z1(U.object({code:U.string().nullish(),containerId:U.string()}))),rQ9=N1(()=>z1(U.object({outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullish()}))),aQ9=N1(()=>z1(U.object({container:U.union([U.string(),U.object({fileIds:U.array(U.string()).optional()})]).optional()}))),sQ9=O7({id:"openai.code_interpreter",inputSchema:nQ9,outputSchema:rQ9}),oQ9=($={})=>{return sQ9($)},tQ9=N1(()=>z1(U.object({name:U.string(),description:U.string().optional(),format:U.union([U.object({type:U.literal("grammar"),syntax:U.enum(["regex","lark"]),definition:U.string()}),U.object({type:U.literal("text")})]).optional()}))),eQ9=N1(()=>z1(U.string())),$W9=KA4({id:"openai.custom",inputSchema:eQ9}),YW9=($)=>$W9($),gA4=U.object({key:U.string(),type:U.enum(["eq","ne","gt","gte","lt","lte","in","nin"]),value:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())])}),mA4=U.object({type:U.enum(["and","or"]),filters:U.array(U.union([gA4,U.lazy(()=>mA4)]))}),XW9=N1(()=>z1(U.object({vectorStoreIds:U.array(U.string()),maxNumResults:U.number().optional(),ranking:U.object({ranker:U.string().optional(),scoreThreshold:U.number().optional()}).optional(),filters:U.union([gA4,mA4]).optional()}))),GW9=N1(()=>z1(U.object({queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),fileId:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullable()}))),JW9=O7({id:"openai.file_search",inputSchema:U.object({}),outputSchema:GW9}),QW9=N1(()=>z1(U.object({background:U.enum(["auto","opaque","transparent"]).optional(),inputFidelity:U.enum(["low","high"]).optional(),inputImageMask:U.object({fileId:U.string().optional(),imageUrl:U.string().optional()}).optional(),model:U.string().optional(),moderation:U.enum(["auto"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),partialImages:U.number().int().min(0).max(3).optional(),quality:U.enum(["auto","low","medium","high"]).optional(),size:U.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict())),WW9=N1(()=>z1(U.object({}))),ZW9=N1(()=>z1(U.object({result:U.string()}))),KW9=O7({id:"openai.image_generation",inputSchema:WW9,outputSchema:ZW9}),UW9=($={})=>{return KW9($)},uA4=N1(()=>z1(U.object({action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeoutMs:U.number().optional(),user:U.string().optional(),workingDirectory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}))),pA4=N1(()=>z1(U.object({output:U.string()}))),HW9=O7({id:"openai.local_shell",inputSchema:uA4,outputSchema:pA4}),dA4=N1(()=>z1(U.object({action:U.object({commands:U.array(U.string()),timeoutMs:U.number().optional(),maxOutputLength:U.number().optional()})}))),yu0=N1(()=>z1(U.object({output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exitCode:U.number()})])}))}))),zW9=U.array(U.discriminatedUnion("type",[U.object({type:U.literal("skillReference"),skillId:U.string(),version:U.string().optional()}),U.object({type:U.literal("inline"),name:U.string(),description:U.string(),source:U.object({type:U.literal("base64"),mediaType:U.literal("application/zip"),data:U.string()})})])).optional(),VW9=N1(()=>z1(U.object({environment:U.union([U.object({type:U.literal("containerAuto"),fileIds:U.array(U.string()).optional(),memoryLimit:U.enum(["1g","4g","16g","64g"]).optional(),networkPolicy:U.discriminatedUnion("type",[U.object({type:U.literal("disabled")}),U.object({type:U.literal("allowlist"),allowedDomains:U.array(U.string()),domainSecrets:U.array(U.object({domain:U.string(),name:U.string(),value:U.string()})).optional()})]).optional(),skills:zW9}),U.object({type:U.literal("containerReference"),containerId:U.string()}),U.object({type:U.literal("local").optional(),skills:U.array(U.object({name:U.string(),description:U.string(),path:U.string()})).optional()})]).optional()}))),AW9=O7({id:"openai.shell",inputSchema:dA4,outputSchema:yu0}),FW9=N1(()=>z1(U.object({execution:U.enum(["server","client"]).optional(),description:U.string().optional(),parameters:U.record(U.string(),U.unknown()).optional()}))),bu0=N1(()=>z1(U.object({arguments:U.unknown().optional(),call_id:U.string().nullish()}))),hu0=N1(()=>z1(U.object({tools:U.array(U.record(U.string(),U.unknown()))}))),DW9=O7({id:"openai.tool_search",inputSchema:bu0,outputSchema:hu0}),NW9=($={})=>DW9($),LW9=N1(()=>z1(U.object({externalWebAccess:U.boolean().optional(),filters:U.object({allowedDomains:U.array(U.string()).optional()}).optional(),searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),BW9=N1(()=>z1(U.object({}))),OW9=N1(()=>z1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).optional()}))),EW9=O7({id:"openai.web_search",inputSchema:BW9,outputSchema:OW9}),MW9=($={})=>EW9($),RW9=N1(()=>z1(U.object({searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),qW9=N1(()=>z1(U.object({}))),IW9=N1(()=>z1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional()}))),PW9=O7({id:"openai.web_search_preview",inputSchema:qW9,outputSchema:IW9}),fu0=U.lazy(()=>U.union([U.string(),U.number(),U.boolean(),U.null(),U.array(fu0),U.record(U.string(),fu0)])),wW9=N1(()=>z1(U.object({serverLabel:U.string(),allowedTools:U.union([U.array(U.string()),U.object({readOnly:U.boolean().optional(),toolNames:U.array(U.string()).optional()})]).optional(),authorization:U.string().optional(),connectorId:U.string().optional(),headers:U.record(U.string(),U.string()).optional(),requireApproval:U.union([U.enum(["always","never"]),U.object({never:U.object({toolNames:U.array(U.string()).optional()}).optional()})]).optional(),serverDescription:U.string().optional(),serverUrl:U.string().optional()}).refine(($)=>$.serverUrl!=null||$.connectorId!=null,"One of serverUrl or connectorId must be provided."))),_W9=N1(()=>z1(U.object({}))),jW9=N1(()=>z1(U.object({type:U.literal("call"),serverLabel:U.string(),name:U.string(),arguments:U.string(),output:U.string().nullish(),error:U.union([U.string(),fu0]).optional()}))),TW9=O7({id:"openai.mcp",inputSchema:_W9,outputSchema:jW9}),CW9=($)=>TW9($),SW9={applyPatch:iQ9,customTool:YW9,codeInterpreter:oQ9,fileSearch:JW9,imageGeneration:UW9,localShell:HW9,shell:AW9,webSearchPreview:PW9,webSearch:MW9,mcp:CW9,toolSearch:NW9};function TA4($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let{input_tokens:Q,output_tokens:W}=$,Z=(X=(Y=$.input_tokens_details)==null?void 0:Y.cached_tokens)!=null?X:0,K=(J=(G=$.output_tokens_details)==null?void 0:G.reasoning_tokens)!=null?J:0;return{inputTokens:{total:Q,noCache:Q-Z,cacheRead:Z,cacheWrite:void 0},outputTokens:{total:W,text:W-K,reasoning:K},raw:$}}function kW9($){return JSON.stringify($===void 0?{}:$)}function CA4($,Y){if(!Y)return!1;return Y.some((X)=>$.startsWith(X))}async function vW9({prompt:$,toolNameMapping:Y,systemMessageMode:X,providerOptionsName:G,fileIdPrefixes:J,passThroughUnsupportedFiles:Q=!1,store:W,hasConversation:Z=!1,hasLocalShellTool:K=!1,hasShellTool:H=!1,hasApplyPatchTool:z=!1,customProviderToolNames:V}){var A,F,N,D,L,B,O,E,M,R,q,w,I,P,_,C,k;let S=[],T=[],v=new Set;for(let{role:x,content:y}of $)switch(x){case"system":{switch(X){case"system":{S.push({role:"system",content:y});break}case"developer":{S.push({role:"developer",content:y});break}case"remove":{T.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${X}`)}break}case"user":{S.push({role:"user",content:y.map((d,u)=>{var b,g,p;switch(d.type){case"text":return{type:"input_text",text:d.text};case"file":{let h=d.mediaType==="image/*"?"image/jpeg":d.mediaType;if(h.startsWith("image/"))return{type:"input_image",...d.data instanceof URL?{image_url:d.data.toString()}:typeof d.data==="string"&&CA4(d.data,J)?{file_id:d.data}:{image_url:`data:${h};base64,${W2(d.data)}`},detail:(g=(b=d.providerOptions)==null?void 0:b[G])==null?void 0:g.imageDetail};if(d.data instanceof URL)return{type:"input_file",file_url:d.data.toString()};if(h!=="application/pdf"&&!Q)throw new l5({functionality:`file part media type ${h}`});return{type:"input_file",...typeof d.data==="string"&&CA4(d.data,J)?{file_id:d.data}:{filename:(p=d.filename)!=null?p:h==="application/pdf"?`part-${u}.pdf`:`part-${u}`,file_data:`data:${h};base64,${W2(d.data)}`}}}}})});break}case"assistant":{let d={};for(let u of y)switch(u.type){case"text":{let b=(A=u.providerOptions)==null?void 0:A[G],g=b==null?void 0:b.itemId,p=b==null?void 0:b.phase;if(Z&&g!=null)break;if(W&&g!=null){S.push({type:"item_reference",id:g});break}S.push({role:"assistant",content:[{type:"output_text",text:u.text}],id:g,...p!=null&&{phase:p}});break}case"tool-call":{let b=(B=(N=(F=u.providerOptions)==null?void 0:F[G])==null?void 0:N.itemId)!=null?B:(L=(D=u.providerMetadata)==null?void 0:D[G])==null?void 0:L.itemId;if(Z&&b!=null)break;let g=Y.toProviderToolName(u.toolName);if(g==="tool_search"){if(W&&b!=null){S.push({type:"item_reference",id:b});break}let p=typeof u.input==="string"?await Su0({text:u.input,schema:bu0}):await i5({value:u.input,schema:bu0}),h=p.call_id!=null?"client":"server";S.push({type:"tool_search_call",id:b!=null?b:u.toolCallId,execution:h,call_id:(O=p.call_id)!=null?O:null,status:"completed",arguments:p.arguments});break}if(u.providerExecuted){if(W&&b!=null)S.push({type:"item_reference",id:b});break}if(W&&b!=null){S.push({type:"item_reference",id:b});break}if(K&&g==="local_shell"){let p=await i5({value:u.input,schema:uA4});S.push({type:"local_shell_call",call_id:u.toolCallId,id:b,action:{type:"exec",command:p.action.command,timeout_ms:p.action.timeoutMs,user:p.action.user,working_directory:p.action.workingDirectory,env:p.action.env}});break}if(H&&g==="shell"){let p=await i5({value:u.input,schema:dA4});S.push({type:"shell_call",call_id:u.toolCallId,id:b,status:"completed",action:{commands:p.action.commands,timeout_ms:p.action.timeoutMs,max_output_length:p.action.maxOutputLength}});break}if(z&&g==="apply_patch"){let p=await i5({value:u.input,schema:hA4});S.push({type:"apply_patch_call",call_id:p.callId,id:b,status:"completed",operation:p.operation});break}if(V==null?void 0:V.has(g)){S.push({type:"custom_tool_call",call_id:u.toolCallId,name:g,input:typeof u.input==="string"?u.input:JSON.stringify(u.input),id:b});break}S.push({type:"function_call",call_id:u.toolCallId,name:g,arguments:kW9(u.input),id:b});break}case"tool-result":{if(u.output.type==="execution-denied"||u.output.type==="json"&&typeof u.output.value==="object"&&u.output.value!=null&&"type"in u.output.value&&u.output.value.type==="execution-denied")break;if(Z)break;let b=Y.toProviderToolName(u.toolName);if(b==="tool_search"){let g=(R=(M=(E=u.providerOptions)==null?void 0:E[G])==null?void 0:M.itemId)!=null?R:u.toolCallId;if(W)S.push({type:"item_reference",id:g});else if(u.output.type==="json"){let p=await i5({value:u.output.value,schema:hu0});S.push({type:"tool_search_output",id:g,execution:"server",call_id:null,status:"completed",tools:p.tools})}break}if(H&&b==="shell"){if(u.output.type==="json"){let g=await i5({value:u.output.value,schema:yu0});S.push({type:"shell_call_output",call_id:u.toolCallId,output:g.output.map((p)=>({stdout:p.stdout,stderr:p.stderr,outcome:p.outcome.type==="timeout"?{type:"timeout"}:{type:"exit",exit_code:p.outcome.exitCode}}))})}break}if(W){let g=(I=(w=(q=u.providerOptions)==null?void 0:q[G])==null?void 0:w.itemId)!=null?I:u.toolCallId;S.push({type:"item_reference",id:g})}else T.push({type:"other",message:`Results for OpenAI tool ${u.toolName} are not sent to the API when store is false`});break}case"reasoning":{let b=await F9({provider:G,providerOptions:u.providerOptions,schema:xW9}),g=b==null?void 0:b.itemId;if(Z&&g!=null)break;if(g!=null){let p=d[g];if(W){if(p===void 0)S.push({type:"item_reference",id:g}),d[g]={type:"reasoning",id:g,summary:[]}}else{let h=[];if(u.text.length>0)h.push({type:"summary_text",text:u.text});else if(p!==void 0)T.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(u)}.`});if(p===void 0)d[g]={type:"reasoning",id:g,encrypted_content:b==null?void 0:b.reasoningEncryptedContent,summary:h},S.push(d[g]);else if(p.summary.push(...h),(b==null?void 0:b.reasoningEncryptedContent)!=null)p.encrypted_content=b.reasoningEncryptedContent}}else{let p=b==null?void 0:b.reasoningEncryptedContent;if(p!=null){let h=[];if(u.text.length>0)h.push({type:"summary_text",text:u.text});S.push({type:"reasoning",encrypted_content:p,summary:h})}else T.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(u)}.`})}break}}break}case"tool":{for(let d of y){if(d.type==="tool-approval-response"){let p=d;if(v.has(p.approvalId))continue;if(v.add(p.approvalId),W)S.push({type:"item_reference",id:p.approvalId});S.push({type:"mcp_approval_response",approval_request_id:p.approvalId,approve:p.approved});continue}let u=d.output;if(u.type==="execution-denied"){if((_=(P=u.providerOptions)==null?void 0:P.openai)==null?void 0:_.approvalId)continue}let b=Y.toProviderToolName(d.toolName);if(b==="tool_search"&&u.type==="json"){let p=await i5({value:u.value,schema:hu0});S.push({type:"tool_search_output",execution:"client",call_id:d.toolCallId,status:"completed",tools:p.tools});continue}if(K&&b==="local_shell"&&u.type==="json"){let p=await i5({value:u.value,schema:pA4});S.push({type:"local_shell_call_output",call_id:d.toolCallId,output:p.output});continue}if(H&&b==="shell"&&u.type==="json"){let p=await i5({value:u.value,schema:yu0});S.push({type:"shell_call_output",call_id:d.toolCallId,output:p.output.map((h)=>({stdout:h.stdout,stderr:h.stderr,outcome:h.outcome.type==="timeout"?{type:"timeout"}:{type:"exit",exit_code:h.outcome.exitCode}}))});continue}if(z&&d.toolName==="apply_patch"&&u.type==="json"){let p=await i5({value:u.value,schema:fA4});S.push({type:"apply_patch_call_output",call_id:d.toolCallId,status:p.status,output:p.output});continue}if(V==null?void 0:V.has(b)){let p;switch(u.type){case"text":case"error-text":p=u.value;break;case"execution-denied":p=(C=u.reason)!=null?C:"Tool execution denied.";break;case"json":case"error-json":p=JSON.stringify(u.value);break;case"content":p=u.value.map((h)=>{var n,t,s,Z0,X0;switch(h.type){case"text":return{type:"input_text",text:h.text};case"image-data":return{type:"input_image",image_url:`data:${h.mediaType};base64,${h.data}`,detail:(t=(n=h.providerOptions)==null?void 0:n[G])==null?void 0:t.imageDetail};case"image-url":return{type:"input_image",image_url:h.url,detail:(Z0=(s=h.providerOptions)==null?void 0:s[G])==null?void 0:Z0.imageDetail};case"file-data":return{type:"input_file",filename:(X0=h.filename)!=null?X0:"data",file_data:`data:${h.mediaType};base64,${h.data}`};case"file-url":return{type:"input_file",file_url:h.url};default:T.push({type:"other",message:`unsupported custom tool content part type: ${h.type}`});return}}).filter(cu);break;default:p=""}S.push({type:"custom_tool_call_output",call_id:d.toolCallId,output:p});continue}let g;switch(u.type){case"text":case"error-text":g=u.value;break;case"execution-denied":g=(k=u.reason)!=null?k:"Tool execution denied.";break;case"json":case"error-json":g=JSON.stringify(u.value);break;case"content":g=u.value.map((p)=>{var h,n,t,s,Z0;switch(p.type){case"text":return{type:"input_text",text:p.text};case"image-data":return{type:"input_image",image_url:`data:${p.mediaType};base64,${p.data}`,detail:(n=(h=p.providerOptions)==null?void 0:h[G])==null?void 0:n.imageDetail};case"image-url":return{type:"input_image",image_url:p.url,detail:(s=(t=p.providerOptions)==null?void 0:t[G])==null?void 0:s.imageDetail};case"file-data":return{type:"input_file",filename:(Z0=p.filename)!=null?Z0:"data",file_data:`data:${p.mediaType};base64,${p.data}`};case"file-url":return{type:"input_file",file_url:p.url};default:{T.push({type:"other",message:`unsupported tool content part type: ${p.type}`});return}}}).filter(cu);break}S.push({type:"function_call_output",call_id:d.toolCallId,output:g})}break}default:throw Error(`Unsupported role: ${x}`)}if(!W&&S.some((x)=>("type"in x)&&x.type==="reasoning"&&x.encrypted_content==null))T.push({type:"other",message:"Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."}),S=S.filter((x)=>!("type"in x)||x.type!=="reasoning"||x.encrypted_content!=null);return{input:S,warnings:T}}var xW9=U.object({itemId:U.string().nullish(),reasoningEncryptedContent:U.string().nullish()});function xu0({finishReason:$,hasFunctionCall:Y}){switch($){case void 0:case null:return Y?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return Y?"tool-calls":"other"}}var su=U.lazy(()=>U.union([U.string(),U.number(),U.boolean(),U.null(),U.array(su),U.record(U.string(),su.optional())])),yW9=N1(()=>z1(U.union([U.object({type:U.literal("response.output_text.delta"),item_id:U.string(),delta:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}),U.object({type:U.enum(["response.completed","response.incomplete"]),response:U.object({incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.failed"),response:U.object({error:U.object({code:U.string().nullish(),message:U.string()}).nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).nullish(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.created"),response:U.object({id:U.string(),created_at:U.number(),model:U.string(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.output_item.added"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),namespace:U.string().nullish()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("file_search_call"),id:U.string()}),U.object({type:U.literal("image_generation_call"),id:U.string()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),container_id:U.string(),code:U.string().nullable(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable(),status:U.string()}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string()}),U.object({type:U.literal("mcp_approval_request"),id:U.string()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("custom_tool_call"),id:U.string(),call_id:U.string(),name:U.string(),input:U.string()}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),su.optional()))})])}),U.object({type:U.literal("response.output_item.done"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),status:U.literal("completed"),namespace:U.string().nullish()}),U.object({type:U.literal("custom_tool_call"),id:U.string(),call_id:U.string(),name:U.string(),input:U.string(),status:U.literal("completed")}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.literal("completed")}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),arguments:U.string(),name:U.string(),server_label:U.string(),output:U.string().nullish(),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).nullish(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string(),server_label:U.string(),tools:U.array(U.object({name:U.string(),description:U.string().optional(),input_schema:U.any(),annotations:U.record(U.string(),U.unknown()).optional()})),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).optional()}),U.object({type:U.literal("mcp_approval_request"),id:U.string(),server_label:U.string(),name:U.string(),arguments:U.string(),approval_request_id:U.string().optional()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),su.optional()))})])}),U.object({type:U.literal("response.function_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.custom_tool_call_input.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.image_generation_call.partial_image"),item_id:U.string(),output_index:U.number(),partial_image_b64:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.done"),item_id:U.string(),output_index:U.number(),code:U.string()}),U.object({type:U.literal("response.output_text.annotation.added"),annotation:U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string(),index:U.number()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string(),start_index:U.number(),end_index:U.number()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number()})])}),U.object({type:U.literal("response.reasoning_summary_part.added"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.reasoning_summary_text.delta"),item_id:U.string(),summary_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_summary_part.done"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.apply_patch_call_operation_diff.delta"),item_id:U.string(),output_index:U.number(),delta:U.string(),obfuscation:U.string().nullish()}),U.object({type:U.literal("response.apply_patch_call_operation_diff.done"),item_id:U.string(),output_index:U.number(),diff:U.string()}),U.object({type:U.literal("error"),sequence_number:U.number(),error:U.object({type:U.string(),code:U.string(),message:U.string(),param:U.string().nullish()})}),U.object({type:U.string()}).loose().transform(($)=>({type:"unknown_chunk",message:$.type}))]))),bW9=N1(()=>z1(U.object({id:U.string().optional(),created_at:U.number().optional(),error:U.object({message:U.string(),type:U.string(),param:U.string().nullish(),code:U.string()}).nullish(),model:U.string().optional(),output:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("message"),role:U.literal("assistant"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish(),content:U.array(U.object({type:U.literal("output_text"),text:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish(),annotations:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string(),index:U.number()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string(),start_index:U.number(),end_index:U.number()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number()})]))}))}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("function_call"),call_id:U.string(),name:U.string(),arguments:U.string(),id:U.string(),namespace:U.string().nullish()}),U.object({type:U.literal("custom_tool_call"),call_id:U.string(),name:U.string(),input:U.string(),id:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string().optional()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish(),summary:U.array(U.object({type:U.literal("summary_text"),text:U.string()}))}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),arguments:U.string(),name:U.string(),server_label:U.string(),output:U.string().nullish(),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).nullish(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string(),server_label:U.string(),tools:U.array(U.object({name:U.string(),description:U.string().optional(),input_schema:U.any(),annotations:U.record(U.string(),U.unknown()).optional()})),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).optional()}),U.object({type:U.literal("mcp_approval_request"),id:U.string(),server_label:U.string(),name:U.string(),arguments:U.string(),approval_request_id:U.string().optional()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),su.optional()))})])).optional(),service_tier:U.string().nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).optional()}))),cA4=20,hW9=["o1","o1-2024-12-17","o3","o3-2025-04-16","o3-mini","o3-mini-2025-01-31","o4-mini","o4-mini-2025-04-16","gpt-5","gpt-5-2025-08-07","gpt-5-codex","gpt-5-mini","gpt-5-mini-2025-08-07","gpt-5-nano","gpt-5-nano-2025-08-07","gpt-5-pro","gpt-5-pro-2025-10-06","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex-mini","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-pro","gpt-5.2-codex","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.4","gpt-5.4-2026-03-05","gpt-5.4-mini","gpt-5.4-mini-2026-03-17","gpt-5.4-nano","gpt-5.4-nano-2026-03-17","gpt-5.4-pro","gpt-5.4-pro-2026-03-05","gpt-5.5","gpt-5.5-2026-04-23"],mF7=["gpt-4.1","gpt-4.1-2025-04-14","gpt-4.1-mini","gpt-4.1-mini-2025-04-14","gpt-4.1-nano","gpt-4.1-nano-2025-04-14","gpt-4o","gpt-4o-2024-05-13","gpt-4o-2024-08-06","gpt-4o-2024-11-20","gpt-4o-audio-preview","gpt-4o-audio-preview-2024-12-17","gpt-4o-search-preview","gpt-4o-search-preview-2025-03-11","gpt-4o-mini-search-preview","gpt-4o-mini-search-preview-2025-03-11","gpt-4o-mini","gpt-4o-mini-2024-07-18","gpt-3.5-turbo-0125","gpt-3.5-turbo","gpt-3.5-turbo-1106","gpt-5-chat-latest",...hW9],SA4=N1(()=>z1(U.object({conversation:U.string().nullish(),include:U.array(U.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:U.string().nullish(),logprobs:U.union([U.boolean(),U.number().min(1).max(cA4)]).optional(),maxToolCalls:U.number().nullish(),metadata:U.any().nullish(),parallelToolCalls:U.boolean().nullish(),previousResponseId:U.string().nullish(),promptCacheKey:U.string().nullish(),promptCacheRetention:U.enum(["in_memory","24h"]).nullish(),reasoningEffort:U.string().nullish(),reasoningSummary:U.string().nullish(),safetyIdentifier:U.string().nullish(),serviceTier:U.enum(["auto","flex","priority","default"]).nullish(),store:U.boolean().nullish(),passThroughUnsupportedFiles:U.boolean().optional(),strictJsonSchema:U.boolean().nullish(),textVerbosity:U.enum(["low","medium","high"]).nullish(),truncation:U.enum(["auto","disabled"]).nullish(),user:U.string().nullish(),systemMessageMode:U.enum(["system","developer","remove"]).optional(),forceReasoning:U.boolean().optional(),allowedTools:U.object({toolNames:U.array(U.string()).min(1),mode:U.enum(["auto","required"]).optional()}).optional()})));async function fW9({tools:$,toolChoice:Y,allowedTools:X,toolNameMapping:G,customProviderToolNames:J}){var Q,W,Z;$=($==null?void 0:$.length)?$:void 0;let K=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:K};let H=[],z=J!=null?J:new Set;for(let A of $)switch(A.type){case"function":{let F=(Q=A.providerOptions)==null?void 0:Q.openai,N=F==null?void 0:F.deferLoading;H.push({type:"function",name:A.name,description:A.description,parameters:A.inputSchema,...A.strict!=null?{strict:A.strict}:{},...N!=null?{defer_loading:N}:{}});break}case"provider":{switch(A.id){case"openai.file_search":{let F=await i5({value:A.args,schema:XW9});H.push({type:"file_search",vector_store_ids:F.vectorStoreIds,max_num_results:F.maxNumResults,ranking_options:F.ranking?{ranker:F.ranking.ranker,score_threshold:F.ranking.scoreThreshold}:void 0,filters:F.filters});break}case"openai.local_shell":{H.push({type:"local_shell"});break}case"openai.shell":{let F=await i5({value:A.args,schema:VW9});H.push({type:"shell",...F.environment&&{environment:gW9(F.environment)}});break}case"openai.apply_patch":{H.push({type:"apply_patch"});break}case"openai.web_search_preview":{let F=await i5({value:A.args,schema:RW9});H.push({type:"web_search_preview",search_context_size:F.searchContextSize,user_location:F.userLocation});break}case"openai.web_search":{let F=await i5({value:A.args,schema:LW9});H.push({type:"web_search",filters:F.filters!=null?{allowed_domains:F.filters.allowedDomains}:void 0,external_web_access:F.externalWebAccess,search_context_size:F.searchContextSize,user_location:F.userLocation});break}case"openai.code_interpreter":{let F=await i5({value:A.args,schema:aQ9});H.push({type:"code_interpreter",container:F.container==null?{type:"auto",file_ids:void 0}:typeof F.container==="string"?F.container:{type:"auto",file_ids:F.container.fileIds}});break}case"openai.image_generation":{let F=await i5({value:A.args,schema:QW9});H.push({type:"image_generation",background:F.background,input_fidelity:F.inputFidelity,input_image_mask:F.inputImageMask?{file_id:F.inputImageMask.fileId,image_url:F.inputImageMask.imageUrl}:void 0,model:F.model,moderation:F.moderation,partial_images:F.partialImages,quality:F.quality,output_compression:F.outputCompression,output_format:F.outputFormat,size:F.size});break}case"openai.mcp":{let F=await i5({value:A.args,schema:wW9}),N=(B)=>({tool_names:B.toolNames}),D=F.requireApproval,L=D==null?void 0:typeof D==="string"?D:D.never!=null?{never:N(D.never)}:void 0;H.push({type:"mcp",server_label:F.serverLabel,allowed_tools:Array.isArray(F.allowedTools)?F.allowedTools:F.allowedTools?{read_only:F.allowedTools.readOnly,tool_names:F.allowedTools.toolNames}:void 0,authorization:F.authorization,connector_id:F.connectorId,headers:F.headers,require_approval:L!=null?L:"never",server_description:F.serverDescription,server_url:F.serverUrl});break}case"openai.custom":{let F=await i5({value:A.args,schema:tQ9});H.push({type:"custom",name:F.name,description:F.description,format:F.format}),z.add(F.name);break}case"openai.tool_search":{let F=await i5({value:A.args,schema:FW9});H.push({type:"tool_search",...F.execution!=null?{execution:F.execution}:{},...F.description!=null?{description:F.description}:{},...F.parameters!=null?{parameters:F.parameters}:{}});break}}break}default:K.push({type:"unsupported",feature:`function tool ${A}`});break}if(X!=null)return{tools:H,toolChoice:{type:"allowed_tools",mode:(W=X.mode)!=null?W:"auto",tools:X.toolNames.map((A)=>{var F;return{type:"function",name:(F=G==null?void 0:G.toProviderToolName(A))!=null?F:A}})},toolWarnings:K};if(Y==null)return{tools:H,toolChoice:void 0,toolWarnings:K};let V=Y.type;switch(V){case"auto":case"none":case"required":return{tools:H,toolChoice:V,toolWarnings:K};case"tool":{let A=(Z=G==null?void 0:G.toProviderToolName(Y.toolName))!=null?Z:Y.toolName;return{tools:H,toolChoice:A==="code_interpreter"||A==="file_search"||A==="image_generation"||A==="web_search_preview"||A==="web_search"||A==="mcp"||A==="apply_patch"?{type:A}:z.has(A)?{type:"custom",name:A}:{type:"function",name:A},toolWarnings:K}}default:throw new l5({functionality:`tool choice type: ${V}`})}}function gW9($){if($.type==="containerReference")return{type:"container_reference",container_id:$.containerId};if($.type==="containerAuto"){let X=$;return{type:"container_auto",file_ids:X.fileIds,memory_limit:X.memoryLimit,network_policy:X.networkPolicy==null?void 0:X.networkPolicy.type==="disabled"?{type:"disabled"}:{type:"allowlist",allowed_domains:X.networkPolicy.allowedDomains,domain_secrets:X.networkPolicy.domainSecrets},skills:mW9(X.skills)}}return{type:"local",skills:$.skills}}function mW9($){return $==null?void 0:$.map((Y)=>Y.type==="skillReference"?{type:"skill_reference",skill_id:Y.skillId,version:Y.version}:{type:"inline",name:Y.name,description:Y.description,source:{type:"base64",media_type:Y.source.mediaType,data:Y.source.data}})}function kA4($){var Y,X;let G={};for(let J of $){if(J.role!=="assistant")continue;for(let Q of J.content){if(Q.type!=="tool-call")continue;let W=(X=(Y=Q.providerOptions)==null?void 0:Y.openai)==null?void 0:X.approvalRequestId;if(W!=null)G[W]=Q.toolCallId}}return G}var uW9=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({maxOutputTokens:$,temperature:Y,stopSequences:X,topP:G,topK:J,presencePenalty:Q,frequencyPenalty:W,seed:Z,prompt:K,providerOptions:H,tools:z,toolChoice:V,responseFormat:A}){var F,N,D,L,B,O,E,M,R,q,w;let I=[],P=bA4(this.modelId);if(J!=null)I.push({type:"unsupported",feature:"topK"});if(Z!=null)I.push({type:"unsupported",feature:"seed"});if(Q!=null)I.push({type:"unsupported",feature:"presencePenalty"});if(W!=null)I.push({type:"unsupported",feature:"frequencyPenalty"});if(X!=null)I.push({type:"unsupported",feature:"stopSequences"});let _=this.config.provider.includes("azure")?"azure":"openai",C=await F9({provider:_,providerOptions:H,schema:SA4});if(C==null&&_!=="openai")C=await F9({provider:"openai",providerOptions:H,schema:SA4});let k=(F=C==null?void 0:C.forceReasoning)!=null?F:P.isReasoningModel;if((C==null?void 0:C.conversation)&&(C==null?void 0:C.previousResponseId))I.push({type:"unsupported",feature:"conversation",details:"conversation and previousResponseId cannot be used together"});let S=nV4({tools:z,providerToolNames:{"openai.code_interpreter":"code_interpreter","openai.file_search":"file_search","openai.image_generation":"image_generation","openai.local_shell":"local_shell","openai.shell":"shell","openai.web_search":"web_search","openai.web_search_preview":"web_search_preview","openai.mcp":"mcp","openai.apply_patch":"apply_patch","openai.tool_search":"tool_search"},resolveProviderToolName:(Q0)=>Q0.id==="openai.custom"?Q0.args.name:void 0}),T=new Set,{tools:v,toolChoice:x,toolWarnings:y}=await fW9({tools:z,toolChoice:V,allowedTools:(N=C==null?void 0:C.allowedTools)!=null?N:void 0,toolNameMapping:S,customProviderToolNames:T}),{input:d,warnings:u}=await vW9({prompt:K,toolNameMapping:S,systemMessageMode:(D=C==null?void 0:C.systemMessageMode)!=null?D:k?"developer":P.systemMessageMode,providerOptionsName:_,fileIdPrefixes:this.config.fileIdPrefixes,passThroughUnsupportedFiles:(L=C==null?void 0:C.passThroughUnsupportedFiles)!=null?L:!1,store:(B=C==null?void 0:C.store)!=null?B:!0,hasConversation:(C==null?void 0:C.conversation)!=null,hasLocalShellTool:h("openai.local_shell"),hasShellTool:h("openai.shell"),hasApplyPatchTool:h("openai.apply_patch"),customProviderToolNames:T.size>0?T:void 0});I.push(...u);let b=(O=C==null?void 0:C.strictJsonSchema)!=null?O:!0,g=C==null?void 0:C.include;function p(Q0){if(g==null)g=[Q0];else if(!g.includes(Q0))g=[...g,Q0]}function h(Q0){return(z==null?void 0:z.find((e)=>e.type==="provider"&&e.id===Q0))!=null}let n=typeof(C==null?void 0:C.logprobs)==="number"?C==null?void 0:C.logprobs:(C==null?void 0:C.logprobs)===!0?cA4:void 0;if(n)p("message.output_text.logprobs");let t=(E=z==null?void 0:z.find((Q0)=>Q0.type==="provider"&&(Q0.id==="openai.web_search"||Q0.id==="openai.web_search_preview")))==null?void 0:E.name;if(t)p("web_search_call.action.sources");if(h("openai.code_interpreter"))p("code_interpreter_call.outputs");let s=C==null?void 0:C.store;if(s===!1&&k)p("reasoning.encrypted_content");let Z0={model:this.modelId,input:d,temperature:Y,top_p:G,max_output_tokens:$,...((A==null?void 0:A.type)==="json"||(C==null?void 0:C.textVerbosity))&&{text:{...(A==null?void 0:A.type)==="json"&&{format:A.schema!=null?{type:"json_schema",strict:b,name:(M=A.name)!=null?M:"response",description:A.description,schema:A.schema}:{type:"json_object"}},...(C==null?void 0:C.textVerbosity)&&{verbosity:C.textVerbosity}}},conversation:C==null?void 0:C.conversation,max_tool_calls:C==null?void 0:C.maxToolCalls,metadata:C==null?void 0:C.metadata,parallel_tool_calls:C==null?void 0:C.parallelToolCalls,previous_response_id:C==null?void 0:C.previousResponseId,store:s,user:C==null?void 0:C.user,instructions:C==null?void 0:C.instructions,service_tier:C==null?void 0:C.serviceTier,include:g,prompt_cache_key:C==null?void 0:C.promptCacheKey,prompt_cache_retention:C==null?void 0:C.promptCacheRetention,safety_identifier:C==null?void 0:C.safetyIdentifier,top_logprobs:n,truncation:C==null?void 0:C.truncation,...k&&((C==null?void 0:C.reasoningEffort)!=null||(C==null?void 0:C.reasoningSummary)!=null)&&{reasoning:{...(C==null?void 0:C.reasoningEffort)!=null&&{effort:C.reasoningEffort},...(C==null?void 0:C.reasoningSummary)!=null&&{summary:C.reasoningSummary}}}};if(k){if(!((C==null?void 0:C.reasoningEffort)==="none"&&P.supportsNonReasoningParameters)){if(Z0.temperature!=null)Z0.temperature=void 0,I.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(Z0.top_p!=null)Z0.top_p=void 0,I.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})}}else{if((C==null?void 0:C.reasoningEffort)!=null)I.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if((C==null?void 0:C.reasoningSummary)!=null)I.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if((C==null?void 0:C.serviceTier)==="flex"&&!P.supportsFlexProcessing)I.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete Z0.service_tier;if((C==null?void 0:C.serviceTier)==="priority"&&!P.supportsPriorityProcessing)I.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete Z0.service_tier;let X0=(w=(q=(R=z==null?void 0:z.find((Q0)=>Q0.type==="provider"&&Q0.id==="openai.shell"))==null?void 0:R.args)==null?void 0:q.environment)==null?void 0:w.type,a=X0==="containerAuto"||X0==="containerReference";return{webSearchToolName:t,args:{...Z0,tools:v,tool_choice:x},warnings:[...I,...y],store:s,toolNameMapping:S,providerOptionsName:_,isShellProviderExecuted:a}}async doGenerate($){var Y,X,G,J,Q,W,Z,K,H,z,V,A,F,N,D,L,B,O,E,M,R,q,w,I,P,_,C,k;let{args:S,warnings:T,webSearchToolName:v,toolNameMapping:x,providerOptionsName:y,isShellProviderExecuted:d}=await this.getArgs($),u=this.config.url({path:"/responses",modelId:this.modelId}),b=kA4($.prompt),{responseHeaders:g,value:p,rawValue:h}=await j8({url:u,headers:i6(this.config.headers(),$.headers),body:S,failedResponseHandler:A3,successfulResponseHandler:O8(bW9),abortSignal:$.abortSignal,fetch:this.config.fetch});if(p.error)throw new n8({message:p.error.message,url:u,requestBodyValues:S,statusCode:400,responseHeaders:g,responseBody:h,isRetryable:!1});let n=[],t=[],s=!1,Z0=[];for(let Q0 of p.output)switch(Q0.type){case"reasoning":{if(Q0.summary.length===0)Q0.summary.push({type:"summary_text",text:""});for(let e of Q0.summary)n.push({type:"reasoning",text:e.text,providerMetadata:{[y]:{itemId:Q0.id,reasoningEncryptedContent:(Y=Q0.encrypted_content)!=null?Y:null}}});break}case"image_generation_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("image_generation"),result:{result:Q0.result}});break}case"tool_search_call":{let e=(X=Q0.call_id)!=null?X:Q0.id,m=Q0.execution==="server";if(m)Z0.push(e);n.push({type:"tool-call",toolCallId:e,toolName:x.toCustomToolName("tool_search"),input:JSON.stringify({arguments:Q0.arguments,call_id:Q0.call_id}),...m?{providerExecuted:!0}:{},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"tool_search_output":{let e=(J=(G=Q0.call_id)!=null?G:Z0.shift())!=null?J:Q0.id;n.push({type:"tool-result",toolCallId:e,toolName:x.toCustomToolName("tool_search"),result:{tools:Q0.tools},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"local_shell_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("local_shell"),input:JSON.stringify({action:Q0.action}),providerMetadata:{[y]:{itemId:Q0.id}}});break}case"shell_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("shell"),input:JSON.stringify({action:{commands:Q0.action.commands}}),...d&&{providerExecuted:!0},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"shell_call_output":{n.push({type:"tool-result",toolCallId:Q0.call_id,toolName:x.toCustomToolName("shell"),result:{output:Q0.output.map((e)=>({stdout:e.stdout,stderr:e.stderr,outcome:e.outcome.type==="exit"?{type:"exit",exitCode:e.outcome.exit_code}:{type:"timeout"}}))}});break}case"message":{for(let e of Q0.content){if(((W=(Q=$.providerOptions)==null?void 0:Q[y])==null?void 0:W.logprobs)&&e.logprobs)t.push(e.logprobs);let m={itemId:Q0.id,...Q0.phase!=null&&{phase:Q0.phase},...e.annotations.length>0&&{annotations:e.annotations}};n.push({type:"text",text:e.text,providerMetadata:{[y]:m}});for(let $0 of e.annotations)if($0.type==="url_citation")n.push({type:"source",sourceType:"url",id:(H=(K=(Z=this.config).generateId)==null?void 0:K.call(Z))!=null?H:Y7(),url:$0.url,title:$0.title});else if($0.type==="file_citation")n.push({type:"source",sourceType:"document",id:(A=(V=(z=this.config).generateId)==null?void 0:V.call(z))!=null?A:Y7(),mediaType:"text/plain",title:$0.filename,filename:$0.filename,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,index:$0.index}}});else if($0.type==="container_file_citation")n.push({type:"source",sourceType:"document",id:(D=(N=(F=this.config).generateId)==null?void 0:N.call(F))!=null?D:Y7(),mediaType:"text/plain",title:$0.filename,filename:$0.filename,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,containerId:$0.container_id}}});else if($0.type==="file_path")n.push({type:"source",sourceType:"document",id:(O=(B=(L=this.config).generateId)==null?void 0:B.call(L))!=null?O:Y7(),mediaType:"application/octet-stream",title:$0.file_id,filename:$0.file_id,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,index:$0.index}}})}break}case"function_call":{s=!0,n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:Q0.name,input:Q0.arguments,providerMetadata:{[y]:{itemId:Q0.id,...Q0.namespace!=null&&{namespace:Q0.namespace}}}});break}case"custom_tool_call":{s=!0;let e=x.toCustomToolName(Q0.name);n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:e,input:JSON.stringify(Q0.input),providerMetadata:{[y]:{itemId:Q0.id}}});break}case"web_search_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName(v!=null?v:"web_search"),input:JSON.stringify({}),providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName(v!=null?v:"web_search"),result:xA4(Q0.action)});break}case"mcp_call":{let e=Q0.approval_request_id!=null?(E=b[Q0.approval_request_id])!=null?E:Q0.id:Q0.id,m=`mcp.${Q0.name}`;n.push({type:"tool-call",toolCallId:e,toolName:m,input:Q0.arguments,providerExecuted:!0,dynamic:!0}),n.push({type:"tool-result",toolCallId:e,toolName:m,result:{type:"call",serverLabel:Q0.server_label,name:Q0.name,arguments:Q0.arguments,...Q0.output!=null?{output:Q0.output}:{},...Q0.error!=null?{error:Q0.error}:{}},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"mcp_list_tools":break;case"mcp_approval_request":{let e=(M=Q0.approval_request_id)!=null?M:Q0.id,m=(w=(q=(R=this.config).generateId)==null?void 0:q.call(R))!=null?w:Y7(),$0=`mcp.${Q0.name}`;n.push({type:"tool-call",toolCallId:m,toolName:$0,input:Q0.arguments,providerExecuted:!0,dynamic:!0}),n.push({type:"tool-approval-request",approvalId:e,toolCallId:m});break}case"computer_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:Q0.status||"completed"}});break}case"file_search_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("file_search"),input:"{}",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("file_search"),result:{queries:Q0.queries,results:(P=(I=Q0.results)==null?void 0:I.map((e)=>({attributes:e.attributes,fileId:e.file_id,filename:e.filename,score:e.score,text:e.text})))!=null?P:null}});break}case"code_interpreter_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("code_interpreter"),input:JSON.stringify({code:Q0.code,containerId:Q0.container_id}),providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("code_interpreter"),result:{outputs:Q0.outputs}});break}case"apply_patch_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("apply_patch"),input:JSON.stringify({callId:Q0.call_id,operation:Q0.operation}),providerMetadata:{[y]:{itemId:Q0.id}}});break}}let X0={[y]:{responseId:p.id,...t.length>0?{logprobs:t}:{},...typeof p.service_tier==="string"?{serviceTier:p.service_tier}:{}}},a=p.usage;return{content:n,finishReason:{unified:xu0({finishReason:(_=p.incomplete_details)==null?void 0:_.reason,hasFunctionCall:s}),raw:(k=(C=p.incomplete_details)==null?void 0:C.reason)!=null?k:void 0},usage:TA4(a),request:{body:S},response:{id:p.id,timestamp:new Date(p.created_at*1000),modelId:p.model,headers:g,body:h},providerMetadata:X0,warnings:T}}async doStream($){let{args:Y,warnings:X,webSearchToolName:G,toolNameMapping:J,store:Q,providerOptionsName:W,isShellProviderExecuted:Z}=await this.getArgs($),{responseHeaders:K,value:H}=await j8({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:{...Y,stream:!0},failedResponseHandler:A3,successfulResponseHandler:Z2(yW9),abortSignal:$.abortSignal,fetch:this.config.fetch}),z=this,V=kA4($.prompt),A=new Map,F={unified:"other",raw:void 0},N=void 0,D=[],L=null,B={},O=[],E,M=!1,R={},q,w=[];return{stream:H.pipeThrough(new TransformStream({start(I){I.enqueue({type:"stream-start",warnings:X})},transform(I,P){var _,C,k,S,T,v,x,y,d,u,b,g,p,h,n,t,s,Z0,X0,a,Q0,e,m,$0,Y0,K0,A0,D0,O0,R0,I0,g0,p0,U4,P1,d1,C0,n0;if($.includeRawChunks)P.enqueue({type:"raw",rawValue:I.rawValue});if(!I.success){F={unified:"error",raw:void 0},P.enqueue({type:"error",error:I.error});return}let J0=I.value;if(vA4(J0)){if(J0.item.type==="function_call")B[J0.output_index]={toolName:J0.item.name,toolCallId:J0.item.call_id},P.enqueue({type:"tool-input-start",id:J0.item.call_id,toolName:J0.item.name});else if(J0.item.type==="custom_tool_call"){let B0=J.toCustomToolName(J0.item.name);B[J0.output_index]={toolName:B0,toolCallId:J0.item.call_id},P.enqueue({type:"tool-input-start",id:J0.item.call_id,toolName:B0})}else if(J0.item.type==="web_search_call")B[J0.output_index]={toolName:J.toCustomToolName(G!=null?G:"web_search"),toolCallId:J0.item.id},P.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),providerExecuted:!0}),P.enqueue({type:"tool-input-end",id:J0.item.id}),P.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),input:JSON.stringify({}),providerExecuted:!0});else if(J0.item.type==="computer_call")B[J0.output_index]={toolName:J.toCustomToolName("computer_use"),toolCallId:J0.item.id},P.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName("computer_use"),providerExecuted:!0});else if(J0.item.type==="code_interpreter_call")B[J0.output_index]={toolName:J.toCustomToolName("code_interpreter"),toolCallId:J0.item.id,codeInterpreter:{containerId:J0.item.container_id}},P.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName("code_interpreter"),providerExecuted:!0}),P.enqueue({type:"tool-input-delta",id:J0.item.id,delta:`{"containerId":"${J0.item.container_id}","code":"`});else if(J0.item.type==="file_search_call")P.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("file_search"),input:"{}",providerExecuted:!0});else if(J0.item.type==="image_generation_call")P.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0});else if(J0.item.type==="tool_search_call"){let B0=J0.item.id,Y1=J.toCustomToolName("tool_search"),c1=J0.item.execution==="server";if(B[J0.output_index]={toolName:Y1,toolCallId:B0,toolSearchExecution:(_=J0.item.execution)!=null?_:"server"},c1)P.enqueue({type:"tool-input-start",id:B0,toolName:Y1,providerExecuted:!0})}else if(J0.item.type==="tool_search_output");else if(J0.item.type==="mcp_call"||J0.item.type==="mcp_list_tools"||J0.item.type==="mcp_approval_request");else if(J0.item.type==="apply_patch_call"){let{call_id:B0,operation:Y1}=J0.item;if(B[J0.output_index]={toolName:J.toCustomToolName("apply_patch"),toolCallId:B0,applyPatch:{hasDiff:Y1.type==="delete_file",endEmitted:Y1.type==="delete_file"}},P.enqueue({type:"tool-input-start",id:B0,toolName:J.toCustomToolName("apply_patch")}),Y1.type==="delete_file"){let c1=JSON.stringify({callId:B0,operation:Y1});P.enqueue({type:"tool-input-delta",id:B0,delta:c1}),P.enqueue({type:"tool-input-end",id:B0})}else P.enqueue({type:"tool-input-delta",id:B0,delta:`{"callId":"${DM(B0)}","operation":{"type":"${DM(Y1.type)}","path":"${DM(Y1.path)}","diff":"`})}else if(J0.item.type==="shell_call")B[J0.output_index]={toolName:J.toCustomToolName("shell"),toolCallId:J0.item.call_id};else if(J0.item.type==="shell_call_output");else if(J0.item.type==="message")O.splice(0,O.length),E=(C=J0.item.phase)!=null?C:void 0,P.enqueue({type:"text-start",id:J0.item.id,providerMetadata:{[W]:{itemId:J0.item.id,...J0.item.phase!=null&&{phase:J0.item.phase}}}});else if(vA4(J0)&&J0.item.type==="reasoning")R[J0.item.id]={encryptedContent:J0.item.encrypted_content,summaryParts:{0:"active"}},P.enqueue({type:"reasoning-start",id:`${J0.item.id}:0`,providerMetadata:{[W]:{itemId:J0.item.id,reasoningEncryptedContent:(k=J0.item.encrypted_content)!=null?k:null}}})}else if(dW9(J0)){if(J0.item.type==="message"){let B0=(S=J0.item.phase)!=null?S:E;E=void 0,P.enqueue({type:"text-end",id:J0.item.id,providerMetadata:{[W]:{itemId:J0.item.id,...B0!=null&&{phase:B0},...O.length>0&&{annotations:O}}}})}else if(J0.item.type==="function_call")B[J0.output_index]=void 0,M=!0,P.enqueue({type:"tool-input-end",id:J0.item.call_id,...J0.item.namespace!=null&&{providerMetadata:{[W]:{namespace:J0.item.namespace}}}}),P.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J0.item.name,input:J0.item.arguments,providerMetadata:{[W]:{itemId:J0.item.id,...J0.item.namespace!=null&&{namespace:J0.item.namespace}}}});else if(J0.item.type==="custom_tool_call"){B[J0.output_index]=void 0,M=!0;let B0=J.toCustomToolName(J0.item.name);P.enqueue({type:"tool-input-end",id:J0.item.call_id}),P.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:B0,input:JSON.stringify(J0.item.input),providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="web_search_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),result:xA4(J0.item.action)});else if(J0.item.type==="computer_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-input-end",id:J0.item.id}),P.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),P.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:J0.item.status||"completed"}});else if(J0.item.type==="file_search_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("file_search"),result:{queries:J0.item.queries,results:(v=(T=J0.item.results)==null?void 0:T.map((B0)=>({attributes:B0.attributes,fileId:B0.file_id,filename:B0.filename,score:B0.score,text:B0.text})))!=null?v:null}});else if(J0.item.type==="code_interpreter_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("code_interpreter"),result:{outputs:J0.item.outputs}});else if(J0.item.type==="image_generation_call")P.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("image_generation"),result:{result:J0.item.result}});else if(J0.item.type==="tool_search_call"){let B0=B[J0.output_index],Y1=J0.item.execution==="server";if(B0!=null){let c1=Y1?B0.toolCallId:(x=J0.item.call_id)!=null?x:J0.item.id;if(Y1)w.push(c1);else P.enqueue({type:"tool-input-start",id:c1,toolName:B0.toolName});P.enqueue({type:"tool-input-end",id:c1}),P.enqueue({type:"tool-call",toolCallId:c1,toolName:B0.toolName,input:JSON.stringify({arguments:J0.item.arguments,call_id:Y1?null:c1}),...Y1?{providerExecuted:!0}:{},providerMetadata:{[W]:{itemId:J0.item.id}}})}B[J0.output_index]=void 0}else if(J0.item.type==="tool_search_output"){let B0=(d=(y=J0.item.call_id)!=null?y:w.shift())!=null?d:J0.item.id;P.enqueue({type:"tool-result",toolCallId:B0,toolName:J.toCustomToolName("tool_search"),result:{tools:J0.item.tools},providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="mcp_call"){B[J0.output_index]=void 0;let B0=(u=J0.item.approval_request_id)!=null?u:void 0,Y1=B0!=null?(g=(b=A.get(B0))!=null?b:V[B0])!=null?g:J0.item.id:J0.item.id,c1=`mcp.${J0.item.name}`;P.enqueue({type:"tool-call",toolCallId:Y1,toolName:c1,input:J0.item.arguments,providerExecuted:!0,dynamic:!0}),P.enqueue({type:"tool-result",toolCallId:Y1,toolName:c1,result:{type:"call",serverLabel:J0.item.server_label,name:J0.item.name,arguments:J0.item.arguments,...J0.item.output!=null?{output:J0.item.output}:{},...J0.item.error!=null?{error:J0.item.error}:{}},providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="mcp_list_tools")B[J0.output_index]=void 0;else if(J0.item.type==="apply_patch_call"){let B0=B[J0.output_index];if((B0==null?void 0:B0.applyPatch)&&!B0.applyPatch.endEmitted&&J0.item.operation.type!=="delete_file"){if(!B0.applyPatch.hasDiff)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:DM(J0.item.operation.diff)});P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}}'}),P.enqueue({type:"tool-input-end",id:B0.toolCallId}),B0.applyPatch.endEmitted=!0}if(B0&&J0.item.status==="completed")P.enqueue({type:"tool-call",toolCallId:B0.toolCallId,toolName:J.toCustomToolName("apply_patch"),input:JSON.stringify({callId:J0.item.call_id,operation:J0.item.operation}),providerMetadata:{[W]:{itemId:J0.item.id}}});B[J0.output_index]=void 0}else if(J0.item.type==="mcp_approval_request"){B[J0.output_index]=void 0;let B0=(n=(h=(p=z.config).generateId)==null?void 0:h.call(p))!=null?n:Y7(),Y1=(t=J0.item.approval_request_id)!=null?t:J0.item.id;A.set(Y1,B0);let c1=`mcp.${J0.item.name}`;P.enqueue({type:"tool-call",toolCallId:B0,toolName:c1,input:J0.item.arguments,providerExecuted:!0,dynamic:!0}),P.enqueue({type:"tool-approval-request",approvalId:Y1,toolCallId:B0})}else if(J0.item.type==="local_shell_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("local_shell"),input:JSON.stringify({action:{type:"exec",command:J0.item.action.command,timeoutMs:J0.item.action.timeout_ms,user:J0.item.action.user,workingDirectory:J0.item.action.working_directory,env:J0.item.action.env}}),providerMetadata:{[W]:{itemId:J0.item.id}}});else if(J0.item.type==="shell_call")B[J0.output_index]=void 0,P.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("shell"),input:JSON.stringify({action:{commands:J0.item.action.commands}}),...Z&&{providerExecuted:!0},providerMetadata:{[W]:{itemId:J0.item.id}}});else if(J0.item.type==="shell_call_output")P.enqueue({type:"tool-result",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("shell"),result:{output:J0.item.output.map((B0)=>({stdout:B0.stdout,stderr:B0.stderr,outcome:B0.outcome.type==="exit"?{type:"exit",exitCode:B0.outcome.exit_code}:{type:"timeout"}}))}});else if(J0.item.type==="reasoning"){let B0=R[J0.item.id],Y1=Object.entries(B0.summaryParts).filter(([c1,C4])=>C4==="active"||C4==="can-conclude").map(([c1])=>c1);for(let c1 of Y1)P.enqueue({type:"reasoning-end",id:`${J0.item.id}:${c1}`,providerMetadata:{[W]:{itemId:J0.item.id,reasoningEncryptedContent:(s=J0.item.encrypted_content)!=null?s:null}}});delete R[J0.item.id]}}else if(nW9(J0)){let B0=B[J0.output_index];if(B0!=null)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:J0.delta})}else if(rW9(J0)){let B0=B[J0.output_index];if(B0!=null)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:J0.delta})}else if(tW9(J0)){let B0=B[J0.output_index];if(B0==null?void 0:B0.applyPatch)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:DM(J0.delta)}),B0.applyPatch.hasDiff=!0}else if(eW9(J0)){let B0=B[J0.output_index];if((B0==null?void 0:B0.applyPatch)&&!B0.applyPatch.endEmitted){if(!B0.applyPatch.hasDiff)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:DM(J0.diff)}),B0.applyPatch.hasDiff=!0;P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}}'}),P.enqueue({type:"tool-input-end",id:B0.toolCallId}),B0.applyPatch.endEmitted=!0}}else if(aW9(J0))P.enqueue({type:"tool-result",toolCallId:J0.item_id,toolName:J.toCustomToolName("image_generation"),result:{result:J0.partial_image_b64},preliminary:!0});else if(sW9(J0)){let B0=B[J0.output_index];if(B0!=null)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:DM(J0.delta)})}else if(oW9(J0)){let B0=B[J0.output_index];if(B0!=null)P.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}'}),P.enqueue({type:"tool-input-end",id:B0.toolCallId}),P.enqueue({type:"tool-call",toolCallId:B0.toolCallId,toolName:J.toCustomToolName("code_interpreter"),input:JSON.stringify({code:J0.code,containerId:B0.codeInterpreter.containerId}),providerExecuted:!0})}else if(iW9(J0))L=J0.response.id,P.enqueue({type:"response-metadata",id:J0.response.id,timestamp:new Date(J0.response.created_at*1000),modelId:J0.response.model});else if(pW9(J0)){if(P.enqueue({type:"text-delta",id:J0.item_id,delta:J0.delta}),((X0=(Z0=$.providerOptions)==null?void 0:Z0[W])==null?void 0:X0.logprobs)&&J0.logprobs)D.push(J0.logprobs)}else if(J0.type==="response.reasoning_summary_part.added"){if(J0.summary_index>0){let B0=R[J0.item_id];B0.summaryParts[J0.summary_index]="active";for(let Y1 of Object.keys(B0.summaryParts))if(B0.summaryParts[Y1]==="can-conclude")P.enqueue({type:"reasoning-end",id:`${J0.item_id}:${Y1}`,providerMetadata:{[W]:{itemId:J0.item_id}}}),B0.summaryParts[Y1]="concluded";P.enqueue({type:"reasoning-start",id:`${J0.item_id}:${J0.summary_index}`,providerMetadata:{[W]:{itemId:J0.item_id,reasoningEncryptedContent:(Q0=(a=R[J0.item_id])==null?void 0:a.encryptedContent)!=null?Q0:null}}})}}else if(J0.type==="response.reasoning_summary_text.delta")P.enqueue({type:"reasoning-delta",id:`${J0.item_id}:${J0.summary_index}`,delta:J0.delta,providerMetadata:{[W]:{itemId:J0.item_id}}});else if(J0.type==="response.reasoning_summary_part.done")if(Q)P.enqueue({type:"reasoning-end",id:`${J0.item_id}:${J0.summary_index}`,providerMetadata:{[W]:{itemId:J0.item_id}}}),R[J0.item_id].summaryParts[J0.summary_index]="concluded";else R[J0.item_id].summaryParts[J0.summary_index]="can-conclude";else if(cW9(J0)){if(F={unified:xu0({finishReason:(e=J0.response.incomplete_details)==null?void 0:e.reason,hasFunctionCall:M}),raw:($0=(m=J0.response.incomplete_details)==null?void 0:m.reason)!=null?$0:void 0},N=J0.response.usage,typeof J0.response.service_tier==="string")q=J0.response.service_tier}else if(lW9(J0)){let B0=(Y0=J0.response.incomplete_details)==null?void 0:Y0.reason;F={unified:B0?xu0({finishReason:B0,hasFunctionCall:M}):"error",raw:B0!=null?B0:"error"},N=(K0=J0.response.usage)!=null?K0:void 0}else if($Z9(J0)){if(O.push(J0.annotation),J0.annotation.type==="url_citation")P.enqueue({type:"source",sourceType:"url",id:(O0=(D0=(A0=z.config).generateId)==null?void 0:D0.call(A0))!=null?O0:Y7(),url:J0.annotation.url,title:J0.annotation.title});else if(J0.annotation.type==="file_citation")P.enqueue({type:"source",sourceType:"document",id:(g0=(I0=(R0=z.config).generateId)==null?void 0:I0.call(R0))!=null?g0:Y7(),mediaType:"text/plain",title:J0.annotation.filename,filename:J0.annotation.filename,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,index:J0.annotation.index}}});else if(J0.annotation.type==="container_file_citation")P.enqueue({type:"source",sourceType:"document",id:(P1=(U4=(p0=z.config).generateId)==null?void 0:U4.call(p0))!=null?P1:Y7(),mediaType:"text/plain",title:J0.annotation.filename,filename:J0.annotation.filename,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,containerId:J0.annotation.container_id}}});else if(J0.annotation.type==="file_path")P.enqueue({type:"source",sourceType:"document",id:(n0=(C0=(d1=z.config).generateId)==null?void 0:C0.call(d1))!=null?n0:Y7(),mediaType:"application/octet-stream",title:J0.annotation.file_id,filename:J0.annotation.file_id,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,index:J0.annotation.index}}})}else if(YZ9(J0))P.enqueue({type:"error",error:J0})},flush(I){let P={[W]:{responseId:L,...D.length>0?{logprobs:D}:{},...q!==void 0?{serviceTier:q}:{}}};I.enqueue({type:"finish",finishReason:F,usage:TA4(N),providerMetadata:P})}})),request:{body:Y},response:{headers:K}}}};function pW9($){return $.type==="response.output_text.delta"}function dW9($){return $.type==="response.output_item.done"}function cW9($){return $.type==="response.completed"||$.type==="response.incomplete"}function lW9($){return $.type==="response.failed"}function iW9($){return $.type==="response.created"}function nW9($){return $.type==="response.function_call_arguments.delta"}function rW9($){return $.type==="response.custom_tool_call_input.delta"}function aW9($){return $.type==="response.image_generation_call.partial_image"}function sW9($){return $.type==="response.code_interpreter_call_code.delta"}function oW9($){return $.type==="response.code_interpreter_call_code.done"}function tW9($){return $.type==="response.apply_patch_call_operation_diff.delta"}function eW9($){return $.type==="response.apply_patch_call_operation_diff.done"}function vA4($){return $.type==="response.output_item.added"}function $Z9($){return $.type==="response.output_text.annotation.added"}function YZ9($){return $.type==="error"}function xA4($){var Y;if($==null)return{};switch($.type){case"search":return{action:{type:"search",query:(Y=$.query)!=null?Y:void 0},...$.sources!=null&&{sources:$.sources}};case"open_page":return{action:{type:"openPage",url:$.url}};case"find_in_page":return{action:{type:"findInPage",url:$.url,pattern:$.pattern}}}}function DM($){return JSON.stringify($).slice(1,-1)}var XZ9=N1(()=>z1(U.object({instructions:U.string().nullish(),speed:U.number().min(0.25).max(4).default(1).nullish()}))),GZ9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({text:$,voice:Y="alloy",outputFormat:X="mp3",speed:G,instructions:J,language:Q,providerOptions:W}){let Z=[],K=await F9({provider:"openai",providerOptions:W,schema:XZ9}),H={model:this.modelId,input:$,voice:Y,response_format:"mp3",speed:G,instructions:J};if(X)if(["mp3","opus","aac","flac","wav","pcm"].includes(X))H.response_format=X;else Z.push({type:"unsupported",feature:"outputFormat",details:`Unsupported output format: ${X}. Using mp3 instead.`});if(K){let z={};for(let V in z){let A=z[V];if(A!==void 0)H[V]=A}}if(Q)Z.push({type:"unsupported",feature:"language",details:`OpenAI speech models do not support language selection. Language parameter "${Q}" was ignored.`});return{requestBody:H,warnings:Z}}async doGenerate($){var Y,X,G;let J=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{requestBody:Q,warnings:W}=await this.getArgs($),{value:Z,responseHeaders:K,rawValue:H}=await j8({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:Q,failedResponseHandler:A3,successfulResponseHandler:UA4(),abortSignal:$.abortSignal,fetch:this.config.fetch});return{audio:Z,warnings:W,request:{body:JSON.stringify(Q)},response:{timestamp:J,modelId:this.modelId,headers:K,body:H}}}},JZ9=N1(()=>z1(U.object({text:U.string(),language:U.string().nullish(),duration:U.number().nullish(),words:U.array(U.object({word:U.string(),start:U.number(),end:U.number()})).nullish(),segments:U.array(U.object({id:U.number(),seek:U.number(),start:U.number(),end:U.number(),text:U.string(),tokens:U.array(U.number()),temperature:U.number(),avg_logprob:U.number(),compression_ratio:U.number(),no_speech_prob:U.number()})).nullish()}))),QZ9=N1(()=>z1(U.object({include:U.array(U.string()).optional(),language:U.string().optional(),prompt:U.string().optional(),temperature:U.number().min(0).max(1).default(0).optional(),timestampGranularities:U.array(U.enum(["word","segment"])).default(["segment"]).optional()}))),yA4={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"},WZ9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:$,mediaType:Y,providerOptions:X}){let G=[],J=await F9({provider:"openai",providerOptions:X,schema:QZ9}),Q=new FormData,W=$ instanceof Uint8Array?new Blob([$]):new Blob([RJ($)]);Q.append("model",this.modelId);let Z=XA4(Y);if(Q.append("file",new File([W],"audio",{type:Y}),`audio.${Z}`),J){let K={include:J.include,language:J.language,prompt:J.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:J.temperature,timestamp_granularities:J.timestampGranularities};for(let[H,z]of Object.entries(K))if(z!=null)if(Array.isArray(z))for(let V of z)Q.append(`${H}[]`,String(V));else Q.append(H,String(z))}return{formData:Q,warnings:G}}async doGenerate($){var Y,X,G,J,Q,W,Z,K;let H=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{formData:z,warnings:V}=await this.getArgs($),{value:A,responseHeaders:F,rawValue:N}=await ST({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),formData:z,failedResponseHandler:A3,successfulResponseHandler:O8(JZ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),D=A.language!=null&&A.language in yA4?yA4[A.language]:void 0;return{text:A.text,segments:(Z=(W=(J=A.segments)==null?void 0:J.map((L)=>({text:L.text,startSecond:L.start,endSecond:L.end})))!=null?W:(Q=A.words)==null?void 0:Q.map((L)=>({text:L.word,startSecond:L.start,endSecond:L.end})))!=null?Z:[],language:D,durationInSeconds:(K=A.duration)!=null?K:void 0,warnings:V,response:{timestamp:H,modelId:this.modelId,headers:F,body:N}}}},ZZ9="3.0.64";function F3($={}){var Y,X;let G=(Y=kT(lD({settingValue:$.baseURL,environmentVariableName:"OPENAI_BASE_URL"})))!=null?Y:"https://api.openai.com/v1",J=(X=$.name)!=null?X:"openai",Q=()=>pW({Authorization:`Bearer ${YA4({apiKey:$.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":$.organization,"OpenAI-Project":$.project,...$.headers},`ai-sdk/openai/${ZZ9}`),W=(D)=>new CQ9(D,{provider:`${J}.chat`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),Z=(D)=>new xQ9(D,{provider:`${J}.completion`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),K=(D)=>new hQ9(D,{provider:`${J}.embedding`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),H=(D)=>new dQ9(D,{provider:`${J}.image`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),z=(D)=>new WZ9(D,{provider:`${J}.transcription`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),V=(D)=>new GZ9(D,{provider:`${J}.speech`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch}),A=(D)=>{if(new.target)throw Error("The OpenAI model function cannot be called with the new keyword.");return F(D)},F=(D)=>{return new uW9(D,{provider:`${J}.responses`,url:({path:L})=>`${G}${L}`,headers:Q,fetch:$.fetch,fileIdPrefixes:["file-"]})},N=function(D){return A(D)};return N.specificationVersion="v3",N.languageModel=A,N.chat=W,N.completion=Z,N.responses=F,N.embedding=K,N.embeddingModel=K,N.textEmbedding=K,N.textEmbeddingModel=K,N.image=H,N.imageModel=H,N.transcription=z,N.transcriptionModel=z,N.speech=V,N.speechModel=V,N.tools=SW9,N}var oF7=F3();class P6 extends Error{code;rawCode;constructor($,Y,X,G){if(Y!==void 0)$=`${Y}: ${$}`;super($,{cause:G});this.code=Y,this.rawCode=X,this.name="LibsqlError"}}function lA4($){let Y=KZ9.exec($);if(Y===null)throw new P6(`The URL '${$}' is not in a valid format`,"URL_INVALID");let X=Y.groups,G=X.scheme,J=X.authority!==void 0?UZ9(X.authority):void 0,Q=NM(X.path),W=X.query!==void 0?zZ9(X.query):void 0,Z=X.fragment!==void 0?NM(X.fragment):void 0;return{scheme:G,authority:J,path:Q,query:W,fragment:Z}}var KZ9=(()=>{return new RegExp("^(?<scheme>[A-Za-z][A-Za-z.+-]*):(//(?<authority>[^/?#]*))?(?<path>[^?#]*)(\\?(?<query>[^#]*))?(#(?<fragment>.*))?$","su")})();function UZ9($){let Y=HZ9.exec($);if(Y===null)throw new P6("The authority part of the URL is not in a valid format","URL_INVALID");let X=Y.groups,G=NM(X.host_br??X.host),J=X.port?parseInt(X.port,10):void 0,Q=X.username!==void 0?{username:NM(X.username),password:X.password!==void 0?NM(X.password):void 0}:void 0;return{host:G,port:J,userinfo:Q}}var HZ9=(()=>{return new RegExp("^((?<username>[^:]*)(:(?<password>.*))?@)?((?<host>[^:\\[\\]]*)|(\\[(?<host_br>[^\\[\\]]*)\\]))(:(?<port>[0-9]*))?$","su")})();function zZ9($){let Y=$.split("&"),X=[];for(let G of Y){if(G==="")continue;let J,Q,W=G.indexOf("=");if(W<0)J=G,Q="";else J=G.substring(0,W),Q=G.substring(W+1);X.push({key:NM(J.replaceAll("+"," ")),value:NM(Q.replaceAll("+"," "))})}return{pairs:X}}function NM($){try{return decodeURIComponent($)}catch(Y){if(Y instanceof URIError)throw new P6(`URL component has invalid percent encoding: ${Y}`,"URL_INVALID",void 0,Y);throw Y}}function ou($,Y,X){if(Y===void 0)throw new P6(`URL with scheme ${JSON.stringify($+":")} requires authority (the "//" part)`,"URL_INVALID");let G=`${$}:`,J=VZ9(Y.host),Q=AZ9(Y.port),Z=`//${FZ9(Y.userinfo)}${J}${Q}`,K=X.split("/").map(encodeURIComponent).join("/");if(K!==""&&!K.startsWith("/"))K="/"+K;return new URL(`${G}${Z}${K}`)}function VZ9($){return $.includes(":")?`[${encodeURI($)}]`:encodeURI($)}function AZ9($){return $!==void 0?`:${$}`:""}function FZ9($){if($===void 0)return"";let Y=encodeURIComponent($.username),X=$.password!==void 0?`:${encodeURIComponent($.password)}`:"";return`${Y}${X}@`}var yT=typeof Buffer==="function",iA4=typeof TextDecoder==="function"?new TextDecoder:void 0,nA4=typeof TextEncoder==="function"?new TextEncoder:void 0;var tu=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),m$0=(($)=>{let Y={};return $.forEach((X,G)=>Y[X]=G),Y})(tu),DZ9=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,SX=String.fromCharCode.bind(String),rA4=typeof Uint8Array.from==="function"?Uint8Array.from.bind(Uint8Array):($)=>new Uint8Array(Array.prototype.slice.call($,0)),oA4=($)=>$.replace(/=/g,"").replace(/[+\/]/g,(Y)=>Y=="+"?"-":"_"),tA4=($)=>$.replace(/[^A-Za-z0-9\+\/]/g,""),eA4=($)=>{let Y,X,G,J,Q="",W=$.length%3;for(let Z=0;Z<$.length;){if((X=$.charCodeAt(Z++))>255||(G=$.charCodeAt(Z++))>255||(J=$.charCodeAt(Z++))>255)throw TypeError("invalid character found");Y=X<<16|G<<8|J,Q+=tu[Y>>18&63]+tu[Y>>12&63]+tu[Y>>6&63]+tu[Y&63]}return W?Q.slice(0,W-3)+"===".substring(W):Q},du0=typeof btoa==="function"?($)=>btoa($):yT?($)=>Buffer.from($,"binary").toString("base64"):eA4,uu0=yT?($)=>Buffer.from($).toString("base64"):($)=>{let X=[];for(let G=0,J=$.length;G<J;G+=4096)X.push(SX.apply(null,$.subarray(G,G+4096)));return du0(X.join(""))},u$0=($,Y=!1)=>Y?oA4(uu0($)):uu0($),NZ9=($)=>{if($.length<2){var Y=$.charCodeAt(0);return Y<128?$:Y<2048?SX(192|Y>>>6)+SX(128|Y&63):SX(224|Y>>>12&15)+SX(128|Y>>>6&63)+SX(128|Y&63)}else{var Y=65536+($.charCodeAt(0)-55296)*1024+($.charCodeAt(1)-56320);return SX(240|Y>>>18&7)+SX(128|Y>>>12&63)+SX(128|Y>>>6&63)+SX(128|Y&63)}},LZ9=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,$F4=($)=>$.replace(LZ9,NZ9),aA4=yT?($)=>Buffer.from($,"utf8").toString("base64"):nA4?($)=>uu0(nA4.encode($)):($)=>du0($F4($)),xT=($,Y=!1)=>Y?oA4(aA4($)):aA4($),sA4=($)=>xT($,!0),BZ9=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,OZ9=($)=>{switch($.length){case 4:var Y=(7&$.charCodeAt(0))<<18|(63&$.charCodeAt(1))<<12|(63&$.charCodeAt(2))<<6|63&$.charCodeAt(3),X=Y-65536;return SX((X>>>10)+55296)+SX((X&1023)+56320);case 3:return SX((15&$.charCodeAt(0))<<12|(63&$.charCodeAt(1))<<6|63&$.charCodeAt(2));default:return SX((31&$.charCodeAt(0))<<6|63&$.charCodeAt(1))}},YF4=($)=>$.replace(BZ9,OZ9),XF4=($)=>{if($=$.replace(/\s+/g,""),!DZ9.test($))throw TypeError("malformed base64.");$+="==".slice(2-($.length&3));let Y,X,G,J=[];for(let Q=0;Q<$.length;)if(Y=m$0[$.charAt(Q++)]<<18|m$0[$.charAt(Q++)]<<12|(X=m$0[$.charAt(Q++)])<<6|(G=m$0[$.charAt(Q++)]),X===64)J.push(SX(Y>>16&255));else if(G===64)J.push(SX(Y>>16&255,Y>>8&255));else J.push(SX(Y>>16&255,Y>>8&255,Y&255));return J.join("")},cu0=typeof atob==="function"?($)=>atob(tA4($)):yT?($)=>Buffer.from($,"base64").toString("binary"):XF4,GF4=yT?($)=>rA4(Buffer.from($,"base64")):($)=>rA4(cu0($).split("").map((Y)=>Y.charCodeAt(0))),JF4=($)=>GF4(QF4($)),EZ9=yT?($)=>Buffer.from($,"base64").toString("utf8"):iA4?($)=>iA4.decode(GF4($)):($)=>YF4(cu0($)),QF4=($)=>tA4($.replace(/[-_]/g,(Y)=>Y=="-"?"+":"/")),pu0=($)=>EZ9(QF4($)),MZ9=($)=>{if(typeof $!=="string")return!1;let Y=$.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(Y)||!/[^\s0-9a-zA-Z\-_]/.test(Y)},WF4=($)=>{return{value:$,enumerable:!1,writable:!0,configurable:!0}},ZF4=function(){let $=(Y,X)=>Object.defineProperty(String.prototype,Y,WF4(X));$("fromBase64",function(){return pu0(this)}),$("toBase64",function(Y){return xT(this,Y)}),$("toBase64URI",function(){return xT(this,!0)}),$("toBase64URL",function(){return xT(this,!0)}),$("toUint8Array",function(){return JF4(this)})},KF4=function(){let $=(Y,X)=>Object.defineProperty(Uint8Array.prototype,Y,WF4(X));$("toBase64",function(Y){return u$0(this,Y)}),$("toBase64URI",function(){return u$0(this,!0)}),$("toBase64URL",function(){return u$0(this,!0)})},RZ9=()=>{ZF4(),KF4()},bT={version:"3.7.8",VERSION:"3.7.8",atob:cu0,atobPolyfill:XF4,btoa:du0,btoaPolyfill:eA4,fromBase64:pu0,toBase64:xT,encode:xT,encodeURI:sA4,encodeURL:sA4,utob:$F4,btou:YF4,decode:pu0,isValid:MZ9,fromUint8Array:u$0,toUint8Array:JF4,extendString:ZF4,extendUint8Array:KF4,extendBuiltins:RZ9};var JH="https://github.com/libsql/libsql-client-ts#supported-urls";function iD($){if($==="write")return"BEGIN IMMEDIATE";else if($==="read")return"BEGIN TRANSACTION READONLY";else if($==="deferred")return"BEGIN DEFERRED";else throw RangeError('Unknown transaction mode, supported values are "write", "read" and "deferred"')}class hT{columns;columnTypes;rows;rowsAffected;lastInsertRowid;constructor($,Y,X,G,J){this.columns=$,this.columnTypes=Y,this.rows=X,this.rowsAffected=G,this.lastInsertRowid=J}toJSON(){return{columns:this.columns,columnTypes:this.columnTypes,rows:this.rows.map(qZ9),rowsAffected:this.rowsAffected,lastInsertRowid:this.lastInsertRowid!==void 0?""+this.lastInsertRowid:null}}}function qZ9($){return Array.prototype.map.call($,IZ9)}function IZ9($){if(typeof $==="bigint")return""+$;else if($ instanceof ArrayBuffer)return bT.fromUint8Array(new Uint8Array($));else return $}var UF4=":memory:";function HF4($){return $.scheme==="file"&&($.path===":memory:"||$.path.startsWith(":memory:?"))}function eu($,Y){if(typeof $!=="object")throw TypeError(`Expected client configuration as object, got ${typeof $}`);let{url:X,authToken:G,tls:J,intMode:Q,concurrency:W}=$;W=Math.max(0,W||20),Q??="number";let Z=[];if(X===UF4)X="file::memory:";let K=lA4(X),H=K.scheme.toLowerCase(),z=H==="file"&&K.path===UF4&&K.authority===void 0,V;if(z)V={cache:{values:["shared","private"],update:(D,L)=>Z.push(`${D}=${L}`)}};else V={tls:{values:["0","1"],update:(D,L)=>J=L==="1"},authToken:{update:(D,L)=>G=L}};for(let{key:D,value:L}of K.query?.pairs??[]){if(!Object.hasOwn(V,D))throw new P6(`Unsupported URL query parameter ${JSON.stringify(D)}`,"URL_PARAM_NOT_SUPPORTED");let B=V[D];if(B.values!==void 0&&!B.values.includes(L))throw new P6(`Unknown value for the "${D}" query argument: ${JSON.stringify(L)}. Supported values are: [${B.values.map((O)=>'"'+O+'"').join(", ")}]`,"URL_INVALID");if(B.update!==void 0)B?.update(D,L)}let A=Z.length===0?"":`?${Z.join("&")}`,F=K.path+A,N;if(H==="libsql")if(J===!1){if(K.authority?.port===void 0)throw new P6('A "libsql:" URL with ?tls=0 must specify an explicit port',"URL_INVALID");N=Y?"http":"ws"}else N=Y?"https":"wss";else N=H;if(N==="http"||N==="ws")J??=!1;else J??=!0;if(N!=="http"&&N!=="ws"&&N!=="https"&&N!=="wss"&&N!=="file")throw new P6(`The client supports only "libsql:", "wss:", "ws:", "https:", "http:" and "file:" URLs, got ${JSON.stringify(K.scheme+":")}. For more information, please read ${JH}`,"URL_SCHEME_NOT_SUPPORTED");if(Q!=="number"&&Q!=="bigint"&&Q!=="string")throw TypeError(`Invalid value for intMode, expected "number", "bigint" or "string", got ${JSON.stringify(Q)}`);if(K.fragment!==void 0)throw new P6(`URL fragments are not supported: ${JSON.stringify("#"+K.fragment)}`,"URL_INVALID");if(z)return{scheme:"file",tls:!1,path:F,intMode:Q,concurrency:W,syncUrl:$.syncUrl,syncInterval:$.syncInterval,readYourWrites:$.readYourWrites,offline:$.offline,fetch:$.fetch,authToken:void 0,encryptionKey:void 0,authority:void 0};return{scheme:N,tls:J,authority:K.authority,path:F,authToken:G,intMode:Q,concurrency:W,encryptionKey:$.encryptionKey,syncUrl:$.syncUrl,syncInterval:$.syncInterval,readYourWrites:$.readYourWrites,offline:$.offline,fetch:$.fetch}}var $p=U6(IF4(),1);import{Buffer as wF4}from"buffer";function _F4($){if($.scheme!=="file")throw new P6(`URL scheme ${JSON.stringify($.scheme+":")} is not supported by the local sqlite3 client. For more information, please read ${JH}`,"URL_SCHEME_NOT_SUPPORTED");let Y=$.authority;if(Y!==void 0){let W=Y.host.toLowerCase();if(W!==""&&W!=="localhost")throw new P6(`Invalid host in file URL: ${JSON.stringify(Y.host)}. A "file:" URL with an absolute path should start with one slash ("file:/absolute/path.db") or with three slashes ("file:///absolute/path.db"). For more information, please read ${JH}`,"URL_INVALID");if(Y.port!==void 0)throw new P6("File URL cannot have a port","URL_INVALID");if(Y.userinfo!==void 0)throw new P6("File URL cannot have username and password","URL_INVALID")}let X=HF4($);if(X&&$.syncUrl)throw new P6(`Embedded replica must use file for local db but URI with in-memory mode were provided instead: ${$.path}`,"URL_INVALID");let G=$.path;if(X)G=`${$.scheme}:${$.path}`;let J={authToken:$.authToken,encryptionKey:$.encryptionKey,syncUrl:$.syncUrl,syncPeriod:$.syncInterval,readYourWrites:$.readYourWrites,offline:$.offline},Q=new $p.default(G,J);return EY(Q,"SELECT 1 AS checkThatTheDatabaseCanBeOpened",$.intMode),new jF4(G,J,Q,$.intMode)}class jF4{#$;#Y;#X;#J;closed;protocol;constructor($,Y,X,G){this.#$=$,this.#Y=Y,this.#X=X,this.#J=G,this.closed=!1,this.protocol="file"}async execute($,Y){let X;if(typeof $==="string")X={sql:$,args:Y||[]};else X=$;return this.#G(),EY(this.#Q(),X,this.#J)}async batch($,Y="deferred"){this.#G();let X=this.#Q();try{EY(X,iD(Y),this.#J);let G=$.map((J)=>{if(!X.inTransaction)throw new P6("The transaction has been rolled back","TRANSACTION_CLOSED");let Q=Array.isArray(J)?{sql:J[0],args:J[1]||[]}:J;return EY(X,Q,this.#J)});return EY(X,"COMMIT",this.#J),G}finally{if(X.inTransaction)EY(X,"ROLLBACK",this.#J)}}async migrate($){this.#G();let Y=this.#Q();try{EY(Y,"PRAGMA foreign_keys=off",this.#J),EY(Y,iD("deferred"),this.#J);let X=$.map((G)=>{if(!Y.inTransaction)throw new P6("The transaction has been rolled back","TRANSACTION_CLOSED");return EY(Y,G,this.#J)});return EY(Y,"COMMIT",this.#J),X}finally{if(Y.inTransaction)EY(Y,"ROLLBACK",this.#J);EY(Y,"PRAGMA foreign_keys=on",this.#J)}}async transaction($="write"){let Y=this.#Q();return EY(Y,iD($),this.#J),this.#X=null,new TF4(Y,this.#J)}async executeMultiple($){this.#G();let Y=this.#Q();try{return CF4(Y,$)}finally{if(Y.inTransaction)EY(Y,"ROLLBACK",this.#J)}}async sync(){this.#G();let $=await this.#Q().sync();return{frames_synced:$.frames_synced,frame_no:$.frame_no}}async reconnect(){try{if(!this.closed&&this.#X!==null)this.#X.close()}finally{this.#X=new $p.default(this.#$,this.#Y),this.closed=!1}}close(){if(this.closed=!0,this.#X!==null)this.#X.close(),this.#X=null}#G(){if(this.closed)throw new P6("The client is closed","CLIENT_CLOSED")}#Q(){if(this.#X===null)this.#X=new $p.default(this.#$,this.#Y);return this.#X}}class TF4{#$;#Y;constructor($,Y){this.#$=$,this.#Y=Y}async execute($,Y){let X;if(typeof $==="string")X={sql:$,args:Y||[]};else X=$;return this.#X(),EY(this.#$,X,this.#Y)}async batch($){return $.map((Y)=>{this.#X();let X=Array.isArray(Y)?{sql:Y[0],args:Y[1]||[]}:Y;return EY(this.#$,X,this.#Y)})}async executeMultiple($){return this.#X(),CF4(this.#$,$)}async rollback(){if(!this.#$.open)return;this.#X(),EY(this.#$,"ROLLBACK",this.#Y)}async commit(){this.#X(),EY(this.#$,"COMMIT",this.#Y)}close(){if(this.#$.inTransaction)EY(this.#$,"ROLLBACK",this.#Y)}get closed(){return!this.#$.inTransaction}#X(){if(this.closed)throw new P6("The transaction is closed","TRANSACTION_CLOSED")}}function EY($,Y,X){let G,J;if(typeof Y==="string")G=Y,J=[];else if(G=Y.sql,Array.isArray(Y.args))J=Y.args.map((Q)=>PF4(Q,X));else{J={};for(let Q in Y.args){let W=Q[0]==="@"||Q[0]==="$"||Q[0]===":"?Q.substring(1):Q;J[W]=PF4(Y.args[Q],X)}}try{let Q=$.prepare(G);Q.safeIntegers(!0);let W=!0;try{Q.raw(!0)}catch{W=!1}if(W){let Z=Array.from(Q.columns().map((A)=>A.name)),K=Array.from(Q.columns().map((A)=>A.type??"")),H=Q.all(J).map((A)=>{return J29(A,Z,X)}),z=0,V=void 0;return new hT(Z,K,H,0,void 0)}else{let Z=Q.run(J),K=Z.changes,H=BigInt(Z.lastInsertRowid);return new hT([],[],[],K,H)}}catch(Q){throw SF4(Q)}}function J29($,Y,X){let G={};Object.defineProperty(G,"length",{value:$.length});for(let J=0;J<$.length;++J){let Q=Q29($[J],X);Object.defineProperty(G,J,{value:Q});let W=Y[J];if(!Object.hasOwn(G,W))Object.defineProperty(G,W,{value:Q,enumerable:!0,configurable:!0,writable:!0})}return G}function Q29($,Y){if(typeof $==="bigint")if(Y==="number"){if($<W29||$>Z29)throw RangeError("Received integer which cannot be safely represented as a JavaScript number");return Number($)}else if(Y==="bigint")return $;else if(Y==="string")return""+$;else throw Error("Invalid value for IntMode");else if($ instanceof wF4)return $.buffer;return $}var W29=-9007199254740991n,Z29=9007199254740991n;function PF4($,Y){if(typeof $==="number"){if(!Number.isFinite($))throw RangeError("Only finite numbers (not Infinity or NaN) can be passed as arguments");return $}else if(typeof $==="bigint"){if($<K29||$>U29)throw RangeError("bigint is too large to be represented as a 64-bit integer and passed as argument");return $}else if(typeof $==="boolean")switch(Y){case"bigint":return $?1n:0n;case"string":return $?"1":"0";default:return $?1:0}else if($ instanceof ArrayBuffer)return wF4.from($);else if($ instanceof Date)return $.valueOf();else if($===void 0)throw TypeError("undefined cannot be passed as argument to the database");else return $}var K29=-9223372036854775808n,U29=9223372036854775807n;function CF4($,Y){try{$.exec(Y)}catch(X){throw SF4(X)}}function SF4($){if($ instanceof $p.default.SqliteError)return new P6($.message,$.code,$.rawCode,$);return $}var nD;if(typeof WebSocket<"u")nD=WebSocket;else if(typeof global<"u")nD=global.WebSocket;else if(typeof window<"u")nD=window.WebSocket;else if(typeof self<"u")nD=self.WebSocket;class gT{constructor(){this.intMode="number"}intMode}class j9 extends Error{constructor($){super($);this.name="ClientError"}}class K6 extends j9{constructor($){super($);this.name="ProtoError"}}class Yp extends j9{code;proto;constructor($,Y){super($);this.name="ResponseError",this.code=Y.code,this.proto=Y,this.stack=void 0}}class S$ extends j9{constructor($,Y){if(Y!==void 0){super(`${$}: ${Y}`);this.cause=Y}else super($);this.name="ClosedError"}}class Xp extends j9{constructor($){super($);this.name="WebSocketUnsupportedError"}}class mT extends j9{constructor($){super($);this.name="WebSocketError"}}class BM extends j9{status;constructor($,Y){super($);this.status=Y,this.name="HttpServerError"}}class D3 extends j9{constructor($){super($);this.name="ProtocolVersionError"}}class NG extends j9{constructor($){super($);this.name="InternalError"}}class QH extends j9{constructor($){super($);this.name="MisuseError"}}function vQ($){if(typeof $==="string")return $;throw uT($,"string")}function dW($){if($===null||$===void 0)return;else if(typeof $==="string")return $;throw uT($,"string or null")}function RV($){if(typeof $==="number")return $;throw uT($,"number")}function rD($){if(typeof $==="boolean")return $;throw uT($,"boolean")}function Gp($){if(Array.isArray($))return $;throw uT($,"array")}function r$($){if($!==null&&typeof $==="object"&&!Array.isArray($))return $;throw uT($,"object")}function N3($,Y){return Gp($).map((X)=>Y(r$(X)))}function uT($,Y){if($===void 0)return new K6(`Expected ${Y}, but the property was missing`);let X=typeof $;if($===null)X="null";else if(Array.isArray($))X="array";return new K6(`Expected ${Y}, received ${X}`)}function OM($,Y){return Y(r$($))}class kF4{#$;#Y;constructor($){this.#$=$,this.#Y=!1}begin(){this.#$.push("{"),this.#Y=!0}end(){this.#$.push("}"),this.#Y=!1}#X($){if(this.#Y)this.#$.push('"'),this.#Y=!1;else this.#$.push(',"');this.#$.push($),this.#$.push('":')}string($,Y){this.#X($),this.#$.push(JSON.stringify(Y))}stringRaw($,Y){this.#X($),this.#$.push('"'),this.#$.push(Y),this.#$.push('"')}number($,Y){this.#X($),this.#$.push(""+Y)}boolean($,Y){this.#X($),this.#$.push(Y?"true":"false")}object($,Y,X){this.#X($),this.begin(),X(this,Y),this.end()}arrayObjects($,Y,X){this.#X($),this.#$.push("[");for(let G=0;G<Y.length;++G){if(G!==0)this.#$.push(",");this.begin(),X(this,Y[G]),this.end()}this.#$.push("]")}}function Jp($,Y){let X=[],G=new kF4(X);return G.begin(),Y(G,$),G.end(),X.join("")}var EM=0,Qp=1,Wp=2;var vF4=5;class xF4{#$;#Y;#X;constructor($){this.#$=$,this.#Y=new DataView($.buffer,$.byteOffset,$.byteLength),this.#X=0}varint(){let $=0;for(let Y=0;;Y+=7){let X=this.#$[this.#X++];if($|=(X&127)<<Y,!(X&128))break}return $}varintBig(){let $=0n;for(let Y=0n;;Y+=7n){let X=this.#$[this.#X++];if($|=BigInt(X&127)<<Y,!(X&128))break}return $}bytes($){let Y=new Uint8Array(this.#$.buffer,this.#$.byteOffset+this.#X,$);return this.#X+=$,Y}double(){let $=this.#Y.getFloat64(this.#X,!0);return this.#X+=8,$}skipVarint(){for(;;)if(!(this.#$[this.#X++]&128))break}skip($){this.#X+=$}eof(){return this.#X>=this.#$.byteLength}}class yF4{#$;#Y;constructor($){this.#$=$,this.#Y=-1}setup($){this.#Y=$}#X($){if(this.#Y!==$)throw new K6(`Expected wire type ${$}, got ${this.#Y}`);this.#Y=-1}bytes(){this.#X(Wp);let $=this.#$.varint();return this.#$.bytes($)}string(){return new TextDecoder().decode(this.bytes())}message($){return aD(this.bytes(),$)}int32(){return this.#X(EM),this.#$.varint()}uint32(){return this.int32()}bool(){return this.int32()!==0}uint64(){return this.#X(EM),this.#$.varintBig()}sint64(){let $=this.uint64();return $>>1n^-($&1n)}double(){return this.#X(Qp),this.#$.double()}maybeSkip(){if(this.#Y<0)return;else if(this.#Y===EM)this.#$.skipVarint();else if(this.#Y===Qp)this.#$.skip(8);else if(this.#Y===Wp){let $=this.#$.varint();this.#$.skip($)}else if(this.#Y===vF4)this.#$.skip(4);else throw new K6(`Unexpected wire type ${this.#Y}`);this.#Y=-1}}function aD($,Y){let X=new xF4($),G=new yF4(X),J=Y.default();while(!X.eof()){let Q=X.varint(),W=Q>>3,Z=Q&7;G.setup(Z);let K=Y[W];if(K!==void 0){let H=K(G,J);if(H!==void 0)J=H}G.maybeSkip()}return J}class iu0{#$;#Y;#X;#J;constructor(){this.#$=new ArrayBuffer(256),this.#Y=new Uint8Array(this.#$),this.#X=new DataView(this.#$),this.#J=0}#G($){if(this.#J+$<=this.#$.byteLength)return;let Y=this.#$.byteLength;while(Y<this.#J+$)Y*=2;let X=new ArrayBuffer(Y),G=new Uint8Array(X),J=new DataView(X);G.set(new Uint8Array(this.#$,0,this.#J)),this.#$=X,this.#Y=G,this.#X=J}#Q($){this.#G(5),$=0|$;do{let Y=$&127;$>>>=7,Y|=$?128:0,this.#Y[this.#J++]=Y}while($)}#U($){this.#G(10),$=$&0xffffffffffffffffn;do{let Y=Number($&0x7fn);$>>=7n,Y|=$?128:0,this.#Y[this.#J++]=Y}while($)}#K($,Y){this.#Q($<<3|Y)}bytes($,Y){this.#K($,Wp),this.#Q(Y.byteLength),this.#G(Y.byteLength),this.#Y.set(Y,this.#J),this.#J+=Y.byteLength}string($,Y){this.bytes($,new TextEncoder().encode(Y))}message($,Y,X){let G=new iu0;X(G,Y),this.bytes($,G.data())}int32($,Y){this.#K($,EM),this.#Q(Y)}uint32($,Y){this.int32($,Y)}bool($,Y){this.int32($,Y?1:0)}sint64($,Y){this.#K($,EM),this.#U(Y<<1n^Y>>63n)}double($,Y){this.#K($,Qp),this.#G(8),this.#X.setFloat64(this.#J,Y,!0),this.#J+=8}data(){return new Uint8Array(this.#$,0,this.#J)}}function Zp($,Y){let X=new iu0;return Y(X,$),X.data()}class sD{#$;#Y;constructor(){this.#$=new Set,this.#Y=new Set}alloc(){for(let Y of this.#Y){if(this.#Y.delete(Y),this.#$.add(Y),!this.#$.has(this.#$.size-1))this.#Y.add(this.#$.size-1);return Y}let $=this.#$.size;return this.#$.add($),$}free($){if(!this.#$.delete($))throw new NG("Freeing an id that is not allocated");if(this.#Y.delete(this.#$.size),$<this.#$.size)this.#Y.add($)}}function D9($,Y){throw new NG(Y)}function pT($){if($===null)return null;else if(typeof $==="string")return $;else if(typeof $==="number"){if(!Number.isFinite($))throw RangeError("Only finite numbers (not Infinity or NaN) can be passed as arguments");return $}else if(typeof $==="bigint"){if($<z29||$>V29)throw RangeError("This bigint value is too large to be represented as a 64-bit integer and passed as argument");return $}else if(typeof $==="boolean")return $?1n:0n;else if($ instanceof ArrayBuffer)return new Uint8Array($);else if($ instanceof Uint8Array)return $;else if($ instanceof Date)return+$.valueOf();else if(typeof $==="object")return""+$.toString();else throw TypeError("Unsupported type of value")}var z29=-9223372036854775808n,V29=9223372036854775807n;function nu0($,Y){if($===null)return null;else if(typeof $==="number")return $;else if(typeof $==="string")return $;else if(typeof $==="bigint")if(Y==="number"){let X=Number($);if(!Number.isSafeInteger(X))throw RangeError("Received integer which is too large to be safely represented as a JavaScript number");return X}else if(Y==="bigint")return $;else if(Y==="string")return""+$;else throw new QH("Invalid value for IntMode");else if($ instanceof Uint8Array)return $.slice().buffer;else if($===void 0)throw new K6("Received unrecognized type of Value");else throw D9($,"Impossible type of Value")}function MM($){return{affectedRowCount:$.affectedRowCount,lastInsertRowid:$.lastInsertRowid,columnNames:$.cols.map((Y)=>Y.name),columnDecltypes:$.cols.map((Y)=>Y.decltype)}}function c$0($,Y){let X=MM($),G=$.rows.map((J)=>bF4(X.columnNames,J,Y));return{...X,rows:G}}function l$0($,Y){let X=MM($),G;if($.rows.length>0)G=bF4(X.columnNames,$.rows[0],Y);return{...X,row:G}}function i$0($,Y){let X=MM($),G;if($.rows.length>0&&X.columnNames.length>0)G=nu0($.rows[0][0],Y);return{...X,value:G}}function bF4($,Y,X){let G={};Object.defineProperty(G,"length",{value:Y.length});for(let J=0;J<Y.length;++J){let Q=nu0(Y[J],X);Object.defineProperty(G,J,{value:Q});let W=$[J];if(W!==void 0&&!Object.hasOwn(G,W))Object.defineProperty(G,W,{value:Q,enumerable:!0,configurable:!0,writable:!0})}return G}function qV($){return new Yp($.message,$)}class RM{#$;#Y;#X;constructor($,Y){this.#$=$,this.#Y=Y,this.#X=void 0}_getSqlId($){if(this.#$!==$)throw new QH("Attempted to use SQL text opened with other object");else if(this.#X!==void 0)throw new S$("SQL text is closed",this.#X);return this.#Y}close(){this._setClosed(new j9("SQL text was manually closed"))}_setClosed($){if(this.#X===void 0)this.#X=$,this.#$._closeSql(this.#Y)}get closed(){return this.#X!==void 0}}function Kp($,Y){if(Y instanceof RM)return{sqlId:Y._getSqlId($)};else return{sql:""+Y}}class oD{#$;#Y;constructor(){this.#$=[],this.#Y=[]}get length(){return this.#$.length+this.#Y.length}push($){this.#$.push($)}shift(){if(this.#Y.length===0&&this.#$.length>0)this.#Y=this.#$.reverse(),this.#$=[];return this.#Y.pop()}first(){return this.#Y.length!==0?this.#Y[this.#Y.length-1]:this.#$[0]}}class Up{sql;_args;_namedArgs;constructor($){this.sql=$,this._args=[],this._namedArgs=new Map}bindIndexes($){this._args.length=0;for(let Y of $)this._args.push(pT(Y));return this}bindIndex($,Y){if($!==($|0)||$<=0)throw RangeError("Index of a positional argument must be positive integer");while(this._args.length<$)this._args.push(null);return this._args[$-1]=pT(Y),this}bindName($,Y){return this._namedArgs.set($,pT(Y)),this}unbindAll(){return this._args.length=0,this._namedArgs.clear(),this}}function n$0($,Y,X){let G,J=[],Q=[];if(Y instanceof Up){G=Y.sql,J=Y._args;for(let[K,H]of Y._namedArgs.entries())Q.push({name:K,value:H})}else if(Array.isArray(Y))if(G=Y[0],Array.isArray(Y[1]))J=Y[1].map((K)=>pT(K));else Q=Object.entries(Y[1]).map(([K,H])=>{return{name:K,value:pT(H)}});else G=Y;let{sql:W,sqlId:Z}=Kp($,G);return{sql:W,sqlId:Z,args:J,namedArgs:Q,wantRows:X}}class r$0{_stream;#$;_steps;#Y;constructor($,Y){this._stream=$,this.#$=Y,this._steps=[],this.#Y=!1}step(){return new ru0(this)}execute(){if(this.#Y)throw new QH("This batch has already been executed");this.#Y=!0;let $={steps:this._steps.map((Y)=>Y.proto)};if(this.#$)return F29(this._stream,this._steps,$);else return A29(this._stream,this._steps,$)}}function A29($,Y,X){return $._batch(X).then((G)=>{for(let J=0;J<Y.length;++J){let Q=G.stepResults.get(J),W=G.stepErrors.get(J);Y[J].callback(Q,W)}})}async function F29($,Y,X){let G=await $._openCursor(X);try{let J=0,Q=void 0,W=[];for(;;){let Z=await G.next();if(Z===void 0)break;if(Z.type==="step_begin"){if(Z.step<J||Z.step>=Y.length)throw new K6("Server produced StepBeginEntry for unexpected step");else if(Q!==void 0)throw new K6("Server produced StepBeginEntry before terminating previous step");for(let K=J;K<Z.step;++K)Y[K].callback(void 0,void 0);J=Z.step+1,Q=Z,W=[]}else if(Z.type==="step_end"){if(Q===void 0)throw new K6("Server produced StepEndEntry but no step is active");let K={cols:Q.cols,rows:W,affectedRowCount:Z.affectedRowCount,lastInsertRowid:Z.lastInsertRowid};Y[Q.step].callback(K,void 0),Q=void 0,W=[]}else if(Z.type==="step_error"){if(Q===void 0){if(Z.step>=Y.length)throw new K6("Server produced StepErrorEntry for unexpected step");for(let K=J;K<Z.step;++K)Y[K].callback(void 0,void 0)}else{if(Z.step!==Q.step)throw new K6("Server produced StepErrorEntry for unexpected step");Q=void 0,W=[]}Y[Z.step].callback(void 0,Z.error),J=Z.step+1}else if(Z.type==="row"){if(Q===void 0)throw new K6("Server produced RowEntry but no step is active");W.push(Z.row)}else if(Z.type==="error")throw qV(Z.error);else if(Z.type==="none")throw new K6("Server produced unrecognized CursorEntry");else throw D9(Z,"Impossible CursorEntry")}if(Q!==void 0)throw new K6("Server closed Cursor before terminating active step");for(let Z=J;Z<Y.length;++Z)Y[Z].callback(void 0,void 0)}finally{G.close()}}class ru0{_batch;#$;_index;constructor($){this._batch=$,this.#$=[],this._index=void 0}condition($){return this.#$.push($._proto),this}query($){return this.#Y($,!0,c$0)}queryRow($){return this.#Y($,!0,l$0)}queryValue($){return this.#Y($,!0,i$0)}run($){return this.#Y($,!1,MM)}#Y($,Y,X){if(this._index!==void 0)throw new QH("This BatchStep has already been added to the batch");let G=n$0(this._batch._stream._sqlOwner(),$,Y),J;if(this.#$.length===0)J=void 0;else if(this.#$.length===1)J=this.#$[0];else J={type:"and",conds:this.#$.slice()};let Q={stmt:G,condition:J};return new Promise((W,Z)=>{let K=(H,z)=>{if(H!==void 0&&z!==void 0)Z(new K6("Server returned both result and error"));else if(z!==void 0)Z(qV(z));else if(H!==void 0)W(X(H,this._batch._stream.intMode));else W(void 0)};this._index=this._batch._steps.length,this._batch._steps.push({proto:Q,callback:K})})}}class m7{_batch;_proto;constructor($,Y){this._batch=$,this._proto=Y}static ok($){return new m7($._batch,{type:"ok",step:hF4($)})}static error($){return new m7($._batch,{type:"error",step:hF4($)})}static not($){return new m7($._batch,{type:"not",cond:$._proto})}static and($,Y){for(let X of Y)fF4($,X);return new m7($,{type:"and",conds:Y.map((X)=>X._proto)})}static or($,Y){for(let X of Y)fF4($,X);return new m7($,{type:"or",conds:Y.map((X)=>X._proto)})}static isAutocommit($){return $._stream.client()._ensureVersion(3,"BatchCond.isAutocommit()"),new m7($,{type:"is_autocommit"})}}function hF4($){if($._index===void 0)throw new QH("Cannot add a condition referencing a step that has not been added to the batch");return $._index}function fF4($,Y){if(Y._batch!==$)throw new QH("Cannot mix BatchCond objects for different Batch objects")}function gF4($){return{paramNames:$.params.map((Y)=>Y.name),columns:$.cols,isExplain:$.isExplain,isReadonly:$.isReadonly}}class dT{constructor($){this.intMode=$}query($){return this.#$($,!0,c$0)}queryRow($){return this.#$($,!0,l$0)}queryValue($){return this.#$($,!0,i$0)}run($){return this.#$($,!1,MM)}#$($,Y,X){let G=n$0(this._sqlOwner(),$,Y);return this._execute(G).then((J)=>X(J,this.intMode))}batch($=!1){return new r$0(this,$)}describe($){let Y=Kp(this._sqlOwner(),$);return this._describe(Y).then(gF4)}sequence($){let Y=Kp(this._sqlOwner(),$);return this._sequence(Y)}intMode}class Hp{}var D29=1000,N29=10;class au0 extends Hp{#$;#Y;#X;#J;#G;#Q;#U;constructor($,Y,X){super();this.#$=$,this.#Y=Y,this.#X=X,this.#J=new oD,this.#G=new oD,this.#Q=void 0,this.#U=!1}async next(){for(;;){if(this.#Q!==void 0)throw new S$("Cursor is closed",this.#Q);while(!this.#U&&this.#G.length<N29)this.#G.push(this.#K());let $=this.#J.shift();if(this.#U||$!==void 0)return $;await this.#G.shift().then((Y)=>{if(Y===void 0)return;for(let X of Y.entries)this.#J.push(X);this.#U||=Y.done})}}#K(){return this.#Y._sendCursorRequest(this,{type:"fetch_cursor",cursorId:this.#X,maxCount:D29}).then(($)=>$,($)=>{this._setClosed($);return})}_setClosed($){if(this.#Q!==void 0)return;this.#Q=$,this.#Y._sendCursorRequest(this,{type:"close_cursor",cursorId:this.#X}).catch(()=>{return}),this.#Y._cursorClosed(this)}close(){this._setClosed(new j9("Cursor was manually closed"))}get closed(){return this.#Q!==void 0}}class zp extends dT{#$;#Y;#X;#J;#G;#Q;static open($){let Y=$._streamIdAlloc.alloc(),X=new zp($,Y),G=()=>{return},J=(W)=>X.#H(W),Q={type:"open_stream",streamId:Y};return $._sendRequest(Q,{responseCallback:G,errorCallback:J}),X}constructor($,Y){super($.intMode);this.#$=$,this.#Y=Y,this.#X=new oD,this.#J=void 0,this.#G=!1,this.#Q=void 0}client(){return this.#$}_sqlOwner(){return this.#$}_execute($){return this.#U({type:"execute",streamId:this.#Y,stmt:$}).then((Y)=>{return Y.result})}_batch($){return this.#U({type:"batch",streamId:this.#Y,batch:$}).then((Y)=>{return Y.result})}_describe($){return this.#$._ensureVersion(2,"describe()"),this.#U({type:"describe",streamId:this.#Y,sql:$.sql,sqlId:$.sqlId}).then((Y)=>{return Y.result})}_sequence($){return this.#$._ensureVersion(2,"sequence()"),this.#U({type:"sequence",streamId:this.#Y,sql:$.sql,sqlId:$.sqlId}).then((Y)=>{return})}getAutocommit(){return this.#$._ensureVersion(3,"getAutocommit()"),this.#U({type:"get_autocommit",streamId:this.#Y}).then(($)=>{return $.isAutocommit})}#U($){return new Promise((Y,X)=>{this.#K({type:"request",request:$,responseCallback:Y,errorCallback:X})})}_openCursor($){return this.#$._ensureVersion(3,"cursor"),new Promise((Y,X)=>{this.#K({type:"cursor",batch:$,cursorCallback:Y,errorCallback:X})})}_sendCursorRequest($,Y){if($!==this.#J)throw new NG("Cursor not associated with the stream attempted to execute a request");return new Promise((X,G)=>{if(this.#Q!==void 0)G(new S$("Stream is closed",this.#Q));else this.#$._sendRequest(Y,{responseCallback:X,errorCallback:G})})}_cursorClosed($){if($!==this.#J)throw new NG("Cursor was closed, but it was not associated with the stream");this.#J=void 0,this.#W()}#K($){if(this.#Q!==void 0)$.errorCallback(new S$("Stream is closed",this.#Q));else if(this.#G)$.errorCallback(new S$("Stream is closing",void 0));else this.#X.push($),this.#W()}#W(){for(;;){let $=this.#X.first();if($===void 0&&this.#J===void 0&&this.#G){this.#H(new j9("Stream was gracefully closed"));break}else if($?.type==="request"&&this.#J===void 0){let{request:Y,responseCallback:X,errorCallback:G}=$;this.#X.shift(),this.#$._sendRequest(Y,{responseCallback:X,errorCallback:G})}else if($?.type==="cursor"&&this.#J===void 0){let{batch:Y,cursorCallback:X}=$;this.#X.shift();let G=this.#$._cursorIdAlloc.alloc(),J=new au0(this.#$,this,G),Q={type:"open_cursor",streamId:this.#Y,cursorId:G,batch:Y},W=()=>{return},Z=(K)=>J._setClosed(K);this.#$._sendRequest(Q,{responseCallback:W,errorCallback:Z}),this.#J=J,X(J)}else break}}#H($){if(this.#Q!==void 0)return;if(this.#Q=$,this.#J!==void 0)this.#J._setClosed($);for(;;){let J=this.#X.shift();if(J!==void 0)J.errorCallback($);else break}let Y={type:"close_stream",streamId:this.#Y},X=()=>this.#$._streamIdAlloc.free(this.#Y),G=()=>{return};this.#$._sendRequest(Y,{responseCallback:X,errorCallback:G})}close(){this.#H(new j9("Stream was manually closed"))}closeGracefully(){this.#G=!0,this.#W()}get closed(){return this.#Q!==void 0||this.#G}}function Vp($,Y){if(Y.sql!==void 0)$.string("sql",Y.sql);if(Y.sqlId!==void 0)$.number("sql_id",Y.sqlId);$.arrayObjects("args",Y.args,mF4),$.arrayObjects("named_args",Y.namedArgs,L29),$.boolean("want_rows",Y.wantRows)}function L29($,Y){$.string("name",Y.name),$.object("value",Y.value,mF4)}function cT($,Y){$.arrayObjects("steps",Y.steps,B29)}function B29($,Y){if(Y.condition!==void 0)$.object("condition",Y.condition,su0);$.object("stmt",Y.stmt,Vp)}function su0($,Y){if($.stringRaw("type",Y.type),Y.type==="ok"||Y.type==="error")$.number("step",Y.step);else if(Y.type==="not")$.object("cond",Y.cond,su0);else if(Y.type==="and"||Y.type==="or")$.arrayObjects("conds",Y.conds,su0);else if(Y.type==="is_autocommit");else throw D9(Y,"Impossible type of BatchCond")}function mF4($,Y){if(Y===null)$.stringRaw("type","null");else if(typeof Y==="bigint")$.stringRaw("type","integer"),$.stringRaw("value",""+Y);else if(typeof Y==="number")$.stringRaw("type","float"),$.number("value",Y);else if(typeof Y==="string")$.stringRaw("type","text"),$.string("value",Y);else if(Y instanceof Uint8Array)$.stringRaw("type","blob"),$.stringRaw("base64",bT.fromUint8Array(Y));else if(Y===void 0);else throw D9(Y,"Impossible type of Value")}function uF4($,Y){if($.stringRaw("type",Y.type),Y.type==="hello"){if(Y.jwt!==void 0)$.string("jwt",Y.jwt)}else if(Y.type==="request")$.number("request_id",Y.requestId),$.object("request",Y.request,O29);else throw D9(Y,"Impossible type of ClientMsg")}function O29($,Y){if($.stringRaw("type",Y.type),Y.type==="open_stream")$.number("stream_id",Y.streamId);else if(Y.type==="close_stream")$.number("stream_id",Y.streamId);else if(Y.type==="execute")$.number("stream_id",Y.streamId),$.object("stmt",Y.stmt,Vp);else if(Y.type==="batch")$.number("stream_id",Y.streamId),$.object("batch",Y.batch,cT);else if(Y.type==="open_cursor")$.number("stream_id",Y.streamId),$.number("cursor_id",Y.cursorId),$.object("batch",Y.batch,cT);else if(Y.type==="close_cursor")$.number("cursor_id",Y.cursorId);else if(Y.type==="fetch_cursor")$.number("cursor_id",Y.cursorId),$.number("max_count",Y.maxCount);else if(Y.type==="sequence"){if($.number("stream_id",Y.streamId),Y.sql!==void 0)$.string("sql",Y.sql);if(Y.sqlId!==void 0)$.number("sql_id",Y.sqlId)}else if(Y.type==="describe"){if($.number("stream_id",Y.streamId),Y.sql!==void 0)$.string("sql",Y.sql);if(Y.sqlId!==void 0)$.number("sql_id",Y.sqlId)}else if(Y.type==="store_sql")$.number("sql_id",Y.sqlId),$.string("sql",Y.sql);else if(Y.type==="close_sql")$.number("sql_id",Y.sqlId);else if(Y.type==="get_autocommit")$.number("stream_id",Y.streamId);else throw D9(Y,"Impossible type of Request")}function Ap($,Y){if(Y.sql!==void 0)$.string(1,Y.sql);if(Y.sqlId!==void 0)$.int32(2,Y.sqlId);for(let X of Y.args)$.message(3,X,dF4);for(let X of Y.namedArgs)$.message(4,X,E29);$.bool(5,Y.wantRows)}function E29($,Y){$.string(1,Y.name),$.message(2,Y.value,dF4)}function lT($,Y){for(let X of Y.steps)$.message(1,X,M29)}function M29($,Y){if(Y.condition!==void 0)$.message(1,Y.condition,ou0);$.message(2,Y.stmt,Ap)}function ou0($,Y){if(Y.type==="ok")$.uint32(1,Y.step);else if(Y.type==="error")$.uint32(2,Y.step);else if(Y.type==="not")$.message(3,Y.cond,ou0);else if(Y.type==="and")$.message(4,Y.conds,pF4);else if(Y.type==="or")$.message(5,Y.conds,pF4);else if(Y.type==="is_autocommit")$.message(6,void 0,cF4);else throw D9(Y,"Impossible type of BatchCond")}function pF4($,Y){for(let X of Y)$.message(1,X,ou0)}function dF4($,Y){if(Y===null)$.message(1,void 0,cF4);else if(typeof Y==="bigint")$.sint64(2,Y);else if(typeof Y==="number")$.double(3,Y);else if(typeof Y==="string")$.string(4,Y);else if(Y instanceof Uint8Array)$.bytes(5,Y);else if(Y===void 0);else throw D9(Y,"Impossible type of Value")}function cF4($,Y){}function lF4($,Y){if(Y.type==="hello")$.message(1,Y,R29);else if(Y.type==="request")$.message(2,Y,q29);else throw D9(Y,"Impossible type of ClientMsg")}function R29($,Y){if(Y.jwt!==void 0)$.string(1,Y.jwt)}function q29($,Y){$.int32(1,Y.requestId);let X=Y.request;if(X.type==="open_stream")$.message(2,X,I29);else if(X.type==="close_stream")$.message(3,X,P29);else if(X.type==="execute")$.message(4,X,w29);else if(X.type==="batch")$.message(5,X,_29);else if(X.type==="open_cursor")$.message(6,X,j29);else if(X.type==="close_cursor")$.message(7,X,T29);else if(X.type==="fetch_cursor")$.message(8,X,C29);else if(X.type==="sequence")$.message(9,X,S29);else if(X.type==="describe")$.message(10,X,k29);else if(X.type==="store_sql")$.message(11,X,v29);else if(X.type==="close_sql")$.message(12,X,x29);else if(X.type==="get_autocommit")$.message(13,X,y29);else throw D9(X,"Impossible type of Request")}function I29($,Y){$.int32(1,Y.streamId)}function P29($,Y){$.int32(1,Y.streamId)}function w29($,Y){$.int32(1,Y.streamId),$.message(2,Y.stmt,Ap)}function _29($,Y){$.int32(1,Y.streamId),$.message(2,Y.batch,lT)}function j29($,Y){$.int32(1,Y.streamId),$.int32(2,Y.cursorId),$.message(3,Y.batch,lT)}function T29($,Y){$.int32(1,Y.cursorId)}function C29($,Y){$.int32(1,Y.cursorId),$.uint32(2,Y.maxCount)}function S29($,Y){if($.int32(1,Y.streamId),Y.sql!==void 0)$.string(2,Y.sql);if(Y.sqlId!==void 0)$.int32(3,Y.sqlId)}function k29($,Y){if($.int32(1,Y.streamId),Y.sql!==void 0)$.string(2,Y.sql);if(Y.sqlId!==void 0)$.int32(3,Y.sqlId)}function v29($,Y){$.int32(1,Y.sqlId),$.string(2,Y.sql)}function x29($,Y){$.int32(1,Y.sqlId)}function y29($,Y){$.int32(1,Y.streamId)}function tD($){let Y=vQ($.message),X=dW($.code);return{message:Y,code:X}}function Fp($){let Y=N3($.cols,iF4),X=Gp($.rows).map((W)=>N3(W,nF4)),G=RV($.affected_row_count),J=dW($.last_insert_rowid),Q=J!==void 0?BigInt(J):void 0;return{cols:Y,rows:X,affectedRowCount:G,lastInsertRowid:Q}}function iF4($){let Y=dW($.name),X=dW($.decltype);return{name:Y,decltype:X}}function a$0($){let Y=new Map;Gp($.step_results).forEach((G,J)=>{if(G!==null)Y.set(J,Fp(r$(G)))});let X=new Map;return Gp($.step_errors).forEach((G,J)=>{if(G!==null)X.set(J,tD(r$(G)))}),{stepResults:Y,stepErrors:X}}function s$0($){let Y=vQ($.type);if(Y==="step_begin"){let X=RV($.step),G=N3($.cols,iF4);return{type:"step_begin",step:X,cols:G}}else if(Y==="step_end"){let X=RV($.affected_row_count),G=dW($.last_insert_rowid),J=G!==void 0?BigInt(G):void 0;return{type:"step_end",affectedRowCount:X,lastInsertRowid:J}}else if(Y==="step_error"){let X=RV($.step),G=tD(r$($.error));return{type:"step_error",step:X,error:G}}else if(Y==="row")return{type:"row",row:N3($.row,nF4)};else if(Y==="error")return{type:"error",error:tD(r$($.error))};else throw new K6("Unexpected type of CursorEntry")}function o$0($){let Y=N3($.params,b29),X=N3($.cols,h29),G=rD($.is_explain),J=rD($.is_readonly);return{params:Y,cols:X,isExplain:G,isReadonly:J}}function b29($){return{name:dW($.name)}}function h29($){let Y=vQ($.name),X=dW($.decltype);return{name:Y,decltype:X}}function nF4($){let Y=vQ($.type);if(Y==="null")return null;else if(Y==="integer"){let X=vQ($.value);return BigInt(X)}else if(Y==="float")return RV($.value);else if(Y==="text")return vQ($.value);else if(Y==="blob")return bT.toUint8Array(vQ($.base64));else throw new K6("Unexpected type of Value")}function rF4($){let Y=vQ($.type);if(Y==="hello_ok")return{type:"hello_ok"};else if(Y==="hello_error")return{type:"hello_error",error:tD(r$($.error))};else if(Y==="response_ok"){let X=RV($.request_id),G=f29(r$($.response));return{type:"response_ok",requestId:X,response:G}}else if(Y==="response_error"){let X=RV($.request_id),G=tD(r$($.error));return{type:"response_error",requestId:X,error:G}}else throw new K6("Unexpected type of ServerMsg")}function f29($){let Y=vQ($.type);if(Y==="open_stream")return{type:"open_stream"};else if(Y==="close_stream")return{type:"close_stream"};else if(Y==="execute")return{type:"execute",result:Fp(r$($.result))};else if(Y==="batch")return{type:"batch",result:a$0(r$($.result))};else if(Y==="open_cursor")return{type:"open_cursor"};else if(Y==="close_cursor")return{type:"close_cursor"};else if(Y==="fetch_cursor"){let X=N3($.entries,s$0),G=rD($.done);return{type:"fetch_cursor",entries:X,done:G}}else if(Y==="sequence")return{type:"sequence"};else if(Y==="describe")return{type:"describe",result:o$0(r$($.result))};else if(Y==="store_sql")return{type:"store_sql"};else if(Y==="close_sql")return{type:"close_sql"};else if(Y==="get_autocommit")return{type:"get_autocommit",isAutocommit:rD($.is_autocommit)};else throw new K6("Unexpected type of Response")}var U2={default(){return{message:"",code:void 0}},1($,Y){Y.message=$.string()},2($,Y){Y.code=$.string()}},eD={default(){return{cols:[],rows:[],affectedRowCount:0,lastInsertRowid:void 0}},1($,Y){Y.cols.push($.message(aF4))},2($,Y){Y.rows.push($.message(sF4))},3($,Y){Y.affectedRowCount=Number($.uint64())},4($,Y){Y.lastInsertRowid=$.sint64()}},aF4={default(){return{name:void 0,decltype:void 0}},1($,Y){Y.name=$.string()},2($,Y){Y.decltype=$.string()}},sF4={default(){return[]},1($,Y){Y.push($.message(i29))}},iT={default(){return{stepResults:new Map,stepErrors:new Map}},1($,Y){let[X,G]=$.message(g29);Y.stepResults.set(X,G)},2($,Y){let[X,G]=$.message(m29);Y.stepErrors.set(X,G)}},g29={default(){return[0,eD.default()]},1($,Y){Y[0]=$.uint32()},2($,Y){Y[1]=$.message(eD)}},m29={default(){return[0,U2.default()]},1($,Y){Y[0]=$.uint32()},2($,Y){Y[1]=$.message(U2)}},t$0={default(){return{type:"none"}},1($){return $.message(u29)},2($){return $.message(p29)},3($){return $.message(d29)},4($){return{type:"row",row:$.message(sF4)}},5($){return{type:"error",error:$.message(U2)}}},u29={default(){return{type:"step_begin",step:0,cols:[]}},1($,Y){Y.step=$.uint32()},2($,Y){Y.cols.push($.message(aF4))}},p29={default(){return{type:"step_end",affectedRowCount:0,lastInsertRowid:void 0}},1($,Y){Y.affectedRowCount=$.uint32()},2($,Y){Y.lastInsertRowid=$.uint64()}},d29={default(){return{type:"step_error",step:0,error:U2.default()}},1($,Y){Y.step=$.uint32()},2($,Y){Y.error=$.message(U2)}},nT={default(){return{params:[],cols:[],isExplain:!1,isReadonly:!1}},1($,Y){Y.params.push($.message(c29))},2($,Y){Y.cols.push($.message(l29))},3($,Y){Y.isExplain=$.bool()},4($,Y){Y.isReadonly=$.bool()}},c29={default(){return{name:void 0}},1($,Y){Y.name=$.string()}},l29={default(){return{name:"",decltype:void 0}},1($,Y){Y.name=$.string()},2($,Y){Y.decltype=$.string()}},i29={default(){return},1($){return null},2($){return $.sint64()},3($){return $.double()},4($){return $.string()},5($){return $.bytes()}};var oF4={default(){return{type:"none"}},1($){return{type:"hello_ok"}},2($){return $.message(n29)},3($){return $.message(a29)},4($){return $.message(r29)}},n29={default(){return{type:"hello_error",error:U2.default()}},1($,Y){Y.error=$.message(U2)}},r29={default(){return{type:"response_error",requestId:0,error:U2.default()}},1($,Y){Y.requestId=$.int32()},2($,Y){Y.error=$.message(U2)}},a29={default(){return{type:"response_ok",requestId:0,response:{type:"none"}}},1($,Y){Y.requestId=$.int32()},2($,Y){Y.response={type:"open_stream"}},3($,Y){Y.response={type:"close_stream"}},4($,Y){Y.response=$.message(s29)},5($,Y){Y.response=$.message(o29)},6($,Y){Y.response={type:"open_cursor"}},7($,Y){Y.response={type:"close_cursor"}},8($,Y){Y.response=$.message(t29)},9($,Y){Y.response={type:"sequence"}},10($,Y){Y.response=$.message(e29)},11($,Y){Y.response={type:"store_sql"}},12($,Y){Y.response={type:"close_sql"}},13($,Y){Y.response=$.message($K9)}},s29={default(){return{type:"execute",result:eD.default()}},1($,Y){Y.result=$.message(eD)}},o29={default(){return{type:"batch",result:iT.default()}},1($,Y){Y.result=$.message(iT)}},t29={default(){return{type:"fetch_cursor",entries:[],done:!1}},1($,Y){Y.entries.push($.message(t$0))},2($,Y){Y.done=$.bool()}},e29={default(){return{type:"describe",result:nT.default()}},1($,Y){Y.result=$.message(nT)}},$K9={default(){return{type:"get_autocommit",isAutocommit:!1}},1($,Y){Y.isAutocommit=$.bool()}};var tF4=new Map([["hrana2",{version:2,encoding:"json"}],["hrana1",{version:1,encoding:"json"}]]),tu0=new Map([["hrana3-protobuf",{version:3,encoding:"protobuf"}],["hrana3",{version:3,encoding:"json"}],["hrana2",{version:2,encoding:"json"}],["hrana1",{version:1,encoding:"json"}]]);class e$0 extends gT{#$;#Y;#X;#J;#G;#Q;#U;#K;#W;_streamIdAlloc;_cursorIdAlloc;#H;constructor($,Y){super();this.#$=$,this.#Y=[],this.#X=!1,this.#J=void 0,this.#G=!1,this.#Q=void 0,this.#U=!1,this.#K=new Map,this.#W=new sD,this._streamIdAlloc=new sD,this._cursorIdAlloc=new sD,this.#H=new sD,this.#$.binaryType="arraybuffer",this.#$.addEventListener("open",()=>this.#V()),this.#$.addEventListener("close",(X)=>this.#O(X)),this.#$.addEventListener("error",(X)=>this.#L(X)),this.#$.addEventListener("message",(X)=>this.#B(X)),this.#A({type:"hello",jwt:Y})}#A($){if(this.#J!==void 0)throw new NG("Trying to send a message on a closed client");if(this.#X)this.#Z($);else{let Y=()=>this.#Z($),X=()=>{return};this.#Y.push({openCallback:Y,errorCallback:X})}}#V(){let $=this.#$.protocol;if($===void 0){this.#N(new j9("The `WebSocket.protocol` property is undefined. This most likely means that the WebSocket implementation provided by the environment is broken. If you are using Miniflare 2, please update to Miniflare 3, which fixes this problem."));return}else if($==="")this.#Q={version:1,encoding:"json"};else if(this.#Q=tu0.get($),this.#Q===void 0){this.#N(new K6(`Unrecognized WebSocket subprotocol: ${JSON.stringify($)}`));return}for(let Y of this.#Y)Y.openCallback();this.#Y.length=0,this.#X=!0}#Z($){let Y=this.#Q.encoding;if(Y==="json"){let X=Jp($,uF4);this.#$.send(X)}else if(Y==="protobuf"){let X=Zp($,lF4);this.#$.send(X)}else throw D9(Y,"Impossible encoding")}getVersion(){return new Promise(($,Y)=>{if(this.#U=!0,this.#J!==void 0)Y(this.#J);else if(!this.#X){let X=()=>$(this.#Q.version);this.#Y.push({openCallback:X,errorCallback:Y})}else $(this.#Q.version)})}_ensureVersion($,Y){if(this.#Q===void 0||!this.#U)throw new D3(`${Y} is supported only on protocol version ${$} and higher, but the version supported by the WebSocket server is not yet known. Use Client.getVersion() to wait until the version is available.`);else if(this.#Q.version<$)throw new D3(`${Y} is supported on protocol version ${$} and higher, but the WebSocket server only supports version ${this.#Q.version}`)}_sendRequest($,Y){if(this.#J!==void 0){Y.errorCallback(new S$("Client is closed",this.#J));return}let X=this.#W.alloc();this.#K.set(X,{...Y,type:$.type}),this.#A({type:"request",requestId:X,request:$})}#L($){let X=$.message??"WebSocket was closed due to an error";this.#N(new mT(X))}#O($){let Y=`WebSocket was closed with code ${$.code}`;if($.reason)Y+=`: ${$.reason}`;this.#N(new mT(Y))}#N($){if(this.#J!==void 0)return;this.#J=$;for(let Y of this.#Y)Y.errorCallback($);this.#Y.length=0;for(let[Y,X]of this.#K.entries())X.errorCallback($),this.#W.free(Y);this.#K.clear(),this.#$.close()}#B($){if(this.#J!==void 0)return;try{let Y,X=this.#Q.encoding;if(X==="json"){if(typeof $.data!=="string"){this.#$.close(3003,"Only text messages are accepted with JSON encoding"),this.#N(new K6("Received non-text message from server with JSON encoding"));return}Y=OM(JSON.parse($.data),rF4)}else if(X==="protobuf"){if(!($.data instanceof ArrayBuffer)){this.#$.close(3003,"Only binary messages are accepted with Protobuf encoding"),this.#N(new K6("Received non-binary message from server with Protobuf encoding"));return}Y=aD(new Uint8Array($.data),oF4)}else throw D9(X,"Impossible encoding");this.#R(Y)}catch(Y){this.#$.close(3007,"Could not handle message"),this.#N(Y)}}#R($){if($.type==="none")throw new K6("Received an unrecognized ServerMsg");else if($.type==="hello_ok"||$.type==="hello_error"){if(this.#G)throw new K6("Received a duplicated hello response");if(this.#G=!0,$.type==="hello_error")throw qV($.error);return}else if(!this.#G)throw new K6("Received a non-hello message before a hello response");if($.type==="response_ok"){let Y=$.requestId,X=this.#K.get(Y);if(this.#K.delete(Y),X===void 0)throw new K6("Received unexpected OK response");this.#W.free(Y);try{if(X.type!==$.response.type)throw console.dir({responseState:X,msg:$}),new K6("Received unexpected type of response");X.responseCallback($.response)}catch(G){throw X.errorCallback(G),G}}else if($.type==="response_error"){let Y=$.requestId,X=this.#K.get(Y);if(this.#K.delete(Y),X===void 0)throw new K6("Received unexpected error response");this.#W.free(Y),X.errorCallback(qV($.error))}else throw D9($,"Impossible ServerMsg type")}openStream(){return zp.open(this)}storeSql($){this._ensureVersion(2,"storeSql()");let Y=this.#H.alloc(),X=new RM(this,Y),G=()=>{return},J=(W)=>X._setClosed(W),Q={type:"store_sql",sqlId:Y,sql:$};return this._sendRequest(Q,{responseCallback:G,errorCallback:J}),X}_closeSql($){if(this.#J!==void 0)return;let Y=()=>this.#H.free($),X=(J)=>this.#N(J),G={type:"close_sql",sqlId:$};this._sendRequest(G,{responseCallback:Y,errorCallback:X})}close(){this.#N(new j9("Client was manually closed"))}get closed(){return this.#J!==void 0}}var eu0=fetch,Dp=Request,$p0=Headers;var qM;if(typeof queueMicrotask<"u")qM=queueMicrotask;else{let $=Promise.resolve();qM=(Y)=>{$.then(Y)}}class Yp0{#$;#Y;#X;constructor($){this.#$=new Uint8Array(new ArrayBuffer($)),this.#Y=0,this.#X=0}get length(){return this.#X-this.#Y}data(){return this.#$.slice(this.#Y,this.#X)}push($){this.#J($.byteLength),this.#$.set($,this.#X),this.#X+=$.byteLength}#J($){if(this.#X+$<=this.#$.byteLength)return;let Y=this.#X-this.#Y;if(Y+$<=this.#$.byteLength&&2*this.#X>=this.#$.byteLength)this.#$.copyWithin(0,this.#Y,this.#X);else{let X=this.#$.byteLength;do X*=2;while(Y+$>X);let G=new Uint8Array(new ArrayBuffer(X));G.set(this.#$.slice(this.#Y,this.#X),0),this.#$=G}this.#X=Y,this.#Y=0}shift($){this.#Y+=$}}function eF4($){let Y=dW($.baton),X=dW($.base_url),G=N3($.results,YK9);return{baton:Y,baseUrl:X,results:G}}function YK9($){let Y=vQ($.type);if(Y==="ok")return{type:"ok",response:XK9(r$($.response))};else if(Y==="error")return{type:"error",error:tD(r$($.error))};else throw new K6("Unexpected type of StreamResult")}function XK9($){let Y=vQ($.type);if(Y==="close")return{type:"close"};else if(Y==="execute")return{type:"execute",result:Fp(r$($.result))};else if(Y==="batch")return{type:"batch",result:a$0(r$($.result))};else if(Y==="sequence")return{type:"sequence"};else if(Y==="describe")return{type:"describe",result:o$0(r$($.result))};else if(Y==="store_sql")return{type:"store_sql"};else if(Y==="close_sql")return{type:"close_sql"};else if(Y==="get_autocommit")return{type:"get_autocommit",isAutocommit:rD($.is_autocommit)};else throw new K6("Unexpected type of StreamResponse")}function $D4($){let Y=dW($.baton),X=dW($.base_url);return{baton:Y,baseUrl:X}}var YD4={default(){return{baton:void 0,baseUrl:void 0,results:[]}},1($,Y){Y.baton=$.string()},2($,Y){Y.baseUrl=$.string()},3($,Y){Y.results.push($.message(GK9))}},GK9={default(){return{type:"none"}},1($){return{type:"ok",response:$.message(JK9)}},2($){return{type:"error",error:$.message(U2)}}},JK9={default(){return{type:"none"}},1($){return{type:"close"}},2($){return $.message(QK9)},3($){return $.message(WK9)},4($){return{type:"sequence"}},5($){return $.message(ZK9)},6($){return{type:"store_sql"}},7($){return{type:"close_sql"}},8($){return $.message(KK9)}},QK9={default(){return{type:"execute",result:eD.default()}},1($,Y){Y.result=$.message(eD)}},WK9={default(){return{type:"batch",result:iT.default()}},1($,Y){Y.result=$.message(iT)}},ZK9={default(){return{type:"describe",result:nT.default()}},1($,Y){Y.result=$.message(nT)}},KK9={default(){return{type:"get_autocommit",isAutocommit:!1}},1($,Y){Y.isAutocommit=$.bool()}},XD4={default(){return{baton:void 0,baseUrl:void 0}},1($,Y){Y.baton=$.string()},2($,Y){Y.baseUrl=$.string()}};class Xp0 extends Hp{#$;#Y;#X;#J;#G;#Q;constructor($,Y){super();this.#$=$,this.#Y=Y,this.#X=void 0,this.#J=new Yp0(16384),this.#G=void 0,this.#Q=!1}async open($){if($.body===null)throw new K6("No response body for cursor request");this.#X=$.body.getReader();let Y=await this.#U($D4,XD4);if(Y===void 0)throw new K6("Empty response to cursor request");return Y}next(){return this.#U(s$0,t$0)}close(){this._setClosed(new j9("Cursor was manually closed"))}_setClosed($){if(this.#G!==void 0)return;if(this.#G=$,this.#$._cursorClosed(this),this.#X!==void 0)this.#X.cancel()}get closed(){return this.#G!==void 0}async#U($,Y){for(;;){if(this.#Q)return;else if(this.#G!==void 0)throw new S$("Cursor is closed",this.#G);if(this.#Y==="json"){let J=this.#K();if(J!==void 0){let Q=new TextDecoder().decode(J),W=JSON.parse(Q);return OM(W,$)}}else if(this.#Y==="protobuf"){let J=this.#W();if(J!==void 0)return aD(J,Y)}else throw D9(this.#Y,"Impossible encoding");if(this.#X===void 0)throw new NG("Attempted to read from HTTP cursor before it was opened");let{value:X,done:G}=await this.#X.read();if(G&&this.#J.length===0)this.#Q=!0;else if(G)throw new K6("Unexpected end of cursor stream");else this.#J.push(X)}}#K(){let $=this.#J.data(),Y=10,X=$.indexOf(10);if(X<0)return;let G=$.slice(0,X);return this.#J.shift(X+1),G}#W(){let $=this.#J.data(),Y=0,X=0;for(;;){if(X>=$.byteLength)return;let J=$[X];if(Y|=(J&127)<<7*X,X+=1,!(J&128))break}if($.byteLength<X+Y)return;let G=$.slice(X,X+Y);return this.#J.shift(X+Y),G}}function GD4($,Y){if(Y.baton!==void 0)$.string("baton",Y.baton);$.arrayObjects("requests",Y.requests,UK9)}function UK9($,Y){if($.stringRaw("type",Y.type),Y.type==="close");else if(Y.type==="execute")$.object("stmt",Y.stmt,Vp);else if(Y.type==="batch")$.object("batch",Y.batch,cT);else if(Y.type==="sequence"){if(Y.sql!==void 0)$.string("sql",Y.sql);if(Y.sqlId!==void 0)$.number("sql_id",Y.sqlId)}else if(Y.type==="describe"){if(Y.sql!==void 0)$.string("sql",Y.sql);if(Y.sqlId!==void 0)$.number("sql_id",Y.sqlId)}else if(Y.type==="store_sql")$.number("sql_id",Y.sqlId),$.string("sql",Y.sql);else if(Y.type==="close_sql")$.number("sql_id",Y.sqlId);else if(Y.type==="get_autocommit");else throw D9(Y,"Impossible type of StreamRequest")}function JD4($,Y){if(Y.baton!==void 0)$.string("baton",Y.baton);$.object("batch",Y.batch,cT)}function QD4($,Y){if(Y.baton!==void 0)$.string(1,Y.baton);for(let X of Y.requests)$.message(2,X,HK9)}function HK9($,Y){if(Y.type==="close")$.message(1,Y,zK9);else if(Y.type==="execute")$.message(2,Y,VK9);else if(Y.type==="batch")$.message(3,Y,AK9);else if(Y.type==="sequence")$.message(4,Y,FK9);else if(Y.type==="describe")$.message(5,Y,DK9);else if(Y.type==="store_sql")$.message(6,Y,NK9);else if(Y.type==="close_sql")$.message(7,Y,LK9);else if(Y.type==="get_autocommit")$.message(8,Y,BK9);else throw D9(Y,"Impossible type of StreamRequest")}function zK9($,Y){}function VK9($,Y){$.message(1,Y.stmt,Ap)}function AK9($,Y){$.message(1,Y.batch,lT)}function FK9($,Y){if(Y.sql!==void 0)$.string(1,Y.sql);if(Y.sqlId!==void 0)$.int32(2,Y.sqlId)}function DK9($,Y){if(Y.sql!==void 0)$.string(1,Y.sql);if(Y.sqlId!==void 0)$.int32(2,Y.sqlId)}function NK9($,Y){$.int32(1,Y.sqlId),$.string(2,Y.sql)}function LK9($,Y){$.int32(1,Y.sqlId)}function BK9($,Y){}function WD4($,Y){if(Y.baton!==void 0)$.string(1,Y.baton);$.message(2,Y.batch,lT)}class $Y0 extends dT{#$;#Y;#X;#J;#G;#Q;#U;#K;#W;#H;#A;#V;constructor($,Y,X,G){super($.intMode);this.#$=$,this.#Y=Y.toString(),this.#X=X,this.#J=G,this.#G=void 0,this.#Q=new oD,this.#U=!1,this.#W=!1,this.#H=!1,this.#A=void 0,this.#V=new sD}client(){return this.#$}_sqlOwner(){return this}storeSql($){let Y=this.#V.alloc();return this.#Z({type:"store_sql",sqlId:Y,sql:$}).then(()=>{return},(X)=>this._setClosed(X)),new RM(this,Y)}_closeSql($){if(this.#A!==void 0)return;this.#Z({type:"close_sql",sqlId:$}).then(()=>this.#V.free($),(Y)=>this._setClosed(Y))}_execute($){return this.#Z({type:"execute",stmt:$}).then((Y)=>{return Y.result})}_batch($){return this.#Z({type:"batch",batch:$}).then((Y)=>{return Y.result})}_describe($){return this.#Z({type:"describe",sql:$.sql,sqlId:$.sqlId}).then((Y)=>{return Y.result})}_sequence($){return this.#Z({type:"sequence",sql:$.sql,sqlId:$.sqlId}).then((Y)=>{return})}getAutocommit(){return this.#$._ensureVersion(3,"getAutocommit()"),this.#Z({type:"get_autocommit"}).then(($)=>{return $.isAutocommit})}#Z($){return new Promise((Y,X)=>{this.#L({type:"pipeline",request:$,responseCallback:Y,errorCallback:X})})}_openCursor($){return new Promise((Y,X)=>{this.#L({type:"cursor",batch:$,cursorCallback:Y,errorCallback:X})})}_cursorClosed($){if($!==this.#K)throw new NG("Cursor was closed, but it was not associated with the stream");this.#K=void 0,qM(()=>this.#O())}close(){this._setClosed(new j9("Stream was manually closed"))}closeGracefully(){this.#W=!0,qM(()=>this.#O())}get closed(){return this.#A!==void 0||this.#W}_setClosed($){if(this.#A!==void 0)return;if(this.#A=$,this.#K!==void 0)this.#K._setClosed($);this.#$._streamClosed(this);for(;;){let Y=this.#Q.shift();if(Y!==void 0)Y.errorCallback($);else break}if((this.#G!==void 0||this.#U)&&!this.#H)this.#Q.push({type:"pipeline",request:{type:"close"},responseCallback:()=>{return},errorCallback:()=>{return}}),this.#H=!0,qM(()=>this.#O())}#L($){if(this.#A!==void 0)throw new S$("Stream is closed",this.#A);else if(this.#W)throw new S$("Stream is closing",void 0);else this.#Q.push($),qM(()=>this.#O())}#O(){if(this.#U||this.#K!==void 0)return;if(this.#W&&this.#Q.length===0){this._setClosed(new j9("Stream was gracefully closed"));return}let $=this.#$._endpoint;if($===void 0){this.#$._endpointPromise.then(()=>this.#O(),(X)=>this._setClosed(X));return}let Y=this.#Q.shift();if(Y===void 0)return;else if(Y.type==="pipeline"){let X=[Y];for(;;){let G=this.#Q.first();if(G!==void 0&&G.type==="pipeline")X.push(G),this.#Q.shift();else if(G===void 0&&this.#W&&!this.#H){X.push({type:"pipeline",request:{type:"close"},responseCallback:()=>{return},errorCallback:()=>{return}}),this.#H=!0;break}else break}this.#N($,X)}else if(Y.type==="cursor")this.#B($,Y);else throw D9(Y,"Impossible type of QueueEntry")}#N($,Y){this.#R(()=>this.#D(Y,$),(X)=>EK9(X,$.encoding),(X)=>X.baton,(X)=>X.baseUrl,(X)=>OK9(Y,X),(X)=>Y.forEach((G)=>G.errorCallback(X)))}#B($,Y){let X=new Xp0(this,$.encoding);this.#K=X,this.#R(()=>this.#F(Y,$),(G)=>X.open(G),(G)=>G.baton,(G)=>G.baseUrl,(G)=>Y.cursorCallback(X),(G)=>Y.errorCallback(G))}#R($,Y,X,G,J,Q){let W;try{let Z=$(),K=this.#J;W=K(Z)}catch(Z){W=Promise.reject(Z)}this.#U=!0,W.then((Z)=>{if(!Z.ok)return MK9(Z).then((K)=>{throw K});return Y(Z)}).then((Z)=>{this.#G=X(Z),this.#Y=G(Z)??this.#Y,J(Z)}).catch((Z)=>{this._setClosed(Z),Q(Z)}).finally(()=>{this.#U=!1,this.#O()})}#D($,Y){return this.#P(new URL(Y.pipelinePath,this.#Y),{baton:this.#G,requests:$.map((X)=>X.request)},Y.encoding,GD4,QD4)}#F($,Y){if(Y.cursorPath===void 0)throw new D3(`Cursors are supported only on protocol version 3 and higher, but the HTTP server only supports version ${Y.version}.`);return this.#P(new URL(Y.cursorPath,this.#Y),{baton:this.#G,batch:$.batch},Y.encoding,JD4,WD4)}#P($,Y,X,G,J){let Q,W;if(X==="json")Q=Jp(Y,G),W="application/json";else if(X==="protobuf")Q=Zp(Y,J),W="application/x-protobuf";else throw D9(X,"Impossible encoding");let Z=new $p0;if(Z.set("content-type",W),this.#X!==void 0)Z.set("authorization",`Bearer ${this.#X}`);return new Dp($.toString(),{method:"POST",headers:Z,body:Q})}}function OK9($,Y){if(Y.results.length!==$.length)throw new K6("Server returned unexpected number of pipeline results");for(let X=0;X<$.length;++X){let G=Y.results[X],J=$[X];if(G.type==="ok"){if(G.response.type!==J.request.type)throw new K6("Received unexpected type of response");J.responseCallback(G.response)}else if(G.type==="error")J.errorCallback(qV(G.error));else if(G.type==="none")throw new K6("Received unrecognized type of StreamResult");else throw D9(G,"Received impossible type of StreamResult")}}async function EK9($,Y){if(Y==="json"){let X=await $.json();return OM(X,eF4)}if(Y==="protobuf"){let X=await $.arrayBuffer();return aD(new Uint8Array(X),YD4)}throw await $.body?.cancel(),D9(Y,"Impossible encoding")}async function MK9($){let Y=$.headers.get("content-type")??"text/plain",X=`Server returned HTTP status ${$.status}`;if(Y==="application/json"){let G=await $.json();if("message"in G)return qV(G);return new BM(X,$.status)}if(Y==="text/plain"){let G=(await $.text()).trim();if(G!=="")X+=`: ${G}`;return new BM(X,$.status)}return await $.body?.cancel(),new BM(X,$.status)}var RK9=[{versionPath:"v3-protobuf",pipelinePath:"v3-protobuf/pipeline",cursorPath:"v3-protobuf/cursor",version:3,encoding:"protobuf"}],Gp0={versionPath:"v2",pipelinePath:"v2/pipeline",cursorPath:void 0,version:2,encoding:"json"};class YY0 extends gT{#$;#Y;#X;#J;#G;_endpointPromise;_endpoint;constructor($,Y,X,G=2){super();if(this.#$=$,this.#Y=Y,this.#X=X??eu0,this.#J=void 0,this.#G=new Set,G==3)this._endpointPromise=qK9(this.#X,this.#$),this._endpointPromise.then((J)=>this._endpoint=J,(J)=>this.#Q(J));else this._endpointPromise=Promise.resolve(Gp0),this._endpointPromise.then((J)=>this._endpoint=J,(J)=>this.#Q(J))}async getVersion(){if(this._endpoint!==void 0)return this._endpoint.version;return(await this._endpointPromise).version}_ensureVersion($,Y){if($<=Gp0.version)return;else if(this._endpoint===void 0)throw new D3(`${Y} is supported only on protocol version ${$} and higher, but the version supported by the HTTP server is not yet known. Use Client.getVersion() to wait until the version is available.`);else if(this._endpoint.version<$)throw new D3(`${Y} is supported only on protocol version ${$} and higher, but the HTTP server only supports version ${this._endpoint.version}.`)}openStream(){if(this.#J!==void 0)throw new S$("Client is closed",this.#J);let $=new $Y0(this,this.#$,this.#Y,this.#X);return this.#G.add($),$}_streamClosed($){this.#G.delete($)}close(){this.#Q(new j9("Client was manually closed"))}get closed(){return this.#J!==void 0}#Q($){if(this.#J!==void 0)return;this.#J=$;for(let Y of Array.from(this.#G))Y._setClosed(new S$("Client was closed",$))}}async function qK9($,Y){let X=$;for(let G of RK9){let J=new URL(G.versionPath,Y),Q=new Dp(J.toString(),{method:"GET"}),W=await X(Q);if(await W.arrayBuffer(),W.ok)return G}return Gp0}function Jp0($,Y,X=2){if(typeof nD>"u")throw new Xp("WebSockets are not supported in this environment");var G=void 0;if(X==3)G=Array.from(tu0.keys());else G=Array.from(tF4.keys());let J=new nD($,G);return new e$0(J,Y)}function Qp0($,Y,X,G=2){return new YY0($ instanceof URL?$:new URL($),Y,X,G)}class Np{#$;#Y;#X;constructor($,Y){this.#$=$,this.#Y=Y,this.#X=void 0}execute($){return this.batch([$]).then((Y)=>Y[0])}async batch($){let Y=this._getStream();if(Y.closed)throw new P6("Cannot execute statements because the transaction is closed","TRANSACTION_CLOSED");try{let X=$.map(IV),G;if(this.#X===void 0){this._getSqlCache().apply(X);let Q=Y.batch(this.#Y>=3),W=Q.step(),Z=W.run(iD(this.#$)),K=W;G=X.map((H)=>{let z=Q.step().condition(m7.ok(K));if(this.#Y>=3)z.condition(m7.not(m7.isAutocommit(Q)));let V=z.query(H);return V.catch(()=>{return}),K=z,V}),this.#X=Q.execute().then(()=>Z).then(()=>{return});try{await this.#X}catch(H){throw this.close(),H}}else{if(this.#Y<3)await this.#X;this._getSqlCache().apply(X);let Q=Y.batch(this.#Y>=3),W=void 0;G=X.map((Z)=>{let K=Q.step();if(W!==void 0)K.condition(m7.ok(W));if(this.#Y>=3)K.condition(m7.not(m7.isAutocommit(Q)));let H=K.query(Z);return H.catch(()=>{return}),W=K,H}),await Q.execute()}let J=[];for(let Q of G){let W=await Q;if(W===void 0)throw new P6("Statement in a transaction was not executed, probably because the transaction has been rolled back","TRANSACTION_CLOSED");J.push(aT(W))}return J}catch(X){throw U$(X)}}async executeMultiple($){let Y=this._getStream();if(Y.closed)throw new P6("Cannot execute statements because the transaction is closed","TRANSACTION_CLOSED");try{if(this.#X===void 0){this.#X=Y.run(iD(this.#$)).then(()=>{return});try{await this.#X}catch(X){throw this.close(),X}}else await this.#X;await Y.sequence($)}catch(X){throw U$(X)}}async rollback(){try{let $=this._getStream();if($.closed)return;if(this.#X!==void 0);else return;let Y=$.run("ROLLBACK").catch((X)=>{throw U$(X)});$.closeGracefully(),await Y}catch($){throw U$($)}finally{this.close()}}async commit(){try{let $=this._getStream();if($.closed)throw new P6("Cannot commit the transaction because it is already closed","TRANSACTION_CLOSED");if(this.#X!==void 0)await this.#X;else return;let Y=$.run("COMMIT").catch((X)=>{throw U$(X)});$.closeGracefully(),await Y}catch($){throw U$($)}finally{this.close()}}}async function rT($,Y,X,G,J=!1){if(J)X.step().run("PRAGMA foreign_keys=off");let Q=X.step(),W=Q.run(iD($)),Z=Q,K=G.map((F)=>{let N=X.step().condition(m7.ok(Z));if(Y>=3)N.condition(m7.not(m7.isAutocommit(X)));let D=N.query(F);return Z=N,D}),H=X.step().condition(m7.ok(Z));if(Y>=3)H.condition(m7.not(m7.isAutocommit(X)));let z=H.run("COMMIT");if(X.step().condition(m7.not(m7.ok(H))).run("ROLLBACK").catch((F)=>{return}),J)X.step().run("PRAGMA foreign_keys=on");await X.execute();let A=[];await W;for(let F of K){let N=await F;if(N===void 0)throw new P6("Statement in a batch was not executed, probably because the transaction has been rolled back","TRANSACTION_CLOSED");A.push(aT(N))}return await z,A}function IV($){let Y,X;if(Array.isArray($))[Y,X]=$;else if(typeof $==="string")Y=$;else Y=$.sql,X=$.args;let G=new Up(Y);if(X)if(Array.isArray(X))G.bindIndexes(X);else for(let[J,Q]of Object.entries(X))G.bindName(J,Q);return G}function aT($){let Y=$.columnNames.map((W)=>W??""),X=$.columnDecltypes.map((W)=>W??""),G=$.rows,J=$.affectedRowCount,Q=$.lastInsertRowid!==void 0?$.lastInsertRowid:void 0;return new hT(Y,X,G,J,Q)}function U$($){if($ instanceof j9){let Y=ZD4($);return new P6($.message,Y,void 0,$)}return $}function ZD4($){if($ instanceof Yp&&$.code!==void 0)return $.code;else if($ instanceof K6)return"HRANA_PROTO_ERROR";else if($ instanceof S$)return $.cause instanceof j9?ZD4($.cause):"HRANA_CLOSED_ERROR";else if($ instanceof mT)return"HRANA_WEBSOCKET_ERROR";else if($ instanceof BM)return"SERVER_ERROR";else if($ instanceof D3)return"PROTOCOL_VERSION_ERROR";else if($ instanceof NG)return"INTERNAL_ERROR";else return"UNKNOWN"}class sT{#$;#Y;capacity;constructor($,Y){this.#$=$,this.#Y=new KD4,this.capacity=Y}apply($){if(this.capacity<=0)return;let Y=new Set;for(let X of $){if(typeof X.sql!=="string")continue;let G=X.sql;if(G.length>=5000)continue;let J=this.#Y.get(G);if(J===void 0){while(this.#Y.size+1>this.capacity){let[Q,W]=this.#Y.peekLru();if(Y.has(W))break;W.close(),this.#Y.delete(Q)}if(this.#Y.size+1<=this.capacity)J=this.#$.storeSql(G),this.#Y.set(G,J)}if(J!==void 0)X.sql=J,Y.add(J)}}}class KD4{#$;constructor(){this.#$=new Map}get($){let Y=this.#$.get($);if(Y!==void 0)this.#$.delete($),this.#$.set($,Y);return Y}set($,Y){this.#$.set($,Y)}peekLru(){for(let $ of this.#$.entries())return $;return}delete($){this.#$.delete($)}get size(){return this.#$.size}}var VD4=U6(Zp0(),1);function AD4($){if($.scheme!=="wss"&&$.scheme!=="ws")throw new P6(`The WebSocket client supports only "libsql:", "wss:" and "ws:" URLs, got ${JSON.stringify($.scheme+":")}. For more information, please read ${JH}`,"URL_SCHEME_NOT_SUPPORTED");if($.encryptionKey!==void 0)throw new P6("Encryption key is not supported by the remote client.","ENCRYPTION_KEY_NOT_SUPPORTED");if($.scheme==="ws"&&$.tls)throw new P6('A "ws:" URL cannot opt into TLS by using ?tls=1',"URL_INVALID");else if($.scheme==="wss"&&!$.tls)throw new P6('A "wss:" URL cannot opt out of TLS by using ?tls=0',"URL_INVALID");let Y=ou($.scheme,$.authority,$.path),X;try{X=Jp0(Y,$.authToken)}catch(G){if(G instanceof Xp){let J=$.scheme==="wss"?"https":"http",Q=ou(J,$.authority,$.path);throw new P6(`This environment does not support WebSockets, please switch to the HTTP client by using a "${J}:" URL (${JSON.stringify(Q)}). For more information, please read ${JH}`,"WEBSOCKETS_NOT_SUPPORTED")}throw U$(G)}return new FD4(X,Y,$.authToken,$.intMode,$.concurrency)}var wK9=60000,zD4=100;class FD4{#$;#Y;#X;#J;#G;closed;protocol;#Q;#U;constructor($,Y,X,G,J){this.#$=Y,this.#Y=X,this.#X=G,this.#J=this.#W($),this.#G=void 0,this.closed=!1,this.protocol="ws",this.#U=VD4.default(J)}async limit($){return this.#U($)}async execute($,Y){let X;if(typeof $==="string")X={sql:$,args:Y||[]};else X=$;return this.limit(async()=>{let G=await this.#K();try{let J=IV(X);G.conn.sqlCache.apply([J]);let Q=G.stream.query(J);G.stream.closeGracefully();let W=await Q;return aT(W)}catch(J){throw U$(J)}finally{this._closeStream(G)}})}async batch($,Y="deferred"){return this.limit(async()=>{let X=await this.#K();try{let J=$.map((H)=>{if(Array.isArray(H))return{sql:H[0],args:H[1]||[]};return H}).map(IV),Q=await X.conn.client.getVersion();X.conn.sqlCache.apply(J);let W=X.stream.batch(Q>=3);return await rT(Y,Q,W,J)}catch(G){throw U$(G)}finally{this._closeStream(X)}})}async migrate($){return this.limit(async()=>{let Y=await this.#K();try{let X=$.map(IV),G=await Y.conn.client.getVersion(),J=Y.stream.batch(G>=3);return await rT("deferred",G,J,X,!0)}catch(X){throw U$(X)}finally{this._closeStream(Y)}})}async transaction($="write"){return this.limit(async()=>{let Y=await this.#K();try{let X=await Y.conn.client.getVersion();return new DD4(this,Y,$,X)}catch(X){throw this._closeStream(Y),U$(X)}})}async executeMultiple($){return this.limit(async()=>{let Y=await this.#K();try{let X=Y.stream.sequence($);Y.stream.closeGracefully(),await X}catch(X){throw U$(X)}finally{this._closeStream(Y)}})}sync(){throw new P6("sync not supported in ws mode","SYNC_NOT_SUPPORTED")}async#K(){if(this.closed)throw new P6("The client is closed","CLIENT_CLOSED");if(new Date().valueOf()-this.#J.openTime.valueOf()>wK9&&this.#G===void 0){let G=this.#W();this.#G=G,G.client.getVersion().then((J)=>{if(this.#J!==G){if(this.#J.streamStates.size===0)this.#J.client.close()}this.#J=G,this.#G=void 0},(J)=>{this.#G=void 0})}if(this.#J.client.closed)try{if(this.#G!==void 0)this.#J=this.#G;else this.#J=this.#W()}catch(G){throw U$(G)}let X=this.#J;try{if(X.useSqlCache===void 0){if(X.useSqlCache=await X.client.getVersion()>=2,X.useSqlCache)X.sqlCache.capacity=zD4}let G=X.client.openStream();G.intMode=this.#X;let J={conn:X,stream:G};return X.streamStates.add(J),J}catch(G){throw U$(G)}}#W($){try{return $??=Jp0(this.#$,this.#Y),{client:$,useSqlCache:void 0,sqlCache:new sT($,0),openTime:new Date,streamStates:new Set}}catch(Y){throw U$(Y)}}async reconnect(){try{for(let X of Array.from(this.#J.streamStates))try{X.stream.close()}catch{}this.#J.client.close()}catch{}if(this.#G){try{this.#G.client.close()}catch{}this.#G=void 0}let $=this.#W(),Y=await $.client.getVersion();if($.useSqlCache=Y>=2,$.useSqlCache)$.sqlCache.capacity=zD4;this.#J=$,this.closed=!1}_closeStream($){$.stream.close();let Y=$.conn;if(Y.streamStates.delete($),Y.streamStates.size===0&&Y!==this.#J)Y.client.close()}close(){if(this.#J.client.close(),this.closed=!0,this.#G){try{this.#G.client.close()}catch{}this.#G=void 0}this.closed=!0}}class DD4 extends Np{#$;#Y;constructor($,Y,X,G){super(X,G);this.#$=$,this.#Y=Y}_getStream(){return this.#Y.stream}_getSqlCache(){return this.#Y.conn.sqlCache}close(){this.#$._closeStream(this.#Y)}get closed(){return this.#Y.stream.closed}}var ND4=U6(Zp0(),1);function LD4($){if($.scheme!=="https"&&$.scheme!=="http")throw new P6(`The HTTP client supports only "libsql:", "https:" and "http:" URLs, got ${JSON.stringify($.scheme+":")}. For more information, please read ${JH}`,"URL_SCHEME_NOT_SUPPORTED");if($.encryptionKey!==void 0)throw new P6("Encryption key is not supported by the remote client.","ENCRYPTION_KEY_NOT_SUPPORTED");if($.scheme==="http"&&$.tls)throw new P6('A "http:" URL cannot opt into TLS by using ?tls=1',"URL_INVALID");else if($.scheme==="https"&&!$.tls)throw new P6('A "https:" URL cannot opt out of TLS by using ?tls=0',"URL_INVALID");let Y=ou($.scheme,$.authority,$.path);return new OD4(Y,$.authToken,$.intMode,$.fetch,$.concurrency)}var BD4=30;class OD4{#$;protocol;#Y;#X;#J;#G;#Q;#U;constructor($,Y,X,G,J){this.#Y=$,this.#Q=Y,this.#X=X,this.#J=G,this.#G=J,this.#$=Qp0(this.#Y,this.#Q,this.#J),this.#$.intMode=this.#X,this.protocol="http",this.#U=ND4.default(this.#G)}async limit($){return this.#U($)}async execute($,Y){let X;if(typeof $==="string")X={sql:$,args:Y||[]};else X=$;return this.limit(async()=>{try{let G=IV(X),J,Q=this.#$.openStream();try{J=Q.query(G)}finally{Q.closeGracefully()}let W=await J;return aT(W)}catch(G){throw U$(G)}})}async batch($,Y="deferred"){return this.limit(async()=>{try{let G=$.map((K)=>{if(Array.isArray(K))return{sql:K[0],args:K[1]||[]};return K}).map(IV),J=await this.#$.getVersion(),Q,W=this.#$.openStream();try{new sT(W,BD4).apply(G);let H=W.batch(!1);Q=rT(Y,J,H,G)}finally{W.closeGracefully()}return await Q}catch(X){throw U$(X)}})}async migrate($){return this.limit(async()=>{try{let Y=$.map(IV),X=await this.#$.getVersion(),G,J=this.#$.openStream();try{let W=J.batch(!1);G=rT("deferred",X,W,Y,!0)}finally{J.closeGracefully()}return await G}catch(Y){throw U$(Y)}})}async transaction($="write"){return this.limit(async()=>{try{let Y=await this.#$.getVersion();return new ED4(this.#$.openStream(),$,Y)}catch(Y){throw U$(Y)}})}async executeMultiple($){return this.limit(async()=>{try{let Y,X=this.#$.openStream();try{Y=X.sequence($)}finally{X.closeGracefully()}await Y}catch(Y){throw U$(Y)}})}sync(){throw new P6("sync not supported in http mode","SYNC_NOT_SUPPORTED")}close(){this.#$.close()}async reconnect(){try{if(!this.closed)this.#$.close()}finally{this.#$=Qp0(this.#Y,this.#Q,this.#J),this.#$.intMode=this.#X}}get closed(){return this.#$.closed}}class ED4 extends Np{#$;#Y;constructor($,Y,X){super(Y,X);this.#$=$,this.#Y=new sT($,BD4)}_getStream(){return this.#$}_getSqlCache(){return this.#Y}close(){this.#$.close()}get closed(){return this.#$.closed}}function Kp0($){return _K9(eu($,!0))}function _K9($){if($.scheme==="wss"||$.scheme==="ws")return AD4($);else if($.scheme==="https"||$.scheme==="http")return LD4($);else return _F4($)}Up0();gu();import{randomUUID as jK9}from"crypto";z90();var RD4=($)=>{return(Y,X)=>{let G=WH(Y);return{sql:`CASE 
        WHEN ? IS NULL THEN json_extract(metadata, ${G}) IS ${$==="="?"":"NOT"} NULL
        ELSE json_extract(metadata, ${G}) ${$} ?
      END`,needsValue:!0,transformValue:()=>{return[X,X]}}}},XY0=($)=>{return(Y,X)=>{let G=WH(Y);if(typeof X==="number"||typeof X==="string"&&!isNaN(Number(X))&&X.trim()!=="")return{sql:`CAST(json_extract(metadata, ${G}) AS NUMERIC) ${$} ?`,needsValue:!0};else return{sql:`CAST(json_extract(metadata, ${G}) AS TEXT) ${$} ?`,needsValue:!0}}},Lp=($)=>{let Y=WH($);return`json_valid(json_extract(metadata, ${Y}))
   AND json_type(json_extract(metadata, ${Y})) = 'array'`},qD4=/json_extract\(metadata, '\$\.(?:"[^"]*"(?:\."[^"]*")*|[^']+)'\)/g;function TK9($){return Object.entries($).map(([X,G])=>{if(X.startsWith("$")){let{sql:J,values:Q}=Op("elem.value",{[X]:G});return{sql:J.replace(qD4,"elem.value"),values:Q}}else if(typeof G==="object"&&!Array.isArray(G)){let{sql:J,values:Q}=Op(X,G),W=QY0(X);return{sql:J.replace(qD4,`json_extract(elem.value, '$.${W}')`),values:Q}}else return{sql:`json_extract(elem.value, '$.${QY0(X)}') = ?`,values:[G]}})}var ID4={$eq:RD4("="),$ne:RD4("!="),$gt:XY0(">"),$gte:XY0(">="),$lt:XY0("<"),$lte:XY0("<="),$in:($,Y)=>{let X=WH($),G=Array.isArray(Y)?Y:[Y];if(G.length===0)return{sql:"1 = 0",needsValue:!0,transformValue:()=>[]};let J=G.map(()=>"?").join(",");return{sql:`(
      CASE
        WHEN ${Lp($)} THEN
          EXISTS (
            SELECT 1 FROM json_each(json_extract(metadata, ${X})) as elem
            WHERE elem.value IN (SELECT value FROM json_each(?))
          )
        ELSE json_extract(metadata, ${X}) IN (${J})
      END
    )`,needsValue:!0,transformValue:()=>[JSON.stringify(G),...G]}},$nin:($,Y)=>{let X=WH($),G=Array.isArray(Y)?Y:[Y];if(G.length===0)return{sql:"1 = 1",needsValue:!0,transformValue:()=>[]};let J=G.map(()=>"?").join(",");return{sql:`(
      CASE
        WHEN ${Lp($)} THEN
          NOT EXISTS (
            SELECT 1 FROM json_each(json_extract(metadata, ${X})) as elem
            WHERE elem.value IN (SELECT value FROM json_each(?))
          )
        ELSE json_extract(metadata, ${X}) NOT IN (${J})
      END
    )`,needsValue:!0,transformValue:()=>[JSON.stringify(G),...G]}},$all:($,Y)=>{let X=WH($),G,J=Array.isArray(Y)?Y:[Y];if(J.length===0)G="1 = 0";else G=`(
      CASE
        WHEN ${Lp($)} THEN
          NOT EXISTS (
            SELECT value
            FROM json_each(?)
            WHERE value NOT IN (
              SELECT value
              FROM json_each(json_extract(metadata, ${X}))
            )
          )
        ELSE FALSE
      END
    )`;return{sql:G,needsValue:!0,transformValue:()=>{if(J.length===0)return[];return[JSON.stringify(J)]}}},$elemMatch:($,Y)=>{let X=WH($);if(typeof Y!=="object"||Array.isArray(Y))throw Error("$elemMatch requires an object with conditions");let G=TK9(Y);return{sql:`(
        CASE
          WHEN ${Lp($)} THEN
            EXISTS (
              SELECT 1
              FROM json_each(json_extract(metadata, ${X})) as elem
              WHERE ${G.map((J)=>J.sql).join(" AND ")}
            )
          ELSE FALSE
        END
      )`,needsValue:!0,transformValue:()=>G.flatMap((J)=>J.values)}},$exists:($,Y)=>{let X=WH($);return{sql:Y===!1?`json_extract(metadata, ${X}) IS NULL`:`json_extract(metadata, ${X}) IS NOT NULL`,needsValue:!1}},$and:($)=>({sql:`(${$})`,needsValue:!1}),$or:($)=>({sql:`(${$})`,needsValue:!1}),$not:($)=>({sql:`NOT (${$})`,needsValue:!1}),$nor:($)=>({sql:`NOT (${$})`,needsValue:!1}),$size:($,Y)=>{let X=WH($);return{sql:`(
    CASE
      WHEN json_type(json_extract(metadata, ${X})) = 'array' THEN 
        json_array_length(json_extract(metadata, ${X})) = $${Y}
      ELSE FALSE
    END
  )`,needsValue:!0}},$contains:($,Y)=>{let X=QY0($),G;if(Array.isArray(Y))G=`(
        SELECT ${Lp(X)}
        AND EXISTS (
          SELECT 1
          FROM json_each(json_extract(metadata, '$."${X}"')) as m
          WHERE m.value IN (SELECT value FROM json_each(?))
        )
      )`;else if(typeof Y==="string")G=`lower(json_extract(metadata, '$."${X}"')) LIKE '%' || lower(?) || '%' ESCAPE '\\'`;else G=`json_extract(metadata, '$."${X}"') = ?`;return{sql:G,needsValue:!0,transformValue:()=>{if(Array.isArray(Y))return[JSON.stringify(Y)];if(typeof Y==="object"&&Y!==null)return[JSON.stringify(Y)];if(typeof Y==="string")return[SK9(Y)];return[Y]}}}};function CK9($){return $&&typeof $==="object"&&typeof $.sql==="string"&&Array.isArray($.values)}var QY0=($)=>{let Y=Dx0($);if(Y.includes("."))return Y.split(".").map((X)=>`"${X}"`).join(".");return Y},WH=($)=>{return`'$.${QY0($)}'`};function SK9($){return $.replace(/([%_\\])/g,"\\$1")}function Op($,Y,X){if(["$and","$or","$not","$nor"].includes($))return kK9($,Y);if(!Y||typeof Y!=="object")return{sql:`json_extract(metadata, ${WH($)}) = ?`,values:[Y]};return vK9($,Y)}function kK9($,Y,X){if(!Y||Array.isArray(Y)&&Y.length===0)switch($){case"$and":case"$nor":return{sql:"true",values:[]};case"$or":return{sql:"false",values:[]};case"$not":throw Error("$not operator cannot be empty");default:return{sql:"true",values:[]}}if($==="$not"){let K=Object.entries(Y).map(([H,z])=>Op(H,z));return{sql:`NOT (${K.map((H)=>H.sql).join(" AND ")})`,values:K.flatMap((H)=>H.values)}}let G=[],J=$==="$or"||$==="$nor"?"OR":"AND",W=(Array.isArray(Y)?Y.map((Z)=>{return(Z?Object.entries(Z):[]).map(([H,z])=>Op(H,z))}):[Op($,Y)]).flat().map((Z)=>{return G.push(...Z.values),Z.sql}).join(` ${J} `);return{sql:$==="$nor"?`NOT (${W})`:`(${W})`,values:G}}function vK9($,Y){if(typeof Y==="object"&&!Array.isArray(Y)){let Q=Object.entries(Y).map(([W,Z])=>W==="$not"?{sql:`NOT (${Object.entries(Z).map(([K,H])=>GY0($,K,H).sql).join(" AND ")})`,values:Object.entries(Z).flatMap(([K,H])=>GY0($,K,H).values)}:GY0($,W,Z));return{sql:`(${Q.map((W)=>W.sql).join(" AND ")})`,values:Q.flatMap((W)=>W.values)}}let[[X,G]=[]]=Object.entries(Y);return GY0($,X,G)}var GY0=($,Y,X)=>{if(!Y.startsWith("$")||!ID4[Y])throw Error(`Invalid operator: ${Y}`);let G=ID4[Y],J=G($,X);if(!J.needsValue)return{sql:J.sql,values:[]};let Q=J.transformValue?J.transformValue():X;if(CK9(Q))return Q;return{sql:J.sql,values:Array.isArray(Q)?Q:[Q]}};var tT=($)=>{let Y=new Set,X=(G)=>{if(G===null||G===void 0)return G;if(typeof G==="function")return;if(typeof G==="symbol")return;if(typeof G==="bigint")return G.toString();if(typeof G!=="object")return G;if(Y.has(G))return;if(typeof G.toJSON==="function")return X(G.toJSON());Y.add(G);try{if(Array.isArray(G))return G.map((Q)=>X(Q));let J={};for(let Q of Object.keys(G)){let W=X(G[Q]);if(W!==void 0)J[Q]=W}return J}finally{Y.delete(G)}};return JSON.stringify(X($))??"null"};function M4($){let Y=F5[$];return Object.keys(Y).map((X)=>{let G=Y[X],J=b7(X,"column name");return G?.type==="jsonb"?`json("${J}") as "${J}"`:`"${J}"`}).join(", ")}function TD4($,Y){let X=b7(Y,"table alias"),G=F5[$];return Object.keys(G).map((J)=>{let Q=G[J],W=b7(J,"column name");return Q?.type==="jsonb"?`json(${X}."${W}") as "${W}"`:`${X}."${W}"`}).join(", ")}function xK9($){return $.code==="SQLITE_BUSY"||$.code==="SQLITE_LOCKED"||$.message?.toLowerCase().includes("database is locked")||$.message?.toLowerCase().includes("database table is locked")||$.message?.toLowerCase().includes("table is locked")||$.constructor.name==="SqliteError"&&$.message?.toLowerCase().includes("locked")}function CD4({logger:$,maxRetries:Y,initialBackoffMs:X}){return async function(J,Q){let W=0,Z=X;while(W<Y)try{return await J()}catch(K){if($.debug(`LibSQLStore: Error caught in retry loop for ${Q}`,{errorType:K.constructor.name,errorCode:K.code,errorMessage:K.message,attempts:W,maxRetries:Y}),xK9(K)){if(W++,W>=Y)throw $.error(`LibSQLStore: Operation failed after ${Y} attempts due to database lock: ${K.message}`,{error:K,attempts:W,maxRetries:Y}),K;$.warn(`LibSQLStore: Attempt ${W} failed due to database lock during ${Q}. Retrying in ${Z}ms...`,{errorMessage:K.message,attempts:W,backoff:Z,maxRetries:Y}),await new Promise((H)=>setTimeout(H,Z)),Z*=2}else throw $.error(`LibSQLStore: Non-lock error during ${Q}, not retrying`,{error:K}),K}throw Error(`LibSQLStore: Unexpected exit from retry loop for ${Q}`)}}function PD4({tableName:$,record:Y}){let X=b7($,"table name"),G=F5[$],J=Object.keys(Y),Q=J.map((K)=>b7(K,"column name")),W=J.map((K)=>{let H=Y[K];if(typeof H>"u"||H===null)return null;if(G[K]?.type==="jsonb")return tT(H);if(H instanceof Date)return H.toISOString();return typeof H==="object"?tT(H):H}),Z=J.map((K)=>{return G[K]?.type==="jsonb"?"jsonb(?)":"?"}).join(", ");return{sql:`INSERT OR REPLACE INTO ${X} (${Q.join(", ")}) VALUES (${Z})`,args:W}}function wD4({tableName:$,updates:Y,keys:X}){let G=b7($,"table name"),J=F5[$],Q=Object.keys(Y),W=Q.map((z)=>b7(z,"column name")),Z=Q.map((z)=>{let V=J[z],A=Y[z];if(V?.type==="jsonb")return Ep(A,!0);return Ep(A,!1)}),K=W.map((z,V)=>{return J[Q[V]]?.type==="jsonb"?`${z} = jsonb(?)`:`${z} = ?`}).join(", "),H=SD4(X,J);return{sql:`UPDATE ${G} SET ${K}${H.sql}`,args:[...Z,...H.args]}}function Ep($,Y=!1){if(typeof $>"u"||$===null)return null;if(Y)return tT($);if($ instanceof Date)return $.toISOString();return typeof $==="object"?tT($):$}function _D4({tableName:$,keys:Y}){let X=b7($,"table name"),G=SD4(Y,F5[$]);return{sql:`DELETE FROM ${X}${G.sql}`,args:G.args}}function SD4($,Y){let X=[],G=[];for(let[J,Q]of Object.entries($)){if(!Y[J])throw Error(`Unknown column: ${J}`);let Z=b7(J,"column name"),K=yK9(Z,Q);X.push(K.condition),G.push(...K.args)}return{sql:X.length>0?` WHERE ${X.join(" AND ")}`:"",args:G}}function yK9($,Y){if(Y===null)return{condition:`${$} IS NULL`,args:[]};if(typeof Y==="object"&&Y!==null&&(("startAt"in Y)||("endAt"in Y)))return bK9($,Y);return{condition:`${$} = ?`,args:[Ep(Y)]}}function bK9($,Y){let X=[],G=[];if(Y.startAt!==void 0)X.push(`${$} >= ?`),G.push(Ep(Y.startAt));if(Y.endAt!==void 0)X.push(`${$} <= ?`),G.push(Ep(Y.endAt));if(X.length===0)throw Error("Date range must specify at least startAt or endAt");return{condition:X.join(" AND "),args:G}}function Bp({tableName:$,sqlRow:Y}){let X={},G=new Set(Object.keys(F5[$]).filter((W)=>F5[$][W].type==="jsonb").map((W)=>W)),J=new Set(Object.keys(F5[$]).filter((W)=>F5[$][W].type==="timestamp").map((W)=>W)),Q=new Set(Object.keys(F5[$]).filter((W)=>F5[$][W].type==="boolean").map((W)=>W));for(let[W,Z]of Object.entries(Y)){if(Z===null||Z===void 0){X[W]=Z;continue}if(J.has(W)&&typeof Z==="string"){X[W]=new Date(Z);continue}if(G.has(W)&&typeof Z==="string"){X[W]=N8(Z);continue}if(Q.has(W)){X[W]=Boolean(Z);continue}X[W]=Z}return X}function sY($){if("client"in $)return $.client;return Kp0({url:$.url,...$.authToken?{authToken:$.authToken}:{}})}var oY=class extends u8{client;maxRetries;initialBackoffMs;executeWriteOperationWithRetry;tableColumnsCache=new Map;constructor({client:$,maxRetries:Y,initialBackoffMs:X}){super({component:"STORAGE",name:"LIBSQL_DB_LAYER"});this.client=$,this.maxRetries=Y??5,this.initialBackoffMs=X??100,this.executeWriteOperationWithRetry=CD4({logger:this.logger,maxRetries:this.maxRetries,initialBackoffMs:this.initialBackoffMs})}async getTableColumns($){let Y=this.tableColumnsCache.get($);if(Y)return Y;let X=(async()=>{try{let G=b7($,"table name"),J=await this.client.execute({sql:`PRAGMA table_info("${G}")`}),Q=new Set((J.rows||[]).map((W)=>W.name));if(Q.size===0)this.tableColumnsCache.delete($);return Q}catch(G){throw this.tableColumnsCache.delete($),G}})();return this.tableColumnsCache.set($,X),X}async filterRecordToKnownColumns($,Y){let X=await this.getTableColumns($);if(X.size===0)return Y;let G={};for(let[J,Q]of Object.entries(Y))if(X.has(J))G[J]=Q;return G}async hasColumn($,Y){let X=b7($,"table name");return(await this.client.execute({sql:`PRAGMA table_info("${X}")`})).rows?.some((J)=>J.name===Y)}async doInsert({tableName:$,record:Y}){let X=await this.filterRecordToKnownColumns($,Y);if(Object.keys(X).length===0)return;await this.client.execute(PD4({tableName:$,record:X}))}insert($){return this.executeWriteOperationWithRetry(()=>this.doInsert($),`insert into table ${$.tableName}`)}async doUpdate({tableName:$,keys:Y,data:X}){let G=await this.filterRecordToKnownColumns($,X);if(Object.keys(G).length===0)return;await this.client.execute(wD4({tableName:$,updates:G,keys:Y}))}update($){return this.executeWriteOperationWithRetry(()=>this.doUpdate($),`update table ${$.tableName}`)}async doBatchInsert({tableName:$,records:Y}){if(Y.length===0)return;let G=(await Promise.all(Y.map((Q)=>this.filterRecordToKnownColumns($,Q)))).filter((Q)=>Object.keys(Q).length>0);if(G.length===0)return;let J=G.map((Q)=>PD4({tableName:$,record:Q}));await this.client.batch(J,"write")}async batchInsert($){return this.executeWriteOperationWithRetry(()=>this.doBatchInsert($),`batch insert into table ${$.tableName}`).catch((Y)=>{throw new G0({id:P0("LIBSQL","BATCH_INSERT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$.tableName}},Y)})}async doBatchUpdate({tableName:$,updates:Y}){if(Y.length===0)return;let X=[];for(let{keys:J,data:Q}of Y){let W=await this.filterRecordToKnownColumns($,Q);if(Object.keys(W).length>0)X.push({keys:J,data:W})}if(X.length===0)return;let G=X.map(({keys:J,data:Q})=>wD4({tableName:$,updates:Q,keys:J}));await this.client.batch(G,"write")}async batchUpdate($){return this.executeWriteOperationWithRetry(()=>this.doBatchUpdate($),`batch update in table ${$.tableName}`).catch((Y)=>{throw new G0({id:P0("LIBSQL","BATCH_UPDATE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$.tableName}},Y)})}async doBatchDelete({tableName:$,keys:Y}){if(Y.length===0)return;let X=Y.map((G)=>_D4({tableName:$,keys:G}));await this.client.batch(X,"write")}async batchDelete({tableName:$,keys:Y}){return this.executeWriteOperationWithRetry(()=>this.doBatchDelete({tableName:$,keys:Y}),`batch delete from table ${$}`).catch((X)=>{throw new G0({id:P0("LIBSQL","BATCH_DELETE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$}},X)})}async doDelete({tableName:$,keys:Y}){await this.client.execute(_D4({tableName:$,keys:Y}))}async delete($){return this.executeWriteOperationWithRetry(()=>this.doDelete($),`delete from table ${$.tableName}`).catch((Y)=>{throw new G0({id:P0("LIBSQL","DELETE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$.tableName}},Y)})}async select({tableName:$,keys:Y}){let X=b7($,"table name"),G=M4($),Q=Object.keys(Y).map((z)=>b7(z,"column name")).map((z)=>`${z} = ?`).join(" AND "),W=Object.values(Y),Z=await this.client.execute({sql:`SELECT ${G} FROM ${X} WHERE ${Q} ORDER BY createdAt DESC LIMIT 1`,args:W});if(!Z.rows||Z.rows.length===0)return null;let K=Z.rows[0];return Object.fromEntries(Object.entries(K||{}).map(([z,V])=>{try{return[z,typeof V==="string"?V.startsWith("{")||V.startsWith("[")?JSON.parse(V):V:V]}catch{return[z,V]}}))}async selectMany({tableName:$,whereClause:Y,orderBy:X,offset:G,limit:J,args:Q}){let W=b7($,"table name"),K=`SELECT ${M4($)} FROM ${W}`;if(Y?.sql)K+=` ${Y.sql}`;if(X)K+=` ORDER BY ${X}`;if(J)K+=` LIMIT ${J}`;if(G)K+=` OFFSET ${G}`;return((await this.client.execute({sql:K,args:[...Y?.args??[],...Q??[]]})).rows??[]).map((z)=>{return Object.fromEntries(Object.entries(z||{}).map(([V,A])=>{try{return[V,typeof A==="string"?A.startsWith("{")||A.startsWith("[")?JSON.parse(A):A:A]}catch{return[V,A]}}))})}async selectTotalCount({tableName:$,whereClause:Y}){let G=`SELECT COUNT(*) as count FROM ${b7($,"table name")} ${Y?`${Y.sql}`:""}`,J=await this.client.execute({sql:G,args:Y?.args??[]});if(!J.rows||J.rows.length===0)return 0;return J.rows[0]?.count??0}getSqlType($){switch($){case"bigint":return"INTEGER";case"timestamp":return"TEXT";case"float":return"REAL";case"boolean":return"INTEGER";case"jsonb":return"TEXT";default:return B90($)}}async createTable({tableName:$,schema:Y,compositePrimaryKey:X}){try{let G=b7($,"table name");if(X){for(let H of X)if(!(H in Y))throw Error(`compositePrimaryKey column "${H}" does not exist in schema for table "${$}"`)}let J=X?new Set(X):null,Q=Object.entries(Y).map(([H,z])=>{let V=this.getSqlType(z.type),A=z.nullable===!1?"NOT NULL":"",F=z.primaryKey&&!J?.has(H)?"PRIMARY KEY":"";return`"${H}" ${V} ${A} ${F}`.trim()}),W=[];if(X){let H=X.map((z)=>`"${z}"`).join(", ");W.push(`PRIMARY KEY (${H})`)}if($===D7)W.push("UNIQUE (workflow_name, run_id)");if($===V6)W.push("UNIQUE (spanId, traceId)");let Z=[...Q,...W].join(`,
  `),K=`CREATE TABLE IF NOT EXISTS ${G} (
  ${Z}
)`;if(await this.client.execute(K),this.logger.debug(`LibSQLDB: Created table ${$}`),$===V6)await this.migrateSpansTable()}catch(G){if(G instanceof G0)throw G;throw new G0({id:P0("LIBSQL","CREATE_TABLE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$}},G)}finally{this.tableColumnsCache.delete($)}}async migrateSpansTable(){let $=F5[V6];try{let Y=await this.getTableColumns(V6),X=new Set([...Y].map((Q)=>Q.toLowerCase())),G=!1;for(let[Q,W]of Object.entries($))if(!X.has(Q.toLowerCase())){let Z=this.getSqlType(W.type),K=`ALTER TABLE "${V6}" ADD COLUMN "${Q}" ${Z}`;await this.client.execute(K),G=!0,this.logger.debug(`LibSQLDB: Added column '${Q}' to ${V6}`)}if(G)this.tableColumnsCache.delete(V6);if(!await this.spansUniqueIndexExists()){let Q=await this.checkForDuplicateSpans();if(Q.hasDuplicates){let W=`
===========================================================================
MIGRATION REQUIRED: Duplicate spans detected in ${V6}
===========================================================================

Found ${Q.duplicateCount} duplicate (traceId, spanId) combinations.

The spans table requires a unique constraint on (traceId, spanId), but your
database contains duplicate entries that must be resolved first.

To fix this, run the manual migration command:

  npx mastra migrate

This command will:
  1. Remove duplicate spans (keeping the most complete/recent version)
  2. Add the required unique constraint

Note: This migration may take some time for large tables.
===========================================================================
`;throw new G0({id:P0("LIBSQL","MIGRATION_REQUIRED","DUPLICATE_SPANS"),domain:M0.STORAGE,category:E0.USER,text:W})}else await this.client.execute(`CREATE UNIQUE INDEX IF NOT EXISTS "mastra_ai_spans_spanid_traceid_idx" ON "${V6}" ("spanId", "traceId")`),this.logger.debug(`LibSQLDB: Created unique index on (spanId, traceId) for ${V6}`)}this.logger.info(`LibSQLDB: Migration completed for ${V6}`)}catch(Y){if(Y instanceof G0)throw Y;this.logger.warn(`LibSQLDB: Failed to migrate spans table ${V6}:`,Y)}}async spansUniqueIndexExists(){try{return((await this.client.execute("SELECT 1 FROM sqlite_master WHERE type = 'index' AND name = 'mastra_ai_spans_spanid_traceid_idx'")).rows?.length??0)>0}catch{return!1}}async checkForDuplicateSpans(){try{let $=await this.client.execute(`
        SELECT COUNT(*) as duplicate_count FROM (
          SELECT "spanId", "traceId"
          FROM "${V6}"
          GROUP BY "spanId", "traceId"
          HAVING COUNT(*) > 1
        )
      `),Y=Number($.rows?.[0]?.duplicate_count??0);return{hasDuplicates:Y>0,duplicateCount:Y}}catch($){return this.logger.debug(`LibSQLDB: Could not check for duplicates: ${$}`),{hasDuplicates:!1,duplicateCount:0}}}async migrateSpans(){if(await this.spansUniqueIndexExists())return{success:!0,alreadyMigrated:!0,duplicatesRemoved:0,message:`Migration already complete. Unique index exists on ${V6}.`};let Y=await this.checkForDuplicateSpans();if(Y.hasDuplicates)this.logger.info(`Found ${Y.duplicateCount} duplicate (traceId, spanId) combinations. Starting deduplication...`),await this.deduplicateSpans();else this.logger.info("No duplicate spans found.");return await this.client.execute(`CREATE UNIQUE INDEX IF NOT EXISTS "mastra_ai_spans_spanid_traceid_idx" ON "${V6}" ("spanId", "traceId")`),{success:!0,alreadyMigrated:!1,duplicatesRemoved:Y.duplicateCount,message:Y.hasDuplicates?`Migration complete. Removed duplicates and added unique index to ${V6}.`:`Migration complete. Added unique index to ${V6}.`}}async checkSpansMigrationStatus(){if(await this.spansUniqueIndexExists())return{needsMigration:!1,hasDuplicates:!1,duplicateCount:0,constraintExists:!0,tableName:V6};let Y=await this.checkForDuplicateSpans();return{needsMigration:!0,hasDuplicates:Y.hasDuplicates,duplicateCount:Y.duplicateCount,constraintExists:!1,tableName:V6}}async deduplicateSpans(){try{let $=await this.client.execute(`
        SELECT COUNT(*) as duplicate_count FROM (
          SELECT "spanId", "traceId"
          FROM "${V6}"
          GROUP BY "spanId", "traceId"
          HAVING COUNT(*) > 1
        )
      `),Y=Number($.rows?.[0]?.duplicate_count??0);if(Y===0){this.logger.debug("LibSQLDB: No duplicate spans found, skipping deduplication");return}this.logger.warn(`LibSQLDB: Found ${Y} duplicate (spanId, traceId) combinations, deduplicating...`);let G=(await this.client.execute(`
        DELETE FROM "${V6}"
        WHERE rowid NOT IN (
          SELECT MIN(best_rowid) FROM (
            SELECT
              rowid as best_rowid,
              "spanId",
              "traceId",
              ROW_NUMBER() OVER (
                PARTITION BY "spanId", "traceId"
                ORDER BY
                  CASE WHEN "endedAt" IS NOT NULL THEN 0 ELSE 1 END,
                  "updatedAt" DESC,
                  "createdAt" DESC
              ) as rn
            FROM "${V6}"
          ) ranked
          WHERE rn = 1
          GROUP BY "spanId", "traceId"
        )
        AND ("spanId", "traceId") IN (
          SELECT "spanId", "traceId"
          FROM "${V6}"
          GROUP BY "spanId", "traceId"
          HAVING COUNT(*) > 1
        )
      `)).rowsAffected??0;this.logger.warn(`LibSQLDB: Deleted ${G} duplicate span records`)}catch($){this.logger.warn("LibSQLDB: Failed to deduplicate spans:",$)}}getDefaultValue($){switch($){case"text":case"uuid":return"DEFAULT ''";case"integer":case"bigint":case"float":return"DEFAULT 0";case"boolean":return"DEFAULT 0";case"jsonb":return"DEFAULT '{}'";case"timestamp":return"DEFAULT CURRENT_TIMESTAMP";default:return"DEFAULT ''"}}async alterTable({tableName:$,schema:Y,ifNotExists:X}){let G=b7($,"table name");try{let J=await this.client.execute({sql:`PRAGMA table_info("${G}")`}),Q=new Set((J.rows||[]).map((W)=>W.name?.toLowerCase()));for(let W of X)if(!Q.has(W.toLowerCase())&&Y[W]){let Z=Y[W],K=this.getSqlType(Z.type),H=Z.nullable?"DEFAULT NULL":this.getDefaultValue(Z.type),z=`ALTER TABLE ${G} ADD COLUMN "${W}" ${K} ${H}`;await this.client.execute(z),this.logger.debug(`LibSQLDB: Added column ${W} to table ${$}`)}}catch(J){throw new G0({id:P0("LIBSQL","ALTER_TABLE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$}},J)}finally{this.tableColumnsCache.delete($)}}async deleteData({tableName:$}){let Y=b7($,"table name");try{await this.client.execute(`DELETE FROM ${Y}`)}catch(X){let G=new G0({id:P0("LIBSQL","CLEAR_TABLE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$}},X);this.logger?.trackException?.(G),this.logger?.error?.(G.toString())}}},hK9=class extends p_{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#X(),await this.#J(),await this.#$.createTable({tableName:L7,schema:KE}),await this.#$.createTable({tableName:u5,schema:UE}),await this.#$.alterTable({tableName:L7,schema:KE,ifNotExists:["status","authorId","visibility","favoriteCount"]}),await this.#$.alterTable({tableName:u5,schema:UE,ifNotExists:["mcpClients","requestContextSchema","workspace","skills","skillsFormat","browser"]}),await this.#Q(),await this.#G()}async#X(){let $=`${L7}_legacy`;if(await this.#$.hasColumn(L7,"name"))await this.#Y.execute({sql:`ALTER TABLE "${L7}" RENAME TO "${$}"`}),await this.#Y.execute({sql:`DROP TABLE IF EXISTS "${u5}"`});if(!await this.#$.hasColumn($,"name"))return;let J=(await this.#Y.execute({sql:`SELECT * FROM "${$}"`})).rows||[];await this.#$.createTable({tableName:L7,schema:KE}),await this.#$.createTable({tableName:u5,schema:UE});for(let Q of J){let W=Q.id;if(!W)continue;let Z=crypto.randomUUID(),K=new Date;await this.#$.insert({tableName:L7,record:{id:W,status:"published",activeVersionId:Z,authorId:Q.ownerId??Q.authorId??null,metadata:Q.metadata??null,createdAt:Q.createdAt??K,updatedAt:Q.updatedAt??K}}),await this.#$.insert({tableName:u5,record:{id:Z,agentId:W,versionNumber:1,name:Q.name??W,description:Q.description??null,instructions:this.serializeInstructions(Q.instructions??""),model:Q.model??"{}",tools:Q.tools??null,defaultOptions:Q.defaultOptions??null,workflows:Q.workflows??null,agents:Q.agents??null,integrationTools:Q.integrationTools??null,inputProcessors:Q.inputProcessors??null,outputProcessors:Q.outputProcessors??null,memory:Q.memory??null,scorers:Q.scorers??null,changedFields:null,changeMessage:"Migrated from legacy schema",createdAt:Q.createdAt??K}})}await this.#Y.execute({sql:`DROP TABLE IF EXISTS "${$}"`})}async#J(){if(!await this.#$.hasColumn(u5,"snapshot"))return;await this.#Y.execute({sql:`DROP TABLE IF EXISTS "${u5}"`}),await this.#Y.execute({sql:`DROP TABLE IF EXISTS "${L7}_legacy"`})}async#G(){try{await this.#Y.execute({sql:`DELETE FROM "${L7}"
              WHERE status = 'draft'
                AND activeVersionId IS NULL
                AND NOT EXISTS (
                  SELECT 1 FROM "${u5}"
                  WHERE "${u5}".agentId = "${L7}".id
                )`})}catch{}}async#Q(){try{let $=await this.#Y.execute({sql:`SELECT id, tools FROM "${u5}" WHERE tools IS NOT NULL`});if(!$.rows||$.rows.length===0)return;for(let Y of $.rows){let X=Y.tools,G;try{if(typeof X==="string")G=JSON.parse(X);else if(X instanceof ArrayBuffer)G=JSON.parse(new TextDecoder().decode(X));else G=X}catch{continue}if(Array.isArray(G)){let J={};for(let Q of G)if(typeof Q==="string")J[Q]={};await this.#Y.execute({sql:`UPDATE "${u5}" SET tools = ? WHERE id = ?`,args:[JSON.stringify(J),Y.id]})}}this.logger?.info?.("Migrated agent version tools from array to object format")}catch($){this.logger?.warn?.("Failed to migrate tools to JSONB format:",$)}}async dangerouslyClearAll(){await this.#$.deleteData({tableName:u5}),await this.#$.deleteData({tableName:L7})}parseJson($,Y){if(!$)return;if($ instanceof ArrayBuffer||$&&$.constructor&&$.constructor.name==="ArrayBuffer")try{let G=new TextDecoder().decode($);return JSON.parse(G)}catch(X){console.error(`Failed to parse ArrayBuffer for ${Y}:`,X);return}if(typeof $!=="string")return $;try{return JSON.parse($)}catch(X){let G={value:$.length>100?$.substring(0,100)+"...":$};if(Y)G.field=Y;throw new G0({id:P0("LIBSQL","PARSE_JSON","INVALID_JSON"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Failed to parse JSON${Y?` for field "${Y}"`:""}: ${X instanceof Error?X.message:"Unknown error"}`,details:G},X)}}parseRow($){return{id:$.id,status:$.status,activeVersionId:$.activeVersionId,authorId:$.authorId,visibility:$.visibility??void 0,metadata:this.parseJson($.metadata,"metadata"),favoriteCount:$.favoriteCount===null||$.favoriteCount===void 0?0:Number($.favoriteCount),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}async getById($){try{let Y=await this.#$.select({tableName:L7,keys:{id:$}});return Y?this.parseRow(Y):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_AGENT_BY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$}},Y)}}async create($){let{agent:Y}=$;try{let X=new Date,G=Y.visibility??(Y.authorId?"private":null);await this.#$.insert({tableName:L7,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,visibility:G,metadata:Y.metadata??null,favoriteCount:0,createdAt:X,updatedAt:X}});let{id:J,authorId:Q,visibility:W,metadata:Z,...K}=Y,H=crypto.randomUUID();await this.createVersion({id:H,agentId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"});let z=await this.getById(Y.id);if(!z)throw new G0({id:P0("LIBSQL","CREATE_AGENT","NOT_FOUND_AFTER_CREATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Agent ${Y.id} not found after creation`,details:{agentId:Y.id}});return z}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","CREATE_AGENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:Y.id}},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw new G0({id:P0("LIBSQL","UPDATE_AGENT","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`Agent ${Y} not found`,details:{agentId:Y}});let{authorId:J,activeVersionId:Q,metadata:W,status:Z,visibility:K}=X,H={updatedAt:new Date().toISOString()};if(J!==void 0)H.authorId=J;if(Q!==void 0)H.activeVersionId=Q;if(Z!==void 0)H.status=Z;if(K!==void 0)H.visibility=K;if(W!==void 0)H.metadata={...G.metadata,...W};await this.#$.update({tableName:L7,keys:{id:Y},data:H});let z=await this.getById(Y);if(!z)throw new G0({id:P0("LIBSQL","UPDATE_AGENT","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Agent ${Y} not found after update`,details:{agentId:Y}});return z}catch(G){if(G instanceof G0)throw G;throw new G0({id:P0("LIBSQL","UPDATE_AGENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:Y}},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#$.delete({tableName:L7,keys:{id:$}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_AGENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$}},Y)}}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W,visibility:Z,entityIds:K,pinFavoritedFor:H,favoritedOnly:z}=$||{},{field:V,direction:A}=this.parseOrderBy(G);if(Y<0)throw new G0({id:P0("LIBSQL","LIST_AGENTS","INVALID_PAGE"),domain:M0.STORAGE,category:E0.USER,details:{page:Y}},Error("page must be >= 0"));let F=A4(X,100),{offset:N,perPage:D}=B4(Y,X,F);try{if(K&&K.length===0)return{agents:[],total:0,page:Y,perPage:D,hasMore:!1};let L=[],B=[];if(W)L.push("a.status = ?"),B.push(W);if(J!==void 0)L.push("a.authorId = ?"),B.push(J);if(Z!==void 0)L.push("a.visibility = ?"),B.push(Z);if(Q&&Object.keys(Q).length>0)for(let[x,y]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(x))throw new G0({id:P0("LIBSQL","LIST_AGENTS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${x}. Keys must be alphanumeric with underscores.`,details:{key:x}});L.push(`json_extract(a.metadata, '$.${x}') = ?`),B.push(typeof y==="string"?y:JSON.stringify(y))}if(K&&K.length>0){let x=K.map(()=>"?").join(", ");L.push(`a.id IN (${x})`),B.push(...K)}let O=H,E=Boolean(O),M="",R=[];if(E&&O){if(M=`LEFT JOIN "${zG}" s ON s."entityType" = 'agent' AND s."entityId" = a.id AND s."userId" = ?`,R.push(O),z)L.push('s."userId" IS NOT NULL')}else if(z)L.push("1=0");let q=L.length>0?`WHERE ${L.join(" AND ")}`:"",w=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${L7}" a ${M} ${q}`,args:[...R,...B]}),I=Number(w.rows?.[0]?.count??0);if(I===0)return{agents:[],total:0,page:Y,perPage:D,hasMore:!1};let P=[];if(E&&O)P.push('(s."userId" IS NOT NULL) DESC');P.push(`a."${V}" ${A}`),P.push('a."id" ASC');let _=`ORDER BY ${P.join(", ")}`,C=X===!1?I:F,k=TD4(L7,"a");return{agents:((await this.#Y.execute({sql:`SELECT ${k} FROM "${L7}" a ${M} ${q} ${_} LIMIT ? OFFSET ?`,args:[...R,...B,C,N]})).rows??[]).map((x)=>this.parseRow(x)),total:I,page:Y,perPage:D,hasMore:X===!1?!1:N+F<I}}catch(L){if(L instanceof G0)throw L;throw new G0({id:P0("LIBSQL","LIST_AGENTS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},L)}}async createVersion($){try{let Y=new Date;return await this.#$.insert({tableName:u5,record:{id:$.id,agentId:$.agentId,versionNumber:$.versionNumber,name:$.name??null,description:$.description??null,instructions:this.serializeInstructions($.instructions),model:$.model,tools:$.tools??null,defaultOptions:$.defaultOptions??null,workflows:$.workflows??null,agents:$.agents??null,integrationTools:$.integrationTools??null,inputProcessors:$.inputProcessors??null,outputProcessors:$.outputProcessors??null,memory:$.memory??null,scorers:$.scorers??null,mcpClients:$.mcpClients??null,requestContextSchema:$.requestContextSchema??null,workspace:$.workspace??null,skills:$.skills??null,skillsFormat:$.skillsFormat??null,browser:$.browser??null,changedFields:$.changedFields??null,changeMessage:$.changeMessage??null,createdAt:Y}}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","CREATE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{versionId:$.id,agentId:$.agentId}},Y)}}async getVersion($){try{let Y=await this.#$.select({tableName:u5,keys:{id:$}});if(!Y)return null;return this.parseVersionRow(Y)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{versionId:$}},Y)}}async getVersionByNumber($,Y){try{let X=await this.#$.selectMany({tableName:u5,whereClause:{sql:"WHERE agentId = ? AND versionNumber = ?",args:[$,Y]},limit:1});if(!X||X.length===0)return null;return this.parseVersionRow(X[0])}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","GET_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$,versionNumber:Y}},X)}}async getLatestVersion($){try{let Y=await this.#$.selectMany({tableName:u5,whereClause:{sql:"WHERE agentId = ?",args:[$]},orderBy:"versionNumber DESC",limit:1});if(!Y||Y.length===0)return null;return this.parseVersionRow(Y[0])}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_LATEST_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$}},Y)}}async listVersions($){let{agentId:Y,page:X=0,perPage:G,orderBy:J}=$;if(X<0)throw new G0({id:P0("LIBSQL","LIST_VERSIONS","INVALID_PAGE"),domain:M0.STORAGE,category:E0.USER,details:{page:X}},Error("page must be >= 0"));let Q=A4(G,20),{offset:W,perPage:Z}=B4(X,G,Q);try{let{field:K,direction:H}=this.parseVersionOrderBy(J),z=await this.#$.selectTotalCount({tableName:u5,whereClause:{sql:"WHERE agentId = ?",args:[Y]}});if(z===0)return{versions:[],total:0,page:X,perPage:Z,hasMore:!1};let V=G===!1?z:Q;return{versions:(await this.#$.selectMany({tableName:u5,whereClause:{sql:"WHERE agentId = ?",args:[Y]},orderBy:`"${K}" ${H}`,limit:V,offset:W})).map((N)=>this.parseVersionRow(N)),total:z,page:X,perPage:Z,hasMore:G===!1?!1:W+Q<z}}catch(K){if(K instanceof G0)throw K;throw new G0({id:P0("LIBSQL","LIST_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:Y}},K)}}async deleteVersion($){try{await this.#$.delete({tableName:u5,keys:{id:$}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{versionId:$}},Y)}}async deleteVersionsByParentId($){try{let Y=await this.#$.selectMany({tableName:u5,whereClause:{sql:"WHERE agentId = ?",args:[$]}});for(let X of Y)await this.#$.delete({tableName:u5,keys:{id:X.id}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_VERSIONS_BY_AGENT_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$}},Y)}}async countVersions($){try{return await this.#$.selectTotalCount({tableName:u5,whereClause:{sql:"WHERE agentId = ?",args:[$]}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","COUNT_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$}},Y)}}serializeInstructions($){return Array.isArray($)?JSON.stringify($):$}deserializeInstructions($){if(!$)return $;try{let Y=JSON.parse($);if(Array.isArray(Y))return Y}catch{}return $}parseVersionRow($){return{id:$.id,agentId:$.agentId,versionNumber:$.versionNumber,name:$.name,description:$.description,instructions:this.deserializeInstructions($.instructions),model:this.parseJson($.model,"model"),tools:this.parseJson($.tools,"tools"),defaultOptions:this.parseJson($.defaultOptions,"defaultOptions"),workflows:this.parseJson($.workflows,"workflows"),agents:this.parseJson($.agents,"agents"),integrationTools:this.parseJson($.integrationTools,"integrationTools"),inputProcessors:this.parseJson($.inputProcessors,"inputProcessors"),outputProcessors:this.parseJson($.outputProcessors,"outputProcessors"),memory:this.parseJson($.memory,"memory"),scorers:this.parseJson($.scorers,"scorers"),mcpClients:this.parseJson($.mcpClients,"mcpClients"),requestContextSchema:this.parseJson($.requestContextSchema,"requestContextSchema"),workspace:this.parseJson($.workspace,"workspace"),skills:this.parseJson($.skills,"skills"),skillsFormat:$.skillsFormat,browser:this.parseJson($.browser,"browser"),changedFields:this.parseJson($.changedFields,"changedFields"),changeMessage:$.changeMessage,createdAt:new Date($.createdAt)}}};function Hp0($){if(typeof $==="object"&&$!=null)return JSON.stringify($);return $??null}function JY0($){if($==null)return;if(typeof $==="string")try{return JSON.parse($)}catch{return $}return $}function jD4($){return{id:String($.id),status:String($.status),toolName:String($.tool_name),toolCallId:String($.tool_call_id),args:JY0($.args)??{},agentId:String($.agent_id),threadId:$.thread_id!=null?String($.thread_id):void 0,resourceId:$.resource_id!=null?String($.resource_id):void 0,runId:String($.run_id),result:JY0($.result),error:JY0($.error),suspendPayload:JY0($.suspend_payload),retryCount:Number($.retry_count),maxRetries:Number($.max_retries),timeoutMs:Number($.timeout_ms),createdAt:new Date(String($.createdAt)),startedAt:$.startedAt?new Date(String($.startedAt)):void 0,suspendedAt:$.suspendedAt?new Date(String($.suspendedAt)):void 0,completedAt:$.completedAt?new Date(String($.completedAt)):void 0}}var fK9=class extends og{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:l$,schema:F5[l$]}),await this.#$.alterTable({tableName:l$,schema:F5[l$],ifNotExists:["suspend_payload","suspendedAt"]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:l$})}async createTask($){await this.#$.insert({tableName:l$,record:{id:$.id,tool_call_id:$.toolCallId,tool_name:$.toolName,agent_id:$.agentId,thread_id:$.threadId??null,resource_id:$.resourceId??null,run_id:$.runId,status:$.status,args:$.args,result:$.result??null,error:$.error??null,suspend_payload:$.suspendPayload??null,retry_count:$.retryCount,max_retries:$.maxRetries,timeout_ms:$.timeoutMs,createdAt:$.createdAt.toISOString(),startedAt:$.startedAt?.toISOString()??null,suspendedAt:$.suspendedAt?.toISOString()??null,completedAt:$.completedAt?.toISOString()??null}})}async updateTask($,Y){let X=[],G=[];if("status"in Y)X.push("status = ?"),G.push(Y.status);if("result"in Y)X.push("result = jsonb(?)"),G.push(Hp0(Y.result));if("error"in Y)X.push("error = jsonb(?)"),G.push(Hp0(Y.error));if("suspendPayload"in Y)X.push("suspend_payload = jsonb(?)"),G.push(Hp0(Y.suspendPayload));if("retryCount"in Y)X.push("retry_count = ?"),G.push(Y.retryCount);if("startedAt"in Y)X.push("startedAt = ?"),G.push(Y.startedAt?.toISOString()??null);if("suspendedAt"in Y)X.push("suspendedAt = ?"),G.push(Y.suspendedAt?.toISOString()??null);if("completedAt"in Y)X.push("completedAt = ?"),G.push(Y.completedAt?.toISOString()??null);if(X.length===0)return;G.push($),await this.#Y.execute({sql:`UPDATE ${l$} SET ${X.join(", ")} WHERE id = ?`,args:G})}async getTask($){let X=(await this.#Y.execute({sql:`SELECT ${M4(l$)} FROM ${l$} WHERE id = ?`,args:[$]})).rows[0];return X?jD4(X):null}async listTasks($){let Y=[],X=[];if($.status){let V=Array.isArray($.status)?$.status:[$.status];Y.push(`status IN (${V.map(()=>"?").join(", ")})`),X.push(...V)}if($.agentId)Y.push("agent_id = ?"),X.push($.agentId);if($.threadId)Y.push("thread_id = ?"),X.push($.threadId);if($.runId)Y.push("run_id = ?"),X.push($.runId);if($.resourceId)Y.push("resource_id = ?"),X.push($.resourceId);if($.toolName)Y.push("tool_name = ?"),X.push($.toolName);if($.toolCallId)Y.push("tool_call_id = ?"),X.push($.toolCallId);let G=$.dateFilterBy==="startedAt"?"startedAt":$.dateFilterBy==="suspendedAt"?"suspendedAt":$.dateFilterBy==="completedAt"?"completedAt":"createdAt";if($.fromDate)Y.push(`${G} >= ?`),X.push($.fromDate.toISOString());if($.toDate)Y.push(`${G} < ?`),X.push($.toDate.toISOString());let J=Y.length>0?`WHERE ${Y.join(" AND ")}`:"",Q=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${l$} ${J}`,args:[...X]}),W=Number(Q.rows[0]?.count??0),Z=$.orderBy==="startedAt"?"startedAt":$.orderBy==="suspendedAt"?"suspendedAt":$.orderBy==="completedAt"?"completedAt":"createdAt",K=$.orderDirection==="desc"?"DESC":"ASC",H=`SELECT ${M4(l$)} FROM ${l$} ${J} ORDER BY ${Z} ${K}`;if($.perPage!=null){if(H+=" LIMIT ?",X.push($.perPage),$.page!=null)H+=" OFFSET ?",X.push($.page*$.perPage)}return{tasks:(await this.#Y.execute({sql:H,args:X})).rows.map((V)=>jD4(V)),total:W}}async deleteTask($){await this.#Y.execute({sql:`DELETE FROM ${l$} WHERE id = ?`,args:[$]})}async deleteTasks($){let Y=[],X=[];if($.status){let J=Array.isArray($.status)?$.status:[$.status];Y.push(`status IN (${J.map(()=>"?").join(", ")})`),X.push(...J)}let G=$.dateFilterBy==="startedAt"?"startedAt":$.dateFilterBy==="suspendedAt"?"suspendedAt":$.dateFilterBy==="completedAt"?"completedAt":"createdAt";if($.fromDate)Y.push(`${G} >= ?`),X.push($.fromDate.toISOString());if($.toDate)Y.push(`${G} < ?`),X.push($.toDate.toISOString());if($.agentId)Y.push("agent_id = ?"),X.push($.agentId);if($.runId)Y.push("run_id = ?"),X.push($.runId);if(Y.length===0)return;await this.#Y.execute({sql:`DELETE FROM ${l$} WHERE ${Y.join(" AND ")}`,args:X})}async getRunningCount(){let $=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${l$} WHERE status = 'running'`,args:[]});return Number($.rows[0]?.count??0)}async getRunningCountByAgent($){let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${l$} WHERE status = 'running' AND agent_id = ?`,args:[$]});return Number(Y.rows[0]?.count??0)}},gK9=class extends tg{#$;#Y;static MANAGED_TABLES=[ZJ];constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:ZJ,schema:ig})}async put($){let Y=$.createdAt??new Date;await this.#Y.execute({sql:`INSERT OR IGNORE INTO "${ZJ}" ("hash", "content", "size", "mimeType", "createdAt") VALUES (?, ?, ?, ?, ?)`,args:[$.hash,$.content,$.size,$.mimeType??null,Y.toISOString()]})}async get($){let Y=await this.#Y.execute({sql:`SELECT ${M4(ZJ)} FROM "${ZJ}" WHERE "hash" = ?`,args:[$]});if(!Y.rows.length)return null;return this.#X(Y.rows[0])}async has($){return(await this.#Y.execute({sql:`SELECT 1 FROM "${ZJ}" WHERE "hash" = ? LIMIT 1`,args:[$]})).rows.length>0}async delete($){return(await this.#Y.execute({sql:`DELETE FROM "${ZJ}" WHERE "hash" = ?`,args:[$]})).rowsAffected>0}async putMany($){if($.length===0)return;await this.#$.batchInsert({tableName:ZJ,records:$.map((Y)=>({hash:Y.hash,content:Y.content,size:Y.size,mimeType:Y.mimeType??null,createdAt:(Y.createdAt??new Date).toISOString()}))})}async getMany($){let Y=new Map;if($.length===0)return Y;let X=500;for(let G=0;G<$.length;G+=X){let J=$.slice(G,G+X),Q=J.map(()=>"?").join(", "),W=await this.#Y.execute({sql:`SELECT ${M4(ZJ)} FROM "${ZJ}" WHERE "hash" IN (${Q})`,args:J});for(let Z of W.rows){let K=this.#X(Z);Y.set(K.hash,K)}}return Y}async dangerouslyClearAll(){await this.#$.deleteData({tableName:ZJ})}#X($){return{hash:$.hash,content:$.content,size:Number($.size),mimeType:$.mimeType||void 0,createdAt:new Date($.createdAt)}}},mK9=class extends eg{#$;#Y;static MANAGED_TABLES=[VG,fK];constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:VG,schema:F5[VG]}),await this.#$.createTable({tableName:fK,schema:F5[fK]}),await this.#Y.batch([{sql:`CREATE UNIQUE INDEX IF NOT EXISTS idx_channel_installations_webhook ON "${VG}" ("webhookId")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_channel_installations_platform_agent ON "${VG}" ("platform", "agentId")`,args:[]}],"write")}async dangerouslyClearAll(){await this.#$.deleteData({tableName:VG}),await this.#$.deleteData({tableName:fK})}async saveInstallation($){let Y=new Date().toISOString();await this.#Y.execute({sql:`
        INSERT INTO "${VG}" (id, platform, agentId, status, webhookId, data, configHash, error, createdAt, updatedAt)
        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
        ON CONFLICT(id) DO UPDATE SET
          platform = excluded.platform,
          agentId = excluded.agentId,
          status = excluded.status,
          webhookId = excluded.webhookId,
          data = excluded.data,
          configHash = excluded.configHash,
          error = excluded.error,
          updatedAt = excluded.updatedAt
      `,args:[$.id,$.platform,$.agentId,$.status,$.webhookId??null,JSON.stringify($.data),$.configHash??null,$.error??null,$.createdAt?.toISOString()??Y,Y]})}async getInstallation($){let X=(await this.#Y.execute({sql:`SELECT * FROM "${VG}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}async getInstallationByAgent($,Y){let G=(await this.#Y.execute({sql:`SELECT * FROM "${VG}" WHERE platform = ? AND agentId = ? ORDER BY CASE status WHEN 'active' THEN 0 WHEN 'pending' THEN 1 ELSE 2 END, updatedAt DESC LIMIT 1`,args:[$,Y]})).rows?.[0];return G?this.#X(G):null}async getInstallationByWebhookId($){let X=(await this.#Y.execute({sql:`SELECT * FROM "${VG}" WHERE webhookId = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}async listInstallations($){return(await this.#Y.execute({sql:`SELECT * FROM "${VG}" WHERE platform = ? ORDER BY createdAt DESC`,args:[$]})).rows.map((X)=>this.#X(X))}async deleteInstallation($){await this.#Y.execute({sql:`DELETE FROM "${VG}" WHERE id = ?`,args:[$]})}async saveConfig($){await this.#Y.execute({sql:`
        INSERT INTO "${fK}" (platform, data, updatedAt)
        VALUES (?, ?, ?)
        ON CONFLICT(platform) DO UPDATE SET
          data = excluded.data,
          updatedAt = excluded.updatedAt
      `,args:[$.platform,JSON.stringify($.data),$.updatedAt.toISOString()]})}async getConfig($){let X=(await this.#Y.execute({sql:`SELECT * FROM "${fK}" WHERE platform = ?`,args:[$]})).rows?.[0];if(!X)return null;return{platform:X.platform,data:JSON.parse(X.data||"{}"),updatedAt:new Date(X.updatedAt)}}async deleteConfig($){await this.#Y.execute({sql:`DELETE FROM "${fK}" WHERE platform = ?`,args:[$]})}#X($){return{id:$.id,platform:$.platform,agentId:$.agentId,status:$.status,webhookId:$.webhookId||void 0,data:JSON.parse($.data||"{}"),configHash:$.configHash||void 0,error:$.error||void 0,createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}};function N5($){return $===void 0||$===null?null:JSON.stringify($)}var uK9=class extends $m{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:D8,schema:ng}),await this.#$.createTable({tableName:I8,schema:$j}),await this.#$.createTable({tableName:lY,schema:rg}),await this.#X(D8,"requestContextSchema","TEXT"),await this.#X(D8,"tags","TEXT"),await this.#X(D8,"targetType","TEXT"),await this.#X(D8,"targetIds","TEXT"),await this.#X(D8,"scorerIds","TEXT"),await this.#X(I8,"requestContext","TEXT"),await this.#X(I8,"source","TEXT"),await this.#X(I8,"expectedTrajectory","TEXT"),await this.#Y.batch([{sql:`CREATE INDEX IF NOT EXISTS idx_dataset_items_dataset_validto ON "${I8}" ("datasetId", "validTo")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_dataset_items_dataset_version ON "${I8}" ("datasetId", "datasetVersion")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_dataset_items_dataset_validto_deleted ON "${I8}" ("datasetId", "validTo", "isDeleted")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_dataset_versions_dataset_version ON "${lY}" ("datasetId", "version")`,args:[]},{sql:`CREATE UNIQUE INDEX IF NOT EXISTS idx_dataset_versions_dataset_version_unique ON "${lY}" ("datasetId", "version")`,args:[]}],"write")}async#X($,Y,X){if(!await this.#$.hasColumn($,Y))await this.#Y.execute({sql:`ALTER TABLE "${$}" ADD COLUMN "${Y}" ${X}`,args:[]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:lY}),await this.#$.deleteData({tableName:I8}),await this.#$.deleteData({tableName:D8})}transformDatasetRow($){return{id:$.id,name:$.name,description:$.description,metadata:$.metadata?N8($.metadata):void 0,inputSchema:$.inputSchema?N8($.inputSchema):void 0,groundTruthSchema:$.groundTruthSchema?N8($.groundTruthSchema):void 0,requestContextSchema:$.requestContextSchema?N8($.requestContextSchema):void 0,tags:$.tags?N8($.tags):void 0,targetType:$.targetType||void 0,targetIds:$.targetIds?N8($.targetIds):void 0,scorerIds:$.scorerIds?N8($.scorerIds):void 0,version:$.version,createdAt:i$($.createdAt),updatedAt:i$($.updatedAt)}}transformItemRow($){return{id:$.id,datasetId:$.datasetId,datasetVersion:$.datasetVersion,input:N8($.input),groundTruth:$.groundTruth?N8($.groundTruth):void 0,expectedTrajectory:$.expectedTrajectory?N8($.expectedTrajectory):void 0,requestContext:$.requestContext?N8($.requestContext):void 0,metadata:$.metadata?N8($.metadata):void 0,source:$.source?N8($.source):void 0,createdAt:i$($.createdAt),updatedAt:i$($.updatedAt)}}transformItemRowFull($){return{id:$.id,datasetId:$.datasetId,datasetVersion:$.datasetVersion,validTo:$.validTo,isDeleted:Boolean($.isDeleted),input:N8($.input),groundTruth:$.groundTruth?N8($.groundTruth):void 0,expectedTrajectory:$.expectedTrajectory?N8($.expectedTrajectory):void 0,requestContext:$.requestContext?N8($.requestContext):void 0,metadata:$.metadata?N8($.metadata):void 0,source:$.source?N8($.source):void 0,createdAt:i$($.createdAt),updatedAt:i$($.updatedAt)}}transformDatasetVersionRow($){return{id:$.id,datasetId:$.datasetId,version:$.version,createdAt:i$($.createdAt)}}async createDataset($){try{let Y=crypto.randomUUID(),X=new Date,G=X.toISOString();return await this.#$.insert({tableName:D8,record:{id:Y,name:$.name,description:$.description??null,metadata:$.metadata,inputSchema:$.inputSchema??null,groundTruthSchema:$.groundTruthSchema??null,requestContextSchema:$.requestContextSchema??null,targetType:$.targetType??null,targetIds:$.targetIds?JSON.stringify($.targetIds):null,scorerIds:$.scorerIds?JSON.stringify($.scorerIds):null,version:0,createdAt:G,updatedAt:G}}),{id:Y,name:$.name,description:$.description,metadata:$.metadata,inputSchema:$.inputSchema??void 0,groundTruthSchema:$.groundTruthSchema??void 0,requestContextSchema:$.requestContextSchema??void 0,targetType:$.targetType??void 0,targetIds:$.targetIds??void 0,scorerIds:$.scorerIds??void 0,version:0,createdAt:X,updatedAt:X}}catch(Y){throw new G0({id:P0("LIBSQL","CREATE_DATASET","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getDatasetById({id:$}){try{let Y=await this.#Y.execute({sql:`SELECT ${M4(D8)} FROM ${D8} WHERE id = ?`,args:[$]});return Y.rows?.[0]?this.transformDatasetRow(Y.rows[0]):null}catch(Y){throw new G0({id:P0("LIBSQL","GET_DATASET","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doUpdateDataset($){try{let Y=await this.getDatasetById({id:$.id});if(!Y)throw new G0({id:P0("LIBSQL","UPDATE_DATASET","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{datasetId:$.id}});let X=new Date().toISOString(),G=["updatedAt = ?"],J=[X];if($.name!==void 0)G.push("name = ?"),J.push($.name);if($.description!==void 0)G.push("description = ?"),J.push($.description);if($.metadata!==void 0)G.push("metadata = ?"),J.push(JSON.stringify($.metadata));if($.inputSchema!==void 0)G.push("inputSchema = ?"),J.push($.inputSchema===null?null:JSON.stringify($.inputSchema));if($.groundTruthSchema!==void 0)G.push("groundTruthSchema = ?"),J.push($.groundTruthSchema===null?null:JSON.stringify($.groundTruthSchema));if($.requestContextSchema!==void 0)G.push("requestContextSchema = ?"),J.push($.requestContextSchema===null?null:JSON.stringify($.requestContextSchema));if($.tags!==void 0)G.push("tags = ?"),J.push($.tags===null?null:JSON.stringify($.tags));if($.targetType!==void 0)G.push("targetType = ?"),J.push($.targetType===null?null:$.targetType);if($.targetIds!==void 0)G.push("targetIds = ?"),J.push($.targetIds===null?null:JSON.stringify($.targetIds));if($.scorerIds!==void 0)G.push("scorerIds = ?"),J.push($.scorerIds===null?null:JSON.stringify($.scorerIds));return J.push($.id),await this.#Y.execute({sql:`UPDATE ${D8} SET ${G.join(", ")} WHERE id = ?`,args:J}),{...Y,name:$.name??Y.name,description:$.description??Y.description,metadata:$.metadata??Y.metadata,inputSchema:($.inputSchema!==void 0?$.inputSchema:Y.inputSchema)??void 0,groundTruthSchema:($.groundTruthSchema!==void 0?$.groundTruthSchema:Y.groundTruthSchema)??void 0,requestContextSchema:($.requestContextSchema!==void 0?$.requestContextSchema:Y.requestContextSchema)??void 0,tags:($.tags!==void 0?$.tags:Y.tags)??void 0,targetType:($.targetType!==void 0?$.targetType:Y.targetType)??void 0,targetIds:($.targetIds!==void 0?$.targetIds:Y.targetIds)??void 0,scorerIds:($.scorerIds!==void 0?$.scorerIds:Y.scorerIds)??void 0,updatedAt:new Date(X)}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","UPDATE_DATASET","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteDataset({id:$}){try{try{await this.#Y.execute({sql:`DELETE FROM ${c$} WHERE experimentId IN (SELECT id FROM ${iY} WHERE datasetId = ?)`,args:[$]})}catch{}try{await this.#Y.execute({sql:`UPDATE ${iY} SET datasetId = NULL, datasetVersion = NULL WHERE datasetId = ?`,args:[$]})}catch{}await this.#Y.batch([{sql:`DELETE FROM ${lY} WHERE datasetId = ?`,args:[$]},{sql:`DELETE FROM ${I8} WHERE datasetId = ?`,args:[$]},{sql:`DELETE FROM ${D8} WHERE id = ?`,args:[$]}],"write")}catch(Y){throw new G0({id:P0("LIBSQL","DELETE_DATASET","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listDatasets($){try{let{page:Y,perPage:X}=$.pagination,G=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${D8}`,args:[]}),J=Number(G.rows?.[0]?.count??0);if(J===0)return{datasets:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let Q=A4(X,100),{offset:W,perPage:Z}=B4(Y,X,Q),K=X===!1?J:Q,H=X===!1?J:W+Q;return{datasets:(await this.#Y.execute({sql:`SELECT ${M4(D8)} FROM ${D8} ORDER BY createdAt DESC, id ASC LIMIT ? OFFSET ?`,args:[K,W]})).rows?.map((V)=>this.transformDatasetRow(V))??[],pagination:{total:J,page:Y,perPage:Z,hasMore:H<J}}}catch(Y){throw new G0({id:P0("LIBSQL","LIST_DATASETS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doAddItem($){try{let Y=crypto.randomUUID(),X=crypto.randomUUID(),G=new Date,J=G.toISOString(),Q=await this.#Y.batch([{sql:`UPDATE ${D8} SET version = version + 1 WHERE id = ? RETURNING version`,args:[$.datasetId]},{sql:`INSERT INTO ${I8} (id, datasetId, datasetVersion, validTo, isDeleted, input, groundTruth, expectedTrajectory, requestContext, metadata, source, createdAt, updatedAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), NULL, 0, jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), ?, ?)`,args:[Y,$.datasetId,$.datasetId,N5($.input),N5($.groundTruth),N5($.expectedTrajectory),N5($.requestContext),N5($.metadata),N5($.source),J,J]},{sql:`INSERT INTO ${lY} (id, datasetId, version, createdAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), ?)`,args:[X,$.datasetId,$.datasetId,J]}],"write"),W=Number(Q[0].rows[0].version);return{id:Y,datasetId:$.datasetId,datasetVersion:W,input:$.input,groundTruth:$.groundTruth,expectedTrajectory:$.expectedTrajectory,requestContext:$.requestContext,metadata:$.metadata,source:$.source,createdAt:G,updatedAt:G}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","ADD_ITEM","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doUpdateItem($){try{let Y=await this.getItemById({id:$.id});if(!Y)throw new G0({id:P0("LIBSQL","UPDATE_ITEM","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{itemId:$.id}});if(Y.datasetId!==$.datasetId)throw new G0({id:P0("LIBSQL","UPDATE_ITEM","DATASET_MISMATCH"),domain:M0.STORAGE,category:E0.USER,details:{itemId:$.id,expectedDatasetId:$.datasetId,actualDatasetId:Y.datasetId}});let X=crypto.randomUUID(),G=new Date,J=G.toISOString(),Q=$.input!==void 0?$.input:Y.input,W=$.groundTruth!==void 0?$.groundTruth:Y.groundTruth,Z=$.expectedTrajectory!==void 0?$.expectedTrajectory:Y.expectedTrajectory,K=$.requestContext!==void 0?$.requestContext:Y.requestContext,H=$.metadata!==void 0?$.metadata:Y.metadata,z=$.source!==void 0?$.source:Y.source,V=await this.#Y.batch([{sql:`UPDATE ${D8} SET version = version + 1 WHERE id = ? RETURNING version`,args:[$.datasetId]},{sql:`UPDATE ${I8} SET validTo = (SELECT version FROM ${D8} WHERE id = ?) WHERE id = ? AND validTo IS NULL AND isDeleted = 0`,args:[$.datasetId,$.id]},{sql:`INSERT INTO ${I8} (id, datasetId, datasetVersion, validTo, isDeleted, input, groundTruth, expectedTrajectory, requestContext, metadata, source, createdAt, updatedAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), NULL, 0, jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), ?, ?)`,args:[$.id,$.datasetId,$.datasetId,N5(Q),N5(W),N5(Z),N5(K),N5(H),N5(z),Y.createdAt.toISOString(),J]},{sql:`INSERT INTO ${lY} (id, datasetId, version, createdAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), ?)`,args:[X,$.datasetId,$.datasetId,J]}],"write"),A=Number(V[0].rows[0].version);return{...Y,datasetVersion:A,input:Q,groundTruth:W,expectedTrajectory:Z,requestContext:K,metadata:H,source:z,updatedAt:G}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","UPDATE_ITEM","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doDeleteItem({id:$,datasetId:Y}){try{let X=await this.getItemById({id:$});if(!X)return;if(X.datasetId!==Y)throw new G0({id:P0("LIBSQL","DELETE_ITEM","DATASET_MISMATCH"),domain:M0.STORAGE,category:E0.USER,details:{itemId:$,expectedDatasetId:Y,actualDatasetId:X.datasetId}});let G=crypto.randomUUID(),J=new Date().toISOString();await this.#Y.batch([{sql:`UPDATE ${D8} SET version = version + 1 WHERE id = ? RETURNING version`,args:[Y]},{sql:`UPDATE ${I8} SET validTo = (SELECT version FROM ${D8} WHERE id = ?) WHERE id = ? AND validTo IS NULL AND isDeleted = 0`,args:[Y,$]},{sql:`INSERT INTO ${I8} (id, datasetId, datasetVersion, validTo, isDeleted, input, groundTruth, requestContext, metadata, source, createdAt, updatedAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), NULL, 1, jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), ?, ?)`,args:[$,Y,Y,N5(X.input),N5(X.groundTruth),N5(X.requestContext),N5(X.metadata),N5(X.source),X.createdAt.toISOString(),J]},{sql:`INSERT INTO ${lY} (id, datasetId, version, createdAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), ?)`,args:[G,Y,Y,J]}],"write")}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","DELETE_ITEM","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getItemById($){try{let Y;if($.datasetVersion!==void 0)Y=await this.#Y.execute({sql:`SELECT ${M4(I8)} FROM ${I8} WHERE id = ? AND datasetVersion = ? AND isDeleted = 0`,args:[$.id,$.datasetVersion]});else Y=await this.#Y.execute({sql:`SELECT ${M4(I8)} FROM ${I8} WHERE id = ? AND validTo IS NULL AND isDeleted = 0`,args:[$.id]});return Y.rows?.[0]?this.transformItemRow(Y.rows[0]):null}catch(Y){throw new G0({id:P0("LIBSQL","GET_ITEM","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getItemsByVersion({datasetId:$,version:Y}){try{return(await this.#Y.execute({sql:`SELECT ${M4(I8)} FROM ${I8} WHERE datasetId = ? AND datasetVersion <= ? AND (validTo IS NULL OR validTo > ?) AND isDeleted = 0 ORDER BY createdAt DESC, id ASC`,args:[$,Y,Y]})).rows?.map((G)=>this.transformItemRow(G))??[]}catch(X){throw new G0({id:P0("LIBSQL","GET_ITEMS_BY_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getItemHistory($){try{return(await this.#Y.execute({sql:`SELECT ${M4(I8)} FROM ${I8} WHERE id = ? ORDER BY datasetVersion DESC`,args:[$]})).rows?.map((X)=>this.transformItemRowFull(X))??[]}catch(Y){throw new G0({id:P0("LIBSQL","GET_ITEM_HISTORY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listItems($){try{let{page:Y,perPage:X}=$.pagination;if($.version!==void 0){let N=["datasetId = ?","datasetVersion <= ?","(validTo IS NULL OR validTo > ?)","isDeleted = 0"],D=[$.datasetId,$.version,$.version];if($.search){N.push("(LOWER(json(input)) LIKE ? OR LOWER(COALESCE(json(groundTruth), '')) LIKE ?)");let P=`%${$.search.toLowerCase()}%`;D.push(P,P)}let L=`WHERE ${N.join(" AND ")}`,B=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${I8} ${L}`,args:D}),O=Number(B.rows?.[0]?.count??0);if(O===0)return{items:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let E=A4(X,100),{offset:M,perPage:R}=B4(Y,X,E),q=X===!1?O:E,w=X===!1?O:M+E;return{items:(await this.#Y.execute({sql:`SELECT ${M4(I8)} FROM ${I8} ${L} ORDER BY createdAt DESC, id ASC LIMIT ? OFFSET ?`,args:[...D,q,M]})).rows?.map((P)=>this.transformItemRow(P))??[],pagination:{total:O,page:Y,perPage:R,hasMore:w<O}}}let G=["datasetId = ?","validTo IS NULL","isDeleted = 0"],J=[$.datasetId];if($.search){G.push("(LOWER(json(input)) LIKE ? OR LOWER(COALESCE(json(groundTruth), '')) LIKE ?)");let N=`%${$.search.toLowerCase()}%`;J.push(N,N)}let Q=`WHERE ${G.join(" AND ")}`,W=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${I8} ${Q}`,args:J}),Z=Number(W.rows?.[0]?.count??0);if(Z===0)return{items:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let K=A4(X,100),{offset:H,perPage:z}=B4(Y,X,K),V=X===!1?Z:K,A=X===!1?Z:H+K;return{items:(await this.#Y.execute({sql:`SELECT ${M4(I8)} FROM ${I8} ${Q} ORDER BY createdAt DESC, id ASC LIMIT ? OFFSET ?`,args:[...J,V,H]})).rows?.map((N)=>this.transformItemRow(N))??[],pagination:{total:Z,page:Y,perPage:z,hasMore:A<Z}}}catch(Y){throw new G0({id:P0("LIBSQL","LIST_ITEMS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createDatasetVersion($,Y){try{let X=crypto.randomUUID(),G=new Date,J=G.toISOString();return await this.#$.insert({tableName:lY,record:{id:X,datasetId:$,version:Y,createdAt:J}}),{id:X,datasetId:$,version:Y,createdAt:G}}catch(X){throw new G0({id:P0("LIBSQL","CREATE_DATASET_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async listDatasetVersions($){try{let{page:Y,perPage:X}=$.pagination,G=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${lY} WHERE datasetId = ?`,args:[$.datasetId]}),J=Number(G.rows?.[0]?.count??0);if(J===0)return{versions:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let Q=A4(X,100),{offset:W,perPage:Z}=B4(Y,X,Q),K=X===!1?J:Q,H=X===!1?J:W+Q;return{versions:(await this.#Y.execute({sql:`SELECT ${M4(lY)} FROM ${lY} WHERE datasetId = ? ORDER BY version DESC LIMIT ? OFFSET ?`,args:[$.datasetId,K,W]})).rows?.map((V)=>this.transformDatasetVersionRow(V))??[],pagination:{total:J,page:Y,perPage:Z,hasMore:H<J}}}catch(Y){throw new G0({id:P0("LIBSQL","LIST_DATASET_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doBatchInsertItems($){try{if(!await this.getDatasetById({id:$.datasetId}))throw new G0({id:P0("LIBSQL","BULK_ADD_ITEMS","DATASET_NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{datasetId:$.datasetId}});let X=new Date,G=X.toISOString(),J=crypto.randomUUID(),Q=[{sql:`UPDATE ${D8} SET version = version + 1 WHERE id = ? RETURNING version`,args:[$.datasetId]}],W=[];for(let H of $.items){let z=crypto.randomUUID();W.push({id:z,input:H}),Q.push({sql:`INSERT INTO ${I8} (id, datasetId, datasetVersion, validTo, isDeleted, input, groundTruth, expectedTrajectory, requestContext, metadata, source, createdAt, updatedAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), NULL, 0, jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), ?, ?)`,args:[z,$.datasetId,$.datasetId,N5(H.input),N5(H.groundTruth),N5(H.expectedTrajectory),N5(H.requestContext),N5(H.metadata),N5(H.source),G,G]})}Q.push({sql:`INSERT INTO ${lY} (id, datasetId, version, createdAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), ?)`,args:[J,$.datasetId,$.datasetId,G]});let Z=await this.#Y.batch(Q,"write"),K=Number(Z[0].rows[0].version);return W.map(({id:H,input:z})=>({id:H,datasetId:$.datasetId,datasetVersion:K,input:z.input,groundTruth:z.groundTruth,expectedTrajectory:z.expectedTrajectory,requestContext:z.requestContext,metadata:z.metadata,source:z.source,createdAt:X,updatedAt:X}))}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","BULK_ADD_ITEMS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doBatchDeleteItems($){try{if(!await this.getDatasetById({id:$.datasetId}))throw new G0({id:P0("LIBSQL","BULK_DELETE_ITEMS","DATASET_NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{datasetId:$.datasetId}});let X=[];for(let W of $.itemIds){let Z=await this.getItemById({id:W});if(Z&&Z.datasetId===$.datasetId)X.push(Z)}if(X.length===0)return;let G=new Date().toISOString(),J=crypto.randomUUID(),Q=[{sql:`UPDATE ${D8} SET version = version + 1 WHERE id = ? RETURNING version`,args:[$.datasetId]}];for(let W of X)Q.push({sql:`UPDATE ${I8} SET validTo = (SELECT version FROM ${D8} WHERE id = ?) WHERE id = ? AND validTo IS NULL AND isDeleted = 0`,args:[$.datasetId,W.id]}),Q.push({sql:`INSERT INTO ${I8} (id, datasetId, datasetVersion, validTo, isDeleted, input, groundTruth, requestContext, metadata, source, createdAt, updatedAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), NULL, 1, jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), ?, ?)`,args:[W.id,$.datasetId,$.datasetId,N5(W.input),N5(W.groundTruth),N5(W.requestContext),N5(W.metadata),N5(W.source),W.createdAt.toISOString(),G]});Q.push({sql:`INSERT INTO ${lY} (id, datasetId, version, createdAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), ?)`,args:[J,$.datasetId,$.datasetId,G]}),await this.#Y.batch(Q,"write")}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","BULK_DELETE_ITEMS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}},pK9=class extends Ym{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:iY,schema:Yj}),await this.#$.createTable({tableName:c$,schema:Xj}),await this.#$.alterTable({tableName:iY,schema:Yj,ifNotExists:["agentVersion"]}),await this.#$.alterTable({tableName:c$,schema:Xj,ifNotExists:["status","tags"]}),await this.#Y.batch([{sql:`CREATE INDEX IF NOT EXISTS idx_experiments_datasetid ON "${iY}" ("datasetId")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_experiment_results_experimentid ON "${c$}" ("experimentId")`,args:[]},{sql:`CREATE UNIQUE INDEX IF NOT EXISTS idx_experiment_results_exp_item ON "${c$}" ("experimentId", "itemId")`,args:[]}],"write")}async dangerouslyClearAll(){await this.#$.deleteData({tableName:c$}),await this.#$.deleteData({tableName:iY})}transformExperimentRow($){return{id:$.id,datasetId:$.datasetId??null,datasetVersion:$.datasetVersion!=null?$.datasetVersion:null,agentVersion:$.agentVersion??null,targetType:$.targetType,targetId:$.targetId,name:$.name??void 0,description:$.description??void 0,metadata:$.metadata?N8($.metadata):void 0,status:$.status,totalItems:$.totalItems,succeededCount:$.succeededCount,failedCount:$.failedCount,skippedCount:$.skippedCount??0,startedAt:$.startedAt?i$($.startedAt):null,completedAt:$.completedAt?i$($.completedAt):null,createdAt:i$($.createdAt),updatedAt:i$($.updatedAt)}}transformExperimentResultRow($){return{id:$.id,experimentId:$.experimentId,itemId:$.itemId,itemDatasetVersion:$.itemDatasetVersion!=null?$.itemDatasetVersion:null,input:N8($.input),output:$.output?N8($.output):null,groundTruth:$.groundTruth?N8($.groundTruth):null,error:$.error?N8($.error):null,startedAt:i$($.startedAt),completedAt:i$($.completedAt),retryCount:$.retryCount,traceId:$.traceId??null,status:$.status??null,tags:$.tags?N8($.tags):null,createdAt:i$($.createdAt)}}async createExperiment($){try{let Y=$.id??crypto.randomUUID(),X=new Date,G=X.toISOString();return await this.#$.insert({tableName:iY,record:{id:Y,datasetId:$.datasetId??null,datasetVersion:$.datasetVersion??null,agentVersion:$.agentVersion??null,targetType:$.targetType,targetId:$.targetId,name:$.name??null,description:$.description??null,metadata:$.metadata??null,status:"pending",totalItems:$.totalItems,succeededCount:0,failedCount:0,skippedCount:0,startedAt:null,completedAt:null,createdAt:G,updatedAt:G}}),{id:Y,datasetId:$.datasetId,datasetVersion:$.datasetVersion,agentVersion:$.agentVersion??null,targetType:$.targetType,targetId:$.targetId,name:$.name,description:$.description,metadata:$.metadata,status:"pending",totalItems:$.totalItems,succeededCount:0,failedCount:0,skippedCount:0,startedAt:null,completedAt:null,createdAt:X,updatedAt:X}}catch(Y){throw new G0({id:P0("LIBSQL","CREATE_EXPERIMENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async updateExperiment($){try{if(!await this.getExperimentById({id:$.id}))throw new G0({id:P0("LIBSQL","UPDATE_EXPERIMENT","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{experimentId:$.id}});let X=new Date().toISOString(),G=["updatedAt = ?"],J=[X];if($.status!==void 0)G.push("status = ?"),J.push($.status);if($.succeededCount!==void 0)G.push("succeededCount = ?"),J.push($.succeededCount);if($.failedCount!==void 0)G.push("failedCount = ?"),J.push($.failedCount);if($.totalItems!==void 0)G.push("totalItems = ?"),J.push($.totalItems);if($.startedAt!==void 0)G.push("startedAt = ?"),J.push($.startedAt?.toISOString()??null);if($.completedAt!==void 0)G.push("completedAt = ?"),J.push($.completedAt?.toISOString()??null);if($.skippedCount!==void 0)G.push("skippedCount = ?"),J.push($.skippedCount);if($.name!==void 0)G.push("name = ?"),J.push($.name);if($.description!==void 0)G.push("description = ?"),J.push($.description);if($.metadata!==void 0)G.push("metadata = ?"),J.push(JSON.stringify($.metadata));return J.push($.id),await this.#Y.execute({sql:`UPDATE ${iY} SET ${G.join(", ")} WHERE id = ?`,args:J}),await this.getExperimentById({id:$.id})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","UPDATE_EXPERIMENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getExperimentById($){try{let Y=await this.#Y.execute({sql:`SELECT ${M4(iY)} FROM ${iY} WHERE id = ?`,args:[$.id]});return Y.rows?.[0]?this.transformExperimentRow(Y.rows[0]):null}catch(Y){throw new G0({id:P0("LIBSQL","GET_EXPERIMENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listExperiments($){try{let{page:Y,perPage:X}=$.pagination,G=[],J=[];if($.datasetId)G.push("datasetId = ?"),J.push($.datasetId);if($.targetType)G.push("targetType = ?"),J.push($.targetType);if($.targetId)G.push("targetId = ?"),J.push($.targetId);if($.agentVersion)G.push("agentVersion = ?"),J.push($.agentVersion);if($.status)G.push("status = ?"),J.push($.status);let Q=G.length>0?`WHERE ${G.join(" AND ")}`:"",W=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${iY} ${Q}`,args:J}),Z=Number(W.rows?.[0]?.count??0);if(Z===0)return{experiments:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let K=A4(X,100),{offset:H,perPage:z}=B4(Y,X,K),V=X===!1?Z:K,A=X===!1?Z:H+K;return{experiments:(await this.#Y.execute({sql:`SELECT ${M4(iY)} FROM ${iY} ${Q} ORDER BY createdAt DESC LIMIT ? OFFSET ?`,args:[...J,V,H]})).rows?.map((N)=>this.transformExperimentRow(N))??[],pagination:{total:Z,page:Y,perPage:z,hasMore:A<Z}}}catch(Y){throw new G0({id:P0("LIBSQL","LIST_EXPERIMENTS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteExperiment($){try{await this.#Y.execute({sql:`DELETE FROM ${c$} WHERE experimentId = ?`,args:[$.id]}),await this.#Y.execute({sql:`DELETE FROM ${iY} WHERE id = ?`,args:[$.id]})}catch(Y){throw new G0({id:P0("LIBSQL","DELETE_EXPERIMENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async addExperimentResult($){try{let Y=$.id??crypto.randomUUID(),X=new Date,G=X.toISOString();return await this.#$.insert({tableName:c$,record:{id:Y,experimentId:$.experimentId,itemId:$.itemId,itemDatasetVersion:$.itemDatasetVersion??null,input:$.input,output:$.output,groundTruth:$.groundTruth,error:$.error??null,startedAt:$.startedAt.toISOString(),completedAt:$.completedAt.toISOString(),retryCount:$.retryCount,traceId:$.traceId??null,status:$.status??null,tags:$.tags!==void 0&&$.tags!==null?JSON.stringify($.tags):null,createdAt:G}}),{id:Y,experimentId:$.experimentId,itemId:$.itemId,itemDatasetVersion:$.itemDatasetVersion,input:$.input,output:$.output,groundTruth:$.groundTruth,error:$.error,startedAt:$.startedAt,completedAt:$.completedAt,retryCount:$.retryCount,traceId:$.traceId??null,status:$.status??null,tags:$.tags??null,createdAt:X}}catch(Y){throw new G0({id:P0("LIBSQL","ADD_EXPERIMENT_RESULT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async updateExperimentResult($){try{let Y=[],X=[];if($.status!==void 0)Y.push('"status" = ?'),X.push($.status);if($.tags!==void 0)Y.push('"tags" = ?'),X.push(JSON.stringify($.tags));if(Y.length===0){let W=await this.getExperimentResultById({id:$.id});if(!W)throw new G0({id:P0("LIBSQL","UPDATE_EXPERIMENT_RESULT","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{resultId:$.id}});return W}X.push($.id);let G='"id" = ?';if($.experimentId)X.push($.experimentId),G+=' AND "experimentId" = ?';if((await this.#Y.execute({sql:`UPDATE ${c$} SET ${Y.join(", ")} WHERE ${G}`,args:X})).rowsAffected===0)throw new G0({id:P0("LIBSQL","UPDATE_EXPERIMENT_RESULT","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{resultId:$.id,...$.experimentId?{experimentId:$.experimentId}:{}}});let Q=await this.getExperimentResultById({id:$.id});if(!Q)throw new G0({id:P0("LIBSQL","UPDATE_EXPERIMENT_RESULT","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{resultId:$.id}});return Q}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","UPDATE_EXPERIMENT_RESULT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getExperimentResultById($){try{let Y=await this.#Y.execute({sql:`SELECT ${M4(c$)} FROM ${c$} WHERE id = ?`,args:[$.id]});return Y.rows?.[0]?this.transformExperimentResultRow(Y.rows[0]):null}catch(Y){throw new G0({id:P0("LIBSQL","GET_EXPERIMENT_RESULT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listExperimentResults($){try{let{page:Y,perPage:X}=$.pagination,G=["experimentId = ?"],J=[$.experimentId];if($.traceId)G.push("traceId = ?"),J.push($.traceId);if($.status)G.push("status = ?"),J.push($.status);let Q=`WHERE ${G.join(" AND ")}`,W=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${c$} ${Q}`,args:J}),Z=Number(W.rows?.[0]?.count??0);if(Z===0)return{results:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let K=A4(X,100),{offset:H,perPage:z}=B4(Y,X,K),V=X===!1?Z:K,A=X===!1?Z:H+K;return{results:(await this.#Y.execute({sql:`SELECT ${M4(c$)} FROM ${c$} ${Q} ORDER BY startedAt ASC LIMIT ? OFFSET ?`,args:[...J,V,H]})).rows?.map((N)=>this.transformExperimentResultRow(N))??[],pagination:{total:Z,page:Y,perPage:z,hasMore:A<Z}}}catch(Y){throw new G0({id:P0("LIBSQL","LIST_EXPERIMENT_RESULTS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteExperimentResults($){try{await this.#Y.execute({sql:`DELETE FROM ${c$} WHERE experimentId = ?`,args:[$.experimentId]})}catch(Y){throw new G0({id:P0("LIBSQL","DELETE_EXPERIMENT_RESULTS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getReviewSummary(){try{return((await this.#Y.execute({sql:`SELECT
          "experimentId",
          COUNT(*) as total,
          SUM(CASE WHEN status = 'needs-review' THEN 1 ELSE 0 END) as "needsReview",
          SUM(CASE WHEN status = 'reviewed' THEN 1 ELSE 0 END) as reviewed,
          SUM(CASE WHEN status = 'complete' THEN 1 ELSE 0 END) as complete
        FROM ${c$}
        GROUP BY "experimentId"`,args:[]})).rows??[]).map((Y)=>({experimentId:Y.experimentId,total:Number(Y.total??0),needsReview:Number(Y.needsReview??0),reviewed:Number(Y.reviewed??0),complete:Number(Y.complete??0)}))}catch($){throw new G0({id:P0("LIBSQL","GET_REVIEW_SUMMARY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},$)}}},zp0={agent:L7,skill:cY},dK9=class extends kg{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:zG,schema:t_,compositePrimaryKey:["userId","entityType","entityId"]}),await this.#Y.execute(`CREATE INDEX IF NOT EXISTS idx_favorites_entity ON "${zG}" ("entityType", "entityId")`)}async dangerouslyClearAll(){let $=await this.#Y.transaction("write");try{await $.execute(`DELETE FROM "${zG}"`),await $.execute(`UPDATE "${L7}" SET "favoriteCount" = 0 WHERE "favoriteCount" > 0`),await $.execute(`UPDATE "${cY}" SET "favoriteCount" = 0 WHERE "favoriteCount" > 0`),await $.commit()}catch(Y){if(!$.closed)await $.rollback();throw Y}}async favorite($){let{userId:Y,entityType:X,entityId:G}=$,J=zp0[X];try{let Q=await this.#Y.transaction("write");try{if(!(await Q.execute({sql:`SELECT "favoriteCount" FROM "${J}" WHERE id = ?`,args:[G]})).rows?.[0])throw new G0({id:P0("LIBSQL","FAVORITE","ENTITY_NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`${X} ${G} not found`,details:{entityType:X,entityId:G}});if(((await Q.execute({sql:`INSERT OR IGNORE INTO "${zG}" ("userId", "entityType", "entityId", "createdAt") VALUES (?, ?, ?, ?)`,args:[Y,X,G,new Date().toISOString()]})).rowsAffected??0)>0)await Q.execute({sql:`UPDATE "${J}" SET "favoriteCount" = COALESCE("favoriteCount", 0) + 1 WHERE id = ?`,args:[G]});let K=await Q.execute({sql:`SELECT "favoriteCount" FROM "${J}" WHERE id = ?`,args:[G]}),H=Number(K.rows?.[0]?.favoriteCount??0);return await Q.commit(),{favorited:!0,favoriteCount:H}}catch(W){if(!Q.closed)await Q.rollback();throw W}}catch(Q){if(Q instanceof G0)throw Q;throw new G0({id:P0("LIBSQL","FAVORITE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{entityType:X,entityId:G}},Q)}}async unfavorite($){let{userId:Y,entityType:X,entityId:G}=$,J=zp0[X];try{let Q=await this.#Y.transaction("write");try{if(!(await Q.execute({sql:`SELECT "favoriteCount" FROM "${J}" WHERE id = ?`,args:[G]})).rows?.[0])throw new G0({id:P0("LIBSQL","UNFAVORITE","ENTITY_NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`${X} ${G} not found`,details:{entityType:X,entityId:G}});if(((await Q.execute({sql:`DELETE FROM "${zG}" WHERE "userId" = ? AND "entityType" = ? AND "entityId" = ?`,args:[Y,X,G]})).rowsAffected??0)>0)await Q.execute({sql:`UPDATE "${J}" SET "favoriteCount" = MAX(COALESCE("favoriteCount", 0) - 1, 0) WHERE id = ?`,args:[G]});let K=await Q.execute({sql:`SELECT "favoriteCount" FROM "${J}" WHERE id = ?`,args:[G]}),H=Number(K.rows?.[0]?.favoriteCount??0);return await Q.commit(),{favorited:!1,favoriteCount:H}}catch(W){if(!Q.closed)await Q.rollback();throw W}}catch(Q){if(Q instanceof G0)throw Q;throw new G0({id:P0("LIBSQL","UNFAVORITE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{entityType:X,entityId:G}},Q)}}async isFavorited($){try{return((await this.#Y.execute({sql:`SELECT 1 FROM "${zG}" WHERE "userId" = ? AND "entityType" = ? AND "entityId" = ? LIMIT 1`,args:[$.userId,$.entityType,$.entityId]})).rows?.length??0)>0}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","IS_FAVORITED","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async isFavoritedBatch($){let{userId:Y,entityType:X,entityIds:G}=$;if(G.length===0)return new Set;try{let J=G.map(()=>"?").join(", "),Q=[Y,X,...G],W=await this.#Y.execute({sql:`SELECT "entityId" FROM "${zG}" WHERE "userId" = ? AND "entityType" = ? AND "entityId" IN (${J})`,args:Q}),Z=new Set;for(let K of W.rows??[])Z.add(K.entityId);return Z}catch(J){if(J instanceof G0)throw J;throw new G0({id:P0("LIBSQL","IS_FAVORITED_BATCH","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},J)}}async listFavoritedIds($){try{return((await this.#Y.execute({sql:`SELECT "entityId" FROM "${zG}" WHERE "userId" = ? AND "entityType" = ? ORDER BY "createdAt" DESC, "entityId" ASC`,args:[$.userId,$.entityType]})).rows??[]).map((X)=>X.entityId)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_FAVORITED_IDS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteFavoritesForEntity($){let Y=zp0[$.entityType];try{let X=await this.#Y.transaction("write");try{let G=await X.execute({sql:`DELETE FROM "${zG}" WHERE "entityType" = ? AND "entityId" = ?`,args:[$.entityType,$.entityId]});return await X.execute({sql:`UPDATE "${Y}" SET "favoriteCount" = 0 WHERE id = ?`,args:[$.entityId]}),await X.commit(),Number(G.rowsAffected??0)}catch(G){if(!X.closed)await X.rollback();throw G}}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","DELETE_FAVORITES_FOR_ENTITY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{entityType:$.entityType,entityId:$.entityId}},X)}}},cK9=class extends d_{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:JJ,schema:mg}),await this.#$.createTable({tableName:u$,schema:ug}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_mcp_client_versions_client_version ON "${u$}" ("mcpClientId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:JJ}),await this.#$.deleteData({tableName:u$})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(JJ)} FROM "${JJ}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_MCP_CLIENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{mcpClient:Y}=$;try{let X=new Date;await this.#$.insert({tableName:JJ,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,metadata:Y.metadata??null,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:G,authorId:J,metadata:Q,...W}=Y,Z=crypto.randomUUID();try{await this.createVersion({id:Z,mcpClientId:Y.id,versionNumber:1,...W,changedFields:Object.keys(W),changeMessage:"Initial version"})}catch(K){throw await this.#$.delete({tableName:JJ,keys:{id:Y.id}}),K}return{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","CREATE_MCP_CLIENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw Error(`MCP client with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:Z}=X,K={updatedAt:new Date().toISOString()};if(J!==void 0)K.authorId=J;if(Q!==void 0)K.activeVersionId=Q;if(Z!==void 0)K.status=Z;if(W!==void 0)K.metadata={...G.metadata,...W};await this.#$.update({tableName:JJ,keys:{id:Y},data:K});let H=await this.getById(Y);if(!H)throw new G0({id:P0("LIBSQL","UPDATE_MCP_CLIENT","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`MCP client ${Y} not found after update`,details:{id:Y}});return H}catch(G){if(G instanceof G0)throw G;throw new G0({id:P0("LIBSQL","UPDATE_MCP_CLIENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${JJ}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_MCP_CLIENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W="published"}=$||{},{field:Z,direction:K}=this.parseOrderBy(G),H=[],z=[];if(H.push("status = ?"),z.push(W),J!==void 0)H.push("authorId = ?"),z.push(J);if(Q&&Object.keys(Q).length>0)for(let[R,q]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(R))throw new G0({id:P0("LIBSQL","LIST_MCP_CLIENTS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${R}. Keys must be alphanumeric with underscores.`,details:{key:R}});H.push(`json_extract(metadata, '$.${R}') = ?`),z.push(typeof q==="string"?q:JSON.stringify(q))}let V=`WHERE ${H.join(" AND ")}`,A=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${JJ}" ${V}`,args:z}),F=Number(A.rows?.[0]?.count??0);if(F===0)return{mcpClients:[],total:0,page:Y,perPage:X??100,hasMore:!1};let N=A4(X,100),{offset:D,perPage:L}=B4(Y,X,N),B=X===!1?F:N,O=X===!1?F:D+N;return{mcpClients:(await this.#Y.execute({sql:`SELECT ${M4(JJ)} FROM "${JJ}" ${V} ORDER BY ${Z} ${K} LIMIT ? OFFSET ?`,args:[...z,B,D]})).rows?.map((R)=>this.#X(R))??[],total:F,page:Y,perPage:L,hasMore:O<F}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_MCP_CLIENTS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#$.insert({tableName:u$,record:{id:$.id,mcpClientId:$.mcpClientId,versionNumber:$.versionNumber,name:$.name,description:$.description??null,servers:$.servers??null,changedFields:$.changedFields??null,changeMessage:$.changeMessage??null,createdAt:Y.toISOString()}}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","CREATE_MCP_CLIENT_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(u$)} FROM "${u$}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_MCP_CLIENT_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${M4(u$)} FROM "${u$}" WHERE mcpClientId = ? AND versionNumber = ?`,args:[$,Y]})).rows?.[0];return G?this.#J(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","GET_MCP_CLIENT_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(u$)} FROM "${u$}" WHERE mcpClientId = ? ORDER BY versionNumber DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_LATEST_MCP_CLIENT_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{mcpClientId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${u$}" WHERE mcpClientId = ?`,args:[Y]}),K=Number(Z.rows?.[0]?.count??0);if(K===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=A4(G,20),{offset:z,perPage:V}=B4(X,G,H),A=G===!1?K:H,F=G===!1?K:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${M4(u$)} FROM "${u$}" WHERE mcpClientId = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,A,z]})).rows?.map((L)=>this.#J(L))??[],total:K,page:X,perPage:V,hasMore:F<K}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_MCP_CLIENT_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${u$}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_MCP_CLIENT_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${u$}" WHERE "mcpClientId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_MCP_CLIENT_VERSIONS_BY_CLIENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${u$}" WHERE mcpClientId = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","COUNT_MCP_CLIENT_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,metadata:Y($.metadata),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#J($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,mcpClientId:$.mcpClientId,versionNumber:Number($.versionNumber),name:$.name,description:$.description??void 0,servers:Y($.servers),changedFields:Y($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}},lK9=class extends h_{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:QJ,schema:pg}),await this.#$.createTable({tableName:p$,schema:dg}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_mcp_server_versions_server_version ON "${p$}" ("mcpServerId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:QJ}),await this.#$.deleteData({tableName:p$})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(QJ)} FROM "${QJ}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_MCP_SERVER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{mcpServer:Y}=$;try{let X=new Date;await this.#$.insert({tableName:QJ,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,metadata:Y.metadata??null,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:G,authorId:J,metadata:Q,...W}=Y,Z=crypto.randomUUID();try{await this.createVersion({id:Z,mcpServerId:Y.id,versionNumber:1,...W,changedFields:Object.keys(W),changeMessage:"Initial version"})}catch(K){throw await this.#$.delete({tableName:QJ,keys:{id:Y.id}}),K}return{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","CREATE_MCP_SERVER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw Error(`MCP server with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:Z}=X,K={updatedAt:new Date().toISOString()};if(J!==void 0)K.authorId=J;if(Q!==void 0)K.activeVersionId=Q;if(Z!==void 0)K.status=Z;if(W!==void 0)K.metadata={...G.metadata,...W};await this.#$.update({tableName:QJ,keys:{id:Y},data:K});let H=await this.getById(Y);if(!H)throw new G0({id:P0("LIBSQL","UPDATE_MCP_SERVER","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`MCP server ${Y} not found after update`,details:{id:Y}});return H}catch(G){if(G instanceof G0)throw G;throw new G0({id:P0("LIBSQL","UPDATE_MCP_SERVER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${QJ}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_MCP_SERVER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W="published"}=$||{},{field:Z,direction:K}=this.parseOrderBy(G),H=[],z=[];if(H.push("status = ?"),z.push(W),J!==void 0)H.push("authorId = ?"),z.push(J);if(Q&&Object.keys(Q).length>0)for(let[R,q]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(R))throw new G0({id:P0("LIBSQL","LIST_MCP_SERVERS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${R}. Keys must be alphanumeric with underscores.`,details:{key:R}});H.push(`json_extract(metadata, '$.${R}') = ?`),z.push(typeof q==="string"?q:JSON.stringify(q))}let V=`WHERE ${H.join(" AND ")}`,A=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${QJ}" ${V}`,args:z}),F=Number(A.rows?.[0]?.count??0);if(F===0)return{mcpServers:[],total:0,page:Y,perPage:X??100,hasMore:!1};let N=A4(X,100),{offset:D,perPage:L}=B4(Y,X,N),B=X===!1?F:N,O=X===!1?F:D+N;return{mcpServers:(await this.#Y.execute({sql:`SELECT ${M4(QJ)} FROM "${QJ}" ${V} ORDER BY ${Z} ${K} LIMIT ? OFFSET ?`,args:[...z,B,D]})).rows?.map((R)=>this.#J(R))??[],total:F,page:Y,perPage:L,hasMore:O<F}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_MCP_SERVERS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#$.insert({tableName:p$,record:{id:$.id,mcpServerId:$.mcpServerId,versionNumber:$.versionNumber,name:$.name,version:$.version,description:$.description??null,instructions:$.instructions??null,repository:$.repository??null,releaseDate:$.releaseDate??null,isLatest:$.isLatest??null,packageCanonical:$.packageCanonical??null,tools:$.tools??null,agents:$.agents??null,workflows:$.workflows??null,changedFields:$.changedFields??null,changeMessage:$.changeMessage??null,createdAt:Y.toISOString()}}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","CREATE_MCP_SERVER_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(p$)} FROM "${p$}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#G(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_MCP_SERVER_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${M4(p$)} FROM "${p$}" WHERE mcpServerId = ? AND versionNumber = ?`,args:[$,Y]})).rows?.[0];return G?this.#G(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","GET_MCP_SERVER_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(p$)} FROM "${p$}" WHERE mcpServerId = ? ORDER BY versionNumber DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#G(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_LATEST_MCP_SERVER_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{mcpServerId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${p$}" WHERE mcpServerId = ?`,args:[Y]}),K=Number(Z.rows?.[0]?.count??0);if(K===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=A4(G,20),{offset:z,perPage:V}=B4(X,G,H),A=G===!1?K:H,F=G===!1?K:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${M4(p$)} FROM "${p$}" WHERE mcpServerId = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,A,z]})).rows?.map((L)=>this.#G(L))??[],total:K,page:X,perPage:V,hasMore:F<K}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_MCP_SERVER_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${p$}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_MCP_SERVER_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${p$}" WHERE "mcpServerId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_MCP_SERVER_VERSIONS_BY_SERVER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${p$}" WHERE mcpServerId = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","COUNT_MCP_SERVER_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){if($===null||$===void 0)return;if(typeof $==="string")try{return JSON.parse($)}catch{return $}return $}#J($){return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,metadata:this.#X($.metadata),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#G($){return{id:$.id,mcpServerId:$.mcpServerId,versionNumber:Number($.versionNumber),name:$.name,version:$.version,description:$.description??void 0,instructions:$.instructions??void 0,repository:this.#X($.repository),releaseDate:$.releaseDate??void 0,isLatest:$.isLatest===null||$.isLatest===void 0?void 0:Boolean($.isLatest),packageCanonical:$.packageCanonical??void 0,tools:this.#X($.tools),agents:this.#X($.agents),workflows:this.#X($.workflows),changedFields:this.#X($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}},k5="mastra_observational_memory",iK9=class extends Xm{supportsObservationalMemory=!0;#$;#Y;constructor($){super();let Y=sY($);this.#$=Y,this.#Y=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#Y.createTable({tableName:OX,schema:F5[OX]}),await this.#Y.createTable({tableName:j5,schema:F5[j5]}),await this.#Y.createTable({tableName:bU,schema:F5[bU]});let $;try{let{OBSERVATIONAL_MEMORY_TABLE_SCHEMA:Y}=await Promise.resolve().then(() => (Up0(),MD4));$=Y?.[k5]}catch{}if($)await this.#Y.createTable({tableName:k5,schema:$}),await this.#Y.alterTable({tableName:k5,schema:$,ifNotExists:["observedMessageIds","observedTimezone","bufferedObservations","bufferedObservationTokens","bufferedMessageIds","bufferedReflection","bufferedReflectionTokens","bufferedReflectionInputTokens","reflectedObservationLineCount","bufferedObservationChunks","isBufferingObservation","isBufferingReflection","lastBufferedAtTokens","lastBufferedAtTime","metadata"]});if(await this.#Y.alterTable({tableName:j5,schema:F5[j5],ifNotExists:["resourceId"]}),await this.#$.batch([{sql:`CREATE INDEX IF NOT EXISTS idx_messages_thread_created_at ON ${j5} (thread_id, "createdAt")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_messages_thread_resource_created_at ON ${j5} (thread_id, "resourceId", "createdAt")`,args:[]}],"write"),$)await this.#$.execute({sql:`CREATE INDEX IF NOT EXISTS idx_om_lookup_key ON "${k5}" ("lookupKey")`,args:[]})}async dangerouslyClearAll(){await this.#Y.deleteData({tableName:j5}),await this.#Y.deleteData({tableName:OX}),await this.#Y.deleteData({tableName:bU}),await this.#Y.deleteData({tableName:k5})}parseRow($){let Y=$.content;try{Y=JSON.parse($.content)}catch{}let X={id:$.id,content:Y,role:$.role,createdAt:new Date($.createdAt),threadId:$.thread_id,resourceId:$.resourceId};if($.type&&$.type!=="v2")X.type=$.type;return X}_sortMessages($,Y,X){return $.sort((G,J)=>{let Q=Y==="createdAt"||Y==="updatedAt",W=Q?new Date(G[Y]).getTime():G[Y],Z=Q?new Date(J[Y]).getTime():J[Y];if(typeof W==="number"&&typeof Z==="number")return X==="ASC"?W-Z:Z-W;return X==="ASC"?String(W).localeCompare(String(Z)):String(Z).localeCompare(String(W))})}async _getIncludedMessages({include:$}){if(!$||$.length===0)return null;let Y=$.map((A)=>A.id).filter(Boolean);if(Y.length===0)return null;let X=Y.map(()=>"?").join(", "),G=await this.#$.execute({sql:`SELECT id, thread_id, "createdAt" FROM "${j5}" WHERE id IN (${X})`,args:Y});if(!G.rows||G.rows.length===0)return null;let J=new Map(G.rows.map((A)=>[A.id,{threadId:A.thread_id,createdAt:A.createdAt}])),Q=[],W=[];for(let A of $){let{id:F,withPreviousMessages:N=0,withNextMessages:D=0}=A,L=J.get(F);if(!L)continue;if(Q.push(`SELECT * FROM (
        SELECT id, content, role, type, "createdAt", thread_id, "resourceId"
        FROM "${j5}"
        WHERE thread_id = ?
          AND "createdAt" <= ?
        ORDER BY "createdAt" DESC, id DESC
        LIMIT ?
      )`),W.push(L.threadId,L.createdAt,N+1),D>0)Q.push(`SELECT * FROM (
          SELECT id, content, role, type, "createdAt", thread_id, "resourceId"
          FROM "${j5}"
          WHERE thread_id = ?
            AND "createdAt" > ?
          ORDER BY "createdAt" ASC, id ASC
          LIMIT ?
        )`),W.push(L.threadId,L.createdAt,D)}if(Q.length===0)return null;let Z;if(Q.length===1)Z=Q[0];else Z=`${Q.join(" UNION ALL ")} ORDER BY "createdAt" ASC, id ASC`;let H=(await this.#$.execute({sql:Z,args:W})).rows?.map((A)=>this.parseRow(A)),z=new Set;return H.filter((A)=>{if(z.has(A.id))return!1;return z.add(A.id),!0})}async listMessagesById({messageIds:$}){if($.length===0)return{messages:[]};try{let Y=`
        SELECT 
          id, 
          content, 
          role, 
          type,
          "createdAt", 
          thread_id,
          "resourceId"
        FROM "${j5}"
        WHERE id IN (${$.map(()=>"?").join(", ")})
        ORDER BY "createdAt" DESC
      `,X=await this.#$.execute({sql:Y,args:$});if(!X.rows)return{messages:[]};return{messages:new l6().add(X.rows.map(this.parseRow),"memory").get.all.db()}}catch(Y){throw new G0({id:P0("LIBSQL","LIST_MESSAGES_BY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{messageIds:JSON.stringify($)}},Y)}}async listMessages($){let{threadId:Y,resourceId:X,include:G,filter:J,perPage:Q,page:W=0,orderBy:Z}=$,K=Array.isArray(Y)?Y:[Y];if(K.length===0||K.some((A)=>!A.trim()))throw new G0({id:P0("LIBSQL","LIST_MESSAGES","INVALID_THREAD_ID"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:Array.isArray(Y)?Y.join(","):Y}},Error("threadId must be a non-empty string or array of non-empty strings"));if(W<0)throw new G0({id:P0("LIBSQL","LIST_MESSAGES","INVALID_PAGE"),domain:M0.STORAGE,category:E0.USER,details:{page:W}},Error("page must be >= 0"));let H=A4(Q,40),{offset:z,perPage:V}=B4(W,Q,H);try{let{field:A,direction:F}=this.parseOrderBy(Z,"ASC"),N=`ORDER BY "${A}" ${F}`,L=[`thread_id IN (${K.map(()=>"?").join(", ")})`],B=[...K];if(X)L.push('"resourceId" = ?'),B.push(X);if(J?.dateRange?.start){let v=J.dateRange.startExclusive?">":">=";L.push(`"createdAt" ${v} ?`),B.push(J.dateRange.start instanceof Date?J.dateRange.start.toISOString():J.dateRange.start)}if(J?.dateRange?.end){let v=J.dateRange.endExclusive?"<":"<=";L.push(`"createdAt" ${v} ?`),B.push(J.dateRange.end instanceof Date?J.dateRange.end.toISOString():J.dateRange.end)}let O=L.length>0?`WHERE ${L.join(" AND ")}`:"";if(H===0&&(!G||G.length===0))return{messages:[],total:0,page:W,perPage:V,hasMore:!1};if(H===0&&G&&G.length>0){let v=await this._getIncludedMessages({include:G});if(!v||v.length===0)return{messages:[],total:0,page:W,perPage:V,hasMore:!1};let x=new l6().add(v,"memory");return{messages:this._sortMessages(x.get.all.db(),A,F),total:0,page:W,perPage:V,hasMore:!1}}let E=await this.#$.execute({sql:`SELECT COUNT(*) as count FROM ${j5} ${O}`,args:B}),M=Number(E.rows?.[0]?.count??0),R=Q===!1?M:H,w=((await this.#$.execute({sql:`SELECT id, content, role, type, "createdAt", "resourceId", "thread_id" FROM ${j5} ${O} ${N} LIMIT ? OFFSET ?`,args:[...B,R,z]})).rows||[]).map((v)=>this.parseRow(v));if(M===0&&w.length===0&&(!G||G.length===0))return{messages:[],total:0,page:W,perPage:V,hasMore:!1};let I=new Set(w.map((v)=>v.id));if(G&&G.length>0){let v=await this._getIncludedMessages({include:G});if(v){for(let x of v)if(!I.has(x.id))w.push(x),I.add(x.id)}}let P=new l6().add(w,"memory"),_=this._sortMessages(P.get.all.db(),A,F),C=new Set(K),S=new Set(_.filter((v)=>v.threadId&&C.has(v.threadId)).map((v)=>v.id)).size>=M,T=Q!==!1&&!S&&z+H<M;return{messages:_,total:M,page:W,perPage:V,hasMore:T}}catch(A){let F=new G0({id:P0("LIBSQL","LIST_MESSAGES","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:Array.isArray(Y)?Y.join(","):Y,resourceId:X??""}},A);return this.logger?.error?.(F.toString()),this.logger?.trackException?.(F),{messages:[],total:0,page:W,perPage:V,hasMore:!1}}}async listMessagesByResourceId($){let{resourceId:Y,include:X,filter:G,perPage:J,page:Q=0,orderBy:W}=$;if(!Y||typeof Y!=="string"||Y.trim().length===0)throw new G0({id:P0("LIBSQL","LIST_MESSAGES","INVALID_QUERY"),domain:M0.STORAGE,category:E0.USER,details:{resourceId:Y??""}},Error("resourceId is required"));if(Q<0)throw new G0({id:P0("LIBSQL","LIST_MESSAGES","INVALID_PAGE"),domain:M0.STORAGE,category:E0.USER,details:{page:Q}},Error("page must be >= 0"));let Z=A4(J,40),{offset:K,perPage:H}=B4(Q,J,Z);try{let{field:z,direction:V}=this.parseOrderBy(W,"ASC"),A=`ORDER BY "${z}" ${V}`,F=[],N=[];if(F.push('"resourceId" = ?'),N.push(Y),G?.dateRange?.start){let P=G.dateRange.startExclusive?">":">=";F.push(`"createdAt" ${P} ?`),N.push(G.dateRange.start instanceof Date?G.dateRange.start.toISOString():G.dateRange.start)}if(G?.dateRange?.end){let P=G.dateRange.endExclusive?"<":"<=";F.push(`"createdAt" ${P} ?`),N.push(G.dateRange.end instanceof Date?G.dateRange.end.toISOString():G.dateRange.end)}let D=`WHERE ${F.join(" AND ")}`;if(Z===0&&(!X||X.length===0))return{messages:[],total:0,page:Q,perPage:H,hasMore:!1};if(Z===0&&X&&X.length>0){let P=await this._getIncludedMessages({include:X});if(!P||P.length===0)return{messages:[],total:0,page:Q,perPage:H,hasMore:!1};let _=new l6().add(P,"memory");return{messages:this._sortMessages(_.get.all.db(),z,V),total:0,page:Q,perPage:H,hasMore:!1}}let L=await this.#$.execute({sql:`SELECT COUNT(*) as count FROM ${j5} ${D}`,args:N}),B=Number(L.rows?.[0]?.count??0),O=J===!1?B:Z,M=((await this.#$.execute({sql:`SELECT id, content, role, type, "createdAt", "resourceId", "thread_id" FROM ${j5} ${D} ${A} LIMIT ? OFFSET ?`,args:[...N,O,K]})).rows||[]).map((P)=>this.parseRow(P));if(B===0&&M.length===0&&(!X||X.length===0))return{messages:[],total:0,page:Q,perPage:H,hasMore:!1};let R=new Set(M.map((P)=>P.id));if(X&&X.length>0){let P=await this._getIncludedMessages({include:X});if(P){for(let _ of P)if(!R.has(_.id))M.push(_),R.add(_.id)}}let q=new l6().add(M,"memory"),w=this._sortMessages(q.get.all.db(),z,V),I=J!==!1&&K+Z<B;return{messages:w,total:B,page:Q,perPage:H,hasMore:I}}catch(z){let V=new G0({id:P0("LIBSQL","LIST_MESSAGES","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{resourceId:Y}},z);return this.logger?.error?.(V.toString()),this.logger?.trackException?.(V),{messages:[],total:0,page:Q,perPage:H,hasMore:!1}}}async saveMessages({messages:$}){if($.length===0)return{messages:$};try{let Y=$[0]?.threadId;if(!Y)throw Error("Thread ID is required");let X=$.map((K)=>{let H=K.createdAt||new Date;if(!K.threadId)throw Error("Expected to find a threadId for message, but couldn't find one. An unexpected error has occurred.");if(!K.resourceId)throw Error("Expected to find a resourceId for message, but couldn't find one. An unexpected error has occurred.");return{sql:`INSERT INTO "${j5}" (id, thread_id, content, role, type, "createdAt", "resourceId") 
                  VALUES (?, ?, ?, ?, ?, ?, ?)
                  ON CONFLICT(id) DO UPDATE SET
                    thread_id=excluded.thread_id,
                    content=excluded.content,
                    role=excluded.role,
                    type=excluded.type,
                    "resourceId"=excluded."resourceId"
                `,args:[K.id,K.threadId,typeof K.content==="object"?JSON.stringify(K.content):K.content,K.role,K.type||"v2",H instanceof Date?H.toISOString():H,K.resourceId]}}),G=new Date().toISOString();X.push({sql:`UPDATE "${OX}" SET "updatedAt" = ? WHERE id = ?`,args:[G,Y]});let J=50,Q=X.slice(0,-1),W=X[X.length-1];for(let K=0;K<Q.length;K+=J){let H=Q.slice(K,K+J);if(H.length>0)await this.#$.batch(H,"write")}if(W)await this.#$.execute(W);return{messages:new l6().add($,"memory").get.all.db()}}catch(Y){throw new G0({id:P0("LIBSQL","SAVE_MESSAGES","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async updateMessages({messages:$}){if($.length===0)return[];let Y=$.map((V)=>V.id),X=Y.map(()=>"?").join(","),G=`SELECT * FROM ${j5} WHERE id IN (${X})`,Q=(await this.#$.execute({sql:G,args:Y})).rows.map((V)=>this.parseRow(V));if(Q.length===0)return[];let W=[],Z=new Set,K={threadId:"thread_id"};for(let V of Q){let A=$.find((E)=>E.id===V.id);if(!A)continue;let{id:F,...N}=A;if(Object.keys(N).length===0)continue;if(Z.add(V.threadId),A.threadId&&A.threadId!==V.threadId)Z.add(A.threadId);let D=[],L=[],B={...N};if(B.content){let E={...V.content,...B.content,...V.content?.metadata&&B.content.metadata?{metadata:{...V.content.metadata,...B.content.metadata}}:{}};D.push(`${b7("content","column name")} = ?`),L.push(JSON.stringify(E)),delete B.content}for(let E in B)if(Object.prototype.hasOwnProperty.call(B,E)){let M=K[E]||E;D.push(`${b7(M,"column name")} = ?`);let R=B[E];if(typeof R==="object"&&R!==null)R=JSON.stringify(R);L.push(R)}if(D.length===0)continue;L.push(F);let O=`UPDATE ${j5} SET ${D.join(", ")} WHERE id = ?`;W.push({sql:O,args:L})}if(W.length===0)return Q;let H=new Date().toISOString();for(let V of Z)if(V)W.push({sql:`UPDATE ${OX} SET updatedAt = ? WHERE id = ?`,args:[H,V]});return await this.#$.batch(W,"write"),(await this.#$.execute({sql:G,args:Y})).rows.map((V)=>this.parseRow(V))}async deleteMessages($){if(!$||$.length===0)return;try{let X=new Set,G=await this.#$.transaction("write");try{for(let J=0;J<$.length;J+=100){let Q=$.slice(J,J+100),W=Q.map(()=>"?").join(",");(await G.execute({sql:`SELECT DISTINCT thread_id FROM "${j5}" WHERE id IN (${W})`,args:Q})).rows?.forEach((K)=>{if(K.thread_id)X.add(K.thread_id)}),await G.execute({sql:`DELETE FROM "${j5}" WHERE id IN (${W})`,args:Q})}if(X.size>0){let J=new Date().toISOString();for(let Q of X)await G.execute({sql:`UPDATE "${OX}" SET "updatedAt" = ? WHERE id = ?`,args:[J,Q]})}await G.commit()}catch(J){throw await G.rollback(),J}}catch(Y){throw new G0({id:P0("LIBSQL","DELETE_MESSAGES","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{messageIds:$.join(", ")}},Y)}}async getResourceById({resourceId:$}){let Y=await this.#Y.select({tableName:bU,keys:{id:$}});if(!Y)return null;return{...Y,workingMemory:Y.workingMemory&&typeof Y.workingMemory==="object"?JSON.stringify(Y.workingMemory):Y.workingMemory,metadata:typeof Y.metadata==="string"?JSON.parse(Y.metadata):Y.metadata,createdAt:new Date(Y.createdAt),updatedAt:new Date(Y.updatedAt)}}async saveResource({resource:$}){return await this.#Y.insert({tableName:bU,record:{...$}}),$}async updateResource({resourceId:$,workingMemory:Y,metadata:X}){let G=await this.getResourceById({resourceId:$});if(!G){let Z={id:$,workingMemory:Y,metadata:X||{},createdAt:new Date,updatedAt:new Date};return this.saveResource({resource:Z})}let J={...G,workingMemory:Y!==void 0?Y:G.workingMemory,metadata:{...G.metadata,...X},updatedAt:new Date},Q=[],W=[];if(Y!==void 0)Q.push("workingMemory = ?"),W.push(Y);if(X)Q.push("metadata = jsonb(?)"),W.push(JSON.stringify(J.metadata));return Q.push("updatedAt = ?"),W.push(J.updatedAt.toISOString()),W.push($),await this.#$.execute({sql:`UPDATE ${bU} SET ${Q.join(", ")} WHERE id = ?`,args:W}),J}async getThreadById({threadId:$,resourceId:Y}){try{let X={id:$};if(Y!==void 0)X.resourceId=Y;let G=await this.#Y.select({tableName:OX,keys:X});if(!G)return null;return{...G,metadata:typeof G.metadata==="string"?JSON.parse(G.metadata):G.metadata,createdAt:new Date(G.createdAt),updatedAt:new Date(G.updatedAt)}}catch(X){throw new G0({id:P0("LIBSQL","GET_THREAD_BY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$}},X)}}async listThreads($){let{page:Y=0,perPage:X,orderBy:G,filter:J}=$;try{this.validatePaginationInput(Y,X??100)}catch(z){throw new G0({id:P0("LIBSQL","LIST_THREADS","INVALID_PAGE"),domain:M0.STORAGE,category:E0.USER,details:{page:Y,...X!==void 0&&{perPage:X}}},z instanceof Error?z:Error("Invalid pagination parameters"))}let Q=A4(X,100);try{this.validateMetadataKeys(J?.metadata)}catch(z){throw new G0({id:P0("LIBSQL","LIST_THREADS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,details:{metadataKeys:J?.metadata?Object.keys(J.metadata).join(", "):""}},z instanceof Error?z:Error("Invalid metadata key"))}let{offset:W,perPage:Z}=B4(Y,X,Q),{field:K,direction:H}=this.parseOrderBy(G);try{let z=[],V=[];if(J?.resourceId)z.push("resourceId = ?"),V.push(J.resourceId);if(J?.metadata&&Object.keys(J.metadata).length>0)for(let[M,R]of Object.entries(J.metadata))if(R===null)z.push(`json_extract(metadata, '$.${M}') IS NULL`);else if(typeof R==="boolean")z.push(`json_extract(metadata, '$.${M}') = ?`),V.push(R?1:0);else if(typeof R==="number")z.push(`json_extract(metadata, '$.${M}') = ?`),V.push(R);else if(typeof R==="string")z.push(`json_extract(metadata, '$.${M}') = ?`),V.push(R);else throw new G0({id:P0("LIBSQL","LIST_THREADS","INVALID_METADATA_VALUE"),domain:M0.STORAGE,category:E0.USER,text:`Metadata filter value for key "${M}" must be a scalar type (string, number, boolean, or null), got ${typeof R}`,details:{key:M,valueType:typeof R}});let A=z.length>0?`WHERE ${z.join(" AND ")}`:"",F=`FROM ${OX} ${A}`,N=(M)=>({id:M.id,resourceId:M.resourceId,title:M.title,createdAt:new Date(M.createdAt),updatedAt:new Date(M.updatedAt),metadata:typeof M.metadata==="string"?JSON.parse(M.metadata):M.metadata}),D=await this.#$.execute({sql:`SELECT COUNT(*) as count ${F}`,args:V}),L=Number(D.rows?.[0]?.count??0);if(L===0)return{threads:[],total:0,page:Y,perPage:Z,hasMore:!1};let B=X===!1?L:Q;return{threads:((await this.#$.execute({sql:`SELECT ${M4(OX)} ${F} ORDER BY "${K}" ${H} LIMIT ? OFFSET ?`,args:[...V,B,W]})).rows||[]).map(N),total:L,page:Y,perPage:Z,hasMore:X===!1?!1:W+Q<L}}catch(z){if(z instanceof G0&&z.category===E0.USER)throw z;let V=new G0({id:P0("LIBSQL","LIST_THREADS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{...J?.resourceId&&{resourceId:J.resourceId},hasMetadataFilter:!!J?.metadata}},z);return this.logger?.trackException?.(V),this.logger?.error?.(V.toString()),{threads:[],total:0,page:Y,perPage:Z,hasMore:!1}}}async saveThread({thread:$}){try{return await this.#Y.insert({tableName:OX,record:{...$}}),$}catch(Y){let X=new G0({id:P0("LIBSQL","SAVE_THREAD","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$.id}},Y);throw this.logger?.trackException?.(X),this.logger?.error?.(X.toString()),X}}async updateThread({id:$,title:Y,metadata:X}){let G=await this.getThreadById({threadId:$});if(!G)throw new G0({id:P0("LIBSQL","UPDATE_THREAD","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`Thread ${$} not found`,details:{status:404,threadId:$}});let J={...G,title:Y,metadata:{...G.metadata,...X}};try{return await this.#$.execute({sql:`UPDATE ${OX} SET title = ?, metadata = jsonb(?) WHERE id = ?`,args:[Y,JSON.stringify(J.metadata),$]}),J}catch(Q){throw new G0({id:P0("LIBSQL","UPDATE_THREAD","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,text:`Failed to update thread ${$}`,details:{threadId:$}},Q)}}async deleteThread({threadId:$}){try{await this.#$.execute({sql:`DELETE FROM ${j5} WHERE thread_id = ?`,args:[$]}),await this.#$.execute({sql:`DELETE FROM ${OX} WHERE id = ?`,args:[$]})}catch(Y){throw new G0({id:P0("LIBSQL","DELETE_THREAD","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$}},Y)}}async cloneThread($){let{sourceThreadId:Y,newThreadId:X,resourceId:G,title:J,metadata:Q,options:W}=$,Z=await this.getThreadById({threadId:Y});if(!Z)throw new G0({id:P0("LIBSQL","CLONE_THREAD","SOURCE_NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`Source thread with id ${Y} not found`,details:{sourceThreadId:Y}});let K=X||crypto.randomUUID();if(await this.getThreadById({threadId:K}))throw new G0({id:P0("LIBSQL","CLONE_THREAD","THREAD_EXISTS"),domain:M0.STORAGE,category:E0.USER,text:`Thread with id ${K} already exists`,details:{newThreadId:K}});try{let z=`SELECT id, content, role, type, "createdAt", thread_id, "resourceId"
                          FROM "${j5}" WHERE thread_id = ?`,V=[Y];if(W?.messageFilter?.startDate)z+=' AND "createdAt" >= ?',V.push(W.messageFilter.startDate instanceof Date?W.messageFilter.startDate.toISOString():W.messageFilter.startDate);if(W?.messageFilter?.endDate)z+=' AND "createdAt" <= ?',V.push(W.messageFilter.endDate instanceof Date?W.messageFilter.endDate.toISOString():W.messageFilter.endDate);if(W?.messageFilter?.messageIds&&W.messageFilter.messageIds.length>0)z+=` AND id IN (${W.messageFilter.messageIds.map(()=>"?").join(", ")})`,V.push(...W.messageFilter.messageIds);if(z+=' ORDER BY "createdAt" ASC',W?.messageLimit&&W.messageLimit>0){let M=`SELECT * FROM (${z.replace('ORDER BY "createdAt" ASC','ORDER BY "createdAt" DESC')} LIMIT ?) ORDER BY "createdAt" ASC`;V.push(W.messageLimit),z=M}let F=(await this.#$.execute({sql:z,args:V})).rows||[],N=new Date,D=N.toISOString(),L=F.length>0?F[F.length-1].id:void 0,B={sourceThreadId:Y,clonedAt:N,...L&&{lastMessageId:L}},O={id:K,resourceId:G||Z.resourceId,title:J||(Z.title?`Clone of ${Z.title}`:""),metadata:{...Q,clone:B},createdAt:N,updatedAt:N},E=await this.#$.transaction("write");try{await E.execute({sql:`INSERT INTO "${OX}" (id, "resourceId", title, metadata, "createdAt", "updatedAt")
                VALUES (?, ?, ?, jsonb(?), ?, ?)`,args:[O.id,O.resourceId,O.title??"",JSON.stringify(O.metadata),D,D]});let M=[],R={},q=G||Z.resourceId;for(let w of F){let I=crypto.randomUUID();R[w.id]=I;let P=w.content,_;try{_=JSON.parse(P)}catch{_={format:2,parts:[{type:"text",text:P}]}}await E.execute({sql:`INSERT INTO "${j5}" (id, thread_id, content, role, type, "createdAt", "resourceId")
                  VALUES (?, ?, ?, ?, ?, ?, ?)`,args:[I,K,P,w.role,w.type||"v2",w.createdAt,q]}),M.push({id:I,threadId:K,content:_,role:w.role,type:w.type||void 0,createdAt:new Date(w.createdAt),resourceId:q})}return await E.commit(),{thread:O,clonedMessages:M,messageIdMap:R}}catch(M){throw await E.rollback(),M}}catch(z){if(z instanceof G0)throw z;throw new G0({id:P0("LIBSQL","CLONE_THREAD","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{sourceThreadId:Y,newThreadId:K}},z)}}getOMKey($,Y){return $?`thread:${$}`:`resource:${Y}`}parseOMRow($){return{id:$.id,scope:$.scope,threadId:$.threadId||null,resourceId:$.resourceId,createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt),lastObservedAt:$.lastObservedAt?new Date($.lastObservedAt):void 0,originType:$.originType||"initial",generationCount:Number($.generationCount||0),activeObservations:$.activeObservations||"",bufferedObservationChunks:$.bufferedObservationChunks?typeof $.bufferedObservationChunks==="string"?JSON.parse($.bufferedObservationChunks):$.bufferedObservationChunks:void 0,bufferedObservations:$.activeObservationsPendingUpdate||void 0,bufferedObservationTokens:$.bufferedObservationTokens?Number($.bufferedObservationTokens):void 0,bufferedMessageIds:void 0,bufferedReflection:$.bufferedReflection||void 0,bufferedReflectionTokens:$.bufferedReflectionTokens?Number($.bufferedReflectionTokens):void 0,bufferedReflectionInputTokens:$.bufferedReflectionInputTokens?Number($.bufferedReflectionInputTokens):void 0,reflectedObservationLineCount:$.reflectedObservationLineCount?Number($.reflectedObservationLineCount):void 0,totalTokensObserved:Number($.totalTokensObserved||0),observationTokenCount:Number($.observationTokenCount||0),pendingMessageTokens:Number($.pendingMessageTokens||0),isReflecting:Boolean($.isReflecting),isObserving:Boolean($.isObserving),isBufferingObservation:$.isBufferingObservation===!0||$.isBufferingObservation==="true"||$.isBufferingObservation===1,isBufferingReflection:$.isBufferingReflection===!0||$.isBufferingReflection==="true"||$.isBufferingReflection===1,lastBufferedAtTokens:typeof $.lastBufferedAtTokens==="number"?$.lastBufferedAtTokens:parseInt(String($.lastBufferedAtTokens??"0"),10)||0,lastBufferedAtTime:$.lastBufferedAtTime?new Date(String($.lastBufferedAtTime)):null,config:$.config?JSON.parse($.config):{},metadata:$.metadata?JSON.parse($.metadata):void 0,observedMessageIds:$.observedMessageIds?JSON.parse($.observedMessageIds):void 0,observedTimezone:$.observedTimezone||void 0}}async getObservationalMemory($,Y){try{let X=this.getOMKey($,Y),G=await this.#$.execute({sql:`SELECT * FROM "${k5}" WHERE "lookupKey" = ? ORDER BY "generationCount" DESC LIMIT 1`,args:[X]});if(!G.rows||G.rows.length===0)return null;return this.parseOMRow(G.rows[0])}catch(X){throw new G0({id:P0("LIBSQL","GET_OBSERVATIONAL_MEMORY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$,resourceId:Y}},X)}}async getObservationalMemoryHistory($,Y,X=10,G){try{let J=this.getOMKey($,Y),Q=['"lookupKey" = ?'],W=[J];if(G?.from)Q.push('"createdAt" >= ?'),W.push(G.from.toISOString());if(G?.to)Q.push('"createdAt" <= ?'),W.push(G.to.toISOString());W.push(X);let Z=`SELECT * FROM "${k5}" WHERE ${Q.join(" AND ")} ORDER BY "generationCount" DESC LIMIT ?`;if(G?.offset!=null)W.push(G.offset),Z+=" OFFSET ?";let K=await this.#$.execute({sql:Z,args:W});if(!K.rows)return[];return K.rows.map((H)=>this.parseOMRow(H))}catch(J){throw new G0({id:P0("LIBSQL","GET_OBSERVATIONAL_MEMORY_HISTORY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$,resourceId:Y,limit:X}},J)}}async initializeObservationalMemory($){try{let Y=crypto.randomUUID(),X=new Date,G=this.getOMKey($.threadId,$.resourceId),J={id:Y,scope:$.scope,threadId:$.threadId,resourceId:$.resourceId,createdAt:X,updatedAt:X,lastObservedAt:void 0,originType:"initial",generationCount:0,activeObservations:"",totalTokensObserved:0,observationTokenCount:0,pendingMessageTokens:0,isReflecting:!1,isObserving:!1,isBufferingObservation:!1,isBufferingReflection:!1,lastBufferedAtTokens:0,lastBufferedAtTime:null,config:$.config,observedTimezone:$.observedTimezone};return await this.#$.execute({sql:`INSERT INTO "${k5}" (
          id, "lookupKey", scope, "resourceId", "threadId",
          "activeObservations", "activeObservationsPendingUpdate",
          "originType", config, "generationCount", "lastObservedAt", "lastReflectionAt",
          "pendingMessageTokens", "totalTokensObserved", "observationTokenCount",
          "isObserving", "isReflecting", "isBufferingObservation", "isBufferingReflection", "lastBufferedAtTokens", "lastBufferedAtTime",
          "observedTimezone", "createdAt", "updatedAt"
        ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:[Y,G,$.scope,$.resourceId,$.threadId||null,"",null,"initial",JSON.stringify($.config),0,null,null,0,0,0,!1,!1,!1,!1,0,null,$.observedTimezone||null,X.toISOString(),X.toISOString()]}),J}catch(Y){throw new G0({id:P0("LIBSQL","INITIALIZE_OBSERVATIONAL_MEMORY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$.threadId,resourceId:$.resourceId}},Y)}}async insertObservationalMemoryRecord($){try{let Y=this.getOMKey($.threadId,$.resourceId);await this.#$.execute({sql:`INSERT INTO "${k5}" (
          id, "lookupKey", scope, "resourceId", "threadId",
          "activeObservations", "activeObservationsPendingUpdate",
          "originType", config, "generationCount", "lastObservedAt", "lastReflectionAt",
          "pendingMessageTokens", "totalTokensObserved", "observationTokenCount",
          "observedMessageIds", "bufferedObservationChunks",
          "bufferedReflection", "bufferedReflectionTokens", "bufferedReflectionInputTokens",
          "reflectedObservationLineCount",
          "isObserving", "isReflecting", "isBufferingObservation", "isBufferingReflection",
          "lastBufferedAtTokens", "lastBufferedAtTime",
          "observedTimezone", metadata, "createdAt", "updatedAt"
        ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:[$.id,Y,$.scope,$.resourceId,$.threadId||null,$.activeObservations||"",null,$.originType||"initial",$.config?JSON.stringify($.config):null,$.generationCount||0,$.lastObservedAt?$.lastObservedAt.toISOString():null,null,$.pendingMessageTokens||0,$.totalTokensObserved||0,$.observationTokenCount||0,$.observedMessageIds?JSON.stringify($.observedMessageIds):null,$.bufferedObservationChunks?JSON.stringify($.bufferedObservationChunks):null,$.bufferedReflection||null,$.bufferedReflectionTokens??null,$.bufferedReflectionInputTokens??null,$.reflectedObservationLineCount??null,$.isObserving||!1,$.isReflecting||!1,$.isBufferingObservation||!1,$.isBufferingReflection||!1,$.lastBufferedAtTokens||0,$.lastBufferedAtTime?$.lastBufferedAtTime.toISOString():null,$.observedTimezone||null,$.metadata?JSON.stringify($.metadata):null,$.createdAt.toISOString(),$.updatedAt.toISOString()]})}catch(Y){throw new G0({id:P0("LIBSQL","INSERT_OBSERVATIONAL_MEMORY_RECORD","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id,threadId:$.threadId,resourceId:$.resourceId}},Y)}}async updateActiveObservations($){try{let Y=new Date,X=$.observedMessageIds?JSON.stringify($.observedMessageIds):null;if((await this.#$.execute({sql:`UPDATE "${k5}" SET
          "activeObservations" = ?,
          "lastObservedAt" = ?,
          "pendingMessageTokens" = 0,
          "observationTokenCount" = ?,
          "totalTokensObserved" = "totalTokensObserved" + ?,
          "observedMessageIds" = ?,
          "updatedAt" = ?
        WHERE id = ?`,args:[$.observations,$.lastObservedAt.toISOString(),$.tokenCount,$.tokenCount,X,Y.toISOString(),$.id]})).rowsAffected===0)throw new G0({id:P0("LIBSQL","UPDATE_ACTIVE_OBSERVATIONS","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","UPDATE_ACTIVE_OBSERVATIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}},Y)}}async createReflectionGeneration($){try{let Y=crypto.randomUUID(),X=new Date,G=this.getOMKey($.currentRecord.threadId,$.currentRecord.resourceId),J={id:Y,scope:$.currentRecord.scope,threadId:$.currentRecord.threadId,resourceId:$.currentRecord.resourceId,createdAt:X,updatedAt:X,lastObservedAt:$.currentRecord.lastObservedAt,originType:"reflection",generationCount:$.currentRecord.generationCount+1,activeObservations:$.reflection,totalTokensObserved:$.currentRecord.totalTokensObserved,observationTokenCount:$.tokenCount,pendingMessageTokens:0,isReflecting:!1,isObserving:!1,isBufferingObservation:!1,isBufferingReflection:!1,lastBufferedAtTokens:0,lastBufferedAtTime:null,config:$.currentRecord.config,metadata:$.currentRecord.metadata,observedTimezone:$.currentRecord.observedTimezone};return await this.#$.execute({sql:`INSERT INTO "${k5}" (
          id, "lookupKey", scope, "resourceId", "threadId",
          "activeObservations", "activeObservationsPendingUpdate",
          "originType", config, "generationCount", "lastObservedAt", "lastReflectionAt",
          "pendingMessageTokens", "totalTokensObserved", "observationTokenCount",
          "isObserving", "isReflecting", "isBufferingObservation", "isBufferingReflection", "lastBufferedAtTokens", "lastBufferedAtTime",
          "observedTimezone", metadata, "createdAt", "updatedAt"
        ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:[Y,G,J.scope,J.resourceId,J.threadId||null,$.reflection,null,"reflection",JSON.stringify(J.config),$.currentRecord.generationCount+1,J.lastObservedAt?.toISOString()||null,X.toISOString(),J.pendingMessageTokens,J.totalTokensObserved,J.observationTokenCount,!1,!1,!1,!1,0,null,J.observedTimezone||null,J.metadata?JSON.stringify(J.metadata):null,X.toISOString(),X.toISOString()]}),J}catch(Y){throw new G0({id:P0("LIBSQL","CREATE_REFLECTION_GENERATION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{currentRecordId:$.currentRecord.id}},Y)}}async setReflectingFlag($,Y){try{if((await this.#$.execute({sql:`UPDATE "${k5}" SET "isReflecting" = ?, "updatedAt" = ? WHERE id = ?`,args:[Y,new Date().toISOString(),$]})).rowsAffected===0)throw new G0({id:P0("LIBSQL","SET_REFLECTING_FLAG","NOT_FOUND"),text:`Observational memory record not found: ${$}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isReflecting:Y}})}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","SET_REFLECTING_FLAG","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isReflecting:Y}},X)}}async setObservingFlag($,Y){try{if((await this.#$.execute({sql:`UPDATE "${k5}" SET "isObserving" = ?, "updatedAt" = ? WHERE id = ?`,args:[Y,new Date().toISOString(),$]})).rowsAffected===0)throw new G0({id:P0("LIBSQL","SET_OBSERVING_FLAG","NOT_FOUND"),text:`Observational memory record not found: ${$}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isObserving:Y}})}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","SET_OBSERVING_FLAG","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isObserving:Y}},X)}}async setBufferingObservationFlag($,Y,X){try{let G=new Date().toISOString(),J,Q;if(X!==void 0)J=`UPDATE "${k5}" SET "isBufferingObservation" = ?, "lastBufferedAtTokens" = ?, "updatedAt" = ? WHERE id = ?`,Q=[Y,X,G,$];else J=`UPDATE "${k5}" SET "isBufferingObservation" = ?, "updatedAt" = ? WHERE id = ?`,Q=[Y,G,$];if((await this.#$.execute({sql:J,args:Q})).rowsAffected===0)throw new G0({id:P0("LIBSQL","SET_BUFFERING_OBSERVATION_FLAG","NOT_FOUND"),text:`Observational memory record not found: ${$}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isBuffering:Y,lastBufferedAtTokens:X??null}})}catch(G){if(G instanceof G0)throw G;throw new G0({id:P0("LIBSQL","SET_BUFFERING_OBSERVATION_FLAG","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isBuffering:Y,lastBufferedAtTokens:X??null}},G)}}async setBufferingReflectionFlag($,Y){try{if((await this.#$.execute({sql:`UPDATE "${k5}" SET "isBufferingReflection" = ?, "updatedAt" = ? WHERE id = ?`,args:[Y,new Date().toISOString(),$]})).rowsAffected===0)throw new G0({id:P0("LIBSQL","SET_BUFFERING_REFLECTION_FLAG","NOT_FOUND"),text:`Observational memory record not found: ${$}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isBuffering:Y}})}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","SET_BUFFERING_REFLECTION_FLAG","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isBuffering:Y}},X)}}async clearObservationalMemory($,Y){try{let X=this.getOMKey($,Y);await this.#$.execute({sql:`DELETE FROM "${k5}" WHERE "lookupKey" = ?`,args:[X]})}catch(X){throw new G0({id:P0("LIBSQL","CLEAR_OBSERVATIONAL_MEMORY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$,resourceId:Y}},X)}}async setPendingMessageTokens($,Y){try{if((await this.#$.execute({sql:`UPDATE "${k5}" SET 
          "pendingMessageTokens" = ?, 
          "updatedAt" = ? 
        WHERE id = ?`,args:[Y,new Date().toISOString(),$]})).rowsAffected===0)throw new G0({id:P0("LIBSQL","SET_PENDING_MESSAGE_TOKENS","NOT_FOUND"),text:`Observational memory record not found: ${$}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,tokenCount:Y}})}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","SET_PENDING_MESSAGE_TOKENS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,tokenCount:Y}},X)}}async updateObservationalMemoryConfig($){try{let Y=await this.#$.execute({sql:`SELECT config FROM "${k5}" WHERE id = ?`,args:[$.id]});if(Y.rows.length===0)throw new G0({id:P0("LIBSQL","UPDATE_OM_CONFIG","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}});let X=Y.rows[0],G=X.config?JSON.parse(X.config):{},J=this.deepMergeConfig(G,$.config);await this.#$.execute({sql:`UPDATE "${k5}" SET config = ?, "updatedAt" = ? WHERE id = ?`,args:[JSON.stringify(J),new Date().toISOString(),$.id]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","UPDATE_OM_CONFIG","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}},Y)}}async updateBufferedObservations($){try{let Y=new Date().toISOString(),X=await this.#$.execute({sql:`SELECT "bufferedObservationChunks" FROM "${k5}" WHERE id = ?`,args:[$.id]});if(!X.rows||X.rows.length===0)throw new G0({id:P0("LIBSQL","UPDATE_BUFFERED_OBSERVATIONS","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}});let G=X.rows[0],J=[];if(G.bufferedObservationChunks)try{let H=typeof G.bufferedObservationChunks==="string"?JSON.parse(G.bufferedObservationChunks):G.bufferedObservationChunks;J=Array.isArray(H)?H:[]}catch{J=[]}let Q={id:`ombuf-${jK9()}`,cycleId:$.chunk.cycleId,observations:$.chunk.observations,tokenCount:$.chunk.tokenCount,messageIds:$.chunk.messageIds,messageTokens:$.chunk.messageTokens,lastObservedAt:$.chunk.lastObservedAt,createdAt:new Date,suggestedContinuation:$.chunk.suggestedContinuation,currentTask:$.chunk.currentTask,threadTitle:$.chunk.threadTitle},W=[...J,Q],Z=$.lastBufferedAtTime?$.lastBufferedAtTime.toISOString():null;if((await this.#$.execute({sql:`UPDATE "${k5}" SET
          "bufferedObservationChunks" = ?,
          "lastBufferedAtTime" = COALESCE(?, "lastBufferedAtTime"),
          "updatedAt" = ?
        WHERE id = ?`,args:[JSON.stringify(W),Z,Y,$.id]})).rowsAffected===0)throw new G0({id:P0("LIBSQL","UPDATE_BUFFERED_OBSERVATIONS","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","UPDATE_BUFFERED_OBSERVATIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}},Y)}}async swapBufferedToActive($){try{let Y=new Date().toISOString(),X=await this.#$.execute({sql:`SELECT * FROM "${k5}" WHERE id = ?`,args:[$.id]});if(!X.rows||X.rows.length===0)throw new G0({id:P0("LIBSQL","SWAP_BUFFERED_TO_ACTIVE","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}});let G=X.rows[0],J=[];if(G.bufferedObservationChunks)try{let p=typeof G.bufferedObservationChunks==="string"?JSON.parse(G.bufferedObservationChunks):G.bufferedObservationChunks;J=Array.isArray(p)?p:[]}catch{J=[]}if(J.length===0)return{chunksActivated:0,messageTokensActivated:0,observationTokensActivated:0,messagesActivated:0,activatedCycleIds:[],activatedMessageIds:[]};let Q=$.messageTokensThreshold*(1-$.activationRatio),W=Math.max(0,$.currentPendingTokens-Q),Z=0,K=0,H=0,z=0,V=0;for(let p=0;p<J.length;p++){Z+=J[p].messageTokens??0;let h=p+1;if(Z>=W){if(K===0||Z<H)K=h,H=Z}else if(Z>V)z=h,V=Z}let A=Q*0.95,F=H-W,N=$.currentPendingTokens-H,D=$.currentPendingTokens-V,L=Math.min(1000,Q),B;if($.forceMaxActivation&&K>0&&N>=L)B=K;else if(K>0&&F<=A&&N>=L)B=K;else if(z>0&&D>=L)B=z;else if(K>0)B=K;else B=1;let O=J.slice(0,B),E=J.slice(B),M=O.map((p)=>p.observations).join(`

`),R=O.reduce((p,h)=>p+h.tokenCount,0),q=O.reduce((p,h)=>p+(h.messageTokens??0),0),w=O.reduce((p,h)=>p+h.messageIds.length,0),I=O.map((p)=>p.cycleId).filter((p)=>!!p),P=O.flatMap((p)=>p.messageIds??[]),_=O[O.length-1],C=$.lastObservedAt??(_?.lastObservedAt?new Date(_.lastObservedAt):new Date),k=C.toISOString(),S=G.activeObservations||"",T=Number(G.observationTokenCount||0),v=`

--- message boundary (${C.toISOString()}) ---

`,x=S?`${S}${v}${M}`:M,y=T+R,d=Number(G.pendingMessageTokens||0),u=Math.max(0,d-q);if((await this.#$.execute({sql:`UPDATE "${k5}" SET
          "activeObservations" = ?,
          "observationTokenCount" = ?,
          "pendingMessageTokens" = ?,
          "bufferedObservationChunks" = ?,
          "lastObservedAt" = ?,
          "updatedAt" = ?
        WHERE id = ?
          AND "bufferedObservationChunks" IS NOT NULL
          AND "bufferedObservationChunks" != '[]'`,args:[x,y,u,E.length>0?JSON.stringify(E):null,k,Y,$.id]})).rowsAffected===0)return{chunksActivated:0,messageTokensActivated:0,observationTokensActivated:0,messagesActivated:0,activatedCycleIds:[],activatedMessageIds:[]};let g=O[O.length-1];return{chunksActivated:O.length,messageTokensActivated:q,observationTokensActivated:R,messagesActivated:w,activatedCycleIds:I,activatedMessageIds:P,observations:M,perChunk:O.map((p)=>({cycleId:p.cycleId??"",messageTokens:p.messageTokens??0,observationTokens:p.tokenCount,messageCount:p.messageIds.length,observations:p.observations})),suggestedContinuation:g?.suggestedContinuation??void 0,currentTask:g?.currentTask??void 0}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","SWAP_BUFFERED_TO_ACTIVE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}},Y)}}async updateBufferedReflection($){try{let Y=new Date().toISOString();if((await this.#$.execute({sql:`UPDATE "${k5}" SET
          "bufferedReflection" = CASE
            WHEN "bufferedReflection" IS NOT NULL AND "bufferedReflection" != ''
            THEN "bufferedReflection" || char(10) || char(10) || ?
            ELSE ?
          END,
          "bufferedReflectionTokens" = COALESCE("bufferedReflectionTokens", 0) + ?,
          "bufferedReflectionInputTokens" = COALESCE("bufferedReflectionInputTokens", 0) + ?,
          "reflectedObservationLineCount" = ?,
          "updatedAt" = ?
        WHERE id = ?`,args:[$.reflection,$.reflection,$.tokenCount,$.inputTokenCount,$.reflectedObservationLineCount,Y,$.id]})).rowsAffected===0)throw new G0({id:P0("LIBSQL","UPDATE_BUFFERED_REFLECTION","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","UPDATE_BUFFERED_REFLECTION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}},Y)}}async swapBufferedReflectionToActive($){try{let Y=await this.#$.execute({sql:`SELECT * FROM "${k5}" WHERE id = ?`,args:[$.currentRecord.id]});if(!Y.rows||Y.rows.length===0)throw new G0({id:P0("LIBSQL","SWAP_BUFFERED_REFLECTION_TO_ACTIVE","NOT_FOUND"),text:`Observational memory record not found: ${$.currentRecord.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.currentRecord.id}});let X=Y.rows[0],G=X.bufferedReflection||"",J=Number(X.reflectedObservationLineCount||0);if(!G)throw new G0({id:P0("LIBSQL","SWAP_BUFFERED_REFLECTION_TO_ACTIVE","NO_CONTENT"),text:"No buffered reflection to swap",domain:M0.STORAGE,category:E0.USER,details:{id:$.currentRecord.id}});let K=(X.activeObservations||"").split(`
`).slice(J).join(`
`).trim(),H=K?`${G}

${K}`:G,z=await this.createReflectionGeneration({currentRecord:$.currentRecord,reflection:H,tokenCount:$.tokenCount}),V=new Date().toISOString();return await this.#$.execute({sql:`UPDATE "${k5}" SET
          "bufferedReflection" = NULL,
          "bufferedReflectionTokens" = NULL,
          "bufferedReflectionInputTokens" = NULL,
          "reflectedObservationLineCount" = NULL,
          "updatedAt" = ?
        WHERE id = ?`,args:[V,$.currentRecord.id]}),z}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","SWAP_BUFFERED_REFLECTION_TO_ACTIVE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.currentRecord.id}},Y)}}},nK9=class extends sg{#$;constructor($){super();let Y=sY($);this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:V6,schema:a_}),await this.#$.alterTable({tableName:V6,schema:a_,ifNotExists:["requestContext"]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:V6})}async migrateSpans(){return this.#$.migrateSpans()}async checkSpansMigrationStatus(){return this.#$.checkSpansMigrationStatus()}get tracingStrategy(){return{preferred:"batch-with-updates",supported:["batch-with-updates","insert-only"]}}async createSpan($){let{span:Y}=$;try{let X=Y.startedAt instanceof Date?Y.startedAt.toISOString():Y.startedAt,G=Y.endedAt instanceof Date?Y.endedAt.toISOString():Y.endedAt,J=new Date().toISOString(),Q={...Y,startedAt:X,endedAt:G,createdAt:J,updatedAt:J};return this.#$.insert({tableName:V6,record:Q})}catch(X){throw new G0({id:P0("LIBSQL","CREATE_SPAN","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{spanId:Y.spanId,traceId:Y.traceId,spanType:Y.spanType,name:Y.name}},X)}}async getSpan($){let{traceId:Y,spanId:X}=$;try{let G=await this.#$.selectMany({tableName:V6,whereClause:{sql:" WHERE traceId = ? AND spanId = ?",args:[Y,X]},limit:1});if(!G||G.length===0)return null;return{span:Bp({tableName:V6,sqlRow:G[0]})}}catch(G){throw new G0({id:P0("LIBSQL","GET_SPAN","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{traceId:Y,spanId:X}},G)}}async getRootSpan($){let{traceId:Y}=$;try{let X=await this.#$.selectMany({tableName:V6,whereClause:{sql:" WHERE traceId = ? AND parentSpanId IS NULL",args:[Y]},limit:1});if(!X||X.length===0)return null;return{span:Bp({tableName:V6,sqlRow:X[0]})}}catch(X){throw new G0({id:P0("LIBSQL","GET_ROOT_SPAN","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{traceId:Y}},X)}}async getTrace($){let{traceId:Y}=$;try{let X=await this.#$.selectMany({tableName:V6,whereClause:{sql:" WHERE traceId = ?",args:[Y]},orderBy:"startedAt ASC"});if(!X||X.length===0)return null;return{traceId:Y,spans:X.map((G)=>Bp({tableName:V6,sqlRow:G}))}}catch(X){throw new G0({id:P0("LIBSQL","GET_TRACE","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{traceId:Y}},X)}}async getTraceLight($){let{traceId:Y}=$;try{let X=await this.#$.selectMany({tableName:V6,whereClause:{sql:" WHERE traceId = ?",args:[Y]},orderBy:"startedAt ASC"});if(!X||X.length===0)return null;return{traceId:Y,spans:X.map((G)=>{let J=Bp({tableName:V6,sqlRow:G}),{input:Q,output:W,attributes:Z,metadata:K,tags:H,links:z,...V}=J;return V})}}catch(X){throw new G0({id:P0("LIBSQL","GET_TRACE_LIGHT","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{traceId:Y}},X)}}async updateSpan($){let{traceId:Y,spanId:X,updates:G}=$;try{let J={...G};if(J.endedAt instanceof Date)J.endedAt=J.endedAt.toISOString();if(J.startedAt instanceof Date)J.startedAt=J.startedAt.toISOString();J.updatedAt=new Date().toISOString(),await this.#$.update({tableName:V6,keys:{spanId:X,traceId:Y},data:J})}catch(J){throw new G0({id:P0("LIBSQL","UPDATE_SPAN","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{spanId:X,traceId:Y}},J)}}async listTraces($){let{filters:Y,pagination:X,orderBy:G}=n_.parse($),J=X?.page??0,Q=X?.perPage??10,W=b7(V6,"table name");try{let Z=["parentSpanId IS NULL"],K=[];if(Y){if(Y.startedAt?.start)Z.push("startedAt >= ?"),K.push(Y.startedAt.start.toISOString());if(Y.startedAt?.end)Z.push("startedAt <= ?"),K.push(Y.startedAt.end.toISOString());if(Y.endedAt?.start)Z.push("endedAt >= ?"),K.push(Y.endedAt.start.toISOString());if(Y.endedAt?.end)Z.push("endedAt <= ?"),K.push(Y.endedAt.end.toISOString());if(Y.spanType!==void 0)Z.push("spanType = ?"),K.push(Y.spanType);if(Y.entityType!==void 0)Z.push("entityType = ?"),K.push(Y.entityType);if(Y.entityId!==void 0)Z.push("entityId = ?"),K.push(Y.entityId);if(Y.entityName!==void 0)Z.push("entityName = ?"),K.push(Y.entityName);if(Y.userId!==void 0)Z.push("userId = ?"),K.push(Y.userId);if(Y.organizationId!==void 0)Z.push("organizationId = ?"),K.push(Y.organizationId);if(Y.resourceId!==void 0)Z.push("resourceId = ?"),K.push(Y.resourceId);if(Y.runId!==void 0)Z.push("runId = ?"),K.push(Y.runId);if(Y.sessionId!==void 0)Z.push("sessionId = ?"),K.push(Y.sessionId);if(Y.threadId!==void 0)Z.push("threadId = ?"),K.push(Y.threadId);if(Y.requestId!==void 0)Z.push("requestId = ?"),K.push(Y.requestId);if(Y.environment!==void 0)Z.push("environment = ?"),K.push(Y.environment);if(Y.source!==void 0)Z.push("source = ?"),K.push(Y.source);if(Y.serviceName!==void 0)Z.push("serviceName = ?"),K.push(Y.serviceName);if(Y.scope!=null)for(let[D,L]of Object.entries(Y.scope)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(D))throw new G0({id:P0("LIBSQL","LIST_TRACES","INVALID_FILTER_KEY"),domain:M0.STORAGE,category:E0.USER,details:{key:D}});Z.push(`json_extract(scope, '$.${D}') = ?`),K.push(typeof L==="string"?L:JSON.stringify(L))}if(Y.metadata!=null)for(let[D,L]of Object.entries(Y.metadata)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(D))throw new G0({id:P0("LIBSQL","LIST_TRACES","INVALID_FILTER_KEY"),domain:M0.STORAGE,category:E0.USER,details:{key:D}});Z.push(`json_extract(metadata, '$.${D}') = ?`),K.push(typeof L==="string"?L:JSON.stringify(L))}if(Y.tags!=null&&Y.tags.length>0)for(let D of Y.tags)Z.push(`EXISTS (SELECT 1 FROM json_each(${W}.tags) WHERE value = ?)`),K.push(D);if(Y.status!==void 0)switch(Y.status){case DD.ERROR:Z.push("error IS NOT NULL");break;case DD.RUNNING:Z.push("endedAt IS NULL AND error IS NULL");break;case DD.SUCCESS:Z.push("endedAt IS NOT NULL AND error IS NULL");break}if(Y.hasChildError!==void 0)if(Y.hasChildError)Z.push(`EXISTS (
              SELECT 1 FROM ${W} c
              WHERE c.traceId = ${W}.traceId AND c.error IS NOT NULL
            )`);else Z.push(`NOT EXISTS (
              SELECT 1 FROM ${W} c
              WHERE c.traceId = ${W}.traceId AND c.error IS NOT NULL
            )`)}let H=Z.length>0?`WHERE ${Z.join(" AND ")}`:"",z=G?.field??"startedAt",V=G?.direction??"DESC",A;if(z==="endedAt")A=V==="DESC"?`CASE WHEN ${z} IS NULL THEN 0 ELSE 1 END, ${z} DESC`:`CASE WHEN ${z} IS NULL THEN 1 ELSE 0 END, ${z} ASC`;else A=`${z} ${V}`;let F=await this.#$.selectTotalCount({tableName:V6,whereClause:{sql:H,args:K}});if(F===0)return{pagination:{total:0,page:J,perPage:Q,hasMore:!1},spans:[]};let N=await this.#$.selectMany({tableName:V6,whereClause:{sql:H,args:K},orderBy:A,offset:J*Q,limit:Q});return{pagination:{total:F,page:J,perPage:Q,hasMore:(J+1)*Q<F},spans:i_(N.map((D)=>Bp({tableName:V6,sqlRow:D})))}}catch(Z){throw new G0({id:P0("LIBSQL","LIST_TRACES","FAILED"),domain:M0.STORAGE,category:E0.USER},Z)}}async batchCreateSpans($){try{let Y=new Date().toISOString(),X=$.records.map((G)=>{let J=G.startedAt instanceof Date?G.startedAt.toISOString():G.startedAt,Q=G.endedAt instanceof Date?G.endedAt.toISOString():G.endedAt;return{...G,startedAt:J,endedAt:Q,createdAt:Y,updatedAt:Y}});return this.#$.batchInsert({tableName:V6,records:X})}catch(Y){throw new G0({id:P0("LIBSQL","BATCH_CREATE_SPANS","FAILED"),domain:M0.STORAGE,category:E0.USER},Y)}}async batchUpdateSpans($){let Y=new Date().toISOString();try{return this.#$.batchUpdate({tableName:V6,updates:$.records.map((X)=>{let G={...X.updates};if(G.endedAt instanceof Date)G.endedAt=G.endedAt.toISOString();if(G.startedAt instanceof Date)G.startedAt=G.startedAt.toISOString();return G.updatedAt=Y,{keys:{spanId:X.spanId,traceId:X.traceId},data:G}})})}catch(X){throw new G0({id:P0("LIBSQL","BATCH_UPDATE_SPANS","FAILED"),domain:M0.STORAGE,category:E0.USER},X)}}async batchDeleteTraces($){try{let Y=$.traceIds.map((X)=>({traceId:X}));return this.#$.batchDelete({tableName:V6,keys:Y})}catch(Y){throw new G0({id:P0("LIBSQL","BATCH_DELETE_TRACES","FAILED"),domain:M0.STORAGE,category:E0.USER},Y)}}},rK9=class extends f_{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:IQ,schema:hg}),await this.#$.createTable({tableName:P$,schema:s_}),await this.#$.alterTable({tableName:P$,schema:s_,ifNotExists:["requestContextSchema"]}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_prompt_block_versions_block_version ON "${P$}" ("blockId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:IQ}),await this.#$.deleteData({tableName:P$})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(IQ)} FROM "${IQ}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_PROMPT_BLOCK","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{promptBlock:Y}=$;try{let X=new Date;await this.#$.insert({tableName:IQ,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,metadata:Y.metadata??null,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:G,authorId:J,metadata:Q,...W}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,blockId:Y.id,versionNumber:1,...W,changedFields:Object.keys(W),changeMessage:"Initial version"}),{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","CREATE_PROMPT_BLOCK","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw Error(`Prompt block with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:Z}=X,K={updatedAt:new Date().toISOString()};if(J!==void 0)K.authorId=J;if(Q!==void 0)K.activeVersionId=Q;if(Z!==void 0)K.status=Z;if(W!==void 0)K.metadata={...G.metadata,...W};await this.#$.update({tableName:IQ,keys:{id:Y},data:K});let H=await this.getById(Y);if(!H)throw new G0({id:P0("LIBSQL","UPDATE_PROMPT_BLOCK","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Prompt block ${Y} not found after update`,details:{id:Y}});return H}catch(G){if(G instanceof G0)throw G;throw new G0({id:P0("LIBSQL","UPDATE_PROMPT_BLOCK","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${IQ}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_PROMPT_BLOCK","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{},{field:Z,direction:K}=this.parseOrderBy(G),H=[],z=[];if(W)H.push("status = ?"),z.push(W);if(J!==void 0)H.push("authorId = ?"),z.push(J);if(Q&&Object.keys(Q).length>0)for(let[R,q]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(R))throw new G0({id:P0("LIBSQL","LIST_PROMPT_BLOCKS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${R}. Keys must be alphanumeric with underscores.`,details:{key:R}});H.push(`json_extract(metadata, '$.${R}') = ?`),z.push(typeof q==="string"?q:JSON.stringify(q))}let V=H.length>0?`WHERE ${H.join(" AND ")}`:"",A=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${IQ}" ${V}`,args:z}),F=Number(A.rows?.[0]?.count??0);if(F===0)return{promptBlocks:[],total:0,page:Y,perPage:X??100,hasMore:!1};let N=A4(X,100),{offset:D,perPage:L}=B4(Y,X,N),B=X===!1?F:N,O=X===!1?F:D+N;return{promptBlocks:(await this.#Y.execute({sql:`SELECT ${M4(IQ)} FROM "${IQ}" ${V} ORDER BY ${Z} ${K} LIMIT ? OFFSET ?`,args:[...z,B,D]})).rows?.map((R)=>this.#X(R))??[],total:F,page:Y,perPage:L,hasMore:O<F}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_PROMPT_BLOCKS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#$.insert({tableName:P$,record:{id:$.id,blockId:$.blockId,versionNumber:$.versionNumber,name:$.name,description:$.description??null,content:$.content,rules:$.rules??null,requestContextSchema:$.requestContextSchema??null,changedFields:$.changedFields??null,changeMessage:$.changeMessage??null,createdAt:Y.toISOString()}}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","CREATE_PROMPT_BLOCK_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(P$)} FROM "${P$}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_PROMPT_BLOCK_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${M4(P$)} FROM "${P$}" WHERE blockId = ? AND versionNumber = ?`,args:[$,Y]})).rows?.[0];return G?this.#J(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","GET_PROMPT_BLOCK_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(P$)} FROM "${P$}" WHERE blockId = ? ORDER BY versionNumber DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_LATEST_PROMPT_BLOCK_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{blockId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${P$}" WHERE blockId = ?`,args:[Y]}),K=Number(Z.rows?.[0]?.count??0);if(K===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=A4(G,20),{offset:z,perPage:V}=B4(X,G,H),A=G===!1?K:H,F=G===!1?K:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${M4(P$)} FROM "${P$}" WHERE blockId = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,A,z]})).rows?.map((L)=>this.#J(L))??[],total:K,page:X,perPage:V,hasMore:F<K}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_PROMPT_BLOCK_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${P$}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_PROMPT_BLOCK_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${P$}" WHERE "blockId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_PROMPT_BLOCK_VERSIONS_BY_BLOCK","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${P$}" WHERE blockId = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","COUNT_PROMPT_BLOCK_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,metadata:Y($.metadata),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#J($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,blockId:$.blockId,versionNumber:Number($.versionNumber),name:$.name,description:$.description??void 0,content:$.content,rules:Y($.rules),requestContextSchema:Y($.requestContextSchema),changedFields:Y($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}};function Ap0($){if($==null)return;if(typeof $==="string")try{return JSON.parse($)}catch{return $}return $}function oT($){if(typeof $==="bigint")return Number($);return Number($)}function Vp0($){let Y=Ap0($.target);if(!Y)throw Error(`Schedule row ${$.id} has invalid target`);let X={id:String($.id),target:Y,cron:String($.cron),status:String($.status),nextFireAt:oT($.next_fire_at),createdAt:oT($.created_at),updatedAt:oT($.updated_at)};if($.timezone!=null)X.timezone=String($.timezone);if($.last_fire_at!=null)X.lastFireAt=oT($.last_fire_at);if($.last_run_id!=null)X.lastRunId=String($.last_run_id);let G=Ap0($.metadata);if(G!==void 0)X.metadata=G;if($.owner_type!=null)X.ownerType=String($.owner_type);if($.owner_id!=null)X.ownerId=String($.owner_id);return X}function aK9($){let Y={id:$.id!=null?String($.id):void 0,scheduleId:String($.schedule_id),runId:$.run_id!=null?String($.run_id):null,scheduledFireAt:oT($.scheduled_fire_at),actualFireAt:oT($.actual_fire_at),outcome:String($.outcome),triggerKind:$.trigger_kind!=null?String($.trigger_kind):"schedule-fire"};if($.error!=null)Y.error=String($.error);if($.parent_trigger_id!=null)Y.parentTriggerId=String($.parent_trigger_id);let X=Ap0($.metadata);if(X!==void 0)Y.metadata=X;return Y}var sK9=class extends Gm{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:EX,schema:F5[EX]}),await this.#$.createTable({tableName:hK,schema:F5[hK]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:hK}),await this.#$.deleteData({tableName:EX})}async createSchedule($){if(await this.getSchedule($.id))throw Error(`Schedule with id "${$.id}" already exists`);return await this.#$.insert({tableName:EX,record:{id:$.id,target:$.target,cron:$.cron,timezone:$.timezone??null,status:$.status,next_fire_at:$.nextFireAt,last_fire_at:$.lastFireAt??null,last_run_id:$.lastRunId??null,created_at:$.createdAt,updated_at:$.updatedAt,metadata:$.metadata??null,owner_type:$.ownerType??null,owner_id:$.ownerId??null}}),$}async getSchedule($){let X=(await this.#Y.execute({sql:`SELECT ${M4(EX)} FROM ${EX} WHERE id = ?`,args:[$]})).rows[0];return X?Vp0(X):null}async listSchedules($){let Y=[],X=[];if($?.status)Y.push("status = ?"),X.push($.status);if($?.workflowId)Y.push("json_extract(target, '$.workflowId') = ?"),X.push($.workflowId);if($?.ownerType!==void 0)if($.ownerType===null)Y.push("owner_type IS NULL");else Y.push("owner_type = ?"),X.push($.ownerType);if($?.ownerId!==void 0)if($.ownerId===null)Y.push("owner_id IS NULL");else Y.push("owner_id = ?"),X.push($.ownerId);let G=Y.length>0?`WHERE ${Y.join(" AND ")}`:"";return(await this.#Y.execute({sql:`SELECT ${M4(EX)} FROM ${EX} ${G} ORDER BY created_at ASC`,args:X})).rows.map((Q)=>Vp0(Q))}async listDueSchedules($,Y){let X=Y??100;return(await this.#Y.execute({sql:`SELECT ${M4(EX)} FROM ${EX}
            WHERE status = ? AND next_fire_at <= ?
            ORDER BY next_fire_at ASC
            LIMIT ?`,args:["active",$,X]})).rows.map((J)=>Vp0(J))}async updateSchedule($,Y){let X=[],G=[];if("cron"in Y&&Y.cron!==void 0)X.push("cron = ?"),G.push(Y.cron);if("timezone"in Y)X.push("timezone = ?"),G.push(Y.timezone??null);if("status"in Y&&Y.status!==void 0)X.push("status = ?"),G.push(Y.status);if("nextFireAt"in Y&&Y.nextFireAt!==void 0)X.push("next_fire_at = ?"),G.push(Y.nextFireAt);if("target"in Y&&Y.target!==void 0)X.push("target = jsonb(?)"),G.push(JSON.stringify(Y.target));if("metadata"in Y)X.push("metadata = jsonb(?)"),G.push(Y.metadata!=null?JSON.stringify(Y.metadata):null);if("ownerType"in Y)X.push("owner_type = ?"),G.push(Y.ownerType??null);if("ownerId"in Y)X.push("owner_id = ?"),G.push(Y.ownerId??null);if(X.push("updated_at = ?"),G.push(Date.now()),G.push($),X.length===1){let Q=await this.getSchedule($);if(!Q)throw Error(`Schedule ${$} not found`);return Q}await this.#Y.execute({sql:`UPDATE ${EX} SET ${X.join(", ")} WHERE id = ?`,args:G});let J=await this.getSchedule($);if(!J)throw Error(`Schedule ${$} not found`);return J}async updateScheduleNextFire($,Y,X,G,J){return((await this.#Y.execute({sql:`UPDATE ${EX}
            SET next_fire_at = ?, last_fire_at = ?, last_run_id = ?, updated_at = ?
            WHERE id = ? AND next_fire_at = ? AND status = ?`,args:[X,G,J,Date.now(),$,Y,"active"]})).rowsAffected??0)>0}async deleteSchedule($){await this.#Y.execute({sql:`DELETE FROM ${hK} WHERE schedule_id = ?`,args:[$]}),await this.#Y.execute({sql:`DELETE FROM ${EX} WHERE id = ?`,args:[$]})}async recordTrigger($){let Y=$.id??crypto.randomUUID();await this.#$.insert({tableName:hK,record:{id:Y,schedule_id:$.scheduleId,run_id:$.runId,scheduled_fire_at:$.scheduledFireAt,actual_fire_at:$.actualFireAt,outcome:$.outcome,error:$.error??null,trigger_kind:$.triggerKind??"schedule-fire",parent_trigger_id:$.parentTriggerId??null,metadata:$.metadata??null}})}async listTriggers($,Y){let X=["schedule_id = ?"],G=[$];if(Y?.fromActualFireAt!=null)X.push("actual_fire_at >= ?"),G.push(Y.fromActualFireAt);if(Y?.toActualFireAt!=null)X.push("actual_fire_at < ?"),G.push(Y.toActualFireAt);let J=Y?.limit!=null?`LIMIT ${Math.floor(Y.limit)}`:"";return(await this.#Y.execute({sql:`SELECT ${M4(hK)} FROM ${hK}
            WHERE ${X.join(" AND ")}
            ORDER BY actual_fire_at DESC
            ${J}`,args:G})).rows.map((W)=>aK9(W))}},oK9=class extends g_{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:PQ,schema:fg}),await this.#$.createTable({tableName:m$,schema:gg}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_scorer_definition_versions_scorer_version ON "${m$}" ("scorerDefinitionId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:PQ}),await this.#$.deleteData({tableName:m$})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(PQ)} FROM "${PQ}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_SCORER_DEFINITION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{scorerDefinition:Y}=$;try{let X=new Date;await this.#$.insert({tableName:PQ,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,metadata:Y.metadata??null,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:G,authorId:J,metadata:Q,...W}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,scorerDefinitionId:Y.id,versionNumber:1,...W,changedFields:Object.keys(W),changeMessage:"Initial version"}),{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","CREATE_SCORER_DEFINITION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw Error(`Scorer definition with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:Z}=X,K={updatedAt:new Date().toISOString()};if(J!==void 0)K.authorId=J;if(Q!==void 0)K.activeVersionId=Q;if(Z!==void 0)K.status=Z;if(W!==void 0)K.metadata={...G.metadata,...W};await this.#$.update({tableName:PQ,keys:{id:Y},data:K});let H=await this.getById(Y);if(!H)throw new G0({id:P0("LIBSQL","UPDATE_SCORER_DEFINITION","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Scorer definition ${Y} not found after update`,details:{id:Y}});return H}catch(G){if(G instanceof G0)throw G;throw new G0({id:P0("LIBSQL","UPDATE_SCORER_DEFINITION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${PQ}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_SCORER_DEFINITION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{},{field:Z,direction:K}=this.parseOrderBy(G),H=[],z=[];if(W)H.push("status = ?"),z.push(W);if(J!==void 0)H.push("authorId = ?"),z.push(J);if(Q&&Object.keys(Q).length>0)for(let[R,q]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(R))throw new G0({id:P0("LIBSQL","LIST_SCORER_DEFINITIONS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${R}. Keys must be alphanumeric with underscores.`,details:{key:R}});H.push(`json_extract(metadata, '$.${R}') = ?`),z.push(typeof q==="string"?q:JSON.stringify(q))}let V=H.length>0?`WHERE ${H.join(" AND ")}`:"",A=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${PQ}" ${V}`,args:z}),F=Number(A.rows?.[0]?.count??0);if(F===0)return{scorerDefinitions:[],total:0,page:Y,perPage:X??100,hasMore:!1};let N=A4(X,100),{offset:D,perPage:L}=B4(Y,X,N),B=X===!1?F:N,O=X===!1?F:D+N;return{scorerDefinitions:(await this.#Y.execute({sql:`SELECT ${M4(PQ)} FROM "${PQ}" ${V} ORDER BY ${Z} ${K} LIMIT ? OFFSET ?`,args:[...z,B,D]})).rows?.map((R)=>this.#X(R))??[],total:F,page:Y,perPage:L,hasMore:O<F}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_SCORER_DEFINITIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#$.insert({tableName:m$,record:{id:$.id,scorerDefinitionId:$.scorerDefinitionId,versionNumber:$.versionNumber,name:$.name,description:$.description??null,type:$.type,model:$.model??null,instructions:$.instructions??null,scoreRange:$.scoreRange??null,presetConfig:$.presetConfig??null,defaultSampling:$.defaultSampling??null,changedFields:$.changedFields??null,changeMessage:$.changeMessage??null,createdAt:Y.toISOString()}}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","CREATE_SCORER_DEFINITION_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(m$)} FROM "${m$}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_SCORER_DEFINITION_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${M4(m$)} FROM "${m$}" WHERE scorerDefinitionId = ? AND versionNumber = ?`,args:[$,Y]})).rows?.[0];return G?this.#J(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","GET_SCORER_DEFINITION_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(m$)} FROM "${m$}" WHERE scorerDefinitionId = ? ORDER BY versionNumber DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_LATEST_SCORER_DEFINITION_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{scorerDefinitionId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${m$}" WHERE scorerDefinitionId = ?`,args:[Y]}),K=Number(Z.rows?.[0]?.count??0);if(K===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=A4(G,20),{offset:z,perPage:V}=B4(X,G,H),A=G===!1?K:H,F=G===!1?K:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${M4(m$)} FROM "${m$}" WHERE scorerDefinitionId = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,A,z]})).rows?.map((L)=>this.#J(L))??[],total:K,page:X,perPage:V,hasMore:F<K}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_SCORER_DEFINITION_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${m$}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_SCORER_DEFINITION_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${m$}" WHERE "scorerDefinitionId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_SCORER_DEFINITION_VERSIONS_BY_SCORER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${m$}" WHERE scorerDefinitionId = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","COUNT_SCORER_DEFINITION_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,metadata:Y($.metadata),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#J($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,scorerDefinitionId:$.scorerDefinitionId,versionNumber:Number($.versionNumber),name:$.name,description:$.description??void 0,type:$.type,model:Y($.model),instructions:$.instructions??void 0,scoreRange:Y($.scoreRange),presetConfig:Y($.presetConfig),defaultSampling:Y($.defaultSampling),changedFields:Y($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}},tK9=class extends Jm{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:N7,schema:r_}),await this.#$.alterTable({tableName:N7,schema:r_,ifNotExists:["spanId","requestContext"]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:N7})}async listScoresByRunId({runId:$,pagination:Y}){try{let{page:X,perPage:G}=Y,J=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${N7} WHERE runId = ?`,args:[$]}),Q=Number(J.rows?.[0]?.count??0);if(Q===0)return{pagination:{total:0,page:X,perPage:G,hasMore:!1},scores:[]};let W=A4(G,100),{offset:Z,perPage:K}=B4(X,G,W),H=G===!1?Q:W,z=G===!1?Q:Z+W;return{scores:(await this.#Y.execute({sql:`SELECT ${M4(N7)} FROM ${N7} WHERE runId = ? ORDER BY createdAt DESC LIMIT ? OFFSET ?`,args:[$,H,Z]})).rows?.map((F)=>this.transformScoreRow(F))??[],pagination:{total:Q,page:X,perPage:K,hasMore:z<Q}}}catch(X){throw new G0({id:P0("LIBSQL","LIST_SCORES_BY_RUN_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async listScoresByScorerId({scorerId:$,entityId:Y,entityType:X,source:G,pagination:J}){try{let{page:Q,perPage:W}=J,Z=[],K=[];if($)Z.push("scorerId = ?"),K.push($);if(Y)Z.push("entityId = ?"),K.push(Y);if(X)Z.push("entityType = ?"),K.push(X);if(G)Z.push("source = ?"),K.push(G);let H=Z.length>0?`WHERE ${Z.join(" AND ")}`:"",z=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${N7} ${H}`,args:K}),V=Number(z.rows?.[0]?.count??0);if(V===0)return{pagination:{total:0,page:Q,perPage:W,hasMore:!1},scores:[]};let A=A4(W,100),{offset:F,perPage:N}=B4(Q,W,A),D=W===!1?V:A,L=W===!1?V:F+A;return{scores:(await this.#Y.execute({sql:`SELECT ${M4(N7)} FROM ${N7} ${H} ORDER BY createdAt DESC LIMIT ? OFFSET ?`,args:[...K,D,F]})).rows?.map((E)=>this.transformScoreRow(E))??[],pagination:{total:V,page:Q,perPage:N,hasMore:L<V}}}catch(Q){throw new G0({id:P0("LIBSQL","LIST_SCORES_BY_SCORER_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Q)}}transformScoreRow($){return N90($)}async getScoreById({id:$}){let Y=await this.#Y.execute({sql:`SELECT ${M4(N7)} FROM ${N7} WHERE id = ?`,args:[$]});return Y.rows?.[0]?this.transformScoreRow(Y.rows[0]):null}async saveScore($){let Y;try{Y=jx0.parse($)}catch(X){throw new G0({id:P0("LIBSQL","SAVE_SCORE","VALIDATION_FAILED"),domain:M0.STORAGE,category:E0.USER,details:{scorer:typeof $.scorer?.id==="string"?$.scorer.id:String($.scorer?.id??"unknown"),entityId:$.entityId??"unknown",entityType:$.entityType??"unknown",traceId:$.traceId??"",spanId:$.spanId??""}},X)}try{let X=crypto.randomUUID(),G=new Date;return await this.#$.insert({tableName:N7,record:{...Y,id:X,createdAt:G.toISOString(),updatedAt:G.toISOString()}}),{score:{...Y,id:X,createdAt:G,updatedAt:G}}}catch(X){throw new G0({id:P0("LIBSQL","SAVE_SCORE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async listScoresByEntityId({entityId:$,entityType:Y,pagination:X}){try{let{page:G,perPage:J}=X,Q=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${N7} WHERE entityId = ? AND entityType = ?`,args:[$,Y]}),W=Number(Q.rows?.[0]?.count??0);if(W===0)return{pagination:{total:0,page:G,perPage:J,hasMore:!1},scores:[]};let Z=A4(J,100),{offset:K,perPage:H}=B4(G,J,Z),z=J===!1?W:Z,V=J===!1?W:K+Z;return{scores:(await this.#Y.execute({sql:`SELECT ${M4(N7)} FROM ${N7} WHERE entityId = ? AND entityType = ? ORDER BY createdAt DESC LIMIT ? OFFSET ?`,args:[$,Y,z,K]})).rows?.map((N)=>this.transformScoreRow(N))??[],pagination:{total:W,page:G,perPage:H,hasMore:V<W}}}catch(G){throw new G0({id:P0("LIBSQL","LIST_SCORES_BY_ENTITY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async listScoresBySpan({traceId:$,spanId:Y,pagination:X}){try{let{page:G,perPage:J}=X,Q=A4(J,100),{offset:W,perPage:Z}=B4(G,J,Q),K=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${N7} WHERE traceId = ? AND spanId = ?`,args:[$,Y]}),H=Number(K.rows?.[0]?.count??0),z=J===!1?H:Q,V=J===!1?H:W+Q;return{scores:(await this.#Y.execute({sql:`SELECT ${M4(N7)} FROM ${N7} WHERE traceId = ? AND spanId = ? ORDER BY createdAt DESC LIMIT ? OFFSET ?`,args:[$,Y,z,W]})).rows?.map((N)=>this.transformScoreRow(N))??[],pagination:{total:H,page:G,perPage:Z,hasMore:V<H}}}catch(G){throw new G0({id:P0("LIBSQL","LIST_SCORES_BY_SPAN","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}},eK9=["name","description","instructions","license","compatibility","source","references","scripts","assets","files","metadata","tree"],$39=class extends m_{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:cY,schema:o_}),await this.#$.createTable({tableName:w$,schema:e_}),await this.#$.alterTable({tableName:cY,schema:o_,ifNotExists:["visibility","favoriteCount"]}),await this.#$.alterTable({tableName:w$,schema:e_,ifNotExists:["files"]}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_skill_versions_skill_version ON "${w$}" ("skillId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:cY}),await this.#$.deleteData({tableName:w$})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(cY)} FROM "${cY}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_SKILL","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{skill:Y}=$;try{let X=new Date,G=Y.visibility??(Y.authorId?"private":void 0);await this.#$.insert({tableName:cY,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,visibility:G??null,favoriteCount:0,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:J,authorId:Q,visibility:W,...Z}=Y,K=crypto.randomUUID();try{await this.createVersion({id:K,skillId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"})}catch(H){throw await this.#$.delete({tableName:cY,keys:{id:Y.id}}),H}return{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","CREATE_SKILL","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{if(!await this.getById(Y))throw new G0({id:P0("LIBSQL","UPDATE_SKILL","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`Skill ${Y} not found`,details:{skillId:Y}});let{authorId:J,visibility:Q,activeVersionId:W,status:Z,...K}=X,H={};for(let[N,D]of Object.entries(K))if(D!==void 0)H[N]=D;let z=eK9,V=z.some((N)=>(N in H)),A={updatedAt:new Date().toISOString()};if(J!==void 0)A.authorId=J;if(Q!==void 0)A.visibility=Q;if(W!==void 0){if(A.activeVersionId=W,Z===void 0)A.status="published"}if(Z!==void 0)A.status=Z;if(await this.#$.update({tableName:cY,keys:{id:Y},data:A}),V){let N=await this.getLatestVersion(Y);if(!N)throw new G0({id:P0("LIBSQL","UPDATE_SKILL","NO_VERSIONS"),domain:M0.STORAGE,category:E0.USER,text:`No versions found for skill ${Y}`,details:{skillId:Y}});let{id:D,skillId:L,versionNumber:B,changedFields:O,changeMessage:E,createdAt:M,...R}=N,q={...R,...H},w=z.filter((I)=>(I in H)&&JSON.stringify(H[I])!==JSON.stringify(R[I]));if(w.length>0){let I=crypto.randomUUID();await this.createVersion({id:I,skillId:Y,versionNumber:N.versionNumber+1,...q,changedFields:w,changeMessage:`Updated ${w.join(", ")}`})}}let F=await this.getById(Y);if(!F)throw new G0({id:P0("LIBSQL","UPDATE_SKILL","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Skill ${Y} not found after update`,details:{id:Y}});return F}catch(G){if(G instanceof G0)throw G;throw new G0({id:P0("LIBSQL","UPDATE_SKILL","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${cY}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_SKILL","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,visibility:Q,status:W,entityIds:Z,pinFavoritedFor:K,favoritedOnly:H}=$||{},{field:z,direction:V}=this.parseOrderBy(G);if(Z&&Z.length===0)return{skills:[],total:0,page:Y,perPage:X??100,hasMore:!1};let A=[],F=[];if(J!==void 0)A.push("s_e.authorId = ?"),F.push(J);if(Q!==void 0)A.push("s_e.visibility = ?"),F.push(Q);if(W!==void 0)A.push("s_e.status = ?"),F.push(W);if(Z&&Z.length>0){let v=Z.map(()=>"?").join(", ");A.push(`s_e.id IN (${v})`),F.push(...Z)}let N=K,D=Boolean(N),L="",B=[];if(D&&N){if(L=`LEFT JOIN "${zG}" st ON st."entityType" = 'skill' AND st."entityId" = s_e.id AND st."userId" = ?`,B.push(N),H)A.push('st."userId" IS NOT NULL')}else if(H)A.push("1=0");let O=A.length>0?`WHERE ${A.join(" AND ")}`:"",E=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${cY}" s_e ${L} ${O}`,args:[...B,...F]}),M=Number(E.rows?.[0]?.count??0);if(M===0)return{skills:[],total:0,page:Y,perPage:X??100,hasMore:!1};let R=A4(X,100),{offset:q,perPage:w}=B4(Y,X,R),I=X===!1?M:R,P=X===!1?M:q+R,_=[];if(D&&N)_.push('(st."userId" IS NOT NULL) DESC');_.push(`s_e."${z}" ${V}`),_.push('s_e."id" ASC');let C=`ORDER BY ${_.join(", ")}`,k=TD4(cY,"s_e");return{skills:(await this.#Y.execute({sql:`SELECT ${k} FROM "${cY}" s_e ${L} ${O} ${C} LIMIT ? OFFSET ?`,args:[...B,...F,I,q]})).rows?.map((v)=>this.#X(v))??[],total:M,page:Y,perPage:w,hasMore:P<M}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_SKILLS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#Y.execute({sql:`INSERT INTO "${w$}" (
          id, "skillId", "versionNumber",
          name, description, instructions, license, compatibility,
          source, "references", scripts, assets, files, metadata, tree,
          "changedFields", "changeMessage", "createdAt"
        ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:[$.id,$.skillId,$.versionNumber,$.name,$.description??null,$.instructions??null,$.license??null,$.compatibility?JSON.stringify($.compatibility):null,$.source?JSON.stringify($.source):null,$.references?JSON.stringify($.references):null,$.scripts?JSON.stringify($.scripts):null,$.assets?JSON.stringify($.assets):null,$.files?JSON.stringify($.files):null,$.metadata?JSON.stringify($.metadata):null,$.tree?JSON.stringify($.tree):null,$.changedFields?JSON.stringify($.changedFields):null,$.changeMessage??null,Y.toISOString()]}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","CREATE_SKILL_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(w$)} FROM "${w$}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_SKILL_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${M4(w$)} FROM "${w$}" WHERE skillId = ? AND versionNumber = ?`,args:[$,Y]})).rows?.[0];return G?this.#J(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","GET_SKILL_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(w$)} FROM "${w$}" WHERE skillId = ? ORDER BY versionNumber DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_LATEST_SKILL_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{skillId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${w$}" WHERE skillId = ?`,args:[Y]}),K=Number(Z.rows?.[0]?.count??0);if(K===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=A4(G,20),{offset:z,perPage:V}=B4(X,G,H),A=G===!1?K:H,F=G===!1?K:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${M4(w$)} FROM "${w$}" WHERE skillId = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,A,z]})).rows?.map((L)=>this.#J(L))??[],total:K,page:X,perPage:V,hasMore:F<K}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_SKILL_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${w$}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_SKILL_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${w$}" WHERE "skillId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_SKILL_VERSIONS_BY_SKILL","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${w$}" WHERE skillId = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","COUNT_SKILL_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,visibility:$.visibility??void 0,favoriteCount:$.favoriteCount===null||$.favoriteCount===void 0?0:Number($.favoriteCount),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#J($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,skillId:$.skillId,versionNumber:Number($.versionNumber),name:$.name,description:$.description??void 0,instructions:$.instructions??void 0,license:$.license??void 0,compatibility:Y($.compatibility),source:Y($.source),references:Y($.references),scripts:Y($.scripts),assets:Y($.assets),files:Y($.files),metadata:Y($.metadata),tree:Y($.tree),changedFields:Y($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}},Y39=class extends Qm{#$;#Y;executeWithRetry;constructor($){super();let Y=sY($),X=$.maxRetries??5,G=$.initialBackoffMs??500;this.#Y=Y,this.#$=new oY({client:Y,maxRetries:X,initialBackoffMs:G}),this.executeWithRetry=CD4({logger:this.logger,maxRetries:X,initialBackoffMs:G}),this.setupPragmaSettings().catch((J)=>this.logger.warn("LibSQL Workflows: Failed to setup PRAGMA settings.",J))}supportsConcurrentUpdates(){return!0}parseWorkflowRun($){let Y=$.snapshot;if(typeof Y==="string")try{Y=JSON.parse($.snapshot)}catch(X){this.logger.warn(`Failed to parse snapshot for workflow ${$.workflow_name}: ${X}`)}return{workflowName:$.workflow_name,runId:$.run_id,snapshot:Y,resourceId:$.resourceId,createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}async init(){let $=F5[D7];await this.#$.createTable({tableName:D7,schema:$}),await this.#$.alterTable({tableName:D7,schema:$,ifNotExists:["resourceId"]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:D7})}async setupPragmaSettings(){try{await this.#Y.execute("PRAGMA busy_timeout = 10000;"),this.logger.debug("LibSQL Workflows: PRAGMA busy_timeout=10000 set.");try{await this.#Y.execute("PRAGMA journal_mode = WAL;"),this.logger.debug("LibSQL Workflows: PRAGMA journal_mode=WAL set.")}catch{this.logger.debug("LibSQL Workflows: WAL mode not supported, using default journal mode.")}try{await this.#Y.execute("PRAGMA synchronous = NORMAL;"),this.logger.debug("LibSQL Workflows: PRAGMA synchronous=NORMAL set.")}catch{this.logger.debug("LibSQL Workflows: Failed to set synchronous mode.")}}catch($){this.logger.warn("LibSQL Workflows: Failed to set PRAGMA settings.",$)}}async updateWorkflowResults({workflowName:$,runId:Y,stepId:X,result:G,requestContext:J}){return this.executeWithRetry(async()=>{let Q=await this.#Y.transaction("write");try{let W=await Q.execute({sql:`SELECT json(snapshot) as snapshot FROM ${D7} WHERE workflow_name = ? AND run_id = ?`,args:[$,Y]}),Z;if(!W.rows?.[0])Z={context:{},activePaths:[],timestamp:Date.now(),suspendedPaths:{},activeStepsPath:{},resumeLabels:{},serializedStepGraph:[],status:"pending",value:{},waitingPaths:{},runId:Y,requestContext:{}};else{let H=W.rows[0].snapshot;Z=typeof H==="string"?JSON.parse(H):H}Z.context[X]=G,Z.requestContext={...Z.requestContext,...J};let K=new Date().toISOString();return await Q.execute({sql:`INSERT INTO ${D7} (workflow_name, run_id, snapshot, createdAt, updatedAt)
                VALUES (?, ?, jsonb(?), ?, ?)
                ON CONFLICT(workflow_name, run_id)
                DO UPDATE SET snapshot = excluded.snapshot, updatedAt = excluded.updatedAt`,args:[$,Y,tT(Z),K,K]}),await Q.commit(),Z.context}catch(W){if(!Q.closed)await Q.rollback();throw W}},"updateWorkflowResults")}async updateWorkflowState({workflowName:$,runId:Y,opts:X}){return this.executeWithRetry(async()=>{let G=await this.#Y.transaction("write");try{let J=await G.execute({sql:`SELECT json(snapshot) as snapshot FROM ${D7} WHERE workflow_name = ? AND run_id = ?`,args:[$,Y]});if(!J.rows?.[0]){await G.rollback();return}let Q=J.rows[0].snapshot,W=typeof Q==="string"?JSON.parse(Q):Q;if(!W||!W?.context)throw await G.rollback(),Error(`Snapshot not found for runId ${Y}`);let Z={...W,...X};return await G.execute({sql:`UPDATE ${D7} SET snapshot = jsonb(?) WHERE workflow_name = ? AND run_id = ?`,args:[tT(Z),$,Y]}),await G.commit(),Z}catch(J){if(!G.closed)await G.rollback();throw J}},"updateWorkflowState")}async persistWorkflowSnapshot({workflowName:$,runId:Y,resourceId:X,snapshot:G,createdAt:J,updatedAt:Q}){let W=new Date,Z={workflow_name:$,run_id:Y,resourceId:X,snapshot:G,createdAt:J??W,updatedAt:Q??W};this.logger.debug("Persisting workflow snapshot",{workflowName:$,runId:Y,data:Z}),await this.#$.insert({tableName:D7,record:Z})}async loadWorkflowSnapshot({workflowName:$,runId:Y}){this.logger.debug("Loading workflow snapshot",{workflowName:$,runId:Y});let X=await this.#$.select({tableName:D7,keys:{workflow_name:$,run_id:Y}});return X?X.snapshot:null}async getWorkflowRunById({runId:$,workflowName:Y}){let X=[],G=[];if($)X.push("run_id = ?"),G.push($);if(Y)X.push("workflow_name = ?"),G.push(Y);let J=X.length>0?`WHERE ${X.join(" AND ")}`:"";try{let Q=await this.#Y.execute({sql:`SELECT workflow_name, run_id, resourceId, json(snapshot) as snapshot, createdAt, updatedAt FROM ${D7} ${J} ORDER BY createdAt DESC LIMIT 1`,args:G});if(!Q.rows?.[0])return null;return this.parseWorkflowRun(Q.rows[0])}catch(Q){throw new G0({id:P0("LIBSQL","GET_WORKFLOW_RUN_BY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Q)}}async deleteWorkflowRunById({runId:$,workflowName:Y}){return this.executeWithRetry(async()=>{try{await this.#Y.execute({sql:`DELETE FROM ${D7} WHERE workflow_name = ? AND run_id = ?`,args:[Y,$]})}catch(X){throw new G0({id:P0("LIBSQL","DELETE_WORKFLOW_RUN_BY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{runId:$,workflowName:Y}},X)}},"deleteWorkflowRunById")}async listWorkflowRuns({workflowName:$,fromDate:Y,toDate:X,page:G,perPage:J,resourceId:Q,status:W}={}){try{let Z=[],K=[];if($)Z.push("workflow_name = ?"),K.push($);if(W)Z.push("json_extract(snapshot, '$.status') = ?"),K.push(W);if(Y)Z.push("createdAt >= ?"),K.push(Y.toISOString());if(X)Z.push("createdAt <= ?"),K.push(X.toISOString());if(Q)if(await this.#$.hasColumn(D7,"resourceId"))Z.push("resourceId = ?"),K.push(Q);else this.logger.warn(`[${D7}] resourceId column not found. Skipping resourceId filter.`);let H=Z.length>0?`WHERE ${Z.join(" AND ")}`:"",z=0,V=typeof J==="number"&&typeof G==="number";if(V){let L=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${D7} ${H}`,args:K});z=Number(L.rows?.[0]?.count??0)}let A=V?A4(J,Number.MAX_SAFE_INTEGER):0,F=V?G*A:0,D=((await this.#Y.execute({sql:`SELECT workflow_name, run_id, resourceId, json(snapshot) as snapshot, createdAt, updatedAt FROM ${D7} ${H} ORDER BY createdAt DESC${V?" LIMIT ? OFFSET ?":""}`,args:V?[...K,A,F]:K})).rows||[]).map((L)=>this.parseWorkflowRun(L));return{runs:D,total:z||D.length}}catch(Z){throw new G0({id:P0("LIBSQL","LIST_WORKFLOW_RUNS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Z)}}},X39=["name","description","filesystem","sandbox","mounts","search","skills","tools","autoSync","operationTimeout"],G39=class extends u_{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:WJ,schema:cg}),await this.#$.createTable({tableName:d$,schema:lg}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_workspace_versions_workspace_version ON "${d$}" ("workspaceId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:WJ}),await this.#$.deleteData({tableName:d$})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(WJ)} FROM "${WJ}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_WORKSPACE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{workspace:Y}=$;try{let X=new Date;await this.#$.insert({tableName:WJ,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,metadata:Y.metadata??null,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:G,authorId:J,metadata:Q,...W}=Y,Z=crypto.randomUUID();try{await this.createVersion({id:Z,workspaceId:Y.id,versionNumber:1,...W,changedFields:Object.keys(W),changeMessage:"Initial version"})}catch(K){throw await this.#$.delete({tableName:WJ,keys:{id:Y.id}}),K}return{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","CREATE_WORKSPACE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw new G0({id:P0("LIBSQL","UPDATE_WORKSPACE","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`Workspace ${Y} not found`,details:{workspaceId:Y}});let{authorId:J,activeVersionId:Q,metadata:W,status:Z,...K}=X,H={};for(let[N,D]of Object.entries(K))if(D!==void 0)H[N]=D;let z=X39,V=z.some((N)=>(N in H)),A={updatedAt:new Date().toISOString()};if(J!==void 0)A.authorId=J;if(Q!==void 0){if(A.activeVersionId=Q,Z===void 0)A.status="published"}if(Z!==void 0)A.status=Z;if(W!==void 0)A.metadata={...G.metadata||{},...W};if(await this.#$.update({tableName:WJ,keys:{id:Y},data:A}),V){let N=await this.getLatestVersion(Y);if(!N)throw Error(`No versions found for workspace ${Y}`);let{id:D,workspaceId:L,versionNumber:B,changedFields:O,changeMessage:E,createdAt:M,...R}=N,q={...R,...H},w=z.filter((I)=>(I in H)&&JSON.stringify(H[I])!==JSON.stringify(R[I]));if(w.length>0){let I=crypto.randomUUID();await this.createVersion({id:I,workspaceId:Y,versionNumber:N.versionNumber+1,...q,changedFields:w,changeMessage:`Updated ${w.join(", ")}`})}}let F=await this.getById(Y);if(!F)throw new G0({id:P0("LIBSQL","UPDATE_WORKSPACE","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Workspace ${Y} not found after update`,details:{id:Y}});return F}catch(G){if(G instanceof G0)throw G;throw new G0({id:P0("LIBSQL","UPDATE_WORKSPACE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${WJ}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_WORKSPACE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q}=$||{},{field:W,direction:Z}=this.parseOrderBy(G),K=[],H=[];if(J!==void 0)K.push("authorId = ?"),H.push(J);if(Q&&Object.keys(Q).length>0)for(let[M,R]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(M))throw new G0({id:P0("LIBSQL","LIST_WORKSPACES","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${M}. Keys must be alphanumeric with underscores.`,details:{key:M}});K.push(`json_extract(metadata, '$.${M}') = ?`),H.push(typeof R==="string"?R:JSON.stringify(R))}let z=K.length>0?`WHERE ${K.join(" AND ")}`:"",V=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${WJ}" ${z}`,args:H}),A=Number(V.rows?.[0]?.count??0);if(A===0)return{workspaces:[],total:0,page:Y,perPage:X??100,hasMore:!1};let F=A4(X,100),{offset:N,perPage:D}=B4(Y,X,F),L=X===!1?A:F,B=X===!1?A:N+F;return{workspaces:(await this.#Y.execute({sql:`SELECT ${M4(WJ)} FROM "${WJ}" ${z} ORDER BY ${W} ${Z} LIMIT ? OFFSET ?`,args:[...H,L,N]})).rows?.map((M)=>this.#X(M))??[],total:A,page:Y,perPage:D,hasMore:B<A}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_WORKSPACES","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#Y.execute({sql:`INSERT INTO "${d$}" (
  id, "workspaceId", "versionNumber",
  name, description, filesystem, sandbox, mounts, search, skills, tools,
  "autoSync", "operationTimeout",
  "changedFields", "changeMessage", "createdAt"
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:[$.id,$.workspaceId,$.versionNumber,$.name,$.description??null,$.filesystem?JSON.stringify($.filesystem):null,$.sandbox?JSON.stringify($.sandbox):null,$.mounts?JSON.stringify($.mounts):null,$.search?JSON.stringify($.search):null,$.skills?JSON.stringify($.skills):null,$.tools?JSON.stringify($.tools):null,$.autoSync?1:0,$.operationTimeout??null,$.changedFields?JSON.stringify($.changedFields):null,$.changeMessage??null,Y.toISOString()]}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","CREATE_WORKSPACE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(d$)} FROM "${d$}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_WORKSPACE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${M4(d$)} FROM "${d$}" WHERE "workspaceId" = ? AND "versionNumber" = ?`,args:[$,Y]})).rows?.[0];return G?this.#J(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:P0("LIBSQL","GET_WORKSPACE_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${M4(d$)} FROM "${d$}" WHERE "workspaceId" = ? ORDER BY "versionNumber" DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","GET_LATEST_WORKSPACE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{workspaceId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),Z=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${d$}" WHERE "workspaceId" = ?`,args:[Y]}),K=Number(Z.rows?.[0]?.count??0);if(K===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=A4(G,20),{offset:z,perPage:V}=B4(X,G,H),A=G===!1?K:H,F=G===!1?K:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${M4(d$)} FROM "${d$}" WHERE "workspaceId" = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,A,z]})).rows?.map((L)=>this.#J(L))??[],total:K,page:X,perPage:V,hasMore:F<K}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","LIST_WORKSPACE_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${d$}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_WORKSPACE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${d$}" WHERE "workspaceId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","DELETE_WORKSPACE_VERSIONS_BY_WORKSPACE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${d$}" WHERE "workspaceId" = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:P0("LIBSQL","COUNT_WORKSPACE_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,metadata:Y($.metadata),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#J($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,workspaceId:$.workspaceId,versionNumber:Number($.versionNumber),name:$.name,description:$.description??void 0,filesystem:Y($.filesystem),sandbox:Y($.sandbox),mounts:Y($.mounts),search:Y($.search),skills:Y($.skills),tools:Y($.tools),autoSync:Boolean($.autoSync),operationTimeout:$.operationTimeout!=null?Number($.operationTimeout):void 0,changedFields:Y($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}},J39=-16000,Q39=134217728,kD4=class extends nF{client;maxRetries;initialBackoffMs;pragmasReady;isLocalDb;localPragmas;stores;constructor($){if(!$.id||typeof $.id!=="string"||$.id.trim()==="")throw Error("LibSQLStore: id must be provided and cannot be empty.");super({id:$.id,name:"LibSQLStore",disableInit:$.disableInit});if(this.maxRetries=$.maxRetries??5,this.initialBackoffMs=$.initialBackoffMs??100,this.localPragmas={cacheSize:$.localPragmas?.cacheSize??J39,mmapSize:$.localPragmas?.mmapSize??Q39},"url"in $){if($.url.includes(":memory:"))this.shouldCacheInit=!1;this.client=Kp0({url:$.url,...$.authToken?{authToken:$.authToken}:{}}),this.isLocalDb=$.url.startsWith("file:")||$.url.includes(":memory:"),this.pragmasReady=this.isLocalDb?this.applyLocalPragmas():Promise.resolve()}else this.client=$.client,this.isLocalDb=!1,this.pragmasReady=Promise.resolve();let Y={client:this.client,maxRetries:this.maxRetries,initialBackoffMs:this.initialBackoffMs},X=new tK9(Y),G=new Y39(Y),J=new iK9(Y),Q=new nK9(Y),W=new hK9(Y),Z=new mK9(Y),K=new uK9(Y),H=new pK9(Y),z=new rK9(Y),V=new oK9(Y),A=new cK9(Y),F=new lK9(Y),N=new G39(Y),D=new $39(Y),L=new dK9(Y),B=new gK9(Y),O=new fK9(Y),E=new sK9(Y);this.stores={scores:X,workflows:G,memory:J,observability:Q,agents:W,channels:Z,datasets:K,experiments:H,promptBlocks:z,scorerDefinitions:V,mcpClients:A,mcpServers:F,workspaces:N,skills:D,favorites:L,blobs:B,backgroundTasks:O,schedules:E}}async applyLocalPragmas(){let $=[["journal_mode=WAL","PRAGMA journal_mode=WAL;"],["busy_timeout=5000","PRAGMA busy_timeout=5000;"],["synchronous=NORMAL","PRAGMA synchronous=NORMAL;"],["temp_store=MEMORY","PRAGMA temp_store=MEMORY;"],[`cache_size=${this.localPragmas.cacheSize}`,`PRAGMA cache_size=${this.localPragmas.cacheSize};`],[`mmap_size=${this.localPragmas.mmapSize}`,`PRAGMA mmap_size=${this.localPragmas.mmapSize};`]];for(let[Y,X]of $)try{await this.client.execute(X),this.logger.debug(`LibSQLStore: PRAGMA ${Y} set.`)}catch(G){this.logger.warn(`LibSQLStore: Failed to set PRAGMA ${Y}.`,G)}}getStoresToInit(){return Object.values(this.stores).filter(Boolean)}async initDomainsSequentially(){for(let $ of this.getStoresToInit())await $.init();return!0}async initDomainsInParallel(){return await Promise.all(this.getStoresToInit().map(($)=>$.init())),!0}async init(){if(await this.pragmasReady,!this.isLocalDb){if(this.shouldCacheInit){if(this.hasInitialized){await this.hasInitialized;return}this.hasInitialized=this.initDomainsInParallel(),await this.hasInitialized;return}await this.initDomainsInParallel();return}if(this.shouldCacheInit){if(this.hasInitialized){await this.hasInitialized;return}this.hasInitialized=this.initDomainsSequentially(),await this.hasInitialized;return}await this.initDomainsSequentially()}};EX0();EX0();cG();KY();O1();O1();gu();Fp0();Dp0();Np0();WC0();var lR7=Error("timeout while waiting for mutex to become available"),iR7=Error("mutex already locked"),OB9=Error("request for lock canceled"),EB9=function($,Y,X,G){function J(Q){return Q instanceof X?Q:new X(function(W){W(Q)})}return new(X||(X=Promise))(function(Q,W){function Z(z){try{H(G.next(z))}catch(V){W(V)}}function K(z){try{H(G.throw(z))}catch(V){W(V)}}function H(z){z.done?Q(z.value):J(z.value).then(Z,K)}H((G=G.apply($,Y||[])).next())})};class uE4{constructor($,Y=OB9){this._value=$,this._cancelError=Y,this._queue=[],this._weightedWaiters=[]}acquire($=1,Y=0){if($<=0)throw Error(`invalid weight ${$}: must be positive`);return new Promise((X,G)=>{let J={resolve:X,reject:G,weight:$,priority:Y},Q=pE4(this._queue,(W)=>Y<=W.priority);if(Q===-1&&$<=this._value)this._dispatchItem(J);else this._queue.splice(Q+1,0,J)})}runExclusive($){return EB9(this,arguments,void 0,function*(Y,X=1,G=0){let[J,Q]=yield this.acquire(X,G);try{return yield Y(J)}finally{Q()}})}waitForUnlock($=1,Y=0){if($<=0)throw Error(`invalid weight ${$}: must be positive`);if(this._couldLockImmediately($,Y))return Promise.resolve();else return new Promise((X)=>{if(!this._weightedWaiters[$-1])this._weightedWaiters[$-1]=[];MB9(this._weightedWaiters[$-1],{resolve:X,priority:Y})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue($){this._value=$,this._dispatchQueue()}release($=1){if($<=0)throw Error(`invalid weight ${$}: must be positive`);this._value+=$,this._dispatchQueue()}cancel(){this._queue.forEach(($)=>$.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){this._drainUnlockWaiters();while(this._queue.length>0&&this._queue[0].weight<=this._value)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem($){let Y=this._value;this._value-=$.weight,$.resolve([Y,this._newReleaser($.weight)])}_newReleaser($){let Y=!1;return()=>{if(Y)return;Y=!0,this.release($)}}_drainUnlockWaiters(){if(this._queue.length===0)for(let $=this._value;$>0;$--){let Y=this._weightedWaiters[$-1];if(!Y)continue;Y.forEach((X)=>X.resolve()),this._weightedWaiters[$-1]=[]}else{let $=this._queue[0].priority;for(let Y=this._value;Y>0;Y--){let X=this._weightedWaiters[Y-1];if(!X)continue;let G=X.findIndex((J)=>J.priority<=$);(G===-1?X:X.splice(0,G)).forEach((J)=>J.resolve())}}}_couldLockImmediately($,Y){return(this._queue.length===0||this._queue[0].priority<Y)&&$<=this._value}}function MB9($,Y){let X=pE4($,(G)=>Y.priority<=G.priority);$.splice(X+1,0,Y)}function pE4($,Y){for(let X=$.length-1;X>=0;X--)if(Y($[X]))return X;return-1}var RB9=function($,Y,X,G){function J(Q){return Q instanceof X?Q:new X(function(W){W(Q)})}return new(X||(X=Promise))(function(Q,W){function Z(z){try{H(G.next(z))}catch(V){W(V)}}function K(z){try{H(G.throw(z))}catch(V){W(V)}}function H(z){z.done?Q(z.value):J(z.value).then(Z,K)}H((G=G.apply($,Y||[])).next())})};class MX0{constructor($){this._semaphore=new uE4(1,$)}acquire(){return RB9(this,arguments,void 0,function*($=0){let[,Y]=yield this._semaphore.acquire(1,$);return Y})}runExclusive($,Y=0){return this._semaphore.runExclusive(()=>$(),1,Y)}isLocked(){return this._semaphore.isLocked()}waitForUnlock($=0){return this._semaphore.waitForUnlock(1,$)}release(){if(this._semaphore.isLocked())this._semaphore.release()}cancel(){return this._semaphore.cancel()}}E50();g40();var{create:qB9,defineProperty:Kq4,getOwnPropertyDescriptor:IB9,getOwnPropertyNames:Uq4,getPrototypeOf:PB9}=Object,wB9=Object.prototype.hasOwnProperty,_B9=($,Y)=>function(){return Y||(0,$[Uq4($)[0]])((Y={exports:{}}).exports,Y),Y.exports},jB9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of Uq4(Y))if(!wB9.call($,J)&&J!==X)Kq4($,J,{get:()=>Y[J],enumerable:!(G=IB9(Y,J))||G.enumerable})}return $},TB9=($,Y,X)=>(X=$!=null?qB9(PB9($)):{},jB9(Kq4(X,"default",{value:$,enumerable:!0}),$)),CB9=_B9({"../../../node_modules/.pnpm/secure-json-parse@2.7.0/node_modules/secure-json-parse/index.js"($,Y){var X=typeof Buffer<"u",G=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,J=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Q(H,z,V){if(V==null){if(z!==null&&typeof z==="object")V=z,z=void 0}if(X&&Buffer.isBuffer(H))H=H.toString();if(H&&H.charCodeAt(0)===65279)H=H.slice(1);let A=JSON.parse(H,z);if(A===null||typeof A!=="object")return A;let F=V&&V.protoAction||"error",N=V&&V.constructorAction||"error";if(F==="ignore"&&N==="ignore")return A;if(F!=="ignore"&&N!=="ignore"){if(G.test(H)===!1&&J.test(H)===!1)return A}else if(F!=="ignore"&&N==="ignore"){if(G.test(H)===!1)return A}else if(J.test(H)===!1)return A;return W(A,{protoAction:F,constructorAction:N,safe:V&&V.safe})}function W(H,{protoAction:z="error",constructorAction:V="error",safe:A}={}){let F=[H];while(F.length){let N=F;F=[];for(let D of N){if(z!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"__proto__")){if(A===!0)return null;else if(z==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.__proto__}if(V!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"constructor")&&Object.prototype.hasOwnProperty.call(D.constructor,"prototype")){if(A===!0)return null;else if(V==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.constructor}for(let L in D){let B=D[L];if(B&&typeof B==="object")F.push(B)}}}return H}function Z(H,z,V){let A=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,V)}finally{Error.stackTraceLimit=A}}function K(H,z){let V=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,{safe:!0})}catch(A){return null}finally{Error.stackTraceLimit=V}}Y.exports=Z,Y.exports.default=Z,Y.exports.parse=Z,Y.exports.safeParse=K,Y.exports.scan=W}}),Hq4="vercel.ai.error",SB9=Symbol.for(Hq4),zq4,kB9=class $ extends Error{constructor({name:Y,message:X,cause:G}){super(X);this[zq4]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,Hq4)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}};zq4=SB9;var jJ=kB9,Vq4="AI_APICallError",Aq4=`vercel.ai.error.${Vq4}`,vB9=Symbol.for(Aq4),Fq4,xB9=class extends jJ{constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:Vq4,message:$,cause:W});this[Fq4]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return jJ.hasMarker($,Aq4)}};Fq4=vB9;function Dq4($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}var Nq4="AI_InvalidArgumentError",Lq4=`vercel.ai.error.${Nq4}`,yB9=Symbol.for(Lq4),Bq4,bB9=class extends jJ{constructor({message:$,cause:Y,argument:X}){super({name:Nq4,message:$,cause:Y});this[Bq4]=!0,this.argument=X}static isInstance($){return jJ.hasMarker($,Lq4)}};Bq4=yB9;var Oq4="AI_JSONParseError",Eq4=`vercel.ai.error.${Oq4}`,hB9=Symbol.for(Eq4),Mq4,lE4=class extends jJ{constructor({text:$,cause:Y}){super({name:Oq4,message:`JSON parsing failed: Text: ${$}.
Error message: ${Dq4(Y)}`,cause:Y});this[Mq4]=!0,this.text=$}static isInstance($){return jJ.hasMarker($,Eq4)}};Mq4=hB9;var Rq4="AI_TypeValidationError",qq4=`vercel.ai.error.${Rq4}`,fB9=Symbol.for(qq4),Iq4,gB9=class $ extends jJ{constructor({value:Y,cause:X}){super({name:Rq4,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${Dq4(X)}`,cause:X});this[Iq4]=!0,this.value=Y}static isInstance(Y){return jJ.hasMarker(Y,qq4)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}};Iq4=fB9;var iE4=gB9,mB9=($,Y=21)=>{return(X=Y)=>{let G="",J=X|0;while(J--)G+=$[Math.random()*$.length|0];return G}},uB9=TB9(CB9());function pB9($){return new ReadableStream({async pull(Y){try{let{value:X,done:G}=await $.next();if(G)Y.close();else Y.enqueue(X)}catch(X){Y.error(X)}},cancel(){}})}async function dB9($){return $==null?Promise.resolve():new Promise((Y)=>setTimeout(Y,$))}var oM=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=mB9(X,Y);if($==null)return J;if(X.includes(G))throw new bB9({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return(Q)=>`${$}${G}${J(Q)}`};oM();function cB9($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function lB9($){return $ instanceof Error&&($.name==="AbortError"||$.name==="TimeoutError")}var _X0=Symbol.for("vercel.ai.validator");function iB9($){return{[_X0]:!0,validate:$}}function nB9($){return typeof $==="object"&&$!==null&&_X0 in $&&$[_X0]===!0&&"validate"in $}function rB9($){return nB9($)?$:aB9($)}function aB9($){return iB9((Y)=>{let X=$.safeParse(Y);return X.success?{success:!0,value:X.data}:{success:!1,error:X.error}})}function Pq4({value:$,schema:Y}){let X=rB9(Y);try{if(X.validate==null)return{success:!0,value:$};let G=X.validate($);if(G.success)return G;return{success:!1,error:iE4.wrap({value:$,cause:G.error})}}catch(G){return{success:!1,error:iE4.wrap({value:$,cause:G})}}}function ic0({text:$,schema:Y}){try{let X=uB9.default.parse($);if(Y==null)return{success:!0,value:X,rawValue:X};let G=Pq4({value:X,schema:Y});return G.success?{...G,rawValue:X}:G}catch(X){return{success:!1,error:lE4.isInstance(X)?X:new lE4({text:$,cause:X})}}}var sB9=Symbol("Let zodToJsonSchema decide on which parser to use"),nE4={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},oB9=($)=>typeof $==="string"?{...nE4,name:$}:{...nE4,...$},tB9=($)=>{let Y=oB9($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,flags:{hasReferencedOpenAiAnyType:!1},currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}};function wq4($,Y,X,G){if(!G?.errorMessages)return;if(X)$.errorMessage={...$.errorMessage,[Y]:X}}function Y5($,Y,X,G,J){$[Y]=X,wq4($,Y,G,J)}var _q4=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")};function gQ($){if($.target!=="openAi")return{};let Y=[...$.basePath,$.definitionPath,$.openAiAnyTypeName];return $.flags.hasReferencedOpenAiAnyType=!0,{$ref:$.$refStrategy==="relative"?_q4(Y,$.currentPath):Y.join("/")}}function eB9($,Y){let X={type:"array"};if($.type?._def&&$.type?._def?.typeName!==U0.ZodAny)X.items=B9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Y5(X,"minItems",$.minLength.value,$.minLength.message,Y);if($.maxLength)Y5(X,"maxItems",$.maxLength.value,$.maxLength.message,Y);if($.exactLength)Y5(X,"minItems",$.exactLength.value,$.exactLength.message,Y),Y5(X,"maxItems",$.exactLength.value,$.exactLength.message,Y);return X}function $O9($,Y){let X={type:"integer",format:"int64"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"min":if(Y.target==="jsonSchema7")if(G.inclusive)Y5(X,"minimum",G.value,G.message,Y);else Y5(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;Y5(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)Y5(X,"maximum",G.value,G.message,Y);else Y5(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;Y5(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":Y5(X,"multipleOf",G.value,G.message,Y);break}return X}function YO9(){return{type:"boolean"}}function jq4($,Y){return B9($.type._def,Y)}var XO9=($,Y)=>{return B9($.innerType._def,Y)};function Tq4($,Y,X){let G=X??Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>Tq4($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return GO9($,Y)}}var GO9=($,Y)=>{let X={type:"integer",format:"unix-time"};if(Y.target==="openApi3")return X;for(let G of $.checks)switch(G.kind){case"min":Y5(X,"minimum",G.value,G.message,Y);break;case"max":Y5(X,"maximum",G.value,G.message,Y);break}return X};function JO9($,Y){return{...B9($.innerType._def,Y),default:$.defaultValue()}}function QO9($,Y){return Y.effectStrategy==="input"?B9($.schema._def,Y):gQ(Y)}function WO9($){return{type:"string",enum:Array.from($.values)}}var ZO9=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};function KO9($,Y){let X=[B9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),B9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((Q)=>!!Q),G=Y.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,J=[];return X.forEach((Q)=>{if(ZO9(Q)){if(J.push(...Q.allOf),Q.unevaluatedProperties===void 0)G=void 0}else{let W=Q;if("additionalProperties"in Q&&Q.additionalProperties===!1){let{additionalProperties:Z,...K}=Q;W=K}else G=void 0;J.push(W)}}),J.length?{allOf:J,...G}:void 0}function UO9($,Y){let X=typeof $.value;if(X!=="bigint"&&X!=="number"&&X!=="boolean"&&X!=="string")return{type:Array.isArray($.value)?"array":"object"};if(Y.target==="openApi3")return{type:X==="bigint"?"integer":X,enum:[$.value]};return{type:X==="bigint"?"integer":X,const:$.value}}var Mc0=void 0,B3={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:()=>{if(Mc0===void 0)Mc0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return Mc0},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 Cq4($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":Y5(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y);break;case"max":Y5(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"email":switch(Y.emailStrategy){case"format:email":O3(X,"email",G.message,Y);break;case"format:idn-email":O3(X,"idn-email",G.message,Y);break;case"pattern:zod":IJ(X,B3.email,G.message,Y);break}break;case"url":O3(X,"uri",G.message,Y);break;case"uuid":O3(X,"uuid",G.message,Y);break;case"regex":IJ(X,G.regex,G.message,Y);break;case"cuid":IJ(X,B3.cuid,G.message,Y);break;case"cuid2":IJ(X,B3.cuid2,G.message,Y);break;case"startsWith":IJ(X,RegExp(`^${Rc0(G.value,Y)}`),G.message,Y);break;case"endsWith":IJ(X,RegExp(`${Rc0(G.value,Y)}$`),G.message,Y);break;case"datetime":O3(X,"date-time",G.message,Y);break;case"date":O3(X,"date",G.message,Y);break;case"time":O3(X,"time",G.message,Y);break;case"duration":O3(X,"duration",G.message,Y);break;case"length":Y5(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y),Y5(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"includes":{IJ(X,RegExp(Rc0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")O3(X,"ipv4",G.message,Y);if(G.version!=="v4")O3(X,"ipv6",G.message,Y);break}case"base64url":IJ(X,B3.base64url,G.message,Y);break;case"jwt":IJ(X,B3.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")IJ(X,B3.ipv4Cidr,G.message,Y);if(G.version!=="v4")IJ(X,B3.ipv6Cidr,G.message,Y);break}case"emoji":IJ(X,B3.emoji(),G.message,Y);break;case"ulid":{IJ(X,B3.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{O3(X,"binary",G.message,Y);break}case"contentEncoding:base64":{Y5(X,"contentEncoding","base64",G.message,Y);break}case"pattern:zod":{IJ(X,B3.base64,G.message,Y);break}}break}case"nanoid":IJ(X,B3.nanoid,G.message,Y)}return X}function Rc0($,Y){return Y.patternStrategy==="escape"?zO9($):$}var HO9=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function zO9($){let Y="";for(let X=0;X<$.length;X++){if(!HO9.has($[X]))Y+="\\";Y+=$[X]}return Y}function O3($,Y,X,G){if($.format||$.anyOf?.some((J)=>J.format)){if(!$.anyOf)$.anyOf=[];if($.format){if($.anyOf.push({format:$.format,...$.errorMessage&&G.errorMessages&&{errorMessage:{format:$.errorMessage.format}}}),delete $.format,$.errorMessage){if(delete $.errorMessage.format,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else Y5($,"format",Y,X,G)}function IJ($,Y,X,G){if($.pattern||$.allOf?.some((J)=>J.pattern)){if(!$.allOf)$.allOf=[];if($.pattern){if($.allOf.push({pattern:$.pattern,...$.errorMessage&&G.errorMessages&&{errorMessage:{pattern:$.errorMessage.pattern}}}),delete $.pattern,$.errorMessage){if(delete $.errorMessage.pattern,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.allOf.push({pattern:rE4(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else Y5($,"pattern",rE4(Y,G),X,G)}function rE4($,Y){if(!Y.applyRegexFlags||!$.flags)return $.source;let X={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},G=X.i?$.source.toLowerCase():$.source,J="",Q=!1,W=!1,Z=!1;for(let K=0;K<G.length;K++){if(Q){J+=G[K],Q=!1;continue}if(X.i){if(W){if(G[K].match(/[a-z]/)){if(Z)J+=G[K],J+=`${G[K-2]}-${G[K]}`.toUpperCase(),Z=!1;else if(G[K+1]==="-"&&G[K+2]?.match(/[a-z]/))J+=G[K],Z=!0;else J+=`${G[K]}${G[K].toUpperCase()}`;continue}}else if(G[K].match(/[a-z]/)){J+=`[${G[K]}${G[K].toUpperCase()}]`;continue}}if(X.m){if(G[K]==="^"){J+=`(^|(?<=[\r
]))`;continue}else if(G[K]==="$"){J+=`($|(?=[\r
]))`;continue}}if(X.s&&G[K]==="."){J+=W?`${G[K]}\r
`:`[${G[K]}\r
]`;continue}if(J+=G[K],G[K]==="\\")Q=!0;else if(W&&G[K]==="]")W=!1;else if(!W&&G[K]==="[")W=!0}return J}function Sq4($,Y){if(Y.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(Y.target==="openApi3"&&$.keyType?._def.typeName===U0.ZodEnum)return{type:"object",required:$.keyType._def.values,properties:$.keyType._def.values.reduce((G,J)=>({...G,[J]:B9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"properties",J]})??gQ(Y)}),{}),additionalProperties:Y.rejectedAdditionalProperties};let X={type:"object",additionalProperties:B9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]})??Y.allowedAdditionalProperties};if(Y.target==="openApi3")return X;if($.keyType?._def.typeName===U0.ZodString&&$.keyType._def.checks?.length){let{type:G,...J}=Cq4($.keyType._def,Y);return{...X,propertyNames:J}}else if($.keyType?._def.typeName===U0.ZodEnum)return{...X,propertyNames:{enum:$.keyType._def.values}};else if($.keyType?._def.typeName===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&$.keyType._def.type._def.checks?.length){let{type:G,...J}=jq4($.keyType._def,Y);return{...X,propertyNames:J}}return X}function VO9($,Y){if(Y.mapStrategy==="record")return Sq4($,Y);let X=B9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||gQ(Y),G=B9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||gQ(Y);return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function AO9($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function FO9($){return $.target==="openAi"?void 0:{not:gQ({...$,currentPath:[...$.currentPath,"not"]})}}function DO9($){return $.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var jX0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function NO9($,Y){if(Y.target==="openApi3")return aE4($,Y);let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in jX0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=jX0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return aE4($,Y)}var aE4=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>B9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};function LO9($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length)){if(Y.target==="openApi3")return{type:jX0[$.innerType._def.typeName],nullable:!0};return{type:[jX0[$.innerType._def.typeName],"null"]}}if(Y.target==="openApi3"){let G=B9($.innerType._def,{...Y,currentPath:[...Y.currentPath]});if(G&&"$ref"in G)return{allOf:[G],nullable:!0};return G&&{...G,nullable:!0}}let X=B9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function BO9($,Y){let X={type:"number"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"int":X.type="integer",wq4(X,"type",G.message,Y);break;case"min":if(Y.target==="jsonSchema7")if(G.inclusive)Y5(X,"minimum",G.value,G.message,Y);else Y5(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;Y5(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)Y5(X,"maximum",G.value,G.message,Y);else Y5(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;Y5(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":Y5(X,"multipleOf",G.value,G.message,Y);break}return X}function OO9($,Y){let X=Y.target==="openAi",G={type:"object",properties:{}},J=[],Q=$.shape();for(let Z in Q){let K=Q[Z];if(K===void 0||K._def===void 0)continue;let H=MO9(K);if(H&&X){if(K._def.typeName==="ZodOptional")K=K._def.innerType;if(!K.isNullable())K=K.nullable();H=!1}let z=B9(K._def,{...Y,currentPath:[...Y.currentPath,"properties",Z],propertyPath:[...Y.currentPath,"properties",Z]});if(z===void 0)continue;if(G.properties[Z]=z,!H)J.push(Z)}if(J.length)G.required=J;let W=EO9($,Y);if(W!==void 0)G.additionalProperties=W;return G}function EO9($,Y){if($.catchall._def.typeName!=="ZodNever")return B9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function MO9($){try{return $.isOptional()}catch{return!0}}var RO9=($,Y)=>{if(Y.currentPath.toString()===Y.propertyPath?.toString())return B9($.innerType._def,Y);let X=B9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return X?{anyOf:[{not:gQ(Y)},X]}:gQ(Y)},qO9=($,Y)=>{if(Y.pipeStrategy==="input")return B9($.in._def,Y);else if(Y.pipeStrategy==="output")return B9($.out._def,Y);let X=B9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=B9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};function IO9($,Y){return B9($.type._def,Y)}function PO9($,Y){let G={type:"array",uniqueItems:!0,items:B9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)Y5(G,"minItems",$.minSize.value,$.minSize.message,Y);if($.maxSize)Y5(G,"maxItems",$.maxSize.value,$.maxSize.message,Y);return G}function wO9($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>B9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:B9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>B9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function _O9($){return{not:gQ($)}}function jO9($){return gQ($)}var TO9=($,Y)=>{return B9($.innerType._def,Y)},CO9=($,Y,X)=>{switch(Y){case U0.ZodString:return Cq4($,X);case U0.ZodNumber:return BO9($,X);case U0.ZodObject:return OO9($,X);case U0.ZodBigInt:return $O9($,X);case U0.ZodBoolean:return YO9();case U0.ZodDate:return Tq4($,X);case U0.ZodUndefined:return _O9(X);case U0.ZodNull:return DO9(X);case U0.ZodArray:return eB9($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return NO9($,X);case U0.ZodIntersection:return KO9($,X);case U0.ZodTuple:return wO9($,X);case U0.ZodRecord:return Sq4($,X);case U0.ZodLiteral:return UO9($,X);case U0.ZodEnum:return WO9($);case U0.ZodNativeEnum:return AO9($);case U0.ZodNullable:return LO9($,X);case U0.ZodOptional:return RO9($,X);case U0.ZodMap:return VO9($,X);case U0.ZodSet:return PO9($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return IO9($,X);case U0.ZodNaN:case U0.ZodNever:return FO9(X);case U0.ZodEffects:return QO9($,X);case U0.ZodAny:return gQ(X);case U0.ZodUnknown:return jO9(X);case U0.ZodDefault:return JO9($,X);case U0.ZodBranded:return jq4($,X);case U0.ZodReadonly:return TO9($,X);case U0.ZodCatch:return XO9($,X);case U0.ZodPipeline:return qO9($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}};function B9($,Y,X=!1){let G=Y.seen.get($);if(Y.override){let Z=Y.override?.($,Y,G,X);if(Z!==sB9)return Z}if(G&&!X){let Z=SO9(G,Y);if(Z!==void 0)return Z}let J={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,J);let Q=CO9($,$.typeName,Y),W=typeof Q==="function"?B9(Q(),Y):Q;if(W)kO9($,Y,W);if(Y.postProcess){let Z=Y.postProcess(W,$,Y);return J.jsonSchema=W,Z}return J.jsonSchema=W,W}var SO9=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:_q4(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),gQ(Y);return Y.$refStrategy==="seen"?gQ(Y):void 0}}},kO9=($,Y,X)=>{if($.description){if(X.description=$.description,Y.markdownDescription)X.markdownDescription=$.description}return X},vO9=($,Y)=>{let X=tB9(Y),G=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((K,[H,z])=>({...K,[H]:B9(z._def,{...X,currentPath:[...X.basePath,X.definitionPath,H]},!0)??gQ(X)}),{}):void 0,J=typeof Y==="string"?Y:Y?.nameStrategy==="title"?void 0:Y?.name,Q=B9($._def,J===void 0?X:{...X,currentPath:[...X.basePath,X.definitionPath,J]},!1)??gQ(X),W=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(W!==void 0)Q.title=W;if(X.flags.hasReferencedOpenAiAnyType){if(!G)G={};if(!G[X.openAiAnyTypeName])G[X.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:X.$refStrategy==="relative"?"1":[...X.basePath,X.definitionPath,X.openAiAnyTypeName].join("/")}}}let Z=J===void 0?G?{...Q,[X.definitionPath]:G}:Q:{$ref:[...X.$refStrategy==="relative"?[]:X.basePath,X.definitionPath,J].join("/"),[X.definitionPath]:{...G,[J]:Q}};if(X.target==="jsonSchema7")Z.$schema="http://json-schema.org/draft-07/schema#";else if(X.target==="jsonSchema2019-09"||X.target==="openAi")Z.$schema="https://json-schema.org/draft/2019-09/schema#";if(X.target==="openAi"&&(("anyOf"in Z)||("oneOf"in Z)||("allOf"in Z)||("type"in Z)&&Array.isArray(Z.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return Z},xO9=vO9;function yO9($){let Y=["ROOT"],X=-1,G=null;function J(K,H,z){switch(K){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let K=0;K<$.length;K++){let H=$[K];switch(Y[Y.length-1]){case"ROOT":J(H,K,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=K,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,K,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,K);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=K;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=K}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=K,Y.pop();break}default:{X=K,J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=K,Y.pop();break}default:{X=K;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=K;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=K;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,K+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K)}else X=K;break}}}let Z=$.slice(0,X+1);for(let K=Y.length-1;K>=0;K--)switch(Y[K]){case"INSIDE_STRING":{Z+='"';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":{Z+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{Z+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))Z+="true".slice(z.length);else if("false".startsWith(z))Z+="false".slice(z.length);else if("null".startsWith(z))Z+="null".slice(z.length)}}return Z}function bO9($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=ic0({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=ic0({text:yO9($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}var hO9={code:"0",name:"text",parse:($)=>{if(typeof $!=="string")throw Error('"text" parts expect a string value.');return{type:"text",value:$}}},fO9={code:"2",name:"data",parse:($)=>{if(!Array.isArray($))throw Error('"data" parts expect an array value.');return{type:"data",value:$}}},gO9={code:"3",name:"error",parse:($)=>{if(typeof $!=="string")throw Error('"error" parts expect a string value.');return{type:"error",value:$}}},mO9={code:"8",name:"message_annotations",parse:($)=>{if(!Array.isArray($))throw Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:$}}},uO9={code:"9",name:"tool_call",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string"||!("args"in $)||typeof $.args!=="object")throw Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:$}}},pO9={code:"a",name:"tool_result",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("result"in $))throw Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:$}}},dO9={code:"b",name:"tool_call_streaming_start",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string")throw Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:$}}},cO9={code:"c",name:"tool_call_delta",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("argsTextDelta"in $)||typeof $.argsTextDelta!=="string")throw Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:$}}},lO9={code:"d",name:"finish_message",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_message" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};return{type:"finish_message",value:Y}}},iO9={code:"e",name:"finish_step",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_step" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason,isContinued:!1};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};if("isContinued"in $&&typeof $.isContinued==="boolean")Y.isContinued=$.isContinued;return{type:"finish_step",value:Y}}},nO9={code:"f",name:"start_step",parse:($)=>{if($==null||typeof $!=="object"||!("messageId"in $)||typeof $.messageId!=="string")throw Error('"start_step" parts expect an object with an "id" property.');return{type:"start_step",value:{messageId:$.messageId}}}},rO9={code:"g",name:"reasoning",parse:($)=>{if(typeof $!=="string")throw Error('"reasoning" parts expect a string value.');return{type:"reasoning",value:$}}},aO9={code:"h",name:"source",parse:($)=>{if($==null||typeof $!=="object")throw Error('"source" parts expect a Source object.');return{type:"source",value:$}}},sO9={code:"i",name:"redacted_reasoning",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string")throw Error('"redacted_reasoning" parts expect an object with a "data" property.');return{type:"redacted_reasoning",value:{data:$.data}}}},oO9={code:"j",name:"reasoning_signature",parse:($)=>{if($==null||typeof $!=="object"||!("signature"in $)||typeof $.signature!=="string")throw Error('"reasoning_signature" parts expect an object with a "signature" property.');return{type:"reasoning_signature",value:{signature:$.signature}}}},tO9={code:"k",name:"file",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string"||!("mimeType"in $)||typeof $.mimeType!=="string")throw Error('"file" parts expect an object with a "data" and "mimeType" property.');return{type:"file",value:$}}},Ql0=[hO9,fO9,gO9,mO9,uO9,pO9,dO9,cO9,lO9,iO9,nO9,rO9,aO9,sO9,oO9,tO9];Object.fromEntries(Ql0.map(($)=>[$.code,$]));Object.fromEntries(Ql0.map(($)=>[$.name,$.code]));function kq4($,Y){let X=Ql0.find((G)=>G.name===$);if(!X)throw Error(`Invalid stream part type: ${$}`);return`${X.code}:${JSON.stringify(Y)}
`}function eO9($,Y){var X;let G=(X=void 0)!=null?X:!1;return $E9(xO9($,{$refStrategy:G?"root":"none",target:"jsonSchema7"}),{validate:(J)=>{let Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}var nc0=Symbol.for("vercel.ai.schema");function $E9($,{validate:Y}={}){return{[nc0]:!0,_type:void 0,[_X0]:!0,jsonSchema:$,validate:Y}}function YE9($){return typeof $==="object"&&$!==null&&nc0 in $&&$[nc0]===!0&&"jsonSchema"in $&&"validate"in $}function XE9($){return YE9($)?$:eO9($)}var GE9=typeof globalThis==="object"?globalThis:global,lM="1.9.0",sE4=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function JE9($){var Y=new Set([$]),X=new Set,G=$.match(sE4);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(K){return K===$};function Q(Z){return X.add(Z),!1}function W(Z){return Y.add(Z),!0}return function(K){if(Y.has(K))return!0;if(X.has(K))return!1;var H=K.match(sE4);if(!H)return Q(K);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(K);if(J.major!==z.major)return Q(K);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(K);return Q(K)}if(J.minor<=z.minor)return W(K);return Q(K)}}var QE9=JE9(lM),WE9=lM.split(".")[0],Hd=Symbol.for("opentelemetry.js.api."+WE9),zd=GE9;function Wl0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=zd[Hd]=(J=zd[Hd])!==null&&J!==void 0?J:{version:lM};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==lM){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+lM);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+lM+"."),!0}function Vd($){var Y,X,G=(Y=zd[Hd])===null||Y===void 0?void 0:Y.version;if(!G||!QE9(G))return;return(X=zd[Hd])===null||X===void 0?void 0:X[$]}function Zl0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+lM+".");var X=zd[Hd];if(X)delete X[$]}var ZE9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},KE9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},UE9=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return $d("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return $d("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return $d("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return $d("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return $d("verbose",this._namespace,Y)},$}();function $d($,Y,X){var G=Vd("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,KE9([],ZE9(X),!1))}var iW;(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(iW||(iW={}));function HE9($,Y){if($<iW.NONE)$=iW.NONE;else if($>iW.ALL)$=iW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",iW.ERROR),warn:X("warn",iW.WARN),info:X("info",iW.INFO),debug:X("debug",iW.DEBUG),verbose:X("verbose",iW.VERBOSE)}}var zE9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},VE9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},AE9="diag",TX0=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var Z=Vd("diag");if(!Z)return;return Z[J].apply(Z,VE9([],zE9(Q),!1))}}var X=this,G=function(J,Q){var W,Z,K;if(Q===void 0)Q={logLevel:iW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=Vd("diag"),V=HE9((Z=Q.logLevel)!==null&&Z!==void 0?Z:iW.INFO,J);if(z&&!Q.suppressOverrideMessage){var A=(K=Error().stack)!==null&&K!==void 0?K:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+A),V.warn("Current logger will overwrite one already registered from "+A)}return Wl0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){Zl0(AE9,X)},X.createComponentLogger=function(J){return new UE9(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();function FE9($){return Symbol.for($)}var DE9=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),NE9=new DE9,LE9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},BE9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},OE9=function(){function $(){}return $.prototype.active=function(){return NE9},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,BE9([G],LE9(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),EE9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},ME9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},qc0="context",RE9=new OE9,vq4=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return Wl0(qc0,Y,TX0.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,ME9([Y,X,G],EE9(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return Vd(qc0)||RE9},$.prototype.disable=function(){this._getContextManager().disable(),Zl0(qc0,TX0.instance())},$}(),rc0;(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(rc0||(rc0={}));var xq4="0000000000000000",yq4="00000000000000000000000000000000",qE9={traceId:yq4,spanId:xq4,traceFlags:rc0.NONE},Zd=function(){function $(Y){if(Y===void 0)Y=qE9;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),Kl0=FE9("OpenTelemetry Context Key SPAN");function Ul0($){return $.getValue(Kl0)||void 0}function IE9(){return Ul0(vq4.getInstance().active())}function Hl0($,Y){return $.setValue(Kl0,Y)}function PE9($){return $.deleteValue(Kl0)}function wE9($,Y){return Hl0($,new Zd(Y))}function bq4($){var Y;return(Y=Ul0($))===null||Y===void 0?void 0:Y.spanContext()}var _E9=/^([0-9a-f]{32})$/i,jE9=/^[0-9a-f]{16}$/i;function TE9($){return _E9.test($)&&$!==yq4}function CE9($){return jE9.test($)&&$!==xq4}function hq4($){return TE9($.traceId)&&CE9($.spanId)}function SE9($){return new Zd($)}var Ic0=vq4.getInstance(),fq4=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=Ic0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new Zd;var Q=G&&bq4(G);if(kE9(Q)&&hq4(Q))return new Zd(Q);else return new Zd},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,Z;if(arguments.length<2)return;else if(arguments.length===2)Z=X;else if(arguments.length===3)Q=X,Z=G;else Q=X,W=G,Z=J;var K=W!==null&&W!==void 0?W:Ic0.active(),H=this.startSpan(Y,Q,K),z=Hl0(K,H);return Ic0.with(z,Z,void 0,H)},$}();function kE9($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}var vE9=new fq4,xE9=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return vE9;return this._delegate=Y,this._delegate},$}(),yE9=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new fq4},$}(),bE9=new yE9,oE4=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new xE9(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:bE9},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}(),CX0;(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(CX0||(CX0={}));var Pc0="trace",hE9=function(){function $(){this._proxyTracerProvider=new oE4,this.wrapSpanContext=SE9,this.isSpanContextValid=hq4,this.deleteSpan=PE9,this.getSpan=Ul0,this.getActiveSpan=IE9,this.getSpanContext=bq4,this.setSpan=Hl0,this.setSpanContext=wE9}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=Wl0(Pc0,this._proxyTracerProvider,TX0.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return Vd(Pc0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){Zl0(Pc0,TX0.instance()),this._proxyTracerProvider=new oE4},$}(),fE9=hE9.getInstance(),gE9=Object.defineProperty,zl0=($,Y)=>{for(var X in Y)gE9($,X,{get:Y[X],enumerable:!0})};function gq4($,{contentType:Y,dataStreamVersion:X}){let G=new Headers($!=null?$:{});if(!G.has("Content-Type"))G.set("Content-Type",Y);return G.set("X-Vercel-AI-Data-Stream",X),G}var mE9=class extends jJ{constructor(){super({name:"AI_UnsupportedModelVersionError",message:'Unsupported model version. AI SDK 4 only supports models that implement specification version "v1". Please upgrade to AI SDK 5 to use this model.'})}},mq4="AI_InvalidArgumentError",uq4=`vercel.ai.error.${mq4}`,uE9=Symbol.for(uq4),pq4,tE4=class extends jJ{constructor({parameter:$,value:Y,message:X}){super({name:mq4,message:`Invalid argument for parameter ${$}: ${X}`});this[pq4]=!0,this.parameter=$,this.value=Y}static isInstance($){return jJ.hasMarker($,uq4)}};pq4=uE9;var dq4="AI_RetryError",cq4=`vercel.ai.error.${dq4}`,pE9=Symbol.for(cq4),lq4,eE4=class extends jJ{constructor({message:$,reason:Y,errors:X}){super({name:dq4,message:$});this[lq4]=!0,this.reason=Y,this.errors=X,this.lastError=X[X.length-1]}static isInstance($){return jJ.hasMarker($,cq4)}};lq4=pE9;var dE9=({maxRetries:$=2,initialDelayInMs:Y=2000,backoffFactor:X=2}={})=>async(G)=>iq4(G,{maxRetries:$,delayInMs:Y,backoffFactor:X});async function iq4($,{maxRetries:Y,delayInMs:X,backoffFactor:G},J=[]){try{return await $()}catch(Q){if(lB9(Q))throw Q;if(Y===0)throw Q;let W=cB9(Q),Z=[...J,Q],K=Z.length;if(K>Y)throw new eE4({message:`Failed after ${K} attempts. Last error: ${W}`,reason:"maxRetriesExceeded",errors:Z});if(Q instanceof Error&&xB9.isInstance(Q)&&Q.isRetryable===!0&&K<=Y)return await dB9(X),iq4($,{maxRetries:Y,delayInMs:G*X,backoffFactor:G},Z);if(K===1)throw Q;throw new eE4({message:`Failed after ${K} attempts with non-retryable error: '${W}'`,reason:"errorNotRetryable",errors:Z})}}function cE9({maxRetries:$}){if($!=null){if(!Number.isInteger($))throw new tE4({parameter:"maxRetries",value:$,message:"maxRetries must be an integer"});if($<0)throw new tE4({parameter:"maxRetries",value:$,message:"maxRetries must be >= 0"})}let Y=$!=null?$:2;return{maxRetries:Y,retry:dE9({maxRetries:Y})}}function wc0({operationId:$,telemetry:Y}){return{"operation.name":`${$}${(Y==null?void 0:Y.functionId)!=null?` ${Y.functionId}`:""}`,"resource.name":Y==null?void 0:Y.functionId,"ai.operationId":$,"ai.telemetry.functionId":Y==null?void 0:Y.functionId}}function lE9({model:$,settings:Y,telemetry:X,headers:G}){var J;return{"ai.model.provider":$.provider,"ai.model.id":$.modelId,...Object.entries(Y).reduce((Q,[W,Z])=>{return Q[`ai.settings.${W}`]=Z,Q},{}),...Object.entries((J=X==null?void 0:X.metadata)!=null?J:{}).reduce((Q,[W,Z])=>{return Q[`ai.telemetry.metadata.${W}`]=Z,Q},{}),...Object.entries(G!=null?G:{}).reduce((Q,[W,Z])=>{if(Z!==void 0)Q[`ai.request.headers.${W}`]=Z;return Q},{})}}var iE9={startSpan(){return RX0},startActiveSpan($,Y,X,G){if(typeof Y==="function")return Y(RX0);if(typeof X==="function")return X(RX0);if(typeof G==="function")return G(RX0)}},RX0={spanContext(){return nE9},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}},nE9={traceId:"",spanId:"",traceFlags:0};function rE9({isEnabled:$=!1,tracer:Y}={}){if(!$)return iE9;if(Y)return Y;return fE9.getTracer("ai")}function _c0({name:$,tracer:Y,attributes:X,fn:G,endWhenDone:J=!0}){return Y.startActiveSpan($,{attributes:X},async(Q)=>{try{let W=await G(Q);if(J)Q.end();return W}catch(W){try{aE9(Q,W)}finally{Q.end()}throw W}})}function aE9($,Y){if(Y instanceof Error)$.recordException({name:Y.name,message:Y.message,stack:Y.stack}),$.setStatus({code:CX0.ERROR,message:Y.message});else $.setStatus({code:CX0.ERROR})}function mM({telemetry:$,attributes:Y}){if(($==null?void 0:$.isEnabled)!==!0)return{};return Object.entries(Y).reduce((X,[G,J])=>{if(J===void 0)return X;if(typeof J==="object"&&"input"in J&&typeof J.input==="function"){if(($==null?void 0:$.recordInputs)===!1)return X;let Q=J.input();return Q===void 0?X:{...X,[G]:Q}}if(typeof J==="object"&&"output"in J&&typeof J.output==="function"){if(($==null?void 0:$.recordOutputs)===!1)return X;let Q=J.output();return Q===void 0?X:{...X,[G]:Q}}return{...X,[G]:J}},{})}function sE9($,Y){if(Y<=0)throw Error("chunkSize must be greater than 0");let X=[];for(let G=0;G<$.length;G+=Y)X.push($.slice(G,G+Y));return X}async function oE9({model:$,values:Y,maxRetries:X,abortSignal:G,headers:J,experimental_telemetry:Q}){if(typeof $==="string"||$.specificationVersion!=="v1")throw new mE9;let{maxRetries:W,retry:Z}=cE9({maxRetries:X}),K=lE9({model:$,telemetry:Q,headers:J,settings:{maxRetries:W}}),H=rE9(Q);return _c0({name:"ai.embedMany",attributes:mM({telemetry:Q,attributes:{...wc0({operationId:"ai.embedMany",telemetry:Q}),...K,"ai.values":{input:()=>Y.map((z)=>JSON.stringify(z))}}}),tracer:H,fn:async(z)=>{let V=$.maxEmbeddingsPerCall;if(V==null){let{embeddings:D,usage:L}=await Z(()=>{return _c0({name:"ai.embedMany.doEmbed",attributes:mM({telemetry:Q,attributes:{...wc0({operationId:"ai.embedMany.doEmbed",telemetry:Q}),...K,"ai.values":{input:()=>Y.map((B)=>JSON.stringify(B))}}}),tracer:H,fn:async(B)=>{var O;let E=await $.doEmbed({values:Y,abortSignal:G,headers:J}),M=E.embeddings,R=(O=E.usage)!=null?O:{tokens:NaN};return B.setAttributes(mM({telemetry:Q,attributes:{"ai.embeddings":{output:()=>M.map((q)=>JSON.stringify(q))},"ai.usage.tokens":R.tokens}})),{embeddings:M,usage:R}}})});return z.setAttributes(mM({telemetry:Q,attributes:{"ai.embeddings":{output:()=>D.map((B)=>JSON.stringify(B))},"ai.usage.tokens":L.tokens}})),new $M4({values:Y,embeddings:D,usage:L})}let A=sE9(Y,V),F=[],N=0;for(let D of A){let{embeddings:L,usage:B}=await Z(()=>{return _c0({name:"ai.embedMany.doEmbed",attributes:mM({telemetry:Q,attributes:{...wc0({operationId:"ai.embedMany.doEmbed",telemetry:Q}),...K,"ai.values":{input:()=>D.map((O)=>JSON.stringify(O))}}}),tracer:H,fn:async(O)=>{var E;let M=await $.doEmbed({values:D,abortSignal:G,headers:J}),R=M.embeddings,q=(E=M.usage)!=null?E:{tokens:NaN};return O.setAttributes(mM({telemetry:Q,attributes:{"ai.embeddings":{output:()=>R.map((w)=>JSON.stringify(w))},"ai.usage.tokens":q.tokens}})),{embeddings:R,usage:q}}})});F.push(...L),N+=B.tokens}return z.setAttributes(mM({telemetry:Q,attributes:{"ai.embeddings":{output:()=>F.map((D)=>JSON.stringify(D))},"ai.usage.tokens":N}})),new $M4({values:Y,embeddings:F,usage:{tokens:N}})}})}var $M4=class{constructor($){this.values=$.values,this.embeddings=$.embeddings,this.usage=$.usage}},nq4="AI_NoObjectGeneratedError",rq4=`vercel.ai.error.${nq4}`,tE9=Symbol.for(rq4),aq4,YM4=class extends jJ{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:nq4,message:$,cause:Y});this[aq4]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return jJ.hasMarker($,rq4)}};aq4=tE9;var sq4=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),ac0=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),ac0),U.array(ac0)])),z$=U.record(U.string(),U.record(U.string(),ac0)),eE9=U.array(U.union([U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("image"),data:U.string(),mimeType:U.string().optional()})])),oq4=U.object({type:U.literal("text"),text:U.string(),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()}),$M9=U.object({type:U.literal("image"),image:U.union([sq4,U.instanceof(URL)]),mimeType:U.string().optional(),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()}),tq4=U.object({type:U.literal("file"),data:U.union([sq4,U.instanceof(URL)]),filename:U.string().optional(),mimeType:U.string(),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()}),YM9=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()}),XM9=U.object({type:U.literal("redacted-reasoning"),data:U.string(),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()}),GM9=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),args:U.unknown(),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()}),JM9=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),result:U.unknown(),content:eE9.optional(),isError:U.boolean().optional(),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()}),QM9=U.object({role:U.literal("system"),content:U.string(),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()}),WM9=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([oq4,$M9,tq4]))]),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()}),ZM9=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([oq4,tq4,YM9,XM9,GM9]))]),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()}),KM9=U.object({role:U.literal("tool"),content:U.array(JM9),providerOptions:z$.optional(),experimental_providerMetadata:z$.optional()});U.union([QM9,WM9,ZM9,KM9]);var UM9="JSON schema:",HM9="You MUST answer with a JSON object that matches the JSON schema above.",zM9="You MUST answer with JSON.";function VM9({prompt:$,schema:Y,schemaPrefix:X=Y!=null?UM9:void 0,schemaSuffix:G=Y!=null?HM9:zM9}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}oM({prefix:"aiobj",size:24});oM({prefix:"aiobj",size:24});oM({prefix:"aitxt",size:24});oM({prefix:"msg",size:24});var AM9={};zl0(AM9,{object:()=>DM9,text:()=>FM9});var FM9=()=>({type:"text",responseFormat:()=>({type:"text"}),injectIntoSystemPrompt({system:$}){return $},parsePartial({text:$}){return{partial:$}},parseOutput({text:$}){return $}}),DM9=({schema:$})=>{let Y=XE9($);return{type:"object",responseFormat:({model:X})=>({type:"json",schema:X.supportsStructuredOutputs?Y.jsonSchema:void 0}),injectIntoSystemPrompt({system:X,model:G}){return G.supportsStructuredOutputs?X:VM9({prompt:X,schema:Y.jsonSchema})},parsePartial({text:X}){let G=bO9(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:G.value};default:{let J=G.state;throw Error(`Unsupported parse state: ${J}`)}}},parseOutput({text:X},G){let J=ic0({text:X});if(!J.success)throw new YM4({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});let Q=Pq4({value:J.value,schema:Y});if(!Q.success)throw new YM4({message:"No object generated: response did not match schema.",cause:Q.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return Q.value}}};function eq4($,Y){let X=$.getReader(),G=Y.getReader(),J=void 0,Q=void 0,W=!1,Z=!1;async function K(z){try{if(J==null)J=X.read();let V=await J;if(J=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}async function H(z){try{if(Q==null)Q=G.read();let V=await Q;if(Q=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}return new ReadableStream({async pull(z){try{if(W){await H(z);return}if(Z){await K(z);return}if(J==null)J=X.read();if(Q==null)Q=G.read();let{result:V,reader:A}=await Promise.race([J.then((F)=>({result:F,reader:X})),Q.then((F)=>({result:F,reader:G}))]);if(!V.done)z.enqueue(V.value);if(A===X){if(J=void 0,V.done)await H(z),W=!0}else if(Q=void 0,V.done)Z=!0,await K(z)}catch(V){z.error(V)}},cancel(){X.cancel(),G.cancel()}})}oM({prefix:"aitxt",size:24});oM({prefix:"msg",size:24});var NM9=U.object({name:U.string(),version:U.string()}).passthrough(),Vl0=U.object({_meta:U.optional(U.object({}).passthrough())}).passthrough(),Ad=Vl0,LM9=U.object({method:U.string(),params:U.optional(Vl0)}),BM9=U.object({experimental:U.optional(U.object({}).passthrough()),logging:U.optional(U.object({}).passthrough()),prompts:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough()),resources:U.optional(U.object({subscribe:U.optional(U.boolean()),listChanged:U.optional(U.boolean())}).passthrough()),tools:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough())}).passthrough();Ad.extend({protocolVersion:U.string(),capabilities:BM9,serverInfo:NM9,instructions:U.optional(U.string())});var OM9=Ad.extend({nextCursor:U.optional(U.string())}),EM9=U.object({name:U.string(),description:U.optional(U.string()),inputSchema:U.object({type:U.literal("object"),properties:U.optional(U.object({}).passthrough())}).passthrough()}).passthrough();OM9.extend({tools:U.array(EM9)});var MM9=U.object({type:U.literal("text"),text:U.string()}).passthrough(),RM9=U.object({type:U.literal("image"),data:U.string().base64(),mimeType:U.string()}).passthrough(),$I4=U.object({uri:U.string(),mimeType:U.optional(U.string())}).passthrough(),qM9=$I4.extend({text:U.string()}),IM9=$I4.extend({blob:U.string().base64()}),PM9=U.object({type:U.literal("resource"),resource:U.union([qM9,IM9])}).passthrough();Ad.extend({content:U.array(U.union([MM9,RM9,PM9])),isError:U.boolean().default(!1).optional()}).or(Ad.extend({toolResult:U.unknown()}));var iX0="2.0",wM9=U.object({jsonrpc:U.literal(iX0),id:U.union([U.string(),U.number().int()])}).merge(LM9).strict(),_M9=U.object({jsonrpc:U.literal(iX0),id:U.union([U.string(),U.number().int()]),result:Ad}).strict(),jM9=U.object({jsonrpc:U.literal(iX0),id:U.union([U.string(),U.number().int()]),error:U.object({code:U.number().int(),message:U.string(),data:U.optional(U.unknown())})}).strict(),TM9=U.object({jsonrpc:U.literal(iX0)}).merge(U.object({method:U.string(),params:U.optional(Vl0)})).strict();U.union([wM9,TM9,_M9,jM9]);var CM9={};zl0(CM9,{mergeIntoDataStream:()=>vM9,toDataStream:()=>SM9,toDataStreamResponse:()=>kM9});function YI4($={}){let Y=new TextEncoder,X="";return new TransformStream({async start(){if($.onStart)await $.onStart()},async transform(G,J){if(J.enqueue(Y.encode(G)),X+=G,$.onToken)await $.onToken(G);if($.onText&&typeof G==="string")await $.onText(G)},async flush(){if($.onCompletion)await $.onCompletion(X);if($.onFinal)await $.onFinal(X)}})}function Al0($,Y){return $.pipeThrough(new TransformStream({transform:async(X,G)=>{var J;if(typeof X==="string"){G.enqueue(X);return}if("event"in X){if(X.event==="on_chat_model_stream")XM4((J=X.data)==null?void 0:J.chunk,G);return}XM4(X,G)}})).pipeThrough(YI4(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(X,G)=>{G.enqueue(kq4("text",X))}}))}function SM9($,Y){return Al0($,Y).pipeThrough(new TextEncoderStream)}function kM9($,Y){var X;let G=Al0($,Y==null?void 0:Y.callbacks).pipeThrough(new TextEncoderStream),J=Y==null?void 0:Y.data,Q=Y==null?void 0:Y.init,W=J?eq4(J.stream,G):G;return new Response(W,{status:(X=Q==null?void 0:Q.status)!=null?X:200,statusText:Q==null?void 0:Q.statusText,headers:gq4(Q==null?void 0:Q.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function vM9($,Y){Y.dataStream.merge(Al0($,Y.callbacks))}function XM4($,Y){if(typeof $.content==="string")Y.enqueue($.content);else{let X=$.content;for(let G of X)if(G.type==="text")Y.enqueue(G.text)}}var xM9={};zl0(xM9,{mergeIntoDataStream:()=>hM9,toDataStream:()=>yM9,toDataStreamResponse:()=>bM9});function Fl0($,Y){let X=fM9();return pB9($[Symbol.asyncIterator]()).pipeThrough(new TransformStream({async transform(G,J){J.enqueue(X(G.delta))}})).pipeThrough(YI4(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(G,J)=>{J.enqueue(kq4("text",G))}}))}function yM9($,Y){return Fl0($,Y).pipeThrough(new TextEncoderStream)}function bM9($,Y={}){var X;let{init:G,data:J,callbacks:Q}=Y,W=Fl0($,Q).pipeThrough(new TextEncoderStream),Z=J?eq4(J.stream,W):W;return new Response(Z,{status:(X=G==null?void 0:G.status)!=null?X:200,statusText:G==null?void 0:G.statusText,headers:gq4(G==null?void 0:G.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function hM9($,Y){Y.dataStream.merge(Fl0($,Y.callbacks))}function fM9(){let $=!0;return(Y)=>{if($){if(Y=Y.trimStart(),Y)$=!1}return Y}}var XI4="vercel.ai.error",gM9=Symbol.for(XI4),GM4,JM4,vX=class $ extends(JM4=Error,GM4=gM9,JM4){constructor({name:Y,message:X,cause:G}){super(X);this[GM4]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,XI4)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},GI4="AI_APICallError",JI4=`vercel.ai.error.${GI4}`,mM9=Symbol.for(JI4),QM4,WM4,_J=class extends(WM4=vX,QM4=mM9,WM4){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:GI4,message:$,cause:W});this[QM4]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return vX.hasMarker($,JI4)}},QI4="AI_EmptyResponseBodyError",WI4=`vercel.ai.error.${QI4}`,uM9=Symbol.for(WI4),ZM4,KM4,pM9=class extends(KM4=vX,ZM4=uM9,KM4){constructor({message:$="Empty response body"}={}){super({name:QI4,message:$});this[ZM4]=!0}static isInstance($){return vX.hasMarker($,WI4)}};function ZI4($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}var KI4="AI_InvalidArgumentError",UI4=`vercel.ai.error.${KI4}`,dM9=Symbol.for(UI4),UM4,HM4,cM9=class extends(HM4=vX,UM4=dM9,HM4){constructor({message:$,cause:Y,argument:X}){super({name:KI4,message:$,cause:Y});this[UM4]=!0,this.argument=X}static isInstance($){return vX.hasMarker($,UI4)}},HI4="AI_JSONParseError",zI4=`vercel.ai.error.${HI4}`,lM9=Symbol.for(zI4),zM4,VM4,SX0=class extends(VM4=vX,zM4=lM9,VM4){constructor({text:$,cause:Y}){super({name:HI4,message:`JSON parsing failed: Text: ${$}.
Error message: ${ZI4(Y)}`,cause:Y});this[zM4]=!0,this.text=$}static isInstance($){return vX.hasMarker($,zI4)}},VI4="AI_TypeValidationError",AI4=`vercel.ai.error.${VI4}`,iM9=Symbol.for(AI4),AM4,FM4,Fd=class $ extends(FM4=vX,AM4=iM9,FM4){constructor({value:Y,cause:X}){super({name:VI4,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${ZI4(X)}`,cause:X});this[AM4]=!0,this.value=Y}static isInstance(Y){return vX.hasMarker(Y,AI4)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}},DM4=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};function jc0($){}function nM9($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=jc0,onError:X=jc0,onRetry:G=jc0,onComment:J}=$,Q="",W=!0,Z,K="",H="";function z(D){let L=W?D.replace(/^\xEF\xBB\xBF/,""):D,[B,O]=rM9(`${Q}${L}`);for(let E of B)V(E);Q=O,W=!1}function V(D){if(D===""){F();return}if(D.startsWith(":")){J&&J(D.slice(D.startsWith(": ")?2:1));return}let L=D.indexOf(":");if(L!==-1){let B=D.slice(0,L),O=D[L+1]===" "?2:1,E=D.slice(L+O);A(B,E,D);return}A(D,"",D)}function A(D,L,B){switch(D){case"event":H=L;break;case"data":K=`${K}${L}
`;break;case"id":Z=L.includes("\x00")?void 0:L;break;case"retry":/^\d+$/.test(L)?G(parseInt(L,10)):X(new DM4(`Invalid \`retry\` value: "${L}"`,{type:"invalid-retry",value:L,line:B}));break;default:X(new DM4(`Unknown field "${D.length>20?`${D.slice(0,20)}\u2026`:D}"`,{type:"unknown-field",field:D,value:L,line:B}));break}}function F(){K.length>0&&Y({id:Z,event:H||void 0,data:K.endsWith(`
`)?K.slice(0,-1):K}),Z=void 0,K="",H=""}function N(D={}){Q&&D.consume&&V(Q),W=!0,Z=void 0,K="",H="",Q=""}return{feed:z,reset:N}}function rM9($){let Y=[],X="",G=0;for(;G<$.length;){let J=$.indexOf("\r",G),Q=$.indexOf(`
`,G),W=-1;if(J!==-1&&Q!==-1?W=Math.min(J,Q):J!==-1?J===$.length-1?W=-1:W=J:Q!==-1&&(W=Q),W===-1){X=$.slice(G);break}else{let Z=$.slice(G,W);Y.push(Z),G=W+1,$[G-1]==="\r"&&$[G]===`
`&&G++}}return[Y,X]}var aM9=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=nM9({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};function kX0(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}async function sM9($,Y){if($==null)return Promise.resolve();let X=Y==null?void 0:Y.abortSignal;return new Promise((G,J)=>{if(X==null?void 0:X.aborted){J(NM4());return}let Q=setTimeout(()=>{W(),G()},$),W=()=>{clearTimeout(Q),X==null||X.removeEventListener("abort",Z)},Z=()=>{W(),J(NM4())};X==null||X.addEventListener("abort",Z)})}function NM4(){return new DOMException("Delay was aborted","AbortError")}function qd($){return Object.fromEntries([...$.headers])}var Id=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let Z=0;Z<Y;Z++)W[Z]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new cM9({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`};Id();function oM9($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function wC($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}var tM9=["fetch failed","failed to fetch"];function FI4({error:$,url:Y,requestBodyValues:X}){if(wC($))return $;if($ instanceof TypeError&&tM9.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new _J({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}return $}function DI4($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function eM9($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function nX0($,...Y){let X=new Headers(eM9($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}var NI4="3.0.25",$R9=()=>globalThis.fetch,vX0=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=$R9()})=>{try{let W=await Q($,{method:"GET",headers:nX0(Y,`ai-sdk/provider-utils/${NI4}`,DI4()),signal:J}),Z=qd(W);if(!W.ok){let K;try{K=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(wC(H)||_J.isInstance(H))throw H;throw new _J({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}throw K.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(K){if(K instanceof Error){if(wC(K)||_J.isInstance(K))throw K}throw new _J({message:"Failed to process successful response",cause:K,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}}catch(W){throw FI4({error:W,url:$,requestBodyValues:{}})}};function Qd({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}var YR9=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,XR9=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function LM4($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(YR9.test($)===!1&&XR9.test($)===!1)return Y;return GR9(Y)}function GR9($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function LI4($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return LM4($)}try{return LM4($)}finally{Error.stackTraceLimit=Y}}var xX0=Symbol.for("vercel.ai.validator");function JR9($){return{[xX0]:!0,validate:$}}function QR9($){return typeof $==="object"&&$!==null&&xX0 in $&&$[xX0]===!0&&"validate"in $}function kC($){let Y;return()=>{if(Y==null)Y=$();return Y}}function WR9($){return QR9($)?$:typeof $==="function"?$():ZR9($)}function ZR9($){return JR9(async(Y)=>{let X=await $["~standard"].validate(Y);return X.issues==null?{success:!0,value:X.value}:{success:!1,error:new Fd({value:Y,cause:X.issues})}})}async function KR9({value:$,schema:Y}){let X=await _C({value:$,schema:Y});if(!X.success)throw Fd.wrap({value:$,cause:X.error});return X.value}async function _C({value:$,schema:Y}){let X=WR9(Y);try{if(X.validate==null)return{success:!0,value:$,rawValue:$};let G=await X.validate($);if(G.success)return{success:!0,value:G.value,rawValue:$};return{success:!1,error:Fd.wrap({value:$,cause:G.error}),rawValue:$}}catch(G){return{success:!1,error:Fd.wrap({value:$,cause:G}),rawValue:$}}}async function UR9({text:$,schema:Y}){try{let X=LI4($);if(Y==null)return X;return KR9({value:X,schema:Y})}catch(X){if(SX0.isInstance(X)||Fd.isInstance(X))throw X;throw new SX0({text:$,cause:X})}}async function Dd({text:$,schema:Y}){try{let X=LI4($);if(Y==null)return{success:!0,value:X,rawValue:X};return await _C({value:X,schema:Y})}catch(X){return{success:!1,error:SX0.isInstance(X)?X:new SX0({text:$,cause:X}),rawValue:void 0}}}function HR9({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new aM9).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await Dd({text:X,schema:Y}))}}))}var zR9=()=>globalThis.fetch,yX0=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>VR9({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),VR9=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=zR9()})=>{try{let Z=await W($,{method:"POST",headers:nX0(Y,`ai-sdk/provider-utils/${NI4}`,DI4()),body:X.content,signal:Q}),K=qd(Z);if(!Z.ok){let H;try{H=await J({response:Z,url:$,requestBodyValues:X.values})}catch(z){if(wC(z)||_J.isInstance(z))throw z;throw new _J({message:"Failed to process error response",cause:z,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}throw H.value}try{return await G({response:Z,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(wC(H)||_J.isInstance(H))throw H}throw new _J({message:"Failed to process successful response",cause:H,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}}catch(Z){throw FI4({error:Z,url:$,requestBodyValues:X.values})}};function AR9($){return $}function BI4({id:$,name:Y,inputSchema:X,outputSchema:G}){return({execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K,...H})=>AR9({type:"provider-defined",id:$,name:Y,args:H,inputSchema:X,outputSchema:G,execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:Z,onInputAvailable:K})}async function V2($){if(typeof $==="function")$=$();return Promise.resolve($)}var zN=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),Z=qd(G);if(W.trim()==="")return{responseHeaders:Z,value:new _J({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let K=await UR9({text:W,schema:$});return{responseHeaders:Z,value:new _J({message:Y(K),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,data:K,isRetryable:X==null?void 0:X(G,K)})}}catch(K){return{responseHeaders:Z,value:new _J({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},FR9=($)=>async({response:Y})=>{let X=qd(Y);if(Y.body==null)throw new pM9({});return{responseHeaders:X,value:HR9({stream:Y.body,schema:$})}},rM=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await Dd({text:J,schema:$}),W=qd(Y);if(!Q.success)throw new _J({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},sc0=Symbol.for("vercel.ai.schema");function vC($){let Y;return()=>{if(Y==null)Y=$();return Y}}function Dl0($,{validate:Y}={}){return{[sc0]:!0,_type:void 0,[xX0]:!0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function wX0($){if($.type==="object"){$.additionalProperties=!1;let Y=$.properties;if(Y!=null)for(let X in Y)Y[X]=wX0(Y[X])}if($.type==="array"&&$.items!=null)if(Array.isArray($.items))$.items=$.items.map((Y)=>wX0(Y));else $.items=wX0($.items);return $}var DR9=Symbol("Let zodToJsonSchema decide on which parser to use"),BM4={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"},NR9=($)=>typeof $==="string"?{...BM4,name:$}:{...BM4,...$};function aW(){return{}}function LR9($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=X5($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function BR9($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function OR9(){return{type:"boolean"}}function OI4($,Y){return X5($.type._def,Y)}var ER9=($,Y)=>{return X5($.innerType._def,Y)};function EI4($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>EI4($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return MR9($)}}var MR9=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y};function RR9($,Y){return{...X5($.innerType._def,Y),default:$.defaultValue()}}function qR9($,Y){return Y.effectStrategy==="input"?X5($.schema._def,Y):aW()}function IR9($){return{type:"string",enum:Array.from($.values)}}var PR9=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};function wR9($,Y){let X=[X5($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),X5($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(PR9(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...Z}=J;Q=Z}G.push(Q)}}),G.length?{allOf:G}:void 0}function _R9($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}var Tc0=void 0,E3={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:()=>{if(Tc0===void 0)Tc0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return Tc0},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 MI4($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":M3(X,"email",G.message,Y);break;case"format:idn-email":M3(X,"idn-email",G.message,Y);break;case"pattern:zod":PJ(X,E3.email,G.message,Y);break}break;case"url":M3(X,"uri",G.message,Y);break;case"uuid":M3(X,"uuid",G.message,Y);break;case"regex":PJ(X,G.regex,G.message,Y);break;case"cuid":PJ(X,E3.cuid,G.message,Y);break;case"cuid2":PJ(X,E3.cuid2,G.message,Y);break;case"startsWith":PJ(X,RegExp(`^${Cc0(G.value,Y)}`),G.message,Y);break;case"endsWith":PJ(X,RegExp(`${Cc0(G.value,Y)}$`),G.message,Y);break;case"datetime":M3(X,"date-time",G.message,Y);break;case"date":M3(X,"date",G.message,Y);break;case"time":M3(X,"time",G.message,Y);break;case"duration":M3(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{PJ(X,RegExp(Cc0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")M3(X,"ipv4",G.message,Y);if(G.version!=="v4")M3(X,"ipv6",G.message,Y);break}case"base64url":PJ(X,E3.base64url,G.message,Y);break;case"jwt":PJ(X,E3.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")PJ(X,E3.ipv4Cidr,G.message,Y);if(G.version!=="v4")PJ(X,E3.ipv6Cidr,G.message,Y);break}case"emoji":PJ(X,E3.emoji(),G.message,Y);break;case"ulid":{PJ(X,E3.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{M3(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{PJ(X,E3.base64,G.message,Y);break}}break}case"nanoid":PJ(X,E3.nanoid,G.message,Y)}return X}function Cc0($,Y){return Y.patternStrategy==="escape"?TR9($):$}var jR9=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function TR9($){let Y="";for(let X=0;X<$.length;X++){if(!jR9.has($[X]))Y+="\\";Y+=$[X]}return Y}function M3($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function PJ($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:OM4(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=OM4(Y,G)}function OM4($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,Z=!1,K=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(Z){if(J[H].match(/[a-z]/)){if(K)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),K=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],K=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=Z?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(Z&&J[H]==="]")Z=!1;else if(!Z&&J[H]==="[")Z=!0}return Q}function RI4($,Y){var X,G,J,Q,W,Z;let K={type:"object",additionalProperties:(X=X5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=MI4($.keyType._def,Y);return{...K,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...K,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((Z=$.keyType._def.type._def.checks)==null?void 0:Z.length)){let{type:H,...z}=OI4($.keyType._def,Y);return{...K,propertyNames:z}}return K}function CR9($,Y){if(Y.mapStrategy==="record")return RI4($,Y);let X=X5($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||aW(),G=X5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||aW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function SR9($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function kR9(){return{not:aW()}}function vR9(){return{type:"null"}}var oc0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function xR9($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in oc0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=oc0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return yR9($,Y)}var yR9=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>X5(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};function bR9($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[oc0[$.innerType._def.typeName],"null"]};let X=X5($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function hR9($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function fR9($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let Z=J[W];if(Z===void 0||Z._def===void 0)continue;let K=mR9(Z),H=X5(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!K)G.push(W)}if(G.length)X.required=G;let Q=gR9($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function gR9($,Y){if($.catchall._def.typeName!=="ZodNever")return X5($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function mR9($){try{return $.isOptional()}catch(Y){return!0}}var uR9=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return X5($.innerType._def,Y);let G=X5($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:aW()},G]}:aW()},pR9=($,Y)=>{if(Y.pipeStrategy==="input")return X5($.in._def,Y);else if(Y.pipeStrategy==="output")return X5($.out._def,Y);let X=X5($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=X5($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};function dR9($,Y){return X5($.type._def,Y)}function cR9($,Y){let G={type:"array",uniqueItems:!0,items:X5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function lR9($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>X5(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:X5($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>X5(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function iR9(){return{not:aW()}}function nR9(){return aW()}var rR9=($,Y)=>{return X5($.innerType._def,Y)},aR9=($,Y,X)=>{switch(Y){case U0.ZodString:return MI4($,X);case U0.ZodNumber:return hR9($);case U0.ZodObject:return fR9($,X);case U0.ZodBigInt:return BR9($);case U0.ZodBoolean:return OR9();case U0.ZodDate:return EI4($,X);case U0.ZodUndefined:return iR9();case U0.ZodNull:return vR9();case U0.ZodArray:return LR9($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return xR9($,X);case U0.ZodIntersection:return wR9($,X);case U0.ZodTuple:return lR9($,X);case U0.ZodRecord:return RI4($,X);case U0.ZodLiteral:return _R9($);case U0.ZodEnum:return IR9($);case U0.ZodNativeEnum:return SR9($);case U0.ZodNullable:return bR9($,X);case U0.ZodOptional:return uR9($,X);case U0.ZodMap:return CR9($,X);case U0.ZodSet:return cR9($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return dR9($,X);case U0.ZodNaN:case U0.ZodNever:return kR9();case U0.ZodEffects:return qR9($,X);case U0.ZodAny:return aW();case U0.ZodUnknown:return nR9();case U0.ZodDefault:return RR9($,X);case U0.ZodBranded:return OI4($,X);case U0.ZodReadonly:return rR9($,X);case U0.ZodCatch:return ER9($,X);case U0.ZodPipeline:return pR9($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},sR9=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")};function X5($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let K=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(K!==DR9)return K}if(J&&!X){let K=oR9(J,Y);if(K!==void 0)return K}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=aR9($,$.typeName,Y),Z=typeof W==="function"?X5(W(),Y):W;if(Z)tR9($,Y,Z);if(Y.postProcess){let K=Y.postProcess(Z,$,Y);return Q.jsonSchema=Z,K}return Q.jsonSchema=Z,Z}var oR9=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:sR9(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),aW();return Y.$refStrategy==="seen"?aW():void 0}}},tR9=($,Y,X)=>{if($.description)X.description=$.description;return X},eR9=($)=>{let Y=NR9($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},$q9=($,Y)=>{var X;let G=eR9(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var A;return{...H,[z]:(A=X5(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?A:aW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=X5($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:aW(),Z=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(Z!==void 0)W.title=Z;let K=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return K.$schema="http://json-schema.org/draft-07/schema#",K},Yq9=$q9;function Xq9($,Y){var X;let G=(X=void 0)!=null?X:!1;return Dl0(()=>Yq9($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function Gq9($,Y){var X;let G=(X=void 0)!=null?X:!1;return Dl0(()=>wX0($$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function Jq9($){return"_zod"in $}function oW($,Y){if(Jq9($))return Gq9($);else return Xq9($)}function Qq9($){return typeof $==="object"&&$!==null&&sc0 in $&&$[sc0]===!0&&"jsonSchema"in $&&"validate"in $}function Wq9($){return $==null?Dl0({properties:{},additionalProperties:!1}):Qq9($)?$:typeof $==="function"?$():oW($)}function Zq9($){return $==null?void 0:$.replace(/\/$/,"")}function Kq9(){return{headers:{}}}async function Uq9(){if(process.env.VERCEL_OIDC_TOKEN)return process.env.VERCEL_OIDC_TOKEN??"";throw Error("@vercel/oidc is not available in the vendored @internal AI packages. Provide an API key instead.")}var Hq9="vercel.ai.gateway.error",Sc0=Symbol.for(Hq9),EM4,MM4,TJ=class $ extends(MM4=Error,EM4=Sc0,MM4){constructor({message:Y,statusCode:X=500,cause:G}){super(Y);this[EM4]=!0,this.statusCode=X,this.cause=G}static isInstance(Y){return $.hasMarker(Y)}static hasMarker(Y){return typeof Y==="object"&&Y!==null&&Sc0 in Y&&Y[Sc0]===!0}},qI4="GatewayAuthenticationError",zq9=`vercel.ai.gateway.error.${qI4}`,RM4=Symbol.for(zq9),qM4,IM4,II4=class $ extends(IM4=TJ,qM4=RM4,IM4){constructor({message:Y="Authentication failed",statusCode:X=401,cause:G}={}){super({message:Y,statusCode:X,cause:G});this[qM4]=!0,this.name=qI4,this.type="authentication_error"}static isInstance(Y){return TJ.hasMarker(Y)&&RM4 in Y}static createContextualError({apiKeyProvided:Y,oidcTokenProvided:X,message:G="Authentication failed",statusCode:J=401,cause:Q}){let W;if(Y)W=`AI Gateway authentication failed: Invalid API key.

Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys

Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;else if(X)W=`AI Gateway authentication failed: Invalid OIDC token.

Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.

Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;else W=`AI Gateway authentication failed: No authentication provided.

Option 1 - API key:
Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.

Option 2 - OIDC token:
Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:W,statusCode:J,cause:Q})}},PI4="GatewayInvalidRequestError",Vq9=`vercel.ai.gateway.error.${PI4}`,PM4=Symbol.for(Vq9),wM4,_M4,Aq9=class extends(_M4=TJ,wM4=PM4,_M4){constructor({message:$="Invalid request",statusCode:Y=400,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[wM4]=!0,this.name=PI4,this.type="invalid_request_error"}static isInstance($){return TJ.hasMarker($)&&PM4 in $}},wI4="GatewayRateLimitError",Fq9=`vercel.ai.gateway.error.${wI4}`,jM4=Symbol.for(Fq9),TM4,CM4,Dq9=class extends(CM4=TJ,TM4=jM4,CM4){constructor({message:$="Rate limit exceeded",statusCode:Y=429,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[TM4]=!0,this.name=wI4,this.type="rate_limit_exceeded"}static isInstance($){return TJ.hasMarker($)&&jM4 in $}},_I4="GatewayModelNotFoundError",Nq9=`vercel.ai.gateway.error.${_I4}`,SM4=Symbol.for(Nq9),Lq9=kC(()=>oW(U.object({modelId:U.string()}))),kM4,vM4,Bq9=class extends(vM4=TJ,kM4=SM4,vM4){constructor({message:$="Model not found",statusCode:Y=404,modelId:X,cause:G}={}){super({message:$,statusCode:Y,cause:G});this[kM4]=!0,this.name=_I4,this.type="model_not_found",this.modelId=X}static isInstance($){return TJ.hasMarker($)&&SM4 in $}},jI4="GatewayInternalServerError",Oq9=`vercel.ai.gateway.error.${jI4}`,xM4=Symbol.for(Oq9),yM4,bM4,hM4=class extends(bM4=TJ,yM4=xM4,bM4){constructor({message:$="Internal server error",statusCode:Y=500,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[yM4]=!0,this.name=jI4,this.type="internal_server_error"}static isInstance($){return TJ.hasMarker($)&&xM4 in $}},TI4="GatewayResponseError",Eq9=`vercel.ai.gateway.error.${TI4}`,fM4=Symbol.for(Eq9),gM4,mM4,Mq9=class extends(mM4=TJ,gM4=fM4,mM4){constructor({message:$="Invalid response from Gateway",statusCode:Y=502,response:X,validationError:G,cause:J}={}){super({message:$,statusCode:Y,cause:J});this[gM4]=!0,this.name=TI4,this.type="response_error",this.response=X,this.validationError=G}static isInstance($){return TJ.hasMarker($)&&fM4 in $}};async function uM4({response:$,statusCode:Y,defaultMessage:X="Gateway request failed",cause:G,authMethod:J}){let Q=await _C({value:$,schema:Rq9});if(!Q.success)return new Mq9({message:`Invalid error response format: ${X}`,statusCode:Y,response:$,validationError:Q.error,cause:G});let W=Q.value,Z=W.error.type,K=W.error.message;switch(Z){case"authentication_error":return II4.createContextualError({apiKeyProvided:J==="api-key",oidcTokenProvided:J==="oidc",statusCode:Y,cause:G});case"invalid_request_error":return new Aq9({message:K,statusCode:Y,cause:G});case"rate_limit_exceeded":return new Dq9({message:K,statusCode:Y,cause:G});case"model_not_found":{let H=await _C({value:W.error.param,schema:Lq9});return new Bq9({message:K,statusCode:Y,modelId:H.success?H.value.modelId:void 0,cause:G})}case"internal_server_error":return new hM4({message:K,statusCode:Y,cause:G});default:return new hM4({message:K,statusCode:Y,cause:G})}}var Rq9=kC(()=>oW(U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.unknown().nullish(),code:U.union([U.string(),U.number()]).nullish()})})));function qq9($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(Y){return $.responseBody}return{}}var CI4="GatewayTimeoutError",Iq9=`vercel.ai.gateway.error.${CI4}`,pM4=Symbol.for(Iq9),dM4,cM4,lM4=class $ extends(cM4=TJ,dM4=pM4,cM4){constructor({message:Y="Request timed out",statusCode:X=408,cause:G}={}){super({message:Y,statusCode:X,cause:G});this[dM4]=!0,this.name=CI4,this.type="timeout_error"}static isInstance(Y){return TJ.hasMarker(Y)&&pM4 in Y}static createTimeoutError({originalMessage:Y,statusCode:X=408,cause:G}){let J=`Gateway request timed out: ${Y}

    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 $({message:J,statusCode:X,cause:G})}};function iM4($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(Y);return!1}async function A2($,Y){var X;if(TJ.isInstance($))return $;if(iM4($))return lM4.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(_J.isInstance($)){if($.cause&&iM4($.cause))return lM4.createTimeoutError({originalMessage:$.message,cause:$});return await uM4({response:qq9($),statusCode:(X=$.statusCode)!=null?X:500,defaultMessage:"Gateway request failed",cause:$,authMethod:Y})}return await uM4({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:Y})}var SI4="ai-gateway-auth-method";async function UN($){let Y=await _C({value:$[SI4],schema:Pq9});return Y.success?Y.value:void 0}var Pq9=kC(()=>oW(U.union([U.literal("api-key"),U.literal("oidc")]))),wq9=["embedding","image","language"],nM4=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await vX0({url:`${this.config.baseURL}/config`,headers:await V2(this.config.headers()),successfulResponseHandler:rM(_q9),failedResponseHandler:zN({errorSchema:U.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return $}catch($){throw await A2($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:Y}=await vX0({url:`${$.origin}/v1/credits`,headers:await V2(this.config.headers()),successfulResponseHandler:rM(jq9),failedResponseHandler:zN({errorSchema:U.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Y}catch($){throw await A2($)}}},_q9=kC(()=>oW(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:$,output:Y,input_cache_read:X,input_cache_write:G})=>({input:$,output:Y,...X?{cachedInputTokens:X}:{},...G?{cacheCreationInputTokens:G}:{}})).nullish(),specification:U.object({specificationVersion:U.literal("v2"),provider:U.string(),modelId:U.string()}),modelType:U.string().nullish()})).transform(($)=>$.filter((Y)=>Y.modelType==null||wq9.includes(Y.modelType)))}))),jq9=kC(()=>oW(U.object({balance:U.string(),total_used:U.string()}).transform(({balance:$,total_used:Y})=>({balance:$,totalUsed:Y})))),Tq9=class{constructor($){this.config=$}async getSpendReport($){try{let Y=new URL(this.config.baseURL),X=new URLSearchParams;if(X.set("start_date",$.startDate),X.set("end_date",$.endDate),$.groupBy)X.set("group_by",$.groupBy);if($.datePart)X.set("date_part",$.datePart);if($.userId)X.set("user_id",$.userId);if($.model)X.set("model",$.model);if($.provider)X.set("provider",$.provider);if($.credentialType)X.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)X.set("tags",$.tags.join(","));let{value:G}=await vX0({url:`${Y.origin}/v1/report?${X.toString()}`,headers:await V2(this.config.headers()),successfulResponseHandler:rM(Cq9),failedResponseHandler:zN({errorSchema:U.any(),errorToMessage:(J)=>J}),fetch:this.config.fetch});return G}catch(Y){throw await A2(Y)}}},Cq9=vC(()=>oW(U.object({results:U.array(U.object({day:U.string().optional(),hour:U.string().optional(),user:U.string().optional(),model:U.string().optional(),tag:U.string().optional(),provider:U.string().optional(),credential_type:U.enum(["byok","system"]).optional(),total_cost:U.number(),market_cost:U.number().optional(),input_tokens:U.number().optional(),output_tokens:U.number().optional(),cached_input_tokens:U.number().optional(),cache_creation_input_tokens:U.number().optional(),reasoning_tokens:U.number().optional(),request_count:U.number().optional()}).transform(({credential_type:$,total_cost:Y,market_cost:X,input_tokens:G,output_tokens:J,cached_input_tokens:Q,cache_creation_input_tokens:W,reasoning_tokens:Z,request_count:K,...H})=>({...H,...$!==void 0?{credentialType:$}:{},totalCost:Y,...X!==void 0?{marketCost:X}:{},...G!==void 0?{inputTokens:G}:{},...J!==void 0?{outputTokens:J}:{},...Q!==void 0?{cachedInputTokens:Q}:{},...W!==void 0?{cacheCreationInputTokens:W}:{},...Z!==void 0?{reasoningTokens:Z}:{},...K!==void 0?{requestCount:K}:{}})))}))),Sq9=class{constructor($){this.config=$}async getGenerationInfo($){try{let Y=new URL(this.config.baseURL),{value:X}=await vX0({url:`${Y.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await V2(this.config.headers()),successfulResponseHandler:rM(kq9),failedResponseHandler:zN({errorSchema:U.any(),errorToMessage:(G)=>G}),fetch:this.config.fetch});return X}catch(Y){throw await A2(Y)}}},kq9=vC(()=>oW(U.object({data:U.object({id:U.string(),total_cost:U.number(),upstream_inference_cost:U.number(),usage:U.number(),created_at:U.string(),model:U.string(),is_byok:U.boolean(),provider_name:U.string(),streamed:U.boolean(),finish_reason:U.string(),latency:U.number(),generation_time:U.number(),native_tokens_prompt:U.number(),native_tokens_completion:U.number(),native_tokens_reasoning:U.number(),native_tokens_cached:U.number(),native_tokens_cache_creation:U.number(),billable_web_search_calls:U.number()}).transform(({total_cost:$,upstream_inference_cost:Y,created_at:X,is_byok:G,provider_name:J,finish_reason:Q,generation_time:W,native_tokens_prompt:Z,native_tokens_completion:K,native_tokens_reasoning:H,native_tokens_cached:z,native_tokens_cache_creation:V,billable_web_search_calls:A,...F})=>({...F,totalCost:$,upstreamInferenceCost:Y,createdAt:X,isByok:G,providerName:J,finishReason:Q,generationTime:W,promptTokens:Z,completionTokens:K,reasoningTokens:H,cachedTokens:z,cacheCreationTokens:V,billableWebSearchCalls:A}))}).transform(({data:$})=>$))),vq9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:Y,...X}=$;return{args:this.maybeEncodeFileParts(X),warnings:[]}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await V2(this.config.headers());try{let{responseHeaders:Q,value:W,rawValue:Z}=await yX0({url:this.getUrl(),headers:kX0(J,$.headers,this.getModelConfigHeaders(this.modelId,!1),await V2(this.config.o11yHeaders)),body:Y,successfulResponseHandler:rM(U.any()),failedResponseHandler:zN({errorSchema:U.any(),errorToMessage:(K)=>K}),...G&&{abortSignal:G},fetch:this.config.fetch});return{...W,request:{body:Y},response:{headers:Q,body:Z},warnings:X}}catch(Q){throw await A2(Q,await UN(J))}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await V2(this.config.headers());try{let{value:Q,responseHeaders:W}=await yX0({url:this.getUrl(),headers:kX0(J,$.headers,this.getModelConfigHeaders(this.modelId,!0),await V2(this.config.o11yHeaders)),body:Y,successfulResponseHandler:FR9(U.any()),failedResponseHandler:zN({errorSchema:U.any(),errorToMessage:(Z)=>Z}),...G&&{abortSignal:G},fetch:this.config.fetch});return{stream:Q.pipeThrough(new TransformStream({start(Z){if(X.length>0)Z.enqueue({type:"stream-start",warnings:X})},transform(Z,K){if(Z.success){let H=Z.value;if(H.type==="raw"&&!$.includeRawChunks)return;if(H.type==="response-metadata"&&H.timestamp&&typeof H.timestamp==="string")H.timestamp=new Date(H.timestamp);K.enqueue(H)}else K.error(Z.error)}})),request:{body:Y},response:{headers:W}}}catch(Q){throw await A2(Q,await UN(J))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let Y of $.prompt)for(let X of Y.content)if(this.isFilePart(X)){let G=X;if(G.data instanceof Uint8Array){let J=Uint8Array.from(G.data),Q=Buffer.from(J).toString("base64");G.data=new URL(`data:${G.mediaType||"application/octet-stream"};base64,${Q}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,Y){return{"ai-language-model-specification-version":"2","ai-language-model-id":$,"ai-language-model-streaming":String(Y)}}},xq9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;let Q=await V2(this.config.headers());try{let{responseHeaders:W,value:Z,rawValue:K}=await yX0({url:this.getUrl(),headers:kX0(Q,Y!=null?Y:{},this.getModelConfigHeaders(),await V2(this.config.o11yHeaders)),body:{input:$.length===1?$[0]:$,...G?{providerOptions:G}:{}},successfulResponseHandler:rM(yq9),failedResponseHandler:zN({errorSchema:U.any(),errorToMessage:(H)=>H}),...X&&{abortSignal:X},fetch:this.config.fetch});return{embeddings:Z.embeddings,usage:(J=Z.usage)!=null?J:void 0,providerMetadata:Z.providerMetadata,response:{headers:W,body:K}}}catch(W){throw await A2(W,await UN(Q))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"2","ai-model-id":this.modelId}}},yq9=kC(()=>oW(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()}))),bq9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:Z}){var K,H,z,V;let A=await V2(this.config.headers());try{let{responseHeaders:F,value:N}=await yX0({url:this.getUrl(),headers:kX0(A,W!=null?W:{},this.getModelConfigHeaders(),await V2(this.config.o11yHeaders)),body:{prompt:$,n:Y,...X&&{size:X},...G&&{aspectRatio:G},...J&&{seed:J},...Q&&{providerOptions:Q}},successfulResponseHandler:rM(gq9),failedResponseHandler:zN({errorSchema:U.any(),errorToMessage:(D)=>D}),...Z&&{abortSignal:Z},fetch:this.config.fetch});return{images:N.images,warnings:(K=N.warnings)!=null?K:[],providerMetadata:N.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:F},...N.usage!=null&&{usage:{inputTokens:(H=N.usage.inputTokens)!=null?H:void 0,outputTokens:(z=N.usage.outputTokens)!=null?z:void 0,totalTokens:(V=N.usage.totalTokens)!=null?V:void 0}}}}catch(F){throw await A2(F,await UN(A))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"2","ai-model-id":this.modelId}}},hq9=U.object({images:U.array(U.unknown()).optional()}).catchall(U.unknown()),fq9=U.object({inputTokens:U.number().nullish(),outputTokens:U.number().nullish(),totalTokens:U.number().nullish()}),gq9=U.object({images:U.array(U.string()),warnings:U.array(U.object({type:U.literal("other"),message:U.string()})).optional(),providerMetadata:U.record(U.string(),hq9).optional(),usage:fq9.optional()}),mq9=vC(()=>oW(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.")}))),uq9=vC(()=>oW(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()})]))),pq9=BI4({id:"gateway.parallel_search",name:"parallel_search",inputSchema:mq9,outputSchema:uq9}),dq9=($={})=>pq9($),cq9=vC(()=>oW(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.")}))),lq9=vC(()=>oW(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()})]))),iq9=BI4({id:"gateway.perplexity_search",name:"perplexity_search",inputSchema:cq9,outputSchema:lq9}),nq9=($={})=>iq9($),rq9={parallelSearch:dq9,perplexitySearch:nq9};async function aq9(){var $;return($=Kq9().headers)==null?void 0:$["x-vercel-id"]}var sq9="2.0.88",oq9="0.0.1";function tq9($={}){var Y,X;let G=null,J=null,Q=(Y=$.metadataCacheRefreshMillis)!=null?Y:300000,W=0,Z=(X=Zq9($.baseURL))!=null?X:"https://ai-gateway.vercel.sh/v1/ai",K=async()=>{let L=await $I9($);if(L)return nX0({Authorization:`Bearer ${L.token}`,"ai-gateway-protocol-version":oq9,[SI4]:L.authMethod,...$.headers},`ai-sdk/gateway/${sq9}`);throw II4.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401})},H=()=>{let L=Qd({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),B=Qd({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),O=Qd({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),E=Qd({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let M=await aq9();return{...L&&{"ai-o11y-deployment-id":L},...B&&{"ai-o11y-environment":B},...O&&{"ai-o11y-region":O},...M&&{"ai-o11y-request-id":M},...E&&{"ai-o11y-project-id":E}}}},z=(L)=>{return new vq9(L,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},V=async()=>{var L,B,O;let E=(O=(B=(L=$._internal)==null?void 0:L.currentDate)==null?void 0:B.call(L).getTime())!=null?O:Date.now();if(!G||E-W>Q)W=E,G=new nM4({baseURL:Z,headers:K,fetch:$.fetch}).getAvailableModels().then((M)=>{return J=M,M}).catch(async(M)=>{throw await A2(M,await UN(await K()))});return J?Promise.resolve(J):G},A=async()=>{return new nM4({baseURL:Z,headers:K,fetch:$.fetch}).getCredits().catch(async(L)=>{throw await A2(L,await UN(await K()))})},F=async(L)=>{return new Tq9({baseURL:Z,headers:K,fetch:$.fetch}).getSpendReport(L).catch(async(B)=>{throw await A2(B,await UN(await K()))})},N=async(L)=>{return new Sq9({baseURL:Z,headers:K,fetch:$.fetch}).getGenerationInfo(L).catch(async(B)=>{throw await A2(B,await UN(await K()))})},D=function(L){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return z(L)};return D.getAvailableModels=V,D.getCredits=A,D.getSpendReport=F,D.getGenerationInfo=N,D.imageModel=(L)=>{return new bq9(L,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},D.languageModel=z,D.textEmbeddingModel=(L)=>{return new xq9(L,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},D.tools=rq9,D}var eq9=tq9();async function $I9($){let Y=Qd({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(Y)return{token:Y,authMethod:"api-key"};try{return{token:await Uq9(),authMethod:"oidc"}}catch(X){return null}}var YI9=typeof globalThis==="object"?globalThis:global,iM="1.9.0",rM4=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function XI9($){var Y=new Set([$]),X=new Set,G=$.match(rM4);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(K){return K===$};function Q(Z){return X.add(Z),!1}function W(Z){return Y.add(Z),!0}return function(K){if(Y.has(K))return!0;if(X.has(K))return!1;var H=K.match(rM4);if(!H)return Q(K);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(K);if(J.major!==z.major)return Q(K);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(K);return Q(K)}if(J.minor<=z.minor)return W(K);return Q(K)}}var GI9=XI9(iM),JI9=iM.split(".")[0],Nd=Symbol.for("opentelemetry.js.api."+JI9),Ld=YI9;function Nl0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=Ld[Nd]=(J=Ld[Nd])!==null&&J!==void 0?J:{version:iM};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==iM){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+iM);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+iM+"."),!0}function Bd($){var Y,X,G=(Y=Ld[Nd])===null||Y===void 0?void 0:Y.version;if(!G||!GI9(G))return;return(X=Ld[Nd])===null||X===void 0?void 0:X[$]}function Ll0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+iM+".");var X=Ld[Nd];if(X)delete X[$]}var QI9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},WI9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},ZI9=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Yd("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Yd("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Yd("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Yd("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Yd("verbose",this._namespace,Y)},$}();function Yd($,Y,X){var G=Bd("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,WI9([],QI9(X),!1))}var nW;(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(nW||(nW={}));function KI9($,Y){if($<nW.NONE)$=nW.NONE;else if($>nW.ALL)$=nW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",nW.ERROR),warn:X("warn",nW.WARN),info:X("info",nW.INFO),debug:X("debug",nW.DEBUG),verbose:X("verbose",nW.VERBOSE)}}var UI9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},HI9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},zI9="diag",bX0=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var Z=Bd("diag");if(!Z)return;return Z[J].apply(Z,HI9([],UI9(Q),!1))}}var X=this,G=function(J,Q){var W,Z,K;if(Q===void 0)Q={logLevel:nW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=Bd("diag"),V=KI9((Z=Q.logLevel)!==null&&Z!==void 0?Z:nW.INFO,J);if(z&&!Q.suppressOverrideMessage){var A=(K=Error().stack)!==null&&K!==void 0?K:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+A),V.warn("Current logger will overwrite one already registered from "+A)}return Nl0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){Ll0(zI9,X)},X.createComponentLogger=function(J){return new ZI9(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();function VI9($){return Symbol.for($)}var AI9=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),FI9=new AI9,DI9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},NI9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},LI9=function(){function $(){}return $.prototype.active=function(){return FI9},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,NI9([G],DI9(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),BI9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},OI9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},kc0="context",EI9=new LI9,kI4=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return Nl0(kc0,Y,bX0.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,OI9([Y,X,G],BI9(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return Bd(kc0)||EI9},$.prototype.disable=function(){this._getContextManager().disable(),Ll0(kc0,bX0.instance())},$}(),tc0;(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(tc0||(tc0={}));var vI4="0000000000000000",xI4="00000000000000000000000000000000",MI9={traceId:xI4,spanId:vI4,traceFlags:tc0.NONE},Kd=function(){function $(Y){if(Y===void 0)Y=MI9;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),Bl0=VI9("OpenTelemetry Context Key SPAN");function Ol0($){return $.getValue(Bl0)||void 0}function RI9(){return Ol0(kI4.getInstance().active())}function El0($,Y){return $.setValue(Bl0,Y)}function qI9($){return $.deleteValue(Bl0)}function II9($,Y){return El0($,new Kd(Y))}function yI4($){var Y;return(Y=Ol0($))===null||Y===void 0?void 0:Y.spanContext()}var PI9=/^([0-9a-f]{32})$/i,wI9=/^[0-9a-f]{16}$/i;function _I9($){return PI9.test($)&&$!==xI4}function jI9($){return wI9.test($)&&$!==vI4}function bI4($){return _I9($.traceId)&&jI9($.spanId)}function TI9($){return new Kd($)}var vc0=kI4.getInstance(),hI4=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=vc0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new Kd;var Q=G&&yI4(G);if(CI9(Q)&&bI4(Q))return new Kd(Q);else return new Kd},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,Z;if(arguments.length<2)return;else if(arguments.length===2)Z=X;else if(arguments.length===3)Q=X,Z=G;else Q=X,W=G,Z=J;var K=W!==null&&W!==void 0?W:vc0.active(),H=this.startSpan(Y,Q,K),z=El0(K,H);return vc0.with(z,Z,void 0,H)},$}();function CI9($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}var SI9=new hI4,kI9=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return SI9;return this._delegate=Y,this._delegate},$}(),vI9=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new hI4},$}(),xI9=new vI9,aM4=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new kI9(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:xI9},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}(),hX0;(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(hX0||(hX0={}));var xc0="trace",yI9=function(){function $(){this._proxyTracerProvider=new aM4,this.wrapSpanContext=TI9,this.isSpanContextValid=bI4,this.deleteSpan=qI9,this.getSpan=Ol0,this.getActiveSpan=RI9,this.getSpanContext=yI4,this.setSpan=El0,this.setSpanContext=II9}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=Nl0(xc0,this._proxyTracerProvider,bX0.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return Bd(xc0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){Ll0(xc0,bX0.instance()),this._proxyTracerProvider=new aM4},$}(),bI9=yI9.getInstance(),hI9=Object.defineProperty,fI9=($,Y)=>{for(var X in Y)hI9($,X,{get:Y[X],enumerable:!0})},fI4="AI_InvalidArgumentError",gI4=`vercel.ai.error.${fI4}`,gI9=Symbol.for(gI4),mI4,sM4=class extends vX{constructor({parameter:$,value:Y,message:X}){super({name:fI4,message:`Invalid argument for parameter ${$}: ${X}`});this[mI4]=!0,this.parameter=$,this.value=Y}static isInstance($){return vX.hasMarker($,gI4)}};mI4=gI9;var uI4="AI_NoObjectGeneratedError",pI4=`vercel.ai.error.${uI4}`,mI9=Symbol.for(pI4),dI4,oM4=class extends vX{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:uI4,message:$,cause:Y});this[dI4]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return vX.hasMarker($,pI4)}};dI4=mI9;var uI9=class extends vX{constructor($){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${$.version} for provider "${$.provider}" and model "${$.modelId}". AI SDK 5 only supports models that implement specification version "v2".`});this.version=$.version,this.provider=$.provider,this.modelId=$.modelId}},cI4="AI_RetryError",lI4=`vercel.ai.error.${cI4}`,pI9=Symbol.for(lI4),iI4,tM4=class extends vX{constructor({message:$,reason:Y,errors:X}){super({name:cI4,message:$});this[iI4]=!0,this.reason=Y,this.errors=X,this.lastError=X[X.length-1]}static isInstance($){return vX.hasMarker($,lI4)}};iI4=pI9;function dI9($){if(typeof $!=="string"){if($.specificationVersion!=="v2")throw new uI9({version:$.specificationVersion,provider:$.provider,modelId:$.modelId});return $}return cI9().textEmbeddingModel($)}function cI9(){var $;return($=globalThis.AI_SDK_DEFAULT_PROVIDER)!=null?$:eq9}var lI9="5.0.186",nI4=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),Od=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),Od),U.array(Od)])),DH=U.record(U.string(),U.record(U.string(),Od)),rI4=U.object({type:U.literal("text"),text:U.string(),providerOptions:DH.optional()}),iI9=U.object({type:U.literal("image"),image:U.union([nI4,U.instanceof(URL)]),mediaType:U.string().optional(),providerOptions:DH.optional()}),aI4=U.object({type:U.literal("file"),data:U.union([nI4,U.instanceof(URL)]),filename:U.string().optional(),mediaType:U.string(),providerOptions:DH.optional()}),nI9=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:DH.optional()}),rI9=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerOptions:DH.optional(),providerExecuted:U.boolean().optional()}),aI9=U.discriminatedUnion("type",[U.object({type:U.literal("text"),value:U.string()}),U.object({type:U.literal("json"),value:Od}),U.object({type:U.literal("error-text"),value:U.string()}),U.object({type:U.literal("error-json"),value:Od}),U.object({type:U.literal("content"),value:U.array(U.union([U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("media"),data:U.string(),mediaType:U.string()})]))})]),sI4=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),output:aI9,providerOptions:DH.optional()}),sI9=U.object({role:U.literal("system"),content:U.string(),providerOptions:DH.optional()}),oI9=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([rI4,iI9,aI4]))]),providerOptions:DH.optional()}),tI9=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([rI4,aI4,nI9,rI9,sI4]))]),providerOptions:DH.optional()}),eI9=U.object({role:U.literal("tool"),content:U.array(sI4),providerOptions:DH.optional()});U.union([sI9,oI9,tI9,eI9]);function yc0({operationId:$,telemetry:Y}){return{"operation.name":`${$}${(Y==null?void 0:Y.functionId)!=null?` ${Y.functionId}`:""}`,"resource.name":Y==null?void 0:Y.functionId,"ai.operationId":$,"ai.telemetry.functionId":Y==null?void 0:Y.functionId}}function $P9({model:$,settings:Y,telemetry:X,headers:G}){var J;return{"ai.model.provider":$.provider,"ai.model.id":$.modelId,...Object.entries(Y).reduce((Q,[W,Z])=>{return Q[`ai.settings.${W}`]=Z,Q},{}),...Object.entries((J=X==null?void 0:X.metadata)!=null?J:{}).reduce((Q,[W,Z])=>{return Q[`ai.telemetry.metadata.${W}`]=Z,Q},{}),...Object.entries(G!=null?G:{}).reduce((Q,[W,Z])=>{if(Z!==void 0)Q[`ai.request.headers.${W}`]=Z;return Q},{})}}var YP9={startSpan(){return qX0},startActiveSpan($,Y,X,G){if(typeof Y==="function")return Y(qX0);if(typeof X==="function")return X(qX0);if(typeof G==="function")return G(qX0)}},qX0={spanContext(){return XP9},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}},XP9={traceId:"",spanId:"",traceFlags:0};function GP9({isEnabled:$=!1,tracer:Y}={}){if(!$)return YP9;if(Y)return Y;return bI9.getTracer("ai")}function bc0({name:$,tracer:Y,attributes:X,fn:G,endWhenDone:J=!0}){return Y.startActiveSpan($,{attributes:X},async(Q)=>{try{let W=await G(Q);if(J)Q.end();return W}catch(W){try{JP9(Q,W)}finally{Q.end()}throw W}})}function JP9($,Y){if(Y instanceof Error)$.recordException({name:Y.name,message:Y.message,stack:Y.stack}),$.setStatus({code:hX0.ERROR,message:Y.message});else $.setStatus({code:hX0.ERROR})}function uM({telemetry:$,attributes:Y}){if(($==null?void 0:$.isEnabled)!==!0)return{};return Object.entries(Y).reduce((X,[G,J])=>{if(J==null)return X;if(typeof J==="object"&&"input"in J&&typeof J.input==="function"){if(($==null?void 0:$.recordInputs)===!1)return X;let Q=J.input();return Q==null?X:{...X,[G]:Q}}if(typeof J==="object"&&"output"in J&&typeof J.output==="function"){if(($==null?void 0:$.recordOutputs)===!1)return X;let Q=J.output();return Q==null?X:{...X,[G]:Q}}return{...X,[G]:J}},{})}function QP9({error:$,exponentialBackoffDelay:Y}){let X=$.responseHeaders;if(!X)return Y;let G,J=X["retry-after-ms"];if(J){let W=parseFloat(J);if(!Number.isNaN(W))G=W}let Q=X["retry-after"];if(Q&&G===void 0){let W=parseFloat(Q);if(!Number.isNaN(W))G=W*1000;else G=Date.parse(Q)-Date.now()}if(G!=null&&!Number.isNaN(G)&&0<=G&&(G<60000||G<Y))return G;return Y}var WP9=({maxRetries:$=2,initialDelayInMs:Y=2000,backoffFactor:X=2,abortSignal:G}={})=>async(J)=>oI4(J,{maxRetries:$,delayInMs:Y,backoffFactor:X,abortSignal:G});async function oI4($,{maxRetries:Y,delayInMs:X,backoffFactor:G,abortSignal:J},Q=[]){try{return await $()}catch(W){if(wC(W))throw W;if(Y===0)throw W;let Z=oM9(W),K=[...Q,W],H=K.length;if(H>Y)throw new tM4({message:`Failed after ${H} attempts. Last error: ${Z}`,reason:"maxRetriesExceeded",errors:K});if(W instanceof Error&&_J.isInstance(W)&&W.isRetryable===!0&&H<=Y)return await sM9(QP9({error:W,exponentialBackoffDelay:X}),{abortSignal:J}),oI4($,{maxRetries:Y,delayInMs:G*X,backoffFactor:G,abortSignal:J},K);if(H===1)throw W;throw new tM4({message:`Failed after ${H} attempts with non-retryable error: '${Z}'`,reason:"errorNotRetryable",errors:K})}}function ZP9({maxRetries:$,abortSignal:Y}){if($!=null){if(!Number.isInteger($))throw new sM4({parameter:"maxRetries",value:$,message:"maxRetries must be an integer"});if($<0)throw new sM4({parameter:"maxRetries",value:$,message:"maxRetries must be >= 0"})}let X=$!=null?$:2;return{maxRetries:X,retry:WP9({maxRetries:X,abortSignal:Y})}}Id({prefix:"aitxt",size:24});function KP9($){let Y=["ROOT"],X=-1,G=null;function J(K,H,z){switch(K){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let K=0;K<$.length;K++){let H=$[K];switch(Y[Y.length-1]){case"ROOT":J(H,K,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=K,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,K,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,K);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=K;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=K}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=K,Y.pop();break}default:{X=K,J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=K,Y.pop();break}default:{X=K;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=K;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=K;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,K+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K)}else X=K;break}}}let Z=$.slice(0,X+1);for(let K=Y.length-1;K>=0;K--)switch(Y[K]){case"INSIDE_STRING":{Z+='"';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":{Z+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{Z+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))Z+="true".slice(z.length);else if("false".startsWith(z))Z+="false".slice(z.length);else if("null".startsWith(z))Z+="null".slice(z.length)}}return Z}async function UP9($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=await Dd({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=await Dd({text:KP9($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}Id({prefix:"aitxt",size:24});function eM4($,Y){if(Y<=0)throw Error("chunkSize must be greater than 0");let X=[];for(let G=0;G<$.length;G+=Y)X.push($.slice(G,G+Y));return X}async function HP9({model:$,values:Y,maxParallelCalls:X=1/0,maxRetries:G,abortSignal:J,headers:Q,providerOptions:W,experimental_telemetry:Z}){let K=dI9($),{maxRetries:H,retry:z}=ZP9({maxRetries:G,abortSignal:J}),V=nX0(Q!=null?Q:{},`ai/${lI9}`),A=$P9({model:K,telemetry:Z,headers:V,settings:{maxRetries:H}}),F=GP9(Z);return bc0({name:"ai.embedMany",attributes:uM({telemetry:Z,attributes:{...yc0({operationId:"ai.embedMany",telemetry:Z}),...A,"ai.values":{input:()=>Y.map((N)=>JSON.stringify(N))}}}),tracer:F,fn:async(N)=>{var D;let[L,B]=await Promise.all([K.maxEmbeddingsPerCall,K.supportsParallelCalls]);if(L==null||L===1/0){let{embeddings:I,usage:P,response:_,providerMetadata:C}=await z(()=>{return bc0({name:"ai.embedMany.doEmbed",attributes:uM({telemetry:Z,attributes:{...yc0({operationId:"ai.embedMany.doEmbed",telemetry:Z}),...A,"ai.values":{input:()=>Y.map((k)=>JSON.stringify(k))}}}),tracer:F,fn:async(k)=>{var S;let T=await K.doEmbed({values:Y,abortSignal:J,headers:V,providerOptions:W}),v=T.embeddings,x=(S=T.usage)!=null?S:{tokens:NaN};return k.setAttributes(uM({telemetry:Z,attributes:{"ai.embeddings":{output:()=>v.map((y)=>JSON.stringify(y))},"ai.usage.tokens":x.tokens}})),{embeddings:v,usage:x,providerMetadata:T.providerMetadata,response:T.response}}})});return N.setAttributes(uM({telemetry:Z,attributes:{"ai.embeddings":{output:()=>I.map((k)=>JSON.stringify(k))},"ai.usage.tokens":P.tokens}})),new $R4({values:Y,embeddings:I,usage:P,providerMetadata:C,responses:[_]})}let O=eM4(Y,L),E=[],M=[],R=0,q,w=eM4(O,B?X:1);for(let I of w){let P=await Promise.all(I.map((_)=>{return z(()=>{return bc0({name:"ai.embedMany.doEmbed",attributes:uM({telemetry:Z,attributes:{...yc0({operationId:"ai.embedMany.doEmbed",telemetry:Z}),...A,"ai.values":{input:()=>_.map((C)=>JSON.stringify(C))}}}),tracer:F,fn:async(C)=>{var k;let S=await K.doEmbed({values:_,abortSignal:J,headers:V,providerOptions:W}),T=S.embeddings,v=(k=S.usage)!=null?k:{tokens:NaN};return C.setAttributes(uM({telemetry:Z,attributes:{"ai.embeddings":{output:()=>T.map((x)=>JSON.stringify(x))},"ai.usage.tokens":v.tokens}})),{embeddings:T,usage:v,providerMetadata:S.providerMetadata,response:S.response}}})})}));for(let _ of P)if(E.push(..._.embeddings),M.push(_.response),R+=_.usage.tokens,_.providerMetadata)if(!q)q={..._.providerMetadata};else for(let[C,k]of Object.entries(_.providerMetadata))q[C]={...(D=q[C])!=null?D:{},...k}}return N.setAttributes(uM({telemetry:Z,attributes:{"ai.embeddings":{output:()=>E.map((I)=>JSON.stringify(I))},"ai.usage.tokens":R}})),new $R4({values:Y,embeddings:E,usage:{tokens:R},providerMetadata:q,responses:M})}})}var $R4=class{constructor($){this.values=$.values,this.embeddings=$.embeddings,this.usage=$.usage,this.providerMetadata=$.providerMetadata,this.responses=$.responses}};Id({prefix:"aiobj",size:24});Id({prefix:"aiobj",size:24});var zP9={};fI9(zP9,{object:()=>AP9,text:()=>VP9});var VP9=()=>({type:"text",responseFormat:{type:"text"},async parsePartial({text:$}){return{partial:$}},async parseOutput({text:$}){return $}}),AP9=({schema:$})=>{let Y=Wq9($);return{type:"object",responseFormat:{type:"json",schema:Y.jsonSchema},async parsePartial({text:X}){let G=await UP9(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:G.value};default:{let J=G.state;throw Error(`Unsupported parse state: ${J}`)}}},async parseOutput({text:X},G){let J=await Dd({text:X});if(!J.success)throw new oM4({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});let Q=await _C({value:J.value,schema:Y});if(!Q.success)throw new oM4({message:"No object generated: response did not match schema.",cause:Q.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return Q.value}}},tI4="vercel.ai.error",FP9=Symbol.for(tI4),YR4,XR4,xX=class $ extends(XR4=Error,YR4=FP9,XR4){constructor({name:Y,message:X,cause:G}){super(X);this[YR4]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,tI4)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},eI4="AI_APICallError",$P4=`vercel.ai.error.${eI4}`,DP9=Symbol.for($P4),GR4,JR4,s$=class extends(JR4=xX,GR4=DP9,JR4){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:Z=G!=null&&(G===408||G===409||G===429||G>=500),data:K}){super({name:eI4,message:$,cause:W});this[GR4]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=Z,this.data=K}static isInstance($){return xX.hasMarker($,$P4)}},YP4="AI_EmptyResponseBodyError",XP4=`vercel.ai.error.${YP4}`,NP9=Symbol.for(XP4),QR4,WR4,LP9=class extends(WR4=xX,QR4=NP9,WR4){constructor({message:$="Empty response body"}={}){super({name:YP4,message:$});this[QR4]=!0}static isInstance($){return xX.hasMarker($,XP4)}};function GP4($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}var JP4="AI_InvalidArgumentError",QP4=`vercel.ai.error.${JP4}`,BP9=Symbol.for(QP4),ZR4,KR4,OP9=class extends(KR4=xX,ZR4=BP9,KR4){constructor({message:$,cause:Y,argument:X}){super({name:JP4,message:$,cause:Y});this[ZR4]=!0,this.argument=X}static isInstance($){return xX.hasMarker($,QP4)}},WP4="AI_JSONParseError",ZP4=`vercel.ai.error.${WP4}`,EP9=Symbol.for(ZP4),UR4,HR4,fX0=class extends(HR4=xX,UR4=EP9,HR4){constructor({text:$,cause:Y}){super({name:WP4,message:`JSON parsing failed: Text: ${$}.
Error message: ${GP4(Y)}`,cause:Y});this[UR4]=!0,this.text=$}static isInstance($){return xX.hasMarker($,ZP4)}},KP4="AI_TypeValidationError",UP4=`vercel.ai.error.${KP4}`,MP9=Symbol.for(UP4),zR4,VR4,aM=class $ extends(VR4=xX,zR4=MP9,VR4){constructor({value:Y,cause:X,context:G}){let J="Type validation failed";if(G==null?void 0:G.field)J+=` for ${G.field}`;if((G==null?void 0:G.entityName)||(G==null?void 0:G.entityId)){J+=" (";let Q=[];if(G.entityName)Q.push(G.entityName);if(G.entityId)Q.push(`id: "${G.entityId}"`);J+=Q.join(", "),J+=")"}super({name:KP4,message:`${J}: Value: ${JSON.stringify(Y)}.
Error message: ${GP4(X)}`,cause:X});this[zR4]=!0,this.value=Y,this.context=G}static isInstance(Y){return xX.hasMarker(Y,UP4)}static wrap({value:Y,cause:X,context:G}){var J,Q,W;if($.isInstance(X)&&X.value===Y&&((J=X.context)==null?void 0:J.field)===(G==null?void 0:G.field)&&((Q=X.context)==null?void 0:Q.entityName)===(G==null?void 0:G.entityName)&&((W=X.context)==null?void 0:W.entityId)===(G==null?void 0:G.entityId))return X;return new $({value:Y,cause:X,context:G})}},AR4=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}},FR4=10,RP9=13,pM=32;function hc0($){}function qP9($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=hc0,onError:X=hc0,onRetry:G=hc0,onComment:J}=$,Q=[],W=!0,Z,K="",H=0,z;function V(B){if(W&&(W=!1,B.charCodeAt(0)===239&&B.charCodeAt(1)===187&&B.charCodeAt(2)===191&&(B=B.slice(3))),Q.length===0){let M=A(B);M!==""&&Q.push(M);return}if(B.indexOf(`
`)===-1&&B.indexOf("\r")===-1){Q.push(B);return}Q.push(B);let O=Q.join("");Q.length=0;let E=A(O);E!==""&&Q.push(E)}function A(B){let O=0;if(B.indexOf("\r")===-1){let E=B.indexOf(`
`,O);for(;E!==-1;){if(O===E){H>0&&Y({id:Z,event:z,data:K}),Z=void 0,K="",H=0,z=void 0,O=E+1,E=B.indexOf(`
`,O);continue}let M=B.charCodeAt(O);if(DR4(B,O,M)){let R=B.charCodeAt(O+5)===pM?O+6:O+5,q=B.slice(R,E);if(H===0&&B.charCodeAt(E+1)===FR4){Y({id:Z,event:z,data:q}),Z=void 0,K="",z=void 0,O=E+2,E=B.indexOf(`
`,O);continue}K=H===0?q:`${K}
${q}`,H++}else NR4(B,O,M)?z=B.slice(B.charCodeAt(O+6)===pM?O+7:O+6,E)||void 0:F(B,O,E);O=E+1,E=B.indexOf(`
`,O)}return B.slice(O)}for(;O<B.length;){let E=B.indexOf("\r",O),M=B.indexOf(`
`,O),R=-1;if(E!==-1&&M!==-1?R=E<M?E:M:E!==-1?E===B.length-1?R=-1:R=E:M!==-1&&(R=M),R===-1)break;F(B,O,R),O=R+1,B.charCodeAt(O-1)===RP9&&B.charCodeAt(O)===FR4&&O++}return B.slice(O)}function F(B,O,E){if(O===E){D();return}let M=B.charCodeAt(O);if(DR4(B,O,M)){let _=B.charCodeAt(O+5)===pM?O+6:O+5,C=B.slice(_,E);K=H===0?C:`${K}
${C}`,H++;return}if(NR4(B,O,M)){z=B.slice(B.charCodeAt(O+6)===pM?O+7:O+6,E)||void 0;return}if(M===105&&B.charCodeAt(O+1)===100&&B.charCodeAt(O+2)===58){let _=B.slice(B.charCodeAt(O+3)===pM?O+4:O+3,E);Z=_.includes("\x00")?void 0:_;return}if(M===58){if(J){let _=B.slice(O,E);J(_.slice(B.charCodeAt(O+1)===pM?2:1))}return}let R=B.slice(O,E),q=R.indexOf(":");if(q===-1){N(R,"",R);return}let w=R.slice(0,q),I=R.charCodeAt(q+1)===pM?2:1,P=R.slice(q+I);N(w,P,R)}function N(B,O,E){switch(B){case"event":z=O||void 0;break;case"data":K=H===0?O:`${K}
${O}`,H++;break;case"id":Z=O.includes("\x00")?void 0:O;break;case"retry":/^\d+$/.test(O)?G(parseInt(O,10)):X(new AR4(`Invalid \`retry\` value: "${O}"`,{type:"invalid-retry",value:O,line:E}));break;default:X(new AR4(`Unknown field "${B.length>20?`${B.slice(0,20)}\u2026`:B}"`,{type:"unknown-field",field:B,value:O,line:E}));break}}function D(){H>0&&Y({id:Z,event:z,data:K}),Z=void 0,K="",H=0,z=void 0}function L(B={}){if(B.consume&&Q.length>0){let O=Q.join("");F(O,0,O.length)}W=!0,Z=void 0,K="",H=0,z=void 0,Q.length=0}return{feed:V,reset:L}}function DR4($,Y,X){return X===100&&$.charCodeAt(Y+1)===97&&$.charCodeAt(Y+2)===116&&$.charCodeAt(Y+3)===97&&$.charCodeAt(Y+4)===58}function NR4($,Y,X){return X===101&&$.charCodeAt(Y+1)===118&&$.charCodeAt(Y+2)===101&&$.charCodeAt(Y+3)===110&&$.charCodeAt(Y+4)===116&&$.charCodeAt(Y+5)===58}var IP9=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=qP9({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};function jC(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}async function PP9($,Y){if($==null)return Promise.resolve();let X=Y==null?void 0:Y.abortSignal;return new Promise((G,J)=>{if(X==null?void 0:X.aborted){J(LR4());return}let Q=setTimeout(()=>{W(),G()},$),W=()=>{clearTimeout(Q),X==null||X.removeEventListener("abort",Z)},Z=()=>{W(),J(LR4())};X==null||X.addEventListener("abort",Z)})}function LR4(){return new DOMException("Delay was aborted","AbortError")}function Pd($){return Object.fromEntries([...$.headers])}var{btoa:wP9}=globalThis;function HP4($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return wP9(Y)}var wd=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let Z=0;Z<Y;Z++)W[Z]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new OP9({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`};wd();function _P9($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function TC($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}var jP9=["fetch failed","failed to fetch"],TP9=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function CP9($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string"&&TP9.includes(Y))return!0;return!1}function zP4({error:$,url:Y,requestBodyValues:X}){if(TC($))return $;if($ instanceof TypeError&&jP9.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new s$({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}if(CP9($))return new s$({message:`Cannot connect to API: ${$.message}`,cause:$,url:Y,requestBodyValues:X,isRetryable:!0});return $}function VP4($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function SP9($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function rX0($,...Y){let X=new Headers(SP9($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}var AP4="4.0.27",kP9=()=>globalThis.fetch,gX0=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=kP9()})=>{try{let W=await Q($,{method:"GET",headers:rX0(Y,`ai-sdk/provider-utils/${AP4}`,VP4()),signal:J}),Z=Pd(W);if(!W.ok){let K;try{K=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(TC(H)||s$.isInstance(H))throw H;throw new s$({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}throw K.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(K){if(K instanceof Error){if(TC(K)||s$.isInstance(K))throw K}throw new s$({message:"Failed to process successful response",cause:K,statusCode:W.status,url:$,responseHeaders:Z,requestBodyValues:{}})}}catch(W){throw zP4({error:W,url:$,requestBodyValues:{}})}};function Wd({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}var vP9=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,xP9=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function BR4($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(vP9.test($)===!1&&xP9.test($)===!1)return Y;return yP9(Y)}function yP9($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function FP4($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return BR4($)}try{return BR4($)}finally{Error.stackTraceLimit=Y}}function Ml0($){if($.type==="object"||Array.isArray($.type)&&$.type.includes("object")){$.additionalProperties=!1;let{properties:X}=$;if(X!=null)for(let G of Object.keys(X))X[G]=dM(X[G])}if($.items!=null)$.items=Array.isArray($.items)?$.items.map(dM):dM($.items);if($.anyOf!=null)$.anyOf=$.anyOf.map(dM);if($.allOf!=null)$.allOf=$.allOf.map(dM);if($.oneOf!=null)$.oneOf=$.oneOf.map(dM);let{definitions:Y}=$;if(Y!=null)for(let X of Object.keys(Y))Y[X]=dM(Y[X]);return $}function dM($){if(typeof $==="boolean")return $;return Ml0($)}var bP9=Symbol("Let zodToJsonSchema decide on which parser to use"),OR4={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"},hP9=($)=>typeof $==="string"?{...OR4,name:$}:{...OR4,...$};function sW(){return{}}function fP9($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=G5($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function gP9($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function mP9(){return{type:"boolean"}}function DP4($,Y){return G5($.type._def,Y)}var uP9=($,Y)=>{return G5($.innerType._def,Y)};function NP4($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>NP4($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return pP9($)}}var pP9=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y};function dP9($,Y){return{...G5($.innerType._def,Y),default:$.defaultValue()}}function cP9($,Y){return Y.effectStrategy==="input"?G5($.schema._def,Y):sW()}function lP9($){return{type:"string",enum:Array.from($.values)}}var iP9=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};function nP9($,Y){let X=[G5($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G5($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(iP9(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...Z}=J;Q=Z}G.push(Q)}}),G.length?{allOf:G}:void 0}function rP9($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}var fc0=void 0,R3={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:()=>{if(fc0===void 0)fc0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return fc0},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 LP4($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":q3(X,"email",G.message,Y);break;case"format:idn-email":q3(X,"idn-email",G.message,Y);break;case"pattern:zod":wJ(X,R3.email,G.message,Y);break}break;case"url":q3(X,"uri",G.message,Y);break;case"uuid":q3(X,"uuid",G.message,Y);break;case"regex":wJ(X,G.regex,G.message,Y);break;case"cuid":wJ(X,R3.cuid,G.message,Y);break;case"cuid2":wJ(X,R3.cuid2,G.message,Y);break;case"startsWith":wJ(X,RegExp(`^${gc0(G.value,Y)}`),G.message,Y);break;case"endsWith":wJ(X,RegExp(`${gc0(G.value,Y)}$`),G.message,Y);break;case"datetime":q3(X,"date-time",G.message,Y);break;case"date":q3(X,"date",G.message,Y);break;case"time":q3(X,"time",G.message,Y);break;case"duration":q3(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{wJ(X,RegExp(gc0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")q3(X,"ipv4",G.message,Y);if(G.version!=="v4")q3(X,"ipv6",G.message,Y);break}case"base64url":wJ(X,R3.base64url,G.message,Y);break;case"jwt":wJ(X,R3.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")wJ(X,R3.ipv4Cidr,G.message,Y);if(G.version!=="v4")wJ(X,R3.ipv6Cidr,G.message,Y);break}case"emoji":wJ(X,R3.emoji(),G.message,Y);break;case"ulid":{wJ(X,R3.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{q3(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{wJ(X,R3.base64,G.message,Y);break}}break}case"nanoid":wJ(X,R3.nanoid,G.message,Y)}return X}function gc0($,Y){return Y.patternStrategy==="escape"?sP9($):$}var aP9=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function sP9($){let Y="";for(let X=0;X<$.length;X++){if(!aP9.has($[X]))Y+="\\";Y+=$[X]}return Y}function q3($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function wJ($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:ER4(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=ER4(Y,G)}function ER4($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,Z=!1,K=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(Z){if(J[H].match(/[a-z]/)){if(K)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),K=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],K=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=Z?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(Z&&J[H]==="]")Z=!1;else if(!Z&&J[H]==="[")Z=!0}return Q}function BP4($,Y){var X,G,J,Q,W,Z;let K={type:"object",additionalProperties:(X=G5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=LP4($.keyType._def,Y);return{...K,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...K,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((Z=$.keyType._def.type._def.checks)==null?void 0:Z.length)){let{type:H,...z}=DP4($.keyType._def,Y);return{...K,propertyNames:z}}return K}function oP9($,Y){if(Y.mapStrategy==="record")return BP4($,Y);let X=G5($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||sW(),G=G5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||sW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function tP9($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function eP9(){return{not:sW()}}function $w9(){return{type:"null"}}var ec0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Yw9($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in ec0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=ec0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,Z)=>Z.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return Xw9($,Y)}var Xw9=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>G5(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};function Gw9($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[ec0[$.innerType._def.typeName],"null"]};let X=G5($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function Jw9($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function Qw9($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let Z=J[W];if(Z===void 0||Z._def===void 0)continue;let K=Zw9(Z),H=G5(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!K)G.push(W)}if(G.length)X.required=G;let Q=Ww9($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function Ww9($,Y){if($.catchall._def.typeName!=="ZodNever")return G5($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function Zw9($){try{return $.isOptional()}catch(Y){return!0}}var Kw9=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return G5($.innerType._def,Y);let G=G5($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:sW()},G]}:sW()},Uw9=($,Y)=>{if(Y.pipeStrategy==="input")return G5($.in._def,Y);else if(Y.pipeStrategy==="output")return G5($.out._def,Y);let X=G5($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=G5($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};function Hw9($,Y){return G5($.type._def,Y)}function zw9($,Y){let G={type:"array",uniqueItems:!0,items:G5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function Vw9($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>G5(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:G5($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>G5(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function Aw9(){return{not:sW()}}function Fw9(){return sW()}var Dw9=($,Y)=>{return G5($.innerType._def,Y)},Nw9=($,Y,X)=>{switch(Y){case U0.ZodString:return LP4($,X);case U0.ZodNumber:return Jw9($);case U0.ZodObject:return Qw9($,X);case U0.ZodBigInt:return gP9($);case U0.ZodBoolean:return mP9();case U0.ZodDate:return NP4($,X);case U0.ZodUndefined:return Aw9();case U0.ZodNull:return $w9();case U0.ZodArray:return fP9($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return Yw9($,X);case U0.ZodIntersection:return nP9($,X);case U0.ZodTuple:return Vw9($,X);case U0.ZodRecord:return BP4($,X);case U0.ZodLiteral:return rP9($);case U0.ZodEnum:return lP9($);case U0.ZodNativeEnum:return tP9($);case U0.ZodNullable:return Gw9($,X);case U0.ZodOptional:return Kw9($,X);case U0.ZodMap:return oP9($,X);case U0.ZodSet:return zw9($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return Hw9($,X);case U0.ZodNaN:case U0.ZodNever:return eP9();case U0.ZodEffects:return cP9($,X);case U0.ZodAny:return sW();case U0.ZodUnknown:return Fw9();case U0.ZodDefault:return dP9($,X);case U0.ZodBranded:return DP4($,X);case U0.ZodReadonly:return Dw9($,X);case U0.ZodCatch:return uP9($,X);case U0.ZodPipeline:return Uw9($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},Lw9=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")};function G5($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let K=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(K!==bP9)return K}if(J&&!X){let K=Bw9(J,Y);if(K!==void 0)return K}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=Nw9($,$.typeName,Y),Z=typeof W==="function"?G5(W(),Y):W;if(Z)Ow9($,Y,Z);if(Y.postProcess){let K=Y.postProcess(Z,$,Y);return Q.jsonSchema=Z,K}return Q.jsonSchema=Z,Z}var Bw9=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:Lw9(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),sW();return Y.$refStrategy==="seen"?sW():void 0}}},Ow9=($,Y,X)=>{if($.description)X.description=$.description;return X},Ew9=($)=>{let Y=hP9($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},Mw9=($,Y)=>{var X;let G=Ew9(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var A;return{...H,[z]:(A=G5(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?A:sW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=G5($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:sW(),Z=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(Z!==void 0)W.title=Z;let K=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return K.$schema="http://json-schema.org/draft-07/schema#",K},$l0=Symbol.for("vercel.ai.schema");function tW($){let Y;return()=>{if(Y==null)Y=$();return Y}}function aX0($,{validate:Y}={}){return{[$l0]:!0,_type:void 0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function Rw9($){return typeof $==="object"&&$!==null&&$l0 in $&&$[$l0]===!0&&"jsonSchema"in $&&"validate"in $}function Rl0($){return $==null?aX0({properties:{},additionalProperties:!1}):Rw9($)?$:("~standard"in $)?$["~standard"].vendor==="zod"?mQ($):qw9($):$()}function qw9($){return aX0(()=>Ml0($["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(Y)=>{let X=await $["~standard"].validate(Y);return"value"in X?{success:!0,value:X.value}:{success:!1,error:new aM({value:Y,cause:X.issues})}}})}function Iw9($,Y){var X;let G=(X=void 0)!=null?X:!1;return aX0(()=>Mw9($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function Pw9($,Y){var X;let G=(X=void 0)!=null?X:!1;return aX0(()=>Ml0($$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function ww9($){return"_zod"in $}function mQ($,Y){if(ww9($))return Pw9($);else return Iw9($)}async function _w9({value:$,schema:Y,context:X}){let G=await VN({value:$,schema:Y,context:X});if(!G.success)throw aM.wrap({value:$,cause:G.error,context:X});return G.value}async function VN({value:$,schema:Y,context:X}){let G=Rl0(Y);try{if(G.validate==null)return{success:!0,value:$,rawValue:$};let J=await G.validate($);if(J.success)return{success:!0,value:J.value,rawValue:$};return{success:!1,error:aM.wrap({value:$,cause:J.error,context:X}),rawValue:$}}catch(J){return{success:!1,error:aM.wrap({value:$,cause:J,context:X}),rawValue:$}}}async function jw9({text:$,schema:Y}){try{let X=FP4($);if(Y==null)return X;return _w9({value:X,schema:Y})}catch(X){if(fX0.isInstance(X)||aM.isInstance(X))throw X;throw new fX0({text:$,cause:X})}}async function AN({text:$,schema:Y}){try{let X=FP4($);if(Y==null)return{success:!0,value:X,rawValue:X};return await VN({value:X,schema:Y})}catch(X){return{success:!1,error:fX0.isInstance(X)?X:new fX0({text:$,cause:X}),rawValue:void 0}}}function OP4({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new IP9).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await AN({text:X,schema:Y}))}}))}var Tw9=()=>globalThis.fetch,CC=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>Cw9({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),Cw9=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=Tw9()})=>{try{let Z=await W($,{method:"POST",headers:rX0(Y,`ai-sdk/provider-utils/${AP4}`,VP4()),body:X.content,signal:Q}),K=Pd(Z);if(!Z.ok){let H;try{H=await J({response:Z,url:$,requestBodyValues:X.values})}catch(z){if(TC(z)||s$.isInstance(z))throw z;throw new s$({message:"Failed to process error response",cause:z,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}throw H.value}try{return await G({response:Z,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(TC(H)||s$.isInstance(H))throw H}throw new s$({message:"Failed to process successful response",cause:H,statusCode:Z.status,url:$,responseHeaders:K,requestBodyValues:X.values})}}catch(Z){throw zP4({error:Z,url:$,requestBodyValues:X.values})}};function Sw9($){return $}function EP4({id:$,inputSchema:Y,outputSchema:X,supportsDeferredResults:G}){return({execute:J,needsApproval:Q,toModelOutput:W,onInputStart:Z,onInputDelta:K,onInputAvailable:H,...z})=>Sw9({type:"provider",id:$,args:z,inputSchema:Y,outputSchema:X,execute:J,needsApproval:Q,toModelOutput:W,onInputStart:Z,onInputDelta:K,onInputAvailable:H,supportsDeferredResults:G})}async function $X($){if(typeof $==="function")$=$();return Promise.resolve($)}var FH=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),Z=Pd(G);if(W.trim()==="")return{responseHeaders:Z,value:new s$({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let K=await jw9({text:W,schema:$});return{responseHeaders:Z,value:new s$({message:Y(K),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,data:K,isRetryable:X==null?void 0:X(G,K)})}}catch(K){return{responseHeaders:Z,value:new s$({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:Z,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},kw9=($)=>async({response:Y})=>{let X=Pd(Y);if(Y.body==null)throw new LP9({});return{responseHeaders:X,value:OP4({stream:Y.body,schema:$})}},FN=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await AN({text:J,schema:$}),W=Pd(Y);if(!Q.success)throw new s$({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}};function vw9($){return $==null?void 0:$.replace(/\/$/,"")}function xw9(){return{headers:{}}}async function yw9(){if(process.env.VERCEL_OIDC_TOKEN)return process.env.VERCEL_OIDC_TOKEN??"";throw Error("@vercel/oidc is not available in the vendored @internal AI packages. Provide an API key instead.")}var bw9="vercel.ai.gateway.error",mc0=Symbol.for(bw9),MR4,RR4,CJ=class $ extends(RR4=Error,MR4=mc0,RR4){constructor({message:Y,statusCode:X=500,cause:G,generationId:J}){super(J?`${Y} [${J}]`:Y);this[MR4]=!0,this.statusCode=X,this.cause=G,this.generationId=J}static isInstance(Y){return $.hasMarker(Y)}static hasMarker(Y){return typeof Y==="object"&&Y!==null&&mc0 in Y&&Y[mc0]===!0}},MP4="GatewayAuthenticationError",hw9=`vercel.ai.gateway.error.${MP4}`,qR4=Symbol.for(hw9),IR4,PR4,RP4=class $ extends(PR4=CJ,IR4=qR4,PR4){constructor({message:Y="Authentication failed",statusCode:X=401,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[IR4]=!0,this.name=MP4,this.type="authentication_error"}static isInstance(Y){return CJ.hasMarker(Y)&&qR4 in Y}static createContextualError({apiKeyProvided:Y,oidcTokenProvided:X,message:G="Authentication failed",statusCode:J=401,cause:Q,generationId:W}){let Z;if(Y)Z=`AI Gateway authentication failed: Invalid API key.

Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys

Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;else if(X)Z=`AI Gateway authentication failed: Invalid OIDC token.

Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.

Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;else Z=`AI Gateway authentication failed: No authentication provided.

Option 1 - API key:
Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.

Option 2 - OIDC token:
Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:Z,statusCode:J,cause:Q,generationId:W})}},qP4="GatewayInvalidRequestError",fw9=`vercel.ai.gateway.error.${qP4}`,wR4=Symbol.for(fw9),_R4,jR4,gw9=class extends(jR4=CJ,_R4=wR4,jR4){constructor({message:$="Invalid request",statusCode:Y=400,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[_R4]=!0,this.name=qP4,this.type="invalid_request_error"}static isInstance($){return CJ.hasMarker($)&&wR4 in $}},IP4="GatewayRateLimitError",mw9=`vercel.ai.gateway.error.${IP4}`,TR4=Symbol.for(mw9),CR4,SR4,uw9=class extends(SR4=CJ,CR4=TR4,SR4){constructor({message:$="Rate limit exceeded",statusCode:Y=429,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[CR4]=!0,this.name=IP4,this.type="rate_limit_exceeded"}static isInstance($){return CJ.hasMarker($)&&TR4 in $}},PP4="GatewayModelNotFoundError",pw9=`vercel.ai.gateway.error.${PP4}`,kR4=Symbol.for(pw9),dw9=tW(()=>mQ(U.object({modelId:U.string()}))),vR4,xR4,cw9=class extends(xR4=CJ,vR4=kR4,xR4){constructor({message:$="Model not found",statusCode:Y=404,modelId:X,cause:G,generationId:J}={}){super({message:$,statusCode:Y,cause:G,generationId:J});this[vR4]=!0,this.name=PP4,this.type="model_not_found",this.modelId=X}static isInstance($){return CJ.hasMarker($)&&kR4 in $}},wP4="GatewayInternalServerError",lw9=`vercel.ai.gateway.error.${wP4}`,yR4=Symbol.for(lw9),bR4,hR4,fR4=class extends(hR4=CJ,bR4=yR4,hR4){constructor({message:$="Internal server error",statusCode:Y=500,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[bR4]=!0,this.name=wP4,this.type="internal_server_error"}static isInstance($){return CJ.hasMarker($)&&yR4 in $}},_P4="GatewayResponseError",iw9=`vercel.ai.gateway.error.${_P4}`,gR4=Symbol.for(iw9),mR4,uR4,nw9=class extends(uR4=CJ,mR4=gR4,uR4){constructor({message:$="Invalid response from Gateway",statusCode:Y=502,response:X,validationError:G,cause:J,generationId:Q}={}){super({message:$,statusCode:Y,cause:J,generationId:Q});this[mR4]=!0,this.name=_P4,this.type="response_error",this.response=X,this.validationError=G}static isInstance($){return CJ.hasMarker($)&&gR4 in $}};async function pR4({response:$,statusCode:Y,defaultMessage:X="Gateway request failed",cause:G,authMethod:J}){var Q;let W=await VN({value:$,schema:rw9});if(!W.success){let V=typeof $==="object"&&$!==null&&"generationId"in $?$.generationId:void 0;return new nw9({message:`Invalid error response format: ${X}`,statusCode:Y,response:$,validationError:W.error,cause:G,generationId:V})}let Z=W.value,K=Z.error.type,H=Z.error.message,z=(Q=Z.generationId)!=null?Q:void 0;switch(K){case"authentication_error":return RP4.createContextualError({apiKeyProvided:J==="api-key",oidcTokenProvided:J==="oidc",statusCode:Y,cause:G,generationId:z});case"invalid_request_error":return new gw9({message:H,statusCode:Y,cause:G,generationId:z});case"rate_limit_exceeded":return new uw9({message:H,statusCode:Y,cause:G,generationId:z});case"model_not_found":{let V=await VN({value:Z.error.param,schema:dw9});return new cw9({message:H,statusCode:Y,modelId:V.success?V.value.modelId:void 0,cause:G,generationId:z})}case"internal_server_error":return new fR4({message:H,statusCode:Y,cause:G,generationId:z});default:return new fR4({message:H,statusCode:Y,cause:G,generationId:z})}}var rw9=tW(()=>mQ(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()})));function aw9($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(Y){return $.responseBody}return{}}var jP4="GatewayTimeoutError",sw9=`vercel.ai.gateway.error.${jP4}`,dR4=Symbol.for(sw9),cR4,lR4,iR4=class $ extends(lR4=CJ,cR4=dR4,lR4){constructor({message:Y="Request timed out",statusCode:X=408,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[cR4]=!0,this.name=jP4,this.type="timeout_error"}static isInstance(Y){return CJ.hasMarker(Y)&&dR4 in Y}static createTimeoutError({originalMessage:Y,statusCode:X=408,cause:G,generationId:J}){let Q=`Gateway request timed out: ${Y}

    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 $({message:Q,statusCode:X,cause:G,generationId:J})}};function nR4($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(Y);return!1}async function fQ($,Y){var X;if(CJ.isInstance($))return $;if(nR4($))return iR4.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(s$.isInstance($)){if($.cause&&nR4($.cause))return iR4.createTimeoutError({originalMessage:$.message,cause:$});return await pR4({response:aw9($),statusCode:(X=$.statusCode)!=null?X:500,defaultMessage:"Gateway request failed",cause:$,authMethod:Y})}return await pR4({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:Y})}var TP4="ai-gateway-auth-method";async function AH($){let Y=await VN({value:$[TP4],schema:ow9});return Y.success?Y.value:void 0}var ow9=tW(()=>mQ(U.union([U.literal("api-key"),U.literal("oidc")]))),tw9=["embedding","image","language","reranking","video"],rR4=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await gX0({url:`${this.config.baseURL}/config`,headers:await $X(this.config.headers()),successfulResponseHandler:FN(ew9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return $}catch($){throw await fQ($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:Y}=await gX0({url:`${$.origin}/v1/credits`,headers:await $X(this.config.headers()),successfulResponseHandler:FN($_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Y}catch($){throw await fQ($)}}},ew9=tW(()=>mQ(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:$,output:Y,input_cache_read:X,input_cache_write:G})=>({input:$,output:Y,...X?{cachedInputTokens:X}:{},...G?{cacheCreationInputTokens:G}:{}})).nullish(),specification:U.object({specificationVersion:U.literal("v3"),provider:U.string(),modelId:U.string()}),modelType:U.string().nullish()})).transform(($)=>$.filter((Y)=>Y.modelType==null||tw9.includes(Y.modelType)))}))),$_9=tW(()=>mQ(U.object({balance:U.string(),total_used:U.string()}).transform(({balance:$,total_used:Y})=>({balance:$,totalUsed:Y})))),Y_9=class{constructor($){this.config=$}async getSpendReport($){try{let Y=new URL(this.config.baseURL),X=new URLSearchParams;if(X.set("start_date",$.startDate),X.set("end_date",$.endDate),$.groupBy)X.set("group_by",$.groupBy);if($.datePart)X.set("date_part",$.datePart);if($.userId)X.set("user_id",$.userId);if($.model)X.set("model",$.model);if($.provider)X.set("provider",$.provider);if($.credentialType)X.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)X.set("tags",$.tags.join(","));let{value:G}=await gX0({url:`${Y.origin}/v1/report?${X.toString()}`,headers:await $X(this.config.headers()),successfulResponseHandler:FN(X_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(J)=>J}),fetch:this.config.fetch});return G}catch(Y){throw await fQ(Y)}}},X_9=tW(()=>mQ(U.object({results:U.array(U.object({day:U.string().optional(),hour:U.string().optional(),user:U.string().optional(),model:U.string().optional(),tag:U.string().optional(),provider:U.string().optional(),credential_type:U.enum(["byok","system"]).optional(),total_cost:U.number(),market_cost:U.number().optional(),input_tokens:U.number().optional(),output_tokens:U.number().optional(),cached_input_tokens:U.number().optional(),cache_creation_input_tokens:U.number().optional(),reasoning_tokens:U.number().optional(),request_count:U.number().optional()}).transform(({credential_type:$,total_cost:Y,market_cost:X,input_tokens:G,output_tokens:J,cached_input_tokens:Q,cache_creation_input_tokens:W,reasoning_tokens:Z,request_count:K,...H})=>({...H,...$!==void 0?{credentialType:$}:{},totalCost:Y,...X!==void 0?{marketCost:X}:{},...G!==void 0?{inputTokens:G}:{},...J!==void 0?{outputTokens:J}:{},...Q!==void 0?{cachedInputTokens:Q}:{},...W!==void 0?{cacheCreationInputTokens:W}:{},...Z!==void 0?{reasoningTokens:Z}:{},...K!==void 0?{requestCount:K}:{}})))}))),G_9=class{constructor($){this.config=$}async getGenerationInfo($){try{let Y=new URL(this.config.baseURL),{value:X}=await gX0({url:`${Y.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await $X(this.config.headers()),successfulResponseHandler:FN(J_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(G)=>G}),fetch:this.config.fetch});return X}catch(Y){throw await fQ(Y)}}},J_9=tW(()=>mQ(U.object({data:U.object({id:U.string(),total_cost:U.number(),upstream_inference_cost:U.number(),usage:U.number(),created_at:U.string(),model:U.string(),is_byok:U.boolean(),provider_name:U.string(),streamed:U.boolean(),finish_reason:U.string(),latency:U.number(),generation_time:U.number(),native_tokens_prompt:U.number(),native_tokens_completion:U.number(),native_tokens_reasoning:U.number(),native_tokens_cached:U.number(),native_tokens_cache_creation:U.number(),billable_web_search_calls:U.number()}).transform(({total_cost:$,upstream_inference_cost:Y,created_at:X,is_byok:G,provider_name:J,finish_reason:Q,generation_time:W,native_tokens_prompt:Z,native_tokens_completion:K,native_tokens_reasoning:H,native_tokens_cached:z,native_tokens_cache_creation:V,billable_web_search_calls:A,...F})=>({...F,totalCost:$,upstreamInferenceCost:Y,createdAt:X,isByok:G,providerName:J,finishReason:Q,generationTime:W,promptTokens:Z,completionTokens:K,reasoningTokens:H,cachedTokens:z,cacheCreationTokens:V,billableWebSearchCalls:A}))}).transform(({data:$})=>$))),Q_9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:Y,...X}=$;return{args:this.maybeEncodeFileParts(X),warnings:[]}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await $X(this.config.headers());try{let{responseHeaders:Q,value:W,rawValue:Z}=await CC({url:this.getUrl(),headers:jC(J,$.headers,this.getModelConfigHeaders(this.modelId,!1),await $X(this.config.o11yHeaders)),body:Y,successfulResponseHandler:FN(U.any()),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(K)=>K}),...G&&{abortSignal:G},fetch:this.config.fetch});return{...W,request:{body:Y},response:{headers:Q,body:Z},warnings:X}}catch(Q){throw await fQ(Q,await AH(J))}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await $X(this.config.headers());try{let{value:Q,responseHeaders:W}=await CC({url:this.getUrl(),headers:jC(J,$.headers,this.getModelConfigHeaders(this.modelId,!0),await $X(this.config.o11yHeaders)),body:Y,successfulResponseHandler:kw9(U.any()),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(Z)=>Z}),...G&&{abortSignal:G},fetch:this.config.fetch});return{stream:Q.pipeThrough(new TransformStream({start(Z){if(X.length>0)Z.enqueue({type:"stream-start",warnings:X})},transform(Z,K){if(Z.success){let H=Z.value;if(H.type==="raw"&&!$.includeRawChunks)return;if(H.type==="response-metadata"&&H.timestamp&&typeof H.timestamp==="string")H.timestamp=new Date(H.timestamp);K.enqueue(H)}else K.error(Z.error)}})),request:{body:Y},response:{headers:W}}}catch(Q){throw await fQ(Q,await AH(J))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let Y of $.prompt)for(let X of Y.content)if(this.isFilePart(X)){let G=X;if(G.data instanceof Uint8Array){let J=Uint8Array.from(G.data),Q=Buffer.from(J).toString("base64");G.data=new URL(`data:${G.mediaType||"application/octet-stream"};base64,${Q}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,Y){return{"ai-language-model-specification-version":"3","ai-language-model-id":$,"ai-language-model-streaming":String(Y)}}},W_9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;let Q=await $X(this.config.headers());try{let{responseHeaders:W,value:Z,rawValue:K}=await CC({url:this.getUrl(),headers:jC(Q,Y!=null?Y:{},this.getModelConfigHeaders(),await $X(this.config.o11yHeaders)),body:{values:$,...G?{providerOptions:G}:{}},successfulResponseHandler:FN(Z_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(H)=>H}),...X&&{abortSignal:X},fetch:this.config.fetch});return{embeddings:Z.embeddings,usage:(J=Z.usage)!=null?J:void 0,providerMetadata:Z.providerMetadata,response:{headers:W,body:K},warnings:[]}}catch(W){throw await fQ(W,await AH(Q))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},Z_9=tW(()=>mQ(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()}))),K_9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,files:Q,mask:W,providerOptions:Z,headers:K,abortSignal:H}){var z,V,A,F;let N=await $X(this.config.headers());try{let{responseHeaders:D,value:L}=await CC({url:this.getUrl(),headers:jC(N,K!=null?K:{},this.getModelConfigHeaders(),await $X(this.config.o11yHeaders)),body:{prompt:$,n:Y,...X&&{size:X},...G&&{aspectRatio:G},...J&&{seed:J},...Z&&{providerOptions:Z},...Q&&{files:Q.map((B)=>aR4(B))},...W&&{mask:aR4(W)}},successfulResponseHandler:FN(V_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(B)=>B}),...H&&{abortSignal:H},fetch:this.config.fetch});return{images:L.images,warnings:(z=L.warnings)!=null?z:[],providerMetadata:L.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:D},...L.usage!=null&&{usage:{inputTokens:(V=L.usage.inputTokens)!=null?V:void 0,outputTokens:(A=L.usage.outputTokens)!=null?A:void 0,totalTokens:(F=L.usage.totalTokens)!=null?F:void 0}}}}catch(D){throw await fQ(D,await AH(N))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}};function aR4($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:HP4($.data)};return $}var U_9=U.object({images:U.array(U.unknown()).optional()}).catchall(U.unknown()),H_9=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()})]),z_9=U.object({inputTokens:U.number().nullish(),outputTokens:U.number().nullish(),totalTokens:U.number().nullish()}),V_9=U.object({images:U.array(U.string()),warnings:U.array(H_9).optional(),providerMetadata:U.record(U.string(),U_9).optional(),usage:z_9.optional()}),A_9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,aspectRatio:X,resolution:G,duration:J,fps:Q,seed:W,image:Z,providerOptions:K,headers:H,abortSignal:z}){var V;let A=await $X(this.config.headers());try{let{responseHeaders:F,value:N}=await CC({url:this.getUrl(),headers:jC(A,H!=null?H:{},this.getModelConfigHeaders(),await $X(this.config.o11yHeaders),{accept:"text/event-stream"}),body:{prompt:$,n:Y,...X&&{aspectRatio:X},...G&&{resolution:G},...J&&{duration:J},...Q&&{fps:Q},...W&&{seed:W},...K&&{providerOptions:K},...Z&&{image:F_9(Z)}},successfulResponseHandler:async({response:D,url:L,requestBodyValues:B})=>{if(D.body==null)throw new s$({message:"SSE response body is empty",url:L,requestBodyValues:B,statusCode:D.status});let E=OP4({stream:D.body,schema:B_9}).getReader(),{done:M,value:R}=await E.read();if(E.releaseLock(),M||!R)throw new s$({message:"SSE stream ended without a data event",url:L,requestBodyValues:B,statusCode:D.status});if(!R.success)throw new s$({message:"Failed to parse video SSE event",cause:R.error,url:L,requestBodyValues:B,statusCode:D.status});let q=R.value;if(q.type==="error")throw new s$({message:q.message,statusCode:q.statusCode,url:L,requestBodyValues:B,responseHeaders:Object.fromEntries([...D.headers]),responseBody:JSON.stringify(q),data:{error:{message:q.message,type:q.errorType,param:q.param}}});return{value:{videos:q.videos,warnings:q.warnings,providerMetadata:q.providerMetadata},responseHeaders:Object.fromEntries([...D.headers])}},failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(D)=>D}),...z&&{abortSignal:z},fetch:this.config.fetch});return{videos:N.videos,warnings:(V=N.warnings)!=null?V:[],providerMetadata:N.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:F}}}catch(F){throw await fQ(F,await AH(A))}}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}};function F_9($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:HP4($.data)};return $}var D_9=U.object({videos:U.array(U.unknown()).optional()}).catchall(U.unknown()),N_9=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()})]),L_9=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()})]),B_9=U.discriminatedUnion("type",[U.object({type:U.literal("result"),videos:U.array(N_9),warnings:U.array(L_9).optional(),providerMetadata:U.record(U.string(),D_9).optional()}),U.object({type:U.literal("error"),message:U.string(),errorType:U.string(),statusCode:U.number(),param:U.unknown().nullable()})]),O_9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async doRerank({documents:$,query:Y,topN:X,headers:G,abortSignal:J,providerOptions:Q}){let W=await $X(this.config.headers());try{let{responseHeaders:Z,value:K,rawValue:H}=await CC({url:this.getUrl(),headers:jC(W,G!=null?G:{},this.getModelConfigHeaders(),await $X(this.config.o11yHeaders)),body:{documents:$,query:Y,...X!=null?{topN:X}:{},...Q?{providerOptions:Q}:{}},successfulResponseHandler:FN(E_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(z)=>z}),...J&&{abortSignal:J},fetch:this.config.fetch});return{ranking:K.ranking,providerMetadata:K.providerMetadata,response:{headers:Z,body:H},warnings:[]}}catch(Z){throw await fQ(Z,await AH(W))}}getUrl(){return`${this.config.baseURL}/reranking-model`}getModelConfigHeaders(){return{"ai-reranking-model-specification-version":"3","ai-model-id":this.modelId}}},E_9=tW(()=>mQ(U.object({ranking:U.array(U.object({index:U.number(),relevanceScore:U.number()})),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()}))),M_9=tW(()=>mQ(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.")}))),R_9=tW(()=>mQ(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()})]))),q_9=EP4({id:"gateway.parallel_search",inputSchema:M_9,outputSchema:R_9}),I_9=($={})=>q_9($),P_9=tW(()=>mQ(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.")}))),w_9=tW(()=>mQ(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()})]))),__9=EP4({id:"gateway.perplexity_search",inputSchema:P_9,outputSchema:w_9}),j_9=($={})=>__9($),T_9={parallelSearch:I_9,perplexitySearch:j_9};async function C_9(){var $;return($=xw9().headers)==null?void 0:$["x-vercel-id"]}var S_9="3.0.112",k_9="0.0.1";function v_9($={}){var Y,X;let G=null,J=null,Q=(Y=$.metadataCacheRefreshMillis)!=null?Y:300000,W=0,Z=(X=vw9($.baseURL))!=null?X:"https://ai-gateway.vercel.sh/v3/ai",K=async()=>{try{let O=await y_9($);return rX0({Authorization:`Bearer ${O.token}`,"ai-gateway-protocol-version":k_9,[TP4]:O.authMethod,...$.headers},`ai-sdk/gateway/${S_9}`)}catch(O){throw RP4.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:O})}},H=()=>{let O=Wd({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),E=Wd({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),M=Wd({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),R=Wd({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let q=await C_9();return{...O&&{"ai-o11y-deployment-id":O},...E&&{"ai-o11y-environment":E},...M&&{"ai-o11y-region":M},...q&&{"ai-o11y-request-id":q},...R&&{"ai-o11y-project-id":R}}}},z=(O)=>{return new Q_9(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},V=async()=>{var O,E,M;let R=(M=(E=(O=$._internal)==null?void 0:O.currentDate)==null?void 0:E.call(O).getTime())!=null?M:Date.now();if(!G||R-W>Q)W=R,G=new rR4({baseURL:Z,headers:K,fetch:$.fetch}).getAvailableModels().then((q)=>{return J=q,q}).catch(async(q)=>{throw await fQ(q,await AH(await K()))});return J?Promise.resolve(J):G},A=async()=>{return new rR4({baseURL:Z,headers:K,fetch:$.fetch}).getCredits().catch(async(O)=>{throw await fQ(O,await AH(await K()))})},F=async(O)=>{return new Y_9({baseURL:Z,headers:K,fetch:$.fetch}).getSpendReport(O).catch(async(E)=>{throw await fQ(E,await AH(await K()))})},N=async(O)=>{return new G_9({baseURL:Z,headers:K,fetch:$.fetch}).getGenerationInfo(O).catch(async(E)=>{throw await fQ(E,await AH(await K()))})},D=function(O){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return z(O)};D.specificationVersion="v3",D.getAvailableModels=V,D.getCredits=A,D.getSpendReport=F,D.getGenerationInfo=N,D.imageModel=(O)=>{return new K_9(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},D.languageModel=z;let L=(O)=>{return new W_9(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})};D.embeddingModel=L,D.textEmbeddingModel=L,D.videoModel=(O)=>{return new A_9(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})};let B=(O)=>{return new O_9(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})};return D.rerankingModel=B,D.reranking=B,D.chat=D.languageModel,D.embedding=D.embeddingModel,D.image=D.imageModel,D.video=D.videoModel,D.tools=T_9,D}var x_9=v_9();async function y_9($){let Y=Wd({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(Y)return{token:Y,authMethod:"api-key"};return{token:await yw9(),authMethod:"oidc"}}var b_9=typeof globalThis==="object"?globalThis:global,nM="1.9.0",sR4=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function h_9($){var Y=new Set([$]),X=new Set,G=$.match(sR4);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(K){return K===$};function Q(Z){return X.add(Z),!1}function W(Z){return Y.add(Z),!0}return function(K){if(Y.has(K))return!0;if(X.has(K))return!1;var H=K.match(sR4);if(!H)return Q(K);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(K);if(J.major!==z.major)return Q(K);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(K);return Q(K)}if(J.minor<=z.minor)return W(K);return Q(K)}}var f_9=h_9(nM),g_9=nM.split(".")[0],Ed=Symbol.for("opentelemetry.js.api."+g_9),Md=b_9;function ql0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=Md[Ed]=(J=Md[Ed])!==null&&J!==void 0?J:{version:nM};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==nM){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+nM);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+nM+"."),!0}function Rd($){var Y,X,G=(Y=Md[Ed])===null||Y===void 0?void 0:Y.version;if(!G||!f_9(G))return;return(X=Md[Ed])===null||X===void 0?void 0:X[$]}function Il0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+nM+".");var X=Md[Ed];if(X)delete X[$]}var m_9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},u_9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},p_9=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Xd("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Xd("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Xd("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Xd("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Xd("verbose",this._namespace,Y)},$}();function Xd($,Y,X){var G=Rd("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,u_9([],m_9(X),!1))}var rW;(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(rW||(rW={}));function d_9($,Y){if($<rW.NONE)$=rW.NONE;else if($>rW.ALL)$=rW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",rW.ERROR),warn:X("warn",rW.WARN),info:X("info",rW.INFO),debug:X("debug",rW.DEBUG),verbose:X("verbose",rW.VERBOSE)}}var c_9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},l_9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},i_9="diag",mX0=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var Z=Rd("diag");if(!Z)return;return Z[J].apply(Z,l_9([],c_9(Q),!1))}}var X=this,G=function(J,Q){var W,Z,K;if(Q===void 0)Q={logLevel:rW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=Rd("diag"),V=d_9((Z=Q.logLevel)!==null&&Z!==void 0?Z:rW.INFO,J);if(z&&!Q.suppressOverrideMessage){var A=(K=Error().stack)!==null&&K!==void 0?K:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+A),V.warn("Current logger will overwrite one already registered from "+A)}return ql0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){Il0(i_9,X)},X.createComponentLogger=function(J){return new p_9(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();function n_9($){return Symbol.for($)}var r_9=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),a_9=new r_9,s_9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},o_9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},t_9=function(){function $(){}return $.prototype.active=function(){return a_9},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,o_9([G],s_9(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),e_9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(Z){W={error:Z}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},$j9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},uc0="context",Yj9=new t_9,Pl0=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return ql0(uc0,Y,mX0.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,$j9([Y,X,G],e_9(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return Rd(uc0)||Yj9},$.prototype.disable=function(){this._getContextManager().disable(),Il0(uc0,mX0.instance())},$}(),Yl0;(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(Yl0||(Yl0={}));var CP4="0000000000000000",SP4="00000000000000000000000000000000",Xj9={traceId:SP4,spanId:CP4,traceFlags:Yl0.NONE},Ud=function(){function $(Y){if(Y===void 0)Y=Xj9;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),wl0=n_9("OpenTelemetry Context Key SPAN");function _l0($){return $.getValue(wl0)||void 0}function Gj9(){return _l0(Pl0.getInstance().active())}function jl0($,Y){return $.setValue(wl0,Y)}function Jj9($){return $.deleteValue(wl0)}function Qj9($,Y){return jl0($,new Ud(Y))}function kP4($){var Y;return(Y=_l0($))===null||Y===void 0?void 0:Y.spanContext()}var Wj9=/^([0-9a-f]{32})$/i,Zj9=/^[0-9a-f]{16}$/i;function Kj9($){return Wj9.test($)&&$!==SP4}function Uj9($){return Zj9.test($)&&$!==CP4}function vP4($){return Kj9($.traceId)&&Uj9($.spanId)}function Hj9($){return new Ud($)}var pc0=Pl0.getInstance(),xP4=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=pc0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new Ud;var Q=G&&kP4(G);if(zj9(Q)&&vP4(Q))return new Ud(Q);else return new Ud},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,Z;if(arguments.length<2)return;else if(arguments.length===2)Z=X;else if(arguments.length===3)Q=X,Z=G;else Q=X,W=G,Z=J;var K=W!==null&&W!==void 0?W:pc0.active(),H=this.startSpan(Y,Q,K),z=jl0(K,H);return pc0.with(z,Z,void 0,H)},$}();function zj9($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}var Vj9=new xP4,Aj9=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return Vj9;return this._delegate=Y,this._delegate},$}(),Fj9=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new xP4},$}(),Dj9=new Fj9,oR4=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new Aj9(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:Dj9},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}(),uX0;(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(uX0||(uX0={}));var tR4=Pl0.getInstance(),dc0="trace",Nj9=function(){function $(){this._proxyTracerProvider=new oR4,this.wrapSpanContext=Hj9,this.isSpanContextValid=vP4,this.deleteSpan=Jj9,this.getSpan=_l0,this.getActiveSpan=Gj9,this.getSpanContext=kP4,this.setSpan=jl0,this.setSpanContext=Qj9}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=ql0(dc0,this._proxyTracerProvider,mX0.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return Rd(dc0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){Il0(dc0,mX0.instance()),this._proxyTracerProvider=new oR4},$}(),Lj9=Nj9.getInstance(),Bj9=Object.defineProperty,Oj9=($,Y)=>{for(var X in Y)Bj9($,X,{get:Y[X],enumerable:!0})},yP4="AI_InvalidArgumentError",bP4=`vercel.ai.error.${yP4}`,Ej9=Symbol.for(bP4),hP4,eR4=class extends xX{constructor({parameter:$,value:Y,message:X}){super({name:yP4,message:`Invalid argument for parameter ${$}: ${X}`});this[hP4]=!0,this.parameter=$,this.value=Y}static isInstance($){return xX.hasMarker($,bP4)}};hP4=Ej9;var fP4="AI_NoObjectGeneratedError",gP4=`vercel.ai.error.${fP4}`,Mj9=Symbol.for(gP4),mP4,HN=class extends xX{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:fP4,message:$,cause:Y});this[mP4]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return xX.hasMarker($,gP4)}};mP4=Mj9;var Rj9=class extends xX{constructor($){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${$.version} for provider "${$.provider}" and model "${$.modelId}". AI SDK 5 only supports models that implement specification version "v2".`});this.version=$.version,this.provider=$.provider,this.modelId=$.modelId}},uP4="AI_RetryError",pP4=`vercel.ai.error.${uP4}`,qj9=Symbol.for(pP4),dP4,$q4=class extends xX{constructor({message:$,reason:Y,errors:X}){super({name:uP4,message:$});this[dP4]=!0,this.reason=Y,this.errors=X,this.lastError=X[X.length-1]}static isInstance($){return xX.hasMarker($,pP4)}};dP4=qj9;function Ij9({warning:$,provider:Y,model:X}){let G=`AI SDK Warning (${Y} / ${X}):`;switch($.type){case"unsupported":{let J=`${G} The feature "${$.feature}" is not supported.`;if($.details)J+=` ${$.details}`;return J}case"compatibility":{let J=`${G} The feature "${$.feature}" is used in a compatibility mode.`;if($.details)J+=` ${$.details}`;return J}case"other":return`${G} ${$.message}`;default:return`${G} ${JSON.stringify($,null,2)}`}}var Pj9="AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false.",Yq4=!1,Xl0=($)=>{if($.warnings.length===0)return;let Y=globalThis.AI_SDK_LOG_WARNINGS;if(Y===!1)return;if(typeof Y==="function"){Y($);return}if(!Yq4)Yq4=!0,console.info(Pj9);for(let X of $.warnings)console.warn(Ij9({warning:X,provider:$.provider,model:$.model}))};function wj9({provider:$,modelId:Y}){Xl0({warnings:[{type:"compatibility",feature:"specificationVersion",details:"Using v2 specification compatibility mode. Some features may not be available."}],provider:$,model:Y})}function _j9($){if($.specificationVersion==="v3")return $;return wj9({provider:$.provider,modelId:$.modelId}),new Proxy($,{get(Y,X){if(X==="specificationVersion")return"v3";return Y[X]}})}function jj9($){if(typeof $!=="string"){if($.specificationVersion!=="v3"&&$.specificationVersion!=="v2"){let Y=$;throw new Rj9({version:Y.specificationVersion,provider:Y.provider,modelId:Y.modelId})}return _j9($)}return Tj9().embeddingModel($)}function Tj9(){var $;return($=globalThis.AI_SDK_DEFAULT_PROVIDER)!=null?$:x_9}function Cj9($){if($==null)return;if(typeof $==="number")return $;return $.totalMs}var Sj9="6.0.177",cP4=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),sM=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),sM.optional()),U.array(sM)])),u7=U.record(U.string(),U.record(U.string(),sM.optional())),lP4=U.object({type:U.literal("text"),text:U.string(),providerOptions:u7.optional()}),kj9=U.object({type:U.literal("image"),image:U.union([cP4,U.instanceof(URL)]),mediaType:U.string().optional(),providerOptions:u7.optional()}),iP4=U.object({type:U.literal("file"),data:U.union([cP4,U.instanceof(URL)]),filename:U.string().optional(),mediaType:U.string(),providerOptions:u7.optional()}),vj9=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:u7.optional()}),xj9=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerOptions:u7.optional(),providerExecuted:U.boolean().optional()}),yj9=U.discriminatedUnion("type",[U.object({type:U.literal("text"),value:U.string(),providerOptions:u7.optional()}),U.object({type:U.literal("json"),value:sM,providerOptions:u7.optional()}),U.object({type:U.literal("execution-denied"),reason:U.string().optional(),providerOptions:u7.optional()}),U.object({type:U.literal("error-text"),value:U.string(),providerOptions:u7.optional()}),U.object({type:U.literal("error-json"),value:sM,providerOptions:u7.optional()}),U.object({type:U.literal("content"),value:U.array(U.union([U.object({type:U.literal("text"),text:U.string(),providerOptions:u7.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:u7.optional()}),U.object({type:U.literal("file-url"),url:U.string(),providerOptions:u7.optional()}),U.object({type:U.literal("file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:u7.optional()}),U.object({type:U.literal("image-data"),data:U.string(),mediaType:U.string(),providerOptions:u7.optional()}),U.object({type:U.literal("image-url"),url:U.string(),providerOptions:u7.optional()}),U.object({type:U.literal("image-file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:u7.optional()}),U.object({type:U.literal("custom"),providerOptions:u7.optional()})]))})]),nP4=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),output:yj9,providerOptions:u7.optional()}),bj9=U.object({type:U.literal("tool-approval-request"),approvalId:U.string(),toolCallId:U.string()}),hj9=U.object({type:U.literal("tool-approval-response"),approvalId:U.string(),approved:U.boolean(),reason:U.string().optional()}),fj9=U.object({role:U.literal("system"),content:U.string(),providerOptions:u7.optional()}),gj9=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([lP4,kj9,iP4]))]),providerOptions:u7.optional()}),mj9=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([lP4,iP4,vj9,xj9,nP4,bj9]))]),providerOptions:u7.optional()}),uj9=U.object({role:U.literal("tool"),content:U.array(U.union([nP4,hj9])),providerOptions:u7.optional()});U.union([fj9,gj9,mj9,uj9]);function cc0({operationId:$,telemetry:Y}){return{"operation.name":`${$}${(Y==null?void 0:Y.functionId)!=null?` ${Y.functionId}`:""}`,"resource.name":Y==null?void 0:Y.functionId,"ai.operationId":$,"ai.telemetry.functionId":Y==null?void 0:Y.functionId}}function pj9({model:$,settings:Y,telemetry:X,headers:G}){var J;return{"ai.model.provider":$.provider,"ai.model.id":$.modelId,...Object.entries(Y).reduce((Q,[W,Z])=>{if(W==="timeout"){let K=Cj9(Z);if(K!=null)Q[`ai.settings.${W}`]=K}else Q[`ai.settings.${W}`]=Z;return Q},{}),...Object.entries((J=X==null?void 0:X.metadata)!=null?J:{}).reduce((Q,[W,Z])=>{return Q[`ai.telemetry.metadata.${W}`]=Z,Q},{}),...Object.entries(G!=null?G:{}).reduce((Q,[W,Z])=>{if(Z!==void 0)Q[`ai.request.headers.${W}`]=Z;return Q},{})}}var dj9={startSpan(){return IX0},startActiveSpan($,Y,X,G){if(typeof Y==="function")return Y(IX0);if(typeof X==="function")return X(IX0);if(typeof G==="function")return G(IX0)}},IX0={spanContext(){return cj9},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}},cj9={traceId:"",spanId:"",traceFlags:0};function lj9({isEnabled:$=!1,tracer:Y}={}){if(!$)return dj9;if(Y)return Y;return Lj9.getTracer("ai")}async function lc0({name:$,tracer:Y,attributes:X,fn:G,endWhenDone:J=!0}){return Y.startActiveSpan($,{attributes:await X},async(Q)=>{let W=tR4.active();try{let Z=await tR4.with(W,()=>G(Q));if(J)Q.end();return Z}catch(Z){try{ij9(Q,Z)}finally{Q.end()}throw Z}})}function ij9($,Y){if(Y instanceof Error)$.recordException({name:Y.name,message:Y.message,stack:Y.stack}),$.setStatus({code:uX0.ERROR,message:Y.message});else $.setStatus({code:uX0.ERROR})}async function cM({telemetry:$,attributes:Y}){if(($==null?void 0:$.isEnabled)!==!0)return{};let X={};for(let[G,J]of Object.entries(Y)){if(J==null)continue;if(typeof J==="object"&&"input"in J&&typeof J.input==="function"){if(($==null?void 0:$.recordInputs)===!1)continue;let Q=await J.input();if(Q!=null)X[G]=Q;continue}if(typeof J==="object"&&"output"in J&&typeof J.output==="function"){if(($==null?void 0:$.recordOutputs)===!1)continue;let Q=await J.output();if(Q!=null)X[G]=Q;continue}X[G]=J}return X}function nj9({error:$,exponentialBackoffDelay:Y}){let X=$.responseHeaders;if(!X)return Y;let G,J=X["retry-after-ms"];if(J){let W=parseFloat(J);if(!Number.isNaN(W))G=W}let Q=X["retry-after"];if(Q&&G===void 0){let W=parseFloat(Q);if(!Number.isNaN(W))G=W*1000;else G=Date.parse(Q)-Date.now()}if(G!=null&&!Number.isNaN(G)&&0<=G&&(G<60000||G<Y))return G;return Y}var rj9=({maxRetries:$=2,initialDelayInMs:Y=2000,backoffFactor:X=2,abortSignal:G}={})=>async(J)=>rP4(J,{maxRetries:$,delayInMs:Y,backoffFactor:X,abortSignal:G});async function rP4($,{maxRetries:Y,delayInMs:X,backoffFactor:G,abortSignal:J},Q=[]){try{return await $()}catch(W){if(TC(W))throw W;if(Y===0)throw W;let Z=_P9(W),K=[...Q,W],H=K.length;if(H>Y)throw new $q4({message:`Failed after ${H} attempts. Last error: ${Z}`,reason:"maxRetriesExceeded",errors:K});if(W instanceof Error&&s$.isInstance(W)&&W.isRetryable===!0&&H<=Y)return await PP9(nj9({error:W,exponentialBackoffDelay:X}),{abortSignal:J}),rP4($,{maxRetries:Y,delayInMs:G*X,backoffFactor:G,abortSignal:J},K);if(H===1)throw W;throw new $q4({message:`Failed after ${H} attempts with non-retryable error: '${Z}'`,reason:"errorNotRetryable",errors:K})}}function aj9({maxRetries:$,abortSignal:Y}){if($!=null){if(!Number.isInteger($))throw new eR4({parameter:"maxRetries",value:$,message:"maxRetries must be an integer"});if($<0)throw new eR4({parameter:"maxRetries",value:$,message:"maxRetries must be >= 0"})}let X=$!=null?$:2;return{maxRetries:X,retry:rj9({maxRetries:X,abortSignal:Y})}}var sj9={};Oj9(sj9,{array:()=>$T9,choice:()=>YT9,json:()=>XT9,object:()=>ej9,text:()=>tj9});function oj9($){let Y=["ROOT"],X=-1,G=null;function J(K,H,z){switch(K){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let K=0;K<$.length;K++){let H=$[K];switch(Y[Y.length-1]){case"ROOT":J(H,K,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=K,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,K,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,K);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=K;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=K}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=K,Y.pop();break}default:{X=K,J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=K,Y.pop();break}default:{X=K;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=K;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=K;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,K+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K)}else X=K;break}}}let Z=$.slice(0,X+1);for(let K=Y.length-1;K>=0;K--)switch(Y[K]){case"INSIDE_STRING":{Z+='"';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":{Z+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{Z+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))Z+="true".slice(z.length);else if("false".startsWith(z))Z+="false".slice(z.length);else if("null".startsWith(z))Z+="null".slice(z.length)}}return Z}async function sX0($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=await AN({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=await AN({text:oj9($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}var tj9=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:$}){return $},async parsePartialOutput({text:$}){return{partial:$}},createElementStreamTransform(){return}}),ej9=({schema:$,name:Y,description:X})=>{let G=Rl0($);return{name:"object",responseFormat:$X(G.jsonSchema).then((J)=>({type:"json",schema:J,...Y!=null&&{name:Y},...X!=null&&{description:X}})),async parseCompleteOutput({text:J},Q){let W=await AN({text:J});if(!W.success)throw new HN({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let Z=await VN({value:W.value,schema:G});if(!Z.success)throw new HN({message:"No object generated: response did not match schema.",cause:Z.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});return Z.value},async parsePartialOutput({text:J}){let Q=await sX0(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:Q.value}}},createElementStreamTransform(){return}}},$T9=({element:$,name:Y,description:X})=>{let G=Rl0($);return{name:"array",responseFormat:$X(G.jsonSchema).then((J)=>{let{$schema:Q,...W}=J;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:W}},required:["elements"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}}),async parseCompleteOutput({text:J},Q){let W=await AN({text:J});if(!W.success)throw new HN({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let Z=W.value;if(Z==null||typeof Z!=="object"||!("elements"in Z)||!Array.isArray(Z.elements))throw new HN({message:"No object generated: response did not match schema.",cause:new aM({value:Z,cause:"response must be an object with an elements array"}),text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});for(let K of Z.elements){let H=await VN({value:K,schema:G});if(!H.success)throw new HN({message:"No object generated: response did not match schema.",cause:H.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason})}return Z.elements},async parsePartialOutput({text:J}){let Q=await sX0(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let W=Q.value;if(W==null||typeof W!=="object"||!("elements"in W)||!Array.isArray(W.elements))return;let Z=Q.state==="repaired-parse"&&W.elements.length>0?W.elements.slice(0,-1):W.elements,K=[];for(let H of Z){let z=await VN({value:H,schema:G});if(z.success)K.push(z.value)}return{partial:K}}}},createElementStreamTransform(){let J=0;return new TransformStream({transform({partialOutput:Q},W){if(Q!=null)for(;J<Q.length;J++)W.enqueue(Q[J])}})}}},YT9=({options:$,name:Y,description:X})=>{return{name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:$}},required:["result"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}),async parseCompleteOutput({text:G},J){let Q=await AN({text:G});if(!Q.success)throw new HN({message:"No object generated: could not parse the response.",cause:Q.error,text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});let W=Q.value;if(W==null||typeof W!=="object"||!("result"in W)||typeof W.result!=="string"||!$.includes(W.result))throw new HN({message:"No object generated: response did not match schema.",cause:new aM({value:W,cause:"response must be an object that contains a choice value."}),text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});return W.result},async parsePartialOutput({text:G}){let J=await sX0(G);switch(J.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let Q=J.value;if(Q==null||typeof Q!=="object"||!("result"in Q)||typeof Q.result!=="string")return;let W=$.filter((Z)=>Z.startsWith(Q.result));if(J.state==="successful-parse")return W.includes(Q.result)?{partial:Q.result}:void 0;else return W.length===1?{partial:W[0]}:void 0}}},createElementStreamTransform(){return}}},XT9=({name:$,description:Y}={})=>{return{name:"json",responseFormat:Promise.resolve({type:"json",...$!=null&&{name:$},...Y!=null&&{description:Y}}),async parseCompleteOutput({text:X},G){let J=await AN({text:X});if(!J.success)throw new HN({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return J.value},async parsePartialOutput({text:X}){let G=await sX0(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return G.value===void 0?void 0:{partial:G.value}}},createElementStreamTransform(){return}}};wd({prefix:"aitxt",size:24});U.record(U.string(),sM.optional());wd({prefix:"aitxt",size:24});U.record(U.string(),sM.optional());function Xq4($,Y){if(Y<=0)throw Error("chunkSize must be greater than 0");let X=[];for(let G=0;G<$.length;G+=Y)X.push($.slice(G,G+Y));return X}async function GT9({model:$,values:Y,maxParallelCalls:X=1/0,maxRetries:G,abortSignal:J,headers:Q,providerOptions:W,experimental_telemetry:Z}){let K=jj9($),{maxRetries:H,retry:z}=aj9({maxRetries:G,abortSignal:J}),V=rX0(Q!=null?Q:{},`ai/${Sj9}`),A=pj9({model:K,telemetry:Z,headers:V,settings:{maxRetries:H}}),F=lj9(Z);return lc0({name:"ai.embedMany",attributes:cM({telemetry:Z,attributes:{...cc0({operationId:"ai.embedMany",telemetry:Z}),...A,"ai.values":{input:()=>Y.map((N)=>JSON.stringify(N))}}}),tracer:F,fn:async(N)=>{var D;let[L,B]=await Promise.all([K.maxEmbeddingsPerCall,K.supportsParallelCalls]);if(L==null||L===1/0){let{embeddings:P,usage:_,warnings:C,response:k,providerMetadata:S}=await z(()=>{return lc0({name:"ai.embedMany.doEmbed",attributes:cM({telemetry:Z,attributes:{...cc0({operationId:"ai.embedMany.doEmbed",telemetry:Z}),...A,"ai.values":{input:()=>Y.map((T)=>JSON.stringify(T))}}}),tracer:F,fn:async(T)=>{var v;let x=await K.doEmbed({values:Y,abortSignal:J,headers:V,providerOptions:W}),y=x.embeddings,d=(v=x.usage)!=null?v:{tokens:NaN};return T.setAttributes(await cM({telemetry:Z,attributes:{"ai.embeddings":{output:()=>y.map((u)=>JSON.stringify(u))},"ai.usage.tokens":d.tokens}})),{embeddings:y,usage:d,warnings:x.warnings,providerMetadata:x.providerMetadata,response:x.response}}})});return N.setAttributes(await cM({telemetry:Z,attributes:{"ai.embeddings":{output:()=>P.map((T)=>JSON.stringify(T))},"ai.usage.tokens":_.tokens}})),Xl0({warnings:C,provider:K.provider,model:K.modelId}),new Gq4({values:Y,embeddings:P,usage:_,warnings:C,providerMetadata:S,responses:[k]})}let O=Xq4(Y,L),E=[],M=[],R=[],q=0,w,I=Xq4(O,B?X:1);for(let P of I){let _=await Promise.all(P.map((C)=>{return z(()=>{return lc0({name:"ai.embedMany.doEmbed",attributes:cM({telemetry:Z,attributes:{...cc0({operationId:"ai.embedMany.doEmbed",telemetry:Z}),...A,"ai.values":{input:()=>C.map((k)=>JSON.stringify(k))}}}),tracer:F,fn:async(k)=>{var S;let T=await K.doEmbed({values:C,abortSignal:J,headers:V,providerOptions:W}),v=T.embeddings,x=(S=T.usage)!=null?S:{tokens:NaN};return k.setAttributes(await cM({telemetry:Z,attributes:{"ai.embeddings":{output:()=>v.map((y)=>JSON.stringify(y))},"ai.usage.tokens":x.tokens}})),{embeddings:v,usage:x,warnings:T.warnings,providerMetadata:T.providerMetadata,response:T.response}}})})}));for(let C of _)if(E.push(...C.embeddings),M.push(...C.warnings),R.push(C.response),q+=C.usage.tokens,C.providerMetadata)if(!w)w={...C.providerMetadata};else for(let[k,S]of Object.entries(C.providerMetadata))w[k]={...(D=w[k])!=null?D:{},...S}}return N.setAttributes(await cM({telemetry:Z,attributes:{"ai.embeddings":{output:()=>E.map((P)=>JSON.stringify(P))},"ai.usage.tokens":q}})),Xl0({warnings:M,provider:K.provider,model:K.modelId}),new Gq4({values:Y,embeddings:E,usage:{tokens:q},warnings:M,providerMetadata:w,responses:R})}})}var Gq4=class{constructor($){this.values=$.values,this.embeddings=$.embeddings,this.usage=$.usage,this.warnings=$.warnings,this.providerMetadata=$.providerMetadata,this.responses=$.responses}};wd({prefix:"aiobj",size:24});wd({prefix:"aiobj",size:24});function aP4($){if(typeof $.content==="string")return[];if(Array.isArray($.content))return $.content;let Y=$.content?.parts;return Array.isArray(Y)?Y:[]}function pX0($){if(typeof $.content==="string")return $.content.length>0;let Y=aP4($);if(Y.length===0)return Boolean($.content?.content);return Y.some((X)=>!X.type?.startsWith("data-"))}function JT9($){if($.includes(",")){let X=$.split(",").map((G)=>G.trim()).filter(Boolean);if(X.length>=1){let G=X[0],J=X[X.length-1],Q=G.indexOf(":"),W=J.indexOf(":");return{startId:Q>0?G.slice(0,Q):G,endId:W>0?J.slice(W+1):J}}}let Y=$.indexOf(":");if(Y>0&&Y<$.length-1)return{startId:$.slice(0,Y),endId:$.slice(Y+1)};return null}async function Tl0($,Y,X){let G=Y.trim();if(!G)throw Error("Cursor is required");let J=JT9(G);if(J)return{hint:`The cursor "${Y}" looks like a range. Use one of the individual message IDs as the cursor instead: start="${J.startId}" or end="${J.endId}".`,...J};let Z=(await(await $.getMemoryStore()).listMessagesById({messageIds:[G]})).messages.find((K)=>K.id===G)??null;if(!Z)Z=await QT9($,G,X);if(!Z)throw Error(`Could not resolve cursor message: ${Y}`);if(X?.resourceId&&Z.resourceId!==X.resourceId)throw Error(`Could not resolve cursor message: ${Y}`);if(X?.enforceThreadScope&&X.threadScope&&Z.threadId!==X.threadScope)throw Error(`Could not resolve cursor message: ${Y}`);return Z}async function QT9($,Y,X){if(X?.enforceThreadScope&&X.threadScope)return(await $.recall({threadId:X.threadScope,resourceId:X.resourceId,page:0,perPage:!1})).messages.find((Q)=>Q.id===Y)??null;if(!X?.resourceId)return null;let G=await $.listThreads({page:0,perPage:100,orderBy:{field:"updatedAt",direction:"DESC"},filter:{resourceId:X.resourceId}});for(let J of G.threads){let W=(await $.recall({threadId:J.id,resourceId:X.resourceId,page:0,perPage:!1})).messages.find((Z)=>Z.id===Y);if(W)return W}return null}async function WT9({memory:$,resourceId:Y,currentThreadId:X,page:G=0,limit:J=20,before:Q,after:W}){if(!Y)throw Error("Resource ID is required to list threads");let Z=50,K=Math.min(Math.max(J,1),Z),H=!!(Q||W),z=Q?new Date(Q):null,V=W?new Date(W):null,A=await $.listThreads({filter:{resourceId:Y},page:H?0:G,perPage:H?!1:K,orderBy:{field:"updatedAt",direction:"DESC"}}),F=A.threads;if(z)F=F.filter((L)=>L.createdAt<z);if(V)F=F.filter((L)=>L.createdAt>V);let N;if(H){let L=G*K;N=L+K<F.length,F=F.slice(L,L+K)}else N=A.hasMore;if(F.length===0)return{threads:"No threads found matching the criteria.",count:0,page:G,hasMore:!1};let D=[];for(let L of F){let B=L.id===X,O=L.title||"(untitled)",E=SC(L.updatedAt),M=SC(L.createdAt),R=B?" \u2190 current":"";D.push(`- **${O}**${R}`),D.push(`  id: ${L.id}`),D.push(`  updated: ${E} | created: ${M}`)}return{threads:D.join(`
`),count:F.length,page:G,hasMore:N}}async function ZT9({memory:$,resourceId:Y,currentThreadId:X,query:G,topK:J=10,maxTokens:Q=oX0,before:W,after:Z,threadScope:K}){if(!$.searchMessages)return{results:"Search is not configured. Enable it with `retrieval: { vector: true }` and configure a vector store and embedder on your Memory instance.",count:0};let H=20,z=Math.min(Math.max(J,1),H),V=K||W||Z?Math.max(z*3,z+10):z,A=Math.min(H,V),F=W?new Date(W):void 0,N=Z?new Date(Z):void 0,{results:D}=await $.searchMessages({query:G,resourceId:Y,topK:A,filter:{...K?{threadId:K}:{},...N?{observedAfter:N}:{},...F?{observedBefore:F}:{}}});if(D.length===0)return{results:"No matching messages found.",count:0};let L=[...new Set(D.map((w)=>w.threadId))],B=new Map;if($.getThreadById)await Promise.all(L.map(async(w)=>{let I=await $.getThreadById({threadId:w});if(I)B.set(w,I)}));let O=D.filter((w)=>{if(K&&w.threadId!==K)return!1;if(F&&w.observedAt&&w.observedAt>=F)return!1;if(N&&w.observedAt&&w.observedAt<=N)return!1;return!0});if(O.length===0)return{results:"No matching messages found.",count:0};let E=O.slice(0,z),R=E.map((w)=>{let I=B.get(w.threadId),P=I?.title||"(untitled)",_=w.threadId===X,C=_?"Current thread memory":"Older memory from another thread",k=_?"This result came from the current thread.":"This result came from an older memory generation in another thread.",S=`- thread: ${w.threadId}${I?` (${P})`:""}`,T=w.range?`- source: raw messages from ID ${w.range.split(":")[0]??"(unknown)"} through ID ${w.range.split(":")[1]??"(unknown)"}`:"- source: raw message range unavailable",v=I?`- thread updated: ${SC(I.updatedAt)}`:void 0,x=w.groupId?`- observation group: ${w.groupId}`:void 0,y=`- score: ${w.score.toFixed(2)}`,d=(w.text||"").trim()||"_Observation text unavailable._";return[`### ${C}`,"",k,S,T,v,x,y,"","```text",d,"```"].filter(Boolean).join(`
`)}).join(`

`),{text:q}=Cl0(R,Q);return{results:q,count:E.length}}var KT9=30,UT9=100,HT9=20,Jq4=4000,oX0=2000;function SC($){return $.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"Z")}function Cl0($,Y,X){if(JG($)<=Y)return{text:$,wasTruncated:!1};let G=gM($,Y),J=X?` [${X} for more]`:"";return{text:G+J,wasTruncated:!0}}function zT9($){if($==="text")return UT9;if($==="tool-result"||$==="tool-call")return HT9;return KT9}function PC($,Y,X,G,J,Q){if(J==="high")return{messageId:$.id,partIndex:Y,role:$.role,type:X,text:G,fullText:G,toolName:Q};let W=`recall cursor="${$.id}" partIndex=${Y} detail="high"`,{text:Z}=Cl0(G,zT9(X),W);return{messageId:$.id,partIndex:Y,role:$.role,type:X,text:Z,fullText:G,toolName:Q}}function dX0($,Y){let X=[];if(typeof $.content==="string")return X.push(PC($,0,"text",$.content,Y)),X;let G=aP4($);if(G.length>0)for(let J=0;J<G.length;J++){let Q=G[J],W=Q.type;if(W==="text"){let Z=Q.text;if(Z)X.push(PC($,J,"text",Z,Y))}else if(W==="tool-invocation"){let Z=Q.toolInvocation;if(Z?.toolName){let K=Z.args!=null;if(Z.state!=="partial-call"&&K){let H=Y==="low"?"":`
${JSON.stringify(Z.args,null,2)}`,z=`[Tool Call: ${Z.toolName}]${H}`;X.push({messageId:$.id,partIndex:J,role:$.role,type:"tool-call",text:z,fullText:z,toolName:Z.toolName})}if(Z.state==="result"){let{value:H}=LX0(Q,Z.result),z=tp(H,{maxTokens:Jq4}),V=`[Tool Result: ${Z.toolName}]
${z}`;X.push(PC($,J,"tool-result",V,Y,Z.toolName))}}}else if(W==="tool-call"){let Z=Q.toolName;if(Z){let K=Q.input??Q.args,H=Y==="low"||K==null?"":`
${typeof K==="string"?K:JSON.stringify(K,null,2)}`,z=`[Tool Call: ${Z}]${H}`;X.push({messageId:$.id,partIndex:J,role:$.role,type:"tool-call",text:z,fullText:z,toolName:Z})}}else if(W==="tool-result"){let Z=Q.toolName;if(Z){let K=Q.output??Q.result,H=tp(K,{maxTokens:Jq4}),z=`[Tool Result: ${Z}]
${H}`;X.push(PC($,J,"tool-result",z,Y,Z))}}else if(W==="reasoning"){let Z=Q.reasoning??Q.text;if(Z)X.push(PC($,J,"reasoning",Z,Y))}else if(W==="image"||W==="file"){let Z=Q.filename,K=Z?`: ${Z}`:"",H=`[${W==="image"?"Image":"File"}${K}]`;X.push({messageId:$.id,partIndex:J,role:$.role,type:W,text:H,fullText:H})}else if(W?.startsWith("data-"));else if(W){let Z=`[${W}]`;X.push({messageId:$.id,partIndex:J,role:$.role,type:W,text:Z,fullText:Z})}}else if($.content?.content)X.push(PC($,0,"text",$.content.content,Y));return X}function Qq4($,Y){let X="",G=[];for(let J of $){if(J.messageId!==X){X=J.messageId;let W=Y.get(J.messageId),Z=W?` (${SC(W)})`:"";if(G.length>0)G.push("");G.push(`**${J.role}${Z}** [${J.messageId}]:`)}let Q=`[p${J.partIndex}]`;G.push(`  ${Q} ${J.text}`)}return G.join(`
`)}async function VT9({memory:$,threadId:Y,resourceId:X,after:G}){return(await $.recall({threadId:Y,resourceId:X,page:0,perPage:50,orderBy:{field:"createdAt",direction:"ASC"},filter:{dateRange:{start:G,startExclusive:!0}}})).messages.find(pX0)??null}var AT9=200,FT9=50;function DT9($){if($.role==="user"&&$.type==="text")return AT9;return FT9}function Wq4($){if($.role==="user"&&$.type==="text")return 0;if($.type==="text"||$.type==="reasoning")return 1;if($.type==="tool-result")return 2;if($.type==="tool-call")return 3;return 4}function Gl0($,Y,X){let G=Qq4($,Y),J=JG(G);if(J>X.maxTokens)return{text:gM(G,X.maxTokens),truncated:!0,tokenOffset:J-X.maxTokens};let Q=$.map((z,V)=>({part:z,index:V})).filter(({part:z})=>z.text!==z.fullText).sort((z,V)=>Wq4(z.part)-Wq4(V.part));if(Q.length===0)return{text:G,truncated:!1,tokenOffset:0};let W=X.maxTokens-J;for(let{part:z,index:V}of Q){if(W<=0)break;let A=DT9(z),F=JG(z.fullText),N=JG(z.text),D=Math.min(F,A),L=D-N;if(L<=0)continue;if(L<=W&&D>=F)$[V]={...z,text:z.fullText},W-=L;else{let B=Math.min(N+W,A),O=`recall cursor="${z.messageId}" partIndex=${z.partIndex} detail="high"`,{text:E}=Cl0(z.fullText,B,O),M=JG(E)-N;$[V]={...z,text:E},W-=M}}let Z=Qq4($,Y),K=JG(Z);if(K<=X.maxTokens)return{text:Z,truncated:!1,tokenOffset:0};return{text:gM(Z,X.maxTokens),truncated:!0,tokenOffset:K-X.maxTokens}}async function NT9({memory:$,threadId:Y,resourceId:X,cursor:G,partIndex:J,threadScope:Q,maxTokens:W=oX0}){if(!$||typeof $.getMemoryStore!=="function")throw Error("Memory instance is required for recall");if(!Y)throw Error("Thread ID is required for recall");let Z=await Tl0($,G,{resourceId:X,threadScope:Q,enforceThreadScope:!1});if("hint"in Z)throw Error(Z.hint);let K=dX0(Z,"high");if(K.length===0)throw Error(`Message ${G} has no visible content (it may be an internal system message). Try a neighboring message ID instead.`);let H=[...K].reverse().find((A)=>A.partIndex===J);if(!H){let A=K.map((N)=>N.partIndex).join(", "),F=Math.max(...K.map((N)=>N.partIndex));if(J>F){let N=await VT9({memory:$,threadId:Y,resourceId:X,after:Z.createdAt});if(N){let L=dX0(N,"high")[0];if(L){let O=`${`Part index ${J} not found in message ${G}; showing partIndex ${L.partIndex} from next message ${L.messageId}.

`}${L.text}`,E=gM(O,W),M=E!==O;return{text:E,messageId:L.messageId,partIndex:L.partIndex,role:L.role,type:L.type,truncated:M}}}}throw Error(`Part index ${J} not found in message ${G}. Available indices: ${A}`)}let z=gM(H.text,W),V=z!==H.text;return{text:z,messageId:H.messageId,partIndex:H.partIndex,role:H.role,type:H.type,truncated:V}}async function LT9({memory:$,threadId:Y,resourceId:X,cursor:G,page:J=1,limit:Q=20,detail:W="low",partType:Z,toolName:K,threadScope:H,maxTokens:z=oX0}){if(!$)throw Error("Memory instance is required for recall");if(!Y)throw Error("Thread ID is required for recall");if(typeof $.getMemoryStore!=="function")throw Error("recall requires a Memory instance with storage access");let V=50,A=20,N=Math.max(Math.min(J===0?1:J,V),-V),D=Math.min(Q,A),L=await Tl0($,G,{resourceId:X,threadScope:H,enforceThreadScope:!1});if("hint"in L)return{messages:L.hint,count:0,cursor:G,page:N,limit:D,detail:W,hasNextPage:!1,hasPrevPage:!1,truncated:!1,tokenOffset:0};let B=L,O=B.threadId&&B.threadId!==Y?B.threadId:void 0;if(O&&H)return{messages:`Cursor does not belong to the active thread. Expected thread "${Y}" but cursor "${G}" belongs to "${B.threadId}". Pass threadId="${B.threadId}" to browse that thread, or omit threadId and use this cursor directly in resource scope.`,count:0,cursor:G,page:N,limit:D,detail:W,hasNextPage:!1,hasPrevPage:!1,truncated:!1,tokenOffset:0};let E=O??Y;if(!E)throw Error("Thread ID is required for recall");let M=N>0,R=Math.max(Math.abs(N),1)-1,q=R*D,w=q+D+1,P=(await $.recall({threadId:E,resourceId:X,page:0,perPage:w,orderBy:{field:"createdAt",direction:M?"ASC":"DESC"},filter:{dateRange:M?{start:B.createdAt,startExclusive:!0}:{end:B.createdAt,endExclusive:!0}}})).messages.filter(pX0),_=P.length,C=_>q+D,k;if(M)k=P.slice(q,q+D);else{let u=Math.max(_-q,0),b=Math.max(u-D,0);k=P.slice(b,u)}let S=M?C:R>0,T=M?R>0:C,v=[],x=new Map;for(let u of k)x.set(u.id,u.createdAt),v.push(...dX0(u,W));if(K)v=v.filter((u)=>(u.type==="tool-call"||u.type==="tool-result")&&u.toolName===K);if(Z)v=v.filter((u)=>u.type===Z);if(W==="high"&&v.length>0){let u=v[0],b=v.filter((t)=>t.messageId===u.messageId),g=v.filter((t)=>t.messageId!==u.messageId),p=Gl0([u],x,{maxTokens:z}),h=p.text,n=[];if(b.length>1){let t=b[1];n.push(`next part: partIndex=${t.partIndex} on cursor="${u.messageId}"`)}if(g.length>0){let t=g[0];n.push(`next message: partIndex=${t.partIndex} on cursor="${t.messageId}"`)}else if(S)n.push(`more messages available on page ${N+1}`);if(n.length>0)h+=`

High detail returns 1 part at a time. To continue: ${n.join(", or ")}.`;return{messages:h,count:1,cursor:G,page:N,limit:D,detail:W,hasNextPage:g.length>0||S,hasPrevPage:T,truncated:p.truncated,tokenOffset:p.tokenOffset}}let y=Gl0(v,x,{maxTokens:z}),d=v.length===0?Z||K?"(no message parts matched the current filters)":"(no visible message parts found for this page)":"(no messages found)";return{messages:y.text||d,count:k.length,cursor:G,page:N,limit:D,detail:W,hasNextPage:S,hasPrevPage:T,truncated:y.truncated,tokenOffset:y.tokenOffset}}async function BT9({memory:$,threadId:Y,resourceId:X,page:G=1,limit:J=20,detail:Q="low",partType:W,toolName:Z,anchor:K="start",maxTokens:H=oX0}){if(!$)throw Error("Memory instance is required for recall");if(!Y)throw Error("Thread ID is required for recall");if(X&&$.getThreadById){let C=await $.getThreadById({threadId:Y});if(!C||C.resourceId!==X)throw Error("Thread not found")}let z=50,V=20,A=Math.max(Math.min(G,z),1),F=Math.min(Math.max(J,1),V),N=A-1,D=N*F+F+1,L=await $.recall({threadId:Y,resourceId:X,page:0,perPage:D,orderBy:{field:"createdAt",direction:K==="end"?"DESC":"ASC"}}),B=K==="end"?L.messages.slice(0,D).filter(pX0).reverse():L.messages.slice(0,D).filter(pX0),O=N*F,E=B.slice(O,O+F),M=B.length>O+E.length,R=E.length>0?K==="end"?N>0:M:!1,q=E.length>0?K==="end"?M:N>0:N>0,w=[],I=new Map;for(let C of E)I.set(C.id,C.createdAt),w.push(...dX0(C,Q));if(Z)w=w.filter((C)=>(C.type==="tool-call"||C.type==="tool-result")&&C.toolName===Z);if(W)w=w.filter((C)=>C.type===W);let P=Gl0(w,I,{maxTokens:H}),_=E.length===0?N>0?`(no messages found on page ${A} for this thread)`:"(no messages in this thread)":W||Z?"(no message parts matched the current filters)":"(no messages found)";return{messages:P.text||_,count:E.length,cursor:E[0]?.id||"",page:A,limit:F,detail:Q,hasNextPage:R,hasPrevPage:q,truncated:P.truncated,tokenOffset:P.tokenOffset}}var OT9=($,Y)=>{let G=(Y?.retrievalScope??"thread")==="resource";return X8({id:"recall",description:G?'Browse conversation history. Use mode="threads" to list all threads for the current user. Use mode="messages" (default) to browse messages in the current thread or pass threadId to browse another thread in the active resource. When mode="messages" has no cursor or threadId, it defaults to the current thread and says so at the top of the result. If you pass only a cursor, it must belong to the current thread. Use mode="search" to find messages by content across all threads.':`Browse conversation history in the current thread. Use mode="messages" (default) to page through messages near a cursor. Use mode="search" to find messages by content in this thread. Use mode="threads" to get the current thread's ID and title.`,inputSchema:U.object({...G?{mode:U.enum(["messages","threads","search"]).optional().describe('What to retrieve. "messages" (default) pages through message history. "threads" lists all threads for the current user. "search" finds messages by semantic similarity across all threads.'),threadId:U.string().min(1).optional().describe('Browse a different thread, or use "current" for the active thread. Use mode="threads" first to discover thread IDs.'),before:U.string().optional().describe('For mode="threads": only show threads created before this date. ISO 8601 or natural date string (e.g. "2026-03-15", "2026-03-10T00:00:00Z").'),after:U.string().optional().describe('For mode="threads": only show threads created after this date. ISO 8601 or natural date string (e.g. "2026-03-01", "2026-03-10T00:00:00Z").')}:{mode:U.enum(["messages","threads","search"]).optional().describe('What to retrieve. "messages" (default) pages through message history. "threads" returns info about the current thread. "search" finds messages by semantic similarity in this thread.')},query:U.string().min(1).optional().describe('Search query for mode="search". Finds messages semantically similar to this text.'),cursor:U.string().min(1).optional().describe('A message ID to use as the pagination cursor. For mode="messages", omit both cursor and threadId to browse the current thread. If only cursor is provided, it must belong to the current thread. Extract it from the start or end of an observation group range.'),anchor:U.enum(["start","end"]).optional().describe('For mode="messages" without a cursor, page from the start (oldest-first) or end (newest-first) of the thread. Defaults to "start".'),page:U.number().int().min(-50).max(50).optional().describe("Pagination offset. For messages: positive pages move forward from cursor, negative move backward. For threads: page number (0-indexed). 0 is treated as 1 for messages."),limit:U.number().int().positive().max(20).optional().describe("Maximum number of items to return per page. Defaults to 20."),detail:U.enum(["low","high"]).optional().describe('Detail level for messages. "low" (default) returns truncated text and tool names. "high" returns full content with tool args/results.'),partType:U.enum(["text","tool-call","tool-result","reasoning","image","file"]).optional().describe('Filter results to only include parts of this type. Only applies to mode="messages".'),toolName:U.string().min(1).optional().describe('Filter results to only include tool-call and tool-result parts matching this tool name. Only applies to mode="messages".'),partIndex:U.number().int().min(0).optional().describe("Fetch a single part from the cursor message by its positional index. When provided, returns only that part at high detail. Indices are shown as [p0], [p1], etc. in recall results.")}),execute:async({mode:Q,query:W,cursor:Z,threadId:K,anchor:H,page:z,limit:V,detail:A,partType:F,toolName:N,partIndex:D,before:L,after:B},O)=>{let E=O?.memory,M=O?.agent?.threadId,R=O?.agent?.resourceId,q=K==="current"?M:K;if(!E)throw Error("Memory instance is required for recall");if(K==="current"&&!M)throw Error("Could not resolve current thread.");if(Q==="search"){if(!W)throw Error('query is required for mode="search"');if(!R)throw Error("Resource ID is required for recall");return ZT9({memory:E,resourceId:R,currentThreadId:M||void 0,query:W,topK:V??10,before:L,after:B,threadScope:!G?M||void 0:q||void 0})}if(Q==="threads"){if(!G||K==="current"){if(!M||!E.getThreadById)return{error:"Could not resolve current thread."};let x=await E.getThreadById({threadId:M});if(!x)return{error:"Could not resolve current thread."};if(G&&R&&x.resourceId!==R)throw Error("Thread does not belong to the active resource");return{threads:`- **${x.title||"(untitled)"}** \u2190 current
  id: ${x.id}
  updated: ${SC(x.updatedAt)} | created: ${SC(x.createdAt)}`,count:1,page:0,hasMore:!1}}if(!R)throw Error("Resource ID is required for recall");return WT9({memory:E,resourceId:R,currentThreadId:M||"",page:z??0,limit:V??20,before:L,after:B})}let w=G&&!K&&!Z&&Boolean(M),I=w?`threadId wasn't passed so used default ${M}.

`:"",P=K||(w?"current":void 0),_=P==="current"?M:P,C=typeof _==="string"&&_.length>0,k=typeof Z==="string"&&Z.length>0;if(!C&&!k)throw Error('Either cursor or threadId is required for mode="messages"');let S,T;if(!G)S=M,T=M||void 0;else if(C){if(!R)throw Error("Resource ID is required for recall");if(!E.getThreadById)throw Error("Memory instance cannot verify thread access for recall");let v=await E.getThreadById({threadId:_});if(!v||v.resourceId!==R)throw Error("Thread does not belong to the active resource");S=v.id,T=v.id}else S=M,T=M||void 0;if(k&&!C&&!M){if(!G)throw Error("Current thread is required when browsing by cursor");let v=await Tl0(E,Z,{resourceId:R});if("hint"in v)return{messages:v.hint,count:0,cursor:Z,page:z??1,limit:Math.min(V??20,20),detail:A??"low",hasNextPage:!1,hasPrevPage:!1,truncated:!1,tokenOffset:0};S=v.threadId}if(!S)throw Error("Thread ID is required for recall");if(!Z){let v=await BT9({memory:E,threadId:S,resourceId:G?R:void 0,page:z??1,limit:V??20,detail:A??"low",partType:F,toolName:N,anchor:H??"start"});if(I)return{...v,messages:`${I}${v.messages}`};return v}if(D!==void 0&&D!==null)return NT9({memory:E,threadId:S,resourceId:G?R:void 0,cursor:Z,partIndex:D,threadScope:T});return LT9({memory:E,threadId:S,resourceId:G?R:void 0,cursor:Z,page:z,limit:V,detail:A??"low",partType:F,toolName:N,threadScope:T})}})};function sP4($,Y){if(!Y||typeof Y!=="object"||Object.keys(Y).length===0)return $&&typeof $==="object"?{...$}:{};if(!$||typeof $!=="object")return Y;let X={...$};for(let G of Object.keys(Y)){let J=Y[G],Q=X[G];if(J===null)delete X[G];else if(Array.isArray(J))X[G]=J;else if(typeof J==="object"&&J!==null&&typeof Q==="object"&&Q!==null&&!Array.isArray(Q))X[G]=sP4(Q,J);else X[G]=J}return X}function cX0($,Y){if(Array.isArray($)){let X=Y.items??{};return $.map((G)=>cX0(G,X))}if(typeof $==="object"&&$!==null){let X=Y.properties??{},G=Y.required??[],J={};for(let[Q,W]of Object.entries($)){if(W===null&&!G.includes(Q))continue;J[Q]=cX0(W,X[Q]??{})}return J}return $}var ET9=($)=>{let Y=$?.workingMemory?.schema,X=U.object({memory:U.string().describe("The Markdown formatted working memory content to store. This MUST be a string. Never pass an object.")});if(Y){let Q=V5(Y)?Y:W4(Y),W=$6(Q,{io:"input"});delete W.$schema;let Z=W4({$schema:"http://json-schema.org/draft-07/schema#",type:"object",description:"The JSON formatted working memory content to store.",properties:{memory:W},required:["memory"]});X={"~standard":{version:1,vendor:"mastra",validate:(K)=>{let H=Z["~standard"].validate(K);if(H instanceof Promise)return H.then((z)=>{if(!("issues"in z)||!z.issues)return z;if(!K||typeof K!=="object"||Array.isArray(K)||"memory"in K)return z;return Z["~standard"].validate({memory:cX0(K,W)})});if(!("issues"in H)||!H.issues)return H;if(!K||typeof K!=="object"||Array.isArray(K)||"memory"in K)return H;return Z["~standard"].validate({memory:cX0(K,W)})},jsonSchema:{input:(K)=>Z["~standard"].jsonSchema.input(K),output:(K)=>Z["~standard"].jsonSchema.output(K)}}}}let G=Boolean(Y);return X8({id:"update-working-memory",description:Y?"Update the working memory with new information. Data is merged with existing memory - only include fields you want to add or update. To preserve existing data, omit the field entirely. Arrays are replaced entirely when provided, so pass the complete array or omit it to keep the existing values.":"Update the working memory with new information. Any data not included will be overwritten. Always pass data as string to the memory field. Never pass an object.",inputSchema:X,execute:async(Q,W)=>{let Z=W?.agent?.threadId,K=W?.agent?.resourceId,H=W?.memory;if(!H)throw Error("Memory instance is required for working memory updates");let z=$?.workingMemory?.scope||"resource";if(z==="thread"&&!Z)throw Error("Thread ID is required for thread-scoped working memory updates");if(z==="resource"&&!K)throw Error("Resource ID is required for resource-scoped working memory updates");if(Z){let A=await H.getThreadById({threadId:Z});if(!A)A=await H.createThread({threadId:Z,resourceId:K,memoryConfig:$});if(A.resourceId&&K&&A.resourceId!==K)throw Error(`Thread with id ${Z} resourceId does not match the current resourceId ${K}`)}let V;if(G){let A=await H.getWorkingMemory({threadId:Z,resourceId:K,memoryConfig:$}),F=null;if(A)try{F=typeof A==="string"?JSON.parse(A):A}catch{F=null}let N=Q.memory;if(N===void 0||N===null)return{success:!0,message:"No memory data provided, existing memory unchanged."};let D;if(typeof N==="string")try{D=JSON.parse(N)}catch(B){let O=B instanceof Error?B.message:String(B);throw Error(`Failed to parse working memory input as JSON: ${O}. Raw input: ${N.length>500?N.slice(0,500)+"...":N}`)}else D=N;let L=sP4(F,D);V=JSON.stringify(L)}else{let A=Q.memory;V=typeof A==="string"?A:JSON.stringify(A);let F=await H.getWorkingMemory({threadId:Z,resourceId:K,memoryConfig:$});if(F){let N=await H.getWorkingMemoryTemplate({memoryConfig:$});if(N?.content){let D=V.replace(/\s+/g," ").trim(),L=N.content.replace(/\s+/g," ").trim(),B=F.replace(/\s+/g," ").trim();if(D===L&&B!==L)return{success:!1,message:"Attempted to replace existing working memory with empty template. Update skipped to prevent data loss."}}}}return await H.updateWorkingMemory({threadId:Z,resourceId:K,workingMemory:V,memoryConfig:$}),{success:!0}}})},MT9=($)=>{return X8({id:"update-working-memory",description:"Update the working memory with new information.",inputSchema:U.object({newMemory:U.string().optional().describe(`The ${$.workingMemory?.schema?"JSON":"Markdown"} formatted working memory content to store`),searchString:U.string().optional().describe("The working memory string to find. Will be replaced with the newMemory string. If this is omitted or doesn't exist, the newMemory string will be appended to the end of your working memory. Replacing single lines at a time is encouraged for greater accuracy. If updateReason is not 'append-new-memory', this search string must be provided or the tool call will be rejected."),updateReason:U.enum(["append-new-memory","clarify-existing-memory","replace-irrelevant-memory"]).optional().describe("The reason you're updating working memory. Passing any value other than 'append-new-memory' requires a searchString to be provided. Defaults to append-new-memory")}),execute:async(Y,X)=>{let G=X?.agent?.threadId,J=X?.agent?.resourceId,Q=X?.memory;if(!Q)throw Error("Memory instance is required for working memory updates");let W=$.workingMemory?.scope||"resource";if(W==="thread"&&!G)throw Error("Thread ID is required for thread-scoped working memory updates");if(W==="resource"&&!J)throw Error("Resource ID is required for resource-scoped working memory updates");if(G){let H=await Q.getThreadById({threadId:G});if(!H)H=await Q.createThread({threadId:G,resourceId:J,memoryConfig:$});if(H.resourceId&&J&&H.resourceId!==J)throw Error(`Thread with id ${G} resourceId does not match the current resourceId ${J}`)}let Z=Y.newMemory||"";if(!Y.updateReason)Y.updateReason="append-new-memory";if(Y.searchString&&$.workingMemory?.scope==="resource"&&Y.updateReason==="replace-irrelevant-memory")Y.searchString=void 0;if(Y.updateReason==="append-new-memory"&&Y.searchString)Y.searchString=void 0;if(Y.updateReason!=="append-new-memory"&&!Y.searchString)return{success:!1,reason:`updateReason was ${Y.updateReason} but no searchString was provided. Unable to replace undefined with "${Y.newMemory}"`};let K=await Q.__experimental_updateWorkingMemoryVNext({threadId:G,resourceId:J,workingMemory:Z,searchString:Y.searchString,memoryConfig:$});if(K)return K;return{success:!0}}})},lX0="<working_memory>",Jl0="</working_memory>",RT9="dynamicAgentsMdReminder";function Gd($){return typeof $==="object"&&$!==null}function Zq4($){let Y="",X=0;while(X<$.length){let G=$.indexOf(lX0,X);if(G===-1){Y+=$.substring(X);break}Y+=$.substring(X,G);let J=$.indexOf(Jl0,G+lX0.length);if(J===-1){Y+=$.substring(G);break}X=J+Jl0.length}return Y}function qT9($){let Y=$.indexOf(lX0);if(Y===-1)return null;let X=Y+lX0.length,G=$.indexOf(Jl0,X);if(G===-1)return null;return $.substring(X,G)}function IT9($){if(!Gd($.content))return!1;let Y=$.content.metadata;if($.role==="signal")return Gd(Y)&&Gd(Y.signal)&&Y.signal.type==="system-reminder";if($.role!=="user")return!1;if(Gd(Y)&&(Gd(Y.systemReminder)||(RT9 in Y)))return!0;let X=$.content.parts.find((G)=>G.type==="text");return typeof X?.text==="string"&&X.text.startsWith("<system-reminder")}function PT9($,Y){if(Y)return $;return $.filter((X)=>!IT9(X))}function Jd($){if($===!0)return{model:"google/gemini-2.5-flash"};if($===!1||$===void 0)return;if(typeof $==="object"&&$.enabled===!1)return;return $}var wT9=4,_T9={before:1,after:1},jT9=4,PX0=100,oP4=class extends Fg0{_omEngine;_omEngineInstance;_mastraInstance;get omEngine(){if(!this._omEngine)this._omEngine=this._initOMEngine().then(($)=>{if(this._omEngineInstance=$,$&&this._mastraInstance)$.__registerMastra(this._mastraInstance);return $});return this._omEngine}__registerMastra($){if(super.__registerMastra($),this._mastraInstance=$,this._omEngineInstance)this._omEngineInstance.__registerMastra($);else this._omEngine?.then((Y)=>Y?.__registerMastra($))}constructor($={}){super({name:"Memory",...$});let Y=this.getMergedThreadConfig({workingMemory:$.options?.workingMemory||{enabled:!1,template:this.defaultWorkingMemoryTemplate},observationalMemory:$.options?.observationalMemory});this.threadConfig=Y;let X=Jd(Y.observationalMemory);if(X?.retrieval&&typeof X.retrieval==="object"&&X.retrieval.vector){if(!this.vector)throw Error("`retrieval: { vector: true }` requires a vector store. Pass a `vector` option to your Memory instance.");if(!this.embedder)throw Error("`retrieval: { vector: true }` requires an embedder. Pass an `embedder` option to your Memory instance.")}}async getMemoryStore(){let $=await this.storage.getStore("memory");if(!$)throw Error(`Memory storage domain is not available on ${this.storage.constructor.name}`);return $}async listMessagesByResourceId($){return(await this.getMemoryStore()).listMessagesByResourceId($)}async validateThreadIsOwnedByResource($,Y,X){let G=typeof X?.semanticRecall==="object"&&X?.semanticRecall?.scope!=="thread"||X.semanticRecall===!0,J=await this.getThreadById({threadId:$});if(!J&&!G)throw Error(`No thread found with id ${$}`);if(J&&J.resourceId!==Y)throw Error(`Thread with id ${$} is for resource with id ${J.resourceId} but resource ${Y} was queried.`)}createMemorySpan($,Y,X,G){let J=Y?.tracingContext?.currentSpan;if(!J)return;return J.createChildSpan({type:mz.MEMORY_OPERATION,name:`memory: ${$}`,entityType:J6.MEMORY,entityName:"Memory",input:X,attributes:{operationType:$,...G}})}async recall($){let{threadId:Y,resourceId:X,perPage:G,page:J,orderBy:Q,threadConfig:W,vectorSearchString:Z,includeSystemReminders:K,filter:H}=$,z=this.getMergedThreadConfig(W||{}),V=Boolean(z.semanticRecall),A=this.createMemorySpan("recall",$.observabilityContext,{threadId:Y,resourceId:X,vectorSearchString:Z},{semanticRecallEnabled:V,lastMessages:z.lastMessages});try{if(X)await this.validateThreadIsOwnedByResource(Y,X,z);let F=G!==void 0?G:z.lastMessages,N=z.lastMessages===!1&&G===void 0,D=!Q&&F!==!1,L=D?{field:"createdAt",direction:"DESC"}:Q,B=[];this.logger.debug("Memory recall",{threadId:Y,perPage:F,page:J,orderBy:L,hasWorkingMemorySchema:Boolean(z.workingMemory?.schema),workingMemoryEnabled:z.workingMemory?.enabled,semanticRecallEnabled:V,historyDisabledByConfig:N});let O=_T9,E=jT9,M=typeof z?.semanticRecall==="boolean"?{topK:E,messageRange:O}:{topK:z?.semanticRecall?.topK??E,messageRange:z?.semanticRecall?.messageRange??O},R=typeof z?.semanticRecall==="object"&&z?.semanticRecall?.scope!=="thread"||z.semanticRecall===!0;if(R&&!X&&z?.semanticRecall&&Z)throw Error("Memory error: Resource-scoped semantic recall is enabled but no resourceId was provided. Either provide a resourceId or explicitly set semanticRecall.scope to 'thread'.");let q;if(N&&(!z.semanticRecall||!Z||!this.vector)){let d={messages:[],usage:void 0,total:0,page:J??0,perPage:0,hasMore:!1};return A?.end({output:{success:!0},attributes:{messageCount:0}}),d}if(z?.semanticRecall&&Z&&this.vector){let d=await this.embedMessageContent(Z);q=d.usage;let{embeddings:u,dimension:b}=d,{indexName:g}=await this.createEmbeddingIndex(b,z);await Promise.all(u.map(async(p)=>{if(typeof this.vector>"u")throw Error(`Tried to query vector index ${g} but this Memory instance doesn't have an attached vector db.`);let h=R?{resource_id:X}:{thread_id:Y},n=typeof z.semanticRecall==="object"?z.semanticRecall.filter:void 0,t=n?{$and:[h,n]}:h;B.push(...await this.vector.query({indexName:g,queryVector:p,topK:M.topK,filter:t}))}))}let w=await this.getMemoryStore(),I=N?0:F,P=await w.listMessages({threadId:Y,resourceId:X,perPage:I,page:J,orderBy:L,filter:H,...B?.length?{include:B.map((d)=>({id:d.metadata?.message_id,threadId:d.metadata?.thread_id,withNextMessages:typeof M.messageRange==="number"?M.messageRange:M.messageRange.after,withPreviousMessages:typeof M.messageRange==="number"?M.messageRange:M.messageRange.before}))}:{}}),_=D?P.messages.reverse():P.messages,C=new l6({threadId:Y,resourceId:X}).add(_,"memory"),k=PT9(C.get.all.db(),K),{total:S,page:T,perPage:v,hasMore:x}=P,y={messages:k,usage:q,total:S,page:T,perPage:v,hasMore:x};return A?.end({output:{success:!0},attributes:{messageCount:k.length,embeddingTokens:q?.tokens,vectorResultCount:B.length}}),y}catch(F){throw A?.error({error:F,endSpan:!0}),F}}async getThreadById({threadId:$,resourceId:Y}){return(await this.getMemoryStore()).getThreadById({threadId:$,resourceId:Y})}async listThreads($){return(await this.getMemoryStore()).listThreads($)}async handleWorkingMemoryFromMetadata({workingMemory:$,resourceId:Y,memoryConfig:X}){let G=this.getMergedThreadConfig(X||{});if(G.workingMemory?.enabled){if((G.workingMemory.scope||"resource")==="resource"&&Y)await(await this.getMemoryStore()).updateResource({resourceId:Y,workingMemory:$})}}async saveThread({thread:$,memoryConfig:Y}){let G=await(await this.getMemoryStore()).saveThread({thread:$});if($.metadata?.workingMemory&&typeof $.metadata.workingMemory==="string"&&$.resourceId)await this.handleWorkingMemoryFromMetadata({workingMemory:$.metadata.workingMemory,resourceId:$.resourceId,memoryConfig:Y});return G}async updateThread({id:$,title:Y,metadata:X,memoryConfig:G}){let Q=await(await this.getMemoryStore()).updateThread({id:$,title:Y,metadata:X});if(X?.workingMemory&&typeof X.workingMemory==="string"&&Q.resourceId)await this.handleWorkingMemoryFromMetadata({workingMemory:X.workingMemory,resourceId:Q.resourceId,memoryConfig:G});return Q}async deleteThread($){let Y=await this.getMemoryStore(),X=await Y.getThreadById({threadId:$});if(await Y.deleteThread({threadId:$}),X?.resourceId&&Y.supportsObservationalMemory)await Y.clearObservationalMemory($,X.resourceId);if(this.vector)this.deleteThreadVectors($)}async getMemoryVectorIndexes(){if(!this.vector)return[];let Y=`memory${this.vector.indexSeparator??"_"}messages`;return(await this.vector.listIndexes()).filter((G)=>G.startsWith(Y))}async deleteThreadVectors($){try{let Y=await this.getMemoryVectorIndexes();await Promise.all(Y.map(async(X)=>{try{await this.vector.deleteVectors({indexName:X,filter:{thread_id:$}})}catch{this.logger.debug("Failed to delete vectors for thread, skipping",{threadId:$,indexName:X})}}))}catch{this.logger.debug("Failed to clean up vectors for thread",{threadId:$})}}async updateWorkingMemory({threadId:$,resourceId:Y,workingMemory:X,memoryConfig:G,observabilityContext:J}){let Q=this.getMergedThreadConfig(G||{});if(!Q.workingMemory?.enabled)throw Error("Working memory is not enabled for this memory instance");let W=this.createMemorySpan("update",J,{threadId:$,resourceId:Y},{workingMemoryEnabled:!0});try{let Z=Q.workingMemory.scope||"resource";if(Z==="resource"&&!Y)throw Error("Memory error: Resource-scoped working memory is enabled but no resourceId was provided. Either provide a resourceId or explicitly set workingMemory.scope to 'thread'.");let K=Z==="resource"?`resource-${Y}`:`thread-${$}`,H=this.updateWorkingMemoryMutexes.has(K)?this.updateWorkingMemoryMutexes.get(K):new MX0;this.updateWorkingMemoryMutexes.set(K,H);let z=await H.acquire();try{let V=await this.getMemoryStore();if(Z==="resource"&&Y)await V.updateResource({resourceId:Y,workingMemory:X});else{let A=await this.getThreadById({threadId:$});if(!A)throw Error(`Thread ${$} not found`);await V.updateThread({id:$,title:A.title||"",metadata:{...A.metadata,workingMemory:X}})}}finally{z()}W?.end({output:{success:!0}})}catch(Z){throw W?.error({error:Z,endSpan:!0}),Z}}updateWorkingMemoryMutexes=new Map;async __experimental_updateWorkingMemoryVNext({threadId:$,resourceId:Y,workingMemory:X,searchString:G,memoryConfig:J}){let Q=this.getMergedThreadConfig(J||{});if(!Q.workingMemory?.enabled)throw Error("Working memory is not enabled for this memory instance");let W=J?.workingMemory?.scope==="resource"?`resource-${Y}`:`thread-${$}`,Z=this.updateWorkingMemoryMutexes.has(W)?this.updateWorkingMemoryMutexes.get(W):new MX0;this.updateWorkingMemoryMutexes.set(W,Z);let K=await Z.acquire();try{let H=await this.getWorkingMemory({threadId:$,resourceId:Y,memoryConfig:J})||"",z=await this.getWorkingMemoryTemplate({memoryConfig:J}),V="",A=typeof z?.content==="string"?z.content:null,F=(O)=>O.replace(/\s+/g," ").trim(),N=F(X),D=A?F(A):"";if(H)if(G&&H?.includes(G))X=H.replace(G,X),V="found and replaced searchString with newMemory";else if(H.includes(X)||A?.trim()===X.trim()||N===D)return{success:!1,reason:"attempted to insert duplicate data into working memory. this entry was skipped"};else{if(N===D)return{success:!1,reason:"attempted to append empty template to working memory. this entry was skipped"};if(G)V="attempted to replace working memory string that doesn't exist. Appending to working memory instead.";else V="appended newMemory to end of working memory";X=H+`
${X}`}else if(X===A||N===D)return{success:!1,reason:"try again when you have data to add. newMemory was equal to the working memory template"};else V="started new working memory";if(A){X=X.replaceAll(A,"");let O=A.replace(/\r\n/g,`
`),E=A.replace(/\n/g,`\r
`);X=X.replaceAll(O,""),X=X.replaceAll(E,"")}let L=Q.workingMemory.scope||"resource";if(L==="resource"&&!Y)throw Error("Memory error: Resource-scoped working memory is enabled but no resourceId was provided. Either provide a resourceId or explicitly set workingMemory.scope to 'thread'.");let B=await this.getMemoryStore();if(L==="resource"&&Y){if(await B.updateResource({resourceId:Y,workingMemory:X}),V)return{success:!0,reason:V}}else{let O=await this.getThreadById({threadId:$});if(!O)throw Error(`Thread ${$} not found`);await B.updateThread({id:$,title:O.title||"",metadata:{...O.metadata,workingMemory:X}})}return{success:!0,reason:V}}catch(H){return this.logger.error(H instanceof Error?H.stack||H.message:JSON.stringify(H)),{success:!1,reason:"Tool error."}}finally{K()}}chunkText($,Y=4096){let X=Y*wT9,G=[],J="",Q=$.split(/\s+/);for(let W of Q){let Z=J?" "+W:W;if(J.length+Z.length>X)G.push(J),J=W;else J+=Z}if(J)G.push(J);return G}hasher=wE();embeddingCache=new Map;firstEmbed;async embedMessageContent($){let Y=(await this.hasher).h32($),X=this.embeddingCache.get(Y);if(X)return this.logger.debug("Embedding cache hit",{contentHash:Y,chunks:X.chunks.length}),X;let G=this.chunkText($);if(typeof this.embedder>"u")throw Error("Tried to embed message content but this Memory instance doesn't have an attached embedder.");let J=this.embedder.provider==="fastembed";if(J&&this.firstEmbed instanceof Promise)await this.firstEmbed;let Q;switch(this.embedder.specificationVersion){case"v3":Q=GT9;break;case"v2":Q=HP9;break;default:Q=oE9;break}let Z=Q({values:G,maxRetries:3,model:this.embedder,...this.embedderOptions||{}});if(J&&!this.firstEmbed)this.firstEmbed=Z;let{embeddings:K,usage:H}=await Z,z={embeddings:K,chunks:G,usage:H,dimension:K[0]?.length};return this.embeddingCache.set(Y,z),z}async saveMessages({messages:$,memoryConfig:Y,observabilityContext:X}){let G=this.createMemorySpan("save",X,void 0,{messageCount:$.length});try{let J=$.filter((V)=>V.role!=="system").map((V)=>{return this.updateMessageToHideWorkingMemoryV2(V)}).filter((V)=>Boolean(V)),Q=this.getMergedThreadConfig(Y),W=new l6({generateMessageId:()=>this.generateId()}).add(J,"memory").get.all.db(),Z=await this.getMemoryStore(),K=await Z.saveMessages({messages:W}),H=0;if(this.vector&&Q.semanticRecall){let V=new Map;J.forEach((D)=>{if(D.threadId){if(!V.has(D.threadId))V.set(D.threadId,[]);V.get(D.threadId).push(D)}});let A=new Map;await Promise.all(Array.from(V.keys()).map(async(D)=>{try{let L=await Z.getThreadById({threadId:D});if(L?.metadata)A.set(D,L.metadata)}catch(L){let B=L instanceof Error?L.message:String(L);throw Error(`Could not fetch metadata for thread ${D} while saving semantic recall embeddings: ${B}`)}}));let F=[],N;if(await Promise.all(J.map(async(D)=>{let L=null;if(D.content.content&&typeof D.content.content==="string"&&D.content.content.trim()!=="")L=D.content.content;else if(D.content.parts&&D.content.parts.length>0){let E=D.content.parts.filter((M)=>M.type==="text").map((M)=>M.text).join(" ").trim();if(E)L=E}if(!L)return;let B=await this.embedMessageContent(L);if(N=B.dimension,B.usage?.tokens)H+=B.usage.tokens;let O=D.threadId?A.get(D.threadId)||{}:{};F.push({embeddings:B.embeddings,metadata:B.chunks.map(()=>({...O,message_id:D.id,thread_id:D.threadId,resource_id:D.resourceId}))})})),F.length>0&&N!==void 0){if(typeof this.vector>"u")throw Error("Tried to upsert embeddings but this Memory instance doesn't have an attached vector db.");let{indexName:D}=await this.createEmbeddingIndex(N,Q),L=[],B=[];for(let O of F)L.push(...O.embeddings),B.push(...O.metadata);await this.vector.upsert({indexName:D,vectors:L,metadata:B})}}let z={...K,usage:H>0?{tokens:H}:void 0};return G?.end({output:{success:!0},attributes:{messageCount:W.length,embeddingTokens:z.usage?.tokens,semanticRecallEnabled:Boolean(Q.semanticRecall)}}),z}catch(J){throw G?.error({error:J,endSpan:!0}),J}}updateMessageToHideWorkingMemoryV2($){let Y={...$};if($.content&&typeof $.content==="object"&&!Array.isArray($.content))Y.content={...$.content};if(typeof Y.content?.content==="string"&&Y.content.content.length>0)Y.content.content=Zq4(Y.content.content).trim();if(Array.isArray(Y.content?.parts)){if(Y.content.parts=Y.content.parts.filter((X)=>{if(X?.type==="tool-invocation")return X.toolInvocation?.toolName!=="updateWorkingMemory";return!0}).map((X)=>{if(X?.type==="text"){let G=typeof X.text==="string"?X.text:"";return{...X,text:Zq4(G).trim()}}return X}),Y.content.parts.length===0){if(!(typeof Y.content.content==="string"&&Y.content.content.trim().length>0))return null}}return Y}parseWorkingMemory($){if(!this.threadConfig.workingMemory?.enabled)return null;return qT9($)?.trim()??null}async getWorkingMemory({threadId:$,resourceId:Y,memoryConfig:X}){let G=this.getMergedThreadConfig(X||{});if(!G.workingMemory?.enabled)return null;let J=G.workingMemory.scope||"resource",Q=null;if(J==="resource"&&!Y)throw Error("Memory error: Resource-scoped working memory is enabled but no resourceId was provided. Either provide a resourceId or explicitly set workingMemory.scope to 'thread'.");if(J==="resource"&&Y)Q=(await(await this.getMemoryStore()).getResourceById({resourceId:Y}))?.workingMemory||null;else Q=(await this.getThreadById({threadId:$}))?.metadata?.workingMemory;if(!Q)return null;return Q}async getWorkingMemoryTemplate({memoryConfig:$}){let Y=this.getMergedThreadConfig($);if(!Y.workingMemory?.enabled)return null;if(Y.workingMemory?.schema)try{let G=Y.workingMemory.schema,J;if(V5(G))J=G["~standard"].jsonSchema.output({target:"draft-07"});else J=W4(G)["~standard"].jsonSchema.output({target:"draft-07"});return{format:"json",content:JSON.stringify(J)}}catch(G){throw this.logger.error("Error converting schema",G),G}return{format:"markdown",content:(Y.workingMemory.template||this.defaultWorkingMemoryTemplate).trim()}}async getSystemMessage({threadId:$,resourceId:Y,memoryConfig:X}){let G=this.getMergedThreadConfig(X);if(!G.workingMemory?.enabled)return null;let J=await this.getWorkingMemoryTemplate({memoryConfig:X}),Q=await this.getWorkingMemory({threadId:$,resourceId:Y,memoryConfig:G});if(!J)return null;if(G?.readOnly)return this.getReadOnlyWorkingMemoryInstruction({template:J,data:Q});return this.isVNextWorkingMemoryConfig(X)?this.__experimental_getWorkingMemoryToolInstructionVNext({template:J,data:Q}):this.getWorkingMemoryToolInstruction({template:J,data:Q})}async getContext($){let{threadId:Y,resourceId:X,memoryConfig:G}=$,J=this.getMergedThreadConfig(G),Q=await this.getMemoryStore(),W=[],Z=!1,K=null,H,z,V=await this.omEngine;if(V){if(K=await V.getRecord(Y,X),K?.activeObservations){if(Z=!0,V.scope==="resource"&&X)z=await V.getOtherThreadsContext(X,Y);let N=await V.buildContextSystemMessage({threadId:Y,resourceId:X,record:K,unobservedContextBlocks:z});if(N)W.push(N);let{OBSERVATION_CONTINUATION_HINT:D}=await Promise.resolve().then(() => (cE4(),dE4));H={id:"om-continuation",role:"user",createdAt:new Date(0),content:{format:2,parts:[{type:"text",text:`<system-reminder>${D}</system-reminder>`}]},threadId:Y,resourceId:X}}}let A=await this.getSystemMessage({threadId:Y,resourceId:X,memoryConfig:J});if(A)W.push(A);let F;if(V&&K){let N=K.lastObservedAt?{dateRange:{start:new Date(new Date(K.lastObservedAt).getTime()+1)}}:void 0;if(V.scope==="resource"&&X)F=(await Q.listMessagesByResourceId({resourceId:X,orderBy:{field:"createdAt",direction:"ASC"},perPage:!1,filter:N})).messages;else F=(await Q.listMessages({threadId:Y,orderBy:{field:"createdAt",direction:"ASC"},perPage:!1,filter:N})).messages}else{let N=J.lastMessages;if(N===!1)F=[];else F=(await Q.listMessages({threadId:Y,resourceId:X,orderBy:{field:"createdAt",direction:"DESC"},perPage:typeof N==="number"?N:void 0})).messages.reverse()}return{systemMessage:W.length>0?W.join(`

`):void 0,messages:F,hasObservations:Z,omRecord:K,continuationMessage:H,otherThreadsContext:z}}async persistMessages($){if($.length===0)return;let Y=$.filter((G)=>G.role!=="system");if(Y.length===0)return;await(await this.getMemoryStore()).saveMessages({messages:Y})}async _initOMEngine(){let $=Jd(this.threadConfig.observationalMemory);if(!$)return null;let Y=await this.storage.getStore("memory");if(!Y||!Y.supportsObservationalMemory)return null;if(!IM.has("observationalMemory"))throw Error("Observational memory is enabled but the installed version of @mastra/core does not support it. Please upgrade @mastra/core to a version that includes observational memory support.");if($.observation?.bufferTokens!==!1&&!IM.has("asyncBuffering"))throw Error("Observational memory async buffering is enabled by default but the installed version of @mastra/core does not support it. Either upgrade @mastra/core, @mastra/memory, and your storage adapter (@mastra/libsql, @mastra/pg, or @mastra/mongodb) to the latest version, or explicitly disable async buffering by setting `observation: { bufferTokens: false }` in your observationalMemory config.");if(!IM.has("request-response-id-rotation"))throw Error("Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version.");let{ObservationalMemory:G}=await Promise.resolve().then(() => (Ec0(),Oc0)),J=this.hasRetrievalSearch($.retrieval)?async(Q)=>{await this.indexObservation(Q)}:void 0;return new G({storage:Y,scope:$.scope,retrieval:$.retrieval,activateAfterIdle:$.activateAfterIdle,activateOnProviderChange:$.activateOnProviderChange,shareTokenBudget:$.shareTokenBudget,model:$.model,mastra:this._mastraInstance,onIndexObservations:J,observation:$.observation?{model:$.observation.model,messageTokens:$.observation.messageTokens,modelSettings:$.observation.modelSettings,maxTokensPerBatch:$.observation.maxTokensPerBatch,providerOptions:$.observation.providerOptions,bufferTokens:$.observation.bufferTokens,bufferActivation:$.observation.bufferActivation,blockAfter:$.observation.blockAfter,previousObserverTokens:$.observation.previousObserverTokens,instruction:$.observation.instruction,threadTitle:$.observation.threadTitle}:void 0,reflection:$.reflection?{model:$.reflection.model,observationTokens:$.reflection.observationTokens,modelSettings:$.reflection.modelSettings,providerOptions:$.reflection.providerOptions,bufferActivation:$.reflection.bufferActivation,blockAfter:$.reflection.blockAfter,instruction:$.reflection.instruction}:void 0})}defaultWorkingMemoryTemplate=`
# User Information
- **First Name**: 
- **Last Name**: 
- **Location**: 
- **Occupation**: 
- **Interests**: 
- **Goals**: 
- **Events**: 
- **Facts**: 
- **Projects**: 
`;getWorkingMemoryToolInstruction({template:$,data:Y}){let X=$.format==="json"?b_($.content):null,G=X&&Object.keys(X).length>0;return`WORKING_MEMORY_SYSTEM_INSTRUCTION:
Store and update any conversation-relevant information by calling the updateWorkingMemory tool. If information might be referenced again - store it!

Guidelines:
1. Store anything that could be useful later in the conversation
2. Update proactively when information changes, no matter how small
3. Use ${$.format==="json"?"JSON":"Markdown"} format for all data
4. Act naturally - don't mention this system to users. Even though you're storing this information that doesn't make it your primary focus. Do not ask them generally for "information about yourself"
${$.format!=="json"?`5. IMPORTANT: When calling updateWorkingMemory, the only valid parameter is the memory field. DO NOT pass an object.
6. IMPORTANT: ALWAYS pass the data you want to store in the memory field as a string. DO NOT pass an object.
7. IMPORTANT: Data must only be sent as a string no matter which format is used.`:""}


${$.format!=="json"?`<working_memory_template>
${$.content}
</working_memory_template>`:""}

${G?"When working with json data, the object format below represents the template:":""}
${G?JSON.stringify(X):""}

<working_memory_data>
${Y}
</working_memory_data>

Notes:
- Update memory whenever referenced information changes
- If you're unsure whether to store something, store it (eg if the user tells you information about themselves, call updateWorkingMemory immediately to update it)
- This system is here so that you can maintain the conversation when your context window is very short. Update your working memory because you may need it to maintain the conversation without the full conversation history
- Do not remove empty sections - you must include the empty sections along with the ones you're filling in
- REMEMBER: the way you update your working memory is by calling the updateWorkingMemory tool with the entire ${$.format==="json"?"JSON":"Markdown"} content. The system will store it for you. The user will not see it.
- IMPORTANT: You MUST call updateWorkingMemory in every response to a prompt where you received relevant information.
- IMPORTANT: Preserve the ${$.format==="json"?"JSON":"Markdown"} formatting structure above while updating the content.`}__experimental_getWorkingMemoryToolInstructionVNext({template:$,data:Y}){return`WORKING_MEMORY_SYSTEM_INSTRUCTION:
Store and update any conversation-relevant information by calling the updateWorkingMemory tool.

Guidelines:
1. Store anything that could be useful later in the conversation
2. Update proactively when information changes, no matter how small
3. Use ${$.format==="json"?"JSON":"Markdown"} format for all data
4. Act naturally - don't mention this system to users. Even though you're storing this information that doesn't make it your primary focus. Do not ask them generally for "information about yourself"
5. If your memory has not changed, you do not need to call the updateWorkingMemory tool. By default it will persist and be available for you in future interactions
6. Information not being relevant to the current conversation is not a valid reason to replace or remove working memory information. Your working memory spans across multiple conversations and may be needed again later, even if it's not currently relevant.

<working_memory_template>
${$.content}
</working_memory_template>

<working_memory_data>
${Y}
</working_memory_data>

Notes:
- Update memory whenever referenced information changes
${$.content!==this.defaultWorkingMemoryTemplate?"- Only store information if it's in the working memory template, do not store other information unless the user asks you to remember it, as that non-template information may be irrelevant":`- If you're unsure whether to store something, store it (eg if the user tells you information about themselves, call updateWorkingMemory immediately to update it)
`}
- This system is here so that you can maintain the conversation when your context window is very short. Update your working memory because you may need it to maintain the conversation without the full conversation history
- REMEMBER: the way you update your working memory is by calling the updateWorkingMemory tool with the ${$.format==="json"?"JSON":"Markdown"} content. The system will store it for you. The user will not see it.
- IMPORTANT: You MUST call updateWorkingMemory in every response to a prompt where you received relevant information if that information is not already stored.
- IMPORTANT: Preserve the ${$.format==="json"?"JSON":"Markdown"} formatting structure above while updating the content.
`}getReadOnlyWorkingMemoryInstruction({data:$}){return`WORKING_MEMORY_SYSTEM_INSTRUCTION (READ-ONLY):
The following is your working memory - persistent information about the user and conversation collected over previous interactions. This data is provided for context to help you maintain continuity.

<working_memory_data>
${$||"No working memory data available."}
</working_memory_data>

Guidelines:
1. Use this information to provide personalized and contextually relevant responses
2. Act naturally - don't mention this system to users. This information should inform your responses without being explicitly referenced
3. This memory is read-only in the current session - you cannot update it

Notes:
- This system is here so that you can maintain the conversation when your context window is very short
- The user will not see the working memory data directly`}isVNextWorkingMemoryConfig($){if(!$?.workingMemory)return!1;let Y=!("schema"in $.workingMemory)&&(typeof $.workingMemory.template==="string"||$.workingMemory.template)&&$.workingMemory;return Boolean(Y&&Y.version==="vnext")}getObservationEmbeddingIndexName($){let X=$??384,G=this.vector?.indexSeparator??"_";return`memory${G}observations${G}${X}`}async createObservationEmbeddingIndex($){let X=$??384,G=this.getObservationEmbeddingIndexName($);if(typeof this.vector>"u")throw Error("Tried to create observation embedding index but no vector db is attached to this Memory instance.");return await this.vector.createIndex({indexName:G,dimension:X}),{indexName:G}}async searchMessages({query:$,resourceId:Y,topK:X=10,filter:G}){if(!this.vector)throw Error("searchMessages requires a vector store. Configure vector and embedder on your Memory instance.");let{embeddings:J,dimension:Q}=await this.embedMessageContent($),{indexName:W}=await this.createObservationEmbeddingIndex(Q),Z={resource_id:Y};if(G?.threadId)Z.thread_id=G.threadId;if(G?.observedAfter||G?.observedBefore)Z.observed_at={...G.observedAfter?{$gt:G.observedAfter.toISOString()}:{},...G.observedBefore?{$lt:G.observedBefore.toISOString()}:{}};let K=[];await Promise.all(J.map(async(V)=>{let A=await this.vector.query({indexName:W,queryVector:V,topK:X,filter:Z});for(let F of A){if(!F.metadata?.thread_id)continue;let N=typeof F.metadata.group_id==="string"?F.metadata.group_id:void 0;if(!N)continue;K.push({threadId:F.metadata.thread_id,score:F.score,groupId:N,range:typeof F.metadata.range==="string"?F.metadata.range:void 0,text:typeof F.metadata.text==="string"?F.metadata.text:void 0,observedAt:typeof F.metadata.observed_at==="string"||F.metadata.observed_at instanceof Date?new Date(F.metadata.observed_at):void 0})}}));let H=new Map;for(let V of K){if(!V.groupId)continue;let A=H.get(V.groupId);if(!A||V.score>A.score)H.set(V.groupId,V)}return{results:[...H.values()].sort((V,A)=>A.score-V.score)}}async indexObservation({text:$,groupId:Y,range:X,threadId:G,resourceId:J,observedAt:Q}){if(!this.vector||!this.embedder)return;let W=await this.embedMessageContent($);if(W.embeddings.length===0||W.dimension===void 0)return;let{indexName:Z}=await this.createObservationEmbeddingIndex(W.dimension);await this.vector.upsert({indexName:Z,vectors:W.embeddings,metadata:W.chunks.map((K)=>({group_id:Y,range:X,thread_id:G,resource_id:J,observed_at:Q?.toISOString(),text:K}))})}async updateObservationalMemoryConfig({threadId:$,resourceId:Y,config:X}){let G=await this.omEngine;if(!G)throw Error("Observational memory is not enabled");await G.updateRecordConfig($,Y,X)}async indexMessagesList($){if(!this.vector||!this.embedder)return;let Y=[],X;if(await Promise.all($.map(async(G)=>{let J=null;if(G.content.content&&typeof G.content.content==="string"&&G.content.content.trim()!=="")J=G.content.content;else if(G.content.parts&&G.content.parts.length>0){let W=G.content.parts.filter((Z)=>Z.type==="text").map((Z)=>Z.text).join(" ").trim();if(W)J=W}if(!J)return;let Q=await this.embedMessageContent(J);X=Q.dimension,Y.push({embeddings:Q.embeddings,metadata:Q.chunks.map(()=>({message_id:G.id,thread_id:G.threadId,resource_id:G.resourceId}))})})),Y.length>0&&X!==void 0){let{indexName:G}=await this.createEmbeddingIndex(X),J=[],Q=[];for(let W of Y)J.push(...W.embeddings),Q.push(...W.metadata);await this.vector.upsert({indexName:G,vectors:J,metadata:Q})}}hasRetrievalSearch($){if(!$||$===!0)return!1;return!!$.vector&&!!this.vector&&!!this.embedder}listTools($){let Y=this.getMergedThreadConfig($),X={};if(Y.workingMemory?.enabled&&!Y.readOnly)X.updateWorkingMemory=this.isVNextWorkingMemoryConfig(Y)?MT9(Y):ET9(Y);let G=Jd(Y.observationalMemory);if(G?.retrieval){let J=typeof G.retrieval==="object"?G.retrieval.scope??"resource":"resource";X.recall=OT9(Y,{retrievalScope:J})}return X}async updateMessages({messages:$,memoryConfig:Y}){if($.length===0)return[];let X=await this.getMemoryStore(),G=this.getMergedThreadConfig(Y);if(this.vector&&G.semanticRecall){let J=$.filter((Q)=>Q.content!==void 0);if(J.length>0){let Q=await X.listMessagesById({messageIds:J.map((A)=>A.id)}),W=new Map(Q.messages.map((A)=>[A.id,A])),Z=[],K,H=new Set,z=new Set;await Promise.all(J.map(async(A)=>{let F=W.get(A.id);if(!F)return;let N=null,D=A.content;if(D){if("content"in D&&D.content&&typeof D.content==="string"&&D.content.trim()!=="")N=D.content;else if("parts"in D&&D.parts&&Array.isArray(D.parts)&&D.parts.length>0){let L=D.parts.filter((B)=>B?.type==="text").map((B)=>B.text).join(" ").trim();if(L)N=L}}if(N){let L=await this.embedMessageContent(N);K=L.dimension,Z.push({embeddings:L.embeddings,metadata:L.chunks.map(()=>({message_id:A.id,thread_id:F.threadId,resource_id:F.resourceId}))}),H.add(A.id)}else z.add(A.id)}));let V=new Set([...z,...H]);if(V.size>0)try{let A=await this.getMemoryVectorIndexes(),F=[...V];await Promise.all(A.map(async(N)=>{for(let D=0;D<F.length;D+=PX0){let L=F.slice(D,D+PX0);try{await this.vector.deleteVectors({indexName:N,filter:{message_id:{$in:L}}})}catch{this.logger.debug("Failed to delete vector batch, skipping",{indexName:N,batchOffset:D})}}}))}catch{this.logger.debug("Failed to clean up old vectors during message update")}if(Z.length>0&&K!==void 0){let{indexName:A}=await this.createEmbeddingIndex(K,G),F=[],N=[];for(let D of Z)F.push(...D.embeddings),N.push(...D.metadata);await this.vector.upsert({indexName:A,vectors:F,metadata:N})}}}return X.updateMessages({messages:$})}async deleteMessages($,Y){let X;if(!Array.isArray($))throw Error("Invalid input: must be an array of message IDs or message objects");if($.length===0)return;if(X=$.map((Q)=>{if(typeof Q==="string")return Q;else if(Q&&typeof Q==="object"&&"id"in Q)return Q.id;else throw Error("Invalid input: array items must be strings or objects with an id property")}),X.filter((Q)=>!Q||typeof Q!=="string").length>0)throw Error("All message IDs must be non-empty strings");let J=this.createMemorySpan("delete",Y,void 0,{messageCount:X.length});try{if(await(await this.getMemoryStore()).deleteMessages(X),this.vector)this.deleteMessageVectors(X);J?.end({output:{success:!0},attributes:{messageCount:X.length}})}catch(Q){throw J?.error({error:Q,endSpan:!0}),Q}}async deleteMessageVectors($){try{let Y=await this.getMemoryVectorIndexes();await Promise.all(Y.map(async(X)=>{for(let G=0;G<$.length;G+=PX0){let J=$.slice(G,G+PX0);try{await this.vector.deleteVectors({indexName:X,filter:{message_id:{$in:J}}})}catch{this.logger.debug("Failed to delete vector batch, skipping",{indexName:X,batchOffset:G})}}}))}catch{this.logger.debug("Failed to clean up vectors for deleted messages")}}async cloneThread($,Y){let X=await this.getMemoryStore(),G=await X.cloneThread($),J=this.getMergedThreadConfig(Y),W=(await this.getThreadById({threadId:$.sourceThreadId}))?.resourceId;if(J.workingMemory?.enabled){let Z=J.workingMemory.scope||"resource";if(Z==="thread"||Z==="resource"&&$.resourceId&&$.resourceId!==W){let H=await this.getWorkingMemory({threadId:$.sourceThreadId,resourceId:W,memoryConfig:Y});if(H)await this.updateWorkingMemory({threadId:G.thread.id,resourceId:G.thread.resourceId,workingMemory:H,memoryConfig:Y})}}if(X.supportsObservationalMemory&&W)try{await this.cloneObservationalMemory(X,$.sourceThreadId,W,G)}catch(Z){try{await X.deleteThread({threadId:G.thread.id})}catch(K){this.logger.error("Failed to rollback cloned thread after OM clone failure",K)}throw Z}if(this.vector&&J.semanticRecall&&G.clonedMessages.length>0)await this.embedClonedMessages(G.clonedMessages,J);return G}async cloneObservationalMemory($,Y,X,G){let J=await $.getObservationalMemory(Y,X);if(!J)J=await $.getObservationalMemory(null,X);if(!J)return;let Q=G.thread.id,W=G.thread.resourceId,Z=W!==X;if(J.scope==="resource"&&!Z)return;let K=G.messageIdMap??{},H=await this.hasher,z=this.remapObservationalMemoryRecord(J,{newThreadId:J.scope==="thread"?Q:null,newResourceId:W,messageIdMap:K,sourceThreadId:Z?Y:void 0,clonedThreadId:Z?Q:void 0,hasher:Z?H:void 0}),V=new Date;z.id=crypto.randomUUID(),z.createdAt=V,z.updatedAt=V,await $.insertObservationalMemoryRecord(z)}remapObservationalMemoryRecord($,Y){let{newThreadId:X,newResourceId:G,messageIdMap:J,sourceThreadId:Q,clonedThreadId:W,hasher:Z}=Y,K={...$};if(K.threadId=X,K.resourceId=G,Array.isArray(K.observedMessageIds))K.observedMessageIds=K.observedMessageIds.map((H)=>J[H]).filter((H)=>Boolean(H));else K.observedMessageIds=void 0;if(Array.isArray(K.bufferedMessageIds))K.bufferedMessageIds=K.bufferedMessageIds.map((H)=>J[H]).filter((H)=>Boolean(H));else K.bufferedMessageIds=void 0;if(Array.isArray(K.bufferedObservationChunks))K.bufferedObservationChunks=K.bufferedObservationChunks.map((H)=>({...H,messageIds:Array.isArray(H.messageIds)?H.messageIds.map((z)=>J[z]).filter((z)=>Boolean(z)):[]}));else K.bufferedObservationChunks=void 0;if(Q&&W&&Z){let H=Z.h32ToString(Q),z=Z.h32ToString(W);if(H!==z){let V=(A)=>{if(!A)return A;return A.replaceAll(`<thread id="${H}">`,`<thread id="${z}">`)};if(K.activeObservations=V(K.activeObservations)??"",K.bufferedReflection=V(K.bufferedReflection),K.bufferedObservationChunks)K.bufferedObservationChunks=K.bufferedObservationChunks.map((A)=>({...A,observations:V(A.observations)??A.observations}))}}return K.isObserving=!1,K.isReflecting=!1,K.isBufferingObservation=!1,K.isBufferingReflection=!1,K}async embedClonedMessages($,Y){if(!this.vector||!this.embedder)return;let X=[],G;if(await Promise.all($.map(async(J)=>{let Q=null;if(J.content?.content&&typeof J.content.content==="string"&&J.content.content.trim()!=="")Q=J.content.content;else if(J.content?.parts&&J.content.parts.length>0){let Z=J.content.parts.filter((K)=>K.type==="text").map((K)=>K.text).join(" ").trim();if(Z)Q=Z}if(!Q)return;let W=await this.embedMessageContent(Q);G=W.dimension,X.push({embeddings:W.embeddings,metadata:W.chunks.map(()=>({message_id:J.id,thread_id:J.threadId,resource_id:J.resourceId}))})})),X.length>0&&G!==void 0){let{indexName:J}=await this.createEmbeddingIndex(G,Y),Q=[],W=[];for(let Z of X)Q.push(...Z.embeddings),W.push(...Z.metadata);await this.vector.upsert({indexName:J,vectors:Q,metadata:W})}}getCloneMetadata($){if(!$?.metadata?.clone)return null;return $.metadata.clone}isClone($){return this.getCloneMetadata($)!==null}async getSourceThread($){let Y=await this.getThreadById({threadId:$}),X=this.getCloneMetadata(Y);if(!X)return null;return this.getThreadById({threadId:X.sourceThreadId})}async listClones($,Y){let X=Y;if(!X){let J=await this.getThreadById({threadId:$});if(!J)return[];X=J.resourceId}let{threads:G}=await this.listThreads({filter:{resourceId:X},perPage:!1});return G.filter((J)=>{return this.getCloneMetadata(J)?.sourceThreadId===$})}async getCloneHistory($){let Y=[],X=$;while(X){let G=await this.getThreadById({threadId:X});if(!G)break;Y.unshift(G),X=this.getCloneMetadata(G)?.sourceThreadId??null}return Y}async getInputProcessors($=[],Y){let X=await super.getInputProcessors($,Y),G=await this.createOMProcessor($,Y);if(G)X.push(G);return X}async getOutputProcessors($=[],Y){let X=await super.getOutputProcessors($,Y),G=await this.createOMProcessor($,Y);if(G)X.push(G);return X}async createOMProcessor($=[],Y){if($.some((H)=>!("workflow"in H)&&H.id==="observational-memory"))return null;let G=Y?.get("MastraMemory"),J=Jd(G?.memoryConfig?.observationalMemory),Q=J?this.getMergedThreadConfig({...G?.memoryConfig,observationalMemory:J}):this.threadConfig,W=Jd(Q.observationalMemory);if(!W)return null;let Z=await this.omEngine;if(!Z)return null;let{ObservationalMemoryProcessor:K}=await Promise.resolve().then(() => (Ec0(),Oc0));return new K(Z,this,{temporalMarkers:W.temporalMarkers})}};O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();KY();KY();var R_4=U6(il0(),1),q_4=U6(il0(),1),VS9="vercel.ai.gateway.error",nl0=Symbol.for(VS9),gw4,mw4,yX=class $ extends(mw4=Error,gw4=nl0,mw4){constructor({message:Y,statusCode:X=500,cause:G,generationId:J,isRetryable:Q=X!=null&&(X===408||X===409||X===429||X>=500)}){super(J?`${Y} [${J}]`:Y);this[gw4]=!0,this.statusCode=X,this.cause=G,this.generationId=J,this.isRetryable=Q}static isInstance(Y){return $.hasMarker(Y)}static hasMarker(Y){return typeof Y==="object"&&Y!==null&&nl0 in Y&&Y[nl0]===!0}},F_4="GatewayAuthenticationError",AS9=`vercel.ai.gateway.error.${F_4}`,uw4=Symbol.for(AS9),pw4,dw4,XG0=class $ extends(dw4=yX,pw4=uw4,dw4){constructor({message:Y="Authentication failed",statusCode:X=401,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[pw4]=!0,this.name=F_4,this.type="authentication_error"}static isInstance(Y){return yX.hasMarker(Y)&&uw4 in Y}static createContextualError({apiKeyProvided:Y,oidcTokenProvided:X,message:G="Authentication failed",statusCode:J=401,cause:Q,generationId:W}){let Z;if(Y)Z=`AI Gateway authentication failed: Invalid API key.

Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys

Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;else if(X)Z=`AI Gateway authentication failed: Invalid OIDC token.

Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.

Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;else Z=`AI Gateway authentication failed: No authentication provided.

Option 1 - API key:
Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.

Option 2 - OIDC token:
Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:Z,statusCode:J,cause:Q,generationId:W})}},D_4="GatewayInvalidRequestError",FS9=`vercel.ai.gateway.error.${D_4}`,cw4=Symbol.for(FS9),lw4,iw4,DS9=class extends(iw4=yX,lw4=cw4,iw4){constructor({message:$="Invalid request",statusCode:Y=400,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[lw4]=!0,this.name=D_4,this.type="invalid_request_error"}static isInstance($){return yX.hasMarker($)&&cw4 in $}},N_4="GatewayRateLimitError",NS9=`vercel.ai.gateway.error.${N_4}`,nw4=Symbol.for(NS9),rw4,aw4,LS9=class extends(aw4=yX,rw4=nw4,aw4){constructor({message:$="Rate limit exceeded",statusCode:Y=429,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[rw4]=!0,this.name=N_4,this.type="rate_limit_exceeded"}static isInstance($){return yX.hasMarker($)&&nw4 in $}},L_4="GatewayModelNotFoundError",BS9=`vercel.ai.gateway.error.${L_4}`,sw4=Symbol.for(BS9),OS9=N1(()=>z1(U.object({modelId:U.string()}))),ow4,tw4,ES9=class extends(tw4=yX,ow4=sw4,tw4){constructor({message:$="Model not found",statusCode:Y=404,modelId:X,cause:G,generationId:J}={}){super({message:$,statusCode:Y,cause:G,generationId:J});this[ow4]=!0,this.name=L_4,this.type="model_not_found",this.modelId=X}static isInstance($){return yX.hasMarker($)&&sw4 in $}},B_4="GatewayInternalServerError",MS9=`vercel.ai.gateway.error.${B_4}`,ew4=Symbol.for(MS9),$_4,Y_4,X_4=class extends(Y_4=yX,$_4=ew4,Y_4){constructor({message:$="Internal server error",statusCode:Y=500,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[$_4]=!0,this.name=B_4,this.type="internal_server_error"}static isInstance($){return yX.hasMarker($)&&ew4 in $}},O_4="GatewayResponseError",RS9=`vercel.ai.gateway.error.${O_4}`,G_4=Symbol.for(RS9),J_4,Q_4,qS9=class extends(Q_4=yX,J_4=G_4,Q_4){constructor({message:$="Invalid response from Gateway",statusCode:Y=502,response:X,validationError:G,cause:J,generationId:Q}={}){super({message:$,statusCode:Y,cause:J,generationId:Q});this[J_4]=!0,this.name=O_4,this.type="response_error",this.response=X,this.validationError=G}static isInstance($){return yX.hasMarker($)&&G_4 in $}};async function W_4({response:$,statusCode:Y,defaultMessage:X="Gateway request failed",cause:G,authMethod:J}){var Q;let W=await DG({value:$,schema:IS9});if(!W.success){let V=typeof $==="object"&&$!==null&&"generationId"in $?$.generationId:void 0;return new qS9({message:`Invalid error response format: ${X}`,statusCode:Y,response:$,validationError:W.error,cause:G,generationId:V})}let Z=W.value,K=Z.error.type,H=Z.error.message,z=(Q=Z.generationId)!=null?Q:void 0;switch(K){case"authentication_error":return XG0.createContextualError({apiKeyProvided:J==="api-key",oidcTokenProvided:J==="oidc",statusCode:Y,cause:G,generationId:z});case"invalid_request_error":return new DS9({message:H,statusCode:Y,cause:G,generationId:z});case"rate_limit_exceeded":return new LS9({message:H,statusCode:Y,cause:G,generationId:z});case"model_not_found":{let V=await DG({value:Z.error.param,schema:OS9});return new ES9({message:H,statusCode:Y,modelId:V.success?V.value.modelId:void 0,cause:G,generationId:z})}case"internal_server_error":return new X_4({message:H,statusCode:Y,cause:G,generationId:z});default:return new X_4({message:H,statusCode:Y,cause:G,generationId:z})}}var IS9=N1(()=>z1(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()})));function PS9($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(Y){return $.responseBody}return{}}var E_4="GatewayTimeoutError",wS9=`vercel.ai.gateway.error.${E_4}`,Z_4=Symbol.for(wS9),K_4,U_4,H_4=class $ extends(U_4=yX,K_4=Z_4,U_4){constructor({message:Y="Request timed out",statusCode:X=408,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[K_4]=!0,this.name=E_4,this.type="timeout_error"}static isInstance(Y){return yX.hasMarker(Y)&&Z_4 in Y}static createTimeoutError({originalMessage:Y,statusCode:X=408,cause:G,generationId:J}){let Q=`Gateway request timed out: ${Y}

    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 $({message:Q,statusCode:X,cause:G,generationId:J})}};function z_4($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(Y);return!1}async function uQ($,Y){var X;if(yX.isInstance($))return $;if(z_4($))return H_4.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(n8.isInstance($)){if($.cause&&z_4($.cause))return H_4.createTimeoutError({originalMessage:$.message,cause:$});return await W_4({response:PS9($),statusCode:(X=$.statusCode)!=null?X:500,defaultMessage:"Gateway request failed",cause:$,authMethod:Y})}return await W_4({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:Y})}var M_4="ai-gateway-auth-method";async function NH($){let Y=await DG({value:$[M_4],schema:_S9});return Y.success?Y.value:void 0}var _S9=N1(()=>z1(U.union([U.literal("api-key"),U.literal("oidc")]))),jS9=["embedding","image","language","reranking","video"],V_4=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await FM({url:`${this.config.baseURL}/config`,headers:await S5(this.config.headers()),successfulResponseHandler:O8(TS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return $}catch($){throw await uQ($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:Y}=await FM({url:`${$.origin}/v1/credits`,headers:await S5(this.config.headers()),successfulResponseHandler:O8(CS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Y}catch($){throw await uQ($)}}},TS9=N1(()=>z1(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:$,output:Y,input_cache_read:X,input_cache_write:G})=>({input:$,output:Y,...X?{cachedInputTokens:X}:{},...G?{cacheCreationInputTokens:G}:{}})).nullish(),specification:U.object({specificationVersion:U.literal("v3"),provider:U.string(),modelId:U.string()}),modelType:U.string().nullish()})).transform(($)=>$.filter((Y)=>Y.modelType==null||jS9.includes(Y.modelType)))}))),CS9=N1(()=>z1(U.object({balance:U.string(),total_used:U.string()}).transform(({balance:$,total_used:Y})=>({balance:$,totalUsed:Y})))),SS9=class{constructor($){this.config=$}async getSpendReport($){try{let Y=new URL(this.config.baseURL),X=new URLSearchParams;if(X.set("start_date",$.startDate),X.set("end_date",$.endDate),$.groupBy)X.set("group_by",$.groupBy);if($.datePart)X.set("date_part",$.datePart);if($.userId)X.set("user_id",$.userId);if($.model)X.set("model",$.model);if($.provider)X.set("provider",$.provider);if($.credentialType)X.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)X.set("tags",$.tags.join(","));let{value:G}=await FM({url:`${Y.origin}/v1/report?${X.toString()}`,headers:await S5(this.config.headers()),successfulResponseHandler:O8(kS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(J)=>J}),fetch:this.config.fetch});return G}catch(Y){throw await uQ(Y)}}},kS9=N1(()=>z1(U.object({results:U.array(U.object({day:U.string().optional(),hour:U.string().optional(),user:U.string().optional(),model:U.string().optional(),tag:U.string().optional(),provider:U.string().optional(),credential_type:U.enum(["byok","system"]).optional(),total_cost:U.number(),market_cost:U.number().optional(),input_tokens:U.number().optional(),output_tokens:U.number().optional(),cached_input_tokens:U.number().optional(),cache_creation_input_tokens:U.number().optional(),reasoning_tokens:U.number().optional(),request_count:U.number().optional()}).transform(({credential_type:$,total_cost:Y,market_cost:X,input_tokens:G,output_tokens:J,cached_input_tokens:Q,cache_creation_input_tokens:W,reasoning_tokens:Z,request_count:K,...H})=>({...H,...$!==void 0?{credentialType:$}:{},totalCost:Y,...X!==void 0?{marketCost:X}:{},...G!==void 0?{inputTokens:G}:{},...J!==void 0?{outputTokens:J}:{},...Q!==void 0?{cachedInputTokens:Q}:{},...W!==void 0?{cacheCreationInputTokens:W}:{},...Z!==void 0?{reasoningTokens:Z}:{},...K!==void 0?{requestCount:K}:{}})))}))),vS9=class{constructor($){this.config=$}async getGenerationInfo($){try{let Y=new URL(this.config.baseURL),{value:X}=await FM({url:`${Y.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await S5(this.config.headers()),successfulResponseHandler:O8(xS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(G)=>G}),fetch:this.config.fetch});return X}catch(Y){throw await uQ(Y)}}},xS9=N1(()=>z1(U.object({data:U.object({id:U.string(),total_cost:U.number(),upstream_inference_cost:U.number(),usage:U.number(),created_at:U.string(),model:U.string(),is_byok:U.boolean(),provider_name:U.string(),streamed:U.boolean(),finish_reason:U.string(),latency:U.number(),generation_time:U.number(),native_tokens_prompt:U.number(),native_tokens_completion:U.number(),native_tokens_reasoning:U.number(),native_tokens_cached:U.number(),native_tokens_cache_creation:U.number(),billable_web_search_calls:U.number()}).transform(({total_cost:$,upstream_inference_cost:Y,created_at:X,is_byok:G,provider_name:J,finish_reason:Q,generation_time:W,native_tokens_prompt:Z,native_tokens_completion:K,native_tokens_reasoning:H,native_tokens_cached:z,native_tokens_cache_creation:V,billable_web_search_calls:A,...F})=>({...F,totalCost:$,upstreamInferenceCost:Y,createdAt:X,isByok:G,providerName:J,finishReason:Q,generationTime:W,promptTokens:Z,completionTokens:K,reasoningTokens:H,cachedTokens:z,cacheCreationTokens:V,billableWebSearchCalls:A}))}).transform(({data:$})=>$))),yS9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:Y,...X}=$;return{args:this.maybeEncodeFileParts(X),warnings:[]}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await S5(this.config.headers());try{let{responseHeaders:Q,value:W,rawValue:Z}=await j8({url:this.getUrl(),headers:i6(J,$.headers,this.getModelConfigHeaders(this.modelId,!1),await S5(this.config.o11yHeaders)),body:Y,successfulResponseHandler:O8(U.any()),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(K)=>K}),...G&&{abortSignal:G},fetch:this.config.fetch});return{...W,request:{body:Y},response:{headers:Q,body:Z},warnings:X}}catch(Q){throw await uQ(Q,await NH(J))}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await S5(this.config.headers());try{let{value:Q,responseHeaders:W}=await j8({url:this.getUrl(),headers:i6(J,$.headers,this.getModelConfigHeaders(this.modelId,!0),await S5(this.config.o11yHeaders)),body:Y,successfulResponseHandler:Z2(U.any()),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(Z)=>Z}),...G&&{abortSignal:G},fetch:this.config.fetch});return{stream:Q.pipeThrough(new TransformStream({start(Z){if(X.length>0)Z.enqueue({type:"stream-start",warnings:X})},transform(Z,K){if(Z.success){let H=Z.value;if(H.type==="raw"&&!$.includeRawChunks)return;if(H.type==="response-metadata"&&H.timestamp&&typeof H.timestamp==="string")H.timestamp=new Date(H.timestamp);K.enqueue(H)}else K.error(Z.error)}})),request:{body:Y},response:{headers:W}}}catch(Q){throw await uQ(Q,await NH(J))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let Y of $.prompt)for(let X of Y.content)if(this.isFilePart(X)){let G=X;if(G.data instanceof Uint8Array){let J=Uint8Array.from(G.data),Q=Buffer.from(J).toString("base64");G.data=new URL(`data:${G.mediaType||"application/octet-stream"};base64,${Q}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,Y){return{"ai-language-model-specification-version":"3","ai-language-model-id":$,"ai-language-model-streaming":String(Y)}}},bS9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;let Q=await S5(this.config.headers());try{let{responseHeaders:W,value:Z,rawValue:K}=await j8({url:this.getUrl(),headers:i6(Q,Y!=null?Y:{},this.getModelConfigHeaders(),await S5(this.config.o11yHeaders)),body:{values:$,...G?{providerOptions:G}:{}},successfulResponseHandler:O8(hS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(H)=>H}),...X&&{abortSignal:X},fetch:this.config.fetch});return{embeddings:Z.embeddings,usage:(J=Z.usage)!=null?J:void 0,providerMetadata:Z.providerMetadata,response:{headers:W,body:K},warnings:[]}}catch(W){throw await uQ(W,await NH(Q))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},hS9=N1(()=>z1(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()}))),fS9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,files:Q,mask:W,providerOptions:Z,headers:K,abortSignal:H}){var z,V,A,F;let N=await S5(this.config.headers());try{let{responseHeaders:D,value:L,rawValue:B}=await j8({url:this.getUrl(),headers:i6(N,K!=null?K:{},this.getModelConfigHeaders(),await S5(this.config.o11yHeaders)),body:{prompt:$,n:Y,...X&&{size:X},...G&&{aspectRatio:G},...J&&{seed:J},...Z&&{providerOptions:Z},...Q&&{files:Q.map((O)=>A_4(O))},...W&&{mask:A_4(W)}},successfulResponseHandler:O8(pS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(O)=>O}),...H&&{abortSignal:H},fetch:this.config.fetch});return{images:L.images,warnings:(z=L.warnings)!=null?z:[],providerMetadata:L.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:D},...L.usage!=null&&{usage:{inputTokens:(V=L.usage.inputTokens)!=null?V:void 0,outputTokens:(A=L.usage.outputTokens)!=null?A:void 0,totalTokens:(F=L.usage.totalTokens)!=null?F:void 0}}}}catch(D){throw await uQ(D,await NH(N))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}};function A_4($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:YH($.data)};return $}var gS9=U.object({images:U.array(U.unknown()).optional()}).catchall(U.unknown()),mS9=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()})]),uS9=U.object({inputTokens:U.number().nullish(),outputTokens:U.number().nullish(),totalTokens:U.number().nullish()}),pS9=U.object({images:U.array(U.string()),warnings:U.array(mS9).optional(),providerMetadata:U.record(U.string(),gS9).optional(),usage:uS9.optional()}),dS9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,aspectRatio:X,resolution:G,duration:J,fps:Q,seed:W,image:Z,providerOptions:K,headers:H,abortSignal:z}){var V;let A=await S5(this.config.headers());try{let{responseHeaders:F,value:N}=await j8({url:this.getUrl(),headers:i6(A,H!=null?H:{},this.getModelConfigHeaders(),await S5(this.config.o11yHeaders),{accept:"text/event-stream"}),body:{prompt:$,n:Y,...X&&{aspectRatio:X},...G&&{resolution:G},...J&&{duration:J},...Q&&{fps:Q},...W&&{seed:W},...K&&{providerOptions:K},...Z&&{image:cS9(Z)}},successfulResponseHandler:async({response:D,url:L,requestBodyValues:B})=>{if(D.body==null)throw new n8({message:"SSE response body is empty",url:L,requestBodyValues:B,statusCode:D.status});let E=g$0({stream:D.body,schema:rS9}).getReader(),{done:M,value:R}=await E.read();if(E.releaseLock(),M||!R)throw new n8({message:"SSE stream ended without a data event",url:L,requestBodyValues:B,statusCode:D.status});if(!R.success)throw new n8({message:"Failed to parse video SSE event",cause:R.error,url:L,requestBodyValues:B,statusCode:D.status});let q=R.value;if(q.type==="error")throw new n8({message:q.message,statusCode:q.statusCode,url:L,requestBodyValues:B,responseHeaders:Object.fromEntries([...D.headers]),responseBody:JSON.stringify(q),data:{error:{message:q.message,type:q.errorType,param:q.param}}});return{value:{videos:q.videos,warnings:q.warnings,providerMetadata:q.providerMetadata},responseHeaders:Object.fromEntries([...D.headers])}},failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(D)=>D}),...z&&{abortSignal:z},fetch:this.config.fetch});return{videos:N.videos,warnings:(V=N.warnings)!=null?V:[],providerMetadata:N.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:F}}}catch(F){throw await uQ(F,await NH(A))}}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}};function cS9($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:YH($.data)};return $}var lS9=U.object({videos:U.array(U.unknown()).optional()}).catchall(U.unknown()),iS9=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()})]),nS9=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()})]),rS9=U.discriminatedUnion("type",[U.object({type:U.literal("result"),videos:U.array(iS9),warnings:U.array(nS9).optional(),providerMetadata:U.record(U.string(),lS9).optional()}),U.object({type:U.literal("error"),message:U.string(),errorType:U.string(),statusCode:U.number(),param:U.unknown().nullable()})]),aS9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async doRerank({documents:$,query:Y,topN:X,headers:G,abortSignal:J,providerOptions:Q}){let W=await S5(this.config.headers());try{let{responseHeaders:Z,value:K,rawValue:H}=await j8({url:this.getUrl(),headers:i6(W,G!=null?G:{},this.getModelConfigHeaders(),await S5(this.config.o11yHeaders)),body:{documents:$,query:Y,...X!=null?{topN:X}:{},...Q?{providerOptions:Q}:{}},successfulResponseHandler:O8(sS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(z)=>z}),...J&&{abortSignal:J},fetch:this.config.fetch});return{ranking:K.ranking,providerMetadata:K.providerMetadata,response:{headers:Z,body:H},warnings:[]}}catch(Z){throw await uQ(Z,await NH(W))}}getUrl(){return`${this.config.baseURL}/reranking-model`}getModelConfigHeaders(){return{"ai-reranking-model-specification-version":"3","ai-model-id":this.modelId}}},sS9=N1(()=>z1(U.object({ranking:U.array(U.object({index:U.number(),relevanceScore:U.number()})),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()}))),oS9=N1(()=>z1(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.")}))),tS9=N1(()=>z1(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()})]))),eS9=O7({id:"gateway.parallel_search",inputSchema:oS9,outputSchema:tS9}),$k9=($={})=>eS9($),Yk9=N1(()=>z1(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.")}))),Xk9=N1(()=>z1(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()})]))),Gk9=O7({id:"gateway.perplexity_search",inputSchema:Yk9,outputSchema:Xk9}),Jk9=($={})=>Gk9($),Qk9={parallelSearch:$k9,perplexitySearch:Jk9};async function Wk9(){var $;return($=R_4.getContext().headers)==null?void 0:$["x-vercel-id"]}var Zk9="3.0.115",Kk9="0.0.1";function Uk9($={}){var Y,X;let G=null,J=null,Q=(Y=$.metadataCacheRefreshMillis)!=null?Y:300000,W=0,Z=(X=kT($.baseURL))!=null?X:"https://ai-gateway.vercel.sh/v3/ai",K=async()=>{try{let O=await Hk9($);return pW({Authorization:`Bearer ${O.token}`,"ai-gateway-protocol-version":Kk9,[M_4]:O.authMethod,...$.headers},`ai-sdk/gateway/${Zk9}`)}catch(O){throw XG0.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:O})}},H=()=>{let O=lD({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),E=lD({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),M=lD({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),R=lD({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let q=await Wk9();return{...O&&{"ai-o11y-deployment-id":O},...E&&{"ai-o11y-environment":E},...M&&{"ai-o11y-region":M},...q&&{"ai-o11y-request-id":q},...R&&{"ai-o11y-project-id":R}}}},z=(O)=>{return new yS9(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},V=async()=>{var O,E,M;let R=(M=(E=(O=$._internal)==null?void 0:O.currentDate)==null?void 0:E.call(O).getTime())!=null?M:Date.now();if(!G||R-W>Q)W=R,G=new V_4({baseURL:Z,headers:K,fetch:$.fetch}).getAvailableModels().then((q)=>{return J=q,q}).catch(async(q)=>{throw await uQ(q,await NH(await K()))});return J?Promise.resolve(J):G},A=async()=>{return new V_4({baseURL:Z,headers:K,fetch:$.fetch}).getCredits().catch(async(O)=>{throw await uQ(O,await NH(await K()))})},F=async(O)=>{return new SS9({baseURL:Z,headers:K,fetch:$.fetch}).getSpendReport(O).catch(async(E)=>{throw await uQ(E,await NH(await K()))})},N=async(O)=>{return new vS9({baseURL:Z,headers:K,fetch:$.fetch}).getGenerationInfo(O).catch(async(E)=>{throw await uQ(E,await NH(await K()))})},D=function(O){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return z(O)};D.specificationVersion="v3",D.getAvailableModels=V,D.getCredits=A,D.getSpendReport=F,D.getGenerationInfo=N,D.imageModel=(O)=>{return new fS9(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})},D.languageModel=z;let L=(O)=>{return new bS9(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})};D.embeddingModel=L,D.textEmbeddingModel=L,D.videoModel=(O)=>{return new dS9(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})};let B=(O)=>{return new aS9(O,{provider:"gateway",baseURL:Z,headers:K,fetch:$.fetch,o11yHeaders:H()})};return D.rerankingModel=B,D.reranking=B,D.chat=D.languageModel,D.embedding=D.embeddingModel,D.image=D.imageModel,D.video=D.videoModel,D.tools=Qk9,D}var I_4=Uk9();async function Hk9($){let Y=lD({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(Y)return{token:Y,authMethod:"api-key"};return{token:await q_4.getVercelOidcToken(),authMethod:"oidc"}}O1();O1();O1();O1();O1();O1();var jS4=U6(ui0(),1),dC=U6(ui0(),1);O1();O1();var Ex9=Object.defineProperty,Mx9=($,Y)=>{for(var X in Y)Ex9($,X,{get:Y[X],enumerable:!0})},jC4="AI_InvalidArgumentError",TC4=`vercel.ai.error.${jC4}`,Rx9=Symbol.for(TC4),CC4,LH=class extends G4{constructor({parameter:$,value:Y,message:X}){super({name:jC4,message:`Invalid argument for parameter ${$}: ${X}`});this[CC4]=!0,this.parameter=$,this.value=Y}static isInstance($){return G4.hasMarker($,TC4)}};CC4=Rx9;var qx9="AI_InvalidStreamPartError",Ix9=`vercel.ai.error.${qx9}`,Px9=Symbol.for(Ix9),wx9;wx9=Px9;var SC4="AI_InvalidToolApprovalError",kC4=`vercel.ai.error.${SC4}`,_x9=Symbol.for(kC4),vC4,jx9=class extends G4{constructor({approvalId:$}){super({name:SC4,message:`Tool approval response references unknown approvalId: "${$}". No matching tool-approval-request found in message history.`});this[vC4]=!0,this.approvalId=$}static isInstance($){return G4.hasMarker($,kC4)}};vC4=_x9;var xC4="AI_InvalidToolInputError",yC4=`vercel.ai.error.${xC4}`,Tx9=Symbol.for(yC4),bC4,$n0=class extends G4{constructor({toolInput:$,toolName:Y,cause:X,message:G=`Invalid input for tool ${Y}: ${K3(X)}`}){super({name:xC4,message:G,cause:X});this[bC4]=!0,this.toolInput=$,this.toolName=Y}static isInstance($){return G4.hasMarker($,yC4)}};bC4=Tx9;var hC4="AI_ToolCallNotFoundForApprovalError",fC4=`vercel.ai.error.${hC4}`,Cx9=Symbol.for(fC4),gC4,Yn0=class extends G4{constructor({toolCallId:$,approvalId:Y}){super({name:hC4,message:`Tool call "${$}" not found for approval request "${Y}".`});this[gC4]=!0,this.toolCallId=$,this.approvalId=Y}static isInstance($){return G4.hasMarker($,fC4)}};gC4=Cx9;var mC4="AI_MissingToolResultsError",uC4=`vercel.ai.error.${mC4}`,Sx9=Symbol.for(uC4),pC4,NC4=class extends G4{constructor({toolCallIds:$}){super({name:mC4,message:`Tool result${$.length>1?"s are":" is"} missing for tool call${$.length>1?"s":""} ${$.join(", ")}.`});this[pC4]=!0,this.toolCallIds=$}static isInstance($){return G4.hasMarker($,uC4)}};pC4=Sx9;var kx9="AI_NoImageGeneratedError",vx9=`vercel.ai.error.${kx9}`,xx9=Symbol.for(vx9),yx9;yx9=xx9;var dC4="AI_NoObjectGeneratedError",cC4=`vercel.ai.error.${dC4}`,bx9=Symbol.for(cC4),lC4,NN=class extends G4{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:dC4,message:$,cause:Y});this[lC4]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return G4.hasMarker($,cC4)}};lC4=bx9;var iC4="AI_NoOutputGeneratedError",nC4=`vercel.ai.error.${iC4}`,hx9=Symbol.for(nC4),rC4,aC4=class extends G4{constructor({message:$="No output generated.",cause:Y}={}){super({name:iC4,message:$,cause:Y});this[rC4]=!0}static isInstance($){return G4.hasMarker($,nC4)}};rC4=hx9;var fx9="AI_NoSpeechGeneratedError",gx9=`vercel.ai.error.${fx9}`,mx9=Symbol.for(gx9),ux9;ux9=mx9;var px9="AI_NoTranscriptGeneratedError",dx9=`vercel.ai.error.${px9}`,cx9=Symbol.for(dx9),lx9;lx9=cx9;var ix9="AI_NoVideoGeneratedError",nx9=`vercel.ai.error.${ix9}`,rx9=Symbol.for(nx9),ax9;ax9=rx9;var sC4="AI_NoSuchToolError",oC4=`vercel.ai.error.${sC4}`,sx9=Symbol.for(oC4),tC4,ni0=class extends G4{constructor({toolName:$,availableTools:Y=void 0,message:X=`Model tried to call unavailable tool '${$}'. ${Y===void 0?"No tools are available.":`Available tools: ${Y.join(", ")}.`}`}){super({name:sC4,message:X});this[tC4]=!0,this.toolName=$,this.availableTools=Y}static isInstance($){return G4.hasMarker($,oC4)}};tC4=sx9;var eC4="AI_ToolCallRepairError",$S4=`vercel.ai.error.${eC4}`,ox9=Symbol.for($S4),YS4,tx9=class extends G4{constructor({cause:$,originalError:Y,message:X=`Error repairing tool call: ${K3($)}`}){super({name:eC4,message:X,cause:$});this[YS4]=!0,this.originalError=Y}static isInstance($){return G4.hasMarker($,$S4)}};YS4=ox9;var ex9=class extends G4{constructor($){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${$.version} for provider "${$.provider}" and model "${$.modelId}". AI SDK 5 only supports models that implement specification version "v2".`});this.version=$.version,this.provider=$.provider,this.modelId=$.modelId}},XS4="AI_UIMessageStreamError",GS4=`vercel.ai.error.${XS4}`,$y9=Symbol.for(GS4),JS4,uC=class extends G4{constructor({chunkType:$,chunkId:Y,message:X}){super({name:XS4,message:X});this[JS4]=!0,this.chunkType=$,this.chunkId=Y}static isInstance($){return G4.hasMarker($,GS4)}};JS4=$y9;var Yy9="AI_InvalidDataContentError",Xy9=`vercel.ai.error.${Yy9}`,Gy9=Symbol.for(Xy9),Jy9;Jy9=Gy9;var QS4="AI_InvalidMessageRoleError",WS4=`vercel.ai.error.${QS4}`,Qy9=Symbol.for(WS4),ZS4,Wy9=class extends G4{constructor({role:$,message:Y=`Invalid message role: '${$}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:QS4,message:Y});this[ZS4]=!0,this.role=$}static isInstance($){return G4.hasMarker($,WS4)}};ZS4=Qy9;var KS4="AI_MessageConversionError",US4=`vercel.ai.error.${KS4}`,Zy9=Symbol.for(US4),HS4,Ky9=class extends G4{constructor({originalMessage:$,message:Y}){super({name:KS4,message:Y});this[HS4]=!0,this.originalMessage=$}static isInstance($){return G4.hasMarker($,US4)}};HS4=Zy9;var zS4="AI_RetryError",VS4=`vercel.ai.error.${zS4}`,Uy9=Symbol.for(VS4),AS4,LC4=class extends G4{constructor({message:$,reason:Y,errors:X}){super({name:zS4,message:$});this[AS4]=!0,this.reason=Y,this.errors=X,this.lastError=X[X.length-1]}static isInstance($){return G4.hasMarker($,VS4)}};AS4=Uy9;function XR($){return $===void 0?[]:Array.isArray($)?$:[$]}async function P3($){for(let Y of XR($.callbacks)){if(Y==null)continue;try{await Y($.event)}catch(X){}}}function Hy9({warning:$,provider:Y,model:X}){let G=`AI SDK Warning (${Y} / ${X}):`;switch($.type){case"unsupported":{let J=`${G} The feature "${$.feature}" is not supported.`;if($.details)J+=` ${$.details}`;return J}case"compatibility":{let J=`${G} The feature "${$.feature}" is used in a compatibility mode.`;if($.details)J+=` ${$.details}`;return J}case"other":return`${G} ${$.message}`;default:return`${G} ${JSON.stringify($,null,2)}`}}var zy9="AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false.",BC4=!1,Xn0=($)=>{if($.warnings.length===0)return;let Y=globalThis.AI_SDK_LOG_WARNINGS;if(Y===!1)return;if(typeof Y==="function"){Y($);return}if(!BC4)BC4=!0,console.info(zy9);for(let X of $.warnings)console.warn(Hy9({warning:X,provider:$.provider,model:$.model}))};function Vy9({provider:$,modelId:Y}){Xn0({warnings:[{type:"compatibility",feature:"specificationVersion",details:"Using v2 specification compatibility mode. Some features may not be available."}],provider:$,model:Y})}function Ay9($){if($.specificationVersion==="v3")return $;return Vy9({provider:$.provider,modelId:$.modelId}),new Proxy($,{get(Y,X){switch(X){case"specificationVersion":return"v3";case"doGenerate":return async(...G)=>{let J=await Y.doGenerate(...G);return{...J,finishReason:FS4(J.finishReason),usage:DS4(J.usage)}};case"doStream":return async(...G)=>{let J=await Y.doStream(...G);return{...J,stream:Fy9(J.stream)}};default:return Y[X]}}})}function Fy9($){return $.pipeThrough(new TransformStream({transform(Y,X){switch(Y.type){case"finish":X.enqueue({...Y,finishReason:FS4(Y.finishReason),usage:DS4(Y.usage)});break;default:X.enqueue(Y);break}}}))}function FS4($){return{unified:$==="unknown"?"other":$,raw:void 0}}function DS4($){return{inputTokens:{total:$.inputTokens,noCache:void 0,cacheRead:$.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:$.outputTokens,text:void 0,reasoning:$.reasoningTokens}}}function FG0($){if(typeof $!=="string"){if($.specificationVersion!=="v3"&&$.specificationVersion!=="v2"){let Y=$;throw new ex9({version:Y.specificationVersion,provider:Y.provider,modelId:Y.modelId})}return Ay9($)}return Dy9().languageModel($)}function Dy9(){var $;return($=globalThis.AI_SDK_DEFAULT_PROVIDER)!=null?$:I_4}function Gn0($){if($==null)return;if(typeof $==="number")return $;return $.totalMs}function NS4($){if($==null||typeof $==="number")return;return $.stepMs}function Ny9($){if($==null||typeof $==="number")return;return $.chunkMs}var Ly9=[{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 By9=($)=>{let Y=typeof $==="string"?RJ($):$,X=(Y[6]&127)<<21|(Y[7]&127)<<14|(Y[8]&127)<<7|Y[9]&127;return Y.slice(X+10)};function Oy9($){return typeof $==="string"&&$.startsWith("SUQz")||typeof $!=="string"&&$.length>10&&$[0]===73&&$[1]===68&&$[2]===51?By9($):$}function Ey9({data:$,signatures:Y}){let X=Oy9($),G=typeof X==="string"?RJ(X.substring(0,Math.min(X.length,24))):X;for(let J of Y)if(G.length>=J.bytesPrefix.length&&J.bytesPrefix.every((Q,W)=>Q===null||G[W]===Q))return J.mediaType;return}var LS4="6.0.183",BS4=async({url:$,maxBytes:Y,abortSignal:X})=>{var G;let J=$.toString();pu(J);try{let Q=await fetch(J,{headers:pW({},`ai-sdk/${LS4}`,f$0()),signal:X});if(Q.redirected)pu(Q.url);if(!Q.ok)throw new MJ({url:J,statusCode:Q.status,statusText:Q.statusText});return{data:await ju0({response:Q,url:J,maxBytes:Y!=null?Y:h$0}),mediaType:(G=Q.headers.get("content-type"))!=null?G:void 0}}catch(Q){if(MJ.isInstance(Q))throw Q;throw new MJ({url:J,cause:Q})}},My9=($=BS4)=>(Y)=>Promise.all(Y.map(async(X)=>X.isUrlSupportedByModel?null:$(X)));function Ry9($){try{let[Y,X]=$.split(",");return{mediaType:Y.split(";")[0].split(":")[1],base64Content:X}}catch(Y){return{mediaType:void 0,base64Content:void 0}}}var OS4=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]);function Jn0($){if($ instanceof Uint8Array)return{data:$,mediaType:void 0};if($ instanceof ArrayBuffer)return{data:new Uint8Array($),mediaType:void 0};if(typeof $==="string")try{$=new URL($)}catch(Y){}if($ instanceof URL&&$.protocol==="data:"){let{mediaType:Y,base64Content:X}=Ry9($.toString());if(Y==null||X==null)throw new G4({name:"InvalidDataContentError",message:`Invalid data URL format in content ${$.toString()}`});return{data:X,mediaType:Y}}return{data:$,mediaType:void 0}}function ri0($){if(typeof $==="string")return $;if($ instanceof ArrayBuffer)return YH(new Uint8Array($));return YH($)}async function ES4({prompt:$,supportedUrls:Y,download:X=My9()}){let G=await Iy9($.messages,X,Y),J=new Map;for(let H of $.messages)if(H.role==="assistant"&&Array.isArray(H.content)){for(let z of H.content)if(z.type==="tool-approval-request"&&"approvalId"in z&&"toolCallId"in z)J.set(z.approvalId,z.toolCallId)}let Q=new Set;for(let H of $.messages)if(H.role==="tool"){for(let z of H.content)if(z.type==="tool-approval-response"){let V=J.get(z.approvalId);if(V)Q.add(V)}}let W=[...$.system!=null?typeof $.system==="string"?[{role:"system",content:$.system}]:XR($.system).map((H)=>({role:"system",content:H.content,providerOptions:H.providerOptions})):[],...$.messages.map((H)=>qy9({message:H,downloadedAssets:G}))],Z=[];for(let H of W){if(H.role!=="tool"){Z.push(H);continue}let z=Z.at(-1);if((z==null?void 0:z.role)==="tool")z.content.push(...H.content);else Z.push(H)}let K=new Set;for(let H of Z)switch(H.role){case"assistant":{for(let z of H.content)if(z.type==="tool-call"&&!z.providerExecuted)K.add(z.toolCallId);break}case"tool":{for(let z of H.content)if(z.type==="tool-result")K.delete(z.toolCallId);break}case"user":case"system":for(let z of Q)K.delete(z);if(K.size>0)throw new NC4({toolCallIds:Array.from(K)});break}for(let H of Q)K.delete(H);if(K.size>0)throw new NC4({toolCallIds:Array.from(K)});return Z.filter((H)=>H.role!=="tool"||H.content.length>0)}function qy9({message:$,downloadedAssets:Y}){let X=$.role;switch(X){case"system":return{role:"system",content:$.content,providerOptions:$.providerOptions};case"user":{if(typeof $.content==="string")return{role:"user",content:[{type:"text",text:$.content}],providerOptions:$.providerOptions};return{role:"user",content:$.content.map((G)=>Py9(G,Y)).filter((G)=>G.type!=="text"||G.text!==""),providerOptions:$.providerOptions}}case"assistant":{if(typeof $.content==="string")return{role:"assistant",content:[{type:"text",text:$.content}],providerOptions:$.providerOptions};return{role:"assistant",content:$.content.filter((G)=>G.type!=="text"||G.text!==""||G.providerOptions!=null).filter((G)=>G.type!=="tool-approval-request").map((G)=>{let J=G.providerOptions;switch(G.type){case"file":{let{data:Q,mediaType:W}=Jn0(G.data);return{type:"file",data:Q,filename:G.filename,mediaType:W!=null?W:G.mediaType,providerOptions:J}}case"reasoning":return{type:"reasoning",text:G.text,providerOptions:J};case"text":return{type:"text",text:G.text,providerOptions:J};case"tool-call":return{type:"tool-call",toolCallId:G.toolCallId,toolName:G.toolName,input:G.input,providerExecuted:G.providerExecuted,providerOptions:J};case"tool-result":return{type:"tool-result",toolCallId:G.toolCallId,toolName:G.toolName,output:OC4({output:G.output,downloadedAssets:Y}),providerOptions:J}}}),providerOptions:$.providerOptions}}case"tool":return{role:"tool",content:$.content.filter((G)=>G.type!=="tool-approval-response"||G.providerExecuted).map((G)=>{switch(G.type){case"tool-result":return{type:"tool-result",toolCallId:G.toolCallId,toolName:G.toolName,output:OC4({output:G.output,downloadedAssets:Y}),providerOptions:G.providerOptions};case"tool-approval-response":return{type:"tool-approval-response",approvalId:G.approvalId,approved:G.approved,reason:G.reason}}}),providerOptions:$.providerOptions};default:throw new Wy9({role:X})}}async function Iy9($,Y,X){var G;let J=[];for(let Z of $){if(Z.role==="user"&&Array.isArray(Z.content)){for(let K of Z.content)if(K.type==="image"||K.type==="file")J.push({data:K.type==="image"?K.image:K.data,mediaType:(G=K.mediaType)!=null?G:K.type==="image"?"image/*":void 0})}if(Z.role==="tool"||Z.role==="assistant"){if(!Array.isArray(Z.content))continue;for(let K of Z.content){if(K.type!=="tool-result")continue;if(K.output.type!=="content")continue;for(let H of K.output.value)if(H.type==="image-url"||H.type==="file-url")J.push({data:new URL(H.url),mediaType:H.type==="image-url"?"image/*":void 0})}}}let Q=J.map((Z)=>{let K=Z.mediaType,{data:H}=Jn0(Z.data);return{mediaType:K,data:H}}).filter((Z)=>Z.data instanceof URL).map((Z)=>({url:Z.data,isUrlSupportedByModel:Z.mediaType!=null&&$A4({url:Z.data.toString(),mediaType:Z.mediaType,supportedUrls:X})})),W=await Y(Q);return Object.fromEntries(W.map((Z,K)=>Z==null?null:[Q[K].url.toString(),{data:Z.data,mediaType:Z.mediaType}]).filter((Z)=>Z!=null))}function Py9($,Y){var X;if($.type==="text")return{type:"text",text:$.text,providerOptions:$.providerOptions};let G,J=$.type;switch(J){case"image":G=$.image;break;case"file":G=$.data;break;default:throw Error(`Unsupported part type: ${J}`)}let{data:Q,mediaType:W}=Jn0(G),Z=W!=null?W:$.mediaType,K=Q;if(K instanceof URL){let H=Y[K.toString()];if(H)K=H.data,Z!=null||(Z=H.mediaType)}switch(J){case"image":{if(K instanceof Uint8Array||typeof K==="string")Z=(X=Ey9({data:K,signatures:Ly9}))!=null?X:Z;return{type:"file",mediaType:Z!=null?Z:"image/*",filename:void 0,data:K,providerOptions:$.providerOptions}}case"file":{if(Z==null)throw Error("Media type is missing for file part");return{type:"file",mediaType:Z,filename:$.filename,data:K,providerOptions:$.providerOptions}}}}function OC4({output:$,downloadedAssets:Y}){if($.type!=="content")return $;return{type:"content",value:$.value.map((X)=>{var G,J;if(X.type==="image-url"){let Q=Y[new URL(X.url).toString()];if(Q)return{type:"image-data",data:ri0(Q.data),mediaType:(G=Q.mediaType)!=null?G:"image/*",providerOptions:X.providerOptions};return X}if(X.type==="file-url"){let Q=Y[new URL(X.url).toString()];if(Q)return{type:"file-data",data:ri0(Q.data),mediaType:(J=Q.mediaType)!=null?J:"application/octet-stream",providerOptions:X.providerOptions};return X}if(X.type!=="media")return X;if(X.mediaType.startsWith("image/"))return{type:"image-data",data:X.data,mediaType:X.mediaType};return{type:"file-data",data:X.data,mediaType:X.mediaType}})}}async function YR({toolCallId:$,input:Y,output:X,tool:G,errorMode:J}){if(J==="text")return{type:"error-text",value:K3(X)};else if(J==="json")return{type:"error-json",value:EC4(X)};if(G==null?void 0:G.toModelOutput)return await G.toModelOutput({toolCallId:$,input:Y,output:X});return typeof X==="string"?{type:"text",value:X}:{type:"json",value:EC4(X)}}function EC4($){return $===void 0?null:$}function ai0({maxOutputTokens:$,temperature:Y,topP:X,topK:G,presencePenalty:J,frequencyPenalty:Q,seed:W,stopSequences:Z}){if($!=null){if(!Number.isInteger($))throw new LH({parameter:"maxOutputTokens",value:$,message:"maxOutputTokens must be an integer"});if($<1)throw new LH({parameter:"maxOutputTokens",value:$,message:"maxOutputTokens must be >= 1"})}if(Y!=null){if(typeof Y!=="number")throw new LH({parameter:"temperature",value:Y,message:"temperature must be a number"})}if(X!=null){if(typeof X!=="number")throw new LH({parameter:"topP",value:X,message:"topP must be a number"})}if(G!=null){if(typeof G!=="number")throw new LH({parameter:"topK",value:G,message:"topK must be a number"})}if(J!=null){if(typeof J!=="number")throw new LH({parameter:"presencePenalty",value:J,message:"presencePenalty must be a number"})}if(Q!=null){if(typeof Q!=="number")throw new LH({parameter:"frequencyPenalty",value:Q,message:"frequencyPenalty must be a number"})}if(W!=null){if(!Number.isInteger(W))throw new LH({parameter:"seed",value:W,message:"seed must be an integer"})}return{maxOutputTokens:$,temperature:Y,topP:X,topK:G,presencePenalty:J,frequencyPenalty:Q,stopSequences:Z,seed:W}}function wy9($){return $!=null&&Object.keys($).length>0}async function MS4({tools:$,toolChoice:Y,activeTools:X}){if(!wy9($))return{tools:void 0,toolChoice:void 0};let G=X!=null?Object.entries($).filter(([Q])=>X.includes(Q)):Object.entries($),J=[];for(let[Q,W]of G){let Z=W.type;switch(Z){case void 0:case"dynamic":case"function":J.push({type:"function",name:Q,description:W.description,inputSchema:await GH(W.inputSchema).jsonSchema,...W.inputExamples!=null?{inputExamples:W.inputExamples}:{},providerOptions:W.providerOptions,...W.strict!=null?{strict:W.strict}:{}});break;case"provider":J.push({type:"provider",name:Q,id:W.id,args:W.args});break;default:throw Error(`Unsupported tool type: ${Z}`)}}return{tools:J,toolChoice:Y==null?{type:"auto"}:typeof Y==="string"?{type:Y}:{type:"tool",toolName:Y.toolName}}}var GR=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),GR.optional()),U.array(GR)])),k4=U.record(U.string(),U.record(U.string(),GR.optional())),RS4=U.object({type:U.literal("text"),text:U.string(),providerOptions:k4.optional()}),_y9=U.object({type:U.literal("image"),image:U.union([OS4,U.instanceof(URL)]),mediaType:U.string().optional(),providerOptions:k4.optional()}),qS4=U.object({type:U.literal("file"),data:U.union([OS4,U.instanceof(URL)]),filename:U.string().optional(),mediaType:U.string(),providerOptions:k4.optional()}),jy9=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:k4.optional()}),Ty9=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerOptions:k4.optional(),providerExecuted:U.boolean().optional()}),Cy9=U.discriminatedUnion("type",[U.object({type:U.literal("text"),value:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("json"),value:GR,providerOptions:k4.optional()}),U.object({type:U.literal("execution-denied"),reason:U.string().optional(),providerOptions:k4.optional()}),U.object({type:U.literal("error-text"),value:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("error-json"),value:GR,providerOptions:k4.optional()}),U.object({type:U.literal("content"),value:U.array(U.union([U.object({type:U.literal("text"),text:U.string(),providerOptions:k4.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:k4.optional()}),U.object({type:U.literal("file-url"),url:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:k4.optional()}),U.object({type:U.literal("image-data"),data:U.string(),mediaType:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("image-url"),url:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("image-file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:k4.optional()}),U.object({type:U.literal("custom"),providerOptions:k4.optional()})]))})]),IS4=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),output:Cy9,providerOptions:k4.optional()}),Sy9=U.object({type:U.literal("tool-approval-request"),approvalId:U.string(),toolCallId:U.string()}),ky9=U.object({type:U.literal("tool-approval-response"),approvalId:U.string(),approved:U.boolean(),reason:U.string().optional()}),vy9=U.object({role:U.literal("system"),content:U.string(),providerOptions:k4.optional()}),xy9=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([RS4,_y9,qS4]))]),providerOptions:k4.optional()}),yy9=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([RS4,qS4,jy9,Ty9,IS4,Sy9]))]),providerOptions:k4.optional()}),by9=U.object({role:U.literal("tool"),content:U.array(U.union([IS4,ky9])),providerOptions:k4.optional()}),hy9=U.union([vy9,xy9,yy9,by9]);async function PS4({allowSystemInMessages:$,system:Y,prompt:X,messages:G}){if(X==null&&G==null)throw new Q2({prompt:X,message:"prompt or messages must be defined"});if(X!=null&&G!=null)throw new Q2({prompt:X,message:"prompt and messages cannot be defined at the same time"});if(typeof Y!=="string"&&!XR(Y).every((Q)=>Q.role==="system"))throw new Q2({prompt:X,message:"system must be a string, SystemModelMessage, or array of SystemModelMessage"});if(X!=null&&typeof X==="string")G=[{role:"user",content:X}];else if(X!=null&&Array.isArray(X))G=X;else if(G==null)throw new Q2({prompt:X,message:"prompt or messages must be defined"});if(G.length===0)throw new Q2({prompt:X,message:"messages must not be empty"});if(G.some((Q)=>Q.role==="system")){if($===!1)throw new Q2({prompt:X,message:"System messages are not allowed in the prompt or messages fields. Use the system option instead."});if($===void 0)console.warn("AI SDK Warning: System messages in the prompt or messages fields can be a security risk because they may enable prompt injection attacks. Use the system option instead when possible. Set allowSystemInMessages to true to suppress this warning, or false to throw an error.")}let J=await DG({value:G,schema:U.array(hy9)});if(!J.success)throw new Q2({prompt:X,message:"The messages do not match the ModelMessage[] schema.",cause:J.error});return{messages:G,system:Y}}function wS4($){if(!XG0.isInstance($))return $;let Y=(process==null?void 0:"production")==="production",X="https://ai-sdk.dev/unauthenticated-ai-gateway";if(Y)return new G4({name:"GatewayError",message:`Unauthenticated. Configure AI_GATEWAY_API_KEY or use a provider module. Learn more: ${X}`});return Object.assign(Error(`\x1B[1m\x1B[31mUnauthenticated request to AI Gateway.\x1B[0m

To authenticate, set the \x1B[33mAI_GATEWAY_API_KEY\x1B[0m environment variable with your API key.

Alternatively, you can use a provider module instead of the AI Gateway.

Learn more: \x1B[34m${X}\x1B[0m

`),{name:"GatewayAuthenticationError"})}function md({operationId:$,telemetry:Y}){return{"operation.name":`${$}${(Y==null?void 0:Y.functionId)!=null?` ${Y.functionId}`:""}`,"resource.name":Y==null?void 0:Y.functionId,"ai.operationId":$,"ai.telemetry.functionId":Y==null?void 0:Y.functionId}}function _S4({model:$,settings:Y,telemetry:X,headers:G}){var J;return{"ai.model.provider":$.provider,"ai.model.id":$.modelId,...Object.entries(Y).reduce((Q,[W,Z])=>{if(W==="timeout"){let K=Gn0(Z);if(K!=null)Q[`ai.settings.${W}`]=K}else Q[`ai.settings.${W}`]=Z;return Q},{}),...Object.entries((J=X==null?void 0:X.metadata)!=null?J:{}).reduce((Q,[W,Z])=>{return Q[`ai.telemetry.metadata.${W}`]=Z,Q},{}),...Object.entries(G!=null?G:{}).reduce((Q,[W,Z])=>{if(Z!==void 0)Q[`ai.request.headers.${W}`]=Z;return Q},{})}}var fy9={startSpan(){return VG0},startActiveSpan($,Y,X,G){if(typeof Y==="function")return Y(VG0);if(typeof X==="function")return X(VG0);if(typeof G==="function")return G(VG0)}},VG0={spanContext(){return gy9},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}},gy9={traceId:"",spanId:"",traceFlags:0};function TS4({isEnabled:$=!1,tracer:Y}={}){if(!$)return fy9;if(Y)return Y;return jS4.trace.getTracer("ai")}async function ud({name:$,tracer:Y,attributes:X,fn:G,endWhenDone:J=!0}){return Y.startActiveSpan($,{attributes:await X},async(Q)=>{let W=dC.context.active();try{let Z=await dC.context.with(W,()=>G(Q));if(J)Q.end();return Z}catch(Z){try{CS4(Q,Z)}finally{Q.end()}throw Z}})}function CS4($,Y){if(Y instanceof Error)$.recordException({name:Y.name,message:Y.message,stack:Y.stack}),$.setStatus({code:dC.SpanStatusCode.ERROR,message:Y.message});else $.setStatus({code:dC.SpanStatusCode.ERROR})}async function F2({telemetry:$,attributes:Y}){if(($==null?void 0:$.isEnabled)!==!0)return{};let X={};for(let[G,J]of Object.entries(Y)){if(J==null)continue;if(typeof J==="object"&&"input"in J&&typeof J.input==="function"){if(($==null?void 0:$.recordInputs)===!1)continue;let Q=await J.input();if(Q!=null)X[G]=Q;continue}if(typeof J==="object"&&"output"in J&&typeof J.output==="function"){if(($==null?void 0:$.recordOutputs)===!1)continue;let Q=await J.output();if(Q!=null)X[G]=Q;continue}X[G]=J}return X}function SS4($){return JSON.stringify($.map((Y)=>({...Y,content:typeof Y.content==="string"?Y.content:Y.content.map((X)=>X.type==="file"?{...X,data:X.data instanceof Uint8Array?ri0(X.data):X.data}:X)})))}function my9(){var $;return($=globalThis.AI_SDK_TELEMETRY_INTEGRATIONS)!=null?$:[]}function kS4(){let $=my9();return(Y)=>{let X=XR(Y),G=[...$,...X];function J(Q){let W=G.map(Q).filter(Boolean);return async(Z)=>{for(let K of W)try{await K(Z)}catch(H){}}}return{onStart:J((Q)=>Q.onStart),onStepStart:J((Q)=>Q.onStepStart),onToolCallStart:J((Q)=>Q.onToolCallStart),onToolCallFinish:J((Q)=>Q.onToolCallFinish),onStepFinish:J((Q)=>Q.onStepFinish),onFinish:J((Q)=>Q.onFinish)}}}function si0($){return{inputTokens:$.inputTokens.total,inputTokenDetails:{noCacheTokens:$.inputTokens.noCache,cacheReadTokens:$.inputTokens.cacheRead,cacheWriteTokens:$.inputTokens.cacheWrite},outputTokens:$.outputTokens.total,outputTokenDetails:{textTokens:$.outputTokens.text,reasoningTokens:$.outputTokens.reasoning},totalTokens:I3($.inputTokens.total,$.outputTokens.total),raw:$.raw,reasoningTokens:$.outputTokens.reasoning,cachedInputTokens:$.inputTokens.cacheRead}}function pi0(){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 vS4($,Y){var X,G,J,Q,W,Z,K,H,z,V;return{inputTokens:I3($.inputTokens,Y.inputTokens),inputTokenDetails:{noCacheTokens:I3((X=$.inputTokenDetails)==null?void 0:X.noCacheTokens,(G=Y.inputTokenDetails)==null?void 0:G.noCacheTokens),cacheReadTokens:I3((J=$.inputTokenDetails)==null?void 0:J.cacheReadTokens,(Q=Y.inputTokenDetails)==null?void 0:Q.cacheReadTokens),cacheWriteTokens:I3((W=$.inputTokenDetails)==null?void 0:W.cacheWriteTokens,(Z=Y.inputTokenDetails)==null?void 0:Z.cacheWriteTokens)},outputTokens:I3($.outputTokens,Y.outputTokens),outputTokenDetails:{textTokens:I3((K=$.outputTokenDetails)==null?void 0:K.textTokens,(H=Y.outputTokenDetails)==null?void 0:H.textTokens),reasoningTokens:I3((z=$.outputTokenDetails)==null?void 0:z.reasoningTokens,(V=Y.outputTokenDetails)==null?void 0:V.reasoningTokens)},totalTokens:I3($.totalTokens,Y.totalTokens),reasoningTokens:I3($.reasoningTokens,Y.reasoningTokens),cachedInputTokens:I3($.cachedInputTokens,Y.cachedInputTokens)}}function I3($,Y){return $==null&&Y==null?void 0:($!=null?$:0)+(Y!=null?Y:0)}function NG0($,Y){if($===void 0&&Y===void 0)return;if($===void 0)return Y;if(Y===void 0)return $;let X={...$};for(let G in Y){if(G==="__proto__"||G==="constructor"||G==="prototype")continue;if(Object.prototype.hasOwnProperty.call(Y,G)){let J=Y[G];if(J===void 0)continue;let Q=G in $?$[G]:void 0,W=J!==null&&typeof J==="object"&&!Array.isArray(J)&&!(J instanceof Date)&&!(J instanceof RegExp),Z=Q!==null&&Q!==void 0&&typeof Q==="object"&&!Array.isArray(Q)&&!(Q instanceof Date)&&!(Q instanceof RegExp);if(W&&Z)X[G]=NG0(Q,J);else X[G]=J}}return X}function uy9({error:$,exponentialBackoffDelay:Y}){let X=n8.isInstance($)?$.responseHeaders:n8.isInstance($.cause)?$.cause.responseHeaders:void 0;if(!X)return Y;let G,J=X["retry-after-ms"];if(J){let W=parseFloat(J);if(!Number.isNaN(W))G=W}let Q=X["retry-after"];if(Q&&G===void 0){let W=parseFloat(Q);if(!Number.isNaN(W))G=W*1000;else G=Date.parse(Q)-Date.now()}if(G!=null&&!Number.isNaN(G)&&0<=G&&(G<60000||G<Y))return G;return Y}var py9=({maxRetries:$=2,initialDelayInMs:Y=2000,backoffFactor:X=2,abortSignal:G}={})=>async(J)=>xS4(J,{maxRetries:$,delayInMs:Y,backoffFactor:X,abortSignal:G});async function xS4($,{maxRetries:Y,delayInMs:X,backoffFactor:G,abortSignal:J},Q=[]){try{return await $()}catch(W){if(MV(W))throw W;if(Y===0)throw W;let Z=cD(W),K=[...Q,W],H=K.length;if(H>Y)throw new LC4({message:`Failed after ${H} attempts. Last error: ${Z}`,reason:"maxRetriesExceeded",errors:K});if(W instanceof Error&&(n8.isInstance(W)&&W.isRetryable===!0||yX.isInstance(W)&&W.isRetryable===!0)&&H<=Y)return await rV4(uy9({error:W,exponentialBackoffDelay:X}),{abortSignal:J}),xS4($,{maxRetries:Y,delayInMs:G*X,backoffFactor:G,abortSignal:J},K);if(H===1)throw W;throw new LC4({message:`Failed after ${H} attempts with non-retryable error: '${Z}'`,reason:"errorNotRetryable",errors:K})}}function yS4({maxRetries:$,abortSignal:Y}){if($!=null){if(!Number.isInteger($))throw new LH({parameter:"maxRetries",value:$,message:"maxRetries must be an integer"});if($<0)throw new LH({parameter:"maxRetries",value:$,message:"maxRetries must be >= 0"})}let X=$!=null?$:2;return{maxRetries:X,retry:py9({maxRetries:X,abortSignal:Y})}}function bS4({messages:$}){let Y=$.at(-1);if((Y==null?void 0:Y.role)!="tool")return{approvedToolApprovals:[],deniedToolApprovals:[]};let X={};for(let K of $)if(K.role==="assistant"&&typeof K.content!=="string"){let H=K.content;for(let z of H)if(z.type==="tool-call")X[z.toolCallId]=z}let G={};for(let K of $)if(K.role==="assistant"&&typeof K.content!=="string"){let H=K.content;for(let z of H)if(z.type==="tool-approval-request")G[z.approvalId]=z}let J={};for(let K of Y.content)if(K.type==="tool-result")J[K.toolCallId]=K;let Q=[],W=[],Z=Y.content.filter((K)=>K.type==="tool-approval-response");for(let K of Z){let H=G[K.approvalId];if(H==null)throw new jx9({approvalId:K.approvalId});if(J[H.toolCallId]!=null)continue;let z=X[H.toolCallId];if(z==null)throw new Yn0({toolCallId:H.toolCallId,approvalId:H.approvalId});let V={approvalRequest:H,approvalResponse:K,toolCall:z};if(K.approved)Q.push(V);else W.push(V)}return{approvedToolApprovals:Q,deniedToolApprovals:W}}function AG0(){var $,Y;return(Y=($=globalThis==null?void 0:globalThis.performance)==null?void 0:$.now())!=null?Y:Date.now()}async function Qn0({toolCall:$,tools:Y,tracer:X,telemetry:G,messages:J,abortSignal:Q,experimental_context:W,stepNumber:Z,model:K,onPreliminaryToolResult:H,onToolCallStart:z,onToolCallFinish:V}){let{toolName:A,toolCallId:F,input:N}=$,D=Y==null?void 0:Y[A];if((D==null?void 0:D.execute)==null)return;let L={stepNumber:Z,model:K,toolCall:$,messages:J,abortSignal:Q,functionId:G==null?void 0:G.functionId,metadata:G==null?void 0:G.metadata,experimental_context:W};return ud({name:"ai.toolCall",attributes:F2({telemetry:G,attributes:{...md({operationId:"ai.toolCall",telemetry:G}),"ai.toolCall.name":A,"ai.toolCall.id":F,"ai.toolCall.args":{output:()=>JSON.stringify(N)}}}),tracer:X,fn:async(B)=>{let O;await P3({event:L,callbacks:z});let E=AG0();try{let R=HA4({execute:D.execute.bind(D),input:N,options:{toolCallId:F,messages:J,abortSignal:Q,experimental_context:W}});for await(let q of R)if(q.type==="preliminary")H==null||H({...$,type:"tool-result",output:q.output,preliminary:!0});else O=q.output}catch(R){let q=AG0()-E;return await P3({event:{...L,success:!1,error:R,durationMs:q},callbacks:V}),CS4(B,R),{type:"tool-error",toolCallId:F,toolName:A,input:N,error:R,dynamic:D.type==="dynamic",...$.providerMetadata!=null?{providerMetadata:$.providerMetadata}:{},...$.toolMetadata!=null?{toolMetadata:$.toolMetadata}:{}}}let M=AG0()-E;await P3({event:{...L,success:!0,output:O,durationMs:M},callbacks:V});try{B.setAttributes(await F2({telemetry:G,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(O)}}}))}catch(R){}return{type:"tool-result",toolCallId:F,toolName:A,input:N,output:O,dynamic:D.type==="dynamic",...$.providerMetadata!=null?{providerMetadata:$.providerMetadata}:{},...$.toolMetadata!=null?{toolMetadata:$.toolMetadata}:{}}}})}function MC4($){let Y=$.filter((X)=>X.type==="reasoning");return Y.length===0?void 0:Y.map((X)=>X.text).join(`
`)}function RC4($){let Y=$.filter((X)=>X.type==="text");if(Y.length===0)return;return Y.map((X)=>X.text).join("")}var hS4=class{constructor({data:$,mediaType:Y}){let X=$ instanceof Uint8Array;this.base64Data=X?void 0:$,this.uint8ArrayData=X?$:void 0,this.mediaType=Y}get base64(){if(this.base64Data==null)this.base64Data=YH(this.uint8ArrayData);return this.base64Data}get uint8Array(){if(this.uint8ArrayData==null)this.uint8ArrayData=RJ(this.base64Data);return this.uint8ArrayData}},dy9=class extends hS4{constructor($){super($);this.type="file"}};async function fS4({tool:$,toolCall:Y,messages:X,experimental_context:G}){if($.needsApproval==null)return!1;if(typeof $.needsApproval==="boolean")return $.needsApproval;return await $.needsApproval(Y.input,{toolCallId:Y.toolCallId,messages:X,experimental_context:G})}var cy9={};Mx9(cy9,{array:()=>ny9,choice:()=>ry9,json:()=>ay9,object:()=>iy9,text:()=>DG0});function ly9($){let Y=["ROOT"],X=-1,G=null;function J(K,H,z){switch(K){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(K,H){switch(K){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let K=0;K<$.length;K++){let H=$[K];switch(Y[Y.length-1]){case"ROOT":J(H,K,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=K,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,K,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,K);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=K;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=K}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=K,Y.pop();break}default:{X=K,J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=K,Y.pop();break}default:{X=K;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,K,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=K;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=K;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,K+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,K);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,K)}else X=K;break}}}let Z=$.slice(0,X+1);for(let K=Y.length-1;K>=0;K--)switch(Y[K]){case"INSIDE_STRING":{Z+='"';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":{Z+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{Z+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))Z+="true".slice(z.length);else if("false".startsWith(z))Z+="false".slice(z.length);else if("null".startsWith(z))Z+="null".slice(z.length)}}return Z}async function pd($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=await kQ({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=await kQ({text:ly9($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}var DG0=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:$}){return $},async parsePartialOutput({text:$}){return{partial:$}},createElementStreamTransform(){return}}),iy9=({schema:$,name:Y,description:X})=>{let G=GH($);return{name:"object",responseFormat:S5(G.jsonSchema).then((J)=>({type:"json",schema:J,...Y!=null&&{name:Y},...X!=null&&{description:X}})),async parseCompleteOutput({text:J},Q){let W=await kQ({text:J});if(!W.success)throw new NN({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let Z=await DG({value:W.value,schema:G});if(!Z.success)throw new NN({message:"No object generated: response did not match schema.",cause:Z.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});return Z.value},async parsePartialOutput({text:J}){let Q=await pd(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:Q.value}}},createElementStreamTransform(){return}}},ny9=({element:$,name:Y,description:X})=>{let G=GH($);return{name:"array",responseFormat:S5(G.jsonSchema).then((J)=>{let{$schema:Q,...W}=J;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:W}},required:["elements"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}}),async parseCompleteOutput({text:J},Q){let W=await kQ({text:J});if(!W.success)throw new NN({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let Z=W.value;if(Z==null||typeof Z!=="object"||!("elements"in Z)||!Array.isArray(Z.elements))throw new NN({message:"No object generated: response did not match schema.",cause:new U3({value:Z,cause:"response must be an object with an elements array"}),text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});for(let K of Z.elements){let H=await DG({value:K,schema:G});if(!H.success)throw new NN({message:"No object generated: response did not match schema.",cause:H.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason})}return Z.elements},async parsePartialOutput({text:J}){let Q=await pd(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let W=Q.value;if(W==null||typeof W!=="object"||!("elements"in W)||!Array.isArray(W.elements))return;let Z=Q.state==="repaired-parse"&&W.elements.length>0?W.elements.slice(0,-1):W.elements,K=[];for(let H of Z){let z=await DG({value:H,schema:G});if(z.success)K.push(z.value)}return{partial:K}}}},createElementStreamTransform(){let J=0;return new TransformStream({transform({partialOutput:Q},W){if(Q!=null)for(;J<Q.length;J++)W.enqueue(Q[J])}})}}},ry9=({options:$,name:Y,description:X})=>{return{name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:$}},required:["result"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}),async parseCompleteOutput({text:G},J){let Q=await kQ({text:G});if(!Q.success)throw new NN({message:"No object generated: could not parse the response.",cause:Q.error,text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});let W=Q.value;if(W==null||typeof W!=="object"||!("result"in W)||typeof W.result!=="string"||!$.includes(W.result))throw new NN({message:"No object generated: response did not match schema.",cause:new U3({value:W,cause:"response must be an object that contains a choice value."}),text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});return W.result},async parsePartialOutput({text:G}){let J=await pd(G);switch(J.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let Q=J.value;if(Q==null||typeof Q!=="object"||!("result"in Q)||typeof Q.result!=="string")return;let W=$.filter((Z)=>Z.startsWith(Q.result));if(J.state==="successful-parse")return W.includes(Q.result)?{partial:Q.result}:void 0;else return W.length===1?{partial:W[0]}:void 0}}},createElementStreamTransform(){return}}},ay9=({name:$,description:Y}={})=>{return{name:"json",responseFormat:Promise.resolve({type:"json",...$!=null&&{name:$},...Y!=null&&{description:Y}}),async parseCompleteOutput({text:X},G){let J=await kQ({text:X});if(!J.success)throw new NN({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return J.value},async parsePartialOutput({text:X}){let G=await pd(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return G.value===void 0?void 0:{partial:G.value}}},createElementStreamTransform(){return}}};async function gS4({toolCall:$,tools:Y,repairToolCall:X,system:G,messages:J}){try{if(Y==null){if($.providerExecuted&&$.dynamic)return await mS4($);throw new ni0({toolName:$.toolName})}try{return await qC4({toolCall:$,tools:Y})}catch(Q){if(X==null||!(ni0.isInstance(Q)||$n0.isInstance(Q)))throw Q;let W=null;try{W=await X({toolCall:$,tools:Y,inputSchema:async({toolName:Z})=>{let{inputSchema:K}=Y[Z];return await GH(K).jsonSchema},system:G,messages:J,error:Q})}catch(Z){throw new tx9({cause:Z,originalError:Q})}if(W==null)throw Q;return await qC4({toolCall:W,tools:Y})}}catch(Q){let W=await kQ({text:$.input}),Z=W.success?W.value:$.input,K=Y==null?void 0:Y[$.toolName];return{type:"tool-call",toolCallId:$.toolCallId,toolName:$.toolName,input:Z,dynamic:!0,invalid:!0,error:Q,title:K==null?void 0:K.title,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata,...(K==null?void 0:K.metadata)!=null?{toolMetadata:K.metadata}:{}}}}async function mS4($){let Y=$.input.trim()===""?{success:!0,value:{}}:await kQ({text:$.input});if(Y.success===!1)throw new $n0({toolName:$.toolName,toolInput:$.input,cause:Y.error});return{type:"tool-call",toolCallId:$.toolCallId,toolName:$.toolName,input:Y.value,providerExecuted:!0,dynamic:!0,providerMetadata:$.providerMetadata}}async function qC4({toolCall:$,tools:Y}){let X=$.toolName,G=Y[X];if(G==null){if($.providerExecuted&&$.dynamic)return await mS4($);throw new ni0({toolName:$.toolName,availableTools:Object.keys(Y)})}let J=GH(G.inputSchema),Q=$.input.trim()===""?await DG({value:{},schema:J}):await kQ({text:$.input,schema:J});if(Q.success===!1)throw new $n0({toolName:X,toolInput:$.input,cause:Q.error});return G.type==="dynamic"?{type:"tool-call",toolCallId:$.toolCallId,toolName:$.toolName,input:Q.value,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata,...G.metadata!=null?{toolMetadata:G.metadata}:{},dynamic:!0,title:G.title}:{type:"tool-call",toolCallId:$.toolCallId,toolName:X,input:Q.value,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata,...G.metadata!=null?{toolMetadata:G.metadata}:{},title:G.title}}var uS4=class{constructor({stepNumber:$,model:Y,functionId:X,metadata:G,experimental_context:J,content:Q,finishReason:W,rawFinishReason:Z,usage:K,warnings:H,request:z,response:V,providerMetadata:A}){this.stepNumber=$,this.model=Y,this.functionId=X,this.metadata=G,this.experimental_context=J,this.content=Q,this.finishReason=W,this.rawFinishReason=Z,this.usage=K,this.warnings=H,this.request=z,this.response=V,this.providerMetadata=A}get text(){return this.content.filter(($)=>$.type==="text").map(($)=>$.text).join("")}get reasoning(){return this.content.filter(($)=>$.type==="reasoning")}get reasoningText(){return this.reasoning.length===0?void 0:this.reasoning.map(($)=>$.text).join("")}get files(){return this.content.filter(($)=>$.type==="file").map(($)=>$.file)}get sources(){return this.content.filter(($)=>$.type==="source")}get toolCalls(){return this.content.filter(($)=>$.type==="tool-call")}get staticToolCalls(){return this.toolCalls.filter(($)=>$.dynamic!==!0)}get dynamicToolCalls(){return this.toolCalls.filter(($)=>$.dynamic===!0)}get toolResults(){return this.content.filter(($)=>$.type==="tool-result")}get staticToolResults(){return this.toolResults.filter(($)=>$.dynamic!==!0)}get dynamicToolResults(){return this.toolResults.filter(($)=>$.dynamic===!0)}};function pS4($){return({steps:Y})=>Y.length===$}async function dS4({stopConditions:$,steps:Y}){return(await Promise.all($.map((X)=>X({steps:Y})))).some((X)=>X)}async function oi0({content:$,tools:Y}){let X=[],G=[];for(let Q of $){if(Q.type==="source")continue;if((Q.type==="tool-result"||Q.type==="tool-error")&&!Q.providerExecuted)continue;if(Q.type==="text"&&Q.text.length===0)continue;switch(Q.type){case"text":G.push({type:"text",text:Q.text,providerOptions:Q.providerMetadata});break;case"reasoning":G.push({type:"reasoning",text:Q.text,providerOptions:Q.providerMetadata});break;case"file":G.push({type:"file",data:Q.file.base64,mediaType:Q.file.mediaType,providerOptions:Q.providerMetadata});break;case"tool-call":G.push({type:"tool-call",toolCallId:Q.toolCallId,toolName:Q.toolName,input:Q.invalid&&typeof Q.input!=="object"?{}:Q.input,providerExecuted:Q.providerExecuted,providerOptions:Q.providerMetadata});break;case"tool-result":{let W=await YR({toolCallId:Q.toolCallId,input:Q.input,tool:Y==null?void 0:Y[Q.toolName],output:Q.output,errorMode:"none"});G.push({type:"tool-result",toolCallId:Q.toolCallId,toolName:Q.toolName,output:W,providerOptions:Q.providerMetadata});break}case"tool-error":{let W=await YR({toolCallId:Q.toolCallId,input:Q.input,tool:Y==null?void 0:Y[Q.toolName],output:Q.error,errorMode:"json"});G.push({type:"tool-result",toolCallId:Q.toolCallId,toolName:Q.toolName,output:W,providerOptions:Q.providerMetadata});break}case"tool-approval-request":G.push({type:"tool-approval-request",approvalId:Q.approvalId,toolCallId:Q.toolCall.toolCallId});break}}if(G.length>0)X.push({role:"assistant",content:G});let J=[];for(let Q of $){if(!(Q.type==="tool-result"||Q.type==="tool-error")||Q.providerExecuted)continue;let W=await YR({toolCallId:Q.toolCallId,input:Q.input,tool:Y==null?void 0:Y[Q.toolName],output:Q.type==="tool-result"?Q.output:Q.error,errorMode:Q.type==="tool-error"?"text":"none"});J.push({type:"tool-result",toolCallId:Q.toolCallId,toolName:Q.toolName,output:W,...Q.providerMetadata!=null?{providerOptions:Q.providerMetadata}:{}})}if(J.length>0)X.push({role:"tool",content:J});return X}function cS4(...$){let Y=$.filter((G)=>G!=null);if(Y.length===0)return;if(Y.length===1)return Y[0];let X=new AbortController;for(let G of Y){if(G.aborted)return X.abort(G.reason),X.signal;G.addEventListener("abort",()=>{X.abort(G.reason)},{once:!0})}return X.signal}var sy9=XH({prefix:"aitxt",size:24});async function SV({model:$,tools:Y,toolChoice:X,system:G,prompt:J,messages:Q,allowSystemInMessages:W,maxRetries:Z,abortSignal:K,timeout:H,headers:z,stopWhen:V=pS4(1),experimental_output:A,output:F=A,experimental_telemetry:N,providerOptions:D,experimental_activeTools:L,activeTools:B=L,experimental_prepareStep:O,prepareStep:E=O,experimental_repairToolCall:M,experimental_download:R,experimental_context:q,experimental_include:w,_internal:{generateId:I=sy9}={},experimental_onStart:P,experimental_onStepStart:_,experimental_onToolCallStart:C,experimental_onToolCallFinish:k,onStepFinish:S,onFinish:T,...v}){let x=FG0($),y=kS4(),d=XR(V),u=Gn0(H),b=NS4(H),g=b!=null?new AbortController:void 0,p=cS4(K,u!=null?AbortSignal.timeout(u):void 0,g==null?void 0:g.signal),{maxRetries:h,retry:n}=yS4({maxRetries:Z,abortSignal:p}),t=ai0(v),s=pW(z!=null?z:{},`ai/${LS4}`),Z0=_S4({model:x,telemetry:N,headers:s,settings:{...t,maxRetries:h}}),X0={provider:x.provider,modelId:x.modelId},a=await PS4({system:G,prompt:J,messages:Q,allowSystemInMessages:W}),Q0=y(N==null?void 0:N.integrations);await P3({event:{model:X0,system:G,prompt:J,messages:Q,tools:Y,toolChoice:X,activeTools:B,maxOutputTokens:t.maxOutputTokens,temperature:t.temperature,topP:t.topP,topK:t.topK,presencePenalty:t.presencePenalty,frequencyPenalty:t.frequencyPenalty,stopSequences:t.stopSequences,seed:t.seed,maxRetries:h,timeout:H,headers:z,providerOptions:D,stopWhen:V,output:F,abortSignal:K,include:w,functionId:N==null?void 0:N.functionId,metadata:N==null?void 0:N.metadata,experimental_context:q},callbacks:[P,Q0.onStart]});let e=TS4(N);try{return await ud({name:"ai.generateText",attributes:F2({telemetry:N,attributes:{...md({operationId:"ai.generateText",telemetry:N}),...Z0,"ai.model.provider":x.provider,"ai.model.id":x.modelId,"ai.prompt":{input:()=>JSON.stringify({system:G,prompt:J,messages:Q})}}}),tracer:e,fn:async(m)=>{var $0,Y0,K0,A0,D0,O0,R0,I0,g0,p0,U4,P1,d1,C0,n0,J0,B0,Y1,c1,C4;let c4=a.messages,r4=[],{approvedToolApprovals:T6,deniedToolApprovals:p6}=bS4({messages:c4}),n6=T6.filter((A6)=>!A6.toolCall.providerExecuted);if(p6.length>0||n6.length>0){let A6=await IC4({toolCalls:n6.map((b4)=>b4.toolCall),tools:Y,tracer:e,telemetry:N,messages:c4,abortSignal:p,experimental_context:q,stepNumber:0,model:X0,onToolCallStart:[C,Q0.onToolCallStart],onToolCallFinish:[k,Q0.onToolCallFinish]}),K4=[];for(let b4 of A6){let N0=await YR({toolCallId:b4.toolCallId,input:b4.input,tool:Y==null?void 0:Y[b4.toolName],output:b4.type==="tool-result"?b4.output:b4.error,errorMode:b4.type==="tool-error"?"text":"none"});K4.push({type:"tool-result",toolCallId:b4.toolCallId,toolName:b4.toolName,output:N0})}for(let b4 of p6)K4.push({type:"tool-result",toolCallId:b4.toolCall.toolCallId,toolName:b4.toolCall.toolName,output:{type:"execution-denied",reason:b4.approvalResponse.reason,...b4.toolCall.providerExecuted&&{providerOptions:{openai:{approvalId:b4.approvalResponse.approvalId}}}}});r4.push({role:"tool",content:K4})}let K1=ai0(v),Q4,C6=[],t4=[],a1=[],A1=new Map;do{let A6=b!=null?setTimeout(()=>g.abort(),b):void 0;try{let K4=[...c4,...r4],b4=await(E==null?void 0:E({model:x,steps:a1,stepNumber:a1.length,messages:K4,experimental_context:q})),N0=FG0(($0=b4==null?void 0:b4.model)!=null?$0:x),f0={provider:N0.provider,modelId:N0.modelId},a0=await ES4({prompt:{system:(Y0=b4==null?void 0:b4.system)!=null?Y0:a.system,messages:(K0=b4==null?void 0:b4.messages)!=null?K0:K4},supportedUrls:await N0.supportedUrls,download:R});q=(A0=b4==null?void 0:b4.experimental_context)!=null?A0:q;let c0=(D0=b4==null?void 0:b4.activeTools)!=null?D0:B,{toolChoice:F1,tools:E1}=await MS4({tools:Y,toolChoice:(O0=b4==null?void 0:b4.toolChoice)!=null?O0:X,activeTools:c0}),l4=(R0=b4==null?void 0:b4.messages)!=null?R0:K4,Q1=(I0=b4==null?void 0:b4.system)!=null?I0:a.system,C1=NG0(D,b4==null?void 0:b4.providerOptions);await P3({event:{stepNumber:a1.length,model:f0,system:Q1,messages:l4,tools:Y,toolChoice:F1,activeTools:c0,steps:[...a1],providerOptions:C1,timeout:H,headers:z,stopWhen:V,output:F,abortSignal:K,include:w,functionId:N==null?void 0:N.functionId,metadata:N==null?void 0:N.metadata,experimental_context:q},callbacks:[_,Q0.onStepStart]}),Q4=await n(()=>{var q4;return ud({name:"ai.generateText.doGenerate",attributes:F2({telemetry:N,attributes:{...md({operationId:"ai.generateText.doGenerate",telemetry:N}),...Z0,"ai.model.provider":N0.provider,"ai.model.id":N0.modelId,"ai.prompt.messages":{input:()=>SS4(a0)},"ai.prompt.tools":{input:()=>E1==null?void 0:E1.map((y8)=>JSON.stringify(y8))},"ai.prompt.toolChoice":{input:()=>F1!=null?JSON.stringify(F1):void 0},"gen_ai.system":N0.provider,"gen_ai.request.model":N0.modelId,"gen_ai.request.frequency_penalty":v.frequencyPenalty,"gen_ai.request.max_tokens":v.maxOutputTokens,"gen_ai.request.presence_penalty":v.presencePenalty,"gen_ai.request.stop_sequences":v.stopSequences,"gen_ai.request.temperature":(q4=v.temperature)!=null?q4:void 0,"gen_ai.request.top_k":v.topK,"gen_ai.request.top_p":v.topP}}),tracer:e,fn:async(y8)=>{var B5,G7,p7,t6,bX,WR,D2,N2;let O9=await N0.doGenerate({...K1,tools:E1,toolChoice:F1,responseFormat:await(F==null?void 0:F.responseFormat),prompt:a0,providerOptions:C1,abortSignal:p,headers:s}),eW={id:(G7=(B5=O9.response)==null?void 0:B5.id)!=null?G7:I(),timestamp:(t6=(p7=O9.response)==null?void 0:p7.timestamp)!=null?t6:new Date,modelId:(WR=(bX=O9.response)==null?void 0:bX.modelId)!=null?WR:N0.modelId,headers:(D2=O9.response)==null?void 0:D2.headers,body:(N2=O9.response)==null?void 0:N2.body},_3=si0(O9.usage);return y8.setAttributes(await F2({telemetry:N,attributes:{"ai.response.finishReason":O9.finishReason.unified,"ai.response.text":{output:()=>RC4(O9.content)},"ai.response.reasoning":{output:()=>MC4(O9.content)},"ai.response.toolCalls":{output:()=>{let vV=PC4(O9.content);return vV==null?void 0:JSON.stringify(vV)}},"ai.response.id":eW.id,"ai.response.model":eW.modelId,"ai.response.timestamp":eW.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(O9.providerMetadata),"ai.usage.inputTokens":O9.usage.inputTokens.total,"ai.usage.inputTokenDetails.noCacheTokens":O9.usage.inputTokens.noCache,"ai.usage.inputTokenDetails.cacheReadTokens":O9.usage.inputTokens.cacheRead,"ai.usage.inputTokenDetails.cacheWriteTokens":O9.usage.inputTokens.cacheWrite,"ai.usage.outputTokens":O9.usage.outputTokens.total,"ai.usage.outputTokenDetails.textTokens":O9.usage.outputTokens.text,"ai.usage.outputTokenDetails.reasoningTokens":O9.usage.outputTokens.reasoning,"ai.usage.totalTokens":_3.totalTokens,"ai.usage.reasoningTokens":O9.usage.outputTokens.reasoning,"ai.usage.cachedInputTokens":O9.usage.inputTokens.cacheRead,"gen_ai.response.finish_reasons":[O9.finishReason.unified],"gen_ai.response.id":eW.id,"gen_ai.response.model":eW.modelId,"gen_ai.usage.input_tokens":O9.usage.inputTokens.total,"gen_ai.usage.output_tokens":O9.usage.outputTokens.total}})),{...O9,response:eW}}})});let f4=await Promise.all(Q4.content.filter((q4)=>q4.type==="tool-call").map((q4)=>gS4({toolCall:q4,tools:Y,repairToolCall:M,system:G,messages:K4}))),O6={};for(let q4 of f4){if(q4.invalid)continue;let y8=Y==null?void 0:Y[q4.toolName];if(y8==null)continue;if((y8==null?void 0:y8.onInputAvailable)!=null)await y8.onInputAvailable({input:q4.input,toolCallId:q4.toolCallId,messages:K4,abortSignal:p,experimental_context:q});if(await fS4({tool:y8,toolCall:q4,messages:K4,experimental_context:q}))O6[q4.toolCallId]={type:"tool-approval-request",approvalId:I(),toolCall:q4}}let J9=f4.filter((q4)=>q4.invalid&&q4.dynamic);t4=[];for(let q4 of J9)t4.push({type:"tool-error",toolCallId:q4.toolCallId,toolName:q4.toolName,input:q4.input,error:cD(q4.error),dynamic:!0});if(C6=f4.filter((q4)=>!q4.providerExecuted),Y!=null)t4.push(...await IC4({toolCalls:C6.filter((q4)=>!q4.invalid&&O6[q4.toolCallId]==null),tools:Y,tracer:e,telemetry:N,messages:K4,abortSignal:p,experimental_context:q,stepNumber:a1.length,model:f0,onToolCallStart:[C,Q0.onToolCallStart],onToolCallFinish:[k,Q0.onToolCallFinish]}));for(let q4 of f4){if(!q4.providerExecuted)continue;let y8=Y==null?void 0:Y[q4.toolName];if((y8==null?void 0:y8.type)==="provider"&&y8.supportsDeferredResults){if(!Q4.content.some((G7)=>G7.type==="tool-result"&&G7.toolCallId===q4.toolCallId))A1.set(q4.toolCallId,{toolName:q4.toolName})}}for(let q4 of Q4.content)if(q4.type==="tool-result")A1.delete(q4.toolCallId);let o$=ty9({content:Q4.content,toolCalls:f4,toolOutputs:t4,toolApprovalRequests:Object.values(O6),tools:Y});r4.push(...await oi0({content:o$,tools:Y}));let Y4=((g0=w==null?void 0:w.requestBody)!=null?g0:!0)?(p0=Q4.request)!=null?p0:{}:{...Q4.request,body:void 0},i4={...Q4.response,messages:structuredClone(r4),body:((U4=w==null?void 0:w.responseBody)!=null?U4:!0)?(P1=Q4.response)==null?void 0:P1.body:void 0},C9=a1.length,q6=new uS4({stepNumber:C9,model:f0,functionId:N==null?void 0:N.functionId,metadata:N==null?void 0:N.metadata,experimental_context:q,content:o$,finishReason:Q4.finishReason.unified,rawFinishReason:Q4.finishReason.raw,usage:si0(Q4.usage),warnings:Q4.warnings,providerMetadata:Q4.providerMetadata,request:Y4,response:i4});Xn0({warnings:(d1=Q4.warnings)!=null?d1:[],provider:f0.provider,model:f0.modelId}),a1.push(q6),await P3({event:q6,callbacks:[S,Q0.onStepFinish]})}finally{if(A6!=null)clearTimeout(A6)}}while((C6.length>0&&t4.length===C6.length||A1.size>0)&&!await dS4({stopConditions:d,steps:a1}));m.setAttributes(await F2({telemetry:N,attributes:{"ai.response.finishReason":Q4.finishReason.unified,"ai.response.text":{output:()=>RC4(Q4.content)},"ai.response.reasoning":{output:()=>MC4(Q4.content)},"ai.response.toolCalls":{output:()=>{let A6=PC4(Q4.content);return A6==null?void 0:JSON.stringify(A6)}},"ai.response.providerMetadata":JSON.stringify(Q4.providerMetadata)}}));let T1=a1[a1.length-1],R4=a1.reduce((A6,K4)=>{return vS4(A6,K4.usage)},{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0});m.setAttributes(await F2({telemetry:N,attributes:{"ai.usage.inputTokens":R4.inputTokens,"ai.usage.inputTokenDetails.noCacheTokens":(C0=R4.inputTokenDetails)==null?void 0:C0.noCacheTokens,"ai.usage.inputTokenDetails.cacheReadTokens":(n0=R4.inputTokenDetails)==null?void 0:n0.cacheReadTokens,"ai.usage.inputTokenDetails.cacheWriteTokens":(J0=R4.inputTokenDetails)==null?void 0:J0.cacheWriteTokens,"ai.usage.outputTokens":R4.outputTokens,"ai.usage.outputTokenDetails.textTokens":(B0=R4.outputTokenDetails)==null?void 0:B0.textTokens,"ai.usage.outputTokenDetails.reasoningTokens":(Y1=R4.outputTokenDetails)==null?void 0:Y1.reasoningTokens,"ai.usage.totalTokens":R4.totalTokens,"ai.usage.reasoningTokens":(c1=R4.outputTokenDetails)==null?void 0:c1.reasoningTokens,"ai.usage.cachedInputTokens":(C4=R4.inputTokenDetails)==null?void 0:C4.cacheReadTokens}})),await P3({event:{stepNumber:T1.stepNumber,model:T1.model,functionId:T1.functionId,metadata:T1.metadata,experimental_context:T1.experimental_context,finishReason:T1.finishReason,rawFinishReason:T1.rawFinishReason,usage:T1.usage,content:T1.content,text:T1.text,reasoningText:T1.reasoningText,reasoning:T1.reasoning,files:T1.files,sources:T1.sources,toolCalls:T1.toolCalls,staticToolCalls:T1.staticToolCalls,dynamicToolCalls:T1.dynamicToolCalls,toolResults:T1.toolResults,staticToolResults:T1.staticToolResults,dynamicToolResults:T1.dynamicToolResults,request:T1.request,response:T1.response,warnings:T1.warnings,providerMetadata:T1.providerMetadata,steps:a1,totalUsage:R4},callbacks:[T,Q0.onFinish]});let w4;if(T1.finishReason==="stop")w4=await(F!=null?F:DG0()).parseCompleteOutput({text:T1.text},{response:T1.response,usage:T1.usage,finishReason:T1.finishReason});return new oy9({steps:a1,totalUsage:R4,output:w4})}})}catch(m){throw wS4(m)}}async function IC4({toolCalls:$,tools:Y,tracer:X,telemetry:G,messages:J,abortSignal:Q,experimental_context:W,stepNumber:Z,model:K,onToolCallStart:H,onToolCallFinish:z}){return(await Promise.all($.map(async(A)=>Qn0({toolCall:A,tools:Y,tracer:X,telemetry:G,messages:J,abortSignal:Q,experimental_context:W,stepNumber:Z,model:K,onToolCallStart:H,onToolCallFinish:z})))).filter((A)=>A!=null)}var oy9=class{constructor($){this.steps=$.steps,this._output=$.output,this.totalUsage=$.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 aC4;return this._output}};function PC4($){let Y=$.filter((X)=>X.type==="tool-call");if(Y.length===0)return;return Y.map((X)=>({toolCallId:X.toolCallId,toolName:X.toolName,input:X.input}))}function ty9({content:$,toolCalls:Y,toolOutputs:X,toolApprovalRequests:G,tools:J}){let Q=[];for(let W of $)switch(W.type){case"text":case"reasoning":case"source":Q.push(W);break;case"file":{Q.push({type:"file",file:new hS4(W),...W.providerMetadata!=null?{providerMetadata:W.providerMetadata}:{}});break}case"tool-call":{Q.push(Y.find((Z)=>Z.toolCallId===W.toolCallId));break}case"tool-result":{let Z=Y.find((K)=>K.toolCallId===W.toolCallId);if(Z==null){let K=J==null?void 0:J[W.toolName];if(!((K==null?void 0:K.type)==="provider"&&K.supportsDeferredResults))throw Error(`Tool call ${W.toolCallId} not found.`);if(W.isError)Q.push({type:"tool-error",toolCallId:W.toolCallId,toolName:W.toolName,input:void 0,error:W.result,providerExecuted:!0,dynamic:W.dynamic,...W.providerMetadata!=null?{providerMetadata:W.providerMetadata}:{},...(K==null?void 0:K.metadata)!=null?{toolMetadata:K.metadata}:{}});else Q.push({type:"tool-result",toolCallId:W.toolCallId,toolName:W.toolName,input:void 0,output:W.result,providerExecuted:!0,dynamic:W.dynamic,...W.providerMetadata!=null?{providerMetadata:W.providerMetadata}:{},...(K==null?void 0:K.metadata)!=null?{toolMetadata:K.metadata}:{}});break}if(W.isError)Q.push({type:"tool-error",toolCallId:W.toolCallId,toolName:W.toolName,input:Z.input,error:W.result,providerExecuted:!0,dynamic:Z.dynamic,...W.providerMetadata!=null?{providerMetadata:W.providerMetadata}:{},...Z.toolMetadata!=null?{toolMetadata:Z.toolMetadata}:{}});else Q.push({type:"tool-result",toolCallId:W.toolCallId,toolName:W.toolName,input:Z.input,output:W.result,providerExecuted:!0,dynamic:Z.dynamic,...W.providerMetadata!=null?{providerMetadata:W.providerMetadata}:{},...Z.toolMetadata!=null?{toolMetadata:Z.toolMetadata}:{}});break}case"tool-approval-request":{let Z=Y.find((K)=>K.toolCallId===W.toolCallId);if(Z==null)throw new Yn0({toolCallId:W.toolCallId,approvalId:W.approvalId});Q.push({type:"tool-approval-request",approvalId:W.approvalId,toolCall:Z});break}}return[...Q,...X,...G]}function LG0($,Y){let X=new Headers($!=null?$:{});for(let[G,J]of Object.entries(Y))if(!X.has(G))X.set(G,J);return X}function ey9({status:$,statusText:Y,headers:X,textStream:G}){return new Response(G.pipeThrough(new TextEncoderStream),{status:$!=null?$:200,statusText:Y,headers:LG0(X,{"content-type":"text/plain; charset=utf-8"})})}function lS4({response:$,status:Y,statusText:X,headers:G,stream:J}){let Q=Y!=null?Y:200;if(X!==void 0)$.writeHead(Q,X,G);else $.writeHead(Q,G);let W=J.getReader();(async()=>{try{while(!0){let{done:K,value:H}=await W.read();if(K)break;if(!$.write(H))await new Promise((V)=>{$.once("drain",V)})}}catch(K){throw K}finally{$.end()}})()}function $b9({response:$,status:Y,statusText:X,headers:G,textStream:J}){lS4({response:$,status:Y,statusText:X,headers:Object.fromEntries(LG0(G,{"content-type":"text/plain; charset=utf-8"}).entries()),stream:J.pipeThrough(new TextEncoderStream)})}var iS4=class extends TransformStream{constructor(){super({transform($,Y){Y.enqueue(`data: ${JSON.stringify($)}

`)},flush($){$.enqueue(`data: [DONE]

`)}})}},nS4={"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive","x-vercel-ai-ui-message-stream":"v1","x-accel-buffering":"no"};function BG0({status:$,statusText:Y,headers:X,stream:G,consumeSseStream:J}){let Q=G.pipeThrough(new iS4);if(J){let[W,Z]=Q.tee();Q=W,J({stream:Z})}return new Response(Q.pipeThrough(new TextEncoderStream),{status:$,statusText:Y,headers:LG0(X,nS4)})}function Yb9({originalMessages:$,responseMessageId:Y}){if($==null)return;let X=$[$.length-1];return(X==null?void 0:X.role)==="assistant"?X.id:typeof Y==="function"?Y():Y}var fd=U.record(U.string(),GR.optional()),P_7=N1(()=>z1(U.union([U.strictObject({type:U.literal("text-start"),id:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("text-delta"),id:U.string(),delta:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("text-end"),id:U.string(),providerMetadata:k4.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:k4.optional(),toolMetadata:fd.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:k4.optional(),toolMetadata:fd.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:k4.optional(),toolMetadata:fd.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(),providerMetadata:k4.optional(),toolMetadata:fd.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(),providerMetadata:k4.optional(),toolMetadata:fd.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:k4.optional()}),U.strictObject({type:U.literal("reasoning-delta"),id:U.string(),delta:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("reasoning-end"),id:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("source-url"),sourceId:U.string(),url:U.string(),title:U.string().optional(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("source-document"),sourceId:U.string(),mediaType:U.string(),title:U.string(),filename:U.string().optional(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("file"),url:U.string(),mediaType:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.custom(($)=>typeof $==="string"&&$.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 Xb9($){return $.type.startsWith("data-")}function di0($){return $.type.startsWith("data-")}function ci0($){return $.type==="text"}function li0($){return $.type==="file"}function wC4($){return $.type==="reasoning"}function ti0($){return $.type.startsWith("tool-")}function rS4($){return $.type==="dynamic-tool"}function pC($){return ti0($)||rS4($)}function ei0($){return $.type.split("-").slice(1).join("-")}function ii0($){return rS4($)?$.toolName:ei0($)}function Gb9({lastMessage:$,messageId:Y}){return{message:($==null?void 0:$.role)==="assistant"?$:{id:Y,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Jb9({stream:$,messageMetadataSchema:Y,dataPartSchemas:X,runUpdateMessageJob:G,onError:J,onToolCall:Q,onData:W}){return $.pipeThrough(new TransformStream({async transform(Z,K){await G(async({state:H,write:z})=>{var V,A,F,N;function D(E){let R=H.message.parts.filter(pC).find((q)=>q.toolCallId===E);if(R==null)throw new uC({chunkType:"tool-invocation",chunkId:E,message:`No tool invocation found for tool call ID "${E}".`});return R}function L(E){var M;let R=H.message.parts.find((I)=>ti0(I)&&I.toolCallId===E.toolCallId),q=E,w=R;if(R!=null){if(R.state=E.state,w.input=q.input,w.output=q.output,w.errorText=q.errorText,w.rawInput=q.rawInput,w.preliminary=q.preliminary,E.title!==void 0)w.title=E.title;if(E.toolMetadata!==void 0)w.toolMetadata=E.toolMetadata;w.providerExecuted=(M=q.providerExecuted)!=null?M:R.providerExecuted;let I=q.providerMetadata;if(I!=null)if(E.state==="output-available"||E.state==="output-error"){let P=R;P.resultProviderMetadata=I}else R.callProviderMetadata=I}else H.message.parts.push({type:`tool-${E.toolName}`,toolCallId:E.toolCallId,state:E.state,title:E.title,...E.toolMetadata!==void 0?{toolMetadata:E.toolMetadata}:{},input:q.input,output:q.output,rawInput:q.rawInput,errorText:q.errorText,providerExecuted:q.providerExecuted,preliminary:q.preliminary,...q.providerMetadata!=null&&(E.state==="output-available"||E.state==="output-error")?{resultProviderMetadata:q.providerMetadata}:{},...q.providerMetadata!=null&&!(E.state==="output-available"||E.state==="output-error")?{callProviderMetadata:q.providerMetadata}:{}})}function B(E){var M,R;let q=H.message.parts.find((P)=>P.type==="dynamic-tool"&&P.toolCallId===E.toolCallId),w=E,I=q;if(q!=null){if(q.state=E.state,I.toolName=E.toolName,I.input=w.input,I.output=w.output,I.errorText=w.errorText,I.rawInput=(M=w.rawInput)!=null?M:I.rawInput,I.preliminary=w.preliminary,E.title!==void 0)I.title=E.title;if(E.toolMetadata!==void 0)I.toolMetadata=E.toolMetadata;I.providerExecuted=(R=w.providerExecuted)!=null?R:q.providerExecuted;let P=w.providerMetadata;if(P!=null)if(E.state==="output-available"||E.state==="output-error"){let _=q;_.resultProviderMetadata=P}else q.callProviderMetadata=P}else H.message.parts.push({type:"dynamic-tool",toolName:E.toolName,toolCallId:E.toolCallId,state:E.state,input:w.input,output:w.output,errorText:w.errorText,preliminary:w.preliminary,providerExecuted:w.providerExecuted,title:E.title,...E.toolMetadata!==void 0?{toolMetadata:E.toolMetadata}:{},...w.providerMetadata!=null&&(E.state==="output-available"||E.state==="output-error")?{resultProviderMetadata:w.providerMetadata}:{},...w.providerMetadata!=null&&!(E.state==="output-available"||E.state==="output-error")?{callProviderMetadata:w.providerMetadata}:{}})}async function O(E){if(E!=null){let M=H.message.metadata!=null?NG0(H.message.metadata,E):E;if(Y!=null)await i5({value:M,schema:Y,context:{field:"message.metadata",entityId:H.message.id}});H.message.metadata=M}}switch(Z.type){case"text-start":{let E={type:"text",text:"",providerMetadata:Z.providerMetadata,state:"streaming"};H.activeTextParts[Z.id]=E,H.message.parts.push(E),z();break}case"text-delta":{let E=H.activeTextParts[Z.id];if(E==null)throw new uC({chunkType:"text-delta",chunkId:Z.id,message:`Received text-delta for missing text part with ID "${Z.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});E.text+=Z.delta,E.providerMetadata=(V=Z.providerMetadata)!=null?V:E.providerMetadata,z();break}case"text-end":{let E=H.activeTextParts[Z.id];if(E==null)throw new uC({chunkType:"text-end",chunkId:Z.id,message:`Received text-end for missing text part with ID "${Z.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});E.state="done",E.providerMetadata=(A=Z.providerMetadata)!=null?A:E.providerMetadata,delete H.activeTextParts[Z.id],z();break}case"reasoning-start":{let E={type:"reasoning",text:"",providerMetadata:Z.providerMetadata,state:"streaming"};H.activeReasoningParts[Z.id]=E,H.message.parts.push(E),z();break}case"reasoning-delta":{let E=H.activeReasoningParts[Z.id];if(E==null)throw new uC({chunkType:"reasoning-delta",chunkId:Z.id,message:`Received reasoning-delta for missing reasoning part with ID "${Z.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});E.text+=Z.delta,E.providerMetadata=(F=Z.providerMetadata)!=null?F:E.providerMetadata,z();break}case"reasoning-end":{let E=H.activeReasoningParts[Z.id];if(E==null)throw new uC({chunkType:"reasoning-end",chunkId:Z.id,message:`Received reasoning-end for missing reasoning part with ID "${Z.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});E.providerMetadata=(N=Z.providerMetadata)!=null?N:E.providerMetadata,E.state="done",delete H.activeReasoningParts[Z.id],z();break}case"file":{H.message.parts.push({type:"file",mediaType:Z.mediaType,url:Z.url,...Z.providerMetadata!=null?{providerMetadata:Z.providerMetadata}:{}}),z();break}case"source-url":{H.message.parts.push({type:"source-url",sourceId:Z.sourceId,url:Z.url,title:Z.title,providerMetadata:Z.providerMetadata}),z();break}case"source-document":{H.message.parts.push({type:"source-document",sourceId:Z.sourceId,mediaType:Z.mediaType,title:Z.title,filename:Z.filename,providerMetadata:Z.providerMetadata}),z();break}case"tool-input-start":{let E=H.message.parts.filter(ti0);if(H.partialToolCalls[Z.toolCallId]={text:"",toolName:Z.toolName,index:E.length,dynamic:Z.dynamic,title:Z.title,toolMetadata:Z.toolMetadata},Z.dynamic)B({toolCallId:Z.toolCallId,toolName:Z.toolName,state:"input-streaming",input:void 0,providerExecuted:Z.providerExecuted,title:Z.title,toolMetadata:Z.toolMetadata,providerMetadata:Z.providerMetadata});else L({toolCallId:Z.toolCallId,toolName:Z.toolName,state:"input-streaming",input:void 0,providerExecuted:Z.providerExecuted,title:Z.title,toolMetadata:Z.toolMetadata,providerMetadata:Z.providerMetadata});z();break}case"tool-input-delta":{let E=H.partialToolCalls[Z.toolCallId];if(E==null)throw new uC({chunkType:"tool-input-delta",chunkId:Z.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${Z.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});E.text+=Z.inputTextDelta;let{value:M}=await pd(E.text);if(E.dynamic)B({toolCallId:Z.toolCallId,toolName:E.toolName,state:"input-streaming",input:M,title:E.title,toolMetadata:E.toolMetadata});else L({toolCallId:Z.toolCallId,toolName:E.toolName,state:"input-streaming",input:M,title:E.title,toolMetadata:E.toolMetadata});z();break}case"tool-input-available":{if(Z.dynamic)B({toolCallId:Z.toolCallId,toolName:Z.toolName,state:"input-available",input:Z.input,providerExecuted:Z.providerExecuted,providerMetadata:Z.providerMetadata,title:Z.title,toolMetadata:Z.toolMetadata});else L({toolCallId:Z.toolCallId,toolName:Z.toolName,state:"input-available",input:Z.input,providerExecuted:Z.providerExecuted,providerMetadata:Z.providerMetadata,title:Z.title,toolMetadata:Z.toolMetadata});if(z(),Q&&!Z.providerExecuted)await Q({toolCall:Z});break}case"tool-input-error":{let E=H.message.parts.filter(pC).find((R)=>R.toolCallId===Z.toolCallId);if(E!=null?E.type==="dynamic-tool":!!Z.dynamic)B({toolCallId:Z.toolCallId,toolName:Z.toolName,state:"output-error",input:Z.input,errorText:Z.errorText,providerExecuted:Z.providerExecuted,providerMetadata:Z.providerMetadata,toolMetadata:Z.toolMetadata});else L({toolCallId:Z.toolCallId,toolName:Z.toolName,state:"output-error",input:void 0,rawInput:Z.input,errorText:Z.errorText,providerExecuted:Z.providerExecuted,providerMetadata:Z.providerMetadata,toolMetadata:Z.toolMetadata});z();break}case"tool-approval-request":{let E=D(Z.toolCallId);E.state="approval-requested",E.approval={id:Z.approvalId},z();break}case"tool-output-denied":{let E=D(Z.toolCallId);E.state="output-denied",z();break}case"tool-output-available":{let E=D(Z.toolCallId);if(E.type==="dynamic-tool")B({toolCallId:Z.toolCallId,toolName:E.toolName,state:"output-available",input:E.input,output:Z.output,preliminary:Z.preliminary,providerExecuted:Z.providerExecuted,providerMetadata:Z.providerMetadata,title:E.title,toolMetadata:E.toolMetadata});else L({toolCallId:Z.toolCallId,toolName:ei0(E),state:"output-available",input:E.input,output:Z.output,providerExecuted:Z.providerExecuted,preliminary:Z.preliminary,providerMetadata:Z.providerMetadata,title:E.title,toolMetadata:E.toolMetadata});z();break}case"tool-output-error":{let E=D(Z.toolCallId);if(E.type==="dynamic-tool")B({toolCallId:Z.toolCallId,toolName:E.toolName,state:"output-error",input:E.input,errorText:Z.errorText,providerExecuted:Z.providerExecuted,providerMetadata:Z.providerMetadata,title:E.title,toolMetadata:E.toolMetadata});else L({toolCallId:Z.toolCallId,toolName:ei0(E),state:"output-error",input:E.input,rawInput:E.rawInput,errorText:Z.errorText,providerExecuted:Z.providerExecuted,providerMetadata:Z.providerMetadata,title:E.title,toolMetadata:E.toolMetadata});z();break}case"start-step":{H.message.parts.push({type:"step-start"});break}case"finish-step":{H.activeTextParts={},H.activeReasoningParts={};break}case"start":{if(Z.messageId!=null)H.message.id=Z.messageId;if(await O(Z.messageMetadata),Z.messageId!=null||Z.messageMetadata!=null)z();break}case"finish":{if(Z.finishReason!=null)H.finishReason=Z.finishReason;if(await O(Z.messageMetadata),Z.messageMetadata!=null)z();break}case"message-metadata":{if(await O(Z.messageMetadata),Z.messageMetadata!=null)z();break}case"error":{J==null||J(Error(Z.errorText));break}default:if(Xb9(Z)){if((X==null?void 0:X[Z.type])!=null){let R=H.message.parts.findIndex((w)=>("id"in w)&&("data"in w)&&w.id===Z.id&&w.type===Z.type),q=R>=0?R:H.message.parts.length;await i5({value:Z.data,schema:X[Z.type],context:{field:`message.parts[${q}].data`,entityName:Z.type,entityId:Z.id}})}let E=Z;if(E.transient){W==null||W(E);break}let M=E.id!=null?H.message.parts.find((R)=>E.type===R.type&&E.id===R.id):void 0;if(M!=null)M.data=E.data;else H.message.parts.push(E);W==null||W(E),z()}}K.enqueue(Z)})}}))}function aS4({messageId:$,originalMessages:Y=[],onStepFinish:X,onFinish:G,onError:J,stream:Q}){let W=Y==null?void 0:Y[Y.length-1];if((W==null?void 0:W.role)!=="assistant")W=void 0;else $=W.id;let Z=!1,K=Q.pipeThrough(new TransformStream({transform(N,D){if(N.type==="start"){let L=N;if(L.messageId==null&&$!=null)L.messageId=$}if(N.type==="abort")Z=!0;D.enqueue(N)}}));if(G==null&&X==null)return K;let H=Gb9({lastMessage:W?structuredClone(W):void 0,messageId:$!=null?$:""}),z=async(N)=>{await N({state:H,write:()=>{}})},V=!1,A=async()=>{if(V||!G)return;V=!0;let N=H.message.id===(W==null?void 0:W.id);await G({isAborted:Z,isContinuation:N,responseMessage:H.message,messages:[...N?Y.slice(0,-1):Y,H.message],finishReason:H.finishReason})},F=async()=>{if(!X)return;let N=H.message.id===(W==null?void 0:W.id);try{await X({isContinuation:N,responseMessage:structuredClone(H.message),messages:[...N?Y.slice(0,-1):Y,structuredClone(H.message)]})}catch(D){J(D)}};return Jb9({stream:K,runUpdateMessageJob:z,onError:J}).pipeThrough(new TransformStream({async transform(N,D){if(N.type==="finish-step")await F();D.enqueue(N)},async cancel(){await A()},async flush(){await A()}}))}function Qb9({response:$,status:Y,statusText:X,headers:G,stream:J,consumeSseStream:Q}){let W=J.pipeThrough(new iS4);if(Q){let[Z,K]=W.tee();W=Z,Q({stream:K})}lS4({response:$,status:Y,statusText:X,headers:Object.fromEntries(LG0(G,nS4).entries()),stream:W.pipeThrough(new TextEncoderStream)})}function gd($){let Y=$.pipeThrough(new TransformStream);return Y[Symbol.asyncIterator]=function(){let X=this.getReader(),G=!1;async function J(Q){var W;if(G)return;G=!0;try{if(Q)await((W=X.cancel)==null?void 0:W.call(X))}finally{try{X.releaseLock()}catch(Z){}}}return{async next(){if(G)return{done:!0,value:void 0};let{done:Q,value:W}=await X.read();if(Q)return await J(!0),{done:!0,value:void 0};return{done:!1,value:W}},async return(){return await J(!0),{done:!0,value:void 0}},async throw(Q){throw await J(!0),Q}}},Y}async function Wb9({stream:$,onError:Y}){let X=$.getReader();try{while(!0){let{done:G}=await X.read();if(G)break}}catch(G){Y==null||Y(G)}finally{X.releaseLock()}}function _C4(){let $,Y;return{promise:new Promise((G,J)=>{$=G,Y=J}),resolve:$,reject:Y}}function Zb9(){let $=[],Y=null,X=!1,G=_C4(),J=()=>{X=!0,G.resolve(),$.forEach((W)=>W.cancel()),$=[],Y==null||Y.close()},Q=async()=>{if(X&&$.length===0){Y==null||Y.close();return}if($.length===0)return G=_C4(),await G.promise,Q();try{let{value:W,done:Z}=await $[0].read();if(Z)if($.shift(),$.length===0&&X)Y==null||Y.close();else await Q();else Y==null||Y.enqueue(W)}catch(W){Y==null||Y.error(W),$.shift(),J()}};return{stream:new ReadableStream({start(W){Y=W},pull:Q,async cancel(){for(let W of $)await W.cancel();$=[],X=!0}}),addStream:(W)=>{if(X)throw Error("Cannot add inner stream: outer stream is closed");$.push(W.getReader()),G.resolve()},close:()=>{if(X=!0,G.resolve(),$.length===0)Y==null||Y.close()},terminate:J}}function Kb9({tools:$,generatorStream:Y,tracer:X,telemetry:G,system:J,messages:Q,abortSignal:W,repairToolCall:Z,experimental_context:K,generateId:H,stepNumber:z,model:V,onToolCallStart:A,onToolCallFinish:F}){let N=null,D=new ReadableStream({start(w){N=w}}),L=new Set,B=new Map,O=new Map,E=!1,M=void 0;function R(){if(E&&L.size===0){if(M!=null)N.enqueue(M);N.close()}}let q=new TransformStream({async transform(w,I){let P=w.type;switch(P){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":{I.enqueue(w);break}case"file":{I.enqueue({type:"file",file:new dy9({data:w.data,mediaType:w.mediaType}),...w.providerMetadata!=null?{providerMetadata:w.providerMetadata}:{}});break}case"finish":{M={type:"finish",finishReason:w.finishReason.unified,rawFinishReason:w.finishReason.raw,usage:si0(w.usage),providerMetadata:w.providerMetadata};break}case"tool-approval-request":{let _=O.get(w.toolCallId);if(_==null){N.enqueue({type:"error",error:new Yn0({toolCallId:w.toolCallId,approvalId:w.approvalId})});break}I.enqueue({type:"tool-approval-request",approvalId:w.approvalId,toolCall:_});break}case"tool-call":{try{let _=await gS4({toolCall:w,tools:$,repairToolCall:Z,system:J,messages:Q});if(O.set(_.toolCallId,_),I.enqueue(_),_.invalid){N.enqueue({type:"tool-error",toolCallId:_.toolCallId,toolName:_.toolName,input:_.input,error:cD(_.error),dynamic:!0,title:_.title,..._.toolMetadata!=null?{toolMetadata:_.toolMetadata}:{}});break}let C=$==null?void 0:$[_.toolName];if(C==null)break;if(C.onInputAvailable!=null)await C.onInputAvailable({input:_.input,toolCallId:_.toolCallId,messages:Q,abortSignal:W,experimental_context:K});if(await fS4({tool:C,toolCall:_,messages:Q,experimental_context:K})){N.enqueue({type:"tool-approval-request",approvalId:H(),toolCall:_});break}if(B.set(_.toolCallId,_.input),C.execute!=null&&_.providerExecuted!==!0){let k=H();L.add(k),Qn0({toolCall:_,tools:$,tracer:X,telemetry:G,messages:Q,abortSignal:W,experimental_context:K,stepNumber:z,model:V,onToolCallStart:A,onToolCallFinish:F,onPreliminaryToolResult:(S)=>{N.enqueue(S)}}).then((S)=>{N.enqueue(S)}).catch((S)=>{N.enqueue({type:"error",error:S})}).finally(()=>{L.delete(k),R()})}}catch(_){N.enqueue({type:"error",error:_})}break}case"tool-result":{let _=w.toolName,C=O.get(w.toolCallId);if(w.isError)N.enqueue({type:"tool-error",toolCallId:w.toolCallId,toolName:_,input:B.get(w.toolCallId),providerExecuted:!0,error:w.result,dynamic:w.dynamic,...w.providerMetadata!=null?{providerMetadata:w.providerMetadata}:{},...(C==null?void 0:C.toolMetadata)!=null?{toolMetadata:C.toolMetadata}:{}});else I.enqueue({type:"tool-result",toolCallId:w.toolCallId,toolName:_,input:B.get(w.toolCallId),output:w.result,providerExecuted:!0,dynamic:w.dynamic,...w.providerMetadata!=null?{providerMetadata:w.providerMetadata}:{},...(C==null?void 0:C.toolMetadata)!=null?{toolMetadata:C.toolMetadata}:{}});break}default:throw Error(`Unhandled chunk type: ${P}`)}},flush(){E=!0,R()}});return new ReadableStream({async start(w){return Promise.all([Y.pipeThrough(q).pipeTo(new WritableStream({write(I){w.enqueue(I)},close(){}})),D.pipeTo(new WritableStream({write(I){w.enqueue(I)},close(){w.close()}}))])}})}var Ub9=XH({prefix:"aitxt",size:24});function Wn0({model:$,tools:Y,toolChoice:X,system:G,prompt:J,messages:Q,allowSystemInMessages:W,maxRetries:Z,abortSignal:K,timeout:H,headers:z,stopWhen:V=pS4(1),experimental_output:A,output:F=A,experimental_telemetry:N,prepareStep:D,providerOptions:L,experimental_activeTools:B,activeTools:O=B,experimental_repairToolCall:E,experimental_transform:M,experimental_download:R,includeRawChunks:q=!1,onChunk:w,onError:I=({error:g})=>{console.error(g)},onFinish:P,onAbort:_,onStepFinish:C,experimental_onStart:k,experimental_onStepStart:S,experimental_onToolCallStart:T,experimental_onToolCallFinish:v,experimental_context:x,experimental_include:y,_internal:{now:d=AG0,generateId:u=Ub9}={},...b}){let g=Gn0(H),p=NS4(H),h=Ny9(H),n=p!=null?new AbortController:void 0,t=h!=null?new AbortController:void 0;return new zb9({model:FG0($),telemetry:N,headers:z,settings:b,maxRetries:Z,abortSignal:cS4(K,g!=null?AbortSignal.timeout(g):void 0,n==null?void 0:n.signal,t==null?void 0:t.signal),stepTimeoutMs:p,stepAbortController:n,chunkTimeoutMs:h,chunkAbortController:t,system:G,prompt:J,messages:Q,allowSystemInMessages:W,tools:Y,toolChoice:X,transforms:XR(M),activeTools:O,repairToolCall:E,stopConditions:XR(V),output:F,providerOptions:L,prepareStep:D,includeRawChunks:q,timeout:H,stopWhen:V,originalAbortSignal:K,onChunk:w,onError:I,onFinish:P,onAbort:_,onStepFinish:C,onStart:k,onStepStart:S,onToolCallStart:T,onToolCallFinish:v,now:d,generateId:u,experimental_context:x,download:R,include:y})}function Hb9($){let Y=void 0,X="",G="",J=void 0,Q="";function W({controller:Z,partialOutput:K=void 0}){Z.enqueue({part:{type:"text-delta",id:Y,text:G,providerMetadata:J},partialOutput:K}),G=""}return new TransformStream({async transform(Z,K){var H;if(Z.type==="finish-step"&&G.length>0)W({controller:K});if(Z.type!=="text-delta"&&Z.type!=="text-start"&&Z.type!=="text-end"){K.enqueue({part:Z,partialOutput:void 0});return}if(Y==null)Y=Z.id;else if(Z.id!==Y){K.enqueue({part:Z,partialOutput:void 0});return}if(Z.type==="text-start"){K.enqueue({part:Z,partialOutput:void 0});return}if(Z.type==="text-end"){if(G.length>0)W({controller:K});K.enqueue({part:Z,partialOutput:void 0});return}X+=Z.text,G+=Z.text,J=(H=Z.providerMetadata)!=null?H:J;let z=await $.parsePartialOutput({text:X});if(z!==void 0){let V=typeof z.partial==="string"?z.partial:JSON.stringify(z.partial);if(V!==Q)W({controller:K,partialOutput:z.partial}),Q=V}}})}var zb9=class{constructor({model:$,telemetry:Y,headers:X,settings:G,maxRetries:J,abortSignal:Q,stepTimeoutMs:W,stepAbortController:Z,chunkTimeoutMs:K,chunkAbortController:H,system:z,prompt:V,messages:A,allowSystemInMessages:F,tools:N,toolChoice:D,transforms:L,activeTools:B,repairToolCall:O,stopConditions:E,output:M,providerOptions:R,prepareStep:q,includeRawChunks:w,now:I,generateId:P,timeout:_,stopWhen:C,originalAbortSignal:k,onChunk:S,onError:T,onFinish:v,onAbort:x,onStepFinish:y,onStart:d,onStepStart:u,onToolCallStart:b,onToolCallFinish:g,experimental_context:p,download:h,include:n}){this._totalUsage=new AM,this._finishReason=new AM,this._rawFinishReason=new AM,this._steps=new AM,this.outputSpecification=M,this.includeRawChunks=w,this.tools=N;let s=kS4()(Y==null?void 0:Y.integrations),Z0,X0=[],a=[],Q0=void 0,e=void 0,m=void 0,$0={},Y0=[],K0=[],A0=new Map,D0,O0={},R0={},I0=new TransformStream({async transform(C4,c4){var r4,T6,p6,n6;c4.enqueue(C4);let{part:K1}=C4;if(K1.type==="text-delta"||K1.type==="reasoning-delta"||K1.type==="source"||K1.type==="tool-call"||K1.type==="tool-result"||K1.type==="tool-input-start"||K1.type==="tool-input-delta"||K1.type==="raw")await(S==null?void 0:S({chunk:K1}));if(K1.type==="error")await T({error:wS4(K1.error)});if(K1.type==="text-start")O0[K1.id]={type:"text",text:"",providerMetadata:K1.providerMetadata},X0.push(O0[K1.id]);if(K1.type==="text-delta"){let Q4=O0[K1.id];if(Q4==null){c4.enqueue({part:{type:"error",error:`text part ${K1.id} not found`},partialOutput:void 0});return}Q4.text+=K1.text,Q4.providerMetadata=(r4=K1.providerMetadata)!=null?r4:Q4.providerMetadata}if(K1.type==="text-end"){let Q4=O0[K1.id];if(Q4==null){c4.enqueue({part:{type:"error",error:`text part ${K1.id} not found`},partialOutput:void 0});return}Q4.providerMetadata=(T6=K1.providerMetadata)!=null?T6:Q4.providerMetadata,delete O0[K1.id]}if(K1.type==="reasoning-start")R0[K1.id]={type:"reasoning",text:"",providerMetadata:K1.providerMetadata},X0.push(R0[K1.id]);if(K1.type==="reasoning-delta"){let Q4=R0[K1.id];if(Q4==null){c4.enqueue({part:{type:"error",error:`reasoning part ${K1.id} not found`},partialOutput:void 0});return}Q4.text+=K1.text,Q4.providerMetadata=(p6=K1.providerMetadata)!=null?p6:Q4.providerMetadata}if(K1.type==="reasoning-end"){let Q4=R0[K1.id];if(Q4==null){c4.enqueue({part:{type:"error",error:`reasoning part ${K1.id} not found`},partialOutput:void 0});return}Q4.providerMetadata=(n6=K1.providerMetadata)!=null?n6:Q4.providerMetadata,delete R0[K1.id]}if(K1.type==="file")X0.push({type:"file",file:K1.file,...K1.providerMetadata!=null?{providerMetadata:K1.providerMetadata}:{}});if(K1.type==="source")X0.push(K1);if(K1.type==="tool-call")X0.push(K1);if(K1.type==="tool-result"&&!K1.preliminary)X0.push(K1);if(K1.type==="tool-approval-request")X0.push(K1);if(K1.type==="tool-error")X0.push(K1);if(K1.type==="start-step")X0=[],R0={},O0={},$0=K1.request,Y0=K1.warnings;if(K1.type==="finish-step"){let Q4=await oi0({content:X0,tools:N}),C6=new uS4({stepNumber:K0.length,model:Y1,...c1,experimental_context:p,content:X0,finishReason:K1.finishReason,rawFinishReason:K1.rawFinishReason,usage:K1.usage,warnings:Y0,request:$0,response:{...K1.response,messages:[...a,...Q4]},providerMetadata:K1.providerMetadata});await P3({event:C6,callbacks:[y,s.onStepFinish]}),Xn0({warnings:Y0,provider:Y1.provider,model:Y1.modelId}),K0.push(C6),a.push(...Q4),Z0.resolve()}if(K1.type==="finish")m=K1.totalUsage,Q0=K1.finishReason,e=K1.rawFinishReason},async flush(C4){var c4,r4,T6,p6,n6,K1,Q4;try{if(K0.length===0){let A1=(Q==null?void 0:Q.aborted)?Q.reason:new aC4({message:"No output generated. Check the stream for errors."});B0._finishReason.reject(A1),B0._rawFinishReason.reject(A1),B0._totalUsage.reject(A1),B0._steps.reject(A1);return}let C6=Q0!=null?Q0:"other",t4=m!=null?m:pi0();B0._finishReason.resolve(C6),B0._rawFinishReason.resolve(e),B0._totalUsage.resolve(t4),B0._steps.resolve(K0);let a1=K0[K0.length-1];await P3({event:{stepNumber:a1.stepNumber,model:a1.model,functionId:a1.functionId,metadata:a1.metadata,experimental_context:a1.experimental_context,finishReason:a1.finishReason,rawFinishReason:a1.rawFinishReason,totalUsage:t4,usage:a1.usage,content:a1.content,text:a1.text,reasoningText:a1.reasoningText,reasoning:a1.reasoning,files:a1.files,sources:a1.sources,toolCalls:a1.toolCalls,staticToolCalls:a1.staticToolCalls,dynamicToolCalls:a1.dynamicToolCalls,toolResults:a1.toolResults,staticToolResults:a1.staticToolResults,dynamicToolResults:a1.dynamicToolResults,request:a1.request,response:a1.response,warnings:a1.warnings,providerMetadata:a1.providerMetadata,steps:K0},callbacks:[v,s.onFinish]}),D0.setAttributes(await F2({telemetry:Y,attributes:{"ai.response.finishReason":C6,"ai.response.text":{output:()=>a1.text},"ai.response.reasoning":{output:()=>a1.reasoningText},"ai.response.toolCalls":{output:()=>{var A1;return((A1=a1.toolCalls)==null?void 0:A1.length)?JSON.stringify(a1.toolCalls):void 0}},"ai.response.providerMetadata":JSON.stringify(a1.providerMetadata),"ai.usage.inputTokens":t4.inputTokens,"ai.usage.inputTokenDetails.noCacheTokens":(c4=t4.inputTokenDetails)==null?void 0:c4.noCacheTokens,"ai.usage.inputTokenDetails.cacheReadTokens":(r4=t4.inputTokenDetails)==null?void 0:r4.cacheReadTokens,"ai.usage.inputTokenDetails.cacheWriteTokens":(T6=t4.inputTokenDetails)==null?void 0:T6.cacheWriteTokens,"ai.usage.outputTokens":t4.outputTokens,"ai.usage.outputTokenDetails.textTokens":(p6=t4.outputTokenDetails)==null?void 0:p6.textTokens,"ai.usage.outputTokenDetails.reasoningTokens":(n6=t4.outputTokenDetails)==null?void 0:n6.reasoningTokens,"ai.usage.totalTokens":t4.totalTokens,"ai.usage.reasoningTokens":(K1=t4.outputTokenDetails)==null?void 0:K1.reasoningTokens,"ai.usage.cachedInputTokens":(Q4=t4.inputTokenDetails)==null?void 0:Q4.cacheReadTokens}}))}catch(C6){C4.error(C6)}finally{D0.end()}}}),g0=Zb9();this.addStream=g0.addStream,this.closeStream=g0.close;let p0=g0.stream.getReader(),U4=new ReadableStream({async start(C4){C4.enqueue({type:"start"})},async pull(C4){function c4(){x==null||x({steps:K0}),C4.enqueue({type:"abort",...(Q==null?void 0:Q.reason)!==void 0?{reason:K3(Q.reason)}:{}}),C4.close()}try{let{done:r4,value:T6}=await p0.read();if(r4){C4.close();return}if(Q==null?void 0:Q.aborted){c4();return}C4.enqueue(T6)}catch(r4){if(MV(r4)&&(Q==null?void 0:Q.aborted))c4();else C4.error(r4)}},cancel(C4){return g0.stream.cancel(C4)}});for(let C4 of L)U4=U4.pipeThrough(C4({tools:N,stopStream(){g0.terminate()}}));this.baseStream=U4.pipeThrough(Hb9(M!=null?M:DG0())).pipeThrough(I0);let{maxRetries:P1,retry:d1}=yS4({maxRetries:J,abortSignal:Q}),C0=TS4(Y),n0=ai0(G),J0=_S4({model:$,telemetry:Y,headers:X,settings:{...n0,maxRetries:P1}}),B0=this,Y1={provider:$.provider,modelId:$.modelId},c1={functionId:Y==null?void 0:Y.functionId,metadata:Y==null?void 0:Y.metadata};ud({name:"ai.streamText",attributes:F2({telemetry:Y,attributes:{...md({operationId:"ai.streamText",telemetry:Y}),...J0,"ai.prompt":{input:()=>JSON.stringify({system:z,prompt:V,messages:A})}}}),tracer:C0,endWhenDone:!1,fn:async(C4)=>{D0=C4;let c4=await PS4({system:z,prompt:V,messages:A,allowSystemInMessages:F});await P3({event:{model:Y1,system:z,prompt:V,messages:A,tools:N,toolChoice:D,activeTools:B,maxOutputTokens:n0.maxOutputTokens,temperature:n0.temperature,topP:n0.topP,topK:n0.topK,presencePenalty:n0.presencePenalty,frequencyPenalty:n0.frequencyPenalty,stopSequences:n0.stopSequences,seed:n0.seed,maxRetries:P1,timeout:_,headers:X,providerOptions:R,stopWhen:C,output:M,abortSignal:k,include:n,...c1,experimental_context:p},callbacks:[d,s.onStart]});let r4=c4.messages,T6=[],{approvedToolApprovals:p6,deniedToolApprovals:n6}=bS4({messages:r4});if(n6.length>0||p6.length>0){let Q4=p6.filter((T1)=>!T1.toolCall.providerExecuted),C6=n6.filter((T1)=>!T1.toolCall.providerExecuted),t4=n6.filter((T1)=>T1.toolCall.providerExecuted),a1,A1=new ReadableStream({start(T1){a1=T1}});B0.addStream(A1);try{for(let R4 of[...C6,...t4])a1==null||a1.enqueue({type:"tool-output-denied",toolCallId:R4.toolCall.toolCallId,toolName:R4.toolCall.toolName});let T1=[];if(await Promise.all(Q4.map(async(R4)=>{let w4=await Qn0({toolCall:R4.toolCall,tools:N,tracer:C0,telemetry:Y,messages:r4,abortSignal:Q,experimental_context:p,stepNumber:K0.length,model:Y1,onToolCallStart:[b,s.onToolCallStart],onToolCallFinish:[g,s.onToolCallFinish],onPreliminaryToolResult:(A6)=>{a1==null||a1.enqueue(A6)}});if(w4!=null)a1==null||a1.enqueue(w4),T1.push(w4)})),T1.length>0||C6.length>0){let R4=[];for(let w4 of T1)R4.push({type:"tool-result",toolCallId:w4.toolCallId,toolName:w4.toolName,output:await YR({toolCallId:w4.toolCallId,input:w4.input,tool:N==null?void 0:N[w4.toolName],output:w4.type==="tool-result"?w4.output:w4.error,errorMode:w4.type==="tool-error"?"text":"none"})});for(let w4 of C6)R4.push({type:"tool-result",toolCallId:w4.toolCall.toolCallId,toolName:w4.toolCall.toolName,output:{type:"execution-denied",reason:w4.approvalResponse.reason}});T6.push({role:"tool",content:R4})}}finally{a1==null||a1.close()}}a.push(...T6);async function K1({currentStep:Q4,responseMessages:C6,usage:t4}){var a1,A1,T1,R4,w4,A6,K4,b4,N0;let f0=B0.includeRawChunks,a0=W!=null?setTimeout(()=>Z.abort(),W):void 0,c0=void 0;function F1(){if(K!=null){if(c0!=null)clearTimeout(c0);c0=setTimeout(()=>H.abort(),K)}}function E1(){if(c0!=null)clearTimeout(c0),c0=void 0}function l4(){if(a0!=null)clearTimeout(a0)}try{Z0=new AM;let Q1=[...r4,...C6],C1=await(q==null?void 0:q({model:$,steps:K0,stepNumber:K0.length,messages:Q1,experimental_context:p})),f4=FG0((a1=C1==null?void 0:C1.model)!=null?a1:$),O6={provider:f4.provider,modelId:f4.modelId},J9=await ES4({prompt:{system:(A1=C1==null?void 0:C1.system)!=null?A1:c4.system,messages:(T1=C1==null?void 0:C1.messages)!=null?T1:Q1},supportedUrls:await f4.supportedUrls,download:h}),o$=(R4=C1==null?void 0:C1.activeTools)!=null?R4:B,{toolChoice:Y4,tools:i4}=await MS4({tools:N,toolChoice:(w4=C1==null?void 0:C1.toolChoice)!=null?w4:D,activeTools:o$});p=(A6=C1==null?void 0:C1.experimental_context)!=null?A6:p;let C9=(K4=C1==null?void 0:C1.messages)!=null?K4:Q1,q6=(b4=C1==null?void 0:C1.system)!=null?b4:c4.system,q4=NG0(R,C1==null?void 0:C1.providerOptions);await P3({event:{stepNumber:K0.length,model:O6,system:q6,messages:C9,tools:N,toolChoice:Y4,activeTools:o$,steps:[...K0],providerOptions:q4,timeout:_,headers:X,stopWhen:C,output:M,abortSignal:k,include:n,...c1,experimental_context:p},callbacks:[u,s.onStepStart]});let{result:{stream:y8,response:B5,request:G7},doStreamSpan:p7,startTimestampMs:t6}=await d1(()=>ud({name:"ai.streamText.doStream",attributes:F2({telemetry:Y,attributes:{...md({operationId:"ai.streamText.doStream",telemetry:Y}),...J0,"ai.model.provider":f4.provider,"ai.model.id":f4.modelId,"ai.prompt.messages":{input:()=>SS4(J9)},"ai.prompt.tools":{input:()=>i4==null?void 0:i4.map((p4)=>JSON.stringify(p4))},"ai.prompt.toolChoice":{input:()=>Y4!=null?JSON.stringify(Y4):void 0},"gen_ai.system":f4.provider,"gen_ai.request.model":f4.modelId,"gen_ai.request.frequency_penalty":n0.frequencyPenalty,"gen_ai.request.max_tokens":n0.maxOutputTokens,"gen_ai.request.presence_penalty":n0.presencePenalty,"gen_ai.request.stop_sequences":n0.stopSequences,"gen_ai.request.temperature":n0.temperature,"gen_ai.request.top_k":n0.topK,"gen_ai.request.top_p":n0.topP}}),tracer:C0,endWhenDone:!1,fn:async(p4)=>({startTimestampMs:I(),doStreamSpan:p4,result:await f4.doStream({...n0,tools:i4,toolChoice:Y4,responseFormat:await(M==null?void 0:M.responseFormat),prompt:J9,providerOptions:q4,abortSignal:Q,headers:X,includeRawChunks:f0})})})),bX=Kb9({tools:N,generatorStream:y8,tracer:C0,telemetry:Y,system:z,messages:Q1,repairToolCall:O,abortSignal:Q,experimental_context:p,generateId:P,stepNumber:K0.length,model:O6,onToolCallStart:[b,s.onToolCallStart],onToolCallFinish:[g,s.onToolCallFinish]}),WR=((N0=n==null?void 0:n.requestBody)!=null?N0:!0)?G7!=null?G7:{}:{...G7,body:void 0},D2=[],N2=[],O9,eW={},_3="other",vV=void 0,MY=pi0(),td,nC=!0,lQ={id:P(),timestamp:new Date,modelId:Y1.modelId},jG0="";B0.addStream(bX.pipeThrough(new TransformStream({async transform(p4,k$){var xV,BN,L2,j3,yV;if(F1(),p4.type==="stream-start"){O9=p4.warnings;return}if(nC){let Q5=I()-t6;nC=!1,p7.addEvent("ai.stream.firstChunk",{"ai.response.msToFirstChunk":Q5}),p7.setAttributes({"ai.response.msToFirstChunk":Q5}),k$.enqueue({type:"start-step",request:WR,warnings:O9!=null?O9:[]})}let B2=p4.type;switch(B2){case"tool-approval-request":case"text-start":case"text-end":{k$.enqueue(p4);break}case"text-delta":{if(p4.delta.length>0)k$.enqueue({type:"text-delta",id:p4.id,text:p4.delta,providerMetadata:p4.providerMetadata}),jG0+=p4.delta;break}case"reasoning-start":case"reasoning-end":{k$.enqueue(p4);break}case"reasoning-delta":{k$.enqueue({type:"reasoning-delta",id:p4.id,text:p4.delta,providerMetadata:p4.providerMetadata});break}case"tool-call":{k$.enqueue(p4),D2.push(p4);break}case"tool-result":{if(k$.enqueue(p4),!p4.preliminary)N2.push(p4);break}case"tool-error":{k$.enqueue(p4),N2.push(p4);break}case"response-metadata":{lQ={id:(xV=p4.id)!=null?xV:lQ.id,timestamp:(BN=p4.timestamp)!=null?BN:lQ.timestamp,modelId:(L2=p4.modelId)!=null?L2:lQ.modelId};break}case"finish":{MY=p4.usage,_3=p4.finishReason,vV=p4.rawFinishReason,td=p4.providerMetadata;let Q5=I()-t6;p7.addEvent("ai.stream.finish"),p7.setAttributes({"ai.response.msToFinish":Q5,"ai.response.avgOutputTokensPerSecond":1000*((j3=MY.outputTokens)!=null?j3:0)/Q5});break}case"file":{k$.enqueue(p4);break}case"source":{k$.enqueue(p4);break}case"tool-input-start":{eW[p4.id]=p4.toolName;let Q5=N==null?void 0:N[p4.toolName];if((Q5==null?void 0:Q5.onInputStart)!=null)await Q5.onInputStart({toolCallId:p4.id,messages:Q1,abortSignal:Q,experimental_context:p});k$.enqueue({...p4,dynamic:(yV=p4.dynamic)!=null?yV:(Q5==null?void 0:Q5.type)==="dynamic",title:Q5==null?void 0:Q5.title});break}case"tool-input-end":{delete eW[p4.id],k$.enqueue(p4);break}case"tool-input-delta":{let Q5=eW[p4.id],bV=N==null?void 0:N[Q5];if((bV==null?void 0:bV.onInputDelta)!=null)await bV.onInputDelta({inputTextDelta:p4.delta,toolCallId:p4.id,messages:Q1,abortSignal:Q,experimental_context:p});k$.enqueue(p4);break}case"error":{k$.enqueue(p4),_3="error";break}case"raw":{if(f0)k$.enqueue(p4);break}default:throw Error(`Unknown chunk type: ${B2}`)}},async flush(p4){var k$,xV,BN,L2,j3,yV,B2;let Q5=D2.length>0?JSON.stringify(D2):void 0;try{p7.setAttributes(await F2({telemetry:Y,attributes:{"ai.response.finishReason":_3,"ai.response.toolCalls":{output:()=>Q5},"ai.response.id":lQ.id,"ai.response.model":lQ.modelId,"ai.response.timestamp":lQ.timestamp.toISOString(),"ai.usage.inputTokens":MY.inputTokens,"ai.usage.inputTokenDetails.noCacheTokens":(k$=MY.inputTokenDetails)==null?void 0:k$.noCacheTokens,"ai.usage.inputTokenDetails.cacheReadTokens":(xV=MY.inputTokenDetails)==null?void 0:xV.cacheReadTokens,"ai.usage.inputTokenDetails.cacheWriteTokens":(BN=MY.inputTokenDetails)==null?void 0:BN.cacheWriteTokens,"ai.usage.outputTokens":MY.outputTokens,"ai.usage.outputTokenDetails.textTokens":(L2=MY.outputTokenDetails)==null?void 0:L2.textTokens,"ai.usage.outputTokenDetails.reasoningTokens":(j3=MY.outputTokenDetails)==null?void 0:j3.reasoningTokens,"ai.usage.totalTokens":MY.totalTokens,"ai.usage.reasoningTokens":(yV=MY.outputTokenDetails)==null?void 0:yV.reasoningTokens,"ai.usage.cachedInputTokens":(B2=MY.inputTokenDetails)==null?void 0:B2.cacheReadTokens,"gen_ai.response.finish_reasons":[_3],"gen_ai.response.id":lQ.id,"gen_ai.response.model":lQ.modelId,"gen_ai.usage.input_tokens":MY.inputTokens,"gen_ai.usage.output_tokens":MY.outputTokens}}))}catch(t$){}p4.enqueue({type:"finish-step",finishReason:_3,rawFinishReason:vV,usage:MY,providerMetadata:td,response:{...lQ,headers:B5==null?void 0:B5.headers}});let bV=vS4(t4,MY);await Z0.promise;let rC=K0[K0.length-1];try{p7.setAttributes(await F2({telemetry:Y,attributes:{"ai.response.text":{output:()=>rC.text},"ai.response.reasoning":{output:()=>rC.reasoningText},"ai.response.providerMetadata":JSON.stringify(rC.providerMetadata)}}))}catch(t$){}finally{p7.end()}let ed=D2.filter((t$)=>t$.providerExecuted!==!0),TG0=N2.filter((t$)=>t$.providerExecuted!==!0);for(let t$ of D2){if(t$.providerExecuted!==!0)continue;let aC=N==null?void 0:N[t$.toolName];if((aC==null?void 0:aC.type)==="provider"&&aC.supportsDeferredResults){if(!N2.some((sC)=>(sC.type==="tool-result"||sC.type==="tool-error")&&sC.toolCallId===t$.toolCallId))A0.set(t$.toolCallId,{toolName:t$.toolName})}}for(let t$ of N2)if(t$.type==="tool-result"||t$.type==="tool-error")A0.delete(t$.toolCallId);if(l4(),E1(),(ed.length>0&&TG0.length===ed.length||A0.size>0)&&!await dS4({stopConditions:E,steps:K0})){C6.push(...await oi0({content:K0[K0.length-1].content,tools:N}));try{await K1({currentStep:Q4+1,responseMessages:C6,usage:bV})}catch(t$){p4.enqueue({type:"error",error:t$}),B0.closeStream()}}else p4.enqueue({type:"finish",finishReason:_3,rawFinishReason:vV,totalUsage:bV}),B0.closeStream()}})))}finally{l4(),E1()}}await K1({currentStep:0,responseMessages:T6,usage:pi0()})}}).catch((C4)=>{B0.addStream(new ReadableStream({start(c4){c4.enqueue({type:"error",error:C4}),c4.close()}})),B0.closeStream()})}get steps(){return this.consumeStream(),this._steps.promise}get finalStep(){return this.steps.then(($)=>$[$.length-1])}get content(){return this.finalStep.then(($)=>$.content)}get warnings(){return this.finalStep.then(($)=>$.warnings)}get providerMetadata(){return this.finalStep.then(($)=>$.providerMetadata)}get text(){return this.finalStep.then(($)=>$.text)}get reasoningText(){return this.finalStep.then(($)=>$.reasoningText)}get reasoning(){return this.finalStep.then(($)=>$.reasoning)}get sources(){return this.finalStep.then(($)=>$.sources)}get files(){return this.finalStep.then(($)=>$.files)}get toolCalls(){return this.finalStep.then(($)=>$.toolCalls)}get staticToolCalls(){return this.finalStep.then(($)=>$.staticToolCalls)}get dynamicToolCalls(){return this.finalStep.then(($)=>$.dynamicToolCalls)}get toolResults(){return this.finalStep.then(($)=>$.toolResults)}get staticToolResults(){return this.finalStep.then(($)=>$.staticToolResults)}get dynamicToolResults(){return this.finalStep.then(($)=>$.dynamicToolResults)}get usage(){return this.finalStep.then(($)=>$.usage)}get request(){return this.finalStep.then(($)=>$.request)}get response(){return this.finalStep.then(($)=>$.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[$,Y]=this.baseStream.tee();return this.baseStream=Y,$}get textStream(){return gd(this.teeStream().pipeThrough(new TransformStream({transform({part:$},Y){if($.type==="text-delta")Y.enqueue($.text)}})))}get fullStream(){return gd(this.teeStream().pipeThrough(new TransformStream({transform({part:$},Y){Y.enqueue($)}})))}async consumeStream($){var Y;try{await Wb9({stream:this.fullStream,onError:$==null?void 0:$.onError})}catch(X){(Y=$==null?void 0:$.onError)==null||Y.call($,X)}}get experimental_partialOutputStream(){return this.partialOutputStream}get partialOutputStream(){return gd(this.teeStream().pipeThrough(new TransformStream({transform({partialOutput:$},Y){if($!=null)Y.enqueue($)}})))}get elementStream(){var $,Y,X;let G=($=this.outputSpecification)==null?void 0:$.createElementStreamTransform();if(G==null)throw new l5({functionality:`element streams in ${(X=(Y=this.outputSpecification)==null?void 0:Y.name)!=null?X:"text"} mode`});return gd(this.teeStream().pipeThrough(G))}get output(){return this.finalStep.then(($)=>{var Y;return((Y=this.outputSpecification)!=null?Y:DG0()).parseCompleteOutput({text:$.text},{response:$.response,usage:$.usage,finishReason:$.finishReason})})}toUIMessageStream({originalMessages:$,generateMessageId:Y,onFinish:X,messageMetadata:G,sendReasoning:J=!0,sendSources:Q=!1,sendStart:W=!0,sendFinish:Z=!0,onError:K=K3}={}){let H=Y!=null?Yb9({originalMessages:$,responseMessageId:Y}):void 0,z=(A)=>{var F;let N=(F=this.tools)==null?void 0:F[A.toolName];if(N==null)return A.dynamic;return(N==null?void 0:N.type)==="dynamic"?!0:void 0},V=this.fullStream.pipeThrough(new TransformStream({transform:async(A,F)=>{let N=G==null?void 0:G({part:A}),D=A.type;switch(D){case"text-start":{F.enqueue({type:"text-start",id:A.id,...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{}});break}case"text-delta":{F.enqueue({type:"text-delta",id:A.id,delta:A.text,...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{}});break}case"text-end":{F.enqueue({type:"text-end",id:A.id,...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{}});break}case"reasoning-start":case"reasoning-end":{if(J)F.enqueue({type:D,id:A.id,...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{}});break}case"reasoning-delta":{if(J)F.enqueue({type:"reasoning-delta",id:A.id,delta:A.text,...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{}});break}case"file":{F.enqueue({type:"file",mediaType:A.file.mediaType,url:`data:${A.file.mediaType};base64,${A.file.base64}`,...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{}});break}case"source":{if(Q&&A.sourceType==="url")F.enqueue({type:"source-url",sourceId:A.id,url:A.url,title:A.title,...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{}});if(Q&&A.sourceType==="document")F.enqueue({type:"source-document",sourceId:A.id,mediaType:A.mediaType,title:A.title,filename:A.filename,...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{}});break}case"tool-input-start":{let L=z(A);F.enqueue({type:"tool-input-start",toolCallId:A.id,toolName:A.toolName,...A.providerExecuted!=null?{providerExecuted:A.providerExecuted}:{},...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{},...A.toolMetadata!=null?{toolMetadata:A.toolMetadata}:{},...L!=null?{dynamic:L}:{},...A.title!=null?{title:A.title}:{}});break}case"tool-input-delta":{F.enqueue({type:"tool-input-delta",toolCallId:A.id,inputTextDelta:A.delta});break}case"tool-call":{let L=z(A);if(A.invalid)F.enqueue({type:"tool-input-error",toolCallId:A.toolCallId,toolName:A.toolName,input:A.input,...A.providerExecuted!=null?{providerExecuted:A.providerExecuted}:{},...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{},...A.toolMetadata!=null?{toolMetadata:A.toolMetadata}:{},...L!=null?{dynamic:L}:{},errorText:K(A.error),...A.title!=null?{title:A.title}:{}});else F.enqueue({type:"tool-input-available",toolCallId:A.toolCallId,toolName:A.toolName,input:A.input,...A.providerExecuted!=null?{providerExecuted:A.providerExecuted}:{},...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{},...A.toolMetadata!=null?{toolMetadata:A.toolMetadata}:{},...L!=null?{dynamic:L}:{},...A.title!=null?{title:A.title}:{}});break}case"tool-approval-request":{F.enqueue({type:"tool-approval-request",approvalId:A.approvalId,toolCallId:A.toolCall.toolCallId});break}case"tool-result":{let L=z(A);F.enqueue({type:"tool-output-available",toolCallId:A.toolCallId,output:A.output,...A.providerExecuted!=null?{providerExecuted:A.providerExecuted}:{},...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{},...A.toolMetadata!=null?{toolMetadata:A.toolMetadata}:{},...A.preliminary!=null?{preliminary:A.preliminary}:{},...L!=null?{dynamic:L}:{}});break}case"tool-error":{let L=z(A);F.enqueue({type:"tool-output-error",toolCallId:A.toolCallId,errorText:A.providerExecuted?typeof A.error==="string"?A.error:JSON.stringify(A.error):K(A.error),...A.providerExecuted!=null?{providerExecuted:A.providerExecuted}:{},...A.providerMetadata!=null?{providerMetadata:A.providerMetadata}:{},...A.toolMetadata!=null?{toolMetadata:A.toolMetadata}:{},...L!=null?{dynamic:L}:{}});break}case"tool-output-denied":{F.enqueue({type:"tool-output-denied",toolCallId:A.toolCallId});break}case"error":{F.enqueue({type:"error",errorText:K(A.error)});break}case"start-step":{F.enqueue({type:"start-step"});break}case"finish-step":{F.enqueue({type:"finish-step"});break}case"start":{if(W)F.enqueue({type:"start",...N!=null?{messageMetadata:N}:{},...H!=null?{messageId:H}:{}});break}case"finish":{if(Z)F.enqueue({type:"finish",finishReason:A.finishReason,...N!=null?{messageMetadata:N}:{}});break}case"abort":{F.enqueue(A);break}case"tool-input-end":break;case"raw":break;default:throw Error(`Unknown chunk type: ${D}`)}if(N!=null&&D!=="start"&&D!=="finish")F.enqueue({type:"message-metadata",messageMetadata:N})}}));return gd(aS4({stream:V,messageId:H!=null?H:Y==null?void 0:Y(),originalMessages:$,onFinish:X,onError:K}))}pipeUIMessageStreamToResponse($,{originalMessages:Y,generateMessageId:X,onFinish:G,messageMetadata:J,sendReasoning:Q,sendSources:W,sendFinish:Z,sendStart:K,onError:H,...z}={}){Qb9({response:$,stream:this.toUIMessageStream({originalMessages:Y,generateMessageId:X,onFinish:G,messageMetadata:J,sendReasoning:Q,sendSources:W,sendFinish:Z,sendStart:K,onError:H}),...z})}pipeTextStreamToResponse($,Y){$b9({response:$,textStream:this.textStream,...Y})}toUIMessageStreamResponse({originalMessages:$,generateMessageId:Y,onFinish:X,messageMetadata:G,sendReasoning:J,sendSources:Q,sendFinish:W,sendStart:Z,onError:K,...H}={}){return BG0({stream:this.toUIMessageStream({originalMessages:$,generateMessageId:Y,onFinish:X,messageMetadata:G,sendReasoning:J,sendSources:Q,sendFinish:W,sendStart:Z,onError:K}),...H})}toTextStreamResponse($){return ey9({textStream:this.textStream,...$})}};function Zn0({execute:$,onError:Y=cD,originalMessages:X,onStepFinish:G,onFinish:J,generateId:Q=Y7}){let W,Z=[],K=new ReadableStream({start(V){W=V}});function H(V){try{W.enqueue(V)}catch(A){}}try{let V=$({writer:{write(A){H(A)},merge(A){Z.push((async()=>{let F=A.getReader();while(!0){let{done:N,value:D}=await F.read();if(N)break;H(D)}})().catch((F)=>{H({type:"error",errorText:Y(F)})}))},onError:Y}});if(V)Z.push(V.catch((A)=>{H({type:"error",errorText:Y(A)})}))}catch(V){H({type:"error",errorText:Y(V)})}return new Promise(async(V)=>{while(Z.length>0)await Z.shift();V()}).finally(()=>{try{W.close()}catch(V){}}),aS4({stream:K,messageId:Q(),originalMessages:X,onStepFinish:G,onFinish:J,onError:Y})}async function sS4($,Y){let X=[];if(Y==null?void 0:Y.ignoreIncompleteToolCalls)$=$.map((G)=>({...G,parts:G.parts.filter((J)=>!pC(J)||J.state!=="input-streaming"&&J.state!=="input-available")}));for(let G of $)switch(G.role){case"system":{let J=G.parts.filter((W)=>W.type==="text"),Q=J.reduce((W,Z)=>{if(Z.providerMetadata!=null)return{...W,...Z.providerMetadata};return W},{});X.push({role:"system",content:J.map((W)=>W.text).join(""),...Object.keys(Q).length>0?{providerOptions:Q}:{}});break}case"user":{X.push({role:"user",content:G.parts.map((J)=>{var Q;if(ci0(J))return{type:"text",text:J.text,...J.providerMetadata!=null?{providerOptions:J.providerMetadata}:{}};if(li0(J))return{type:"file",mediaType:J.mediaType,filename:J.filename,data:J.url,...J.providerMetadata!=null?{providerOptions:J.providerMetadata}:{}};if(di0(J))return(Q=Y==null?void 0:Y.convertDataPart)==null?void 0:Q.call(Y,J)}).filter(cu)});break}case"assistant":{if(G.parts!=null){let J=[];async function Q(){var W,Z,K,H,z,V,A;if(J.length===0)return;let F=[];for(let D of J)if(ci0(D))F.push({type:"text",text:D.text,...D.providerMetadata!=null?{providerOptions:D.providerMetadata}:{}});else if(li0(D))F.push({type:"file",mediaType:D.mediaType,filename:D.filename,data:D.url,...D.providerMetadata!=null?{providerOptions:D.providerMetadata}:{}});else if(wC4(D))F.push({type:"reasoning",text:D.text,providerOptions:D.providerMetadata});else if(pC(D)){let L=ii0(D);if(D.state!=="input-streaming"){if(F.push({type:"tool-call",toolCallId:D.toolCallId,toolName:L,input:D.state==="output-error"?(W=D.input)!=null?W:("rawInput"in D)?D.rawInput:void 0:D.input,providerExecuted:D.providerExecuted,...D.callProviderMetadata!=null?{providerOptions:D.callProviderMetadata}:{}}),D.approval!=null)F.push({type:"tool-approval-request",approvalId:D.approval.id,toolCallId:D.toolCallId});if(D.providerExecuted===!0&&D.state!=="approval-responded"&&(D.state==="output-available"||D.state==="output-error")){let B=(Z=D.resultProviderMetadata)!=null?Z:D.callProviderMetadata;F.push({type:"tool-result",toolCallId:D.toolCallId,toolName:L,output:await YR({toolCallId:D.toolCallId,input:D.input,output:D.state==="output-error"?D.errorText:D.output,tool:(K=Y==null?void 0:Y.tools)==null?void 0:K[L],errorMode:D.state==="output-error"?"json":"none"}),...B!=null?{providerOptions:B}:{}})}}}else if(di0(D)){let L=(H=Y==null?void 0:Y.convertDataPart)==null?void 0:H.call(Y,D);if(L!=null)F.push(L)}else throw Error(`Unsupported part: ${D}`);X.push({role:"assistant",content:F});let N=J.filter((D)=>{var L;return pC(D)&&(D.providerExecuted!==!0||((L=D.approval)==null?void 0:L.approved)!=null)});if(N.length>0){let D=[];for(let L of N){if(((z=L.approval)==null?void 0:z.approved)!=null)D.push({type:"tool-approval-response",approvalId:L.approval.id,approved:L.approval.approved,reason:L.approval.reason,providerExecuted:L.providerExecuted});if(L.providerExecuted===!0)continue;switch(L.state){case"output-denied":{D.push({type:"tool-result",toolCallId:L.toolCallId,toolName:ii0(L),output:{type:"error-text",value:(V=L.approval.reason)!=null?V:"Tool execution denied."},...L.callProviderMetadata!=null?{providerOptions:L.callProviderMetadata}:{}});break}case"output-error":case"output-available":{let B=ii0(L);D.push({type:"tool-result",toolCallId:L.toolCallId,toolName:B,output:await YR({toolCallId:L.toolCallId,input:L.input,output:L.state==="output-error"?L.errorText:L.output,tool:(A=Y==null?void 0:Y.tools)==null?void 0:A[B],errorMode:L.state==="output-error"?"text":"none"}),...L.callProviderMetadata!=null?{providerOptions:L.callProviderMetadata}:{}});break}}}if(D.length>0)X.push({role:"tool",content:D})}J=[]}for(let W of G.parts)if(ci0(W)||wC4(W)||li0(W)||pC(W)||di0(W))J.push(W);else if(W.type==="step-start")await Q();await Q();break}break}default:{let J=G.role;throw new Ky9({originalMessage:G,message:`Unsupported role: ${J}`})}}return X}var pQ=U.record(U.string(),GR.optional()),S_7=N1(()=>z1(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:k4.optional()}),U.object({type:U.literal("reasoning"),text:U.string(),state:U.enum(["streaming","done"]).optional(),providerMetadata:k4.optional()}),U.object({type:U.literal("source-url"),sourceId:U.string(),url:U.string(),title:U.string().optional(),providerMetadata:k4.optional()}),U.object({type:U.literal("source-document"),sourceId:U.string(),mediaType:U.string(),title:U.string(),filename:U.string().optional(),providerMetadata:k4.optional()}),U.object({type:U.literal("file"),mediaType:U.string(),filename:U.string().optional(),url:U.string(),providerMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("input-streaming"),input:U.unknown().optional(),providerExecuted:U.boolean().optional(),callProviderMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("input-available"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.never().optional()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("approval-requested"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("approval-responded"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("output-available"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.unknown(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),resultProviderMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("output-error"),input:U.unknown().optional(),rawInput:U.unknown().optional(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.string(),callProviderMetadata:k4.optional(),resultProviderMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("output-denied"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("input-streaming"),providerExecuted:U.boolean().optional(),callProviderMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("input-available"),providerExecuted:U.boolean().optional(),input:U.unknown(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.never().optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("approval-requested"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("approval-responded"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.object({id:U.string(),approved:U.boolean(),reason:U.string().optional()})}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("output-available"),providerExecuted:U.boolean().optional(),input:U.unknown(),output:U.unknown(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),resultProviderMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("output-error"),providerExecuted:U.boolean().optional(),input:U.unknown().optional(),rawInput:U.unknown().optional(),output:U.never().optional(),errorText:U.string(),callProviderMetadata:k4.optional(),resultProviderMetadata:k4.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(),toolMetadata:pQ.optional(),state:U.literal("output-denied"),providerExecuted:U.boolean().optional(),input:U.unknown(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.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 v_7=XH({prefix:"aiobj",size:24});function oS4($){return({url:Y,abortSignal:X})=>BS4({url:Y,maxBytes:$==null?void 0:$.maxBytes,abortSignal:X})}var y_7=XH({prefix:"aiobj",size:24});var b_7=oS4();var Vb9="AI_NoSuchProviderError",Ab9=`vercel.ai.error.${Vb9}`,Fb9=Symbol.for(Ab9),Db9;Db9=Fb9;var h_7=oS4();RN();KY();var OG0=U6(nA(),1),Ak4=U6(hN(),1);import Bb9 from"os";var w3=H6("sys_agentmanager",{id:y0("id"),name:y0("name"),code:y0("code"),parames:y0("parames"),model:y0("model"),userPrompt:y0("userPrompt"),systemPrompt:y0("systemPrompt"),tools:y0("tools"),type:y0("type"),status:k1("status"),remark:y0("remark"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function tS4($){return await o0.select().from(w3).where(R1(w3.code,$))}function eS4($){let Y=r.raw("1 = 1");if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or remark like '%${$.searchVal}%')`));if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));return Y}async function $k4($){return await o0.select().from(w3).where(eS4($)).limit(Number($.limit)).offset(Number($.offset))}async function Yk4($){return await o0.$count(w3,eS4($))}async function Xk4($){let Y=await o0.$count(w3,R1(w3.code,$.code));if(Y&&Y>0)Nb9($);else{let X=Date.now();$.id=I6(),$.code=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,$.status=1,$.type="1",await o0.insert(w3).values($)}}async function Nb9($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await o0.update(w3).set($).where(R1(w3.code,$.code))}async function Gk4($){await o0.delete(w3).where(R1(w3.code,$))}var dQ=H6("sys_llmconfig",{id:y0("id"),name:y0("name"),apiKey:y0("apiKey"),baseURL:y0("baseURL"),status:k1("status"),llamacpp:k1("llamacpp"),remark:y0("remark"),createdAt:k1("createdAt"),updatedAt:k1("updatedAt"),latest_visitAt:k1("latest_visitAt"),createBy:y0("createBy"),updateBy:y0("updateBy"),env_id:y0("env_id")});async function Qk4($){return await o0.select().from(dQ).where(R1(dQ.id,$))}async function Wk4($){return await o0.select().from(dQ).where(R1(dQ.name,$))}function Kn0($){let Y=r.raw("1 = 1");if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.remark&&$.remark.length>0)Y.append(r.raw(` and remark like '%${$.remark}%'`));if($.status&&$.status>0)Y.append(r.raw(` and status = ${$.status} `));return Y}async function LN($){return await o0.select().from(dQ).where(Kn0($))}async function Zk4($){return await o0.select().from(dQ).where(Kn0($)).limit(Number($.limit)).offset(Number($.offset))}async function Kk4($){return await o0.$count(dQ,Kn0($))}async function Uk4($){let Y=await o0.$count(dQ,R1(dQ.id,$.id));if(Y&&Y>0)Lb9($);else{let X=Date.now();$.id=I6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await o0.insert(dQ).values($)}}async function Lb9($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await o0.update(dQ).set($).where(R1(dQ.id,$.id))}async function Hk4($){await o0.delete(dQ).where(R1(dQ.id,$))}function Ob9(){let $=Bb9.networkInterfaces();for(let Y of Object.keys($))for(let X of $[Y])if(X.family==="IPv4"&&!X.internal)return X.address;return"No External IP found"}var Eb9=Ob9();async function Fk4(){return await new vz4({id:"localhost",servers:{myServer:{url:new URL(`http://${Eb9}:${Bun.env.PORT||3000}/mcp`)}}}).listTools()}var Mb9={max:500,maxSize:1000,sizeCalculation:($,Y)=>{return 1},dispose:($,Y)=>{},ttl:3600000,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,fetchMethod:async($,Y,{options:X,signal:G,context:J})=>{}},Vk4=new $Z(Mb9),xj7=new Ak4.default({length:10}),SJ=new O4;var EG0;async function Un0($=!1){if(EG0&&!$)return!0;let Y=await LN({limit:1e4,offset:0,status:1});if(!Y||!Y[0])return!1;let X=V3({name:Y[0].name??"",apiKey:Y[0].apiKey??"",baseURL:Y[0].baseURL??"",includeUsage:!0}),G=new oP4({storage:new kD4({id:"mastra-storage",url:"file:./memory.db"})});return EG0=new YJ({id:"chat-agent",name:"assistant",instructions:"You are a helpful assistant.",model:X(Y[0].name??""),memory:G,tools:async()=>{return await Fk4()}}),!0}SJ.post("/demo",async($)=>{let Y=await $.req.json();if(!await Un0())throw new k0(500,{message:"\u8FDE\u63A5\u5931\u8D25"});let G=await EG0.stream(Y.prompt);return K$0($,async(J)=>{for await(let Q of G.textStream)await J.write(Q)})});var yj7={weather:iu({description:"Get weather information",inputSchema:U.object({location:U.string().describe("The location to get the weather for")}),execute:async({location:$})=>{let Y=Math.round(Math.random()*58+32);return{}}})};SJ.post("/chat",async($)=>{let{messages:Y}=await $.req.json(),X=V3({name:"deepseek-v3",apiKey:"sk-xxxxxxxxxx",baseURL:"https://api.lkeap.cloud.tencent.com/v1",includeUsage:!0});return Wn0({model:X("deepseek-v3"),messages:await sS4(Y)}).toUIMessageStreamResponse()});SJ.post("/agentChat",async($)=>{let{messages:Y}=await $.req.json(),G=Y.slice(-1)[0].parts[0].text,J=await LN({limit:1e4,offset:0,status:1});if(!J||!J[0])throw new k0(500,{message:"\u8FDE\u63A5\u5931\u8D25"});if(J[0].llamacpp==1?0:1){if(!await Un0())throw new k0(500,{message:"\u8FDE\u63A5\u5931\u8D25"});let Z=await EG0.stream(G),K=Zn0({execute:async({writer:H})=>{H.write({type:"start"});for await(let z of Z.textStream)H.write({type:"data-custom",data:z});H.write({type:"finish"})}});return BG0({stream:K})}else{let Z=F3({baseURL:J[0].baseURL??"",apiKey:J[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(J[0].name??""),{textStream:K}=Wn0({model:Z,prompt:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:G}]}),H=Zn0({execute:async({writer:z})=>{z.write({type:"start"});for await(let V of K)z.write({type:"data-custom",data:V});z.write({type:"finish"})}});return BG0({stream:H})}});SJ.post("/refresh",async($)=>{try{let Y=await $.req.json();if(!await Un0(!0))throw new k0(500,{message:"\u8FDE\u63A5\u5931\u8D25"});let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5237\u65B0\u5931\u8D25"})}});SJ.post("/sqlGeneration",async($)=>{try{let Y=await $.req.json(),X=Y.tableNames,G=n1(JSON.stringify(X),/[\[\]]/g,""),J=Y.textInput;if(!J||J.length==0)throw new k0(500,{message:"\u5F85\u5904\u7406\u6587\u672C\u4E3A\u7A7A"});let Q=Y.poolCode;if(!Q||Q.length==0)throw new k0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let W=await jA(Q),Z=`
    SELECT
	    table_name,
      table_schema
    FROM
	    information_schema.TABLES
    WHERE
	    table_schema = '${W[0]?.databaseName}'
      AND table_name IN (${G})
    `,K=`
    SELECT
	    t.table_schema,
	    t.table_name,
	    c.column_name,
	    c.data_type,
      c.COLUMN_COMMENT
    FROM
	    information_schema.TABLES t
	      JOIN information_schema.COLUMNS c ON t.table_name = c.table_name
	        AND t.table_schema = c.table_schema
    WHERE
	    t.table_schema = '${W[0]?.databaseName}'
      AND t.table_name IN ( ${G} )
    ORDER BY
	    t.table_schema,
	    t.table_name,
	    c.ordinal_position
    `,H=await uX(Q),z=await H.execute(r.raw(Z)),V=await H.execute(r.raw(K)),A=Rb9({tables:z[0],columns:V[0]}),N=`Generate a SQL query for this question: "${J}"

Please provide:
1. The SQL query only,no chinese.`,D=`You are an expert MySql query generator. Your task is to convert natural language questions into accurate SQL queries.

DATABASE SCHEMA:
${A}

RULES:
1. Only generate SELECT queries for data retrieval
2. Use proper MySql syntax
3. Always qualify column names with table names when joining tables
4. Use appropriate JOINs when data from multiple tables is needed
5. Be case-insensitive for text searches using ILIKE
6. Use proper data types for comparisons
7. Format queries with proper indentation and line breaks
8. Include appropriate WHERE clauses to filter results
9. Use LIMIT when appropriate to prevent overly large result sets
10. Consider performance implications of the query

QUERY ANALYSIS:
- Analyze the user's question carefully
- Identify which tables and columns are needed
- Determine if joins are required
- Consider aggregation functions if needed
- Think about appropriate filtering conditions
- Consider ordering and limiting results

Provide a high-confidence SQL query that accurately answers the user's question.`,L=await LN({limit:1e4,offset:0,status:1});if(!L||!L[0])throw new k0(500,{message:"\u6CA1\u6709\u914D\u7F6E\u6709\u6548\u7684\u5927\u6A21\u578B"});let B=L[0].llamacpp==1?0:1,O=V3({name:L[0].name??"",apiKey:L[0].apiKey??"",baseURL:L[0].baseURL??"",includeUsage:!0}),M=F3({baseURL:L[0].baseURL??"",apiKey:L[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(L[0].name??""),R=await SV({model:B?O(L[0].name??""):M,temperature:0.1,system:D,prompt:N}),q=t0();return q.data={success:!0,sql:D4(R.content[0],"text")},$.json(q)}catch(Y){throw console.error(Y),new k0(500,{message:"\u751F\u6210\u5931\u8D25"})}});function Rb9($){let Y="",X=new Map;return $.columns.forEach((G)=>{let J=`${G.table_schema}.${G.table_name}`;if(!X.has(J))X.set(J,[]);X.get(J)?.push(G)}),$.tables.forEach((G)=>{let J=`${G.table_schema}.${G.table_name}`,Q=X.get(J)||[];Y+=`
Table: ${G.table_schema}.${G.table_name}`,Y+=`
Columns:
`,Q.forEach((W)=>{Y+=`  - ${W.column_name}: ${W.data_type}`,Y+=`
`})}),Y}SJ.post("/sqlPgGeneration",async($)=>{try{let Y=await $.req.json(),X=Y.tableNames,G=n1(n1(JSON.stringify(X),/[\[\]]/g,""),/[\"]/g,"'"),J=Y.textInput;if(!J||J.length==0)throw new k0(500,{message:"\u5F85\u5904\u7406\u6587\u672C\u4E3A\u7A7A"});let Q=Y.poolCode;if(!Q||Q.length==0)throw new k0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let W=`
    SELECT
	    schemaname AS table_schema,
	    tablename AS "table_name" 
    FROM
	    pg_tables 
    WHERE
	    schemaname NOT IN ( 'information_schema', 'pg_catalog' ) 
	    AND tablename IN ( ${G} ) 
    ORDER BY
	    schemaname,
	    tablename
    `,Z=`
        SELECT 
	        T.table_schema AS table_schema,
	        T.TABLE_NAME AS "table_name" ,
	        C.COLUMN_NAME,
	        C.data_type,
          C.character_maximum_length,
	        C.numeric_precision,
	        C.numeric_scale,
	        C.is_nullable,
	        C.column_default
        FROM
	        information_schema.tables T 
          JOIN information_schema.COLUMNS C ON T.TABLE_NAME = C.TABLE_NAME 
	          AND T.table_schema = C.table_schema 
        WHERE
	        T.table_schema NOT IN ( 'information_schema', 'pg_catalog' ) 
	        AND T.TABLE_NAME IN ( ${G} ) 
        ORDER BY
	        T.table_schema,
	        T.TABLE_NAME,
	        C.ordinal_position
      `,K=await pX(Q),H=await K.execute(r.raw(W)),z=await K.execute(r.raw(Z)),V=qb9({tables:H.rows,columns:z.rows}),F=`Generate a SQL query for this question: "${J}"

Please provide:
1. The SQL query , no chinese.`,N=`You are an expert PostgreSQL query generator. Your task is to convert natural language questions into accurate SQL queries.

DATABASE SCHEMA:
${V}

RULES:
1. Only generate SELECT queries for data retrieval
2. Use proper PostgreSQL syntax
3. Always qualify column names with table names when joining tables
4. Use appropriate JOINs when data from multiple tables is needed
5. Be case-insensitive for text searches using ILIKE
6. Use proper data types for comparisons
7. Format queries with proper indentation and line breaks
8. Include appropriate WHERE clauses to filter results
9. Use LIMIT when appropriate to prevent overly large result sets
10. Consider performance implications of the query

QUERY ANALYSIS:
- Analyze the user's question carefully
- Identify which tables and columns are needed
- Determine if joins are required
- Consider aggregation functions if needed
- Think about appropriate filtering conditions
- Consider ordering and limiting results

Provide a high-confidence SQL query that accurately answers the user's question.`,D=await LN({limit:1e4,offset:0,status:1});if(!D||!D[0])throw new k0(500,{message:"\u6CA1\u6709\u914D\u7F6E\u6709\u6548\u7684\u5927\u6A21\u578B"});let L=D[0].llamacpp==1?0:1,B=V3({name:D[0].name??"",apiKey:D[0].apiKey??"",baseURL:D[0].baseURL??"",includeUsage:!0}),E=F3({baseURL:D[0].baseURL??"",apiKey:D[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(D[0].name??""),M=await SV({model:L?B(D[0].name??""):E,temperature:0.1,system:N,prompt:F}),R=t0();return R.data={success:!0,sql:D4(M.content[0],"text")},$.json(R)}catch(Y){throw console.error(Y),new k0(500,{message:"\u751F\u6210\u5931\u8D25"})}});function qb9($){let Y="",X=new Map;return $.columns.forEach((G)=>{let J=`${G.table_schema}.${G.table_name}`;if(!X.has(J))X.set(J,[]);X.get(J)?.push(G)}),$.tables.forEach((G)=>{let J=`${G.table_schema}.${G.table_name}`,Q=X.get(J)||[];Y+=`
Table: ${G.table_schema}.${G.table_name}`,Y+=`
Columns:
`,Q.forEach((W)=>{if(Y+=`  - ${W.column_name}: ${W.data_type}`,W.character_maximum_length)Y+=`(${W.character_maximum_length})`;if(W.is_nullable==="NO")Y+=" [NOT NULL]";if(W.column_default)Y+=` [DEFAULT: ${W.column_default}]`;Y+=`
`})}),Y}SJ.post("/sqlSqliteGeneration",async($)=>{try{let Y=await $.req.json(),X=Y.tableNames,G=n1(n1(JSON.stringify(X),/[\[\]]/g,""),/[\"]/g,"'"),J=Y.textInput;if(!J||J.length==0)throw new k0(500,{message:"\u5F85\u5904\u7406\u6587\u672C\u4E3A\u7A7A"});let Q=Y.poolCode;if(!Q||Q.length==0)throw new k0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let W=`
    SELECT
	    name AS table_name 
    FROM
	    sqlite_master 
    WHERE
	    type = 'table' 
	    AND name IN ( ${G} )`,Z=await WX(Q),K=Z.all(r.raw(W)),H=[];K.forEach((R)=>{let q=`PRAGMA table_info(${R.table_name})`;Z.all(r.raw(q)).forEach((I)=>{H.push({table_name:R.table_name,column_name:I.name,data_type:I.type})})});let z=Ib9({tables:K,columns:H}),A=`Generate a SQL query for this question: "${J}"

Please provide:
1. The SQL query , no chinese.`,F=`You are an expert sqlite query generator. Your task is to convert natural language questions into accurate SQL queries.

DATABASE SCHEMA:
${z}

RULES:
1. Only generate SELECT queries for data retrieval
2. Use proper sqlite syntax
3. Always qualify column names with table names when joining tables
4. Use appropriate JOINs when data from multiple tables is needed
5. Be case-insensitive for text searches using ILIKE
6. Use proper data types for comparisons
7. Format queries with proper indentation and line breaks
8. Include appropriate WHERE clauses to filter results
9. Use LIMIT when appropriate to prevent overly large result sets
10. Consider performance implications of the query

QUERY ANALYSIS:
- Analyze the user's question carefully
- Identify which tables and columns are needed
- Determine if joins are required
- Consider aggregation functions if needed
- Think about appropriate filtering conditions
- Consider ordering and limiting results

Provide a high-confidence SQL query that accurately answers the user's question.`,N=await LN({limit:1e4,offset:0,status:1});if(!N||!N[0])throw new k0(500,{message:"\u6CA1\u6709\u914D\u7F6E\u6709\u6548\u7684\u5927\u6A21\u578B"});let D=N[0].llamacpp==1?0:1,L=V3({name:N[0].name??"",apiKey:N[0].apiKey??"",baseURL:N[0].baseURL??"",includeUsage:!0}),O=F3({baseURL:N[0].baseURL??"",apiKey:N[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(N[0].name??""),E=await SV({model:D?L(N[0].name??""):O,temperature:0.1,system:F,prompt:A}),M=t0();return M.data={success:!0,sql:D4(E.content[0],"text")},$.json(M)}catch(Y){throw console.error(Y),new k0(500,{message:"\u751F\u6210\u5931\u8D25"})}});function Ib9($){let Y="",X=new Map;return $.columns.forEach((G)=>{let J=`${G.table_name}`;if(!X.has(J))X.set(J,[]);X.get(J)?.push(G)}),$.tables.forEach((G)=>{let J=`${G.table_name}`,Q=X.get(J)||[];Y+=`
Table: ${G.table_name}`,Y+=`
Columns:
`,Q.forEach((W)=>{Y+=`  - ${W.column_name}: ${W.data_type}`,Y+=`
`})}),Y}SJ.post("/sqlOracleGeneration",async($)=>{try{let Y=await $.req.json(),X=Y.tableNames,G=n1(n1(JSON.stringify(X),/[\[\]]/g,""),/[\"]/g,"'"),J=Y.textInput;if(!J||J.length==0)throw new k0(500,{message:"\u5F85\u5904\u7406\u6587\u672C\u4E3A\u7A7A"});let Q=Y.poolCode;if(!Q||Q.length==0)throw new k0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let W=`
    SELECT
	    TABLESPACE_NAME AS table_schema,
	    TABLE_NAME AS table_name 
    FROM
	    all_tables 
    WHERE
	    TABLE_NAME IN ( ${G} ) 
    ORDER BY
	    TABLE_NAME`,Z=`
    SELECT
	    t.TABLESPACE_NAME AS table_schema,
	    t.TABLE_NAME AS table_name,
	    c.column_name AS Field,
	    c.data_type AS TYPE,
	    c.data_length AS LENGTH,
	    c.nullable AS NULLABLE 
    FROM
	    all_tables t
	    LEFT JOIN all_tab_columns c ON t.TABLE_NAME = c.TABLE_NAME 
    WHERE
	    t.TABLE_NAME IN ( ${G} ) 
    ORDER BY
	    t.TABLE_NAME
      `,K=await lX(Q),H=await K.execute(`${W}`,[],{outFormat:OG0.default.OUT_FORMAT_OBJECT}),z=await K.execute(`${Z}`,[],{outFormat:OG0.default.OUT_FORMAT_OBJECT}),V=Pb9({tables:H.rows,columns:z.rows}),F=`Generate a SQL query for this question: "${J}"

Please provide:
1. The SQL query , no chinese , no semicolon.`,N=`You are an expert Oracle query generator. Your task is to convert natural language questions into accurate SQL queries.

DATABASE SCHEMA:
${V}

RULES:
1. Only generate SELECT queries for data retrieval
2. Use proper PostgreSQL syntax
3. Always qualify column names with table names when joining tables
4. Use appropriate JOINs when data from multiple tables is needed
5. Be case-insensitive for text searches using ILIKE
6. Use proper data types for comparisons
7. Format queries with proper indentation and line breaks
8. Include appropriate WHERE clauses to filter results
9. Use FETCH NEXT :pageSize ROWS ONLY when appropriate to prevent overly large result sets
10. Consider performance implications of the query

QUERY ANALYSIS:
- Analyze the user's question carefully
- Identify which tables and columns are needed
- Determine if joins are required
- Consider aggregation functions if needed
- Think about appropriate filtering conditions
- Consider ordering and limiting results

Provide a high-confidence SQL query that accurately answers the user's question.`,D=await LN({limit:1e4,offset:0,status:1});if(!D||!D[0])throw new k0(500,{message:"\u6CA1\u6709\u914D\u7F6E\u6709\u6548\u7684\u5927\u6A21\u578B"});let L=D[0].llamacpp==1?0:1,B=V3({name:D[0].name??"",apiKey:D[0].apiKey??"",baseURL:D[0].baseURL??"",includeUsage:!0}),E=F3({baseURL:D[0].baseURL??"",apiKey:D[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(D[0].name??""),M=await SV({model:L?B(D[0].name??""):E,temperature:0.1,system:N,prompt:F}),R=t0();return R.data={success:!0,sql:D4(M.content[0],"text")},$.json(R)}catch(Y){throw console.error(Y),new k0(500,{message:"\u751F\u6210\u5931\u8D25"})}});function Pb9($){let Y="",X=new Map;return $.columns.forEach((G)=>{let J=`${G.TABLE_SCHEMA}.${G.TABLE_NAME}`;if(!X.has(J))X.set(J,[]);X.get(J)?.push(G)}),$.tables.forEach((G)=>{let J=`${G.TABLE_SCHEMA}.${G.TABLE_NAME}`,Q=X.get(J)||[];Y+=`
Table: ${G.TABLE_NAME}`,Y+=`
Columns:
`,Q.forEach((W)=>{if(Y+=`  - ${W.FIELD}: ${W.TYPE}`,W.LENGTH)Y+=`(${W.LENGTH})`;if(W.NULLABLE==="N")Y+=" [NOT NULL]";Y+=`
`})}),Y}SJ.get("/queryTableSchema",async($)=>{try{let X=$.req.query().poolCode;if(!X||X.length==0)throw new k0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let G=await jA(X);if(!G[0])throw new k0(500,{message:"poolCode\u5BF9\u5E94\u914D\u7F6E\u4E0D\u5B58\u5728"});let J=`
    SELECT
	    table_name,
      table_schema
    FROM
	    information_schema.TABLES
    WHERE
	    table_schema = '${G[0]?.databaseName}'
    `,W=await(await uX(X)).execute(r.raw(J)),Z=t0();return Z.data=W[0],$.json(Z)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SJ.get("/queryPgTableSchema",async($)=>{try{let X=$.req.query().poolCode;if(!X||X.length==0)throw new k0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});if(!(await cL(X))[0])throw new k0(500,{message:"poolCode\u5BF9\u5E94\u914D\u7F6E\u4E0D\u5B58\u5728"});let J=`
    SELECT
	    schemaname AS table_schema,
	    tablename AS table_name
    FROM
	    pg_tables 
    WHERE
	    schemaname NOT IN ( 'information_schema', 'pg_catalog' ) 
    ORDER BY
	    schemaname,
	    tablename
    `,W=await(await pX(X)).execute(r.raw(J)),Z=t0();return Z.data=W.rows,$.json(Z)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SJ.get("/queryOracleTableSchema",async($)=>{try{let X=$.req.query().poolCode;if(!X||X.length==0)throw new k0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});if(!(await ZU(X))[0])throw new k0(500,{message:"poolCode\u5BF9\u5E94\u914D\u7F6E\u4E0D\u5B58\u5728"});let J=`
    SELECT
	    TABLE_NAME,
	    TABLESPACE_NAME 
    FROM
	    all_tables 
    WHERE
	    TABLESPACE_NAME != 'SYSTEM' 
	    AND TABLESPACE_NAME != 'SYSAUX'
	    ORDER BY TABLE_NAME
    `,Q=await lX(X),W=await Q.execute(J,[],{outFormat:OG0.default.OUT_FORMAT_OBJECT});Q.close();let Z=t0();return Z.data=W.rows,$.json(Z)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SJ.get("/querySqliteTableSchema",async($)=>{try{let X=$.req.query().poolCode;if(!X||X.length==0)throw new k0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let G="SELECT name AS table_name FROM sqlite_master WHERE type='table'",Q=(await WX(X)).all(G),W=t0();return W.data=Q,$.json(W)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SJ.post("/transText",async($)=>{try{let X=(await $.req.json()).textInput;if(!X||X.length==0)throw new k0(500,{message:"\u5F85\u5904\u7406\u6587\u672C\u4E3A\u7A7A"});let G=`\u7FFB\u8BD1\u4E0B\u9762\u5185\u5BB9\u4E3A\u82F1\u6587\uFF1A"${X}"\u3002`,J="\u4F60\u662F\u4E00\u4E2A\u667A\u80FD\u52A9\u624B",Q=await LN({limit:1e4,offset:0,status:1});if(!Q||!Q[0])throw new k0(500,{message:"\u6CA1\u6709\u914D\u7F6E\u6709\u6548\u7684\u5927\u6A21\u578B"});let W=Q[0].llamacpp==1?0:1,Z=V3({name:Q[0].name??"",apiKey:Q[0].apiKey??"",baseURL:Q[0].baseURL??"",includeUsage:!0}),H=F3({baseURL:Q[0].baseURL??"",apiKey:Q[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(Q[0].name??""),z=await SV({model:W?Z(Q[0].name??""):H,temperature:0.1,system:J,prompt:G}),V=t0();return V.data={success:!0,res:D4(z.content[0],"text")},$.json(V)}catch(Y){throw console.error(Y),new k0(500,{message:"\u751F\u6210\u5931\u8D25"})}});SJ.post("run/:code",async($)=>{try{let Y=$.req.param("code");U.string().parse(Y);let J=(await $.req.json()).prompt,Q=Vk4.get(Y),W=t0(),Z=await tS4(Y);if(Z&&Z[0]){let K=Z[0].name,H=Z[0].model,z=J?J:Z[0].userPrompt,V=Z[0].systemPrompt,A=Z[0].tools;if(!Q){let N=await Wk4(H??"");if(!N||!N[0])throw new k0(500,{message:"\u8FD0\u884C\u5931\u8D25\uFF1A\u65E0\u6548\u7684\u5927\u6A21\u578B\u914D\u7F6E"});let D=N[0].llamacpp==1?0:1,L=V3({name:N[0].name??"",apiKey:N[0].apiKey??"",baseURL:N[0].baseURL??"",includeUsage:!0}),O=F3({baseURL:N[0].baseURL??"",apiKey:N[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(N[0].name??"");Q=new YJ({id:"run-agent",name:K??"",instructions:V??"",model:D?L(N[0].name??""):O,tools:async()=>{return await Fk4()}})}let F=await Q.generate(z??"");W.data={success:!0,res:F.text},Vk4.set(Y,Q)}return $.json(W)}catch(Y){throw console.error(Y),new k0(500,{message:"\u8FD0\u884C\u5931\u8D25"})}});var Dk4=SJ;var dd=new O4;dd.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await Zk4(Y),G=await Kk4(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});dd.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await Uk4(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});dd.post("/delete",async($)=>{try{let Y=await $.req.json();await Hk4(Y.id);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});dd.get("/test",async($)=>{try{let Y=$.req.query("id"),X=await Qk4(Y?Y:"");if(!X||!X[0])throw new k0(500,{message:"\u8FDE\u63A5\u5931\u8D25"});let G=t0();if(X[0].llamacpp==1?0:1){let Q=V3({name:X[0].name??"",apiKey:X[0].apiKey??"",baseURL:X[0].baseURL??"",includeUsage:!0}),{text:W}=await SV({model:Q(X[0].name??""),system:"\u4F60\u662F\u4E00\u4E2A\u667A\u80FD\u52A9\u624B",prompt:"\u4F60\u662F\u8C01\uFF1F"});G.data=W}else{let W=F3({baseURL:X[0].baseURL??"",apiKey:X[0].apiKey??""}).completion(X[0].name??""),{text:Z}=await SV({model:W,system:"\u4F60\u662F\u4E00\u4E2A\u667A\u80FD\u52A9\u624B",prompt:"\u4F60\u662F\u8C01\uFF1F"});G.data=Z}return $.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u8FDE\u63A5\u5931\u8D25"})}});var Nk4=dd;var MG0=new O4;MG0.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await $k4(Y),G=await Yk4(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});MG0.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await Xk4(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});MG0.post("/delete",async($)=>{try{let Y=await $.req.json();await Gk4(Y.code);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var Lk4=MG0;var RG0=new O4;RG0.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await oG1(Y),G=await tG1(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});RG0.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await Wr(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});RG0.post("/delete",async($)=>{try{let Y=await $.req.json(),X=await aG1(Y.id);if(X&&X[0]&&X[0].path&&X[0].path.includes("static/upload"))await Bun.file(X[0].path).delete();await eG1(Y.id);let G=t0();return $.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var Bk4=RG0;var cC=new O4;cC.get("/queryPage",async($)=>{try{let Y={limit:6,offset:0};z6(Y,$.req.query());let X=await hB1(Y);if(a8(X))X.forEach(async(Q)=>{let W=await tN(Q.path1);Q.details=W});let G=await fB1(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});cC.get("/queryAll",async($)=>{try{let Y=await yB1(),X=t0();return X.data=Y,$.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});cC.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await wI(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});cC.post("/delete",async($)=>{try{let Y=await $.req.json();await gB1(Y.code);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});cC.post("/deleteAll",async($)=>{try{let Y=await $.req.json();await mB1(Y.path1),await S61(Y.path1);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var Ok4=cC;var qG0=new O4;qG0.get("/queryAll",async($)=>{try{let{path1:Y}=$.req.query(),X=await tN(Y??""),G=t0();return G.data=X,$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});qG0.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await fH(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});qG0.post("/delete",async($)=>{try{let Y=await $.req.json();await C61(Y.id);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var Ek4=qG0;var Hn0=new O4;Hn0.get("/queryCurrent12Month",async($)=>{try{let Y=await L$1(),X=t0();return X.data=Y,$.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});Hn0.get("/queryCurrentTop",async($)=>{try{let Y=await B$1(),X=t0();return X.data=Y,$.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});var Mk4=Hn0;function BH($,Y){var X={};for(var G in $)if(Object.prototype.hasOwnProperty.call($,G)&&Y.indexOf(G)<0)X[G]=$[G];if($!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var J=0,G=Object.getOwnPropertySymbols($);J<G.length;J++)if(Y.indexOf(G[J])<0&&Object.prototype.propertyIsEnumerable.call($,G[J]))X[G[J]]=$[G[J]]}return X}var wb9={ZodAny:"any",ZodArray:"array",ZodBigInt:"bigint",ZodBoolean:"boolean",ZodDefault:"default",ZodPrefault:"prefault",ZodTransform:"transform",ZodEnum:"enum",ZodIntersection:"intersection",ZodLazy:"lazy",ZodLiteral:"literal",ZodNever:"never",ZodNull:"null",ZodNullable:"nullable",ZodNumber:"number",ZodNonOptional:"nonoptional",ZodObject:"object",ZodOptional:"optional",ZodPipe:"pipe",ZodReadonly:"readonly",ZodRecord:"record",ZodString:"string",ZodTuple:"tuple",ZodType:"type",ZodUnion:"union",ZodDiscriminatedUnion:"union",ZodUnknown:"unknown",ZodVoid:"void",ZodDate:"date",ZodTemplateLiteral:"template_literal"};function R6($,Y){return(Array.isArray(Y)?Y:[Y]).some((G)=>{var J;let Q=((J=$===null||$===void 0?void 0:$.def)===null||J===void 0?void 0:J.type)===wb9[G];if(G==="ZodDiscriminatedUnion")return Q&&"discriminator"in $.def;return Q})}function kJ($){return $&&"def"in $}function cd($){return $.safeParse(null).success}function Pk4($){return $.safeParse(void 0).success}class wk4{constructor(){this._map=new Map,this._idmap=new Map}add($,...Y){let X=Y[0];if(this._map.set($,X),X&&typeof X==="object"&&"id"in X){if(this._idmap.has(X.id))throw Error(`ID ${X.id} already exists in the registry`);this._idmap.set(X.id,$)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove($){let Y=this._map.get($);if(Y&&typeof Y==="object"&&"id"in Y)this._idmap.delete(Y.id);return this._map.delete($),this}get($){let Y=$._zod.parent;if(Y){let X={...this.get(Y)??{}};return delete X.id,{...X,...this._map.get($)}}return this._map.get($)}has($){return this._map.has($)}}function _b9(){return new wk4}function IG0($,Y){if($===null||$===void 0||Y===null||Y===void 0)return $===Y;if($===Y||$.valueOf()===Y.valueOf())return!0;if(Array.isArray($)){if(!Array.isArray(Y))return!1;if($.length!==Y.length)return!1}if(!($ instanceof Object)||!(Y instanceof Object))return!1;let X=Object.keys($);return Object.keys(Y).every((G)=>X.indexOf(G)!==-1)&&X.every((G)=>IG0($[G],Y[G]))}class _k4{constructor(){this.buckets=new Map}put($){let Y=this.hashCodeOf($),X=this.buckets.get(Y);if(!X){this.buckets.set(Y,[$]);return}if(!X.some((J)=>IG0(J,$)))X.push($)}contains($){let Y=this.hashCodeOf($),X=this.buckets.get(Y);if(!X)return!1;return X.some((G)=>IG0(G,$))}values(){return[...this.buckets.values()].flat()}stats(){let $=0,Y=0,X=0;for(let J of this.buckets.values())if($+=1,Y+=J.length,J.length>1)X+=1;let G=$/Y;return{totalBuckets:$,collisions:X,totalValues:Y,hashEffectiveness:G}}hashCodeOf($){let Y=0;if(Array.isArray($)){for(let X=0;X<$.length;X++)Y^=this.hashCodeOf($[X])*X;return Y}if(typeof $==="string"){for(let X=0;X<$.length;X++)Y^=$.charCodeAt(X)*X;return Y}if(typeof $==="number")return $;if(typeof $==="object")for(let[X,G]of Object.entries($))Y^=this.hashCodeOf(X)+this.hashCodeOf(G!==null&&G!==void 0?G:"");return Y}}function iC($){return $===void 0}function id($,Y){let X={};return Object.entries($).forEach(([G,J])=>{X[G]=Y(J)}),X}function jb9($,Y){let X={};return Object.entries($).forEach(([G,J])=>{if(!Y.some((Q)=>Q===G))X[G]=J}),X}function JR($,Y){let X={};return Object.entries($).forEach(([G,J])=>{if(!Y(J,G))X[G]=J}),X}function Rk4($){return $.filter((Y)=>!iC(Y))}var nd=IG0;function jk4($){let Y=new _k4;return $.forEach((X)=>Y.put(X)),[...Y.values()]}function Tk4($){return typeof $==="string"}function qk4($){return Object.fromEntries(Object.entries($).sort(([Y],[X])=>Y.localeCompare(X)))}var Ik4=_b9();class Q8{static collectMetadata($,Y){let X=this.getMetadataFromRegistry($),G=Object.assign(Object.assign({},X===null||X===void 0?void 0:X._internal),Y===null||Y===void 0?void 0:Y._internal),J=Object.assign(Object.assign({},X===null||X===void 0?void 0:X.param),Y===null||Y===void 0?void 0:Y.param),Q=Object.assign(Object.assign(Object.assign(Object.assign({},Object.keys(G).length>0?{_internal:G}:{}),X),Y),Object.keys(J).length>0?{param:J}:{});if(R6($,["ZodOptional","ZodNullable","ZodDefault","ZodPrefault","ZodReadonly","ZodNonOptional"])&&kJ($._zod.def.innerType))return this.collectMetadata($._zod.def.innerType,Q);if(R6($,"ZodPipe")){let W=$._zod.def.in,Z=$._zod.def.out;if(R6(W,"ZodTransform")&&kJ(Z))return this.collectMetadata(Z,Q);if(kJ(W))return this.collectMetadata(W,Q)}return Q}static getMetadata($){return this.collectMetadata($)}static getOpenApiMetadata($){let Y=this.collectMetadata($),X=Y!==null&&Y!==void 0?Y:{},{_internal:G}=X;return BH(X,["_internal"])}static getInternalMetadata($){var Y;return(Y=this.collectMetadata($))===null||Y===void 0?void 0:Y._internal}static getParamMetadata($){let Y=this.collectMetadata($);return Object.assign(Object.assign({},Y),{param:Object.assign(Object.assign({},(Y===null||Y===void 0?void 0:Y.description)?{description:Y.description}:{}),Y===null||Y===void 0?void 0:Y.param)})}static buildSchemaMetadata($){return JR(jb9($,["param","_internal"]),iC)}static buildParameterMetadata($){return JR($,iC)}static applySchemaMetadata($,Y){return JR(Object.assign(Object.assign({},$),this.buildSchemaMetadata(Y)),iC)}static getRefId($){var Y;return(Y=this.getInternalMetadata($))===null||Y===void 0?void 0:Y.refId}static unwrapChained($){return this.unwrapUntil($)}static getDefaultValue($){var Y;let X=(Y=this.unwrapUntil($,"ZodDefault"))!==null&&Y!==void 0?Y:this.unwrapUntil($,"ZodPrefault");return X===null||X===void 0?void 0:X._zod.def.defaultValue}static unwrapUntil($,Y){if(Y&&R6($,Y))return $;if(R6($,["ZodOptional","ZodNullable","ZodDefault","ZodPrefault","ZodReadonly","ZodNonOptional"])&&kJ($._zod.def.innerType))return this.unwrapUntil($._zod.def.innerType,Y);if(R6($,"ZodPipe")){let X=$._zod.def.in,G=$._zod.def.out;if(R6(X,"ZodTransform")&&kJ(G))return this.unwrapUntil(G,Y);if(kJ(X))return this.unwrapUntil(X,Y)}return Y?void 0:$}static getMetadataFromInternalRegistry($){return Ik4.get($)}static getMetadataFromRegistry($){let Y=this.getMetadataFromInternalRegistry($),X=$.meta();if(!Y)return X;let{_internal:G}=Y,J=BH(Y,["_internal"]),Q=X!==null&&X!==void 0?X:{},{id:W,title:Z}=Q,K=BH(Q,["id","title"]);return Object.assign(Object.assign(Object.assign({_internal:Object.assign(Object.assign({},W?{refId:W}:{}),G)},J),Z?{description:Z}:{}),K)}static setMetadataInRegistry($,Y){Ik4.add($,Y)}}function kV($,Y){let X=$[Y];if(typeof X!=="function")return;$[Y]=function(...G){let J=X.apply(this,G),Q=Q8.getMetadataFromRegistry(this);if(Q)Q8.setMetadataInRegistry(J,Q);return J}}function Ck4($){if(typeof $.ZodType.prototype.openapi<"u")return;$.ZodType.prototype.openapi=function(...Y){let{refId:X,metadata:G,options:J}=Tb9(...Y),Q=G!==null&&G!==void 0?G:{},{param:W}=Q,Z=BH(Q,["param"]),K=Q8.getMetadataFromRegistry(this),H=K!==null&&K!==void 0?K:{},{_internal:z}=H,V=BH(H,["_internal"]),A=Object.assign(Object.assign(Object.assign({},z),J),X?{refId:X}:void 0),F=Object.assign(Object.assign(Object.assign({},V),Z),(V===null||V===void 0?void 0:V.param)||W?{param:Object.assign(Object.assign({},V===null||V===void 0?void 0:V.param),W)}:void 0),N=new this.constructor(this._def);function D(B){Q8.setMetadataInRegistry(B,Object.assign(Object.assign({},Object.keys(A).length>0?{_internal:A}:void 0),F))}if(D(N),R6(N,"ZodLazy"))D(this);if(R6(N,"ZodObject")){let B=Q8.getMetadataFromRegistry(N),O=N.extend;N.extend=function(...E){let M=O.apply(N,E),R=B!==null&&B!==void 0?B:{},{_internal:q}=R,w=BH(R,["_internal"]);return Q8.setMetadataInRegistry(M,{_internal:{extendedFrom:(q===null||q===void 0?void 0:q.refId)?{refId:q.refId,schema:N}:q===null||q===void 0?void 0:q.extendedFrom}}),M.openapi(w)},kV(N,"catchall")}kV(N,"optional"),kV(N,"nullable"),kV(N,"default"),kV(N,"transform"),kV(N,"refine"),kV(N,"length"),kV(N,"min"),kV(N,"max");let L=N.meta;return N.meta=function(...B){let O=L.apply(this,B);if(B[0]){let E=Q8.getMetadataFromInternalRegistry(this);if(E)Q8.setMetadataInRegistry(O,Object.assign(Object.assign({},E),B[0]))}return O},N}}function Tb9($,Y,X){if(typeof $==="string")return{refId:$,metadata:Y,options:X};return{refId:void 0,metadata:$,options:Y}}function zn0($){var Y;return JR((Y=Q8.getOpenApiMetadata($))!==null&&Y!==void 0?Y:{},iC)}class Vn0{constructor($){this.parents=$,this._definitions=[]}get definitions(){var $,Y;return[...(Y=($=this.parents)===null||$===void 0?void 0:$.flatMap((G)=>G._definitions))!==null&&Y!==void 0?Y:[],...this._definitions]}register($,Y){let X=this.schemaWithRefId($,Y);return this._definitions.push({type:"schema",schema:X}),X}registerParameter($,Y){var X,G,J;let Q=this.schemaWithRefId($,Y),W=(X=Q8.getOpenApiMetadata(Q))!==null&&X!==void 0?X:{},Z=Q.openapi(Object.assign(Object.assign({},W),{param:Object.assign(Object.assign({},W===null||W===void 0?void 0:W.param),{name:(J=(G=W===null||W===void 0?void 0:W.param)===null||G===void 0?void 0:G.name)!==null&&J!==void 0?J:$})}));return this._definitions.push({type:"parameter",schema:Z}),Z}registerPath($){this._definitions.push({type:"route",route:$})}registerWebhook($){this._definitions.push({type:"webhook",webhook:$})}registerComponent($,Y,X){return this._definitions.push({type:"component",componentType:$,name:Y,component:X}),{name:Y,ref:{$ref:`#/components/${$}/${Y}`}}}schemaWithRefId($,Y){return Y.openapi($)}}class ad{constructor($){this.message=$}}class lC extends ad{constructor($,Y){super($);this.data=Y}}class rd extends ad{constructor($){super(`Missing parameter data, please specify \`${$.missingField}\` and other OpenAPI parameter props using the \`param\` field of \`schema.openapi\``);this.data=$}}function ld($,Y){try{return $()}catch(X){if(X instanceof rd)throw new rd(Object.assign(Object.assign({},X.data),Y));throw X}}class Sk4 extends ad{constructor($){super("Unknown zod object type, please specify `type` and other OpenAPI props using `schema.openapi`.");this.data=$}}class kk4{transform($,Y,X){var G,J,Q,W;let Z=$.def.element,K=(J=(G=$.def.checks)===null||G===void 0?void 0:G.find((z)=>z._zod.def.check==="min_length"))===null||J===void 0?void 0:J._zod.def.minimum,H=(W=(Q=$.def.checks)===null||Q===void 0?void 0:Q.find((z)=>z._zod.def.check==="max_length"))===null||W===void 0?void 0:W._zod.def.maximum;return Object.assign(Object.assign({},Y("array")),{items:kJ(Z)?X(Z):{},minItems:K,maxItems:H})}}class An0{transform($){return Object.assign(Object.assign({},$("string")),{pattern:"^d+$"})}}class vk4{transform($,Y,X,G,J){let Q=[...$.def.options],W=Q.map(G);if(Y)return{oneOf:X(W,Y)};let Z=$._zod.def.discriminator;if(!Z)return console.error("No discriminator found for discriminated union",$),{oneOf:W};return{oneOf:W,discriminator:this.mapDiscriminator(Q,Z,J)}}mapDiscriminator($,Y,X){if($.some((J)=>Q8.getRefId(J)===void 0))return;let G={};return $.forEach((J)=>{var Q;let W=Q8.getRefId(J),Z=(Q=J.def.shape)===null||Q===void 0?void 0:Q[Y];if(R6(Z,"ZodEnum")){Object.values(Z._zod.def.entries).filter(Tk4).forEach((z)=>{G[z]=X(W)});return}let K=Z===null||Z===void 0?void 0:Z.def.values[0];G[K]=X(W)}),{propertyName:Y,mapping:G}}}function xk4($){let X=Object.keys($).filter((Q)=>typeof $[$[Q]]!=="number").map((Q)=>$[Q]),G=X.filter((Q)=>typeof Q==="number").length,J=G===0?"string":G===X.length?"numeric":"mixed";return{values:X,type:J}}class yk4{transform($,Y,X){let{type:G,values:J}=xk4($._zod.def.entries);if(G==="mixed")throw new ad("Enum has mixed string and number values, please specify the OpenAPI type manually");return Object.assign(Object.assign({},X(G==="numeric"?"integer":"string")),{enum:Y?[...J,null]:J})}}class bk4{transform($,Y,X,G){let Q={allOf:this.flattenIntersectionTypes($).map(G)};if(Y)return{anyOf:X([Q],Y)};return Q}flattenIntersectionTypes($){if(!R6($,"ZodIntersection"))return[$];let Y=kJ($._zod.def.left)?this.flattenIntersectionTypes($._zod.def.left):[],X=kJ($._zod.def.right)?this.flattenIntersectionTypes($._zod.def.right):[];return[...Y,...X]}}class hk4{constructor(){this.bigIntTransformer=new An0}transform($,Y){let X=typeof $.def.values[0];if(X==="boolean"||X==="number"||X==="string"||X==="object")return Object.assign(Object.assign({},Y(X)),{enum:[$.def.values[0]]});if(X==="bigint")return this.bigIntTransformer.transform(Y);return Y("null")}}class fk4{transform($,Y,X){var G;return Object.assign(Object.assign(Object.assign({},Y("number")),Y($.format==="safeint"?"integer":"number")),X((G=$.def.checks)!==null&&G!==void 0?G:[]))}}class gk4{transform($,Y,X,G){var J;let Q=(J=Q8.getInternalMetadata($))===null||J===void 0?void 0:J.extendedFrom,W=this.requiredKeysOf($),Z=id($.def.shape,G);if(!Q)return Object.assign(Object.assign(Object.assign(Object.assign({},X("object")),{properties:Z,default:Y}),W.length>0?{required:W}:{}),this.generateAdditionalProperties($,G));let K=Q.schema;G(K);let H=this.requiredKeysOf(K),z=id(K===null||K===void 0?void 0:K.def.shape,G),V=Object.fromEntries(Object.entries(Z).filter(([N,D])=>{return!nd(z[N],D)})),A=W.filter((N)=>!H.includes(N)),F=Object.assign(Object.assign(Object.assign(Object.assign({},X("object")),{default:Y,properties:V}),A.length>0?{required:A}:{}),this.generateAdditionalProperties($,G));return{allOf:[{$ref:`#/components/schemas/${Q.refId}`},F]}}generateAdditionalProperties($,Y){let X=$.def.catchall;if(!X)return{};if(R6(X,"ZodNever"))return{additionalProperties:!1};if(kJ(X))return{additionalProperties:Y(X)};return{}}requiredKeysOf($){return Object.entries($.def.shape).filter(([Y,X])=>!Pk4(X)).map(([Y,X])=>Y)}}class mk4{transform($,Y,X){let{valueType:G,keyType:J}=$,Q=kJ(G)?X(G):{};if(R6(J,"ZodEnum")){let Z=Object.values(J._zod.def.entries).filter(Tk4).reduce((K,H)=>Object.assign(Object.assign({},K),{[H]:Q}),{});return Object.assign(Object.assign({},Y("object")),{properties:Z})}return Object.assign(Object.assign({},Y("object")),{additionalProperties:Q})}}function Cb9($){return $._zod.def.check==="length_equals"}function Sb9($){return $._zod.def.check==="string_format"&&$._zod.def.format==="regex"}class uk4{transform($,Y){var X,G,J,Q;let W=(X=$.def.checks)===null||X===void 0?void 0:X.find(Sb9),Z=W===null||W===void 0?void 0:W._zod.def.pattern.toString().replace(/^\/|\/$/g,""),K=(G=$.def.checks)===null||G===void 0?void 0:G.find(Cb9),H=K===null||K===void 0?void 0:K._zod.def.length,z=Number.isFinite($.minLength)?(J=$.minLength)!==null&&J!==void 0?J:void 0:void 0,V=Number.isFinite($.maxLength)?(Q=$.maxLength)!==null&&Q!==void 0?Q:void 0:void 0;return Object.assign(Object.assign({},Y("string")),{minLength:H!==null&&H!==void 0?H:z,maxLength:H!==null&&H!==void 0?H:V,format:this.mapStringFormat($),pattern:Z})}mapStringFormat($){if($.format==="uuid")return"uuid";if($.format==="email")return"email";if($.format==="url")return"uri";if($.format==="date")return"date";if($.format==="datetime")return"date-time";if($.format==="cuid")return"cuid";if($.format==="cuid2")return"cuid2";if($.format==="ulid")return"ulid";if($.format==="ipv4")return"ip";if($.format==="ipv6")return"ip";if($.format==="emoji")return"emoji";return}}class pk4{constructor($){this.versionSpecifics=$}transform($,Y,X){let J=$._zod.def.items.map((Q)=>kJ(Q)?X(Q):{});return Object.assign(Object.assign({},Y("array")),this.versionSpecifics.mapTupleItems(J))}}class dk4{constructor($){this.options=$}transform($,Y,X){var G,J,Q;let W=Q8.getInternalMetadata($),Z=(Q=(G=W===null||W===void 0?void 0:W.unionPreferredType)!==null&&G!==void 0?G:(J=this.options)===null||J===void 0?void 0:J.unionPreferredType)!==null&&Q!==void 0?Q:"anyOf",H=this.flattenUnionTypes($).map((z)=>{let V=this.unwrapNullable(z);return X(V)});return{[Z]:Y(H)}}flattenUnionTypes($){if(!R6($,"ZodUnion"))return[$];return $.def.options.flatMap((X)=>kJ(X)?this.flattenUnionTypes(X):[])}unwrapNullable($){if(R6($,"ZodNullable")){let Y=$.unwrap();if(kJ(Y))return this.unwrapNullable(Y)}return $}}class ck4{transform($){return Object.assign(Object.assign({},$("string")),{format:"date-time"})}}class PG0{transform($,Y,X,G){let J=Y($._zod.def.getter());return PG0.mapRecursive(J,X,G)}static mapRecursive($,Y,X){if("$ref"in $)return X($);if($.type)return Object.assign(Object.assign({},$),Y($.type));return $}}class lk4{transform($,Y){let G=$.def.parts.map((J)=>this.generatePattern(J)).join("");return Object.assign(Object.assign({},Y("string")),{pattern:`^${G}$`})}generatePattern($){if(typeof $==="string"||typeof $==="number"||typeof $==="boolean"||typeof $==="bigint"||$===null||$===void 0)return this.escapeRegex(String($));if(R6($,"ZodLiteral")){let Y=$.def.values[0];return this.escapeRegex(String(Y))}if(R6($,"ZodNumber"))return"[+-]?\\d+(\\.\\d+)?";if(R6($,"ZodBoolean"))return"(true|false)";if(R6($,"ZodEnum")){let{values:Y}=xk4($.def.entries);return`(${Y.map((X)=>this.escapeRegex(String(X))).join("|")})`}return".*"}escapeRegex($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}class ik4{constructor($,Y){this.versionSpecifics=$,this.objectTransformer=new gk4,this.stringTransformer=new uk4,this.numberTransformer=new fk4,this.bigIntTransformer=new An0,this.dateTransformer=new ck4,this.lazyTransformer=new PG0,this.literalTransformer=new hk4,this.templateLiteralTransformer=new lk4,this.enumTransformer=new yk4,this.arrayTransformer=new kk4,this.discriminatedUnionTransformer=new vk4,this.intersectionTransformer=new bk4,this.recordTransformer=new mk4,this.tupleTransformer=new pk4($),this.unionTransformer=new dk4(Y)}transform($,Y,X,G,J){if(R6($,"ZodNull"))return this.versionSpecifics.nullType;if(R6($,"ZodUnknown")||R6($,"ZodAny"))return this.versionSpecifics.mapNullableType(void 0,Y);if(R6($,"ZodObject"))return this.objectTransformer.transform($,J,(W)=>this.versionSpecifics.mapNullableType(W,Y),X);let Q=this.transformSchemaWithoutDefault($,Y,X,G);return Object.assign(Object.assign({},Q),{default:J})}transformSchemaWithoutDefault($,Y,X,G){if(R6($,"ZodUnknown")||R6($,"ZodAny"))return this.versionSpecifics.mapNullableType(void 0,Y);if(R6($,"ZodString"))return this.stringTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y));if(R6($,"ZodNumber"))return this.numberTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y),(Q)=>this.versionSpecifics.getNumberChecks(Q));if(R6($,"ZodBigInt"))return this.bigIntTransformer.transform((Q)=>this.versionSpecifics.mapNullableType(Q,Y));if(R6($,"ZodBoolean"))return this.versionSpecifics.mapNullableType("boolean",Y);if(R6($,"ZodLazy"))return this.lazyTransformer.transform($,X,(Q)=>this.versionSpecifics.mapNullableType(Q,Y),(Q)=>this.versionSpecifics.mapNullableOfRef(Q,Y));if(R6($,"ZodLiteral"))return this.literalTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y));if(R6($,"ZodTemplateLiteral"))return this.templateLiteralTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y));if(R6($,"ZodEnum"))return this.enumTransformer.transform($,Y,(Q)=>this.versionSpecifics.mapNullableType(Q,Y));if(R6($,"ZodArray"))return this.arrayTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y),X);if(R6($,"ZodTuple"))return this.tupleTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y),X);if(R6($,"ZodDiscriminatedUnion"))return this.discriminatedUnionTransformer.transform($,Y,(Q)=>this.versionSpecifics.mapNullableOfArray(Q,Y),X,G);if(R6($,"ZodUnion"))return this.unionTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableOfArray(Q,Y),X);if(R6($,"ZodIntersection"))return this.intersectionTransformer.transform($,Y,(Q)=>this.versionSpecifics.mapNullableOfArray(Q,Y),X);if(R6($,"ZodRecord"))return this.recordTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y),X);if(R6($,"ZodDate"))return this.dateTransformer.transform((Q)=>this.versionSpecifics.mapNullableType(Q,Y));let J=Q8.getRefId($);throw new Sk4({currentSchema:$.def,schemaName:J})}}class Fn0{constructor($,Y,X){this.definitions=$,this.versionSpecifics=Y,this.options=X,this.schemaRefs={},this.paramRefs={},this.pathRefs={},this.rawComponents=[],this.openApiTransformer=new ik4(Y,X),this.sortDefinitions()}generateDocumentData(){return this.definitions.forEach(($)=>this.generateSingle($)),{components:this.buildComponents(),paths:this.pathRefs}}generateComponents(){return this.definitions.forEach(($)=>this.generateSingle($)),{components:this.buildComponents()}}buildComponents(){var $,Y,X,G;let J={};this.rawComponents.forEach(({componentType:H,name:z,component:V})=>{var A;(A=J[H])!==null&&A!==void 0||(J[H]={}),J[H][z]=V});let Q=Object.assign(Object.assign({},($=J.schemas)!==null&&$!==void 0?$:{}),this.filteredSchemaRefs),W=((Y=this.options)===null||Y===void 0?void 0:Y.sortComponents)==="alphabetically"?qk4(Q):Q,Z=Object.assign(Object.assign({},(X=J.parameters)!==null&&X!==void 0?X:{}),this.paramRefs),K=((G=this.options)===null||G===void 0?void 0:G.sortComponents)==="alphabetically"?qk4(Z):Z;return Object.assign(Object.assign({},J),{schemas:W,parameters:K})}isNotPendingRefEntry($){return $[1]!=="pending"}get filteredSchemaRefs(){let $=Object.entries(this.schemaRefs).filter(this.isNotPendingRefEntry);return Object.fromEntries($)}sortDefinitions(){let $=["schema","parameter","component","route"];this.definitions.sort((Y,X)=>{if(!("type"in Y)){if(!("type"in X))return 0;return-1}if(!("type"in X))return 1;let G=$.findIndex((Q)=>Q===Y.type),J=$.findIndex((Q)=>Q===X.type);return G-J})}generateSingle($){if(!("type"in $)){this.generateSchemaWithRef($);return}switch($.type){case"parameter":this.generateParameterDefinition($.schema);return;case"schema":this.generateSchemaWithRef($.schema);return;case"route":this.generateSingleRoute($.route);return;case"component":this.rawComponents.push($);return}}generateParameterDefinition($){let Y=Q8.getRefId($),X=this.generateParameter($);if(Y)this.paramRefs[Y]=X;return X}getParameterRef($,Y){let X=Q8.getOpenApiMetadata($),G=Q8.getInternalMetadata($),J=X===null||X===void 0?void 0:X.param,Q=(G===null||G===void 0?void 0:G.refId)?this.paramRefs[G.refId]:void 0;if(!(G===null||G===void 0?void 0:G.refId)||!Q)return;if(J&&Q.in!==J.in||(Y===null||Y===void 0?void 0:Y.in)&&Q.in!==Y.in)throw new lC(`Conflicting location for parameter ${Q.name}`,{key:"in",values:Rk4([Q.in,Y===null||Y===void 0?void 0:Y.in,J===null||J===void 0?void 0:J.in])});if(J&&Q.name!==J.name||(Y===null||Y===void 0?void 0:Y.name)&&Q.name!==(Y===null||Y===void 0?void 0:Y.name))throw new lC("Conflicting names for parameter",{key:"name",values:Rk4([Q.name,Y===null||Y===void 0?void 0:Y.name,J===null||J===void 0?void 0:J.name])});return{$ref:`#/components/parameters/${G.refId}`}}generateInlineParameters($,Y){let X=Q8.getOpenApiMetadata($),G=X===null||X===void 0?void 0:X.param,J=this.getParameterRef($,{in:Y});if(J)return[J];if(R6($,"ZodObject")){let Q=$.def.shape;return Object.entries(Q).map(([Z,K])=>{var H;let z=Q8.getOpenApiMetadata(K),V=this.getParameterRef(K,{in:Y,name:Z});if(V)return V;let A=z===null||z===void 0?void 0:z.param;if((A===null||A===void 0?void 0:A.name)&&A.name!==Z)throw new lC("Conflicting names for parameter",{key:"name",values:[Z,A.name]});if((A===null||A===void 0?void 0:A.in)&&A.in!==Y)throw new lC(`Conflicting location for parameter ${(H=A.name)!==null&&H!==void 0?H:Z}`,{key:"in",values:[Y,A.in]});return this.generateParameter(K,{name:Z,in:Y})})}if((G===null||G===void 0?void 0:G.in)&&G.in!==Y)throw new lC(`Conflicting location for parameter ${G.name}`,{key:"in",values:[Y,G.in]});return[this.generateParameter($,{in:Y})]}generateSimpleParameter($,Y){let X=Q8.getParamMetadata($),G=X===null||X===void 0?void 0:X.param,J=Object.assign(Object.assign({},G),Y),Q=!Pk4($)&&!cd($),W=this.generateSchemaWithRef($);return Object.assign({schema:W,required:Q},Object.keys(J).length>0?Q8.buildParameterMetadata(J):{})}generateParameter($,Y){var X,G;let J=Q8.getOpenApiMetadata($),Q=J===null||J===void 0?void 0:J.param,W=(X=Y===null||Y===void 0?void 0:Y.name)!==null&&X!==void 0?X:Q===null||Q===void 0?void 0:Q.name,Z=(G=Y===null||Y===void 0?void 0:Y.in)!==null&&G!==void 0?G:Q===null||Q===void 0?void 0:Q.in;if(!W)throw new rd({missingField:"name"});if(!Z)throw new rd({missingField:"in",paramName:W});let K=this.generateSimpleParameter($,Y);return Object.assign(Object.assign({},K),{in:Z,name:W})}generateSchemaWithMetadata($){let Y=Q8.unwrapChained($),X=Q8.getOpenApiMetadata($),G=Q8.getDefaultValue($),J=Q8.getRefId($);if(J&&typeof this.schemaRefs[J]==="object")return this.schemaRefs[J];if(J&&this.schemaRefs[J]==="pending"){let W={$ref:this.generateSchemaRef(J)};return this.versionSpecifics.mapNullableOfRef(W,cd($))}if(J&&!this.schemaRefs[J])this.schemaRefs[J]="pending";let Q=(X===null||X===void 0?void 0:X.type)?{type:X.type}:this.toOpenAPISchema(Y,cd($),G);return X?Q8.applySchemaMetadata(Q,X):JR(Q,iC)}constructReferencedOpenAPISchema($){let Y=Q8.getOpenApiMetadata($),X=Q8.unwrapChained($),G=Q8.getDefaultValue($),J=cd($);if(Y===null||Y===void 0?void 0:Y.type)return this.versionSpecifics.mapNullableType(Y.type,J);let Q=Q8.getRefId($);if(Q&&typeof this.schemaRefs[Q]==="object")return PG0.mapRecursive(this.schemaRefs[Q],(W)=>this.versionSpecifics.mapNullableType(W,J),(W)=>this.versionSpecifics.mapNullableOfRef(W,J));if(Q&&this.schemaRefs[Q]==="pending"){let W={$ref:this.generateSchemaRef(Q)};return this.versionSpecifics.mapNullableOfRef(W,J)}if(Q&&!this.schemaRefs[Q])this.schemaRefs[Q]="pending";return this.toOpenAPISchema(X,J,G)}generateSimpleSchema($){let Y=Q8.getOpenApiMetadata($),X=Q8.getRefId($);if(!X||!this.schemaRefs[X])return this.generateSchemaWithMetadata($);let G=this.schemaRefs[X],J={$ref:this.generateSchemaRef(X)};if(this.schemaRefs[X]==="pending")return this.versionSpecifics.mapNullableOfRef(J,cd($));let Q=JR(Q8.buildSchemaMetadata(Y!==null&&Y!==void 0?Y:{}),(K,H)=>K===void 0||nd(K,G[H]));if(Q.type)return{allOf:[J,Q]};let W=JR(this.constructReferencedOpenAPISchema($),(K,H)=>K===void 0||nd(K,G[H])),Z=Q8.applySchemaMetadata(W,Q);if(Object.keys(Z).length>0)return{allOf:[J,Z]};return J}generateSchemaWithRef($){let Y=Q8.getRefId($);if(Y&&!this.schemaRefs[Y])return this.schemaRefs[Y]=this.generateSimpleSchema($),{$ref:this.generateSchemaRef(Y)};return this.generateSimpleSchema($)}generateSchemaRef($){return`#/components/schemas/${$}`}getRequestBody($){if(!$)return;let{content:Y}=$,X=BH($,["content"]),G=this.getBodyContent(Y);return Object.assign(Object.assign({},X),{content:G})}getParameters($){if(!$)return[];let{headers:Y}=$,X=this.cleanParameter($.query),G=this.cleanParameter($.params),J=this.cleanParameter($.cookies),Q=ld(()=>X?this.generateInlineParameters(X,"query"):[],{location:"query"}),W=ld(()=>G?this.generateInlineParameters(G,"path"):[],{location:"path"}),Z=ld(()=>J?this.generateInlineParameters(J,"cookie"):[],{location:"cookie"}),K=ld(()=>{if(Array.isArray(Y))return Y.flatMap((z)=>this.generateInlineParameters(z,"header"));let H=this.cleanParameter(Y);return H?this.generateInlineParameters(H,"header"):[]},{location:"header"});return[...W,...Q,...K,...Z]}cleanParameter($){if(!$)return;if(R6($,"ZodPipe")){let Y=$._zod.def.in,X=$._zod.def.out;if(R6(Y,"ZodObject"))return this.cleanParameter(Y);if(R6(X,"ZodObject"))return this.cleanParameter(X);return}return $}generatePath($){let{method:Y,path:X,request:G,responses:J}=$,Q=BH($,["method","path","request","responses"]),W=id(J,(z)=>{return this.getResponse(z)}),Z=ld(()=>this.getParameters(G),{route:`${Y} ${X}`}),K=this.getRequestBody(G===null||G===void 0?void 0:G.body);return{[Y]:Object.assign(Object.assign(Object.assign(Object.assign({},Q),Z.length>0?{parameters:[...Q.parameters||[],...Z]}:{}),K?{requestBody:K}:{}),{responses:W})}}generateSingleRoute($){let Y=this.generatePath($);return this.pathRefs[$.path]=Object.assign(Object.assign({},this.pathRefs[$.path]),Y),Y}getResponse($){if(this.isReferenceObject($))return $;let{content:Y,headers:X}=$,G=BH($,["content","headers"]),J=Y?{content:this.getBodyContent(Y)}:{};if(!X)return Object.assign(Object.assign({},G),J);let Q=R6(X,"ZodObject")?this.getResponseHeaders(X):X;return Object.assign(Object.assign(Object.assign({},G),{headers:Q}),J)}isReferenceObject($){return"$ref"in $}getResponseHeaders($){let Y=$.def.shape;return id(Y,(G)=>this.generateSimpleParameter(G))}getBodyContent($){return id($,(Y)=>{if(!Y||!kJ(Y.schema))return Y;let{schema:X}=Y,G=BH(Y,["schema"]),J=this.generateSchemaWithRef(X);return Object.assign({schema:J},G)})}toOpenAPISchema($,Y,X){return this.openApiTransformer.transform($,Y,(J)=>this.generateSchemaWithRef(J),(J)=>this.generateSchemaRef(J),X)}}class nk4{get nullType(){return{nullable:!0}}mapNullableOfArray($,Y){if(Y&&!$.some((X)=>nd(X,this.nullType)))return[...$,this.nullType];return $}mapNullableType($,Y){return Object.assign(Object.assign({},$?{type:$}:void 0),Y?this.nullType:void 0)}mapNullableOfRef($,Y){if(Y)return{allOf:[$,this.nullType]};return $}mapTupleItems($){let Y=jk4($);return{items:Y.length===1?Y[0]:{anyOf:Y},minItems:$.length,maxItems:$.length}}getNumberChecks($){return Object.assign({},...$.map((Y)=>{switch(Y._zod.def.check){case"greater_than":{let X=Y;return X._zod.def.inclusive?{minimum:Number(X._zod.def.value)}:{minimum:Number(X._zod.def.value),exclusiveMinimum:!0}}case"less_than":{let X=Y;return X._zod.def.inclusive?{maximum:Number(X._zod.def.value)}:{maximum:Number(X._zod.def.value),exclusiveMaximum:!X._zod.def.inclusive}}default:return{}}}))}}class Dn0{constructor($,Y){let X=new nk4;this.generator=new Fn0($,X,Y)}generateDocument($){let Y=this.generator.generateDocumentData();return Object.assign(Object.assign({},$),Y)}generateComponents(){return this.generator.generateComponents()}}class rk4{get nullType(){return{type:"null"}}mapNullableOfArray($,Y){if(Y&&!$.some((X)=>nd(X,this.nullType)))return[...$,this.nullType];return $}mapNullableType($,Y){if(!$)return{};if(Y){let X=Array.isArray($)?$:[$];return{type:jk4([...X,"null"])}}return{type:$}}mapNullableOfRef($,Y){if(Y)return{oneOf:[$,this.nullType]};return $}mapTupleItems($){return{prefixItems:$}}getNumberChecks($){return Object.assign({},...$.map((Y)=>{switch(Y._zod.def.check){case"greater_than":{let X=Y;return X._zod.def.inclusive?{minimum:Number(X._zod.def.value)}:{exclusiveMinimum:Number(X._zod.def.value)}}case"less_than":{let X=Y;return X._zod.def.inclusive?{maximum:Number(X._zod.def.value)}:{exclusiveMaximum:Number(X._zod.def.value)}}default:return{}}}))}}function kb9($){return"type"in $&&$.type==="webhook"}class Nn0{constructor($,Y){this.definitions=$,this.webhookRefs={};let X=new rk4;this.generator=new Fn0(this.definitions,X,Y)}generateDocument($){let Y=this.generator.generateDocumentData();return this.definitions.filter(kb9).forEach((X)=>this.generateSingleWebhook(X.webhook)),Object.assign(Object.assign(Object.assign({},$),Y),{webhooks:this.webhookRefs})}generateComponents(){return this.generator.generateComponents()}generateSingleWebhook($){let Y=this.generator.generatePath($);return this.webhookRefs[$.path]=Object.assign(Object.assign({},this.webhookRefs[$.path]),Y),Y}}var vb9=/^[\w!#$%&'*.^`|~+-]+$/,xb9=/^[ !#-:<-[\]-~]*$/,ak4=($)=>{let Y=0,X=$.length;while(Y<X){let G=$.charCodeAt(Y);if(G!==32&&G!==9)break;Y++}while(X>Y){let G=$.charCodeAt(X-1);if(G!==32&&G!==9)break;X--}return Y===0&&X===$.length?$:$.slice(Y,X)},Ln0=($,Y)=>{if(Y&&$.indexOf(Y)===-1)return{};let X=$.split(";"),G={};for(let J of X){let Q=J.indexOf("=");if(Q===-1)continue;let W=ak4(J.substring(0,Q));if(Y&&Y!==W||!vb9.test(W))continue;let Z=ak4(J.substring(Q+1));if(Z.startsWith('"')&&Z.endsWith('"'))Z=Z.slice(1,-1);if(xb9.test(Z)){if(G[W]=Z.indexOf("%")!==-1?VR(Z,$S):Z,Y)break}}return G};var sk4=($,Y,X)=>{let G=$.req.raw.headers.get("Cookie");if(typeof Y==="string"){if(!G)return;let Q=Y;if(X==="secure")Q="__Secure-"+Y;else if(X==="host")Q="__Host-"+Y;return Ln0(G,Q)[Q]}if(!G)return{};return Ln0(G)};var yb9=/^application\/([a-z-\.]+\+)?json(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/,bb9=/^multipart\/form-data(;\s?boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/,hb9=/^application\/x-www-form-urlencoded(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/,Bn0=($,Y)=>{return async(X,G)=>{let J={},Q=X.req.header("Content-Type");switch($){case"json":if(!Q||!yb9.test(Q))break;try{J=await X.req.json()}catch{throw new k0(400,{message:"Malformed JSON in request body"})}break;case"form":{if(!Q||!(bb9.test(Q)||hb9.test(Q)))break;let Z;if(X.req.bodyCache.formData)Z=await X.req.bodyCache.formData;else try{let H=await X.req.arrayBuffer();Z=await mK4(H,Q),X.req.bodyCache.formData=Z}catch(H){let z="Malformed FormData request.";throw z+=H instanceof Error?` ${H.message}`:` ${String(H)}`,new k0(400,{message:z})}let K=Object.create(null);Z.forEach((H,z)=>{if(z.endsWith("[]"))(K[z]??=[]).push(H);else if(Array.isArray(K[z]))K[z].push(H);else if(Object.hasOwn(K,z))K[z]=[K[z],H];else K[z]=H}),J=K;break}case"query":J=Object.fromEntries(Object.entries(X.req.queries()).map(([Z,K])=>{return K.length===1?[Z,K[0]]:[Z,K]}));break;case"param":J=X.req.param();break;case"header":J=X.req.header();break;case"cookie":J=sk4(X);break}let W=await Y(J,X);if(W instanceof Response)return W;return X.req.addValidatedData($,W),await G()}};function fb9($,Y,X,G){return Bn0($,async(J,Q)=>{let W=J;if($==="header"&&"_def"in Y||$==="header"&&"_zod"in Y){let K=Object.keys("in"in Y?Y.in.shape:Y.shape),H=Object.fromEntries(K.map((z)=>[z.toLowerCase(),z]));W=Object.fromEntries(Object.entries(J).map(([z,V])=>[H[z]||z,V]))}let Z=G&&G.validationFunction?await G.validationFunction(Y,W):await Y.safeParseAsync(W);if(X){let K=await X({data:W,...Z,target:$},Q);if(K){if(K instanceof Response)return K;if("response"in K)return K.response}}if(!Z.success)return Q.json(Z,400);return Z.data})}var QR=fb9;KY();function gb9($){return typeof $==="object"&&$!==null}function mb9($){if(!$)return!1;if(!gb9($))return!1;return typeof $.parse==="function"&&typeof $.safeParse==="function"&&typeof $.parseAsync==="function"&&typeof $.safeParseAsync==="function"}var $v4=class $ extends O4{openAPIRegistry;defaultHook;constructor(Y){super(Y);this.openAPIRegistry=new Vn0,this.defaultHook=Y===null||Y===void 0?void 0:Y.defaultHook}openapi=({middleware:Y,hide:X,...G},J,Q=this.defaultHook)=>{var W,Z,K,H,z;if(!X)this.openAPIRegistry.registerPath(G);let V=[];if((W=G.request)===null||W===void 0?void 0:W.query){let L=QR("query",G.request.query,Q);V.push(L)}if((Z=G.request)===null||Z===void 0?void 0:Z.params){let L=QR("param",G.request.params,Q);V.push(L)}if((K=G.request)===null||K===void 0?void 0:K.headers){let L=QR("header",G.request.headers,Q);V.push(L)}if((H=G.request)===null||H===void 0?void 0:H.cookies){let L=QR("cookie",G.request.cookies,Q);V.push(L)}let A=(z=G.request)===null||z===void 0||(z=z.body)===null||z===void 0?void 0:z.content;if(A)for(let L of Object.keys(A)){if(!A[L])continue;let B=A[L].schema;if(!mb9(B))continue;if(tk4(L)){var F;let O=QR("json",B,Q);if((F=G.request)===null||F===void 0||(F=F.body)===null||F===void 0?void 0:F.required)V.push(O);else{let E=async(M,R)=>{if(M.req.header("content-type")){if(tk4(M.req.header("content-type")))return await O(M,R)}M.req.addValidatedData("json",{}),await R()};V.push(E)}}if(ek4(L)){var N;let O=QR("form",B,Q);if((N=G.request)===null||N===void 0||(N=N.body)===null||N===void 0?void 0:N.required)V.push(O);else{let E=async(M,R)=>{if(M.req.header("content-type")){if(ek4(M.req.header("content-type")))return await O(M,R)}M.req.addValidatedData("form",{}),await R()};V.push(E)}}}let D=Y?Array.isArray(Y)?Y:[Y]:[];return this.on([G.method],[G.path.replaceAll(/\/{(.+?)}/g,"/:$1")],...D,...V,J),this};openapiRoutes=(Y)=>{return Y.filter(({addRoute:X})=>X!==!1).forEach(({route:X,handler:G,hook:J})=>{this.openapi(X,G,J)}),this};getOpenAPIDocument=(Y,X)=>{let G=new Dn0(this.openAPIRegistry.definitions,X).generateDocument(Y);return this._basePath?ok4(G,this._basePath):G};getOpenAPI31Document=(Y,X)=>{let G=new Nn0(this.openAPIRegistry.definitions,X).generateDocument(Y);return this._basePath?ok4(G,this._basePath):G};doc=(Y,X,G)=>{return this.get(Y,(J)=>{let Q=typeof X==="function"?X(J):X,W=typeof G==="function"?G(J):G;try{let Z=this.getOpenAPIDocument(Q,W);return J.json(Z)}catch(Z){return J.json(Z,500)}})};doc31=(Y,X,G)=>{return this.get(Y,(J)=>{let Q=typeof X==="function"?X(J):X,W=typeof G==="function"?G(J):G;try{let Z=this.getOpenAPI31Document(Q,W);return J.json(Z)}catch(Z){return J.json(Z,500)}})};route(Y,X){let G=Y.replaceAll(/:([^\/]+)/g,"{$1}");if(super.route(Y,X),!(X instanceof $))return this;return X.openAPIRegistry.definitions.forEach((J)=>{switch(J.type){case"component":return this.openAPIRegistry.registerComponent(J.componentType,J.name,J.component);case"route":this.openAPIRegistry.registerPath({...J.route,path:E2(G,X._basePath.replaceAll(/:([^\/]+)/g,"{$1}"),J.route.path)});return;case"webhook":this.openAPIRegistry.registerWebhook({...J.webhook,path:E2(G,X._basePath.replaceAll(/:([^\/]+)/g,"{$1}"),J.webhook.path)});return;case"schema":var Q;return this.openAPIRegistry.register((Q=zn0(J.schema)._internal)===null||Q===void 0?void 0:Q.refId,J.schema);case"parameter":var W;return this.openAPIRegistry.registerParameter((W=zn0(J.schema)._internal)===null||W===void 0?void 0:W.refId,J.schema);default:throw Error(`Unknown registry type: ${J}`)}}),this}basePath(Y){return new $({...super.basePath(Y),defaultHook:this.defaultHook})}},On0=($)=>{let Y={...$,getRoutingPath(){return $.path.replaceAll(/\/{(.+?)}/g,"/:$1")}};return Object.defineProperty(Y,"getRoutingPath",{enumerable:!1})};Ck4(U);function ok4($,Y){let X={};return Object.keys($.paths).forEach((G)=>{X[E2(Y.replaceAll(/:([^\/]+)/g,"{$1}"),G)]=$.paths[G]}),{...$,paths:X}}function tk4($){return/^application\/([a-z-\.]+\+)?json/.test($)}function ek4($){return $.startsWith("multipart/form-data")||$.startsWith("application/x-www-form-urlencoded")}import ub9 from"os";function Yv4($,Y,X){let J=($.servers?.[0]?.url||"").replace(/\/$/,""),Q="# "+$.info.title+`

> `+($.info.description||"")+`

**Version:** `+$.info.version+`

**Base URL:** `+J+`

**appId:** `+Y+`

**appSecret:** `+X+`

---
`;for(let[W,Z]of Object.entries($.paths))for(let[K,H]of Object.entries(Z)){if(K==="parameters")continue;let z=H;if(Q+="## "+K.toUpperCase()+" "+W+`

`,Q+="**URL:** `"+J+W+`\`

`,z.summary)Q+="**Description:** "+z.summary+`

`;let V=z.parameters||[];if(V.length>0){Q+=`### Example Parameters

`,Q+=`| Name | In | Required | Example |
`,Q+=`|------|-----|----------|-------|
`;for(let F of V){let N=F.name||"",D=F.schema?.example||"";Q+="| `"+N+"` | "+F.in+" | "+(F.required?"Yes":"No")+" | `"+D+"` |\n"}Q+=`
`}let A=z.requestBody?.content?.["application/json"]?.example||z.requestBody?.content?.body?.schema?.example;if(A)Q+="### Example Request Body\n\n```json\n"+JSON.stringify(A,null,2)+"\n```\n\n";for(let[F,N]of Object.entries(z.responses||{})){let D=N.content?.["application/json"]?.schema?.example||N.content?.["application/json"]?.example;if(D)Q+="### Example Response "+F+`

`,Q+=(N.description||"")+`

`,Q+="```json\n"+JSON.stringify(D,null,2)+"\n```\n\n"}Q+=`---

`}return Q}var OH=new $v4,Gv4="",Jv4="";function pb9(){let $=ub9.networkInterfaces();for(let Y of Object.keys($))for(let X of $[Y])if(X.family==="IPv4"&&!X.internal)return X.address;return"No External IP found"}var Xv4=pb9();OH.openAPIRegistry.registerComponent("securitySchemes","Bearer",{type:"http",scheme:"bearer",bearerFormat:"JWT"});async function db9($,Y,X){let G=On0({method:"get",path:"/getAccessToken",security:[{Bearer:[]}],request:{query:U.object({appId:U.string().openapi({param:{name:"appId",in:"query"},example:"CInM3"}),appSecret:U.string().openapi({param:{name:"appSecret",in:"query"},example:"Itvm4lA0S2"})})},responses:{200:{content:{"application/json":{schema:U.object().openapi({example:{data:{success:!0,msg:"",token:"eyJhbGciOiJSUzI1NiJ9.eyJ0YmNsb3VkLm1lOmNsYWltIjp0cnVlLCJpYXQiOjE3NzYwNDY2OTgsImlzcyI6InRiY2xvdWQubWU6aXNzdWVyIiwiYXVkIjoidGJjbG91ZC5tZTphdWRpZW5jZSIsImV4cCI6MTc3NjIxOTQ5OCwic3ViIjoiMjAyNi0wNC0xNSJ9.FWFLMzRxvyqJBWiajGR8yylDREfhFrgNIr18zcb27pGK0cXi76GGMeAN6u40tJSCM0LWV6aP7GAjeNWPjCLMsUm5wV_W52_PKdacRbltE5fCsujHtMqcUDD-75IU1RLhLk-5edBtxnZ_593B7GiCz9664MSnrhUNKUrz_SFMJQ_At6SC2a-dLyAly66Nj-asHuaAv8R-KWI-h9xRz4OVNcZrWXosDfTMzUvhD3aQqfaJdYJg82vOEalHvb_uGW-vVGQAbU73Lvcs7_ItiqEMyKtaQx251a7K-qxii6s6Sb3OCzDTCEkhPzq8YZBnyIbfaVDM6NLD4DDGc6x02Thc6g"},requestId:"eofw3k0qnolj5ewozfc0fzhh",timestamp:"2026-4-13 10:18:18",code:"0000"}})}},description:"Retrieve the token"}}});OH.openapi(G,(W)=>{return W.json({},200)}),Gv4=(await WB(X))[0]?.name??"";let Q=await tN(X);if(Q&&a8(Q))Q.forEach((W)=>{if(W.parames&&W.resp&&W.parames.length>0&&W.resp.length>0){let Z=On0({method:"post",path:`/api/proxy/${W.path1}/${W.path2}`,security:[{Bearer:[]}],request:{headers:U.object({authorization:U.string().openapi({example:"Bearer token"}),"content-type":U.string().openapi({example:"application/json"})}),body:{content:{body:{schema:U.object().openapi({example:JSON.parse(W.parames)})}},required:!0}},responses:{200:{content:{"application/json":{schema:U.object().openapi({example:JSON.parse(W.resp)})}},description:W.name}}});OH.openapi(Z,(K)=>{return K.json({},200)})}});OH.basePath($)}OH.post("/generate",async($)=>{let{base:Y,port:X,path1:G}=await $.req.json();Jv4=Y,await db9(Y,X,G);let J=t0();return J.data={success:!0},$.json(J)});OH.doc31("/doc",()=>{return{openapi:"3.1.0",info:{title:"api doc",version:"1.0.0",description:Gv4},servers:[{url:Jv4,description:"\u6D4B\u8BD5\u73AF\u5883"}],components:{securitySchemes:{Bearer:{type:"http",scheme:"bearer",bearerFormat:"JWT"}}},security:[{Bearer:[]}]}});OH.post("/downloadOpenAPI31-demo",async($)=>{try{let{base:Y,port:X,path1:G,toSelectAppId:J}=await $.req.json(),Q=J.split("-")[0],W=J.split("-")[1];await pE(`http://${Xv4}:${Bun.env.PORT||3000}/api/openapi/generate`,"POST","",{base:Y,port:X,path1:G});let Z=await pE(`http://${Xv4}:${Bun.env.PORT||3000}/api/openapi/doc`,"GET"),K=Yv4(Z,Q,W);return $.newResponse(K,200,{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="example.md"',"Content-Length":K.length.toString()})}catch(Y){throw console.error(Y),new k0(500,{message:"\u5BFC\u51FA\u5931\u8D25"})}});OH.post("/exportMarkDown",async($)=>{try{let{base:Y,port:X,path1:G,toSelectAppId:J}=await $.req.json(),Q=J.split("-")[0],W=J.split("-")[1],Z=await WB(G),K=await tN(G),H="# "+"\u63A5\u53E3\u6587\u6863"+`

> `+(Z[0]?.name||"")+`

**Version:** 1.0.0

**Base URL:** `+Y+`

**appId:** `+Q+`

**appSecret:** `+W+`

---
`;if(H+=`## GET /getAccessToken

`,H+="**URL:** `"+Y+`/getAccessToken\`

`,H+="\u83B7\u53D6token\u63A5\u53E3"+`

`,H+=`### Example Parameters

`,H+=`| Name | In | Required | Example |
`,H+=`|------|-----|----------|-------|
`,H+="| `appId` | query | Yes | `"+Q+"` |\n",H+="| `appSecret` | query | Yes | `"+W+"` |\n",H+=`
`,H+=`### Example Response 

`,H+="```json\n"+JSON.stringify({data:{success:!0,msg:"",token:"eyJhbGciOiJSUzI1NiJ9.eyJ0YmNsb3VkLm1lOmNsYWltIjp0cnVlLCJpYXQiOjE3NzYwNDY2OTgsImlzcyI6InRiY2xvdWQubWU6aXNzdWVyIiwiYXVkIjoidGJjbG91ZC5tZTphdWRpZW5jZSIsImV4cCI6MTc3NjIxOTQ5OCwic3ViIjoiMjAyNi0wNC0xNSJ9.FWFLMzRxvyqJBWiajGR8yylDREfhFrgNIr18zcb27pGK0cXi76GGMeAN6u40tJSCM0LWV6aP7GAjeNWPjCLMsUm5wV_W52_PKdacRbltE5fCsujHtMqcUDD-75IU1RLhLk-5edBtxnZ_593B7GiCz9664MSnrhUNKUrz_SFMJQ_At6SC2a-dLyAly66Nj-asHuaAv8R-KWI-h9xRz4OVNcZrWXosDfTMzUvhD3aQqfaJdYJg82vOEalHvb_uGW-vVGQAbU73Lvcs7_ItiqEMyKtaQx251a7K-qxii6s6Sb3OCzDTCEkhPzq8YZBnyIbfaVDM6NLD4DDGc6x02Thc6g"},requestId:"eofw3k0qnolj5ewozfc0fzhh",timestamp:"2026-4-13 10:18:18",code:"0000"},null,2)+"\n```\n\n",H+=`---

`,K&&a8(K))K.forEach((z)=>{if(z.parames&&z.resp&&z.parames.length>0&&z.resp.length>0)H+=`## POST /api/proxy/${z.path1}/${z.path2}

`,H+="**URL:** `"+Y+`/api/proxy/${z.path1}/${z.path2}\`

`,H+=z.name+`

`,H+=`### Example Parameters

`,H+=`| Name | In | Required | Example |
`,H+=`|------|-----|----------|-------|
`,H+="| `authorization` | header | Yes | `Bearer token` |\n",H+="| `content-type` | header | Yes | `application/json` |\n",H+=`
`,H+="### Example Request Body\n\n```json\n"+JSON.stringify(JSON.parse(z.parames),null,2)+"\n```\n\n",H+=`### Example Response 

`,H+="```json\n"+JSON.stringify(JSON.parse(z.resp),null,2)+"\n```\n\n",H+=`---

`});return $.newResponse(H,200,{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="example.md"',"Content-Length":H.length.toString()})}catch(Y){throw console.error(Y),new k0(500,{message:"\u5BFC\u51FA\u5931\u8D25"})}});OH.post("/exportSqliteMarkDown",async($)=>{try{let{name:Y,poolCode:X,base:G,path:J,toSelectAppId:Q}=await $.req.json(),W=Q.split("-")[0],Z=Q.split("-")[1],K="# "+"\u63A5\u53E3\u6587\u6863"+`

> `+(Y||"")+`

**Version:** 1.0.0

**Base URL:** `+G+`

**appId:** `+W+`

**appSecret:** `+Z+`

---
`;K+=`## GET /getAccessToken

`,K+="**URL:** `"+G+`/getAccessToken\`

`,K+="\u83B7\u53D6token\u63A5\u53E3"+`

`,K+=`### Example Parameters

`,K+=`| Name | In | Required | Example |
`,K+=`|------|-----|----------|-------|
`,K+="| `appId` | query | Yes | `"+W+"` |\n",K+="| `appSecret` | query | Yes | `"+Z+"` |\n",K+=`
`,K+=`### Example Response 

`,K+="```json\n"+JSON.stringify({data:{success:!0,msg:"",token:"eyJhbGciOiJSUzI1NiJ9.eyJ0YmNsb3VkLm1lOmNsYWltIjp0cnVlLCJpYXQiOjE3NzYwNDY2OTgsImlzcyI6InRiY2xvdWQubWU6aXNzdWVyIiwiYXVkIjoidGJjbG91ZC5tZTphdWRpZW5jZSIsImV4cCI6MTc3NjIxOTQ5OCwic3ViIjoiMjAyNi0wNC0xNSJ9.FWFLMzRxvyqJBWiajGR8yylDREfhFrgNIr18zcb27pGK0cXi76GGMeAN6u40tJSCM0LWV6aP7GAjeNWPjCLMsUm5wV_W52_PKdacRbltE5fCsujHtMqcUDD-75IU1RLhLk-5edBtxnZ_593B7GiCz9664MSnrhUNKUrz_SFMJQ_At6SC2a-dLyAly66Nj-asHuaAv8R-KWI-h9xRz4OVNcZrWXosDfTMzUvhD3aQqfaJdYJg82vOEalHvb_uGW-vVGQAbU73Lvcs7_ItiqEMyKtaQx251a7K-qxii6s6Sb3OCzDTCEkhPzq8YZBnyIbfaVDM6NLD4DDGc6x02Thc6g"},requestId:"eofw3k0qnolj5ewozfc0fzhh",timestamp:"2026-4-13 10:18:18",code:"0000"},null,2)+"\n```\n\n";let H=`
          SELECT
            name AS table_name 
          FROM
            sqlite_master 
          WHERE
            type = 'table'`,z=await WX(X),V=z.all(r.raw(H)),A=[];V.forEach((N)=>{let D=`PRAGMA table_info(${N.table_name})`;z.all(r.raw(D)).forEach((B)=>{A.push({table_name:N.table_name,column_name:B.name,data_type:B.type})})});let F=cb9({tables:V,columns:A});return K+=`# DATABASE SCHEMA
`,K+=F,K+=`---
`,K+=`# Database API Reference
`,K+=`PostgREST-style database operations via REST API
`,K+=`## Overview
`,K+=`The Database API provides CRUD operations for your database tables. All requests require authentication headers.
`,K+=`## Headers
`,K+=`Authorization: Bearer your-token
`,K+=`Content-Type: application/json
`,K+=`## Query Records
`,K+=`Retrieve records from a table with filtering, sorting, and pagination.
`,K+="```\n",K+=`GET ${G}${J}{table}
`,K+="```\n",K+=`### Query Parameters
`,K+=`| Parameter | Type    | Description                                      |
`,K+=`| --------- | ------- | ------------------------------------------------ |
`,K+="| `pageNum` | integer | current page index for pagination (default: 1)   |\n",K+="| `pageSize`| integer | Records return count for pagination (default: 10)|\n",K+="| `order`   | string  | Sort order (e.g., `createdAt.desc`, `name.asc`)  |\n",K+="| `{field}` | string  | filter (e.g., `status=eq.active`)                |\n",K+=`### Filter Operators
`,K+=`| Operator | Description                      | Example                      |
`,K+=`| -------- | -------------------------------- | ---------------------------- |
`,K+="| `eq`     | Equal                            | `status=eq.active`           |\n",K+="| `neq`    | Not equal                        | `status=neq.deleted`         |\n",K+="| `gt`     | Greater than                     | `age=gt.18`                  |\n",K+="| `gte`    | Greater than or equal            | `price=gte.100`              |\n",K+="| `lt`     | Less than                        | `quantity=lt.10`             |\n",K+="| `lte`    | Less than or equal               | `score=lte.50`               |\n",K+="| `like`   | Pattern match (case-sensitive)   | `name=like.*john*`           |\n",K+="| `in`     | In list                          | `status=in.(active,pending)` |\n",K+="| `is`     | Is null/true/false               | `deleted_at=is.null`         |\n",K+=`### Example for request
`,K+="```\n",K+=`${G}${J}employee?pageNum=1&pageSize=10&order=create_time.asc&age=eq.18
`,K+="```\n",K+=`### Example for response body
`,K+="```json\n",K+=JSON.stringify({data:{records:[{id:"kbnpry2ro4tjnezy4mtrctai",create_time:"2026-07-14 16:11:35",update_time:"2026-07-15 11:38:24",name:"liujn11",age:18,salary:231231,birth:"2026-10"}],total:1},requestId:"ao2435qkybvynlecoctzt44s",timestamp:"2026-7-25 9:21:22",code:"0000"})+`
`,K+="```\n",K+=`## Create Records
`,K+=`Create one or more records in a table.
`,K+="```\n",K+=`POST ${G}${J}{table}
`,K+="```\n",K+=`### Example for request body
`,K+="```json\n",K+=JSON.stringify([{name:"liu11",age:22,salary:231231,birth:"2026-10"},{name:"liu33",age:22,salary:231231,birth:"2026-10"}])+`
`,K+="```\n",K+=`### Example for response body
`,K+="```json\n",K+=JSON.stringify({data:null,requestId:"bcqe8puqn0qr6k0ub5br7ntb",timestamp:"2026-7-25 9:29:37",code:"0000"})+`
`,K+="```\n",K+=`## Update Records
`,K+=`Update records by id.
`,K+="```\n",K+=`PATCH ${G}${J}{table}
`,K+="```\n",K+=`### Example for request body
`,K+="```json\n",K+=JSON.stringify([{id:"u5lzilt2bzwezlzyln80cfk0",name:"liu11",age:33,salary:231231,birth:"2026-10"}])+`
`,K+="```\n",K+=`### Example for response body
`,K+="```json\n",K+=JSON.stringify({data:null,requestId:"dt02idnchf51rrv4d079190k",timestamp:"2026-7-25 9:33:6",code:"0000"})+`
`,K+="```\n",K+=`## Delete Records
`,K+=`Delete records by id.
`,K+="```\n",K+=`DELETE ${G}${J}{table}?id={id}
`,K+="```\n",K+=`### Example for request
`,K+="```\n",K+=`http://172.17.6.35:3000/api/sqlite/test/employee?id=u5lzilt2bzwezlzyln80cfk0
`,K+="```\n",K+=`### Example for response body
`,K+="```json\n",K+=JSON.stringify({data:null,requestId:"dt02idnchf51rrv4d079190k",timestamp:"2026-7-25 9:33:6",code:"0000"})+`
`,K+="```\n",$.newResponse(K,200,{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="example.md"',"Content-Length":K.length.toString()})}catch(Y){throw console.error(Y),new k0(500,{message:"\u5BFC\u51FA\u5931\u8D25"})}});function cb9($){let Y="",X=new Map;return $.columns.forEach((G)=>{let J=`${G.table_name}`;if(!X.has(J))X.set(J,[]);X.get(J)?.push(G)}),$.tables.forEach((G)=>{let J=`${G.table_name}`,Q=X.get(J)||[];Y+=`Table: ${G.table_name}
`,Y+=`Columns:
`,Q.forEach((W)=>{Y+=`  - ${W.column_name}: ${W.data_type}`,Y+=`
`}),Y+=`
`}),Y}var Qv4=OH;function Wv4($){return[...new Set($)]}function sd($,Y){return Wv4($.concat(Y))}var Zv4=new O4;Zv4.get("/queryAllSource",async($)=>{try{let Y=await xX1({limit:1000,offset:0}),X=await Ma({limit:1000,offset:0}),G=await Ts({limit:1000,offset:0}),J=await $a({limit:1000,offset:0}),Q=sd(sd(sd(Y,X),G),J),W=t0();return W.data=Q,$.json(W)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});var Kv4=Zv4;var wG0=new O4;wG0.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};z6(Y,$.req.query());let X=await hY1(Y),G=await fY1(Y),J=t0();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});wG0.post("/save",async($)=>{try{let Y=await $.req.json(),X={};z6(X,Y),await Bn(X);let G=t0();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new k0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});wG0.post("/delete",async($)=>{try{let Y=await $.req.json();await gY1(Y.code);let X=t0();return $.json(X)}catch(Y){throw console.error(Y),new k0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var Uv4=wG0;import ob9 from"os";var zv4=new Hv4.default({length:10}),s1=new O4;s1.onError(($,Y)=>{let X=t0();return X.data=$.message,Y.json(X)});s1.use(Tr0());s1.use("/api/execution/*",async($,Y)=>{let X=zv4.randomUUID();$.set("traceId",X),v2.info(`\u8BF7\u6C42\u7684traceId --> ${X}`),console.log(`\u8BF7\u6C42\u7684traceId --> ${X}`),await Y()});s1.use("*",WJ0());s1.use("*",ZJ0());s1.use(Sr0());s1.use("*",vr0(60000));s1.use(async($,Y)=>{let X=performance.now();await Y();let G=performance.now();$.res.headers.set("X-Response-Time",`${G-X}`)});s1.use(Mr0({windowMs:900000,limit:5000,keyGenerator:($)=>$.req.header("x-forwarded-for")??"",message:{error:"\u5F53\u524DIP\u8BF7\u6C42\u8FC7\u591A\uFF0C\u8BF715\u5206\u949F\u540E\u518D\u6B21\u5C1D\u8BD5\u3002",retryAfter:"15 minutes"},standardHeaders:"draft-6",skip:($)=>$.req.path.startsWith("/health"),skipFailedRequests:!0}));var lb9=["system/activate","system/initConfig","system/generate","system/queryActivate","system/queryConfig","login","getAccessToken","openai/chat","openai/agentChat","mcp","sys-mcp","openapi/exportMarkDown","openapi/exportSqliteMarkDown"],ib9=Cr0(async($,Y)=>{let G=($.req.path||"/api/nopath").split("/api/")[1].split("?");if(!lb9.includes(G[0])){let J=$.req.header("Authorization");if(J&&J.length>0){let Q=!1;if(J.includes("Bearer"))Q=await sk(J.split(" ")[1]?.toString()||"");else Q=await sk(J);if(!Q)throw new k0(401,{message:"\u8BBF\u95EE\u51ED\u8BC1\u65E0\u6548"})}else throw new k0(401,{message:"\u7528\u6237\u672A\u8BA4\u8BC1"})}await Y()});s1.use("/api/*",ib9);s1.get("/getAccessToken",async($)=>{let Y=$.req.query("appId"),X=$.req.query("appSecret"),G=t0();if(!Y||!X)throw new k0(401,{message:"appId\u7F3A\u5C11"});let J=await ki(Y?Y:"",X?X:"");if(J.length==0)throw new k0(401,{message:"appId\u65E0\u6548"});let Q=await rH(J[0].day);return G.data={success:!0,msg:"",token:Q},$.json(G)});s1.post("/login",async($)=>{let Y=await $.req.json(),X=Y.userName,G=Y.password,J=t0(),Q=await vk("admin_account");if(Q){let W=JSON.parse(Q);if(W.username==X&&W.password==G){J.businessCode=1e4,J.businessMsg="\u767B\u5F55\u6210\u529F";let K=await rH(1);J.data={token:K}}else J.businessCode=10002,J.businessMsg="\u8D26\u53F7\u5BC6\u7801\u6709\u8BEF",J.code="0001",J.msg="\u8D26\u53F7\u5BC6\u7801\u6709\u8BEF"}else J.businessCode=10002,J.businessMsg="\u8D26\u53F7\u5BC6\u7801\u6709\u8BEF",J.code="0001",J.msg="\u8D26\u53F7\u5BC6\u7801\u6709\u8BEF";return $.json(J)});s1.all("/",($)=>{return $.text("welcome :)")});s1.notFound(($)=>{return $.text("404 :)",404)});s1.options("/*",($)=>$.text("success :)"));s1.route("/api/upload",GJ1);s1.route("/api/demo",QJ1);s1.route("/api/source",rU1);s1.route("/api/pgSource",mV1);s1.route("/api/oracleSource",qB1);s1.route("/api/sqliteSource",IB1);s1.route("/api/appmanager",PB1);s1.route("/api/apimanager",pB1);s1.route("/api/system",cB1);s1.route("/api/dataplug",sB1);s1.route("/api/mysqlCustomService",XO1);s1.route("/api/pgCustomService",KO1);s1.route("/api/oracleCustomService",Qh1);s1.route("/api/sqliteCustomService",Zh1);s1.route("/api/execution",IK4);s1.route("/api/getAccessToken",wK4);s1.route("/api/mcpmanager",vK4);s1.route("/mcp",RU4);s1.route("/sys-mcp",fz4);s1.route("/api/openai",Dk4);s1.route("/api/llmconfig",Nk4);s1.route("/api/agentmanager",Lk4);s1.route("/api/fileUpload",Bk4);s1.route("/api/apiProxymanager",Ok4);s1.route("/api/apiProxyDetail",Ek4);s1.route("/api/apiProxyStatistics",Mk4);s1.route("/api/openapi",Qv4);s1.route("/api/commonService",Kv4);s1.route("/api/pageapp",Uv4);s1.use("/static/*",v5({root:"./"}));s1.use("/static/home",v5({path:"./static/index.html"}));s1.use("/static/home/*",v5({path:"./static/index.html"}));s1.use("/static/login",v5({path:"./static/index.html"}));s1.use("/static/login/*",v5({path:"./static/index.html"}));s1.use("/static/mysql",v5({path:"./static/index.html"}));s1.use("/static/mysqlcustom",v5({path:"./static/index.html"}));s1.use("/static/flow",v5({path:"./static/index.html"}));s1.use("/static/apimanager",v5({path:"./static/index.html"}));s1.use("/static/mcp",v5({path:"./static/index.html"}));s1.use("/static/agent",v5({path:"./static/index.html"}));s1.use("/static/fileupload",v5({path:"./static/index.html"}));s1.use("/static/system",v5({path:"./static/index.html"}));s1.use("/static/flowedit",v5({path:"./static/index.html"}));s1.use("/static/dataspace",v5({path:"./static/index.html"}));s1.use("/static1/home",v5({path:"./static/llama/index.html"}));s1.use("/static1/home/*",v5({path:"./static/llama/index.html"}));s1.use("/static1/bundle.css",v5({path:"./static/llama/bundle.css"}));s1.use("/static1/bundle.js",v5({path:"./static/llama/bundle.js"}));s1.use("/page-server/*/*",v5({root:"./static/"}));s1.use("/page-server/*/*/*",v5({root:"./static/"}));s1.use("/page-server/*/*/*/*",v5({root:"./static/"}));s1.use("/page-server/*/*/*/*/*",v5({root:"./static/"}));s1.use("/favicon.ico",v5({path:"./static/favicon.ico"}));function nb9($){let G=$.indexOf("page-server/");if(G===-1)return null;let J=G+12,Q=$.indexOf("/index.html",J);if(Q===-1)return null;return $.substring(J,Q)}s1.use("/*",async($,Y)=>{if($.req.method=="GET"){let G=$.req.header("referer"),J=$.req.header("host"),Q=$.req.header("origin"),W=$.req.url,Z=cQ.get(W)??"";if(Z.length>0&&!W.includes("/api/")){let H=cQ.get("local-ip");if(!H)H=od(),cQ.set("local-ip",H);let z=$.req.path;return cQ.set(W,Z),PH(`${Q}/page-server/${Z}${z}`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})}let K=cQ.get(G)??"";if(K.length>0&&!W.includes("/api/")){let H=cQ.get("local-ip");if(!H)H=od(),cQ.set("local-ip",H);let z=$.req.path;return cQ.set(W,K),PH(`${Q}/page-server/${K}${z}`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})}if(G?.includes("page-server")&&!W.includes("page-server")&&!W.includes("/api/")){let H=nb9(G),z=cQ.get("local-ip");if(!z)z=od(),cQ.set("local-ip",z);let V=$.req.path;return cQ.set(W,H),PH(`${Q}/page-server/${H}${V}`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})}}await Y()});s1.get("/deploy/main",async($,Y)=>{let X=Uint8Array.fromBase64(Q61),G=new TextDecoder().decode(X);return $.html(G)});s1.post("/deploy/upload",async($,Y)=>{try{let X=await $.req.parseBody(),G=zv4.randomUUID(),J=X["paths[]"],Q=X["files[]"];if(J instanceof Array&&Q instanceof Array)J.forEach(async(Z,K)=>{if(Q[K]instanceof File){let H=Z.split("/").slice(1).join("/");await Bun.write(Bun.file(`static/page-server/${G}/${H}`),Q[K],{createPath:!0})}});return await Bn({name:G,code:G}),$.json({result:"success",code:G})}catch(X){throw console.error(X),new k0(500,{message:"\u4E0A\u4F20\u5931\u8D25"})}});var rb9=Number(Bun.env.PORT)+1,_G0=Bun.env.LLAMAHOST;s1.all("/static1/tools",async($,Y)=>{return PH(`${_G0}/tools`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})});s1.all("/static1/props",async($,Y)=>{return PH(`${_G0}/props`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})});s1.all("/static1/v1/models",async($,Y)=>{return PH(`${_G0}/v1/models`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})});s1.all("/static1/v1/chat/completions",async($,Y)=>{return PH(`${_G0}/v1/chat/completions`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})});var ab9=new nV("statistics",{embedded:!0}),yv7=new rV("statistics",async($)=>{return N$1($.data),{sent:!0}},{embedded:!0});s1.all("/api/proxy/:path1/:path2",async($,Y)=>{let X=$.req.param("path1")??"",G=$.req.param("path2")??"",Q=(await T61(X,G))[0]?.target,W=cQ.get("local-ip");if(!W)W=od(),cQ.set("local-ip",W);let Z=await Zr0($.req),K=Z.url,H=Z.method,z=await Z.text();return v2.info(`\u6536\u5230\u8BF7\u6C42:${K} \r
 \u8BF7\u6C42\u7C7B\u578B:${H} \r
 \u8BF7\u6C42\u4F53:${z}`),console.log(`\u6536\u5230\u8BF7\u6C42:${K} \r
 \u8BF7\u6C42\u7C7B\u578B:${H} \r
 \u8BF7\u6C42\u4F53:${z}`),ab9.add("statistics",{path1:X,path2:G,month:Si()}),PH(`http://${W}:${Bun.env.PORT||3000}/api/execution/${Q}`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})});s1.all("/api/sqlite/:filename/:tableName",async($,Y)=>{let X=$.req.param("filename")??"",G=$.req.param("tableName")??"";if(X.length==0)throw new k0(500,{message:"\u65E0\u6548\u7684filename"});if(G.length==0)throw new k0(500,{message:"\u65E0\u6548\u7684tableName"});let J=$.req.method,Q=t0();try{if(J=="GET"){let W=$.req.query(),{result:Z,count:K}=await rX1(X,G,W);Q.data={records:Z,total:K}}else if(J=="POST"){let W=await $.req.json();if(a8(W))await aX1(X,G,W);else throw new k0(500,{message:"\u8BF7\u6C42\u4F53\u7C7B\u578B\u9519\u8BEF"})}else if(J=="PATCH"){let W=await $.req.json();if(a8(W))await sX1(X,G,W);else throw new k0(500,{message:"\u8BF7\u6C42\u4F53\u7C7B\u578B\u9519\u8BEF"})}else if(J=="DELETE"){let W=$.req.query();await oX1(X,G,W)}else throw new k0(500,{message:"\u8BF7\u6C42\u7C7B\u578B\u9519\u8BEF"})}catch(W){throw console.error(W),new k0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}return $.json(Q)});var sb9={max:500,maxSize:1000,sizeCalculation:($,Y)=>{return 1},dispose:($,Y)=>{},ttl:86400000,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,fetchMethod:async($,Y,{options:X,signal:G,context:J})=>{}},cQ=new $Z(sb9);cQ.set("license:activate",!0);function od(){let $=ob9.networkInterfaces();for(let Y of Object.keys($))for(let X of $[Y])if(X.family==="IPv4"&&!X.internal)return X.address;return"No External IP found"}async function tb9(){console.log("\u4E3B\u7EBF\u7A0B\u542F\u52A8..."),await Bun.sleep(3000);let $=od();console.log(`\u767B\u9646\u8BF7\u8BBF\u95EE:
http://${$}:${Bun.env.PORT||3000}/static/home`)}if(Bun.isMainThread){if(v2.info("\u4E3B\u7EBF\u7A0B\u542F\u52A8..."),J61(),Number(Bun.env.LLAMASERVER))eb9();tb9()}async function eb9(){Bun.spawn(["./llama-server","-m","MiniCPM-V-4_6-Q4_K_M.gguf","--ctx-size","8192","--port",`${rb9}`,"--temp","0.7","--top-p","0.8","--top-k","100","--repeat-penalty","1.05","--reasoning","off","--no-webui","-ngl","0","-np","2"],{cwd:"./llama-server",async onExit($,Y,X,G){$.kill()}})}var hv7={port:Bun.env.PORT||3000,fetch:s1.fetch,development:!1,maxRequestBodySize:52428800,error($){return new Response(`<pre>${$}
${$.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}};export{hv7 as default};
